summaryrefslogtreecommitdiff
path: root/include/ruby.h
diff options
context:
space:
mode:
authorsvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-24 21:27:18 +0000
committersvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-24 21:27:18 +0000
commit1306ae8a461b30fbc59aedea7262958cc5775137 (patch)
tree687b92d1bc9025619c111baf9e5632c765128586 /include/ruby.h
parentbaf7c8593260210dce2b0a050ca0d65f5655b10d (diff)
* 2011-08-25ruby_1_9_1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby.h')
0 files changed, 0 insertions, 0 deletions
%'> -rw-r--r--.github/codeql/codeql-config.yml3
-rw-r--r--.github/dependabot.yml6
-rw-r--r--.github/workflows/baseruby.yml80
-rw-r--r--.github/workflows/bundled_gems.yml166
-rw-r--r--.github/workflows/check_branch.yml22
-rw-r--r--.github/workflows/check_dependencies.yml78
-rw-r--r--.github/workflows/codeql-analysis.yml75
-rw-r--r--.github/workflows/compilers.yml281
-rw-r--r--.github/workflows/cygwin.yml78
-rw-r--r--.github/workflows/macos.yml148
-rw-r--r--.github/workflows/mingw.yml179
-rw-r--r--.github/workflows/mjit-bindgen.yml104
-rw-r--r--.github/workflows/mjit.yml140
-rw-r--r--.github/workflows/publish.yml18
-rw-r--r--.github/workflows/scorecards.yml72
-rw-r--r--.github/workflows/spec_guards.yml71
-rw-r--r--.github/workflows/ubuntu.yml205
-rw-r--r--.github/workflows/wasm.yml146
-rw-r--r--.github/workflows/windows.yml193
-rw-r--r--.github/workflows/yjit-ubuntu.yml170
-rw-r--r--.gitignore31
-rw-r--r--.indent.pro32
-rw-r--r--.rdoc_options4
-rw-r--r--.travis.yml550
-rw-r--r--BSDL6
-rw-r--r--CONTRIBUTING.md5
-rw-r--r--LEGAL758
-rw-r--r--NEWS818
-rw-r--r--NEWS.md820
-rw-r--r--README.ja.md45
-rw-r--r--README.md151
-rw-r--r--aclocal.m447
-rw-r--r--addr2line.c798
-rw-r--r--addr2line.h5
-rw-r--r--appveyor.yml147
-rw-r--r--array.c6980
-rw-r--r--array.rb69
-rw-r--r--ast.c260
-rw-r--r--ast.rb344
-rwxr-xr-xautogen.sh17
-rwxr-xr-xbasictest/test.rb19
-rw-r--r--benchmark/README.md16
-rw-r--r--benchmark/array_max_float.yml30
-rw-r--r--benchmark/array_max_int.yml31
-rw-r--r--benchmark/array_max_str.yml30
-rw-r--r--benchmark/array_min.yml31
-rw-r--r--benchmark/array_sample.yml4
-rw-r--r--benchmark/array_sort_int.yml15
-rw-r--r--benchmark/attr_accessor.yml29
-rw-r--r--benchmark/buffer_each.yml27
-rw-r--r--benchmark/buffer_get.yml25
-rw-r--r--benchmark/cgi_escape_html.yml37
-rw-r--r--benchmark/constant_invalidation.rb22
-rw-r--r--benchmark/enum_lazy_flat_map.yml16
-rw-r--r--benchmark/enum_lazy_zip.yml22
-rw-r--r--benchmark/enum_minmax.yml25
-rw-r--r--benchmark/enum_sort.yml15
-rw-r--r--benchmark/enum_tally.yml4
-rw-r--r--benchmark/erb_escape_html.yml31
-rw-r--r--[-rwxr-xr-x]benchmark/fiber_chain.yml0
-rw-r--r--benchmark/fiber_locals.yml8
-rw-r--r--benchmark/float_methods.yml14
-rw-r--r--benchmark/float_neg_posi.yml8
-rw-r--r--benchmark/float_to_s.yml7
-rw-r--r--benchmark/hash_aref_array.rb5
-rw-r--r--benchmark/hash_defaults.yml6
-rw-r--r--benchmark/hash_first.yml11
-rw-r--r--benchmark/io_write.rb22
-rw-r--r--benchmark/iseq_load_from_binary.yml25
-rw-r--r--benchmark/ivar_extend.yml23
-rw-r--r--benchmark/kernel_clone.yml6
-rw-r--r--benchmark/kernel_float.yml5
-rw-r--r--benchmark/kernel_tap.yml6
-rw-r--r--benchmark/kernel_then.yml6
-rw-r--r--benchmark/keyword_arguments.yml13
-rw-r--r--benchmark/lib/benchmark_driver/runner/mjit.rb34
-rw-r--r--benchmark/lib/benchmark_driver/runner/mjit_exec.rb237
-rw-r--r--benchmark/lib/benchmark_driver/runner/ractor.rb122
-rw-r--r--benchmark/marshal_dump_load_integer.yml22
-rw-r--r--benchmark/masgn.yml53
-rw-r--r--benchmark/method_bind_call.yml16
-rw-r--r--benchmark/mjit_exec_jt2jt.yml8
-rw-r--r--benchmark/mjit_exec_vm2jt.yml8
-rw-r--r--benchmark/mjit_exec_vm2vm.yml8
-rw-r--r--benchmark/mjit_exivar.yml18
-rw-r--r--benchmark/mjit_integer.yml32
-rw-r--r--benchmark/mjit_kernel.yml20
-rw-r--r--benchmark/mjit_leave.yml8
-rw-r--r--benchmark/mjit_opt_cc_insns.yml27
-rw-r--r--benchmark/mjit_struct_aref.yml10
-rw-r--r--benchmark/module_eqq.yml27
-rw-r--r--benchmark/nilclass.yml6
-rw-r--r--benchmark/num_zero_p.yml8
-rw-r--r--benchmark/numeric_methods.yml29
-rw-r--r--benchmark/object_allocate.yml21
-rw-r--r--benchmark/objspace_dump_all.yml13
-rw-r--r--benchmark/pm_array.yml19
-rw-r--r--benchmark/ractor_const.yml4
-rw-r--r--benchmark/ractor_float_to_s.yml8
-rw-r--r--benchmark/range_min.yml2
-rw-r--r--benchmark/so_nbody.rb58
-rw-r--r--benchmark/string_casecmp.yml26
-rw-r--r--benchmark/string_casecmp_p.yml26
-rw-r--r--benchmark/string_concat.yml45
-rw-r--r--benchmark/string_downcase.yml8
-rw-r--r--benchmark/string_slice.yml11
-rw-r--r--benchmark/string_split.yml25
-rw-r--r--benchmark/string_swapcase.yml8
-rw-r--r--benchmark/string_upcase.yml8
-rw-r--r--benchmark/time_at.yml7
-rw-r--r--benchmark/time_new.yml4
-rw-r--r--benchmark/time_now.yml3
-rw-r--r--benchmark/time_parse.yml10
-rw-r--r--benchmark/vm1_attr_ivar.yml14
-rw-r--r--benchmark/vm1_attr_ivar_set.yml14
-rw-r--r--benchmark/vm1_block.yml9
-rw-r--r--benchmark/vm1_blockparam.yml7
-rw-r--r--benchmark/vm1_blockparam_call.yml8
-rw-r--r--benchmark/vm1_blockparam_pass.yml12
-rw-r--r--benchmark/vm1_blockparam_yield.yml8
-rw-r--r--benchmark/vm1_const.yml7
-rw-r--r--benchmark/vm1_ensure.yml14
-rw-r--r--benchmark/vm1_float_simple.yml8
-rw-r--r--benchmark/vm1_gc_short_lived.yml9
-rw-r--r--benchmark/vm1_gc_short_with_complex_long.yml25
-rw-r--r--benchmark/vm1_gc_short_with_long.yml13
-rw-r--r--benchmark/vm1_gc_short_with_symbol.yml13
-rw-r--r--benchmark/vm1_gc_wb_ary.yml12
-rw-r--r--benchmark/vm1_gc_wb_ary_promoted.yml15
-rw-r--r--benchmark/vm1_gc_wb_obj.yml15
-rw-r--r--benchmark/vm1_gc_wb_obj_promoted.yml17
-rw-r--r--benchmark/vm1_ivar.yml6
-rw-r--r--benchmark/vm1_ivar_set.yml5
-rw-r--r--benchmark/vm1_length.yml8
-rw-r--r--benchmark/vm1_lvar_init.yml21
-rw-r--r--benchmark/vm1_lvar_set.yml4
-rw-r--r--benchmark/vm1_neq.yml7
-rw-r--r--benchmark/vm1_not.yml6
-rw-r--r--benchmark/vm1_rescue.yml6
-rw-r--r--benchmark/vm1_simplereturn.yml7
-rw-r--r--benchmark/vm1_swap.yml7
-rw-r--r--benchmark/vm1_yield.yml13
-rw-r--r--benchmark/vm2_array.yml4
-rw-r--r--benchmark/vm2_bigarray.yml105
-rw-r--r--benchmark/vm2_bighash.yml4
-rw-r--r--benchmark/vm2_case.yml13
-rw-r--r--benchmark/vm2_case_lit.yml23
-rw-r--r--benchmark/vm2_defined_method.yml8
-rw-r--r--benchmark/vm2_dstr.yml6
-rw-r--r--benchmark/vm2_eval.yml4
-rw-r--r--benchmark/vm2_fiber_allocate.yml8
-rw-r--r--benchmark/vm2_fiber_count.yml10
-rw-r--r--benchmark/vm2_fiber_reuse.yml14
-rw-r--r--benchmark/vm2_fiber_reuse_gc.yml12
-rw-r--r--benchmark/vm2_fiber_switch.yml9
-rw-r--r--benchmark/vm2_freezestring.yml10
-rw-r--r--benchmark/vm2_method.yml8
-rw-r--r--benchmark/vm2_method_missing.yml11
-rw-r--r--benchmark/vm2_method_with_block.yml8
-rw-r--r--benchmark/vm2_module_ann_const_set.yml4
-rw-r--r--benchmark/vm2_module_const_set.yml8
-rw-r--r--benchmark/vm2_mutex.yml8
-rw-r--r--benchmark/vm2_newlambda.yml4
-rw-r--r--benchmark/vm2_poly_method.yml24
-rw-r--r--benchmark/vm2_poly_method_ov.yml24
-rw-r--r--benchmark/vm2_poly_same_method.yml25
-rw-r--r--benchmark/vm2_poly_singleton.yml18
-rw-r--r--benchmark/vm2_proc.yml12
-rw-r--r--benchmark/vm2_raise1.yml16
-rw-r--r--benchmark/vm2_raise2.yml16
-rw-r--r--benchmark/vm2_regexp.yml8
-rw-r--r--benchmark/vm2_send.yml11
-rw-r--r--benchmark/vm2_string_literal.yml4
-rw-r--r--benchmark/vm2_struct_big_aref_hi.yml7
-rw-r--r--benchmark/vm2_struct_big_aref_lo.yml7
-rw-r--r--benchmark/vm2_struct_big_aset.yml11
-rw-r--r--benchmark/vm2_struct_big_href_hi.yml7
-rw-r--r--benchmark/vm2_struct_big_href_lo.yml7
-rw-r--r--benchmark/vm2_struct_big_hset.yml11
-rw-r--r--benchmark/vm2_struct_small_aref.yml7
-rw-r--r--benchmark/vm2_struct_small_aset.yml11
-rw-r--r--benchmark/vm2_struct_small_href.yml7
-rw-r--r--benchmark/vm2_struct_small_hset.yml7
-rw-r--r--benchmark/vm2_super.yml17
-rw-r--r--benchmark/vm2_unif1.yml7
-rw-r--r--benchmark/vm2_zsuper.yml18
-rw-r--r--benchmark/vm_array.yml4
-rw-r--r--benchmark/vm_attr_ivar.yml14
-rw-r--r--benchmark/vm_attr_ivar_set.yml14
-rw-r--r--benchmark/vm_backtrace.rb (renamed from benchmark/vm3_backtrace.rb)0
-rw-r--r--benchmark/vm_bigarray.yml105
-rw-r--r--benchmark/vm_bighash.yml4
-rw-r--r--benchmark/vm_block.yml9
-rw-r--r--benchmark/vm_block_handler.yml27
-rw-r--r--benchmark/vm_blockparam.yml7
-rw-r--r--benchmark/vm_blockparam_call.yml8
-rw-r--r--benchmark/vm_blockparam_pass.yml12
-rw-r--r--benchmark/vm_blockparam_yield.yml8
-rw-r--r--benchmark/vm_case.yml13
-rw-r--r--benchmark/vm_case_classes.yml9
-rw-r--r--benchmark/vm_case_lit.yml23
-rw-r--r--benchmark/vm_clearmethodcache.rb (renamed from benchmark/vm3_clearmethodcache.rb)0
-rw-r--r--benchmark/vm_const.yml13
-rw-r--r--benchmark/vm_cvar.yml20
-rw-r--r--benchmark/vm_defined_method.yml8
-rw-r--r--benchmark/vm_dstr.yml6
-rw-r--r--benchmark/vm_dstr_ary.rb6
-rw-r--r--benchmark/vm_dstr_bool.rb7
-rw-r--r--benchmark/vm_dstr_class_module.rb10
-rw-r--r--benchmark/vm_dstr_digit.rb7
-rw-r--r--benchmark/vm_dstr_int.rb5
-rw-r--r--benchmark/vm_dstr_nil.rb6
-rw-r--r--benchmark/vm_dstr_obj.rb6
-rw-r--r--benchmark/vm_dstr_obj_def.rb8
-rw-r--r--benchmark/vm_dstr_str.rb6
-rw-r--r--benchmark/vm_dstr_sym.rb6
-rw-r--r--benchmark/vm_ensure.yml14
-rw-r--r--benchmark/vm_eval.yml4
-rw-r--r--benchmark/vm_fiber_allocate.yml8
-rw-r--r--benchmark/vm_fiber_count.yml10
-rw-r--r--benchmark/vm_fiber_reuse.yml14
-rw-r--r--benchmark/vm_fiber_reuse_gc.yml12
-rw-r--r--benchmark/vm_fiber_switch.yml9
-rw-r--r--benchmark/vm_float_simple.yml8
-rw-r--r--benchmark/vm_freezeobj.yml6
-rw-r--r--benchmark/vm_freezestring.yml10
-rw-r--r--benchmark/vm_gc.rb (renamed from benchmark/vm3_gc.rb)0
-rw-r--r--benchmark/vm_gc_old_full.rb (renamed from benchmark/vm3_gc_old_full.rb)0
-rw-r--r--benchmark/vm_gc_old_immediate.rb (renamed from benchmark/vm3_gc_old_immediate.rb)0
-rw-r--r--benchmark/vm_gc_old_lazy.rb (renamed from benchmark/vm3_gc_old_lazy.rb)0
-rw-r--r--benchmark/vm_gc_short_lived.yml9
-rw-r--r--benchmark/vm_gc_short_with_complex_long.yml25
-rw-r--r--benchmark/vm_gc_short_with_long.yml13
-rw-r--r--benchmark/vm_gc_short_with_symbol.yml13
-rw-r--r--benchmark/vm_gc_wb_ary.yml12
-rw-r--r--benchmark/vm_gc_wb_ary_promoted.yml15
-rw-r--r--benchmark/vm_gc_wb_obj.yml15
-rw-r--r--benchmark/vm_gc_wb_obj_promoted.yml17
-rw-r--r--benchmark/vm_iclass_super.yml20
-rw-r--r--benchmark/vm_ivar.yml6
-rw-r--r--benchmark/vm_ivar_embedded_obj_init.yml14
-rw-r--r--benchmark/vm_ivar_extended_obj_init.yml16
-rw-r--r--benchmark/vm_ivar_generic_get.yml17
-rw-r--r--benchmark/vm_ivar_generic_set.yml14
-rw-r--r--benchmark/vm_ivar_get.yml37
-rw-r--r--benchmark/vm_ivar_get_unintialized.yml12
-rw-r--r--benchmark/vm_ivar_lazy_set.yml12
-rw-r--r--benchmark/vm_ivar_of_class.yml12
-rw-r--r--benchmark/vm_ivar_of_class_set.yml11
-rw-r--r--benchmark/vm_ivar_set.yml5
-rw-r--r--benchmark/vm_ivar_set_on_instance.yml35
-rw-r--r--benchmark/vm_ivar_set_subclass.yml20
-rw-r--r--benchmark/vm_length.yml8
-rw-r--r--benchmark/vm_lvar_cond_set.yml8
-rw-r--r--benchmark/vm_lvar_init.yml21
-rw-r--r--benchmark/vm_lvar_set.yml4
-rw-r--r--benchmark/vm_method.yml8
-rw-r--r--benchmark/vm_method_missing.yml11
-rw-r--r--benchmark/vm_method_with_block.yml8
-rw-r--r--benchmark/vm_module_ann_const_set.yml4
-rw-r--r--benchmark/vm_module_const_set.yml8
-rw-r--r--benchmark/vm_mutex.yml8
-rw-r--r--benchmark/vm_neq.yml7
-rw-r--r--benchmark/vm_newlambda.yml4
-rw-r--r--benchmark/vm_not.yml6
-rw-r--r--benchmark/vm_poly_method.yml24
-rw-r--r--benchmark/vm_poly_method_ov.yml24
-rw-r--r--benchmark/vm_poly_same_method.yml25
-rw-r--r--benchmark/vm_poly_singleton.yml18
-rw-r--r--benchmark/vm_proc.yml12
-rw-r--r--benchmark/vm_raise1.yml16
-rw-r--r--benchmark/vm_raise2.yml16
-rw-r--r--benchmark/vm_regexp.yml8
-rw-r--r--benchmark/vm_rescue.yml6
-rw-r--r--benchmark/vm_send.yml14
-rw-r--r--benchmark/vm_send_cfunc.yml3
-rw-r--r--benchmark/vm_simplereturn.yml7
-rw-r--r--benchmark/vm_string_literal.yml4
-rw-r--r--benchmark/vm_struct_big_aref_hi.yml7
-rw-r--r--benchmark/vm_struct_big_aref_lo.yml7
-rw-r--r--benchmark/vm_struct_big_aset.yml11
-rw-r--r--benchmark/vm_struct_big_href_hi.yml7
-rw-r--r--benchmark/vm_struct_big_href_lo.yml7
-rw-r--r--benchmark/vm_struct_big_hset.yml11
-rw-r--r--benchmark/vm_struct_small_aref.yml7
-rw-r--r--benchmark/vm_struct_small_aset.yml11
-rw-r--r--benchmark/vm_struct_small_href.yml7
-rw-r--r--benchmark/vm_struct_small_hset.yml7
-rw-r--r--benchmark/vm_super.yml17
-rw-r--r--benchmark/vm_swap.yml7
-rw-r--r--benchmark/vm_thread_condvar1.rb8
-rw-r--r--benchmark/vm_thread_condvar2.rb10
-rw-r--r--benchmark/vm_unif1.yml7
-rw-r--r--benchmark/vm_yield.yml13
-rw-r--r--benchmark/vm_zsuper.yml18
-rw-r--r--bignum.c1461
-rwxr-xr-xbin/bundle27
-rwxr-xr-xbin/bundler27
-rwxr-xr-xbin/erb176
-rwxr-xr-xbin/gem19
-rwxr-xr-xbin/irb27
-rwxr-xr-xbin/racc27
-rwxr-xr-xbin/racc2y27
-rwxr-xr-xbin/rdoc27
-rwxr-xr-xbin/ri27
-rwxr-xr-xbin/y2racc27
-rw-r--r--bootstraptest/pending.rb23
-rwxr-xr-xbootstraptest/runner.rb833
-rw-r--r--bootstraptest/test_attr.rb16
-rw-r--r--bootstraptest/test_autoload.rb30
-rw-r--r--bootstraptest/test_constant_cache.rb187
-rw-r--r--bootstraptest/test_eval.rb39
-rw-r--r--bootstraptest/test_fiber.rb4
-rw-r--r--bootstraptest/test_flow.rb8
-rw-r--r--bootstraptest/test_insns.rb18
-rw-r--r--bootstraptest/test_io.rb5
-rw-r--r--bootstraptest/test_jump.rb25
-rw-r--r--bootstraptest/test_literal.rb7
-rw-r--r--bootstraptest/test_method.rb2
-rw-r--r--bootstraptest/test_proc.rb17
-rw-r--r--bootstraptest/test_ractor.rb1628
-rw-r--r--bootstraptest/test_syntax.rb8
-rw-r--r--bootstraptest/test_thread.rb25
-rw-r--r--bootstraptest/test_yjit.rb3530
-rw-r--r--bootstraptest/test_yjit_30k_ifelse.rb241023
-rw-r--r--bootstraptest/test_yjit_30k_methods.rb121018
-rw-r--r--bootstraptest/test_yjit_rust_port.rb422
-rw-r--r--builtin.c32
-rw-r--r--builtin.h91
-rw-r--r--ccan/build_assert/build_assert.h12
-rw-r--r--ccan/check_type/check_type.h28
-rw-r--r--ccan/container_of/container_of.h52
-rw-r--r--ccan/list/list.h589
-rw-r--r--ccan/str/str.h9
-rw-r--r--class.c2041
-rw-r--r--common.mk15895
-rw-r--r--compar.c63
-rw-r--r--compile.c12224
-rw-r--r--complex.c957
-rw-r--r--configure.ac2053
-rw-r--r--constant.h15
-rw-r--r--cont.c1526
-rw-r--r--coroutine/amd64/Context.S4
-rw-r--r--coroutine/amd64/Context.h35
-rw-r--r--coroutine/arm32/Context.S23
-rw-r--r--coroutine/arm32/Context.h10
-rw-r--r--coroutine/arm64/Context.S22
-rw-r--r--coroutine/arm64/Context.h35
-rw-r--r--coroutine/asyncify/Context.c10
-rw-r--r--coroutine/asyncify/Context.h93
-rw-r--r--coroutine/copy/Context.c141
-rw-r--r--coroutine/copy/Context.h86
-rw-r--r--coroutine/emscripten/Context.c8
-rw-r--r--coroutine/emscripten/Context.h77
-rw-r--r--coroutine/ppc/Context.S90
-rw-r--r--coroutine/ppc/Context.h58
-rw-r--r--coroutine/ppc64/Context.S89
-rw-r--r--coroutine/ppc64/Context.h57
-rw-r--r--coroutine/ppc64le/Context.S9
-rw-r--r--coroutine/ppc64le/Context.h8
-rw-r--r--coroutine/pthread/Context.c272
-rw-r--r--coroutine/pthread/Context.h63
-rw-r--r--coroutine/riscv64/Context.S87
-rw-r--r--coroutine/riscv64/Context.h46
-rw-r--r--coroutine/ucontext/Context.c5
-rw-r--r--coroutine/ucontext/Context.h11
-rw-r--r--coroutine/universal/Context.S16
-rw-r--r--coroutine/universal/Context.h21
-rw-r--r--coroutine/win32/Context.asm2
-rw-r--r--coroutine/win32/Context.h10
-rw-r--r--coroutine/win64/Context.S2
-rw-r--r--coroutine/win64/Context.asm2
-rw-r--r--coroutine/win64/Context.h10
-rw-r--r--coroutine/x86/Context.S4
-rw-r--r--coroutine/x86/Context.h10
-rw-r--r--coverage/README2
-rw-r--r--cygwin/GNUmakefile.in57
-rw-r--r--darray.h179
-rw-r--r--debug.c532
-rw-r--r--debug_counter.c115
-rw-r--r--debug_counter.h202
-rw-r--r--defs/gmake.mk288
-rw-r--r--defs/id.def35
-rw-r--r--defs/keywords2
-rw-r--r--defs/lex.c.src2
-rw-r--r--dir.c2439
-rw-r--r--dir.rb314
-rw-r--r--dln.c1424
-rw-r--r--dln.h26
-rw-r--r--dln_find.c284
-rw-r--r--dmyenc.c2
-rw-r--r--doc/.document8
-rw-r--r--doc/ChangeLog-0.60_to_1.110
-rw-r--r--doc/ChangeLog-1.9.332
-rw-r--r--doc/ChangeLog-2.0.014
-rw-r--r--doc/ChangeLog-2.1.04
-rw-r--r--doc/ChangeLog-2.3.015
-rw-r--r--doc/ChangeLog-2.4.04
-rw-r--r--doc/ChangeLog-YARV48
-rw-r--r--doc/NEWS-2.0.0530
-rw-r--r--doc/NEWS-2.1.0376
-rw-r--r--doc/NEWS-2.2.0361
-rw-r--r--doc/NEWS-2.3.0404
-rw-r--r--doc/NEWS-2.4.0397
-rw-r--r--doc/NEWS-2.5.0565
-rw-r--r--doc/NEWS-2.6.0662
-rw-r--r--doc/NEWS/NEWS-1.8.7 (renamed from doc/NEWS-1.8.7)0
-rw-r--r--doc/NEWS/NEWS-1.9.1 (renamed from doc/NEWS-1.9.1)0
-rw-r--r--doc/NEWS/NEWS-1.9.2 (renamed from doc/NEWS-1.9.2)0
-rw-r--r--doc/NEWS/NEWS-1.9.3 (renamed from doc/NEWS-1.9.3)0
-rw-r--r--doc/NEWS/NEWS-2.0.0529
-rw-r--r--doc/NEWS/NEWS-2.1.0376
-rw-r--r--doc/NEWS/NEWS-2.2.0359
-rw-r--r--doc/NEWS/NEWS-2.3.0384
-rw-r--r--doc/NEWS/NEWS-2.4.0399
-rw-r--r--doc/NEWS/NEWS-2.5.0565
-rw-r--r--doc/NEWS/NEWS-2.6.0662
-rw-r--r--doc/NEWS/NEWS-2.7.0845
-rw-r--r--doc/NEWS/NEWS-3.0.0.md829
-rw-r--r--doc/NEWS/NEWS-3.1.0.md660
-rw-r--r--doc/bsearch.rdoc120
-rw-r--r--doc/case_mapping.rdoc116
-rw-r--r--doc/character_selectors.rdoc97
-rw-r--r--doc/command_injection.rdoc29
-rw-r--r--doc/contributing.md12
-rw-r--r--doc/contributing.rdoc447
-rw-r--r--doc/contributing/building_ruby.md172
-rw-r--r--doc/contributing/documentation_guide.md435
-rw-r--r--doc/contributing/making_changes_to_ruby.md28
-rw-r--r--doc/contributing/making_changes_to_stdlibs.md49
-rw-r--r--doc/contributing/reporting_issues.md91
-rw-r--r--doc/contributing/testing_ruby.md138
-rw-r--r--doc/contributors.rdoc793
-rw-r--r--doc/csv/arguments/io.rdoc5
-rw-r--r--doc/csv/options/common/col_sep.rdoc63
-rw-r--r--doc/csv/options/common/quote_char.rdoc42
-rw-r--r--doc/csv/options/common/row_sep.rdoc100
-rw-r--r--doc/csv/options/generating/force_quotes.rdoc17
-rw-r--r--doc/csv/options/generating/quote_empty.rdoc12
-rw-r--r--doc/csv/options/generating/write_converters.rdoc33
-rw-r--r--doc/csv/options/generating/write_empty_value.rdoc15
-rw-r--r--doc/csv/options/generating/write_headers.rdoc29
-rw-r--r--doc/csv/options/generating/write_nil_value.rdoc14
-rw-r--r--doc/csv/options/parsing/converters.rdoc46
-rw-r--r--doc/csv/options/parsing/empty_value.rdoc13
-rw-r--r--doc/csv/options/parsing/field_size_limit.rdoc39
-rw-r--r--doc/csv/options/parsing/header_converters.rdoc43
-rw-r--r--doc/csv/options/parsing/headers.rdoc63
-rw-r--r--doc/csv/options/parsing/liberal_parsing.rdoc19
-rw-r--r--doc/csv/options/parsing/nil_value.rdoc12
-rw-r--r--doc/csv/options/parsing/return_headers.rdoc22
-rw-r--r--doc/csv/options/parsing/skip_blanks.rdoc31
-rw-r--r--doc/csv/options/parsing/skip_lines.rdoc37
-rw-r--r--doc/csv/options/parsing/strip.rdoc15
-rw-r--r--doc/csv/options/parsing/unconverted_fields.rdoc27
-rw-r--r--doc/csv/recipes/filtering.rdoc156
-rw-r--r--doc/csv/recipes/generating.rdoc244
-rw-r--r--doc/csv/recipes/parsing.rdoc543
-rw-r--r--doc/csv/recipes/recipes.rdoc6
-rw-r--r--doc/date/calendars.rdoc62
-rw-r--r--doc/dig_methods.rdoc82
-rw-r--r--doc/dtrace_probes.rdoc78
-rw-r--r--doc/encodings.rdoc479
-rw-r--r--doc/examples/files.rdoc26
-rw-r--r--doc/extension.ja.rdoc79
-rw-r--r--doc/extension.rdoc226
-rw-r--r--doc/fiber.md232
-rw-r--r--doc/format_specifications.rdoc348
-rw-r--r--doc/globals.rdoc3
-rw-r--r--doc/implicit_conversion.rdoc221
-rw-r--r--doc/irb/irb.rd.ja17
-rw-r--r--doc/keywords.rdoc2
-rw-r--r--doc/maintainers.rdoc321
-rw-r--r--doc/marshal.rdoc4
-rw-r--r--doc/matchdata/begin.rdoc30
-rw-r--r--doc/matchdata/end.rdoc30
-rw-r--r--doc/matchdata/offset.rdoc31
-rw-r--r--doc/math/math.rdoc117
-rw-r--r--doc/memory_view.md167
-rw-r--r--doc/mjit/mjit.md39
-rw-r--r--doc/net-http/examples.rdoc31
-rw-r--r--doc/net-http/included_getters.rdoc3
-rw-r--r--doc/optparse/.document1
-rw-r--r--doc/optparse/argument_converters.rdoc380
-rw-r--r--doc/optparse/creates_option.rdoc7
-rw-r--r--doc/optparse/option_params.rdoc509
-rw-r--r--doc/optparse/ruby/argument_keywords.rb6
-rw-r--r--doc/optparse/ruby/argument_strings.rb6
-rw-r--r--doc/optparse/ruby/argv.rb2
-rw-r--r--doc/optparse/ruby/array.rb6
-rw-r--r--doc/optparse/ruby/basic.rb17
-rw-r--r--doc/optparse/ruby/block.rb9
-rw-r--r--doc/optparse/ruby/collected_options.rb8
-rw-r--r--doc/optparse/ruby/custom_converter.rb9
-rw-r--r--doc/optparse/ruby/date.rb6
-rw-r--r--doc/optparse/ruby/datetime.rb6
-rw-r--r--doc/optparse/ruby/decimal_integer.rb7
-rw-r--r--doc/optparse/ruby/decimal_numeric.rb7
-rw-r--r--doc/optparse/ruby/default_values.rb8
-rw-r--r--doc/optparse/ruby/descriptions.rb15
-rw-r--r--doc/optparse/ruby/explicit_array_values.rb9
-rw-r--r--doc/optparse/ruby/explicit_hash_values.rb9
-rw-r--r--doc/optparse/ruby/false_class.rb6
-rw-r--r--doc/optparse/ruby/float.rb6
-rw-r--r--doc/optparse/ruby/help.rb18
-rw-r--r--doc/optparse/ruby/help_banner.rb7
-rw-r--r--doc/optparse/ruby/help_format.rb25
-rw-r--r--doc/optparse/ruby/help_program_name.rb7
-rw-r--r--doc/optparse/ruby/integer.rb6
-rw-r--r--doc/optparse/ruby/long_names.rb9
-rw-r--r--doc/optparse/ruby/long_optional.rb6
-rw-r--r--doc/optparse/ruby/long_required.rb6
-rw-r--r--doc/optparse/ruby/long_simple.rb9
-rw-r--r--doc/optparse/ruby/long_with_negation.rb6
-rw-r--r--doc/optparse/ruby/match_converter.rb9
-rw-r--r--doc/optparse/ruby/matched_values.rb6
-rw-r--r--doc/optparse/ruby/method.rb11
-rw-r--r--doc/optparse/ruby/missing_options.rb12
-rw-r--r--doc/optparse/ruby/mixed_names.rb12
-rw-r--r--doc/optparse/ruby/name_abbrev.rb9
-rw-r--r--doc/optparse/ruby/no_abbreviation.rb10
-rw-r--r--doc/optparse/ruby/numeric.rb6
-rw-r--r--doc/optparse/ruby/object.rb6
-rw-r--r--doc/optparse/ruby/octal_integer.rb7
-rw-r--r--doc/optparse/ruby/optional_argument.rb9
-rw-r--r--doc/optparse/ruby/parse.rb13
-rw-r--r--doc/optparse/ruby/parse_bang.rb13
-rw-r--r--doc/optparse/ruby/proc.rb13
-rw-r--r--doc/optparse/ruby/regexp.rb6
-rw-r--r--doc/optparse/ruby/required_argument.rb9
-rw-r--r--doc/optparse/ruby/shellwords.rb6
-rw-r--r--doc/optparse/ruby/short_names.rb9
-rw-r--r--doc/optparse/ruby/short_optional.rb6
-rw-r--r--doc/optparse/ruby/short_range.rb6
-rw-r--r--doc/optparse/ruby/short_required.rb6
-rw-r--r--doc/optparse/ruby/short_simple.rb9
-rw-r--r--doc/optparse/ruby/string.rb6
-rw-r--r--doc/optparse/ruby/terminator.rb6
-rw-r--r--doc/optparse/ruby/time.rb6
-rw-r--r--doc/optparse/ruby/true_class.rb6
-rw-r--r--doc/optparse/ruby/uri.rb6
-rw-r--r--doc/optparse/tutorial.rdoc835
-rw-r--r--doc/packed_data.rdoc590
-rw-r--r--doc/ractor.md952
-rw-r--r--doc/rdoc/markup_reference.rb1257
-rw-r--r--doc/regexp.rdoc103
-rw-r--r--doc/standard_library.rdoc93
-rw-r--r--doc/strftime_formatting.rdoc527
-rw-r--r--doc/string/b.rdoc14
-rw-r--r--doc/string/bytes.rdoc6
-rw-r--r--doc/string/bytesize.rdoc11
-rw-r--r--doc/string/center.rdoc16
-rw-r--r--doc/string/chars.rdoc5
-rw-r--r--doc/string/chomp.rdoc29
-rw-r--r--doc/string/chop.rdoc16
-rw-r--r--doc/string/codepoints.rdoc6
-rw-r--r--doc/string/delete_prefix.rdoc8
-rw-r--r--doc/string/delete_suffix.rdoc8
-rw-r--r--doc/string/each_byte.rdoc17
-rw-r--r--doc/string/each_char.rdoc17
-rw-r--r--doc/string/each_codepoint.rdoc18
-rw-r--r--doc/string/each_grapheme_cluster.rdoc12
-rw-r--r--doc/string/each_line.rdoc60
-rw-r--r--doc/string/end_with_p.rdoc11
-rw-r--r--doc/string/force_encoding.rdoc20
-rw-r--r--doc/string/grapheme_clusters.rdoc6
-rw-r--r--doc/string/index.rdoc38
-rw-r--r--doc/string/length.rdoc13
-rw-r--r--doc/string/ljust.rdoc16
-rw-r--r--doc/string/new.rdoc51
-rw-r--r--doc/string/ord.rdoc6
-rw-r--r--doc/string/partition.rdoc24
-rw-r--r--doc/string/rjust.rdoc16
-rw-r--r--doc/string/rpartition.rdoc24
-rw-r--r--doc/string/scrub.rdoc25
-rw-r--r--doc/string/split.rdoc86
-rw-r--r--doc/string/start_with_p.rdoc18
-rw-r--r--doc/string/sum.rdoc11
-rw-r--r--doc/symbol/casecmp.rdoc27
-rw-r--r--doc/symbol/casecmp_p.rdoc26
-rw-r--r--doc/syntax.rdoc5
-rw-r--r--doc/syntax/assignment.rdoc6
-rw-r--r--doc/syntax/calling_methods.rdoc54
-rw-r--r--doc/syntax/comments.rdoc216
-rw-r--r--doc/syntax/control_expressions.rdoc42
-rw-r--r--doc/syntax/literals.rdoc290
-rw-r--r--doc/syntax/methods.rdoc196
-rw-r--r--doc/syntax/miscellaneous.rdoc30
-rw-r--r--doc/syntax/modules_and_classes.rdoc4
-rw-r--r--doc/syntax/pattern_matching.rdoc540
-rw-r--r--doc/syntax/precedence.rdoc2
-rw-r--r--doc/syntax/refinements.rdoc5
-rw-r--r--doc/timezones.rdoc108
-rw-r--r--doc/transcode.rdoc52
-rw-r--r--doc/yjit/yjit.md417
-rw-r--r--doc/yjit/yjit_hacking.md75
-rw-r--r--enc/Makefile.in6
-rw-r--r--enc/ascii.c8
-rw-r--r--enc/cesu_8.c23
-rw-r--r--enc/cp949.c2
-rw-r--r--enc/depend10152
-rw-r--r--enc/encdb.c4
-rw-r--r--enc/encinit.c.erb1
-rw-r--r--enc/euc_jp.c4
-rw-r--r--enc/iso_8859_11.c2
-rw-r--r--enc/iso_8859_6.c2
-rw-r--r--enc/iso_8859_8.c2
-rw-r--r--enc/jis/props.h.blt4
-rw-r--r--enc/jis/props.kwd2
-rw-r--r--enc/jis/props.src2
-rwxr-xr-xenc/make_encmake.rb2
-rw-r--r--enc/shift_jis.c4
-rw-r--r--enc/trans/escape.trans3
-rw-r--r--enc/trans/ibm720-tbl.rb122
-rw-r--r--enc/trans/newline.trans30
-rw-r--r--enc/trans/single_byte.trans3
-rw-r--r--enc/trans/transdb.c2
-rw-r--r--enc/unicode.c4
-rw-r--r--enc/unicode/12.1.0/casefold.h7428
-rw-r--r--enc/unicode/12.1.0/name2ctype.h41810
-rw-r--r--enc/unicode/15.0.0/casefold.h7629
-rw-r--r--enc/unicode/15.0.0/name2ctype.h45690
-rwxr-xr-xenc/unicode/case-folding.rb418
-rw-r--r--enc/utf_16_32.h2
-rw-r--r--enc/windows_1250.c2
-rw-r--r--enc/windows_1251.c2
-rw-r--r--enc/windows_1252.c2
-rw-r--r--enc/windows_1253.c2
-rw-r--r--enc/windows_1254.c2
-rw-r--r--enc/windows_1257.c2
-rw-r--r--enc/windows_31j.c2
-rw-r--r--encindex.h11
-rw-r--r--encoding.c1202
-rw-r--r--enum.c3175
-rw-r--r--enumerator.c1674
-rw-r--r--error.c1567
-rw-r--r--eval.c1371
-rw-r--r--eval_error.c602
-rw-r--r--eval_intern.h113
-rw-r--r--eval_jump.c40
-rw-r--r--ext/-test-/RUBY_ALIGNOF/c.c15
-rw-r--r--ext/-test-/RUBY_ALIGNOF/cpp.cpp9
-rw-r--r--ext/-test-/RUBY_ALIGNOF/depend162
-rw-r--r--ext/-test-/RUBY_ALIGNOF/extconf.rb6
-rw-r--r--ext/-test-/abi/abi.c11
-rw-r--r--ext/-test-/abi/extconf.rb4
-rw-r--r--ext/-test-/arith_seq/beg_len_step/beg_len_step.c19
-rw-r--r--ext/-test-/arith_seq/beg_len_step/depend161
-rw-r--r--ext/-test-/arith_seq/beg_len_step/extconf.rb2
-rw-r--r--ext/-test-/arith_seq/extract/depend148
-rw-r--r--ext/-test-/array/concat/depend162
-rw-r--r--ext/-test-/array/concat/extconf.rb2
-rw-r--r--ext/-test-/array/concat/to_ary_concat.c38
-rw-r--r--ext/-test-/array/resize/depend148
-rw-r--r--ext/-test-/array/resize/resize.c6
-rw-r--r--ext/-test-/auto_ext.rb1
-rw-r--r--ext/-test-/bignum/big2str.c14
-rw-r--r--ext/-test-/bignum/bigzero.c2
-rw-r--r--ext/-test-/bignum/depend1054
-rw-r--r--ext/-test-/bignum/div.c10
-rw-r--r--ext/-test-/bignum/intpack.c42
-rw-r--r--ext/-test-/bignum/mul.c30
-rw-r--r--ext/-test-/bignum/str2big.c18
-rw-r--r--ext/-test-/bug-14834/depend148
-rw-r--r--ext/-test-/bug-3571/depend148
-rw-r--r--ext/-test-/bug-5832/depend148
-rw-r--r--ext/-test-/bug_reporter/depend148
-rw-r--r--ext/-test-/class/depend296
-rw-r--r--ext/-test-/cxxanyargs/cxxanyargs.cpp346
-rw-r--r--ext/-test-/cxxanyargs/depend14
-rw-r--r--ext/-test-/cxxanyargs/extconf.rb21
-rw-r--r--ext/-test-/debug/depend444
-rw-r--r--ext/-test-/debug/inspector.c14
-rw-r--r--ext/-test-/debug/profile_frames.c27
-rw-r--r--ext/-test-/dln/empty/depend159
-rw-r--r--ext/-test-/dln/empty/empty.c2
-rw-r--r--ext/-test-/econv/append.c15
-rw-r--r--ext/-test-/econv/extconf.rb3
-rw-r--r--ext/-test-/econv/init.c11
-rw-r--r--ext/-test-/enumerator_kw/depend148
-rw-r--r--ext/-test-/enumerator_kw/enumerator_kw.c3
-rw-r--r--ext/-test-/eval/eval.c13
-rw-r--r--ext/-test-/eval/extconf.rb2
-rw-r--r--ext/-test-/exception/depend601
-rw-r--r--ext/-test-/fatal/depend148
-rw-r--r--ext/-test-/fatal/rb_fatal.c3
-rw-r--r--ext/-test-/file/depend462
-rw-r--r--ext/-test-/file/fs.c16
-rw-r--r--ext/-test-/float/depend296
-rw-r--r--ext/-test-/funcall/depend148
-rw-r--r--ext/-test-/funcall/funcall.c12
-rw-r--r--ext/-test-/gvl/call_without_gvl/call_without_gvl.c12
-rw-r--r--ext/-test-/gvl/call_without_gvl/depend148
-rw-r--r--ext/-test-/hash/depend296
-rw-r--r--ext/-test-/integer/core_ext.c18
-rw-r--r--ext/-test-/integer/depend455
-rw-r--r--ext/-test-/iseq_load/depend148
-rw-r--r--ext/-test-/iter/depend444
-rw-r--r--ext/-test-/load/dot.dot/depend159
-rw-r--r--ext/-test-/load/dot.dot/dot.dot.c2
-rw-r--r--ext/-test-/load/protect/depend148
-rw-r--r--ext/-test-/marshal/compat/depend148
-rw-r--r--ext/-test-/marshal/internal_ivar/depend148
-rw-r--r--ext/-test-/marshal/internal_ivar/internal_ivar.c5
-rw-r--r--ext/-test-/marshal/usr/depend148
-rw-r--r--ext/-test-/memory_status/depend148
-rw-r--r--ext/-test-/memory_status/memory_status.c31
-rw-r--r--ext/-test-/memory_view/depend163
-rw-r--r--ext/-test-/memory_view/extconf.rb5
-rw-r--r--ext/-test-/memory_view/memory_view.c450
-rw-r--r--ext/-test-/method/depend296
-rw-r--r--ext/-test-/notimplement/depend148
-rw-r--r--ext/-test-/num2int/depend148
-rw-r--r--ext/-test-/num2int/num2int.c26
-rw-r--r--ext/-test-/path_to_class/depend148
-rw-r--r--ext/-test-/popen_deadlock/depend149
-rw-r--r--ext/-test-/popen_deadlock/extconf.rb1
-rw-r--r--ext/-test-/postponed_job/depend148
-rw-r--r--ext/-test-/postponed_job/postponed_job.c31
-rw-r--r--ext/-test-/printf/depend157
-rw-r--r--ext/-test-/printf/printf.c64
-rw-r--r--ext/-test-/proc/depend444
-rw-r--r--ext/-test-/proc/super.c2
-rw-r--r--ext/-test-/random/bad_version.c135
-rw-r--r--ext/-test-/random/depend482
-rw-r--r--ext/-test-/random/extconf.rb3
-rw-r--r--ext/-test-/random/init.c11
-rw-r--r--ext/-test-/random/loop.c111
-rw-r--r--ext/-test-/rational/depend164
-rw-r--r--ext/-test-/rational/rat.c23
-rw-r--r--ext/-test-/rb_call_super_kw/depend148
-rw-r--r--ext/-test-/rb_call_super_kw/rb_call_super_kw.c3
-rw-r--r--ext/-test-/recursion/depend148
-rw-r--r--ext/-test-/regexp/depend296
-rw-r--r--ext/-test-/scan_args/depend148
-rw-r--r--ext/-test-/scan_args/scan_args.c10
-rw-r--r--ext/-test-/st/foreach/depend148
-rw-r--r--ext/-test-/st/foreach/foreach.c100
-rw-r--r--ext/-test-/st/numhash/depend148
-rw-r--r--ext/-test-/st/numhash/numhash.c18
-rw-r--r--ext/-test-/st/update/depend148
-rw-r--r--ext/-test-/st/update/update.c12
-rw-r--r--ext/-test-/string/capacity.c11
-rw-r--r--ext/-test-/string/coderange.c16
-rw-r--r--ext/-test-/string/cstr.c29
-rw-r--r--ext/-test-/string/depend2481
-rw-r--r--ext/-test-/string/enc_str_buf_cat.c14
-rw-r--r--ext/-test-/string/fstring.c15
-rw-r--r--ext/-test-/string/normalize.c2
-rw-r--r--ext/-test-/string/qsort.c14
-rw-r--r--ext/-test-/string/rb_interned_str.c14
-rw-r--r--ext/-test-/string/set_len.c10
-rw-r--r--ext/-test-/struct/depend592
-rw-r--r--ext/-test-/struct/member.c2
-rw-r--r--ext/-test-/symbol/depend296
-rw-r--r--ext/-test-/symbol/type.c6
-rw-r--r--ext/-test-/thread/instrumentation/depend164
-rw-r--r--ext/-test-/thread/instrumentation/extconf.rb2
-rw-r--r--ext/-test-/thread/instrumentation/instrumentation.c141
-rw-r--r--ext/-test-/thread_fd/depend161
-rw-r--r--ext/-test-/thread_fd/extconf.rb2
-rw-r--r--ext/-test-/thread_fd/thread_fd.c30
-rw-r--r--ext/-test-/thread_fd_close/depend13
-rw-r--r--ext/-test-/thread_fd_close/extconf.rb2
-rw-r--r--ext/-test-/thread_fd_close/thread_fd_close.c14
-rw-r--r--ext/-test-/time/depend449
-rw-r--r--ext/-test-/time/leap_second.c2
-rw-r--r--ext/-test-/tracepoint/depend296
-rw-r--r--ext/-test-/tracepoint/gc_hook.c37
-rw-r--r--ext/-test-/tracepoint/tracepoint.c54
-rw-r--r--ext/-test-/typeddata/depend148
-rw-r--r--ext/-test-/typeddata/typeddata.c6
-rw-r--r--ext/-test-/vm/at_exit.c12
-rw-r--r--ext/-test-/vm/depend148
-rw-r--r--ext/-test-/wait/depend174
-rw-r--r--ext/-test-/wait/extconf.rb2
-rw-r--r--ext/-test-/wait/wait.c39
-rw-r--r--ext/-test-/wait_for_single_fd/depend17
-rw-r--r--ext/-test-/wait_for_single_fd/extconf.rb4
-rw-r--r--ext/-test-/wait_for_single_fd/wait_for_single_fd.c94
-rw-r--r--ext/-test-/win32/console/attribute.c26
-rw-r--r--ext/-test-/win32/fd_setsize/fd_setsize.c10
-rw-r--r--ext/.document17
-rw-r--r--ext/Setup1
-rw-r--r--ext/Setup.atheos1
-rw-r--r--ext/Setup.nt1
-rw-r--r--ext/bigdecimal/bigdecimal.c3515
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec19
-rw-r--r--ext/bigdecimal/bigdecimal.h283
-rw-r--r--ext/bigdecimal/bits.h141
-rw-r--r--ext/bigdecimal/depend313
-rw-r--r--ext/bigdecimal/extconf.rb49
-rw-r--r--ext/bigdecimal/feature.h68
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb6
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb41
-rw-r--r--ext/bigdecimal/missing.c27
-rw-r--r--ext/bigdecimal/missing.h196
-rw-r--r--ext/bigdecimal/missing/dtoa.c3462
-rw-r--r--ext/bigdecimal/static_assert.h54
-rw-r--r--ext/bigdecimal/util/depend14
-rw-r--r--ext/cgi/escape/depend157
-rw-r--r--ext/cgi/escape/escape.c367
-rw-r--r--ext/continuation/depend148
-rw-r--r--ext/coverage/coverage.c512
-rw-r--r--ext/coverage/depend166
-rw-r--r--ext/date/date.gemspec33
-rw-r--r--ext/date/date_core.c2312
-rw-r--r--ext/date/date_parse.c154
-rw-r--r--ext/date/date_strftime.c2
-rw-r--r--ext/date/date_strptime.c106
-rw-r--r--ext/date/depend621
-rw-r--r--ext/date/extconf.rb7
-rw-r--r--ext/date/lib/date.rb9
-rw-r--r--ext/date/prereq.mk9
-rw-r--r--ext/date/update-abbr25
-rw-r--r--ext/date/zonetab.h18
-rw-r--r--ext/date/zonetab.list16
-rw-r--r--ext/dbm/dbm.c1156
-rw-r--r--ext/dbm/dbm.gemspec20
-rw-r--r--ext/dbm/depend14
-rw-r--r--ext/dbm/extconf.rb292
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c2
-rw-r--r--ext/digest/bubblebabble/depend148
-rw-r--r--ext/digest/bubblebabble/extconf.rb2
-rw-r--r--ext/digest/depend148
-rw-r--r--ext/digest/digest.c22
-rw-r--r--ext/digest/digest.gemspec44
-rw-r--r--ext/digest/digest.h10
-rw-r--r--ext/digest/digest_conf.rb71
-rw-r--r--ext/digest/extconf.rb2
-rw-r--r--ext/digest/lib/digest.rb18
-rw-r--r--ext/digest/lib/digest/loader.rb3
-rw-r--r--ext/digest/lib/digest/version.rb5
-rw-r--r--ext/digest/md5/depend314
-rw-r--r--ext/digest/md5/extconf.rb2
-rw-r--r--ext/digest/md5/md5.c2
-rw-r--r--ext/digest/md5/md5init.c9
-rw-r--r--ext/digest/md5/md5ossl.h15
-rw-r--r--ext/digest/rmd160/depend313
-rw-r--r--ext/digest/rmd160/extconf.rb6
-rw-r--r--ext/digest/rmd160/rmd160init.c9
-rw-r--r--ext/digest/rmd160/rmd160ossl.h20
-rw-r--r--ext/digest/sha1/depend314
-rw-r--r--ext/digest/sha1/extconf.rb4
-rw-r--r--ext/digest/sha1/sha1init.c9
-rw-r--r--ext/digest/sha1/sha1ossl.h22
-rw-r--r--ext/digest/sha2/depend313
-rw-r--r--ext/digest/sha2/extconf.rb4
-rw-r--r--ext/digest/sha2/lib/sha2.rb2
-rw-r--r--ext/digest/sha2/lib/sha2/loader.rb3
-rw-r--r--ext/digest/sha2/sha2.c16
-rw-r--r--ext/digest/sha2/sha2init.c8
-rw-r--r--ext/digest/sha2/sha2ossl.h27
-rw-r--r--ext/erb/escape/escape.c95
-rw-r--r--ext/erb/escape/extconf.rb7
-rw-r--r--ext/etc/depend158
-rw-r--r--ext/etc/etc.c178
-rw-r--r--ext/etc/etc.gemspec16
-rw-r--r--ext/etc/extconf.rb3
-rwxr-xr-xext/extmk.rb138
-rw-r--r--ext/fcntl/depend148
-rw-r--r--ext/fcntl/fcntl.c31
-rw-r--r--ext/fcntl/fcntl.gemspec8
-rw-r--r--ext/fiber/depend3
-rw-r--r--ext/fiber/extconf.rb4
-rw-r--r--ext/fiber/fiber.c8
-rw-r--r--ext/fiddle/closure.c168
-rw-r--r--ext/fiddle/conversions.c241
-rw-r--r--ext/fiddle/conversions.h17
-rw-r--r--ext/fiddle/depend1239
-rw-r--r--ext/fiddle/extconf.rb146
-rw-r--r--ext/fiddle/extlibs5
-rw-r--r--ext/fiddle/fiddle.c357
-rw-r--r--ext/fiddle/fiddle.gemspec54
-rw-r--r--ext/fiddle/fiddle.h152
-rw-r--r--ext/fiddle/function.c357
-rw-r--r--ext/fiddle/handle.c133
-rw-r--r--ext/fiddle/lib/fiddle.rb51
-rw-r--r--ext/fiddle/lib/fiddle/closure.rb25
-rw-r--r--ext/fiddle/lib/fiddle/cparser.rb129
-rw-r--r--ext/fiddle/lib/fiddle/function.rb11
-rw-r--r--ext/fiddle/lib/fiddle/import.rb8
-rw-r--r--ext/fiddle/lib/fiddle/pack.rb35
-rw-r--r--ext/fiddle/lib/fiddle/struct.rb381
-rw-r--r--ext/fiddle/lib/fiddle/types.rb35
-rw-r--r--ext/fiddle/lib/fiddle/version.rb3
-rw-r--r--ext/fiddle/memory_view.c321
-rw-r--r--ext/fiddle/pinned.c123
-rw-r--r--ext/fiddle/pointer.c171
-rw-r--r--[-rwxr-xr-x]ext/fiddle/win32/fficonfig.h0
-rwxr-xr-xext/fiddle/win32/libffi-config.rb2
-rw-r--r--[-rwxr-xr-x]ext/fiddle/win32/libffi.mk.tmpl0
-rw-r--r--ext/gdbm/README1
-rw-r--r--ext/gdbm/depend14
-rw-r--r--ext/gdbm/extconf.rb19
-rw-r--r--ext/gdbm/gdbm.c1306
-rw-r--r--ext/gdbm/gdbm.gemspec21
-rw-r--r--ext/io/console/console.c162
-rw-r--r--ext/io/console/depend160
-rw-r--r--ext/io/console/extconf.rb14
-rw-r--r--ext/io/console/io-console.gemspec24
-rw-r--r--ext/io/console/win32_vk.inc327
-rw-r--r--ext/io/console/win32_vk.list2
-rw-r--r--ext/io/nonblock/depend157
-rw-r--r--ext/io/nonblock/io-nonblock.gemspec25
-rw-r--r--ext/io/nonblock/nonblock.c67
-rw-r--r--ext/io/wait/depend158
-rw-r--r--ext/io/wait/extconf.rb31
-rw-r--r--ext/io/wait/io-wait.gemspec38
-rw-r--r--ext/io/wait/wait.c273
-rw-r--r--ext/json/VERSION1
-rw-r--r--ext/json/extconf.rb1
-rw-r--r--ext/json/generator/depend158
-rw-r--r--ext/json/generator/generator.c159
-rw-r--r--ext/json/generator/generator.h7
-rw-r--r--ext/json/json.gemspec98
-rw-r--r--ext/json/lib/json.rb578
-rw-r--r--ext/json/lib/json/add/complex.rb1
-rw-r--r--ext/json/lib/json/add/rational.rb1
-rw-r--r--ext/json/lib/json/common.rb493
-rw-r--r--ext/json/lib/json/version.rb2
-rw-r--r--ext/json/parser/depend157
-rw-r--r--ext/json/parser/extconf.rb28
-rw-r--r--ext/json/parser/parser.c4745
-rw-r--r--ext/json/parser/parser.h7
-rw-r--r--ext/json/parser/parser.rl180
-rw-r--r--ext/json/parser/prereq.mk4
-rw-r--r--ext/monitor/depend148
-rw-r--r--ext/monitor/lib/monitor.rb6
-rw-r--r--ext/monitor/monitor.c20
-rw-r--r--ext/nkf/depend157
-rw-r--r--ext/nkf/nkf-utf8/config.h2
-rw-r--r--ext/nkf/nkf-utf8/nkf.c24
-rw-r--r--ext/nkf/nkf-utf8/nkf.h4
-rw-r--r--ext/nkf/nkf.c92
-rw-r--r--ext/nkf/nkf.gemspec24
-rw-r--r--ext/objspace/depend515
-rw-r--r--ext/objspace/lib/objspace.rb142
-rw-r--r--ext/objspace/lib/objspace/trace.rb45
-rw-r--r--ext/objspace/object_tracing.c256
-rw-r--r--ext/objspace/objspace.c650
-rw-r--r--ext/objspace/objspace_dump.c872
-rw-r--r--ext/openssl/History.md337
-rw-r--r--ext/openssl/depend5156
-rw-r--r--ext/openssl/deprecation.rb27
-rw-r--r--ext/openssl/extconf.rb166
-rw-r--r--ext/openssl/lib/openssl.rb33
-rw-r--r--ext/openssl/lib/openssl/bn.rb2
-rw-r--r--ext/openssl/lib/openssl/buffering.rb42
-rw-r--r--ext/openssl/lib/openssl/cipher.rb2
-rw-r--r--ext/openssl/lib/openssl/config.rb474
-rw-r--r--ext/openssl/lib/openssl/digest.rb22
-rw-r--r--ext/openssl/lib/openssl/hmac.rb78
-rw-r--r--ext/openssl/lib/openssl/marshal.rb30
-rw-r--r--ext/openssl/lib/openssl/pkcs5.rb2
-rw-r--r--ext/openssl/lib/openssl/pkey.rb448
-rw-r--r--ext/openssl/lib/openssl/ssl.rb61
-rw-r--r--ext/openssl/lib/openssl/version.rb5
-rw-r--r--ext/openssl/lib/openssl/x509.rb178
-rw-r--r--ext/openssl/openssl.gemspec42
-rw-r--r--ext/openssl/openssl_missing.c66
-rw-r--r--ext/openssl/openssl_missing.h102
-rw-r--r--ext/openssl/ossl.c174
-rw-r--r--ext/openssl/ossl.h42
-rw-r--r--ext/openssl/ossl_asn1.c64
-rw-r--r--ext/openssl/ossl_bn.c425
-rw-r--r--ext/openssl/ossl_bn.h3
-rw-r--r--ext/openssl/ossl_cipher.c70
-rw-r--r--ext/openssl/ossl_config.c453
-rw-r--r--ext/openssl/ossl_config.h11
-rw-r--r--ext/openssl/ossl_digest.c93
-rw-r--r--ext/openssl/ossl_engine.c45
-rw-r--r--ext/openssl/ossl_hmac.c205
-rw-r--r--ext/openssl/ossl_kdf.c36
-rw-r--r--ext/openssl/ossl_ns_spki.c2
-rw-r--r--ext/openssl/ossl_ocsp.c75
-rw-r--r--ext/openssl/ossl_ocsp.h6
-rw-r--r--ext/openssl/ossl_pkcs12.c24
-rw-r--r--ext/openssl/ossl_pkcs7.c119
-rw-r--r--ext/openssl/ossl_pkcs7.h16
-rw-r--r--ext/openssl/ossl_pkey.c1473
-rw-r--r--ext/openssl/ossl_pkey.h109
-rw-r--r--ext/openssl/ossl_pkey_dh.c470
-rw-r--r--ext/openssl/ossl_pkey_dsa.c505
-rw-r--r--ext/openssl/ossl_pkey_ec.c529
-rw-r--r--ext/openssl/ossl_pkey_rsa.c599
-rw-r--r--ext/openssl/ossl_rand.c34
-rw-r--r--ext/openssl/ossl_ssl.c1015
-rw-r--r--ext/openssl/ossl_ssl_session.c57
-rw-r--r--ext/openssl/ossl_ts.c1539
-rw-r--r--ext/openssl/ossl_ts.h16
-rw-r--r--ext/openssl/ossl_version.h15
-rw-r--r--ext/openssl/ossl_x509.c87
-rw-r--r--ext/openssl/ossl_x509cert.c182
-rw-r--r--ext/openssl/ossl_x509crl.c23
-rw-r--r--ext/openssl/ossl_x509ext.c17
-rw-r--r--ext/openssl/ossl_x509name.c19
-rw-r--r--ext/openssl/ossl_x509req.c23
-rw-r--r--ext/openssl/ossl_x509revoked.c6
-rw-r--r--ext/openssl/ossl_x509store.c283
-rw-r--r--ext/openssl/ruby_missing.h24
-rw-r--r--ext/pathname/depend157
-rw-r--r--ext/pathname/lib/pathname.rb35
-rw-r--r--ext/pathname/pathname.c55
-rw-r--r--ext/pathname/pathname.gemspec25
-rw-r--r--ext/psych/.gitignore1
-rw-r--r--ext/psych/depend799
-rw-r--r--ext/psych/extconf.rb70
-rw-r--r--ext/psych/lib/psych.rb340
-rw-r--r--ext/psych/lib/psych/class_loader.rb18
-rw-r--r--ext/psych/lib/psych/core_ext.rb2
-rw-r--r--ext/psych/lib/psych/exception.rb18
-rw-r--r--ext/psych/lib/psych/handler.rb2
-rw-r--r--ext/psych/lib/psych/handlers/document_stream.rb2
-rw-r--r--ext/psych/lib/psych/handlers/recorder.rb2
-rw-r--r--ext/psych/lib/psych/json/stream.rb4
-rw-r--r--ext/psych/lib/psych/json/tree_builder.rb2
-rw-r--r--ext/psych/lib/psych/nodes.rb14
-rw-r--r--ext/psych/lib/psych/nodes/node.rb8
-rw-r--r--ext/psych/lib/psych/nodes/scalar.rb2
-rw-r--r--ext/psych/lib/psych/parser.rb13
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb38
-rw-r--r--ext/psych/lib/psych/syntax_error.rb2
-rw-r--r--ext/psych/lib/psych/tree_builder.rb2
-rw-r--r--ext/psych/lib/psych/versions.rb6
-rw-r--r--ext/psych/lib/psych/visitors.rb12
-rw-r--r--ext/psych/lib/psych/visitors/json_tree.rb2
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb65
-rw-r--r--ext/psych/lib/psych/visitors/visitor.rb20
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb78
-rw-r--r--ext/psych/psych.c9
-rw-r--r--ext/psych/psych.gemspec20
-rw-r--r--ext/psych/psych_parser.c80
-rw-r--r--ext/psych/psych_yaml_tree.c12
-rw-r--r--ext/psych/yaml/api.c1395
-rw-r--r--ext/psych/yaml/config.h10
-rw-r--r--ext/psych/yaml/dumper.c394
-rw-r--r--ext/psych/yaml/emitter.c2324
-rw-r--r--ext/psych/yaml/loader.c444
-rw-r--r--ext/psych/yaml/parser.c1370
-rw-r--r--ext/psych/yaml/reader.c469
-rw-r--r--ext/psych/yaml/scanner.c3578
-rw-r--r--ext/psych/yaml/writer.c141
-rw-r--r--ext/psych/yaml/yaml.h1971
-rw-r--r--ext/psych/yaml/yaml_private.h688
-rw-r--r--ext/pty/depend168
-rw-r--r--ext/pty/extconf.rb8
-rw-r--r--ext/pty/lib/expect.rb16
-rw-r--r--ext/pty/pty.c242
-rw-r--r--ext/racc/cparse/cparse.c40
-rw-r--r--ext/racc/cparse/depend148
-rw-r--r--ext/racc/cparse/extconf.rb3
-rw-r--r--ext/rbconfig/sizeof/depend296
-rw-r--r--ext/readline/depend157
-rw-r--r--ext/readline/depend-gem4
-rw-r--r--ext/readline/extconf.rb1
-rw-r--r--ext/readline/readline-ext.gemspec7
-rw-r--r--ext/readline/readline.c23
-rw-r--r--ext/ripper/depend195
-rw-r--r--ext/ripper/eventids2.c11
-rw-r--r--ext/ripper/extconf.rb3
-rw-r--r--ext/ripper/lib/ripper/lexer.rb148
-rw-r--r--ext/ripper/lib/ripper/sexp.rb37
-rw-r--r--ext/ripper/tools/dsl.rb3
-rw-r--r--ext/ripper/tools/preproc.rb14
-rw-r--r--ext/sdbm/_sdbm.c952
-rw-r--r--ext/sdbm/depend27
-rw-r--r--ext/sdbm/extconf.rb5
-rw-r--r--ext/sdbm/init.c1067
-rw-r--r--ext/sdbm/sdbm.gemspec21
-rw-r--r--ext/sdbm/sdbm.h86
-rw-r--r--ext/socket/addrinfo.h36
-rw-r--r--ext/socket/ancdata.c284
-rw-r--r--ext/socket/basicsocket.c151
-rw-r--r--ext/socket/constants.c6
-rw-r--r--ext/socket/depend2580
-rw-r--r--ext/socket/extconf.rb32
-rw-r--r--ext/socket/getaddrinfo.c898
-rw-r--r--ext/socket/getnameinfo.c226
-rw-r--r--ext/socket/ifaddr.c11
-rw-r--r--ext/socket/init.c437
-rw-r--r--ext/socket/ipsocket.c209
-rw-r--r--ext/socket/lib/socket.rb9
-rw-r--r--ext/socket/mkconstants.rb40
-rw-r--r--ext/socket/option.c102
-rw-r--r--ext/socket/raddrinfo.c517
-rw-r--r--ext/socket/rubysocket.h122
-rw-r--r--ext/socket/socket.c630
-rw-r--r--ext/socket/sockssocket.c6
-rw-r--r--ext/socket/tcpserver.c26
-rw-r--r--ext/socket/tcpsocket.c30
-rw-r--r--ext/socket/udpsocket.c55
-rw-r--r--ext/socket/unixserver.c31
-rw-r--r--ext/socket/unixsocket.c154
-rw-r--r--ext/stringio/depend157
-rw-r--r--ext/stringio/stringio.c485
-rw-r--r--ext/stringio/stringio.gemspec22
-rw-r--r--ext/strscan/depend158
-rw-r--r--ext/strscan/extconf.rb11
-rw-r--r--ext/strscan/strscan.c228
-rw-r--r--ext/strscan/strscan.gemspec41
-rw-r--r--ext/syslog/depend148
-rw-r--r--ext/syslog/syslog.c22
-rw-r--r--ext/syslog/syslog.gemspec23
-rw-r--r--ext/win32/lib/Win32API.rb47
-rw-r--r--ext/win32/lib/win32/importer.rb9
-rw-r--r--ext/win32/lib/win32/registry.rb23
-rw-r--r--ext/win32/lib/win32/resolv.rb13
-rw-r--r--ext/win32/lib/win32/resolv9x.rb253
-rw-r--r--ext/win32/lib/win32/sspi.rb627
-rw-r--r--ext/win32/resolv/resolv.c18
-rw-r--r--ext/win32ole/sample/xml.rb12
-rw-r--r--ext/win32ole/win32ole.c190
-rw-r--r--ext/win32ole/win32ole.gemspec22
-rw-r--r--ext/win32ole/win32ole.h4
-rw-r--r--ext/win32ole/win32ole_error.c3
-rw-r--r--ext/win32ole/win32ole_error.h4
-rw-r--r--ext/win32ole/win32ole_event.c21
-rw-r--r--ext/win32ole/win32ole_method.c7
-rw-r--r--ext/win32ole/win32ole_method.h2
-rw-r--r--ext/win32ole/win32ole_param.c3
-rw-r--r--ext/win32ole/win32ole_record.c5
-rw-r--r--ext/win32ole/win32ole_record.h2
-rw-r--r--ext/win32ole/win32ole_type.c7
-rw-r--r--ext/win32ole/win32ole_type.h2
-rw-r--r--ext/win32ole/win32ole_typelib.c21
-rw-r--r--ext/win32ole/win32ole_typelib.h2
-rw-r--r--ext/win32ole/win32ole_variable.c6
-rw-r--r--ext/win32ole/win32ole_variable.h2
-rw-r--r--ext/win32ole/win32ole_variant.c11
-rw-r--r--ext/win32ole/win32ole_variant.h2
-rw-r--r--ext/win32ole/win32ole_variant_m.c4
-rw-r--r--ext/win32ole/win32ole_variant_m.h2
-rw-r--r--ext/zlib/depend157
-rw-r--r--ext/zlib/extconf.rb15
-rw-r--r--ext/zlib/zlib.c379
-rw-r--r--ext/zlib/zlib.gemspec10
-rw-r--r--file.c3691
-rw-r--r--gc.c10570
-rw-r--r--gc.h46
-rw-r--r--gc.rb245
-rw-r--r--gem_prelude.rb28
-rw-r--r--gems/bundled_gems22
-rw-r--r--gems/lib/core_assertions.rb1
-rw-r--r--gems/lib/envutil.rb1
-rw-r--r--gems/lib/rake/extensiontask.rb12
-rw-r--r--goruby.c44
-rw-r--r--hash.c4808
-rw-r--r--hrtime.h59
-rw-r--r--id_table.c167
-rw-r--r--id_table.h11
-rw-r--r--include/ruby.h31
-rw-r--r--include/ruby/assert.h254
-rw-r--r--include/ruby/atomic.h890
-rw-r--r--include/ruby/backward.h92
-rw-r--r--include/ruby/backward/2/assume.h56
-rw-r--r--include/ruby/backward/2/attributes.h165
-rw-r--r--include/ruby/backward/2/bool.h36
-rw-r--r--include/ruby/backward/2/gcc_version_since.h37
-rw-r--r--include/ruby/backward/2/inttypes.h131
-rw-r--r--include/ruby/backward/2/limits.h99
-rw-r--r--include/ruby/backward/2/long_long.h73
-rw-r--r--include/ruby/backward/2/r_cast.h32
-rw-r--r--include/ruby/backward/2/rmodule.h36
-rw-r--r--include/ruby/backward/2/stdalign.h30
-rw-r--r--include/ruby/backward/2/stdarg.h69
-rw-r--r--include/ruby/backward/classext.h18
-rw-r--r--include/ruby/backward/cxxanyargs.hpp413
-rw-r--r--include/ruby/backward/rubyio.h6
-rw-r--r--include/ruby/backward/rubysig.h47
-rw-r--r--include/ruby/backward/st.h6
-rw-r--r--include/ruby/backward/util.h6
-rw-r--r--include/ruby/debug.h622
-rw-r--r--include/ruby/defines.h530
-rw-r--r--include/ruby/encoding.h450
-rw-r--r--include/ruby/fiber/scheduler.h374
-rw-r--r--include/ruby/intern.h1268
-rw-r--r--include/ruby/internal/abi.h58
-rw-r--r--include/ruby/internal/anyargs.h398
-rw-r--r--include/ruby/internal/arithmetic.h39
-rw-r--r--include/ruby/internal/arithmetic/char.h81
-rw-r--r--include/ruby/internal/arithmetic/double.h72
-rw-r--r--include/ruby/internal/arithmetic/fixnum.h60
-rw-r--r--include/ruby/internal/arithmetic/gid_t.h41
-rw-r--r--include/ruby/internal/arithmetic/int.h264
-rw-r--r--include/ruby/internal/arithmetic/intptr_t.h74
-rw-r--r--include/ruby/internal/arithmetic/long.h356
-rw-r--r--include/ruby/internal/arithmetic/long_long.h135
-rw-r--r--include/ruby/internal/arithmetic/mode_t.h41
-rw-r--r--include/ruby/internal/arithmetic/off_t.h62
-rw-r--r--include/ruby/internal/arithmetic/pid_t.h41
-rw-r--r--include/ruby/internal/arithmetic/short.h113
-rw-r--r--include/ruby/internal/arithmetic/size_t.h66
-rw-r--r--include/ruby/internal/arithmetic/st_data_t.h75
-rw-r--r--include/ruby/internal/arithmetic/uid_t.h41
-rw-r--r--include/ruby/internal/assume.h87
-rw-r--r--include/ruby/internal/attr/alloc_size.h32
-rw-r--r--include/ruby/internal/attr/artificial.h46
-rw-r--r--include/ruby/internal/attr/cold.h37
-rw-r--r--include/ruby/internal/attr/const.h46
-rw-r--r--include/ruby/internal/attr/constexpr.h84
-rw-r--r--include/ruby/internal/attr/deprecated.h75
-rw-r--r--include/ruby/internal/attr/diagnose_if.h42
-rw-r--r--include/ruby/internal/attr/enum_extensibility.h32
-rw-r--r--include/ruby/internal/attr/error.h32
-rw-r--r--include/ruby/internal/attr/flag_enum.h33
-rw-r--r--include/ruby/internal/attr/forceinline.h40
-rw-r--r--include/ruby/internal/attr/format.h38
-rw-r--r--include/ruby/internal/attr/maybe_unused.h38
-rw-r--r--include/ruby/internal/attr/noalias.h69
-rw-r--r--include/ruby/internal/attr/nodiscard.h45
-rw-r--r--include/ruby/internal/attr/noexcept.h91
-rw-r--r--include/ruby/internal/attr/noinline.h35
-rw-r--r--include/ruby/internal/attr/nonnull.h34
-rw-r--r--include/ruby/internal/attr/nonstring.h32
-rw-r--r--include/ruby/internal/attr/noreturn.h48
-rw-r--r--include/ruby/internal/attr/pure.h43
-rw-r--r--include/ruby/internal/attr/restrict.h44
-rw-r--r--include/ruby/internal/attr/returns_nonnull.h37
-rw-r--r--include/ruby/internal/attr/warning.h32
-rw-r--r--include/ruby/internal/attr/weakref.h32
-rw-r--r--include/ruby/internal/cast.h50
-rw-r--r--include/ruby/internal/compiler_is.h45
-rw-r--r--include/ruby/internal/compiler_is/apple.h40
-rw-r--r--include/ruby/internal/compiler_is/clang.h37
-rw-r--r--include/ruby/internal/compiler_is/gcc.h45
-rw-r--r--include/ruby/internal/compiler_is/intel.h40
-rw-r--r--include/ruby/internal/compiler_is/msvc.h56
-rw-r--r--include/ruby/internal/compiler_is/sunpro.h54
-rw-r--r--include/ruby/internal/compiler_since.h61
-rw-r--r--include/ruby/internal/config.h155
-rw-r--r--include/ruby/internal/constant_p.h38
-rw-r--r--include/ruby/internal/core.h35
-rw-r--r--include/ruby/internal/core/rarray.h585
-rw-r--r--include/ruby/internal/core/rbasic.h158
-rw-r--r--include/ruby/internal/core/rbignum.h80
-rw-r--r--include/ruby/internal/core/rclass.h93
-rw-r--r--include/ruby/internal/core/rdata.h386
-rw-r--r--include/ruby/internal/core/rfile.h51
-rw-r--r--include/ruby/internal/core/rhash.h144
-rw-r--r--include/ruby/internal/core/rmatch.h146
-rw-r--r--include/ruby/internal/core/robject.h176
-rw-r--r--include/ruby/internal/core/rregexp.h168
-rw-r--r--include/ruby/internal/core/rstring.h578
-rw-r--r--include/ruby/internal/core/rstruct.h121
-rw-r--r--include/ruby/internal/core/rtypeddata.h604
-rw-r--r--include/ruby/internal/ctype.h545
-rw-r--r--include/ruby/internal/dllexport.h112
-rw-r--r--include/ruby/internal/dosish.h89
-rw-r--r--include/ruby/internal/encoding/coderange.h202
-rw-r--r--include/ruby/internal/encoding/ctype.h258
-rw-r--r--include/ruby/internal/encoding/encoding.h1060
-rw-r--r--include/ruby/internal/encoding/pathname.h184
-rw-r--r--include/ruby/internal/encoding/re.h46
-rw-r--r--include/ruby/internal/encoding/sprintf.h78
-rw-r--r--include/ruby/internal/encoding/string.h346
-rw-r--r--include/ruby/internal/encoding/symbol.h100
-rw-r--r--include/ruby/internal/encoding/transcode.h562
-rw-r--r--include/ruby/internal/error.h582
-rw-r--r--include/ruby/internal/eval.h400
-rw-r--r--include/ruby/internal/event.h154
-rw-r--r--include/ruby/internal/fl_type.h948
-rw-r--r--include/ruby/internal/gc.h62
-rw-r--r--include/ruby/internal/glob.h113
-rw-r--r--include/ruby/internal/globals.h209
-rw-r--r--include/ruby/internal/has/attribute.h163
-rw-r--r--include/ruby/internal/has/builtin.h117
-rw-r--r--include/ruby/internal/has/c_attribute.h38
-rw-r--r--include/ruby/internal/has/cpp_attribute.h86
-rw-r--r--include/ruby/internal/has/declspec_attribute.h47
-rw-r--r--include/ruby/internal/has/extension.h33
-rw-r--r--include/ruby/internal/has/feature.h31
-rw-r--r--include/ruby/internal/has/warning.h31
-rw-r--r--include/ruby/internal/intern/array.h657
-rw-r--r--include/ruby/internal/intern/bignum.h846
-rw-r--r--include/ruby/internal/intern/class.h394
-rw-r--r--include/ruby/internal/intern/compar.h62
-rw-r--r--include/ruby/internal/intern/complex.h253
-rw-r--r--include/ruby/internal/intern/cont.h282
-rw-r--r--include/ruby/internal/intern/dir.h42
-rw-r--r--include/ruby/internal/intern/enum.h73
-rw-r--r--include/ruby/internal/intern/enumerator.h259
-rw-r--r--include/ruby/internal/intern/error.h287
-rw-r--r--include/ruby/internal/intern/eval.h222
-rw-r--r--include/ruby/internal/intern/file.h213
-rw-r--r--include/ruby/internal/intern/gc.h392
-rw-r--r--include/ruby/internal/intern/hash.h320
-rw-r--r--include/ruby/internal/intern/io.h661
-rw-r--r--include/ruby/internal/intern/load.h218
-rw-r--r--include/ruby/internal/intern/marshal.h112
-rw-r--r--include/ruby/internal/intern/numeric.h208
-rw-r--r--include/ruby/internal/intern/object.h501
-rw-r--r--include/ruby/internal/intern/parse.h194
-rw-r--r--include/ruby/internal/intern/proc.h353
-rw-r--r--include/ruby/internal/intern/process.h273
-rw-r--r--include/ruby/internal/intern/random.h116
-rw-r--r--include/ruby/internal/intern/range.h89
-rw-r--r--include/ruby/internal/intern/rational.h172
-rw-r--r--include/ruby/internal/intern/re.h249
-rw-r--r--include/ruby/internal/intern/ruby.h77
-rw-r--r--include/ruby/internal/intern/select.h86
-rw-r--r--include/ruby/internal/intern/select/largesize.h214
-rw-r--r--include/ruby/internal/intern/select/posix.h144
-rw-r--r--include/ruby/internal/intern/select/win32.h259
-rw-r--r--include/ruby/internal/intern/signal.h152
-rw-r--r--include/ruby/internal/intern/sprintf.h159
-rw-r--r--include/ruby/internal/intern/string.h1757
-rw-r--r--include/ruby/internal/intern/struct.h203
-rw-r--r--include/ruby/internal/intern/thread.h492
-rw-r--r--include/ruby/internal/intern/time.h161
-rw-r--r--include/ruby/internal/intern/variable.h628
-rw-r--r--include/ruby/internal/intern/vm.h431
-rw-r--r--include/ruby/internal/interpreter.h304
-rw-r--r--include/ruby/internal/iterator.h513
-rw-r--r--include/ruby/internal/memory.h666
-rw-r--r--include/ruby/internal/method.h205
-rw-r--r--include/ruby/internal/module.h177
-rw-r--r--include/ruby/internal/newobj.h195
-rw-r--r--include/ruby/internal/rgengc.h443
-rw-r--r--include/ruby/internal/scan_args.h534
-rw-r--r--include/ruby/internal/special_consts.h362
-rw-r--r--include/ruby/internal/static_assert.h77
-rw-r--r--include/ruby/internal/stdalign.h135
-rw-r--r--include/ruby/internal/stdbool.h51
-rw-r--r--include/ruby/internal/symbol.h332
-rw-r--r--include/ruby/internal/value.h133
-rw-r--r--include/ruby/internal/value_type.h449
-rw-r--r--include/ruby/internal/variable.h337
-rw-r--r--include/ruby/internal/warning_push.h124
-rw-r--r--include/ruby/internal/xmalloc.h392
-rw-r--r--include/ruby/io.h991
-rw-r--r--include/ruby/io/buffer.h92
-rw-r--r--include/ruby/memory_view.h325
-rw-r--r--include/ruby/missing.h240
-rw-r--r--include/ruby/onigmo.h15
-rw-r--r--include/ruby/ractor.h264
-rw-r--r--include/ruby/random.h359
-rw-r--r--include/ruby/re.h198
-rw-r--r--include/ruby/regex.h21
-rw-r--r--include/ruby/ruby.h3035
-rw-r--r--include/ruby/st.h4
-rw-r--r--include/ruby/subst.h9
-rw-r--r--include/ruby/thread.h246
-rw-r--r--include/ruby/thread_native.h187
-rw-r--r--include/ruby/util.h259
-rw-r--r--include/ruby/version.h159
-rw-r--r--include/ruby/vm.h61
-rw-r--r--include/ruby/win32.h157
-rw-r--r--inits.c50
-rw-r--r--insns.def310
-rw-r--r--internal.h2712
-rw-r--r--internal/array.h163
-rw-r--r--internal/basic_operators.h64
-rw-r--r--internal/bignum.h246
-rw-r--r--internal/bits.h565
-rw-r--r--internal/class.h187
-rw-r--r--internal/cmdlineopt.h61
-rw-r--r--internal/compar.h29
-rw-r--r--internal/compile.h35
-rw-r--r--internal/compilers.h107
-rw-r--r--internal/complex.h29
-rw-r--r--internal/cont.h32
-rw-r--r--internal/dir.h16
-rw-r--r--internal/enc.h19
-rw-r--r--internal/encoding.h32
-rw-r--r--internal/enum.h18
-rw-r--r--internal/enumerator.h21
-rw-r--r--internal/error.h191
-rw-r--r--internal/eval.h33
-rw-r--r--internal/file.h38
-rw-r--r--internal/fixnum.h184
-rw-r--r--internal/gc.h192
-rw-r--r--internal/hash.h244
-rw-r--r--internal/imemo.h242
-rw-r--r--internal/inits.h50
-rw-r--r--internal/io.h38
-rw-r--r--internal/load.h18
-rw-r--r--internal/loadpath.h16
-rw-r--r--internal/math.h23
-rw-r--r--internal/missing.h18
-rw-r--r--internal/numeric.h275
-rw-r--r--internal/object.h61
-rw-r--r--internal/parse.h25
-rw-r--r--internal/proc.h32
-rw-r--r--internal/process.h137
-rw-r--r--internal/ractor.h6
-rw-r--r--internal/random.h16
-rw-r--r--internal/range.h40
-rw-r--r--internal/rational.h72
-rw-r--r--internal/re.h30
-rw-r--r--internal/sanitizers.h190
-rw-r--r--internal/serial.h23
-rw-r--r--internal/signal.h21
-rw-r--r--internal/static_assert.h16
-rw-r--r--internal/string.h147
-rw-r--r--internal/struct.h153
-rw-r--r--internal/symbol.h42
-rw-r--r--internal/thread.h56
-rw-r--r--internal/time.h37
-rw-r--r--internal/transcode.h20
-rw-r--r--internal/util.h27
-rw-r--r--internal/variable.h90
-rw-r--r--internal/vm.h134
-rw-r--r--internal/warnings.h16
-rw-r--r--io.c10604
-rw-r--r--io.rb4
-rw-r--r--io_buffer.c3515
-rw-r--r--iseq.c2548
-rw-r--r--iseq.h142
-rw-r--r--kernel.rb178
-rw-r--r--lex.c.blt2
-rw-r--r--lib/.document25
-rw-r--r--lib/English.gemspec22
-rw-r--r--lib/abbrev.gemspec22
-rw-r--r--lib/base64.gemspec20
-rw-r--r--lib/base64.rb6
-rw-r--r--lib/benchmark.rb29
-rw-r--r--lib/benchmark/benchmark.gemspec6
-rw-r--r--lib/benchmark/version.rb3
-rw-r--r--lib/bundler.rb210
-rw-r--r--lib/bundler/.document1
-rw-r--r--lib/bundler/build_metadata.rb10
-rw-r--r--lib/bundler/bundler.gemspec23
-rw-r--r--lib/bundler/cli.rb236
-rw-r--r--lib/bundler/cli/add.rb4
-rw-r--r--lib/bundler/cli/binstubs.rb16
-rw-r--r--lib/bundler/cli/cache.rb11
-rw-r--r--lib/bundler/cli/check.rb8
-rw-r--r--lib/bundler/cli/clean.rb2
-rw-r--r--lib/bundler/cli/common.rb35
-rw-r--r--lib/bundler/cli/config.rb11
-rw-r--r--lib/bundler/cli/console.rb6
-rw-r--r--lib/bundler/cli/doctor.rb29
-rw-r--r--lib/bundler/cli/exec.rb15
-rw-r--r--lib/bundler/cli/fund.rb36
-rw-r--r--lib/bundler/cli/gem.rb303
-rw-r--r--lib/bundler/cli/info.rb46
-rw-r--r--lib/bundler/cli/init.rb10
-rw-r--r--lib/bundler/cli/inject.rb2
-rw-r--r--lib/bundler/cli/install.rb85
-rw-r--r--lib/bundler/cli/issue.rb9
-rw-r--r--lib/bundler/cli/list.rb30
-rw-r--r--lib/bundler/cli/lock.rb15
-rw-r--r--lib/bundler/cli/open.rb13
-rw-r--r--lib/bundler/cli/outdated.rb187
-rw-r--r--lib/bundler/cli/package.rb48
-rw-r--r--lib/bundler/cli/platform.rb14
-rw-r--r--lib/bundler/cli/plugin.rb10
-rw-r--r--lib/bundler/cli/pristine.rb5
-rw-r--r--lib/bundler/cli/remove.rb3
-rw-r--r--lib/bundler/cli/show.rb4
-rw-r--r--lib/bundler/cli/update.rb29
-rw-r--r--lib/bundler/cli/viz.rb2
-rw-r--r--lib/bundler/compact_index_client.rb12
-rw-r--r--lib/bundler/compact_index_client/cache.rb31
-rw-r--r--lib/bundler/compact_index_client/gem_parser.rb28
-rw-r--r--lib/bundler/compact_index_client/updater.rb107
-rw-r--r--lib/bundler/constants.rb2
-rw-r--r--lib/bundler/current_ruby.rb25
-rw-r--r--lib/bundler/definition.rb889
-rw-r--r--lib/bundler/dep_proxy.rb48
-rw-r--r--lib/bundler/dependency.rb100
-rw-r--r--lib/bundler/digest.rb71
-rw-r--r--lib/bundler/dsl.rb164
-rw-r--r--lib/bundler/endpoint_specification.rb30
-rw-r--r--lib/bundler/env.rb8
-rw-r--r--lib/bundler/environment_preserver.rb36
-rw-r--r--lib/bundler/errors.rb45
-rw-r--r--lib/bundler/feature_flag.rb10
-rw-r--r--lib/bundler/fetcher.rb69
-rw-r--r--lib/bundler/fetcher/base.rb16
-rw-r--r--lib/bundler/fetcher/compact_index.rb51
-rw-r--r--lib/bundler/fetcher/dependency.rb8
-rw-r--r--lib/bundler/fetcher/downloader.rb24
-rw-r--r--lib/bundler/fetcher/index.rb35
-rw-r--r--lib/bundler/force_platform.rb18
-rw-r--r--lib/bundler/friendly_errors.rb94
-rw-r--r--lib/bundler/gem_helper.rb92
-rw-r--r--lib/bundler/gem_helpers.rb66
-rw-r--r--lib/bundler/gem_remote_fetcher.rb43
-rw-r--r--lib/bundler/gem_version_promoter.rb153
-rw-r--r--lib/bundler/gemdeps.rb29
-rw-r--r--lib/bundler/graph.rb8
-rw-r--r--lib/bundler/index.rb70
-rw-r--r--lib/bundler/injector.rb50
-rw-r--r--lib/bundler/inline.rb33
-rw-r--r--lib/bundler/installer.rb132
-rw-r--r--lib/bundler/installer/gem_installer.rb43
-rw-r--r--lib/bundler/installer/parallel_installer.rb79
-rw-r--r--lib/bundler/installer/standalone.rb73
-rw-r--r--lib/bundler/lazy_specification.rb139
-rw-r--r--lib/bundler/lockfile_generator.rb8
-rw-r--r--lib/bundler/lockfile_parser.rb94
-rw-r--r--lib/bundler/man/.document1
-rw-r--r--lib/bundler/man/bundle-add.182
-rw-r--r--lib/bundler/man/bundle-add.1.ronn58
-rw-r--r--lib/bundler/man/bundle-binstubs.142
-rw-r--r--lib/bundler/man/bundle-binstubs.1.ronn41
-rw-r--r--lib/bundler/man/bundle-cache.161
-rw-r--r--lib/bundler/man/bundle-cache.1.ronn79
-rw-r--r--lib/bundler/man/bundle-check.131
-rw-r--r--lib/bundler/man/bundle-check.1.ronn (renamed from man/bundle-check.ronn)0
-rw-r--r--lib/bundler/man/bundle-clean.124
-rw-r--r--lib/bundler/man/bundle-clean.1.ronn18
-rw-r--r--lib/bundler/man/bundle-config.1512
-rw-r--r--lib/bundler/man/bundle-config.1.ronn405
-rw-r--r--lib/bundler/man/bundle-console.153
-rw-r--r--lib/bundler/man/bundle-console.1.ronn44
-rw-r--r--lib/bundler/man/bundle-doctor.144
-rw-r--r--lib/bundler/man/bundle-doctor.1.ronn (renamed from man/bundle-doctor.ronn)0
-rw-r--r--lib/bundler/man/bundle-exec.1165
-rw-r--r--lib/bundler/man/bundle-exec.1.ronn152
-rw-r--r--lib/bundler/man/bundle-gem.1105
-rw-r--r--lib/bundler/man/bundle-gem.1.ronn117
-rw-r--r--lib/bundler/man/bundle-help.113
-rw-r--r--lib/bundler/man/bundle-help.1.ronn12
-rw-r--r--lib/bundler/man/bundle-info.120
-rw-r--r--lib/bundler/man/bundle-info.1.ronn17
-rw-r--r--lib/bundler/man/bundle-init.129
-rw-r--r--lib/bundler/man/bundle-init.1.ronn31
-rw-r--r--lib/bundler/man/bundle-inject.136
-rw-r--r--lib/bundler/man/bundle-inject.1.ronn24
-rw-r--r--lib/bundler/man/bundle-install.1313
-rw-r--r--lib/bundler/man/bundle-install.1.ronn382
-rw-r--r--lib/bundler/man/bundle-list.150
-rw-r--r--lib/bundler/man/bundle-list.1.ronn33
-rw-r--r--lib/bundler/man/bundle-lock.184
-rw-r--r--lib/bundler/man/bundle-lock.1.ronn (renamed from man/bundle-lock.ronn)0
-rw-r--r--lib/bundler/man/bundle-open.152
-rw-r--r--lib/bundler/man/bundle-open.1.ronn27
-rw-r--r--lib/bundler/man/bundle-outdated.1152
-rw-r--r--lib/bundler/man/bundle-outdated.1.ronn105
-rw-r--r--lib/bundler/man/bundle-platform.171
-rw-r--r--lib/bundler/man/bundle-platform.1.ronn49
-rw-r--r--lib/bundler/man/bundle-plugin.181
-rw-r--r--lib/bundler/man/bundle-plugin.1.ronn59
-rw-r--r--lib/bundler/man/bundle-pristine.134
-rw-r--r--lib/bundler/man/bundle-pristine.1.ronn (renamed from man/bundle-pristine.ronn)0
-rw-r--r--lib/bundler/man/bundle-remove.131
-rw-r--r--lib/bundler/man/bundle-remove.1.ronn (renamed from man/bundle-remove.ronn)0
-rw-r--r--lib/bundler/man/bundle-show.123
-rw-r--r--lib/bundler/man/bundle-show.1.ronn (renamed from man/bundle-show.ronn)0
-rw-r--r--lib/bundler/man/bundle-update.1394
-rw-r--r--lib/bundler/man/bundle-update.1.ronn351
-rw-r--r--lib/bundler/man/bundle-version.135
-rw-r--r--lib/bundler/man/bundle-version.1.ronn24
-rw-r--r--lib/bundler/man/bundle-viz.142
-rw-r--r--lib/bundler/man/bundle-viz.1.ronn32
-rw-r--r--lib/bundler/man/bundle.1141
-rw-r--r--lib/bundler/man/bundle.1.ronn116
-rw-r--r--lib/bundler/man/gemfile.5736
-rw-r--r--lib/bundler/man/gemfile.5.ronn543
-rw-r--r--lib/bundler/man/index.txt29
-rw-r--r--lib/bundler/match_metadata.rb13
-rw-r--r--lib/bundler/match_platform.rb1
-rw-r--r--lib/bundler/match_remote_metadata.rb29
-rw-r--r--lib/bundler/mirror.rb16
-rw-r--r--lib/bundler/plugin.rb71
-rw-r--r--lib/bundler/plugin/api/source.rb34
-rw-r--r--lib/bundler/plugin/dsl.rb2
-rw-r--r--lib/bundler/plugin/index.rb24
-rw-r--r--lib/bundler/plugin/installer.rb29
-rw-r--r--lib/bundler/plugin/installer/git.rb4
-rw-r--r--lib/bundler/plugin/installer/rubygems.rb10
-rw-r--r--lib/bundler/plugin/source_list.rb6
-rw-r--r--lib/bundler/process_lock.rb2
-rw-r--r--lib/bundler/psyched_yaml.rb37
-rw-r--r--lib/bundler/remote_specification.rb19
-rw-r--r--lib/bundler/resolver.rb694
-rw-r--r--lib/bundler/resolver/base.rb107
-rw-r--r--lib/bundler/resolver/candidate.rb94
-rw-r--r--lib/bundler/resolver/incompatibility.rb15
-rw-r--r--lib/bundler/resolver/package.rb72
-rw-r--r--lib/bundler/resolver/root.rb25
-rw-r--r--lib/bundler/resolver/spec_group.rb123
-rw-r--r--lib/bundler/retry.rb4
-rw-r--r--lib/bundler/ruby_dsl.rb8
-rw-r--r--lib/bundler/ruby_version.rb31
-rw-r--r--lib/bundler/rubygems_ext.rb265
-rw-r--r--lib/bundler/rubygems_gem_installer.rb105
-rw-r--r--lib/bundler/rubygems_integration.rb252
-rw-r--r--lib/bundler/runtime.rb56
-rw-r--r--lib/bundler/safe_marshal.rb31
-rw-r--r--lib/bundler/self_manager.rb168
-rw-r--r--lib/bundler/settings.rb221
-rw-r--r--lib/bundler/setup.rb7
-rw-r--r--lib/bundler/shared_helpers.rb55
-rw-r--r--lib/bundler/similarity_detector.rb2
-rw-r--r--lib/bundler/source.rb32
-rw-r--r--lib/bundler/source/git.rb141
-rw-r--r--lib/bundler/source/git/git_proxy.rb400
-rw-r--r--lib/bundler/source/metadata.rb11
-rw-r--r--lib/bundler/source/path.rb26
-rw-r--r--lib/bundler/source/path/installer.rb43
-rw-r--r--lib/bundler/source/rubygems.rb387
-rw-r--r--lib/bundler/source/rubygems/remote.rb2
-rw-r--r--lib/bundler/source/rubygems_aggregate.rb68
-rw-r--r--lib/bundler/source_list.rb172
-rw-r--r--lib/bundler/source_map.rb71
-rw-r--r--lib/bundler/spec_set.rb135
-rw-r--r--lib/bundler/stub_specification.rb40
-rw-r--r--lib/bundler/templates/Executable8
-rw-r--r--lib/bundler/templates/Executable.bundler27
-rw-r--r--lib/bundler/templates/Executable.standalone8
-rw-r--r--lib/bundler/templates/Gemfile2
-rw-r--r--lib/bundler/templates/gems.rb8
-rw-r--r--lib/bundler/templates/newgem/CHANGELOG.md.tt5
-rw-r--r--lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt104
-rw-r--r--lib/bundler/templates/newgem/Cargo.toml.tt7
-rw-r--r--lib/bundler/templates/newgem/Gemfile.tt16
-rw-r--r--lib/bundler/templates/newgem/README.md.tt29
-rw-r--r--lib/bundler/templates/newgem/Rakefile.tt48
-rw-r--r--lib/bundler/templates/newgem/bin/console.tt5
-rw-r--r--lib/bundler/templates/newgem/circleci/config.yml.tt25
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt15
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt10
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt6
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt3
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/newgem.c.tt2
-rw-r--r--lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt12
-rw-r--r--lib/bundler/templates/newgem/github/workflows/main.yml.tt37
-rw-r--r--lib/bundler/templates/newgem/gitignore.tt3
-rw-r--r--lib/bundler/templates/newgem/gitlab-ci.yml.tt18
-rw-r--r--lib/bundler/templates/newgem/lib/newgem.rb.tt6
-rw-r--r--lib/bundler/templates/newgem/lib/newgem/version.rb.tt2
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt53
-rw-r--r--lib/bundler/templates/newgem/rubocop.yml.tt13
-rw-r--r--lib/bundler/templates/newgem/sig/newgem.rbs.tt8
-rw-r--r--lib/bundler/templates/newgem/spec/newgem_spec.rb.tt2
-rw-r--r--lib/bundler/templates/newgem/spec/spec_helper.rb.tt3
-rw-r--r--lib/bundler/templates/newgem/standard.yml.tt3
-rw-r--r--lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt6
-rw-r--r--lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt13
-rw-r--r--lib/bundler/templates/newgem/test/newgem_test.rb.tt11
-rw-r--r--lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt15
-rw-r--r--lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt6
-rw-r--r--lib/bundler/templates/newgem/test/test_helper.rb.tt4
-rw-r--r--lib/bundler/templates/newgem/travis.yml.tt6
-rw-r--r--lib/bundler/ui/rg_proxy.rb2
-rw-r--r--lib/bundler/ui/shell.rb51
-rw-r--r--lib/bundler/ui/silent.rb26
-rw-r--r--lib/bundler/uri_credentials_filter.rb4
-rw-r--r--lib/bundler/uri_normalizer.rb23
-rw-r--r--lib/bundler/vendor/.document1
-rw-r--r--lib/bundler/vendor/connection_pool/lib/connection_pool.rb115
-rw-r--r--lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb66
-rw-r--r--lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb40
-rw-r--r--lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb2
-rw-r--r--lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb56
-rw-r--r--lib/bundler/vendor/fileutils/lib/fileutils.rb1760
-rw-r--r--lib/bundler/vendor/fileutils/lib/fileutils/version.rb5
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo.rb12
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb26
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb57
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb81
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb223
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb36
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb66
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb62
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb63
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb61
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb126
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb46
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb36
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb158
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/errors.rb143
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb6
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb101
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb67
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb837
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb46
-rw-r--r--lib/bundler/vendor/molinillo/lib/molinillo/state.rb58
-rw-r--r--lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb287
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub.rb31
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb20
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb189
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb182
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb150
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb43
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb121
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb45
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb19
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb60
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb105
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb3
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb129
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb411
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb248
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb178
-rw-r--r--lib/bundler/vendor/thor/lib/thor.rb18
-rw-r--r--lib/bundler/vendor/thor/lib/thor/actions.rb10
-rw-r--r--lib/bundler/vendor/thor/lib/thor/actions/create_link.rb3
-rw-r--r--lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb16
-rw-r--r--lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb3
-rw-r--r--lib/bundler/vendor/thor/lib/thor/base.rb9
-rw-r--r--lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb6
-rw-r--r--lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb12
-rw-r--r--lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb129
-rw-r--r--lib/bundler/vendor/thor/lib/thor/error.rb15
-rw-r--r--lib/bundler/vendor/thor/lib/thor/parser/arguments.rb6
-rw-r--r--lib/bundler/vendor/thor/lib/thor/parser/options.rb37
-rw-r--r--lib/bundler/vendor/thor/lib/thor/shell.rb2
-rw-r--r--lib/bundler/vendor/thor/lib/thor/shell/basic.rb35
-rw-r--r--lib/bundler/vendor/thor/lib/thor/shell/color.rb6
-rw-r--r--lib/bundler/vendor/thor/lib/thor/util.rb2
-rw-r--r--lib/bundler/vendor/thor/lib/thor/version.rb2
-rw-r--r--lib/bundler/vendor/tsort/lib/tsort.rb452
-rw-r--r--lib/bundler/vendor/uri/lib/uri.rb6
-rw-r--r--lib/bundler/vendor/uri/lib/uri/common.rb167
-rw-r--r--lib/bundler/vendor/uri/lib/uri/file.rb8
-rw-r--r--lib/bundler/vendor/uri/lib/uri/ftp.rb4
-rw-r--r--lib/bundler/vendor/uri/lib/uri/generic.rb45
-rw-r--r--lib/bundler/vendor/uri/lib/uri/http.rb43
-rw-r--r--lib/bundler/vendor/uri/lib/uri/https.rb4
-rw-r--r--lib/bundler/vendor/uri/lib/uri/ldap.rb4
-rw-r--r--lib/bundler/vendor/uri/lib/uri/ldaps.rb3
-rw-r--r--lib/bundler/vendor/uri/lib/uri/mailto.rb5
-rw-r--r--lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb39
-rw-r--r--lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb30
-rw-r--r--lib/bundler/vendor/uri/lib/uri/version.rb2
-rw-r--r--lib/bundler/vendor/uri/lib/uri/ws.rb83
-rw-r--r--lib/bundler/vendor/uri/lib/uri/wss.rb23
-rw-r--r--lib/bundler/vendored_molinillo.rb4
-rw-r--r--lib/bundler/vendored_persistent.rb41
-rw-r--r--lib/bundler/vendored_pub_grub.rb4
-rw-r--r--lib/bundler/vendored_tsort.rb4
-rw-r--r--lib/bundler/version.rb6
-rw-r--r--lib/bundler/version_ranges.rb122
-rw-r--r--lib/bundler/worker.rb37
-rw-r--r--lib/bundler/yaml_serializer.rb2
-rw-r--r--lib/cgi.rb3
-rw-r--r--lib/cgi/cgi.gemspec39
-rw-r--r--lib/cgi/cookie.rb50
-rw-r--r--lib/cgi/core.rb45
-rw-r--r--lib/cgi/session.rb58
-rw-r--r--lib/cgi/session/pstore.rb16
-rw-r--r--lib/cgi/util.rb75
-rw-r--r--lib/cgi/version.rb3
-rw-r--r--lib/csv.rb2544
-rw-r--r--lib/csv/csv.gemspec52
-rw-r--r--lib/csv/fields_converter.rb15
-rw-r--r--lib/csv/input_record_separator.rb18
-rw-r--r--lib/csv/parser.rb359
-rw-r--r--lib/csv/row.rb633
-rw-r--r--lib/csv/table.rb881
-rw-r--r--lib/csv/version.rb2
-rw-r--r--lib/csv/writer.rb62
-rw-r--r--lib/debug.rb1106
-rw-r--r--lib/delegate.rb38
-rw-r--r--lib/delegate/delegate.gemspec22
-rw-r--r--lib/delegate/version.rb3
-rw-r--r--lib/did_you_mean.rb63
-rw-r--r--lib/did_you_mean/core_ext/name_error.rb54
-rw-r--r--lib/did_you_mean/experimental/initializer_name_correction.rb20
-rw-r--r--lib/did_you_mean/experimental/ivar_name_correction.rb76
-rw-r--r--lib/did_you_mean/formatter.rb44
-rw-r--r--lib/did_you_mean/formatters/plain_formatter.rb35
-rw-r--r--lib/did_you_mean/formatters/verbose_formatter.rb49
-rw-r--r--lib/did_you_mean/spell_checker.rb18
-rw-r--r--lib/did_you_mean/spell_checkers/method_name_checker.rb17
-rw-r--r--lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb5
-rw-r--r--lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb20
-rw-r--r--lib/did_you_mean/spell_checkers/require_path_checker.rb39
-rw-r--r--lib/did_you_mean/tree_spell_checker.rb150
-rw-r--r--lib/did_you_mean/verbose.rb6
-rw-r--r--lib/did_you_mean/version.rb2
-rw-r--r--lib/drb/drb.gemspec43
-rw-r--r--lib/drb/drb.rb22
-rw-r--r--lib/drb/extserv.rb4
-rw-r--r--lib/drb/extservm.rb6
-rw-r--r--lib/drb/observer.rb2
-rw-r--r--lib/drb/ssl.rb2
-rw-r--r--lib/drb/version.rb3
-rw-r--r--lib/erb.gemspec38
-rw-r--r--lib/erb.rb595
-rw-r--r--lib/erb/compiler.rb471
-rw-r--r--lib/erb/def_method.rb46
-rw-r--r--lib/erb/util.rb62
-rw-r--r--lib/erb/version.rb5
-rw-r--r--lib/error_highlight.rb2
-rw-r--r--lib/error_highlight/base.rb514
-rw-r--r--lib/error_highlight/core_ext.rb47
-rw-r--r--lib/error_highlight/error_highlight.gemspec27
-rw-r--r--lib/error_highlight/formatter.rb23
-rw-r--r--lib/error_highlight/version.rb3
-rw-r--r--lib/fileutils.gemspec4
-rw-r--r--lib/fileutils.rb1758
-rw-r--r--lib/find.gemspec24
-rw-r--r--lib/find.rb4
-rw-r--r--lib/forwardable.rb13
-rw-r--r--lib/forwardable/forwardable.gemspec23
-rw-r--r--lib/forwardable/impl.rb3
-rw-r--r--lib/forwardable/version.rb5
-rw-r--r--lib/getoptlong.rb576
-rw-r--r--lib/getoptlong/getoptlong.gemspec21
-rw-r--r--lib/getoptlong/version.rb3
-rw-r--r--lib/ipaddr.gemspec28
-rw-r--r--lib/ipaddr.rb143
-rw-r--r--lib/irb.rb326
-rw-r--r--lib/irb/.document1
-rw-r--r--lib/irb/cmd/backtrace.rb21
-rw-r--r--lib/irb/cmd/break.rb21
-rw-r--r--lib/irb/cmd/catch.rb21
-rw-r--r--lib/irb/cmd/chws.rb12
-rw-r--r--lib/irb/cmd/continue.rb17
-rw-r--r--lib/irb/cmd/debug.rb136
-rw-r--r--lib/irb/cmd/delete.rb17
-rw-r--r--lib/irb/cmd/edit.rb61
-rw-r--r--lib/irb/cmd/finish.rb17
-rw-r--r--lib/irb/cmd/fork.rb11
-rw-r--r--lib/irb/cmd/help.rb23
-rw-r--r--lib/irb/cmd/info.rb21
-rw-r--r--lib/irb/cmd/irb_info.rb37
-rw-r--r--lib/irb/cmd/load.rb39
-rw-r--r--lib/irb/cmd/ls.rb116
-rw-r--r--lib/irb/cmd/measure.rb48
-rw-r--r--lib/irb/cmd/next.rb17
-rw-r--r--lib/irb/cmd/nop.rb42
-rw-r--r--lib/irb/cmd/pushws.rb16
-rw-r--r--lib/irb/cmd/show_cmds.rb39
-rw-r--r--lib/irb/cmd/show_source.rb112
-rw-r--r--lib/irb/cmd/step.rb17
-rw-r--r--lib/irb/cmd/subirb.rb44
-rw-r--r--lib/irb/cmd/whereami.rb25
-rw-r--r--lib/irb/color.rb121
-rw-r--r--lib/irb/color_printer.rb50
-rw-r--r--lib/irb/completion.rb266
-rw-r--r--lib/irb/context.rb159
-rw-r--r--lib/irb/easter-egg.rb138
-rw-r--r--lib/irb/ext/change-ws.rb1
-rw-r--r--lib/irb/ext/history.rb2
-rw-r--r--lib/irb/ext/loader.rb66
-rw-r--r--lib/irb/ext/multi-irb.rb1
-rw-r--r--lib/irb/ext/save-history.rb29
-rw-r--r--lib/irb/ext/tracer.rb1
-rw-r--r--lib/irb/ext/use-loader.rb4
-rw-r--r--lib/irb/ext/workspaces.rb1
-rw-r--r--lib/irb/extend-command.rb207
-rw-r--r--lib/irb/help.rb1
-rw-r--r--lib/irb/init.rb162
-rw-r--r--lib/irb/input-method.rb216
-rw-r--r--lib/irb/inspector.rb28
-rw-r--r--lib/irb/irb.gemspec57
-rw-r--r--lib/irb/lc/.document4
-rw-r--r--lib/irb/lc/error.rb11
-rw-r--r--lib/irb/lc/help-message95
-rw-r--r--lib/irb/lc/ja/encoding_aliases.rb6
-rw-r--r--lib/irb/lc/ja/error.rb11
-rw-r--r--lib/irb/lc/ja/help-message14
-rw-r--r--lib/irb/locale.rb11
-rw-r--r--lib/irb/ruby-lex.rb654
-rw-r--r--lib/irb/ruby_logo.aa1
-rw-r--r--lib/irb/version.rb4
-rw-r--r--lib/irb/workspace.rb27
-rw-r--r--lib/irb/xmp.rb2
-rw-r--r--lib/logger.rb776
-rw-r--r--lib/logger/errors.rb2
-rw-r--r--lib/logger/formatter.rb8
-rw-r--r--lib/logger/log_device.rb8
-rw-r--r--lib/logger/logger.gemspec7
-rw-r--r--lib/logger/version.rb2
-rw-r--r--lib/matrix.rb2407
-rw-r--r--lib/matrix/eigenvalue_decomposition.rb882
-rw-r--r--lib/matrix/lup_decomposition.rb219
-rw-r--r--lib/matrix/matrix.gemspec28
-rw-r--r--lib/matrix/version.rb5
-rw-r--r--lib/mkmf.rb249
-rw-r--r--lib/mutex_m.gemspec4
-rw-r--r--lib/mutex_m.rb16
-rw-r--r--lib/net/ftp.rb1533
-rw-r--r--lib/net/http.rb2143
-rw-r--r--lib/net/http/backward.rb40
-rw-r--r--lib/net/http/exceptions.rb55
-rw-r--r--lib/net/http/generic_request.rb117
-rw-r--r--lib/net/http/header.rb759
-rw-r--r--lib/net/http/net-http.gemspec39
-rw-r--r--lib/net/http/proxy_delta.rb2
-rw-r--r--lib/net/http/request.rb79
-rw-r--r--lib/net/http/requests.rb352
-rw-r--r--lib/net/http/response.rb372
-rw-r--r--lib/net/http/responses.rb1313
-rw-r--r--lib/net/http/status.rb13
-rw-r--r--lib/net/https.rb2
-rw-r--r--lib/net/imap.rb3727
-rw-r--r--lib/net/net-protocol.gemspec33
-rw-r--r--lib/net/pop.rb1023
-rw-r--r--lib/net/pop/net-pop.gemspec27
-rw-r--r--lib/net/pop/version.rb6
-rw-r--r--lib/net/protocol.rb86
-rw-r--r--lib/net/smtp.rb1072
-rw-r--r--lib/net/smtp/net-smtp.gemspec27
-rw-r--r--lib/net/smtp/version.rb6
-rw-r--r--lib/observer.rb27
-rw-r--r--lib/observer/observer.gemspec19
-rw-r--r--lib/observer/version.rb3
-rw-r--r--lib/open-uri.gemspec25
-rw-r--r--lib/open-uri.rb71
-rw-r--r--lib/open3.rb12
-rw-r--r--lib/open3/open3.gemspec20
-rw-r--r--lib/open3/version.rb2
-rw-r--r--lib/optparse.rb285
-rw-r--r--lib/optparse/ac.rb2
-rw-r--r--lib/optparse/date.rb2
-rw-r--r--lib/optparse/kwargs.rb7
-rw-r--r--lib/optparse/optparse.gemspec30
-rw-r--r--lib/optparse/shellwords.rb2
-rw-r--r--lib/optparse/time.rb2
-rw-r--r--lib/optparse/uri.rb2
-rw-r--r--lib/ostruct.rb274
-rw-r--r--lib/ostruct/ostruct.gemspec21
-rw-r--r--lib/ostruct/version.rb5
-rw-r--r--lib/pp.gemspec27
-rw-r--r--lib/pp.rb130
-rw-r--r--lib/prettyprint.gemspec22
-rw-r--r--lib/prettyprint.rb6
-rw-r--r--lib/prime.gemspec27
-rw-r--r--lib/prime.rb463
-rw-r--r--lib/pstore.rb578
-rw-r--r--lib/pstore/pstore.gemspec19
-rw-r--r--lib/pstore/version.rb3
-rw-r--r--lib/racc/compat.rb9
-rw-r--r--lib/racc/debugflags.rb9
-rw-r--r--lib/racc/exception.rb5
-rw-r--r--lib/racc/grammar.rb45
-rw-r--r--lib/racc/grammarfileparser.rb17
-rw-r--r--lib/racc/info.rb7
-rw-r--r--lib/racc/iset.rb9
-rw-r--r--lib/racc/logfilegenerator.rb9
-rw-r--r--lib/racc/parser-text.rb28
-rw-r--r--lib/racc/parser.rb28
-rw-r--r--lib/racc/parserfilegenerator.rb52
-rw-r--r--lib/racc/pre-setup13
-rw-r--r--lib/racc/racc.gemspec103
-rw-r--r--lib/racc/rdoc/grammar.en.rdoc219
-rw-r--r--lib/racc/sourcetext.rb9
-rw-r--r--lib/racc/state.rb5
-rw-r--r--lib/racc/statetransitiontable.rb25
-rw-r--r--lib/random/formatter.rb245
-rw-r--r--lib/rdoc.rb113
-rw-r--r--lib/rdoc/any_method.rb60
-rw-r--r--lib/rdoc/code_objects.rb3
-rw-r--r--lib/rdoc/context.rb16
-rw-r--r--lib/rdoc/context/section.rb15
-rw-r--r--lib/rdoc/cross_reference.rb66
-rw-r--r--lib/rdoc/erb_partial.rb2
-rw-r--r--lib/rdoc/erbio.rb4
-rw-r--r--lib/rdoc/generator.rb10
-rw-r--r--lib/rdoc/generator/darkfish.rb10
-rw-r--r--lib/rdoc/generator/markup.rb2
-rw-r--r--lib/rdoc/generator/pot.rb6
-rw-r--r--lib/rdoc/generator/template/darkfish/_head.rhtml27
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml4
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml32
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml14
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml4
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml14
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml12
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml10
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml32
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml10
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml8
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml33
-rw-r--r--lib/rdoc/generator/template/darkfish/class.rhtml114
-rw-r--r--lib/rdoc/generator/template/darkfish/css/rdoc.css47
-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttfbin71200 -> 138268 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttfbin71692 -> 138680 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/index.rhtml9
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js2
-rw-r--r--lib/rdoc/generator/template/darkfish/js/search.js2
-rw-r--r--lib/rdoc/generator/template/darkfish/servlet_root.rhtml31
-rw-r--r--lib/rdoc/generator/template/darkfish/table_of_contents.rhtml36
-rw-r--r--lib/rdoc/i18n.rb4
-rw-r--r--lib/rdoc/known_classes.rb9
-rw-r--r--lib/rdoc/markdown.rb786
-rw-r--r--lib/rdoc/markdown/literals.rb122
-rw-r--r--lib/rdoc/markup.rb701
-rw-r--r--lib/rdoc/markup/attr_span.rb10
-rw-r--r--lib/rdoc/markup/attribute_manager.rb125
-rw-r--r--lib/rdoc/markup/formatter.rb2
-rw-r--r--lib/rdoc/markup/parser.rb18
-rw-r--r--lib/rdoc/markup/pre_process.rb4
-rw-r--r--lib/rdoc/markup/table.rb47
-rw-r--r--lib/rdoc/markup/to_html.rb78
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb18
-rw-r--r--lib/rdoc/markup/to_joined_paragraph.rb1
-rw-r--r--lib/rdoc/markup/to_label.rb2
-rw-r--r--lib/rdoc/markup/to_rdoc.rb51
-rw-r--r--lib/rdoc/markup/to_table_of_contents.rb1
-rw-r--r--lib/rdoc/method_attr.rb2
-rw-r--r--lib/rdoc/normal_class.rb2
-rw-r--r--lib/rdoc/normal_module.rb2
-rw-r--r--lib/rdoc/options.rb118
-rw-r--r--lib/rdoc/parser.rb35
-rw-r--r--lib/rdoc/parser/c.rb300
-rw-r--r--lib/rdoc/parser/changelog.rb159
-rw-r--r--lib/rdoc/parser/ruby.rb53
-rw-r--r--lib/rdoc/rd.rb7
-rw-r--r--lib/rdoc/rd/block_parser.rb22
-rw-r--r--lib/rdoc/rd/inline_parser.rb2
-rw-r--r--lib/rdoc/rdoc.gemspec25
-rw-r--r--lib/rdoc/rdoc.rb91
-rw-r--r--lib/rdoc/ri.rb9
-rw-r--r--lib/rdoc/ri/driver.rb114
-rw-r--r--lib/rdoc/ri/paths.rb20
-rw-r--r--lib/rdoc/ri/task.rb2
-rw-r--r--lib/rdoc/rubygems_hook.rb10
-rw-r--r--lib/rdoc/servlet.rb9
-rw-r--r--lib/rdoc/single_class.rb5
-rw-r--r--lib/rdoc/stats.rb7
-rw-r--r--lib/rdoc/store.rb49
-rw-r--r--lib/rdoc/task.rb6
-rw-r--r--lib/rdoc/text.rb16
-rw-r--r--lib/rdoc/version.rb4
-rw-r--r--lib/readline.gemspec28
-rw-r--r--lib/readline.rb1
-rw-r--r--lib/reline.rb311
-rw-r--r--lib/reline/ansi.rb285
-rw-r--r--lib/reline/config.rb155
-rw-r--r--lib/reline/general_io.rb46
-rw-r--r--lib/reline/history.rb46
-rw-r--r--lib/reline/key_actor/base.rb12
-rw-r--r--lib/reline/key_actor/emacs.rb16
-rw-r--r--lib/reline/key_actor/vi_command.rb8
-rw-r--r--lib/reline/key_actor/vi_insert.rb4
-rw-r--r--lib/reline/key_stroke.rb80
-rw-r--r--lib/reline/kill_ring.rb12
-rw-r--r--lib/reline/line_editor.rb1949
-rw-r--r--lib/reline/reline.gemspec17
-rw-r--r--lib/reline/terminfo.rb174
-rw-r--r--lib/reline/unicode.rb176
-rw-r--r--lib/reline/unicode/east_asian_width.rb2279
-rw-r--r--lib/reline/version.rb2
-rw-r--r--lib/reline/windows.rb459
-rw-r--r--lib/resolv-replace.gemspec22
-rw-r--r--lib/resolv.gemspec22
-rw-r--r--lib/resolv.rb38
-rw-r--r--lib/rexml/attlistdecl.rb63
-rw-r--r--lib/rexml/attribute.rb205
-rw-r--r--lib/rexml/cdata.rb68
-rw-r--r--lib/rexml/child.rb97
-rw-r--r--lib/rexml/comment.rb80
-rw-r--r--lib/rexml/doctype.rb287
-rw-r--r--lib/rexml/document.rb291
-rw-r--r--lib/rexml/dtd/attlistdecl.rb11
-rw-r--r--lib/rexml/dtd/dtd.rb47
-rw-r--r--lib/rexml/dtd/elementdecl.rb18
-rw-r--r--lib/rexml/dtd/entitydecl.rb57
-rw-r--r--lib/rexml/dtd/notationdecl.rb40
-rw-r--r--lib/rexml/element.rb1269
-rw-r--r--lib/rexml/encoding.rb51
-rw-r--r--lib/rexml/entity.rb171
-rw-r--r--lib/rexml/formatters/default.rb116
-rw-r--r--lib/rexml/formatters/pretty.rb142
-rw-r--r--lib/rexml/formatters/transitive.rb58
-rw-r--r--lib/rexml/functions.rb447
-rw-r--r--lib/rexml/instruction.rb79
-rw-r--r--lib/rexml/light/node.rb196
-rw-r--r--lib/rexml/namespace.rb59
-rw-r--r--lib/rexml/node.rb76
-rw-r--r--lib/rexml/output.rb30
-rw-r--r--lib/rexml/parent.rb166
-rw-r--r--lib/rexml/parseexception.rb52
-rw-r--r--lib/rexml/parsers/baseparser.rb594
-rw-r--r--lib/rexml/parsers/lightparser.rb59
-rw-r--r--lib/rexml/parsers/pullparser.rb197
-rw-r--r--lib/rexml/parsers/sax2parser.rb273
-rw-r--r--lib/rexml/parsers/streamparser.rb61
-rw-r--r--lib/rexml/parsers/treeparser.rb101
-rw-r--r--lib/rexml/parsers/ultralightparser.rb57
-rw-r--r--lib/rexml/parsers/xpathparser.rb675
-rw-r--r--lib/rexml/quickpath.rb266
-rw-r--r--lib/rexml/rexml.gemspec84
-rw-r--r--lib/rexml/rexml.rb32
-rw-r--r--lib/rexml/sax2listener.rb98
-rw-r--r--lib/rexml/security.rb28
-rw-r--r--lib/rexml/source.rb298
-rw-r--r--lib/rexml/streamlistener.rb93
-rw-r--r--lib/rexml/text.rb424
-rw-r--r--lib/rexml/undefinednamespaceexception.rb9
-rw-r--r--lib/rexml/validation/relaxng.rb539
-rw-r--r--lib/rexml/validation/validation.rb144
-rw-r--r--lib/rexml/validation/validationexception.rb10
-rw-r--r--lib/rexml/xmldecl.rb130
-rw-r--r--lib/rexml/xmltokens.rb85
-rw-r--r--lib/rexml/xpath.rb81
-rw-r--r--lib/rexml/xpath_parser.rb968
-rw-r--r--lib/rinda/rinda.gemspec28
-rw-r--r--lib/rss.rb94
-rw-r--r--lib/rss/0.9.rb462
-rw-r--r--lib/rss/1.0.rb485
-rw-r--r--lib/rss/2.0.rb143
-rw-r--r--lib/rss/atom.rb1025
-rw-r--r--lib/rss/content.rb34
-rw-r--r--lib/rss/content/1.0.rb10
-rw-r--r--lib/rss/content/2.0.rb12
-rw-r--r--lib/rss/converter.rb171
-rw-r--r--lib/rss/dublincore.rb164
-rw-r--r--lib/rss/dublincore/1.0.rb13
-rw-r--r--lib/rss/dublincore/2.0.rb13
-rw-r--r--lib/rss/dublincore/atom.rb17
-rw-r--r--lib/rss/image.rb198
-rw-r--r--lib/rss/itunes.rb425
-rw-r--r--lib/rss/maker.rb79
-rw-r--r--lib/rss/maker/0.9.rb509
-rw-r--r--lib/rss/maker/1.0.rb436
-rw-r--r--lib/rss/maker/2.0.rb224
-rw-r--r--lib/rss/maker/atom.rb173
-rw-r--r--lib/rss/maker/base.rb945
-rw-r--r--lib/rss/maker/content.rb22
-rw-r--r--lib/rss/maker/dublincore.rb122
-rw-r--r--lib/rss/maker/entry.rb164
-rw-r--r--lib/rss/maker/feed.rb427
-rw-r--r--lib/rss/maker/image.rb112
-rw-r--r--lib/rss/maker/itunes.rb243
-rw-r--r--lib/rss/maker/slash.rb34
-rw-r--r--lib/rss/maker/syndication.rb19
-rw-r--r--lib/rss/maker/taxonomy.rb119
-rw-r--r--lib/rss/maker/trackback.rb62
-rw-r--r--lib/rss/parser.rb589
-rw-r--r--lib/rss/rexmlparser.rb50
-rw-r--r--lib/rss/rss.gemspec80
-rw-r--r--lib/rss/rss.rb1342
-rw-r--r--lib/rss/slash.rb52
-rw-r--r--lib/rss/syndication.rb69
-rw-r--r--lib/rss/taxonomy.rb148
-rw-r--r--lib/rss/trackback.rb291
-rw-r--r--lib/rss/utils.rb200
-rw-r--r--lib/rss/version.rb4
-rw-r--r--lib/rss/xml-stylesheet.rb106
-rw-r--r--lib/rss/xml.rb72
-rw-r--r--lib/rss/xmlparser.rb95
-rw-r--r--lib/rss/xmlscanner.rb122
-rw-r--r--lib/ruby2_keywords.gemspec23
-rw-r--r--lib/ruby_vm/mjit/c_pointer.rb329
-rw-r--r--lib/ruby_vm/mjit/c_type.rb91
-rw-r--r--lib/ruby_vm/mjit/compiler.rb952
-rw-r--r--lib/ruby_vm/mjit/hooks.rb32
-rw-r--r--lib/rubygems.rb567
-rw-r--r--lib/rubygems/available_set.rb17
-rw-r--r--lib/rubygems/basic_specification.rb47
-rw-r--r--lib/rubygems/bundler_version_finder.rb85
-rw-r--r--lib/rubygems/command.rb118
-rw-r--r--lib/rubygems/command_manager.rb57
-rw-r--r--lib/rubygems/commands/build_command.rb78
-rw-r--r--lib/rubygems/commands/cert_command.rb154
-rw-r--r--lib/rubygems/commands/check_command.rb43
-rw-r--r--lib/rubygems/commands/cleanup_command.rb57
-rw-r--r--lib/rubygems/commands/contents_command.rb35
-rw-r--r--lib/rubygems/commands/dependency_command.rb91
-rw-r--r--lib/rubygems/commands/environment_command.rb22
-rw-r--r--lib/rubygems/commands/exec_command.rb249
-rw-r--r--lib/rubygems/commands/fetch_command.rb50
-rw-r--r--lib/rubygems/commands/generate_index_command.rb37
-rw-r--r--lib/rubygems/commands/help_command.rb21
-rw-r--r--lib/rubygems/commands/info_command.rb17
-rw-r--r--lib/rubygems/commands/install_command.rb67
-rw-r--r--lib/rubygems/commands/list_command.rb18
-rw-r--r--lib/rubygems/commands/lock_command.rb13
-rw-r--r--lib/rubygems/commands/mirror_command.rb9
-rw-r--r--lib/rubygems/commands/open_command.rb25
-rw-r--r--lib/rubygems/commands/outdated_command.rb13
-rw-r--r--lib/rubygems/commands/owner_command.rb49
-rw-r--r--lib/rubygems/commands/pristine_command.rb120
-rw-r--r--lib/rubygems/commands/push_command.rb82
-rw-r--r--lib/rubygems/commands/query_command.rb373
-rw-r--r--lib/rubygems/commands/rdoc_command.rb54
-rw-r--r--lib/rubygems/commands/search_command.rb17
-rw-r--r--lib/rubygems/commands/server_command.rb90
-rw-r--r--lib/rubygems/commands/setup_command.rb485
-rw-r--r--lib/rubygems/commands/signin_command.rb21
-rw-r--r--lib/rubygems/commands/signout_command.rb17
-rw-r--r--lib/rubygems/commands/sources_command.rb57
-rw-r--r--lib/rubygems/commands/specification_command.rb47
-rw-r--r--lib/rubygems/commands/stale_command.rb9
-rw-r--r--lib/rubygems/commands/uninstall_command.rb90
-rw-r--r--lib/rubygems/commands/unpack_command.rb31
-rw-r--r--lib/rubygems/commands/update_command.rb201
-rw-r--r--lib/rubygems/commands/which_command.rb17
-rw-r--r--lib/rubygems/commands/yank_command.rb36
-rw-r--r--lib/rubygems/compatibility.rb6
-rw-r--r--lib/rubygems/config_file.rb102
-rw-r--r--lib/rubygems/core_ext/kernel_gem.rb7
-rw-r--r--lib/rubygems/core_ext/kernel_require.rb225
-rw-r--r--lib/rubygems/core_ext/kernel_warn.rb67
-rw-r--r--lib/rubygems/core_ext/tcpsocket_init.rb54
-rw-r--r--lib/rubygems/defaults.rb159
-rw-r--r--lib/rubygems/dependency.rb47
-rw-r--r--lib/rubygems/dependency_installer.rb159
-rw-r--r--lib/rubygems/dependency_list.rb29
-rw-r--r--lib/rubygems/deprecate.rb111
-rw-r--r--lib/rubygems/doctor.rb45
-rw-r--r--lib/rubygems/errors.rb28
-rw-r--r--lib/rubygems/exceptions.rb81
-rw-r--r--lib/rubygems/ext.rb14
-rw-r--r--lib/rubygems/ext/build_error.rb3
-rw-r--r--lib/rubygems/ext/builder.rb118
-rw-r--r--lib/rubygems/ext/cargo_builder.rb360
-rw-r--r--lib/rubygems/ext/cargo_builder/link_flag_converter.rb27
-rw-r--r--lib/rubygems/ext/cmake_builder.rb15
-rw-r--r--lib/rubygems/ext/configure_builder.rb14
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb110
-rw-r--r--lib/rubygems/ext/rake_builder.rb21
-rw-r--r--lib/rubygems/gem_runner.rb42
-rw-r--r--lib/rubygems/gemcutter_utilities.rb242
-rw-r--r--lib/rubygems/gemcutter_utilities/webauthn_listener.rb105
-rw-r--r--lib/rubygems/gemcutter_utilities/webauthn_listener/response.rb163
-rw-r--r--lib/rubygems/gemcutter_utilities/webauthn_poller.rb78
-rw-r--r--lib/rubygems/indexer.rb82
-rw-r--r--lib/rubygems/install_default_message.rb5
-rw-r--r--lib/rubygems/install_message.rb5
-rw-r--r--lib/rubygems/install_update_options.rb138
-rw-r--r--lib/rubygems/installer.rb373
-rw-r--r--lib/rubygems/installer_test_case.rb233
-rw-r--r--lib/rubygems/installer_uninstaller_utils.rb29
-rw-r--r--lib/rubygems/local_remote_options.rb47
-rw-r--r--lib/rubygems/mock_gem_ui.rb11
-rw-r--r--lib/rubygems/name_tuple.rb24
-rw-r--r--lib/rubygems/openssl.rb7
-rw-r--r--lib/rubygems/optparse.rb3
-rw-r--r--lib/rubygems/optparse/.document1
-rw-r--r--lib/rubygems/optparse/lib/optionparser.rb2
-rw-r--r--lib/rubygems/optparse/lib/optparse.rb2308
-rw-r--r--lib/rubygems/optparse/lib/optparse/ac.rb54
-rw-r--r--lib/rubygems/optparse/lib/optparse/date.rb18
-rw-r--r--lib/rubygems/optparse/lib/optparse/kwargs.rb22
-rw-r--r--lib/rubygems/optparse/lib/optparse/shellwords.rb7
-rw-r--r--lib/rubygems/optparse/lib/optparse/time.rb11
-rw-r--r--lib/rubygems/optparse/lib/optparse/uri.rb7
-rw-r--r--lib/rubygems/optparse/lib/optparse/version.rb71
-rw-r--r--lib/rubygems/package.rb233
-rw-r--r--lib/rubygems/package/digest_io.rb3
-rw-r--r--lib/rubygems/package/file_source.rb7
-rw-r--r--lib/rubygems/package/io_source.rb7
-rw-r--r--lib/rubygems/package/old.rb21
-rw-r--r--lib/rubygems/package/source.rb1
-rw-r--r--lib/rubygems/package/tar_header.rb133
-rw-r--r--lib/rubygems/package/tar_reader.rb34
-rw-r--r--lib/rubygems/package/tar_reader/entry.rb101
-rw-r--r--lib/rubygems/package/tar_test_case.rb141
-rw-r--r--lib/rubygems/package/tar_writer.rb27
-rw-r--r--lib/rubygems/package_task.rb17
-rw-r--r--lib/rubygems/path_support.rb12
-rw-r--r--lib/rubygems/platform.rb188
-rw-r--r--lib/rubygems/psych_additions.rb10
-rw-r--r--lib/rubygems/psych_tree.rb5
-rw-r--r--lib/rubygems/query_utils.rb351
-rw-r--r--lib/rubygems/rdoc.rb15
-rw-r--r--lib/rubygems/remote_fetcher.rb123
-rw-r--r--lib/rubygems/request.rb58
-rw-r--r--lib/rubygems/request/connection_pools.rb16
-rw-r--r--lib/rubygems/request/http_pool.rb7
-rw-r--r--lib/rubygems/request/https_pool.rb3
-rw-r--r--lib/rubygems/request_set.rb72
-rw-r--r--lib/rubygems/request_set/gem_dependency_api.rb260
-rw-r--r--lib/rubygems/request_set/lockfile.rb39
-rw-r--r--lib/rubygems/request_set/lockfile/parser.rb57
-rw-r--r--lib/rubygems/request_set/lockfile/tokenizer.rb12
-rw-r--r--lib/rubygems/requirement.rb79
-rw-r--r--lib/rubygems/resolver.rb105
-rw-r--r--lib/rubygems/resolver/activation_request.rb19
-rw-r--r--lib/rubygems/resolver/api_set.rb60
-rw-r--r--lib/rubygems/resolver/api_set/gem_parser.rb20
-rw-r--r--lib/rubygems/resolver/api_specification.rb47
-rw-r--r--lib/rubygems/resolver/best_set.rb17
-rw-r--r--lib/rubygems/resolver/composed_set.rb9
-rw-r--r--lib/rubygems/resolver/conflict.rb27
-rw-r--r--lib/rubygems/resolver/current_set.rb3
-rw-r--r--lib/rubygems/resolver/dependency_request.rb9
-rw-r--r--lib/rubygems/resolver/git_set.rb7
-rw-r--r--lib/rubygems/resolver/git_specification.rb15
-rw-r--r--lib/rubygems/resolver/index_set.rb11
-rw-r--r--lib/rubygems/resolver/index_specification.rb46
-rw-r--r--lib/rubygems/resolver/installed_specification.rb11
-rw-r--r--lib/rubygems/resolver/installer_set.rb95
-rw-r--r--lib/rubygems/resolver/local_specification.rb7
-rw-r--r--lib/rubygems/resolver/lock_set.rb15
-rw-r--r--lib/rubygems/resolver/lock_specification.rb11
-rw-r--r--lib/rubygems/resolver/molinillo.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo.rb11
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb7
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb8
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb51
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb1
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb13
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb7
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb63
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb90
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb3
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb14
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb4
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb675
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb5
-rw-r--r--lib/rubygems/resolver/molinillo/lib/molinillo/state.rb12
-rw-r--r--lib/rubygems/resolver/requirement_list.rb3
-rw-r--r--lib/rubygems/resolver/set.rb4
-rw-r--r--lib/rubygems/resolver/source_set.rb4
-rw-r--r--lib/rubygems/resolver/spec_specification.rb17
-rw-r--r--lib/rubygems/resolver/specification.rb19
-rw-r--r--lib/rubygems/resolver/stats.rb5
-rw-r--r--lib/rubygems/resolver/vendor_set.rb5
-rw-r--r--lib/rubygems/resolver/vendor_specification.rb9
-rw-r--r--lib/rubygems/s3_uri_signer.rb28
-rw-r--r--lib/rubygems/safe_yaml.rb32
-rw-r--r--lib/rubygems/security.rb160
-rw-r--r--lib/rubygems/security/policies.rb95
-rw-r--r--lib/rubygems/security/policy.rb55
-rw-r--r--lib/rubygems/security/signer.rb30
-rw-r--r--lib/rubygems/security/trust_dir.rb12
-rw-r--r--lib/rubygems/security_option.rb15
-rw-r--r--lib/rubygems/server.rb879
-rw-r--r--lib/rubygems/shellwords.rb3
-rw-r--r--lib/rubygems/source.rb82
-rw-r--r--lib/rubygems/source/git.rb62
-rw-r--r--lib/rubygems/source/installed.rb5
-rw-r--r--lib/rubygems/source/local.rb11
-rw-r--r--lib/rubygems/source/lock.rb3
-rw-r--r--lib/rubygems/source/specific_file.rb5
-rw-r--r--lib/rubygems/source/vendor.rb3
-rw-r--r--lib/rubygems/source_list.rb25
-rw-r--r--lib/rubygems/source_local.rb7
-rw-r--r--lib/rubygems/source_specific_file.rb6
-rw-r--r--lib/rubygems/spec_fetcher.rb98
-rw-r--r--lib/rubygems/specification.rb761
-rw-r--r--lib/rubygems/specification_policy.rb204
-rw-r--r--lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem23
-rw-r--r--lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem25
-rw-r--r--lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem (renamed from lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem)0
-rw-r--r--lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem21
-rw-r--r--lib/rubygems/stub_specification.rb59
-rw-r--r--lib/rubygems/syck_hack.rb79
-rw-r--r--lib/rubygems/test_case.rb1537
-rw-r--r--lib/rubygems/test_utilities.rb380
-rw-r--r--lib/rubygems/text.rb43
-rw-r--r--lib/rubygems/tsort.rb3
-rw-r--r--lib/rubygems/tsort/.document1
-rw-r--r--lib/rubygems/tsort/lib/tsort.rb452
-rw-r--r--lib/rubygems/uninstaller.rb144
-rw-r--r--lib/rubygems/unknown_command_spell_checker.rb21
-rw-r--r--lib/rubygems/update_suggestion.rb69
-rw-r--r--lib/rubygems/uri.rb126
-rw-r--r--lib/rubygems/uri_formatter.rb5
-rw-r--r--lib/rubygems/uri_parser.rb36
-rw-r--r--lib/rubygems/uri_parsing.rb23
-rw-r--r--lib/rubygems/user_interaction.rb103
-rw-r--r--lib/rubygems/util.rb45
-rw-r--r--lib/rubygems/util/licenses.rb126
-rw-r--r--lib/rubygems/util/list.rb3
-rw-r--r--lib/rubygems/validator.rb17
-rw-r--r--lib/rubygems/version.rb53
-rw-r--r--lib/rubygems/version_option.rb17
-rw-r--r--lib/securerandom.gemspec22
-rw-r--r--lib/securerandom.rb272
-rw-r--r--lib/set.rb624
-rw-r--r--lib/set/set.gemspec23
-rw-r--r--lib/set/sorted_set.rb6
-rw-r--r--lib/shellwords.gemspec22
-rw-r--r--lib/shellwords.rb39
-rw-r--r--lib/singleton.rb4
-rw-r--r--lib/singleton/singleton.gemspec19
-rw-r--r--lib/singleton/version.rb3
-rw-r--r--lib/syntax_suggest.rb3
-rw-r--r--lib/syntax_suggest/api.rb201
-rw-r--r--lib/syntax_suggest/around_block_scan.rb232
-rw-r--r--lib/syntax_suggest/block_expand.rb165
-rw-r--r--lib/syntax_suggest/capture/before_after_keyword_ends.rb85
-rw-r--r--lib/syntax_suggest/capture/falling_indent_lines.rb71
-rw-r--r--lib/syntax_suggest/capture_code_context.rb245
-rw-r--r--lib/syntax_suggest/clean_document.rb306
-rw-r--r--lib/syntax_suggest/cli.rb130
-rw-r--r--lib/syntax_suggest/code_block.rb100
-rw-r--r--lib/syntax_suggest/code_frontier.rb178
-rw-r--r--lib/syntax_suggest/code_line.rb237
-rw-r--r--lib/syntax_suggest/code_search.rb139
-rw-r--r--lib/syntax_suggest/core_ext.rb114
-rw-r--r--lib/syntax_suggest/display_code_with_line_numbers.rb70
-rw-r--r--lib/syntax_suggest/display_invalid_blocks.rb83
-rw-r--r--lib/syntax_suggest/explain_syntax.rb103
-rw-r--r--lib/syntax_suggest/left_right_lex_count.rb168
-rw-r--r--lib/syntax_suggest/lex_all.rb55
-rw-r--r--lib/syntax_suggest/lex_value.rb70
-rw-r--r--lib/syntax_suggest/parse_blocks_from_indent_line.rb60
-rw-r--r--lib/syntax_suggest/pathname_from_message.rb59
-rw-r--r--lib/syntax_suggest/priority_engulf_queue.rb63
-rw-r--r--lib/syntax_suggest/priority_queue.rb105
-rw-r--r--lib/syntax_suggest/ripper_errors.rb36
-rw-r--r--lib/syntax_suggest/scan_history.rb134
-rw-r--r--lib/syntax_suggest/syntax_suggest.gemspec32
-rw-r--r--lib/syntax_suggest/unvisited_lines.rb36
-rw-r--r--lib/syntax_suggest/version.rb5
-rw-r--r--lib/tempfile.gemspec22
-rw-r--r--lib/tempfile.rb173
-rw-r--r--lib/time.gemspec24
-rw-r--r--lib/time.rb54
-rw-r--r--lib/timeout.rb171
-rw-r--r--lib/timeout/timeout.gemspec25
-rw-r--r--lib/timeout/version.rb3
-rw-r--r--lib/tmpdir.gemspec26
-rw-r--r--lib/tmpdir.rb53
-rw-r--r--lib/tracer.rb291
-rw-r--r--lib/tracer/tracer.gemspec23
-rw-r--r--lib/tracer/version.rb5
-rw-r--r--lib/tsort.gemspec22
-rw-r--r--lib/tsort.rb20
-rw-r--r--lib/un.gemspec24
-rw-r--r--lib/un.rb65
-rw-r--r--lib/unicode_normalize/normalize.rb2
-rw-r--r--lib/unicode_normalize/tables.rb228
-rw-r--r--lib/uri.rb26
-rw-r--r--lib/uri/common.rb169
-rw-r--r--lib/uri/file.rb8
-rw-r--r--lib/uri/ftp.rb4
-rw-r--r--lib/uri/generic.rb60
-rw-r--r--lib/uri/http.rb43
-rw-r--r--lib/uri/https.rb4
-rw-r--r--lib/uri/ldap.rb4
-rw-r--r--lib/uri/ldaps.rb3
-rw-r--r--lib/uri/mailto.rb5
-rw-r--r--lib/uri/rfc2396_parser.rb39
-rw-r--r--lib/uri/rfc3986_parser.rb30
-rw-r--r--lib/uri/uri.gemspec6
-rw-r--r--lib/uri/version.rb2
-rw-r--r--lib/uri/ws.rb83
-rw-r--r--lib/uri/wss.rb23
-rw-r--r--lib/weakref.rb4
-rw-r--r--lib/weakref/weakref.gemspec34
-rw-r--r--lib/webrick.rb227
-rw-r--r--lib/webrick/httpauth/authenticator.rb117
-rw-r--r--lib/webrick/httpproxy.rb350
-rw-r--r--lib/webrick/httprequest.rb631
-rw-r--r--lib/webrick/httpserver.rb294
-rw-r--r--lib/webrick/httpservlet/filehandler.rb541
-rw-r--r--lib/webrick/httputils.rb511
-rw-r--r--lib/webrick/server.rb378
-rw-r--r--lib/webrick/ssl.rb215
-rw-r--r--lib/webrick/utils.rb270
-rw-r--r--lib/webrick/version.rb18
-rw-r--r--lib/webrick/webrick.gemspec76
-rw-r--r--lib/yaml.rb16
-rw-r--r--lib/yaml/store.rb2
-rw-r--r--lib/yaml/yaml.gemspec6
-rwxr-xr-xlibexec/bundle33
-rwxr-xr-xlibexec/bundler2
-rwxr-xr-xlibexec/erb164
-rwxr-xr-xlibexec/racc60
-rwxr-xr-xlibexec/racc2y195
-rwxr-xr-xlibexec/rdoc1
-rwxr-xr-xlibexec/syntax_suggest7
-rwxr-xr-xlibexec/y2racc339
-rw-r--r--load.c1202
-rw-r--r--localeinit.c17
-rw-r--r--main.c28
-rw-r--r--man/bundle-add.166
-rw-r--r--man/bundle-add.1.txt58
-rw-r--r--man/bundle-add.ronn46
-rw-r--r--man/bundle-binstubs.140
-rw-r--r--man/bundle-binstubs.1.txt48
-rw-r--r--man/bundle-binstubs.ronn43
-rw-r--r--man/bundle-cache.155
-rw-r--r--man/bundle-cache.1.txt78
-rw-r--r--man/bundle-cache.ronn72
-rw-r--r--man/bundle-check.131
-rw-r--r--man/bundle-check.1.txt33
-rw-r--r--man/bundle-clean.124
-rw-r--r--man/bundle-clean.1.txt26
-rw-r--r--man/bundle-clean.ronn18
-rw-r--r--man/bundle-config.1497
-rw-r--r--man/bundle-config.1.txt528
-rw-r--r--man/bundle-config.ronn399
-rw-r--r--man/bundle-doctor.144
-rw-r--r--man/bundle-doctor.1.txt44
-rw-r--r--man/bundle-exec.1165
-rw-r--r--man/bundle-exec.1.txt178
-rw-r--r--man/bundle-exec.ronn152
-rw-r--r--man/bundle-gem.180
-rw-r--r--man/bundle-gem.1.txt91
-rw-r--r--man/bundle-gem.ronn78
-rw-r--r--man/bundle-info.120
-rw-r--r--man/bundle-info.1.txt21
-rw-r--r--man/bundle-info.ronn17
-rw-r--r--man/bundle-init.125
-rw-r--r--man/bundle-init.1.txt34
-rw-r--r--man/bundle-init.ronn29
-rw-r--r--man/bundle-inject.133
-rw-r--r--man/bundle-inject.1.txt32
-rw-r--r--man/bundle-inject.ronn22
-rw-r--r--man/bundle-install.1311
-rw-r--r--man/bundle-install.1.txt401
-rw-r--r--man/bundle-install.ronn383
-rw-r--r--man/bundle-list.150
-rw-r--r--man/bundle-list.1.txt43
-rw-r--r--man/bundle-list.ronn33
-rw-r--r--man/bundle-lock.184
-rw-r--r--man/bundle-lock.1.txt93
-rw-r--r--man/bundle-open.132
-rw-r--r--man/bundle-open.1.txt29
-rw-r--r--man/bundle-open.ronn19
-rw-r--r--man/bundle-outdated.1155
-rw-r--r--man/bundle-outdated.1.txt131
-rw-r--r--man/bundle-outdated.ronn111
-rw-r--r--man/bundle-package.155
-rw-r--r--man/bundle-package.1.txt79
-rw-r--r--man/bundle-package.ronn72
-rw-r--r--man/bundle-platform.161
-rw-r--r--man/bundle-platform.1.txt57
-rw-r--r--man/bundle-platform.ronn42
-rw-r--r--man/bundle-pristine.134
-rw-r--r--man/bundle-pristine.1.txt44
-rw-r--r--man/bundle-remove.131
-rw-r--r--man/bundle-remove.1.txt34
-rw-r--r--man/bundle-show.123
-rw-r--r--man/bundle-show.1.txt27
-rw-r--r--man/bundle-update.1394
-rw-r--r--man/bundle-update.1.txt390
-rw-r--r--man/bundle-update.ronn350
-rw-r--r--man/bundle-viz.139
-rw-r--r--man/bundle-viz.1.txt39
-rw-r--r--man/bundle-viz.ronn30
-rw-r--r--man/bundle.1136
-rw-r--r--man/bundle.1.txt116
-rw-r--r--man/bundle.ronn111
-rw-r--r--man/gemfile.5686
-rw-r--r--man/gemfile.5.ronn517
-rw-r--r--man/gemfile.5.txt649
-rw-r--r--man/irb.149
-rw-r--r--man/ruby.146
-rw-r--r--marshal.c2014
-rw-r--r--marshal.rb40
-rw-r--r--math.c707
-rw-r--r--memory_view.c872
-rw-r--r--method.h54
-rw-r--r--mini_builtin.c18
-rwxr-xr-xmisc/expand_tabs.rb61
-rwxr-xr-xmisc/lldb_cruby.py491
-rw-r--r--misc/lldb_disasm.py250
-rw-r--r--misc/lldb_rb/commands/command_template.py30
-rw-r--r--misc/lldb_rb/commands/heap_page_command.py26
-rw-r--r--misc/lldb_rb/commands/rclass_ext_command.py14
-rw-r--r--misc/lldb_rb/constants.py4
-rw-r--r--misc/lldb_rb/rb_base_command.py69
-rw-r--r--misc/lldb_yjit.py47
-rw-r--r--misc/rb_optparse.bash5
-rw-r--r--[-rwxr-xr-x]misc/rb_optparse.zsh13
-rw-r--r--missing/alloca.c2
-rw-r--r--missing/crypt.h5
-rw-r--r--missing/dtoa.c111
-rw-r--r--missing/dup2.c60
-rw-r--r--missing/erf.c15
-rw-r--r--missing/explicit_bzero.c4
-rw-r--r--missing/file.h3
-rw-r--r--missing/fileblocks.c1
-rw-r--r--missing/finite.c9
-rw-r--r--missing/flock.c11
-rw-r--r--missing/isinf.c69
-rw-r--r--missing/isnan.c32
-rw-r--r--missing/langinfo.c2
-rw-r--r--missing/signbit.c19
-rw-r--r--missing/stdbool.h20
-rw-r--r--missing/tgamma.c17
-rw-r--r--mjit.c1911
-rw-r--r--mjit.h184
-rw-r--r--mjit.rb37
-rw-r--r--mjit_c.c43
-rw-r--r--mjit_c.h97
-rw-r--r--mjit_c.rb807
-rw-r--r--mjit_compile.c478
-rw-r--r--mjit_worker.c1258
-rw-r--r--nilclass.rb25
-rw-r--r--node.c1612
-rw-r--r--node.h116
-rw-r--r--numeric.c5377
-rw-r--r--numeric.rb405
-rw-r--r--object.c2799
-rw-r--r--pack.c2370
-rw-r--r--pack.rb282
-rw-r--r--parse.y3364
-rw-r--r--prelude.rb24
-rw-r--r--probes.d11
-rw-r--r--probes_helper.h16
-rw-r--r--proc.c1673
-rw-r--r--process.c3027
-rw-r--r--ractor.c3327
-rw-r--r--ractor.rb842
-rw-r--r--ractor_core.h342
-rw-r--r--random.c1227
-rw-r--r--range.c2131
-rw-r--r--rational.c1182
-rw-r--r--re.c3037
-rw-r--r--regcomp.c52
-rw-r--r--regenc.c15
-rw-r--r--regenc.h15
-rw-r--r--regerror.c4
-rw-r--r--regexec.c841
-rw-r--r--regint.h63
-rw-r--r--regparse.c31
-rw-r--r--ruby-runner.c58
-rw-r--r--ruby.c2621
-rw-r--r--ruby_assert.h23
-rw-r--r--ruby_atomic.h267
-rw-r--r--rubystub.c29
-rw-r--r--safe.c145
-rw-r--r--sample/coverage.rb2
-rw-r--r--sample/drb/README.ja.rdoc2
-rw-r--r--sample/drb/README.rdoc4
-rw-r--r--sample/drb/dchats.rb2
-rw-r--r--sample/drb/name.rb3
-rw-r--r--sample/exyacc.rb2
-rw-r--r--sample/from.rb2
-rw-r--r--sample/getoptlong/abbrev.rb9
-rw-r--r--sample/getoptlong/aliases.rb8
-rw-r--r--sample/getoptlong/argv.rb12
-rw-r--r--sample/getoptlong/each.rb12
-rw-r--r--sample/getoptlong/fibonacci.rb62
-rw-r--r--sample/getoptlong/permute.rb12
-rw-r--r--sample/getoptlong/require_order.rb13
-rw-r--r--sample/getoptlong/return_in_order.rb13
-rw-r--r--sample/getoptlong/simple.rb7
-rw-r--r--sample/getoptlong/types.rb10
-rw-r--r--sample/list.rb5
-rwxr-xr-xsample/mine.rb8
-rw-r--r--sample/mpart.rb44
-rw-r--r--sample/openssl/c_rehash.rb3
-rw-r--r--sample/openssl/cert2text.rb7
-rw-r--r--sample/openssl/certstore.rb7
-rw-r--r--sample/openssl/echo_cli.rb2
-rw-r--r--sample/openssl/echo_svr.rb8
-rw-r--r--sample/openssl/gen_csr.rb14
-rw-r--r--sample/openssl/smime_read.rb11
-rw-r--r--sample/openssl/smime_write.rb15
-rwxr-xr-xsample/rss/blend.rb79
-rwxr-xr-xsample/rss/convert.rb69
-rwxr-xr-xsample/rss/list_description.rb91
-rwxr-xr-xsample/rss/re_read.rb64
-rwxr-xr-xsample/rss/rss_recent.rb85
-rw-r--r--sample/testunit/adder.rb13
-rw-r--r--sample/testunit/subtracter.rb12
-rw-r--r--sample/testunit/tc_adder.rb18
-rw-r--r--sample/testunit/tc_subtracter.rb18
-rw-r--r--sample/testunit/ts_examples.rb7
-rw-r--r--sample/trick2013/mame/remarks.markdown4
-rw-r--r--sample/trick2015/kinaba/entry.rb6
-rw-r--r--sample/trick2018/01-kinaba/remarks.markdown2
-rw-r--r--sample/trick2018/02-mame/entry.rb4
-rw-r--r--sample/trick2022/01-tompng/Gemfile2
-rw-r--r--sample/trick2022/01-tompng/Gemfile.lock13
-rw-r--r--sample/trick2022/01-tompng/authors.markdown3
-rw-r--r--sample/trick2022/01-tompng/entry.rb40
-rw-r--r--sample/trick2022/01-tompng/remarks.markdown51
-rw-r--r--sample/trick2022/02-tompng/authors.markdown3
-rw-r--r--sample/trick2022/02-tompng/entry.rb32
-rw-r--r--sample/trick2022/02-tompng/remarks.markdown32
-rw-r--r--sample/trick2022/03-mame/authors.markdown3
-rw-r--r--sample/trick2022/03-mame/entry.rb27
-rw-r--r--sample/trick2022/03-mame/remarks.markdown96
-rw-r--r--sample/trick2022/03-mame/test.txt13
-rw-r--r--sample/trick2022/README.md14
-rw-r--r--sample/uumerge.rb2
-rw-r--r--sample/webrick/demo-app.rb66
-rw-r--r--sample/webrick/demo-multipart.cgi12
-rw-r--r--sample/webrick/demo-servlet.rb6
-rw-r--r--sample/webrick/demo-urlencoded.cgi12
-rw-r--r--sample/webrick/hello.cgi11
-rw-r--r--sample/webrick/hello.rb8
-rw-r--r--sample/webrick/httpd.rb23
-rw-r--r--sample/webrick/httpproxy.rb25
-rw-r--r--sample/webrick/httpsd.rb33
-rw-r--r--scheduler.c687
-rw-r--r--shape.c825
-rw-r--r--shape.h232
-rw-r--r--signal.c652
-rw-r--r--siphash.c105
-rw-r--r--sparc.c4
-rw-r--r--spec/README.md36
-rw-r--r--spec/bundler/bundler/bundler_spec.rb268
-rw-r--r--spec/bundler/bundler/cli_spec.rb135
-rw-r--r--spec/bundler/bundler/compact_index_client/updater_spec.rb46
-rw-r--r--spec/bundler/bundler/definition_spec.rb125
-rw-r--r--spec/bundler/bundler/dep_proxy_spec.rb22
-rw-r--r--spec/bundler/bundler/dependency_spec.rb157
-rw-r--r--spec/bundler/bundler/digest_spec.rb24
-rw-r--r--spec/bundler/bundler/dsl_spec.rb146
-rw-r--r--spec/bundler/bundler/endpoint_specification_spec.rb48
-rw-r--r--spec/bundler/bundler/env_spec.rb60
-rw-r--r--spec/bundler/bundler/fetcher/compact_index_spec.rb5
-rw-r--r--spec/bundler/bundler/fetcher/dependency_spec.rb18
-rw-r--r--spec/bundler/bundler/fetcher/downloader_spec.rb46
-rw-r--r--spec/bundler/bundler/fetcher/index_spec.rb112
-rw-r--r--spec/bundler/bundler/fetcher_spec.rb37
-rw-r--r--spec/bundler/bundler/friendly_errors_spec.rb39
-rw-r--r--spec/bundler/bundler/gem_helper_spec.rb159
-rw-r--r--spec/bundler/bundler/gem_version_promoter_spec.rb246
-rw-r--r--spec/bundler/bundler/installer/gem_installer_spec.rb18
-rw-r--r--spec/bundler/bundler/installer/parallel_installer_spec.rb39
-rw-r--r--spec/bundler/bundler/installer/spec_installation_spec.rb4
-rw-r--r--spec/bundler/bundler/mirror_spec.rb2
-rw-r--r--spec/bundler/bundler/plugin/api/source_spec.rb6
-rw-r--r--spec/bundler/bundler/plugin/dsl_spec.rb2
-rw-r--r--spec/bundler/bundler/plugin/index_spec.rb33
-rw-r--r--spec/bundler/bundler/plugin/installer_spec.rb2
-rw-r--r--spec/bundler/bundler/plugin_spec.rb61
-rw-r--r--spec/bundler/bundler/psyched_yaml_spec.rb9
-rw-r--r--spec/bundler/bundler/remote_specification_spec.rb2
-rw-r--r--spec/bundler/bundler/resolver/candidate_spec.rb21
-rw-r--r--spec/bundler/bundler/ruby_dsl_spec.rb27
-rw-r--r--spec/bundler/bundler/ruby_version_spec.rb46
-rw-r--r--spec/bundler/bundler/rubygems_integration_spec.rb34
-rw-r--r--spec/bundler/bundler/settings_spec.rb27
-rw-r--r--spec/bundler/bundler/shared_helpers_spec.rb79
-rw-r--r--spec/bundler/bundler/source/git/git_proxy_spec.rb66
-rw-r--r--spec/bundler/bundler/source/git_spec.rb49
-rw-r--r--spec/bundler/bundler/source/rubygems_spec.rb14
-rw-r--r--spec/bundler/bundler/source_list_spec.rb80
-rw-r--r--spec/bundler/bundler/source_spec.rb40
-rw-r--r--spec/bundler/bundler/stub_specification_spec.rb33
-rw-r--r--spec/bundler/bundler/ui/shell_spec.rb19
-rw-r--r--spec/bundler/bundler/vendored_persistent_spec.rb77
-rw-r--r--spec/bundler/bundler/version_ranges_spec.rb40
-rw-r--r--spec/bundler/bundler/worker_spec.rb47
-rw-r--r--spec/bundler/cache/gems_spec.rb79
-rw-r--r--spec/bundler/cache/git_spec.rb145
-rw-r--r--spec/bundler/cache/path_spec.rb43
-rw-r--r--spec/bundler/cache/platform_spec.rb4
-rw-r--r--spec/bundler/commands/add_spec.rb128
-rw-r--r--spec/bundler/commands/binstubs_spec.rb221
-rw-r--r--spec/bundler/commands/cache_spec.rb141
-rw-r--r--spec/bundler/commands/check_spec.rb331
-rw-r--r--spec/bundler/commands/clean_spec.rb144
-rw-r--r--spec/bundler/commands/config_spec.rb213
-rw-r--r--spec/bundler/commands/console_spec.rb51
-rw-r--r--spec/bundler/commands/doctor_spec.rb48
-rw-r--r--spec/bundler/commands/exec_spec.rb591
-rw-r--r--spec/bundler/commands/fund_spec.rb82
-rw-r--r--spec/bundler/commands/help_spec.rb33
-rw-r--r--spec/bundler/commands/info_spec.rb124
-rw-r--r--spec/bundler/commands/init_spec.rb72
-rw-r--r--spec/bundler/commands/inject_spec.rb40
-rw-r--r--spec/bundler/commands/install_spec.rb733
-rw-r--r--spec/bundler/commands/licenses_spec.rb10
-rw-r--r--spec/bundler/commands/list_spec.rb39
-rw-r--r--spec/bundler/commands/lock_spec.rb975
-rw-r--r--spec/bundler/commands/newgem_spec.rb1302
-rw-r--r--spec/bundler/commands/open_spec.rb75
-rw-r--r--spec/bundler/commands/outdated_spec.rb1014
-rw-r--r--spec/bundler/commands/platform_spec.rb1307
-rw-r--r--spec/bundler/commands/post_bundle_message_spec.rb137
-rw-r--r--spec/bundler/commands/pristine_spec.rb80
-rw-r--r--spec/bundler/commands/remove_spec.rb257
-rw-r--r--spec/bundler/commands/show_spec.rb39
-rw-r--r--spec/bundler/commands/update_spec.rb1240
-rw-r--r--spec/bundler/commands/version_spec.rb12
-rw-r--r--spec/bundler/commands/viz_spec.rb25
-rw-r--r--spec/bundler/install/allow_offline_install_spec.rb27
-rw-r--r--spec/bundler/install/binstubs_spec.rb6
-rw-r--r--spec/bundler/install/bundler_spec.rb204
-rw-r--r--spec/bundler/install/deploy_spec.rb429
-rw-r--r--spec/bundler/install/failure_spec.rb101
-rw-r--r--spec/bundler/install/gemfile/eval_gemfile_spec.rb54
-rw-r--r--spec/bundler/install/gemfile/force_ruby_platform_spec.rb118
-rw-r--r--spec/bundler/install/gemfile/gemspec_spec.rb370
-rw-r--r--spec/bundler/install/gemfile/git_spec.rb483
-rw-r--r--spec/bundler/install/gemfile/groups_spec.rb167
-rw-r--r--spec/bundler/install/gemfile/install_if.rb44
-rw-r--r--spec/bundler/install/gemfile/install_if_spec.rb44
-rw-r--r--spec/bundler/install/gemfile/lockfile_spec.rb8
-rw-r--r--spec/bundler/install/gemfile/path_spec.rb365
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb355
-rw-r--r--spec/bundler/install/gemfile/ruby_spec.rb49
-rw-r--r--spec/bundler/install/gemfile/sources_spec.rb1497
-rw-r--r--spec/bundler/install/gemfile/specific_platform_spec.rb999
-rw-r--r--spec/bundler/install/gemfile_spec.rb60
-rw-r--r--spec/bundler/install/gems/compact_index_spec.rb346
-rw-r--r--spec/bundler/install/gems/dependency_api_spec.rb199
-rw-r--r--spec/bundler/install/gems/flex_spec.rb167
-rw-r--r--spec/bundler/install/gems/fund_spec.rb164
-rw-r--r--spec/bundler/install/gems/native_extensions_spec.rb79
-rw-r--r--spec/bundler/install/gems/post_install_spec.rb2
-rw-r--r--spec/bundler/install/gems/resolving_spec.rb454
-rw-r--r--spec/bundler/install/gems/standalone_spec.rb358
-rw-r--r--spec/bundler/install/gems/sudo_spec.rb187
-rw-r--r--spec/bundler/install/gems/win32_spec.rb3
-rw-r--r--spec/bundler/install/gemspecs_spec.rb24
-rw-r--r--spec/bundler/install/git_spec.rb119
-rw-r--r--spec/bundler/install/global_cache_spec.rb115
-rw-r--r--spec/bundler/install/path_spec.rb101
-rw-r--r--spec/bundler/install/prereleases_spec.rb21
-rw-r--r--spec/bundler/install/process_lock_spec.rb24
-rw-r--r--spec/bundler/install/redownload_spec.rb21
-rw-r--r--spec/bundler/install/security_policy_spec.rb16
-rw-r--r--spec/bundler/install/yanked_spec.rb174
-rw-r--r--spec/bundler/lock/git_spec.rb128
-rw-r--r--spec/bundler/lock/lockfile_spec.rb839
-rw-r--r--spec/bundler/other/cli_dispatch_spec.rb6
-rw-r--r--spec/bundler/other/ext_spec.rb8
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb437
-rw-r--r--spec/bundler/other/platform_spec.rb1306
-rw-r--r--spec/bundler/plugins/command_spec.rb6
-rw-r--r--spec/bundler/plugins/install_spec.rb104
-rw-r--r--spec/bundler/plugins/source/example_spec.rb110
-rw-r--r--spec/bundler/plugins/source_spec.rb3
-rw-r--r--spec/bundler/plugins/uninstall_spec.rb49
-rw-r--r--spec/bundler/quality_es_spec.rb20
-rw-r--r--spec/bundler/quality_spec.rb180
-rw-r--r--spec/bundler/realworld/dependency_api_spec.rb14
-rw-r--r--spec/bundler/realworld/double_check_spec.rb10
-rw-r--r--spec/bundler/realworld/edgecases_spec.rb461
-rw-r--r--spec/bundler/realworld/ffi_spec.rb57
-rw-r--r--spec/bundler/realworld/fixtures/warbler/.gitignore1
-rw-r--r--spec/bundler/realworld/fixtures/warbler/Gemfile7
-rw-r--r--spec/bundler/realworld/fixtures/warbler/Gemfile.lock30
-rw-r--r--spec/bundler/realworld/fixtures/warbler/bin/warbler-example.rb3
-rw-r--r--spec/bundler/realworld/fixtures/warbler/demo/demo.gemspec10
-rw-r--r--spec/bundler/realworld/gemfile_source_header_spec.rb12
-rw-r--r--spec/bundler/realworld/git_spec.rb11
-rw-r--r--spec/bundler/realworld/mirror_probe_spec.rb53
-rw-r--r--spec/bundler/realworld/parallel_spec.rb6
-rw-r--r--spec/bundler/realworld/slow_perf_spec.rb33
-rw-r--r--spec/bundler/resolver/basic_spec.rb74
-rw-r--r--spec/bundler/resolver/platform_spec.rb335
-rw-r--r--spec/bundler/runtime/executable_spec.rb54
-rw-r--r--spec/bundler/runtime/gem_tasks_spec.rb62
-rw-r--r--spec/bundler/runtime/inline_spec.rb372
-rw-r--r--spec/bundler/runtime/load_spec.rb16
-rw-r--r--spec/bundler/runtime/platform_spec.rb327
-rw-r--r--spec/bundler/runtime/require_spec.rb41
-rw-r--r--spec/bundler/runtime/self_management_spec.rb126
-rw-r--r--spec/bundler/runtime/setup_spec.rb589
-rw-r--r--spec/bundler/runtime/with_unbundled_env_spec.rb134
-rw-r--r--spec/bundler/spec_helper.rb89
-rw-r--r--spec/bundler/support/artifice/compact_index.rb116
-rw-r--r--spec/bundler/support/artifice/compact_index_api_missing.rb13
-rw-r--r--spec/bundler/support/artifice/compact_index_basic_authentication.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_checksum_mismatch.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_concurrent_download.rb10
-rw-r--r--spec/bundler/support/artifice/compact_index_creds_diff_host.rb8
-rw-r--r--spec/bundler/support/artifice/compact_index_extra.rb35
-rw-r--r--spec/bundler/support/artifice/compact_index_extra_api.rb50
-rw-r--r--spec/bundler/support/artifice/compact_index_extra_api_missing.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_extra_missing.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_forbidden.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_host_redirect.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_no_gem.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_partial_update.rb12
-rw-r--r--spec/bundler/support/artifice/compact_index_partial_update_no_etag_not_incremental.rb40
-rw-r--r--spec/bundler/support/artifice/compact_index_precompiled_before.rb25
-rw-r--r--spec/bundler/support/artifice/compact_index_range_not_satisfiable.rb8
-rw-r--r--spec/bundler/support/artifice/compact_index_rate_limited.rb8
-rw-r--r--spec/bundler/support/artifice/compact_index_redirects.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb8
-rw-r--r--spec/bundler/support/artifice/compact_index_wrong_dependencies.rb6
-rw-r--r--spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb6
-rw-r--r--spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb15
-rw-r--r--spec/bundler/support/artifice/endpoint.rb98
-rw-r--r--spec/bundler/support/artifice/endpoint_500.rb8
-rw-r--r--spec/bundler/support/artifice/endpoint_api_forbidden.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_api_missing.rb18
-rw-r--r--spec/bundler/support/artifice/endpoint_basic_authentication.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_creds_diff_host.rb8
-rw-r--r--spec/bundler/support/artifice/endpoint_extra.rb14
-rw-r--r--spec/bundler/support/artifice/endpoint_extra_api.rb14
-rw-r--r--spec/bundler/support/artifice/endpoint_extra_missing.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_fallback.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_host_redirect.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_marshal_fail.rb11
-rw-r--r--spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb15
-rw-r--r--spec/bundler/support/artifice/endpoint_mirror_source.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_redirect.rb6
-rw-r--r--spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb8
-rw-r--r--spec/bundler/support/artifice/endpoint_timeout.rb6
-rw-r--r--spec/bundler/support/artifice/fail.rb16
-rw-r--r--spec/bundler/support/artifice/helpers/artifice.rb30
-rw-r--r--spec/bundler/support/artifice/helpers/compact_index.rb118
-rw-r--r--spec/bundler/support/artifice/helpers/compact_index_extra.rb33
-rw-r--r--spec/bundler/support/artifice/helpers/compact_index_extra_api.rb48
-rw-r--r--spec/bundler/support/artifice/helpers/endpoint.rb112
-rw-r--r--spec/bundler/support/artifice/helpers/endpoint_extra.rb29
-rw-r--r--spec/bundler/support/artifice/helpers/endpoint_fallback.rb15
-rw-r--r--spec/bundler/support/artifice/helpers/endpoint_marshal_fail.rb9
-rw-r--r--spec/bundler/support/artifice/helpers/rack_request.rb100
-rw-r--r--spec/bundler/support/artifice/used_cassettes.txt20908
-rw-r--r--spec/bundler/support/artifice/vcr.rb52
-rw-r--r--spec/bundler/support/artifice/windows.rb12
-rw-r--r--spec/bundler/support/build_metadata.rb49
-rw-r--r--spec/bundler/support/builders.rb358
-rw-r--r--spec/bundler/support/bundle.rb10
-rw-r--r--spec/bundler/support/command_execution.rb13
-rw-r--r--spec/bundler/support/filters.rb23
-rw-r--r--spec/bundler/support/hax.rb71
-rw-r--r--spec/bundler/support/helpers.rb484
-rw-r--r--spec/bundler/support/indexes.rb36
-rw-r--r--spec/bundler/support/matchers.rb135
-rw-r--r--spec/bundler/support/parallel.rb5
-rw-r--r--spec/bundler/support/path.rb190
-rw-r--r--spec/bundler/support/platforms.rb48
-rw-r--r--spec/bundler/support/rubygems_ext.rb190
-rw-r--r--spec/bundler/support/rubygems_version_manager.rb53
-rw-r--r--spec/bundler/support/sometimes.rb57
-rw-r--r--spec/bundler/support/streams.rb19
-rw-r--r--spec/bundler/support/sudo.rb18
-rw-r--r--spec/bundler/support/switch_rubygems.rb4
-rw-r--r--spec/bundler/update/gemfile_spec.rb16
-rw-r--r--spec/bundler/update/gems/fund_spec.rb50
-rw-r--r--spec/bundler/update/gems/post_install_spec.rb8
-rw-r--r--spec/bundler/update/git_spec.rb130
-rw-r--r--spec/bundler/update/path_spec.rb1
-rw-r--r--spec/bundler/update/redownload_spec.rb8
-rw-r--r--spec/default.mspec22
-rw-r--r--spec/mspec/.rspec1
-rw-r--r--spec/mspec/Gemfile4
-rw-r--r--spec/mspec/Gemfile.lock29
-rw-r--r--spec/mspec/README.md6
-rwxr-xr-xspec/mspec/bin/mspec2
-rwxr-xr-xspec/mspec/lib/mspec/commands/mkspec.rb16
-rwxr-xr-xspec/mspec/lib/mspec/commands/mspec.rb6
-rw-r--r--spec/mspec/lib/mspec/expectations/expectations.rb4
-rw-r--r--spec/mspec/lib/mspec/expectations/should.rb20
-rw-r--r--spec/mspec/lib/mspec/guards/bug.rb19
-rw-r--r--spec/mspec/lib/mspec/guards/guard.rb2
-rw-r--r--spec/mspec/lib/mspec/guards/platform.rb17
-rw-r--r--spec/mspec/lib/mspec/guards/superuser.rb10
-rw-r--r--spec/mspec/lib/mspec/guards/version.rb65
-rw-r--r--spec/mspec/lib/mspec/helpers.rb1
-rw-r--r--spec/mspec/lib/mspec/helpers/datetime.rb1
-rw-r--r--spec/mspec/lib/mspec/helpers/frozen_error_class.rb17
-rw-r--r--spec/mspec/lib/mspec/helpers/io.rb4
-rw-r--r--spec/mspec/lib/mspec/helpers/numeric.rb12
-rw-r--r--spec/mspec/lib/mspec/helpers/ruby_exe.rb40
-rw-r--r--spec/mspec/lib/mspec/helpers/scratch.rb4
-rw-r--r--spec/mspec/lib/mspec/helpers/tmp.rb13
-rw-r--r--spec/mspec/lib/mspec/helpers/warning.rb2
-rw-r--r--spec/mspec/lib/mspec/matchers/base.rb30
-rw-r--r--spec/mspec/lib/mspec/matchers/include.rb4
-rw-r--r--spec/mspec/lib/mspec/matchers/match_yaml.rb6
-rw-r--r--spec/mspec/lib/mspec/matchers/output.rb8
-rw-r--r--spec/mspec/lib/mspec/matchers/raise_error.rb41
-rw-r--r--spec/mspec/lib/mspec/mocks/mock.rb2
-rw-r--r--spec/mspec/lib/mspec/runner/actions/constants_leak_checker.rb11
-rw-r--r--spec/mspec/lib/mspec/runner/actions/leakchecker.rb29
-rw-r--r--spec/mspec/lib/mspec/runner/actions/timeout.rb37
-rw-r--r--spec/mspec/lib/mspec/runner/context.rb36
-rw-r--r--spec/mspec/lib/mspec/runner/example.rb12
-rw-r--r--spec/mspec/lib/mspec/runner/exception.rb31
-rw-r--r--spec/mspec/lib/mspec/runner/formatters.rb1
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/base.rb26
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/junit.rb6
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/method.rb14
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/spinner.rb2
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/stats.rb57
-rw-r--r--spec/mspec/lib/mspec/runner/mspec.rb92
-rw-r--r--spec/mspec/lib/mspec/runner/object.rb4
-rw-r--r--spec/mspec/lib/mspec/runner/parallel.rb2
-rw-r--r--spec/mspec/lib/mspec/runner/shared.rb8
-rw-r--r--spec/mspec/lib/mspec/utils/format.rb6
-rw-r--r--spec/mspec/lib/mspec/utils/name_map.rb7
-rw-r--r--spec/mspec/lib/mspec/utils/options.rb31
-rw-r--r--spec/mspec/lib/mspec/utils/script.rb29
-rw-r--r--spec/mspec/lib/mspec/utils/version.rb2
-rw-r--r--spec/mspec/lib/mspec/utils/warnings.rb40
-rw-r--r--spec/mspec/spec/commands/mkspec_spec.rb196
-rw-r--r--spec/mspec/spec/commands/mspec_ci_spec.rb72
-rw-r--r--spec/mspec/spec/commands/mspec_run_spec.rb74
-rw-r--r--spec/mspec/spec/commands/mspec_spec.rb106
-rw-r--r--spec/mspec/spec/commands/mspec_tag_spec.rb170
-rw-r--r--spec/mspec/spec/expectations/expectations_spec.rb18
-rw-r--r--spec/mspec/spec/expectations/should.rb73
-rw-r--r--spec/mspec/spec/expectations/should_spec.rb18
-rw-r--r--spec/mspec/spec/fixtures/config.mspec2
-rwxr-xr-xspec/mspec/spec/fixtures/my_ruby2
-rw-r--r--spec/mspec/spec/fixtures/should.rb75
-rw-r--r--spec/mspec/spec/guards/block_device_spec.rb26
-rw-r--r--spec/mspec/spec/guards/bug_spec.rb84
-rw-r--r--spec/mspec/spec/guards/conflict_spec.rb30
-rw-r--r--spec/mspec/spec/guards/endian_spec.rb34
-rw-r--r--spec/mspec/spec/guards/feature_spec.rb82
-rw-r--r--spec/mspec/spec/guards/guard_spec.rb222
-rw-r--r--spec/mspec/spec/guards/platform_spec.rb188
-rw-r--r--spec/mspec/spec/guards/quarantine_spec.rb20
-rw-r--r--spec/mspec/spec/guards/superuser_spec.rb22
-rw-r--r--spec/mspec/spec/guards/support_spec.rb28
-rw-r--r--spec/mspec/spec/guards/user_spec.rb10
-rw-r--r--spec/mspec/spec/guards/version_spec.rb90
-rw-r--r--spec/mspec/spec/helpers/argf_spec.rb16
-rw-r--r--spec/mspec/spec/helpers/argv_spec.rb10
-rw-r--r--spec/mspec/spec/helpers/datetime_spec.rb18
-rw-r--r--spec/mspec/spec/helpers/fixture_spec.rb8
-rw-r--r--spec/mspec/spec/helpers/flunk_spec.rb10
-rw-r--r--spec/mspec/spec/helpers/fs_spec.rb60
-rw-r--r--spec/mspec/spec/helpers/io_spec.rb50
-rw-r--r--spec/mspec/spec/helpers/mock_to_path_spec.rb14
-rw-r--r--spec/mspec/spec/helpers/numeric_spec.rb20
-rw-r--r--spec/mspec/spec/helpers/ruby_exe_spec.rb165
-rw-r--r--spec/mspec/spec/helpers/scratch_spec.rb10
-rw-r--r--spec/mspec/spec/helpers/suppress_warning_spec.rb4
-rw-r--r--spec/mspec/spec/helpers/tmp_spec.rb12
-rw-r--r--spec/mspec/spec/integration/interpreter_spec.rb8
-rw-r--r--spec/mspec/spec/integration/object_methods_spec.rb6
-rw-r--r--spec/mspec/spec/integration/run_spec.rb36
-rw-r--r--spec/mspec/spec/integration/tag_spec.rb12
-rw-r--r--spec/mspec/spec/matchers/base_spec.rb140
-rw-r--r--spec/mspec/spec/matchers/be_an_instance_of_spec.rb22
-rw-r--r--spec/mspec/spec/matchers/be_ancestor_of_spec.rb10
-rw-r--r--spec/mspec/spec/matchers/be_close_spec.rb24
-rw-r--r--spec/mspec/spec/matchers/be_computed_by_spec.rb14
-rw-r--r--spec/mspec/spec/matchers/be_empty_spec.rb10
-rw-r--r--spec/mspec/spec/matchers/be_false_spec.rb16
-rw-r--r--spec/mspec/spec/matchers/be_kind_of_spec.rb22
-rw-r--r--spec/mspec/spec/matchers/be_nan_spec.rb12
-rw-r--r--spec/mspec/spec/matchers/be_nil_spec.rb14
-rw-r--r--spec/mspec/spec/matchers/be_true_or_false_spec.rb8
-rw-r--r--spec/mspec/spec/matchers/be_true_spec.rb16
-rw-r--r--spec/mspec/spec/matchers/block_caller_spec.rb6
-rw-r--r--spec/mspec/spec/matchers/complain_spec.rb43
-rw-r--r--spec/mspec/spec/matchers/eql_spec.rb22
-rw-r--r--spec/mspec/spec/matchers/equal_element_spec.rb78
-rw-r--r--spec/mspec/spec/matchers/equal_spec.rb20
-rw-r--r--spec/mspec/spec/matchers/have_class_variable_spec.rb18
-rw-r--r--spec/mspec/spec/matchers/have_constant_spec.rb14
-rw-r--r--spec/mspec/spec/matchers/have_instance_method_spec.rb20
-rw-r--r--spec/mspec/spec/matchers/have_instance_variable_spec.rb18
-rw-r--r--spec/mspec/spec/matchers/have_method_spec.rb24
-rw-r--r--spec/mspec/spec/matchers/have_private_instance_method_spec.rb20
-rw-r--r--spec/mspec/spec/matchers/have_private_method_spec.rb16
-rw-r--r--spec/mspec/spec/matchers/have_protected_instance_method_spec.rb20
-rw-r--r--spec/mspec/spec/matchers/have_public_instance_method_spec.rb20
-rw-r--r--spec/mspec/spec/matchers/have_singleton_method_spec.rb16
-rw-r--r--spec/mspec/spec/matchers/include_any_of_spec.rb26
-rw-r--r--spec/mspec/spec/matchers/include_spec.rb22
-rw-r--r--spec/mspec/spec/matchers/infinity_spec.rb18
-rw-r--r--spec/mspec/spec/matchers/match_yaml_spec.rb22
-rw-r--r--spec/mspec/spec/matchers/output_spec.rb48
-rw-r--r--spec/mspec/spec/matchers/output_to_fd_spec.rb30
-rw-r--r--spec/mspec/spec/matchers/raise_error_spec.rb127
-rw-r--r--spec/mspec/spec/matchers/respond_to_spec.rb26
-rw-r--r--spec/mspec/spec/matchers/signed_zero_spec.rb18
-rw-r--r--spec/mspec/spec/mocks/mock_spec.rb238
-rw-r--r--spec/mspec/spec/mocks/proxy_spec.rb196
-rw-r--r--spec/mspec/spec/runner/actions/filter_spec.rb44
-rw-r--r--spec/mspec/spec/runner/actions/tag_spec.rb144
-rw-r--r--spec/mspec/spec/runner/actions/taglist_spec.rb70
-rw-r--r--spec/mspec/spec/runner/actions/tagpurge_spec.rb66
-rw-r--r--spec/mspec/spec/runner/actions/tally_spec.rb167
-rw-r--r--spec/mspec/spec/runner/actions/timer_spec.rb22
-rw-r--r--spec/mspec/spec/runner/context_spec.rb369
-rw-r--r--spec/mspec/spec/runner/example_spec.rb60
-rw-r--r--spec/mspec/spec/runner/exception_spec.rb50
-rw-r--r--spec/mspec/spec/runner/filters/match_spec.rb16
-rw-r--r--spec/mspec/spec/runner/filters/profile_spec.rb70
-rw-r--r--spec/mspec/spec/runner/filters/regexp_spec.rb18
-rw-r--r--spec/mspec/spec/runner/filters/tag_spec.rb48
-rw-r--r--spec/mspec/spec/runner/formatters/describe_spec.rb24
-rw-r--r--spec/mspec/spec/runner/formatters/dotted_spec.rb119
-rw-r--r--spec/mspec/spec/runner/formatters/file_spec.rb34
-rw-r--r--spec/mspec/spec/runner/formatters/html_spec.rb88
-rw-r--r--spec/mspec/spec/runner/formatters/junit_spec.rb100
-rw-r--r--spec/mspec/spec/runner/formatters/method_spec.rb69
-rw-r--r--spec/mspec/spec/runner/formatters/multi_spec.rb20
-rw-r--r--spec/mspec/spec/runner/formatters/specdoc_spec.rb30
-rw-r--r--spec/mspec/spec/runner/formatters/spinner_spec.rb32
-rw-r--r--spec/mspec/spec/runner/formatters/summary_spec.rb4
-rw-r--r--spec/mspec/spec/runner/formatters/unit_spec.rb33
-rw-r--r--spec/mspec/spec/runner/formatters/yaml_spec.rb79
-rw-r--r--spec/mspec/spec/runner/mspec_spec.rb300
-rw-r--r--spec/mspec/spec/runner/shared_spec.rb20
-rw-r--r--spec/mspec/spec/runner/tag_spec.rb96
-rw-r--r--spec/mspec/spec/spec_helper.rb21
-rw-r--r--spec/mspec/spec/utils/deprecate_spec.rb10
-rw-r--r--spec/mspec/spec/utils/name_map_spec.rb78
-rw-r--r--spec/mspec/spec/utils/options_spec.rb491
-rw-r--r--spec/mspec/spec/utils/script_spec.rb255
-rw-r--r--spec/mspec/spec/utils/version_spec.rb30
-rw-r--r--spec/mspec/tool/remove_old_guards.rb21
-rw-r--r--spec/mspec/tool/sync/sync-rubyspec.rb60
-rwxr-xr-xspec/mspec/tool/tag_from_output.rb39
-rwxr-xr-xspec/mspec/tool/wrap_with_guard.rb28
-rw-r--r--spec/ruby/.mspec.constants9
-rw-r--r--spec/ruby/.rubocop.yml71
-rw-r--r--spec/ruby/.rubocop_todo.yml76
-rw-r--r--spec/ruby/CONTRIBUTING.md106
-rw-r--r--spec/ruby/README.md50
-rw-r--r--spec/ruby/command_line/backtrace_limit_spec.rb48
-rw-r--r--spec/ruby/command_line/dash_e_spec.rb2
-rw-r--r--spec/ruby/command_line/dash_encoding_spec.rb8
-rw-r--r--spec/ruby/command_line/dash_l_spec.rb31
-rw-r--r--spec/ruby/command_line/dash_r_spec.rb19
-rw-r--r--spec/ruby/command_line/dash_upper_e_spec.rb3
-rw-r--r--spec/ruby/command_line/dash_upper_k_spec.rb4
-rw-r--r--spec/ruby/command_line/dash_upper_s_spec.rb2
-rw-r--r--spec/ruby/command_line/dash_upper_u_spec.rb6
-rw-r--r--spec/ruby/command_line/dash_upper_w_spec.rb24
-rw-r--r--spec/ruby/command_line/dash_v_spec.rb3
-rw-r--r--spec/ruby/command_line/dash_w_spec.rb4
-rw-r--r--spec/ruby/command_line/dash_x_spec.rb2
-rw-r--r--spec/ruby/command_line/error_message_spec.rb8
-rw-r--r--spec/ruby/command_line/feature_spec.rb29
-rw-r--r--spec/ruby/command_line/fixtures/backtrace.rb35
-rw-r--r--spec/ruby/command_line/fixtures/bin/hybrid_launcher.sh2
-rw-r--r--spec/ruby/command_line/fixtures/freeze_flag_two_literals.rb2
-rw-r--r--spec/ruby/command_line/fixtures/test_file.rb2
-rw-r--r--spec/ruby/command_line/rubyopt_spec.rb58
-rw-r--r--spec/ruby/command_line/syntax_error_spec.rb4
-rw-r--r--spec/ruby/core/argf/binmode_spec.rb2
-rw-r--r--spec/ruby/core/argf/bytes_spec.rb14
-rw-r--r--spec/ruby/core/argf/chars_spec.rb14
-rw-r--r--spec/ruby/core/argf/codepoints_spec.rb14
-rw-r--r--spec/ruby/core/argf/lines_spec.rb14
-rw-r--r--spec/ruby/core/argf/shared/fileno.rb2
-rw-r--r--spec/ruby/core/array/any_spec.rb6
-rw-r--r--spec/ruby/core/array/append_spec.rb10
-rw-r--r--spec/ruby/core/array/bsearch_index_spec.rb2
-rw-r--r--spec/ruby/core/array/clear_spec.rb26
-rw-r--r--spec/ruby/core/array/clone_spec.rb4
-rw-r--r--spec/ruby/core/array/compact_spec.rb34
-rw-r--r--spec/ruby/core/array/concat_spec.rb66
-rw-r--r--spec/ruby/core/array/deconstruct_spec.rb9
-rw-r--r--spec/ruby/core/array/delete_at_spec.rb26
-rw-r--r--spec/ruby/core/array/delete_if_spec.rb24
-rw-r--r--spec/ruby/core/array/delete_spec.rb26
-rw-r--r--spec/ruby/core/array/difference_spec.rb28
-rw-r--r--spec/ruby/core/array/drop_spec.rb13
-rw-r--r--spec/ruby/core/array/drop_while_spec.rb13
-rw-r--r--spec/ruby/core/array/each_spec.rb35
-rw-r--r--spec/ruby/core/array/element_set_spec.rb109
-rw-r--r--spec/ruby/core/array/empty_spec.rb6
-rw-r--r--spec/ruby/core/array/fill_spec.rb29
-rw-r--r--spec/ruby/core/array/filter_spec.rb18
-rw-r--r--spec/ruby/core/array/fixtures/classes.rb66
-rw-r--r--spec/ruby/core/array/flatten_spec.rb62
-rw-r--r--spec/ruby/core/array/frozen_spec.rb6
-rw-r--r--spec/ruby/core/array/hash_spec.rb2
-rw-r--r--spec/ruby/core/array/initialize_spec.rb6
-rw-r--r--spec/ruby/core/array/insert_spec.rb8
-rw-r--r--spec/ruby/core/array/intersect_spec.rb17
-rw-r--r--spec/ruby/core/array/intersection_spec.rb86
-rw-r--r--spec/ruby/core/array/keep_if_spec.rb1
-rw-r--r--spec/ruby/core/array/minmax_spec.rb14
-rw-r--r--spec/ruby/core/array/multiply_spec.rb58
-rw-r--r--spec/ruby/core/array/pack/a_spec.rb11
-rw-r--r--spec/ruby/core/array/pack/b_spec.rb7
-rw-r--r--spec/ruby/core/array/pack/c_spec.rb14
-rw-r--r--spec/ruby/core/array/pack/h_spec.rb5
-rw-r--r--spec/ruby/core/array/pack/m_spec.rb10
-rw-r--r--spec/ruby/core/array/pack/p_spec.rb24
-rw-r--r--spec/ruby/core/array/pack/shared/basic.rb52
-rw-r--r--spec/ruby/core/array/pack/shared/float.rb74
-rw-r--r--spec/ruby/core/array/pack/shared/integer.rb96
-rw-r--r--spec/ruby/core/array/pack/shared/numeric_basic.rb10
-rw-r--r--spec/ruby/core/array/pack/shared/taint.rb33
-rw-r--r--spec/ruby/core/array/pack/shared/unicode.rb14
-rw-r--r--spec/ruby/core/array/pack/u_spec.rb10
-rw-r--r--spec/ruby/core/array/pack/w_spec.rb14
-rw-r--r--spec/ruby/core/array/pack/x_spec.rb1
-rw-r--r--spec/ruby/core/array/pack/z_spec.rb10
-rw-r--r--spec/ruby/core/array/plus_spec.rb16
-rw-r--r--spec/ruby/core/array/pop_spec.rb66
-rw-r--r--spec/ruby/core/array/prepend_spec.rb6
-rw-r--r--spec/ruby/core/array/reject_spec.rb8
-rw-r--r--spec/ruby/core/array/reverse_spec.rb4
-rw-r--r--spec/ruby/core/array/rotate_spec.rb8
-rw-r--r--spec/ruby/core/array/sample_spec.rb51
-rw-r--r--spec/ruby/core/array/shared/clone.rb24
-rw-r--r--spec/ruby/core/array/shared/collect.rb47
-rw-r--r--spec/ruby/core/array/shared/inspect.rb26
-rw-r--r--spec/ruby/core/array/shared/intersection.rb84
-rw-r--r--spec/ruby/core/array/shared/join.rb81
-rw-r--r--spec/ruby/core/array/shared/keep_if.rb8
-rw-r--r--spec/ruby/core/array/shared/push.rb6
-rw-r--r--spec/ruby/core/array/shared/replace.rb4
-rw-r--r--spec/ruby/core/array/shared/slice.rb445
-rw-r--r--spec/ruby/core/array/shared/union.rb2
-rw-r--r--spec/ruby/core/array/shared/unshift.rb26
-rw-r--r--spec/ruby/core/array/shift_spec.rb24
-rw-r--r--spec/ruby/core/array/shuffle_spec.rb12
-rw-r--r--spec/ruby/core/array/slice_spec.rb90
-rw-r--r--spec/ruby/core/array/sort_by_spec.rb8
-rw-r--r--spec/ruby/core/array/sort_spec.rb22
-rw-r--r--spec/ruby/core/array/sum_spec.rb29
-rw-r--r--spec/ruby/core/array/take_spec.rb13
-rw-r--r--spec/ruby/core/array/take_while_spec.rb13
-rw-r--r--spec/ruby/core/array/to_h_spec.rb72
-rw-r--r--spec/ruby/core/array/union_spec.rb26
-rw-r--r--spec/ruby/core/array/uniq_spec.rb100
-rw-r--r--spec/ruby/core/array/values_at_spec.rb11
-rw-r--r--spec/ruby/core/array/zip_spec.rb6
-rw-r--r--spec/ruby/core/basicobject/instance_eval_spec.rb76
-rw-r--r--spec/ruby/core/basicobject/instance_exec_spec.rb8
-rw-r--r--spec/ruby/core/basicobject/singleton_method_added_spec.rb59
-rw-r--r--spec/ruby/core/binding/eval_spec.rb103
-rw-r--r--spec/ruby/core/binding/fixtures/classes.rb14
-rw-r--r--spec/ruby/core/binding/irb_spec.rb22
-rw-r--r--spec/ruby/core/binding/source_location_spec.rb10
-rw-r--r--spec/ruby/core/builtin_constants/builtin_constants_spec.rb16
-rw-r--r--spec/ruby/core/class/allocate_spec.rb2
-rw-r--r--spec/ruby/core/class/attached_object_spec.rb31
-rw-r--r--spec/ruby/core/class/initialize_spec.rb2
-rw-r--r--spec/ruby/core/class/new_spec.rb15
-rw-r--r--spec/ruby/core/class/subclasses_spec.rb60
-rw-r--r--spec/ruby/core/class/superclass_spec.rb2
-rw-r--r--spec/ruby/core/comparable/clamp_spec.rb78
-rw-r--r--spec/ruby/core/comparable/lt_spec.rb6
-rw-r--r--spec/ruby/core/complex/comparison_spec.rb25
-rw-r--r--spec/ruby/core/complex/equal_value_spec.rb2
-rw-r--r--spec/ruby/core/complex/exponent_spec.rb2
-rw-r--r--spec/ruby/core/complex/finite_spec.rb12
-rw-r--r--spec/ruby/core/complex/polar_spec.rb16
-rw-r--r--spec/ruby/core/complex/spaceship_spec.rb27
-rw-r--r--spec/ruby/core/complex/to_c_spec.rb12
-rw-r--r--spec/ruby/core/complex/to_f_spec.rb2
-rw-r--r--spec/ruby/core/complex/to_i_spec.rb2
-rw-r--r--spec/ruby/core/complex/to_r_spec.rb2
-rw-r--r--spec/ruby/core/conditionvariable/broadcast_spec.rb40
-rw-r--r--spec/ruby/core/conditionvariable/marshal_dump_spec.rb (renamed from spec/ruby/library/conditionvariable/marshal_dump_spec.rb)0
-rw-r--r--spec/ruby/core/conditionvariable/signal_spec.rb77
-rw-r--r--spec/ruby/core/conditionvariable/wait_spec.rb175
-rw-r--r--spec/ruby/core/data/constants_spec.rb32
-rw-r--r--spec/ruby/core/dir/children_spec.rb206
-rw-r--r--spec/ruby/core/dir/each_child_spec.rb147
-rw-r--r--spec/ruby/core/dir/entries_spec.rb6
-rw-r--r--spec/ruby/core/dir/exists_spec.rb15
-rw-r--r--spec/ruby/core/dir/fileno_spec.rb2
-rw-r--r--spec/ruby/core/dir/fixtures/common.rb37
-rw-r--r--spec/ruby/core/dir/foreach_spec.rb12
-rw-r--r--spec/ruby/core/dir/glob_spec.rb91
-rw-r--r--spec/ruby/core/dir/home_spec.rb49
-rw-r--r--spec/ruby/core/dir/mkdir_spec.rb52
-rw-r--r--spec/ruby/core/dir/read_spec.rb33
-rw-r--r--spec/ruby/core/dir/shared/chroot.rb9
-rw-r--r--spec/ruby/core/dir/shared/glob.rb217
-rw-r--r--spec/ruby/core/dir/shared/open.rb2
-rw-r--r--spec/ruby/core/encoding/compatible_spec.rb2
-rw-r--r--spec/ruby/core/encoding/converter/constants_spec.rb52
-rw-r--r--spec/ruby/core/encoding/converter/new_spec.rb4
-rw-r--r--spec/ruby/core/encoding/converter/putback_spec.rb13
-rw-r--r--spec/ruby/core/encoding/default_external_spec.rb8
-rw-r--r--spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb1
-rw-r--r--spec/ruby/core/encoding/list_spec.rb12
-rw-r--r--spec/ruby/core/encoding/locale_charmap_spec.rb21
-rw-r--r--spec/ruby/core/encoding/replicate_spec.rb97
-rw-r--r--spec/ruby/core/enumerable/all_spec.rb154
-rw-r--r--spec/ruby/core/enumerable/any_spec.rb158
-rw-r--r--spec/ruby/core/enumerable/chain_spec.rb30
-rw-r--r--spec/ruby/core/enumerable/chunk_spec.rb5
-rw-r--r--spec/ruby/core/enumerable/compact_spec.rb11
-rw-r--r--spec/ruby/core/enumerable/each_cons_spec.rb10
-rw-r--r--spec/ruby/core/enumerable/each_slice_spec.rb10
-rw-r--r--spec/ruby/core/enumerable/filter_map_spec.rb34
-rw-r--r--spec/ruby/core/enumerable/filter_spec.rb6
-rw-r--r--spec/ruby/core/enumerable/fixtures/classes.rb2
-rw-r--r--spec/ruby/core/enumerable/grep_spec.rb42
-rw-r--r--spec/ruby/core/enumerable/grep_v_spec.rb42
-rw-r--r--spec/ruby/core/enumerable/group_by_spec.rb10
-rw-r--r--spec/ruby/core/enumerable/minmax_spec.rb34
-rw-r--r--spec/ruby/core/enumerable/none_spec.rb120
-rw-r--r--spec/ruby/core/enumerable/one_spec.rb142
-rw-r--r--spec/ruby/core/enumerable/shared/collect.rb69
-rw-r--r--spec/ruby/core/enumerable/shared/entries.rb10
-rw-r--r--spec/ruby/core/enumerable/shared/inject.rb10
-rw-r--r--spec/ruby/core/enumerable/sort_spec.rb2
-rw-r--r--spec/ruby/core/enumerable/sum_spec.rb26
-rw-r--r--spec/ruby/core/enumerable/tally_spec.rb73
-rw-r--r--spec/ruby/core/enumerable/to_h_spec.rb80
-rw-r--r--spec/ruby/core/enumerable/uniq_spec.rb76
-rw-r--r--spec/ruby/core/enumerable/zip_spec.rb5
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/begin_spec.rb17
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/each_spec.rb24
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/end_spec.rb17
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/eq_spec.rb24
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/exclude_end_spec.rb22
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/first_spec.rb12
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/hash_spec.rb26
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/inspect_spec.rb26
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/last_spec.rb12
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/new_spec.rb24
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/size_spec.rb22
-rw-r--r--spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb16
-rw-r--r--spec/ruby/core/enumerator/chain/each_spec.rb18
-rw-r--r--spec/ruby/core/enumerator/chain/initialize_spec.rb44
-rw-r--r--spec/ruby/core/enumerator/chain/inspect_spec.rb20
-rw-r--r--spec/ruby/core/enumerator/chain/rewind_spec.rb96
-rw-r--r--spec/ruby/core/enumerator/chain/size_spec.rb30
-rw-r--r--spec/ruby/core/enumerator/each_spec.rb6
-rw-r--r--spec/ruby/core/enumerator/initialize_spec.rb10
-rw-r--r--spec/ruby/core/enumerator/lazy/chunk_while_spec.rb5
-rw-r--r--spec/ruby/core/enumerator/lazy/compact_spec.rb11
-rw-r--r--spec/ruby/core/enumerator/lazy/eager_spec.rb27
-rw-r--r--spec/ruby/core/enumerator/lazy/filter_map_spec.rb14
-rw-r--r--spec/ruby/core/enumerator/lazy/filter_spec.rb6
-rw-r--r--spec/ruby/core/enumerator/lazy/initialize_spec.rb2
-rw-r--r--spec/ruby/core/enumerator/lazy/lazy_spec.rb4
-rw-r--r--spec/ruby/core/enumerator/lazy/slice_after_spec.rb5
-rw-r--r--spec/ruby/core/enumerator/lazy/slice_before_spec.rb5
-rw-r--r--spec/ruby/core/enumerator/lazy/slice_when_spec.rb5
-rw-r--r--spec/ruby/core/enumerator/lazy/with_index_spec.rb36
-rw-r--r--spec/ruby/core/enumerator/new_spec.rb130
-rw-r--r--spec/ruby/core/enumerator/next_spec.rb11
-rw-r--r--spec/ruby/core/enumerator/plus_spec.rb46
-rw-r--r--spec/ruby/core/enumerator/produce_spec.rb34
-rw-r--r--spec/ruby/core/enumerator/yielder/append_spec.rb11
-rw-r--r--spec/ruby/core/enumerator/yielder/to_proc_spec.rb16
-rw-r--r--spec/ruby/core/enumerator/yielder/yield_spec.rb10
-rw-r--r--spec/ruby/core/env/delete_spec.rb7
-rw-r--r--spec/ruby/core/env/element_reference_spec.rb5
-rw-r--r--spec/ruby/core/env/empty_spec.rb6
-rw-r--r--spec/ruby/core/env/except_spec.rb36
-rw-r--r--spec/ruby/core/env/fetch_spec.rb3
-rw-r--r--spec/ruby/core/env/filter_spec.rb16
-rw-r--r--spec/ruby/core/env/fixtures/common.rb9
-rw-r--r--spec/ruby/core/env/index_spec.rb14
-rw-r--r--spec/ruby/core/env/merge_spec.rb6
-rw-r--r--spec/ruby/core/env/shared/key.rb14
-rw-r--r--spec/ruby/core/env/shared/update.rb38
-rw-r--r--spec/ruby/core/env/shift_spec.rb42
-rw-r--r--spec/ruby/core/env/slice_spec.rb40
-rw-r--r--spec/ruby/core/env/to_h_spec.rb100
-rw-r--r--spec/ruby/core/env/values_at_spec.rb3
-rw-r--r--spec/ruby/core/exception/backtrace_spec.rb2
-rw-r--r--spec/ruby/core/exception/destination_encoding_name_spec.rb23
-rw-r--r--spec/ruby/core/exception/destination_encoding_spec.rb23
-rw-r--r--spec/ruby/core/exception/errno_spec.rb27
-rw-r--r--spec/ruby/core/exception/error_bytes_spec.rb12
-rw-r--r--spec/ruby/core/exception/error_char_spec.rb12
-rw-r--r--spec/ruby/core/exception/exit_value_spec.rb10
-rw-r--r--spec/ruby/core/exception/frozen_error_spec.rb36
-rw-r--r--spec/ruby/core/exception/full_message_spec.rb160
-rw-r--r--spec/ruby/core/exception/hierarchy_spec.rb8
-rw-r--r--spec/ruby/core/exception/incomplete_input_spec.rb5
-rw-r--r--spec/ruby/core/exception/initialize_spec.rb1
-rw-r--r--spec/ruby/core/exception/interrupt_spec.rb27
-rw-r--r--spec/ruby/core/exception/io_error_spec.rb6
-rw-r--r--spec/ruby/core/exception/key_error_spec.rb20
-rw-r--r--spec/ruby/core/exception/name_error_spec.rb28
-rw-r--r--spec/ruby/core/exception/name_spec.rb4
-rw-r--r--spec/ruby/core/exception/no_method_error_spec.rb46
-rw-r--r--spec/ruby/core/exception/range_error_spec.rb7
-rw-r--r--spec/ruby/core/exception/readagain_bytes_spec.rb12
-rw-r--r--spec/ruby/core/exception/reason_spec.rb10
-rw-r--r--spec/ruby/core/exception/receiver_spec.rb6
-rw-r--r--spec/ruby/core/exception/result_spec.rb14
-rw-r--r--spec/ruby/core/exception/signal_exception_spec.rb12
-rw-r--r--spec/ruby/core/exception/signm_spec.rb6
-rw-r--r--spec/ruby/core/exception/signo_spec.rb6
-rw-r--r--spec/ruby/core/exception/source_encoding_name_spec.rb23
-rw-r--r--spec/ruby/core/exception/source_encoding_spec.rb23
-rw-r--r--spec/ruby/core/exception/status_spec.rb6
-rw-r--r--spec/ruby/core/exception/success_spec.rb12
-rw-r--r--spec/ruby/core/exception/system_call_error_spec.rb15
-rw-r--r--spec/ruby/core/exception/system_exit_spec.rb59
-rw-r--r--spec/ruby/core/exception/system_stack_error_spec.rb7
-rw-r--r--spec/ruby/core/exception/top_level_spec.rb45
-rw-r--r--spec/ruby/core/exception/uncaught_throw_error_spec.rb6
-rw-r--r--spec/ruby/core/false/case_compare_spec.rb14
-rw-r--r--spec/ruby/core/false/to_s_spec.rb12
-rw-r--r--spec/ruby/core/fiber/blocking_spec.rb79
-rw-r--r--spec/ruby/core/fiber/fixtures/classes.rb12
-rw-r--r--spec/ruby/core/fiber/raise_spec.rb119
-rw-r--r--spec/ruby/core/fiber/resume_spec.rb37
-rw-r--r--spec/ruby/core/fiber/shared/blocking.rb41
-rw-r--r--spec/ruby/core/fiber/storage_spec.rb117
-rw-r--r--spec/ruby/core/file/absolute_path_spec.rb80
-rw-r--r--spec/ruby/core/file/atime_spec.rb22
-rw-r--r--spec/ruby/core/file/basename_spec.rb15
-rw-r--r--spec/ruby/core/file/ctime_spec.rb4
-rw-r--r--spec/ruby/core/file/dirname_spec.rb16
-rw-r--r--spec/ruby/core/file/exists_spec.rb6
-rw-r--r--spec/ruby/core/file/expand_path_spec.rb6
-rw-r--r--spec/ruby/core/file/extname_spec.rb14
-rw-r--r--spec/ruby/core/file/ftype_spec.rb8
-rw-r--r--spec/ruby/core/file/join_spec.rb9
-rw-r--r--spec/ruby/core/file/lchmod_spec.rb22
-rw-r--r--spec/ruby/core/file/link_spec.rb2
-rw-r--r--spec/ruby/core/file/lstat_spec.rb4
-rw-r--r--spec/ruby/core/file/lutime_spec.rb58
-rw-r--r--spec/ruby/core/file/mtime_spec.rb20
-rw-r--r--spec/ruby/core/file/open_spec.rb66
-rw-r--r--spec/ruby/core/file/realpath_spec.rb6
-rw-r--r--spec/ruby/core/file/shared/fnmatch.rb16
-rw-r--r--spec/ruby/core/file/shared/path.rb37
-rw-r--r--spec/ruby/core/file/shared/read.rb4
-rw-r--r--spec/ruby/core/file/size_spec.rb4
-rw-r--r--spec/ruby/core/file/stat/nlink_spec.rb2
-rw-r--r--spec/ruby/core/file/stat/owned_spec.rb6
-rw-r--r--spec/ruby/core/file/stat/pipe_spec.rb4
-rw-r--r--spec/ruby/core/file/stat_spec.rb18
-rw-r--r--spec/ruby/core/file/truncate_spec.rb6
-rw-r--r--spec/ruby/core/file/umask_spec.rb4
-rw-r--r--spec/ruby/core/file/utime_spec.rb53
-rw-r--r--spec/ruby/core/filetest/exists_spec.rb6
-rw-r--r--spec/ruby/core/float/coerce_spec.rb4
-rw-r--r--spec/ruby/core/float/comparison_spec.rb91
-rw-r--r--spec/ruby/core/float/divide_spec.rb4
-rw-r--r--spec/ruby/core/float/divmod_spec.rb4
-rw-r--r--spec/ruby/core/float/finite_spec.rb8
-rw-r--r--spec/ruby/core/float/gt_spec.rb21
-rw-r--r--spec/ruby/core/float/gte_spec.rb21
-rw-r--r--spec/ruby/core/float/inspect_spec.rb6
-rw-r--r--spec/ruby/core/float/lt_spec.rb21
-rw-r--r--spec/ruby/core/float/lte_spec.rb21
-rw-r--r--spec/ruby/core/float/minus_spec.rb2
-rw-r--r--spec/ruby/core/float/multiply_spec.rb2
-rw-r--r--spec/ruby/core/float/nan_spec.rb6
-rw-r--r--spec/ruby/core/float/negative_spec.rb33
-rw-r--r--spec/ruby/core/float/next_float_spec.rb2
-rw-r--r--spec/ruby/core/float/plus_spec.rb2
-rw-r--r--spec/ruby/core/float/positive_spec.rb33
-rw-r--r--spec/ruby/core/float/prev_float_spec.rb2
-rw-r--r--spec/ruby/core/float/round_spec.rb77
-rw-r--r--spec/ruby/core/float/shared/arithmetic_exception_in_coerce.rb32
-rw-r--r--spec/ruby/core/float/shared/comparison_exception_in_coerce.rb34
-rw-r--r--spec/ruby/core/float/shared/equal.rb21
-rw-r--r--spec/ruby/core/float/shared/quo.rb4
-rw-r--r--spec/ruby/core/float/shared/to_i.rb4
-rw-r--r--spec/ruby/core/float/shared/to_s.rb308
-rw-r--r--spec/ruby/core/float/to_s_spec.rb308
-rw-r--r--spec/ruby/core/float/uminus_spec.rb2
-rw-r--r--spec/ruby/core/float/zero_spec.rb6
-rw-r--r--spec/ruby/core/gc/auto_compact_spec.rb26
-rw-r--r--spec/ruby/core/gc/disable_spec.rb2
-rw-r--r--spec/ruby/core/gc/enable_spec.rb2
-rw-r--r--spec/ruby/core/gc/measure_total_time_spec.rb19
-rw-r--r--spec/ruby/core/gc/profiler/disable_spec.rb2
-rw-r--r--spec/ruby/core/gc/profiler/enable_spec.rb2
-rw-r--r--spec/ruby/core/gc/start_spec.rb4
-rw-r--r--spec/ruby/core/gc/stat_spec.rb62
-rw-r--r--spec/ruby/core/gc/total_time_spec.rb15
-rw-r--r--spec/ruby/core/hash/any_spec.rb4
-rw-r--r--spec/ruby/core/hash/clear_spec.rb6
-rw-r--r--spec/ruby/core/hash/compact_spec.rb4
-rw-r--r--spec/ruby/core/hash/compare_by_identity_spec.rb6
-rw-r--r--spec/ruby/core/hash/constructor_spec.rb27
-rw-r--r--spec/ruby/core/hash/deconstruct_keys_spec.rb23
-rw-r--r--spec/ruby/core/hash/default_proc_spec.rb6
-rw-r--r--spec/ruby/core/hash/default_spec.rb6
-rw-r--r--spec/ruby/core/hash/delete_if_spec.rb6
-rw-r--r--spec/ruby/core/hash/delete_spec.rb6
-rw-r--r--spec/ruby/core/hash/element_reference_spec.rb14
-rw-r--r--spec/ruby/core/hash/empty_spec.rb10
-rw-r--r--spec/ruby/core/hash/except_spec.rb34
-rw-r--r--spec/ruby/core/hash/filter_spec.rb12
-rw-r--r--spec/ruby/core/hash/fixtures/name.rb30
-rw-r--r--spec/ruby/core/hash/hash_spec.rb9
-rw-r--r--spec/ruby/core/hash/index_spec.rb6
-rw-r--r--spec/ruby/core/hash/initialize_spec.rb10
-rw-r--r--spec/ruby/core/hash/keep_if_spec.rb6
-rw-r--r--spec/ruby/core/hash/merge_spec.rb24
-rw-r--r--spec/ruby/core/hash/rehash_spec.rb24
-rw-r--r--spec/ruby/core/hash/reject_spec.rb15
-rw-r--r--spec/ruby/core/hash/ruby2_keywords_hash_spec.rb59
-rw-r--r--spec/ruby/core/hash/shared/each.rb53
-rw-r--r--spec/ruby/core/hash/shared/eql.rb84
-rw-r--r--spec/ruby/core/hash/shared/index.rb22
-rw-r--r--spec/ruby/core/hash/shared/replace.rb8
-rw-r--r--spec/ruby/core/hash/shared/select.rb8
-rw-r--r--spec/ruby/core/hash/shared/store.rb25
-rw-r--r--spec/ruby/core/hash/shared/to_s.rb17
-rw-r--r--spec/ruby/core/hash/shared/update.rb26
-rw-r--r--spec/ruby/core/hash/shift_spec.rb48
-rw-r--r--spec/ruby/core/hash/slice_spec.rb82
-rw-r--r--spec/ruby/core/hash/to_a_spec.rb10
-rw-r--r--spec/ruby/core/hash/to_h_spec.rb58
-rw-r--r--spec/ruby/core/hash/to_proc_spec.rb16
-rw-r--r--spec/ruby/core/hash/transform_keys_spec.rb203
-rw-r--r--spec/ruby/core/hash/transform_values_spec.rb8
-rw-r--r--spec/ruby/core/integer/allbits_spec.rb62
-rw-r--r--spec/ruby/core/integer/anybits_spec.rb60
-rw-r--r--spec/ruby/core/integer/bit_and_spec.rb14
-rw-r--r--spec/ruby/core/integer/bit_or_spec.rb33
-rw-r--r--spec/ruby/core/integer/bit_xor_spec.rb35
-rw-r--r--spec/ruby/core/integer/chr_spec.rb58
-rw-r--r--spec/ruby/core/integer/coerce_spec.rb10
-rw-r--r--spec/ruby/core/integer/comparison_spec.rb24
-rw-r--r--spec/ruby/core/integer/complement_spec.rb6
-rw-r--r--spec/ruby/core/integer/constants_spec.rb36
-rw-r--r--spec/ruby/core/integer/digits_spec.rb9
-rw-r--r--spec/ruby/core/integer/div_spec.rb12
-rw-r--r--spec/ruby/core/integer/divide_spec.rb20
-rw-r--r--spec/ruby/core/integer/divmod_spec.rb12
-rw-r--r--spec/ruby/core/integer/downto_spec.rb2
-rw-r--r--spec/ruby/core/integer/element_reference_spec.rb77
-rw-r--r--spec/ruby/core/integer/fdiv_spec.rb51
-rw-r--r--spec/ruby/core/integer/gcd_spec.rb4
-rw-r--r--spec/ruby/core/integer/gcdlcm_spec.rb4
-rw-r--r--spec/ruby/core/integer/gt_spec.rb8
-rw-r--r--spec/ruby/core/integer/gte_spec.rb8
-rw-r--r--spec/ruby/core/integer/integer_spec.rb6
-rw-r--r--spec/ruby/core/integer/lcm_spec.rb4
-rw-r--r--spec/ruby/core/integer/left_shift_spec.rb70
-rw-r--r--spec/ruby/core/integer/lt_spec.rb8
-rw-r--r--spec/ruby/core/integer/lte_spec.rb13
-rw-r--r--spec/ruby/core/integer/minus_spec.rb14
-rw-r--r--spec/ruby/core/integer/multiply_spec.rb14
-rw-r--r--spec/ruby/core/integer/nobits_spec.rb60
-rw-r--r--spec/ruby/core/integer/plus_spec.rb31
-rw-r--r--spec/ruby/core/integer/pow_spec.rb82
-rw-r--r--spec/ruby/core/integer/remainder_spec.rb2
-rw-r--r--spec/ruby/core/integer/right_shift_spec.rb74
-rw-r--r--spec/ruby/core/integer/round_spec.rb26
-rw-r--r--spec/ruby/core/integer/shared/abs.rb4
-rw-r--r--spec/ruby/core/integer/shared/comparison_coerce.rb22
-rw-r--r--spec/ruby/core/integer/shared/equal.rb4
-rw-r--r--spec/ruby/core/integer/shared/exponent.rb20
-rw-r--r--spec/ruby/core/integer/shared/integer_rounding.rb16
-rw-r--r--spec/ruby/core/integer/shared/modulo.rb10
-rw-r--r--spec/ruby/core/integer/sqrt_spec.rb46
-rw-r--r--spec/ruby/core/integer/to_f_spec.rb6
-rw-r--r--spec/ruby/core/integer/to_r_spec.rb2
-rw-r--r--spec/ruby/core/integer/to_s_spec.rb6
-rw-r--r--spec/ruby/core/integer/try_convert_spec.rb40
-rw-r--r--spec/ruby/core/integer/uminus_spec.rb8
-rw-r--r--spec/ruby/core/integer/upto_spec.rb2
-rw-r--r--spec/ruby/core/integer/zero_spec.rb21
-rw-r--r--spec/ruby/core/io/advise_spec.rb14
-rw-r--r--spec/ruby/core/io/binmode_spec.rb4
-rw-r--r--spec/ruby/core/io/bytes_spec.rb66
-rw-r--r--spec/ruby/core/io/chars_spec.rb28
-rw-r--r--spec/ruby/core/io/close_on_exec_spec.rb16
-rw-r--r--spec/ruby/core/io/close_read_spec.rb2
-rw-r--r--spec/ruby/core/io/close_spec.rb53
-rw-r--r--spec/ruby/core/io/close_write_spec.rb2
-rw-r--r--spec/ruby/core/io/codepoints_spec.rb43
-rw-r--r--spec/ruby/core/io/copy_stream_spec.rb40
-rw-r--r--spec/ruby/core/io/dup_spec.rb31
-rw-r--r--spec/ruby/core/io/each_codepoint_spec.rb2
-rw-r--r--spec/ruby/core/io/eof_spec.rb26
-rw-r--r--spec/ruby/core/io/external_encoding_spec.rb9
-rw-r--r--spec/ruby/core/io/fixtures/classes.rb33
-rw-r--r--spec/ruby/core/io/fixtures/copy_in_out.rb2
-rw-r--r--spec/ruby/core/io/gets_spec.rb52
-rw-r--r--spec/ruby/core/io/initialize_spec.rb2
-rw-r--r--spec/ruby/core/io/internal_encoding_spec.rb9
-rw-r--r--spec/ruby/core/io/ioctl_spec.rb4
-rw-r--r--spec/ruby/core/io/lineno_spec.rb45
-rw-r--r--spec/ruby/core/io/lines_spec.rb54
-rw-r--r--spec/ruby/core/io/new_spec.rb2
-rw-r--r--spec/ruby/core/io/nonblock_spec.rb70
-rw-r--r--spec/ruby/core/io/open_spec.rb4
-rw-r--r--spec/ruby/core/io/path_spec.rb14
-rw-r--r--spec/ruby/core/io/pipe_spec.rb23
-rw-r--r--spec/ruby/core/io/popen_spec.rb4
-rw-r--r--spec/ruby/core/io/pread_spec.rb74
-rw-r--r--spec/ruby/core/io/print_spec.rb27
-rw-r--r--spec/ruby/core/io/puts_spec.rb6
-rw-r--r--spec/ruby/core/io/pwrite_spec.rb62
-rw-r--r--spec/ruby/core/io/read_nonblock_spec.rb51
-rw-r--r--spec/ruby/core/io/read_spec.rb27
-rw-r--r--spec/ruby/core/io/readchar_spec.rb66
-rw-r--r--spec/ruby/core/io/readline_spec.rb35
-rw-r--r--spec/ruby/core/io/readlines_spec.rb70
-rw-r--r--spec/ruby/core/io/readpartial_spec.rb17
-rw-r--r--spec/ruby/core/io/reopen_spec.rb8
-rw-r--r--spec/ruby/core/io/rewind_spec.rb17
-rw-r--r--spec/ruby/core/io/seek_spec.rb6
-rw-r--r--spec/ruby/core/io/set_encoding_by_bom_spec.rb262
-rw-r--r--spec/ruby/core/io/set_encoding_spec.rb49
-rw-r--r--spec/ruby/core/io/shared/each.rb88
-rw-r--r--spec/ruby/core/io/shared/new.rb56
-rw-r--r--spec/ruby/core/io/shared/pos.rb10
-rw-r--r--spec/ruby/core/io/shared/readlines.rb156
-rw-r--r--spec/ruby/core/io/shared/write.rb10
-rw-r--r--spec/ruby/core/io/sysopen_spec.rb4
-rw-r--r--spec/ruby/core/io/sysread_spec.rb36
-rw-r--r--spec/ruby/core/io/sysseek_spec.rb7
-rw-r--r--spec/ruby/core/io/syswrite_spec.rb10
-rw-r--r--spec/ruby/core/io/ungetbyte_spec.rb29
-rw-r--r--spec/ruby/core/io/ungetc_spec.rb25
-rw-r--r--spec/ruby/core/io/write_nonblock_spec.rb12
-rw-r--r--spec/ruby/core/io/write_spec.rb52
-rw-r--r--spec/ruby/core/kernel/Complex_spec.rb151
-rw-r--r--spec/ruby/core/kernel/Float_spec.rb38
-rw-r--r--spec/ruby/core/kernel/Integer_spec.rb169
-rw-r--r--spec/ruby/core/kernel/__dir___spec.rb23
-rw-r--r--spec/ruby/core/kernel/at_exit_spec.rb32
-rw-r--r--spec/ruby/core/kernel/autoload_spec.rb19
-rw-r--r--spec/ruby/core/kernel/backtick_spec.rb28
-rw-r--r--spec/ruby/core/kernel/caller_locations_spec.rb54
-rw-r--r--spec/ruby/core/kernel/caller_spec.rb26
-rw-r--r--spec/ruby/core/kernel/class_spec.rb2
-rw-r--r--spec/ruby/core/kernel/clone_spec.rb135
-rw-r--r--spec/ruby/core/kernel/define_singleton_method_spec.rb15
-rw-r--r--spec/ruby/core/kernel/dup_spec.rb2
-rw-r--r--spec/ruby/core/kernel/eval_spec.rb91
-rw-r--r--spec/ruby/core/kernel/extend_spec.rb4
-rw-r--r--spec/ruby/core/kernel/fixtures/Complex.rb5
-rw-r--r--spec/ruby/core/kernel/fixtures/__dir__.rb2
-rw-r--r--spec/ruby/core/kernel/fixtures/at_exit.rb3
-rw-r--r--spec/ruby/core/kernel/fixtures/classes.rb36
-rw-r--r--spec/ruby/core/kernel/fixtures/warn_core_method.rb14
-rw-r--r--spec/ruby/core/kernel/fixtures/warn_require.rb1
-rw-r--r--spec/ruby/core/kernel/fixtures/warn_require_caller.rb2
-rw-r--r--spec/ruby/core/kernel/format_spec.rb1
-rw-r--r--spec/ruby/core/kernel/freeze_spec.rb32
-rw-r--r--spec/ruby/core/kernel/frozen_spec.rb40
-rw-r--r--spec/ruby/core/kernel/initialize_clone_spec.rb28
-rw-r--r--spec/ruby/core/kernel/initialize_copy_spec.rb29
-rw-r--r--spec/ruby/core/kernel/initialize_dup_spec.rb20
-rw-r--r--spec/ruby/core/kernel/inspect_spec.rb18
-rw-r--r--spec/ruby/core/kernel/instance_of_spec.rb2
-rw-r--r--spec/ruby/core/kernel/instance_variable_get_spec.rb8
-rw-r--r--spec/ruby/core/kernel/instance_variable_set_spec.rb22
-rw-r--r--spec/ruby/core/kernel/instance_variables_spec.rb15
-rw-r--r--spec/ruby/core/kernel/iterator_spec.rb14
-rw-r--r--spec/ruby/core/kernel/lambda_spec.rb44
-rw-r--r--spec/ruby/core/kernel/match_spec.rb28
-rw-r--r--spec/ruby/core/kernel/method_spec.rb24
-rw-r--r--spec/ruby/core/kernel/nil_spec.rb10
-rw-r--r--spec/ruby/core/kernel/open_spec.rb27
-rw-r--r--spec/ruby/core/kernel/p_spec.rb14
-rw-r--r--spec/ruby/core/kernel/pp_spec.rb12
-rw-r--r--spec/ruby/core/kernel/print_spec.rb12
-rw-r--r--spec/ruby/core/kernel/printf_spec.rb17
-rw-r--r--spec/ruby/core/kernel/proc_spec.rb26
-rw-r--r--spec/ruby/core/kernel/public_send_spec.rb8
-rw-r--r--spec/ruby/core/kernel/raise_spec.rb40
-rw-r--r--spec/ruby/core/kernel/rand_spec.rb46
-rw-r--r--spec/ruby/core/kernel/remove_instance_variable_spec.rb13
-rw-r--r--spec/ruby/core/kernel/require_relative_spec.rb12
-rw-r--r--spec/ruby/core/kernel/respond_to_spec.rb3
-rw-r--r--spec/ruby/core/kernel/shared/dup_clone.rb50
-rw-r--r--spec/ruby/core/kernel/shared/lambda.rb4
-rw-r--r--spec/ruby/core/kernel/shared/load.rb45
-rw-r--r--spec/ruby/core/kernel/shared/method.rb8
-rw-r--r--spec/ruby/core/kernel/shared/require.rb133
-rw-r--r--spec/ruby/core/kernel/shared/sprintf.rb984
-rw-r--r--spec/ruby/core/kernel/shared/sprintf_encoding.rb51
-rw-r--r--spec/ruby/core/kernel/singleton_class_spec.rb4
-rw-r--r--spec/ruby/core/kernel/sleep_spec.rb8
-rw-r--r--spec/ruby/core/kernel/srand_spec.rb18
-rw-r--r--spec/ruby/core/kernel/system_spec.rb20
-rw-r--r--spec/ruby/core/kernel/taint_spec.rb44
-rw-r--r--spec/ruby/core/kernel/tainted_spec.rb15
-rw-r--r--spec/ruby/core/kernel/then_spec.rb6
-rw-r--r--spec/ruby/core/kernel/to_s_spec.rb10
-rw-r--r--spec/ruby/core/kernel/trap_spec.rb5
-rw-r--r--spec/ruby/core/kernel/trust_spec.rb25
-rw-r--r--spec/ruby/core/kernel/untaint_spec.rb25
-rw-r--r--spec/ruby/core/kernel/untrust_spec.rb24
-rw-r--r--spec/ruby/core/kernel/untrusted_spec.rb28
-rw-r--r--spec/ruby/core/kernel/warn_spec.rb243
-rw-r--r--spec/ruby/core/kernel/yield_self_spec.rb6
-rw-r--r--spec/ruby/core/main/fixtures/classes.rb8
-rw-r--r--spec/ruby/core/main/fixtures/using.rb1
-rw-r--r--spec/ruby/core/main/fixtures/using_in_main.rb5
-rw-r--r--spec/ruby/core/main/fixtures/using_in_method.rb5
-rw-r--r--spec/ruby/core/main/private_spec.rb43
-rw-r--r--spec/ruby/core/main/public_spec.rb40
-rw-r--r--spec/ruby/core/main/ruby2_keywords_spec.rb9
-rw-r--r--spec/ruby/core/main/using_spec.rb20
-rw-r--r--spec/ruby/core/marshal/dump_spec.rb117
-rw-r--r--spec/ruby/core/marshal/fixtures/classes.rb4
-rw-r--r--spec/ruby/core/marshal/fixtures/marshal_data.rb62
-rw-r--r--spec/ruby/core/marshal/shared/load.rb379
-rw-r--r--spec/ruby/core/matchdata/allocate_spec.rb8
-rw-r--r--spec/ruby/core/matchdata/captures_spec.rb8
-rw-r--r--spec/ruby/core/matchdata/element_reference_spec.rb29
-rw-r--r--spec/ruby/core/matchdata/fixtures/classes.rb3
-rw-r--r--spec/ruby/core/matchdata/match_length_spec.rb34
-rw-r--r--spec/ruby/core/matchdata/match_spec.rb34
-rw-r--r--spec/ruby/core/matchdata/post_match_spec.rb26
-rw-r--r--spec/ruby/core/matchdata/pre_match_spec.rb26
-rw-r--r--spec/ruby/core/matchdata/string_spec.rb4
-rw-r--r--spec/ruby/core/matchdata/to_a_spec.rb8
-rw-r--r--spec/ruby/core/matchdata/to_s_spec.rb8
-rw-r--r--spec/ruby/core/matchdata/values_at_spec.rb73
-rw-r--r--spec/ruby/core/math/ldexp_spec.rb6
-rw-r--r--spec/ruby/core/math/log2_spec.rb2
-rw-r--r--spec/ruby/core/math/sqrt_spec.rb4
-rw-r--r--spec/ruby/core/math/tan_spec.rb4
-rw-r--r--spec/ruby/core/method/case_compare_spec.rb6
-rw-r--r--spec/ruby/core/method/compose_spec.rb133
-rw-r--r--spec/ruby/core/method/fixtures/classes.rb36
-rw-r--r--spec/ruby/core/method/owner_spec.rb6
-rw-r--r--spec/ruby/core/method/parameters_spec.rb15
-rw-r--r--spec/ruby/core/method/private_spec.rb21
-rw-r--r--spec/ruby/core/method/protected_spec.rb21
-rw-r--r--spec/ruby/core/method/public_spec.rb21
-rw-r--r--spec/ruby/core/method/shared/to_s.rb53
-rw-r--r--spec/ruby/core/method/source_location_spec.rb22
-rw-r--r--spec/ruby/core/method/super_method_spec.rb21
-rw-r--r--spec/ruby/core/method/unbind_spec.rb37
-rw-r--r--spec/ruby/core/module/alias_method_spec.rb40
-rw-r--r--spec/ruby/core/module/allocate_spec.rb14
-rw-r--r--spec/ruby/core/module/append_features_spec.rb18
-rw-r--r--spec/ruby/core/module/attr_accessor_spec.rb48
-rw-r--r--spec/ruby/core/module/attr_reader_spec.rb23
-rw-r--r--spec/ruby/core/module/attr_spec.rb27
-rw-r--r--spec/ruby/core/module/attr_writer_spec.rb35
-rw-r--r--spec/ruby/core/module/autoload_spec.rb193
-rw-r--r--spec/ruby/core/module/class_variable_defined_spec.rb2
-rw-r--r--spec/ruby/core/module/class_variable_get_spec.rb2
-rw-r--r--spec/ruby/core/module/class_variable_set_spec.rb8
-rw-r--r--spec/ruby/core/module/class_variables_spec.rb8
-rw-r--r--spec/ruby/core/module/const_added_spec.rb125
-rw-r--r--spec/ruby/core/module/const_defined_spec.rb12
-rw-r--r--spec/ruby/core/module/const_get_spec.rb22
-rw-r--r--spec/ruby/core/module/const_set_spec.rb25
-rw-r--r--spec/ruby/core/module/const_source_location_spec.rb225
-rw-r--r--spec/ruby/core/module/constants_spec.rb20
-rw-r--r--spec/ruby/core/module/define_method_spec.rb155
-rw-r--r--spec/ruby/core/module/deprecate_constant_spec.rb23
-rw-r--r--spec/ruby/core/module/extend_object_spec.rb14
-rw-r--r--spec/ruby/core/module/fixtures/autoload_during_require_current_file.rb5
-rw-r--r--spec/ruby/core/module/fixtures/autoload_location.rb3
-rw-r--r--spec/ruby/core/module/fixtures/autoload_required_directly_no_constant.rb2
-rw-r--r--spec/ruby/core/module/fixtures/classes.rb13
-rw-r--r--spec/ruby/core/module/fixtures/refine.rb12
-rw-r--r--spec/ruby/core/module/include_spec.rb323
-rw-r--r--spec/ruby/core/module/included_modules_spec.rb2
-rw-r--r--spec/ruby/core/module/included_spec.rb2
-rw-r--r--spec/ruby/core/module/instance_method_spec.rb42
-rw-r--r--spec/ruby/core/module/method_added_spec.rb21
-rw-r--r--spec/ruby/core/module/method_defined_spec.rb92
-rw-r--r--spec/ruby/core/module/module_function_spec.rb40
-rw-r--r--spec/ruby/core/module/name_spec.rb50
-rw-r--r--spec/ruby/core/module/prepend_features_spec.rb14
-rw-r--r--spec/ruby/core/module/prepend_spec.rb422
-rw-r--r--spec/ruby/core/module/private_class_method_spec.rb12
-rw-r--r--spec/ruby/core/module/private_method_defined_spec.rb90
-rw-r--r--spec/ruby/core/module/private_spec.rb24
-rw-r--r--spec/ruby/core/module/protected_method_defined_spec.rb90
-rw-r--r--spec/ruby/core/module/protected_spec.rb24
-rw-r--r--spec/ruby/core/module/public_class_method_spec.rb16
-rw-r--r--spec/ruby/core/module/public_method_defined_spec.rb2
-rw-r--r--spec/ruby/core/module/public_spec.rb25
-rw-r--r--spec/ruby/core/module/refine_spec.rb713
-rw-r--r--spec/ruby/core/module/remove_const_spec.rb21
-rw-r--r--spec/ruby/core/module/remove_method_spec.rb41
-rw-r--r--spec/ruby/core/module/ruby2_keywords_spec.rb319
-rw-r--r--spec/ruby/core/module/shared/class_eval.rb65
-rw-r--r--spec/ruby/core/module/shared/set_visibility.rb34
-rw-r--r--spec/ruby/core/module/singleton_class_spec.rb10
-rw-r--r--spec/ruby/core/module/to_s_spec.rb23
-rw-r--r--spec/ruby/core/module/undef_method_spec.rb19
-rw-r--r--spec/ruby/core/module/using_spec.rb90
-rw-r--r--spec/ruby/core/mutex/owned_spec.rb12
-rw-r--r--spec/ruby/core/mutex/sleep_spec.rb18
-rw-r--r--spec/ruby/core/mutex/unlock_spec.rb2
-rw-r--r--spec/ruby/core/nil/case_compare_spec.rb13
-rw-r--r--spec/ruby/core/nil/match_spec.rb28
-rw-r--r--spec/ruby/core/nil/nil_spec.rb2
-rw-r--r--spec/ruby/core/nil/to_i_spec.rb2
-rw-r--r--spec/ruby/core/nil/to_s_spec.rb12
-rw-r--r--spec/ruby/core/numeric/clone_spec.rb32
-rw-r--r--spec/ruby/core/numeric/dup_spec.rb16
-rw-r--r--spec/ruby/core/numeric/integer_spec.rb2
-rw-r--r--spec/ruby/core/numeric/negative_spec.rb4
-rw-r--r--spec/ruby/core/numeric/positive_spec.rb4
-rw-r--r--spec/ruby/core/numeric/quo_spec.rb11
-rw-r--r--spec/ruby/core/numeric/real_spec.rb2
-rw-r--r--spec/ruby/core/numeric/shared/step.rb91
-rw-r--r--spec/ruby/core/numeric/step_spec.rb120
-rw-r--r--spec/ruby/core/numeric/zero_spec.rb4
-rw-r--r--spec/ruby/core/objectspace/_id2ref_spec.rb41
-rw-r--r--spec/ruby/core/objectspace/define_finalizer_spec.rb150
-rw-r--r--spec/ruby/core/objectspace/garbage_collect_spec.rb4
-rw-r--r--spec/ruby/core/objectspace/weakmap/each_key_spec.rb11
-rw-r--r--spec/ruby/core/objectspace/weakmap/each_pair_spec.rb11
-rw-r--r--spec/ruby/core/objectspace/weakmap/each_spec.rb11
-rw-r--r--spec/ruby/core/objectspace/weakmap/each_value_spec.rb11
-rw-r--r--spec/ruby/core/objectspace/weakmap/element_reference_spec.rb24
-rw-r--r--spec/ruby/core/objectspace/weakmap/element_set_spec.rb38
-rw-r--r--spec/ruby/core/objectspace/weakmap/include_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/inspect_spec.rb25
-rw-r--r--spec/ruby/core/objectspace/weakmap/key_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/keys_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/length_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/member_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/shared/each.rb10
-rw-r--r--spec/ruby/core/objectspace/weakmap/shared/include.rb30
-rw-r--r--spec/ruby/core/objectspace/weakmap/shared/members.rb14
-rw-r--r--spec/ruby/core/objectspace/weakmap/shared/size.rb14
-rw-r--r--spec/ruby/core/objectspace/weakmap/size_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap/values_spec.rb6
-rw-r--r--spec/ruby/core/objectspace/weakmap_spec.rb12
-rw-r--r--spec/ruby/core/proc/block_pass_spec.rb22
-rw-r--r--spec/ruby/core/proc/compose_spec.rb190
-rw-r--r--spec/ruby/core/proc/eql_spec.rb8
-rw-r--r--spec/ruby/core/proc/equal_value_spec.rb8
-rw-r--r--spec/ruby/core/proc/fixtures/source_location.rb2
-rw-r--r--spec/ruby/core/proc/hash_spec.rb2
-rw-r--r--spec/ruby/core/proc/lambda_spec.rb4
-rw-r--r--spec/ruby/core/proc/new_spec.rb51
-rw-r--r--spec/ruby/core/proc/parameters_spec.rb31
-rw-r--r--spec/ruby/core/proc/ruby2_keywords_spec.rb78
-rw-r--r--spec/ruby/core/proc/shared/call.rb3
-rw-r--r--spec/ruby/core/proc/shared/call_arguments.rb2
-rw-r--r--spec/ruby/core/proc/shared/compose.rb51
-rw-r--r--spec/ruby/core/proc/shared/equal.rb14
-rw-r--r--spec/ruby/core/proc/shared/to_s.rb19
-rw-r--r--spec/ruby/core/proc/source_location_spec.rb10
-rw-r--r--spec/ruby/core/process/_fork_spec.rb24
-rw-r--r--spec/ruby/core/process/clock_getres_spec.rb40
-rw-r--r--spec/ruby/core/process/clock_gettime_spec.rb101
-rw-r--r--spec/ruby/core/process/constants_spec.rb23
-rw-r--r--spec/ruby/core/process/daemon_spec.rb3
-rw-r--r--spec/ruby/core/process/detach_spec.rb29
-rw-r--r--spec/ruby/core/process/egid_spec.rb41
-rw-r--r--spec/ruby/core/process/euid_spec.rb14
-rw-r--r--spec/ruby/core/process/exec_spec.rb20
-rw-r--r--spec/ruby/core/process/fixtures/clocks.rb42
-rw-r--r--spec/ruby/core/process/getpriority_spec.rb8
-rw-r--r--spec/ruby/core/process/getrlimit_spec.rb13
-rw-r--r--spec/ruby/core/process/groups_spec.rb4
-rw-r--r--spec/ruby/core/process/kill_spec.rb2
-rw-r--r--spec/ruby/core/process/last_status_spec.rb26
-rw-r--r--spec/ruby/core/process/maxgroups_spec.rb2
-rw-r--r--spec/ruby/core/process/pid_spec.rb2
-rw-r--r--spec/ruby/core/process/setrlimit_spec.rb13
-rw-r--r--spec/ruby/core/process/spawn_spec.rb124
-rw-r--r--spec/ruby/core/process/status/equal_value_spec.rb4
-rw-r--r--spec/ruby/core/process/status/exited_spec.rb7
-rw-r--r--spec/ruby/core/process/status/exitstatus_spec.rb4
-rw-r--r--spec/ruby/core/process/status/signaled_spec.rb6
-rw-r--r--spec/ruby/core/process/status/success_spec.rb14
-rw-r--r--spec/ruby/core/process/status/termsig_spec.rb4
-rw-r--r--spec/ruby/core/process/status/to_i_spec.rb4
-rw-r--r--spec/ruby/core/process/status/wait_spec.rb102
-rw-r--r--spec/ruby/core/process/times_spec.rb39
-rw-r--r--spec/ruby/core/process/wait2_spec.rb9
-rw-r--r--spec/ruby/core/process/wait_spec.rb3
-rw-r--r--spec/ruby/core/queue/initialize_spec.rb49
-rw-r--r--spec/ruby/core/random/bytes_spec.rb8
-rw-r--r--spec/ruby/core/random/default_spec.rb42
-rw-r--r--spec/ruby/core/random/new_seed_spec.rb4
-rw-r--r--spec/ruby/core/random/new_spec.rb2
-rw-r--r--spec/ruby/core/random/rand_spec.rb11
-rw-r--r--spec/ruby/core/random/random_number_spec.rb4
-rw-r--r--spec/ruby/core/random/raw_seed_spec.rb9
-rw-r--r--spec/ruby/core/random/shared/urandom.rb23
-rw-r--r--spec/ruby/core/random/urandom_spec.rb26
-rw-r--r--spec/ruby/core/range/bsearch_spec.rb303
-rw-r--r--spec/ruby/core/range/case_compare_spec.rb27
-rw-r--r--spec/ruby/core/range/clone_spec.rb26
-rw-r--r--spec/ruby/core/range/count_spec.rb12
-rw-r--r--spec/ruby/core/range/cover_spec.rb1
-rw-r--r--spec/ruby/core/range/dup_spec.rb14
-rw-r--r--spec/ruby/core/range/each_spec.rb54
-rw-r--r--spec/ruby/core/range/equal_value_spec.rb8
-rw-r--r--spec/ruby/core/range/exclude_end_spec.rb20
-rw-r--r--spec/ruby/core/range/first_spec.rb4
-rw-r--r--spec/ruby/core/range/frozen_spec.rb27
-rw-r--r--spec/ruby/core/range/hash_spec.rb10
-rw-r--r--spec/ruby/core/range/initialize_spec.rb15
-rw-r--r--spec/ruby/core/range/inspect_spec.rb23
-rw-r--r--spec/ruby/core/range/last_spec.rb10
-rw-r--r--spec/ruby/core/range/max_spec.rb21
-rw-r--r--spec/ruby/core/range/min_spec.rb13
-rw-r--r--spec/ruby/core/range/minmax_spec.rb132
-rw-r--r--spec/ruby/core/range/new_spec.rb60
-rw-r--r--spec/ruby/core/range/percent_spec.rb24
-rw-r--r--spec/ruby/core/range/shared/cover.rb138
-rw-r--r--spec/ruby/core/range/shared/cover_and_include.rb10
-rw-r--r--spec/ruby/core/range/shared/equal_value.rb6
-rw-r--r--spec/ruby/core/range/size_spec.rb34
-rw-r--r--spec/ruby/core/range/step_spec.rb203
-rw-r--r--spec/ruby/core/range/to_a_spec.rb17
-rw-r--r--spec/ruby/core/range/to_s_spec.rb18
-rw-r--r--spec/ruby/core/rational/comparison_spec.rb2
-rw-r--r--spec/ruby/core/rational/minus_spec.rb48
-rw-r--r--spec/ruby/core/rational/rational_spec.rb4
-rw-r--r--spec/ruby/core/refinement/append_features_spec.rb21
-rw-r--r--spec/ruby/core/refinement/extend_object_spec.rb21
-rw-r--r--spec/ruby/core/refinement/import_methods_spec.rb34
-rw-r--r--spec/ruby/core/refinement/include_spec.rb27
-rw-r--r--spec/ruby/core/refinement/prepend_features_spec.rb21
-rw-r--r--spec/ruby/core/refinement/prepend_spec.rb27
-rw-r--r--spec/ruby/core/regexp/case_compare_spec.rb10
-rw-r--r--spec/ruby/core/regexp/casefold_spec.rb4
-rw-r--r--spec/ruby/core/regexp/compile_spec.rb4
-rw-r--r--spec/ruby/core/regexp/initialize_spec.rb14
-rw-r--r--spec/ruby/core/regexp/last_match_spec.rb44
-rw-r--r--spec/ruby/core/regexp/new_spec.rb14
-rw-r--r--spec/ruby/core/regexp/options_spec.rb6
-rw-r--r--spec/ruby/core/regexp/shared/new.rb196
-rw-r--r--spec/ruby/core/regexp/shared/quote.rb10
-rw-r--r--spec/ruby/core/regexp/source_spec.rb22
-rw-r--r--spec/ruby/core/regexp/timeout_spec.rb35
-rw-r--r--spec/ruby/core/regexp/union_spec.rb10
-rw-r--r--spec/ruby/core/signal/trap_spec.rb145
-rw-r--r--spec/ruby/core/string/allocate_spec.rb2
-rw-r--r--spec/ruby/core/string/append_spec.rb5
-rw-r--r--spec/ruby/core/string/b_spec.rb9
-rw-r--r--spec/ruby/core/string/byteindex_spec.rb16
-rw-r--r--spec/ruby/core/string/bytes_spec.rb6
-rw-r--r--spec/ruby/core/string/bytesize_spec.rb2
-rw-r--r--spec/ruby/core/string/byteslice_spec.rb6
-rw-r--r--spec/ruby/core/string/capitalize_spec.rb53
-rw-r--r--spec/ruby/core/string/casecmp_spec.rb24
-rw-r--r--spec/ruby/core/string/center_spec.rb37
-rw-r--r--spec/ruby/core/string/chars_spec.rb7
-rw-r--r--spec/ruby/core/string/chomp_spec.rb101
-rw-r--r--spec/ruby/core/string/chop_spec.rb26
-rw-r--r--spec/ruby/core/string/clear_spec.rb6
-rw-r--r--spec/ruby/core/string/clone_spec.rb4
-rw-r--r--spec/ruby/core/string/comparison_spec.rb4
-rw-r--r--spec/ruby/core/string/crypt_spec.rb30
-rw-r--r--spec/ruby/core/string/dedup_spec.rb8
-rw-r--r--spec/ruby/core/string/delete_prefix_spec.rb126
-rw-r--r--spec/ruby/core/string/delete_spec.rb31
-rw-r--r--spec/ruby/core/string/delete_suffix_spec.rb126
-rw-r--r--spec/ruby/core/string/downcase_spec.rb40
-rw-r--r--spec/ruby/core/string/dump_spec.rb34
-rw-r--r--spec/ruby/core/string/dup_spec.rb13
-rw-r--r--spec/ruby/core/string/each_grapheme_cluster_spec.rb16
-rw-r--r--spec/ruby/core/string/element_set_spec.rb48
-rw-r--r--spec/ruby/core/string/empty_spec.rb10
-rw-r--r--spec/ruby/core/string/encode_spec.rb89
-rw-r--r--spec/ruby/core/string/encoding_spec.rb1
-rw-r--r--spec/ruby/core/string/end_with_spec.rb52
-rw-r--r--spec/ruby/core/string/fixtures/classes.rb11
-rw-r--r--spec/ruby/core/string/fixtures/iso-8859-9-encoding.rb2
-rw-r--r--spec/ruby/core/string/fixtures/to_c.rb5
-rw-r--r--spec/ruby/core/string/force_encoding_spec.rb6
-rw-r--r--spec/ruby/core/string/grapheme_clusters_spec.rb14
-rw-r--r--spec/ruby/core/string/gsub_spec.rb221
-rw-r--r--spec/ruby/core/string/include_spec.rb14
-rw-r--r--spec/ruby/core/string/index_spec.rb11
-rw-r--r--spec/ruby/core/string/insert_spec.rb27
-rw-r--r--spec/ruby/core/string/inspect_spec.rb42
-rw-r--r--spec/ruby/core/string/lines_spec.rb1
-rw-r--r--spec/ruby/core/string/ljust_spec.rb37
-rw-r--r--spec/ruby/core/string/lstrip_spec.rb59
-rw-r--r--spec/ruby/core/string/match_spec.rb2
-rw-r--r--spec/ruby/core/string/modulo_spec.rb91
-rw-r--r--spec/ruby/core/string/ord_spec.rb9
-rw-r--r--spec/ruby/core/string/partition_spec.rb25
-rw-r--r--spec/ruby/core/string/percent_spec.rb13
-rw-r--r--spec/ruby/core/string/plus_spec.rb13
-rw-r--r--spec/ruby/core/string/prepend_spec.rb16
-rw-r--r--spec/ruby/core/string/reverse_spec.rb47
-rw-r--r--spec/ruby/core/string/rindex_spec.rb23
-rw-r--r--spec/ruby/core/string/rjust_spec.rb37
-rw-r--r--spec/ruby/core/string/rpartition_spec.rb38
-rw-r--r--spec/ruby/core/string/rstrip_spec.rb67
-rw-r--r--spec/ruby/core/string/scan_spec.rb54
-rw-r--r--spec/ruby/core/string/scrub_spec.rb76
-rw-r--r--spec/ruby/core/string/setbyte_spec.rb10
-rw-r--r--spec/ruby/core/string/shared/chars.rb14
-rw-r--r--spec/ruby/core/string/shared/codepoints.rb4
-rw-r--r--spec/ruby/core/string/shared/concat.rb24
-rw-r--r--spec/ruby/core/string/shared/dedup.rb57
-rw-r--r--spec/ruby/core/string/shared/each_line.rb66
-rw-r--r--spec/ruby/core/string/shared/eql.rb6
-rw-r--r--spec/ruby/core/string/shared/length.rb35
-rw-r--r--spec/ruby/core/string/shared/partition.rb51
-rw-r--r--spec/ruby/core/string/shared/replace.rb38
-rw-r--r--spec/ruby/core/string/shared/slice.rb271
-rw-r--r--spec/ruby/core/string/shared/strip.rb24
-rw-r--r--spec/ruby/core/string/shared/succ.rb30
-rw-r--r--spec/ruby/core/string/shared/to_s.rb7
-rw-r--r--spec/ruby/core/string/shared/to_sym.rb11
-rw-r--r--spec/ruby/core/string/slice_spec.rb221
-rw-r--r--spec/ruby/core/string/split_spec.rb303
-rw-r--r--spec/ruby/core/string/squeeze_spec.rb33
-rw-r--r--spec/ruby/core/string/start_with_spec.rb74
-rw-r--r--spec/ruby/core/string/strip_spec.rb47
-rw-r--r--spec/ruby/core/string/sub_spec.rb173
-rw-r--r--spec/ruby/core/string/swapcase_spec.rb48
-rw-r--r--spec/ruby/core/string/to_c_spec.rb108
-rw-r--r--spec/ruby/core/string/to_i_spec.rb18
-rw-r--r--spec/ruby/core/string/tr_s_spec.rb27
-rw-r--r--spec/ruby/core/string/tr_spec.rb27
-rw-r--r--spec/ruby/core/string/uminus_spec.rb72
-rw-r--r--spec/ruby/core/string/undump_spec.rb826
-rw-r--r--spec/ruby/core/string/unicode_normalized_spec.rb8
-rw-r--r--spec/ruby/core/string/unpack/b_spec.rb34
-rw-r--r--spec/ruby/core/string/unpack/c_spec.rb14
-rw-r--r--spec/ruby/core/string/unpack/h_spec.rb28
-rw-r--r--spec/ruby/core/string/unpack/m_spec.rb19
-rw-r--r--spec/ruby/core/string/unpack/p_spec.rb12
-rw-r--r--spec/ruby/core/string/unpack/shared/basic.rb8
-rw-r--r--spec/ruby/core/string/unpack/shared/float.rb60
-rw-r--r--spec/ruby/core/string/unpack/shared/integer.rb88
-rw-r--r--spec/ruby/core/string/unpack/shared/taint.rb81
-rw-r--r--spec/ruby/core/string/unpack/shared/unicode.rb14
-rw-r--r--spec/ruby/core/string/unpack/w_spec.rb24
-rw-r--r--spec/ruby/core/string/unpack/z_spec.rb5
-rw-r--r--spec/ruby/core/string/unpack1_spec.rb26
-rw-r--r--spec/ruby/core/string/unpack_spec.rb34
-rw-r--r--spec/ruby/core/string/upcase_spec.rb46
-rw-r--r--spec/ruby/core/string/uplus_spec.rb2
-rw-r--r--spec/ruby/core/string/upto_spec.rb6
-rw-r--r--spec/ruby/core/string/valid_encoding/utf_8_spec.rb214
-rw-r--r--spec/ruby/core/string/valid_encoding_spec.rb18
-rw-r--r--spec/ruby/core/struct/deconstruct_keys_spec.rb76
-rw-r--r--spec/ruby/core/struct/deconstruct_spec.rb10
-rw-r--r--spec/ruby/core/struct/dig_spec.rb10
-rw-r--r--spec/ruby/core/struct/filter_spec.rb10
-rw-r--r--spec/ruby/core/struct/hash_spec.rb22
-rw-r--r--spec/ruby/core/struct/initialize_spec.rb8
-rw-r--r--spec/ruby/core/struct/keyword_init_spec.rb21
-rw-r--r--spec/ruby/core/struct/new_spec.rb147
-rw-r--r--spec/ruby/core/struct/to_h_spec.rb78
-rw-r--r--spec/ruby/core/struct/values_at_spec.rb55
-rw-r--r--spec/ruby/core/symbol/all_symbols_spec.rb11
-rw-r--r--spec/ruby/core/symbol/casecmp_spec.rb2
-rw-r--r--spec/ruby/core/symbol/comparison_spec.rb2
-rw-r--r--spec/ruby/core/symbol/end_with_spec.rb8
-rw-r--r--spec/ruby/core/symbol/match_spec.rb17
-rw-r--r--spec/ruby/core/symbol/name_spec.rb19
-rw-r--r--spec/ruby/core/symbol/shared/id2name.rb7
-rw-r--r--spec/ruby/core/symbol/shared/slice.rb20
-rw-r--r--spec/ruby/core/symbol/start_with_spec.rb8
-rw-r--r--spec/ruby/core/symbol/to_proc_spec.rb74
-rw-r--r--spec/ruby/core/systemexit/success_spec.rb4
-rw-r--r--spec/ruby/core/thread/alive_spec.rb20
-rw-r--r--spec/ruby/core/thread/backtrace/limit_spec.rb15
-rw-r--r--spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb91
-rw-r--r--spec/ruby/core/thread/backtrace/location/base_label_spec.rb27
-rw-r--r--spec/ruby/core/thread/backtrace/location/fixtures/absolute_path_main.rb2
-rw-r--r--spec/ruby/core/thread/backtrace/location/fixtures/path.rb2
-rw-r--r--spec/ruby/core/thread/backtrace/location/fixtures/subdir/absolute_path_main_chdir.rb11
-rw-r--r--spec/ruby/core/thread/backtrace/location/fixtures/subdir/sibling.rb1
-rw-r--r--spec/ruby/core/thread/backtrace/location/lineno_spec.rb10
-rw-r--r--spec/ruby/core/thread/backtrace/location/path_spec.rb35
-rw-r--r--spec/ruby/core/thread/backtrace_locations_spec.rb46
-rw-r--r--spec/ruby/core/thread/backtrace_spec.rb34
-rw-r--r--spec/ruby/core/thread/element_set_spec.rb4
-rw-r--r--spec/ruby/core/thread/exclusive_spec.rb66
-rw-r--r--spec/ruby/core/thread/fetch_spec.rb54
-rw-r--r--spec/ruby/core/thread/handle_interrupt_spec.rb125
-rw-r--r--spec/ruby/core/thread/ignore_deadlock_spec.rb21
-rw-r--r--spec/ruby/core/thread/join_spec.rb5
-rw-r--r--spec/ruby/core/thread/list_spec.rb4
-rw-r--r--spec/ruby/core/thread/native_thread_id_spec.rb17
-rw-r--r--spec/ruby/core/thread/new_spec.rb12
-rw-r--r--spec/ruby/core/thread/pending_interrupt_spec.rb32
-rw-r--r--spec/ruby/core/thread/raise_spec.rb26
-rw-r--r--spec/ruby/core/thread/report_on_exception_spec.rb75
-rw-r--r--spec/ruby/core/thread/shared/exit.rb22
-rw-r--r--spec/ruby/core/thread/shared/to_s.rb8
-rw-r--r--spec/ruby/core/thread/shared/wakeup.rb3
-rw-r--r--spec/ruby/core/thread/stop_spec.rb20
-rw-r--r--spec/ruby/core/thread/to_s_spec.rb6
-rw-r--r--spec/ruby/core/time/_dump_spec.rb4
-rw-r--r--spec/ruby/core/time/at_spec.rb197
-rw-r--r--spec/ruby/core/time/ceil_spec.rb63
-rw-r--r--spec/ruby/core/time/dup_spec.rb4
-rw-r--r--spec/ruby/core/time/floor_spec.rb51
-rw-r--r--spec/ruby/core/time/friday_spec.rb4
-rw-r--r--spec/ruby/core/time/getlocal_spec.rb102
-rw-r--r--spec/ruby/core/time/gmt_spec.rb4
-rw-r--r--spec/ruby/core/time/hash_spec.rb4
-rw-r--r--spec/ruby/core/time/inspect_spec.rb27
-rw-r--r--spec/ruby/core/time/localtime_spec.rb16
-rw-r--r--spec/ruby/core/time/minus_spec.rb20
-rw-r--r--spec/ruby/core/time/monday_spec.rb4
-rw-r--r--spec/ruby/core/time/new_spec.rb443
-rw-r--r--spec/ruby/core/time/now_spec.rb45
-rw-r--r--spec/ruby/core/time/plus_spec.rb20
-rw-r--r--spec/ruby/core/time/saturday_spec.rb4
-rw-r--r--spec/ruby/core/time/shared/gmtime.rb4
-rw-r--r--spec/ruby/core/time/shared/local.rb11
-rw-r--r--spec/ruby/core/time/shared/now.rb22
-rw-r--r--spec/ruby/core/time/shared/time_params.rb11
-rw-r--r--spec/ruby/core/time/shared/to_i.rb7
-rw-r--r--spec/ruby/core/time/strftime_spec.rb41
-rw-r--r--spec/ruby/core/time/subsec_spec.rb2
-rw-r--r--spec/ruby/core/time/succ_spec.rb46
-rw-r--r--spec/ruby/core/time/sunday_spec.rb4
-rw-r--r--spec/ruby/core/time/thursday_spec.rb4
-rw-r--r--spec/ruby/core/time/tuesday_spec.rb4
-rw-r--r--spec/ruby/core/time/utc_spec.rb39
-rw-r--r--spec/ruby/core/time/wednesday_spec.rb4
-rw-r--r--spec/ruby/core/time/zone_spec.rb20
-rw-r--r--spec/ruby/core/tracepoint/allow_reentry_spec.rb32
-rw-r--r--spec/ruby/core/tracepoint/binding_spec.rb2
-rw-r--r--spec/ruby/core/tracepoint/callee_id_spec.rb1
-rw-r--r--spec/ruby/core/tracepoint/defined_class_spec.rb1
-rw-r--r--spec/ruby/core/tracepoint/disable_spec.rb9
-rw-r--r--spec/ruby/core/tracepoint/enable_spec.rb658
-rw-r--r--spec/ruby/core/tracepoint/enabled_spec.rb5
-rw-r--r--spec/ruby/core/tracepoint/eval_script_spec.rb29
-rw-r--r--spec/ruby/core/tracepoint/event_spec.rb1
-rw-r--r--spec/ruby/core/tracepoint/fixtures/classes.rb6
-rw-r--r--spec/ruby/core/tracepoint/inspect_spec.rb122
-rw-r--r--spec/ruby/core/tracepoint/lineno_spec.rb14
-rw-r--r--spec/ruby/core/tracepoint/method_id_spec.rb10
-rw-r--r--spec/ruby/core/tracepoint/new_spec.rb21
-rw-r--r--spec/ruby/core/tracepoint/parameters_spec.rb37
-rw-r--r--spec/ruby/core/tracepoint/path_spec.rb16
-rw-r--r--spec/ruby/core/tracepoint/raised_exception_spec.rb6
-rw-r--r--spec/ruby/core/tracepoint/return_value_spec.rb6
-rw-r--r--spec/ruby/core/tracepoint/self_spec.rb10
-rw-r--r--spec/ruby/core/tracepoint/trace_spec.rb3
-rw-r--r--spec/ruby/core/true/case_compare_spec.rb13
-rw-r--r--spec/ruby/core/true/to_s_spec.rb12
-rw-r--r--spec/ruby/core/unboundmethod/bind_call_spec.rb74
-rw-r--r--spec/ruby/core/unboundmethod/equal_value_spec.rb76
-rw-r--r--spec/ruby/core/unboundmethod/fixtures/classes.rb16
-rw-r--r--spec/ruby/core/unboundmethod/hash_spec.rb7
-rw-r--r--spec/ruby/core/unboundmethod/owner_spec.rb7
-rw-r--r--spec/ruby/core/unboundmethod/private_spec.rb21
-rw-r--r--spec/ruby/core/unboundmethod/protected_spec.rb21
-rw-r--r--spec/ruby/core/unboundmethod/public_spec.rb21
-rw-r--r--spec/ruby/core/unboundmethod/shared/to_s.rb21
-rw-r--r--spec/ruby/core/unboundmethod/source_location_spec.rb4
-rw-r--r--spec/ruby/core/unboundmethod/super_method_spec.rb23
-rw-r--r--spec/ruby/core/warning/element_reference_spec.rb20
-rw-r--r--spec/ruby/core/warning/element_set_spec.rb35
-rw-r--r--spec/ruby/core/warning/warn_spec.rb26
-rw-r--r--spec/ruby/default.mspec1
-rw-r--r--spec/ruby/fixtures/class.rb4
-rw-r--r--spec/ruby/fixtures/code/a/load_fixture.dylib1
-rw-r--r--spec/ruby/fixtures/code/c/load_fixture.rb1
-rw-r--r--spec/ruby/fixtures/code/concurrent.rb2
-rw-r--r--spec/ruby/fixtures/code/concurrent_require_fixture.rb4
-rw-r--r--spec/ruby/fixtures/code/load_fixture.dylib1
-rw-r--r--spec/ruby/fixtures/code/load_fixture.ext.dylib1
-rw-r--r--spec/ruby/fixtures/code/load_wrap_fixture.rb12
-rw-r--r--spec/ruby/fixtures/code/wrap_fixture.rb9
-rw-r--r--spec/ruby/fixtures/code_loading.rb15
-rw-r--r--spec/ruby/fixtures/constants.rb39
-rw-r--r--spec/ruby/language/BEGIN_spec.rb5
-rw-r--r--spec/ruby/language/END_spec.rb15
-rw-r--r--spec/ruby/language/README2
-rw-r--r--spec/ruby/language/alias_spec.rb20
-rw-r--r--spec/ruby/language/block_spec.rb371
-rw-r--r--spec/ruby/language/break_spec.rb18
-rw-r--r--spec/ruby/language/case_spec.rb22
-rw-r--r--spec/ruby/language/class_spec.rb31
-rw-r--r--spec/ruby/language/class_variable_spec.rb32
-rw-r--r--spec/ruby/language/comment_spec.rb13
-rw-r--r--spec/ruby/language/constants_spec.rb189
-rw-r--r--spec/ruby/language/def_spec.rb80
-rw-r--r--spec/ruby/language/defined_spec.rb107
-rw-r--r--spec/ruby/language/delegation_spec.rb65
-rw-r--r--spec/ruby/language/ensure_spec.rb108
-rw-r--r--spec/ruby/language/file_spec.rb12
-rw-r--r--spec/ruby/language/fixtures/constant_visibility.rb18
-rw-r--r--spec/ruby/language/fixtures/defined.rb3
-rw-r--r--spec/ruby/language/fixtures/delegation.rb11
-rw-r--r--spec/ruby/language/fixtures/freeze_magic_comment_two_literals.rb2
-rw-r--r--spec/ruby/language/fixtures/rescue_captures.rb107
-rw-r--r--spec/ruby/language/fixtures/return.rb8
-rw-r--r--spec/ruby/language/fixtures/squiggly_heredoc.rb32
-rw-r--r--spec/ruby/language/fixtures/super.rb46
-rw-r--r--spec/ruby/language/hash_spec.rb121
-rw-r--r--spec/ruby/language/heredoc_spec.rb18
-rw-r--r--spec/ruby/language/keyword_arguments_spec.rb397
-rw-r--r--spec/ruby/language/lambda_spec.rb145
-rw-r--r--spec/ruby/language/method_spec.rb795
-rw-r--r--spec/ruby/language/module_spec.rb35
-rw-r--r--spec/ruby/language/numbered_parameters_spec.rb118
-rw-r--r--spec/ruby/language/numbers_spec.rb10
-rw-r--r--spec/ruby/language/optional_assignments_spec.rb143
-rw-r--r--spec/ruby/language/pattern_matching_spec.rb1403
-rw-r--r--spec/ruby/language/precedence_spec.rb78
-rw-r--r--spec/ruby/language/predefined_spec.rb552
-rw-r--r--spec/ruby/language/proc_spec.rb27
-rw-r--r--spec/ruby/language/range_spec.rb19
-rw-r--r--spec/ruby/language/regexp/back-references_spec.rb87
-rw-r--r--spec/ruby/language/regexp/character_classes_spec.rb11
-rw-r--r--spec/ruby/language/regexp/empty_checks_spec.rb135
-rw-r--r--spec/ruby/language/regexp/encoding_spec.rb29
-rw-r--r--spec/ruby/language/regexp/escapes_spec.rb100
-rw-r--r--spec/ruby/language/regexp/grouping_spec.rb40
-rw-r--r--spec/ruby/language/regexp/interpolation_spec.rb2
-rw-r--r--spec/ruby/language/regexp/repetition_spec.rb94
-rw-r--r--spec/ruby/language/regexp/subexpression_call_spec.rb50
-rw-r--r--spec/ruby/language/regexp_spec.rb34
-rw-r--r--spec/ruby/language/rescue_spec.rb122
-rw-r--r--spec/ruby/language/return_spec.rb385
-rw-r--r--spec/ruby/language/safe_spec.rb141
-rw-r--r--spec/ruby/language/send_spec.rb54
-rw-r--r--spec/ruby/language/singleton_class_spec.rb4
-rw-r--r--spec/ruby/language/source_encoding_spec.rb4
-rw-r--r--spec/ruby/language/string_spec.rb80
-rw-r--r--spec/ruby/language/super_spec.rb46
-rw-r--r--spec/ruby/language/variables_spec.rb118
-rw-r--r--spec/ruby/language/yield_spec.rb38
-rw-r--r--spec/ruby/library/English/English_spec.rb8
-rw-r--r--spec/ruby/library/English/alias_spec.rb14
-rw-r--r--spec/ruby/library/base64/decode64_spec.rb4
-rw-r--r--spec/ruby/library/bigdecimal/BigDecimal_spec.rb112
-rw-r--r--spec/ruby/library/bigdecimal/abs_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/add_spec.rb8
-rw-r--r--spec/ruby/library/bigdecimal/comparison_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/constants_spec.rb6
-rw-r--r--spec/ruby/library/bigdecimal/div_spec.rb16
-rw-r--r--spec/ruby/library/bigdecimal/divmod_spec.rb6
-rw-r--r--spec/ruby/library/bigdecimal/exponent_spec.rb11
-rw-r--r--spec/ruby/library/bigdecimal/finite_spec.rb8
-rw-r--r--spec/ruby/library/bigdecimal/fix_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/frac_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/gt_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/gte_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/lt_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/lte_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/minus_spec.rb18
-rw-r--r--spec/ruby/library/bigdecimal/mode_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/nan_spec.rb22
-rw-r--r--spec/ruby/library/bigdecimal/plus_spec.rb6
-rw-r--r--spec/ruby/library/bigdecimal/precs_spec.rb39
-rw-r--r--spec/ruby/library/bigdecimal/quo_spec.rb4
-rw-r--r--spec/ruby/library/bigdecimal/remainder_spec.rb38
-rw-r--r--spec/ruby/library/bigdecimal/round_spec.rb12
-rw-r--r--spec/ruby/library/bigdecimal/shared/clone.rb17
-rw-r--r--spec/ruby/library/bigdecimal/shared/modulo.rb28
-rw-r--r--spec/ruby/library/bigdecimal/shared/mult.rb20
-rw-r--r--spec/ruby/library/bigdecimal/shared/power.rb4
-rw-r--r--spec/ruby/library/bigdecimal/shared/quo.rb10
-rw-r--r--spec/ruby/library/bigdecimal/shared/to_int.rb2
-rw-r--r--spec/ruby/library/bigdecimal/sub_spec.rb8
-rw-r--r--spec/ruby/library/bigdecimal/to_f_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/to_r_spec.rb12
-rw-r--r--spec/ruby/library/bigdecimal/to_s_spec.rb17
-rw-r--r--spec/ruby/library/bigdecimal/truncate_spec.rb6
-rw-r--r--spec/ruby/library/bigdecimal/uminus_spec.rb2
-rw-r--r--spec/ruby/library/bigdecimal/util_spec.rb6
-rw-r--r--spec/ruby/library/bigdecimal/zero_spec.rb26
-rw-r--r--spec/ruby/library/cgi/cookie/name_spec.rb12
-rw-r--r--spec/ruby/library/cgi/cookie/parse_spec.rb10
-rw-r--r--spec/ruby/library/cgi/cookie/to_s_spec.rb13
-rw-r--r--spec/ruby/library/cgi/escapeHTML_spec.rb4
-rw-r--r--spec/ruby/library/cgi/escape_spec.rb16
-rw-r--r--spec/ruby/library/cgi/unescapeHTML_spec.rb5
-rw-r--r--spec/ruby/library/cgi/unescape_spec.rb4
-rw-r--r--spec/ruby/library/cmath/math/acos_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/acosh_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/asin_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/asinh_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/atan2_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/atan_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/atanh_spec.rb20
-rw-r--r--spec/ruby/library/cmath/math/cos_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/cosh_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/exp_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/fixtures/classes.rb4
-rw-r--r--spec/ruby/library/cmath/math/log10_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/log_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/shared/acos.rb41
-rw-r--r--spec/ruby/library/cmath/math/shared/acosh.rb37
-rw-r--r--spec/ruby/library/cmath/math/shared/asin.rb47
-rw-r--r--spec/ruby/library/cmath/math/shared/asinh.rb32
-rw-r--r--spec/ruby/library/cmath/math/shared/atan.rb32
-rw-r--r--spec/ruby/library/cmath/math/shared/atan2.rb34
-rw-r--r--spec/ruby/library/cmath/math/shared/atanh.rb30
-rw-r--r--spec/ruby/library/cmath/math/shared/cos.rb30
-rw-r--r--spec/ruby/library/cmath/math/shared/cosh.rb28
-rw-r--r--spec/ruby/library/cmath/math/shared/exp.rb28
-rw-r--r--spec/ruby/library/cmath/math/shared/log.rb39
-rw-r--r--spec/ruby/library/cmath/math/shared/log10.rb41
-rw-r--r--spec/ruby/library/cmath/math/shared/sin.rb30
-rw-r--r--spec/ruby/library/cmath/math/shared/sinh.rb28
-rw-r--r--spec/ruby/library/cmath/math/shared/sqrt.rb34
-rw-r--r--spec/ruby/library/cmath/math/shared/tan.rb28
-rw-r--r--spec/ruby/library/cmath/math/shared/tanh.rb32
-rw-r--r--spec/ruby/library/cmath/math/sin_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/sinh_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/sqrt_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/tan_spec.rb18
-rw-r--r--spec/ruby/library/cmath/math/tanh_spec.rb18
-rw-r--r--spec/ruby/library/conditionvariable/broadcast_spec.rb67
-rw-r--r--spec/ruby/library/conditionvariable/signal_spec.rb104
-rw-r--r--spec/ruby/library/conditionvariable/wait_spec.rb132
-rw-r--r--spec/ruby/library/coverage/fixtures/eval_code.rb11
-rw-r--r--spec/ruby/library/coverage/result_spec.rb73
-rw-r--r--spec/ruby/library/coverage/running_spec.rb20
-rw-r--r--spec/ruby/library/coverage/start_spec.rb8
-rw-r--r--spec/ruby/library/csv/liberal_parsing_spec.rb6
-rw-r--r--spec/ruby/library/date/civil_spec.rb7
-rw-r--r--spec/ruby/library/date/constants_spec.rb4
-rw-r--r--spec/ruby/library/date/gregorian_spec.rb2
-rw-r--r--spec/ruby/library/date/infinity_spec.rb14
-rw-r--r--spec/ruby/library/date/iso8601_spec.rb9
-rw-r--r--spec/ruby/library/date/julian_spec.rb4
-rw-r--r--spec/ruby/library/date/parse_spec.rb19
-rw-r--r--spec/ruby/library/date/shared/civil.rb8
-rw-r--r--spec/ruby/library/date/shared/valid_jd.rb20
-rw-r--r--spec/ruby/library/date/strftime_spec.rb15
-rw-r--r--spec/ruby/library/datetime/strftime_spec.rb16
-rw-r--r--spec/ruby/library/datetime/to_time_spec.rb18
-rw-r--r--spec/ruby/library/delegate/delegator/eql_spec.rb55
-rw-r--r--spec/ruby/library/delegate/delegator/taint_spec.rb17
-rw-r--r--spec/ruby/library/delegate/delegator/trust_spec.rb16
-rw-r--r--spec/ruby/library/delegate/delegator/untaint_spec.rb18
-rw-r--r--spec/ruby/library/delegate/delegator/untrust_spec.rb17
-rw-r--r--spec/ruby/library/digest/bubblebabble_spec.rb2
-rw-r--r--spec/ruby/library/digest/hexencode_spec.rb2
-rw-r--r--spec/ruby/library/digest/instance/append_spec.rb7
-rw-r--r--spec/ruby/library/digest/instance/new_spec.rb19
-rw-r--r--spec/ruby/library/digest/instance/shared/update.rb8
-rw-r--r--spec/ruby/library/digest/instance/update_spec.rb7
-rw-r--r--spec/ruby/library/digest/md5/shared/constants.rb1
-rw-r--r--spec/ruby/library/digest/sha1/shared/constants.rb3
-rw-r--r--spec/ruby/library/digest/sha2/hexdigest_spec.rb32
-rw-r--r--spec/ruby/library/digest/sha256/file_spec.rb4
-rw-r--r--spec/ruby/library/digest/sha256/shared/constants.rb1
-rw-r--r--spec/ruby/library/digest/sha384/shared/constants.rb1
-rw-r--r--spec/ruby/library/digest/sha512/shared/constants.rb1
-rw-r--r--spec/ruby/library/erb/fixtures/classes.rb6
-rw-r--r--spec/ruby/library/erb/new_spec.rb35
-rw-r--r--spec/ruby/library/erb/util/shared/url_encode.rb16
-rw-r--r--spec/ruby/library/etc/confstr_spec.rb2
-rw-r--r--spec/ruby/library/etc/getgrgid_spec.rb7
-rw-r--r--spec/ruby/library/etc/getgrnam_spec.rb2
-rw-r--r--spec/ruby/library/etc/group_spec.rb2
-rw-r--r--spec/ruby/library/etc/struct_group_spec.rb2
-rw-r--r--spec/ruby/library/etc/struct_passwd_spec.rb2
-rw-r--r--spec/ruby/library/fiber/current_spec.rb16
-rw-r--r--spec/ruby/library/fiber/resume_spec.rb33
-rw-r--r--spec/ruby/library/fiber/transfer_spec.rb56
-rw-r--r--spec/ruby/library/fiddle/handle/initialize_spec.rb10
-rw-r--r--spec/ruby/library/getoptlong/shared/get.rb10
-rw-r--r--spec/ruby/library/getoptlong/terminated_spec.rb6
-rw-r--r--spec/ruby/library/io-wait/wait_readable_spec.rb27
-rw-r--r--spec/ruby/library/io-wait/wait_writable_spec.rb20
-rw-r--r--spec/ruby/library/ipaddr/ipv4_conversion_spec.rb8
-rw-r--r--spec/ruby/library/ipaddr/new_spec.rb49
-rw-r--r--spec/ruby/library/logger/device/close_spec.rb4
-rw-r--r--spec/ruby/library/logger/device/write_spec.rb4
-rw-r--r--spec/ruby/library/logger/logger/debug_spec.rb4
-rw-r--r--spec/ruby/library/logger/logger/error_spec.rb4
-rw-r--r--spec/ruby/library/logger/logger/fatal_spec.rb4
-rw-r--r--spec/ruby/library/logger/logger/info_spec.rb4
-rw-r--r--spec/ruby/library/logger/logger/warn_spec.rb4
-rw-r--r--spec/ruby/library/mathn/bignum/exponent_spec.rb21
-rw-r--r--spec/ruby/library/mathn/complex/Complex_spec.rb14
-rw-r--r--spec/ruby/library/mathn/fixnum/exponent_spec.rb17
-rw-r--r--spec/ruby/library/mathn/float/exponent_spec.rb17
-rw-r--r--spec/ruby/library/mathn/integer/from_prime_division_spec.rb11
-rw-r--r--spec/ruby/library/mathn/integer/prime_division_spec.rb21
-rw-r--r--spec/ruby/library/mathn/math/fixtures/classes.rb3
-rw-r--r--spec/ruby/library/mathn/math/rsqrt_spec.rb17
-rw-r--r--spec/ruby/library/mathn/math/shared/rsqrt.rb21
-rw-r--r--spec/ruby/library/mathn/math/shared/sqrt.rb25
-rw-r--r--spec/ruby/library/mathn/math/sqrt_spec.rb17
-rw-r--r--spec/ruby/library/mathn/mathn_spec.rb13
-rw-r--r--spec/ruby/library/mathn/rational/Rational_spec.rb14
-rw-r--r--spec/ruby/library/mathn/rational/inspect_spec.rb15
-rw-r--r--spec/ruby/library/matrix/I_spec.rb9
-rw-r--r--spec/ruby/library/matrix/antisymmetric_spec.rb5
-rw-r--r--spec/ruby/library/matrix/build_spec.rb117
-rw-r--r--spec/ruby/library/matrix/clone_spec.rb37
-rw-r--r--spec/ruby/library/matrix/coerce_spec.rb11
-rw-r--r--spec/ruby/library/matrix/collect_spec.rb9
-rw-r--r--spec/ruby/library/matrix/column_size_spec.rb19
-rw-r--r--spec/ruby/library/matrix/column_spec.rb53
-rw-r--r--spec/ruby/library/matrix/column_vector_spec.rb37
-rw-r--r--spec/ruby/library/matrix/column_vectors_spec.rb37
-rw-r--r--spec/ruby/library/matrix/columns_spec.rb67
-rw-r--r--spec/ruby/library/matrix/conj_spec.rb9
-rw-r--r--spec/ruby/library/matrix/conjugate_spec.rb9
-rw-r--r--spec/ruby/library/matrix/constructor_spec.rb103
-rw-r--r--spec/ruby/library/matrix/det_spec.rb11
-rw-r--r--spec/ruby/library/matrix/determinant_spec.rb11
-rw-r--r--spec/ruby/library/matrix/diagonal_spec.rb105
-rw-r--r--spec/ruby/library/matrix/divide_spec.rb83
-rw-r--r--spec/ruby/library/matrix/each_spec.rb119
-rw-r--r--spec/ruby/library/matrix/each_with_index_spec.rb133
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/eigenvalue_matrix_spec.rb13
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/eigenvalues_spec.rb35
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/eigenvector_matrix_spec.rb33
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/eigenvectors_spec.rb37
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/initialize_spec.rb39
-rw-r--r--spec/ruby/library/matrix/eigenvalue_decomposition/to_a_spec.rb27
-rw-r--r--spec/ruby/library/matrix/element_reference_spec.rb31
-rw-r--r--spec/ruby/library/matrix/empty_spec.rb107
-rw-r--r--spec/ruby/library/matrix/eql_spec.rb15
-rw-r--r--spec/ruby/library/matrix/equal_value_spec.rb15
-rw-r--r--spec/ruby/library/matrix/exponent_spec.rb94
-rw-r--r--spec/ruby/library/matrix/find_index_spec.rb221
-rw-r--r--spec/ruby/library/matrix/hash_spec.rb21
-rw-r--r--spec/ruby/library/matrix/hermitian_spec.rb53
-rw-r--r--spec/ruby/library/matrix/identity_spec.rb9
-rw-r--r--spec/ruby/library/matrix/imag_spec.rb9
-rw-r--r--spec/ruby/library/matrix/imaginary_spec.rb9
-rw-r--r--spec/ruby/library/matrix/inspect_spec.rb39
-rw-r--r--spec/ruby/library/matrix/inv_spec.rb11
-rw-r--r--spec/ruby/library/matrix/inverse_from_spec.rb9
-rw-r--r--spec/ruby/library/matrix/inverse_spec.rb11
-rw-r--r--spec/ruby/library/matrix/lower_triangular_spec.rb39
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/determinant_spec.rb33
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/initialize_spec.rb21
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/l_spec.rb27
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/p_spec.rb27
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/solve_spec.rb85
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/to_a_spec.rb53
-rw-r--r--spec/ruby/library/matrix/lup_decomposition/u_spec.rb27
-rw-r--r--spec/ruby/library/matrix/map_spec.rb9
-rw-r--r--spec/ruby/library/matrix/minor_spec.rb135
-rw-r--r--spec/ruby/library/matrix/minus_spec.rb65
-rw-r--r--spec/ruby/library/matrix/multiply_spec.rb105
-rw-r--r--spec/ruby/library/matrix/new_spec.rb11
-rw-r--r--spec/ruby/library/matrix/normal_spec.rb41
-rw-r--r--spec/ruby/library/matrix/orthogonal_spec.rb41
-rw-r--r--spec/ruby/library/matrix/permutation_spec.rb51
-rw-r--r--spec/ruby/library/matrix/plus_spec.rb65
-rw-r--r--spec/ruby/library/matrix/rank_spec.rb29
-rw-r--r--spec/ruby/library/matrix/real_spec.rb63
-rw-r--r--spec/ruby/library/matrix/rect_spec.rb9
-rw-r--r--spec/ruby/library/matrix/rectangular_spec.rb9
-rw-r--r--spec/ruby/library/matrix/regular_spec.rb45
-rw-r--r--spec/ruby/library/matrix/round_spec.rb31
-rw-r--r--spec/ruby/library/matrix/row_size_spec.rb19
-rw-r--r--spec/ruby/library/matrix/row_spec.rb55
-rw-r--r--spec/ruby/library/matrix/row_vector_spec.rb33
-rw-r--r--spec/ruby/library/matrix/row_vectors_spec.rb37
-rw-r--r--spec/ruby/library/matrix/rows_spec.rb65
-rw-r--r--spec/ruby/library/matrix/scalar/Fail_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/Raise_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/divide_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/exponent_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/included_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/initialize_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/minus_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/multiply_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar/plus_spec.rb9
-rw-r--r--spec/ruby/library/matrix/scalar_spec.rb93
-rw-r--r--spec/ruby/library/matrix/singular_spec.rb47
-rw-r--r--spec/ruby/library/matrix/square_spec.rb41
-rw-r--r--spec/ruby/library/matrix/symmetric_spec.rb45
-rw-r--r--spec/ruby/library/matrix/t_spec.rb9
-rw-r--r--spec/ruby/library/matrix/to_a_spec.rb17
-rw-r--r--spec/ruby/library/matrix/to_s_spec.rb9
-rw-r--r--spec/ruby/library/matrix/tr_spec.rb11
-rw-r--r--spec/ruby/library/matrix/trace_spec.rb11
-rw-r--r--spec/ruby/library/matrix/transpose_spec.rb9
-rw-r--r--spec/ruby/library/matrix/unit_spec.rb9
-rw-r--r--spec/ruby/library/matrix/unitary_spec.rb50
-rw-r--r--spec/ruby/library/matrix/upper_triangular_spec.rb39
-rw-r--r--spec/ruby/library/matrix/vector/cross_product_spec.rb21
-rw-r--r--spec/ruby/library/matrix/vector/each2_spec.rb81
-rw-r--r--spec/ruby/library/matrix/vector/eql_spec.rb23
-rw-r--r--spec/ruby/library/matrix/vector/inner_product_spec.rb33
-rw-r--r--spec/ruby/library/matrix/vector/normalize_spec.rb29
-rw-r--r--spec/ruby/library/matrix/zero_spec.rb75
-rw-r--r--spec/ruby/library/monitor/enter_spec.rb28
-rw-r--r--spec/ruby/library/monitor/new_cond_spec.rb88
-rw-r--r--spec/ruby/library/monitor/synchronize_spec.rb41
-rw-r--r--spec/ruby/library/monitor/try_enter_spec.rb39
-rw-r--r--spec/ruby/library/net/FTPError_spec.rb11
-rw-r--r--spec/ruby/library/net/FTPPermError_spec.rb17
-rw-r--r--spec/ruby/library/net/FTPProtoError_spec.rb17
-rw-r--r--spec/ruby/library/net/FTPReplyError_spec.rb17
-rw-r--r--spec/ruby/library/net/FTPTempError_spec.rb17
-rw-r--r--spec/ruby/library/net/ftp/abort_spec.rb97
-rw-r--r--spec/ruby/library/net/ftp/acct_spec.rb111
-rw-r--r--spec/ruby/library/net/ftp/binary_spec.rb33
-rw-r--r--spec/ruby/library/net/ftp/chdir_spec.rb145
-rw-r--r--spec/ruby/library/net/ftp/close_spec.rb47
-rw-r--r--spec/ruby/library/net/ftp/closed_spec.rb31
-rw-r--r--spec/ruby/library/net/ftp/connect_spec.rb93
-rw-r--r--spec/ruby/library/net/ftp/debug_mode_spec.rb33
-rw-r--r--spec/ruby/library/net/ftp/default_passive_spec.rb11
-rw-r--r--spec/ruby/library/net/ftp/delete_spec.rb113
-rw-r--r--spec/ruby/library/net/ftp/dir_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/get_spec.rb31
-rw-r--r--spec/ruby/library/net/ftp/getbinaryfile_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/getdir_spec.rb11
-rw-r--r--spec/ruby/library/net/ftp/gettextfile_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/help_spec.rb103
-rw-r--r--spec/ruby/library/net/ftp/initialize_spec.rb559
-rw-r--r--spec/ruby/library/net/ftp/last_response_code_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/last_response_spec.rb39
-rw-r--r--spec/ruby/library/net/ftp/lastresp_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/list_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/login_spec.rb379
-rw-r--r--spec/ruby/library/net/ftp/ls_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/mdtm_spec.rb59
-rw-r--r--spec/ruby/library/net/ftp/mkdir_spec.rb97
-rw-r--r--spec/ruby/library/net/ftp/mtime_spec.rb73
-rw-r--r--spec/ruby/library/net/ftp/nlst_spec.rb141
-rw-r--r--spec/ruby/library/net/ftp/noop_spec.rb59
-rw-r--r--spec/ruby/library/net/ftp/open_spec.rb73
-rw-r--r--spec/ruby/library/net/ftp/passive_spec.rb39
-rw-r--r--spec/ruby/library/net/ftp/put_spec.rb31
-rw-r--r--spec/ruby/library/net/ftp/putbinaryfile_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/puttextfile_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/pwd_spec.rb101
-rw-r--r--spec/ruby/library/net/ftp/quit_spec.rb51
-rw-r--r--spec/ruby/library/net/ftp/rename_spec.rb159
-rw-r--r--spec/ruby/library/net/ftp/resume_spec.rb33
-rw-r--r--spec/ruby/library/net/ftp/retrbinary_spec.rb47
-rw-r--r--spec/ruby/library/net/ftp/retrlines_spec.rb55
-rw-r--r--spec/ruby/library/net/ftp/return_code_spec.rb35
-rw-r--r--spec/ruby/library/net/ftp/rmdir_spec.rb111
-rw-r--r--spec/ruby/library/net/ftp/sendcmd_spec.rb103
-rw-r--r--spec/ruby/library/net/ftp/set_socket_spec.rb13
-rw-r--r--spec/ruby/library/net/ftp/site_spec.rb101
-rw-r--r--spec/ruby/library/net/ftp/size_spec.rb91
-rw-r--r--spec/ruby/library/net/ftp/status_spec.rb105
-rw-r--r--spec/ruby/library/net/ftp/storbinary_spec.rb73
-rw-r--r--spec/ruby/library/net/ftp/storlines_spec.rb65
-rw-r--r--spec/ruby/library/net/ftp/system_spec.rb91
-rw-r--r--spec/ruby/library/net/ftp/voidcmd_spec.rb103
-rw-r--r--spec/ruby/library/net/ftp/welcome_spec.rb39
-rw-r--r--spec/ruby/library/net/http/HTTPClientExcepton_spec.rb14
-rw-r--r--spec/ruby/library/net/http/HTTPServerException_spec.rb24
-rw-r--r--spec/ruby/library/net/http/http/fixtures/http_server.rb150
-rw-r--r--spec/ruby/library/net/http/http/get2_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/get_spec.rb72
-rw-r--r--spec/ruby/library/net/http/http/head2_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/post2_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/post_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/put2_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/request_get_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/request_head_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/request_post_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/request_put_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/send_request_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/shared/request_get.rb2
-rw-r--r--spec/ruby/library/net/http/http/shared/request_head.rb2
-rw-r--r--spec/ruby/library/net/http/http/shared/request_post.rb2
-rw-r--r--spec/ruby/library/net/http/http/shared/request_put.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb12
-rw-r--r--spec/ruby/library/net/http/httpresponse/error_spec.rb7
-rw-r--r--spec/ruby/library/net/http/httpresponse/error_type_spec.rb7
-rw-r--r--spec/ruby/library/net/http/httpresponse/exception_type_spec.rb7
-rw-r--r--spec/ruby/library/net/http/httpresponse/read_body_spec.rb1
-rw-r--r--spec/ruby/library/net/http/httpresponse/read_new_spec.rb1
-rw-r--r--spec/ruby/library/net/http/httpresponse/shared/body.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/value_spec.rb7
-rw-r--r--spec/ruby/library/objectspace/fixtures/trace.rb5
-rw-r--r--spec/ruby/library/objectspace/memsize_of_all_spec.rb22
-rw-r--r--spec/ruby/library/objectspace/memsize_of_spec.rb6
-rw-r--r--spec/ruby/library/objectspace/trace_object_allocations_spec.rb149
-rw-r--r--spec/ruby/library/objectspace/trace_spec.rb15
-rw-r--r--spec/ruby/library/openssl/config/freeze_spec.rb26
-rw-r--r--spec/ruby/library/openssl/digest_spec.rb63
-rw-r--r--spec/ruby/library/openssl/hmac/digest_spec.rb2
-rw-r--r--spec/ruby/library/openssl/hmac/hexdigest_spec.rb2
-rw-r--r--spec/ruby/library/openssl/x509/name/verify_spec.rb78
-rw-r--r--spec/ruby/library/openstruct/frozen_spec.rb2
-rw-r--r--spec/ruby/library/openstruct/marshal_load_spec.rb2
-rw-r--r--spec/ruby/library/openstruct/method_missing_spec.rb35
-rw-r--r--spec/ruby/library/openstruct/to_h_spec.rb60
-rw-r--r--spec/ruby/library/pathname/absolute_spec.rb8
-rw-r--r--spec/ruby/library/pathname/birthtime_spec.rb16
-rw-r--r--spec/ruby/library/pathname/divide_spec.rb6
-rw-r--r--spec/ruby/library/pathname/glob_spec.rb84
-rw-r--r--spec/ruby/library/pathname/inspect_spec.rb10
-rw-r--r--spec/ruby/library/pathname/new_spec.rb7
-rw-r--r--spec/ruby/library/pathname/pathname_spec.rb19
-rw-r--r--spec/ruby/library/pathname/plus_spec.rb6
-rw-r--r--spec/ruby/library/pathname/relative_spec.rb8
-rw-r--r--spec/ruby/library/pathname/root_spec.rb10
-rw-r--r--spec/ruby/library/pathname/shared/plus.rb8
-rw-r--r--spec/ruby/library/pp/pp_spec.rb7
-rw-r--r--spec/ruby/library/prime/each_spec.rb247
-rw-r--r--spec/ruby/library/prime/instance_spec.rb31
-rw-r--r--spec/ruby/library/prime/int_from_prime_division_spec.rb19
-rw-r--r--spec/ruby/library/prime/integer/each_prime_spec.rb19
-rw-r--r--spec/ruby/library/prime/integer/from_prime_division_spec.rb19
-rw-r--r--spec/ruby/library/prime/integer/prime_division_spec.rb31
-rw-r--r--spec/ruby/library/prime/integer/prime_spec.rb27
-rw-r--r--spec/ruby/library/prime/next_spec.rb11
-rw-r--r--spec/ruby/library/prime/prime_division_spec.rb37
-rw-r--r--spec/ruby/library/prime/prime_spec.rb27
-rw-r--r--spec/ruby/library/prime/succ_spec.rb11
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb53
-rw-r--r--spec/ruby/library/rbconfig/sizeof/limits_spec.rb58
-rw-r--r--spec/ruby/library/rbconfig/unicode_emoji_version_spec.rb19
-rw-r--r--spec/ruby/library/rbconfig/unicode_version_spec.rb31
-rw-r--r--spec/ruby/library/readline/history/delete_at_spec.rb9
-rw-r--r--spec/ruby/library/readline/history/each_spec.rb8
-rw-r--r--spec/ruby/library/readline/history/element_reference_spec.rb7
-rw-r--r--spec/ruby/library/readline/history/pop_spec.rb9
-rw-r--r--spec/ruby/library/readline/history/shift_spec.rb9
-rw-r--r--spec/ruby/library/readline/readline_spec.rb7
-rw-r--r--spec/ruby/library/rexml/attribute/clone_spec.rb17
-rw-r--r--spec/ruby/library/rexml/attribute/element_spec.rb33
-rw-r--r--spec/ruby/library/rexml/attribute/equal_value_spec.rb25
-rw-r--r--spec/ruby/library/rexml/attribute/hash_spec.rb21
-rw-r--r--spec/ruby/library/rexml/attribute/initialize_spec.rb45
-rw-r--r--spec/ruby/library/rexml/attribute/inspect_spec.rb29
-rw-r--r--spec/ruby/library/rexml/attribute/namespace_spec.rb39
-rw-r--r--spec/ruby/library/rexml/attribute/node_type_spec.rb15
-rw-r--r--spec/ruby/library/rexml/attribute/prefix_spec.rb25
-rw-r--r--spec/ruby/library/rexml/attribute/remove_spec.rb31
-rw-r--r--spec/ruby/library/rexml/attribute/to_s_spec.rb21
-rw-r--r--spec/ruby/library/rexml/attribute/to_string_spec.rb21
-rw-r--r--spec/ruby/library/rexml/attribute/value_spec.rb21
-rw-r--r--spec/ruby/library/rexml/attribute/write_spec.rb35
-rw-r--r--spec/ruby/library/rexml/attribute/xpath_spec.rb27
-rw-r--r--spec/ruby/library/rexml/attributes/add_spec.rb11
-rw-r--r--spec/ruby/library/rexml/attributes/append_spec.rb11
-rw-r--r--spec/ruby/library/rexml/attributes/delete_all_spec.rb51
-rw-r--r--spec/ruby/library/rexml/attributes/delete_spec.rb43
-rw-r--r--spec/ruby/library/rexml/attributes/each_attribute_spec.rb33
-rw-r--r--spec/ruby/library/rexml/attributes/each_spec.rb37
-rw-r--r--spec/ruby/library/rexml/attributes/element_reference_spec.rb27
-rw-r--r--spec/ruby/library/rexml/attributes/element_set_spec.rb39
-rw-r--r--spec/ruby/library/rexml/attributes/get_attribute_ns_spec.rb23
-rw-r--r--spec/ruby/library/rexml/attributes/get_attribute_spec.rb45
-rw-r--r--spec/ruby/library/rexml/attributes/initialize_spec.rb27
-rw-r--r--spec/ruby/library/rexml/attributes/length_spec.rb11
-rw-r--r--spec/ruby/library/rexml/attributes/namespaces_spec.rb9
-rw-r--r--spec/ruby/library/rexml/attributes/prefixes_spec.rb37
-rw-r--r--spec/ruby/library/rexml/attributes/size_spec.rb11
-rw-r--r--spec/ruby/library/rexml/attributes/to_a_spec.rb27
-rw-r--r--spec/ruby/library/rexml/cdata/clone_spec.rb15
-rw-r--r--spec/ruby/library/rexml/cdata/initialize_spec.rb37
-rw-r--r--spec/ruby/library/rexml/cdata/to_s_spec.rb11
-rw-r--r--spec/ruby/library/rexml/cdata/value_spec.rb11
-rw-r--r--spec/ruby/library/rexml/document/add_element_spec.rb51
-rw-r--r--spec/ruby/library/rexml/document/add_spec.rb89
-rw-r--r--spec/ruby/library/rexml/document/clone_spec.rb33
-rw-r--r--spec/ruby/library/rexml/document/doctype_spec.rb23
-rw-r--r--spec/ruby/library/rexml/document/encoding_spec.rb33
-rw-r--r--spec/ruby/library/rexml/document/expanded_name_spec.rb23
-rw-r--r--spec/ruby/library/rexml/document/new_spec.rb55
-rw-r--r--spec/ruby/library/rexml/document/node_type_spec.rb11
-rw-r--r--spec/ruby/library/rexml/document/root_spec.rb17
-rw-r--r--spec/ruby/library/rexml/document/stand_alone_spec.rb31
-rw-r--r--spec/ruby/library/rexml/document/version_spec.rb21
-rw-r--r--spec/ruby/library/rexml/document/write_spec.rb57
-rw-r--r--spec/ruby/library/rexml/document/xml_decl_spec.rb23
-rw-r--r--spec/ruby/library/rexml/element/add_attribute_spec.rb65
-rw-r--r--spec/ruby/library/rexml/element/add_attributes_spec.rb35
-rw-r--r--spec/ruby/library/rexml/element/add_element_spec.rb62
-rw-r--r--spec/ruby/library/rexml/element/add_namespace_spec.rb35
-rw-r--r--spec/ruby/library/rexml/element/add_text_spec.rb37
-rw-r--r--spec/ruby/library/rexml/element/attribute_spec.rb27
-rw-r--r--spec/ruby/library/rexml/element/attributes_spec.rb27
-rw-r--r--spec/ruby/library/rexml/element/cdatas_spec.rb37
-rw-r--r--spec/ruby/library/rexml/element/clone_spec.rb47
-rw-r--r--spec/ruby/library/rexml/element/comments_spec.rb31
-rw-r--r--spec/ruby/library/rexml/element/delete_attribute_spec.rb61
-rw-r--r--spec/ruby/library/rexml/element/delete_element_spec.rb81
-rw-r--r--spec/ruby/library/rexml/element/delete_namespace_spec.rb37
-rw-r--r--spec/ruby/library/rexml/element/document_spec.rb23
-rw-r--r--spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb57
-rw-r--r--spec/ruby/library/rexml/element/each_element_with_text_spec.rb49
-rw-r--r--spec/ruby/library/rexml/element/element_reference_spec.rb29
-rw-r--r--spec/ruby/library/rexml/element/get_text_spec.rb27
-rw-r--r--spec/ruby/library/rexml/element/has_attributes_spec.rb25
-rw-r--r--spec/ruby/library/rexml/element/has_elements_spec.rb27
-rw-r--r--spec/ruby/library/rexml/element/has_text_spec.rb23
-rw-r--r--spec/ruby/library/rexml/element/inspect_spec.rb41
-rw-r--r--spec/ruby/library/rexml/element/instructions_spec.rb33
-rw-r--r--spec/ruby/library/rexml/element/namespace_spec.rb41
-rw-r--r--spec/ruby/library/rexml/element/namespaces_spec.rb51
-rw-r--r--spec/ruby/library/rexml/element/new_spec.rb55
-rw-r--r--spec/ruby/library/rexml/element/next_element_spec.rb31
-rw-r--r--spec/ruby/library/rexml/element/node_type_spec.rb11
-rw-r--r--spec/ruby/library/rexml/element/prefixes_spec.rb35
-rw-r--r--spec/ruby/library/rexml/element/previous_element_spec.rb31
-rw-r--r--spec/ruby/library/rexml/element/raw_spec.rb35
-rw-r--r--spec/ruby/library/rexml/element/root_spec.rb43
-rw-r--r--spec/ruby/library/rexml/element/text_spec.rb87
-rw-r--r--spec/ruby/library/rexml/element/texts_spec.rb23
-rw-r--r--spec/ruby/library/rexml/element/whitespace_spec.rb33
-rw-r--r--spec/ruby/library/rexml/node/each_recursive_spec.rb35
-rw-r--r--spec/ruby/library/rexml/node/find_first_recursive_spec.rb41
-rw-r--r--spec/ruby/library/rexml/node/index_in_parent_spec.rb23
-rw-r--r--spec/ruby/library/rexml/node/next_sibling_node_spec.rb33
-rw-r--r--spec/ruby/library/rexml/node/parent_spec.rb31
-rw-r--r--spec/ruby/library/rexml/node/previous_sibling_node_spec.rb33
-rw-r--r--spec/ruby/library/rexml/shared/elements_to_a.rb2
-rw-r--r--spec/ruby/library/rexml/text/append_spec.rb15
-rw-r--r--spec/ruby/library/rexml/text/clone_spec.rb15
-rw-r--r--spec/ruby/library/rexml/text/comparison_spec.rb39
-rw-r--r--spec/ruby/library/rexml/text/empty_spec.rb17
-rw-r--r--spec/ruby/library/rexml/text/indent_text_spec.rb35
-rw-r--r--spec/ruby/library/rexml/text/inspect_spec.rb11
-rw-r--r--spec/ruby/library/rexml/text/new_spec.rb91
-rw-r--r--spec/ruby/library/rexml/text/node_type_spec.rb11
-rw-r--r--spec/ruby/library/rexml/text/normalize_spec.rb11
-rw-r--r--spec/ruby/library/rexml/text/read_with_substitution_spec.rb17
-rw-r--r--spec/ruby/library/rexml/text/to_s_spec.rb25
-rw-r--r--spec/ruby/library/rexml/text/unnormalize_spec.rb11
-rw-r--r--spec/ruby/library/rexml/text/value_spec.rb55
-rw-r--r--spec/ruby/library/rexml/text/wrap_spec.rb29
-rw-r--r--spec/ruby/library/rexml/text/write_with_substitution_spec.rb53
-rw-r--r--spec/ruby/library/ripper/lex_spec.rb23
-rw-r--r--spec/ruby/library/ripper/sexp_spec.rb13
-rw-r--r--spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb10
-rw-r--r--spec/ruby/library/scanf/io/block_scanf_spec.rb10
-rw-r--r--spec/ruby/library/scanf/io/fixtures/date.txt4
-rw-r--r--spec/ruby/library/scanf/io/fixtures/helloworld.txt1
-rw-r--r--spec/ruby/library/scanf/io/scanf_spec.rb38
-rw-r--r--spec/ruby/library/scanf/io/shared/block_scanf.rb28
-rw-r--r--spec/ruby/library/scanf/string/block_scanf_spec.rb10
-rw-r--r--spec/ruby/library/scanf/string/scanf_spec.rb56
-rw-r--r--spec/ruby/library/scanf/string/shared/block_scanf.rb25
-rw-r--r--spec/ruby/library/securerandom/random_number_spec.rb2
-rw-r--r--spec/ruby/library/set/case_compare_spec.rb12
-rw-r--r--spec/ruby/library/set/case_equality_spec.rb6
-rw-r--r--spec/ruby/library/set/compare_by_identity_spec.rb16
-rw-r--r--spec/ruby/library/set/comparison_spec.rb29
-rw-r--r--spec/ruby/library/set/enumerable/to_set_spec.rb10
-rw-r--r--spec/ruby/library/set/filter_spec.rb6
-rw-r--r--spec/ruby/library/set/initialize_clone_spec.rb18
-rw-r--r--spec/ruby/library/set/initialize_spec.rb25
-rw-r--r--spec/ruby/library/set/join_spec.rb31
-rw-r--r--spec/ruby/library/set/pretty_print_spec.rb20
-rw-r--r--spec/ruby/library/set/sortedset/add_spec.rb59
-rw-r--r--spec/ruby/library/set/sortedset/append_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/case_equality_spec.rb7
-rw-r--r--spec/ruby/library/set/sortedset/classify_spec.rb41
-rw-r--r--spec/ruby/library/set/sortedset/clear_spec.rb25
-rw-r--r--spec/ruby/library/set/sortedset/collect_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/constructor_spec.rb21
-rw-r--r--spec/ruby/library/set/sortedset/delete_if_spec.rb57
-rw-r--r--spec/ruby/library/set/sortedset/delete_spec.rb55
-rw-r--r--spec/ruby/library/set/sortedset/difference_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/divide_spec.rb53
-rw-r--r--spec/ruby/library/set/sortedset/each_spec.rb39
-rw-r--r--spec/ruby/library/set/sortedset/empty_spec.rb15
-rw-r--r--spec/ruby/library/set/sortedset/eql_spec.rb23
-rw-r--r--spec/ruby/library/set/sortedset/equal_value_spec.rb19
-rw-r--r--spec/ruby/library/set/sortedset/exclusion_spec.rb27
-rw-r--r--spec/ruby/library/set/sortedset/filter_spec.rb7
-rw-r--r--spec/ruby/library/set/sortedset/flatten_merge_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/flatten_spec.rb67
-rw-r--r--spec/ruby/library/set/sortedset/hash_spec.rb19
-rw-r--r--spec/ruby/library/set/sortedset/include_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/initialize_spec.rb49
-rw-r--r--spec/ruby/library/set/sortedset/inspect_spec.rb15
-rw-r--r--spec/ruby/library/set/sortedset/intersection_spec.rb17
-rw-r--r--spec/ruby/library/set/sortedset/keep_if_spec.rb47
-rw-r--r--spec/ruby/library/set/sortedset/length_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/map_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/member_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/merge_spec.rb29
-rw-r--r--spec/ruby/library/set/sortedset/minus_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/plus_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/pretty_print_cycle_spec.rb15
-rw-r--r--spec/ruby/library/set/sortedset/pretty_print_spec.rb23
-rw-r--r--spec/ruby/library/set/sortedset/proper_subset_spec.rb51
-rw-r--r--spec/ruby/library/set/sortedset/proper_superset_spec.rb51
-rw-r--r--spec/ruby/library/set/sortedset/reject_spec.rb63
-rw-r--r--spec/ruby/library/set/sortedset/replace_spec.rb25
-rw-r--r--spec/ruby/library/set/sortedset/select_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/size_spec.rb11
-rw-r--r--spec/ruby/library/set/sortedset/sortedset_spec.rb22
-rw-r--r--spec/ruby/library/set/sortedset/subset_spec.rb51
-rw-r--r--spec/ruby/library/set/sortedset/subtract_spec.rb25
-rw-r--r--spec/ruby/library/set/sortedset/superset_spec.rb51
-rw-r--r--spec/ruby/library/set/sortedset/to_a_spec.rb25
-rw-r--r--spec/ruby/library/set/sortedset/union_spec.rb17
-rw-r--r--spec/ruby/library/set/to_s_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb22
-rw-r--r--spec/ruby/library/socket/addrinfo/initialize_spec.rb52
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv4_loopback_spec.rb8
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv4_multicast_spec.rb10
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv4_private_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_linklocal_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_mc_global_spec.rb16
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_mc_linklocal_spec.rb14
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_mc_nodelocal_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_mc_orglocal_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_mc_sitelocal_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_multicast_spec.rb20
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_sitelocal_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_unique_local_spec.rb12
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_unspecified_spec.rb6
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_v4compat_spec.rb10
-rw-r--r--spec/ruby/library/socket/addrinfo/ipv6_v4mapped_spec.rb10
-rw-r--r--spec/ruby/library/socket/addrinfo/listen_spec.rb2
-rw-r--r--spec/ruby/library/socket/basicsocket/local_address_spec.rb10
-rw-r--r--spec/ruby/library/socket/basicsocket/read_nonblock_spec.rb64
-rw-r--r--spec/ruby/library/socket/basicsocket/recv_nonblock_spec.rb21
-rw-r--r--spec/ruby/library/socket/basicsocket/recvmsg_nonblock_spec.rb15
-rw-r--r--spec/ruby/library/socket/basicsocket/remote_address_spec.rb10
-rw-r--r--spec/ruby/library/socket/basicsocket/send_spec.rb8
-rw-r--r--spec/ruby/library/socket/basicsocket/sendmsg_nonblock_spec.rb7
-rw-r--r--spec/ruby/library/socket/basicsocket/write_nonblock_spec.rb62
-rw-r--r--spec/ruby/library/socket/constants/constants_spec.rb2
-rw-r--r--spec/ruby/library/socket/shared/address.rb249
-rw-r--r--spec/ruby/library/socket/shared/pack_sockaddr.rb7
-rw-r--r--spec/ruby/library/socket/socket/accept_nonblock_spec.rb3
-rw-r--r--spec/ruby/library/socket/socket/bind_spec.rb4
-rw-r--r--spec/ruby/library/socket/socket/gethostbyaddr_spec.rb22
-rw-r--r--spec/ruby/library/socket/socket/gethostbyname_spec.rb16
-rw-r--r--spec/ruby/library/socket/socket/listen_spec.rb6
-rw-r--r--spec/ruby/library/socket/socket/tcp_server_sockets_spec.rb2
-rw-r--r--spec/ruby/library/socket/socket/tcp_spec.rb2
-rw-r--r--spec/ruby/library/socket/socket/udp_server_loop_spec.rb4
-rw-r--r--spec/ruby/library/socket/socket/udp_server_sockets_spec.rb2
-rw-r--r--spec/ruby/library/socket/socket/unix_spec.rb2
-rw-r--r--spec/ruby/library/socket/socket/unpack_sockaddr_un_spec.rb2
-rw-r--r--spec/ruby/library/socket/tcpserver/accept_spec.rb20
-rw-r--r--spec/ruby/library/socket/tcpsocket/gethostbyname_spec.rb16
-rw-r--r--spec/ruby/library/socket/tcpsocket/initialize_spec.rb5
-rw-r--r--spec/ruby/library/socket/tcpsocket/new_spec.rb5
-rw-r--r--spec/ruby/library/socket/tcpsocket/recv_nonblock_spec.rb14
-rw-r--r--spec/ruby/library/socket/tcpsocket/shared/new.rb23
-rw-r--r--spec/ruby/library/socket/udpsocket/inspect_spec.rb14
-rw-r--r--spec/ruby/library/socket/udpsocket/recvfrom_nonblock_spec.rb7
-rw-r--r--spec/ruby/library/socket/unixsocket/open_spec.rb2
-rw-r--r--spec/ruby/library/socket/unixsocket/shared/new.rb2
-rw-r--r--spec/ruby/library/stringio/append_spec.rb11
-rw-r--r--spec/ruby/library/stringio/binmode_spec.rb14
-rw-r--r--spec/ruby/library/stringio/bytes_spec.rb28
-rw-r--r--spec/ruby/library/stringio/chars_spec.rb28
-rw-r--r--spec/ruby/library/stringio/codepoints_spec.rb16
-rw-r--r--spec/ruby/library/stringio/each_char_spec.rb2
-rw-r--r--spec/ruby/library/stringio/each_codepoint_spec.rb2
-rw-r--r--spec/ruby/library/stringio/each_line_spec.rb4
-rw-r--r--spec/ruby/library/stringio/each_spec.rb8
-rw-r--r--spec/ruby/library/stringio/getpass_spec.rb11
-rw-r--r--spec/ruby/library/stringio/gets_spec.rb9
-rw-r--r--spec/ruby/library/stringio/initialize_spec.rb110
-rw-r--r--spec/ruby/library/stringio/inspect_spec.rb19
-rw-r--r--spec/ruby/library/stringio/lines_spec.rb56
-rw-r--r--spec/ruby/library/stringio/new_spec.rb8
-rw-r--r--spec/ruby/library/stringio/open_spec.rb16
-rw-r--r--spec/ruby/library/stringio/print_spec.rb10
-rw-r--r--spec/ruby/library/stringio/printf_spec.rb29
-rw-r--r--spec/ruby/library/stringio/putc_spec.rb15
-rw-r--r--spec/ruby/library/stringio/puts_spec.rb29
-rw-r--r--spec/ruby/library/stringio/read_nonblock_spec.rb11
-rw-r--r--spec/ruby/library/stringio/readline_spec.rb25
-rw-r--r--spec/ruby/library/stringio/readlines_spec.rb23
-rw-r--r--spec/ruby/library/stringio/reopen_spec.rb61
-rw-r--r--spec/ruby/library/stringio/shared/each.rb63
-rw-r--r--spec/ruby/library/stringio/shared/read.rb10
-rw-r--r--spec/ruby/library/stringio/shared/write.rb44
-rw-r--r--spec/ruby/library/stringio/truncate_spec.rb12
-rw-r--r--spec/ruby/library/stringio/ungetbyte_spec.rb38
-rw-r--r--spec/ruby/library/stringio/write_nonblock_spec.rb6
-rw-r--r--spec/ruby/library/stringscanner/append_spec.rb2
-rw-r--r--spec/ruby/library/stringscanner/check_spec.rb9
-rw-r--r--spec/ruby/library/stringscanner/check_until_spec.rb6
-rw-r--r--spec/ruby/library/stringscanner/concat_spec.rb2
-rw-r--r--spec/ruby/library/stringscanner/exist_spec.rb6
-rw-r--r--spec/ruby/library/stringscanner/matched_size_spec.rb21
-rw-r--r--spec/ruby/library/stringscanner/scan_spec.rb44
-rw-r--r--spec/ruby/library/stringscanner/scan_until_spec.rb6
-rw-r--r--spec/ruby/library/stringscanner/search_full_spec.rb6
-rw-r--r--spec/ruby/library/stringscanner/shared/extract_range.rb13
-rw-r--r--spec/ruby/library/stringscanner/shared/extract_range_matched.rb11
-rw-r--r--spec/ruby/library/stringscanner/shared/matched_size.rb21
-rw-r--r--spec/ruby/library/stringscanner/shared/peek.rb10
-rw-r--r--spec/ruby/library/stringscanner/size_spec.rb17
-rw-r--r--spec/ruby/library/stringscanner/skip_until_spec.rb6
-rw-r--r--spec/ruby/library/syslog/close_spec.rb2
-rw-r--r--spec/ruby/library/syslog/ident_spec.rb2
-rw-r--r--spec/ruby/library/syslog/log_spec.rb8
-rw-r--r--spec/ruby/library/syslog/mask_spec.rb2
-rw-r--r--spec/ruby/library/syslog/shared/log.rb9
-rw-r--r--spec/ruby/library/time/to_datetime_spec.rb18
-rw-r--r--spec/ruby/library/timeout/timeout_spec.rb16
-rw-r--r--spec/ruby/library/weakref/fixtures/classes.rb6
-rw-r--r--spec/ruby/library/weakref/weakref_alive_spec.rb2
-rw-r--r--spec/ruby/library/win32ole/win32ole_param/input_spec.rb2
-rw-r--r--spec/ruby/library/win32ole/win32ole_variable/value_spec.rb2
-rw-r--r--spec/ruby/library/yaml/add_builtin_type_spec.rb2
-rw-r--r--spec/ruby/library/yaml/add_domain_type_spec.rb2
-rw-r--r--spec/ruby/library/yaml/add_private_type_spec.rb2
-rw-r--r--spec/ruby/library/yaml/add_ruby_type_spec.rb2
-rw-r--r--spec/ruby/library/yaml/detect_implicit_spec.rb2
-rw-r--r--spec/ruby/library/yaml/dump_spec.rb7
-rw-r--r--spec/ruby/library/yaml/each_node_spec.rb2
-rw-r--r--spec/ruby/library/yaml/emitter_spec.rb2
-rw-r--r--spec/ruby/library/yaml/fixtures/common.rb6
-rw-r--r--spec/ruby/library/yaml/generic_parser_spec.rb2
-rw-r--r--spec/ruby/library/yaml/load_documents_spec.rb10
-rw-r--r--spec/ruby/library/yaml/load_spec.rb135
-rw-r--r--spec/ruby/library/yaml/object_maker_spec.rb2
-rw-r--r--spec/ruby/library/yaml/parse_documents_spec.rb2
-rw-r--r--spec/ruby/library/yaml/parser_spec.rb2
-rw-r--r--spec/ruby/library/yaml/quick_emit_spec.rb2
-rw-r--r--spec/ruby/library/yaml/read_type_class_spec.rb2
-rw-r--r--spec/ruby/library/yaml/shared/load.rb136
-rw-r--r--spec/ruby/library/yaml/tagurize_spec.rb11
-rw-r--r--spec/ruby/library/yaml/to_yaml_spec.rb12
-rw-r--r--spec/ruby/library/yaml/transfer_spec.rb2
-rw-r--r--spec/ruby/library/yaml/try_implicit_spec.rb2
-rw-r--r--spec/ruby/library/yaml/unsafe_load_spec.rb9
-rw-r--r--spec/ruby/library/zlib/adler32_spec.rb2
-rw-r--r--spec/ruby/library/zlib/crc32_spec.rb2
-rw-r--r--spec/ruby/library/zlib/crc_table_spec.rb143
-rw-r--r--spec/ruby/library/zlib/deflate/deflate_spec.rb5
-rw-r--r--spec/ruby/library/zlib/gzipfile/close_spec.rb2
-rw-r--r--spec/ruby/library/zlib/gzipfile/closed_spec.rb4
-rw-r--r--spec/ruby/library/zlib/inflate/inflate_spec.rb7
-rw-r--r--spec/ruby/library/zlib/zstream/flush_next_out_spec.rb2
-rw-r--r--spec/ruby/optional/capi/README9
-rw-r--r--spec/ruby/optional/capi/array_spec.rb46
-rw-r--r--spec/ruby/optional/capi/basic_object_spec.rb24
-rw-r--r--spec/ruby/optional/capi/bignum_spec.rb6
-rw-r--r--spec/ruby/optional/capi/binding_spec.rb28
-rw-r--r--spec/ruby/optional/capi/class_spec.rb136
-rw-r--r--spec/ruby/optional/capi/constants_spec.rb105
-rw-r--r--spec/ruby/optional/capi/data_spec.rb7
-rw-r--r--spec/ruby/optional/capi/debug_spec.rb66
-rw-r--r--spec/ruby/optional/capi/encoding_spec.rb254
-rw-r--r--spec/ruby/optional/capi/exception_spec.rb89
-rw-r--r--spec/ruby/optional/capi/ext/array_spec.c38
-rw-r--r--spec/ruby/optional/capi/ext/basic_object_spec.c19
-rw-r--r--spec/ruby/optional/capi/ext/bignum_spec.c4
-rw-r--r--spec/ruby/optional/capi/ext/binding_spec.c19
-rw-r--r--spec/ruby/optional/capi/ext/boolean_spec.c2
-rw-r--r--spec/ruby/optional/capi/ext/class_id_under_autoload_spec.c8
-rw-r--r--spec/ruby/optional/capi/ext/class_spec.c61
-rw-r--r--spec/ruby/optional/capi/ext/class_under_autoload_spec.c8
-rw-r--r--spec/ruby/optional/capi/ext/constants_spec.c383
-rw-r--r--spec/ruby/optional/capi/ext/data_spec.c14
-rw-r--r--spec/ruby/optional/capi/ext/debug_spec.c93
-rw-r--r--spec/ruby/optional/capi/ext/encoding_spec.c146
-rw-r--r--spec/ruby/optional/capi/ext/exception_spec.c13
-rw-r--r--spec/ruby/optional/capi/ext/fiber_spec.c69
-rw-r--r--spec/ruby/optional/capi/ext/float_spec.c9
-rw-r--r--spec/ruby/optional/capi/ext/gc_spec.c52
-rw-r--r--spec/ruby/optional/capi/ext/globals_spec.c47
-rw-r--r--spec/ruby/optional/capi/ext/hash_spec.c17
-rw-r--r--spec/ruby/optional/capi/ext/integer_spec.c9
-rw-r--r--spec/ruby/optional/capi/ext/io_spec.c76
-rw-r--r--spec/ruby/optional/capi/ext/kernel_spec.c73
-rw-r--r--spec/ruby/optional/capi/ext/language_spec.c42
-rw-r--r--spec/ruby/optional/capi/ext/module_spec.c41
-rw-r--r--spec/ruby/optional/capi/ext/module_under_autoload_spec.c8
-rw-r--r--spec/ruby/optional/capi/ext/numeric_spec.c7
-rw-r--r--spec/ruby/optional/capi/ext/object_spec.c115
-rw-r--r--spec/ruby/optional/capi/ext/proc_spec.c64
-rw-r--r--spec/ruby/optional/capi/ext/rbasic_spec.c100
-rw-r--r--spec/ruby/optional/capi/ext/regexp_spec.c27
-rw-r--r--spec/ruby/optional/capi/ext/rubyspec.h17
-rw-r--r--spec/ruby/optional/capi/ext/string_spec.c226
-rw-r--r--spec/ruby/optional/capi/ext/struct_spec.c4
-rw-r--r--spec/ruby/optional/capi/ext/symbol_spec.c26
-rw-r--r--spec/ruby/optional/capi/ext/thread_spec.c44
-rw-r--r--spec/ruby/optional/capi/ext/tracepoint_spec.c49
-rw-r--r--spec/ruby/optional/capi/ext/typed_data_spec.c72
-rw-r--r--spec/ruby/optional/capi/ext/util_spec.c36
-rw-r--r--spec/ruby/optional/capi/fiber_spec.rb89
-rw-r--r--spec/ruby/optional/capi/fixtures/class.rb13
-rw-r--r--spec/ruby/optional/capi/fixtures/module.rb4
-rw-r--r--spec/ruby/optional/capi/fixtures/object.rb29
-rw-r--r--spec/ruby/optional/capi/fixtures/read.txt1
-rw-r--r--spec/ruby/optional/capi/float_spec.rb13
-rw-r--r--spec/ruby/optional/capi/gc_spec.rb56
-rw-r--r--spec/ruby/optional/capi/globals_spec.rb83
-rw-r--r--spec/ruby/optional/capi/hash_spec.rb19
-rw-r--r--spec/ruby/optional/capi/integer_spec.rb15
-rw-r--r--spec/ruby/optional/capi/io_spec.rb51
-rw-r--r--spec/ruby/optional/capi/kernel_spec.rb219
-rw-r--r--spec/ruby/optional/capi/language_spec.rb37
-rw-r--r--spec/ruby/optional/capi/module_spec.rb67
-rw-r--r--spec/ruby/optional/capi/numeric_spec.rb72
-rw-r--r--spec/ruby/optional/capi/object_spec.rb295
-rw-r--r--spec/ruby/optional/capi/proc_spec.rb79
-rw-r--r--spec/ruby/optional/capi/rbasic_spec.rb42
-rw-r--r--spec/ruby/optional/capi/regexp_spec.rb59
-rw-r--r--spec/ruby/optional/capi/shared/rbasic.rb29
-rw-r--r--spec/ruby/optional/capi/spec_helper.rb45
-rw-r--r--spec/ruby/optional/capi/string_spec.rb385
-rw-r--r--spec/ruby/optional/capi/struct_spec.rb6
-rw-r--r--spec/ruby/optional/capi/symbol_spec.rb47
-rw-r--r--spec/ruby/optional/capi/thread_spec.rb74
-rw-r--r--spec/ruby/optional/capi/time_spec.rb84
-rw-r--r--spec/ruby/optional/capi/tracepoint_spec.rb56
-rw-r--r--spec/ruby/optional/capi/typed_data_spec.rb28
-rw-r--r--spec/ruby/optional/capi/util_spec.rb127
-rw-r--r--spec/ruby/security/cve_2010_1330_spec.rb2
-rw-r--r--spec/ruby/security/cve_2013_4164_spec.rb4
-rw-r--r--spec/ruby/security/cve_2014_8080_spec.rb50
-rw-r--r--spec/ruby/security/cve_2017_17742_spec.rb57
-rw-r--r--spec/ruby/security/cve_2018_16396_spec.rb18
-rw-r--r--spec/ruby/security/cve_2018_8778_spec.rb2
-rw-r--r--spec/ruby/security/cve_2018_8780_spec.rb20
-rw-r--r--spec/ruby/security/cve_2019_8321_spec.rb26
-rw-r--r--spec/ruby/security/cve_2019_8322_spec.rb24
-rw-r--r--spec/ruby/security/cve_2019_8323_spec.rb48
-rw-r--r--spec/ruby/security/cve_2019_8325_spec.rb58
-rw-r--r--spec/ruby/security/cve_2020_10663_spec.rb39
-rw-r--r--spec/ruby/shared/enumerable/minmax.rb24
-rw-r--r--spec/ruby/shared/enumerator/enum_for.rb7
-rw-r--r--spec/ruby/shared/fiber/resume.rb21
-rw-r--r--spec/ruby/shared/file/executable.rb37
-rw-r--r--spec/ruby/shared/file/executable_real.rb35
-rw-r--r--spec/ruby/shared/file/identical.rb6
-rw-r--r--spec/ruby/shared/file/readable.rb21
-rw-r--r--spec/ruby/shared/file/readable_real.rb16
-rw-r--r--spec/ruby/shared/file/world_readable.rb12
-rw-r--r--spec/ruby/shared/file/world_writable.rb12
-rw-r--r--spec/ruby/shared/file/writable.rb18
-rw-r--r--spec/ruby/shared/file/writable_real.rb16
-rw-r--r--spec/ruby/shared/hash/key_error.rb28
-rw-r--r--spec/ruby/shared/io/putc.rb2
-rw-r--r--spec/ruby/shared/kernel/complex.rb133
-rw-r--r--spec/ruby/shared/kernel/raise.rb120
-rw-r--r--spec/ruby/shared/process/exit.rb32
-rw-r--r--spec/ruby/shared/queue/deque.rb62
-rw-r--r--spec/ruby/shared/rational/Rational.rb102
-rw-r--r--spec/ruby/shared/rational/arithmetic_exception_in_coerce.rb32
-rw-r--r--spec/ruby/shared/rational/coerce.rb5
-rw-r--r--spec/ruby/shared/rational/comparison.rb30
-rw-r--r--spec/ruby/shared/rational/divmod.rb6
-rw-r--r--spec/ruby/shared/rational/exponent.rb44
-rw-r--r--spec/ruby/shared/rational/minus.rb48
-rw-r--r--spec/ruby/shared/rational/to_f.rb6
-rw-r--r--spec/ruby/shared/sizedqueue/enque.rb63
-rw-r--r--spec/ruby/shared/sizedqueue/new.rb9
-rw-r--r--spec/ruby/shared/string/end_with.rb61
-rw-r--r--spec/ruby/shared/string/start_with.rb76
-rw-r--r--spec/ruby/shared/string/times.rb28
-rw-r--r--spec/ruby/shared/time/strftime_for_time.rb8
-rw-r--r--spec/ruby/spec_helper.rb10
-rw-r--r--spec/syntax_suggest/fixtures/derailed_require_tree.rb.txt74
-rwxr-xr-xspec/syntax_suggest/fixtures/rexe.rb.txt569
-rw-r--r--spec/syntax_suggest/fixtures/routes.rb.txt121
-rw-r--r--spec/syntax_suggest/fixtures/ruby_buildpack.rb.txt1344
-rw-r--r--spec/syntax_suggest/fixtures/syntax_tree.rb.txt9234
-rw-r--r--spec/syntax_suggest/fixtures/this_project_extra_def.rb.txt64
-rw-r--r--spec/syntax_suggest/fixtures/webmock.rb.txt35
-rw-r--r--spec/syntax_suggest/integration/exe_cli_spec.rb27
-rw-r--r--spec/syntax_suggest/integration/ruby_command_line_spec.rb193
-rw-r--r--spec/syntax_suggest/integration/syntax_suggest_spec.rb239
-rw-r--r--spec/syntax_suggest/spec_helper.rb104
-rw-r--r--spec/syntax_suggest/unit/api_spec.rb108
-rw-r--r--spec/syntax_suggest/unit/around_block_scan_spec.rb165
-rw-r--r--spec/syntax_suggest/unit/block_expand_spec.rb230
-rw-r--r--spec/syntax_suggest/unit/capture/before_after_keyword_ends_spec.rb47
-rw-r--r--spec/syntax_suggest/unit/capture/falling_indent_lines_spec.rb44
-rw-r--r--spec/syntax_suggest/unit/capture_code_context_spec.rb229
-rw-r--r--spec/syntax_suggest/unit/clean_document_spec.rb260
-rw-r--r--spec/syntax_suggest/unit/cli_spec.rb224
-rw-r--r--spec/syntax_suggest/unit/code_block_spec.rb77
-rw-r--r--spec/syntax_suggest/unit/code_frontier_spec.rb135
-rw-r--r--spec/syntax_suggest/unit/code_line_spec.rb165
-rw-r--r--spec/syntax_suggest/unit/code_search_spec.rb505
-rw-r--r--spec/syntax_suggest/unit/core_ext_spec.rb34
-rw-r--r--spec/syntax_suggest/unit/display_invalid_blocks_spec.rb174
-rw-r--r--spec/syntax_suggest/unit/explain_syntax_spec.rb255
-rw-r--r--spec/syntax_suggest/unit/lex_all_spec.rb29
-rw-r--r--spec/syntax_suggest/unit/pathname_from_message_spec.rb56
-rw-r--r--spec/syntax_suggest/unit/priority_queue_spec.rb95
-rw-r--r--spec/syntax_suggest/unit/scan_history_spec.rb114
-rw-r--r--sprintf.c1404
-rw-r--r--st.c988
-rw-r--r--strftime.c38
-rw-r--r--string.c10097
-rw-r--r--string.rb552
-rw-r--r--struct.c1804
-rw-r--r--symbol.c927
-rw-r--r--symbol.h28
-rw-r--r--symbol.rb15
-rw-r--r--template/Doxyfile.tmpl2506
-rw-r--r--template/GNUmakefile.in23
-rw-r--r--template/Makefile.in267
-rw-r--r--template/builtin_binary.inc.tmpl30
-rw-r--r--template/call_iseq_optimized.inc.tmpl68
-rw-r--r--template/configure-ext.mk.tmpl6
-rw-r--r--template/encdb.h.tmpl21
-rw-r--r--template/extinit.c.tmpl2
-rw-r--r--template/exts.mk.tmpl22
-rw-r--r--template/fake.rb.in39
-rw-r--r--template/id.c.tmpl7
-rw-r--r--template/id.h.tmpl10
-rw-r--r--template/prelude.c.tmpl164
-rwxr-xr-xtemplate/ruby-gdb.in6
-rwxr-xr-xtemplate/ruby-lldb.in6
-rw-r--r--template/ruby.pc.in16
-rw-r--r--template/sizes.c.tmpl2
-rw-r--r--template/transdb.h.tmpl4
-rw-r--r--test/-ext-/arith_seq/test_arith_seq_beg_len_step.rb52
-rw-r--r--test/-ext-/array/test_resize.rb6
-rw-r--r--test/-ext-/array/test_to_ary_concat.rb20
-rw-r--r--test/-ext-/bignum/test_big2str.rb38
-rw-r--r--test/-ext-/bignum/test_bigzero.rb20
-rw-r--r--test/-ext-/bignum/test_div.rb38
-rw-r--r--test/-ext-/bignum/test_mul.rb260
-rw-r--r--test/-ext-/bignum/test_pack.rb737
-rw-r--r--test/-ext-/bignum/test_str2big.rb52
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb15
-rw-r--r--test/-ext-/debug/test_profile_frames.rb74
-rw-r--r--test/-ext-/econv/test_append.rb23
-rw-r--r--test/-ext-/eval/test_eval.rb12
-rw-r--r--test/-ext-/float/test_nextafter.rb4
-rw-r--r--test/-ext-/funcall/test_funcall.rb11
-rw-r--r--test/-ext-/funcall/test_passing_block.rb28
-rw-r--r--test/-ext-/gvl/test_last_thread.rb2
-rw-r--r--test/-ext-/gvl/test_ubf_async_safe.rb4
-rw-r--r--test/-ext-/integer/test_integer.rb10
-rw-r--r--test/-ext-/iseq_load/test_iseq_load.rb6
-rw-r--r--test/-ext-/num2int/test_num2int.rb4
-rw-r--r--test/-ext-/postponed_job/test_postponed_job.rb7
-rw-r--r--test/-ext-/rational/test_rat.rb44
-rw-r--r--test/-ext-/string/test_capacity.rb42
-rw-r--r--test/-ext-/string/test_cstr.rb14
-rw-r--r--test/-ext-/string/test_ellipsize.rb2
-rw-r--r--test/-ext-/string/test_enc_str_buf_cat.rb9
-rw-r--r--test/-ext-/string/test_fstring.rb38
-rw-r--r--test/-ext-/string/test_interned_str.rb12
-rw-r--r--test/-ext-/string/test_normalize.rb8
-rw-r--r--test/-ext-/string/test_rb_str_dup.rb6
-rw-r--r--test/-ext-/string/test_set_len.rb39
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb8
-rw-r--r--test/-ext-/symbol/test_type.rb14
-rw-r--r--test/-ext-/test_abi.rb47
-rw-r--r--test/-ext-/test_notimplement.rb7
-rw-r--r--test/-ext-/test_printf.rb4
-rw-r--r--test/-ext-/test_random.rb45
-rw-r--r--test/-ext-/test_scan_args.rb121
-rw-r--r--test/-ext-/thread/test_instrumentation_api.rb91
-rw-r--r--test/-ext-/thread_fd/test_thread_fd_close.rb24
-rw-r--r--test/-ext-/thread_fd_close/test_thread_fd_close.rb25
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb18
-rw-r--r--test/-ext-/wait/test_wait.rb36
-rw-r--r--test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb49
-rw-r--r--test/-ext-/win32/test_console_attr.rb14
-rw-r--r--test/benchmark/test_benchmark.rb11
-rw-r--r--test/bigdecimal/helper.rb39
-rw-r--r--test/bigdecimal/test_bigdecimal.rb461
-rw-r--r--test/bigdecimal/test_bigdecimal_util.rb60
-rw-r--r--test/bigdecimal/test_bigmath.rb2
-rw-r--r--test/bigdecimal/test_ractor.rb23
-rw-r--r--test/bigdecimal/testbase.rb28
-rw-r--r--test/cgi/test_cgi_cookie.rb90
-rw-r--r--test/cgi/test_cgi_core.rb4
-rw-r--r--test/cgi/test_cgi_header.rb8
-rw-r--r--test/cgi/test_cgi_util.rb118
-rw-r--r--test/coverage/autostart.rb2
-rw-r--r--test/coverage/main.rb1
-rw-r--r--test/coverage/test_coverage.rb251
-rw-r--r--test/csv/helper.rb24
-rw-r--r--test/csv/interface/test_read.rb110
-rw-r--r--test/csv/interface/test_read_write.rb76
-rw-r--r--test/csv/interface/test_write.rb43
-rw-r--r--test/csv/parse/test_convert.rb57
-rw-r--r--test/csv/parse/test_general.rb90
-rw-r--r--test/csv/parse/test_header.rb9
-rw-r--r--test/csv/parse/test_inputs_scanner.rb63
-rw-r--r--test/csv/parse/test_invalid.rb13
-rw-r--r--test/csv/parse/test_liberal_parsing.rb11
-rw-r--r--test/csv/parse/test_read.rb27
-rw-r--r--test/csv/parse/test_skip_lines.rb13
-rw-r--r--test/csv/parse/test_strip.rb34
-rw-r--r--test/csv/test_data_converters.rb84
-rw-r--r--test/csv/test_encodings.rb53
-rw-r--r--test/csv/test_patterns.rb27
-rw-r--r--test/csv/test_row.rb3
-rw-r--r--test/csv/test_table.rb77
-rw-r--r--test/csv/write/test_converters.rb8
-rw-r--r--test/csv/write/test_force_quotes.rb78
-rw-r--r--test/csv/write/test_general.rb16
-rw-r--r--test/date/test_date.rb41
-rw-r--r--test/date/test_date_conv.rb17
-rw-r--r--test/date/test_date_marshal.rb7
-rw-r--r--test/date/test_date_parse.rb85
-rw-r--r--test/date/test_date_ractor.rb27
-rw-r--r--test/date/test_date_strftime.rb4
-rw-r--r--test/date/test_date_strptime.rb9
-rw-r--r--test/dbm/test_dbm.rb634
-rw-r--r--test/did_you_mean/core_ext/test_name_error_extension.rb23
-rw-r--r--test/did_you_mean/fixtures/book.rb2
-rw-r--r--test/did_you_mean/helper.rb14
-rw-r--r--test/did_you_mean/spell_checking/test_class_name_check.rb4
-rw-r--r--test/did_you_mean/spell_checking/test_key_name_check.rb14
-rw-r--r--test/did_you_mean/spell_checking/test_method_name_check.rb43
-rw-r--r--test/did_you_mean/spell_checking/test_pattern_key_name_check.rb20
-rw-r--r--test/did_you_mean/spell_checking/test_require_path_check.rb32
-rw-r--r--test/did_you_mean/spell_checking/test_uncorrectable_name_check.rb2
-rw-r--r--test/did_you_mean/spell_checking/test_variable_name_check.rb36
-rw-r--r--test/did_you_mean/test_ractor_compatibility.rb117
-rw-r--r--test/did_you_mean/test_spell_checker.rb1
-rw-r--r--test/did_you_mean/test_tree_spell_checker.rb203
-rw-r--r--test/did_you_mean/test_verbose_formatter.rb21
-rw-r--r--test/did_you_mean/tree_spell/human_typo.rb34
-rw-r--r--test/did_you_mean/tree_spell/test_change_word.rb2
-rw-r--r--test/digest/test_digest.rb8
-rw-r--r--test/digest/test_digest_extend.rb13
-rw-r--r--test/digest/test_ractor.rb97
-rw-r--r--test/drb/drbtest.rb8
-rw-r--r--test/drb/test_drb.rb29
-rw-r--r--test/drb/test_drbssl.rb11
-rw-r--r--test/drb/ut_drb.rb14
-rw-r--r--test/dtrace/helper.rb2
-rw-r--r--test/erb/test_erb.rb42
-rw-r--r--test/erb/test_erb_command.rb22
-rw-r--r--test/error_highlight/test_error_highlight.rb1290
-rw-r--r--test/etc/test_etc.rb28
-rw-r--r--test/excludes/TestArray.rb1
-rw-r--r--test/excludes/TestGem.rb4
-rw-r--r--test/excludes/TestThread.rb12
-rw-r--r--test/excludes/TestThreadQueue.rb9
-rw-r--r--test/fiber/autoload.rb3
-rw-r--r--test/fiber/http.rb54
-rw-r--r--test/fiber/scheduler.rb363
-rw-r--r--test/fiber/test_address_resolve.rb278
-rw-r--r--test/fiber/test_backtrace.rb22
-rw-r--r--test/fiber/test_enumerator.rb53
-rw-r--r--test/fiber/test_io.rb222
-rw-r--r--test/fiber/test_io_buffer.rb158
-rw-r--r--test/fiber/test_mutex.rb240
-rw-r--r--test/fiber/test_process.rb72
-rw-r--r--test/fiber/test_queue.rb54
-rw-r--r--test/fiber/test_ractor.rb23
-rw-r--r--test/fiber/test_scheduler.rb226
-rw-r--r--test/fiber/test_sleep.rb71
-rw-r--r--test/fiber/test_storage.rb115
-rw-r--r--test/fiber/test_thread.rb130
-rw-r--r--test/fiber/test_timeout.rb51
-rw-r--r--test/fiddle/helper.rb62
-rw-r--r--test/fiddle/test_c_struct_builder.rb69
-rw-r--r--test/fiddle/test_c_struct_entry.rb130
-rw-r--r--test/fiddle/test_c_union_entity.rb15
-rw-r--r--test/fiddle/test_closure.rb106
-rw-r--r--test/fiddle/test_cparser.rb169
-rw-r--r--test/fiddle/test_fiddle.rb41
-rw-r--r--test/fiddle/test_func.rb108
-rw-r--r--test/fiddle/test_function.rb146
-rw-r--r--test/fiddle/test_handle.rb42
-rw-r--r--test/fiddle/test_import.rb395
-rw-r--r--test/fiddle/test_memory_view.rb143
-rw-r--r--test/fiddle/test_pack.rb37
-rw-r--r--test/fiddle/test_pinned.rb28
-rw-r--r--test/fiddle/test_pointer.rb119
-rw-r--r--test/fileutils/clobber.rb5
-rw-r--r--test/fileutils/test_dryrun.rb2
-rw-r--r--test/fileutils/test_fileutils.rb148
-rw-r--r--test/fileutils/test_nowrite.rb2
-rw-r--r--test/fileutils/test_verbose.rb2
-rw-r--r--test/fileutils/visibility_tests.rb5
-rw-r--r--test/fixtures/fake_sorted_set_gem/sorted_set.rb9
-rw-r--r--test/gdbm/test_gdbm.rb734
-rw-r--r--test/io/console/test_io_console.rb108
-rw-r--r--test/io/nonblock/test_flush.rb2
-rw-r--r--test/io/wait/test_io_wait.rb36
-rw-r--r--test/io/wait/test_io_wait_uncommon.rb39
-rw-r--r--test/io/wait/test_ractor.rb17
-rw-r--r--test/irb/helper.rb76
-rw-r--r--test/irb/test_cmd.rb692
-rw-r--r--test/irb/test_color.rb168
-rw-r--r--test/irb/test_color_printer.rb69
-rw-r--r--test/irb/test_completion.rb346
-rw-r--r--test/irb/test_context.rb515
-rw-r--r--test/irb/test_debug_cmd.rb303
-rw-r--r--test/irb/test_history.rb209
-rw-r--r--test/irb/test_init.rb138
-rw-r--r--test/irb/test_input_method.rb79
-rw-r--r--test/irb/test_option.rb4
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb44
-rw-r--r--test/irb/test_ruby_lex.rb725
-rw-r--r--test/irb/test_workspace.rb33
-rw-r--r--test/irb/yamatanooroti/test_rendering.rb249
-rw-r--r--test/json/fixtures/fail29.json1
-rw-r--r--test/json/fixtures/fail30.json1
-rw-r--r--test/json/fixtures/fail31.json1
-rw-r--r--test/json/fixtures/fail32.json1
-rw-r--r--test/json/json_addition_test.rb6
-rw-r--r--test/json/json_common_interface_test.rb43
-rw-r--r--test/json/json_fixtures_test.rb10
-rw-r--r--test/json/json_generator_test.rb54
-rw-r--r--test/json/json_parser_test.rb30
-rw-r--r--test/json/ractor_test.rb30
-rw-r--r--test/json/test_helper.rb6
-rw-r--r--test/lib/jit_support.rb54
-rw-r--r--test/logger/helper.rb13
-rw-r--r--test/logger/test_formatter.rb35
-rw-r--r--test/logger/test_logdevice.rb5
-rw-r--r--test/logger/test_logger.rb20
-rw-r--r--test/logger/test_logperiod.rb2
-rw-r--r--test/logger/test_severity.rb2
-rw-r--r--test/matrix/test_matrix.rb795
-rw-r--r--test/matrix/test_vector.rb335
-rw-r--r--test/misc/test_ruby_mode.rb183
-rw-r--r--test/mkmf/base.rb226
-rw-r--r--test/mkmf/test_config.rb16
-rw-r--r--test/mkmf/test_constant.rb60
-rw-r--r--test/mkmf/test_convertible.rb48
-rw-r--r--test/mkmf/test_egrep_cpp.rb13
-rw-r--r--test/mkmf/test_find_executable.rb82
-rw-r--r--test/mkmf/test_flags.rb92
-rw-r--r--test/mkmf/test_framework.rb70
-rw-r--r--test/mkmf/test_have_func.rb18
-rw-r--r--test/mkmf/test_have_library.rb84
-rw-r--r--test/mkmf/test_have_macro.rb46
-rw-r--r--test/mkmf/test_install.rb28
-rw-r--r--test/mkmf/test_libs.rb153
-rw-r--r--test/mkmf/test_mkmf.rb13
-rw-r--r--test/mkmf/test_pkg_config.rb66
-rw-r--r--test/mkmf/test_signedness.rb38
-rw-r--r--test/mkmf/test_sizeof.rb74
-rw-r--r--test/monitor/test_monitor.rb47
-rw-r--r--test/net/fixtures/Makefile6
-rw-r--r--test/net/fixtures/cacert.pem44
-rw-r--r--test/net/fixtures/server.crt99
-rw-r--r--test/net/fixtures/server.key55
-rw-r--r--test/net/ftp/test_buffered_socket.rb48
-rw-r--r--test/net/ftp/test_ftp.rb2570
-rw-r--r--test/net/ftp/test_mlsx_entry.rb98
-rw-r--r--test/net/http/test_http.rb187
-rw-r--r--test/net/http/test_http_request.rb6
-rw-r--r--test/net/http/test_httpheader.rb27
-rw-r--r--test/net/http/test_httpresponse.rb287
-rw-r--r--test/net/http/test_https.rb131
-rw-r--r--test/net/http/test_https_proxy.rb2
-rw-r--r--test/net/http/utils.rb6
-rw-r--r--test/net/imap/test_imap.rb794
-rw-r--r--test/net/imap/test_imap_response_parser.rb311
-rw-r--r--test/net/pop/test_pop.rb166
-rw-r--r--test/net/protocol/test_protocol.rb37
-rw-r--r--test/net/smtp/test_response.rb100
-rw-r--r--test/net/smtp/test_smtp.rb200
-rw-r--r--test/net/smtp/test_ssl_socket.rb97
-rw-r--r--test/objspace/test_objspace.rb379
-rw-r--r--test/objspace/test_ractor.rb17
-rw-r--r--test/open-uri/test_open-uri.rb275
-rw-r--r--test/open-uri/test_ssl.rb19
-rw-r--r--test/openssl/fixtures/pkey/certificate.derbin0 -> 1325 bytes-rw-r--r--test/openssl/fixtures/pkey/empty.der0
-rw-r--r--test/openssl/fixtures/pkey/empty.pem0
-rw-r--r--test/openssl/fixtures/pkey/fullchain.pem56
-rw-r--r--test/openssl/fixtures/pkey/garbage.txt1
-rw-r--r--test/openssl/fixtures/pkey/p256_too_large.pem5
-rw-r--r--test/openssl/fixtures/pkey/p384_invalid.pem6
-rw-r--r--test/openssl/test_asn1.rb69
-rw-r--r--test/openssl/test_bn.rb130
-rw-r--r--test/openssl/test_buffering.rb11
-rw-r--r--test/openssl/test_cipher.rb90
-rw-r--r--test/openssl/test_config.rb178
-rw-r--r--test/openssl/test_digest.rb64
-rw-r--r--test/openssl/test_engine.rb4
-rw-r--r--test/openssl/test_fips.rb2
-rw-r--r--test/openssl/test_hmac.rb33
-rw-r--r--test/openssl/test_kdf.rb2
-rw-r--r--test/openssl/test_ns_spki.rb6
-rw-r--r--test/openssl/test_ocsp.rb46
-rw-r--r--test/openssl/test_ossl.rb65
-rw-r--r--test/openssl/test_pair.rb33
-rw-r--r--test/openssl/test_pkcs12.rb299
-rw-r--r--test/openssl/test_pkcs7.rb42
-rw-r--r--test/openssl/test_pkey.rb177
-rw-r--r--test/openssl/test_pkey_dh.rb107
-rw-r--r--test/openssl/test_pkey_dsa.rb109
-rw-r--r--test/openssl/test_pkey_ec.rb231
-rw-r--r--test/openssl/test_pkey_rsa.rb383
-rw-r--r--test/openssl/test_random.rb2
-rw-r--r--test/openssl/test_ssl.rb867
-rw-r--r--test/openssl/test_ssl_session.rb13
-rw-r--r--test/openssl/test_ts.rb680
-rw-r--r--test/openssl/test_x509attr.rb12
-rw-r--r--test/openssl/test_x509cert.rb143
-rw-r--r--test/openssl/test_x509crl.rb45
-rw-r--r--test/openssl/test_x509ext.rb15
-rw-r--r--test/openssl/test_x509name.rb36
-rw-r--r--test/openssl/test_x509req.rb45
-rw-r--r--test/openssl/test_x509store.rb414
-rw-r--r--test/openssl/ut_eof.rb14
-rw-r--r--test/openssl/utils.rb138
-rw-r--r--test/optparse/test_acceptable.rb3
-rw-r--r--test/optparse/test_autoconf.rb4
-rw-r--r--test/optparse/test_bash_completion.rb4
-rw-r--r--test/optparse/test_cclass.rb2
-rw-r--r--test/optparse/test_did_you_mean.rb22
-rw-r--r--test/optparse/test_getopts.rb4
-rw-r--r--test/optparse/test_kwargs.rb4
-rw-r--r--test/optparse/test_load.rb141
-rw-r--r--test/optparse/test_noarg.rb6
-rw-r--r--test/optparse/test_optarg.rb2
-rw-r--r--test/optparse/test_optparse.rb45
-rw-r--r--test/optparse/test_placearg.rb8
-rw-r--r--test/optparse/test_reqarg.rb10
-rw-r--r--test/optparse/test_summary.rb25
-rw-r--r--test/optparse/test_zsh_completion.rb4
-rw-r--r--test/ostruct/test_ostruct.rb200
-rw-r--r--test/pathname/test_pathname.rb159
-rw-r--r--test/pathname/test_ractor.rb22
-rw-r--r--test/psych/helper.rb40
-rw-r--r--test/psych/test_alias_and_anchor.rb12
-rw-r--r--test/psych/test_array.rb22
-rw-r--r--test/psych/test_class.rb4
-rw-r--r--test/psych/test_coder.rb141
-rw-r--r--test/psych/test_date_time.rb24
-rw-r--r--test/psych/test_deprecated.rb4
-rw-r--r--test/psych/test_document.rb2
-rw-r--r--test/psych/test_emitter.rb10
-rw-r--r--test/psych/test_encoding.rb11
-rw-r--r--test/psych/test_exception.rb61
-rw-r--r--test/psych/test_hash.rb80
-rw-r--r--test/psych/test_marshalable.rb12
-rw-r--r--test/psych/test_merge_keys.rb34
-rw-r--r--test/psych/test_nil.rb4
-rw-r--r--test/psych/test_numeric.rb12
-rw-r--r--test/psych/test_object.rb15
-rw-r--r--test/psych/test_object_references.rb12
-rw-r--r--test/psych/test_omap.rb4
-rw-r--r--test/psych/test_parser.rb24
-rw-r--r--test/psych/test_psych.rb181
-rw-r--r--test/psych/test_ractor.rb50
-rw-r--r--test/psych/test_safe_load.rb93
-rw-r--r--test/psych/test_scalar_scanner.rb75
-rw-r--r--test/psych/test_serialize_subclasses.rb4
-rw-r--r--test/psych/test_set.rb6
-rw-r--r--test/psych/test_string.rb27
-rw-r--r--test/psych/test_struct.rb6
-rw-r--r--test/psych/test_yaml.rb41
-rw-r--r--test/psych/test_yaml_special_cases.rb6
-rw-r--r--test/psych/test_yamlstore.rb47
-rw-r--r--test/psych/visitors/test_to_ruby.rb5
-rw-r--r--test/psych/visitors/test_yaml_tree.rb13
-rw-r--r--test/racc/assets/ifelse.y14
-rw-r--r--test/racc/assets/mof.y6
-rw-r--r--test/racc/case.rb111
-rw-r--r--test/racc/helper.rb115
-rw-r--r--test/racc/regress/cadenza190
-rw-r--r--test/racc/regress/cast1552
-rw-r--r--test/racc/regress/csspool396
-rw-r--r--test/racc/regress/edtf446
-rw-r--r--test/racc/regress/huia675
-rw-r--r--test/racc/regress/journey2
-rw-r--r--test/racc/regress/liquor218
-rw-r--r--test/racc/regress/machete48
-rw-r--r--test/racc/regress/mediacloth454
-rw-r--r--test/racc/regress/mof192
-rw-r--r--test/racc/regress/namae70
-rw-r--r--test/racc/regress/nasl1292
-rw-r--r--test/racc/regress/nokogiri-css124
-rw-r--r--test/racc/regress/opal7650
-rw-r--r--test/racc/regress/php_serialization36
-rw-r--r--test/racc/regress/riml2238
-rw-r--r--test/racc/regress/ruby187408
-rw-r--r--test/racc/regress/ruby227892
-rw-r--r--test/racc/regress/tp_plus430
-rw-r--r--test/racc/regress/twowaysql42
-rw-r--r--test/racc/test_chk_y.rb2
-rw-r--r--test/racc/test_grammar_file_parser.rb2
-rw-r--r--test/racc/test_racc_command.rb19
-rw-r--r--test/racc/test_scan_y.rb2
-rw-r--r--test/rdoc/helper.rb6
-rw-r--r--test/rdoc/support/test_case.rb33
-rw-r--r--test/rdoc/test_rdoc_alias.rb3
-rw-r--r--test/rdoc/test_rdoc_any_method.rb64
-rw-r--r--test/rdoc/test_rdoc_class_module.rb11
-rw-r--r--test/rdoc/test_rdoc_code_object.rb2
-rw-r--r--test/rdoc/test_rdoc_constant.rb2
-rw-r--r--test/rdoc/test_rdoc_context.rb4
-rw-r--r--test/rdoc/test_rdoc_context_section.rb8
-rw-r--r--test/rdoc/test_rdoc_cross_reference.rb58
-rw-r--r--test/rdoc/test_rdoc_extend.rb11
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb116
-rw-r--r--test/rdoc/test_rdoc_generator_json_index.rb16
-rw-r--r--test/rdoc/test_rdoc_include.rb14
-rw-r--r--test/rdoc/test_rdoc_markdown.rb88
-rw-r--r--test/rdoc/test_rdoc_markdown_test.rb4
-rw-r--r--test/rdoc/test_rdoc_markup_attribute_manager.rb27
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb151
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb30
-rw-r--r--test/rdoc/test_rdoc_markup_to_markdown.rb4
-rw-r--r--test/rdoc/test_rdoc_method_attr.rb3
-rw-r--r--test/rdoc/test_rdoc_normal_class.rb7
-rw-r--r--test/rdoc/test_rdoc_normal_module.rb3
-rw-r--r--test/rdoc/test_rdoc_options.rb134
-rw-r--r--test/rdoc/test_rdoc_parser_c.rb266
-rw-r--r--test/rdoc/test_rdoc_parser_changelog.rb169
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb71
-rw-r--r--test/rdoc/test_rdoc_rd_block_parser.rb21
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb106
-rw-r--r--test/rdoc/test_rdoc_require.rb3
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb99
-rw-r--r--test/rdoc/test_rdoc_ri_paths.rb10
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb83
-rw-r--r--test/rdoc/test_rdoc_servlet.rb12
-rw-r--r--test/rdoc/test_rdoc_store.rb22
-rw-r--r--test/rdoc/test_rdoc_task.rb5
-rw-r--r--test/rdoc/test_rdoc_text.rb10
-rw-r--r--test/rdoc/test_rdoc_top_level.rb10
-rw-r--r--test/rdoc/xref_data.rb17
-rw-r--r--test/rdoc/xref_test_case.rb8
-rw-r--r--test/readline/helper.rb25
-rw-r--r--test/readline/test_readline.rb387
-rw-r--r--test/readline/test_readline_history.rb16
-rw-r--r--test/reline/helper.rb49
-rw-r--r--test/reline/test_config.rb214
-rw-r--r--test/reline/test_history.rb39
-rw-r--r--test/reline/test_key_actor_emacs.rb557
-rw-r--r--test/reline/test_key_actor_vi.rb455
-rw-r--r--test/reline/test_key_stroke.rb49
-rw-r--r--test/reline/test_kill_ring.rb12
-rw-r--r--test/reline/test_macro.rb5
-rw-r--r--test/reline/test_reline.rb220
-rw-r--r--test/reline/test_reline_key.rb53
-rw-r--r--test/reline/test_string_processing.rb64
-rw-r--r--test/reline/test_terminfo.rb61
-rw-r--r--test/reline/test_unicode.rb25
-rw-r--r--test/reline/test_within_pipe.rb31
-rw-r--r--test/reline/windows/test_key_event_record.rb41
-rwxr-xr-xtest/reline/yamatanooroti/multiline_repl215
-rw-r--r--test/reline/yamatanooroti/termination_checker.rb30
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb1345
-rw-r--r--test/resolv/test_addr.rb26
-rw-r--r--test/resolv/test_dns.rb171
-rw-r--r--test/rexml/data/LostineRiver.kml.gzbin50154 -> 0 bytes-rw-r--r--test/rexml/data/ProductionSupport.xml29
-rw-r--r--test/rexml/data/axis.xml25
-rw-r--r--test/rexml/data/bad.xml5
-rw-r--r--test/rexml/data/basic.xml11
-rw-r--r--test/rexml/data/basicupdate.xml47
-rw-r--r--test/rexml/data/broken.rss20
-rw-r--r--test/rexml/data/contents.xml70
-rw-r--r--test/rexml/data/dash.xml12
-rw-r--r--test/rexml/data/defaultNamespace.xml6
-rw-r--r--test/rexml/data/doctype_test.xml34
-rw-r--r--test/rexml/data/documentation.xml542
-rw-r--r--test/rexml/data/euc.xml296
-rw-r--r--test/rexml/data/evaluate.xml28
-rw-r--r--test/rexml/data/fibo.xml29
-rw-r--r--test/rexml/data/foo.xml10
-rw-r--r--test/rexml/data/google.2.xml156
-rw-r--r--test/rexml/data/id.xml21
-rw-r--r--test/rexml/data/iso8859-1.xml4
-rw-r--r--test/rexml/data/jaxen24.xml2
-rw-r--r--test/rexml/data/jaxen3.xml15
-rw-r--r--test/rexml/data/lang.xml11
-rw-r--r--test/rexml/data/lang0.xml18
-rw-r--r--test/rexml/data/message.xml27
-rw-r--r--test/rexml/data/moreover.xml244
-rw-r--r--test/rexml/data/much_ado.xml6850
-rw-r--r--test/rexml/data/namespaces.xml18
-rw-r--r--test/rexml/data/nitf.xml67
-rw-r--r--test/rexml/data/numbers.xml18
-rw-r--r--test/rexml/data/ofbiz-issues-full-177.xml13971
-rw-r--r--test/rexml/data/pi.xml13
-rw-r--r--test/rexml/data/pi2.xml6
-rw-r--r--test/rexml/data/project.xml1
-rw-r--r--test/rexml/data/simple.xml2
-rw-r--r--test/rexml/data/stream_accents.xml4
-rw-r--r--test/rexml/data/t63-1.xmlbin161690 -> 0 bytes-rw-r--r--test/rexml/data/t63-2.svg2828
-rw-r--r--test/rexml/data/t75.xml31
-rw-r--r--test/rexml/data/test/tests.xml683
-rw-r--r--test/rexml/data/test/tests.xsl369
-rw-r--r--test/rexml/data/testNamespaces.xml22
-rw-r--r--test/rexml/data/testsrc.xml64
-rw-r--r--test/rexml/data/text.xml10
-rw-r--r--test/rexml/data/ticket_61.xml4
-rw-r--r--test/rexml/data/ticket_68.xml590
-rw-r--r--test/rexml/data/tutorial.xml678
-rw-r--r--test/rexml/data/underscore.xml6
-rw-r--r--test/rexml/data/utf16.xmlbin207464 -> 0 bytes-rw-r--r--test/rexml/data/web.xml42
-rw-r--r--test/rexml/data/web2.xml7
-rw-r--r--test/rexml/data/working.rss202
-rw-r--r--test/rexml/data/xmlfile-bug.xml15
-rw-r--r--test/rexml/data/xp.tst27
-rw-r--r--test/rexml/data/yahoo.xml80
-rw-r--r--test/rexml/formatter/test_default.rb19
-rw-r--r--test/rexml/functions/test_base.rb261
-rw-r--r--test/rexml/functions/test_boolean.rb75
-rw-r--r--test/rexml/functions/test_local_name.rb44
-rw-r--r--test/rexml/functions/test_number.rb38
-rw-r--r--test/rexml/listener.rb51
-rw-r--r--test/rexml/parse/test_document_type_declaration.rb50
-rw-r--r--test/rexml/parse/test_element.rb51
-rw-r--r--test/rexml/parse/test_notation_declaration.rb100
-rw-r--r--test/rexml/parse/test_processing_instruction.rb25
-rw-r--r--test/rexml/parser/test_sax2.rb203
-rw-r--r--test/rexml/parser/test_stream.rb32
-rw-r--r--test/rexml/parser/test_tree.rb43
-rw-r--r--test/rexml/parser/test_ultra_light.rb70
-rw-r--r--test/rexml/rexml_test_utils.rb10
-rw-r--r--test/rexml/test_attribute.rb14
-rw-r--r--test/rexml/test_attributes.rb223
-rw-r--r--test/rexml/test_attributes_mixin.rb32
-rw-r--r--test/rexml/test_changing_encoding.rb45
-rw-r--r--test/rexml/test_comment.rb26
-rw-r--r--test/rexml/test_contrib.rb585
-rw-r--r--test/rexml/test_core.rb1517
-rw-r--r--test/rexml/test_doctype.rb157
-rw-r--r--test/rexml/test_document.rb416
-rw-r--r--test/rexml/test_element.rb18
-rw-r--r--test/rexml/test_elements.rb119
-rw-r--r--test/rexml/test_encoding.rb108
-rw-r--r--test/rexml/test_entity.rb206
-rw-r--r--test/rexml/test_instruction.rb14
-rw-r--r--test/rexml/test_jaxen.rb131
-rw-r--r--test/rexml/test_light.rb107
-rw-r--r--test/rexml/test_lightparser.rb16
-rw-r--r--test/rexml/test_listener.rb131
-rw-r--r--test/rexml/test_martin_fowler.rb40
-rw-r--r--test/rexml/test_namespace.rb41
-rw-r--r--test/rexml/test_order.rb110
-rw-r--r--test/rexml/test_preceding_sibling.rb41
-rw-r--r--test/rexml/test_pullparser.rb103
-rw-r--r--test/rexml/test_rexml_issuezilla.rb19
-rw-r--r--test/rexml/test_sax.rb287
-rw-r--r--test/rexml/test_stream.rb130
-rw-r--r--test/rexml/test_text.rb75
-rw-r--r--test/rexml/test_ticket_80.rb59
-rw-r--r--test/rexml/test_validation_rng.rb793
-rw-r--r--test/rexml/test_xml_declaration.rb48
-rw-r--r--test/rexml/xpath/test_attribute.rb38
-rw-r--r--test/rexml/xpath/test_axis_preceding_sibling.rb40
-rw-r--r--test/rexml/xpath/test_base.rb1125
-rw-r--r--test/rexml/xpath/test_compare.rb256
-rw-r--r--test/rexml/xpath/test_node.rb43
-rw-r--r--test/rexml/xpath/test_predicate.rb83
-rw-r--r--test/rexml/xpath/test_text.rb77
-rw-r--r--test/rinda/test_rinda.rb110
-rw-r--r--test/ripper/dummyparser.rb6
-rw-r--r--test/ripper/test_lexer.rb176
-rw-r--r--test/ripper/test_parser_events.rb190
-rw-r--r--test/ripper/test_ripper.rb31
-rw-r--r--test/ripper/test_scanner_events.rb48
-rw-r--r--test/ripper/test_sexp.rb64
-rw-r--r--test/rss/dot.pngbin111 -> 0 bytes-rw-r--r--test/rss/rss-assertions.rb2120
-rw-r--r--test/rss/rss-testcase.rb479
-rw-r--r--test/rss/test_1.0.rb308
-rw-r--r--test/rss/test_2.0.rb412
-rw-r--r--test/rss/test_accessor.rb104
-rw-r--r--test/rss/test_atom.rb684
-rw-r--r--test/rss/test_content.rb105
-rw-r--r--test/rss/test_dublincore.rb270
-rw-r--r--test/rss/test_image.rb215
-rw-r--r--test/rss/test_inherit.rb41
-rw-r--r--test/rss/test_itunes.rb356
-rw-r--r--test/rss/test_maker_0.9.rb477
-rw-r--r--test/rss/test_maker_1.0.rb519
-rw-r--r--test/rss/test_maker_2.0.rb758
-rw-r--r--test/rss/test_maker_atom_entry.rb394
-rw-r--r--test/rss/test_maker_atom_feed.rb455
-rw-r--r--test/rss/test_maker_content.rb48
-rw-r--r--test/rss/test_maker_dc.rb150
-rw-r--r--test/rss/test_maker_image.rb63
-rw-r--r--test/rss/test_maker_itunes.rb487
-rw-r--r--test/rss/test_maker_slash.rb38
-rw-r--r--test/rss/test_maker_sy.rb45
-rw-r--r--test/rss/test_maker_taxo.rb82
-rw-r--r--test/rss/test_maker_trackback.rb42
-rw-r--r--test/rss/test_maker_xml-stylesheet.rb84
-rw-r--r--test/rss/test_parser.rb121
-rw-r--r--test/rss/test_parser_1.0.rb529
-rw-r--r--test/rss/test_parser_2.0.rb123
-rw-r--r--test/rss/test_parser_atom_entry.rb164
-rw-r--r--test/rss/test_parser_atom_feed.rb277
-rw-r--r--test/rss/test_setup_maker_0.9.rb247
-rw-r--r--test/rss/test_setup_maker_1.0.rb551
-rw-r--r--test/rss/test_setup_maker_2.0.rb309
-rw-r--r--test/rss/test_setup_maker_atom_entry.rb410
-rw-r--r--test/rss/test_setup_maker_atom_feed.rb446
-rw-r--r--test/rss/test_setup_maker_itunes.rb144
-rw-r--r--test/rss/test_setup_maker_slash.rb39
-rw-r--r--test/rss/test_slash.rb65
-rw-r--r--test/rss/test_syndication.rb126
-rw-r--r--test/rss/test_taxonomy.rb173
-rw-r--r--test/rss/test_to_s.rb701
-rw-r--r--test/rss/test_trackback.rb136
-rw-r--r--test/rss/test_xml-stylesheet.rb109
-rw-r--r--test/ruby/enc/test_case_comprehensive.rb2
-rw-r--r--test/ruby/enc/test_cesu8.rb4
-rw-r--r--test/ruby/enc/test_emoji_breaks.rb205
-rw-r--r--test/ruby/enc/test_grapheme_breaks.rb117
-rw-r--r--test/ruby/enc/test_regex_casefold.rb4
-rw-r--r--test/ruby/marshaltestlib.rb2
-rw-r--r--test/ruby/test_alias.rb65
-rw-r--r--test/ruby/test_argf.rb139
-rw-r--r--test/ruby/test_arithmetic_sequence.rb18
-rw-r--r--test/ruby/test_arity.rb44
-rw-r--r--test/ruby/test_array.rb550
-rw-r--r--test/ruby/test_assignment.rb176
-rw-r--r--test/ruby/test_ast.rb756
-rw-r--r--test/ruby/test_autoload.rb155
-rw-r--r--test/ruby/test_backtrace.rb85
-rw-r--r--test/ruby/test_basicinstructions.rb5
-rw-r--r--test/ruby/test_bignum.rb110
-rw-r--r--test/ruby/test_call.rb16
-rw-r--r--test/ruby/test_case.rb12
-rw-r--r--test/ruby/test_class.rb144
-rw-r--r--test/ruby/test_clone.rb53
-rw-r--r--test/ruby/test_complex.rb116
-rw-r--r--test/ruby/test_complex2.rb2
-rw-r--r--test/ruby/test_complexrational.rb4
-rw-r--r--test/ruby/test_const.rb28
-rw-r--r--test/ruby/test_data.rb249
-rw-r--r--test/ruby/test_default_gems.rb2
-rw-r--r--test/ruby/test_defined.rb161
-rw-r--r--test/ruby/test_dir.rb300
-rw-r--r--test/ruby/test_dir_m17n.rb53
-rw-r--r--test/ruby/test_dup.rb110
-rw-r--r--test/ruby/test_econv.rb19
-rw-r--r--test/ruby/test_encoding.rb48
-rw-r--r--test/ruby/test_enum.rb186
-rw-r--r--test/ruby/test_enumerator.rb155
-rw-r--r--test/ruby/test_env.rb963
-rw-r--r--test/ruby/test_eval.rb83
-rw-r--r--test/ruby/test_exception.rb620
-rw-r--r--test/ruby/test_fiber.rb179
-rw-r--r--test/ruby/test_file.rb54
-rw-r--r--test/ruby/test_file_exhaustive.rb171
-rw-r--r--test/ruby/test_fixnum.rb1
-rw-r--r--test/ruby/test_float.rb53
-rw-r--r--test/ruby/test_frozen.rb30
-rw-r--r--test/ruby/test_frozen_error.rb57
-rw-r--r--test/ruby/test_gc.rb238
-rw-r--r--test/ruby/test_gc_compact.rb415
-rw-r--r--test/ruby/test_hash.rb587
-rw-r--r--test/ruby/test_inlinecache.rb110
-rw-r--r--test/ruby/test_insns_leaf.rb46
-rw-r--r--test/ruby/test_integer.rb95
-rw-r--r--test/ruby/test_io.rb428
-rw-r--r--test/ruby/test_io_buffer.rb562
-rw-r--r--test/ruby/test_io_m17n.rb22
-rw-r--r--test/ruby/test_io_timeout.rb58
-rw-r--r--test/ruby/test_iseq.rb270
-rw-r--r--test/ruby/test_iterator.rb3
-rw-r--r--test/ruby/test_jit.rb1070
-rw-r--r--test/ruby/test_keyword.rb2276
-rw-r--r--test/ruby/test_lambda.rb109
-rw-r--r--test/ruby/test_lazy_enumerator.rb28
-rw-r--r--test/ruby/test_literal.rb63
-rw-r--r--test/ruby/test_m17n.rb68
-rw-r--r--test/ruby/test_m17n_comb.rb25
-rw-r--r--test/ruby/test_marshal.rb220
-rw-r--r--test/ruby/test_math.rb54
-rw-r--r--test/ruby/test_memory_view.rb341
-rw-r--r--test/ruby/test_method.rb406
-rw-r--r--test/ruby/test_method_cache.rb76
-rw-r--r--test/ruby/test_mjit.rb1327
-rw-r--r--test/ruby/test_mjit_debug.rb17
-rw-r--r--test/ruby/test_module.rb1009
-rw-r--r--test/ruby/test_name_error.rb156
-rw-r--r--test/ruby/test_nomethod_error.rb109
-rw-r--r--test/ruby/test_notimp.rb85
-rw-r--r--test/ruby/test_numeric.rb99
-rw-r--r--test/ruby/test_object.rb81
-rw-r--r--test/ruby/test_objectspace.rb58
-rw-r--r--test/ruby/test_optimization.rb110
-rw-r--r--test/ruby/test_pack.rb94
-rw-r--r--test/ruby/test_parse.rb283
-rw-r--r--test/ruby/test_pattern_matching.rb451
-rw-r--r--test/ruby/test_primitive.rb78
-rw-r--r--test/ruby/test_proc.rb493
-rw-r--r--test/ruby/test_process.rb409
-rw-r--r--test/ruby/test_rand.rb361
-rw-r--r--test/ruby/test_random_formatter.rb123
-rw-r--r--test/ruby/test_range.rb134
-rw-r--r--test/ruby/test_rational.rb36
-rw-r--r--test/ruby/test_refinement.rb478
-rw-r--r--test/ruby/test_regexp.rb620
-rw-r--r--test/ruby/test_require.rb209
-rw-r--r--test/ruby/test_require_lib.rb5
-rw-r--r--test/ruby/test_rubyoptions.rb180
-rw-r--r--test/ruby/test_rubyvm.rb57
-rw-r--r--test/ruby/test_rubyvm_mjit.rb38
-rw-r--r--test/ruby/test_settracefunc.rb748
-rw-r--r--test/ruby/test_shapes.rb441
-rw-r--r--test/ruby/test_signal.rb5
-rw-r--r--test/ruby/test_sprintf.rb40
-rw-r--r--test/ruby/test_stack.rb82
-rw-r--r--test/ruby/test_string.rb1017
-rw-r--r--test/ruby/test_struct.rb112
-rw-r--r--test/ruby/test_super.rb143
-rw-r--r--test/ruby/test_symbol.rb52
-rw-r--r--test/ruby/test_syntax.rb510
-rw-r--r--test/ruby/test_thread.rb176
-rw-r--r--test/ruby/test_thread_cv.rb63
-rw-r--r--test/ruby/test_thread_queue.rb164
-rw-r--r--test/ruby/test_time.rb242
-rw-r--r--test/ruby/test_time_tz.rb71
-rw-r--r--test/ruby/test_transcode.rb70
-rw-r--r--test/ruby/test_undef.rb16
-rw-r--r--test/ruby/test_variable.rb102
-rw-r--r--test/ruby/test_vm_dump.rb6
-rw-r--r--test/ruby/test_weakmap.rb57
-rw-r--r--test/ruby/test_yjit.rb1333
-rw-r--r--test/ruby/test_yjit_exit_locations.rb110
-rw-r--r--test/rubygems/alternate_cert.pem28
-rw-r--r--test/rubygems/alternate_cert_32.pem30
-rw-r--r--test/rubygems/alternate_key.pem50
-rw-r--r--test/rubygems/bad_rake.rb1
-rw-r--r--test/rubygems/bogussources.rb9
-rw-r--r--test/rubygems/bundler_test_gem.rb421
-rw-r--r--test/rubygems/child_cert.pem31
-rw-r--r--test/rubygems/child_cert_32.pem31
-rw-r--r--test/rubygems/child_key.pem50
-rw-r--r--test/rubygems/data/excon-0.7.7.gemspec.rzbin0 -> 388 bytes-rw-r--r--test/rubygems/data/null-required-ruby-version.gemspec.rzbin0 -> 403 bytes-rw-r--r--test/rubygems/data/null-required-rubygems-version.gemspec.rzbin0 -> 421 bytes-rw-r--r--test/rubygems/data/null-type.gemspec.rzbin554 -> 0 bytes-rw-r--r--test/rubygems/data/pry-0.4.7.gemspec.rzbin0 -> 433 bytes-rw-r--r--test/rubygems/encrypted_private_key.pem52
-rw-r--r--test/rubygems/expired_cert.pem30
-rw-r--r--test/rubygems/fake_certlib/openssl.rb1
-rw-r--r--test/rubygems/future_cert.pem30
-rw-r--r--test/rubygems/future_cert_32.pem30
-rw-r--r--test/rubygems/good_rake.rb1
-rw-r--r--test/rubygems/grandchild_cert.pem31
-rw-r--r--test/rubygems/grandchild_cert_32.pem31
-rw-r--r--test/rubygems/grandchild_key.pem50
-rw-r--r--test/rubygems/helper.rb1643
-rw-r--r--test/rubygems/installer_test_case.rb248
-rw-r--r--test/rubygems/invalid_issuer_cert.pem32
-rw-r--r--test/rubygems/invalid_issuer_cert_32.pem32
-rw-r--r--test/rubygems/invalid_key.pem50
-rw-r--r--test/rubygems/invalid_signer_cert.pem30
-rw-r--r--test/rubygems/invalid_signer_cert_32.pem30
-rw-r--r--test/rubygems/invalidchild_cert.pem31
-rw-r--r--test/rubygems/invalidchild_cert_32.pem31
-rw-r--r--test/rubygems/invalidchild_key.pem50
-rw-r--r--test/rubygems/multifactor_auth_utilities.rb111
-rw-r--r--test/rubygems/package/tar_test_case.rb175
-rw-r--r--test/rubygems/packages/Bluebie-legs-0.6.2.gembin0 -> 14336 bytes-rw-r--r--test/rubygems/packages/ascii_binder-0.1.10.1.gembin0 -> 244736 bytes-rw-r--r--test/rubygems/packages/ill-formatted-platform-1.0.0.10.gembin0 -> 10240 bytes-rw-r--r--test/rubygems/plugin/exception/rubygems_plugin.rb3
-rw-r--r--test/rubygems/plugin/load/rubygems_plugin.rb3
-rw-r--r--test/rubygems/plugin/standarderror/rubygems_plugin.rb3
-rw-r--r--test/rubygems/private_ec_key.pem9
-rw-r--r--test/rubygems/private_key.pem50
-rw-r--r--test/rubygems/public_cert.pem32
-rw-r--r--test/rubygems/public_cert_32.pem30
-rw-r--r--test/rubygems/public_key.pem14
-rw-r--r--test/rubygems/rubygems/commands/crash_command.rb3
-rw-r--r--test/rubygems/rubygems_plugin.rb7
-rw-r--r--test/rubygems/simple_gem.rb3
-rw-r--r--test/rubygems/specifications/bar-0.0.2.gemspec2
-rw-r--r--test/rubygems/specifications/rubyforge-0.0.1.gemspec14
-rw-r--r--test/rubygems/test_bundled_ca.rb92
-rw-r--r--test/rubygems/test_config.rb13
-rw-r--r--test/rubygems/test_deprecate.rb98
-rw-r--r--test/rubygems/test_exit.rb17
-rw-r--r--test/rubygems/test_gem.rb1411
-rw-r--r--test/rubygems/test_gem_available_set.rb51
-rw-r--r--test/rubygems/test_gem_bundler_version_finder.rb87
-rw-r--r--test/rubygems/test_gem_command.rb128
-rw-r--r--test/rubygems/test_gem_command_manager.rb199
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb360
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb306
-rw-r--r--test/rubygems/test_gem_commands_check_command.rb21
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb148
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb116
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb79
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb99
-rw-r--r--test/rubygems/test_gem_commands_exec_command.rb853
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb196
-rw-r--r--test/rubygems/test_gem_commands_generate_index_command.rb21
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb51
-rw-r--r--test/rubygems/test_gem_commands_info_command.rb43
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb619
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb13
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb25
-rw-r--r--test/rubygems/test_gem_commands_mirror.rb9
-rw-r--r--test/rubygems/test_gem_commands_open_command.rb36
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb31
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb333
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb279
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb335
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb183
-rw-r--r--test/rubygems/test_gem_commands_search_command.rb7
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb57
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb468
-rw-r--r--test/rubygems/test_gem_commands_signin_command.rb216
-rw-r--r--test/rubygems/test_gem_commands_signout_command.rb13
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb204
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb137
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb11
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb191
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb67
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb436
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb27
-rw-r--r--test/rubygems/test_gem_commands_yank_command.rb245
-rw-r--r--test/rubygems/test_gem_config_file.rb212
-rw-r--r--test/rubygems/test_gem_dependency.rb175
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb703
-rw-r--r--test/rubygems/test_gem_dependency_list.rb117
-rw-r--r--test/rubygems/test_gem_dependency_resolution_error.rb13
-rw-r--r--test/rubygems/test_gem_doctor.rb121
-rw-r--r--test/rubygems/test_gem_ext_builder.rb227
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder.rb167
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore1
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec10
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.lock233
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/Cargo.toml10
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib/src/lib.rs27
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/custom_name/lib/custom_name.rb3
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore1
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock247
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml10
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec10
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs51
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb34
-rw-r--r--test/rubygems/test_gem_ext_cargo_builder_unit.rb60
-rw-r--r--test/rubygems/test_gem_ext_cmake_builder.rb72
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb63
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb148
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb82
-rw-r--r--test/rubygems/test_gem_gem_runner.rb67
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb281
-rw-r--r--test/rubygems/test_gem_impossible_dependencies_error.rb11
-rw-r--r--test/rubygems/test_gem_indexer.rb182
-rw-r--r--test/rubygems/test_gem_install_update_options.rb53
-rw-r--r--test/rubygems/test_gem_installer.rb1390
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb25
-rw-r--r--test/rubygems/test_gem_name_tuple.rb11
-rw-r--r--test/rubygems/test_gem_package.rb646
-rw-r--r--test/rubygems/test_gem_package_old.rb39
-rw-r--r--test/rubygems/test_gem_package_tar_header.rb122
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb64
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb194
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb202
-rw-r--r--test/rubygems/test_gem_package_task.rb84
-rw-r--r--test/rubygems/test_gem_path_support.rb37
-rw-r--r--test/rubygems/test_gem_platform.rb590
-rw-r--r--test/rubygems/test_gem_rdoc.rb41
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb716
-rw-r--r--test/rubygems/test_gem_request.rb210
-rw-r--r--test/rubygems/test_gem_request_connection_pools.rb65
-rw-r--r--test/rubygems/test_gem_request_set.rb290
-rw-r--r--test/rubygems/test_gem_request_set_gem_dependency_api.rb459
-rw-r--r--test/rubygems/test_gem_request_set_lockfile.rb189
-rw-r--r--test/rubygems/test_gem_request_set_lockfile_parser.rb141
-rw-r--r--test/rubygems/test_gem_request_set_lockfile_tokenizer.rb275
-rw-r--r--test/rubygems/test_gem_requirement.rb188
-rw-r--r--test/rubygems/test_gem_resolver.rb300
-rw-r--r--test/rubygems/test_gem_resolver_activation_request.rb15
-rw-r--r--test/rubygems/test_gem_resolver_api_set.rb158
-rw-r--r--test/rubygems/test_gem_resolver_api_specification.rb97
-rw-r--r--test/rubygems/test_gem_resolver_best_set.rb66
-rw-r--r--test/rubygems/test_gem_resolver_composed_set.rb5
-rw-r--r--test/rubygems/test_gem_resolver_conflict.rb27
-rw-r--r--test/rubygems/test_gem_resolver_dependency_request.rb33
-rw-r--r--test/rubygems/test_gem_resolver_git_set.rb47
-rw-r--r--test/rubygems/test_gem_resolver_git_specification.rb46
-rw-r--r--test/rubygems/test_gem_resolver_index_set.rb31
-rw-r--r--test/rubygems/test_gem_resolver_index_specification.rb35
-rw-r--r--test/rubygems/test_gem_resolver_installed_specification.rb13
-rw-r--r--test/rubygems/test_gem_resolver_installer_set.rb149
-rw-r--r--test/rubygems/test_gem_resolver_local_specification.rb17
-rw-r--r--test/rubygems/test_gem_resolver_lock_set.rb33
-rw-r--r--test/rubygems/test_gem_resolver_lock_specification.rb37
-rw-r--r--test/rubygems/test_gem_resolver_requirement_list.rb5
-rw-r--r--test/rubygems/test_gem_resolver_specification.rb21
-rw-r--r--test/rubygems/test_gem_resolver_vendor_set.rb21
-rw-r--r--test/rubygems/test_gem_resolver_vendor_specification.rb23
-rw-r--r--test/rubygems/test_gem_security.rb185
-rw-r--r--test/rubygems/test_gem_security_policy.rb209
-rw-r--r--test/rubygems/test_gem_security_signer.rb105
-rw-r--r--test/rubygems/test_gem_security_trust_dir.rb31
-rw-r--r--test/rubygems/test_gem_server.rb612
-rw-r--r--test/rubygems/test_gem_silent_ui.rb89
-rw-r--r--test/rubygems/test_gem_source.rb106
-rw-r--r--test/rubygems/test_gem_source_fetch_problem.rb25
-rw-r--r--test/rubygems/test_gem_source_git.rb151
-rw-r--r--test/rubygems/test_gem_source_installed.rb35
-rw-r--r--test/rubygems/test_gem_source_list.rb12
-rw-r--r--test/rubygems/test_gem_source_local.rb33
-rw-r--r--test/rubygems/test_gem_source_lock.rb65
-rw-r--r--test/rubygems/test_gem_source_specific_file.rb39
-rw-r--r--test/rubygems/test_gem_source_subpath_problem.rb50
-rw-r--r--test/rubygems/test_gem_source_vendor.rb29
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb142
-rw-r--r--test/rubygems/test_gem_specification.rb2054
-rw-r--r--test/rubygems/test_gem_stream_ui.rb77
-rw-r--r--test/rubygems/test_gem_stub_specification.rb98
-rw-r--r--test/rubygems/test_gem_text.rb13
-rw-r--r--test/rubygems/test_gem_uninstaller.rb340
-rw-r--r--test/rubygems/test_gem_unsatisfiable_dependency_error.rb9
-rw-r--r--test/rubygems/test_gem_update_suggestion.rb209
-rw-r--r--test/rubygems/test_gem_uri.rb41
-rw-r--r--test/rubygems/test_gem_uri_formatter.rb31
-rw-r--r--test/rubygems/test_gem_util.rb73
-rw-r--r--test/rubygems/test_gem_validator.rb22
-rw-r--r--test/rubygems/test_gem_version.rb65
-rw-r--r--test/rubygems/test_gem_version_option.rb35
-rw-r--r--test/rubygems/test_kernel.rb122
-rw-r--r--test/rubygems/test_project_sanity.rb40
-rw-r--r--test/rubygems/test_remote_fetch_error.rb17
-rw-r--r--test/rubygems/test_require.rb504
-rw-r--r--test/rubygems/test_rubygems.rb76
-rw-r--r--test/rubygems/test_webauthn_listener.rb143
-rw-r--r--test/rubygems/test_webauthn_listener_response.rb93
-rw-r--r--test/rubygems/test_webauthn_poller.rb124
-rw-r--r--test/rubygems/utilities.rb435
-rw-r--r--test/rubygems/wrong_key_cert.pem30
-rw-r--r--test/rubygems/wrong_key_cert_32.pem30
-rw-r--r--test/runner.rb15
-rw-r--r--test/sdbm/test_sdbm.rb544
-rw-r--r--test/socket/test_addrinfo.rb18
-rw-r--r--test/socket/test_basicsocket.rb6
-rw-r--r--test/socket/test_nonblock.rb12
-rw-r--r--test/socket/test_socket.rb23
-rw-r--r--test/socket/test_sockopt.rb2
-rw-r--r--test/socket/test_tcp.rb45
-rw-r--r--test/socket/test_udp.rb2
-rw-r--r--test/socket/test_unix.rb167
-rw-r--r--test/stringio/test_ractor.rb23
-rw-r--r--test/stringio/test_stringio.rb158
-rw-r--r--test/strscan/test_ractor.rb28
-rw-r--r--test/strscan/test_stringscanner.rb80
-rw-r--r--test/test_delegate.rb75
-rw-r--r--test/test_extlibs.rb4
-rw-r--r--test/test_find.rb16
-rw-r--r--test/test_getoptlong.rb163
-rw-r--r--test/test_ipaddr.rb86
-rw-r--r--test/test_mutex_m.rb32
-rw-r--r--test/test_open3.rb24
-rw-r--r--test/test_pp.rb40
-rw-r--r--test/test_prime.rb280
-rw-r--r--test/test_pstore.rb36
-rw-r--r--test/test_pty.rb30
-rw-r--r--test/test_securerandom.rb121
-rw-r--r--test/test_set.rb197
-rw-r--r--test/test_sorted_set.rb45
-rw-r--r--test/test_syslog.rb7
-rw-r--r--test/test_time.rb18
-rw-r--r--test/test_timeout.rb65
-rw-r--r--test/test_tmpdir.rb70
-rw-r--r--test/test_tracer.rb234
-rw-r--r--test/test_trick.rb214
-rw-r--r--test/test_win32api.rb27
-rw-r--r--test/uri/test_common.rb119
-rw-r--r--test/uri/test_generic.rb87
-rw-r--r--test/uri/test_http.rb31
-rw-r--r--test/uri/test_ldap.rb10
-rw-r--r--test/uri/test_parser.rb43
-rw-r--r--test/uri/test_ws.rb71
-rw-r--r--test/uri/test_wss.rb71
-rw-r--r--test/webrick/test_cgi.rb170
-rw-r--r--test/webrick/test_filehandler.rb353
-rw-r--r--test/webrick/test_httpproxy.rb466
-rw-r--r--test/webrick/test_httprequest.rb476
-rw-r--r--test/webrick/test_httpresponse.rb282
-rw-r--r--test/webrick/test_httpserver.rb543
-rw-r--r--test/webrick/test_server.rb163
-rw-r--r--test/webrick/utils.rb82
-rw-r--r--test/win32ole/test_err_in_callback.rb2
-rw-r--r--test/win32ole/test_win32ole.rb2
-rw-r--r--test/win32ole/test_win32ole_event.rb5
-rw-r--r--test/win32ole/test_win32ole_method_event.rb2
-rw-r--r--test/win32ole/test_win32ole_param_event.rb2
-rw-r--r--test/win32ole/test_win32ole_record.rb2
-rw-r--r--test/win32ole/test_win32ole_type_event.rb2
-rw-r--r--test/win32ole/test_win32ole_variable.rb4
-rw-r--r--test/win32ole/test_win32ole_variant.rb2
-rw-r--r--test/win32ole/test_win32ole_variant_outarg.rb2
-rw-r--r--test/win32ole/test_word.rb2
-rw-r--r--test/yaml/test_store.rb6
-rw-r--r--test/zlib/test_zlib.rb235
-rw-r--r--thread.c2931
-rw-r--r--thread_none.c284
-rw-r--r--thread_none.h20
-rw-r--r--thread_pthread.c1166
-rw-r--r--thread_pthread.h96
-rw-r--r--thread_sync.c923
-rw-r--r--thread_sync.rb68
-rw-r--r--thread_win32.c502
-rw-r--r--thread_win32.h45
-rw-r--r--time.c3134
-rw-r--r--timev.h12
-rw-r--r--timev.rb404
-rwxr-xr-xtool/actions-commit-info.sh17
-rw-r--r--tool/annocheck/Dockerfile4
-rw-r--r--tool/annocheck/Dockerfile-copy7
-rwxr-xr-xtool/bisect.sh17
-rw-r--r--tool/bundler/dev_gems.rb19
-rw-r--r--tool/bundler/dev_gems.rb.lock57
-rw-r--r--tool/bundler/rubocop_gems.rb12
-rw-r--r--tool/bundler/rubocop_gems.rb.lock73
-rw-r--r--tool/bundler/standard_gems.rb12
-rw-r--r--tool/bundler/standard_gems.rb.lock81
-rw-r--r--tool/bundler/test_gems.rb12
-rw-r--r--tool/bundler/test_gems.rb.lock45
-rwxr-xr-xtool/checksum.rb4
-rw-r--r--tool/ci_functions.sh29
-rwxr-xr-xtool/disable_ipv6.sh9
-rw-r--r--tool/downloader.rb121
-rwxr-xr-xtool/enc-case-folding.rb416
-rw-r--r--tool/enc-emoji-citrus-gen.rb4
-rwxr-xr-xtool/enc-unicode.rb35
-rwxr-xr-xtool/expand-config.rb14
-rwxr-xr-xtool/extlibs.rb192
-rw-r--r--tool/fake.rb13
-rwxr-xr-xtool/fetch-bundled_gems.rb28
-rwxr-xr-xtool/file2lastrev.rb91
-rwxr-xr-xtool/format-release41
-rw-r--r--tool/gem-unpack.rb18
-rwxr-xr-xtool/gen-mailmap.rb4
-rw-r--r--tool/generic_erb.rb44
-rw-r--r--tool/gperf.sed1
-rwxr-xr-xtool/id2token.rb11
-rwxr-xr-xtool/ifchange29
-rwxr-xr-xtool/intern_ids.rb35
-rwxr-xr-xtool/leaked-globals31
-rw-r--r--tool/lib/-test-/integer.rb4
-rw-r--r--tool/lib/bundled_gem.rb68
-rw-r--r--tool/lib/colorize.rb16
-rw-r--r--tool/lib/core_assertions.rb821
-rw-r--r--tool/lib/envutil.rb72
-rw-r--r--tool/lib/gc_checker.rb36
-rw-r--r--tool/lib/gc_compact_checker.rb10
-rw-r--r--tool/lib/leakchecker.rb143
-rw-r--r--tool/lib/memory_status.rb6
-rw-r--r--tool/lib/minitest/README.txt457
-rw-r--r--tool/lib/minitest/autorun.rb14
-rw-r--r--tool/lib/minitest/benchmark.rb418
-rw-r--r--tool/lib/minitest/mock.rb196
-rw-r--r--tool/lib/minitest/unit.rb1434
-rw-r--r--tool/lib/output.rb57
-rw-r--r--tool/lib/profile_test_all.rb2
-rw-r--r--tool/lib/test/unit.rb827
-rw-r--r--tool/lib/test/unit/assertions.rb828
-rw-r--r--tool/lib/test/unit/core_assertions.rb420
-rw-r--r--tool/lib/test/unit/parallel.rb82
-rw-r--r--tool/lib/test/unit/testcase.rb280
-rw-r--r--tool/lib/vcs.rb367
-rw-r--r--tool/lib/vpath.rb7
-rw-r--r--tool/lib/webrick.rb232
-rw-r--r--tool/lib/webrick/.document (renamed from lib/webrick/.document)0
-rw-r--r--tool/lib/webrick/accesslog.rb (renamed from lib/webrick/accesslog.rb)0
-rw-r--r--tool/lib/webrick/cgi.rb (renamed from lib/webrick/cgi.rb)0
-rw-r--r--tool/lib/webrick/compat.rb (renamed from lib/webrick/compat.rb)0
-rw-r--r--tool/lib/webrick/config.rb (renamed from lib/webrick/config.rb)0
-rw-r--r--tool/lib/webrick/cookie.rb (renamed from lib/webrick/cookie.rb)0
-rw-r--r--tool/lib/webrick/htmlutils.rb (renamed from lib/webrick/htmlutils.rb)0
-rw-r--r--tool/lib/webrick/httpauth.rb (renamed from lib/webrick/httpauth.rb)0
-rw-r--r--tool/lib/webrick/httpauth/authenticator.rb117
-rw-r--r--tool/lib/webrick/httpauth/basicauth.rb (renamed from lib/webrick/httpauth/basicauth.rb)0
-rw-r--r--tool/lib/webrick/httpauth/digestauth.rb (renamed from lib/webrick/httpauth/digestauth.rb)0
-rw-r--r--tool/lib/webrick/httpauth/htdigest.rb (renamed from lib/webrick/httpauth/htdigest.rb)0
-rw-r--r--tool/lib/webrick/httpauth/htgroup.rb (renamed from lib/webrick/httpauth/htgroup.rb)0
-rw-r--r--tool/lib/webrick/httpauth/htpasswd.rb (renamed from lib/webrick/httpauth/htpasswd.rb)0
-rw-r--r--tool/lib/webrick/httpauth/userdb.rb (renamed from lib/webrick/httpauth/userdb.rb)0
-rw-r--r--tool/lib/webrick/httpproxy.rb354
-rw-r--r--tool/lib/webrick/httprequest.rb636
-rw-r--r--tool/lib/webrick/httpresponse.rb (renamed from lib/webrick/httpresponse.rb)0
-rw-r--r--tool/lib/webrick/https.rb (renamed from lib/webrick/https.rb)0
-rw-r--r--tool/lib/webrick/httpserver.rb293
-rw-r--r--tool/lib/webrick/httpservlet.rb (renamed from lib/webrick/httpservlet.rb)0
-rw-r--r--tool/lib/webrick/httpservlet/abstract.rb (renamed from lib/webrick/httpservlet/abstract.rb)0
-rw-r--r--tool/lib/webrick/httpservlet/cgi_runner.rb (renamed from lib/webrick/httpservlet/cgi_runner.rb)0
-rw-r--r--tool/lib/webrick/httpservlet/cgihandler.rb (renamed from lib/webrick/httpservlet/cgihandler.rb)0
-rw-r--r--tool/lib/webrick/httpservlet/erbhandler.rb (renamed from lib/webrick/httpservlet/erbhandler.rb)0
-rw-r--r--tool/lib/webrick/httpservlet/filehandler.rb552
-rw-r--r--tool/lib/webrick/httpservlet/prochandler.rb (renamed from lib/webrick/httpservlet/prochandler.rb)0
-rw-r--r--tool/lib/webrick/httpstatus.rb (renamed from lib/webrick/httpstatus.rb)0
-rw-r--r--tool/lib/webrick/httputils.rb512
-rw-r--r--tool/lib/webrick/httpversion.rb (renamed from lib/webrick/httpversion.rb)0
-rw-r--r--tool/lib/webrick/log.rb (renamed from lib/webrick/log.rb)0
-rw-r--r--tool/lib/webrick/server.rb381
-rw-r--r--tool/lib/webrick/ssl.rb215
-rw-r--r--tool/lib/webrick/utils.rb265
-rw-r--r--tool/lib/webrick/version.rb18
-rwxr-xr-xtool/ln_sr.rb131
-rw-r--r--tool/m4/_colorize_result_prepare.m43
-rw-r--r--tool/m4/ac_msg_result.m42
-rw-r--r--tool/m4/colorize_result.m42
-rw-r--r--tool/m4/ruby_append_option.m42
-rw-r--r--tool/m4/ruby_append_options.m42
-rw-r--r--tool/m4/ruby_check_builtin_func.m42
-rw-r--r--tool/m4/ruby_check_builtin_setjmp.m410
-rw-r--r--tool/m4/ruby_check_printf_prefix.m411
-rw-r--r--tool/m4/ruby_check_setjmp.m410
-rw-r--r--tool/m4/ruby_check_signedness.m42
-rw-r--r--tool/m4/ruby_check_sizeof.m42
-rw-r--r--tool/m4/ruby_check_sysconf.m48
-rw-r--r--tool/m4/ruby_cppoutfile.m46
-rw-r--r--tool/m4/ruby_decl_attribute.m46
-rw-r--r--tool/m4/ruby_default_arch.m47
-rw-r--r--tool/m4/ruby_define_if.m412
-rw-r--r--tool/m4/ruby_defint.m42
-rw-r--r--tool/m4/ruby_dtrace_available.m44
-rw-r--r--tool/m4/ruby_dtrace_postprocess.m44
-rw-r--r--tool/m4/ruby_func_attribute.m42
-rw-r--r--tool/m4/ruby_mingw32.m46
-rw-r--r--tool/m4/ruby_prepend_option.m42
-rw-r--r--tool/m4/ruby_prog_gnu_ld.m42
-rw-r--r--tool/m4/ruby_prog_makedirs.m49
-rw-r--r--tool/m4/ruby_replace_funcs.m412
-rw-r--r--tool/m4/ruby_replace_type.m414
-rw-r--r--tool/m4/ruby_require_funcs.m413
-rw-r--r--tool/m4/ruby_rm_recursive.m46
-rw-r--r--tool/m4/ruby_setjmp_type.m44
-rw-r--r--tool/m4/ruby_stack_grow_direction.m46
-rw-r--r--tool/m4/ruby_thread.m480
-rw-r--r--tool/m4/ruby_try_cflags.m411
-rw-r--r--tool/m4/ruby_try_cxxflags.m417
-rw-r--r--tool/m4/ruby_try_ldflags.m44
-rw-r--r--tool/m4/ruby_type_attribute.m42
-rw-r--r--tool/m4/ruby_universal_arch.m439
-rw-r--r--tool/m4/ruby_wasm_tools.m424
-rw-r--r--tool/m4/ruby_werror_flag.m42
-rwxr-xr-xtool/make-snapshot68
-rw-r--r--tool/make_hgraph.rb7
-rwxr-xr-xtool/merger.rb192
-rwxr-xr-xtool/mjit/bindgen.rb435
-rw-r--r--tool/mjit_tabs.rb67
-rw-r--r--tool/mk_builtin_binary.rb44
-rw-r--r--tool/mk_builtin_loader.rb354
-rw-r--r--tool/mk_call_iseq_optimized.rb74
-rwxr-xr-xtool/mkconfig.rb45
-rwxr-xr-xtool/mkrunnable.rb28
-rwxr-xr-xtool/outdate-bundled-gems.rb135
-rwxr-xr-xtool/pure_parser.rb20
-rwxr-xr-xtool/rbinstall.rb536
-rw-r--r--tool/rbs_skip_tests11
-rwxr-xr-xtool/rbuninstall.rb18
-rwxr-xr-xtool/redmine-backporter.rb173
-rwxr-xr-xtool/release.sh2
-rwxr-xr-xtool/releng/gen-mail.rb55
-rwxr-xr-xtool/releng/gen-release-note.rb36
-rwxr-xr-xtool/releng/update-www-meta.rb213
-rw-r--r--tool/ruby_vm/controllers/application_controller.rb5
-rw-r--r--tool/ruby_vm/helpers/c_escape.rb6
-rw-r--r--tool/ruby_vm/helpers/dumper.rb10
-rw-r--r--tool/ruby_vm/helpers/scanner.rb3
-rw-r--r--tool/ruby_vm/loaders/insns_def.rb8
-rwxr-xr-xtool/ruby_vm/models/bare_instructions.rb4
-rw-r--r--tool/ruby_vm/models/typemap.rb2
-rw-r--r--tool/ruby_vm/scripts/insns2vm.rb12
-rw-r--r--tool/ruby_vm/views/_insn_entry.erb6
-rw-r--r--tool/ruby_vm/views/_insn_len_info.erb23
-rw-r--r--tool/ruby_vm/views/_insn_name_info.erb30
-rw-r--r--tool/ruby_vm/views/_insn_operand_info.erb29
-rw-r--r--tool/ruby_vm/views/_insn_type_chars.erb19
-rw-r--r--tool/ruby_vm/views/_leaf_helpers.erb62
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn.erb87
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn_body.erb115
-rw-r--r--tool/ruby_vm/views/_mjit_compile_ivar.erb54
-rw-r--r--tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb36
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb107
-rw-r--r--tool/ruby_vm/views/_sp_inc_helpers.erb8
-rw-r--r--tool/ruby_vm/views/_trace_instruction.erb9
-rw-r--r--tool/ruby_vm/views/lib/ruby_vm/mjit/instruction.rb.erb40
-rw-r--r--tool/ruby_vm/views/mjit_compile.inc.erb93
-rw-r--r--tool/ruby_vm/views/mjit_sp_inc.inc.erb17
-rw-r--r--tool/ruby_vm/views/optinsn.inc.erb4
-rwxr-xr-xtool/runruby.rb25
-rw-r--r--tool/search-cgvars.rb55
-rwxr-xr-xtool/strip-rdoc.rb30
-rwxr-xr-x[-rw-r--r--]tool/sync_default_gems.rb1084
-rwxr-xr-xtool/test-annocheck.sh33
-rw-r--r--tool/test-bundled-gems.rb97
-rw-r--r--tool/test-coverage.rb2
-rw-r--r--tool/test/minitest/metametameta.rb71
-rw-r--r--tool/test/minitest/test_minitest_benchmark.rb131
-rw-r--r--tool/test/minitest/test_minitest_mock.rb404
-rw-r--r--tool/test/minitest/test_minitest_unit.rb1790
-rw-r--r--tool/test/runner.rb2
-rwxr-xr-xtool/test/test_sync_default_gems.rb76
-rw-r--r--tool/test/testunit/metametameta.rb70
-rw-r--r--tool/test/testunit/test4test_hideskip.rb8
-rw-r--r--tool/test/testunit/test4test_sorting.rb2
-rw-r--r--tool/test/testunit/test_assertion.rb26
-rw-r--r--tool/test/testunit/test_hideskip.rb6
-rw-r--r--tool/test/testunit/test_minitest_unit.rb1488
-rw-r--r--tool/test/testunit/test_parallel.rb33
-rw-r--r--tool/test/testunit/test_redefinition.rb13
-rw-r--r--tool/test/testunit/test_sorting.rb57
-rw-r--r--tool/test/testunit/tests_for_parallel/test4test_hungup.rb15
-rw-r--r--tool/test/webrick/.htaccess (renamed from test/webrick/.htaccess)0
-rw-r--r--tool/test/webrick/test_cgi.rb170
-rw-r--r--tool/test/webrick/test_config.rb (renamed from test/webrick/test_config.rb)0
-rw-r--r--tool/test/webrick/test_cookie.rb (renamed from test/webrick/test_cookie.rb)0
-rw-r--r--tool/test/webrick/test_do_not_reverse_lookup.rb (renamed from test/webrick/test_do_not_reverse_lookup.rb)0
-rw-r--r--tool/test/webrick/test_filehandler.rb403
-rw-r--r--tool/test/webrick/test_htgroup.rb (renamed from test/webrick/test_htgroup.rb)0
-rw-r--r--tool/test/webrick/test_htmlutils.rb (renamed from test/webrick/test_htmlutils.rb)0
-rw-r--r--tool/test/webrick/test_httpauth.rb (renamed from test/webrick/test_httpauth.rb)0
-rw-r--r--tool/test/webrick/test_httpproxy.rb467
-rw-r--r--tool/test/webrick/test_httprequest.rb488
-rw-r--r--tool/test/webrick/test_httpresponse.rb282
-rw-r--r--tool/test/webrick/test_https.rb (renamed from test/webrick/test_https.rb)0
-rw-r--r--tool/test/webrick/test_httpserver.rb543
-rw-r--r--tool/test/webrick/test_httpstatus.rb (renamed from test/webrick/test_httpstatus.rb)0
-rw-r--r--tool/test/webrick/test_httputils.rb (renamed from test/webrick/test_httputils.rb)0
-rw-r--r--tool/test/webrick/test_httpversion.rb (renamed from test/webrick/test_httpversion.rb)0
-rw-r--r--tool/test/webrick/test_server.rb191
-rw-r--r--tool/test/webrick/test_ssl_server.rb (renamed from test/webrick/test_ssl_server.rb)0
-rw-r--r--tool/test/webrick/test_utils.rb (renamed from test/webrick/test_utils.rb)0
-rw-r--r--tool/test/webrick/utils.rb84
-rw-r--r--tool/test/webrick/webrick.cgi (renamed from test/webrick/webrick.cgi)0
-rw-r--r--tool/test/webrick/webrick.rhtml (renamed from test/webrick/webrick.rhtml)0
-rw-r--r--tool/test/webrick/webrick_long_filename.cgi (renamed from test/webrick/webrick_long_filename.cgi)0
-rw-r--r--tool/transcode-tblgen.rb30
-rw-r--r--tool/transform_mjit_header.rb67
-rwxr-xr-xtool/travis_wait.sh18
-rw-r--r--tool/update-NEWS-refs.rb37
-rwxr-xr-xtool/update-bundled_gems.rb23
-rwxr-xr-xtool/update-deps24
-rwxr-xr-xtool/wasm-clangw9
-rwxr-xr-xtool/ytab.sed1
-rw-r--r--trace_point.rb142
-rw-r--r--transcode.c834
-rw-r--r--transcode_data.h37
-rw-r--r--transient_heap.c183
-rw-r--r--transient_heap.h9
-rw-r--r--util.c209
-rw-r--r--variable.c3114
-rw-r--r--variable.h22
-rw-r--r--version.c67
-rw-r--r--version.h72
-rw-r--r--vm.c2621
-rw-r--r--vm_args.c1110
-rw-r--r--vm_backtrace.c1182
-rw-r--r--vm_callinfo.h550
-rw-r--r--vm_core.h967
-rw-r--r--vm_debug.h98
-rw-r--r--vm_dump.c1142
-rw-r--r--vm_eval.c1580
-rw-r--r--vm_exec.c80
-rw-r--r--vm_exec.h38
-rw-r--r--vm_insnhelper.c5527
-rw-r--r--vm_insnhelper.h83
-rw-r--r--vm_method.c2202
-rw-r--r--vm_opts.h11
-rw-r--r--vm_sync.c301
-rw-r--r--vm_sync.h137
-rw-r--r--vm_trace.c732
-rw-r--r--vsnprintf.c25
-rw-r--r--warning.rb16
-rw-r--r--wasm/GNUmakefile.in32
-rw-r--r--wasm/README.md70
-rw-r--r--wasm/asyncify.h23
-rw-r--r--wasm/fiber.c83
-rw-r--r--wasm/fiber.h43
-rw-r--r--wasm/machine.c62
-rw-r--r--wasm/machine.h25
-rw-r--r--wasm/machine_core.S25
-rw-r--r--wasm/missing.c199
-rw-r--r--wasm/runtime.c47
-rw-r--r--wasm/setjmp.c204
-rw-r--r--wasm/setjmp.h95
-rw-r--r--wasm/setjmp_core.S27
-rw-r--r--wasm/tests/fiber_test.c66
-rw-r--r--wasm/tests/machine_test.c115
-rw-r--r--wasm/tests/setjmp_test.c108
-rwxr-xr-xwasm/wasm-opt36
-rw-r--r--win32/Makefile.sub307
-rwxr-xr-xwin32/configure.bat51
-rw-r--r--win32/dir.h9
-rw-r--r--win32/file.c622
-rw-r--r--win32/file.h38
-rwxr-xr-xwin32/ifchange.bat31
-rwxr-xr-xwin32/mkexports.rb18
-rwxr-xr-xwin32/resource.rb4
-rw-r--r--win32/ruby.manifest8
-rw-r--r--win32/setup.mak114
-rw-r--r--win32/win32.c6153
-rw-r--r--win32/winmain.c4
-rw-r--r--yjit.c1109
-rw-r--r--yjit.h70
-rw-r--r--yjit.rb356
-rw-r--r--yjit/.gitignore2
-rw-r--r--yjit/Cargo.lock49
-rw-r--r--yjit/Cargo.toml47
-rw-r--r--yjit/bindgen/Cargo.lock311
-rw-r--r--yjit/bindgen/Cargo.toml10
-rw-r--r--yjit/bindgen/src/main.rs430
-rw-r--r--yjit/not_gmake.mk14
-rw-r--r--yjit/src/asm/arm64/README.md16
-rw-r--r--yjit/src/asm/arm64/arg/bitmask_imm.rs255
-rw-r--r--yjit/src/asm/arm64/arg/condition.rs52
-rw-r--r--yjit/src/asm/arm64/arg/inst_offset.rs47
-rw-r--r--yjit/src/asm/arm64/arg/mod.rs18
-rw-r--r--yjit/src/asm/arm64/arg/sf.rs19
-rw-r--r--yjit/src/asm/arm64/arg/shifted_imm.rs81
-rw-r--r--yjit/src/asm/arm64/arg/sys_reg.rs6
-rw-r--r--yjit/src/asm/arm64/arg/truncate.rs66
-rw-r--r--yjit/src/asm/arm64/inst/atomic.rs86
-rw-r--r--yjit/src/asm/arm64/inst/branch.rs100
-rw-r--r--yjit/src/asm/arm64/inst/branch_cond.rs78
-rw-r--r--yjit/src/asm/arm64/inst/breakpoint.rs55
-rw-r--r--yjit/src/asm/arm64/inst/call.rs104
-rw-r--r--yjit/src/asm/arm64/inst/conditional.rs73
-rw-r--r--yjit/src/asm/arm64/inst/data_imm.rs143
-rw-r--r--yjit/src/asm/arm64/inst/data_reg.rs192
-rw-r--r--yjit/src/asm/arm64/inst/halfword_imm.rs179
-rw-r--r--yjit/src/asm/arm64/inst/load_literal.rs89
-rw-r--r--yjit/src/asm/arm64/inst/load_register.rs108
-rw-r--r--yjit/src/asm/arm64/inst/load_store.rs249
-rw-r--r--yjit/src/asm/arm64/inst/load_store_exclusive.rs109
-rw-r--r--yjit/src/asm/arm64/inst/logical_imm.rs154
-rw-r--r--yjit/src/asm/arm64/inst/logical_reg.rs207
-rw-r--r--yjit/src/asm/arm64/inst/mod.rs50
-rw-r--r--yjit/src/asm/arm64/inst/mov.rs155
-rw-r--r--yjit/src/asm/arm64/inst/nop.rs44
-rw-r--r--yjit/src/asm/arm64/inst/pc_rel.rs107
-rw-r--r--yjit/src/asm/arm64/inst/reg_pair.rs212
-rw-r--r--yjit/src/asm/arm64/inst/sbfm.rs103
-rw-r--r--yjit/src/asm/arm64/inst/shift_imm.rs147
-rw-r--r--yjit/src/asm/arm64/inst/sys_reg.rs86
-rw-r--r--yjit/src/asm/arm64/inst/test_bit.rs133
-rw-r--r--yjit/src/asm/arm64/mod.rs1580
-rw-r--r--yjit/src/asm/arm64/opnd.rs195
-rw-r--r--yjit/src/asm/mod.rs792
-rw-r--r--yjit/src/asm/x86_64/mod.rs1415
-rw-r--r--yjit/src/asm/x86_64/tests.rs449
-rw-r--r--yjit/src/backend/arm64/mod.rs1491
-rw-r--r--yjit/src/backend/ir.rs1576
-rw-r--r--yjit/src/backend/mod.rs8
-rw-r--r--yjit/src/backend/tests.rs331
-rw-r--r--yjit/src/backend/x86_64/mod.rs895
-rw-r--r--yjit/src/codegen.rs7721
-rw-r--r--yjit/src/core.rs2400
-rw-r--r--yjit/src/cruby.rs715
-rw-r--r--yjit/src/cruby_bindings.inc.rs1310
-rw-r--r--yjit/src/disasm.rs269
-rw-r--r--yjit/src/invariants.rs567
-rw-r--r--yjit/src/lib.rs18
-rw-r--r--yjit/src/options.rs174
-rw-r--r--yjit/src/stats.rs640
-rw-r--r--yjit/src/utils.rs274
-rw-r--r--yjit/src/virtualmem.rs443
-rw-r--r--yjit/src/yjit.rs136
-rw-r--r--yjit/yjit.mk69
6397 files changed, 999273 insertions, 381860 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000000..05ff204541
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,134 @@
+---
+version: '{build}'
+init:
+ - git config --global user.name git
+ - git config --global user.email svn-admin@ruby-lang.org
+ - git config --global core.autocrlf false
+ - git config --global core.eol lf
+ - git config --global advice.detachedHead 0
+shallow_clone: true
+clone_depth: 10
+platform:
+ - x64
+skip_commits:
+ message: /\[DOC\]/
+ files:
+ - doc/*
+ - '**/*.md'
+ - '**/*.rdoc'
+ - '**/.document'
+ - '**/*.[1-8]'
+ - '**/*.ronn'
+environment:
+ ruby_version: "24-%Platform%"
+ matrix:
+ # Test only the oldest supported version because AppVeyor is unstable, its concurrency
+ # is limited, and compatibility issues that happen only in newer versions are rare.
+ # You may test some other stuff on GitHub Actions instead.
+ - build: vs
+ vs: 120 # Visual Studio 2013
+ ssl: OpenSSL-v111
+ # The worker image name. This is NOT the Visual Studio version we're using here.
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ GEMS_FOR_TEST: ""
+ RELINE_TEST_ENCODING: "UTF-8"
+cache:
+ - c:\Tools\vcpkg\installed\
+for:
+-
+ matrix:
+ only:
+ - build: vs
+ install:
+ - ver
+ - chcp
+ - SET BITS=%Platform:x86=32%
+ - SET BITS=%BITS:x=%
+ - SET OPENSSL_DIR=C:\%ssl%-Win%BITS%
+ - cd C:\Tools\vcpkg
+ - git pull -q
+ - .\bootstrap-vcpkg.bat
+ - ps: Start-FileDownload 'https://github.com/microsoft/vcpkg-tool/releases/download/2023-08-09/vcpkg.exe' -FileName 'C:\Tools\vcpkg\vcpkg.exe'
+ - cd %APPVEYOR_BUILD_FOLDER%
+ - vcpkg --triplet %Platform%-windows install --x-use-aria2 libffi libyaml readline zlib
+ - CALL SET vcvars=%%^VS%VS%COMNTOOLS^%%..\..\VC\vcvarsall.bat
+ - SET vcvars
+ - '"%vcvars%" %Platform:x64=amd64%'
+ - SET ruby_path=C:\Ruby%ruby_version:-x86=%
+ - SET PATH=\usr\local\bin;%ruby_path%\bin;%PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin
+ - ruby --version
+ - 'cl'
+ - echo> Makefile srcdir=.
+ - echo>> Makefile MSC_VER=0
+ - echo>> Makefile RT=none
+ - echo>> Makefile RT_VER=0
+ - echo>> Makefile BUILTIN_ENCOBJS=nul
+ - type win32\Makefile.sub >> Makefile
+ - nmake %mflags% up VCSUP="echo Update OK"
+ - nmake %mflags% extract-extlibs
+ - del Makefile
+ - mkdir \usr\local\bin
+ - mkdir \usr\local\include
+ - mkdir \usr\local\lib
+ - for %%I in (%OPENSSL_DIR%\*.dll) do mklink /h \usr\local\bin\%%~nxI %%I
+ - for %%I in (c:\Tools\vcpkg\installed\%Platform%-windows\bin\*.dll) do (
+ if not %%~nI == readline mklink \usr\local\bin\%%~nxI %%I
+ )
+ - attrib +r /s /d
+ - mkdir %Platform%-mswin_%vs%
+ build_script:
+ - set HAVE_GIT=no
+ - cd %APPVEYOR_BUILD_FOLDER%
+ - cd %Platform%-mswin_%vs%
+ - >-
+ ..\win32\configure.bat
+ --with-opt-dir="/usr/local;c:/Tools/vcpkg/installed/%Platform%-windows"
+ --with-openssl-dir=%OPENSSL_DIR:\=/%
+ - nmake -l
+ - nmake install-nodoc
+ - \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
+ - if not "%GEMS_FOR_TEST%" == "" \usr\bin\gem install --no-document %GEMS_FOR_TEST%
+ - \usr\bin\ruby -ropenssl -e "puts 'Build ' + OpenSSL::OPENSSL_VERSION, 'Runtime ' + OpenSSL::OPENSSL_LIBRARY_VERSION"
+ test_script:
+ - set /a JOBS=%NUMBER_OF_PROCESSORS%
+ - nmake -l "TESTOPTS=-v -q" btest
+ - nmake -l "TESTOPTS=-v -q" test-basic
+ - >-
+ nmake -l "TESTOPTS=--timeout-scale=3.0
+ --excludes=../test/excludes/_appveyor -j%JOBS%
+ --exclude win32ole
+ --exclude test_bignum
+ --exclude test_syntax
+ --exclude test_open-uri
+ --exclude test_bundled_ca
+ " test-all
+ # separately execute tests without -j which may crash worker with -j.
+ - >-
+ nmake -l
+ "TESTOPTS=--timeout-scale=3.0 --excludes=../test/excludes/_appveyor"
+ TESTS="
+ ../test/win32ole
+ ../test/ruby/test_bignum.rb
+ ../test/ruby/test_syntax.rb
+ ../test/open-uri/test_open-uri.rb
+ ../test/rubygems/test_bundled_ca.rb
+ " test-all
+ - nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
+notifications:
+ - provider: Webhook
+ method: POST
+ url:
+ secure: CcFlJNDJ/a6to7u3Z4Fnz6dScEPNx7hTha2GkSRlV+1U6dqmxY/7uBcLXYb9gR3jfQk6w+2o/HrjNAyXMNGU/JOka3s2WRI4VKitzM+lQ08owvJIh0R7LxrGH0J2e81U # ruby-lang slack: ruby/simpler-alerts-bot
+ body: >-
+ {{^isPullRequest}}
+ {
+ "ci": "AppVeyor CI",
+ "env": "Visual Studio 2013",
+ "url": "{{buildUrl}}",
+ "commit": "{{commitId}}",
+ "branch": "{{branch}}"
+ }
+ {{/isPullRequest}}
+ on_build_success: false
+ on_build_failure: true
+ on_build_status_changed: false
diff --git a/.dir-locals.el b/.dir-locals.el
index 7c32d1f7ee..8f4b96445c 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -24,6 +24,8 @@
(c-mode . ((c-file-style . "ruby")))
+ (c++-mode . ((c-file-style . "ruby")))
+
(change-log-mode .
((buffer-file-coding-system . us-ascii)
(indent-tabs-mode . t)
diff --git a/.document b/.document
index 8a418e5d4a..3a6b0c238c 100644
--- a/.document
+++ b/.document
@@ -11,12 +11,25 @@
prelude.rb
rbconfig.rb
+array.rb
ast.rb
+dir.rb
gc.rb
io.rb
+kernel.rb
+marshal.rb
+mjit.rb
+numeric.rb
+nilclass.rb
pack.rb
+ractor.rb
+string.rb
+symbol.rb
+timev.rb
+thread_sync.rb
trace_point.rb
warning.rb
+yjit.rb
# the lib/ directory (which has its own .document file)
lib
@@ -25,14 +38,13 @@ lib
ext
# rdoc files
-NEWS
+NEWS.md
README.md
README.ja.md
COPYING
COPYING.ja
-CONTRIBUTING.md
LEGAL
diff --git a/.gdbinit b/.gdbinit
index 0d44622691..34d044caf6 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -136,7 +136,7 @@ define rp
printf "%sT_ARRAY%s: len=%ld ", $color_type, $color_end, $len
if ($flags & RUBY_FL_USER2)
printf "(shared) shared="
- output/x ((struct RArray*)($arg0))->as.heap.aux.shared
+ output/x ((struct RArray*)($arg0))->as.heap.aux.shared_root
printf " "
else
printf "(ownership) capa=%ld ", ((struct RArray*)($arg0))->as.heap.aux.capa
@@ -156,12 +156,12 @@ define rp
else
if ($flags & RUBY_T_MASK) == RUBY_T_HASH
printf "%sT_HASH%s: ", $color_type, $color_end,
- if (((struct RHash *)($arg0))->basic->flags & RHASH_ST_TABLE_FLAG)
+ if (((struct RHash *)($arg0))->basic.flags & RHASH_ST_TABLE_FLAG)
printf "st len=%ld ", ((struct RHash *)($arg0))->as.st->num_entries
else
printf "li len=%ld bound=%ld ", \
- ((((struct RHash *)($arg0))->basic->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT), \
- ((((struct RHash *)($arg0))->basic->flags & RHASH_AR_TABLE_BOUND_MASK) >> RHASH_AR_TABLE_BOUND_SHIFT)
+ ((((struct RHash *)($arg0))->basic.flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT), \
+ ((((struct RHash *)($arg0))->basic.flags & RHASH_AR_TABLE_BOUND_MASK) >> RHASH_AR_TABLE_BOUND_SHIFT)
end
print (struct RHash *)($arg0)
else
@@ -265,6 +265,10 @@ define rp
printf "%sT_ZOMBIE%s: ", $color_type, $color_end
print (struct RData *)($arg0)
else
+ if ($flags & RUBY_T_MASK) == RUBY_T_MOVED
+ printf "%sT_MOVED%s: ", $color_type, $color_end
+ print *(struct RMoved *)$arg0
+ else
printf "%sunknown%s: ", $color_type, $color_end
print (struct RBasic *)($arg0)
end
@@ -300,6 +304,7 @@ define rp
end
end
end
+ end
end
document rp
Print a Ruby's VALUE.
@@ -539,13 +544,13 @@ end
define rp_class
printf "(struct RClass *) %p", (void*)$arg0
- if ((struct RClass *)($arg0))->ptr.origin_ != $arg0
- printf " -> %p", ((struct RClass *)($arg0))->ptr.origin_
+ if RCLASS_ORIGIN((struct RClass *)($arg0)) != $arg0
+ printf " -> %p", RCLASS_ORIGIN((struct RClass *)($arg0))
end
printf "\n"
rb_classname $arg0
print/x *(struct RClass *)($arg0)
- print *((struct RClass *)($arg0))->ptr
+ print *RCLASS_EXT((struct RClass *)($arg0))
end
document rp_class
Print the content of a Class/Module.
@@ -974,8 +979,8 @@ end
define rb_ps_vm
print $ps_vm = (rb_vm_t*)$arg0
- set $ps_thread_ln = $ps_vm->living_threads.n.next
- set $ps_thread_ln_last = $ps_vm->living_threads.n.prev
+ set $ps_thread_ln = $ps_vm->ractor.main_ractor.threads.set.n.next
+ set $ps_thread_ln_last = $ps_vm->ractor.main_ractor.threads.set.n.prev
while 1
set $ps_thread_th = (rb_thread_t *)$ps_thread_ln
set $ps_thread = (VALUE)($ps_thread_th->self)
@@ -1097,11 +1102,11 @@ define print_id
set $arylen = $ary->as.heap.len
end
set $result = $aryptr[($serial % ID_ENTRY_UNIT) * ID_ENTRY_SIZE + $t]
- if $result != RUBY_Qnil
+ if $result != RUBY_Qnil
print_string $result
- else
- echo undef
- end
+ else
+ echo undef
+ end
end
end
end
@@ -1274,7 +1279,7 @@ document rb_count_objects
Counts all objects grouped by type.
end
-# Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+# Details: https://bugs.ruby-lang.org/projects/ruby-master/wiki/MachineInstructionsTraceWithGDB
define trace_machine_instructions
set logging on
set height 0
@@ -1319,8 +1324,7 @@ define print_flags
printf "RUBY_FL_PROMOTED0 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_PROMOTED0 ? "1" : "0"
printf "RUBY_FL_PROMOTED1 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_PROMOTED1 ? "1" : "0"
printf "RUBY_FL_FINALIZE : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_FINALIZE ? "1" : "0"
- printf "RUBY_FL_TAINT : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_TAINT ? "1" : "0"
- printf "RUBY_FL_UNTRUSTED : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_UNTRUSTED ? "1" : "0"
+ printf "RUBY_FL_SHAREABLE : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_SHAREABLE ? "1" : "0"
printf "RUBY_FL_EXIVAR : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_EXIVAR ? "1" : "0"
printf "RUBY_FL_FREEZE : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_FREEZE ? "1" : "0"
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000000..6c5eac5a0f
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,23 @@
+# This is a file used by GitHub to ignore the following commits on `git blame`.
+#
+# You can also do the same thing in your local repository with:
+# $ git config --local blame.ignoreRevsFile .git-blame-ignore-revs
+
+# Expand tabs
+5b21e94bebed90180d8ff63dad03b8b948361089
+
+# Enable Style/StringLiterals cop for RubyGems/Bundler
+d7ffd3fea402239b16833cc434404a7af82d44f3
+
+# [ruby/digest] Revert tab-expansion in external files
+48b09aae7ec5632209229dcc294dd0d75a93a17f
+8a65cf3b61c60e4cb886f59a73ff6db44364bfa9
+39dc9f9093901d40d2998653948d5da38b18ee2c
+
+# [ruby/io-nonblock] Revert tab expansion
+f28287d34c03f472ffe90ea262bdde9affd4b965
+0d842fecb4f75ab3b1d4097ebdb8e88f51558041
+4ba2c66761d6a293abdfba409241d31063cefd62
+
+# Make benchmark indentation consistent
+fc4acf8cae82e5196186d3278d831f2438479d91
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 0000000000..91f82b842b
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,3 @@
+name: "CodeQL config for the Ruby language"
+
+languages: cpp
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000000..bc63aca35b
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: 'github-actions'
+ directory: '/'
+ schedule:
+ interval: 'monthly'
diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml
new file mode 100644
index 0000000000..ebaafe3bf0
--- /dev/null
+++ b/.github/workflows/baseruby.yml
@@ -0,0 +1,80 @@
+name: BASERUBY Check
+
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+jobs:
+ baseruby:
+ name: BASERUBY
+ runs-on: ubuntu-22.04
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ strategy:
+ matrix:
+ ruby:
+ - ruby-2.2
+# - ruby-2.3
+# - ruby-2.4
+# - ruby-2.5
+# - ruby-2.6
+# - ruby-2.7
+ - ruby-3.0
+ - ruby-3.1
+
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
+ - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler: none
+ - run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - run: sudo apt-get install build-essential autoconf bison libyaml-dev
+ - run: ./autogen.sh
+ - run: ./configure --disable-install-doc
+ - run: make common-srcs
+ - run: make incs
+ - run: make all
+ - run: make test
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / BASERUBY @ ${{ matrix.ruby }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml
new file mode 100644
index 0000000000..070c0fa1dd
--- /dev/null
+++ b/.github/workflows/bundled_gems.yml
@@ -0,0 +1,166 @@
+name: bundled_gems
+
+on:
+ push:
+ branches: [ "master" ]
+ paths:
+ - '.github/workflows/bundled_gems.yml'
+ - 'gems/bundled_gems'
+ pull_request:
+ branches: [ "master" ]
+ paths:
+ - '.github/workflows/bundled_gems.yml'
+ - 'gems/bundled_gems'
+ merge_group:
+ branches: [ "master" ]
+ paths:
+ - '.github/workflows/bundled_gems.yml'
+ - 'gems/bundled_gems'
+ schedule:
+ - cron: '45 6 * * *'
+ workflow_dispatch:
+
+permissions: # added using https://github.com/step-security/secure-workflows
+ contents: read
+
+jobs:
+ update:
+ permissions:
+ contents: write # for Git to git push
+ if: ${{ github.event_name != 'schedule' || github.repository == 'ruby/ruby' }}
+ name: update ${{ github.workflow }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+
+ - name: Set ENV
+ run: |
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ echo "TODAY=$(date +%F)" >> $GITHUB_ENV
+
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache-${{ github.sha }}
+ restore-keys: |
+ downloaded-cache
+
+ - name: Download previous gems list
+ run: |
+ data=bundled_gems.json
+ mkdir -p .downloaded-cache
+ ln -s .downloaded-cache/$data .
+ curl -O -R -z ./$data https://stdgems.org/$data
+
+ - name: Update bundled gems list
+ run: |
+ ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems
+
+ - name: Maintain updated gems list in NEWS
+ run: |
+ #!ruby
+ require 'json'
+ news = File.read("NEWS.md")
+ prev = news[/since the \*+(\d+\.\d+\.\d+)\*+/, 1]
+ prevs = [prev, prev.sub(/\.\d+\z/, '')]
+ %W[bundled].each do |type|
+ last = JSON.parse(File.read("#{type}_gems.json"))['gems'].filter_map do |g|
+ v = g['versions'].values_at(*prevs).compact.first
+ g = g['gem']
+ g = 'RubyGems' if g == 'rubygems'
+ [g, v] if v
+ end.to_h
+ changed = File.foreach("gems/#{type}_gems").filter_map do |l|
+ next if l.start_with?("#")
+ g, v = l.split(" ", 3)
+ [g, v] unless last[g] == v
+ end
+ changed, added = changed.partition {|g, _| last[g]}
+ news.sub!(/^\*( +)The following #{type} gems? are updated\.\n+\K(?: \1\*( +).*\n)*/) do
+ mark = "#{$1} *#{$2}"
+ changed.map {|g, v|"#{mark}#{g} #{v}\n"}.join("")
+ end or next
+ news.sub!(/^\*( +)The following default gems are now bundled gems\.\n+\K(?: \1\*( +).*\n)*/) do
+ mark = "#{$1} *#{$2}"
+ added.map {|g, v|"#{mark}#{g} #{v}\n"}.join("")
+ end or next unless added.empty?
+ File.write("NEWS.md", news)
+ end
+ shell: ruby {0}
+
+ - name: Check diffs
+ id: diff
+ run: |
+ git add -- NEWS.md
+ git diff --no-ext-diff --ignore-submodules --quiet -- gems/bundled_gems
+ continue-on-error: true
+
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
+ if: ${{ steps.diff.outcome == 'failure' }}
+
+ - name: Build
+ run: |
+ ./autogen.sh
+ ./configure -C --disable-install-doc
+ make
+ if: ${{ steps.diff.outcome == 'failure' }}
+
+ - name: Prepare bundled gems
+ run: |
+ make -s prepare-gems
+ if: ${{ steps.diff.outcome == 'failure' }}
+
+ - name: Test bundled gems
+ run: |
+ make -s test-bundled-gems
+ git add -- gems/bundled_gems
+ timeout-minutes: 30
+ env:
+ RUBY_TESTOPTS: "-q --tty=no"
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ if: ${{ steps.diff.outcome == 'failure' }}
+
+ - name: Show diffs
+ id: show
+ run: |
+ git diff --cached --color --no-ext-diff --ignore-submodules --exit-code --
+ continue-on-error: true
+
+ - name: Commit
+ run: |
+ git pull --ff-only origin ${GITHUB_REF#refs/heads/}
+ message="Update bundled gems list at "
+ if [ ${{ steps.diff.outcome }} = success ]; then
+ git commit --message="${message}${GITHUB_SHA:0:30} [ci skip]"
+ else
+ git commit --message="${message}${TODAY}"
+ fi
+ git push origin ${GITHUB_REF#refs/heads/}
+ env:
+ EMAIL: svn-admin@ruby-lang.org
+ GIT_AUTHOR_NAME: git
+ GIT_COMMITTER_NAME: git
+ if: ${{ github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull') && steps.show.outcome == 'failure' }}
+
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / update",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
diff --git a/.github/workflows/check_branch.yml b/.github/workflows/check_branch.yml
deleted file mode 100644
index 37cf3a9a8f..0000000000
--- a/.github/workflows/check_branch.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# We bidirectionally synchronize github.com/ruby/ruby.git's master branch and
-# git.ruby-lang.org/ruby.git's master branch.
-# We can use a pull request's merge button only on the master branch.
-#
-# Therefore, we require to pass this "check_branch" on all protected branches
-# to prevent us from accidentally pushing commits to GitHub directly.
-#
-# Details: https://bugs.ruby-lang.org/issues/16094
-name: Pull Request
-on: [pull_request]
-jobs:
- check_branch:
- runs-on: ubuntu-latest
- steps:
- - name: Check if branch is master
- run: |
- if [ "$BASE_REF" != master ]; then
- echo "Only master branch accepts a pull request, but it's '$BASE_REF'."
- exit 1
- fi
- env:
- BASE_REF: ${{ github.base_ref }}
diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml
new file mode 100644
index 0000000000..79b2916feb
--- /dev/null
+++ b/.github/workflows/check_dependencies.yml
@@ -0,0 +1,78 @@
+name: Check Dependencies
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+jobs:
+ update-deps:
+ strategy:
+ matrix:
+ os: [ubuntu-22.04]
+ fail-fast: true
+ runs-on: ${{ matrix.os }}
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ steps:
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
+ if: ${{ contains(matrix.os, 'ubuntu') }}
+ - name: Install libraries
+ run: |
+ brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
+ if: ${{ contains(matrix.os, 'macos') }}
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
+ - run: ./autogen.sh
+ - name: Run configure
+ run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
+ - run: make all golf
+ - run: ruby tool/update-deps --fix
+ - run: git diff --no-ext-diff --ignore-submodules --exit-code
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ matrix.os }} / Dependencies need to update",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000000..8dba76fbe2
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,75 @@
+name: "Code scanning - action"
+
+on:
+ # push:
+ # paths-ignore:
+ # - 'doc/**'
+ # - '**/man'
+ # - '**.md'
+ # - '**.rdoc'
+ # - '**/.document'
+ # pull_request:
+ # paths-ignore:
+ # - 'doc/**'
+ # - '**/man'
+ # - '**.md'
+ # - '**.rdoc'
+ # - '**/.document'
+ schedule:
+ - cron: '0 12 * * *'
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions: # added using https://github.com/step-security/secure-workflows
+ contents: read
+
+jobs:
+ CodeQL-Build:
+
+ # CodeQL runs on ubuntu-latest and windows-latest
+ permissions:
+ actions: read # for github/codeql-action/init to get workflow details
+ contents: read # for actions/checkout to fetch code
+ security-events: write # for github/codeql-action/autobuild to send a status report
+ runs-on: ubuntu-latest
+ # CodeQL fails to run pull requests from dependabot due to missing write access to upload results.
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') && github.event.head_commit.pusher.name != 'dependabot[bot]' }}
+
+ env:
+ enable_install_doc: no
+
+ steps:
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
+
+ - name: Checkout repository
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
+
+ - name: Remove an obsolete rubygems vendored file
+ run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
+ with:
+ config-file: ./.github/codeql/codeql-config.yml
+ trap-caching: false
+
+ - name: Set ENV
+ run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
new file mode 100644
index 0000000000..caf12cc0f4
--- /dev/null
+++ b/.github/workflows/compilers.yml
@@ -0,0 +1,281 @@
+name: Compilations
+
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+# GitHub actions does not support YAML anchors. This creative use of
+# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
+# restriction.
+env:
+ default_cc: clang-15
+ append_cc: ''
+
+ # -O1 is faster than -O3 in our tests... Majority of time are consumed trying
+ # to optimize binaries. Also GitHub Actions run on relatively modern CPUs
+ # compared to, say, GCC 4 or Clang 3. We don't specify `-march=native`
+ # because compilers tend not understand what the CPU is.
+ optflags: '-O1'
+
+ # -g0 disables backtraces when SEGV. Do not set that.
+ debugflags: '-ggdb3'
+
+ default_configure: >-
+ --enable-debug-env
+ --disable-install-doc
+ --with-ext=-test-/cxxanyargs,+
+ append_configure: >-
+ --without-valgrind
+ --without-jemalloc
+ --without-gmp
+
+ UPDATE_UNICODE: >-
+ UNICODE_FILES=.
+ UNICODE_PROPERTY_FILES=.
+ UNICODE_AUXILIARY_FILES=.
+ UNICODE_EMOJI_FILES=.
+ CONFIGURE_TTY: never
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ RUBY_DEBUG: ci rgengc
+ RUBY_TESTOPTS: >-
+ -q
+ --color=always
+ --tty=no
+
+permissions:
+ contents: read
+
+jobs:
+ compile:
+ strategy:
+ fail-fast: false
+ matrix:
+ env:
+ - {}
+ entry:
+ - { name: gcc-12, env: { default_cc: gcc-12 } }
+ - { name: gcc-11, env: { default_cc: gcc-11 } }
+ - { name: gcc-10, env: { default_cc: gcc-10 } }
+ - { name: gcc-9, env: { default_cc: gcc-9 } }
+ - { name: gcc-8, env: { default_cc: gcc-8 } }
+ - { name: gcc-7, env: { default_cc: gcc-7 } }
+ - name: 'gcc-13 LTO'
+ container: gcc-13
+ env:
+ default_cc: 'gcc-13 -flto=auto -ffat-lto-objects -Werror=lto-type-mismatch'
+ optflags: '-O2'
+ shared: disable
+ # check: true
+ - { name: clang-16, env: { default_cc: clang-16 } }
+ - { name: clang-15, env: { default_cc: clang-15 } }
+ - { name: clang-14, env: { default_cc: clang-14 } }
+ - { name: clang-13, env: { default_cc: clang-13 } }
+ - { name: clang-12, env: { default_cc: clang-12 } }
+ - { name: clang-11, env: { default_cc: clang-11 } }
+ - { name: clang-10, env: { default_cc: clang-10 } }
+ # llvm-objcopy<=9 doesn't have --wildcard. It compiles, but leaves Rust symbols in libyjit.o.
+ - { name: clang-9, env: { default_cc: clang-9, append_configure: '--disable-yjit' } }
+ - { name: clang-8, env: { default_cc: clang-8, append_configure: '--disable-yjit' } }
+ - { name: clang-7, env: { default_cc: clang-7, append_configure: '--disable-yjit' } }
+ - { name: clang-6.0, env: { default_cc: clang-6.0, append_configure: '--disable-yjit' } }
+ - name: 'clang-16 LTO'
+ container: clang-16
+ env:
+ default_cc: 'clang-16 -flto=auto'
+ optflags: '-O2'
+ shared: disable
+ # check: true
+
+# - { name: aarch64-linux-gnu, crosshost: aarch64-linux-gnu, container: crossbuild-essential-arm64 }
+# - { name: arm-linux-gnueabi, crosshost: arm-linux-gnueabi }
+# - { name: arm-linux-gnueabihf, crosshost: arm-linux-gnueabihf }
+# - { name: i686-w64-mingw32, crosshost: i686-w64-mingw32 }
+# - { name: powerpc-linux-gnu, crosshost: powerpc-linux-gnu }
+# - { name: powerpc64le-linux-gnu, crosshost: powerpc64le-linux-gnu, container: crossbuild-essential-ppc64el }
+# - { name: s390x-linux-gnu, crosshost: s390x-linux-gnu, container: crossbuild-essential-s390x }
+# - { name: x86_64-w64-mingw32, crosshost: x86_64-w64-mingw32, container: mingw-w64 }
+
+ # -Wno-strict-prototypes is necessary with current clang-15 since
+ # older autoconf generate functions without prototype and -pedantic
+ # now implies strict-prototypes. Disabling the error but leaving the
+ # warning generates a lot of noise from use of ANYARGS in
+ # rb_define_method() and friends.
+ # See: https://github.com/llvm/llvm-project/commit/11da1b53d8cd3507959022cd790d5a7ad4573d94
+ - { name: c99, env: { append_cc: '-std=c99 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
+# - { name: c11, env: { append_cc: '-std=c11 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
+# - { name: c17, env: { append_cc: '-std=c17 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
+ - { name: c2x, env: { append_cc: '-std=c2x -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
+ - { name: c++98, env: { CXXFLAGS: '-std=c++98 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
+# - { name: c++11, env: { CXXFLAGS: '-std=c++11 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
+# - { name: c++14, env: { CXXFLAGS: '-std=c++14 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
+# - { name: c++17, env: { CXXFLAGS: '-std=c++17 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
+ - { name: c++2a, env: { CXXFLAGS: '-std=c++2a -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
+
+ - { name: '-O0', env: { optflags: '-O0 -march=x86-64 -mtune=generic' } }
+# - { name: '-O3', env: { optflags: '-O3 -march=x86-64 -mtune=generic' }, check: true }
+
+ - { name: gmp, env: { append_configure: '--with-gmp' } }
+ - { name: jemalloc, env: { append_configure: '--with-jemalloc' } }
+ - { name: valgrind, env: { append_configure: '--with-valgrind' } }
+ - { name: 'coroutine=ucontext', env: { append_configure: '--with-coroutine=ucontext' } }
+ - { name: 'coroutine=pthread', env: { append_configure: '--with-coroutine=pthread' } }
+ - { name: disable-jit-support, env: { append_configure: '--disable-jit-support' } }
+ - { name: disable-dln, env: { append_configure: '--disable-dln' } }
+ - { name: enable-mkmf-verbose, env: { append_configure: '--enable-mkmf-verbose' } }
+ - { name: disable-rubygems, env: { append_configure: '--disable-rubygems' } }
+ - { name: RUBY_DEVEL, env: { append_configure: '--enable-devel' } }
+
+ - { name: OPT_THREADED_CODE=1, env: { cppflags: '-DOPT_THREADED_CODE=1' } }
+ - { name: OPT_THREADED_CODE=2, env: { cppflags: '-DOPT_THREADED_CODE=2' } }
+ - { name: OPT_THREADED_CODE=3, env: { cppflags: '-DOPT_THREADED_CODE=3' } }
+
+ - { name: NDEBUG, env: { cppflags: '-DNDEBUG' } }
+ - { name: RUBY_DEBUG, env: { cppflags: '-DRUBY_DEBUG' } }
+# - { name: ARRAY_DEBUG, env: { cppflags: '-DARRAY_DEBUG' } }
+# - { name: BIGNUM_DEBUG, env: { cppflags: '-DBIGNUM_DEBUG' } }
+# - { name: CCAN_LIST_DEBUG, env: { cppflags: '-DCCAN_LIST_DEBUG' } }
+# - { name: CPDEBUG=-1, env: { cppflags: '-DCPDEBUG=-1' } }
+# - { name: ENC_DEBUG, env: { cppflags: '-DENC_DEBUG' } }
+# - { name: GC_DEBUG, env: { cppflags: '-DGC_DEBUG' } }
+# - { name: HASH_DEBUG, env: { cppflags: '-DHASH_DEBUG' } }
+# - { name: ID_TABLE_DEBUG, env: { cppflags: '-DID_TABLE_DEBUG' } }
+# - { name: RGENGC_DEBUG=-1, env: { cppflags: '-DRGENGC_DEBUG=-1' } }
+# - { name: SYMBOL_DEBUG, env: { cppflags: '-DSYMBOL_DEBUG' } }
+
+# - { name: RGENGC_CHECK_MODE, env: { cppflags: '-DRGENGC_CHECK_MODE' } }
+# - { name: TRANSIENT_HEAP_CHECK_MODE, env: { cppflags: '-DTRANSIENT_HEAP_CHECK_MODE' } }
+# - { name: VM_CHECK_MODE, env: { cppflags: '-DVM_CHECK_MODE' } }
+
+ - { name: USE_EMBED_CI=0, env: { cppflags: '-DUSE_EMBED_CI=0' } }
+ - name: USE_FLONUM=0,
+ env:
+ cppflags: '-DUSE_FLONUM=0'
+ # yjit requires FLONUM for the pointer tagging scheme
+ append_configure: '--disable-yjit'
+# - { name: USE_GC_MALLOC_OBJ_INFO_DETAILS, env: { cppflags: '-DUSE_GC_MALLOC_OBJ_INFO_DETAILS' } }
+ - { name: USE_LAZY_LOAD, env: { cppflags: '-DUSE_LAZY_LOAD' } }
+# - { name: USE_RINCGC=0, env: { cppflags: '-DUSE_RINCGC=0' } }
+# - { name: USE_SYMBOL_GC=0, env: { cppflags: '-DUSE_SYMBOL_GC=0' } }
+# - { name: USE_THREAD_CACHE=0, env: { cppflags: '-DUSE_THREAD_CACHE=0' } }
+# - { name: USE_TRANSIENT_HEAP=0, env: { cppflags: '-DUSE_TRANSIENT_HEAP=0' } }
+# - { name: USE_RUBY_DEBUG_LOG=1, env: { cppflags: '-DUSE_RUBY_DEBUG_LOG=1' } }
+ - { name: USE_RVARGC=0, env: { cppflags: '-DUSE_RVARGC=0' } }
+# - { name: USE_RVARGC=1, env: { cppflags: '-DUSE_RVARGC=1' } }
+# - { name: USE_DEBUG_COUNTER, env: { cppflags: '-DUSE_DEBUG_COUNTER=1', RUBY_DEBUG_COUNTER_DISABLE: '1' } }
+
+ - { name: DEBUG_FIND_TIME_NUMGUESS, env: { cppflags: '-DDEBUG_FIND_TIME_NUMGUESS' } }
+ - { name: DEBUG_INTEGER_PACK, env: { cppflags: '-DDEBUG_INTEGER_PACK' } }
+# - { name: ENABLE_PATH_CHECK, env: { cppflags: '-DENABLE_PATH_CHECK' } }
+
+ - { name: GC_DEBUG_STRESS_TO_CLASS, env: { cppflags: '-DGC_DEBUG_STRESS_TO_CLASS' } }
+# - { name: GC_ENABLE_LAZY_SWEEP=0, env: { cppflags: '-DGC_ENABLE_LAZY_SWEEP=0' } }
+# - { name: GC_PROFILE_DETAIL_MEMOTY, env: { cppflags: '-DGC_PROFILE_DETAIL_MEMOTY' } }
+# - { name: GC_PROFILE_MORE_DETAIL, env: { cppflags: '-DGC_PROFILE_MORE_DETAIL' } }
+
+# - { name: CALC_EXACT_MALLOC_SIZE, env: { cppflags: '-DCALC_EXACT_MALLOC_SIZE' } }
+# - { name: MALLOC_ALLOCATED_SIZE_CHECK, env: { cppflags: '-DMALLOC_ALLOCATED_SIZE_CHECK' } }
+
+# - { name: IBF_ISEQ_ENABLE_LOCAL_BUFFER, env: { cppflags: '-DIBF_ISEQ_ENABLE_LOCAL_BUFFER' } }
+
+# - { name: RGENGC_ESTIMATE_OLDMALLOC, env: { cppflags: '-DRGENGC_ESTIMATE_OLDMALLOC' } }
+# - { name: RGENGC_FORCE_MAJOR_GC, env: { cppflags: '-DRGENGC_FORCE_MAJOR_GC' } }
+# - { name: RGENGC_OBJ_INFO, env: { cppflags: '-DRGENGC_OBJ_INFO' } }
+# - { name: RGENGC_OLD_NEWOBJ_CHECK, env: { cppflags: '-DRGENGC_OLD_NEWOBJ_CHECK' } }
+# - { name: RGENGC_PROFILE, env: { cppflags: '-DRGENGC_PROFILE' } }
+
+# - { name: VM_DEBUG_BP_CHECK, env: { cppflags: '-DVM_DEBUG_BP_CHECK' } }
+# - { name: VM_DEBUG_VERIFY_METHOD_CACHE, env: { cppflags: '-DVM_DEBUG_VERIFY_METHOD_CACHE' } }
+
+ - { name: MJIT_FORCE_ENABLE, env: { cppflags: '-DMJIT_FORCE_ENABLE' } }
+ - { name: YJIT_FORCE_ENABLE, env: { cppflags: '-DYJIT_FORCE_ENABLE' } }
+
+ name: ${{ matrix.entry.name }}
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || matrix.entry.env.default_cc || 'clang-15' }}
+ options: --user root
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ env: ${{ matrix.entry.env || matrix.env }}
+ steps:
+ - run: id
+ working-directory:
+ - run: mkdir build
+ working-directory:
+ - name: setenv
+ run: |
+ echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ run: >
+ ../src/configure -C ${default_configure} ${append_configure}
+ --${{
+ matrix.entry.crosshost && 'host' || 'with-gcc'
+ }}=${{
+ matrix.entry.crosshost || '"${default_cc}${append_cc:+ $append_cc}"'
+ }}
+ --${{ matrix.entry.shared || 'enable' }}-shared
+ - run: make extract-extlibs
+ - run: make incs
+ - run: make showflags
+ - run: make
+ - run: make leaked-globals
+ - run: make test
+ - run: make install
+ if: ${{ matrix.entry.check }}
+ - run: make test-tool
+ if: ${{ matrix.entry.check }}
+ - run: make test-all TESTS='-- ruby -ext-'
+ if: ${{ matrix.entry.check }}
+ - run: make test-spec
+ env:
+ CHECK_LEAKS: true
+ if: ${{ matrix.entry.check }}
+ - run: make test-annocheck
+ if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }}
+
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.entry.name }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml
deleted file mode 100644
index 0821d63049..0000000000
--- a/.github/workflows/cygwin.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-name: Cygwin
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - '*'
-jobs:
- make:
- strategy:
- matrix:
- test_task: [test]
- os: [windows-2019]
- vs: [2019]
- fail-fast: false
- runs-on: ${{ matrix.os }}
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
- steps:
- - uses: actions/cache@v1
- with:
- path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
- key: ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-
- ${{ runner.os }}-cygwin-chocolatey-
- - name: Install cygwin base packages with chocolatey
- run: |
- choco install --no-progress cygwin
- - uses: actions/cache@v1
- with:
- path: C:\tools\cygwin\package
- key: ${{ runner.os }}-cygwin-package-${{ matrix.os }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-cygwin-package-${{ matrix.os }}-
- ${{ runner.os }}-cygwin-package-
- - name: Install cygwin additional packages
- run: |
- C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -l C:/tools/cygwin/package -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,bison,gcc-core,git,libffi-devel,libgdbm-devel,libgmp-devel,libreadline-devel,libssl-devel,make,patch,ruby,zlib-devel
- shell: cmd
- - name: Set ENV
- run: |
- echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
- # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- - name: Checkout ruby/ruby
- run: |
- git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
- git -C src reset --hard ${{ github.sha }}
- if: github.event_name == 'push'
- shell: cmd
- - name: Checkout a pull request
- run: |
- git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
- git -C src reset --hard ${{ github.event.pull_request.head.sha }}
- if: github.event_name == 'pull_request'
- shell: cmd
- - run: ./src/tool/actions-commit-info.sh
- shell: bash
- id: commit_info
- - name: Autoconf
- run: |
- cd src
- bash /usr/bin/autoconf
- shell: cmd
- - name: Configure
- run: |
- md build
- cd build
- bash ../src/configure
- shell: cmd
- - name: make
- run: |
- make -C build
- shell: cmd
- - name: make btest
- run: |
- make -C build btest
- shell: cmd
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 724081d9dc..d8dc58b119 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -1,81 +1,113 @@
name: macOS
on:
push:
- branches:
- - master
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
pull_request:
- branches:
- - '*'
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
jobs:
make:
- runs-on: macos-latest
strategy:
matrix:
- test_task: [ "check", "test-bundler", "test-bundled-gems" ]
+ test_task: ["check"] # "test-bundler-parallel", "test-bundled-gems"
+ os:
+ - macos-13
+ - macos-14
+ - macos-15
fail-fast: false
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ env:
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ runs-on: ${{ matrix.os }}
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
steps:
- - name: Disable Firewall
+ - run: mkdir build
+ working-directory:
+ - name: git config
run: |
- sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
- sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
- # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- - name: Checkout ruby/ruby
- run: |
- git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
- git -C src reset --hard "$GITHUB_SHA"
- if: github.event_name == 'push'
- - name: Checkout a pull request
- run: |
- git clone --single-branch --shallow-since=yesterday "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
- git -C src reset --hard "$GITHUB_REV"
- env:
- GITHUB_REV: ${{ github.event.pull_request.head.sha }}
- GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
- GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
- if: github.event_name == 'pull_request'
- - run: ./src/tool/actions-commit-info.sh
- id: commit_info
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Install libraries
run: |
- export WAITS='5 60'
- cd src
- tool/travis_retry.sh brew update
- tool/travis_retry.sh brew install gdbm gmp libffi openssl@1.1 zlib autoconf automake libtool readline
+ brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline bison
+ working-directory: src
- name: Set ENV
run: |
- echo '::set-env name=JOBS::'-j$((1 + $(sysctl -n hw.activecpu)))
- - name: Autoconf
- run: |
- cd src
- autoconf
- - name: Configure
+ echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
+ echo "PATH="/usr/local/opt/bison/bin:/opt/homebrew/opt/bison/bin:$PATH"" >> $GITHUB_ENV
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ run: ../src/configure -C --disable-install-doc --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline)
+ - run: make incs
+ - run: make prepare-gems
+ if: ${{ matrix.test_task == 'test-bundled-gems' }}
+ - run: make
+ - run: make leaked-globals
+ if: ${{ matrix.test_task == 'check' }}
+ - name: make ${{ matrix.test_task }}
run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline)
- - name: Make
- run: make -C build $JOBS
- - name: Extract gems
- run: make -C build update-gems extract-gems
- if: matrix.test_task == 'check'
- - name: Tests
- run: make -C build $JOBS -s ${{ matrix.test_task }}
+ make -s ${{ matrix.test_task }} ${TESTS:+TESTS=`echo "$TESTS" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|'`}
+ timeout-minutes: 40
env:
RUBY_TESTOPTS: "-q --tty=no"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
- - uses: k0kubun/action-slack@v2.0.0
+ TESTS: ${{ matrix.test_task == 'check' && matrix.skipped_tests || '' }}
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ PRECHECK_BUNDLED_GEMS: "no"
+ - name: make skipped tests
+ run: |
+ make -s test-all TESTS=`echo "$TESTS" | sed 's| |$$/ -n/|g;s|^|-n/|;s|$|$$/|'`
+ env:
+ GNUMAKEFLAGS: ""
+ RUBY_TESTOPTS: "-v --tty=no"
+ TESTS: ${{ matrix.skipped_tests }}
+ PRECHECK_BUNDLED_GEMS: "no"
+ if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }}
+ continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
with:
payload: |
{
- "attachments": [{
- "text": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
- "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
- "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
- "color": "danger"
- }]
+ "ci": "GitHub Actions",
+ "env": "${{ matrix.os }} / ${{ matrix.test_task }}${{ matrix.configure }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
}
env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- if: failure() && github.event_name == 'push'
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
new file mode 100644
index 0000000000..0df917d3d8
--- /dev/null
+++ b/.github/workflows/mingw.yml
@@ -0,0 +1,179 @@
+name: MinGW
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+# Notes:
+# Actions console encoding causes issues, see test-all & test-spec steps
+#
+jobs:
+ make:
+ runs-on: windows-2022
+ name: ${{ github.workflow }} (${{ matrix.msystem }})
+ env:
+ MSYSTEM: ${{ matrix.msystem }}
+ MSYS2_ARCH: x86_64
+ CHOST: "x86_64-w64-mingw32"
+ CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe"
+ CXXFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe"
+ CPPFLAGS: "-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048"
+ LDFLAGS: "-pipe"
+ UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ strategy:
+ matrix:
+ include:
+ # To mitigate flakiness of MinGW CI, we test only one runtime that newer MSYS2 uses.
+ - msystem: "UCRT64"
+ base_ruby: head
+ test_task: "check"
+ test-all-opts: "--name=!/TestObjSpace#test_reachable_objects_during_iteration/"
+ fail-fast: false
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ steps:
+ - run: mkdir build
+ working-directory:
+ - name: git config
+ run: |
+ git config --global core.autocrlf false
+ git config --global core.eol lf
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
+ - name: Set up Ruby & MSYS2
+ uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
+ with:
+ ruby-version: ${{ matrix.base_ruby }}
+ - name: set env
+ run: |
+ echo "GNUMAKEFLAGS=-j$((2 * NUMBER_OF_PROCESSORS))" >> $GITHUB_ENV
+
+ - name: where check
+ run: |
+ # show where
+ mv /c/Windows/System32/libcrypto-1_1-x64.dll /c/Windows/System32/libcrypto-1_1-x64.dll_
+ mv /c/Windows/System32/libssl-1_1-x64.dll /c/Windows/System32/libssl-1_1-x64.dll_
+ result=true
+ for e in gcc.exe ragel.exe make.exe bison.exe libcrypto-1_1-x64.dll libssl-1_1-x64.dll; do
+ echo '##['group']'$'\033[93m'$e$'\033[m'
+ where $e || result=false
+ echo '##['endgroup']'
+ done
+ $result
+
+ - name: version check
+ run: |
+ # show version
+ result=true
+ for e in gcc ragel make bison "openssl version"; do
+ case "$e" in *" "*) ;; *) e="$e --version";; esac
+ echo '##['group']'$'\033[93m'$e$'\033[m'
+ $e || result=false
+ echo '##['endgroup']'
+ done
+ $result
+
+ - name: autogen
+ run: |
+ ./autogen.sh
+ working-directory: src
+
+ - name: configure
+ run: >
+ ../src/configure --disable-install-doc --prefix=/.
+ --build=$CHOST --host=$CHOST --target=$CHOST
+
+ - name: update
+ run: |
+ make incs
+
+ - name: download gems
+ run: |
+ make update-gems
+
+ - name: make all
+ timeout-minutes: 30
+ run: |
+ make
+
+ - run: make leaked-globals
+
+ - name: make install
+ run: |
+ make DESTDIR=../install install-nodoc
+
+ - name: test
+ timeout-minutes: 5
+ run: |
+ make test
+ if: ${{matrix.test_task == 'check' || matrix.test_task == 'test'}}
+
+ - name: test-all
+ timeout-minutes: 45
+ run: |
+ # Actions uses UTF8, causes test failures, similar to normal OS setup
+ chcp.com 437
+ make ${{ StartsWith(matrix.test_task, 'test/') && matrix.test_task || 'test-all' }}
+ env:
+ RUBY_TESTOPTS: >-
+ --retry --job-status=normal --show-skip --timeout-scale=1.5
+ ${{ matrix.test-all-opts }}
+ BUNDLER_VERSION:
+ if: ${{matrix.test_task == 'check' || matrix.test_task == 'test-all' || StartsWith(matrix.test_task, 'test/')}}
+
+ - name: test-spec
+ timeout-minutes: 10
+ run: |
+ make ${{ StartsWith(matrix.test_task, 'spec/') && matrix.test_task || 'test-spec' }}
+ if: ${{matrix.test_task == 'check' || matrix.test_task == 'test-spec' || StartsWith(matrix.test_task, 'spec/')}}
+
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} ${{ matrix.msystem }} / ${{ matrix.test_task }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
+ shell: sh
diff --git a/.github/workflows/mjit-bindgen.yml b/.github/workflows/mjit-bindgen.yml
new file mode 100644
index 0000000000..26f8a1b2aa
--- /dev/null
+++ b/.github/workflows/mjit-bindgen.yml
@@ -0,0 +1,104 @@
+name: MJIT bindgen
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+jobs:
+ make:
+ strategy:
+ matrix:
+ include:
+ - task: mjit-bindgen
+ fail-fast: false
+ runs-on: ubuntu-22.04
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ steps:
+ - run: mkdir build
+ working-directory:
+ - name: Set ENV
+ run: |
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y \
+ build-essential \
+ libssl-dev libyaml-dev libreadline6-dev \
+ zlib1g-dev libncurses5-dev libffi-dev \
+ libclang1-14 \
+ bison autoconf
+ sudo apt-get install -q -y pkg-config || :
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
+ with:
+ ruby-version: '3.1'
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
+ - name: Fixed world writable dirs
+ run: |
+ chmod -v go-w $HOME $HOME/.config
+ sudo chmod -R go-w /usr/share
+ sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install --enable-yjit=dev_nodebug
+ - run: make incs
+ - run: make
+ - run: make install
+ - run: make ${{ matrix.task }}
+ - run: git diff --exit-code
+ working-directory: src
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ matrix.os }} / ${{ matrix.test_task }}${{ matrix.configure }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index d23c136619..6f7181489a 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -1,79 +1,113 @@
name: MJIT
on:
push:
- branches:
- - master
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
pull_request:
- branches:
- - '*'
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ - '**.[1-8]'
+ - '**.ronn'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ - '**.[1-8]'
+ - '**.ronn'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
jobs:
- test:
+ make:
strategy:
matrix:
- jit_opts: [ "--jit", "--jit-wait" ]
+ test_task: [check] # to make job names consistent
+ mjit_opts: [--mjit-wait]
fail-fast: false
runs-on: ubuntu-latest
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ env:
+ TESTOPTS: '-q --tty=no'
+ RUN_OPTS: '--disable-gems ${{ matrix.mjit_opts }} --mjit-debug=-ggdb3'
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
steps:
+ - run: mkdir build
+ working-directory:
- name: Install libraries
run: |
set -x
sudo apt-get update -q || :
- sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
- # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- - name: Checkout ruby/ruby
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
+ - name: git config
run: |
- git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
- git -C src reset --hard "$GITHUB_SHA"
- if: github.event_name == 'push'
- - name: Checkout a pull request
- run: |
- git clone --single-branch --shallow-since=yesterday "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
- git -C src reset --hard "$GITHUB_REV"
- env:
- GITHUB_REV: ${{ github.event.pull_request.head.sha }}
- GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
- GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
- if: github.event_name == 'pull_request'
- - run: ./src/tool/actions-commit-info.sh
- id: commit_info
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Fixed world writable dirs
run: |
- chmod go-w $HOME
+ chmod -v go-w $HOME $HOME/.config
sudo chmod -R go-w /usr/share
+ sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
- name: Set ENV
run: |
- echo '::set-env name=JOBS::'-j$((1 + $(nproc --all)))
- - name: Autoconf
- run: cd src && exec autoconf
- - name: configure
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ run: ../src/configure -C --disable-install-doc cppflags=-DVM_CHECK_MODE
+ - run: make incs
+ - run: make
+ - run: sudo make -s install
+ - name: Run test
+ run: |
+ unset GNUMAKEFLAGS
+ make -s test RUN_OPTS="$RUN_OPTS"
+ timeout-minutes: 60
+ # - name: Run test-all
+ # run: |
+ # ulimit -c unlimited
+ # make -s test-all RUN_OPTS="$RUN_OPTS"
+ # timeout-minutes: 60
+ - name: Run test-spec
run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc
- - name: make all
- run: make -C build $JOBS
- - name: make install
- run: sudo make -C build $JOBS install
- - name: make test
- run: "make -C build $JOBS -s test TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: make test-all
- run: "make -C build $JOBS -s test-all TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: make test-spec
- run: "make -C build $JOBS -s test-spec RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
- - uses: k0kubun/action-slack@v2.0.0
+ unset GNUMAKEFLAGS
+ make -s test-spec RUN_OPTS="$RUN_OPTS"
+ timeout-minutes: 60
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
with:
payload: |
{
- "attachments": [{
- "text": "${{ job.status }}: ${{ github.workflow }} / ${{ matrix.jit_opts }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
- "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
- "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
- "color": "danger"
- }]
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.mjit_opts }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
}
env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- if: failure() && github.event_name == 'push'
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000000..5d4474d978
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,18 @@
+name: Start release workflow
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+ notify:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build release package
+ run: |
+ curl -L -X POST \
+ -H "Authorization: Bearer ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}" \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ https://api.github.com/repos/ruby/actions/dispatches \
+ -d '{"event_type": "${{ github.ref }}"}'
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
new file mode 100644
index 0000000000..c12a95362d
--- /dev/null
+++ b/.github/workflows/scorecards.yml
@@ -0,0 +1,72 @@
+# This workflow uses actions that are not certified by GitHub. They are provided
+# by a third-party and are governed by separate terms of service, privacy
+# policy, and support documentation.
+
+name: Scorecards supply-chain security
+on:
+ # For Branch-Protection check. Only the default branch is supported. See
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
+ branch_protection_rule:
+ # To guarantee Maintained check is occasionally updated. See
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
+ schedule:
+ - cron: '22 4 * * 2'
+ push:
+ branches: [ "master" ]
+
+# Declare default permissions as read only.
+permissions: read-all
+
+jobs:
+ analysis:
+ name: Scorecards analysis
+ runs-on: ubuntu-latest
+ permissions:
+ # Needed to upload the results to code-scanning dashboard.
+ security-events: write
+ # Needed to publish results and get a badge (see publish_results below).
+ id-token: write
+ # Uncomment the permissions below if installing in a private repository.
+ # contents: read
+ # actions: read
+
+ steps:
+ - name: "Checkout code"
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ persist-credentials: false
+
+ - name: "Run analysis"
+ uses: ossf/scorecard-action@ea651e62978af7915d09fe2e282747c798bf2dab # v2.4.1
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ # (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
+ # - you want to enable the Branch-Protection check on a *public* repository, or
+ # - you are installing Scorecards on a *private* repository
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
+ repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
+
+ # Public repositories:
+ # - Publish results to OpenSSF REST API for easy access by consumers
+ # - Allows the repository to include the Scorecard badge.
+ # - See https://github.com/ossf/scorecard-action#publishing-results.
+ # For private repositories:
+ # - `publish_results` will always be set to `false`, regardless
+ # of the value entered here.
+ publish_results: true
+
+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
+ # format to the repository Actions tab.
+ - name: "Upload artifact"
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: SARIF file
+ path: results.sarif
+ retention-days: 5
+
+ # Upload the results to GitHub's code scanning dashboard.
+ - name: "Upload to code-scanning"
+ uses: github/codeql-action/upload-sarif@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.27
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml
new file mode 100644
index 0000000000..4521195a2b
--- /dev/null
+++ b/.github/workflows/spec_guards.yml
@@ -0,0 +1,71 @@
+name: Rubyspec Version Guards Check
+
+on:
+ push:
+ paths:
+ - 'spec/**'
+ - '!spec/*.md'
+ pull_request:
+ paths:
+ - 'spec/**'
+ - '!spec/*.md'
+ merge_group:
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+jobs:
+ rubyspec:
+ name: Rubyspec
+
+ runs-on: ubuntu-22.04
+
+ if: >-
+ ${{!(false
+ || contains(github.event.head_commit.message, '[DOC]')
+ || contains(github.event.head_commit.message, 'Document')
+ || contains(github.event.pull_request.title, '[DOC]')
+ || contains(github.event.pull_request.title, 'Document')
+ || contains(github.event.pull_request.labels.*.name, 'Document')
+ || (github.event_name == 'push' && github.actor == 'dependabot[bot]')
+ )}}
+
+ strategy:
+ matrix:
+ # Specs from ruby/spec should still run on all supported Ruby versions.
+ # This also ensures the needed ruby_version_is guards are there, see spec/README.md.
+ ruby:
+ - ruby-3.1
+ - ruby-3.2
+
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+ - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler: none
+
+ - run: gem install webrick
+
+ - run: ruby ../mspec/bin/mspec
+ working-directory: spec/ruby
+ env:
+ CHECK_LEAKS: true
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / rubyspec @ ${{ matrix.ruby }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() }}
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 885f078f07..4fbca1170e 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,115 +1,146 @@
name: Ubuntu
on:
push:
- branches:
- - master
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
pull_request:
- branches:
- - '*'
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
jobs:
make:
strategy:
matrix:
- test_task: [ "check", "test-bundler", "test-bundled-gems" ]
- os: [ubuntu-latest, ubuntu-16.04]
- exclude:
- - test_task: test-bundler
- os: ubuntu-16.04
+ # main variables included in the job name
+ test_task: [check]
+ configure: [cppflags=-DRUBY_DEBUG] # default to use more assertions
+ arch: ['']
+ # specify all jobs with `include` to avoid testing duplicated things
+ include:
+ - test_task: check
+ - test_task: check
+ arch: i686
+ configure: '' # test without -DRUBY_DEBUG as well
+ - test_task: check
+ configure: "--enable-shared --enable-load-relative"
+ - test_task: test-all TESTS=--repeat-count=2
+ - test_task: test-bundler-parallel
- test_task: test-bundled-gems
- os: ubuntu-16.04
fail-fast: false
- runs-on: ${{ matrix.os }}
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ env:
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ RUBY_DEBUG: ci
+ SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }}
+ runs-on: ubuntu-22.04
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
steps:
- - run: env | sort
- - name: Dump GitHub context
- env:
- GITHUB_CONTEXT: ${{ toJson(github) }}
- run: echo "$GITHUB_CONTEXT"
- - name: Dump job context
- env:
- JOB_CONTEXT: ${{ toJson(job) }}
- run: echo "$JOB_CONTEXT"
- - name: Dump steps context
- env:
- STEPS_CONTEXT: ${{ toJson(steps) }}
- run: echo "$STEPS_CONTEXT"
- - name: Dump runner context
- env:
- RUNNER_CONTEXT: ${{ toJson(runner) }}
- run: echo "$RUNNER_CONTEXT"
- - name: Dump strategy context
- env:
- STRATEGY_CONTEXT: ${{ toJson(strategy) }}
- run: echo "$STRATEGY_CONTEXT"
- - name: Dump matrix context
- env:
- MATRIX_CONTEXT: ${{ toJson(matrix) }}
- run: echo "$MATRIX_CONTEXT"
-
+ - run: mkdir build
+ working-directory:
+ - name: Set ENV
+ run: |
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
- name: Install libraries
+ env:
+ arch: ${{matrix.arch}}
run: |
set -x
+ arch=${arch:+:${arch/i[3-6]86/i386}}
+ ${arch:+sudo dpkg --add-architecture ${arch#:}}
sudo apt-get update -q || :
- sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
- # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- - name: Checkout ruby/ruby
+ sudo apt-get install --no-install-recommends -q -y \
+ ${arch:+cross}build-essential${arch/:/-} \
+ libssl-dev${arch} libyaml-dev${arch} libreadline6-dev${arch} \
+ zlib1g-dev${arch} libncurses5-dev${arch} libffi-dev${arch} \
+ bison autoconf ruby
+ sudo apt-get install -q -y pkg-config${arch} || :
+ - name: git config
run: |
- git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
- git -C src reset --hard "$GITHUB_SHA"
- if: github.event_name == 'push'
- - name: Checkout a pull request
- run: |
- git clone --single-branch --shallow-since=yesterday "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src
- git -C src reset --hard "$GITHUB_REV"
- env:
- GITHUB_REV: ${{ github.event.pull_request.head.sha }}
- GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
- GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }}
- if: github.event_name == 'pull_request'
- - run: ./src/tool/actions-commit-info.sh
- id: commit_info
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Fixed world writable dirs
run: |
- chmod go-w $HOME
+ chmod -v go-w $HOME $HOME/.config
sudo chmod -R go-w /usr/share
- - name: Set ENV
- run: |
- echo '::set-env name=JOBS::'-j$((1 + $(nproc --all)))
- - name: Autoconf
- run: cd src && exec autoconf
- - name: configure
- run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc
- - name: Make
- run: make -C build $JOBS
- - name: Extract gems
- run: make -C build update-gems extract-gems
- if: matrix.test_task == 'check'
+ sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ env:
+ arch: ${{matrix.arch}}
+ run: >-
+ $SETARCH ../src/configure -C --disable-install-doc ${{ matrix.configure }}
+ ${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
+ - run: $SETARCH make incs
+ - run: $SETARCH make prepare-gems
+ if: ${{ matrix.test_task == 'test-bundled-gems' }}
+ - run: $SETARCH make
+ - run: $SETARCH make leaked-globals
+ if: ${{ matrix.test_task == 'check' }}
- name: Create dummy files in build dir
run: |
- cd build
- ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
- if: matrix.test_task == 'check'
- - name: Tests
- run: make -C build $JOBS -s ${{ matrix.test_task }}
+ $SETARCH ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
+ if: ${{ matrix.test_task == 'check' }}
+ - name: make ${{ matrix.test_task }}
+ run: |
+ $SETARCH make -s ${{ matrix.test_task }} ${TESTS:+TESTS=`echo "$TESTS" | sed 's| |$$/ -n!/|g;s|^|-n!/|;s|$|$$/|'`}
+ timeout-minutes: 40
env:
RUBY_TESTOPTS: "-q --tty=no"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
- - uses: k0kubun/action-slack@v2.0.0
+ TESTS: ${{ matrix.test_task == 'check' && matrix.skipped_tests || '' }}
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ PRECHECK_BUNDLED_GEMS: "no"
+ - name: make skipped tests
+ run: |
+ $SETARCH make -s test-all TESTS=`echo "$TESTS" | sed 's| |$$/ -n/|g;s|^|-n/|;s|$|$$/|'`
+ env:
+ GNUMAKEFLAGS: ""
+ RUBY_TESTOPTS: "-v --tty=no"
+ TESTS: ${{ matrix.skipped_tests }}
+ if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }}
+ continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
with:
payload: |
{
- "attachments": [{
- "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
- "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
- "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
- "color": "danger"
- }]
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
}
env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- if: failure() && github.event_name == 'push'
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml
new file mode 100644
index 0000000000..27920b5821
--- /dev/null
+++ b/.github/workflows/wasm.yml
@@ -0,0 +1,146 @@
+name: WebAssembly
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions: # added using https://github.com/step-security/secure-workflows
+ contents: read
+
+jobs:
+ make:
+ strategy:
+ matrix:
+ entry:
+# # wasmtime can't compile non-optimized Asyncified binary due to locals explosion
+# - { name: O0-debuginfo, optflags: "-O0", debugflags: "-g", wasmoptflags: "-O1" }
+# - { name: O1, optflags: "-O1", debugflags: "" , wasmoptflags: "-O1" }
+ - { name: O2, optflags: "-O2", debugflags: "" , wasmoptflags: "-O2" }
+# - { name: O3, optflags: "-O3", debugflags: "" , wasmoptflags: "-O3" }
+# # -O4 is equivalent to -O3 in clang, but it's different in wasm-opt
+# - { name: O4, optflags: "-O3", debugflags: "" , wasmoptflags: "-O4" }
+# - { name: Oz, optflags: "-Oz", debugflags: "" , wasmoptflags: "-Oz" }
+ fail-fast: false
+ env:
+ RUBY_TESTOPTS: '-q --tty=no'
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ WASI_SDK_VERSION_MAJOR: 14
+ WASI_SDK_VERSION_MINOR: 0
+ BINARYEN_VERSION: 109
+ WASMTIME_VERSION: v0.33.0
+ runs-on: ubuntu-22.04
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ steps:
+ - run: mkdir build
+ working-directory:
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - name: Install libraries
+ run: |
+ set -ex
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y ruby bison make autoconf git wget
+
+ wasi_sdk_deb="wasi-sdk_${WASI_SDK_VERSION_MAJOR}.${WASI_SDK_VERSION_MINOR}_amd64.deb"
+ wget "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION_MAJOR}/${wasi_sdk_deb}"
+ sudo dpkg -i "$wasi_sdk_deb"
+ rm -f "$wasi_sdk_deb"
+
+ mkdir build-sdk
+ pushd build-sdk
+
+ wasmtime_url="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz"
+ wget -O - "$wasmtime_url" | tar xJf -
+ sudo ln -fs "$PWD/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" /usr/local/bin/wasmtime
+
+ binaryen_tarball="binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz"
+ binaryen_url="https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/${binaryen_tarball}"
+ wget -O - "$binaryen_url" | tar xfz -
+ sudo ln -fs "$PWD/binaryen-version_${BINARYEN_VERSION}/bin/wasm-opt" /usr/local/bin/wasm-opt
+ working-directory: src
+ - name: Set ENV
+ run: |
+ echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
+ echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
+ - run: ./autogen.sh
+ working-directory: src
+
+ - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0
+ with:
+ ruby-version: '3.0'
+ bundler: none
+
+ - name: Download config.guess with wasi version
+ run: |
+ rm tool/config.guess tool/config.sub
+ ruby tool/downloader.rb -d tool -e gnu config.guess config.sub
+ working-directory: src
+
+ - name: Run configure
+ run: |
+ ../src/configure \
+ --host wasm32-unknown-wasi \
+ --with-static-linked-ext \
+ LDFLAGS=" \
+ -Xlinker --stack-first \
+ -Xlinker -z -Xlinker stack-size=16777216 \
+ " \
+ optflags="${{ matrix.entry.optflags }}" \
+ debugflags="${{ matrix.entry.debugflags }}" \
+ wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}"
+
+ # miniruby may not be built when cross-compling
+ - run: make mini ruby
+ - name: Run basictest
+ run: wasmtime run ./../build/miniruby --mapdir /::./ -- basictest/test.rb
+ working-directory: src
+ - name: Run bootstraptest (no thread)
+ run: |
+ NO_THREAD_TESTS="$(grep -L Thread -R ./bootstraptest | awk -F/ '{ print $NF }' | uniq | sed -n 's/test_\(.*\).rb/\1/p' | paste -s -d, -)"
+ ruby ./bootstraptest/runner.rb --ruby="$(which wasmtime) run $PWD/../build/ruby --mapdir /::./ -- " --verbose "--sets=$NO_THREAD_TESTS"
+ working-directory: src
+
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.name }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 09e588784c..c2bd4881c2 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,90 +1,149 @@
name: Windows
on:
push:
- branches:
- - master
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
pull_request:
- branches:
- - '*'
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
jobs:
make:
strategy:
matrix:
- test_task: [test]
- os: [windows-2019]
- vs: [2019]
+ include:
+ - vs: 2022
+ vcvers: -vcvars_ver=14.2
fail-fast: false
- runs-on: ${{ matrix.os }}
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ runs-on: windows-${{ matrix.vs }}
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ name: VisualStudio ${{ matrix.vs }}
+ env:
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ PATCH: C:\msys64\usr\bin\patch.exe
+ OS_VER: windows-${{ matrix.vs }}
steps:
- - uses: actions/cache@v1
+ - run: md build
+ working-directory:
+ - uses: msys2/setup-msys2@61f9e5e925871ba6c9e3e8da24ede83ea27fa91f # v2.27.0
+ id: setup-msys2
with:
- path: C:\vcpkg\downloads
- key: ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-${{ github.sha }}
+ update: true
+ install: bison patch
+ - name: patch path
+ shell: msys2 {0}
+ run: echo PATCH=$(cygpath -wa $(command -v patch)) >> $GITHUB_ENV
+ if: ${{ steps.setup-msys2.outcome == 'success' }}
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: C:\vcpkg\installed
+ key: ${{ runner.os }}-vcpkg-installed-windows-${{ matrix.vs }}-${{ github.sha }}
restore-keys: |
- ${{ runner.os }}-vcpkg-download-${{ matrix.os }}-
- ${{ runner.os }}-vcpkg-download-
+ ${{ runner.os }}-vcpkg-installed-windows-${{ matrix.vs }}-
+ ${{ runner.os }}-vcpkg-installed-windows-
- name: Install libraries with vcpkg
run: |
- vcpkg --triplet x64-windows install readline zlib
- - uses: actions/cache@v1
- with:
- path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
- key: ${{ runner.os }}-chocolatey-${{ matrix.os }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-chocolatey-${{ matrix.os }}-
- ${{ runner.os }}-chocolatey-
- - name: Install libraries with chocolatey
+ iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
+ Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
+ scoop install cmake@3.31.6
+ vcpkg --triplet x64-windows install libffi libyaml openssl readline zlib
+ shell:
+ pwsh
+ - name: git config
run: |
- choco install --no-progress openssl winflexbison3
- # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- - name: Checkout ruby/ruby
+ git config --global core.autocrlf false
+ git config --global core.eol lf
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
+ - name: setup env
+ # %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
+ # https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
+ # msys2/setup-msys2 installs MSYS2 to D:/a/_temp/msys64/usr/bin
run: |
- git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src
- git -C src reset --hard ${{ github.sha }}
- if: github.event_name == 'push'
- - name: Checkout a pull request
+ set Path=D:/a/_temp/msys64/usr/bin;%Path%
+ if not "%VCVARS%" == "" goto :vcset
+ set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ :vcset
+ set | C:\msys64\usr\bin\sort > old.env
+ call %VCVARS% ${{ matrix.vcvers || ''}}
+ set TMP=%USERPROFILE%\AppData\Local\Temp
+ set TEMP=%USERPROFILE%\AppData\Local\Temp
+ set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
+ set | C:\msys64\usr\bin\sort > new.env
+ C:\msys64\usr\bin\comm -13 old.env new.env >> %GITHUB_ENV%
+ del *.env
+ - name: compiler version
+ run: cl
+ - name: link libraries
run: |
- git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
- git -C src reset --hard ${{ github.event.pull_request.head.sha }}
- if: github.event_name == 'pull_request'
- - run: ./src/tool/actions-commit-info.sh
- shell: bash
- id: commit_info
+ for %%I in (C:\vcpkg\installed\x64-windows\bin\*.dll) do (
+ if not %%~nI == readline mklink %%~nxI %%I
+ )
+ for %%I in (libcrypto-1_1-x64 libssl-1_1-x64) do (
+ ren c:\Windows\System32\%%I.dll %%I.dll_
+ )
- name: Configure
- run: |
- md build
- cd build
- call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- ../src/win32/configure.bat --disable-install-doc --without-ext=+,dbm,gdbm --enable-bundled-libffi --with-opt-dir=C:/vcpkg/installed/x64-windows --with-openssl-dir="C:/Program Files/OpenSSL-Win64"
- shell: cmd
- - name: nmake
- run: |
- call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- set YACC=win_bison
- cd build
- echo on
- nmake up
- nmake extract-gems
- nmake
- shell: cmd
- - name: nmake test
- run: |
- call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- cd build
- nmake ${{ matrix.test_task }}
- shell: cmd
- - uses: k0kubun/action-slack@v2.0.0
+ run: >-
+ ../src/win32/configure.bat --disable-install-doc
+ --with-opt-dir=C:/vcpkg/installed/x64-windows
+ - run: nmake incs
+ - run: nmake extract-extlibs
+ - run: nmake
+ env:
+ YACC: bison.exe
+ - run: nmake test
+ timeout-minutes: 5
+ - run: nmake test-spec
+ timeout-minutes: 10
+ - run: nmake test-all
+ env:
+ RUBY_TESTOPTS: -j${{env.TEST_JOBS}} --job-status=normal
+ timeout-minutes: 60
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
with:
payload: |
{
- "attachments": [{
- "text": "${{ job.status }}: ${{ matrix.os }} / ${{ matrix.test_task }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ steps.commit_info.outputs.COMMIT_DATE }} #${{ steps.commit_info.outputs.COMMIT_NUMBER_OF_DAY }}> " +
- "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
- "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
- "color": "danger"
- }]
+ "ci": "GitHub Actions",
+ "env": "VS${{ matrix.vs }} / ${{ matrix.test_task || 'check' }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
}
env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- if: failure() && github.event_name == 'push'
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
+ shell: cmd
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
new file mode 100644
index 0000000000..0b7b9046e9
--- /dev/null
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -0,0 +1,170 @@
+name: YJIT Ubuntu
+on:
+ push:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ pull_request:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+ merge_group:
+ paths-ignore:
+ - 'doc/**'
+ - '**/man'
+ - '**.md'
+ - '**.rdoc'
+ - '**/.document'
+
+concurrency:
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
+
+permissions:
+ contents: read
+
+jobs:
+ cargo:
+ name: Rust cargo test
+ # GitHub Action's image seems to already contain a Rust 1.58.0.
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ # For now we can't run cargo test --offline because it complains about the
+ # capstone dependency, even though the dependency is optional
+ #- run: cargo test --offline
+ - run: RUST_BACKTRACE=1 cargo test
+ working-directory: yjit
+ # Also compile and test with all features enabled
+ - run: RUST_BACKTRACE=1 cargo test --all-features
+ working-directory: yjit
+ # Check that we can build in release mode too
+ - run: cargo build --release
+ working-directory: yjit
+ make:
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - test_task: 'yjit-bindgen'
+ hint: 'To fix: use patch in logs'
+ configure: '--with-gcc=clang-14 --enable-yjit=dev'
+ libclang_path: '/usr/lib/llvm-14/lib/libclang.so.1'
+
+ - test_task: "check"
+ # YJIT should be automatically built in release mode on x86-64 Linux with rustc present
+ #configure: "--enable-yjit RUSTC='rustc +1.58.0'"
+ configure: "RUSTC='rustc +1.58.0'"
+ rust_version: "1.58.0"
+
+ - test_task: "check"
+ configure: "--enable-yjit=dev"
+
+ - test_task: "check"
+ configure: "--enable-yjit=dev"
+ yjit_opts: "--yjit-call-threshold=1 --yjit-verify-ctx"
+
+ - test_task: "test-all TESTS=--repeat-count=2"
+ configure: "--enable-yjit=dev"
+
+ - test_task: "test-bundled-gems"
+ configure: "--enable-yjit=dev"
+
+ - test_task: "yjit-bench"
+ configure: "--enable-yjit=dev"
+ yjit_bench_opts: "--yjit-stats"
+ env:
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ RUN_OPTS: ${{ matrix.yjit_opts }}
+ YJIT_BENCH_OPTS: ${{ matrix.yjit_bench_opts }}
+ RUBY_DEBUG: ci
+ BUNDLE_JOBS: 8 # for yjit-bench
+ runs-on: ubuntu-22.04
+ if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
+ steps:
+ - run: mkdir build
+ working-directory:
+ - name: Install libraries
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
+ - name: Install Rust
+ if: ${{ matrix.rust_version }}
+ run: rustup install ${{ matrix.rust_version }} --profile minimal
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ path: src
+ - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
+ - name: Fixed world writable dirs
+ run: |
+ chmod -v go-w $HOME $HOME/.config
+ sudo chmod -R go-w /usr/share
+ sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
+ - name: Set ENV
+ run: |
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - run: ./autogen.sh
+ working-directory: src
+ - name: Run configure
+ run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install ${{ matrix.configure }}
+ - run: make incs
+ - run: make prepare-gems
+ if: ${{ matrix.test_task == 'test-bundled-gems' }}
+ - run: make -j
+ - run: make leaked-globals
+ if: ${{ matrix.test_task == 'check' }}
+ - name: Create dummy files in build dir
+ run: |
+ ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
+ if: ${{ matrix.test_task == 'check' }}
+ - name: Enable YJIT through ENV
+ run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV
+ # Check that the binary was built with YJIT
+ - name: Check YJIT enabled
+ run: ./miniruby --yjit -v | grep "+YJIT"
+ - name: make ${{ matrix.test_task }}
+ run: make -s -j ${{ matrix.test_task }} RUN_OPTS="$RUN_OPTS" YJIT_BENCH_OPTS="$YJIT_BENCH_OPTS"
+ timeout-minutes: 60
+ env:
+ RUBY_TESTOPTS: "-q --tty=no"
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ PRECHECK_BUNDLED_GEMS: "no"
+ LIBCLANG_PATH: ${{ matrix.libclang_path }}
+ continue-on-error: ${{ matrix.test_task == 'yjit-bench' }}
+ - name: Show ${{ github.event.pull_request.base.ref }} GitHub URL for yjit-bench comparison
+ run: echo "https://github.com/${BASE_REPO}/commit/${BASE_SHA}"
+ env:
+ BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }}
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ if: ${{ matrix.test_task == 'yjit-bench' && startsWith(github.event_name, 'pull') }}
+ - uses: ruby/action-slack@0bd85c72233cdbb6a0fe01d37aaeff1d21b5fce1 # v3.2.1
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.test_task }} ${{ matrix.configure }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref_name }}"
+ }
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
+ if: ${{ failure() && github.event_name == 'push' }}
+
+defaults:
+ run:
+ working-directory: build
diff --git a/.gitignore b/.gitignore
index 487af950f3..99d32a1825 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,9 +10,11 @@
*.dylib
*.elc
*.i
+*.ii
*.inc
*.log
*.o
+*.o.tmp
*.obj
*.old
*.orig
@@ -24,10 +26,10 @@
*.sav
*.sl
*.so
+*.so.*
*.swp
*.yarb
*~
-.*-*
.*.list
.*.time
.DS_Store
@@ -38,6 +40,7 @@
.ppack
.svn
.time
+.ruby-version
Makefile
cygruby*.def
extconf.h
@@ -57,6 +60,8 @@ lcov*.info
/*.pc
/*.rc
/*_prelude.c
+/.downloaded-cache
+/.top-enc.mk
/build*/
/COPYING.LIB
/ChangeLog
@@ -117,14 +122,17 @@ lcov*.info
/rename2.h
/repack
/revision.h
+/revision.tmp
/riscos
/rubicon
/ruby
/ruby-runner
/ruby-runner.h
/ruby-man.rd.gz
+/rubyspec_temp
/run.gdb
/sizes.c
+/static-ruby
/test.rb
/test-coverage.dat
/tmp
@@ -139,6 +147,8 @@ lcov*.info
/bin/*.exe
/bin/*.dll
+/bin/goruby
+/bin/ruby
# /benchmark/
/benchmark/bm_require.data
@@ -178,6 +188,9 @@ lcov*.info
/ext/-test-/win32/dln/dlntest.exp
/ext/-test-/win32/dln/dlntest.lib
+# /ext/-test-/gems
+/ext/-test-/gems
+
# /ext/etc/
/ext/etc/constdefs.h
@@ -190,6 +203,7 @@ lcov*.info
# /ext/ripper/
/ext/ripper/eventids1.c
+/ext/ripper/.eventids2-check
/ext/ripper/eventids2table.c
/ext/ripper/ripper.*
/ext/ripper/ids1
@@ -209,6 +223,9 @@ lcov*.info
/lib/ruby/[1-9]*.*
/lib/ruby/vendor_ruby
+# /misc/
+/misc/**/__pycache__
+
# /spec/bundler
/.rspec_status
@@ -220,6 +237,14 @@ lcov*.info
/win32/*.ico
# MJIT
-/rb_mjit_header.h
-/mjit_config.h
/include/ruby-*/*/rb_mjit_min_header-*.h
+/lib/ruby_vm/mjit/instruction.rb
+/mjit_config.h
+/rb_mjit_header.h
+
+# YJIT
+/yjit-bench
+/yjit_exit_locations.dump
+
+# /wasm/
+/wasm/tests/*.wasm
diff --git a/.indent.pro b/.indent.pro
new file mode 100644
index 0000000000..1d61cbcad1
--- /dev/null
+++ b/.indent.pro
@@ -0,0 +1,32 @@
+-bap
+-nbbb
+-nbc
+-br
+-brs
+-nbs
+-ncdb
+-nce
+-cdw
+-cli2
+-cbi2
+-ndj
+-ncs
+-nfc1
+-i4
+-l120
+-lp
+-npcs
+-psl
+-sc
+-sob
+-sbi4
+-nut
+-par
+
+-TID
+-TVALUE
+-Tst_data_t
+-Tst_index_t
+-Tst_table
+-Trb_data_type_t
+-TFILE
diff --git a/.rdoc_options b/.rdoc_options
new file mode 100644
index 0000000000..760507c7a2
--- /dev/null
+++ b/.rdoc_options
@@ -0,0 +1,4 @@
+---
+page_dir: doc
+main_page: README.md
+title: Documentation for Ruby development version
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 71945e349e..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,550 +0,0 @@
-# -*- YAML -*-
-# Copyright (C) 2011 Urabe, Shyouhei. All rights reserved.
-#
-# This file is a part of the programming language Ruby. Permission is hereby
-# granted, to either redistribute or modify this file, provided that the
-# conditions mentioned in the file COPYING are met. Consult the file for
-# details.
-
-# This is a Travis-CI build configuration file. The list of configurations
-# available is located in
-#
-# http://about.travis-ci.org/docs/user/build-configuration/
-#
-# and as Ruby itself is a project written in C language,
-#
-# http://about.travis-ci.org/docs/user/languages/c/
-#
-# is also a good place to look at.
-
-language: c
-
-os: linux
-
-dist: xenial
-
-git:
- quiet: true
-
-cache:
- ccache: true
- directories:
- - $HOME/config_2nd
- - $HOME/.downloaded-cache
-
-env:
- global:
- # Reset timestamps early
- - _=$(touch NEWS && find . -type f -exec touch -r NEWS {} +)
- - CONFIGURE_TTY=no
- - CCACHE_COMPILERCHECK=none
- - CCACHE_NOCOMPRESS=1
- - CCACHE_MAXSIZE=512Mi
- - NPROC="`nproc`"
- # JOBS and SETARCH are overridden when necessary; see below.
- - JOBS=-j$((1+${NPROC}))
- - SETARCH=
- - RUBY_PREFIX=/tmp/ruby-prefix
- - GEMS_FOR_TEST='timezone tzinfo'
- - UPDATE_UNICODE="UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
- # https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
- - travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
- - travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
-
-.org.ruby-lang.ci.matrix-definitions:
-
- - &cron-only
- if: (type = cron) AND (branch = master) AND (fork = false)
-
- - &make-test-only
- script:
- - $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
-
- - &gcc-8
- compiler: gcc-8
- # # Not using addon to control retries
- # addons:
- # apt:
- # sources:
- # - ubuntu-toolchain-r-test
- before_install:
- - tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
- - |-
- ${BEFORE_INSTALL}
- tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
- ccache \
- gcc-8 \
- g++-8 \
- libffi-dev \
- libgdbm-dev \
- libgmp-dev \
- libjemalloc-dev \
- libncurses5-dev \
- libncursesw5-dev \
- libreadline6-dev \
- libssl-dev \
- libyaml-dev \
- openssl \
- valgrind \
- zlib1g-dev
-
- - &clang-8
- compiler: clang-8
- addons:
- apt:
- # Not doing this manually unlike other sources, because it has been stable.
- sources:
- - llvm-toolchain-xenial-8
- config:
- retries: true
- before_install:
- - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
- - |-
- tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
- clang-8 \
- llvm-8-tools \
- libffi-dev \
- libgdbm-dev \
- libgmp-dev \
- libjemalloc-dev \
- libncurses5-dev \
- libncursesw5-dev \
- libreadline6-dev \
- libssl-dev \
- libyaml-dev \
- openssl \
- valgrind \
- zlib1g-dev
-
- # --------
-
- - &x86_64-linux
- name: x86_64-linux
- <<: *gcc-8
-
- - &arm64-linux
- name: arm64-linux
- arch: arm64
- <<: *gcc-8
-
- - &s390x-linux
- name: s390x-linux
- arch: s390x
- <<: *gcc-8
-
- - &jemalloc
- name: --with-jemalloc
- <<: *gcc-8
- <<: *cron-only
- env:
- - CONFIG_FLAG='--with-gmp --with-jemalloc --with-valgrind'
-
- - &assertions
- name: RUBY_DEBUG=1
- <<: *gcc-8
- #<<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cppflags='-DRUBY_DEBUG -DVM_CHECK_MODE=1 -DTRANSIENT_HEAP_CHECK_MODE -DRGENGC_CHECK_MODE -DENC_DEBUG'
-
- - &VM_CHECK_MODE
- name: VM_CHECK_MODE=3
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cppflags=-DVM_CHECK_MODE=0x0003
-
- - &SUPPORT_JOKE
- name: SUPPORT_JOKE
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - BEFORE_INSTALL="sed vm_opts.h -e 's/OPT_SUPPORT_JOKE *0/OPT_SUPPORT_JOKE 1/' -i"
-
- - &CPDEBUG
- name: CPDEBUG
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - cppflags=-DCPDEBUG
-
- - &WITH_COROUTINE_UCONTEXT
- name: COROUTINE=ucontext
- <<: *gcc-8
- <<: *cron-only
- env:
- - CONFIG_FLAG='--with-coroutine=ucontext'
-
- - &WITH_COROUTINE_COPY
- name: COROUTINE=copy
- <<: *gcc-8
- <<: *cron-only
- env:
- - CONFIG_FLAG='--with-coroutine=copy'
-
- - &TOKEN_THREADED_CODE
- name: TOKEN_THREADED_CODE
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cppflags=-DOPT_THREADED_CODE=1
-
- - &CALL_THREADED_CODE
- name: CALL_THREADED_CODE
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cppflags=-DOPT_THREADED_CODE=2
-
- - &NO_THREADED_CODE
- name: NO_THREADED_CODE
- <<: *gcc-8
- <<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cppflags=-DOPT_THREADED_CODE=3
-
- - &ASAN
- name: -fsanitize=address
- <<: *clang-8
- #<<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - ASAN_OPTIONS=detect_leaks=0
- - cflags='-U_FORTIFY_SOURCE -march=native -fsanitize=address -fno-omit-frame-pointer -fPIC'
- - debugflags=-ggdb3
- - optflags=-O1
- - LD=clang-8
- - LDFLAGS='-fsanitize=address -fPIC'
- - CONFIG_FLAG='--with-out-ext=openssl --without-gmp --without-jemalloc --without-valgrind'
-
- - &MSAN
- name: -fsanitize=memory
- <<: *clang-8
- #<<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cflags='-U_FORTIFY_SOURCE -fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -fPIC'
- - optflags=-O1
- - LD=clang-8
- - LDFLAGS='-fsanitize=memory -fPIC'
- - CONFIG_FLAG='--with-out-ext=openssl --without-gmp --without-jemalloc --without-valgrind'
-
- - &UBSAN
- name: -fsanitize=undefined
- <<: *clang-8
- #<<: *cron-only
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - cflags='-U_FORTIFY_SOURCE -fsanitize=undefined,integer,nullability -fno-sanitize=implicit-integer-sign-change,unsigned-integer-overflow'
- - cppflags=-DUNALIGNED_WORD_ACCESS=0
- - debugflags=-ggdb3
- - optflags='-O1 -march=native'
- - LD=clang-8
- - LDFLAGS='-fsanitize=undefined,integer,nullability -fno-sanitize=implicit-integer-sign-change,unsigned-integer-overflow'
-
- - &i686-linux
- name: i686-linux
- compiler: gcc-8
- env:
- - GCC_FLAGS=-m32
- - CXX='g++-8 -m32'
- - debugflags=-g0
- - SETARCH='setarch i686 --verbose --3gb'
- # # Not using addon to control retries
- # addons:
- # apt:
- # sources:
- # - ubuntu-toolchain-r-test
- before_install:
- - tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
- - |-
- tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
- gcc-8-multilib \
- g++-8 \
- g++-8-multilib \
- libstdc++-8-dev:i386 \
- libffi-dev:i386 \
- libffi6:i386 \
- libgdbm-dev:i386 \
- libgdbm3:i386 \
- libncurses5-dev:i386 \
- libncurses5:i386 \
- libncursesw5-dev:i386 \
- libreadline6-dev:i386 \
- libreadline6:i386 \
- libssl-dev:i386 \
- libssl1.0.0:i386 \
- linux-libc-dev:i386 \
- zlib1g-dev:i386 \
- zlib1g:i386
-
- - &arm32-linux
- name: arm32-linux
- arch: arm64
- # https://packages.ubuntu.com/xenial/crossbuild-essential-armhf
- compiler: arm-linux-gnueabihf-gcc
- env:
- - debugflags=-g0
- - SETARCH='setarch linux32 --verbose --32bit'
- before_install:
- - sudo dpkg --add-architecture armhf
- - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
- - |-
- tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
- ccache \
- crossbuild-essential-armhf \
- libc6:armhf \
- libstdc++-5-dev:armhf \
- libffi-dev:armhf \
- libffi6:armhf \
- libgdbm-dev:armhf \
- libgdbm3:armhf \
- libncurses5-dev:armhf \
- libncurses5:armhf \
- libncursesw5-dev:armhf \
- libreadline6-dev:armhf \
- libreadline6:armhf \
- libssl-dev:armhf \
- libssl1.0.0:armhf \
- linux-libc-dev:armhf \
- zlib1g-dev:armhf \
- zlib1g:armhf
-
- - &pedanticism
- name: -std=c99 -pedantic
- compiler: clang
- <<: *make-test-only
- env:
- - GEMS_FOR_TEST=
- - GCC_FLAGS='-std=c99 -Werror=pedantic -pedantic-errors'
- - CONFIG_FLAG=
- - JOBS=
- - >-
- warnflags='
- -Wall
- -Wextra
- -Werror=deprecated-declarations
- -Werror=division-by-zero
- -Werror=extra-tokens
- -Werror=implicit-function-declaration
- -Werror=implicit-int
- -Werror=pointer-arith
- -Werror=shorten-64-to-32
- -Werror=write-strings
- -Wmissing-noreturn
- -Wno-constant-logical-operand
- -Wno-missing-field-initializers
- -Wno-overlength-strings
- -Wno-parentheses-equality
- -Wno-self-assign
- -Wno-tautological-compare
- -Wno-unused-local-typedef
- -Wno-unused-parameter
- -Wunused-variable'
- - LDFLAGS=-Wno-unused-command-line-argument
-
- - &rubyspec
- name: Check ruby/spec version guards on Ruby 2.4
- language: ruby
- rvm: 2.4.6
- before_install:
- install:
- before_script: chmod -R u+w spec/ruby
- # -j randomly hangs.
- script: ruby -C spec/ruby ../mspec/bin/mspec .
- after_failure:
- - echo "ruby/spec failed on Ruby 2.4. This is likely because of a missing ruby_version_is guard, please add it. See spec/README.md."
-
- - &baseruby
- name: "BASERUBY: Ruby 2.2"
- <<: *gcc-8
- <<: *make-test-only
- language: ruby
- rvm: 2.2
-
- - &dependency
- name: Check dependencies in makefiles
- language: ruby
- before_install:
- install:
- before_script:
- - |-
- ruby -e 'new = []
- Dir.glob("ext/**/extconf.rb") {|ex|
- unless File.exist?(dep = File.dirname(ex)+"/depend")
- puts "Adding "+dep
- File.copy_stream("template/depend.tmpl", dep)
- new << dep
- end
- }
- exec("git", "add", *new) unless new.empty?'
- - git diff --cached
- - "> config.status"
- - "> .rbconfig.time"
- - sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
- - make touch-unicode-files
- - make -s $JOBS $UPDATE_UNICODE up
- - make -s $JOBS srcs
- - rm -f config.status Makefile rbconfig.rb .rbconfig.time
- - $SETARCH ./configure -C --disable-install-doc --prefix=$RUBY_PREFIX --disable-rubygems 'optflags=-O0' 'debugflags=-save-temps=obj -g'
- - ruby tool/update-deps --fix
- script:
- - git diff --no-ext-diff --ignore-submodules --exit-code
- after_failure:
- - echo "Dependencies need to update"
- env:
- - CONFIG_FLAG=
-
-matrix:
- include:
- # Build every commit:
- - <<: *x86_64-linux
- - <<: *arm64-linux
- - <<: *i686-linux
- - <<: *arm32-linux
- - <<: *s390x-linux
- - <<: *pedanticism
- - <<: *assertions
- - <<: *baseruby
- - <<: *rubyspec
- - <<: *dependency
- # Build every commit (Allowed Failures):
- - <<: *ASAN
- - <<: *MSAN
- - <<: *UBSAN
- # Cron only:
- - <<: *jemalloc
- - <<: *VM_CHECK_MODE
- - <<: *SUPPORT_JOKE
- - <<: *CPDEBUG
- - <<: *WITH_COROUTINE_UCONTEXT
- - <<: *WITH_COROUTINE_COPY
- - <<: *TOKEN_THREADED_CODE
- - <<: *CALL_THREADED_CODE
- - <<: *NO_THREADED_CODE
- allow_failures:
- - name: s390x-linux
- - name: -fsanitize=address
- - name: -fsanitize=memory
- - name: -fsanitize=undefined
- fast_finish: true
-
-before_script:
- - date # Debugging "Permission defined" failure on darwin like https://travis-ci.org/ruby/ruby/jobs/508683759
- - dpkg --print-architecture
- - dpkg --print-foreign-architectures
- - setarch --list
- - echo JOBS=${JOBS} SETARCH=${SETARCH}
- - $SETARCH uname -a
- - $SETARCH uname -r
- - rm -fr .ext autom4te.cache
- - echo $TERM
- - |-
- [ -d ~/.downloaded-cache ] ||
- mkdir ~/.downloaded-cache
- - ln -s ~/.downloaded-cache
- - "> config.status"
- - "> .rbconfig.time"
- - sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
- - date; make touch-unicode-files
- - date; make -s $JOBS $UPDATE_UNICODE up
- - date; make -s $JOBS srcs
- - rm -f config.status Makefile rbconfig.rb .rbconfig.time
- - |-
- if [ -d ~/config_2nd ]; then
- cp -pr ~/config_2nd build
- else
- mkdir build
- fi
- - mkdir config_1st config_2nd
- - chmod -R a-w .
- - chmod -R u+w build config_1st config_2nd
- - cd build
- - ccache --show-stats
- - |-
- case "$CC" in
- gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";;
- clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";;
- esac
- - |-
- [ ! -f config.cache ] ||
- [ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
- (set -x; exec rm config.cache)
- - $SETARCH ../configure -C --disable-install-doc --prefix=$RUBY_PREFIX $CONFIG_FLAG
- - cp -pr config.cache config.status .ext/include ../config_1st
- - $SETARCH make reconfig
- - cp -pr config.cache config.status .ext/include ../config_2nd
- - (cd .. && exec diff -ru config_1st config_2nd)
- - chmod u+w ..
- - rm -rf ~/config_2nd
- - mv ../config_2nd ~
- - chmod u-w ..
- - $SETARCH make -s $JOBS
- - |-
- date; : # Debugging "Permission defined" failure on darwin like https://travis-ci.org/ruby/ruby/jobs/508683759
- if ! make install; then
- if [ "$(uname)" = Darwin ]; then
- # Debugging "Permission defined" failure on darwin like https://travis-ci.org/ruby/ruby/jobs/508683759
- set -x
- date
- ./miniruby -e 'ARGV.map{|path|[path,File.stat(path)]}.sort_by{|path,st|st.mtime}.each{|path,st|p mtime:st.mtime.to_f, ctime:st.ctime.to_f, path:path}' .ext/.timestamp/.RUBYCOMMONDIR*time .ext/common/bigdecimal/*.rb ../ext/bigdecimal/lib/bigdecimal/*.rb . .. .ext .ext/common .ext/common/bigdecimal ext/bigdecimal ../ext ../ext/bigdecimal ../ext/bigdecimal/lib ../ext/bigdecimal/lib/bigdecimal
- make COPY='cp -f' install
- else
- exit 1
- fi
- fi
- - ccache --show-stats
- - |-
- [ -z "${GEMS_FOR_TEST}" ] ||
- $RUBY_PREFIX/bin/gem install --no-document $GEMS_FOR_TEST
- - echo "raise 'do not load ~/.irbrc in test'" > ~/.irbrc
-
-script:
- - $SETARCH make -s test -o showflags TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
- - travis_wait 50 $SETARCH make -s test-all -o exts TESTOPTS="${TESTOPTS} ${TEST_ALL_OPTS}" RUBYOPT="-w"
- - $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
- - $SETARCH make -s -o showflags leaked-globals
-
-# Branch matrix. Not all branches are Travis-ready so we limit branches here.
-branches:
- only:
- - master
- - ruby_2_4
- - ruby_2_5
- - ruby_2_6
-
-# We want to be notified when something happens.
-notifications:
- irc:
- channels:
- - "chat.freenode.net#ruby-core"
- on_success: change # [always|never|change] # default: always
- on_failure: always # [always|never|change] # default: always
- template:
- - "%{message} by @%{author}: See %{build_url}"
-
- slack:
- rooms:
- - secure: ah7UEHBvncXT7bM5mvYIQAO+tIyV/wl7nXLb7wQD16dO2v8Gragy0mWjB79Q09hrrMGmp6H9bCDpdGS80boIA5EHaHoG4QaP0i9bsSt8U2AMWgZtfyIgQKJ4H2kXkGlrjO+AXTgnIkP7LNjdgAVUUTGQPb26T3QmoN2Splt+fIQ= # ruby:<token>#alerts
- on_pull_requests: false
- on_success: change
- on_failure: always
-
- email:
- - ko1c-failure@atdot.net
diff --git a/BSDL b/BSDL
index a009caefea..66d93598aa 100644
--- a/BSDL
+++ b/BSDL
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
+ notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ffdf2dd4b8..13df6087ca 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,4 +1 @@
-Please see the [official issue tracker] and wiki [HowToContribute].
-
-[official issue tracker]: https://bugs.ruby-lang.org
-[HowToContribute]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute
+See ["Contributing to Ruby"](https://docs.ruby-lang.org/en/master/contributing_md.html), which includes setup and build instructions.
diff --git a/LEGAL b/LEGAL
index 565c4c9cde..0423d57ac9 100644
--- a/LEGAL
+++ b/LEGAL
@@ -7,92 +7,118 @@ All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.
-ccan/build_assert/build_assert.h::
-ccan/check_type/check_type.h::
-ccan/container_of/container_of.h::
-ccan/str/str.h::
+[addr2line.c]
- These files are licensed under the CC0.
+ A part of this file is from FreeBSD.
>>>
- https://creativecommons.org/choose/zero/
+ Copyright (c) 1986, 1988, 1991, 1993::
+ The Regents of the University of California. All rights reserved.
-ccan/list/list.h::
+ (c) UNIX System Laboratories, Inc.
- This file is licensed under the MIT License.
+ All or some portions of this file are derived from material licensed
+ to the University of California by American Telephone and Telegraph
+ Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ the permission of UNIX System Laboratories, Inc.
- >>>
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-include/ruby/onigmo.h::
-include/ruby/oniguruma.h::
-regcomp.c::
-regenc.c::
-regenc.h::
-regerror.c::
-regexec.c::
-regint.h::
-regparse.c::
-regparse.h::
-enc/ascii.c::
-enc/big5.c::
-enc/cp949.c::
-enc/emacs_mule.c::
-enc/encdb.c::
-enc/euc_jp.c::
-enc/euc_kr.c::
-enc/euc_tw.c::
-enc/gb18030.c::
-enc/gb2312.c::
-enc/gbk.c::
-enc/iso_8859_1.c::
-enc/iso_8859_10.c::
-enc/iso_8859_11.c::
-enc/iso_8859_13.c::
-enc/iso_8859_14.c::
-enc/iso_8859_15.c::
-enc/iso_8859_16.c::
-enc/iso_8859_2.c::
-enc/iso_8859_3.c::
-enc/iso_8859_4.c::
-enc/iso_8859_5.c::
-enc/iso_8859_6.c::
-enc/iso_8859_7.c::
-enc/iso_8859_8.c::
-enc/iso_8859_9.c::
-enc/koi8_r.c::
-enc/koi8_u.c::
-enc/shift_jis.c::
-enc/unicode.c::
-enc/us_ascii.c::
-enc/utf_16be.c::
-enc/utf_16le.c::
-enc/utf_32be.c::
-enc/utf_32le.c::
-enc/utf_8.c::
-enc/windows_1251.c::
+ @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
+
+
+[ccan/build_assert/build_assert.h]
+[ccan/check_type/check_type.h]
+[ccan/container_of/container_of.h]
+[ccan/str/str.h]
+
+ These files are licensed under the {CC0}[https://creativecommons.org/choose/zero/].
+
+[ccan/list/list.h]
+
+ This file is licensed under the {MIT License}[rdoc-label:label-MIT+License].
+
+[coroutine]
+
+ Unless otherwise specified, these files are licensed under the
+ {MIT License}[rdoc-label:label-MIT+License].
+
+[include/ruby/onigmo.h]
+[include/ruby/oniguruma.h]
+[regcomp.c]
+[regenc.c]
+[regenc.h]
+[regerror.c]
+[regexec.c]
+[regint.h]
+[regparse.c]
+[regparse.h]
+[enc/ascii.c]
+[enc/big5.c]
+[enc/cp949.c]
+[enc/emacs_mule.c]
+[enc/encdb.c]
+[enc/euc_jp.c]
+[enc/euc_kr.c]
+[enc/euc_tw.c]
+[enc/gb18030.c]
+[enc/gb2312.c]
+[enc/gbk.c]
+[enc/iso_8859_1.c]
+[enc/iso_8859_10.c]
+[enc/iso_8859_11.c]
+[enc/iso_8859_13.c]
+[enc/iso_8859_14.c]
+[enc/iso_8859_15.c]
+[enc/iso_8859_16.c]
+[enc/iso_8859_2.c]
+[enc/iso_8859_3.c]
+[enc/iso_8859_4.c]
+[enc/iso_8859_5.c]
+[enc/iso_8859_6.c]
+[enc/iso_8859_7.c]
+[enc/iso_8859_8.c]
+[enc/iso_8859_9.c]
+[enc/koi8_r.c]
+[enc/koi8_u.c]
+[enc/shift_jis.c]
+[enc/unicode.c]
+[enc/us_ascii.c]
+[enc/utf_16be.c]
+[enc/utf_16le.c]
+[enc/utf_32be.c]
+[enc/utf_32le.c]
+[enc/utf_8.c]
+[enc/windows_1251.c]
+[enc/windows_31j.c]
Onigmo (Oniguruma-mod) LICENSE
>>>
- Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
- Copyright (c) 2011-2014 K.Takata <kentkt AT csc DOT jp>
+ Copyright (c) 2002-2009:: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ Copyright (c) 2011-2014:: K.Takata <kentkt AT csc DOT jp>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -119,7 +145,7 @@ enc/windows_1251.c::
Oniguruma LICENSE
>>>
- Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ Copyright (c) 2002-2009:: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -150,10 +176,69 @@ enc/windows_1251.c::
When this software is partly used or it is distributed with Ruby,
this of Ruby follows the license of Ruby.
-enc/trans/GB/GB12345%UCS.src::
-enc/trans/GB/UCS%GB12345.src::
-enc/trans/GB/GB2312%UCS.src::
-enc/trans/GB/UCS%GB2312.src::
+[enc/windows_1250.c]
+[enc/windows_1252.c]
+
+ >>>
+ Copyright (c) 2006-2007:: Byte <byte AT mail DOT kna DOT ru>
+ K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+[enc/cesu_8.c]
+[enc/windows_1253.c]
+[enc/windows_1254.c]
+[enc/windows_1257.c]
+
+ >>>
+ Copyright (c) 2002-2007:: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+[enc/trans/GB/GB12345%UCS.src]
+[enc/trans/GB/UCS%GB12345.src]
+[enc/trans/GB/GB2312%UCS.src]
+[enc/trans/GB/UCS%GB2312.src]
These files have this explanatory texts.
@@ -165,12 +250,12 @@ enc/trans/GB/UCS%GB2312.src::
files for any particular purpose, and has ceased to publish the files many
years ago.
-enc/trans/JIS/JISX0201-KANA%UCS.src::
-enc/trans/JIS/JISX0208\@1990%UCS.src::
-enc/trans/JIS/JISX0212%UCS.src::
-enc/trans/JIS/UCS%JISX0201-KANA.src::
-enc/trans/JIS/UCS%JISX0208@1990.src::
-enc/trans/JIS/UCS%JISX0212.src::
+[enc/trans/JIS/JISX0201-KANA%UCS.src]
+[enc/trans/JIS/JISX0208\@1990%UCS.src]
+[enc/trans/JIS/JISX0212%UCS.src]
+[enc/trans/JIS/UCS%JISX0201-KANA.src]
+[enc/trans/JIS/UCS%JISX0208@1990.src]
+[enc/trans/JIS/UCS%JISX0212.src]
These files are copyrighted as the following.
@@ -179,49 +264,64 @@ enc/trans/JIS/UCS%JISX0212.src::
For terms of use, see http://www.unicode.org/terms_of_use.html
-enc/trans/JIS/JISX0213-1%UCS@BMP.src::
-enc/trans/JIS/JISX0213-1%UCS@SIP.src::
-enc/trans/JIS/JISX0213-2%UCS@BMP.src::
-enc/trans/JIS/JISX0213-2%UCS@SIP.src::
+[enc/trans/JIS/JISX0213-1%UCS@BMP.src]
+[enc/trans/JIS/JISX0213-1%UCS@SIP.src]
+[enc/trans/JIS/JISX0213-2%UCS@BMP.src]
+[enc/trans/JIS/JISX0213-2%UCS@SIP.src]
These files are copyrighted as the following.
>>>
- Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.
- Copyright (C) 2001 I'O, All Rights Reserved.
- Copyright (C) 2006 Project X0213, All Rights Reserved.
+ Copyright (C) 2001:: earthian@tama.or.jp, All Rights Reserved.
+ Copyright (C) 2001:: I'O, All Rights Reserved.
+ Copyright (C) 2006:: Project X0213, All Rights Reserved.
You can use, modify, distribute this table freely.
-enc/trans/JIS/UCS@BMP%JISX0213-1.src::
-enc/trans/JIS/UCS@BMP%JISX0213-2.src::
-enc/trans/JIS/UCS@SIP%JISX0213-1.src::
-enc/trans/JIS/UCS@SIP%JISX0213-2.src::
+[enc/trans/JIS/UCS@BMP%JISX0213-1.src]
+[enc/trans/JIS/UCS@BMP%JISX0213-2.src]
+[enc/trans/JIS/UCS@SIP%JISX0213-1.src]
+[enc/trans/JIS/UCS@SIP%JISX0213-2.src]
These files are copyrighted as the following.
>>>
- Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.
- Copyright (C) 2001 I'O, All Rights Reserved.
+ Copyright (C) 2001:: earthian@tama.or.jp, All Rights Reserved.
+ Copyright (C) 2001:: I'O, All Rights Reserved.
You can use, modify, distribute this table freely.
-configure::
+[enc/trans/ucm/glibc-BIG5-2.3.3.ucm]
+[enc/trans/ucm/glibc-BIG5HKSCS-2.3.3.ucm]
+
+ >>>
+ Copyright (C) 2001-2005:: International Business Machines
+ Corporation and others. All Rights Reserved.
+
+[enc/trans/ucm/windows-950-2000.ucm]
+[enc/trans/ucm/windows-950_hkscs-2001.ucm]
+
+ >>>
+ Copyright (C) 2001-2002:: International Business Machines
+ Corporation and others. All Rights Reserved.
+
+
+[configure]
This file is free software.
>>>
- Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-1996, 1998-2012:: Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
-tool/config.guess::
-tool/config.sub::
+[tool/config.guess]
+[tool/config.sub]
As long as you distribute these files with the file configure, they
are covered under the Ruby's license.
>>>
- Copyright 1992-2018 Free Software Foundation, Inc.
+ Copyright 1992-2018:: Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
@@ -243,14 +343,43 @@ tool/config.sub::
program. This Exception is an additional permission under section 7
of the GNU General Public License, version 3 ("GPLv3").
-parse.c::
+[tool/lib/test/*]
+[tool/lib/core_assertions.rb]
+
+ Some of methods on these files are based on MiniTest 4. MiniTest 4 is
+ distributed under the MIT License.
+
+ >>>
+ Copyright (c) Ryan Davis, seattle.rb
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ 'Software'), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- This file is licensed under the GPL, but is incorporated into Ruby and
+[parse.c]
+[parse.h]
+
+ These files are licensed under the GPL, but are incorporated into Ruby and
redistributed under the terms of the Ruby license, as permitted by the
exception to the GPL below.
>>>
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018:: Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -278,12 +407,12 @@ parse.c::
This special exception was added by the Free Software Foundation in
version 2.2 of Bison.
-missing/dtoa.c::
+[missing/dtoa.c]
This file is under these licenses.
>>>
- Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+ Copyright (c) 1991, 2000, 2001:: by Lucent Technologies.
Permission to use, copy, modify, and distribute this software for any
purpose without fee is hereby granted, provided that this entire notice
@@ -297,8 +426,8 @@ missing/dtoa.c::
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
>>>
- Copyright (c) 2004-2008 David Schultz <das@FreeBSD.ORG>
- All rights reserved.
+ Copyright (c) 2004-2008:: David Schultz <das@FreeBSD.ORG>
+ All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -321,32 +450,34 @@ missing/dtoa.c::
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-win32/win32.{c,h}::
+[win32/win32.c]
+[include/ruby/win32.h]
You can apply the Artistic License to these files. (or GPL,
alternatively)
>>>
- Copyright (c) 1993, Intergraph Corporation
+ Copyright (c) 1993:: Intergraph Corporation
You may distribute under the terms of either the GNU General Public
License or the Artistic License, as specified in the perl README file.
-missing/mt19937.c::
+[missing/mt19937.c]
This file is under the new-style BSD license.
>>>
- A C-program for MT19937, with initialization improved 2002/2/10.
- Coded by Takuji Nishimura and Makoto Matsumoto.
+ A C-program for MT19937, with initialization improved 2002/2/10.::
+ Coded by Takuji Nishimura and Makoto Matsumoto.
+
This is a faster version by taking Shawn Cokus's optimization,
Matthe Bellew's simplification, Isaku Wada's real version.
Before using, initialize the state by using init_genrand(seed)
or init_by_array(init_key, key_length).
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- All rights reserved.
+ Copyright (C) 1997 - 2002:: Makoto Matsumoto and Takuji Nishimura,
+ All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -382,13 +513,13 @@ missing/mt19937.c::
The Wayback Machine url: http://web.archive.org/web/19990429082237/http://www.math.keio.ac.jp/matumoto/emt.html
-missing/procstat_vm.c::
+[missing/procstat_vm.c]
This file is under the new-style BSD license.
>>>
- Copyright (c) 2007 Robert N. M. Watson
- All rights reserved.
+ Copyright (c) 2007:: Robert N. M. Watson
+ All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -413,151 +544,65 @@ missing/procstat_vm.c::
$FreeBSD: head/usr.bin/procstat/procstat_vm.c 261780 2014-02-11 21:57:37Z jhb $
-vsnprintf.c::
+[vsnprintf.c]
- This file is under the old-style BSD license. Note that the
- paragraph 3 below is now null and void.
+ This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
>>>
- Copyright (c) 1990, 1993
+ Copyright (c) 1990, 1993::
The Regents of the University of California. All rights reserved.
This code is derived from software contributed to Berkeley by
Chris Torek.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- IMPORTANT NOTE:
- --------------
- From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
- paragraph 3 above is now null and void.
-
-st.c::
-strftime.c::
-include/ruby/st.h::
-missing/acosh.c::
-missing/alloca.c::
-missing/dup2.c::
-missing/erf.c::
-missing/finite.c::
-missing/hypot.c::
-missing/isinf.c::
-missing/isnan.c::
-missing/lgamma_r.c::
-missing/memcmp.c::
-missing/memmove.c::
-missing/strchr.c::
-missing/strerror.c::
-missing/strstr.c::
-missing/tgamma.c::
-ext/date/date_strftime.c::
-ext/digest/sha1/sha1.c::
-ext/digest/sha1/sha1.h::
-ext/sdbm/_sdbm.c::
-ext/sdbm/sdbm.h::
+[st.c]
+[strftime.c]
+[include/ruby/st.h]
+[missing/acosh.c]
+[missing/alloca.c]
+[missing/erf.c]
+[missing/hypot.c]
+[missing/lgamma_r.c]
+[missing/memcmp.c]
+[missing/memmove.c]
+[missing/strchr.c]
+[missing/strerror.c]
+[missing/strstr.c]
+[missing/tgamma.c]
+[ext/date/date_strftime.c]
+[ext/digest/sha1/sha1.c]
+[ext/digest/sha1/sha1.h]
These files are all under public domain.
-missing/crypt.c::
+[missing/crypt.c]
- This file is under the old-style BSD license. Note that the
- paragraph 3 below is now null and void.
+ This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
>>>
- Copyright (c) 1989, 1993
+ Copyright (c) 1989, 1993::
The Regents of the University of California. All rights reserved.
This code is derived from software contributed to Berkeley by
Tom Truscott.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
-missing/setproctitle.c::
+[missing/setproctitle.c]
- This file is under the old-style BSD license. Note that the
- paragraph 3 below is now null and void.
+ This file is under the {old-style BSD license}[rdoc-label:label-Old-style+BSD+license].
>>>
- Copyright 2003 Damien Miller
- Copyright (c) 1983, 1995-1997 Eric P. Allman
- Copyright (c) 1988, 1993
+ Copyright 2003:: Damien Miller
+ Copyright (c) 1983, 1995-1997:: Eric P. Allman
+ Copyright (c) 1988, 1993::
The Regents of the University of California. All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
-missing/strlcat.c::
-missing/strlcpy.c::
+[missing/strlcat.c]
+[missing/strlcpy.c]
These files are under an ISC-style license.
>>>
- Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
+ Copyright (c) 1998, 2015:: Todd C. Miller <Todd.Miller@courtesan.com>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -571,26 +616,26 @@ missing/strlcpy.c::
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-missing/langinfo.c::
+[missing/langinfo.c]
This file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.
Ruby uses a modified version. The file contains the following
author/copyright notice:
>>>
- Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11
+ Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11::
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted. The author
disclaims all warranties with regard to this software.
-ext/digest/md5/md5.c::
-ext/digest/md5/md5.h::
+[ext/digest/md5/md5.c]
+[ext/digest/md5/md5.h]
These files are under the following license. Ruby uses modified
versions of them.
>>>
- Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved.
+ Copyright (C) 1999, 2000:: Aladdin Enterprises. All rights reserved.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -611,8 +656,8 @@ ext/digest/md5/md5.h::
L. Peter Deutsch
ghost@aladdin.com
-ext/digest/rmd160/rmd160.c::
-ext/digest/rmd160/rmd160.h::
+[ext/digest/rmd160/rmd160.c]
+[ext/digest/rmd160/rmd160.h]
These files have the following copyright information, and by the
author we are allowed to use it under the new-style BSD license.
@@ -622,16 +667,16 @@ ext/digest/rmd160/rmd160.h::
(Arranged for libc by Todd C. Miller)
DATE:: 1 March 1996
- Copyright (c) Katholieke Universiteit Leuven
+ Copyright (c):: Katholieke Universiteit Leuven
1996, All Rights Reserved
-ext/digest/sha2/sha2.c::
-ext/digest/sha2/sha2.h::
+[ext/digest/sha2/sha2.c]
+[ext/digest/sha2/sha2.h]
These files are under the new-style BSD license.
>>>
- Copyright 2000 Aaron D. Gifford. All rights reserved.
+ Copyright 2000:: Aaron D. Gifford. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -657,12 +702,12 @@ ext/digest/sha2/sha2.h::
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-ext/json/generator/generator.c::
+[ext/json/generator/generator.c]
The file contains the following copyright notice.
>>>
- Copyright 2001-2004 Unicode, Inc.
+ Copyright 2001-2004:: Unicode, Inc.
Disclaimer::
@@ -682,15 +727,15 @@ ext/json/generator/generator.c::
for internal or external distribution as long as this notice
remains attached.
-ext/nkf/nkf-utf8/config.h::
-ext/nkf/nkf-utf8/nkf.c::
-ext/nkf/nkf-utf8/utf8tbl.c::
+[ext/nkf/nkf-utf8/config.h]
+[ext/nkf/nkf-utf8/nkf.c]
+[ext/nkf/nkf-utf8/utf8tbl.c]
These files are under the following license. So to speak, it is
copyrighted semi-public-domain software.
>>>
- Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
+ Copyright (C) 1987:: Fujitsu LTD. (Itaru ICHIKAWA)
Everyone is permitted to do anything on this program
including copying, modifying, improving,
@@ -700,14 +745,14 @@ ext/nkf/nkf-utf8/utf8tbl.c::
You don't have to ask before copying, redistribution or publishing.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
-ext/psych::
-test/psych::
+[ext/psych]
+[test/psych]
The files under these directories are under the following license, except for
ext/psych/yaml.
>>>
- Copyright 2009 Aaron Patterson, et al.
+ Copyright 2009:: Aaron Patterson, et al.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
@@ -727,12 +772,12 @@ test/psych::
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-ext/psych/yaml::
+[ext/psych/yaml]
The files under this directory are under the following license.
>>>
- Copyright (c) 2006 Kirill Simonov
+ Copyright (c) 2006:: Kirill Simonov
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -752,14 +797,28 @@ ext/psych/yaml::
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-ext/socket/addrinfo.h::
-ext/socket/getaddrinfo.c::
-ext/socket/getnameinfo.c::
+[ext/pty/pty.c]
+
+ >>>
+ C) Copyright 1998:: by Akinori Ito.
+
+ This software may be redistributed freely for this purpose, in full
+ or in part, provided that this entire copyright notice is included
+ on any copies of this software and applications and derivations thereof.
+
+ This software is provided on an "as is" basis, without warranty of any
+ kind, either expressed or implied, as to any matter including, but not
+ limited to warranty of fitness of purpose, or merchantability, or
+ results obtained from use of this software.
+
+[ext/socket/addrinfo.h]
+[ext/socket/getaddrinfo.c]
+[ext/socket/getnameinfo.c]
These files are under the new-style BSD license.
>>>
- Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
+ Copyright (C) 1995, 1996, 1997, 1998, and 1999:: WIDE Project.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -786,16 +845,16 @@ ext/socket/getnameinfo.c::
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-ext/win32ole/win32ole.c::
+[ext/win32ole/win32ole.c]
You can apply the Artistic License to this file. (or GPL,
alternatively)
>>>
- (c) 1995 Microsoft Corporation. All rights reserved.
+ (c) 1995:: Microsoft Corporation. All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
- Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
+ Other modifications Copyright (c) 1997, 1998:: by Gurusamy Sarathy
<gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
You may distribute under the terms of either the GNU General Public
@@ -804,20 +863,17 @@ ext/win32ole/win32ole.c::
The Wayback Machine url: http://web.archive.org/web/19970607104352/http://www.activeware.com:80/
-lib/rdoc/generator/template/darkfish/css/fonts.css::
+[lib/rdoc/generator/template/darkfish/css/fonts.css]
- This file is licensed under the SIL Open Font License.
+ This file is licensed under the {SIL Open Font License}[http://scripts.sil.org/OFL].
- >>>
- http://scripts.sil.org/OFL
-
-spec/mspec::
-spec/ruby::
+[spec/mspec]
+[spec/ruby]
The files under these directories are under the following license.
>>>
- Copyright (c) 2008 Engine Yard, Inc. All rights reserved.
+ Copyright (c) 2008:: Engine Yard, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -840,17 +896,17 @@ spec/ruby::
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-lib/rubygems.rb::
-lib/rubygems::
-test/rubygems::
+[lib/rubygems.rb]
+[lib/rubygems]
+[test/rubygems]
RubyGems is under the following license.
>>>
RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
Weirich and others. You can redistribute it and/or modify it under
- either the terms of the MIT license (see the file MIT.txt), or the
- conditions below:
+ either the terms of the {MIT license}[rdoc-label:label-MIT+License], or the conditions
+ below:
1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
@@ -901,20 +957,117 @@ test/rubygems::
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
-lib/bundler::
-lib/bundler.rb::
-lib/bundler.gemspec::
-spec/bundler::
-man/bundle-*,gemfile.*::
+[lib/bundler]
+[lib/bundler.rb]
+[spec/bundler]
Bundler is under the following license.
>>>
- Portions copyright (c) 2010 Andre Arko
- Portions copyright (c) 2009 Engine Yard
+ Portions copyright (c) 2010:: Andre Arko
+ Portions copyright (c) 2009:: Engine Yard
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/bundler/vendor/thor]
+
+ Thor is under the following license.
+
+ >>>
+ Copyright (c) 2008 Yehuda Katz, Eric Hodel, et al.
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/rubygems/resolver/molinillo]
+
+ molinillo is under the following license.
+
+ >>>
+ Copyright (c) 2014 Samuel E. Giddins segiddins@segiddins.me
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/bundler/vendor/pub_grub]
+
+ pub_grub is under the following license.
+
+ >>>
+ Copyright (c) 2018 John Hawthorn
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/bundler/vendor/connection_pool]
+
+ connection_pool is under the following license.
+
+ >>>
+ Copyright (c) 2011 Mike Perham
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/bundler/vendor/net-http-persistent]
+
+ net-http-persistent is under the following license.
+
+ >>>
+ Copyright (c) Eric Hodel, Aaron Patterson
- MIT License::
+ {MIT License}[rdoc-label:label-MIT+License]
+[lib/did_you_mean]
+[lib/did_you_mean.rb]
+[test/did_you_mean]
+
+ did_you_mean is under the following license.
+
+ >>>
+ Copyright (c) 2014-2016 Yuki Nishijima
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[lib/error_highlight]
+[lib/error_highlight.rb]
+[test/error_highlight]
+
+ error_highlight is under the following license.
+
+ >>>
+ Copyright (c) 2021 Yusuke Endoh
+
+ {MIT License}[rdoc-label:label-MIT+License]
+
+[benchmark/so_ackermann.rb]
+[benchmark/so_array.rb]
+[benchmark/so_binary_trees.rb]
+[benchmark/so_concatenate.rb]
+[benchmark/so_count_words.yml]
+[benchmark/so_exception.rb]
+[benchmark/so_fannkuch.rb]
+[benchmark/so_fasta.rb]
+[benchmark/so_k_nucleotide.yml]
+[benchmark/so_lists.rb]
+[benchmark/so_mandelbrot.rb]
+[benchmark/so_matrix.rb]
+[benchmark/so_meteor_contest.rb]
+[benchmark/so_nbody.rb]
+[benchmark/so_nested_loop.rb]
+[benchmark/so_nsieve.rb]
+[benchmark/so_nsieve_bits.rb]
+[benchmark/so_object.rb]
+[benchmark/so_partial_sums.rb]
+[benchmark/so_pidigits.rb]
+[benchmark/so_random.rb]
+[benchmark/so_reverse_complement.yml]
+[benchmark/so_sieve.rb]
+[benchmark/so_spectralnorm.rb]
+
+ These files are very old copy of then-called "The Great Computer Language
+ Shootout". LEGAL SITUATION OF THESE FILES ARE UNCLEAR because the original
+ site has been lost. Upstream diverged to delete several benchmarks listed
+ above.
+
+== MIT License
+>>>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -933,3 +1086,34 @@ man/bundle-*,gemfile.*::
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+== Old-style BSD license
+>>>
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ IMPORTANT NOTE::
+
+ From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+ paragraph 3 above is now null and void.
diff --git a/NEWS b/NEWS
deleted file mode 100644
index 6970e0eaab..0000000000
--- a/NEWS
+++ /dev/null
@@ -1,818 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.7.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or reference
-information is supplied with. For a full list of changes with all
-sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>).
-
-== Changes since the 2.6.0 release
-
-=== Language changes
-
-==== Pattern matching
-
-* Pattern matching is introduced as an experimental feature. [Feature #14912]
-
- case [0, [1, 2, 3]]
- in [a, [b, *c]]
- p a #=> 0
- p b #=> 1
- p c #=> [2, 3]
- end
-
- case {a: 0, b: 1}
- in {a: 0, x: 1}
- :unreachable
- in {a: 0, b: var}
- p var #=> 1
- end
-
- case -1
- in 0 then :unreachable
- in 1 then :unreachable
- end #=> NoMatchingPatternError
-
- json = <<END
- {
- "name": "Alice",
- "age": 30,
- "children": [{ "name": "Bob", "age": 2 }]
- }
- END
-
- JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: name, age: age}]}
-
- p name #=> "Bob"
- p age #=> 2
-
- JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: "Charlie", age: age}]}
- #=> NoMatchingPatternError
-
-* See the following slides for more details:
- * https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7
- * Note that the slides are slightly obsolete.
-
-* The warning against pattern matching can be suppressed with
- {-W:no-experimental option}[#label-Warning+option].
-
-==== The spec of keyword arguments is changed towards 3.0
-
-* Automatic conversion of keyword arguments and positional arguments is
- deprecated, and conversion will be removed in Ruby 3. [Feature #14183]
-
- * When a method call passes a Hash at the last argument, and when it
- passes no keywords, and when the called method accepts keywords,
- a warning is emitted. To continue treating the hash as keywords,
- add a double splat operator to avoid the warning and ensure
- correct behavior in Ruby 3.
-
- def foo(key: 42); end; foo({key: 42}) # warned
- def foo(**kw); end; foo({key: 42}) # warned
- def foo(key: 42); end; foo(**{key: 42}) # OK
- def foo(**kw); end; foo(**{key: 42}) # OK
-
- * When a method call passes keywords to a method that accepts keywords,
- but it does not pass enough required positional arguments, the
- keywords are treated as a final required positional argument, and a
- warning is emitted. Pass the argument as a hash instead of keywords
- to avoid the warning and ensure correct behavior in Ruby 3.
-
- def foo(h, **kw); end; foo(key: 42) # warned
- def foo(h, key: 42); end; foo(key: 42) # warned
- def foo(h, **kw); end; foo({key: 42}) # OK
- def foo(h, key: 42); end; foo({key: 42}) # OK
-
- * When a method accepts specific keywords but not a keyword splat, and
- a hash or keywords splat is passed to the method that includes both
- Symbol and non-Symbol keys, the hash will continue to be split, and
- a warning will be emitted. You will need to update the calling code
- to pass separate hashes to ensure correct behavior in Ruby 3.
-
- def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned
- def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned
- def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK
-
- * If a method does not accept keywords, and is called with keywords,
- the keywords are still treated as a positional hash, with no warning.
- This behavior will continue to work in Ruby 3.
-
- def foo(opt={}); end; foo( key: 42 ) # OK
-
-* Non-symbols are allowed as keyword argument keys if the method accepts
- arbitrary keywords. [Feature #14183]
-
- * Non-Symbol keys in a keyword arguments hash were prohibited in 2.6.0,
- but are now allowed again. [Bug #15658]
-
- def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1}
-
-* <code>**nil</code> is allowed in method definitions to explicitly mark
- that the method accepts no keywords. Calling such a method with keywords
- will result in an ArgumentError. [Feature #14183]
-
- def foo(h, **nil); end; foo(key: 1) # ArgumentError
- def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError
- def foo(h, **nil); end; foo("str" => 1) # ArgumentError
- def foo(h, **nil); end; foo({key: 1}) # OK
- def foo(h, **nil); end; foo({"str" => 1}) # OK
-
-* Passing an empty keyword splat to a method that does not accept keywords
- no longer passes an empty hash, unless the empty hash is necessary for
- a required parameter, in which case a warning will be emitted. Remove
- the double splat to continue passing a positional hash. [Feature #14183]
-
- h = {}; def foo(*a) a end; foo(**h) # []
- h = {}; def foo(a) a end; foo(**h) # {} and warning
- h = {}; def foo(*a) a end; foo(h) # [{}]
- h = {}; def foo(a) a end; foo(h) # {}
-
-* Above warnings can be suppressed also with {-W:no-deprecated option}[#label-Warning+option].
-
-==== Numbered parameters
-
-* Numbered parameters as default block parameters are introduced.
- [Feature #4475]
-
- [1, 2, 10].map { _1.to_s(16) } #=> ["1", "2", "a"]
- [[1, 2], [3, 4]].map { _1 + _2 } #=> [3, 7]
-
- You can still define a local variable named +_1+ and so on,
- and that is honored when present, but renders a warning.
-
- _1 = 0 #=> warning: `_1' is reserved for numbered parameter; consider another name
- [1].each { p _1 } # prints 0 instead of 1
-
-==== proc/lambda without block is deprecated
-
-* Proc.new and Kernel#proc with no block in a method called with a block is
- warned now.
-
- def foo
- proc
- end
- foo { puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
-
- This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
-
-* Kernel#lambda with no block in a method called with a block raises an exception.
-
- def bar
- lambda
- end
- bar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError)
-
-==== Other miscellaneous changes
-
-* A beginless range is experimentally introduced. It might be useful
- in +case+, new call-sequence of the <code>Comparable#clamp</code>,
- constants and DSLs. [Feature #14799]
-
- ary[..3] # identical to ary[0..3]
-
- case RUBY_VERSION
- when ..."2.4" then puts "EOL"
- # ...
- end
-
- age.clamp(..100)
-
- where(sales: ..100)
-
-* Setting <code>$;</code> to a non-nil value is warned now.
- Use of it in String#split is warned too.
- This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
-
-* Setting <code>$,</code> to a non-nil value is warned now.
- Use of it in Array#join is warned too.
- This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
-
-* Quoted here-document identifiers must end within the same line.
-
- <<"EOS
- " # This had been warned since 2.4; Now it raises a SyntaxError
- EOS
-
-* The flip-flop syntax deprecation is reverted. [Feature #5400]
-
-* Comment lines can be placed between fluent dot now.
-
- foo
- # .bar
- .baz # => foo.baz
-
-* Calling a private method with a literal +self+ as the receiver
- is now allowed. [Feature #11297] [Feature #16123]
-
-* Modifier rescue now operates the same for multiple assignment as single
- assignment:
-
- a, b = raise rescue [1, 2]
- # Previously parsed as: (a, b = raise) rescue [1, 2]
- # Now parsed as: a, b = (raise rescue [1, 2])
-
-* +yield+ in singleton class syntax is warned and will be deprecated later. [Feature #15575].
-
- def foo
- class << Object.new
- yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]
- end
- end
- foo { p :ok }
-
- This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
-
-* Argument forwarding by <code>(...)</code> is introduced. [Feature #16253]
-
- def foo(...)
- bar(...)
- end
-
- All arguments to +foo+ are forwarded to +bar+, including keyword and
- block arguments.
- Note that the parentheses are mandatory. <code>bar ...</code> is parsed
- as an endless range.
-
-* Access and setting of <code>$SAFE</code> is now always warned. <code>$SAFE</code>
- will become a normal global variable in Ruby 3.0. [Feature #16131]
-
-* <code>Object#{taint,untaint,trust,untrust}</code> and related functions in the C-API
- no longer have an effect (all objects are always considered untainted), and are now
- warned in verbose mode. This warning will be disabled even in non-verbose mode in
- Ruby 3.0, and the methods and C functions will be removed in Ruby 3.2. [Feature #16131]
-
-* Refinements take place at Object#method and Module#instance_method. [Feature #15373]
-
-=== Command line options
-
-==== Warning option
-
-The +-W+ option has been extended with a following +:+, to manage categorized
-warnings. [Feature #16345] [Feature #16420]
-
-* To suppress deprecation warnings:
-
- $ ruby -e '$; = ""'
- -e:1: warning: `$;' is deprecated
-
- $ ruby -W:no-deprecated -e '$; = //'
-
-* It works with the +RUBYOPT+ environment variable:
-
- $ RUBYOPT=-W:no-deprecated ruby -e '$; = //'
-
-* To suppress experimental feature warnings:
-
- $ ruby -e '0 in a'
- -e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
-
- $ ruby -W:no-experimental -e '0 in a'
-
-* To suppress both by using +RUBYOPT+, set space separated values:
-
- $ RUBYOPT='-W:no-deprecated -W:no-experimental' ruby -e '($; = "") in a'
-
-See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outstanding+ones+only-29].
-
-=== Core classes updates (outstanding ones only)
-
-Array::
-
- New methods::
-
- * Added Array#intersection. [Feature #16155]
-
- * Added Array#minmax, with a faster implementation than Enumerable#minmax. [Bug #15929]
-
-Comparable::
-
- Modified method::
-
- * Comparable#clamp now accepts a Range argument. [Feature #14784]
-
- -1.clamp(0..2) #=> 0
- 1.clamp(0..2) #=> 1
- 3.clamp(0..2) #=> 2
- # With beginless and endless ranges:
- -1.clamp(0..) #=> 0
- 3.clamp(..2) #=> 2
-
-
-Complex::
-
- New method::
-
- * Added Complex#<=>.
- So <code>0 <=> 0i</code> will not raise NoMethodError. [Bug #15857]
-
-Dir::
-
- Modified methods::
-
- * Dir.glob and Dir.[] no longer allow NUL-separated glob pattern.
- Use Array instead. [Feature #14643]
-
-Encoding::
-
- New encoding::
-
- * Added new encoding CESU-8. [Feature #15931]
-
-Enumerable::
-
- New methods::
-
- * Added Enumerable#filter_map. [Feature #15323]
-
- [1, 2, 3].filter_map {|x| x.odd? ? x.to_s : nil } #=> ["1", "3"]
-
- * Added Enumerable#tally. [Feature #11076]
-
- ["A", "B", "C", "B", "A"].tally #=> {"A"=>2, "B"=>2, "C"=>1}
-
-Enumerator::
-
- New methods::
-
- * Added Enumerator.produce to generate an Enumerator from any custom
- data transformation. [Feature #14781]
-
- require "date"
- dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
- dates.detect(&:tuesday?) #=> next Tuesday
-
- * Added Enumerator::Lazy#eager that generates a non-lazy enumerator
- from a lazy enumerator. [Feature #15901]
-
- a = %w(foo bar baz)
- e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
- p e.class #=> Enumerator
- p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
-
- * Added Enumerator::Yielder#to_proc so that a Yielder object
- can be directly passed to another method as a block
- argument. [Feature #15618]
-
-Fiber::
-
- New method::
-
- * Added Fiber#raise that behaves like Fiber#resume but raises an
- exception on the resumed fiber. [Feature #10344]
-
-File::
-
- Modified method::
-
- * File.extname now returns a dot string for names ending with a dot on
- non-Windows platforms. [Bug #15267]
-
- File.extname("foo.") #=> "."
-
-FrozenError::
-
- New method::
-
- * Added FrozenError#receiver to return the frozen object on which
- modification was attempted. To set this object when raising
- FrozenError in Ruby code, FrozenError.new accepts a +:receiver+
- option. [Feature #15751]
-
-GC::
-
- New method::
-
- * Added GC.compact method for compacting the heap.
- This function compacts live objects in the heap so that fewer pages may
- be used, and the heap may be more CoW friendly. [Feature #15626]
-
- Details on the algorithm and caveats can be found here:
- https://bugs.ruby-lang.org/issues/15626
-
-IO::
-
- New method::
-
- * Added IO#set_encoding_by_bom to check the BOM and set the external
- encoding. [Bug #15210]
-
-Integer::
-
- Modified method::
-
- * Integer#[] now supports range operations. [Feature #8842]
-
- 0b01001101[2, 4] #=> 0b0011
- 0b01001100[2..5] #=> 0b0011
- 0b01001100[2...6] #=> 0b0011
- # ^^^^
-
-Method::
-
- Modified method::
-
- * Method#inspect shows more information. [Feature #14145]
-
-Module::
-
- New methods::
-
- * Added Module#const_source_location to retrieve the location where a
- constant is defined. [Feature #10771]
-
- * Added Module#ruby2_keywords for marking a method as passing keyword
- arguments through a regular argument splat, useful when delegating
- all arguments to another method in a way that can be backwards
- compatible with older Ruby versions. [Bug #16154]
-
- Modified methods::
-
- * Module#autoload? now takes an +inherit+ optional argument, like
- Module#const_defined?. [Feature #15777]
-
- * Module#name now always returns a frozen String. The returned String is
- always the same for a given Module. This change is
- experimental. [Feature #16150]
-
-NilClass / TrueClass / FalseClass::
-
- Modified methods::
-
- * NilClass#to_s, TrueClass#to_s, and FalseClass#to_s now always return a
- frozen String. The returned String is always the same for each of these
- values. This change is experimental. [Feature #16150]
-
-ObjectSpace::WeakMap::
-
- Modified method::
-
- * ObjectSpace::WeakMap#[]= now accepts special objects as either key or
- values. [Feature #16035]
-
-Proc::
-
- New method::
-
- * Added Proc#ruby2_keywords for marking the proc as passing keyword
- arguments through a regular argument splat, useful when delegating
- all arguments to another method or proc in a way that can be backwards
- compatible with older Ruby versions. [Feature #16404]
-
-Range::
-
- New method::
-
- * Added Range#minmax, with a faster implementation than Enumerable#minmax.
- It returns a maximum that now corresponds to Range#max. [Bug #15807]
-
- Modified method::
-
- * Range#=== now uses Range#cover? for String arguments, too (in Ruby 2.6, it was
- changed from Range#include? for all types except strings). [Bug #15449]
-
-
-RubyVM::
-
- Removed method::
-
- * +RubyVM.resolve_feature_path+ moved to
- <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
-
-String::
-
- Unicode::
-
- * Update Unicode version and Emoji version from 11.0.0 to
- 12.0.0. [Feature #15321]
-
- * Update Unicode version to 12.1.0, adding support for
- U+32FF SQUARE ERA NAME REIWA. [Feature #15195]
-
- * Update Unicode Emoji version to 12.1. [Feature #16272]
-
-Symbol::
-
- New methods::
-
- * Added Symbol#start_with? and Symbol#end_with? methods. [Feature #16348]
-
-Time::
-
- New methods::
-
- * Added Time#ceil method. [Feature #15772]
-
- * Added Time#floor method. [Feature #15653]
-
- Modified method::
-
- * Time#inspect is separated from Time#to_s and it shows
- the time's sub second. [Feature #15958]
-
-UnboundMethod::
-
- New method::
-
- * Added UnboundMethod#bind_call method. [Feature #15955]
-
- <code>umethod.bind_call(obj, ...)</code> is semantically equivalent
- to <code>umethod.bind(obj).call(...)</code>. This idiom is used in
- some libraries to call a method that is overridden. The added
- method does the same without allocation of an intermediate Method
- object.
-
- class Foo
- def add_1(x)
- x + 1
- end
- end
- class Bar < Foo
- def add_1(x) # override
- x + 2
- end
- end
-
- obj = Bar.new
- p obj.add_1(1) #=> 3
- p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
- p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
-
-Warning::
-
- New methods::
-
- * Added Warning.[] and Warning.[]= to manage emitting/suppressing
- some categories of warnings. [Feature #16345] [Feature #16420]
-
-$LOAD_PATH::
-
- New method::
-
- * Added <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
-
-=== Stdlib updates (outstanding ones only)
-
-Bundler::
-
- * Upgrade to Bundler 2.1.2.
- See https://github.com/bundler/bundler/releases/tag/v2.1.2
-
-CGI::
-
- * CGI.escapeHTML becomes 2~5x faster when there is at least one escaped character.
- See https://github.com/ruby/ruby/pull/2226
-
-CSV::
-
- * Upgrade to 3.1.2.
- See https://github.com/ruby/csv/blob/master/NEWS.md.
-
-Date::
-
- * Date.jisx0301, Date#jisx0301, and Date.parse support the new Japanese
- era. [Feature #15742]
-
-Delegator::
-
- * Object#DelegateClass accepts a block and module_evals it in the context
- of the returned class, similar to Class.new and Struct.new.
-
-ERB::
-
- * Prohibit marshaling ERB instance.
-
-IRB::
-
- * Introduce syntax highlighting inspired by the Pry gem to Binding#irb
- source lines, REPL input, and inspect output of some core-class objects.
-
- * Introduce multiline editing mode provided by Reline.
-
- * Show documentation when completion.
-
- * Enable auto indent and save/load history by default.
-
-Net::FTP::
-
- * Add Net::FTP#features to check available features, and Net::FTP#option to
- enable/disable each of them. [Feature #15964]
-
-Net::HTTP::
-
- * Add +ipaddr+ optional parameter to Net::HTTP#start to replace the address for
- the TCP/IP connection. [Feature #5180]
-
-Net::IMAP::
-
- * Add Server Name Indication (SNI) support. [Feature #15594]
-
-open-uri::
-
- * Warn open-uri's "open" method at Kernel.
- Use URI.open instead. [Misc #15893]
-
- * The default charset of "text/*" media type is UTF-8 instead of
- ISO-8859-1. [Bug #15933]
-
-OptionParser::
-
- * Now show "Did you mean?" for unknown options. [Feature #16256]
-
- test.rb:
-
- require "optparse"
- OptionParser.new do |opts|
- opts.on("-f", "--foo", "foo") {|v| }
- opts.on("-b", "--bar", "bar") {|v| }
- opts.on("-c", "--baz", "baz") {|v| }
- end.parse!
-
- example:
-
- $ ruby test.rb --baa
- Traceback (most recent call last):
- test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption)
- Did you mean? baz
- bar
-
-Pathname::
-
- * Pathname.glob now delegates 3 arguments to Dir.glob
- to accept +base+ keyword. [Feature #14405]
-
-Racc::
-
- * Merge 1.4.15 from upstream repository and added cli of racc.
-
-Reline::
-
- * New stdlib that is compatible with the readline stdlib but is
- implemented in pure Ruby. It also provides a multiline editing mode.
-
-REXML::
-
- * Upgrade to 3.2.3.
- See https://github.com/ruby/rexml/blob/master/NEWS.md.
-
-RSS::
-
- * Upgrade to RSS 0.2.8.
- See https://github.com/ruby/rss/blob/master/NEWS.md.
-
-RubyGems::
-
- * Upgrade to RubyGems 3.1.2.
- * https://github.com/rubygems/rubygems/releases/tag/v3.1.0
- * https://github.com/rubygems/rubygems/releases/tag/v3.1.1
- * https://github.com/rubygems/rubygems/releases/tag/v3.1.2
-
-StringScanner::
-
- * Upgrade to 1.0.3.
- See https://github.com/ruby/strscan/blob/master/NEWS.md.
-
-=== Compatibility issues (excluding feature bug fixes)
-
-* The following libraries are no longer bundled gems.
- Install corresponding gems to use these features.
- * CMath (cmath gem)
- * Scanf (scanf gem)
- * Shell (shell gem)
- * Synchronizer (sync gem)
- * ThreadsWait (thwait gem)
- * E2MM (e2mmap gem)
-
-Proc::
- * The Proc#to_s format was changed. [Feature #16101]
-
-Range::
- * Range#minmax used to iterate on the range to determine the maximum.
- It now uses the same algorithm as Range#max. In rare cases (e.g.
- ranges of Floats or Strings), this may yield different results. [Bug #15807]
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* Promote stdlib to default gems
- * The following default gems were published on rubygems.org
- * benchmark
- * cgi
- * delegate
- * getoptlong
- * net-pop
- * net-smtp
- * open3
- * pstore
- * singleton
- * The following default gems were only promoted at ruby-core,
- but not yet published on rubygems.org.
- * monitor
- * observer
- * timeout
- * tracer
- * uri
- * yaml
-
-pathname::
-
- * Kernel#Pathname when called with a Pathname argument now returns
- the argument instead of creating a new Pathname. This is more
- similar to other Kernel methods, but can break code that modifies
- the return value and expects the argument not to be modified.
-
-profile.rb, Profiler__::
-
- * Removed from standard library. It was unmaintained since Ruby 2.0.0.
-
-=== C API updates
-
-* Many <code>*_kw</code> functions have been added for setting whether
- the final argument being passed should be treated as keywords. You
- may need to switch to these functions to avoid keyword argument
- separation warnings, and to ensure correct behavior in Ruby 3.
-
-* The <code>:</code> character in rb_scan_args format string is now
- treated as keyword arguments. Passing a positional hash instead of
- keyword arguments will emit a deprecation warning.
-
-* C API declarations with +ANYARGS+ are changed not to use +ANYARGS+.
- See https://github.com/ruby/ruby/pull/2404
-
-=== Implementation improvements
-
-Fiber::
-
- * Allow selecting different coroutine implementations by using
- +--with-coroutine=+, e.g.
-
- $ ./configure --with-coroutine=ucontext
- $ ./configure --with-coroutine=copy
-
- * Replace previous stack cache with fiber pool cache. The fiber pool
- allocates many stacks in a single memory region. Stack allocation
- becomes O(log N) and fiber creation is amortized O(1). Around 10x
- performance improvement was measured in micro-benchmarks.
-
-File::
- * File.realpath now uses realpath(3) on many platforms, which can
- significantly improve performance.
-
-Hash::
- * Change data structure of small Hash objects. [Feature #15602]
-
-Monitor::
- * Monitor class is written in C-extension. [Feature #16255]
-
-Thread::
-
- * VM stack memory allocation is now combined with native thread stack,
- improving thread allocation performance and reducing allocation related
- failures. Around 10x performance improvement was measured in micro-benchmarks.
-
-JIT::
-
- * JIT-ed code is recompiled to less-optimized code when an optimization assumption is invalidated.
-
- * Method inlining is performed when a method is considered as pure.
- This optimization is still experimental and many methods are NOT considered as pure yet.
-
- * The default value of +--jit-max-cache+ is changed from 1,000 to 100.
-
- * The default value of +--jit-min-calls+ is changed from 5 to 10,000.
-
-RubyVM::
-
- * Per-call-site method cache, which has been there since around 1.9, was
- improved: cache hit rate raised from 89% to 94%.
- See https://github.com/ruby/ruby/pull/2583
-
-RubyVM::InstructionSequence::
-
- * RubyVM::InstructionSequence#to_binary method generates compiled binary.
- The binary size is reduced. [Feature #16163]
-
-=== Miscellaneous changes
-
-* Support for IA64 architecture has been removed. Hardware for testing was
- difficult to find, native fiber code is difficult to implement, and it added
- non-trivial complexity to the interpreter. [Feature #15894]
-
-* Require compilers to support C99. [Misc #15347]
-
- * Details of our dialect: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99
-
-* Ruby's upstream repository is changed from Subversion to Git.
-
- * https://git.ruby-lang.org/ruby.git
-
- * RUBY_REVISION class is changed from Integer to String.
-
- * RUBY_DESCRIPTION includes Git revision instead of Subversion's one.
-
-* Support built-in methods in Ruby with the <code>_\_builtin_</code> syntax. [Feature #16254]
-
- Some methods are defined in *.rb (such as trace_point.rb).
- For example, it is easy to define a method which accepts keyword arguments.
diff --git a/NEWS.md b/NEWS.md
new file mode 100644
index 0000000000..f6c3c6fc97
--- /dev/null
+++ b/NEWS.md
@@ -0,0 +1,820 @@
+# NEWS for Ruby 3.2.0
+
+This document is a list of user-visible feature changes
+since the **3.1.0** release, except for bug fixes.
+
+Note that each entry is kept to a minimum, see links for details.
+
+## Language changes
+
+* Anonymous rest and keyword rest arguments can now be passed as
+ arguments, instead of just used in method parameters.
+ [[Feature #18351]]
+
+ ```ruby
+ def foo(*)
+ bar(*)
+ end
+ def baz(**)
+ quux(**)
+ end
+ ```
+
+* A proc that accepts a single positional argument and keywords will
+ no longer autosplat. [[Bug #18633]]
+
+ ```ruby
+ proc{|a, **k| a}.call([1, 2])
+ # Ruby 3.1 and before
+ # => 1
+ # Ruby 3.2 and after
+ # => [1, 2]
+ ```
+
+* Constant assignment evaluation order for constants set on explicit
+ objects has been made consistent with single attribute assignment
+ evaluation order. With this code:
+
+ ```ruby
+ foo::BAR = baz
+ ```
+
+ `foo` is now called before `baz`. Similarly, for multiple assignments
+ to constants, left-to-right evaluation order is used. With this
+ code:
+
+ ```ruby
+ foo1::BAR1, foo2::BAR2 = baz1, baz2
+ ```
+
+ The following evaluation order is now used:
+
+ 1. `foo1`
+ 2. `foo2`
+ 3. `baz1`
+ 4. `baz2`
+
+ [[Bug #15928]]
+
+* "Find pattern" is no longer experimental.
+ [[Feature #18585]]
+
+* Methods taking a rest parameter (like `*args`) and wishing to delegate keyword
+ arguments through `foo(*args)` must now be marked with `ruby2_keywords`
+ (if not already the case). In other words, all methods wishing to delegate
+ keyword arguments through `*args` must now be marked with `ruby2_keywords`,
+ with no exception. This will make it easier to transition to other ways of
+ delegation once a library can require Ruby 3+. Previously, the `ruby2_keywords`
+ flag was kept if the receiving method took `*args`, but this was a bug and an
+ inconsistency. A good technique to find the potentially-missing `ruby2_keywords`
+ is to run the test suite, for where it fails find the last method which must
+ receive keyword arguments, use `puts nil, caller, nil` there, and check each
+ method/block on the call chain which must delegate keywords is correctly marked
+ as `ruby2_keywords`. [[Bug #18625]] [[Bug #16466]]
+
+ ```ruby
+ def target(**kw)
+ end
+
+ # Accidentally worked without ruby2_keywords in Ruby 2.7-3.1, ruby2_keywords
+ # needed in 3.2+. Just like (*args, **kwargs) or (...) would be needed on
+ # both #foo and #bar when migrating away from ruby2_keywords.
+ ruby2_keywords def bar(*args)
+ target(*args)
+ end
+
+ ruby2_keywords def foo(*args)
+ bar(*args)
+ end
+
+ foo(k: 1)
+ ```
+
+## Core classes updates
+
+Note: We're only listing outstanding class updates.
+
+* Fiber
+
+ * Introduce Fiber.[] and Fiber.[]= for inheritable fiber storage.
+ Introduce Fiber#storage and Fiber#storage= (experimental) for
+ getting and resetting the current storage. Introduce
+ `Fiber.new(storage:)` for setting the storage when creating a
+ fiber. [[Feature #19078]]
+
+ Existing Thread and Fiber local variables can be tricky to use.
+ Thread-local variables are shared between all fibers, making it
+ hard to isolate, while Fiber-local variables can be hard to
+ share. It is often desirable to define unit of execution
+ ("execution context") such that some state is shared between all
+ fibers and threads created in that context. This is what Fiber
+ storage provides.
+
+ ```ruby
+ def log(message)
+ puts "#{Fiber[:request_id]}: #{message}"
+ end
+
+ def handle_requests
+ while request = read_request
+ Fiber.schedule do
+ Fiber[:request_id] = SecureRandom.uuid
+
+ request.messages.each do |message|
+ Fiber.schedule do
+ log("Handling #{message}") # Log includes inherited request_id.
+ end
+ end
+ end
+ end
+ end
+ ```
+
+ You should generally consider Fiber storage for any state which
+ you want to be shared implicitly between all fibers and threads
+ created in a given context, e.g. a connection pool, a request
+ id, a logger level, environment variables, configuration, etc.
+
+* Fiber::Scheduler
+
+ * Introduce `Fiber::Scheduler#io_select` for non-blocking IO.select.
+ [[Feature #19060]]
+
+* IO
+
+ * Introduce IO#timeout= and IO#timeout which can cause
+ IO::TimeoutError to be raised if a blocking operation exceeds the
+ specified timeout. [[Feature #18630]]
+
+ ```ruby
+ STDIN.timeout = 1
+ STDIN.read # => Blocking operation timed out! (IO::TimeoutError)
+ ```
+
+ * Introduce `IO.new(..., path:)` and promote `File#path` to `IO#path`.
+ [[Feature #19036]]
+
+* Class
+
+ * Class#attached_object, which returns the object for which
+ the receiver is the singleton class. Raises TypeError if the
+ receiver is not a singleton class.
+ [[Feature #12084]]
+
+ ```ruby
+ class Foo; end
+
+ Foo.singleton_class.attached_object #=> Foo
+ Foo.new.singleton_class.attached_object #=> #<Foo:0x000000010491a370>
+ Foo.attached_object #=> TypeError: `Foo' is not a singleton class
+ nil.singleton_class.attached_object #=> TypeError: `NilClass' is not a singleton class
+ ```
+
+* Data
+
+ * New core class to represent simple immutable value object. The class is
+ similar to Struct and partially shares an implementation, but has more
+ lean and strict API. [[Feature #16122]]
+
+ ```ruby
+ Measure = Data.define(:amount, :unit)
+ distance = Measure.new(100, 'km') #=> #<data Measure amount=100, unit="km">
+ weight = Measure.new(amount: 50, unit: 'kg') #=> #<data Measure amount=50, unit="kg">
+ weight.with(amount: 40) #=> #<data Measure amount=40, unit="kg">
+ weight.amount #=> 50
+ weight.amount = 40 #=> NoMethodError: undefined method `amount='
+ ```
+
+* Encoding
+
+ * Encoding#replicate has been deprecated and will be removed in 3.3. [[Feature #18949]]
+ * The dummy `Encoding::UTF_16` and `Encoding::UTF_32` encodings no longer
+ try to dynamically guess the endian based on a byte order mark.
+ Use `Encoding::UTF_16BE`/`UTF_16LE` and `Encoding::UTF_32BE`/`UTF_32LE` instead.
+ This change speeds up getting the encoding of a String. [[Feature #18949]]
+ * Limit maximum encoding set size by 256.
+ If exceeding maximum size, `EncodingError` will be raised. [[Feature #18949]]
+
+* Enumerator
+
+ * Enumerator.product has been added. Enumerator::Product is the implementation. [[Feature #18685]]
+
+* Exception
+
+ * Exception#detailed_message has been added.
+ The default error printer calls this method on the Exception object
+ instead of #message. [[Feature #18564]]
+
+* Hash
+
+ * Hash#shift now always returns nil if the hash is
+ empty, instead of returning the default value or
+ calling the default proc. [[Bug #16908]]
+
+* Integer
+
+ * Integer#ceildiv has been added. [[Feature #18809]]
+
+* Kernel
+
+ * Kernel#binding raises RuntimeError if called from a non-Ruby frame
+ (such as a method defined in C). [[Bug #18487]]
+
+* MatchData
+
+ * MatchData#byteoffset has been added. [[Feature #13110]]
+ * MatchData#deconstruct has been added. [[Feature #18821]]
+ * MatchData#deconstruct_keys has been added. [[Feature #18821]]
+
+* Module
+
+ * Module.used_refinements has been added. [[Feature #14332]]
+ * Module#refinements has been added. [[Feature #12737]]
+ * Module#const_added has been added. [[Feature #17881]]
+ * Module#undefined_instance_methods has been added. [[Feature #12655]]
+
+* Proc
+
+ * Proc#dup returns an instance of subclass. [[Bug #17545]]
+ * Proc#parameters now accepts lambda keyword. [[Feature #15357]]
+
+* Process
+ * Added `RLIMIT_NPTS` constant to FreeBSD platform
+
+* Regexp
+
+ * The cache-based optimization is introduced.
+ Many (but not all) Regexp matching is now in linear time, which
+ will prevent regular expression denial of service (ReDoS)
+ vulnerability. [[Feature #19104]]
+
+ * Regexp.linear_time? is introduced. [[Feature #19194]]
+
+ * Regexp.new now supports passing the regexp flags not only as an Integer,
+ but also as a String. Unknown flags raise ArgumentError.
+ Otherwise, anything other than `true`, `false`, `nil` or Integer will be warned.
+ [[Feature #18788]]
+
+ * Regexp.timeout= has been added. Also, Regexp.new new supports timeout keyword.
+ See [[Feature #17837]]
+
+* Refinement
+
+ * Refinement#refined_class has been added. [[Feature #12737]]
+
+* RubyVM::AbstractSyntaxTree
+
+ * Add `error_tolerant` option for `parse`, `parse_file` and `of`. [[Feature #19013]]
+ With this option
+
+ 1. SyntaxError is suppressed
+ 2. AST is returned for invalid input
+ 3. `end` is complemented when a parser reaches to the end of input but `end` is insufficient
+ 4. `end` is treated as keyword based on indent
+
+ ```ruby
+ # Without error_tolerant option
+ root = RubyVM::AbstractSyntaxTree.parse(<<~RUBY)
+ def m
+ a = 10
+ if
+ end
+ RUBY
+ # => <internal:ast>:33:in `parse': syntax error, unexpected `end' (SyntaxError)
+
+ # With error_tolerant option
+ root = RubyVM::AbstractSyntaxTree.parse(<<~RUBY, error_tolerant: true)
+ def m
+ a = 10
+ if
+ end
+ RUBY
+ p root # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-4:3>
+
+ # `end` is treated as keyword based on indent
+ root = RubyVM::AbstractSyntaxTree.parse(<<~RUBY, error_tolerant: true)
+ module Z
+ class Foo
+ foo.
+ end
+
+ def bar
+ end
+ end
+ RUBY
+ p root.children[-1].children[-1].children[-1].children[-2..-1]
+ # => [#<RubyVM::AbstractSyntaxTree::Node:CLASS@2:2-4:5>, #<RubyVM::AbstractSyntaxTree::Node:DEFN@6:2-7:5>]
+ ```
+
+ * Add `keep_tokens` option for `parse`, `parse_file` and `of`. Add `#tokens` and `#all_tokens`
+ for RubyVM::AbstractSyntaxTree::Node [[Feature #19070]]
+
+ ```ruby
+ root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2", keep_tokens: true)
+ root.tokens # => [[0, :tIDENTIFIER, "x", [1, 0, 1, 1]], [1, :tSP, " ", [1, 1, 1, 2]], ...]
+ root.tokens.map{_1[2]}.join # => "x = 1 + 2"
+ ```
+
+* Set
+
+ * Set is now available as a built-in class without the need for `require "set"`. [[Feature #16989]]
+ It is currently autoloaded via the Set constant or a call to Enumerable#to_set.
+
+* String
+
+ * String#byteindex and String#byterindex have been added. [[Feature #13110]]
+ * Update Unicode to Version 15.0.0 and Emoji Version 15.0. [[Feature #18639]]
+ (also applies to Regexp)
+ * String#bytesplice has been added. [[Feature #18598]]
+ * String#dedup has been added as an alias to String#-@. [[Feature #18595]]
+
+* Struct
+
+ * A Struct class can also be initialized with keyword arguments
+ without `keyword_init: true` on Struct.new [[Feature #16806]]
+
+ ```ruby
+ Post = Struct.new(:id, :name)
+ Post.new(1, "hello") #=> #<struct Post id=1, name="hello">
+ # From Ruby 3.2, the following code also works without keyword_init: true.
+ Post.new(id: 1, name: "hello") #=> #<struct Post id=1, name="hello">
+ ```
+
+* Thread
+
+ * Thread.each_caller_location is added. [[Feature #16663]]
+
+* Thread::Queue
+
+ * Thread::Queue#pop(timeout: sec) is added. [[Feature #18774]]
+
+* Thread::SizedQueue
+
+ * Thread::SizedQueue#pop(timeout: sec) is added. [[Feature #18774]]
+ * Thread::SizedQueue#push(timeout: sec) is added. [[Feature #18944]]
+
+* Time
+
+ * Time#deconstruct_keys is added, allowing to use Time instances
+ in pattern-matching expressions [[Feature #19071]]
+
+ * Time.new now can parse a string like generated by Time#inspect
+ and return a Time instance based on the given argument.
+ [[Feature #18033]]
+
+* SyntaxError
+ * SyntaxError#path has been added. [[Feature #19138]]
+
+* TracePoint
+
+ * TracePoint#binding now returns `nil` for `c_call`/`c_return` TracePoints.
+ [[Bug #18487]]
+ * TracePoint#enable `target_thread` keyword argument now defaults to the
+ current thread if a block is given and `target` and `target_line` keyword
+ arguments are not passed. [[Bug #16889]]
+
+* UnboundMethod
+
+ * `UnboundMethod#==` returns `true` if the actual method is same. For example,
+ `String.instance_method(:object_id) == Array.instance_method(:object_id)`
+ returns `true`. [[Feature #18798]]
+
+ * `UnboundMethod#inspect` does not show the receiver of `instance_method`.
+ For example `String.instance_method(:object_id).inspect` returns
+ `"#<UnboundMethod: Kernel#object_id()>"`
+ (was `"#<UnboundMethod: String(Kernel)#object_id()>"`).
+
+* GC
+
+ * Expose `need_major_gc` via `GC.latest_gc_info`. [GH-6791]
+
+* ObjectSpace
+
+ * `ObjectSpace.dump_all` dump shapes as well. [GH-6868]
+
+## Stdlib updates
+
+* Bundler
+
+ * Bundler now uses [PubGrub] resolver instead of [Molinillo] for performance improvement.
+ * Add --ext=rust support to bundle gem for creating simple gems with Rust extensions.
+ [[GH-rubygems-6149]]
+ * Make cloning git repos faster [[GH-rubygems-4475]]
+
+* RubyGems
+
+ * Add mswin support for cargo builder. [[GH-rubygems-6167]]
+
+* CGI
+
+ * `CGI.escapeURIComponent` and `CGI.unescapeURIComponent` are added.
+ [[Feature #18822]]
+
+* Coverage
+
+ * `Coverage.setup` now accepts `eval: true`. By this, `eval` and related methods are
+ able to generate code coverage. [[Feature #19008]]
+
+ * `Coverage.supported?(mode)` enables detection of what coverage modes are
+ supported. [[Feature #19026]]
+
+* Date
+
+ * Added `Date#deconstruct_keys` and `DateTime#deconstruct_keys` same as [[Feature #19071]]
+
+* ERB
+
+ * `ERB::Util.html_escape` is made faster than `CGI.escapeHTML`.
+ * It no longer allocates a String object when no character needs to be escaped.
+ * It skips calling `#to_s` method when an argument is already a String.
+ * `ERB::Escape.html_escape` is added as an alias to `ERB::Util.html_escape`,
+ which has not been monkey-patched by Rails.
+ * `ERB::Util.url_encode` is made faster using `CGI.escapeURIComponent`.
+ * `-S` option is removed from `erb` command.
+
+* FileUtils
+
+ * Add FileUtils.ln_sr method and `relative:` option to FileUtils.ln_s.
+ [[Feature #18925]]
+
+* IRB
+
+ * debug.gem integration commands have been added: `debug`, `break`, `catch`,
+ `next`, `delete`, `step`, `continue`, `finish`, `backtrace`, `info`
+ * They work even if you don't have `gem "debug"` in your Gemfile.
+ * See also: [What's new in Ruby 3.2's IRB?](https://st0012.dev/whats-new-in-ruby-3-2-irb)
+ * More Pry-like commands and features have been added.
+ * `edit` and `show_cmds` (like Pry's `help`) are added.
+ * `ls` takes `-g` or `-G` option to filter out outputs.
+ * `show_source` is aliased from `$` and accepts unquoted inputs.
+ * `whereami` is aliased from `@`.
+
+* Net::Protocol
+
+ * Improve `Net::BufferedIO` performance. [[GH-net-protocol-14]]
+
+* Pathname
+
+ * Added `Pathname#lutime`. [[GH-pathname-20]]
+
+* Socket
+
+ * Added the following constants for supported platforms.
+ * `SO_INCOMING_CPU`
+ * `SO_INCOMING_NAPI_ID`
+ * `SO_RTABLE`
+ * `SO_SETFIB`
+ * `SO_USER_COOKIE`
+ * `TCP_KEEPALIVE`
+ * `TCP_CONNECTION_INFO`
+
+* SyntaxSuggest
+
+ * The feature of `syntax_suggest` formerly `dead_end` is integrated in Ruby.
+ [[Feature #18159]]
+
+* UNIXSocket
+
+ * Add support for UNIXSocket on Windows. Emulate anonymous sockets. Add
+ support for File.socket? and File::Stat#socket? where possible.
+ [[Feature #19135]]
+
+* The following default gems are updated.
+
+ * RubyGems 3.4.1
+ * abbrev 0.1.1
+ * benchmark 0.2.1
+ * bigdecimal 3.1.3
+ * bundler 2.4.1
+ * cgi 0.3.6
+ * csv 3.2.6
+ * date 3.3.3
+ * delegate 0.3.0
+ * did_you_mean 1.6.3
+ * digest 3.1.1
+ * drb 2.1.1
+ * english 0.7.2
+ * erb 4.0.2
+ * error_highlight 0.5.1
+ * etc 1.4.2
+ * fcntl 1.0.2
+ * fiddle 1.1.1
+ * fileutils 1.7.0
+ * forwardable 1.3.3
+ * getoptlong 0.2.0
+ * io-console 0.6.0
+ * io-nonblock 0.2.0
+ * io-wait 0.3.0
+ * ipaddr 1.2.5
+ * irb 1.6.2
+ * json 2.6.3
+ * logger 1.5.3
+ * mutex_m 0.1.2
+ * net-http 0.4.0
+ * net-protocol 0.2.1
+ * nkf 0.1.2
+ * open-uri 0.3.0
+ * open3 0.1.2
+ * openssl 3.1.0
+ * optparse 0.3.1
+ * ostruct 0.5.5
+ * pathname 0.2.1
+ * pp 0.4.0
+ * pstore 0.1.2
+ * psych 5.0.1
+ * racc 1.6.2
+ * rdoc 6.5.0
+ * readline-ext 0.1.5
+ * reline 0.3.2
+ * resolv 0.2.2
+ * resolv-replace 0.1.1
+ * securerandom 0.2.2
+ * set 1.0.3
+ * stringio 3.0.4
+ * strscan 3.0.5
+ * syntax_suggest 1.0.2
+ * syslog 0.1.1
+ * tempfile 0.1.3
+ * time 0.2.1
+ * timeout 0.3.1
+ * tmpdir 0.1.3
+ * tsort 0.1.1
+ * un 0.2.1
+ * uri 0.12.0
+ * weakref 0.1.2
+ * win32ole 1.8.9
+ * yaml 0.2.1
+ * zlib 3.0.0
+
+* The following bundled gems are updated.
+
+ * minitest 5.16.3
+ * power_assert 2.0.3
+ * test-unit 3.5.7
+ * net-ftp 0.2.0
+ * net-imap 0.3.4
+ * net-pop 0.1.2
+ * net-smtp 0.3.3
+ * rbs 2.8.2
+ * typeprof 0.21.3
+ * debug 1.7.1
+
+See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/logger/releases) or changelog for details of the default gems or bundled gems.
+
+## Supported platforms
+
+* WebAssembly/WASI is added. See [wasm/README.md] and [ruby.wasm] for more details. [[Feature #18462]]
+
+## Compatibility issues
+
+* `String#to_c` currently treat a sequence of underscores as an end of Complex
+ string. [[Bug #19087]]
+
+* Now `ENV.clone` raises `TypeError` as well as `ENV.dup` [[Bug #17767]]
+
+### Removed constants
+
+The following deprecated constants are removed.
+
+* `Fixnum` and `Bignum` [[Feature #12005]]
+* `Random::DEFAULT` [[Feature #17351]]
+* `Struct::Group`
+* `Struct::Passwd`
+
+### Removed methods
+
+The following deprecated methods are removed.
+
+* `Dir.exists?` [[Feature #17391]]
+* `File.exists?` [[Feature #17391]]
+* `Kernel#=~` [[Feature #15231]]
+* `Kernel#taint`, `Kernel#untaint`, `Kernel#tainted?`
+ [[Feature #16131]]
+* `Kernel#trust`, `Kernel#untrust`, `Kernel#untrusted?`
+ [[Feature #16131]]
+* `Method#public?`, `Method#private?`, `Method#protected?`,
+ `UnboundMethod#public?`, `UnboundMethod#private?`, `UnboundMethod#protected?`
+ [[Bug #18729]] [[Bug #18751]] [[Bug #18435]]
+
+### Source code incompatibility of extension libraries
+
+* Extension libraries provide PRNG, subclasses of Random, need updates.
+ See [PRNG update] below for more information. [[Bug #19100]]
+
+### Error printer
+
+* Ruby no longer escapes control characters and backslashes in an
+ error message. [[Feature #18367]]
+
+### Constant lookup when defining a class/module
+
+* When defining a class/module directly under the Object class by class/module
+ statement, if there is already a class/module defined by `Module#include`
+ with the same name, the statement was handled as "open class" in Ruby 3.1 or before.
+ Since Ruby 3.2, a new class is defined instead. [[Feature #18832]]
+
+## Stdlib compatibility issues
+
+* Psych no longer bundles libyaml sources.
+ And also Fiddle no longer bundles libffi sources.
+ Users need to install the libyaml/libffi library themselves via the package
+ manager like apt, yum, brew, etc.
+
+ Psych and fiddle supported the static build with specific version of libyaml
+ and libffi sources. You can build psych with libyaml-0.2.5 like this.
+
+ ```bash
+ $ ./configure --with-libyaml-source-dir=/path/to/libyaml-0.2.5
+ ```
+
+ And you can build fiddle with libffi-3.4.4 like this.
+
+ ```bash
+ $ ./configure --with-libffi-source-dir=/path/to/libffi-3.4.4
+ ```
+
+ [[Feature #18571]]
+
+* Check cookie name/path/domain characters in `CGI::Cookie`. [[CVE-2021-33621]]
+
+* `URI.parse` return empty string in host instead of nil. [[sec-156615]]
+
+## C API updates
+
+### Updated C APIs
+
+The following APIs are updated.
+
+* PRNG update
+
+ `rb_random_interface_t` in ruby/random.h updated and versioned.
+ Extension libraries which use this interface and built for older
+ versions need to rebuild with adding `init_int32` function.
+
+### Added C APIs
+
+* `VALUE rb_hash_new_capa(long capa)` was added to created hashes with the desired capacity.
+* `rb_internal_thread_add_event_hook` and `rb_internal_thread_add_event_hook` were added to instrument threads scheduling.
+ The following events are available:
+ * `RUBY_INTERNAL_THREAD_EVENT_STARTED`
+ * `RUBY_INTERNAL_THREAD_EVENT_READY`
+ * `RUBY_INTERNAL_THREAD_EVENT_RESUMED`
+ * `RUBY_INTERNAL_THREAD_EVENT_SUSPENDED`
+ * `RUBY_INTERNAL_THREAD_EVENT_EXITED`
+* `rb_debug_inspector_current_depth` and `rb_debug_inspector_frame_depth` are added for debuggers.
+
+### Removed C APIs
+
+The following deprecated APIs are removed.
+
+* `rb_cData` variable.
+* "taintedness" and "trustedness" functions. [[Feature #16131]]
+
+## Implementation improvements
+
+* Fixed several race conditions in Kernel#autoload. [[Bug #18782]]
+* Cache invalidation for expressions referencing constants is now
+ more fine-grained. `RubyVM.stat(:global_constant_state)` was
+ removed because it was closely tied to the previous caching scheme
+ where setting any constant invalidates all caches in the system.
+ New keys, `:constant_cache_invalidations` and `:constant_cache_misses`,
+ were introduced to help with use cases for `:global_constant_state`.
+ [[Feature #18589]]
+* The cache-based optimization for Regexp matching is introduced.
+ [[Feature #19104]]
+* [Variable Width Allocation](https://shopify.engineering/ruby-variable-width-allocation)
+ is now enabled by default. [[Feature #18239]]
+* Added a new instance variable caching mechanism, called object shapes, which
+ improves inline cache hits for most objects and allows us to generate very
+ efficient JIT code. Objects whose instance variables are defined in a
+ consistent order will see the most performance benefits.
+ [[Feature #18776]]
+* Speed up marking instruction sequences by using a bitmap to find "markable"
+ objects. This change results in faster major collections.
+ [[Feature #18875]]
+
+## JIT
+
+### YJIT
+
+* YJIT is no longer experimental
+ * Has been tested on production workloads for over a year and proven to be quite stable.
+* YJIT now supports both x86-64 and arm64/aarch64 CPUs on Linux, MacOS, BSD and other UNIX platforms.
+ * This release brings support for Mac M1/M2, AWS Graviton and Raspberry Pi 4.
+* Building YJIT now requires Rust 1.58.0+. [[Feature #18481]]
+ * In order to ensure that CRuby is built with YJIT, please install `rustc` >= 1.58.0
+ before running `./configure`
+ * Please reach out to the YJIT team should you run into any issues.
+* Physical memory for JIT code is lazily allocated. Unlike Ruby 3.1,
+ the RSS of a Ruby process is minimized because virtual memory pages
+ allocated by `--yjit-exec-mem-size` will not be mapped to physical
+ memory pages until actually utilized by JIT code.
+* Introduce Code GC that frees all code pages when the memory consumption
+ by JIT code reaches `--yjit-exec-mem-size`.
+ * `RubyVM::YJIT.runtime_stats` returns Code GC metrics in addition to
+ existing `inline_code_size` and `outlined_code_size` keys:
+ `code_gc_count`, `live_page_count`, `freed_page_count`, and `freed_code_size`.
+* Most of the statistics produced by `RubyVM::YJIT.runtime_stats` are now available in release builds.
+ * Simply run ruby with `--yjit-stats` to compute and dump stats (incurs some run-time overhead).
+* YJIT is now optimized to take advantage of object shapes. [[Feature #18776]]
+* Take advantage of finer-grained constant invalidation to invalidate less code when defining new constants. [[Feature #18589]]
+* The default `--yjit-exec-mem-size` is changed to 64 (MiB).
+* The default `--yjit-call-threshold` is changed to 30.
+
+### MJIT
+
+* The MJIT compiler is re-implemented in Ruby as `ruby_vm/mjit/compiler`.
+* MJIT compiler is executed under a forked Ruby process instead of
+ doing it in a native thread called MJIT worker. [[Feature #18968]]
+ * As a result, Microsoft Visual Studio (MSWIN) is no longer supported.
+* MinGW is no longer supported. [[Feature #18824]]
+* Rename `--mjit-min-calls` to `--mjit-call-threshold`.
+* Change default `--mjit-max-cache` back from 10000 to 100.
+
+[Feature #12005]: https://bugs.ruby-lang.org/issues/12005
+[Feature #12084]: https://bugs.ruby-lang.org/issues/12084
+[Feature #12655]: https://bugs.ruby-lang.org/issues/12655
+[Feature #12737]: https://bugs.ruby-lang.org/issues/12737
+[Feature #13110]: https://bugs.ruby-lang.org/issues/13110
+[Feature #14332]: https://bugs.ruby-lang.org/issues/14332
+[Feature #15231]: https://bugs.ruby-lang.org/issues/15231
+[Feature #15357]: https://bugs.ruby-lang.org/issues/15357
+[Bug #15928]: https://bugs.ruby-lang.org/issues/15928
+[Feature #16122]: https://bugs.ruby-lang.org/issues/16122
+[Feature #16131]: https://bugs.ruby-lang.org/issues/16131
+[Bug #16466]: https://bugs.ruby-lang.org/issues/16466
+[Feature #16663]: https://bugs.ruby-lang.org/issues/16663
+[Feature #16806]: https://bugs.ruby-lang.org/issues/16806
+[Bug #16889]: https://bugs.ruby-lang.org/issues/16889
+[Bug #16908]: https://bugs.ruby-lang.org/issues/16908
+[Feature #16989]: https://bugs.ruby-lang.org/issues/16989
+[Feature #17351]: https://bugs.ruby-lang.org/issues/17351
+[Feature #17391]: https://bugs.ruby-lang.org/issues/17391
+[Bug #17545]: https://bugs.ruby-lang.org/issues/17545
+[Bug #17767]: https://bugs.ruby-lang.org/issues/17767
+[Feature #17837]: https://bugs.ruby-lang.org/issues/17837
+[Feature #17881]: https://bugs.ruby-lang.org/issues/17881
+[Feature #18033]: https://bugs.ruby-lang.org/issues/18033
+[Feature #18159]: https://bugs.ruby-lang.org/issues/18159
+[Feature #18239]: https://bugs.ruby-lang.org/issues/18239#note-17
+[Feature #18351]: https://bugs.ruby-lang.org/issues/18351
+[Feature #18367]: https://bugs.ruby-lang.org/issues/18367
+[Bug #18435]: https://bugs.ruby-lang.org/issues/18435
+[Feature #18462]: https://bugs.ruby-lang.org/issues/18462
+[Feature #18481]: https://bugs.ruby-lang.org/issues/18481
+[Bug #18487]: https://bugs.ruby-lang.org/issues/18487
+[Feature #18564]: https://bugs.ruby-lang.org/issues/18564
+[Feature #18571]: https://bugs.ruby-lang.org/issues/18571
+[Feature #18585]: https://bugs.ruby-lang.org/issues/18585
+[Feature #18589]: https://bugs.ruby-lang.org/issues/18589
+[Feature #18595]: https://bugs.ruby-lang.org/issues/18595
+[Feature #18598]: https://bugs.ruby-lang.org/issues/18598
+[Bug #18625]: https://bugs.ruby-lang.org/issues/18625
+[Feature #18630]: https://bugs.ruby-lang.org/issues/18630
+[Bug #18633]: https://bugs.ruby-lang.org/issues/18633
+[Feature #18639]: https://bugs.ruby-lang.org/issues/18639
+[Feature #18685]: https://bugs.ruby-lang.org/issues/18685
+[Bug #18729]: https://bugs.ruby-lang.org/issues/18729
+[Bug #18751]: https://bugs.ruby-lang.org/issues/18751
+[Feature #18774]: https://bugs.ruby-lang.org/issues/18774
+[Feature #18776]: https://bugs.ruby-lang.org/issues/18776
+[Bug #18782]: https://bugs.ruby-lang.org/issues/18782
+[Feature #18788]: https://bugs.ruby-lang.org/issues/18788
+[Feature #18798]: https://bugs.ruby-lang.org/issues/18798
+[Feature #18809]: https://bugs.ruby-lang.org/issues/18809
+[Feature #18821]: https://bugs.ruby-lang.org/issues/18821
+[Feature #18822]: https://bugs.ruby-lang.org/issues/18822
+[Feature #18824]: https://bugs.ruby-lang.org/issues/18824
+[Feature #18832]: https://bugs.ruby-lang.org/issues/18832
+[Feature #18875]: https://bugs.ruby-lang.org/issues/18875
+[Feature #18925]: https://bugs.ruby-lang.org/issues/18925
+[Feature #18944]: https://bugs.ruby-lang.org/issues/18944
+[Feature #18949]: https://bugs.ruby-lang.org/issues/18949
+[Feature #18968]: https://bugs.ruby-lang.org/issues/18968
+[Feature #19008]: https://bugs.ruby-lang.org/issues/19008
+[Feature #19013]: https://bugs.ruby-lang.org/issues/19013
+[Feature #19026]: https://bugs.ruby-lang.org/issues/19026
+[Feature #19036]: https://bugs.ruby-lang.org/issues/19036
+[Feature #19060]: https://bugs.ruby-lang.org/issues/19060
+[Feature #19070]: https://bugs.ruby-lang.org/issues/19070
+[Feature #19071]: https://bugs.ruby-lang.org/issues/19071
+[Feature #19078]: https://bugs.ruby-lang.org/issues/19078
+[Bug #19087]: https://bugs.ruby-lang.org/issues/19087
+[Bug #19100]: https://bugs.ruby-lang.org/issues/19100
+[Feature #19104]: https://bugs.ruby-lang.org/issues/19104
+[Feature #19135]: https://bugs.ruby-lang.org/issues/19135
+[Feature #19138]: https://bugs.ruby-lang.org/issues/19138
+[Feature #19194]: https://bugs.ruby-lang.org/issues/19194
+[Molinillo]: https://github.com/CocoaPods/Molinillo
+[PubGrub]: https://github.com/jhawthorn/pub_grub
+[GH-net-protocol-14]: https://github.com/ruby/net-protocol/pull/14
+[GH-pathname-20]: https://github.com/ruby/pathname/pull/20
+[GH-6791]: https://github.com/ruby/ruby/pull/6791
+[GH-6868]: https://github.com/ruby/ruby/pull/6868
+[GH-rubygems-4475]: https://github.com/rubygems/rubygems/pull/4475
+[GH-rubygems-6149]: https://github.com/rubygems/rubygems/pull/6149
+[GH-rubygems-6167]: https://github.com/rubygems/rubygems/pull/6167
+[sec-156615]: https://hackerone.com/reports/156615
+[CVE-2021-33621]: https://www.ruby-lang.org/en/news/2022/11/22/http-response-splitting-in-cgi-cve-2021-33621/
+[wasm/README.md]: https://github.com/ruby/ruby/blob/master/wasm/README.md
+[ruby.wasm]: https://github.com/ruby/ruby.wasm
diff --git a/README.ja.md b/README.ja.md
index 4e1e6b9d87..93c0131690 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -1,10 +1,9 @@
-[![Build Status](https://travis-ci.org/ruby/ruby.svg?branch=master)](https://travis-ci.org/ruby/ruby)
-[![Build status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
-![](https://github.com/ruby/ruby/workflows/Cygwin/badge.svg)
-![](https://github.com/ruby/ruby/workflows/macOS/badge.svg)
-![](https://github.com/ruby/ruby/workflows/MJIT/badge.svg)
-![](https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg)
-![](https://github.com/ruby/ruby/workflows/Windows/badge.svg)
+[![Actions Status: MinGW](https://github.com/ruby/ruby/workflows/MinGW/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"MinGW")
+[![Actions Status: MJIT](https://github.com/ruby/ruby/workflows/MJIT/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"MJIT")
+[![Actions Status: Ubuntu](https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Ubuntu")
+[![Actions Status: Windows](https://github.com/ruby/ruby/workflows/Windows/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Windows")
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
+[![Travis Status](https://app.travis-ci.com/ruby/ruby.svg?branch=master)](https://app.travis-ci.com/ruby/ruby)
# Rubyã¨ã¯
@@ -52,11 +51,11 @@ Rubyリãƒã‚¸ãƒˆãƒªã®æœ¬æ¥ã®master㯠https://git.ruby-lang.org/ruby.git ã«ã
### Subversion
-å¤ã„Rubyã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§å–å¾—ã§ãã¾ã™ï¼Ž
+å¤ã„Rubyã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã‚‚å–å¾—ã§ãã¾ã™ï¼Ž
$ svn co https://svn.ruby-lang.org/repos/ruby/branches/ruby_2_6/ ruby
-ä»–ã«é–‹ç™ºä¸­ã®ãƒ–ランãƒã®ä¸€è¦§ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¦‹ã‚‰ã‚Œã¾ã™ï¼Ž
+ä»–ã®ãƒ–ランãƒã®ä¸€è¦§ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¦‹ã‚‰ã‚Œã¾ã™ï¼Ž
$ svn ls https://svn.ruby-lang.org/repos/ruby/branches/
@@ -71,38 +70,33 @@ https://www.ruby-lang.org/
## メーリングリスト
-Rubyã®ãƒ¡ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚¹ãƒˆãŒã‚りã¾ã™ï¼Žå‚åŠ å¸Œæœ›ã®æ–¹ã¯
-
-mailto:ruby-list-request@ruby-lang.org
-
-ã¾ã§æœ¬æ–‡ã«
+Rubyã®ãƒ¡ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚¹ãƒˆãŒã‚りã¾ã™ï¼Žå‚åŠ å¸Œæœ›ã®æ–¹ã¯ [ruby-list-request@ruby-lang.org] ã¾ã§æœ¬æ–‡ã«
subscribe
ã¨æ›¸ã„ã¦é€ã£ã¦ä¸‹ã•ã„.
-Ruby開発者å‘ã‘メーリングリストもã‚りã¾ã™ï¼Žã“ã¡ã‚‰ã§ã¯rubyã®ãƒã‚°ï¼Œå°†æ¥ã®ä»•様拡張ãªã©å®Ÿè£…上ã®å•題ã«ã¤ã„ã¦è­°è«–ã•れã¦ã„ã¾ã™ï¼Ž å‚åŠ å¸Œæœ›ã®æ–¹ã¯
-
-mailto:ruby-dev-request@ruby-lang.org
-
-ã¾ã§ruby-listã¨åŒæ§˜ã®æ–¹æ³•ã§ãƒ¡ãƒ¼ãƒ«ã—ã¦ãã ã•ã„.
+Ruby開発者å‘ã‘メーリングリストもã‚りã¾ã™ï¼Žã“ã¡ã‚‰ã§ã¯rubyã®ãƒã‚°ï¼Œå°†æ¥ã®ä»•様拡張ãªã©å®Ÿè£…上ã®å•題ã«ã¤ã„ã¦è­°è«–ã•れã¦ã„ã¾ã™ï¼Ž
+å‚åŠ å¸Œæœ›ã®æ–¹ã¯ [ruby-dev-request@ruby-lang.org] ã¾ã§ruby-listã¨åŒæ§˜ã®æ–¹æ³•ã§ãƒ¡ãƒ¼ãƒ«ã—ã¦ãã ã•ã„.
Ruby拡張モジュールã«ã¤ã„ã¦è©±ã—åˆã†ruby-extãƒ¡ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚¹ãƒˆã¨æ•°å­¦é–¢ä¿‚ã®è©±é¡Œã«ã¤ã„ã¦è©±ã—åˆã†ruby-mathメーリングリストã¨
英語ã§rubyã«ã¤ã„ã¦è©±ã—åˆã†ruby-talkメーリングリストもã‚りã¾ã™ï¼Žå‚加方法ã¯ã©ã‚Œã‚‚åŒã˜ã§ã™ï¼Ž
+[ruby-list-request@ruby-lang.org]: mailto:ruby-list-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe
+[ruby-dev-request@ruby-lang.org]: mailto:ruby-dev-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe
+
## コンパイル・インストール
ä»¥ä¸‹ã®æ‰‹é †ã§è¡Œã£ã¦ãã ã•ã„.
-1. ã‚‚ã— `configure` ファイルãŒè¦‹ã¤ã‹ã‚‰ãªã„,もã—ã㯠`configure.ac` よりå¤ã„よã†ãªã‚‰ï¼Œ `autoconf` を実行ã—ã¦
- æ–°ã—ã `configure` を生æˆã™ã‚‹
+1. (Gitリãƒã‚¸ãƒˆãƒªã‹ã‚‰å–å¾—ã—ãŸã‚½ãƒ¼ã‚¹ã‚’ビルドã™ã‚‹å ´åˆ) `./autogen.sh` を実行ã—ã¦æ–°ã—ã `configure` を生æˆã™ã‚‹
2. `configure` を実行ã—㦠`Makefile` ãªã©ã‚’生æˆã™ã‚‹
環境ã«ã‚ˆã£ã¦ã¯ãƒ‡ãƒ•ォルトã®Cコンパイラ用オプションãŒä»˜ãã¾ã™ï¼Ž `configure` オプション㧠`optflags=..`
`warnflags=..` ç­‰ã§ä¸Šæ›¸ãã§ãã¾ã™ï¼Ž
-3. (å¿…è¦ãªã‚‰ã°)`defines.h` を編集ã™ã‚‹
+3. (å¿…è¦ãªã‚‰ã°)`include/ruby/defines.h` を編集ã™ã‚‹
多分,必è¦ç„¡ã„ã¨æ€ã„ã¾ã™ï¼Ž
@@ -172,11 +166,14 @@ UNIXã§ã‚れ㰠`configure` ãŒã»ã¨ã‚“ã©ã®å·®ç•°ã‚’å¸åŽã—ã¦ãれるã¯
## フィードãƒãƒƒã‚¯
-Rubyã«é–¢ã™ã‚‹è³ªå•㯠Ruby-Talk(英語)や Ruby-List(日本語) (https://www.ruby-lang.org/ja/community/mailing-lists) や,
-stackoverflow (https://ja.stackoverflow.com/) ãªã©ã®Webã‚µã‚¤ãƒˆã«æŠ•ç¨¿ã—ã¦ãã ã•ã„.
+Rubyã«é–¢ã™ã‚‹è³ªå•㯠[Ruby-Talk](英語)や [Ruby-List](日本語)や,
+[stackoverflow] ãªã©ã®Webã‚µã‚¤ãƒˆã«æŠ•ç¨¿ã—ã¦ãã ã•ã„.
ãƒã‚°å ±å‘Šã¯ https://bugs.ruby-lang.org ã§å—ã‘付ã‘ã¦ã„ã¾ã™ï¼Ž
+[Ruby-Talk]: https://www.ruby-lang.org/en/community/mailing-lists
+[Ruby-List]: https://www.ruby-lang.org/ja/community/mailing-lists
+[stackoverflow]: https://ja.stackoverflow.com/
## 著者
diff --git a/README.md b/README.md
index 1e935095c6..c445448c71 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,11 @@
-[![Build Status](https://travis-ci.org/ruby/ruby.svg?branch=master)](https://travis-ci.org/ruby/ruby)
-[![Build status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
-![](https://github.com/ruby/ruby/workflows/Cygwin/badge.svg)
-![](https://github.com/ruby/ruby/workflows/macOS/badge.svg)
-![](https://github.com/ruby/ruby/workflows/MJIT/badge.svg)
-![](https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg)
-![](https://github.com/ruby/ruby/workflows/Windows/badge.svg)
+[![Actions Status: MinGW](https://github.com/ruby/ruby/workflows/MinGW/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"MinGW")
+[![Actions Status: MJIT](https://github.com/ruby/ruby/workflows/MJIT/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"MJIT")
+[![Actions Status: Ubuntu](https://github.com/ruby/ruby/workflows/Ubuntu/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Ubuntu")
+[![Actions Status: Windows](https://github.com/ruby/ruby/workflows/Windows/badge.svg)](https://github.com/ruby/ruby/actions?query=workflow%3A"Windows")
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/0sy8rrxut4o0k960/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/ruby/branch/master)
+[![Travis Status](https://app.travis-ci.com/ruby/ruby.svg?branch=master)](https://app.travis-ci.com/ruby/ruby)
-# What's Ruby
+# What is Ruby?
Ruby is an interpreted object-oriented programming language often
used for web development. It also offers many scripting features
@@ -15,28 +14,25 @@ It is simple, straightforward, and extensible.
## Features of Ruby
-* Simple Syntax
-* **Normal** Object-oriented Features (e.g. class, method calls)
-* **Advanced** Object-oriented Features (e.g. mix-in, singleton-method)
-* Operator Overloading
-* Exception Handling
-* Iterators and Closures
-* Garbage Collection
-* Dynamic Loading of Object Files (on some architectures)
-* Highly Portable (works on many Unix-like/POSIX compatible platforms as
- well as Windows, macOS, Haiku, etc.) cf.
- https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc#platform-maintainers
+* Simple Syntax
+* **Normal** Object-oriented Features (e.g. class, method calls)
+* **Advanced** Object-oriented Features (e.g. mix-in, singleton-method)
+* Operator Overloading
+* Exception Handling
+* Iterators and Closures
+* Garbage Collection
+* Dynamic Loading of Object Files (on some architectures)
+* Highly Portable (works on many Unix-like/POSIX compatible platforms as
+ well as Windows, macOS, etc.) cf.
+ https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers
-
-## How to get Ruby
+## How to get Ruby with Git
For a complete list of ways to install Ruby, including using third-party tools
like rvm, see:
https://www.ruby-lang.org/en/downloads/
-### Git
-
The mirror of the Ruby source tree can be checked out with the following command:
$ git clone https://github.com/ruby/ruby.git
@@ -49,21 +45,19 @@ to see the list of branches:
You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source)
if you are a committer.
-### Subversion
-
-Stable branches for older Ruby versions can be checked out with the following command:
-
- $ svn co https://svn.ruby-lang.org/repos/ruby/branches/ruby_2_6/ ruby
-
-Try the following command to see the list of branches:
-
- $ svn ls https://svn.ruby-lang.org/repos/ruby/branches/
+## How to build
+see [Building Ruby](doc/contributing/building_ruby.md)
## Ruby home page
https://www.ruby-lang.org/
+## Documentation
+
+- [English](https://docs.ruby-lang.org/en/master/index.html)
+- [Japanese](https://docs.ruby-lang.org/ja/master/index.html)
+
## Mailing list
There is a mailing list to discuss Ruby. To subscribe to this list, please
@@ -71,103 +65,24 @@ send the following phrase:
subscribe
-in the mail body (not subject) to the address
-[ruby-talk-request@ruby-lang.org](mailto:ruby-talk-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe).
-
-## How to compile and install
-
-1. If you want to use Microsoft Visual C++ to compile Ruby, read
- [win32/README.win32](win32/README.win32) instead of this document.
-
-2. If `./configure` does not exist or is older than `configure.ac`, run
- `autoconf` to (re)generate configure.
-
-3. Run `./configure`, which will generate `config.h` and `Makefile`.
-
- Some C compiler flags may be added by default depending on your
- environment. Specify `optflags=..` and `warnflags=..` as necessary to
- override them.
-
-4. Edit `defines.h` if you need. Usually this step will not be needed.
-
-5. Remove comment mark(`#`) before the module names from `ext/Setup` (or add
- module names if not present), if you want to link modules statically.
-
- If you don't want to compile non static extension modules (probably on
- architectures which do not allow dynamic loading), remove comment mark
- from the line "`#option nodynamic`" in `ext/Setup`.
+in the mail body (not subject) to the address [ruby-talk-request@ruby-lang.org].
- Usually this step will not be needed.
-
-6. Run `make`.
-
- * On Mac, set RUBY\_CODESIGN environment variable with a signing identity.
- It uses the identity to sign `ruby` binary. See also codesign(1).
-
-7. Optionally, run '`make check`' to check whether the compiled Ruby
- interpreter works well. If you see the message "`check succeeded`", your
- Ruby works as it should (hopefully).
-
-8. Optionally, run `make update-gems` and `make extract-gems`.
-
- If you want to install bundled gems, run `make update-gems` and
- `make extract-gems` before running `make install`.
-
-9. Run '`make install`'.
-
- This command will create the following directories and install files into
- them.
-
- * `${DESTDIR}${prefix}/bin`
- * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}`
- * `${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
- * `${DESTDIR}${prefix}/lib`
- * `${DESTDIR}${prefix}/lib/ruby`
- * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}`
- * `${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
- * `${DESTDIR}${prefix}/lib/ruby/site_ruby`
- * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}`
- * `${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
- * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby`
- * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}`
- * `${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}`
- * `${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}`
- * `${DESTDIR}${prefix}/share/man/man1`
- * `${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system`
-
-
- If Ruby's API version is '*x.y.z*', the `${MAJOR}` is '*x*', the
- `${MINOR}` is '*y*', and the `${TEENY}` is '*z*'.
-
- **NOTE**: teeny of the API version may be different from one of Ruby's
- program version
-
- You may have to be a super user to install Ruby.
-
-If you fail to compile Ruby, please send the detailed error report with the
-error log and machine/OS type, to help others.
-
-Some extension libraries may not get compiled because of lack of necessary
-external libraries and/or headers, then you will need to run '`make distclean-ext`'
-to remove old configuration after installing them in such case.
+[ruby-talk-request@ruby-lang.org]: mailto:ruby-talk-request@ruby-lang.org?subject=Join%20Ruby%20Mailing%20List&body=subscribe
## Copying
-See the file [COPYING](COPYING).
+See the file [COPYING](rdoc-ref:COPYING).
## Feedback
-Questions about the Ruby language can be asked on the Ruby-Talk mailing list
-(https://www.ruby-lang.org/en/community/mailing-lists) or on websites like
-(https://stackoverflow.com).
-
-Bugs should be reported at https://bugs.ruby-lang.org. Read [HowToReport] for more information.
+Questions about the Ruby language can be asked on the [Ruby-Talk](https://www.ruby-lang.org/en/community/mailing-lists) mailing list
+or on websites like https://stackoverflow.com.
-[HowToReport]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToReport
+Bugs should be reported at https://bugs.ruby-lang.org. Read ["Reporting Issues"](https://docs.ruby-lang.org/en/master/contributing/reporting_issues_md.html) for more information.
## Contributing
-See the file [CONTRIBUTING.md](CONTRIBUTING.md)
+See ["Contributing to Ruby"](https://docs.ruby-lang.org/en/master/contributing_md.html), which includes setup and build instructions.
## The Author
diff --git a/aclocal.m4 b/aclocal.m4
index ed7d14ef63..e69de29bb2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,47 +0,0 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_include([tool/m4/_colorize_result_prepare.m4])
-m4_include([tool/m4/ac_msg_result.m4])
-m4_include([tool/m4/colorize_result.m4])
-m4_include([tool/m4/ruby_append_option.m4])
-m4_include([tool/m4/ruby_append_options.m4])
-m4_include([tool/m4/ruby_check_builtin_func.m4])
-m4_include([tool/m4/ruby_check_builtin_setjmp.m4])
-m4_include([tool/m4/ruby_check_printf_prefix.m4])
-m4_include([tool/m4/ruby_check_setjmp.m4])
-m4_include([tool/m4/ruby_check_signedness.m4])
-m4_include([tool/m4/ruby_check_sizeof.m4])
-m4_include([tool/m4/ruby_check_sysconf.m4])
-m4_include([tool/m4/ruby_cppoutfile.m4])
-m4_include([tool/m4/ruby_decl_attribute.m4])
-m4_include([tool/m4/ruby_default_arch.m4])
-m4_include([tool/m4/ruby_define_if.m4])
-m4_include([tool/m4/ruby_defint.m4])
-m4_include([tool/m4/ruby_dtrace_available.m4])
-m4_include([tool/m4/ruby_dtrace_postprocess.m4])
-m4_include([tool/m4/ruby_func_attribute.m4])
-m4_include([tool/m4/ruby_mingw32.m4])
-m4_include([tool/m4/ruby_prepend_option.m4])
-m4_include([tool/m4/ruby_prog_gnu_ld.m4])
-m4_include([tool/m4/ruby_replace_funcs.m4])
-m4_include([tool/m4/ruby_replace_type.m4])
-m4_include([tool/m4/ruby_rm_recursive.m4])
-m4_include([tool/m4/ruby_setjmp_type.m4])
-m4_include([tool/m4/ruby_stack_grow_direction.m4])
-m4_include([tool/m4/ruby_try_cflags.m4])
-m4_include([tool/m4/ruby_try_ldflags.m4])
-m4_include([tool/m4/ruby_type_attribute.m4])
-m4_include([tool/m4/ruby_universal_arch.m4])
-m4_include([tool/m4/ruby_werror_flag.m4])
diff --git a/addr2line.c b/addr2line.c
index 635194b96b..e5f25293e2 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -13,7 +13,7 @@
#pragma clang diagnostic ignored "-Wgcc-compat"
#endif
-#include "ruby/config.h"
+#include "ruby/internal/config.h"
#include "ruby/defines.h"
#include "ruby/missing.h"
#include "addr2line.h"
@@ -25,11 +25,7 @@
#include <libproc.h>
#endif
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#else
-#include "missing/stdbool.h"
-#endif
+#include "ruby/internal/stdbool.h"
#if defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H)
@@ -163,11 +159,15 @@ typedef struct obj_info {
struct dwarf_section debug_info;
struct dwarf_section debug_line;
struct dwarf_section debug_ranges;
+ struct dwarf_section debug_str_offsets;
+ struct dwarf_section debug_addr;
+ struct dwarf_section debug_rnglists;
struct dwarf_section debug_str;
+ struct dwarf_section debug_line_str;
struct obj_info *next;
} obj_info_t;
-#define DWARF_SECTION_COUNT 5
+#define DWARF_SECTION_COUNT 9
static struct dwarf_section *
obj_dwarf_section_at(obj_info_t *obj, int n)
@@ -177,7 +177,11 @@ obj_dwarf_section_at(obj_info_t *obj, int n)
&obj->debug_info,
&obj->debug_line,
&obj->debug_ranges,
- &obj->debug_str
+ &obj->debug_str_offsets,
+ &obj->debug_addr,
+ &obj->debug_rnglists,
+ &obj->debug_str,
+ &obj->debug_line_str
};
if (n < 0 || DWARF_SECTION_COUNT <= n) {
abort();
@@ -194,12 +198,12 @@ struct debug_section_definition {
static char binary_filename[PATH_MAX + 1];
static unsigned long
-uleb128(char **p)
+uleb128(const char **p)
{
unsigned long r = 0;
int s = 0;
for (;;) {
- unsigned char b = *(unsigned char *)(*p)++;
+ unsigned char b = (unsigned char)*(*p)++;
if (b < 0x80) {
r += (unsigned long)b << s;
break;
@@ -211,12 +215,12 @@ uleb128(char **p)
}
static long
-sleb128(char **p)
+sleb128(const char **p)
{
long r = 0;
int s = 0;
for (;;) {
- unsigned char b = *(unsigned char *)(*p)++;
+ unsigned char b = (unsigned char)*(*p)++;
if (b < 0x80) {
if (b & 0x40) {
r -= (0x80 - b) << s;
@@ -233,7 +237,7 @@ sleb128(char **p)
}
static const char *
-get_nth_dirname(unsigned long dir, char *p)
+get_nth_dirname(unsigned long dir, const char *p)
{
if (!dir--) {
return "";
@@ -250,39 +254,51 @@ get_nth_dirname(unsigned long dir, char *p)
return p;
}
+static const char *parse_ver5_debug_line_header(const char *p, int idx, uint8_t format, obj_info_t *obj, const char **out_path, uint64_t *out_directory_index);
+
static void
-fill_filename(int file, char *include_directories, char *filenames, line_info_t *line, obj_info_t *obj)
+fill_filename(int file, uint8_t format, uint16_t version, const char *include_directories, const char *filenames, line_info_t *line, obj_info_t *obj)
{
int i;
- char *p = filenames;
- char *filename;
+ const char *p = filenames;
+ const char *filename;
unsigned long dir;
- for (i = 1; i <= file; i++) {
- filename = p;
- if (!*p) {
- /* Need to output binary file name? */
- kprintf("Unexpected file number %d in %s at %tx\n",
- file, binary_filename, filenames - obj->mapped);
- return;
- }
- while (*p) p++;
- p++;
- dir = uleb128(&p);
- /* last modified. */
- uleb128(&p);
- /* size of the file. */
- uleb128(&p);
-
- if (i == file) {
- line->filename = filename;
- line->dirname = get_nth_dirname(dir, include_directories);
- }
+ if (version >= 5) {
+ const char *path;
+ uint64_t directory_index = -1;
+ parse_ver5_debug_line_header(filenames, file, format, obj, &path, &directory_index);
+ line->filename = path;
+ parse_ver5_debug_line_header(include_directories, (int)directory_index, format, obj, &path, NULL);
+ line->dirname = path;
+ }
+ else {
+ for (i = 1; i <= file; i++) {
+ filename = p;
+ if (!*p) {
+ /* Need to output binary file name? */
+ kprintf("Unexpected file number %d in %s at %tx\n",
+ file, binary_filename, filenames - obj->mapped);
+ return;
+ }
+ while (*p) p++;
+ p++;
+ dir = uleb128(&p);
+ /* last modified. */
+ uleb128(&p);
+ /* size of the file. */
+ uleb128(&p);
+
+ if (i == file) {
+ line->filename = filename;
+ line->dirname = get_nth_dirname(dir, include_directories);
+ }
+ }
}
}
static void
fill_line(int num_traces, void **traces, uintptr_t addr, int file, int line,
- char *include_directories, char *filenames,
+ uint8_t format, uint16_t version, const char *include_directories, const char *filenames,
obj_info_t *obj, line_info_t *lines, int offset)
{
int i;
@@ -292,7 +308,7 @@ fill_line(int num_traces, void **traces, uintptr_t addr, int file, int line,
/* We assume one line code doesn't result >100 bytes of native code.
We may want more reliable way eventually... */
if (addr < a && a < addr + 100) {
- fill_filename(file, include_directories, filenames, &lines[i], obj);
+ fill_filename(file, format, version, include_directories, filenames, &lines[i], obj);
lines[i].line = line;
}
}
@@ -317,7 +333,7 @@ struct LineNumberProgramHeader {
};
static int
-parse_debug_line_header(const char **pp, struct LineNumberProgramHeader *header)
+parse_debug_line_header(obj_info_t *obj, const char **pp, struct LineNumberProgramHeader *header)
{
const char *p = *pp;
header->unit_length = *(uint32_t *)p;
@@ -334,7 +350,13 @@ parse_debug_line_header(const char **pp, struct LineNumberProgramHeader *header)
header->version = *(uint16_t *)p;
p += sizeof(uint16_t);
- if (header->version > 4) return -1;
+ if (header->version > 5) return -1;
+
+ if (header->version >= 5) {
+ /* address_size = *(uint8_t *)p++; */
+ /* segment_selector_size = *(uint8_t *)p++; */
+ p += 2;
+ }
header->header_length = header->format == 4 ? *(uint32_t *)p : *(uint64_t *)p;
p += header->format;
@@ -355,20 +377,27 @@ parse_debug_line_header(const char **pp, struct LineNumberProgramHeader *header)
/* header->standard_opcode_lengths = (uint8_t *)p - 1; */
p += header->opcode_base - 1;
- header->include_directories = p;
+ if (header->version >= 5) {
+ header->include_directories = p;
+ p = parse_ver5_debug_line_header(p, -1, header->format, obj, NULL, NULL);
+ header->filenames = p;
+ }
+ else {
+ header->include_directories = p;
- /* temporary measure for compress-debug-sections */
- if (p >= header->cu_end) return -1;
+ /* temporary measure for compress-debug-sections */
+ if (p >= header->cu_end) return -1;
- /* skip include directories */
- while (*p) {
- p = memchr(p, '\0', header->cu_end - p);
- if (!p) return -1;
- p++;
- }
- p++;
+ /* skip include directories */
+ while (*p) {
+ p = memchr(p, '\0', header->cu_end - p);
+ if (!p) return -1;
+ p++;
+ }
+ p++;
- header->filenames = p;
+ header->filenames = p;
+ }
*pp = header->cu_start;
@@ -376,7 +405,7 @@ parse_debug_line_header(const char **pp, struct LineNumberProgramHeader *header)
}
static int
-parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
+parse_debug_line_cu(int num_traces, void **traces, const char **debug_line,
obj_info_t *obj, line_info_t *lines, int offset)
{
const char *p = (const char *)*debug_line;
@@ -394,15 +423,17 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
/* int epilogue_begin = 0; */
/* unsigned int isa = 0; */
- if (parse_debug_line_header(&p, &header))
+ if (parse_debug_line_header(obj, &p, &header))
return -1;
is_stmt = header.default_is_stmt;
#define FILL_LINE() \
do { \
fill_line(num_traces, traces, addr, file, line, \
- (char *)header.include_directories, \
- (char *)header.filenames, \
+ header.format, \
+ header.version, \
+ header.include_directories, \
+ header.filenames, \
obj, lines, offset); \
/*basic_block = prologue_end = epilogue_begin = 0;*/ \
} while (0)
@@ -415,19 +446,19 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
FILL_LINE();
break;
case DW_LNS_advance_pc:
- a = uleb128((char **)&p);
+ a = uleb128(&p) * header.minimum_instruction_length;
addr += a;
break;
case DW_LNS_advance_line: {
- long a = sleb128((char **)&p);
+ long a = sleb128(&p);
line += a;
break;
}
case DW_LNS_set_file:
- file = (unsigned int)uleb128((char **)&p);
+ file = (unsigned int)uleb128(&p);
break;
case DW_LNS_set_column:
- /*column = (unsigned int)*/(void)uleb128((char **)&p);
+ /*column = (unsigned int)*/(void)uleb128(&p);
break;
case DW_LNS_negate_stmt:
is_stmt = !is_stmt;
@@ -441,7 +472,8 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
addr += a;
break;
case DW_LNS_fixed_advance_pc:
- a = *(unsigned char *)p++;
+ a = *(uint16_t *)p;
+ p += sizeof(uint16_t);
addr += a;
break;
case DW_LNS_set_prologue_end:
@@ -451,10 +483,10 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
/* epilogue_begin = 1; */
break;
case DW_LNS_set_isa:
- /* isa = (unsigned int)*/(void)uleb128((char **)&p);
+ /* isa = (unsigned int)*/(void)uleb128(&p);
break;
case 0:
- a = *(unsigned char *)p++;
+ a = uleb128(&p);
op = *p++;
switch (op) {
case DW_LNE_end_sequence:
@@ -478,7 +510,7 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
break;
case DW_LNE_set_discriminator:
/* TODO:currently ignore */
- uleb128((char **)&p);
+ uleb128(&p);
break;
default:
kprintf("Unknown extended opcode: %d in %s\n",
@@ -501,10 +533,10 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
static int
parse_debug_line(int num_traces, void **traces,
- char *debug_line, unsigned long size,
+ const char *debug_line, unsigned long size,
obj_info_t *obj, line_info_t *lines, int offset)
{
- char *debug_line_end = debug_line + size;
+ const char *debug_line_end = debug_line + size;
while (debug_line < debug_line_end) {
if (parse_debug_line_cu(num_traces, traces, &debug_line, obj, lines, offset))
return -1;
@@ -530,13 +562,25 @@ append_obj(obj_info_t **objp)
}
#ifdef USE_ELF
+/* Ideally we should check 4 paths to follow gnu_debuglink:
+ *
+ * - /usr/lib/debug/.build-id/ab/cdef1234.debug
+ * - /usr/bin/ruby.debug
+ * - /usr/bin/.debug/ruby.debug
+ * - /usr/lib/debug/usr/bin/ruby.debug.
+ *
+ * but we handle only two cases for now as the two formats are
+ * used by some linux distributions.
+ *
+ * See GDB's info for detail.
+ * https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
+ */
+
+// check the path pattern of "/usr/lib/debug/usr/bin/ruby.debug"
static void
follow_debuglink(const char *debuglink, int num_traces, void **traces,
obj_info_t **objp, line_info_t *lines, int offset)
{
- /* Ideally we should check 4 paths to follow gnu_debuglink,
- but we handle only one case for now as this format is used
- by some linux distributions. See GDB's info for detail. */
static const char global_debug_dir[] = "/usr/lib/debug";
const size_t global_debug_dir_len = sizeof(global_debug_dir) - 1;
char *p;
@@ -563,6 +607,37 @@ follow_debuglink(const char *debuglink, int num_traces, void **traces,
o2->path = o1->path;
fill_lines(num_traces, traces, 0, objp, lines, offset);
}
+
+// check the path pattern of "/usr/lib/debug/.build-id/ab/cdef1234.debug"
+static void
+follow_debuglink_build_id(const char *build_id, size_t build_id_size, int num_traces, void **traces,
+ obj_info_t **objp, line_info_t *lines, int offset)
+{
+ static const char global_debug_dir[] = "/usr/lib/debug/.build-id/";
+ const size_t global_debug_dir_len = sizeof(global_debug_dir) - 1;
+ char *p;
+ obj_info_t *o1 = *objp, *o2;
+ size_t i;
+
+ if (PATH_MAX < global_debug_dir_len + 1 + build_id_size * 2 + 6) return;
+
+ memcpy(binary_filename, global_debug_dir, global_debug_dir_len);
+ p = binary_filename + global_debug_dir_len;
+ for (i = 0; i < build_id_size; i++) {
+ static const char tbl[] = "0123456789abcdef";
+ unsigned char n = build_id[i];
+ *p++ = tbl[n / 16];
+ *p++ = tbl[n % 16];
+ if (i == 0) *p++ = '/';
+ }
+ strcpy(p, ".debug");
+
+ append_obj(objp);
+ o2 = *objp;
+ o2->base_addr = o1->base_addr;
+ o2->path = o1->path;
+ fill_lines(num_traces, traces, 0, objp, lines, offset);
+}
#endif
enum
@@ -768,32 +843,51 @@ enum
DW_FORM_addrx4 = 0x2c
};
+/* Range list entry encodings */
+enum {
+ DW_RLE_end_of_list = 0x00,
+ DW_RLE_base_addressx = 0x01,
+ DW_RLE_startx_endx = 0x02,
+ DW_RLE_startx_length = 0x03,
+ DW_RLE_offset_pair = 0x04,
+ DW_RLE_base_address = 0x05,
+ DW_RLE_start_end = 0x06,
+ DW_RLE_start_length = 0x07
+};
+
enum {
VAL_none = 0,
VAL_cstr = 1,
VAL_data = 2,
VAL_uint = 3,
- VAL_int = 4
+ VAL_int = 4,
+ VAL_addr = 5
};
# define ABBREV_TABLE_SIZE 256
typedef struct {
obj_info_t *obj;
- char *file;
- char *current_cu;
+ const char *file;
+ uint8_t current_version;
+ const char *current_cu;
uint64_t current_low_pc;
- char *debug_line_cu_end;
- char *debug_line_files;
- char *debug_line_directories;
- char *p;
- char *cu_end;
- char *pend;
- char *q0;
- char *q;
+ uint64_t current_str_offsets_base;
+ uint64_t current_addr_base;
+ uint64_t current_rnglists_base;
+ const char *debug_line_cu_end;
+ uint8_t debug_line_format;
+ uint16_t debug_line_version;
+ const char *debug_line_files;
+ const char *debug_line_directories;
+ const char *p;
+ const char *cu_end;
+ const char *pend;
+ const char *q0;
+ const char *q;
int format; // 4 or 8
uint8_t address_size;
int level;
- char *abbrev_table[ABBREV_TABLE_SIZE];
+ const char *abbrev_table[ABBREV_TABLE_SIZE];
} DebugInfoReader;
typedef struct {
@@ -804,9 +898,10 @@ typedef struct {
typedef struct {
union {
- char *ptr;
+ const char *ptr;
uint64_t uint64;
int64_t int64;
+ uint64_t addr_idx;
} as;
uint64_t off;
uint64_t at;
@@ -815,8 +910,11 @@ typedef struct {
int type;
} DebugInfoValue;
-/* TODO: Big Endian */
+#if defined(WORDS_BIGENDIAN)
+#define MERGE_2INTS(a,b,sz) (((uint64_t)(a)<<sz)|(b))
+#else
#define MERGE_2INTS(a,b,sz) (((uint64_t)(b)<<sz)|(a))
+#endif
static uint16_t
get_uint16(const uint8_t *p)
@@ -837,39 +935,39 @@ get_uint64(const uint8_t *p)
}
static uint8_t
-read_uint8(char **ptr)
+read_uint8(const char **ptr)
{
- const unsigned char *p = (const unsigned char *)*ptr;
- *ptr = (char *)(p + 1);
- return *p;
+ const char *p = *ptr;
+ *ptr = (p + 1);
+ return (uint8_t)*p;
}
static uint16_t
-read_uint16(char **ptr)
+read_uint16(const char **ptr)
{
- const unsigned char *p = (const unsigned char *)*ptr;
- *ptr = (char *)(p + 2);
- return get_uint16(p);
+ const char *p = *ptr;
+ *ptr = (p + 2);
+ return get_uint16((const uint8_t *)p);
}
static uint32_t
-read_uint24(char **ptr)
+read_uint24(const char **ptr)
{
- const unsigned char *p = (const unsigned char *)*ptr;
- *ptr = (char *)(p + 3);
- return (*p << 16) | get_uint16(p+1);
+ const char *p = *ptr;
+ *ptr = (p + 3);
+ return ((uint8_t)*p << 16) | get_uint16((const uint8_t *)p+1);
}
static uint32_t
-read_uint32(char **ptr)
+read_uint32(const char **ptr)
{
- const unsigned char *p = (const unsigned char *)*ptr;
- *ptr = (char *)(p + 4);
- return get_uint32(p);
+ const char *p = *ptr;
+ *ptr = (p + 4);
+ return get_uint32((const uint8_t *)p);
}
static uint64_t
-read_uint64(char **ptr)
+read_uint64(const char **ptr)
{
const unsigned char *p = (const unsigned char *)*ptr;
*ptr = (char *)(p + 8);
@@ -877,7 +975,7 @@ read_uint64(char **ptr)
}
static uintptr_t
-read_uintptr(char **ptr)
+read_uintptr(const char **ptr)
{
const unsigned char *p = (const unsigned char *)*ptr;
*ptr = (char *)(p + SIZEOF_VOIDP);
@@ -918,13 +1016,34 @@ debug_info_reader_init(DebugInfoReader *reader, obj_info_t *obj)
reader->p = obj->debug_info.ptr;
reader->pend = obj->debug_info.ptr + obj->debug_info.size;
reader->debug_line_cu_end = obj->debug_line.ptr;
+ reader->current_low_pc = 0;
+ reader->current_str_offsets_base = 0;
+ reader->current_addr_base = 0;
+ reader->current_rnglists_base = 0;
+}
+
+static void
+di_skip_die_attributes(const char **p)
+{
+ for (;;) {
+ uint64_t at = uleb128(p);
+ uint64_t form = uleb128(p);
+ if (!at && !form) break;
+ switch (form) {
+ default:
+ break;
+ case DW_FORM_implicit_const:
+ sleb128(p);
+ break;
+ }
+ }
}
static void
di_read_debug_abbrev_cu(DebugInfoReader *reader)
{
uint64_t prev = 0;
- char *p = reader->q0;
+ const char *p = reader->q0;
for (;;) {
uint64_t abbrev_number = uleb128(&p);
if (abbrev_number <= prev) break;
@@ -934,12 +1053,7 @@ di_read_debug_abbrev_cu(DebugInfoReader *reader)
prev = abbrev_number;
uleb128(&p); /* tag */
p++; /* has_children */
- /* skip content */
- for (;;) {
- uint64_t at = uleb128(&p);
- uint64_t form = uleb128(&p);
- if (!at && !form) break;
- }
+ di_skip_die_attributes(&p);
}
}
@@ -950,10 +1064,12 @@ di_read_debug_line_cu(DebugInfoReader *reader)
struct LineNumberProgramHeader header;
p = (const char *)reader->debug_line_cu_end;
- if (parse_debug_line_header(&p, &header))
+ if (parse_debug_line_header(reader->obj, &p, &header))
return -1;
reader->debug_line_cu_end = (char *)header.cu_end;
+ reader->debug_line_format = header.format;
+ reader->debug_line_version = header.version;
reader->debug_line_directories = (char *)header.include_directories;
reader->debug_line_files = (char *)header.filenames;
@@ -961,6 +1077,13 @@ di_read_debug_line_cu(DebugInfoReader *reader)
}
static void
+set_addr_idx_value(DebugInfoValue *v, uint64_t n)
+{
+ v->as.addr_idx = n;
+ v->type = VAL_addr;
+}
+
+static void
set_uint_value(DebugInfoValue *v, uint64_t n)
{
v->as.uint64 = n;
@@ -975,7 +1098,7 @@ set_int_value(DebugInfoValue *v, int64_t n)
}
static void
-set_cstr_value(DebugInfoValue *v, char *s)
+set_cstr_value(DebugInfoValue *v, const char *s)
{
v->as.ptr = s;
v->off = 0;
@@ -983,7 +1106,7 @@ set_cstr_value(DebugInfoValue *v, char *s)
}
static void
-set_cstrp_value(DebugInfoValue *v, char *s, uint64_t off)
+set_cstrp_value(DebugInfoValue *v, const char *s, uint64_t off)
{
v->as.ptr = s;
v->off = off;
@@ -991,7 +1114,7 @@ set_cstrp_value(DebugInfoValue *v, char *s, uint64_t off)
}
static void
-set_data_value(DebugInfoValue *v, char *s)
+set_data_value(DebugInfoValue *v, const char *s)
{
v->as.ptr = s;
v->type = VAL_data;
@@ -1007,19 +1130,39 @@ get_cstr_value(DebugInfoValue *v)
}
}
+static const char *
+resolve_strx(DebugInfoReader *reader, uint64_t idx)
+{
+ const char *p = reader->obj->debug_str_offsets.ptr + reader->current_str_offsets_base;
+ uint64_t off;
+ if (reader->format == 4) {
+ off = ((uint32_t *)p)[idx];
+ }
+ else {
+ off = ((uint64_t *)p)[idx];
+ }
+ return reader->obj->debug_str.ptr + off;
+}
+
+static void
+debug_info_reader_read_addr_value(DebugInfoReader *reader, DebugInfoValue *v)
+{
+ if (reader->address_size == 4) {
+ set_uint_value(v, read_uint32(&reader->p));
+ } else if (reader->address_size == 8) {
+ set_uint_value(v, read_uint64(&reader->p));
+ } else {
+ fprintf(stderr,"unknown address_size:%d", reader->address_size);
+ abort();
+ }
+}
+
static void
debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoValue *v)
{
switch (form) {
case DW_FORM_addr:
- if (reader->address_size == 4) {
- set_uint_value(v, read_uint32(&reader->p));
- } else if (reader->address_size == 8) {
- set_uint_value(v, read_uint64(&reader->p));
- } else {
- fprintf(stderr,"unknown address_size:%d", reader->address_size);
- abort();
- }
+ debug_info_reader_read_addr_value(reader, v);
break;
case DW_FORM_block2:
v->size = read_uint16(&reader->p);
@@ -1071,13 +1214,19 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
set_uint_value(v, read_uleb128(reader));
break;
case DW_FORM_ref_addr:
- if (reader->address_size == 4) {
- set_uint_value(v, read_uint32(&reader->p));
- } else if (reader->address_size == 8) {
- set_uint_value(v, read_uint64(&reader->p));
+ if (reader->current_version <= 2) {
+ // DWARF Version 2 specifies that references have
+ // the same size as an address on the target system
+ debug_info_reader_read_addr_value(reader, v);
} else {
- fprintf(stderr,"unknown address_size:%d", reader->address_size);
- abort();
+ if (reader->format == 4) {
+ set_uint_value(v, read_uint32(&reader->p));
+ } else if (reader->format == 8) {
+ set_uint_value(v, read_uint64(&reader->p));
+ } else {
+ fprintf(stderr,"unknown format:%d", reader->format);
+ abort();
+ }
}
break;
case DW_FORM_ref1:
@@ -1119,11 +1268,10 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
set_uint_value(v, 1);
break;
case DW_FORM_strx:
- set_uint_value(v, uleb128(&reader->p));
+ set_cstr_value(v, resolve_strx(reader, uleb128(&reader->p)));
break;
case DW_FORM_addrx:
- /* TODO: read .debug_addr */
- set_uint_value(v, uleb128(&reader->p));
+ set_addr_idx_value(v, uleb128(&reader->p));
break;
case DW_FORM_ref_sup4:
set_uint_value(v, read_uint32(&reader->p));
@@ -1138,8 +1286,7 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
reader->p += v->size;
break;
case DW_FORM_line_strp:
- set_uint_value(v, read_uint(reader));
- /* *p = reader->file + reader->line->sh_offset + ret; */
+ set_cstrp_value(v, reader->obj->debug_line_str.ptr, read_uint(reader));
break;
case DW_FORM_ref_sig8:
set_uint_value(v, read_uint64(&reader->p));
@@ -1157,28 +1304,28 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
set_uint_value(v, read_uint64(&reader->p));
break;
case DW_FORM_strx1:
- set_uint_value(v, read_uint8(&reader->p));
+ set_cstr_value(v, resolve_strx(reader, read_uint8(&reader->p)));
break;
case DW_FORM_strx2:
- set_uint_value(v, read_uint16(&reader->p));
+ set_cstr_value(v, resolve_strx(reader, read_uint16(&reader->p)));
break;
case DW_FORM_strx3:
- set_uint_value(v, read_uint24(&reader->p));
+ set_cstr_value(v, resolve_strx(reader, read_uint24(&reader->p)));
break;
case DW_FORM_strx4:
- set_uint_value(v, read_uint32(&reader->p));
+ set_cstr_value(v, resolve_strx(reader, read_uint32(&reader->p)));
break;
case DW_FORM_addrx1:
- set_uint_value(v, read_uint8(&reader->p));
+ set_addr_idx_value(v, read_uint8(&reader->p));
break;
case DW_FORM_addrx2:
- set_uint_value(v, read_uint16(&reader->p));
+ set_addr_idx_value(v, read_uint16(&reader->p));
break;
case DW_FORM_addrx3:
- set_uint_value(v, read_uint24(&reader->p));
+ set_addr_idx_value(v, read_uint24(&reader->p));
break;
case DW_FORM_addrx4:
- set_uint_value(v, read_uint32(&reader->p));
+ set_addr_idx_value(v, read_uint32(&reader->p));
break;
case 0:
goto fail;
@@ -1192,10 +1339,10 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
}
/* find abbrev in current compilation unit */
-static char *
+static const char *
di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
{
- char *p;
+ const char *p;
if (abbrev_number < ABBREV_TABLE_SIZE) {
return reader->abbrev_table[abbrev_number];
}
@@ -1203,12 +1350,7 @@ di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
/* skip 255th record */
uleb128(&p); /* tag */
p++; /* has_children */
- /* skip content */
- for (;;) {
- uint64_t at = uleb128(&p);
- uint64_t form = uleb128(&p);
- if (!at && !form) break;
- }
+ di_skip_die_attributes(&p);
for (uint64_t n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) {
if (n == 0) {
fprintf(stderr,"%d: Abbrev Number %"PRId64" not found\n",__LINE__, abbrev_number);
@@ -1216,12 +1358,7 @@ di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
}
uleb128(&p); /* tag */
p++; /* has_children */
- /* skip content */
- for (;;) {
- uint64_t at = uleb128(&p);
- uint64_t form = uleb128(&p);
- if (!at && !form) break;
- }
+ di_skip_die_attributes(&p);
}
return p;
}
@@ -1235,7 +1372,7 @@ hexdump0(const unsigned char *p, size_t n)
for (i=0; i < n; i++){
switch (i & 15) {
case 0:
- fprintf(stderr, "%02zd: %02X ", i/16, p[i]);
+ fprintf(stderr, "%02" PRIdSIZE ": %02X ", i/16, p[i]);
break;
case 15:
fprintf(stderr, "%02X\n", p[i]);
@@ -1256,16 +1393,16 @@ div_inspect(DebugInfoValue *v)
{
switch (v->type) {
case VAL_uint:
- fprintf(stderr,"%d: type:%d size:%zx v:%lx\n",__LINE__,v->type,v->size,v->as.uint64);
+ fprintf(stderr,"%d: type:%d size:%" PRIxSIZE " v:%"PRIx64"\n",__LINE__,v->type,v->size,v->as.uint64);
break;
case VAL_int:
- fprintf(stderr,"%d: type:%d size:%zx v:%ld\n",__LINE__,v->type,v->size,(int64_t)v->as.uint64);
+ fprintf(stderr,"%d: type:%d size:%" PRIxSIZE " v:%"PRId64"\n",__LINE__,v->type,v->size,(int64_t)v->as.uint64);
break;
case VAL_cstr:
- fprintf(stderr,"%d: type:%d size:%zx v:'%s'\n",__LINE__,v->type,v->size,v->as.ptr);
+ fprintf(stderr,"%d: type:%d size:%" PRIxSIZE " v:'%s'\n",__LINE__,v->type,v->size,v->as.ptr);
break;
case VAL_data:
- fprintf(stderr,"%d: type:%d size:%zx v:\n",__LINE__,v->type,v->size);
+ fprintf(stderr,"%d: type:%d size:%" PRIxSIZE " v:\n",__LINE__,v->type,v->size);
hexdump(v->as.ptr, 16);
break;
}
@@ -1316,6 +1453,76 @@ di_skip_records(DebugInfoReader *reader)
}
}
+typedef struct addr_header {
+ const char *ptr;
+ uint64_t unit_length;
+ uint8_t format;
+ uint8_t address_size;
+ /* uint8_t segment_selector_size; */
+} addr_header_t;
+
+static void
+addr_header_init(obj_info_t *obj, addr_header_t *header) {
+ const char *p = obj->debug_addr.ptr;
+
+ header->ptr = p;
+
+ if (!p) return;
+
+ header->unit_length = *(uint32_t *)p;
+ p += sizeof(uint32_t);
+
+ header->format = 4;
+ if (header->unit_length == 0xffffffff) {
+ header->unit_length = *(uint64_t *)p;
+ p += sizeof(uint64_t);
+ header->format = 8;
+ }
+
+ p += 2; /* version */
+ header->address_size = *p++;
+ p++; /* segment_selector_size */
+}
+
+static uint64_t
+read_addr(addr_header_t *header, uint64_t addr_base, uint64_t idx) {
+ if (header->address_size == 4) {
+ return ((uint32_t*)(header->ptr + addr_base))[idx];
+ }
+ else {
+ return ((uint64_t*)(header->ptr + addr_base))[idx];
+ }
+}
+
+typedef struct rnglists_header {
+ uint64_t unit_length;
+ uint8_t format;
+ uint8_t address_size;
+ uint32_t offset_entry_count;
+} rnglists_header_t;
+
+static void
+rnglists_header_init(obj_info_t *obj, rnglists_header_t *header) {
+ const char *p = obj->debug_rnglists.ptr;
+
+ if (!p) return;
+
+ header->unit_length = *(uint32_t *)p;
+ p += sizeof(uint32_t);
+
+ header->format = 4;
+ if (header->unit_length == 0xffffffff) {
+ header->unit_length = *(uint64_t *)p;
+ p += sizeof(uint64_t);
+ header->format = 8;
+ }
+
+ p += 2; /* version */
+ header->address_size = *p++;
+ p++; /* segment_selector_size */
+ header->offset_entry_count = *(uint32_t *)p;
+}
+
typedef struct {
uint64_t low_pc;
uint64_t high_pc;
@@ -1326,31 +1533,53 @@ typedef struct {
} ranges_t;
static void
-ranges_set(ranges_t *ptr, DebugInfoValue *v)
+ranges_set(ranges_t *ptr, DebugInfoValue *v, addr_header_t *addr_header, uint64_t addr_base)
{
+ uint64_t n = 0;
+ if (v->type == VAL_uint) {
+ n = v->as.uint64;
+ }
+ else if (v->type == VAL_addr) {
+ n = read_addr(addr_header, addr_base, v->as.addr_idx);
+ }
switch (v->at) {
case DW_AT_low_pc:
- ptr->low_pc = v->as.uint64;
+ ptr->low_pc = n;
ptr->low_pc_set = true;
break;
case DW_AT_high_pc:
if (v->form == DW_FORM_addr) {
- ptr->high_pc = v->as.uint64;
+ ptr->high_pc = n;
}
else {
- ptr->high_pc = ptr->low_pc + v->as.uint64;
+ ptr->high_pc = ptr->low_pc + n;
}
ptr->high_pc_set = true;
break;
case DW_AT_ranges:
- ptr->ranges = v->as.uint64;
+ ptr->ranges = n;
ptr->ranges_set = true;
break;
}
}
+static uint64_t
+read_dw_form_addr(DebugInfoReader *reader, const char **ptr)
+{
+ const char *p = *ptr;
+ *ptr = p + reader->address_size;
+ if (reader->address_size == 4) {
+ return read_uint32(&p);
+ } else if (reader->address_size == 8) {
+ return read_uint64(&p);
+ } else {
+ fprintf(stderr,"unknown address_size:%d", reader->address_size);
+ abort();
+ }
+}
+
static uintptr_t
-ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
+ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr, rnglists_header_t *rnglists_header)
{
if (ptr->high_pc_set) {
if (ptr->ranges_set || !ptr->low_pc_set) {
@@ -1362,8 +1591,66 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
}
else if (ptr->ranges_set) {
/* TODO: support base address selection entry */
- char *p = reader->obj->debug_ranges.ptr + ptr->ranges;
+ const char *p;
uint64_t base = ptr->low_pc_set ? ptr->low_pc : reader->current_low_pc;
+ bool base_valid = true;
+ if (reader->current_version >= 5) {
+ if (rnglists_header->offset_entry_count == 0) {
+ // DW_FORM_sec_offset
+ p = reader->obj->debug_rnglists.ptr + ptr->ranges + reader->current_rnglists_base;
+ }
+ else {
+ // DW_FORM_rnglistx
+ const char *offset_array = reader->obj->debug_rnglists.ptr + reader->current_rnglists_base;
+ if (rnglists_header->format == 4) {
+ p = offset_array + ((uint32_t *)offset_array)[ptr->ranges];
+ }
+ else {
+ p = offset_array + ((uint64_t *)offset_array)[ptr->ranges];
+ }
+ }
+ for (;;) {
+ uint8_t rle = read_uint8(&p);
+ uintptr_t from = 0, to = 0;
+ if (rle == DW_RLE_end_of_list) break;
+ switch (rle) {
+ case DW_RLE_base_addressx:
+ uleb128(&p);
+ base_valid = false; /* not supported yet */
+ break;
+ case DW_RLE_startx_endx:
+ uleb128(&p);
+ uleb128(&p);
+ break;
+ case DW_RLE_startx_length:
+ uleb128(&p);
+ uleb128(&p);
+ break;
+ case DW_RLE_offset_pair:
+ if (!base_valid) break;
+ from = (uintptr_t)base + uleb128(&p);
+ to = (uintptr_t)base + uleb128(&p);
+ break;
+ case DW_RLE_base_address:
+ base = read_dw_form_addr(reader, &p);
+ base_valid = true;
+ break;
+ case DW_RLE_start_end:
+ from = (uintptr_t)read_dw_form_addr(reader, &p);
+ to = (uintptr_t)read_dw_form_addr(reader, &p);
+ break;
+ case DW_RLE_start_length:
+ from = (uintptr_t)read_dw_form_addr(reader, &p);
+ to = from + uleb128(&p);
+ break;
+ }
+ if (from <= addr && addr < to) {
+ return from;
+ }
+ }
+ return false;
+ }
+ p = reader->obj->debug_ranges.ptr + ptr->ranges;
for (;;) {
uintptr_t from = read_uintptr(&p);
uintptr_t to = read_uintptr(&p);
@@ -1373,7 +1660,7 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
base = to;
}
else if (base + from <= addr && addr < base + to) {
- return from;
+ return (uintptr_t)base + from;
}
}
}
@@ -1431,6 +1718,7 @@ di_read_cu(DebugInfoReader *reader)
}
reader->cu_end = reader->p + unit_length;
version = read_uint16(&reader->p);
+ reader->current_version = version;
if (version > 5) {
return -1;
}
@@ -1463,30 +1751,76 @@ di_read_cu(DebugInfoReader *reader)
break;
}
+ reader->current_str_offsets_base = 0;
+ reader->current_addr_base = 0;
+ reader->current_rnglists_base = 0;
+
+ DebugInfoValue low_pc = {{}};
/* enumerate abbrev */
for (;;) {
DebugInfoValue v = {{}};
if (!di_read_record(reader, &v)) break;
switch (v.at) {
case DW_AT_low_pc:
- reader->current_low_pc = v.as.uint64;
+ // clang may output DW_AT_addr_base after DW_AT_low_pc.
+ // We need to resolve the DW_FORM_addr* after DW_AT_addr_base is parsed.
+ low_pc = v;
+ break;
+ case DW_AT_str_offsets_base:
+ reader->current_str_offsets_base = v.as.uint64;
+ break;
+ case DW_AT_addr_base:
+ reader->current_addr_base = v.as.uint64;
+ break;
+ case DW_AT_rnglists_base:
+ reader->current_rnglists_base = v.as.uint64;
break;
}
}
+ // Resolve the DW_FORM_addr of DW_AT_low_pc
+ switch (low_pc.type) {
+ case VAL_uint:
+ reader->current_low_pc = low_pc.as.uint64;
+ break;
+ case VAL_addr:
+ {
+ addr_header_t header;
+ addr_header_init(reader->obj, &header);
+ reader->current_low_pc = read_addr(&header, reader->current_addr_base, low_pc.as.addr_idx);
+ }
+ break;
+ }
} while (0);
#endif
return 0;
}
static void
-read_abstract_origin(DebugInfoReader *reader, uint64_t abstract_origin, line_info_t *line)
+read_abstract_origin(DebugInfoReader *reader, uint64_t form, uint64_t abstract_origin, line_info_t *line)
{
- char *p = reader->p;
- char *q = reader->q;
+ const char *p = reader->p;
+ const char *q = reader->q;
int level = reader->level;
DIE die;
- reader->p = reader->current_cu + abstract_origin;
+ switch (form) {
+ case DW_FORM_ref1:
+ case DW_FORM_ref2:
+ case DW_FORM_ref4:
+ case DW_FORM_ref8:
+ case DW_FORM_ref_udata:
+ reader->p = reader->current_cu + abstract_origin;
+ break;
+ case DW_FORM_ref_addr:
+ goto finish; /* not supported yet */
+ case DW_FORM_ref_sig8:
+ goto finish; /* not supported yet */
+ case DW_FORM_ref_sup4:
+ case DW_FORM_ref_sup8:
+ goto finish; /* not supported yet */
+ default:
+ goto finish;
+ }
if (!di_read_die(reader, &die)) goto finish;
/* enumerate abbrev */
@@ -1509,6 +1843,13 @@ read_abstract_origin(DebugInfoReader *reader, uint64_t abstract_origin, line_inf
static void
debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
line_info_t *lines, int offset) {
+
+ addr_header_t addr_header = {};
+ addr_header_init(reader->obj, &addr_header);
+
+ rnglists_header_t rnglists_header = {};
+ rnglists_header_init(reader->obj, &rnglists_header);
+
while (reader->p < reader->cu_end) {
DIE die;
ranges_t ranges = {};
@@ -1535,7 +1876,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
line.sname = get_cstr_value(&v);
break;
case DW_AT_call_file:
- fill_filename((int)v.as.uint64, reader->debug_line_directories, reader->debug_line_files, &line, reader->obj);
+ fill_filename((int)v.as.uint64, reader->debug_line_format, reader->debug_line_version, reader->debug_line_directories, reader->debug_line_files, &line, reader->obj);
break;
case DW_AT_call_line:
line.line = (int)v.as.uint64;
@@ -1543,7 +1884,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
case DW_AT_low_pc:
case DW_AT_high_pc:
case DW_AT_ranges:
- ranges_set(&ranges, &v);
+ ranges_set(&ranges, &v, &addr_header, reader->current_addr_base);
break;
case DW_AT_declaration:
goto skip_die;
@@ -1551,7 +1892,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
/* 1 or 3 */
break; /* goto skip_die; */
case DW_AT_abstract_origin:
- read_abstract_origin(reader, v.as.uint64, &line);
+ read_abstract_origin(reader, v.form, v.as.uint64, &line);
break; /* goto skip_die; */
}
}
@@ -1560,9 +1901,9 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
for (int i=offset; i < num_traces; i++) {
uintptr_t addr = (uintptr_t)traces[i];
uintptr_t offset = addr - reader->obj->base_addr + reader->obj->vmaddr;
- uintptr_t saddr = ranges_include(reader, &ranges, offset);
+ uintptr_t saddr = ranges_include(reader, &ranges, offset, &rnglists_header);
if (saddr) {
- /* fprintf(stderr, "%d:%tx: %d %lx->%lx %x %s: %s/%s %d %s %s %s\n",__LINE__,die.pos, i,addr,offset, die.tag,line.sname,line.dirname,line.filename,line.line,reader->obj->path,line.sname,lines[i].sname); */
+ /* fprintf(stdout, "%d:%tx: %d %lx->%lx %x %s: %s/%s %d %s %s %s\n",__LINE__,die.pos, i,addr,offset, die.tag,line.sname,line.dirname,line.filename,line.line,reader->obj->path,line.sname,lines[i].sname); */
if (lines[i].sname) {
line_info_t *lp = malloc(sizeof(line_info_t));
memcpy(lp, &lines[i], sizeof(line_info_t));
@@ -1581,10 +1922,59 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
}
}
+// This function parses the following attributes of Line Number Program Header in DWARF 5:
+//
+// * directory_entry_format_count
+// * directory_entry_format
+// * directories_count
+// * directories
+//
+// or
+//
+// * file_name_entry_format_count
+// * file_name_entry_format
+// * file_names_count
+// * file_names
+//
+// It records DW_LNCT_path and DW_LNCT_directory_index at the index "idx".
+static const char *
+parse_ver5_debug_line_header(const char *p, int idx, uint8_t format, obj_info_t *obj, const char **out_path, uint64_t *out_directory_index) {
+ int i, j;
+ int entry_format_count = *(uint8_t *)p++;
+ const char *entry_format = p;
+
+ /* skip the part of entry_format */
+ for (i = 0; i < entry_format_count * 2; i++) uleb128(&p);
+
+ int entry_count = (int)uleb128(&p);
+
+ DebugInfoReader reader;
+ debug_info_reader_init(&reader, obj);
+ reader.format = format;
+ reader.p = p;
+ for (j = 0; j < entry_count; j++) {
+ const char *format = entry_format;
+ for (i = 0; i < entry_format_count; i++) {
+ DebugInfoValue v = {{}};
+ unsigned long dw_lnct = uleb128(&format);
+ unsigned long dw_form = uleb128(&format);
+ debug_info_reader_read_value(&reader, dw_form, &v);
+ if (dw_lnct == 1 /* DW_LNCT_path */ && v.type == VAL_cstr && out_path)
+ *out_path = v.as.ptr + v.off;
+ if (dw_lnct == 2 /* DW_LNCT_directory_index */ && v.type == VAL_uint && out_directory_index)
+ *out_directory_index = v.as.uint64;
+ }
+ if (j == idx) return 0;
+ }
+
+ return reader.p;
+}
+
#ifdef USE_ELF
static unsigned long
uncompress_debug_section(ElfW(Shdr) *shdr, char *file, char **ptr)
{
+ *ptr = NULL;
#ifdef SUPPORT_COMPRESSED_DEBUG_LINE
ElfW(Chdr) *chdr = (ElfW(Chdr) *)(file + shdr->sh_offset);
unsigned long destsize = chdr->ch_size;
@@ -1605,6 +1995,7 @@ uncompress_debug_section(ElfW(Shdr) *shdr, char *file, char **ptr)
fail:
free(*ptr);
+ *ptr = NULL;
#endif
return 0;
}
@@ -1619,6 +2010,7 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
ElfW(Ehdr) *ehdr;
ElfW(Shdr) *shdr, *shstr_shdr;
ElfW(Shdr) *gnu_debuglink_shdr = NULL;
+ ElfW(Shdr) *note_gnu_build_id = NULL;
int fd;
off_t filesize;
char *file;
@@ -1691,6 +2083,11 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
/* if (!strcmp(section_name, ".dynsym")) */
dynsym_shdr = shdr + i;
break;
+ case SHT_NOTE:
+ if (!strcmp(section_name, ".note.gnu.build-id")) {
+ note_gnu_build_id = shdr + i;
+ }
+ break;
case SHT_PROGBITS:
if (!strcmp(section_name, ".gnu_debuglink")) {
gnu_debuglink_shdr = shdr + i;
@@ -1701,7 +2098,11 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
".debug_info",
".debug_line",
".debug_ranges",
- ".debug_str"
+ ".debug_str_offsets",
+ ".debug_addr",
+ ".debug_rnglists",
+ ".debug_str",
+ ".debug_line_str"
};
for (j=0; j < DWARF_SECTION_COUNT; j++) {
@@ -1806,6 +2207,13 @@ use_symtab:
num_traces, traces,
objp, lines, offset);
}
+ if (note_gnu_build_id && check_debuglink) {
+ ElfW(Nhdr) *nhdr = (ElfW(Nhdr)*) (file + note_gnu_build_id->sh_offset);
+ const char *build_id = (char *)(nhdr + 1) + nhdr->n_namesz;
+ follow_debuglink_build_id(build_id, nhdr->n_descsz,
+ num_traces, traces,
+ objp, lines, offset);
+ }
goto finish;
}
@@ -1950,7 +2358,11 @@ found_mach_header:
"__debug_info",
"__debug_line",
"__debug_ranges",
- "__debug_str"
+ "__debug_str_offsets",
+ "__debug_addr",
+ "__debug_rnglists",
+ "__debug_str",
+ "__debug_line_str",
};
struct LP(segment_command) *scmd = (struct LP(segment_command) *)lcmd;
if (strcmp(scmd->segname, "__TEXT") == 0) {
@@ -1987,7 +2399,7 @@ found_mach_header:
char *strtab = file + cmd->stroff, *sname = 0;
uint32_t j;
uintptr_t saddr = 0;
- /* kprintf("[%2d]: %x/symtab %p\n", i, cmd->cmd, p); */
+ /* kprintf("[%2d]: %x/symtab %p\n", i, cmd->cmd, (void *)p); */
for (j = 0; j < cmd->nsyms; j++) {
uintptr_t symsize, d;
struct LP(nlist) *e = &nl[j];
@@ -2039,7 +2451,7 @@ fail:
#endif
#define HAVE_MAIN_EXE_PATH
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
# include <sys/sysctl.h>
#endif
/* ssize_t main_exe_path(void)
@@ -2048,17 +2460,21 @@ fail:
* and returns strlen(binary_filename).
* it is NUL terminated.
*/
-#if defined(__linux__)
+#if defined(__linux__) || defined(__NetBSD__)
static ssize_t
main_exe_path(void)
{
-# define PROC_SELF_EXE "/proc/self/exe"
+# if defined(__linux__)
+# define PROC_SELF_EXE "/proc/self/exe"
+# elif defined(__NetBSD__)
+# define PROC_SELF_EXE "/proc/curproc/exe"
+# endif
ssize_t len = readlink(PROC_SELF_EXE, binary_filename, PATH_MAX);
if (len < 0) return 0;
binary_filename[len] = 0;
return len;
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
static ssize_t
main_exe_path(void)
{
@@ -2102,9 +2518,12 @@ print_line0(line_info_t *line, void *address)
else if (!line->path) {
kprintf("[0x%"PRIxPTR"]\n", addr);
}
- else if (!line->saddr || !line->sname) {
+ else if (!line->sname) {
kprintf("%s(0x%"PRIxPTR") [0x%"PRIxPTR"]\n", line->path, addr-line->base_addr, addr);
}
+ else if (!line->saddr) {
+ kprintf("%s(%s) [0x%"PRIxPTR"]\n", line->path, line->sname, addr);
+ }
else if (line->line <= 0) {
kprintf("%s(%s+0x%"PRIxPTR") [0x%"PRIxPTR"]\n", line->path, line->sname,
d, addr);
@@ -2141,6 +2560,7 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
obj_info_t *obj = NULL;
/* 2 is NULL + main executable */
void **dladdr_fbases = (void **)calloc(num_traces+2, sizeof(void *));
+
#ifdef HAVE_MAIN_EXE_PATH
char *main_path = NULL; /* used on printing backtrace */
ssize_t len;
@@ -2171,8 +2591,8 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
/* if the binary is strip-ed, this may effect */
for (p=dladdr_fbases; *p; p++) {
if (*p == info.dli_fbase) {
- lines[i].path = info.dli_fname;
- lines[i].sname = info.dli_sname;
+ if (info.dli_fname) lines[i].path = info.dli_fname;
+ if (info.dli_sname) lines[i].sname = info.dli_sname;
goto next_line;
}
}
@@ -2182,9 +2602,11 @@ rb_dump_backtrace_with_lines(int num_traces, void **traces)
obj->base_addr = (uintptr_t)info.dli_fbase;
path = info.dli_fname;
obj->path = path;
- lines[i].path = path;
- lines[i].sname = info.dli_sname;
- lines[i].saddr = (uintptr_t)info.dli_saddr;
+ if (path) lines[i].path = path;
+ if (info.dli_sname) {
+ lines[i].sname = info.dli_sname;
+ lines[i].saddr = (uintptr_t)info.dli_saddr;
+ }
strlcpy(binary_filename, path, PATH_MAX);
if (fill_lines(num_traces, traces, 1, &obj, lines, i) == (uintptr_t)-1)
break;
diff --git a/addr2line.h b/addr2line.h
index 4f6cf179ef..f09b665800 100644
--- a/addr2line.h
+++ b/addr2line.h
@@ -1,3 +1,5 @@
+#ifndef RUBY_ADDR2LINE_H
+#define RUBY_ADDR2LINE_H
/**********************************************************************
addr2line.h -
@@ -8,9 +10,6 @@
**********************************************************************/
-#ifndef RUBY_ADDR2LINE_H
-#define RUBY_ADDR2LINE_H
-
#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
void
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index bf10c97222..0000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,147 +0,0 @@
----
-version: '{build}'
-shallow_clone: true
-platform:
- - x64
-branches:
- except:
- - trunk # mirrored from trunk. avoid doubly building on it
-environment:
- ruby_version: "24-%Platform%"
- zlib_version: "1.2.11"
- matrix:
- # to reduce time for finishing all jobs, run the slowest msys2 build first.
- - build: msys2
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- GEMS_FOR_TEST: "timezone tzinfo"
- - build: vs
- vs: 120
- ssl: OpenSSL
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- GEMS_FOR_TEST: ""
- - build: vs
- vs: 140
- ssl: OpenSSL-v111
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- GEMS_FOR_TEST: ""
- RELINE_TEST_ENCODING: "Windows-31J"
- UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
-for:
--
- matrix:
- only:
- - build: vs
- install:
- - ver
- - chcp
- - SET BITS=%Platform:x86=32%
- - SET BITS=%BITS:x=%
- - SET OPENSSL_DIR=C:\%ssl%-Win%BITS%
- - CALL SET vcvars=%%^VS%VS%COMNTOOLS^%%..\..\VC\vcvarsall.bat
- - SET vcvars
- - '"%vcvars%" %Platform:x64=amd64%'
- - SET ruby_path=C:\Ruby%ruby_version:-x86=%
- - SET PATH=\usr\local\bin;%ruby_path%\bin;%PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin
- - ruby --version
- - 'cl'
- - echo> Makefile srcdir=.
- - echo>> Makefile MSC_VER=0
- - echo>> Makefile RT=none
- - echo>> Makefile RT_VER=0
- - echo>> Makefile BUILTIN_ENCOBJS=nul
- - type win32\Makefile.sub >> Makefile
- - nmake %mflags% touch-unicode-files
- - nmake %mflags% %UPDATE_UNICODE% up incs
- - del Makefile
- - mkdir \usr\local\bin
- - mkdir \usr\local\include
- - mkdir \usr\local\lib
- - curl -fsSL -o zlib%zlib_version:.=%.zip --retry 10 https://zlib.net/zlib%zlib_version:.=%.zip
- - 7z x -o%APPVEYOR_BUILD_FOLDER%\ext\zlib zlib%zlib_version:.=%.zip
- - for %%I in (%OPENSSL_DIR%\*.dll) do mklink /h \usr\local\bin\%%~nxI %%I
- - attrib +r /s /d
- - mkdir %Platform%-mswin_%vs%
- build_script:
- - cd %APPVEYOR_BUILD_FOLDER%
- - cd %Platform%-mswin_%vs%
- - ..\win32\configure.bat --without-ext=+,dbm,gdbm,readline --with-opt-dir=/usr/local --with-openssl-dir=%OPENSSL_DIR:\=/%
- - nmake -l
- - nmake install-nodoc
- - \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
- - if not "%GEMS_FOR_TEST%" == "" \usr\bin\gem install --no-document %GEMS_FOR_TEST%
- - \usr\bin\ruby -ropenssl -e "puts 'Build ' + OpenSSL::OPENSSL_VERSION, 'Runtime ' + OpenSSL::OPENSSL_LIBRARY_VERSION"
- test_script:
- - set /a JOBS=%NUMBER_OF_PROCESSORS%
- - nmake -l "TESTOPTS=-v -q" btest
- - nmake -l "TESTOPTS=-v -q" test-basic
- - nmake -l "TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor -j%JOBS% --exclude readline --exclude win32ole --exclude test_bignum --exclude test_syntax --exclude test_open-uri --exclude test_bundled_ca" test-all
- # separately execute tests without -j which may crash worker with -j.
- - nmake -l "TESTOPTS=-v --timeout-scale=3.0 --excludes=../test/excludes/_appveyor" test-all TESTS="../test/win32ole ../test/ruby/test_bignum.rb ../test/ruby/test_syntax.rb ../test/open-uri/test_open-uri.rb ../test/rubygems/test_bundled_ca.rb"
- - nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
--
- matrix:
- only:
- - build: msys2
- install:
- - ver
- - chcp
- - set /a JOBS=%NUMBER_OF_PROCESSORS%
- - set MSYS_NO_PATHCONV=1
- - SET MSYSTEM=%Platform:x86=32%
- - SET MSYSTEM=%MSYSTEM:x=MINGW%
- - SET MSYS2_ARCH=%Platform:x86=i686%
- - SET MSYS2_ARCH=%MSYS2_ARCH:x64=x86_64%
- - set MSYSTEM_PREFIX=/mingw64
- - set MINGW_CHOST=%MSYS2_ARCH%-w64-mingw32
- - SET ruby_path=C:\Ruby%ruby_version:-x86=%
- - cd ..
- - mkdir build
- - mkdir install
- - SET PATH=%ruby_path%\bin;C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
- - ruby --version
- build_script:
- - pacman -Syd --noconfirm --noprogressbar --needed mingw-w64-x86_64-binutils mingw-w64-x86_64-isl mingw-w64-x86_64-libiconv mingw-w64-x86_64-mpc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-windows-default-manifest mingw-w64-x86_64-winpthreads mingw-w64-x86_64-gcc
- # when fixed in MSYS2 / Mingw-w64, remove above and use normal code below
- #- pacman -Sy --noconfirm --noprogressbar --needed mingw-w64-x86_64-toolchain
- - pacman -S --noconfirm --noprogressbar --needed mingw-w64-x86_64-gdbm mingw-w64-x86_64-gmp mingw-w64-x86_64-libffi mingw-w64-x86_64-libyaml mingw-w64-x86_64-openssl mingw-w64-x86_64-ragel mingw-w64-x86_64-readline mingw-w64-x86_64-zlib
- - cd %APPVEYOR_BUILD_FOLDER%
- - set CFLAGS=-march=%MSYS2_ARCH:_=-% -mtune=generic -O3 -pipe
- - set CXXFLAGS=%CFLAGS%
- - set CPPFLAGS=-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048
- - set LDFLAGS=-pipe
- - sh -c "autoreconf -fi"
- - cd ..\build
- - sh ../ruby/configure --disable-install-doc --prefix=/. --build=%MINGW_CHOST% --host=%MINGW_CHOST% --target=%MINGW_CHOST%
- - mingw32-make %mflags% touch-unicode-files
- - mingw32-make -j%JOBS% %UPDATE_UNICODE% up incs
- - mingw32-make -j%JOBS% V=1
- - mingw32-make DESTDIR=../install install-nodoc
- - if not "%GEMS_FOR_TEST%" == "" ..\install\bin\gem install --no-document %GEMS_FOR_TEST%
- - ..\install\bin\ruby.exe -v -ropenssl -e "puts 'Build ' + OpenSSL::OPENSSL_VERSION, 'Runtime ' + OpenSSL::OPENSSL_LIBRARY_VERSION"
- test_script:
- - mingw32-make test
- - mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor -j %JOBS% --exclude win32ole --exclude test_open-uri"
- # separately execute tests without -j which may crash worker with -j.
- - mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor" TESTS="../ruby/test/win32ole ../ruby/test/open-uri/test_open-uri.rb"
- - mingw32-make test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
-notifications:
- # Using "Webhook" with templated body to skip notification on Pull Request
- - provider: Webhook
- method: POST
- url:
- secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vb+gUETT+rbDKLGxBxBpEpxlnPlLdzroIJ+DTKlwfJA8VkGawTn9EXNsucH0OkSf2M= # AppVeyor CI
- body: >-
- {{^isPullRequest}}
- {
- "attachments": [
- {
- "text": "Build <{{buildUrl}}|#{{buildVersion}}> (<{{commitUrl}}|{{commitId}}>) of {{repositoryName}}@{{branch}} by {{commitAuthor}} {{status}}",
- "color": "{{#passed}}good{{/passed}}{{#failed}}danger{{/failed}}"
- }
- ],
- "channel": "#alerts"
- }
- {{/isPullRequest}}
- on_build_success: false
- on_build_failure: true
- on_build_status_changed: true
diff --git a/array.c b/array.c
index 28bd8c866b..b76e9a64a3 100644
--- a/array.c
+++ b/array.c
@@ -10,22 +10,66 @@
Copyright (C) 2000 Information-technology Promotion Agency, Japan
**********************************************************************/
+
+#include "debug_counter.h"
+#include "id.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/compar.h"
+#include "internal/enum.h"
+#include "internal/gc.h"
+#include "internal/hash.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/proc.h"
+#include "internal/rational.h"
+#include "internal/vm.h"
+#include "probes.h"
#include "ruby/encoding.h"
-#include "ruby/util.h"
#include "ruby/st.h"
-#include "probes.h"
-#include "id.h"
-#include "debug_counter.h"
+#include "ruby/util.h"
#include "transient_heap.h"
-#include "internal.h"
+#include "builtin.h"
#if !ARRAY_DEBUG
+# undef NDEBUG
# define NDEBUG
#endif
#include "ruby_assert.h"
VALUE rb_cArray;
+/* Flags of RArray
+ *
+ * 1: RARRAY_EMBED_FLAG
+ * The array is embedded (its contents follow the header, rather than
+ * being on a separately allocated buffer).
+ * 2: RARRAY_SHARED_FLAG (equal to ELTS_SHARED)
+ * The array is shared. The buffer this array points to is owned by
+ * another array (the shared root).
+ * if USE_RVARGC
+ * 3-9: RARRAY_EMBED_LEN
+ * The length of the array when RARRAY_EMBED_FLAG is set.
+ * else
+ * 3-4: RARRAY_EMBED_LEN
+ * The length of the array when RARRAY_EMBED_FLAG is set.
+ * endif
+ * 12: RARRAY_SHARED_ROOT_FLAG
+ * The array is a shared root that does reference counting. The buffer
+ * this array points to is owned by this array but may be pointed to
+ * by other arrays.
+ * Note: Frozen arrays may be a shared root without this flag being
+ * set. Frozen arrays do not have reference counting because
+ * they cannot be modified. Not updating the reference count
+ * improves copy-on-write performance. Their reference count is
+ * assumed to be infinity.
+ * 13: RARRAY_TRANSIENT_FLAG
+ * The buffer of the array is allocated on the transient heap.
+ * 14: RARRAY_PTR_IN_USE_FLAG
+ * The buffer of the array is in use. This is only used during
+ * debugging.
+ */
+
/* for OPTIMIZED_CMP: */
#define id_cmp idCmp
@@ -33,28 +77,13 @@ VALUE rb_cArray;
#define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
#define SMALL_ARRAY_LEN 16
+RBIMPL_ATTR_MAYBE_UNUSED()
static int
should_be_T_ARRAY(VALUE ary)
{
return RB_TYPE_P(ary, T_ARRAY);
}
-static int
-should_not_be_shared_and_embedded(VALUE ary)
-{
- return !FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG);
-}
-
-#define ARY_SHARED_P(ary) \
- (assert(should_be_T_ARRAY((VALUE)(ary))), \
- assert(should_not_be_shared_and_embedded((VALUE)ary)), \
- FL_TEST_RAW((ary),ELTS_SHARED)!=0)
-
-#define ARY_EMBED_P(ary) \
- (assert(should_be_T_ARRAY((VALUE)(ary))), \
- assert(should_not_be_shared_and_embedded((VALUE)ary)), \
- FL_TEST_RAW((ary), RARRAY_EMBED_FLAG) != 0)
-
#define ARY_HEAP_PTR(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.ptr)
#define ARY_HEAP_LEN(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.len)
#define ARY_HEAP_CAPA(a) (assert(!ARY_EMBED_P(a)), assert(!ARY_SHARED_ROOT_P(a)), \
@@ -64,11 +93,11 @@ should_not_be_shared_and_embedded(VALUE ary)
#define ARY_EMBED_LEN(a) \
(assert(ARY_EMBED_P(a)), \
(long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
- (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)))
+ (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)))
#define ARY_HEAP_SIZE(a) (assert(!ARY_EMBED_P(a)), assert(ARY_OWNS_HEAP_P(a)), ARY_CAPA(a) * sizeof(VALUE))
#define ARY_OWNS_HEAP_P(a) (assert(should_be_T_ARRAY((VALUE)(a))), \
- !FL_TEST_RAW((a), ELTS_SHARED|RARRAY_EMBED_FLAG))
+ !FL_TEST_RAW((a), RARRAY_SHARED_FLAG|RARRAY_EMBED_FLAG))
#define FL_SET_EMBED(a) do { \
assert(!ARY_SHARED_P(a)); \
@@ -80,9 +109,9 @@ should_not_be_shared_and_embedded(VALUE ary)
#define FL_UNSET_EMBED(ary) FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK)
#define FL_SET_SHARED(ary) do { \
assert(!ARY_EMBED_P(ary)); \
- FL_SET((ary), ELTS_SHARED); \
+ FL_SET((ary), RARRAY_SHARED_FLAG); \
} while (0)
-#define FL_UNSET_SHARED(ary) FL_UNSET((ary), ELTS_SHARED)
+#define FL_UNSET_SHARED(ary) FL_UNSET((ary), RARRAY_SHARED_FLAG)
#define ARY_SET_PTR(ary, p) do { \
assert(!ARY_EMBED_P(ary)); \
@@ -92,7 +121,6 @@ should_not_be_shared_and_embedded(VALUE ary)
#define ARY_SET_EMBED_LEN(ary, n) do { \
long tmp_n = (n); \
assert(ARY_EMBED_P(ary)); \
- assert(!OBJ_FROZEN(ary)); \
RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK; \
RBASIC(ary)->flags |= (tmp_n) << RARRAY_EMBED_LEN_SHIFT; \
} while (0)
@@ -124,7 +152,7 @@ should_not_be_shared_and_embedded(VALUE ary)
} \
} while (0)
-#define ARY_CAPA(ary) (ARY_EMBED_P(ary) ? RARRAY_EMBED_LEN_MAX : \
+#define ARY_CAPA(ary) (ARY_EMBED_P(ary) ? ary_embed_capa(ary) : \
ARY_SHARED_ROOT_P(ary) ? RARRAY_LEN(ary) : ARY_HEAP_CAPA(ary))
#define ARY_SET_CAPA(ary, n) do { \
assert(!ARY_EMBED_P(ary)); \
@@ -133,26 +161,25 @@ should_not_be_shared_and_embedded(VALUE ary)
RARRAY(ary)->as.heap.aux.capa = (n); \
} while (0)
-#define ARY_SHARED_ROOT(ary) (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared_root)
#define ARY_SET_SHARED(ary, value) do { \
const VALUE _ary_ = (ary); \
const VALUE _value_ = (value); \
assert(!ARY_EMBED_P(_ary_)); \
assert(ARY_SHARED_P(_ary_)); \
- assert(ARY_SHARED_ROOT_P(_value_)); \
+ assert(!OBJ_FROZEN(_ary_)); \
+ assert(ARY_SHARED_ROOT_P(_value_) || OBJ_FROZEN(_value_)); \
RB_OBJ_WRITE(_ary_, &RARRAY(_ary_)->as.heap.aux.shared_root, _value_); \
} while (0)
-#define RARRAY_SHARED_ROOT_FLAG FL_USER5
-#define ARY_SHARED_ROOT_P(ary) (assert(should_be_T_ARRAY((VALUE)(ary))), \
- FL_TEST_RAW((ary), RARRAY_SHARED_ROOT_FLAG))
-#define ARY_SHARED_ROOT_REFCNT(ary) \
- (assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa)
-#define ARY_SHARED_ROOT_OCCUPIED(ary) (ARY_SHARED_ROOT_REFCNT(ary) == 1)
+
+#define ARY_SHARED_ROOT_OCCUPIED(ary) (!OBJ_FROZEN(ary) && ARY_SHARED_ROOT_REFCNT(ary) == 1)
#define ARY_SET_SHARED_ROOT_REFCNT(ary, value) do { \
assert(ARY_SHARED_ROOT_P(ary)); \
+ assert(!OBJ_FROZEN(ary)); \
+ assert((value) >= 0); \
RARRAY(ary)->as.heap.aux.capa = (value); \
} while (0)
#define FL_SET_SHARED_ROOT(ary) do { \
+ assert(!OBJ_FROZEN(ary)); \
assert(!ARY_EMBED_P(ary)); \
assert(!RARRAY_TRANSIENT_P(ary)); \
FL_SET((ary), RARRAY_SHARED_ROOT_FLAG); \
@@ -168,6 +195,65 @@ ARY_SET(VALUE a, long i, VALUE v)
}
#undef RARRAY_ASET
+static long
+ary_embed_capa(VALUE ary)
+{
+#if USE_RVARGC
+ size_t size = rb_gc_obj_slot_size(ary) - offsetof(struct RArray, as.ary);
+ assert(size % sizeof(VALUE) == 0);
+ return size / sizeof(VALUE);
+#else
+ return RARRAY_EMBED_LEN_MAX;
+#endif
+}
+
+static size_t
+ary_embed_size(long capa)
+{
+ return offsetof(struct RArray, as.ary) + (sizeof(VALUE) * capa);
+}
+
+static bool
+ary_embeddable_p(long capa)
+{
+#if USE_RVARGC
+ return rb_gc_size_allocatable_p(ary_embed_size(capa));
+#else
+ return capa <= RARRAY_EMBED_LEN_MAX;
+#endif
+}
+
+bool
+rb_ary_embeddable_p(VALUE ary)
+{
+ /* An array cannot be turned embeddable when the array is:
+ * - Shared root: other objects may point to the buffer of this array
+ * so we cannot make it embedded.
+ * - Frozen: this array may also be a shared root without the shared root
+ * flag.
+ * - Shared: we don't want to re-embed an array that points to a shared
+ * root (to save memory).
+ */
+ return !(ARY_SHARED_ROOT_P(ary) || OBJ_FROZEN(ary) || ARY_SHARED_P(ary));
+}
+
+size_t
+rb_ary_size_as_embedded(VALUE ary)
+{
+ size_t real_size;
+
+ if (ARY_EMBED_P(ary)) {
+ real_size = ary_embed_size(ARY_EMBED_LEN(ary));
+ }
+ else if (rb_ary_embeddable_p(ary)) {
+ real_size = ary_embed_size(ARY_HEAP_CAPA(ary));
+ }
+ else {
+ real_size = sizeof(struct RArray);
+ }
+ return real_size;
+}
+
#if ARRAY_DEBUG
#define ary_verify(ary) ary_verify_(ary, __FILE__, __LINE__)
@@ -177,19 +263,19 @@ ary_verify_(VALUE ary, const char *file, int line)
{
assert(RB_TYPE_P(ary, T_ARRAY));
- if (FL_TEST(ary, ELTS_SHARED)) {
- VALUE root = RARRAY(ary)->as.heap.aux.shared_root;
+ if (ARY_SHARED_P(ary)) {
+ VALUE root = ARY_SHARED_ROOT(ary);
const VALUE *ptr = ARY_HEAP_PTR(ary);
const VALUE *root_ptr = RARRAY_CONST_PTR_TRANSIENT(root);
long len = ARY_HEAP_LEN(ary), root_len = RARRAY_LEN(root);
- assert(FL_TEST(root, RARRAY_SHARED_ROOT_FLAG));
+ assert(ARY_SHARED_ROOT_P(root) || OBJ_FROZEN(root));
assert(root_ptr <= ptr && ptr + len <= root_ptr + root_len);
ary_verify(root);
}
else if (ARY_EMBED_P(ary)) {
assert(!RARRAY_TRANSIENT_P(ary));
assert(!ARY_SHARED_P(ary));
- assert(RARRAY_LEN(ary) <= RARRAY_EMBED_LEN_MAX);
+ assert(RARRAY_LEN(ary) <= ary_embed_capa(ary));
}
else {
#if 1
@@ -204,9 +290,11 @@ ary_verify_(VALUE ary, const char *file, int line)
#endif
}
+#if USE_TRANSIENT_HEAP
if (RARRAY_TRANSIENT_P(ary)) {
assert(rb_transient_heap_managed_ptr_p(RARRAY_CONST_PTR_TRANSIENT(ary)));
}
+#endif
rb_transient_heap_verify();
@@ -243,7 +331,7 @@ void
rb_mem_clear(VALUE *mem, long size)
{
while (size--) {
- *mem++ = Qnil;
+ *mem++ = Qnil;
}
}
@@ -251,7 +339,7 @@ static void
ary_mem_clear(VALUE ary, long beg, long size)
{
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- rb_mem_clear(ptr + beg, size);
+ rb_mem_clear(ptr + beg, size);
});
}
@@ -259,7 +347,7 @@ static inline void
memfill(register VALUE *mem, register long size, register VALUE val)
{
while (size--) {
- *mem++ = val;
+ *mem++ = val;
}
}
@@ -267,8 +355,8 @@ static void
ary_memfill(VALUE ary, long beg, long size, VALUE val)
{
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- memfill(ptr + beg, size, val);
- RB_OBJ_WRITTEN(ary, Qundef, val);
+ memfill(ptr + beg, size, val);
+ RB_OBJ_WRITTEN(ary, Qundef, val);
});
}
@@ -337,14 +425,16 @@ ary_heap_free(VALUE ary)
}
}
-static void
+static size_t
ary_heap_realloc(VALUE ary, size_t new_capa)
{
+ size_t alloc_capa = new_capa;
size_t old_capa = ARY_HEAP_CAPA(ary);
if (RARRAY_TRANSIENT_P(ary)) {
if (new_capa <= old_capa) {
/* do nothing */
+ alloc_capa = old_capa;
}
else {
VALUE *new_ptr = rb_transient_heap_alloc(ary, sizeof(VALUE) * new_capa);
@@ -362,6 +452,8 @@ ary_heap_realloc(VALUE ary, size_t new_capa)
SIZED_REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, new_capa, old_capa);
}
ary_verify(ary);
+
+ return alloc_capa;
}
#if USE_TRANSIENT_HEAP
@@ -369,14 +461,11 @@ static inline void
rb_ary_transient_heap_evacuate_(VALUE ary, int transient, int promote)
{
if (transient) {
+ assert(!ARY_SHARED_ROOT_P(ary));
+
VALUE *new_ptr;
const VALUE *old_ptr = ARY_HEAP_PTR(ary);
long capa = ARY_HEAP_CAPA(ary);
- long len = ARY_HEAP_LEN(ary);
-
- if (ARY_SHARED_ROOT_P(ary)) {
- capa = len;
- }
assert(ARY_OWNS_HEAP_P(ary));
assert(RARRAY_TRANSIENT_P(ary));
@@ -418,6 +507,27 @@ rb_ary_detransient(VALUE ary)
}
#endif
+void
+rb_ary_make_embedded(VALUE ary)
+{
+ assert(rb_ary_embeddable_p(ary));
+ if (!ARY_EMBED_P(ary)) {
+ const VALUE *buf = ARY_HEAP_PTR(ary);
+ long len = ARY_HEAP_LEN(ary);
+ bool was_transient = RARRAY_TRANSIENT_P(ary);
+
+ // FL_SET_EMBED also unsets the transient flag
+ FL_SET_EMBED(ary);
+ ARY_SET_EMBED_LEN(ary, len);
+
+ MEMCPY((void *)ARY_EMBED_PTR(ary), (void *)buf, VALUE, len);
+
+ if (!was_transient) {
+ ary_heap_free_ptr(ary, buf, len * sizeof(VALUE));
+ }
+ }
+}
+
static void
ary_resize_capa(VALUE ary, long capacity)
{
@@ -425,7 +535,8 @@ ary_resize_capa(VALUE ary, long capacity)
assert(!OBJ_FROZEN(ary));
assert(!ARY_SHARED_P(ary));
- if (capacity > RARRAY_EMBED_LEN_MAX) {
+ if (capacity > ary_embed_capa(ary)) {
+ size_t new_capa = capacity;
if (ARY_EMBED_P(ary)) {
long len = ARY_EMBED_LEN(ary);
VALUE *ptr = ary_heap_alloc(ary, capacity);
@@ -436,9 +547,9 @@ ary_resize_capa(VALUE ary, long capacity)
ARY_SET_HEAP_LEN(ary, len);
}
else {
- ary_heap_realloc(ary, capacity);
+ new_capa = ary_heap_realloc(ary, capacity);
}
- ARY_SET_CAPA(ary, capacity);
+ ARY_SET_CAPA(ary, new_capa);
}
else {
if (!ARY_EMBED_P(ary)) {
@@ -476,10 +587,10 @@ ary_double_capa(VALUE ary, long min)
long new_capa = ARY_CAPA(ary) / 2;
if (new_capa < ARY_DEFAULT_SIZE) {
- new_capa = ARY_DEFAULT_SIZE;
+ new_capa = ARY_DEFAULT_SIZE;
}
if (new_capa >= ARY_MAX_SIZE - min) {
- new_capa = (ARY_MAX_SIZE - min) / 2;
+ new_capa = (ARY_MAX_SIZE - min) / 2;
}
new_capa += min;
ary_resize_capa(ary, new_capa);
@@ -490,39 +601,40 @@ ary_double_capa(VALUE ary, long min)
static void
rb_ary_decrement_share(VALUE shared_root)
{
- if (shared_root) {
- long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
- if (num == 0) {
- rb_ary_free(shared_root);
- rb_gc_force_recycle(shared_root);
- }
- else if (num > 0) {
- ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
- }
+ if (!OBJ_FROZEN(shared_root)) {
+ long num = ARY_SHARED_ROOT_REFCNT(shared_root);
+ ARY_SET_SHARED_ROOT_REFCNT(shared_root, num - 1);
}
}
static void
rb_ary_unshare(VALUE ary)
{
- VALUE shared_root = RARRAY(ary)->as.heap.aux.shared_root;
+ VALUE shared_root = ARY_SHARED_ROOT(ary);
rb_ary_decrement_share(shared_root);
FL_UNSET_SHARED(ary);
}
-static inline void
-rb_ary_unshare_safe(VALUE ary)
+static void
+rb_ary_reset(VALUE ary)
{
- if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
- rb_ary_unshare(ary);
+ if (ARY_OWNS_HEAP_P(ary)) {
+ ary_heap_free(ary);
+ }
+ else if (ARY_SHARED_P(ary)) {
+ rb_ary_unshare(ary);
}
+
+ FL_SET_EMBED(ary);
+ ARY_SET_EMBED_LEN(ary, 0);
}
static VALUE
rb_ary_increment_share(VALUE shared_root)
{
- long num = ARY_SHARED_ROOT_REFCNT(shared_root);
- if (num >= 0) {
+ if (!OBJ_FROZEN(shared_root)) {
+ long num = ARY_SHARED_ROOT_REFCNT(shared_root);
+ assert(num >= 0);
ARY_SET_SHARED_ROOT_REFCNT(shared_root, num + 1);
}
return shared_root;
@@ -545,34 +657,33 @@ rb_ary_modify_check(VALUE ary)
}
void
-rb_ary_modify(VALUE ary)
+rb_ary_cancel_sharing(VALUE ary)
{
- rb_ary_modify_check(ary);
if (ARY_SHARED_P(ary)) {
- long shared_len, len = RARRAY_LEN(ary);
+ long shared_len, len = RARRAY_LEN(ary);
VALUE shared_root = ARY_SHARED_ROOT(ary);
ary_verify(shared_root);
- if (len <= RARRAY_EMBED_LEN_MAX) {
- const VALUE *ptr = ARY_HEAP_PTR(ary);
+ if (len <= ary_embed_capa(ary)) {
+ const VALUE *ptr = ARY_HEAP_PTR(ary);
FL_UNSET_SHARED(ary);
FL_SET_EMBED(ary);
- MEMCPY((VALUE *)ARY_EMBED_PTR(ary), ptr, VALUE, len);
+ MEMCPY((VALUE *)ARY_EMBED_PTR(ary), ptr, VALUE, len);
rb_ary_decrement_share(shared_root);
ARY_SET_EMBED_LEN(ary, len);
}
else if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && len > ((shared_len = RARRAY_LEN(shared_root))>>1)) {
long shift = RARRAY_CONST_PTR_TRANSIENT(ary) - RARRAY_CONST_PTR_TRANSIENT(shared_root);
- FL_UNSET_SHARED(ary);
+ FL_UNSET_SHARED(ary);
ARY_SET_PTR(ary, RARRAY_CONST_PTR_TRANSIENT(shared_root));
- ARY_SET_CAPA(ary, shared_len);
+ ARY_SET_CAPA(ary, shared_len);
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- MEMMOVE(ptr, ptr+shift, VALUE, len);
- });
+ MEMMOVE(ptr, ptr+shift, VALUE, len);
+ });
FL_SET_EMBED(shared_root);
rb_ary_decrement_share(shared_root);
- }
+ }
else {
VALUE *ptr = ary_heap_alloc(ary, len);
MEMCPY(ptr, ARY_HEAP_PTR(ary), VALUE, len);
@@ -581,11 +692,18 @@ rb_ary_modify(VALUE ary)
ARY_SET_PTR(ary, ptr);
}
- rb_gc_writebarrier_remember(ary);
+ rb_gc_writebarrier_remember(ary);
}
ary_verify(ary);
}
+void
+rb_ary_modify(VALUE ary)
+{
+ rb_ary_modify_check(ary);
+ rb_ary_cancel_sharing(ary);
+}
+
static VALUE
ary_ensure_room_for_push(VALUE ary, long add_len)
{
@@ -594,40 +712,40 @@ ary_ensure_room_for_push(VALUE ary, long add_len)
long capa;
if (old_len > ARY_MAX_SIZE - add_len) {
- rb_raise(rb_eIndexError, "index %ld too big", new_len);
+ rb_raise(rb_eIndexError, "index %ld too big", new_len);
}
if (ARY_SHARED_P(ary)) {
- if (new_len > RARRAY_EMBED_LEN_MAX) {
+ if (new_len > ary_embed_capa(ary)) {
VALUE shared_root = ARY_SHARED_ROOT(ary);
if (ARY_SHARED_ROOT_OCCUPIED(shared_root)) {
if (ARY_HEAP_PTR(ary) - RARRAY_CONST_PTR_TRANSIENT(shared_root) + new_len <= RARRAY_LEN(shared_root)) {
- rb_ary_modify_check(ary);
+ rb_ary_modify_check(ary);
ary_verify(ary);
ary_verify(shared_root);
return shared_root;
- }
- else {
- /* if array is shared, then it is likely it participate in push/shift pattern */
- rb_ary_modify(ary);
- capa = ARY_CAPA(ary);
- if (new_len > capa - (capa >> 6)) {
- ary_double_capa(ary, new_len);
- }
+ }
+ else {
+ /* if array is shared, then it is likely it participate in push/shift pattern */
+ rb_ary_modify(ary);
+ capa = ARY_CAPA(ary);
+ if (new_len > capa - (capa >> 6)) {
+ ary_double_capa(ary, new_len);
+ }
ary_verify(ary);
- return ary;
- }
- }
- }
+ return ary;
+ }
+ }
+ }
ary_verify(ary);
rb_ary_modify(ary);
}
else {
- rb_ary_modify_check(ary);
+ rb_ary_modify_check(ary);
}
capa = ARY_CAPA(ary);
if (new_len > capa) {
- ary_double_capa(ary, new_len);
+ ary_double_capa(ary, new_len);
}
ary_verify(ary);
@@ -636,12 +754,16 @@ ary_ensure_room_for_push(VALUE ary, long add_len)
/*
* call-seq:
- * ary.freeze -> ary
+ * array.freeze -> self
+ *
+ * Freezes +self+; returns +self+:
*
- * Calls Object#freeze on +ary+ to prevent any further
- * modification. A RuntimeError will be raised if a modification
- * attempt is made.
+ * a = []
+ * a.frozen? # => false
+ * a.freeze
+ * a.frozen? # => true
*
+ * An attempt to modify a frozen \Array raises FrozenError.
*/
VALUE
@@ -661,18 +783,25 @@ VALUE
rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
{
if (!ARY_EMBED_P(ary1) && ARY_SHARED_P(ary1) &&
- !ARY_EMBED_P(ary2) && ARY_SHARED_P(ary2) &&
- RARRAY(ary1)->as.heap.aux.shared_root == RARRAY(ary2)->as.heap.aux.shared_root &&
- RARRAY(ary1)->as.heap.len == RARRAY(ary2)->as.heap.len) {
- return Qtrue;
+ !ARY_EMBED_P(ary2) && ARY_SHARED_P(ary2) &&
+ ARY_SHARED_ROOT(ary1) == ARY_SHARED_ROOT(ary2) &&
+ ARY_HEAP_LEN(ary1) == ARY_HEAP_LEN(ary2)) {
+ return Qtrue;
}
return Qfalse;
}
static VALUE
-ary_alloc(VALUE klass)
+ary_alloc_embed(VALUE klass, long capa)
{
- NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
+ size_t size = ary_embed_size(capa);
+ assert(rb_gc_size_allocatable_p(size));
+#if !USE_RVARGC
+ assert(size <= sizeof(struct RArray));
+#endif
+ RVARGC_NEWOBJ_OF(ary, struct RArray, klass,
+ T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0),
+ size);
/* Created array is:
* FL_SET_EMBED((VALUE)ary);
* ARY_SET_EMBED_LEN((VALUE)ary, 0);
@@ -681,10 +810,19 @@ ary_alloc(VALUE klass)
}
static VALUE
+ary_alloc_heap(VALUE klass)
+{
+ RVARGC_NEWOBJ_OF(ary, struct RArray, klass,
+ T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0),
+ sizeof(struct RArray));
+ return (VALUE)ary;
+}
+
+static VALUE
empty_ary_alloc(VALUE klass)
{
RUBY_DTRACE_CREATE_HOOK(ARRAY, 0);
- return ary_alloc(klass);
+ return ary_alloc_embed(klass, 0);
}
static VALUE
@@ -693,20 +831,24 @@ ary_new(VALUE klass, long capa)
VALUE ary,*ptr;
if (capa < 0) {
- rb_raise(rb_eArgError, "negative array size (or size too big)");
+ rb_raise(rb_eArgError, "negative array size (or size too big)");
}
if (capa > ARY_MAX_SIZE) {
- rb_raise(rb_eArgError, "array size too big");
+ rb_raise(rb_eArgError, "array size too big");
}
RUBY_DTRACE_CREATE_HOOK(ARRAY, capa);
- ary = ary_alloc(klass);
- if (capa > RARRAY_EMBED_LEN_MAX) {
+ if (ary_embeddable_p(capa)) {
+ ary = ary_alloc_embed(klass, capa);
+ }
+ else {
+ ary = ary_alloc_heap(klass);
+ ARY_SET_CAPA(ary, capa);
+ assert(!ARY_EMBED_P(ary));
+
ptr = ary_heap_alloc(ary, capa);
- FL_UNSET_EMBED(ary);
ARY_SET_PTR(ary, ptr);
- ARY_SET_CAPA(ary, capa);
ARY_SET_HEAP_LEN(ary, 0);
}
@@ -722,7 +864,7 @@ rb_ary_new_capa(long capa)
VALUE
rb_ary_new(void)
{
- return rb_ary_new2(RARRAY_EMBED_LEN_MAX);
+ return rb_ary_new_capa(0);
}
VALUE
@@ -736,7 +878,7 @@ VALUE
va_start(ar, n);
for (i=0; i<n; i++) {
- ARY_SET(ary, i, va_arg(ar, VALUE));
+ ARY_SET(ary, i, va_arg(ar, VALUE));
}
va_end(ar);
@@ -751,8 +893,8 @@ rb_ary_tmp_new_from_values(VALUE klass, long n, const VALUE *elts)
ary = ary_new(klass, n);
if (n > 0 && elts) {
- ary_memcpy(ary, 0, n, elts);
- ARY_SET_LEN(ary, n);
+ ary_memcpy(ary, 0, n, elts);
+ ARY_SET_LEN(ary, n);
}
return ary;
@@ -764,8 +906,79 @@ rb_ary_new_from_values(long n, const VALUE *elts)
return rb_ary_tmp_new_from_values(rb_cArray, n, elts);
}
+static VALUE
+ec_ary_alloc_embed(rb_execution_context_t *ec, VALUE klass, long capa)
+{
+ size_t size = ary_embed_size(capa);
+ assert(rb_gc_size_allocatable_p(size));
+#if !USE_RVARGC
+ assert(size <= sizeof(struct RArray));
+#endif
+ RB_RVARGC_EC_NEWOBJ_OF(ec, ary, struct RArray, klass,
+ T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0),
+ size);
+ /* Created array is:
+ * FL_SET_EMBED((VALUE)ary);
+ * ARY_SET_EMBED_LEN((VALUE)ary, 0);
+ */
+ return (VALUE)ary;
+}
+
+static VALUE
+ec_ary_alloc_heap(rb_execution_context_t *ec, VALUE klass)
+{
+ RB_RVARGC_EC_NEWOBJ_OF(ec, ary, struct RArray, klass,
+ T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0),
+ sizeof(struct RArray));
+ return (VALUE)ary;
+}
+
+static VALUE
+ec_ary_new(rb_execution_context_t *ec, VALUE klass, long capa)
+{
+ VALUE ary,*ptr;
+
+ if (capa < 0) {
+ rb_raise(rb_eArgError, "negative array size (or size too big)");
+ }
+ if (capa > ARY_MAX_SIZE) {
+ rb_raise(rb_eArgError, "array size too big");
+ }
+
+ RUBY_DTRACE_CREATE_HOOK(ARRAY, capa);
+
+ if (ary_embeddable_p(capa)) {
+ ary = ec_ary_alloc_embed(ec, klass, capa);
+ }
+ else {
+ ary = ec_ary_alloc_heap(ec, klass);
+ ARY_SET_CAPA(ary, capa);
+ assert(!ARY_EMBED_P(ary));
+
+ ptr = ary_heap_alloc(ary, capa);
+ ARY_SET_PTR(ary, ptr);
+ ARY_SET_HEAP_LEN(ary, 0);
+ }
+
+ return ary;
+}
+
VALUE
-rb_ary_tmp_new(long capa)
+rb_ec_ary_new_from_values(rb_execution_context_t *ec, long n, const VALUE *elts)
+{
+ VALUE ary;
+
+ ary = ec_ary_new(ec, rb_cArray, n);
+ if (n > 0 && elts) {
+ ary_memcpy(ary, 0, n, elts);
+ ARY_SET_LEN(ary, n);
+ }
+
+ return ary;
+}
+
+VALUE
+rb_ary_hidden_new(long capa)
{
VALUE ary = ary_new(0, capa);
rb_ary_transient_heap_evacuate(ary, TRUE);
@@ -773,12 +986,11 @@ rb_ary_tmp_new(long capa)
}
VALUE
-rb_ary_tmp_new_fill(long capa)
+rb_ary_hidden_new_fill(long capa)
{
- VALUE ary = ary_new(0, capa);
+ VALUE ary = rb_ary_hidden_new(capa);
ary_memfill(ary, 0, capa, Qnil);
ARY_SET_LEN(ary, capa);
- rb_ary_transient_heap_evacuate(ary, TRUE);
return ary;
}
@@ -816,63 +1028,69 @@ RUBY_FUNC_EXPORTED size_t
rb_ary_memsize(VALUE ary)
{
if (ARY_OWNS_HEAP_P(ary)) {
- return ARY_CAPA(ary) * sizeof(VALUE);
+ return ARY_CAPA(ary) * sizeof(VALUE);
}
else {
- return 0;
+ return 0;
}
}
-static inline void
-ary_discard(VALUE ary)
-{
- rb_ary_free(ary);
- RBASIC(ary)->flags |= RARRAY_EMBED_FLAG;
- RBASIC(ary)->flags &= ~(RARRAY_EMBED_LEN_MASK | RARRAY_TRANSIENT_FLAG);
-}
-
static VALUE
ary_make_shared(VALUE ary)
{
- assert(!ARY_EMBED_P(ary));
+ assert(USE_RVARGC || !ARY_EMBED_P(ary));
ary_verify(ary);
if (ARY_SHARED_P(ary)) {
return ARY_SHARED_ROOT(ary);
}
else if (ARY_SHARED_ROOT_P(ary)) {
- return ary;
+ return ary;
}
else if (OBJ_FROZEN(ary)) {
- rb_ary_transient_heap_evacuate(ary, TRUE);
- ary_shrink_capa(ary);
- FL_SET_SHARED_ROOT(ary);
- ARY_SET_SHARED_ROOT_REFCNT(ary, 1);
- return ary;
+ if (!ARY_EMBED_P(ary)) {
+ rb_ary_transient_heap_evacuate(ary, TRUE);
+ ary_shrink_capa(ary);
+ }
+ return ary;
}
else {
- long capa = ARY_CAPA(ary), len = RARRAY_LEN(ary);
- const VALUE *ptr;
- NEWOBJ_OF(shared, struct RArray, 0, T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
-
rb_ary_transient_heap_evacuate(ary, TRUE);
- ptr = ARY_HEAP_PTR(ary);
-
- FL_UNSET_EMBED(shared);
- ARY_SET_LEN((VALUE)shared, capa);
- ARY_SET_PTR((VALUE)shared, ptr);
- ary_mem_clear((VALUE)shared, len, capa - len);
- FL_SET_SHARED_ROOT(shared);
- ARY_SET_SHARED_ROOT_REFCNT((VALUE)shared, 1);
- FL_SET_SHARED(ary);
+
+ long capa = ARY_CAPA(ary);
+ long len = RARRAY_LEN(ary);
+
+ /* Shared roots cannot be embedded because the reference count
+ * (refcnt) is stored in as.heap.aux.capa. */
+ VALUE shared = ary_alloc_heap(0);
+ FL_SET_SHARED_ROOT(shared);
+
+ if (ARY_EMBED_P(ary)) {
+ /* Cannot use ary_heap_alloc because we don't want to allocate
+ * on the transient heap. */
+ VALUE *ptr = ALLOC_N(VALUE, capa);
+ ARY_SET_PTR(shared, ptr);
+ ary_memcpy(shared, 0, len, RARRAY_PTR(ary));
+
+ FL_UNSET_EMBED(ary);
+ ARY_SET_HEAP_LEN(ary, len);
+ ARY_SET_PTR(ary, ptr);
+ }
+ else {
+ ARY_SET_PTR(shared, RARRAY_PTR(ary));
+ }
+
+ ARY_SET_LEN(shared, capa);
+ ary_mem_clear(shared, len, capa - len);
+ ARY_SET_SHARED_ROOT_REFCNT(shared, 1);
+ FL_SET_SHARED(ary);
RB_DEBUG_COUNTER_INC(obj_ary_shared_create);
- ARY_SET_SHARED(ary, (VALUE)shared);
- OBJ_FREEZE(shared);
+ ARY_SET_SHARED(ary, shared);
- ary_verify((VALUE)shared);
+ ary_verify(shared);
ary_verify(ary);
- return (VALUE)shared;
+ return shared;
}
}
@@ -881,8 +1099,10 @@ ary_make_substitution(VALUE ary)
{
long len = RARRAY_LEN(ary);
- if (len <= RARRAY_EMBED_LEN_MAX) {
- VALUE subst = rb_ary_new2(len);
+ if (ary_embeddable_p(len)) {
+ VALUE subst = rb_ary_new_capa(len);
+ assert(ARY_EMBED_P(subst));
+
ary_memcpy(subst, 0, len, RARRAY_CONST_PTR_TRANSIENT(ary));
ARY_SET_EMBED_LEN(subst, len);
return subst;
@@ -917,23 +1137,24 @@ rb_check_to_array(VALUE ary)
return rb_check_convert_type_with_id(ary, T_ARRAY, "Array", idTo_a);
}
+VALUE
+rb_to_array(VALUE ary)
+{
+ return rb_convert_type_with_id(ary, T_ARRAY, "Array", idTo_a);
+}
+
/*
* call-seq:
- * Array.try_convert(obj) -> array or nil
+ * Array.try_convert(object) -> object, new_array, or nil
*
- * Tries to convert +obj+ into an array, using the +to_ary+ method. Returns
- * the converted array or +nil+ if +obj+ cannot be converted.
- * This method can be used to check if an argument is an array.
+ * If +object+ is an \Array object, returns +object+.
*
- * Array.try_convert([1]) #=> [1]
- * Array.try_convert("1") #=> nil
+ * Otherwise if +object+ responds to <tt>:to_ary</tt>,
+ * calls <tt>object.to_ary</tt> and returns the result.
*
- * if tmp = Array.try_convert(arg)
- * # the argument is an array
- * elsif tmp = String.try_convert(arg)
- * # the argument is a string
- * end
+ * Returns +nil+ if +object+ does not respond to <tt>:to_ary</tt>
*
+ * Raises an exception unless <tt>object.to_ary</tt> returns an \Array object.
*/
static VALUE
@@ -942,60 +1163,76 @@ rb_ary_s_try_convert(VALUE dummy, VALUE ary)
return rb_check_array_type(ary);
}
+/* :nodoc: */
+static VALUE
+rb_ary_s_new(int argc, VALUE *argv, VALUE klass)
+{
+ VALUE ary;
+
+ if (klass == rb_cArray) {
+ long size = 0;
+ if (argc > 0 && FIXNUM_P(argv[0])) {
+ size = FIX2LONG(argv[0]);
+ if (size < 0) size = 0;
+ }
+
+ ary = ary_new(klass, size);
+
+ rb_obj_call_init_kw(ary, argc, argv, RB_PASS_CALLED_KEYWORDS);
+ }
+ else {
+ ary = rb_class_new_instance_pass_kw(argc, argv, klass);
+ }
+
+ return ary;
+}
+
/*
* call-seq:
- * Array.new(size=0, default=nil)
- * Array.new(array)
- * Array.new(size) {|index| block }
- *
- * Returns a new array.
+ * Array.new -> new_empty_array
+ * Array.new(array) -> new_array
+ * Array.new(size) -> new_array
+ * Array.new(size, default_value) -> new_array
+ * Array.new(size) {|index| ... } -> new_array
*
- * In the first form, if no arguments are sent, the new array will be empty.
- * When a +size+ and an optional +default+ are sent, an array is created with
- * +size+ copies of +default+. Take notice that all elements will reference the
- * same object +default+.
+ * Returns a new \Array.
*
- * The second form creates a copy of the array passed as a parameter (the
- * array is generated by calling to_ary on the parameter).
+ * With no block and no arguments, returns a new empty \Array object.
*
- * first_array = ["Matz", "Guido"]
+ * With no block and a single \Array argument +array+,
+ * returns a new \Array formed from +array+:
*
- * second_array = Array.new(first_array) #=> ["Matz", "Guido"]
+ * a = Array.new([:foo, 'bar', 2])
+ * a.class # => Array
+ * a # => [:foo, "bar", 2]
*
- * first_array.equal? second_array #=> false
+ * With no block and a single \Integer argument +size+,
+ * returns a new \Array of the given size
+ * whose elements are all +nil+:
*
- * In the last form, an array of the given size is created. Each element in
- * this array is created by passing the element's index to the given block
- * and storing the return value.
+ * a = Array.new(3)
+ * a # => [nil, nil, nil]
*
- * Array.new(3) {|index| index ** 2}
- * # => [0, 1, 4]
+ * With no block and arguments +size+ and +default_value+,
+ * returns an \Array of the given size;
+ * each element is that same +default_value+:
*
- * == Common gotchas
+ * a = Array.new(3, 'x')
+ * a # => ['x', 'x', 'x']
*
- * When sending the second parameter, the same object will be used as the
- * value for all the array elements:
+ * With a block and argument +size+,
+ * returns an \Array of the given size;
+ * the block is called with each successive integer +index+;
+ * the element for that +index+ is the return value from the block:
*
- * a = Array.new(2, Hash.new)
- * # => [{}, {}]
+ * a = Array.new(3) {|index| "Element #{index}" }
+ * a # => ["Element 0", "Element 1", "Element 2"]
*
- * a[0]['cat'] = 'feline'
- * a # => [{"cat"=>"feline"}, {"cat"=>"feline"}]
- *
- * a[1]['cat'] = 'Felix'
- * a # => [{"cat"=>"Felix"}, {"cat"=>"Felix"}]
- *
- * Since all the Array elements store the same hash, changes to one of them
- * will affect them all.
- *
- * If multiple copies are what you want, you should use the block
- * version which uses the result of that block each time an element
- * of the array needs to be initialized:
- *
- * a = Array.new(2) {Hash.new}
- * a[0]['cat'] = 'feline'
- * a # => [{"cat"=>"feline"}, {}]
+ * Raises ArgumentError if +size+ is negative.
*
+ * With a block and no argument,
+ * or a single argument +0+,
+ * ignores the block and returns a new empty \Array.
*/
static VALUE
@@ -1006,51 +1243,48 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
rb_ary_modify(ary);
if (argc == 0) {
- if (ARY_OWNS_HEAP_P(ary) && ARY_HEAP_PTR(ary) != NULL) {
- ary_heap_free(ary);
- }
- rb_ary_unshare_safe(ary);
- FL_SET_EMBED(ary);
- ARY_SET_EMBED_LEN(ary, 0);
- if (rb_block_given_p()) {
- rb_warning("given block not used");
- }
- return ary;
+ rb_ary_reset(ary);
+ assert(ARY_EMBED_P(ary));
+ assert(ARY_EMBED_LEN(ary) == 0);
+ if (rb_block_given_p()) {
+ rb_warning("given block not used");
+ }
+ return ary;
}
rb_scan_args(argc, argv, "02", &size, &val);
if (argc == 1 && !FIXNUM_P(size)) {
- val = rb_check_array_type(size);
- if (!NIL_P(val)) {
- rb_ary_replace(ary, val);
- return ary;
- }
+ val = rb_check_array_type(size);
+ if (!NIL_P(val)) {
+ rb_ary_replace(ary, val);
+ return ary;
+ }
}
len = NUM2LONG(size);
/* NUM2LONG() may call size.to_int, ary can be frozen, modified, etc */
if (len < 0) {
- rb_raise(rb_eArgError, "negative array size");
+ rb_raise(rb_eArgError, "negative array size");
}
if (len > ARY_MAX_SIZE) {
- rb_raise(rb_eArgError, "array size too big");
+ rb_raise(rb_eArgError, "array size too big");
}
/* recheck after argument conversion */
rb_ary_modify(ary);
ary_resize_capa(ary, len);
if (rb_block_given_p()) {
- long i;
+ long i;
- if (argc == 2) {
- rb_warn("block supersedes default value argument");
- }
- for (i=0; i<len; i++) {
- rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
- ARY_SET_LEN(ary, i + 1);
- }
+ if (argc == 2) {
+ rb_warn("block supersedes default value argument");
+ }
+ for (i=0; i<len; i++) {
+ rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
+ ARY_SET_LEN(ary, i + 1);
+ }
}
else {
- ary_memfill(ary, 0, len, val);
- ARY_SET_LEN(ary, len);
+ ary_memfill(ary, 0, len, val);
+ ARY_SET_LEN(ary, len);
}
return ary;
}
@@ -1081,26 +1315,26 @@ rb_ary_store(VALUE ary, long idx, VALUE val)
long len = RARRAY_LEN(ary);
if (idx < 0) {
- idx += len;
- if (idx < 0) {
- rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
- idx - len, -len);
- }
+ idx += len;
+ if (idx < 0) {
+ rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
+ idx - len, -len);
+ }
}
else if (idx >= ARY_MAX_SIZE) {
- rb_raise(rb_eIndexError, "index %ld too big", idx);
+ rb_raise(rb_eIndexError, "index %ld too big", idx);
}
rb_ary_modify(ary);
if (idx >= ARY_CAPA(ary)) {
- ary_double_capa(ary, idx);
+ ary_double_capa(ary, idx);
}
if (idx > len) {
- ary_mem_clear(ary, len, idx - len + 1);
+ ary_mem_clear(ary, len, idx - len + 1);
}
if (idx >= len) {
- ARY_SET_LEN(ary, idx + 1);
+ ARY_SET_LEN(ary, idx + 1);
}
ARY_SET(ary, idx, val);
}
@@ -1112,17 +1346,20 @@ ary_make_partial(VALUE ary, VALUE klass, long offset, long len)
assert(len >= 0);
assert(offset+len <= RARRAY_LEN(ary));
- if (len <= RARRAY_EMBED_LEN_MAX) {
- VALUE result = ary_alloc(klass);
+ const size_t rarray_embed_capa_max = (sizeof(struct RArray) - offsetof(struct RArray, as.ary)) / sizeof(VALUE);
+
+ if ((size_t)len <= rarray_embed_capa_max && ary_embeddable_p(len)) {
+ VALUE result = ary_alloc_embed(klass, len);
ary_memcpy(result, 0, len, RARRAY_CONST_PTR_TRANSIENT(ary) + offset);
ARY_SET_EMBED_LEN(result, len);
return result;
}
else {
- VALUE shared, result = ary_alloc(klass);
- FL_UNSET_EMBED(result);
+ VALUE shared = ary_make_shared(ary);
+
+ VALUE result = ary_alloc_heap(klass);
+ assert(!ARY_EMBED_P(result));
- shared = ary_make_shared(ary);
ARY_SET_PTR(result, RARRAY_CONST_PTR_TRANSIENT(ary));
ARY_SET_LEN(result, RARRAY_LEN(ary));
rb_ary_set_shared(result, shared);
@@ -1137,9 +1374,59 @@ ary_make_partial(VALUE ary, VALUE klass, long offset, long len)
}
static VALUE
+ary_make_partial_step(VALUE ary, VALUE klass, long offset, long len, long step)
+{
+ assert(offset >= 0);
+ assert(len >= 0);
+ assert(offset+len <= RARRAY_LEN(ary));
+ assert(step != 0);
+
+ const VALUE *values = RARRAY_CONST_PTR_TRANSIENT(ary);
+ const long orig_len = len;
+
+ if (step > 0 && step >= len) {
+ VALUE result = ary_new(klass, 1);
+ VALUE *ptr = (VALUE *)ARY_EMBED_PTR(result);
+ RB_OBJ_WRITE(result, ptr, values[offset]);
+ ARY_SET_EMBED_LEN(result, 1);
+ return result;
+ }
+ else if (step < 0 && step < -len) {
+ step = -len;
+ }
+
+ long ustep = (step < 0) ? -step : step;
+ len = roomof(len, ustep);
+
+ long i;
+ long j = offset + ((step > 0) ? 0 : (orig_len - 1));
+
+ VALUE result = ary_new(klass, len);
+ if (ARY_EMBED_P(result)) {
+ VALUE *ptr = (VALUE *)ARY_EMBED_PTR(result);
+ for (i = 0; i < len; ++i) {
+ RB_OBJ_WRITE(result, ptr+i, values[j]);
+ j += step;
+ }
+ ARY_SET_EMBED_LEN(result, len);
+ }
+ else {
+ RARRAY_PTR_USE_TRANSIENT(result, ptr, {
+ for (i = 0; i < len; ++i) {
+ RB_OBJ_WRITE(result, ptr+i, values[j]);
+ j += step;
+ }
+ });
+ ARY_SET_LEN(result, len);
+ }
+
+ return result;
+}
+
+static VALUE
ary_make_shared_copy(VALUE ary)
{
- return ary_make_partial(ary, rb_obj_class(ary), 0, RARRAY_LEN(ary));
+ return ary_make_partial(ary, rb_cArray, 0, RARRAY_LEN(ary));
}
enum ary_take_pos_flags
@@ -1164,30 +1451,31 @@ ary_take_first_or_last(int argc, const VALUE *argv, VALUE ary, enum ary_take_pos
n = NUM2LONG(argv[0]);
len = RARRAY_LEN(ary);
if (n > len) {
- n = len;
+ n = len;
}
else if (n < 0) {
- rb_raise(rb_eArgError, "negative array size");
+ rb_raise(rb_eArgError, "negative array size");
}
if (last) {
- offset = len - n;
+ offset = len - n;
}
return ary_make_partial(ary, rb_cArray, offset, n);
}
/*
* call-seq:
- * ary << obj -> ary
+ * array << object -> self
+ *
+ * Appends +object+ to +self+; returns +self+:
*
- * Append---Pushes the given object on to the end of this array. This
- * expression returns the array itself, so several appends
- * may be chained together.
+ * a = [:foo, 'bar', 2]
+ * a << :baz # => [:foo, "bar", 2, :baz]
*
- * a = [ 1, 2 ]
- * a << "c" << "d" << [ 3, 4 ]
- * #=> [ 1, 2, "c", "d", [ 3, 4 ] ]
- * a
- * #=> [ 1, 2, "c", "d", [ 3, 4 ] ]
+ * Appends +object+ as one element, even if it is another \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a << [3, 4]
+ * a1 # => [:foo, "bar", 2, [3, 4]]
*
*/
@@ -1197,7 +1485,7 @@ rb_ary_push(VALUE ary, VALUE item)
long idx = RARRAY_LEN((ary_verify(ary), ary));
VALUE target_ary = ary_ensure_room_for_push(ary, 1);
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- RB_OBJ_WRITE(target_ary, &ptr[idx], item);
+ RB_OBJ_WRITE(target_ary, &ptr[idx], item);
});
ARY_SET_LEN(ary, idx + 1);
ary_verify(ary);
@@ -1216,19 +1504,24 @@ rb_ary_cat(VALUE ary, const VALUE *argv, long len)
/*
* call-seq:
- * ary.push(obj, ...) -> ary
- * ary.append(obj, ...) -> ary
- *
- * Append --- Pushes the given object(s) on to the end of this array. This
- * expression returns the array itself, so several appends
- * may be chained together. See also Array#pop for the opposite
- * effect.
- *
- * a = [ "a", "b", "c" ]
- * a.push("d", "e", "f")
- * #=> ["a", "b", "c", "d", "e", "f"]
- * [1, 2, 3].push(4).push(5)
- * #=> [1, 2, 3, 4, 5]
+ * array.push(*objects) -> self
+ *
+ * Appends trailing elements.
+ *
+ * Appends each argument in +objects+ to +self+; returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.push(:baz, :bat) # => [:foo, "bar", 2, :baz, :bat]
+ *
+ * Appends each argument as one element, even if it is another \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a.push([:baz, :bat], [:bam, :bad])
+ * a1 # => [:foo, "bar", 2, [:baz, :bat], [:bam, :bad]]
+ *
+ * Array#append is an alias for Array#push.
+ *
+ * Related: #pop, #shift, #unshift.
*/
static VALUE
@@ -1245,10 +1538,10 @@ rb_ary_pop(VALUE ary)
n = RARRAY_LEN(ary);
if (n == 0) return Qnil;
if (ARY_OWNS_HEAP_P(ary) &&
- n * 3 < ARY_CAPA(ary) &&
- ARY_CAPA(ary) > ARY_DEFAULT_SIZE)
+ n * 3 < ARY_CAPA(ary) &&
+ ARY_CAPA(ary) > ARY_DEFAULT_SIZE)
{
- ary_resize_capa(ary, n * 2);
+ ary_resize_capa(ary, n * 2);
}
--n;
ARY_SET_LEN(ary, n);
@@ -1258,20 +1551,33 @@ rb_ary_pop(VALUE ary)
/*
* call-seq:
- * ary.pop -> obj or nil
- * ary.pop(n) -> new_ary
+ * array.pop -> object or nil
+ * array.pop(n) -> new_array
+ *
+ * Removes and returns trailing elements.
+ *
+ * When no argument is given and +self+ is not empty,
+ * removes and returns the last element:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.pop # => 2
+ * a # => [:foo, "bar"]
*
- * Removes the last element from +self+ and returns it, or
- * +nil+ if the array is empty.
+ * Returns +nil+ if the array is empty.
*
- * If a number +n+ is given, returns an array of the last +n+ elements
- * (or less) just like <code>array.slice!(-n, n)</code> does. See also
- * Array#push for the opposite effect.
+ * When a non-negative \Integer argument +n+ is given and is in range,
*
- * a = [ "a", "b", "c", "d" ]
- * a.pop #=> "d"
- * a.pop(2) #=> ["b", "c"]
- * a #=> ["a"]
+ * removes and returns the last +n+ elements in a new \Array:
+ * a = [:foo, 'bar', 2]
+ * a.pop(2) # => ["bar", 2]
+ *
+ * If +n+ is positive and out of range,
+ * removes and returns all elements:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.pop(50) # => [:foo, "bar", 2]
+ *
+ * Related: #push, #shift, #unshift.
*/
static VALUE
@@ -1280,7 +1586,7 @@ rb_ary_pop_m(int argc, VALUE *argv, VALUE ary)
VALUE result;
if (argc == 0) {
- return rb_ary_pop(ary);
+ return rb_ary_pop(ary);
}
rb_ary_modify_check(ary);
@@ -1296,55 +1602,49 @@ rb_ary_shift(VALUE ary)
VALUE top;
long len = RARRAY_LEN(ary);
- rb_ary_modify_check(ary);
- if (len == 0) return Qnil;
- top = RARRAY_AREF(ary, 0);
- if (!ARY_SHARED_P(ary)) {
- if (len < ARY_DEFAULT_SIZE) {
- RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- MEMMOVE(ptr, ptr+1, VALUE, len-1);
- }); /* WB: no new reference */
- ARY_INCREASE_LEN(ary, -1);
- ary_verify(ary);
- return top;
- }
- assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */
-
- ARY_SET(ary, 0, Qnil);
- ary_make_shared(ary);
- }
- else if (ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary))) {
- RARRAY_PTR_USE_TRANSIENT(ary, ptr, ptr[0] = Qnil);
+ if (len == 0) {
+ rb_ary_modify_check(ary);
+ return Qnil;
}
- ARY_INCREASE_PTR(ary, 1); /* shift ptr */
- ARY_INCREASE_LEN(ary, -1);
- ary_verify(ary);
+ top = RARRAY_AREF(ary, 0);
+
+ rb_ary_behead(ary, 1);
return top;
}
/*
* call-seq:
- * ary.shift -> obj or nil
- * ary.shift(n) -> new_ary
+ * array.shift -> object or nil
+ * array.shift(n) -> new_array
+ *
+ * Removes and returns leading elements.
+ *
+ * When no argument is given, removes and returns the first element:
*
- * Removes the first element of +self+ and returns it (shifting all
- * other elements down by one). Returns +nil+ if the array
- * is empty.
+ * a = [:foo, 'bar', 2]
+ * a.shift # => :foo
+ * a # => ['bar', 2]
*
- * If a number +n+ is given, returns an array of the first +n+ elements
- * (or less) just like <code>array.slice!(0, n)</code> does. With +ary+
- * containing only the remainder elements, not including what was shifted to
- * +new_ary+. See also Array#unshift for the opposite effect.
+ * Returns +nil+ if +self+ is empty.
*
- * args = [ "-m", "-q", "filename" ]
- * args.shift #=> "-m"
- * args #=> ["-q", "filename"]
+ * When positive \Integer argument +n+ is given, removes the first +n+ elements;
+ * returns those elements in a new \Array:
*
- * args = [ "-m", "-q", "filename" ]
- * args.shift(2) #=> ["-m", "-q"]
- * args #=> ["filename"]
+ * a = [:foo, 'bar', 2]
+ * a.shift(2) # => [:foo, 'bar']
+ * a # => [2]
+ *
+ * If +n+ is as large as or larger than <tt>self.length</tt>,
+ * removes all elements; returns those elements in a new \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.shift(3) # => [:foo, 'bar', 2]
+ *
+ * If +n+ is zero, returns a new empty \Array; +self+ is unmodified.
+ *
+ * Related: #push, #pop, #unshift.
*/
static VALUE
@@ -1354,7 +1654,7 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
long n;
if (argc == 0) {
- return rb_ary_shift(ary);
+ return rb_ary_shift(ary);
}
rb_ary_modify_check(ary);
@@ -1368,109 +1668,133 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
MJIT_FUNC_EXPORTED VALUE
rb_ary_behead(VALUE ary, long n)
{
- if (n<=0) return ary;
+ if (n <= 0) {
+ return ary;
+ }
rb_ary_modify_check(ary);
- if (ARY_SHARED_P(ary)) {
- if (ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary))) {
- setup_occupied_shared:
- ary_mem_clear(ary, 0, n);
- }
- ARY_INCREASE_PTR(ary, n);
- }
- else {
- if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
+
+ if (!ARY_SHARED_P(ary)) {
+ if (ARY_EMBED_P(ary) || RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- MEMMOVE(ptr, ptr+n, VALUE, RARRAY_LEN(ary)-n);
- }); /* WB: no new reference */
- }
- else {
- ary_make_shared(ary);
- goto setup_occupied_shared;
- }
+ MEMMOVE(ptr, ptr + n, VALUE, RARRAY_LEN(ary) - n);
+ }); /* WB: no new reference */
+ ARY_INCREASE_LEN(ary, -n);
+ ary_verify(ary);
+ return ary;
+ }
+
+ ary_mem_clear(ary, 0, n);
+ ary_make_shared(ary);
+ }
+ else if (ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary))) {
+ ary_mem_clear(ary, 0, n);
}
- ARY_INCREASE_LEN(ary, -n);
+ ARY_INCREASE_PTR(ary, n);
+ ARY_INCREASE_LEN(ary, -n);
ary_verify(ary);
+
return ary;
}
static VALUE
-ary_ensure_room_for_unshift(VALUE ary, int argc)
+make_room_for_unshift(VALUE ary, const VALUE *head, VALUE *sharedp, int argc, long capa, long len)
+{
+ if (head - sharedp < argc) {
+ long room = capa - len - argc;
+
+ room -= room >> 4;
+ MEMMOVE((VALUE *)sharedp + argc + room, head, VALUE, len);
+ head = sharedp + argc + room;
+ }
+ ARY_SET_PTR(ary, head - argc);
+ assert(ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary)));
+
+ ary_verify(ary);
+ return ARY_SHARED_ROOT(ary);
+}
+
+static VALUE
+ary_modify_for_unshift(VALUE ary, int argc)
{
long len = RARRAY_LEN(ary);
long new_len = len + argc;
long capa;
const VALUE *head, *sharedp;
- if (len > ARY_MAX_SIZE - argc) {
- rb_raise(rb_eIndexError, "index %ld too big", new_len);
- }
-
- if (ARY_SHARED_P(ary)) {
- VALUE shared_root = ARY_SHARED_ROOT(ary);
- capa = RARRAY_LEN(shared_root);
- if (ARY_SHARED_ROOT_OCCUPIED(shared_root) && capa > new_len) {
- rb_ary_modify_check(ary);
- head = RARRAY_CONST_PTR_TRANSIENT(ary);
- sharedp = RARRAY_CONST_PTR_TRANSIENT(shared_root);
- goto makeroom_if_need;
- }
- }
-
rb_ary_modify(ary);
capa = ARY_CAPA(ary);
if (capa - (capa >> 6) <= new_len) {
- ary_double_capa(ary, new_len);
+ ary_double_capa(ary, new_len);
}
/* use shared array for big "queues" */
- if (new_len > ARY_DEFAULT_SIZE * 4) {
+ if (new_len > ARY_DEFAULT_SIZE * 4 && !ARY_EMBED_P(ary)) {
ary_verify(ary);
/* make a room for unshifted items */
- capa = ARY_CAPA(ary);
- ary_make_shared(ary);
+ capa = ARY_CAPA(ary);
+ ary_make_shared(ary);
head = sharedp = RARRAY_CONST_PTR_TRANSIENT(ary);
- goto makeroom;
- makeroom_if_need:
- if (head - sharedp < argc) {
- long room;
- makeroom:
- room = capa - new_len;
- room -= room >> 4;
- MEMMOVE((VALUE *)sharedp + argc + room, head, VALUE, len);
- head = sharedp + argc + room;
- }
- ARY_SET_PTR(ary, head - argc);
- assert(ARY_SHARED_ROOT_OCCUPIED(ARY_SHARED_ROOT(ary)));
-
- ary_verify(ary);
- return ARY_SHARED_ROOT(ary);
+ return make_room_for_unshift(ary, head, (void *)sharedp, argc, capa, len);
}
else {
- /* sliding items */
+ /* sliding items */
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- MEMMOVE(ptr + argc, ptr, VALUE, len);
- });
+ MEMMOVE(ptr + argc, ptr, VALUE, len);
+ });
ary_verify(ary);
- return ary;
+ return ary;
+ }
+}
+
+static VALUE
+ary_ensure_room_for_unshift(VALUE ary, int argc)
+{
+ long len = RARRAY_LEN(ary);
+ long new_len = len + argc;
+
+ if (len > ARY_MAX_SIZE - argc) {
+ rb_raise(rb_eIndexError, "index %ld too big", new_len);
+ }
+ else if (! ARY_SHARED_P(ary)) {
+ return ary_modify_for_unshift(ary, argc);
+ }
+ else {
+ VALUE shared_root = ARY_SHARED_ROOT(ary);
+ long capa = RARRAY_LEN(shared_root);
+
+ if (! ARY_SHARED_ROOT_OCCUPIED(shared_root)) {
+ return ary_modify_for_unshift(ary, argc);
+ }
+ else if (new_len > capa) {
+ return ary_modify_for_unshift(ary, argc);
+ }
+ else {
+ const VALUE * head = RARRAY_CONST_PTR_TRANSIENT(ary);
+ void *sharedp = (void *)RARRAY_CONST_PTR_TRANSIENT(shared_root);
+
+ rb_ary_modify_check(ary);
+ return make_room_for_unshift(ary, head, sharedp, argc, capa, len);
+ }
}
}
/*
* call-seq:
- * ary.unshift(obj, ...) -> ary
- * ary.prepend(obj, ...) -> ary
+ * array.unshift(*objects) -> self
+ *
+ * Prepends the given +objects+ to +self+:
*
- * Prepends objects to the front of +self+, moving other elements upwards.
- * See also Array#shift for the opposite effect.
+ * a = [:foo, 'bar', 2]
+ * a.unshift(:bam, :bat) # => [:bam, :bat, :foo, "bar", 2]
*
- * a = [ "b", "c", "d" ]
- * a.unshift("a") #=> ["a", "b", "c", "d"]
- * a.unshift(1, 2) #=> [ 1, 2, "a", "b", "c", "d"]
+ * Array#prepend is an alias for Array#unshift.
+ *
+ * Related: #push, #pop, #shift.
*/
static VALUE
@@ -1480,8 +1804,8 @@ rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
VALUE target_ary;
if (argc == 0) {
- rb_ary_modify_check(ary);
- return ary;
+ rb_ary_modify_check(ary);
+ return ary;
}
target_ary = ary_ensure_room_for_unshift(ary, argc);
@@ -1503,7 +1827,7 @@ rb_ary_elt(VALUE ary, long offset)
long len = RARRAY_LEN(ary);
if (len == 0) return Qnil;
if (offset < 0 || len <= offset) {
- return Qnil;
+ return Qnil;
}
return RARRAY_AREF(ary, offset);
}
@@ -1515,7 +1839,7 @@ rb_ary_entry(VALUE ary, long offset)
}
VALUE
-rb_ary_subseq(VALUE ary, long beg, long len)
+rb_ary_subseq_step(VALUE ary, long beg, long len, long step)
{
VALUE klass;
long alen = RARRAY_LEN(ary);
@@ -1524,50 +1848,129 @@ rb_ary_subseq(VALUE ary, long beg, long len)
if (beg < 0 || len < 0) return Qnil;
if (alen < len || alen < beg + len) {
- len = alen - beg;
+ len = alen - beg;
}
- klass = rb_obj_class(ary);
+ klass = rb_cArray;
if (len == 0) return ary_new(klass, 0);
+ if (step == 0)
+ rb_raise(rb_eArgError, "slice step cannot be zero");
+ if (step == 1)
+ return ary_make_partial(ary, klass, beg, len);
+ else
+ return ary_make_partial_step(ary, klass, beg, len, step);
+}
- return ary_make_partial(ary, klass, beg, len);
+VALUE
+rb_ary_subseq(VALUE ary, long beg, long len)
+{
+ return rb_ary_subseq_step(ary, beg, len, 1);
}
static VALUE rb_ary_aref2(VALUE ary, VALUE b, VALUE e);
/*
* call-seq:
- * ary[index] -> obj or nil
- * ary[start, length] -> new_ary or nil
- * ary[range] -> new_ary or nil
- * ary.slice(index) -> obj or nil
- * ary.slice(start, length) -> new_ary or nil
- * ary.slice(range) -> new_ary or nil
- *
- * Element Reference --- Returns the element at +index+, or returns a
- * subarray starting at the +start+ index and continuing for +length+
- * elements, or returns a subarray specified by +range+ of indices.
- *
- * Negative indices count backward from the end of the array (-1 is the last
- * element). For +start+ and +range+ cases the starting index is just before
- * an element. Additionally, an empty array is returned when the starting
- * index for an element range is at the end of the array.
- *
- * Returns +nil+ if the index (or starting index) are out of range.
- *
- * a = [ "a", "b", "c", "d", "e" ]
- * a[2] + a[0] + a[1] #=> "cab"
- * a[6] #=> nil
- * a[1, 2] #=> [ "b", "c" ]
- * a[1..3] #=> [ "b", "c", "d" ]
- * a[4..7] #=> [ "e" ]
- * a[6..10] #=> nil
- * a[-3, 3] #=> [ "c", "d", "e" ]
- * # special cases
- * a[5] #=> nil
- * a[6, 1] #=> nil
- * a[5, 1] #=> []
- * a[5..10] #=> []
+ * array[index] -> object or nil
+ * array[start, length] -> object or nil
+ * array[range] -> object or nil
+ * array[aseq] -> object or nil
+ * array.slice(index) -> object or nil
+ * array.slice(start, length) -> object or nil
+ * array.slice(range) -> object or nil
+ * array.slice(aseq) -> object or nil
+ *
+ * Returns elements from +self+; does not modify +self+.
+ *
+ * When a single \Integer argument +index+ is given, returns the element at offset +index+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0] # => :foo
+ * a[2] # => 2
+ * a # => [:foo, "bar", 2]
+ *
+ * If +index+ is negative, counts relative to the end of +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[-1] # => 2
+ * a[-2] # => "bar"
+ *
+ * If +index+ is out of range, returns +nil+.
+ *
+ * When two \Integer arguments +start+ and +length+ are given,
+ * returns a new \Array of size +length+ containing successive elements beginning at offset +start+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0, 2] # => [:foo, "bar"]
+ * a[1, 2] # => ["bar", 2]
+ *
+ * If <tt>start + length</tt> is greater than <tt>self.length</tt>,
+ * returns all elements from offset +start+ to the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0, 4] # => [:foo, "bar", 2]
+ * a[1, 3] # => ["bar", 2]
+ * a[2, 2] # => [2]
+ *
+ * If <tt>start == self.size</tt> and <tt>length >= 0</tt>,
+ * returns a new empty \Array.
+ *
+ * If +length+ is negative, returns +nil+.
+ *
+ * When a single \Range argument +range+ is given,
+ * treats <tt>range.min</tt> as +start+ above
+ * and <tt>range.size</tt> as +length+ above:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0..1] # => [:foo, "bar"]
+ * a[1..2] # => ["bar", 2]
+ *
+ * Special case: If <tt>range.start == a.size</tt>, returns a new empty \Array.
+ *
+ * If <tt>range.end</tt> is negative, calculates the end index from the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0..-1] # => [:foo, "bar", 2]
+ * a[0..-2] # => [:foo, "bar"]
+ * a[0..-3] # => [:foo]
+ *
+ * If <tt>range.start</tt> is negative, calculates the start index from the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[-1..2] # => [2]
+ * a[-2..2] # => ["bar", 2]
+ * a[-3..2] # => [:foo, "bar", 2]
+ *
+ * If <tt>range.start</tt> is larger than the array size, returns +nil+.
+ *
+ * a = [:foo, 'bar', 2]
+ * a[4..1] # => nil
+ * a[4..0] # => nil
+ * a[4..-1] # => nil
+ *
+ * When a single Enumerator::ArithmeticSequence argument +aseq+ is given,
+ * returns an \Array of elements corresponding to the indexes produced by
+ * the sequence.
+ *
+ * a = ['--', 'data1', '--', 'data2', '--', 'data3']
+ * a[(1..).step(2)] # => ["data1", "data2", "data3"]
*
+ * Unlike slicing with range, if the start or the end of the arithmetic sequence
+ * is larger than array size, throws RangeError.
+ *
+ * a = ['--', 'data1', '--', 'data2', '--', 'data3']
+ * a[(1..11).step(2)]
+ * # RangeError (((1..11).step(2)) out of range)
+ * a[(7..).step(2)]
+ * # RangeError (((7..).step(2)) out of range)
+ *
+ * If given a single argument, and its type is not one of the listed, tries to
+ * convert it to Integer, and raises if it is impossible:
+ *
+ * a = [:foo, 'bar', 2]
+ * # Raises TypeError (no implicit conversion of Symbol into Integer):
+ * a[:foo]
+ *
+ * Array#slice is an alias for Array#[].
*/
VALUE
@@ -1575,18 +1978,18 @@ rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
{
rb_check_arity(argc, 1, 2);
if (argc == 2) {
- return rb_ary_aref2(ary, argv[0], argv[1]);
+ return rb_ary_aref2(ary, argv[0], argv[1]);
}
return rb_ary_aref1(ary, argv[0]);
}
-VALUE
+static VALUE
rb_ary_aref2(VALUE ary, VALUE b, VALUE e)
{
long beg = NUM2LONG(b);
long len = NUM2LONG(e);
if (beg < 0) {
- beg += RARRAY_LEN(ary);
+ beg += RARRAY_LEN(ary);
}
return rb_ary_subseq(ary, beg, len);
}
@@ -1594,35 +1997,34 @@ rb_ary_aref2(VALUE ary, VALUE b, VALUE e)
MJIT_FUNC_EXPORTED VALUE
rb_ary_aref1(VALUE ary, VALUE arg)
{
- long beg, len;
+ long beg, len, step;
/* special case - speeding up */
if (FIXNUM_P(arg)) {
- return rb_ary_entry(ary, FIX2LONG(arg));
+ return rb_ary_entry(ary, FIX2LONG(arg));
}
- /* check if idx is Range */
- switch (rb_range_beg_len(arg, &beg, &len, RARRAY_LEN(ary), 0)) {
+ /* check if idx is Range or ArithmeticSequence */
+ switch (rb_arithmetic_sequence_beg_len_step(arg, &beg, &len, &step, RARRAY_LEN(ary), 0)) {
case Qfalse:
- break;
+ break;
case Qnil:
- return Qnil;
+ return Qnil;
default:
- return rb_ary_subseq(ary, beg, len);
+ return rb_ary_subseq_step(ary, beg, len, step);
}
+
return rb_ary_entry(ary, NUM2LONG(arg));
}
/*
* call-seq:
- * ary.at(index) -> obj or nil
+ * array.at(index) -> object
*
- * Returns the element at +index+. A negative index counts from the end of
- * +self+. Returns +nil+ if the index is out of range. See also
- * Array#[].
+ * Returns the element at \Integer offset +index+; does not modify +self+.
+ * a = [:foo, 'bar', 2]
+ * a.at(0) # => :foo
+ * a.at(2) # => 2
*
- * a = [ "a", "b", "c", "d", "e" ]
- * a.at(0) #=> "a"
- * a.at(-1) #=> "e"
*/
VALUE
@@ -1633,81 +2035,131 @@ rb_ary_at(VALUE ary, VALUE pos)
/*
* call-seq:
- * ary.first -> obj or nil
- * ary.first(n) -> new_ary
+ * array.first -> object or nil
+ * array.first(n) -> new_array
+ *
+ * Returns elements from +self+; does not modify +self+.
*
- * Returns the first element, or the first +n+ elements, of the array.
- * If the array is empty, the first form returns +nil+, and the
- * second form returns an empty array. See also Array#last for
- * the opposite effect.
+ * When no argument is given, returns the first element:
*
- * a = [ "q", "r", "s", "t" ]
- * a.first #=> "q"
- * a.first(2) #=> ["q", "r"]
+ * a = [:foo, 'bar', 2]
+ * a.first # => :foo
+ * a # => [:foo, "bar", 2]
+ *
+ * If +self+ is empty, returns +nil+.
+ *
+ * When non-negative \Integer argument +n+ is given,
+ * returns the first +n+ elements in a new \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.first(2) # => [:foo, "bar"]
+ *
+ * If <tt>n >= array.size</tt>, returns all elements:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.first(50) # => [:foo, "bar", 2]
+ *
+ * If <tt>n == 0</tt> returns an new empty \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.first(0) # []
+ *
+ * Related: #last.
*/
-
static VALUE
rb_ary_first(int argc, VALUE *argv, VALUE ary)
{
if (argc == 0) {
- if (RARRAY_LEN(ary) == 0) return Qnil;
- return RARRAY_AREF(ary, 0);
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ return RARRAY_AREF(ary, 0);
}
else {
- return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
+ return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
}
}
/*
* call-seq:
- * ary.last -> obj or nil
- * ary.last(n) -> new_ary
+ * array.last -> object or nil
+ * array.last(n) -> new_array
+ *
+ * Returns elements from +self+; +self+ is not modified.
*
- * Returns the last element(s) of +self+. If the array is empty,
- * the first form returns +nil+.
+ * When no argument is given, returns the last element:
*
- * See also Array#first for the opposite effect.
+ * a = [:foo, 'bar', 2]
+ * a.last # => 2
+ * a # => [:foo, "bar", 2]
*
- * a = [ "w", "x", "y", "z" ]
- * a.last #=> "z"
- * a.last(2) #=> ["y", "z"]
+ * If +self+ is empty, returns +nil+.
+ *
+ * When non-negative \Integer argument +n+ is given,
+ * returns the last +n+ elements in a new \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.last(2) # => ["bar", 2]
+ *
+ * If <tt>n >= array.size</tt>, returns all elements:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.last(50) # => [:foo, "bar", 2]
+ *
+ * If <tt>n == 0</tt>, returns an new empty \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.last(0) # []
+ *
+ * Related: #first.
*/
VALUE
rb_ary_last(int argc, const VALUE *argv, VALUE ary)
{
if (argc == 0) {
- long len = RARRAY_LEN(ary);
- if (len == 0) return Qnil;
- return RARRAY_AREF(ary, len-1);
+ long len = RARRAY_LEN(ary);
+ if (len == 0) return Qnil;
+ return RARRAY_AREF(ary, len-1);
}
else {
- return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST);
+ return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST);
}
}
/*
* call-seq:
- * ary.fetch(index) -> obj
- * ary.fetch(index, default) -> obj
- * ary.fetch(index) {|index| block} -> obj
- *
- * Tries to return the element at position +index+, but throws an IndexError
- * exception if the referenced +index+ lies outside of the array bounds. This
- * error can be prevented by supplying a second argument, which will act as a
- * +default+ value.
- *
- * Alternatively, if a block is given it will only be executed when an
- * invalid +index+ is referenced.
- *
- * Negative values of +index+ count from the end of the array.
- *
- * a = [ 11, 22, 33, 44 ]
- * a.fetch(1) #=> 22
- * a.fetch(-1) #=> 44
- * a.fetch(4, 'cat') #=> "cat"
- * a.fetch(100) {|i| puts "#{i} is out of bounds"}
- * #=> "100 is out of bounds"
+ * array.fetch(index) -> element
+ * array.fetch(index, default_value) -> element
+ * array.fetch(index) {|index| ... } -> element
+ *
+ * Returns the element at offset +index+.
+ *
+ * With the single \Integer argument +index+,
+ * returns the element at offset +index+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.fetch(1) # => "bar"
+ *
+ * If +index+ is negative, counts from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.fetch(-1) # => 2
+ * a.fetch(-2) # => "bar"
+ *
+ * With arguments +index+ and +default_value+,
+ * returns the element at offset +index+ if index is in range,
+ * otherwise returns +default_value+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.fetch(1, nil) # => "bar"
+ *
+ * With argument +index+ and a block,
+ * returns the element at offset +index+ if index is in range
+ * (and the block is not called); otherwise calls the block with index and returns its return value:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.fetch(1) {|index| raise 'Cannot happen' } # => "bar"
+ * a.fetch(50) {|index| "Value for #{index}" } # => "Value for 50"
+ *
*/
static VALUE
@@ -1720,48 +2172,60 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
rb_scan_args(argc, argv, "11", &pos, &ifnone);
block_given = rb_block_given_p();
if (block_given && argc == 2) {
- rb_warn("block supersedes default value argument");
+ rb_warn("block supersedes default value argument");
}
idx = NUM2LONG(pos);
if (idx < 0) {
- idx += RARRAY_LEN(ary);
+ idx += RARRAY_LEN(ary);
}
if (idx < 0 || RARRAY_LEN(ary) <= idx) {
- if (block_given) return rb_yield(pos);
- if (argc == 1) {
- rb_raise(rb_eIndexError, "index %ld outside of array bounds: %ld...%ld",
- idx - (idx < 0 ? RARRAY_LEN(ary) : 0), -RARRAY_LEN(ary), RARRAY_LEN(ary));
- }
- return ifnone;
+ if (block_given) return rb_yield(pos);
+ if (argc == 1) {
+ rb_raise(rb_eIndexError, "index %ld outside of array bounds: %ld...%ld",
+ idx - (idx < 0 ? RARRAY_LEN(ary) : 0), -RARRAY_LEN(ary), RARRAY_LEN(ary));
+ }
+ return ifnone;
}
return RARRAY_AREF(ary, idx);
}
/*
* call-seq:
- * ary.find_index(obj) -> int or nil
- * ary.find_index {|item| block} -> int or nil
- * ary.find_index -> Enumerator
- * ary.index(obj) -> int or nil
- * ary.index {|item| block} -> int or nil
- * ary.index -> Enumerator
+ * array.index(object) -> integer or nil
+ * array.index {|element| ... } -> integer or nil
+ * array.index -> new_enumerator
+ *
+ * Returns the index of a specified element.
*
- * Returns the _index_ of the first object in +ary+ such that the object is
- * <code>==</code> to +obj+.
+ * When argument +object+ is given but no block,
+ * returns the index of the first element +element+
+ * for which <tt>object == element</tt>:
*
- * If a block is given instead of an argument, returns the _index_ of the
- * first object for which the block returns +true+. Returns +nil+ if no
- * match is found.
+ * a = [:foo, 'bar', 2, 'bar']
+ * a.index('bar') # => 1
*
- * See also Array#rindex.
+ * Returns +nil+ if no such element found.
*
- * An Enumerator is returned if neither a block nor argument is given.
+ * When both argument +object+ and a block are given,
+ * calls the block with each successive element;
+ * returns the index of the first element for which the block returns a truthy value:
*
- * a = [ "a", "b", "c" ]
- * a.index("b") #=> 1
- * a.index("z") #=> nil
- * a.index {|x| x == "b"} #=> 1
+ * a = [:foo, 'bar', 2, 'bar']
+ * a.index {|element| element == 'bar' } # => 1
+ *
+ * Returns +nil+ if the block never returns a truthy value.
+ *
+ * When neither an argument nor a block is given, returns a new Enumerator:
+ *
+ * a = [:foo, 'bar', 2]
+ * e = a.index
+ * e # => #<Enumerator: [:foo, "bar", 2]:index>
+ * e.each {|element| element == 'bar' } # => 1
+ *
+ * Array#find_index is an alias for Array#index.
+ *
+ * Related: #rindex.
*/
static VALUE
@@ -1771,49 +2235,58 @@ rb_ary_index(int argc, VALUE *argv, VALUE ary)
long i;
if (argc == 0) {
- RETURN_ENUMERATOR(ary, 0, 0);
- for (i=0; i<RARRAY_LEN(ary); i++) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
- return LONG2NUM(i);
- }
- }
- return Qnil;
+ RETURN_ENUMERATOR(ary, 0, 0);
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
+ return LONG2NUM(i);
+ }
+ }
+ return Qnil;
}
rb_check_arity(argc, 0, 1);
val = argv[0];
if (rb_block_given_p())
- rb_warn("given block not used");
+ rb_warn("given block not used");
for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE e = RARRAY_AREF(ary, i);
- if (rb_equal(e, val)) {
- return LONG2NUM(i);
- }
+ VALUE e = RARRAY_AREF(ary, i);
+ if (rb_equal(e, val)) {
+ return LONG2NUM(i);
+ }
}
return Qnil;
}
/*
* call-seq:
- * ary.rindex(obj) -> int or nil
- * ary.rindex {|item| block} -> int or nil
- * ary.rindex -> Enumerator
+ * array.rindex(object) -> integer or nil
+ * array.rindex {|element| ... } -> integer or nil
+ * array.rindex -> new_enumerator
*
- * Returns the _index_ of the last object in +self+ <code>==</code> to +obj+.
+ * Returns the index of the last element for which <tt>object == element</tt>.
*
- * If a block is given instead of an argument, returns the _index_ of the
- * first object for which the block returns +true+, starting from the last
- * object.
+ * When argument +object+ is given but no block, returns the index of the last such element found:
*
- * Returns +nil+ if no match is found.
+ * a = [:foo, 'bar', 2, 'bar']
+ * a.rindex('bar') # => 3
*
- * See also Array#index.
+ * Returns +nil+ if no such object found.
*
- * If neither block nor argument is given, an Enumerator is returned instead.
+ * When a block is given but no argument, calls the block with each successive element;
+ * returns the index of the last element for which the block returns a truthy value:
*
- * a = [ "a", "b", "b", "b", "c" ]
- * a.rindex("b") #=> 3
- * a.rindex("z") #=> nil
- * a.rindex {|x| x == "b"} #=> 3
+ * a = [:foo, 'bar', 2, 'bar']
+ * a.rindex {|element| element == 'bar' } # => 3
+ *
+ * Returns +nil+ if the block never returns a truthy value.
+ *
+ * When neither an argument nor a block is given, returns a new \Enumerator:
+ *
+ * a = [:foo, 'bar', 2, 'bar']
+ * e = a.rindex
+ * e # => #<Enumerator: [:foo, "bar", 2, "bar"]:rindex>
+ * e.each {|element| element == 'bar' } # => 3
+ *
+ * Related: #index.
*/
static VALUE
@@ -1823,25 +2296,25 @@ rb_ary_rindex(int argc, VALUE *argv, VALUE ary)
long i = RARRAY_LEN(ary), len;
if (argc == 0) {
- RETURN_ENUMERATOR(ary, 0, 0);
- while (i--) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i))))
- return LONG2NUM(i);
- if (i > (len = RARRAY_LEN(ary))) {
- i = len;
- }
- }
- return Qnil;
+ RETURN_ENUMERATOR(ary, 0, 0);
+ while (i--) {
+ if (RTEST(rb_yield(RARRAY_AREF(ary, i))))
+ return LONG2NUM(i);
+ if (i > (len = RARRAY_LEN(ary))) {
+ i = len;
+ }
+ }
+ return Qnil;
}
rb_check_arity(argc, 0, 1);
val = argv[0];
if (rb_block_given_p())
- rb_warn("given block not used");
+ rb_warn("given block not used");
while (i--) {
- VALUE e = RARRAY_AREF(ary, i);
- if (rb_equal(e, val)) {
- return LONG2NUM(i);
- }
+ VALUE e = RARRAY_AREF(ary, i);
+ if (rb_equal(e, val)) {
+ return LONG2NUM(i);
+ }
if (i > RARRAY_LEN(ary)) {
break;
}
@@ -1867,54 +2340,54 @@ rb_ary_splice(VALUE ary, long beg, long len, const VALUE *rptr, long rlen)
if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
olen = RARRAY_LEN(ary);
if (beg < 0) {
- beg += olen;
- if (beg < 0) {
- rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
- beg - olen, -olen);
- }
+ beg += olen;
+ if (beg < 0) {
+ rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
+ beg - olen, -olen);
+ }
}
if (olen < len || olen < beg + len) {
- len = olen - beg;
+ len = olen - beg;
}
{
const VALUE *optr = RARRAY_CONST_PTR_TRANSIENT(ary);
- rofs = (rptr >= optr && rptr < optr + olen) ? rptr - optr : -1;
+ rofs = (rptr >= optr && rptr < optr + olen) ? rptr - optr : -1;
}
if (beg >= olen) {
- VALUE target_ary;
- if (beg > ARY_MAX_SIZE - rlen) {
- rb_raise(rb_eIndexError, "index %ld too big", beg);
- }
- target_ary = ary_ensure_room_for_push(ary, rlen-len); /* len is 0 or negative */
- len = beg + rlen;
- ary_mem_clear(ary, olen, beg - olen);
- if (rlen > 0) {
+ VALUE target_ary;
+ if (beg > ARY_MAX_SIZE - rlen) {
+ rb_raise(rb_eIndexError, "index %ld too big", beg);
+ }
+ target_ary = ary_ensure_room_for_push(ary, rlen-len); /* len is 0 or negative */
+ len = beg + rlen;
+ ary_mem_clear(ary, olen, beg - olen);
+ if (rlen > 0) {
if (rofs != -1) rptr = RARRAY_CONST_PTR_TRANSIENT(ary) + rofs;
- ary_memcpy0(ary, beg, rlen, rptr, target_ary);
- }
- ARY_SET_LEN(ary, len);
+ ary_memcpy0(ary, beg, rlen, rptr, target_ary);
+ }
+ ARY_SET_LEN(ary, len);
}
else {
- long alen;
-
- if (olen - len > ARY_MAX_SIZE - rlen) {
- rb_raise(rb_eIndexError, "index %ld too big", olen + rlen - len);
- }
- rb_ary_modify(ary);
- alen = olen + rlen - len;
- if (alen >= ARY_CAPA(ary)) {
- ary_double_capa(ary, alen);
- }
-
- if (len != rlen) {
+ long alen;
+
+ if (olen - len > ARY_MAX_SIZE - rlen) {
+ rb_raise(rb_eIndexError, "index %ld too big", olen + rlen - len);
+ }
+ rb_ary_modify(ary);
+ alen = olen + rlen - len;
+ if (alen >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, alen);
+ }
+
+ if (len != rlen) {
RARRAY_PTR_USE_TRANSIENT(ary, ptr,
MEMMOVE(ptr + beg + rlen, ptr + beg + len,
VALUE, olen - (beg + len)));
- ARY_SET_LEN(ary, alen);
- }
- if (rlen > 0) {
+ ARY_SET_LEN(ary, alen);
+ }
+ if (rlen > 0) {
if (rofs != -1) rptr = RARRAY_CONST_PTR_TRANSIENT(ary) + rofs;
/* give up wb-protected ary */
RB_OBJ_WB_UNPROTECT_FOR(ARRAY, ary);
@@ -1924,7 +2397,7 @@ rb_ary_splice(VALUE ary, long beg, long len, const VALUE *rptr, long rlen)
*/
RARRAY_PTR_USE_TRANSIENT(ary, ptr,
MEMMOVE(ptr + beg, rptr, VALUE, rlen));
- }
+ }
}
}
@@ -1935,22 +2408,14 @@ rb_ary_set_len(VALUE ary, long len)
rb_ary_modify_check(ary);
if (ARY_SHARED_P(ary)) {
- rb_raise(rb_eRuntimeError, "can't set length of shared ");
+ rb_raise(rb_eRuntimeError, "can't set length of shared ");
}
if (len > (capa = (long)ARY_CAPA(ary))) {
- rb_bug("probable buffer overflow: %ld for %ld", len, capa);
+ rb_bug("probable buffer overflow: %ld for %ld", len, capa);
}
ARY_SET_LEN(ary, len);
}
-/*!
- * expands or shrinks \a ary to \a len elements.
- * expanded region will be filled with Qnil.
- * \param ary an array
- * \param len new size
- * \return \a ary
- * \post the size of \a ary is \a len.
- */
VALUE
rb_ary_resize(VALUE ary, long len)
{
@@ -1960,118 +2425,231 @@ rb_ary_resize(VALUE ary, long len)
olen = RARRAY_LEN(ary);
if (len == olen) return ary;
if (len > ARY_MAX_SIZE) {
- rb_raise(rb_eIndexError, "index %ld too big", len);
+ rb_raise(rb_eIndexError, "index %ld too big", len);
}
if (len > olen) {
- if (len >= ARY_CAPA(ary)) {
- ary_double_capa(ary, len);
- }
- ary_mem_clear(ary, olen, len - olen);
- ARY_SET_LEN(ary, len);
+ if (len >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, len);
+ }
+ ary_mem_clear(ary, olen, len - olen);
+ ARY_SET_LEN(ary, len);
}
else if (ARY_EMBED_P(ary)) {
ARY_SET_EMBED_LEN(ary, len);
}
- else if (len <= RARRAY_EMBED_LEN_MAX) {
- VALUE tmp[RARRAY_EMBED_LEN_MAX];
- MEMCPY(tmp, ARY_HEAP_PTR(ary), VALUE, len);
- ary_discard(ary);
- MEMCPY((VALUE *)ARY_EMBED_PTR(ary), tmp, VALUE, len); /* WB: no new reference */
+ else if (len <= ary_embed_capa(ary)) {
+ const VALUE *ptr = ARY_HEAP_PTR(ary);
+ long ptr_capa = ARY_HEAP_SIZE(ary);
+ bool is_malloc_ptr = !ARY_SHARED_P(ary) && !RARRAY_TRANSIENT_P(ary);
+
+ FL_UNSET(ary, RARRAY_TRANSIENT_FLAG);
+ FL_SET_EMBED(ary);
+
+ MEMCPY((VALUE *)ARY_EMBED_PTR(ary), ptr, VALUE, len); /* WB: no new reference */
ARY_SET_EMBED_LEN(ary, len);
+
+ if (is_malloc_ptr) ruby_sized_xfree((void *)ptr, ptr_capa);
}
else {
- if (olen > len + ARY_DEFAULT_SIZE) {
- ary_heap_realloc(ary, len);
- ARY_SET_CAPA(ary, len);
- }
- ARY_SET_HEAP_LEN(ary, len);
+ if (olen > len + ARY_DEFAULT_SIZE) {
+ size_t new_capa = ary_heap_realloc(ary, len);
+ ARY_SET_CAPA(ary, new_capa);
+ }
+ ARY_SET_HEAP_LEN(ary, len);
}
ary_verify(ary);
return ary;
}
+static VALUE
+ary_aset_by_rb_ary_store(VALUE ary, long key, VALUE val)
+{
+ rb_ary_store(ary, key, val);
+ return val;
+}
+
+static VALUE
+ary_aset_by_rb_ary_splice(VALUE ary, long beg, long len, VALUE val)
+{
+ VALUE rpl = rb_ary_to_ary(val);
+ rb_ary_splice(ary, beg, len, RARRAY_CONST_PTR_TRANSIENT(rpl), RARRAY_LEN(rpl));
+ RB_GC_GUARD(rpl);
+ return val;
+}
+
/*
* call-seq:
- * ary[index] = obj -> obj
- * ary[start, length] = obj or other_ary or nil -> obj or other_ary or nil
- * ary[range] = obj or other_ary or nil -> obj or other_ary or nil
- *
- * Element Assignment --- Sets the element at +index+, or replaces a subarray
- * from the +start+ index for +length+ elements, or replaces a subarray
- * specified by the +range+ of indices.
- *
- * If indices are greater than the current capacity of the array, the array
- * grows automatically. Elements are inserted into the array at +start+ if
- * +length+ is zero.
- *
- * Negative indices will count backward from the end of the array. For
- * +start+ and +range+ cases the starting index is just before an element.
- *
- * An IndexError is raised if a negative index points past the beginning of
- * the array.
- *
- * See also Array#push, and Array#unshift.
- *
- * a = Array.new
- * a[4] = "4"; #=> [nil, nil, nil, nil, "4"]
- * a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"]
- * a[1..2] = [ 1, 2 ] #=> ["a", 1, 2, nil, "4"]
- * a[0, 2] = "?" #=> ["?", 2, nil, "4"]
- * a[0..2] = "A" #=> ["A", "4"]
- * a[-1] = "Z" #=> ["A", "Z"]
- * a[1..-1] = nil #=> ["A", nil]
- * a[1..-1] = [] #=> ["A"]
- * a[0, 0] = [ 1, 2 ] #=> [1, 2, "A"]
- * a[3, 0] = "B" #=> [1, 2, "A", "B"]
+ * array[index] = object -> object
+ * array[start, length] = object -> object
+ * array[range] = object -> object
+ *
+ * Assigns elements in +self+; returns the given +object+.
+ *
+ * When \Integer argument +index+ is given, assigns +object+ to an element in +self+.
+ *
+ * If +index+ is non-negative, assigns +object+ the element at offset +index+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0] = 'foo' # => "foo"
+ * a # => ["foo", "bar", 2]
+ *
+ * If +index+ is greater than <tt>self.length</tt>, extends the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[7] = 'foo' # => "foo"
+ * a # => [:foo, "bar", 2, nil, nil, nil, nil, "foo"]
+ *
+ * If +index+ is negative, counts backwards from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[-1] = 'two' # => "two"
+ * a # => [:foo, "bar", "two"]
+ *
+ * When \Integer arguments +start+ and +length+ are given and +object+ is not an \Array,
+ * removes <tt>length - 1</tt> elements beginning at offset +start+,
+ * and assigns +object+ at offset +start+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0, 2] = 'foo' # => "foo"
+ * a # => ["foo", 2]
+ *
+ * If +start+ is negative, counts backwards from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[-2, 2] = 'foo' # => "foo"
+ * a # => [:foo, "foo"]
+ *
+ * If +start+ is non-negative and outside the array (<tt> >= self.size</tt>),
+ * extends the array with +nil+, assigns +object+ at offset +start+,
+ * and ignores +length+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[6, 50] = 'foo' # => "foo"
+ * a # => [:foo, "bar", 2, nil, nil, nil, "foo"]
+ *
+ * If +length+ is zero, shifts elements at and following offset +start+
+ * and assigns +object+ at offset +start+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[1, 0] = 'foo' # => "foo"
+ * a # => [:foo, "foo", "bar", 2]
+ *
+ * If +length+ is too large for the existing array, does not extend the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[1, 5] = 'foo' # => "foo"
+ * a # => [:foo, "foo"]
+ *
+ * When \Range argument +range+ is given and +object+ is an \Array,
+ * removes <tt>length - 1</tt> elements beginning at offset +start+,
+ * and assigns +object+ at offset +start+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[0..1] = 'foo' # => "foo"
+ * a # => ["foo", 2]
+ *
+ * if <tt>range.begin</tt> is negative, counts backwards from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[-2..2] = 'foo' # => "foo"
+ * a # => [:foo, "foo"]
+ *
+ * If the array length is less than <tt>range.begin</tt>,
+ * assigns +object+ at offset <tt>range.begin</tt>, and ignores +length+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[6..50] = 'foo' # => "foo"
+ * a # => [:foo, "bar", 2, nil, nil, nil, "foo"]
+ *
+ * If <tt>range.end</tt> is zero, shifts elements at and following offset +start+
+ * and assigns +object+ at offset +start+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[1..0] = 'foo' # => "foo"
+ * a # => [:foo, "foo", "bar", 2]
+ *
+ * If <tt>range.end</tt> is negative, assigns +object+ at offset +start+,
+ * retains <tt>range.end.abs -1</tt> elements past that, and removes those beyond:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[1..-1] = 'foo' # => "foo"
+ * a # => [:foo, "foo"]
+ * a = [:foo, 'bar', 2]
+ * a[1..-2] = 'foo' # => "foo"
+ * a # => [:foo, "foo", 2]
+ * a = [:foo, 'bar', 2]
+ * a[1..-3] = 'foo' # => "foo"
+ * a # => [:foo, "foo", "bar", 2]
+ * a = [:foo, 'bar', 2]
+ *
+ * If <tt>range.end</tt> is too large for the existing array,
+ * replaces array elements, but does not extend the array with +nil+ values:
+ *
+ * a = [:foo, 'bar', 2]
+ * a[1..5] = 'foo' # => "foo"
+ * a # => [:foo, "foo"]
+ *
*/
static VALUE
rb_ary_aset(int argc, VALUE *argv, VALUE ary)
{
long offset, beg, len;
- VALUE rpl;
+ rb_check_arity(argc, 2, 3);
+ rb_ary_modify_check(ary);
if (argc == 3) {
- rb_ary_modify_check(ary);
- beg = NUM2LONG(argv[0]);
- len = NUM2LONG(argv[1]);
- goto range;
+ beg = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[1]);
+ return ary_aset_by_rb_ary_splice(ary, beg, len, argv[2]);
}
- rb_check_arity(argc, 2, 2);
- rb_ary_modify_check(ary);
if (FIXNUM_P(argv[0])) {
- offset = FIX2LONG(argv[0]);
- goto fixnum;
+ offset = FIX2LONG(argv[0]);
+ return ary_aset_by_rb_ary_store(ary, offset, argv[1]);
}
if (rb_range_beg_len(argv[0], &beg, &len, RARRAY_LEN(ary), 1)) {
- /* check if idx is Range */
- range:
- rpl = rb_ary_to_ary(argv[argc-1]);
- rb_ary_splice(ary, beg, len, RARRAY_CONST_PTR_TRANSIENT(rpl), RARRAY_LEN(rpl));
- RB_GC_GUARD(rpl);
- return argv[argc-1];
+ /* check if idx is Range */
+ return ary_aset_by_rb_ary_splice(ary, beg, len, argv[1]);
}
offset = NUM2LONG(argv[0]);
-fixnum:
- rb_ary_store(ary, offset, argv[1]);
- return argv[1];
+ return ary_aset_by_rb_ary_store(ary, offset, argv[1]);
}
/*
* call-seq:
- * ary.insert(index, obj...) -> ary
+ * array.insert(index, *objects) -> self
+ *
+ * Inserts given +objects+ before or after the element at \Integer index +offset+;
+ * returns +self+.
+ *
+ * When +index+ is non-negative, inserts all given +objects+
+ * before the element at offset +index+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.insert(1, :bat, :bam) # => [:foo, :bat, :bam, "bar", 2]
*
- * Inserts the given values before the element with the given +index+.
+ * Extends the array if +index+ is beyond the array (<tt>index >= self.size</tt>):
*
- * Negative indices count backwards from the end of the array, where +-1+ is
- * the last element. If a negative index is used, the given values will be
- * inserted after that element, so using an index of +-1+ will insert the
- * values at the end of the array.
+ * a = [:foo, 'bar', 2]
+ * a.insert(5, :bat, :bam)
+ * a # => [:foo, "bar", 2, nil, nil, :bat, :bam]
+ *
+ * Does nothing if no objects given:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.insert(1)
+ * a.insert(50)
+ * a.insert(-50)
+ * a # => [:foo, "bar", 2]
+ *
+ * When +index+ is negative, inserts all given +objects+
+ * _after_ the element at offset <tt>index+self.size</tt>:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.insert(-2, :bat, :bam)
+ * a # => [:foo, "bar", :bat, :bam, 2]
*
- * a = %w{ a b c d }
- * a.insert(2, 99) #=> ["a", "b", 99, "c", "d"]
- * a.insert(-2, 1, 2, 3) #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
*/
static VALUE
@@ -2084,15 +2662,15 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary)
pos = NUM2LONG(argv[0]);
if (argc == 1) return ary;
if (pos == -1) {
- pos = RARRAY_LEN(ary);
+ pos = RARRAY_LEN(ary);
}
else if (pos < 0) {
- long minpos = -RARRAY_LEN(ary) - 1;
- if (pos < minpos) {
- rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
- pos, minpos);
- }
- pos++;
+ long minpos = -RARRAY_LEN(ary) - 1;
+ if (pos < minpos) {
+ rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
+ pos, minpos);
+ }
+ pos++;
}
rb_ary_splice(ary, pos, 0, argv + 1, argc - 1);
return ary;
@@ -2109,20 +2687,47 @@ ary_enum_length(VALUE ary, VALUE args, VALUE eobj)
/*
* call-seq:
- * ary.each {|item| block} -> ary
- * ary.each -> Enumerator
+ * array.each {|element| ... } -> self
+ * array.each -> Enumerator
+ *
+ * Iterates over array elements.
+ *
+ * When a block given, passes each successive array element to the block;
+ * returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.each {|element| puts "#{element.class} #{element}" }
+ *
+ * Output:
+ *
+ * Symbol foo
+ * String bar
+ * Integer 2
+ *
+ * Allows the array to be modified during iteration:
*
- * Calls the given block once for each element in +self+, passing that element
- * as a parameter. Returns the array itself.
+ * a = [:foo, 'bar', 2]
+ * a.each {|element| puts element; a.clear if element.to_s.start_with?('b') }
*
- * If no block is given, an Enumerator is returned.
+ * Output:
*
- * a = [ "a", "b", "c" ]
- * a.each {|x| print x, " -- " }
+ * foo
+ * bar
*
- * produces:
+ * When no block given, returns a new \Enumerator:
+ * a = [:foo, 'bar', 2]
*
- * a -- b -- c --
+ * e = a.each
+ * e # => #<Enumerator: [:foo, "bar", 2]:each>
+ * a1 = e.each {|element| puts "#{element.class} #{element}" }
+ *
+ * Output:
+ *
+ * Symbol foo
+ * String bar
+ * Integer 2
+ *
+ * Related: #each_index, #reverse_each.
*/
VALUE
@@ -2132,27 +2737,54 @@ rb_ary_each(VALUE ary)
ary_verify(ary);
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
for (i=0; i<RARRAY_LEN(ary); i++) {
- rb_yield(RARRAY_AREF(ary, i));
+ rb_yield(RARRAY_AREF(ary, i));
}
return ary;
}
/*
* call-seq:
- * ary.each_index {|index| block} -> ary
- * ary.each_index -> Enumerator
+ * array.each_index {|index| ... } -> self
+ * array.each_index -> Enumerator
+ *
+ * Iterates over array indexes.
+ *
+ * When a block given, passes each successive array index to the block;
+ * returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.each_index {|index| puts "#{index} #{a[index]}" }
+ *
+ * Output:
+ *
+ * 0 foo
+ * 1 bar
+ * 2 2
+ *
+ * Allows the array to be modified during iteration:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.each_index {|index| puts index; a.clear if index > 0 }
*
- * Same as Array#each, but passes the +index+ of the element instead of the
- * element itself.
+ * Output:
*
- * An Enumerator is returned if no block is given.
+ * 0
+ * 1
*
- * a = [ "a", "b", "c" ]
- * a.each_index {|x| print x, " -- " }
+ * When no block given, returns a new \Enumerator:
*
- * produces:
+ * a = [:foo, 'bar', 2]
+ * e = a.each_index
+ * e # => #<Enumerator: [:foo, "bar", 2]:each_index>
+ * a1 = e.each {|index| puts "#{index} #{a[index]}"}
*
- * 0 -- 1 -- 2 --
+ * Output:
+ *
+ * 0 foo
+ * 1 bar
+ * 2 2
+ *
+ * Related: #each, #reverse_each.
*/
static VALUE
@@ -2162,24 +2794,54 @@ rb_ary_each_index(VALUE ary)
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
for (i=0; i<RARRAY_LEN(ary); i++) {
- rb_yield(LONG2NUM(i));
+ rb_yield(LONG2NUM(i));
}
return ary;
}
/*
* call-seq:
- * ary.reverse_each {|item| block} -> ary
- * ary.reverse_each -> Enumerator
+ * array.reverse_each {|element| ... } -> self
+ * array.reverse_each -> Enumerator
+ *
+ * Iterates backwards over array elements.
+ *
+ * When a block given, passes, in reverse order, each element to the block;
+ * returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.reverse_each {|element| puts "#{element.class} #{element}" }
+ *
+ * Output:
+ *
+ * Integer 2
+ * String bar
+ * Symbol foo
+ *
+ * Allows the array to be modified during iteration:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.reverse_each {|element| puts element; a.clear if element.to_s.start_with?('b') }
+ *
+ * Output:
*
- * Same as Array#each, but traverses +self+ in reverse order.
+ * 2
+ * bar
*
- * a = [ "a", "b", "c" ]
- * a.reverse_each {|x| print x, " " }
+ * When no block given, returns a new \Enumerator:
*
- * produces:
+ * a = [:foo, 'bar', 2]
+ * e = a.reverse_each
+ * e # => #<Enumerator: [:foo, "bar", 2]:reverse_each>
+ * a1 = e.each {|element| puts "#{element.class} #{element}" }
*
- * c b a
+ * Output:
+ *
+ * Integer 2
+ * String bar
+ * Symbol foo
+ *
+ * Related: #each, #each_index.
*/
static VALUE
@@ -2190,24 +2852,21 @@ rb_ary_reverse_each(VALUE ary)
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
len = RARRAY_LEN(ary);
while (len--) {
- long nlen;
- rb_yield(RARRAY_AREF(ary, len));
- nlen = RARRAY_LEN(ary);
- if (nlen < len) {
- len = nlen;
- }
+ long nlen;
+ rb_yield(RARRAY_AREF(ary, len));
+ nlen = RARRAY_LEN(ary);
+ if (nlen < len) {
+ len = nlen;
+ }
}
return ary;
}
/*
* call-seq:
- * ary.length -> int
+ * array.length -> an_integer
*
- * Returns the number of elements in +self+. May be zero.
- *
- * [ 1, 2, 3, 4, 5 ].length #=> 5
- * [].length #=> 0
+ * Returns the count of elements in +self+.
*/
static VALUE
@@ -2219,19 +2878,16 @@ rb_ary_length(VALUE ary)
/*
* call-seq:
- * ary.empty? -> true or false
- *
- * Returns +true+ if +self+ contains no elements.
+ * array.empty? -> true or false
*
- * [].empty? #=> true
+ * Returns +true+ if the count of elements in +self+ is zero,
+ * +false+ otherwise.
*/
static VALUE
rb_ary_empty_p(VALUE ary)
{
- if (RARRAY_LEN(ary) == 0)
- return Qtrue;
- return Qfalse;
+ return RBOOL(RARRAY_LEN(ary) == 0);
}
VALUE
@@ -2267,15 +2923,15 @@ recursive_join(VALUE obj, VALUE argp, int recur)
int *first = (int *)arg[3];
if (recur) {
- rb_raise(rb_eArgError, "recursive array join");
+ rb_raise(rb_eArgError, "recursive array join");
}
else {
- ary_join_1(obj, ary, sep, 0, result, first);
+ ary_join_1(obj, ary, sep, 0, result, first);
}
return Qnil;
}
-static void
+static long
ary_join_0(VALUE ary, VALUE sep, long max, VALUE result)
{
long i;
@@ -2283,10 +2939,40 @@ ary_join_0(VALUE ary, VALUE sep, long max, VALUE result)
if (max > 0) rb_enc_copy(result, RARRAY_AREF(ary, 0));
for (i=0; i<max; i++) {
- val = RARRAY_AREF(ary, i);
- if (i > 0 && !NIL_P(sep))
- rb_str_buf_append(result, sep);
- rb_str_buf_append(result, val);
+ val = RARRAY_AREF(ary, i);
+ if (!RB_TYPE_P(val, T_STRING)) break;
+ if (i > 0 && !NIL_P(sep))
+ rb_str_buf_append(result, sep);
+ rb_str_buf_append(result, val);
+ }
+ return i;
+}
+
+static void
+ary_join_1_str(VALUE dst, VALUE src, int *first)
+{
+ rb_str_buf_append(dst, src);
+ if (*first) {
+ rb_enc_copy(dst, src);
+ *first = FALSE;
+ }
+}
+
+static void
+ary_join_1_ary(VALUE obj, VALUE ary, VALUE sep, VALUE result, VALUE val, int *first)
+{
+ if (val == ary) {
+ rb_raise(rb_eArgError, "recursive array join");
+ }
+ else {
+ VALUE args[4];
+
+ *first = FALSE;
+ args[0] = val;
+ args[1] = sep;
+ args[2] = result;
+ args[3] = (VALUE)first;
+ rb_exec_recursive(recursive_join, obj, (VALUE)args);
}
}
@@ -2296,50 +2982,25 @@ ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result, int *first)
VALUE val, tmp;
for (; i<RARRAY_LEN(ary); i++) {
- if (i > 0 && !NIL_P(sep))
- rb_str_buf_append(result, sep);
-
- val = RARRAY_AREF(ary, i);
- if (RB_TYPE_P(val, T_STRING)) {
- str_join:
- rb_str_buf_append(result, val);
- if (*first) {
- rb_enc_copy(result, val);
- *first = FALSE;
- }
- }
- else if (RB_TYPE_P(val, T_ARRAY)) {
- obj = val;
- ary_join:
- if (val == ary) {
- rb_raise(rb_eArgError, "recursive array join");
- }
- else {
- VALUE args[4];
-
- *first = FALSE;
- args[0] = val;
- args[1] = sep;
- args[2] = result;
- args[3] = (VALUE)first;
- rb_exec_recursive(recursive_join, obj, (VALUE)args);
- }
- }
- else {
- tmp = rb_check_string_type(val);
- if (!NIL_P(tmp)) {
- val = tmp;
- goto str_join;
- }
- tmp = rb_check_array_type(val);
- if (!NIL_P(tmp)) {
- obj = val;
- val = tmp;
- goto ary_join;
- }
- val = rb_obj_as_string(val);
- goto str_join;
- }
+ if (i > 0 && !NIL_P(sep))
+ rb_str_buf_append(result, sep);
+
+ val = RARRAY_AREF(ary, i);
+ if (RB_TYPE_P(val, T_STRING)) {
+ ary_join_1_str(result, val, first);
+ }
+ else if (RB_TYPE_P(val, T_ARRAY)) {
+ ary_join_1_ary(val, ary, sep, result, val, first);
+ }
+ else if (!NIL_P(tmp = rb_check_string_type(val))) {
+ ary_join_1_str(result, tmp, first);
+ }
+ else if (!NIL_P(tmp = rb_check_array_type(val))) {
+ ary_join_1_ary(val, ary, sep, result, tmp, first);
+ }
+ else {
+ ary_join_1_str(result, rb_obj_as_string(val), first);
+ }
}
}
@@ -2352,24 +3013,26 @@ rb_ary_join(VALUE ary, VALUE sep)
if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new(0, 0);
if (!NIL_P(sep)) {
- StringValue(sep);
- len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1);
+ StringValue(sep);
+ len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1);
}
for (i=0; i<RARRAY_LEN(ary); i++) {
- val = RARRAY_AREF(ary, i);
- tmp = rb_check_string_type(val);
-
- if (NIL_P(tmp) || tmp != val) {
- int first;
- result = rb_str_buf_new(len + (RARRAY_LEN(ary)-i)*10);
- rb_enc_associate(result, rb_usascii_encoding());
- ary_join_0(ary, sep, i, result);
- first = i == 0;
- ary_join_1(ary, ary, sep, i, result, &first);
- return result;
- }
+ val = RARRAY_AREF(ary, i);
+ tmp = rb_check_string_type(val);
+
+ if (NIL_P(tmp) || tmp != val) {
+ int first;
+ long n = RARRAY_LEN(ary);
+ if (i > n) i = n;
+ result = rb_str_buf_new(len + (n-i)*10);
+ rb_enc_associate(result, rb_usascii_encoding());
+ i = ary_join_0(ary, sep, i, result);
+ first = i == 0;
+ ary_join_1(ary, ary, sep, i, result, &first);
+ return result;
+ }
- len += RSTRING_LEN(tmp);
+ len += RSTRING_LEN(tmp);
}
result = rb_str_new(0, len);
@@ -2382,22 +3045,32 @@ rb_ary_join(VALUE ary, VALUE sep)
/*
* call-seq:
- * ary.join(separator=$,) -> str
+ * array.join ->new_string
+ * array.join(separator = $,) -> new_string
+ *
+ * Returns the new \String formed by joining the array elements after conversion.
+ * For each element +element+:
*
- * Returns a string created by converting each element of the array to
- * a string, separated by the given +separator+.
- * If the +separator+ is +nil+, it uses current <code>$,</code>.
- * If both the +separator+ and <code>$,</code> are +nil+,
- * it uses an empty string.
+ * - Uses <tt>element.to_s</tt> if +element+ is not a <tt>kind_of?(Array)</tt>.
+ * - Uses recursive <tt>element.join(separator)</tt> if +element+ is a <tt>kind_of?(Array)</tt>.
*
- * [ "a", "b", "c" ].join #=> "abc"
- * [ "a", "b", "c" ].join("-") #=> "a-b-c"
+ * With no argument, joins using the output field separator, <tt>$,</tt>:
*
- * For nested arrays, join is applied recursively:
+ * a = [:foo, 'bar', 2]
+ * $, # => nil
+ * a.join # => "foobar2"
+ *
+ * With \string argument +separator+, joins using that separator:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.join("\n") # => "foo\nbar\n2"
+ *
+ * Joins recursively for nested Arrays:
+ *
+ * a = [:foo, [:bar, [:baz, :bat]]]
+ * a.join # => "foobarbazbat"
*
- * [ "a", [1, 2, [:x, :y]], "b" ].join("-") #=> "a-1-2-x-y-b"
*/
-
static VALUE
rb_ary_join_m(int argc, VALUE *argv, VALUE ary)
{
@@ -2406,7 +3079,7 @@ rb_ary_join_m(int argc, VALUE *argv, VALUE ary)
if (rb_check_arity(argc, 0, 1) == 0 || NIL_P(sep = argv[0])) {
sep = rb_output_fs;
if (!NIL_P(sep)) {
- rb_warn("$, is set to non-nil value");
+ rb_category_warn(RB_WARN_CATEGORY_DEPRECATED, "$, is set to non-nil value");
}
}
@@ -2422,10 +3095,10 @@ inspect_ary(VALUE ary, VALUE dummy, int recur)
if (recur) return rb_usascii_str_new_cstr("[...]");
str = rb_str_buf_new2("[");
for (i=0; i<RARRAY_LEN(ary); i++) {
- s = rb_inspect(RARRAY_AREF(ary, i));
- if (i > 0) rb_str_buf_cat2(str, ", ");
- else rb_enc_copy(str, s);
- rb_str_buf_append(str, s);
+ s = rb_inspect(RARRAY_AREF(ary, i));
+ if (i > 0) rb_str_buf_cat2(str, ", ");
+ else rb_enc_copy(str, s);
+ rb_str_buf_append(str, s);
}
rb_str_buf_cat2(str, "]");
return str;
@@ -2433,13 +3106,15 @@ inspect_ary(VALUE ary, VALUE dummy, int recur)
/*
* call-seq:
- * ary.inspect -> string
- * ary.to_s -> string
+ * array.inspect -> new_string
*
- * Creates a string representation of +self+, by calling #inspect
- * on each element.
+ * Returns the new \String formed by calling method <tt>#inspect</tt>
+ * on each array element:
*
- * [ "a", "b", "c" ].to_s #=> "[\"a\", \"b\", \"c\"]"
+ * a = [:foo, 'bar', 2]
+ * a.inspect # => "[:foo, \"bar\", 2]"
+ *
+ * Array#to_s is an alias for Array#inspect.
*/
static VALUE
@@ -2457,40 +3132,59 @@ rb_ary_to_s(VALUE ary)
/*
* call-seq:
- * ary.to_a -> ary
+ * to_a -> self or new_array
*
- * Returns +self+.
+ * When +self+ is an instance of \Array, returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.to_a # => [:foo, "bar", 2]
+ *
+ * Otherwise, returns a new \Array containing the elements of +self+:
+ *
+ * class MyArray < Array; end
+ * a = MyArray.new(['foo', 'bar', 'two'])
+ * a.instance_of?(Array) # => false
+ * a.kind_of?(Array) # => true
+ * a1 = a.to_a
+ * a1 # => ["foo", "bar", "two"]
+ * a1.class # => Array # Not MyArray
*
- * If called on a subclass of Array, converts the receiver to an Array object.
*/
static VALUE
rb_ary_to_a(VALUE ary)
{
if (rb_obj_class(ary) != rb_cArray) {
- VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
- rb_ary_replace(dup, ary);
- return dup;
+ VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
+ rb_ary_replace(dup, ary);
+ return dup;
}
return ary;
}
/*
* call-seq:
- * ary.to_h -> hash
- * ary.to_h {|item| block } -> hash
+ * array.to_h -> new_hash
+ * array.to_h {|item| ... } -> new_hash
*
- * Returns the result of interpreting <i>ary</i> as an array of
- * <tt>[key, value]</tt> pairs.
+ * Returns a new \Hash formed from +self+.
*
- * [[:foo, :bar], [1, 2]].to_h
- * # => {:foo => :bar, 1 => 2}
+ * When a block is given, calls the block with each array element;
+ * the block must return a 2-element \Array whose two elements
+ * form a key-value pair in the returned \Hash:
*
- * If a block is given, the results of the block on each element of
- * the array will be used as pairs.
+ * a = ['foo', :bar, 1, [2, 3], {baz: 4}]
+ * h = a.to_h {|item| [item, item] }
+ * h # => {"foo"=>"foo", :bar=>:bar, 1=>1, [2, 3]=>[2, 3], {:baz=>4}=>{:baz=>4}}
+ *
+ * When no block is given, +self+ must be an \Array of 2-element sub-arrays,
+ * each sub-array is formed into a key-value pair in the new \Hash:
+ *
+ * [].to_h # => {}
+ * a = [['foo', 'zero'], ['bar', 'one'], ['baz', 'two']]
+ * h = a.to_h
+ * h # => {"foo"=>"zero", "bar"=>"one", "baz"=>"two"}
*
- * ["foo", "bar"].to_h {|s| [s.ord, s]}
- * # => {102=>"foo", 98=>"bar"}
*/
static VALUE
@@ -2501,25 +3195,25 @@ rb_ary_to_h(VALUE ary)
int block_given = rb_block_given_p();
for (i=0; i<RARRAY_LEN(ary); i++) {
- const VALUE e = rb_ary_elt(ary, i);
- const VALUE elt = block_given ? rb_yield_force_blockarg(e) : e;
- const VALUE key_value_pair = rb_check_array_type(elt);
- if (NIL_P(key_value_pair)) {
- rb_raise(rb_eTypeError, "wrong element type %"PRIsVALUE" at %ld (expected array)",
- rb_obj_class(elt), i);
- }
- if (RARRAY_LEN(key_value_pair) != 2) {
- rb_raise(rb_eArgError, "wrong array length at %ld (expected 2, was %ld)",
- i, RARRAY_LEN(key_value_pair));
- }
- rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1));
+ const VALUE e = rb_ary_elt(ary, i);
+ const VALUE elt = block_given ? rb_yield_force_blockarg(e) : e;
+ const VALUE key_value_pair = rb_check_array_type(elt);
+ if (NIL_P(key_value_pair)) {
+ rb_raise(rb_eTypeError, "wrong element type %"PRIsVALUE" at %ld (expected array)",
+ rb_obj_class(elt), i);
+ }
+ if (RARRAY_LEN(key_value_pair) != 2) {
+ rb_raise(rb_eArgError, "wrong array length at %ld (expected 2, was %ld)",
+ i, RARRAY_LEN(key_value_pair));
+ }
+ rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1));
}
return hash;
}
/*
* call-seq:
- * ary.to_ary -> ary
+ * array.to_ary -> self
*
* Returns +self+.
*/
@@ -2534,9 +3228,9 @@ static void
ary_reverse(VALUE *p1, VALUE *p2)
{
while (p1 < p2) {
- VALUE tmp = *p1;
- *p1++ = *p2;
- *p2-- = tmp;
+ VALUE tmp = *p1;
+ *p1++ = *p2;
+ *p2-- = tmp;
}
}
@@ -2551,20 +3245,20 @@ rb_ary_reverse(VALUE ary)
RARRAY_PTR_USE_TRANSIENT(ary, p1, {
p2 = p1 + len - 1; /* points last item */
ary_reverse(p1, p2);
- }); /* WB: no new reference */
+ }); /* WB: no new reference */
}
return ary;
}
/*
* call-seq:
- * ary.reverse! -> ary
+ * array.reverse! -> self
+ *
+ * Reverses +self+ in place:
*
- * Reverses +self+ in place.
+ * a = ['foo', 'bar', 'two']
+ * a.reverse! # => ["two", "bar", "foo"]
*
- * a = [ "a", "b", "c" ]
- * a.reverse! #=> ["c", "b", "a"]
- * a #=> ["c", "b", "a"]
*/
static VALUE
@@ -2575,12 +3269,14 @@ rb_ary_reverse_bang(VALUE ary)
/*
* call-seq:
- * ary.reverse -> new_ary
+ * array.reverse -> new_array
*
- * Returns a new array containing +self+'s elements in reverse order.
+ * Returns a new \Array with the elements of +self+ in reverse order:
+ *
+ * a = ['foo', 'bar', 'two']
+ * a1 = a.reverse
+ * a1 # => ["two", "bar", "foo"]
*
- * [ "a", "b", "c" ].reverse #=> ["c", "b", "a"]
- * [ 1 ].reverse #=> [1]
*/
static VALUE
@@ -2592,7 +3288,7 @@ rb_ary_reverse_m(VALUE ary)
if (len > 0) {
const VALUE *p1 = RARRAY_CONST_PTR_TRANSIENT(ary);
VALUE *p2 = (VALUE *)RARRAY_CONST_PTR_TRANSIENT(dup) + len - 1;
- do *p2-- = *p1++; while (--len > 0);
+ do *p2-- = *p1++; while (--len > 0);
}
ARY_SET_LEN(dup, RARRAY_LEN(ary));
return dup;
@@ -2607,10 +3303,22 @@ rotate_count(long cnt, long len)
static void
ary_rotate_ptr(VALUE *ptr, long len, long cnt)
{
- --len;
- if (cnt < len) ary_reverse(ptr + cnt, ptr + len);
- if (--cnt > 0) ary_reverse(ptr, ptr + cnt);
- if (len > 0) ary_reverse(ptr, ptr + len);
+ if (cnt == 1) {
+ VALUE tmp = *ptr;
+ memmove(ptr, ptr + 1, sizeof(VALUE)*(len - 1));
+ *(ptr + len - 1) = tmp;
+ }
+ else if (cnt == len - 1) {
+ VALUE tmp = *(ptr + len - 1);
+ memmove(ptr + 1, ptr, sizeof(VALUE)*(len - 1));
+ *ptr = tmp;
+ }
+ else {
+ --len;
+ if (cnt < len) ary_reverse(ptr + cnt, ptr + len);
+ if (--cnt > 0) ary_reverse(ptr, ptr + cnt);
+ if (len > 0) ary_reverse(ptr, ptr + len);
+ }
}
VALUE
@@ -2620,7 +3328,7 @@ rb_ary_rotate(VALUE ary, long cnt)
if (cnt != 0) {
long len = RARRAY_LEN(ary);
- if (len > 0 && (cnt = rotate_count(cnt, len)) > 0) {
+ if (len > 1 && (cnt = rotate_count(cnt, len)) > 0) {
RARRAY_PTR_USE_TRANSIENT(ary, ptr, ary_rotate_ptr(ptr, len, cnt));
return ary;
}
@@ -2630,19 +3338,48 @@ rb_ary_rotate(VALUE ary, long cnt)
/*
* call-seq:
- * ary.rotate!(count=1) -> ary
+ * array.rotate! -> self
+ * array.rotate!(count) -> self
*
- * Rotates +self+ in place so that the element at +count+ comes first, and
- * returns +self+.
+ * Rotates +self+ in place by moving elements from one end to the other; returns +self+.
+ *
+ * When no argument given, rotates the first element to the last position:
+ *
+ * a = [:foo, 'bar', 2, 'bar']
+ * a.rotate! # => ["bar", 2, "bar", :foo]
+ *
+ * When given a non-negative \Integer +count+,
+ * rotates +count+ elements from the beginning to the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.rotate!(2)
+ * a # => [2, :foo, "bar"]
+ *
+ * If +count+ is large, uses <tt>count % array.size</tt> as the count:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.rotate!(20)
+ * a # => [2, :foo, "bar"]
+ *
+ * If +count+ is zero, returns +self+ unmodified:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.rotate!(0)
+ * a # => [:foo, "bar", 2]
+ *
+ * When given a negative Integer +count+, rotates in the opposite direction,
+ * from end to beginning:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.rotate!(-2)
+ * a # => ["bar", 2, :foo]
*
- * If +count+ is negative then it rotates in the opposite direction, starting
- * from the end of the array where +-1+ is the last element.
+ * If +count+ is small (far from zero), uses <tt>count % array.size</tt> as the count:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.rotate!(-5)
+ * a # => ["bar", 2, :foo]
*
- * a = [ "a", "b", "c", "d" ]
- * a.rotate! #=> ["b", "c", "d", "a"]
- * a #=> ["b", "c", "d", "a"]
- * a.rotate!(2) #=> ["d", "a", "b", "c"]
- * a.rotate!(-3) #=> ["a", "b", "c", "d"]
*/
static VALUE
@@ -2655,19 +3392,51 @@ rb_ary_rotate_bang(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.rotate(count=1) -> new_ary
+ * array.rotate -> new_array
+ * array.rotate(count) -> new_array
+ *
+ * Returns a new \Array formed from +self+ with elements
+ * rotated from one end to the other.
+ *
+ * When no argument given, returns a new \Array that is like +self+,
+ * except that the first element has been rotated to the last position:
+ *
+ * a = [:foo, 'bar', 2, 'bar']
+ * a1 = a.rotate
+ * a1 # => ["bar", 2, "bar", :foo]
+ *
+ * When given a non-negative \Integer +count+,
+ * returns a new \Array with +count+ elements rotated from the beginning to the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a.rotate(2)
+ * a1 # => [2, :foo, "bar"]
+ *
+ * If +count+ is large, uses <tt>count % array.size</tt> as the count:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a.rotate(20)
+ * a1 # => [2, :foo, "bar"]
+ *
+ * If +count+ is zero, returns a copy of +self+, unmodified:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a.rotate(0)
+ * a1 # => [:foo, "bar", 2]
*
- * Returns a new array by rotating +self+ so that the element at +count+ is
- * the first element of the new array.
+ * When given a negative \Integer +count+, rotates in the opposite direction,
+ * from end to beginning:
*
- * If +count+ is negative then it rotates in the opposite direction, starting
- * from the end of +self+ where +-1+ is the last element.
+ * a = [:foo, 'bar', 2]
+ * a1 = a.rotate(-2)
+ * a1 # => ["bar", 2, :foo]
+ *
+ * If +count+ is small (far from zero), uses <tt>count % array.size</tt> as the count:
+ *
+ * a = [:foo, 'bar', 2]
+ * a1 = a.rotate(-5)
+ * a1 # => ["bar", 2, :foo]
*
- * a = [ "a", "b", "c", "d" ]
- * a.rotate #=> ["b", "c", "d", "a"]
- * a #=> ["a", "b", "c", "d"]
- * a.rotate(2) #=> ["c", "d", "a", "b"]
- * a.rotate(-3) #=> ["b", "c", "d", "a"]
*/
static VALUE
@@ -2681,11 +3450,11 @@ rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
len = RARRAY_LEN(ary);
rotated = rb_ary_new2(len);
if (len > 0) {
- cnt = rotate_count(cnt, len);
+ cnt = rotate_count(cnt, len);
ptr = RARRAY_CONST_PTR_TRANSIENT(ary);
- len -= cnt;
- ary_memcpy(rotated, 0, len, ptr + cnt);
- ary_memcpy(rotated, len, cnt, ptr);
+ len -= cnt;
+ ary_memcpy(rotated, 0, len, ptr + cnt);
+ ary_memcpy(rotated, len, cnt, ptr);
}
ARY_SET_LEN(rotated, RARRAY_LEN(ary));
return rotated;
@@ -2693,18 +3462,27 @@ rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
struct ary_sort_data {
VALUE ary;
- struct cmp_opt_data cmp_opt;
+ VALUE receiver;
};
static VALUE
sort_reentered(VALUE ary)
{
if (RBASIC(ary)->klass) {
- rb_raise(rb_eRuntimeError, "sort reentered");
+ rb_raise(rb_eRuntimeError, "sort reentered");
}
return Qnil;
}
+static void
+sort_returned(struct ary_sort_data *data)
+{
+ if (rb_obj_frozen_p(data->receiver)) {
+ rb_raise(rb_eFrozenError, "array frozen during sort");
+ }
+ sort_reentered(data->ary);
+}
+
static int
sort_1(const void *ap, const void *bp, void *dummy)
{
@@ -2718,7 +3496,7 @@ sort_1(const void *ap, const void *bp, void *dummy)
args[1] = b;
retval = rb_yield_values2(2, args);
n = rb_cmpint(retval, a, b);
- sort_reentered(data->ary);
+ sort_returned(data);
return n;
}
@@ -2730,47 +3508,64 @@ sort_2(const void *ap, const void *bp, void *dummy)
VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
int n;
- if (FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data->cmp_opt, Fixnum)) {
- if ((long)a > (long)b) return 1;
- if ((long)a < (long)b) return -1;
- return 0;
+ if (FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(INTEGER)) {
+ if ((long)a > (long)b) return 1;
+ if ((long)a < (long)b) return -1;
+ return 0;
}
- if (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data->cmp_opt, String)) {
- return rb_str_cmp(a, b);
+ if (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(STRING)) {
+ return rb_str_cmp(a, b);
}
- if (RB_FLOAT_TYPE_P(a) && CMP_OPTIMIZABLE(data->cmp_opt, Float)) {
- return rb_float_cmp(a, b);
+ if (RB_FLOAT_TYPE_P(a) && CMP_OPTIMIZABLE(FLOAT)) {
+ return rb_float_cmp(a, b);
}
retval = rb_funcallv(a, id_cmp, 1, &b);
n = rb_cmpint(retval, a, b);
- sort_reentered(data->ary);
+ sort_returned(data);
return n;
}
/*
* call-seq:
- * ary.sort! -> ary
- * ary.sort! {|a, b| block} -> ary
+ * array.sort! -> self
+ * array.sort! {|a, b| ... } -> self
*
- * Sorts +self+ in place.
+ * Returns +self+ with its elements sorted in place.
*
- * Comparisons for the sort will be done using the <code><=></code> operator
- * or using an optional code block.
+ * With no block, compares elements using operator <tt><=></tt>
+ * (see Comparable):
*
- * The block must implement a comparison between +a+ and +b+ and return
- * an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
- * are equivalent, or an integer greater than 0 when +a+ follows +b+.
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a.sort!
+ * a # => ["a", "b", "c", "d", "e"]
*
- * The result is not guaranteed to be stable. When the comparison of two
- * elements returns +0+, the order of the elements is unpredictable.
+ * With a block, calls the block with each element pair;
+ * for each element pair +a+ and +b+, the block should return an integer:
*
- * ary = [ "d", "a", "e", "c", "b" ]
- * ary.sort! #=> ["a", "b", "c", "d", "e"]
- * ary.sort! {|a, b| b <=> a} #=> ["e", "d", "c", "b", "a"]
+ * - Negative when +b+ is to follow +a+.
+ * - Zero when +a+ and +b+ are equivalent.
+ * - Positive when +a+ is to follow +b+.
+ *
+ * Example:
+ *
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a.sort! {|a, b| a <=> b }
+ * a # => ["a", "b", "c", "d", "e"]
+ * a.sort! {|a, b| b <=> a }
+ * a # => ["e", "d", "c", "b", "a"]
+ *
+ * When the block returns zero, the order for +a+ and +b+ is indeterminate,
+ * and may be unstable:
+ *
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a.sort! {|a, b| 0 }
+ * a # => ["d", "e", "c", "a", "b"]
*
- * See also Enumerable#sort_by.
*/
VALUE
@@ -2779,24 +3574,23 @@ rb_ary_sort_bang(VALUE ary)
rb_ary_modify(ary);
assert(!ARY_SHARED_P(ary));
if (RARRAY_LEN(ary) > 1) {
- VALUE tmp = ary_make_substitution(ary); /* only ary refers tmp */
- struct ary_sort_data data;
- long len = RARRAY_LEN(ary);
- RBASIC_CLEAR_CLASS(tmp);
- data.ary = tmp;
- data.cmp_opt.opt_methods = 0;
- data.cmp_opt.opt_inited = 0;
- RARRAY_PTR_USE(tmp, ptr, {
+ VALUE tmp = ary_make_substitution(ary); /* only ary refers tmp */
+ struct ary_sort_data data;
+ long len = RARRAY_LEN(ary);
+ RBASIC_CLEAR_CLASS(tmp);
+ data.ary = tmp;
+ data.receiver = ary;
+ RARRAY_PTR_USE(tmp, ptr, {
ruby_qsort(ptr, len, sizeof(VALUE),
rb_block_given_p()?sort_1:sort_2, &data);
- }); /* WB: no new reference */
- rb_ary_modify(ary);
+ }); /* WB: no new reference */
+ rb_ary_modify(ary);
if (ARY_EMBED_P(tmp)) {
if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */
rb_ary_unshare(ary);
- FL_SET_EMBED(ary);
+ FL_SET_EMBED(ary);
}
- ary_memcpy(ary, 0, ARY_EMBED_LEN(tmp), ARY_EMBED_PTR(tmp));
+ ary_memcpy(ary, 0, ARY_EMBED_LEN(tmp), ARY_EMBED_PTR(tmp));
ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp));
}
else {
@@ -2835,31 +3629,44 @@ rb_ary_sort_bang(VALUE ary)
/*
* call-seq:
- * ary.sort -> new_ary
- * ary.sort {|a, b| block} -> new_ary
+ * array.sort -> new_array
+ * array.sort {|a, b| ... } -> new_array
+ *
+ * Returns a new \Array whose elements are those from +self+, sorted.
+ *
+ * With no block, compares elements using operator <tt><=></tt>
+ * (see Comparable):
*
- * Returns a new array created by sorting +self+.
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a1 = a.sort
+ * a1 # => ["a", "b", "c", "d", "e"]
*
- * Comparisons for the sort will be done using the <code><=></code> operator
- * or using an optional code block.
+ * With a block, calls the block with each element pair;
+ * for each element pair +a+ and +b+, the block should return an integer:
*
- * The block must implement a comparison between +a+ and +b+ and return
- * an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
- * are equivalent, or an integer greater than 0 when +a+ follows +b+.
+ * - Negative when +b+ is to follow +a+.
+ * - Zero when +a+ and +b+ are equivalent.
+ * - Positive when +a+ is to follow +b+.
*
- * The result is not guaranteed to be stable. When the comparison of two
- * elements returns +0+, the order of the elements is unpredictable.
+ * Example:
*
- * ary = [ "d", "a", "e", "c", "b" ]
- * ary.sort #=> ["a", "b", "c", "d", "e"]
- * ary.sort {|a, b| b <=> a} #=> ["e", "d", "c", "b", "a"]
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a1 = a.sort {|a, b| a <=> b }
+ * a1 # => ["a", "b", "c", "d", "e"]
+ * a2 = a.sort {|a, b| b <=> a }
+ * a2 # => ["e", "d", "c", "b", "a"]
*
- * To produce the reverse order, the following can also be used
- * (and may be faster):
+ * When the block returns zero, the order for +a+ and +b+ is indeterminate,
+ * and may be unstable:
*
- * ary.sort.reverse! #=> ["e", "d", "c", "b", "a"]
+ * a = 'abcde'.split('').shuffle
+ * a # => ["e", "b", "d", "a", "c"]
+ * a1 = a.sort {|a, b| 0 }
+ * a1 # => ["c", "e", "b", "d", "a"]
*
- * See also Enumerable#sort_by.
+ * Related: Enumerable#sort_by.
*/
VALUE
@@ -2874,55 +3681,12 @@ static VALUE rb_ary_bsearch_index(VALUE ary);
/*
* call-seq:
- * ary.bsearch {|x| block } -> elem
- *
- * By using binary search, finds a value from this array which meets
- * the given condition in O(log n) where n is the size of the array.
- *
- * You can use this method in two modes: a find-minimum mode and
- * a find-any mode. In either case, the elements of the array must be
- * monotone (or sorted) with respect to the block.
- *
- * In find-minimum mode (this is a good choice for typical use cases),
- * the block must always return true or false, and there must be an index i
- * (0 <= i <= ary.size) so that:
- *
- * - the block returns false for any element whose index is less than
- * i, and
- * - the block returns true for any element whose index is greater
- * than or equal to i.
- *
- * This method returns the i-th element. If i is equal to ary.size,
- * it returns nil.
- *
- * ary = [0, 4, 7, 10, 12]
- * ary.bsearch {|x| x >= 4 } #=> 4
- * ary.bsearch {|x| x >= 6 } #=> 7
- * ary.bsearch {|x| x >= -1 } #=> 0
- * ary.bsearch {|x| x >= 100 } #=> nil
- *
- * In find-any mode (this behaves like libc's bsearch(3)), the block
- * must always return a number, and there must be two indices i and j
- * (0 <= i <= j <= ary.size) so that:
- *
- * - the block returns a positive number for ary[k] if 0 <= k < i,
- * - the block returns zero for ary[k] if i <= k < j, and
- * - the block returns a negative number for ary[k] if
- * j <= k < ary.size.
- *
- * Under this condition, this method returns any element whose index
- * is within i...j. If i is equal to j (i.e., there is no element
- * that satisfies the block), this method returns nil.
- *
- * ary = [0, 4, 7, 10, 12]
- * # try to find v such that 4 <= v < 8
- * ary.bsearch {|x| 1 - x / 4 } #=> 4 or 7
- * # try to find v such that 8 <= v < 10
- * ary.bsearch {|x| 4 - x / 2 } #=> nil
- *
- * You must not mix the two modes at a time; the block must always
- * return either true/false, or always return a number. It is
- * undefined which value is actually picked up at each iteration.
+ * array.bsearch {|element| ... } -> object
+ * array.bsearch -> new_enumerator
+ *
+ * Returns an element from +self+ selected by a binary search.
+ *
+ * See {Binary Searching}[rdoc-ref:bsearch.rdoc].
*/
static VALUE
@@ -2931,22 +3695,18 @@ rb_ary_bsearch(VALUE ary)
VALUE index_result = rb_ary_bsearch_index(ary);
if (FIXNUM_P(index_result)) {
- return rb_ary_entry(ary, FIX2LONG(index_result));
+ return rb_ary_entry(ary, FIX2LONG(index_result));
}
return index_result;
}
/*
* call-seq:
- * ary.bsearch_index {|x| block } -> int or nil
+ * array.bsearch_index {|element| ... } -> integer or nil
+ * array.bsearch_index -> new_enumerator
*
- * By using binary search, finds an index of a value from this array which
- * meets the given condition in O(log n) where n is the size of the array.
- *
- * It supports two modes, depending on the nature of the block. They are
- * exactly the same as in the case of the #bsearch method, with the only difference
- * being that this method returns the index of the element instead of the
- * element itself. For more details consult the documentation for #bsearch.
+ * Searches +self+ as described at method #bsearch,
+ * but returns the _index_ of the found element instead of the element itself.
*/
static VALUE
@@ -2958,39 +3718,39 @@ rb_ary_bsearch_index(VALUE ary)
RETURN_ENUMERATOR(ary, 0, 0);
while (low < high) {
- mid = low + ((high - low) / 2);
- val = rb_ary_entry(ary, mid);
- v = rb_yield(val);
- if (FIXNUM_P(v)) {
- if (v == INT2FIX(0)) return INT2FIX(mid);
- smaller = (SIGNED_VALUE)v < 0; /* Fixnum preserves its sign-bit */
- }
- else if (v == Qtrue) {
- satisfied = 1;
- smaller = 1;
- }
- else if (v == Qfalse || v == Qnil) {
- smaller = 0;
- }
- else if (rb_obj_is_kind_of(v, rb_cNumeric)) {
- const VALUE zero = INT2FIX(0);
- switch (rb_cmpint(rb_funcallv(v, id_cmp, 1, &zero), v, zero)) {
- case 0: return INT2FIX(mid);
- case 1: smaller = 1; break;
- case -1: smaller = 0;
- }
- }
- else {
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE
- " (must be numeric, true, false or nil)",
- rb_obj_class(v));
- }
- if (smaller) {
- high = mid;
- }
- else {
- low = mid + 1;
- }
+ mid = low + ((high - low) / 2);
+ val = rb_ary_entry(ary, mid);
+ v = rb_yield(val);
+ if (FIXNUM_P(v)) {
+ if (v == INT2FIX(0)) return INT2FIX(mid);
+ smaller = (SIGNED_VALUE)v < 0; /* Fixnum preserves its sign-bit */
+ }
+ else if (v == Qtrue) {
+ satisfied = 1;
+ smaller = 1;
+ }
+ else if (!RTEST(v)) {
+ smaller = 0;
+ }
+ else if (rb_obj_is_kind_of(v, rb_cNumeric)) {
+ const VALUE zero = INT2FIX(0);
+ switch (rb_cmpint(rb_funcallv(v, id_cmp, 1, &zero), v, zero)) {
+ case 0: return INT2FIX(mid);
+ case 1: smaller = 0; break;
+ case -1: smaller = 1;
+ }
+ }
+ else {
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE
+ " (must be numeric, true, false or nil)",
+ rb_obj_class(v));
+ }
+ if (smaller) {
+ high = mid;
+ }
+ else {
+ low = mid + 1;
+ }
}
if (!satisfied) return Qnil;
return INT2FIX(low);
@@ -3005,18 +3765,28 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, dummy))
/*
* call-seq:
- * ary.sort_by! {|obj| block} -> ary
- * ary.sort_by! -> Enumerator
+ * array.sort_by! {|element| ... } -> self
+ * array.sort_by! -> new_enumerator
*
- * Sorts +self+ in place using a set of keys generated by mapping the
- * values in +self+ through the given block.
+ * Sorts the elements of +self+ in place,
+ * using an ordering determined by the block; returns self.
*
- * The result is not guaranteed to be stable. When two keys are equal,
- * the order of the corresponding elements is unpredictable.
+ * Calls the block with each successive element;
+ * sorts elements based on the values returned from the block.
*
- * If no block is given, an Enumerator is returned instead.
+ * For duplicates returned by the block, the ordering is indeterminate, and may be unstable.
+ *
+ * This example sorts strings based on their sizes:
+ *
+ * a = ['aaaa', 'bbb', 'cc', 'd']
+ * a.sort_by! {|element| element.size }
+ * a # => ["d", "cc", "bbb", "aaaa"]
+ *
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = ['aaaa', 'bbb', 'cc', 'd']
+ * a.sort_by! # => #<Enumerator: ["aaaa", "bbb", "cc", "d"]:sort_by!>
*
- * See also Enumerable#sort_by.
*/
static VALUE
@@ -3034,23 +3804,22 @@ rb_ary_sort_by_bang(VALUE ary)
/*
* call-seq:
- * ary.collect {|item| block} -> new_ary
- * ary.map {|item| block} -> new_ary
- * ary.collect -> Enumerator
- * ary.map -> Enumerator
- *
- * Invokes the given block once for each element of +self+.
+ * array.map {|element| ... } -> new_array
+ * array.map -> new_enumerator
*
- * Creates a new array containing the values returned by the block.
+ * Calls the block, if given, with each element of +self+;
+ * returns a new \Array whose elements are the return values from the block:
*
- * See also Enumerable#collect.
+ * a = [:foo, 'bar', 2]
+ * a1 = a.map {|element| element.class }
+ * a1 # => [Symbol, String, Integer]
*
- * If no block is given, an Enumerator is returned instead.
+ * Returns a new \Enumerator if no block given:
+ * a = [:foo, 'bar', 2]
+ * a1 = a.map
+ * a1 # => #<Enumerator: [:foo, "bar", 2]:map>
*
- * a = [ "a", "b", "c", "d" ]
- * a.collect {|x| x + "!"} #=> ["a!", "b!", "c!", "d!"]
- * a.map.with_index {|x, i| x * i} #=> ["", "b", "cc", "ddd"]
- * a #=> ["a", "b", "c", "d"]
+ * Array#collect is an alias for Array#map.
*/
static VALUE
@@ -3070,23 +3839,22 @@ rb_ary_collect(VALUE ary)
/*
* call-seq:
- * ary.collect! {|item| block } -> ary
- * ary.map! {|item| block } -> ary
- * ary.collect! -> Enumerator
- * ary.map! -> Enumerator
+ * array.map! {|element| ... } -> self
+ * array.map! -> new_enumerator
*
- * Invokes the given block once for each element of +self+, replacing the
- * element with the value returned by the block.
+ * Calls the block, if given, with each element;
+ * replaces the element with the block's return value:
*
- * See also Enumerable#collect.
+ * a = [:foo, 'bar', 2]
+ * a.map! { |element| element.class } # => [Symbol, String, Integer]
*
- * If no block is given, an Enumerator is returned instead.
+ * Returns a new \Enumerator if no block given:
*
- * a = [ "a", "b", "c", "d" ]
- * a.map! {|x| x + "!" }
- * a #=> [ "a!", "b!", "c!", "d!" ]
- * a.collect!.with_index {|x, i| x[0...i] }
- * a #=> ["", "b", "c!", "d!"]
+ * a = [:foo, 'bar', 2]
+ * a1 = a.map!
+ * a1 # => #<Enumerator: [:foo, "bar", 2]:map!>
+ *
+ * Array#collect! is an alias for Array#map!.
*/
static VALUE
@@ -3097,7 +3865,7 @@ rb_ary_collect_bang(VALUE ary)
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
rb_ary_modify(ary);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_ary_store(ary, i, rb_yield(RARRAY_AREF(ary, i)));
+ rb_ary_store(ary, i, rb_yield(RARRAY_AREF(ary, i)));
}
return ary;
}
@@ -3109,21 +3877,21 @@ rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE (*func
long beg, len, i, j;
for (i=0; i<argc; i++) {
- if (FIXNUM_P(argv[i])) {
- rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
- continue;
- }
- /* check if idx is Range */
- if (rb_range_beg_len(argv[i], &beg, &len, olen, 1)) {
- long end = olen < beg+len ? olen : beg+len;
- for (j = beg; j < end; j++) {
- rb_ary_push(result, (*func)(obj, j));
- }
- if (beg + len > j)
- rb_ary_resize(result, RARRAY_LEN(result) + (beg + len) - j);
- continue;
- }
- rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
+ if (FIXNUM_P(argv[i])) {
+ rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
+ continue;
+ }
+ /* check if idx is Range */
+ if (rb_range_beg_len(argv[i], &beg, &len, olen, 1)) {
+ long end = olen < beg+len ? olen : beg+len;
+ for (j = beg; j < end; j++) {
+ rb_ary_push(result, (*func)(obj, j));
+ }
+ if (beg + len > j)
+ rb_ary_resize(result, RARRAY_LEN(result) + (beg + len) - j);
+ continue;
+ }
+ rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
}
return result;
}
@@ -3133,45 +3901,70 @@ append_values_at_single(VALUE result, VALUE ary, long olen, VALUE idx)
{
long beg, len;
if (FIXNUM_P(idx)) {
- beg = FIX2LONG(idx);
+ beg = FIX2LONG(idx);
}
/* check if idx is Range */
else if (rb_range_beg_len(idx, &beg, &len, olen, 1)) {
- if (len > 0) {
+ if (len > 0) {
const VALUE *const src = RARRAY_CONST_PTR_TRANSIENT(ary);
- const long end = beg + len;
- const long prevlen = RARRAY_LEN(result);
- if (beg < olen) {
- rb_ary_cat(result, src + beg, end > olen ? olen-beg : len);
- }
- if (end > olen) {
- rb_ary_store(result, prevlen + len - 1, Qnil);
- }
- }
- return result;
+ const long end = beg + len;
+ const long prevlen = RARRAY_LEN(result);
+ if (beg < olen) {
+ rb_ary_cat(result, src + beg, end > olen ? olen-beg : len);
+ }
+ if (end > olen) {
+ rb_ary_store(result, prevlen + len - 1, Qnil);
+ }
+ }
+ return result;
}
else {
- beg = NUM2LONG(idx);
+ beg = NUM2LONG(idx);
}
return rb_ary_push(result, rb_ary_entry(ary, beg));
}
/*
* call-seq:
- * ary.values_at(selector, ...) -> new_ary
+ * array.values_at(*indexes) -> new_array
+ *
+ * Returns a new \Array whose elements are the elements
+ * of +self+ at the given \Integer or \Range +indexes+.
+ *
+ * For each positive +index+, returns the element at offset +index+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.values_at(0, 2) # => [:foo, 2]
+ * a.values_at(0..1) # => [:foo, "bar"]
+ *
+ * The given +indexes+ may be in any order, and may repeat:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.values_at(2, 0, 1, 0, 2) # => [2, :foo, "bar", :foo, 2]
+ * a.values_at(1, 0..2) # => ["bar", :foo, "bar", 2]
+ *
+ * Assigns +nil+ for an +index+ that is too large:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.values_at(0, 3, 1, 3) # => [:foo, nil, "bar", nil]
*
- * Returns an array containing the elements in +self+ corresponding to the
- * given +selector+(s).
+ * Returns a new empty \Array if no arguments given.
*
- * The selectors may be either integer indices or ranges.
+ * For each negative +index+, counts backward from the end of the array:
*
- * See also Array#select.
+ * a = [:foo, 'bar', 2]
+ * a.values_at(-1, -3) # => [2, :foo]
+ *
+ * Assigns +nil+ for an +index+ that is too small:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.values_at(0, -5, 1, -6, 2) # => [:foo, nil, "bar", nil, 2]
+ *
+ * The given +indexes+ may have a mixture of signs:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.values_at(0, -2, 1, -1) # => [:foo, "bar", "bar", 2]
*
- * a = %w{ a b c d e f }
- * a.values_at(1, 3, 5) # => ["b", "d", "f"]
- * a.values_at(1, 3, 5, 7) # => ["b", "d", "f", nil]
- * a.values_at(-1, -2, -2, -7) # => ["f", "e", "e", nil]
- * a.values_at(4..6, 3...6) # => ["e", "f", nil, "d", "e", "f"]
*/
static VALUE
@@ -3180,7 +3973,7 @@ rb_ary_values_at(int argc, VALUE *argv, VALUE ary)
long i, olen = RARRAY_LEN(ary);
VALUE result = rb_ary_new_capa(argc);
for (i = 0; i < argc; ++i) {
- append_values_at_single(result, ary, olen, argv[i]);
+ append_values_at_single(result, ary, olen, argv[i]);
}
RB_GC_GUARD(ary);
return result;
@@ -3189,22 +3982,21 @@ rb_ary_values_at(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.select {|item| block} -> new_ary
- * ary.select -> Enumerator
- * ary.filter {|item| block} -> new_ary
- * ary.filter -> Enumerator
- *
- * Returns a new array containing all elements of +ary+
- * for which the given +block+ returns a true value.
+ * array.select {|element| ... } -> new_array
+ * array.select -> new_enumerator
*
- * If no block is given, an Enumerator is returned instead.
+ * Calls the block, if given, with each element of +self+;
+ * returns a new \Array containing those elements of +self+
+ * for which the block returns a truthy value:
*
- * [1,2,3,4,5].select {|num| num.even? } #=> [2, 4]
+ * a = [:foo, 'bar', 2, :bam]
+ * a1 = a.select {|element| element.to_s.start_with?('b') }
+ * a1 # => ["bar", :bam]
*
- * a = %w[ a b c d e f ]
- * a.select {|v| v =~ /[aeiou]/ } #=> ["a", "e"]
+ * Returns a new \Enumerator if no block given:
*
- * See also Enumerable#select.
+ * a = [:foo, 'bar', 2, :bam]
+ * a.select # => #<Enumerator: [:foo, "bar", 2, :bam]:select>
*
* Array#filter is an alias for Array#select.
*/
@@ -3218,9 +4010,9 @@ rb_ary_select(VALUE ary)
RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
result = rb_ary_new2(RARRAY_LEN(ary));
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
- rb_ary_push(result, rb_ary_elt(ary, i));
- }
+ if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
+ rb_ary_push(result, rb_ary_elt(ary, i));
+ }
}
return result;
}
@@ -3238,12 +4030,12 @@ select_bang_i(VALUE a)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); arg->len[0] = ++i1) {
- VALUE v = RARRAY_AREF(ary, i1);
- if (!RTEST(rb_yield(v))) continue;
- if (i1 != i2) {
- rb_ary_store(ary, i2, v);
- }
- arg->len[1] = ++i2;
+ VALUE v = RARRAY_AREF(ary, i1);
+ if (!RTEST(rb_yield(v))) continue;
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, v);
+ }
+ arg->len[1] = ++i2;
}
return (i1 == i2) ? Qnil : ary;
}
@@ -3257,35 +4049,38 @@ select_bang_ensure(VALUE a)
long i1 = arg->len[0], i2 = arg->len[1];
if (i2 < len && i2 < i1) {
- long tail = 0;
- if (i1 < len) {
- tail = len - i1;
+ long tail = 0;
+ rb_ary_modify(ary);
+ if (i1 < len) {
+ tail = len - i1;
RARRAY_PTR_USE_TRANSIENT(ary, ptr, {
- MEMMOVE(ptr + i2, ptr + i1, VALUE, tail);
- });
- }
- ARY_SET_LEN(ary, i2 + tail);
+ MEMMOVE(ptr + i2, ptr + i1, VALUE, tail);
+ });
+ }
+ ARY_SET_LEN(ary, i2 + tail);
}
return ary;
}
/*
* call-seq:
- * ary.select! {|item| block } -> ary or nil
- * ary.select! -> Enumerator
- * ary.filter! {|item| block } -> ary or nil
- * ary.filter! -> Enumerator
+ * array.select! {|element| ... } -> self or nil
+ * array.select! -> new_enumerator
+ *
+ * Calls the block, if given with each element of +self+;
+ * removes from +self+ those elements for which the block returns +false+ or +nil+.
*
- * Invokes the given block passing in successive elements from +self+,
- * deleting elements for which the block returns a +false+ value.
+ * Returns +self+ if any elements were removed:
*
- * The array may not be changed instantly every time the block is called.
+ * a = [:foo, 'bar', 2, :bam]
+ * a.select! {|element| element.to_s.start_with?('b') } # => ["bar", :bam]
*
- * If changes were made, it will return +self+, otherwise it returns +nil+.
+ * Returns +nil+ if no elements were removed.
*
- * If no block is given, an Enumerator is returned instead.
+ * Returns a new \Enumerator if no block given:
*
- * See also Array#keep_if.
+ * a = [:foo, 'bar', 2, :bam]
+ * a.select! # => #<Enumerator: [:foo, "bar", 2, :bam]:select!>
*
* Array#filter! is an alias for Array#select!.
*/
@@ -3305,19 +4100,20 @@ rb_ary_select_bang(VALUE ary)
/*
* call-seq:
- * ary.keep_if {|item| block} -> ary
- * ary.keep_if -> Enumerator
+ * array.keep_if {|element| ... } -> self
+ * array.keep_if -> new_enumeration
*
- * Deletes every element of +self+ for which the given block evaluates to
- * +false+, and returns +self+.
+ * Retains those elements for which the block returns a truthy value;
+ * deletes all other elements; returns +self+:
*
- * If no block is given, an Enumerator is returned instead.
+ * a = [:foo, 'bar', 2, :bam]
+ * a.keep_if {|element| element.to_s.start_with?('b') } # => ["bar", :bam]
*
- * a = %w[ a b c d e f ]
- * a.keep_if {|v| v =~ /[aeiou]/ } #=> ["a", "e"]
- * a #=> ["a", "e"]
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = [:foo, 'bar', 2, :bam]
+ * a.keep_if # => #<Enumerator: [:foo, "bar", 2, :bam]:keep_if>
*
- * See also Array#select!.
*/
static VALUE
@@ -3333,32 +4129,48 @@ ary_resize_smaller(VALUE ary, long len)
{
rb_ary_modify(ary);
if (RARRAY_LEN(ary) > len) {
- ARY_SET_LEN(ary, len);
- if (len * 2 < ARY_CAPA(ary) &&
- ARY_CAPA(ary) > ARY_DEFAULT_SIZE) {
- ary_resize_capa(ary, len * 2);
- }
+ ARY_SET_LEN(ary, len);
+ if (len * 2 < ARY_CAPA(ary) &&
+ ARY_CAPA(ary) > ARY_DEFAULT_SIZE) {
+ ary_resize_capa(ary, len * 2);
+ }
}
}
/*
* call-seq:
- * ary.delete(obj) -> item or nil
- * ary.delete(obj) {block} -> item or result of block
+ * array.delete(obj) -> deleted_object
+ * array.delete(obj) {|nosuch| ... } -> deleted_object or block_return
+ *
+ * Removes zero or more elements from +self+.
+ *
+ * When no block is given,
+ * removes from +self+ each element +ele+ such that <tt>ele == obj</tt>;
+ * returns the last deleted element:
+ *
+ * s1 = 'bar'; s2 = 'bar'
+ * a = [:foo, s1, 2, s2]
+ * a.delete('bar') # => "bar"
+ * a # => [:foo, 2]
+ *
+ * Returns +nil+ if no elements removed.
*
- * Deletes all items from +self+ that are equal to +obj+.
+ * When a block is given,
+ * removes from +self+ each element +ele+ such that <tt>ele == obj</tt>.
*
- * Returns the last deleted item, or +nil+ if no matching item is found.
+ * If any such elements are found, ignores the block
+ * and returns the last deleted element:
*
- * If the optional code block is given, the result of the block is returned if
- * the item is not found. (To remove +nil+ elements and get an informative
- * return value, use Array#compact!)
+ * s1 = 'bar'; s2 = 'bar'
+ * a = [:foo, s1, 2, s2]
+ * deleted_obj = a.delete('bar') {|obj| fail 'Cannot happen' }
+ * a # => [:foo, 2]
+ *
+ * If no such elements are found, returns the block's return value:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.delete(:nosuch) {|obj| "#{obj} not found" } # => "nosuch not found"
*
- * a = [ "a", "b", "b", "b", "c" ]
- * a.delete("b") #=> "b"
- * a #=> ["a", "c"]
- * a.delete("z") #=> nil
- * a.delete("z") {"not found"} #=> "not found"
*/
VALUE
@@ -3368,22 +4180,22 @@ rb_ary_delete(VALUE ary, VALUE item)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE e = RARRAY_AREF(ary, i1);
+ VALUE e = RARRAY_AREF(ary, i1);
- if (rb_equal(e, item)) {
- v = e;
- continue;
- }
- if (i1 != i2) {
- rb_ary_store(ary, i2, e);
- }
- i2++;
+ if (rb_equal(e, item)) {
+ v = e;
+ continue;
+ }
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, e);
+ }
+ i2++;
}
if (RARRAY_LEN(ary) == i2) {
- if (rb_block_given_p()) {
- return rb_yield(item);
- }
- return Qnil;
+ if (rb_block_given_p()) {
+ return rb_yield(item);
+ }
+ return Qnil;
}
ary_resize_smaller(ary, i2);
@@ -3398,18 +4210,18 @@ rb_ary_delete_same(VALUE ary, VALUE item)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE e = RARRAY_AREF(ary, i1);
+ VALUE e = RARRAY_AREF(ary, i1);
- if (e == item) {
- continue;
- }
- if (i1 != i2) {
- rb_ary_store(ary, i2, e);
- }
- i2++;
+ if (e == item) {
+ continue;
+ }
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, e);
+ }
+ i2++;
}
if (RARRAY_LEN(ary) == i2) {
- return;
+ return;
}
ary_resize_smaller(ary, i2);
@@ -3423,8 +4235,8 @@ rb_ary_delete_at(VALUE ary, long pos)
if (pos >= len) return Qnil;
if (pos < 0) {
- pos += len;
- if (pos < 0) return Qnil;
+ pos += len;
+ if (pos < 0) return Qnil;
}
rb_ary_modify(ary);
@@ -3439,17 +4251,25 @@ rb_ary_delete_at(VALUE ary, long pos)
/*
* call-seq:
- * ary.delete_at(index) -> obj or nil
+ * array.delete_at(index) -> deleted_object or nil
+ *
+ * Deletes an element from +self+, per the given \Integer +index+.
*
- * Deletes the element at the specified +index+, returning that element, or
- * +nil+ if the +index+ is out of range.
+ * When +index+ is non-negative, deletes the element at offset +index+:
*
- * See also Array#slice!
+ * a = [:foo, 'bar', 2]
+ * a.delete_at(1) # => "bar"
+ * a # => [:foo, 2]
*
- * a = ["ant", "bat", "cat", "dog"]
- * a.delete_at(2) #=> "cat"
- * a #=> ["ant", "bat", "dog"]
- * a.delete_at(99) #=> nil
+ * If index is too large, returns +nil+.
+ *
+ * When +index+ is negative, counts backward from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.delete_at(-2) # => "bar"
+ * a # => [:foo, 2]
+ *
+ * If +index+ is too small (far from zero), returns nil.
*/
static VALUE
@@ -3458,70 +4278,133 @@ rb_ary_delete_at_m(VALUE ary, VALUE pos)
return rb_ary_delete_at(ary, NUM2LONG(pos));
}
+static VALUE
+ary_slice_bang_by_rb_ary_splice(VALUE ary, long pos, long len)
+{
+ const long orig_len = RARRAY_LEN(ary);
+
+ if (len < 0) {
+ return Qnil;
+ }
+ else if (pos < -orig_len) {
+ return Qnil;
+ }
+ else if (pos < 0) {
+ pos += orig_len;
+ }
+ else if (orig_len < pos) {
+ return Qnil;
+ }
+ if (orig_len < pos + len) {
+ len = orig_len - pos;
+ }
+ if (len == 0) {
+ return rb_ary_new2(0);
+ }
+ else {
+ VALUE arg2 = rb_ary_new4(len, RARRAY_CONST_PTR_TRANSIENT(ary)+pos);
+ rb_ary_splice(ary, pos, len, 0, 0);
+ return arg2;
+ }
+}
+
/*
* call-seq:
- * ary.slice!(index) -> obj or nil
- * ary.slice!(start, length) -> new_ary or nil
- * ary.slice!(range) -> new_ary or nil
- *
- * Deletes the element(s) given by an +index+ (optionally up to +length+
- * elements) or by a +range+.
- *
- * Returns the deleted object (or objects), or +nil+ if the +index+ is out of
- * range.
- *
- * a = [ "a", "b", "c" ]
- * a.slice!(1) #=> "b"
- * a #=> ["a", "c"]
- * a.slice!(-1) #=> "c"
- * a #=> ["a"]
- * a.slice!(100) #=> nil
- * a #=> ["a"]
+ * array.slice!(n) -> object or nil
+ * array.slice!(start, length) -> new_array or nil
+ * array.slice!(range) -> new_array or nil
+ *
+ * Removes and returns elements from +self+.
+ *
+ * When the only argument is an \Integer +n+,
+ * removes and returns the _nth_ element in +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(1) # => "bar"
+ * a # => [:foo, 2]
+ *
+ * If +n+ is negative, counts backwards from the end of +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(-1) # => 2
+ * a # => [:foo, "bar"]
+ *
+ * If +n+ is out of range, returns +nil+.
+ *
+ * When the only arguments are Integers +start+ and +length+,
+ * removes +length+ elements from +self+ beginning at offset +start+;
+ * returns the deleted objects in a new \Array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(0, 2) # => [:foo, "bar"]
+ * a # => [2]
+ *
+ * If <tt>start + length</tt> exceeds the array size,
+ * removes and returns all elements from offset +start+ to the end:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(1, 50) # => ["bar", 2]
+ * a # => [:foo]
+ *
+ * If <tt>start == a.size</tt> and +length+ is non-negative,
+ * returns a new empty \Array.
+ *
+ * If +length+ is negative, returns +nil+.
+ *
+ * When the only argument is a \Range object +range+,
+ * treats <tt>range.min</tt> as +start+ above and <tt>range.size</tt> as +length+ above:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(1..2) # => ["bar", 2]
+ * a # => [:foo]
+ *
+ * If <tt>range.start == a.size</tt>, returns a new empty \Array.
+ *
+ * If <tt>range.start</tt> is larger than the array size, returns +nil+.
+ *
+ * If <tt>range.end</tt> is negative, counts backwards from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(0..-2) # => [:foo, "bar"]
+ * a # => [2]
+ *
+ * If <tt>range.start</tt> is negative,
+ * calculates the start index backwards from the end of the array:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.slice!(-2..2) # => ["bar", 2]
+ * a # => [:foo]
+ *
*/
static VALUE
rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary)
{
- VALUE arg1, arg2;
- long pos, len, orig_len;
+ VALUE arg1;
+ long pos, len;
rb_ary_modify_check(ary);
- if (argc == 2) {
- pos = NUM2LONG(argv[0]);
- len = NUM2LONG(argv[1]);
- delete_pos_len:
- if (len < 0) return Qnil;
- orig_len = RARRAY_LEN(ary);
- if (pos < 0) {
- pos += orig_len;
- if (pos < 0) return Qnil;
- }
- else if (orig_len < pos) return Qnil;
- if (orig_len < pos + len) {
- len = orig_len - pos;
- }
- if (len == 0) return rb_ary_new2(0);
- arg2 = rb_ary_new4(len, RARRAY_CONST_PTR_TRANSIENT(ary)+pos);
- RBASIC_SET_CLASS(arg2, rb_obj_class(ary));
- rb_ary_splice(ary, pos, len, 0, 0);
- return arg2;
- }
-
rb_check_arity(argc, 1, 2);
arg1 = argv[0];
+ if (argc == 2) {
+ pos = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[1]);
+ return ary_slice_bang_by_rb_ary_splice(ary, pos, len);
+ }
+
if (!FIXNUM_P(arg1)) {
- switch (rb_range_beg_len(arg1, &pos, &len, RARRAY_LEN(ary), 0)) {
- case Qtrue:
- /* valid range */
- goto delete_pos_len;
- case Qnil:
- /* invalid range */
- return Qnil;
- default:
- /* not a range */
- break;
- }
+ switch (rb_range_beg_len(arg1, &pos, &len, RARRAY_LEN(ary), 0)) {
+ case Qtrue:
+ /* valid range */
+ return ary_slice_bang_by_rb_ary_splice(ary, pos, len);
+ case Qnil:
+ /* invalid range */
+ return Qnil;
+ default:
+ /* not a range */
+ break;
+ }
}
return rb_ary_delete_at(ary, NUM2LONG(arg1));
@@ -3533,11 +4416,11 @@ ary_reject(VALUE orig, VALUE result)
long i;
for (i = 0; i < RARRAY_LEN(orig); i++) {
- VALUE v = RARRAY_AREF(orig, i);
+ VALUE v = RARRAY_AREF(orig, i);
if (!RTEST(rb_yield(v))) {
- rb_ary_push(result, v);
- }
+ rb_ary_push(result, v);
+ }
}
return result;
}
@@ -3550,12 +4433,12 @@ reject_bang_i(VALUE a)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); arg->len[0] = ++i1) {
- VALUE v = RARRAY_AREF(ary, i1);
- if (RTEST(rb_yield(v))) continue;
- if (i1 != i2) {
- rb_ary_store(ary, i2, v);
- }
- arg->len[1] = ++i2;
+ VALUE v = RARRAY_AREF(ary, i1);
+ if (RTEST(rb_yield(v))) continue;
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, v);
+ }
+ arg->len[1] = ++i2;
}
return (i1 == i2) ? Qnil : ary;
}
@@ -3572,17 +4455,23 @@ ary_reject_bang(VALUE ary)
/*
* call-seq:
- * ary.reject! {|item| block} -> ary or nil
- * ary.reject! -> Enumerator
+ * array.reject! {|element| ... } -> self or nil
+ * array.reject! -> new_enumerator
+ *
+ * Removes each element for which the block returns a truthy value.
+ *
+ * Returns +self+ if any elements removed:
+ *
+ * a = [:foo, 'bar', 2, 'bat']
+ * a.reject! {|element| element.to_s.start_with?('b') } # => [:foo, 2]
*
- * Deletes every element of +self+ for which the block evaluates to +true+,
- * if no changes were made returns +nil+.
+ * Returns +nil+ if no elements removed.
*
- * The array may not be changed instantly every time the block is called.
+ * Returns a new \Enumerator if no block given:
*
- * See also Enumerable#reject and Array#delete_if.
+ * a = [:foo, 'bar', 2]
+ * a.reject! # => #<Enumerator: [:foo, "bar", 2]:reject!>
*
- * If no block is given, an Enumerator is returned instead.
*/
static VALUE
@@ -3595,15 +4484,21 @@ rb_ary_reject_bang(VALUE ary)
/*
* call-seq:
- * ary.reject {|item| block } -> new_ary
- * ary.reject -> Enumerator
+ * array.reject {|element| ... } -> new_array
+ * array.reject -> new_enumerator
*
- * Returns a new array containing the items in +self+ for which the given
- * block is not +true+. The ordering of non-rejected elements is maintained.
+ * Returns a new \Array whose elements are all those from +self+
+ * for which the block returns +false+ or +nil+:
*
- * See also Array#delete_if
+ * a = [:foo, 'bar', 2, 'bat']
+ * a1 = a.reject {|element| element.to_s.start_with?('b') }
+ * a1 # => [:foo, 2]
+ *
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.reject # => #<Enumerator: [:foo, "bar", 2]:reject>
*
- * If no block is given, an Enumerator is returned instead.
*/
static VALUE
@@ -3619,21 +4514,21 @@ rb_ary_reject(VALUE ary)
/*
* call-seq:
- * ary.delete_if {|item| block} -> ary
- * ary.delete_if -> Enumerator
+ * array.delete_if {|element| ... } -> self
+ * array.delete_if -> Enumerator
*
- * Deletes every element of +self+ for which block evaluates to +true+.
+ * Removes each element in +self+ for which the block returns a truthy value;
+ * returns +self+:
*
- * The array is changed instantly every time the block is called, not after
- * the iteration is over.
+ * a = [:foo, 'bar', 2, 'bat']
+ * a.delete_if {|element| element.to_s.start_with?('b') } # => [:foo, 2]
*
- * See also Array#reject!
+ * Returns a new \Enumerator if no block given:
*
- * If no block is given, an Enumerator is returned instead.
+ * a = [:foo, 'bar', 2]
+ * a.delete_if # => #<Enumerator: [:foo, "bar", 2]:delete_if>
*
- * scores = [ 97, 42, 75 ]
- * scores.delete_if {|score| score < 80 } #=> [97]
- */
+3 */
static VALUE
rb_ary_delete_if(VALUE ary)
@@ -3648,10 +4543,9 @@ static VALUE
take_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, cbarg))
{
VALUE *args = (VALUE *)cbarg;
- if (args[1] == 0) rb_iter_break();
- else args[1]--;
if (argc > 1) val = rb_ary_new4(argc, argv);
rb_ary_push(args[0], val);
+ if (--args[1] == 0) rb_iter_break();
return Qnil;
}
@@ -3661,38 +4555,71 @@ take_items(VALUE obj, long n)
VALUE result = rb_check_array_type(obj);
VALUE args[2];
+ if (n == 0) return result;
if (!NIL_P(result)) return rb_ary_subseq(result, 0, n);
result = rb_ary_new2(n);
args[0] = result; args[1] = (VALUE)n;
- if (rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args) == Qundef)
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
- rb_obj_class(obj));
+ if (UNDEF_P(rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args)))
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
+ rb_obj_class(obj));
return result;
}
/*
* call-seq:
- * ary.zip(arg, ...) -> new_ary
- * ary.zip(arg, ...) {|arr| block} -> nil
+ * array.zip(*other_arrays) -> new_array
+ * array.zip(*other_arrays) {|other_array| ... } -> nil
+ *
+ * When no block given, returns a new \Array +new_array+ of size <tt>self.size</tt>
+ * whose elements are Arrays.
+ *
+ * Each nested array <tt>new_array[n]</tt> is of size <tt>other_arrays.size+1</tt>,
+ * and contains:
+ *
+ * - The _nth_ element of +self+.
+ * - The _nth_ element of each of the +other_arrays+.
+ *
+ * If all +other_arrays+ and +self+ are the same size:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3]
+ * c = [:c0, :c1, :c2, :c3]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]]
+ *
+ * If any array in +other_arrays+ is smaller than +self+,
+ * fills to <tt>self.size</tt> with +nil+:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2]
+ * c = [:c0, :c1]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, nil], [:a3, nil, nil]]
*
- * Converts any arguments to arrays, then merges elements of +self+ with
- * corresponding elements from each argument.
+ * If any array in +other_arrays+ is larger than +self+,
+ * its trailing elements are ignored:
*
- * This generates a sequence of <code>ary.size</code> _n_-element arrays,
- * where _n_ is one more than the count of arguments.
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3, :b4]
+ * c = [:c0, :c1, :c2, :c3, :c4, :c5]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]]
*
- * If the size of any argument is less than the size of the initial array,
- * +nil+ values are supplied.
+ * When a block is given, calls the block with each of the sub-arrays (formed as above); returns +nil+:
*
- * If a block is given, it is invoked for each output +array+, otherwise an
- * array of arrays is returned.
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3]
+ * c = [:c0, :c1, :c2, :c3]
+ * a.zip(b, c) {|sub_array| p sub_array} # => nil
+ *
+ * Output:
+ *
+ * [:a0, :b0, :c0]
+ * [:a1, :b1, :c1]
+ * [:a2, :b2, :c2]
+ * [:a3, :b3, :c3]
*
- * a = [ 4, 5, 6 ]
- * b = [ 7, 8, 9 ]
- * [1, 2, 3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
- * [1, 2].zip(a, b) #=> [[1, 4, 7], [2, 5, 8]]
- * a.zip([1, 2], [8]) #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]
*/
static VALUE
@@ -3703,51 +4630,51 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary)
VALUE result = Qnil;
for (i=0; i<argc; i++) {
- argv[i] = take_items(argv[i], len);
+ argv[i] = take_items(argv[i], len);
}
if (rb_block_given_p()) {
- int arity = rb_block_arity();
-
- if (arity > 1) {
- VALUE work, *tmp;
-
- tmp = ALLOCV_N(VALUE, work, argc+1);
-
- for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp[0] = RARRAY_AREF(ary, i);
- for (j=0; j<argc; j++) {
- tmp[j+1] = rb_ary_elt(argv[j], i);
- }
- rb_yield_values2(argc+1, tmp);
- }
-
- if (work) ALLOCV_END(work);
- }
- else {
- for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE tmp = rb_ary_new2(argc+1);
-
- rb_ary_push(tmp, RARRAY_AREF(ary, i));
- for (j=0; j<argc; j++) {
- rb_ary_push(tmp, rb_ary_elt(argv[j], i));
- }
- rb_yield(tmp);
- }
- }
+ int arity = rb_block_arity();
+
+ if (arity > 1) {
+ VALUE work, *tmp;
+
+ tmp = ALLOCV_N(VALUE, work, argc+1);
+
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ tmp[0] = RARRAY_AREF(ary, i);
+ for (j=0; j<argc; j++) {
+ tmp[j+1] = rb_ary_elt(argv[j], i);
+ }
+ rb_yield_values2(argc+1, tmp);
+ }
+
+ if (work) ALLOCV_END(work);
+ }
+ else {
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ VALUE tmp = rb_ary_new2(argc+1);
+
+ rb_ary_push(tmp, RARRAY_AREF(ary, i));
+ for (j=0; j<argc; j++) {
+ rb_ary_push(tmp, rb_ary_elt(argv[j], i));
+ }
+ rb_yield(tmp);
+ }
+ }
}
else {
- result = rb_ary_new_capa(len);
+ result = rb_ary_new_capa(len);
- for (i=0; i<len; i++) {
- VALUE tmp = rb_ary_new_capa(argc+1);
+ for (i=0; i<len; i++) {
+ VALUE tmp = rb_ary_new_capa(argc+1);
- rb_ary_push(tmp, RARRAY_AREF(ary, i));
- for (j=0; j<argc; j++) {
- rb_ary_push(tmp, rb_ary_elt(argv[j], i));
- }
- rb_ary_push(result, tmp);
- }
+ rb_ary_push(tmp, RARRAY_AREF(ary, i));
+ for (j=0; j<argc; j++) {
+ rb_ary_push(tmp, rb_ary_elt(argv[j], i));
+ }
+ rb_ary_push(result, tmp);
+ }
}
return result;
@@ -3755,15 +4682,14 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.transpose -> new_ary
+ * array.transpose -> new_array
*
- * Assumes that +self+ is an array of arrays and transposes the rows and
- * columns.
+ * Transposes the rows and columns in an \Array of Arrays;
+ * the nested Arrays must all be the same size:
*
- * a = [[1,2], [3,4], [5,6]]
- * a.transpose #=> [[1, 3, 5], [2, 4, 6]]
+ * a = [[:a0, :a1], [:b0, :b1], [:c0, :c1]]
+ * a.transpose # => [[:a0, :b0, :c0], [:a1, :b1, :c1]]
*
- * If the length of the subarrays don't match, an IndexError is raised.
*/
static VALUE
@@ -3775,36 +4701,34 @@ rb_ary_transpose(VALUE ary)
alen = RARRAY_LEN(ary);
if (alen == 0) return rb_ary_dup(ary);
for (i=0; i<alen; i++) {
- tmp = to_ary(rb_ary_elt(ary, i));
- if (elen < 0) { /* first element */
- elen = RARRAY_LEN(tmp);
- result = rb_ary_new2(elen);
- for (j=0; j<elen; j++) {
- rb_ary_store(result, j, rb_ary_new2(alen));
- }
- }
- else if (elen != RARRAY_LEN(tmp)) {
- rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
- RARRAY_LEN(tmp), elen);
- }
- for (j=0; j<elen; j++) {
- rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
- }
+ tmp = to_ary(rb_ary_elt(ary, i));
+ if (elen < 0) { /* first element */
+ elen = RARRAY_LEN(tmp);
+ result = rb_ary_new2(elen);
+ for (j=0; j<elen; j++) {
+ rb_ary_store(result, j, rb_ary_new2(alen));
+ }
+ }
+ else if (elen != RARRAY_LEN(tmp)) {
+ rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
+ RARRAY_LEN(tmp), elen);
+ }
+ for (j=0; j<elen; j++) {
+ rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
+ }
}
return result;
}
/*
* call-seq:
- * ary.replace(other_ary) -> ary
- * ary.initialize_copy(other_ary) -> ary
+ * array.replace(other_array) -> self
*
- * Replaces the contents of +self+ with the contents of +other_ary+,
- * truncating or expanding if necessary.
+ * Replaces the content of +self+ with the content of +other_array+; returns +self+:
+ *
+ * a = [:foo, 'bar', 2]
+ * a.replace(['foo', :bar, 3]) # => ["foo", :bar, 3]
*
- * a = [ "a", "b", "c", "d", "e" ]
- * a.replace([ "x", "y", "z" ]) #=> ["x", "y", "z"]
- * a #=> ["x", "y", "z"]
*/
VALUE
@@ -3814,31 +4738,35 @@ rb_ary_replace(VALUE copy, VALUE orig)
orig = to_ary(orig);
if (copy == orig) return copy;
- if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) {
- VALUE shared_root = 0;
+ rb_ary_reset(copy);
- if (ARY_OWNS_HEAP_P(copy)) {
- ary_heap_free(copy);
- }
- else if (ARY_SHARED_P(copy)) {
- shared_root = ARY_SHARED_ROOT(copy);
- FL_UNSET_SHARED(copy);
- }
- FL_SET_EMBED(copy);
+ /* orig has enough space to embed the contents of orig. */
+ if (RARRAY_LEN(orig) <= ary_embed_capa(copy)) {
+ assert(ARY_EMBED_P(copy));
ary_memcpy(copy, 0, RARRAY_LEN(orig), RARRAY_CONST_PTR_TRANSIENT(orig));
- if (shared_root) {
- rb_ary_decrement_share(shared_root);
- }
- ARY_SET_LEN(copy, RARRAY_LEN(orig));
+ ARY_SET_EMBED_LEN(copy, RARRAY_LEN(orig));
+ }
+#if USE_RVARGC
+ /* orig is embedded but copy does not have enough space to embed the
+ * contents of orig. */
+ else if (ARY_EMBED_P(orig)) {
+ long len = ARY_EMBED_LEN(orig);
+ VALUE *ptr = ary_heap_alloc(copy, len);
+
+ FL_UNSET_EMBED(copy);
+ ARY_SET_PTR(copy, ptr);
+ ARY_SET_LEN(copy, len);
+ ARY_SET_CAPA(copy, len);
+
+ // No allocation and exception expected that could leave `copy` in a
+ // bad state from the edits above.
+ ary_memcpy(copy, 0, len, RARRAY_CONST_PTR_TRANSIENT(orig));
}
+#endif
+ /* Otherwise, orig is on heap and copy does not have enough space to embed
+ * the contents of orig. */
else {
VALUE shared_root = ary_make_shared(orig);
- if (ARY_OWNS_HEAP_P(copy)) {
- ary_heap_free(copy);
- }
- else {
- rb_ary_unshare_safe(copy);
- }
FL_UNSET_EMBED(copy);
ARY_SET_PTR(copy, ARY_HEAP_PTR(orig));
ARY_SET_LEN(copy, ARY_HEAP_LEN(orig));
@@ -3850,12 +4778,13 @@ rb_ary_replace(VALUE copy, VALUE orig)
/*
* call-seq:
- * ary.clear -> ary
+ * array.clear -> self
+ *
+ * Removes all elements from +self+:
*
- * Removes all elements from +self+.
+ * a = [:foo, 'bar', 2]
+ * a.clear # => []
*
- * a = [ "a", "b", "c", "d", "e" ]
- * a.clear #=> [ ]
*/
VALUE
@@ -3863,11 +4792,11 @@ rb_ary_clear(VALUE ary)
{
rb_ary_modify_check(ary);
if (ARY_SHARED_P(ary)) {
- if (!ARY_EMBED_P(ary)) {
- rb_ary_unshare(ary);
- FL_SET_EMBED(ary);
+ if (!ARY_EMBED_P(ary)) {
+ rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
ARY_SET_EMBED_LEN(ary, 0);
- }
+ }
}
else {
ARY_SET_LEN(ary, 0);
@@ -3881,32 +4810,198 @@ rb_ary_clear(VALUE ary)
/*
* call-seq:
- * ary.fill(obj) -> ary
- * ary.fill(obj, start [, length]) -> ary
- * ary.fill(obj, range) -> ary
- * ary.fill {|index| block} -> ary
- * ary.fill(start [, length]) {|index| block} -> ary
- * ary.fill(range) {|index| block} -> ary
+ * array.fill(obj) -> self
+ * array.fill(obj, start) -> self
+ * array.fill(obj, start, length) -> self
+ * array.fill(obj, range) -> self
+ * array.fill {|index| ... } -> self
+ * array.fill(start) {|index| ... } -> self
+ * array.fill(start, length) {|index| ... } -> self
+ * array.fill(range) {|index| ... } -> self
+ *
+ * Replaces specified elements in +self+ with specified objects; returns +self+.
+ *
+ * With argument +obj+ and no block given, replaces all elements with that one object:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a # => ["a", "b", "c", "d"]
+ * a.fill(:X) # => [:X, :X, :X, :X]
+ *
+ * With arguments +obj+ and \Integer +start+, and no block given,
+ * replaces elements based on the given start.
+ *
+ * If +start+ is in range (<tt>0 <= start < array.size</tt>),
+ * replaces all elements from offset +start+ through the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 2) # => ["a", "b", :X, :X]
+ *
+ * If +start+ is too large (<tt>start >= array.size</tt>), does nothing:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 4) # => ["a", "b", "c", "d"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 5) # => ["a", "b", "c", "d"]
+ *
+ * If +start+ is negative, counts from the end (starting index is <tt>start + array.size</tt>):
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, -2) # => ["a", "b", :X, :X]
+ *
+ * If +start+ is too small (less than and far from zero), replaces all elements:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, -6) # => [:X, :X, :X, :X]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, -50) # => [:X, :X, :X, :X]
+ *
+ * With arguments +obj+, \Integer +start+, and \Integer +length+, and no block given,
+ * replaces elements based on the given +start+ and +length+.
+ *
+ * If +start+ is in range, replaces +length+ elements beginning at offset +start+:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 1, 1) # => ["a", :X, "c", "d"]
+ *
+ * If +start+ is negative, counts from the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, -2, 1) # => ["a", "b", :X, "d"]
+ *
+ * If +start+ is large (<tt>start >= array.size</tt>), extends +self+ with +nil+:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 5, 0) # => ["a", "b", "c", "d", nil]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 5, 2) # => ["a", "b", "c", "d", nil, :X, :X]
+ *
+ * If +length+ is zero or negative, replaces no elements:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, 1, 0) # => ["a", "b", "c", "d"]
+ * a.fill(:X, 1, -1) # => ["a", "b", "c", "d"]
+ *
+ * With arguments +obj+ and \Range +range+, and no block given,
+ * replaces elements based on the given range.
+ *
+ * If the range is positive and ascending (<tt>0 < range.begin <= range.end</tt>),
+ * replaces elements from <tt>range.begin</tt> to <tt>range.end</tt>:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (1..1)) # => ["a", :X, "c", "d"]
+ *
+ * If <tt>range.first</tt> is negative, replaces no elements:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (-1..1)) # => ["a", "b", "c", "d"]
+ *
+ * If <tt>range.last</tt> is negative, counts from the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (0..-2)) # => [:X, :X, :X, "d"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (1..-2)) # => ["a", :X, :X, "d"]
+ *
+ * If <tt>range.last</tt> and <tt>range.last</tt> are both negative,
+ * both count from the end of the array:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (-1..-1)) # => ["a", "b", "c", :X]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(:X, (-2..-2)) # => ["a", "b", :X, "d"]
+ *
+ * With no arguments and a block given, calls the block with each index;
+ * replaces the corresponding element with the block's return value:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"]
+ *
+ * With argument +start+ and a block given, calls the block with each index
+ * from offset +start+ to the end; replaces the corresponding element
+ * with the block's return value.
+ *
+ * If start is in range (<tt>0 <= start < array.size</tt>),
+ * replaces from offset +start+ to the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(1) { |index| "new_#{index}" } # => ["a", "new_1", "new_2", "new_3"]
+ *
+ * If +start+ is too large(<tt>start >= array.size</tt>), does nothing:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(4) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(4) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"]
+ *
+ * If +start+ is negative, counts from the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-2) { |index| "new_#{index}" } # => ["a", "b", "new_2", "new_3"]
+ *
+ * If start is too small (<tt>start <= -array.size</tt>, replaces all elements:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-6) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-50) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "new_3"]
+ *
+ * With arguments +start+ and +length+, and a block given,
+ * calls the block for each index specified by start length;
+ * replaces the corresponding element with the block's return value.
+ *
+ * If +start+ is in range, replaces +length+ elements beginning at offset +start+:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(1, 1) { |index| "new_#{index}" } # => ["a", "new_1", "c", "d"]
*
- * The first three forms set the selected elements of +self+ (which
- * may be the entire array) to +obj+.
+ * If start is negative, counts from the end:
*
- * A +start+ of +nil+ is equivalent to zero.
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-2, 1) { |index| "new_#{index}" } # => ["a", "b", "new_2", "d"]
*
- * A +length+ of +nil+ is equivalent to the length of the array.
+ * If +start+ is large (<tt>start >= array.size</tt>), extends +self+ with +nil+:
*
- * The last three forms fill the array with the value of the given block,
- * which is passed the absolute index of each element to be filled.
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(5, 0) { |index| "new_#{index}" } # => ["a", "b", "c", "d", nil]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(5, 2) { |index| "new_#{index}" } # => ["a", "b", "c", "d", nil, "new_5", "new_6"]
*
- * Negative values of +start+ count from the end of the array, where +-1+ is
- * the last element.
+ * If +length+ is zero or less, replaces no elements:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(1, 0) { |index| "new_#{index}" } # => ["a", "b", "c", "d"]
+ * a.fill(1, -1) { |index| "new_#{index}" } # => ["a", "b", "c", "d"]
+ *
+ * With arguments +obj+ and +range+, and a block given,
+ * calls the block with each index in the given range;
+ * replaces the corresponding element with the block's return value.
+ *
+ * If the range is positive and ascending (<tt>range 0 < range.begin <= range.end</tt>,
+ * replaces elements from <tt>range.begin</tt> to <tt>range.end</tt>:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(1..1) { |index| "new_#{index}" } # => ["a", "new_1", "c", "d"]
+ *
+ * If +range.first+ is negative, does nothing:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-1..1) { |index| fail 'Cannot happen' } # => ["a", "b", "c", "d"]
+ *
+ * If <tt>range.last</tt> is negative, counts from the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(0..-2) { |index| "new_#{index}" } # => ["new_0", "new_1", "new_2", "d"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(1..-2) { |index| "new_#{index}" } # => ["a", "new_1", "new_2", "d"]
+ *
+ * If <tt>range.first</tt> and <tt>range.last</tt> are both negative,
+ * both count from the end:
+ *
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-1..-1) { |index| "new_#{index}" } # => ["a", "b", "c", "new_3"]
+ * a = ['a', 'b', 'c', 'd']
+ * a.fill(-2..-2) { |index| "new_#{index}" } # => ["a", "b", "new_2", "d"]
*
- * a = [ "a", "b", "c", "d" ]
- * a.fill("x") #=> ["x", "x", "x", "x"]
- * a.fill("z", 2, 2) #=> ["x", "x", "z", "z"]
- * a.fill("y", 0..1) #=> ["y", "y", "z", "z"]
- * a.fill {|i| i*i} #=> [0, 1, 4, 9]
- * a.fill(-2) {|i| i*i*i} #=> [0, 1, 8, 27]
*/
static VALUE
@@ -3916,84 +5011,74 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
long beg = 0, end = 0, len = 0;
if (rb_block_given_p()) {
- rb_scan_args(argc, argv, "02", &arg1, &arg2);
- argc += 1; /* hackish */
+ rb_scan_args(argc, argv, "02", &arg1, &arg2);
+ argc += 1; /* hackish */
}
else {
- rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
+ rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
}
switch (argc) {
case 1:
- beg = 0;
- len = RARRAY_LEN(ary);
- break;
+ beg = 0;
+ len = RARRAY_LEN(ary);
+ break;
case 2:
- if (rb_range_beg_len(arg1, &beg, &len, RARRAY_LEN(ary), 1)) {
- break;
- }
- /* fall through */
+ if (rb_range_beg_len(arg1, &beg, &len, RARRAY_LEN(ary), 1)) {
+ break;
+ }
+ /* fall through */
case 3:
- beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
- if (beg < 0) {
- beg = RARRAY_LEN(ary) + beg;
- if (beg < 0) beg = 0;
- }
- len = NIL_P(arg2) ? RARRAY_LEN(ary) - beg : NUM2LONG(arg2);
- break;
+ beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
+ if (beg < 0) {
+ beg = RARRAY_LEN(ary) + beg;
+ if (beg < 0) beg = 0;
+ }
+ len = NIL_P(arg2) ? RARRAY_LEN(ary) - beg : NUM2LONG(arg2);
+ break;
}
rb_ary_modify(ary);
if (len < 0) {
return ary;
}
if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) {
- rb_raise(rb_eArgError, "argument too big");
+ rb_raise(rb_eArgError, "argument too big");
}
end = beg + len;
if (RARRAY_LEN(ary) < end) {
- if (end >= ARY_CAPA(ary)) {
- ary_resize_capa(ary, end);
- }
- ary_mem_clear(ary, RARRAY_LEN(ary), end - RARRAY_LEN(ary));
- ARY_SET_LEN(ary, end);
+ if (end >= ARY_CAPA(ary)) {
+ ary_resize_capa(ary, end);
+ }
+ ary_mem_clear(ary, RARRAY_LEN(ary), end - RARRAY_LEN(ary));
+ ARY_SET_LEN(ary, end);
}
- if (item == Qundef) {
- VALUE v;
- long i;
+ if (UNDEF_P(item)) {
+ VALUE v;
+ long i;
- for (i=beg; i<end; i++) {
- v = rb_yield(LONG2NUM(i));
- if (i>=RARRAY_LEN(ary)) break;
- ARY_SET(ary, i, v);
- }
+ for (i=beg; i<end; i++) {
+ v = rb_yield(LONG2NUM(i));
+ if (i>=RARRAY_LEN(ary)) break;
+ ARY_SET(ary, i, v);
+ }
}
else {
- ary_memfill(ary, beg, len, item);
+ ary_memfill(ary, beg, len, item);
}
return ary;
}
/*
* call-seq:
- * ary + other_ary -> new_ary
- *
- * Concatenation --- Returns a new array built by concatenating the
- * two arrays together to produce a third array.
+ * array + other_array -> new_array
*
- * [ 1, 2, 3 ] + [ 4, 5 ] #=> [ 1, 2, 3, 4, 5 ]
- * a = [ "a", "b", "c" ]
- * c = a + [ "d", "e", "f" ]
- * c #=> [ "a", "b", "c", "d", "e", "f" ]
- * a #=> [ "a", "b", "c" ]
+ * Returns a new \Array containing all elements of +array+
+ * followed by all elements of +other_array+:
*
- * Note that
- * x += y
- * is the same as
- * x = x + y
- * This means that it produces a new array. As a consequence,
- * repeated use of <code>+=</code> on arrays can be quite inefficient.
+ * a = [0, 1] + [2, 3]
+ * a # => [0, 1, 2, 3]
*
- * See also Array#concat.
+ * Related: #concat.
*/
VALUE
@@ -4021,27 +5106,18 @@ ary_append(VALUE x, VALUE y)
if (n > 0) {
rb_ary_splice(x, RARRAY_LEN(x), 0, RARRAY_CONST_PTR_TRANSIENT(y), n);
}
+ RB_GC_GUARD(y);
return x;
}
/*
* call-seq:
- * ary.concat(other_ary1, other_ary2, ...) -> ary
+ * array.concat(*other_arrays) -> self
*
- * Appends the elements of <code>other_ary</code>s to +self+.
+ * Adds to +array+ all elements from each \Array in +other_arrays+; returns +self+:
*
- * [ "a", "b" ].concat( ["c", "d"]) #=> [ "a", "b", "c", "d" ]
- * [ "a" ].concat( ["b"], ["c", "d"]) #=> [ "a", "b", "c", "d" ]
- * [ "a" ].concat #=> [ "a" ]
- *
- * a = [ 1, 2, 3 ]
- * a.concat( [ 4, 5 ])
- * a #=> [ 1, 2, 3, 4, 5 ]
- *
- * a = [ 1, 2 ]
- * a.concat(a, a) #=> [1, 2, 1, 2, 1, 2]
- *
- * See also Array#+.
+ * a = [0, 1]
+ * a.concat([2, 3], [4, 5]) # => [0, 1, 2, 3, 4, 5]
*/
static VALUE
@@ -4050,15 +5126,15 @@ rb_ary_concat_multi(int argc, VALUE *argv, VALUE ary)
rb_ary_modify_check(ary);
if (argc == 1) {
- rb_ary_concat(ary, argv[0]);
+ rb_ary_concat(ary, argv[0]);
}
else if (argc > 1) {
- int i;
- VALUE args = rb_ary_tmp_new(argc);
- for (i = 0; i < argc; i++) {
- rb_ary_concat(args, argv[i]);
- }
- ary_append(ary, args);
+ int i;
+ VALUE args = rb_ary_hidden_new(argc);
+ for (i = 0; i < argc; i++) {
+ rb_ary_concat(args, argv[i]);
+ }
+ ary_append(ary, args);
}
ary_verify(ary);
@@ -4073,18 +5149,19 @@ rb_ary_concat(VALUE x, VALUE y)
/*
* call-seq:
- * ary * int -> new_ary
- * ary * str -> new_string
+ * array * n -> new_array
+ * array * string_separator -> new_string
*
- * Repetition --- With a String argument, equivalent to
- * <code>ary.join(str)</code>.
+ * When non-negative argument \Integer +n+ is given,
+ * returns a new \Array built by concatenating the +n+ copies of +self+:
*
- * Otherwise, returns a new array built by concatenating the +int+ copies of
- * +self+.
+ * a = ['x', 'y']
+ * a * 3 # => ["x", "y", "x", "y", "x", "y"]
*
+ * When \String argument +string_separator+ is given,
+ * equivalent to <tt>array.join(string_separator)</tt>:
*
- * [ 1, 2, 3 ] * 3 #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ]
- * [ 1, 2, 3 ] * "," #=> "1,2,3"
+ * [0, [0, 1], {foo: 0}] * ', ' # => "0, 0, 1, {:foo=>0}"
*
*/
@@ -4097,30 +5174,30 @@ rb_ary_times(VALUE ary, VALUE times)
tmp = rb_check_string_type(times);
if (!NIL_P(tmp)) {
- return rb_ary_join(ary, tmp);
+ return rb_ary_join(ary, tmp);
}
len = NUM2LONG(times);
if (len == 0) {
- ary2 = ary_new(rb_obj_class(ary), 0);
- goto out;
+ ary2 = ary_new(rb_cArray, 0);
+ goto out;
}
if (len < 0) {
- rb_raise(rb_eArgError, "negative argument");
+ rb_raise(rb_eArgError, "negative argument");
}
if (ARY_MAX_SIZE/len < RARRAY_LEN(ary)) {
- rb_raise(rb_eArgError, "argument too big");
+ rb_raise(rb_eArgError, "argument too big");
}
len *= RARRAY_LEN(ary);
- ary2 = ary_new(rb_obj_class(ary), len);
+ ary2 = ary_new(rb_cArray, len);
ARY_SET_LEN(ary2, len);
ptr = RARRAY_CONST_PTR_TRANSIENT(ary);
t = RARRAY_LEN(ary);
if (0 < t) {
- ary_memcpy(ary2, 0, t, ptr);
- while (t <= len/2) {
+ ary_memcpy(ary2, 0, t, ptr);
+ while (t <= len/2) {
ary_memcpy(ary2, t, t, RARRAY_CONST_PTR_TRANSIENT(ary2));
t *= 2;
}
@@ -4134,22 +5211,17 @@ rb_ary_times(VALUE ary, VALUE times)
/*
* call-seq:
- * ary.assoc(obj) -> element_ary or nil
+ * array.assoc(obj) -> found_array or nil
*
- * Searches through an array whose elements are also arrays comparing +obj+
- * with the first element of each contained array using <code>obj.==</code>.
+ * Returns the first element in +self+ that is an \Array
+ * whose first element <tt>==</tt> +obj+:
*
- * Returns the first contained array that matches (that is, the first
- * associated array), or +nil+ if no match is found.
+ * a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]]
+ * a.assoc(4) # => [4, 5, 6]
*
- * See also Array#rassoc
+ * Returns +nil+ if no such element is found.
*
- * s1 = [ "colors", "red", "blue", "green" ]
- * s2 = [ "letters", "a", "b", "c" ]
- * s3 = "foo"
- * a = [ s1, s2, s3 ]
- * a.assoc("letters") #=> [ "letters", "a", "b", "c" ]
- * a.assoc("foo") #=> nil
+ * Related: #rassoc.
*/
VALUE
@@ -4159,30 +5231,27 @@ rb_ary_assoc(VALUE ary, VALUE key)
VALUE v;
for (i = 0; i < RARRAY_LEN(ary); ++i) {
- v = rb_check_array_type(RARRAY_AREF(ary, i));
- if (!NIL_P(v) && RARRAY_LEN(v) > 0 &&
- rb_equal(RARRAY_AREF(v, 0), key))
- return v;
+ v = rb_check_array_type(RARRAY_AREF(ary, i));
+ if (!NIL_P(v) && RARRAY_LEN(v) > 0 &&
+ rb_equal(RARRAY_AREF(v, 0), key))
+ return v;
}
return Qnil;
}
/*
* call-seq:
- * ary.rassoc(obj) -> element_ary or nil
- *
- * Searches through the array whose elements are also arrays.
+ * array.rassoc(obj) -> found_array or nil
*
- * Compares +obj+ with the second element of each contained array using
- * <code>obj.==</code>.
+ * Returns the first element in +self+ that is an \Array
+ * whose second element <tt>==</tt> +obj+:
*
- * Returns the first contained array that matches +obj+.
+ * a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]]
+ * a.rassoc(4) # => [2, 4]
*
- * See also Array#assoc.
+ * Returns +nil+ if no such element is found.
*
- * a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
- * a.rassoc("two") #=> [2, "two"]
- * a.rassoc("four") #=> nil
+ * Related: #assoc.
*/
VALUE
@@ -4192,11 +5261,11 @@ rb_ary_rassoc(VALUE ary, VALUE value)
VALUE v;
for (i = 0; i < RARRAY_LEN(ary); ++i) {
- v = RARRAY_AREF(ary, i);
- if (RB_TYPE_P(v, T_ARRAY) &&
- RARRAY_LEN(v) > 1 &&
- rb_equal(RARRAY_AREF(v, 1), value))
- return v;
+ v = RARRAY_AREF(ary, i);
+ if (RB_TYPE_P(v, T_ARRAY) &&
+ RARRAY_LEN(v) > 1 &&
+ rb_equal(RARRAY_AREF(v, 1), value))
+ return v;
}
return Qnil;
}
@@ -4215,38 +5284,42 @@ recursive_equal(VALUE ary1, VALUE ary2, int recur)
len1 = RARRAY_LEN(ary1);
for (i = 0; i < len1; i++) {
- if (*p1 != *p2) {
- if (rb_equal(*p1, *p2)) {
- len1 = RARRAY_LEN(ary1);
- if (len1 != RARRAY_LEN(ary2))
- return Qfalse;
- if (len1 < i)
- return Qtrue;
+ if (*p1 != *p2) {
+ if (rb_equal(*p1, *p2)) {
+ len1 = RARRAY_LEN(ary1);
+ if (len1 != RARRAY_LEN(ary2))
+ return Qfalse;
+ if (len1 < i)
+ return Qtrue;
p1 = RARRAY_CONST_PTR(ary1) + i;
p2 = RARRAY_CONST_PTR(ary2) + i;
- }
- else {
- return Qfalse;
- }
- }
- p1++;
- p2++;
+ }
+ else {
+ return Qfalse;
+ }
+ }
+ p1++;
+ p2++;
}
return Qtrue;
}
/*
* call-seq:
- * ary == other_ary -> bool
+ * array == other_array -> true or false
+ *
+ * Returns +true+ if both <tt>array.size == other_array.size</tt>
+ * and for each index +i+ in +array+, <tt>array[i] == other_array[i]</tt>:
*
- * Equality --- Two arrays are equal if they contain the same number of
- * elements and if each element is equal to (according to Object#==) the
- * corresponding element in +other_ary+.
+ * a0 = [:foo, 'bar', 2]
+ * a1 = [:foo, 'bar', 2.0]
+ * a1 == a0 # => true
+ * [] == [] # => true
*
- * [ "a", "c" ] == [ "a", "c", 7 ] #=> false
- * [ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true
- * [ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
+ * Otherwise, returns +false+.
*
+ * This method is different from method Array#eql?,
+ * which compares elements using <tt>Object#eql?</tt>.
*/
static VALUE
@@ -4254,10 +5327,10 @@ rb_ary_equal(VALUE ary1, VALUE ary2)
{
if (ary1 == ary2) return Qtrue;
if (!RB_TYPE_P(ary2, T_ARRAY)) {
- if (!rb_respond_to(ary2, idTo_ary)) {
- return Qfalse;
- }
- return rb_equal(ary2, ary1);
+ if (!rb_respond_to(ary2, idTo_ary)) {
+ return Qfalse;
+ }
+ return rb_equal(ary2, ary1);
}
if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse;
if (RARRAY_CONST_PTR_TRANSIENT(ary1) == RARRAY_CONST_PTR_TRANSIENT(ary2)) return Qtrue;
@@ -4271,18 +5344,27 @@ recursive_eql(VALUE ary1, VALUE ary2, int recur)
if (recur) return Qtrue; /* Subtle! */
for (i=0; i<RARRAY_LEN(ary1); i++) {
- if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
- return Qfalse;
+ if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
+ return Qfalse;
}
return Qtrue;
}
/*
* call-seq:
- * ary.eql?(other) -> true or false
+ * array.eql? other_array -> true or false
+ *
+ * Returns +true+ if +self+ and +other_array+ are the same size,
+ * and if, for each index +i+ in +self+, <tt>self[i].eql? other_array[i]</tt>:
+ *
+ * a0 = [:foo, 'bar', 2]
+ * a1 = [:foo, 'bar', 2]
+ * a1.eql?(a0) # => true
*
- * Returns +true+ if +self+ and +other+ are the same object,
- * or are both arrays with the same content (according to Object#eql?).
+ * Otherwise, returns +false+.
+ *
+ * This method is different from method Array#==,
+ * which compares using method <tt>Object#==</tt>.
*/
static VALUE
@@ -4297,14 +5379,15 @@ rb_ary_eql(VALUE ary1, VALUE ary2)
/*
* call-seq:
- * ary.hash -> integer
+ * array.hash -> integer
+ *
+ * Returns the integer hash value for +self+.
*
- * Compute a hash-code for this array.
+ * Two arrays with the same content will have the same hash code (and will compare using eql?):
*
- * Two arrays with the same content will have the same hash code (and will
- * compare using #eql?).
+ * [0, 1, 2].hash == [0, 1, 2].hash # => true
+ * [0, 1, 2].hash == [0, 1, 3].hash # => false
*
- * See also Object#hash.
*/
static VALUE
@@ -4317,8 +5400,8 @@ rb_ary_hash(VALUE ary)
h = rb_hash_start(RARRAY_LEN(ary));
h = rb_hash_uint(h, (st_index_t)rb_ary_hash);
for (i=0; i<RARRAY_LEN(ary); i++) {
- n = rb_hash(RARRAY_AREF(ary, i));
- h = rb_hash_uint(h, NUM2LONG(n));
+ n = rb_hash(RARRAY_AREF(ary, i));
+ h = rb_hash_uint(h, NUM2LONG(n));
}
h = rb_hash_end(h);
return ST2FIX(h);
@@ -4326,14 +5409,13 @@ rb_ary_hash(VALUE ary)
/*
* call-seq:
- * ary.include?(object) -> true or false
+ * array.include?(obj) -> true or false
*
- * Returns +true+ if the given +object+ is present in +self+ (that is, if any
- * element <code>==</code> +object+), otherwise returns +false+.
+ * Returns +true+ if for some index +i+ in +self+, <tt>obj == self[i]</tt>;
+ * otherwise +false+:
*
- * a = [ "a", "b", "c" ]
- * a.include?("b") #=> true
- * a.include?("z") #=> false
+ * [0, 1, 2].include?(2) # => true
+ * [0, 1, 2].include?(3) # => false
*/
VALUE
@@ -4343,10 +5425,10 @@ rb_ary_includes(VALUE ary, VALUE item)
VALUE e;
for (i=0; i<RARRAY_LEN(ary); i++) {
- e = RARRAY_AREF(ary, i);
- if (rb_equal(e, item)) {
- return Qtrue;
- }
+ e = RARRAY_AREF(ary, i);
+ if (rb_equal(e, item)) {
+ return Qtrue;
+ }
}
return Qfalse;
}
@@ -4358,10 +5440,10 @@ rb_ary_includes_by_eql(VALUE ary, VALUE item)
VALUE e;
for (i=0; i<RARRAY_LEN(ary); i++) {
- e = RARRAY_AREF(ary, i);
- if (rb_eql(item, e)) {
- return Qtrue;
- }
+ e = RARRAY_AREF(ary, i);
+ if (rb_eql(item, e)) {
+ return Qtrue;
+ }
}
return Qfalse;
}
@@ -4374,45 +5456,46 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur)
if (recur) return Qundef; /* Subtle! */
len = RARRAY_LEN(ary1);
if (len > RARRAY_LEN(ary2)) {
- len = RARRAY_LEN(ary2);
+ len = RARRAY_LEN(ary2);
}
for (i=0; i<len; i++) {
- VALUE e1 = rb_ary_elt(ary1, i), e2 = rb_ary_elt(ary2, i);
- VALUE v = rb_funcallv(e1, id_cmp, 1, &e2);
- if (v != INT2FIX(0)) {
- return v;
- }
+ VALUE e1 = rb_ary_elt(ary1, i), e2 = rb_ary_elt(ary2, i);
+ VALUE v = rb_funcallv(e1, id_cmp, 1, &e2);
+ if (v != INT2FIX(0)) {
+ return v;
+ }
}
return Qundef;
}
/*
* call-seq:
- * ary <=> other_ary -> -1, 0, +1 or nil
+ * array <=> other_array -> -1, 0, or 1
+ *
+ * Returns -1, 0, or 1 as +self+ is less than, equal to, or greater than +other_array+.
+ * For each index +i+ in +self+, evaluates <tt>result = self[i] <=> other_array[i]</tt>.
+ *
+ * Returns -1 if any result is -1:
+ *
+ * [0, 1, 2] <=> [0, 1, 3] # => -1
*
- * Comparison --- Returns an integer (+-1+, +0+, or <code>+1</code>) if this
- * array is less than, equal to, or greater than +other_ary+.
+ * Returns 1 if any result is 1:
*
- * Each object in each array is compared (using the <=> operator).
+ * [0, 1, 2] <=> [0, 1, 1] # => 1
*
- * Arrays are compared in an "element-wise" manner; the first element of +ary+
- * is compared with the first one of +other_ary+ using the <=> operator, then
- * each of the second elements, etc...
- * As soon as the result of any such comparison is non zero (i.e. the two
- * corresponding elements are not equal), that result is returned for the
- * whole array comparison.
+ * When all results are zero:
*
- * If all the elements are equal, then the result is based on a comparison of
- * the array lengths. Thus, two arrays are "equal" according to Array#<=> if,
- * and only if, they have the same length and the value of each element is
- * equal to the value of the corresponding element in the other array.
+ * - Returns -1 if +array+ is smaller than +other_array+:
*
- * +nil+ is returned if the +other_ary+ is not an array or if the comparison
- * of two elements returned +nil+.
+ * [0, 1, 2] <=> [0, 1, 2, 3] # => -1
*
- * [ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1
- * [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1
- * [ 1, 2 ] <=> [ 1, :two ] #=> nil
+ * - Returns 1 if +array+ is larger than +other_array+:
+ *
+ * [0, 1, 2] <=> [0, 1] # => 1
+ *
+ * - Returns 0 if +array+ and +other_array+ are the same size:
+ *
+ * [0, 1, 2] <=> [0, 1, 2] # => 0
*
*/
@@ -4426,7 +5509,7 @@ rb_ary_cmp(VALUE ary1, VALUE ary2)
if (NIL_P(ary2)) return Qnil;
if (ary1 == ary2) return INT2FIX(0);
v = rb_exec_recursive_paired(recursive_cmp, ary1, ary2, ary2);
- if (v != Qundef) return v;
+ if (!UNDEF_P(v)) return v;
len = RARRAY_LEN(ary1) - RARRAY_LEN(ary2);
if (len == 0) return INT2FIX(0);
if (len > 0) return INT2FIX(1);
@@ -4439,8 +5522,8 @@ ary_add_hash(VALUE hash, VALUE ary)
long i;
for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE elt = RARRAY_AREF(ary, i);
- rb_hash_add_new_element(hash, elt, elt);
+ VALUE elt = RARRAY_AREF(ary, i);
+ rb_hash_add_new_element(hash, elt, elt);
}
return hash;
}
@@ -4468,8 +5551,8 @@ ary_add_hash_by(VALUE hash, VALUE ary)
long i;
for (i = 0; i < RARRAY_LEN(ary); ++i) {
- VALUE v = rb_ary_elt(ary, i), k = rb_yield(v);
- rb_hash_add_new_element(hash, k, v);
+ VALUE v = rb_ary_elt(ary, i), k = rb_yield(v);
+ rb_hash_add_new_element(hash, k, v);
}
return hash;
}
@@ -4487,35 +5570,28 @@ ary_recycle_hash(VALUE hash)
assert(RBASIC_CLASS(hash) == 0);
if (RHASH_ST_TABLE_P(hash)) {
st_table *tbl = RHASH_ST_TABLE(hash);
- st_free_table(tbl);
+ st_free_table(tbl);
RHASH_ST_CLEAR(hash);
}
}
/*
* call-seq:
- * ary - other_ary -> new_ary
- *
- * Array Difference
- *
- * Returns a new array that is a copy of the original array, removing all
- * occurrences of any item that also appear in +other_ary+. The order is
- * preserved from the original array.
- *
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * array - other_array -> new_array
*
- * [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ]
+ * Returns a new \Array containing only those elements from +array+
+ * that are not found in \Array +other_array+;
+ * items are compared using <tt>eql?</tt>;
+ * the order from +array+ is preserved:
*
- * Note that while 1 and 2 were only present once in the array argument, and
- * were present twice in the receiver array, all occurrences of each Integer are
- * removed in the returned array.
+ * [0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3]
+ * [0, 1, 2, 3] - [3, 0] # => [1, 2]
+ * [0, 1, 2] - [4] # => [0, 1, 2]
*
- * If you need set-like behavior, see the library class Set.
- *
- * See also Array#difference.
+ * Related: Array#difference.
*/
-static VALUE
+VALUE
rb_ary_diff(VALUE ary1, VALUE ary2)
{
VALUE ary3;
@@ -4523,21 +5599,22 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
long i;
ary2 = to_ary(ary2);
+ if (RARRAY_LEN(ary2) == 0) { return ary_make_shared_copy(ary1); }
ary3 = rb_ary_new();
if (RARRAY_LEN(ary1) <= SMALL_ARRAY_LEN || RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
- for (i=0; i<RARRAY_LEN(ary1); i++) {
- VALUE elt = rb_ary_elt(ary1, i);
- if (rb_ary_includes_by_eql(ary2, elt)) continue;
- rb_ary_push(ary3, elt);
- }
- return ary3;
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ VALUE elt = rb_ary_elt(ary1, i);
+ if (rb_ary_includes_by_eql(ary2, elt)) continue;
+ rb_ary_push(ary3, elt);
+ }
+ return ary3;
}
hash = ary_make_hash(ary2);
for (i=0; i<RARRAY_LEN(ary1); i++) {
if (rb_hash_stlike_lookup(hash, RARRAY_AREF(ary1, i), NULL)) continue;
- rb_ary_push(ary3, rb_ary_elt(ary1, i));
+ rb_ary_push(ary3, rb_ary_elt(ary1, i));
}
ary_recycle_hash(hash);
return ary3;
@@ -4545,31 +5622,19 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
/*
* call-seq:
- * ary.difference(other_ary1, other_ary2, ...) -> new_ary
- *
- * Array Difference
+ * array.difference(*other_arrays) -> new_array
*
- * Returns a new array that is a copy of the original array, removing all
- * occurrences of any item that also appear in +other_ary+. The order is
- * preserved from the original array.
+ * Returns a new \Array containing only those elements from +self+
+ * that are not found in any of the Arrays +other_arrays+;
+ * items are compared using <tt>eql?</tt>; order from +self+ is preserved:
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * [0, 1, 1, 2, 1, 1, 3, 1, 1].difference([1]) # => [0, 2, 3]
+ * [0, 1, 2, 3].difference([3, 0], [1, 3]) # => [2]
+ * [0, 1, 2].difference([4]) # => [0, 1, 2]
*
- * [ 1, 1, 2, 2, 3, 3, 4, 5 ].difference([ 1, 2, 4 ]) #=> [ 3, 3, 5 ]
+ * Returns a copy of +self+ if no arguments given.
*
- * Note that while 1 and 2 were only present once in the array argument, and
- * were present twice in the receiver array, all occurrences of each Integer are
- * removed in the returned array.
- *
- * Multiple array arguments can be supplied and all occurrences of any element
- * in those supplied arrays that match the receiver will be removed from the
- * returned array.
- *
- * [ 1, 'c', :s, 'yep' ].difference([ 1 ], [ 'a', 'c' ]) #=> [ :s, "yep" ]
- *
- * If you need set-like behavior, see the library class Set.
- *
- * See also Array#-.
+ * Related: Array#-.
*/
static VALUE
@@ -4611,17 +5676,19 @@ rb_ary_difference_multi(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary & other_ary -> new_ary
+ * array & other_array -> new_array
+ *
+ * Returns a new \Array containing each element found in both +array+ and \Array +other_array+;
+ * duplicates are omitted; items are compared using <tt>eql?</tt>:
*
- * Set Intersection --- Returns a new array containing unique elements common to the
- * two arrays. The order is preserved from the original array.
+ * [0, 1, 2, 3] & [1, 2] # => [1, 2]
+ * [0, 1, 0, 1] & [0, 1] # => [0, 1]
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * Preserves order from +array+:
*
- * [ 1, 1, 3, 5 ] & [ 3, 2, 1 ] #=> [ 1, 3 ]
- * [ 'a', 'b', 'b', 'z' ] & [ 'a', 'b', 'c' ] #=> [ 'a', 'b' ]
+ * [0, 1, 2] & [3, 2, 1, 0] # => [0, 1, 2]
*
- * See also Array#uniq.
+ * Related: Array#intersection.
*/
@@ -4637,23 +5704,23 @@ rb_ary_and(VALUE ary1, VALUE ary2)
if (RARRAY_LEN(ary1) == 0 || RARRAY_LEN(ary2) == 0) return ary3;
if (RARRAY_LEN(ary1) <= SMALL_ARRAY_LEN && RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
- for (i=0; i<RARRAY_LEN(ary1); i++) {
- v = RARRAY_AREF(ary1, i);
- if (!rb_ary_includes_by_eql(ary2, v)) continue;
- if (rb_ary_includes_by_eql(ary3, v)) continue;
- rb_ary_push(ary3, v);
- }
- return ary3;
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ v = RARRAY_AREF(ary1, i);
+ if (!rb_ary_includes_by_eql(ary2, v)) continue;
+ if (rb_ary_includes_by_eql(ary3, v)) continue;
+ rb_ary_push(ary3, v);
+ }
+ return ary3;
}
hash = ary_make_hash(ary2);
for (i=0; i<RARRAY_LEN(ary1); i++) {
- v = RARRAY_AREF(ary1, i);
- vv = (st_data_t)v;
+ v = RARRAY_AREF(ary1, i);
+ vv = (st_data_t)v;
if (rb_hash_stlike_delete(hash, &vv, 0)) {
- rb_ary_push(ary3, v);
- }
+ rb_ary_push(ary3, v);
+ }
}
ary_recycle_hash(hash);
@@ -4662,19 +5729,22 @@ rb_ary_and(VALUE ary1, VALUE ary2)
/*
* call-seq:
- * ary.intersection(other_ary1, other_ary2, ...) -> new_ary
+ * array.intersection(*other_arrays) -> new_array
+ *
+ * Returns a new \Array containing each element found both in +self+
+ * and in all of the given Arrays +other_arrays+;
+ * duplicates are omitted; items are compared using <tt>eql?</tt>:
*
- * Set Intersection --- Returns a new array containing unique elements common
- * to +self+ and <code>other_ary</code>s. Order is preserved from the original
- * array.
+ * [0, 1, 2, 3].intersection([0, 1, 2], [0, 1, 3]) # => [0, 1]
+ * [0, 0, 1, 1, 2, 3].intersection([0, 1, 2], [0, 1, 3]) # => [0, 1]
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * Preserves order from +self+:
*
- * [ 1, 1, 3, 5 ].intersection([ 3, 2, 1 ]) # => [ 1, 3 ]
- * [ "a", "b", "z" ].intersection([ "a", "b", "c" ], [ "b" ]) # => [ "b" ]
- * [ "a" ].intersection #=> [ "a" ]
+ * [0, 1, 2].intersection([2, 1, 0]) # => [0, 1, 2]
*
- * See also Array#&.
+ * Returns a copy of +self+ if no arguments given.
+ *
+ * Related: Array#&.
*/
static VALUE
@@ -4723,17 +5793,17 @@ rb_ary_union_hash(VALUE hash, VALUE ary2)
/*
* call-seq:
- * ary | other_ary -> new_ary
- *
- * Set Union --- Returns a new array by joining +ary+ with +other_ary+,
- * excluding any duplicates and preserving the order from the given arrays.
+ * array | other_array -> new_array
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * Returns the union of +array+ and \Array +other_array+;
+ * duplicates are removed; order is preserved;
+ * items are compared using <tt>eql?</tt>:
*
- * [ "a", "b", "c" ] | [ "c", "d", "a" ] #=> [ "a", "b", "c", "d" ]
- * [ "c", "d", "a" ] | [ "a", "b", "c" ] #=> [ "c", "d", "a", "b" ]
+ * [0, 1] | [2, 3] # => [0, 1, 2, 3]
+ * [0, 1, 1] | [2, 2, 3] # => [0, 1, 2, 3]
+ * [0, 1, 2] | [3, 2, 1, 0] # => [0, 1, 2, 3]
*
- * See also Array#union.
+ * Related: Array#union.
*/
static VALUE
@@ -4743,10 +5813,10 @@ rb_ary_or(VALUE ary1, VALUE ary2)
ary2 = to_ary(ary2);
if (RARRAY_LEN(ary1) + RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
- ary3 = rb_ary_new();
+ ary3 = rb_ary_new();
rb_ary_union(ary3, ary1);
rb_ary_union(ary3, ary2);
- return ary3;
+ return ary3;
}
hash = ary_make_hash(ary1);
@@ -4759,18 +5829,18 @@ rb_ary_or(VALUE ary1, VALUE ary2)
/*
* call-seq:
- * ary.union(other_ary1, other_ary2, ...) -> new_ary
+ * array.union(*other_arrays) -> new_array
*
- * Set Union --- Returns a new array by joining <code>other_ary</code>s with +self+,
- * excluding any duplicates and preserving the order from the given arrays.
+ * Returns a new \Array that is the union of +self+ and all given Arrays +other_arrays+;
+ * duplicates are removed; order is preserved; items are compared using <tt>eql?</tt>:
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * [0, 1, 2, 3].union([4, 5], [6, 7]) # => [0, 1, 2, 3, 4, 5, 6, 7]
+ * [0, 1, 1].union([2, 1], [3, 1]) # => [0, 1, 2, 3]
+ * [0, 1, 2, 3].union([3, 2], [1, 0]) # => [0, 1, 2, 3]
*
- * [ "a", "b", "c" ].union( [ "c", "d", "a" ] ) #=> [ "a", "b", "c", "d" ]
- * [ "a" ].union( ["e", "b"], ["a", "c", "b"] ) #=> [ "a", "e", "b", "c" ]
- * [ "a" ].union #=> [ "a" ]
+ * Returns a copy of +self+ if no arguments given.
*
- * See also Array#|.
+ * Related: Array#|.
*/
static VALUE
@@ -4805,30 +5875,191 @@ rb_ary_union_multi(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.max -> obj
- * ary.max {|a, b| block} -> obj
- * ary.max(n) -> array
- * ary.max(n) {|a, b| block} -> array
+ * ary.intersect?(other_ary) -> true or false
+ *
+ * Returns +true+ if the array and +other_ary+ have at least one element in
+ * common, otherwise returns +false+:
+ *
+ * a = [ 1, 2, 3 ]
+ * b = [ 3, 4, 5 ]
+ * c = [ 5, 6, 7 ]
+ * a.intersect?(b) #=> true
+ * a.intersect?(c) #=> false
+ *
+ */
+
+static VALUE
+rb_ary_intersect_p(VALUE ary1, VALUE ary2)
+{
+ VALUE hash, v, result, shorter, longer;
+ st_data_t vv;
+ long i;
+
+ ary2 = to_ary(ary2);
+ if (RARRAY_LEN(ary1) == 0 || RARRAY_LEN(ary2) == 0) return Qfalse;
+
+ if (RARRAY_LEN(ary1) <= SMALL_ARRAY_LEN && RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ v = RARRAY_AREF(ary1, i);
+ if (rb_ary_includes_by_eql(ary2, v)) return Qtrue;
+ }
+ return Qfalse;
+ }
+
+ shorter = ary1;
+ longer = ary2;
+ if (RARRAY_LEN(ary1) > RARRAY_LEN(ary2)) {
+ longer = ary1;
+ shorter = ary2;
+ }
+
+ hash = ary_make_hash(shorter);
+ result = Qfalse;
+
+ for (i=0; i<RARRAY_LEN(longer); i++) {
+ v = RARRAY_AREF(longer, i);
+ vv = (st_data_t)v;
+ if (rb_hash_stlike_lookup(hash, vv, 0)) {
+ result = Qtrue;
+ break;
+ }
+ }
+ ary_recycle_hash(hash);
+
+ return result;
+}
+
+static VALUE
+ary_max_generic(VALUE ary, long i, VALUE vmax)
+{
+ RUBY_ASSERT(i > 0 && i < RARRAY_LEN(ary));
+
+ VALUE v;
+ for (; i < RARRAY_LEN(ary); ++i) {
+ v = RARRAY_AREF(ary, i);
+
+ if (rb_cmpint(rb_funcallv(vmax, id_cmp, 1, &v), vmax, v) < 0) {
+ vmax = v;
+ }
+ }
+
+ return vmax;
+}
+
+static VALUE
+ary_max_opt_fixnum(VALUE ary, long i, VALUE vmax)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(FIXNUM_P(vmax));
+
+ VALUE v;
+ for (; i < n; ++i) {
+ v = RARRAY_AREF(ary, i);
+
+ if (FIXNUM_P(v)) {
+ if ((long)vmax < (long)v) {
+ vmax = v;
+ }
+ }
+ else {
+ return ary_max_generic(ary, i, vmax);
+ }
+ }
+
+ return vmax;
+}
+
+static VALUE
+ary_max_opt_float(VALUE ary, long i, VALUE vmax)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(RB_FLOAT_TYPE_P(vmax));
+
+ VALUE v;
+ for (; i < n; ++i) {
+ v = RARRAY_AREF(ary, i);
+
+ if (RB_FLOAT_TYPE_P(v)) {
+ if (rb_float_cmp(vmax, v) < 0) {
+ vmax = v;
+ }
+ }
+ else {
+ return ary_max_generic(ary, i, vmax);
+ }
+ }
+
+ return vmax;
+}
+
+static VALUE
+ary_max_opt_string(VALUE ary, long i, VALUE vmax)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(STRING_P(vmax));
+
+ VALUE v;
+ for (; i < n; ++i) {
+ v = RARRAY_AREF(ary, i);
+
+ if (STRING_P(v)) {
+ if (rb_str_cmp(vmax, v) < 0) {
+ vmax = v;
+ }
+ }
+ else {
+ return ary_max_generic(ary, i, vmax);
+ }
+ }
+
+ return vmax;
+}
+
+/*
+ * call-seq:
+ * array.max -> element
+ * array.max {|a, b| ... } -> element
+ * array.max(n) -> new_array
+ * array.max(n) {|a, b| ... } -> new_array
+ *
+ * Returns one of the following:
+ *
+ * - The maximum-valued element from +self+.
+ * - A new \Array of maximum-valued elements selected from +self+.
+ *
+ * When no block is given, each element in +self+ must respond to method <tt><=></tt>
+ * with an \Integer.
*
- * Returns the object in _ary_ with the maximum value. The
- * first form assumes all objects implement Comparable;
- * the second uses the block to return <em>a <=> b</em>.
+ * With no argument and no block, returns the element in +self+
+ * having the maximum value per method <tt><=></tt>:
*
- * ary = %w(albatross dog horse)
- * ary.max #=> "horse"
- * ary.max {|a, b| a.length <=> b.length} #=> "albatross"
+ * [0, 1, 2].max # => 2
*
- * If the +n+ argument is given, maximum +n+ elements are returned
- * as an array.
+ * With an argument \Integer +n+ and no block, returns a new \Array with at most +n+ elements,
+ * in descending order per method <tt><=></tt>:
+ *
+ * [0, 1, 2, 3].max(3) # => [3, 2, 1]
+ * [0, 1, 2, 3].max(6) # => [3, 2, 1, 0]
+ *
+ * When a block is given, the block must return an \Integer.
+ *
+ * With a block and no argument, calls the block <tt>self.size-1</tt> times to compare elements;
+ * returns the element having the maximum value per the block:
+ *
+ * ['0', '00', '000'].max {|a, b| a.size <=> b.size } # => "000"
+ *
+ * With an argument +n+ and a block, returns a new \Array with at most +n+ elements,
+ * in descending order per the block:
+ *
+ * ['0', '00', '000'].max(2) {|a, b| a.size <=> b.size } # => ["000", "00"]
*
- * ary = %w[albatross dog horse]
- * ary.max(2) #=> ["horse", "dog"]
- * ary.max(2) {|a, b| a.length <=> b.length } #=> ["albatross", "horse"]
*/
static VALUE
rb_ary_max(int argc, VALUE *argv, VALUE ary)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
VALUE result = Qundef, v;
VALUE num;
long i;
@@ -4836,52 +6067,167 @@ rb_ary_max(int argc, VALUE *argv, VALUE ary)
if (rb_check_arity(argc, 0, 1) && !NIL_P(num = argv[0]))
return rb_nmin_run(ary, num, 0, 1, 1);
+ const long n = RARRAY_LEN(ary);
if (rb_block_given_p()) {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (result == Qundef || rb_cmpint(rb_yield_values(2, v, result), v, result) > 0) {
- result = v;
- }
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ v = RARRAY_AREF(ary, i);
+ if (UNDEF_P(result) || rb_cmpint(rb_yield_values(2, v, result), v, result) > 0) {
+ result = v;
+ }
+ }
}
- else {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) > 0) {
- result = v;
- }
- }
- }
- if (result == Qundef) return Qnil;
+ else if (n > 0) {
+ result = RARRAY_AREF(ary, 0);
+ if (n > 1) {
+ if (FIXNUM_P(result) && CMP_OPTIMIZABLE(INTEGER)) {
+ return ary_max_opt_fixnum(ary, 1, result);
+ }
+ else if (STRING_P(result) && CMP_OPTIMIZABLE(STRING)) {
+ return ary_max_opt_string(ary, 1, result);
+ }
+ else if (RB_FLOAT_TYPE_P(result) && CMP_OPTIMIZABLE(FLOAT)) {
+ return ary_max_opt_float(ary, 1, result);
+ }
+ else {
+ return ary_max_generic(ary, 1, result);
+ }
+ }
+ }
+ if (UNDEF_P(result)) return Qnil;
return result;
}
+static VALUE
+ary_min_generic(VALUE ary, long i, VALUE vmin)
+{
+ RUBY_ASSERT(i > 0 && i < RARRAY_LEN(ary));
+
+ VALUE v;
+ for (; i < RARRAY_LEN(ary); ++i) {
+ v = RARRAY_AREF(ary, i);
+
+ if (rb_cmpint(rb_funcallv(vmin, id_cmp, 1, &v), vmin, v) > 0) {
+ vmin = v;
+ }
+ }
+
+ return vmin;
+}
+
+static VALUE
+ary_min_opt_fixnum(VALUE ary, long i, VALUE vmin)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(FIXNUM_P(vmin));
+
+ VALUE a;
+ for (; i < n; ++i) {
+ a = RARRAY_AREF(ary, i);
+
+ if (FIXNUM_P(a)) {
+ if ((long)vmin > (long)a) {
+ vmin = a;
+ }
+ }
+ else {
+ return ary_min_generic(ary, i, vmin);
+ }
+ }
+
+ return vmin;
+}
+
+static VALUE
+ary_min_opt_float(VALUE ary, long i, VALUE vmin)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(RB_FLOAT_TYPE_P(vmin));
+
+ VALUE a;
+ for (; i < n; ++i) {
+ a = RARRAY_AREF(ary, i);
+
+ if (RB_FLOAT_TYPE_P(a)) {
+ if (rb_float_cmp(vmin, a) > 0) {
+ vmin = a;
+ }
+ }
+ else {
+ return ary_min_generic(ary, i, vmin);
+ }
+ }
+
+ return vmin;
+}
+
+static VALUE
+ary_min_opt_string(VALUE ary, long i, VALUE vmin)
+{
+ const long n = RARRAY_LEN(ary);
+ RUBY_ASSERT(i > 0 && i < n);
+ RUBY_ASSERT(STRING_P(vmin));
+
+ VALUE a;
+ for (; i < n; ++i) {
+ a = RARRAY_AREF(ary, i);
+
+ if (STRING_P(a)) {
+ if (rb_str_cmp(vmin, a) > 0) {
+ vmin = a;
+ }
+ }
+ else {
+ return ary_min_generic(ary, i, vmin);
+ }
+ }
+
+ return vmin;
+}
+
/*
* call-seq:
- * ary.min -> obj
- * ary.min {| a,b | block } -> obj
- * ary.min(n) -> array
- * ary.min(n) {| a,b | block } -> array
+ * array.min -> element
+ * array.min { |a, b| ... } -> element
+ * array.min(n) -> new_array
+ * array.min(n) { |a, b| ... } -> new_array
*
- * Returns the object in _ary_ with the minimum value. The
- * first form assumes all objects implement Comparable;
- * the second uses the block to return <em>a <=> b</em>.
+ * Returns one of the following:
*
- * ary = %w(albatross dog horse)
- * ary.min #=> "albatross"
- * ary.min {|a, b| a.length <=> b.length} #=> "dog"
+ * - The minimum-valued element from +self+.
+ * - A new \Array of minimum-valued elements selected from +self+.
*
- * If the +n+ argument is given, minimum +n+ elements are returned
- * as an array.
+ * When no block is given, each element in +self+ must respond to method <tt><=></tt>
+ * with an \Integer.
+ *
+ * With no argument and no block, returns the element in +self+
+ * having the minimum value per method <tt><=></tt>:
+ *
+ * [0, 1, 2].min # => 0
+ *
+ * With \Integer argument +n+ and no block, returns a new \Array with at most +n+ elements,
+ * in ascending order per method <tt><=></tt>:
+ *
+ * [0, 1, 2, 3].min(3) # => [0, 1, 2]
+ * [0, 1, 2, 3].min(6) # => [0, 1, 2, 3]
+ *
+ * When a block is given, the block must return an Integer.
+ *
+ * With a block and no argument, calls the block <tt>self.size-1</tt> times to compare elements;
+ * returns the element having the minimum value per the block:
+ *
+ * ['0', '00', '000'].min { |a, b| a.size <=> b.size } # => "0"
+ *
+ * With an argument +n+ and a block, returns a new \Array with at most +n+ elements,
+ * in ascending order per the block:
+ *
+ * ['0', '00', '000'].min(2) {|a, b| a.size <=> b.size } # => ["0", "00"]
*
- * ary = %w[albatross dog horse]
- * ary.min(2) #=> ["albatross", "dog"]
- * ary.min(2) {|a, b| a.length <=> b.length } #=> ["dog", "horse"]
*/
static VALUE
rb_ary_min(int argc, VALUE *argv, VALUE ary)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
VALUE result = Qundef, v;
VALUE num;
long i;
@@ -4889,36 +6235,58 @@ rb_ary_min(int argc, VALUE *argv, VALUE ary)
if (rb_check_arity(argc, 0, 1) && !NIL_P(num = argv[0]))
return rb_nmin_run(ary, num, 0, 0, 1);
+ const long n = RARRAY_LEN(ary);
if (rb_block_given_p()) {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (result == Qundef || rb_cmpint(rb_yield_values(2, v, result), v, result) < 0) {
- result = v;
- }
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ v = RARRAY_AREF(ary, i);
+ if (UNDEF_P(result) || rb_cmpint(rb_yield_values(2, v, result), v, result) < 0) {
+ result = v;
+ }
+ }
}
- else {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) < 0) {
- result = v;
- }
- }
- }
- if (result == Qundef) return Qnil;
+ else if (n > 0) {
+ result = RARRAY_AREF(ary, 0);
+ if (n > 1) {
+ if (FIXNUM_P(result) && CMP_OPTIMIZABLE(INTEGER)) {
+ return ary_min_opt_fixnum(ary, 1, result);
+ }
+ else if (STRING_P(result) && CMP_OPTIMIZABLE(STRING)) {
+ return ary_min_opt_string(ary, 1, result);
+ }
+ else if (RB_FLOAT_TYPE_P(result) && CMP_OPTIMIZABLE(FLOAT)) {
+ return ary_min_opt_float(ary, 1, result);
+ }
+ else {
+ return ary_min_generic(ary, 1, result);
+ }
+ }
+ }
+ if (UNDEF_P(result)) return Qnil;
return result;
}
/*
* call-seq:
- * ary.minmax -> [obj, obj]
- * ary.minmax {| a,b | block } -> [obj, obj]
+ * array.minmax -> [min_val, max_val]
+ * array.minmax {|a, b| ... } -> [min_val, max_val]
+ *
+ * Returns a new 2-element \Array containing the minimum and maximum values
+ * from +self+, either per method <tt><=></tt> or per a given block:.
+ *
+ * When no block is given, each element in +self+ must respond to method <tt><=></tt>
+ * with an \Integer;
+ * returns a new 2-element \Array containing the minimum and maximum values
+ * from +self+, per method <tt><=></tt>:
+ *
+ * [0, 1, 2].minmax # => [0, 2]
*
- * Returns a two element array which contains the minimum and the
- * maximum value in the array.
+ * When a block is given, the block must return an \Integer;
+ * the block is called <tt>self.size-1</tt> times to compare elements;
+ * returns a new 2-element \Array containing the minimum and maximum values
+ * from +self+, per the block:
+ *
+ * ['0', '00', '000'].minmax {|a, b| a.size <=> b.size } # => ["0", "000"]
*
- * Can be given an optional block to override the default comparison
- * method <code>a <=> b</code>.
*/
static VALUE
rb_ary_minmax(VALUE ary)
@@ -4938,31 +6306,33 @@ push_value(st_data_t key, st_data_t val, st_data_t ary)
/*
* call-seq:
- * ary.uniq! -> ary or nil
- * ary.uniq! {|item| ...} -> ary or nil
+ * array.uniq! -> self or nil
+ * array.uniq! {|element| ... } -> self or nil
*
- * Removes duplicate elements from +self+.
+ * Removes duplicate elements from +self+, the first occurrence always being retained;
+ * returns +self+ if any elements removed, +nil+ otherwise.
*
- * If a block is given, it will use the return value of the block for
- * comparison.
+ * With no block given, identifies and removes elements using method <tt>eql?</tt>
+ * to compare.
*
- * It compares values using their #hash and #eql? methods for efficiency.
+ * Returns +self+ if any elements removed:
*
- * +self+ is traversed in order, and the first occurrence is kept.
+ * a = [0, 0, 1, 1, 2, 2]
+ * a.uniq! # => [0, 1, 2]
*
- * Returns +nil+ if no changes are made (that is, no duplicates are found).
+ * Returns +nil+ if no elements removed.
*
- * a = [ "a", "a", "b", "b", "c" ]
- * a.uniq! # => ["a", "b", "c"]
+ * With a block given, calls the block for each element;
+ * identifies (using method <tt>eql?</tt>) and removes
+ * elements for which the block returns duplicate values.
*
- * b = [ "a", "b", "c" ]
- * b.uniq! # => nil
+ * Returns +self+ if any elements removed:
*
- * c = [["student","sam"], ["student","george"], ["teacher","matz"]]
- * c.uniq! {|s| s.first} # => [["student", "sam"], ["teacher", "matz"]]
+ * a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
+ * a.uniq! {|element| element.size } # => ['a', 'aa', 'aaa']
*
+ * Returns +nil+ if no elements removed.
*/
-
static VALUE
rb_ary_uniq_bang(VALUE ary)
{
@@ -4973,19 +6343,19 @@ rb_ary_uniq_bang(VALUE ary)
if (RARRAY_LEN(ary) <= 1)
return Qnil;
if (rb_block_given_p())
- hash = ary_make_hash_by(ary);
+ hash = ary_make_hash_by(ary);
else
- hash = ary_make_hash(ary);
+ hash = ary_make_hash(ary);
hash_size = RHASH_SIZE(hash);
if (RARRAY_LEN(ary) == hash_size) {
- return Qnil;
+ return Qnil;
}
rb_ary_modify_check(ary);
ARY_SET_LEN(ary, 0);
if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
- rb_ary_unshare(ary);
- FL_SET_EMBED(ary);
+ rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
}
ary_resize_capa(ary, hash_size);
rb_hash_foreach(hash, push_value, ary);
@@ -4996,22 +6366,24 @@ rb_ary_uniq_bang(VALUE ary)
/*
* call-seq:
- * ary.uniq -> new_ary
- * ary.uniq {|item| ...} -> new_ary
- *
- * Returns a new array by removing duplicate values in +self+.
+ * array.uniq -> new_array
+ * array.uniq {|element| ... } -> new_array
*
- * If a block is given, it will use the return value of the block for comparison.
+ * Returns a new \Array containing those elements from +self+ that are not duplicates,
+ * the first occurrence always being retained.
*
- * It compares values using their #hash and #eql? methods for efficiency.
+ * With no block given, identifies and omits duplicates using method <tt>eql?</tt>
+ * to compare:
*
- * +self+ is traversed in order, and the first occurrence is kept.
+ * a = [0, 0, 1, 1, 2, 2]
+ * a.uniq # => [0, 1, 2]
*
- * a = [ "a", "a", "b", "b", "c" ]
- * a.uniq # => ["a", "b", "c"]
+ * With a block given, calls the block for each element;
+ * identifies (using method <tt>eql?</tt>) and omits duplicate values,
+ * that is, those elements for which the block returns the same value:
*
- * b = [["student","sam"], ["student","george"], ["teacher","matz"]]
- * b.uniq {|s| s.first} # => [["student", "sam"], ["teacher", "matz"]]
+ * a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
+ * a.uniq {|element| element.size } # => ["a", "aa", "aaa"]
*
*/
@@ -5025,14 +6397,13 @@ rb_ary_uniq(VALUE ary)
uniq = rb_ary_dup(ary);
}
else if (rb_block_given_p()) {
- hash = ary_make_hash_by(ary);
- uniq = rb_hash_values(hash);
+ hash = ary_make_hash_by(ary);
+ uniq = rb_hash_values(hash);
}
else {
- hash = ary_make_hash(ary);
- uniq = rb_hash_values(hash);
+ hash = ary_make_hash(ary);
+ uniq = rb_hash_values(hash);
}
- RBASIC_SET_CLASS(uniq, rb_obj_class(ary));
if (hash) {
ary_recycle_hash(hash);
}
@@ -5042,14 +6413,11 @@ rb_ary_uniq(VALUE ary)
/*
* call-seq:
- * ary.compact! -> ary or nil
+ * array.compact! -> self or nil
*
- * Removes +nil+ elements from the array.
+ * Removes all +nil+ elements from +self+.
*
- * Returns +nil+ if no changes were made, otherwise returns the array.
- *
- * [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
- * [ "a", "b", "c" ].compact! #=> nil
+ * Returns +self+ if any elements removed, otherwise +nil+.
*/
static VALUE
@@ -5063,12 +6431,12 @@ rb_ary_compact_bang(VALUE ary)
end = p + RARRAY_LEN(ary);
while (t < end) {
- if (NIL_P(*t)) t++;
- else *p++ = *t++;
+ if (NIL_P(*t)) t++;
+ else *p++ = *t++;
}
n = p - RARRAY_CONST_PTR_TRANSIENT(ary);
if (RARRAY_LEN(ary) == n) {
- return Qnil;
+ return Qnil;
}
ary_resize_smaller(ary, n);
@@ -5077,12 +6445,12 @@ rb_ary_compact_bang(VALUE ary)
/*
* call-seq:
- * ary.compact -> new_ary
+ * array.compact -> new_array
*
- * Returns a copy of +self+ with all +nil+ elements removed.
+ * Returns a new \Array containing all non-+nil+ elements from +self+:
*
- * [ "a", nil, "b", nil, "c", nil ].compact
- * #=> [ "a", "b", "c" ]
+ * a = [nil, 0, nil, 1, nil, 2, nil]
+ * a.compact # => [0, 1, 2]
*/
static VALUE
@@ -5095,23 +6463,29 @@ rb_ary_compact(VALUE ary)
/*
* call-seq:
- * ary.count -> int
- * ary.count(obj) -> int
- * ary.count {|item| block} -> int
+ * array.count -> an_integer
+ * array.count(obj) -> an_integer
+ * array.count {|element| ... } -> an_integer
+ *
+ * Returns a count of specified elements.
+ *
+ * With no argument and no block, returns the count of all elements:
+ *
+ * [0, 1, 2].count # => 3
+ * [].count # => 0
*
- * Returns the number of elements.
+ * With argument +obj+, returns the count of elements <tt>==</tt> to +obj+:
*
- * If an argument is given, counts the number of elements which equal +obj+
- * using <code>==</code>.
+ * [0, 1, 2, 0.0].count(0) # => 2
+ * [0, 1, 2].count(3) # => 0
*
- * If a block is given, counts the number of elements for which the block
- * returns a true value.
+ * With no argument and a block given, calls the block with each element;
+ * returns the count of elements for which the block returns a truthy value:
*
- * ary = [1, 2, 4, 2]
- * ary.count #=> 4
- * ary.count(2) #=> 2
- * ary.count {|x| x%2 == 0} #=> 3
+ * [0, 1, 2, 3].count {|element| element > 1} # => 2
*
+ * With argument +obj+ and a block given, issues a warning, ignores the block,
+ * and returns the count of elements <tt>==</tt> to +obj+.
*/
static VALUE
@@ -5120,25 +6494,25 @@ rb_ary_count(int argc, VALUE *argv, VALUE ary)
long i, n = 0;
if (rb_check_arity(argc, 0, 1) == 0) {
- VALUE v;
+ VALUE v;
- if (!rb_block_given_p())
- return LONG2NUM(RARRAY_LEN(ary));
+ if (!rb_block_given_p())
+ return LONG2NUM(RARRAY_LEN(ary));
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (RTEST(rb_yield(v))) n++;
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ v = RARRAY_AREF(ary, i);
+ if (RTEST(rb_yield(v))) n++;
+ }
}
else {
VALUE obj = argv[0];
- if (rb_block_given_p()) {
- rb_warn("given block not used");
- }
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (rb_equal(RARRAY_AREF(ary, i), obj)) n++;
- }
+ if (rb_block_given_p()) {
+ rb_warn("given block not used");
+ }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ if (rb_equal(RARRAY_AREF(ary, i), obj)) n++;
+ }
}
return LONG2NUM(n);
@@ -5148,8 +6522,8 @@ static VALUE
flatten(VALUE ary, int level)
{
long i;
- VALUE stack, result, tmp, elt, vmemo;
- st_table *memo;
+ VALUE stack, result, tmp = 0, elt, vmemo;
+ st_table *memo = 0;
st_data_t id;
for (i = 0; i < RARRAY_LEN(ary); i++) {
@@ -5161,8 +6535,6 @@ flatten(VALUE ary, int level)
}
if (i == RARRAY_LEN(ary)) {
return ary;
- } else if (tmp == ary) {
- rb_raise(rb_eArgError, "tried to flatten recursive array");
}
result = ary_new(0, RARRAY_LEN(ary));
@@ -5173,79 +6545,100 @@ flatten(VALUE ary, int level)
rb_ary_push(stack, ary);
rb_ary_push(stack, LONG2NUM(i + 1));
- vmemo = rb_hash_new();
- RBASIC_CLEAR_CLASS(vmemo);
- memo = st_init_numtable();
- rb_hash_st_table_set(vmemo, memo);
- st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue);
- st_insert(memo, (st_data_t)tmp, (st_data_t)Qtrue);
+ if (level < 0) {
+ vmemo = rb_hash_new();
+ RBASIC_CLEAR_CLASS(vmemo);
+ memo = st_init_numtable();
+ rb_hash_st_table_set(vmemo, memo);
+ st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue);
+ st_insert(memo, (st_data_t)tmp, (st_data_t)Qtrue);
+ }
ary = tmp;
i = 0;
while (1) {
- while (i < RARRAY_LEN(ary)) {
- elt = RARRAY_AREF(ary, i++);
- if (level >= 0 && RARRAY_LEN(stack) / 2 >= level) {
- rb_ary_push(result, elt);
- continue;
- }
- tmp = rb_check_array_type(elt);
- if (RBASIC(result)->klass) {
- RB_GC_GUARD(vmemo);
- st_clear(memo);
- rb_raise(rb_eRuntimeError, "flatten reentered");
- }
- if (NIL_P(tmp)) {
- rb_ary_push(result, elt);
- }
- else {
- id = (st_data_t)tmp;
- if (st_is_member(memo, id)) {
+ while (i < RARRAY_LEN(ary)) {
+ elt = RARRAY_AREF(ary, i++);
+ if (level >= 0 && RARRAY_LEN(stack) / 2 >= level) {
+ rb_ary_push(result, elt);
+ continue;
+ }
+ tmp = rb_check_array_type(elt);
+ if (RBASIC(result)->klass) {
+ if (memo) {
+ RB_GC_GUARD(vmemo);
st_clear(memo);
- rb_raise(rb_eArgError, "tried to flatten recursive array");
- }
- st_insert(memo, id, (st_data_t)Qtrue);
- rb_ary_push(stack, ary);
- rb_ary_push(stack, LONG2NUM(i));
- ary = tmp;
- i = 0;
- }
- }
- if (RARRAY_LEN(stack) == 0) {
- break;
- }
- id = (st_data_t)ary;
- st_delete(memo, &id, 0);
- tmp = rb_ary_pop(stack);
- i = NUM2LONG(tmp);
- ary = rb_ary_pop(stack);
- }
-
- st_clear(memo);
-
- RBASIC_SET_CLASS(result, rb_obj_class(ary));
+ }
+ rb_raise(rb_eRuntimeError, "flatten reentered");
+ }
+ if (NIL_P(tmp)) {
+ rb_ary_push(result, elt);
+ }
+ else {
+ if (memo) {
+ id = (st_data_t)tmp;
+ if (st_is_member(memo, id)) {
+ st_clear(memo);
+ rb_raise(rb_eArgError, "tried to flatten recursive array");
+ }
+ st_insert(memo, id, (st_data_t)Qtrue);
+ }
+ rb_ary_push(stack, ary);
+ rb_ary_push(stack, LONG2NUM(i));
+ ary = tmp;
+ i = 0;
+ }
+ }
+ if (RARRAY_LEN(stack) == 0) {
+ break;
+ }
+ if (memo) {
+ id = (st_data_t)ary;
+ st_delete(memo, &id, 0);
+ }
+ tmp = rb_ary_pop(stack);
+ i = NUM2LONG(tmp);
+ ary = rb_ary_pop(stack);
+ }
+
+ if (memo) {
+ st_clear(memo);
+ }
+
+ RBASIC_SET_CLASS(result, rb_cArray);
return result;
}
/*
* call-seq:
- * ary.flatten! -> ary or nil
- * ary.flatten!(level) -> ary or nil
+ * array.flatten! -> self or nil
+ * array.flatten!(level) -> self or nil
+ *
+ * Replaces each nested \Array in +self+ with the elements from that \Array;
+ * returns +self+ if any changes, +nil+ otherwise.
+ *
+ * With non-negative \Integer argument +level+, flattens recursively through +level+ levels:
*
- * Flattens +self+ in place.
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten!(1) # => [0, 1, [2, 3], 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten!(2) # => [0, 1, 2, 3, 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten!(3) # => [0, 1, 2, 3, 4, 5]
+ * [0, 1, 2].flatten!(1) # => nil
*
- * Returns +nil+ if no modifications were made (i.e., the array contains no
- * subarrays.)
+ * With no argument, a +nil+ argument, or with negative argument +level+, flattens all levels:
*
- * The optional +level+ argument determines the level of recursion to flatten.
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten! # => [0, 1, 2, 3, 4, 5]
+ * [0, 1, 2].flatten! # => nil
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten!(-1) # => [0, 1, 2, 3, 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten!(-2) # => [0, 1, 2, 3, 4, 5]
+ * [0, 1, 2].flatten!(-1) # => nil
*
- * a = [ 1, 2, [3, [4, 5] ] ]
- * a.flatten! #=> [1, 2, 3, 4, 5]
- * a.flatten! #=> nil
- * a #=> [1, 2, 3, 4, 5]
- * a = [ 1, 2, [3, [4, 5] ] ]
- * a.flatten!(1) #=> [1, 2, 3, [4, 5]]
*/
static VALUE
@@ -5261,7 +6654,7 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
result = flatten(ary, level);
if (result == ary) {
- return Qnil;
+ return Qnil;
}
if (!(mod = ARY_EMBED_P(result))) rb_obj_freeze(result);
rb_ary_replace(ary, result);
@@ -5272,24 +6665,35 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.flatten -> new_ary
- * ary.flatten(level) -> new_ary
- *
- * Returns a new array that is a one-dimensional flattening of +self+
- * (recursively).
+ * array.flatten -> new_array
+ * array.flatten(level) -> new_array
+ *
+ * Returns a new \Array that is a recursive flattening of +self+:
+ * - Each non-Array element is unchanged.
+ * - Each \Array is replaced by its individual elements.
+ *
+ * With non-negative \Integer argument +level+, flattens recursively through +level+ levels:
+ *
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(0) # => [0, [1, [2, 3], 4], 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(1) # => [0, 1, [2, 3], 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(2) # => [0, 1, 2, 3, 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(3) # => [0, 1, 2, 3, 4, 5]
+ *
+ * With no argument, a +nil+ argument, or with negative argument +level+, flattens all levels:
+ *
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten # => [0, 1, 2, 3, 4, 5]
+ * [0, 1, 2].flatten # => [0, 1, 2]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(-1) # => [0, 1, 2, 3, 4, 5]
+ * a = [ 0, [ 1, [2, 3], 4 ], 5 ]
+ * a.flatten(-2) # => [0, 1, 2, 3, 4, 5]
+ * [0, 1, 2].flatten(-1) # => [0, 1, 2]
*
- * That is, for every element that is an array, extract its elements into
- * the new array.
- *
- * The optional +level+ argument determines the level of recursion to
- * flatten.
- *
- * s = [ 1, 2, 3 ] #=> [1, 2, 3]
- * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]
- * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
- * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- * a = [ 1, 2, [3, [4, 5] ] ]
- * a.flatten(1) #=> [1, 2, 3, [4, 5]]
*/
static VALUE
@@ -5311,251 +6715,162 @@ rb_ary_flatten(int argc, VALUE *argv, VALUE ary)
return result;
}
-#define OPTHASH_GIVEN_P(opts) \
- (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
-static ID id_random;
-
#define RAND_UPTO(max) (long)rb_random_ulong_limited((randgen), (max)-1)
-/*
- * call-seq:
- * ary.shuffle! -> ary
- * ary.shuffle!(random: rng) -> ary
- *
- * Shuffles elements in +self+ in place.
- *
- * a = [ 1, 2, 3 ] #=> [1, 2, 3]
- * a.shuffle! #=> [2, 3, 1]
- * a #=> [2, 3, 1]
- *
- * The optional +rng+ argument will be used as the random number generator.
- *
- * a.shuffle!(random: Random.new(1)) #=> [1, 3, 2]
- */
-
static VALUE
-rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary)
+rb_ary_shuffle_bang(rb_execution_context_t *ec, VALUE ary, VALUE randgen)
{
- VALUE opts, randgen = rb_cRandom;
long i, len;
- if (OPTHASH_GIVEN_P(opts)) {
- VALUE rnd;
- ID keyword_ids[1];
-
- keyword_ids[0] = id_random;
- rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd);
- if (rnd != Qundef) {
- randgen = rnd;
- }
- }
- rb_check_arity(argc, 0, 0);
rb_ary_modify(ary);
i = len = RARRAY_LEN(ary);
RARRAY_PTR_USE(ary, ptr, {
- while (i) {
- long j = RAND_UPTO(i);
- VALUE tmp;
+ while (i) {
+ long j = RAND_UPTO(i);
+ VALUE tmp;
if (len != RARRAY_LEN(ary) || ptr != RARRAY_CONST_PTR_TRANSIENT(ary)) {
rb_raise(rb_eRuntimeError, "modified during shuffle");
- }
- tmp = ptr[--i];
- ptr[i] = ptr[j];
- ptr[j] = tmp;
- }
+ }
+ tmp = ptr[--i];
+ ptr[i] = ptr[j];
+ ptr[j] = tmp;
+ }
}); /* WB: no new reference */
return ary;
}
-
-/*
- * call-seq:
- * ary.shuffle -> new_ary
- * ary.shuffle(random: rng) -> new_ary
- *
- * Returns a new array with elements of +self+ shuffled.
- *
- * a = [ 1, 2, 3 ] #=> [1, 2, 3]
- * a.shuffle #=> [2, 3, 1]
- * a #=> [1, 2, 3]
- *
- * The optional +rng+ argument will be used as the random number generator.
- *
- * a.shuffle(random: Random.new(1)) #=> [1, 3, 2]
- */
-
static VALUE
-rb_ary_shuffle(int argc, VALUE *argv, VALUE ary)
+rb_ary_shuffle(rb_execution_context_t *ec, VALUE ary, VALUE randgen)
{
ary = rb_ary_dup(ary);
- rb_ary_shuffle_bang(argc, argv, ary);
+ rb_ary_shuffle_bang(ec, ary, randgen);
return ary;
}
-
-/*
- * call-seq:
- * ary.sample -> obj
- * ary.sample(random: rng) -> obj
- * ary.sample(n) -> new_ary
- * ary.sample(n, random: rng) -> new_ary
- *
- * Choose a random element or +n+ random elements from the array.
- *
- * The elements are chosen by using random and unique indices into the array
- * in order to ensure that an element doesn't repeat itself unless the array
- * already contained duplicate elements.
- *
- * If the array is empty the first form returns +nil+ and the second form
- * returns an empty array.
- *
- * a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
- * a.sample #=> 7
- * a.sample(4) #=> [6, 4, 2, 5]
- *
- * The optional +rng+ argument will be used as the random number generator.
- *
- * a.sample(random: Random.new(1)) #=> 6
- * a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2]
- */
-
-
static VALUE
-rb_ary_sample(int argc, VALUE *argv, VALUE ary)
+ary_sample(rb_execution_context_t *ec, VALUE ary, VALUE randgen, VALUE nv, VALUE to_array)
{
- VALUE nv, result;
- VALUE opts, randgen = rb_cRandom;
+ VALUE result;
long n, len, i, j, k, idx[10];
long rnds[numberof(idx)];
long memo_threshold;
- if (OPTHASH_GIVEN_P(opts)) {
- VALUE rnd;
- ID keyword_ids[1];
-
- keyword_ids[0] = id_random;
- rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd);
- if (rnd != Qundef) {
- randgen = rnd;
- }
- }
len = RARRAY_LEN(ary);
- if (rb_check_arity(argc, 0, 1) == 0) {
- if (len < 2)
- i = 0;
- else
- i = RAND_UPTO(len);
+ if (!to_array) {
+ if (len < 2)
+ i = 0;
+ else
+ i = RAND_UPTO(len);
- return rb_ary_elt(ary, i);
+ return rb_ary_elt(ary, i);
}
- nv = argv[0];
n = NUM2LONG(nv);
if (n < 0) rb_raise(rb_eArgError, "negative sample number");
if (n > len) n = len;
if (n <= numberof(idx)) {
- for (i = 0; i < n; ++i) {
- rnds[i] = RAND_UPTO(len - i);
- }
+ for (i = 0; i < n; ++i) {
+ rnds[i] = RAND_UPTO(len - i);
+ }
}
k = len;
len = RARRAY_LEN(ary);
if (len < k && n <= numberof(idx)) {
- for (i = 0; i < n; ++i) {
- if (rnds[i] >= len) return rb_ary_new_capa(0);
- }
+ for (i = 0; i < n; ++i) {
+ if (rnds[i] >= len) return rb_ary_new_capa(0);
+ }
}
if (n > len) n = len;
switch (n) {
case 0:
- return rb_ary_new_capa(0);
+ return rb_ary_new_capa(0);
case 1:
- i = rnds[0];
- return rb_ary_new_from_values(1, &RARRAY_AREF(ary, i));
+ i = rnds[0];
+ return rb_ary_new_from_args(1, RARRAY_AREF(ary, i));
case 2:
- i = rnds[0];
- j = rnds[1];
- if (j >= i) j++;
- return rb_ary_new_from_args(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j));
+ i = rnds[0];
+ j = rnds[1];
+ if (j >= i) j++;
+ return rb_ary_new_from_args(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j));
case 3:
- i = rnds[0];
- j = rnds[1];
- k = rnds[2];
- {
- long l = j, g = i;
- if (j >= i) l = i, g = ++j;
- if (k >= l && (++k >= g)) ++k;
- }
- return rb_ary_new_from_args(3, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j), RARRAY_AREF(ary, k));
+ i = rnds[0];
+ j = rnds[1];
+ k = rnds[2];
+ {
+ long l = j, g = i;
+ if (j >= i) l = i, g = ++j;
+ if (k >= l && (++k >= g)) ++k;
+ }
+ return rb_ary_new_from_args(3, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j), RARRAY_AREF(ary, k));
}
memo_threshold =
- len < 2560 ? len / 128 :
- len < 5120 ? len / 64 :
- len < 10240 ? len / 32 :
- len / 16;
+ len < 2560 ? len / 128 :
+ len < 5120 ? len / 64 :
+ len < 10240 ? len / 32 :
+ len / 16;
if (n <= numberof(idx)) {
- long sorted[numberof(idx)];
- sorted[0] = idx[0] = rnds[0];
- for (i=1; i<n; i++) {
- k = rnds[i];
- for (j = 0; j < i; ++j) {
- if (k < sorted[j]) break;
- ++k;
- }
- memmove(&sorted[j+1], &sorted[j], sizeof(sorted[0])*(i-j));
- sorted[j] = idx[i] = k;
- }
- result = rb_ary_new_capa(n);
+ long sorted[numberof(idx)];
+ sorted[0] = idx[0] = rnds[0];
+ for (i=1; i<n; i++) {
+ k = rnds[i];
+ for (j = 0; j < i; ++j) {
+ if (k < sorted[j]) break;
+ ++k;
+ }
+ memmove(&sorted[j+1], &sorted[j], sizeof(sorted[0])*(i-j));
+ sorted[j] = idx[i] = k;
+ }
+ result = rb_ary_new_capa(n);
RARRAY_PTR_USE_TRANSIENT(result, ptr_result, {
- for (i=0; i<n; i++) {
- ptr_result[i] = RARRAY_AREF(ary, idx[i]);
- }
- });
+ for (i=0; i<n; i++) {
+ ptr_result[i] = RARRAY_AREF(ary, idx[i]);
+ }
+ });
}
else if (n <= memo_threshold / 2) {
- long max_idx = 0;
+ long max_idx = 0;
#undef RUBY_UNTYPED_DATA_WARNING
#define RUBY_UNTYPED_DATA_WARNING 0
- VALUE vmemo = Data_Wrap_Struct(0, 0, st_free_table, 0);
- st_table *memo = st_init_numtable_with_size(n);
- DATA_PTR(vmemo) = memo;
- result = rb_ary_new_capa(n);
- RARRAY_PTR_USE(result, ptr_result, {
- for (i=0; i<n; i++) {
- long r = RAND_UPTO(len-i) + i;
- ptr_result[i] = r;
- if (r > max_idx) max_idx = r;
- }
- len = RARRAY_LEN(ary);
- if (len <= max_idx) n = 0;
- else if (n > len) n = len;
+ VALUE vmemo = Data_Wrap_Struct(0, 0, st_free_table, 0);
+ st_table *memo = st_init_numtable_with_size(n);
+ DATA_PTR(vmemo) = memo;
+ result = rb_ary_new_capa(n);
+ RARRAY_PTR_USE(result, ptr_result, {
+ for (i=0; i<n; i++) {
+ long r = RAND_UPTO(len-i) + i;
+ ptr_result[i] = r;
+ if (r > max_idx) max_idx = r;
+ }
+ len = RARRAY_LEN(ary);
+ if (len <= max_idx) n = 0;
+ else if (n > len) n = len;
RARRAY_PTR_USE_TRANSIENT(ary, ptr_ary, {
- for (i=0; i<n; i++) {
- long j2 = j = ptr_result[i];
- long i2 = i;
- st_data_t value;
- if (st_lookup(memo, (st_data_t)i, &value)) i2 = (long)value;
- if (st_lookup(memo, (st_data_t)j, &value)) j2 = (long)value;
- st_insert(memo, (st_data_t)j, (st_data_t)i2);
- ptr_result[i] = ptr_ary[j2];
- }
- });
- });
- DATA_PTR(vmemo) = 0;
- st_free_table(memo);
+ for (i=0; i<n; i++) {
+ long j2 = j = ptr_result[i];
+ long i2 = i;
+ st_data_t value;
+ if (st_lookup(memo, (st_data_t)i, &value)) i2 = (long)value;
+ if (st_lookup(memo, (st_data_t)j, &value)) j2 = (long)value;
+ st_insert(memo, (st_data_t)j, (st_data_t)i2);
+ ptr_result[i] = ptr_ary[j2];
+ }
+ });
+ });
+ DATA_PTR(vmemo) = 0;
+ st_free_table(memo);
}
else {
- result = rb_ary_dup(ary);
- RBASIC_CLEAR_CLASS(result);
- RB_GC_GUARD(ary);
- RARRAY_PTR_USE(result, ptr_result, {
- for (i=0; i<n; i++) {
- j = RAND_UPTO(len-i) + i;
- nv = ptr_result[j];
- ptr_result[j] = ptr_result[i];
- ptr_result[i] = nv;
- }
- });
- RBASIC_SET_CLASS_RAW(result, rb_cArray);
+ result = rb_ary_dup(ary);
+ RBASIC_CLEAR_CLASS(result);
+ RB_GC_GUARD(ary);
+ RARRAY_PTR_USE(result, ptr_result, {
+ for (i=0; i<n; i++) {
+ j = RAND_UPTO(len-i) + i;
+ nv = ptr_result[j];
+ ptr_result[j] = ptr_result[i];
+ ptr_result[i] = nv;
+ }
+ });
+ RBASIC_SET_CLASS_RAW(result, rb_cArray);
}
ARY_SET_LEN(result, n);
@@ -5563,15 +6878,21 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
}
static VALUE
+ary_sample0(rb_execution_context_t *ec, VALUE ary)
+{
+ return ary_sample(ec, ary, rb_cRandom, Qfalse, Qfalse);
+}
+
+static VALUE
rb_ary_cycle_size(VALUE self, VALUE args, VALUE eobj)
{
long mul;
VALUE n = Qnil;
if (args && (RARRAY_LEN(args) > 0)) {
- n = RARRAY_AREF(args, 0);
+ n = RARRAY_AREF(args, 0);
}
if (RARRAY_LEN(self) == 0) return INT2FIX(0);
- if (n == Qnil) return DBL2NUM(HUGE_VAL);
+ if (NIL_P(n)) return DBL2NUM(HUGE_VAL);
mul = NUM2LONG(n);
if (mul <= 0) return INT2FIX(0);
n = LONG2FIX(mul);
@@ -5580,24 +6901,37 @@ rb_ary_cycle_size(VALUE self, VALUE args, VALUE eobj)
/*
* call-seq:
- * ary.cycle(n=nil) {|obj| block} -> nil
- * ary.cycle(n=nil) -> Enumerator
+ * array.cycle {|element| ... } -> nil
+ * array.cycle(count) {|element| ... } -> nil
+ * array.cycle -> new_enumerator
+ * array.cycle(count) -> new_enumerator
+ *
+ * When called with positive \Integer argument +count+ and a block,
+ * calls the block with each element, then does so again,
+ * until it has done so +count+ times; returns +nil+:
+ *
+ * output = []
+ * [0, 1].cycle(2) {|element| output.push(element) } # => nil
+ * output # => [0, 1, 0, 1]
*
- * Calls the given block for each element +n+ times or forever if +nil+ is
- * given.
+ * If +count+ is zero or negative, does not call the block:
*
- * Does nothing if a non-positive number is given or the array is empty.
+ * [0, 1].cycle(0) {|element| fail 'Cannot happen' } # => nil
+ * [0, 1].cycle(-1) {|element| fail 'Cannot happen' } # => nil
*
- * Returns +nil+ if the loop has finished without getting interrupted.
+ * When a block is given, and argument is omitted or +nil+, cycles forever:
*
- * If no block is given, an Enumerator is returned instead.
+ * # Prints 0 and 1 forever.
+ * [0, 1].cycle {|element| puts element }
+ * [0, 1].cycle(nil) {|element| puts element }
*
- * a = ["a", "b", "c"]
- * a.cycle {|x| puts x} # print, a, b, c, a, b, c,.. forever.
- * a.cycle(2) {|x| puts x} # print, a, b, c, a, b, c.
+ * When no block is given, returns a new \Enumerator:
+ *
+ * [0, 1].cycle(2) # => #<Enumerator: [0, 1]:cycle(2)>
+ * [0, 1].cycle # => # => #<Enumerator: [0, 1]:cycle>
+ * [0, 1].cycle.first(5) # => [0, 1, 0, 1, 0]
*
*/
-
static VALUE
rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
{
@@ -5622,9 +6956,6 @@ rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
return Qnil;
}
-#define tmpary(n) rb_ary_tmp_new(n)
-#define tmpary_discard(a) (ary_discard(a), RBASIC_SET_CLASS_RAW(a, rb_cArray))
-
/*
* Build a ruby array of the corresponding values and yield it to the
* associated block.
@@ -5660,52 +6991,52 @@ permute0(const long n, const long r, long *const p, char *const used, const VALU
long i = 0, index = 0;
for (;;) {
- const char *const unused = memchr(&used[i], 0, n-i);
- if (!unused) {
- if (!index) break;
- i = p[--index]; /* pop index */
- used[i++] = 0; /* index unused */
- }
- else {
- i = unused - used;
- p[index] = i;
- used[i] = 1; /* mark index used */
- ++index;
- if (index < r-1) { /* if not done yet */
- p[index] = i = 0;
- continue;
- }
- for (i = 0; i < n; ++i) {
- if (used[i]) continue;
- p[index] = i;
- if (!yield_indexed_values(values, r, p)) {
- rb_raise(rb_eRuntimeError, "permute reentered");
- }
- }
- i = p[--index]; /* pop index */
- used[i] = 0; /* index unused */
- p[index] = ++i;
- }
+ const char *const unused = memchr(&used[i], 0, n-i);
+ if (!unused) {
+ if (!index) break;
+ i = p[--index]; /* pop index */
+ used[i++] = 0; /* index unused */
+ }
+ else {
+ i = unused - used;
+ p[index] = i;
+ used[i] = 1; /* mark index used */
+ ++index;
+ if (index < r-1) { /* if not done yet */
+ p[index] = i = 0;
+ continue;
+ }
+ for (i = 0; i < n; ++i) {
+ if (used[i]) continue;
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
+ rb_raise(rb_eRuntimeError, "permute reentered");
+ }
+ }
+ i = p[--index]; /* pop index */
+ used[i] = 0; /* index unused */
+ p[index] = ++i;
+ }
}
}
/*
* Returns the product of from, from-1, ..., from - how_many + 1.
- * http://en.wikipedia.org/wiki/Pochhammer_symbol
+ * https://en.wikipedia.org/wiki/Pochhammer_symbol
*/
static VALUE
descending_factorial(long from, long how_many)
{
VALUE cnt;
if (how_many > 0) {
- cnt = LONG2FIX(from);
- while (--how_many > 0) {
- long v = --from;
- cnt = rb_int_mul(cnt, LONG2FIX(v));
- }
+ cnt = LONG2FIX(from);
+ while (--how_many > 0) {
+ long v = --from;
+ cnt = rb_int_mul(cnt, LONG2FIX(v));
+ }
}
else {
- cnt = LONG2FIX(how_many == 0);
+ cnt = LONG2FIX(how_many == 0);
}
return cnt;
}
@@ -5716,18 +7047,18 @@ binomial_coefficient(long comb, long size)
VALUE r;
long i;
if (comb > size-comb) {
- comb = size-comb;
+ comb = size-comb;
}
if (comb < 0) {
- return LONG2FIX(0);
+ return LONG2FIX(0);
}
else if (comb == 0) {
- return LONG2FIX(1);
+ return LONG2FIX(1);
}
r = LONG2FIX(size);
for (i = 1; i < comb; ++i) {
- r = rb_int_mul(r, LONG2FIX(size - i));
- r = rb_int_idiv(r, LONG2FIX(i + 1));
+ r = rb_int_mul(r, LONG2FIX(size - i));
+ r = rb_int_idiv(r, LONG2FIX(i + 1));
}
return r;
}
@@ -5743,30 +7074,82 @@ rb_ary_permutation_size(VALUE ary, VALUE args, VALUE eobj)
/*
* call-seq:
- * ary.permutation {|p| block} -> ary
- * ary.permutation -> Enumerator
- * ary.permutation(n) {|p| block} -> ary
- * ary.permutation(n) -> Enumerator
+ * array.permutation {|element| ... } -> self
+ * array.permutation(n) {|element| ... } -> self
+ * array.permutation -> new_enumerator
+ * array.permutation(n) -> new_enumerator
+ *
+ * When invoked with a block, yield all permutations of elements of +self+; returns +self+.
+ * The order of permutations is indeterminate.
+ *
+ * When a block and an in-range positive \Integer argument +n+ (<tt>0 < n <= self.size</tt>)
+ * are given, calls the block with all +n+-tuple permutations of +self+.
+ *
+ * Example:
+ *
+ * a = [0, 1, 2]
+ * a.permutation(2) {|permutation| p permutation }
+ *
+ * Output:
+ *
+ * [0, 1]
+ * [0, 2]
+ * [1, 0]
+ * [1, 2]
+ * [2, 0]
+ * [2, 1]
+ *
+ * Another example:
+ *
+ * a = [0, 1, 2]
+ * a.permutation(3) {|permutation| p permutation }
+ *
+ * Output:
+ *
+ * [0, 1, 2]
+ * [0, 2, 1]
+ * [1, 0, 2]
+ * [1, 2, 0]
+ * [2, 0, 1]
+ * [2, 1, 0]
+ *
+ * When +n+ is zero, calls the block once with a new empty \Array:
+ *
+ * a = [0, 1, 2]
+ * a.permutation(0) {|permutation| p permutation }
+ *
+ * Output:
+ *
+ * []
+ *
+ * When +n+ is out of range (negative or larger than <tt>self.size</tt>),
+ * does not call the block:
+ *
+ * a = [0, 1, 2]
+ * a.permutation(-1) {|permutation| fail 'Cannot happen' }
+ * a.permutation(4) {|permutation| fail 'Cannot happen' }
+ *
+ * When a block given but no argument,
+ * behaves the same as <tt>a.permutation(a.size)</tt>:
*
- * When invoked with a block, yield all permutations of length +n+ of the
- * elements of the array, then return the array itself.
+ * a = [0, 1, 2]
+ * a.permutation {|permutation| p permutation }
*
- * If +n+ is not specified, yield all permutations of all elements.
+ * Output:
*
- * The implementation makes no guarantees about the order in which the
- * permutations are yielded.
+ * [0, 1, 2]
+ * [0, 2, 1]
+ * [1, 0, 2]
+ * [1, 2, 0]
+ * [2, 0, 1]
+ * [2, 1, 0]
*
- * If no block is given, an Enumerator is returned instead.
+ * Returns a new \Enumerator if no block given:
*
- * Examples:
+ * a = [0, 1, 2]
+ * a.permutation # => #<Enumerator: [0, 1, 2]:permutation>
+ * a.permutation(2) # => #<Enumerator: [0, 1, 2]:permutation(2)>
*
- * a = [1, 2, 3]
- * a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
- * a.permutation(1).to_a #=> [[1],[2],[3]]
- * a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
- * a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
- * a.permutation(0).to_a #=> [[]] # one permutation of length 0
- * a.permutation(4).to_a #=> [] # no permutations of length 4
*/
static VALUE
@@ -5781,28 +7164,28 @@ rb_ary_permutation(int argc, VALUE *argv, VALUE ary)
r = NUM2LONG(argv[0]); /* Permutation size from argument */
if (r < 0 || n < r) {
- /* no permutations: yield nothing */
+ /* no permutations: yield nothing */
}
else if (r == 0) { /* exactly one permutation: the zero-length array */
- rb_yield(rb_ary_new2(0));
+ rb_yield(rb_ary_new2(0));
}
else if (r == 1) { /* this is a special, easy case */
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ }
}
else { /* this is the general case */
- volatile VALUE t0;
- long *p = ALLOCV_N(long, t0, r+roomof(n, sizeof(long)));
- char *used = (char*)(p + r);
- VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, r+roomof(n, sizeof(long)));
+ char *used = (char*)(p + r);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC_CLEAR_CLASS(ary0);
- MEMZERO(used, char, n); /* initialize array */
+ MEMZERO(used, char, n); /* initialize array */
- permute0(n, r, p, used, ary0); /* compute and yield permutations */
- ALLOCV_END(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ permute0(n, r, p, used, ary0); /* compute and yield permutations */
+ ALLOCV_END(t0);
+ RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
@@ -5815,16 +7198,16 @@ combinate0(const long len, const long n, long *const stack, const VALUE values)
MEMZERO(stack+1, long, n);
stack[0] = -1;
for (;;) {
- for (lev++; lev < n; lev++) {
- stack[lev+1] = stack[lev]+1;
- }
- if (!yield_indexed_values(values, n, stack+1)) {
- rb_raise(rb_eRuntimeError, "combination reentered");
- }
- do {
- if (lev == 0) return;
- stack[lev--]++;
- } while (stack[lev+1]+n == len+lev+1);
+ for (lev++; lev < n; lev++) {
+ stack[lev+1] = stack[lev]+1;
+ }
+ if (!yield_indexed_values(values, n, stack+1)) {
+ rb_raise(rb_eRuntimeError, "combination reentered");
+ }
+ do {
+ if (lev == 0) return;
+ stack[lev--]++;
+ } while (stack[lev+1]+n == len+lev+1);
}
}
@@ -5839,26 +7222,55 @@ rb_ary_combination_size(VALUE ary, VALUE args, VALUE eobj)
/*
* call-seq:
- * ary.combination(n) {|c| block} -> ary
- * ary.combination(n) -> Enumerator
+ * array.combination(n) {|element| ... } -> self
+ * array.combination(n) -> new_enumerator
+ *
+ * Calls the block, if given, with combinations of elements of +self+;
+ * returns +self+. The order of combinations is indeterminate.
+ *
+ * When a block and an in-range positive \Integer argument +n+ (<tt>0 < n <= self.size</tt>)
+ * are given, calls the block with all +n+-tuple combinations of +self+.
+ *
+ * Example:
+ *
+ * a = [0, 1, 2]
+ * a.combination(2) {|combination| p combination }
+ *
+ * Output:
+ *
+ * [0, 1]
+ * [0, 2]
+ * [1, 2]
+ *
+ * Another example:
*
- * When invoked with a block, yields all combinations of length +n+ of elements
- * from the array and then returns the array itself.
+ * a = [0, 1, 2]
+ * a.combination(3) {|combination| p combination }
*
- * The implementation makes no guarantees about the order in which the
- * combinations are yielded.
+ * Output:
*
- * If no block is given, an Enumerator is returned instead.
+ * [0, 1, 2]
*
- * Examples:
+ * When +n+ is zero, calls the block once with a new empty \Array:
*
- * a = [1, 2, 3, 4]
- * a.combination(1).to_a #=> [[1],[2],[3],[4]]
- * a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
- * a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
- * a.combination(4).to_a #=> [[1,2,3,4]]
- * a.combination(0).to_a #=> [[]] # one combination of length 0
- * a.combination(5).to_a #=> [] # no combinations of length 5
+ * a = [0, 1, 2]
+ * a1 = a.combination(0) {|combination| p combination }
+ *
+ * Output:
+ *
+ * []
+ *
+ * When +n+ is out of range (negative or larger than <tt>self.size</tt>),
+ * does not call the block:
+ *
+ * a = [0, 1, 2]
+ * a.combination(-1) {|combination| fail 'Cannot happen' }
+ * a.combination(4) {|combination| fail 'Cannot happen' }
+ *
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = [0, 1, 2]
+ * a.combination(2) # => #<Enumerator: [0, 1, 2]:combination(2)>
*
*/
@@ -5871,25 +7283,25 @@ rb_ary_combination(VALUE ary, VALUE num)
RETURN_SIZED_ENUMERATOR(ary, 1, &num, rb_ary_combination_size);
len = RARRAY_LEN(ary);
if (n < 0 || len < n) {
- /* yield nothing */
+ /* yield nothing */
}
else if (n == 0) {
- rb_yield(rb_ary_new2(0));
+ rb_yield(rb_ary_new2(0));
}
else if (n == 1) {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ }
}
else {
- VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- volatile VALUE t0;
- long *stack = ALLOCV_N(long, t0, n+1);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ volatile VALUE t0;
+ long *stack = ALLOCV_N(long, t0, n+1);
- RBASIC_CLEAR_CLASS(ary0);
- combinate0(len, n, stack, ary0);
- ALLOCV_END(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ RBASIC_CLEAR_CLASS(ary0);
+ combinate0(len, n, stack, ary0);
+ ALLOCV_END(t0);
+ RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
@@ -5913,19 +7325,19 @@ rpermute0(const long n, const long r, long *const p, const VALUE values)
p[index] = i;
for (;;) {
- if (++index < r-1) {
- p[index] = i = 0;
- continue;
- }
- for (i = 0; i < n; ++i) {
- p[index] = i;
- if (!yield_indexed_values(values, r, p)) {
- rb_raise(rb_eRuntimeError, "repeated permute reentered");
- }
- }
- do {
- if (index <= 0) return;
- } while ((i = ++p[--index]) >= n);
+ if (++index < r-1) {
+ p[index] = i = 0;
+ continue;
+ }
+ for (i = 0; i < n; ++i) {
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
+ rb_raise(rb_eRuntimeError, "repeated permute reentered");
+ }
+ }
+ do {
+ if (index <= 0) return;
+ } while ((i = ++p[--index]) >= n);
}
}
@@ -5936,37 +7348,79 @@ rb_ary_repeated_permutation_size(VALUE ary, VALUE args, VALUE eobj)
long k = NUM2LONG(RARRAY_AREF(args, 0));
if (k < 0) {
- return LONG2FIX(0);
+ return LONG2FIX(0);
}
if (n <= 0) {
- return LONG2FIX(!k);
+ return LONG2FIX(!k);
}
return rb_int_positive_pow(n, (unsigned long)k);
}
/*
* call-seq:
- * ary.repeated_permutation(n) {|p| block} -> ary
- * ary.repeated_permutation(n) -> Enumerator
+ * array.repeated_permutation(n) {|permutation| ... } -> self
+ * array.repeated_permutation(n) -> new_enumerator
*
- * When invoked with a block, yield all repeated permutations of length +n+ of
- * the elements of the array, then return the array itself.
+ * Calls the block with each repeated permutation of length +n+ of the elements of +self+;
+ * each permutation is an \Array;
+ * returns +self+. The order of the permutations is indeterminate.
*
- * The implementation makes no guarantees about the order in which the repeated
- * permutations are yielded.
+ * When a block and a positive \Integer argument +n+ are given, calls the block with each
+ * +n+-tuple repeated permutation of the elements of +self+.
+ * The number of permutations is <tt>self.size**n</tt>.
*
- * If no block is given, an Enumerator is returned instead.
+ * +n+ = 1:
*
- * Examples:
+ * a = [0, 1, 2]
+ * a.repeated_permutation(1) {|permutation| p permutation }
+ *
+ * Output:
+ *
+ * [0]
+ * [1]
+ * [2]
+ *
+ * +n+ = 2:
+ *
+ * a.repeated_permutation(2) {|permutation| p permutation }
+ *
+ * Output:
+ *
+ * [0, 0]
+ * [0, 1]
+ * [0, 2]
+ * [1, 0]
+ * [1, 1]
+ * [1, 2]
+ * [2, 0]
+ * [2, 1]
+ * [2, 2]
+ *
+ * If +n+ is zero, calls the block once with an empty \Array.
+ *
+ * If +n+ is negative, does not call the block:
+ *
+ * a.repeated_permutation(-1) {|permutation| fail 'Cannot happen' }
+ *
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = [0, 1, 2]
+ * a.repeated_permutation(2) # => #<Enumerator: [0, 1, 2]:permutation(2)>
+ *
+ * Using Enumerators, it's convenient to show the permutations and counts
+ * for some values of +n+:
+ *
+ * e = a.repeated_permutation(0)
+ * e.size # => 1
+ * e.to_a # => [[]]
+ * e = a.repeated_permutation(1)
+ * e.size # => 3
+ * e.to_a # => [[0], [1], [2]]
+ * e = a.repeated_permutation(2)
+ * e.size # => 9
+ * e.to_a # => [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]
*
- * a = [1, 2]
- * a.repeated_permutation(1).to_a #=> [[1], [2]]
- * a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
- * a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
- * # [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
- * a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
*/
-
static VALUE
rb_ary_repeated_permutation(VALUE ary, VALUE num)
{
@@ -5977,25 +7431,25 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num)
r = NUM2LONG(num); /* Permutation size from argument */
if (r < 0) {
- /* no permutations: yield nothing */
+ /* no permutations: yield nothing */
}
else if (r == 0) { /* exactly one permutation: the zero-length array */
- rb_yield(rb_ary_new2(0));
+ rb_yield(rb_ary_new2(0));
}
else if (r == 1) { /* this is a special, easy case */
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ }
}
else { /* this is the general case */
- volatile VALUE t0;
- long *p = ALLOCV_N(long, t0, r);
- VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, r);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC_CLEAR_CLASS(ary0);
- rpermute0(n, r, p, ary0); /* compute and yield repeated permutations */
- ALLOCV_END(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ rpermute0(n, r, p, ary0); /* compute and yield repeated permutations */
+ ALLOCV_END(t0);
+ RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
@@ -6007,19 +7461,19 @@ rcombinate0(const long n, const long r, long *const p, const long rest, const VA
p[index] = i;
for (;;) {
- if (++index < r-1) {
- p[index] = i;
- continue;
- }
- for (; i < n; ++i) {
- p[index] = i;
- if (!yield_indexed_values(values, r, p)) {
- rb_raise(rb_eRuntimeError, "repeated combination reentered");
- }
- }
- do {
- if (index <= 0) return;
- } while ((i = ++p[--index]) >= n);
+ if (++index < r-1) {
+ p[index] = i;
+ continue;
+ }
+ for (; i < n; ++i) {
+ p[index] = i;
+ if (!yield_indexed_values(values, r, p)) {
+ rb_raise(rb_eRuntimeError, "repeated combination reentered");
+ }
+ }
+ do {
+ if (index <= 0) return;
+ } while ((i = ++p[--index]) >= n);
}
}
@@ -6029,35 +7483,71 @@ rb_ary_repeated_combination_size(VALUE ary, VALUE args, VALUE eobj)
long n = RARRAY_LEN(ary);
long k = NUM2LONG(RARRAY_AREF(args, 0));
if (k == 0) {
- return LONG2FIX(1);
+ return LONG2FIX(1);
}
return binomial_coefficient(k, n + k - 1);
}
/*
* call-seq:
- * ary.repeated_combination(n) {|c| block} -> ary
- * ary.repeated_combination(n) -> Enumerator
+ * array.repeated_combination(n) {|combination| ... } -> self
+ * array.repeated_combination(n) -> new_enumerator
+ *
+ * Calls the block with each repeated combination of length +n+ of the elements of +self+;
+ * each combination is an \Array;
+ * returns +self+. The order of the combinations is indeterminate.
+ *
+ * When a block and a positive \Integer argument +n+ are given, calls the block with each
+ * +n+-tuple repeated combination of the elements of +self+.
+ * The number of combinations is <tt>(n+1)(n+2)/2</tt>.
+ *
+ * +n+ = 1:
*
- * When invoked with a block, yields all repeated combinations of length +n+ of
- * elements from the array and then returns the array itself.
+ * a = [0, 1, 2]
+ * a.repeated_combination(1) {|combination| p combination }
*
- * The implementation makes no guarantees about the order in which the repeated
- * combinations are yielded.
+ * Output:
*
- * If no block is given, an Enumerator is returned instead.
+ * [0]
+ * [1]
+ * [2]
*
- * Examples:
+ * +n+ = 2:
*
- * a = [1, 2, 3]
- * a.repeated_combination(1).to_a #=> [[1], [2], [3]]
- * a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
- * a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
- * # [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
- * a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
- * # [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
- * # [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
- * a.repeated_combination(0).to_a #=> [[]] # one combination of length 0
+ * a.repeated_combination(2) {|combination| p combination }
+ *
+ * Output:
+ *
+ * [0, 0]
+ * [0, 1]
+ * [0, 2]
+ * [1, 1]
+ * [1, 2]
+ * [2, 2]
+ *
+ * If +n+ is zero, calls the block once with an empty \Array.
+ *
+ * If +n+ is negative, does not call the block:
+ *
+ * a.repeated_combination(-1) {|combination| fail 'Cannot happen' }
+ *
+ * Returns a new \Enumerator if no block given:
+ *
+ * a = [0, 1, 2]
+ * a.repeated_combination(2) # => #<Enumerator: [0, 1, 2]:combination(2)>
+ *
+ * Using Enumerators, it's convenient to show the combinations and counts
+ * for some values of +n+:
+ *
+ * e = a.repeated_combination(0)
+ * e.size # => 1
+ * e.to_a # => [[]]
+ * e = a.repeated_combination(1)
+ * e.size # => 3
+ * e.to_a # => [[0], [1], [2]]
+ * e = a.repeated_combination(2)
+ * e.size # => 6
+ * e.to_a # => [[0, 0], [0, 1], [0, 2], [1, 1], [1, 2], [2, 2]]
*
*/
@@ -6070,58 +7560,97 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
RETURN_SIZED_ENUMERATOR(ary, 1, &num, rb_ary_repeated_combination_size); /* Return enumerator if no block */
len = RARRAY_LEN(ary);
if (n < 0) {
- /* yield nothing */
+ /* yield nothing */
}
else if (n == 0) {
- rb_yield(rb_ary_new2(0));
+ rb_yield(rb_ary_new2(0));
}
else if (n == 1) {
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
- }
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ }
}
else if (len == 0) {
- /* yield nothing */
+ /* yield nothing */
}
else {
- volatile VALUE t0;
- long *p = ALLOCV_N(long, t0, n);
- VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ volatile VALUE t0;
+ long *p = ALLOCV_N(long, t0, n);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC_CLEAR_CLASS(ary0);
- rcombinate0(len, n, p, n, ary0); /* compute and yield repeated combinations */
- ALLOCV_END(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ rcombinate0(len, n, p, n, ary0); /* compute and yield repeated combinations */
+ ALLOCV_END(t0);
+ RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
}
return ary;
}
/*
* call-seq:
- * ary.product(other_ary, ...) -> new_ary
- * ary.product(other_ary, ...) {|p| block} -> ary
+ * array.product(*other_arrays) -> new_array
+ * array.product(*other_arrays) {|combination| ... } -> self
+ *
+ * Computes and returns or yields all combinations of elements from all the Arrays,
+ * including both +self+ and +other_arrays+:
+ *
+ * - The number of combinations is the product of the sizes of all the arrays,
+ * including both +self+ and +other_arrays+.
+ * - The order of the returned combinations is indeterminate.
+ *
+ * When no block is given, returns the combinations as an \Array of Arrays:
+ *
+ * a = [0, 1, 2]
+ * a1 = [3, 4]
+ * a2 = [5, 6]
+ * p = a.product(a1)
+ * p.size # => 6 # a.size * a1.size
+ * p # => [[0, 3], [0, 4], [1, 3], [1, 4], [2, 3], [2, 4]]
+ * p = a.product(a1, a2)
+ * p.size # => 12 # a.size * a1.size * a2.size
+ * p # => [[0, 3, 5], [0, 3, 6], [0, 4, 5], [0, 4, 6], [1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6]]
+ *
+ * If any argument is an empty \Array, returns an empty \Array.
+ *
+ * If no argument is given, returns an \Array of 1-element Arrays,
+ * each containing an element of +self+:
+ *
+ * a.product # => [[0], [1], [2]]
+ *
+ * When a block is given, yields each combination as an \Array; returns +self+:
+ *
+ * a.product(a1) {|combination| p combination }
+ *
+ * Output:
*
- * Returns an array of all combinations of elements from all arrays.
+ * [0, 3]
+ * [0, 4]
+ * [1, 3]
+ * [1, 4]
+ * [2, 3]
+ * [2, 4]
*
- * The length of the returned array is the product of the length of +self+ and
- * the argument arrays.
+ * If any argument is an empty \Array, does not call the block:
*
- * If given a block, #product will yield all combinations and return +self+
- * instead.
+ * a.product(a1, a2, []) {|combination| fail 'Cannot happen' }
+ *
+ * If no argument is given, yields each element of +self+ as a 1-element \Array:
+ *
+ * a.product {|combination| p combination }
+ *
+ * Output:
+ *
+ * [0]
+ * [1]
+ * [2]
*
- * [1,2,3].product([4,5]) #=> [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
- * [1,2].product([1,2]) #=> [[1,1],[1,2],[2,1],[2,2]]
- * [1,2].product([3,4],[5,6]) #=> [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
- * # [2,3,5],[2,3,6],[2,4,5],[2,4,6]]
- * [1,2].product() #=> [[1],[2]]
- * [1,2].product([]) #=> []
*/
static VALUE
rb_ary_product(int argc, VALUE *argv, VALUE ary)
{
int n = argc+1; /* How many arrays we're operating on */
- volatile VALUE t0 = tmpary(n);
+ volatile VALUE t0 = rb_ary_hidden_new(n);
volatile VALUE t1 = Qundef;
VALUE *arrays = RARRAY_PTR(t0); /* The arrays we're computing the product of */
int *counters = ALLOCV_N(int, t1, n); /* The current position in each one */
@@ -6142,64 +7671,64 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
/* Otherwise, allocate and fill in an array of results */
if (rb_block_given_p()) {
- /* Make defensive copies of arrays; exit if any is empty */
- for (i = 0; i < n; i++) {
- if (RARRAY_LEN(arrays[i]) == 0) goto done;
- arrays[i] = ary_make_shared_copy(arrays[i]);
- }
+ /* Make defensive copies of arrays; exit if any is empty */
+ for (i = 0; i < n; i++) {
+ if (RARRAY_LEN(arrays[i]) == 0) goto done;
+ arrays[i] = ary_make_shared_copy(arrays[i]);
+ }
}
else {
- /* Compute the length of the result array; return [] if any is empty */
- for (i = 0; i < n; i++) {
- long k = RARRAY_LEN(arrays[i]);
- if (k == 0) {
- result = rb_ary_new2(0);
- goto done;
- }
+ /* Compute the length of the result array; return [] if any is empty */
+ for (i = 0; i < n; i++) {
+ long k = RARRAY_LEN(arrays[i]);
+ if (k == 0) {
+ result = rb_ary_new2(0);
+ goto done;
+ }
if (MUL_OVERFLOW_LONG_P(resultlen, k))
- rb_raise(rb_eRangeError, "too big to product");
- resultlen *= k;
- }
- result = rb_ary_new2(resultlen);
+ rb_raise(rb_eRangeError, "too big to product");
+ resultlen *= k;
+ }
+ result = rb_ary_new2(resultlen);
}
for (;;) {
- int m;
- /* fill in one subarray */
- VALUE subarray = rb_ary_new2(n);
- for (j = 0; j < n; j++) {
- rb_ary_push(subarray, rb_ary_entry(arrays[j], counters[j]));
- }
-
- /* put it on the result array */
- if (NIL_P(result)) {
- FL_SET(t0, FL_USER5);
- rb_yield(subarray);
- if (! FL_TEST(t0, FL_USER5)) {
- rb_raise(rb_eRuntimeError, "product reentered");
- }
- else {
- FL_UNSET(t0, FL_USER5);
- }
- }
- else {
- rb_ary_push(result, subarray);
- }
-
- /*
- * Increment the last counter. If it overflows, reset to 0
- * and increment the one before it.
- */
- m = n-1;
- counters[m]++;
- while (counters[m] == RARRAY_LEN(arrays[m])) {
- counters[m] = 0;
- /* If the first counter overflows, we are done */
- if (--m < 0) goto done;
- counters[m]++;
- }
+ int m;
+ /* fill in one subarray */
+ VALUE subarray = rb_ary_new2(n);
+ for (j = 0; j < n; j++) {
+ rb_ary_push(subarray, rb_ary_entry(arrays[j], counters[j]));
+ }
+
+ /* put it on the result array */
+ if (NIL_P(result)) {
+ FL_SET(t0, RARRAY_SHARED_ROOT_FLAG);
+ rb_yield(subarray);
+ if (!FL_TEST(t0, RARRAY_SHARED_ROOT_FLAG)) {
+ rb_raise(rb_eRuntimeError, "product reentered");
+ }
+ else {
+ FL_UNSET(t0, RARRAY_SHARED_ROOT_FLAG);
+ }
+ }
+ else {
+ rb_ary_push(result, subarray);
+ }
+
+ /*
+ * Increment the last counter. If it overflows, reset to 0
+ * and increment the one before it.
+ */
+ m = n-1;
+ counters[m]++;
+ while (counters[m] == RARRAY_LEN(arrays[m])) {
+ counters[m] = 0;
+ /* If the first counter overflows, we are done */
+ if (--m < 0) goto done;
+ counters[m]++;
+ }
}
+
done:
- tmpary_discard(t0);
ALLOCV_END(t1);
return NIL_P(result) ? ary : result;
@@ -6207,16 +7736,19 @@ done:
/*
* call-seq:
- * ary.take(n) -> new_ary
- *
- * Returns first +n+ elements from the array.
+ * array.take(n) -> new_array
*
- * If a negative number is given, raises an ArgumentError.
+ * Returns a new \Array containing the first +n+ element of +self+,
+ * where +n+ is a non-negative \Integer;
+ * does not modify +self+.
*
- * See also Array#drop
+ * Examples:
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.take(3) #=> [1, 2, 3]
+ * a = [0, 1, 2, 3, 4, 5]
+ * a.take(1) # => [0]
+ * a.take(2) # => [0, 1]
+ * a.take(50) # => [0, 1, 2, 3, 4, 5]
+ * a # => [0, 1, 2, 3, 4, 5]
*
*/
@@ -6225,25 +7757,31 @@ rb_ary_take(VALUE obj, VALUE n)
{
long len = NUM2LONG(n);
if (len < 0) {
- rb_raise(rb_eArgError, "attempt to take negative size");
+ rb_raise(rb_eArgError, "attempt to take negative size");
}
return rb_ary_subseq(obj, 0, len);
}
/*
* call-seq:
- * ary.take_while {|obj| block} -> new_ary
- * ary.take_while -> Enumerator
+ * array.take_while {|element| ... } -> new_array
+ * array.take_while -> new_enumerator
*
- * Passes elements to the block until the block returns +nil+ or +false+, then
- * stops iterating and returns an array of all prior elements.
+ * Returns a new \Array containing zero or more leading elements of +self+;
+ * does not modify +self+.
*
- * If no block is given, an Enumerator is returned instead.
+ * With a block given, calls the block with each successive element of +self+;
+ * stops if the block returns +false+ or +nil+;
+ * returns a new \Array containing those elements for which the block returned a truthy value:
*
- * See also Array#drop_while
+ * a = [0, 1, 2, 3, 4, 5]
+ * a.take_while {|element| element < 3 } # => [0, 1, 2]
+ * a.take_while {|element| true } # => [0, 1, 2, 3, 4, 5]
+ * a # => [0, 1, 2, 3, 4, 5]
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.take_while {|i| i < 3} #=> [1, 2]
+ * With no block given, returns a new \Enumerator:
+ *
+ * [0, 1].take_while # => #<Enumerator: [0, 1]:take_while>
*
*/
@@ -6254,24 +7792,25 @@ rb_ary_take_while(VALUE ary)
RETURN_ENUMERATOR(ary, 0, 0);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
+ if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
}
return rb_ary_take(ary, LONG2FIX(i));
}
/*
* call-seq:
- * ary.drop(n) -> new_ary
- *
- * Drops first +n+ elements from +ary+ and returns the rest of the elements in
- * an array.
+ * array.drop(n) -> new_array
*
- * If a negative number is given, raises an ArgumentError.
+ * Returns a new \Array containing all but the first +n+ element of +self+,
+ * where +n+ is a non-negative \Integer;
+ * does not modify +self+.
*
- * See also Array#take
+ * Examples:
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.drop(3) #=> [4, 5, 0]
+ * a = [0, 1, 2, 3, 4, 5]
+ * a.drop(0) # => [0, 1, 2, 3, 4, 5]
+ * a.drop(1) # => [1, 2, 3, 4, 5]
+ * a.drop(2) # => [2, 3, 4, 5]
*
*/
@@ -6281,29 +7820,32 @@ rb_ary_drop(VALUE ary, VALUE n)
VALUE result;
long pos = NUM2LONG(n);
if (pos < 0) {
- rb_raise(rb_eArgError, "attempt to drop negative size");
+ rb_raise(rb_eArgError, "attempt to drop negative size");
}
result = rb_ary_subseq(ary, pos, RARRAY_LEN(ary));
- if (result == Qnil) result = rb_ary_new();
+ if (NIL_P(result)) result = rb_ary_new();
return result;
}
/*
* call-seq:
- * ary.drop_while {|obj| block} -> new_ary
- * ary.drop_while -> Enumerator
+ * array.drop_while {|element| ... } -> new_array
+ * array.drop_while -> new_enumerator
+
+ * Returns a new \Array containing zero or more trailing elements of +self+;
+ * does not modify +self+.
*
- * Drops elements up to, but not including, the first element for which the
- * block returns +nil+ or +false+ and returns an array containing the
- * remaining elements.
+ * With a block given, calls the block with each successive element of +self+;
+ * stops if the block returns +false+ or +nil+;
+ * returns a new \Array _omitting_ those elements for which the block returned a truthy value:
*
- * If no block is given, an Enumerator is returned instead.
+ * a = [0, 1, 2, 3, 4, 5]
+ * a.drop_while {|element| element < 3 } # => [3, 4, 5]
*
- * See also Array#take_while
+ * With no block given, returns a new \Enumerator:
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.drop_while {|i| i < 3 } #=> [3, 4, 5, 0]
+ * [0, 1].drop_while # => # => #<Enumerator: [0, 1]:drop_while>
*
*/
@@ -6314,17 +7856,42 @@ rb_ary_drop_while(VALUE ary)
RETURN_ENUMERATOR(ary, 0, 0);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
+ if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
}
return rb_ary_drop(ary, LONG2FIX(i));
}
/*
* call-seq:
- * ary.any? [{|obj| block} ] -> true or false
- * ary.any?(pattern) -> true or false
+ * array.any? -> true or false
+ * array.any? {|element| ... } -> true or false
+ * array.any?(obj) -> true or false
+ *
+ * Returns +true+ if any element of +self+ meets a given criterion.
+ *
+ * With no block given and no argument, returns +true+ if +self+ has any truthy element,
+ * +false+ otherwise:
+ *
+ * [nil, 0, false].any? # => true
+ * [nil, false].any? # => false
+ * [].any? # => false
+ *
+ * With a block given and no argument, calls the block with each element in +self+;
+ * returns +true+ if the block returns any truthy value, +false+ otherwise:
+ *
+ * [0, 1, 2].any? {|element| element > 1 } # => true
+ * [0, 1, 2].any? {|element| element > 2 } # => false
+ *
+ * If argument +obj+ is given, returns +true+ if +obj+.<tt>===</tt> any element,
+ * +false+ otherwise:
+ *
+ * ['food', 'drink'].any?(/foo/) # => true
+ * ['food', 'drink'].any?(/bar/) # => false
+ * [].any?(/foo/) # => false
+ * [0, 1, 2].any?(1) # => true
+ * [0, 1, 2].any?(3) # => false
*
- * See also Enumerable#any?
+ * Related: Enumerable#any?
*/
static VALUE
@@ -6338,9 +7905,9 @@ rb_ary_any_p(int argc, VALUE *argv, VALUE ary)
if (rb_block_given_p()) {
rb_warn("given block not used");
}
- for (i = 0; i < RARRAY_LEN(ary); ++i) {
- if (RTEST(rb_funcall(argv[0], idEqq, 1, RARRAY_AREF(ary, i)))) return Qtrue;
- }
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ if (RTEST(rb_funcall(argv[0], idEqq, 1, RARRAY_AREF(ary, i)))) return Qtrue;
+ }
}
else if (!rb_block_given_p()) {
for (i = 0; i < len; ++i) {
@@ -6348,19 +7915,43 @@ rb_ary_any_p(int argc, VALUE *argv, VALUE ary)
}
}
else {
- for (i = 0; i < RARRAY_LEN(ary); ++i) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) return Qtrue;
- }
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) return Qtrue;
+ }
}
return Qfalse;
}
/*
* call-seq:
- * ary.all? [{|obj| block} ] -> true or false
- * ary.all?(pattern) -> true or false
+ * array.all? -> true or false
+ * array.all? {|element| ... } -> true or false
+ * array.all?(obj) -> true or false
+ *
+ * Returns +true+ if all elements of +self+ meet a given criterion.
+ *
+ * With no block given and no argument, returns +true+ if +self+ contains only truthy elements,
+ * +false+ otherwise:
+ *
+ * [0, 1, :foo].all? # => true
+ * [0, nil, 2].all? # => false
+ * [].all? # => true
+ *
+ * With a block given and no argument, calls the block with each element in +self+;
+ * returns +true+ if the block returns only truthy values, +false+ otherwise:
+ *
+ * [0, 1, 2].all? { |element| element < 3 } # => true
+ * [0, 1, 2].all? { |element| element < 2 } # => false
+ *
+ * If argument +obj+ is given, returns +true+ if <tt>obj.===</tt> every element, +false+ otherwise:
*
- * See also Enumerable#all?
+ * ['food', 'fool', 'foot'].all?(/foo/) # => true
+ * ['food', 'drink'].all?(/bar/) # => false
+ * [].all?(/foo/) # => true
+ * [0, 0, 0].all?(0) # => true
+ * [0, 1, 2].all?(1) # => false
+ *
+ * Related: Enumerable#all?
*/
static VALUE
@@ -6393,10 +7984,34 @@ rb_ary_all_p(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.none? [{|obj| block} ] -> true or false
- * ary.none?(pattern) -> true or false
+ * array.none? -> true or false
+ * array.none? {|element| ... } -> true or false
+ * array.none?(obj) -> true or false
+ *
+ * Returns +true+ if no element of +self+ meet a given criterion.
+ *
+ * With no block given and no argument, returns +true+ if +self+ has no truthy elements,
+ * +false+ otherwise:
+ *
+ * [nil, false].none? # => true
+ * [nil, 0, false].none? # => false
+ * [].none? # => true
+ *
+ * With a block given and no argument, calls the block with each element in +self+;
+ * returns +true+ if the block returns no truthy value, +false+ otherwise:
+ *
+ * [0, 1, 2].none? {|element| element > 3 } # => true
+ * [0, 1, 2].none? {|element| element > 1 } # => false
*
- * See also Enumerable#none?
+ * If argument +obj+ is given, returns +true+ if <tt>obj.===</tt> no element, +false+ otherwise:
+ *
+ * ['food', 'drink'].none?(/bar/) # => true
+ * ['food', 'drink'].none?(/foo/) # => false
+ * [].none?(/foo/) # => true
+ * [0, 1, 2].none?(3) # => true
+ * [0, 1, 2].none?(1) # => false
+ *
+ * Related: Enumerable#none?
*/
static VALUE
@@ -6429,10 +8044,38 @@ rb_ary_none_p(int argc, VALUE *argv, VALUE ary)
/*
* call-seq:
- * ary.one? [{|obj| block} ] -> true or false
- * ary.one?(pattern) -> true or false
+ * array.one? -> true or false
+ * array.one? {|element| ... } -> true or false
+ * array.one?(obj) -> true or false
+ *
+ * Returns +true+ if exactly one element of +self+ meets a given criterion.
+ *
+ * With no block given and no argument, returns +true+ if +self+ has exactly one truthy element,
+ * +false+ otherwise:
+ *
+ * [nil, 0].one? # => true
+ * [0, 0].one? # => false
+ * [nil, nil].one? # => false
+ * [].one? # => false
*
- * See also Enumerable#one?
+ * With a block given and no argument, calls the block with each element in +self+;
+ * returns +true+ if the block a truthy value for exactly one element, +false+ otherwise:
+ *
+ * [0, 1, 2].one? {|element| element > 0 } # => false
+ * [0, 1, 2].one? {|element| element > 1 } # => true
+ * [0, 1, 2].one? {|element| element > 2 } # => false
+ *
+ * If argument +obj+ is given, returns +true+ if <tt>obj.===</tt> exactly one element,
+ * +false+ otherwise:
+ *
+ * [0, 1, 2].one?(0) # => true
+ * [0, 0, 1].one?(0) # => false
+ * [1, 1, 2].one?(0) # => false
+ * ['food', 'drink'].one?(/bar/) # => false
+ * ['food', 'drink'].one?(/foo/) # => true
+ * [].one?(/foo/) # => false
+ *
+ * Related: Enumerable#one?
*/
static VALUE
@@ -6474,19 +8117,22 @@ rb_ary_one_p(int argc, VALUE *argv, VALUE ary)
}
/*
- * call-seq:
- * ary.dig(idx, ...) -> object
+ * call-seq:
+ * array.dig(index, *identifiers) -> object
+ *
+ * Finds and returns the object in nested objects
+ * that is specified by +index+ and +identifiers+.
+ * The nested objects may be instances of various classes.
+ * See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
*
- * Extracts the nested value specified by the sequence of <i>idx</i>
- * objects by calling +dig+ at each step, returning +nil+ if any
- * intermediate step is +nil+.
+ * Examples:
*
- * a = [[1, [2, 3]]]
+ * a = [:foo, [:bar, :baz, [:bat, :bam]]]
+ * a.dig(1) # => [:bar, :baz, [:bat, :bam]]
+ * a.dig(1, 2) # => [:bat, :bam]
+ * a.dig(1, 2, 0) # => :bat
+ * a.dig(1, 2, 3) # => nil
*
- * a.dig(0, 1, 1) #=> 3
- * a.dig(1, 2, 3) #=> nil
- * a.dig(0, 0, 0) #=> TypeError: Integer does not have #dig method
- * [42, {foo: :bar}].dig(1, :foo) #=> :bar
*/
static VALUE
@@ -6504,14 +8150,8 @@ finish_exact_sum(long n, VALUE r, VALUE v, int z)
{
if (n != 0)
v = rb_fix_plus(LONG2FIX(n), v);
- if (r != Qundef) {
- /* r can be an Integer when mathn is loaded */
- if (FIXNUM_P(r))
- v = rb_fix_plus(r, v);
- else if (RB_TYPE_P(r, T_BIGNUM))
- v = rb_big_plus(r, v);
- else
- v = rb_rational_plus(r, v);
+ if (!UNDEF_P(r)) {
+ v = rb_rational_plus(r, v);
}
else if (!n && z) {
v = rb_fix_plus(LONG2FIX(0), v);
@@ -6521,43 +8161,41 @@ finish_exact_sum(long n, VALUE r, VALUE v, int z)
/*
* call-seq:
- * ary.sum(init=0) -> number
- * ary.sum(init=0) {|e| expr } -> number
- *
- * Returns the sum of elements.
- * For example, [e1, e2, e3].sum returns init + e1 + e2 + e3.
+ * array.sum(init = 0) -> object
+ * array.sum(init = 0) {|element| ... } -> object
*
- * If a block is given, the block is applied to each element
- * before addition.
+ * When no block is given, returns the object equivalent to:
*
- * If <i>ary</i> is empty, it returns <i>init</i>.
+ * sum = init
+ * array.each {|element| sum += element }
+ * sum
*
- * [].sum #=> 0
- * [].sum(0.0) #=> 0.0
- * [1, 2, 3].sum #=> 6
- * [3, 5.5].sum #=> 8.5
- * [2.5, 3.0].sum(0.0) {|e| e * e } #=> 15.25
- * [Object.new].sum #=> TypeError
+ * For example, <tt>[e1, e2, e3].sum</tt> returns <tt>init + e1 + e2 + e3</tt>.
*
- * The (arithmetic) mean value of an array can be obtained as follows.
+ * Examples:
*
- * mean = ary.sum(0.0) / ary.length
+ * a = [0, 1, 2, 3]
+ * a.sum # => 6
+ * a.sum(100) # => 106
*
- * This method can be used for non-numeric objects by
- * explicit <i>init</i> argument.
+ * The elements need not be numeric, but must be <tt>+</tt>-compatible
+ * with each other and with +init+:
*
- * ["a", "b", "c"].sum("") #=> "abc"
- * [[1], [[2]], [3]].sum([]) #=> [1, [2], 3]
+ * a = ['abc', 'def', 'ghi']
+ * a.sum('jkl') # => "jklabcdefghi"
*
- * However, Array#join and Array#flatten is faster than Array#sum for
- * array of strings and array of arrays.
+ * When a block is given, it is called with each element
+ * and the block's return value (instead of the element itself) is used as the addend:
*
- * ["a", "b", "c"].join #=> "abc"
- * [[1], [[2]], [3]].flatten(1) #=> [1, [2], 3]
+ * a = ['zero', 1, :two]
+ * s = a.sum('Coerced and concatenated: ') {|element| element.to_s }
+ * s # => "Coerced and concatenated: zero1two"
*
+ * Notes:
*
- * Array#sum method may not respect method redefinition of "+" methods
- * such as Integer#+.
+ * - Array#join and Array#flatten may be faster than Array#sum
+ * for an \Array of Strings or an \Array of Arrays.
+ * - Array#sum method may not respect method redefinition of "+" methods such as Integer#+.
*
*/
@@ -6588,10 +8226,10 @@ rb_ary_sum(int argc, VALUE *argv, VALUE ary)
n = 0;
}
}
- else if (RB_TYPE_P(e, T_BIGNUM))
+ else if (RB_BIGNUM_TYPE_P(e))
v = rb_big_plus(e, v);
else if (RB_TYPE_P(e, T_RATIONAL)) {
- if (r == Qundef)
+ if (UNDEF_P(r))
r = e;
else
r = rb_rational_plus(r, e);
@@ -6608,7 +8246,7 @@ rb_ary_sum(int argc, VALUE *argv, VALUE ary)
if (RB_FLOAT_TYPE_P(e)) {
/*
* Kahan-Babuska balancing compensated summation algorithm
- * See http://link.springer.com/article/10.1007/s00607-005-0139-x
+ * See https://link.springer.com/article/10.1007/s00607-005-0139-x
*/
double f, c;
double x, t;
@@ -6625,7 +8263,7 @@ rb_ary_sum(int argc, VALUE *argv, VALUE ary)
x = RFLOAT_VALUE(e);
else if (FIXNUM_P(e))
x = FIX2LONG(e);
- else if (RB_TYPE_P(e, T_BIGNUM))
+ else if (RB_BIGNUM_TYPE_P(e))
x = rb_big2dbl(e);
else if (RB_TYPE_P(e, T_RATIONAL))
x = rb_num2dbl(e);
@@ -6678,55 +8316,128 @@ rb_ary_deconstruct(VALUE ary)
}
/*
- * Arrays are ordered, integer-indexed collections of any object.
+ * An \Array is an ordered, integer-indexed collection of objects, called _elements_.
+ * Any object (even another array) may be an array element,
+ * and an array can contain objects of different types.
+ *
+ * == \Array Indexes
+ *
+ * \Array indexing starts at 0, as in C or Java.
+ *
+ * A positive index is an offset from the first element:
+ *
+ * - Index 0 indicates the first element.
+ * - Index 1 indicates the second element.
+ * - ...
+ *
+ * A negative index is an offset, backwards, from the end of the array:
+ *
+ * - Index -1 indicates the last element.
+ * - Index -2 indicates the next-to-last element.
+ * - ...
+ *
+ * A non-negative index is <i>in range</i> if and only if it is smaller than
+ * the size of the array. For a 3-element array:
+ *
+ * - Indexes 0 through 2 are in range.
+ * - Index 3 is out of range.
+ *
+ * A negative index is <i>in range</i> if and only if its absolute value is
+ * not larger than the size of the array. For a 3-element array:
+ *
+ * - Indexes -1 through -3 are in range.
+ * - Index -4 is out of range.
+ *
+ * Although the effective index into an array is always an integer,
+ * some methods (both within and outside of class \Array)
+ * accept one or more non-integer arguments that are
+ * {integer-convertible objects}[rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects].
*
- * Array indexing starts at 0, as in C or Java. A negative index is assumed
- * to be relative to the end of the array---that is, an index of -1 indicates
- * the last element of the array, -2 is the next to last element in the
- * array, and so on.
*
* == Creating Arrays
*
- * A new array can be created by using the literal constructor
- * <code>[]</code>. Arrays can contain different types of objects. For
- * example, the array below contains an Integer, a String and a Float:
+ * You can create an \Array object explicitly with:
+ *
+ * - An {array literal}[rdoc-ref:literals.rdoc@Array+Literals]:
*
- * ary = [1, "two", 3.0] #=> [1, "two", 3.0]
+ * [1, 'one', :one, [2, 'two', :two]]
*
- * An array can also be created by explicitly calling Array.new with zero, one
- * (the initial size of the Array) or two arguments (the initial size and a
- * default object).
+ * - A {%w or %W: string-array Literal}[rdoc-ref:literals.rdoc@25w+and+-25W-3A+String-Array+Literals]:
*
- * ary = Array.new #=> []
- * Array.new(3) #=> [nil, nil, nil]
- * Array.new(3, true) #=> [true, true, true]
+ * %w[foo bar baz] # => ["foo", "bar", "baz"]
+ * %w[1 % *] # => ["1", "%", "*"]
*
- * Note that the second argument populates the array with references to the
- * same object. Therefore, it is only recommended in cases when you need to
- * instantiate arrays with natively immutable objects such as Symbols,
- * numbers, true or false.
+ * - A {%i pr %I: symbol-array Literal}[rdoc-ref:literals.rdoc@25i+and+-25I-3A+Symbol-Array+Literals]:
*
- * To create an array with separate objects a block can be passed instead.
- * This method is safe to use with mutable objects such as hashes, strings or
- * other arrays:
+ * %i[foo bar baz] # => [:foo, :bar, :baz]
+ * %i[1 % *] # => [:"1", :%, :*]
*
- * Array.new(4) {Hash.new} #=> [{}, {}, {}, {}]
- * Array.new(4) {|i| i.to_s } #=> ["0", "1", "2", "3"]
+ * - \Method Kernel#Array:
*
- * This is also a quick way to build up multi-dimensional arrays:
+ * Array(["a", "b"]) # => ["a", "b"]
+ * Array(1..5) # => [1, 2, 3, 4, 5]
+ * Array(key: :value) # => [[:key, :value]]
+ * Array(nil) # => []
+ * Array(1) # => [1]
+ * Array({:a => "a", :b => "b"}) # => [[:a, "a"], [:b, "b"]]
*
- * empty_table = Array.new(3) {Array.new(3)}
- * #=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
+ * - \Method Array.new:
*
- * An array can also be created by using the Array() method, provided by
- * Kernel, which tries to call #to_ary, then #to_a on its argument.
+ * Array.new # => []
+ * Array.new(3) # => [nil, nil, nil]
+ * Array.new(4) {Hash.new} # => [{}, {}, {}, {}]
+ * Array.new(3, true) # => [true, true, true]
*
- * Array({:a => "a", :b => "b"}) #=> [[:a, "a"], [:b, "b"]]
+ * Note that the last example above populates the array
+ * with references to the same object.
+ * This is recommended only in cases where that object is a natively immutable object
+ * such as a symbol, a numeric, +nil+, +true+, or +false+.
+ *
+ * Another way to create an array with various objects, using a block;
+ * this usage is safe for mutable objects such as hashes, strings or
+ * other arrays:
+ *
+ * Array.new(4) {|i| i.to_s } # => ["0", "1", "2", "3"]
+ *
+ * Here is a way to create a multi-dimensional array:
+ *
+ * Array.new(3) {Array.new(3)}
+ * # => [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
+ *
+ * A number of Ruby methods, both in the core and in the standard library,
+ * provide instance method +to_a+, which converts an object to an array.
+ *
+ * - ARGF#to_a
+ * - Array#to_a
+ * - Enumerable#to_a
+ * - Hash#to_a
+ * - MatchData#to_a
+ * - NilClass#to_a
+ * - OptionParser#to_a
+ * - Range#to_a
+ * - Set#to_a
+ * - Struct#to_a
+ * - Time#to_a
+ * - Benchmark::Tms#to_a
+ * - CSV::Table#to_a
+ * - Enumerator::Lazy#to_a
+ * - Gem::List#to_a
+ * - Gem::NameTuple#to_a
+ * - Gem::Platform#to_a
+ * - Gem::RequestSet::Lockfile::Tokenizer#to_a
+ * - Gem::SourceList#to_a
+ * - OpenSSL::X509::Extension#to_a
+ * - OpenSSL::X509::Name#to_a
+ * - Racc::ISet#to_a
+ * - Rinda::RingFinger#to_a
+ * - Ripper::Lexer::Elem#to_a
+ * - RubyVM::InstructionSequence#to_a
+ * - YAML::DBM#to_a
*
* == Example Usage
*
* In addition to the methods it mixes in through the Enumerable module, the
- * Array class has proprietary methods for accessing, searching and otherwise
+ * \Array class has proprietary methods for accessing, searching and otherwise
* manipulating arrays.
*
* Some of the more common ones are illustrated below.
@@ -6774,7 +8485,7 @@ rb_ary_deconstruct(VALUE ary)
*
* arr.drop(3) #=> [4, 5, 6]
*
- * == Obtaining Information about an Array
+ * == Obtaining Information about an \Array
*
* Arrays keep track of their own length at all times. To query an array
* about the number of elements it contains, use #length, #count or #size.
@@ -6812,7 +8523,7 @@ rb_ary_deconstruct(VALUE ary)
* arr.insert(3, 'orange', 'pear', 'grapefruit')
* #=> [0, 1, 2, "orange", "pear", "grapefruit", "apple", 3, 4, 5, 6]
*
- * == Removing Items from an Array
+ * == Removing Items from an \Array
*
* The method #pop removes the last element in an array and returns it:
*
@@ -6854,9 +8565,9 @@ rb_ary_deconstruct(VALUE ary)
*
* == Iterating over Arrays
*
- * Like all classes that include the Enumerable module, Array has an each
+ * Like all classes that include the Enumerable module, \Array has an each
* method, which defines what elements should be iterated over and how. In
- * case of Array's #each, all elements in the Array instance are yielded to
+ * case of Array's #each, all elements in the \Array instance are yielded to
* the supplied block in sequence.
*
* Note that this operation leaves the array unchanged.
@@ -6882,7 +8593,8 @@ rb_ary_deconstruct(VALUE ary)
* arr.map! {|a| a**2} #=> [1, 4, 9, 16, 25]
* arr #=> [1, 4, 9, 16, 25]
*
- * == Selecting Items from an Array
+ *
+ * == Selecting Items from an \Array
*
* Elements can be selected from an array according to criteria defined in a
* block. The selection can happen in a destructive or a non-destructive
@@ -6913,18 +8625,198 @@ rb_ary_deconstruct(VALUE ary)
* arr.keep_if {|a| a < 4} #=> [1, 2, 3]
* arr #=> [1, 2, 3]
*
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \Array:
+ *
+ * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
+ * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
+ * which provides dozens of additional methods.
+ *
+ * Here, class \Array provides methods that are useful for:
+ *
+ * - {Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array]
+ * - {Querying}[rdoc-ref:Array@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Array@Methods+for+Comparing]
+ * - {Fetching}[rdoc-ref:Array@Methods+for+Fetching]
+ * - {Assigning}[rdoc-ref:Array@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:Array@Methods+for+Deleting]
+ * - {Combining}[rdoc-ref:Array@Methods+for+Combining]
+ * - {Iterating}[rdoc-ref:Array@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Array@Methods+for+Converting]
+ * - {And more....}[rdoc-ref:Array@Other+Methods]
+ *
+ * === Methods for Creating an \Array
+ *
+ * - ::[]: Returns a new array populated with given objects.
+ * - ::new: Returns a new array.
+ * - ::try_convert: Returns a new array created from a given object.
+ *
+ * === Methods for Querying
+ *
+ * - #length, #size: Returns the count of elements.
+ * - #include?: Returns whether any element <tt>==</tt> a given object.
+ * - #empty?: Returns whether there are no elements.
+ * - #all?: Returns whether all elements meet a given criterion.
+ * - #any?: Returns whether any element meets a given criterion.
+ * - #none?: Returns whether no element <tt>==</tt> a given object.
+ * - #one?: Returns whether exactly one element <tt>==</tt> a given object.
+ * - #count: Returns the count of elements that meet a given criterion.
+ * - #find_index, #index: Returns the index of the first element that meets a given criterion.
+ * - #rindex: Returns the index of the last element that meets a given criterion.
+ * - #hash: Returns the integer hash code.
+ *
+ * === Methods for Comparing
+ *
+ * - #<=>: Returns -1, 0, or 1 * as +self+ is less than, equal to, or
+ * greater than a given object.
+ * - #==: Returns whether each element in +self+ is <tt>==</tt> to the corresponding element
+ * in a given object.
+ * - #eql?: Returns whether each element in +self+ is <tt>eql?</tt> to the corresponding
+ * element in a given object.
+
+ * === Methods for Fetching
+ *
+ * These methods do not modify +self+.
+ *
+ * - #[]: Returns one or more elements.
+ * - #fetch: Returns the element at a given offset.
+ * - #first: Returns one or more leading elements.
+ * - #last: Returns one or more trailing elements.
+ * - #max: Returns one or more maximum-valued elements,
+ * as determined by <tt><=></tt> or a given block.
+ * - #min: Returns one or more minimum-valued elements,
+ * as determined by <tt><=></tt> or a given block.
+ * - #minmax: Returns the minimum-valued and maximum-valued elements,
+ * as determined by <tt><=></tt> or a given block.
+ * - #assoc: Returns the first element that is an array
+ * whose first element <tt>==</tt> a given object.
+ * - #rassoc: Returns the first element that is an array
+ * whose second element <tt>==</tt> a given object.
+ * - #at: Returns the element at a given offset.
+ * - #values_at: Returns the elements at given offsets.
+ * - #dig: Returns the object in nested objects
+ * that is specified by a given index and additional arguments.
+ * - #drop: Returns trailing elements as determined by a given index.
+ * - #take: Returns leading elements as determined by a given index.
+ * - #drop_while: Returns trailing elements as determined by a given block.
+ * - #take_while: Returns leading elements as determined by a given block.
+ * - #slice: Returns consecutive elements as determined by a given argument.
+ * - #sort: Returns all elements in an order determined by <tt><=></tt> or a given block.
+ * - #reverse: Returns all elements in reverse order.
+ * - #compact: Returns an array containing all non-+nil+ elements.
+ * - #select, #filter: Returns an array containing elements selected by a given block.
+ * - #uniq: Returns an array containing non-duplicate elements.
+ * - #rotate: Returns all elements with some rotated from one end to the other.
+ * - #bsearch: Returns an element selected via a binary search
+ * as determined by a given block.
+ * - #bsearch_index: Returns the index of an element selected via a binary search
+ * as determined by a given block.
+ * - #sample: Returns one or more random elements.
+ * - #shuffle: Returns elements in a random order.
+ *
+ * === Methods for Assigning
+ *
+ * These methods add, replace, or reorder elements in +self+.
+ *
+ * - #[]=: Assigns specified elements with a given object.
+ * - #push, #append, #<<: Appends trailing elements.
+ * - #unshift, #prepend: Prepends leading elements.
+ * - #insert: Inserts given objects at a given offset; does not replace elements.
+ * - #concat: Appends all elements from given arrays.
+ * - #fill: Replaces specified elements with specified objects.
+ * - #replace: Replaces the content of +self+ with the content of a given array.
+ * - #reverse!: Replaces +self+ with its elements reversed.
+ * - #rotate!: Replaces +self+ with its elements rotated.
+ * - #shuffle!: Replaces +self+ with its elements in random order.
+ * - #sort!: Replaces +self+ with its elements sorted,
+ * as determined by <tt><=></tt> or a given block.
+ * - #sort_by!: Replaces +self+ with its elements sorted, as determined by a given block.
+ *
+ * === Methods for Deleting
+ *
+ * Each of these methods removes elements from +self+:
+ *
+ * - #pop: Removes and returns the last element.
+ * - #shift: Removes and returns the first element.
+ * - #compact!: Removes all +nil+ elements.
+ * - #delete: Removes elements equal to a given object.
+ * - #delete_at: Removes the element at a given offset.
+ * - #delete_if: Removes elements specified by a given block.
+ * - #keep_if: Removes elements not specified by a given block.
+ * - #reject!: Removes elements specified by a given block.
+ * - #select!, #filter!: Removes elements not specified by a given block.
+ * - #slice!: Removes and returns a sequence of elements.
+ * - #uniq!: Removes duplicates.
+ *
+ * === Methods for Combining
+ *
+ * - #&: Returns an array containing elements found both in +self+ and a given array.
+ * - #intersection: Returns an array containing elements found both in +self+
+ * and in each given array.
+ * - #+: Returns an array containing all elements of +self+ followed by all elements of a given array.
+ * - #-: Returns an array containing all elements of +self+ that are not found in a given array.
+ * - #|: Returns an array containing all elements of +self+ and all elements of a given array,
+ * duplicates removed.
+ * - #union: Returns an array containing all elements of +self+ and all elements of given arrays,
+ * duplicates removed.
+ * - #difference: Returns an array containing all elements of +self+ that are not found
+ * in any of the given arrays..
+ * - #product: Returns or yields all combinations of elements from +self+ and given arrays.
+ *
+ * === Methods for Iterating
+ *
+ * - #each: Passes each element to a given block.
+ * - #reverse_each: Passes each element, in reverse order, to a given block.
+ * - #each_index: Passes each element index to a given block.
+ * - #cycle: Calls a given block with each element, then does so again,
+ * for a specified number of times, or forever.
+ * - #combination: Calls a given block with combinations of elements of +self+;
+ * a combination does not use the same element more than once.
+ * - #permutation: Calls a given block with permutations of elements of +self+;
+ * a permutation does not use the same element more than once.
+ * - #repeated_combination: Calls a given block with combinations of elements of +self+;
+ * a combination may use the same element more than once.
+ * - #repeated_permutation: Calls a given block with permutations of elements of +self+;
+ * a permutation may use the same element more than once.
+ *
+ * === Methods for Converting
+ *
+ * - #map, #collect: Returns an array containing the block return-value for each element.
+ * - #map!, #collect!: Replaces each element with a block return-value.
+ * - #flatten: Returns an array that is a recursive flattening of +self+.
+ * - #flatten!: Replaces each nested array in +self+ with the elements from that array.
+ * - #inspect, #to_s: Returns a new String containing the elements.
+ * - #join: Returns a newsString containing the elements joined by the field separator.
+ * - #to_a: Returns +self+ or a new array containing all elements.
+ * - #to_ary: Returns +self+.
+ * - #to_h: Returns a new hash formed from the elements.
+ * - #transpose: Transposes +self+, which must be an array of arrays.
+ * - #zip: Returns a new array of arrays containing +self+ and given arrays;
+ * follow the link for details.
+ *
+ * === Other Methods
+ *
+ * - #*: Returns one of the following:
+ *
+ * - With integer argument +n+, a new array that is the concatenation
+ * of +n+ copies of +self+.
+ * - With string argument +field_separator+, a new string that is equivalent to
+ * <tt>join(field_separator)</tt>.
+ *
+ * - #abbrev: Returns a hash of unambiguous abbreviations for elements.
+ * - #pack: Packs the elements into a binary sequence.
+ * - #sum: Returns a sum of elements according to either <tt>+</tt> or a given block.
*/
void
Init_Array(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
rb_cArray = rb_define_class("Array", rb_cObject);
rb_include_module(rb_cArray, rb_mEnumerable);
rb_define_alloc_func(rb_cArray, empty_ary_alloc);
+ rb_define_singleton_method(rb_cArray, "new", rb_ary_s_new, -1);
rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1);
rb_define_singleton_method(rb_cArray, "try_convert", rb_ary_s_try_convert, 1);
rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1);
@@ -6950,6 +8842,7 @@ Init_Array(void)
rb_define_method(rb_cArray, "union", rb_ary_union_multi, -1);
rb_define_method(rb_cArray, "difference", rb_ary_difference_multi, -1);
rb_define_method(rb_cArray, "intersection", rb_ary_intersection_multi, -1);
+ rb_define_method(rb_cArray, "intersect?", rb_ary_intersect_p, 1);
rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
rb_define_alias(rb_cArray, "append", "push");
@@ -6962,7 +8855,7 @@ Init_Array(void)
rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
rb_define_method(rb_cArray, "length", rb_ary_length, 0);
- rb_define_alias(rb_cArray, "size", "length");
+ rb_define_method(rb_cArray, "size", rb_ary_length, 0);
rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
rb_define_method(rb_cArray, "find_index", rb_ary_index, -1);
rb_define_method(rb_cArray, "index", rb_ary_index, -1);
@@ -7022,9 +8915,6 @@ Init_Array(void)
rb_define_method(rb_cArray, "flatten", rb_ary_flatten, -1);
rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, -1);
rb_define_method(rb_cArray, "count", rb_ary_count, -1);
- rb_define_method(rb_cArray, "shuffle!", rb_ary_shuffle_bang, -1);
- rb_define_method(rb_cArray, "shuffle", rb_ary_shuffle, -1);
- rb_define_method(rb_cArray, "sample", rb_ary_sample, -1);
rb_define_method(rb_cArray, "cycle", rb_ary_cycle, -1);
rb_define_method(rb_cArray, "permutation", rb_ary_permutation, -1);
rb_define_method(rb_cArray, "combination", rb_ary_combination, 1);
@@ -7046,6 +8936,6 @@ Init_Array(void)
rb_define_method(rb_cArray, "sum", rb_ary_sum, -1);
rb_define_method(rb_cArray, "deconstruct", rb_ary_deconstruct, 0);
-
- id_random = rb_intern("random");
}
+
+#include "array.rbinc"
diff --git a/array.rb b/array.rb
new file mode 100644
index 0000000000..b9fa9844e6
--- /dev/null
+++ b/array.rb
@@ -0,0 +1,69 @@
+class Array
+ # call-seq:
+ # array.shuffle!(random: Random) -> array
+ #
+ # Shuffles the elements of +self+ in place.
+ # a = [1, 2, 3] #=> [1, 2, 3]
+ # a.shuffle! #=> [2, 3, 1]
+ # a #=> [2, 3, 1]
+ #
+ # The optional +random+ argument will be used as the random number generator:
+ # a.shuffle!(random: Random.new(1)) #=> [1, 3, 2]
+ def shuffle!(random: Random)
+ Primitive.rb_ary_shuffle_bang(random)
+ end
+
+ # call-seq:
+ # array.shuffle(random: Random) -> new_ary
+ #
+ # Returns a new array with elements of +self+ shuffled.
+ # a = [1, 2, 3] #=> [1, 2, 3]
+ # a.shuffle #=> [2, 3, 1]
+ # a #=> [1, 2, 3]
+ #
+ # The optional +random+ argument will be used as the random number generator:
+ # a.shuffle(random: Random.new(1)) #=> [1, 3, 2]
+ def shuffle(random: Random)
+ Primitive.rb_ary_shuffle(random)
+ end
+
+ # call-seq:
+ # array.sample(random: Random) -> object
+ # array.sample(n, random: Random) -> new_ary
+ #
+ # Returns random elements from +self+.
+ #
+ # When no arguments are given, returns a random element from +self+:
+ # a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ # a.sample # => 3
+ # a.sample # => 8
+ # If +self+ is empty, returns +nil+.
+ #
+ # When argument +n+ is given, returns a new \Array containing +n+ random
+ # elements from +self+:
+ # a.sample(3) # => [8, 9, 2]
+ # a.sample(6) # => [9, 6, 10, 3, 1, 4]
+ # Returns no more than <tt>a.size</tt> elements
+ # (because no new duplicates are introduced):
+ # a.sample(a.size * 2) # => [6, 4, 1, 8, 5, 9, 10, 2, 3, 7]
+ # But +self+ may contain duplicates:
+ # a = [1, 1, 1, 2, 2, 3]
+ # a.sample(a.size * 2) # => [1, 1, 3, 2, 1, 2]
+ # The argument +n+ must be a non-negative numeric value.
+ # The order of the result array is unrelated to the order of +self+.
+ # Returns a new empty \Array if +self+ is empty.
+ #
+ # The optional +random+ argument will be used as the random number generator:
+ # a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ # a.sample(random: Random.new(1)) #=> 6
+ # a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2]
+ def sample(n = (ary = false), random: Random)
+ if Primitive.mandatory_only?
+ # Primitive.cexpr! %{ rb_ary_sample(self, rb_cRandom, Qfalse, Qfalse) }
+ Primitive.ary_sample0
+ else
+ # Primitive.cexpr! %{ rb_ary_sample(self, random, n, ary) }
+ Primitive.ary_sample(random, n, ary)
+ end
+ end
+end
diff --git a/ast.c b/ast.c
index 1133fb8a10..adb7287ed3 100644
--- a/ast.c
+++ b/ast.c
@@ -1,11 +1,15 @@
/* indent-tabs-mode: nil */
+#include "internal.h"
+#include "internal/parse.h"
+#include "internal/symbol.h"
+#include "internal/warnings.h"
+#include "iseq.h"
+#include "node.h"
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/util.h"
-#include "internal.h"
-#include "node.h"
#include "vm_core.h"
-#include "iseq.h"
+
#include "builtin.h"
static VALUE rb_mAST;
@@ -13,7 +17,7 @@ static VALUE rb_cNode;
struct ASTNodeData {
rb_ast_t *ast;
- NODE *node;
+ const NODE *node;
};
static void
@@ -40,7 +44,7 @@ static const rb_data_type_t rb_node_type = {
static VALUE rb_ast_node_alloc(VALUE klass);
static void
-setup_node(VALUE obj, rb_ast_t *ast, NODE *node)
+setup_node(VALUE obj, rb_ast_t *ast, const NODE *node)
{
struct ASTNodeData *data;
@@ -50,7 +54,7 @@ setup_node(VALUE obj, rb_ast_t *ast, NODE *node)
}
static VALUE
-ast_new_internal(rb_ast_t *ast, NODE *node)
+ast_new_internal(rb_ast_t *ast, const NODE *node)
{
VALUE obj;
@@ -60,9 +64,8 @@ ast_new_internal(rb_ast_t *ast, NODE *node)
return obj;
}
-static VALUE rb_ast_parse_str(VALUE str);
-static VALUE rb_ast_parse_file(VALUE path);
-static VALUE rb_ast_parse_array(VALUE array);
+static VALUE rb_ast_parse_str(VALUE str, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens);
+static VALUE rb_ast_parse_file(VALUE path, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens);
static VALUE
ast_parse_new(void)
@@ -82,29 +85,33 @@ ast_parse_done(rb_ast_t *ast)
}
static VALUE
-ast_s_parse(rb_execution_context_t *ec, VALUE module, VALUE str)
+ast_s_parse(rb_execution_context_t *ec, VALUE module, VALUE str, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
{
- return rb_ast_parse_str(str);
+ return rb_ast_parse_str(str, keep_script_lines, error_tolerant, keep_tokens);
}
static VALUE
-rb_ast_parse_str(VALUE str)
+rb_ast_parse_str(VALUE str, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
{
rb_ast_t *ast = 0;
StringValue(str);
- ast = rb_parser_compile_string_path(ast_parse_new(), Qnil, str, 1);
+ VALUE vparser = ast_parse_new();
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(vparser);
+ if (RTEST(error_tolerant)) rb_parser_error_tolerant(vparser);
+ if (RTEST(keep_tokens)) rb_parser_keep_tokens(vparser);
+ ast = rb_parser_compile_string_path(vparser, Qnil, str, 1);
return ast_parse_done(ast);
}
static VALUE
-ast_s_parse_file(rb_execution_context_t *ec, VALUE module, VALUE path)
+ast_s_parse_file(rb_execution_context_t *ec, VALUE module, VALUE path, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
{
- return rb_ast_parse_file(path);
+ return rb_ast_parse_file(path, keep_script_lines, error_tolerant, keep_tokens);
}
static VALUE
-rb_ast_parse_file(VALUE path)
+rb_ast_parse_file(VALUE path, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
{
VALUE f;
rb_ast_t *ast = 0;
@@ -113,7 +120,11 @@ rb_ast_parse_file(VALUE path)
FilePathValue(path);
f = rb_file_open_str(path, "r");
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
- ast = rb_parser_compile_file_path(ast_parse_new(), Qnil, f, 1);
+ VALUE vparser = ast_parse_new();
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(vparser);
+ if (RTEST(error_tolerant)) rb_parser_error_tolerant(vparser);
+ if (RTEST(keep_tokens)) rb_parser_keep_tokens(vparser);
+ ast = rb_parser_compile_file_path(vparser, Qnil, f, 1);
rb_io_close(f);
return ast_parse_done(ast);
}
@@ -132,16 +143,20 @@ lex_array(VALUE array, int index)
}
static VALUE
-rb_ast_parse_array(VALUE array)
+rb_ast_parse_array(VALUE array, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
{
rb_ast_t *ast = 0;
array = rb_check_array_type(array);
- ast = rb_parser_compile_generic(ast_parse_new(), lex_array, Qnil, array, 1);
+ VALUE vparser = ast_parse_new();
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(vparser);
+ if (RTEST(error_tolerant)) rb_parser_error_tolerant(vparser);
+ if (RTEST(keep_tokens)) rb_parser_keep_tokens(vparser);
+ ast = rb_parser_compile_generic(vparser, lex_array, Qnil, array, 1);
return ast_parse_done(ast);
}
-static VALUE node_children(rb_ast_t*, NODE*);
+static VALUE node_children(rb_ast_t*, const NODE*);
static VALUE
node_find(VALUE self, const int node_id)
@@ -184,35 +199,69 @@ script_lines(VALUE path)
}
static VALUE
-ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body)
+node_id_for_backtrace_location(rb_execution_context_t *ec, VALUE module, VALUE location)
{
- VALUE path, node, lines;
int node_id;
- const rb_iseq_t *iseq = NULL;
- if (rb_obj_is_proc(body)) {
- iseq = vm_proc_iseq(body);
+ if (!rb_frame_info_p(location)) {
+ rb_raise(rb_eTypeError, "Thread::Backtrace::Location object expected");
+ }
- if (!rb_obj_is_iseq((VALUE)iseq)) {
- iseq = NULL;
- }
+ node_id = rb_get_node_id_from_frame_info(location);
+ if (node_id == -1) {
+ return Qnil;
+ }
+
+ return INT2NUM(node_id);
+}
+
+static VALUE
+ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE keep_script_lines, VALUE error_tolerant, VALUE keep_tokens)
+{
+ VALUE node, lines = Qnil;
+ const rb_iseq_t *iseq;
+ int node_id;
+
+ if (rb_frame_info_p(body)) {
+ iseq = rb_get_iseq_from_frame_info(body);
+ node_id = rb_get_node_id_from_frame_info(body);
}
else {
- iseq = rb_method_iseq(body);
+ iseq = NULL;
+
+ if (rb_obj_is_proc(body)) {
+ iseq = vm_proc_iseq(body);
+
+ if (!rb_obj_is_iseq((VALUE)iseq)) return Qnil;
+ }
+ else {
+ iseq = rb_method_iseq(body);
+ }
+ if (iseq) {
+ node_id = ISEQ_BODY(iseq)->location.node_id;
+ }
}
- if (!iseq) return Qnil;
+ if (!iseq) {
+ return Qnil;
+ }
+ lines = ISEQ_BODY(iseq)->variable.script_lines;
+
+ VALUE path = rb_iseq_path(iseq);
+ int e_option = RSTRING_LEN(path) == 2 && memcmp(RSTRING_PTR(path), "-e", 2) == 0;
+
+ if (NIL_P(lines) && rb_iseq_from_eval_p(iseq) && !e_option) {
+ rb_raise(rb_eArgError, "cannot get AST for method defined in eval");
+ }
- path = rb_iseq_path(iseq);
- node_id = iseq->body->location.node_id;
- if (!NIL_P(lines = script_lines(path))) {
- node = rb_ast_parse_array(lines);
+ if (!NIL_P(lines) || !NIL_P(lines = script_lines(path))) {
+ node = rb_ast_parse_array(lines, keep_script_lines, error_tolerant, keep_tokens);
}
- else if (RSTRING_LEN(path) == 2 && memcmp(RSTRING_PTR(path), "-e", 2) == 0) {
- node = rb_ast_parse_str(rb_e_script);
+ else if (e_option) {
+ node = rb_ast_parse_str(rb_e_script, keep_script_lines, error_tolerant, keep_tokens);
}
else {
- node = rb_ast_parse_file(path);
+ node = rb_ast_parse_file(path, keep_script_lines, error_tolerant, keep_tokens);
}
return node_find(node, node_id);
@@ -242,6 +291,15 @@ ast_node_type(rb_execution_context_t *ec, VALUE self)
return rb_sym_intern_ascii_cstr(node_type_to_str(data->node));
}
+static VALUE
+ast_node_node_id(rb_execution_context_t *ec, VALUE self)
+{
+ struct ASTNodeData *data;
+ TypedData_Get_Struct(self, struct ASTNodeData, &rb_node_type, data);
+
+ return INT2FIX(nd_node_id(data->node));
+}
+
#define NEW_CHILD(ast, node) node ? ast_new_internal(ast, node) : Qnil
static VALUE
@@ -264,13 +322,13 @@ rb_ary_new_from_node_args(rb_ast_t *ast, long n, ...)
}
static VALUE
-dump_block(rb_ast_t *ast, NODE *node)
+dump_block(rb_ast_t *ast, const NODE *node)
{
VALUE ary = rb_ary_new();
do {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
} while (node->nd_next &&
- nd_type(node->nd_next) == NODE_BLOCK &&
+ nd_type_p(node->nd_next, NODE_BLOCK) &&
(node = node->nd_next, 1));
if (node->nd_next) {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_next));
@@ -280,12 +338,12 @@ dump_block(rb_ast_t *ast, NODE *node)
}
static VALUE
-dump_array(rb_ast_t *ast, NODE *node)
+dump_array(rb_ast_t *ast, const NODE *node)
{
VALUE ary = rb_ary_new();
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
- while (node->nd_next && nd_type(node->nd_next) == NODE_LIST) {
+ while (node->nd_next && nd_type_p(node->nd_next, NODE_LIST)) {
node = node->nd_next;
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
}
@@ -303,7 +361,21 @@ var_name(ID id)
}
static VALUE
-node_children(rb_ast_t *ast, NODE *node)
+no_name_rest(void)
+{
+ ID rest;
+ CONST_ID(rest, "NODE_SPECIAL_NO_NAME_REST");
+ return ID2SYM(rest);
+}
+
+static VALUE
+rest_arg(rb_ast_t *ast, const NODE *rest_arg)
+{
+ return NODE_NAMED_REST_P(rest_arg) ? NEW_CHILD(ast, rest_arg) : no_name_rest();
+}
+
+static VALUE
+node_children(rb_ast_t *ast, const NODE *node)
{
char name[DECIMAL_SIZE_OF_BITS(sizeof(long) * CHAR_BIT) + 2]; /* including '$' */
@@ -326,22 +398,17 @@ node_children(rb_ast_t *ast, NODE *node)
case NODE_IN:
return rb_ary_new_from_node_args(ast, 3, node->nd_head, node->nd_body, node->nd_next);
case NODE_WHILE:
- goto loop;
case NODE_UNTIL:
- loop:
return rb_ary_push(rb_ary_new_from_node_args(ast, 2, node->nd_cond, node->nd_body),
- (node->nd_state ? Qtrue : Qfalse));
+ RBOOL(node->nd_state));
case NODE_ITER:
case NODE_FOR:
return rb_ary_new_from_node_args(ast, 2, node->nd_iter, node->nd_body);
case NODE_FOR_MASGN:
return rb_ary_new_from_node_args(ast, 1, node->nd_var);
case NODE_BREAK:
- goto jump;
case NODE_NEXT:
- goto jump;
case NODE_RETURN:
- jump:
return rb_ary_new_from_node_args(ast, 1, node->nd_stts);
case NODE_REDO:
return rb_ary_new_from_node_args(ast, 0);
@@ -356,15 +423,13 @@ node_children(rb_ast_t *ast, NODE *node)
case NODE_ENSURE:
return rb_ary_new_from_node_args(ast, 2, node->nd_head, node->nd_ensr);
case NODE_AND:
- goto andor;
case NODE_OR:
- andor:
{
VALUE ary = rb_ary_new();
while (1) {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_1st));
- if (!node->nd_2nd || nd_type(node->nd_2nd) != (int)type)
+ if (!node->nd_2nd || !nd_type_p(node->nd_2nd, type))
break;
node = node->nd_2nd;
}
@@ -378,24 +443,17 @@ node_children(rb_ast_t *ast, NODE *node)
else {
return rb_ary_new_from_args(3, NEW_CHILD(ast, node->nd_value),
NEW_CHILD(ast, node->nd_head),
- ID2SYM(rb_intern("NODE_SPECIAL_NO_NAME_REST")));
+ no_name_rest());
}
case NODE_LASGN:
- goto asgn;
case NODE_DASGN:
- goto asgn;
- case NODE_DASGN_CURR:
- goto asgn;
case NODE_IASGN:
- goto asgn;
case NODE_CVASGN:
- asgn:
+ case NODE_GASGN:
if (NODE_REQUIRED_KEYWORD_P(node)) {
return rb_ary_new_from_args(2, var_name(node->nd_vid), ID2SYM(rb_intern("NODE_SPECIAL_REQUIRED_KEYWORD")));
}
return rb_ary_new_from_args(2, var_name(node->nd_vid), NEW_CHILD(ast, node->nd_value));
- case NODE_GASGN:
- goto asgn;
case NODE_CDECL:
if (node->nd_vid) {
return rb_ary_new_from_args(2, ID2SYM(node->nd_vid), NEW_CHILD(ast, node->nd_value));
@@ -407,9 +465,10 @@ node_children(rb_ast_t *ast, NODE *node)
NEW_CHILD(ast, node->nd_args->nd_head),
NEW_CHILD(ast, node->nd_args->nd_body));
case NODE_OP_ASGN2:
- return rb_ary_new_from_args(4, NEW_CHILD(ast, node->nd_recv),
- node->nd_next->nd_aid ? Qtrue : Qfalse,
+ return rb_ary_new_from_args(5, NEW_CHILD(ast, node->nd_recv),
+ RBOOL(node->nd_next->nd_aid),
ID2SYM(node->nd_next->nd_vid),
+ ID2SYM(node->nd_next->nd_mid),
NEW_CHILD(ast, node->nd_value));
case NODE_OP_ASGN_AND:
return rb_ary_new_from_args(3, NEW_CHILD(ast, node->nd_head), ID2SYM(idANDOP),
@@ -437,9 +496,7 @@ node_children(rb_ast_t *ast, NODE *node)
case NODE_ZSUPER:
return rb_ary_new_from_node_args(ast, 0);
case NODE_LIST:
- goto ary;
case NODE_VALUES:
- ary:
return dump_array(ast, node);
case NODE_ZLIST:
return rb_ary_new_from_node_args(ast, 0);
@@ -463,8 +520,6 @@ node_children(rb_ast_t *ast, NODE *node)
name[1] = (char)node->nd_nth;
name[2] = '\0';
return rb_ary_new_from_args(1, ID2SYM(rb_intern(name)));
- case NODE_MATCH:
- goto lit;
case NODE_MATCH2:
if (node->nd_args) {
return rb_ary_new_from_node_args(ast, 3, node->nd_recv, node->nd_value, node->nd_args);
@@ -472,26 +527,26 @@ node_children(rb_ast_t *ast, NODE *node)
return rb_ary_new_from_node_args(ast, 2, node->nd_recv, node->nd_value);
case NODE_MATCH3:
return rb_ary_new_from_node_args(ast, 2, node->nd_recv, node->nd_value);
+ case NODE_MATCH:
case NODE_LIT:
- goto lit;
case NODE_STR:
- goto lit;
case NODE_XSTR:
- lit:
return rb_ary_new_from_args(1, node->nd_lit);
case NODE_ONCE:
return rb_ary_new_from_node_args(ast, 1, node->nd_body);
case NODE_DSTR:
- goto dlit;
case NODE_DXSTR:
- goto dlit;
case NODE_DREGX:
- goto dlit;
case NODE_DSYM:
- dlit:
- return rb_ary_new_from_args(3, node->nd_lit,
- NEW_CHILD(ast, node->nd_next->nd_head),
- NEW_CHILD(ast, node->nd_next->nd_next));
+ {
+ NODE *n = node->nd_next;
+ VALUE head = Qnil, next = Qnil;
+ if (n) {
+ head = NEW_CHILD(ast, n->nd_head);
+ next = NEW_CHILD(ast, n->nd_next);
+ }
+ return rb_ary_new_from_args(3, node->nd_lit, head, next);
+ }
case NODE_EVSTR:
return rb_ary_new_from_node_args(ast, 1, node->nd_body);
case NODE_ARGSCAT:
@@ -523,13 +578,9 @@ node_children(rb_ast_t *ast, NODE *node)
case NODE_COLON3:
return rb_ary_new_from_args(1, ID2SYM(node->nd_mid));
case NODE_DOT2:
- goto dot;
case NODE_DOT3:
- goto dot;
case NODE_FLIP2:
- goto dot;
case NODE_FLIP3:
- dot:
return rb_ary_new_from_node_args(ast, 2, node->nd_beg, node->nd_end);
case NODE_SELF:
return rb_ary_new_from_node_args(ast, 0);
@@ -557,7 +608,7 @@ node_children(rb_ast_t *ast, NODE *node)
if (NODE_NAMED_REST_P(node->nd_1st)) {
return rb_ary_new_from_node_args(ast, 2, node->nd_1st, node->nd_2nd);
}
- return rb_ary_new_from_args(2, ID2SYM(rb_intern("NODE_SPECIAL_NO_NAME_REST")),
+ return rb_ary_new_from_args(2, no_name_rest(),
NEW_CHILD(ast, node->nd_2nd));
case NODE_ARGS:
{
@@ -569,32 +620,44 @@ node_children(rb_ast_t *ast, NODE *node)
var_name(ainfo->first_post_arg),
INT2NUM(ainfo->post_args_num),
NEW_CHILD(ast, ainfo->post_init),
- var_name(ainfo->rest_arg),
+ (ainfo->rest_arg == NODE_SPECIAL_EXCESSIVE_COMMA
+ ? ID2SYM(rb_intern("NODE_SPECIAL_EXCESSIVE_COMMA"))
+ : var_name(ainfo->rest_arg)),
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_args)),
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_rest_arg)),
var_name(ainfo->block_arg));
}
case NODE_SCOPE:
{
- ID *tbl = node->nd_tbl;
- int i, size = tbl ? (int)*tbl++ : 0;
+ rb_ast_id_table_t *tbl = node->nd_tbl;
+ int i, size = tbl ? tbl->size : 0;
VALUE locals = rb_ary_new_capa(size);
for (i = 0; i < size; i++) {
- rb_ary_push(locals, var_name(tbl[i]));
+ rb_ary_push(locals, var_name(tbl->ids[i]));
}
return rb_ary_new_from_args(3, locals, NEW_CHILD(ast, node->nd_args), NEW_CHILD(ast, node->nd_body));
}
case NODE_ARYPTN:
{
struct rb_ary_pattern_info *apinfo = node->nd_apinfo;
- VALUE rest = NODE_NAMED_REST_P(apinfo->rest_arg) ? NEW_CHILD(ast, apinfo->rest_arg) :
- ID2SYM(rb_intern("NODE_SPECIAL_NO_NAME_REST"));
+ VALUE rest = rest_arg(ast, apinfo->rest_arg);
return rb_ary_new_from_args(4,
NEW_CHILD(ast, node->nd_pconst),
NEW_CHILD(ast, apinfo->pre_args),
rest,
NEW_CHILD(ast, apinfo->post_args));
}
+ case NODE_FNDPTN:
+ {
+ struct rb_fnd_pattern_info *fpinfo = node->nd_fpinfo;
+ VALUE pre_rest = rest_arg(ast, fpinfo->pre_rest_arg);
+ VALUE post_rest = rest_arg(ast, fpinfo->post_rest_arg);
+ return rb_ary_new_from_args(4,
+ NEW_CHILD(ast, node->nd_pconst),
+ pre_rest,
+ NEW_CHILD(ast, fpinfo->args),
+ post_rest);
+ }
case NODE_HSHPTN:
{
VALUE kwrest = node->nd_pkwrestarg == NODE_SPECIAL_NO_REST_KEYWORD ? ID2SYM(rb_intern("NODE_SPECIAL_NO_REST_KEYWORD")) :
@@ -605,6 +668,8 @@ node_children(rb_ast_t *ast, NODE *node)
NEW_CHILD(ast, node->nd_pkwargs),
kwrest);
}
+ case NODE_ERROR:
+ return rb_ary_new_from_node_args(ast, 0);
case NODE_ARGS_AUX:
case NODE_LAST:
break;
@@ -659,6 +724,15 @@ ast_node_last_column(rb_execution_context_t *ec, VALUE self)
}
static VALUE
+ast_node_all_tokens(rb_execution_context_t *ec, VALUE self)
+{
+ struct ASTNodeData *data;
+ TypedData_Get_Struct(self, struct ASTNodeData, &rb_node_type, data);
+
+ return rb_ast_tokens(data->ast);
+}
+
+static VALUE
ast_node_inspect(rb_execution_context_t *ec, VALUE self)
{
VALUE str;
@@ -678,6 +752,16 @@ ast_node_inspect(rb_execution_context_t *ec, VALUE self)
return str;
}
+static VALUE
+ast_node_script_lines(rb_execution_context_t *ec, VALUE self)
+{
+ struct ASTNodeData *data;
+ TypedData_Get_Struct(self, struct ASTNodeData, &rb_node_type, data);
+ VALUE ret = data->ast->body.script_lines;
+ if (!RB_TYPE_P(ret, T_ARRAY)) return Qnil;
+ return ret;
+}
+
#include "ast.rbinc"
void
@@ -686,6 +770,4 @@ Init_ast(void)
rb_mAST = rb_define_module_under(rb_cRubyVM, "AbstractSyntaxTree");
rb_cNode = rb_define_class_under(rb_mAST, "Node", rb_cObject);
rb_undef_alloc_func(rb_cNode);
-
- load_ast();
}
diff --git a/ast.rb b/ast.rb
index 1fedf76649..f3f72c747f 100644
--- a/ast.rb
+++ b/ast.rb
@@ -1,143 +1,275 @@
# for ast.c
-class RubyVM
+# AbstractSyntaxTree provides methods to parse Ruby code into
+# abstract syntax trees. The nodes in the tree
+# are instances of RubyVM::AbstractSyntaxTree::Node.
+#
+# This module is MRI specific as it exposes implementation details
+# of the MRI abstract syntax tree.
+#
+# This module is experimental and its API is not stable, therefore it might
+# change without notice. As examples, the order of children nodes is not
+# guaranteed, the number of children nodes might change, there is no way to
+# access children nodes by name, etc.
+#
+# If you are looking for a stable API or an API working under multiple Ruby
+# implementations, consider using the _parser_ gem or Ripper. If you would
+# like to make RubyVM::AbstractSyntaxTree stable, please join the discussion
+# at https://bugs.ruby-lang.org/issues/14844.
+#
+module RubyVM::AbstractSyntaxTree
- # AbstractSyntaxTree provides methods to parse Ruby code into
- # abstract syntax trees. The nodes in the tree
- # are instances of RubyVM::AbstractSyntaxTree::Node.
+ # call-seq:
+ # RubyVM::AbstractSyntaxTree.parse(string, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node
#
- # This class is MRI specific as it exposes implementation details
- # of the MRI abstract syntax tree.
+ # Parses the given _string_ into an abstract syntax tree,
+ # returning the root node of that tree.
#
- # This class is experimental and its API is not stable, therefore it might
- # change without notice. As examples, the order of children nodes is not
- # guaranteed, the number of children nodes might change, there is no way to
- # access children nodes by name, etc.
+ # RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
+ # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9>
#
- # If you are looking for a stable API or an API working under multiple Ruby
- # implementations, consider using the _parser_ gem or Ripper. If you would
- # like to make RubyVM::AbstractSyntaxTree stable, please join the discussion
- # at https://bugs.ruby-lang.org/issues/14844.
+ # If <tt>keep_script_lines: true</tt> option is provided, the text of the parsed
+ # source is associated with nodes and is available via Node#script_lines.
#
- module AbstractSyntaxTree
+ # If <tt>keep_tokens: true</tt> option is provided, Node#tokens are populated.
+ #
+ # SyntaxError is raised if the given _string_ is invalid syntax. To overwrite this
+ # behavior, <tt>error_tolerant: true</tt> can be provided. In this case, the parser
+ # will produce a tree where expressions with syntax errors would be represented by
+ # Node with <tt>type=:ERROR</tt>.
+ #
+ # root = RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2")
+ # # <internal:ast>:33:in `parse': syntax error, unexpected ';', expecting ')' (SyntaxError)
+ # # x = 1; p(x; y=2
+ # # ^
+ #
+ # root = RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)
+ # # (SCOPE@1:0-1:15
+ # # tbl: [:x, :y]
+ # # args: nil
+ # # body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))))
+ # root.children.last.children
+ # # [(LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)),
+ # # (ERROR@1:7-1:11),
+ # # (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))]
+ #
+ # Note that parsing continues even after the errored expresion.
+ #
+ def self.parse string, keep_script_lines: false, error_tolerant: false, keep_tokens: false
+ Primitive.ast_s_parse string, keep_script_lines, error_tolerant, keep_tokens
+ end
+
+ # call-seq:
+ # RubyVM::AbstractSyntaxTree.parse_file(pathname, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node
+ #
+ # Reads the file from _pathname_, then parses it like ::parse,
+ # returning the root node of the abstract syntax tree.
+ #
+ # SyntaxError is raised if _pathname_'s contents are not
+ # valid Ruby syntax.
+ #
+ # RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
+ # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>
+ #
+ # See ::parse for explanation of keyword argument meaning and usage.
+ def self.parse_file pathname, keep_script_lines: false, error_tolerant: false, keep_tokens: false
+ Primitive.ast_s_parse_file pathname, keep_script_lines, error_tolerant, keep_tokens
+ end
+
+ # call-seq:
+ # RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node
+ # RubyVM::AbstractSyntaxTree.of(method, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node
+ #
+ # Returns AST nodes of the given _proc_ or _method_.
+ #
+ # RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
+ # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:35-1:42>
+ #
+ # def hello
+ # puts "hello, world"
+ # end
+ #
+ # RubyVM::AbstractSyntaxTree.of(method(:hello))
+ # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-3:3>
+ #
+ # See ::parse for explanation of keyword argument meaning and usage.
+ def self.of body, keep_script_lines: false, error_tolerant: false, keep_tokens: false
+ Primitive.ast_s_of body, keep_script_lines, error_tolerant, keep_tokens
+ end
+
+ # call-seq:
+ # RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(backtrace_location) -> integer
+ #
+ # Returns the node id for the given backtrace location.
+ #
+ # begin
+ # raise
+ # rescue => e
+ # loc = e.backtrace_locations.first
+ # RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(loc)
+ # end # => 0
+ def self.node_id_for_backtrace_location backtrace_location
+ Primitive.node_id_for_backtrace_location backtrace_location
+ end
+
+ # RubyVM::AbstractSyntaxTree::Node instances are created by parse methods in
+ # RubyVM::AbstractSyntaxTree.
+ #
+ # This class is MRI specific.
+ #
+ class Node
# call-seq:
- # RubyVM::AbstractSyntaxTree.parse(string) -> RubyVM::AbstractSyntaxTree::Node
+ # node.type -> symbol
#
- # Parses the given _string_ into an abstract syntax tree,
- # returning the root node of that tree.
+ # Returns the type of this node as a symbol.
#
- # SyntaxError is raised if the given _string_ is invalid syntax.
+ # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
+ # root.type # => :SCOPE
+ # lasgn = root.children[2]
+ # lasgn.type # => :LASGN
+ # call = lasgn.children[1]
+ # call.type # => :OPCALL
+ def type
+ Primitive.ast_node_type
+ end
+
+ # call-seq:
+ # node.first_lineno -> integer
#
- # RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
- # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9>
- def self.parse string
- __builtin_ast_s_parse string
+ # The line number in the source code where this AST's text began.
+ def first_lineno
+ Primitive.ast_node_first_lineno
end
# call-seq:
- # RubyVM::AbstractSyntaxTree.parse_file(pathname) -> RubyVM::AbstractSyntaxTree::Node
+ # node.first_column -> integer
#
- # Reads the file from _pathname_, then parses it like ::parse,
- # returning the root node of the abstract syntax tree.
+ # The column number in the source code where this AST's text began.
+ def first_column
+ Primitive.ast_node_first_column
+ end
+
+ # call-seq:
+ # node.last_lineno -> integer
#
- # SyntaxError is raised if _pathname_'s contents are not
- # valid Ruby syntax.
+ # The line number in the source code where this AST's text ended.
+ def last_lineno
+ Primitive.ast_node_last_lineno
+ end
+
+ # call-seq:
+ # node.last_column -> integer
#
- # RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
- # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>
- def self.parse_file pathname
- __builtin_ast_s_parse_file pathname
+ # The column number in the source code where this AST's text ended.
+ def last_column
+ Primitive.ast_node_last_column
end
# call-seq:
- # RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node
- # RubyVM::AbstractSyntaxTree.of(method) -> RubyVM::AbstractSyntaxTree::Node
+ # node.tokens -> array
#
- # Returns AST nodes of the given _proc_ or _method_.
+ # Returns tokens corresponding to the location of the node.
+ # Returns +nil+ if +keep_tokens+ is not enabled when #parse method is called.
#
- # RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
- # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:35-1:42>
+ # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2", keep_tokens: true)
+ # root.tokens # => [[0, :tIDENTIFIER, "x", [1, 0, 1, 1]], [1, :tSP, " ", [1, 1, 1, 2]], ...]
+ # root.tokens.map{_1[2]}.join # => "x = 1 + 2"
#
- # def hello
- # puts "hello, world"
- # end
+ # Token is an array of:
#
- # RubyVM::AbstractSyntaxTree.of(method(:hello))
- # # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-3:3>
- def self.of body
- __builtin_ast_s_of body
+ # - id
+ # - token type
+ # - source code text
+ # - location [ first_lineno, first_column, last_lineno, last_column ]
+ def tokens
+ return nil unless all_tokens
+
+ all_tokens.each_with_object([]) do |token, a|
+ loc = token.last
+ if ([first_lineno, first_column] <=> [loc[0], loc[1]]) <= 0 &&
+ ([last_lineno, last_column] <=> [loc[2], loc[3]]) >= 0
+ a << token
+ end
+ end
end
- # RubyVM::AbstractSyntaxTree::Node instances are created by parse methods in
- # RubyVM::AbstractSyntaxTree.
+ # call-seq:
+ # node.all_tokens -> array
#
- # This class is MRI specific.
+ # Returns all tokens for the input script regardless the receiver node.
+ # Returns +nil+ if +keep_tokens+ is not enabled when #parse method is called.
#
- class Node
-
- # call-seq:
- # node.type -> symbol
- #
- # Returns the type of this node as a symbol.
- #
- # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
- # root.type # => :SCOPE
- # call = root.children[2]
- # call.type # => :OPCALL
- def type
- __builtin_ast_node_type
- end
-
- # call-seq:
- # node.first_lineno -> integer
- #
- # The line number in the source code where this AST's text began.
- def first_lineno
- __builtin_ast_node_first_lineno
- end
+ # root = RubyVM::AbstractSyntaxTree.parse("x = 1 + 2", keep_tokens: true)
+ # root.all_tokens # => [[0, :tIDENTIFIER, "x", [1, 0, 1, 1]], [1, :tSP, " ", [1, 1, 1, 2]], ...]
+ # root.children[-1].all_tokens # => [[0, :tIDENTIFIER, "x", [1, 0, 1, 1]], [1, :tSP, " ", [1, 1, 1, 2]], ...]
+ def all_tokens
+ Primitive.ast_node_all_tokens
+ end
- # call-seq:
- # node.first_column -> integer
- #
- # The column number in the source code where this AST's text began.
- def first_column
- __builtin_ast_node_first_column
- end
+ # call-seq:
+ # node.children -> array
+ #
+ # Returns AST nodes under this one. Each kind of node
+ # has different children, depending on what kind of node it is.
+ #
+ # The returned array may contain other nodes or <code>nil</code>.
+ def children
+ Primitive.ast_node_children
+ end
- # call-seq:
- # node.last_lineno -> integer
- #
- # The line number in the source code where this AST's text ended.
- def last_lineno
- __builtin_ast_node_last_lineno
- end
+ # call-seq:
+ # node.inspect -> string
+ #
+ # Returns debugging information about this node as a string.
+ def inspect
+ Primitive.ast_node_inspect
+ end
- # call-seq:
- # node.last_column -> integer
- #
- # The column number in the source code where this AST's text ended.
- def last_column
- __builtin_ast_node_last_column
- end
+ # call-seq:
+ # node.node_id -> integer
+ #
+ # Returns an internal node_id number.
+ # Note that this is an API for ruby internal use, debugging,
+ # and research. Do not use this for any other purpose.
+ # The compatibility is not guaranteed.
+ def node_id
+ Primitive.ast_node_node_id
+ end
- # call-seq:
- # node.children -> array
- #
- # Returns AST nodes under this one. Each kind of node
- # has different children, depending on what kind of node it is.
- #
- # The returned array may contain other nodes or <code>nil</code>.
- def children
- __builtin_ast_node_children
- end
+ # call-seq:
+ # node.script_lines -> array
+ #
+ # Returns the original source code as an array of lines.
+ #
+ # Note that this is an API for ruby internal use, debugging,
+ # and research. Do not use this for any other purpose.
+ # The compatibility is not guaranteed.
+ def script_lines
+ Primitive.ast_node_script_lines
+ end
- # call-seq:
- # node.inspect -> string
- #
- # Returns debugging information about this node as a string.
- def inspect
- __builtin_ast_node_inspect
+ # call-seq:
+ # node.source -> string
+ #
+ # Returns the code fragment that corresponds to this AST.
+ #
+ # Note that this is an API for ruby internal use, debugging,
+ # and research. Do not use this for any other purpose.
+ # The compatibility is not guaranteed.
+ #
+ # Also note that this API may return an incomplete code fragment
+ # that does not parse; for example, a here document following
+ # an expression may be dropped.
+ def source
+ lines = script_lines
+ if lines
+ lines = lines[first_lineno - 1 .. last_lineno - 1]
+ lines[-1] = lines[-1][0...last_column]
+ lines[0] = lines[0][first_column..-1]
+ lines.join
+ else
+ nil
end
end
end
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000000..f8cdf3c0c1
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+PWD=
+case "$0" in
+*/*) srcdir=`dirname $0`;;
+*) srcdir="";;
+esac
+
+symlink='--install --symlink'
+case " $* " in
+ *" -i "*|*" --install "*)
+ # reset to copy missing standard auxiliary files, instead of symlinks
+ symlink=
+ ;;
+esac
+
+exec ${AUTORECONF:-autoreconf} ${symlink} "$@" ${srcdir:+"$srcdir"}
diff --git a/basictest/test.rb b/basictest/test.rb
index 25a4298234..95875b52a6 100755
--- a/basictest/test.rb
+++ b/basictest/test.rb
@@ -1425,9 +1425,6 @@ marity_test(:test_ok)
marity_test(:marity_test)
marity_test(:p)
-lambda(&method(:test_ok)).call(true)
-lambda(&block_get{|a,n| test_ok(a,n)}).call(true, 2)
-
class ITER_TEST1
def a
block_given?
@@ -1963,6 +1960,8 @@ test_ok(p1.call == 5)
test_ok(i7 == nil)
end
+# WASI doesn't support spawning a new process for now.
+unless /wasi/ =~ RUBY_PLATFORM
test_check "system"
test_ok(`echo foobar` == "foobar\n")
test_ok(`./miniruby -e 'print "foobar"'` == 'foobar')
@@ -2013,6 +2012,7 @@ test_ok(done)
File.unlink script_tmp or `/bin/rm -f "#{script_tmp}"`
File.unlink "#{script_tmp}.bak" or `/bin/rm -f "#{script_tmp}.bak"`
+end # not /wasi/ =~ RUBY_PLATFORM
test_check "const"
TEST1 = 1
@@ -2140,7 +2140,7 @@ $_ = foobar
test_ok($_ == foobar)
class Gods
- @@rule = "Uranus" # private to Gods
+ @@rule = "Uranus"
def ruler0
@@rule
end
@@ -2163,7 +2163,7 @@ module Olympians
end
class Titans < Gods
- @@rule = "Cronus" # do not affect @@rule in Gods
+ @@rule = "Cronus" # modifies @@rule in Gods
include Olympians
def ruler4
@@rule
@@ -2178,7 +2178,14 @@ test_ok(Titans.ruler2 == "Cronus")
atlas = Titans.new
test_ok(atlas.ruler0 == "Cronus")
test_ok(atlas.ruler3 == "Zeus")
-test_ok(atlas.ruler4 == "Cronus")
+begin
+ atlas.ruler4
+rescue RuntimeError => e
+ test_ok(e.message.include?("class variable @@rule of Olympians is overtaken by Gods"))
+else
+ test_ok(false)
+end
+test_ok(atlas.ruler3 == "Zeus")
test_check "trace"
$x = 1234
diff --git a/benchmark/README.md b/benchmark/README.md
index 24a2669143..e11381cad9 100644
--- a/benchmark/README.md
+++ b/benchmark/README.md
@@ -28,15 +28,17 @@ See also:
```console
Usage: benchmark-driver [options] RUBY|YAML...
- -r, --runner TYPE Specify runner type: ips, time, memory, once (default: ips)
- -o, --output TYPE Specify output type: compare, simple, markdown, record (default: compare)
+ -r, --runner TYPE Specify runner type: ips, time, memory, once, block (default: ips)
+ -o, --output TYPE Specify output type: compare, simple, markdown, record, all (default: compare)
-e, --executables EXECS Ruby executables (e1::path1 arg1; e2::path2 arg2;...)
--rbenv VERSIONS Ruby executables in rbenv (x.x.x arg1;y.y.y arg2;...)
--repeat-count NUM Try benchmark NUM times and use the fastest result or the worst memory usage
--repeat-result TYPE Yield "best", "average" or "worst" result with --repeat-count (default: best)
+ --alternate Alternate executables instead of running the same executable in a row with --repeat-count
--bundler Install and use gems specified in Gemfile
--filter REGEXP Filter out benchmarks with given regexp
--run-duration SECONDS Warmup estimates loop_count to run for this duration (default: 3)
+ --timeout SECONDS Timeout ruby command execution with timeout(1)
-v, --verbose Verbose mode. Multiple -v options increase visilibity (max: 2)
```
@@ -53,20 +55,20 @@ make benchmark
# Or compare with specific ruby binary
make benchmark COMPARE_RUBY="/path/to/ruby --jit"
-# Run vm1 benchmarks
-make benchmark ITEM=vm1
+# Run vm benchmarks
+make benchmark ITEM=vm
# Run some limited benchmarks in ITEM-matched files
-make benchmark ITEM=vm1 OPTS=--filter=block
+make benchmark ITEM=vm OPTS=--filter=block
# You can specify the benchmark by an exact filename instead of using the default argument:
# ARGS = $$(find $(srcdir)/benchmark -maxdepth 1 -name '*$(ITEM)*.yml' -o -name '*$(ITEM)*.rb')
-make benchmark ARGS=../benchmark/erb_render.yml
+make benchmark ARGS=benchmark/erb_render.yml
# You can specify any option via $OPTS
make benchmark OPTS="--help"
# With `make benchmark`, some special runner plugins are available:
# -r peak, -r size, -r total, -r utime, -r stime, -r cutime, -r cstime
-make benchmark ITEM=vm2_bigarray OPTS="-r peak"
+make benchmark ITEM=vm_bigarray OPTS="-r peak"
```
diff --git a/benchmark/array_max_float.yml b/benchmark/array_max_float.yml
new file mode 100644
index 0000000000..ace1ae2e14
--- /dev/null
+++ b/benchmark/array_max_float.yml
@@ -0,0 +1,30 @@
+prelude: |
+ ary2 = 2.times.map(&:to_f).shuffle
+ ary10 = 10.times.map(&:to_f).shuffle
+ ary100 = 100.times.map(&:to_f).shuffle
+ ary500 = 500.times.map(&:to_f).shuffle
+ ary1000 = 1000.times.map(&:to_f).shuffle
+ ary2000 = 2500.times.map(&:to_f).shuffle
+ ary3000 = 2500.times.map(&:to_f).shuffle
+ ary5000 = 5000.times.map(&:to_f).shuffle
+ ary10000 = 10000.times.map(&:to_f).shuffle
+ ary20000 = 20000.times.map(&:to_f).shuffle
+ ary50000 = 50000.times.map(&:to_f).shuffle
+ ary100000 = 100000.times.map(&:to_f).shuffle
+
+benchmark:
+ ary2.max: ary2.max
+ ary10.max: ary10.max
+ ary100.max: ary100.max
+ ary500.max: ary500.max
+ ary1000.max: ary1000.max
+ ary2000.max: ary2000.max
+ ary3000.max: ary3000.max
+ ary5000.max: ary5000.max
+ ary10000.max: ary10000.max
+ ary20000.max: ary20000.max
+ ary50000.max: ary50000.max
+ ary100000.max: ary100000.max
+
+loop_count: 10000
+
diff --git a/benchmark/array_max_int.yml b/benchmark/array_max_int.yml
new file mode 100644
index 0000000000..acd83684d0
--- /dev/null
+++ b/benchmark/array_max_int.yml
@@ -0,0 +1,31 @@
+prelude: |
+ ary2 = 2.times.to_a.shuffle
+ ary10 = 10.times.to_a.shuffle
+ ary100 = 100.times.to_a.shuffle
+ ary500 = 500.times.to_a.shuffle
+ ary1000 = 1000.times.to_a.shuffle
+ ary2000 = 2500.times.to_a.shuffle
+ ary3000 = 2500.times.to_a.shuffle
+ ary5000 = 5000.times.to_a.shuffle
+ ary10000 = 10000.times.to_a.shuffle
+ ary20000 = 20000.times.to_a.shuffle
+ ary50000 = 50000.times.to_a.shuffle
+ ary100000 = 100000.times.to_a.shuffle
+ ary1000000 = 1000000.times.to_a.shuffle
+
+benchmark:
+ ary2.max: ary2.max
+ ary10.max: ary10.max
+ ary100.max: ary100.max
+ ary500.max: ary500.max
+ ary1000.max: ary1000.max
+ ary2000.max: ary2000.max
+ ary3000.max: ary3000.max
+ ary5000.max: ary5000.max
+ ary10000.max: ary10000.max
+ ary20000.max: ary20000.max
+ ary50000.max: ary50000.max
+ ary100000.max: ary100000.max
+ ary1000000.max: ary1000000.max
+
+loop_count: 10000
diff --git a/benchmark/array_max_str.yml b/benchmark/array_max_str.yml
new file mode 100644
index 0000000000..2aeed010f2
--- /dev/null
+++ b/benchmark/array_max_str.yml
@@ -0,0 +1,30 @@
+prelude: |
+ ary2 = 2.times.map(&:to_s).shuffle
+ ary10 = 10.times.map(&:to_s).shuffle
+ ary100 = 100.times.map(&:to_s).shuffle
+ ary500 = 500.times.map(&:to_s).shuffle
+ ary1000 = 1000.times.map(&:to_s).shuffle
+ ary2000 = 2500.times.map(&:to_s).shuffle
+ ary3000 = 2500.times.map(&:to_s).shuffle
+ ary5000 = 5000.times.map(&:to_s).shuffle
+ ary10000 = 10000.times.map(&:to_s).shuffle
+ ary20000 = 20000.times.map(&:to_s).shuffle
+ ary50000 = 50000.times.map(&:to_s).shuffle
+ ary100000 = 100000.times.map(&:to_s).shuffle
+
+benchmark:
+ ary2.max: ary2.max
+ ary10.max: ary10.max
+ ary100.max: ary100.max
+ ary500.max: ary500.max
+ ary1000.max: ary1000.max
+ ary2000.max: ary2000.max
+ ary3000.max: ary3000.max
+ ary5000.max: ary5000.max
+ ary10000.max: ary10000.max
+ ary20000.max: ary20000.max
+ ary50000.max: ary50000.max
+ ary100000.max: ary100000.max
+
+loop_count: 10000
+
diff --git a/benchmark/array_min.yml b/benchmark/array_min.yml
new file mode 100644
index 0000000000..53e5072b14
--- /dev/null
+++ b/benchmark/array_min.yml
@@ -0,0 +1,31 @@
+prelude: |
+ ary2 = 2.times.to_a.shuffle
+ ary10 = 10.times.to_a.shuffle
+ ary100 = 100.times.to_a.shuffle
+ ary500 = 500.times.to_a.shuffle
+ ary1000 = 1000.times.to_a.shuffle
+ ary2000 = 2500.times.to_a.shuffle
+ ary3000 = 2500.times.to_a.shuffle
+ ary5000 = 5000.times.to_a.shuffle
+ ary10000 = 10000.times.to_a.shuffle
+ ary20000 = 20000.times.to_a.shuffle
+ ary50000 = 50000.times.to_a.shuffle
+ ary100000 = 100000.times.to_a.shuffle
+ ary1000000 = 1000000.times.to_a.shuffle
+
+benchmark:
+ ary2.min: ary2.min
+ ary10.min: ary10.min
+ ary100.min: ary100.min
+ ary500.min: ary500.min
+ ary1000.min: ary1000.min
+ ary2000.min: ary2000.min
+ ary3000.min: ary3000.min
+ ary5000.min: ary5000.min
+ ary10000.min: ary10000.min
+ ary20000.min: ary20000.min
+ ary50000.min: ary50000.min
+ ary100000.min: ary100000.min
+ ary1000000.min: ary1000000.min
+
+loop_count: 10000
diff --git a/benchmark/array_sample.yml b/benchmark/array_sample.yml
new file mode 100644
index 0000000000..1cd2b34794
--- /dev/null
+++ b/benchmark/array_sample.yml
@@ -0,0 +1,4 @@
+prelude: ary = (1..10_000).to_a
+benchmark:
+ - ary.sample
+ - ary.sample(2)
diff --git a/benchmark/array_sort_int.yml b/benchmark/array_sort_int.yml
new file mode 100644
index 0000000000..7b9027ebf7
--- /dev/null
+++ b/benchmark/array_sort_int.yml
@@ -0,0 +1,15 @@
+prelude: |
+ ary2 = 2.times.to_a.shuffle
+ ary10 = 10.times.to_a.shuffle
+ ary100 = 100.times.to_a.shuffle
+ ary1000 = 1000.times.to_a.shuffle
+ ary10000 = 10000.times.to_a.shuffle
+
+benchmark:
+ ary2.sort: ary2.sort
+ ary10.sort: ary10.sort
+ ary100.sort: ary100.sort
+ ary1000.sort: ary1000.sort
+ ary10000.sort: ary10000.sort
+
+loop_count: 10000
diff --git a/benchmark/attr_accessor.yml b/benchmark/attr_accessor.yml
new file mode 100644
index 0000000000..82134cdf9b
--- /dev/null
+++ b/benchmark/attr_accessor.yml
@@ -0,0 +1,29 @@
+prelude: |
+ class C
+ attr_accessor :x
+ def initialize
+ @x = nil
+ end
+ class_eval <<-END
+ def ar
+ #{'x;'*256}
+ end
+ def aw
+ #{'self.x = nil;'*256}
+ end
+ def arm
+ m = method(:x)
+ #{'m.call;'*256}
+ end
+ def awm
+ m = method(:x=)
+ #{'m.call(nil);'*256}
+ end
+ END
+ end
+ obj = C.new
+benchmark:
+ attr_reader: "obj.ar"
+ attr_writer: "obj.aw"
+ attr_reader_method: "obj.arm"
+ attr_writer_method: "obj.awm"
diff --git a/benchmark/buffer_each.yml b/benchmark/buffer_each.yml
new file mode 100644
index 0000000000..417941104e
--- /dev/null
+++ b/benchmark/buffer_each.yml
@@ -0,0 +1,27 @@
+prelude: |
+ # frozen_string_literal: true
+ Warning[:experimental] = false
+ string = "The quick brown fox jumped over the lazy dog."
+ array = string.bytes
+ buffer = IO::Buffer.for(string)
+benchmark:
+ string.each_byte: |
+ upcased = String.new
+ string.each_byte do |byte|
+ upcased << (byte ^ 32)
+ end
+ array.each: |
+ upcased = String.new
+ array.each do |byte|
+ upcased << (byte ^ 32)
+ end
+ buffer.each: |
+ upcased = String.new
+ buffer.each(:U8) do |offset, byte|
+ upcased << (byte ^ 32)
+ end
+ buffer.each_byte: |
+ upcased = String.new
+ buffer.each_byte do |byte|
+ upcased << (byte ^ 32)
+ end
diff --git a/benchmark/buffer_get.yml b/benchmark/buffer_get.yml
new file mode 100644
index 0000000000..9e1f99d64e
--- /dev/null
+++ b/benchmark/buffer_get.yml
@@ -0,0 +1,25 @@
+prelude: |
+ # frozen_string_literal: true
+ Warning[:experimental] = false
+ string = "The quick brown fox jumped over the lazy dog."
+ buffer = IO::Buffer.for(string)
+ format = [:U32, :U32, :U32, :U32]
+benchmark:
+ string.unpack1: |
+ [
+ string.unpack1("N"),
+ string.unpack1("N", offset: 4),
+ string.unpack1("N", offset: 8),
+ string.unpack1("N", offset: 12),
+ ]
+ buffer.get_value: |
+ [
+ buffer.get_value(:U32, 0),
+ buffer.get_value(:U32, 4),
+ buffer.get_value(:U32, 8),
+ buffer.get_value(:U32, 12),
+ ]
+ buffer.get_values: |
+ buffer.get_values(format, 0)
+ string.unpack: |
+ string.unpack("NNNN")
diff --git a/benchmark/cgi_escape_html.yml b/benchmark/cgi_escape_html.yml
index af6abd08ac..655be9d7d8 100644
--- a/benchmark/cgi_escape_html.yml
+++ b/benchmark/cgi_escape_html.yml
@@ -1,32 +1,23 @@
-prelude: require 'cgi/escape'
+prelude: |
+ # frozen_string_literal: true
+ require 'cgi/escape'
benchmark:
- - name: escape_html_blank
- prelude: str = ""
- script: CGI.escapeHTML(str)
+ - script: CGI.escapeHTML("")
loop_count: 20000000
- - name: escape_html_short_none
- prelude: str = "abcde"
- script: CGI.escapeHTML(str)
+ - script: CGI.escapeHTML("abcde")
loop_count: 20000000
- - name: escape_html_short_one
- prelude: str = "abcd<"
- script: CGI.escapeHTML(str)
+ - script: CGI.escapeHTML("abcd<")
loop_count: 20000000
- - name: escape_html_short_all
- prelude: str = "'&\"<>"
- script: CGI.escapeHTML(str)
+ - script: CGI.escapeHTML("'&\"<>")
loop_count: 5000000
- - name: escape_html_long_none
- prelude: str = "abcde" * 300
- script: CGI.escapeHTML(str)
+ - prelude: long_no_escape = "abcde" * 300
+ script: CGI.escapeHTML(long_no_escape)
loop_count: 1000000
- - name: escape_html_long_all
- prelude: str = "'&\"<>" * 10
- script: CGI.escapeHTML(str)
+ - prelude: long_all_escape = "'&\"<>" * 10
+ script: CGI.escapeHTML(long_all_escape)
loop_count: 1000000
- - name: escape_html_real
- prelude: | # http://example.com/
- str = <<~HTML
+ - prelude: | # http://example.com/
+ example_html = <<~HTML
<body>
<div>
<h1>Example Domain</h1>
@@ -36,5 +27,5 @@ benchmark:
</div>
</body>
HTML
- script: CGI.escapeHTML(str)
+ script: CGI.escapeHTML(example_html)
loop_count: 1000000
diff --git a/benchmark/constant_invalidation.rb b/benchmark/constant_invalidation.rb
new file mode 100644
index 0000000000..a95ec6f37e
--- /dev/null
+++ b/benchmark/constant_invalidation.rb
@@ -0,0 +1,22 @@
+$VERBOSE = nil
+
+CONSTANT1 = 1
+CONSTANT2 = 1
+CONSTANT3 = 1
+CONSTANT4 = 1
+CONSTANT5 = 1
+
+def constants
+ [CONSTANT1, CONSTANT2, CONSTANT3, CONSTANT4, CONSTANT5]
+end
+
+500_000.times do
+ constants
+
+ # With previous behavior, this would cause all of the constant caches
+ # associated with the constant lookups listed above to invalidate, meaning
+ # they would all have to be fetched again. With current behavior, it only
+ # invalidates when a name matches, so the following constant set shouldn't
+ # impact the constant lookups listed above.
+ INVALIDATE = true
+end
diff --git a/benchmark/enum_lazy_flat_map.yml b/benchmark/enum_lazy_flat_map.yml
new file mode 100644
index 0000000000..0ee390a441
--- /dev/null
+++ b/benchmark/enum_lazy_flat_map.yml
@@ -0,0 +1,16 @@
+prelude: |
+ num = (1..).lazy.take(100)
+ ary2 = [[1,2]].cycle.lazy.take(10)
+ ary10 = [[*1..10]].cycle.lazy.take(10)
+ ary20 = [[*1..20]].cycle.lazy.take(10)
+ ary50 = [[*1..50]].cycle.lazy.take(10)
+ ary100 = [[*1..100]].cycle.lazy.take(10)
+
+benchmark:
+ num3: num.flat_map {|x| x}.take(3).to_a
+ num10: num.flat_map {|x| x}.take(3).to_a
+ ary2: ary2.flat_map {|x| x}.take(3).to_a
+ ary10: ary10.flat_map {|x| x}.take(3).to_a
+ ary20: ary20.flat_map {|x| x}.take(3).to_a
+ ary50: ary50.flat_map {|x| x}.take(3).to_a
+ ary100: ary100.flat_map {|x| x}.take(3).to_a
diff --git a/benchmark/enum_lazy_zip.yml b/benchmark/enum_lazy_zip.yml
new file mode 100644
index 0000000000..4566ff0261
--- /dev/null
+++ b/benchmark/enum_lazy_zip.yml
@@ -0,0 +1,22 @@
+prelude: |
+ a = (1..3).lazy
+ b = a.map {|x| x}
+
+benchmark:
+ first_ary: a.zip(["a", "b", "c"]).first
+ first_nonary: a.zip("a".."c").first
+ first_noarg: a.zip.first
+
+ take3_ary: a.zip(["a", "b", "c"]).take(3).force
+ take3_nonary: a.zip("a".."c").take(3).force
+ take3_noarg: a.zip.take(3).force
+
+ chain-first_ary: b.zip(["a", "b", "c"]).first
+ chain-first_nonary: b.zip("a".."c").first
+ chain-first_noarg: b.zip.first
+
+ chain-take3_ary: b.zip(["a", "b", "c"]).take(3).force
+ chain-take3_nonary: b.zip("a".."c").take(3).force
+ chain-take3_noarg: b.zip.take(3).force
+
+ block: a.zip("a".."c") {|x, y| [x, y]}
diff --git a/benchmark/enum_minmax.yml b/benchmark/enum_minmax.yml
new file mode 100644
index 0000000000..9d01731abb
--- /dev/null
+++ b/benchmark/enum_minmax.yml
@@ -0,0 +1,25 @@
+prelude: |
+ set2 = 2.times.to_a.shuffle.to_set
+ set10 = 10.times.to_a.shuffle.to_set
+ set100 = 100.times.to_a.shuffle.to_set
+ set1000 = 1000.times.to_a.shuffle.to_set
+ set10000 = 10000.times.to_a.shuffle.to_set
+
+benchmark:
+ set2.min: set2.min
+ set10.min: set10.min
+ set100.min: set100.min
+ set1000.min: set1000.min
+ set10000.min: set10000.min
+ set2.max: set2.max
+ set10.max: set10.max
+ set100.max: set100.max
+ set1000.max: set1000.max
+ set10000.max: set10000.max
+ set2.minmax: set2.minmax
+ set10.minmax: set10.minmax
+ set100.minmax: set100.minmax
+ set1000.minmax: set1000.minmax
+ set10000.minmax: set10000.minmax
+
+loop_count: 10000
diff --git a/benchmark/enum_sort.yml b/benchmark/enum_sort.yml
new file mode 100644
index 0000000000..6f26e748c6
--- /dev/null
+++ b/benchmark/enum_sort.yml
@@ -0,0 +1,15 @@
+prelude: |
+ set2 = 2.times.to_a.shuffle.to_set
+ set10 = 10.times.to_a.shuffle.to_set
+ set100 = 100.times.to_a.shuffle.to_set
+ set1000 = 1000.times.to_a.shuffle.to_set
+ set10000 = 10000.times.to_a.shuffle.to_set
+
+benchmark:
+ set2.sort_by: set2.sort_by { 0 }
+ set10.sort_by: set10.sort_by { 0 }
+ set100.sort_by: set100.sort_by { 0 }
+ set1000.sort_by: set1000.sort_by { 0 }
+ set10000.sort_by: set10000.sort_by { 0 }
+
+loop_count: 10000
diff --git a/benchmark/enum_tally.yml b/benchmark/enum_tally.yml
new file mode 100644
index 0000000000..edd2e040a0
--- /dev/null
+++ b/benchmark/enum_tally.yml
@@ -0,0 +1,4 @@
+prelude: |
+ list = ("aaa".."zzz").to_a*10
+benchmark:
+ tally: list.tally
diff --git a/benchmark/erb_escape_html.yml b/benchmark/erb_escape_html.yml
new file mode 100644
index 0000000000..ca28d756e7
--- /dev/null
+++ b/benchmark/erb_escape_html.yml
@@ -0,0 +1,31 @@
+prelude: |
+ # frozen_string_literal: true
+ require 'erb'
+benchmark:
+ - script: ERB::Util.html_escape("")
+ loop_count: 20000000
+ - script: ERB::Util.html_escape("abcde")
+ loop_count: 20000000
+ - script: ERB::Util.html_escape("abcd<")
+ loop_count: 20000000
+ - script: ERB::Util.html_escape("'&\"<>")
+ loop_count: 5000000
+ - prelude: long_no_escape = "abcde" * 300
+ script: ERB::Util.html_escape(long_no_escape)
+ loop_count: 1000000
+ - prelude: long_all_escape = "'&\"<>" * 10
+ script: ERB::Util.html_escape(long_all_escape)
+ loop_count: 1000000
+ - prelude: | # http://example.com/
+ example_html = <<~HTML
+ <body>
+ <div>
+ <h1>Example Domain</h1>
+ <p>This domain is established to be used for illustrative examples in documents. You may use this
+ domain in examples without prior coordination or asking for permission.</p>
+ <p><a href="http://www.iana.org/domains/example">More information...</a></p>
+ </div>
+ </body>
+ HTML
+ script: ERB::Util.html_escape(example_html)
+ loop_count: 1000000
diff --git a/benchmark/fiber_chain.yml b/benchmark/fiber_chain.yml
index a36c759f8e..a36c759f8e 100755..100644
--- a/benchmark/fiber_chain.yml
+++ b/benchmark/fiber_chain.yml
diff --git a/benchmark/fiber_locals.yml b/benchmark/fiber_locals.yml
new file mode 100644
index 0000000000..8588686477
--- /dev/null
+++ b/benchmark/fiber_locals.yml
@@ -0,0 +1,8 @@
+prelude: |
+ th = Thread.current
+ th[:key] = :val
+benchmark:
+ key?: th.key?(:key)
+ []: th[:key]
+ keys: th.keys
+loop_count: 1_000_000
diff --git a/benchmark/float_methods.yml b/benchmark/float_methods.yml
new file mode 100644
index 0000000000..56ea41effc
--- /dev/null
+++ b/benchmark/float_methods.yml
@@ -0,0 +1,14 @@
+prelude: |
+ flo = 4.2
+benchmark:
+ to_f: |
+ flo.to_f
+ abs: |
+ flo.abs
+ magnitude: |
+ flo.magnitude
+ -@: |
+ -flo
+ zero?: |
+ flo.zero?
+loop_count: 20000000
diff --git a/benchmark/float_neg_posi.yml b/benchmark/float_neg_posi.yml
new file mode 100644
index 0000000000..172db1bf6d
--- /dev/null
+++ b/benchmark/float_neg_posi.yml
@@ -0,0 +1,8 @@
+prelude: |
+ flo = 4.2
+benchmark:
+ negative?: |
+ flo.negative?
+ positive?: |
+ flo.positive?
+loop_count: 20000000
diff --git a/benchmark/float_to_s.yml b/benchmark/float_to_s.yml
new file mode 100644
index 0000000000..0abae5cdb8
--- /dev/null
+++ b/benchmark/float_to_s.yml
@@ -0,0 +1,7 @@
+prelude: |
+ floats = [*0.0.step(1.0, 0.0001)]
+
+benchmark:
+ to_s: floats.each {|f| f.to_s}
+
+loop_count: 1000
diff --git a/benchmark/hash_aref_array.rb b/benchmark/hash_aref_array.rb
new file mode 100644
index 0000000000..ac7a683d95
--- /dev/null
+++ b/benchmark/hash_aref_array.rb
@@ -0,0 +1,5 @@
+h = {}
+arrays = (0..99).each_slice(10).to_a
+#STDERR.puts arrays.inspect
+arrays.each { |s| h[s] = s }
+200_000.times { arrays.each { |s| h[s] } }
diff --git a/benchmark/hash_defaults.yml b/benchmark/hash_defaults.yml
new file mode 100644
index 0000000000..833f10e1c7
--- /dev/null
+++ b/benchmark/hash_defaults.yml
@@ -0,0 +1,6 @@
+prelude: |
+ h = Hash.new { :foo }
+benchmark:
+ default_aref: h[1]
+ default_method: h.default(1)
+loop_count: 1000000
diff --git a/benchmark/hash_first.yml b/benchmark/hash_first.yml
new file mode 100644
index 0000000000..c26df1a7ed
--- /dev/null
+++ b/benchmark/hash_first.yml
@@ -0,0 +1,11 @@
+prelude: |
+ hash1 = 1_000_000.times.to_h { [rand, true]}
+ hash2 = hash1.dup
+ hash2.keys[1..100_000].each { hash2.delete _1 }
+ hash2.delete hash2.first[0]
+
+benchmark:
+ hash1: hash1.first
+ hash2: hash2.first
+
+loop_count: 100_000
diff --git a/benchmark/io_write.rb b/benchmark/io_write.rb
new file mode 100644
index 0000000000..cdb409948b
--- /dev/null
+++ b/benchmark/io_write.rb
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+
+require 'benchmark'
+
+i, o = IO.pipe
+o.sync = true
+
+DOT = ".".freeze
+
+chunks = 100_000.times.collect{DOT}
+
+thread = Thread.new do
+ while i.read(1024)
+ end
+end
+
+100.times do
+ o.write(*chunks)
+end
+
+o.close
+thread.join
diff --git a/benchmark/iseq_load_from_binary.yml b/benchmark/iseq_load_from_binary.yml
new file mode 100644
index 0000000000..7e9d73bdd4
--- /dev/null
+++ b/benchmark/iseq_load_from_binary.yml
@@ -0,0 +1,25 @@
+prelude: |
+ symbol = RubyVM::InstructionSequence.compile(":foo; :bar; :baz; :egg; :spam").to_binary
+
+ define_method = RubyVM::InstructionSequence.compile(%{
+ def foo; end
+ def bar; end
+ def baz; end
+ def egg; end
+ def spam; end
+ }).to_binary
+
+ all = RubyVM::InstructionSequence.compile(%{
+ module Foo; def foo; :foo; end; end
+ module Bar; def bar; :bar; end; end
+ module Baz; def baz; :baz; end; end
+ class Egg; def egg; :egg; end; end
+ class Spaml; def spam; :spam; end; end
+ }).to_binary
+
+benchmark:
+ symbol: RubyVM::InstructionSequence.load_from_binary(symbol)
+ define_method: RubyVM::InstructionSequence.load_from_binary(define_method)
+ all: RubyVM::InstructionSequence.load_from_binary(all)
+
+loop_count: 100_000
diff --git a/benchmark/ivar_extend.yml b/benchmark/ivar_extend.yml
new file mode 100644
index 0000000000..eb9ee923f5
--- /dev/null
+++ b/benchmark/ivar_extend.yml
@@ -0,0 +1,23 @@
+prelude: |
+ class Embedded
+ def initialize
+ @a = 1
+ @b = 1
+ @c = 1
+ end
+ end
+
+ class Extended
+ def initialize
+ @a = 1
+ @b = 1
+ @c = 1
+ @d = 1
+ @e = 1
+ @f = 1
+ end
+ end
+benchmark:
+ embedded: Embedded.new
+ extended: Extended.new
+loop_count: 20_000_000
diff --git a/benchmark/kernel_clone.yml b/benchmark/kernel_clone.yml
new file mode 100644
index 0000000000..069b23abcd
--- /dev/null
+++ b/benchmark/kernel_clone.yml
@@ -0,0 +1,6 @@
+prelude: "object = Object.new"
+benchmark:
+ clone: "object.clone"
+ clone_true: "object.clone(freeze: true)"
+ clone_false: "object.clone(freeze: false)"
+loop_count: 10000
diff --git a/benchmark/kernel_float.yml b/benchmark/kernel_float.yml
new file mode 100644
index 0000000000..215f6750fc
--- /dev/null
+++ b/benchmark/kernel_float.yml
@@ -0,0 +1,5 @@
+benchmark:
+ float: "Float(42)"
+ float_true: "Float(42, exception: true)"
+ float_false: "Float(42, exception: false)"
+loop_count: 10000
diff --git a/benchmark/kernel_tap.yml b/benchmark/kernel_tap.yml
new file mode 100644
index 0000000000..4dcbb31b4d
--- /dev/null
+++ b/benchmark/kernel_tap.yml
@@ -0,0 +1,6 @@
+prelude: |
+ obj = Object.new
+ x = nil
+benchmark:
+ kernel_tap: obj.tap { |o| x = o }
+loop_count: 20000000
diff --git a/benchmark/kernel_then.yml b/benchmark/kernel_then.yml
new file mode 100644
index 0000000000..85f7341e33
--- /dev/null
+++ b/benchmark/kernel_then.yml
@@ -0,0 +1,6 @@
+benchmark:
+ kernel_then: 1.then { |i| i + 1 }
+ kernel_then_enum: 1.then
+ kernel_yield_self: 1.yield_self { |i| i + 1 }
+ kernel_yield_self_enum: 1.yield_self
+loop_count: 20000000
diff --git a/benchmark/keyword_arguments.yml b/benchmark/keyword_arguments.yml
new file mode 100644
index 0000000000..fce6bce0b8
--- /dev/null
+++ b/benchmark/keyword_arguments.yml
@@ -0,0 +1,13 @@
+prelude: |
+ h = {a: 1}
+ def kw(a: 1) a end
+ def kws(**kw) kw end
+benchmark:
+ kw_to_kw: "kw(a: 1)"
+ kw_splat_to_kw: "kw(**h)"
+ kw_to_kw_splat: "kws(a: 1)"
+ kw_splat_to_kw_splat: "kws(**h)"
+ kw_and_splat_to_kw: "kw(a: 1, **h)"
+ kw_splats_to_kw: "kw(**h, **h)"
+ kw_and_splat_to_kw_splat: "kws(a: 1, **h)"
+ kw_splats_to_kw_splat: "kws(**h, **h)"
diff --git a/benchmark/lib/benchmark_driver/runner/mjit.rb b/benchmark/lib/benchmark_driver/runner/mjit.rb
new file mode 100644
index 0000000000..3a58a620de
--- /dev/null
+++ b/benchmark/lib/benchmark_driver/runner/mjit.rb
@@ -0,0 +1,34 @@
+require 'benchmark_driver/struct'
+require 'benchmark_driver/metric'
+require 'erb'
+
+# A runner to measure after-JIT performance easily
+class BenchmarkDriver::Runner::Mjit < BenchmarkDriver::Runner::Ips
+ # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job"
+ Job = Class.new(BenchmarkDriver::DefaultJob)
+
+ # Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
+ JobParser = BenchmarkDriver::DefaultJobParser.for(klass: Job, metrics: [METRIC]).extend(Module.new{
+ def parse(**)
+ jobs = super
+ jobs.map do |job|
+ job = job.dup
+ job.prelude = "#{job.prelude}\n#{<<~EOS}"
+ if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
+ __bmdv_ruby_i = 0
+ while __bmdv_ruby_i < 10000 # MJIT call threshold
+ #{job.script}
+ __bmdv_ruby_i += 1
+ end
+ RubyVM::MJIT.pause # compile
+ #{job.script}
+ RubyVM::MJIT.resume; RubyVM::MJIT.pause # recompile
+ #{job.script}
+ RubyVM::MJIT.resume; RubyVM::MJIT.pause # recompile 2
+ end
+ EOS
+ job
+ end
+ end
+ })
+end
diff --git a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
deleted file mode 100644
index 9f7c8c8af3..0000000000
--- a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
+++ /dev/null
@@ -1,237 +0,0 @@
-require 'benchmark_driver/struct'
-require 'benchmark_driver/metric'
-require 'erb'
-
-# A special runner dedicated for measuring mjit_exec overhead.
-class BenchmarkDriver::Runner::MjitExec
- METRIC = BenchmarkDriver::Metric.new(name: 'Iteration per second', unit: 'i/s')
-
- # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job"
- Job = ::BenchmarkDriver::Struct.new(
- :name, # @param [String] name - This is mandatory for all runner
- :metrics, # @param [Array<BenchmarkDriver::Metric>]
- :num_methods, # @param [Integer] num_methods - The number of methods to be defined
- :loop_count, # @param [Integer] loop_count
- :from_jit, # @param [TrueClass,FalseClass] from_jit - Whether the mjit_exec() is from JIT or not
- :to_jit, # @param [TrueClass,FalseClass] to_jit - Whether the mjit_exec() is to JIT or not
- )
- # Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
- class << JobParser = Module.new
- # @param [Array,String] num_methods
- # @param [Integer] loop_count
- # @param [TrueClass,FalseClass] from_jit
- # @param [TrueClass,FalseClass] to_jit
- def parse(num_methods:, loop_count:, from_jit:, to_jit:)
- if num_methods.is_a?(String)
- num_methods = eval(num_methods)
- end
-
- num_methods.map do |num|
- if num_methods.size > 1
- suffix = "[#{'%4d' % num}]"
- else
- suffix = "_#{num}"
- end
- Job.new(
- name: "mjit_exec_#{from_jit ? 'JT' : 'VM'}2#{to_jit ? 'JT' : 'VM'}#{suffix}",
- metrics: [METRIC],
- num_methods: num,
- loop_count: loop_count,
- from_jit: from_jit,
- to_jit: to_jit,
- )
- end
- end
- end
-
- # @param [BenchmarkDriver::Config::RunnerConfig] config
- # @param [BenchmarkDriver::Output] output
- # @param [BenchmarkDriver::Context] contexts
- def initialize(config:, output:, contexts:)
- @config = config
- @output = output
- @contexts = contexts
- end
-
- # This method is dynamically called by `BenchmarkDriver::JobRunner.run`
- # @param [Array<BenchmarkDriver::Runner::Peak::Job>] jobs
- def run(jobs)
- @output.with_benchmark do
- jobs.each do |job|
- @output.with_job(name: job.name) do
- @contexts.each do |context|
- result = BenchmarkDriver::Repeater.with_repeat(config: @config, larger_better: true, rest_on_average: :average) do
- run_benchmark(job, context: context)
- end
- value, duration = result.value
- @output.with_context(name: context.name, executable: context.executable, gems: context.gems, prelude: context.prelude) do
- @output.report(values: { METRIC => value }, duration: duration, loop_count: job.loop_count)
- end
- end
- end
- end
- end
- end
-
- private
-
- # @param [BenchmarkDriver::Runner::Ips::Job] job - loop_count is not nil
- # @param [BenchmarkDriver::Context] context
- # @return [BenchmarkDriver::Metrics]
- def run_benchmark(job, context:)
- if job.from_jit
- if job.to_jit
- benchmark = BenchmarkJT2JT.new(num_methods: job.num_methods, loop_count: job.loop_count)
- else
- raise NotImplementedError, "JT2VM is not implemented yet"
- end
- else
- if job.to_jit
- benchmark = BenchmarkVM2JT.new(num_methods: job.num_methods, loop_count: job.loop_count)
- else
- benchmark = BenchmarkVM2VM.new(num_methods: job.num_methods, loop_count: job.loop_count)
- end
- end
-
- duration = Tempfile.open(['benchmark_driver-result', '.txt']) do |f|
- with_script(benchmark.render(result: f.path)) do |path|
- opt = []
- if context.executable.command.any? { |c| c.start_with?('--jit') }
- opt << '--jit-min-calls=2'
- end
- IO.popen([*context.executable.command, '--disable-gems', *opt, path], &:read)
- if $?.success?
- Float(f.read)
- else
- BenchmarkDriver::Result::ERROR
- end
- end
- end
-
- [job.loop_count.to_f / duration, duration]
- end
-
- def with_script(script)
- if @config.verbose >= 2
- sep = '-' * 30
- $stdout.puts "\n\n#{sep}[Script begin]#{sep}\n#{script}#{sep}[Script end]#{sep}\n\n"
- end
-
- Tempfile.open(['benchmark_driver-', '.rb']) do |f|
- f.puts script
- f.close
- return yield(f.path)
- end
- end
-
- # @param [Integer] num_methods
- # @param [Integer] loop_count
- BenchmarkVM2VM = ::BenchmarkDriver::Struct.new(:num_methods, :loop_count) do
- # @param [String] result - A file to write result
- def render(result:)
- ERB.new(<<~EOS, trim_mode: '%').result(binding)
- % num_methods.times do |i|
- def a<%= i %>
- nil
- end
- % end
- RubyVM::MJIT.pause if RubyVM::MJIT.enabled?
-
- def vm
- t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
- i = 0
- while i < <%= loop_count / 1000 %>
- % 1000.times do |i|
- a<%= i % num_methods %>
- % end
- i += 1
- end
- % (loop_count % 1000).times do |i|
- a<%= i % num_methods %>
- % end
- Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
- end
-
- vm # warmup call cache
- File.write(<%= result.dump %>, vm)
- EOS
- end
- end
- private_constant :BenchmarkVM2VM
-
- # @param [Integer] num_methods
- # @param [Integer] loop_count
- BenchmarkVM2JT = ::BenchmarkDriver::Struct.new(:num_methods, :loop_count) do
- # @param [String] result - A file to write result
- def render(result:)
- ERB.new(<<~EOS, trim_mode: '%').result(binding)
- % num_methods.times do |i|
- def a<%= i %>
- nil
- end
- a<%= i %>
- a<%= i %> # --jit-min-calls=2
- % end
- RubyVM::MJIT.pause if RubyVM::MJIT.enabled?
-
- def vm
- t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
- i = 0
- while i < <%= loop_count / 1000 %>
- % 1000.times do |i|
- a<%= i % num_methods %>
- % end
- i += 1
- end
- % (loop_count % 1000).times do |i|
- a<%= i % num_methods %>
- % end
- Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
- end
-
- vm # warmup call cache
- File.write(<%= result.dump %>, vm)
- EOS
- end
- end
- private_constant :BenchmarkVM2JT
-
- # @param [Integer] num_methods
- # @param [Integer] loop_count
- BenchmarkJT2JT = ::BenchmarkDriver::Struct.new(:num_methods, :loop_count) do
- # @param [String] result - A file to write result
- def render(result:)
- ERB.new(<<~EOS, trim_mode: '%').result(binding)
- % num_methods.times do |i|
- def a<%= i %>
- nil
- end
- % end
-
- # You may need to:
- # * Increase `JIT_ISEQ_SIZE_THRESHOLD` to 10000000 in mjit.h
- # * Always return false in `inlinable_iseq_p()` of mjit_compile.c
- def jit
- t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
- i = 0
- while i < <%= loop_count / 1000 %>
- % 1000.times do |i|
- a<%= i % num_methods %>
- % end
- i += 1
- end
- % (loop_count % 1000).times do |i|
- a<%= i % num_methods %>
- % end
- Process.clock_gettime(Process::CLOCK_MONOTONIC) - t
- end
-
- jit
- jit
- RubyVM::MJIT.pause if RubyVM::MJIT.enabled?
- File.write(<%= result.dump %>, jit)
- EOS
- end
- end
- private_constant :BenchmarkJT2JT
-end
diff --git a/benchmark/lib/benchmark_driver/runner/ractor.rb b/benchmark/lib/benchmark_driver/runner/ractor.rb
new file mode 100644
index 0000000000..c730b8e4a5
--- /dev/null
+++ b/benchmark/lib/benchmark_driver/runner/ractor.rb
@@ -0,0 +1,122 @@
+require 'erb'
+
+# A runner to measure performance *inside* Ractor
+class BenchmarkDriver::Runner::Ractor < BenchmarkDriver::Runner::Ips
+ # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job"
+ Job = Class.new(BenchmarkDriver::DefaultJob) do
+ attr_accessor :ractor
+ end
+
+ # Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
+ JobParser = BenchmarkDriver::DefaultJobParser.for(klass: Job, metrics: [METRIC]).extend(Module.new{
+ def parse(ractor: 1, **kwargs)
+ super(**kwargs).each do |job|
+ job.ractor = ractor
+ end
+ end
+ })
+
+ private
+
+ unless private_instance_methods.include?(:run_benchmark)
+ raise "#run_benchmark is no longer defined in BenchmarkDriver::Runner::Ips"
+ end
+
+ # @param [BenchmarkDriver::Runner::Ips::Job] job - loop_count is not nil
+ # @param [BenchmarkDriver::Context] context
+ # @return [BenchmarkDriver::Metrics]
+ def run_benchmark(job, context:)
+ benchmark = BenchmarkScript.new(
+ preludes: [context.prelude, job.prelude],
+ script: job.script,
+ teardown: job.teardown,
+ loop_count: job.loop_count,
+ )
+
+ results = job.ractor.times.map do
+ Tempfile.open('benchmark_driver_result')
+ end
+ duration = with_script(benchmark.render(results: results.map(&:path))) do |path|
+ success = execute(*context.executable.command, path, exception: false)
+ if success && ((value = results.map { |f| Float(f.read) }.max) > 0)
+ value
+ else
+ BenchmarkDriver::Result::ERROR
+ end
+ end
+ results.each(&:close)
+
+ value_duration(
+ loop_count: job.loop_count,
+ duration: duration,
+ )
+ end
+
+ # @param [String] prelude
+ # @param [String] script
+ # @param [String] teardown
+ # @param [Integer] loop_count
+ BenchmarkScript = ::BenchmarkDriver::Struct.new(:preludes, :script, :teardown, :loop_count) do
+ # @param [String] result - A file to write result
+ def render(results:)
+ prelude = preludes.reject(&:nil?).reject(&:empty?).join("\n")
+ ERB.new(<<-RUBY).result_with_hash(results: results)
+Warning[:experimental] = false
+# shareable-constant-value: experimental_everything
+#{prelude}
+
+if #{loop_count} == 1
+ __bmdv_loop_before = 0
+ __bmdv_loop_after = 0
+else
+ __bmdv_loop_before = Time.new
+ #{while_loop('', loop_count, id: 0)}
+ __bmdv_loop_after = Time.new
+end
+
+__bmdv_ractors = []
+<% results.size.times do %>
+__bmdv_ractors << Ractor.new(__bmdv_loop_after - __bmdv_loop_before) { |__bmdv_loop_time|
+ __bmdv_time = Time
+ __bmdv_script_before = __bmdv_time.new
+ #{while_loop(script, loop_count, id: 1)}
+ __bmdv_script_after = __bmdv_time.new
+
+ (__bmdv_script_after - __bmdv_script_before) - __bmdv_loop_time
+}
+<% end %>
+
+# Wait for all Ractors before executing code to write results
+__bmdv_ractors.map!(&:take)
+
+<% results.each do |result| %>
+File.write(<%= result.dump %>, __bmdv_ractors.shift)
+<% end %>
+
+#{teardown}
+ RUBY
+ end
+
+ private
+
+ # id is to prevent:
+ # can not isolate a Proc because it accesses outer variables (__bmdv_i)
+ def while_loop(content, times, id:)
+ if !times.is_a?(Integer) || times <= 0
+ raise ArgumentError.new("Unexpected times: #{times.inspect}")
+ elsif times == 1
+ return content
+ end
+
+ # TODO: execute in batch
+ <<-RUBY
+__bmdv_i#{id} = 0
+while __bmdv_i#{id} < #{times}
+ #{content}
+ __bmdv_i#{id} += 1
+end
+ RUBY
+ end
+ end
+ private_constant :BenchmarkScript
+end
diff --git a/benchmark/marshal_dump_load_integer.yml b/benchmark/marshal_dump_load_integer.yml
new file mode 100644
index 0000000000..78ebf823d2
--- /dev/null
+++ b/benchmark/marshal_dump_load_integer.yml
@@ -0,0 +1,22 @@
+prelude: |
+ smallint_array = 1000.times.map { |x| x }
+ bigint32_array = 1000.times.map { |x| x + 2**32 }
+ bigint64_array = 1000.times.map { |x| x + 2**64 }
+
+ smallint_dump = Marshal.dump(smallint_array)
+ bigint32_dump = Marshal.dump(bigint32_array)
+ bigint64_dump = Marshal.dump(bigint64_array)
+benchmark:
+ marshal_dump_integer_small: |
+ Marshal.dump(smallint_array)
+ marshal_dump_integer_over_32_bit: |
+ Marshal.dump(bigint32_array)
+ marshal_dump_integer_over_64_bit: |
+ Marshal.dump(bigint64_array)
+ marshal_load_integer_small: |
+ Marshal.load(smallint_dump)
+ marshal_load_integer_over_32_bit: |
+ Marshal.load(bigint32_dump)
+ marshal_load_integer_over_64_bit: |
+ Marshal.load(bigint64_dump)
+loop_count: 4000
diff --git a/benchmark/masgn.yml b/benchmark/masgn.yml
new file mode 100644
index 0000000000..31cb8ee4a3
--- /dev/null
+++ b/benchmark/masgn.yml
@@ -0,0 +1,53 @@
+prelude: |
+ a = [nil] * 3
+ b = Class.new{attr_writer :a, :b, :c}.new
+ c = d = e = f = g = h = i = nil
+benchmark:
+ array2_2: "c = (a[0], a[1] = 1, 2)"
+ array2_3: "c = (a[0], a[1] = 1, 2, 3)"
+ array3_2: "c = (a[0], a[1], a[2] = 1, 2)"
+ array3_3: "c = (a[0], a[1], a[2] = 1, 2, 3)"
+ attr2_2: "c = (b.a, b.b = 1, 2)"
+ attr2_3: "c = (b.a, b.b = 1, 2, 3)"
+ attr3_2: "c = (b.a, b.b, b.c = 1, 2)"
+ attr3_3: "c = (b.a, b.b, b.c = 1, 2, 3)"
+ lvar2_2: "c = (d, e = 1, 2)"
+ lvar2_3: "c = (d, e = 1, 2, 3)"
+ lvar3_2: "c = (d, e, f = 1, 2)"
+ lvar3_3: "c = (d, e, f = 1, 2, 3)"
+ array2_2p: "(a[0], a[1] = 1, 2; nil)"
+ array2_3p: "(a[0], a[1] = 1, 2, 3; nil)"
+ array3_2p: "(a[0], a[1], a[2] = 1, 2; nil)"
+ array3_3p: "(a[0], a[1], a[2] = 1, 2, 3; nil)"
+ attr2_2p: "(b.a, b.b = 1, 2; nil)"
+ attr2_3p: "(b.a, b.b = 1, 2, 3; nil)"
+ attr3_2p: "(b.a, b.b, b.c = 1, 2; nil)"
+ attr3_3p: "(b.a, b.b, b.c = 1, 2, 3; nil)"
+ lvar2_2p: "(d, e = 1, 2; nil)"
+ lvar2_3p: "(d, e = 1, 2, 3; nil)"
+ lvar3_2p: "(d, e, f = 1, 2; nil)"
+ lvar3_3p: "(d, e, f = 1, 2, 3; nil)"
+ array2_2lv: "c = (a[0], a[1] = g, h)"
+ array2_ilv: "c = (a[0], a[1] = g, h, i)"
+ arrayi_2lv: "c = (a[0], a[1], a[2] = g, h)"
+ arrayi_ilv: "c = (a[0], a[1], a[2] = g, h, i)"
+ attr2_2lv: "c = (b.a, b.b = g, h)"
+ attr2_ilv: "c = (b.a, b.b = g, h, i)"
+ attri_2lv: "c = (b.a, b.b, b.c = g, h)"
+ attri_ilv: "c = (b.a, b.b, b.c = g, h, i)"
+ lvar2_2lv: "c = (d, e = g, h)"
+ lvar2_ilv: "c = (d, e = g, h, i)"
+ lvari_2lv: "c = (d, e, f = g, h)"
+ lvari_ilv: "c = (d, e, f = g, h, i)"
+ array2_2plv: "(a[0], a[1] = g, h; nil)"
+ array2_iplv: "(a[0], a[1] = g, h, i; nil)"
+ arrayi_2plv: "(a[0], a[1], a[2] = g, h; nil)"
+ arrayi_iplv: "(a[0], a[1], a[2] = g, h, i; nil)"
+ attr2_2plv: "(b.a, b.b = g, h; nil)"
+ attr2_iplv: "(b.a, b.b = g, h, i; nil)"
+ attri_2plv: "(b.a, b.b, b.c = g, h; nil)"
+ attri_iplv: "(b.a, b.b, b.c = g, h, i; nil)"
+ lvar2_2plv: "(d, e = g, h; nil)"
+ lvar2_iplv: "(d, e = g, h, i; nil)"
+ lvari_2plv: "(d, e, f = g, h; nil)"
+ lvari_iplv: "(d, e, f = g, h, i; nil)"
diff --git a/benchmark/method_bind_call.yml b/benchmark/method_bind_call.yml
new file mode 100644
index 0000000000..9e0e046ed4
--- /dev/null
+++ b/benchmark/method_bind_call.yml
@@ -0,0 +1,16 @@
+prelude: |
+ named_module = Kernel
+
+ module FakeName
+ def self.name
+ "NotMyame".freeze
+ end
+ end
+
+ MOD_NAME = Module.instance_method(:name)
+
+benchmark:
+ fastpath: MOD_NAME.bind_call(Kernel)
+ slowpath: MOD_NAME.bind_call(FakeName)
+
+loop_count: 100_000
diff --git a/benchmark/mjit_exec_jt2jt.yml b/benchmark/mjit_exec_jt2jt.yml
deleted file mode 100644
index 5be408e30c..0000000000
--- a/benchmark/mjit_exec_jt2jt.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Usage:
-# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2jt.yml
-type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
-num_methods: [1]
-#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
-loop_count: 50000000
-from_jit: true
-to_jit: true
diff --git a/benchmark/mjit_exec_vm2jt.yml b/benchmark/mjit_exec_vm2jt.yml
deleted file mode 100644
index 9947dbb7dd..0000000000
--- a/benchmark/mjit_exec_vm2jt.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Usage:
-# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2jt.yml
-type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
-num_methods: [1]
-#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
-loop_count: 50000000
-from_jit: false
-to_jit: true
diff --git a/benchmark/mjit_exec_vm2vm.yml b/benchmark/mjit_exec_vm2vm.yml
deleted file mode 100644
index 4b84427b10..0000000000
--- a/benchmark/mjit_exec_vm2vm.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Usage:
-# RUBYOPT=-Ibenchmark/lib benchmark-driver -e 'ruby --jit' benchmark/mjit_exec_vm2vm.yml
-type: mjit_exec # benchmark/lib/benchmark_driver/runner/mjit_exec.rb
-num_methods: [1]
-#num_methods: (1..100).to_a + [200, 300, 400, 500, 600, 700, 800, 900, 1000]
-loop_count: 50000000
-from_jit: false
-to_jit: false
diff --git a/benchmark/mjit_exivar.yml b/benchmark/mjit_exivar.yml
new file mode 100644
index 0000000000..2584fa6410
--- /dev/null
+++ b/benchmark/mjit_exivar.yml
@@ -0,0 +1,18 @@
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ class Bench < Hash
+ def initialize
+ @exivar = nil
+ end
+
+ def exivar
+ @exivar
+ end
+ end
+
+ bench = Bench.new
+
+benchmark:
+ mjit_exivar: bench.exivar
+
+loop_count: 200000000
diff --git a/benchmark/mjit_integer.yml b/benchmark/mjit_integer.yml
new file mode 100644
index 0000000000..a6b5c9ee16
--- /dev/null
+++ b/benchmark/mjit_integer.yml
@@ -0,0 +1,32 @@
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ def mjit_abs(int) int.abs end
+ def mjit_bit_length(int) int.bit_length end
+ def mjit_comp(int) ~int end
+ def mjit_even?(int) int.even? end
+ def mjit_integer?(int) int.integer? end
+ def mjit_magnitude(int) int.magnitude end
+ def mjit_odd?(int) int.odd? end
+ def mjit_ord(int) int.ord end
+ def mjit_size(int) int.size end
+ def mjit_to_i(int) int.to_i end
+ def mjit_to_int(int) int.to_int end
+ def mjit_uminus(int) -int end
+ def mjit_zero?(int) int.zero? end
+
+benchmark:
+ - mjit_abs(-1)
+ - mjit_bit_length(100)
+ - mjit_comp(1)
+ - mjit_even?(2)
+ - mjit_integer?(0)
+ - mjit_magnitude(-1)
+ - mjit_odd?(1)
+ - mjit_ord(1)
+ - mjit_size(1)
+ - mjit_to_i(1)
+ - mjit_to_int(1)
+ - mjit_uminus(1)
+ - mjit_zero?(0)
+
+loop_count: 40000000
diff --git a/benchmark/mjit_kernel.yml b/benchmark/mjit_kernel.yml
new file mode 100644
index 0000000000..7720e65c2c
--- /dev/null
+++ b/benchmark/mjit_kernel.yml
@@ -0,0 +1,20 @@
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ def mjit_class(obj)
+ obj.class
+ end
+
+ def mjit_frozen?(obj)
+ obj.frozen?
+ end
+
+ str = ""
+ fstr = "".freeze
+
+benchmark:
+ - mjit_class(self)
+ - mjit_class(1)
+ - mjit_frozen?(str)
+ - mjit_frozen?(fstr)
+
+loop_count: 40000000
diff --git a/benchmark/mjit_leave.yml b/benchmark/mjit_leave.yml
new file mode 100644
index 0000000000..9ac68b164b
--- /dev/null
+++ b/benchmark/mjit_leave.yml
@@ -0,0 +1,8 @@
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ def leave
+ nil
+ end
+benchmark:
+ mjit_leave: leave
+loop_count: 200000000
diff --git a/benchmark/mjit_opt_cc_insns.yml b/benchmark/mjit_opt_cc_insns.yml
new file mode 100644
index 0000000000..fed6d34bd5
--- /dev/null
+++ b/benchmark/mjit_opt_cc_insns.yml
@@ -0,0 +1,27 @@
+# opt_* insns using vm_method_cfunc_is with send-compatible operands:
+# * opt_nil_p
+# * opt_not
+# * opt_eq
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ def mjit_nil?(obj)
+ obj.nil?
+ end
+
+ def mjit_not(obj)
+ !obj
+ end
+
+ def mjit_eq(a, b)
+ a == b
+ end
+
+benchmark:
+ - script: mjit_nil?(1)
+ loop_count: 40000000
+ - script: mjit_not(1)
+ loop_count: 40000000
+ - script: mjit_eq(1, nil)
+ loop_count: 8000000
+ - script: mjit_eq(nil, 1)
+ loop_count: 8000000
diff --git a/benchmark/mjit_struct_aref.yml b/benchmark/mjit_struct_aref.yml
new file mode 100644
index 0000000000..bfba1323f2
--- /dev/null
+++ b/benchmark/mjit_struct_aref.yml
@@ -0,0 +1,10 @@
+type: lib/benchmark_driver/runner/mjit
+prelude: |
+ def mjit_struct_aref(struct)
+ struct.aa
+ end
+ struct = Struct.new(:a0, :a1, :a2, :a3, :a4, :a5, :a6, :a7, :a8, :a9, :aa).new
+
+benchmark: mjit_struct_aref(struct)
+
+loop_count: 40000000
diff --git a/benchmark/module_eqq.yml b/benchmark/module_eqq.yml
new file mode 100644
index 0000000000..a561fb86dc
--- /dev/null
+++ b/benchmark/module_eqq.yml
@@ -0,0 +1,27 @@
+prelude: |
+ class SimpleClass; end
+ class MediumClass
+ 10.times { include Module.new }
+ end
+ class LargeClass
+ 100.times { include Module.new }
+ end
+ class HugeClass
+ 300.times { include Module.new }
+ end
+ SimpleObj = SimpleClass.new
+ MediumObj = MediumClass.new
+ LargeObj = LargeClass.new
+ HugeObj = HugeClass.new
+benchmark:
+ simple_class_eqq_simple_obj: |
+ SimpleClass === SimpleObj
+ medium_class_eqq_simple_obj: |
+ MediumClass === SimpleObj
+ simple_class_eqq_medium_obj: |
+ SimpleClass === MediumObj
+ simple_class_eqq_large_obj: |
+ SimpleClass === LargeObj
+ simple_class_eqq_huge_obj: |
+ SimpleClass === HugeObj
+loop_count: 20000000
diff --git a/benchmark/nilclass.yml b/benchmark/nilclass.yml
new file mode 100644
index 0000000000..fba67a5f6a
--- /dev/null
+++ b/benchmark/nilclass.yml
@@ -0,0 +1,6 @@
+benchmark:
+ to_i: |
+ nil.to_i
+ to_f: |
+ nil.to_f
+loop_count: 100000
diff --git a/benchmark/num_zero_p.yml b/benchmark/num_zero_p.yml
new file mode 100644
index 0000000000..2195963433
--- /dev/null
+++ b/benchmark/num_zero_p.yml
@@ -0,0 +1,8 @@
+benchmark:
+ - 0.zero?
+ - 1.zero?
+ - 0r.zero?
+ - 1r.zero?
+ - 0i.zero?
+ - 1i.zero?
+loop_count: 50000000
diff --git a/benchmark/numeric_methods.yml b/benchmark/numeric_methods.yml
new file mode 100644
index 0000000000..1384902935
--- /dev/null
+++ b/benchmark/numeric_methods.yml
@@ -0,0 +1,29 @@
+prelude: |
+ int = 42
+ flo = 4.2
+benchmark:
+ real?: |
+ int.real?
+ integer?: |
+ flo.integer?
+ finite?: |
+ int.finite?
+ infinite?: |
+ int.infinite?
+ integer_real: |
+ int.real
+ float_real: |
+ flo.real
+ integr_imag: |
+ int.imag
+ float_imag: |
+ flo.imag
+ integer_conj: |
+ int.conj
+ float_conj: |
+ flo.conj
+ integer_numerator: |
+ int.numerator
+ integer_denominator: |
+ int.denominator
+loop_count: 20000000
diff --git a/benchmark/object_allocate.yml b/benchmark/object_allocate.yml
new file mode 100644
index 0000000000..93ff463e41
--- /dev/null
+++ b/benchmark/object_allocate.yml
@@ -0,0 +1,21 @@
+prelude: |
+ class Eight
+ 8.times { include(Module.new) }
+ end
+ class ThirtyTwo
+ 32.times { include(Module.new) }
+ end
+ class SixtyFour
+ 64.times { include(Module.new) }
+ end
+ class OneTwentyEight
+ 128.times { include(Module.new) }
+ end
+ # Disable GC to see raw throughput:
+ GC.disable
+benchmark:
+ allocate_8_deep: Eight.new
+ allocate_32_deep: ThirtyTwo.new
+ allocate_64_deep: SixtyFour.new
+ allocate_128_deep: OneTwentyEight.new
+loop_count: 100000
diff --git a/benchmark/objspace_dump_all.yml b/benchmark/objspace_dump_all.yml
new file mode 100644
index 0000000000..ebab562d2e
--- /dev/null
+++ b/benchmark/objspace_dump_all.yml
@@ -0,0 +1,13 @@
+prelude: |
+ require 'objspace'
+ require 'tempfile'
+ $objs = 1_000.times.map { Object.new }
+ $strings = 1_000.times.map { |i| "string #{i}" }
+ $file = Tempfile.new('heap')
+ $dev_null = File.open(File::NULL, 'w+')
+
+benchmark:
+ dump_all_string: "ObjectSpace.dump_all(output: :string)"
+ dump_all_file: "ObjectSpace.dump_all(output: $file)"
+ dump_all_dev_null: "ObjectSpace.dump_all(output: $dev_null)"
+loop_count: 1
diff --git a/benchmark/pm_array.yml b/benchmark/pm_array.yml
new file mode 100644
index 0000000000..babb65a289
--- /dev/null
+++ b/benchmark/pm_array.yml
@@ -0,0 +1,19 @@
+prelude: |
+ def call(*val)
+ case val
+ in [String => body]
+ [200, {}, [body]]
+ in [Integer => status]
+ [status, {}, [""]]
+ in [Integer, String] => response
+ [response[0], {}, [response[1]]]
+ in [Integer, Hash, String] => response
+ [response[0], response[1], [response[2]]]
+ end
+ end
+
+benchmark:
+ first_match: call("ok")
+ second_match: call(401)
+ third_match: call(200, "ok")
+ fourth_match: call(201, {}, "created")
diff --git a/benchmark/ractor_const.yml b/benchmark/ractor_const.yml
new file mode 100644
index 0000000000..d7ab74bdca
--- /dev/null
+++ b/benchmark/ractor_const.yml
@@ -0,0 +1,4 @@
+type: lib/benchmark_driver/runner/ractor
+benchmark:
+ ractor_const: Object
+ractor: 1
diff --git a/benchmark/ractor_float_to_s.yml b/benchmark/ractor_float_to_s.yml
new file mode 100644
index 0000000000..8f492be668
--- /dev/null
+++ b/benchmark/ractor_float_to_s.yml
@@ -0,0 +1,8 @@
+type: lib/benchmark_driver/runner/ractor
+prelude: |
+ FLOATS = [*0.0.step(1.0, 0.001)]
+benchmark:
+ ractor_float_to_s: |
+ FLOATS.each {|f| f.to_s}
+loop_count: 100
+ractor: 2
diff --git a/benchmark/range_min.yml b/benchmark/range_min.yml
new file mode 100644
index 0000000000..9e60dd7308
--- /dev/null
+++ b/benchmark/range_min.yml
@@ -0,0 +1,2 @@
+benchmark:
+ - (1..10).min
diff --git a/benchmark/so_nbody.rb b/benchmark/so_nbody.rb
index d6c5bb9e61..9884fc4edc 100644
--- a/benchmark/so_nbody.rb
+++ b/benchmark/so_nbody.rb
@@ -12,38 +12,38 @@ def _puts *args
end
class Planet
- attr_accessor :x, :y, :z, :vx, :vy, :vz, :mass
+ attr_accessor :x, :y, :z, :vx, :vy, :vz, :mass
- def initialize(x, y, z, vx, vy, vz, mass)
- @x, @y, @z = x, y, z
- @vx, @vy, @vz = vx * DAYS_PER_YEAR, vy * DAYS_PER_YEAR, vz * DAYS_PER_YEAR
- @mass = mass * SOLAR_MASS
- end
-
- def move_from_i(bodies, nbodies, dt, i)
- while i < nbodies
- b2 = bodies[i]
- dx = @x - b2.x
- dy = @y - b2.y
- dz = @z - b2.z
-
- distance = Math.sqrt(dx * dx + dy * dy + dz * dz)
- mag = dt / (distance * distance * distance)
- b_mass_mag, b2_mass_mag = @mass * mag, b2.mass * mag
-
- @vx -= dx * b2_mass_mag
- @vy -= dy * b2_mass_mag
- @vz -= dz * b2_mass_mag
- b2.vx += dx * b_mass_mag
- b2.vy += dy * b_mass_mag
- b2.vz += dz * b_mass_mag
- i += 1
+ def initialize(x, y, z, vx, vy, vz, mass)
+ @x, @y, @z = x, y, z
+ @vx, @vy, @vz = vx * DAYS_PER_YEAR, vy * DAYS_PER_YEAR, vz * DAYS_PER_YEAR
+ @mass = mass * SOLAR_MASS
end
- @x += dt * @vx
- @y += dt * @vy
- @z += dt * @vz
- end
+ def move_from_i(bodies, nbodies, dt, i)
+ while i < nbodies
+ b2 = bodies[i]
+ dx = @x - b2.x
+ dy = @y - b2.y
+ dz = @z - b2.z
+
+ distance = Math.sqrt(dx * dx + dy * dy + dz * dz)
+ mag = dt / (distance * distance * distance)
+ b_mass_mag, b2_mass_mag = @mass * mag, b2.mass * mag
+
+ @vx -= dx * b2_mass_mag
+ @vy -= dy * b2_mass_mag
+ @vz -= dz * b2_mass_mag
+ b2.vx += dx * b_mass_mag
+ b2.vy += dy * b_mass_mag
+ b2.vz += dz * b_mass_mag
+ i += 1
+ end
+
+ @x += dt * @vx
+ @y += dt * @vy
+ @z += dt * @vz
+ end
end
def energy(bodies)
diff --git a/benchmark/string_casecmp.yml b/benchmark/string_casecmp.yml
new file mode 100644
index 0000000000..2354040a04
--- /dev/null
+++ b/benchmark/string_casecmp.yml
@@ -0,0 +1,26 @@
+prelude: |
+ lstr1 = [*"a".."z",*"0".."9"].join("")
+ lstr10 = lstr1 * 10
+ lstr100 = lstr10 * 10
+ lstr1000 = lstr100 * 10
+ lnonascii1 = [*"\u{e0}".."\u{ff}"].join("")
+ lnonascii10 = lnonascii1 * 10
+ lnonascii100 = lnonascii10 * 10
+ lnonascii1000 = lnonascii100 * 10
+ ustr1 = [*"A".."Z",*"0".."9"].join("")
+ ustr10 = ustr1 * 10
+ ustr100 = ustr10 * 10
+ ustr1000 = ustr100 * 10
+ unonascii1 = [*"\u{c0}".."\u{df}"].join("")
+ unonascii10 = unonascii1 * 10
+ unonascii100 = unonascii10 * 10
+ unonascii1000 = unonascii100 * 10
+benchmark:
+ casecmp-1: lstr1.casecmp(ustr1)
+ casecmp-10: lstr10.casecmp(ustr10)
+ casecmp-100: lstr100.casecmp(ustr100)
+ casecmp-1000: lstr1000.casecmp(ustr1000)
+ casecmp-nonascii1: lnonascii1.casecmp(unonascii1)
+ casecmp-nonascii10: lnonascii10.casecmp(unonascii10)
+ casecmp-nonascii100: lnonascii100.casecmp(unonascii100)
+ casecmp-nonascii1000: lnonascii1000.casecmp(unonascii1000)
diff --git a/benchmark/string_casecmp_p.yml b/benchmark/string_casecmp_p.yml
new file mode 100644
index 0000000000..a790ce7d55
--- /dev/null
+++ b/benchmark/string_casecmp_p.yml
@@ -0,0 +1,26 @@
+prelude: |
+ lstr1 = [*"a".."z",*"0".."9"].join("")
+ lstr10 = lstr1 * 10
+ lstr100 = lstr10 * 10
+ lstr1000 = lstr100 * 10
+ lnonascii1 = [*"\u{e0}".."\u{ff}"].join("")
+ lnonascii10 = lnonascii1 * 10
+ lnonascii100 = lnonascii10 * 10
+ lnonascii1000 = lnonascii100 * 10
+ ustr1 = [*"A".."Z",*"0".."9"].join("")
+ ustr10 = ustr1 * 10
+ ustr100 = ustr10 * 10
+ ustr1000 = ustr100 * 10
+ unonascii1 = [*"\u{c0}".."\u{df}"].join("")
+ unonascii10 = unonascii1 * 10
+ unonascii100 = unonascii10 * 10
+ unonascii1000 = unonascii100 * 10
+benchmark:
+ casecmp_p-1: lstr1.casecmp?(ustr1)
+ casecmp_p-10: lstr10.casecmp?(ustr10)
+ casecmp_p-100: lstr100.casecmp?(ustr100)
+ casecmp_p-1000: lstr1000.casecmp?(ustr1000)
+ casecmp_p-nonascii1: lnonascii1.casecmp?(unonascii1)
+ casecmp_p-nonascii10: lnonascii10.casecmp?(unonascii10)
+ casecmp_p-nonascii100: lnonascii100.casecmp?(unonascii100)
+ casecmp_p-nonascii1000: lnonascii1000.casecmp?(unonascii1000)
diff --git a/benchmark/string_concat.yml b/benchmark/string_concat.yml
new file mode 100644
index 0000000000..e65c00cca9
--- /dev/null
+++ b/benchmark/string_concat.yml
@@ -0,0 +1,45 @@
+prelude: |
+ CHUNK = "a" * 64
+ UCHUNK = "é" * 32
+ GC.disable # GC causes a lot of variance
+benchmark:
+ binary_concat_7bit: |
+ buffer = String.new(capacity: 4096, encoding: Encoding::BINARY)
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ utf8_concat_7bit: |
+ buffer = String.new(capacity: 4096, encoding: Encoding::UTF_8)
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ buffer << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK << CHUNK
+ utf8_concat_UTF8: |
+ buffer = String.new(capacity: 4096, encoding: Encoding::UTF_8)
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ buffer << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK << UCHUNK
+ interpolation: |
+ buffer = "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}" \
+ "#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}#{CHUNK}"
diff --git a/benchmark/string_downcase.yml b/benchmark/string_downcase.yml
index a31c3ac712..1fea6afbec 100644
--- a/benchmark/string_downcase.yml
+++ b/benchmark/string_downcase.yml
@@ -3,8 +3,16 @@ prelude: |
str10 = str1 * 10
str100 = str10 * 10
str1000 = str100 * 10
+ nonascii1 = [*"\u{c0}".."\u{df}"].join("")
+ nonascii10 = nonascii1 * 10
+ nonascii100 = nonascii10 * 10
+ nonascii1000 = nonascii100 * 10
benchmark:
downcase-1: str1.upcase
downcase-10: str10.upcase
downcase-100: str100.upcase
downcase-1000: str1000.upcase
+ downcase-nonascii1: nonascii1.downcase
+ downcase-nonascii10: nonascii10.downcase
+ downcase-nonascii100: nonascii100.downcase
+ downcase-nonascii1000: nonascii1000.downcase
diff --git a/benchmark/string_slice.yml b/benchmark/string_slice.yml
new file mode 100644
index 0000000000..fc2393c5d1
--- /dev/null
+++ b/benchmark/string_slice.yml
@@ -0,0 +1,11 @@
+prelude: |
+ long_string = "x"*1000+"-hår"
+benchmark:
+ regexp-short: |
+ "x-hår".slice!(/-(.)(.)(.)/, 3)
+ regexp-long: |
+ long_string.dup.slice!(/-(.)(.)(.)/, 3)
+ string-short: |
+ "x-hår".slice!("r")
+ string-long: |
+ long_string.dup.slice!("r")
diff --git a/benchmark/string_split.yml b/benchmark/string_split.yml
index 84ffe8f6a7..cc2c7d7855 100644
--- a/benchmark/string_split.yml
+++ b/benchmark/string_split.yml
@@ -1,7 +1,22 @@
prelude: |
- str0 = [*0..9].join("")
+ str1 = [*0..5].join(" ") + " "
+ str10 = str1 * 10
+ str100 = str10 * 10
+ str1000 = str100 * 10
benchmark:
- to_chars-1: str0.split('')
- to_chars-10: (str0 * 10).split('')
- to_chars-100: (str0 * 100).split('')
- to_chars-1000: (str0 * 1000).split('')
+ to_chars-1: str1.split('')
+ to_chars-10: str10.split('')
+ to_chars-100: str100.split('')
+ to_chars-1000: str1000.split('')
+ to_words-1: str1.split(' ')
+ to_words-10: str10.split(' ')
+ to_words-100: str100.split(' ')
+ to_words-1000: str1000.split(' ')
+ re_chars-1: str1.split(//)
+ re_chars-10: str10.split(//)
+ re_chars-100: str100.split(//)
+ re_chars-1000: str1000.split(//)
+ re_space-1: str1.split(/ /)
+ re_space-10: str10.split(/ /)
+ re_space-100: str100.split(/ /)
+ re_space-1000: str1000.split(/ /)
diff --git a/benchmark/string_swapcase.yml b/benchmark/string_swapcase.yml
index afaae3f696..eeb5928907 100644
--- a/benchmark/string_swapcase.yml
+++ b/benchmark/string_swapcase.yml
@@ -3,8 +3,16 @@ prelude: |
str10 = str1 * 10
str100 = str10 * 10
str1000 = str100 * 10
+ nonascii1 = [*"\u{c0}".."\u{cf}",*"\u{f0}".."\u{ff}"].join("")
+ nonascii10 = nonascii1 * 10
+ nonascii100 = nonascii10 * 10
+ nonascii1000 = nonascii100 * 10
benchmark:
swapcase-1: str1.swapcase
swapcase-10: str10.swapcase
swapcase-100: str100.swapcase
swapcase-1000: str1000.swapcase
+ swapcase-nonascii1: nonascii1.swapcase
+ swapcase-nonascii10: nonascii10.swapcase
+ swapcase-nonascii100: nonascii100.swapcase
+ swapcase-nonascii1000: nonascii1000.swapcase
diff --git a/benchmark/string_upcase.yml b/benchmark/string_upcase.yml
index 456d213c74..dab84bbde2 100644
--- a/benchmark/string_upcase.yml
+++ b/benchmark/string_upcase.yml
@@ -3,8 +3,16 @@ prelude: |
str10 = str1 * 10
str100 = str10 * 10
str1000 = str100 * 10
+ nonascii1 = [*"\u{e0}".."\u{ff}"].join("")
+ nonascii10 = nonascii1 * 10
+ nonascii100 = nonascii10 * 10
+ nonascii1000 = nonascii100 * 10
benchmark:
upcase-1: str1.upcase
upcase-10: str10.upcase
upcase-100: str100.upcase
upcase-1000: str1000.upcase
+ upcase-nonascii1: nonascii1.upcase
+ upcase-nonascii10: nonascii10.upcase
+ upcase-nonascii100: nonascii100.upcase
+ upcase-nonascii1000: nonascii1000.upcase
diff --git a/benchmark/time_at.yml b/benchmark/time_at.yml
new file mode 100644
index 0000000000..3247efbe77
--- /dev/null
+++ b/benchmark/time_at.yml
@@ -0,0 +1,7 @@
+prelude: |
+ # frozen_string_literal: true
+benchmark:
+ - 'Time.at(0)'
+ - 'Time.at(0, 500)'
+ - 'Time.at(0, in: "+09:00")'
+ - 'Time.at(0, 500, in: "+09:00")'
diff --git a/benchmark/time_new.yml b/benchmark/time_new.yml
new file mode 100644
index 0000000000..5947dd3a41
--- /dev/null
+++ b/benchmark/time_new.yml
@@ -0,0 +1,4 @@
+benchmark:
+ - 'Time.new(2021)'
+ - 'Time.new(2021, 8, 22)'
+ - 'Time.new(2021, 8, 22, in: "+09:00")'
diff --git a/benchmark/time_now.yml b/benchmark/time_now.yml
new file mode 100644
index 0000000000..f6d6a31489
--- /dev/null
+++ b/benchmark/time_now.yml
@@ -0,0 +1,3 @@
+benchmark:
+ - 'Time.now'
+ - 'Time.now(in: "+09:00")'
diff --git a/benchmark/time_parse.yml b/benchmark/time_parse.yml
new file mode 100644
index 0000000000..6060b58bc6
--- /dev/null
+++ b/benchmark/time_parse.yml
@@ -0,0 +1,10 @@
+prelude: |
+ require 'time'
+ inspect = "2021-08-23 09:57:02 +0900"
+ iso8601 = "2021-08-23T09:57:02+09:00"
+benchmark:
+ - Time.iso8601(iso8601)
+ - Time.parse(iso8601)
+ - Time.parse(inspect)
+ - Time.new(iso8601) rescue Time.iso8601(iso8601)
+ - Time.new(inspect) rescue Time.parse(inspect)
diff --git a/benchmark/vm1_attr_ivar.yml b/benchmark/vm1_attr_ivar.yml
deleted file mode 100644
index f714dd9bd9..0000000000
--- a/benchmark/vm1_attr_ivar.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-prelude: |
- class C
- attr_reader :a, :b
- def initialize
- @a = nil
- @b = nil
- end
- end
- obj = C.new
-benchmark:
- vm1_attr_ivar: |
- j = obj.a
- k = obj.b
-loop_count: 30000000
diff --git a/benchmark/vm1_attr_ivar_set.yml b/benchmark/vm1_attr_ivar_set.yml
deleted file mode 100644
index f383e59ef4..0000000000
--- a/benchmark/vm1_attr_ivar_set.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-prelude: |
- class C
- attr_accessor :a, :b
- def initialize
- @a = nil
- @b = nil
- end
- end
- obj = C.new
-benchmark:
- vm1_attr_ivar_set: |
- obj.a = 1
- obj.b = 2
-loop_count: 30000000
diff --git a/benchmark/vm1_block.yml b/benchmark/vm1_block.yml
deleted file mode 100644
index ac7c940f93..0000000000
--- a/benchmark/vm1_block.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-prelude: |
- def m
- yield
- end
-benchmark:
- vm1_block: |
- m{
- }
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam.yml b/benchmark/vm1_blockparam.yml
deleted file mode 100644
index 947b8c53d5..0000000000
--- a/benchmark/vm1_blockparam.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- def m &b
- end
-benchmark:
- vm1_blockparam: |
- m{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_call.yml b/benchmark/vm1_blockparam_call.yml
deleted file mode 100644
index e2817a3ce2..0000000000
--- a/benchmark/vm1_blockparam_call.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- def m &b
- b.call
- end
-benchmark:
- vm1_blockparam_call: |
- m{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_pass.yml b/benchmark/vm1_blockparam_pass.yml
deleted file mode 100644
index ca1bef3369..0000000000
--- a/benchmark/vm1_blockparam_pass.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-prelude: |
- def bp_yield
- yield
- end
-
- def bp_pass &b
- bp_yield &b
- end
-benchmark:
- vm1_blockparam_pass: |
- bp_pass{}
-loop_count: 30000000
diff --git a/benchmark/vm1_blockparam_yield.yml b/benchmark/vm1_blockparam_yield.yml
deleted file mode 100644
index 56ae617798..0000000000
--- a/benchmark/vm1_blockparam_yield.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- def bp_yield &b
- yield
- end
-benchmark:
- vm1_blockparam_yield: |
- bp_yield{}
-loop_count: 30000000
diff --git a/benchmark/vm1_const.yml b/benchmark/vm1_const.yml
deleted file mode 100644
index b98db1545c..0000000000
--- a/benchmark/vm1_const.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- Const = 1
-benchmark:
- vm1_const: |
- j = Const
- k = Const
-loop_count: 30000000
diff --git a/benchmark/vm1_ensure.yml b/benchmark/vm1_ensure.yml
deleted file mode 100644
index afbbe38bec..0000000000
--- a/benchmark/vm1_ensure.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Not utilizing loop_count since using it for this is too unstable for now
-benchmark:
- vm1_ensure: |
- i = 0
- while i<30_000_000
- i += 1
- begin
- begin
- ensure
- end
- ensure
- end
- end
-loop_count: 1
diff --git a/benchmark/vm1_float_simple.yml b/benchmark/vm1_float_simple.yml
deleted file mode 100644
index 4e9ad1852b..0000000000
--- a/benchmark/vm1_float_simple.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- f = 0.0
-benchmark:
- vm1_float_simple: |
- f += 0.1; f -= 0.1
- f += 0.1; f -= 0.1
- f += 0.1; f -= 0.1
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_lived.yml b/benchmark/vm1_gc_short_lived.yml
deleted file mode 100644
index 8fdcb7371d..0000000000
--- a/benchmark/vm1_gc_short_lived.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-benchmark:
- vm1_gc_short_lived: |
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_complex_long.yml b/benchmark/vm1_gc_short_with_complex_long.yml
deleted file mode 100644
index c22ea74a60..0000000000
--- a/benchmark/vm1_gc_short_with_complex_long.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-prelude: |
- def nested_hash h, n
- if n == 0
- ''
- else
- 10.times{
- h[Object.new] = nested_hash(h, n-1)
- }
- end
- end
-
- long_lived = Hash.new
- nested_hash long_lived, 6
-
- GC.start
- GC.start
-benchmark:
- vm1_gc_short_with_complex_long: |
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_long.yml b/benchmark/vm1_gc_short_with_long.yml
deleted file mode 100644
index c731aae548..0000000000
--- a/benchmark/vm1_gc_short_with_long.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-prelude: |
- long_lived = Array.new(1_000_000){|i| "#{i}"}
- GC.start
- GC.start
-benchmark:
- vm1_gc_short_with_long: |
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_short_with_symbol.yml b/benchmark/vm1_gc_short_with_symbol.yml
deleted file mode 100644
index 7fc1abedd8..0000000000
--- a/benchmark/vm1_gc_short_with_symbol.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-prelude: |
- 50_000.times{|i| sym = "sym#{i}".to_sym}
- GC.start
- GC.start
-benchmark:
- vm1_gc_short_with_symbol: |
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_ary.yml b/benchmark/vm1_gc_wb_ary.yml
deleted file mode 100644
index 50fb4b6f84..0000000000
--- a/benchmark/vm1_gc_wb_ary.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-prelude: |
- short_lived_ary = []
-
- if RUBY_VERSION >= "2.2.0"
- GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
- end
-
- short_lived = ''
-benchmark:
- vm1_gc_wb_ary: |
- short_lived_ary[0] = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_ary_promoted.yml b/benchmark/vm1_gc_wb_ary_promoted.yml
deleted file mode 100644
index cf9b5de005..0000000000
--- a/benchmark/vm1_gc_wb_ary_promoted.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-prelude: |
- long_lived = []
-
- if RUBY_VERSION > "2.2.0"
- 3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) }
- elsif
- GC.start
- end
-
- short_lived = ''
-
-benchmark:
- vm1_gc_wb_ary_promoted: |
- long_lived[0] = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_obj.yml b/benchmark/vm1_gc_wb_obj.yml
deleted file mode 100644
index 9dc08e7e1a..0000000000
--- a/benchmark/vm1_gc_wb_obj.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-prelude: |
- class C
- attr_accessor :foo
- end
- short_lived_obj = C.new
-
- if RUBY_VERSION >= "2.2.0"
- GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
- end
-
- short_lived = ''
-benchmark:
- vm1_gc_wb_obj: |
- short_lived_obj.foo = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_gc_wb_obj_promoted.yml b/benchmark/vm1_gc_wb_obj_promoted.yml
deleted file mode 100644
index 26859d2a52..0000000000
--- a/benchmark/vm1_gc_wb_obj_promoted.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-prelude: |
- class C
- attr_accessor :foo
- end
- long_lived = C.new
-
- if RUBY_VERSION >= "2.2.0"
- 3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) }
- elsif
- GC.start
- end
-
- short_lived = ''
-benchmark:
- vm1_gc_wb_obj_promoted: |
- long_lived.foo = short_lived # write barrier
-loop_count: 30000000
diff --git a/benchmark/vm1_ivar.yml b/benchmark/vm1_ivar.yml
deleted file mode 100644
index 7aa6fac729..0000000000
--- a/benchmark/vm1_ivar.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-prelude: "@a = 1\n"
-benchmark:
- vm1_ivar: |
- j = @a
- k = @a
-loop_count: 30000000
diff --git a/benchmark/vm1_ivar_set.yml b/benchmark/vm1_ivar_set.yml
deleted file mode 100644
index 6f19412d16..0000000000
--- a/benchmark/vm1_ivar_set.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-benchmark:
- vm1_ivar_set: |
- @a = 1
- @b = 2
-loop_count: 30000000
diff --git a/benchmark/vm1_length.yml b/benchmark/vm1_length.yml
deleted file mode 100644
index a18e2ca2e6..0000000000
--- a/benchmark/vm1_length.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- a = 'abc'
- b = [1, 2, 3]
-benchmark:
- vm1_length: |
- a.length
- b.length
-loop_count: 30000000
diff --git a/benchmark/vm1_lvar_init.yml b/benchmark/vm1_lvar_init.yml
deleted file mode 100644
index 10e2becef9..0000000000
--- a/benchmark/vm1_lvar_init.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# while loop cost is not removed because `i` is used in the script
-benchmark:
- vm1_lvar_init: |
- def m v
- unless v
- # unreachable code
- v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = v10 =
- v11 = v12 = v13 = v14 = v15 = v16 = v17 = v18 = v19 = v20 =
- v21 = v22 = v23 = v24 = v25 = v26 = v27 = v28 = v29 = v30 =
- v31 = v32 = v33 = v34 = v35 = v36 = v37 = v38 = v39 = v40 =
- v41 = v42 = v43 = v44 = v45 = v46 = v47 = v48 = v49 = v50 = 1
- end
- end
-
- i = 0
-
- while i<30_000_000
- i += 1
- m i
- end
-loop_count: 1
diff --git a/benchmark/vm1_lvar_set.yml b/benchmark/vm1_lvar_set.yml
deleted file mode 100644
index df8f6b6ea4..0000000000
--- a/benchmark/vm1_lvar_set.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm1_lvar_set: |
- a = b = c = d = e = f = g = h = j = k = l = m = n = o = p = q = r = 1
-loop_count: 30000000
diff --git a/benchmark/vm1_neq.yml b/benchmark/vm1_neq.yml
deleted file mode 100644
index 65a8128dda..0000000000
--- a/benchmark/vm1_neq.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- obj1 = Object.new
- obj2 = Object.new
-benchmark:
- vm1_neq: |
- obj1 != obj2
-loop_count: 30000000
diff --git a/benchmark/vm1_not.yml b/benchmark/vm1_not.yml
deleted file mode 100644
index 0fb7b282a9..0000000000
--- a/benchmark/vm1_not.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-prelude: |
- obj = Object.new
-benchmark:
- vm1_not: |
- !obj
-loop_count: 30000000
diff --git a/benchmark/vm1_rescue.yml b/benchmark/vm1_rescue.yml
deleted file mode 100644
index a175b823af..0000000000
--- a/benchmark/vm1_rescue.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-benchmark:
- vm1_rescue: |
- begin
- rescue
- end
-loop_count: 30000000
diff --git a/benchmark/vm1_simplereturn.yml b/benchmark/vm1_simplereturn.yml
deleted file mode 100644
index 3564aac7e2..0000000000
--- a/benchmark/vm1_simplereturn.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- def m
- return 1
- end
-benchmark:
- vm1_simplereturn: m
-loop_count: 30000000
diff --git a/benchmark/vm1_swap.yml b/benchmark/vm1_swap.yml
deleted file mode 100644
index fed87ccd62..0000000000
--- a/benchmark/vm1_swap.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- a = 1
- b = 2
-benchmark:
- vm1_swap: |
- a, b = b, a
-loop_count: 30000000
diff --git a/benchmark/vm1_yield.yml b/benchmark/vm1_yield.yml
deleted file mode 100644
index ae1f9316f9..0000000000
--- a/benchmark/vm1_yield.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# while loop cost is not removed due to benchmark_driver.gem's limitation
-benchmark:
- vm1_yield: |
- def m
- i = 0
- while i<30_000_000
- i += 1
- yield
- end
- end
-
- m{}
-loop_count: 1
diff --git a/benchmark/vm2_array.yml b/benchmark/vm2_array.yml
deleted file mode 100644
index 7373098d5e..0000000000
--- a/benchmark/vm2_array.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_array: |
- a = [1,2,3,4,5,6,7,8,9,10]
-loop_count: 6000000
diff --git a/benchmark/vm2_bigarray.yml b/benchmark/vm2_bigarray.yml
deleted file mode 100644
index 2ad6da3905..0000000000
--- a/benchmark/vm2_bigarray.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-benchmark:
- vm2_bigarray: |
- a = [
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- 1,2,3,4,5,6,7,8,9,10,
- ]
-loop_count: 6000000
diff --git a/benchmark/vm2_bighash.yml b/benchmark/vm2_bighash.yml
deleted file mode 100644
index e9154e4ba9..0000000000
--- a/benchmark/vm2_bighash.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_bighash: |
- a = {0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>15, 16=>16, 17=>17, 18=>18, 19=>19, 20=>20, 21=>21, 22=>22, 23=>23, 24=>24, 25=>25, 26=>26, 27=>27, 28=>28, 29=>29, 30=>30, 31=>31, 32=>32, 33=>33, 34=>34, 35=>35, 36=>36, 37=>37, 38=>38, 39=>39, 40=>40, 41=>41, 42=>42, 43=>43, 44=>44, 45=>45, 46=>46, 47=>47, 48=>48, 49=>49, 50=>50, 51=>51, 52=>52, 53=>53, 54=>54, 55=>55, 56=>56, 57=>57, 58=>58, 59=>59, 60=>60, 61=>61, 62=>62, 63=>63, 64=>64, 65=>65, 66=>66, 67=>67, 68=>68, 69=>69, 70=>70, 71=>71, 72=>72, 73=>73, 74=>74, 75=>75, 76=>76, 77=>77, 78=>78, 79=>79, 80=>80, 81=>81, 82=>82, 83=>83, 84=>84, 85=>85, 86=>86, 87=>87, 88=>88, 89=>89, 90=>90, 91=>91, 92=>92, 93=>93, 94=>94, 95=>95, 96=>96, 97=>97, 98=>98, 99=>99, 100=>100, 101=>101, 102=>102, 103=>103, 104=>104, 105=>105, 106=>106, 107=>107, 108=>108, 109=>109, 110=>110, 111=>111, 112=>112, 113=>113, 114=>114, 115=>115, 116=>116, 117=>117, 118=>118, 119=>119, 120=>120, 121=>121, 122=>122, 123=>123, 124=>124, 125=>125, 126=>126, 127=>127, 128=>128, 129=>129, 130=>130, 131=>131, 132=>132, 133=>133, 134=>134, 135=>135, 136=>136, 137=>137, 138=>138, 139=>139, 140=>140, 141=>141, 142=>142, 143=>143, 144=>144, 145=>145, 146=>146, 147=>147, 148=>148, 149=>149, 150=>150, 151=>151, 152=>152, 153=>153, 154=>154, 155=>155, 156=>156, 157=>157, 158=>158, 159=>159, 160=>160, 161=>161, 162=>162, 163=>163, 164=>164, 165=>165, 166=>166, 167=>167, 168=>168, 169=>169, 170=>170, 171=>171, 172=>172, 173=>173, 174=>174, 175=>175, 176=>176, 177=>177, 178=>178, 179=>179, 180=>180, 181=>181, 182=>182, 183=>183, 184=>184, 185=>185, 186=>186, 187=>187, 188=>188, 189=>189, 190=>190, 191=>191, 192=>192, 193=>193, 194=>194, 195=>195, 196=>196, 197=>197, 198=>198, 199=>199, 200=>200, 201=>201, 202=>202, 203=>203, 204=>204, 205=>205, 206=>206, 207=>207, 208=>208, 209=>209, 210=>210, 211=>211, 212=>212, 213=>213, 214=>214, 215=>215, 216=>216, 217=>217, 218=>218, 219=>219, 220=>220, 221=>221, 222=>222, 223=>223, 224=>224, 225=>225, 226=>226, 227=>227, 228=>228, 229=>229, 230=>230, 231=>231, 232=>232, 233=>233, 234=>234, 235=>235, 236=>236, 237=>237, 238=>238, 239=>239, 240=>240, 241=>241, 242=>242, 243=>243, 244=>244, 245=>245, 246=>246, 247=>247, 248=>248, 249=>249, 250=>250, 251=>251, 252=>252, 253=>253, 254=>254, 255=>255, 256=>256, 257=>257, 258=>258, 259=>259, 260=>260, 261=>261, 262=>262, 263=>263, 264=>264, 265=>265, 266=>266, 267=>267, 268=>268, 269=>269, 270=>270, 271=>271, 272=>272, 273=>273, 274=>274, 275=>275, 276=>276, 277=>277, 278=>278, 279=>279, 280=>280, 281=>281, 282=>282, 283=>283, 284=>284, 285=>285, 286=>286, 287=>287, 288=>288, 289=>289, 290=>290, 291=>291, 292=>292, 293=>293, 294=>294, 295=>295, 296=>296, 297=>297, 298=>298, 299=>299, 300=>300, 301=>301, 302=>302, 303=>303, 304=>304, 305=>305, 306=>306, 307=>307, 308=>308, 309=>309, 310=>310, 311=>311, 312=>312, 313=>313, 314=>314, 315=>315, 316=>316, 317=>317, 318=>318, 319=>319, 320=>320, 321=>321, 322=>322, 323=>323, 324=>324, 325=>325, 326=>326, 327=>327, 328=>328, 329=>329, 330=>330, 331=>331, 332=>332, 333=>333, 334=>334, 335=>335, 336=>336, 337=>337, 338=>338, 339=>339, 340=>340, 341=>341, 342=>342, 343=>343, 344=>344, 345=>345, 346=>346, 347=>347, 348=>348, 349=>349, 350=>350, 351=>351, 352=>352, 353=>353, 354=>354, 355=>355, 356=>356, 357=>357, 358=>358, 359=>359, 360=>360, 361=>361, 362=>362, 363=>363, 364=>364, 365=>365, 366=>366, 367=>367, 368=>368, 369=>369, 370=>370, 371=>371, 372=>372, 373=>373, 374=>374, 375=>375, 376=>376, 377=>377, 378=>378, 379=>379, 380=>380, 381=>381, 382=>382, 383=>383, 384=>384, 385=>385, 386=>386, 387=>387, 388=>388, 389=>389, 390=>390, 391=>391, 392=>392, 393=>393, 394=>394, 395=>395, 396=>396, 397=>397, 398=>398, 399=>399, 400=>400, 401=>401, 402=>402, 403=>403, 404=>404, 405=>405, 406=>406, 407=>407, 408=>408, 409=>409, 410=>410, 411=>411, 412=>412, 413=>413, 414=>414, 415=>415, 416=>416, 417=>417, 418=>418, 419=>419, 420=>420, 421=>421, 422=>422, 423=>423, 424=>424, 425=>425, 426=>426, 427=>427, 428=>428, 429=>429, 430=>430, 431=>431, 432=>432, 433=>433, 434=>434, 435=>435, 436=>436, 437=>437, 438=>438, 439=>439, 440=>440, 441=>441, 442=>442, 443=>443, 444=>444, 445=>445, 446=>446, 447=>447, 448=>448, 449=>449, 450=>450, 451=>451, 452=>452, 453=>453, 454=>454, 455=>455, 456=>456, 457=>457, 458=>458, 459=>459, 460=>460, 461=>461, 462=>462, 463=>463, 464=>464, 465=>465, 466=>466, 467=>467, 468=>468, 469=>469, 470=>470, 471=>471, 472=>472, 473=>473, 474=>474, 475=>475, 476=>476, 477=>477, 478=>478, 479=>479, 480=>480, 481=>481, 482=>482, 483=>483, 484=>484, 485=>485, 486=>486, 487=>487, 488=>488, 489=>489, 490=>490, 491=>491, 492=>492, 493=>493, 494=>494, 495=>495, 496=>496, 497=>497, 498=>498, 499=>499, 500=>500,}
-loop_count: 60000
diff --git a/benchmark/vm2_case.yml b/benchmark/vm2_case.yml
deleted file mode 100644
index 7716783c09..0000000000
--- a/benchmark/vm2_case.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-benchmark:
- vm2_case: |
- case :foo
- when :bar
- raise
- when :baz
- raise
- when :boo
- raise
- when :foo
- # noop
- end
-loop_count: 6000000
diff --git a/benchmark/vm2_case_lit.yml b/benchmark/vm2_case_lit.yml
deleted file mode 100644
index c49b8dfe5e..0000000000
--- a/benchmark/vm2_case_lit.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_case_lit: |
- i = 0
- @ret = [ "foo", true, false, :sym, 6, nil, 0.1, 0xffffffffffffffff ]
- def foo(i)
- @ret[i % @ret.size]
- end
-
- while i<6_000_000
- case foo(i)
- when "foo" then :foo
- when true then true
- when false then false
- when :sym then :sym
- when 6 then :fix
- when nil then nil
- when 0.1 then :float
- when 0xffffffffffffffff then :big
- end
- i += 1
- end
-loop_count: 1
diff --git a/benchmark/vm2_defined_method.yml b/benchmark/vm2_defined_method.yml
deleted file mode 100644
index e1b0d55674..0000000000
--- a/benchmark/vm2_defined_method.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- class Object
- define_method(:m){}
- end
-benchmark:
- vm2_defined_method: |
- m; m; m; m; m; m; m; m;
-loop_count: 6000000
diff --git a/benchmark/vm2_dstr.yml b/benchmark/vm2_dstr.yml
deleted file mode 100644
index f8bd6e0133..0000000000
--- a/benchmark/vm2_dstr.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-prelude: |
- x = y = 'z'
-benchmark:
- vm2_dstr: |
- str = "foo#{x}bar#{y}baz"
-loop_count: 6000000
diff --git a/benchmark/vm2_eval.yml b/benchmark/vm2_eval.yml
deleted file mode 100644
index d506a9c079..0000000000
--- a/benchmark/vm2_eval.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_eval: |
- eval("1")
-loop_count: 6000000
diff --git a/benchmark/vm2_fiber_allocate.yml b/benchmark/vm2_fiber_allocate.yml
deleted file mode 100644
index f29705f694..0000000000
--- a/benchmark/vm2_fiber_allocate.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- # Disable GC to see raw throughput:
- GC.disable
-benchmark:
- vm2_fiber_allocate: |
- fiber = Fiber.new{Fiber.yield}
- fiber.resume
-loop_count: 100000
diff --git a/benchmark/vm2_fiber_count.yml b/benchmark/vm2_fiber_count.yml
deleted file mode 100644
index 3ecf6bdcb2..0000000000
--- a/benchmark/vm2_fiber_count.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-# On Linux, you will need to increase the maximum number of memory maps:
-# sudo sysctl -w vm.max_map_count=200000
-prelude: |
- fibers = []
-benchmark:
- vm2_fiber_count: |
- fiber = Fiber.new{Fiber.yield}
- fibers << fiber
- fiber.resume
-loop_count: 100000
diff --git a/benchmark/vm2_fiber_reuse.yml b/benchmark/vm2_fiber_reuse.yml
deleted file mode 100644
index 0170650638..0000000000
--- a/benchmark/vm2_fiber_reuse.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-prelude: |
- GC.disable
- fibers = []
-benchmark:
- vm2_fiber_reuse: |
- 1024.times do
- fiber = Fiber.new{Fiber.yield}
- fibers << fiber
- fiber.resume
- end
-
- fibers.clear
- GC.start
-loop_count: 200
diff --git a/benchmark/vm2_fiber_reuse_gc.yml b/benchmark/vm2_fiber_reuse_gc.yml
deleted file mode 100644
index 8fb91a84eb..0000000000
--- a/benchmark/vm2_fiber_reuse_gc.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# https://bugs.ruby-lang.org/issues/16009
-prelude: |
- fibers = []
-benchmark:
- vm2_fiber_reuse_gc: |
- 2000.times do
- fiber = Fiber.new{Fiber.yield}
- fibers << fiber
- fiber.resume
- end
- fibers.clear
-loop_count: 100
diff --git a/benchmark/vm2_fiber_switch.yml b/benchmark/vm2_fiber_switch.yml
deleted file mode 100644
index fbf7283c29..0000000000
--- a/benchmark/vm2_fiber_switch.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-prelude: |
- # based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
- fib = Fiber.new do
- loop { Fiber.yield }
- end
-benchmark:
- vm2_fiber_switch: |
- fib.resume
-loop_count: 20000000
diff --git a/benchmark/vm2_freezestring.yml b/benchmark/vm2_freezestring.yml
deleted file mode 100644
index b78af91a20..0000000000
--- a/benchmark/vm2_freezestring.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-prelude: |
- class String
- def freeze
- -self
- end
- end
-benchmark:
- vm2_freezestring: |
- "tXnL1BP5T1WPXMjuFNLQtallEtRcay1t2lHtJSrlVsDgvunlbtfpr/DGdH0NGYE9".freeze
-loop_count: 6000000
diff --git a/benchmark/vm2_method.yml b/benchmark/vm2_method.yml
deleted file mode 100644
index cc7b9b28ff..0000000000
--- a/benchmark/vm2_method.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- def m
- nil
- end
-benchmark:
- vm2_method: |
- m; m; m; m; m; m; m; m;
-loop_count: 6000000
diff --git a/benchmark/vm2_method_missing.yml b/benchmark/vm2_method_missing.yml
deleted file mode 100644
index cbfb794b25..0000000000
--- a/benchmark/vm2_method_missing.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-prelude: |
- class C
- def method_missing mid
- end
- end
-
- obj = C.new
-benchmark:
- vm2_method_missing: |
- obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m;
-loop_count: 6000000
diff --git a/benchmark/vm2_method_with_block.yml b/benchmark/vm2_method_with_block.yml
deleted file mode 100644
index 6e522adccc..0000000000
--- a/benchmark/vm2_method_with_block.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- def m
- nil
- end
-benchmark:
- vm2_method_with_block: |
- m{}; m{}; m{}; m{}; m{}; m{}; m{}; m{};
-loop_count: 6000000
diff --git a/benchmark/vm2_module_ann_const_set.yml b/benchmark/vm2_module_ann_const_set.yml
deleted file mode 100644
index b0becd9d3d..0000000000
--- a/benchmark/vm2_module_ann_const_set.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_module_ann_const_set: |
- Module.new.const_set(:X, Module.new)
-loop_count: 6000000
diff --git a/benchmark/vm2_module_const_set.yml b/benchmark/vm2_module_const_set.yml
deleted file mode 100644
index 05a640069c..0000000000
--- a/benchmark/vm2_module_const_set.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- module M
- end
- $VERBOSE = nil
-benchmark:
- vm2_module_const_set: |
- M.const_set(:X, Module.new)
-loop_count: 6000000
diff --git a/benchmark/vm2_mutex.yml b/benchmark/vm2_mutex.yml
deleted file mode 100644
index c40a90444a..0000000000
--- a/benchmark/vm2_mutex.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- require 'thread'
-
- m = Thread::Mutex.new
-benchmark:
- vm2_mutex: |
- m.synchronize{}
-loop_count: 6000000
diff --git a/benchmark/vm2_newlambda.yml b/benchmark/vm2_newlambda.yml
deleted file mode 100644
index 93133f9f30..0000000000
--- a/benchmark/vm2_newlambda.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_newlambda: |
- lambda {}
-loop_count: 6000000
diff --git a/benchmark/vm2_poly_method.yml b/benchmark/vm2_poly_method.yml
deleted file mode 100644
index 0104bdfb66..0000000000
--- a/benchmark/vm2_poly_method.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_poly_method: |
- class C1
- def m
- 1
- end
- end
- class C2
- def m
- 2
- end
- end
-
- o1 = C1.new
- o2 = C2.new
-
- i = 0
- while i<6_000_000
- o = (i % 2 == 0) ? o1 : o2
- o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
- i += 1
- end
-loop_count: 1
diff --git a/benchmark/vm2_poly_method_ov.yml b/benchmark/vm2_poly_method_ov.yml
deleted file mode 100644
index 3748073ba2..0000000000
--- a/benchmark/vm2_poly_method_ov.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_poly_method_ov: |
- class C1
- def m
- 1
- end
- end
- class C2
- def m
- 2
- end
- end
-
- o1 = C1.new
- o2 = C2.new
-
- i = 0
- while i<6_000_000
- o = (i % 2 == 0) ? o1 : o2
- # o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
- i += 1
- end
-loop_count: 1
diff --git a/benchmark/vm2_poly_same_method.yml b/benchmark/vm2_poly_same_method.yml
deleted file mode 100644
index 867c433cf8..0000000000
--- a/benchmark/vm2_poly_same_method.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-prelude: |
- module AR; end
- class AR::Base
- def create_or_update
- nil
- end
- def save
- create_or_update
- end
- end
- class Foo < AR::Base; end
- class Bar < AR::Base; end
- o1 = Foo.new
- o2 = Bar.new
-benchmark:
- vm2_poly_same_method: |
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
- o1.save; o2.save;
-loop_count: 6000000
diff --git a/benchmark/vm2_poly_singleton.yml b/benchmark/vm2_poly_singleton.yml
deleted file mode 100644
index e58d7bfb37..0000000000
--- a/benchmark/vm2_poly_singleton.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_poly_singleton: |
- class C1
- def m; 1; end
- end
-
- o1 = C1.new
- o2 = C1.new
- o2.singleton_class
-
- i = 0
- while i<6_000_000 # benchmark loop 2
- o = (i % 2 == 0) ? o1 : o2
- o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
- i += 1
- end
-loop_count: 1
diff --git a/benchmark/vm2_proc.yml b/benchmark/vm2_proc.yml
deleted file mode 100644
index 5c36e936d9..0000000000
--- a/benchmark/vm2_proc.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-prelude: |
- def m &b
- b
- end
-
- pr = m{
- a = 1
- }
-benchmark:
- vm2_proc: |
- pr.call
-loop_count: 6000000
diff --git a/benchmark/vm2_raise1.yml b/benchmark/vm2_raise1.yml
deleted file mode 100644
index f6eb308968..0000000000
--- a/benchmark/vm2_raise1.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-prelude: |
- def rec n
- if n > 0
- rec n-1
- else
- raise
- end
- end
-benchmark:
- vm2_raise1: |
- begin
- rec 1
- rescue
- # ignore
- end
-loop_count: 6000000
diff --git a/benchmark/vm2_raise2.yml b/benchmark/vm2_raise2.yml
deleted file mode 100644
index 7d51b1b314..0000000000
--- a/benchmark/vm2_raise2.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-prelude: |
- def rec n
- if n > 0
- rec n-1
- else
- raise
- end
- end
-benchmark:
- vm2_raise2: |
- begin
- rec 10
- rescue
- # ignore
- end
-loop_count: 6000000
diff --git a/benchmark/vm2_regexp.yml b/benchmark/vm2_regexp.yml
deleted file mode 100644
index e53341f43b..0000000000
--- a/benchmark/vm2_regexp.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-prelude: |
- str = 'xxxhogexxx'
-benchmark:
- vm2_regexp: |
- /hoge/ =~ str
- vm2_regexp_invert: |
- str =~ /hoge/
-loop_count: 6000000
diff --git a/benchmark/vm2_send.yml b/benchmark/vm2_send.yml
deleted file mode 100644
index 44a12a27d9..0000000000
--- a/benchmark/vm2_send.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-prelude: |
- class C
- def m
- end
- end
-
- o = C.new
-benchmark:
- vm2_send: |
- o.__send__ :m
-loop_count: 6000000
diff --git a/benchmark/vm2_string_literal.yml b/benchmark/vm2_string_literal.yml
deleted file mode 100644
index 54b0aec1fe..0000000000
--- a/benchmark/vm2_string_literal.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-benchmark:
- vm2_string_literal: |
- x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aref_hi.yml b/benchmark/vm2_struct_big_aref_hi.yml
deleted file mode 100644
index eed1846d28..0000000000
--- a/benchmark/vm2_struct_big_aref_hi.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
-benchmark:
- vm2_struct_big_aref_hi: |
- x.z # x[25]
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aref_lo.yml b/benchmark/vm2_struct_big_aref_lo.yml
deleted file mode 100644
index 0915435b76..0000000000
--- a/benchmark/vm2_struct_big_aref_lo.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
-benchmark:
- vm2_struct_big_aref_lo: |
- x.k # x[10]
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_aset.yml b/benchmark/vm2_struct_big_aset.yml
deleted file mode 100644
index 6af50103d3..0000000000
--- a/benchmark/vm2_struct_big_aset.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_struct_big_aset: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
- i = 0
- while i<6_000_000
- i += 1
- x.k = i # x[10] = i
- end
-loop_count: 1
diff --git a/benchmark/vm2_struct_big_href_hi.yml b/benchmark/vm2_struct_big_href_hi.yml
deleted file mode 100644
index 60aa7fddf3..0000000000
--- a/benchmark/vm2_struct_big_href_hi.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
-benchmark:
- vm2_struct_big_href_hi: |
- x[:z]
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_href_lo.yml b/benchmark/vm2_struct_big_href_lo.yml
deleted file mode 100644
index c55c0bd16c..0000000000
--- a/benchmark/vm2_struct_big_href_lo.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
-benchmark:
- vm2_struct_big_href_lo: |
- x[:k]
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_big_hset.yml b/benchmark/vm2_struct_big_hset.yml
deleted file mode 100644
index d199c5bd47..0000000000
--- a/benchmark/vm2_struct_big_hset.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_struct_big_hset: |
- s = Struct.new(*('a'..'z').map { |x| x.to_sym })
- x = s.new
- i = 0
- while i<6_000_000
- i += 1
- x[:k] = i
- end
-loop_count: 1
diff --git a/benchmark/vm2_struct_small_aref.yml b/benchmark/vm2_struct_small_aref.yml
deleted file mode 100644
index 83381bed3a..0000000000
--- a/benchmark/vm2_struct_small_aref.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(:a, :b, :c)
- x = s.new
-benchmark:
- vm2_struct_small_aref: |
- x.a
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_small_aset.yml b/benchmark/vm2_struct_small_aset.yml
deleted file mode 100644
index 3e84a61dd0..0000000000
--- a/benchmark/vm2_struct_small_aset.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# loop_count is not utilized since `i` is involved in the script
-benchmark:
- vm2_struct_small_aset: |
- s = Struct.new(:a, :b, :c)
- x = s.new
- i = 0
- while i<6_000_000
- i += 1
- x.a = i
- end
-loop_count: 1
diff --git a/benchmark/vm2_struct_small_href.yml b/benchmark/vm2_struct_small_href.yml
deleted file mode 100644
index b744f070d1..0000000000
--- a/benchmark/vm2_struct_small_href.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(:a, :b, :c)
- x = s.new
-benchmark:
- vm2_struct_small_href: |
- x[:a]
-loop_count: 6000000
diff --git a/benchmark/vm2_struct_small_hset.yml b/benchmark/vm2_struct_small_hset.yml
deleted file mode 100644
index d43845d6e0..0000000000
--- a/benchmark/vm2_struct_small_hset.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- s = Struct.new(:a, :b, :c)
- x = s.new
-benchmark:
- vm2_struct_small_hset: |
- x[:a] = 1
-loop_count: 6000000
diff --git a/benchmark/vm2_super.yml b/benchmark/vm2_super.yml
deleted file mode 100644
index 674743762a..0000000000
--- a/benchmark/vm2_super.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-prelude: |
- class C
- def m
- 1
- end
- end
-
- class CC < C
- def m
- super()
- end
- end
-
- obj = CC.new
-benchmark:
- vm2_super: obj.m
-loop_count: 6000000
diff --git a/benchmark/vm2_unif1.yml b/benchmark/vm2_unif1.yml
deleted file mode 100644
index caef13279f..0000000000
--- a/benchmark/vm2_unif1.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-prelude: |
- def m a, b
- end
-benchmark:
- vm2_unif1: |
- m 100, 200
-loop_count: 6000000
diff --git a/benchmark/vm2_zsuper.yml b/benchmark/vm2_zsuper.yml
deleted file mode 100644
index f760cfd48e..0000000000
--- a/benchmark/vm2_zsuper.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-prelude: |
- class C
- def m a
- 1
- end
- end
-
- class CC < C
- def m a
- super
- end
- end
-
- obj = CC.new
-benchmark:
- vm2_zsuper: |
- obj.m 10
-loop_count: 6000000
diff --git a/benchmark/vm_array.yml b/benchmark/vm_array.yml
new file mode 100644
index 0000000000..2a177237ef
--- /dev/null
+++ b/benchmark/vm_array.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_array: |
+ a = [1,2,3,4,5,6,7,8,9,10]
+loop_count: 6000000
diff --git a/benchmark/vm_attr_ivar.yml b/benchmark/vm_attr_ivar.yml
new file mode 100644
index 0000000000..75b803478e
--- /dev/null
+++ b/benchmark/vm_attr_ivar.yml
@@ -0,0 +1,14 @@
+prelude: |
+ class C
+ attr_reader :a, :b
+ def initialize
+ @a = nil
+ @b = nil
+ end
+ end
+ obj = C.new
+benchmark:
+ vm_attr_ivar: |
+ j = obj.a
+ k = obj.b
+loop_count: 30000000
diff --git a/benchmark/vm_attr_ivar_set.yml b/benchmark/vm_attr_ivar_set.yml
new file mode 100644
index 0000000000..a0d379b18a
--- /dev/null
+++ b/benchmark/vm_attr_ivar_set.yml
@@ -0,0 +1,14 @@
+prelude: |
+ class C
+ attr_accessor :a, :b
+ def initialize
+ @a = nil
+ @b = nil
+ end
+ end
+ obj = C.new
+benchmark:
+ vm_attr_ivar_set: |
+ obj.a = 1
+ obj.b = 2
+loop_count: 30000000
diff --git a/benchmark/vm3_backtrace.rb b/benchmark/vm_backtrace.rb
index 0fbf73e1ca..0fbf73e1ca 100644
--- a/benchmark/vm3_backtrace.rb
+++ b/benchmark/vm_backtrace.rb
diff --git a/benchmark/vm_bigarray.yml b/benchmark/vm_bigarray.yml
new file mode 100644
index 0000000000..8b2d3f3443
--- /dev/null
+++ b/benchmark/vm_bigarray.yml
@@ -0,0 +1,105 @@
+benchmark:
+ vm_bigarray: |
+ a = [
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ 1,2,3,4,5,6,7,8,9,10,
+ ]
+loop_count: 6000000
diff --git a/benchmark/vm_bighash.yml b/benchmark/vm_bighash.yml
new file mode 100644
index 0000000000..4dacfde793
--- /dev/null
+++ b/benchmark/vm_bighash.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_bighash: |
+ a = {0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12, 13=>13, 14=>14, 15=>15, 16=>16, 17=>17, 18=>18, 19=>19, 20=>20, 21=>21, 22=>22, 23=>23, 24=>24, 25=>25, 26=>26, 27=>27, 28=>28, 29=>29, 30=>30, 31=>31, 32=>32, 33=>33, 34=>34, 35=>35, 36=>36, 37=>37, 38=>38, 39=>39, 40=>40, 41=>41, 42=>42, 43=>43, 44=>44, 45=>45, 46=>46, 47=>47, 48=>48, 49=>49, 50=>50, 51=>51, 52=>52, 53=>53, 54=>54, 55=>55, 56=>56, 57=>57, 58=>58, 59=>59, 60=>60, 61=>61, 62=>62, 63=>63, 64=>64, 65=>65, 66=>66, 67=>67, 68=>68, 69=>69, 70=>70, 71=>71, 72=>72, 73=>73, 74=>74, 75=>75, 76=>76, 77=>77, 78=>78, 79=>79, 80=>80, 81=>81, 82=>82, 83=>83, 84=>84, 85=>85, 86=>86, 87=>87, 88=>88, 89=>89, 90=>90, 91=>91, 92=>92, 93=>93, 94=>94, 95=>95, 96=>96, 97=>97, 98=>98, 99=>99, 100=>100, 101=>101, 102=>102, 103=>103, 104=>104, 105=>105, 106=>106, 107=>107, 108=>108, 109=>109, 110=>110, 111=>111, 112=>112, 113=>113, 114=>114, 115=>115, 116=>116, 117=>117, 118=>118, 119=>119, 120=>120, 121=>121, 122=>122, 123=>123, 124=>124, 125=>125, 126=>126, 127=>127, 128=>128, 129=>129, 130=>130, 131=>131, 132=>132, 133=>133, 134=>134, 135=>135, 136=>136, 137=>137, 138=>138, 139=>139, 140=>140, 141=>141, 142=>142, 143=>143, 144=>144, 145=>145, 146=>146, 147=>147, 148=>148, 149=>149, 150=>150, 151=>151, 152=>152, 153=>153, 154=>154, 155=>155, 156=>156, 157=>157, 158=>158, 159=>159, 160=>160, 161=>161, 162=>162, 163=>163, 164=>164, 165=>165, 166=>166, 167=>167, 168=>168, 169=>169, 170=>170, 171=>171, 172=>172, 173=>173, 174=>174, 175=>175, 176=>176, 177=>177, 178=>178, 179=>179, 180=>180, 181=>181, 182=>182, 183=>183, 184=>184, 185=>185, 186=>186, 187=>187, 188=>188, 189=>189, 190=>190, 191=>191, 192=>192, 193=>193, 194=>194, 195=>195, 196=>196, 197=>197, 198=>198, 199=>199, 200=>200, 201=>201, 202=>202, 203=>203, 204=>204, 205=>205, 206=>206, 207=>207, 208=>208, 209=>209, 210=>210, 211=>211, 212=>212, 213=>213, 214=>214, 215=>215, 216=>216, 217=>217, 218=>218, 219=>219, 220=>220, 221=>221, 222=>222, 223=>223, 224=>224, 225=>225, 226=>226, 227=>227, 228=>228, 229=>229, 230=>230, 231=>231, 232=>232, 233=>233, 234=>234, 235=>235, 236=>236, 237=>237, 238=>238, 239=>239, 240=>240, 241=>241, 242=>242, 243=>243, 244=>244, 245=>245, 246=>246, 247=>247, 248=>248, 249=>249, 250=>250, 251=>251, 252=>252, 253=>253, 254=>254, 255=>255, 256=>256, 257=>257, 258=>258, 259=>259, 260=>260, 261=>261, 262=>262, 263=>263, 264=>264, 265=>265, 266=>266, 267=>267, 268=>268, 269=>269, 270=>270, 271=>271, 272=>272, 273=>273, 274=>274, 275=>275, 276=>276, 277=>277, 278=>278, 279=>279, 280=>280, 281=>281, 282=>282, 283=>283, 284=>284, 285=>285, 286=>286, 287=>287, 288=>288, 289=>289, 290=>290, 291=>291, 292=>292, 293=>293, 294=>294, 295=>295, 296=>296, 297=>297, 298=>298, 299=>299, 300=>300, 301=>301, 302=>302, 303=>303, 304=>304, 305=>305, 306=>306, 307=>307, 308=>308, 309=>309, 310=>310, 311=>311, 312=>312, 313=>313, 314=>314, 315=>315, 316=>316, 317=>317, 318=>318, 319=>319, 320=>320, 321=>321, 322=>322, 323=>323, 324=>324, 325=>325, 326=>326, 327=>327, 328=>328, 329=>329, 330=>330, 331=>331, 332=>332, 333=>333, 334=>334, 335=>335, 336=>336, 337=>337, 338=>338, 339=>339, 340=>340, 341=>341, 342=>342, 343=>343, 344=>344, 345=>345, 346=>346, 347=>347, 348=>348, 349=>349, 350=>350, 351=>351, 352=>352, 353=>353, 354=>354, 355=>355, 356=>356, 357=>357, 358=>358, 359=>359, 360=>360, 361=>361, 362=>362, 363=>363, 364=>364, 365=>365, 366=>366, 367=>367, 368=>368, 369=>369, 370=>370, 371=>371, 372=>372, 373=>373, 374=>374, 375=>375, 376=>376, 377=>377, 378=>378, 379=>379, 380=>380, 381=>381, 382=>382, 383=>383, 384=>384, 385=>385, 386=>386, 387=>387, 388=>388, 389=>389, 390=>390, 391=>391, 392=>392, 393=>393, 394=>394, 395=>395, 396=>396, 397=>397, 398=>398, 399=>399, 400=>400, 401=>401, 402=>402, 403=>403, 404=>404, 405=>405, 406=>406, 407=>407, 408=>408, 409=>409, 410=>410, 411=>411, 412=>412, 413=>413, 414=>414, 415=>415, 416=>416, 417=>417, 418=>418, 419=>419, 420=>420, 421=>421, 422=>422, 423=>423, 424=>424, 425=>425, 426=>426, 427=>427, 428=>428, 429=>429, 430=>430, 431=>431, 432=>432, 433=>433, 434=>434, 435=>435, 436=>436, 437=>437, 438=>438, 439=>439, 440=>440, 441=>441, 442=>442, 443=>443, 444=>444, 445=>445, 446=>446, 447=>447, 448=>448, 449=>449, 450=>450, 451=>451, 452=>452, 453=>453, 454=>454, 455=>455, 456=>456, 457=>457, 458=>458, 459=>459, 460=>460, 461=>461, 462=>462, 463=>463, 464=>464, 465=>465, 466=>466, 467=>467, 468=>468, 469=>469, 470=>470, 471=>471, 472=>472, 473=>473, 474=>474, 475=>475, 476=>476, 477=>477, 478=>478, 479=>479, 480=>480, 481=>481, 482=>482, 483=>483, 484=>484, 485=>485, 486=>486, 487=>487, 488=>488, 489=>489, 490=>490, 491=>491, 492=>492, 493=>493, 494=>494, 495=>495, 496=>496, 497=>497, 498=>498, 499=>499, 500=>500,}
+loop_count: 60000
diff --git a/benchmark/vm_block.yml b/benchmark/vm_block.yml
new file mode 100644
index 0000000000..68b3e40bf5
--- /dev/null
+++ b/benchmark/vm_block.yml
@@ -0,0 +1,9 @@
+prelude: |
+ def m
+ yield
+ end
+benchmark:
+ vm_block: |
+ m{
+ }
+loop_count: 30000000
diff --git a/benchmark/vm_block_handler.yml b/benchmark/vm_block_handler.yml
new file mode 100644
index 0000000000..461d7953ad
--- /dev/null
+++ b/benchmark/vm_block_handler.yml
@@ -0,0 +1,27 @@
+# :FIXME: is there a way to benchmark block_handler_type_ifunc?
+
+prelude: |
+ p = proc{_1}
+ o = Object.new
+ def o.each
+ i = 0
+ while i < 3_000_000 do
+ yield i
+ i += 1
+ end
+ end
+
+benchmark:
+ - name: block_handler_type_iseq
+ script: |
+ o.each{_1}
+
+ - name: block_handler_type_symbol
+ script: |
+ o.each(&:itself)
+
+ - name: block_handler_type_proc
+ script: |
+ o.each(&p)
+
+loop_count: 1
diff --git a/benchmark/vm_blockparam.yml b/benchmark/vm_blockparam.yml
new file mode 100644
index 0000000000..5e5a0170a2
--- /dev/null
+++ b/benchmark/vm_blockparam.yml
@@ -0,0 +1,7 @@
+prelude: |
+ def m &b
+ end
+benchmark:
+ vm_blockparam: |
+ m{}
+loop_count: 30000000
diff --git a/benchmark/vm_blockparam_call.yml b/benchmark/vm_blockparam_call.yml
new file mode 100644
index 0000000000..a7d8d366ea
--- /dev/null
+++ b/benchmark/vm_blockparam_call.yml
@@ -0,0 +1,8 @@
+prelude: |
+ def m &b
+ b.call
+ end
+benchmark:
+ vm_blockparam_call: |
+ m{}
+loop_count: 30000000
diff --git a/benchmark/vm_blockparam_pass.yml b/benchmark/vm_blockparam_pass.yml
new file mode 100644
index 0000000000..841f5e7a63
--- /dev/null
+++ b/benchmark/vm_blockparam_pass.yml
@@ -0,0 +1,12 @@
+prelude: |
+ def bp_yield
+ yield
+ end
+
+ def bp_pass &b
+ bp_yield &b
+ end
+benchmark:
+ vm_blockparam_pass: |
+ bp_pass{}
+loop_count: 30000000
diff --git a/benchmark/vm_blockparam_yield.yml b/benchmark/vm_blockparam_yield.yml
new file mode 100644
index 0000000000..8ea9b46ed2
--- /dev/null
+++ b/benchmark/vm_blockparam_yield.yml
@@ -0,0 +1,8 @@
+prelude: |
+ def bp_yield &b
+ yield
+ end
+benchmark:
+ vm_blockparam_yield: |
+ bp_yield{}
+loop_count: 30000000
diff --git a/benchmark/vm_case.yml b/benchmark/vm_case.yml
new file mode 100644
index 0000000000..b26a491a15
--- /dev/null
+++ b/benchmark/vm_case.yml
@@ -0,0 +1,13 @@
+benchmark:
+ vm_case: |
+ case :foo
+ when :bar
+ raise
+ when :baz
+ raise
+ when :boo
+ raise
+ when :foo
+ # noop
+ end
+loop_count: 6000000
diff --git a/benchmark/vm_case_classes.yml b/benchmark/vm_case_classes.yml
new file mode 100644
index 0000000000..cacc4f0464
--- /dev/null
+++ b/benchmark/vm_case_classes.yml
@@ -0,0 +1,9 @@
+benchmark:
+ vm_case_classes: |
+ case :foo
+ when Hash
+ raise
+ when Array
+ raise
+ end
+loop_count: 6000000
diff --git a/benchmark/vm_case_lit.yml b/benchmark/vm_case_lit.yml
new file mode 100644
index 0000000000..9f91801544
--- /dev/null
+++ b/benchmark/vm_case_lit.yml
@@ -0,0 +1,23 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_case_lit: |
+ i = 0
+ @ret = [ "foo", true, false, :sym, 6, nil, 0.1, 0xffffffffffffffff ]
+ def foo(i)
+ @ret[i % @ret.size]
+ end
+
+ while i<6_000_000
+ case foo(i)
+ when "foo" then :foo
+ when true then true
+ when false then false
+ when :sym then :sym
+ when 6 then :fix
+ when nil then nil
+ when 0.1 then :float
+ when 0xffffffffffffffff then :big
+ end
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm3_clearmethodcache.rb b/benchmark/vm_clearmethodcache.rb
index 9661323cd2..9661323cd2 100644
--- a/benchmark/vm3_clearmethodcache.rb
+++ b/benchmark/vm_clearmethodcache.rb
diff --git a/benchmark/vm_const.yml b/benchmark/vm_const.yml
new file mode 100644
index 0000000000..8939ca0cd3
--- /dev/null
+++ b/benchmark/vm_const.yml
@@ -0,0 +1,13 @@
+prelude: |
+ Const = 1
+ A = B = C = D = E = F = G = H = I = J = K = L = M = N = O = P = Q = R = S = T = U = V = W = X = Y = Z = 1
+ def foo
+ A; B; C; D; E; F; G; H; I; J; K; L; M; N; O; P; Q; R; S; T; U; V; W; X; Y; Z
+ end
+benchmark:
+ vm_const: |
+ j = Const
+ k = Const
+ vm_const_many: |
+ foo
+loop_count: 30000000
diff --git a/benchmark/vm_cvar.yml b/benchmark/vm_cvar.yml
new file mode 100644
index 0000000000..1d0e161829
--- /dev/null
+++ b/benchmark/vm_cvar.yml
@@ -0,0 +1,20 @@
+prelude: |
+ class A
+ @@foo = 1
+
+ def self.foo
+ @@foo
+ end
+
+ ("A".."Z").each do |module_name|
+ eval <<-EOM
+ module #{module_name}
+ end
+
+ include #{module_name}
+ EOM
+ end
+ end
+benchmark:
+ vm_cvar: A.foo
+loop_count: 600000
diff --git a/benchmark/vm_defined_method.yml b/benchmark/vm_defined_method.yml
new file mode 100644
index 0000000000..347e0cfd33
--- /dev/null
+++ b/benchmark/vm_defined_method.yml
@@ -0,0 +1,8 @@
+prelude: |
+ class Object
+ define_method(:m){}
+ end
+benchmark:
+ vm_defined_method: |
+ m; m; m; m; m; m; m; m;
+loop_count: 6000000
diff --git a/benchmark/vm_dstr.yml b/benchmark/vm_dstr.yml
new file mode 100644
index 0000000000..30c7a3193c
--- /dev/null
+++ b/benchmark/vm_dstr.yml
@@ -0,0 +1,6 @@
+prelude: |
+ x = y = 'z'
+benchmark:
+ vm_dstr: |
+ str = "foo#{x}bar#{y}baz"
+loop_count: 6000000
diff --git a/benchmark/vm_dstr_ary.rb b/benchmark/vm_dstr_ary.rb
new file mode 100644
index 0000000000..1d3aa3b97b
--- /dev/null
+++ b/benchmark/vm_dstr_ary.rb
@@ -0,0 +1,6 @@
+i = 0
+x = y = []
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_bool.rb b/benchmark/vm_dstr_bool.rb
new file mode 100644
index 0000000000..631ca54755
--- /dev/null
+++ b/benchmark/vm_dstr_bool.rb
@@ -0,0 +1,7 @@
+i = 0
+x = true
+y = false
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_class_module.rb b/benchmark/vm_dstr_class_module.rb
new file mode 100644
index 0000000000..becf0861c7
--- /dev/null
+++ b/benchmark/vm_dstr_class_module.rb
@@ -0,0 +1,10 @@
+i = 0
+class A; end unless defined?(A)
+module B; end unless defined?(B)
+x = A
+y = B
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
+
diff --git a/benchmark/vm_dstr_digit.rb b/benchmark/vm_dstr_digit.rb
new file mode 100644
index 0000000000..caaa395192
--- /dev/null
+++ b/benchmark/vm_dstr_digit.rb
@@ -0,0 +1,7 @@
+i = 0
+x = 0
+y = 9
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_int.rb b/benchmark/vm_dstr_int.rb
new file mode 100644
index 0000000000..ed380d7595
--- /dev/null
+++ b/benchmark/vm_dstr_int.rb
@@ -0,0 +1,5 @@
+i = 0
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{i}bar#{i}baz"
+end
diff --git a/benchmark/vm_dstr_nil.rb b/benchmark/vm_dstr_nil.rb
new file mode 100644
index 0000000000..ec4f5d6c67
--- /dev/null
+++ b/benchmark/vm_dstr_nil.rb
@@ -0,0 +1,6 @@
+i = 0
+x = y = nil
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_obj.rb b/benchmark/vm_dstr_obj.rb
new file mode 100644
index 0000000000..fb78637ead
--- /dev/null
+++ b/benchmark/vm_dstr_obj.rb
@@ -0,0 +1,6 @@
+i = 0
+x = y = Object.new
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_obj_def.rb b/benchmark/vm_dstr_obj_def.rb
new file mode 100644
index 0000000000..99ff7b98fb
--- /dev/null
+++ b/benchmark/vm_dstr_obj_def.rb
@@ -0,0 +1,8 @@
+i = 0
+o = Object.new
+def o.to_s; -""; end
+x = y = o
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_str.rb b/benchmark/vm_dstr_str.rb
new file mode 100644
index 0000000000..45fc107892
--- /dev/null
+++ b/benchmark/vm_dstr_str.rb
@@ -0,0 +1,6 @@
+i = 0
+x = y = ""
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_dstr_sym.rb b/benchmark/vm_dstr_sym.rb
new file mode 100644
index 0000000000..484b8f8150
--- /dev/null
+++ b/benchmark/vm_dstr_sym.rb
@@ -0,0 +1,6 @@
+i = 0
+x = y = :z
+while i<6_000_000 # benchmark loop 2
+ i += 1
+ str = "foo#{x}bar#{y}baz"
+end
diff --git a/benchmark/vm_ensure.yml b/benchmark/vm_ensure.yml
new file mode 100644
index 0000000000..4ea62f30de
--- /dev/null
+++ b/benchmark/vm_ensure.yml
@@ -0,0 +1,14 @@
+# Not utilizing loop_count since using it for this is too unstable for now
+benchmark:
+ vm_ensure: |
+ i = 0
+ while i<30_000_000
+ i += 1
+ begin
+ begin
+ ensure
+ end
+ ensure
+ end
+ end
+loop_count: 1
diff --git a/benchmark/vm_eval.yml b/benchmark/vm_eval.yml
new file mode 100644
index 0000000000..7ba1a8d1de
--- /dev/null
+++ b/benchmark/vm_eval.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_eval: |
+ eval("1")
+loop_count: 6000000
diff --git a/benchmark/vm_fiber_allocate.yml b/benchmark/vm_fiber_allocate.yml
new file mode 100644
index 0000000000..b5a54e1ddf
--- /dev/null
+++ b/benchmark/vm_fiber_allocate.yml
@@ -0,0 +1,8 @@
+prelude: |
+ # Disable GC to see raw throughput:
+ GC.disable
+benchmark:
+ vm_fiber_allocate: |
+ fiber = Fiber.new{Fiber.yield}
+ fiber.resume
+loop_count: 100000
diff --git a/benchmark/vm_fiber_count.yml b/benchmark/vm_fiber_count.yml
new file mode 100644
index 0000000000..b83d3152d4
--- /dev/null
+++ b/benchmark/vm_fiber_count.yml
@@ -0,0 +1,10 @@
+# On Linux, you will need to increase the maximum number of memory maps:
+# sudo sysctl -w vm.max_map_count=200000
+prelude: |
+ fibers = []
+benchmark:
+ vm_fiber_count: |
+ fiber = Fiber.new{Fiber.yield}
+ fibers << fiber
+ fiber.resume
+loop_count: 100000
diff --git a/benchmark/vm_fiber_reuse.yml b/benchmark/vm_fiber_reuse.yml
new file mode 100644
index 0000000000..4ca41085b1
--- /dev/null
+++ b/benchmark/vm_fiber_reuse.yml
@@ -0,0 +1,14 @@
+prelude: |
+ GC.disable
+ fibers = []
+benchmark:
+ vm_fiber_reuse: |
+ 1024.times do
+ fiber = Fiber.new{Fiber.yield}
+ fibers << fiber
+ fiber.resume
+ end
+
+ fibers.clear
+ GC.start
+loop_count: 200
diff --git a/benchmark/vm_fiber_reuse_gc.yml b/benchmark/vm_fiber_reuse_gc.yml
new file mode 100644
index 0000000000..892622f121
--- /dev/null
+++ b/benchmark/vm_fiber_reuse_gc.yml
@@ -0,0 +1,12 @@
+# https://bugs.ruby-lang.org/issues/16009
+prelude: |
+ fibers = []
+benchmark:
+ vm_fiber_reuse_gc: |
+ 2000.times do
+ fiber = Fiber.new{Fiber.yield}
+ fibers << fiber
+ fiber.resume
+ end
+ fibers.clear
+loop_count: 100
diff --git a/benchmark/vm_fiber_switch.yml b/benchmark/vm_fiber_switch.yml
new file mode 100644
index 0000000000..3de36b66eb
--- /dev/null
+++ b/benchmark/vm_fiber_switch.yml
@@ -0,0 +1,9 @@
+prelude: |
+ # based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
+ fib = Fiber.new do
+ loop { Fiber.yield }
+ end
+benchmark:
+ vm_fiber_switch: |
+ fib.resume
+loop_count: 20000000
diff --git a/benchmark/vm_float_simple.yml b/benchmark/vm_float_simple.yml
new file mode 100644
index 0000000000..92f5fd52ab
--- /dev/null
+++ b/benchmark/vm_float_simple.yml
@@ -0,0 +1,8 @@
+prelude: |
+ f = 0.0
+benchmark:
+ vm_float_simple: |
+ f += 0.1; f -= 0.1
+ f += 0.1; f -= 0.1
+ f += 0.1; f -= 0.1
+loop_count: 30000000
diff --git a/benchmark/vm_freezeobj.yml b/benchmark/vm_freezeobj.yml
new file mode 100644
index 0000000000..69a795a354
--- /dev/null
+++ b/benchmark/vm_freezeobj.yml
@@ -0,0 +1,6 @@
+prelude: |
+ objs = 100000.times.map { Object.new }
+benchmark:
+ vm_freeze_obj: |
+ objs.map(&:freeze)
+loop_count: 600
diff --git a/benchmark/vm_freezestring.yml b/benchmark/vm_freezestring.yml
new file mode 100644
index 0000000000..facc9aa043
--- /dev/null
+++ b/benchmark/vm_freezestring.yml
@@ -0,0 +1,10 @@
+prelude: |
+ class String
+ def freeze
+ -self
+ end
+ end
+benchmark:
+ vm_freezestring: |
+ "tXnL1BP5T1WPXMjuFNLQtallEtRcay1t2lHtJSrlVsDgvunlbtfpr/DGdH0NGYE9".freeze
+loop_count: 6000000
diff --git a/benchmark/vm3_gc.rb b/benchmark/vm_gc.rb
index e668026915..e668026915 100644
--- a/benchmark/vm3_gc.rb
+++ b/benchmark/vm_gc.rb
diff --git a/benchmark/vm3_gc_old_full.rb b/benchmark/vm_gc_old_full.rb
index cfdfc8c5a5..cfdfc8c5a5 100644
--- a/benchmark/vm3_gc_old_full.rb
+++ b/benchmark/vm_gc_old_full.rb
diff --git a/benchmark/vm3_gc_old_immediate.rb b/benchmark/vm_gc_old_immediate.rb
index ad22feb655..ad22feb655 100644
--- a/benchmark/vm3_gc_old_immediate.rb
+++ b/benchmark/vm_gc_old_immediate.rb
diff --git a/benchmark/vm3_gc_old_lazy.rb b/benchmark/vm_gc_old_lazy.rb
index b74d44baf1..b74d44baf1 100644
--- a/benchmark/vm3_gc_old_lazy.rb
+++ b/benchmark/vm_gc_old_lazy.rb
diff --git a/benchmark/vm_gc_short_lived.yml b/benchmark/vm_gc_short_lived.yml
new file mode 100644
index 0000000000..29c803fee3
--- /dev/null
+++ b/benchmark/vm_gc_short_lived.yml
@@ -0,0 +1,9 @@
+benchmark:
+ vm_gc_short_lived: |
+ a = '' # short-lived String
+ b = ''
+ c = ''
+ d = ''
+ e = ''
+ f = ''
+loop_count: 30000000
diff --git a/benchmark/vm_gc_short_with_complex_long.yml b/benchmark/vm_gc_short_with_complex_long.yml
new file mode 100644
index 0000000000..4b6c3ed7b9
--- /dev/null
+++ b/benchmark/vm_gc_short_with_complex_long.yml
@@ -0,0 +1,25 @@
+prelude: |
+ def nested_hash h, n
+ if n == 0
+ ''
+ else
+ 10.times{
+ h[Object.new] = nested_hash(h, n-1)
+ }
+ end
+ end
+
+ long_lived = Hash.new
+ nested_hash long_lived, 6
+
+ GC.start
+ GC.start
+benchmark:
+ vm_gc_short_with_complex_long: |
+ a = '' # short-lived String
+ b = ''
+ c = ''
+ d = ''
+ e = ''
+ f = ''
+loop_count: 30000000
diff --git a/benchmark/vm_gc_short_with_long.yml b/benchmark/vm_gc_short_with_long.yml
new file mode 100644
index 0000000000..03ba0f95a9
--- /dev/null
+++ b/benchmark/vm_gc_short_with_long.yml
@@ -0,0 +1,13 @@
+prelude: |
+ long_lived = Array.new(1_000_000){|i| "#{i}"}
+ GC.start
+ GC.start
+benchmark:
+ vm_gc_short_with_long: |
+ a = '' # short-lived String
+ b = ''
+ c = ''
+ d = ''
+ e = ''
+ f = ''
+loop_count: 30000000
diff --git a/benchmark/vm_gc_short_with_symbol.yml b/benchmark/vm_gc_short_with_symbol.yml
new file mode 100644
index 0000000000..129b8bf4ed
--- /dev/null
+++ b/benchmark/vm_gc_short_with_symbol.yml
@@ -0,0 +1,13 @@
+prelude: |
+ 50_000.times{|i| sym = "sym#{i}".to_sym}
+ GC.start
+ GC.start
+benchmark:
+ vm_gc_short_with_symbol: |
+ a = '' # short-lived String
+ b = ''
+ c = ''
+ d = ''
+ e = ''
+ f = ''
+loop_count: 30000000
diff --git a/benchmark/vm_gc_wb_ary.yml b/benchmark/vm_gc_wb_ary.yml
new file mode 100644
index 0000000000..e3293e72d0
--- /dev/null
+++ b/benchmark/vm_gc_wb_ary.yml
@@ -0,0 +1,12 @@
+prelude: |
+ short_lived_ary = []
+
+ if RUBY_VERSION >= "2.2.0"
+ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
+ end
+
+ short_lived = ''
+benchmark:
+ vm_gc_wb_ary: |
+ short_lived_ary[0] = short_lived # write barrier
+loop_count: 30000000
diff --git a/benchmark/vm_gc_wb_ary_promoted.yml b/benchmark/vm_gc_wb_ary_promoted.yml
new file mode 100644
index 0000000000..003995945b
--- /dev/null
+++ b/benchmark/vm_gc_wb_ary_promoted.yml
@@ -0,0 +1,15 @@
+prelude: |
+ long_lived = []
+
+ if RUBY_VERSION > "2.2.0"
+ 3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) }
+ elsif
+ GC.start
+ end
+
+ short_lived = ''
+
+benchmark:
+ vm_gc_wb_ary_promoted: |
+ long_lived[0] = short_lived # write barrier
+loop_count: 30000000
diff --git a/benchmark/vm_gc_wb_obj.yml b/benchmark/vm_gc_wb_obj.yml
new file mode 100644
index 0000000000..a2a2ce2d18
--- /dev/null
+++ b/benchmark/vm_gc_wb_obj.yml
@@ -0,0 +1,15 @@
+prelude: |
+ class C
+ attr_accessor :foo
+ end
+ short_lived_obj = C.new
+
+ if RUBY_VERSION >= "2.2.0"
+ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true)
+ end
+
+ short_lived = ''
+benchmark:
+ vm_gc_wb_obj: |
+ short_lived_obj.foo = short_lived # write barrier
+loop_count: 30000000
diff --git a/benchmark/vm_gc_wb_obj_promoted.yml b/benchmark/vm_gc_wb_obj_promoted.yml
new file mode 100644
index 0000000000..00a454ba72
--- /dev/null
+++ b/benchmark/vm_gc_wb_obj_promoted.yml
@@ -0,0 +1,17 @@
+prelude: |
+ class C
+ attr_accessor :foo
+ end
+ long_lived = C.new
+
+ if RUBY_VERSION >= "2.2.0"
+ 3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) }
+ elsif
+ GC.start
+ end
+
+ short_lived = ''
+benchmark:
+ vm_gc_wb_obj_promoted: |
+ long_lived.foo = short_lived # write barrier
+loop_count: 30000000
diff --git a/benchmark/vm_iclass_super.yml b/benchmark/vm_iclass_super.yml
new file mode 100644
index 0000000000..21bb7db247
--- /dev/null
+++ b/benchmark/vm_iclass_super.yml
@@ -0,0 +1,20 @@
+prelude: |
+ class C
+ def m
+ 1
+ end
+
+ ("A".."M").each do |module_name|
+ eval <<-EOM
+ module #{module_name}
+ def m; super; end
+ end
+ prepend #{module_name}
+ EOM
+ end
+ end
+
+ obj = C.new
+benchmark:
+ vm_iclass_super: obj.m
+loop_count: 6000000
diff --git a/benchmark/vm_ivar.yml b/benchmark/vm_ivar.yml
new file mode 100644
index 0000000000..119531d5ef
--- /dev/null
+++ b/benchmark/vm_ivar.yml
@@ -0,0 +1,6 @@
+prelude: "@a = 1\n"
+benchmark:
+ vm_ivar: |
+ j = @a
+ k = @a
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_embedded_obj_init.yml b/benchmark/vm_ivar_embedded_obj_init.yml
new file mode 100644
index 0000000000..74fe20a630
--- /dev/null
+++ b/benchmark/vm_ivar_embedded_obj_init.yml
@@ -0,0 +1,14 @@
+prelude: |
+ class C
+ def set_ivars
+ @a = nil
+ @b = nil
+ @c = nil
+ end
+ end
+
+ c = C.new
+benchmark:
+ vm_ivar_embedded_obj_init: |
+ c.set_ivars
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_extended_obj_init.yml b/benchmark/vm_ivar_extended_obj_init.yml
new file mode 100644
index 0000000000..f054bab282
--- /dev/null
+++ b/benchmark/vm_ivar_extended_obj_init.yml
@@ -0,0 +1,16 @@
+prelude: |
+ class C
+ def set_ivars
+ @a = nil
+ @b = nil
+ @c = nil
+ @d = nil
+ @e = nil
+ end
+ end
+
+ c = C.new
+benchmark:
+ vm_ivar_extended_obj_init: |
+ c.set_ivars
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_generic_get.yml b/benchmark/vm_ivar_generic_get.yml
new file mode 100644
index 0000000000..dae2d37671
--- /dev/null
+++ b/benchmark/vm_ivar_generic_get.yml
@@ -0,0 +1,17 @@
+prelude: |
+ class C < Array
+ attr_reader :a, :b, :c
+ def initialize
+ @a = nil
+ @b = nil
+ @c = nil
+ end
+ end
+
+ c = C.new
+benchmark:
+ vm_ivar_generic_get: |
+ c.a
+ c.b
+ c.c
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_generic_set.yml b/benchmark/vm_ivar_generic_set.yml
new file mode 100644
index 0000000000..102a6577fb
--- /dev/null
+++ b/benchmark/vm_ivar_generic_set.yml
@@ -0,0 +1,14 @@
+prelude: |
+ class C < Array
+ def set_ivars
+ @a = nil
+ @b = nil
+ @c = nil
+ end
+ end
+
+ c = C.new
+benchmark:
+ vm_ivar_generic_set: |
+ c.set_ivars
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_get.yml b/benchmark/vm_ivar_get.yml
new file mode 100644
index 0000000000..9174af6965
--- /dev/null
+++ b/benchmark/vm_ivar_get.yml
@@ -0,0 +1,37 @@
+prelude: |
+ class Example
+ def initialize
+ @v0 = 1
+ @v1 = 2
+ @v3 = 3
+ @levar = 1
+ end
+
+ def get_value_loop
+ sum = 0
+
+ i = 0
+ while i < 1000000
+ # 10 times to de-emphasize loop overhead
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ sum += @levar
+ i += 1
+ end
+
+ return sum
+ end
+ end
+
+ obj = Example.new
+benchmark:
+ vm_ivar_get: |
+ obj.get_value_loop
+loop_count: 100
diff --git a/benchmark/vm_ivar_get_unintialized.yml b/benchmark/vm_ivar_get_unintialized.yml
new file mode 100644
index 0000000000..a1ccfb06ce
--- /dev/null
+++ b/benchmark/vm_ivar_get_unintialized.yml
@@ -0,0 +1,12 @@
+prelude: |
+ class Example
+ def read
+ @uninitialized
+ end
+ end
+
+ obj = Example.new
+benchmark:
+ vm_ivar_get_uninitialized: |
+ obj.read
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_lazy_set.yml b/benchmark/vm_ivar_lazy_set.yml
new file mode 100644
index 0000000000..7372ffcfbc
--- /dev/null
+++ b/benchmark/vm_ivar_lazy_set.yml
@@ -0,0 +1,12 @@
+prelude: |
+ class Example
+ def lazy_set
+ @uninitialized ||= 123
+ end
+ end
+
+ objs = 10000000.times.map { Example.new }
+benchmark:
+ vm_ivar_lazy_set: |
+ objs.each(&:lazy_set)
+loop_count: 1
diff --git a/benchmark/vm_ivar_of_class.yml b/benchmark/vm_ivar_of_class.yml
new file mode 100644
index 0000000000..172e28b2fd
--- /dev/null
+++ b/benchmark/vm_ivar_of_class.yml
@@ -0,0 +1,12 @@
+prelude: |
+ class C
+ @a = 1
+ def self.a
+ _a = @a; _a = @a; _a = @a; _a = @a; _a = @a;
+ _a = @a; _a = @a; _a = @a; _a = @a; _a = @a;
+ end
+ end
+benchmark:
+ vm_ivar_of_class: |
+ a = C.a
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_of_class_set.yml b/benchmark/vm_ivar_of_class_set.yml
new file mode 100644
index 0000000000..2ea5199423
--- /dev/null
+++ b/benchmark/vm_ivar_of_class_set.yml
@@ -0,0 +1,11 @@
+prelude: |
+ class C
+ @a = 1
+ def self.a o
+ @a = o; @a = o; @a = o; @a = o; @a = o; @a = o;
+ end
+ end
+benchmark:
+ vm_ivar_of_class_set: |
+ a = C.a(nil)
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_set.yml b/benchmark/vm_ivar_set.yml
new file mode 100644
index 0000000000..8bbb60043b
--- /dev/null
+++ b/benchmark/vm_ivar_set.yml
@@ -0,0 +1,5 @@
+benchmark:
+ vm_ivar_set: |
+ @a = 1
+ @b = 2
+loop_count: 30000000
diff --git a/benchmark/vm_ivar_set_on_instance.yml b/benchmark/vm_ivar_set_on_instance.yml
new file mode 100644
index 0000000000..91857b7742
--- /dev/null
+++ b/benchmark/vm_ivar_set_on_instance.yml
@@ -0,0 +1,35 @@
+prelude: |
+ class TheClass
+ def initialize
+ @v0 = 1
+ @v1 = 2
+ @v3 = 3
+ @levar = 1
+ end
+
+ def set_value_loop
+ # 1M
+ i = 0
+ while i < 1000000
+ # 10 times to de-emphasize loop overhead
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ @levar = i
+ i += 1
+ end
+ end
+ end
+
+ obj = TheClass.new
+
+benchmark:
+ vm_ivar_set_on_instance: |
+ obj.set_value_loop
+loop_count: 100
diff --git a/benchmark/vm_ivar_set_subclass.yml b/benchmark/vm_ivar_set_subclass.yml
new file mode 100644
index 0000000000..bc8bf5bf6b
--- /dev/null
+++ b/benchmark/vm_ivar_set_subclass.yml
@@ -0,0 +1,20 @@
+prelude: |
+ class A
+ def set_ivars
+ @a = nil
+ @b = nil
+ @c = nil
+ @d = nil
+ @e = nil
+ end
+ end
+ class B < A; end
+ class C < A; end
+
+ b = B.new
+ c = C.new
+benchmark:
+ vm_ivar_init_subclass: |
+ b.set_ivars
+ c.set_ivars
+loop_count: 3000000
diff --git a/benchmark/vm_length.yml b/benchmark/vm_length.yml
new file mode 100644
index 0000000000..5fd94e7d86
--- /dev/null
+++ b/benchmark/vm_length.yml
@@ -0,0 +1,8 @@
+prelude: |
+ a = 'abc'
+ b = [1, 2, 3]
+benchmark:
+ vm_length: |
+ a.length
+ b.length
+loop_count: 30000000
diff --git a/benchmark/vm_lvar_cond_set.yml b/benchmark/vm_lvar_cond_set.yml
new file mode 100644
index 0000000000..1845f9d12e
--- /dev/null
+++ b/benchmark/vm_lvar_cond_set.yml
@@ -0,0 +1,8 @@
+benchmark:
+ vm_lvar_cond_set: |
+ a ||= 1
+ b ||= 1
+ c ||= 1
+ d ||= 1
+ nil
+loop_count: 30000000
diff --git a/benchmark/vm_lvar_init.yml b/benchmark/vm_lvar_init.yml
new file mode 100644
index 0000000000..70a9b1c0ca
--- /dev/null
+++ b/benchmark/vm_lvar_init.yml
@@ -0,0 +1,21 @@
+# while loop cost is not removed because `i` is used in the script
+benchmark:
+ vm_lvar_init: |
+ def m v
+ unless v
+ # unreachable code
+ v1 = v2 = v3 = v4 = v5 = v6 = v7 = v8 = v9 = v10 =
+ v11 = v12 = v13 = v14 = v15 = v16 = v17 = v18 = v19 = v20 =
+ v21 = v22 = v23 = v24 = v25 = v26 = v27 = v28 = v29 = v30 =
+ v31 = v32 = v33 = v34 = v35 = v36 = v37 = v38 = v39 = v40 =
+ v41 = v42 = v43 = v44 = v45 = v46 = v47 = v48 = v49 = v50 = 1
+ end
+ end
+
+ i = 0
+
+ while i<30_000_000
+ i += 1
+ m i
+ end
+loop_count: 1
diff --git a/benchmark/vm_lvar_set.yml b/benchmark/vm_lvar_set.yml
new file mode 100644
index 0000000000..f29f763d81
--- /dev/null
+++ b/benchmark/vm_lvar_set.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_lvar_set: |
+ a = b = c = d = e = f = g = h = j = k = l = m = n = o = p = q = r = 1
+loop_count: 30000000
diff --git a/benchmark/vm_method.yml b/benchmark/vm_method.yml
new file mode 100644
index 0000000000..d45e4ec572
--- /dev/null
+++ b/benchmark/vm_method.yml
@@ -0,0 +1,8 @@
+prelude: |
+ def m
+ nil
+ end
+benchmark:
+ vm_method: |
+ m; m; m; m; m; m; m; m;
+loop_count: 6000000
diff --git a/benchmark/vm_method_missing.yml b/benchmark/vm_method_missing.yml
new file mode 100644
index 0000000000..3da456c0bb
--- /dev/null
+++ b/benchmark/vm_method_missing.yml
@@ -0,0 +1,11 @@
+prelude: |
+ class C
+ def method_missing mid
+ end
+ end
+
+ obj = C.new
+benchmark:
+ vm_method_missing: |
+ obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m; obj.m;
+loop_count: 6000000
diff --git a/benchmark/vm_method_with_block.yml b/benchmark/vm_method_with_block.yml
new file mode 100644
index 0000000000..281a481394
--- /dev/null
+++ b/benchmark/vm_method_with_block.yml
@@ -0,0 +1,8 @@
+prelude: |
+ def m
+ nil
+ end
+benchmark:
+ vm_method_with_block: |
+ m{}; m{}; m{}; m{}; m{}; m{}; m{}; m{};
+loop_count: 6000000
diff --git a/benchmark/vm_module_ann_const_set.yml b/benchmark/vm_module_ann_const_set.yml
new file mode 100644
index 0000000000..243229ba4a
--- /dev/null
+++ b/benchmark/vm_module_ann_const_set.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_module_ann_const_set: |
+ Module.new.const_set(:X, Module.new)
+loop_count: 6000000
diff --git a/benchmark/vm_module_const_set.yml b/benchmark/vm_module_const_set.yml
new file mode 100644
index 0000000000..e5a24181a9
--- /dev/null
+++ b/benchmark/vm_module_const_set.yml
@@ -0,0 +1,8 @@
+prelude: |
+ module M
+ end
+ $VERBOSE = nil
+benchmark:
+ vm_module_const_set: |
+ M.const_set(:X, Module.new)
+loop_count: 6000000
diff --git a/benchmark/vm_mutex.yml b/benchmark/vm_mutex.yml
new file mode 100644
index 0000000000..abcf1e28ce
--- /dev/null
+++ b/benchmark/vm_mutex.yml
@@ -0,0 +1,8 @@
+prelude: |
+ require 'thread'
+
+ m = Thread::Mutex.new
+benchmark:
+ vm_mutex: |
+ m.synchronize{}
+loop_count: 6000000
diff --git a/benchmark/vm_neq.yml b/benchmark/vm_neq.yml
new file mode 100644
index 0000000000..fb04d15ae8
--- /dev/null
+++ b/benchmark/vm_neq.yml
@@ -0,0 +1,7 @@
+prelude: |
+ obj1 = Object.new
+ obj2 = Object.new
+benchmark:
+ vm_neq: |
+ obj1 != obj2
+loop_count: 30000000
diff --git a/benchmark/vm_newlambda.yml b/benchmark/vm_newlambda.yml
new file mode 100644
index 0000000000..0b9787d91a
--- /dev/null
+++ b/benchmark/vm_newlambda.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_newlambda: |
+ lambda {}
+loop_count: 6000000
diff --git a/benchmark/vm_not.yml b/benchmark/vm_not.yml
new file mode 100644
index 0000000000..c68dde3c50
--- /dev/null
+++ b/benchmark/vm_not.yml
@@ -0,0 +1,6 @@
+prelude: |
+ obj = Object.new
+benchmark:
+ vm_not: |
+ !obj
+loop_count: 30000000
diff --git a/benchmark/vm_poly_method.yml b/benchmark/vm_poly_method.yml
new file mode 100644
index 0000000000..dd2f4e71de
--- /dev/null
+++ b/benchmark/vm_poly_method.yml
@@ -0,0 +1,24 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_poly_method: |
+ class C1
+ def m
+ 1
+ end
+ end
+ class C2
+ def m
+ 2
+ end
+ end
+
+ o1 = C1.new
+ o2 = C2.new
+
+ i = 0
+ while i<6_000_000
+ o = (i % 2 == 0) ? o1 : o2
+ o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm_poly_method_ov.yml b/benchmark/vm_poly_method_ov.yml
new file mode 100644
index 0000000000..bca1b62729
--- /dev/null
+++ b/benchmark/vm_poly_method_ov.yml
@@ -0,0 +1,24 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_poly_method_ov: |
+ class C1
+ def m
+ 1
+ end
+ end
+ class C2
+ def m
+ 2
+ end
+ end
+
+ o1 = C1.new
+ o2 = C2.new
+
+ i = 0
+ while i<6_000_000
+ o = (i % 2 == 0) ? o1 : o2
+ # o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm_poly_same_method.yml b/benchmark/vm_poly_same_method.yml
new file mode 100644
index 0000000000..6c5404ac84
--- /dev/null
+++ b/benchmark/vm_poly_same_method.yml
@@ -0,0 +1,25 @@
+prelude: |
+ module AR; end
+ class AR::Base
+ def create_or_update
+ nil
+ end
+ def save
+ create_or_update
+ end
+ end
+ class Foo < AR::Base; end
+ class Bar < AR::Base; end
+ o1 = Foo.new
+ o2 = Bar.new
+benchmark:
+ vm_poly_same_method: |
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+ o1.save; o2.save;
+loop_count: 6000000
diff --git a/benchmark/vm_poly_singleton.yml b/benchmark/vm_poly_singleton.yml
new file mode 100644
index 0000000000..c7923160fb
--- /dev/null
+++ b/benchmark/vm_poly_singleton.yml
@@ -0,0 +1,18 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_poly_singleton: |
+ class C1
+ def m; 1; end
+ end
+
+ o1 = C1.new
+ o2 = C1.new
+ o2.singleton_class
+
+ i = 0
+ while i<6_000_000 # benchmark loop 2
+ o = (i % 2 == 0) ? o1 : o2
+ o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m
+ i += 1
+ end
+loop_count: 1
diff --git a/benchmark/vm_proc.yml b/benchmark/vm_proc.yml
new file mode 100644
index 0000000000..2f8de6c272
--- /dev/null
+++ b/benchmark/vm_proc.yml
@@ -0,0 +1,12 @@
+prelude: |
+ def m &b
+ b
+ end
+
+ pr = m{
+ a = 1
+ }
+benchmark:
+ vm_proc: |
+ pr.call
+loop_count: 6000000
diff --git a/benchmark/vm_raise1.yml b/benchmark/vm_raise1.yml
new file mode 100644
index 0000000000..247d9f70ee
--- /dev/null
+++ b/benchmark/vm_raise1.yml
@@ -0,0 +1,16 @@
+prelude: |
+ def rec n
+ if n > 0
+ rec n-1
+ else
+ raise
+ end
+ end
+benchmark:
+ vm_raise1: |
+ begin
+ rec 1
+ rescue
+ # ignore
+ end
+loop_count: 6000000
diff --git a/benchmark/vm_raise2.yml b/benchmark/vm_raise2.yml
new file mode 100644
index 0000000000..f0fa047b3c
--- /dev/null
+++ b/benchmark/vm_raise2.yml
@@ -0,0 +1,16 @@
+prelude: |
+ def rec n
+ if n > 0
+ rec n-1
+ else
+ raise
+ end
+ end
+benchmark:
+ vm_raise2: |
+ begin
+ rec 10
+ rescue
+ # ignore
+ end
+loop_count: 6000000
diff --git a/benchmark/vm_regexp.yml b/benchmark/vm_regexp.yml
new file mode 100644
index 0000000000..2aa3d94dbd
--- /dev/null
+++ b/benchmark/vm_regexp.yml
@@ -0,0 +1,8 @@
+prelude: |
+ str = 'xxxhogexxx'
+benchmark:
+ vm_regexp: |
+ /hoge/ =~ str
+ vm_regexp_invert: |
+ str =~ /hoge/
+loop_count: 6000000
diff --git a/benchmark/vm_rescue.yml b/benchmark/vm_rescue.yml
new file mode 100644
index 0000000000..b4a0af521f
--- /dev/null
+++ b/benchmark/vm_rescue.yml
@@ -0,0 +1,6 @@
+benchmark:
+ vm_rescue: |
+ begin
+ rescue
+ end
+loop_count: 30000000
diff --git a/benchmark/vm_send.yml b/benchmark/vm_send.yml
new file mode 100644
index 0000000000..f31bc7ac89
--- /dev/null
+++ b/benchmark/vm_send.yml
@@ -0,0 +1,14 @@
+prelude: |
+ class C
+ def m
+ end
+ end
+
+ o = C.new
+ m = :m
+benchmark:
+ vm_send: |
+ o.__send__ :m
+ vm_send_var: |
+ o.__send__ m
+loop_count: 6000000
diff --git a/benchmark/vm_send_cfunc.yml b/benchmark/vm_send_cfunc.yml
new file mode 100644
index 0000000000..b114ac317d
--- /dev/null
+++ b/benchmark/vm_send_cfunc.yml
@@ -0,0 +1,3 @@
+benchmark:
+ vm_send_cfunc: self.class
+loop_count: 100000000
diff --git a/benchmark/vm_simplereturn.yml b/benchmark/vm_simplereturn.yml
new file mode 100644
index 0000000000..c9829cff0b
--- /dev/null
+++ b/benchmark/vm_simplereturn.yml
@@ -0,0 +1,7 @@
+prelude: |
+ def m
+ return 1
+ end
+benchmark:
+ vm_simplereturn: m
+loop_count: 30000000
diff --git a/benchmark/vm_string_literal.yml b/benchmark/vm_string_literal.yml
new file mode 100644
index 0000000000..64439c7980
--- /dev/null
+++ b/benchmark/vm_string_literal.yml
@@ -0,0 +1,4 @@
+benchmark:
+ vm_string_literal: |
+ x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+loop_count: 6000000
diff --git a/benchmark/vm_struct_big_aref_hi.yml b/benchmark/vm_struct_big_aref_hi.yml
new file mode 100644
index 0000000000..4cf78970cb
--- /dev/null
+++ b/benchmark/vm_struct_big_aref_hi.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+benchmark:
+ vm_struct_big_aref_hi: |
+ x.z # x[25]
+loop_count: 6000000
diff --git a/benchmark/vm_struct_big_aref_lo.yml b/benchmark/vm_struct_big_aref_lo.yml
new file mode 100644
index 0000000000..c91af27fa5
--- /dev/null
+++ b/benchmark/vm_struct_big_aref_lo.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+benchmark:
+ vm_struct_big_aref_lo: |
+ x.k # x[10]
+loop_count: 6000000
diff --git a/benchmark/vm_struct_big_aset.yml b/benchmark/vm_struct_big_aset.yml
new file mode 100644
index 0000000000..69550d14ea
--- /dev/null
+++ b/benchmark/vm_struct_big_aset.yml
@@ -0,0 +1,11 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_struct_big_aset: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+ i = 0
+ while i<6_000_000
+ i += 1
+ x.k = i # x[10] = i
+ end
+loop_count: 1
diff --git a/benchmark/vm_struct_big_href_hi.yml b/benchmark/vm_struct_big_href_hi.yml
new file mode 100644
index 0000000000..09b764dd13
--- /dev/null
+++ b/benchmark/vm_struct_big_href_hi.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+benchmark:
+ vm_struct_big_href_hi: |
+ x[:z]
+loop_count: 6000000
diff --git a/benchmark/vm_struct_big_href_lo.yml b/benchmark/vm_struct_big_href_lo.yml
new file mode 100644
index 0000000000..d2f00b220f
--- /dev/null
+++ b/benchmark/vm_struct_big_href_lo.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+benchmark:
+ vm_struct_big_href_lo: |
+ x[:k]
+loop_count: 6000000
diff --git a/benchmark/vm_struct_big_hset.yml b/benchmark/vm_struct_big_hset.yml
new file mode 100644
index 0000000000..fc45cbee9c
--- /dev/null
+++ b/benchmark/vm_struct_big_hset.yml
@@ -0,0 +1,11 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_struct_big_hset: |
+ s = Struct.new(*('a'..'z').map { |x| x.to_sym })
+ x = s.new
+ i = 0
+ while i<6_000_000
+ i += 1
+ x[:k] = i
+ end
+loop_count: 1
diff --git a/benchmark/vm_struct_small_aref.yml b/benchmark/vm_struct_small_aref.yml
new file mode 100644
index 0000000000..5a83251d1e
--- /dev/null
+++ b/benchmark/vm_struct_small_aref.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(:a, :b, :c)
+ x = s.new
+benchmark:
+ vm_struct_small_aref: |
+ x.a
+loop_count: 6000000
diff --git a/benchmark/vm_struct_small_aset.yml b/benchmark/vm_struct_small_aset.yml
new file mode 100644
index 0000000000..74f435f126
--- /dev/null
+++ b/benchmark/vm_struct_small_aset.yml
@@ -0,0 +1,11 @@
+# loop_count is not utilized since `i` is involved in the script
+benchmark:
+ vm_struct_small_aset: |
+ s = Struct.new(:a, :b, :c)
+ x = s.new
+ i = 0
+ while i<6_000_000
+ i += 1
+ x.a = i
+ end
+loop_count: 1
diff --git a/benchmark/vm_struct_small_href.yml b/benchmark/vm_struct_small_href.yml
new file mode 100644
index 0000000000..6b7d7f39e7
--- /dev/null
+++ b/benchmark/vm_struct_small_href.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(:a, :b, :c)
+ x = s.new
+benchmark:
+ vm_struct_small_href: |
+ x[:a]
+loop_count: 6000000
diff --git a/benchmark/vm_struct_small_hset.yml b/benchmark/vm_struct_small_hset.yml
new file mode 100644
index 0000000000..5d43b150de
--- /dev/null
+++ b/benchmark/vm_struct_small_hset.yml
@@ -0,0 +1,7 @@
+prelude: |
+ s = Struct.new(:a, :b, :c)
+ x = s.new
+benchmark:
+ vm_struct_small_hset: |
+ x[:a] = 1
+loop_count: 6000000
diff --git a/benchmark/vm_super.yml b/benchmark/vm_super.yml
new file mode 100644
index 0000000000..0d1e965c6e
--- /dev/null
+++ b/benchmark/vm_super.yml
@@ -0,0 +1,17 @@
+prelude: |
+ class C
+ def m
+ 1
+ end
+ end
+
+ class CC < C
+ def m
+ super()
+ end
+ end
+
+ obj = CC.new
+benchmark:
+ vm_super: obj.m
+loop_count: 6000000
diff --git a/benchmark/vm_swap.yml b/benchmark/vm_swap.yml
new file mode 100644
index 0000000000..e824a65e0a
--- /dev/null
+++ b/benchmark/vm_swap.yml
@@ -0,0 +1,7 @@
+prelude: |
+ a = 1
+ b = 2
+benchmark:
+ vm_swap: |
+ a, b = b, a
+loop_count: 30000000
diff --git a/benchmark/vm_thread_condvar1.rb b/benchmark/vm_thread_condvar1.rb
index cf5706b23e..feed27c3ad 100644
--- a/benchmark/vm_thread_condvar1.rb
+++ b/benchmark/vm_thread_condvar1.rb
@@ -1,9 +1,9 @@
# two threads, two mutex, two condvar ping-pong
require 'thread'
-m1 = Mutex.new
-m2 = Mutex.new
-cv1 = ConditionVariable.new
-cv2 = ConditionVariable.new
+m1 = Thread::Mutex.new
+m2 = Thread::Mutex.new
+cv1 = Thread::ConditionVariable.new
+cv2 = Thread::ConditionVariable.new
max = 100000
i = 0
wait = nil
diff --git a/benchmark/vm_thread_condvar2.rb b/benchmark/vm_thread_condvar2.rb
index 7c8dc19481..6590c4134b 100644
--- a/benchmark/vm_thread_condvar2.rb
+++ b/benchmark/vm_thread_condvar2.rb
@@ -1,16 +1,16 @@
# many threads, one mutex, many condvars
require 'thread'
-m = Mutex.new
-cv1 = ConditionVariable.new
-cv2 = ConditionVariable.new
+m = Thread::Mutex.new
+cv1 = Thread::ConditionVariable.new
+cv2 = Thread::ConditionVariable.new
max = 1000
n = 100
waiting = 0
scvs = []
waiters = n.times.map do |i|
- start_cv = ConditionVariable.new
+ start_cv = Thread::ConditionVariable.new
scvs << start_cv
- start_mtx = Mutex.new
+ start_mtx = Thread::Mutex.new
start_mtx.synchronize do
th = Thread.new(start_mtx, start_cv) do |sm, scv|
m.synchronize do
diff --git a/benchmark/vm_unif1.yml b/benchmark/vm_unif1.yml
new file mode 100644
index 0000000000..04187bb0e2
--- /dev/null
+++ b/benchmark/vm_unif1.yml
@@ -0,0 +1,7 @@
+prelude: |
+ def m a, b
+ end
+benchmark:
+ vm_unif1: |
+ m 100, 200
+loop_count: 6000000
diff --git a/benchmark/vm_yield.yml b/benchmark/vm_yield.yml
new file mode 100644
index 0000000000..230be3d84f
--- /dev/null
+++ b/benchmark/vm_yield.yml
@@ -0,0 +1,13 @@
+# while loop cost is not removed due to benchmark_driver.gem's limitation
+benchmark:
+ vm_yield: |
+ def m
+ i = 0
+ while i<30_000_000
+ i += 1
+ yield
+ end
+ end
+
+ m{}
+loop_count: 1
diff --git a/benchmark/vm_zsuper.yml b/benchmark/vm_zsuper.yml
new file mode 100644
index 0000000000..bfb5837578
--- /dev/null
+++ b/benchmark/vm_zsuper.yml
@@ -0,0 +1,18 @@
+prelude: |
+ class C
+ def m a
+ 1
+ end
+ end
+
+ class CC < C
+ def m a
+ super
+ end
+ end
+
+ obj = CC.new
+benchmark:
+ vm_zsuper: |
+ obj.m 10
+loop_count: 6000000
diff --git a/bignum.c b/bignum.c
index 4569183e45..cb2c3b6f07 100644
--- a/bignum.c
+++ b/bignum.c
@@ -9,32 +9,45 @@
**********************************************************************/
-#include "internal.h"
-#include "ruby/thread.h"
-#include "ruby/util.h"
-#include "id.h"
+#include "ruby/internal/config.h"
+
+#include <ctype.h>
+#include <float.h>
+#include <math.h>
#ifdef HAVE_STRINGS_H
-#include <strings.h>
+# include <strings.h>
#endif
-#include <math.h>
-#include <float.h>
-#include <ctype.h>
+
#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
+# include <ieeefp.h>
#endif
-#include "ruby_assert.h"
+#if !defined(USE_GMP)
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-#define USE_GMP
-#include <gmp.h>
+# define USE_GMP 1
+#else
+# define USE_GMP 0
+#endif
+#endif
+#if USE_GMP
+# include <gmp.h>
#endif
-#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
+#include "id.h"
+#include "internal.h"
+#include "internal/bignum.h"
+#include "internal/complex.h"
+#include "internal/gc.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/sanitizers.h"
+#include "internal/variable.h"
+#include "internal/warnings.h"
+#include "ruby/thread.h"
+#include "ruby/util.h"
+#include "ruby_assert.h"
-#ifndef RUBY_INTEGER_UNIFICATION
-VALUE rb_cBignum;
-#endif
const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
#ifndef SIZEOF_BDIGIT_DBL
@@ -65,7 +78,7 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGIT % SIZEOF_LONG == 0);
#else
# define HOST_BIGENDIAN_P 0
#endif
-/* (!LSHIFTABLE(d, n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */
+/* (!LSHIFTABLE(d, n) ? 0 : (n)) is the same as n but suppress a warning, C4293, by Visual Studio. */
#define LSHIFTABLE(d, n) ((n) < sizeof(d) * CHAR_BIT)
#define LSHIFTX(d, n) (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n))))
#define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits)))
@@ -92,8 +105,8 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGIT % SIZEOF_LONG == 0);
#endif
#define BIGZEROP(x) (BIGNUM_LEN(x) == 0 || \
- (BDIGITS(x)[0] == 0 && \
- (BIGNUM_LEN(x) == 1 || bigzero_p(x))))
+ (BDIGITS(x)[0] == 0 && \
+ (BIGNUM_LEN(x) == 1 || bigzero_p(x))))
#define BIGSIZE(x) (BIGNUM_LEN(x) == 0 ? (size_t)0 : \
BDIGITS(x)[BIGNUM_LEN(x)-1] ? \
(size_t)(BIGNUM_LEN(x)*SIZEOF_BDIGIT - nlz(BDIGITS(x)[BIGNUM_LEN(x)-1])/CHAR_BIT) : \
@@ -138,7 +151,7 @@ STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGIT % SIZEOF_LONG == 0);
#define GMP_DIV_DIGITS 20
#define GMP_BIG2STR_DIGITS 20
#define GMP_STR2BIG_DIGITS 20
-#ifdef USE_GMP
+#if USE_GMP
# define NAIVE_MUL_DIGITS GMP_MUL_DIGITS
#else
# define NAIVE_MUL_DIGITS KARATSUBA_MUL_DIGITS
@@ -149,15 +162,11 @@ typedef void (mulfunc_t)(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, c
static mulfunc_t bary_mul_toom3_start;
static mulfunc_t bary_mul_karatsuba_start;
static BDIGIT bigdivrem_single(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT y);
-static void bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn);
-static VALUE bigmul0(VALUE x, VALUE y);
-static void bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn);
static VALUE bignew_1(VALUE klass, size_t len, int sign);
static inline VALUE bigtrunc(VALUE x);
static VALUE bigsq(VALUE x);
-static void bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp);
static inline VALUE power_cache_get_power(int base, int power_level, size_t *numdigits_ret);
#if SIZEOF_BDIGIT <= SIZEOF_INT
@@ -410,9 +419,9 @@ bary_small_lshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift)
assert(0 <= shift && shift < BITSPERDIG);
for (i=0; i<n; i++) {
- num = num | (BDIGIT_DBL)*xds++ << shift;
- *zds++ = BIGLO(num);
- num = BIGDN(num);
+ num = num | (BDIGIT_DBL)*xds++ << shift;
+ *zds++ = BIGLO(num);
+ num = BIGDN(num);
}
return BIGLO(num);
}
@@ -428,9 +437,9 @@ bary_small_rshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift, BDIGIT hi
num = BIGUP(higher_bdigit);
for (i = 0; i < n; i++) {
BDIGIT x = xds[n - i - 1];
- num = (num | x) >> shift;
+ num = (num | x) >> shift;
zds[n - i - 1] = BIGLO(num);
- num = BIGUP(x);
+ num = BIGUP(x);
}
}
@@ -440,7 +449,7 @@ bary_zero_p(const BDIGIT *xds, size_t xn)
if (xn == 0)
return 1;
do {
- if (xds[--xn]) return 0;
+ if (xds[--xn]) return 0;
} while (xn);
return 1;
}
@@ -457,7 +466,6 @@ static int
bary_2comp(BDIGIT *ds, size_t n)
{
size_t i;
- i = 0;
for (i = 0; i < n; i++) {
if (ds[i] != 0) {
goto non_zero;
@@ -969,7 +977,7 @@ integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails,
{
/* nlp_bits stands for number of leading padding bits */
size_t num_bits = (wordsize * CHAR_BIT - nails) * numwords;
- size_t num_bdigits = (num_bits + BITSPERDIG - 1) / BITSPERDIG;
+ size_t num_bdigits = roomof(num_bits, BITSPERDIG);
*nlp_bits_ret = (int)(num_bdigits * BITSPERDIG - num_bits);
return num_bdigits;
}
@@ -979,7 +987,7 @@ integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nail
{
/* BITSPERDIG = SIZEOF_BDIGIT * CHAR_BIT */
/* num_bits = (wordsize * CHAR_BIT - nails) * numwords */
- /* num_bdigits = (num_bits + BITSPERDIG - 1) / BITSPERDIG */
+ /* num_bdigits = roomof(num_bits, BITSPERDIG) */
/* num_bits = CHAR_BIT * (wordsize * numwords) - nails * numwords = CHAR_BIT * num_bytes1 - nails * numwords */
size_t num_bytes1 = wordsize * numwords;
@@ -1047,6 +1055,7 @@ integer_unpack_num_bdigits(size_t numwords, size_t wordsize, size_t nails, int *
size_t num_bdigits1 = integer_unpack_num_bdigits_generic(numwords, wordsize, nails, &nlp_bits1);
assert(num_bdigits == num_bdigits1);
assert(*nlp_bits_ret == nlp_bits1);
+ (void)num_bdigits1;
}
#endif
}
@@ -1341,9 +1350,9 @@ bary_subb(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yd
num = borrow ? -1 : 0;
for (i = 0; i < sn; i++) {
- num += (BDIGIT_DBL_SIGNED)xds[i] - yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ num += (BDIGIT_DBL_SIGNED)xds[i] - yds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
if (yn <= xn) {
for (; i < xn; i++) {
@@ -1362,7 +1371,7 @@ bary_subb(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yd
}
if (num == 0) goto num_is_zero;
for (; i < zn; i++) {
- zds[i] = BDIGMAX;
+ zds[i] = BDIGMAX;
}
return 1;
@@ -1370,10 +1379,10 @@ bary_subb(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yd
if (xds == zds && xn == zn)
return 0;
for (; i < xn; i++) {
- zds[i] = xds[i];
+ zds[i] = xds[i];
}
for (; i < zn; i++) {
- zds[i] = 0;
+ zds[i] = 0;
}
return 0;
}
@@ -1400,27 +1409,27 @@ bary_addc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yd
assert(yn <= zn);
if (xn > yn) {
- const BDIGIT *tds;
- tds = xds; xds = yds; yds = tds;
- i = xn; xn = yn; yn = i;
+ const BDIGIT *tds;
+ tds = xds; xds = yds; yds = tds;
+ i = xn; xn = yn; yn = i;
}
num = carry ? 1 : 0;
for (i = 0; i < xn; i++) {
- num += (BDIGIT_DBL)xds[i] + yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ num += (BDIGIT_DBL)xds[i] + yds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
for (; i < yn; i++) {
if (num == 0) goto num_is_zero;
- num += yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ num += yds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
for (; i < zn; i++) {
if (num == 0) goto num_is_zero;
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
return num != 0;
@@ -1428,10 +1437,10 @@ bary_addc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yd
if (yds == zds && yn == zn)
return 0;
for (; i < yn; i++) {
- zds[i] = yds[i];
+ zds[i] = yds[i];
}
for (; i < zn; i++) {
- zds[i] = 0;
+ zds[i] = 0;
}
return 0;
}
@@ -1570,7 +1579,7 @@ rb_big_mul_normal(VALUE x, VALUE y)
/* efficient squaring (2 times faster than normal multiplication)
* ref: Handbook of Applied Cryptography, Algorithm 14.16
- * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
+ * https://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
*/
static void
bary_sq_fast(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn)
@@ -1588,30 +1597,30 @@ bary_sq_fast(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn)
return;
for (i = 0; i < xn-1; i++) {
- v = (BDIGIT_DBL)xds[i];
- if (!v)
+ v = (BDIGIT_DBL)xds[i];
+ if (!v)
continue;
- c = (BDIGIT_DBL)zds[i + i] + v * v;
- zds[i + i] = BIGLO(c);
- c = BIGDN(c);
- v *= 2;
+ c = (BDIGIT_DBL)zds[i + i] + v * v;
+ zds[i + i] = BIGLO(c);
+ c = BIGDN(c);
+ v *= 2;
vl = BIGLO(v);
vh = (int)BIGDN(v);
- for (j = i + 1; j < xn; j++) {
- w = (BDIGIT_DBL)xds[j];
- c += (BDIGIT_DBL)zds[i + j] + vl * w;
- zds[i + j] = BIGLO(c);
- c = BIGDN(c);
- if (vh)
+ for (j = i + 1; j < xn; j++) {
+ w = (BDIGIT_DBL)xds[j];
+ c += (BDIGIT_DBL)zds[i + j] + vl * w;
+ zds[i + j] = BIGLO(c);
+ c = BIGDN(c);
+ if (vh)
c += w;
- }
- if (c) {
- c += (BDIGIT_DBL)zds[i + xn];
- zds[i + xn] = BIGLO(c);
- c = BIGDN(c);
+ }
+ if (c) {
+ c += (BDIGIT_DBL)zds[i + xn];
+ zds[i + xn] = BIGLO(c);
+ c = BIGDN(c);
if (c)
zds[i + xn + 1] += (BDIGIT)c;
- }
+ }
}
/* i == xn-1 */
@@ -1636,13 +1645,21 @@ rb_big_sq_fast(VALUE x)
return z;
}
+static inline size_t
+max_size(size_t a, size_t b)
+{
+ return (a > b ? a : b);
+}
+
/* balancing multiplication by slicing larger argument */
static void
-bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn, mulfunc_t *mulfunc)
+bary_mul_balance_with_mulfunc(BDIGIT *const zds, const size_t zn,
+ const BDIGIT *const xds, const size_t xn,
+ const BDIGIT *const yds, const size_t yn,
+ BDIGIT *wds, size_t wn, mulfunc_t *const mulfunc)
{
VALUE work = 0;
- size_t yn0 = yn;
- size_t r, n;
+ size_t n;
assert(xn + yn <= zn);
assert(xn <= yn);
@@ -1650,14 +1667,26 @@ bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t
BDIGITS_ZERO(zds, xn);
+ if (wn < xn) {
+ /* The condition when a new buffer is needed:
+ * 1. (2(xn+r) > zn-(yn-r)) => (2xn+r > zn-yn), at the last
+ * iteration (or r == 0)
+ * 2. (2(xn+xn) > zn-(yn-r-xn)) => (3xn-r > zn-yn), at the
+ * previous iteration.
+ */
+ const size_t r = yn % xn;
+ if (2*xn + yn + max_size(xn-r, r) > zn) {
+ wn = xn;
+ wds = ALLOCV_N(BDIGIT, work, wn);
+ }
+ }
+
n = 0;
- while (yn > 0) {
- BDIGIT *tds;
- size_t tn;
- r = xn > yn ? yn : xn;
- tn = xn + r;
+ while (yn > n) {
+ const size_t r = (xn > (yn - n) ? (yn - n) : xn);
+ const size_t tn = (xn + r);
if (2 * (xn + r) <= zn - n) {
- tds = zds + n + xn + r;
+ BDIGIT *const tds = zds + n + xn + r;
mulfunc(tds, tn, xds, xn, yds + n, r, wds, wn);
BDIGITS_ZERO(zds + n + xn, r);
bary_add(zds + n, tn,
@@ -1665,21 +1694,25 @@ bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t
tds, tn);
}
else {
+ BDIGIT *const tds = zds + n;
if (wn < xn) {
+ /* xn is invariant, only once here */
+#if 0
wn = xn;
wds = ALLOCV_N(BDIGIT, work, wn);
+#else
+ rb_bug("wds is not enough: %" PRIdSIZE " for %" PRIdSIZE, wn, xn);
+#endif
}
- tds = zds + n;
MEMCPY(wds, zds + n, BDIGIT, xn);
mulfunc(tds, tn, xds, xn, yds + n, r, wds+xn, wn-xn);
bary_add(zds + n, tn,
zds + n, tn,
wds, xn);
}
- yn -= r;
- n += r;
+ n += r;
}
- BDIGITS_ZERO(zds+xn+yn0, zn - (xn+yn0));
+ BDIGITS_ZERO(zds+xn+yn, zn - (xn+yn));
if (work)
ALLOCV_END(work);
@@ -1996,7 +2029,7 @@ bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGI
}
/*
- * ref. http://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
+ * ref. https://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
*
* x(b) = x0 * b^0 + x1 * b^1 + x2 * b^2
* y(b) = y0 * b^0 + y1 * b^1 + y2 * b^2
@@ -2069,21 +2102,21 @@ bary_mul_toom3(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGI
v3n = u3n; v3ds = u3ds; v3p = u3p;
}
else {
- /* v1 <- y0 + y2 */
+ /* v1 <- y0 + y2 */
bary_add(v1ds, v1n, y0ds, y0n, y2ds, y2n);
v1p = 1;
- /* y(-1) : v2 <- v1 - y1 = y0 - y1 + y2 */
+ /* y(-1) : v2 <- v1 - y1 = y0 - y1 + y2 */
v2p = 1;
if (bary_sub(v2ds, v2n, v1ds, v1n, y1ds, y1n)) {
bary_2comp(v2ds, v2n);
v2p = 0;
}
- /* y(1) : v1 <- v1 + y1 = y0 + y1 + y2 */
+ /* y(1) : v1 <- v1 + y1 = y0 + y1 + y2 */
bary_add(v1ds, v1n, v1ds, v1n, y1ds, y1n);
- /* y(-2) : v3 <- 2 * (v2 + y2) - y0 = y0 - 2 * (y1 - 2 * y2) */
+ /* y(-2) : v3 <- 2 * (v2 + y2) - y0 = y0 - 2 * (y1 - 2 * y2) */
v3p = 1;
if (v2p) {
bary_add(v3ds, v3n, v2ds, v2n, y2ds, y2n);
@@ -2276,11 +2309,24 @@ rb_big_mul_toom3(VALUE x, VALUE y)
return z;
}
-#ifdef USE_GMP
+#if USE_GMP
+static inline void
+bdigits_to_mpz(mpz_t mp, const BDIGIT *digits, size_t len)
+{
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
+ mpz_import(mp, len, -1, sizeof(BDIGIT), 0, nails, digits);
+}
+
+static inline void
+bdigits_from_mpz(mpz_t mp, BDIGIT *digits, size_t *len)
+{
+ const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
+ mpz_export(digits, len, -1, sizeof(BDIGIT), 0, nails, mp);
+}
+
static void
bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t x, y, z;
size_t count;
@@ -2289,15 +2335,15 @@ bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT
mpz_init(x);
mpz_init(y);
mpz_init(z);
- mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
+ bdigits_to_mpz(x, xds, xn);
if (xds == yds && xn == yn) {
mpz_mul(z, x, x);
}
else {
- mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds);
+ bdigits_to_mpz(y, yds, yn);
mpz_mul(z, x, y);
}
- mpz_export(zds, &count, -1, sizeof(BDIGIT), 0, nails, z);
+ bdigits_from_mpz(z, zds, &count);
BDIGITS_ZERO(zds+count, zn-count);
mpz_clear(x);
mpz_clear(y);
@@ -2336,9 +2382,9 @@ bary_sparse_p(const BDIGIT *ds, size_t n)
{
long c = 0;
- if ( ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
- if (c <= 1 && ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
- if (c <= 1 && ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
+ if ( ds[2 * n / 5]) c++;
+ if (c <= 1 && ds[ n / 2]) c++;
+ if (c <= 1 && ds[3 * n / 5]) c++;
return (c <= 1) ? 1 : 0;
}
@@ -2401,8 +2447,8 @@ bary_mul_precheck(BDIGIT **zdsp, size_t *znp, const BDIGIT **xdsp, size_t *xnp,
if (xn > yn) {
const BDIGIT *tds;
size_t tn;
- tds = xds; xds = yds; yds = tds;
- tn = xn; xn = yn; yn = tn;
+ tds = xds; xds = yds; yds = tds;
+ tn = xn; xn = yn; yn = tn;
}
assert(xn <= yn);
@@ -2446,12 +2492,7 @@ bary_mul_karatsuba_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn,
{
/* normal multiplication when x is small */
if (xn < KARATSUBA_MUL_DIGITS) {
- normal:
- if (xds == yds && xn == yn)
- bary_sq_fast(zds, zn, xds, xn);
- else
- bary_short_mul(zds, zn, xds, xn, yds, yn);
- return;
+ goto normal;
}
/* normal multiplication when x or y is a sparse bignum */
@@ -2469,6 +2510,15 @@ bary_mul_karatsuba_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn,
/* multiplication by karatsuba method */
bary_mul_karatsuba(zds, zn, xds, xn, yds, yn, wds, wn);
+ return;
+
+ normal:
+ if (xds == yds && xn == yn) {
+ bary_sq_fast(zds, zn, xds, xn);
+ }
+ else {
+ bary_short_mul(zds, zn, xds, xn, yds, yn);
+ }
}
static void
@@ -2524,7 +2574,7 @@ bary_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds
}
}
-#ifdef USE_GMP
+#if USE_GMP
bary_mul_gmp(zds, zn, xds, xn, yds, yn);
#else
bary_mul_toom3_start(zds, zn, xds, xn, yds, yn, NULL, 0);
@@ -2548,26 +2598,26 @@ bigdivrem1(void *ptr)
BDIGIT q;
do {
- if (bds->stop) {
- bds->zn = zn;
- return 0;
+ if (bds->stop) {
+ bds->zn = zn;
+ return 0;
}
- if (zds[zn-1] == yds[yn-1]) q = BDIGMAX;
- else q = (BDIGIT)((BIGUP(zds[zn-1]) + zds[zn-2])/yds[yn-1]);
- if (q) {
+ if (zds[zn-1] == yds[yn-1]) q = BDIGMAX;
+ else q = (BDIGIT)((BIGUP(zds[zn-1]) + zds[zn-2])/yds[yn-1]);
+ if (q) {
num = bigdivrem_mulsub(zds+zn-(yn+1), yn+1,
q,
yds, yn);
- while (num) { /* "add back" required */
- q--;
+ while (num) { /* "add back" required */
+ q--;
num = bary_add(zds+zn-(yn+1), yn,
zds+zn-(yn+1), yn,
yds, yn);
num--;
- }
- }
+ }
+ }
zn--;
- zds[zn] = q;
+ zds[zn] = q;
} while (zn > yn);
return 0;
}
@@ -2636,16 +2686,16 @@ bigdivrem_restoring(BDIGIT *zds, size_t zn, BDIGIT *yds, size_t yn)
bds.zn = zn - ynzero;
if (bds.zn > 10000 || bds.yn > 10000) {
retry:
- bds.stop = Qfalse;
+ bds.stop = Qfalse;
rb_nogvl(bigdivrem1, &bds, rb_big_stop, &bds, RB_NOGVL_UBF_ASYNC_SAFE);
- if (bds.stop == Qtrue) {
- /* execute trap handler, but exception was not raised. */
- goto retry;
- }
+ if (bds.stop == Qtrue) {
+ /* execute trap handler, but exception was not raised. */
+ goto retry;
+ }
}
else {
- bigdivrem1(&bds);
+ bigdivrem1(&bds);
}
}
@@ -2744,11 +2794,10 @@ rb_big_divrem_normal(VALUE x, VALUE y)
return rb_assoc_new(q, r);
}
-#ifdef USE_GMP
+#if USE_GMP
static void
bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t x, y, q, r;
size_t count;
@@ -2762,8 +2811,8 @@ bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xd
if (qds) mpz_init(q);
if (rds) mpz_init(r);
- mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
- mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds);
+ bdigits_to_mpz(x, xds, xn);
+ bdigits_to_mpz(y, yds, yn);
if (!rds) {
mpz_fdiv_q(q, x, y);
@@ -2779,13 +2828,13 @@ bary_divmod_gmp(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xd
mpz_clear(y);
if (qds) {
- mpz_export(qds, &count, -1, sizeof(BDIGIT), 0, nails, q);
+ bdigits_from_mpz(q, qds, &count);
BDIGITS_ZERO(qds+count, qn-count);
mpz_clear(q);
}
if (rds) {
- mpz_export(rds, &count, -1, sizeof(BDIGIT), 0, nails, r);
+ bdigits_from_mpz(r, rds, &count);
BDIGITS_ZERO(rds+count, rn-count);
mpz_clear(r);
}
@@ -2829,7 +2878,7 @@ rb_big_divrem_gmp(VALUE x, VALUE y)
static void
bary_divmod_branch(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
{
-#ifdef USE_GMP
+#if USE_GMP
if (GMP_DIV_DIGITS < xn) {
bary_divmod_gmp(qds, qn, rds, rn, xds, xn, yds, yn);
return;
@@ -2884,29 +2933,8 @@ bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, s
}
-#define BIGNUM_DEBUG 0
-#if BIGNUM_DEBUG
-#define ON_DEBUG(x) do { x; } while (0)
-static void
-dump_bignum(VALUE x)
-{
- long i;
- printf("%c0x0", BIGNUM_SIGN(x) ? '+' : '-');
- for (i = BIGNUM_LEN(x); i--; ) {
- printf("_%0*"PRIxBDIGIT, SIZEOF_BDIGIT*2, BDIGITS(x)[i]);
- }
- printf(", len=%"PRIuSIZE, BIGNUM_LEN(x));
- puts("");
-}
-
-static VALUE
-rb_big_dump(VALUE x)
-{
- dump_bignum(x);
- return x;
-}
-#else
-#define ON_DEBUG(x)
+#ifndef BIGNUM_DEBUG
+# define BIGNUM_DEBUG (0+RUBY_DEBUG)
#endif
static int
@@ -2925,7 +2953,7 @@ int
rb_cmpint(VALUE val, VALUE a, VALUE b)
{
if (NIL_P(val)) {
- rb_cmperr(a, b);
+ rb_cmperr(a, b);
}
if (FIXNUM_P(val)) {
long l = FIX2LONG(val);
@@ -2934,9 +2962,9 @@ rb_cmpint(VALUE val, VALUE a, VALUE b)
return 0;
}
if (RB_BIGNUM_TYPE_P(val)) {
- if (BIGZEROP(val)) return 0;
- if (BIGNUM_SIGN(val)) return 1;
- return -1;
+ if (BIGZEROP(val)) return 0;
+ if (BIGNUM_SIGN(val)) return 1;
+ return -1;
}
if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
@@ -2944,44 +2972,44 @@ rb_cmpint(VALUE val, VALUE a, VALUE b)
}
#define BIGNUM_SET_LEN(b,l) \
- ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? \
+ (BIGNUM_EMBED_P(b) ? \
(void)(RBASIC(b)->flags = \
- (RBASIC(b)->flags & ~BIGNUM_EMBED_LEN_MASK) | \
- ((l) << BIGNUM_EMBED_LEN_SHIFT)) : \
+ (RBASIC(b)->flags & ~BIGNUM_EMBED_LEN_MASK) | \
+ ((l) << BIGNUM_EMBED_LEN_SHIFT)) : \
(void)(RBIGNUM(b)->as.heap.len = (l)))
static void
rb_big_realloc(VALUE big, size_t len)
{
BDIGIT *ds;
- if (RBASIC(big)->flags & BIGNUM_EMBED_FLAG) {
- if (BIGNUM_EMBED_LEN_MAX < len) {
- ds = ALLOC_N(BDIGIT, len);
- MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, BIGNUM_EMBED_LEN_MAX);
- RBIGNUM(big)->as.heap.len = BIGNUM_LEN(big);
- RBIGNUM(big)->as.heap.digits = ds;
- RBASIC(big)->flags &= ~BIGNUM_EMBED_FLAG;
- }
+ if (BIGNUM_EMBED_P(big)) {
+ if (BIGNUM_EMBED_LEN_MAX < len) {
+ ds = ALLOC_N(BDIGIT, len);
+ MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, BIGNUM_EMBED_LEN_MAX);
+ RBIGNUM(big)->as.heap.len = BIGNUM_LEN(big);
+ RBIGNUM(big)->as.heap.digits = ds;
+ FL_UNSET_RAW(big, BIGNUM_EMBED_FLAG);
+ }
}
else {
- if (len <= BIGNUM_EMBED_LEN_MAX) {
- ds = RBIGNUM(big)->as.heap.digits;
- RBASIC(big)->flags |= BIGNUM_EMBED_FLAG;
- BIGNUM_SET_LEN(big, len);
+ if (len <= BIGNUM_EMBED_LEN_MAX) {
+ ds = RBIGNUM(big)->as.heap.digits;
+ FL_SET_RAW(big, BIGNUM_EMBED_FLAG);
+ BIGNUM_SET_LEN(big, len);
(void)VALGRIND_MAKE_MEM_UNDEFINED((void*)RBIGNUM(big)->as.ary, sizeof(RBIGNUM(big)->as.ary));
- if (ds) {
- MEMCPY(RBIGNUM(big)->as.ary, ds, BDIGIT, len);
- xfree(ds);
- }
- }
- else {
- if (BIGNUM_LEN(big) == 0) {
- RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len);
- }
- else {
- REALLOC_N(RBIGNUM(big)->as.heap.digits, BDIGIT, len);
- }
- }
+ if (ds) {
+ MEMCPY(RBIGNUM(big)->as.ary, ds, BDIGIT, len);
+ xfree(ds);
+ }
+ }
+ else {
+ if (BIGNUM_LEN(big) == 0) {
+ RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len);
+ }
+ else {
+ REALLOC_N(RBIGNUM(big)->as.heap.digits, BDIGIT, len);
+ }
+ }
}
}
@@ -2996,18 +3024,19 @@ static VALUE
bignew_1(VALUE klass, size_t len, int sign)
{
NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM | (RGENGC_WB_PROTECTED_BIGNUM ? FL_WB_PROTECTED : 0));
- BIGNUM_SET_SIGN(big, sign);
+ VALUE bigv = (VALUE)big;
+ BIGNUM_SET_SIGN(bigv, sign);
if (len <= BIGNUM_EMBED_LEN_MAX) {
- RBASIC(big)->flags |= BIGNUM_EMBED_FLAG;
- BIGNUM_SET_LEN(big, len);
- (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)RBIGNUM(big)->as.ary, sizeof(RBIGNUM(big)->as.ary));
+ FL_SET_RAW(bigv, BIGNUM_EMBED_FLAG);
+ BIGNUM_SET_LEN(bigv, len);
+ (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)big->as.ary, sizeof(big->as.ary));
}
else {
- RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len);
- RBIGNUM(big)->as.heap.len = len;
+ big->as.heap.digits = ALLOC_N(BDIGIT, len);
+ big->as.heap.len = len;
}
- OBJ_FREEZE(big);
- return (VALUE)big;
+ OBJ_FREEZE(bigv);
+ return bigv;
}
VALUE
@@ -3066,7 +3095,7 @@ abs2twocomp(VALUE *xp, long *n_ret)
MEMCPY(BDIGITS(z), ds, BDIGIT, n);
bary_2comp(BDIGITS(z), n);
hibits = BDIGMAX;
- *xp = z;
+ *xp = z;
}
*n_ret = n;
return hibits;
@@ -3090,7 +3119,7 @@ bigtrunc(VALUE x)
if (len == 0) return x;
while (--len && !ds[len]);
if (BIGNUM_LEN(x) > len+1) {
- rb_big_resize(x, len+1);
+ rb_big_resize(x, len+1);
}
return x;
}
@@ -3143,7 +3172,7 @@ static VALUE
bignorm(VALUE x)
{
if (RB_BIGNUM_TYPE_P(x)) {
- x = bigfixize(x);
+ x = bigfixize(x);
}
return x;
}
@@ -3165,8 +3194,8 @@ rb_uint2big(uintptr_t n)
digits[0] = n;
#else
for (i = 0; i < bdigit_roomof(SIZEOF_VALUE); i++) {
- digits[i] = BIGLO(n);
- n = BIGDN(n);
+ digits[i] = BIGLO(n);
+ n = BIGDN(n);
}
#endif
@@ -3185,14 +3214,14 @@ rb_int2big(intptr_t n)
if (n < 0) {
u = 1 + (VALUE)(-(n + 1)); /* u = -n avoiding overflow */
- neg = 1;
+ neg = 1;
}
else {
u = n;
}
big = rb_uint2big(u);
if (neg) {
- BIGNUM_SET_NEGATIVE_SIGN(big);
+ BIGNUM_SET_NEGATIVE_SIGN(big);
}
return big;
}
@@ -3351,7 +3380,7 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
if (sign == 2) {
#if defined __GNUC__ && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
- *nlz_bits_ret = 0;
+ *nlz_bits_ret = 0;
#endif
return (size_t)-1;
}
@@ -3384,7 +3413,7 @@ rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
size_t numbytes;
int nlz_bits_in_msbyte;
size_t numwords;
- size_t nlz_bits;
+ size_t nlz_bits = 0;
if (word_numbits == 0)
return (size_t)-1;
@@ -3399,6 +3428,7 @@ rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
numwords0 = absint_numwords_generic(numbytes, nlz_bits_in_msbyte, word_numbits, &nlz_bits0);
assert(numwords0 == numwords);
assert(nlz_bits0 == nlz_bits);
+ (void)numwords0;
}
#endif
}
@@ -3586,7 +3616,7 @@ rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t
}
/*
- * Import an integer into a buffer.
+ * Import an integer from a buffer.
*
* [words] buffer to import.
* [numwords] the size of given buffer as number of words.
@@ -3670,7 +3700,7 @@ rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t na
}
else if (num_bdigits == numberof(fixbuf)) {
val = bignew((long)num_bdigits+1, 0);
- MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits);
+ MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits);
BDIGITS(val)[num_bdigits++] = 1;
}
else {
@@ -3682,11 +3712,11 @@ rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t na
BDIGIT_DBL u = fixbuf[0] + BIGUP(fixbuf[1]);
if (u == 0)
return LONG2FIX(0);
- if (0 < sign && POSFIXABLE(u))
- return LONG2FIX(u);
- if (sign < 0 && BDIGIT_MSB(fixbuf[1]) == 0 &&
+ if (0 < sign && POSFIXABLE(u))
+ return LONG2FIX((long)u);
+ if (sign < 0 && BDIGIT_MSB(fixbuf[1]) == 0 &&
NEGFIXABLE(-(BDIGIT_DBL_SIGNED)u))
- return LONG2FIX(-(BDIGIT_DBL_SIGNED)u);
+ return LONG2FIX((long)-(BDIGIT_DBL_SIGNED)u);
val = bignew((long)num_bdigits, 0 <= sign);
MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits);
}
@@ -3736,42 +3766,41 @@ str2big_scan_digits(const char *s, const char *str, int base, int badcheck, size
int c;
if (!len) {
- *num_digits_p = 0;
- *len_p = 0;
- return TRUE;
+ *num_digits_p = 0;
+ *len_p = 0;
+ return TRUE;
}
- if (badcheck && *str == '_') goto bad;
+ if (badcheck && *str == '_') return FALSE;
while ((c = *str++) != 0) {
- if (c == '_') {
- if (nondigit) {
- if (badcheck) goto bad;
- break;
- }
- nondigit = (char) c;
- }
- else if ((c = conv_digit(c)) < 0 || c >= base) {
- break;
- }
- else {
- nondigit = 0;
- num_digits++;
- digits_end = str;
- }
- if (len > 0 && !--len) break;
- }
- if (badcheck && nondigit) goto bad;
+ if (c == '_') {
+ if (nondigit) {
+ if (badcheck) return FALSE;
+ break;
+ }
+ nondigit = (char) c;
+ }
+ else if ((c = conv_digit(c)) < 0 || c >= base) {
+ break;
+ }
+ else {
+ nondigit = 0;
+ num_digits++;
+ digits_end = str;
+ }
+ if (len > 0 && !--len) break;
+ }
+ if (badcheck && nondigit) return FALSE;
if (badcheck && len) {
- str--;
- while (*str && ISSPACE(*str)) {
- str++;
- if (len > 0 && !--len) break;
- }
- if (len && *str) {
- bad:
- return FALSE;
- }
+ str--;
+ while (*str && ISSPACE(*str)) {
+ str++;
+ if (len > 0 && !--len) break;
+ }
+ if (len && *str) {
+ return FALSE;
+ }
}
*num_digits_p = num_digits;
*len_p = digits_end - digits_start;
@@ -3946,7 +3975,7 @@ str2big_karatsuba(
return z;
}
-#ifdef USE_GMP
+#if USE_GMP
static VALUE
str2big_gmp(
int sign,
@@ -3956,7 +3985,6 @@ str2big_gmp(
size_t num_bdigits,
int base)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
char *buf, *p;
const char *q;
VALUE tmps;
@@ -3979,7 +4007,7 @@ str2big_gmp(
zn = num_bdigits;
z = bignew(zn, sign);
zds = BDIGITS(z);
- mpz_export(BDIGITS(z), &count, -1, sizeof(BDIGIT), 0, nails, mz);
+ bdigits_from_mpz(mz, BDIGITS(z), &count);
BDIGITS_ZERO(zds+count, zn-count);
mpz_clear(mz);
@@ -4014,8 +4042,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
char *end;
VALUE ret = rb_cstr_parse_inum(str, -1, (badcheck ? NULL : &end), base);
if (NIL_P(ret)) {
- if (badcheck) rb_invalid_str(str, "Integer()");
- ret = INT2FIX(0);
+ if (badcheck) rb_invalid_str(str, "Integer()");
+ ret = INT2FIX(0);
}
return ret;
}
@@ -4039,7 +4067,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE
rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits,
- int base, int flags)
+ int base, int flags)
{
const char *const s = str;
char sign = 1;
@@ -4056,85 +4084,82 @@ rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits,
const int badcheck = !endp;
#define ADV(n) do {\
- if (len > 0 && len <= (n)) goto bad; \
- str += (n); \
- len -= (n); \
+ if (len > 0 && len <= (n)) goto bad; \
+ str += (n); \
+ len -= (n); \
} while (0)
#define ASSERT_LEN() do {\
- assert(len != 0); \
- if (len0 >= 0) assert(s + len0 == str + len); \
+ assert(len != 0); \
+ if (len0 >= 0) assert(s + len0 == str + len); \
} while (0)
if (!str) {
- bad:
- if (endp) *endp = (char *)str;
- if (ndigits) *ndigits = num_digits;
- return z;
+ goto bad;
}
if (len && (flags & RB_INT_PARSE_SIGN)) {
- while (ISSPACE(*str)) ADV(1);
+ while (ISSPACE(*str)) ADV(1);
- if (str[0] == '+') {
- ADV(1);
- }
- else if (str[0] == '-') {
- ADV(1);
- sign = 0;
- }
- ASSERT_LEN();
+ if (str[0] == '+') {
+ ADV(1);
+ }
+ else if (str[0] == '-') {
+ ADV(1);
+ sign = 0;
+ }
+ ASSERT_LEN();
}
if (base <= 0) {
- if (str[0] == '0' && len > 1) {
- switch (str[1]) {
- case 'x': case 'X':
- base = 16;
- ADV(2);
- break;
- case 'b': case 'B':
- base = 2;
- ADV(2);
- break;
- case 'o': case 'O':
- base = 8;
- ADV(2);
- break;
- case 'd': case 'D':
- base = 10;
- ADV(2);
- break;
- default:
- base = 8;
- }
- }
- else if (base < -1) {
- base = -base;
- }
- else {
- base = 10;
- }
+ if (str[0] == '0' && len > 1) {
+ switch (str[1]) {
+ case 'x': case 'X':
+ base = 16;
+ ADV(2);
+ break;
+ case 'b': case 'B':
+ base = 2;
+ ADV(2);
+ break;
+ case 'o': case 'O':
+ base = 8;
+ ADV(2);
+ break;
+ case 'd': case 'D':
+ base = 10;
+ ADV(2);
+ break;
+ default:
+ base = 8;
+ }
+ }
+ else if (base < -1) {
+ base = -base;
+ }
+ else {
+ base = 10;
+ }
}
else if (len == 1 || !(flags & RB_INT_PARSE_PREFIX)) {
- /* no prefix */
+ /* no prefix */
}
else if (base == 2) {
- if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) {
- ADV(2);
- }
+ if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) {
+ ADV(2);
+ }
}
else if (base == 8) {
- if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
- ADV(2);
- }
+ if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
+ ADV(2);
+ }
}
else if (base == 10) {
- if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) {
- ADV(2);
- }
+ if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) {
+ ADV(2);
+ }
}
else if (base == 16) {
- if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) {
- ADV(2);
- }
+ if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) {
+ ADV(2);
+ }
}
if (!valid_radix_p(base)) {
invalid_radix(base);
@@ -4142,80 +4167,79 @@ rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits,
if (!len) goto bad;
num_digits = str - s;
if (*str == '0' && len != 1) { /* squeeze preceding 0s */
- int us = 0;
- const char *end = len < 0 ? NULL : str + len;
- ++num_digits;
- while ((c = *++str) == '0' ||
- ((flags & RB_INT_PARSE_UNDERSCORE) && c == '_')) {
- if (c == '_') {
- if (++us >= 2)
- break;
- }
- else {
- ++num_digits;
- us = 0;
- }
- if (str == end) break;
- }
- if (!c || ISSPACE(c)) --str;
- if (end) len = end - str;
- ASSERT_LEN();
+ int us = 0;
+ const char *end = len < 0 ? NULL : str + len;
+ ++num_digits;
+ while ((c = *++str) == '0' ||
+ ((flags & RB_INT_PARSE_UNDERSCORE) && c == '_')) {
+ if (c == '_') {
+ if (++us >= 2)
+ break;
+ }
+ else {
+ ++num_digits;
+ us = 0;
+ }
+ if (str == end) break;
+ }
+ if (!c || ISSPACE(c)) --str;
+ if (end) len = end - str;
}
c = *str;
c = conv_digit(c);
if (c < 0 || c >= base) {
- if (!badcheck && num_digits) z = INT2FIX(0);
- goto bad;
+ if (!badcheck && num_digits) z = INT2FIX(0);
+ goto bad;
}
if (ndigits) *ndigits = num_digits;
val = ruby_scan_digits(str, len, base, &num_digits, &ov);
if (!ov) {
- const char *end = &str[num_digits];
- if (num_digits > 0 && *end == '_' && (flags & RB_INT_PARSE_UNDERSCORE))
- goto bigparse;
- if (endp) *endp = (char *)end;
- if (ndigits) *ndigits += num_digits;
- if (badcheck) {
- if (num_digits == 0) return Qnil; /* no number */
- while (len < 0 ? *end : end < str + len) {
- if (!ISSPACE(*end)) return Qnil; /* trailing garbage */
- end++;
- }
- }
-
- if (POSFIXABLE(val)) {
- if (sign) return LONG2FIX(val);
- else {
- long result = -(long)val;
- return LONG2FIX(result);
- }
- }
- else {
- VALUE big = rb_uint2big(val);
- BIGNUM_SET_SIGN(big, sign);
- return bignorm(big);
- }
+ const char *end = &str[num_digits];
+ if (num_digits > 0 && *end == '_' && (flags & RB_INT_PARSE_UNDERSCORE))
+ goto bigparse;
+ if (endp) *endp = (char *)end;
+ if (ndigits) *ndigits += num_digits;
+ if (badcheck) {
+ if (num_digits == 0) return Qnil; /* no number */
+ while (len < 0 ? *end : end < str + len) {
+ if (!ISSPACE(*end)) return Qnil; /* trailing garbage */
+ end++;
+ }
+ }
+
+ if (POSFIXABLE(val)) {
+ if (sign) return LONG2FIX(val);
+ else {
+ long result = -(long)val;
+ return LONG2FIX(result);
+ }
+ }
+ else {
+ VALUE big = rb_uint2big(val);
+ BIGNUM_SET_SIGN(big, sign);
+ return bignorm(big);
+ }
}
bigparse:
digits_start = str;
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
- goto bad;
+ goto bad;
if (endp) *endp = (char *)(str + len);
if (ndigits) *ndigits += num_digits;
digits_end = digits_start + len;
if (POW2_P(base)) {
z = str2big_poweroftwo(sign, digits_start, digits_end, num_digits,
- bit_length(base-1));
+ bit_length(base-1));
}
else {
int digits_per_bdigits_dbl;
maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
num_bdigits = roomof(num_digits, digits_per_bdigits_dbl)*2;
-#ifdef USE_GMP
+#if USE_GMP
if (GMP_STR2BIG_DIGITS < num_bdigits) {
z = str2big_gmp(sign, digits_start, digits_end, num_digits,
num_bdigits, base);
@@ -4233,13 +4257,18 @@ rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits,
}
return bignorm(z);
+
+ bad:
+ if (endp) *endp = (char *)str;
+ if (ndigits) *ndigits = num_digits;
+ return z;
}
static VALUE
rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base)
{
return rb_int_parse_cstr(str, len, endp, NULL, base,
- RB_INT_PARSE_DEFAULT);
+ RB_INT_PARSE_DEFAULT);
}
VALUE
@@ -4288,14 +4317,14 @@ rb_str2big_poweroftwo(VALUE arg, int base, int badcheck)
s = str = StringValueCStr(arg);
len = RSTRING_LEN(arg);
if (*str == '-') {
- len--;
+ len--;
str++;
positive_p = 0;
}
digits_start = str;
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
- invalid_integer(arg);
+ invalid_integer(arg);
digits_end = digits_start + len;
z = str2big_poweroftwo(positive_p, digits_start, digits_end, num_digits,
@@ -4327,14 +4356,14 @@ rb_str2big_normal(VALUE arg, int base, int badcheck)
s = str = StringValuePtr(arg);
len = RSTRING_LEN(arg);
if (len > 0 && *str == '-') {
- len--;
+ len--;
str++;
positive_p = 0;
}
digits_start = str;
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
- invalid_integer(arg);
+ invalid_integer(arg);
digits_end = digits_start + len;
maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
@@ -4369,14 +4398,14 @@ rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
s = str = StringValuePtr(arg);
len = RSTRING_LEN(arg);
if (len > 0 && *str == '-') {
- len--;
+ len--;
str++;
positive_p = 0;
}
digits_start = str;
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
- invalid_integer(arg);
+ invalid_integer(arg);
digits_end = digits_start + len;
maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
@@ -4390,7 +4419,7 @@ rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
return bignorm(z);
}
-#ifdef USE_GMP
+#if USE_GMP
VALUE
rb_str2big_gmp(VALUE arg, int base, int badcheck)
{
@@ -4412,14 +4441,14 @@ rb_str2big_gmp(VALUE arg, int base, int badcheck)
s = str = StringValuePtr(arg);
len = RSTRING_LEN(arg);
if (len > 0 && *str == '-') {
- len--;
+ len--;
str++;
positive_p = 0;
}
digits_start = str;
if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len))
- invalid_integer(arg);
+ invalid_integer(arg);
digits_end = digits_start + len;
maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
@@ -4446,8 +4475,8 @@ rb_ull2big(unsigned LONG_LONG n)
digits[0] = n;
#else
for (i = 0; i < bdigit_roomof(SIZEOF_LONG_LONG); i++) {
- digits[i] = BIGLO(n);
- n = BIGDN(n);
+ digits[i] = BIGLO(n);
+ n = BIGDN(n);
}
#endif
@@ -4466,14 +4495,14 @@ rb_ll2big(LONG_LONG n)
if (n < 0) {
u = 1 + (unsigned LONG_LONG)(-(n + 1)); /* u = -n avoiding overflow */
- neg = 1;
+ neg = 1;
}
else {
u = n;
}
big = rb_ull2big(u);
if (neg) {
- BIGNUM_SET_NEGATIVE_SIGN(big);
+ BIGNUM_SET_NEGATIVE_SIGN(big);
}
return big;
}
@@ -4481,14 +4510,14 @@ rb_ll2big(LONG_LONG n)
VALUE
rb_ull2inum(unsigned LONG_LONG n)
{
- if (POSFIXABLE(n)) return LONG2FIX(n);
+ if (POSFIXABLE(n)) return LONG2FIX((long)n);
return rb_ull2big(n);
}
VALUE
rb_ll2inum(LONG_LONG n)
{
- if (FIXABLE(n)) return LONG2FIX(n);
+ if (FIXABLE(n)) return LONG2FIX((long)n);
return rb_ll2big(n);
}
@@ -4503,7 +4532,7 @@ rb_uint128t2big(uint128_t n)
BDIGIT *digits = BDIGITS(big);
for (i = 0; i < bdigit_roomof(SIZEOF_INT128_T); i++) {
- digits[i] = BIGLO(RSHIFT(n ,BITSPERDIG*i));
+ digits[i] = BIGLO(RSHIFT(n ,BITSPERDIG*i));
}
i = bdigit_roomof(SIZEOF_INT128_T);
@@ -4521,14 +4550,14 @@ rb_int128t2big(int128_t n)
if (n < 0) {
u = 1 + (uint128_t)(-(n + 1)); /* u = -n avoiding overflow */
- neg = 1;
+ neg = 1;
}
else {
u = n;
}
big = rb_uint128t2big(u);
if (neg) {
- BIGNUM_SET_NEGATIVE_SIGN(big);
+ BIGNUM_SET_NEGATIVE_SIGN(big);
}
return big;
}
@@ -4557,11 +4586,14 @@ big_shift3(VALUE x, int lshift_p, size_t shift_numdigits, int shift_numbits)
if (lshift_p) {
if (LONG_MAX < shift_numdigits) {
- rb_raise(rb_eArgError, "too big number");
+ too_big:
+ rb_raise(rb_eRangeError, "shift width too big");
}
s1 = shift_numdigits;
s2 = shift_numbits;
+ if ((size_t)s1 != shift_numdigits) goto too_big;
xn = BIGNUM_LEN(x);
+ if (LONG_MAX/SIZEOF_BDIGIT <= xn+s1) goto too_big;
z = bignew(xn+s1+1, BIGNUM_SIGN(x));
zds = BDIGITS(z);
BDIGITS_ZERO(zds, s1);
@@ -4652,12 +4684,6 @@ static size_t base36_numdigits_cache[35][MAX_BASE36_POWER_TABLE_ENTRIES];
static void
power_cache_init(void)
{
- int i, j;
- for (i = 0; i < 35; ++i) {
- for (j = 0; j < MAX_BASE36_POWER_TABLE_ENTRIES; ++j) {
- base36_power_cache[i][j] = Qnil;
- }
- }
}
static inline VALUE
@@ -4680,8 +4706,8 @@ power_cache_get_power(int base, int power_level, size_t *numdigits_ret)
if (MAX_BASE36_POWER_TABLE_ENTRIES <= power_level)
rb_bug("too big power number requested: maxpow_in_bdigit_dbl(%d)**(2**%d)", base, power_level);
- if (NIL_P(base36_power_cache[base - 2][power_level])) {
- VALUE power;
+ VALUE power = base36_power_cache[base - 2][power_level];
+ if (!power) {
size_t numdigits;
if (power_level == 0) {
int numdigits0;
@@ -4697,11 +4723,11 @@ power_cache_get_power(int base, int power_level, size_t *numdigits_ret)
rb_obj_hide(power);
base36_power_cache[base - 2][power_level] = power;
base36_numdigits_cache[base - 2][power_level] = numdigits;
- rb_gc_register_mark_object(power);
+ rb_gc_register_mark_object(power);
}
if (numdigits_ret)
*numdigits_ret = base36_numdigits_cache[base - 2][power_level];
- return base36_power_cache[base - 2][power_level];
+ return power;
}
struct big2str_struct {
@@ -4748,7 +4774,7 @@ big2str_2bdigits(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t tail
} while (num);
len = sizeof(buf) - j;
big2str_alloc(b2s, len + taillen);
- MEMCPY(b2s->ptr, buf + j, char, len);
+ MEMCPY(b2s->ptr, buf + j, char, len);
}
else {
p = b2s->ptr;
@@ -4765,7 +4791,7 @@ big2str_2bdigits(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t tail
static void
big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
- int power_level, size_t taillen)
+ int power_level, size_t taillen)
{
VALUE b;
size_t half_numdigits, lower_numdigits;
@@ -4795,17 +4821,17 @@ big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
*/
if (xn == 0 || bary_zero_p(xds, xn)) {
- if (b2s->ptr) {
+ if (b2s->ptr) {
/* When x is zero, power_cache_get_power(base, power_level) should be cached already. */
power_cache_get_power(b2s->base, power_level, &len);
- memset(b2s->ptr, '0', len);
+ memset(b2s->ptr, '0', len);
b2s->ptr += len;
- }
+ }
return;
}
if (power_level == 0) {
- big2str_2bdigits(b2s, xds, xn, taillen);
+ big2str_2bdigits(b2s, xds, xn, taillen);
return;
}
@@ -4833,7 +4859,7 @@ big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
memset(b2s->ptr, '0', len);
b2s->ptr += len;
}
- big2str_2bdigits(b2s, xds, xn, taillen);
+ big2str_2bdigits(b2s, xds, xn, taillen);
}
else {
BDIGIT *qds, *rds;
@@ -4937,11 +4963,11 @@ big2str_generic(VALUE x, int base)
BARY_TRUNC(xds, xn);
if (xn == 0) {
- return rb_usascii_str_new2("0");
+ return rb_usascii_str_new2("0");
}
if (!valid_radix_p(base))
- invalid_radix(base);
+ invalid_radix(base);
if (xn >= LONG_MAX/BITSPERDIG) {
rb_raise(rb_eRangeError, "bignum too big to convert into `string'");
@@ -4978,7 +5004,7 @@ big2str_generic(VALUE x, int base)
b2s_data.ptr = NULL;
if (power_level == 0) {
- big2str_2bdigits(&b2s_data, xds, xn, 0);
+ big2str_2bdigits(&b2s_data, xds, xn, 0);
}
else {
VALUE tmpw = 0;
@@ -4987,7 +5013,7 @@ big2str_generic(VALUE x, int base)
wn = power_level * BIGDIVREM_EXTRA_WORDS + BIGNUM_LEN(power);
wds = ALLOCV_N(BDIGIT, tmpw, xn + wn);
MEMCPY(wds, xds, BDIGIT, xn);
- big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0);
+ big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0);
if (tmpw)
ALLOCV_END(tmpw);
}
@@ -5006,11 +5032,10 @@ rb_big2str_generic(VALUE x, int base)
return big2str_generic(x, base);
}
-#ifdef USE_GMP
+#if USE_GMP
static VALUE
big2str_gmp(VALUE x, int base)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t mx;
size_t size;
VALUE str;
@@ -5018,7 +5043,7 @@ big2str_gmp(VALUE x, int base)
size_t xn = BIGNUM_LEN(x);
mpz_init(mx);
- mpz_import(mx, xn, -1, sizeof(BDIGIT), 0, nails, xds);
+ bdigits_to_mpz(mx, xds, xn);
size = mpz_sizeinbase(mx, base);
@@ -5054,7 +5079,7 @@ rb_big2str1(VALUE x, int base)
size_t xn;
if (FIXNUM_P(x)) {
- return rb_fix2str(x, base);
+ return rb_fix2str(x, base);
}
bigtrunc(x);
@@ -5063,11 +5088,11 @@ rb_big2str1(VALUE x, int base)
BARY_TRUNC(xds, xn);
if (xn == 0) {
- return rb_usascii_str_new2("0");
+ return rb_usascii_str_new2("0");
}
if (!valid_radix_p(base))
- invalid_radix(base);
+ invalid_radix(base);
if (xn >= LONG_MAX/BITSPERDIG) {
rb_raise(rb_eRangeError, "bignum too big to convert into `string'");
@@ -5078,7 +5103,7 @@ rb_big2str1(VALUE x, int base)
return big2str_base_poweroftwo(x, base);
}
-#ifdef USE_GMP
+#if USE_GMP
if (GMP_BIG2STR_DIGITS < xn) {
return big2str_gmp(x, base);
}
@@ -5114,7 +5139,7 @@ big2ulong(VALUE x, const char *type)
#else
num = 0;
for (i = 0; i < len; i++) {
- num <<= BITSPERDIG;
+ num <<= BITSPERDIG;
num += (unsigned long)ds[len - i - 1]; /* overflow is already checked */
}
#endif
@@ -5167,13 +5192,13 @@ big2ull(VALUE x, const char *type)
if (len == 0)
return 0;
if (BIGSIZE(x) > SIZEOF_LONG_LONG)
- rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
+ rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
#if SIZEOF_LONG_LONG <= SIZEOF_BDIGIT
num = (unsigned LONG_LONG)ds[0];
#else
num = 0;
for (i = 0; i < len; i++) {
- num = BIGUP(num);
+ num = BIGUP(num);
num += ds[len - i - 1];
}
#endif
@@ -5223,23 +5248,23 @@ dbl2big(double d)
double u = (d < 0)?-d:d;
if (isinf(d)) {
- rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity");
+ rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity");
}
if (isnan(d)) {
- rb_raise(rb_eFloatDomainError, "NaN");
+ rb_raise(rb_eFloatDomainError, "NaN");
}
while (1.0 <= u) {
- u /= (double)(BIGRAD);
- i++;
+ u /= (double)(BIGRAD);
+ i++;
}
z = bignew(i, d>=0);
digits = BDIGITS(z);
while (i--) {
- u *= BIGRAD;
- c = (BDIGIT)u;
- u -= c;
- digits[i] = c;
+ u *= BIGRAD;
+ c = (BDIGIT)u;
+ u -= c;
+ digits[i] = c;
}
return z;
@@ -5259,28 +5284,28 @@ big2dbl(VALUE x)
BDIGIT *ds = BDIGITS(x), dl;
if (i) {
- bits = i * BITSPERDIG - nlz(ds[i-1]);
- if (bits > DBL_MANT_DIG+DBL_MAX_EXP) {
- d = HUGE_VAL;
- }
- else {
- if (bits > DBL_MANT_DIG+1)
- lo = (bits -= DBL_MANT_DIG+1) / BITSPERDIG;
- else
- bits = 0;
- while (--i > lo) {
- d = ds[i] + BIGRAD*d;
- }
- dl = ds[i];
- if (bits && (dl & ((BDIGIT)1 << (bits %= BITSPERDIG)))) {
- int carry = (dl & ~(BDIGMAX << bits)) != 0;
- if (!carry) {
- while (i-- > 0) {
- carry = ds[i] != 0;
- if (carry) break;
- }
- }
- if (carry) {
+ bits = i * BITSPERDIG - nlz(ds[i-1]);
+ if (bits > DBL_MANT_DIG+DBL_MAX_EXP) {
+ d = HUGE_VAL;
+ }
+ else {
+ if (bits > DBL_MANT_DIG+1)
+ lo = (bits -= DBL_MANT_DIG+1) / BITSPERDIG;
+ else
+ bits = 0;
+ while (--i > lo) {
+ d = ds[i] + BIGRAD*d;
+ }
+ dl = ds[i];
+ if (bits && (dl & ((BDIGIT)1 << (bits %= BITSPERDIG)))) {
+ int carry = (dl & ~(BDIGMAX << bits)) != 0;
+ if (!carry) {
+ while (i-- > 0) {
+ carry = ds[i] != 0;
+ if (carry) break;
+ }
+ }
+ if (carry) {
BDIGIT mask = BDIGMAX;
BDIGIT bit = 1;
mask <<= bits;
@@ -5288,19 +5313,19 @@ big2dbl(VALUE x)
dl &= mask;
dl += bit;
dl = BIGLO(dl);
- if (!dl) d += 1;
- }
- }
- d = dl + BIGRAD*d;
- if (lo) {
- if (lo > INT_MAX / BITSPERDIG)
- d = HUGE_VAL;
- else if (lo < INT_MIN / BITSPERDIG)
- d = 0.0;
- else
- d = ldexp(d, (int)(lo * BITSPERDIG));
- }
- }
+ if (!dl) d += 1;
+ }
+ }
+ d = dl + BIGRAD*d;
+ if (lo) {
+ if (lo > INT_MAX / BITSPERDIG)
+ d = HUGE_VAL;
+ else if (lo < INT_MIN / BITSPERDIG)
+ d = 0.0;
+ else
+ d = ldexp(d, (int)(lo * BITSPERDIG));
+ }
+ }
}
if (BIGNUM_NEGATIVE_P(x)) d = -d;
return d;
@@ -5312,11 +5337,11 @@ rb_big2dbl(VALUE x)
double d = big2dbl(x);
if (isinf(d)) {
- rb_warning("Bignum out of Float range");
- if (d < 0.0)
- d = -HUGE_VAL;
- else
- d = HUGE_VAL;
+ rb_warning("Integer out of Float range");
+ if (d < 0.0)
+ d = -HUGE_VAL;
+ else
+ d = HUGE_VAL;
}
return d;
}
@@ -5373,11 +5398,9 @@ rb_integer_float_cmp(VALUE x, VALUE y)
#if SIZEOF_LONG * CHAR_BIT >= DBL_MANT_DIG /* assume FLT_RADIX == 2 */
COMPILER_WARNING_PUSH
-#ifdef __has_warning
#if __has_warning("-Wimplicit-int-float-conversion")
COMPILER_WARNING_IGNORED(-Wimplicit-int-float-conversion)
#endif
-#endif
static const double LONG_MAX_as_double = LONG_MAX;
COMPILER_WARNING_POP
#endif
@@ -5388,7 +5411,7 @@ rb_integer_float_eq(VALUE x, VALUE y)
double yd = RFLOAT_VALUE(y);
double yi, yf;
- if (isnan(yd) || isinf(yd))
+ if (!isfinite(yd))
return Qfalse;
yf = modf(yd, &yi);
if (yf != 0)
@@ -5396,18 +5419,14 @@ rb_integer_float_eq(VALUE x, VALUE y)
if (FIXNUM_P(x)) {
#if SIZEOF_LONG * CHAR_BIT < DBL_MANT_DIG /* assume FLT_RADIX == 2 */
double xd = (double)FIX2LONG(x);
- if (xd != yd)
- return Qfalse;
- return Qtrue;
+ return RBOOL(xd == yd);
#else
long xn, yn;
if (yi < LONG_MIN || LONG_MAX_as_double <= yi)
return Qfalse;
xn = FIX2LONG(x);
yn = (long)yi;
- if (xn != yn)
- return Qfalse;
- return Qtrue;
+ return RBOOL(xn == yn);
#endif
}
y = rb_dbl2big(yi);
@@ -5419,26 +5438,26 @@ VALUE
rb_big_cmp(VALUE x, VALUE y)
{
if (FIXNUM_P(y)) {
- x = bigfixize(x);
+ x = bigfixize(x);
if (FIXNUM_P(x)) {
- /* SIGNED_VALUE and Fixnum have same sign-bits, same
- * order */
- SIGNED_VALUE sx = (SIGNED_VALUE)x, sy = (SIGNED_VALUE)y;
- if (sx < sy) return INT2FIX(-1);
- return INT2FIX(sx > sy);
+ /* SIGNED_VALUE and Fixnum have same sign-bits, same
+ * order */
+ SIGNED_VALUE sx = (SIGNED_VALUE)x, sy = (SIGNED_VALUE)y;
+ if (sx < sy) return INT2FIX(-1);
+ return INT2FIX(sx > sy);
}
}
else if (RB_BIGNUM_TYPE_P(y)) {
- if (BIGNUM_SIGN(x) == BIGNUM_SIGN(y)) {
- int cmp = bary_cmp(BDIGITS(x), BIGNUM_LEN(x), BDIGITS(y), BIGNUM_LEN(y));
- return INT2FIX(BIGNUM_SIGN(x) ? cmp : -cmp);
- }
+ if (BIGNUM_SIGN(x) == BIGNUM_SIGN(y)) {
+ int cmp = bary_cmp(BDIGITS(x), BIGNUM_LEN(x), BDIGITS(y), BIGNUM_LEN(y));
+ return INT2FIX(BIGNUM_SIGN(x) ? cmp : -cmp);
+ }
}
else if (RB_FLOAT_TYPE_P(y)) {
return rb_integer_float_cmp(x, y);
}
else {
- return rb_num_coerce_cmp(x, y, idCmp);
+ return rb_num_coerce_cmp(x, y, idCmp);
}
return INT2FIX(BIGNUM_SIGN(x) ? 1 : -1);
}
@@ -5457,30 +5476,30 @@ big_op(VALUE x, VALUE y, enum big_op_t op)
int n;
if (RB_INTEGER_TYPE_P(y)) {
- rel = rb_big_cmp(x, y);
+ rel = rb_big_cmp(x, y);
}
else if (RB_FLOAT_TYPE_P(y)) {
rel = rb_integer_float_cmp(x, y);
}
else {
- ID id = 0;
- switch (op) {
- case big_op_gt: id = '>'; break;
- case big_op_ge: id = idGE; break;
- case big_op_lt: id = '<'; break;
- case big_op_le: id = idLE; break;
- }
- return rb_num_coerce_relop(x, y, id);
+ ID id = 0;
+ switch (op) {
+ case big_op_gt: id = '>'; break;
+ case big_op_ge: id = idGE; break;
+ case big_op_lt: id = '<'; break;
+ case big_op_le: id = idLE; break;
+ }
+ return rb_num_coerce_relop(x, y, id);
}
if (NIL_P(rel)) return Qfalse;
n = FIX2INT(rel);
switch (op) {
- case big_op_gt: return n > 0 ? Qtrue : Qfalse;
- case big_op_ge: return n >= 0 ? Qtrue : Qfalse;
- case big_op_lt: return n < 0 ? Qtrue : Qfalse;
- case big_op_le: return n <= 0 ? Qtrue : Qfalse;
+ case big_op_gt: return RBOOL(n > 0);
+ case big_op_ge: return RBOOL(n >= 0);
+ case big_op_lt: return RBOOL(n < 0);
+ case big_op_le: return RBOOL(n <= 0);
}
return Qundef;
}
@@ -5515,7 +5534,7 @@ rb_big_le(VALUE x, VALUE y)
*
* Returns <code>true</code> only if <i>obj</i> has the same value
* as <i>big</i>. Contrast this with Integer#eql?, which requires
- * <i>obj</i> to be a Integer.
+ * <i>obj</i> to be an Integer.
*
* 68719476736 == 68719476736.0 #=> true
*/
@@ -5524,7 +5543,7 @@ VALUE
rb_big_eq(VALUE x, VALUE y)
{
if (FIXNUM_P(y)) {
- return bignorm(x) == y ? Qtrue : Qfalse;
+ return RBOOL(bignorm(x) == y);
}
else if (RB_BIGNUM_TYPE_P(y)) {
}
@@ -5532,12 +5551,11 @@ rb_big_eq(VALUE x, VALUE y)
return rb_integer_float_eq(x, y);
}
else {
- return rb_equal(y, x);
+ return rb_equal(y, x);
}
if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y)) return Qfalse;
if (BIGNUM_LEN(x) != BIGNUM_LEN(y)) return Qfalse;
- if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse;
- return Qtrue;
+ return RBOOL(MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) == 0);
}
VALUE
@@ -5546,8 +5564,7 @@ rb_big_eql(VALUE x, VALUE y)
if (!RB_BIGNUM_TYPE_P(y)) return Qfalse;
if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y)) return Qfalse;
if (BIGNUM_LEN(x) != BIGNUM_LEN(y)) return Qfalse;
- if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) != 0) return Qfalse;
- return Qtrue;
+ return RBOOL(MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,BIGNUM_LEN(y)) == 0);
}
VALUE
@@ -5641,10 +5658,10 @@ bigsub_int(VALUE x, long y0)
assert(xn == zn);
num = (BDIGIT_DBL_SIGNED)xds[0] - y;
if (xn == 1 && num < 0) {
- BIGNUM_NEGATE(z);
- zds[0] = (BDIGIT)-num;
- RB_GC_GUARD(x);
- return bignorm(z);
+ BIGNUM_NEGATE(z);
+ zds[0] = (BDIGIT)-num;
+ RB_GC_GUARD(x);
+ return bignorm(z);
}
zds[0] = BIGLO(num);
num = BIGDN(num);
@@ -5656,10 +5673,10 @@ bigsub_int(VALUE x, long y0)
num = 0;
for (i=0; i < xn; i++) {
if (y == 0) goto y_is_zero_x;
- num += (BDIGIT_DBL_SIGNED)xds[i] - BIGLO(y);
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- y = BIGDN(y);
+ num += (BDIGIT_DBL_SIGNED)xds[i] - BIGLO(y);
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
+ y = BIGDN(y);
}
for (; i < zn; i++) {
if (y == 0) goto y_is_zero_z;
@@ -5674,9 +5691,9 @@ bigsub_int(VALUE x, long y0)
for (; i < xn; i++) {
y_is_zero_x:
if (num == 0) goto num_is_zero_x;
- num += xds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ num += xds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
#if SIZEOF_BDIGIT < SIZEOF_LONG
for (; i < zn; i++) {
@@ -5690,7 +5707,7 @@ bigsub_int(VALUE x, long y0)
for (; i < xn; i++) {
num_is_zero_x:
- zds[i] = xds[i];
+ zds[i] = xds[i];
}
#if SIZEOF_BDIGIT < SIZEOF_LONG
for (; i < zn; i++) {
@@ -5704,7 +5721,7 @@ bigsub_int(VALUE x, long y0)
assert(num == 0 || num == -1);
if (num < 0) {
get2comp(z);
- BIGNUM_NEGATE(z);
+ BIGNUM_NEGATE(z);
}
RB_GC_GUARD(x);
return bignorm(z);
@@ -5747,17 +5764,17 @@ bigadd_int(VALUE x, long y)
num = 0;
for (i=0; i < xn; i++) {
if (y == 0) goto y_is_zero_x;
- num += (BDIGIT_DBL)xds[i] + BIGLO(y);
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- y = BIGDN(y);
+ num += (BDIGIT_DBL)xds[i] + BIGLO(y);
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
+ y = BIGDN(y);
}
for (; i < zn; i++) {
if (y == 0) goto y_is_zero_z;
- num += BIGLO(y);
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- y = BIGDN(y);
+ num += BIGLO(y);
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
+ y = BIGDN(y);
}
goto finish;
@@ -5766,25 +5783,25 @@ bigadd_int(VALUE x, long y)
for (;i < xn; i++) {
y_is_zero_x:
if (num == 0) goto num_is_zero_x;
- num += (BDIGIT_DBL)xds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ num += (BDIGIT_DBL)xds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
for (; i < zn; i++) {
y_is_zero_z:
if (num == 0) goto num_is_zero_z;
- zds[i] = BIGLO(num);
- num = BIGDN(num);
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
}
goto finish;
for (;i < xn; i++) {
num_is_zero_x:
- zds[i] = xds[i];
+ zds[i] = xds[i];
}
for (; i < zn; i++) {
num_is_zero_z:
- zds[i] = 0;
+ zds[i] = 0;
}
goto finish;
@@ -5801,15 +5818,15 @@ bigadd(VALUE x, VALUE y, int sign)
sign = (sign == BIGNUM_SIGN(y));
if (BIGNUM_SIGN(x) != sign) {
- if (sign) return bigsub(y, x);
- return bigsub(x, y);
+ if (sign) return bigsub(y, x);
+ return bigsub(x, y);
}
if (BIGNUM_LEN(x) > BIGNUM_LEN(y)) {
- len = BIGNUM_LEN(x) + 1;
+ len = BIGNUM_LEN(x) + 1;
}
else {
- len = BIGNUM_LEN(y) + 1;
+ len = BIGNUM_LEN(y) + 1;
}
z = bignew(len, sign);
@@ -5826,26 +5843,26 @@ rb_big_plus(VALUE x, VALUE y)
long n;
if (FIXNUM_P(y)) {
- n = FIX2LONG(y);
- if ((n > 0) != BIGNUM_SIGN(x)) {
- if (n < 0) {
- n = -n;
- }
- return bigsub_int(x, n);
- }
- if (n < 0) {
- n = -n;
- }
- return bigadd_int(x, n);
+ n = FIX2LONG(y);
+ if ((n > 0) != BIGNUM_SIGN(x)) {
+ if (n < 0) {
+ n = -n;
+ }
+ return bigsub_int(x, n);
+ }
+ if (n < 0) {
+ n = -n;
+ }
+ return bigadd_int(x, n);
}
else if (RB_BIGNUM_TYPE_P(y)) {
- return bignorm(bigadd(x, y, 1));
+ return bignorm(bigadd(x, y, 1));
}
else if (RB_FLOAT_TYPE_P(y)) {
- return DBL2NUM(rb_big2dbl(x) + RFLOAT_VALUE(y));
+ return DBL2NUM(rb_big2dbl(x) + RFLOAT_VALUE(y));
}
else {
- return rb_num_coerce_bin(x, y, '+');
+ return rb_num_coerce_bin(x, y, '+');
}
}
@@ -5855,26 +5872,26 @@ rb_big_minus(VALUE x, VALUE y)
long n;
if (FIXNUM_P(y)) {
- n = FIX2LONG(y);
- if ((n > 0) != BIGNUM_SIGN(x)) {
- if (n < 0) {
- n = -n;
- }
- return bigadd_int(x, n);
- }
- if (n < 0) {
- n = -n;
- }
- return bigsub_int(x, n);
+ n = FIX2LONG(y);
+ if ((n > 0) != BIGNUM_SIGN(x)) {
+ if (n < 0) {
+ n = -n;
+ }
+ return bigadd_int(x, n);
+ }
+ if (n < 0) {
+ n = -n;
+ }
+ return bigsub_int(x, n);
}
else if (RB_BIGNUM_TYPE_P(y)) {
- return bignorm(bigadd(x, y, 0));
+ return bignorm(bigadd(x, y, 0));
}
else if (RB_FLOAT_TYPE_P(y)) {
- return DBL2NUM(rb_big2dbl(x) - RFLOAT_VALUE(y));
+ return DBL2NUM(rb_big2dbl(x) - RFLOAT_VALUE(y));
}
else {
- return rb_num_coerce_bin(x, y, '-');
+ return rb_num_coerce_bin(x, y, '-');
}
}
@@ -5933,15 +5950,15 @@ VALUE
rb_big_mul(VALUE x, VALUE y)
{
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ y = rb_int2big(FIX2LONG(y));
}
else if (RB_BIGNUM_TYPE_P(y)) {
}
else if (RB_FLOAT_TYPE_P(y)) {
- return DBL2NUM(rb_big2dbl(x) * RFLOAT_VALUE(y));
+ return DBL2NUM(rb_big2dbl(x) * RFLOAT_VALUE(y));
}
else {
- return rb_num_coerce_bin(x, y, '*');
+ return rb_num_coerce_bin(x, y, '*');
}
return bignorm(bigmul0(x, y));
@@ -5968,21 +5985,21 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
BARY_TRUNC(xds, xn);
if (xn < yn || (xn == yn && xds[xn - 1] < yds[yn - 1])) {
- if (divp) *divp = rb_int2big(0);
- if (modp) *modp = x;
- return Qnil;
+ if (divp) *divp = rb_int2big(0);
+ if (modp) *modp = x;
+ return Qnil;
}
if (yn == 1) {
- dd = yds[0];
- z = bignew(xn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
- zds = BDIGITS(z);
+ dd = yds[0];
+ z = bignew(xn, BIGNUM_SIGN(x)==BIGNUM_SIGN(y));
+ zds = BDIGITS(z);
dd = bigdivrem_single(zds, xds, xn, dd);
- if (modp) {
- *modp = rb_uint2big((uintptr_t)dd);
- BIGNUM_SET_SIGN(*modp, BIGNUM_SIGN(x));
- }
- if (divp) *divp = z;
- return Qnil;
+ if (modp) {
+ *modp = rb_uint2big((uintptr_t)dd);
+ BIGNUM_SET_SIGN(*modp, BIGNUM_SIGN(x));
+ }
+ if (divp) *divp = z;
+ return Qnil;
}
if (xn == 2 && yn == 2) {
BDIGIT_DBL x0 = bary2bdigitdbl(xds, 2);
@@ -6047,11 +6064,11 @@ bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
bigdivrem(x, y, divp, &mod);
if (BIGNUM_SIGN(x) != BIGNUM_SIGN(y) && !BIGZEROP(mod)) {
- if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
- if (modp) *modp = bigadd(mod, y, 1);
+ if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
+ if (modp) *modp = bigadd(mod, y, 1);
}
else if (modp) {
- *modp = mod;
+ *modp = mod;
}
}
@@ -6062,25 +6079,25 @@ rb_big_divide(VALUE x, VALUE y, ID op)
VALUE z;
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ y = rb_int2big(FIX2LONG(y));
}
else if (RB_BIGNUM_TYPE_P(y)) {
}
else if (RB_FLOAT_TYPE_P(y)) {
- if (op == '/') {
+ if (op == '/') {
double dx = rb_big2dbl(x);
return rb_flo_div_flo(DBL2NUM(dx), y);
- }
- else {
+ }
+ else {
VALUE v;
- double dy = RFLOAT_VALUE(y);
- if (dy == 0.0) rb_num_zerodiv();
+ double dy = RFLOAT_VALUE(y);
+ if (dy == 0.0) rb_num_zerodiv();
v = rb_big_divide(x, y, '/');
return rb_dbl2big(RFLOAT_VALUE(v));
- }
+ }
}
else {
- return rb_num_coerce_bin(x, y, op);
+ return rb_num_coerce_bin(x, y, op);
}
bigdivmod(x, y, &z, 0);
@@ -6105,10 +6122,10 @@ rb_big_modulo(VALUE x, VALUE y)
VALUE z;
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ y = rb_int2big(FIX2LONG(y));
}
else if (!RB_BIGNUM_TYPE_P(y)) {
- return rb_num_coerce_bin(x, y, '%');
+ return rb_num_coerce_bin(x, y, '%');
}
bigdivmod(x, y, 0, &z);
@@ -6121,10 +6138,10 @@ rb_big_remainder(VALUE x, VALUE y)
VALUE z;
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ y = rb_int2big(FIX2LONG(y));
}
else if (!RB_BIGNUM_TYPE_P(y)) {
- return rb_num_coerce_bin(x, y, rb_intern("remainder"));
+ return rb_num_coerce_bin(x, y, rb_intern("remainder"));
}
bigdivrem(x, y, 0, &z);
@@ -6137,7 +6154,7 @@ rb_big_divmod(VALUE x, VALUE y)
VALUE div, mod;
if (FIXNUM_P(y)) {
- y = rb_int2big(FIX2LONG(y));
+ y = rb_int2big(FIX2LONG(y));
}
else if (!RB_BIGNUM_TYPE_P(y)) {
return rb_num_coerce_bin(x, y, idDivmod);
@@ -6151,9 +6168,9 @@ static VALUE
big_shift(VALUE x, long n)
{
if (n < 0)
- return big_lshift(x, 1+(unsigned long)(-(n+1)));
+ return big_lshift(x, 1+(unsigned long)(-(n+1)));
else if (n > 0)
- return big_rshift(x, (unsigned long)n);
+ return big_rshift(x, (unsigned long)n);
return x;
}
@@ -6177,9 +6194,9 @@ big_fdiv(VALUE x, VALUE y, long ey)
l = ex - ey;
#if SIZEOF_LONG > SIZEOF_INT
{
- /* Visual C++ can't be here */
- if (l > INT_MAX) return HUGE_VAL;
- if (l < INT_MIN) return 0.0;
+ /* Visual C++ can't be here */
+ if (l > INT_MAX) return HUGE_VAL;
+ if (l < INT_MIN) return 0.0;
}
#endif
return ldexp(big2dbl(z), (int)l);
@@ -6213,19 +6230,19 @@ rb_big_fdiv_double(VALUE x, VALUE y)
dx = big2dbl(x);
if (FIXNUM_P(y)) {
- dy = (double)FIX2LONG(y);
- if (isinf(dx))
- return big_fdiv_int(x, rb_int2big(FIX2LONG(y)));
+ dy = (double)FIX2LONG(y);
+ if (isinf(dx))
+ return big_fdiv_int(x, rb_int2big(FIX2LONG(y)));
}
else if (RB_BIGNUM_TYPE_P(y)) {
- return big_fdiv_int(x, y);
+ return big_fdiv_int(x, y);
}
else if (RB_FLOAT_TYPE_P(y)) {
- dy = RFLOAT_VALUE(y);
- if (isnan(dy))
- return dy;
- if (isinf(dx))
- return big_fdiv_float(x, y);
+ dy = RFLOAT_VALUE(y);
+ if (isnan(dy))
+ return dy;
+ if (isinf(dx))
+ return big_fdiv_float(x, y);
}
else {
return NUM2DBL(rb_num_coerce_bin(x, y, idFdiv));
@@ -6250,53 +6267,53 @@ rb_big_pow(VALUE x, VALUE y)
if (y == INT2FIX(0)) return INT2FIX(1);
if (y == INT2FIX(1)) return x;
if (RB_FLOAT_TYPE_P(y)) {
- d = RFLOAT_VALUE(y);
- if ((BIGNUM_NEGATIVE_P(x) && !BIGZEROP(x))) {
+ d = RFLOAT_VALUE(y);
+ if ((BIGNUM_NEGATIVE_P(x) && !BIGZEROP(x))) {
return rb_dbl_complex_new_polar_pi(pow(-rb_big2dbl(x), d), d);
- }
+ }
}
else if (RB_BIGNUM_TYPE_P(y)) {
- y = bignorm(y);
- if (FIXNUM_P(y))
- goto again;
- rb_warn("in a**b, b may be too big");
- d = rb_big2dbl(y);
+ y = bignorm(y);
+ if (FIXNUM_P(y))
+ goto again;
+ rb_warn("in a**b, b may be too big");
+ d = rb_big2dbl(y);
}
else if (FIXNUM_P(y)) {
- yy = FIX2LONG(y);
+ yy = FIX2LONG(y);
if (yy < 0) {
- x = rb_big_pow(x, INT2NUM(-yy));
+ x = rb_big_pow(x, LONG2NUM(-yy));
if (RB_INTEGER_TYPE_P(x))
return rb_rational_raw(INT2FIX(1), x);
else
return DBL2NUM(1.0 / NUM2DBL(x));
}
- else {
- VALUE z = 0;
- SIGNED_VALUE mask;
+ else {
+ VALUE z = 0;
+ SIGNED_VALUE mask;
const size_t xbits = rb_absint_numwords(x, 1, NULL);
- const size_t BIGLEN_LIMIT = 32*1024*1024;
+ const size_t BIGLEN_LIMIT = 32*1024*1024;
- if (xbits == (size_t)-1 ||
+ if (xbits == (size_t)-1 ||
(xbits > BIGLEN_LIMIT) ||
(xbits * yy > BIGLEN_LIMIT)) {
- rb_warn("in a**b, b may be too big");
- d = (double)yy;
- }
- else {
- for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) {
- if (z) z = bigsq(z);
- if (yy & mask) {
- z = z ? bigtrunc(bigmul0(z, x)) : x;
- }
- }
- return bignorm(z);
- }
- }
+ rb_warn("in a**b, b may be too big");
+ d = (double)yy;
+ }
+ else {
+ for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) {
+ if (z) z = bigsq(z);
+ if (yy & mask) {
+ z = z ? bigtrunc(bigmul0(z, x)) : x;
+ }
+ }
+ return bignorm(z);
+ }
+ }
}
else {
- return rb_num_coerce_bin(x, y, idPow);
+ return rb_num_coerce_bin(x, y, idPow);
}
return DBL2NUM(pow(rb_big2dbl(x), d));
}
@@ -6316,8 +6333,8 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
xds = BDIGITS(x);
#if SIZEOF_BDIGIT >= SIZEOF_LONG
if (!hibitsy) {
- y &= xds[0];
- return LONG2NUM(y);
+ y &= xds[0];
+ return LONG2NUM(y);
}
#endif
@@ -6346,10 +6363,10 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
}
#endif
for (;i < xn; i++) {
- zds[i] = xds[i] & hibitsy;
+ zds[i] = xds[i] & hibitsy;
}
for (;i < zn; i++) {
- zds[i] = hibitsx & hibitsy;
+ zds[i] = hibitsx & hibitsy;
}
twocomp2abs_bang(z, hibitsx && hibitsy);
RB_GC_GUARD(x);
@@ -6369,12 +6386,12 @@ rb_big_and(VALUE x, VALUE y)
long tmpn;
if (!RB_INTEGER_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '&');
+ return rb_num_coerce_bit(x, y, '&');
}
hibitsx = abs2twocomp(&x, &xn);
if (FIXNUM_P(y)) {
- return bigand_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigand_int(x, xn, hibitsx, FIX2LONG(y));
}
hibitsy = abs2twocomp(&y, &yn);
if (xn > yn) {
@@ -6396,10 +6413,10 @@ rb_big_and(VALUE x, VALUE y)
zds = BDIGITS(z);
for (i=0; i<n1; i++) {
- zds[i] = ds1[i] & ds2[i];
+ zds[i] = ds1[i] & ds2[i];
}
for (; i<n2; i++) {
- zds[i] = hibits1 & ds2[i];
+ zds[i] = hibits1 & ds2[i];
}
twocomp2abs_bang(z, hibits1 && hibits2);
RB_GC_GUARD(x);
@@ -6488,12 +6505,12 @@ rb_big_or(VALUE x, VALUE y)
long tmpn;
if (!RB_INTEGER_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '|');
+ return rb_num_coerce_bit(x, y, '|');
}
hibitsx = abs2twocomp(&x, &xn);
if (FIXNUM_P(y)) {
- return bigor_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigor_int(x, xn, hibitsx, FIX2LONG(y));
}
hibitsy = abs2twocomp(&y, &yn);
if (xn > yn) {
@@ -6515,10 +6532,10 @@ rb_big_or(VALUE x, VALUE y)
zds = BDIGITS(z);
for (i=0; i<n1; i++) {
- zds[i] = ds1[i] | ds2[i];
+ zds[i] = ds1[i] | ds2[i];
}
for (; i<n2; i++) {
- zds[i] = hibits1 | ds2[i];
+ zds[i] = hibits1 | ds2[i];
}
twocomp2abs_bang(z, hibits1 || hibits2);
RB_GC_GUARD(x);
@@ -6582,12 +6599,12 @@ rb_big_xor(VALUE x, VALUE y)
long tmpn;
if (!RB_INTEGER_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '^');
+ return rb_num_coerce_bit(x, y, '^');
}
hibitsx = abs2twocomp(&x, &xn);
if (FIXNUM_P(y)) {
- return bigxor_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigxor_int(x, xn, hibitsx, FIX2LONG(y));
}
hibitsy = abs2twocomp(&y, &yn);
if (xn > yn) {
@@ -6606,10 +6623,10 @@ rb_big_xor(VALUE x, VALUE y)
zds = BDIGITS(z);
for (i=0; i<n1; i++) {
- zds[i] = ds1[i] ^ ds2[i];
+ zds[i] = ds1[i] ^ ds2[i];
}
for (; i<n2; i++) {
- zds[i] = hibitsx ^ ds2[i];
+ zds[i] = hibitsx ^ ds2[i];
}
twocomp2abs_bang(z, (hibits1 ^ hibits2) != 0);
RB_GC_GUARD(x);
@@ -6625,25 +6642,25 @@ rb_big_lshift(VALUE x, VALUE y)
int shift_numbits;
for (;;) {
- if (FIXNUM_P(y)) {
- long l = FIX2LONG(y);
+ if (FIXNUM_P(y)) {
+ long l = FIX2LONG(y);
unsigned long shift;
- if (0 <= l) {
- lshift_p = 1;
+ if (0 <= l) {
+ lshift_p = 1;
shift = l;
}
else {
- lshift_p = 0;
- shift = 1+(unsigned long)(-(l+1));
- }
+ lshift_p = 0;
+ shift = 1+(unsigned long)(-(l+1));
+ }
shift_numbits = (int)(shift & (BITSPERDIG-1));
shift_numdigits = shift >> bit_length(BITSPERDIG-1);
return bignorm(big_shift3(x, lshift_p, shift_numdigits, shift_numbits));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
+ }
+ else if (RB_BIGNUM_TYPE_P(y)) {
return bignorm(big_shift2(x, 1, y));
- }
- y = rb_to_int(y);
+ }
+ y = rb_to_int(y);
}
}
@@ -6655,8 +6672,8 @@ rb_big_rshift(VALUE x, VALUE y)
int shift_numbits;
for (;;) {
- if (FIXNUM_P(y)) {
- long l = FIX2LONG(y);
+ if (FIXNUM_P(y)) {
+ long l = FIX2LONG(y);
unsigned long shift;
if (0 <= l) {
lshift_p = 0;
@@ -6664,16 +6681,16 @@ rb_big_rshift(VALUE x, VALUE y)
}
else {
lshift_p = 1;
- shift = 1+(unsigned long)(-(l+1));
- }
+ shift = 1+(unsigned long)(-(l+1));
+ }
shift_numbits = (int)(shift & (BITSPERDIG-1));
shift_numdigits = shift >> bit_length(BITSPERDIG-1);
return bignorm(big_shift3(x, lshift_p, shift_numdigits, shift_numbits));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
+ }
+ else if (RB_BIGNUM_TYPE_P(y)) {
return bignorm(big_shift2(x, 0, y));
- }
- y = rb_to_int(y);
+ }
+ y = rb_to_int(y);
}
}
@@ -6687,29 +6704,29 @@ rb_big_aref(VALUE x, VALUE y)
BDIGIT bit;
if (RB_BIGNUM_TYPE_P(y)) {
- if (BIGNUM_NEGATIVE_P(y))
- return INT2FIX(0);
- bigtrunc(y);
- if (BIGSIZE(y) > sizeof(size_t)) {
- out_of_range:
- return BIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
- }
+ if (BIGNUM_NEGATIVE_P(y))
+ return INT2FIX(0);
+ bigtrunc(y);
+ if (BIGSIZE(y) > sizeof(size_t)) {
+ return BIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
+ }
#if SIZEOF_SIZE_T <= SIZEOF_LONG
- shift = big2ulong(y, "long");
+ shift = big2ulong(y, "long");
#else
- shift = big2ull(y, "long long");
+ shift = big2ull(y, "long long");
#endif
}
else {
- l = NUM2LONG(y);
- if (l < 0) return INT2FIX(0);
- shift = (size_t)l;
+ l = NUM2LONG(y);
+ if (l < 0) return INT2FIX(0);
+ shift = (size_t)l;
}
s1 = shift/BITSPERDIG;
s2 = shift%BITSPERDIG;
bit = (BDIGIT)1 << s2;
- if (s1 >= BIGNUM_LEN(x)) goto out_of_range;
+ if (s1 >= BIGNUM_LEN(x))
+ return BIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
xds = BDIGITS(x);
if (BIGNUM_POSITIVE_P(x))
@@ -6733,14 +6750,15 @@ rb_big_hash(VALUE x)
/*
* call-seq:
- * big.coerce(numeric) -> array
+ * int.coerce(numeric) -> array
*
- * Returns an array with both a +numeric+ and a +big+ represented as Bignum
- * objects.
+ * Returns an array with both a +numeric+ and a +int+ represented as
+ * Integer objects or Float objects.
*
- * This is achieved by converting +numeric+ to a Bignum.
+ * This is achieved by converting +numeric+ to an Integer or a Float.
*
- * A TypeError is raised if the +numeric+ is not a Fixnum or Bignum type.
+ * A TypeError is raised if the +numeric+ is not an Integer or a Float
+ * type.
*
* (0x3FFFFFFFFFFFFFFF+1).coerce(42) #=> [42, 4611686018427387904]
*/
@@ -6762,8 +6780,8 @@ VALUE
rb_big_abs(VALUE x)
{
if (BIGNUM_NEGATIVE_P(x)) {
- x = rb_big_clone(x);
- BIGNUM_SET_POSITIVE_SIGN(x);
+ x = rb_big_clone(x);
+ BIGNUM_SET_POSITIVE_SIGN(x);
}
return x;
}
@@ -6830,17 +6848,14 @@ rb_big_bit_length(VALUE big)
VALUE
rb_big_odd_p(VALUE num)
{
- if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
- return Qtrue;
- }
- return Qfalse;
+ return RBOOL(BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1);
}
VALUE
rb_big_even_p(VALUE num)
{
if (BIGNUM_LEN(num) != 0 && BDIGITS(num)[0] & 1) {
- return Qfalse;
+ return Qfalse;
}
return Qtrue;
}
@@ -6871,21 +6886,21 @@ estimate_initial_sqrt(VALUE *xp, const size_t xn, const BDIGIT *nds, size_t len)
double f;
if (rshift > 0) {
- lowbits = (BDIGIT)d & ~(~(BDIGIT)1U << rshift);
- d >>= rshift;
+ lowbits = (BDIGIT)d & ~(~(BDIGIT)1U << rshift);
+ d >>= rshift;
}
else if (rshift < 0) {
- d <<= -rshift;
- d |= nds[len-dbl_per_bdig-1] >> (BITSPERDIG+rshift);
+ d <<= -rshift;
+ d |= nds[len-dbl_per_bdig-1] >> (BITSPERDIG+rshift);
}
f = sqrt(BDIGIT_DBL_TO_DOUBLE(d));
d = (BDIGIT_DBL)ceil(f);
if (BDIGIT_DBL_TO_DOUBLE(d) == f) {
- if (lowbits || (lowbits = !bary_zero_p(nds, len-dbl_per_bdig)))
- ++d;
+ if (lowbits || (lowbits = !bary_zero_p(nds, len-dbl_per_bdig)))
+ ++d;
}
else {
- lowbits = 1;
+ lowbits = 1;
}
rshift /= 2;
rshift += (2-(len&1))*BITSPERDIG/2;
@@ -6917,52 +6932,49 @@ rb_big_isqrt(VALUE n)
BDIGIT *xds;
if (len <= 2) {
- BDIGIT sq = rb_bdigit_dbl_isqrt(bary2bdigitdbl(nds, len));
+ BDIGIT sq = rb_bdigit_dbl_isqrt(bary2bdigitdbl(nds, len));
#if SIZEOF_BDIGIT > SIZEOF_LONG
- return ULL2NUM(sq);
+ return ULL2NUM(sq);
#else
- return ULONG2NUM(sq);
+ return ULONG2NUM(sq);
#endif
}
else if ((xds = estimate_initial_sqrt(&x, xn, nds, len)) != 0) {
- size_t tn = xn + BIGDIVREM_EXTRA_WORDS;
- VALUE t = bignew_1(0, tn, 1);
- BDIGIT *tds = BDIGITS(t);
- tn = BIGNUM_LEN(t);
-
- /* t = n/x */
- while (bary_divmod_branch(tds, tn, NULL, 0, nds, len, xds, xn),
- bary_cmp(tds, tn, xds, xn) < 0) {
- int carry;
- BARY_TRUNC(tds, tn);
- /* x = (x+t)/2 */
- carry = bary_add(xds, xn, xds, xn, tds, tn);
- bary_small_rshift(xds, xds, xn, 1, carry);
- tn = BIGNUM_LEN(t);
- }
- rb_big_realloc(t, 0);
- rb_gc_force_recycle(t);
+ size_t tn = xn + BIGDIVREM_EXTRA_WORDS;
+ VALUE t = bignew_1(0, tn, 1);
+ BDIGIT *tds = BDIGITS(t);
+ tn = BIGNUM_LEN(t);
+
+ /* t = n/x */
+ while (bary_divmod_branch(tds, tn, NULL, 0, nds, len, xds, xn),
+ bary_cmp(tds, tn, xds, xn) < 0) {
+ int carry;
+ BARY_TRUNC(tds, tn);
+ /* x = (x+t)/2 */
+ carry = bary_add(xds, xn, xds, xn, tds, tn);
+ bary_small_rshift(xds, xds, xn, 1, carry);
+ tn = BIGNUM_LEN(t);
+ }
}
RBASIC_SET_CLASS_RAW(x, rb_cInteger);
return x;
}
-#ifdef USE_GMP
+#if USE_GMP
static void
bary_powm_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, const BDIGIT *mds, size_t mn)
{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;
mpz_t z, x, y, m;
size_t count;
mpz_init(x);
mpz_init(y);
mpz_init(m);
mpz_init(z);
- mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
- mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds);
- mpz_import(m, mn, -1, sizeof(BDIGIT), 0, nails, mds);
+ bdigits_to_mpz(x, xds, xn);
+ bdigits_to_mpz(y, yds, yn);
+ bdigits_to_mpz(m, mds, mn);
mpz_powm(z, x, y, m);
- mpz_export(zds, &count, -1, sizeof(BDIGIT), 0, nails, z);
+ bdigits_from_mpz(z, zds, &count);
BDIGITS_ZERO(zds+count, zn-count);
mpz_clear(x);
mpz_clear(y);
@@ -6974,7 +6986,7 @@ bary_powm_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT
static VALUE
int_pow_tmp3(VALUE x, VALUE y, VALUE m, int nega_flg)
{
-#ifdef USE_GMP
+#if USE_GMP
VALUE z;
size_t xn, yn, mn, zn;
@@ -7140,6 +7152,7 @@ rb_int_powm(int const argc, VALUE * const argv, VALUE const num)
long const half_val = (long)HALF_LONG_MSB;
long const mm = FIX2LONG(m);
if (!mm) rb_num_zerodiv();
+ if (mm == 1) return INT2FIX(0);
if (mm <= half_val) {
return int_pow_tmp1(rb_int_modulo(a, m), b, mm, nega_flg);
}
@@ -7149,6 +7162,7 @@ rb_int_powm(int const argc, VALUE * const argv, VALUE const num)
}
else {
if (rb_bigzero_p(m)) rb_num_zerodiv();
+ if (bignorm(m) == INT2FIX(1)) return INT2FIX(0);
return int_pow_tmp3(rb_int_modulo(a, m), b, m, nega_flg);
}
}
@@ -7176,16 +7190,9 @@ rb_int_powm(int const argc, VALUE * const argv, VALUE const num)
void
Init_Bignum(void)
{
-#ifndef RUBY_INTEGER_UNIFICATION
- rb_cBignum = rb_cInteger;
-#endif
- /* An obsolete class, use Integer */
- rb_define_const(rb_cObject, "Bignum", rb_cInteger);
- rb_deprecate_constant(rb_cObject, "Bignum");
-
rb_define_method(rb_cInteger, "coerce", rb_int_coerce, 1);
-#ifdef USE_GMP
+#if USE_GMP
/* The version of loaded GMP. */
rb_define_const(rb_cInteger, "GMP_VERSION", rb_sprintf("GMP %s", gmp_version));
#endif
diff --git a/bin/bundle b/bin/bundle
deleted file mode 100755
index 1a0b06b005..0000000000
--- a/bin/bundle
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'bundler' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-str = ARGV.first
-if str
- str = str.b[/\A_(.*)_\z/, 1]
- if str and Gem::Version.correct?(str)
- version = str
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('bundler', 'bundle', version)
-else
-gem "bundler", version
-load Gem.bin_path("bundler", "bundle", version)
-end
diff --git a/bin/bundler b/bin/bundler
deleted file mode 100755
index e15eb39ed7..0000000000
--- a/bin/bundler
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'bundler' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-str = ARGV.first
-if str
- str = str.b[/\A_(.*)_\z/, 1]
- if str and Gem::Version.correct?(str)
- version = str
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('bundler', 'bundler', version)
-else
-gem "bundler", version
-load Gem.bin_path("bundler", "bundler", version)
-end
diff --git a/bin/erb b/bin/erb
deleted file mode 100755
index 2435224fe1..0000000000
--- a/bin/erb
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/usr/bin/env ruby
-# Tiny eRuby --- ERB2
-# Copyright (c) 1999-2000,2002 Masatoshi SEKI
-# You can redistribute it and/or modify it under the same terms as Ruby.
-
-require 'erb'
-
-class ERB
- module Main
- def ARGV.switch
- return nil if self.empty?
- arg = self.shift
- return nil if arg == '--'
- case arg
- when /\A-(.)(.*)/
- if $1 == '-'
- arg, @maybe_arg = arg.split(/=/, 2)
- return arg
- end
- raise 'unknown switch "-"' if $2[0] == ?- and $1 != 'T'
- if $2.size > 0
- self.unshift "-#{$2}"
- @maybe_arg = $2
- else
- @maybe_arg = nil
- end
- "-#{$1}"
- when /\A(\w+)=/
- arg
- else
- self.unshift arg
- nil
- end
- end
-
- def ARGV.req_arg
- (@maybe_arg || self.shift || raise('missing argument')).tap {
- @maybe_arg = nil
- }
- end
-
- def trim_mode_opt(trim_mode, disable_percent)
- return trim_mode if disable_percent
- case trim_mode
- when 0
- return '%'
- when 1
- return '%>'
- when 2
- return '%<>'
- when '-'
- return '%-'
- end
- end
- module_function :trim_mode_opt
-
- def run(factory=ERB)
- trim_mode = 0
- disable_percent = false
- variables = {}
- begin
- while switch = ARGV.switch
- case switch
- when '-x' # ruby source
- output = true
- when '-n' # line number
- number = true
- when '-v' # verbose
- $VERBOSE = true
- when '--version' # version
- STDERR.puts factory.version
- exit
- when '-d', '--debug' # debug
- $DEBUG = true
- when '-r' # require
- require ARGV.req_arg
- when '-S' # security level
- warn 'warning: -S option of erb command is deprecated. Please do not use this.'
- arg = ARGV.req_arg
- raise "invalid safe_level #{arg.dump}" unless arg =~ /\A[0-1]\z/
- safe_level = arg.to_i
- when '-T' # trim mode
- arg = ARGV.req_arg
- if arg == '-'
- trim_mode = arg
- next
- end
- raise "invalid trim mode #{arg.dump}" unless arg =~ /\A[0-2]\z/
- trim_mode = arg.to_i
- when '-E', '--encoding'
- arg = ARGV.req_arg
- set_encoding(*arg.split(/:/, 2))
- when '-U'
- set_encoding(Encoding::UTF_8, Encoding::UTF_8)
- when '-P'
- disable_percent = true
- when '--help'
- raise "print this help"
- when /\A-/
- raise "unknown switch #{switch.dump}"
- else
- var, val = *switch.split('=', 2)
- (variables ||= {})[var] = val
- end
- end
- rescue # usage
- STDERR.puts $!.to_s
- STDERR.puts File.basename($0) +
- " [switches] [var=value...] [inputfile]"
- STDERR.puts <<EOU
- -x print ruby script
- -n print ruby script with line number
- -v enable verbose mode
- -d set $DEBUG to true
- -r library load a library
- -E ex[:in] set default external/internal encodings
- -U set default encoding to UTF-8
- -T trim_mode specify trim_mode (0..2, -)
- -P disable ruby code evaluation for lines beginning with %
- var=value set variable
-EOU
- exit 1
- end
-
- $<.set_encoding(Encoding::UTF_8, nil)
- src = $<.read
- filename = $FILENAME
- exit 2 unless src
- trim = trim_mode_opt(trim_mode, disable_percent)
- if safe_level.nil?
- erb = factory.new(src, trim_mode: trim)
- else
- # [deprecated] This will be removed at Ruby 2.7.
- erb = factory.new(src, safe_level, trim_mode: trim)
- end
- erb.filename = filename
- if output
- if number
- erb.src.each_line.with_index do |line, l|
- puts "%3d %s"%[l+1, line]
- end
- else
- puts erb.src
- end
- else
- bind = TOPLEVEL_BINDING
- if variables
- enc = erb.encoding
- for var, val in variables do
- val = val.encode(enc) if val
- bind.local_variable_set(var, val)
- end
- end
- erb.run(bind)
- end
- end
- module_function :run
-
- def set_encoding(extern, intern = nil)
- verbose, $VERBOSE = $VERBOSE, nil
- Encoding.default_external = extern unless extern.nil? || extern == ""
- Encoding.default_internal = intern unless intern.nil? || intern == ""
- [$stdin, $stdout, $stderr].each do |io|
- io.set_encoding(extern, intern)
- end
- ensure
- $VERBOSE = verbose
- end
- module_function :set_encoding
- class << self; private :set_encoding; end
- end
-end
-
-if __FILE__ == $0
- ERB::Main.run
-end
diff --git a/bin/gem b/bin/gem
index a4ec754abb..1c16ea7ddd 100755
--- a/bin/gem
+++ b/bin/gem
@@ -5,21 +5,6 @@
# See LICENSE.txt for permissions.
#++
-require 'rubygems'
-require 'rubygems/gem_runner'
-require 'rubygems/exceptions'
-
-required_version = Gem::Requirement.new ">= 1.8.7"
-
-unless required_version.satisfied_by? Gem.ruby_version then
- abort "Expected Ruby Version #{required_version}, is #{Gem.ruby_version}"
-end
-
-args = ARGV.clone
-
-begin
- Gem::GemRunner.new.run args
-rescue Gem::SystemExitException => e
- exit e.exit_code
-end
+require "rubygems/gem_runner"
+Gem::GemRunner.new.run ARGV.clone
diff --git a/bin/irb b/bin/irb
deleted file mode 100755
index ae6d358c9d..0000000000
--- a/bin/irb
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'irb' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-str = ARGV.first
-if str
- str = str.b[/\A_(.*)_\z/, 1]
- if str and Gem::Version.correct?(str)
- version = str
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('irb', 'irb', version)
-else
-gem "irb", version
-load Gem.bin_path("irb", "irb", version)
-end
diff --git a/bin/racc b/bin/racc
deleted file mode 100755
index 3ddac532b4..0000000000
--- a/bin/racc
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'racc' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-if ARGV.first
- str = ARGV.first
- str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
- version = $1
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('racc', 'racc', version)
-else
-gem "racc", version
-load Gem.bin_path("racc", "racc", version)
-end
diff --git a/bin/racc2y b/bin/racc2y
deleted file mode 100755
index a1e4352632..0000000000
--- a/bin/racc2y
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'racc' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-if ARGV.first
- str = ARGV.first
- str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
- version = $1
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('racc', 'racc2y', version)
-else
-gem "racc", version
-load Gem.bin_path("racc", "racc2y", version)
-end
diff --git a/bin/rdoc b/bin/rdoc
deleted file mode 100755
index 8fa948cddb..0000000000
--- a/bin/rdoc
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'rdoc' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-str = ARGV.first
-if str
- str = str.b[/\A_(.*)_\z/, 1]
- if str and Gem::Version.correct?(str)
- version = str
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('rdoc', 'rdoc', version)
-else
-gem "rdoc", version
-load Gem.bin_path("rdoc", "rdoc", version)
-end
diff --git a/bin/ri b/bin/ri
deleted file mode 100755
index 0cc2f73bb6..0000000000
--- a/bin/ri
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'rdoc' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-str = ARGV.first
-if str
- str = str.b[/\A_(.*)_\z/, 1]
- if str and Gem::Version.correct?(str)
- version = str
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('rdoc', 'ri', version)
-else
-gem "rdoc", version
-load Gem.bin_path("rdoc", "ri", version)
-end
diff --git a/bin/y2racc b/bin/y2racc
deleted file mode 100755
index 023615f369..0000000000
--- a/bin/y2racc
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'racc' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0.a"
-
-if ARGV.first
- str = ARGV.first
- str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
- version = $1
- ARGV.shift
- end
-end
-
-if Gem.respond_to?(:activate_bin_path)
-load Gem.activate_bin_path('racc', 'y2racc', version)
-else
-gem "racc", version
-load Gem.bin_path("racc", "y2racc", version)
-end
diff --git a/bootstraptest/pending.rb b/bootstraptest/pending.rb
index 0959bfa2b0..2c4b85a419 100644
--- a/bootstraptest/pending.rb
+++ b/bootstraptest/pending.rb
@@ -1,19 +1,3 @@
-assert_equal 'A', %q{
- class A
- @@a = 'A'
- def a=(x)
- @@a = x
- end
- def a
- @@a
- end
- end
-
- B = A.dup
- B.new.a = 'B'
- A.new.a
-}, '[ruby-core:17019]'
-
assert_equal 'ok', %q{
def m
lambda{
@@ -31,13 +15,6 @@ assert_equal 'ok', %q{
end
}
-assert_normal_exit %q{
- r = Range.allocate
- def r.<=>(o) true end
- r.instance_eval { initialize r, r }
- r.inspect
-}
-
# This randomly fails on mswin.
assert_equal %q{[]}, %q{
Thread.new{sleep}.backtrace
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 56b4b12230..f9b3e919b8 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -8,6 +8,8 @@
# Never use Ruby extensions in this file.
# Maintain Ruby 1.8 compatibility for now
+$start_time = Time.now
+
begin
require 'fileutils'
require 'tmpdir'
@@ -58,24 +60,114 @@ if !Dir.respond_to?(:mktmpdir)
end
end
+# Configuration
+bt = Struct.new(:ruby,
+ :verbose,
+ :color,
+ :tty,
+ :quiet,
+ :wn,
+ :progress,
+ :progress_bs,
+ :passed,
+ :failed,
+ :reset,
+ :columns,
+ :window_width,
+ :width,
+ :indent,
+ :platform,
+ )
+BT = Class.new(bt) do
+ def indent=(n)
+ super
+ if (self.columns ||= 0) < n
+ $stderr.print(' ' * (n - self.columns))
+ end
+ self.columns = indent
+ end
+
+ def putc(c)
+ unless self.quiet
+ if self.window_width == nil
+ unless w = ENV["COLUMNS"] and (w = w.to_i) > 0
+ w = 80
+ end
+ w -= 1
+ self.window_width = w
+ end
+ if self.window_width and self.columns >= self.window_width
+ $stderr.print "\n", " " * (self.indent ||= 0)
+ self.columns = indent
+ end
+ $stderr.print c
+ $stderr.flush
+ self.columns += 1
+ end
+ end
+
+ def wn=(wn)
+ unless wn == 1
+ if /(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:((?:\\.|\S)+))/ =~ ENV.delete("MAKEFLAGS")
+ begin
+ if fifo = $3
+ fifo.gsub!(/\\(?=.)/, '')
+ r = File.open(fifo, IO::RDONLY|IO::NONBLOCK|IO::BINARY)
+ w = File.open(fifo, IO::WRONLY|IO::NONBLOCK|IO::BINARY)
+ else
+ r = IO.for_fd($1.to_i(10), "rb", autoclose: false)
+ w = IO.for_fd($2.to_i(10), "wb", autoclose: false)
+ end
+ rescue => e
+ r.close if r
+ else
+ r.close_on_exec = true
+ w.close_on_exec = true
+ tokens = r.read_nonblock(wn > 0 ? wn : 1024, exception: false)
+ r.close
+ if String === tokens
+ tokens.freeze
+ auth = w
+ w = nil
+ at_exit {auth << tokens; auth.close}
+ wn = tokens.size + 1
+ else
+ w.close
+ wn = 1
+ end
+ end
+ end
+ if wn <= 0
+ require 'etc'
+ wn = [Etc.nprocessors / 2, 1].max
+ end
+ end
+ super wn
+ end
+end.new
+
+BT_STATE = Struct.new(:count, :error).new
+
def main
- @ruby = File.expand_path('miniruby')
- @verbose = false
+ BT.ruby = File.expand_path('miniruby')
+ BT.verbose = false
$VERBOSE = false
$stress = false
- @color = nil
- @tty = nil
- @quiet = false
+ BT.color = nil
+ BT.tty = nil
+ BT.quiet = false
+ # BT.wn = 1
dir = nil
quiet = false
tests = nil
ARGV.delete_if {|arg|
case arg
when /\A--ruby=(.*)/
- @ruby = $1
- @ruby.gsub!(/^([^ ]*)/){File.expand_path($1)}
- @ruby.gsub!(/(\s+-I\s*)((?!(?:\.\/)*-(?:\s|\z))\S+)/){$1+File.expand_path($2)}
- @ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)}
+ ruby = $1
+ ruby.gsub!(/^([^ ]*)/){File.expand_path($1)}
+ ruby.gsub!(/(\s+-I\s*)((?!(?:\.\/)*-(?:\s|\z))\S+)/){$1+File.expand_path($2)}
+ ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)}
+ BT.ruby = ruby
true
when /\A--sets=(.*)/
tests = Dir.glob("#{File.dirname($0)}/test_{#{$1}}*.rb").sort
@@ -88,18 +180,23 @@ def main
$stress = true
when /\A--color(?:=(?:always|(auto)|(never)|(.*)))?\z/
warn "unknown --color argument: #$3" if $3
- @color = $1 ? nil : !$2
+ BT.color = color = $1 ? nil : !$2
true
when /\A--tty(=(?:yes|(no)|(.*)))?\z/
warn "unknown --tty argument: #$3" if $3
- @tty = !$1 || !$2
+ BT.tty = !$1 || !$2
true
when /\A(-q|--q(uiet))\z/
quiet = true
- @quiet = true
+ BT.quiet = true
+ true
+ when /\A-j(\d+)?/
+ BT.wn = $1.to_i
true
when /\A(-v|--v(erbose))\z/
- @verbose = true
+ BT.verbose = true
+ BT.quiet = false
+ true
when /\A(-h|--h(elp)?)\z/
puts(<<-End)
Usage: #{File.basename($0, '.*')} --ruby=PATH [--sets=NAME,NAME,...]
@@ -121,22 +218,23 @@ End
end
}
if tests and not ARGV.empty?
- $stderr.puts "--tests and arguments are exclusive"
- exit false
+ abort "--sets and arguments are exclusive"
end
tests ||= ARGV
tests = Dir.glob("#{File.dirname($0)}/test_*.rb").sort if tests.empty?
pathes = tests.map {|path| File.expand_path(path) }
- @progress = %w[- \\ | /]
- @progress_bs = "\b" * @progress[0].size
- @tty = $stderr.tty? if @tty.nil?
- case @color
+ BT.progress = %w[- \\ | /]
+ BT.progress_bs = "\b" * BT.progress[0].size
+ BT.tty = $stderr.tty? if BT.tty.nil?
+ BT.wn ||= /-j(\d+)?/ =~ (ENV["MAKEFLAGS"] || ENV["MFLAGS"]) ? $1.to_i : 1
+
+ case BT.color
when nil
- @color = @tty && /dumb/ !~ ENV["TERM"]
+ BT.color = BT.tty && /dumb/ !~ ENV["TERM"]
end
- @tty &&= !@verbose
- if @color
+ BT.tty &&= !BT.verbose
+ if BT.color
# dircolors-like style
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
begin
@@ -145,14 +243,16 @@ End
end
rescue
end
- @passed = "\e[;#{colors["pass"] || "32"}m"
- @failed = "\e[;#{colors["fail"] || "31"}m"
- @reset = "\e[m"
+ BT.passed = "\e[;#{colors["pass"] || "32"}m"
+ BT.failed = "\e[;#{colors["fail"] || "31"}m"
+ BT.reset = "\e[m"
else
- @passed = @failed = @reset = ""
+ BT.passed = BT.failed = BT.reset = ""
end
+ target_version = `#{BT.ruby} -v`.chomp
+ BT.platform = target_version[/\[(.*)\]\z/, 1]
unless quiet
- puts Time.now
+ puts $start_time
if defined?(RUBY_DESCRIPTION)
puts "Driver is #{RUBY_DESCRIPTION}"
elsif defined?(RUBY_PATCHLEVEL)
@@ -160,265 +260,469 @@ End
else
puts "Driver is ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end
- puts "Target is #{`#{@ruby} -v`.chomp}"
+ puts "Target is #{target_version}"
puts
$stdout.flush
end
- in_temporary_working_directory(dir) {
+ in_temporary_working_directory(dir) do
exec_test pathes
- }
+ end
end
def erase(e = true)
- if e and @columns > 0 and @tty and !@verbose
+ if e and BT.columns > 0 and BT.tty and !BT.verbose
"\e[1K\r"
else
""
end
end
-def exec_test(pathes)
- @count = 0
- @error = 0
- @errbuf = []
- @location = nil
- @columns = 0
- @width = pathes.map {|path| File.basename(path).size}.max + 2
+def load_test pathes
pathes.each do |path|
- @basename = File.basename(path)
- $stderr.printf("%s%-*s ", erase(@quiet), @width, @basename)
- $stderr.flush
- @columns = @width + 1
- $stderr.puts if @verbose
- count = @count
- error = @error
load File.expand_path(path)
- if @tty
- if @error == error
- msg = "PASS #{@count-count}"
- @columns += msg.size - 1
- $stderr.print "#{@progress_bs}#{@passed}#{msg}#{@reset}"
+ end
+end
+
+def concurrent_exec_test
+ aq = Queue.new
+ rq = Queue.new
+
+ ts = BT.wn.times.map do
+ Thread.new do
+ while as = aq.pop
+ as.call
+ rq << as
+ end
+ ensure
+ rq << nil
+ end
+ end
+
+ Assertion.all.to_a.shuffle.each do |path, assertions|
+ assertions.each do |as|
+ aq << as
+ end
+ end
+
+ BT.indent = 1
+ aq.close
+ i = 1
+ term_wn = 0
+ begin
+ while BT.wn != term_wn
+ if r = rq.pop
+ case
+ when BT.quiet
+ when BT.tty
+ $stderr.print "#{BT.progress_bs}#{BT.progress[(i+=1) % BT.progress.size]}"
+ else
+ BT.putc '.'
+ end
else
- msg = "FAIL #{@error-error}/#{@count-count}"
- $stderr.print "#{@progress_bs}#{@failed}#{msg}#{@reset}"
- @columns = 0
+ term_wn += 1
+ end
+ end
+ ensure
+ ts.each(&:kill)
+ ts.each(&:join)
+ end
+end
+
+def exec_test(pathes)
+ # setup
+ load_test pathes
+ BT_STATE.count = 0
+ BT_STATE.error = 0
+ BT.columns = 0
+ BT.width = pathes.map {|path| File.basename(path).size}.max + 2
+
+ # execute tests
+ if BT.wn > 1
+ concurrent_exec_test
+ else
+ prev_basename = nil
+ Assertion.all.each do |basename, assertions|
+ if !BT.quiet && basename != prev_basename
+ prev_basename = basename
+ $stderr.printf("%s%-*s ", erase(BT.quiet), BT.width, basename)
+ $stderr.flush
+ end
+ BT.columns = BT.width + 1
+ $stderr.puts if BT.verbose
+ count = BT_STATE.count
+ error = BT_STATE.error
+
+ assertions.each do |assertion|
+ BT_STATE.count += 1
+ assertion.call
+ end
+
+ if BT.tty
+ if BT_STATE.error == error
+ msg = "PASS #{BT_STATE.count-count}"
+ BT.columns += msg.size - 1
+ $stderr.print "#{BT.progress_bs}#{BT.passed}#{msg}#{BT.reset}" unless BT.quiet
+ else
+ msg = "FAIL #{BT_STATE.error-error}/#{BT_STATE.count-count}"
+ $stderr.print "#{BT.progress_bs}#{BT.failed}#{msg}#{BT.reset}"
+ BT.columns = 0
+ end
end
+ $stderr.puts if !BT.quiet and (BT.tty or BT_STATE.error == error)
end
- $stderr.puts unless @quiet and @tty and @error == error
end
- $stderr.print(erase) if @quiet
- @errbuf.each do |msg|
+
+ # show results
+ unless BT.quiet
+ $stderr.puts(erase)
+
+ sec = Time.now - $start_time
+ $stderr.puts "Finished in #{'%.2f' % sec} sec\n\n" if Assertion.count > 0
+ end
+
+ Assertion.errbuf.each do |msg|
$stderr.puts msg
end
- if @error == 0
- if @count == 0
- $stderr.puts "No tests, no problem"
+
+ out = BT.quiet ? $stdout : $stderr
+
+ if BT_STATE.error == 0
+ if Assertion.count == 0
+ out.puts "No tests, no problem" unless BT.quiet
else
- $stderr.puts "#{@passed}PASS#{@reset} all #{@count} tests"
+ out.puts "#{BT.passed}PASS#{BT.reset} all #{Assertion.count} tests"
end
- exit true
+ true
else
- $stderr.puts "#{@failed}FAIL#{@reset} #{@error}/#{@count} tests failed"
- exit false
+ $stderr.puts "#{BT.failed}FAIL#{BT.reset} #{BT_STATE.error}/#{BT_STATE.count} tests failed"
+ false
end
end
-def show_progress(message = '')
- if @verbose
- $stderr.print "\##{@count} #{@location} "
- elsif @tty
- $stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
- end
- t = Time.now if @verbose
- faildesc, errout = with_stderr {yield}
- t = Time.now - t if @verbose
- if !faildesc
- if @tty
- $stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
- elsif @verbose
- $stderr.printf(". %.3f\n", t)
+def target_platform
+ BT.platform or RUBY_PLATFORM
+end
+
+class Assertion < Struct.new(:src, :path, :lineno, :proc)
+ @count = 0
+ @all = Hash.new{|h, k| h[k] = []}
+ @errbuf = []
+
+ class << self
+ attr_reader :count, :errbuf
+
+ def all
+ @all
+ end
+
+ def add as
+ @all[as.path] << as
+ as.id = (@count += 1)
+ end
+ end
+
+ attr_accessor :id
+ attr_reader :err, :category
+
+ def initialize(*args)
+ super
+ self.class.add self
+ @category = self.path.match(/test_(.+)\.rb/)[1]
+ end
+
+ def call
+ self.proc.call self
+ end
+
+ def assert_check(message = '', opt = '', **argh)
+ show_progress(message) {
+ result = get_result_string(opt, **argh)
+ yield(result)
+ }
+ end
+
+ def with_stderr
+ out = err = nil
+ r, w = IO.pipe
+ @err = w
+ err_reader = Thread.new{ r.read }
+
+ begin
+ out = yield
+ ensure
+ w.close
+ err = err_reader.value
+ r.close rescue nil
+ end
+
+ return out, err
+ end
+
+ def show_error(msg, additional_message)
+ msg = "#{BT.failed}\##{self.id} #{self.path}:#{self.lineno}#{BT.reset}: #{msg} #{additional_message}"
+ if BT.tty
+ $stderr.puts "#{erase}#{msg}"
else
- $stderr.print '.'
+ Assertion.errbuf << msg
end
- else
- $stderr.print "#{@failed}F"
- $stderr.printf(" %.3f", t) if @verbose
- $stderr.print @reset
- $stderr.puts if @verbose
- error faildesc, message
- unless errout.empty?
- $stderr.print "#{@failed}stderr output is not empty#{@reset}\n", adjust_indent(errout)
+ BT_STATE.error += 1
+ end
+
+
+ def show_progress(message = '')
+ if BT.quiet || BT.wn > 1
+ # do nothing
+ elsif BT.verbose
+ $stderr.print "\##{@id} #{self.path}:#{self.lineno} "
+ elsif BT.tty
+ $stderr.print "#{BT.progress_bs}#{BT.progress[BT_STATE.count % BT.progress.size]}"
+ end
+
+ t = Time.now if BT.verbose
+ faildesc, errout = with_stderr {yield}
+ t = Time.now - t if BT.verbose
+
+ if !faildesc
+ # success
+ if BT.quiet || BT.wn > 1
+ # do nothing
+ elsif BT.tty
+ $stderr.print "#{BT.progress_bs}#{BT.progress[BT_STATE.count % BT.progress.size]}"
+ elsif BT.verbose
+ $stderr.printf(". %.3f\n", t)
+ else
+ BT.putc '.'
+ end
+ else
+ $stderr.print "#{BT.failed}F"
+ $stderr.printf(" %.3f", t) if BT.verbose
+ $stderr.print BT.reset
+ $stderr.puts if BT.verbose
+ show_error faildesc, message
+ unless errout.empty?
+ $stderr.print "#{BT.failed}stderr output is not empty#{BT.reset}\n", adjust_indent(errout)
+ end
+
+ if BT.tty and !BT.verbose and BT.wn == 1
+ $stderr.printf("%-*s%s", BT.width, path, BT.progress[BT_STATE.count % BT.progress.size])
+ end
end
- if @tty and !@verbose
- $stderr.printf("%-*s%s", @width, @basename, @progress[@count % @progress.size])
+ rescue Interrupt
+ $stderr.puts "\##{@id} #{path}:#{lineno}"
+ raise
+ rescue Exception => err
+ $stderr.print 'E'
+ $stderr.puts if BT.verbose
+ show_error err.message, message
+ ensure
+ begin
+ check_coredump
+ rescue CoreDumpError => err
+ $stderr.print 'E'
+ $stderr.puts if BT.verbose
+ show_error err.message, message
+ cleanup_coredump
end
end
-rescue Interrupt
- $stderr.puts "\##{@count} #{@location}"
- raise
-rescue Exception => err
- $stderr.print 'E'
- $stderr.puts if @verbose
- error err.message, message
-end
-def show_limit(testsrc, opt = '', **argh)
- result = get_result_string(testsrc, opt, **argh)
- if @tty and @verbose
- $stderr.puts ".{#@reset}\n#{erase}#{result}"
- else
- @errbuf.push result
+ def get_result_string(opt = '', **argh)
+ if BT.ruby
+ filename = make_srcfile(**argh)
+ begin
+ kw = self.err ? {err: self.err} : {}
+ out = IO.popen("#{BT.ruby} -W0 #{opt} #{filename}", **kw)
+ pid = out.pid
+ out.read.tap{ Process.waitpid(pid); out.close }
+ ensure
+ raise Interrupt if $? and $?.signaled? && $?.termsig == Signal.list["INT"]
+
+ begin
+ Process.kill :KILL, pid
+ rescue Errno::ESRCH
+ # OK
+ end
+ end
+ else
+ eval(src).to_s
+ end
+ end
+
+ def make_srcfile(frozen_string_literal: nil)
+ filename = "bootstraptest.#{self.path}_#{self.lineno}_#{self.id}.rb"
+ File.open(filename, 'w') {|f|
+ f.puts "#frozen_string_literal:true" if frozen_string_literal
+ f.puts "GC.stress = true" if $stress
+ f.puts "print(begin; #{self.src}; end)"
+ }
+ filename
end
end
-def assert_check(testsrc, message = '', opt = '', **argh)
- show_progress(message) {
- result = get_result_string(testsrc, opt, **argh)
- check_coredump
- yield(result)
- }
+def add_assertion src, pr
+ loc = caller_locations(2, 1).first
+ lineno = loc.lineno
+ path = File.basename(loc.path)
+
+ Assertion.new(src, path, lineno, pr)
end
def assert_equal(expected, testsrc, message = '', opt = '', **argh)
- newtest
- assert_check(testsrc, message, opt, **argh) {|result|
- if expected == result
- nil
- else
- desc = "#{result.inspect} (expected #{expected.inspect})"
- pretty(testsrc, desc, result)
- end
- }
+ add_assertion testsrc, -> as do
+ as.assert_check(message, opt, **argh) {|result|
+ if expected == result
+ nil
+ else
+ desc = "#{result.inspect} (expected #{expected.inspect})"
+ pretty(testsrc, desc, result)
+ end
+ }
+ end
end
def assert_match(expected_pattern, testsrc, message = '')
- newtest
- assert_check(testsrc, message) {|result|
- if expected_pattern =~ result
- nil
- else
- desc = "#{expected_pattern.inspect} expected to be =~\n#{result.inspect}"
- pretty(testsrc, desc, result)
- end
- }
+ add_assertion testsrc, -> as do
+ as.assert_check(message) {|result|
+ if expected_pattern =~ result
+ nil
+ else
+ desc = "#{expected_pattern.inspect} expected to be =~\n#{result.inspect}"
+ pretty(testsrc, desc, result)
+ end
+ }
+ end
end
def assert_not_match(unexpected_pattern, testsrc, message = '')
- newtest
- assert_check(testsrc, message) {|result|
- if unexpected_pattern !~ result
- nil
- else
- desc = "#{unexpected_pattern.inspect} expected to be !~\n#{result.inspect}"
- pretty(testsrc, desc, result)
- end
- }
+ add_assertion testsrc, -> as do
+ as.assert_check(message) {|result|
+ if unexpected_pattern !~ result
+ nil
+ else
+ desc = "#{unexpected_pattern.inspect} expected to be !~\n#{result.inspect}"
+ pretty(testsrc, desc, result)
+ end
+ }
+ end
end
def assert_valid_syntax(testsrc, message = '')
- newtest
- assert_check(testsrc, message, '-c') {|result|
- result if /Syntax OK/ !~ result
- }
+ add_assertion testsrc, -> as do
+ as.assert_check(message, '-c') {|result|
+ result if /Syntax OK/ !~ result
+ }
+ end
end
def assert_normal_exit(testsrc, *rest, timeout: nil, **opt)
- newtest
- message, ignore_signals = rest
- message ||= ''
- show_progress(message) {
- faildesc = nil
- filename = make_srcfile(testsrc)
- old_stderr = $stderr.dup
- timeout_signaled = false
- begin
- $stderr.reopen("assert_normal_exit.log", "w")
- io = IO.popen("#{@ruby} -W0 #{filename}")
- pid = io.pid
- th = Thread.new {
- io.read
- io.close
- $?
- }
- if !th.join(timeout)
- Process.kill :KILL, pid
- timeout_signaled = true
- end
- status = th.value
- ensure
- $stderr.reopen(old_stderr)
- old_stderr.close
- end
- if status && status.signaled?
- signo = status.termsig
- signame = Signal.list.invert[signo]
- unless ignore_signals and ignore_signals.include?(signame)
- sigdesc = "signal #{signo}"
- if signame
- sigdesc = "SIG#{signame} (#{sigdesc})"
- end
- if timeout_signaled
- sigdesc << " (timeout)"
+ add_assertion testsrc, -> as do
+ message, ignore_signals = rest
+ message ||= ''
+ as.show_progress(message) {
+ faildesc = nil
+ filename = as.make_srcfile
+ timeout_signaled = false
+ logfile = "assert_normal_exit.#{as.path}.#{as.lineno}.log"
+
+ begin
+ err = open(logfile, "w")
+ io = IO.popen("#{BT.ruby} -W0 #{filename}", err: err)
+ pid = io.pid
+ th = Thread.new {
+ io.read
+ io.close
+ $?
+ }
+ if !th.join(timeout)
+ Process.kill :KILL, pid
+ timeout_signaled = true
end
- faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
- stderr_log = File.read("assert_normal_exit.log")
- if !stderr_log.empty?
- faildesc << "\n" if /\n\z/ !~ faildesc
- stderr_log << "\n" if /\n\z/ !~ stderr_log
- stderr_log.gsub!(/^.*\n/) { '| ' + $& }
- faildesc << stderr_log
+ status = th.value
+ ensure
+ err.close
+ end
+ if status && status.signaled?
+ signo = status.termsig
+ signame = Signal.list.invert[signo]
+ unless ignore_signals and ignore_signals.include?(signame)
+ sigdesc = "signal #{signo}"
+ if signame
+ sigdesc = "SIG#{signame} (#{sigdesc})"
+ end
+ if timeout_signaled
+ sigdesc << " (timeout)"
+ end
+ faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
+ stderr_log = File.read(logfile)
+ if !stderr_log.empty?
+ faildesc << "\n" if /\n\z/ !~ faildesc
+ stderr_log << "\n" if /\n\z/ !~ stderr_log
+ stderr_log.gsub!(/^.*\n/) { '| ' + $& }
+ faildesc << stderr_log
+ end
end
end
- end
- faildesc
- }
+ faildesc
+ }
+ end
end
def assert_finish(timeout_seconds, testsrc, message = '')
- if RubyVM.const_defined? :MJIT
- timeout_seconds *= 3 if RubyVM::MJIT.enabled? # for --jit-wait
- end
- newtest
- show_progress(message) {
- faildesc = nil
- filename = make_srcfile(testsrc)
- io = IO.popen("#{@ruby} -W0 #{filename}")
- pid = io.pid
- waited = false
- tlimit = Time.now + timeout_seconds
- diff = timeout_seconds
- while diff > 0
- if Process.waitpid pid, Process::WNOHANG
- waited = true
- break
- end
- if io.respond_to?(:read_nonblock)
- if IO.select([io], nil, nil, diff)
- begin
- io.read_nonblock(1024)
- rescue Errno::EAGAIN, IO::WaitReadable, EOFError
- break
- end while true
+ add_assertion testsrc, -> as do
+ if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # for --jit-wait
+ timeout_seconds *= 3
+ end
+
+ as.show_progress(message) {
+ faildesc = nil
+ filename = as.make_srcfile
+ io = IO.popen("#{BT.ruby} -W0 #{filename}", err: as.err)
+ pid = io.pid
+ waited = false
+ tlimit = Time.now + timeout_seconds
+ diff = timeout_seconds
+ while diff > 0
+ if Process.waitpid pid, Process::WNOHANG
+ waited = true
+ break
end
- else
- sleep 0.1
+ if io.respond_to?(:read_nonblock)
+ if IO.select([io], nil, nil, diff)
+ begin
+ io.read_nonblock(1024)
+ rescue Errno::EAGAIN, IO::WaitReadable, EOFError
+ break
+ end while true
+ end
+ else
+ sleep 0.1
+ end
+ diff = tlimit - Time.now
end
- diff = tlimit - Time.now
- end
- if !waited
- Process.kill(:KILL, pid)
- Process.waitpid pid
- faildesc = pretty(testsrc, "not finished in #{timeout_seconds} seconds", nil)
- end
- io.close
- faildesc
- }
+ if !waited
+ Process.kill(:KILL, pid)
+ Process.waitpid pid
+ faildesc = pretty(testsrc, "not finished in #{timeout_seconds} seconds", nil)
+ end
+ io.close
+ faildesc
+ }
+ end
end
def flunk(message = '')
- newtest
- show_progress('') { message }
+ add_assertion '', -> as do
+ as.show_progress('') { message }
+ end
+end
+
+def show_limit(testsrc, opt = '', **argh)
+ return if BT.quiet
+
+ add_assertion testsrc, -> as do
+ result = as.get_result_string(opt, **argh)
+ Assertion.errbuf << result
+ end
end
def pretty(src, desc, result)
@@ -436,67 +740,6 @@ def untabify(str)
str.gsub(/^\t+/) {' ' * (8 * $&.size) }
end
-def make_srcfile(src, frozen_string_literal: nil)
- filename = 'bootstraptest.tmp.rb'
- File.open(filename, 'w') {|f|
- f.puts "#frozen_string_literal:true" if frozen_string_literal
- f.puts "GC.stress = true" if $stress
- f.puts "print(begin; #{src}; end)"
- }
- filename
-end
-
-def get_result_string(src, opt = '', **argh)
- if @ruby
- filename = make_srcfile(src, **argh)
- begin
- `#{@ruby} -W0 #{opt} #{filename}`
- ensure
- raise Interrupt if $? and $?.signaled? && $?.termsig == Signal.list["INT"]
- raise CoreDumpError, "core dumped" if $? and $?.coredump?
- end
- else
- eval(src).to_s
- end
-end
-
-def with_stderr
- out = err = nil
- begin
- r, w = IO.pipe
- stderr = $stderr.dup
- $stderr.reopen(w)
- w.close
- reader = Thread.start {r.read}
- begin
- out = yield
- ensure
- $stderr.reopen(stderr)
- err = reader.value
- end
- ensure
- w.close rescue nil
- r.close rescue nil
- end
- return out, err
-end
-
-def newtest
- @location = File.basename(caller(2).first)
- @count += 1
- cleanup_coredump
-end
-
-def error(msg, additional_message)
- msg = "#{@failed}\##{@count} #{@location}#{@reset}: #{msg} #{additional_message}"
- if @tty
- $stderr.puts "#{erase}#{msg}"
- else
- @errbuf.push msg
- end
- @error += 1
-end
-
def in_temporary_working_directory(dir)
if dir
Dir.mkdir dir
@@ -513,18 +756,32 @@ def in_temporary_working_directory(dir)
end
def cleanup_coredump
- FileUtils.rm_f 'core'
+ if File.file?('core')
+ require 'time'
+ Dir.glob('/tmp/bootstraptest-core.*').each do |f|
+ if Time.now - File.mtime(f) > 7 * 24 * 60 * 60 # 7 days
+ warn "Deleting an old core file: #{f}"
+ FileUtils.rm(f)
+ end
+ end
+ core_path = "/tmp/bootstraptest-core.#{Time.now.utc.iso8601}"
+ warn "A core file is found. Saving it at: #{core_path.dump}"
+ FileUtils.mv('core', core_path)
+ cmd = ['gdb', BT.ruby, '-c', core_path, '-ex', 'bt', '-batch']
+ p cmd # debugging why it's not working
+ system(*cmd)
+ end
FileUtils.rm_f Dir.glob('core.*')
- FileUtils.rm_f @ruby+'.stackdump' if @ruby
+ FileUtils.rm_f BT.ruby+'.stackdump' if BT.ruby
end
class CoreDumpError < StandardError; end
def check_coredump
if File.file?('core') or not Dir.glob('core.*').empty? or
- (@ruby and File.exist?(@ruby+'.stackdump'))
+ (BT.ruby and File.exist?(BT.ruby+'.stackdump'))
raise CoreDumpError, "core dumped"
end
end
-main
+exit main
diff --git a/bootstraptest/test_attr.rb b/bootstraptest/test_attr.rb
index 721a847145..3cb9d3eb39 100644
--- a/bootstraptest/test_attr.rb
+++ b/bootstraptest/test_attr.rb
@@ -34,3 +34,19 @@ assert_equal %{ok}, %{
print "ok"
end
}, '[ruby-core:15120]'
+
+assert_equal %{ok}, %{
+ class Big
+ attr_reader :foo
+ def initialize
+ @foo = "ok"
+ end
+ end
+
+ obj = Big.new
+ 100.times do |i|
+ obj.instance_variable_set(:"@ivar_\#{i}", i)
+ end
+
+ Big.new.foo
+}
diff --git a/bootstraptest/test_autoload.rb b/bootstraptest/test_autoload.rb
index a9f8e6dacd..9e0850bc52 100644
--- a/bootstraptest/test_autoload.rb
+++ b/bootstraptest/test_autoload.rb
@@ -1,7 +1,7 @@
assert_equal 'ok', %q{
- File.unlink('zzz.rb') if File.file?('zzz.rb')
+ File.unlink('zzz1.rb') if File.file?('zzz1.rb')
instance_eval do
- autoload :ZZZ, './zzz.rb'
+ autoload :ZZZ, './zzz1.rb'
begin
ZZZ
rescue LoadError
@@ -11,9 +11,9 @@ assert_equal 'ok', %q{
}, '[ruby-dev:43816]'
assert_equal 'ok', %q{
- open('zzz.rb', 'w') {|f| f.puts '' }
+ open('zzz2.rb', 'w') {|f| f.puts '' }
instance_eval do
- autoload :ZZZ, './zzz.rb'
+ autoload :ZZZ, './zzz2.rb'
begin
ZZZ
rescue NameError
@@ -23,29 +23,29 @@ assert_equal 'ok', %q{
}, '[ruby-dev:43816]'
assert_equal 'ok', %q{
- open('zzz.rb', 'w') {|f| f.puts 'class ZZZ; def self.ok;:ok;end;end'}
+ open('zzz3.rb', 'w') {|f| f.puts 'class ZZZ; def self.ok;:ok;end;end'}
instance_eval do
- autoload :ZZZ, './zzz.rb'
+ autoload :ZZZ, './zzz3.rb'
ZZZ.ok
end
}, '[ruby-dev:43816]'
assert_equal 'ok', %q{
- open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
- autoload :ZZZ, "./zzz.rb"
+ open("zzz4.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz4.rb"
ZZZ.ok
}
assert_equal 'ok', %q{
- open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
- autoload :ZZZ, "./zzz.rb"
- require "./zzz.rb"
+ open("zzz5.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz5.rb"
+ require "./zzz5.rb"
ZZZ.ok
}
assert_equal 'okok', %q{
- open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
- autoload :ZZZ, "./zzz.rb"
+ open("zzz6.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz6.rb"
t1 = Thread.new {ZZZ.ok}
t2 = Thread.new {ZZZ.ok}
[t1.value, t2.value].join
@@ -60,9 +60,9 @@ assert_finish 5, %q{
}, '[ruby-core:21696]'
assert_equal 'A::C', %q{
- open("zzz.rb", "w") {}
+ open("zzz7.rb", "w") {}
class A
- autoload :C, "./zzz"
+ autoload :C, "./zzz7"
class C
end
C
diff --git a/bootstraptest/test_constant_cache.rb b/bootstraptest/test_constant_cache.rb
new file mode 100644
index 0000000000..1fa83256ed
--- /dev/null
+++ b/bootstraptest/test_constant_cache.rb
@@ -0,0 +1,187 @@
+# Constant lookup is cached.
+assert_equal '1', %q{
+ CONST = 1
+
+ def const
+ CONST
+ end
+
+ const
+ const
+}
+
+# Invalidate when a constant is set.
+assert_equal '2', %q{
+ CONST = 1
+
+ def const
+ CONST
+ end
+
+ const
+
+ CONST = 2
+
+ const
+}
+
+# Invalidate when a constant of the same name is set.
+assert_equal '1', %q{
+ CONST = 1
+
+ def const
+ CONST
+ end
+
+ const
+
+ class Container
+ CONST = 2
+ end
+
+ const
+}
+
+# Invalidate when a constant is removed.
+assert_equal 'missing', %q{
+ class Container
+ CONST = 1
+
+ def const
+ CONST
+ end
+
+ def self.const_missing(name)
+ 'missing'
+ end
+
+ new.const
+ remove_const :CONST
+ end
+
+ Container.new.const
+}
+
+# Invalidate when a constant's visibility changes.
+assert_equal 'missing', %q{
+ class Container
+ CONST = 1
+
+ def self.const_missing(name)
+ 'missing'
+ end
+ end
+
+ def const
+ Container::CONST
+ end
+
+ const
+
+ Container.private_constant :CONST
+
+ const
+}
+
+# Invalidate when a constant's visibility changes even if the call to the
+# visibility change method fails.
+assert_equal 'missing', %q{
+ class Container
+ CONST1 = 1
+
+ def self.const_missing(name)
+ 'missing'
+ end
+ end
+
+ def const1
+ Container::CONST1
+ end
+
+ const1
+
+ begin
+ Container.private_constant :CONST1, :CONST2
+ rescue NameError
+ end
+
+ const1
+}
+
+# Invalidate when a module is included.
+assert_equal 'INCLUDE', %q{
+ module Include
+ CONST = :INCLUDE
+ end
+
+ class Parent
+ CONST = :PARENT
+ end
+
+ class Child < Parent
+ def const
+ CONST
+ end
+
+ new.const
+
+ include Include
+ end
+
+ Child.new.const
+}
+
+# Invalidate when const_missing is hit.
+assert_equal '2', %q{
+ module Container
+ Foo = 1
+ Bar = 2
+
+ class << self
+ attr_accessor :count
+
+ def const_missing(name)
+ @count += 1
+ @count == 1 ? Foo : Bar
+ end
+ end
+
+ @count = 0
+ end
+
+ def const
+ Container::Baz
+ end
+
+ const
+ const
+}
+
+# Invalidate when the iseq gets cleaned up.
+assert_equal '2', %q{
+ CONSTANT = 1
+
+ iseq = RubyVM::InstructionSequence.compile(<<~RUBY)
+ CONSTANT
+ RUBY
+
+ iseq.eval
+ iseq = nil
+
+ GC.start
+ CONSTANT = 2
+}
+
+# Invalidate when the iseq gets cleaned up even if it was never in the cache.
+assert_equal '2', %q{
+ CONSTANT = 1
+
+ iseq = RubyVM::InstructionSequence.compile(<<~RUBY)
+ CONSTANT
+ RUBY
+
+ iseq = nil
+
+ GC.start
+ CONSTANT = 2
+}
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb
index fa04323b7f..a9f389c673 100644
--- a/bootstraptest/test_eval.rb
+++ b/bootstraptest/test_eval.rb
@@ -116,6 +116,33 @@ assert_equal %q{1}, %q{
Const
}
}
+assert_equal %q{1}, %q{
+ class TrueClass
+ Const = 1
+ end
+ true.instance_eval %{
+ Const
+ }
+}
+assert_equal %q{[:Const]}, %q{
+ mod = Module.new
+ mod.instance_eval %{
+ Const = 1
+ }
+ raise if defined?(Module::Const)
+ mod.singleton_class.constants
+}
+assert_equal %q{can't define singleton}, %q{
+ begin
+ 123.instance_eval %{
+ Const = 1
+ }
+ "bad"
+ rescue TypeError => e
+ raise "bad" if defined?(Integer::Const)
+ e.message
+ end
+}
assert_equal %q{top}, %q{
Const = :top
class C
@@ -191,7 +218,7 @@ assert_equal %q{[10, main]}, %q{
%w[break next redo].each do |keyword|
assert_match %r"Can't escape from eval with #{keyword}\b", %{
- STDERR.reopen(STDOUT)
+ $stderr = STDOUT
begin
eval "0 rescue #{keyword}"
rescue SyntaxError => e
@@ -201,7 +228,7 @@ assert_equal %q{[10, main]}, %q{
end
assert_normal_exit %q{
- STDERR.reopen(STDOUT)
+ $stderr = STDOUT
class Foo
def self.add_method
class_eval("def some-bad-name; puts 'hello' unless @some_variable.some_function(''); end")
@@ -250,7 +277,9 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
begin
- 12.instance_eval { @@a }
+ class A
+ 12.instance_eval { @@a }
+ end
rescue NameError
:ok
end
@@ -258,7 +287,9 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
begin
- 12.instance_exec { @@a }
+ class A
+ 12.instance_exec { @@a }
+ end
rescue NameError
:ok
end
diff --git a/bootstraptest/test_fiber.rb b/bootstraptest/test_fiber.rb
index 35e1bf6851..2614dd13bf 100644
--- a/bootstraptest/test_fiber.rb
+++ b/bootstraptest/test_fiber.rb
@@ -19,12 +19,12 @@ assert_equal %q{ok}, %q{
}
assert_equal %q{ok}, %q{
- 10_000.times.collect{Fiber.new{}}
+ 100.times.collect{Fiber.new{}}
:ok
}
assert_equal %q{ok}, %q{
- fibers = 100.times.collect{Fiber.new{Fiber.yield}}
+ fibers = 1000.times.collect{Fiber.new{Fiber.yield}}
fibers.each(&:resume)
fibers.each(&:resume)
:ok
diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb
index 9da6d45cbd..35f19db588 100644
--- a/bootstraptest/test_flow.rb
+++ b/bootstraptest/test_flow.rb
@@ -534,11 +534,11 @@ assert_equal %Q{ENSURE\n}, %q{
['[ruby-core:39125]', %q{
class Bug5234
include Enumerable
- def each
+ def each(&block)
begin
yield :foo
ensure
- proc
+ proc(&block)
end
end
end
@@ -547,11 +547,11 @@ assert_equal %Q{ENSURE\n}, %q{
['[ruby-dev:45656]', %q{
class Bug6460
include Enumerable
- def each
+ def each(&block)
begin
yield :foo
ensure
- 1.times { Proc.new }
+ 1.times { Proc.new(&block) }
end
end
end
diff --git a/bootstraptest/test_insns.rb b/bootstraptest/test_insns.rb
index 1269d7d013..91fba9b011 100644
--- a/bootstraptest/test_insns.rb
+++ b/bootstraptest/test_insns.rb
@@ -64,8 +64,8 @@ tests = [
[ 'setinstancevariable', %q{ @x = true }, ],
[ 'getinstancevariable', %q{ @x = true; @x }, ],
- [ 'setclassvariable', %q{ @@x = true }, ],
- [ 'getclassvariable', %q{ @@x = true; @@x }, ],
+ [ 'setclassvariable', %q{ class A; @@x = true; end }, ],
+ [ 'getclassvariable', %q{ class A; @@x = true; @@x end }, ],
[ 'setconstant', %q{ X = true }, ],
[ 'setconstant', %q{ Object::X = true }, ],
@@ -86,11 +86,8 @@ tests = [
[ 'putobject', %q{ /(?<x>x)/ =~ "x"; x == "x" }, ],
[ 'putspecialobject', %q{ {//=>true}[//] }, ],
- [ 'putiseq', %q{ -> { true }.() }, ],
[ 'putstring', %q{ "true" }, ],
[ 'tostring / concatstrings', %q{ "#{true}" }, ],
- [ 'freezestring', %q{ "#{true}" }, fsl, ],
- [ 'freezestring', %q{ "#{true}" }, '-d', fsl, ],
[ 'toregexp', %q{ /#{true}/ =~ "true" && $~ }, ],
[ 'intern', %q{ :"#{true}" }, ],
@@ -123,6 +120,7 @@ tests = [
[ 'dup', %q{ x = y = true; x }, ],
[ 'dupn', %q{ Object::X ||= true }, ],
[ 'reverse', %q{ q, (w, e), r = 1, [2, 3], 4; e == 3 }, ],
+ [ 'swap', %q{ !!defined?([[]]) }, ],
[ 'swap', <<-'},', ], # {
x = [[false, true]]
for i, j in x # here
@@ -387,14 +385,13 @@ tests = [
[ 'opt_empty_p', %q{ ''.empty? }, ],
[ 'opt_empty_p', %q{ [].empty? }, ],
[ 'opt_empty_p', %q{ {}.empty? }, ],
- [ 'opt_empty_p', %q{ Queue.new.empty? }, ],
+ [ 'opt_empty_p', %q{ Thread::Queue.new.empty? }, ],
[ 'opt_succ', %q{ 1.succ == 2 }, ],
if defined? $FIXNUM_MAX then
[ 'opt_succ',%Q{ #{ $FIXNUM_MAX }.succ == #{ $FIXNUM_MAX + 1 } }, ]
end,
[ 'opt_succ', %q{ '1'.succ == '2' }, ],
- [ 'opt_succ', %q{ x = Time.at(0); x.succ == Time.at(1) }, ],
[ 'opt_not', %q{ ! false }, ],
[ 'opt_neq', <<-'},', ], # {
@@ -412,8 +409,6 @@ tests = [
class String; def =~ other; true; end; end
'true' =~ /true/
},
-
- [ 'opt_call_c_function', 'Struct.new(:x).new.x = true', ],
]
# normal path
@@ -438,3 +433,8 @@ tests.compact.each {|(insn, expr, *a)|
assert_equal 'true', progn, 'trace_' + insn, *a
end
}
+
+assert_normal_exit("#{<<-"begin;"}\n#{<<-'end;'}")
+begin;
+ RubyVM::InstructionSequence.compile("", debug_level: 5)
+end;
diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb
index 89c00d0b88..666e5a011b 100644
--- a/bootstraptest/test_io.rb
+++ b/bootstraptest/test_io.rb
@@ -1,3 +1,4 @@
+/freebsd/ =~ RUBY_PLATFORM or
assert_finish 5, %q{
r, w = IO.pipe
t1 = Thread.new { r.sysread(1) }
@@ -30,7 +31,8 @@ assert_finish 10, %q{
end
}, '[ruby-dev:32566]'
-assert_finish 1, %q{
+/freebsd/ =~ RUBY_PLATFORM or
+assert_finish 5, %q{
r, w = IO.pipe
Thread.new {
w << "ab"
@@ -83,6 +85,7 @@ assert_normal_exit %q{
ARGF.set_encoding "foo"
}
+/freebsd/ =~ RUBY_PLATFORM or
10.times do
assert_normal_exit %q{
at_exit { p :foo }
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb
index 7944915862..d07c47a56d 100644
--- a/bootstraptest/test_jump.rb
+++ b/bootstraptest/test_jump.rb
@@ -147,7 +147,7 @@ assert_equal %q{131}, %q{
}
}
assert_match %r{Invalid retry}, %q{
-STDERR.reopen(STDOUT)
+$stderr = STDOUT
begin
eval %q{
1.times{
@@ -296,14 +296,19 @@ assert_equal "true", %q{
s.return_eigenclass == class << s; self; end
}, '[ruby-core:21379]'
-assert_equal "true", %q{
- class Object
- def yield_eigenclass
- class << self
- yield self
+assert_match %r{Invalid yield}, %q{
+$stderr = STDOUT
+begin
+ eval %q{
+ class Object
+ def yield_eigenclass
+ class << self
+ yield self
+ end
end
end
- end
- s = "foo"
- s.yield_eigenclass {|c| c == class << s; self; end }
-}, '[ruby-dev:40975]'
+ }
+rescue SyntaxError => e
+ e.message
+end
+}
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index 9b3c10d519..a0d4ee08c6 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -65,8 +65,11 @@ assert_equal ':a3c', ':"a#{1+2}c".inspect'
assert_equal 'Symbol', ':"a#{1+2}c".class'
# xstring
-assert_equal "foo\n", %q(`echo foo`)
-assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
+# WASI doesn't support spawning a new process for now.
+if /wasi/ !~ target_platform
+ assert_equal "foo\n", %q(`echo foo`)
+ assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
+end
# regexp
assert_equal '', '//.source'
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 3462aa9434..04c9eb2d11 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -22,7 +22,7 @@ assert_match /\Awrong number of arguments \(.*\b0\b.* 1\)\z/, %q{
}
# default argument
-assert_equal '1', 'def m(x=1) x end; m()'
+assert_equal '1', 'def m(x=1) x end; m();'
assert_equal '1', 'def m(x=7) x end; m(1)'
assert_equal '1', 'def m(a,x=1) x end; m(7)'
assert_equal '1', 'def m(a,x=7) x end; m(7,1)'
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb
index 1e384411dc..637603243d 100644
--- a/bootstraptest/test_proc.rb
+++ b/bootstraptest/test_proc.rb
@@ -225,19 +225,6 @@ assert_equal %q{[[nil, []], [1, []], [1, [2]], [1, [2, 3]]]}, %q{
]
}
assert_equal %q{1}, %q{
- pr = proc{
- $SAFE
- }
- $SAFE = 1
- pr.call
-}
-assert_equal %q{[1, 1]}, %q{
- pr = proc{
- $SAFE += 1
- }
- [pr.call, $SAFE]
-}
-assert_equal %q{1}, %q{
def m(&b)
b
end
@@ -380,8 +367,8 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
class Foo
- def call_it
- p = Proc.new
+ def call_it(&block)
+ p = Proc.new(&block)
p.call
end
end
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
new file mode 100644
index 0000000000..67e66b03ee
--- /dev/null
+++ b/bootstraptest/test_ractor.rb
@@ -0,0 +1,1628 @@
+# Ractor.current returns a current ractor
+assert_equal 'Ractor', %q{
+ Ractor.current.class
+}
+
+# Ractor.new returns new Ractor
+assert_equal 'Ractor', %q{
+ Ractor.new{}.class
+}
+
+# Ractor.allocate is not supported
+assert_equal "[:ok, :ok]", %q{
+ rs = []
+ begin
+ Ractor.allocate
+ rescue => e
+ rs << :ok if e.message == 'allocator undefined for Ractor'
+ end
+
+ begin
+ Ractor.new{}.dup
+ rescue
+ rs << :ok if e.message == 'allocator undefined for Ractor'
+ end
+
+ rs
+}
+
+# A Ractor can have a name
+assert_equal 'test-name', %q{
+ r = Ractor.new name: 'test-name' do
+ end
+ r.name
+}
+
+# If Ractor doesn't have a name, Ractor#name returns nil.
+assert_equal 'nil', %q{
+ r = Ractor.new do
+ end
+ r.name.inspect
+}
+
+# Raises exceptions if initialize with an invalid name
+assert_equal 'ok', %q{
+ begin
+ r = Ractor.new(name: [{}]) {}
+ rescue TypeError => e
+ 'ok'
+ end
+}
+
+# Ractor.new must call with a block
+assert_equal "must be called with a block", %q{
+ begin
+ Ractor.new
+ rescue ArgumentError => e
+ e.message
+ end
+}
+
+# Ractor#inspect
+# Return only id and status for main ractor
+assert_equal "#<Ractor:#1 running>", %q{
+ Ractor.current.inspect
+}
+
+# Return id, loc, and status for no-name ractor
+assert_match /^#<Ractor:#([^ ]*?) .+:[0-9]+ terminated>$/, %q{
+ r = Ractor.new { '' }
+ r.take
+ sleep 0.1 until r.inspect =~ /terminated/
+ r.inspect
+}
+
+# Return id, name, loc, and status for named ractor
+assert_match /^#<Ractor:#([^ ]*?) Test Ractor .+:[0-9]+ terminated>$/, %q{
+ r = Ractor.new(name: 'Test Ractor') { '' }
+ r.take
+ sleep 0.1 until r.inspect =~ /terminated/
+ r.inspect
+}
+
+# A return value of a Ractor block will be a message from the Ractor.
+assert_equal 'ok', %q{
+ # join
+ r = Ractor.new do
+ 'ok'
+ end
+ r.take
+}
+
+# Passed arguments to Ractor.new will be a block parameter
+# The values are passed with Ractor-communication pass.
+assert_equal 'ok', %q{
+ # ping-pong with arg
+ r = Ractor.new 'ok' do |msg|
+ msg
+ end
+ r.take
+}
+
+# Pass multiple arguments to Ractor.new
+assert_equal 'ok', %q{
+ # ping-pong with two args
+ r = Ractor.new 'ping', 'pong' do |msg, msg2|
+ [msg, msg2]
+ end
+ 'ok' if r.take == ['ping', 'pong']
+}
+
+# Ractor#send passes an object with copy to a Ractor
+# and Ractor.receive in the Ractor block can receive the passed value.
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ msg = Ractor.receive
+ end
+ r.send 'ok'
+ r.take
+}
+
+# Ractor#receive_if can filter the message
+assert_equal '[2, 3, 1]', %q{
+ r = Ractor.new Ractor.current do |main|
+ main << 1
+ main << 2
+ main << 3
+ end
+ a = []
+ a << Ractor.receive_if{|msg| msg == 2}
+ a << Ractor.receive_if{|msg| msg == 3}
+ a << Ractor.receive
+}
+
+# Ractor#receive_if with break
+assert_equal '[2, [1, :break], 3]', %q{
+ r = Ractor.new Ractor.current do |main|
+ main << 1
+ main << 2
+ main << 3
+ end
+
+ a = []
+ a << Ractor.receive_if{|msg| msg == 2}
+ a << Ractor.receive_if{|msg| break [msg, :break]}
+ a << Ractor.receive
+}
+
+# Ractor#receive_if can't be called recursively
+assert_equal '[[:e1, 1], [:e2, 2]]', %q{
+ r = Ractor.new Ractor.current do |main|
+ main << 1
+ main << 2
+ main << 3
+ end
+
+ a = []
+
+ Ractor.receive_if do |msg|
+ begin
+ Ractor.receive
+ rescue Ractor::Error
+ a << [:e1, msg]
+ end
+ true # delete 1 from queue
+ end
+
+ Ractor.receive_if do |msg|
+ begin
+ Ractor.receive_if{}
+ rescue Ractor::Error
+ a << [:e2, msg]
+ end
+ true # delete 2 from queue
+ end
+
+ a #
+}
+
+# dtoa race condition
+assert_equal '[:ok, :ok, :ok]', %q{
+ n = 3
+ n.times.map{
+ Ractor.new{
+ 10_000.times{ rand.to_s }
+ :ok
+ }
+ }.map(&:take)
+}
+
+# Ractor.make_shareable issue for locals in proc [Bug #18023]
+assert_equal '[:a, :b, :c, :d, :e]', %q{
+ v1, v2, v3, v4, v5 = :a, :b, :c, :d, :e
+ closure = Ractor.current.instance_eval{ Proc.new { [v1, v2, v3, v4, v5] } }
+
+ Ractor.make_shareable(closure).call
+}
+
+# Ractor.make_shareable issue for locals in proc [Bug #18023]
+assert_equal '[:a, :b, :c, :d, :e, :f, :g]', %q{
+ a = :a
+ closure = Ractor.current.instance_eval do
+ -> {
+ b, c, d = :b, :c, :d
+ -> {
+ e, f, g = :e, :f, :g
+ -> { [a, b, c, d, e, f, g] }
+ }.call
+ }.call
+ end
+
+ Ractor.make_shareable(closure).call
+}
+
+# Now autoload in non-main Ractor is not supported
+assert_equal 'ok', %q{
+ autoload :Foo, 'foo.rb'
+ r = Ractor.new do
+ p Foo
+ rescue Ractor::UnsafeError
+ :ok
+ end
+ r.take
+}
+
+###
+###
+# Ractor still has several memory corruption so skip huge number of tests
+if ENV['GITHUB_WORKFLOW'] &&
+ ENV['GITHUB_WORKFLOW'] == 'Compilations'
+ # ignore the follow
+else
+
+# Ractor.select(*ractors) receives a values from a ractors.
+# It is similar to select(2) and Go's select syntax.
+# The return value is [ch, received_value]
+assert_equal 'ok', %q{
+ # select 1
+ r1 = Ractor.new{'r1'}
+ r, obj = Ractor.select(r1)
+ 'ok' if r == r1 and obj == 'r1'
+}
+
+# Ractor.select from two ractors.
+assert_equal '["r1", "r2"]', %q{
+ # select 2
+ r1 = Ractor.new{'r1'}
+ r2 = Ractor.new{'r2'}
+ rs = [r1, r2]
+ as = []
+ r, obj = Ractor.select(*rs)
+ rs.delete(r)
+ as << obj
+ r, obj = Ractor.select(*rs)
+ as << obj
+ as.sort #=> ["r1", "r2"]
+}
+
+# Ractor.select from multiple ractors.
+assert_equal 30.times.map { 'ok' }.to_s, %q{
+ def test n
+ rs = (1..n).map do |i|
+ Ractor.new(i) do |i|
+ "r#{i}"
+ end
+ end
+ as = []
+ all_rs = rs.dup
+
+ n.times{
+ r, obj = Ractor.select(*rs)
+ as << [r, obj]
+ rs.delete(r)
+ }
+
+ if as.map{|r, o| r.object_id}.sort == all_rs.map{|r| r.object_id}.sort &&
+ as.map{|r, o| o}.sort == (1..n).map{|i| "r#{i}"}.sort
+ 'ok'
+ else
+ 'ng'
+ end
+ end
+
+ 30.times.map{|i|
+ test i
+ }
+} unless ENV['RUN_OPTS'] =~ /--mjit-call-threshold=5/ || # This always fails with --mjit-wait --mjit-call-threshold=5
+ (ENV.key?('TRAVIS') && ENV['TRAVIS_CPU_ARCH'] == 'arm64') || # https://bugs.ruby-lang.org/issues/17878
+ true # too flaky everywhere http://ci.rvm.jp/results/trunk@ruby-sp1/4321096
+
+# Exception for empty select
+assert_match /specify at least one ractor/, %q{
+ begin
+ Ractor.select
+ rescue ArgumentError => e
+ e.message
+ end
+}
+
+# Outgoing port of a ractor will be closed when the Ractor is terminated.
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ 'finish'
+ end
+
+ r.take
+ sleep 0.1 until r.inspect =~ /terminated/
+
+ begin
+ o = r.take
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ "ng: #{o}"
+ end
+}
+
+# Raise Ractor::ClosedError when try to send into a terminated ractor
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ end
+
+ r.take # closed
+ sleep 0.1 until r.inspect =~ /terminated/
+
+ begin
+ r.send(1)
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# Raise Ractor::ClosedError when try to send into a closed actor
+assert_equal 'ok', %q{
+ r = Ractor.new { Ractor.receive }
+ r.close_incoming
+
+ begin
+ r.send(1)
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# Raise Ractor::ClosedError when try to take from closed actor
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ Ractor.yield 1
+ Ractor.receive
+ end
+
+ r.close_outgoing
+ begin
+ r.take
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# Can mix with Thread#interrupt and Ractor#take [Bug #17366]
+assert_equal 'err', %q{
+ Ractor.new{
+ t = Thread.current
+ begin
+ Thread.new{ t.raise "err" }.join
+ rescue => e
+ e.message
+ end
+ }.take
+}
+
+# Killed Ractor's thread yields nil
+assert_equal 'nil', %q{
+ Ractor.new{
+ t = Thread.current
+ Thread.new{ t.kill }.join
+ }.take.inspect #=> nil
+}
+
+# Ractor.yield raises Ractor::ClosedError when outgoing port is closed.
+assert_equal 'ok', %q{
+ r = Ractor.new Ractor.current do |main|
+ Ractor.receive
+ main << true
+ Ractor.yield 1
+ end
+
+ r.close_outgoing
+ r << true
+ Ractor.receive
+
+ begin
+ r.take
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# Raise Ractor::ClosedError when try to send into a ractor with closed incoming port
+assert_equal 'ok', %q{
+ r = Ractor.new { Ractor.receive }
+ r.close_incoming
+
+ begin
+ r.send(1)
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# A ractor with closed incoming port still can send messages out
+assert_equal '[1, 2]', %q{
+ r = Ractor.new do
+ Ractor.yield 1
+ 2
+ end
+ r.close_incoming
+
+ [r.take, r.take]
+}
+
+# Raise Ractor::ClosedError when try to take from a ractor with closed outgoing port
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ Ractor.yield 1
+ Ractor.receive
+ end
+
+ sleep 0.01 # wait for Ractor.yield in r
+ r.close_outgoing
+ begin
+ r.take
+ rescue Ractor::ClosedError
+ 'ok'
+ else
+ 'ng'
+ end
+}
+
+# A ractor with closed outgoing port still can receive messages from incoming port
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ Ractor.receive
+ end
+
+ r.close_outgoing
+ begin
+ r.send(1)
+ rescue Ractor::ClosedError
+ 'ng'
+ else
+ 'ok'
+ end
+}
+
+# Ractor.main returns main ractor
+assert_equal 'true', %q{
+ Ractor.new{
+ Ractor.main
+ }.take == Ractor.current
+}
+
+# a ractor with closed outgoing port should terminate
+assert_equal 'ok', %q{
+ Ractor.new do
+ close_outgoing
+ end
+
+ true until Ractor.count == 1
+ :ok
+}
+
+# multiple Ractors can receive (wait) from one Ractor
+assert_equal '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]', %q{
+ pipe = Ractor.new do
+ loop do
+ Ractor.yield Ractor.receive
+ end
+ end
+
+ RN = 10
+ rs = RN.times.map{|i|
+ Ractor.new pipe, i do |pipe, i|
+ msg = pipe.take
+ msg # ping-pong
+ end
+ }
+ RN.times{|i|
+ pipe << i
+ }
+ RN.times.map{
+ r, n = Ractor.select(*rs)
+ rs.delete r
+ n
+ }.sort
+} unless /mswin/ =~ RUBY_PLATFORM # randomly hangs on mswin https://github.com/ruby/ruby/actions/runs/3753871445/jobs/6377551069#step:20:131
+
+# Ractor.select also support multiple take, receive and yield
+assert_equal '[true, true, true]', %q{
+ RN = 10
+ CR = Ractor.current
+
+ rs = (1..RN).map{
+ Ractor.new do
+ CR.send 'send' + CR.take #=> 'sendyield'
+ 'take'
+ end
+ }
+ received = []
+ take = []
+ yielded = []
+ until rs.empty?
+ r, v = Ractor.select(CR, *rs, yield_value: 'yield')
+ case r
+ when :receive
+ received << v
+ when :yield
+ yielded << v
+ else
+ take << v
+ rs.delete r
+ end
+ end
+ [received.all?('sendyield'), yielded.all?(nil), take.all?('take')]
+}
+
+# multiple Ractors can send to one Ractor
+assert_equal '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]', %q{
+ pipe = Ractor.new do
+ loop do
+ Ractor.yield Ractor.receive
+ end
+ end
+
+ RN = 10
+ RN.times.map{|i|
+ Ractor.new pipe, i do |pipe, i|
+ pipe << i
+ end
+ }
+ RN.times.map{
+ pipe.take
+ }.sort
+}
+
+# an exception in a Ractor will be re-raised at Ractor#receive
+assert_equal '[RuntimeError, "ok", true]', %q{
+ r = Ractor.new do
+ raise 'ok' # exception will be transferred receiver
+ end
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ [e.cause.class, #=> RuntimeError
+ e.cause.message, #=> 'ok'
+ e.ractor == r] #=> true
+ end
+}
+
+# threads in a ractor will killed
+assert_equal '{:ok=>3}', %q{
+ Ractor.new Ractor.current do |main|
+ q = Thread::Queue.new
+ Thread.new do
+ q << true
+ loop{}
+ ensure
+ main << :ok
+ end
+
+ Thread.new do
+ q << true
+ while true
+ end
+ ensure
+ main << :ok
+ end
+
+ Thread.new do
+ q << true
+ sleep 1
+ ensure
+ main << :ok
+ end
+
+ # wait for the start of all threads
+ 3.times{q.pop}
+ end
+
+ 3.times.map{Ractor.receive}.tally
+}
+
+# unshareable object are copied
+assert_equal 'false', %q{
+ obj = 'str'.dup
+ r = Ractor.new obj do |msg|
+ msg.object_id
+ end
+
+ obj.object_id == r.take
+}
+
+# To copy the object, now Marshal#dump is used
+assert_equal "allocator undefined for Thread", %q{
+ obj = Thread.new{}
+ begin
+ r = Ractor.new obj do |msg|
+ msg
+ end
+ rescue TypeError => e
+ e.message #=> no _dump_data is defined for class Thread
+ else
+ 'ng'
+ end
+}
+
+# send shareable and unshareable objects
+assert_equal "ok", %q{
+ echo_ractor = Ractor.new do
+ loop do
+ v = Ractor.receive
+ Ractor.yield v
+ end
+ end
+
+ class C; end
+ module M; end
+ S = Struct.new(:a, :b, :c, :d)
+
+ shareable_objects = [
+ true,
+ false,
+ nil,
+ 1,
+ 1.1, # Float
+ 1+2r, # Rational
+ 3+4i, # Complex
+ 2**128, # Bignum
+ :sym, # Symbol
+ 'xyzzy'.to_sym, # dynamic symbol
+ 'frozen'.freeze, # frozen String
+ /regexp/, # regexp literal
+ /reg{true}exp/.freeze, # frozen dregexp
+ [1, 2].freeze, # frozen Array which only refers to shareable
+ {a: 1}.freeze, # frozen Hash which only refers to shareable
+ [{a: 1}.freeze, 'str'.freeze].freeze, # nested frozen container
+ S.new(1, 2).freeze, # frozen Struct
+ S.new(1, 2, 3, 4).freeze, # frozen Struct
+ (1..2), # Range on Struct
+ (1..), # Range on Struct
+ (..1), # Range on Struct
+ C, # class
+ M, # module
+ Ractor.current, # Ractor
+ ]
+
+ unshareable_objects = [
+ 'mutable str'.dup,
+ [:array],
+ {hash: true},
+ S.new(1, 2),
+ S.new(1, 2, 3, 4),
+ S.new("a", 2).freeze, # frozen, but refers to an unshareable object
+ ]
+
+ results = []
+
+ shareable_objects.map{|o|
+ echo_ractor << o
+ o2 = echo_ractor.take
+ results << "#{o} is copied" unless o.object_id == o2.object_id
+ }
+
+ unshareable_objects.map{|o|
+ echo_ractor << o
+ o2 = echo_ractor.take
+ results << "#{o.inspect} is not copied" if o.object_id == o2.object_id
+ }
+
+ if results.empty?
+ :ok
+ else
+ results.inspect
+ end
+}
+
+# frozen Objects are shareable
+assert_equal [false, true, false].inspect, %q{
+ class C
+ def initialize freeze
+ @a = 1
+ @b = :sym
+ @c = 'frozen_str'
+ @c.freeze if freeze
+ @d = true
+ end
+ end
+
+ def check obj1
+ obj2 = Ractor.new obj1 do |obj|
+ obj
+ end.take
+
+ obj1.object_id == obj2.object_id
+ end
+
+ results = []
+ results << check(C.new(true)) # false
+ results << check(C.new(true).freeze) # true
+ results << check(C.new(false).freeze) # false
+}
+
+# move example2: String
+# touching moved object causes an error
+assert_equal 'hello world', %q{
+ # move
+ r = Ractor.new do
+ obj = Ractor.receive
+ obj << ' world'
+ end
+
+ str = 'hello'
+ r.send str, move: true
+ modified = r.take
+
+ begin
+ str << ' exception' # raise Ractor::MovedError
+ rescue Ractor::MovedError
+ modified #=> 'hello world'
+ else
+ raise 'unreachable'
+ end
+}
+
+# move example2: Array
+assert_equal '[0, 1]', %q{
+ r = Ractor.new do
+ ary = Ractor.receive
+ ary << 1
+ end
+
+ a1 = [0]
+ r.send a1, move: true
+ a2 = r.take
+ begin
+ a1 << 2 # raise Ractor::MovedError
+ rescue Ractor::MovedError
+ a2.inspect
+ end
+}
+
+# move with yield
+assert_equal 'hello', %q{
+ r = Ractor.new do
+ Thread.current.report_on_exception = false
+ obj = 'hello'
+ Ractor.yield obj, move: true
+ obj << 'world'
+ end
+
+ str = r.take
+ begin
+ r.take
+ rescue Ractor::RemoteError
+ str #=> "hello"
+ end
+}
+
+# yield/move should not make moved object when the yield is not succeeded
+assert_equal '"str"', %q{
+ R = Ractor.new{}
+ M = Ractor.current
+ r = Ractor.new do
+ s = 'str'
+ selected_r, v = Ractor.select R, yield_value: s, move: true
+ raise if selected_r != R # taken from R
+ M.send s.inspect # s should not be a moved object
+ end
+
+ Ractor.receive
+}
+
+# yield/move can fail
+assert_equal "allocator undefined for Thread", %q{
+ r = Ractor.new do
+ obj = Thread.new{}
+ Ractor.yield obj
+ rescue => e
+ e.message
+ end
+ r.take
+}
+
+# Access to global-variables are prohibited
+assert_equal 'can not access global variables $gv from non-main Ractors', %q{
+ $gv = 1
+ r = Ractor.new do
+ $gv
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# Access to global-variables are prohibited
+assert_equal 'can not access global variables $gv from non-main Ractors', %q{
+ r = Ractor.new do
+ $gv = 1
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# $stdin,out,err is Ractor local, but shared fds
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ [$stdin, $stdout, $stderr].map{|io|
+ [io.object_id, io.fileno]
+ }
+ end
+
+ [$stdin, $stdout, $stderr].zip(r.take){|io, (oid, fno)|
+ raise "should not be different object" if io.object_id == oid
+ raise "fd should be same" unless io.fileno == fno
+ }
+ 'ok'
+}
+
+# $stdin,out,err belong to Ractor
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ $stdin.itself
+ $stdout.itself
+ $stderr.itself
+ 'ok'
+ end
+
+ r.take
+}
+
+# $DEBUG, $VERBOSE are Ractor local
+assert_equal 'true', %q{
+ $DEBUG = true
+ $VERBOSE = true
+
+ def ractor_local_globals
+ /a(b)(c)d/ =~ 'abcd' # for $~
+ `echo foo` unless /solaris/ =~ RUBY_PLATFORM
+
+ {
+ # ractor-local (derived from created ractor): debug
+ '$DEBUG' => $DEBUG,
+ '$-d' => $-d,
+
+ # ractor-local (derived from created ractor): verbose
+ '$VERBOSE' => $VERBOSE,
+ '$-w' => $-w,
+ '$-W' => $-W,
+ '$-v' => $-v,
+
+ # process-local (readonly): other commandline parameters
+ '$-p' => $-p,
+ '$-l' => $-l,
+ '$-a' => $-a,
+
+ # process-local (readonly): getpid
+ '$$' => $$,
+
+ # thread local: process result
+ '$?' => $?,
+
+ # scope local: match
+ '$~' => $~.inspect,
+ '$&' => $&,
+ '$`' => $`,
+ '$\'' => $',
+ '$+' => $+,
+ '$1' => $1,
+
+ # scope local: last line
+ '$_' => $_,
+
+ # scope local: last backtrace
+ '$@' => $@,
+ '$!' => $!,
+
+ # ractor local: stdin, out, err
+ '$stdin' => $stdin.inspect,
+ '$stdout' => $stdout.inspect,
+ '$stderr' => $stderr.inspect,
+ }
+ end
+
+ h = Ractor.new do
+ ractor_local_globals
+ end.take
+ ractor_local_globals == h #=> true
+}
+
+# selfs are different objects
+assert_equal 'false', %q{
+ r = Ractor.new do
+ self.object_id
+ end
+ r.take == self.object_id #=> false
+}
+
+# self is a Ractor instance
+assert_equal 'true', %q{
+ r = Ractor.new do
+ self.object_id
+ end
+ r.object_id == r.take #=> true
+}
+
+# given block Proc will be isolated, so can not access outer variables.
+assert_equal 'ArgumentError', %q{
+ begin
+ a = true
+ r = Ractor.new do
+ a
+ end
+ rescue => e
+ e.class
+ end
+}
+
+# ivar in shareable-objects are not allowed to access from non-main Ractor
+assert_equal "can not get unshareable values from instance variables of classes/modules from non-main Ractors", %q{
+ class C
+ @iv = 'str'
+ end
+
+ r = Ractor.new do
+ class C
+ p @iv
+ end
+ end
+
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# ivar in shareable-objects are not allowed to access from non-main Ractor
+assert_equal 'can not access instance variables of shareable objects from non-main Ractors', %q{
+ shared = Ractor.new{}
+ shared.instance_variable_set(:@iv, 'str')
+
+ r = Ractor.new shared do |shared|
+ p shared.instance_variable_get(:@iv)
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# ivar in shareable-objects are not allowed to access from non-main Ractor, by @iv (get)
+assert_equal 'can not access instance variables of shareable objects from non-main Ractors', %q{
+ class Ractor
+ def setup
+ @foo = ''
+ end
+
+ def foo
+ @foo
+ end
+ end
+
+ shared = Ractor.new{}
+ shared.setup
+
+ r = Ractor.new shared do |shared|
+ p shared.foo
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# ivar in shareable-objects are not allowed to access from non-main Ractor, by @iv (set)
+assert_equal 'can not access instance variables of shareable objects from non-main Ractors', %q{
+ class Ractor
+ def setup
+ @foo = ''
+ end
+ end
+
+ shared = Ractor.new{}
+
+ r = Ractor.new shared do |shared|
+ p shared.setup
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# But a shareable object is frozen, it is allowed to access ivars from non-main Ractor
+assert_equal '11', %q{
+ [Object.new, [], ].map{|obj|
+ obj.instance_variable_set('@a', 1)
+ Ractor.make_shareable obj = obj.freeze
+
+ Ractor.new obj do |obj|
+ obj.instance_variable_get('@a')
+ end.take.to_s
+ }.join
+}
+
+# and instance variables of classes/modules are accessible if they refer shareable objects
+assert_equal '333', %q{
+ class C
+ @int = 1
+ @str = '-1000'.dup
+ @fstr = '100'.freeze
+
+ def self.int = @int
+ def self.str = @str
+ def self.fstr = @fstr
+ end
+
+ module M
+ @int = 2
+ @str = '-2000'.dup
+ @fstr = '200'.freeze
+
+ def self.int = @int
+ def self.str = @str
+ def self.fstr = @fstr
+ end
+
+ a = Ractor.new{ C.int }.take
+ b = Ractor.new do
+ C.str.to_i
+ rescue Ractor::IsolationError
+ 10
+ end.take
+ c = Ractor.new do
+ C.fstr.to_i
+ end.take
+
+ d = Ractor.new{ M.int }.take
+ e = Ractor.new do
+ M.str.to_i
+ rescue Ractor::IsolationError
+ 20
+ end.take
+ f = Ractor.new do
+ M.fstr.to_i
+ end.take
+
+
+ # 1 + 10 + 100 + 2 + 20 + 200
+ a + b + c + d + e + f
+}
+
+# cvar in shareable-objects are not allowed to access from non-main Ractor
+assert_equal 'can not access class variables from non-main Ractors', %q{
+ class C
+ @@cv = 'str'
+ end
+
+ r = Ractor.new do
+ class C
+ p @@cv
+ end
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# also cached cvar in shareable-objects are not allowed to access from non-main Ractor
+assert_equal 'can not access class variables from non-main Ractors', %q{
+ class C
+ @@cv = 'str'
+ def self.cv
+ @@cv
+ end
+ end
+
+ C.cv # cache
+
+ r = Ractor.new do
+ C.cv
+ end
+
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# Getting non-shareable objects via constants by other Ractors is not allowed
+assert_equal 'can not access non-shareable objects in constant C::CONST by non-main Ractor.', %q{
+ class C
+ CONST = 'str'
+ end
+ r = Ractor.new do
+ C::CONST
+ end
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# Constant cache should care about non-sharable constants
+assert_equal "can not access non-shareable objects in constant Object::STR by non-main Ractor.", %q{
+ STR = "hello"
+ def str; STR; end
+ s = str() # fill const cache
+ begin
+ Ractor.new{ str() }.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# Setting non-shareable objects into constants by other Ractors is not allowed
+assert_equal 'can not set constants with non-shareable objects by non-main Ractors', %q{
+ class C
+ end
+ r = Ractor.new do
+ C::CONST = 'str'
+ end
+ begin
+ r.take
+ rescue Ractor::RemoteError => e
+ e.cause.message
+ end
+}
+
+# define_method is not allowed
+assert_equal "defined with an un-shareable Proc in a different Ractor", %q{
+ str = "foo"
+ define_method(:buggy){|i| str << "#{i}"}
+ begin
+ Ractor.new{buggy(10)}.take
+ rescue => e
+ e.cause.message
+ end
+}
+
+# Immutable Array and Hash are shareable, so it can be shared with constants
+assert_equal '[1000, 3]', %q{
+ A = Array.new(1000).freeze # [nil, ...]
+ H = {a: 1, b: 2, c: 3}.freeze
+
+ Ractor.new{ [A.size, H.size] }.take
+}
+
+# Ractor.count
+assert_equal '[1, 4, 3, 2, 1]', %q{
+ counts = []
+ counts << Ractor.count
+ ractors = (1..3).map { Ractor.new { Ractor.receive } }
+ counts << Ractor.count
+
+ ractors[0].send('End 0').take
+ sleep 0.1 until ractors[0].inspect =~ /terminated/
+ counts << Ractor.count
+
+ ractors[1].send('End 1').take
+ sleep 0.1 until ractors[1].inspect =~ /terminated/
+ counts << Ractor.count
+
+ ractors[2].send('End 2').take
+ sleep 0.1 until ractors[2].inspect =~ /terminated/
+ counts << Ractor.count
+
+ counts.inspect
+}
+
+# ObjectSpace.each_object can not handle unshareable objects with Ractors
+assert_equal '0', %q{
+ Ractor.new{
+ n = 0
+ ObjectSpace.each_object{|o| n += 1 unless Ractor.shareable?(o)}
+ n
+ }.take
+}
+
+# ObjectSpace._id2ref can not handle unshareable objects with Ractors
+assert_equal 'ok', %q{
+ s = 'hello'
+
+ Ractor.new s.object_id do |id ;s|
+ begin
+ s = ObjectSpace._id2ref(id)
+ rescue => e
+ :ok
+ end
+ end.take
+}
+
+# Ractor.make_shareable(obj)
+assert_equal 'true', %q{
+ class C
+ def initialize
+ @a = 'foo'
+ @b = 'bar'
+ end
+
+ def freeze
+ @c = [:freeze_called]
+ super
+ end
+
+ attr_reader :a, :b, :c
+ end
+ S = Struct.new(:s1, :s2)
+ str = "hello"
+ str.instance_variable_set("@iv", "hello")
+ /a/ =~ 'a'
+ m = $~
+ class N < Numeric
+ def /(other)
+ 1
+ end
+ end
+ ary = []; ary << ary
+
+ a = [[1, ['2', '3']],
+ {Object.new => "hello"},
+ C.new,
+ S.new("x", "y"),
+ ("a".."b"),
+ str,
+ ary, # cycle
+ /regexp/,
+ /#{'r'.upcase}/,
+ m,
+ Complex(N.new,0),
+ Rational(N.new,0),
+ true,
+ false,
+ nil,
+ 1, 1.2, 1+3r, 1+4i, # Numeric
+ ]
+ Ractor.make_shareable(a)
+
+ # check all frozen
+ a.each{|o|
+ raise o.inspect unless o.frozen?
+
+ case o
+ when C
+ raise o.a.inspect unless o.a.frozen?
+ raise o.b.inspect unless o.b.frozen?
+ raise o.c.inspect unless o.c.frozen? && o.c == [:freeze_called]
+ when Rational
+ raise o.numerator.inspect unless o.numerator.frozen?
+ when Complex
+ raise o.real.inspect unless o.real.frozen?
+ when Array
+ if o[0] == 1
+ raise o[1][1].inspect unless o[1][1].frozen?
+ end
+ when Hash
+ o.each{|k, v|
+ raise k.inspect unless k.frozen?
+ raise v.inspect unless v.frozen?
+ }
+ end
+ }
+
+ Ractor.shareable?(a)
+}
+
+# Ractor.make_shareable(obj) doesn't freeze shareable objects
+assert_equal 'true', %q{
+ r = Ractor.new{}
+ Ractor.make_shareable(a = [r])
+ [a.frozen?, a[0].frozen?] == [true, false]
+}
+
+# Ractor.make_shareable(a_proc) makes a proc shareable.
+assert_equal 'true', %q{
+ a = [1, [2, 3], {a: "4"}]
+
+ pr = Ractor.current.instance_eval do
+ Proc.new do
+ a
+ end
+ end
+
+ Ractor.make_shareable(a) # referred value should be shareable
+ Ractor.make_shareable(pr)
+ Ractor.shareable?(pr)
+}
+
+# Ractor.shareable?(recursive_objects)
+assert_equal '[false, false]', %q{
+ y = []
+ x = [y, {}].freeze
+ y << x
+ y.freeze
+ [Ractor.shareable?(x), Ractor.shareable?(y)]
+}
+
+# Ractor.make_shareable(recursive_objects)
+assert_equal '[:ok, false, false]', %q{
+ o = Object.new
+ def o.freeze; raise; end
+ y = []
+ x = [y, o].freeze
+ y << x
+ y.freeze
+ [(Ractor.make_shareable(x) rescue :ok), Ractor.shareable?(x), Ractor.shareable?(y)]
+}
+
+# Ractor.make_shareable with Class/Module
+assert_equal '[C, M]', %q{
+ class C; end
+ module M; end
+
+ Ractor.make_shareable(ary = [C, M])
+}
+
+# define_method() can invoke different Ractor's proc if the proc is shareable.
+assert_equal '1', %q{
+ class C
+ a = 1
+ define_method "foo", Ractor.make_shareable(Proc.new{ a })
+ a = 2
+ end
+
+ Ractor.new{ C.new.foo }.take
+}
+
+# Ractor.make_shareable(a_proc) makes a proc shareable.
+assert_equal 'can not make a Proc shareable because it accesses outer variables (a).', %q{
+ a = b = nil
+ pr = Ractor.current.instance_eval do
+ Proc.new do
+ c = b # assign to a is okay because c is block local variable
+ # reading b is okay
+ a = b # assign to a is not allowed #=> Ractor::Error
+ end
+ end
+
+ begin
+ Ractor.make_shareable(pr)
+ rescue => e
+ e.message
+ end
+}
+
+# Ractor.make_shareable(obj, copy: true) makes copied shareable object.
+assert_equal '[false, false, true, true]', %q{
+ r = []
+ o1 = [1, 2, ["3"]]
+
+ o2 = Ractor.make_shareable(o1, copy: true)
+ r << Ractor.shareable?(o1) # false
+ r << (o1.object_id == o2.object_id) # false
+
+ o3 = Ractor.make_shareable(o1)
+ r << Ractor.shareable?(o1) # true
+ r << (o1.object_id == o3.object_id) # false
+ r
+}
+
+# TracePoint with normal Proc should be Ractor local
+assert_equal '[4, 8]', %q{
+ rs = []
+ TracePoint.new(:line){|tp| rs << tp.lineno if tp.path == __FILE__}.enable do
+ Ractor.new{ # line 4
+ a = 1
+ b = 2
+ }.take
+ c = 3 # line 8
+ end
+ rs
+}
+
+# Ractor deep copies frozen objects (ary)
+assert_equal '[true, false]', %q{
+ Ractor.new([[]].freeze) { |ary|
+ [ary.frozen?, ary.first.frozen? ]
+ }.take
+}
+
+# Ractor deep copies frozen objects (str)
+assert_equal '[true, false]', %q{
+ s = String.new.instance_eval { @x = []; freeze}
+ Ractor.new(s) { |s|
+ [s.frozen?, s.instance_variable_get(:@x).frozen?]
+ }.take
+}
+
+# Can not trap with not isolated Proc on non-main ractor
+assert_equal '[:ok, :ok]', %q{
+ a = []
+ Ractor.new{
+ trap(:INT){p :ok}
+ }.take
+ a << :ok
+
+ begin
+ Ractor.new{
+ s = 'str'
+ trap(:INT){p s}
+ }.take
+ rescue => Ractor::RemoteError
+ a << :ok
+ end
+}
+
+# Ractor-local storage
+assert_equal '[nil, "b", "a"]', %q{
+ ans = []
+ Ractor.current[:key] = 'a'
+ r = Ractor.new{
+ Ractor.yield self[:key]
+ self[:key] = 'b'
+ self[:key]
+ }
+ ans << r.take
+ ans << r.take
+ ans << Ractor.current[:key]
+}
+
+###
+### Synchronization tests
+###
+
+N = 100_000
+
+# fstring pool
+assert_equal "#{N}#{N}", %Q{
+ N = #{N}
+ 2.times.map{
+ Ractor.new{
+ N.times{|i| -(i.to_s)}
+ }
+ }.map{|r| r.take}.join
+}
+
+# enc_table
+assert_equal "100", %Q{
+ Ractor.new do
+ loop do
+ Encoding.find("test-enc-#{rand(5_000)}").inspect
+ rescue ArgumentError => e
+ end
+ end
+
+ src = Encoding.find("UTF-8")
+ 100.times{|i|
+ src.replicate("test-enc-\#{i}")
+ }
+}
+
+# Generic ivtbl
+n = N/2
+assert_equal "#{n}#{n}", %Q{
+ 2.times.map{
+ Ractor.new do
+ #{n}.times do
+ obj = ''
+ obj.instance_variable_set("@a", 1)
+ obj.instance_variable_set("@b", 1)
+ obj.instance_variable_set("@c", 1)
+ obj.instance_variable_defined?("@a")
+ end
+ end
+ }.map{|r| r.take}.join
+}
+
+# NameError
+assert_equal "ok", %q{
+ begin
+ bar
+ rescue => err
+ end
+ begin
+ Ractor.new{} << err
+ rescue TypeError
+ 'ok'
+ end
+}
+
+assert_equal "ok", %q{
+ GC.disable
+ Ractor.new {}
+ raise "not ok" unless GC.disable
+
+ foo = []
+ 10.times { foo << 1 }
+
+ GC.start
+
+ 'ok'
+}
+
+# Can yield back values while GC is sweeping [Bug #18117]
+assert_equal "ok", %q{
+ workers = (0...8).map do
+ Ractor.new do
+ loop do
+ 10_000.times.map { Object.new }
+ Ractor.yield Time.now
+ end
+ end
+ end
+
+ 1_000.times { idle_worker, tmp_reporter = Ractor.select(*workers) }
+ "ok"
+}
+
+assert_equal "ok", %q{
+ def foo(*); ->{ super }; end
+ begin
+ Ractor.make_shareable(foo)
+ rescue Ractor::IsolationError
+ "ok"
+ end
+}
+
+assert_equal "ok", %q{
+ def foo(**); ->{ super }; end
+ begin
+ Ractor.make_shareable(foo)
+ rescue Ractor::IsolationError
+ "ok"
+ end
+}
+
+assert_equal "ok", %q{
+ def foo(...); ->{ super }; end
+ begin
+ Ractor.make_shareable(foo)
+ rescue Ractor::IsolationError
+ "ok"
+ end
+}
+
+assert_equal "ok", %q{
+ def foo((x), (y)); ->{ super }; end
+ begin
+ Ractor.make_shareable(foo([], []))
+ rescue Ractor::IsolationError
+ "ok"
+ end
+}
+
+assert_equal "ok", %q{
+ module M
+ def foo
+ @foo
+ end
+ end
+
+ class A
+ include M
+
+ def initialize
+ 100.times { |i| instance_variable_set(:"@var_#{i}", "bad: #{i}") }
+ @foo = 2
+ end
+ end
+
+ class B
+ include M
+
+ def initialize
+ @foo = 1
+ end
+ end
+
+ Ractor.new do
+ b = B.new
+ 100_000.times do
+ raise unless b.foo == 1
+ end
+ end
+
+ a = A.new
+ 100_000.times do
+ raise unless a.foo == 2
+ end
+
+ "ok"
+}
+
+assert_match /\Atest_ractor\.rb:1:\s+warning:\s+Ractor is experimental/, %q{
+ Warning[:experimental] = $VERBOSE = true
+ STDERR.reopen(STDOUT)
+ eval("Ractor.new{}.take", nil, "test_ractor.rb", 1)
+}
+
+end # if !ENV['GITHUB_WORKFLOW']
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index a111990a1f..948e2d7809 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -268,8 +268,10 @@ assert_equal %q{}, %q{
defined?(@@a)
}
assert_equal %q{class variable}, %q{
- @@a = 1
- defined?(@@a)
+ class A
+ @@a = 1
+ defined?(@@a)
+ end
}
assert_equal %q{}, %q{
defined?($a)
@@ -626,7 +628,7 @@ assert_equal '2', %q{
}
assert_match /invalid multibyte char/, %q{
- STDERR.reopen(STDOUT)
+ $stderr = STDOUT
eval("\"\xf0".force_encoding("utf-8"))
}, '[ruby-dev:32429]'
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index f00e2f7efc..5361828403 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -8,7 +8,8 @@ show_limit %q{
puts "Thread count: #{threads.count} (#{error})"
break
end while true
-}
+} if false # disable to pass CI
+
assert_equal %q{ok}, %q{
Thread.new{
}.join
@@ -242,7 +243,7 @@ assert_equal 'true', %{
}
assert_equal 'ok', %{
- open("zzz.rb", "w") do |f|
+ open("zzz_t1.rb", "w") do |f|
f.puts <<-END
begin
Thread.new { fork { GC.start } }.join
@@ -253,7 +254,7 @@ assert_equal 'ok', %{
end
END
end
- require "./zzz.rb"
+ require "./zzz_t1.rb"
$result
}
@@ -407,7 +408,7 @@ assert_equal 'ok', %q{
}
assert_equal 'ok', %{
- open("zzz.rb", "w") do |f|
+ open("zzz_t2.rb", "w") do |f|
f.puts <<-'end;' # do
begin
m = Thread::Mutex.new
@@ -431,7 +432,7 @@ assert_equal 'ok', %{
end
end;
end
- require "./zzz.rb"
+ require "./zzz_t2.rb"
$result
}
@@ -483,3 +484,17 @@ assert_equal 'foo', %q{
GC.start
f.call.source
}
+assert_normal_exit %q{
+ class C
+ def inspect
+ sleep 0.5
+ 'C!!'
+ end
+ end
+ Thread.new{
+ loop{
+ p C.new
+ }
+ }
+ sleep 0.1
+}, timeout: 5
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
new file mode 100644
index 0000000000..5c655b8f25
--- /dev/null
+++ b/bootstraptest/test_yjit.rb
@@ -0,0 +1,3530 @@
+# Regression test for yielding with autosplat to block with
+# optional parameters. https://github.com/Shopify/yjit/issues/313
+assert_equal '[:a, :b, :a, :b]', %q{
+ def yielder(arg) = yield(arg) + yield(arg)
+
+ yielder([:a, :b]) do |c = :c, d = :d|
+ [c, d]
+ end
+}
+
+# Regression test for GC mishap while doing shape transition
+assert_equal '[:ok]', %q{
+ # [Bug #19601]
+ class RegressionTest
+ def initialize
+ @a = @b = @fourth_ivar_does_shape_transition = nil
+ end
+
+ def extender
+ @first_extended_ivar = [:ok]
+ end
+ end
+
+ GC.stress = true
+
+ # Used to crash due to GC run in rb_ensure_iv_list_size()
+ # not marking the newly allocated [:ok].
+ RegressionTest.new.extender.itself
+}
+
+assert_equal 'true', %q{
+ # regression test for tracking type of locals for too long
+ def local_setting_cmp(five)
+ victim = 5
+ five.define_singleton_method(:respond_to?) do |_, _|
+ victim = nil
+ end
+
+ # +1 makes YJIT track that victim is a number and
+ # defined? calls respond_to? from above indirectly
+ unless (victim + 1) && defined?(five.something)
+ # Would return wrong result if we still think `five` is a number
+ victim.nil?
+ end
+ end
+
+ local_setting_cmp(Object.new)
+ local_setting_cmp(Object.new)
+}
+
+assert_equal '18374962167983112447', %q{
+ # regression test for incorrectly discarding 32 bits of a pointer when it
+ # comes to default values.
+ def large_literal_default(n: 0xff00_fabcafe0_00ff)
+ n
+ end
+
+ def call_graph_root
+ large_literal_default
+ end
+
+ call_graph_root
+ call_graph_root
+}
+
+assert_normal_exit %q{
+ # regression test for a leak caught by an assert on --yjit-call-threshold=2
+ Foo = 1
+
+ eval("def foo = [#{(['Foo,']*256).join}]")
+
+ foo
+ foo
+
+ Object.send(:remove_const, :Foo)
+}
+
+assert_normal_exit %q{
+ # Test to ensure send on overriden c functions
+ # doesn't corrupt the stack
+ class Bar
+ def bar(x)
+ x
+ end
+ end
+
+ class Foo
+ def bar
+ Bar.new
+ end
+ end
+
+ foo = Foo.new
+ # before this change, this line would error
+ # because "s" would still be on the stack
+ # String.to_s is the overridden method here
+ p foo.bar.bar("s".__send__(:to_s))
+}
+
+
+assert_equal '[nil, nil, nil, nil, nil, nil]', %q{
+ [NilClass, TrueClass, FalseClass, Integer, Float, Symbol].each do |klass|
+ klass.class_eval("def foo = @foo")
+ end
+
+ [nil, true, false, 0xFABCAFE, 0.42, :cake].map do |instance|
+ instance.foo
+ instance.foo
+ end
+}
+
+assert_equal '0', %q{
+ # This is a regression test for incomplete invalidation from
+ # opt_setinlinecache. This test might be brittle, so
+ # feel free to remove it in the future if it's too annoying.
+ # This test assumes --yjit-call-threshold=2.
+ module M
+ Foo = 1
+ def foo
+ Foo
+ end
+
+ def pin_self_type_then_foo
+ _ = @foo
+ foo
+ end
+
+ def only_ints
+ 1 + self
+ foo
+ end
+ end
+
+ class Integer
+ include M
+ end
+
+ class Sub
+ include M
+ end
+
+ foo_method = M.instance_method(:foo)
+
+ dbg = ->(message) do
+ return # comment this out to get printouts
+
+ $stderr.puts RubyVM::YJIT.disasm(foo_method)
+ $stderr.puts message
+ end
+
+ 2.times { 42.only_ints }
+
+ dbg["There should be two versions of getinlineache"]
+
+ module M
+ remove_const(:Foo)
+ end
+
+ dbg["There should be no getinlinecaches"]
+
+ 2.times do
+ 42.only_ints
+ rescue NameError => err
+ _ = "caught name error #{err}"
+ end
+
+ dbg["There should be one version of getinlineache"]
+
+ 2.times do
+ Sub.new.pin_self_type_then_foo
+ rescue NameError
+ _ = 'second specialization'
+ end
+
+ dbg["There should be two versions of getinlineache"]
+
+ module M
+ Foo = 1
+ end
+
+ dbg["There should still be two versions of getinlineache"]
+
+ 42.only_ints
+
+ dbg["There should be no getinlinecaches"]
+
+ # Find name of the first VM instruction in M#foo.
+ insns = RubyVM::InstructionSequence.of(foo_method).to_a
+ if defined?(RubyVM::YJIT.blocks_for) && (insns.last.find { Array === _1 }&.first == :opt_getinlinecache)
+ RubyVM::YJIT.blocks_for(RubyVM::InstructionSequence.of(foo_method))
+ .filter { _1.iseq_start_index == 0 }.count
+ else
+ 0 # skip the test
+ end
+}
+
+# Check that frozen objects are respected
+assert_equal 'great', %q{
+ class Foo
+ attr_accessor :bar
+ def initialize
+ @bar = 1
+ freeze
+ end
+ end
+
+ foo = Foo.new
+
+ 5.times do
+ begin
+ foo.bar = 2
+ rescue FrozenError
+ end
+ end
+
+ foo.bar == 1 ? "great" : "NG"
+}
+
+# Check that global variable set works
+assert_equal 'string', %q{
+ def foo
+ $foo = "string"
+ end
+
+ foo
+}
+
+# Check that exceptions work when setting global variables
+assert_equal 'rescued', %q{
+ def set_var
+ $var = 100
+ rescue
+ :rescued
+ end
+
+ set_var
+ trace_var(:$var) { raise }
+ set_var
+}
+
+# Check that global variables work
+assert_equal 'string', %q{
+ $foo = "string"
+
+ def foo
+ $foo
+ end
+
+ foo
+}
+
+# Check that exceptions work when getting global variable
+assert_equal 'rescued', %q{
+ Warning[:deprecated] = true
+
+ module Warning
+ def warn(message)
+ raise
+ end
+ end
+
+ def get_var
+ $=
+ rescue
+ :rescued
+ end
+
+ $VERBOSE = true
+ get_var
+ get_var
+}
+
+# Check that global tracepoints work
+assert_equal 'true', %q{
+ def foo
+ 1
+ end
+
+ foo
+ foo
+ foo
+
+ called = false
+
+ tp = TracePoint.new(:return) { |event|
+ if event.method_id == :foo
+ called = true
+ end
+ }
+ tp.enable
+ foo
+ tp.disable
+ called
+}
+
+# Check that local tracepoints work
+assert_equal 'true', %q{
+ def foo
+ 1
+ end
+
+ foo
+ foo
+ foo
+
+ called = false
+
+ tp = TracePoint.new(:return) { |_| called = true }
+ tp.enable(target: method(:foo))
+ foo
+ tp.disable
+ called
+}
+
+# Make sure that optional param methods return the correct value
+assert_equal '1', %q{
+ def m(ary = [])
+ yield(ary)
+ end
+
+ # Warm the JIT with a 0 param call
+ 2.times { m { } }
+ m(1) { |v| v }
+}
+
+# Test for topn
+assert_equal 'array', %q{
+ def threequals(a)
+ case a
+ when Array
+ "array"
+ when Hash
+ "hash"
+ else
+ "unknown"
+ end
+ end
+
+ threequals([])
+ threequals([])
+ threequals([])
+}
+
+# Test for opt_mod
+assert_equal '2', %q{
+ def mod(a, b)
+ a % b
+ end
+
+ mod(7, 5)
+ mod(7, 5)
+}
+
+# Test for opt_mult
+assert_equal '12', %q{
+ def mult(a, b)
+ a * b
+ end
+
+ mult(6, 2)
+ mult(6, 2)
+}
+
+# Test for opt_div
+assert_equal '3', %q{
+ def div(a, b)
+ a / b
+ end
+
+ div(6, 2)
+ div(6, 2)
+}
+
+# BOP redefined methods work when JIT compiled
+assert_equal 'false', %q{
+ def less_than x
+ x < 10
+ end
+
+ class Integer
+ def < x
+ false
+ end
+ end
+
+ less_than 2
+ less_than 2
+ less_than 2
+}
+
+# BOP redefinition works on Integer#<
+assert_equal 'false', %q{
+ def less_than x
+ x < 10
+ end
+
+ less_than 2
+ less_than 2
+
+ class Integer
+ def < x
+ false
+ end
+ end
+
+ less_than 2
+}
+
+# Putobject, less-than operator, fixnums
+assert_equal '2', %q{
+ def check_index(index)
+ if 0x40000000 < index
+ raise "wat? #{index}"
+ end
+ index
+ end
+ check_index 2
+ check_index 2
+}
+
+# foo leaves a temp on the stack before the call
+assert_equal '6', %q{
+ def bar
+ return 5
+ end
+
+ def foo
+ return 1 + bar
+ end
+
+ foo()
+ retval = foo()
+}
+
+# Method with one arguments
+# foo leaves a temp on the stack before the call
+assert_equal '7', %q{
+ def bar(a)
+ return a + 1
+ end
+
+ def foo
+ return 1 + bar(5)
+ end
+
+ foo()
+ retval = foo()
+}
+
+# Method with two arguments
+# foo leaves a temp on the stack before the call
+assert_equal '0', %q{
+ def bar(a, b)
+ return a - b
+ end
+
+ def foo
+ return 1 + bar(1, 2)
+ end
+
+ foo()
+ retval = foo()
+}
+
+# Passing argument types to callees
+assert_equal '8.5', %q{
+ def foo(x, y)
+ x + y
+ end
+
+ def bar
+ foo(7, 1.5)
+ end
+
+ bar
+ bar
+}
+
+# Recursive Ruby-to-Ruby calls
+assert_equal '21', %q{
+ def fib(n)
+ if n < 2
+ return n
+ end
+
+ return fib(n-1) + fib(n-2)
+ end
+
+ r = fib(8)
+}
+
+# Ruby-to-Ruby call and C call
+assert_normal_exit %q{
+ def bar
+ puts('hi!')
+ end
+
+ def foo
+ bar
+ end
+
+ foo()
+ foo()
+}
+
+# Method aliasing
+assert_equal '42', %q{
+ class Foo
+ def method_a
+ 42
+ end
+
+ alias method_b method_a
+
+ def method_a
+ :somethingelse
+ end
+ end
+
+ @obj = Foo.new
+
+ def test
+ @obj.method_b
+ end
+
+ test
+ test
+}
+
+# Method aliasing with method from parent class
+assert_equal '777', %q{
+ class A
+ def method_a
+ 777
+ end
+ end
+
+ class B < A
+ alias method_b method_a
+ end
+
+ @obj = B.new
+
+ def test
+ @obj.method_b
+ end
+
+ test
+ test
+}
+
+# The hash method is a C function and uses the self argument
+assert_equal 'true', %q{
+ def lehashself
+ hash
+ end
+
+ a = lehashself
+ b = lehashself
+ a == b
+}
+
+# Method redefinition (code invalidation) test
+assert_equal '1', %q{
+ def ret1
+ return 1
+ end
+
+ klass = Class.new do
+ def alias_then_hash(klass, method_to_redefine)
+ # Redefine the method to be ret1
+ klass.alias_method(method_to_redefine, :ret1)
+ hash
+ end
+ end
+
+ instance = klass.new
+
+ i = 0
+ while i < 12
+ if i < 11
+ # Redefine the bar method
+ instance.alias_then_hash(klass, :bar)
+ else
+ # Redefine the hash method to be ret1
+ retval = instance.alias_then_hash(klass, :hash)
+ end
+ i += 1
+ end
+
+ retval
+}
+
+# Code invalidation and opt_getinlinecache
+assert_normal_exit %q{
+ class Foo; end
+
+ # Uses the class constant Foo
+ def use_constant(arg)
+ [Foo.new, arg]
+ end
+
+ def propagate_type
+ i = Array.new
+ i.itself # make it remember that i is on-heap
+ use_constant(i)
+ end
+
+ propagate_type
+ propagate_type
+ use_constant(Foo.new)
+ class Jo; end # bump global constant state
+ use_constant(3)
+}
+
+# Method redefinition (code invalidation) and GC
+assert_equal '7', %q{
+ def bar()
+ return 5
+ end
+
+ def foo()
+ bar()
+ end
+
+ foo()
+ foo()
+
+ def bar()
+ return 7
+ end
+
+ 4.times { GC.start }
+
+ foo()
+ foo()
+}
+
+# Method redefinition with two block versions
+assert_equal '7', %q{
+ def bar()
+ return 5
+ end
+
+ def foo(n)
+ return ((n < 5)? 5:false), bar()
+ end
+
+ foo(4)
+ foo(4)
+ foo(10)
+ foo(10)
+
+ def bar()
+ return 7
+ end
+
+ 4.times { GC.start }
+
+ foo(4)
+ foo(4)[1]
+}
+
+# Method redefinition while the method is on the stack
+assert_equal '[777, 1]', %q{
+ def foo
+ redef()
+ 777
+ end
+
+ def redef
+ # Redefine the global foo
+ eval("def foo; 1; end", TOPLEVEL_BINDING)
+
+ # Collect dead code
+ GC.stress = true
+ GC.start
+
+ # But we will return to the original foo,
+ # which remains alive because it's on the stack
+ end
+
+ # Must produce [777, 1]
+ [foo, foo]
+}
+
+# Test for GC safety. Don't invalidate dead iseqs.
+assert_normal_exit %q{
+ Class.new do
+ def foo
+ itself
+ end
+
+ new.foo
+ new.foo
+ new.foo
+ new.foo
+ end
+
+ 4.times { GC.start }
+ def itself
+ self
+ end
+}
+
+# test setinstancevariable on extended objects
+assert_equal '1', %q{
+ class Extended
+ attr_reader :one
+
+ def write_many
+ @a = 1
+ @b = 2
+ @c = 3
+ @d = 4
+ @one = 1
+ end
+ end
+
+ foo = Extended.new
+ foo.write_many
+ foo.write_many
+ foo.write_many
+}
+
+# test setinstancevariable on embedded objects
+assert_equal '1', %q{
+ class Embedded
+ attr_reader :one
+
+ def write_one
+ @one = 1
+ end
+ end
+
+ foo = Embedded.new
+ foo.write_one
+ foo.write_one
+ foo.write_one
+}
+
+# test setinstancevariable after extension
+assert_equal '[10, 11, 12, 13, 1]', %q{
+ class WillExtend
+ attr_reader :one
+
+ def make_extended
+ @foo1 = 10
+ @foo2 = 11
+ @foo3 = 12
+ @foo4 = 13
+ end
+
+ def write_one
+ @one = 1
+ end
+
+ def read_all
+ [@foo1, @foo2, @foo3, @foo4, @one]
+ end
+ end
+
+ foo = WillExtend.new
+ foo.write_one
+ foo.write_one
+ foo.make_extended
+ foo.write_one
+ foo.read_all
+}
+
+# test setinstancevariable on frozen object
+assert_equal 'object was not modified', %q{
+ class WillFreeze
+ def write
+ @ivar = 1
+ end
+ end
+
+ wf = WillFreeze.new
+ wf.write
+ wf.write
+ wf.freeze
+
+ begin
+ wf.write
+ rescue FrozenError
+ "object was not modified"
+ end
+}
+
+# Test getinstancevariable and inline caches
+assert_equal '6', %q{
+ class Foo
+ def initialize
+ @x1 = 1
+ @x2 = 1
+ @x2 = 1
+ @x3 = 1
+ @x4 = 3
+ end
+
+ def bar
+ x = 1
+ @x4 + @x4
+ end
+ end
+
+ f = Foo.new
+ f.bar
+ f.bar
+}
+
+# Test that getinstancevariable codegen checks for extended table size
+assert_equal "nil\n", %q{
+ class A
+ def read
+ @ins1000
+ end
+ end
+
+ ins = A.new
+ other = A.new
+ 10.times { other.instance_variable_set(:"@otr#{_1}", 'value') }
+ 1001.times { ins.instance_variable_set(:"@ins#{_1}", 'value') }
+
+ ins.read
+ ins.read
+ ins.read
+
+ p other.read
+}
+
+# Test that opt_aref checks the class of the receiver
+assert_equal 'special', %q{
+ def foo(array)
+ array[30]
+ end
+
+ foo([])
+ foo([])
+
+ special = []
+ def special.[](idx)
+ 'special'
+ end
+
+ foo(special)
+}
+
+# Test that object references in generated code get marked and moved
+assert_equal "good", %q{
+ def bar
+ "good"
+ end
+
+ def foo
+ bar
+ end
+
+ foo
+ foo
+
+ begin
+ GC.verify_compaction_references(expand_heap: true, toward: :empty)
+ rescue NotImplementedError
+ # in case compaction isn't supported
+ end
+
+ foo
+}
+
+# Test polymorphic getinstancevariable. T_OBJECT -> T_STRING
+assert_equal 'ok', %q{
+ @hello = @h1 = @h2 = @h3 = @h4 = 'ok'
+ str = ""
+ str.instance_variable_set(:@hello, 'ok')
+
+ public def get
+ @hello
+ end
+
+ get
+ get
+ str.get
+ str.get
+}
+
+# Test polymorphic getinstancevariable, two different classes
+assert_equal 'ok', %q{
+ class Embedded
+ def initialize
+ @ivar = 0
+ end
+
+ def get
+ @ivar
+ end
+ end
+
+ class Extended < Embedded
+ def initialize
+ @v1 = @v2 = @v3 = @v4 = @ivar = 'ok'
+ end
+ end
+
+ embed = Embedded.new
+ extend = Extended.new
+
+ embed.get
+ embed.get
+ extend.get
+ extend.get
+}
+
+# Test megamorphic getinstancevariable
+assert_equal 'ok', %q{
+ parent = Class.new do
+ def initialize
+ @hello = @h1 = @h2 = @h3 = @h4 = 'ok'
+ end
+
+ def get
+ @hello
+ end
+ end
+
+ subclasses = 300.times.map { Class.new(parent) }
+ subclasses.each { _1.new.get }
+ parent.new.get
+}
+
+# Test polymorphic opt_aref. array -> hash
+assert_equal '[42, :key]', %q{
+ def index(obj, idx)
+ obj[idx]
+ end
+
+ index([], 0) # get over compilation threshold
+
+ [
+ index([42], 0),
+ index({0=>:key}, 0),
+ ]
+}
+
+# Test polymorphic opt_aref. hash -> array -> custom class
+assert_equal '[nil, nil, :custom]', %q{
+ def index(obj, idx)
+ obj[idx]
+ end
+
+ custom = Object.new
+ def custom.[](_idx)
+ :custom
+ end
+
+ index({}, 0) # get over compilation threshold
+
+ [
+ index({}, 0),
+ index([], 0),
+ index(custom, 0)
+ ]
+}
+
+# Test polymorphic opt_aref. array -> custom class
+assert_equal '[42, :custom]', %q{
+ def index(obj, idx)
+ obj[idx]
+ end
+
+ custom = Object.new
+ def custom.[](_idx)
+ :custom
+ end
+
+ index([], 0) # get over compilation threshold
+
+ [
+ index([42], 0),
+ index(custom, 0)
+ ]
+}
+
+# Test custom hash method with opt_aref
+assert_equal '[nil, :ok]', %q{
+ def index(obj, idx)
+ obj[idx]
+ end
+
+ custom = Object.new
+ def custom.hash
+ 42
+ end
+
+ h = {custom => :ok}
+
+ [
+ index(h, 0),
+ index(h, custom)
+ ]
+}
+
+# Test default value block for Hash with opt_aref
+assert_equal '[42, :default]', %q{
+ def index(obj, idx)
+ obj[idx]
+ end
+
+ h = Hash.new { :default }
+ h[0] = 42
+
+ [
+ index(h, 0),
+ index(h, 1)
+ ]
+}
+
+# A regression test for making sure cfp->sp is proper when
+# hitting stubs. See :stub-sp-flush:
+assert_equal 'ok', %q{
+ class D
+ def foo
+ Object.new
+ end
+ end
+
+ GC.stress = true
+ 10.times do
+ D.new.foo
+ # ^
+ # This hits a stub with sp_offset > 0
+ end
+
+ :ok
+}
+
+# Test polymorphic callsite, cfunc -> iseq
+assert_equal '[Cfunc, Iseq]', %q{
+ public def call_itself
+ itself # the polymorphic callsite
+ end
+
+ class Cfunc; end
+
+ class Iseq
+ def itself
+ self
+ end
+ end
+
+ call_itself # cross threshold
+
+ [Cfunc.call_itself, Iseq.call_itself]
+}
+
+# Test polymorphic callsite, iseq -> cfunc
+assert_equal '[Iseq, Cfunc]', %q{
+ public def call_itself
+ itself # the polymorphic callsite
+ end
+
+ class Cfunc; end
+
+ class Iseq
+ def itself
+ self
+ end
+ end
+
+ call_itself # cross threshold
+
+ [Iseq.call_itself, Cfunc.call_itself]
+}
+
+# attr_reader method
+assert_equal '[100, 299]', %q{
+ class A
+ attr_reader :foo
+
+ def initialize
+ @foo = 100
+ end
+
+ # Make it extended
+ def fill!
+ @bar = @jojo = @as = @sdfsdf = @foo = 299
+ end
+ end
+
+ def bar(ins)
+ ins.foo
+ end
+
+ ins = A.new
+ oth = A.new
+ oth.fill!
+
+ bar(ins)
+ bar(oth)
+
+ [bar(ins), bar(oth)]
+}
+
+# get ivar on object, then on hash
+assert_equal '[42, 100]', %q{
+ class Hash
+ attr_accessor :foo
+ end
+
+ class A
+ attr_reader :foo
+
+ def initialize
+ @foo = 42
+ end
+ end
+
+ def use(val)
+ val.foo
+ end
+
+
+ h = {}
+ h.foo = 100
+ obj = A.new
+
+ use(obj)
+ [use(obj), use(h)]
+}
+
+# get ivar on String
+assert_equal '[nil, nil, 42, 42]', %q{
+ # @foo to exercise the getinstancevariable instruction
+ public def get_foo
+ @foo
+ end
+
+ get_foo
+ get_foo # compile it for the top level object
+
+ class String
+ attr_reader :foo
+ end
+
+ def run
+ str = String.new
+
+ getter = str.foo
+ insn = str.get_foo
+
+ str.instance_variable_set(:@foo, 42)
+
+ [getter, insn, str.foo, str.get_foo]
+ end
+
+ run
+ run
+}
+
+# splatting an empty array on a getter
+assert_equal '42', %q{
+ @foo = 42
+ module Kernel
+ attr_reader :foo
+ end
+
+ def run
+ foo(*[])
+ end
+
+ run
+ run
+}
+
+# splatting an empty array on a specialized method
+assert_equal 'ok', %q{
+ def run
+ "ok".to_s(*[])
+ end
+
+ run
+ run
+}
+
+# splatting an single element array on a specialized method
+assert_equal '[1]', %q{
+ def run
+ [].<<(*[1])
+ end
+
+ run
+ run
+}
+
+# specialized method with wrong args
+assert_equal 'ok', %q{
+ def run(x)
+ "bad".to_s(123) if x
+ rescue
+ :ok
+ end
+
+ run(false)
+ run(true)
+}
+
+# getinstancevariable on Symbol
+assert_equal '[nil, nil]', %q{
+ # @foo to exercise the getinstancevariable instruction
+ public def get_foo
+ @foo
+ end
+
+ dyn_sym = ("a" + "b").to_sym
+ sym = :static
+
+ # compile get_foo
+ dyn_sym.get_foo
+ dyn_sym.get_foo
+
+ [dyn_sym.get_foo, sym.get_foo]
+}
+
+# attr_reader on Symbol
+assert_equal '[nil, nil]', %q{
+ class Symbol
+ attr_reader :foo
+ end
+
+ public def get_foo
+ foo
+ end
+
+ dyn_sym = ("a" + "b").to_sym
+ sym = :static
+
+ # compile get_foo
+ dyn_sym.get_foo
+ dyn_sym.get_foo
+
+ [dyn_sym.get_foo, sym.get_foo]
+}
+
+# passing too few arguments to method with optional parameters
+assert_equal 'raised', %q{
+ def opt(a, b = 0)
+ end
+
+ def use
+ opt
+ end
+
+ use rescue nil
+ begin
+ use
+ :ng
+ rescue ArgumentError
+ :raised
+ end
+}
+
+# passing too many arguments to method with optional parameters
+assert_equal 'raised', %q{
+ def opt(a, b = 0)
+ end
+
+ def use
+ opt(1, 2, 3, 4)
+ end
+
+ use rescue nil
+ begin
+ use
+ :ng
+ rescue ArgumentError
+ :raised
+ end
+}
+
+# test calling Ruby method with a block
+assert_equal '[1, 2, 42]', %q{
+ def thing(a, b)
+ [a, b, yield]
+ end
+
+ def use
+ thing(1,2) { 42 }
+ end
+
+ use
+ use
+}
+
+# test calling C method with a block
+assert_equal '[42, 42]', %q{
+ def use(array, initial)
+ array.reduce(initial) { |a, b| a + b }
+ end
+
+ use([], 0)
+ [use([2, 2], 38), use([14, 14, 14], 0)]
+}
+
+# test calling block param
+assert_equal '[1, 2, 42]', %q{
+ def foo(&block)
+ block.call
+ end
+
+ [foo {1}, foo {2}, foo {42}]
+}
+
+# test calling without block param
+assert_equal '[1, false, 2, false]', %q{
+ def bar
+ block_given? && yield
+ end
+
+ def foo(&block)
+ bar(&block)
+ end
+
+ [foo { 1 }, foo, foo { 2 }, foo]
+}
+
+# test calling block param failing
+assert_equal '42', %q{
+ def foo(&block)
+ block.call
+ end
+
+ foo {} # warmup
+
+ begin
+ foo
+ rescue NoMethodError => e
+ 42 if nil == e.receiver
+ end
+}
+
+# test calling method taking block param
+assert_equal '[Proc, 1, 2, 3, Proc]', %q{
+ def three(a, b, c, &block)
+ [a, b, c, block.class]
+ end
+
+ def zero(&block)
+ block.class
+ end
+
+ def use_three
+ three(1, 2, 3) {}
+ end
+
+ def use_zero
+ zero {}
+ end
+
+ use_three
+ use_zero
+
+ [use_zero] + use_three
+}
+
+# test building empty array
+assert_equal '[]', %q{
+ def build_arr
+ []
+ end
+
+ build_arr
+ build_arr
+}
+
+# test building array of one element
+assert_equal '[5]', %q{
+ def build_arr(val)
+ [val]
+ end
+
+ build_arr(5)
+ build_arr(5)
+}
+
+# test building array of several element
+assert_equal '[5, 5, 5, 5, 5]', %q{
+ def build_arr(val)
+ [val, val, val, val, val]
+ end
+
+ build_arr(5)
+ build_arr(5)
+}
+
+# test building empty hash
+assert_equal '{}', %q{
+ def build_hash
+ {}
+ end
+
+ build_hash
+ build_hash
+}
+
+# test building hash with values
+assert_equal '{:foo=>:bar}', %q{
+ def build_hash(val)
+ { foo: val }
+ end
+
+ build_hash(:bar)
+ build_hash(:bar)
+}
+
+# test string interpolation with known types
+assert_equal 'foobar', %q{
+ def make_str
+ foo = -"foo"
+ bar = -"bar"
+ "#{foo}#{bar}"
+ end
+
+ make_str
+ make_str
+}
+
+# test string interpolation with unknown types
+assert_equal 'foobar', %q{
+ def make_str(foo, bar)
+ "#{foo}#{bar}"
+ end
+
+ make_str("foo", "bar")
+ make_str("foo", "bar")
+}
+
+# test string interpolation with known non-strings
+assert_equal 'foo123', %q{
+ def make_str
+ foo = -"foo"
+ bar = 123
+ "#{foo}#{bar}"
+ end
+
+ make_str
+ make_str
+}
+
+# test string interpolation with unknown non-strings
+assert_equal 'foo123', %q{
+ def make_str(foo, bar)
+ "#{foo}#{bar}"
+ end
+
+ make_str("foo", 123)
+ make_str("foo", 123)
+}
+
+# test that invalidation of String#to_s doesn't crash
+assert_equal 'meh', %q{
+ def inval_method
+ "".to_s
+ end
+
+ inval_method
+
+ class String
+ def to_s
+ "meh"
+ end
+ end
+
+ inval_method
+}
+
+# test that overriding to_s on a String subclass works consistently
+assert_equal 'meh', %q{
+ class MyString < String
+ def to_s
+ "meh"
+ end
+ end
+
+ def test_to_s(obj)
+ obj.to_s
+ end
+
+ OBJ = MyString.new
+
+ # Should return '' both times
+ test_to_s("")
+ test_to_s("")
+
+ # Can return '' if YJIT optimises String#to_s too aggressively
+ test_to_s(OBJ)
+ test_to_s(OBJ)
+}
+
+# test string interpolation with overridden to_s
+assert_equal 'foo', %q{
+ class String
+ def to_s
+ "bad"
+ end
+ end
+
+ def make_str(foo)
+ "#{foo}"
+ end
+
+ make_str("foo")
+ make_str("foo")
+}
+
+# Test that String unary plus returns the same object ID for an unfrozen string.
+assert_equal 'true', %q{
+ def jittable_method
+ str = "bar"
+
+ old_obj_id = str.object_id
+ uplus_str = +str
+
+ uplus_str.object_id == old_obj_id
+ end
+ jittable_method
+}
+
+# Test that String unary plus returns a different unfrozen string when given a frozen string
+assert_equal 'false', %q{
+ # Logic needs to be inside an ISEQ, such as a method, for YJIT to compile it
+ def jittable_method
+ frozen_str = "foo".freeze
+
+ old_obj_id = frozen_str.object_id
+ uplus_str = +frozen_str
+
+ uplus_str.object_id == old_obj_id || uplus_str.frozen?
+ end
+
+ jittable_method
+}
+
+# String-subclass objects should behave as expected inside string-interpolation via concatstrings
+assert_equal 'monkeys / monkeys, yo!', %q{
+ class MyString < String
+ # This is a terrible idea in production code, but we'd like YJIT to match CRuby
+ def to_s
+ super + ", yo!"
+ end
+ end
+
+ def jittable_method
+ m = MyString.new('monkeys')
+ "#{m} / #{m.to_s}"
+ end
+
+ jittable_method
+}
+
+# String-subclass objects should behave as expected for string equality
+assert_equal 'false', %q{
+ class MyString < String
+ # This is a terrible idea in production code, but we'd like YJIT to match CRuby
+ def ==(b)
+ "#{self}_" == b
+ end
+ end
+
+ def jittable_method
+ ma = MyString.new("a")
+
+ # Check equality with string-subclass receiver
+ ma == "a" || ma != "a_" ||
+ # Check equality with string receiver
+ "a_" == ma || "a" != ma ||
+ # Check equality between string subclasses
+ ma != MyString.new("a_") ||
+ # Make sure "string always equals itself" check isn't used with overridden equality
+ ma == ma
+ end
+ jittable_method
+}
+
+# Test to_s duplicates a string subclass object but not a string
+assert_equal 'false', %q{
+ class MyString < String; end
+
+ def jittable_method
+ a = "a"
+ ma = MyString.new("a")
+
+ a.object_id != a.to_s.object_id ||
+ ma.object_id == ma.to_s.object_id
+ end
+ jittable_method
+}
+
+# Test freeze on string subclass
+assert_equal 'true', %q{
+ class MyString < String; end
+
+ def jittable_method
+ fma = MyString.new("a").freeze
+
+ # Freezing a string subclass should not duplicate it
+ fma.object_id == fma.freeze.object_id
+ end
+ jittable_method
+}
+
+# Test unary minus on string subclass
+assert_equal 'true', %q{
+ class MyString < String; end
+
+ def jittable_method
+ ma = MyString.new("a")
+ fma = MyString.new("a").freeze
+
+ # Unary minus on frozen string subclass should not duplicate it
+ fma.object_id == (-fma).object_id &&
+ # Unary minus on unfrozen string subclass should duplicate it
+ ma.object_id != (-ma).object_id
+ end
+ jittable_method
+}
+
+# Test unary plus on string subclass
+assert_equal 'true', %q{
+ class MyString < String; end
+
+ def jittable_method
+ fma = MyString.new("a").freeze
+
+ # Unary plus on frozen string subclass should not duplicate it
+ fma.object_id != (+fma).object_id
+ end
+ jittable_method
+}
+
+# Test << operator on string subclass
+assert_equal 'abab', %q{
+ class MyString < String; end
+
+ def jittable_method
+ a = -"a"
+ mb = MyString.new("b")
+
+ buf = String.new
+ mbuf = MyString.new
+
+ buf << a << mb
+ mbuf << a << mb
+
+ buf + mbuf
+ end
+ jittable_method
+}
+
+# test invokebuiltin as used in struct assignment
+assert_equal '123', %q{
+ def foo(obj)
+ obj.foo = 123
+ end
+
+ struct = Struct.new(:foo)
+ obj = struct.new
+ foo(obj)
+ foo(obj)
+}
+
+# test invokebuiltin_delegate as used inside Dir.open
+assert_equal '.', %q{
+ def foo(path)
+ Dir.open(path).path
+ end
+
+ foo(".")
+ foo(".")
+}
+
+# test invokebuiltin_delegate_leave in method called from jit
+assert_normal_exit %q{
+ def foo(obj)
+ obj.clone
+ end
+
+ foo(Object.new)
+ foo(Object.new)
+}
+
+# test invokebuiltin_delegate_leave in method called from cfunc
+assert_normal_exit %q{
+ def foo(obj)
+ [obj].map(&:clone)
+ end
+
+ foo(Object.new)
+ foo(Object.new)
+}
+
+# defining TrueClass#!
+assert_equal '[false, false, :ok]', %q{
+ def foo(obj)
+ !obj
+ end
+
+ x = foo(true)
+ y = foo(true)
+
+ class TrueClass
+ def !
+ :ok
+ end
+ end
+
+ z = foo(true)
+
+ [x, y, z]
+}
+
+# defining FalseClass#!
+assert_equal '[true, true, :ok]', %q{
+ def foo(obj)
+ !obj
+ end
+
+ x = foo(false)
+ y = foo(false)
+
+ class FalseClass
+ def !
+ :ok
+ end
+ end
+
+ z = foo(false)
+
+ [x, y, z]
+}
+
+# defining NilClass#!
+assert_equal '[true, true, :ok]', %q{
+ def foo(obj)
+ !obj
+ end
+
+ x = foo(nil)
+ y = foo(nil)
+
+ class NilClass
+ def !
+ :ok
+ end
+ end
+
+ z = foo(nil)
+
+ [x, y, z]
+}
+
+# polymorphic opt_not
+assert_equal '[true, true, false, false, false, false, false]', %q{
+ def foo(obj)
+ !obj
+ end
+
+ foo(0)
+ [foo(nil), foo(false), foo(true), foo([]), foo(0), foo(4.2), foo(:sym)]
+}
+
+# getlocal with 2 levels
+assert_equal '7', %q{
+ def foo(foo, bar)
+ while foo > 0
+ while bar > 0
+ return foo + bar
+ end
+ end
+ end
+
+ foo(5,2)
+ foo(5,2)
+}
+
+# test pattern matching
+assert_equal '[:ok, :ok]', %q{
+ class C
+ def destructure_keys
+ {}
+ end
+ end
+
+ pattern_match = ->(i) do
+ case i
+ in a: 0
+ :ng
+ else
+ :ok
+ end
+ end
+
+ [{}, C.new].map(&pattern_match)
+}
+
+# Call to object with singleton
+assert_equal '123', %q{
+ obj = Object.new
+ def obj.foo
+ 123
+ end
+
+ def foo(obj)
+ obj.foo()
+ end
+
+ foo(obj)
+ foo(obj)
+}
+
+# Call method on an object that has a non-material
+# singleton class.
+# TODO: assert that it takes no side exits? This
+# test case revealed that we were taking exits unnecessarily.
+assert_normal_exit %q{
+ def foo(obj)
+ obj.itself
+ end
+
+ o = Object.new.singleton_class
+ foo(o)
+ foo(o)
+}
+
+# Call to singleton class
+assert_equal '123', %q{
+ class Foo
+ def self.foo
+ 123
+ end
+ end
+
+ def foo(obj)
+ obj.foo()
+ end
+
+ foo(Foo)
+ foo(Foo)
+}
+
+# invokesuper edge case
+assert_equal '[:A, [:A, :B]]', %q{
+ class B
+ def foo = :B
+ end
+
+ class A < B
+ def foo = [:A, super()]
+ end
+
+ A.new.foo
+ A.new.foo # compile A#foo
+
+ class C < A
+ define_method(:bar, A.instance_method(:foo))
+ end
+
+ C.new.bar
+}
+
+# Same invokesuper bytecode, multiple destinations
+assert_equal '[:Forward, :SecondTerminus]', %q{
+ module Terminus
+ def foo = :Terminus
+ end
+
+ module SecondTerminus
+ def foo = :SecondTerminus
+ end
+
+
+ module Forward
+ def foo = [:Forward, super]
+ end
+
+ class B
+ include SecondTerminus
+ end
+
+ class A < B
+ include Terminus
+ include Forward
+ end
+
+ A.new.foo
+ A.new.foo # compile
+
+ class B
+ include Forward
+ alias bar foo
+ end
+
+ # A.ancestors.take(5) == [A, Forward, Terminus, B, Forward, SecondTerminus]
+
+ A.new.bar
+}
+
+# invokesuper calling into itself
+assert_equal '[:B, [:B, :m]]', %q{
+ module M
+ def foo = :m
+ end
+
+ class B
+ include M
+ def foo = [:B, super]
+ end
+
+ ins = B.new
+ ins.singleton_class # materialize the singleton class
+ ins.foo
+ ins.foo # compile
+
+ ins.singleton_class.define_method(:bar, B.instance_method(:foo))
+ ins.bar
+}
+
+# invokesuper changed ancestor
+assert_equal '[:A, [:M, :B]]', %q{
+ class B
+ def foo
+ :B
+ end
+ end
+
+ class A < B
+ def foo
+ [:A, super]
+ end
+ end
+
+ module M
+ def foo
+ [:M, super]
+ end
+ end
+
+ ins = A.new
+ ins.foo
+ ins.foo
+ A.include(M)
+ ins.foo
+}
+
+# invokesuper changed ancestor via prepend
+assert_equal '[:A, [:M, :B]]', %q{
+ class B
+ def foo
+ :B
+ end
+ end
+
+ class A < B
+ def foo
+ [:A, super]
+ end
+ end
+
+ module M
+ def foo
+ [:M, super]
+ end
+ end
+
+ ins = A.new
+ ins.foo
+ ins.foo
+ B.prepend(M)
+ ins.foo
+}
+
+# invokesuper replaced method
+assert_equal '[:A, :Btwo]', %q{
+ class B
+ def foo
+ :B
+ end
+ end
+
+ class A < B
+ def foo
+ [:A, super]
+ end
+ end
+
+ ins = A.new
+ ins.foo
+ ins.foo
+ class B
+ def foo
+ :Btwo
+ end
+ end
+ ins.foo
+}
+
+# Call to fixnum
+assert_equal '[true, false]', %q{
+ def is_odd(obj)
+ obj.odd?
+ end
+
+ is_odd(1)
+ is_odd(1)
+
+ [is_odd(123), is_odd(456)]
+}
+
+# Call to bignum
+assert_equal '[true, false]', %q{
+ def is_odd(obj)
+ obj.odd?
+ end
+
+ bignum = 99999999999999999999
+ is_odd(bignum)
+ is_odd(bignum)
+
+ [is_odd(bignum), is_odd(bignum+1)]
+}
+
+# Call to fixnum and bignum
+assert_equal '[true, false, true, false]', %q{
+ def is_odd(obj)
+ obj.odd?
+ end
+
+ bignum = 99999999999999999999
+ is_odd(bignum)
+ is_odd(bignum)
+ is_odd(123)
+ is_odd(123)
+
+ [is_odd(123), is_odd(456), is_odd(bignum), is_odd(bignum+1)]
+}
+
+# Call to static and dynamic symbol
+assert_equal 'bar', %q{
+ def to_string(obj)
+ obj.to_s
+ end
+
+ to_string(:foo)
+ to_string(:foo)
+ to_string((-"bar").to_sym)
+ to_string((-"bar").to_sym)
+}
+
+# Call to flonum and heap float
+assert_equal '[nil, nil, nil, 1]', %q{
+ def is_inf(obj)
+ obj.infinite?
+ end
+
+ is_inf(0.0)
+ is_inf(0.0)
+ is_inf(1e256)
+ is_inf(1e256)
+
+ [
+ is_inf(0.0),
+ is_inf(1.0),
+ is_inf(1e256),
+ is_inf(1.0/0.0)
+ ]
+}
+
+assert_equal '[1, 2, 3, 4, 5]', %q{
+ def splatarray
+ [*(1..5)]
+ end
+
+ splatarray
+ splatarray
+}
+
+assert_equal '[1, 1, 2, 1, 2, 3]', %q{
+ def expandarray
+ arr = [1, 2, 3]
+
+ a, = arr
+ b, c, = arr
+ d, e, f = arr
+
+ [a, b, c, d, e, f]
+ end
+
+ expandarray
+ expandarray
+}
+
+assert_equal '[1, 1]', %q{
+ def expandarray_useless_splat
+ arr = (1..10).to_a
+
+ a, * = arr
+ b, (*) = arr
+
+ [a, b]
+ end
+
+ expandarray_useless_splat
+ expandarray_useless_splat
+}
+
+assert_equal '[:not_heap, nil, nil]', %q{
+ def expandarray_not_heap
+ a, b, c = :not_heap
+ [a, b, c]
+ end
+
+ expandarray_not_heap
+ expandarray_not_heap
+}
+
+assert_equal '[:not_array, nil, nil]', %q{
+ def expandarray_not_array(obj)
+ a, b, c = obj
+ [a, b, c]
+ end
+
+ obj = Object.new
+ def obj.to_ary
+ [:not_array]
+ end
+
+ expandarray_not_array(obj)
+ expandarray_not_array(obj)
+}
+
+assert_equal '[1, 2, nil]', %q{
+ def expandarray_rhs_too_small
+ a, b, c = [1, 2]
+ [a, b, c]
+ end
+
+ expandarray_rhs_too_small
+ expandarray_rhs_too_small
+}
+
+assert_equal '[1, [2]]', %q{
+ def expandarray_splat
+ a, *b = [1, 2]
+ [a, b]
+ end
+
+ expandarray_splat
+ expandarray_splat
+}
+
+assert_equal '2', %q{
+ def expandarray_postarg
+ *, a = [1, 2]
+ a
+ end
+
+ expandarray_postarg
+ expandarray_postarg
+}
+
+assert_equal '10', %q{
+ obj = Object.new
+ val = nil
+ obj.define_singleton_method(:to_ary) { val = 10; [] }
+
+ def expandarray_always_call_to_ary(object)
+ * = object
+ end
+
+ expandarray_always_call_to_ary(obj)
+ expandarray_always_call_to_ary(obj)
+
+ val
+}
+
+# regression test of local type change
+assert_equal '1.1', %q{
+def bar(baz, quux)
+ if baz.integer?
+ baz, quux = quux, nil
+ end
+ baz.to_s
+end
+
+bar(123, 1.1)
+bar(123, 1.1)
+}
+
+# test enabling a line TracePoint in a C method call
+assert_equal '[[:line, true]]', %q{
+ events = []
+ events.instance_variable_set(
+ :@tp,
+ TracePoint.new(:line) { |tp| events << [tp.event, tp.lineno] if tp.path == __FILE__ }
+ )
+ def events.to_str
+ @tp.enable; ''
+ end
+
+ # Stay in generated code while enabling tracing
+ def events.compiled(obj)
+ String(obj)
+ @tp.disable; __LINE__
+ end
+
+ line = events.compiled(events)
+ events[0][-1] = (events[0][-1] == line)
+
+ events
+}
+
+# test enabling a c_return TracePoint in a C method call
+assert_equal '[[:c_return, :String, :string_alias, "events_to_str"]]', %q{
+ events = []
+ events.instance_variable_set(:@tp, TracePoint.new(:c_return) { |tp| events << [tp.event, tp.method_id, tp.callee_id, tp.return_value] })
+ def events.to_str
+ @tp.enable; 'events_to_str'
+ end
+
+ # Stay in generated code while enabling tracing
+ alias string_alias String
+ def events.compiled(obj)
+ string_alias(obj)
+ @tp.disable
+ end
+
+ events.compiled(events)
+
+ events
+} unless defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # MJIT calls extra Ruby methods
+
+# test enabling a TracePoint that targets a particular line in a C method call
+assert_equal '[true]', %q{
+ events = []
+ events.instance_variable_set(:@tp, TracePoint.new(:line) { |tp| events << tp.lineno })
+ def events.to_str
+ @tp.enable(target: method(:compiled))
+ ''
+ end
+
+ # Stay in generated code while enabling tracing
+ def events.compiled(obj)
+ String(obj)
+ __LINE__
+ end
+
+ line = events.compiled(events)
+ events[0] = (events[0] == line)
+
+ events
+}
+
+# test enabling tracing in the middle of splatarray
+assert_equal '[true]', %q{
+ events = []
+ obj = Object.new
+ obj.instance_variable_set(:@tp, TracePoint.new(:line) { |tp| events << tp.lineno })
+ def obj.to_a
+ @tp.enable(target: method(:compiled))
+ []
+ end
+
+ # Enable tracing in the middle of the splatarray instruction
+ def obj.compiled(obj)
+ * = *obj
+ __LINE__
+ end
+
+ obj.compiled([])
+ line = obj.compiled(obj)
+ events[0] = (events[0] == line)
+
+ events
+}
+
+# test enabling tracing in the middle of opt_aref. Different since the codegen
+# for it ends in a jump.
+assert_equal '[true]', %q{
+ def lookup(hash, tp)
+ hash[42]
+ tp.disable; __LINE__
+ end
+
+ lines = []
+ tp = TracePoint.new(:line) { lines << _1.lineno if _1.path == __FILE__ }
+
+ lookup(:foo, tp)
+ lookup({}, tp)
+
+ enable_tracing_on_missing = Hash.new { tp.enable }
+
+ expected_line = lookup(enable_tracing_on_missing, tp)
+
+ lines[0] = true if lines[0] == expected_line
+
+ lines
+}
+
+# test enabling c_call tracing before compiling
+assert_equal '[[:c_call, :itself]]', %q{
+ def shouldnt_compile
+ itself
+ end
+
+ events = []
+ tp = TracePoint.new(:c_call) { |tp| events << [tp.event, tp.method_id] }
+
+ # assume first call compiles
+ tp.enable { shouldnt_compile }
+
+ events
+} unless defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # MJIT calls extra Ruby methods
+
+# test enabling c_return tracing before compiling
+assert_equal '[[:c_return, :itself, main]]', %q{
+ def shouldnt_compile
+ itself
+ end
+
+ events = []
+ tp = TracePoint.new(:c_return) { |tp| events << [tp.event, tp.method_id, tp.return_value] }
+
+ # assume first call compiles
+ tp.enable { shouldnt_compile }
+
+ events
+} unless defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # MJIT calls extra Ruby methods
+
+# test c_call invalidation
+assert_equal '[[:c_call, :itself]]', %q{
+ # enable the event once to make sure invalidation
+ # happens the second time we enable it
+ TracePoint.new(:c_call) {}.enable{}
+
+ def compiled
+ itself
+ end
+
+ # assume first call compiles
+ compiled
+
+ events = []
+ tp = TracePoint.new(:c_call) { |tp| events << [tp.event, tp.method_id] }
+ tp.enable { compiled }
+
+ events
+}
+
+# test enabling tracing for a suspended fiber
+assert_equal '[[:return, 42]]', %q{
+ def traced_method
+ Fiber.yield
+ 42
+ end
+
+ events = []
+ tp = TracePoint.new(:return) { events << [_1.event, _1.return_value] }
+ # assume first call compiles
+ fiber = Fiber.new { traced_method }
+ fiber.resume
+ tp.enable(target: method(:traced_method))
+ fiber.resume
+
+ events
+}
+
+# test compiling on non-tracing ractor then running on a tracing one
+assert_equal '[:itself]', %q{
+ def traced_method
+ itself
+ end
+
+ tracing_ractor = Ractor.new do
+ # 1: start tracing
+ events = []
+ tp = TracePoint.new(:c_call) { events << _1.method_id }
+ tp.enable
+ Ractor.yield(nil)
+
+ # 3: run compiled method on tracing ractor
+ Ractor.yield(nil)
+ traced_method
+
+ events
+ ensure
+ tp&.disable
+ end
+
+ tracing_ractor.take
+
+ # 2: compile on non tracing ractor
+ traced_method
+
+ tracing_ractor.take
+ tracing_ractor.take
+}
+
+# Try to hit a lazy branch stub while another ractor enables tracing
+assert_equal '42', %q{
+ def compiled(arg)
+ if arg
+ arg + 1
+ else
+ itself
+ itself
+ end
+ end
+
+ ractor = Ractor.new do
+ compiled(false)
+ Ractor.yield(nil)
+ compiled(41)
+ end
+
+ tp = TracePoint.new(:line) { itself }
+ ractor.take
+ tp.enable
+
+ ractor.take
+}
+
+# Test equality with changing types
+assert_equal '[true, false, false, false]', %q{
+ def eq(a, b)
+ a == b
+ end
+
+ [
+ eq("foo", "foo"),
+ eq("foo", "bar"),
+ eq(:foo, "bar"),
+ eq("foo", :bar)
+ ]
+}
+
+# Redefined String eq
+assert_equal 'true', %q{
+ class String
+ def ==(other)
+ true
+ end
+ end
+
+ def eq(a, b)
+ a == b
+ end
+
+ eq("foo", "bar")
+ eq("foo", "bar")
+}
+
+# Redefined Integer eq
+assert_equal 'true', %q{
+ class Integer
+ def ==(other)
+ true
+ end
+ end
+
+ def eq(a, b)
+ a == b
+ end
+
+ eq(1, 2)
+ eq(1, 2)
+}
+
+# aset on array with invalid key
+assert_normal_exit %q{
+ def foo(arr)
+ arr[:foo] = 123
+ end
+
+ foo([1]) rescue nil
+ foo([1]) rescue nil
+}
+
+# test ractor exception on when setting ivar
+assert_equal '42', %q{
+ class A
+ def self.foo
+ _foo = 1
+ _bar = 2
+ begin
+ @bar = _foo + _bar
+ rescue Ractor::IsolationError
+ 42
+ end
+ end
+ end
+
+ A.foo
+ A.foo
+
+ Ractor.new { A.foo }.take
+}
+
+assert_equal '["plain", "special", "sub", "plain"]', %q{
+ def foo(arg)
+ arg.to_s
+ end
+
+ class Sub < String
+ end
+
+ special = String.new("special")
+ special.singleton_class
+
+ [
+ foo("plain"),
+ foo(special),
+ foo(Sub.new("sub")),
+ foo("plain")
+ ]
+}
+
+assert_equal '["sub", "sub"]', %q{
+ def foo(arg)
+ arg.to_s
+ end
+
+ class Sub < String
+ def to_s
+ super
+ end
+ end
+
+ sub = Sub.new("sub")
+
+ [foo(sub), foo(sub)]
+}
+
+assert_equal '[1]', %q{
+ def kwargs(value:)
+ value
+ end
+
+ 5.times.map { kwargs(value: 1) }.uniq
+}
+
+assert_equal '[:ok]', %q{
+ def kwargs(value:)
+ value
+ end
+
+ 5.times.map { kwargs() rescue :ok }.uniq
+}
+
+assert_equal '[:ok]', %q{
+ def kwargs(a:, b: nil)
+ value
+ end
+
+ 5.times.map { kwargs(b: 123) rescue :ok }.uniq
+}
+
+assert_equal '[[1, 2]]', %q{
+ def kwargs(left:, right:)
+ [left, right]
+ end
+
+ 5.times.flat_map do
+ [
+ kwargs(left: 1, right: 2),
+ kwargs(right: 2, left: 1)
+ ]
+ end.uniq
+}
+
+assert_equal '[[1, 2]]', %q{
+ def kwargs(lead, kwarg:)
+ [lead, kwarg]
+ end
+
+ 5.times.map { kwargs(1, kwarg: 2) }.uniq
+}
+
+# optional and keyword args
+assert_equal '[[1, 2, 3]]', %q{
+ def opt_and_kwargs(a, b=2, c: nil)
+ [a,b,c]
+ end
+
+ 5.times.map { opt_and_kwargs(1, c: 3) }.uniq
+}
+
+assert_equal '[[1, 2, 3]]', %q{
+ def opt_and_kwargs(a, b=nil, c: nil)
+ [a,b,c]
+ end
+
+ 5.times.map { opt_and_kwargs(1, 2, c: 3) }.uniq
+}
+
+# Bug #18453
+assert_equal '[[1, nil, 2]]', %q{
+ def opt_and_kwargs(a = {}, b: nil, c: nil)
+ [a, b, c]
+ end
+
+ 5.times.map { opt_and_kwargs(1, c: 2) }.uniq
+}
+
+assert_equal '[[{}, nil, 1]]', %q{
+ def opt_and_kwargs(a = {}, b: nil, c: nil)
+ [a, b, c]
+ end
+
+ 5.times.map { opt_and_kwargs(c: 1) }.uniq
+}
+
+# leading and keyword arguments are swapped into the right order
+assert_equal '[[1, 2, 3, 4, 5, 6]]', %q{
+ def kwargs(five, six, a:, b:, c:, d:)
+ [a, b, c, d, five, six]
+ end
+
+ 5.times.flat_map do
+ [
+ kwargs(5, 6, a: 1, b: 2, c: 3, d: 4),
+ kwargs(5, 6, a: 1, b: 2, d: 4, c: 3),
+ kwargs(5, 6, a: 1, c: 3, b: 2, d: 4),
+ kwargs(5, 6, a: 1, c: 3, d: 4, b: 2),
+ kwargs(5, 6, a: 1, d: 4, b: 2, c: 3),
+ kwargs(5, 6, a: 1, d: 4, c: 3, b: 2),
+ kwargs(5, 6, b: 2, a: 1, c: 3, d: 4),
+ kwargs(5, 6, b: 2, a: 1, d: 4, c: 3),
+ kwargs(5, 6, b: 2, c: 3, a: 1, d: 4),
+ kwargs(5, 6, b: 2, c: 3, d: 4, a: 1),
+ kwargs(5, 6, b: 2, d: 4, a: 1, c: 3),
+ kwargs(5, 6, b: 2, d: 4, c: 3, a: 1),
+ kwargs(5, 6, c: 3, a: 1, b: 2, d: 4),
+ kwargs(5, 6, c: 3, a: 1, d: 4, b: 2),
+ kwargs(5, 6, c: 3, b: 2, a: 1, d: 4),
+ kwargs(5, 6, c: 3, b: 2, d: 4, a: 1),
+ kwargs(5, 6, c: 3, d: 4, a: 1, b: 2),
+ kwargs(5, 6, c: 3, d: 4, b: 2, a: 1),
+ kwargs(5, 6, d: 4, a: 1, b: 2, c: 3),
+ kwargs(5, 6, d: 4, a: 1, c: 3, b: 2),
+ kwargs(5, 6, d: 4, b: 2, a: 1, c: 3),
+ kwargs(5, 6, d: 4, b: 2, c: 3, a: 1),
+ kwargs(5, 6, d: 4, c: 3, a: 1, b: 2),
+ kwargs(5, 6, d: 4, c: 3, b: 2, a: 1)
+ ]
+ end.uniq
+}
+
+# implicit hashes get skipped and don't break compilation
+assert_equal '[[:key]]', %q{
+ def implicit(hash)
+ hash.keys
+ end
+
+ 5.times.map { implicit(key: :value) }.uniq
+}
+
+# default values on keywords don't mess up argument order
+assert_equal '[2]', %q{
+ def default_value
+ 1
+ end
+
+ def default_expression(value: default_value)
+ value
+ end
+
+ 5.times.map { default_expression(value: 2) }.uniq
+}
+
+# constant default values on keywords
+assert_equal '[3]', %q{
+ def default_expression(value: 3)
+ value
+ end
+
+ 5.times.map { default_expression }.uniq
+}
+
+# non-constant default values on keywords
+assert_equal '[3]', %q{
+ def default_value
+ 3
+ end
+
+ def default_expression(value: default_value)
+ value
+ end
+
+ 5.times.map { default_expression }.uniq
+}
+
+# reordered optional kwargs
+assert_equal '[[100, 1]]', %q{
+ def foo(capacity: 100, max: nil)
+ [capacity, max]
+ end
+
+ 5.times.map { foo(max: 1) }.uniq
+}
+
+# invalid lead param
+assert_equal 'ok', %q{
+ def bar(baz: 2)
+ baz
+ end
+
+ def foo
+ bar(1, baz: 123)
+ end
+
+ begin
+ foo
+ foo
+ rescue ArgumentError => e
+ print "ok"
+ end
+}
+
+# reordered required kwargs
+assert_equal '[[1, 2, 3, 4]]', %q{
+ def foo(default1: 1, required1:, default2: 3, required2:)
+ [default1, required1, default2, required2]
+ end
+
+ 5.times.map { foo(required1: 2, required2: 4) }.uniq
+}
+
+# reordered default expression kwargs
+assert_equal '[[:one, :two, 3]]', %q{
+ def foo(arg1: (1+0), arg2: (2+0), arg3: (3+0))
+ [arg1, arg2, arg3]
+ end
+
+ 5.times.map { foo(arg2: :two, arg1: :one) }.uniq
+}
+
+# complex kwargs
+assert_equal '[[1, 2, 3, 4]]', %q{
+ def foo(required:, specified: 999, simple_default: 3, complex_default: "4".to_i)
+ [required, specified, simple_default, complex_default]
+ end
+
+ 5.times.map { foo(specified: 2, required: 1) }.uniq
+}
+
+# cfunc kwargs
+assert_equal '{:foo=>123}', %q{
+ def foo(bar)
+ bar.store(:value, foo: 123)
+ bar[:value]
+ end
+
+ foo({})
+ foo({})
+}
+
+# cfunc kwargs
+assert_equal '{:foo=>123}', %q{
+ def foo(bar)
+ bar.replace(foo: 123)
+ end
+
+ foo({})
+ foo({})
+}
+
+# cfunc kwargs
+assert_equal '{:foo=>123, :bar=>456}', %q{
+ def foo(bar)
+ bar.replace(foo: 123, bar: 456)
+ end
+
+ foo({})
+ foo({})
+}
+
+# variadic cfunc kwargs
+assert_equal '{:foo=>123}', %q{
+ def foo(bar)
+ bar.merge(foo: 123)
+ end
+
+ foo({})
+ foo({})
+}
+
+# optimized cfunc kwargs
+assert_equal 'false', %q{
+ def foo
+ :foo.eql?(foo: :foo)
+ end
+
+ foo
+ foo
+}
+
+# attr_reader on frozen object
+assert_equal 'false', %q{
+ class Foo
+ attr_reader :exception
+
+ def failed?
+ !exception.nil?
+ end
+ end
+
+ foo = Foo.new.freeze
+ foo.failed?
+ foo.failed?
+}
+
+# regression test for doing kwarg shuffle before checking for interrupts
+assert_equal 'ok', %q{
+ def new_media_drop(attributes:, product_drop:, context:, sources:)
+ nil.nomethod rescue nil # force YJIT to bail to side exit
+
+ [attributes, product_drop, context, sources]
+ end
+
+ def load_medias(product_drop: nil, raw_medias:, context:)
+ raw_medias.map do |raw_media|
+ case new_media_drop(context: context, attributes: raw_media, product_drop: product_drop, sources: [])
+ in [Hash, ProductDrop, Context, Array]
+ else
+ raise "bad shuffle"
+ end
+ end
+ end
+
+ class Context; end
+
+ class ProductDrop
+ attr_reader :title
+ def initialize(title)
+ @title = title
+ end
+ end
+
+ # Make a thread so we have thread switching interrupts
+ th = Thread.new do
+ while true; end
+ end
+ 1_000.times do |i|
+ load_medias(product_drop: ProductDrop.new("foo"), raw_medias: [{}, {}], context: Context.new)
+ end
+ th.kill.join
+
+ :ok
+}
+
+# regression test for tracing attr_accessor methods.
+assert_equal "true", %q{
+ c = Class.new do
+ attr_accessor :x
+ alias y x
+ alias y= x=
+ end
+ obj = c.new
+
+ ar_meth = obj.method(:x)
+ aw_meth = obj.method(:x=)
+ aar_meth = obj.method(:y)
+ aaw_meth = obj.method(:y=)
+ events = []
+ trace = TracePoint.new(:c_call, :c_return){|tp|
+ next if tp.path != __FILE__
+ next if tp.method_id == :call
+ case tp.event
+ when :c_call
+ events << [tp.event, tp.method_id, tp.callee_id]
+ when :c_return
+ events << [tp.event, tp.method_id, tp.callee_id, tp.return_value]
+ end
+ }
+ test_proc = proc do
+ obj.x = 1
+ obj.x
+ obj.y = 2
+ obj.y
+ aw_meth.call(1)
+ ar_meth.call
+ aaw_meth.call(2)
+ aar_meth.call
+ end
+ test_proc.call # populate call caches
+ trace.enable(&test_proc)
+ expected = [
+ [:c_call, :x=, :x=],
+ [:c_return, :x=, :x=, 1],
+ [:c_call, :x, :x],
+ [:c_return, :x, :x, 1],
+ [:c_call, :x=, :y=],
+ [:c_return, :x=, :y=, 2],
+ [:c_call, :x, :y],
+ [:c_return, :x, :y, 2],
+ ] * 2
+
+ expected == events
+}
+
+# duphash
+assert_equal '{:foo=>123}', %q{
+ def foo
+ {foo: 123}
+ end
+
+ foo
+ foo
+}
+
+# newhash
+assert_equal '{:foo=>2}', %q{
+ def foo
+ {foo: 1+1}
+ end
+
+ foo
+ foo
+}
+
+# block invalidation edge case
+assert_equal 'undef', %q{
+ class A
+ def foo(arg)
+ arg.times { A.remove_method(:bar) }
+ self
+ end
+
+ def bar
+ 4
+ end
+
+ def use(arg)
+ # two consecutive sends. When bar is removed, the return address
+ # for calling it is already on foo's control frame
+ foo(arg).bar
+ rescue NoMethodError
+ :undef
+ end
+ end
+
+ A.new.use 0
+ A.new.use 0
+ A.new.use 1
+}
+
+# block invalidation edge case
+assert_equal 'ok', %q{
+ class A
+ Good = :ng
+ def foo(arg)
+ arg.times { A.const_set(:Good, :ok) }
+ self
+ end
+
+ def id(arg)
+ arg
+ end
+
+ def use(arg)
+ # send followed by an opt_getinlinecache.
+ # The return address remains on the control frame
+ # when opt_getinlinecache is invalidated.
+ foo(arg).id(Good)
+ end
+ end
+
+ A.new.use 0
+ A.new.use 0
+ A.new.use 1
+}
+
+assert_equal 'ok', %q{
+ # test hitting a branch stub when out of memory
+ def nimai(jita)
+ if jita
+ :ng
+ else
+ :ok
+ end
+ end
+
+ nimai(true)
+ nimai(true)
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ nimai(false)
+}
+
+assert_equal 'new', %q{
+ # test block invalidation while out of memory
+ def foo
+ :old
+ end
+
+ def test
+ foo
+ end
+
+ def bar
+ :bar
+ end
+
+
+ test
+ test
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ # Old simulat_omm! leaves one byte of space and this fills it up
+ bar
+ bar
+
+ def foo
+ :new
+ end
+
+ test
+}
+
+assert_equal 'ok', %q{
+ # Try to compile new method while OOM
+ def foo
+ :ok
+ end
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ foo
+ foo
+}
+
+# struct aref embedded
+assert_equal '2', %q{
+ def foo(s)
+ s.foo
+ end
+
+ S = Struct.new(:foo)
+ foo(S.new(1))
+ foo(S.new(2))
+}
+
+# struct aref non-embedded
+assert_equal '4', %q{
+ def foo(s)
+ s.d
+ end
+
+ S = Struct.new(:a, :b, :c, :d, :e)
+ foo(S.new(1,2,3,4,5))
+ foo(S.new(1,2,3,4,5))
+}
+
+# struct aset embedded
+assert_equal '123', %q{
+ def foo(s)
+ s.foo = 123
+ end
+
+ s = Struct.new(:foo).new
+ foo(s)
+ s = Struct.new(:foo).new
+ foo(s)
+ s.foo
+}
+
+# struct aset non-embedded
+assert_equal '[1, 2, 3, 4, 5]', %q{
+ def foo(s)
+ s.a = 1
+ s.b = 2
+ s.c = 3
+ s.d = 4
+ s.e = 5
+ end
+
+ S = Struct.new(:a, :b, :c, :d, :e)
+ s = S.new
+ foo(s)
+ s = S.new
+ foo(s)
+ [s.a, s.b, s.c, s.d, s.e]
+}
+
+# struct aref too many args
+assert_equal 'ok', %q{
+ def foo(s)
+ s.foo(:bad)
+ end
+
+ s = Struct.new(:foo).new
+ foo(s) rescue :ok
+ foo(s) rescue :ok
+}
+
+# struct aset too many args
+assert_equal 'ok', %q{
+ def foo(s)
+ s.set_foo(123, :bad)
+ end
+
+ s = Struct.new(:foo) do
+ alias :set_foo :foo=
+ end
+ foo(s) rescue :ok
+ foo(s) rescue :ok
+}
+
+# File.join is a cfunc accepting variable arguments as a Ruby array (argc = -2)
+assert_equal 'foo/bar', %q{
+ def foo
+ File.join("foo", "bar")
+ end
+
+ foo
+ foo
+}
+
+# File.join is a cfunc accepting variable arguments as a Ruby array (argc = -2)
+assert_equal '', %q{
+ def foo
+ File.join()
+ end
+
+ foo
+ foo
+}
+
+# Make sure we're correctly reading RStruct's as.ary union for embedded RStructs
+assert_equal '3,12', %q{
+ pt_struct = Struct.new(:x, :y)
+ p = pt_struct.new(3, 12)
+ def pt_inspect(pt)
+ "#{pt.x},#{pt.y}"
+ end
+
+ # Make sure pt_inspect is JITted
+ 10.times { pt_inspect(p) }
+
+ # Make sure it's returning '3,12' instead of e.g. '3,false'
+ pt_inspect(p)
+}
+
+# Regression test for deadlock between branch_stub_hit and ractor_receive_if
+assert_equal '10', %q{
+ r = Ractor.new Ractor.current do |main|
+ main << 1
+ main << 2
+ main << 3
+ main << 4
+ main << 5
+ main << 6
+ main << 7
+ main << 8
+ main << 9
+ main << 10
+ end
+
+ a = []
+ a << Ractor.receive_if{|msg| msg == 10}
+ a << Ractor.receive_if{|msg| msg == 9}
+ a << Ractor.receive_if{|msg| msg == 8}
+ a << Ractor.receive_if{|msg| msg == 7}
+ a << Ractor.receive_if{|msg| msg == 6}
+ a << Ractor.receive_if{|msg| msg == 5}
+ a << Ractor.receive_if{|msg| msg == 4}
+ a << Ractor.receive_if{|msg| msg == 3}
+ a << Ractor.receive_if{|msg| msg == 2}
+ a << Ractor.receive_if{|msg| msg == 1}
+
+ a.length
+}
+
+# checktype
+assert_equal 'false', %q{
+ def function()
+ [1, 2] in [Integer, String]
+ end
+ function()
+}
+
+# opt_send_without_block (VM_METHOD_TYPE_ATTRSET)
+assert_equal 'foo', %q{
+ class Foo
+ attr_writer :foo
+
+ def foo()
+ self.foo = "foo"
+ end
+ end
+ foo = Foo.new
+ foo.foo
+}
+
+# anytostring, intern
+assert_equal 'true', %q{
+ def foo()
+ :"#{true}"
+ end
+ foo()
+}
+
+# toregexp, objtostring
+assert_equal '/true/', %q{
+ def foo()
+ /#{true}/
+ end
+ foo().inspect
+}
+
+# concatstrings, objtostring
+assert_equal '9001', %q{
+ def foo()
+ "#{9001}"
+ end
+ foo()
+}
+
+# opt_send_without_block (VM_METHOD_TYPE_CFUNC)
+assert_equal 'nil', %q{
+ def foo
+ nil.inspect # argc: 0
+ end
+ foo
+}
+assert_equal '4', %q{
+ def foo
+ 2.pow(2) # argc: 1
+ end
+ foo
+}
+assert_equal 'aba', %q{
+ def foo
+ "abc".tr("c", "a") # argc: 2
+ end
+ foo
+}
+assert_equal 'true', %q{
+ def foo
+ respond_to?(:inspect) # argc: -1
+ end
+ foo
+}
+assert_equal '["a", "b"]', %q{
+ def foo
+ "a\nb".lines(chomp: true) # kwargs
+ end
+ foo
+}
+
+# invokebuiltin
+assert_equal '123', %q{
+ def foo(obj)
+ obj.foo = 123
+ end
+
+ struct = Struct.new(:foo)
+ obj = struct.new
+ foo(obj)
+}
+
+# invokebuiltin_delegate
+assert_equal '.', %q{
+ def foo(path)
+ Dir.open(path).path
+ end
+ foo(".")
+}
+
+# opt_invokebuiltin_delegate_leave
+assert_equal '[0]', %q{"\x00".unpack("c")}
+
+# opt_send_without_block (VM_METHOD_TYPE_ISEQ)
+assert_equal '1', %q{
+ def foo = 1
+ def bar = foo
+ bar
+}
+assert_equal '[1, 2, 3]', %q{
+ def foo(a, b) = [1, a, b]
+ def bar = foo(2, 3)
+ bar
+}
+assert_equal '[1, 2, 3, 4, 5, 6]', %q{
+ def foo(a, b, c:, d:, e: 0, f: 6) = [a, b, c, d, e, f]
+ def bar = foo(1, 2, c: 3, d: 4, e: 5)
+ bar
+}
+assert_equal '[1, 2, 3, 4]', %q{
+ def foo(a, b = 2) = [a, b]
+ def bar = foo(1) + foo(3, 4)
+ bar
+}
+
+assert_equal '1', %q{
+ def foo(a) = a
+ def bar = foo(1) { 2 }
+ bar
+}
+assert_equal '[1, 2]', %q{
+ def foo(a, &block) = [a, block.call]
+ def bar = foo(1) { 2 }
+ bar
+}
+
+# opt_send_without_block (VM_METHOD_TYPE_IVAR)
+assert_equal 'foo', %q{
+ class Foo
+ attr_reader :foo
+
+ def initialize
+ @foo = "foo"
+ end
+ end
+ Foo.new.foo
+}
+
+# opt_send_without_block (VM_METHOD_TYPE_OPTIMIZED)
+assert_equal 'foo', %q{
+ Foo = Struct.new(:bar)
+ Foo.new("bar").bar = "foo"
+}
+assert_equal 'foo', %q{
+ Foo = Struct.new(:bar)
+ Foo.new("foo").bar
+}
+
+# getblockparamproxy
+assert_equal 'foo', %q{
+ def foo(&block)
+ block.call
+ end
+ foo { "foo" }
+}
+
+# getblockparam
+assert_equal 'foo', %q{
+ def foo(&block)
+ block
+ end
+ foo { "foo" }.call
+}
+
+assert_equal '[1, 2]', %q{
+ def foo
+ x = [2]
+ [1, *x]
+ end
+
+ foo
+ foo
+}
+
+# respond_to? with changing symbol
+assert_equal 'false', %q{
+ def foo(name)
+ :sym.respond_to?(name)
+ end
+ foo(:to_s)
+ foo(:to_s)
+ foo(:not_exist)
+}
+
+# respond_to? with method being defined
+assert_equal 'true', %q{
+ def foo
+ :sym.respond_to?(:not_yet_defined)
+ end
+ foo
+ foo
+ module Kernel
+ def not_yet_defined = true
+ end
+ foo
+}
+
+# respond_to? with undef method
+assert_equal 'false', %q{
+ module Kernel
+ def to_be_removed = true
+ end
+ def foo
+ :sym.respond_to?(:to_be_removed)
+ end
+ foo
+ foo
+ class Object
+ undef_method :to_be_removed
+ end
+ foo
+}
+
+# respond_to? with respond_to_missing?
+assert_equal 'true', %q{
+ class Foo
+ end
+ def foo(x)
+ x.respond_to?(:bar)
+ end
+ foo(Foo.new)
+ foo(Foo.new)
+ class Foo
+ def respond_to_missing?(*) = true
+ end
+ foo(Foo.new)
+}
+
+# bmethod
+assert_equal '[1, 2, 3]', %q{
+ one = 1
+ define_method(:foo) do
+ one
+ end
+
+ 3.times.map { |i| foo + i }
+}
+
+# return inside bmethod
+assert_equal 'ok', %q{
+ define_method(:foo) do
+ 1.tap { return :ok }
+ end
+
+ foo
+}
+
+# bmethod optional and keywords
+assert_equal '[[1, nil, 2]]', %q{
+ define_method(:opt_and_kwargs) do |a = {}, b: nil, c: nil|
+ [a, b, c]
+ end
+
+ 5.times.map { opt_and_kwargs(1, c: 2) }.uniq
+}
+
+# bmethod with forwarded block
+assert_equal '2', %q{
+ define_method(:foo) do |&block|
+ block.call
+ end
+
+ def bar(&block)
+ foo(&block)
+ end
+
+ bar { 1 }
+ bar { 2 }
+}
+
+# bmethod with forwarded block and arguments
+assert_equal '5', %q{
+ define_method(:foo) do |n, &block|
+ n + block.call
+ end
+
+ def bar(n, &block)
+ foo(n, &block)
+ end
+
+ bar(0) { 1 }
+ bar(3) { 2 }
+}
+
+# bmethod with forwarded unwanted block
+assert_equal '1', %q{
+ one = 1
+ define_method(:foo) do
+ one
+ end
+
+ def bar(&block)
+ foo(&block)
+ end
+
+ bar { }
+ bar { }
+}
+
+# test for return stub lifetime issue
+assert_equal '1', %q{
+ def foo(n)
+ if n == 2
+ return 1.times { Object.define_method(:foo) {} }
+ end
+
+ foo(n + 1)
+ end
+
+ foo(1)
+}
+
+# case-when with redefined ===
+assert_equal 'ok', %q{
+ class Symbol
+ def ===(a)
+ true
+ end
+ end
+
+ def cw(arg)
+ case arg
+ when :b
+ :ok
+ when 4
+ :ng
+ end
+ end
+
+ cw(4)
+}
+
+assert_normal_exit %{
+ class Bug20997
+ def foo(&) = self.class.name(&)
+
+ new.foo
+ end
+}
diff --git a/bootstraptest/test_yjit_30k_ifelse.rb b/bootstraptest/test_yjit_30k_ifelse.rb
new file mode 100644
index 0000000000..c3afa95e4d
--- /dev/null
+++ b/bootstraptest/test_yjit_30k_ifelse.rb
@@ -0,0 +1,241023 @@
+# This is a torture test for the JIT.
+# There are 30K tiny methods with if-else statements in a 30-deep call hierarchy.
+assert_equal '100000', %q{
+
+def fun_l0_n0(x)
+ if (x < 1)
+ fun_l1_n310(x)
+ else
+ fun_l1_n485(x)
+ end
+end
+
+def fun_l0_n1(x)
+ if (x < 1)
+ fun_l1_n930(x)
+ else
+ fun_l1_n418(x)
+ end
+end
+
+def fun_l0_n2(x)
+ if (x < 1)
+ fun_l1_n549(x)
+ else
+ fun_l1_n44(x)
+ end
+end
+
+def fun_l0_n3(x)
+ if (x < 1)
+ fun_l1_n394(x)
+ else
+ fun_l1_n447(x)
+ end
+end
+
+def fun_l0_n4(x)
+ if (x < 1)
+ fun_l1_n683(x)
+ else
+ fun_l1_n547(x)
+ end
+end
+
+def fun_l0_n5(x)
+ if (x < 1)
+ fun_l1_n320(x)
+ else
+ fun_l1_n896(x)
+ end
+end
+
+def fun_l0_n6(x)
+ if (x < 1)
+ fun_l1_n649(x)
+ else
+ fun_l1_n243(x)
+ end
+end
+
+def fun_l0_n7(x)
+ if (x < 1)
+ fun_l1_n100(x)
+ else
+ fun_l1_n243(x)
+ end
+end
+
+def fun_l0_n8(x)
+ if (x < 1)
+ fun_l1_n839(x)
+ else
+ fun_l1_n720(x)
+ end
+end
+
+def fun_l0_n9(x)
+ if (x < 1)
+ fun_l1_n177(x)
+ else
+ fun_l1_n555(x)
+ end
+end
+
+def fun_l0_n10(x)
+ if (x < 1)
+ fun_l1_n814(x)
+ else
+ fun_l1_n900(x)
+ end
+end
+
+def fun_l0_n11(x)
+ if (x < 1)
+ fun_l1_n585(x)
+ else
+ fun_l1_n901(x)
+ end
+end
+
+def fun_l0_n12(x)
+ if (x < 1)
+ fun_l1_n952(x)
+ else
+ fun_l1_n270(x)
+ end
+end
+
+def fun_l0_n13(x)
+ if (x < 1)
+ fun_l1_n172(x)
+ else
+ fun_l1_n209(x)
+ end
+end
+
+def fun_l0_n14(x)
+ if (x < 1)
+ fun_l1_n514(x)
+ else
+ fun_l1_n414(x)
+ end
+end
+
+def fun_l0_n15(x)
+ if (x < 1)
+ fun_l1_n190(x)
+ else
+ fun_l1_n100(x)
+ end
+end
+
+def fun_l0_n16(x)
+ if (x < 1)
+ fun_l1_n696(x)
+ else
+ fun_l1_n997(x)
+ end
+end
+
+def fun_l0_n17(x)
+ if (x < 1)
+ fun_l1_n568(x)
+ else
+ fun_l1_n820(x)
+ end
+end
+
+def fun_l0_n18(x)
+ if (x < 1)
+ fun_l1_n837(x)
+ else
+ fun_l1_n588(x)
+ end
+end
+
+def fun_l0_n19(x)
+ if (x < 1)
+ fun_l1_n206(x)
+ else
+ fun_l1_n126(x)
+ end
+end
+
+def fun_l0_n20(x)
+ if (x < 1)
+ fun_l1_n317(x)
+ else
+ fun_l1_n722(x)
+ end
+end
+
+def fun_l0_n21(x)
+ if (x < 1)
+ fun_l1_n614(x)
+ else
+ fun_l1_n372(x)
+ end
+end
+
+def fun_l0_n22(x)
+ if (x < 1)
+ fun_l1_n530(x)
+ else
+ fun_l1_n862(x)
+ end
+end
+
+def fun_l0_n23(x)
+ if (x < 1)
+ fun_l1_n889(x)
+ else
+ fun_l1_n271(x)
+ end
+end
+
+def fun_l0_n24(x)
+ if (x < 1)
+ fun_l1_n996(x)
+ else
+ fun_l1_n717(x)
+ end
+end
+
+def fun_l0_n25(x)
+ if (x < 1)
+ fun_l1_n726(x)
+ else
+ fun_l1_n939(x)
+ end
+end
+
+def fun_l0_n26(x)
+ if (x < 1)
+ fun_l1_n316(x)
+ else
+ fun_l1_n293(x)
+ end
+end
+
+def fun_l0_n27(x)
+ if (x < 1)
+ fun_l1_n90(x)
+ else
+ fun_l1_n596(x)
+ end
+end
+
+def fun_l0_n28(x)
+ if (x < 1)
+ fun_l1_n743(x)
+ else
+ fun_l1_n782(x)
+ end
+end
+
+def fun_l0_n29(x)
+ if (x < 1)
+ fun_l1_n896(x)
+ else
+ fun_l1_n247(x)
+ end
+end
+
+def fun_l0_n30(x)
+ if (x < 1)
+ fun_l1_n2(x)
+ else
+ fun_l1_n377(x)
+ end
+end
+
+def fun_l0_n31(x)
+ if (x < 1)
+ fun_l1_n380(x)
+ else
+ fun_l1_n655(x)
+ end
+end
+
+def fun_l0_n32(x)
+ if (x < 1)
+ fun_l1_n572(x)
+ else
+ fun_l1_n778(x)
+ end
+end
+
+def fun_l0_n33(x)
+ if (x < 1)
+ fun_l1_n485(x)
+ else
+ fun_l1_n282(x)
+ end
+end
+
+def fun_l0_n34(x)
+ if (x < 1)
+ fun_l1_n703(x)
+ else
+ fun_l1_n179(x)
+ end
+end
+
+def fun_l0_n35(x)
+ if (x < 1)
+ fun_l1_n281(x)
+ else
+ fun_l1_n572(x)
+ end
+end
+
+def fun_l0_n36(x)
+ if (x < 1)
+ fun_l1_n48(x)
+ else
+ fun_l1_n286(x)
+ end
+end
+
+def fun_l0_n37(x)
+ if (x < 1)
+ fun_l1_n539(x)
+ else
+ fun_l1_n86(x)
+ end
+end
+
+def fun_l0_n38(x)
+ if (x < 1)
+ fun_l1_n918(x)
+ else
+ fun_l1_n778(x)
+ end
+end
+
+def fun_l0_n39(x)
+ if (x < 1)
+ fun_l1_n832(x)
+ else
+ fun_l1_n94(x)
+ end
+end
+
+def fun_l0_n40(x)
+ if (x < 1)
+ fun_l1_n213(x)
+ else
+ fun_l1_n580(x)
+ end
+end
+
+def fun_l0_n41(x)
+ if (x < 1)
+ fun_l1_n413(x)
+ else
+ fun_l1_n793(x)
+ end
+end
+
+def fun_l0_n42(x)
+ if (x < 1)
+ fun_l1_n451(x)
+ else
+ fun_l1_n779(x)
+ end
+end
+
+def fun_l0_n43(x)
+ if (x < 1)
+ fun_l1_n118(x)
+ else
+ fun_l1_n778(x)
+ end
+end
+
+def fun_l0_n44(x)
+ if (x < 1)
+ fun_l1_n162(x)
+ else
+ fun_l1_n901(x)
+ end
+end
+
+def fun_l0_n45(x)
+ if (x < 1)
+ fun_l1_n157(x)
+ else
+ fun_l1_n280(x)
+ end
+end
+
+def fun_l0_n46(x)
+ if (x < 1)
+ fun_l1_n748(x)
+ else
+ fun_l1_n881(x)
+ end
+end
+
+def fun_l0_n47(x)
+ if (x < 1)
+ fun_l1_n529(x)
+ else
+ fun_l1_n732(x)
+ end
+end
+
+def fun_l0_n48(x)
+ if (x < 1)
+ fun_l1_n417(x)
+ else
+ fun_l1_n483(x)
+ end
+end
+
+def fun_l0_n49(x)
+ if (x < 1)
+ fun_l1_n743(x)
+ else
+ fun_l1_n525(x)
+ end
+end
+
+def fun_l0_n50(x)
+ if (x < 1)
+ fun_l1_n14(x)
+ else
+ fun_l1_n309(x)
+ end
+end
+
+def fun_l0_n51(x)
+ if (x < 1)
+ fun_l1_n436(x)
+ else
+ fun_l1_n304(x)
+ end
+end
+
+def fun_l0_n52(x)
+ if (x < 1)
+ fun_l1_n623(x)
+ else
+ fun_l1_n590(x)
+ end
+end
+
+def fun_l0_n53(x)
+ if (x < 1)
+ fun_l1_n696(x)
+ else
+ fun_l1_n53(x)
+ end
+end
+
+def fun_l0_n54(x)
+ if (x < 1)
+ fun_l1_n807(x)
+ else
+ fun_l1_n523(x)
+ end
+end
+
+def fun_l0_n55(x)
+ if (x < 1)
+ fun_l1_n607(x)
+ else
+ fun_l1_n609(x)
+ end
+end
+
+def fun_l0_n56(x)
+ if (x < 1)
+ fun_l1_n721(x)
+ else
+ fun_l1_n994(x)
+ end
+end
+
+def fun_l0_n57(x)
+ if (x < 1)
+ fun_l1_n472(x)
+ else
+ fun_l1_n818(x)
+ end
+end
+
+def fun_l0_n58(x)
+ if (x < 1)
+ fun_l1_n30(x)
+ else
+ fun_l1_n954(x)
+ end
+end
+
+def fun_l0_n59(x)
+ if (x < 1)
+ fun_l1_n223(x)
+ else
+ fun_l1_n148(x)
+ end
+end
+
+def fun_l0_n60(x)
+ if (x < 1)
+ fun_l1_n761(x)
+ else
+ fun_l1_n40(x)
+ end
+end
+
+def fun_l0_n61(x)
+ if (x < 1)
+ fun_l1_n57(x)
+ else
+ fun_l1_n858(x)
+ end
+end
+
+def fun_l0_n62(x)
+ if (x < 1)
+ fun_l1_n114(x)
+ else
+ fun_l1_n767(x)
+ end
+end
+
+def fun_l0_n63(x)
+ if (x < 1)
+ fun_l1_n287(x)
+ else
+ fun_l1_n752(x)
+ end
+end
+
+def fun_l0_n64(x)
+ if (x < 1)
+ fun_l1_n16(x)
+ else
+ fun_l1_n229(x)
+ end
+end
+
+def fun_l0_n65(x)
+ if (x < 1)
+ fun_l1_n230(x)
+ else
+ fun_l1_n954(x)
+ end
+end
+
+def fun_l0_n66(x)
+ if (x < 1)
+ fun_l1_n98(x)
+ else
+ fun_l1_n320(x)
+ end
+end
+
+def fun_l0_n67(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n985(x)
+ end
+end
+
+def fun_l0_n68(x)
+ if (x < 1)
+ fun_l1_n32(x)
+ else
+ fun_l1_n648(x)
+ end
+end
+
+def fun_l0_n69(x)
+ if (x < 1)
+ fun_l1_n453(x)
+ else
+ fun_l1_n466(x)
+ end
+end
+
+def fun_l0_n70(x)
+ if (x < 1)
+ fun_l1_n787(x)
+ else
+ fun_l1_n802(x)
+ end
+end
+
+def fun_l0_n71(x)
+ if (x < 1)
+ fun_l1_n656(x)
+ else
+ fun_l1_n347(x)
+ end
+end
+
+def fun_l0_n72(x)
+ if (x < 1)
+ fun_l1_n358(x)
+ else
+ fun_l1_n336(x)
+ end
+end
+
+def fun_l0_n73(x)
+ if (x < 1)
+ fun_l1_n291(x)
+ else
+ fun_l1_n536(x)
+ end
+end
+
+def fun_l0_n74(x)
+ if (x < 1)
+ fun_l1_n795(x)
+ else
+ fun_l1_n606(x)
+ end
+end
+
+def fun_l0_n75(x)
+ if (x < 1)
+ fun_l1_n21(x)
+ else
+ fun_l1_n720(x)
+ end
+end
+
+def fun_l0_n76(x)
+ if (x < 1)
+ fun_l1_n513(x)
+ else
+ fun_l1_n300(x)
+ end
+end
+
+def fun_l0_n77(x)
+ if (x < 1)
+ fun_l1_n358(x)
+ else
+ fun_l1_n332(x)
+ end
+end
+
+def fun_l0_n78(x)
+ if (x < 1)
+ fun_l1_n712(x)
+ else
+ fun_l1_n906(x)
+ end
+end
+
+def fun_l0_n79(x)
+ if (x < 1)
+ fun_l1_n555(x)
+ else
+ fun_l1_n850(x)
+ end
+end
+
+def fun_l0_n80(x)
+ if (x < 1)
+ fun_l1_n320(x)
+ else
+ fun_l1_n892(x)
+ end
+end
+
+def fun_l0_n81(x)
+ if (x < 1)
+ fun_l1_n191(x)
+ else
+ fun_l1_n187(x)
+ end
+end
+
+def fun_l0_n82(x)
+ if (x < 1)
+ fun_l1_n457(x)
+ else
+ fun_l1_n718(x)
+ end
+end
+
+def fun_l0_n83(x)
+ if (x < 1)
+ fun_l1_n314(x)
+ else
+ fun_l1_n697(x)
+ end
+end
+
+def fun_l0_n84(x)
+ if (x < 1)
+ fun_l1_n459(x)
+ else
+ fun_l1_n500(x)
+ end
+end
+
+def fun_l0_n85(x)
+ if (x < 1)
+ fun_l1_n912(x)
+ else
+ fun_l1_n992(x)
+ end
+end
+
+def fun_l0_n86(x)
+ if (x < 1)
+ fun_l1_n523(x)
+ else
+ fun_l1_n201(x)
+ end
+end
+
+def fun_l0_n87(x)
+ if (x < 1)
+ fun_l1_n30(x)
+ else
+ fun_l1_n829(x)
+ end
+end
+
+def fun_l0_n88(x)
+ if (x < 1)
+ fun_l1_n223(x)
+ else
+ fun_l1_n799(x)
+ end
+end
+
+def fun_l0_n89(x)
+ if (x < 1)
+ fun_l1_n289(x)
+ else
+ fun_l1_n289(x)
+ end
+end
+
+def fun_l0_n90(x)
+ if (x < 1)
+ fun_l1_n961(x)
+ else
+ fun_l1_n694(x)
+ end
+end
+
+def fun_l0_n91(x)
+ if (x < 1)
+ fun_l1_n423(x)
+ else
+ fun_l1_n848(x)
+ end
+end
+
+def fun_l0_n92(x)
+ if (x < 1)
+ fun_l1_n612(x)
+ else
+ fun_l1_n358(x)
+ end
+end
+
+def fun_l0_n93(x)
+ if (x < 1)
+ fun_l1_n148(x)
+ else
+ fun_l1_n312(x)
+ end
+end
+
+def fun_l0_n94(x)
+ if (x < 1)
+ fun_l1_n771(x)
+ else
+ fun_l1_n205(x)
+ end
+end
+
+def fun_l0_n95(x)
+ if (x < 1)
+ fun_l1_n573(x)
+ else
+ fun_l1_n692(x)
+ end
+end
+
+def fun_l0_n96(x)
+ if (x < 1)
+ fun_l1_n66(x)
+ else
+ fun_l1_n936(x)
+ end
+end
+
+def fun_l0_n97(x)
+ if (x < 1)
+ fun_l1_n429(x)
+ else
+ fun_l1_n949(x)
+ end
+end
+
+def fun_l0_n98(x)
+ if (x < 1)
+ fun_l1_n737(x)
+ else
+ fun_l1_n338(x)
+ end
+end
+
+def fun_l0_n99(x)
+ if (x < 1)
+ fun_l1_n335(x)
+ else
+ fun_l1_n739(x)
+ end
+end
+
+def fun_l0_n100(x)
+ if (x < 1)
+ fun_l1_n989(x)
+ else
+ fun_l1_n735(x)
+ end
+end
+
+def fun_l0_n101(x)
+ if (x < 1)
+ fun_l1_n559(x)
+ else
+ fun_l1_n478(x)
+ end
+end
+
+def fun_l0_n102(x)
+ if (x < 1)
+ fun_l1_n261(x)
+ else
+ fun_l1_n162(x)
+ end
+end
+
+def fun_l0_n103(x)
+ if (x < 1)
+ fun_l1_n400(x)
+ else
+ fun_l1_n156(x)
+ end
+end
+
+def fun_l0_n104(x)
+ if (x < 1)
+ fun_l1_n747(x)
+ else
+ fun_l1_n361(x)
+ end
+end
+
+def fun_l0_n105(x)
+ if (x < 1)
+ fun_l1_n717(x)
+ else
+ fun_l1_n522(x)
+ end
+end
+
+def fun_l0_n106(x)
+ if (x < 1)
+ fun_l1_n513(x)
+ else
+ fun_l1_n150(x)
+ end
+end
+
+def fun_l0_n107(x)
+ if (x < 1)
+ fun_l1_n710(x)
+ else
+ fun_l1_n602(x)
+ end
+end
+
+def fun_l0_n108(x)
+ if (x < 1)
+ fun_l1_n866(x)
+ else
+ fun_l1_n111(x)
+ end
+end
+
+def fun_l0_n109(x)
+ if (x < 1)
+ fun_l1_n725(x)
+ else
+ fun_l1_n448(x)
+ end
+end
+
+def fun_l0_n110(x)
+ if (x < 1)
+ fun_l1_n703(x)
+ else
+ fun_l1_n127(x)
+ end
+end
+
+def fun_l0_n111(x)
+ if (x < 1)
+ fun_l1_n420(x)
+ else
+ fun_l1_n666(x)
+ end
+end
+
+def fun_l0_n112(x)
+ if (x < 1)
+ fun_l1_n647(x)
+ else
+ fun_l1_n567(x)
+ end
+end
+
+def fun_l0_n113(x)
+ if (x < 1)
+ fun_l1_n543(x)
+ else
+ fun_l1_n992(x)
+ end
+end
+
+def fun_l0_n114(x)
+ if (x < 1)
+ fun_l1_n12(x)
+ else
+ fun_l1_n470(x)
+ end
+end
+
+def fun_l0_n115(x)
+ if (x < 1)
+ fun_l1_n25(x)
+ else
+ fun_l1_n917(x)
+ end
+end
+
+def fun_l0_n116(x)
+ if (x < 1)
+ fun_l1_n201(x)
+ else
+ fun_l1_n110(x)
+ end
+end
+
+def fun_l0_n117(x)
+ if (x < 1)
+ fun_l1_n222(x)
+ else
+ fun_l1_n747(x)
+ end
+end
+
+def fun_l0_n118(x)
+ if (x < 1)
+ fun_l1_n990(x)
+ else
+ fun_l1_n794(x)
+ end
+end
+
+def fun_l0_n119(x)
+ if (x < 1)
+ fun_l1_n712(x)
+ else
+ fun_l1_n5(x)
+ end
+end
+
+def fun_l0_n120(x)
+ if (x < 1)
+ fun_l1_n28(x)
+ else
+ fun_l1_n89(x)
+ end
+end
+
+def fun_l0_n121(x)
+ if (x < 1)
+ fun_l1_n341(x)
+ else
+ fun_l1_n983(x)
+ end
+end
+
+def fun_l0_n122(x)
+ if (x < 1)
+ fun_l1_n123(x)
+ else
+ fun_l1_n452(x)
+ end
+end
+
+def fun_l0_n123(x)
+ if (x < 1)
+ fun_l1_n514(x)
+ else
+ fun_l1_n949(x)
+ end
+end
+
+def fun_l0_n124(x)
+ if (x < 1)
+ fun_l1_n280(x)
+ else
+ fun_l1_n281(x)
+ end
+end
+
+def fun_l0_n125(x)
+ if (x < 1)
+ fun_l1_n512(x)
+ else
+ fun_l1_n772(x)
+ end
+end
+
+def fun_l0_n126(x)
+ if (x < 1)
+ fun_l1_n911(x)
+ else
+ fun_l1_n693(x)
+ end
+end
+
+def fun_l0_n127(x)
+ if (x < 1)
+ fun_l1_n633(x)
+ else
+ fun_l1_n574(x)
+ end
+end
+
+def fun_l0_n128(x)
+ if (x < 1)
+ fun_l1_n318(x)
+ else
+ fun_l1_n266(x)
+ end
+end
+
+def fun_l0_n129(x)
+ if (x < 1)
+ fun_l1_n677(x)
+ else
+ fun_l1_n10(x)
+ end
+end
+
+def fun_l0_n130(x)
+ if (x < 1)
+ fun_l1_n994(x)
+ else
+ fun_l1_n48(x)
+ end
+end
+
+def fun_l0_n131(x)
+ if (x < 1)
+ fun_l1_n335(x)
+ else
+ fun_l1_n473(x)
+ end
+end
+
+def fun_l0_n132(x)
+ if (x < 1)
+ fun_l1_n641(x)
+ else
+ fun_l1_n48(x)
+ end
+end
+
+def fun_l0_n133(x)
+ if (x < 1)
+ fun_l1_n914(x)
+ else
+ fun_l1_n818(x)
+ end
+end
+
+def fun_l0_n134(x)
+ if (x < 1)
+ fun_l1_n479(x)
+ else
+ fun_l1_n761(x)
+ end
+end
+
+def fun_l0_n135(x)
+ if (x < 1)
+ fun_l1_n186(x)
+ else
+ fun_l1_n692(x)
+ end
+end
+
+def fun_l0_n136(x)
+ if (x < 1)
+ fun_l1_n325(x)
+ else
+ fun_l1_n279(x)
+ end
+end
+
+def fun_l0_n137(x)
+ if (x < 1)
+ fun_l1_n493(x)
+ else
+ fun_l1_n293(x)
+ end
+end
+
+def fun_l0_n138(x)
+ if (x < 1)
+ fun_l1_n788(x)
+ else
+ fun_l1_n364(x)
+ end
+end
+
+def fun_l0_n139(x)
+ if (x < 1)
+ fun_l1_n565(x)
+ else
+ fun_l1_n63(x)
+ end
+end
+
+def fun_l0_n140(x)
+ if (x < 1)
+ fun_l1_n128(x)
+ else
+ fun_l1_n299(x)
+ end
+end
+
+def fun_l0_n141(x)
+ if (x < 1)
+ fun_l1_n782(x)
+ else
+ fun_l1_n195(x)
+ end
+end
+
+def fun_l0_n142(x)
+ if (x < 1)
+ fun_l1_n696(x)
+ else
+ fun_l1_n117(x)
+ end
+end
+
+def fun_l0_n143(x)
+ if (x < 1)
+ fun_l1_n263(x)
+ else
+ fun_l1_n683(x)
+ end
+end
+
+def fun_l0_n144(x)
+ if (x < 1)
+ fun_l1_n633(x)
+ else
+ fun_l1_n92(x)
+ end
+end
+
+def fun_l0_n145(x)
+ if (x < 1)
+ fun_l1_n626(x)
+ else
+ fun_l1_n201(x)
+ end
+end
+
+def fun_l0_n146(x)
+ if (x < 1)
+ fun_l1_n296(x)
+ else
+ fun_l1_n425(x)
+ end
+end
+
+def fun_l0_n147(x)
+ if (x < 1)
+ fun_l1_n395(x)
+ else
+ fun_l1_n750(x)
+ end
+end
+
+def fun_l0_n148(x)
+ if (x < 1)
+ fun_l1_n164(x)
+ else
+ fun_l1_n580(x)
+ end
+end
+
+def fun_l0_n149(x)
+ if (x < 1)
+ fun_l1_n904(x)
+ else
+ fun_l1_n264(x)
+ end
+end
+
+def fun_l0_n150(x)
+ if (x < 1)
+ fun_l1_n383(x)
+ else
+ fun_l1_n558(x)
+ end
+end
+
+def fun_l0_n151(x)
+ if (x < 1)
+ fun_l1_n522(x)
+ else
+ fun_l1_n735(x)
+ end
+end
+
+def fun_l0_n152(x)
+ if (x < 1)
+ fun_l1_n496(x)
+ else
+ fun_l1_n562(x)
+ end
+end
+
+def fun_l0_n153(x)
+ if (x < 1)
+ fun_l1_n374(x)
+ else
+ fun_l1_n561(x)
+ end
+end
+
+def fun_l0_n154(x)
+ if (x < 1)
+ fun_l1_n314(x)
+ else
+ fun_l1_n368(x)
+ end
+end
+
+def fun_l0_n155(x)
+ if (x < 1)
+ fun_l1_n456(x)
+ else
+ fun_l1_n189(x)
+ end
+end
+
+def fun_l0_n156(x)
+ if (x < 1)
+ fun_l1_n46(x)
+ else
+ fun_l1_n620(x)
+ end
+end
+
+def fun_l0_n157(x)
+ if (x < 1)
+ fun_l1_n259(x)
+ else
+ fun_l1_n742(x)
+ end
+end
+
+def fun_l0_n158(x)
+ if (x < 1)
+ fun_l1_n881(x)
+ else
+ fun_l1_n786(x)
+ end
+end
+
+def fun_l0_n159(x)
+ if (x < 1)
+ fun_l1_n607(x)
+ else
+ fun_l1_n177(x)
+ end
+end
+
+def fun_l0_n160(x)
+ if (x < 1)
+ fun_l1_n824(x)
+ else
+ fun_l1_n415(x)
+ end
+end
+
+def fun_l0_n161(x)
+ if (x < 1)
+ fun_l1_n443(x)
+ else
+ fun_l1_n787(x)
+ end
+end
+
+def fun_l0_n162(x)
+ if (x < 1)
+ fun_l1_n124(x)
+ else
+ fun_l1_n529(x)
+ end
+end
+
+def fun_l0_n163(x)
+ if (x < 1)
+ fun_l1_n696(x)
+ else
+ fun_l1_n96(x)
+ end
+end
+
+def fun_l0_n164(x)
+ if (x < 1)
+ fun_l1_n775(x)
+ else
+ fun_l1_n549(x)
+ end
+end
+
+def fun_l0_n165(x)
+ if (x < 1)
+ fun_l1_n860(x)
+ else
+ fun_l1_n212(x)
+ end
+end
+
+def fun_l0_n166(x)
+ if (x < 1)
+ fun_l1_n378(x)
+ else
+ fun_l1_n904(x)
+ end
+end
+
+def fun_l0_n167(x)
+ if (x < 1)
+ fun_l1_n15(x)
+ else
+ fun_l1_n640(x)
+ end
+end
+
+def fun_l0_n168(x)
+ if (x < 1)
+ fun_l1_n771(x)
+ else
+ fun_l1_n861(x)
+ end
+end
+
+def fun_l0_n169(x)
+ if (x < 1)
+ fun_l1_n468(x)
+ else
+ fun_l1_n586(x)
+ end
+end
+
+def fun_l0_n170(x)
+ if (x < 1)
+ fun_l1_n477(x)
+ else
+ fun_l1_n674(x)
+ end
+end
+
+def fun_l0_n171(x)
+ if (x < 1)
+ fun_l1_n509(x)
+ else
+ fun_l1_n64(x)
+ end
+end
+
+def fun_l0_n172(x)
+ if (x < 1)
+ fun_l1_n612(x)
+ else
+ fun_l1_n828(x)
+ end
+end
+
+def fun_l0_n173(x)
+ if (x < 1)
+ fun_l1_n440(x)
+ else
+ fun_l1_n204(x)
+ end
+end
+
+def fun_l0_n174(x)
+ if (x < 1)
+ fun_l1_n259(x)
+ else
+ fun_l1_n947(x)
+ end
+end
+
+def fun_l0_n175(x)
+ if (x < 1)
+ fun_l1_n402(x)
+ else
+ fun_l1_n588(x)
+ end
+end
+
+def fun_l0_n176(x)
+ if (x < 1)
+ fun_l1_n245(x)
+ else
+ fun_l1_n540(x)
+ end
+end
+
+def fun_l0_n177(x)
+ if (x < 1)
+ fun_l1_n869(x)
+ else
+ fun_l1_n249(x)
+ end
+end
+
+def fun_l0_n178(x)
+ if (x < 1)
+ fun_l1_n830(x)
+ else
+ fun_l1_n210(x)
+ end
+end
+
+def fun_l0_n179(x)
+ if (x < 1)
+ fun_l1_n692(x)
+ else
+ fun_l1_n222(x)
+ end
+end
+
+def fun_l0_n180(x)
+ if (x < 1)
+ fun_l1_n220(x)
+ else
+ fun_l1_n281(x)
+ end
+end
+
+def fun_l0_n181(x)
+ if (x < 1)
+ fun_l1_n523(x)
+ else
+ fun_l1_n618(x)
+ end
+end
+
+def fun_l0_n182(x)
+ if (x < 1)
+ fun_l1_n44(x)
+ else
+ fun_l1_n422(x)
+ end
+end
+
+def fun_l0_n183(x)
+ if (x < 1)
+ fun_l1_n944(x)
+ else
+ fun_l1_n230(x)
+ end
+end
+
+def fun_l0_n184(x)
+ if (x < 1)
+ fun_l1_n678(x)
+ else
+ fun_l1_n121(x)
+ end
+end
+
+def fun_l0_n185(x)
+ if (x < 1)
+ fun_l1_n73(x)
+ else
+ fun_l1_n398(x)
+ end
+end
+
+def fun_l0_n186(x)
+ if (x < 1)
+ fun_l1_n121(x)
+ else
+ fun_l1_n689(x)
+ end
+end
+
+def fun_l0_n187(x)
+ if (x < 1)
+ fun_l1_n946(x)
+ else
+ fun_l1_n613(x)
+ end
+end
+
+def fun_l0_n188(x)
+ if (x < 1)
+ fun_l1_n987(x)
+ else
+ fun_l1_n785(x)
+ end
+end
+
+def fun_l0_n189(x)
+ if (x < 1)
+ fun_l1_n181(x)
+ else
+ fun_l1_n644(x)
+ end
+end
+
+def fun_l0_n190(x)
+ if (x < 1)
+ fun_l1_n623(x)
+ else
+ fun_l1_n679(x)
+ end
+end
+
+def fun_l0_n191(x)
+ if (x < 1)
+ fun_l1_n784(x)
+ else
+ fun_l1_n274(x)
+ end
+end
+
+def fun_l0_n192(x)
+ if (x < 1)
+ fun_l1_n71(x)
+ else
+ fun_l1_n773(x)
+ end
+end
+
+def fun_l0_n193(x)
+ if (x < 1)
+ fun_l1_n516(x)
+ else
+ fun_l1_n496(x)
+ end
+end
+
+def fun_l0_n194(x)
+ if (x < 1)
+ fun_l1_n608(x)
+ else
+ fun_l1_n460(x)
+ end
+end
+
+def fun_l0_n195(x)
+ if (x < 1)
+ fun_l1_n25(x)
+ else
+ fun_l1_n437(x)
+ end
+end
+
+def fun_l0_n196(x)
+ if (x < 1)
+ fun_l1_n410(x)
+ else
+ fun_l1_n674(x)
+ end
+end
+
+def fun_l0_n197(x)
+ if (x < 1)
+ fun_l1_n949(x)
+ else
+ fun_l1_n708(x)
+ end
+end
+
+def fun_l0_n198(x)
+ if (x < 1)
+ fun_l1_n714(x)
+ else
+ fun_l1_n119(x)
+ end
+end
+
+def fun_l0_n199(x)
+ if (x < 1)
+ fun_l1_n41(x)
+ else
+ fun_l1_n865(x)
+ end
+end
+
+def fun_l0_n200(x)
+ if (x < 1)
+ fun_l1_n383(x)
+ else
+ fun_l1_n90(x)
+ end
+end
+
+def fun_l0_n201(x)
+ if (x < 1)
+ fun_l1_n581(x)
+ else
+ fun_l1_n273(x)
+ end
+end
+
+def fun_l0_n202(x)
+ if (x < 1)
+ fun_l1_n350(x)
+ else
+ fun_l1_n425(x)
+ end
+end
+
+def fun_l0_n203(x)
+ if (x < 1)
+ fun_l1_n259(x)
+ else
+ fun_l1_n922(x)
+ end
+end
+
+def fun_l0_n204(x)
+ if (x < 1)
+ fun_l1_n448(x)
+ else
+ fun_l1_n741(x)
+ end
+end
+
+def fun_l0_n205(x)
+ if (x < 1)
+ fun_l1_n86(x)
+ else
+ fun_l1_n618(x)
+ end
+end
+
+def fun_l0_n206(x)
+ if (x < 1)
+ fun_l1_n412(x)
+ else
+ fun_l1_n646(x)
+ end
+end
+
+def fun_l0_n207(x)
+ if (x < 1)
+ fun_l1_n196(x)
+ else
+ fun_l1_n496(x)
+ end
+end
+
+def fun_l0_n208(x)
+ if (x < 1)
+ fun_l1_n777(x)
+ else
+ fun_l1_n150(x)
+ end
+end
+
+def fun_l0_n209(x)
+ if (x < 1)
+ fun_l1_n20(x)
+ else
+ fun_l1_n718(x)
+ end
+end
+
+def fun_l0_n210(x)
+ if (x < 1)
+ fun_l1_n934(x)
+ else
+ fun_l1_n416(x)
+ end
+end
+
+def fun_l0_n211(x)
+ if (x < 1)
+ fun_l1_n803(x)
+ else
+ fun_l1_n636(x)
+ end
+end
+
+def fun_l0_n212(x)
+ if (x < 1)
+ fun_l1_n93(x)
+ else
+ fun_l1_n791(x)
+ end
+end
+
+def fun_l0_n213(x)
+ if (x < 1)
+ fun_l1_n76(x)
+ else
+ fun_l1_n172(x)
+ end
+end
+
+def fun_l0_n214(x)
+ if (x < 1)
+ fun_l1_n103(x)
+ else
+ fun_l1_n381(x)
+ end
+end
+
+def fun_l0_n215(x)
+ if (x < 1)
+ fun_l1_n433(x)
+ else
+ fun_l1_n349(x)
+ end
+end
+
+def fun_l0_n216(x)
+ if (x < 1)
+ fun_l1_n154(x)
+ else
+ fun_l1_n740(x)
+ end
+end
+
+def fun_l0_n217(x)
+ if (x < 1)
+ fun_l1_n927(x)
+ else
+ fun_l1_n886(x)
+ end
+end
+
+def fun_l0_n218(x)
+ if (x < 1)
+ fun_l1_n804(x)
+ else
+ fun_l1_n6(x)
+ end
+end
+
+def fun_l0_n219(x)
+ if (x < 1)
+ fun_l1_n921(x)
+ else
+ fun_l1_n121(x)
+ end
+end
+
+def fun_l0_n220(x)
+ if (x < 1)
+ fun_l1_n732(x)
+ else
+ fun_l1_n224(x)
+ end
+end
+
+def fun_l0_n221(x)
+ if (x < 1)
+ fun_l1_n818(x)
+ else
+ fun_l1_n105(x)
+ end
+end
+
+def fun_l0_n222(x)
+ if (x < 1)
+ fun_l1_n162(x)
+ else
+ fun_l1_n700(x)
+ end
+end
+
+def fun_l0_n223(x)
+ if (x < 1)
+ fun_l1_n57(x)
+ else
+ fun_l1_n734(x)
+ end
+end
+
+def fun_l0_n224(x)
+ if (x < 1)
+ fun_l1_n283(x)
+ else
+ fun_l1_n87(x)
+ end
+end
+
+def fun_l0_n225(x)
+ if (x < 1)
+ fun_l1_n623(x)
+ else
+ fun_l1_n363(x)
+ end
+end
+
+def fun_l0_n226(x)
+ if (x < 1)
+ fun_l1_n962(x)
+ else
+ fun_l1_n660(x)
+ end
+end
+
+def fun_l0_n227(x)
+ if (x < 1)
+ fun_l1_n255(x)
+ else
+ fun_l1_n536(x)
+ end
+end
+
+def fun_l0_n228(x)
+ if (x < 1)
+ fun_l1_n377(x)
+ else
+ fun_l1_n249(x)
+ end
+end
+
+def fun_l0_n229(x)
+ if (x < 1)
+ fun_l1_n527(x)
+ else
+ fun_l1_n691(x)
+ end
+end
+
+def fun_l0_n230(x)
+ if (x < 1)
+ fun_l1_n781(x)
+ else
+ fun_l1_n494(x)
+ end
+end
+
+def fun_l0_n231(x)
+ if (x < 1)
+ fun_l1_n889(x)
+ else
+ fun_l1_n967(x)
+ end
+end
+
+def fun_l0_n232(x)
+ if (x < 1)
+ fun_l1_n509(x)
+ else
+ fun_l1_n910(x)
+ end
+end
+
+def fun_l0_n233(x)
+ if (x < 1)
+ fun_l1_n354(x)
+ else
+ fun_l1_n5(x)
+ end
+end
+
+def fun_l0_n234(x)
+ if (x < 1)
+ fun_l1_n423(x)
+ else
+ fun_l1_n788(x)
+ end
+end
+
+def fun_l0_n235(x)
+ if (x < 1)
+ fun_l1_n632(x)
+ else
+ fun_l1_n705(x)
+ end
+end
+
+def fun_l0_n236(x)
+ if (x < 1)
+ fun_l1_n955(x)
+ else
+ fun_l1_n908(x)
+ end
+end
+
+def fun_l0_n237(x)
+ if (x < 1)
+ fun_l1_n329(x)
+ else
+ fun_l1_n2(x)
+ end
+end
+
+def fun_l0_n238(x)
+ if (x < 1)
+ fun_l1_n767(x)
+ else
+ fun_l1_n766(x)
+ end
+end
+
+def fun_l0_n239(x)
+ if (x < 1)
+ fun_l1_n304(x)
+ else
+ fun_l1_n507(x)
+ end
+end
+
+def fun_l0_n240(x)
+ if (x < 1)
+ fun_l1_n845(x)
+ else
+ fun_l1_n777(x)
+ end
+end
+
+def fun_l0_n241(x)
+ if (x < 1)
+ fun_l1_n69(x)
+ else
+ fun_l1_n260(x)
+ end
+end
+
+def fun_l0_n242(x)
+ if (x < 1)
+ fun_l1_n194(x)
+ else
+ fun_l1_n412(x)
+ end
+end
+
+def fun_l0_n243(x)
+ if (x < 1)
+ fun_l1_n974(x)
+ else
+ fun_l1_n922(x)
+ end
+end
+
+def fun_l0_n244(x)
+ if (x < 1)
+ fun_l1_n532(x)
+ else
+ fun_l1_n530(x)
+ end
+end
+
+def fun_l0_n245(x)
+ if (x < 1)
+ fun_l1_n554(x)
+ else
+ fun_l1_n656(x)
+ end
+end
+
+def fun_l0_n246(x)
+ if (x < 1)
+ fun_l1_n253(x)
+ else
+ fun_l1_n235(x)
+ end
+end
+
+def fun_l0_n247(x)
+ if (x < 1)
+ fun_l1_n754(x)
+ else
+ fun_l1_n775(x)
+ end
+end
+
+def fun_l0_n248(x)
+ if (x < 1)
+ fun_l1_n89(x)
+ else
+ fun_l1_n129(x)
+ end
+end
+
+def fun_l0_n249(x)
+ if (x < 1)
+ fun_l1_n284(x)
+ else
+ fun_l1_n642(x)
+ end
+end
+
+def fun_l0_n250(x)
+ if (x < 1)
+ fun_l1_n67(x)
+ else
+ fun_l1_n867(x)
+ end
+end
+
+def fun_l0_n251(x)
+ if (x < 1)
+ fun_l1_n926(x)
+ else
+ fun_l1_n442(x)
+ end
+end
+
+def fun_l0_n252(x)
+ if (x < 1)
+ fun_l1_n196(x)
+ else
+ fun_l1_n583(x)
+ end
+end
+
+def fun_l0_n253(x)
+ if (x < 1)
+ fun_l1_n966(x)
+ else
+ fun_l1_n810(x)
+ end
+end
+
+def fun_l0_n254(x)
+ if (x < 1)
+ fun_l1_n984(x)
+ else
+ fun_l1_n752(x)
+ end
+end
+
+def fun_l0_n255(x)
+ if (x < 1)
+ fun_l1_n941(x)
+ else
+ fun_l1_n744(x)
+ end
+end
+
+def fun_l0_n256(x)
+ if (x < 1)
+ fun_l1_n785(x)
+ else
+ fun_l1_n610(x)
+ end
+end
+
+def fun_l0_n257(x)
+ if (x < 1)
+ fun_l1_n622(x)
+ else
+ fun_l1_n730(x)
+ end
+end
+
+def fun_l0_n258(x)
+ if (x < 1)
+ fun_l1_n453(x)
+ else
+ fun_l1_n641(x)
+ end
+end
+
+def fun_l0_n259(x)
+ if (x < 1)
+ fun_l1_n407(x)
+ else
+ fun_l1_n818(x)
+ end
+end
+
+def fun_l0_n260(x)
+ if (x < 1)
+ fun_l1_n252(x)
+ else
+ fun_l1_n205(x)
+ end
+end
+
+def fun_l0_n261(x)
+ if (x < 1)
+ fun_l1_n940(x)
+ else
+ fun_l1_n678(x)
+ end
+end
+
+def fun_l0_n262(x)
+ if (x < 1)
+ fun_l1_n350(x)
+ else
+ fun_l1_n496(x)
+ end
+end
+
+def fun_l0_n263(x)
+ if (x < 1)
+ fun_l1_n688(x)
+ else
+ fun_l1_n193(x)
+ end
+end
+
+def fun_l0_n264(x)
+ if (x < 1)
+ fun_l1_n366(x)
+ else
+ fun_l1_n790(x)
+ end
+end
+
+def fun_l0_n265(x)
+ if (x < 1)
+ fun_l1_n592(x)
+ else
+ fun_l1_n93(x)
+ end
+end
+
+def fun_l0_n266(x)
+ if (x < 1)
+ fun_l1_n189(x)
+ else
+ fun_l1_n467(x)
+ end
+end
+
+def fun_l0_n267(x)
+ if (x < 1)
+ fun_l1_n813(x)
+ else
+ fun_l1_n7(x)
+ end
+end
+
+def fun_l0_n268(x)
+ if (x < 1)
+ fun_l1_n516(x)
+ else
+ fun_l1_n271(x)
+ end
+end
+
+def fun_l0_n269(x)
+ if (x < 1)
+ fun_l1_n0(x)
+ else
+ fun_l1_n121(x)
+ end
+end
+
+def fun_l0_n270(x)
+ if (x < 1)
+ fun_l1_n634(x)
+ else
+ fun_l1_n726(x)
+ end
+end
+
+def fun_l0_n271(x)
+ if (x < 1)
+ fun_l1_n192(x)
+ else
+ fun_l1_n468(x)
+ end
+end
+
+def fun_l0_n272(x)
+ if (x < 1)
+ fun_l1_n278(x)
+ else
+ fun_l1_n355(x)
+ end
+end
+
+def fun_l0_n273(x)
+ if (x < 1)
+ fun_l1_n354(x)
+ else
+ fun_l1_n87(x)
+ end
+end
+
+def fun_l0_n274(x)
+ if (x < 1)
+ fun_l1_n643(x)
+ else
+ fun_l1_n806(x)
+ end
+end
+
+def fun_l0_n275(x)
+ if (x < 1)
+ fun_l1_n389(x)
+ else
+ fun_l1_n559(x)
+ end
+end
+
+def fun_l0_n276(x)
+ if (x < 1)
+ fun_l1_n283(x)
+ else
+ fun_l1_n539(x)
+ end
+end
+
+def fun_l0_n277(x)
+ if (x < 1)
+ fun_l1_n0(x)
+ else
+ fun_l1_n351(x)
+ end
+end
+
+def fun_l0_n278(x)
+ if (x < 1)
+ fun_l1_n813(x)
+ else
+ fun_l1_n513(x)
+ end
+end
+
+def fun_l0_n279(x)
+ if (x < 1)
+ fun_l1_n501(x)
+ else
+ fun_l1_n967(x)
+ end
+end
+
+def fun_l0_n280(x)
+ if (x < 1)
+ fun_l1_n727(x)
+ else
+ fun_l1_n232(x)
+ end
+end
+
+def fun_l0_n281(x)
+ if (x < 1)
+ fun_l1_n946(x)
+ else
+ fun_l1_n693(x)
+ end
+end
+
+def fun_l0_n282(x)
+ if (x < 1)
+ fun_l1_n260(x)
+ else
+ fun_l1_n525(x)
+ end
+end
+
+def fun_l0_n283(x)
+ if (x < 1)
+ fun_l1_n957(x)
+ else
+ fun_l1_n817(x)
+ end
+end
+
+def fun_l0_n284(x)
+ if (x < 1)
+ fun_l1_n91(x)
+ else
+ fun_l1_n735(x)
+ end
+end
+
+def fun_l0_n285(x)
+ if (x < 1)
+ fun_l1_n71(x)
+ else
+ fun_l1_n24(x)
+ end
+end
+
+def fun_l0_n286(x)
+ if (x < 1)
+ fun_l1_n594(x)
+ else
+ fun_l1_n747(x)
+ end
+end
+
+def fun_l0_n287(x)
+ if (x < 1)
+ fun_l1_n869(x)
+ else
+ fun_l1_n414(x)
+ end
+end
+
+def fun_l0_n288(x)
+ if (x < 1)
+ fun_l1_n182(x)
+ else
+ fun_l1_n835(x)
+ end
+end
+
+def fun_l0_n289(x)
+ if (x < 1)
+ fun_l1_n188(x)
+ else
+ fun_l1_n949(x)
+ end
+end
+
+def fun_l0_n290(x)
+ if (x < 1)
+ fun_l1_n35(x)
+ else
+ fun_l1_n259(x)
+ end
+end
+
+def fun_l0_n291(x)
+ if (x < 1)
+ fun_l1_n593(x)
+ else
+ fun_l1_n810(x)
+ end
+end
+
+def fun_l0_n292(x)
+ if (x < 1)
+ fun_l1_n680(x)
+ else
+ fun_l1_n564(x)
+ end
+end
+
+def fun_l0_n293(x)
+ if (x < 1)
+ fun_l1_n57(x)
+ else
+ fun_l1_n91(x)
+ end
+end
+
+def fun_l0_n294(x)
+ if (x < 1)
+ fun_l1_n945(x)
+ else
+ fun_l1_n807(x)
+ end
+end
+
+def fun_l0_n295(x)
+ if (x < 1)
+ fun_l1_n442(x)
+ else
+ fun_l1_n123(x)
+ end
+end
+
+def fun_l0_n296(x)
+ if (x < 1)
+ fun_l1_n536(x)
+ else
+ fun_l1_n987(x)
+ end
+end
+
+def fun_l0_n297(x)
+ if (x < 1)
+ fun_l1_n519(x)
+ else
+ fun_l1_n657(x)
+ end
+end
+
+def fun_l0_n298(x)
+ if (x < 1)
+ fun_l1_n204(x)
+ else
+ fun_l1_n437(x)
+ end
+end
+
+def fun_l0_n299(x)
+ if (x < 1)
+ fun_l1_n289(x)
+ else
+ fun_l1_n385(x)
+ end
+end
+
+def fun_l0_n300(x)
+ if (x < 1)
+ fun_l1_n629(x)
+ else
+ fun_l1_n803(x)
+ end
+end
+
+def fun_l0_n301(x)
+ if (x < 1)
+ fun_l1_n576(x)
+ else
+ fun_l1_n921(x)
+ end
+end
+
+def fun_l0_n302(x)
+ if (x < 1)
+ fun_l1_n466(x)
+ else
+ fun_l1_n475(x)
+ end
+end
+
+def fun_l0_n303(x)
+ if (x < 1)
+ fun_l1_n658(x)
+ else
+ fun_l1_n333(x)
+ end
+end
+
+def fun_l0_n304(x)
+ if (x < 1)
+ fun_l1_n728(x)
+ else
+ fun_l1_n749(x)
+ end
+end
+
+def fun_l0_n305(x)
+ if (x < 1)
+ fun_l1_n68(x)
+ else
+ fun_l1_n552(x)
+ end
+end
+
+def fun_l0_n306(x)
+ if (x < 1)
+ fun_l1_n633(x)
+ else
+ fun_l1_n958(x)
+ end
+end
+
+def fun_l0_n307(x)
+ if (x < 1)
+ fun_l1_n79(x)
+ else
+ fun_l1_n386(x)
+ end
+end
+
+def fun_l0_n308(x)
+ if (x < 1)
+ fun_l1_n831(x)
+ else
+ fun_l1_n176(x)
+ end
+end
+
+def fun_l0_n309(x)
+ if (x < 1)
+ fun_l1_n770(x)
+ else
+ fun_l1_n334(x)
+ end
+end
+
+def fun_l0_n310(x)
+ if (x < 1)
+ fun_l1_n21(x)
+ else
+ fun_l1_n643(x)
+ end
+end
+
+def fun_l0_n311(x)
+ if (x < 1)
+ fun_l1_n673(x)
+ else
+ fun_l1_n298(x)
+ end
+end
+
+def fun_l0_n312(x)
+ if (x < 1)
+ fun_l1_n753(x)
+ else
+ fun_l1_n817(x)
+ end
+end
+
+def fun_l0_n313(x)
+ if (x < 1)
+ fun_l1_n299(x)
+ else
+ fun_l1_n350(x)
+ end
+end
+
+def fun_l0_n314(x)
+ if (x < 1)
+ fun_l1_n190(x)
+ else
+ fun_l1_n519(x)
+ end
+end
+
+def fun_l0_n315(x)
+ if (x < 1)
+ fun_l1_n934(x)
+ else
+ fun_l1_n416(x)
+ end
+end
+
+def fun_l0_n316(x)
+ if (x < 1)
+ fun_l1_n695(x)
+ else
+ fun_l1_n377(x)
+ end
+end
+
+def fun_l0_n317(x)
+ if (x < 1)
+ fun_l1_n194(x)
+ else
+ fun_l1_n747(x)
+ end
+end
+
+def fun_l0_n318(x)
+ if (x < 1)
+ fun_l1_n145(x)
+ else
+ fun_l1_n761(x)
+ end
+end
+
+def fun_l0_n319(x)
+ if (x < 1)
+ fun_l1_n223(x)
+ else
+ fun_l1_n237(x)
+ end
+end
+
+def fun_l0_n320(x)
+ if (x < 1)
+ fun_l1_n907(x)
+ else
+ fun_l1_n653(x)
+ end
+end
+
+def fun_l0_n321(x)
+ if (x < 1)
+ fun_l1_n216(x)
+ else
+ fun_l1_n67(x)
+ end
+end
+
+def fun_l0_n322(x)
+ if (x < 1)
+ fun_l1_n658(x)
+ else
+ fun_l1_n948(x)
+ end
+end
+
+def fun_l0_n323(x)
+ if (x < 1)
+ fun_l1_n358(x)
+ else
+ fun_l1_n926(x)
+ end
+end
+
+def fun_l0_n324(x)
+ if (x < 1)
+ fun_l1_n533(x)
+ else
+ fun_l1_n252(x)
+ end
+end
+
+def fun_l0_n325(x)
+ if (x < 1)
+ fun_l1_n284(x)
+ else
+ fun_l1_n670(x)
+ end
+end
+
+def fun_l0_n326(x)
+ if (x < 1)
+ fun_l1_n327(x)
+ else
+ fun_l1_n298(x)
+ end
+end
+
+def fun_l0_n327(x)
+ if (x < 1)
+ fun_l1_n837(x)
+ else
+ fun_l1_n890(x)
+ end
+end
+
+def fun_l0_n328(x)
+ if (x < 1)
+ fun_l1_n941(x)
+ else
+ fun_l1_n794(x)
+ end
+end
+
+def fun_l0_n329(x)
+ if (x < 1)
+ fun_l1_n859(x)
+ else
+ fun_l1_n970(x)
+ end
+end
+
+def fun_l0_n330(x)
+ if (x < 1)
+ fun_l1_n282(x)
+ else
+ fun_l1_n569(x)
+ end
+end
+
+def fun_l0_n331(x)
+ if (x < 1)
+ fun_l1_n33(x)
+ else
+ fun_l1_n525(x)
+ end
+end
+
+def fun_l0_n332(x)
+ if (x < 1)
+ fun_l1_n847(x)
+ else
+ fun_l1_n540(x)
+ end
+end
+
+def fun_l0_n333(x)
+ if (x < 1)
+ fun_l1_n485(x)
+ else
+ fun_l1_n756(x)
+ end
+end
+
+def fun_l0_n334(x)
+ if (x < 1)
+ fun_l1_n396(x)
+ else
+ fun_l1_n781(x)
+ end
+end
+
+def fun_l0_n335(x)
+ if (x < 1)
+ fun_l1_n225(x)
+ else
+ fun_l1_n417(x)
+ end
+end
+
+def fun_l0_n336(x)
+ if (x < 1)
+ fun_l1_n906(x)
+ else
+ fun_l1_n301(x)
+ end
+end
+
+def fun_l0_n337(x)
+ if (x < 1)
+ fun_l1_n863(x)
+ else
+ fun_l1_n409(x)
+ end
+end
+
+def fun_l0_n338(x)
+ if (x < 1)
+ fun_l1_n103(x)
+ else
+ fun_l1_n460(x)
+ end
+end
+
+def fun_l0_n339(x)
+ if (x < 1)
+ fun_l1_n787(x)
+ else
+ fun_l1_n434(x)
+ end
+end
+
+def fun_l0_n340(x)
+ if (x < 1)
+ fun_l1_n308(x)
+ else
+ fun_l1_n875(x)
+ end
+end
+
+def fun_l0_n341(x)
+ if (x < 1)
+ fun_l1_n146(x)
+ else
+ fun_l1_n566(x)
+ end
+end
+
+def fun_l0_n342(x)
+ if (x < 1)
+ fun_l1_n837(x)
+ else
+ fun_l1_n770(x)
+ end
+end
+
+def fun_l0_n343(x)
+ if (x < 1)
+ fun_l1_n668(x)
+ else
+ fun_l1_n60(x)
+ end
+end
+
+def fun_l0_n344(x)
+ if (x < 1)
+ fun_l1_n305(x)
+ else
+ fun_l1_n388(x)
+ end
+end
+
+def fun_l0_n345(x)
+ if (x < 1)
+ fun_l1_n796(x)
+ else
+ fun_l1_n920(x)
+ end
+end
+
+def fun_l0_n346(x)
+ if (x < 1)
+ fun_l1_n257(x)
+ else
+ fun_l1_n229(x)
+ end
+end
+
+def fun_l0_n347(x)
+ if (x < 1)
+ fun_l1_n740(x)
+ else
+ fun_l1_n372(x)
+ end
+end
+
+def fun_l0_n348(x)
+ if (x < 1)
+ fun_l1_n698(x)
+ else
+ fun_l1_n63(x)
+ end
+end
+
+def fun_l0_n349(x)
+ if (x < 1)
+ fun_l1_n4(x)
+ else
+ fun_l1_n119(x)
+ end
+end
+
+def fun_l0_n350(x)
+ if (x < 1)
+ fun_l1_n186(x)
+ else
+ fun_l1_n352(x)
+ end
+end
+
+def fun_l0_n351(x)
+ if (x < 1)
+ fun_l1_n619(x)
+ else
+ fun_l1_n583(x)
+ end
+end
+
+def fun_l0_n352(x)
+ if (x < 1)
+ fun_l1_n2(x)
+ else
+ fun_l1_n275(x)
+ end
+end
+
+def fun_l0_n353(x)
+ if (x < 1)
+ fun_l1_n843(x)
+ else
+ fun_l1_n986(x)
+ end
+end
+
+def fun_l0_n354(x)
+ if (x < 1)
+ fun_l1_n865(x)
+ else
+ fun_l1_n64(x)
+ end
+end
+
+def fun_l0_n355(x)
+ if (x < 1)
+ fun_l1_n732(x)
+ else
+ fun_l1_n332(x)
+ end
+end
+
+def fun_l0_n356(x)
+ if (x < 1)
+ fun_l1_n642(x)
+ else
+ fun_l1_n559(x)
+ end
+end
+
+def fun_l0_n357(x)
+ if (x < 1)
+ fun_l1_n385(x)
+ else
+ fun_l1_n532(x)
+ end
+end
+
+def fun_l0_n358(x)
+ if (x < 1)
+ fun_l1_n672(x)
+ else
+ fun_l1_n721(x)
+ end
+end
+
+def fun_l0_n359(x)
+ if (x < 1)
+ fun_l1_n663(x)
+ else
+ fun_l1_n590(x)
+ end
+end
+
+def fun_l0_n360(x)
+ if (x < 1)
+ fun_l1_n240(x)
+ else
+ fun_l1_n743(x)
+ end
+end
+
+def fun_l0_n361(x)
+ if (x < 1)
+ fun_l1_n301(x)
+ else
+ fun_l1_n943(x)
+ end
+end
+
+def fun_l0_n362(x)
+ if (x < 1)
+ fun_l1_n108(x)
+ else
+ fun_l1_n975(x)
+ end
+end
+
+def fun_l0_n363(x)
+ if (x < 1)
+ fun_l1_n554(x)
+ else
+ fun_l1_n135(x)
+ end
+end
+
+def fun_l0_n364(x)
+ if (x < 1)
+ fun_l1_n360(x)
+ else
+ fun_l1_n821(x)
+ end
+end
+
+def fun_l0_n365(x)
+ if (x < 1)
+ fun_l1_n992(x)
+ else
+ fun_l1_n158(x)
+ end
+end
+
+def fun_l0_n366(x)
+ if (x < 1)
+ fun_l1_n439(x)
+ else
+ fun_l1_n506(x)
+ end
+end
+
+def fun_l0_n367(x)
+ if (x < 1)
+ fun_l1_n229(x)
+ else
+ fun_l1_n714(x)
+ end
+end
+
+def fun_l0_n368(x)
+ if (x < 1)
+ fun_l1_n459(x)
+ else
+ fun_l1_n874(x)
+ end
+end
+
+def fun_l0_n369(x)
+ if (x < 1)
+ fun_l1_n799(x)
+ else
+ fun_l1_n406(x)
+ end
+end
+
+def fun_l0_n370(x)
+ if (x < 1)
+ fun_l1_n791(x)
+ else
+ fun_l1_n669(x)
+ end
+end
+
+def fun_l0_n371(x)
+ if (x < 1)
+ fun_l1_n99(x)
+ else
+ fun_l1_n344(x)
+ end
+end
+
+def fun_l0_n372(x)
+ if (x < 1)
+ fun_l1_n585(x)
+ else
+ fun_l1_n388(x)
+ end
+end
+
+def fun_l0_n373(x)
+ if (x < 1)
+ fun_l1_n35(x)
+ else
+ fun_l1_n369(x)
+ end
+end
+
+def fun_l0_n374(x)
+ if (x < 1)
+ fun_l1_n41(x)
+ else
+ fun_l1_n378(x)
+ end
+end
+
+def fun_l0_n375(x)
+ if (x < 1)
+ fun_l1_n372(x)
+ else
+ fun_l1_n406(x)
+ end
+end
+
+def fun_l0_n376(x)
+ if (x < 1)
+ fun_l1_n247(x)
+ else
+ fun_l1_n563(x)
+ end
+end
+
+def fun_l0_n377(x)
+ if (x < 1)
+ fun_l1_n998(x)
+ else
+ fun_l1_n302(x)
+ end
+end
+
+def fun_l0_n378(x)
+ if (x < 1)
+ fun_l1_n955(x)
+ else
+ fun_l1_n333(x)
+ end
+end
+
+def fun_l0_n379(x)
+ if (x < 1)
+ fun_l1_n554(x)
+ else
+ fun_l1_n863(x)
+ end
+end
+
+def fun_l0_n380(x)
+ if (x < 1)
+ fun_l1_n248(x)
+ else
+ fun_l1_n297(x)
+ end
+end
+
+def fun_l0_n381(x)
+ if (x < 1)
+ fun_l1_n85(x)
+ else
+ fun_l1_n726(x)
+ end
+end
+
+def fun_l0_n382(x)
+ if (x < 1)
+ fun_l1_n75(x)
+ else
+ fun_l1_n990(x)
+ end
+end
+
+def fun_l0_n383(x)
+ if (x < 1)
+ fun_l1_n353(x)
+ else
+ fun_l1_n218(x)
+ end
+end
+
+def fun_l0_n384(x)
+ if (x < 1)
+ fun_l1_n103(x)
+ else
+ fun_l1_n192(x)
+ end
+end
+
+def fun_l0_n385(x)
+ if (x < 1)
+ fun_l1_n659(x)
+ else
+ fun_l1_n996(x)
+ end
+end
+
+def fun_l0_n386(x)
+ if (x < 1)
+ fun_l1_n528(x)
+ else
+ fun_l1_n654(x)
+ end
+end
+
+def fun_l0_n387(x)
+ if (x < 1)
+ fun_l1_n857(x)
+ else
+ fun_l1_n638(x)
+ end
+end
+
+def fun_l0_n388(x)
+ if (x < 1)
+ fun_l1_n311(x)
+ else
+ fun_l1_n877(x)
+ end
+end
+
+def fun_l0_n389(x)
+ if (x < 1)
+ fun_l1_n406(x)
+ else
+ fun_l1_n191(x)
+ end
+end
+
+def fun_l0_n390(x)
+ if (x < 1)
+ fun_l1_n464(x)
+ else
+ fun_l1_n684(x)
+ end
+end
+
+def fun_l0_n391(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n635(x)
+ end
+end
+
+def fun_l0_n392(x)
+ if (x < 1)
+ fun_l1_n863(x)
+ else
+ fun_l1_n486(x)
+ end
+end
+
+def fun_l0_n393(x)
+ if (x < 1)
+ fun_l1_n587(x)
+ else
+ fun_l1_n387(x)
+ end
+end
+
+def fun_l0_n394(x)
+ if (x < 1)
+ fun_l1_n553(x)
+ else
+ fun_l1_n789(x)
+ end
+end
+
+def fun_l0_n395(x)
+ if (x < 1)
+ fun_l1_n420(x)
+ else
+ fun_l1_n148(x)
+ end
+end
+
+def fun_l0_n396(x)
+ if (x < 1)
+ fun_l1_n802(x)
+ else
+ fun_l1_n845(x)
+ end
+end
+
+def fun_l0_n397(x)
+ if (x < 1)
+ fun_l1_n749(x)
+ else
+ fun_l1_n742(x)
+ end
+end
+
+def fun_l0_n398(x)
+ if (x < 1)
+ fun_l1_n929(x)
+ else
+ fun_l1_n458(x)
+ end
+end
+
+def fun_l0_n399(x)
+ if (x < 1)
+ fun_l1_n908(x)
+ else
+ fun_l1_n188(x)
+ end
+end
+
+def fun_l0_n400(x)
+ if (x < 1)
+ fun_l1_n932(x)
+ else
+ fun_l1_n854(x)
+ end
+end
+
+def fun_l0_n401(x)
+ if (x < 1)
+ fun_l1_n29(x)
+ else
+ fun_l1_n666(x)
+ end
+end
+
+def fun_l0_n402(x)
+ if (x < 1)
+ fun_l1_n877(x)
+ else
+ fun_l1_n518(x)
+ end
+end
+
+def fun_l0_n403(x)
+ if (x < 1)
+ fun_l1_n639(x)
+ else
+ fun_l1_n618(x)
+ end
+end
+
+def fun_l0_n404(x)
+ if (x < 1)
+ fun_l1_n177(x)
+ else
+ fun_l1_n487(x)
+ end
+end
+
+def fun_l0_n405(x)
+ if (x < 1)
+ fun_l1_n536(x)
+ else
+ fun_l1_n860(x)
+ end
+end
+
+def fun_l0_n406(x)
+ if (x < 1)
+ fun_l1_n626(x)
+ else
+ fun_l1_n894(x)
+ end
+end
+
+def fun_l0_n407(x)
+ if (x < 1)
+ fun_l1_n533(x)
+ else
+ fun_l1_n367(x)
+ end
+end
+
+def fun_l0_n408(x)
+ if (x < 1)
+ fun_l1_n146(x)
+ else
+ fun_l1_n546(x)
+ end
+end
+
+def fun_l0_n409(x)
+ if (x < 1)
+ fun_l1_n872(x)
+ else
+ fun_l1_n387(x)
+ end
+end
+
+def fun_l0_n410(x)
+ if (x < 1)
+ fun_l1_n726(x)
+ else
+ fun_l1_n973(x)
+ end
+end
+
+def fun_l0_n411(x)
+ if (x < 1)
+ fun_l1_n168(x)
+ else
+ fun_l1_n783(x)
+ end
+end
+
+def fun_l0_n412(x)
+ if (x < 1)
+ fun_l1_n895(x)
+ else
+ fun_l1_n901(x)
+ end
+end
+
+def fun_l0_n413(x)
+ if (x < 1)
+ fun_l1_n235(x)
+ else
+ fun_l1_n593(x)
+ end
+end
+
+def fun_l0_n414(x)
+ if (x < 1)
+ fun_l1_n328(x)
+ else
+ fun_l1_n693(x)
+ end
+end
+
+def fun_l0_n415(x)
+ if (x < 1)
+ fun_l1_n882(x)
+ else
+ fun_l1_n290(x)
+ end
+end
+
+def fun_l0_n416(x)
+ if (x < 1)
+ fun_l1_n433(x)
+ else
+ fun_l1_n220(x)
+ end
+end
+
+def fun_l0_n417(x)
+ if (x < 1)
+ fun_l1_n966(x)
+ else
+ fun_l1_n74(x)
+ end
+end
+
+def fun_l0_n418(x)
+ if (x < 1)
+ fun_l1_n750(x)
+ else
+ fun_l1_n547(x)
+ end
+end
+
+def fun_l0_n419(x)
+ if (x < 1)
+ fun_l1_n94(x)
+ else
+ fun_l1_n794(x)
+ end
+end
+
+def fun_l0_n420(x)
+ if (x < 1)
+ fun_l1_n68(x)
+ else
+ fun_l1_n970(x)
+ end
+end
+
+def fun_l0_n421(x)
+ if (x < 1)
+ fun_l1_n663(x)
+ else
+ fun_l1_n388(x)
+ end
+end
+
+def fun_l0_n422(x)
+ if (x < 1)
+ fun_l1_n686(x)
+ else
+ fun_l1_n67(x)
+ end
+end
+
+def fun_l0_n423(x)
+ if (x < 1)
+ fun_l1_n210(x)
+ else
+ fun_l1_n64(x)
+ end
+end
+
+def fun_l0_n424(x)
+ if (x < 1)
+ fun_l1_n375(x)
+ else
+ fun_l1_n205(x)
+ end
+end
+
+def fun_l0_n425(x)
+ if (x < 1)
+ fun_l1_n832(x)
+ else
+ fun_l1_n325(x)
+ end
+end
+
+def fun_l0_n426(x)
+ if (x < 1)
+ fun_l1_n819(x)
+ else
+ fun_l1_n601(x)
+ end
+end
+
+def fun_l0_n427(x)
+ if (x < 1)
+ fun_l1_n588(x)
+ else
+ fun_l1_n875(x)
+ end
+end
+
+def fun_l0_n428(x)
+ if (x < 1)
+ fun_l1_n682(x)
+ else
+ fun_l1_n523(x)
+ end
+end
+
+def fun_l0_n429(x)
+ if (x < 1)
+ fun_l1_n972(x)
+ else
+ fun_l1_n891(x)
+ end
+end
+
+def fun_l0_n430(x)
+ if (x < 1)
+ fun_l1_n90(x)
+ else
+ fun_l1_n655(x)
+ end
+end
+
+def fun_l0_n431(x)
+ if (x < 1)
+ fun_l1_n393(x)
+ else
+ fun_l1_n454(x)
+ end
+end
+
+def fun_l0_n432(x)
+ if (x < 1)
+ fun_l1_n435(x)
+ else
+ fun_l1_n860(x)
+ end
+end
+
+def fun_l0_n433(x)
+ if (x < 1)
+ fun_l1_n516(x)
+ else
+ fun_l1_n246(x)
+ end
+end
+
+def fun_l0_n434(x)
+ if (x < 1)
+ fun_l1_n216(x)
+ else
+ fun_l1_n78(x)
+ end
+end
+
+def fun_l0_n435(x)
+ if (x < 1)
+ fun_l1_n357(x)
+ else
+ fun_l1_n61(x)
+ end
+end
+
+def fun_l0_n436(x)
+ if (x < 1)
+ fun_l1_n289(x)
+ else
+ fun_l1_n507(x)
+ end
+end
+
+def fun_l0_n437(x)
+ if (x < 1)
+ fun_l1_n182(x)
+ else
+ fun_l1_n289(x)
+ end
+end
+
+def fun_l0_n438(x)
+ if (x < 1)
+ fun_l1_n69(x)
+ else
+ fun_l1_n549(x)
+ end
+end
+
+def fun_l0_n439(x)
+ if (x < 1)
+ fun_l1_n275(x)
+ else
+ fun_l1_n723(x)
+ end
+end
+
+def fun_l0_n440(x)
+ if (x < 1)
+ fun_l1_n469(x)
+ else
+ fun_l1_n243(x)
+ end
+end
+
+def fun_l0_n441(x)
+ if (x < 1)
+ fun_l1_n595(x)
+ else
+ fun_l1_n624(x)
+ end
+end
+
+def fun_l0_n442(x)
+ if (x < 1)
+ fun_l1_n655(x)
+ else
+ fun_l1_n896(x)
+ end
+end
+
+def fun_l0_n443(x)
+ if (x < 1)
+ fun_l1_n926(x)
+ else
+ fun_l1_n503(x)
+ end
+end
+
+def fun_l0_n444(x)
+ if (x < 1)
+ fun_l1_n875(x)
+ else
+ fun_l1_n110(x)
+ end
+end
+
+def fun_l0_n445(x)
+ if (x < 1)
+ fun_l1_n832(x)
+ else
+ fun_l1_n154(x)
+ end
+end
+
+def fun_l0_n446(x)
+ if (x < 1)
+ fun_l1_n538(x)
+ else
+ fun_l1_n75(x)
+ end
+end
+
+def fun_l0_n447(x)
+ if (x < 1)
+ fun_l1_n183(x)
+ else
+ fun_l1_n718(x)
+ end
+end
+
+def fun_l0_n448(x)
+ if (x < 1)
+ fun_l1_n680(x)
+ else
+ fun_l1_n93(x)
+ end
+end
+
+def fun_l0_n449(x)
+ if (x < 1)
+ fun_l1_n147(x)
+ else
+ fun_l1_n924(x)
+ end
+end
+
+def fun_l0_n450(x)
+ if (x < 1)
+ fun_l1_n702(x)
+ else
+ fun_l1_n830(x)
+ end
+end
+
+def fun_l0_n451(x)
+ if (x < 1)
+ fun_l1_n750(x)
+ else
+ fun_l1_n447(x)
+ end
+end
+
+def fun_l0_n452(x)
+ if (x < 1)
+ fun_l1_n520(x)
+ else
+ fun_l1_n69(x)
+ end
+end
+
+def fun_l0_n453(x)
+ if (x < 1)
+ fun_l1_n132(x)
+ else
+ fun_l1_n877(x)
+ end
+end
+
+def fun_l0_n454(x)
+ if (x < 1)
+ fun_l1_n247(x)
+ else
+ fun_l1_n69(x)
+ end
+end
+
+def fun_l0_n455(x)
+ if (x < 1)
+ fun_l1_n180(x)
+ else
+ fun_l1_n645(x)
+ end
+end
+
+def fun_l0_n456(x)
+ if (x < 1)
+ fun_l1_n658(x)
+ else
+ fun_l1_n487(x)
+ end
+end
+
+def fun_l0_n457(x)
+ if (x < 1)
+ fun_l1_n276(x)
+ else
+ fun_l1_n528(x)
+ end
+end
+
+def fun_l0_n458(x)
+ if (x < 1)
+ fun_l1_n30(x)
+ else
+ fun_l1_n456(x)
+ end
+end
+
+def fun_l0_n459(x)
+ if (x < 1)
+ fun_l1_n986(x)
+ else
+ fun_l1_n552(x)
+ end
+end
+
+def fun_l0_n460(x)
+ if (x < 1)
+ fun_l1_n874(x)
+ else
+ fun_l1_n396(x)
+ end
+end
+
+def fun_l0_n461(x)
+ if (x < 1)
+ fun_l1_n524(x)
+ else
+ fun_l1_n335(x)
+ end
+end
+
+def fun_l0_n462(x)
+ if (x < 1)
+ fun_l1_n471(x)
+ else
+ fun_l1_n578(x)
+ end
+end
+
+def fun_l0_n463(x)
+ if (x < 1)
+ fun_l1_n173(x)
+ else
+ fun_l1_n456(x)
+ end
+end
+
+def fun_l0_n464(x)
+ if (x < 1)
+ fun_l1_n872(x)
+ else
+ fun_l1_n745(x)
+ end
+end
+
+def fun_l0_n465(x)
+ if (x < 1)
+ fun_l1_n387(x)
+ else
+ fun_l1_n776(x)
+ end
+end
+
+def fun_l0_n466(x)
+ if (x < 1)
+ fun_l1_n119(x)
+ else
+ fun_l1_n428(x)
+ end
+end
+
+def fun_l0_n467(x)
+ if (x < 1)
+ fun_l1_n416(x)
+ else
+ fun_l1_n738(x)
+ end
+end
+
+def fun_l0_n468(x)
+ if (x < 1)
+ fun_l1_n762(x)
+ else
+ fun_l1_n694(x)
+ end
+end
+
+def fun_l0_n469(x)
+ if (x < 1)
+ fun_l1_n27(x)
+ else
+ fun_l1_n562(x)
+ end
+end
+
+def fun_l0_n470(x)
+ if (x < 1)
+ fun_l1_n12(x)
+ else
+ fun_l1_n812(x)
+ end
+end
+
+def fun_l0_n471(x)
+ if (x < 1)
+ fun_l1_n865(x)
+ else
+ fun_l1_n94(x)
+ end
+end
+
+def fun_l0_n472(x)
+ if (x < 1)
+ fun_l1_n346(x)
+ else
+ fun_l1_n39(x)
+ end
+end
+
+def fun_l0_n473(x)
+ if (x < 1)
+ fun_l1_n309(x)
+ else
+ fun_l1_n158(x)
+ end
+end
+
+def fun_l0_n474(x)
+ if (x < 1)
+ fun_l1_n828(x)
+ else
+ fun_l1_n229(x)
+ end
+end
+
+def fun_l0_n475(x)
+ if (x < 1)
+ fun_l1_n554(x)
+ else
+ fun_l1_n121(x)
+ end
+end
+
+def fun_l0_n476(x)
+ if (x < 1)
+ fun_l1_n818(x)
+ else
+ fun_l1_n390(x)
+ end
+end
+
+def fun_l0_n477(x)
+ if (x < 1)
+ fun_l1_n88(x)
+ else
+ fun_l1_n73(x)
+ end
+end
+
+def fun_l0_n478(x)
+ if (x < 1)
+ fun_l1_n709(x)
+ else
+ fun_l1_n680(x)
+ end
+end
+
+def fun_l0_n479(x)
+ if (x < 1)
+ fun_l1_n271(x)
+ else
+ fun_l1_n439(x)
+ end
+end
+
+def fun_l0_n480(x)
+ if (x < 1)
+ fun_l1_n493(x)
+ else
+ fun_l1_n562(x)
+ end
+end
+
+def fun_l0_n481(x)
+ if (x < 1)
+ fun_l1_n642(x)
+ else
+ fun_l1_n221(x)
+ end
+end
+
+def fun_l0_n482(x)
+ if (x < 1)
+ fun_l1_n838(x)
+ else
+ fun_l1_n345(x)
+ end
+end
+
+def fun_l0_n483(x)
+ if (x < 1)
+ fun_l1_n411(x)
+ else
+ fun_l1_n266(x)
+ end
+end
+
+def fun_l0_n484(x)
+ if (x < 1)
+ fun_l1_n916(x)
+ else
+ fun_l1_n791(x)
+ end
+end
+
+def fun_l0_n485(x)
+ if (x < 1)
+ fun_l1_n392(x)
+ else
+ fun_l1_n68(x)
+ end
+end
+
+def fun_l0_n486(x)
+ if (x < 1)
+ fun_l1_n834(x)
+ else
+ fun_l1_n783(x)
+ end
+end
+
+def fun_l0_n487(x)
+ if (x < 1)
+ fun_l1_n398(x)
+ else
+ fun_l1_n627(x)
+ end
+end
+
+def fun_l0_n488(x)
+ if (x < 1)
+ fun_l1_n904(x)
+ else
+ fun_l1_n167(x)
+ end
+end
+
+def fun_l0_n489(x)
+ if (x < 1)
+ fun_l1_n54(x)
+ else
+ fun_l1_n28(x)
+ end
+end
+
+def fun_l0_n490(x)
+ if (x < 1)
+ fun_l1_n24(x)
+ else
+ fun_l1_n9(x)
+ end
+end
+
+def fun_l0_n491(x)
+ if (x < 1)
+ fun_l1_n497(x)
+ else
+ fun_l1_n297(x)
+ end
+end
+
+def fun_l0_n492(x)
+ if (x < 1)
+ fun_l1_n951(x)
+ else
+ fun_l1_n534(x)
+ end
+end
+
+def fun_l0_n493(x)
+ if (x < 1)
+ fun_l1_n213(x)
+ else
+ fun_l1_n808(x)
+ end
+end
+
+def fun_l0_n494(x)
+ if (x < 1)
+ fun_l1_n904(x)
+ else
+ fun_l1_n94(x)
+ end
+end
+
+def fun_l0_n495(x)
+ if (x < 1)
+ fun_l1_n799(x)
+ else
+ fun_l1_n817(x)
+ end
+end
+
+def fun_l0_n496(x)
+ if (x < 1)
+ fun_l1_n45(x)
+ else
+ fun_l1_n860(x)
+ end
+end
+
+def fun_l0_n497(x)
+ if (x < 1)
+ fun_l1_n482(x)
+ else
+ fun_l1_n783(x)
+ end
+end
+
+def fun_l0_n498(x)
+ if (x < 1)
+ fun_l1_n78(x)
+ else
+ fun_l1_n785(x)
+ end
+end
+
+def fun_l0_n499(x)
+ if (x < 1)
+ fun_l1_n174(x)
+ else
+ fun_l1_n87(x)
+ end
+end
+
+def fun_l0_n500(x)
+ if (x < 1)
+ fun_l1_n608(x)
+ else
+ fun_l1_n7(x)
+ end
+end
+
+def fun_l0_n501(x)
+ if (x < 1)
+ fun_l1_n157(x)
+ else
+ fun_l1_n718(x)
+ end
+end
+
+def fun_l0_n502(x)
+ if (x < 1)
+ fun_l1_n823(x)
+ else
+ fun_l1_n549(x)
+ end
+end
+
+def fun_l0_n503(x)
+ if (x < 1)
+ fun_l1_n13(x)
+ else
+ fun_l1_n502(x)
+ end
+end
+
+def fun_l0_n504(x)
+ if (x < 1)
+ fun_l1_n119(x)
+ else
+ fun_l1_n191(x)
+ end
+end
+
+def fun_l0_n505(x)
+ if (x < 1)
+ fun_l1_n503(x)
+ else
+ fun_l1_n974(x)
+ end
+end
+
+def fun_l0_n506(x)
+ if (x < 1)
+ fun_l1_n893(x)
+ else
+ fun_l1_n582(x)
+ end
+end
+
+def fun_l0_n507(x)
+ if (x < 1)
+ fun_l1_n403(x)
+ else
+ fun_l1_n228(x)
+ end
+end
+
+def fun_l0_n508(x)
+ if (x < 1)
+ fun_l1_n640(x)
+ else
+ fun_l1_n362(x)
+ end
+end
+
+def fun_l0_n509(x)
+ if (x < 1)
+ fun_l1_n629(x)
+ else
+ fun_l1_n824(x)
+ end
+end
+
+def fun_l0_n510(x)
+ if (x < 1)
+ fun_l1_n84(x)
+ else
+ fun_l1_n330(x)
+ end
+end
+
+def fun_l0_n511(x)
+ if (x < 1)
+ fun_l1_n91(x)
+ else
+ fun_l1_n523(x)
+ end
+end
+
+def fun_l0_n512(x)
+ if (x < 1)
+ fun_l1_n696(x)
+ else
+ fun_l1_n126(x)
+ end
+end
+
+def fun_l0_n513(x)
+ if (x < 1)
+ fun_l1_n905(x)
+ else
+ fun_l1_n496(x)
+ end
+end
+
+def fun_l0_n514(x)
+ if (x < 1)
+ fun_l1_n766(x)
+ else
+ fun_l1_n523(x)
+ end
+end
+
+def fun_l0_n515(x)
+ if (x < 1)
+ fun_l1_n798(x)
+ else
+ fun_l1_n698(x)
+ end
+end
+
+def fun_l0_n516(x)
+ if (x < 1)
+ fun_l1_n124(x)
+ else
+ fun_l1_n356(x)
+ end
+end
+
+def fun_l0_n517(x)
+ if (x < 1)
+ fun_l1_n289(x)
+ else
+ fun_l1_n782(x)
+ end
+end
+
+def fun_l0_n518(x)
+ if (x < 1)
+ fun_l1_n483(x)
+ else
+ fun_l1_n586(x)
+ end
+end
+
+def fun_l0_n519(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n37(x)
+ end
+end
+
+def fun_l0_n520(x)
+ if (x < 1)
+ fun_l1_n48(x)
+ else
+ fun_l1_n216(x)
+ end
+end
+
+def fun_l0_n521(x)
+ if (x < 1)
+ fun_l1_n805(x)
+ else
+ fun_l1_n846(x)
+ end
+end
+
+def fun_l0_n522(x)
+ if (x < 1)
+ fun_l1_n422(x)
+ else
+ fun_l1_n190(x)
+ end
+end
+
+def fun_l0_n523(x)
+ if (x < 1)
+ fun_l1_n168(x)
+ else
+ fun_l1_n272(x)
+ end
+end
+
+def fun_l0_n524(x)
+ if (x < 1)
+ fun_l1_n766(x)
+ else
+ fun_l1_n125(x)
+ end
+end
+
+def fun_l0_n525(x)
+ if (x < 1)
+ fun_l1_n56(x)
+ else
+ fun_l1_n224(x)
+ end
+end
+
+def fun_l0_n526(x)
+ if (x < 1)
+ fun_l1_n540(x)
+ else
+ fun_l1_n303(x)
+ end
+end
+
+def fun_l0_n527(x)
+ if (x < 1)
+ fun_l1_n846(x)
+ else
+ fun_l1_n955(x)
+ end
+end
+
+def fun_l0_n528(x)
+ if (x < 1)
+ fun_l1_n571(x)
+ else
+ fun_l1_n640(x)
+ end
+end
+
+def fun_l0_n529(x)
+ if (x < 1)
+ fun_l1_n650(x)
+ else
+ fun_l1_n107(x)
+ end
+end
+
+def fun_l0_n530(x)
+ if (x < 1)
+ fun_l1_n240(x)
+ else
+ fun_l1_n139(x)
+ end
+end
+
+def fun_l0_n531(x)
+ if (x < 1)
+ fun_l1_n975(x)
+ else
+ fun_l1_n970(x)
+ end
+end
+
+def fun_l0_n532(x)
+ if (x < 1)
+ fun_l1_n753(x)
+ else
+ fun_l1_n147(x)
+ end
+end
+
+def fun_l0_n533(x)
+ if (x < 1)
+ fun_l1_n269(x)
+ else
+ fun_l1_n292(x)
+ end
+end
+
+def fun_l0_n534(x)
+ if (x < 1)
+ fun_l1_n791(x)
+ else
+ fun_l1_n69(x)
+ end
+end
+
+def fun_l0_n535(x)
+ if (x < 1)
+ fun_l1_n469(x)
+ else
+ fun_l1_n58(x)
+ end
+end
+
+def fun_l0_n536(x)
+ if (x < 1)
+ fun_l1_n526(x)
+ else
+ fun_l1_n265(x)
+ end
+end
+
+def fun_l0_n537(x)
+ if (x < 1)
+ fun_l1_n681(x)
+ else
+ fun_l1_n646(x)
+ end
+end
+
+def fun_l0_n538(x)
+ if (x < 1)
+ fun_l1_n377(x)
+ else
+ fun_l1_n969(x)
+ end
+end
+
+def fun_l0_n539(x)
+ if (x < 1)
+ fun_l1_n935(x)
+ else
+ fun_l1_n556(x)
+ end
+end
+
+def fun_l0_n540(x)
+ if (x < 1)
+ fun_l1_n498(x)
+ else
+ fun_l1_n439(x)
+ end
+end
+
+def fun_l0_n541(x)
+ if (x < 1)
+ fun_l1_n451(x)
+ else
+ fun_l1_n35(x)
+ end
+end
+
+def fun_l0_n542(x)
+ if (x < 1)
+ fun_l1_n32(x)
+ else
+ fun_l1_n795(x)
+ end
+end
+
+def fun_l0_n543(x)
+ if (x < 1)
+ fun_l1_n732(x)
+ else
+ fun_l1_n530(x)
+ end
+end
+
+def fun_l0_n544(x)
+ if (x < 1)
+ fun_l1_n176(x)
+ else
+ fun_l1_n735(x)
+ end
+end
+
+def fun_l0_n545(x)
+ if (x < 1)
+ fun_l1_n34(x)
+ else
+ fun_l1_n989(x)
+ end
+end
+
+def fun_l0_n546(x)
+ if (x < 1)
+ fun_l1_n534(x)
+ else
+ fun_l1_n705(x)
+ end
+end
+
+def fun_l0_n547(x)
+ if (x < 1)
+ fun_l1_n997(x)
+ else
+ fun_l1_n883(x)
+ end
+end
+
+def fun_l0_n548(x)
+ if (x < 1)
+ fun_l1_n379(x)
+ else
+ fun_l1_n33(x)
+ end
+end
+
+def fun_l0_n549(x)
+ if (x < 1)
+ fun_l1_n454(x)
+ else
+ fun_l1_n516(x)
+ end
+end
+
+def fun_l0_n550(x)
+ if (x < 1)
+ fun_l1_n678(x)
+ else
+ fun_l1_n652(x)
+ end
+end
+
+def fun_l0_n551(x)
+ if (x < 1)
+ fun_l1_n13(x)
+ else
+ fun_l1_n864(x)
+ end
+end
+
+def fun_l0_n552(x)
+ if (x < 1)
+ fun_l1_n178(x)
+ else
+ fun_l1_n996(x)
+ end
+end
+
+def fun_l0_n553(x)
+ if (x < 1)
+ fun_l1_n865(x)
+ else
+ fun_l1_n703(x)
+ end
+end
+
+def fun_l0_n554(x)
+ if (x < 1)
+ fun_l1_n306(x)
+ else
+ fun_l1_n24(x)
+ end
+end
+
+def fun_l0_n555(x)
+ if (x < 1)
+ fun_l1_n110(x)
+ else
+ fun_l1_n123(x)
+ end
+end
+
+def fun_l0_n556(x)
+ if (x < 1)
+ fun_l1_n367(x)
+ else
+ fun_l1_n117(x)
+ end
+end
+
+def fun_l0_n557(x)
+ if (x < 1)
+ fun_l1_n967(x)
+ else
+ fun_l1_n662(x)
+ end
+end
+
+def fun_l0_n558(x)
+ if (x < 1)
+ fun_l1_n68(x)
+ else
+ fun_l1_n47(x)
+ end
+end
+
+def fun_l0_n559(x)
+ if (x < 1)
+ fun_l1_n154(x)
+ else
+ fun_l1_n344(x)
+ end
+end
+
+def fun_l0_n560(x)
+ if (x < 1)
+ fun_l1_n835(x)
+ else
+ fun_l1_n577(x)
+ end
+end
+
+def fun_l0_n561(x)
+ if (x < 1)
+ fun_l1_n393(x)
+ else
+ fun_l1_n419(x)
+ end
+end
+
+def fun_l0_n562(x)
+ if (x < 1)
+ fun_l1_n632(x)
+ else
+ fun_l1_n630(x)
+ end
+end
+
+def fun_l0_n563(x)
+ if (x < 1)
+ fun_l1_n9(x)
+ else
+ fun_l1_n109(x)
+ end
+end
+
+def fun_l0_n564(x)
+ if (x < 1)
+ fun_l1_n65(x)
+ else
+ fun_l1_n123(x)
+ end
+end
+
+def fun_l0_n565(x)
+ if (x < 1)
+ fun_l1_n156(x)
+ else
+ fun_l1_n921(x)
+ end
+end
+
+def fun_l0_n566(x)
+ if (x < 1)
+ fun_l1_n88(x)
+ else
+ fun_l1_n743(x)
+ end
+end
+
+def fun_l0_n567(x)
+ if (x < 1)
+ fun_l1_n92(x)
+ else
+ fun_l1_n27(x)
+ end
+end
+
+def fun_l0_n568(x)
+ if (x < 1)
+ fun_l1_n462(x)
+ else
+ fun_l1_n988(x)
+ end
+end
+
+def fun_l0_n569(x)
+ if (x < 1)
+ fun_l1_n241(x)
+ else
+ fun_l1_n199(x)
+ end
+end
+
+def fun_l0_n570(x)
+ if (x < 1)
+ fun_l1_n429(x)
+ else
+ fun_l1_n530(x)
+ end
+end
+
+def fun_l0_n571(x)
+ if (x < 1)
+ fun_l1_n412(x)
+ else
+ fun_l1_n530(x)
+ end
+end
+
+def fun_l0_n572(x)
+ if (x < 1)
+ fun_l1_n100(x)
+ else
+ fun_l1_n270(x)
+ end
+end
+
+def fun_l0_n573(x)
+ if (x < 1)
+ fun_l1_n326(x)
+ else
+ fun_l1_n191(x)
+ end
+end
+
+def fun_l0_n574(x)
+ if (x < 1)
+ fun_l1_n151(x)
+ else
+ fun_l1_n354(x)
+ end
+end
+
+def fun_l0_n575(x)
+ if (x < 1)
+ fun_l1_n322(x)
+ else
+ fun_l1_n534(x)
+ end
+end
+
+def fun_l0_n576(x)
+ if (x < 1)
+ fun_l1_n995(x)
+ else
+ fun_l1_n658(x)
+ end
+end
+
+def fun_l0_n577(x)
+ if (x < 1)
+ fun_l1_n193(x)
+ else
+ fun_l1_n444(x)
+ end
+end
+
+def fun_l0_n578(x)
+ if (x < 1)
+ fun_l1_n527(x)
+ else
+ fun_l1_n517(x)
+ end
+end
+
+def fun_l0_n579(x)
+ if (x < 1)
+ fun_l1_n885(x)
+ else
+ fun_l1_n218(x)
+ end
+end
+
+def fun_l0_n580(x)
+ if (x < 1)
+ fun_l1_n789(x)
+ else
+ fun_l1_n711(x)
+ end
+end
+
+def fun_l0_n581(x)
+ if (x < 1)
+ fun_l1_n848(x)
+ else
+ fun_l1_n321(x)
+ end
+end
+
+def fun_l0_n582(x)
+ if (x < 1)
+ fun_l1_n389(x)
+ else
+ fun_l1_n360(x)
+ end
+end
+
+def fun_l0_n583(x)
+ if (x < 1)
+ fun_l1_n319(x)
+ else
+ fun_l1_n972(x)
+ end
+end
+
+def fun_l0_n584(x)
+ if (x < 1)
+ fun_l1_n421(x)
+ else
+ fun_l1_n659(x)
+ end
+end
+
+def fun_l0_n585(x)
+ if (x < 1)
+ fun_l1_n462(x)
+ else
+ fun_l1_n302(x)
+ end
+end
+
+def fun_l0_n586(x)
+ if (x < 1)
+ fun_l1_n122(x)
+ else
+ fun_l1_n50(x)
+ end
+end
+
+def fun_l0_n587(x)
+ if (x < 1)
+ fun_l1_n795(x)
+ else
+ fun_l1_n622(x)
+ end
+end
+
+def fun_l0_n588(x)
+ if (x < 1)
+ fun_l1_n719(x)
+ else
+ fun_l1_n390(x)
+ end
+end
+
+def fun_l0_n589(x)
+ if (x < 1)
+ fun_l1_n916(x)
+ else
+ fun_l1_n925(x)
+ end
+end
+
+def fun_l0_n590(x)
+ if (x < 1)
+ fun_l1_n541(x)
+ else
+ fun_l1_n139(x)
+ end
+end
+
+def fun_l0_n591(x)
+ if (x < 1)
+ fun_l1_n610(x)
+ else
+ fun_l1_n509(x)
+ end
+end
+
+def fun_l0_n592(x)
+ if (x < 1)
+ fun_l1_n217(x)
+ else
+ fun_l1_n452(x)
+ end
+end
+
+def fun_l0_n593(x)
+ if (x < 1)
+ fun_l1_n456(x)
+ else
+ fun_l1_n888(x)
+ end
+end
+
+def fun_l0_n594(x)
+ if (x < 1)
+ fun_l1_n987(x)
+ else
+ fun_l1_n462(x)
+ end
+end
+
+def fun_l0_n595(x)
+ if (x < 1)
+ fun_l1_n571(x)
+ else
+ fun_l1_n429(x)
+ end
+end
+
+def fun_l0_n596(x)
+ if (x < 1)
+ fun_l1_n751(x)
+ else
+ fun_l1_n773(x)
+ end
+end
+
+def fun_l0_n597(x)
+ if (x < 1)
+ fun_l1_n181(x)
+ else
+ fun_l1_n340(x)
+ end
+end
+
+def fun_l0_n598(x)
+ if (x < 1)
+ fun_l1_n6(x)
+ else
+ fun_l1_n39(x)
+ end
+end
+
+def fun_l0_n599(x)
+ if (x < 1)
+ fun_l1_n814(x)
+ else
+ fun_l1_n320(x)
+ end
+end
+
+def fun_l0_n600(x)
+ if (x < 1)
+ fun_l1_n931(x)
+ else
+ fun_l1_n535(x)
+ end
+end
+
+def fun_l0_n601(x)
+ if (x < 1)
+ fun_l1_n99(x)
+ else
+ fun_l1_n154(x)
+ end
+end
+
+def fun_l0_n602(x)
+ if (x < 1)
+ fun_l1_n981(x)
+ else
+ fun_l1_n817(x)
+ end
+end
+
+def fun_l0_n603(x)
+ if (x < 1)
+ fun_l1_n975(x)
+ else
+ fun_l1_n364(x)
+ end
+end
+
+def fun_l0_n604(x)
+ if (x < 1)
+ fun_l1_n112(x)
+ else
+ fun_l1_n226(x)
+ end
+end
+
+def fun_l0_n605(x)
+ if (x < 1)
+ fun_l1_n995(x)
+ else
+ fun_l1_n95(x)
+ end
+end
+
+def fun_l0_n606(x)
+ if (x < 1)
+ fun_l1_n930(x)
+ else
+ fun_l1_n77(x)
+ end
+end
+
+def fun_l0_n607(x)
+ if (x < 1)
+ fun_l1_n899(x)
+ else
+ fun_l1_n957(x)
+ end
+end
+
+def fun_l0_n608(x)
+ if (x < 1)
+ fun_l1_n844(x)
+ else
+ fun_l1_n119(x)
+ end
+end
+
+def fun_l0_n609(x)
+ if (x < 1)
+ fun_l1_n861(x)
+ else
+ fun_l1_n74(x)
+ end
+end
+
+def fun_l0_n610(x)
+ if (x < 1)
+ fun_l1_n521(x)
+ else
+ fun_l1_n46(x)
+ end
+end
+
+def fun_l0_n611(x)
+ if (x < 1)
+ fun_l1_n258(x)
+ else
+ fun_l1_n208(x)
+ end
+end
+
+def fun_l0_n612(x)
+ if (x < 1)
+ fun_l1_n620(x)
+ else
+ fun_l1_n427(x)
+ end
+end
+
+def fun_l0_n613(x)
+ if (x < 1)
+ fun_l1_n583(x)
+ else
+ fun_l1_n400(x)
+ end
+end
+
+def fun_l0_n614(x)
+ if (x < 1)
+ fun_l1_n933(x)
+ else
+ fun_l1_n810(x)
+ end
+end
+
+def fun_l0_n615(x)
+ if (x < 1)
+ fun_l1_n154(x)
+ else
+ fun_l1_n879(x)
+ end
+end
+
+def fun_l0_n616(x)
+ if (x < 1)
+ fun_l1_n715(x)
+ else
+ fun_l1_n862(x)
+ end
+end
+
+def fun_l0_n617(x)
+ if (x < 1)
+ fun_l1_n178(x)
+ else
+ fun_l1_n285(x)
+ end
+end
+
+def fun_l0_n618(x)
+ if (x < 1)
+ fun_l1_n458(x)
+ else
+ fun_l1_n217(x)
+ end
+end
+
+def fun_l0_n619(x)
+ if (x < 1)
+ fun_l1_n655(x)
+ else
+ fun_l1_n405(x)
+ end
+end
+
+def fun_l0_n620(x)
+ if (x < 1)
+ fun_l1_n470(x)
+ else
+ fun_l1_n306(x)
+ end
+end
+
+def fun_l0_n621(x)
+ if (x < 1)
+ fun_l1_n755(x)
+ else
+ fun_l1_n425(x)
+ end
+end
+
+def fun_l0_n622(x)
+ if (x < 1)
+ fun_l1_n426(x)
+ else
+ fun_l1_n737(x)
+ end
+end
+
+def fun_l0_n623(x)
+ if (x < 1)
+ fun_l1_n79(x)
+ else
+ fun_l1_n55(x)
+ end
+end
+
+def fun_l0_n624(x)
+ if (x < 1)
+ fun_l1_n437(x)
+ else
+ fun_l1_n79(x)
+ end
+end
+
+def fun_l0_n625(x)
+ if (x < 1)
+ fun_l1_n691(x)
+ else
+ fun_l1_n198(x)
+ end
+end
+
+def fun_l0_n626(x)
+ if (x < 1)
+ fun_l1_n703(x)
+ else
+ fun_l1_n585(x)
+ end
+end
+
+def fun_l0_n627(x)
+ if (x < 1)
+ fun_l1_n966(x)
+ else
+ fun_l1_n425(x)
+ end
+end
+
+def fun_l0_n628(x)
+ if (x < 1)
+ fun_l1_n516(x)
+ else
+ fun_l1_n744(x)
+ end
+end
+
+def fun_l0_n629(x)
+ if (x < 1)
+ fun_l1_n40(x)
+ else
+ fun_l1_n942(x)
+ end
+end
+
+def fun_l0_n630(x)
+ if (x < 1)
+ fun_l1_n528(x)
+ else
+ fun_l1_n440(x)
+ end
+end
+
+def fun_l0_n631(x)
+ if (x < 1)
+ fun_l1_n139(x)
+ else
+ fun_l1_n403(x)
+ end
+end
+
+def fun_l0_n632(x)
+ if (x < 1)
+ fun_l1_n421(x)
+ else
+ fun_l1_n510(x)
+ end
+end
+
+def fun_l0_n633(x)
+ if (x < 1)
+ fun_l1_n718(x)
+ else
+ fun_l1_n388(x)
+ end
+end
+
+def fun_l0_n634(x)
+ if (x < 1)
+ fun_l1_n67(x)
+ else
+ fun_l1_n342(x)
+ end
+end
+
+def fun_l0_n635(x)
+ if (x < 1)
+ fun_l1_n943(x)
+ else
+ fun_l1_n941(x)
+ end
+end
+
+def fun_l0_n636(x)
+ if (x < 1)
+ fun_l1_n170(x)
+ else
+ fun_l1_n527(x)
+ end
+end
+
+def fun_l0_n637(x)
+ if (x < 1)
+ fun_l1_n336(x)
+ else
+ fun_l1_n496(x)
+ end
+end
+
+def fun_l0_n638(x)
+ if (x < 1)
+ fun_l1_n730(x)
+ else
+ fun_l1_n10(x)
+ end
+end
+
+def fun_l0_n639(x)
+ if (x < 1)
+ fun_l1_n939(x)
+ else
+ fun_l1_n940(x)
+ end
+end
+
+def fun_l0_n640(x)
+ if (x < 1)
+ fun_l1_n73(x)
+ else
+ fun_l1_n439(x)
+ end
+end
+
+def fun_l0_n641(x)
+ if (x < 1)
+ fun_l1_n460(x)
+ else
+ fun_l1_n828(x)
+ end
+end
+
+def fun_l0_n642(x)
+ if (x < 1)
+ fun_l1_n90(x)
+ else
+ fun_l1_n113(x)
+ end
+end
+
+def fun_l0_n643(x)
+ if (x < 1)
+ fun_l1_n972(x)
+ else
+ fun_l1_n15(x)
+ end
+end
+
+def fun_l0_n644(x)
+ if (x < 1)
+ fun_l1_n417(x)
+ else
+ fun_l1_n228(x)
+ end
+end
+
+def fun_l0_n645(x)
+ if (x < 1)
+ fun_l1_n876(x)
+ else
+ fun_l1_n152(x)
+ end
+end
+
+def fun_l0_n646(x)
+ if (x < 1)
+ fun_l1_n404(x)
+ else
+ fun_l1_n147(x)
+ end
+end
+
+def fun_l0_n647(x)
+ if (x < 1)
+ fun_l1_n802(x)
+ else
+ fun_l1_n824(x)
+ end
+end
+
+def fun_l0_n648(x)
+ if (x < 1)
+ fun_l1_n771(x)
+ else
+ fun_l1_n421(x)
+ end
+end
+
+def fun_l0_n649(x)
+ if (x < 1)
+ fun_l1_n807(x)
+ else
+ fun_l1_n955(x)
+ end
+end
+
+def fun_l0_n650(x)
+ if (x < 1)
+ fun_l1_n221(x)
+ else
+ fun_l1_n367(x)
+ end
+end
+
+def fun_l0_n651(x)
+ if (x < 1)
+ fun_l1_n955(x)
+ else
+ fun_l1_n401(x)
+ end
+end
+
+def fun_l0_n652(x)
+ if (x < 1)
+ fun_l1_n203(x)
+ else
+ fun_l1_n909(x)
+ end
+end
+
+def fun_l0_n653(x)
+ if (x < 1)
+ fun_l1_n154(x)
+ else
+ fun_l1_n535(x)
+ end
+end
+
+def fun_l0_n654(x)
+ if (x < 1)
+ fun_l1_n420(x)
+ else
+ fun_l1_n393(x)
+ end
+end
+
+def fun_l0_n655(x)
+ if (x < 1)
+ fun_l1_n232(x)
+ else
+ fun_l1_n981(x)
+ end
+end
+
+def fun_l0_n656(x)
+ if (x < 1)
+ fun_l1_n873(x)
+ else
+ fun_l1_n510(x)
+ end
+end
+
+def fun_l0_n657(x)
+ if (x < 1)
+ fun_l1_n919(x)
+ else
+ fun_l1_n706(x)
+ end
+end
+
+def fun_l0_n658(x)
+ if (x < 1)
+ fun_l1_n429(x)
+ else
+ fun_l1_n112(x)
+ end
+end
+
+def fun_l0_n659(x)
+ if (x < 1)
+ fun_l1_n547(x)
+ else
+ fun_l1_n712(x)
+ end
+end
+
+def fun_l0_n660(x)
+ if (x < 1)
+ fun_l1_n498(x)
+ else
+ fun_l1_n695(x)
+ end
+end
+
+def fun_l0_n661(x)
+ if (x < 1)
+ fun_l1_n801(x)
+ else
+ fun_l1_n659(x)
+ end
+end
+
+def fun_l0_n662(x)
+ if (x < 1)
+ fun_l1_n796(x)
+ else
+ fun_l1_n229(x)
+ end
+end
+
+def fun_l0_n663(x)
+ if (x < 1)
+ fun_l1_n11(x)
+ else
+ fun_l1_n620(x)
+ end
+end
+
+def fun_l0_n664(x)
+ if (x < 1)
+ fun_l1_n652(x)
+ else
+ fun_l1_n416(x)
+ end
+end
+
+def fun_l0_n665(x)
+ if (x < 1)
+ fun_l1_n655(x)
+ else
+ fun_l1_n331(x)
+ end
+end
+
+def fun_l0_n666(x)
+ if (x < 1)
+ fun_l1_n846(x)
+ else
+ fun_l1_n1(x)
+ end
+end
+
+def fun_l0_n667(x)
+ if (x < 1)
+ fun_l1_n55(x)
+ else
+ fun_l1_n32(x)
+ end
+end
+
+def fun_l0_n668(x)
+ if (x < 1)
+ fun_l1_n241(x)
+ else
+ fun_l1_n627(x)
+ end
+end
+
+def fun_l0_n669(x)
+ if (x < 1)
+ fun_l1_n234(x)
+ else
+ fun_l1_n996(x)
+ end
+end
+
+def fun_l0_n670(x)
+ if (x < 1)
+ fun_l1_n235(x)
+ else
+ fun_l1_n761(x)
+ end
+end
+
+def fun_l0_n671(x)
+ if (x < 1)
+ fun_l1_n990(x)
+ else
+ fun_l1_n236(x)
+ end
+end
+
+def fun_l0_n672(x)
+ if (x < 1)
+ fun_l1_n970(x)
+ else
+ fun_l1_n595(x)
+ end
+end
+
+def fun_l0_n673(x)
+ if (x < 1)
+ fun_l1_n294(x)
+ else
+ fun_l1_n440(x)
+ end
+end
+
+def fun_l0_n674(x)
+ if (x < 1)
+ fun_l1_n597(x)
+ else
+ fun_l1_n956(x)
+ end
+end
+
+def fun_l0_n675(x)
+ if (x < 1)
+ fun_l1_n942(x)
+ else
+ fun_l1_n352(x)
+ end
+end
+
+def fun_l0_n676(x)
+ if (x < 1)
+ fun_l1_n309(x)
+ else
+ fun_l1_n294(x)
+ end
+end
+
+def fun_l0_n677(x)
+ if (x < 1)
+ fun_l1_n752(x)
+ else
+ fun_l1_n447(x)
+ end
+end
+
+def fun_l0_n678(x)
+ if (x < 1)
+ fun_l1_n890(x)
+ else
+ fun_l1_n497(x)
+ end
+end
+
+def fun_l0_n679(x)
+ if (x < 1)
+ fun_l1_n808(x)
+ else
+ fun_l1_n881(x)
+ end
+end
+
+def fun_l0_n680(x)
+ if (x < 1)
+ fun_l1_n966(x)
+ else
+ fun_l1_n460(x)
+ end
+end
+
+def fun_l0_n681(x)
+ if (x < 1)
+ fun_l1_n104(x)
+ else
+ fun_l1_n262(x)
+ end
+end
+
+def fun_l0_n682(x)
+ if (x < 1)
+ fun_l1_n425(x)
+ else
+ fun_l1_n177(x)
+ end
+end
+
+def fun_l0_n683(x)
+ if (x < 1)
+ fun_l1_n15(x)
+ else
+ fun_l1_n458(x)
+ end
+end
+
+def fun_l0_n684(x)
+ if (x < 1)
+ fun_l1_n760(x)
+ else
+ fun_l1_n997(x)
+ end
+end
+
+def fun_l0_n685(x)
+ if (x < 1)
+ fun_l1_n496(x)
+ else
+ fun_l1_n223(x)
+ end
+end
+
+def fun_l0_n686(x)
+ if (x < 1)
+ fun_l1_n363(x)
+ else
+ fun_l1_n543(x)
+ end
+end
+
+def fun_l0_n687(x)
+ if (x < 1)
+ fun_l1_n758(x)
+ else
+ fun_l1_n473(x)
+ end
+end
+
+def fun_l0_n688(x)
+ if (x < 1)
+ fun_l1_n854(x)
+ else
+ fun_l1_n999(x)
+ end
+end
+
+def fun_l0_n689(x)
+ if (x < 1)
+ fun_l1_n336(x)
+ else
+ fun_l1_n388(x)
+ end
+end
+
+def fun_l0_n690(x)
+ if (x < 1)
+ fun_l1_n930(x)
+ else
+ fun_l1_n478(x)
+ end
+end
+
+def fun_l0_n691(x)
+ if (x < 1)
+ fun_l1_n423(x)
+ else
+ fun_l1_n83(x)
+ end
+end
+
+def fun_l0_n692(x)
+ if (x < 1)
+ fun_l1_n797(x)
+ else
+ fun_l1_n427(x)
+ end
+end
+
+def fun_l0_n693(x)
+ if (x < 1)
+ fun_l1_n907(x)
+ else
+ fun_l1_n1(x)
+ end
+end
+
+def fun_l0_n694(x)
+ if (x < 1)
+ fun_l1_n601(x)
+ else
+ fun_l1_n809(x)
+ end
+end
+
+def fun_l0_n695(x)
+ if (x < 1)
+ fun_l1_n252(x)
+ else
+ fun_l1_n233(x)
+ end
+end
+
+def fun_l0_n696(x)
+ if (x < 1)
+ fun_l1_n36(x)
+ else
+ fun_l1_n796(x)
+ end
+end
+
+def fun_l0_n697(x)
+ if (x < 1)
+ fun_l1_n893(x)
+ else
+ fun_l1_n926(x)
+ end
+end
+
+def fun_l0_n698(x)
+ if (x < 1)
+ fun_l1_n511(x)
+ else
+ fun_l1_n88(x)
+ end
+end
+
+def fun_l0_n699(x)
+ if (x < 1)
+ fun_l1_n573(x)
+ else
+ fun_l1_n718(x)
+ end
+end
+
+def fun_l0_n700(x)
+ if (x < 1)
+ fun_l1_n475(x)
+ else
+ fun_l1_n539(x)
+ end
+end
+
+def fun_l0_n701(x)
+ if (x < 1)
+ fun_l1_n238(x)
+ else
+ fun_l1_n253(x)
+ end
+end
+
+def fun_l0_n702(x)
+ if (x < 1)
+ fun_l1_n731(x)
+ else
+ fun_l1_n225(x)
+ end
+end
+
+def fun_l0_n703(x)
+ if (x < 1)
+ fun_l1_n594(x)
+ else
+ fun_l1_n16(x)
+ end
+end
+
+def fun_l0_n704(x)
+ if (x < 1)
+ fun_l1_n732(x)
+ else
+ fun_l1_n354(x)
+ end
+end
+
+def fun_l0_n705(x)
+ if (x < 1)
+ fun_l1_n812(x)
+ else
+ fun_l1_n218(x)
+ end
+end
+
+def fun_l0_n706(x)
+ if (x < 1)
+ fun_l1_n731(x)
+ else
+ fun_l1_n343(x)
+ end
+end
+
+def fun_l0_n707(x)
+ if (x < 1)
+ fun_l1_n134(x)
+ else
+ fun_l1_n752(x)
+ end
+end
+
+def fun_l0_n708(x)
+ if (x < 1)
+ fun_l1_n899(x)
+ else
+ fun_l1_n854(x)
+ end
+end
+
+def fun_l0_n709(x)
+ if (x < 1)
+ fun_l1_n120(x)
+ else
+ fun_l1_n193(x)
+ end
+end
+
+def fun_l0_n710(x)
+ if (x < 1)
+ fun_l1_n22(x)
+ else
+ fun_l1_n254(x)
+ end
+end
+
+def fun_l0_n711(x)
+ if (x < 1)
+ fun_l1_n527(x)
+ else
+ fun_l1_n921(x)
+ end
+end
+
+def fun_l0_n712(x)
+ if (x < 1)
+ fun_l1_n820(x)
+ else
+ fun_l1_n96(x)
+ end
+end
+
+def fun_l0_n713(x)
+ if (x < 1)
+ fun_l1_n145(x)
+ else
+ fun_l1_n226(x)
+ end
+end
+
+def fun_l0_n714(x)
+ if (x < 1)
+ fun_l1_n643(x)
+ else
+ fun_l1_n407(x)
+ end
+end
+
+def fun_l0_n715(x)
+ if (x < 1)
+ fun_l1_n349(x)
+ else
+ fun_l1_n450(x)
+ end
+end
+
+def fun_l0_n716(x)
+ if (x < 1)
+ fun_l1_n954(x)
+ else
+ fun_l1_n707(x)
+ end
+end
+
+def fun_l0_n717(x)
+ if (x < 1)
+ fun_l1_n723(x)
+ else
+ fun_l1_n762(x)
+ end
+end
+
+def fun_l0_n718(x)
+ if (x < 1)
+ fun_l1_n299(x)
+ else
+ fun_l1_n332(x)
+ end
+end
+
+def fun_l0_n719(x)
+ if (x < 1)
+ fun_l1_n493(x)
+ else
+ fun_l1_n521(x)
+ end
+end
+
+def fun_l0_n720(x)
+ if (x < 1)
+ fun_l1_n39(x)
+ else
+ fun_l1_n17(x)
+ end
+end
+
+def fun_l0_n721(x)
+ if (x < 1)
+ fun_l1_n297(x)
+ else
+ fun_l1_n800(x)
+ end
+end
+
+def fun_l0_n722(x)
+ if (x < 1)
+ fun_l1_n758(x)
+ else
+ fun_l1_n135(x)
+ end
+end
+
+def fun_l0_n723(x)
+ if (x < 1)
+ fun_l1_n471(x)
+ else
+ fun_l1_n351(x)
+ end
+end
+
+def fun_l0_n724(x)
+ if (x < 1)
+ fun_l1_n381(x)
+ else
+ fun_l1_n281(x)
+ end
+end
+
+def fun_l0_n725(x)
+ if (x < 1)
+ fun_l1_n624(x)
+ else
+ fun_l1_n162(x)
+ end
+end
+
+def fun_l0_n726(x)
+ if (x < 1)
+ fun_l1_n143(x)
+ else
+ fun_l1_n417(x)
+ end
+end
+
+def fun_l0_n727(x)
+ if (x < 1)
+ fun_l1_n623(x)
+ else
+ fun_l1_n19(x)
+ end
+end
+
+def fun_l0_n728(x)
+ if (x < 1)
+ fun_l1_n687(x)
+ else
+ fun_l1_n574(x)
+ end
+end
+
+def fun_l0_n729(x)
+ if (x < 1)
+ fun_l1_n225(x)
+ else
+ fun_l1_n871(x)
+ end
+end
+
+def fun_l0_n730(x)
+ if (x < 1)
+ fun_l1_n830(x)
+ else
+ fun_l1_n273(x)
+ end
+end
+
+def fun_l0_n731(x)
+ if (x < 1)
+ fun_l1_n95(x)
+ else
+ fun_l1_n864(x)
+ end
+end
+
+def fun_l0_n732(x)
+ if (x < 1)
+ fun_l1_n902(x)
+ else
+ fun_l1_n522(x)
+ end
+end
+
+def fun_l0_n733(x)
+ if (x < 1)
+ fun_l1_n564(x)
+ else
+ fun_l1_n55(x)
+ end
+end
+
+def fun_l0_n734(x)
+ if (x < 1)
+ fun_l1_n481(x)
+ else
+ fun_l1_n880(x)
+ end
+end
+
+def fun_l0_n735(x)
+ if (x < 1)
+ fun_l1_n87(x)
+ else
+ fun_l1_n693(x)
+ end
+end
+
+def fun_l0_n736(x)
+ if (x < 1)
+ fun_l1_n72(x)
+ else
+ fun_l1_n396(x)
+ end
+end
+
+def fun_l0_n737(x)
+ if (x < 1)
+ fun_l1_n920(x)
+ else
+ fun_l1_n852(x)
+ end
+end
+
+def fun_l0_n738(x)
+ if (x < 1)
+ fun_l1_n342(x)
+ else
+ fun_l1_n959(x)
+ end
+end
+
+def fun_l0_n739(x)
+ if (x < 1)
+ fun_l1_n682(x)
+ else
+ fun_l1_n714(x)
+ end
+end
+
+def fun_l0_n740(x)
+ if (x < 1)
+ fun_l1_n264(x)
+ else
+ fun_l1_n325(x)
+ end
+end
+
+def fun_l0_n741(x)
+ if (x < 1)
+ fun_l1_n621(x)
+ else
+ fun_l1_n339(x)
+ end
+end
+
+def fun_l0_n742(x)
+ if (x < 1)
+ fun_l1_n46(x)
+ else
+ fun_l1_n766(x)
+ end
+end
+
+def fun_l0_n743(x)
+ if (x < 1)
+ fun_l1_n333(x)
+ else
+ fun_l1_n353(x)
+ end
+end
+
+def fun_l0_n744(x)
+ if (x < 1)
+ fun_l1_n930(x)
+ else
+ fun_l1_n964(x)
+ end
+end
+
+def fun_l0_n745(x)
+ if (x < 1)
+ fun_l1_n785(x)
+ else
+ fun_l1_n114(x)
+ end
+end
+
+def fun_l0_n746(x)
+ if (x < 1)
+ fun_l1_n402(x)
+ else
+ fun_l1_n803(x)
+ end
+end
+
+def fun_l0_n747(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n870(x)
+ end
+end
+
+def fun_l0_n748(x)
+ if (x < 1)
+ fun_l1_n683(x)
+ else
+ fun_l1_n287(x)
+ end
+end
+
+def fun_l0_n749(x)
+ if (x < 1)
+ fun_l1_n816(x)
+ else
+ fun_l1_n849(x)
+ end
+end
+
+def fun_l0_n750(x)
+ if (x < 1)
+ fun_l1_n523(x)
+ else
+ fun_l1_n555(x)
+ end
+end
+
+def fun_l0_n751(x)
+ if (x < 1)
+ fun_l1_n270(x)
+ else
+ fun_l1_n660(x)
+ end
+end
+
+def fun_l0_n752(x)
+ if (x < 1)
+ fun_l1_n786(x)
+ else
+ fun_l1_n749(x)
+ end
+end
+
+def fun_l0_n753(x)
+ if (x < 1)
+ fun_l1_n567(x)
+ else
+ fun_l1_n325(x)
+ end
+end
+
+def fun_l0_n754(x)
+ if (x < 1)
+ fun_l1_n502(x)
+ else
+ fun_l1_n610(x)
+ end
+end
+
+def fun_l0_n755(x)
+ if (x < 1)
+ fun_l1_n336(x)
+ else
+ fun_l1_n354(x)
+ end
+end
+
+def fun_l0_n756(x)
+ if (x < 1)
+ fun_l1_n435(x)
+ else
+ fun_l1_n484(x)
+ end
+end
+
+def fun_l0_n757(x)
+ if (x < 1)
+ fun_l1_n849(x)
+ else
+ fun_l1_n42(x)
+ end
+end
+
+def fun_l0_n758(x)
+ if (x < 1)
+ fun_l1_n294(x)
+ else
+ fun_l1_n483(x)
+ end
+end
+
+def fun_l0_n759(x)
+ if (x < 1)
+ fun_l1_n14(x)
+ else
+ fun_l1_n9(x)
+ end
+end
+
+def fun_l0_n760(x)
+ if (x < 1)
+ fun_l1_n860(x)
+ else
+ fun_l1_n645(x)
+ end
+end
+
+def fun_l0_n761(x)
+ if (x < 1)
+ fun_l1_n577(x)
+ else
+ fun_l1_n0(x)
+ end
+end
+
+def fun_l0_n762(x)
+ if (x < 1)
+ fun_l1_n28(x)
+ else
+ fun_l1_n834(x)
+ end
+end
+
+def fun_l0_n763(x)
+ if (x < 1)
+ fun_l1_n147(x)
+ else
+ fun_l1_n177(x)
+ end
+end
+
+def fun_l0_n764(x)
+ if (x < 1)
+ fun_l1_n429(x)
+ else
+ fun_l1_n646(x)
+ end
+end
+
+def fun_l0_n765(x)
+ if (x < 1)
+ fun_l1_n474(x)
+ else
+ fun_l1_n22(x)
+ end
+end
+
+def fun_l0_n766(x)
+ if (x < 1)
+ fun_l1_n264(x)
+ else
+ fun_l1_n549(x)
+ end
+end
+
+def fun_l0_n767(x)
+ if (x < 1)
+ fun_l1_n351(x)
+ else
+ fun_l1_n813(x)
+ end
+end
+
+def fun_l0_n768(x)
+ if (x < 1)
+ fun_l1_n798(x)
+ else
+ fun_l1_n684(x)
+ end
+end
+
+def fun_l0_n769(x)
+ if (x < 1)
+ fun_l1_n202(x)
+ else
+ fun_l1_n982(x)
+ end
+end
+
+def fun_l0_n770(x)
+ if (x < 1)
+ fun_l1_n611(x)
+ else
+ fun_l1_n52(x)
+ end
+end
+
+def fun_l0_n771(x)
+ if (x < 1)
+ fun_l1_n754(x)
+ else
+ fun_l1_n7(x)
+ end
+end
+
+def fun_l0_n772(x)
+ if (x < 1)
+ fun_l1_n98(x)
+ else
+ fun_l1_n149(x)
+ end
+end
+
+def fun_l0_n773(x)
+ if (x < 1)
+ fun_l1_n358(x)
+ else
+ fun_l1_n603(x)
+ end
+end
+
+def fun_l0_n774(x)
+ if (x < 1)
+ fun_l1_n604(x)
+ else
+ fun_l1_n318(x)
+ end
+end
+
+def fun_l0_n775(x)
+ if (x < 1)
+ fun_l1_n831(x)
+ else
+ fun_l1_n635(x)
+ end
+end
+
+def fun_l0_n776(x)
+ if (x < 1)
+ fun_l1_n738(x)
+ else
+ fun_l1_n563(x)
+ end
+end
+
+def fun_l0_n777(x)
+ if (x < 1)
+ fun_l1_n570(x)
+ else
+ fun_l1_n671(x)
+ end
+end
+
+def fun_l0_n778(x)
+ if (x < 1)
+ fun_l1_n945(x)
+ else
+ fun_l1_n840(x)
+ end
+end
+
+def fun_l0_n779(x)
+ if (x < 1)
+ fun_l1_n116(x)
+ else
+ fun_l1_n942(x)
+ end
+end
+
+def fun_l0_n780(x)
+ if (x < 1)
+ fun_l1_n835(x)
+ else
+ fun_l1_n244(x)
+ end
+end
+
+def fun_l0_n781(x)
+ if (x < 1)
+ fun_l1_n427(x)
+ else
+ fun_l1_n556(x)
+ end
+end
+
+def fun_l0_n782(x)
+ if (x < 1)
+ fun_l1_n280(x)
+ else
+ fun_l1_n926(x)
+ end
+end
+
+def fun_l0_n783(x)
+ if (x < 1)
+ fun_l1_n674(x)
+ else
+ fun_l1_n560(x)
+ end
+end
+
+def fun_l0_n784(x)
+ if (x < 1)
+ fun_l1_n978(x)
+ else
+ fun_l1_n139(x)
+ end
+end
+
+def fun_l0_n785(x)
+ if (x < 1)
+ fun_l1_n928(x)
+ else
+ fun_l1_n11(x)
+ end
+end
+
+def fun_l0_n786(x)
+ if (x < 1)
+ fun_l1_n829(x)
+ else
+ fun_l1_n239(x)
+ end
+end
+
+def fun_l0_n787(x)
+ if (x < 1)
+ fun_l1_n732(x)
+ else
+ fun_l1_n829(x)
+ end
+end
+
+def fun_l0_n788(x)
+ if (x < 1)
+ fun_l1_n968(x)
+ else
+ fun_l1_n596(x)
+ end
+end
+
+def fun_l0_n789(x)
+ if (x < 1)
+ fun_l1_n214(x)
+ else
+ fun_l1_n158(x)
+ end
+end
+
+def fun_l0_n790(x)
+ if (x < 1)
+ fun_l1_n566(x)
+ else
+ fun_l1_n390(x)
+ end
+end
+
+def fun_l0_n791(x)
+ if (x < 1)
+ fun_l1_n936(x)
+ else
+ fun_l1_n31(x)
+ end
+end
+
+def fun_l0_n792(x)
+ if (x < 1)
+ fun_l1_n291(x)
+ else
+ fun_l1_n835(x)
+ end
+end
+
+def fun_l0_n793(x)
+ if (x < 1)
+ fun_l1_n300(x)
+ else
+ fun_l1_n658(x)
+ end
+end
+
+def fun_l0_n794(x)
+ if (x < 1)
+ fun_l1_n609(x)
+ else
+ fun_l1_n156(x)
+ end
+end
+
+def fun_l0_n795(x)
+ if (x < 1)
+ fun_l1_n419(x)
+ else
+ fun_l1_n534(x)
+ end
+end
+
+def fun_l0_n796(x)
+ if (x < 1)
+ fun_l1_n401(x)
+ else
+ fun_l1_n281(x)
+ end
+end
+
+def fun_l0_n797(x)
+ if (x < 1)
+ fun_l1_n538(x)
+ else
+ fun_l1_n905(x)
+ end
+end
+
+def fun_l0_n798(x)
+ if (x < 1)
+ fun_l1_n427(x)
+ else
+ fun_l1_n978(x)
+ end
+end
+
+def fun_l0_n799(x)
+ if (x < 1)
+ fun_l1_n851(x)
+ else
+ fun_l1_n57(x)
+ end
+end
+
+def fun_l0_n800(x)
+ if (x < 1)
+ fun_l1_n836(x)
+ else
+ fun_l1_n306(x)
+ end
+end
+
+def fun_l0_n801(x)
+ if (x < 1)
+ fun_l1_n414(x)
+ else
+ fun_l1_n679(x)
+ end
+end
+
+def fun_l0_n802(x)
+ if (x < 1)
+ fun_l1_n645(x)
+ else
+ fun_l1_n115(x)
+ end
+end
+
+def fun_l0_n803(x)
+ if (x < 1)
+ fun_l1_n884(x)
+ else
+ fun_l1_n801(x)
+ end
+end
+
+def fun_l0_n804(x)
+ if (x < 1)
+ fun_l1_n713(x)
+ else
+ fun_l1_n974(x)
+ end
+end
+
+def fun_l0_n805(x)
+ if (x < 1)
+ fun_l1_n301(x)
+ else
+ fun_l1_n589(x)
+ end
+end
+
+def fun_l0_n806(x)
+ if (x < 1)
+ fun_l1_n912(x)
+ else
+ fun_l1_n766(x)
+ end
+end
+
+def fun_l0_n807(x)
+ if (x < 1)
+ fun_l1_n656(x)
+ else
+ fun_l1_n765(x)
+ end
+end
+
+def fun_l0_n808(x)
+ if (x < 1)
+ fun_l1_n517(x)
+ else
+ fun_l1_n964(x)
+ end
+end
+
+def fun_l0_n809(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n69(x)
+ end
+end
+
+def fun_l0_n810(x)
+ if (x < 1)
+ fun_l1_n527(x)
+ else
+ fun_l1_n841(x)
+ end
+end
+
+def fun_l0_n811(x)
+ if (x < 1)
+ fun_l1_n564(x)
+ else
+ fun_l1_n541(x)
+ end
+end
+
+def fun_l0_n812(x)
+ if (x < 1)
+ fun_l1_n754(x)
+ else
+ fun_l1_n681(x)
+ end
+end
+
+def fun_l0_n813(x)
+ if (x < 1)
+ fun_l1_n21(x)
+ else
+ fun_l1_n561(x)
+ end
+end
+
+def fun_l0_n814(x)
+ if (x < 1)
+ fun_l1_n547(x)
+ else
+ fun_l1_n631(x)
+ end
+end
+
+def fun_l0_n815(x)
+ if (x < 1)
+ fun_l1_n956(x)
+ else
+ fun_l1_n889(x)
+ end
+end
+
+def fun_l0_n816(x)
+ if (x < 1)
+ fun_l1_n817(x)
+ else
+ fun_l1_n957(x)
+ end
+end
+
+def fun_l0_n817(x)
+ if (x < 1)
+ fun_l1_n622(x)
+ else
+ fun_l1_n827(x)
+ end
+end
+
+def fun_l0_n818(x)
+ if (x < 1)
+ fun_l1_n7(x)
+ else
+ fun_l1_n208(x)
+ end
+end
+
+def fun_l0_n819(x)
+ if (x < 1)
+ fun_l1_n411(x)
+ else
+ fun_l1_n742(x)
+ end
+end
+
+def fun_l0_n820(x)
+ if (x < 1)
+ fun_l1_n676(x)
+ else
+ fun_l1_n144(x)
+ end
+end
+
+def fun_l0_n821(x)
+ if (x < 1)
+ fun_l1_n489(x)
+ else
+ fun_l1_n963(x)
+ end
+end
+
+def fun_l0_n822(x)
+ if (x < 1)
+ fun_l1_n645(x)
+ else
+ fun_l1_n953(x)
+ end
+end
+
+def fun_l0_n823(x)
+ if (x < 1)
+ fun_l1_n974(x)
+ else
+ fun_l1_n75(x)
+ end
+end
+
+def fun_l0_n824(x)
+ if (x < 1)
+ fun_l1_n295(x)
+ else
+ fun_l1_n249(x)
+ end
+end
+
+def fun_l0_n825(x)
+ if (x < 1)
+ fun_l1_n141(x)
+ else
+ fun_l1_n633(x)
+ end
+end
+
+def fun_l0_n826(x)
+ if (x < 1)
+ fun_l1_n317(x)
+ else
+ fun_l1_n152(x)
+ end
+end
+
+def fun_l0_n827(x)
+ if (x < 1)
+ fun_l1_n570(x)
+ else
+ fun_l1_n377(x)
+ end
+end
+
+def fun_l0_n828(x)
+ if (x < 1)
+ fun_l1_n392(x)
+ else
+ fun_l1_n477(x)
+ end
+end
+
+def fun_l0_n829(x)
+ if (x < 1)
+ fun_l1_n277(x)
+ else
+ fun_l1_n276(x)
+ end
+end
+
+def fun_l0_n830(x)
+ if (x < 1)
+ fun_l1_n579(x)
+ else
+ fun_l1_n648(x)
+ end
+end
+
+def fun_l0_n831(x)
+ if (x < 1)
+ fun_l1_n8(x)
+ else
+ fun_l1_n25(x)
+ end
+end
+
+def fun_l0_n832(x)
+ if (x < 1)
+ fun_l1_n724(x)
+ else
+ fun_l1_n617(x)
+ end
+end
+
+def fun_l0_n833(x)
+ if (x < 1)
+ fun_l1_n771(x)
+ else
+ fun_l1_n619(x)
+ end
+end
+
+def fun_l0_n834(x)
+ if (x < 1)
+ fun_l1_n23(x)
+ else
+ fun_l1_n127(x)
+ end
+end
+
+def fun_l0_n835(x)
+ if (x < 1)
+ fun_l1_n322(x)
+ else
+ fun_l1_n327(x)
+ end
+end
+
+def fun_l0_n836(x)
+ if (x < 1)
+ fun_l1_n7(x)
+ else
+ fun_l1_n600(x)
+ end
+end
+
+def fun_l0_n837(x)
+ if (x < 1)
+ fun_l1_n796(x)
+ else
+ fun_l1_n782(x)
+ end
+end
+
+def fun_l0_n838(x)
+ if (x < 1)
+ fun_l1_n937(x)
+ else
+ fun_l1_n899(x)
+ end
+end
+
+def fun_l0_n839(x)
+ if (x < 1)
+ fun_l1_n16(x)
+ else
+ fun_l1_n349(x)
+ end
+end
+
+def fun_l0_n840(x)
+ if (x < 1)
+ fun_l1_n622(x)
+ else
+ fun_l1_n960(x)
+ end
+end
+
+def fun_l0_n841(x)
+ if (x < 1)
+ fun_l1_n295(x)
+ else
+ fun_l1_n176(x)
+ end
+end
+
+def fun_l0_n842(x)
+ if (x < 1)
+ fun_l1_n302(x)
+ else
+ fun_l1_n639(x)
+ end
+end
+
+def fun_l0_n843(x)
+ if (x < 1)
+ fun_l1_n342(x)
+ else
+ fun_l1_n373(x)
+ end
+end
+
+def fun_l0_n844(x)
+ if (x < 1)
+ fun_l1_n5(x)
+ else
+ fun_l1_n787(x)
+ end
+end
+
+def fun_l0_n845(x)
+ if (x < 1)
+ fun_l1_n89(x)
+ else
+ fun_l1_n951(x)
+ end
+end
+
+def fun_l0_n846(x)
+ if (x < 1)
+ fun_l1_n954(x)
+ else
+ fun_l1_n982(x)
+ end
+end
+
+def fun_l0_n847(x)
+ if (x < 1)
+ fun_l1_n971(x)
+ else
+ fun_l1_n917(x)
+ end
+end
+
+def fun_l0_n848(x)
+ if (x < 1)
+ fun_l1_n845(x)
+ else
+ fun_l1_n343(x)
+ end
+end
+
+def fun_l0_n849(x)
+ if (x < 1)
+ fun_l1_n684(x)
+ else
+ fun_l1_n683(x)
+ end
+end
+
+def fun_l0_n850(x)
+ if (x < 1)
+ fun_l1_n670(x)
+ else
+ fun_l1_n256(x)
+ end
+end
+
+def fun_l0_n851(x)
+ if (x < 1)
+ fun_l1_n405(x)
+ else
+ fun_l1_n123(x)
+ end
+end
+
+def fun_l0_n852(x)
+ if (x < 1)
+ fun_l1_n809(x)
+ else
+ fun_l1_n691(x)
+ end
+end
+
+def fun_l0_n853(x)
+ if (x < 1)
+ fun_l1_n937(x)
+ else
+ fun_l1_n92(x)
+ end
+end
+
+def fun_l0_n854(x)
+ if (x < 1)
+ fun_l1_n735(x)
+ else
+ fun_l1_n948(x)
+ end
+end
+
+def fun_l0_n855(x)
+ if (x < 1)
+ fun_l1_n684(x)
+ else
+ fun_l1_n566(x)
+ end
+end
+
+def fun_l0_n856(x)
+ if (x < 1)
+ fun_l1_n508(x)
+ else
+ fun_l1_n35(x)
+ end
+end
+
+def fun_l0_n857(x)
+ if (x < 1)
+ fun_l1_n865(x)
+ else
+ fun_l1_n930(x)
+ end
+end
+
+def fun_l0_n858(x)
+ if (x < 1)
+ fun_l1_n937(x)
+ else
+ fun_l1_n241(x)
+ end
+end
+
+def fun_l0_n859(x)
+ if (x < 1)
+ fun_l1_n938(x)
+ else
+ fun_l1_n108(x)
+ end
+end
+
+def fun_l0_n860(x)
+ if (x < 1)
+ fun_l1_n491(x)
+ else
+ fun_l1_n119(x)
+ end
+end
+
+def fun_l0_n861(x)
+ if (x < 1)
+ fun_l1_n991(x)
+ else
+ fun_l1_n198(x)
+ end
+end
+
+def fun_l0_n862(x)
+ if (x < 1)
+ fun_l1_n846(x)
+ else
+ fun_l1_n513(x)
+ end
+end
+
+def fun_l0_n863(x)
+ if (x < 1)
+ fun_l1_n279(x)
+ else
+ fun_l1_n229(x)
+ end
+end
+
+def fun_l0_n864(x)
+ if (x < 1)
+ fun_l1_n52(x)
+ else
+ fun_l1_n765(x)
+ end
+end
+
+def fun_l0_n865(x)
+ if (x < 1)
+ fun_l1_n35(x)
+ else
+ fun_l1_n572(x)
+ end
+end
+
+def fun_l0_n866(x)
+ if (x < 1)
+ fun_l1_n4(x)
+ else
+ fun_l1_n645(x)
+ end
+end
+
+def fun_l0_n867(x)
+ if (x < 1)
+ fun_l1_n112(x)
+ else
+ fun_l1_n758(x)
+ end
+end
+
+def fun_l0_n868(x)
+ if (x < 1)
+ fun_l1_n924(x)
+ else
+ fun_l1_n251(x)
+ end
+end
+
+def fun_l0_n869(x)
+ if (x < 1)
+ fun_l1_n558(x)
+ else
+ fun_l1_n818(x)
+ end
+end
+
+def fun_l0_n870(x)
+ if (x < 1)
+ fun_l1_n804(x)
+ else
+ fun_l1_n746(x)
+ end
+end
+
+def fun_l0_n871(x)
+ if (x < 1)
+ fun_l1_n111(x)
+ else
+ fun_l1_n407(x)
+ end
+end
+
+def fun_l0_n872(x)
+ if (x < 1)
+ fun_l1_n973(x)
+ else
+ fun_l1_n384(x)
+ end
+end
+
+def fun_l0_n873(x)
+ if (x < 1)
+ fun_l1_n102(x)
+ else
+ fun_l1_n199(x)
+ end
+end
+
+def fun_l0_n874(x)
+ if (x < 1)
+ fun_l1_n735(x)
+ else
+ fun_l1_n903(x)
+ end
+end
+
+def fun_l0_n875(x)
+ if (x < 1)
+ fun_l1_n95(x)
+ else
+ fun_l1_n720(x)
+ end
+end
+
+def fun_l0_n876(x)
+ if (x < 1)
+ fun_l1_n864(x)
+ else
+ fun_l1_n970(x)
+ end
+end
+
+def fun_l0_n877(x)
+ if (x < 1)
+ fun_l1_n729(x)
+ else
+ fun_l1_n207(x)
+ end
+end
+
+def fun_l0_n878(x)
+ if (x < 1)
+ fun_l1_n104(x)
+ else
+ fun_l1_n209(x)
+ end
+end
+
+def fun_l0_n879(x)
+ if (x < 1)
+ fun_l1_n566(x)
+ else
+ fun_l1_n918(x)
+ end
+end
+
+def fun_l0_n880(x)
+ if (x < 1)
+ fun_l1_n457(x)
+ else
+ fun_l1_n104(x)
+ end
+end
+
+def fun_l0_n881(x)
+ if (x < 1)
+ fun_l1_n745(x)
+ else
+ fun_l1_n476(x)
+ end
+end
+
+def fun_l0_n882(x)
+ if (x < 1)
+ fun_l1_n346(x)
+ else
+ fun_l1_n642(x)
+ end
+end
+
+def fun_l0_n883(x)
+ if (x < 1)
+ fun_l1_n78(x)
+ else
+ fun_l1_n210(x)
+ end
+end
+
+def fun_l0_n884(x)
+ if (x < 1)
+ fun_l1_n864(x)
+ else
+ fun_l1_n439(x)
+ end
+end
+
+def fun_l0_n885(x)
+ if (x < 1)
+ fun_l1_n0(x)
+ else
+ fun_l1_n414(x)
+ end
+end
+
+def fun_l0_n886(x)
+ if (x < 1)
+ fun_l1_n217(x)
+ else
+ fun_l1_n444(x)
+ end
+end
+
+def fun_l0_n887(x)
+ if (x < 1)
+ fun_l1_n193(x)
+ else
+ fun_l1_n788(x)
+ end
+end
+
+def fun_l0_n888(x)
+ if (x < 1)
+ fun_l1_n30(x)
+ else
+ fun_l1_n793(x)
+ end
+end
+
+def fun_l0_n889(x)
+ if (x < 1)
+ fun_l1_n222(x)
+ else
+ fun_l1_n936(x)
+ end
+end
+
+def fun_l0_n890(x)
+ if (x < 1)
+ fun_l1_n758(x)
+ else
+ fun_l1_n52(x)
+ end
+end
+
+def fun_l0_n891(x)
+ if (x < 1)
+ fun_l1_n796(x)
+ else
+ fun_l1_n424(x)
+ end
+end
+
+def fun_l0_n892(x)
+ if (x < 1)
+ fun_l1_n627(x)
+ else
+ fun_l1_n284(x)
+ end
+end
+
+def fun_l0_n893(x)
+ if (x < 1)
+ fun_l1_n42(x)
+ else
+ fun_l1_n193(x)
+ end
+end
+
+def fun_l0_n894(x)
+ if (x < 1)
+ fun_l1_n90(x)
+ else
+ fun_l1_n158(x)
+ end
+end
+
+def fun_l0_n895(x)
+ if (x < 1)
+ fun_l1_n878(x)
+ else
+ fun_l1_n396(x)
+ end
+end
+
+def fun_l0_n896(x)
+ if (x < 1)
+ fun_l1_n665(x)
+ else
+ fun_l1_n731(x)
+ end
+end
+
+def fun_l0_n897(x)
+ if (x < 1)
+ fun_l1_n618(x)
+ else
+ fun_l1_n152(x)
+ end
+end
+
+def fun_l0_n898(x)
+ if (x < 1)
+ fun_l1_n64(x)
+ else
+ fun_l1_n697(x)
+ end
+end
+
+def fun_l0_n899(x)
+ if (x < 1)
+ fun_l1_n354(x)
+ else
+ fun_l1_n657(x)
+ end
+end
+
+def fun_l0_n900(x)
+ if (x < 1)
+ fun_l1_n79(x)
+ else
+ fun_l1_n794(x)
+ end
+end
+
+def fun_l0_n901(x)
+ if (x < 1)
+ fun_l1_n623(x)
+ else
+ fun_l1_n392(x)
+ end
+end
+
+def fun_l0_n902(x)
+ if (x < 1)
+ fun_l1_n529(x)
+ else
+ fun_l1_n708(x)
+ end
+end
+
+def fun_l0_n903(x)
+ if (x < 1)
+ fun_l1_n900(x)
+ else
+ fun_l1_n830(x)
+ end
+end
+
+def fun_l0_n904(x)
+ if (x < 1)
+ fun_l1_n424(x)
+ else
+ fun_l1_n564(x)
+ end
+end
+
+def fun_l0_n905(x)
+ if (x < 1)
+ fun_l1_n557(x)
+ else
+ fun_l1_n612(x)
+ end
+end
+
+def fun_l0_n906(x)
+ if (x < 1)
+ fun_l1_n725(x)
+ else
+ fun_l1_n166(x)
+ end
+end
+
+def fun_l0_n907(x)
+ if (x < 1)
+ fun_l1_n534(x)
+ else
+ fun_l1_n159(x)
+ end
+end
+
+def fun_l0_n908(x)
+ if (x < 1)
+ fun_l1_n50(x)
+ else
+ fun_l1_n201(x)
+ end
+end
+
+def fun_l0_n909(x)
+ if (x < 1)
+ fun_l1_n568(x)
+ else
+ fun_l1_n276(x)
+ end
+end
+
+def fun_l0_n910(x)
+ if (x < 1)
+ fun_l1_n0(x)
+ else
+ fun_l1_n324(x)
+ end
+end
+
+def fun_l0_n911(x)
+ if (x < 1)
+ fun_l1_n926(x)
+ else
+ fun_l1_n524(x)
+ end
+end
+
+def fun_l0_n912(x)
+ if (x < 1)
+ fun_l1_n498(x)
+ else
+ fun_l1_n650(x)
+ end
+end
+
+def fun_l0_n913(x)
+ if (x < 1)
+ fun_l1_n593(x)
+ else
+ fun_l1_n860(x)
+ end
+end
+
+def fun_l0_n914(x)
+ if (x < 1)
+ fun_l1_n726(x)
+ else
+ fun_l1_n440(x)
+ end
+end
+
+def fun_l0_n915(x)
+ if (x < 1)
+ fun_l1_n422(x)
+ else
+ fun_l1_n627(x)
+ end
+end
+
+def fun_l0_n916(x)
+ if (x < 1)
+ fun_l1_n346(x)
+ else
+ fun_l1_n932(x)
+ end
+end
+
+def fun_l0_n917(x)
+ if (x < 1)
+ fun_l1_n403(x)
+ else
+ fun_l1_n58(x)
+ end
+end
+
+def fun_l0_n918(x)
+ if (x < 1)
+ fun_l1_n989(x)
+ else
+ fun_l1_n579(x)
+ end
+end
+
+def fun_l0_n919(x)
+ if (x < 1)
+ fun_l1_n933(x)
+ else
+ fun_l1_n434(x)
+ end
+end
+
+def fun_l0_n920(x)
+ if (x < 1)
+ fun_l1_n899(x)
+ else
+ fun_l1_n377(x)
+ end
+end
+
+def fun_l0_n921(x)
+ if (x < 1)
+ fun_l1_n17(x)
+ else
+ fun_l1_n637(x)
+ end
+end
+
+def fun_l0_n922(x)
+ if (x < 1)
+ fun_l1_n551(x)
+ else
+ fun_l1_n693(x)
+ end
+end
+
+def fun_l0_n923(x)
+ if (x < 1)
+ fun_l1_n861(x)
+ else
+ fun_l1_n248(x)
+ end
+end
+
+def fun_l0_n924(x)
+ if (x < 1)
+ fun_l1_n171(x)
+ else
+ fun_l1_n75(x)
+ end
+end
+
+def fun_l0_n925(x)
+ if (x < 1)
+ fun_l1_n233(x)
+ else
+ fun_l1_n444(x)
+ end
+end
+
+def fun_l0_n926(x)
+ if (x < 1)
+ fun_l1_n310(x)
+ else
+ fun_l1_n941(x)
+ end
+end
+
+def fun_l0_n927(x)
+ if (x < 1)
+ fun_l1_n363(x)
+ else
+ fun_l1_n567(x)
+ end
+end
+
+def fun_l0_n928(x)
+ if (x < 1)
+ fun_l1_n632(x)
+ else
+ fun_l1_n840(x)
+ end
+end
+
+def fun_l0_n929(x)
+ if (x < 1)
+ fun_l1_n368(x)
+ else
+ fun_l1_n713(x)
+ end
+end
+
+def fun_l0_n930(x)
+ if (x < 1)
+ fun_l1_n37(x)
+ else
+ fun_l1_n355(x)
+ end
+end
+
+def fun_l0_n931(x)
+ if (x < 1)
+ fun_l1_n907(x)
+ else
+ fun_l1_n784(x)
+ end
+end
+
+def fun_l0_n932(x)
+ if (x < 1)
+ fun_l1_n591(x)
+ else
+ fun_l1_n844(x)
+ end
+end
+
+def fun_l0_n933(x)
+ if (x < 1)
+ fun_l1_n996(x)
+ else
+ fun_l1_n943(x)
+ end
+end
+
+def fun_l0_n934(x)
+ if (x < 1)
+ fun_l1_n631(x)
+ else
+ fun_l1_n643(x)
+ end
+end
+
+def fun_l0_n935(x)
+ if (x < 1)
+ fun_l1_n875(x)
+ else
+ fun_l1_n89(x)
+ end
+end
+
+def fun_l0_n936(x)
+ if (x < 1)
+ fun_l1_n842(x)
+ else
+ fun_l1_n595(x)
+ end
+end
+
+def fun_l0_n937(x)
+ if (x < 1)
+ fun_l1_n921(x)
+ else
+ fun_l1_n271(x)
+ end
+end
+
+def fun_l0_n938(x)
+ if (x < 1)
+ fun_l1_n222(x)
+ else
+ fun_l1_n170(x)
+ end
+end
+
+def fun_l0_n939(x)
+ if (x < 1)
+ fun_l1_n567(x)
+ else
+ fun_l1_n463(x)
+ end
+end
+
+def fun_l0_n940(x)
+ if (x < 1)
+ fun_l1_n456(x)
+ else
+ fun_l1_n192(x)
+ end
+end
+
+def fun_l0_n941(x)
+ if (x < 1)
+ fun_l1_n32(x)
+ else
+ fun_l1_n951(x)
+ end
+end
+
+def fun_l0_n942(x)
+ if (x < 1)
+ fun_l1_n14(x)
+ else
+ fun_l1_n135(x)
+ end
+end
+
+def fun_l0_n943(x)
+ if (x < 1)
+ fun_l1_n15(x)
+ else
+ fun_l1_n234(x)
+ end
+end
+
+def fun_l0_n944(x)
+ if (x < 1)
+ fun_l1_n119(x)
+ else
+ fun_l1_n33(x)
+ end
+end
+
+def fun_l0_n945(x)
+ if (x < 1)
+ fun_l1_n859(x)
+ else
+ fun_l1_n497(x)
+ end
+end
+
+def fun_l0_n946(x)
+ if (x < 1)
+ fun_l1_n178(x)
+ else
+ fun_l1_n369(x)
+ end
+end
+
+def fun_l0_n947(x)
+ if (x < 1)
+ fun_l1_n64(x)
+ else
+ fun_l1_n356(x)
+ end
+end
+
+def fun_l0_n948(x)
+ if (x < 1)
+ fun_l1_n279(x)
+ else
+ fun_l1_n244(x)
+ end
+end
+
+def fun_l0_n949(x)
+ if (x < 1)
+ fun_l1_n728(x)
+ else
+ fun_l1_n548(x)
+ end
+end
+
+def fun_l0_n950(x)
+ if (x < 1)
+ fun_l1_n3(x)
+ else
+ fun_l1_n698(x)
+ end
+end
+
+def fun_l0_n951(x)
+ if (x < 1)
+ fun_l1_n665(x)
+ else
+ fun_l1_n198(x)
+ end
+end
+
+def fun_l0_n952(x)
+ if (x < 1)
+ fun_l1_n812(x)
+ else
+ fun_l1_n964(x)
+ end
+end
+
+def fun_l0_n953(x)
+ if (x < 1)
+ fun_l1_n851(x)
+ else
+ fun_l1_n877(x)
+ end
+end
+
+def fun_l0_n954(x)
+ if (x < 1)
+ fun_l1_n415(x)
+ else
+ fun_l1_n379(x)
+ end
+end
+
+def fun_l0_n955(x)
+ if (x < 1)
+ fun_l1_n806(x)
+ else
+ fun_l1_n919(x)
+ end
+end
+
+def fun_l0_n956(x)
+ if (x < 1)
+ fun_l1_n207(x)
+ else
+ fun_l1_n798(x)
+ end
+end
+
+def fun_l0_n957(x)
+ if (x < 1)
+ fun_l1_n269(x)
+ else
+ fun_l1_n416(x)
+ end
+end
+
+def fun_l0_n958(x)
+ if (x < 1)
+ fun_l1_n654(x)
+ else
+ fun_l1_n236(x)
+ end
+end
+
+def fun_l0_n959(x)
+ if (x < 1)
+ fun_l1_n392(x)
+ else
+ fun_l1_n623(x)
+ end
+end
+
+def fun_l0_n960(x)
+ if (x < 1)
+ fun_l1_n889(x)
+ else
+ fun_l1_n279(x)
+ end
+end
+
+def fun_l0_n961(x)
+ if (x < 1)
+ fun_l1_n476(x)
+ else
+ fun_l1_n201(x)
+ end
+end
+
+def fun_l0_n962(x)
+ if (x < 1)
+ fun_l1_n799(x)
+ else
+ fun_l1_n570(x)
+ end
+end
+
+def fun_l0_n963(x)
+ if (x < 1)
+ fun_l1_n802(x)
+ else
+ fun_l1_n114(x)
+ end
+end
+
+def fun_l0_n964(x)
+ if (x < 1)
+ fun_l1_n197(x)
+ else
+ fun_l1_n422(x)
+ end
+end
+
+def fun_l0_n965(x)
+ if (x < 1)
+ fun_l1_n37(x)
+ else
+ fun_l1_n691(x)
+ end
+end
+
+def fun_l0_n966(x)
+ if (x < 1)
+ fun_l1_n775(x)
+ else
+ fun_l1_n854(x)
+ end
+end
+
+def fun_l0_n967(x)
+ if (x < 1)
+ fun_l1_n373(x)
+ else
+ fun_l1_n306(x)
+ end
+end
+
+def fun_l0_n968(x)
+ if (x < 1)
+ fun_l1_n154(x)
+ else
+ fun_l1_n122(x)
+ end
+end
+
+def fun_l0_n969(x)
+ if (x < 1)
+ fun_l1_n497(x)
+ else
+ fun_l1_n456(x)
+ end
+end
+
+def fun_l0_n970(x)
+ if (x < 1)
+ fun_l1_n621(x)
+ else
+ fun_l1_n931(x)
+ end
+end
+
+def fun_l0_n971(x)
+ if (x < 1)
+ fun_l1_n963(x)
+ else
+ fun_l1_n613(x)
+ end
+end
+
+def fun_l0_n972(x)
+ if (x < 1)
+ fun_l1_n613(x)
+ else
+ fun_l1_n508(x)
+ end
+end
+
+def fun_l0_n973(x)
+ if (x < 1)
+ fun_l1_n466(x)
+ else
+ fun_l1_n929(x)
+ end
+end
+
+def fun_l0_n974(x)
+ if (x < 1)
+ fun_l1_n247(x)
+ else
+ fun_l1_n610(x)
+ end
+end
+
+def fun_l0_n975(x)
+ if (x < 1)
+ fun_l1_n674(x)
+ else
+ fun_l1_n609(x)
+ end
+end
+
+def fun_l0_n976(x)
+ if (x < 1)
+ fun_l1_n963(x)
+ else
+ fun_l1_n601(x)
+ end
+end
+
+def fun_l0_n977(x)
+ if (x < 1)
+ fun_l1_n728(x)
+ else
+ fun_l1_n242(x)
+ end
+end
+
+def fun_l0_n978(x)
+ if (x < 1)
+ fun_l1_n515(x)
+ else
+ fun_l1_n113(x)
+ end
+end
+
+def fun_l0_n979(x)
+ if (x < 1)
+ fun_l1_n734(x)
+ else
+ fun_l1_n271(x)
+ end
+end
+
+def fun_l0_n980(x)
+ if (x < 1)
+ fun_l1_n837(x)
+ else
+ fun_l1_n733(x)
+ end
+end
+
+def fun_l0_n981(x)
+ if (x < 1)
+ fun_l1_n326(x)
+ else
+ fun_l1_n213(x)
+ end
+end
+
+def fun_l0_n982(x)
+ if (x < 1)
+ fun_l1_n733(x)
+ else
+ fun_l1_n198(x)
+ end
+end
+
+def fun_l0_n983(x)
+ if (x < 1)
+ fun_l1_n989(x)
+ else
+ fun_l1_n700(x)
+ end
+end
+
+def fun_l0_n984(x)
+ if (x < 1)
+ fun_l1_n266(x)
+ else
+ fun_l1_n348(x)
+ end
+end
+
+def fun_l0_n985(x)
+ if (x < 1)
+ fun_l1_n931(x)
+ else
+ fun_l1_n646(x)
+ end
+end
+
+def fun_l0_n986(x)
+ if (x < 1)
+ fun_l1_n435(x)
+ else
+ fun_l1_n747(x)
+ end
+end
+
+def fun_l0_n987(x)
+ if (x < 1)
+ fun_l1_n474(x)
+ else
+ fun_l1_n638(x)
+ end
+end
+
+def fun_l0_n988(x)
+ if (x < 1)
+ fun_l1_n615(x)
+ else
+ fun_l1_n283(x)
+ end
+end
+
+def fun_l0_n989(x)
+ if (x < 1)
+ fun_l1_n410(x)
+ else
+ fun_l1_n289(x)
+ end
+end
+
+def fun_l0_n990(x)
+ if (x < 1)
+ fun_l1_n633(x)
+ else
+ fun_l1_n77(x)
+ end
+end
+
+def fun_l0_n991(x)
+ if (x < 1)
+ fun_l1_n153(x)
+ else
+ fun_l1_n255(x)
+ end
+end
+
+def fun_l0_n992(x)
+ if (x < 1)
+ fun_l1_n447(x)
+ else
+ fun_l1_n239(x)
+ end
+end
+
+def fun_l0_n993(x)
+ if (x < 1)
+ fun_l1_n837(x)
+ else
+ fun_l1_n582(x)
+ end
+end
+
+def fun_l0_n994(x)
+ if (x < 1)
+ fun_l1_n385(x)
+ else
+ fun_l1_n939(x)
+ end
+end
+
+def fun_l0_n995(x)
+ if (x < 1)
+ fun_l1_n236(x)
+ else
+ fun_l1_n497(x)
+ end
+end
+
+def fun_l0_n996(x)
+ if (x < 1)
+ fun_l1_n63(x)
+ else
+ fun_l1_n721(x)
+ end
+end
+
+def fun_l0_n997(x)
+ if (x < 1)
+ fun_l1_n457(x)
+ else
+ fun_l1_n376(x)
+ end
+end
+
+def fun_l0_n998(x)
+ if (x < 1)
+ fun_l1_n362(x)
+ else
+ fun_l1_n478(x)
+ end
+end
+
+def fun_l0_n999(x)
+ if (x < 1)
+ fun_l1_n554(x)
+ else
+ fun_l1_n422(x)
+ end
+end
+
+def fun_l1_n0(x)
+ if (x < 1)
+ fun_l2_n498(x)
+ else
+ fun_l2_n461(x)
+ end
+end
+
+def fun_l1_n1(x)
+ if (x < 1)
+ fun_l2_n424(x)
+ else
+ fun_l2_n137(x)
+ end
+end
+
+def fun_l1_n2(x)
+ if (x < 1)
+ fun_l2_n325(x)
+ else
+ fun_l2_n95(x)
+ end
+end
+
+def fun_l1_n3(x)
+ if (x < 1)
+ fun_l2_n917(x)
+ else
+ fun_l2_n469(x)
+ end
+end
+
+def fun_l1_n4(x)
+ if (x < 1)
+ fun_l2_n730(x)
+ else
+ fun_l2_n147(x)
+ end
+end
+
+def fun_l1_n5(x)
+ if (x < 1)
+ fun_l2_n796(x)
+ else
+ fun_l2_n907(x)
+ end
+end
+
+def fun_l1_n6(x)
+ if (x < 1)
+ fun_l2_n555(x)
+ else
+ fun_l2_n309(x)
+ end
+end
+
+def fun_l1_n7(x)
+ if (x < 1)
+ fun_l2_n475(x)
+ else
+ fun_l2_n193(x)
+ end
+end
+
+def fun_l1_n8(x)
+ if (x < 1)
+ fun_l2_n317(x)
+ else
+ fun_l2_n284(x)
+ end
+end
+
+def fun_l1_n9(x)
+ if (x < 1)
+ fun_l2_n297(x)
+ else
+ fun_l2_n370(x)
+ end
+end
+
+def fun_l1_n10(x)
+ if (x < 1)
+ fun_l2_n66(x)
+ else
+ fun_l2_n959(x)
+ end
+end
+
+def fun_l1_n11(x)
+ if (x < 1)
+ fun_l2_n833(x)
+ else
+ fun_l2_n250(x)
+ end
+end
+
+def fun_l1_n12(x)
+ if (x < 1)
+ fun_l2_n640(x)
+ else
+ fun_l2_n588(x)
+ end
+end
+
+def fun_l1_n13(x)
+ if (x < 1)
+ fun_l2_n91(x)
+ else
+ fun_l2_n294(x)
+ end
+end
+
+def fun_l1_n14(x)
+ if (x < 1)
+ fun_l2_n166(x)
+ else
+ fun_l2_n943(x)
+ end
+end
+
+def fun_l1_n15(x)
+ if (x < 1)
+ fun_l2_n352(x)
+ else
+ fun_l2_n363(x)
+ end
+end
+
+def fun_l1_n16(x)
+ if (x < 1)
+ fun_l2_n84(x)
+ else
+ fun_l2_n278(x)
+ end
+end
+
+def fun_l1_n17(x)
+ if (x < 1)
+ fun_l2_n308(x)
+ else
+ fun_l2_n341(x)
+ end
+end
+
+def fun_l1_n18(x)
+ if (x < 1)
+ fun_l2_n713(x)
+ else
+ fun_l2_n575(x)
+ end
+end
+
+def fun_l1_n19(x)
+ if (x < 1)
+ fun_l2_n81(x)
+ else
+ fun_l2_n301(x)
+ end
+end
+
+def fun_l1_n20(x)
+ if (x < 1)
+ fun_l2_n516(x)
+ else
+ fun_l2_n164(x)
+ end
+end
+
+def fun_l1_n21(x)
+ if (x < 1)
+ fun_l2_n900(x)
+ else
+ fun_l2_n963(x)
+ end
+end
+
+def fun_l1_n22(x)
+ if (x < 1)
+ fun_l2_n472(x)
+ else
+ fun_l2_n288(x)
+ end
+end
+
+def fun_l1_n23(x)
+ if (x < 1)
+ fun_l2_n587(x)
+ else
+ fun_l2_n515(x)
+ end
+end
+
+def fun_l1_n24(x)
+ if (x < 1)
+ fun_l2_n506(x)
+ else
+ fun_l2_n711(x)
+ end
+end
+
+def fun_l1_n25(x)
+ if (x < 1)
+ fun_l2_n935(x)
+ else
+ fun_l2_n177(x)
+ end
+end
+
+def fun_l1_n26(x)
+ if (x < 1)
+ fun_l2_n485(x)
+ else
+ fun_l2_n368(x)
+ end
+end
+
+def fun_l1_n27(x)
+ if (x < 1)
+ fun_l2_n984(x)
+ else
+ fun_l2_n290(x)
+ end
+end
+
+def fun_l1_n28(x)
+ if (x < 1)
+ fun_l2_n36(x)
+ else
+ fun_l2_n837(x)
+ end
+end
+
+def fun_l1_n29(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n311(x)
+ end
+end
+
+def fun_l1_n30(x)
+ if (x < 1)
+ fun_l2_n215(x)
+ else
+ fun_l2_n376(x)
+ end
+end
+
+def fun_l1_n31(x)
+ if (x < 1)
+ fun_l2_n533(x)
+ else
+ fun_l2_n92(x)
+ end
+end
+
+def fun_l1_n32(x)
+ if (x < 1)
+ fun_l2_n386(x)
+ else
+ fun_l2_n283(x)
+ end
+end
+
+def fun_l1_n33(x)
+ if (x < 1)
+ fun_l2_n268(x)
+ else
+ fun_l2_n256(x)
+ end
+end
+
+def fun_l1_n34(x)
+ if (x < 1)
+ fun_l2_n348(x)
+ else
+ fun_l2_n464(x)
+ end
+end
+
+def fun_l1_n35(x)
+ if (x < 1)
+ fun_l2_n25(x)
+ else
+ fun_l2_n33(x)
+ end
+end
+
+def fun_l1_n36(x)
+ if (x < 1)
+ fun_l2_n387(x)
+ else
+ fun_l2_n341(x)
+ end
+end
+
+def fun_l1_n37(x)
+ if (x < 1)
+ fun_l2_n580(x)
+ else
+ fun_l2_n476(x)
+ end
+end
+
+def fun_l1_n38(x)
+ if (x < 1)
+ fun_l2_n33(x)
+ else
+ fun_l2_n33(x)
+ end
+end
+
+def fun_l1_n39(x)
+ if (x < 1)
+ fun_l2_n861(x)
+ else
+ fun_l2_n52(x)
+ end
+end
+
+def fun_l1_n40(x)
+ if (x < 1)
+ fun_l2_n740(x)
+ else
+ fun_l2_n943(x)
+ end
+end
+
+def fun_l1_n41(x)
+ if (x < 1)
+ fun_l2_n956(x)
+ else
+ fun_l2_n159(x)
+ end
+end
+
+def fun_l1_n42(x)
+ if (x < 1)
+ fun_l2_n445(x)
+ else
+ fun_l2_n775(x)
+ end
+end
+
+def fun_l1_n43(x)
+ if (x < 1)
+ fun_l2_n667(x)
+ else
+ fun_l2_n282(x)
+ end
+end
+
+def fun_l1_n44(x)
+ if (x < 1)
+ fun_l2_n185(x)
+ else
+ fun_l2_n210(x)
+ end
+end
+
+def fun_l1_n45(x)
+ if (x < 1)
+ fun_l2_n490(x)
+ else
+ fun_l2_n21(x)
+ end
+end
+
+def fun_l1_n46(x)
+ if (x < 1)
+ fun_l2_n751(x)
+ else
+ fun_l2_n639(x)
+ end
+end
+
+def fun_l1_n47(x)
+ if (x < 1)
+ fun_l2_n431(x)
+ else
+ fun_l2_n917(x)
+ end
+end
+
+def fun_l1_n48(x)
+ if (x < 1)
+ fun_l2_n187(x)
+ else
+ fun_l2_n170(x)
+ end
+end
+
+def fun_l1_n49(x)
+ if (x < 1)
+ fun_l2_n780(x)
+ else
+ fun_l2_n77(x)
+ end
+end
+
+def fun_l1_n50(x)
+ if (x < 1)
+ fun_l2_n546(x)
+ else
+ fun_l2_n759(x)
+ end
+end
+
+def fun_l1_n51(x)
+ if (x < 1)
+ fun_l2_n453(x)
+ else
+ fun_l2_n951(x)
+ end
+end
+
+def fun_l1_n52(x)
+ if (x < 1)
+ fun_l2_n989(x)
+ else
+ fun_l2_n716(x)
+ end
+end
+
+def fun_l1_n53(x)
+ if (x < 1)
+ fun_l2_n652(x)
+ else
+ fun_l2_n36(x)
+ end
+end
+
+def fun_l1_n54(x)
+ if (x < 1)
+ fun_l2_n187(x)
+ else
+ fun_l2_n760(x)
+ end
+end
+
+def fun_l1_n55(x)
+ if (x < 1)
+ fun_l2_n706(x)
+ else
+ fun_l2_n927(x)
+ end
+end
+
+def fun_l1_n56(x)
+ if (x < 1)
+ fun_l2_n666(x)
+ else
+ fun_l2_n295(x)
+ end
+end
+
+def fun_l1_n57(x)
+ if (x < 1)
+ fun_l2_n424(x)
+ else
+ fun_l2_n447(x)
+ end
+end
+
+def fun_l1_n58(x)
+ if (x < 1)
+ fun_l2_n408(x)
+ else
+ fun_l2_n337(x)
+ end
+end
+
+def fun_l1_n59(x)
+ if (x < 1)
+ fun_l2_n567(x)
+ else
+ fun_l2_n765(x)
+ end
+end
+
+def fun_l1_n60(x)
+ if (x < 1)
+ fun_l2_n241(x)
+ else
+ fun_l2_n701(x)
+ end
+end
+
+def fun_l1_n61(x)
+ if (x < 1)
+ fun_l2_n831(x)
+ else
+ fun_l2_n382(x)
+ end
+end
+
+def fun_l1_n62(x)
+ if (x < 1)
+ fun_l2_n634(x)
+ else
+ fun_l2_n908(x)
+ end
+end
+
+def fun_l1_n63(x)
+ if (x < 1)
+ fun_l2_n696(x)
+ else
+ fun_l2_n48(x)
+ end
+end
+
+def fun_l1_n64(x)
+ if (x < 1)
+ fun_l2_n528(x)
+ else
+ fun_l2_n110(x)
+ end
+end
+
+def fun_l1_n65(x)
+ if (x < 1)
+ fun_l2_n767(x)
+ else
+ fun_l2_n973(x)
+ end
+end
+
+def fun_l1_n66(x)
+ if (x < 1)
+ fun_l2_n963(x)
+ else
+ fun_l2_n673(x)
+ end
+end
+
+def fun_l1_n67(x)
+ if (x < 1)
+ fun_l2_n927(x)
+ else
+ fun_l2_n309(x)
+ end
+end
+
+def fun_l1_n68(x)
+ if (x < 1)
+ fun_l2_n851(x)
+ else
+ fun_l2_n160(x)
+ end
+end
+
+def fun_l1_n69(x)
+ if (x < 1)
+ fun_l2_n575(x)
+ else
+ fun_l2_n800(x)
+ end
+end
+
+def fun_l1_n70(x)
+ if (x < 1)
+ fun_l2_n396(x)
+ else
+ fun_l2_n382(x)
+ end
+end
+
+def fun_l1_n71(x)
+ if (x < 1)
+ fun_l2_n508(x)
+ else
+ fun_l2_n763(x)
+ end
+end
+
+def fun_l1_n72(x)
+ if (x < 1)
+ fun_l2_n360(x)
+ else
+ fun_l2_n848(x)
+ end
+end
+
+def fun_l1_n73(x)
+ if (x < 1)
+ fun_l2_n878(x)
+ else
+ fun_l2_n83(x)
+ end
+end
+
+def fun_l1_n74(x)
+ if (x < 1)
+ fun_l2_n573(x)
+ else
+ fun_l2_n284(x)
+ end
+end
+
+def fun_l1_n75(x)
+ if (x < 1)
+ fun_l2_n999(x)
+ else
+ fun_l2_n954(x)
+ end
+end
+
+def fun_l1_n76(x)
+ if (x < 1)
+ fun_l2_n182(x)
+ else
+ fun_l2_n997(x)
+ end
+end
+
+def fun_l1_n77(x)
+ if (x < 1)
+ fun_l2_n802(x)
+ else
+ fun_l2_n409(x)
+ end
+end
+
+def fun_l1_n78(x)
+ if (x < 1)
+ fun_l2_n163(x)
+ else
+ fun_l2_n417(x)
+ end
+end
+
+def fun_l1_n79(x)
+ if (x < 1)
+ fun_l2_n328(x)
+ else
+ fun_l2_n688(x)
+ end
+end
+
+def fun_l1_n80(x)
+ if (x < 1)
+ fun_l2_n699(x)
+ else
+ fun_l2_n356(x)
+ end
+end
+
+def fun_l1_n81(x)
+ if (x < 1)
+ fun_l2_n44(x)
+ else
+ fun_l2_n302(x)
+ end
+end
+
+def fun_l1_n82(x)
+ if (x < 1)
+ fun_l2_n597(x)
+ else
+ fun_l2_n892(x)
+ end
+end
+
+def fun_l1_n83(x)
+ if (x < 1)
+ fun_l2_n494(x)
+ else
+ fun_l2_n547(x)
+ end
+end
+
+def fun_l1_n84(x)
+ if (x < 1)
+ fun_l2_n631(x)
+ else
+ fun_l2_n922(x)
+ end
+end
+
+def fun_l1_n85(x)
+ if (x < 1)
+ fun_l2_n797(x)
+ else
+ fun_l2_n874(x)
+ end
+end
+
+def fun_l1_n86(x)
+ if (x < 1)
+ fun_l2_n209(x)
+ else
+ fun_l2_n365(x)
+ end
+end
+
+def fun_l1_n87(x)
+ if (x < 1)
+ fun_l2_n516(x)
+ else
+ fun_l2_n371(x)
+ end
+end
+
+def fun_l1_n88(x)
+ if (x < 1)
+ fun_l2_n654(x)
+ else
+ fun_l2_n88(x)
+ end
+end
+
+def fun_l1_n89(x)
+ if (x < 1)
+ fun_l2_n70(x)
+ else
+ fun_l2_n521(x)
+ end
+end
+
+def fun_l1_n90(x)
+ if (x < 1)
+ fun_l2_n666(x)
+ else
+ fun_l2_n749(x)
+ end
+end
+
+def fun_l1_n91(x)
+ if (x < 1)
+ fun_l2_n504(x)
+ else
+ fun_l2_n339(x)
+ end
+end
+
+def fun_l1_n92(x)
+ if (x < 1)
+ fun_l2_n734(x)
+ else
+ fun_l2_n277(x)
+ end
+end
+
+def fun_l1_n93(x)
+ if (x < 1)
+ fun_l2_n300(x)
+ else
+ fun_l2_n826(x)
+ end
+end
+
+def fun_l1_n94(x)
+ if (x < 1)
+ fun_l2_n733(x)
+ else
+ fun_l2_n560(x)
+ end
+end
+
+def fun_l1_n95(x)
+ if (x < 1)
+ fun_l2_n834(x)
+ else
+ fun_l2_n644(x)
+ end
+end
+
+def fun_l1_n96(x)
+ if (x < 1)
+ fun_l2_n183(x)
+ else
+ fun_l2_n238(x)
+ end
+end
+
+def fun_l1_n97(x)
+ if (x < 1)
+ fun_l2_n372(x)
+ else
+ fun_l2_n753(x)
+ end
+end
+
+def fun_l1_n98(x)
+ if (x < 1)
+ fun_l2_n208(x)
+ else
+ fun_l2_n543(x)
+ end
+end
+
+def fun_l1_n99(x)
+ if (x < 1)
+ fun_l2_n38(x)
+ else
+ fun_l2_n974(x)
+ end
+end
+
+def fun_l1_n100(x)
+ if (x < 1)
+ fun_l2_n620(x)
+ else
+ fun_l2_n503(x)
+ end
+end
+
+def fun_l1_n101(x)
+ if (x < 1)
+ fun_l2_n248(x)
+ else
+ fun_l2_n189(x)
+ end
+end
+
+def fun_l1_n102(x)
+ if (x < 1)
+ fun_l2_n489(x)
+ else
+ fun_l2_n390(x)
+ end
+end
+
+def fun_l1_n103(x)
+ if (x < 1)
+ fun_l2_n452(x)
+ else
+ fun_l2_n22(x)
+ end
+end
+
+def fun_l1_n104(x)
+ if (x < 1)
+ fun_l2_n542(x)
+ else
+ fun_l2_n135(x)
+ end
+end
+
+def fun_l1_n105(x)
+ if (x < 1)
+ fun_l2_n988(x)
+ else
+ fun_l2_n118(x)
+ end
+end
+
+def fun_l1_n106(x)
+ if (x < 1)
+ fun_l2_n817(x)
+ else
+ fun_l2_n534(x)
+ end
+end
+
+def fun_l1_n107(x)
+ if (x < 1)
+ fun_l2_n812(x)
+ else
+ fun_l2_n206(x)
+ end
+end
+
+def fun_l1_n108(x)
+ if (x < 1)
+ fun_l2_n514(x)
+ else
+ fun_l2_n300(x)
+ end
+end
+
+def fun_l1_n109(x)
+ if (x < 1)
+ fun_l2_n482(x)
+ else
+ fun_l2_n376(x)
+ end
+end
+
+def fun_l1_n110(x)
+ if (x < 1)
+ fun_l2_n571(x)
+ else
+ fun_l2_n758(x)
+ end
+end
+
+def fun_l1_n111(x)
+ if (x < 1)
+ fun_l2_n971(x)
+ else
+ fun_l2_n811(x)
+ end
+end
+
+def fun_l1_n112(x)
+ if (x < 1)
+ fun_l2_n23(x)
+ else
+ fun_l2_n844(x)
+ end
+end
+
+def fun_l1_n113(x)
+ if (x < 1)
+ fun_l2_n865(x)
+ else
+ fun_l2_n149(x)
+ end
+end
+
+def fun_l1_n114(x)
+ if (x < 1)
+ fun_l2_n930(x)
+ else
+ fun_l2_n327(x)
+ end
+end
+
+def fun_l1_n115(x)
+ if (x < 1)
+ fun_l2_n67(x)
+ else
+ fun_l2_n442(x)
+ end
+end
+
+def fun_l1_n116(x)
+ if (x < 1)
+ fun_l2_n278(x)
+ else
+ fun_l2_n653(x)
+ end
+end
+
+def fun_l1_n117(x)
+ if (x < 1)
+ fun_l2_n457(x)
+ else
+ fun_l2_n179(x)
+ end
+end
+
+def fun_l1_n118(x)
+ if (x < 1)
+ fun_l2_n384(x)
+ else
+ fun_l2_n594(x)
+ end
+end
+
+def fun_l1_n119(x)
+ if (x < 1)
+ fun_l2_n361(x)
+ else
+ fun_l2_n770(x)
+ end
+end
+
+def fun_l1_n120(x)
+ if (x < 1)
+ fun_l2_n24(x)
+ else
+ fun_l2_n269(x)
+ end
+end
+
+def fun_l1_n121(x)
+ if (x < 1)
+ fun_l2_n57(x)
+ else
+ fun_l2_n2(x)
+ end
+end
+
+def fun_l1_n122(x)
+ if (x < 1)
+ fun_l2_n421(x)
+ else
+ fun_l2_n339(x)
+ end
+end
+
+def fun_l1_n123(x)
+ if (x < 1)
+ fun_l2_n623(x)
+ else
+ fun_l2_n985(x)
+ end
+end
+
+def fun_l1_n124(x)
+ if (x < 1)
+ fun_l2_n609(x)
+ else
+ fun_l2_n530(x)
+ end
+end
+
+def fun_l1_n125(x)
+ if (x < 1)
+ fun_l2_n565(x)
+ else
+ fun_l2_n155(x)
+ end
+end
+
+def fun_l1_n126(x)
+ if (x < 1)
+ fun_l2_n135(x)
+ else
+ fun_l2_n971(x)
+ end
+end
+
+def fun_l1_n127(x)
+ if (x < 1)
+ fun_l2_n691(x)
+ else
+ fun_l2_n503(x)
+ end
+end
+
+def fun_l1_n128(x)
+ if (x < 1)
+ fun_l2_n555(x)
+ else
+ fun_l2_n67(x)
+ end
+end
+
+def fun_l1_n129(x)
+ if (x < 1)
+ fun_l2_n95(x)
+ else
+ fun_l2_n192(x)
+ end
+end
+
+def fun_l1_n130(x)
+ if (x < 1)
+ fun_l2_n432(x)
+ else
+ fun_l2_n771(x)
+ end
+end
+
+def fun_l1_n131(x)
+ if (x < 1)
+ fun_l2_n993(x)
+ else
+ fun_l2_n539(x)
+ end
+end
+
+def fun_l1_n132(x)
+ if (x < 1)
+ fun_l2_n809(x)
+ else
+ fun_l2_n902(x)
+ end
+end
+
+def fun_l1_n133(x)
+ if (x < 1)
+ fun_l2_n95(x)
+ else
+ fun_l2_n928(x)
+ end
+end
+
+def fun_l1_n134(x)
+ if (x < 1)
+ fun_l2_n781(x)
+ else
+ fun_l2_n832(x)
+ end
+end
+
+def fun_l1_n135(x)
+ if (x < 1)
+ fun_l2_n231(x)
+ else
+ fun_l2_n392(x)
+ end
+end
+
+def fun_l1_n136(x)
+ if (x < 1)
+ fun_l2_n102(x)
+ else
+ fun_l2_n449(x)
+ end
+end
+
+def fun_l1_n137(x)
+ if (x < 1)
+ fun_l2_n196(x)
+ else
+ fun_l2_n909(x)
+ end
+end
+
+def fun_l1_n138(x)
+ if (x < 1)
+ fun_l2_n449(x)
+ else
+ fun_l2_n190(x)
+ end
+end
+
+def fun_l1_n139(x)
+ if (x < 1)
+ fun_l2_n638(x)
+ else
+ fun_l2_n149(x)
+ end
+end
+
+def fun_l1_n140(x)
+ if (x < 1)
+ fun_l2_n523(x)
+ else
+ fun_l2_n297(x)
+ end
+end
+
+def fun_l1_n141(x)
+ if (x < 1)
+ fun_l2_n476(x)
+ else
+ fun_l2_n161(x)
+ end
+end
+
+def fun_l1_n142(x)
+ if (x < 1)
+ fun_l2_n893(x)
+ else
+ fun_l2_n686(x)
+ end
+end
+
+def fun_l1_n143(x)
+ if (x < 1)
+ fun_l2_n958(x)
+ else
+ fun_l2_n899(x)
+ end
+end
+
+def fun_l1_n144(x)
+ if (x < 1)
+ fun_l2_n104(x)
+ else
+ fun_l2_n912(x)
+ end
+end
+
+def fun_l1_n145(x)
+ if (x < 1)
+ fun_l2_n332(x)
+ else
+ fun_l2_n579(x)
+ end
+end
+
+def fun_l1_n146(x)
+ if (x < 1)
+ fun_l2_n40(x)
+ else
+ fun_l2_n468(x)
+ end
+end
+
+def fun_l1_n147(x)
+ if (x < 1)
+ fun_l2_n771(x)
+ else
+ fun_l2_n314(x)
+ end
+end
+
+def fun_l1_n148(x)
+ if (x < 1)
+ fun_l2_n340(x)
+ else
+ fun_l2_n203(x)
+ end
+end
+
+def fun_l1_n149(x)
+ if (x < 1)
+ fun_l2_n952(x)
+ else
+ fun_l2_n265(x)
+ end
+end
+
+def fun_l1_n150(x)
+ if (x < 1)
+ fun_l2_n11(x)
+ else
+ fun_l2_n303(x)
+ end
+end
+
+def fun_l1_n151(x)
+ if (x < 1)
+ fun_l2_n394(x)
+ else
+ fun_l2_n317(x)
+ end
+end
+
+def fun_l1_n152(x)
+ if (x < 1)
+ fun_l2_n140(x)
+ else
+ fun_l2_n906(x)
+ end
+end
+
+def fun_l1_n153(x)
+ if (x < 1)
+ fun_l2_n75(x)
+ else
+ fun_l2_n485(x)
+ end
+end
+
+def fun_l1_n154(x)
+ if (x < 1)
+ fun_l2_n842(x)
+ else
+ fun_l2_n370(x)
+ end
+end
+
+def fun_l1_n155(x)
+ if (x < 1)
+ fun_l2_n346(x)
+ else
+ fun_l2_n833(x)
+ end
+end
+
+def fun_l1_n156(x)
+ if (x < 1)
+ fun_l2_n433(x)
+ else
+ fun_l2_n373(x)
+ end
+end
+
+def fun_l1_n157(x)
+ if (x < 1)
+ fun_l2_n978(x)
+ else
+ fun_l2_n99(x)
+ end
+end
+
+def fun_l1_n158(x)
+ if (x < 1)
+ fun_l2_n540(x)
+ else
+ fun_l2_n987(x)
+ end
+end
+
+def fun_l1_n159(x)
+ if (x < 1)
+ fun_l2_n785(x)
+ else
+ fun_l2_n478(x)
+ end
+end
+
+def fun_l1_n160(x)
+ if (x < 1)
+ fun_l2_n282(x)
+ else
+ fun_l2_n222(x)
+ end
+end
+
+def fun_l1_n161(x)
+ if (x < 1)
+ fun_l2_n29(x)
+ else
+ fun_l2_n946(x)
+ end
+end
+
+def fun_l1_n162(x)
+ if (x < 1)
+ fun_l2_n314(x)
+ else
+ fun_l2_n758(x)
+ end
+end
+
+def fun_l1_n163(x)
+ if (x < 1)
+ fun_l2_n861(x)
+ else
+ fun_l2_n799(x)
+ end
+end
+
+def fun_l1_n164(x)
+ if (x < 1)
+ fun_l2_n403(x)
+ else
+ fun_l2_n413(x)
+ end
+end
+
+def fun_l1_n165(x)
+ if (x < 1)
+ fun_l2_n160(x)
+ else
+ fun_l2_n794(x)
+ end
+end
+
+def fun_l1_n166(x)
+ if (x < 1)
+ fun_l2_n114(x)
+ else
+ fun_l2_n238(x)
+ end
+end
+
+def fun_l1_n167(x)
+ if (x < 1)
+ fun_l2_n806(x)
+ else
+ fun_l2_n233(x)
+ end
+end
+
+def fun_l1_n168(x)
+ if (x < 1)
+ fun_l2_n871(x)
+ else
+ fun_l2_n53(x)
+ end
+end
+
+def fun_l1_n169(x)
+ if (x < 1)
+ fun_l2_n644(x)
+ else
+ fun_l2_n503(x)
+ end
+end
+
+def fun_l1_n170(x)
+ if (x < 1)
+ fun_l2_n172(x)
+ else
+ fun_l2_n289(x)
+ end
+end
+
+def fun_l1_n171(x)
+ if (x < 1)
+ fun_l2_n920(x)
+ else
+ fun_l2_n851(x)
+ end
+end
+
+def fun_l1_n172(x)
+ if (x < 1)
+ fun_l2_n552(x)
+ else
+ fun_l2_n822(x)
+ end
+end
+
+def fun_l1_n173(x)
+ if (x < 1)
+ fun_l2_n747(x)
+ else
+ fun_l2_n265(x)
+ end
+end
+
+def fun_l1_n174(x)
+ if (x < 1)
+ fun_l2_n287(x)
+ else
+ fun_l2_n762(x)
+ end
+end
+
+def fun_l1_n175(x)
+ if (x < 1)
+ fun_l2_n627(x)
+ else
+ fun_l2_n951(x)
+ end
+end
+
+def fun_l1_n176(x)
+ if (x < 1)
+ fun_l2_n459(x)
+ else
+ fun_l2_n962(x)
+ end
+end
+
+def fun_l1_n177(x)
+ if (x < 1)
+ fun_l2_n214(x)
+ else
+ fun_l2_n145(x)
+ end
+end
+
+def fun_l1_n178(x)
+ if (x < 1)
+ fun_l2_n620(x)
+ else
+ fun_l2_n995(x)
+ end
+end
+
+def fun_l1_n179(x)
+ if (x < 1)
+ fun_l2_n136(x)
+ else
+ fun_l2_n283(x)
+ end
+end
+
+def fun_l1_n180(x)
+ if (x < 1)
+ fun_l2_n377(x)
+ else
+ fun_l2_n672(x)
+ end
+end
+
+def fun_l1_n181(x)
+ if (x < 1)
+ fun_l2_n218(x)
+ else
+ fun_l2_n434(x)
+ end
+end
+
+def fun_l1_n182(x)
+ if (x < 1)
+ fun_l2_n522(x)
+ else
+ fun_l2_n525(x)
+ end
+end
+
+def fun_l1_n183(x)
+ if (x < 1)
+ fun_l2_n648(x)
+ else
+ fun_l2_n725(x)
+ end
+end
+
+def fun_l1_n184(x)
+ if (x < 1)
+ fun_l2_n579(x)
+ else
+ fun_l2_n974(x)
+ end
+end
+
+def fun_l1_n185(x)
+ if (x < 1)
+ fun_l2_n10(x)
+ else
+ fun_l2_n514(x)
+ end
+end
+
+def fun_l1_n186(x)
+ if (x < 1)
+ fun_l2_n829(x)
+ else
+ fun_l2_n754(x)
+ end
+end
+
+def fun_l1_n187(x)
+ if (x < 1)
+ fun_l2_n380(x)
+ else
+ fun_l2_n401(x)
+ end
+end
+
+def fun_l1_n188(x)
+ if (x < 1)
+ fun_l2_n839(x)
+ else
+ fun_l2_n453(x)
+ end
+end
+
+def fun_l1_n189(x)
+ if (x < 1)
+ fun_l2_n553(x)
+ else
+ fun_l2_n553(x)
+ end
+end
+
+def fun_l1_n190(x)
+ if (x < 1)
+ fun_l2_n972(x)
+ else
+ fun_l2_n187(x)
+ end
+end
+
+def fun_l1_n191(x)
+ if (x < 1)
+ fun_l2_n275(x)
+ else
+ fun_l2_n11(x)
+ end
+end
+
+def fun_l1_n192(x)
+ if (x < 1)
+ fun_l2_n1(x)
+ else
+ fun_l2_n927(x)
+ end
+end
+
+def fun_l1_n193(x)
+ if (x < 1)
+ fun_l2_n569(x)
+ else
+ fun_l2_n557(x)
+ end
+end
+
+def fun_l1_n194(x)
+ if (x < 1)
+ fun_l2_n380(x)
+ else
+ fun_l2_n187(x)
+ end
+end
+
+def fun_l1_n195(x)
+ if (x < 1)
+ fun_l2_n297(x)
+ else
+ fun_l2_n813(x)
+ end
+end
+
+def fun_l1_n196(x)
+ if (x < 1)
+ fun_l2_n565(x)
+ else
+ fun_l2_n514(x)
+ end
+end
+
+def fun_l1_n197(x)
+ if (x < 1)
+ fun_l2_n473(x)
+ else
+ fun_l2_n64(x)
+ end
+end
+
+def fun_l1_n198(x)
+ if (x < 1)
+ fun_l2_n182(x)
+ else
+ fun_l2_n363(x)
+ end
+end
+
+def fun_l1_n199(x)
+ if (x < 1)
+ fun_l2_n660(x)
+ else
+ fun_l2_n506(x)
+ end
+end
+
+def fun_l1_n200(x)
+ if (x < 1)
+ fun_l2_n834(x)
+ else
+ fun_l2_n348(x)
+ end
+end
+
+def fun_l1_n201(x)
+ if (x < 1)
+ fun_l2_n403(x)
+ else
+ fun_l2_n432(x)
+ end
+end
+
+def fun_l1_n202(x)
+ if (x < 1)
+ fun_l2_n115(x)
+ else
+ fun_l2_n145(x)
+ end
+end
+
+def fun_l1_n203(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n4(x)
+ end
+end
+
+def fun_l1_n204(x)
+ if (x < 1)
+ fun_l2_n951(x)
+ else
+ fun_l2_n753(x)
+ end
+end
+
+def fun_l1_n205(x)
+ if (x < 1)
+ fun_l2_n703(x)
+ else
+ fun_l2_n563(x)
+ end
+end
+
+def fun_l1_n206(x)
+ if (x < 1)
+ fun_l2_n614(x)
+ else
+ fun_l2_n563(x)
+ end
+end
+
+def fun_l1_n207(x)
+ if (x < 1)
+ fun_l2_n210(x)
+ else
+ fun_l2_n139(x)
+ end
+end
+
+def fun_l1_n208(x)
+ if (x < 1)
+ fun_l2_n471(x)
+ else
+ fun_l2_n346(x)
+ end
+end
+
+def fun_l1_n209(x)
+ if (x < 1)
+ fun_l2_n922(x)
+ else
+ fun_l2_n54(x)
+ end
+end
+
+def fun_l1_n210(x)
+ if (x < 1)
+ fun_l2_n494(x)
+ else
+ fun_l2_n41(x)
+ end
+end
+
+def fun_l1_n211(x)
+ if (x < 1)
+ fun_l2_n87(x)
+ else
+ fun_l2_n190(x)
+ end
+end
+
+def fun_l1_n212(x)
+ if (x < 1)
+ fun_l2_n458(x)
+ else
+ fun_l2_n885(x)
+ end
+end
+
+def fun_l1_n213(x)
+ if (x < 1)
+ fun_l2_n48(x)
+ else
+ fun_l2_n225(x)
+ end
+end
+
+def fun_l1_n214(x)
+ if (x < 1)
+ fun_l2_n706(x)
+ else
+ fun_l2_n694(x)
+ end
+end
+
+def fun_l1_n215(x)
+ if (x < 1)
+ fun_l2_n116(x)
+ else
+ fun_l2_n233(x)
+ end
+end
+
+def fun_l1_n216(x)
+ if (x < 1)
+ fun_l2_n279(x)
+ else
+ fun_l2_n857(x)
+ end
+end
+
+def fun_l1_n217(x)
+ if (x < 1)
+ fun_l2_n643(x)
+ else
+ fun_l2_n289(x)
+ end
+end
+
+def fun_l1_n218(x)
+ if (x < 1)
+ fun_l2_n535(x)
+ else
+ fun_l2_n833(x)
+ end
+end
+
+def fun_l1_n219(x)
+ if (x < 1)
+ fun_l2_n478(x)
+ else
+ fun_l2_n793(x)
+ end
+end
+
+def fun_l1_n220(x)
+ if (x < 1)
+ fun_l2_n57(x)
+ else
+ fun_l2_n64(x)
+ end
+end
+
+def fun_l1_n221(x)
+ if (x < 1)
+ fun_l2_n36(x)
+ else
+ fun_l2_n74(x)
+ end
+end
+
+def fun_l1_n222(x)
+ if (x < 1)
+ fun_l2_n438(x)
+ else
+ fun_l2_n616(x)
+ end
+end
+
+def fun_l1_n223(x)
+ if (x < 1)
+ fun_l2_n900(x)
+ else
+ fun_l2_n744(x)
+ end
+end
+
+def fun_l1_n224(x)
+ if (x < 1)
+ fun_l2_n780(x)
+ else
+ fun_l2_n213(x)
+ end
+end
+
+def fun_l1_n225(x)
+ if (x < 1)
+ fun_l2_n916(x)
+ else
+ fun_l2_n471(x)
+ end
+end
+
+def fun_l1_n226(x)
+ if (x < 1)
+ fun_l2_n236(x)
+ else
+ fun_l2_n980(x)
+ end
+end
+
+def fun_l1_n227(x)
+ if (x < 1)
+ fun_l2_n28(x)
+ else
+ fun_l2_n291(x)
+ end
+end
+
+def fun_l1_n228(x)
+ if (x < 1)
+ fun_l2_n35(x)
+ else
+ fun_l2_n353(x)
+ end
+end
+
+def fun_l1_n229(x)
+ if (x < 1)
+ fun_l2_n404(x)
+ else
+ fun_l2_n254(x)
+ end
+end
+
+def fun_l1_n230(x)
+ if (x < 1)
+ fun_l2_n641(x)
+ else
+ fun_l2_n464(x)
+ end
+end
+
+def fun_l1_n231(x)
+ if (x < 1)
+ fun_l2_n592(x)
+ else
+ fun_l2_n646(x)
+ end
+end
+
+def fun_l1_n232(x)
+ if (x < 1)
+ fun_l2_n162(x)
+ else
+ fun_l2_n215(x)
+ end
+end
+
+def fun_l1_n233(x)
+ if (x < 1)
+ fun_l2_n219(x)
+ else
+ fun_l2_n772(x)
+ end
+end
+
+def fun_l1_n234(x)
+ if (x < 1)
+ fun_l2_n304(x)
+ else
+ fun_l2_n963(x)
+ end
+end
+
+def fun_l1_n235(x)
+ if (x < 1)
+ fun_l2_n610(x)
+ else
+ fun_l2_n716(x)
+ end
+end
+
+def fun_l1_n236(x)
+ if (x < 1)
+ fun_l2_n151(x)
+ else
+ fun_l2_n498(x)
+ end
+end
+
+def fun_l1_n237(x)
+ if (x < 1)
+ fun_l2_n288(x)
+ else
+ fun_l2_n261(x)
+ end
+end
+
+def fun_l1_n238(x)
+ if (x < 1)
+ fun_l2_n139(x)
+ else
+ fun_l2_n18(x)
+ end
+end
+
+def fun_l1_n239(x)
+ if (x < 1)
+ fun_l2_n559(x)
+ else
+ fun_l2_n148(x)
+ end
+end
+
+def fun_l1_n240(x)
+ if (x < 1)
+ fun_l2_n520(x)
+ else
+ fun_l2_n250(x)
+ end
+end
+
+def fun_l1_n241(x)
+ if (x < 1)
+ fun_l2_n42(x)
+ else
+ fun_l2_n196(x)
+ end
+end
+
+def fun_l1_n242(x)
+ if (x < 1)
+ fun_l2_n16(x)
+ else
+ fun_l2_n540(x)
+ end
+end
+
+def fun_l1_n243(x)
+ if (x < 1)
+ fun_l2_n539(x)
+ else
+ fun_l2_n890(x)
+ end
+end
+
+def fun_l1_n244(x)
+ if (x < 1)
+ fun_l2_n559(x)
+ else
+ fun_l2_n423(x)
+ end
+end
+
+def fun_l1_n245(x)
+ if (x < 1)
+ fun_l2_n110(x)
+ else
+ fun_l2_n711(x)
+ end
+end
+
+def fun_l1_n246(x)
+ if (x < 1)
+ fun_l2_n151(x)
+ else
+ fun_l2_n407(x)
+ end
+end
+
+def fun_l1_n247(x)
+ if (x < 1)
+ fun_l2_n118(x)
+ else
+ fun_l2_n209(x)
+ end
+end
+
+def fun_l1_n248(x)
+ if (x < 1)
+ fun_l2_n764(x)
+ else
+ fun_l2_n932(x)
+ end
+end
+
+def fun_l1_n249(x)
+ if (x < 1)
+ fun_l2_n991(x)
+ else
+ fun_l2_n828(x)
+ end
+end
+
+def fun_l1_n250(x)
+ if (x < 1)
+ fun_l2_n354(x)
+ else
+ fun_l2_n53(x)
+ end
+end
+
+def fun_l1_n251(x)
+ if (x < 1)
+ fun_l2_n63(x)
+ else
+ fun_l2_n292(x)
+ end
+end
+
+def fun_l1_n252(x)
+ if (x < 1)
+ fun_l2_n874(x)
+ else
+ fun_l2_n544(x)
+ end
+end
+
+def fun_l1_n253(x)
+ if (x < 1)
+ fun_l2_n336(x)
+ else
+ fun_l2_n57(x)
+ end
+end
+
+def fun_l1_n254(x)
+ if (x < 1)
+ fun_l2_n302(x)
+ else
+ fun_l2_n90(x)
+ end
+end
+
+def fun_l1_n255(x)
+ if (x < 1)
+ fun_l2_n122(x)
+ else
+ fun_l2_n888(x)
+ end
+end
+
+def fun_l1_n256(x)
+ if (x < 1)
+ fun_l2_n326(x)
+ else
+ fun_l2_n616(x)
+ end
+end
+
+def fun_l1_n257(x)
+ if (x < 1)
+ fun_l2_n77(x)
+ else
+ fun_l2_n622(x)
+ end
+end
+
+def fun_l1_n258(x)
+ if (x < 1)
+ fun_l2_n785(x)
+ else
+ fun_l2_n229(x)
+ end
+end
+
+def fun_l1_n259(x)
+ if (x < 1)
+ fun_l2_n504(x)
+ else
+ fun_l2_n766(x)
+ end
+end
+
+def fun_l1_n260(x)
+ if (x < 1)
+ fun_l2_n857(x)
+ else
+ fun_l2_n823(x)
+ end
+end
+
+def fun_l1_n261(x)
+ if (x < 1)
+ fun_l2_n72(x)
+ else
+ fun_l2_n875(x)
+ end
+end
+
+def fun_l1_n262(x)
+ if (x < 1)
+ fun_l2_n215(x)
+ else
+ fun_l2_n549(x)
+ end
+end
+
+def fun_l1_n263(x)
+ if (x < 1)
+ fun_l2_n232(x)
+ else
+ fun_l2_n96(x)
+ end
+end
+
+def fun_l1_n264(x)
+ if (x < 1)
+ fun_l2_n183(x)
+ else
+ fun_l2_n351(x)
+ end
+end
+
+def fun_l1_n265(x)
+ if (x < 1)
+ fun_l2_n906(x)
+ else
+ fun_l2_n154(x)
+ end
+end
+
+def fun_l1_n266(x)
+ if (x < 1)
+ fun_l2_n234(x)
+ else
+ fun_l2_n547(x)
+ end
+end
+
+def fun_l1_n267(x)
+ if (x < 1)
+ fun_l2_n882(x)
+ else
+ fun_l2_n802(x)
+ end
+end
+
+def fun_l1_n268(x)
+ if (x < 1)
+ fun_l2_n844(x)
+ else
+ fun_l2_n430(x)
+ end
+end
+
+def fun_l1_n269(x)
+ if (x < 1)
+ fun_l2_n781(x)
+ else
+ fun_l2_n738(x)
+ end
+end
+
+def fun_l1_n270(x)
+ if (x < 1)
+ fun_l2_n88(x)
+ else
+ fun_l2_n439(x)
+ end
+end
+
+def fun_l1_n271(x)
+ if (x < 1)
+ fun_l2_n334(x)
+ else
+ fun_l2_n508(x)
+ end
+end
+
+def fun_l1_n272(x)
+ if (x < 1)
+ fun_l2_n871(x)
+ else
+ fun_l2_n562(x)
+ end
+end
+
+def fun_l1_n273(x)
+ if (x < 1)
+ fun_l2_n328(x)
+ else
+ fun_l2_n356(x)
+ end
+end
+
+def fun_l1_n274(x)
+ if (x < 1)
+ fun_l2_n654(x)
+ else
+ fun_l2_n511(x)
+ end
+end
+
+def fun_l1_n275(x)
+ if (x < 1)
+ fun_l2_n309(x)
+ else
+ fun_l2_n840(x)
+ end
+end
+
+def fun_l1_n276(x)
+ if (x < 1)
+ fun_l2_n729(x)
+ else
+ fun_l2_n72(x)
+ end
+end
+
+def fun_l1_n277(x)
+ if (x < 1)
+ fun_l2_n993(x)
+ else
+ fun_l2_n858(x)
+ end
+end
+
+def fun_l1_n278(x)
+ if (x < 1)
+ fun_l2_n664(x)
+ else
+ fun_l2_n50(x)
+ end
+end
+
+def fun_l1_n279(x)
+ if (x < 1)
+ fun_l2_n225(x)
+ else
+ fun_l2_n403(x)
+ end
+end
+
+def fun_l1_n280(x)
+ if (x < 1)
+ fun_l2_n780(x)
+ else
+ fun_l2_n396(x)
+ end
+end
+
+def fun_l1_n281(x)
+ if (x < 1)
+ fun_l2_n114(x)
+ else
+ fun_l2_n114(x)
+ end
+end
+
+def fun_l1_n282(x)
+ if (x < 1)
+ fun_l2_n568(x)
+ else
+ fun_l2_n610(x)
+ end
+end
+
+def fun_l1_n283(x)
+ if (x < 1)
+ fun_l2_n539(x)
+ else
+ fun_l2_n990(x)
+ end
+end
+
+def fun_l1_n284(x)
+ if (x < 1)
+ fun_l2_n773(x)
+ else
+ fun_l2_n622(x)
+ end
+end
+
+def fun_l1_n285(x)
+ if (x < 1)
+ fun_l2_n695(x)
+ else
+ fun_l2_n101(x)
+ end
+end
+
+def fun_l1_n286(x)
+ if (x < 1)
+ fun_l2_n239(x)
+ else
+ fun_l2_n242(x)
+ end
+end
+
+def fun_l1_n287(x)
+ if (x < 1)
+ fun_l2_n191(x)
+ else
+ fun_l2_n839(x)
+ end
+end
+
+def fun_l1_n288(x)
+ if (x < 1)
+ fun_l2_n246(x)
+ else
+ fun_l2_n179(x)
+ end
+end
+
+def fun_l1_n289(x)
+ if (x < 1)
+ fun_l2_n300(x)
+ else
+ fun_l2_n975(x)
+ end
+end
+
+def fun_l1_n290(x)
+ if (x < 1)
+ fun_l2_n436(x)
+ else
+ fun_l2_n14(x)
+ end
+end
+
+def fun_l1_n291(x)
+ if (x < 1)
+ fun_l2_n33(x)
+ else
+ fun_l2_n303(x)
+ end
+end
+
+def fun_l1_n292(x)
+ if (x < 1)
+ fun_l2_n462(x)
+ else
+ fun_l2_n399(x)
+ end
+end
+
+def fun_l1_n293(x)
+ if (x < 1)
+ fun_l2_n782(x)
+ else
+ fun_l2_n521(x)
+ end
+end
+
+def fun_l1_n294(x)
+ if (x < 1)
+ fun_l2_n995(x)
+ else
+ fun_l2_n944(x)
+ end
+end
+
+def fun_l1_n295(x)
+ if (x < 1)
+ fun_l2_n700(x)
+ else
+ fun_l2_n250(x)
+ end
+end
+
+def fun_l1_n296(x)
+ if (x < 1)
+ fun_l2_n866(x)
+ else
+ fun_l2_n566(x)
+ end
+end
+
+def fun_l1_n297(x)
+ if (x < 1)
+ fun_l2_n373(x)
+ else
+ fun_l2_n881(x)
+ end
+end
+
+def fun_l1_n298(x)
+ if (x < 1)
+ fun_l2_n382(x)
+ else
+ fun_l2_n729(x)
+ end
+end
+
+def fun_l1_n299(x)
+ if (x < 1)
+ fun_l2_n878(x)
+ else
+ fun_l2_n192(x)
+ end
+end
+
+def fun_l1_n300(x)
+ if (x < 1)
+ fun_l2_n65(x)
+ else
+ fun_l2_n434(x)
+ end
+end
+
+def fun_l1_n301(x)
+ if (x < 1)
+ fun_l2_n513(x)
+ else
+ fun_l2_n617(x)
+ end
+end
+
+def fun_l1_n302(x)
+ if (x < 1)
+ fun_l2_n972(x)
+ else
+ fun_l2_n482(x)
+ end
+end
+
+def fun_l1_n303(x)
+ if (x < 1)
+ fun_l2_n533(x)
+ else
+ fun_l2_n774(x)
+ end
+end
+
+def fun_l1_n304(x)
+ if (x < 1)
+ fun_l2_n439(x)
+ else
+ fun_l2_n351(x)
+ end
+end
+
+def fun_l1_n305(x)
+ if (x < 1)
+ fun_l2_n181(x)
+ else
+ fun_l2_n74(x)
+ end
+end
+
+def fun_l1_n306(x)
+ if (x < 1)
+ fun_l2_n117(x)
+ else
+ fun_l2_n962(x)
+ end
+end
+
+def fun_l1_n307(x)
+ if (x < 1)
+ fun_l2_n499(x)
+ else
+ fun_l2_n183(x)
+ end
+end
+
+def fun_l1_n308(x)
+ if (x < 1)
+ fun_l2_n358(x)
+ else
+ fun_l2_n226(x)
+ end
+end
+
+def fun_l1_n309(x)
+ if (x < 1)
+ fun_l2_n227(x)
+ else
+ fun_l2_n425(x)
+ end
+end
+
+def fun_l1_n310(x)
+ if (x < 1)
+ fun_l2_n724(x)
+ else
+ fun_l2_n278(x)
+ end
+end
+
+def fun_l1_n311(x)
+ if (x < 1)
+ fun_l2_n784(x)
+ else
+ fun_l2_n888(x)
+ end
+end
+
+def fun_l1_n312(x)
+ if (x < 1)
+ fun_l2_n952(x)
+ else
+ fun_l2_n849(x)
+ end
+end
+
+def fun_l1_n313(x)
+ if (x < 1)
+ fun_l2_n921(x)
+ else
+ fun_l2_n31(x)
+ end
+end
+
+def fun_l1_n314(x)
+ if (x < 1)
+ fun_l2_n469(x)
+ else
+ fun_l2_n856(x)
+ end
+end
+
+def fun_l1_n315(x)
+ if (x < 1)
+ fun_l2_n89(x)
+ else
+ fun_l2_n949(x)
+ end
+end
+
+def fun_l1_n316(x)
+ if (x < 1)
+ fun_l2_n216(x)
+ else
+ fun_l2_n410(x)
+ end
+end
+
+def fun_l1_n317(x)
+ if (x < 1)
+ fun_l2_n591(x)
+ else
+ fun_l2_n203(x)
+ end
+end
+
+def fun_l1_n318(x)
+ if (x < 1)
+ fun_l2_n19(x)
+ else
+ fun_l2_n461(x)
+ end
+end
+
+def fun_l1_n319(x)
+ if (x < 1)
+ fun_l2_n875(x)
+ else
+ fun_l2_n996(x)
+ end
+end
+
+def fun_l1_n320(x)
+ if (x < 1)
+ fun_l2_n696(x)
+ else
+ fun_l2_n987(x)
+ end
+end
+
+def fun_l1_n321(x)
+ if (x < 1)
+ fun_l2_n708(x)
+ else
+ fun_l2_n150(x)
+ end
+end
+
+def fun_l1_n322(x)
+ if (x < 1)
+ fun_l2_n324(x)
+ else
+ fun_l2_n814(x)
+ end
+end
+
+def fun_l1_n323(x)
+ if (x < 1)
+ fun_l2_n427(x)
+ else
+ fun_l2_n472(x)
+ end
+end
+
+def fun_l1_n324(x)
+ if (x < 1)
+ fun_l2_n847(x)
+ else
+ fun_l2_n482(x)
+ end
+end
+
+def fun_l1_n325(x)
+ if (x < 1)
+ fun_l2_n335(x)
+ else
+ fun_l2_n854(x)
+ end
+end
+
+def fun_l1_n326(x)
+ if (x < 1)
+ fun_l2_n635(x)
+ else
+ fun_l2_n276(x)
+ end
+end
+
+def fun_l1_n327(x)
+ if (x < 1)
+ fun_l2_n539(x)
+ else
+ fun_l2_n885(x)
+ end
+end
+
+def fun_l1_n328(x)
+ if (x < 1)
+ fun_l2_n979(x)
+ else
+ fun_l2_n558(x)
+ end
+end
+
+def fun_l1_n329(x)
+ if (x < 1)
+ fun_l2_n35(x)
+ else
+ fun_l2_n696(x)
+ end
+end
+
+def fun_l1_n330(x)
+ if (x < 1)
+ fun_l2_n483(x)
+ else
+ fun_l2_n218(x)
+ end
+end
+
+def fun_l1_n331(x)
+ if (x < 1)
+ fun_l2_n3(x)
+ else
+ fun_l2_n324(x)
+ end
+end
+
+def fun_l1_n332(x)
+ if (x < 1)
+ fun_l2_n396(x)
+ else
+ fun_l2_n718(x)
+ end
+end
+
+def fun_l1_n333(x)
+ if (x < 1)
+ fun_l2_n973(x)
+ else
+ fun_l2_n663(x)
+ end
+end
+
+def fun_l1_n334(x)
+ if (x < 1)
+ fun_l2_n441(x)
+ else
+ fun_l2_n468(x)
+ end
+end
+
+def fun_l1_n335(x)
+ if (x < 1)
+ fun_l2_n511(x)
+ else
+ fun_l2_n455(x)
+ end
+end
+
+def fun_l1_n336(x)
+ if (x < 1)
+ fun_l2_n732(x)
+ else
+ fun_l2_n14(x)
+ end
+end
+
+def fun_l1_n337(x)
+ if (x < 1)
+ fun_l2_n484(x)
+ else
+ fun_l2_n482(x)
+ end
+end
+
+def fun_l1_n338(x)
+ if (x < 1)
+ fun_l2_n604(x)
+ else
+ fun_l2_n683(x)
+ end
+end
+
+def fun_l1_n339(x)
+ if (x < 1)
+ fun_l2_n334(x)
+ else
+ fun_l2_n710(x)
+ end
+end
+
+def fun_l1_n340(x)
+ if (x < 1)
+ fun_l2_n233(x)
+ else
+ fun_l2_n394(x)
+ end
+end
+
+def fun_l1_n341(x)
+ if (x < 1)
+ fun_l2_n948(x)
+ else
+ fun_l2_n473(x)
+ end
+end
+
+def fun_l1_n342(x)
+ if (x < 1)
+ fun_l2_n858(x)
+ else
+ fun_l2_n466(x)
+ end
+end
+
+def fun_l1_n343(x)
+ if (x < 1)
+ fun_l2_n647(x)
+ else
+ fun_l2_n604(x)
+ end
+end
+
+def fun_l1_n344(x)
+ if (x < 1)
+ fun_l2_n872(x)
+ else
+ fun_l2_n965(x)
+ end
+end
+
+def fun_l1_n345(x)
+ if (x < 1)
+ fun_l2_n845(x)
+ else
+ fun_l2_n701(x)
+ end
+end
+
+def fun_l1_n346(x)
+ if (x < 1)
+ fun_l2_n75(x)
+ else
+ fun_l2_n332(x)
+ end
+end
+
+def fun_l1_n347(x)
+ if (x < 1)
+ fun_l2_n873(x)
+ else
+ fun_l2_n575(x)
+ end
+end
+
+def fun_l1_n348(x)
+ if (x < 1)
+ fun_l2_n303(x)
+ else
+ fun_l2_n445(x)
+ end
+end
+
+def fun_l1_n349(x)
+ if (x < 1)
+ fun_l2_n45(x)
+ else
+ fun_l2_n312(x)
+ end
+end
+
+def fun_l1_n350(x)
+ if (x < 1)
+ fun_l2_n751(x)
+ else
+ fun_l2_n316(x)
+ end
+end
+
+def fun_l1_n351(x)
+ if (x < 1)
+ fun_l2_n781(x)
+ else
+ fun_l2_n165(x)
+ end
+end
+
+def fun_l1_n352(x)
+ if (x < 1)
+ fun_l2_n120(x)
+ else
+ fun_l2_n595(x)
+ end
+end
+
+def fun_l1_n353(x)
+ if (x < 1)
+ fun_l2_n221(x)
+ else
+ fun_l2_n827(x)
+ end
+end
+
+def fun_l1_n354(x)
+ if (x < 1)
+ fun_l2_n290(x)
+ else
+ fun_l2_n27(x)
+ end
+end
+
+def fun_l1_n355(x)
+ if (x < 1)
+ fun_l2_n377(x)
+ else
+ fun_l2_n28(x)
+ end
+end
+
+def fun_l1_n356(x)
+ if (x < 1)
+ fun_l2_n474(x)
+ else
+ fun_l2_n811(x)
+ end
+end
+
+def fun_l1_n357(x)
+ if (x < 1)
+ fun_l2_n90(x)
+ else
+ fun_l2_n559(x)
+ end
+end
+
+def fun_l1_n358(x)
+ if (x < 1)
+ fun_l2_n66(x)
+ else
+ fun_l2_n234(x)
+ end
+end
+
+def fun_l1_n359(x)
+ if (x < 1)
+ fun_l2_n526(x)
+ else
+ fun_l2_n674(x)
+ end
+end
+
+def fun_l1_n360(x)
+ if (x < 1)
+ fun_l2_n449(x)
+ else
+ fun_l2_n364(x)
+ end
+end
+
+def fun_l1_n361(x)
+ if (x < 1)
+ fun_l2_n790(x)
+ else
+ fun_l2_n835(x)
+ end
+end
+
+def fun_l1_n362(x)
+ if (x < 1)
+ fun_l2_n335(x)
+ else
+ fun_l2_n22(x)
+ end
+end
+
+def fun_l1_n363(x)
+ if (x < 1)
+ fun_l2_n982(x)
+ else
+ fun_l2_n449(x)
+ end
+end
+
+def fun_l1_n364(x)
+ if (x < 1)
+ fun_l2_n980(x)
+ else
+ fun_l2_n861(x)
+ end
+end
+
+def fun_l1_n365(x)
+ if (x < 1)
+ fun_l2_n673(x)
+ else
+ fun_l2_n267(x)
+ end
+end
+
+def fun_l1_n366(x)
+ if (x < 1)
+ fun_l2_n862(x)
+ else
+ fun_l2_n559(x)
+ end
+end
+
+def fun_l1_n367(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n275(x)
+ end
+end
+
+def fun_l1_n368(x)
+ if (x < 1)
+ fun_l2_n370(x)
+ else
+ fun_l2_n763(x)
+ end
+end
+
+def fun_l1_n369(x)
+ if (x < 1)
+ fun_l2_n680(x)
+ else
+ fun_l2_n476(x)
+ end
+end
+
+def fun_l1_n370(x)
+ if (x < 1)
+ fun_l2_n799(x)
+ else
+ fun_l2_n724(x)
+ end
+end
+
+def fun_l1_n371(x)
+ if (x < 1)
+ fun_l2_n331(x)
+ else
+ fun_l2_n927(x)
+ end
+end
+
+def fun_l1_n372(x)
+ if (x < 1)
+ fun_l2_n875(x)
+ else
+ fun_l2_n350(x)
+ end
+end
+
+def fun_l1_n373(x)
+ if (x < 1)
+ fun_l2_n734(x)
+ else
+ fun_l2_n172(x)
+ end
+end
+
+def fun_l1_n374(x)
+ if (x < 1)
+ fun_l2_n657(x)
+ else
+ fun_l2_n765(x)
+ end
+end
+
+def fun_l1_n375(x)
+ if (x < 1)
+ fun_l2_n950(x)
+ else
+ fun_l2_n85(x)
+ end
+end
+
+def fun_l1_n376(x)
+ if (x < 1)
+ fun_l2_n276(x)
+ else
+ fun_l2_n892(x)
+ end
+end
+
+def fun_l1_n377(x)
+ if (x < 1)
+ fun_l2_n430(x)
+ else
+ fun_l2_n173(x)
+ end
+end
+
+def fun_l1_n378(x)
+ if (x < 1)
+ fun_l2_n376(x)
+ else
+ fun_l2_n876(x)
+ end
+end
+
+def fun_l1_n379(x)
+ if (x < 1)
+ fun_l2_n981(x)
+ else
+ fun_l2_n314(x)
+ end
+end
+
+def fun_l1_n380(x)
+ if (x < 1)
+ fun_l2_n680(x)
+ else
+ fun_l2_n600(x)
+ end
+end
+
+def fun_l1_n381(x)
+ if (x < 1)
+ fun_l2_n54(x)
+ else
+ fun_l2_n158(x)
+ end
+end
+
+def fun_l1_n382(x)
+ if (x < 1)
+ fun_l2_n692(x)
+ else
+ fun_l2_n673(x)
+ end
+end
+
+def fun_l1_n383(x)
+ if (x < 1)
+ fun_l2_n393(x)
+ else
+ fun_l2_n723(x)
+ end
+end
+
+def fun_l1_n384(x)
+ if (x < 1)
+ fun_l2_n899(x)
+ else
+ fun_l2_n940(x)
+ end
+end
+
+def fun_l1_n385(x)
+ if (x < 1)
+ fun_l2_n473(x)
+ else
+ fun_l2_n846(x)
+ end
+end
+
+def fun_l1_n386(x)
+ if (x < 1)
+ fun_l2_n291(x)
+ else
+ fun_l2_n864(x)
+ end
+end
+
+def fun_l1_n387(x)
+ if (x < 1)
+ fun_l2_n174(x)
+ else
+ fun_l2_n466(x)
+ end
+end
+
+def fun_l1_n388(x)
+ if (x < 1)
+ fun_l2_n883(x)
+ else
+ fun_l2_n613(x)
+ end
+end
+
+def fun_l1_n389(x)
+ if (x < 1)
+ fun_l2_n808(x)
+ else
+ fun_l2_n169(x)
+ end
+end
+
+def fun_l1_n390(x)
+ if (x < 1)
+ fun_l2_n94(x)
+ else
+ fun_l2_n93(x)
+ end
+end
+
+def fun_l1_n391(x)
+ if (x < 1)
+ fun_l2_n874(x)
+ else
+ fun_l2_n400(x)
+ end
+end
+
+def fun_l1_n392(x)
+ if (x < 1)
+ fun_l2_n473(x)
+ else
+ fun_l2_n239(x)
+ end
+end
+
+def fun_l1_n393(x)
+ if (x < 1)
+ fun_l2_n64(x)
+ else
+ fun_l2_n760(x)
+ end
+end
+
+def fun_l1_n394(x)
+ if (x < 1)
+ fun_l2_n947(x)
+ else
+ fun_l2_n354(x)
+ end
+end
+
+def fun_l1_n395(x)
+ if (x < 1)
+ fun_l2_n833(x)
+ else
+ fun_l2_n563(x)
+ end
+end
+
+def fun_l1_n396(x)
+ if (x < 1)
+ fun_l2_n429(x)
+ else
+ fun_l2_n280(x)
+ end
+end
+
+def fun_l1_n397(x)
+ if (x < 1)
+ fun_l2_n132(x)
+ else
+ fun_l2_n486(x)
+ end
+end
+
+def fun_l1_n398(x)
+ if (x < 1)
+ fun_l2_n28(x)
+ else
+ fun_l2_n135(x)
+ end
+end
+
+def fun_l1_n399(x)
+ if (x < 1)
+ fun_l2_n804(x)
+ else
+ fun_l2_n406(x)
+ end
+end
+
+def fun_l1_n400(x)
+ if (x < 1)
+ fun_l2_n661(x)
+ else
+ fun_l2_n216(x)
+ end
+end
+
+def fun_l1_n401(x)
+ if (x < 1)
+ fun_l2_n681(x)
+ else
+ fun_l2_n849(x)
+ end
+end
+
+def fun_l1_n402(x)
+ if (x < 1)
+ fun_l2_n13(x)
+ else
+ fun_l2_n205(x)
+ end
+end
+
+def fun_l1_n403(x)
+ if (x < 1)
+ fun_l2_n911(x)
+ else
+ fun_l2_n63(x)
+ end
+end
+
+def fun_l1_n404(x)
+ if (x < 1)
+ fun_l2_n518(x)
+ else
+ fun_l2_n845(x)
+ end
+end
+
+def fun_l1_n405(x)
+ if (x < 1)
+ fun_l2_n699(x)
+ else
+ fun_l2_n963(x)
+ end
+end
+
+def fun_l1_n406(x)
+ if (x < 1)
+ fun_l2_n373(x)
+ else
+ fun_l2_n485(x)
+ end
+end
+
+def fun_l1_n407(x)
+ if (x < 1)
+ fun_l2_n402(x)
+ else
+ fun_l2_n582(x)
+ end
+end
+
+def fun_l1_n408(x)
+ if (x < 1)
+ fun_l2_n802(x)
+ else
+ fun_l2_n420(x)
+ end
+end
+
+def fun_l1_n409(x)
+ if (x < 1)
+ fun_l2_n728(x)
+ else
+ fun_l2_n50(x)
+ end
+end
+
+def fun_l1_n410(x)
+ if (x < 1)
+ fun_l2_n189(x)
+ else
+ fun_l2_n588(x)
+ end
+end
+
+def fun_l1_n411(x)
+ if (x < 1)
+ fun_l2_n51(x)
+ else
+ fun_l2_n23(x)
+ end
+end
+
+def fun_l1_n412(x)
+ if (x < 1)
+ fun_l2_n548(x)
+ else
+ fun_l2_n200(x)
+ end
+end
+
+def fun_l1_n413(x)
+ if (x < 1)
+ fun_l2_n763(x)
+ else
+ fun_l2_n581(x)
+ end
+end
+
+def fun_l1_n414(x)
+ if (x < 1)
+ fun_l2_n650(x)
+ else
+ fun_l2_n535(x)
+ end
+end
+
+def fun_l1_n415(x)
+ if (x < 1)
+ fun_l2_n500(x)
+ else
+ fun_l2_n579(x)
+ end
+end
+
+def fun_l1_n416(x)
+ if (x < 1)
+ fun_l2_n573(x)
+ else
+ fun_l2_n154(x)
+ end
+end
+
+def fun_l1_n417(x)
+ if (x < 1)
+ fun_l2_n685(x)
+ else
+ fun_l2_n14(x)
+ end
+end
+
+def fun_l1_n418(x)
+ if (x < 1)
+ fun_l2_n849(x)
+ else
+ fun_l2_n91(x)
+ end
+end
+
+def fun_l1_n419(x)
+ if (x < 1)
+ fun_l2_n629(x)
+ else
+ fun_l2_n698(x)
+ end
+end
+
+def fun_l1_n420(x)
+ if (x < 1)
+ fun_l2_n273(x)
+ else
+ fun_l2_n303(x)
+ end
+end
+
+def fun_l1_n421(x)
+ if (x < 1)
+ fun_l2_n8(x)
+ else
+ fun_l2_n476(x)
+ end
+end
+
+def fun_l1_n422(x)
+ if (x < 1)
+ fun_l2_n294(x)
+ else
+ fun_l2_n338(x)
+ end
+end
+
+def fun_l1_n423(x)
+ if (x < 1)
+ fun_l2_n408(x)
+ else
+ fun_l2_n187(x)
+ end
+end
+
+def fun_l1_n424(x)
+ if (x < 1)
+ fun_l2_n349(x)
+ else
+ fun_l2_n896(x)
+ end
+end
+
+def fun_l1_n425(x)
+ if (x < 1)
+ fun_l2_n950(x)
+ else
+ fun_l2_n186(x)
+ end
+end
+
+def fun_l1_n426(x)
+ if (x < 1)
+ fun_l2_n817(x)
+ else
+ fun_l2_n605(x)
+ end
+end
+
+def fun_l1_n427(x)
+ if (x < 1)
+ fun_l2_n317(x)
+ else
+ fun_l2_n31(x)
+ end
+end
+
+def fun_l1_n428(x)
+ if (x < 1)
+ fun_l2_n804(x)
+ else
+ fun_l2_n547(x)
+ end
+end
+
+def fun_l1_n429(x)
+ if (x < 1)
+ fun_l2_n730(x)
+ else
+ fun_l2_n711(x)
+ end
+end
+
+def fun_l1_n430(x)
+ if (x < 1)
+ fun_l2_n822(x)
+ else
+ fun_l2_n749(x)
+ end
+end
+
+def fun_l1_n431(x)
+ if (x < 1)
+ fun_l2_n412(x)
+ else
+ fun_l2_n366(x)
+ end
+end
+
+def fun_l1_n432(x)
+ if (x < 1)
+ fun_l2_n462(x)
+ else
+ fun_l2_n601(x)
+ end
+end
+
+def fun_l1_n433(x)
+ if (x < 1)
+ fun_l2_n971(x)
+ else
+ fun_l2_n878(x)
+ end
+end
+
+def fun_l1_n434(x)
+ if (x < 1)
+ fun_l2_n551(x)
+ else
+ fun_l2_n172(x)
+ end
+end
+
+def fun_l1_n435(x)
+ if (x < 1)
+ fun_l2_n914(x)
+ else
+ fun_l2_n640(x)
+ end
+end
+
+def fun_l1_n436(x)
+ if (x < 1)
+ fun_l2_n957(x)
+ else
+ fun_l2_n846(x)
+ end
+end
+
+def fun_l1_n437(x)
+ if (x < 1)
+ fun_l2_n622(x)
+ else
+ fun_l2_n995(x)
+ end
+end
+
+def fun_l1_n438(x)
+ if (x < 1)
+ fun_l2_n830(x)
+ else
+ fun_l2_n537(x)
+ end
+end
+
+def fun_l1_n439(x)
+ if (x < 1)
+ fun_l2_n415(x)
+ else
+ fun_l2_n863(x)
+ end
+end
+
+def fun_l1_n440(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n354(x)
+ end
+end
+
+def fun_l1_n441(x)
+ if (x < 1)
+ fun_l2_n525(x)
+ else
+ fun_l2_n656(x)
+ end
+end
+
+def fun_l1_n442(x)
+ if (x < 1)
+ fun_l2_n284(x)
+ else
+ fun_l2_n722(x)
+ end
+end
+
+def fun_l1_n443(x)
+ if (x < 1)
+ fun_l2_n485(x)
+ else
+ fun_l2_n794(x)
+ end
+end
+
+def fun_l1_n444(x)
+ if (x < 1)
+ fun_l2_n268(x)
+ else
+ fun_l2_n443(x)
+ end
+end
+
+def fun_l1_n445(x)
+ if (x < 1)
+ fun_l2_n743(x)
+ else
+ fun_l2_n723(x)
+ end
+end
+
+def fun_l1_n446(x)
+ if (x < 1)
+ fun_l2_n651(x)
+ else
+ fun_l2_n544(x)
+ end
+end
+
+def fun_l1_n447(x)
+ if (x < 1)
+ fun_l2_n936(x)
+ else
+ fun_l2_n50(x)
+ end
+end
+
+def fun_l1_n448(x)
+ if (x < 1)
+ fun_l2_n473(x)
+ else
+ fun_l2_n749(x)
+ end
+end
+
+def fun_l1_n449(x)
+ if (x < 1)
+ fun_l2_n218(x)
+ else
+ fun_l2_n266(x)
+ end
+end
+
+def fun_l1_n450(x)
+ if (x < 1)
+ fun_l2_n686(x)
+ else
+ fun_l2_n629(x)
+ end
+end
+
+def fun_l1_n451(x)
+ if (x < 1)
+ fun_l2_n648(x)
+ else
+ fun_l2_n322(x)
+ end
+end
+
+def fun_l1_n452(x)
+ if (x < 1)
+ fun_l2_n380(x)
+ else
+ fun_l2_n720(x)
+ end
+end
+
+def fun_l1_n453(x)
+ if (x < 1)
+ fun_l2_n53(x)
+ else
+ fun_l2_n830(x)
+ end
+end
+
+def fun_l1_n454(x)
+ if (x < 1)
+ fun_l2_n315(x)
+ else
+ fun_l2_n742(x)
+ end
+end
+
+def fun_l1_n455(x)
+ if (x < 1)
+ fun_l2_n902(x)
+ else
+ fun_l2_n111(x)
+ end
+end
+
+def fun_l1_n456(x)
+ if (x < 1)
+ fun_l2_n924(x)
+ else
+ fun_l2_n109(x)
+ end
+end
+
+def fun_l1_n457(x)
+ if (x < 1)
+ fun_l2_n249(x)
+ else
+ fun_l2_n865(x)
+ end
+end
+
+def fun_l1_n458(x)
+ if (x < 1)
+ fun_l2_n650(x)
+ else
+ fun_l2_n960(x)
+ end
+end
+
+def fun_l1_n459(x)
+ if (x < 1)
+ fun_l2_n273(x)
+ else
+ fun_l2_n544(x)
+ end
+end
+
+def fun_l1_n460(x)
+ if (x < 1)
+ fun_l2_n120(x)
+ else
+ fun_l2_n322(x)
+ end
+end
+
+def fun_l1_n461(x)
+ if (x < 1)
+ fun_l2_n366(x)
+ else
+ fun_l2_n534(x)
+ end
+end
+
+def fun_l1_n462(x)
+ if (x < 1)
+ fun_l2_n380(x)
+ else
+ fun_l2_n25(x)
+ end
+end
+
+def fun_l1_n463(x)
+ if (x < 1)
+ fun_l2_n333(x)
+ else
+ fun_l2_n303(x)
+ end
+end
+
+def fun_l1_n464(x)
+ if (x < 1)
+ fun_l2_n16(x)
+ else
+ fun_l2_n239(x)
+ end
+end
+
+def fun_l1_n465(x)
+ if (x < 1)
+ fun_l2_n539(x)
+ else
+ fun_l2_n988(x)
+ end
+end
+
+def fun_l1_n466(x)
+ if (x < 1)
+ fun_l2_n580(x)
+ else
+ fun_l2_n86(x)
+ end
+end
+
+def fun_l1_n467(x)
+ if (x < 1)
+ fun_l2_n406(x)
+ else
+ fun_l2_n706(x)
+ end
+end
+
+def fun_l1_n468(x)
+ if (x < 1)
+ fun_l2_n858(x)
+ else
+ fun_l2_n393(x)
+ end
+end
+
+def fun_l1_n469(x)
+ if (x < 1)
+ fun_l2_n64(x)
+ else
+ fun_l2_n482(x)
+ end
+end
+
+def fun_l1_n470(x)
+ if (x < 1)
+ fun_l2_n654(x)
+ else
+ fun_l2_n833(x)
+ end
+end
+
+def fun_l1_n471(x)
+ if (x < 1)
+ fun_l2_n161(x)
+ else
+ fun_l2_n91(x)
+ end
+end
+
+def fun_l1_n472(x)
+ if (x < 1)
+ fun_l2_n98(x)
+ else
+ fun_l2_n661(x)
+ end
+end
+
+def fun_l1_n473(x)
+ if (x < 1)
+ fun_l2_n574(x)
+ else
+ fun_l2_n133(x)
+ end
+end
+
+def fun_l1_n474(x)
+ if (x < 1)
+ fun_l2_n109(x)
+ else
+ fun_l2_n702(x)
+ end
+end
+
+def fun_l1_n475(x)
+ if (x < 1)
+ fun_l2_n808(x)
+ else
+ fun_l2_n584(x)
+ end
+end
+
+def fun_l1_n476(x)
+ if (x < 1)
+ fun_l2_n495(x)
+ else
+ fun_l2_n708(x)
+ end
+end
+
+def fun_l1_n477(x)
+ if (x < 1)
+ fun_l2_n649(x)
+ else
+ fun_l2_n290(x)
+ end
+end
+
+def fun_l1_n478(x)
+ if (x < 1)
+ fun_l2_n718(x)
+ else
+ fun_l2_n998(x)
+ end
+end
+
+def fun_l1_n479(x)
+ if (x < 1)
+ fun_l2_n557(x)
+ else
+ fun_l2_n359(x)
+ end
+end
+
+def fun_l1_n480(x)
+ if (x < 1)
+ fun_l2_n958(x)
+ else
+ fun_l2_n86(x)
+ end
+end
+
+def fun_l1_n481(x)
+ if (x < 1)
+ fun_l2_n245(x)
+ else
+ fun_l2_n124(x)
+ end
+end
+
+def fun_l1_n482(x)
+ if (x < 1)
+ fun_l2_n510(x)
+ else
+ fun_l2_n170(x)
+ end
+end
+
+def fun_l1_n483(x)
+ if (x < 1)
+ fun_l2_n550(x)
+ else
+ fun_l2_n9(x)
+ end
+end
+
+def fun_l1_n484(x)
+ if (x < 1)
+ fun_l2_n82(x)
+ else
+ fun_l2_n351(x)
+ end
+end
+
+def fun_l1_n485(x)
+ if (x < 1)
+ fun_l2_n760(x)
+ else
+ fun_l2_n560(x)
+ end
+end
+
+def fun_l1_n486(x)
+ if (x < 1)
+ fun_l2_n550(x)
+ else
+ fun_l2_n881(x)
+ end
+end
+
+def fun_l1_n487(x)
+ if (x < 1)
+ fun_l2_n62(x)
+ else
+ fun_l2_n213(x)
+ end
+end
+
+def fun_l1_n488(x)
+ if (x < 1)
+ fun_l2_n336(x)
+ else
+ fun_l2_n855(x)
+ end
+end
+
+def fun_l1_n489(x)
+ if (x < 1)
+ fun_l2_n172(x)
+ else
+ fun_l2_n479(x)
+ end
+end
+
+def fun_l1_n490(x)
+ if (x < 1)
+ fun_l2_n821(x)
+ else
+ fun_l2_n767(x)
+ end
+end
+
+def fun_l1_n491(x)
+ if (x < 1)
+ fun_l2_n388(x)
+ else
+ fun_l2_n307(x)
+ end
+end
+
+def fun_l1_n492(x)
+ if (x < 1)
+ fun_l2_n158(x)
+ else
+ fun_l2_n725(x)
+ end
+end
+
+def fun_l1_n493(x)
+ if (x < 1)
+ fun_l2_n681(x)
+ else
+ fun_l2_n767(x)
+ end
+end
+
+def fun_l1_n494(x)
+ if (x < 1)
+ fun_l2_n799(x)
+ else
+ fun_l2_n458(x)
+ end
+end
+
+def fun_l1_n495(x)
+ if (x < 1)
+ fun_l2_n379(x)
+ else
+ fun_l2_n152(x)
+ end
+end
+
+def fun_l1_n496(x)
+ if (x < 1)
+ fun_l2_n996(x)
+ else
+ fun_l2_n296(x)
+ end
+end
+
+def fun_l1_n497(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n481(x)
+ end
+end
+
+def fun_l1_n498(x)
+ if (x < 1)
+ fun_l2_n887(x)
+ else
+ fun_l2_n343(x)
+ end
+end
+
+def fun_l1_n499(x)
+ if (x < 1)
+ fun_l2_n481(x)
+ else
+ fun_l2_n368(x)
+ end
+end
+
+def fun_l1_n500(x)
+ if (x < 1)
+ fun_l2_n738(x)
+ else
+ fun_l2_n349(x)
+ end
+end
+
+def fun_l1_n501(x)
+ if (x < 1)
+ fun_l2_n104(x)
+ else
+ fun_l2_n841(x)
+ end
+end
+
+def fun_l1_n502(x)
+ if (x < 1)
+ fun_l2_n549(x)
+ else
+ fun_l2_n684(x)
+ end
+end
+
+def fun_l1_n503(x)
+ if (x < 1)
+ fun_l2_n726(x)
+ else
+ fun_l2_n41(x)
+ end
+end
+
+def fun_l1_n504(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n830(x)
+ end
+end
+
+def fun_l1_n505(x)
+ if (x < 1)
+ fun_l2_n38(x)
+ else
+ fun_l2_n815(x)
+ end
+end
+
+def fun_l1_n506(x)
+ if (x < 1)
+ fun_l2_n284(x)
+ else
+ fun_l2_n599(x)
+ end
+end
+
+def fun_l1_n507(x)
+ if (x < 1)
+ fun_l2_n665(x)
+ else
+ fun_l2_n763(x)
+ end
+end
+
+def fun_l1_n508(x)
+ if (x < 1)
+ fun_l2_n755(x)
+ else
+ fun_l2_n51(x)
+ end
+end
+
+def fun_l1_n509(x)
+ if (x < 1)
+ fun_l2_n860(x)
+ else
+ fun_l2_n273(x)
+ end
+end
+
+def fun_l1_n510(x)
+ if (x < 1)
+ fun_l2_n967(x)
+ else
+ fun_l2_n141(x)
+ end
+end
+
+def fun_l1_n511(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n953(x)
+ end
+end
+
+def fun_l1_n512(x)
+ if (x < 1)
+ fun_l2_n784(x)
+ else
+ fun_l2_n941(x)
+ end
+end
+
+def fun_l1_n513(x)
+ if (x < 1)
+ fun_l2_n499(x)
+ else
+ fun_l2_n189(x)
+ end
+end
+
+def fun_l1_n514(x)
+ if (x < 1)
+ fun_l2_n207(x)
+ else
+ fun_l2_n187(x)
+ end
+end
+
+def fun_l1_n515(x)
+ if (x < 1)
+ fun_l2_n174(x)
+ else
+ fun_l2_n316(x)
+ end
+end
+
+def fun_l1_n516(x)
+ if (x < 1)
+ fun_l2_n884(x)
+ else
+ fun_l2_n72(x)
+ end
+end
+
+def fun_l1_n517(x)
+ if (x < 1)
+ fun_l2_n878(x)
+ else
+ fun_l2_n423(x)
+ end
+end
+
+def fun_l1_n518(x)
+ if (x < 1)
+ fun_l2_n452(x)
+ else
+ fun_l2_n733(x)
+ end
+end
+
+def fun_l1_n519(x)
+ if (x < 1)
+ fun_l2_n586(x)
+ else
+ fun_l2_n987(x)
+ end
+end
+
+def fun_l1_n520(x)
+ if (x < 1)
+ fun_l2_n638(x)
+ else
+ fun_l2_n276(x)
+ end
+end
+
+def fun_l1_n521(x)
+ if (x < 1)
+ fun_l2_n186(x)
+ else
+ fun_l2_n498(x)
+ end
+end
+
+def fun_l1_n522(x)
+ if (x < 1)
+ fun_l2_n816(x)
+ else
+ fun_l2_n687(x)
+ end
+end
+
+def fun_l1_n523(x)
+ if (x < 1)
+ fun_l2_n572(x)
+ else
+ fun_l2_n878(x)
+ end
+end
+
+def fun_l1_n524(x)
+ if (x < 1)
+ fun_l2_n528(x)
+ else
+ fun_l2_n188(x)
+ end
+end
+
+def fun_l1_n525(x)
+ if (x < 1)
+ fun_l2_n719(x)
+ else
+ fun_l2_n146(x)
+ end
+end
+
+def fun_l1_n526(x)
+ if (x < 1)
+ fun_l2_n730(x)
+ else
+ fun_l2_n209(x)
+ end
+end
+
+def fun_l1_n527(x)
+ if (x < 1)
+ fun_l2_n998(x)
+ else
+ fun_l2_n544(x)
+ end
+end
+
+def fun_l1_n528(x)
+ if (x < 1)
+ fun_l2_n288(x)
+ else
+ fun_l2_n682(x)
+ end
+end
+
+def fun_l1_n529(x)
+ if (x < 1)
+ fun_l2_n808(x)
+ else
+ fun_l2_n651(x)
+ end
+end
+
+def fun_l1_n530(x)
+ if (x < 1)
+ fun_l2_n674(x)
+ else
+ fun_l2_n643(x)
+ end
+end
+
+def fun_l1_n531(x)
+ if (x < 1)
+ fun_l2_n42(x)
+ else
+ fun_l2_n457(x)
+ end
+end
+
+def fun_l1_n532(x)
+ if (x < 1)
+ fun_l2_n188(x)
+ else
+ fun_l2_n218(x)
+ end
+end
+
+def fun_l1_n533(x)
+ if (x < 1)
+ fun_l2_n529(x)
+ else
+ fun_l2_n541(x)
+ end
+end
+
+def fun_l1_n534(x)
+ if (x < 1)
+ fun_l2_n820(x)
+ else
+ fun_l2_n426(x)
+ end
+end
+
+def fun_l1_n535(x)
+ if (x < 1)
+ fun_l2_n730(x)
+ else
+ fun_l2_n36(x)
+ end
+end
+
+def fun_l1_n536(x)
+ if (x < 1)
+ fun_l2_n187(x)
+ else
+ fun_l2_n96(x)
+ end
+end
+
+def fun_l1_n537(x)
+ if (x < 1)
+ fun_l2_n1(x)
+ else
+ fun_l2_n905(x)
+ end
+end
+
+def fun_l1_n538(x)
+ if (x < 1)
+ fun_l2_n252(x)
+ else
+ fun_l2_n597(x)
+ end
+end
+
+def fun_l1_n539(x)
+ if (x < 1)
+ fun_l2_n959(x)
+ else
+ fun_l2_n26(x)
+ end
+end
+
+def fun_l1_n540(x)
+ if (x < 1)
+ fun_l2_n959(x)
+ else
+ fun_l2_n266(x)
+ end
+end
+
+def fun_l1_n541(x)
+ if (x < 1)
+ fun_l2_n902(x)
+ else
+ fun_l2_n957(x)
+ end
+end
+
+def fun_l1_n542(x)
+ if (x < 1)
+ fun_l2_n244(x)
+ else
+ fun_l2_n407(x)
+ end
+end
+
+def fun_l1_n543(x)
+ if (x < 1)
+ fun_l2_n319(x)
+ else
+ fun_l2_n19(x)
+ end
+end
+
+def fun_l1_n544(x)
+ if (x < 1)
+ fun_l2_n251(x)
+ else
+ fun_l2_n92(x)
+ end
+end
+
+def fun_l1_n545(x)
+ if (x < 1)
+ fun_l2_n482(x)
+ else
+ fun_l2_n177(x)
+ end
+end
+
+def fun_l1_n546(x)
+ if (x < 1)
+ fun_l2_n338(x)
+ else
+ fun_l2_n152(x)
+ end
+end
+
+def fun_l1_n547(x)
+ if (x < 1)
+ fun_l2_n902(x)
+ else
+ fun_l2_n243(x)
+ end
+end
+
+def fun_l1_n548(x)
+ if (x < 1)
+ fun_l2_n943(x)
+ else
+ fun_l2_n930(x)
+ end
+end
+
+def fun_l1_n549(x)
+ if (x < 1)
+ fun_l2_n775(x)
+ else
+ fun_l2_n338(x)
+ end
+end
+
+def fun_l1_n550(x)
+ if (x < 1)
+ fun_l2_n286(x)
+ else
+ fun_l2_n347(x)
+ end
+end
+
+def fun_l1_n551(x)
+ if (x < 1)
+ fun_l2_n611(x)
+ else
+ fun_l2_n108(x)
+ end
+end
+
+def fun_l1_n552(x)
+ if (x < 1)
+ fun_l2_n515(x)
+ else
+ fun_l2_n478(x)
+ end
+end
+
+def fun_l1_n553(x)
+ if (x < 1)
+ fun_l2_n68(x)
+ else
+ fun_l2_n943(x)
+ end
+end
+
+def fun_l1_n554(x)
+ if (x < 1)
+ fun_l2_n16(x)
+ else
+ fun_l2_n280(x)
+ end
+end
+
+def fun_l1_n555(x)
+ if (x < 1)
+ fun_l2_n421(x)
+ else
+ fun_l2_n412(x)
+ end
+end
+
+def fun_l1_n556(x)
+ if (x < 1)
+ fun_l2_n653(x)
+ else
+ fun_l2_n527(x)
+ end
+end
+
+def fun_l1_n557(x)
+ if (x < 1)
+ fun_l2_n181(x)
+ else
+ fun_l2_n179(x)
+ end
+end
+
+def fun_l1_n558(x)
+ if (x < 1)
+ fun_l2_n270(x)
+ else
+ fun_l2_n367(x)
+ end
+end
+
+def fun_l1_n559(x)
+ if (x < 1)
+ fun_l2_n323(x)
+ else
+ fun_l2_n453(x)
+ end
+end
+
+def fun_l1_n560(x)
+ if (x < 1)
+ fun_l2_n699(x)
+ else
+ fun_l2_n904(x)
+ end
+end
+
+def fun_l1_n561(x)
+ if (x < 1)
+ fun_l2_n903(x)
+ else
+ fun_l2_n559(x)
+ end
+end
+
+def fun_l1_n562(x)
+ if (x < 1)
+ fun_l2_n573(x)
+ else
+ fun_l2_n880(x)
+ end
+end
+
+def fun_l1_n563(x)
+ if (x < 1)
+ fun_l2_n674(x)
+ else
+ fun_l2_n420(x)
+ end
+end
+
+def fun_l1_n564(x)
+ if (x < 1)
+ fun_l2_n76(x)
+ else
+ fun_l2_n702(x)
+ end
+end
+
+def fun_l1_n565(x)
+ if (x < 1)
+ fun_l2_n78(x)
+ else
+ fun_l2_n741(x)
+ end
+end
+
+def fun_l1_n566(x)
+ if (x < 1)
+ fun_l2_n542(x)
+ else
+ fun_l2_n762(x)
+ end
+end
+
+def fun_l1_n567(x)
+ if (x < 1)
+ fun_l2_n992(x)
+ else
+ fun_l2_n416(x)
+ end
+end
+
+def fun_l1_n568(x)
+ if (x < 1)
+ fun_l2_n510(x)
+ else
+ fun_l2_n68(x)
+ end
+end
+
+def fun_l1_n569(x)
+ if (x < 1)
+ fun_l2_n36(x)
+ else
+ fun_l2_n152(x)
+ end
+end
+
+def fun_l1_n570(x)
+ if (x < 1)
+ fun_l2_n243(x)
+ else
+ fun_l2_n421(x)
+ end
+end
+
+def fun_l1_n571(x)
+ if (x < 1)
+ fun_l2_n48(x)
+ else
+ fun_l2_n50(x)
+ end
+end
+
+def fun_l1_n572(x)
+ if (x < 1)
+ fun_l2_n647(x)
+ else
+ fun_l2_n614(x)
+ end
+end
+
+def fun_l1_n573(x)
+ if (x < 1)
+ fun_l2_n847(x)
+ else
+ fun_l2_n598(x)
+ end
+end
+
+def fun_l1_n574(x)
+ if (x < 1)
+ fun_l2_n462(x)
+ else
+ fun_l2_n492(x)
+ end
+end
+
+def fun_l1_n575(x)
+ if (x < 1)
+ fun_l2_n805(x)
+ else
+ fun_l2_n23(x)
+ end
+end
+
+def fun_l1_n576(x)
+ if (x < 1)
+ fun_l2_n660(x)
+ else
+ fun_l2_n271(x)
+ end
+end
+
+def fun_l1_n577(x)
+ if (x < 1)
+ fun_l2_n277(x)
+ else
+ fun_l2_n259(x)
+ end
+end
+
+def fun_l1_n578(x)
+ if (x < 1)
+ fun_l2_n645(x)
+ else
+ fun_l2_n638(x)
+ end
+end
+
+def fun_l1_n579(x)
+ if (x < 1)
+ fun_l2_n925(x)
+ else
+ fun_l2_n801(x)
+ end
+end
+
+def fun_l1_n580(x)
+ if (x < 1)
+ fun_l2_n52(x)
+ else
+ fun_l2_n703(x)
+ end
+end
+
+def fun_l1_n581(x)
+ if (x < 1)
+ fun_l2_n126(x)
+ else
+ fun_l2_n511(x)
+ end
+end
+
+def fun_l1_n582(x)
+ if (x < 1)
+ fun_l2_n663(x)
+ else
+ fun_l2_n158(x)
+ end
+end
+
+def fun_l1_n583(x)
+ if (x < 1)
+ fun_l2_n604(x)
+ else
+ fun_l2_n498(x)
+ end
+end
+
+def fun_l1_n584(x)
+ if (x < 1)
+ fun_l2_n889(x)
+ else
+ fun_l2_n197(x)
+ end
+end
+
+def fun_l1_n585(x)
+ if (x < 1)
+ fun_l2_n28(x)
+ else
+ fun_l2_n298(x)
+ end
+end
+
+def fun_l1_n586(x)
+ if (x < 1)
+ fun_l2_n165(x)
+ else
+ fun_l2_n340(x)
+ end
+end
+
+def fun_l1_n587(x)
+ if (x < 1)
+ fun_l2_n89(x)
+ else
+ fun_l2_n947(x)
+ end
+end
+
+def fun_l1_n588(x)
+ if (x < 1)
+ fun_l2_n151(x)
+ else
+ fun_l2_n163(x)
+ end
+end
+
+def fun_l1_n589(x)
+ if (x < 1)
+ fun_l2_n200(x)
+ else
+ fun_l2_n855(x)
+ end
+end
+
+def fun_l1_n590(x)
+ if (x < 1)
+ fun_l2_n749(x)
+ else
+ fun_l2_n232(x)
+ end
+end
+
+def fun_l1_n591(x)
+ if (x < 1)
+ fun_l2_n850(x)
+ else
+ fun_l2_n897(x)
+ end
+end
+
+def fun_l1_n592(x)
+ if (x < 1)
+ fun_l2_n287(x)
+ else
+ fun_l2_n266(x)
+ end
+end
+
+def fun_l1_n593(x)
+ if (x < 1)
+ fun_l2_n547(x)
+ else
+ fun_l2_n937(x)
+ end
+end
+
+def fun_l1_n594(x)
+ if (x < 1)
+ fun_l2_n517(x)
+ else
+ fun_l2_n602(x)
+ end
+end
+
+def fun_l1_n595(x)
+ if (x < 1)
+ fun_l2_n962(x)
+ else
+ fun_l2_n387(x)
+ end
+end
+
+def fun_l1_n596(x)
+ if (x < 1)
+ fun_l2_n959(x)
+ else
+ fun_l2_n885(x)
+ end
+end
+
+def fun_l1_n597(x)
+ if (x < 1)
+ fun_l2_n343(x)
+ else
+ fun_l2_n704(x)
+ end
+end
+
+def fun_l1_n598(x)
+ if (x < 1)
+ fun_l2_n256(x)
+ else
+ fun_l2_n213(x)
+ end
+end
+
+def fun_l1_n599(x)
+ if (x < 1)
+ fun_l2_n653(x)
+ else
+ fun_l2_n630(x)
+ end
+end
+
+def fun_l1_n600(x)
+ if (x < 1)
+ fun_l2_n587(x)
+ else
+ fun_l2_n899(x)
+ end
+end
+
+def fun_l1_n601(x)
+ if (x < 1)
+ fun_l2_n798(x)
+ else
+ fun_l2_n318(x)
+ end
+end
+
+def fun_l1_n602(x)
+ if (x < 1)
+ fun_l2_n286(x)
+ else
+ fun_l2_n586(x)
+ end
+end
+
+def fun_l1_n603(x)
+ if (x < 1)
+ fun_l2_n931(x)
+ else
+ fun_l2_n370(x)
+ end
+end
+
+def fun_l1_n604(x)
+ if (x < 1)
+ fun_l2_n311(x)
+ else
+ fun_l2_n476(x)
+ end
+end
+
+def fun_l1_n605(x)
+ if (x < 1)
+ fun_l2_n998(x)
+ else
+ fun_l2_n953(x)
+ end
+end
+
+def fun_l1_n606(x)
+ if (x < 1)
+ fun_l2_n782(x)
+ else
+ fun_l2_n225(x)
+ end
+end
+
+def fun_l1_n607(x)
+ if (x < 1)
+ fun_l2_n696(x)
+ else
+ fun_l2_n797(x)
+ end
+end
+
+def fun_l1_n608(x)
+ if (x < 1)
+ fun_l2_n344(x)
+ else
+ fun_l2_n247(x)
+ end
+end
+
+def fun_l1_n609(x)
+ if (x < 1)
+ fun_l2_n627(x)
+ else
+ fun_l2_n410(x)
+ end
+end
+
+def fun_l1_n610(x)
+ if (x < 1)
+ fun_l2_n431(x)
+ else
+ fun_l2_n56(x)
+ end
+end
+
+def fun_l1_n611(x)
+ if (x < 1)
+ fun_l2_n307(x)
+ else
+ fun_l2_n857(x)
+ end
+end
+
+def fun_l1_n612(x)
+ if (x < 1)
+ fun_l2_n411(x)
+ else
+ fun_l2_n59(x)
+ end
+end
+
+def fun_l1_n613(x)
+ if (x < 1)
+ fun_l2_n38(x)
+ else
+ fun_l2_n880(x)
+ end
+end
+
+def fun_l1_n614(x)
+ if (x < 1)
+ fun_l2_n945(x)
+ else
+ fun_l2_n723(x)
+ end
+end
+
+def fun_l1_n615(x)
+ if (x < 1)
+ fun_l2_n248(x)
+ else
+ fun_l2_n56(x)
+ end
+end
+
+def fun_l1_n616(x)
+ if (x < 1)
+ fun_l2_n453(x)
+ else
+ fun_l2_n4(x)
+ end
+end
+
+def fun_l1_n617(x)
+ if (x < 1)
+ fun_l2_n599(x)
+ else
+ fun_l2_n966(x)
+ end
+end
+
+def fun_l1_n618(x)
+ if (x < 1)
+ fun_l2_n896(x)
+ else
+ fun_l2_n666(x)
+ end
+end
+
+def fun_l1_n619(x)
+ if (x < 1)
+ fun_l2_n715(x)
+ else
+ fun_l2_n918(x)
+ end
+end
+
+def fun_l1_n620(x)
+ if (x < 1)
+ fun_l2_n663(x)
+ else
+ fun_l2_n144(x)
+ end
+end
+
+def fun_l1_n621(x)
+ if (x < 1)
+ fun_l2_n17(x)
+ else
+ fun_l2_n411(x)
+ end
+end
+
+def fun_l1_n622(x)
+ if (x < 1)
+ fun_l2_n851(x)
+ else
+ fun_l2_n858(x)
+ end
+end
+
+def fun_l1_n623(x)
+ if (x < 1)
+ fun_l2_n552(x)
+ else
+ fun_l2_n503(x)
+ end
+end
+
+def fun_l1_n624(x)
+ if (x < 1)
+ fun_l2_n822(x)
+ else
+ fun_l2_n239(x)
+ end
+end
+
+def fun_l1_n625(x)
+ if (x < 1)
+ fun_l2_n917(x)
+ else
+ fun_l2_n120(x)
+ end
+end
+
+def fun_l1_n626(x)
+ if (x < 1)
+ fun_l2_n640(x)
+ else
+ fun_l2_n603(x)
+ end
+end
+
+def fun_l1_n627(x)
+ if (x < 1)
+ fun_l2_n244(x)
+ else
+ fun_l2_n114(x)
+ end
+end
+
+def fun_l1_n628(x)
+ if (x < 1)
+ fun_l2_n374(x)
+ else
+ fun_l2_n295(x)
+ end
+end
+
+def fun_l1_n629(x)
+ if (x < 1)
+ fun_l2_n761(x)
+ else
+ fun_l2_n920(x)
+ end
+end
+
+def fun_l1_n630(x)
+ if (x < 1)
+ fun_l2_n314(x)
+ else
+ fun_l2_n571(x)
+ end
+end
+
+def fun_l1_n631(x)
+ if (x < 1)
+ fun_l2_n830(x)
+ else
+ fun_l2_n838(x)
+ end
+end
+
+def fun_l1_n632(x)
+ if (x < 1)
+ fun_l2_n523(x)
+ else
+ fun_l2_n453(x)
+ end
+end
+
+def fun_l1_n633(x)
+ if (x < 1)
+ fun_l2_n245(x)
+ else
+ fun_l2_n173(x)
+ end
+end
+
+def fun_l1_n634(x)
+ if (x < 1)
+ fun_l2_n939(x)
+ else
+ fun_l2_n774(x)
+ end
+end
+
+def fun_l1_n635(x)
+ if (x < 1)
+ fun_l2_n17(x)
+ else
+ fun_l2_n166(x)
+ end
+end
+
+def fun_l1_n636(x)
+ if (x < 1)
+ fun_l2_n443(x)
+ else
+ fun_l2_n297(x)
+ end
+end
+
+def fun_l1_n637(x)
+ if (x < 1)
+ fun_l2_n280(x)
+ else
+ fun_l2_n776(x)
+ end
+end
+
+def fun_l1_n638(x)
+ if (x < 1)
+ fun_l2_n761(x)
+ else
+ fun_l2_n866(x)
+ end
+end
+
+def fun_l1_n639(x)
+ if (x < 1)
+ fun_l2_n677(x)
+ else
+ fun_l2_n855(x)
+ end
+end
+
+def fun_l1_n640(x)
+ if (x < 1)
+ fun_l2_n252(x)
+ else
+ fun_l2_n766(x)
+ end
+end
+
+def fun_l1_n641(x)
+ if (x < 1)
+ fun_l2_n3(x)
+ else
+ fun_l2_n115(x)
+ end
+end
+
+def fun_l1_n642(x)
+ if (x < 1)
+ fun_l2_n495(x)
+ else
+ fun_l2_n340(x)
+ end
+end
+
+def fun_l1_n643(x)
+ if (x < 1)
+ fun_l2_n991(x)
+ else
+ fun_l2_n119(x)
+ end
+end
+
+def fun_l1_n644(x)
+ if (x < 1)
+ fun_l2_n379(x)
+ else
+ fun_l2_n519(x)
+ end
+end
+
+def fun_l1_n645(x)
+ if (x < 1)
+ fun_l2_n191(x)
+ else
+ fun_l2_n872(x)
+ end
+end
+
+def fun_l1_n646(x)
+ if (x < 1)
+ fun_l2_n979(x)
+ else
+ fun_l2_n980(x)
+ end
+end
+
+def fun_l1_n647(x)
+ if (x < 1)
+ fun_l2_n918(x)
+ else
+ fun_l2_n455(x)
+ end
+end
+
+def fun_l1_n648(x)
+ if (x < 1)
+ fun_l2_n966(x)
+ else
+ fun_l2_n529(x)
+ end
+end
+
+def fun_l1_n649(x)
+ if (x < 1)
+ fun_l2_n838(x)
+ else
+ fun_l2_n529(x)
+ end
+end
+
+def fun_l1_n650(x)
+ if (x < 1)
+ fun_l2_n542(x)
+ else
+ fun_l2_n42(x)
+ end
+end
+
+def fun_l1_n651(x)
+ if (x < 1)
+ fun_l2_n65(x)
+ else
+ fun_l2_n460(x)
+ end
+end
+
+def fun_l1_n652(x)
+ if (x < 1)
+ fun_l2_n479(x)
+ else
+ fun_l2_n251(x)
+ end
+end
+
+def fun_l1_n653(x)
+ if (x < 1)
+ fun_l2_n243(x)
+ else
+ fun_l2_n77(x)
+ end
+end
+
+def fun_l1_n654(x)
+ if (x < 1)
+ fun_l2_n392(x)
+ else
+ fun_l2_n940(x)
+ end
+end
+
+def fun_l1_n655(x)
+ if (x < 1)
+ fun_l2_n875(x)
+ else
+ fun_l2_n157(x)
+ end
+end
+
+def fun_l1_n656(x)
+ if (x < 1)
+ fun_l2_n279(x)
+ else
+ fun_l2_n237(x)
+ end
+end
+
+def fun_l1_n657(x)
+ if (x < 1)
+ fun_l2_n522(x)
+ else
+ fun_l2_n174(x)
+ end
+end
+
+def fun_l1_n658(x)
+ if (x < 1)
+ fun_l2_n669(x)
+ else
+ fun_l2_n399(x)
+ end
+end
+
+def fun_l1_n659(x)
+ if (x < 1)
+ fun_l2_n251(x)
+ else
+ fun_l2_n56(x)
+ end
+end
+
+def fun_l1_n660(x)
+ if (x < 1)
+ fun_l2_n563(x)
+ else
+ fun_l2_n731(x)
+ end
+end
+
+def fun_l1_n661(x)
+ if (x < 1)
+ fun_l2_n684(x)
+ else
+ fun_l2_n292(x)
+ end
+end
+
+def fun_l1_n662(x)
+ if (x < 1)
+ fun_l2_n952(x)
+ else
+ fun_l2_n1(x)
+ end
+end
+
+def fun_l1_n663(x)
+ if (x < 1)
+ fun_l2_n89(x)
+ else
+ fun_l2_n562(x)
+ end
+end
+
+def fun_l1_n664(x)
+ if (x < 1)
+ fun_l2_n480(x)
+ else
+ fun_l2_n488(x)
+ end
+end
+
+def fun_l1_n665(x)
+ if (x < 1)
+ fun_l2_n398(x)
+ else
+ fun_l2_n493(x)
+ end
+end
+
+def fun_l1_n666(x)
+ if (x < 1)
+ fun_l2_n778(x)
+ else
+ fun_l2_n702(x)
+ end
+end
+
+def fun_l1_n667(x)
+ if (x < 1)
+ fun_l2_n332(x)
+ else
+ fun_l2_n441(x)
+ end
+end
+
+def fun_l1_n668(x)
+ if (x < 1)
+ fun_l2_n866(x)
+ else
+ fun_l2_n442(x)
+ end
+end
+
+def fun_l1_n669(x)
+ if (x < 1)
+ fun_l2_n533(x)
+ else
+ fun_l2_n970(x)
+ end
+end
+
+def fun_l1_n670(x)
+ if (x < 1)
+ fun_l2_n926(x)
+ else
+ fun_l2_n883(x)
+ end
+end
+
+def fun_l1_n671(x)
+ if (x < 1)
+ fun_l2_n204(x)
+ else
+ fun_l2_n769(x)
+ end
+end
+
+def fun_l1_n672(x)
+ if (x < 1)
+ fun_l2_n663(x)
+ else
+ fun_l2_n367(x)
+ end
+end
+
+def fun_l1_n673(x)
+ if (x < 1)
+ fun_l2_n978(x)
+ else
+ fun_l2_n750(x)
+ end
+end
+
+def fun_l1_n674(x)
+ if (x < 1)
+ fun_l2_n296(x)
+ else
+ fun_l2_n608(x)
+ end
+end
+
+def fun_l1_n675(x)
+ if (x < 1)
+ fun_l2_n35(x)
+ else
+ fun_l2_n200(x)
+ end
+end
+
+def fun_l1_n676(x)
+ if (x < 1)
+ fun_l2_n618(x)
+ else
+ fun_l2_n286(x)
+ end
+end
+
+def fun_l1_n677(x)
+ if (x < 1)
+ fun_l2_n98(x)
+ else
+ fun_l2_n264(x)
+ end
+end
+
+def fun_l1_n678(x)
+ if (x < 1)
+ fun_l2_n967(x)
+ else
+ fun_l2_n884(x)
+ end
+end
+
+def fun_l1_n679(x)
+ if (x < 1)
+ fun_l2_n351(x)
+ else
+ fun_l2_n854(x)
+ end
+end
+
+def fun_l1_n680(x)
+ if (x < 1)
+ fun_l2_n397(x)
+ else
+ fun_l2_n56(x)
+ end
+end
+
+def fun_l1_n681(x)
+ if (x < 1)
+ fun_l2_n232(x)
+ else
+ fun_l2_n400(x)
+ end
+end
+
+def fun_l1_n682(x)
+ if (x < 1)
+ fun_l2_n321(x)
+ else
+ fun_l2_n500(x)
+ end
+end
+
+def fun_l1_n683(x)
+ if (x < 1)
+ fun_l2_n315(x)
+ else
+ fun_l2_n509(x)
+ end
+end
+
+def fun_l1_n684(x)
+ if (x < 1)
+ fun_l2_n854(x)
+ else
+ fun_l2_n921(x)
+ end
+end
+
+def fun_l1_n685(x)
+ if (x < 1)
+ fun_l2_n823(x)
+ else
+ fun_l2_n995(x)
+ end
+end
+
+def fun_l1_n686(x)
+ if (x < 1)
+ fun_l2_n42(x)
+ else
+ fun_l2_n92(x)
+ end
+end
+
+def fun_l1_n687(x)
+ if (x < 1)
+ fun_l2_n74(x)
+ else
+ fun_l2_n577(x)
+ end
+end
+
+def fun_l1_n688(x)
+ if (x < 1)
+ fun_l2_n47(x)
+ else
+ fun_l2_n664(x)
+ end
+end
+
+def fun_l1_n689(x)
+ if (x < 1)
+ fun_l2_n709(x)
+ else
+ fun_l2_n92(x)
+ end
+end
+
+def fun_l1_n690(x)
+ if (x < 1)
+ fun_l2_n875(x)
+ else
+ fun_l2_n893(x)
+ end
+end
+
+def fun_l1_n691(x)
+ if (x < 1)
+ fun_l2_n934(x)
+ else
+ fun_l2_n339(x)
+ end
+end
+
+def fun_l1_n692(x)
+ if (x < 1)
+ fun_l2_n194(x)
+ else
+ fun_l2_n915(x)
+ end
+end
+
+def fun_l1_n693(x)
+ if (x < 1)
+ fun_l2_n352(x)
+ else
+ fun_l2_n212(x)
+ end
+end
+
+def fun_l1_n694(x)
+ if (x < 1)
+ fun_l2_n554(x)
+ else
+ fun_l2_n461(x)
+ end
+end
+
+def fun_l1_n695(x)
+ if (x < 1)
+ fun_l2_n372(x)
+ else
+ fun_l2_n652(x)
+ end
+end
+
+def fun_l1_n696(x)
+ if (x < 1)
+ fun_l2_n778(x)
+ else
+ fun_l2_n350(x)
+ end
+end
+
+def fun_l1_n697(x)
+ if (x < 1)
+ fun_l2_n656(x)
+ else
+ fun_l2_n467(x)
+ end
+end
+
+def fun_l1_n698(x)
+ if (x < 1)
+ fun_l2_n799(x)
+ else
+ fun_l2_n983(x)
+ end
+end
+
+def fun_l1_n699(x)
+ if (x < 1)
+ fun_l2_n917(x)
+ else
+ fun_l2_n801(x)
+ end
+end
+
+def fun_l1_n700(x)
+ if (x < 1)
+ fun_l2_n276(x)
+ else
+ fun_l2_n778(x)
+ end
+end
+
+def fun_l1_n701(x)
+ if (x < 1)
+ fun_l2_n562(x)
+ else
+ fun_l2_n558(x)
+ end
+end
+
+def fun_l1_n702(x)
+ if (x < 1)
+ fun_l2_n600(x)
+ else
+ fun_l2_n120(x)
+ end
+end
+
+def fun_l1_n703(x)
+ if (x < 1)
+ fun_l2_n346(x)
+ else
+ fun_l2_n975(x)
+ end
+end
+
+def fun_l1_n704(x)
+ if (x < 1)
+ fun_l2_n139(x)
+ else
+ fun_l2_n241(x)
+ end
+end
+
+def fun_l1_n705(x)
+ if (x < 1)
+ fun_l2_n728(x)
+ else
+ fun_l2_n62(x)
+ end
+end
+
+def fun_l1_n706(x)
+ if (x < 1)
+ fun_l2_n719(x)
+ else
+ fun_l2_n955(x)
+ end
+end
+
+def fun_l1_n707(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n122(x)
+ end
+end
+
+def fun_l1_n708(x)
+ if (x < 1)
+ fun_l2_n456(x)
+ else
+ fun_l2_n128(x)
+ end
+end
+
+def fun_l1_n709(x)
+ if (x < 1)
+ fun_l2_n4(x)
+ else
+ fun_l2_n399(x)
+ end
+end
+
+def fun_l1_n710(x)
+ if (x < 1)
+ fun_l2_n20(x)
+ else
+ fun_l2_n746(x)
+ end
+end
+
+def fun_l1_n711(x)
+ if (x < 1)
+ fun_l2_n978(x)
+ else
+ fun_l2_n886(x)
+ end
+end
+
+def fun_l1_n712(x)
+ if (x < 1)
+ fun_l2_n417(x)
+ else
+ fun_l2_n337(x)
+ end
+end
+
+def fun_l1_n713(x)
+ if (x < 1)
+ fun_l2_n394(x)
+ else
+ fun_l2_n713(x)
+ end
+end
+
+def fun_l1_n714(x)
+ if (x < 1)
+ fun_l2_n433(x)
+ else
+ fun_l2_n985(x)
+ end
+end
+
+def fun_l1_n715(x)
+ if (x < 1)
+ fun_l2_n937(x)
+ else
+ fun_l2_n709(x)
+ end
+end
+
+def fun_l1_n716(x)
+ if (x < 1)
+ fun_l2_n963(x)
+ else
+ fun_l2_n842(x)
+ end
+end
+
+def fun_l1_n717(x)
+ if (x < 1)
+ fun_l2_n671(x)
+ else
+ fun_l2_n954(x)
+ end
+end
+
+def fun_l1_n718(x)
+ if (x < 1)
+ fun_l2_n948(x)
+ else
+ fun_l2_n128(x)
+ end
+end
+
+def fun_l1_n719(x)
+ if (x < 1)
+ fun_l2_n682(x)
+ else
+ fun_l2_n973(x)
+ end
+end
+
+def fun_l1_n720(x)
+ if (x < 1)
+ fun_l2_n336(x)
+ else
+ fun_l2_n643(x)
+ end
+end
+
+def fun_l1_n721(x)
+ if (x < 1)
+ fun_l2_n224(x)
+ else
+ fun_l2_n96(x)
+ end
+end
+
+def fun_l1_n722(x)
+ if (x < 1)
+ fun_l2_n907(x)
+ else
+ fun_l2_n776(x)
+ end
+end
+
+def fun_l1_n723(x)
+ if (x < 1)
+ fun_l2_n93(x)
+ else
+ fun_l2_n410(x)
+ end
+end
+
+def fun_l1_n724(x)
+ if (x < 1)
+ fun_l2_n282(x)
+ else
+ fun_l2_n134(x)
+ end
+end
+
+def fun_l1_n725(x)
+ if (x < 1)
+ fun_l2_n938(x)
+ else
+ fun_l2_n603(x)
+ end
+end
+
+def fun_l1_n726(x)
+ if (x < 1)
+ fun_l2_n574(x)
+ else
+ fun_l2_n976(x)
+ end
+end
+
+def fun_l1_n727(x)
+ if (x < 1)
+ fun_l2_n428(x)
+ else
+ fun_l2_n658(x)
+ end
+end
+
+def fun_l1_n728(x)
+ if (x < 1)
+ fun_l2_n828(x)
+ else
+ fun_l2_n226(x)
+ end
+end
+
+def fun_l1_n729(x)
+ if (x < 1)
+ fun_l2_n663(x)
+ else
+ fun_l2_n292(x)
+ end
+end
+
+def fun_l1_n730(x)
+ if (x < 1)
+ fun_l2_n802(x)
+ else
+ fun_l2_n853(x)
+ end
+end
+
+def fun_l1_n731(x)
+ if (x < 1)
+ fun_l2_n142(x)
+ else
+ fun_l2_n339(x)
+ end
+end
+
+def fun_l1_n732(x)
+ if (x < 1)
+ fun_l2_n211(x)
+ else
+ fun_l2_n35(x)
+ end
+end
+
+def fun_l1_n733(x)
+ if (x < 1)
+ fun_l2_n660(x)
+ else
+ fun_l2_n179(x)
+ end
+end
+
+def fun_l1_n734(x)
+ if (x < 1)
+ fun_l2_n174(x)
+ else
+ fun_l2_n224(x)
+ end
+end
+
+def fun_l1_n735(x)
+ if (x < 1)
+ fun_l2_n490(x)
+ else
+ fun_l2_n564(x)
+ end
+end
+
+def fun_l1_n736(x)
+ if (x < 1)
+ fun_l2_n597(x)
+ else
+ fun_l2_n153(x)
+ end
+end
+
+def fun_l1_n737(x)
+ if (x < 1)
+ fun_l2_n633(x)
+ else
+ fun_l2_n358(x)
+ end
+end
+
+def fun_l1_n738(x)
+ if (x < 1)
+ fun_l2_n0(x)
+ else
+ fun_l2_n858(x)
+ end
+end
+
+def fun_l1_n739(x)
+ if (x < 1)
+ fun_l2_n335(x)
+ else
+ fun_l2_n531(x)
+ end
+end
+
+def fun_l1_n740(x)
+ if (x < 1)
+ fun_l2_n736(x)
+ else
+ fun_l2_n653(x)
+ end
+end
+
+def fun_l1_n741(x)
+ if (x < 1)
+ fun_l2_n280(x)
+ else
+ fun_l2_n684(x)
+ end
+end
+
+def fun_l1_n742(x)
+ if (x < 1)
+ fun_l2_n976(x)
+ else
+ fun_l2_n987(x)
+ end
+end
+
+def fun_l1_n743(x)
+ if (x < 1)
+ fun_l2_n519(x)
+ else
+ fun_l2_n633(x)
+ end
+end
+
+def fun_l1_n744(x)
+ if (x < 1)
+ fun_l2_n314(x)
+ else
+ fun_l2_n579(x)
+ end
+end
+
+def fun_l1_n745(x)
+ if (x < 1)
+ fun_l2_n365(x)
+ else
+ fun_l2_n972(x)
+ end
+end
+
+def fun_l1_n746(x)
+ if (x < 1)
+ fun_l2_n902(x)
+ else
+ fun_l2_n715(x)
+ end
+end
+
+def fun_l1_n747(x)
+ if (x < 1)
+ fun_l2_n363(x)
+ else
+ fun_l2_n407(x)
+ end
+end
+
+def fun_l1_n748(x)
+ if (x < 1)
+ fun_l2_n660(x)
+ else
+ fun_l2_n814(x)
+ end
+end
+
+def fun_l1_n749(x)
+ if (x < 1)
+ fun_l2_n415(x)
+ else
+ fun_l2_n162(x)
+ end
+end
+
+def fun_l1_n750(x)
+ if (x < 1)
+ fun_l2_n157(x)
+ else
+ fun_l2_n406(x)
+ end
+end
+
+def fun_l1_n751(x)
+ if (x < 1)
+ fun_l2_n388(x)
+ else
+ fun_l2_n212(x)
+ end
+end
+
+def fun_l1_n752(x)
+ if (x < 1)
+ fun_l2_n733(x)
+ else
+ fun_l2_n283(x)
+ end
+end
+
+def fun_l1_n753(x)
+ if (x < 1)
+ fun_l2_n960(x)
+ else
+ fun_l2_n20(x)
+ end
+end
+
+def fun_l1_n754(x)
+ if (x < 1)
+ fun_l2_n797(x)
+ else
+ fun_l2_n202(x)
+ end
+end
+
+def fun_l1_n755(x)
+ if (x < 1)
+ fun_l2_n113(x)
+ else
+ fun_l2_n953(x)
+ end
+end
+
+def fun_l1_n756(x)
+ if (x < 1)
+ fun_l2_n84(x)
+ else
+ fun_l2_n390(x)
+ end
+end
+
+def fun_l1_n757(x)
+ if (x < 1)
+ fun_l2_n355(x)
+ else
+ fun_l2_n761(x)
+ end
+end
+
+def fun_l1_n758(x)
+ if (x < 1)
+ fun_l2_n823(x)
+ else
+ fun_l2_n37(x)
+ end
+end
+
+def fun_l1_n759(x)
+ if (x < 1)
+ fun_l2_n428(x)
+ else
+ fun_l2_n130(x)
+ end
+end
+
+def fun_l1_n760(x)
+ if (x < 1)
+ fun_l2_n364(x)
+ else
+ fun_l2_n680(x)
+ end
+end
+
+def fun_l1_n761(x)
+ if (x < 1)
+ fun_l2_n718(x)
+ else
+ fun_l2_n885(x)
+ end
+end
+
+def fun_l1_n762(x)
+ if (x < 1)
+ fun_l2_n795(x)
+ else
+ fun_l2_n342(x)
+ end
+end
+
+def fun_l1_n763(x)
+ if (x < 1)
+ fun_l2_n561(x)
+ else
+ fun_l2_n593(x)
+ end
+end
+
+def fun_l1_n764(x)
+ if (x < 1)
+ fun_l2_n714(x)
+ else
+ fun_l2_n168(x)
+ end
+end
+
+def fun_l1_n765(x)
+ if (x < 1)
+ fun_l2_n377(x)
+ else
+ fun_l2_n109(x)
+ end
+end
+
+def fun_l1_n766(x)
+ if (x < 1)
+ fun_l2_n477(x)
+ else
+ fun_l2_n871(x)
+ end
+end
+
+def fun_l1_n767(x)
+ if (x < 1)
+ fun_l2_n596(x)
+ else
+ fun_l2_n81(x)
+ end
+end
+
+def fun_l1_n768(x)
+ if (x < 1)
+ fun_l2_n609(x)
+ else
+ fun_l2_n454(x)
+ end
+end
+
+def fun_l1_n769(x)
+ if (x < 1)
+ fun_l2_n308(x)
+ else
+ fun_l2_n890(x)
+ end
+end
+
+def fun_l1_n770(x)
+ if (x < 1)
+ fun_l2_n761(x)
+ else
+ fun_l2_n342(x)
+ end
+end
+
+def fun_l1_n771(x)
+ if (x < 1)
+ fun_l2_n44(x)
+ else
+ fun_l2_n1(x)
+ end
+end
+
+def fun_l1_n772(x)
+ if (x < 1)
+ fun_l2_n457(x)
+ else
+ fun_l2_n571(x)
+ end
+end
+
+def fun_l1_n773(x)
+ if (x < 1)
+ fun_l2_n88(x)
+ else
+ fun_l2_n622(x)
+ end
+end
+
+def fun_l1_n774(x)
+ if (x < 1)
+ fun_l2_n459(x)
+ else
+ fun_l2_n446(x)
+ end
+end
+
+def fun_l1_n775(x)
+ if (x < 1)
+ fun_l2_n400(x)
+ else
+ fun_l2_n918(x)
+ end
+end
+
+def fun_l1_n776(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n696(x)
+ end
+end
+
+def fun_l1_n777(x)
+ if (x < 1)
+ fun_l2_n968(x)
+ else
+ fun_l2_n988(x)
+ end
+end
+
+def fun_l1_n778(x)
+ if (x < 1)
+ fun_l2_n242(x)
+ else
+ fun_l2_n496(x)
+ end
+end
+
+def fun_l1_n779(x)
+ if (x < 1)
+ fun_l2_n106(x)
+ else
+ fun_l2_n637(x)
+ end
+end
+
+def fun_l1_n780(x)
+ if (x < 1)
+ fun_l2_n945(x)
+ else
+ fun_l2_n238(x)
+ end
+end
+
+def fun_l1_n781(x)
+ if (x < 1)
+ fun_l2_n269(x)
+ else
+ fun_l2_n582(x)
+ end
+end
+
+def fun_l1_n782(x)
+ if (x < 1)
+ fun_l2_n523(x)
+ else
+ fun_l2_n201(x)
+ end
+end
+
+def fun_l1_n783(x)
+ if (x < 1)
+ fun_l2_n326(x)
+ else
+ fun_l2_n744(x)
+ end
+end
+
+def fun_l1_n784(x)
+ if (x < 1)
+ fun_l2_n49(x)
+ else
+ fun_l2_n943(x)
+ end
+end
+
+def fun_l1_n785(x)
+ if (x < 1)
+ fun_l2_n975(x)
+ else
+ fun_l2_n560(x)
+ end
+end
+
+def fun_l1_n786(x)
+ if (x < 1)
+ fun_l2_n843(x)
+ else
+ fun_l2_n240(x)
+ end
+end
+
+def fun_l1_n787(x)
+ if (x < 1)
+ fun_l2_n179(x)
+ else
+ fun_l2_n423(x)
+ end
+end
+
+def fun_l1_n788(x)
+ if (x < 1)
+ fun_l2_n536(x)
+ else
+ fun_l2_n112(x)
+ end
+end
+
+def fun_l1_n789(x)
+ if (x < 1)
+ fun_l2_n418(x)
+ else
+ fun_l2_n443(x)
+ end
+end
+
+def fun_l1_n790(x)
+ if (x < 1)
+ fun_l2_n770(x)
+ else
+ fun_l2_n127(x)
+ end
+end
+
+def fun_l1_n791(x)
+ if (x < 1)
+ fun_l2_n425(x)
+ else
+ fun_l2_n364(x)
+ end
+end
+
+def fun_l1_n792(x)
+ if (x < 1)
+ fun_l2_n841(x)
+ else
+ fun_l2_n112(x)
+ end
+end
+
+def fun_l1_n793(x)
+ if (x < 1)
+ fun_l2_n64(x)
+ else
+ fun_l2_n294(x)
+ end
+end
+
+def fun_l1_n794(x)
+ if (x < 1)
+ fun_l2_n837(x)
+ else
+ fun_l2_n325(x)
+ end
+end
+
+def fun_l1_n795(x)
+ if (x < 1)
+ fun_l2_n522(x)
+ else
+ fun_l2_n307(x)
+ end
+end
+
+def fun_l1_n796(x)
+ if (x < 1)
+ fun_l2_n526(x)
+ else
+ fun_l2_n957(x)
+ end
+end
+
+def fun_l1_n797(x)
+ if (x < 1)
+ fun_l2_n71(x)
+ else
+ fun_l2_n871(x)
+ end
+end
+
+def fun_l1_n798(x)
+ if (x < 1)
+ fun_l2_n386(x)
+ else
+ fun_l2_n354(x)
+ end
+end
+
+def fun_l1_n799(x)
+ if (x < 1)
+ fun_l2_n669(x)
+ else
+ fun_l2_n237(x)
+ end
+end
+
+def fun_l1_n800(x)
+ if (x < 1)
+ fun_l2_n455(x)
+ else
+ fun_l2_n549(x)
+ end
+end
+
+def fun_l1_n801(x)
+ if (x < 1)
+ fun_l2_n708(x)
+ else
+ fun_l2_n611(x)
+ end
+end
+
+def fun_l1_n802(x)
+ if (x < 1)
+ fun_l2_n35(x)
+ else
+ fun_l2_n239(x)
+ end
+end
+
+def fun_l1_n803(x)
+ if (x < 1)
+ fun_l2_n890(x)
+ else
+ fun_l2_n27(x)
+ end
+end
+
+def fun_l1_n804(x)
+ if (x < 1)
+ fun_l2_n378(x)
+ else
+ fun_l2_n567(x)
+ end
+end
+
+def fun_l1_n805(x)
+ if (x < 1)
+ fun_l2_n672(x)
+ else
+ fun_l2_n320(x)
+ end
+end
+
+def fun_l1_n806(x)
+ if (x < 1)
+ fun_l2_n207(x)
+ else
+ fun_l2_n691(x)
+ end
+end
+
+def fun_l1_n807(x)
+ if (x < 1)
+ fun_l2_n180(x)
+ else
+ fun_l2_n912(x)
+ end
+end
+
+def fun_l1_n808(x)
+ if (x < 1)
+ fun_l2_n370(x)
+ else
+ fun_l2_n529(x)
+ end
+end
+
+def fun_l1_n809(x)
+ if (x < 1)
+ fun_l2_n436(x)
+ else
+ fun_l2_n465(x)
+ end
+end
+
+def fun_l1_n810(x)
+ if (x < 1)
+ fun_l2_n820(x)
+ else
+ fun_l2_n995(x)
+ end
+end
+
+def fun_l1_n811(x)
+ if (x < 1)
+ fun_l2_n821(x)
+ else
+ fun_l2_n898(x)
+ end
+end
+
+def fun_l1_n812(x)
+ if (x < 1)
+ fun_l2_n376(x)
+ else
+ fun_l2_n999(x)
+ end
+end
+
+def fun_l1_n813(x)
+ if (x < 1)
+ fun_l2_n643(x)
+ else
+ fun_l2_n478(x)
+ end
+end
+
+def fun_l1_n814(x)
+ if (x < 1)
+ fun_l2_n475(x)
+ else
+ fun_l2_n137(x)
+ end
+end
+
+def fun_l1_n815(x)
+ if (x < 1)
+ fun_l2_n117(x)
+ else
+ fun_l2_n685(x)
+ end
+end
+
+def fun_l1_n816(x)
+ if (x < 1)
+ fun_l2_n451(x)
+ else
+ fun_l2_n643(x)
+ end
+end
+
+def fun_l1_n817(x)
+ if (x < 1)
+ fun_l2_n22(x)
+ else
+ fun_l2_n939(x)
+ end
+end
+
+def fun_l1_n818(x)
+ if (x < 1)
+ fun_l2_n586(x)
+ else
+ fun_l2_n206(x)
+ end
+end
+
+def fun_l1_n819(x)
+ if (x < 1)
+ fun_l2_n443(x)
+ else
+ fun_l2_n661(x)
+ end
+end
+
+def fun_l1_n820(x)
+ if (x < 1)
+ fun_l2_n656(x)
+ else
+ fun_l2_n93(x)
+ end
+end
+
+def fun_l1_n821(x)
+ if (x < 1)
+ fun_l2_n794(x)
+ else
+ fun_l2_n354(x)
+ end
+end
+
+def fun_l1_n822(x)
+ if (x < 1)
+ fun_l2_n519(x)
+ else
+ fun_l2_n446(x)
+ end
+end
+
+def fun_l1_n823(x)
+ if (x < 1)
+ fun_l2_n0(x)
+ else
+ fun_l2_n233(x)
+ end
+end
+
+def fun_l1_n824(x)
+ if (x < 1)
+ fun_l2_n376(x)
+ else
+ fun_l2_n186(x)
+ end
+end
+
+def fun_l1_n825(x)
+ if (x < 1)
+ fun_l2_n292(x)
+ else
+ fun_l2_n303(x)
+ end
+end
+
+def fun_l1_n826(x)
+ if (x < 1)
+ fun_l2_n871(x)
+ else
+ fun_l2_n515(x)
+ end
+end
+
+def fun_l1_n827(x)
+ if (x < 1)
+ fun_l2_n227(x)
+ else
+ fun_l2_n232(x)
+ end
+end
+
+def fun_l1_n828(x)
+ if (x < 1)
+ fun_l2_n860(x)
+ else
+ fun_l2_n341(x)
+ end
+end
+
+def fun_l1_n829(x)
+ if (x < 1)
+ fun_l2_n140(x)
+ else
+ fun_l2_n304(x)
+ end
+end
+
+def fun_l1_n830(x)
+ if (x < 1)
+ fun_l2_n796(x)
+ else
+ fun_l2_n943(x)
+ end
+end
+
+def fun_l1_n831(x)
+ if (x < 1)
+ fun_l2_n71(x)
+ else
+ fun_l2_n8(x)
+ end
+end
+
+def fun_l1_n832(x)
+ if (x < 1)
+ fun_l2_n328(x)
+ else
+ fun_l2_n836(x)
+ end
+end
+
+def fun_l1_n833(x)
+ if (x < 1)
+ fun_l2_n322(x)
+ else
+ fun_l2_n653(x)
+ end
+end
+
+def fun_l1_n834(x)
+ if (x < 1)
+ fun_l2_n471(x)
+ else
+ fun_l2_n147(x)
+ end
+end
+
+def fun_l1_n835(x)
+ if (x < 1)
+ fun_l2_n601(x)
+ else
+ fun_l2_n249(x)
+ end
+end
+
+def fun_l1_n836(x)
+ if (x < 1)
+ fun_l2_n105(x)
+ else
+ fun_l2_n63(x)
+ end
+end
+
+def fun_l1_n837(x)
+ if (x < 1)
+ fun_l2_n773(x)
+ else
+ fun_l2_n597(x)
+ end
+end
+
+def fun_l1_n838(x)
+ if (x < 1)
+ fun_l2_n933(x)
+ else
+ fun_l2_n964(x)
+ end
+end
+
+def fun_l1_n839(x)
+ if (x < 1)
+ fun_l2_n123(x)
+ else
+ fun_l2_n533(x)
+ end
+end
+
+def fun_l1_n840(x)
+ if (x < 1)
+ fun_l2_n94(x)
+ else
+ fun_l2_n127(x)
+ end
+end
+
+def fun_l1_n841(x)
+ if (x < 1)
+ fun_l2_n981(x)
+ else
+ fun_l2_n819(x)
+ end
+end
+
+def fun_l1_n842(x)
+ if (x < 1)
+ fun_l2_n743(x)
+ else
+ fun_l2_n747(x)
+ end
+end
+
+def fun_l1_n843(x)
+ if (x < 1)
+ fun_l2_n735(x)
+ else
+ fun_l2_n110(x)
+ end
+end
+
+def fun_l1_n844(x)
+ if (x < 1)
+ fun_l2_n273(x)
+ else
+ fun_l2_n753(x)
+ end
+end
+
+def fun_l1_n845(x)
+ if (x < 1)
+ fun_l2_n316(x)
+ else
+ fun_l2_n391(x)
+ end
+end
+
+def fun_l1_n846(x)
+ if (x < 1)
+ fun_l2_n221(x)
+ else
+ fun_l2_n251(x)
+ end
+end
+
+def fun_l1_n847(x)
+ if (x < 1)
+ fun_l2_n795(x)
+ else
+ fun_l2_n513(x)
+ end
+end
+
+def fun_l1_n848(x)
+ if (x < 1)
+ fun_l2_n986(x)
+ else
+ fun_l2_n472(x)
+ end
+end
+
+def fun_l1_n849(x)
+ if (x < 1)
+ fun_l2_n863(x)
+ else
+ fun_l2_n759(x)
+ end
+end
+
+def fun_l1_n850(x)
+ if (x < 1)
+ fun_l2_n512(x)
+ else
+ fun_l2_n502(x)
+ end
+end
+
+def fun_l1_n851(x)
+ if (x < 1)
+ fun_l2_n561(x)
+ else
+ fun_l2_n697(x)
+ end
+end
+
+def fun_l1_n852(x)
+ if (x < 1)
+ fun_l2_n816(x)
+ else
+ fun_l2_n90(x)
+ end
+end
+
+def fun_l1_n853(x)
+ if (x < 1)
+ fun_l2_n656(x)
+ else
+ fun_l2_n174(x)
+ end
+end
+
+def fun_l1_n854(x)
+ if (x < 1)
+ fun_l2_n439(x)
+ else
+ fun_l2_n90(x)
+ end
+end
+
+def fun_l1_n855(x)
+ if (x < 1)
+ fun_l2_n15(x)
+ else
+ fun_l2_n402(x)
+ end
+end
+
+def fun_l1_n856(x)
+ if (x < 1)
+ fun_l2_n224(x)
+ else
+ fun_l2_n177(x)
+ end
+end
+
+def fun_l1_n857(x)
+ if (x < 1)
+ fun_l2_n675(x)
+ else
+ fun_l2_n113(x)
+ end
+end
+
+def fun_l1_n858(x)
+ if (x < 1)
+ fun_l2_n388(x)
+ else
+ fun_l2_n529(x)
+ end
+end
+
+def fun_l1_n859(x)
+ if (x < 1)
+ fun_l2_n628(x)
+ else
+ fun_l2_n93(x)
+ end
+end
+
+def fun_l1_n860(x)
+ if (x < 1)
+ fun_l2_n67(x)
+ else
+ fun_l2_n90(x)
+ end
+end
+
+def fun_l1_n861(x)
+ if (x < 1)
+ fun_l2_n637(x)
+ else
+ fun_l2_n68(x)
+ end
+end
+
+def fun_l1_n862(x)
+ if (x < 1)
+ fun_l2_n767(x)
+ else
+ fun_l2_n86(x)
+ end
+end
+
+def fun_l1_n863(x)
+ if (x < 1)
+ fun_l2_n50(x)
+ else
+ fun_l2_n777(x)
+ end
+end
+
+def fun_l1_n864(x)
+ if (x < 1)
+ fun_l2_n846(x)
+ else
+ fun_l2_n783(x)
+ end
+end
+
+def fun_l1_n865(x)
+ if (x < 1)
+ fun_l2_n756(x)
+ else
+ fun_l2_n703(x)
+ end
+end
+
+def fun_l1_n866(x)
+ if (x < 1)
+ fun_l2_n972(x)
+ else
+ fun_l2_n249(x)
+ end
+end
+
+def fun_l1_n867(x)
+ if (x < 1)
+ fun_l2_n636(x)
+ else
+ fun_l2_n841(x)
+ end
+end
+
+def fun_l1_n868(x)
+ if (x < 1)
+ fun_l2_n889(x)
+ else
+ fun_l2_n899(x)
+ end
+end
+
+def fun_l1_n869(x)
+ if (x < 1)
+ fun_l2_n55(x)
+ else
+ fun_l2_n45(x)
+ end
+end
+
+def fun_l1_n870(x)
+ if (x < 1)
+ fun_l2_n740(x)
+ else
+ fun_l2_n722(x)
+ end
+end
+
+def fun_l1_n871(x)
+ if (x < 1)
+ fun_l2_n865(x)
+ else
+ fun_l2_n695(x)
+ end
+end
+
+def fun_l1_n872(x)
+ if (x < 1)
+ fun_l2_n54(x)
+ else
+ fun_l2_n581(x)
+ end
+end
+
+def fun_l1_n873(x)
+ if (x < 1)
+ fun_l2_n328(x)
+ else
+ fun_l2_n861(x)
+ end
+end
+
+def fun_l1_n874(x)
+ if (x < 1)
+ fun_l2_n645(x)
+ else
+ fun_l2_n121(x)
+ end
+end
+
+def fun_l1_n875(x)
+ if (x < 1)
+ fun_l2_n71(x)
+ else
+ fun_l2_n329(x)
+ end
+end
+
+def fun_l1_n876(x)
+ if (x < 1)
+ fun_l2_n944(x)
+ else
+ fun_l2_n95(x)
+ end
+end
+
+def fun_l1_n877(x)
+ if (x < 1)
+ fun_l2_n270(x)
+ else
+ fun_l2_n801(x)
+ end
+end
+
+def fun_l1_n878(x)
+ if (x < 1)
+ fun_l2_n115(x)
+ else
+ fun_l2_n414(x)
+ end
+end
+
+def fun_l1_n879(x)
+ if (x < 1)
+ fun_l2_n154(x)
+ else
+ fun_l2_n605(x)
+ end
+end
+
+def fun_l1_n880(x)
+ if (x < 1)
+ fun_l2_n859(x)
+ else
+ fun_l2_n307(x)
+ end
+end
+
+def fun_l1_n881(x)
+ if (x < 1)
+ fun_l2_n443(x)
+ else
+ fun_l2_n267(x)
+ end
+end
+
+def fun_l1_n882(x)
+ if (x < 1)
+ fun_l2_n280(x)
+ else
+ fun_l2_n175(x)
+ end
+end
+
+def fun_l1_n883(x)
+ if (x < 1)
+ fun_l2_n176(x)
+ else
+ fun_l2_n286(x)
+ end
+end
+
+def fun_l1_n884(x)
+ if (x < 1)
+ fun_l2_n422(x)
+ else
+ fun_l2_n469(x)
+ end
+end
+
+def fun_l1_n885(x)
+ if (x < 1)
+ fun_l2_n532(x)
+ else
+ fun_l2_n795(x)
+ end
+end
+
+def fun_l1_n886(x)
+ if (x < 1)
+ fun_l2_n966(x)
+ else
+ fun_l2_n46(x)
+ end
+end
+
+def fun_l1_n887(x)
+ if (x < 1)
+ fun_l2_n446(x)
+ else
+ fun_l2_n944(x)
+ end
+end
+
+def fun_l1_n888(x)
+ if (x < 1)
+ fun_l2_n256(x)
+ else
+ fun_l2_n757(x)
+ end
+end
+
+def fun_l1_n889(x)
+ if (x < 1)
+ fun_l2_n566(x)
+ else
+ fun_l2_n992(x)
+ end
+end
+
+def fun_l1_n890(x)
+ if (x < 1)
+ fun_l2_n55(x)
+ else
+ fun_l2_n121(x)
+ end
+end
+
+def fun_l1_n891(x)
+ if (x < 1)
+ fun_l2_n597(x)
+ else
+ fun_l2_n257(x)
+ end
+end
+
+def fun_l1_n892(x)
+ if (x < 1)
+ fun_l2_n79(x)
+ else
+ fun_l2_n249(x)
+ end
+end
+
+def fun_l1_n893(x)
+ if (x < 1)
+ fun_l2_n436(x)
+ else
+ fun_l2_n738(x)
+ end
+end
+
+def fun_l1_n894(x)
+ if (x < 1)
+ fun_l2_n244(x)
+ else
+ fun_l2_n184(x)
+ end
+end
+
+def fun_l1_n895(x)
+ if (x < 1)
+ fun_l2_n342(x)
+ else
+ fun_l2_n794(x)
+ end
+end
+
+def fun_l1_n896(x)
+ if (x < 1)
+ fun_l2_n588(x)
+ else
+ fun_l2_n235(x)
+ end
+end
+
+def fun_l1_n897(x)
+ if (x < 1)
+ fun_l2_n443(x)
+ else
+ fun_l2_n462(x)
+ end
+end
+
+def fun_l1_n898(x)
+ if (x < 1)
+ fun_l2_n986(x)
+ else
+ fun_l2_n282(x)
+ end
+end
+
+def fun_l1_n899(x)
+ if (x < 1)
+ fun_l2_n61(x)
+ else
+ fun_l2_n516(x)
+ end
+end
+
+def fun_l1_n900(x)
+ if (x < 1)
+ fun_l2_n993(x)
+ else
+ fun_l2_n337(x)
+ end
+end
+
+def fun_l1_n901(x)
+ if (x < 1)
+ fun_l2_n398(x)
+ else
+ fun_l2_n425(x)
+ end
+end
+
+def fun_l1_n902(x)
+ if (x < 1)
+ fun_l2_n177(x)
+ else
+ fun_l2_n741(x)
+ end
+end
+
+def fun_l1_n903(x)
+ if (x < 1)
+ fun_l2_n597(x)
+ else
+ fun_l2_n331(x)
+ end
+end
+
+def fun_l1_n904(x)
+ if (x < 1)
+ fun_l2_n740(x)
+ else
+ fun_l2_n527(x)
+ end
+end
+
+def fun_l1_n905(x)
+ if (x < 1)
+ fun_l2_n138(x)
+ else
+ fun_l2_n248(x)
+ end
+end
+
+def fun_l1_n906(x)
+ if (x < 1)
+ fun_l2_n318(x)
+ else
+ fun_l2_n941(x)
+ end
+end
+
+def fun_l1_n907(x)
+ if (x < 1)
+ fun_l2_n493(x)
+ else
+ fun_l2_n376(x)
+ end
+end
+
+def fun_l1_n908(x)
+ if (x < 1)
+ fun_l2_n899(x)
+ else
+ fun_l2_n745(x)
+ end
+end
+
+def fun_l1_n909(x)
+ if (x < 1)
+ fun_l2_n963(x)
+ else
+ fun_l2_n384(x)
+ end
+end
+
+def fun_l1_n910(x)
+ if (x < 1)
+ fun_l2_n490(x)
+ else
+ fun_l2_n702(x)
+ end
+end
+
+def fun_l1_n911(x)
+ if (x < 1)
+ fun_l2_n712(x)
+ else
+ fun_l2_n810(x)
+ end
+end
+
+def fun_l1_n912(x)
+ if (x < 1)
+ fun_l2_n245(x)
+ else
+ fun_l2_n609(x)
+ end
+end
+
+def fun_l1_n913(x)
+ if (x < 1)
+ fun_l2_n997(x)
+ else
+ fun_l2_n241(x)
+ end
+end
+
+def fun_l1_n914(x)
+ if (x < 1)
+ fun_l2_n428(x)
+ else
+ fun_l2_n697(x)
+ end
+end
+
+def fun_l1_n915(x)
+ if (x < 1)
+ fun_l2_n257(x)
+ else
+ fun_l2_n626(x)
+ end
+end
+
+def fun_l1_n916(x)
+ if (x < 1)
+ fun_l2_n378(x)
+ else
+ fun_l2_n457(x)
+ end
+end
+
+def fun_l1_n917(x)
+ if (x < 1)
+ fun_l2_n378(x)
+ else
+ fun_l2_n958(x)
+ end
+end
+
+def fun_l1_n918(x)
+ if (x < 1)
+ fun_l2_n213(x)
+ else
+ fun_l2_n962(x)
+ end
+end
+
+def fun_l1_n919(x)
+ if (x < 1)
+ fun_l2_n466(x)
+ else
+ fun_l2_n461(x)
+ end
+end
+
+def fun_l1_n920(x)
+ if (x < 1)
+ fun_l2_n835(x)
+ else
+ fun_l2_n460(x)
+ end
+end
+
+def fun_l1_n921(x)
+ if (x < 1)
+ fun_l2_n642(x)
+ else
+ fun_l2_n680(x)
+ end
+end
+
+def fun_l1_n922(x)
+ if (x < 1)
+ fun_l2_n467(x)
+ else
+ fun_l2_n225(x)
+ end
+end
+
+def fun_l1_n923(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n462(x)
+ end
+end
+
+def fun_l1_n924(x)
+ if (x < 1)
+ fun_l2_n113(x)
+ else
+ fun_l2_n59(x)
+ end
+end
+
+def fun_l1_n925(x)
+ if (x < 1)
+ fun_l2_n329(x)
+ else
+ fun_l2_n994(x)
+ end
+end
+
+def fun_l1_n926(x)
+ if (x < 1)
+ fun_l2_n815(x)
+ else
+ fun_l2_n249(x)
+ end
+end
+
+def fun_l1_n927(x)
+ if (x < 1)
+ fun_l2_n216(x)
+ else
+ fun_l2_n591(x)
+ end
+end
+
+def fun_l1_n928(x)
+ if (x < 1)
+ fun_l2_n441(x)
+ else
+ fun_l2_n437(x)
+ end
+end
+
+def fun_l1_n929(x)
+ if (x < 1)
+ fun_l2_n433(x)
+ else
+ fun_l2_n185(x)
+ end
+end
+
+def fun_l1_n930(x)
+ if (x < 1)
+ fun_l2_n125(x)
+ else
+ fun_l2_n940(x)
+ end
+end
+
+def fun_l1_n931(x)
+ if (x < 1)
+ fun_l2_n203(x)
+ else
+ fun_l2_n292(x)
+ end
+end
+
+def fun_l1_n932(x)
+ if (x < 1)
+ fun_l2_n986(x)
+ else
+ fun_l2_n234(x)
+ end
+end
+
+def fun_l1_n933(x)
+ if (x < 1)
+ fun_l2_n735(x)
+ else
+ fun_l2_n20(x)
+ end
+end
+
+def fun_l1_n934(x)
+ if (x < 1)
+ fun_l2_n878(x)
+ else
+ fun_l2_n166(x)
+ end
+end
+
+def fun_l1_n935(x)
+ if (x < 1)
+ fun_l2_n123(x)
+ else
+ fun_l2_n52(x)
+ end
+end
+
+def fun_l1_n936(x)
+ if (x < 1)
+ fun_l2_n99(x)
+ else
+ fun_l2_n336(x)
+ end
+end
+
+def fun_l1_n937(x)
+ if (x < 1)
+ fun_l2_n731(x)
+ else
+ fun_l2_n363(x)
+ end
+end
+
+def fun_l1_n938(x)
+ if (x < 1)
+ fun_l2_n988(x)
+ else
+ fun_l2_n978(x)
+ end
+end
+
+def fun_l1_n939(x)
+ if (x < 1)
+ fun_l2_n592(x)
+ else
+ fun_l2_n932(x)
+ end
+end
+
+def fun_l1_n940(x)
+ if (x < 1)
+ fun_l2_n681(x)
+ else
+ fun_l2_n868(x)
+ end
+end
+
+def fun_l1_n941(x)
+ if (x < 1)
+ fun_l2_n863(x)
+ else
+ fun_l2_n457(x)
+ end
+end
+
+def fun_l1_n942(x)
+ if (x < 1)
+ fun_l2_n526(x)
+ else
+ fun_l2_n960(x)
+ end
+end
+
+def fun_l1_n943(x)
+ if (x < 1)
+ fun_l2_n859(x)
+ else
+ fun_l2_n478(x)
+ end
+end
+
+def fun_l1_n944(x)
+ if (x < 1)
+ fun_l2_n947(x)
+ else
+ fun_l2_n889(x)
+ end
+end
+
+def fun_l1_n945(x)
+ if (x < 1)
+ fun_l2_n845(x)
+ else
+ fun_l2_n211(x)
+ end
+end
+
+def fun_l1_n946(x)
+ if (x < 1)
+ fun_l2_n445(x)
+ else
+ fun_l2_n600(x)
+ end
+end
+
+def fun_l1_n947(x)
+ if (x < 1)
+ fun_l2_n932(x)
+ else
+ fun_l2_n534(x)
+ end
+end
+
+def fun_l1_n948(x)
+ if (x < 1)
+ fun_l2_n224(x)
+ else
+ fun_l2_n32(x)
+ end
+end
+
+def fun_l1_n949(x)
+ if (x < 1)
+ fun_l2_n63(x)
+ else
+ fun_l2_n121(x)
+ end
+end
+
+def fun_l1_n950(x)
+ if (x < 1)
+ fun_l2_n55(x)
+ else
+ fun_l2_n90(x)
+ end
+end
+
+def fun_l1_n951(x)
+ if (x < 1)
+ fun_l2_n880(x)
+ else
+ fun_l2_n936(x)
+ end
+end
+
+def fun_l1_n952(x)
+ if (x < 1)
+ fun_l2_n971(x)
+ else
+ fun_l2_n40(x)
+ end
+end
+
+def fun_l1_n953(x)
+ if (x < 1)
+ fun_l2_n880(x)
+ else
+ fun_l2_n200(x)
+ end
+end
+
+def fun_l1_n954(x)
+ if (x < 1)
+ fun_l2_n60(x)
+ else
+ fun_l2_n473(x)
+ end
+end
+
+def fun_l1_n955(x)
+ if (x < 1)
+ fun_l2_n855(x)
+ else
+ fun_l2_n601(x)
+ end
+end
+
+def fun_l1_n956(x)
+ if (x < 1)
+ fun_l2_n282(x)
+ else
+ fun_l2_n542(x)
+ end
+end
+
+def fun_l1_n957(x)
+ if (x < 1)
+ fun_l2_n116(x)
+ else
+ fun_l2_n584(x)
+ end
+end
+
+def fun_l1_n958(x)
+ if (x < 1)
+ fun_l2_n845(x)
+ else
+ fun_l2_n814(x)
+ end
+end
+
+def fun_l1_n959(x)
+ if (x < 1)
+ fun_l2_n443(x)
+ else
+ fun_l2_n239(x)
+ end
+end
+
+def fun_l1_n960(x)
+ if (x < 1)
+ fun_l2_n79(x)
+ else
+ fun_l2_n556(x)
+ end
+end
+
+def fun_l1_n961(x)
+ if (x < 1)
+ fun_l2_n664(x)
+ else
+ fun_l2_n282(x)
+ end
+end
+
+def fun_l1_n962(x)
+ if (x < 1)
+ fun_l2_n273(x)
+ else
+ fun_l2_n393(x)
+ end
+end
+
+def fun_l1_n963(x)
+ if (x < 1)
+ fun_l2_n120(x)
+ else
+ fun_l2_n506(x)
+ end
+end
+
+def fun_l1_n964(x)
+ if (x < 1)
+ fun_l2_n362(x)
+ else
+ fun_l2_n631(x)
+ end
+end
+
+def fun_l1_n965(x)
+ if (x < 1)
+ fun_l2_n219(x)
+ else
+ fun_l2_n260(x)
+ end
+end
+
+def fun_l1_n966(x)
+ if (x < 1)
+ fun_l2_n802(x)
+ else
+ fun_l2_n732(x)
+ end
+end
+
+def fun_l1_n967(x)
+ if (x < 1)
+ fun_l2_n761(x)
+ else
+ fun_l2_n580(x)
+ end
+end
+
+def fun_l1_n968(x)
+ if (x < 1)
+ fun_l2_n529(x)
+ else
+ fun_l2_n783(x)
+ end
+end
+
+def fun_l1_n969(x)
+ if (x < 1)
+ fun_l2_n138(x)
+ else
+ fun_l2_n434(x)
+ end
+end
+
+def fun_l1_n970(x)
+ if (x < 1)
+ fun_l2_n266(x)
+ else
+ fun_l2_n522(x)
+ end
+end
+
+def fun_l1_n971(x)
+ if (x < 1)
+ fun_l2_n352(x)
+ else
+ fun_l2_n51(x)
+ end
+end
+
+def fun_l1_n972(x)
+ if (x < 1)
+ fun_l2_n619(x)
+ else
+ fun_l2_n68(x)
+ end
+end
+
+def fun_l1_n973(x)
+ if (x < 1)
+ fun_l2_n510(x)
+ else
+ fun_l2_n74(x)
+ end
+end
+
+def fun_l1_n974(x)
+ if (x < 1)
+ fun_l2_n442(x)
+ else
+ fun_l2_n258(x)
+ end
+end
+
+def fun_l1_n975(x)
+ if (x < 1)
+ fun_l2_n106(x)
+ else
+ fun_l2_n364(x)
+ end
+end
+
+def fun_l1_n976(x)
+ if (x < 1)
+ fun_l2_n412(x)
+ else
+ fun_l2_n669(x)
+ end
+end
+
+def fun_l1_n977(x)
+ if (x < 1)
+ fun_l2_n394(x)
+ else
+ fun_l2_n435(x)
+ end
+end
+
+def fun_l1_n978(x)
+ if (x < 1)
+ fun_l2_n630(x)
+ else
+ fun_l2_n686(x)
+ end
+end
+
+def fun_l1_n979(x)
+ if (x < 1)
+ fun_l2_n683(x)
+ else
+ fun_l2_n99(x)
+ end
+end
+
+def fun_l1_n980(x)
+ if (x < 1)
+ fun_l2_n352(x)
+ else
+ fun_l2_n394(x)
+ end
+end
+
+def fun_l1_n981(x)
+ if (x < 1)
+ fun_l2_n856(x)
+ else
+ fun_l2_n11(x)
+ end
+end
+
+def fun_l1_n982(x)
+ if (x < 1)
+ fun_l2_n484(x)
+ else
+ fun_l2_n230(x)
+ end
+end
+
+def fun_l1_n983(x)
+ if (x < 1)
+ fun_l2_n609(x)
+ else
+ fun_l2_n882(x)
+ end
+end
+
+def fun_l1_n984(x)
+ if (x < 1)
+ fun_l2_n529(x)
+ else
+ fun_l2_n589(x)
+ end
+end
+
+def fun_l1_n985(x)
+ if (x < 1)
+ fun_l2_n545(x)
+ else
+ fun_l2_n139(x)
+ end
+end
+
+def fun_l1_n986(x)
+ if (x < 1)
+ fun_l2_n679(x)
+ else
+ fun_l2_n938(x)
+ end
+end
+
+def fun_l1_n987(x)
+ if (x < 1)
+ fun_l2_n803(x)
+ else
+ fun_l2_n454(x)
+ end
+end
+
+def fun_l1_n988(x)
+ if (x < 1)
+ fun_l2_n403(x)
+ else
+ fun_l2_n976(x)
+ end
+end
+
+def fun_l1_n989(x)
+ if (x < 1)
+ fun_l2_n364(x)
+ else
+ fun_l2_n96(x)
+ end
+end
+
+def fun_l1_n990(x)
+ if (x < 1)
+ fun_l2_n48(x)
+ else
+ fun_l2_n442(x)
+ end
+end
+
+def fun_l1_n991(x)
+ if (x < 1)
+ fun_l2_n842(x)
+ else
+ fun_l2_n810(x)
+ end
+end
+
+def fun_l1_n992(x)
+ if (x < 1)
+ fun_l2_n237(x)
+ else
+ fun_l2_n145(x)
+ end
+end
+
+def fun_l1_n993(x)
+ if (x < 1)
+ fun_l2_n279(x)
+ else
+ fun_l2_n783(x)
+ end
+end
+
+def fun_l1_n994(x)
+ if (x < 1)
+ fun_l2_n323(x)
+ else
+ fun_l2_n829(x)
+ end
+end
+
+def fun_l1_n995(x)
+ if (x < 1)
+ fun_l2_n904(x)
+ else
+ fun_l2_n738(x)
+ end
+end
+
+def fun_l1_n996(x)
+ if (x < 1)
+ fun_l2_n390(x)
+ else
+ fun_l2_n169(x)
+ end
+end
+
+def fun_l1_n997(x)
+ if (x < 1)
+ fun_l2_n583(x)
+ else
+ fun_l2_n993(x)
+ end
+end
+
+def fun_l1_n998(x)
+ if (x < 1)
+ fun_l2_n752(x)
+ else
+ fun_l2_n240(x)
+ end
+end
+
+def fun_l1_n999(x)
+ if (x < 1)
+ fun_l2_n489(x)
+ else
+ fun_l2_n175(x)
+ end
+end
+
+def fun_l2_n0(x)
+ if (x < 1)
+ fun_l3_n293(x)
+ else
+ fun_l3_n569(x)
+ end
+end
+
+def fun_l2_n1(x)
+ if (x < 1)
+ fun_l3_n310(x)
+ else
+ fun_l3_n785(x)
+ end
+end
+
+def fun_l2_n2(x)
+ if (x < 1)
+ fun_l3_n484(x)
+ else
+ fun_l3_n800(x)
+ end
+end
+
+def fun_l2_n3(x)
+ if (x < 1)
+ fun_l3_n353(x)
+ else
+ fun_l3_n871(x)
+ end
+end
+
+def fun_l2_n4(x)
+ if (x < 1)
+ fun_l3_n100(x)
+ else
+ fun_l3_n796(x)
+ end
+end
+
+def fun_l2_n5(x)
+ if (x < 1)
+ fun_l3_n547(x)
+ else
+ fun_l3_n663(x)
+ end
+end
+
+def fun_l2_n6(x)
+ if (x < 1)
+ fun_l3_n756(x)
+ else
+ fun_l3_n69(x)
+ end
+end
+
+def fun_l2_n7(x)
+ if (x < 1)
+ fun_l3_n393(x)
+ else
+ fun_l3_n333(x)
+ end
+end
+
+def fun_l2_n8(x)
+ if (x < 1)
+ fun_l3_n167(x)
+ else
+ fun_l3_n47(x)
+ end
+end
+
+def fun_l2_n9(x)
+ if (x < 1)
+ fun_l3_n969(x)
+ else
+ fun_l3_n772(x)
+ end
+end
+
+def fun_l2_n10(x)
+ if (x < 1)
+ fun_l3_n667(x)
+ else
+ fun_l3_n62(x)
+ end
+end
+
+def fun_l2_n11(x)
+ if (x < 1)
+ fun_l3_n671(x)
+ else
+ fun_l3_n303(x)
+ end
+end
+
+def fun_l2_n12(x)
+ if (x < 1)
+ fun_l3_n116(x)
+ else
+ fun_l3_n537(x)
+ end
+end
+
+def fun_l2_n13(x)
+ if (x < 1)
+ fun_l3_n363(x)
+ else
+ fun_l3_n426(x)
+ end
+end
+
+def fun_l2_n14(x)
+ if (x < 1)
+ fun_l3_n23(x)
+ else
+ fun_l3_n800(x)
+ end
+end
+
+def fun_l2_n15(x)
+ if (x < 1)
+ fun_l3_n344(x)
+ else
+ fun_l3_n590(x)
+ end
+end
+
+def fun_l2_n16(x)
+ if (x < 1)
+ fun_l3_n759(x)
+ else
+ fun_l3_n531(x)
+ end
+end
+
+def fun_l2_n17(x)
+ if (x < 1)
+ fun_l3_n902(x)
+ else
+ fun_l3_n948(x)
+ end
+end
+
+def fun_l2_n18(x)
+ if (x < 1)
+ fun_l3_n407(x)
+ else
+ fun_l3_n743(x)
+ end
+end
+
+def fun_l2_n19(x)
+ if (x < 1)
+ fun_l3_n360(x)
+ else
+ fun_l3_n953(x)
+ end
+end
+
+def fun_l2_n20(x)
+ if (x < 1)
+ fun_l3_n968(x)
+ else
+ fun_l3_n685(x)
+ end
+end
+
+def fun_l2_n21(x)
+ if (x < 1)
+ fun_l3_n964(x)
+ else
+ fun_l3_n210(x)
+ end
+end
+
+def fun_l2_n22(x)
+ if (x < 1)
+ fun_l3_n346(x)
+ else
+ fun_l3_n902(x)
+ end
+end
+
+def fun_l2_n23(x)
+ if (x < 1)
+ fun_l3_n154(x)
+ else
+ fun_l3_n52(x)
+ end
+end
+
+def fun_l2_n24(x)
+ if (x < 1)
+ fun_l3_n229(x)
+ else
+ fun_l3_n137(x)
+ end
+end
+
+def fun_l2_n25(x)
+ if (x < 1)
+ fun_l3_n390(x)
+ else
+ fun_l3_n445(x)
+ end
+end
+
+def fun_l2_n26(x)
+ if (x < 1)
+ fun_l3_n11(x)
+ else
+ fun_l3_n113(x)
+ end
+end
+
+def fun_l2_n27(x)
+ if (x < 1)
+ fun_l3_n756(x)
+ else
+ fun_l3_n935(x)
+ end
+end
+
+def fun_l2_n28(x)
+ if (x < 1)
+ fun_l3_n567(x)
+ else
+ fun_l3_n984(x)
+ end
+end
+
+def fun_l2_n29(x)
+ if (x < 1)
+ fun_l3_n982(x)
+ else
+ fun_l3_n335(x)
+ end
+end
+
+def fun_l2_n30(x)
+ if (x < 1)
+ fun_l3_n78(x)
+ else
+ fun_l3_n571(x)
+ end
+end
+
+def fun_l2_n31(x)
+ if (x < 1)
+ fun_l3_n93(x)
+ else
+ fun_l3_n455(x)
+ end
+end
+
+def fun_l2_n32(x)
+ if (x < 1)
+ fun_l3_n118(x)
+ else
+ fun_l3_n713(x)
+ end
+end
+
+def fun_l2_n33(x)
+ if (x < 1)
+ fun_l3_n561(x)
+ else
+ fun_l3_n0(x)
+ end
+end
+
+def fun_l2_n34(x)
+ if (x < 1)
+ fun_l3_n153(x)
+ else
+ fun_l3_n77(x)
+ end
+end
+
+def fun_l2_n35(x)
+ if (x < 1)
+ fun_l3_n815(x)
+ else
+ fun_l3_n642(x)
+ end
+end
+
+def fun_l2_n36(x)
+ if (x < 1)
+ fun_l3_n503(x)
+ else
+ fun_l3_n428(x)
+ end
+end
+
+def fun_l2_n37(x)
+ if (x < 1)
+ fun_l3_n780(x)
+ else
+ fun_l3_n301(x)
+ end
+end
+
+def fun_l2_n38(x)
+ if (x < 1)
+ fun_l3_n827(x)
+ else
+ fun_l3_n444(x)
+ end
+end
+
+def fun_l2_n39(x)
+ if (x < 1)
+ fun_l3_n808(x)
+ else
+ fun_l3_n76(x)
+ end
+end
+
+def fun_l2_n40(x)
+ if (x < 1)
+ fun_l3_n216(x)
+ else
+ fun_l3_n943(x)
+ end
+end
+
+def fun_l2_n41(x)
+ if (x < 1)
+ fun_l3_n237(x)
+ else
+ fun_l3_n935(x)
+ end
+end
+
+def fun_l2_n42(x)
+ if (x < 1)
+ fun_l3_n769(x)
+ else
+ fun_l3_n564(x)
+ end
+end
+
+def fun_l2_n43(x)
+ if (x < 1)
+ fun_l3_n108(x)
+ else
+ fun_l3_n180(x)
+ end
+end
+
+def fun_l2_n44(x)
+ if (x < 1)
+ fun_l3_n750(x)
+ else
+ fun_l3_n614(x)
+ end
+end
+
+def fun_l2_n45(x)
+ if (x < 1)
+ fun_l3_n497(x)
+ else
+ fun_l3_n584(x)
+ end
+end
+
+def fun_l2_n46(x)
+ if (x < 1)
+ fun_l3_n364(x)
+ else
+ fun_l3_n218(x)
+ end
+end
+
+def fun_l2_n47(x)
+ if (x < 1)
+ fun_l3_n938(x)
+ else
+ fun_l3_n707(x)
+ end
+end
+
+def fun_l2_n48(x)
+ if (x < 1)
+ fun_l3_n14(x)
+ else
+ fun_l3_n178(x)
+ end
+end
+
+def fun_l2_n49(x)
+ if (x < 1)
+ fun_l3_n923(x)
+ else
+ fun_l3_n493(x)
+ end
+end
+
+def fun_l2_n50(x)
+ if (x < 1)
+ fun_l3_n481(x)
+ else
+ fun_l3_n193(x)
+ end
+end
+
+def fun_l2_n51(x)
+ if (x < 1)
+ fun_l3_n876(x)
+ else
+ fun_l3_n59(x)
+ end
+end
+
+def fun_l2_n52(x)
+ if (x < 1)
+ fun_l3_n930(x)
+ else
+ fun_l3_n813(x)
+ end
+end
+
+def fun_l2_n53(x)
+ if (x < 1)
+ fun_l3_n369(x)
+ else
+ fun_l3_n972(x)
+ end
+end
+
+def fun_l2_n54(x)
+ if (x < 1)
+ fun_l3_n95(x)
+ else
+ fun_l3_n573(x)
+ end
+end
+
+def fun_l2_n55(x)
+ if (x < 1)
+ fun_l3_n148(x)
+ else
+ fun_l3_n369(x)
+ end
+end
+
+def fun_l2_n56(x)
+ if (x < 1)
+ fun_l3_n476(x)
+ else
+ fun_l3_n54(x)
+ end
+end
+
+def fun_l2_n57(x)
+ if (x < 1)
+ fun_l3_n672(x)
+ else
+ fun_l3_n592(x)
+ end
+end
+
+def fun_l2_n58(x)
+ if (x < 1)
+ fun_l3_n648(x)
+ else
+ fun_l3_n169(x)
+ end
+end
+
+def fun_l2_n59(x)
+ if (x < 1)
+ fun_l3_n844(x)
+ else
+ fun_l3_n422(x)
+ end
+end
+
+def fun_l2_n60(x)
+ if (x < 1)
+ fun_l3_n6(x)
+ else
+ fun_l3_n763(x)
+ end
+end
+
+def fun_l2_n61(x)
+ if (x < 1)
+ fun_l3_n35(x)
+ else
+ fun_l3_n316(x)
+ end
+end
+
+def fun_l2_n62(x)
+ if (x < 1)
+ fun_l3_n487(x)
+ else
+ fun_l3_n469(x)
+ end
+end
+
+def fun_l2_n63(x)
+ if (x < 1)
+ fun_l3_n272(x)
+ else
+ fun_l3_n909(x)
+ end
+end
+
+def fun_l2_n64(x)
+ if (x < 1)
+ fun_l3_n266(x)
+ else
+ fun_l3_n347(x)
+ end
+end
+
+def fun_l2_n65(x)
+ if (x < 1)
+ fun_l3_n696(x)
+ else
+ fun_l3_n499(x)
+ end
+end
+
+def fun_l2_n66(x)
+ if (x < 1)
+ fun_l3_n523(x)
+ else
+ fun_l3_n834(x)
+ end
+end
+
+def fun_l2_n67(x)
+ if (x < 1)
+ fun_l3_n966(x)
+ else
+ fun_l3_n454(x)
+ end
+end
+
+def fun_l2_n68(x)
+ if (x < 1)
+ fun_l3_n406(x)
+ else
+ fun_l3_n644(x)
+ end
+end
+
+def fun_l2_n69(x)
+ if (x < 1)
+ fun_l3_n616(x)
+ else
+ fun_l3_n90(x)
+ end
+end
+
+def fun_l2_n70(x)
+ if (x < 1)
+ fun_l3_n158(x)
+ else
+ fun_l3_n910(x)
+ end
+end
+
+def fun_l2_n71(x)
+ if (x < 1)
+ fun_l3_n391(x)
+ else
+ fun_l3_n761(x)
+ end
+end
+
+def fun_l2_n72(x)
+ if (x < 1)
+ fun_l3_n585(x)
+ else
+ fun_l3_n405(x)
+ end
+end
+
+def fun_l2_n73(x)
+ if (x < 1)
+ fun_l3_n227(x)
+ else
+ fun_l3_n583(x)
+ end
+end
+
+def fun_l2_n74(x)
+ if (x < 1)
+ fun_l3_n580(x)
+ else
+ fun_l3_n110(x)
+ end
+end
+
+def fun_l2_n75(x)
+ if (x < 1)
+ fun_l3_n393(x)
+ else
+ fun_l3_n643(x)
+ end
+end
+
+def fun_l2_n76(x)
+ if (x < 1)
+ fun_l3_n935(x)
+ else
+ fun_l3_n593(x)
+ end
+end
+
+def fun_l2_n77(x)
+ if (x < 1)
+ fun_l3_n239(x)
+ else
+ fun_l3_n704(x)
+ end
+end
+
+def fun_l2_n78(x)
+ if (x < 1)
+ fun_l3_n192(x)
+ else
+ fun_l3_n722(x)
+ end
+end
+
+def fun_l2_n79(x)
+ if (x < 1)
+ fun_l3_n119(x)
+ else
+ fun_l3_n426(x)
+ end
+end
+
+def fun_l2_n80(x)
+ if (x < 1)
+ fun_l3_n692(x)
+ else
+ fun_l3_n895(x)
+ end
+end
+
+def fun_l2_n81(x)
+ if (x < 1)
+ fun_l3_n246(x)
+ else
+ fun_l3_n340(x)
+ end
+end
+
+def fun_l2_n82(x)
+ if (x < 1)
+ fun_l3_n368(x)
+ else
+ fun_l3_n255(x)
+ end
+end
+
+def fun_l2_n83(x)
+ if (x < 1)
+ fun_l3_n942(x)
+ else
+ fun_l3_n595(x)
+ end
+end
+
+def fun_l2_n84(x)
+ if (x < 1)
+ fun_l3_n629(x)
+ else
+ fun_l3_n622(x)
+ end
+end
+
+def fun_l2_n85(x)
+ if (x < 1)
+ fun_l3_n415(x)
+ else
+ fun_l3_n615(x)
+ end
+end
+
+def fun_l2_n86(x)
+ if (x < 1)
+ fun_l3_n295(x)
+ else
+ fun_l3_n809(x)
+ end
+end
+
+def fun_l2_n87(x)
+ if (x < 1)
+ fun_l3_n957(x)
+ else
+ fun_l3_n452(x)
+ end
+end
+
+def fun_l2_n88(x)
+ if (x < 1)
+ fun_l3_n490(x)
+ else
+ fun_l3_n184(x)
+ end
+end
+
+def fun_l2_n89(x)
+ if (x < 1)
+ fun_l3_n483(x)
+ else
+ fun_l3_n963(x)
+ end
+end
+
+def fun_l2_n90(x)
+ if (x < 1)
+ fun_l3_n262(x)
+ else
+ fun_l3_n458(x)
+ end
+end
+
+def fun_l2_n91(x)
+ if (x < 1)
+ fun_l3_n277(x)
+ else
+ fun_l3_n30(x)
+ end
+end
+
+def fun_l2_n92(x)
+ if (x < 1)
+ fun_l3_n310(x)
+ else
+ fun_l3_n215(x)
+ end
+end
+
+def fun_l2_n93(x)
+ if (x < 1)
+ fun_l3_n660(x)
+ else
+ fun_l3_n798(x)
+ end
+end
+
+def fun_l2_n94(x)
+ if (x < 1)
+ fun_l3_n761(x)
+ else
+ fun_l3_n10(x)
+ end
+end
+
+def fun_l2_n95(x)
+ if (x < 1)
+ fun_l3_n4(x)
+ else
+ fun_l3_n65(x)
+ end
+end
+
+def fun_l2_n96(x)
+ if (x < 1)
+ fun_l3_n444(x)
+ else
+ fun_l3_n378(x)
+ end
+end
+
+def fun_l2_n97(x)
+ if (x < 1)
+ fun_l3_n119(x)
+ else
+ fun_l3_n96(x)
+ end
+end
+
+def fun_l2_n98(x)
+ if (x < 1)
+ fun_l3_n970(x)
+ else
+ fun_l3_n471(x)
+ end
+end
+
+def fun_l2_n99(x)
+ if (x < 1)
+ fun_l3_n544(x)
+ else
+ fun_l3_n1(x)
+ end
+end
+
+def fun_l2_n100(x)
+ if (x < 1)
+ fun_l3_n253(x)
+ else
+ fun_l3_n332(x)
+ end
+end
+
+def fun_l2_n101(x)
+ if (x < 1)
+ fun_l3_n69(x)
+ else
+ fun_l3_n946(x)
+ end
+end
+
+def fun_l2_n102(x)
+ if (x < 1)
+ fun_l3_n458(x)
+ else
+ fun_l3_n885(x)
+ end
+end
+
+def fun_l2_n103(x)
+ if (x < 1)
+ fun_l3_n732(x)
+ else
+ fun_l3_n601(x)
+ end
+end
+
+def fun_l2_n104(x)
+ if (x < 1)
+ fun_l3_n737(x)
+ else
+ fun_l3_n530(x)
+ end
+end
+
+def fun_l2_n105(x)
+ if (x < 1)
+ fun_l3_n125(x)
+ else
+ fun_l3_n561(x)
+ end
+end
+
+def fun_l2_n106(x)
+ if (x < 1)
+ fun_l3_n717(x)
+ else
+ fun_l3_n660(x)
+ end
+end
+
+def fun_l2_n107(x)
+ if (x < 1)
+ fun_l3_n863(x)
+ else
+ fun_l3_n211(x)
+ end
+end
+
+def fun_l2_n108(x)
+ if (x < 1)
+ fun_l3_n221(x)
+ else
+ fun_l3_n718(x)
+ end
+end
+
+def fun_l2_n109(x)
+ if (x < 1)
+ fun_l3_n100(x)
+ else
+ fun_l3_n673(x)
+ end
+end
+
+def fun_l2_n110(x)
+ if (x < 1)
+ fun_l3_n434(x)
+ else
+ fun_l3_n348(x)
+ end
+end
+
+def fun_l2_n111(x)
+ if (x < 1)
+ fun_l3_n923(x)
+ else
+ fun_l3_n413(x)
+ end
+end
+
+def fun_l2_n112(x)
+ if (x < 1)
+ fun_l3_n253(x)
+ else
+ fun_l3_n461(x)
+ end
+end
+
+def fun_l2_n113(x)
+ if (x < 1)
+ fun_l3_n946(x)
+ else
+ fun_l3_n406(x)
+ end
+end
+
+def fun_l2_n114(x)
+ if (x < 1)
+ fun_l3_n976(x)
+ else
+ fun_l3_n354(x)
+ end
+end
+
+def fun_l2_n115(x)
+ if (x < 1)
+ fun_l3_n205(x)
+ else
+ fun_l3_n798(x)
+ end
+end
+
+def fun_l2_n116(x)
+ if (x < 1)
+ fun_l3_n304(x)
+ else
+ fun_l3_n145(x)
+ end
+end
+
+def fun_l2_n117(x)
+ if (x < 1)
+ fun_l3_n917(x)
+ else
+ fun_l3_n276(x)
+ end
+end
+
+def fun_l2_n118(x)
+ if (x < 1)
+ fun_l3_n880(x)
+ else
+ fun_l3_n532(x)
+ end
+end
+
+def fun_l2_n119(x)
+ if (x < 1)
+ fun_l3_n39(x)
+ else
+ fun_l3_n549(x)
+ end
+end
+
+def fun_l2_n120(x)
+ if (x < 1)
+ fun_l3_n325(x)
+ else
+ fun_l3_n250(x)
+ end
+end
+
+def fun_l2_n121(x)
+ if (x < 1)
+ fun_l3_n953(x)
+ else
+ fun_l3_n259(x)
+ end
+end
+
+def fun_l2_n122(x)
+ if (x < 1)
+ fun_l3_n572(x)
+ else
+ fun_l3_n747(x)
+ end
+end
+
+def fun_l2_n123(x)
+ if (x < 1)
+ fun_l3_n639(x)
+ else
+ fun_l3_n810(x)
+ end
+end
+
+def fun_l2_n124(x)
+ if (x < 1)
+ fun_l3_n954(x)
+ else
+ fun_l3_n814(x)
+ end
+end
+
+def fun_l2_n125(x)
+ if (x < 1)
+ fun_l3_n932(x)
+ else
+ fun_l3_n275(x)
+ end
+end
+
+def fun_l2_n126(x)
+ if (x < 1)
+ fun_l3_n472(x)
+ else
+ fun_l3_n184(x)
+ end
+end
+
+def fun_l2_n127(x)
+ if (x < 1)
+ fun_l3_n725(x)
+ else
+ fun_l3_n497(x)
+ end
+end
+
+def fun_l2_n128(x)
+ if (x < 1)
+ fun_l3_n94(x)
+ else
+ fun_l3_n801(x)
+ end
+end
+
+def fun_l2_n129(x)
+ if (x < 1)
+ fun_l3_n476(x)
+ else
+ fun_l3_n936(x)
+ end
+end
+
+def fun_l2_n130(x)
+ if (x < 1)
+ fun_l3_n706(x)
+ else
+ fun_l3_n738(x)
+ end
+end
+
+def fun_l2_n131(x)
+ if (x < 1)
+ fun_l3_n535(x)
+ else
+ fun_l3_n401(x)
+ end
+end
+
+def fun_l2_n132(x)
+ if (x < 1)
+ fun_l3_n459(x)
+ else
+ fun_l3_n998(x)
+ end
+end
+
+def fun_l2_n133(x)
+ if (x < 1)
+ fun_l3_n158(x)
+ else
+ fun_l3_n288(x)
+ end
+end
+
+def fun_l2_n134(x)
+ if (x < 1)
+ fun_l3_n47(x)
+ else
+ fun_l3_n104(x)
+ end
+end
+
+def fun_l2_n135(x)
+ if (x < 1)
+ fun_l3_n154(x)
+ else
+ fun_l3_n239(x)
+ end
+end
+
+def fun_l2_n136(x)
+ if (x < 1)
+ fun_l3_n634(x)
+ else
+ fun_l3_n718(x)
+ end
+end
+
+def fun_l2_n137(x)
+ if (x < 1)
+ fun_l3_n867(x)
+ else
+ fun_l3_n578(x)
+ end
+end
+
+def fun_l2_n138(x)
+ if (x < 1)
+ fun_l3_n905(x)
+ else
+ fun_l3_n434(x)
+ end
+end
+
+def fun_l2_n139(x)
+ if (x < 1)
+ fun_l3_n596(x)
+ else
+ fun_l3_n516(x)
+ end
+end
+
+def fun_l2_n140(x)
+ if (x < 1)
+ fun_l3_n150(x)
+ else
+ fun_l3_n901(x)
+ end
+end
+
+def fun_l2_n141(x)
+ if (x < 1)
+ fun_l3_n792(x)
+ else
+ fun_l3_n50(x)
+ end
+end
+
+def fun_l2_n142(x)
+ if (x < 1)
+ fun_l3_n539(x)
+ else
+ fun_l3_n206(x)
+ end
+end
+
+def fun_l2_n143(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n788(x)
+ end
+end
+
+def fun_l2_n144(x)
+ if (x < 1)
+ fun_l3_n535(x)
+ else
+ fun_l3_n868(x)
+ end
+end
+
+def fun_l2_n145(x)
+ if (x < 1)
+ fun_l3_n869(x)
+ else
+ fun_l3_n865(x)
+ end
+end
+
+def fun_l2_n146(x)
+ if (x < 1)
+ fun_l3_n574(x)
+ else
+ fun_l3_n798(x)
+ end
+end
+
+def fun_l2_n147(x)
+ if (x < 1)
+ fun_l3_n876(x)
+ else
+ fun_l3_n658(x)
+ end
+end
+
+def fun_l2_n148(x)
+ if (x < 1)
+ fun_l3_n582(x)
+ else
+ fun_l3_n694(x)
+ end
+end
+
+def fun_l2_n149(x)
+ if (x < 1)
+ fun_l3_n137(x)
+ else
+ fun_l3_n187(x)
+ end
+end
+
+def fun_l2_n150(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n666(x)
+ end
+end
+
+def fun_l2_n151(x)
+ if (x < 1)
+ fun_l3_n264(x)
+ else
+ fun_l3_n236(x)
+ end
+end
+
+def fun_l2_n152(x)
+ if (x < 1)
+ fun_l3_n984(x)
+ else
+ fun_l3_n469(x)
+ end
+end
+
+def fun_l2_n153(x)
+ if (x < 1)
+ fun_l3_n152(x)
+ else
+ fun_l3_n578(x)
+ end
+end
+
+def fun_l2_n154(x)
+ if (x < 1)
+ fun_l3_n452(x)
+ else
+ fun_l3_n807(x)
+ end
+end
+
+def fun_l2_n155(x)
+ if (x < 1)
+ fun_l3_n82(x)
+ else
+ fun_l3_n589(x)
+ end
+end
+
+def fun_l2_n156(x)
+ if (x < 1)
+ fun_l3_n356(x)
+ else
+ fun_l3_n454(x)
+ end
+end
+
+def fun_l2_n157(x)
+ if (x < 1)
+ fun_l3_n814(x)
+ else
+ fun_l3_n376(x)
+ end
+end
+
+def fun_l2_n158(x)
+ if (x < 1)
+ fun_l3_n755(x)
+ else
+ fun_l3_n966(x)
+ end
+end
+
+def fun_l2_n159(x)
+ if (x < 1)
+ fun_l3_n167(x)
+ else
+ fun_l3_n571(x)
+ end
+end
+
+def fun_l2_n160(x)
+ if (x < 1)
+ fun_l3_n919(x)
+ else
+ fun_l3_n771(x)
+ end
+end
+
+def fun_l2_n161(x)
+ if (x < 1)
+ fun_l3_n147(x)
+ else
+ fun_l3_n936(x)
+ end
+end
+
+def fun_l2_n162(x)
+ if (x < 1)
+ fun_l3_n638(x)
+ else
+ fun_l3_n23(x)
+ end
+end
+
+def fun_l2_n163(x)
+ if (x < 1)
+ fun_l3_n349(x)
+ else
+ fun_l3_n46(x)
+ end
+end
+
+def fun_l2_n164(x)
+ if (x < 1)
+ fun_l3_n55(x)
+ else
+ fun_l3_n795(x)
+ end
+end
+
+def fun_l2_n165(x)
+ if (x < 1)
+ fun_l3_n131(x)
+ else
+ fun_l3_n233(x)
+ end
+end
+
+def fun_l2_n166(x)
+ if (x < 1)
+ fun_l3_n324(x)
+ else
+ fun_l3_n215(x)
+ end
+end
+
+def fun_l2_n167(x)
+ if (x < 1)
+ fun_l3_n244(x)
+ else
+ fun_l3_n641(x)
+ end
+end
+
+def fun_l2_n168(x)
+ if (x < 1)
+ fun_l3_n744(x)
+ else
+ fun_l3_n337(x)
+ end
+end
+
+def fun_l2_n169(x)
+ if (x < 1)
+ fun_l3_n760(x)
+ else
+ fun_l3_n82(x)
+ end
+end
+
+def fun_l2_n170(x)
+ if (x < 1)
+ fun_l3_n877(x)
+ else
+ fun_l3_n566(x)
+ end
+end
+
+def fun_l2_n171(x)
+ if (x < 1)
+ fun_l3_n211(x)
+ else
+ fun_l3_n101(x)
+ end
+end
+
+def fun_l2_n172(x)
+ if (x < 1)
+ fun_l3_n143(x)
+ else
+ fun_l3_n537(x)
+ end
+end
+
+def fun_l2_n173(x)
+ if (x < 1)
+ fun_l3_n210(x)
+ else
+ fun_l3_n150(x)
+ end
+end
+
+def fun_l2_n174(x)
+ if (x < 1)
+ fun_l3_n772(x)
+ else
+ fun_l3_n42(x)
+ end
+end
+
+def fun_l2_n175(x)
+ if (x < 1)
+ fun_l3_n482(x)
+ else
+ fun_l3_n606(x)
+ end
+end
+
+def fun_l2_n176(x)
+ if (x < 1)
+ fun_l3_n68(x)
+ else
+ fun_l3_n888(x)
+ end
+end
+
+def fun_l2_n177(x)
+ if (x < 1)
+ fun_l3_n313(x)
+ else
+ fun_l3_n947(x)
+ end
+end
+
+def fun_l2_n178(x)
+ if (x < 1)
+ fun_l3_n116(x)
+ else
+ fun_l3_n812(x)
+ end
+end
+
+def fun_l2_n179(x)
+ if (x < 1)
+ fun_l3_n741(x)
+ else
+ fun_l3_n994(x)
+ end
+end
+
+def fun_l2_n180(x)
+ if (x < 1)
+ fun_l3_n667(x)
+ else
+ fun_l3_n335(x)
+ end
+end
+
+def fun_l2_n181(x)
+ if (x < 1)
+ fun_l3_n994(x)
+ else
+ fun_l3_n502(x)
+ end
+end
+
+def fun_l2_n182(x)
+ if (x < 1)
+ fun_l3_n528(x)
+ else
+ fun_l3_n272(x)
+ end
+end
+
+def fun_l2_n183(x)
+ if (x < 1)
+ fun_l3_n649(x)
+ else
+ fun_l3_n200(x)
+ end
+end
+
+def fun_l2_n184(x)
+ if (x < 1)
+ fun_l3_n105(x)
+ else
+ fun_l3_n897(x)
+ end
+end
+
+def fun_l2_n185(x)
+ if (x < 1)
+ fun_l3_n980(x)
+ else
+ fun_l3_n651(x)
+ end
+end
+
+def fun_l2_n186(x)
+ if (x < 1)
+ fun_l3_n835(x)
+ else
+ fun_l3_n388(x)
+ end
+end
+
+def fun_l2_n187(x)
+ if (x < 1)
+ fun_l3_n769(x)
+ else
+ fun_l3_n162(x)
+ end
+end
+
+def fun_l2_n188(x)
+ if (x < 1)
+ fun_l3_n934(x)
+ else
+ fun_l3_n874(x)
+ end
+end
+
+def fun_l2_n189(x)
+ if (x < 1)
+ fun_l3_n407(x)
+ else
+ fun_l3_n180(x)
+ end
+end
+
+def fun_l2_n190(x)
+ if (x < 1)
+ fun_l3_n594(x)
+ else
+ fun_l3_n929(x)
+ end
+end
+
+def fun_l2_n191(x)
+ if (x < 1)
+ fun_l3_n303(x)
+ else
+ fun_l3_n528(x)
+ end
+end
+
+def fun_l2_n192(x)
+ if (x < 1)
+ fun_l3_n768(x)
+ else
+ fun_l3_n226(x)
+ end
+end
+
+def fun_l2_n193(x)
+ if (x < 1)
+ fun_l3_n618(x)
+ else
+ fun_l3_n821(x)
+ end
+end
+
+def fun_l2_n194(x)
+ if (x < 1)
+ fun_l3_n953(x)
+ else
+ fun_l3_n969(x)
+ end
+end
+
+def fun_l2_n195(x)
+ if (x < 1)
+ fun_l3_n574(x)
+ else
+ fun_l3_n344(x)
+ end
+end
+
+def fun_l2_n196(x)
+ if (x < 1)
+ fun_l3_n943(x)
+ else
+ fun_l3_n304(x)
+ end
+end
+
+def fun_l2_n197(x)
+ if (x < 1)
+ fun_l3_n276(x)
+ else
+ fun_l3_n502(x)
+ end
+end
+
+def fun_l2_n198(x)
+ if (x < 1)
+ fun_l3_n597(x)
+ else
+ fun_l3_n197(x)
+ end
+end
+
+def fun_l2_n199(x)
+ if (x < 1)
+ fun_l3_n517(x)
+ else
+ fun_l3_n34(x)
+ end
+end
+
+def fun_l2_n200(x)
+ if (x < 1)
+ fun_l3_n980(x)
+ else
+ fun_l3_n672(x)
+ end
+end
+
+def fun_l2_n201(x)
+ if (x < 1)
+ fun_l3_n510(x)
+ else
+ fun_l3_n804(x)
+ end
+end
+
+def fun_l2_n202(x)
+ if (x < 1)
+ fun_l3_n735(x)
+ else
+ fun_l3_n367(x)
+ end
+end
+
+def fun_l2_n203(x)
+ if (x < 1)
+ fun_l3_n546(x)
+ else
+ fun_l3_n502(x)
+ end
+end
+
+def fun_l2_n204(x)
+ if (x < 1)
+ fun_l3_n189(x)
+ else
+ fun_l3_n639(x)
+ end
+end
+
+def fun_l2_n205(x)
+ if (x < 1)
+ fun_l3_n396(x)
+ else
+ fun_l3_n862(x)
+ end
+end
+
+def fun_l2_n206(x)
+ if (x < 1)
+ fun_l3_n679(x)
+ else
+ fun_l3_n881(x)
+ end
+end
+
+def fun_l2_n207(x)
+ if (x < 1)
+ fun_l3_n342(x)
+ else
+ fun_l3_n522(x)
+ end
+end
+
+def fun_l2_n208(x)
+ if (x < 1)
+ fun_l3_n173(x)
+ else
+ fun_l3_n323(x)
+ end
+end
+
+def fun_l2_n209(x)
+ if (x < 1)
+ fun_l3_n693(x)
+ else
+ fun_l3_n160(x)
+ end
+end
+
+def fun_l2_n210(x)
+ if (x < 1)
+ fun_l3_n827(x)
+ else
+ fun_l3_n580(x)
+ end
+end
+
+def fun_l2_n211(x)
+ if (x < 1)
+ fun_l3_n213(x)
+ else
+ fun_l3_n100(x)
+ end
+end
+
+def fun_l2_n212(x)
+ if (x < 1)
+ fun_l3_n915(x)
+ else
+ fun_l3_n531(x)
+ end
+end
+
+def fun_l2_n213(x)
+ if (x < 1)
+ fun_l3_n260(x)
+ else
+ fun_l3_n279(x)
+ end
+end
+
+def fun_l2_n214(x)
+ if (x < 1)
+ fun_l3_n468(x)
+ else
+ fun_l3_n257(x)
+ end
+end
+
+def fun_l2_n215(x)
+ if (x < 1)
+ fun_l3_n990(x)
+ else
+ fun_l3_n740(x)
+ end
+end
+
+def fun_l2_n216(x)
+ if (x < 1)
+ fun_l3_n291(x)
+ else
+ fun_l3_n625(x)
+ end
+end
+
+def fun_l2_n217(x)
+ if (x < 1)
+ fun_l3_n493(x)
+ else
+ fun_l3_n726(x)
+ end
+end
+
+def fun_l2_n218(x)
+ if (x < 1)
+ fun_l3_n714(x)
+ else
+ fun_l3_n793(x)
+ end
+end
+
+def fun_l2_n219(x)
+ if (x < 1)
+ fun_l3_n683(x)
+ else
+ fun_l3_n715(x)
+ end
+end
+
+def fun_l2_n220(x)
+ if (x < 1)
+ fun_l3_n249(x)
+ else
+ fun_l3_n266(x)
+ end
+end
+
+def fun_l2_n221(x)
+ if (x < 1)
+ fun_l3_n324(x)
+ else
+ fun_l3_n22(x)
+ end
+end
+
+def fun_l2_n222(x)
+ if (x < 1)
+ fun_l3_n978(x)
+ else
+ fun_l3_n885(x)
+ end
+end
+
+def fun_l2_n223(x)
+ if (x < 1)
+ fun_l3_n821(x)
+ else
+ fun_l3_n412(x)
+ end
+end
+
+def fun_l2_n224(x)
+ if (x < 1)
+ fun_l3_n636(x)
+ else
+ fun_l3_n641(x)
+ end
+end
+
+def fun_l2_n225(x)
+ if (x < 1)
+ fun_l3_n971(x)
+ else
+ fun_l3_n288(x)
+ end
+end
+
+def fun_l2_n226(x)
+ if (x < 1)
+ fun_l3_n429(x)
+ else
+ fun_l3_n323(x)
+ end
+end
+
+def fun_l2_n227(x)
+ if (x < 1)
+ fun_l3_n909(x)
+ else
+ fun_l3_n267(x)
+ end
+end
+
+def fun_l2_n228(x)
+ if (x < 1)
+ fun_l3_n437(x)
+ else
+ fun_l3_n985(x)
+ end
+end
+
+def fun_l2_n229(x)
+ if (x < 1)
+ fun_l3_n131(x)
+ else
+ fun_l3_n298(x)
+ end
+end
+
+def fun_l2_n230(x)
+ if (x < 1)
+ fun_l3_n865(x)
+ else
+ fun_l3_n288(x)
+ end
+end
+
+def fun_l2_n231(x)
+ if (x < 1)
+ fun_l3_n772(x)
+ else
+ fun_l3_n531(x)
+ end
+end
+
+def fun_l2_n232(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n422(x)
+ end
+end
+
+def fun_l2_n233(x)
+ if (x < 1)
+ fun_l3_n82(x)
+ else
+ fun_l3_n32(x)
+ end
+end
+
+def fun_l2_n234(x)
+ if (x < 1)
+ fun_l3_n25(x)
+ else
+ fun_l3_n518(x)
+ end
+end
+
+def fun_l2_n235(x)
+ if (x < 1)
+ fun_l3_n313(x)
+ else
+ fun_l3_n179(x)
+ end
+end
+
+def fun_l2_n236(x)
+ if (x < 1)
+ fun_l3_n819(x)
+ else
+ fun_l3_n586(x)
+ end
+end
+
+def fun_l2_n237(x)
+ if (x < 1)
+ fun_l3_n398(x)
+ else
+ fun_l3_n921(x)
+ end
+end
+
+def fun_l2_n238(x)
+ if (x < 1)
+ fun_l3_n667(x)
+ else
+ fun_l3_n795(x)
+ end
+end
+
+def fun_l2_n239(x)
+ if (x < 1)
+ fun_l3_n862(x)
+ else
+ fun_l3_n222(x)
+ end
+end
+
+def fun_l2_n240(x)
+ if (x < 1)
+ fun_l3_n968(x)
+ else
+ fun_l3_n320(x)
+ end
+end
+
+def fun_l2_n241(x)
+ if (x < 1)
+ fun_l3_n559(x)
+ else
+ fun_l3_n50(x)
+ end
+end
+
+def fun_l2_n242(x)
+ if (x < 1)
+ fun_l3_n647(x)
+ else
+ fun_l3_n232(x)
+ end
+end
+
+def fun_l2_n243(x)
+ if (x < 1)
+ fun_l3_n425(x)
+ else
+ fun_l3_n815(x)
+ end
+end
+
+def fun_l2_n244(x)
+ if (x < 1)
+ fun_l3_n752(x)
+ else
+ fun_l3_n690(x)
+ end
+end
+
+def fun_l2_n245(x)
+ if (x < 1)
+ fun_l3_n382(x)
+ else
+ fun_l3_n817(x)
+ end
+end
+
+def fun_l2_n246(x)
+ if (x < 1)
+ fun_l3_n880(x)
+ else
+ fun_l3_n380(x)
+ end
+end
+
+def fun_l2_n247(x)
+ if (x < 1)
+ fun_l3_n444(x)
+ else
+ fun_l3_n75(x)
+ end
+end
+
+def fun_l2_n248(x)
+ if (x < 1)
+ fun_l3_n368(x)
+ else
+ fun_l3_n314(x)
+ end
+end
+
+def fun_l2_n249(x)
+ if (x < 1)
+ fun_l3_n131(x)
+ else
+ fun_l3_n398(x)
+ end
+end
+
+def fun_l2_n250(x)
+ if (x < 1)
+ fun_l3_n376(x)
+ else
+ fun_l3_n449(x)
+ end
+end
+
+def fun_l2_n251(x)
+ if (x < 1)
+ fun_l3_n404(x)
+ else
+ fun_l3_n301(x)
+ end
+end
+
+def fun_l2_n252(x)
+ if (x < 1)
+ fun_l3_n274(x)
+ else
+ fun_l3_n430(x)
+ end
+end
+
+def fun_l2_n253(x)
+ if (x < 1)
+ fun_l3_n734(x)
+ else
+ fun_l3_n255(x)
+ end
+end
+
+def fun_l2_n254(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n944(x)
+ end
+end
+
+def fun_l2_n255(x)
+ if (x < 1)
+ fun_l3_n978(x)
+ else
+ fun_l3_n898(x)
+ end
+end
+
+def fun_l2_n256(x)
+ if (x < 1)
+ fun_l3_n175(x)
+ else
+ fun_l3_n477(x)
+ end
+end
+
+def fun_l2_n257(x)
+ if (x < 1)
+ fun_l3_n84(x)
+ else
+ fun_l3_n772(x)
+ end
+end
+
+def fun_l2_n258(x)
+ if (x < 1)
+ fun_l3_n605(x)
+ else
+ fun_l3_n144(x)
+ end
+end
+
+def fun_l2_n259(x)
+ if (x < 1)
+ fun_l3_n51(x)
+ else
+ fun_l3_n542(x)
+ end
+end
+
+def fun_l2_n260(x)
+ if (x < 1)
+ fun_l3_n940(x)
+ else
+ fun_l3_n316(x)
+ end
+end
+
+def fun_l2_n261(x)
+ if (x < 1)
+ fun_l3_n702(x)
+ else
+ fun_l3_n197(x)
+ end
+end
+
+def fun_l2_n262(x)
+ if (x < 1)
+ fun_l3_n164(x)
+ else
+ fun_l3_n21(x)
+ end
+end
+
+def fun_l2_n263(x)
+ if (x < 1)
+ fun_l3_n432(x)
+ else
+ fun_l3_n496(x)
+ end
+end
+
+def fun_l2_n264(x)
+ if (x < 1)
+ fun_l3_n265(x)
+ else
+ fun_l3_n40(x)
+ end
+end
+
+def fun_l2_n265(x)
+ if (x < 1)
+ fun_l3_n951(x)
+ else
+ fun_l3_n723(x)
+ end
+end
+
+def fun_l2_n266(x)
+ if (x < 1)
+ fun_l3_n279(x)
+ else
+ fun_l3_n167(x)
+ end
+end
+
+def fun_l2_n267(x)
+ if (x < 1)
+ fun_l3_n51(x)
+ else
+ fun_l3_n283(x)
+ end
+end
+
+def fun_l2_n268(x)
+ if (x < 1)
+ fun_l3_n389(x)
+ else
+ fun_l3_n264(x)
+ end
+end
+
+def fun_l2_n269(x)
+ if (x < 1)
+ fun_l3_n68(x)
+ else
+ fun_l3_n484(x)
+ end
+end
+
+def fun_l2_n270(x)
+ if (x < 1)
+ fun_l3_n435(x)
+ else
+ fun_l3_n204(x)
+ end
+end
+
+def fun_l2_n271(x)
+ if (x < 1)
+ fun_l3_n717(x)
+ else
+ fun_l3_n763(x)
+ end
+end
+
+def fun_l2_n272(x)
+ if (x < 1)
+ fun_l3_n901(x)
+ else
+ fun_l3_n332(x)
+ end
+end
+
+def fun_l2_n273(x)
+ if (x < 1)
+ fun_l3_n358(x)
+ else
+ fun_l3_n608(x)
+ end
+end
+
+def fun_l2_n274(x)
+ if (x < 1)
+ fun_l3_n885(x)
+ else
+ fun_l3_n490(x)
+ end
+end
+
+def fun_l2_n275(x)
+ if (x < 1)
+ fun_l3_n82(x)
+ else
+ fun_l3_n87(x)
+ end
+end
+
+def fun_l2_n276(x)
+ if (x < 1)
+ fun_l3_n698(x)
+ else
+ fun_l3_n846(x)
+ end
+end
+
+def fun_l2_n277(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n457(x)
+ end
+end
+
+def fun_l2_n278(x)
+ if (x < 1)
+ fun_l3_n925(x)
+ else
+ fun_l3_n674(x)
+ end
+end
+
+def fun_l2_n279(x)
+ if (x < 1)
+ fun_l3_n797(x)
+ else
+ fun_l3_n315(x)
+ end
+end
+
+def fun_l2_n280(x)
+ if (x < 1)
+ fun_l3_n73(x)
+ else
+ fun_l3_n2(x)
+ end
+end
+
+def fun_l2_n281(x)
+ if (x < 1)
+ fun_l3_n301(x)
+ else
+ fun_l3_n315(x)
+ end
+end
+
+def fun_l2_n282(x)
+ if (x < 1)
+ fun_l3_n473(x)
+ else
+ fun_l3_n639(x)
+ end
+end
+
+def fun_l2_n283(x)
+ if (x < 1)
+ fun_l3_n812(x)
+ else
+ fun_l3_n241(x)
+ end
+end
+
+def fun_l2_n284(x)
+ if (x < 1)
+ fun_l3_n0(x)
+ else
+ fun_l3_n445(x)
+ end
+end
+
+def fun_l2_n285(x)
+ if (x < 1)
+ fun_l3_n587(x)
+ else
+ fun_l3_n806(x)
+ end
+end
+
+def fun_l2_n286(x)
+ if (x < 1)
+ fun_l3_n169(x)
+ else
+ fun_l3_n546(x)
+ end
+end
+
+def fun_l2_n287(x)
+ if (x < 1)
+ fun_l3_n623(x)
+ else
+ fun_l3_n677(x)
+ end
+end
+
+def fun_l2_n288(x)
+ if (x < 1)
+ fun_l3_n804(x)
+ else
+ fun_l3_n80(x)
+ end
+end
+
+def fun_l2_n289(x)
+ if (x < 1)
+ fun_l3_n812(x)
+ else
+ fun_l3_n197(x)
+ end
+end
+
+def fun_l2_n290(x)
+ if (x < 1)
+ fun_l3_n551(x)
+ else
+ fun_l3_n896(x)
+ end
+end
+
+def fun_l2_n291(x)
+ if (x < 1)
+ fun_l3_n686(x)
+ else
+ fun_l3_n884(x)
+ end
+end
+
+def fun_l2_n292(x)
+ if (x < 1)
+ fun_l3_n427(x)
+ else
+ fun_l3_n251(x)
+ end
+end
+
+def fun_l2_n293(x)
+ if (x < 1)
+ fun_l3_n375(x)
+ else
+ fun_l3_n309(x)
+ end
+end
+
+def fun_l2_n294(x)
+ if (x < 1)
+ fun_l3_n371(x)
+ else
+ fun_l3_n184(x)
+ end
+end
+
+def fun_l2_n295(x)
+ if (x < 1)
+ fun_l3_n332(x)
+ else
+ fun_l3_n250(x)
+ end
+end
+
+def fun_l2_n296(x)
+ if (x < 1)
+ fun_l3_n333(x)
+ else
+ fun_l3_n254(x)
+ end
+end
+
+def fun_l2_n297(x)
+ if (x < 1)
+ fun_l3_n24(x)
+ else
+ fun_l3_n528(x)
+ end
+end
+
+def fun_l2_n298(x)
+ if (x < 1)
+ fun_l3_n96(x)
+ else
+ fun_l3_n653(x)
+ end
+end
+
+def fun_l2_n299(x)
+ if (x < 1)
+ fun_l3_n920(x)
+ else
+ fun_l3_n475(x)
+ end
+end
+
+def fun_l2_n300(x)
+ if (x < 1)
+ fun_l3_n337(x)
+ else
+ fun_l3_n378(x)
+ end
+end
+
+def fun_l2_n301(x)
+ if (x < 1)
+ fun_l3_n778(x)
+ else
+ fun_l3_n216(x)
+ end
+end
+
+def fun_l2_n302(x)
+ if (x < 1)
+ fun_l3_n366(x)
+ else
+ fun_l3_n562(x)
+ end
+end
+
+def fun_l2_n303(x)
+ if (x < 1)
+ fun_l3_n656(x)
+ else
+ fun_l3_n779(x)
+ end
+end
+
+def fun_l2_n304(x)
+ if (x < 1)
+ fun_l3_n526(x)
+ else
+ fun_l3_n783(x)
+ end
+end
+
+def fun_l2_n305(x)
+ if (x < 1)
+ fun_l3_n500(x)
+ else
+ fun_l3_n744(x)
+ end
+end
+
+def fun_l2_n306(x)
+ if (x < 1)
+ fun_l3_n953(x)
+ else
+ fun_l3_n394(x)
+ end
+end
+
+def fun_l2_n307(x)
+ if (x < 1)
+ fun_l3_n385(x)
+ else
+ fun_l3_n937(x)
+ end
+end
+
+def fun_l2_n308(x)
+ if (x < 1)
+ fun_l3_n742(x)
+ else
+ fun_l3_n984(x)
+ end
+end
+
+def fun_l2_n309(x)
+ if (x < 1)
+ fun_l3_n388(x)
+ else
+ fun_l3_n704(x)
+ end
+end
+
+def fun_l2_n310(x)
+ if (x < 1)
+ fun_l3_n252(x)
+ else
+ fun_l3_n585(x)
+ end
+end
+
+def fun_l2_n311(x)
+ if (x < 1)
+ fun_l3_n121(x)
+ else
+ fun_l3_n815(x)
+ end
+end
+
+def fun_l2_n312(x)
+ if (x < 1)
+ fun_l3_n657(x)
+ else
+ fun_l3_n338(x)
+ end
+end
+
+def fun_l2_n313(x)
+ if (x < 1)
+ fun_l3_n115(x)
+ else
+ fun_l3_n748(x)
+ end
+end
+
+def fun_l2_n314(x)
+ if (x < 1)
+ fun_l3_n237(x)
+ else
+ fun_l3_n319(x)
+ end
+end
+
+def fun_l2_n315(x)
+ if (x < 1)
+ fun_l3_n684(x)
+ else
+ fun_l3_n428(x)
+ end
+end
+
+def fun_l2_n316(x)
+ if (x < 1)
+ fun_l3_n416(x)
+ else
+ fun_l3_n499(x)
+ end
+end
+
+def fun_l2_n317(x)
+ if (x < 1)
+ fun_l3_n305(x)
+ else
+ fun_l3_n888(x)
+ end
+end
+
+def fun_l2_n318(x)
+ if (x < 1)
+ fun_l3_n506(x)
+ else
+ fun_l3_n579(x)
+ end
+end
+
+def fun_l2_n319(x)
+ if (x < 1)
+ fun_l3_n324(x)
+ else
+ fun_l3_n459(x)
+ end
+end
+
+def fun_l2_n320(x)
+ if (x < 1)
+ fun_l3_n278(x)
+ else
+ fun_l3_n89(x)
+ end
+end
+
+def fun_l2_n321(x)
+ if (x < 1)
+ fun_l3_n319(x)
+ else
+ fun_l3_n903(x)
+ end
+end
+
+def fun_l2_n322(x)
+ if (x < 1)
+ fun_l3_n96(x)
+ else
+ fun_l3_n334(x)
+ end
+end
+
+def fun_l2_n323(x)
+ if (x < 1)
+ fun_l3_n913(x)
+ else
+ fun_l3_n309(x)
+ end
+end
+
+def fun_l2_n324(x)
+ if (x < 1)
+ fun_l3_n186(x)
+ else
+ fun_l3_n453(x)
+ end
+end
+
+def fun_l2_n325(x)
+ if (x < 1)
+ fun_l3_n223(x)
+ else
+ fun_l3_n761(x)
+ end
+end
+
+def fun_l2_n326(x)
+ if (x < 1)
+ fun_l3_n757(x)
+ else
+ fun_l3_n700(x)
+ end
+end
+
+def fun_l2_n327(x)
+ if (x < 1)
+ fun_l3_n316(x)
+ else
+ fun_l3_n3(x)
+ end
+end
+
+def fun_l2_n328(x)
+ if (x < 1)
+ fun_l3_n680(x)
+ else
+ fun_l3_n275(x)
+ end
+end
+
+def fun_l2_n329(x)
+ if (x < 1)
+ fun_l3_n731(x)
+ else
+ fun_l3_n971(x)
+ end
+end
+
+def fun_l2_n330(x)
+ if (x < 1)
+ fun_l3_n672(x)
+ else
+ fun_l3_n389(x)
+ end
+end
+
+def fun_l2_n331(x)
+ if (x < 1)
+ fun_l3_n947(x)
+ else
+ fun_l3_n778(x)
+ end
+end
+
+def fun_l2_n332(x)
+ if (x < 1)
+ fun_l3_n23(x)
+ else
+ fun_l3_n478(x)
+ end
+end
+
+def fun_l2_n333(x)
+ if (x < 1)
+ fun_l3_n778(x)
+ else
+ fun_l3_n894(x)
+ end
+end
+
+def fun_l2_n334(x)
+ if (x < 1)
+ fun_l3_n198(x)
+ else
+ fun_l3_n830(x)
+ end
+end
+
+def fun_l2_n335(x)
+ if (x < 1)
+ fun_l3_n874(x)
+ else
+ fun_l3_n861(x)
+ end
+end
+
+def fun_l2_n336(x)
+ if (x < 1)
+ fun_l3_n66(x)
+ else
+ fun_l3_n47(x)
+ end
+end
+
+def fun_l2_n337(x)
+ if (x < 1)
+ fun_l3_n65(x)
+ else
+ fun_l3_n849(x)
+ end
+end
+
+def fun_l2_n338(x)
+ if (x < 1)
+ fun_l3_n122(x)
+ else
+ fun_l3_n891(x)
+ end
+end
+
+def fun_l2_n339(x)
+ if (x < 1)
+ fun_l3_n377(x)
+ else
+ fun_l3_n862(x)
+ end
+end
+
+def fun_l2_n340(x)
+ if (x < 1)
+ fun_l3_n278(x)
+ else
+ fun_l3_n495(x)
+ end
+end
+
+def fun_l2_n341(x)
+ if (x < 1)
+ fun_l3_n396(x)
+ else
+ fun_l3_n842(x)
+ end
+end
+
+def fun_l2_n342(x)
+ if (x < 1)
+ fun_l3_n971(x)
+ else
+ fun_l3_n296(x)
+ end
+end
+
+def fun_l2_n343(x)
+ if (x < 1)
+ fun_l3_n137(x)
+ else
+ fun_l3_n815(x)
+ end
+end
+
+def fun_l2_n344(x)
+ if (x < 1)
+ fun_l3_n910(x)
+ else
+ fun_l3_n515(x)
+ end
+end
+
+def fun_l2_n345(x)
+ if (x < 1)
+ fun_l3_n415(x)
+ else
+ fun_l3_n766(x)
+ end
+end
+
+def fun_l2_n346(x)
+ if (x < 1)
+ fun_l3_n816(x)
+ else
+ fun_l3_n169(x)
+ end
+end
+
+def fun_l2_n347(x)
+ if (x < 1)
+ fun_l3_n223(x)
+ else
+ fun_l3_n776(x)
+ end
+end
+
+def fun_l2_n348(x)
+ if (x < 1)
+ fun_l3_n316(x)
+ else
+ fun_l3_n497(x)
+ end
+end
+
+def fun_l2_n349(x)
+ if (x < 1)
+ fun_l3_n116(x)
+ else
+ fun_l3_n536(x)
+ end
+end
+
+def fun_l2_n350(x)
+ if (x < 1)
+ fun_l3_n252(x)
+ else
+ fun_l3_n981(x)
+ end
+end
+
+def fun_l2_n351(x)
+ if (x < 1)
+ fun_l3_n783(x)
+ else
+ fun_l3_n596(x)
+ end
+end
+
+def fun_l2_n352(x)
+ if (x < 1)
+ fun_l3_n72(x)
+ else
+ fun_l3_n978(x)
+ end
+end
+
+def fun_l2_n353(x)
+ if (x < 1)
+ fun_l3_n910(x)
+ else
+ fun_l3_n493(x)
+ end
+end
+
+def fun_l2_n354(x)
+ if (x < 1)
+ fun_l3_n671(x)
+ else
+ fun_l3_n297(x)
+ end
+end
+
+def fun_l2_n355(x)
+ if (x < 1)
+ fun_l3_n820(x)
+ else
+ fun_l3_n456(x)
+ end
+end
+
+def fun_l2_n356(x)
+ if (x < 1)
+ fun_l3_n23(x)
+ else
+ fun_l3_n760(x)
+ end
+end
+
+def fun_l2_n357(x)
+ if (x < 1)
+ fun_l3_n676(x)
+ else
+ fun_l3_n531(x)
+ end
+end
+
+def fun_l2_n358(x)
+ if (x < 1)
+ fun_l3_n849(x)
+ else
+ fun_l3_n592(x)
+ end
+end
+
+def fun_l2_n359(x)
+ if (x < 1)
+ fun_l3_n492(x)
+ else
+ fun_l3_n845(x)
+ end
+end
+
+def fun_l2_n360(x)
+ if (x < 1)
+ fun_l3_n58(x)
+ else
+ fun_l3_n896(x)
+ end
+end
+
+def fun_l2_n361(x)
+ if (x < 1)
+ fun_l3_n427(x)
+ else
+ fun_l3_n434(x)
+ end
+end
+
+def fun_l2_n362(x)
+ if (x < 1)
+ fun_l3_n129(x)
+ else
+ fun_l3_n582(x)
+ end
+end
+
+def fun_l2_n363(x)
+ if (x < 1)
+ fun_l3_n901(x)
+ else
+ fun_l3_n405(x)
+ end
+end
+
+def fun_l2_n364(x)
+ if (x < 1)
+ fun_l3_n577(x)
+ else
+ fun_l3_n550(x)
+ end
+end
+
+def fun_l2_n365(x)
+ if (x < 1)
+ fun_l3_n717(x)
+ else
+ fun_l3_n660(x)
+ end
+end
+
+def fun_l2_n366(x)
+ if (x < 1)
+ fun_l3_n605(x)
+ else
+ fun_l3_n755(x)
+ end
+end
+
+def fun_l2_n367(x)
+ if (x < 1)
+ fun_l3_n875(x)
+ else
+ fun_l3_n784(x)
+ end
+end
+
+def fun_l2_n368(x)
+ if (x < 1)
+ fun_l3_n914(x)
+ else
+ fun_l3_n351(x)
+ end
+end
+
+def fun_l2_n369(x)
+ if (x < 1)
+ fun_l3_n684(x)
+ else
+ fun_l3_n932(x)
+ end
+end
+
+def fun_l2_n370(x)
+ if (x < 1)
+ fun_l3_n796(x)
+ else
+ fun_l3_n920(x)
+ end
+end
+
+def fun_l2_n371(x)
+ if (x < 1)
+ fun_l3_n456(x)
+ else
+ fun_l3_n188(x)
+ end
+end
+
+def fun_l2_n372(x)
+ if (x < 1)
+ fun_l3_n891(x)
+ else
+ fun_l3_n905(x)
+ end
+end
+
+def fun_l2_n373(x)
+ if (x < 1)
+ fun_l3_n906(x)
+ else
+ fun_l3_n993(x)
+ end
+end
+
+def fun_l2_n374(x)
+ if (x < 1)
+ fun_l3_n811(x)
+ else
+ fun_l3_n629(x)
+ end
+end
+
+def fun_l2_n375(x)
+ if (x < 1)
+ fun_l3_n5(x)
+ else
+ fun_l3_n304(x)
+ end
+end
+
+def fun_l2_n376(x)
+ if (x < 1)
+ fun_l3_n240(x)
+ else
+ fun_l3_n859(x)
+ end
+end
+
+def fun_l2_n377(x)
+ if (x < 1)
+ fun_l3_n346(x)
+ else
+ fun_l3_n196(x)
+ end
+end
+
+def fun_l2_n378(x)
+ if (x < 1)
+ fun_l3_n918(x)
+ else
+ fun_l3_n371(x)
+ end
+end
+
+def fun_l2_n379(x)
+ if (x < 1)
+ fun_l3_n112(x)
+ else
+ fun_l3_n269(x)
+ end
+end
+
+def fun_l2_n380(x)
+ if (x < 1)
+ fun_l3_n46(x)
+ else
+ fun_l3_n397(x)
+ end
+end
+
+def fun_l2_n381(x)
+ if (x < 1)
+ fun_l3_n977(x)
+ else
+ fun_l3_n647(x)
+ end
+end
+
+def fun_l2_n382(x)
+ if (x < 1)
+ fun_l3_n788(x)
+ else
+ fun_l3_n418(x)
+ end
+end
+
+def fun_l2_n383(x)
+ if (x < 1)
+ fun_l3_n395(x)
+ else
+ fun_l3_n268(x)
+ end
+end
+
+def fun_l2_n384(x)
+ if (x < 1)
+ fun_l3_n39(x)
+ else
+ fun_l3_n950(x)
+ end
+end
+
+def fun_l2_n385(x)
+ if (x < 1)
+ fun_l3_n301(x)
+ else
+ fun_l3_n241(x)
+ end
+end
+
+def fun_l2_n386(x)
+ if (x < 1)
+ fun_l3_n936(x)
+ else
+ fun_l3_n416(x)
+ end
+end
+
+def fun_l2_n387(x)
+ if (x < 1)
+ fun_l3_n750(x)
+ else
+ fun_l3_n152(x)
+ end
+end
+
+def fun_l2_n388(x)
+ if (x < 1)
+ fun_l3_n210(x)
+ else
+ fun_l3_n824(x)
+ end
+end
+
+def fun_l2_n389(x)
+ if (x < 1)
+ fun_l3_n3(x)
+ else
+ fun_l3_n872(x)
+ end
+end
+
+def fun_l2_n390(x)
+ if (x < 1)
+ fun_l3_n944(x)
+ else
+ fun_l3_n49(x)
+ end
+end
+
+def fun_l2_n391(x)
+ if (x < 1)
+ fun_l3_n645(x)
+ else
+ fun_l3_n604(x)
+ end
+end
+
+def fun_l2_n392(x)
+ if (x < 1)
+ fun_l3_n539(x)
+ else
+ fun_l3_n374(x)
+ end
+end
+
+def fun_l2_n393(x)
+ if (x < 1)
+ fun_l3_n728(x)
+ else
+ fun_l3_n620(x)
+ end
+end
+
+def fun_l2_n394(x)
+ if (x < 1)
+ fun_l3_n538(x)
+ else
+ fun_l3_n233(x)
+ end
+end
+
+def fun_l2_n395(x)
+ if (x < 1)
+ fun_l3_n977(x)
+ else
+ fun_l3_n351(x)
+ end
+end
+
+def fun_l2_n396(x)
+ if (x < 1)
+ fun_l3_n54(x)
+ else
+ fun_l3_n958(x)
+ end
+end
+
+def fun_l2_n397(x)
+ if (x < 1)
+ fun_l3_n237(x)
+ else
+ fun_l3_n54(x)
+ end
+end
+
+def fun_l2_n398(x)
+ if (x < 1)
+ fun_l3_n846(x)
+ else
+ fun_l3_n234(x)
+ end
+end
+
+def fun_l2_n399(x)
+ if (x < 1)
+ fun_l3_n934(x)
+ else
+ fun_l3_n128(x)
+ end
+end
+
+def fun_l2_n400(x)
+ if (x < 1)
+ fun_l3_n15(x)
+ else
+ fun_l3_n288(x)
+ end
+end
+
+def fun_l2_n401(x)
+ if (x < 1)
+ fun_l3_n944(x)
+ else
+ fun_l3_n455(x)
+ end
+end
+
+def fun_l2_n402(x)
+ if (x < 1)
+ fun_l3_n962(x)
+ else
+ fun_l3_n785(x)
+ end
+end
+
+def fun_l2_n403(x)
+ if (x < 1)
+ fun_l3_n408(x)
+ else
+ fun_l3_n689(x)
+ end
+end
+
+def fun_l2_n404(x)
+ if (x < 1)
+ fun_l3_n722(x)
+ else
+ fun_l3_n704(x)
+ end
+end
+
+def fun_l2_n405(x)
+ if (x < 1)
+ fun_l3_n410(x)
+ else
+ fun_l3_n543(x)
+ end
+end
+
+def fun_l2_n406(x)
+ if (x < 1)
+ fun_l3_n953(x)
+ else
+ fun_l3_n351(x)
+ end
+end
+
+def fun_l2_n407(x)
+ if (x < 1)
+ fun_l3_n426(x)
+ else
+ fun_l3_n467(x)
+ end
+end
+
+def fun_l2_n408(x)
+ if (x < 1)
+ fun_l3_n204(x)
+ else
+ fun_l3_n163(x)
+ end
+end
+
+def fun_l2_n409(x)
+ if (x < 1)
+ fun_l3_n418(x)
+ else
+ fun_l3_n896(x)
+ end
+end
+
+def fun_l2_n410(x)
+ if (x < 1)
+ fun_l3_n915(x)
+ else
+ fun_l3_n800(x)
+ end
+end
+
+def fun_l2_n411(x)
+ if (x < 1)
+ fun_l3_n580(x)
+ else
+ fun_l3_n507(x)
+ end
+end
+
+def fun_l2_n412(x)
+ if (x < 1)
+ fun_l3_n672(x)
+ else
+ fun_l3_n938(x)
+ end
+end
+
+def fun_l2_n413(x)
+ if (x < 1)
+ fun_l3_n112(x)
+ else
+ fun_l3_n927(x)
+ end
+end
+
+def fun_l2_n414(x)
+ if (x < 1)
+ fun_l3_n801(x)
+ else
+ fun_l3_n604(x)
+ end
+end
+
+def fun_l2_n415(x)
+ if (x < 1)
+ fun_l3_n773(x)
+ else
+ fun_l3_n951(x)
+ end
+end
+
+def fun_l2_n416(x)
+ if (x < 1)
+ fun_l3_n335(x)
+ else
+ fun_l3_n157(x)
+ end
+end
+
+def fun_l2_n417(x)
+ if (x < 1)
+ fun_l3_n480(x)
+ else
+ fun_l3_n106(x)
+ end
+end
+
+def fun_l2_n418(x)
+ if (x < 1)
+ fun_l3_n523(x)
+ else
+ fun_l3_n969(x)
+ end
+end
+
+def fun_l2_n419(x)
+ if (x < 1)
+ fun_l3_n371(x)
+ else
+ fun_l3_n698(x)
+ end
+end
+
+def fun_l2_n420(x)
+ if (x < 1)
+ fun_l3_n102(x)
+ else
+ fun_l3_n47(x)
+ end
+end
+
+def fun_l2_n421(x)
+ if (x < 1)
+ fun_l3_n64(x)
+ else
+ fun_l3_n574(x)
+ end
+end
+
+def fun_l2_n422(x)
+ if (x < 1)
+ fun_l3_n208(x)
+ else
+ fun_l3_n904(x)
+ end
+end
+
+def fun_l2_n423(x)
+ if (x < 1)
+ fun_l3_n715(x)
+ else
+ fun_l3_n414(x)
+ end
+end
+
+def fun_l2_n424(x)
+ if (x < 1)
+ fun_l3_n455(x)
+ else
+ fun_l3_n219(x)
+ end
+end
+
+def fun_l2_n425(x)
+ if (x < 1)
+ fun_l3_n210(x)
+ else
+ fun_l3_n160(x)
+ end
+end
+
+def fun_l2_n426(x)
+ if (x < 1)
+ fun_l3_n729(x)
+ else
+ fun_l3_n512(x)
+ end
+end
+
+def fun_l2_n427(x)
+ if (x < 1)
+ fun_l3_n159(x)
+ else
+ fun_l3_n482(x)
+ end
+end
+
+def fun_l2_n428(x)
+ if (x < 1)
+ fun_l3_n182(x)
+ else
+ fun_l3_n687(x)
+ end
+end
+
+def fun_l2_n429(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n856(x)
+ end
+end
+
+def fun_l2_n430(x)
+ if (x < 1)
+ fun_l3_n494(x)
+ else
+ fun_l3_n365(x)
+ end
+end
+
+def fun_l2_n431(x)
+ if (x < 1)
+ fun_l3_n346(x)
+ else
+ fun_l3_n82(x)
+ end
+end
+
+def fun_l2_n432(x)
+ if (x < 1)
+ fun_l3_n311(x)
+ else
+ fun_l3_n412(x)
+ end
+end
+
+def fun_l2_n433(x)
+ if (x < 1)
+ fun_l3_n824(x)
+ else
+ fun_l3_n494(x)
+ end
+end
+
+def fun_l2_n434(x)
+ if (x < 1)
+ fun_l3_n471(x)
+ else
+ fun_l3_n174(x)
+ end
+end
+
+def fun_l2_n435(x)
+ if (x < 1)
+ fun_l3_n10(x)
+ else
+ fun_l3_n319(x)
+ end
+end
+
+def fun_l2_n436(x)
+ if (x < 1)
+ fun_l3_n223(x)
+ else
+ fun_l3_n518(x)
+ end
+end
+
+def fun_l2_n437(x)
+ if (x < 1)
+ fun_l3_n497(x)
+ else
+ fun_l3_n685(x)
+ end
+end
+
+def fun_l2_n438(x)
+ if (x < 1)
+ fun_l3_n639(x)
+ else
+ fun_l3_n695(x)
+ end
+end
+
+def fun_l2_n439(x)
+ if (x < 1)
+ fun_l3_n898(x)
+ else
+ fun_l3_n114(x)
+ end
+end
+
+def fun_l2_n440(x)
+ if (x < 1)
+ fun_l3_n12(x)
+ else
+ fun_l3_n344(x)
+ end
+end
+
+def fun_l2_n441(x)
+ if (x < 1)
+ fun_l3_n556(x)
+ else
+ fun_l3_n684(x)
+ end
+end
+
+def fun_l2_n442(x)
+ if (x < 1)
+ fun_l3_n403(x)
+ else
+ fun_l3_n528(x)
+ end
+end
+
+def fun_l2_n443(x)
+ if (x < 1)
+ fun_l3_n514(x)
+ else
+ fun_l3_n943(x)
+ end
+end
+
+def fun_l2_n444(x)
+ if (x < 1)
+ fun_l3_n218(x)
+ else
+ fun_l3_n94(x)
+ end
+end
+
+def fun_l2_n445(x)
+ if (x < 1)
+ fun_l3_n0(x)
+ else
+ fun_l3_n731(x)
+ end
+end
+
+def fun_l2_n446(x)
+ if (x < 1)
+ fun_l3_n468(x)
+ else
+ fun_l3_n197(x)
+ end
+end
+
+def fun_l2_n447(x)
+ if (x < 1)
+ fun_l3_n79(x)
+ else
+ fun_l3_n900(x)
+ end
+end
+
+def fun_l2_n448(x)
+ if (x < 1)
+ fun_l3_n706(x)
+ else
+ fun_l3_n250(x)
+ end
+end
+
+def fun_l2_n449(x)
+ if (x < 1)
+ fun_l3_n607(x)
+ else
+ fun_l3_n514(x)
+ end
+end
+
+def fun_l2_n450(x)
+ if (x < 1)
+ fun_l3_n855(x)
+ else
+ fun_l3_n223(x)
+ end
+end
+
+def fun_l2_n451(x)
+ if (x < 1)
+ fun_l3_n824(x)
+ else
+ fun_l3_n426(x)
+ end
+end
+
+def fun_l2_n452(x)
+ if (x < 1)
+ fun_l3_n137(x)
+ else
+ fun_l3_n555(x)
+ end
+end
+
+def fun_l2_n453(x)
+ if (x < 1)
+ fun_l3_n553(x)
+ else
+ fun_l3_n130(x)
+ end
+end
+
+def fun_l2_n454(x)
+ if (x < 1)
+ fun_l3_n350(x)
+ else
+ fun_l3_n545(x)
+ end
+end
+
+def fun_l2_n455(x)
+ if (x < 1)
+ fun_l3_n181(x)
+ else
+ fun_l3_n950(x)
+ end
+end
+
+def fun_l2_n456(x)
+ if (x < 1)
+ fun_l3_n581(x)
+ else
+ fun_l3_n957(x)
+ end
+end
+
+def fun_l2_n457(x)
+ if (x < 1)
+ fun_l3_n688(x)
+ else
+ fun_l3_n560(x)
+ end
+end
+
+def fun_l2_n458(x)
+ if (x < 1)
+ fun_l3_n655(x)
+ else
+ fun_l3_n323(x)
+ end
+end
+
+def fun_l2_n459(x)
+ if (x < 1)
+ fun_l3_n92(x)
+ else
+ fun_l3_n796(x)
+ end
+end
+
+def fun_l2_n460(x)
+ if (x < 1)
+ fun_l3_n68(x)
+ else
+ fun_l3_n152(x)
+ end
+end
+
+def fun_l2_n461(x)
+ if (x < 1)
+ fun_l3_n153(x)
+ else
+ fun_l3_n929(x)
+ end
+end
+
+def fun_l2_n462(x)
+ if (x < 1)
+ fun_l3_n401(x)
+ else
+ fun_l3_n248(x)
+ end
+end
+
+def fun_l2_n463(x)
+ if (x < 1)
+ fun_l3_n4(x)
+ else
+ fun_l3_n906(x)
+ end
+end
+
+def fun_l2_n464(x)
+ if (x < 1)
+ fun_l3_n313(x)
+ else
+ fun_l3_n911(x)
+ end
+end
+
+def fun_l2_n465(x)
+ if (x < 1)
+ fun_l3_n490(x)
+ else
+ fun_l3_n430(x)
+ end
+end
+
+def fun_l2_n466(x)
+ if (x < 1)
+ fun_l3_n537(x)
+ else
+ fun_l3_n470(x)
+ end
+end
+
+def fun_l2_n467(x)
+ if (x < 1)
+ fun_l3_n666(x)
+ else
+ fun_l3_n695(x)
+ end
+end
+
+def fun_l2_n468(x)
+ if (x < 1)
+ fun_l3_n126(x)
+ else
+ fun_l3_n201(x)
+ end
+end
+
+def fun_l2_n469(x)
+ if (x < 1)
+ fun_l3_n111(x)
+ else
+ fun_l3_n741(x)
+ end
+end
+
+def fun_l2_n470(x)
+ if (x < 1)
+ fun_l3_n391(x)
+ else
+ fun_l3_n83(x)
+ end
+end
+
+def fun_l2_n471(x)
+ if (x < 1)
+ fun_l3_n619(x)
+ else
+ fun_l3_n425(x)
+ end
+end
+
+def fun_l2_n472(x)
+ if (x < 1)
+ fun_l3_n637(x)
+ else
+ fun_l3_n865(x)
+ end
+end
+
+def fun_l2_n473(x)
+ if (x < 1)
+ fun_l3_n182(x)
+ else
+ fun_l3_n350(x)
+ end
+end
+
+def fun_l2_n474(x)
+ if (x < 1)
+ fun_l3_n752(x)
+ else
+ fun_l3_n815(x)
+ end
+end
+
+def fun_l2_n475(x)
+ if (x < 1)
+ fun_l3_n184(x)
+ else
+ fun_l3_n683(x)
+ end
+end
+
+def fun_l2_n476(x)
+ if (x < 1)
+ fun_l3_n324(x)
+ else
+ fun_l3_n232(x)
+ end
+end
+
+def fun_l2_n477(x)
+ if (x < 1)
+ fun_l3_n588(x)
+ else
+ fun_l3_n586(x)
+ end
+end
+
+def fun_l2_n478(x)
+ if (x < 1)
+ fun_l3_n320(x)
+ else
+ fun_l3_n599(x)
+ end
+end
+
+def fun_l2_n479(x)
+ if (x < 1)
+ fun_l3_n999(x)
+ else
+ fun_l3_n678(x)
+ end
+end
+
+def fun_l2_n480(x)
+ if (x < 1)
+ fun_l3_n523(x)
+ else
+ fun_l3_n637(x)
+ end
+end
+
+def fun_l2_n481(x)
+ if (x < 1)
+ fun_l3_n291(x)
+ else
+ fun_l3_n347(x)
+ end
+end
+
+def fun_l2_n482(x)
+ if (x < 1)
+ fun_l3_n873(x)
+ else
+ fun_l3_n435(x)
+ end
+end
+
+def fun_l2_n483(x)
+ if (x < 1)
+ fun_l3_n718(x)
+ else
+ fun_l3_n903(x)
+ end
+end
+
+def fun_l2_n484(x)
+ if (x < 1)
+ fun_l3_n188(x)
+ else
+ fun_l3_n751(x)
+ end
+end
+
+def fun_l2_n485(x)
+ if (x < 1)
+ fun_l3_n501(x)
+ else
+ fun_l3_n235(x)
+ end
+end
+
+def fun_l2_n486(x)
+ if (x < 1)
+ fun_l3_n578(x)
+ else
+ fun_l3_n224(x)
+ end
+end
+
+def fun_l2_n487(x)
+ if (x < 1)
+ fun_l3_n757(x)
+ else
+ fun_l3_n145(x)
+ end
+end
+
+def fun_l2_n488(x)
+ if (x < 1)
+ fun_l3_n17(x)
+ else
+ fun_l3_n727(x)
+ end
+end
+
+def fun_l2_n489(x)
+ if (x < 1)
+ fun_l3_n699(x)
+ else
+ fun_l3_n102(x)
+ end
+end
+
+def fun_l2_n490(x)
+ if (x < 1)
+ fun_l3_n518(x)
+ else
+ fun_l3_n15(x)
+ end
+end
+
+def fun_l2_n491(x)
+ if (x < 1)
+ fun_l3_n889(x)
+ else
+ fun_l3_n798(x)
+ end
+end
+
+def fun_l2_n492(x)
+ if (x < 1)
+ fun_l3_n715(x)
+ else
+ fun_l3_n27(x)
+ end
+end
+
+def fun_l2_n493(x)
+ if (x < 1)
+ fun_l3_n237(x)
+ else
+ fun_l3_n130(x)
+ end
+end
+
+def fun_l2_n494(x)
+ if (x < 1)
+ fun_l3_n99(x)
+ else
+ fun_l3_n223(x)
+ end
+end
+
+def fun_l2_n495(x)
+ if (x < 1)
+ fun_l3_n65(x)
+ else
+ fun_l3_n811(x)
+ end
+end
+
+def fun_l2_n496(x)
+ if (x < 1)
+ fun_l3_n457(x)
+ else
+ fun_l3_n527(x)
+ end
+end
+
+def fun_l2_n497(x)
+ if (x < 1)
+ fun_l3_n312(x)
+ else
+ fun_l3_n902(x)
+ end
+end
+
+def fun_l2_n498(x)
+ if (x < 1)
+ fun_l3_n63(x)
+ else
+ fun_l3_n948(x)
+ end
+end
+
+def fun_l2_n499(x)
+ if (x < 1)
+ fun_l3_n652(x)
+ else
+ fun_l3_n752(x)
+ end
+end
+
+def fun_l2_n500(x)
+ if (x < 1)
+ fun_l3_n583(x)
+ else
+ fun_l3_n427(x)
+ end
+end
+
+def fun_l2_n501(x)
+ if (x < 1)
+ fun_l3_n536(x)
+ else
+ fun_l3_n671(x)
+ end
+end
+
+def fun_l2_n502(x)
+ if (x < 1)
+ fun_l3_n122(x)
+ else
+ fun_l3_n170(x)
+ end
+end
+
+def fun_l2_n503(x)
+ if (x < 1)
+ fun_l3_n280(x)
+ else
+ fun_l3_n390(x)
+ end
+end
+
+def fun_l2_n504(x)
+ if (x < 1)
+ fun_l3_n427(x)
+ else
+ fun_l3_n267(x)
+ end
+end
+
+def fun_l2_n505(x)
+ if (x < 1)
+ fun_l3_n241(x)
+ else
+ fun_l3_n345(x)
+ end
+end
+
+def fun_l2_n506(x)
+ if (x < 1)
+ fun_l3_n960(x)
+ else
+ fun_l3_n537(x)
+ end
+end
+
+def fun_l2_n507(x)
+ if (x < 1)
+ fun_l3_n947(x)
+ else
+ fun_l3_n3(x)
+ end
+end
+
+def fun_l2_n508(x)
+ if (x < 1)
+ fun_l3_n974(x)
+ else
+ fun_l3_n597(x)
+ end
+end
+
+def fun_l2_n509(x)
+ if (x < 1)
+ fun_l3_n978(x)
+ else
+ fun_l3_n70(x)
+ end
+end
+
+def fun_l2_n510(x)
+ if (x < 1)
+ fun_l3_n855(x)
+ else
+ fun_l3_n259(x)
+ end
+end
+
+def fun_l2_n511(x)
+ if (x < 1)
+ fun_l3_n987(x)
+ else
+ fun_l3_n182(x)
+ end
+end
+
+def fun_l2_n512(x)
+ if (x < 1)
+ fun_l3_n787(x)
+ else
+ fun_l3_n656(x)
+ end
+end
+
+def fun_l2_n513(x)
+ if (x < 1)
+ fun_l3_n348(x)
+ else
+ fun_l3_n242(x)
+ end
+end
+
+def fun_l2_n514(x)
+ if (x < 1)
+ fun_l3_n530(x)
+ else
+ fun_l3_n718(x)
+ end
+end
+
+def fun_l2_n515(x)
+ if (x < 1)
+ fun_l3_n840(x)
+ else
+ fun_l3_n302(x)
+ end
+end
+
+def fun_l2_n516(x)
+ if (x < 1)
+ fun_l3_n678(x)
+ else
+ fun_l3_n732(x)
+ end
+end
+
+def fun_l2_n517(x)
+ if (x < 1)
+ fun_l3_n160(x)
+ else
+ fun_l3_n344(x)
+ end
+end
+
+def fun_l2_n518(x)
+ if (x < 1)
+ fun_l3_n518(x)
+ else
+ fun_l3_n830(x)
+ end
+end
+
+def fun_l2_n519(x)
+ if (x < 1)
+ fun_l3_n595(x)
+ else
+ fun_l3_n95(x)
+ end
+end
+
+def fun_l2_n520(x)
+ if (x < 1)
+ fun_l3_n939(x)
+ else
+ fun_l3_n954(x)
+ end
+end
+
+def fun_l2_n521(x)
+ if (x < 1)
+ fun_l3_n931(x)
+ else
+ fun_l3_n686(x)
+ end
+end
+
+def fun_l2_n522(x)
+ if (x < 1)
+ fun_l3_n117(x)
+ else
+ fun_l3_n501(x)
+ end
+end
+
+def fun_l2_n523(x)
+ if (x < 1)
+ fun_l3_n727(x)
+ else
+ fun_l3_n712(x)
+ end
+end
+
+def fun_l2_n524(x)
+ if (x < 1)
+ fun_l3_n152(x)
+ else
+ fun_l3_n453(x)
+ end
+end
+
+def fun_l2_n525(x)
+ if (x < 1)
+ fun_l3_n375(x)
+ else
+ fun_l3_n186(x)
+ end
+end
+
+def fun_l2_n526(x)
+ if (x < 1)
+ fun_l3_n835(x)
+ else
+ fun_l3_n465(x)
+ end
+end
+
+def fun_l2_n527(x)
+ if (x < 1)
+ fun_l3_n411(x)
+ else
+ fun_l3_n208(x)
+ end
+end
+
+def fun_l2_n528(x)
+ if (x < 1)
+ fun_l3_n696(x)
+ else
+ fun_l3_n537(x)
+ end
+end
+
+def fun_l2_n529(x)
+ if (x < 1)
+ fun_l3_n606(x)
+ else
+ fun_l3_n682(x)
+ end
+end
+
+def fun_l2_n530(x)
+ if (x < 1)
+ fun_l3_n920(x)
+ else
+ fun_l3_n592(x)
+ end
+end
+
+def fun_l2_n531(x)
+ if (x < 1)
+ fun_l3_n201(x)
+ else
+ fun_l3_n27(x)
+ end
+end
+
+def fun_l2_n532(x)
+ if (x < 1)
+ fun_l3_n643(x)
+ else
+ fun_l3_n642(x)
+ end
+end
+
+def fun_l2_n533(x)
+ if (x < 1)
+ fun_l3_n92(x)
+ else
+ fun_l3_n576(x)
+ end
+end
+
+def fun_l2_n534(x)
+ if (x < 1)
+ fun_l3_n135(x)
+ else
+ fun_l3_n738(x)
+ end
+end
+
+def fun_l2_n535(x)
+ if (x < 1)
+ fun_l3_n706(x)
+ else
+ fun_l3_n810(x)
+ end
+end
+
+def fun_l2_n536(x)
+ if (x < 1)
+ fun_l3_n922(x)
+ else
+ fun_l3_n456(x)
+ end
+end
+
+def fun_l2_n537(x)
+ if (x < 1)
+ fun_l3_n511(x)
+ else
+ fun_l3_n279(x)
+ end
+end
+
+def fun_l2_n538(x)
+ if (x < 1)
+ fun_l3_n541(x)
+ else
+ fun_l3_n826(x)
+ end
+end
+
+def fun_l2_n539(x)
+ if (x < 1)
+ fun_l3_n7(x)
+ else
+ fun_l3_n362(x)
+ end
+end
+
+def fun_l2_n540(x)
+ if (x < 1)
+ fun_l3_n132(x)
+ else
+ fun_l3_n819(x)
+ end
+end
+
+def fun_l2_n541(x)
+ if (x < 1)
+ fun_l3_n600(x)
+ else
+ fun_l3_n155(x)
+ end
+end
+
+def fun_l2_n542(x)
+ if (x < 1)
+ fun_l3_n930(x)
+ else
+ fun_l3_n827(x)
+ end
+end
+
+def fun_l2_n543(x)
+ if (x < 1)
+ fun_l3_n974(x)
+ else
+ fun_l3_n957(x)
+ end
+end
+
+def fun_l2_n544(x)
+ if (x < 1)
+ fun_l3_n912(x)
+ else
+ fun_l3_n503(x)
+ end
+end
+
+def fun_l2_n545(x)
+ if (x < 1)
+ fun_l3_n605(x)
+ else
+ fun_l3_n966(x)
+ end
+end
+
+def fun_l2_n546(x)
+ if (x < 1)
+ fun_l3_n523(x)
+ else
+ fun_l3_n105(x)
+ end
+end
+
+def fun_l2_n547(x)
+ if (x < 1)
+ fun_l3_n352(x)
+ else
+ fun_l3_n762(x)
+ end
+end
+
+def fun_l2_n548(x)
+ if (x < 1)
+ fun_l3_n65(x)
+ else
+ fun_l3_n714(x)
+ end
+end
+
+def fun_l2_n549(x)
+ if (x < 1)
+ fun_l3_n665(x)
+ else
+ fun_l3_n799(x)
+ end
+end
+
+def fun_l2_n550(x)
+ if (x < 1)
+ fun_l3_n624(x)
+ else
+ fun_l3_n131(x)
+ end
+end
+
+def fun_l2_n551(x)
+ if (x < 1)
+ fun_l3_n53(x)
+ else
+ fun_l3_n377(x)
+ end
+end
+
+def fun_l2_n552(x)
+ if (x < 1)
+ fun_l3_n377(x)
+ else
+ fun_l3_n532(x)
+ end
+end
+
+def fun_l2_n553(x)
+ if (x < 1)
+ fun_l3_n302(x)
+ else
+ fun_l3_n593(x)
+ end
+end
+
+def fun_l2_n554(x)
+ if (x < 1)
+ fun_l3_n573(x)
+ else
+ fun_l3_n727(x)
+ end
+end
+
+def fun_l2_n555(x)
+ if (x < 1)
+ fun_l3_n575(x)
+ else
+ fun_l3_n838(x)
+ end
+end
+
+def fun_l2_n556(x)
+ if (x < 1)
+ fun_l3_n92(x)
+ else
+ fun_l3_n137(x)
+ end
+end
+
+def fun_l2_n557(x)
+ if (x < 1)
+ fun_l3_n921(x)
+ else
+ fun_l3_n683(x)
+ end
+end
+
+def fun_l2_n558(x)
+ if (x < 1)
+ fun_l3_n987(x)
+ else
+ fun_l3_n646(x)
+ end
+end
+
+def fun_l2_n559(x)
+ if (x < 1)
+ fun_l3_n574(x)
+ else
+ fun_l3_n493(x)
+ end
+end
+
+def fun_l2_n560(x)
+ if (x < 1)
+ fun_l3_n950(x)
+ else
+ fun_l3_n139(x)
+ end
+end
+
+def fun_l2_n561(x)
+ if (x < 1)
+ fun_l3_n276(x)
+ else
+ fun_l3_n491(x)
+ end
+end
+
+def fun_l2_n562(x)
+ if (x < 1)
+ fun_l3_n226(x)
+ else
+ fun_l3_n840(x)
+ end
+end
+
+def fun_l2_n563(x)
+ if (x < 1)
+ fun_l3_n473(x)
+ else
+ fun_l3_n907(x)
+ end
+end
+
+def fun_l2_n564(x)
+ if (x < 1)
+ fun_l3_n695(x)
+ else
+ fun_l3_n951(x)
+ end
+end
+
+def fun_l2_n565(x)
+ if (x < 1)
+ fun_l3_n415(x)
+ else
+ fun_l3_n12(x)
+ end
+end
+
+def fun_l2_n566(x)
+ if (x < 1)
+ fun_l3_n32(x)
+ else
+ fun_l3_n759(x)
+ end
+end
+
+def fun_l2_n567(x)
+ if (x < 1)
+ fun_l3_n876(x)
+ else
+ fun_l3_n297(x)
+ end
+end
+
+def fun_l2_n568(x)
+ if (x < 1)
+ fun_l3_n520(x)
+ else
+ fun_l3_n713(x)
+ end
+end
+
+def fun_l2_n569(x)
+ if (x < 1)
+ fun_l3_n819(x)
+ else
+ fun_l3_n505(x)
+ end
+end
+
+def fun_l2_n570(x)
+ if (x < 1)
+ fun_l3_n661(x)
+ else
+ fun_l3_n447(x)
+ end
+end
+
+def fun_l2_n571(x)
+ if (x < 1)
+ fun_l3_n538(x)
+ else
+ fun_l3_n532(x)
+ end
+end
+
+def fun_l2_n572(x)
+ if (x < 1)
+ fun_l3_n584(x)
+ else
+ fun_l3_n304(x)
+ end
+end
+
+def fun_l2_n573(x)
+ if (x < 1)
+ fun_l3_n76(x)
+ else
+ fun_l3_n512(x)
+ end
+end
+
+def fun_l2_n574(x)
+ if (x < 1)
+ fun_l3_n22(x)
+ else
+ fun_l3_n328(x)
+ end
+end
+
+def fun_l2_n575(x)
+ if (x < 1)
+ fun_l3_n397(x)
+ else
+ fun_l3_n640(x)
+ end
+end
+
+def fun_l2_n576(x)
+ if (x < 1)
+ fun_l3_n227(x)
+ else
+ fun_l3_n236(x)
+ end
+end
+
+def fun_l2_n577(x)
+ if (x < 1)
+ fun_l3_n743(x)
+ else
+ fun_l3_n974(x)
+ end
+end
+
+def fun_l2_n578(x)
+ if (x < 1)
+ fun_l3_n970(x)
+ else
+ fun_l3_n229(x)
+ end
+end
+
+def fun_l2_n579(x)
+ if (x < 1)
+ fun_l3_n401(x)
+ else
+ fun_l3_n672(x)
+ end
+end
+
+def fun_l2_n580(x)
+ if (x < 1)
+ fun_l3_n837(x)
+ else
+ fun_l3_n804(x)
+ end
+end
+
+def fun_l2_n581(x)
+ if (x < 1)
+ fun_l3_n526(x)
+ else
+ fun_l3_n763(x)
+ end
+end
+
+def fun_l2_n582(x)
+ if (x < 1)
+ fun_l3_n2(x)
+ else
+ fun_l3_n692(x)
+ end
+end
+
+def fun_l2_n583(x)
+ if (x < 1)
+ fun_l3_n561(x)
+ else
+ fun_l3_n394(x)
+ end
+end
+
+def fun_l2_n584(x)
+ if (x < 1)
+ fun_l3_n60(x)
+ else
+ fun_l3_n682(x)
+ end
+end
+
+def fun_l2_n585(x)
+ if (x < 1)
+ fun_l3_n646(x)
+ else
+ fun_l3_n776(x)
+ end
+end
+
+def fun_l2_n586(x)
+ if (x < 1)
+ fun_l3_n466(x)
+ else
+ fun_l3_n91(x)
+ end
+end
+
+def fun_l2_n587(x)
+ if (x < 1)
+ fun_l3_n294(x)
+ else
+ fun_l3_n813(x)
+ end
+end
+
+def fun_l2_n588(x)
+ if (x < 1)
+ fun_l3_n958(x)
+ else
+ fun_l3_n64(x)
+ end
+end
+
+def fun_l2_n589(x)
+ if (x < 1)
+ fun_l3_n703(x)
+ else
+ fun_l3_n937(x)
+ end
+end
+
+def fun_l2_n590(x)
+ if (x < 1)
+ fun_l3_n1(x)
+ else
+ fun_l3_n970(x)
+ end
+end
+
+def fun_l2_n591(x)
+ if (x < 1)
+ fun_l3_n566(x)
+ else
+ fun_l3_n750(x)
+ end
+end
+
+def fun_l2_n592(x)
+ if (x < 1)
+ fun_l3_n905(x)
+ else
+ fun_l3_n840(x)
+ end
+end
+
+def fun_l2_n593(x)
+ if (x < 1)
+ fun_l3_n23(x)
+ else
+ fun_l3_n862(x)
+ end
+end
+
+def fun_l2_n594(x)
+ if (x < 1)
+ fun_l3_n739(x)
+ else
+ fun_l3_n4(x)
+ end
+end
+
+def fun_l2_n595(x)
+ if (x < 1)
+ fun_l3_n818(x)
+ else
+ fun_l3_n117(x)
+ end
+end
+
+def fun_l2_n596(x)
+ if (x < 1)
+ fun_l3_n891(x)
+ else
+ fun_l3_n599(x)
+ end
+end
+
+def fun_l2_n597(x)
+ if (x < 1)
+ fun_l3_n731(x)
+ else
+ fun_l3_n960(x)
+ end
+end
+
+def fun_l2_n598(x)
+ if (x < 1)
+ fun_l3_n323(x)
+ else
+ fun_l3_n811(x)
+ end
+end
+
+def fun_l2_n599(x)
+ if (x < 1)
+ fun_l3_n299(x)
+ else
+ fun_l3_n188(x)
+ end
+end
+
+def fun_l2_n600(x)
+ if (x < 1)
+ fun_l3_n129(x)
+ else
+ fun_l3_n730(x)
+ end
+end
+
+def fun_l2_n601(x)
+ if (x < 1)
+ fun_l3_n412(x)
+ else
+ fun_l3_n353(x)
+ end
+end
+
+def fun_l2_n602(x)
+ if (x < 1)
+ fun_l3_n658(x)
+ else
+ fun_l3_n774(x)
+ end
+end
+
+def fun_l2_n603(x)
+ if (x < 1)
+ fun_l3_n378(x)
+ else
+ fun_l3_n722(x)
+ end
+end
+
+def fun_l2_n604(x)
+ if (x < 1)
+ fun_l3_n482(x)
+ else
+ fun_l3_n949(x)
+ end
+end
+
+def fun_l2_n605(x)
+ if (x < 1)
+ fun_l3_n996(x)
+ else
+ fun_l3_n169(x)
+ end
+end
+
+def fun_l2_n606(x)
+ if (x < 1)
+ fun_l3_n653(x)
+ else
+ fun_l3_n966(x)
+ end
+end
+
+def fun_l2_n607(x)
+ if (x < 1)
+ fun_l3_n179(x)
+ else
+ fun_l3_n113(x)
+ end
+end
+
+def fun_l2_n608(x)
+ if (x < 1)
+ fun_l3_n157(x)
+ else
+ fun_l3_n692(x)
+ end
+end
+
+def fun_l2_n609(x)
+ if (x < 1)
+ fun_l3_n648(x)
+ else
+ fun_l3_n318(x)
+ end
+end
+
+def fun_l2_n610(x)
+ if (x < 1)
+ fun_l3_n979(x)
+ else
+ fun_l3_n642(x)
+ end
+end
+
+def fun_l2_n611(x)
+ if (x < 1)
+ fun_l3_n909(x)
+ else
+ fun_l3_n986(x)
+ end
+end
+
+def fun_l2_n612(x)
+ if (x < 1)
+ fun_l3_n387(x)
+ else
+ fun_l3_n586(x)
+ end
+end
+
+def fun_l2_n613(x)
+ if (x < 1)
+ fun_l3_n99(x)
+ else
+ fun_l3_n690(x)
+ end
+end
+
+def fun_l2_n614(x)
+ if (x < 1)
+ fun_l3_n485(x)
+ else
+ fun_l3_n733(x)
+ end
+end
+
+def fun_l2_n615(x)
+ if (x < 1)
+ fun_l3_n735(x)
+ else
+ fun_l3_n827(x)
+ end
+end
+
+def fun_l2_n616(x)
+ if (x < 1)
+ fun_l3_n496(x)
+ else
+ fun_l3_n912(x)
+ end
+end
+
+def fun_l2_n617(x)
+ if (x < 1)
+ fun_l3_n363(x)
+ else
+ fun_l3_n845(x)
+ end
+end
+
+def fun_l2_n618(x)
+ if (x < 1)
+ fun_l3_n891(x)
+ else
+ fun_l3_n964(x)
+ end
+end
+
+def fun_l2_n619(x)
+ if (x < 1)
+ fun_l3_n266(x)
+ else
+ fun_l3_n189(x)
+ end
+end
+
+def fun_l2_n620(x)
+ if (x < 1)
+ fun_l3_n906(x)
+ else
+ fun_l3_n218(x)
+ end
+end
+
+def fun_l2_n621(x)
+ if (x < 1)
+ fun_l3_n145(x)
+ else
+ fun_l3_n279(x)
+ end
+end
+
+def fun_l2_n622(x)
+ if (x < 1)
+ fun_l3_n797(x)
+ else
+ fun_l3_n328(x)
+ end
+end
+
+def fun_l2_n623(x)
+ if (x < 1)
+ fun_l3_n910(x)
+ else
+ fun_l3_n250(x)
+ end
+end
+
+def fun_l2_n624(x)
+ if (x < 1)
+ fun_l3_n111(x)
+ else
+ fun_l3_n884(x)
+ end
+end
+
+def fun_l2_n625(x)
+ if (x < 1)
+ fun_l3_n852(x)
+ else
+ fun_l3_n985(x)
+ end
+end
+
+def fun_l2_n626(x)
+ if (x < 1)
+ fun_l3_n163(x)
+ else
+ fun_l3_n885(x)
+ end
+end
+
+def fun_l2_n627(x)
+ if (x < 1)
+ fun_l3_n338(x)
+ else
+ fun_l3_n562(x)
+ end
+end
+
+def fun_l2_n628(x)
+ if (x < 1)
+ fun_l3_n300(x)
+ else
+ fun_l3_n245(x)
+ end
+end
+
+def fun_l2_n629(x)
+ if (x < 1)
+ fun_l3_n747(x)
+ else
+ fun_l3_n123(x)
+ end
+end
+
+def fun_l2_n630(x)
+ if (x < 1)
+ fun_l3_n42(x)
+ else
+ fun_l3_n46(x)
+ end
+end
+
+def fun_l2_n631(x)
+ if (x < 1)
+ fun_l3_n256(x)
+ else
+ fun_l3_n960(x)
+ end
+end
+
+def fun_l2_n632(x)
+ if (x < 1)
+ fun_l3_n679(x)
+ else
+ fun_l3_n393(x)
+ end
+end
+
+def fun_l2_n633(x)
+ if (x < 1)
+ fun_l3_n286(x)
+ else
+ fun_l3_n147(x)
+ end
+end
+
+def fun_l2_n634(x)
+ if (x < 1)
+ fun_l3_n62(x)
+ else
+ fun_l3_n994(x)
+ end
+end
+
+def fun_l2_n635(x)
+ if (x < 1)
+ fun_l3_n479(x)
+ else
+ fun_l3_n502(x)
+ end
+end
+
+def fun_l2_n636(x)
+ if (x < 1)
+ fun_l3_n504(x)
+ else
+ fun_l3_n557(x)
+ end
+end
+
+def fun_l2_n637(x)
+ if (x < 1)
+ fun_l3_n716(x)
+ else
+ fun_l3_n763(x)
+ end
+end
+
+def fun_l2_n638(x)
+ if (x < 1)
+ fun_l3_n972(x)
+ else
+ fun_l3_n391(x)
+ end
+end
+
+def fun_l2_n639(x)
+ if (x < 1)
+ fun_l3_n842(x)
+ else
+ fun_l3_n740(x)
+ end
+end
+
+def fun_l2_n640(x)
+ if (x < 1)
+ fun_l3_n854(x)
+ else
+ fun_l3_n52(x)
+ end
+end
+
+def fun_l2_n641(x)
+ if (x < 1)
+ fun_l3_n321(x)
+ else
+ fun_l3_n109(x)
+ end
+end
+
+def fun_l2_n642(x)
+ if (x < 1)
+ fun_l3_n868(x)
+ else
+ fun_l3_n926(x)
+ end
+end
+
+def fun_l2_n643(x)
+ if (x < 1)
+ fun_l3_n864(x)
+ else
+ fun_l3_n98(x)
+ end
+end
+
+def fun_l2_n644(x)
+ if (x < 1)
+ fun_l3_n373(x)
+ else
+ fun_l3_n105(x)
+ end
+end
+
+def fun_l2_n645(x)
+ if (x < 1)
+ fun_l3_n293(x)
+ else
+ fun_l3_n846(x)
+ end
+end
+
+def fun_l2_n646(x)
+ if (x < 1)
+ fun_l3_n24(x)
+ else
+ fun_l3_n83(x)
+ end
+end
+
+def fun_l2_n647(x)
+ if (x < 1)
+ fun_l3_n431(x)
+ else
+ fun_l3_n772(x)
+ end
+end
+
+def fun_l2_n648(x)
+ if (x < 1)
+ fun_l3_n667(x)
+ else
+ fun_l3_n108(x)
+ end
+end
+
+def fun_l2_n649(x)
+ if (x < 1)
+ fun_l3_n93(x)
+ else
+ fun_l3_n394(x)
+ end
+end
+
+def fun_l2_n650(x)
+ if (x < 1)
+ fun_l3_n176(x)
+ else
+ fun_l3_n315(x)
+ end
+end
+
+def fun_l2_n651(x)
+ if (x < 1)
+ fun_l3_n684(x)
+ else
+ fun_l3_n635(x)
+ end
+end
+
+def fun_l2_n652(x)
+ if (x < 1)
+ fun_l3_n554(x)
+ else
+ fun_l3_n88(x)
+ end
+end
+
+def fun_l2_n653(x)
+ if (x < 1)
+ fun_l3_n165(x)
+ else
+ fun_l3_n962(x)
+ end
+end
+
+def fun_l2_n654(x)
+ if (x < 1)
+ fun_l3_n631(x)
+ else
+ fun_l3_n80(x)
+ end
+end
+
+def fun_l2_n655(x)
+ if (x < 1)
+ fun_l3_n529(x)
+ else
+ fun_l3_n711(x)
+ end
+end
+
+def fun_l2_n656(x)
+ if (x < 1)
+ fun_l3_n809(x)
+ else
+ fun_l3_n44(x)
+ end
+end
+
+def fun_l2_n657(x)
+ if (x < 1)
+ fun_l3_n226(x)
+ else
+ fun_l3_n939(x)
+ end
+end
+
+def fun_l2_n658(x)
+ if (x < 1)
+ fun_l3_n355(x)
+ else
+ fun_l3_n750(x)
+ end
+end
+
+def fun_l2_n659(x)
+ if (x < 1)
+ fun_l3_n111(x)
+ else
+ fun_l3_n883(x)
+ end
+end
+
+def fun_l2_n660(x)
+ if (x < 1)
+ fun_l3_n22(x)
+ else
+ fun_l3_n544(x)
+ end
+end
+
+def fun_l2_n661(x)
+ if (x < 1)
+ fun_l3_n334(x)
+ else
+ fun_l3_n58(x)
+ end
+end
+
+def fun_l2_n662(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n647(x)
+ end
+end
+
+def fun_l2_n663(x)
+ if (x < 1)
+ fun_l3_n886(x)
+ else
+ fun_l3_n142(x)
+ end
+end
+
+def fun_l2_n664(x)
+ if (x < 1)
+ fun_l3_n713(x)
+ else
+ fun_l3_n710(x)
+ end
+end
+
+def fun_l2_n665(x)
+ if (x < 1)
+ fun_l3_n657(x)
+ else
+ fun_l3_n24(x)
+ end
+end
+
+def fun_l2_n666(x)
+ if (x < 1)
+ fun_l3_n993(x)
+ else
+ fun_l3_n741(x)
+ end
+end
+
+def fun_l2_n667(x)
+ if (x < 1)
+ fun_l3_n265(x)
+ else
+ fun_l3_n143(x)
+ end
+end
+
+def fun_l2_n668(x)
+ if (x < 1)
+ fun_l3_n725(x)
+ else
+ fun_l3_n272(x)
+ end
+end
+
+def fun_l2_n669(x)
+ if (x < 1)
+ fun_l3_n171(x)
+ else
+ fun_l3_n95(x)
+ end
+end
+
+def fun_l2_n670(x)
+ if (x < 1)
+ fun_l3_n409(x)
+ else
+ fun_l3_n774(x)
+ end
+end
+
+def fun_l2_n671(x)
+ if (x < 1)
+ fun_l3_n566(x)
+ else
+ fun_l3_n251(x)
+ end
+end
+
+def fun_l2_n672(x)
+ if (x < 1)
+ fun_l3_n914(x)
+ else
+ fun_l3_n716(x)
+ end
+end
+
+def fun_l2_n673(x)
+ if (x < 1)
+ fun_l3_n889(x)
+ else
+ fun_l3_n339(x)
+ end
+end
+
+def fun_l2_n674(x)
+ if (x < 1)
+ fun_l3_n808(x)
+ else
+ fun_l3_n858(x)
+ end
+end
+
+def fun_l2_n675(x)
+ if (x < 1)
+ fun_l3_n895(x)
+ else
+ fun_l3_n180(x)
+ end
+end
+
+def fun_l2_n676(x)
+ if (x < 1)
+ fun_l3_n674(x)
+ else
+ fun_l3_n183(x)
+ end
+end
+
+def fun_l2_n677(x)
+ if (x < 1)
+ fun_l3_n934(x)
+ else
+ fun_l3_n292(x)
+ end
+end
+
+def fun_l2_n678(x)
+ if (x < 1)
+ fun_l3_n302(x)
+ else
+ fun_l3_n511(x)
+ end
+end
+
+def fun_l2_n679(x)
+ if (x < 1)
+ fun_l3_n847(x)
+ else
+ fun_l3_n70(x)
+ end
+end
+
+def fun_l2_n680(x)
+ if (x < 1)
+ fun_l3_n200(x)
+ else
+ fun_l3_n436(x)
+ end
+end
+
+def fun_l2_n681(x)
+ if (x < 1)
+ fun_l3_n44(x)
+ else
+ fun_l3_n145(x)
+ end
+end
+
+def fun_l2_n682(x)
+ if (x < 1)
+ fun_l3_n929(x)
+ else
+ fun_l3_n605(x)
+ end
+end
+
+def fun_l2_n683(x)
+ if (x < 1)
+ fun_l3_n990(x)
+ else
+ fun_l3_n641(x)
+ end
+end
+
+def fun_l2_n684(x)
+ if (x < 1)
+ fun_l3_n679(x)
+ else
+ fun_l3_n976(x)
+ end
+end
+
+def fun_l2_n685(x)
+ if (x < 1)
+ fun_l3_n405(x)
+ else
+ fun_l3_n658(x)
+ end
+end
+
+def fun_l2_n686(x)
+ if (x < 1)
+ fun_l3_n685(x)
+ else
+ fun_l3_n379(x)
+ end
+end
+
+def fun_l2_n687(x)
+ if (x < 1)
+ fun_l3_n279(x)
+ else
+ fun_l3_n415(x)
+ end
+end
+
+def fun_l2_n688(x)
+ if (x < 1)
+ fun_l3_n234(x)
+ else
+ fun_l3_n634(x)
+ end
+end
+
+def fun_l2_n689(x)
+ if (x < 1)
+ fun_l3_n119(x)
+ else
+ fun_l3_n234(x)
+ end
+end
+
+def fun_l2_n690(x)
+ if (x < 1)
+ fun_l3_n213(x)
+ else
+ fun_l3_n102(x)
+ end
+end
+
+def fun_l2_n691(x)
+ if (x < 1)
+ fun_l3_n744(x)
+ else
+ fun_l3_n31(x)
+ end
+end
+
+def fun_l2_n692(x)
+ if (x < 1)
+ fun_l3_n29(x)
+ else
+ fun_l3_n238(x)
+ end
+end
+
+def fun_l2_n693(x)
+ if (x < 1)
+ fun_l3_n323(x)
+ else
+ fun_l3_n388(x)
+ end
+end
+
+def fun_l2_n694(x)
+ if (x < 1)
+ fun_l3_n70(x)
+ else
+ fun_l3_n356(x)
+ end
+end
+
+def fun_l2_n695(x)
+ if (x < 1)
+ fun_l3_n589(x)
+ else
+ fun_l3_n949(x)
+ end
+end
+
+def fun_l2_n696(x)
+ if (x < 1)
+ fun_l3_n328(x)
+ else
+ fun_l3_n472(x)
+ end
+end
+
+def fun_l2_n697(x)
+ if (x < 1)
+ fun_l3_n705(x)
+ else
+ fun_l3_n709(x)
+ end
+end
+
+def fun_l2_n698(x)
+ if (x < 1)
+ fun_l3_n817(x)
+ else
+ fun_l3_n927(x)
+ end
+end
+
+def fun_l2_n699(x)
+ if (x < 1)
+ fun_l3_n916(x)
+ else
+ fun_l3_n66(x)
+ end
+end
+
+def fun_l2_n700(x)
+ if (x < 1)
+ fun_l3_n461(x)
+ else
+ fun_l3_n648(x)
+ end
+end
+
+def fun_l2_n701(x)
+ if (x < 1)
+ fun_l3_n71(x)
+ else
+ fun_l3_n218(x)
+ end
+end
+
+def fun_l2_n702(x)
+ if (x < 1)
+ fun_l3_n490(x)
+ else
+ fun_l3_n706(x)
+ end
+end
+
+def fun_l2_n703(x)
+ if (x < 1)
+ fun_l3_n480(x)
+ else
+ fun_l3_n665(x)
+ end
+end
+
+def fun_l2_n704(x)
+ if (x < 1)
+ fun_l3_n965(x)
+ else
+ fun_l3_n394(x)
+ end
+end
+
+def fun_l2_n705(x)
+ if (x < 1)
+ fun_l3_n65(x)
+ else
+ fun_l3_n761(x)
+ end
+end
+
+def fun_l2_n706(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n50(x)
+ end
+end
+
+def fun_l2_n707(x)
+ if (x < 1)
+ fun_l3_n665(x)
+ else
+ fun_l3_n589(x)
+ end
+end
+
+def fun_l2_n708(x)
+ if (x < 1)
+ fun_l3_n331(x)
+ else
+ fun_l3_n299(x)
+ end
+end
+
+def fun_l2_n709(x)
+ if (x < 1)
+ fun_l3_n656(x)
+ else
+ fun_l3_n966(x)
+ end
+end
+
+def fun_l2_n710(x)
+ if (x < 1)
+ fun_l3_n610(x)
+ else
+ fun_l3_n767(x)
+ end
+end
+
+def fun_l2_n711(x)
+ if (x < 1)
+ fun_l3_n281(x)
+ else
+ fun_l3_n942(x)
+ end
+end
+
+def fun_l2_n712(x)
+ if (x < 1)
+ fun_l3_n474(x)
+ else
+ fun_l3_n373(x)
+ end
+end
+
+def fun_l2_n713(x)
+ if (x < 1)
+ fun_l3_n668(x)
+ else
+ fun_l3_n881(x)
+ end
+end
+
+def fun_l2_n714(x)
+ if (x < 1)
+ fun_l3_n112(x)
+ else
+ fun_l3_n914(x)
+ end
+end
+
+def fun_l2_n715(x)
+ if (x < 1)
+ fun_l3_n276(x)
+ else
+ fun_l3_n946(x)
+ end
+end
+
+def fun_l2_n716(x)
+ if (x < 1)
+ fun_l3_n340(x)
+ else
+ fun_l3_n474(x)
+ end
+end
+
+def fun_l2_n717(x)
+ if (x < 1)
+ fun_l3_n179(x)
+ else
+ fun_l3_n740(x)
+ end
+end
+
+def fun_l2_n718(x)
+ if (x < 1)
+ fun_l3_n830(x)
+ else
+ fun_l3_n139(x)
+ end
+end
+
+def fun_l2_n719(x)
+ if (x < 1)
+ fun_l3_n945(x)
+ else
+ fun_l3_n98(x)
+ end
+end
+
+def fun_l2_n720(x)
+ if (x < 1)
+ fun_l3_n912(x)
+ else
+ fun_l3_n457(x)
+ end
+end
+
+def fun_l2_n721(x)
+ if (x < 1)
+ fun_l3_n4(x)
+ else
+ fun_l3_n798(x)
+ end
+end
+
+def fun_l2_n722(x)
+ if (x < 1)
+ fun_l3_n438(x)
+ else
+ fun_l3_n677(x)
+ end
+end
+
+def fun_l2_n723(x)
+ if (x < 1)
+ fun_l3_n447(x)
+ else
+ fun_l3_n418(x)
+ end
+end
+
+def fun_l2_n724(x)
+ if (x < 1)
+ fun_l3_n936(x)
+ else
+ fun_l3_n572(x)
+ end
+end
+
+def fun_l2_n725(x)
+ if (x < 1)
+ fun_l3_n856(x)
+ else
+ fun_l3_n429(x)
+ end
+end
+
+def fun_l2_n726(x)
+ if (x < 1)
+ fun_l3_n747(x)
+ else
+ fun_l3_n823(x)
+ end
+end
+
+def fun_l2_n727(x)
+ if (x < 1)
+ fun_l3_n908(x)
+ else
+ fun_l3_n446(x)
+ end
+end
+
+def fun_l2_n728(x)
+ if (x < 1)
+ fun_l3_n170(x)
+ else
+ fun_l3_n546(x)
+ end
+end
+
+def fun_l2_n729(x)
+ if (x < 1)
+ fun_l3_n45(x)
+ else
+ fun_l3_n76(x)
+ end
+end
+
+def fun_l2_n730(x)
+ if (x < 1)
+ fun_l3_n688(x)
+ else
+ fun_l3_n826(x)
+ end
+end
+
+def fun_l2_n731(x)
+ if (x < 1)
+ fun_l3_n805(x)
+ else
+ fun_l3_n88(x)
+ end
+end
+
+def fun_l2_n732(x)
+ if (x < 1)
+ fun_l3_n191(x)
+ else
+ fun_l3_n395(x)
+ end
+end
+
+def fun_l2_n733(x)
+ if (x < 1)
+ fun_l3_n161(x)
+ else
+ fun_l3_n600(x)
+ end
+end
+
+def fun_l2_n734(x)
+ if (x < 1)
+ fun_l3_n586(x)
+ else
+ fun_l3_n770(x)
+ end
+end
+
+def fun_l2_n735(x)
+ if (x < 1)
+ fun_l3_n139(x)
+ else
+ fun_l3_n108(x)
+ end
+end
+
+def fun_l2_n736(x)
+ if (x < 1)
+ fun_l3_n719(x)
+ else
+ fun_l3_n210(x)
+ end
+end
+
+def fun_l2_n737(x)
+ if (x < 1)
+ fun_l3_n327(x)
+ else
+ fun_l3_n138(x)
+ end
+end
+
+def fun_l2_n738(x)
+ if (x < 1)
+ fun_l3_n755(x)
+ else
+ fun_l3_n785(x)
+ end
+end
+
+def fun_l2_n739(x)
+ if (x < 1)
+ fun_l3_n499(x)
+ else
+ fun_l3_n998(x)
+ end
+end
+
+def fun_l2_n740(x)
+ if (x < 1)
+ fun_l3_n303(x)
+ else
+ fun_l3_n646(x)
+ end
+end
+
+def fun_l2_n741(x)
+ if (x < 1)
+ fun_l3_n385(x)
+ else
+ fun_l3_n202(x)
+ end
+end
+
+def fun_l2_n742(x)
+ if (x < 1)
+ fun_l3_n290(x)
+ else
+ fun_l3_n617(x)
+ end
+end
+
+def fun_l2_n743(x)
+ if (x < 1)
+ fun_l3_n735(x)
+ else
+ fun_l3_n322(x)
+ end
+end
+
+def fun_l2_n744(x)
+ if (x < 1)
+ fun_l3_n541(x)
+ else
+ fun_l3_n841(x)
+ end
+end
+
+def fun_l2_n745(x)
+ if (x < 1)
+ fun_l3_n124(x)
+ else
+ fun_l3_n927(x)
+ end
+end
+
+def fun_l2_n746(x)
+ if (x < 1)
+ fun_l3_n909(x)
+ else
+ fun_l3_n981(x)
+ end
+end
+
+def fun_l2_n747(x)
+ if (x < 1)
+ fun_l3_n535(x)
+ else
+ fun_l3_n154(x)
+ end
+end
+
+def fun_l2_n748(x)
+ if (x < 1)
+ fun_l3_n804(x)
+ else
+ fun_l3_n837(x)
+ end
+end
+
+def fun_l2_n749(x)
+ if (x < 1)
+ fun_l3_n787(x)
+ else
+ fun_l3_n890(x)
+ end
+end
+
+def fun_l2_n750(x)
+ if (x < 1)
+ fun_l3_n273(x)
+ else
+ fun_l3_n539(x)
+ end
+end
+
+def fun_l2_n751(x)
+ if (x < 1)
+ fun_l3_n397(x)
+ else
+ fun_l3_n630(x)
+ end
+end
+
+def fun_l2_n752(x)
+ if (x < 1)
+ fun_l3_n757(x)
+ else
+ fun_l3_n294(x)
+ end
+end
+
+def fun_l2_n753(x)
+ if (x < 1)
+ fun_l3_n731(x)
+ else
+ fun_l3_n121(x)
+ end
+end
+
+def fun_l2_n754(x)
+ if (x < 1)
+ fun_l3_n391(x)
+ else
+ fun_l3_n640(x)
+ end
+end
+
+def fun_l2_n755(x)
+ if (x < 1)
+ fun_l3_n441(x)
+ else
+ fun_l3_n731(x)
+ end
+end
+
+def fun_l2_n756(x)
+ if (x < 1)
+ fun_l3_n947(x)
+ else
+ fun_l3_n175(x)
+ end
+end
+
+def fun_l2_n757(x)
+ if (x < 1)
+ fun_l3_n294(x)
+ else
+ fun_l3_n732(x)
+ end
+end
+
+def fun_l2_n758(x)
+ if (x < 1)
+ fun_l3_n862(x)
+ else
+ fun_l3_n490(x)
+ end
+end
+
+def fun_l2_n759(x)
+ if (x < 1)
+ fun_l3_n959(x)
+ else
+ fun_l3_n58(x)
+ end
+end
+
+def fun_l2_n760(x)
+ if (x < 1)
+ fun_l3_n245(x)
+ else
+ fun_l3_n201(x)
+ end
+end
+
+def fun_l2_n761(x)
+ if (x < 1)
+ fun_l3_n174(x)
+ else
+ fun_l3_n763(x)
+ end
+end
+
+def fun_l2_n762(x)
+ if (x < 1)
+ fun_l3_n276(x)
+ else
+ fun_l3_n624(x)
+ end
+end
+
+def fun_l2_n763(x)
+ if (x < 1)
+ fun_l3_n130(x)
+ else
+ fun_l3_n452(x)
+ end
+end
+
+def fun_l2_n764(x)
+ if (x < 1)
+ fun_l3_n476(x)
+ else
+ fun_l3_n519(x)
+ end
+end
+
+def fun_l2_n765(x)
+ if (x < 1)
+ fun_l3_n911(x)
+ else
+ fun_l3_n28(x)
+ end
+end
+
+def fun_l2_n766(x)
+ if (x < 1)
+ fun_l3_n290(x)
+ else
+ fun_l3_n528(x)
+ end
+end
+
+def fun_l2_n767(x)
+ if (x < 1)
+ fun_l3_n89(x)
+ else
+ fun_l3_n284(x)
+ end
+end
+
+def fun_l2_n768(x)
+ if (x < 1)
+ fun_l3_n307(x)
+ else
+ fun_l3_n832(x)
+ end
+end
+
+def fun_l2_n769(x)
+ if (x < 1)
+ fun_l3_n204(x)
+ else
+ fun_l3_n358(x)
+ end
+end
+
+def fun_l2_n770(x)
+ if (x < 1)
+ fun_l3_n380(x)
+ else
+ fun_l3_n938(x)
+ end
+end
+
+def fun_l2_n771(x)
+ if (x < 1)
+ fun_l3_n245(x)
+ else
+ fun_l3_n156(x)
+ end
+end
+
+def fun_l2_n772(x)
+ if (x < 1)
+ fun_l3_n77(x)
+ else
+ fun_l3_n842(x)
+ end
+end
+
+def fun_l2_n773(x)
+ if (x < 1)
+ fun_l3_n972(x)
+ else
+ fun_l3_n143(x)
+ end
+end
+
+def fun_l2_n774(x)
+ if (x < 1)
+ fun_l3_n308(x)
+ else
+ fun_l3_n713(x)
+ end
+end
+
+def fun_l2_n775(x)
+ if (x < 1)
+ fun_l3_n714(x)
+ else
+ fun_l3_n329(x)
+ end
+end
+
+def fun_l2_n776(x)
+ if (x < 1)
+ fun_l3_n805(x)
+ else
+ fun_l3_n141(x)
+ end
+end
+
+def fun_l2_n777(x)
+ if (x < 1)
+ fun_l3_n155(x)
+ else
+ fun_l3_n873(x)
+ end
+end
+
+def fun_l2_n778(x)
+ if (x < 1)
+ fun_l3_n551(x)
+ else
+ fun_l3_n293(x)
+ end
+end
+
+def fun_l2_n779(x)
+ if (x < 1)
+ fun_l3_n857(x)
+ else
+ fun_l3_n551(x)
+ end
+end
+
+def fun_l2_n780(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n230(x)
+ end
+end
+
+def fun_l2_n781(x)
+ if (x < 1)
+ fun_l3_n958(x)
+ else
+ fun_l3_n463(x)
+ end
+end
+
+def fun_l2_n782(x)
+ if (x < 1)
+ fun_l3_n89(x)
+ else
+ fun_l3_n514(x)
+ end
+end
+
+def fun_l2_n783(x)
+ if (x < 1)
+ fun_l3_n290(x)
+ else
+ fun_l3_n394(x)
+ end
+end
+
+def fun_l2_n784(x)
+ if (x < 1)
+ fun_l3_n582(x)
+ else
+ fun_l3_n927(x)
+ end
+end
+
+def fun_l2_n785(x)
+ if (x < 1)
+ fun_l3_n739(x)
+ else
+ fun_l3_n822(x)
+ end
+end
+
+def fun_l2_n786(x)
+ if (x < 1)
+ fun_l3_n1(x)
+ else
+ fun_l3_n162(x)
+ end
+end
+
+def fun_l2_n787(x)
+ if (x < 1)
+ fun_l3_n88(x)
+ else
+ fun_l3_n800(x)
+ end
+end
+
+def fun_l2_n788(x)
+ if (x < 1)
+ fun_l3_n592(x)
+ else
+ fun_l3_n235(x)
+ end
+end
+
+def fun_l2_n789(x)
+ if (x < 1)
+ fun_l3_n337(x)
+ else
+ fun_l3_n204(x)
+ end
+end
+
+def fun_l2_n790(x)
+ if (x < 1)
+ fun_l3_n481(x)
+ else
+ fun_l3_n361(x)
+ end
+end
+
+def fun_l2_n791(x)
+ if (x < 1)
+ fun_l3_n441(x)
+ else
+ fun_l3_n883(x)
+ end
+end
+
+def fun_l2_n792(x)
+ if (x < 1)
+ fun_l3_n424(x)
+ else
+ fun_l3_n387(x)
+ end
+end
+
+def fun_l2_n793(x)
+ if (x < 1)
+ fun_l3_n961(x)
+ else
+ fun_l3_n710(x)
+ end
+end
+
+def fun_l2_n794(x)
+ if (x < 1)
+ fun_l3_n653(x)
+ else
+ fun_l3_n869(x)
+ end
+end
+
+def fun_l2_n795(x)
+ if (x < 1)
+ fun_l3_n466(x)
+ else
+ fun_l3_n195(x)
+ end
+end
+
+def fun_l2_n796(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n137(x)
+ end
+end
+
+def fun_l2_n797(x)
+ if (x < 1)
+ fun_l3_n974(x)
+ else
+ fun_l3_n911(x)
+ end
+end
+
+def fun_l2_n798(x)
+ if (x < 1)
+ fun_l3_n500(x)
+ else
+ fun_l3_n607(x)
+ end
+end
+
+def fun_l2_n799(x)
+ if (x < 1)
+ fun_l3_n964(x)
+ else
+ fun_l3_n425(x)
+ end
+end
+
+def fun_l2_n800(x)
+ if (x < 1)
+ fun_l3_n381(x)
+ else
+ fun_l3_n618(x)
+ end
+end
+
+def fun_l2_n801(x)
+ if (x < 1)
+ fun_l3_n803(x)
+ else
+ fun_l3_n697(x)
+ end
+end
+
+def fun_l2_n802(x)
+ if (x < 1)
+ fun_l3_n372(x)
+ else
+ fun_l3_n331(x)
+ end
+end
+
+def fun_l2_n803(x)
+ if (x < 1)
+ fun_l3_n450(x)
+ else
+ fun_l3_n707(x)
+ end
+end
+
+def fun_l2_n804(x)
+ if (x < 1)
+ fun_l3_n760(x)
+ else
+ fun_l3_n800(x)
+ end
+end
+
+def fun_l2_n805(x)
+ if (x < 1)
+ fun_l3_n695(x)
+ else
+ fun_l3_n426(x)
+ end
+end
+
+def fun_l2_n806(x)
+ if (x < 1)
+ fun_l3_n312(x)
+ else
+ fun_l3_n517(x)
+ end
+end
+
+def fun_l2_n807(x)
+ if (x < 1)
+ fun_l3_n794(x)
+ else
+ fun_l3_n37(x)
+ end
+end
+
+def fun_l2_n808(x)
+ if (x < 1)
+ fun_l3_n591(x)
+ else
+ fun_l3_n933(x)
+ end
+end
+
+def fun_l2_n809(x)
+ if (x < 1)
+ fun_l3_n974(x)
+ else
+ fun_l3_n69(x)
+ end
+end
+
+def fun_l2_n810(x)
+ if (x < 1)
+ fun_l3_n263(x)
+ else
+ fun_l3_n628(x)
+ end
+end
+
+def fun_l2_n811(x)
+ if (x < 1)
+ fun_l3_n647(x)
+ else
+ fun_l3_n133(x)
+ end
+end
+
+def fun_l2_n812(x)
+ if (x < 1)
+ fun_l3_n396(x)
+ else
+ fun_l3_n872(x)
+ end
+end
+
+def fun_l2_n813(x)
+ if (x < 1)
+ fun_l3_n716(x)
+ else
+ fun_l3_n254(x)
+ end
+end
+
+def fun_l2_n814(x)
+ if (x < 1)
+ fun_l3_n181(x)
+ else
+ fun_l3_n786(x)
+ end
+end
+
+def fun_l2_n815(x)
+ if (x < 1)
+ fun_l3_n163(x)
+ else
+ fun_l3_n175(x)
+ end
+end
+
+def fun_l2_n816(x)
+ if (x < 1)
+ fun_l3_n835(x)
+ else
+ fun_l3_n713(x)
+ end
+end
+
+def fun_l2_n817(x)
+ if (x < 1)
+ fun_l3_n54(x)
+ else
+ fun_l3_n280(x)
+ end
+end
+
+def fun_l2_n818(x)
+ if (x < 1)
+ fun_l3_n261(x)
+ else
+ fun_l3_n958(x)
+ end
+end
+
+def fun_l2_n819(x)
+ if (x < 1)
+ fun_l3_n821(x)
+ else
+ fun_l3_n418(x)
+ end
+end
+
+def fun_l2_n820(x)
+ if (x < 1)
+ fun_l3_n541(x)
+ else
+ fun_l3_n547(x)
+ end
+end
+
+def fun_l2_n821(x)
+ if (x < 1)
+ fun_l3_n726(x)
+ else
+ fun_l3_n386(x)
+ end
+end
+
+def fun_l2_n822(x)
+ if (x < 1)
+ fun_l3_n369(x)
+ else
+ fun_l3_n781(x)
+ end
+end
+
+def fun_l2_n823(x)
+ if (x < 1)
+ fun_l3_n392(x)
+ else
+ fun_l3_n357(x)
+ end
+end
+
+def fun_l2_n824(x)
+ if (x < 1)
+ fun_l3_n167(x)
+ else
+ fun_l3_n764(x)
+ end
+end
+
+def fun_l2_n825(x)
+ if (x < 1)
+ fun_l3_n339(x)
+ else
+ fun_l3_n853(x)
+ end
+end
+
+def fun_l2_n826(x)
+ if (x < 1)
+ fun_l3_n613(x)
+ else
+ fun_l3_n767(x)
+ end
+end
+
+def fun_l2_n827(x)
+ if (x < 1)
+ fun_l3_n31(x)
+ else
+ fun_l3_n35(x)
+ end
+end
+
+def fun_l2_n828(x)
+ if (x < 1)
+ fun_l3_n838(x)
+ else
+ fun_l3_n939(x)
+ end
+end
+
+def fun_l2_n829(x)
+ if (x < 1)
+ fun_l3_n344(x)
+ else
+ fun_l3_n568(x)
+ end
+end
+
+def fun_l2_n830(x)
+ if (x < 1)
+ fun_l3_n892(x)
+ else
+ fun_l3_n564(x)
+ end
+end
+
+def fun_l2_n831(x)
+ if (x < 1)
+ fun_l3_n520(x)
+ else
+ fun_l3_n897(x)
+ end
+end
+
+def fun_l2_n832(x)
+ if (x < 1)
+ fun_l3_n986(x)
+ else
+ fun_l3_n523(x)
+ end
+end
+
+def fun_l2_n833(x)
+ if (x < 1)
+ fun_l3_n649(x)
+ else
+ fun_l3_n776(x)
+ end
+end
+
+def fun_l2_n834(x)
+ if (x < 1)
+ fun_l3_n613(x)
+ else
+ fun_l3_n170(x)
+ end
+end
+
+def fun_l2_n835(x)
+ if (x < 1)
+ fun_l3_n657(x)
+ else
+ fun_l3_n790(x)
+ end
+end
+
+def fun_l2_n836(x)
+ if (x < 1)
+ fun_l3_n976(x)
+ else
+ fun_l3_n785(x)
+ end
+end
+
+def fun_l2_n837(x)
+ if (x < 1)
+ fun_l3_n746(x)
+ else
+ fun_l3_n448(x)
+ end
+end
+
+def fun_l2_n838(x)
+ if (x < 1)
+ fun_l3_n911(x)
+ else
+ fun_l3_n978(x)
+ end
+end
+
+def fun_l2_n839(x)
+ if (x < 1)
+ fun_l3_n917(x)
+ else
+ fun_l3_n484(x)
+ end
+end
+
+def fun_l2_n840(x)
+ if (x < 1)
+ fun_l3_n930(x)
+ else
+ fun_l3_n617(x)
+ end
+end
+
+def fun_l2_n841(x)
+ if (x < 1)
+ fun_l3_n753(x)
+ else
+ fun_l3_n587(x)
+ end
+end
+
+def fun_l2_n842(x)
+ if (x < 1)
+ fun_l3_n21(x)
+ else
+ fun_l3_n256(x)
+ end
+end
+
+def fun_l2_n843(x)
+ if (x < 1)
+ fun_l3_n697(x)
+ else
+ fun_l3_n828(x)
+ end
+end
+
+def fun_l2_n844(x)
+ if (x < 1)
+ fun_l3_n59(x)
+ else
+ fun_l3_n855(x)
+ end
+end
+
+def fun_l2_n845(x)
+ if (x < 1)
+ fun_l3_n637(x)
+ else
+ fun_l3_n667(x)
+ end
+end
+
+def fun_l2_n846(x)
+ if (x < 1)
+ fun_l3_n229(x)
+ else
+ fun_l3_n379(x)
+ end
+end
+
+def fun_l2_n847(x)
+ if (x < 1)
+ fun_l3_n908(x)
+ else
+ fun_l3_n53(x)
+ end
+end
+
+def fun_l2_n848(x)
+ if (x < 1)
+ fun_l3_n72(x)
+ else
+ fun_l3_n882(x)
+ end
+end
+
+def fun_l2_n849(x)
+ if (x < 1)
+ fun_l3_n890(x)
+ else
+ fun_l3_n153(x)
+ end
+end
+
+def fun_l2_n850(x)
+ if (x < 1)
+ fun_l3_n301(x)
+ else
+ fun_l3_n404(x)
+ end
+end
+
+def fun_l2_n851(x)
+ if (x < 1)
+ fun_l3_n451(x)
+ else
+ fun_l3_n365(x)
+ end
+end
+
+def fun_l2_n852(x)
+ if (x < 1)
+ fun_l3_n591(x)
+ else
+ fun_l3_n974(x)
+ end
+end
+
+def fun_l2_n853(x)
+ if (x < 1)
+ fun_l3_n534(x)
+ else
+ fun_l3_n649(x)
+ end
+end
+
+def fun_l2_n854(x)
+ if (x < 1)
+ fun_l3_n438(x)
+ else
+ fun_l3_n853(x)
+ end
+end
+
+def fun_l2_n855(x)
+ if (x < 1)
+ fun_l3_n181(x)
+ else
+ fun_l3_n888(x)
+ end
+end
+
+def fun_l2_n856(x)
+ if (x < 1)
+ fun_l3_n856(x)
+ else
+ fun_l3_n139(x)
+ end
+end
+
+def fun_l2_n857(x)
+ if (x < 1)
+ fun_l3_n664(x)
+ else
+ fun_l3_n659(x)
+ end
+end
+
+def fun_l2_n858(x)
+ if (x < 1)
+ fun_l3_n838(x)
+ else
+ fun_l3_n157(x)
+ end
+end
+
+def fun_l2_n859(x)
+ if (x < 1)
+ fun_l3_n542(x)
+ else
+ fun_l3_n512(x)
+ end
+end
+
+def fun_l2_n860(x)
+ if (x < 1)
+ fun_l3_n213(x)
+ else
+ fun_l3_n954(x)
+ end
+end
+
+def fun_l2_n861(x)
+ if (x < 1)
+ fun_l3_n580(x)
+ else
+ fun_l3_n525(x)
+ end
+end
+
+def fun_l2_n862(x)
+ if (x < 1)
+ fun_l3_n649(x)
+ else
+ fun_l3_n376(x)
+ end
+end
+
+def fun_l2_n863(x)
+ if (x < 1)
+ fun_l3_n846(x)
+ else
+ fun_l3_n643(x)
+ end
+end
+
+def fun_l2_n864(x)
+ if (x < 1)
+ fun_l3_n899(x)
+ else
+ fun_l3_n667(x)
+ end
+end
+
+def fun_l2_n865(x)
+ if (x < 1)
+ fun_l3_n326(x)
+ else
+ fun_l3_n664(x)
+ end
+end
+
+def fun_l2_n866(x)
+ if (x < 1)
+ fun_l3_n155(x)
+ else
+ fun_l3_n369(x)
+ end
+end
+
+def fun_l2_n867(x)
+ if (x < 1)
+ fun_l3_n583(x)
+ else
+ fun_l3_n12(x)
+ end
+end
+
+def fun_l2_n868(x)
+ if (x < 1)
+ fun_l3_n637(x)
+ else
+ fun_l3_n711(x)
+ end
+end
+
+def fun_l2_n869(x)
+ if (x < 1)
+ fun_l3_n120(x)
+ else
+ fun_l3_n449(x)
+ end
+end
+
+def fun_l2_n870(x)
+ if (x < 1)
+ fun_l3_n459(x)
+ else
+ fun_l3_n83(x)
+ end
+end
+
+def fun_l2_n871(x)
+ if (x < 1)
+ fun_l3_n298(x)
+ else
+ fun_l3_n6(x)
+ end
+end
+
+def fun_l2_n872(x)
+ if (x < 1)
+ fun_l3_n640(x)
+ else
+ fun_l3_n319(x)
+ end
+end
+
+def fun_l2_n873(x)
+ if (x < 1)
+ fun_l3_n777(x)
+ else
+ fun_l3_n903(x)
+ end
+end
+
+def fun_l2_n874(x)
+ if (x < 1)
+ fun_l3_n16(x)
+ else
+ fun_l3_n50(x)
+ end
+end
+
+def fun_l2_n875(x)
+ if (x < 1)
+ fun_l3_n732(x)
+ else
+ fun_l3_n711(x)
+ end
+end
+
+def fun_l2_n876(x)
+ if (x < 1)
+ fun_l3_n958(x)
+ else
+ fun_l3_n949(x)
+ end
+end
+
+def fun_l2_n877(x)
+ if (x < 1)
+ fun_l3_n992(x)
+ else
+ fun_l3_n592(x)
+ end
+end
+
+def fun_l2_n878(x)
+ if (x < 1)
+ fun_l3_n283(x)
+ else
+ fun_l3_n178(x)
+ end
+end
+
+def fun_l2_n879(x)
+ if (x < 1)
+ fun_l3_n179(x)
+ else
+ fun_l3_n963(x)
+ end
+end
+
+def fun_l2_n880(x)
+ if (x < 1)
+ fun_l3_n345(x)
+ else
+ fun_l3_n585(x)
+ end
+end
+
+def fun_l2_n881(x)
+ if (x < 1)
+ fun_l3_n859(x)
+ else
+ fun_l3_n204(x)
+ end
+end
+
+def fun_l2_n882(x)
+ if (x < 1)
+ fun_l3_n718(x)
+ else
+ fun_l3_n354(x)
+ end
+end
+
+def fun_l2_n883(x)
+ if (x < 1)
+ fun_l3_n58(x)
+ else
+ fun_l3_n34(x)
+ end
+end
+
+def fun_l2_n884(x)
+ if (x < 1)
+ fun_l3_n442(x)
+ else
+ fun_l3_n853(x)
+ end
+end
+
+def fun_l2_n885(x)
+ if (x < 1)
+ fun_l3_n37(x)
+ else
+ fun_l3_n665(x)
+ end
+end
+
+def fun_l2_n886(x)
+ if (x < 1)
+ fun_l3_n468(x)
+ else
+ fun_l3_n283(x)
+ end
+end
+
+def fun_l2_n887(x)
+ if (x < 1)
+ fun_l3_n674(x)
+ else
+ fun_l3_n940(x)
+ end
+end
+
+def fun_l2_n888(x)
+ if (x < 1)
+ fun_l3_n556(x)
+ else
+ fun_l3_n191(x)
+ end
+end
+
+def fun_l2_n889(x)
+ if (x < 1)
+ fun_l3_n451(x)
+ else
+ fun_l3_n33(x)
+ end
+end
+
+def fun_l2_n890(x)
+ if (x < 1)
+ fun_l3_n724(x)
+ else
+ fun_l3_n355(x)
+ end
+end
+
+def fun_l2_n891(x)
+ if (x < 1)
+ fun_l3_n811(x)
+ else
+ fun_l3_n969(x)
+ end
+end
+
+def fun_l2_n892(x)
+ if (x < 1)
+ fun_l3_n122(x)
+ else
+ fun_l3_n956(x)
+ end
+end
+
+def fun_l2_n893(x)
+ if (x < 1)
+ fun_l3_n416(x)
+ else
+ fun_l3_n373(x)
+ end
+end
+
+def fun_l2_n894(x)
+ if (x < 1)
+ fun_l3_n990(x)
+ else
+ fun_l3_n148(x)
+ end
+end
+
+def fun_l2_n895(x)
+ if (x < 1)
+ fun_l3_n52(x)
+ else
+ fun_l3_n605(x)
+ end
+end
+
+def fun_l2_n896(x)
+ if (x < 1)
+ fun_l3_n523(x)
+ else
+ fun_l3_n929(x)
+ end
+end
+
+def fun_l2_n897(x)
+ if (x < 1)
+ fun_l3_n631(x)
+ else
+ fun_l3_n167(x)
+ end
+end
+
+def fun_l2_n898(x)
+ if (x < 1)
+ fun_l3_n366(x)
+ else
+ fun_l3_n666(x)
+ end
+end
+
+def fun_l2_n899(x)
+ if (x < 1)
+ fun_l3_n758(x)
+ else
+ fun_l3_n441(x)
+ end
+end
+
+def fun_l2_n900(x)
+ if (x < 1)
+ fun_l3_n561(x)
+ else
+ fun_l3_n766(x)
+ end
+end
+
+def fun_l2_n901(x)
+ if (x < 1)
+ fun_l3_n323(x)
+ else
+ fun_l3_n348(x)
+ end
+end
+
+def fun_l2_n902(x)
+ if (x < 1)
+ fun_l3_n455(x)
+ else
+ fun_l3_n78(x)
+ end
+end
+
+def fun_l2_n903(x)
+ if (x < 1)
+ fun_l3_n373(x)
+ else
+ fun_l3_n646(x)
+ end
+end
+
+def fun_l2_n904(x)
+ if (x < 1)
+ fun_l3_n595(x)
+ else
+ fun_l3_n742(x)
+ end
+end
+
+def fun_l2_n905(x)
+ if (x < 1)
+ fun_l3_n102(x)
+ else
+ fun_l3_n140(x)
+ end
+end
+
+def fun_l2_n906(x)
+ if (x < 1)
+ fun_l3_n458(x)
+ else
+ fun_l3_n528(x)
+ end
+end
+
+def fun_l2_n907(x)
+ if (x < 1)
+ fun_l3_n970(x)
+ else
+ fun_l3_n841(x)
+ end
+end
+
+def fun_l2_n908(x)
+ if (x < 1)
+ fun_l3_n97(x)
+ else
+ fun_l3_n250(x)
+ end
+end
+
+def fun_l2_n909(x)
+ if (x < 1)
+ fun_l3_n381(x)
+ else
+ fun_l3_n44(x)
+ end
+end
+
+def fun_l2_n910(x)
+ if (x < 1)
+ fun_l3_n812(x)
+ else
+ fun_l3_n225(x)
+ end
+end
+
+def fun_l2_n911(x)
+ if (x < 1)
+ fun_l3_n849(x)
+ else
+ fun_l3_n683(x)
+ end
+end
+
+def fun_l2_n912(x)
+ if (x < 1)
+ fun_l3_n958(x)
+ else
+ fun_l3_n590(x)
+ end
+end
+
+def fun_l2_n913(x)
+ if (x < 1)
+ fun_l3_n858(x)
+ else
+ fun_l3_n140(x)
+ end
+end
+
+def fun_l2_n914(x)
+ if (x < 1)
+ fun_l3_n997(x)
+ else
+ fun_l3_n959(x)
+ end
+end
+
+def fun_l2_n915(x)
+ if (x < 1)
+ fun_l3_n184(x)
+ else
+ fun_l3_n910(x)
+ end
+end
+
+def fun_l2_n916(x)
+ if (x < 1)
+ fun_l3_n369(x)
+ else
+ fun_l3_n180(x)
+ end
+end
+
+def fun_l2_n917(x)
+ if (x < 1)
+ fun_l3_n537(x)
+ else
+ fun_l3_n927(x)
+ end
+end
+
+def fun_l2_n918(x)
+ if (x < 1)
+ fun_l3_n739(x)
+ else
+ fun_l3_n222(x)
+ end
+end
+
+def fun_l2_n919(x)
+ if (x < 1)
+ fun_l3_n640(x)
+ else
+ fun_l3_n406(x)
+ end
+end
+
+def fun_l2_n920(x)
+ if (x < 1)
+ fun_l3_n371(x)
+ else
+ fun_l3_n976(x)
+ end
+end
+
+def fun_l2_n921(x)
+ if (x < 1)
+ fun_l3_n262(x)
+ else
+ fun_l3_n532(x)
+ end
+end
+
+def fun_l2_n922(x)
+ if (x < 1)
+ fun_l3_n772(x)
+ else
+ fun_l3_n368(x)
+ end
+end
+
+def fun_l2_n923(x)
+ if (x < 1)
+ fun_l3_n935(x)
+ else
+ fun_l3_n109(x)
+ end
+end
+
+def fun_l2_n924(x)
+ if (x < 1)
+ fun_l3_n982(x)
+ else
+ fun_l3_n643(x)
+ end
+end
+
+def fun_l2_n925(x)
+ if (x < 1)
+ fun_l3_n849(x)
+ else
+ fun_l3_n266(x)
+ end
+end
+
+def fun_l2_n926(x)
+ if (x < 1)
+ fun_l3_n977(x)
+ else
+ fun_l3_n803(x)
+ end
+end
+
+def fun_l2_n927(x)
+ if (x < 1)
+ fun_l3_n706(x)
+ else
+ fun_l3_n441(x)
+ end
+end
+
+def fun_l2_n928(x)
+ if (x < 1)
+ fun_l3_n781(x)
+ else
+ fun_l3_n374(x)
+ end
+end
+
+def fun_l2_n929(x)
+ if (x < 1)
+ fun_l3_n122(x)
+ else
+ fun_l3_n851(x)
+ end
+end
+
+def fun_l2_n930(x)
+ if (x < 1)
+ fun_l3_n821(x)
+ else
+ fun_l3_n904(x)
+ end
+end
+
+def fun_l2_n931(x)
+ if (x < 1)
+ fun_l3_n379(x)
+ else
+ fun_l3_n211(x)
+ end
+end
+
+def fun_l2_n932(x)
+ if (x < 1)
+ fun_l3_n572(x)
+ else
+ fun_l3_n169(x)
+ end
+end
+
+def fun_l2_n933(x)
+ if (x < 1)
+ fun_l3_n620(x)
+ else
+ fun_l3_n703(x)
+ end
+end
+
+def fun_l2_n934(x)
+ if (x < 1)
+ fun_l3_n238(x)
+ else
+ fun_l3_n220(x)
+ end
+end
+
+def fun_l2_n935(x)
+ if (x < 1)
+ fun_l3_n652(x)
+ else
+ fun_l3_n822(x)
+ end
+end
+
+def fun_l2_n936(x)
+ if (x < 1)
+ fun_l3_n818(x)
+ else
+ fun_l3_n384(x)
+ end
+end
+
+def fun_l2_n937(x)
+ if (x < 1)
+ fun_l3_n560(x)
+ else
+ fun_l3_n875(x)
+ end
+end
+
+def fun_l2_n938(x)
+ if (x < 1)
+ fun_l3_n417(x)
+ else
+ fun_l3_n900(x)
+ end
+end
+
+def fun_l2_n939(x)
+ if (x < 1)
+ fun_l3_n740(x)
+ else
+ fun_l3_n431(x)
+ end
+end
+
+def fun_l2_n940(x)
+ if (x < 1)
+ fun_l3_n1(x)
+ else
+ fun_l3_n147(x)
+ end
+end
+
+def fun_l2_n941(x)
+ if (x < 1)
+ fun_l3_n64(x)
+ else
+ fun_l3_n317(x)
+ end
+end
+
+def fun_l2_n942(x)
+ if (x < 1)
+ fun_l3_n347(x)
+ else
+ fun_l3_n778(x)
+ end
+end
+
+def fun_l2_n943(x)
+ if (x < 1)
+ fun_l3_n819(x)
+ else
+ fun_l3_n446(x)
+ end
+end
+
+def fun_l2_n944(x)
+ if (x < 1)
+ fun_l3_n492(x)
+ else
+ fun_l3_n381(x)
+ end
+end
+
+def fun_l2_n945(x)
+ if (x < 1)
+ fun_l3_n594(x)
+ else
+ fun_l3_n413(x)
+ end
+end
+
+def fun_l2_n946(x)
+ if (x < 1)
+ fun_l3_n580(x)
+ else
+ fun_l3_n838(x)
+ end
+end
+
+def fun_l2_n947(x)
+ if (x < 1)
+ fun_l3_n880(x)
+ else
+ fun_l3_n768(x)
+ end
+end
+
+def fun_l2_n948(x)
+ if (x < 1)
+ fun_l3_n9(x)
+ else
+ fun_l3_n888(x)
+ end
+end
+
+def fun_l2_n949(x)
+ if (x < 1)
+ fun_l3_n365(x)
+ else
+ fun_l3_n322(x)
+ end
+end
+
+def fun_l2_n950(x)
+ if (x < 1)
+ fun_l3_n283(x)
+ else
+ fun_l3_n921(x)
+ end
+end
+
+def fun_l2_n951(x)
+ if (x < 1)
+ fun_l3_n740(x)
+ else
+ fun_l3_n336(x)
+ end
+end
+
+def fun_l2_n952(x)
+ if (x < 1)
+ fun_l3_n827(x)
+ else
+ fun_l3_n683(x)
+ end
+end
+
+def fun_l2_n953(x)
+ if (x < 1)
+ fun_l3_n289(x)
+ else
+ fun_l3_n915(x)
+ end
+end
+
+def fun_l2_n954(x)
+ if (x < 1)
+ fun_l3_n234(x)
+ else
+ fun_l3_n198(x)
+ end
+end
+
+def fun_l2_n955(x)
+ if (x < 1)
+ fun_l3_n364(x)
+ else
+ fun_l3_n152(x)
+ end
+end
+
+def fun_l2_n956(x)
+ if (x < 1)
+ fun_l3_n370(x)
+ else
+ fun_l3_n786(x)
+ end
+end
+
+def fun_l2_n957(x)
+ if (x < 1)
+ fun_l3_n672(x)
+ else
+ fun_l3_n375(x)
+ end
+end
+
+def fun_l2_n958(x)
+ if (x < 1)
+ fun_l3_n423(x)
+ else
+ fun_l3_n448(x)
+ end
+end
+
+def fun_l2_n959(x)
+ if (x < 1)
+ fun_l3_n887(x)
+ else
+ fun_l3_n33(x)
+ end
+end
+
+def fun_l2_n960(x)
+ if (x < 1)
+ fun_l3_n280(x)
+ else
+ fun_l3_n334(x)
+ end
+end
+
+def fun_l2_n961(x)
+ if (x < 1)
+ fun_l3_n535(x)
+ else
+ fun_l3_n524(x)
+ end
+end
+
+def fun_l2_n962(x)
+ if (x < 1)
+ fun_l3_n689(x)
+ else
+ fun_l3_n426(x)
+ end
+end
+
+def fun_l2_n963(x)
+ if (x < 1)
+ fun_l3_n235(x)
+ else
+ fun_l3_n286(x)
+ end
+end
+
+def fun_l2_n964(x)
+ if (x < 1)
+ fun_l3_n116(x)
+ else
+ fun_l3_n308(x)
+ end
+end
+
+def fun_l2_n965(x)
+ if (x < 1)
+ fun_l3_n174(x)
+ else
+ fun_l3_n823(x)
+ end
+end
+
+def fun_l2_n966(x)
+ if (x < 1)
+ fun_l3_n792(x)
+ else
+ fun_l3_n29(x)
+ end
+end
+
+def fun_l2_n967(x)
+ if (x < 1)
+ fun_l3_n755(x)
+ else
+ fun_l3_n689(x)
+ end
+end
+
+def fun_l2_n968(x)
+ if (x < 1)
+ fun_l3_n167(x)
+ else
+ fun_l3_n287(x)
+ end
+end
+
+def fun_l2_n969(x)
+ if (x < 1)
+ fun_l3_n836(x)
+ else
+ fun_l3_n892(x)
+ end
+end
+
+def fun_l2_n970(x)
+ if (x < 1)
+ fun_l3_n201(x)
+ else
+ fun_l3_n677(x)
+ end
+end
+
+def fun_l2_n971(x)
+ if (x < 1)
+ fun_l3_n990(x)
+ else
+ fun_l3_n251(x)
+ end
+end
+
+def fun_l2_n972(x)
+ if (x < 1)
+ fun_l3_n500(x)
+ else
+ fun_l3_n686(x)
+ end
+end
+
+def fun_l2_n973(x)
+ if (x < 1)
+ fun_l3_n969(x)
+ else
+ fun_l3_n819(x)
+ end
+end
+
+def fun_l2_n974(x)
+ if (x < 1)
+ fun_l3_n87(x)
+ else
+ fun_l3_n120(x)
+ end
+end
+
+def fun_l2_n975(x)
+ if (x < 1)
+ fun_l3_n701(x)
+ else
+ fun_l3_n569(x)
+ end
+end
+
+def fun_l2_n976(x)
+ if (x < 1)
+ fun_l3_n128(x)
+ else
+ fun_l3_n310(x)
+ end
+end
+
+def fun_l2_n977(x)
+ if (x < 1)
+ fun_l3_n690(x)
+ else
+ fun_l3_n5(x)
+ end
+end
+
+def fun_l2_n978(x)
+ if (x < 1)
+ fun_l3_n432(x)
+ else
+ fun_l3_n964(x)
+ end
+end
+
+def fun_l2_n979(x)
+ if (x < 1)
+ fun_l3_n198(x)
+ else
+ fun_l3_n161(x)
+ end
+end
+
+def fun_l2_n980(x)
+ if (x < 1)
+ fun_l3_n415(x)
+ else
+ fun_l3_n768(x)
+ end
+end
+
+def fun_l2_n981(x)
+ if (x < 1)
+ fun_l3_n635(x)
+ else
+ fun_l3_n569(x)
+ end
+end
+
+def fun_l2_n982(x)
+ if (x < 1)
+ fun_l3_n326(x)
+ else
+ fun_l3_n338(x)
+ end
+end
+
+def fun_l2_n983(x)
+ if (x < 1)
+ fun_l3_n243(x)
+ else
+ fun_l3_n48(x)
+ end
+end
+
+def fun_l2_n984(x)
+ if (x < 1)
+ fun_l3_n204(x)
+ else
+ fun_l3_n141(x)
+ end
+end
+
+def fun_l2_n985(x)
+ if (x < 1)
+ fun_l3_n805(x)
+ else
+ fun_l3_n577(x)
+ end
+end
+
+def fun_l2_n986(x)
+ if (x < 1)
+ fun_l3_n237(x)
+ else
+ fun_l3_n833(x)
+ end
+end
+
+def fun_l2_n987(x)
+ if (x < 1)
+ fun_l3_n643(x)
+ else
+ fun_l3_n629(x)
+ end
+end
+
+def fun_l2_n988(x)
+ if (x < 1)
+ fun_l3_n911(x)
+ else
+ fun_l3_n712(x)
+ end
+end
+
+def fun_l2_n989(x)
+ if (x < 1)
+ fun_l3_n936(x)
+ else
+ fun_l3_n300(x)
+ end
+end
+
+def fun_l2_n990(x)
+ if (x < 1)
+ fun_l3_n561(x)
+ else
+ fun_l3_n281(x)
+ end
+end
+
+def fun_l2_n991(x)
+ if (x < 1)
+ fun_l3_n226(x)
+ else
+ fun_l3_n203(x)
+ end
+end
+
+def fun_l2_n992(x)
+ if (x < 1)
+ fun_l3_n727(x)
+ else
+ fun_l3_n437(x)
+ end
+end
+
+def fun_l2_n993(x)
+ if (x < 1)
+ fun_l3_n608(x)
+ else
+ fun_l3_n169(x)
+ end
+end
+
+def fun_l2_n994(x)
+ if (x < 1)
+ fun_l3_n30(x)
+ else
+ fun_l3_n980(x)
+ end
+end
+
+def fun_l2_n995(x)
+ if (x < 1)
+ fun_l3_n652(x)
+ else
+ fun_l3_n122(x)
+ end
+end
+
+def fun_l2_n996(x)
+ if (x < 1)
+ fun_l3_n334(x)
+ else
+ fun_l3_n668(x)
+ end
+end
+
+def fun_l2_n997(x)
+ if (x < 1)
+ fun_l3_n241(x)
+ else
+ fun_l3_n515(x)
+ end
+end
+
+def fun_l2_n998(x)
+ if (x < 1)
+ fun_l3_n665(x)
+ else
+ fun_l3_n54(x)
+ end
+end
+
+def fun_l2_n999(x)
+ if (x < 1)
+ fun_l3_n568(x)
+ else
+ fun_l3_n652(x)
+ end
+end
+
+def fun_l3_n0(x)
+ if (x < 1)
+ fun_l4_n169(x)
+ else
+ fun_l4_n923(x)
+ end
+end
+
+def fun_l3_n1(x)
+ if (x < 1)
+ fun_l4_n214(x)
+ else
+ fun_l4_n506(x)
+ end
+end
+
+def fun_l3_n2(x)
+ if (x < 1)
+ fun_l4_n513(x)
+ else
+ fun_l4_n409(x)
+ end
+end
+
+def fun_l3_n3(x)
+ if (x < 1)
+ fun_l4_n133(x)
+ else
+ fun_l4_n293(x)
+ end
+end
+
+def fun_l3_n4(x)
+ if (x < 1)
+ fun_l4_n550(x)
+ else
+ fun_l4_n95(x)
+ end
+end
+
+def fun_l3_n5(x)
+ if (x < 1)
+ fun_l4_n13(x)
+ else
+ fun_l4_n508(x)
+ end
+end
+
+def fun_l3_n6(x)
+ if (x < 1)
+ fun_l4_n607(x)
+ else
+ fun_l4_n140(x)
+ end
+end
+
+def fun_l3_n7(x)
+ if (x < 1)
+ fun_l4_n65(x)
+ else
+ fun_l4_n90(x)
+ end
+end
+
+def fun_l3_n8(x)
+ if (x < 1)
+ fun_l4_n516(x)
+ else
+ fun_l4_n445(x)
+ end
+end
+
+def fun_l3_n9(x)
+ if (x < 1)
+ fun_l4_n713(x)
+ else
+ fun_l4_n487(x)
+ end
+end
+
+def fun_l3_n10(x)
+ if (x < 1)
+ fun_l4_n16(x)
+ else
+ fun_l4_n547(x)
+ end
+end
+
+def fun_l3_n11(x)
+ if (x < 1)
+ fun_l4_n561(x)
+ else
+ fun_l4_n530(x)
+ end
+end
+
+def fun_l3_n12(x)
+ if (x < 1)
+ fun_l4_n866(x)
+ else
+ fun_l4_n187(x)
+ end
+end
+
+def fun_l3_n13(x)
+ if (x < 1)
+ fun_l4_n8(x)
+ else
+ fun_l4_n458(x)
+ end
+end
+
+def fun_l3_n14(x)
+ if (x < 1)
+ fun_l4_n627(x)
+ else
+ fun_l4_n122(x)
+ end
+end
+
+def fun_l3_n15(x)
+ if (x < 1)
+ fun_l4_n988(x)
+ else
+ fun_l4_n4(x)
+ end
+end
+
+def fun_l3_n16(x)
+ if (x < 1)
+ fun_l4_n654(x)
+ else
+ fun_l4_n863(x)
+ end
+end
+
+def fun_l3_n17(x)
+ if (x < 1)
+ fun_l4_n112(x)
+ else
+ fun_l4_n223(x)
+ end
+end
+
+def fun_l3_n18(x)
+ if (x < 1)
+ fun_l4_n808(x)
+ else
+ fun_l4_n161(x)
+ end
+end
+
+def fun_l3_n19(x)
+ if (x < 1)
+ fun_l4_n265(x)
+ else
+ fun_l4_n860(x)
+ end
+end
+
+def fun_l3_n20(x)
+ if (x < 1)
+ fun_l4_n60(x)
+ else
+ fun_l4_n943(x)
+ end
+end
+
+def fun_l3_n21(x)
+ if (x < 1)
+ fun_l4_n707(x)
+ else
+ fun_l4_n990(x)
+ end
+end
+
+def fun_l3_n22(x)
+ if (x < 1)
+ fun_l4_n774(x)
+ else
+ fun_l4_n686(x)
+ end
+end
+
+def fun_l3_n23(x)
+ if (x < 1)
+ fun_l4_n552(x)
+ else
+ fun_l4_n935(x)
+ end
+end
+
+def fun_l3_n24(x)
+ if (x < 1)
+ fun_l4_n752(x)
+ else
+ fun_l4_n279(x)
+ end
+end
+
+def fun_l3_n25(x)
+ if (x < 1)
+ fun_l4_n325(x)
+ else
+ fun_l4_n440(x)
+ end
+end
+
+def fun_l3_n26(x)
+ if (x < 1)
+ fun_l4_n330(x)
+ else
+ fun_l4_n233(x)
+ end
+end
+
+def fun_l3_n27(x)
+ if (x < 1)
+ fun_l4_n112(x)
+ else
+ fun_l4_n399(x)
+ end
+end
+
+def fun_l3_n28(x)
+ if (x < 1)
+ fun_l4_n420(x)
+ else
+ fun_l4_n570(x)
+ end
+end
+
+def fun_l3_n29(x)
+ if (x < 1)
+ fun_l4_n515(x)
+ else
+ fun_l4_n485(x)
+ end
+end
+
+def fun_l3_n30(x)
+ if (x < 1)
+ fun_l4_n694(x)
+ else
+ fun_l4_n279(x)
+ end
+end
+
+def fun_l3_n31(x)
+ if (x < 1)
+ fun_l4_n683(x)
+ else
+ fun_l4_n396(x)
+ end
+end
+
+def fun_l3_n32(x)
+ if (x < 1)
+ fun_l4_n997(x)
+ else
+ fun_l4_n978(x)
+ end
+end
+
+def fun_l3_n33(x)
+ if (x < 1)
+ fun_l4_n260(x)
+ else
+ fun_l4_n895(x)
+ end
+end
+
+def fun_l3_n34(x)
+ if (x < 1)
+ fun_l4_n510(x)
+ else
+ fun_l4_n147(x)
+ end
+end
+
+def fun_l3_n35(x)
+ if (x < 1)
+ fun_l4_n415(x)
+ else
+ fun_l4_n590(x)
+ end
+end
+
+def fun_l3_n36(x)
+ if (x < 1)
+ fun_l4_n164(x)
+ else
+ fun_l4_n990(x)
+ end
+end
+
+def fun_l3_n37(x)
+ if (x < 1)
+ fun_l4_n744(x)
+ else
+ fun_l4_n981(x)
+ end
+end
+
+def fun_l3_n38(x)
+ if (x < 1)
+ fun_l4_n243(x)
+ else
+ fun_l4_n385(x)
+ end
+end
+
+def fun_l3_n39(x)
+ if (x < 1)
+ fun_l4_n874(x)
+ else
+ fun_l4_n941(x)
+ end
+end
+
+def fun_l3_n40(x)
+ if (x < 1)
+ fun_l4_n39(x)
+ else
+ fun_l4_n115(x)
+ end
+end
+
+def fun_l3_n41(x)
+ if (x < 1)
+ fun_l4_n829(x)
+ else
+ fun_l4_n991(x)
+ end
+end
+
+def fun_l3_n42(x)
+ if (x < 1)
+ fun_l4_n234(x)
+ else
+ fun_l4_n359(x)
+ end
+end
+
+def fun_l3_n43(x)
+ if (x < 1)
+ fun_l4_n481(x)
+ else
+ fun_l4_n368(x)
+ end
+end
+
+def fun_l3_n44(x)
+ if (x < 1)
+ fun_l4_n969(x)
+ else
+ fun_l4_n716(x)
+ end
+end
+
+def fun_l3_n45(x)
+ if (x < 1)
+ fun_l4_n858(x)
+ else
+ fun_l4_n446(x)
+ end
+end
+
+def fun_l3_n46(x)
+ if (x < 1)
+ fun_l4_n786(x)
+ else
+ fun_l4_n418(x)
+ end
+end
+
+def fun_l3_n47(x)
+ if (x < 1)
+ fun_l4_n261(x)
+ else
+ fun_l4_n346(x)
+ end
+end
+
+def fun_l3_n48(x)
+ if (x < 1)
+ fun_l4_n422(x)
+ else
+ fun_l4_n710(x)
+ end
+end
+
+def fun_l3_n49(x)
+ if (x < 1)
+ fun_l4_n533(x)
+ else
+ fun_l4_n599(x)
+ end
+end
+
+def fun_l3_n50(x)
+ if (x < 1)
+ fun_l4_n922(x)
+ else
+ fun_l4_n90(x)
+ end
+end
+
+def fun_l3_n51(x)
+ if (x < 1)
+ fun_l4_n718(x)
+ else
+ fun_l4_n854(x)
+ end
+end
+
+def fun_l3_n52(x)
+ if (x < 1)
+ fun_l4_n993(x)
+ else
+ fun_l4_n996(x)
+ end
+end
+
+def fun_l3_n53(x)
+ if (x < 1)
+ fun_l4_n628(x)
+ else
+ fun_l4_n589(x)
+ end
+end
+
+def fun_l3_n54(x)
+ if (x < 1)
+ fun_l4_n735(x)
+ else
+ fun_l4_n258(x)
+ end
+end
+
+def fun_l3_n55(x)
+ if (x < 1)
+ fun_l4_n794(x)
+ else
+ fun_l4_n559(x)
+ end
+end
+
+def fun_l3_n56(x)
+ if (x < 1)
+ fun_l4_n771(x)
+ else
+ fun_l4_n812(x)
+ end
+end
+
+def fun_l3_n57(x)
+ if (x < 1)
+ fun_l4_n106(x)
+ else
+ fun_l4_n144(x)
+ end
+end
+
+def fun_l3_n58(x)
+ if (x < 1)
+ fun_l4_n2(x)
+ else
+ fun_l4_n49(x)
+ end
+end
+
+def fun_l3_n59(x)
+ if (x < 1)
+ fun_l4_n540(x)
+ else
+ fun_l4_n164(x)
+ end
+end
+
+def fun_l3_n60(x)
+ if (x < 1)
+ fun_l4_n638(x)
+ else
+ fun_l4_n984(x)
+ end
+end
+
+def fun_l3_n61(x)
+ if (x < 1)
+ fun_l4_n144(x)
+ else
+ fun_l4_n236(x)
+ end
+end
+
+def fun_l3_n62(x)
+ if (x < 1)
+ fun_l4_n345(x)
+ else
+ fun_l4_n65(x)
+ end
+end
+
+def fun_l3_n63(x)
+ if (x < 1)
+ fun_l4_n112(x)
+ else
+ fun_l4_n216(x)
+ end
+end
+
+def fun_l3_n64(x)
+ if (x < 1)
+ fun_l4_n213(x)
+ else
+ fun_l4_n370(x)
+ end
+end
+
+def fun_l3_n65(x)
+ if (x < 1)
+ fun_l4_n845(x)
+ else
+ fun_l4_n672(x)
+ end
+end
+
+def fun_l3_n66(x)
+ if (x < 1)
+ fun_l4_n951(x)
+ else
+ fun_l4_n415(x)
+ end
+end
+
+def fun_l3_n67(x)
+ if (x < 1)
+ fun_l4_n997(x)
+ else
+ fun_l4_n760(x)
+ end
+end
+
+def fun_l3_n68(x)
+ if (x < 1)
+ fun_l4_n595(x)
+ else
+ fun_l4_n517(x)
+ end
+end
+
+def fun_l3_n69(x)
+ if (x < 1)
+ fun_l4_n776(x)
+ else
+ fun_l4_n550(x)
+ end
+end
+
+def fun_l3_n70(x)
+ if (x < 1)
+ fun_l4_n360(x)
+ else
+ fun_l4_n836(x)
+ end
+end
+
+def fun_l3_n71(x)
+ if (x < 1)
+ fun_l4_n214(x)
+ else
+ fun_l4_n532(x)
+ end
+end
+
+def fun_l3_n72(x)
+ if (x < 1)
+ fun_l4_n138(x)
+ else
+ fun_l4_n881(x)
+ end
+end
+
+def fun_l3_n73(x)
+ if (x < 1)
+ fun_l4_n793(x)
+ else
+ fun_l4_n866(x)
+ end
+end
+
+def fun_l3_n74(x)
+ if (x < 1)
+ fun_l4_n883(x)
+ else
+ fun_l4_n730(x)
+ end
+end
+
+def fun_l3_n75(x)
+ if (x < 1)
+ fun_l4_n525(x)
+ else
+ fun_l4_n188(x)
+ end
+end
+
+def fun_l3_n76(x)
+ if (x < 1)
+ fun_l4_n528(x)
+ else
+ fun_l4_n723(x)
+ end
+end
+
+def fun_l3_n77(x)
+ if (x < 1)
+ fun_l4_n954(x)
+ else
+ fun_l4_n581(x)
+ end
+end
+
+def fun_l3_n78(x)
+ if (x < 1)
+ fun_l4_n614(x)
+ else
+ fun_l4_n941(x)
+ end
+end
+
+def fun_l3_n79(x)
+ if (x < 1)
+ fun_l4_n396(x)
+ else
+ fun_l4_n539(x)
+ end
+end
+
+def fun_l3_n80(x)
+ if (x < 1)
+ fun_l4_n1(x)
+ else
+ fun_l4_n708(x)
+ end
+end
+
+def fun_l3_n81(x)
+ if (x < 1)
+ fun_l4_n626(x)
+ else
+ fun_l4_n418(x)
+ end
+end
+
+def fun_l3_n82(x)
+ if (x < 1)
+ fun_l4_n5(x)
+ else
+ fun_l4_n108(x)
+ end
+end
+
+def fun_l3_n83(x)
+ if (x < 1)
+ fun_l4_n683(x)
+ else
+ fun_l4_n679(x)
+ end
+end
+
+def fun_l3_n84(x)
+ if (x < 1)
+ fun_l4_n613(x)
+ else
+ fun_l4_n596(x)
+ end
+end
+
+def fun_l3_n85(x)
+ if (x < 1)
+ fun_l4_n490(x)
+ else
+ fun_l4_n178(x)
+ end
+end
+
+def fun_l3_n86(x)
+ if (x < 1)
+ fun_l4_n286(x)
+ else
+ fun_l4_n724(x)
+ end
+end
+
+def fun_l3_n87(x)
+ if (x < 1)
+ fun_l4_n989(x)
+ else
+ fun_l4_n711(x)
+ end
+end
+
+def fun_l3_n88(x)
+ if (x < 1)
+ fun_l4_n422(x)
+ else
+ fun_l4_n259(x)
+ end
+end
+
+def fun_l3_n89(x)
+ if (x < 1)
+ fun_l4_n938(x)
+ else
+ fun_l4_n123(x)
+ end
+end
+
+def fun_l3_n90(x)
+ if (x < 1)
+ fun_l4_n589(x)
+ else
+ fun_l4_n231(x)
+ end
+end
+
+def fun_l3_n91(x)
+ if (x < 1)
+ fun_l4_n484(x)
+ else
+ fun_l4_n439(x)
+ end
+end
+
+def fun_l3_n92(x)
+ if (x < 1)
+ fun_l4_n469(x)
+ else
+ fun_l4_n737(x)
+ end
+end
+
+def fun_l3_n93(x)
+ if (x < 1)
+ fun_l4_n93(x)
+ else
+ fun_l4_n907(x)
+ end
+end
+
+def fun_l3_n94(x)
+ if (x < 1)
+ fun_l4_n468(x)
+ else
+ fun_l4_n219(x)
+ end
+end
+
+def fun_l3_n95(x)
+ if (x < 1)
+ fun_l4_n409(x)
+ else
+ fun_l4_n921(x)
+ end
+end
+
+def fun_l3_n96(x)
+ if (x < 1)
+ fun_l4_n952(x)
+ else
+ fun_l4_n167(x)
+ end
+end
+
+def fun_l3_n97(x)
+ if (x < 1)
+ fun_l4_n177(x)
+ else
+ fun_l4_n462(x)
+ end
+end
+
+def fun_l3_n98(x)
+ if (x < 1)
+ fun_l4_n351(x)
+ else
+ fun_l4_n89(x)
+ end
+end
+
+def fun_l3_n99(x)
+ if (x < 1)
+ fun_l4_n869(x)
+ else
+ fun_l4_n502(x)
+ end
+end
+
+def fun_l3_n100(x)
+ if (x < 1)
+ fun_l4_n985(x)
+ else
+ fun_l4_n297(x)
+ end
+end
+
+def fun_l3_n101(x)
+ if (x < 1)
+ fun_l4_n48(x)
+ else
+ fun_l4_n895(x)
+ end
+end
+
+def fun_l3_n102(x)
+ if (x < 1)
+ fun_l4_n92(x)
+ else
+ fun_l4_n36(x)
+ end
+end
+
+def fun_l3_n103(x)
+ if (x < 1)
+ fun_l4_n610(x)
+ else
+ fun_l4_n616(x)
+ end
+end
+
+def fun_l3_n104(x)
+ if (x < 1)
+ fun_l4_n472(x)
+ else
+ fun_l4_n689(x)
+ end
+end
+
+def fun_l3_n105(x)
+ if (x < 1)
+ fun_l4_n75(x)
+ else
+ fun_l4_n161(x)
+ end
+end
+
+def fun_l3_n106(x)
+ if (x < 1)
+ fun_l4_n300(x)
+ else
+ fun_l4_n767(x)
+ end
+end
+
+def fun_l3_n107(x)
+ if (x < 1)
+ fun_l4_n707(x)
+ else
+ fun_l4_n229(x)
+ end
+end
+
+def fun_l3_n108(x)
+ if (x < 1)
+ fun_l4_n761(x)
+ else
+ fun_l4_n97(x)
+ end
+end
+
+def fun_l3_n109(x)
+ if (x < 1)
+ fun_l4_n734(x)
+ else
+ fun_l4_n290(x)
+ end
+end
+
+def fun_l3_n110(x)
+ if (x < 1)
+ fun_l4_n819(x)
+ else
+ fun_l4_n567(x)
+ end
+end
+
+def fun_l3_n111(x)
+ if (x < 1)
+ fun_l4_n904(x)
+ else
+ fun_l4_n322(x)
+ end
+end
+
+def fun_l3_n112(x)
+ if (x < 1)
+ fun_l4_n907(x)
+ else
+ fun_l4_n667(x)
+ end
+end
+
+def fun_l3_n113(x)
+ if (x < 1)
+ fun_l4_n473(x)
+ else
+ fun_l4_n620(x)
+ end
+end
+
+def fun_l3_n114(x)
+ if (x < 1)
+ fun_l4_n278(x)
+ else
+ fun_l4_n998(x)
+ end
+end
+
+def fun_l3_n115(x)
+ if (x < 1)
+ fun_l4_n185(x)
+ else
+ fun_l4_n962(x)
+ end
+end
+
+def fun_l3_n116(x)
+ if (x < 1)
+ fun_l4_n989(x)
+ else
+ fun_l4_n993(x)
+ end
+end
+
+def fun_l3_n117(x)
+ if (x < 1)
+ fun_l4_n140(x)
+ else
+ fun_l4_n456(x)
+ end
+end
+
+def fun_l3_n118(x)
+ if (x < 1)
+ fun_l4_n920(x)
+ else
+ fun_l4_n701(x)
+ end
+end
+
+def fun_l3_n119(x)
+ if (x < 1)
+ fun_l4_n263(x)
+ else
+ fun_l4_n837(x)
+ end
+end
+
+def fun_l3_n120(x)
+ if (x < 1)
+ fun_l4_n54(x)
+ else
+ fun_l4_n964(x)
+ end
+end
+
+def fun_l3_n121(x)
+ if (x < 1)
+ fun_l4_n540(x)
+ else
+ fun_l4_n543(x)
+ end
+end
+
+def fun_l3_n122(x)
+ if (x < 1)
+ fun_l4_n51(x)
+ else
+ fun_l4_n453(x)
+ end
+end
+
+def fun_l3_n123(x)
+ if (x < 1)
+ fun_l4_n726(x)
+ else
+ fun_l4_n785(x)
+ end
+end
+
+def fun_l3_n124(x)
+ if (x < 1)
+ fun_l4_n932(x)
+ else
+ fun_l4_n583(x)
+ end
+end
+
+def fun_l3_n125(x)
+ if (x < 1)
+ fun_l4_n471(x)
+ else
+ fun_l4_n518(x)
+ end
+end
+
+def fun_l3_n126(x)
+ if (x < 1)
+ fun_l4_n351(x)
+ else
+ fun_l4_n825(x)
+ end
+end
+
+def fun_l3_n127(x)
+ if (x < 1)
+ fun_l4_n759(x)
+ else
+ fun_l4_n203(x)
+ end
+end
+
+def fun_l3_n128(x)
+ if (x < 1)
+ fun_l4_n336(x)
+ else
+ fun_l4_n861(x)
+ end
+end
+
+def fun_l3_n129(x)
+ if (x < 1)
+ fun_l4_n573(x)
+ else
+ fun_l4_n568(x)
+ end
+end
+
+def fun_l3_n130(x)
+ if (x < 1)
+ fun_l4_n788(x)
+ else
+ fun_l4_n259(x)
+ end
+end
+
+def fun_l3_n131(x)
+ if (x < 1)
+ fun_l4_n392(x)
+ else
+ fun_l4_n932(x)
+ end
+end
+
+def fun_l3_n132(x)
+ if (x < 1)
+ fun_l4_n919(x)
+ else
+ fun_l4_n650(x)
+ end
+end
+
+def fun_l3_n133(x)
+ if (x < 1)
+ fun_l4_n895(x)
+ else
+ fun_l4_n983(x)
+ end
+end
+
+def fun_l3_n134(x)
+ if (x < 1)
+ fun_l4_n389(x)
+ else
+ fun_l4_n358(x)
+ end
+end
+
+def fun_l3_n135(x)
+ if (x < 1)
+ fun_l4_n732(x)
+ else
+ fun_l4_n747(x)
+ end
+end
+
+def fun_l3_n136(x)
+ if (x < 1)
+ fun_l4_n756(x)
+ else
+ fun_l4_n592(x)
+ end
+end
+
+def fun_l3_n137(x)
+ if (x < 1)
+ fun_l4_n581(x)
+ else
+ fun_l4_n24(x)
+ end
+end
+
+def fun_l3_n138(x)
+ if (x < 1)
+ fun_l4_n932(x)
+ else
+ fun_l4_n599(x)
+ end
+end
+
+def fun_l3_n139(x)
+ if (x < 1)
+ fun_l4_n955(x)
+ else
+ fun_l4_n148(x)
+ end
+end
+
+def fun_l3_n140(x)
+ if (x < 1)
+ fun_l4_n332(x)
+ else
+ fun_l4_n677(x)
+ end
+end
+
+def fun_l3_n141(x)
+ if (x < 1)
+ fun_l4_n152(x)
+ else
+ fun_l4_n696(x)
+ end
+end
+
+def fun_l3_n142(x)
+ if (x < 1)
+ fun_l4_n295(x)
+ else
+ fun_l4_n205(x)
+ end
+end
+
+def fun_l3_n143(x)
+ if (x < 1)
+ fun_l4_n543(x)
+ else
+ fun_l4_n951(x)
+ end
+end
+
+def fun_l3_n144(x)
+ if (x < 1)
+ fun_l4_n656(x)
+ else
+ fun_l4_n494(x)
+ end
+end
+
+def fun_l3_n145(x)
+ if (x < 1)
+ fun_l4_n729(x)
+ else
+ fun_l4_n749(x)
+ end
+end
+
+def fun_l3_n146(x)
+ if (x < 1)
+ fun_l4_n197(x)
+ else
+ fun_l4_n3(x)
+ end
+end
+
+def fun_l3_n147(x)
+ if (x < 1)
+ fun_l4_n519(x)
+ else
+ fun_l4_n36(x)
+ end
+end
+
+def fun_l3_n148(x)
+ if (x < 1)
+ fun_l4_n100(x)
+ else
+ fun_l4_n463(x)
+ end
+end
+
+def fun_l3_n149(x)
+ if (x < 1)
+ fun_l4_n890(x)
+ else
+ fun_l4_n947(x)
+ end
+end
+
+def fun_l3_n150(x)
+ if (x < 1)
+ fun_l4_n512(x)
+ else
+ fun_l4_n982(x)
+ end
+end
+
+def fun_l3_n151(x)
+ if (x < 1)
+ fun_l4_n750(x)
+ else
+ fun_l4_n781(x)
+ end
+end
+
+def fun_l3_n152(x)
+ if (x < 1)
+ fun_l4_n193(x)
+ else
+ fun_l4_n530(x)
+ end
+end
+
+def fun_l3_n153(x)
+ if (x < 1)
+ fun_l4_n189(x)
+ else
+ fun_l4_n209(x)
+ end
+end
+
+def fun_l3_n154(x)
+ if (x < 1)
+ fun_l4_n343(x)
+ else
+ fun_l4_n44(x)
+ end
+end
+
+def fun_l3_n155(x)
+ if (x < 1)
+ fun_l4_n536(x)
+ else
+ fun_l4_n228(x)
+ end
+end
+
+def fun_l3_n156(x)
+ if (x < 1)
+ fun_l4_n475(x)
+ else
+ fun_l4_n790(x)
+ end
+end
+
+def fun_l3_n157(x)
+ if (x < 1)
+ fun_l4_n954(x)
+ else
+ fun_l4_n242(x)
+ end
+end
+
+def fun_l3_n158(x)
+ if (x < 1)
+ fun_l4_n19(x)
+ else
+ fun_l4_n735(x)
+ end
+end
+
+def fun_l3_n159(x)
+ if (x < 1)
+ fun_l4_n900(x)
+ else
+ fun_l4_n456(x)
+ end
+end
+
+def fun_l3_n160(x)
+ if (x < 1)
+ fun_l4_n193(x)
+ else
+ fun_l4_n606(x)
+ end
+end
+
+def fun_l3_n161(x)
+ if (x < 1)
+ fun_l4_n684(x)
+ else
+ fun_l4_n622(x)
+ end
+end
+
+def fun_l3_n162(x)
+ if (x < 1)
+ fun_l4_n260(x)
+ else
+ fun_l4_n582(x)
+ end
+end
+
+def fun_l3_n163(x)
+ if (x < 1)
+ fun_l4_n713(x)
+ else
+ fun_l4_n601(x)
+ end
+end
+
+def fun_l3_n164(x)
+ if (x < 1)
+ fun_l4_n819(x)
+ else
+ fun_l4_n642(x)
+ end
+end
+
+def fun_l3_n165(x)
+ if (x < 1)
+ fun_l4_n45(x)
+ else
+ fun_l4_n777(x)
+ end
+end
+
+def fun_l3_n166(x)
+ if (x < 1)
+ fun_l4_n256(x)
+ else
+ fun_l4_n92(x)
+ end
+end
+
+def fun_l3_n167(x)
+ if (x < 1)
+ fun_l4_n975(x)
+ else
+ fun_l4_n962(x)
+ end
+end
+
+def fun_l3_n168(x)
+ if (x < 1)
+ fun_l4_n579(x)
+ else
+ fun_l4_n208(x)
+ end
+end
+
+def fun_l3_n169(x)
+ if (x < 1)
+ fun_l4_n133(x)
+ else
+ fun_l4_n636(x)
+ end
+end
+
+def fun_l3_n170(x)
+ if (x < 1)
+ fun_l4_n863(x)
+ else
+ fun_l4_n168(x)
+ end
+end
+
+def fun_l3_n171(x)
+ if (x < 1)
+ fun_l4_n396(x)
+ else
+ fun_l4_n654(x)
+ end
+end
+
+def fun_l3_n172(x)
+ if (x < 1)
+ fun_l4_n963(x)
+ else
+ fun_l4_n420(x)
+ end
+end
+
+def fun_l3_n173(x)
+ if (x < 1)
+ fun_l4_n487(x)
+ else
+ fun_l4_n573(x)
+ end
+end
+
+def fun_l3_n174(x)
+ if (x < 1)
+ fun_l4_n847(x)
+ else
+ fun_l4_n476(x)
+ end
+end
+
+def fun_l3_n175(x)
+ if (x < 1)
+ fun_l4_n712(x)
+ else
+ fun_l4_n522(x)
+ end
+end
+
+def fun_l3_n176(x)
+ if (x < 1)
+ fun_l4_n292(x)
+ else
+ fun_l4_n717(x)
+ end
+end
+
+def fun_l3_n177(x)
+ if (x < 1)
+ fun_l4_n945(x)
+ else
+ fun_l4_n146(x)
+ end
+end
+
+def fun_l3_n178(x)
+ if (x < 1)
+ fun_l4_n163(x)
+ else
+ fun_l4_n28(x)
+ end
+end
+
+def fun_l3_n179(x)
+ if (x < 1)
+ fun_l4_n738(x)
+ else
+ fun_l4_n502(x)
+ end
+end
+
+def fun_l3_n180(x)
+ if (x < 1)
+ fun_l4_n8(x)
+ else
+ fun_l4_n56(x)
+ end
+end
+
+def fun_l3_n181(x)
+ if (x < 1)
+ fun_l4_n58(x)
+ else
+ fun_l4_n155(x)
+ end
+end
+
+def fun_l3_n182(x)
+ if (x < 1)
+ fun_l4_n298(x)
+ else
+ fun_l4_n580(x)
+ end
+end
+
+def fun_l3_n183(x)
+ if (x < 1)
+ fun_l4_n860(x)
+ else
+ fun_l4_n176(x)
+ end
+end
+
+def fun_l3_n184(x)
+ if (x < 1)
+ fun_l4_n108(x)
+ else
+ fun_l4_n986(x)
+ end
+end
+
+def fun_l3_n185(x)
+ if (x < 1)
+ fun_l4_n366(x)
+ else
+ fun_l4_n110(x)
+ end
+end
+
+def fun_l3_n186(x)
+ if (x < 1)
+ fun_l4_n177(x)
+ else
+ fun_l4_n158(x)
+ end
+end
+
+def fun_l3_n187(x)
+ if (x < 1)
+ fun_l4_n212(x)
+ else
+ fun_l4_n803(x)
+ end
+end
+
+def fun_l3_n188(x)
+ if (x < 1)
+ fun_l4_n946(x)
+ else
+ fun_l4_n281(x)
+ end
+end
+
+def fun_l3_n189(x)
+ if (x < 1)
+ fun_l4_n610(x)
+ else
+ fun_l4_n691(x)
+ end
+end
+
+def fun_l3_n190(x)
+ if (x < 1)
+ fun_l4_n784(x)
+ else
+ fun_l4_n300(x)
+ end
+end
+
+def fun_l3_n191(x)
+ if (x < 1)
+ fun_l4_n272(x)
+ else
+ fun_l4_n809(x)
+ end
+end
+
+def fun_l3_n192(x)
+ if (x < 1)
+ fun_l4_n812(x)
+ else
+ fun_l4_n633(x)
+ end
+end
+
+def fun_l3_n193(x)
+ if (x < 1)
+ fun_l4_n880(x)
+ else
+ fun_l4_n267(x)
+ end
+end
+
+def fun_l3_n194(x)
+ if (x < 1)
+ fun_l4_n454(x)
+ else
+ fun_l4_n567(x)
+ end
+end
+
+def fun_l3_n195(x)
+ if (x < 1)
+ fun_l4_n919(x)
+ else
+ fun_l4_n184(x)
+ end
+end
+
+def fun_l3_n196(x)
+ if (x < 1)
+ fun_l4_n294(x)
+ else
+ fun_l4_n150(x)
+ end
+end
+
+def fun_l3_n197(x)
+ if (x < 1)
+ fun_l4_n543(x)
+ else
+ fun_l4_n319(x)
+ end
+end
+
+def fun_l3_n198(x)
+ if (x < 1)
+ fun_l4_n91(x)
+ else
+ fun_l4_n378(x)
+ end
+end
+
+def fun_l3_n199(x)
+ if (x < 1)
+ fun_l4_n590(x)
+ else
+ fun_l4_n195(x)
+ end
+end
+
+def fun_l3_n200(x)
+ if (x < 1)
+ fun_l4_n532(x)
+ else
+ fun_l4_n346(x)
+ end
+end
+
+def fun_l3_n201(x)
+ if (x < 1)
+ fun_l4_n340(x)
+ else
+ fun_l4_n129(x)
+ end
+end
+
+def fun_l3_n202(x)
+ if (x < 1)
+ fun_l4_n193(x)
+ else
+ fun_l4_n676(x)
+ end
+end
+
+def fun_l3_n203(x)
+ if (x < 1)
+ fun_l4_n210(x)
+ else
+ fun_l4_n982(x)
+ end
+end
+
+def fun_l3_n204(x)
+ if (x < 1)
+ fun_l4_n247(x)
+ else
+ fun_l4_n550(x)
+ end
+end
+
+def fun_l3_n205(x)
+ if (x < 1)
+ fun_l4_n727(x)
+ else
+ fun_l4_n737(x)
+ end
+end
+
+def fun_l3_n206(x)
+ if (x < 1)
+ fun_l4_n111(x)
+ else
+ fun_l4_n952(x)
+ end
+end
+
+def fun_l3_n207(x)
+ if (x < 1)
+ fun_l4_n996(x)
+ else
+ fun_l4_n865(x)
+ end
+end
+
+def fun_l3_n208(x)
+ if (x < 1)
+ fun_l4_n945(x)
+ else
+ fun_l4_n488(x)
+ end
+end
+
+def fun_l3_n209(x)
+ if (x < 1)
+ fun_l4_n697(x)
+ else
+ fun_l4_n366(x)
+ end
+end
+
+def fun_l3_n210(x)
+ if (x < 1)
+ fun_l4_n180(x)
+ else
+ fun_l4_n995(x)
+ end
+end
+
+def fun_l3_n211(x)
+ if (x < 1)
+ fun_l4_n972(x)
+ else
+ fun_l4_n783(x)
+ end
+end
+
+def fun_l3_n212(x)
+ if (x < 1)
+ fun_l4_n58(x)
+ else
+ fun_l4_n430(x)
+ end
+end
+
+def fun_l3_n213(x)
+ if (x < 1)
+ fun_l4_n904(x)
+ else
+ fun_l4_n703(x)
+ end
+end
+
+def fun_l3_n214(x)
+ if (x < 1)
+ fun_l4_n882(x)
+ else
+ fun_l4_n648(x)
+ end
+end
+
+def fun_l3_n215(x)
+ if (x < 1)
+ fun_l4_n800(x)
+ else
+ fun_l4_n680(x)
+ end
+end
+
+def fun_l3_n216(x)
+ if (x < 1)
+ fun_l4_n205(x)
+ else
+ fun_l4_n185(x)
+ end
+end
+
+def fun_l3_n217(x)
+ if (x < 1)
+ fun_l4_n242(x)
+ else
+ fun_l4_n834(x)
+ end
+end
+
+def fun_l3_n218(x)
+ if (x < 1)
+ fun_l4_n551(x)
+ else
+ fun_l4_n399(x)
+ end
+end
+
+def fun_l3_n219(x)
+ if (x < 1)
+ fun_l4_n820(x)
+ else
+ fun_l4_n403(x)
+ end
+end
+
+def fun_l3_n220(x)
+ if (x < 1)
+ fun_l4_n874(x)
+ else
+ fun_l4_n584(x)
+ end
+end
+
+def fun_l3_n221(x)
+ if (x < 1)
+ fun_l4_n845(x)
+ else
+ fun_l4_n56(x)
+ end
+end
+
+def fun_l3_n222(x)
+ if (x < 1)
+ fun_l4_n947(x)
+ else
+ fun_l4_n299(x)
+ end
+end
+
+def fun_l3_n223(x)
+ if (x < 1)
+ fun_l4_n533(x)
+ else
+ fun_l4_n184(x)
+ end
+end
+
+def fun_l3_n224(x)
+ if (x < 1)
+ fun_l4_n760(x)
+ else
+ fun_l4_n507(x)
+ end
+end
+
+def fun_l3_n225(x)
+ if (x < 1)
+ fun_l4_n47(x)
+ else
+ fun_l4_n712(x)
+ end
+end
+
+def fun_l3_n226(x)
+ if (x < 1)
+ fun_l4_n470(x)
+ else
+ fun_l4_n760(x)
+ end
+end
+
+def fun_l3_n227(x)
+ if (x < 1)
+ fun_l4_n932(x)
+ else
+ fun_l4_n292(x)
+ end
+end
+
+def fun_l3_n228(x)
+ if (x < 1)
+ fun_l4_n44(x)
+ else
+ fun_l4_n855(x)
+ end
+end
+
+def fun_l3_n229(x)
+ if (x < 1)
+ fun_l4_n385(x)
+ else
+ fun_l4_n284(x)
+ end
+end
+
+def fun_l3_n230(x)
+ if (x < 1)
+ fun_l4_n272(x)
+ else
+ fun_l4_n407(x)
+ end
+end
+
+def fun_l3_n231(x)
+ if (x < 1)
+ fun_l4_n820(x)
+ else
+ fun_l4_n375(x)
+ end
+end
+
+def fun_l3_n232(x)
+ if (x < 1)
+ fun_l4_n165(x)
+ else
+ fun_l4_n38(x)
+ end
+end
+
+def fun_l3_n233(x)
+ if (x < 1)
+ fun_l4_n772(x)
+ else
+ fun_l4_n179(x)
+ end
+end
+
+def fun_l3_n234(x)
+ if (x < 1)
+ fun_l4_n980(x)
+ else
+ fun_l4_n678(x)
+ end
+end
+
+def fun_l3_n235(x)
+ if (x < 1)
+ fun_l4_n279(x)
+ else
+ fun_l4_n834(x)
+ end
+end
+
+def fun_l3_n236(x)
+ if (x < 1)
+ fun_l4_n227(x)
+ else
+ fun_l4_n11(x)
+ end
+end
+
+def fun_l3_n237(x)
+ if (x < 1)
+ fun_l4_n724(x)
+ else
+ fun_l4_n659(x)
+ end
+end
+
+def fun_l3_n238(x)
+ if (x < 1)
+ fun_l4_n569(x)
+ else
+ fun_l4_n693(x)
+ end
+end
+
+def fun_l3_n239(x)
+ if (x < 1)
+ fun_l4_n933(x)
+ else
+ fun_l4_n897(x)
+ end
+end
+
+def fun_l3_n240(x)
+ if (x < 1)
+ fun_l4_n215(x)
+ else
+ fun_l4_n784(x)
+ end
+end
+
+def fun_l3_n241(x)
+ if (x < 1)
+ fun_l4_n964(x)
+ else
+ fun_l4_n430(x)
+ end
+end
+
+def fun_l3_n242(x)
+ if (x < 1)
+ fun_l4_n91(x)
+ else
+ fun_l4_n190(x)
+ end
+end
+
+def fun_l3_n243(x)
+ if (x < 1)
+ fun_l4_n375(x)
+ else
+ fun_l4_n638(x)
+ end
+end
+
+def fun_l3_n244(x)
+ if (x < 1)
+ fun_l4_n381(x)
+ else
+ fun_l4_n324(x)
+ end
+end
+
+def fun_l3_n245(x)
+ if (x < 1)
+ fun_l4_n983(x)
+ else
+ fun_l4_n248(x)
+ end
+end
+
+def fun_l3_n246(x)
+ if (x < 1)
+ fun_l4_n336(x)
+ else
+ fun_l4_n647(x)
+ end
+end
+
+def fun_l3_n247(x)
+ if (x < 1)
+ fun_l4_n64(x)
+ else
+ fun_l4_n957(x)
+ end
+end
+
+def fun_l3_n248(x)
+ if (x < 1)
+ fun_l4_n313(x)
+ else
+ fun_l4_n662(x)
+ end
+end
+
+def fun_l3_n249(x)
+ if (x < 1)
+ fun_l4_n528(x)
+ else
+ fun_l4_n448(x)
+ end
+end
+
+def fun_l3_n250(x)
+ if (x < 1)
+ fun_l4_n9(x)
+ else
+ fun_l4_n424(x)
+ end
+end
+
+def fun_l3_n251(x)
+ if (x < 1)
+ fun_l4_n290(x)
+ else
+ fun_l4_n416(x)
+ end
+end
+
+def fun_l3_n252(x)
+ if (x < 1)
+ fun_l4_n159(x)
+ else
+ fun_l4_n780(x)
+ end
+end
+
+def fun_l3_n253(x)
+ if (x < 1)
+ fun_l4_n863(x)
+ else
+ fun_l4_n192(x)
+ end
+end
+
+def fun_l3_n254(x)
+ if (x < 1)
+ fun_l4_n658(x)
+ else
+ fun_l4_n816(x)
+ end
+end
+
+def fun_l3_n255(x)
+ if (x < 1)
+ fun_l4_n686(x)
+ else
+ fun_l4_n586(x)
+ end
+end
+
+def fun_l3_n256(x)
+ if (x < 1)
+ fun_l4_n110(x)
+ else
+ fun_l4_n290(x)
+ end
+end
+
+def fun_l3_n257(x)
+ if (x < 1)
+ fun_l4_n355(x)
+ else
+ fun_l4_n862(x)
+ end
+end
+
+def fun_l3_n258(x)
+ if (x < 1)
+ fun_l4_n63(x)
+ else
+ fun_l4_n205(x)
+ end
+end
+
+def fun_l3_n259(x)
+ if (x < 1)
+ fun_l4_n766(x)
+ else
+ fun_l4_n130(x)
+ end
+end
+
+def fun_l3_n260(x)
+ if (x < 1)
+ fun_l4_n670(x)
+ else
+ fun_l4_n313(x)
+ end
+end
+
+def fun_l3_n261(x)
+ if (x < 1)
+ fun_l4_n738(x)
+ else
+ fun_l4_n796(x)
+ end
+end
+
+def fun_l3_n262(x)
+ if (x < 1)
+ fun_l4_n925(x)
+ else
+ fun_l4_n267(x)
+ end
+end
+
+def fun_l3_n263(x)
+ if (x < 1)
+ fun_l4_n515(x)
+ else
+ fun_l4_n298(x)
+ end
+end
+
+def fun_l3_n264(x)
+ if (x < 1)
+ fun_l4_n883(x)
+ else
+ fun_l4_n809(x)
+ end
+end
+
+def fun_l3_n265(x)
+ if (x < 1)
+ fun_l4_n138(x)
+ else
+ fun_l4_n665(x)
+ end
+end
+
+def fun_l3_n266(x)
+ if (x < 1)
+ fun_l4_n141(x)
+ else
+ fun_l4_n641(x)
+ end
+end
+
+def fun_l3_n267(x)
+ if (x < 1)
+ fun_l4_n936(x)
+ else
+ fun_l4_n233(x)
+ end
+end
+
+def fun_l3_n268(x)
+ if (x < 1)
+ fun_l4_n28(x)
+ else
+ fun_l4_n351(x)
+ end
+end
+
+def fun_l3_n269(x)
+ if (x < 1)
+ fun_l4_n62(x)
+ else
+ fun_l4_n17(x)
+ end
+end
+
+def fun_l3_n270(x)
+ if (x < 1)
+ fun_l4_n489(x)
+ else
+ fun_l4_n408(x)
+ end
+end
+
+def fun_l3_n271(x)
+ if (x < 1)
+ fun_l4_n276(x)
+ else
+ fun_l4_n799(x)
+ end
+end
+
+def fun_l3_n272(x)
+ if (x < 1)
+ fun_l4_n103(x)
+ else
+ fun_l4_n804(x)
+ end
+end
+
+def fun_l3_n273(x)
+ if (x < 1)
+ fun_l4_n850(x)
+ else
+ fun_l4_n388(x)
+ end
+end
+
+def fun_l3_n274(x)
+ if (x < 1)
+ fun_l4_n651(x)
+ else
+ fun_l4_n484(x)
+ end
+end
+
+def fun_l3_n275(x)
+ if (x < 1)
+ fun_l4_n693(x)
+ else
+ fun_l4_n20(x)
+ end
+end
+
+def fun_l3_n276(x)
+ if (x < 1)
+ fun_l4_n897(x)
+ else
+ fun_l4_n328(x)
+ end
+end
+
+def fun_l3_n277(x)
+ if (x < 1)
+ fun_l4_n632(x)
+ else
+ fun_l4_n120(x)
+ end
+end
+
+def fun_l3_n278(x)
+ if (x < 1)
+ fun_l4_n919(x)
+ else
+ fun_l4_n921(x)
+ end
+end
+
+def fun_l3_n279(x)
+ if (x < 1)
+ fun_l4_n461(x)
+ else
+ fun_l4_n219(x)
+ end
+end
+
+def fun_l3_n280(x)
+ if (x < 1)
+ fun_l4_n867(x)
+ else
+ fun_l4_n682(x)
+ end
+end
+
+def fun_l3_n281(x)
+ if (x < 1)
+ fun_l4_n233(x)
+ else
+ fun_l4_n589(x)
+ end
+end
+
+def fun_l3_n282(x)
+ if (x < 1)
+ fun_l4_n516(x)
+ else
+ fun_l4_n970(x)
+ end
+end
+
+def fun_l3_n283(x)
+ if (x < 1)
+ fun_l4_n300(x)
+ else
+ fun_l4_n934(x)
+ end
+end
+
+def fun_l3_n284(x)
+ if (x < 1)
+ fun_l4_n736(x)
+ else
+ fun_l4_n516(x)
+ end
+end
+
+def fun_l3_n285(x)
+ if (x < 1)
+ fun_l4_n401(x)
+ else
+ fun_l4_n539(x)
+ end
+end
+
+def fun_l3_n286(x)
+ if (x < 1)
+ fun_l4_n342(x)
+ else
+ fun_l4_n142(x)
+ end
+end
+
+def fun_l3_n287(x)
+ if (x < 1)
+ fun_l4_n44(x)
+ else
+ fun_l4_n311(x)
+ end
+end
+
+def fun_l3_n288(x)
+ if (x < 1)
+ fun_l4_n698(x)
+ else
+ fun_l4_n407(x)
+ end
+end
+
+def fun_l3_n289(x)
+ if (x < 1)
+ fun_l4_n714(x)
+ else
+ fun_l4_n324(x)
+ end
+end
+
+def fun_l3_n290(x)
+ if (x < 1)
+ fun_l4_n862(x)
+ else
+ fun_l4_n807(x)
+ end
+end
+
+def fun_l3_n291(x)
+ if (x < 1)
+ fun_l4_n446(x)
+ else
+ fun_l4_n378(x)
+ end
+end
+
+def fun_l3_n292(x)
+ if (x < 1)
+ fun_l4_n418(x)
+ else
+ fun_l4_n194(x)
+ end
+end
+
+def fun_l3_n293(x)
+ if (x < 1)
+ fun_l4_n336(x)
+ else
+ fun_l4_n895(x)
+ end
+end
+
+def fun_l3_n294(x)
+ if (x < 1)
+ fun_l4_n928(x)
+ else
+ fun_l4_n154(x)
+ end
+end
+
+def fun_l3_n295(x)
+ if (x < 1)
+ fun_l4_n764(x)
+ else
+ fun_l4_n335(x)
+ end
+end
+
+def fun_l3_n296(x)
+ if (x < 1)
+ fun_l4_n840(x)
+ else
+ fun_l4_n513(x)
+ end
+end
+
+def fun_l3_n297(x)
+ if (x < 1)
+ fun_l4_n520(x)
+ else
+ fun_l4_n838(x)
+ end
+end
+
+def fun_l3_n298(x)
+ if (x < 1)
+ fun_l4_n831(x)
+ else
+ fun_l4_n344(x)
+ end
+end
+
+def fun_l3_n299(x)
+ if (x < 1)
+ fun_l4_n110(x)
+ else
+ fun_l4_n19(x)
+ end
+end
+
+def fun_l3_n300(x)
+ if (x < 1)
+ fun_l4_n272(x)
+ else
+ fun_l4_n952(x)
+ end
+end
+
+def fun_l3_n301(x)
+ if (x < 1)
+ fun_l4_n659(x)
+ else
+ fun_l4_n439(x)
+ end
+end
+
+def fun_l3_n302(x)
+ if (x < 1)
+ fun_l4_n787(x)
+ else
+ fun_l4_n189(x)
+ end
+end
+
+def fun_l3_n303(x)
+ if (x < 1)
+ fun_l4_n549(x)
+ else
+ fun_l4_n594(x)
+ end
+end
+
+def fun_l3_n304(x)
+ if (x < 1)
+ fun_l4_n255(x)
+ else
+ fun_l4_n822(x)
+ end
+end
+
+def fun_l3_n305(x)
+ if (x < 1)
+ fun_l4_n312(x)
+ else
+ fun_l4_n935(x)
+ end
+end
+
+def fun_l3_n306(x)
+ if (x < 1)
+ fun_l4_n831(x)
+ else
+ fun_l4_n299(x)
+ end
+end
+
+def fun_l3_n307(x)
+ if (x < 1)
+ fun_l4_n154(x)
+ else
+ fun_l4_n520(x)
+ end
+end
+
+def fun_l3_n308(x)
+ if (x < 1)
+ fun_l4_n768(x)
+ else
+ fun_l4_n676(x)
+ end
+end
+
+def fun_l3_n309(x)
+ if (x < 1)
+ fun_l4_n816(x)
+ else
+ fun_l4_n447(x)
+ end
+end
+
+def fun_l3_n310(x)
+ if (x < 1)
+ fun_l4_n689(x)
+ else
+ fun_l4_n244(x)
+ end
+end
+
+def fun_l3_n311(x)
+ if (x < 1)
+ fun_l4_n389(x)
+ else
+ fun_l4_n326(x)
+ end
+end
+
+def fun_l3_n312(x)
+ if (x < 1)
+ fun_l4_n125(x)
+ else
+ fun_l4_n502(x)
+ end
+end
+
+def fun_l3_n313(x)
+ if (x < 1)
+ fun_l4_n327(x)
+ else
+ fun_l4_n123(x)
+ end
+end
+
+def fun_l3_n314(x)
+ if (x < 1)
+ fun_l4_n558(x)
+ else
+ fun_l4_n940(x)
+ end
+end
+
+def fun_l3_n315(x)
+ if (x < 1)
+ fun_l4_n652(x)
+ else
+ fun_l4_n10(x)
+ end
+end
+
+def fun_l3_n316(x)
+ if (x < 1)
+ fun_l4_n483(x)
+ else
+ fun_l4_n315(x)
+ end
+end
+
+def fun_l3_n317(x)
+ if (x < 1)
+ fun_l4_n567(x)
+ else
+ fun_l4_n540(x)
+ end
+end
+
+def fun_l3_n318(x)
+ if (x < 1)
+ fun_l4_n449(x)
+ else
+ fun_l4_n760(x)
+ end
+end
+
+def fun_l3_n319(x)
+ if (x < 1)
+ fun_l4_n111(x)
+ else
+ fun_l4_n173(x)
+ end
+end
+
+def fun_l3_n320(x)
+ if (x < 1)
+ fun_l4_n373(x)
+ else
+ fun_l4_n615(x)
+ end
+end
+
+def fun_l3_n321(x)
+ if (x < 1)
+ fun_l4_n570(x)
+ else
+ fun_l4_n27(x)
+ end
+end
+
+def fun_l3_n322(x)
+ if (x < 1)
+ fun_l4_n235(x)
+ else
+ fun_l4_n695(x)
+ end
+end
+
+def fun_l3_n323(x)
+ if (x < 1)
+ fun_l4_n788(x)
+ else
+ fun_l4_n57(x)
+ end
+end
+
+def fun_l3_n324(x)
+ if (x < 1)
+ fun_l4_n7(x)
+ else
+ fun_l4_n75(x)
+ end
+end
+
+def fun_l3_n325(x)
+ if (x < 1)
+ fun_l4_n502(x)
+ else
+ fun_l4_n459(x)
+ end
+end
+
+def fun_l3_n326(x)
+ if (x < 1)
+ fun_l4_n572(x)
+ else
+ fun_l4_n324(x)
+ end
+end
+
+def fun_l3_n327(x)
+ if (x < 1)
+ fun_l4_n860(x)
+ else
+ fun_l4_n250(x)
+ end
+end
+
+def fun_l3_n328(x)
+ if (x < 1)
+ fun_l4_n242(x)
+ else
+ fun_l4_n667(x)
+ end
+end
+
+def fun_l3_n329(x)
+ if (x < 1)
+ fun_l4_n589(x)
+ else
+ fun_l4_n236(x)
+ end
+end
+
+def fun_l3_n330(x)
+ if (x < 1)
+ fun_l4_n100(x)
+ else
+ fun_l4_n476(x)
+ end
+end
+
+def fun_l3_n331(x)
+ if (x < 1)
+ fun_l4_n779(x)
+ else
+ fun_l4_n667(x)
+ end
+end
+
+def fun_l3_n332(x)
+ if (x < 1)
+ fun_l4_n277(x)
+ else
+ fun_l4_n441(x)
+ end
+end
+
+def fun_l3_n333(x)
+ if (x < 1)
+ fun_l4_n379(x)
+ else
+ fun_l4_n331(x)
+ end
+end
+
+def fun_l3_n334(x)
+ if (x < 1)
+ fun_l4_n802(x)
+ else
+ fun_l4_n588(x)
+ end
+end
+
+def fun_l3_n335(x)
+ if (x < 1)
+ fun_l4_n385(x)
+ else
+ fun_l4_n918(x)
+ end
+end
+
+def fun_l3_n336(x)
+ if (x < 1)
+ fun_l4_n532(x)
+ else
+ fun_l4_n254(x)
+ end
+end
+
+def fun_l3_n337(x)
+ if (x < 1)
+ fun_l4_n920(x)
+ else
+ fun_l4_n134(x)
+ end
+end
+
+def fun_l3_n338(x)
+ if (x < 1)
+ fun_l4_n803(x)
+ else
+ fun_l4_n746(x)
+ end
+end
+
+def fun_l3_n339(x)
+ if (x < 1)
+ fun_l4_n924(x)
+ else
+ fun_l4_n878(x)
+ end
+end
+
+def fun_l3_n340(x)
+ if (x < 1)
+ fun_l4_n166(x)
+ else
+ fun_l4_n776(x)
+ end
+end
+
+def fun_l3_n341(x)
+ if (x < 1)
+ fun_l4_n240(x)
+ else
+ fun_l4_n898(x)
+ end
+end
+
+def fun_l3_n342(x)
+ if (x < 1)
+ fun_l4_n810(x)
+ else
+ fun_l4_n423(x)
+ end
+end
+
+def fun_l3_n343(x)
+ if (x < 1)
+ fun_l4_n209(x)
+ else
+ fun_l4_n514(x)
+ end
+end
+
+def fun_l3_n344(x)
+ if (x < 1)
+ fun_l4_n505(x)
+ else
+ fun_l4_n321(x)
+ end
+end
+
+def fun_l3_n345(x)
+ if (x < 1)
+ fun_l4_n88(x)
+ else
+ fun_l4_n39(x)
+ end
+end
+
+def fun_l3_n346(x)
+ if (x < 1)
+ fun_l4_n848(x)
+ else
+ fun_l4_n357(x)
+ end
+end
+
+def fun_l3_n347(x)
+ if (x < 1)
+ fun_l4_n450(x)
+ else
+ fun_l4_n704(x)
+ end
+end
+
+def fun_l3_n348(x)
+ if (x < 1)
+ fun_l4_n881(x)
+ else
+ fun_l4_n916(x)
+ end
+end
+
+def fun_l3_n349(x)
+ if (x < 1)
+ fun_l4_n16(x)
+ else
+ fun_l4_n996(x)
+ end
+end
+
+def fun_l3_n350(x)
+ if (x < 1)
+ fun_l4_n839(x)
+ else
+ fun_l4_n697(x)
+ end
+end
+
+def fun_l3_n351(x)
+ if (x < 1)
+ fun_l4_n177(x)
+ else
+ fun_l4_n859(x)
+ end
+end
+
+def fun_l3_n352(x)
+ if (x < 1)
+ fun_l4_n684(x)
+ else
+ fun_l4_n778(x)
+ end
+end
+
+def fun_l3_n353(x)
+ if (x < 1)
+ fun_l4_n604(x)
+ else
+ fun_l4_n280(x)
+ end
+end
+
+def fun_l3_n354(x)
+ if (x < 1)
+ fun_l4_n366(x)
+ else
+ fun_l4_n576(x)
+ end
+end
+
+def fun_l3_n355(x)
+ if (x < 1)
+ fun_l4_n584(x)
+ else
+ fun_l4_n228(x)
+ end
+end
+
+def fun_l3_n356(x)
+ if (x < 1)
+ fun_l4_n844(x)
+ else
+ fun_l4_n799(x)
+ end
+end
+
+def fun_l3_n357(x)
+ if (x < 1)
+ fun_l4_n489(x)
+ else
+ fun_l4_n905(x)
+ end
+end
+
+def fun_l3_n358(x)
+ if (x < 1)
+ fun_l4_n781(x)
+ else
+ fun_l4_n565(x)
+ end
+end
+
+def fun_l3_n359(x)
+ if (x < 1)
+ fun_l4_n110(x)
+ else
+ fun_l4_n326(x)
+ end
+end
+
+def fun_l3_n360(x)
+ if (x < 1)
+ fun_l4_n915(x)
+ else
+ fun_l4_n489(x)
+ end
+end
+
+def fun_l3_n361(x)
+ if (x < 1)
+ fun_l4_n110(x)
+ else
+ fun_l4_n733(x)
+ end
+end
+
+def fun_l3_n362(x)
+ if (x < 1)
+ fun_l4_n93(x)
+ else
+ fun_l4_n549(x)
+ end
+end
+
+def fun_l3_n363(x)
+ if (x < 1)
+ fun_l4_n270(x)
+ else
+ fun_l4_n883(x)
+ end
+end
+
+def fun_l3_n364(x)
+ if (x < 1)
+ fun_l4_n512(x)
+ else
+ fun_l4_n555(x)
+ end
+end
+
+def fun_l3_n365(x)
+ if (x < 1)
+ fun_l4_n800(x)
+ else
+ fun_l4_n672(x)
+ end
+end
+
+def fun_l3_n366(x)
+ if (x < 1)
+ fun_l4_n535(x)
+ else
+ fun_l4_n320(x)
+ end
+end
+
+def fun_l3_n367(x)
+ if (x < 1)
+ fun_l4_n883(x)
+ else
+ fun_l4_n365(x)
+ end
+end
+
+def fun_l3_n368(x)
+ if (x < 1)
+ fun_l4_n306(x)
+ else
+ fun_l4_n614(x)
+ end
+end
+
+def fun_l3_n369(x)
+ if (x < 1)
+ fun_l4_n914(x)
+ else
+ fun_l4_n20(x)
+ end
+end
+
+def fun_l3_n370(x)
+ if (x < 1)
+ fun_l4_n230(x)
+ else
+ fun_l4_n585(x)
+ end
+end
+
+def fun_l3_n371(x)
+ if (x < 1)
+ fun_l4_n544(x)
+ else
+ fun_l4_n752(x)
+ end
+end
+
+def fun_l3_n372(x)
+ if (x < 1)
+ fun_l4_n984(x)
+ else
+ fun_l4_n738(x)
+ end
+end
+
+def fun_l3_n373(x)
+ if (x < 1)
+ fun_l4_n478(x)
+ else
+ fun_l4_n618(x)
+ end
+end
+
+def fun_l3_n374(x)
+ if (x < 1)
+ fun_l4_n941(x)
+ else
+ fun_l4_n746(x)
+ end
+end
+
+def fun_l3_n375(x)
+ if (x < 1)
+ fun_l4_n121(x)
+ else
+ fun_l4_n798(x)
+ end
+end
+
+def fun_l3_n376(x)
+ if (x < 1)
+ fun_l4_n851(x)
+ else
+ fun_l4_n681(x)
+ end
+end
+
+def fun_l3_n377(x)
+ if (x < 1)
+ fun_l4_n502(x)
+ else
+ fun_l4_n538(x)
+ end
+end
+
+def fun_l3_n378(x)
+ if (x < 1)
+ fun_l4_n432(x)
+ else
+ fun_l4_n226(x)
+ end
+end
+
+def fun_l3_n379(x)
+ if (x < 1)
+ fun_l4_n734(x)
+ else
+ fun_l4_n684(x)
+ end
+end
+
+def fun_l3_n380(x)
+ if (x < 1)
+ fun_l4_n912(x)
+ else
+ fun_l4_n116(x)
+ end
+end
+
+def fun_l3_n381(x)
+ if (x < 1)
+ fun_l4_n291(x)
+ else
+ fun_l4_n464(x)
+ end
+end
+
+def fun_l3_n382(x)
+ if (x < 1)
+ fun_l4_n285(x)
+ else
+ fun_l4_n943(x)
+ end
+end
+
+def fun_l3_n383(x)
+ if (x < 1)
+ fun_l4_n738(x)
+ else
+ fun_l4_n532(x)
+ end
+end
+
+def fun_l3_n384(x)
+ if (x < 1)
+ fun_l4_n503(x)
+ else
+ fun_l4_n724(x)
+ end
+end
+
+def fun_l3_n385(x)
+ if (x < 1)
+ fun_l4_n208(x)
+ else
+ fun_l4_n683(x)
+ end
+end
+
+def fun_l3_n386(x)
+ if (x < 1)
+ fun_l4_n673(x)
+ else
+ fun_l4_n230(x)
+ end
+end
+
+def fun_l3_n387(x)
+ if (x < 1)
+ fun_l4_n921(x)
+ else
+ fun_l4_n800(x)
+ end
+end
+
+def fun_l3_n388(x)
+ if (x < 1)
+ fun_l4_n461(x)
+ else
+ fun_l4_n369(x)
+ end
+end
+
+def fun_l3_n389(x)
+ if (x < 1)
+ fun_l4_n86(x)
+ else
+ fun_l4_n403(x)
+ end
+end
+
+def fun_l3_n390(x)
+ if (x < 1)
+ fun_l4_n883(x)
+ else
+ fun_l4_n92(x)
+ end
+end
+
+def fun_l3_n391(x)
+ if (x < 1)
+ fun_l4_n562(x)
+ else
+ fun_l4_n826(x)
+ end
+end
+
+def fun_l3_n392(x)
+ if (x < 1)
+ fun_l4_n459(x)
+ else
+ fun_l4_n821(x)
+ end
+end
+
+def fun_l3_n393(x)
+ if (x < 1)
+ fun_l4_n774(x)
+ else
+ fun_l4_n376(x)
+ end
+end
+
+def fun_l3_n394(x)
+ if (x < 1)
+ fun_l4_n114(x)
+ else
+ fun_l4_n451(x)
+ end
+end
+
+def fun_l3_n395(x)
+ if (x < 1)
+ fun_l4_n689(x)
+ else
+ fun_l4_n13(x)
+ end
+end
+
+def fun_l3_n396(x)
+ if (x < 1)
+ fun_l4_n929(x)
+ else
+ fun_l4_n777(x)
+ end
+end
+
+def fun_l3_n397(x)
+ if (x < 1)
+ fun_l4_n634(x)
+ else
+ fun_l4_n329(x)
+ end
+end
+
+def fun_l3_n398(x)
+ if (x < 1)
+ fun_l4_n972(x)
+ else
+ fun_l4_n572(x)
+ end
+end
+
+def fun_l3_n399(x)
+ if (x < 1)
+ fun_l4_n231(x)
+ else
+ fun_l4_n14(x)
+ end
+end
+
+def fun_l3_n400(x)
+ if (x < 1)
+ fun_l4_n357(x)
+ else
+ fun_l4_n881(x)
+ end
+end
+
+def fun_l3_n401(x)
+ if (x < 1)
+ fun_l4_n283(x)
+ else
+ fun_l4_n614(x)
+ end
+end
+
+def fun_l3_n402(x)
+ if (x < 1)
+ fun_l4_n634(x)
+ else
+ fun_l4_n653(x)
+ end
+end
+
+def fun_l3_n403(x)
+ if (x < 1)
+ fun_l4_n660(x)
+ else
+ fun_l4_n127(x)
+ end
+end
+
+def fun_l3_n404(x)
+ if (x < 1)
+ fun_l4_n523(x)
+ else
+ fun_l4_n467(x)
+ end
+end
+
+def fun_l3_n405(x)
+ if (x < 1)
+ fun_l4_n593(x)
+ else
+ fun_l4_n78(x)
+ end
+end
+
+def fun_l3_n406(x)
+ if (x < 1)
+ fun_l4_n514(x)
+ else
+ fun_l4_n783(x)
+ end
+end
+
+def fun_l3_n407(x)
+ if (x < 1)
+ fun_l4_n460(x)
+ else
+ fun_l4_n137(x)
+ end
+end
+
+def fun_l3_n408(x)
+ if (x < 1)
+ fun_l4_n3(x)
+ else
+ fun_l4_n224(x)
+ end
+end
+
+def fun_l3_n409(x)
+ if (x < 1)
+ fun_l4_n11(x)
+ else
+ fun_l4_n531(x)
+ end
+end
+
+def fun_l3_n410(x)
+ if (x < 1)
+ fun_l4_n94(x)
+ else
+ fun_l4_n717(x)
+ end
+end
+
+def fun_l3_n411(x)
+ if (x < 1)
+ fun_l4_n729(x)
+ else
+ fun_l4_n526(x)
+ end
+end
+
+def fun_l3_n412(x)
+ if (x < 1)
+ fun_l4_n86(x)
+ else
+ fun_l4_n26(x)
+ end
+end
+
+def fun_l3_n413(x)
+ if (x < 1)
+ fun_l4_n249(x)
+ else
+ fun_l4_n572(x)
+ end
+end
+
+def fun_l3_n414(x)
+ if (x < 1)
+ fun_l4_n578(x)
+ else
+ fun_l4_n512(x)
+ end
+end
+
+def fun_l3_n415(x)
+ if (x < 1)
+ fun_l4_n176(x)
+ else
+ fun_l4_n414(x)
+ end
+end
+
+def fun_l3_n416(x)
+ if (x < 1)
+ fun_l4_n757(x)
+ else
+ fun_l4_n385(x)
+ end
+end
+
+def fun_l3_n417(x)
+ if (x < 1)
+ fun_l4_n249(x)
+ else
+ fun_l4_n180(x)
+ end
+end
+
+def fun_l3_n418(x)
+ if (x < 1)
+ fun_l4_n193(x)
+ else
+ fun_l4_n294(x)
+ end
+end
+
+def fun_l3_n419(x)
+ if (x < 1)
+ fun_l4_n441(x)
+ else
+ fun_l4_n932(x)
+ end
+end
+
+def fun_l3_n420(x)
+ if (x < 1)
+ fun_l4_n492(x)
+ else
+ fun_l4_n239(x)
+ end
+end
+
+def fun_l3_n421(x)
+ if (x < 1)
+ fun_l4_n49(x)
+ else
+ fun_l4_n738(x)
+ end
+end
+
+def fun_l3_n422(x)
+ if (x < 1)
+ fun_l4_n546(x)
+ else
+ fun_l4_n285(x)
+ end
+end
+
+def fun_l3_n423(x)
+ if (x < 1)
+ fun_l4_n687(x)
+ else
+ fun_l4_n973(x)
+ end
+end
+
+def fun_l3_n424(x)
+ if (x < 1)
+ fun_l4_n876(x)
+ else
+ fun_l4_n591(x)
+ end
+end
+
+def fun_l3_n425(x)
+ if (x < 1)
+ fun_l4_n626(x)
+ else
+ fun_l4_n739(x)
+ end
+end
+
+def fun_l3_n426(x)
+ if (x < 1)
+ fun_l4_n439(x)
+ else
+ fun_l4_n709(x)
+ end
+end
+
+def fun_l3_n427(x)
+ if (x < 1)
+ fun_l4_n710(x)
+ else
+ fun_l4_n305(x)
+ end
+end
+
+def fun_l3_n428(x)
+ if (x < 1)
+ fun_l4_n61(x)
+ else
+ fun_l4_n520(x)
+ end
+end
+
+def fun_l3_n429(x)
+ if (x < 1)
+ fun_l4_n172(x)
+ else
+ fun_l4_n12(x)
+ end
+end
+
+def fun_l3_n430(x)
+ if (x < 1)
+ fun_l4_n432(x)
+ else
+ fun_l4_n174(x)
+ end
+end
+
+def fun_l3_n431(x)
+ if (x < 1)
+ fun_l4_n194(x)
+ else
+ fun_l4_n673(x)
+ end
+end
+
+def fun_l3_n432(x)
+ if (x < 1)
+ fun_l4_n952(x)
+ else
+ fun_l4_n798(x)
+ end
+end
+
+def fun_l3_n433(x)
+ if (x < 1)
+ fun_l4_n915(x)
+ else
+ fun_l4_n263(x)
+ end
+end
+
+def fun_l3_n434(x)
+ if (x < 1)
+ fun_l4_n735(x)
+ else
+ fun_l4_n882(x)
+ end
+end
+
+def fun_l3_n435(x)
+ if (x < 1)
+ fun_l4_n499(x)
+ else
+ fun_l4_n947(x)
+ end
+end
+
+def fun_l3_n436(x)
+ if (x < 1)
+ fun_l4_n744(x)
+ else
+ fun_l4_n187(x)
+ end
+end
+
+def fun_l3_n437(x)
+ if (x < 1)
+ fun_l4_n244(x)
+ else
+ fun_l4_n366(x)
+ end
+end
+
+def fun_l3_n438(x)
+ if (x < 1)
+ fun_l4_n228(x)
+ else
+ fun_l4_n866(x)
+ end
+end
+
+def fun_l3_n439(x)
+ if (x < 1)
+ fun_l4_n617(x)
+ else
+ fun_l4_n924(x)
+ end
+end
+
+def fun_l3_n440(x)
+ if (x < 1)
+ fun_l4_n302(x)
+ else
+ fun_l4_n691(x)
+ end
+end
+
+def fun_l3_n441(x)
+ if (x < 1)
+ fun_l4_n559(x)
+ else
+ fun_l4_n758(x)
+ end
+end
+
+def fun_l3_n442(x)
+ if (x < 1)
+ fun_l4_n412(x)
+ else
+ fun_l4_n544(x)
+ end
+end
+
+def fun_l3_n443(x)
+ if (x < 1)
+ fun_l4_n130(x)
+ else
+ fun_l4_n764(x)
+ end
+end
+
+def fun_l3_n444(x)
+ if (x < 1)
+ fun_l4_n135(x)
+ else
+ fun_l4_n65(x)
+ end
+end
+
+def fun_l3_n445(x)
+ if (x < 1)
+ fun_l4_n224(x)
+ else
+ fun_l4_n148(x)
+ end
+end
+
+def fun_l3_n446(x)
+ if (x < 1)
+ fun_l4_n238(x)
+ else
+ fun_l4_n808(x)
+ end
+end
+
+def fun_l3_n447(x)
+ if (x < 1)
+ fun_l4_n832(x)
+ else
+ fun_l4_n460(x)
+ end
+end
+
+def fun_l3_n448(x)
+ if (x < 1)
+ fun_l4_n897(x)
+ else
+ fun_l4_n817(x)
+ end
+end
+
+def fun_l3_n449(x)
+ if (x < 1)
+ fun_l4_n587(x)
+ else
+ fun_l4_n926(x)
+ end
+end
+
+def fun_l3_n450(x)
+ if (x < 1)
+ fun_l4_n575(x)
+ else
+ fun_l4_n274(x)
+ end
+end
+
+def fun_l3_n451(x)
+ if (x < 1)
+ fun_l4_n42(x)
+ else
+ fun_l4_n714(x)
+ end
+end
+
+def fun_l3_n452(x)
+ if (x < 1)
+ fun_l4_n101(x)
+ else
+ fun_l4_n470(x)
+ end
+end
+
+def fun_l3_n453(x)
+ if (x < 1)
+ fun_l4_n906(x)
+ else
+ fun_l4_n724(x)
+ end
+end
+
+def fun_l3_n454(x)
+ if (x < 1)
+ fun_l4_n682(x)
+ else
+ fun_l4_n709(x)
+ end
+end
+
+def fun_l3_n455(x)
+ if (x < 1)
+ fun_l4_n929(x)
+ else
+ fun_l4_n274(x)
+ end
+end
+
+def fun_l3_n456(x)
+ if (x < 1)
+ fun_l4_n10(x)
+ else
+ fun_l4_n101(x)
+ end
+end
+
+def fun_l3_n457(x)
+ if (x < 1)
+ fun_l4_n825(x)
+ else
+ fun_l4_n632(x)
+ end
+end
+
+def fun_l3_n458(x)
+ if (x < 1)
+ fun_l4_n2(x)
+ else
+ fun_l4_n723(x)
+ end
+end
+
+def fun_l3_n459(x)
+ if (x < 1)
+ fun_l4_n998(x)
+ else
+ fun_l4_n546(x)
+ end
+end
+
+def fun_l3_n460(x)
+ if (x < 1)
+ fun_l4_n483(x)
+ else
+ fun_l4_n445(x)
+ end
+end
+
+def fun_l3_n461(x)
+ if (x < 1)
+ fun_l4_n896(x)
+ else
+ fun_l4_n993(x)
+ end
+end
+
+def fun_l3_n462(x)
+ if (x < 1)
+ fun_l4_n710(x)
+ else
+ fun_l4_n529(x)
+ end
+end
+
+def fun_l3_n463(x)
+ if (x < 1)
+ fun_l4_n913(x)
+ else
+ fun_l4_n65(x)
+ end
+end
+
+def fun_l3_n464(x)
+ if (x < 1)
+ fun_l4_n712(x)
+ else
+ fun_l4_n412(x)
+ end
+end
+
+def fun_l3_n465(x)
+ if (x < 1)
+ fun_l4_n296(x)
+ else
+ fun_l4_n37(x)
+ end
+end
+
+def fun_l3_n466(x)
+ if (x < 1)
+ fun_l4_n241(x)
+ else
+ fun_l4_n649(x)
+ end
+end
+
+def fun_l3_n467(x)
+ if (x < 1)
+ fun_l4_n296(x)
+ else
+ fun_l4_n80(x)
+ end
+end
+
+def fun_l3_n468(x)
+ if (x < 1)
+ fun_l4_n270(x)
+ else
+ fun_l4_n192(x)
+ end
+end
+
+def fun_l3_n469(x)
+ if (x < 1)
+ fun_l4_n655(x)
+ else
+ fun_l4_n605(x)
+ end
+end
+
+def fun_l3_n470(x)
+ if (x < 1)
+ fun_l4_n180(x)
+ else
+ fun_l4_n807(x)
+ end
+end
+
+def fun_l3_n471(x)
+ if (x < 1)
+ fun_l4_n915(x)
+ else
+ fun_l4_n902(x)
+ end
+end
+
+def fun_l3_n472(x)
+ if (x < 1)
+ fun_l4_n527(x)
+ else
+ fun_l4_n638(x)
+ end
+end
+
+def fun_l3_n473(x)
+ if (x < 1)
+ fun_l4_n775(x)
+ else
+ fun_l4_n572(x)
+ end
+end
+
+def fun_l3_n474(x)
+ if (x < 1)
+ fun_l4_n856(x)
+ else
+ fun_l4_n182(x)
+ end
+end
+
+def fun_l3_n475(x)
+ if (x < 1)
+ fun_l4_n434(x)
+ else
+ fun_l4_n232(x)
+ end
+end
+
+def fun_l3_n476(x)
+ if (x < 1)
+ fun_l4_n208(x)
+ else
+ fun_l4_n37(x)
+ end
+end
+
+def fun_l3_n477(x)
+ if (x < 1)
+ fun_l4_n146(x)
+ else
+ fun_l4_n764(x)
+ end
+end
+
+def fun_l3_n478(x)
+ if (x < 1)
+ fun_l4_n806(x)
+ else
+ fun_l4_n148(x)
+ end
+end
+
+def fun_l3_n479(x)
+ if (x < 1)
+ fun_l4_n46(x)
+ else
+ fun_l4_n488(x)
+ end
+end
+
+def fun_l3_n480(x)
+ if (x < 1)
+ fun_l4_n637(x)
+ else
+ fun_l4_n48(x)
+ end
+end
+
+def fun_l3_n481(x)
+ if (x < 1)
+ fun_l4_n496(x)
+ else
+ fun_l4_n891(x)
+ end
+end
+
+def fun_l3_n482(x)
+ if (x < 1)
+ fun_l4_n282(x)
+ else
+ fun_l4_n736(x)
+ end
+end
+
+def fun_l3_n483(x)
+ if (x < 1)
+ fun_l4_n377(x)
+ else
+ fun_l4_n603(x)
+ end
+end
+
+def fun_l3_n484(x)
+ if (x < 1)
+ fun_l4_n689(x)
+ else
+ fun_l4_n201(x)
+ end
+end
+
+def fun_l3_n485(x)
+ if (x < 1)
+ fun_l4_n495(x)
+ else
+ fun_l4_n721(x)
+ end
+end
+
+def fun_l3_n486(x)
+ if (x < 1)
+ fun_l4_n128(x)
+ else
+ fun_l4_n400(x)
+ end
+end
+
+def fun_l3_n487(x)
+ if (x < 1)
+ fun_l4_n993(x)
+ else
+ fun_l4_n53(x)
+ end
+end
+
+def fun_l3_n488(x)
+ if (x < 1)
+ fun_l4_n913(x)
+ else
+ fun_l4_n814(x)
+ end
+end
+
+def fun_l3_n489(x)
+ if (x < 1)
+ fun_l4_n816(x)
+ else
+ fun_l4_n196(x)
+ end
+end
+
+def fun_l3_n490(x)
+ if (x < 1)
+ fun_l4_n754(x)
+ else
+ fun_l4_n451(x)
+ end
+end
+
+def fun_l3_n491(x)
+ if (x < 1)
+ fun_l4_n57(x)
+ else
+ fun_l4_n597(x)
+ end
+end
+
+def fun_l3_n492(x)
+ if (x < 1)
+ fun_l4_n539(x)
+ else
+ fun_l4_n893(x)
+ end
+end
+
+def fun_l3_n493(x)
+ if (x < 1)
+ fun_l4_n542(x)
+ else
+ fun_l4_n956(x)
+ end
+end
+
+def fun_l3_n494(x)
+ if (x < 1)
+ fun_l4_n479(x)
+ else
+ fun_l4_n448(x)
+ end
+end
+
+def fun_l3_n495(x)
+ if (x < 1)
+ fun_l4_n263(x)
+ else
+ fun_l4_n912(x)
+ end
+end
+
+def fun_l3_n496(x)
+ if (x < 1)
+ fun_l4_n463(x)
+ else
+ fun_l4_n112(x)
+ end
+end
+
+def fun_l3_n497(x)
+ if (x < 1)
+ fun_l4_n806(x)
+ else
+ fun_l4_n486(x)
+ end
+end
+
+def fun_l3_n498(x)
+ if (x < 1)
+ fun_l4_n155(x)
+ else
+ fun_l4_n298(x)
+ end
+end
+
+def fun_l3_n499(x)
+ if (x < 1)
+ fun_l4_n538(x)
+ else
+ fun_l4_n908(x)
+ end
+end
+
+def fun_l3_n500(x)
+ if (x < 1)
+ fun_l4_n769(x)
+ else
+ fun_l4_n681(x)
+ end
+end
+
+def fun_l3_n501(x)
+ if (x < 1)
+ fun_l4_n544(x)
+ else
+ fun_l4_n749(x)
+ end
+end
+
+def fun_l3_n502(x)
+ if (x < 1)
+ fun_l4_n505(x)
+ else
+ fun_l4_n66(x)
+ end
+end
+
+def fun_l3_n503(x)
+ if (x < 1)
+ fun_l4_n900(x)
+ else
+ fun_l4_n917(x)
+ end
+end
+
+def fun_l3_n504(x)
+ if (x < 1)
+ fun_l4_n982(x)
+ else
+ fun_l4_n707(x)
+ end
+end
+
+def fun_l3_n505(x)
+ if (x < 1)
+ fun_l4_n102(x)
+ else
+ fun_l4_n564(x)
+ end
+end
+
+def fun_l3_n506(x)
+ if (x < 1)
+ fun_l4_n332(x)
+ else
+ fun_l4_n367(x)
+ end
+end
+
+def fun_l3_n507(x)
+ if (x < 1)
+ fun_l4_n969(x)
+ else
+ fun_l4_n354(x)
+ end
+end
+
+def fun_l3_n508(x)
+ if (x < 1)
+ fun_l4_n405(x)
+ else
+ fun_l4_n485(x)
+ end
+end
+
+def fun_l3_n509(x)
+ if (x < 1)
+ fun_l4_n477(x)
+ else
+ fun_l4_n629(x)
+ end
+end
+
+def fun_l3_n510(x)
+ if (x < 1)
+ fun_l4_n753(x)
+ else
+ fun_l4_n78(x)
+ end
+end
+
+def fun_l3_n511(x)
+ if (x < 1)
+ fun_l4_n221(x)
+ else
+ fun_l4_n637(x)
+ end
+end
+
+def fun_l3_n512(x)
+ if (x < 1)
+ fun_l4_n540(x)
+ else
+ fun_l4_n267(x)
+ end
+end
+
+def fun_l3_n513(x)
+ if (x < 1)
+ fun_l4_n750(x)
+ else
+ fun_l4_n626(x)
+ end
+end
+
+def fun_l3_n514(x)
+ if (x < 1)
+ fun_l4_n160(x)
+ else
+ fun_l4_n32(x)
+ end
+end
+
+def fun_l3_n515(x)
+ if (x < 1)
+ fun_l4_n914(x)
+ else
+ fun_l4_n967(x)
+ end
+end
+
+def fun_l3_n516(x)
+ if (x < 1)
+ fun_l4_n380(x)
+ else
+ fun_l4_n83(x)
+ end
+end
+
+def fun_l3_n517(x)
+ if (x < 1)
+ fun_l4_n175(x)
+ else
+ fun_l4_n830(x)
+ end
+end
+
+def fun_l3_n518(x)
+ if (x < 1)
+ fun_l4_n579(x)
+ else
+ fun_l4_n773(x)
+ end
+end
+
+def fun_l3_n519(x)
+ if (x < 1)
+ fun_l4_n707(x)
+ else
+ fun_l4_n690(x)
+ end
+end
+
+def fun_l3_n520(x)
+ if (x < 1)
+ fun_l4_n587(x)
+ else
+ fun_l4_n754(x)
+ end
+end
+
+def fun_l3_n521(x)
+ if (x < 1)
+ fun_l4_n922(x)
+ else
+ fun_l4_n156(x)
+ end
+end
+
+def fun_l3_n522(x)
+ if (x < 1)
+ fun_l4_n299(x)
+ else
+ fun_l4_n937(x)
+ end
+end
+
+def fun_l3_n523(x)
+ if (x < 1)
+ fun_l4_n996(x)
+ else
+ fun_l4_n786(x)
+ end
+end
+
+def fun_l3_n524(x)
+ if (x < 1)
+ fun_l4_n988(x)
+ else
+ fun_l4_n930(x)
+ end
+end
+
+def fun_l3_n525(x)
+ if (x < 1)
+ fun_l4_n475(x)
+ else
+ fun_l4_n43(x)
+ end
+end
+
+def fun_l3_n526(x)
+ if (x < 1)
+ fun_l4_n367(x)
+ else
+ fun_l4_n167(x)
+ end
+end
+
+def fun_l3_n527(x)
+ if (x < 1)
+ fun_l4_n31(x)
+ else
+ fun_l4_n394(x)
+ end
+end
+
+def fun_l3_n528(x)
+ if (x < 1)
+ fun_l4_n92(x)
+ else
+ fun_l4_n304(x)
+ end
+end
+
+def fun_l3_n529(x)
+ if (x < 1)
+ fun_l4_n369(x)
+ else
+ fun_l4_n458(x)
+ end
+end
+
+def fun_l3_n530(x)
+ if (x < 1)
+ fun_l4_n475(x)
+ else
+ fun_l4_n8(x)
+ end
+end
+
+def fun_l3_n531(x)
+ if (x < 1)
+ fun_l4_n678(x)
+ else
+ fun_l4_n970(x)
+ end
+end
+
+def fun_l3_n532(x)
+ if (x < 1)
+ fun_l4_n349(x)
+ else
+ fun_l4_n853(x)
+ end
+end
+
+def fun_l3_n533(x)
+ if (x < 1)
+ fun_l4_n918(x)
+ else
+ fun_l4_n820(x)
+ end
+end
+
+def fun_l3_n534(x)
+ if (x < 1)
+ fun_l4_n369(x)
+ else
+ fun_l4_n445(x)
+ end
+end
+
+def fun_l3_n535(x)
+ if (x < 1)
+ fun_l4_n437(x)
+ else
+ fun_l4_n930(x)
+ end
+end
+
+def fun_l3_n536(x)
+ if (x < 1)
+ fun_l4_n143(x)
+ else
+ fun_l4_n986(x)
+ end
+end
+
+def fun_l3_n537(x)
+ if (x < 1)
+ fun_l4_n603(x)
+ else
+ fun_l4_n818(x)
+ end
+end
+
+def fun_l3_n538(x)
+ if (x < 1)
+ fun_l4_n14(x)
+ else
+ fun_l4_n994(x)
+ end
+end
+
+def fun_l3_n539(x)
+ if (x < 1)
+ fun_l4_n650(x)
+ else
+ fun_l4_n115(x)
+ end
+end
+
+def fun_l3_n540(x)
+ if (x < 1)
+ fun_l4_n74(x)
+ else
+ fun_l4_n559(x)
+ end
+end
+
+def fun_l3_n541(x)
+ if (x < 1)
+ fun_l4_n601(x)
+ else
+ fun_l4_n756(x)
+ end
+end
+
+def fun_l3_n542(x)
+ if (x < 1)
+ fun_l4_n733(x)
+ else
+ fun_l4_n274(x)
+ end
+end
+
+def fun_l3_n543(x)
+ if (x < 1)
+ fun_l4_n819(x)
+ else
+ fun_l4_n97(x)
+ end
+end
+
+def fun_l3_n544(x)
+ if (x < 1)
+ fun_l4_n949(x)
+ else
+ fun_l4_n868(x)
+ end
+end
+
+def fun_l3_n545(x)
+ if (x < 1)
+ fun_l4_n346(x)
+ else
+ fun_l4_n0(x)
+ end
+end
+
+def fun_l3_n546(x)
+ if (x < 1)
+ fun_l4_n820(x)
+ else
+ fun_l4_n188(x)
+ end
+end
+
+def fun_l3_n547(x)
+ if (x < 1)
+ fun_l4_n403(x)
+ else
+ fun_l4_n670(x)
+ end
+end
+
+def fun_l3_n548(x)
+ if (x < 1)
+ fun_l4_n449(x)
+ else
+ fun_l4_n96(x)
+ end
+end
+
+def fun_l3_n549(x)
+ if (x < 1)
+ fun_l4_n585(x)
+ else
+ fun_l4_n388(x)
+ end
+end
+
+def fun_l3_n550(x)
+ if (x < 1)
+ fun_l4_n963(x)
+ else
+ fun_l4_n979(x)
+ end
+end
+
+def fun_l3_n551(x)
+ if (x < 1)
+ fun_l4_n892(x)
+ else
+ fun_l4_n583(x)
+ end
+end
+
+def fun_l3_n552(x)
+ if (x < 1)
+ fun_l4_n846(x)
+ else
+ fun_l4_n508(x)
+ end
+end
+
+def fun_l3_n553(x)
+ if (x < 1)
+ fun_l4_n160(x)
+ else
+ fun_l4_n428(x)
+ end
+end
+
+def fun_l3_n554(x)
+ if (x < 1)
+ fun_l4_n538(x)
+ else
+ fun_l4_n641(x)
+ end
+end
+
+def fun_l3_n555(x)
+ if (x < 1)
+ fun_l4_n523(x)
+ else
+ fun_l4_n697(x)
+ end
+end
+
+def fun_l3_n556(x)
+ if (x < 1)
+ fun_l4_n212(x)
+ else
+ fun_l4_n0(x)
+ end
+end
+
+def fun_l3_n557(x)
+ if (x < 1)
+ fun_l4_n255(x)
+ else
+ fun_l4_n860(x)
+ end
+end
+
+def fun_l3_n558(x)
+ if (x < 1)
+ fun_l4_n807(x)
+ else
+ fun_l4_n865(x)
+ end
+end
+
+def fun_l3_n559(x)
+ if (x < 1)
+ fun_l4_n735(x)
+ else
+ fun_l4_n352(x)
+ end
+end
+
+def fun_l3_n560(x)
+ if (x < 1)
+ fun_l4_n327(x)
+ else
+ fun_l4_n739(x)
+ end
+end
+
+def fun_l3_n561(x)
+ if (x < 1)
+ fun_l4_n637(x)
+ else
+ fun_l4_n628(x)
+ end
+end
+
+def fun_l3_n562(x)
+ if (x < 1)
+ fun_l4_n281(x)
+ else
+ fun_l4_n394(x)
+ end
+end
+
+def fun_l3_n563(x)
+ if (x < 1)
+ fun_l4_n440(x)
+ else
+ fun_l4_n179(x)
+ end
+end
+
+def fun_l3_n564(x)
+ if (x < 1)
+ fun_l4_n893(x)
+ else
+ fun_l4_n396(x)
+ end
+end
+
+def fun_l3_n565(x)
+ if (x < 1)
+ fun_l4_n94(x)
+ else
+ fun_l4_n134(x)
+ end
+end
+
+def fun_l3_n566(x)
+ if (x < 1)
+ fun_l4_n968(x)
+ else
+ fun_l4_n444(x)
+ end
+end
+
+def fun_l3_n567(x)
+ if (x < 1)
+ fun_l4_n85(x)
+ else
+ fun_l4_n281(x)
+ end
+end
+
+def fun_l3_n568(x)
+ if (x < 1)
+ fun_l4_n164(x)
+ else
+ fun_l4_n229(x)
+ end
+end
+
+def fun_l3_n569(x)
+ if (x < 1)
+ fun_l4_n594(x)
+ else
+ fun_l4_n756(x)
+ end
+end
+
+def fun_l3_n570(x)
+ if (x < 1)
+ fun_l4_n77(x)
+ else
+ fun_l4_n370(x)
+ end
+end
+
+def fun_l3_n571(x)
+ if (x < 1)
+ fun_l4_n724(x)
+ else
+ fun_l4_n965(x)
+ end
+end
+
+def fun_l3_n572(x)
+ if (x < 1)
+ fun_l4_n394(x)
+ else
+ fun_l4_n595(x)
+ end
+end
+
+def fun_l3_n573(x)
+ if (x < 1)
+ fun_l4_n54(x)
+ else
+ fun_l4_n41(x)
+ end
+end
+
+def fun_l3_n574(x)
+ if (x < 1)
+ fun_l4_n951(x)
+ else
+ fun_l4_n414(x)
+ end
+end
+
+def fun_l3_n575(x)
+ if (x < 1)
+ fun_l4_n297(x)
+ else
+ fun_l4_n126(x)
+ end
+end
+
+def fun_l3_n576(x)
+ if (x < 1)
+ fun_l4_n538(x)
+ else
+ fun_l4_n276(x)
+ end
+end
+
+def fun_l3_n577(x)
+ if (x < 1)
+ fun_l4_n882(x)
+ else
+ fun_l4_n152(x)
+ end
+end
+
+def fun_l3_n578(x)
+ if (x < 1)
+ fun_l4_n950(x)
+ else
+ fun_l4_n822(x)
+ end
+end
+
+def fun_l3_n579(x)
+ if (x < 1)
+ fun_l4_n484(x)
+ else
+ fun_l4_n99(x)
+ end
+end
+
+def fun_l3_n580(x)
+ if (x < 1)
+ fun_l4_n160(x)
+ else
+ fun_l4_n98(x)
+ end
+end
+
+def fun_l3_n581(x)
+ if (x < 1)
+ fun_l4_n10(x)
+ else
+ fun_l4_n537(x)
+ end
+end
+
+def fun_l3_n582(x)
+ if (x < 1)
+ fun_l4_n419(x)
+ else
+ fun_l4_n285(x)
+ end
+end
+
+def fun_l3_n583(x)
+ if (x < 1)
+ fun_l4_n330(x)
+ else
+ fun_l4_n732(x)
+ end
+end
+
+def fun_l3_n584(x)
+ if (x < 1)
+ fun_l4_n64(x)
+ else
+ fun_l4_n461(x)
+ end
+end
+
+def fun_l3_n585(x)
+ if (x < 1)
+ fun_l4_n326(x)
+ else
+ fun_l4_n134(x)
+ end
+end
+
+def fun_l3_n586(x)
+ if (x < 1)
+ fun_l4_n423(x)
+ else
+ fun_l4_n945(x)
+ end
+end
+
+def fun_l3_n587(x)
+ if (x < 1)
+ fun_l4_n192(x)
+ else
+ fun_l4_n459(x)
+ end
+end
+
+def fun_l3_n588(x)
+ if (x < 1)
+ fun_l4_n292(x)
+ else
+ fun_l4_n697(x)
+ end
+end
+
+def fun_l3_n589(x)
+ if (x < 1)
+ fun_l4_n612(x)
+ else
+ fun_l4_n902(x)
+ end
+end
+
+def fun_l3_n590(x)
+ if (x < 1)
+ fun_l4_n842(x)
+ else
+ fun_l4_n300(x)
+ end
+end
+
+def fun_l3_n591(x)
+ if (x < 1)
+ fun_l4_n265(x)
+ else
+ fun_l4_n906(x)
+ end
+end
+
+def fun_l3_n592(x)
+ if (x < 1)
+ fun_l4_n82(x)
+ else
+ fun_l4_n417(x)
+ end
+end
+
+def fun_l3_n593(x)
+ if (x < 1)
+ fun_l4_n896(x)
+ else
+ fun_l4_n794(x)
+ end
+end
+
+def fun_l3_n594(x)
+ if (x < 1)
+ fun_l4_n760(x)
+ else
+ fun_l4_n83(x)
+ end
+end
+
+def fun_l3_n595(x)
+ if (x < 1)
+ fun_l4_n750(x)
+ else
+ fun_l4_n778(x)
+ end
+end
+
+def fun_l3_n596(x)
+ if (x < 1)
+ fun_l4_n655(x)
+ else
+ fun_l4_n8(x)
+ end
+end
+
+def fun_l3_n597(x)
+ if (x < 1)
+ fun_l4_n810(x)
+ else
+ fun_l4_n824(x)
+ end
+end
+
+def fun_l3_n598(x)
+ if (x < 1)
+ fun_l4_n904(x)
+ else
+ fun_l4_n921(x)
+ end
+end
+
+def fun_l3_n599(x)
+ if (x < 1)
+ fun_l4_n16(x)
+ else
+ fun_l4_n96(x)
+ end
+end
+
+def fun_l3_n600(x)
+ if (x < 1)
+ fun_l4_n879(x)
+ else
+ fun_l4_n757(x)
+ end
+end
+
+def fun_l3_n601(x)
+ if (x < 1)
+ fun_l4_n840(x)
+ else
+ fun_l4_n62(x)
+ end
+end
+
+def fun_l3_n602(x)
+ if (x < 1)
+ fun_l4_n547(x)
+ else
+ fun_l4_n45(x)
+ end
+end
+
+def fun_l3_n603(x)
+ if (x < 1)
+ fun_l4_n978(x)
+ else
+ fun_l4_n646(x)
+ end
+end
+
+def fun_l3_n604(x)
+ if (x < 1)
+ fun_l4_n100(x)
+ else
+ fun_l4_n654(x)
+ end
+end
+
+def fun_l3_n605(x)
+ if (x < 1)
+ fun_l4_n257(x)
+ else
+ fun_l4_n465(x)
+ end
+end
+
+def fun_l3_n606(x)
+ if (x < 1)
+ fun_l4_n427(x)
+ else
+ fun_l4_n489(x)
+ end
+end
+
+def fun_l3_n607(x)
+ if (x < 1)
+ fun_l4_n465(x)
+ else
+ fun_l4_n48(x)
+ end
+end
+
+def fun_l3_n608(x)
+ if (x < 1)
+ fun_l4_n571(x)
+ else
+ fun_l4_n332(x)
+ end
+end
+
+def fun_l3_n609(x)
+ if (x < 1)
+ fun_l4_n813(x)
+ else
+ fun_l4_n462(x)
+ end
+end
+
+def fun_l3_n610(x)
+ if (x < 1)
+ fun_l4_n931(x)
+ else
+ fun_l4_n913(x)
+ end
+end
+
+def fun_l3_n611(x)
+ if (x < 1)
+ fun_l4_n20(x)
+ else
+ fun_l4_n933(x)
+ end
+end
+
+def fun_l3_n612(x)
+ if (x < 1)
+ fun_l4_n913(x)
+ else
+ fun_l4_n787(x)
+ end
+end
+
+def fun_l3_n613(x)
+ if (x < 1)
+ fun_l4_n523(x)
+ else
+ fun_l4_n735(x)
+ end
+end
+
+def fun_l3_n614(x)
+ if (x < 1)
+ fun_l4_n315(x)
+ else
+ fun_l4_n913(x)
+ end
+end
+
+def fun_l3_n615(x)
+ if (x < 1)
+ fun_l4_n308(x)
+ else
+ fun_l4_n865(x)
+ end
+end
+
+def fun_l3_n616(x)
+ if (x < 1)
+ fun_l4_n847(x)
+ else
+ fun_l4_n506(x)
+ end
+end
+
+def fun_l3_n617(x)
+ if (x < 1)
+ fun_l4_n387(x)
+ else
+ fun_l4_n551(x)
+ end
+end
+
+def fun_l3_n618(x)
+ if (x < 1)
+ fun_l4_n276(x)
+ else
+ fun_l4_n991(x)
+ end
+end
+
+def fun_l3_n619(x)
+ if (x < 1)
+ fun_l4_n524(x)
+ else
+ fun_l4_n202(x)
+ end
+end
+
+def fun_l3_n620(x)
+ if (x < 1)
+ fun_l4_n836(x)
+ else
+ fun_l4_n548(x)
+ end
+end
+
+def fun_l3_n621(x)
+ if (x < 1)
+ fun_l4_n76(x)
+ else
+ fun_l4_n5(x)
+ end
+end
+
+def fun_l3_n622(x)
+ if (x < 1)
+ fun_l4_n223(x)
+ else
+ fun_l4_n438(x)
+ end
+end
+
+def fun_l3_n623(x)
+ if (x < 1)
+ fun_l4_n31(x)
+ else
+ fun_l4_n590(x)
+ end
+end
+
+def fun_l3_n624(x)
+ if (x < 1)
+ fun_l4_n609(x)
+ else
+ fun_l4_n513(x)
+ end
+end
+
+def fun_l3_n625(x)
+ if (x < 1)
+ fun_l4_n966(x)
+ else
+ fun_l4_n278(x)
+ end
+end
+
+def fun_l3_n626(x)
+ if (x < 1)
+ fun_l4_n82(x)
+ else
+ fun_l4_n100(x)
+ end
+end
+
+def fun_l3_n627(x)
+ if (x < 1)
+ fun_l4_n312(x)
+ else
+ fun_l4_n746(x)
+ end
+end
+
+def fun_l3_n628(x)
+ if (x < 1)
+ fun_l4_n682(x)
+ else
+ fun_l4_n791(x)
+ end
+end
+
+def fun_l3_n629(x)
+ if (x < 1)
+ fun_l4_n166(x)
+ else
+ fun_l4_n678(x)
+ end
+end
+
+def fun_l3_n630(x)
+ if (x < 1)
+ fun_l4_n507(x)
+ else
+ fun_l4_n778(x)
+ end
+end
+
+def fun_l3_n631(x)
+ if (x < 1)
+ fun_l4_n97(x)
+ else
+ fun_l4_n13(x)
+ end
+end
+
+def fun_l3_n632(x)
+ if (x < 1)
+ fun_l4_n976(x)
+ else
+ fun_l4_n794(x)
+ end
+end
+
+def fun_l3_n633(x)
+ if (x < 1)
+ fun_l4_n994(x)
+ else
+ fun_l4_n743(x)
+ end
+end
+
+def fun_l3_n634(x)
+ if (x < 1)
+ fun_l4_n212(x)
+ else
+ fun_l4_n754(x)
+ end
+end
+
+def fun_l3_n635(x)
+ if (x < 1)
+ fun_l4_n602(x)
+ else
+ fun_l4_n997(x)
+ end
+end
+
+def fun_l3_n636(x)
+ if (x < 1)
+ fun_l4_n282(x)
+ else
+ fun_l4_n133(x)
+ end
+end
+
+def fun_l3_n637(x)
+ if (x < 1)
+ fun_l4_n413(x)
+ else
+ fun_l4_n952(x)
+ end
+end
+
+def fun_l3_n638(x)
+ if (x < 1)
+ fun_l4_n843(x)
+ else
+ fun_l4_n783(x)
+ end
+end
+
+def fun_l3_n639(x)
+ if (x < 1)
+ fun_l4_n946(x)
+ else
+ fun_l4_n833(x)
+ end
+end
+
+def fun_l3_n640(x)
+ if (x < 1)
+ fun_l4_n384(x)
+ else
+ fun_l4_n444(x)
+ end
+end
+
+def fun_l3_n641(x)
+ if (x < 1)
+ fun_l4_n699(x)
+ else
+ fun_l4_n26(x)
+ end
+end
+
+def fun_l3_n642(x)
+ if (x < 1)
+ fun_l4_n96(x)
+ else
+ fun_l4_n623(x)
+ end
+end
+
+def fun_l3_n643(x)
+ if (x < 1)
+ fun_l4_n928(x)
+ else
+ fun_l4_n8(x)
+ end
+end
+
+def fun_l3_n644(x)
+ if (x < 1)
+ fun_l4_n804(x)
+ else
+ fun_l4_n618(x)
+ end
+end
+
+def fun_l3_n645(x)
+ if (x < 1)
+ fun_l4_n513(x)
+ else
+ fun_l4_n214(x)
+ end
+end
+
+def fun_l3_n646(x)
+ if (x < 1)
+ fun_l4_n605(x)
+ else
+ fun_l4_n920(x)
+ end
+end
+
+def fun_l3_n647(x)
+ if (x < 1)
+ fun_l4_n774(x)
+ else
+ fun_l4_n297(x)
+ end
+end
+
+def fun_l3_n648(x)
+ if (x < 1)
+ fun_l4_n871(x)
+ else
+ fun_l4_n75(x)
+ end
+end
+
+def fun_l3_n649(x)
+ if (x < 1)
+ fun_l4_n196(x)
+ else
+ fun_l4_n277(x)
+ end
+end
+
+def fun_l3_n650(x)
+ if (x < 1)
+ fun_l4_n25(x)
+ else
+ fun_l4_n681(x)
+ end
+end
+
+def fun_l3_n651(x)
+ if (x < 1)
+ fun_l4_n603(x)
+ else
+ fun_l4_n46(x)
+ end
+end
+
+def fun_l3_n652(x)
+ if (x < 1)
+ fun_l4_n623(x)
+ else
+ fun_l4_n604(x)
+ end
+end
+
+def fun_l3_n653(x)
+ if (x < 1)
+ fun_l4_n854(x)
+ else
+ fun_l4_n955(x)
+ end
+end
+
+def fun_l3_n654(x)
+ if (x < 1)
+ fun_l4_n667(x)
+ else
+ fun_l4_n988(x)
+ end
+end
+
+def fun_l3_n655(x)
+ if (x < 1)
+ fun_l4_n263(x)
+ else
+ fun_l4_n831(x)
+ end
+end
+
+def fun_l3_n656(x)
+ if (x < 1)
+ fun_l4_n591(x)
+ else
+ fun_l4_n593(x)
+ end
+end
+
+def fun_l3_n657(x)
+ if (x < 1)
+ fun_l4_n308(x)
+ else
+ fun_l4_n547(x)
+ end
+end
+
+def fun_l3_n658(x)
+ if (x < 1)
+ fun_l4_n780(x)
+ else
+ fun_l4_n174(x)
+ end
+end
+
+def fun_l3_n659(x)
+ if (x < 1)
+ fun_l4_n54(x)
+ else
+ fun_l4_n681(x)
+ end
+end
+
+def fun_l3_n660(x)
+ if (x < 1)
+ fun_l4_n279(x)
+ else
+ fun_l4_n282(x)
+ end
+end
+
+def fun_l3_n661(x)
+ if (x < 1)
+ fun_l4_n953(x)
+ else
+ fun_l4_n832(x)
+ end
+end
+
+def fun_l3_n662(x)
+ if (x < 1)
+ fun_l4_n525(x)
+ else
+ fun_l4_n850(x)
+ end
+end
+
+def fun_l3_n663(x)
+ if (x < 1)
+ fun_l4_n606(x)
+ else
+ fun_l4_n167(x)
+ end
+end
+
+def fun_l3_n664(x)
+ if (x < 1)
+ fun_l4_n941(x)
+ else
+ fun_l4_n591(x)
+ end
+end
+
+def fun_l3_n665(x)
+ if (x < 1)
+ fun_l4_n781(x)
+ else
+ fun_l4_n162(x)
+ end
+end
+
+def fun_l3_n666(x)
+ if (x < 1)
+ fun_l4_n848(x)
+ else
+ fun_l4_n133(x)
+ end
+end
+
+def fun_l3_n667(x)
+ if (x < 1)
+ fun_l4_n341(x)
+ else
+ fun_l4_n212(x)
+ end
+end
+
+def fun_l3_n668(x)
+ if (x < 1)
+ fun_l4_n320(x)
+ else
+ fun_l4_n131(x)
+ end
+end
+
+def fun_l3_n669(x)
+ if (x < 1)
+ fun_l4_n18(x)
+ else
+ fun_l4_n385(x)
+ end
+end
+
+def fun_l3_n670(x)
+ if (x < 1)
+ fun_l4_n917(x)
+ else
+ fun_l4_n988(x)
+ end
+end
+
+def fun_l3_n671(x)
+ if (x < 1)
+ fun_l4_n50(x)
+ else
+ fun_l4_n27(x)
+ end
+end
+
+def fun_l3_n672(x)
+ if (x < 1)
+ fun_l4_n277(x)
+ else
+ fun_l4_n238(x)
+ end
+end
+
+def fun_l3_n673(x)
+ if (x < 1)
+ fun_l4_n303(x)
+ else
+ fun_l4_n643(x)
+ end
+end
+
+def fun_l3_n674(x)
+ if (x < 1)
+ fun_l4_n794(x)
+ else
+ fun_l4_n906(x)
+ end
+end
+
+def fun_l3_n675(x)
+ if (x < 1)
+ fun_l4_n688(x)
+ else
+ fun_l4_n312(x)
+ end
+end
+
+def fun_l3_n676(x)
+ if (x < 1)
+ fun_l4_n833(x)
+ else
+ fun_l4_n900(x)
+ end
+end
+
+def fun_l3_n677(x)
+ if (x < 1)
+ fun_l4_n649(x)
+ else
+ fun_l4_n822(x)
+ end
+end
+
+def fun_l3_n678(x)
+ if (x < 1)
+ fun_l4_n958(x)
+ else
+ fun_l4_n939(x)
+ end
+end
+
+def fun_l3_n679(x)
+ if (x < 1)
+ fun_l4_n949(x)
+ else
+ fun_l4_n887(x)
+ end
+end
+
+def fun_l3_n680(x)
+ if (x < 1)
+ fun_l4_n630(x)
+ else
+ fun_l4_n508(x)
+ end
+end
+
+def fun_l3_n681(x)
+ if (x < 1)
+ fun_l4_n553(x)
+ else
+ fun_l4_n940(x)
+ end
+end
+
+def fun_l3_n682(x)
+ if (x < 1)
+ fun_l4_n180(x)
+ else
+ fun_l4_n950(x)
+ end
+end
+
+def fun_l3_n683(x)
+ if (x < 1)
+ fun_l4_n898(x)
+ else
+ fun_l4_n374(x)
+ end
+end
+
+def fun_l3_n684(x)
+ if (x < 1)
+ fun_l4_n802(x)
+ else
+ fun_l4_n527(x)
+ end
+end
+
+def fun_l3_n685(x)
+ if (x < 1)
+ fun_l4_n751(x)
+ else
+ fun_l4_n967(x)
+ end
+end
+
+def fun_l3_n686(x)
+ if (x < 1)
+ fun_l4_n235(x)
+ else
+ fun_l4_n559(x)
+ end
+end
+
+def fun_l3_n687(x)
+ if (x < 1)
+ fun_l4_n694(x)
+ else
+ fun_l4_n819(x)
+ end
+end
+
+def fun_l3_n688(x)
+ if (x < 1)
+ fun_l4_n167(x)
+ else
+ fun_l4_n91(x)
+ end
+end
+
+def fun_l3_n689(x)
+ if (x < 1)
+ fun_l4_n692(x)
+ else
+ fun_l4_n422(x)
+ end
+end
+
+def fun_l3_n690(x)
+ if (x < 1)
+ fun_l4_n344(x)
+ else
+ fun_l4_n738(x)
+ end
+end
+
+def fun_l3_n691(x)
+ if (x < 1)
+ fun_l4_n394(x)
+ else
+ fun_l4_n603(x)
+ end
+end
+
+def fun_l3_n692(x)
+ if (x < 1)
+ fun_l4_n909(x)
+ else
+ fun_l4_n528(x)
+ end
+end
+
+def fun_l3_n693(x)
+ if (x < 1)
+ fun_l4_n180(x)
+ else
+ fun_l4_n22(x)
+ end
+end
+
+def fun_l3_n694(x)
+ if (x < 1)
+ fun_l4_n6(x)
+ else
+ fun_l4_n777(x)
+ end
+end
+
+def fun_l3_n695(x)
+ if (x < 1)
+ fun_l4_n327(x)
+ else
+ fun_l4_n948(x)
+ end
+end
+
+def fun_l3_n696(x)
+ if (x < 1)
+ fun_l4_n748(x)
+ else
+ fun_l4_n706(x)
+ end
+end
+
+def fun_l3_n697(x)
+ if (x < 1)
+ fun_l4_n720(x)
+ else
+ fun_l4_n693(x)
+ end
+end
+
+def fun_l3_n698(x)
+ if (x < 1)
+ fun_l4_n282(x)
+ else
+ fun_l4_n755(x)
+ end
+end
+
+def fun_l3_n699(x)
+ if (x < 1)
+ fun_l4_n975(x)
+ else
+ fun_l4_n415(x)
+ end
+end
+
+def fun_l3_n700(x)
+ if (x < 1)
+ fun_l4_n684(x)
+ else
+ fun_l4_n738(x)
+ end
+end
+
+def fun_l3_n701(x)
+ if (x < 1)
+ fun_l4_n58(x)
+ else
+ fun_l4_n892(x)
+ end
+end
+
+def fun_l3_n702(x)
+ if (x < 1)
+ fun_l4_n366(x)
+ else
+ fun_l4_n189(x)
+ end
+end
+
+def fun_l3_n703(x)
+ if (x < 1)
+ fun_l4_n422(x)
+ else
+ fun_l4_n535(x)
+ end
+end
+
+def fun_l3_n704(x)
+ if (x < 1)
+ fun_l4_n886(x)
+ else
+ fun_l4_n223(x)
+ end
+end
+
+def fun_l3_n705(x)
+ if (x < 1)
+ fun_l4_n57(x)
+ else
+ fun_l4_n62(x)
+ end
+end
+
+def fun_l3_n706(x)
+ if (x < 1)
+ fun_l4_n629(x)
+ else
+ fun_l4_n479(x)
+ end
+end
+
+def fun_l3_n707(x)
+ if (x < 1)
+ fun_l4_n477(x)
+ else
+ fun_l4_n302(x)
+ end
+end
+
+def fun_l3_n708(x)
+ if (x < 1)
+ fun_l4_n790(x)
+ else
+ fun_l4_n262(x)
+ end
+end
+
+def fun_l3_n709(x)
+ if (x < 1)
+ fun_l4_n772(x)
+ else
+ fun_l4_n995(x)
+ end
+end
+
+def fun_l3_n710(x)
+ if (x < 1)
+ fun_l4_n549(x)
+ else
+ fun_l4_n651(x)
+ end
+end
+
+def fun_l3_n711(x)
+ if (x < 1)
+ fun_l4_n77(x)
+ else
+ fun_l4_n555(x)
+ end
+end
+
+def fun_l3_n712(x)
+ if (x < 1)
+ fun_l4_n515(x)
+ else
+ fun_l4_n734(x)
+ end
+end
+
+def fun_l3_n713(x)
+ if (x < 1)
+ fun_l4_n778(x)
+ else
+ fun_l4_n884(x)
+ end
+end
+
+def fun_l3_n714(x)
+ if (x < 1)
+ fun_l4_n235(x)
+ else
+ fun_l4_n637(x)
+ end
+end
+
+def fun_l3_n715(x)
+ if (x < 1)
+ fun_l4_n516(x)
+ else
+ fun_l4_n249(x)
+ end
+end
+
+def fun_l3_n716(x)
+ if (x < 1)
+ fun_l4_n44(x)
+ else
+ fun_l4_n307(x)
+ end
+end
+
+def fun_l3_n717(x)
+ if (x < 1)
+ fun_l4_n482(x)
+ else
+ fun_l4_n4(x)
+ end
+end
+
+def fun_l3_n718(x)
+ if (x < 1)
+ fun_l4_n195(x)
+ else
+ fun_l4_n410(x)
+ end
+end
+
+def fun_l3_n719(x)
+ if (x < 1)
+ fun_l4_n862(x)
+ else
+ fun_l4_n91(x)
+ end
+end
+
+def fun_l3_n720(x)
+ if (x < 1)
+ fun_l4_n591(x)
+ else
+ fun_l4_n391(x)
+ end
+end
+
+def fun_l3_n721(x)
+ if (x < 1)
+ fun_l4_n776(x)
+ else
+ fun_l4_n129(x)
+ end
+end
+
+def fun_l3_n722(x)
+ if (x < 1)
+ fun_l4_n857(x)
+ else
+ fun_l4_n160(x)
+ end
+end
+
+def fun_l3_n723(x)
+ if (x < 1)
+ fun_l4_n772(x)
+ else
+ fun_l4_n567(x)
+ end
+end
+
+def fun_l3_n724(x)
+ if (x < 1)
+ fun_l4_n582(x)
+ else
+ fun_l4_n100(x)
+ end
+end
+
+def fun_l3_n725(x)
+ if (x < 1)
+ fun_l4_n962(x)
+ else
+ fun_l4_n846(x)
+ end
+end
+
+def fun_l3_n726(x)
+ if (x < 1)
+ fun_l4_n892(x)
+ else
+ fun_l4_n334(x)
+ end
+end
+
+def fun_l3_n727(x)
+ if (x < 1)
+ fun_l4_n17(x)
+ else
+ fun_l4_n690(x)
+ end
+end
+
+def fun_l3_n728(x)
+ if (x < 1)
+ fun_l4_n453(x)
+ else
+ fun_l4_n234(x)
+ end
+end
+
+def fun_l3_n729(x)
+ if (x < 1)
+ fun_l4_n562(x)
+ else
+ fun_l4_n139(x)
+ end
+end
+
+def fun_l3_n730(x)
+ if (x < 1)
+ fun_l4_n87(x)
+ else
+ fun_l4_n513(x)
+ end
+end
+
+def fun_l3_n731(x)
+ if (x < 1)
+ fun_l4_n565(x)
+ else
+ fun_l4_n289(x)
+ end
+end
+
+def fun_l3_n732(x)
+ if (x < 1)
+ fun_l4_n821(x)
+ else
+ fun_l4_n290(x)
+ end
+end
+
+def fun_l3_n733(x)
+ if (x < 1)
+ fun_l4_n464(x)
+ else
+ fun_l4_n929(x)
+ end
+end
+
+def fun_l3_n734(x)
+ if (x < 1)
+ fun_l4_n617(x)
+ else
+ fun_l4_n230(x)
+ end
+end
+
+def fun_l3_n735(x)
+ if (x < 1)
+ fun_l4_n942(x)
+ else
+ fun_l4_n770(x)
+ end
+end
+
+def fun_l3_n736(x)
+ if (x < 1)
+ fun_l4_n826(x)
+ else
+ fun_l4_n414(x)
+ end
+end
+
+def fun_l3_n737(x)
+ if (x < 1)
+ fun_l4_n47(x)
+ else
+ fun_l4_n357(x)
+ end
+end
+
+def fun_l3_n738(x)
+ if (x < 1)
+ fun_l4_n582(x)
+ else
+ fun_l4_n652(x)
+ end
+end
+
+def fun_l3_n739(x)
+ if (x < 1)
+ fun_l4_n641(x)
+ else
+ fun_l4_n479(x)
+ end
+end
+
+def fun_l3_n740(x)
+ if (x < 1)
+ fun_l4_n11(x)
+ else
+ fun_l4_n965(x)
+ end
+end
+
+def fun_l3_n741(x)
+ if (x < 1)
+ fun_l4_n402(x)
+ else
+ fun_l4_n512(x)
+ end
+end
+
+def fun_l3_n742(x)
+ if (x < 1)
+ fun_l4_n300(x)
+ else
+ fun_l4_n942(x)
+ end
+end
+
+def fun_l3_n743(x)
+ if (x < 1)
+ fun_l4_n770(x)
+ else
+ fun_l4_n690(x)
+ end
+end
+
+def fun_l3_n744(x)
+ if (x < 1)
+ fun_l4_n575(x)
+ else
+ fun_l4_n158(x)
+ end
+end
+
+def fun_l3_n745(x)
+ if (x < 1)
+ fun_l4_n760(x)
+ else
+ fun_l4_n552(x)
+ end
+end
+
+def fun_l3_n746(x)
+ if (x < 1)
+ fun_l4_n887(x)
+ else
+ fun_l4_n319(x)
+ end
+end
+
+def fun_l3_n747(x)
+ if (x < 1)
+ fun_l4_n967(x)
+ else
+ fun_l4_n561(x)
+ end
+end
+
+def fun_l3_n748(x)
+ if (x < 1)
+ fun_l4_n4(x)
+ else
+ fun_l4_n766(x)
+ end
+end
+
+def fun_l3_n749(x)
+ if (x < 1)
+ fun_l4_n993(x)
+ else
+ fun_l4_n991(x)
+ end
+end
+
+def fun_l3_n750(x)
+ if (x < 1)
+ fun_l4_n890(x)
+ else
+ fun_l4_n663(x)
+ end
+end
+
+def fun_l3_n751(x)
+ if (x < 1)
+ fun_l4_n267(x)
+ else
+ fun_l4_n449(x)
+ end
+end
+
+def fun_l3_n752(x)
+ if (x < 1)
+ fun_l4_n540(x)
+ else
+ fun_l4_n226(x)
+ end
+end
+
+def fun_l3_n753(x)
+ if (x < 1)
+ fun_l4_n893(x)
+ else
+ fun_l4_n116(x)
+ end
+end
+
+def fun_l3_n754(x)
+ if (x < 1)
+ fun_l4_n570(x)
+ else
+ fun_l4_n192(x)
+ end
+end
+
+def fun_l3_n755(x)
+ if (x < 1)
+ fun_l4_n712(x)
+ else
+ fun_l4_n81(x)
+ end
+end
+
+def fun_l3_n756(x)
+ if (x < 1)
+ fun_l4_n833(x)
+ else
+ fun_l4_n24(x)
+ end
+end
+
+def fun_l3_n757(x)
+ if (x < 1)
+ fun_l4_n740(x)
+ else
+ fun_l4_n803(x)
+ end
+end
+
+def fun_l3_n758(x)
+ if (x < 1)
+ fun_l4_n552(x)
+ else
+ fun_l4_n551(x)
+ end
+end
+
+def fun_l3_n759(x)
+ if (x < 1)
+ fun_l4_n570(x)
+ else
+ fun_l4_n677(x)
+ end
+end
+
+def fun_l3_n760(x)
+ if (x < 1)
+ fun_l4_n243(x)
+ else
+ fun_l4_n677(x)
+ end
+end
+
+def fun_l3_n761(x)
+ if (x < 1)
+ fun_l4_n65(x)
+ else
+ fun_l4_n660(x)
+ end
+end
+
+def fun_l3_n762(x)
+ if (x < 1)
+ fun_l4_n989(x)
+ else
+ fun_l4_n761(x)
+ end
+end
+
+def fun_l3_n763(x)
+ if (x < 1)
+ fun_l4_n971(x)
+ else
+ fun_l4_n280(x)
+ end
+end
+
+def fun_l3_n764(x)
+ if (x < 1)
+ fun_l4_n441(x)
+ else
+ fun_l4_n506(x)
+ end
+end
+
+def fun_l3_n765(x)
+ if (x < 1)
+ fun_l4_n577(x)
+ else
+ fun_l4_n586(x)
+ end
+end
+
+def fun_l3_n766(x)
+ if (x < 1)
+ fun_l4_n385(x)
+ else
+ fun_l4_n60(x)
+ end
+end
+
+def fun_l3_n767(x)
+ if (x < 1)
+ fun_l4_n380(x)
+ else
+ fun_l4_n32(x)
+ end
+end
+
+def fun_l3_n768(x)
+ if (x < 1)
+ fun_l4_n797(x)
+ else
+ fun_l4_n437(x)
+ end
+end
+
+def fun_l3_n769(x)
+ if (x < 1)
+ fun_l4_n615(x)
+ else
+ fun_l4_n369(x)
+ end
+end
+
+def fun_l3_n770(x)
+ if (x < 1)
+ fun_l4_n779(x)
+ else
+ fun_l4_n194(x)
+ end
+end
+
+def fun_l3_n771(x)
+ if (x < 1)
+ fun_l4_n287(x)
+ else
+ fun_l4_n819(x)
+ end
+end
+
+def fun_l3_n772(x)
+ if (x < 1)
+ fun_l4_n405(x)
+ else
+ fun_l4_n738(x)
+ end
+end
+
+def fun_l3_n773(x)
+ if (x < 1)
+ fun_l4_n706(x)
+ else
+ fun_l4_n174(x)
+ end
+end
+
+def fun_l3_n774(x)
+ if (x < 1)
+ fun_l4_n690(x)
+ else
+ fun_l4_n841(x)
+ end
+end
+
+def fun_l3_n775(x)
+ if (x < 1)
+ fun_l4_n256(x)
+ else
+ fun_l4_n179(x)
+ end
+end
+
+def fun_l3_n776(x)
+ if (x < 1)
+ fun_l4_n342(x)
+ else
+ fun_l4_n359(x)
+ end
+end
+
+def fun_l3_n777(x)
+ if (x < 1)
+ fun_l4_n371(x)
+ else
+ fun_l4_n680(x)
+ end
+end
+
+def fun_l3_n778(x)
+ if (x < 1)
+ fun_l4_n996(x)
+ else
+ fun_l4_n343(x)
+ end
+end
+
+def fun_l3_n779(x)
+ if (x < 1)
+ fun_l4_n96(x)
+ else
+ fun_l4_n893(x)
+ end
+end
+
+def fun_l3_n780(x)
+ if (x < 1)
+ fun_l4_n706(x)
+ else
+ fun_l4_n140(x)
+ end
+end
+
+def fun_l3_n781(x)
+ if (x < 1)
+ fun_l4_n349(x)
+ else
+ fun_l4_n317(x)
+ end
+end
+
+def fun_l3_n782(x)
+ if (x < 1)
+ fun_l4_n491(x)
+ else
+ fun_l4_n616(x)
+ end
+end
+
+def fun_l3_n783(x)
+ if (x < 1)
+ fun_l4_n227(x)
+ else
+ fun_l4_n356(x)
+ end
+end
+
+def fun_l3_n784(x)
+ if (x < 1)
+ fun_l4_n387(x)
+ else
+ fun_l4_n532(x)
+ end
+end
+
+def fun_l3_n785(x)
+ if (x < 1)
+ fun_l4_n648(x)
+ else
+ fun_l4_n34(x)
+ end
+end
+
+def fun_l3_n786(x)
+ if (x < 1)
+ fun_l4_n562(x)
+ else
+ fun_l4_n476(x)
+ end
+end
+
+def fun_l3_n787(x)
+ if (x < 1)
+ fun_l4_n162(x)
+ else
+ fun_l4_n384(x)
+ end
+end
+
+def fun_l3_n788(x)
+ if (x < 1)
+ fun_l4_n221(x)
+ else
+ fun_l4_n617(x)
+ end
+end
+
+def fun_l3_n789(x)
+ if (x < 1)
+ fun_l4_n670(x)
+ else
+ fun_l4_n350(x)
+ end
+end
+
+def fun_l3_n790(x)
+ if (x < 1)
+ fun_l4_n202(x)
+ else
+ fun_l4_n112(x)
+ end
+end
+
+def fun_l3_n791(x)
+ if (x < 1)
+ fun_l4_n390(x)
+ else
+ fun_l4_n868(x)
+ end
+end
+
+def fun_l3_n792(x)
+ if (x < 1)
+ fun_l4_n746(x)
+ else
+ fun_l4_n833(x)
+ end
+end
+
+def fun_l3_n793(x)
+ if (x < 1)
+ fun_l4_n471(x)
+ else
+ fun_l4_n60(x)
+ end
+end
+
+def fun_l3_n794(x)
+ if (x < 1)
+ fun_l4_n583(x)
+ else
+ fun_l4_n470(x)
+ end
+end
+
+def fun_l3_n795(x)
+ if (x < 1)
+ fun_l4_n567(x)
+ else
+ fun_l4_n218(x)
+ end
+end
+
+def fun_l3_n796(x)
+ if (x < 1)
+ fun_l4_n140(x)
+ else
+ fun_l4_n690(x)
+ end
+end
+
+def fun_l3_n797(x)
+ if (x < 1)
+ fun_l4_n190(x)
+ else
+ fun_l4_n437(x)
+ end
+end
+
+def fun_l3_n798(x)
+ if (x < 1)
+ fun_l4_n684(x)
+ else
+ fun_l4_n843(x)
+ end
+end
+
+def fun_l3_n799(x)
+ if (x < 1)
+ fun_l4_n825(x)
+ else
+ fun_l4_n354(x)
+ end
+end
+
+def fun_l3_n800(x)
+ if (x < 1)
+ fun_l4_n711(x)
+ else
+ fun_l4_n606(x)
+ end
+end
+
+def fun_l3_n801(x)
+ if (x < 1)
+ fun_l4_n756(x)
+ else
+ fun_l4_n464(x)
+ end
+end
+
+def fun_l3_n802(x)
+ if (x < 1)
+ fun_l4_n143(x)
+ else
+ fun_l4_n962(x)
+ end
+end
+
+def fun_l3_n803(x)
+ if (x < 1)
+ fun_l4_n223(x)
+ else
+ fun_l4_n293(x)
+ end
+end
+
+def fun_l3_n804(x)
+ if (x < 1)
+ fun_l4_n832(x)
+ else
+ fun_l4_n632(x)
+ end
+end
+
+def fun_l3_n805(x)
+ if (x < 1)
+ fun_l4_n649(x)
+ else
+ fun_l4_n259(x)
+ end
+end
+
+def fun_l3_n806(x)
+ if (x < 1)
+ fun_l4_n617(x)
+ else
+ fun_l4_n993(x)
+ end
+end
+
+def fun_l3_n807(x)
+ if (x < 1)
+ fun_l4_n257(x)
+ else
+ fun_l4_n712(x)
+ end
+end
+
+def fun_l3_n808(x)
+ if (x < 1)
+ fun_l4_n632(x)
+ else
+ fun_l4_n563(x)
+ end
+end
+
+def fun_l3_n809(x)
+ if (x < 1)
+ fun_l4_n154(x)
+ else
+ fun_l4_n561(x)
+ end
+end
+
+def fun_l3_n810(x)
+ if (x < 1)
+ fun_l4_n411(x)
+ else
+ fun_l4_n42(x)
+ end
+end
+
+def fun_l3_n811(x)
+ if (x < 1)
+ fun_l4_n560(x)
+ else
+ fun_l4_n531(x)
+ end
+end
+
+def fun_l3_n812(x)
+ if (x < 1)
+ fun_l4_n759(x)
+ else
+ fun_l4_n588(x)
+ end
+end
+
+def fun_l3_n813(x)
+ if (x < 1)
+ fun_l4_n311(x)
+ else
+ fun_l4_n813(x)
+ end
+end
+
+def fun_l3_n814(x)
+ if (x < 1)
+ fun_l4_n521(x)
+ else
+ fun_l4_n877(x)
+ end
+end
+
+def fun_l3_n815(x)
+ if (x < 1)
+ fun_l4_n578(x)
+ else
+ fun_l4_n37(x)
+ end
+end
+
+def fun_l3_n816(x)
+ if (x < 1)
+ fun_l4_n337(x)
+ else
+ fun_l4_n562(x)
+ end
+end
+
+def fun_l3_n817(x)
+ if (x < 1)
+ fun_l4_n523(x)
+ else
+ fun_l4_n445(x)
+ end
+end
+
+def fun_l3_n818(x)
+ if (x < 1)
+ fun_l4_n256(x)
+ else
+ fun_l4_n551(x)
+ end
+end
+
+def fun_l3_n819(x)
+ if (x < 1)
+ fun_l4_n718(x)
+ else
+ fun_l4_n463(x)
+ end
+end
+
+def fun_l3_n820(x)
+ if (x < 1)
+ fun_l4_n780(x)
+ else
+ fun_l4_n103(x)
+ end
+end
+
+def fun_l3_n821(x)
+ if (x < 1)
+ fun_l4_n729(x)
+ else
+ fun_l4_n331(x)
+ end
+end
+
+def fun_l3_n822(x)
+ if (x < 1)
+ fun_l4_n84(x)
+ else
+ fun_l4_n176(x)
+ end
+end
+
+def fun_l3_n823(x)
+ if (x < 1)
+ fun_l4_n231(x)
+ else
+ fun_l4_n681(x)
+ end
+end
+
+def fun_l3_n824(x)
+ if (x < 1)
+ fun_l4_n675(x)
+ else
+ fun_l4_n837(x)
+ end
+end
+
+def fun_l3_n825(x)
+ if (x < 1)
+ fun_l4_n140(x)
+ else
+ fun_l4_n932(x)
+ end
+end
+
+def fun_l3_n826(x)
+ if (x < 1)
+ fun_l4_n268(x)
+ else
+ fun_l4_n908(x)
+ end
+end
+
+def fun_l3_n827(x)
+ if (x < 1)
+ fun_l4_n959(x)
+ else
+ fun_l4_n643(x)
+ end
+end
+
+def fun_l3_n828(x)
+ if (x < 1)
+ fun_l4_n290(x)
+ else
+ fun_l4_n718(x)
+ end
+end
+
+def fun_l3_n829(x)
+ if (x < 1)
+ fun_l4_n430(x)
+ else
+ fun_l4_n114(x)
+ end
+end
+
+def fun_l3_n830(x)
+ if (x < 1)
+ fun_l4_n817(x)
+ else
+ fun_l4_n296(x)
+ end
+end
+
+def fun_l3_n831(x)
+ if (x < 1)
+ fun_l4_n586(x)
+ else
+ fun_l4_n345(x)
+ end
+end
+
+def fun_l3_n832(x)
+ if (x < 1)
+ fun_l4_n321(x)
+ else
+ fun_l4_n805(x)
+ end
+end
+
+def fun_l3_n833(x)
+ if (x < 1)
+ fun_l4_n57(x)
+ else
+ fun_l4_n373(x)
+ end
+end
+
+def fun_l3_n834(x)
+ if (x < 1)
+ fun_l4_n344(x)
+ else
+ fun_l4_n654(x)
+ end
+end
+
+def fun_l3_n835(x)
+ if (x < 1)
+ fun_l4_n761(x)
+ else
+ fun_l4_n295(x)
+ end
+end
+
+def fun_l3_n836(x)
+ if (x < 1)
+ fun_l4_n169(x)
+ else
+ fun_l4_n184(x)
+ end
+end
+
+def fun_l3_n837(x)
+ if (x < 1)
+ fun_l4_n482(x)
+ else
+ fun_l4_n127(x)
+ end
+end
+
+def fun_l3_n838(x)
+ if (x < 1)
+ fun_l4_n260(x)
+ else
+ fun_l4_n662(x)
+ end
+end
+
+def fun_l3_n839(x)
+ if (x < 1)
+ fun_l4_n548(x)
+ else
+ fun_l4_n197(x)
+ end
+end
+
+def fun_l3_n840(x)
+ if (x < 1)
+ fun_l4_n96(x)
+ else
+ fun_l4_n17(x)
+ end
+end
+
+def fun_l3_n841(x)
+ if (x < 1)
+ fun_l4_n946(x)
+ else
+ fun_l4_n447(x)
+ end
+end
+
+def fun_l3_n842(x)
+ if (x < 1)
+ fun_l4_n66(x)
+ else
+ fun_l4_n110(x)
+ end
+end
+
+def fun_l3_n843(x)
+ if (x < 1)
+ fun_l4_n574(x)
+ else
+ fun_l4_n887(x)
+ end
+end
+
+def fun_l3_n844(x)
+ if (x < 1)
+ fun_l4_n912(x)
+ else
+ fun_l4_n465(x)
+ end
+end
+
+def fun_l3_n845(x)
+ if (x < 1)
+ fun_l4_n401(x)
+ else
+ fun_l4_n903(x)
+ end
+end
+
+def fun_l3_n846(x)
+ if (x < 1)
+ fun_l4_n929(x)
+ else
+ fun_l4_n238(x)
+ end
+end
+
+def fun_l3_n847(x)
+ if (x < 1)
+ fun_l4_n579(x)
+ else
+ fun_l4_n924(x)
+ end
+end
+
+def fun_l3_n848(x)
+ if (x < 1)
+ fun_l4_n697(x)
+ else
+ fun_l4_n157(x)
+ end
+end
+
+def fun_l3_n849(x)
+ if (x < 1)
+ fun_l4_n608(x)
+ else
+ fun_l4_n426(x)
+ end
+end
+
+def fun_l3_n850(x)
+ if (x < 1)
+ fun_l4_n710(x)
+ else
+ fun_l4_n360(x)
+ end
+end
+
+def fun_l3_n851(x)
+ if (x < 1)
+ fun_l4_n558(x)
+ else
+ fun_l4_n152(x)
+ end
+end
+
+def fun_l3_n852(x)
+ if (x < 1)
+ fun_l4_n276(x)
+ else
+ fun_l4_n895(x)
+ end
+end
+
+def fun_l3_n853(x)
+ if (x < 1)
+ fun_l4_n945(x)
+ else
+ fun_l4_n251(x)
+ end
+end
+
+def fun_l3_n854(x)
+ if (x < 1)
+ fun_l4_n131(x)
+ else
+ fun_l4_n677(x)
+ end
+end
+
+def fun_l3_n855(x)
+ if (x < 1)
+ fun_l4_n493(x)
+ else
+ fun_l4_n631(x)
+ end
+end
+
+def fun_l3_n856(x)
+ if (x < 1)
+ fun_l4_n608(x)
+ else
+ fun_l4_n556(x)
+ end
+end
+
+def fun_l3_n857(x)
+ if (x < 1)
+ fun_l4_n808(x)
+ else
+ fun_l4_n672(x)
+ end
+end
+
+def fun_l3_n858(x)
+ if (x < 1)
+ fun_l4_n407(x)
+ else
+ fun_l4_n648(x)
+ end
+end
+
+def fun_l3_n859(x)
+ if (x < 1)
+ fun_l4_n217(x)
+ else
+ fun_l4_n763(x)
+ end
+end
+
+def fun_l3_n860(x)
+ if (x < 1)
+ fun_l4_n941(x)
+ else
+ fun_l4_n159(x)
+ end
+end
+
+def fun_l3_n861(x)
+ if (x < 1)
+ fun_l4_n364(x)
+ else
+ fun_l4_n241(x)
+ end
+end
+
+def fun_l3_n862(x)
+ if (x < 1)
+ fun_l4_n915(x)
+ else
+ fun_l4_n729(x)
+ end
+end
+
+def fun_l3_n863(x)
+ if (x < 1)
+ fun_l4_n137(x)
+ else
+ fun_l4_n317(x)
+ end
+end
+
+def fun_l3_n864(x)
+ if (x < 1)
+ fun_l4_n818(x)
+ else
+ fun_l4_n782(x)
+ end
+end
+
+def fun_l3_n865(x)
+ if (x < 1)
+ fun_l4_n577(x)
+ else
+ fun_l4_n418(x)
+ end
+end
+
+def fun_l3_n866(x)
+ if (x < 1)
+ fun_l4_n882(x)
+ else
+ fun_l4_n7(x)
+ end
+end
+
+def fun_l3_n867(x)
+ if (x < 1)
+ fun_l4_n238(x)
+ else
+ fun_l4_n944(x)
+ end
+end
+
+def fun_l3_n868(x)
+ if (x < 1)
+ fun_l4_n105(x)
+ else
+ fun_l4_n465(x)
+ end
+end
+
+def fun_l3_n869(x)
+ if (x < 1)
+ fun_l4_n841(x)
+ else
+ fun_l4_n262(x)
+ end
+end
+
+def fun_l3_n870(x)
+ if (x < 1)
+ fun_l4_n32(x)
+ else
+ fun_l4_n992(x)
+ end
+end
+
+def fun_l3_n871(x)
+ if (x < 1)
+ fun_l4_n431(x)
+ else
+ fun_l4_n391(x)
+ end
+end
+
+def fun_l3_n872(x)
+ if (x < 1)
+ fun_l4_n829(x)
+ else
+ fun_l4_n879(x)
+ end
+end
+
+def fun_l3_n873(x)
+ if (x < 1)
+ fun_l4_n617(x)
+ else
+ fun_l4_n657(x)
+ end
+end
+
+def fun_l3_n874(x)
+ if (x < 1)
+ fun_l4_n529(x)
+ else
+ fun_l4_n717(x)
+ end
+end
+
+def fun_l3_n875(x)
+ if (x < 1)
+ fun_l4_n928(x)
+ else
+ fun_l4_n476(x)
+ end
+end
+
+def fun_l3_n876(x)
+ if (x < 1)
+ fun_l4_n388(x)
+ else
+ fun_l4_n949(x)
+ end
+end
+
+def fun_l3_n877(x)
+ if (x < 1)
+ fun_l4_n826(x)
+ else
+ fun_l4_n560(x)
+ end
+end
+
+def fun_l3_n878(x)
+ if (x < 1)
+ fun_l4_n863(x)
+ else
+ fun_l4_n122(x)
+ end
+end
+
+def fun_l3_n879(x)
+ if (x < 1)
+ fun_l4_n964(x)
+ else
+ fun_l4_n793(x)
+ end
+end
+
+def fun_l3_n880(x)
+ if (x < 1)
+ fun_l4_n141(x)
+ else
+ fun_l4_n132(x)
+ end
+end
+
+def fun_l3_n881(x)
+ if (x < 1)
+ fun_l4_n735(x)
+ else
+ fun_l4_n592(x)
+ end
+end
+
+def fun_l3_n882(x)
+ if (x < 1)
+ fun_l4_n585(x)
+ else
+ fun_l4_n341(x)
+ end
+end
+
+def fun_l3_n883(x)
+ if (x < 1)
+ fun_l4_n843(x)
+ else
+ fun_l4_n692(x)
+ end
+end
+
+def fun_l3_n884(x)
+ if (x < 1)
+ fun_l4_n360(x)
+ else
+ fun_l4_n833(x)
+ end
+end
+
+def fun_l3_n885(x)
+ if (x < 1)
+ fun_l4_n31(x)
+ else
+ fun_l4_n62(x)
+ end
+end
+
+def fun_l3_n886(x)
+ if (x < 1)
+ fun_l4_n756(x)
+ else
+ fun_l4_n699(x)
+ end
+end
+
+def fun_l3_n887(x)
+ if (x < 1)
+ fun_l4_n71(x)
+ else
+ fun_l4_n256(x)
+ end
+end
+
+def fun_l3_n888(x)
+ if (x < 1)
+ fun_l4_n406(x)
+ else
+ fun_l4_n493(x)
+ end
+end
+
+def fun_l3_n889(x)
+ if (x < 1)
+ fun_l4_n489(x)
+ else
+ fun_l4_n874(x)
+ end
+end
+
+def fun_l3_n890(x)
+ if (x < 1)
+ fun_l4_n365(x)
+ else
+ fun_l4_n910(x)
+ end
+end
+
+def fun_l3_n891(x)
+ if (x < 1)
+ fun_l4_n262(x)
+ else
+ fun_l4_n665(x)
+ end
+end
+
+def fun_l3_n892(x)
+ if (x < 1)
+ fun_l4_n274(x)
+ else
+ fun_l4_n849(x)
+ end
+end
+
+def fun_l3_n893(x)
+ if (x < 1)
+ fun_l4_n880(x)
+ else
+ fun_l4_n739(x)
+ end
+end
+
+def fun_l3_n894(x)
+ if (x < 1)
+ fun_l4_n504(x)
+ else
+ fun_l4_n128(x)
+ end
+end
+
+def fun_l3_n895(x)
+ if (x < 1)
+ fun_l4_n555(x)
+ else
+ fun_l4_n281(x)
+ end
+end
+
+def fun_l3_n896(x)
+ if (x < 1)
+ fun_l4_n270(x)
+ else
+ fun_l4_n225(x)
+ end
+end
+
+def fun_l3_n897(x)
+ if (x < 1)
+ fun_l4_n38(x)
+ else
+ fun_l4_n26(x)
+ end
+end
+
+def fun_l3_n898(x)
+ if (x < 1)
+ fun_l4_n944(x)
+ else
+ fun_l4_n217(x)
+ end
+end
+
+def fun_l3_n899(x)
+ if (x < 1)
+ fun_l4_n967(x)
+ else
+ fun_l4_n853(x)
+ end
+end
+
+def fun_l3_n900(x)
+ if (x < 1)
+ fun_l4_n686(x)
+ else
+ fun_l4_n760(x)
+ end
+end
+
+def fun_l3_n901(x)
+ if (x < 1)
+ fun_l4_n698(x)
+ else
+ fun_l4_n842(x)
+ end
+end
+
+def fun_l3_n902(x)
+ if (x < 1)
+ fun_l4_n344(x)
+ else
+ fun_l4_n701(x)
+ end
+end
+
+def fun_l3_n903(x)
+ if (x < 1)
+ fun_l4_n756(x)
+ else
+ fun_l4_n321(x)
+ end
+end
+
+def fun_l3_n904(x)
+ if (x < 1)
+ fun_l4_n504(x)
+ else
+ fun_l4_n228(x)
+ end
+end
+
+def fun_l3_n905(x)
+ if (x < 1)
+ fun_l4_n135(x)
+ else
+ fun_l4_n57(x)
+ end
+end
+
+def fun_l3_n906(x)
+ if (x < 1)
+ fun_l4_n279(x)
+ else
+ fun_l4_n912(x)
+ end
+end
+
+def fun_l3_n907(x)
+ if (x < 1)
+ fun_l4_n962(x)
+ else
+ fun_l4_n418(x)
+ end
+end
+
+def fun_l3_n908(x)
+ if (x < 1)
+ fun_l4_n972(x)
+ else
+ fun_l4_n14(x)
+ end
+end
+
+def fun_l3_n909(x)
+ if (x < 1)
+ fun_l4_n231(x)
+ else
+ fun_l4_n763(x)
+ end
+end
+
+def fun_l3_n910(x)
+ if (x < 1)
+ fun_l4_n859(x)
+ else
+ fun_l4_n243(x)
+ end
+end
+
+def fun_l3_n911(x)
+ if (x < 1)
+ fun_l4_n153(x)
+ else
+ fun_l4_n136(x)
+ end
+end
+
+def fun_l3_n912(x)
+ if (x < 1)
+ fun_l4_n325(x)
+ else
+ fun_l4_n113(x)
+ end
+end
+
+def fun_l3_n913(x)
+ if (x < 1)
+ fun_l4_n625(x)
+ else
+ fun_l4_n179(x)
+ end
+end
+
+def fun_l3_n914(x)
+ if (x < 1)
+ fun_l4_n54(x)
+ else
+ fun_l4_n88(x)
+ end
+end
+
+def fun_l3_n915(x)
+ if (x < 1)
+ fun_l4_n332(x)
+ else
+ fun_l4_n3(x)
+ end
+end
+
+def fun_l3_n916(x)
+ if (x < 1)
+ fun_l4_n748(x)
+ else
+ fun_l4_n21(x)
+ end
+end
+
+def fun_l3_n917(x)
+ if (x < 1)
+ fun_l4_n132(x)
+ else
+ fun_l4_n132(x)
+ end
+end
+
+def fun_l3_n918(x)
+ if (x < 1)
+ fun_l4_n295(x)
+ else
+ fun_l4_n429(x)
+ end
+end
+
+def fun_l3_n919(x)
+ if (x < 1)
+ fun_l4_n105(x)
+ else
+ fun_l4_n984(x)
+ end
+end
+
+def fun_l3_n920(x)
+ if (x < 1)
+ fun_l4_n319(x)
+ else
+ fun_l4_n304(x)
+ end
+end
+
+def fun_l3_n921(x)
+ if (x < 1)
+ fun_l4_n756(x)
+ else
+ fun_l4_n639(x)
+ end
+end
+
+def fun_l3_n922(x)
+ if (x < 1)
+ fun_l4_n678(x)
+ else
+ fun_l4_n209(x)
+ end
+end
+
+def fun_l3_n923(x)
+ if (x < 1)
+ fun_l4_n755(x)
+ else
+ fun_l4_n941(x)
+ end
+end
+
+def fun_l3_n924(x)
+ if (x < 1)
+ fun_l4_n311(x)
+ else
+ fun_l4_n272(x)
+ end
+end
+
+def fun_l3_n925(x)
+ if (x < 1)
+ fun_l4_n543(x)
+ else
+ fun_l4_n896(x)
+ end
+end
+
+def fun_l3_n926(x)
+ if (x < 1)
+ fun_l4_n994(x)
+ else
+ fun_l4_n671(x)
+ end
+end
+
+def fun_l3_n927(x)
+ if (x < 1)
+ fun_l4_n125(x)
+ else
+ fun_l4_n852(x)
+ end
+end
+
+def fun_l3_n928(x)
+ if (x < 1)
+ fun_l4_n483(x)
+ else
+ fun_l4_n350(x)
+ end
+end
+
+def fun_l3_n929(x)
+ if (x < 1)
+ fun_l4_n622(x)
+ else
+ fun_l4_n511(x)
+ end
+end
+
+def fun_l3_n930(x)
+ if (x < 1)
+ fun_l4_n134(x)
+ else
+ fun_l4_n288(x)
+ end
+end
+
+def fun_l3_n931(x)
+ if (x < 1)
+ fun_l4_n278(x)
+ else
+ fun_l4_n800(x)
+ end
+end
+
+def fun_l3_n932(x)
+ if (x < 1)
+ fun_l4_n139(x)
+ else
+ fun_l4_n966(x)
+ end
+end
+
+def fun_l3_n933(x)
+ if (x < 1)
+ fun_l4_n275(x)
+ else
+ fun_l4_n506(x)
+ end
+end
+
+def fun_l3_n934(x)
+ if (x < 1)
+ fun_l4_n503(x)
+ else
+ fun_l4_n204(x)
+ end
+end
+
+def fun_l3_n935(x)
+ if (x < 1)
+ fun_l4_n993(x)
+ else
+ fun_l4_n126(x)
+ end
+end
+
+def fun_l3_n936(x)
+ if (x < 1)
+ fun_l4_n704(x)
+ else
+ fun_l4_n462(x)
+ end
+end
+
+def fun_l3_n937(x)
+ if (x < 1)
+ fun_l4_n922(x)
+ else
+ fun_l4_n722(x)
+ end
+end
+
+def fun_l3_n938(x)
+ if (x < 1)
+ fun_l4_n937(x)
+ else
+ fun_l4_n195(x)
+ end
+end
+
+def fun_l3_n939(x)
+ if (x < 1)
+ fun_l4_n661(x)
+ else
+ fun_l4_n265(x)
+ end
+end
+
+def fun_l3_n940(x)
+ if (x < 1)
+ fun_l4_n423(x)
+ else
+ fun_l4_n230(x)
+ end
+end
+
+def fun_l3_n941(x)
+ if (x < 1)
+ fun_l4_n698(x)
+ else
+ fun_l4_n226(x)
+ end
+end
+
+def fun_l3_n942(x)
+ if (x < 1)
+ fun_l4_n501(x)
+ else
+ fun_l4_n816(x)
+ end
+end
+
+def fun_l3_n943(x)
+ if (x < 1)
+ fun_l4_n650(x)
+ else
+ fun_l4_n925(x)
+ end
+end
+
+def fun_l3_n944(x)
+ if (x < 1)
+ fun_l4_n829(x)
+ else
+ fun_l4_n647(x)
+ end
+end
+
+def fun_l3_n945(x)
+ if (x < 1)
+ fun_l4_n401(x)
+ else
+ fun_l4_n791(x)
+ end
+end
+
+def fun_l3_n946(x)
+ if (x < 1)
+ fun_l4_n551(x)
+ else
+ fun_l4_n104(x)
+ end
+end
+
+def fun_l3_n947(x)
+ if (x < 1)
+ fun_l4_n927(x)
+ else
+ fun_l4_n213(x)
+ end
+end
+
+def fun_l3_n948(x)
+ if (x < 1)
+ fun_l4_n912(x)
+ else
+ fun_l4_n609(x)
+ end
+end
+
+def fun_l3_n949(x)
+ if (x < 1)
+ fun_l4_n302(x)
+ else
+ fun_l4_n157(x)
+ end
+end
+
+def fun_l3_n950(x)
+ if (x < 1)
+ fun_l4_n955(x)
+ else
+ fun_l4_n492(x)
+ end
+end
+
+def fun_l3_n951(x)
+ if (x < 1)
+ fun_l4_n486(x)
+ else
+ fun_l4_n412(x)
+ end
+end
+
+def fun_l3_n952(x)
+ if (x < 1)
+ fun_l4_n850(x)
+ else
+ fun_l4_n885(x)
+ end
+end
+
+def fun_l3_n953(x)
+ if (x < 1)
+ fun_l4_n84(x)
+ else
+ fun_l4_n622(x)
+ end
+end
+
+def fun_l3_n954(x)
+ if (x < 1)
+ fun_l4_n235(x)
+ else
+ fun_l4_n67(x)
+ end
+end
+
+def fun_l3_n955(x)
+ if (x < 1)
+ fun_l4_n347(x)
+ else
+ fun_l4_n757(x)
+ end
+end
+
+def fun_l3_n956(x)
+ if (x < 1)
+ fun_l4_n825(x)
+ else
+ fun_l4_n10(x)
+ end
+end
+
+def fun_l3_n957(x)
+ if (x < 1)
+ fun_l4_n393(x)
+ else
+ fun_l4_n482(x)
+ end
+end
+
+def fun_l3_n958(x)
+ if (x < 1)
+ fun_l4_n0(x)
+ else
+ fun_l4_n556(x)
+ end
+end
+
+def fun_l3_n959(x)
+ if (x < 1)
+ fun_l4_n806(x)
+ else
+ fun_l4_n783(x)
+ end
+end
+
+def fun_l3_n960(x)
+ if (x < 1)
+ fun_l4_n964(x)
+ else
+ fun_l4_n843(x)
+ end
+end
+
+def fun_l3_n961(x)
+ if (x < 1)
+ fun_l4_n508(x)
+ else
+ fun_l4_n874(x)
+ end
+end
+
+def fun_l3_n962(x)
+ if (x < 1)
+ fun_l4_n15(x)
+ else
+ fun_l4_n197(x)
+ end
+end
+
+def fun_l3_n963(x)
+ if (x < 1)
+ fun_l4_n989(x)
+ else
+ fun_l4_n380(x)
+ end
+end
+
+def fun_l3_n964(x)
+ if (x < 1)
+ fun_l4_n315(x)
+ else
+ fun_l4_n196(x)
+ end
+end
+
+def fun_l3_n965(x)
+ if (x < 1)
+ fun_l4_n510(x)
+ else
+ fun_l4_n275(x)
+ end
+end
+
+def fun_l3_n966(x)
+ if (x < 1)
+ fun_l4_n725(x)
+ else
+ fun_l4_n94(x)
+ end
+end
+
+def fun_l3_n967(x)
+ if (x < 1)
+ fun_l4_n733(x)
+ else
+ fun_l4_n577(x)
+ end
+end
+
+def fun_l3_n968(x)
+ if (x < 1)
+ fun_l4_n280(x)
+ else
+ fun_l4_n702(x)
+ end
+end
+
+def fun_l3_n969(x)
+ if (x < 1)
+ fun_l4_n41(x)
+ else
+ fun_l4_n343(x)
+ end
+end
+
+def fun_l3_n970(x)
+ if (x < 1)
+ fun_l4_n102(x)
+ else
+ fun_l4_n785(x)
+ end
+end
+
+def fun_l3_n971(x)
+ if (x < 1)
+ fun_l4_n460(x)
+ else
+ fun_l4_n388(x)
+ end
+end
+
+def fun_l3_n972(x)
+ if (x < 1)
+ fun_l4_n31(x)
+ else
+ fun_l4_n421(x)
+ end
+end
+
+def fun_l3_n973(x)
+ if (x < 1)
+ fun_l4_n587(x)
+ else
+ fun_l4_n401(x)
+ end
+end
+
+def fun_l3_n974(x)
+ if (x < 1)
+ fun_l4_n593(x)
+ else
+ fun_l4_n418(x)
+ end
+end
+
+def fun_l3_n975(x)
+ if (x < 1)
+ fun_l4_n12(x)
+ else
+ fun_l4_n929(x)
+ end
+end
+
+def fun_l3_n976(x)
+ if (x < 1)
+ fun_l4_n516(x)
+ else
+ fun_l4_n402(x)
+ end
+end
+
+def fun_l3_n977(x)
+ if (x < 1)
+ fun_l4_n590(x)
+ else
+ fun_l4_n876(x)
+ end
+end
+
+def fun_l3_n978(x)
+ if (x < 1)
+ fun_l4_n505(x)
+ else
+ fun_l4_n94(x)
+ end
+end
+
+def fun_l3_n979(x)
+ if (x < 1)
+ fun_l4_n625(x)
+ else
+ fun_l4_n344(x)
+ end
+end
+
+def fun_l3_n980(x)
+ if (x < 1)
+ fun_l4_n128(x)
+ else
+ fun_l4_n454(x)
+ end
+end
+
+def fun_l3_n981(x)
+ if (x < 1)
+ fun_l4_n937(x)
+ else
+ fun_l4_n277(x)
+ end
+end
+
+def fun_l3_n982(x)
+ if (x < 1)
+ fun_l4_n237(x)
+ else
+ fun_l4_n113(x)
+ end
+end
+
+def fun_l3_n983(x)
+ if (x < 1)
+ fun_l4_n668(x)
+ else
+ fun_l4_n668(x)
+ end
+end
+
+def fun_l3_n984(x)
+ if (x < 1)
+ fun_l4_n783(x)
+ else
+ fun_l4_n771(x)
+ end
+end
+
+def fun_l3_n985(x)
+ if (x < 1)
+ fun_l4_n135(x)
+ else
+ fun_l4_n967(x)
+ end
+end
+
+def fun_l3_n986(x)
+ if (x < 1)
+ fun_l4_n29(x)
+ else
+ fun_l4_n313(x)
+ end
+end
+
+def fun_l3_n987(x)
+ if (x < 1)
+ fun_l4_n765(x)
+ else
+ fun_l4_n885(x)
+ end
+end
+
+def fun_l3_n988(x)
+ if (x < 1)
+ fun_l4_n242(x)
+ else
+ fun_l4_n622(x)
+ end
+end
+
+def fun_l3_n989(x)
+ if (x < 1)
+ fun_l4_n916(x)
+ else
+ fun_l4_n518(x)
+ end
+end
+
+def fun_l3_n990(x)
+ if (x < 1)
+ fun_l4_n523(x)
+ else
+ fun_l4_n468(x)
+ end
+end
+
+def fun_l3_n991(x)
+ if (x < 1)
+ fun_l4_n904(x)
+ else
+ fun_l4_n601(x)
+ end
+end
+
+def fun_l3_n992(x)
+ if (x < 1)
+ fun_l4_n437(x)
+ else
+ fun_l4_n77(x)
+ end
+end
+
+def fun_l3_n993(x)
+ if (x < 1)
+ fun_l4_n957(x)
+ else
+ fun_l4_n619(x)
+ end
+end
+
+def fun_l3_n994(x)
+ if (x < 1)
+ fun_l4_n540(x)
+ else
+ fun_l4_n108(x)
+ end
+end
+
+def fun_l3_n995(x)
+ if (x < 1)
+ fun_l4_n8(x)
+ else
+ fun_l4_n428(x)
+ end
+end
+
+def fun_l3_n996(x)
+ if (x < 1)
+ fun_l4_n53(x)
+ else
+ fun_l4_n278(x)
+ end
+end
+
+def fun_l3_n997(x)
+ if (x < 1)
+ fun_l4_n930(x)
+ else
+ fun_l4_n671(x)
+ end
+end
+
+def fun_l3_n998(x)
+ if (x < 1)
+ fun_l4_n574(x)
+ else
+ fun_l4_n879(x)
+ end
+end
+
+def fun_l3_n999(x)
+ if (x < 1)
+ fun_l4_n316(x)
+ else
+ fun_l4_n93(x)
+ end
+end
+
+def fun_l4_n0(x)
+ if (x < 1)
+ fun_l5_n524(x)
+ else
+ fun_l5_n284(x)
+ end
+end
+
+def fun_l4_n1(x)
+ if (x < 1)
+ fun_l5_n845(x)
+ else
+ fun_l5_n863(x)
+ end
+end
+
+def fun_l4_n2(x)
+ if (x < 1)
+ fun_l5_n258(x)
+ else
+ fun_l5_n860(x)
+ end
+end
+
+def fun_l4_n3(x)
+ if (x < 1)
+ fun_l5_n253(x)
+ else
+ fun_l5_n763(x)
+ end
+end
+
+def fun_l4_n4(x)
+ if (x < 1)
+ fun_l5_n833(x)
+ else
+ fun_l5_n807(x)
+ end
+end
+
+def fun_l4_n5(x)
+ if (x < 1)
+ fun_l5_n890(x)
+ else
+ fun_l5_n669(x)
+ end
+end
+
+def fun_l4_n6(x)
+ if (x < 1)
+ fun_l5_n396(x)
+ else
+ fun_l5_n388(x)
+ end
+end
+
+def fun_l4_n7(x)
+ if (x < 1)
+ fun_l5_n926(x)
+ else
+ fun_l5_n661(x)
+ end
+end
+
+def fun_l4_n8(x)
+ if (x < 1)
+ fun_l5_n990(x)
+ else
+ fun_l5_n765(x)
+ end
+end
+
+def fun_l4_n9(x)
+ if (x < 1)
+ fun_l5_n978(x)
+ else
+ fun_l5_n342(x)
+ end
+end
+
+def fun_l4_n10(x)
+ if (x < 1)
+ fun_l5_n500(x)
+ else
+ fun_l5_n758(x)
+ end
+end
+
+def fun_l4_n11(x)
+ if (x < 1)
+ fun_l5_n10(x)
+ else
+ fun_l5_n796(x)
+ end
+end
+
+def fun_l4_n12(x)
+ if (x < 1)
+ fun_l5_n173(x)
+ else
+ fun_l5_n87(x)
+ end
+end
+
+def fun_l4_n13(x)
+ if (x < 1)
+ fun_l5_n852(x)
+ else
+ fun_l5_n93(x)
+ end
+end
+
+def fun_l4_n14(x)
+ if (x < 1)
+ fun_l5_n526(x)
+ else
+ fun_l5_n144(x)
+ end
+end
+
+def fun_l4_n15(x)
+ if (x < 1)
+ fun_l5_n398(x)
+ else
+ fun_l5_n632(x)
+ end
+end
+
+def fun_l4_n16(x)
+ if (x < 1)
+ fun_l5_n774(x)
+ else
+ fun_l5_n716(x)
+ end
+end
+
+def fun_l4_n17(x)
+ if (x < 1)
+ fun_l5_n412(x)
+ else
+ fun_l5_n95(x)
+ end
+end
+
+def fun_l4_n18(x)
+ if (x < 1)
+ fun_l5_n446(x)
+ else
+ fun_l5_n885(x)
+ end
+end
+
+def fun_l4_n19(x)
+ if (x < 1)
+ fun_l5_n420(x)
+ else
+ fun_l5_n420(x)
+ end
+end
+
+def fun_l4_n20(x)
+ if (x < 1)
+ fun_l5_n274(x)
+ else
+ fun_l5_n813(x)
+ end
+end
+
+def fun_l4_n21(x)
+ if (x < 1)
+ fun_l5_n174(x)
+ else
+ fun_l5_n781(x)
+ end
+end
+
+def fun_l4_n22(x)
+ if (x < 1)
+ fun_l5_n903(x)
+ else
+ fun_l5_n224(x)
+ end
+end
+
+def fun_l4_n23(x)
+ if (x < 1)
+ fun_l5_n317(x)
+ else
+ fun_l5_n900(x)
+ end
+end
+
+def fun_l4_n24(x)
+ if (x < 1)
+ fun_l5_n600(x)
+ else
+ fun_l5_n515(x)
+ end
+end
+
+def fun_l4_n25(x)
+ if (x < 1)
+ fun_l5_n151(x)
+ else
+ fun_l5_n790(x)
+ end
+end
+
+def fun_l4_n26(x)
+ if (x < 1)
+ fun_l5_n256(x)
+ else
+ fun_l5_n449(x)
+ end
+end
+
+def fun_l4_n27(x)
+ if (x < 1)
+ fun_l5_n985(x)
+ else
+ fun_l5_n763(x)
+ end
+end
+
+def fun_l4_n28(x)
+ if (x < 1)
+ fun_l5_n961(x)
+ else
+ fun_l5_n86(x)
+ end
+end
+
+def fun_l4_n29(x)
+ if (x < 1)
+ fun_l5_n359(x)
+ else
+ fun_l5_n894(x)
+ end
+end
+
+def fun_l4_n30(x)
+ if (x < 1)
+ fun_l5_n426(x)
+ else
+ fun_l5_n983(x)
+ end
+end
+
+def fun_l4_n31(x)
+ if (x < 1)
+ fun_l5_n996(x)
+ else
+ fun_l5_n343(x)
+ end
+end
+
+def fun_l4_n32(x)
+ if (x < 1)
+ fun_l5_n300(x)
+ else
+ fun_l5_n719(x)
+ end
+end
+
+def fun_l4_n33(x)
+ if (x < 1)
+ fun_l5_n755(x)
+ else
+ fun_l5_n623(x)
+ end
+end
+
+def fun_l4_n34(x)
+ if (x < 1)
+ fun_l5_n681(x)
+ else
+ fun_l5_n410(x)
+ end
+end
+
+def fun_l4_n35(x)
+ if (x < 1)
+ fun_l5_n356(x)
+ else
+ fun_l5_n351(x)
+ end
+end
+
+def fun_l4_n36(x)
+ if (x < 1)
+ fun_l5_n463(x)
+ else
+ fun_l5_n402(x)
+ end
+end
+
+def fun_l4_n37(x)
+ if (x < 1)
+ fun_l5_n250(x)
+ else
+ fun_l5_n681(x)
+ end
+end
+
+def fun_l4_n38(x)
+ if (x < 1)
+ fun_l5_n573(x)
+ else
+ fun_l5_n622(x)
+ end
+end
+
+def fun_l4_n39(x)
+ if (x < 1)
+ fun_l5_n545(x)
+ else
+ fun_l5_n210(x)
+ end
+end
+
+def fun_l4_n40(x)
+ if (x < 1)
+ fun_l5_n264(x)
+ else
+ fun_l5_n239(x)
+ end
+end
+
+def fun_l4_n41(x)
+ if (x < 1)
+ fun_l5_n635(x)
+ else
+ fun_l5_n224(x)
+ end
+end
+
+def fun_l4_n42(x)
+ if (x < 1)
+ fun_l5_n806(x)
+ else
+ fun_l5_n125(x)
+ end
+end
+
+def fun_l4_n43(x)
+ if (x < 1)
+ fun_l5_n480(x)
+ else
+ fun_l5_n625(x)
+ end
+end
+
+def fun_l4_n44(x)
+ if (x < 1)
+ fun_l5_n644(x)
+ else
+ fun_l5_n465(x)
+ end
+end
+
+def fun_l4_n45(x)
+ if (x < 1)
+ fun_l5_n999(x)
+ else
+ fun_l5_n759(x)
+ end
+end
+
+def fun_l4_n46(x)
+ if (x < 1)
+ fun_l5_n866(x)
+ else
+ fun_l5_n536(x)
+ end
+end
+
+def fun_l4_n47(x)
+ if (x < 1)
+ fun_l5_n328(x)
+ else
+ fun_l5_n533(x)
+ end
+end
+
+def fun_l4_n48(x)
+ if (x < 1)
+ fun_l5_n902(x)
+ else
+ fun_l5_n919(x)
+ end
+end
+
+def fun_l4_n49(x)
+ if (x < 1)
+ fun_l5_n197(x)
+ else
+ fun_l5_n262(x)
+ end
+end
+
+def fun_l4_n50(x)
+ if (x < 1)
+ fun_l5_n172(x)
+ else
+ fun_l5_n731(x)
+ end
+end
+
+def fun_l4_n51(x)
+ if (x < 1)
+ fun_l5_n502(x)
+ else
+ fun_l5_n149(x)
+ end
+end
+
+def fun_l4_n52(x)
+ if (x < 1)
+ fun_l5_n69(x)
+ else
+ fun_l5_n536(x)
+ end
+end
+
+def fun_l4_n53(x)
+ if (x < 1)
+ fun_l5_n932(x)
+ else
+ fun_l5_n482(x)
+ end
+end
+
+def fun_l4_n54(x)
+ if (x < 1)
+ fun_l5_n982(x)
+ else
+ fun_l5_n207(x)
+ end
+end
+
+def fun_l4_n55(x)
+ if (x < 1)
+ fun_l5_n949(x)
+ else
+ fun_l5_n9(x)
+ end
+end
+
+def fun_l4_n56(x)
+ if (x < 1)
+ fun_l5_n672(x)
+ else
+ fun_l5_n924(x)
+ end
+end
+
+def fun_l4_n57(x)
+ if (x < 1)
+ fun_l5_n757(x)
+ else
+ fun_l5_n609(x)
+ end
+end
+
+def fun_l4_n58(x)
+ if (x < 1)
+ fun_l5_n251(x)
+ else
+ fun_l5_n471(x)
+ end
+end
+
+def fun_l4_n59(x)
+ if (x < 1)
+ fun_l5_n878(x)
+ else
+ fun_l5_n626(x)
+ end
+end
+
+def fun_l4_n60(x)
+ if (x < 1)
+ fun_l5_n859(x)
+ else
+ fun_l5_n646(x)
+ end
+end
+
+def fun_l4_n61(x)
+ if (x < 1)
+ fun_l5_n417(x)
+ else
+ fun_l5_n587(x)
+ end
+end
+
+def fun_l4_n62(x)
+ if (x < 1)
+ fun_l5_n164(x)
+ else
+ fun_l5_n861(x)
+ end
+end
+
+def fun_l4_n63(x)
+ if (x < 1)
+ fun_l5_n591(x)
+ else
+ fun_l5_n79(x)
+ end
+end
+
+def fun_l4_n64(x)
+ if (x < 1)
+ fun_l5_n269(x)
+ else
+ fun_l5_n336(x)
+ end
+end
+
+def fun_l4_n65(x)
+ if (x < 1)
+ fun_l5_n420(x)
+ else
+ fun_l5_n557(x)
+ end
+end
+
+def fun_l4_n66(x)
+ if (x < 1)
+ fun_l5_n61(x)
+ else
+ fun_l5_n690(x)
+ end
+end
+
+def fun_l4_n67(x)
+ if (x < 1)
+ fun_l5_n939(x)
+ else
+ fun_l5_n139(x)
+ end
+end
+
+def fun_l4_n68(x)
+ if (x < 1)
+ fun_l5_n430(x)
+ else
+ fun_l5_n625(x)
+ end
+end
+
+def fun_l4_n69(x)
+ if (x < 1)
+ fun_l5_n532(x)
+ else
+ fun_l5_n909(x)
+ end
+end
+
+def fun_l4_n70(x)
+ if (x < 1)
+ fun_l5_n937(x)
+ else
+ fun_l5_n886(x)
+ end
+end
+
+def fun_l4_n71(x)
+ if (x < 1)
+ fun_l5_n554(x)
+ else
+ fun_l5_n898(x)
+ end
+end
+
+def fun_l4_n72(x)
+ if (x < 1)
+ fun_l5_n390(x)
+ else
+ fun_l5_n690(x)
+ end
+end
+
+def fun_l4_n73(x)
+ if (x < 1)
+ fun_l5_n980(x)
+ else
+ fun_l5_n248(x)
+ end
+end
+
+def fun_l4_n74(x)
+ if (x < 1)
+ fun_l5_n438(x)
+ else
+ fun_l5_n247(x)
+ end
+end
+
+def fun_l4_n75(x)
+ if (x < 1)
+ fun_l5_n798(x)
+ else
+ fun_l5_n399(x)
+ end
+end
+
+def fun_l4_n76(x)
+ if (x < 1)
+ fun_l5_n419(x)
+ else
+ fun_l5_n754(x)
+ end
+end
+
+def fun_l4_n77(x)
+ if (x < 1)
+ fun_l5_n875(x)
+ else
+ fun_l5_n18(x)
+ end
+end
+
+def fun_l4_n78(x)
+ if (x < 1)
+ fun_l5_n695(x)
+ else
+ fun_l5_n336(x)
+ end
+end
+
+def fun_l4_n79(x)
+ if (x < 1)
+ fun_l5_n185(x)
+ else
+ fun_l5_n627(x)
+ end
+end
+
+def fun_l4_n80(x)
+ if (x < 1)
+ fun_l5_n359(x)
+ else
+ fun_l5_n465(x)
+ end
+end
+
+def fun_l4_n81(x)
+ if (x < 1)
+ fun_l5_n284(x)
+ else
+ fun_l5_n232(x)
+ end
+end
+
+def fun_l4_n82(x)
+ if (x < 1)
+ fun_l5_n947(x)
+ else
+ fun_l5_n748(x)
+ end
+end
+
+def fun_l4_n83(x)
+ if (x < 1)
+ fun_l5_n254(x)
+ else
+ fun_l5_n836(x)
+ end
+end
+
+def fun_l4_n84(x)
+ if (x < 1)
+ fun_l5_n181(x)
+ else
+ fun_l5_n789(x)
+ end
+end
+
+def fun_l4_n85(x)
+ if (x < 1)
+ fun_l5_n682(x)
+ else
+ fun_l5_n547(x)
+ end
+end
+
+def fun_l4_n86(x)
+ if (x < 1)
+ fun_l5_n35(x)
+ else
+ fun_l5_n157(x)
+ end
+end
+
+def fun_l4_n87(x)
+ if (x < 1)
+ fun_l5_n981(x)
+ else
+ fun_l5_n724(x)
+ end
+end
+
+def fun_l4_n88(x)
+ if (x < 1)
+ fun_l5_n35(x)
+ else
+ fun_l5_n914(x)
+ end
+end
+
+def fun_l4_n89(x)
+ if (x < 1)
+ fun_l5_n844(x)
+ else
+ fun_l5_n668(x)
+ end
+end
+
+def fun_l4_n90(x)
+ if (x < 1)
+ fun_l5_n615(x)
+ else
+ fun_l5_n415(x)
+ end
+end
+
+def fun_l4_n91(x)
+ if (x < 1)
+ fun_l5_n141(x)
+ else
+ fun_l5_n538(x)
+ end
+end
+
+def fun_l4_n92(x)
+ if (x < 1)
+ fun_l5_n563(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n93(x)
+ if (x < 1)
+ fun_l5_n967(x)
+ else
+ fun_l5_n549(x)
+ end
+end
+
+def fun_l4_n94(x)
+ if (x < 1)
+ fun_l5_n992(x)
+ else
+ fun_l5_n34(x)
+ end
+end
+
+def fun_l4_n95(x)
+ if (x < 1)
+ fun_l5_n187(x)
+ else
+ fun_l5_n980(x)
+ end
+end
+
+def fun_l4_n96(x)
+ if (x < 1)
+ fun_l5_n543(x)
+ else
+ fun_l5_n318(x)
+ end
+end
+
+def fun_l4_n97(x)
+ if (x < 1)
+ fun_l5_n253(x)
+ else
+ fun_l5_n709(x)
+ end
+end
+
+def fun_l4_n98(x)
+ if (x < 1)
+ fun_l5_n233(x)
+ else
+ fun_l5_n963(x)
+ end
+end
+
+def fun_l4_n99(x)
+ if (x < 1)
+ fun_l5_n944(x)
+ else
+ fun_l5_n688(x)
+ end
+end
+
+def fun_l4_n100(x)
+ if (x < 1)
+ fun_l5_n422(x)
+ else
+ fun_l5_n805(x)
+ end
+end
+
+def fun_l4_n101(x)
+ if (x < 1)
+ fun_l5_n125(x)
+ else
+ fun_l5_n729(x)
+ end
+end
+
+def fun_l4_n102(x)
+ if (x < 1)
+ fun_l5_n339(x)
+ else
+ fun_l5_n394(x)
+ end
+end
+
+def fun_l4_n103(x)
+ if (x < 1)
+ fun_l5_n149(x)
+ else
+ fun_l5_n839(x)
+ end
+end
+
+def fun_l4_n104(x)
+ if (x < 1)
+ fun_l5_n750(x)
+ else
+ fun_l5_n514(x)
+ end
+end
+
+def fun_l4_n105(x)
+ if (x < 1)
+ fun_l5_n726(x)
+ else
+ fun_l5_n251(x)
+ end
+end
+
+def fun_l4_n106(x)
+ if (x < 1)
+ fun_l5_n810(x)
+ else
+ fun_l5_n46(x)
+ end
+end
+
+def fun_l4_n107(x)
+ if (x < 1)
+ fun_l5_n702(x)
+ else
+ fun_l5_n224(x)
+ end
+end
+
+def fun_l4_n108(x)
+ if (x < 1)
+ fun_l5_n604(x)
+ else
+ fun_l5_n24(x)
+ end
+end
+
+def fun_l4_n109(x)
+ if (x < 1)
+ fun_l5_n511(x)
+ else
+ fun_l5_n529(x)
+ end
+end
+
+def fun_l4_n110(x)
+ if (x < 1)
+ fun_l5_n193(x)
+ else
+ fun_l5_n210(x)
+ end
+end
+
+def fun_l4_n111(x)
+ if (x < 1)
+ fun_l5_n599(x)
+ else
+ fun_l5_n85(x)
+ end
+end
+
+def fun_l4_n112(x)
+ if (x < 1)
+ fun_l5_n910(x)
+ else
+ fun_l5_n292(x)
+ end
+end
+
+def fun_l4_n113(x)
+ if (x < 1)
+ fun_l5_n851(x)
+ else
+ fun_l5_n269(x)
+ end
+end
+
+def fun_l4_n114(x)
+ if (x < 1)
+ fun_l5_n739(x)
+ else
+ fun_l5_n439(x)
+ end
+end
+
+def fun_l4_n115(x)
+ if (x < 1)
+ fun_l5_n580(x)
+ else
+ fun_l5_n656(x)
+ end
+end
+
+def fun_l4_n116(x)
+ if (x < 1)
+ fun_l5_n992(x)
+ else
+ fun_l5_n703(x)
+ end
+end
+
+def fun_l4_n117(x)
+ if (x < 1)
+ fun_l5_n549(x)
+ else
+ fun_l5_n300(x)
+ end
+end
+
+def fun_l4_n118(x)
+ if (x < 1)
+ fun_l5_n785(x)
+ else
+ fun_l5_n596(x)
+ end
+end
+
+def fun_l4_n119(x)
+ if (x < 1)
+ fun_l5_n236(x)
+ else
+ fun_l5_n84(x)
+ end
+end
+
+def fun_l4_n120(x)
+ if (x < 1)
+ fun_l5_n78(x)
+ else
+ fun_l5_n610(x)
+ end
+end
+
+def fun_l4_n121(x)
+ if (x < 1)
+ fun_l5_n591(x)
+ else
+ fun_l5_n557(x)
+ end
+end
+
+def fun_l4_n122(x)
+ if (x < 1)
+ fun_l5_n927(x)
+ else
+ fun_l5_n40(x)
+ end
+end
+
+def fun_l4_n123(x)
+ if (x < 1)
+ fun_l5_n620(x)
+ else
+ fun_l5_n173(x)
+ end
+end
+
+def fun_l4_n124(x)
+ if (x < 1)
+ fun_l5_n558(x)
+ else
+ fun_l5_n330(x)
+ end
+end
+
+def fun_l4_n125(x)
+ if (x < 1)
+ fun_l5_n535(x)
+ else
+ fun_l5_n636(x)
+ end
+end
+
+def fun_l4_n126(x)
+ if (x < 1)
+ fun_l5_n401(x)
+ else
+ fun_l5_n747(x)
+ end
+end
+
+def fun_l4_n127(x)
+ if (x < 1)
+ fun_l5_n172(x)
+ else
+ fun_l5_n124(x)
+ end
+end
+
+def fun_l4_n128(x)
+ if (x < 1)
+ fun_l5_n449(x)
+ else
+ fun_l5_n619(x)
+ end
+end
+
+def fun_l4_n129(x)
+ if (x < 1)
+ fun_l5_n564(x)
+ else
+ fun_l5_n306(x)
+ end
+end
+
+def fun_l4_n130(x)
+ if (x < 1)
+ fun_l5_n196(x)
+ else
+ fun_l5_n170(x)
+ end
+end
+
+def fun_l4_n131(x)
+ if (x < 1)
+ fun_l5_n383(x)
+ else
+ fun_l5_n87(x)
+ end
+end
+
+def fun_l4_n132(x)
+ if (x < 1)
+ fun_l5_n568(x)
+ else
+ fun_l5_n54(x)
+ end
+end
+
+def fun_l4_n133(x)
+ if (x < 1)
+ fun_l5_n780(x)
+ else
+ fun_l5_n184(x)
+ end
+end
+
+def fun_l4_n134(x)
+ if (x < 1)
+ fun_l5_n880(x)
+ else
+ fun_l5_n38(x)
+ end
+end
+
+def fun_l4_n135(x)
+ if (x < 1)
+ fun_l5_n819(x)
+ else
+ fun_l5_n440(x)
+ end
+end
+
+def fun_l4_n136(x)
+ if (x < 1)
+ fun_l5_n301(x)
+ else
+ fun_l5_n676(x)
+ end
+end
+
+def fun_l4_n137(x)
+ if (x < 1)
+ fun_l5_n69(x)
+ else
+ fun_l5_n333(x)
+ end
+end
+
+def fun_l4_n138(x)
+ if (x < 1)
+ fun_l5_n303(x)
+ else
+ fun_l5_n69(x)
+ end
+end
+
+def fun_l4_n139(x)
+ if (x < 1)
+ fun_l5_n939(x)
+ else
+ fun_l5_n103(x)
+ end
+end
+
+def fun_l4_n140(x)
+ if (x < 1)
+ fun_l5_n517(x)
+ else
+ fun_l5_n24(x)
+ end
+end
+
+def fun_l4_n141(x)
+ if (x < 1)
+ fun_l5_n923(x)
+ else
+ fun_l5_n968(x)
+ end
+end
+
+def fun_l4_n142(x)
+ if (x < 1)
+ fun_l5_n196(x)
+ else
+ fun_l5_n841(x)
+ end
+end
+
+def fun_l4_n143(x)
+ if (x < 1)
+ fun_l5_n726(x)
+ else
+ fun_l5_n715(x)
+ end
+end
+
+def fun_l4_n144(x)
+ if (x < 1)
+ fun_l5_n434(x)
+ else
+ fun_l5_n771(x)
+ end
+end
+
+def fun_l4_n145(x)
+ if (x < 1)
+ fun_l5_n211(x)
+ else
+ fun_l5_n963(x)
+ end
+end
+
+def fun_l4_n146(x)
+ if (x < 1)
+ fun_l5_n534(x)
+ else
+ fun_l5_n5(x)
+ end
+end
+
+def fun_l4_n147(x)
+ if (x < 1)
+ fun_l5_n409(x)
+ else
+ fun_l5_n298(x)
+ end
+end
+
+def fun_l4_n148(x)
+ if (x < 1)
+ fun_l5_n447(x)
+ else
+ fun_l5_n474(x)
+ end
+end
+
+def fun_l4_n149(x)
+ if (x < 1)
+ fun_l5_n181(x)
+ else
+ fun_l5_n87(x)
+ end
+end
+
+def fun_l4_n150(x)
+ if (x < 1)
+ fun_l5_n871(x)
+ else
+ fun_l5_n201(x)
+ end
+end
+
+def fun_l4_n151(x)
+ if (x < 1)
+ fun_l5_n539(x)
+ else
+ fun_l5_n855(x)
+ end
+end
+
+def fun_l4_n152(x)
+ if (x < 1)
+ fun_l5_n387(x)
+ else
+ fun_l5_n730(x)
+ end
+end
+
+def fun_l4_n153(x)
+ if (x < 1)
+ fun_l5_n785(x)
+ else
+ fun_l5_n774(x)
+ end
+end
+
+def fun_l4_n154(x)
+ if (x < 1)
+ fun_l5_n924(x)
+ else
+ fun_l5_n414(x)
+ end
+end
+
+def fun_l4_n155(x)
+ if (x < 1)
+ fun_l5_n110(x)
+ else
+ fun_l5_n669(x)
+ end
+end
+
+def fun_l4_n156(x)
+ if (x < 1)
+ fun_l5_n551(x)
+ else
+ fun_l5_n456(x)
+ end
+end
+
+def fun_l4_n157(x)
+ if (x < 1)
+ fun_l5_n872(x)
+ else
+ fun_l5_n397(x)
+ end
+end
+
+def fun_l4_n158(x)
+ if (x < 1)
+ fun_l5_n208(x)
+ else
+ fun_l5_n464(x)
+ end
+end
+
+def fun_l4_n159(x)
+ if (x < 1)
+ fun_l5_n236(x)
+ else
+ fun_l5_n532(x)
+ end
+end
+
+def fun_l4_n160(x)
+ if (x < 1)
+ fun_l5_n820(x)
+ else
+ fun_l5_n146(x)
+ end
+end
+
+def fun_l4_n161(x)
+ if (x < 1)
+ fun_l5_n154(x)
+ else
+ fun_l5_n388(x)
+ end
+end
+
+def fun_l4_n162(x)
+ if (x < 1)
+ fun_l5_n456(x)
+ else
+ fun_l5_n309(x)
+ end
+end
+
+def fun_l4_n163(x)
+ if (x < 1)
+ fun_l5_n201(x)
+ else
+ fun_l5_n728(x)
+ end
+end
+
+def fun_l4_n164(x)
+ if (x < 1)
+ fun_l5_n806(x)
+ else
+ fun_l5_n156(x)
+ end
+end
+
+def fun_l4_n165(x)
+ if (x < 1)
+ fun_l5_n984(x)
+ else
+ fun_l5_n996(x)
+ end
+end
+
+def fun_l4_n166(x)
+ if (x < 1)
+ fun_l5_n253(x)
+ else
+ fun_l5_n527(x)
+ end
+end
+
+def fun_l4_n167(x)
+ if (x < 1)
+ fun_l5_n513(x)
+ else
+ fun_l5_n145(x)
+ end
+end
+
+def fun_l4_n168(x)
+ if (x < 1)
+ fun_l5_n694(x)
+ else
+ fun_l5_n841(x)
+ end
+end
+
+def fun_l4_n169(x)
+ if (x < 1)
+ fun_l5_n463(x)
+ else
+ fun_l5_n193(x)
+ end
+end
+
+def fun_l4_n170(x)
+ if (x < 1)
+ fun_l5_n638(x)
+ else
+ fun_l5_n252(x)
+ end
+end
+
+def fun_l4_n171(x)
+ if (x < 1)
+ fun_l5_n166(x)
+ else
+ fun_l5_n134(x)
+ end
+end
+
+def fun_l4_n172(x)
+ if (x < 1)
+ fun_l5_n172(x)
+ else
+ fun_l5_n179(x)
+ end
+end
+
+def fun_l4_n173(x)
+ if (x < 1)
+ fun_l5_n218(x)
+ else
+ fun_l5_n124(x)
+ end
+end
+
+def fun_l4_n174(x)
+ if (x < 1)
+ fun_l5_n370(x)
+ else
+ fun_l5_n742(x)
+ end
+end
+
+def fun_l4_n175(x)
+ if (x < 1)
+ fun_l5_n593(x)
+ else
+ fun_l5_n542(x)
+ end
+end
+
+def fun_l4_n176(x)
+ if (x < 1)
+ fun_l5_n438(x)
+ else
+ fun_l5_n606(x)
+ end
+end
+
+def fun_l4_n177(x)
+ if (x < 1)
+ fun_l5_n316(x)
+ else
+ fun_l5_n92(x)
+ end
+end
+
+def fun_l4_n178(x)
+ if (x < 1)
+ fun_l5_n222(x)
+ else
+ fun_l5_n461(x)
+ end
+end
+
+def fun_l4_n179(x)
+ if (x < 1)
+ fun_l5_n244(x)
+ else
+ fun_l5_n536(x)
+ end
+end
+
+def fun_l4_n180(x)
+ if (x < 1)
+ fun_l5_n120(x)
+ else
+ fun_l5_n905(x)
+ end
+end
+
+def fun_l4_n181(x)
+ if (x < 1)
+ fun_l5_n601(x)
+ else
+ fun_l5_n62(x)
+ end
+end
+
+def fun_l4_n182(x)
+ if (x < 1)
+ fun_l5_n701(x)
+ else
+ fun_l5_n25(x)
+ end
+end
+
+def fun_l4_n183(x)
+ if (x < 1)
+ fun_l5_n361(x)
+ else
+ fun_l5_n433(x)
+ end
+end
+
+def fun_l4_n184(x)
+ if (x < 1)
+ fun_l5_n29(x)
+ else
+ fun_l5_n302(x)
+ end
+end
+
+def fun_l4_n185(x)
+ if (x < 1)
+ fun_l5_n697(x)
+ else
+ fun_l5_n849(x)
+ end
+end
+
+def fun_l4_n186(x)
+ if (x < 1)
+ fun_l5_n76(x)
+ else
+ fun_l5_n402(x)
+ end
+end
+
+def fun_l4_n187(x)
+ if (x < 1)
+ fun_l5_n38(x)
+ else
+ fun_l5_n818(x)
+ end
+end
+
+def fun_l4_n188(x)
+ if (x < 1)
+ fun_l5_n730(x)
+ else
+ fun_l5_n456(x)
+ end
+end
+
+def fun_l4_n189(x)
+ if (x < 1)
+ fun_l5_n828(x)
+ else
+ fun_l5_n796(x)
+ end
+end
+
+def fun_l4_n190(x)
+ if (x < 1)
+ fun_l5_n86(x)
+ else
+ fun_l5_n976(x)
+ end
+end
+
+def fun_l4_n191(x)
+ if (x < 1)
+ fun_l5_n267(x)
+ else
+ fun_l5_n497(x)
+ end
+end
+
+def fun_l4_n192(x)
+ if (x < 1)
+ fun_l5_n534(x)
+ else
+ fun_l5_n449(x)
+ end
+end
+
+def fun_l4_n193(x)
+ if (x < 1)
+ fun_l5_n97(x)
+ else
+ fun_l5_n595(x)
+ end
+end
+
+def fun_l4_n194(x)
+ if (x < 1)
+ fun_l5_n821(x)
+ else
+ fun_l5_n823(x)
+ end
+end
+
+def fun_l4_n195(x)
+ if (x < 1)
+ fun_l5_n936(x)
+ else
+ fun_l5_n490(x)
+ end
+end
+
+def fun_l4_n196(x)
+ if (x < 1)
+ fun_l5_n579(x)
+ else
+ fun_l5_n684(x)
+ end
+end
+
+def fun_l4_n197(x)
+ if (x < 1)
+ fun_l5_n742(x)
+ else
+ fun_l5_n874(x)
+ end
+end
+
+def fun_l4_n198(x)
+ if (x < 1)
+ fun_l5_n904(x)
+ else
+ fun_l5_n394(x)
+ end
+end
+
+def fun_l4_n199(x)
+ if (x < 1)
+ fun_l5_n229(x)
+ else
+ fun_l5_n406(x)
+ end
+end
+
+def fun_l4_n200(x)
+ if (x < 1)
+ fun_l5_n332(x)
+ else
+ fun_l5_n803(x)
+ end
+end
+
+def fun_l4_n201(x)
+ if (x < 1)
+ fun_l5_n635(x)
+ else
+ fun_l5_n294(x)
+ end
+end
+
+def fun_l4_n202(x)
+ if (x < 1)
+ fun_l5_n397(x)
+ else
+ fun_l5_n924(x)
+ end
+end
+
+def fun_l4_n203(x)
+ if (x < 1)
+ fun_l5_n199(x)
+ else
+ fun_l5_n751(x)
+ end
+end
+
+def fun_l4_n204(x)
+ if (x < 1)
+ fun_l5_n570(x)
+ else
+ fun_l5_n70(x)
+ end
+end
+
+def fun_l4_n205(x)
+ if (x < 1)
+ fun_l5_n344(x)
+ else
+ fun_l5_n713(x)
+ end
+end
+
+def fun_l4_n206(x)
+ if (x < 1)
+ fun_l5_n568(x)
+ else
+ fun_l5_n40(x)
+ end
+end
+
+def fun_l4_n207(x)
+ if (x < 1)
+ fun_l5_n460(x)
+ else
+ fun_l5_n311(x)
+ end
+end
+
+def fun_l4_n208(x)
+ if (x < 1)
+ fun_l5_n995(x)
+ else
+ fun_l5_n147(x)
+ end
+end
+
+def fun_l4_n209(x)
+ if (x < 1)
+ fun_l5_n295(x)
+ else
+ fun_l5_n752(x)
+ end
+end
+
+def fun_l4_n210(x)
+ if (x < 1)
+ fun_l5_n644(x)
+ else
+ fun_l5_n555(x)
+ end
+end
+
+def fun_l4_n211(x)
+ if (x < 1)
+ fun_l5_n196(x)
+ else
+ fun_l5_n418(x)
+ end
+end
+
+def fun_l4_n212(x)
+ if (x < 1)
+ fun_l5_n761(x)
+ else
+ fun_l5_n66(x)
+ end
+end
+
+def fun_l4_n213(x)
+ if (x < 1)
+ fun_l5_n906(x)
+ else
+ fun_l5_n521(x)
+ end
+end
+
+def fun_l4_n214(x)
+ if (x < 1)
+ fun_l5_n97(x)
+ else
+ fun_l5_n431(x)
+ end
+end
+
+def fun_l4_n215(x)
+ if (x < 1)
+ fun_l5_n450(x)
+ else
+ fun_l5_n58(x)
+ end
+end
+
+def fun_l4_n216(x)
+ if (x < 1)
+ fun_l5_n576(x)
+ else
+ fun_l5_n675(x)
+ end
+end
+
+def fun_l4_n217(x)
+ if (x < 1)
+ fun_l5_n764(x)
+ else
+ fun_l5_n653(x)
+ end
+end
+
+def fun_l4_n218(x)
+ if (x < 1)
+ fun_l5_n591(x)
+ else
+ fun_l5_n398(x)
+ end
+end
+
+def fun_l4_n219(x)
+ if (x < 1)
+ fun_l5_n94(x)
+ else
+ fun_l5_n411(x)
+ end
+end
+
+def fun_l4_n220(x)
+ if (x < 1)
+ fun_l5_n13(x)
+ else
+ fun_l5_n117(x)
+ end
+end
+
+def fun_l4_n221(x)
+ if (x < 1)
+ fun_l5_n872(x)
+ else
+ fun_l5_n799(x)
+ end
+end
+
+def fun_l4_n222(x)
+ if (x < 1)
+ fun_l5_n692(x)
+ else
+ fun_l5_n99(x)
+ end
+end
+
+def fun_l4_n223(x)
+ if (x < 1)
+ fun_l5_n861(x)
+ else
+ fun_l5_n999(x)
+ end
+end
+
+def fun_l4_n224(x)
+ if (x < 1)
+ fun_l5_n547(x)
+ else
+ fun_l5_n955(x)
+ end
+end
+
+def fun_l4_n225(x)
+ if (x < 1)
+ fun_l5_n305(x)
+ else
+ fun_l5_n894(x)
+ end
+end
+
+def fun_l4_n226(x)
+ if (x < 1)
+ fun_l5_n128(x)
+ else
+ fun_l5_n662(x)
+ end
+end
+
+def fun_l4_n227(x)
+ if (x < 1)
+ fun_l5_n858(x)
+ else
+ fun_l5_n323(x)
+ end
+end
+
+def fun_l4_n228(x)
+ if (x < 1)
+ fun_l5_n923(x)
+ else
+ fun_l5_n206(x)
+ end
+end
+
+def fun_l4_n229(x)
+ if (x < 1)
+ fun_l5_n486(x)
+ else
+ fun_l5_n603(x)
+ end
+end
+
+def fun_l4_n230(x)
+ if (x < 1)
+ fun_l5_n116(x)
+ else
+ fun_l5_n887(x)
+ end
+end
+
+def fun_l4_n231(x)
+ if (x < 1)
+ fun_l5_n791(x)
+ else
+ fun_l5_n762(x)
+ end
+end
+
+def fun_l4_n232(x)
+ if (x < 1)
+ fun_l5_n511(x)
+ else
+ fun_l5_n890(x)
+ end
+end
+
+def fun_l4_n233(x)
+ if (x < 1)
+ fun_l5_n600(x)
+ else
+ fun_l5_n777(x)
+ end
+end
+
+def fun_l4_n234(x)
+ if (x < 1)
+ fun_l5_n458(x)
+ else
+ fun_l5_n379(x)
+ end
+end
+
+def fun_l4_n235(x)
+ if (x < 1)
+ fun_l5_n907(x)
+ else
+ fun_l5_n463(x)
+ end
+end
+
+def fun_l4_n236(x)
+ if (x < 1)
+ fun_l5_n177(x)
+ else
+ fun_l5_n732(x)
+ end
+end
+
+def fun_l4_n237(x)
+ if (x < 1)
+ fun_l5_n761(x)
+ else
+ fun_l5_n936(x)
+ end
+end
+
+def fun_l4_n238(x)
+ if (x < 1)
+ fun_l5_n757(x)
+ else
+ fun_l5_n733(x)
+ end
+end
+
+def fun_l4_n239(x)
+ if (x < 1)
+ fun_l5_n844(x)
+ else
+ fun_l5_n527(x)
+ end
+end
+
+def fun_l4_n240(x)
+ if (x < 1)
+ fun_l5_n594(x)
+ else
+ fun_l5_n620(x)
+ end
+end
+
+def fun_l4_n241(x)
+ if (x < 1)
+ fun_l5_n722(x)
+ else
+ fun_l5_n779(x)
+ end
+end
+
+def fun_l4_n242(x)
+ if (x < 1)
+ fun_l5_n663(x)
+ else
+ fun_l5_n237(x)
+ end
+end
+
+def fun_l4_n243(x)
+ if (x < 1)
+ fun_l5_n256(x)
+ else
+ fun_l5_n366(x)
+ end
+end
+
+def fun_l4_n244(x)
+ if (x < 1)
+ fun_l5_n614(x)
+ else
+ fun_l5_n895(x)
+ end
+end
+
+def fun_l4_n245(x)
+ if (x < 1)
+ fun_l5_n459(x)
+ else
+ fun_l5_n193(x)
+ end
+end
+
+def fun_l4_n246(x)
+ if (x < 1)
+ fun_l5_n780(x)
+ else
+ fun_l5_n175(x)
+ end
+end
+
+def fun_l4_n247(x)
+ if (x < 1)
+ fun_l5_n186(x)
+ else
+ fun_l5_n488(x)
+ end
+end
+
+def fun_l4_n248(x)
+ if (x < 1)
+ fun_l5_n156(x)
+ else
+ fun_l5_n807(x)
+ end
+end
+
+def fun_l4_n249(x)
+ if (x < 1)
+ fun_l5_n862(x)
+ else
+ fun_l5_n537(x)
+ end
+end
+
+def fun_l4_n250(x)
+ if (x < 1)
+ fun_l5_n880(x)
+ else
+ fun_l5_n528(x)
+ end
+end
+
+def fun_l4_n251(x)
+ if (x < 1)
+ fun_l5_n163(x)
+ else
+ fun_l5_n94(x)
+ end
+end
+
+def fun_l4_n252(x)
+ if (x < 1)
+ fun_l5_n937(x)
+ else
+ fun_l5_n582(x)
+ end
+end
+
+def fun_l4_n253(x)
+ if (x < 1)
+ fun_l5_n368(x)
+ else
+ fun_l5_n584(x)
+ end
+end
+
+def fun_l4_n254(x)
+ if (x < 1)
+ fun_l5_n566(x)
+ else
+ fun_l5_n449(x)
+ end
+end
+
+def fun_l4_n255(x)
+ if (x < 1)
+ fun_l5_n876(x)
+ else
+ fun_l5_n0(x)
+ end
+end
+
+def fun_l4_n256(x)
+ if (x < 1)
+ fun_l5_n842(x)
+ else
+ fun_l5_n469(x)
+ end
+end
+
+def fun_l4_n257(x)
+ if (x < 1)
+ fun_l5_n85(x)
+ else
+ fun_l5_n961(x)
+ end
+end
+
+def fun_l4_n258(x)
+ if (x < 1)
+ fun_l5_n120(x)
+ else
+ fun_l5_n893(x)
+ end
+end
+
+def fun_l4_n259(x)
+ if (x < 1)
+ fun_l5_n243(x)
+ else
+ fun_l5_n630(x)
+ end
+end
+
+def fun_l4_n260(x)
+ if (x < 1)
+ fun_l5_n710(x)
+ else
+ fun_l5_n715(x)
+ end
+end
+
+def fun_l4_n261(x)
+ if (x < 1)
+ fun_l5_n423(x)
+ else
+ fun_l5_n910(x)
+ end
+end
+
+def fun_l4_n262(x)
+ if (x < 1)
+ fun_l5_n505(x)
+ else
+ fun_l5_n532(x)
+ end
+end
+
+def fun_l4_n263(x)
+ if (x < 1)
+ fun_l5_n775(x)
+ else
+ fun_l5_n236(x)
+ end
+end
+
+def fun_l4_n264(x)
+ if (x < 1)
+ fun_l5_n140(x)
+ else
+ fun_l5_n295(x)
+ end
+end
+
+def fun_l4_n265(x)
+ if (x < 1)
+ fun_l5_n554(x)
+ else
+ fun_l5_n88(x)
+ end
+end
+
+def fun_l4_n266(x)
+ if (x < 1)
+ fun_l5_n831(x)
+ else
+ fun_l5_n307(x)
+ end
+end
+
+def fun_l4_n267(x)
+ if (x < 1)
+ fun_l5_n303(x)
+ else
+ fun_l5_n960(x)
+ end
+end
+
+def fun_l4_n268(x)
+ if (x < 1)
+ fun_l5_n322(x)
+ else
+ fun_l5_n264(x)
+ end
+end
+
+def fun_l4_n269(x)
+ if (x < 1)
+ fun_l5_n823(x)
+ else
+ fun_l5_n374(x)
+ end
+end
+
+def fun_l4_n270(x)
+ if (x < 1)
+ fun_l5_n76(x)
+ else
+ fun_l5_n918(x)
+ end
+end
+
+def fun_l4_n271(x)
+ if (x < 1)
+ fun_l5_n591(x)
+ else
+ fun_l5_n45(x)
+ end
+end
+
+def fun_l4_n272(x)
+ if (x < 1)
+ fun_l5_n686(x)
+ else
+ fun_l5_n836(x)
+ end
+end
+
+def fun_l4_n273(x)
+ if (x < 1)
+ fun_l5_n13(x)
+ else
+ fun_l5_n676(x)
+ end
+end
+
+def fun_l4_n274(x)
+ if (x < 1)
+ fun_l5_n120(x)
+ else
+ fun_l5_n180(x)
+ end
+end
+
+def fun_l4_n275(x)
+ if (x < 1)
+ fun_l5_n901(x)
+ else
+ fun_l5_n101(x)
+ end
+end
+
+def fun_l4_n276(x)
+ if (x < 1)
+ fun_l5_n289(x)
+ else
+ fun_l5_n238(x)
+ end
+end
+
+def fun_l4_n277(x)
+ if (x < 1)
+ fun_l5_n513(x)
+ else
+ fun_l5_n887(x)
+ end
+end
+
+def fun_l4_n278(x)
+ if (x < 1)
+ fun_l5_n799(x)
+ else
+ fun_l5_n763(x)
+ end
+end
+
+def fun_l4_n279(x)
+ if (x < 1)
+ fun_l5_n628(x)
+ else
+ fun_l5_n373(x)
+ end
+end
+
+def fun_l4_n280(x)
+ if (x < 1)
+ fun_l5_n661(x)
+ else
+ fun_l5_n826(x)
+ end
+end
+
+def fun_l4_n281(x)
+ if (x < 1)
+ fun_l5_n35(x)
+ else
+ fun_l5_n409(x)
+ end
+end
+
+def fun_l4_n282(x)
+ if (x < 1)
+ fun_l5_n721(x)
+ else
+ fun_l5_n719(x)
+ end
+end
+
+def fun_l4_n283(x)
+ if (x < 1)
+ fun_l5_n729(x)
+ else
+ fun_l5_n901(x)
+ end
+end
+
+def fun_l4_n284(x)
+ if (x < 1)
+ fun_l5_n17(x)
+ else
+ fun_l5_n482(x)
+ end
+end
+
+def fun_l4_n285(x)
+ if (x < 1)
+ fun_l5_n166(x)
+ else
+ fun_l5_n53(x)
+ end
+end
+
+def fun_l4_n286(x)
+ if (x < 1)
+ fun_l5_n873(x)
+ else
+ fun_l5_n383(x)
+ end
+end
+
+def fun_l4_n287(x)
+ if (x < 1)
+ fun_l5_n269(x)
+ else
+ fun_l5_n49(x)
+ end
+end
+
+def fun_l4_n288(x)
+ if (x < 1)
+ fun_l5_n292(x)
+ else
+ fun_l5_n353(x)
+ end
+end
+
+def fun_l4_n289(x)
+ if (x < 1)
+ fun_l5_n651(x)
+ else
+ fun_l5_n606(x)
+ end
+end
+
+def fun_l4_n290(x)
+ if (x < 1)
+ fun_l5_n287(x)
+ else
+ fun_l5_n444(x)
+ end
+end
+
+def fun_l4_n291(x)
+ if (x < 1)
+ fun_l5_n181(x)
+ else
+ fun_l5_n195(x)
+ end
+end
+
+def fun_l4_n292(x)
+ if (x < 1)
+ fun_l5_n20(x)
+ else
+ fun_l5_n58(x)
+ end
+end
+
+def fun_l4_n293(x)
+ if (x < 1)
+ fun_l5_n185(x)
+ else
+ fun_l5_n759(x)
+ end
+end
+
+def fun_l4_n294(x)
+ if (x < 1)
+ fun_l5_n938(x)
+ else
+ fun_l5_n849(x)
+ end
+end
+
+def fun_l4_n295(x)
+ if (x < 1)
+ fun_l5_n187(x)
+ else
+ fun_l5_n469(x)
+ end
+end
+
+def fun_l4_n296(x)
+ if (x < 1)
+ fun_l5_n516(x)
+ else
+ fun_l5_n314(x)
+ end
+end
+
+def fun_l4_n297(x)
+ if (x < 1)
+ fun_l5_n585(x)
+ else
+ fun_l5_n344(x)
+ end
+end
+
+def fun_l4_n298(x)
+ if (x < 1)
+ fun_l5_n637(x)
+ else
+ fun_l5_n103(x)
+ end
+end
+
+def fun_l4_n299(x)
+ if (x < 1)
+ fun_l5_n185(x)
+ else
+ fun_l5_n593(x)
+ end
+end
+
+def fun_l4_n300(x)
+ if (x < 1)
+ fun_l5_n773(x)
+ else
+ fun_l5_n758(x)
+ end
+end
+
+def fun_l4_n301(x)
+ if (x < 1)
+ fun_l5_n444(x)
+ else
+ fun_l5_n945(x)
+ end
+end
+
+def fun_l4_n302(x)
+ if (x < 1)
+ fun_l5_n728(x)
+ else
+ fun_l5_n484(x)
+ end
+end
+
+def fun_l4_n303(x)
+ if (x < 1)
+ fun_l5_n412(x)
+ else
+ fun_l5_n106(x)
+ end
+end
+
+def fun_l4_n304(x)
+ if (x < 1)
+ fun_l5_n399(x)
+ else
+ fun_l5_n234(x)
+ end
+end
+
+def fun_l4_n305(x)
+ if (x < 1)
+ fun_l5_n886(x)
+ else
+ fun_l5_n406(x)
+ end
+end
+
+def fun_l4_n306(x)
+ if (x < 1)
+ fun_l5_n535(x)
+ else
+ fun_l5_n338(x)
+ end
+end
+
+def fun_l4_n307(x)
+ if (x < 1)
+ fun_l5_n898(x)
+ else
+ fun_l5_n859(x)
+ end
+end
+
+def fun_l4_n308(x)
+ if (x < 1)
+ fun_l5_n25(x)
+ else
+ fun_l5_n476(x)
+ end
+end
+
+def fun_l4_n309(x)
+ if (x < 1)
+ fun_l5_n451(x)
+ else
+ fun_l5_n665(x)
+ end
+end
+
+def fun_l4_n310(x)
+ if (x < 1)
+ fun_l5_n937(x)
+ else
+ fun_l5_n555(x)
+ end
+end
+
+def fun_l4_n311(x)
+ if (x < 1)
+ fun_l5_n982(x)
+ else
+ fun_l5_n89(x)
+ end
+end
+
+def fun_l4_n312(x)
+ if (x < 1)
+ fun_l5_n32(x)
+ else
+ fun_l5_n908(x)
+ end
+end
+
+def fun_l4_n313(x)
+ if (x < 1)
+ fun_l5_n963(x)
+ else
+ fun_l5_n267(x)
+ end
+end
+
+def fun_l4_n314(x)
+ if (x < 1)
+ fun_l5_n3(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n315(x)
+ if (x < 1)
+ fun_l5_n763(x)
+ else
+ fun_l5_n488(x)
+ end
+end
+
+def fun_l4_n316(x)
+ if (x < 1)
+ fun_l5_n696(x)
+ else
+ fun_l5_n663(x)
+ end
+end
+
+def fun_l4_n317(x)
+ if (x < 1)
+ fun_l5_n851(x)
+ else
+ fun_l5_n487(x)
+ end
+end
+
+def fun_l4_n318(x)
+ if (x < 1)
+ fun_l5_n327(x)
+ else
+ fun_l5_n433(x)
+ end
+end
+
+def fun_l4_n319(x)
+ if (x < 1)
+ fun_l5_n242(x)
+ else
+ fun_l5_n471(x)
+ end
+end
+
+def fun_l4_n320(x)
+ if (x < 1)
+ fun_l5_n786(x)
+ else
+ fun_l5_n622(x)
+ end
+end
+
+def fun_l4_n321(x)
+ if (x < 1)
+ fun_l5_n94(x)
+ else
+ fun_l5_n934(x)
+ end
+end
+
+def fun_l4_n322(x)
+ if (x < 1)
+ fun_l5_n665(x)
+ else
+ fun_l5_n386(x)
+ end
+end
+
+def fun_l4_n323(x)
+ if (x < 1)
+ fun_l5_n96(x)
+ else
+ fun_l5_n466(x)
+ end
+end
+
+def fun_l4_n324(x)
+ if (x < 1)
+ fun_l5_n394(x)
+ else
+ fun_l5_n595(x)
+ end
+end
+
+def fun_l4_n325(x)
+ if (x < 1)
+ fun_l5_n544(x)
+ else
+ fun_l5_n688(x)
+ end
+end
+
+def fun_l4_n326(x)
+ if (x < 1)
+ fun_l5_n295(x)
+ else
+ fun_l5_n206(x)
+ end
+end
+
+def fun_l4_n327(x)
+ if (x < 1)
+ fun_l5_n128(x)
+ else
+ fun_l5_n607(x)
+ end
+end
+
+def fun_l4_n328(x)
+ if (x < 1)
+ fun_l5_n987(x)
+ else
+ fun_l5_n109(x)
+ end
+end
+
+def fun_l4_n329(x)
+ if (x < 1)
+ fun_l5_n842(x)
+ else
+ fun_l5_n217(x)
+ end
+end
+
+def fun_l4_n330(x)
+ if (x < 1)
+ fun_l5_n92(x)
+ else
+ fun_l5_n774(x)
+ end
+end
+
+def fun_l4_n331(x)
+ if (x < 1)
+ fun_l5_n761(x)
+ else
+ fun_l5_n34(x)
+ end
+end
+
+def fun_l4_n332(x)
+ if (x < 1)
+ fun_l5_n867(x)
+ else
+ fun_l5_n645(x)
+ end
+end
+
+def fun_l4_n333(x)
+ if (x < 1)
+ fun_l5_n273(x)
+ else
+ fun_l5_n592(x)
+ end
+end
+
+def fun_l4_n334(x)
+ if (x < 1)
+ fun_l5_n29(x)
+ else
+ fun_l5_n985(x)
+ end
+end
+
+def fun_l4_n335(x)
+ if (x < 1)
+ fun_l5_n430(x)
+ else
+ fun_l5_n346(x)
+ end
+end
+
+def fun_l4_n336(x)
+ if (x < 1)
+ fun_l5_n367(x)
+ else
+ fun_l5_n686(x)
+ end
+end
+
+def fun_l4_n337(x)
+ if (x < 1)
+ fun_l5_n868(x)
+ else
+ fun_l5_n5(x)
+ end
+end
+
+def fun_l4_n338(x)
+ if (x < 1)
+ fun_l5_n998(x)
+ else
+ fun_l5_n64(x)
+ end
+end
+
+def fun_l4_n339(x)
+ if (x < 1)
+ fun_l5_n594(x)
+ else
+ fun_l5_n311(x)
+ end
+end
+
+def fun_l4_n340(x)
+ if (x < 1)
+ fun_l5_n547(x)
+ else
+ fun_l5_n573(x)
+ end
+end
+
+def fun_l4_n341(x)
+ if (x < 1)
+ fun_l5_n590(x)
+ else
+ fun_l5_n923(x)
+ end
+end
+
+def fun_l4_n342(x)
+ if (x < 1)
+ fun_l5_n538(x)
+ else
+ fun_l5_n118(x)
+ end
+end
+
+def fun_l4_n343(x)
+ if (x < 1)
+ fun_l5_n322(x)
+ else
+ fun_l5_n970(x)
+ end
+end
+
+def fun_l4_n344(x)
+ if (x < 1)
+ fun_l5_n809(x)
+ else
+ fun_l5_n958(x)
+ end
+end
+
+def fun_l4_n345(x)
+ if (x < 1)
+ fun_l5_n613(x)
+ else
+ fun_l5_n199(x)
+ end
+end
+
+def fun_l4_n346(x)
+ if (x < 1)
+ fun_l5_n298(x)
+ else
+ fun_l5_n273(x)
+ end
+end
+
+def fun_l4_n347(x)
+ if (x < 1)
+ fun_l5_n560(x)
+ else
+ fun_l5_n803(x)
+ end
+end
+
+def fun_l4_n348(x)
+ if (x < 1)
+ fun_l5_n672(x)
+ else
+ fun_l5_n952(x)
+ end
+end
+
+def fun_l4_n349(x)
+ if (x < 1)
+ fun_l5_n58(x)
+ else
+ fun_l5_n267(x)
+ end
+end
+
+def fun_l4_n350(x)
+ if (x < 1)
+ fun_l5_n933(x)
+ else
+ fun_l5_n773(x)
+ end
+end
+
+def fun_l4_n351(x)
+ if (x < 1)
+ fun_l5_n574(x)
+ else
+ fun_l5_n692(x)
+ end
+end
+
+def fun_l4_n352(x)
+ if (x < 1)
+ fun_l5_n537(x)
+ else
+ fun_l5_n312(x)
+ end
+end
+
+def fun_l4_n353(x)
+ if (x < 1)
+ fun_l5_n696(x)
+ else
+ fun_l5_n739(x)
+ end
+end
+
+def fun_l4_n354(x)
+ if (x < 1)
+ fun_l5_n871(x)
+ else
+ fun_l5_n86(x)
+ end
+end
+
+def fun_l4_n355(x)
+ if (x < 1)
+ fun_l5_n3(x)
+ else
+ fun_l5_n950(x)
+ end
+end
+
+def fun_l4_n356(x)
+ if (x < 1)
+ fun_l5_n560(x)
+ else
+ fun_l5_n45(x)
+ end
+end
+
+def fun_l4_n357(x)
+ if (x < 1)
+ fun_l5_n666(x)
+ else
+ fun_l5_n874(x)
+ end
+end
+
+def fun_l4_n358(x)
+ if (x < 1)
+ fun_l5_n457(x)
+ else
+ fun_l5_n7(x)
+ end
+end
+
+def fun_l4_n359(x)
+ if (x < 1)
+ fun_l5_n674(x)
+ else
+ fun_l5_n985(x)
+ end
+end
+
+def fun_l4_n360(x)
+ if (x < 1)
+ fun_l5_n960(x)
+ else
+ fun_l5_n228(x)
+ end
+end
+
+def fun_l4_n361(x)
+ if (x < 1)
+ fun_l5_n597(x)
+ else
+ fun_l5_n487(x)
+ end
+end
+
+def fun_l4_n362(x)
+ if (x < 1)
+ fun_l5_n145(x)
+ else
+ fun_l5_n278(x)
+ end
+end
+
+def fun_l4_n363(x)
+ if (x < 1)
+ fun_l5_n949(x)
+ else
+ fun_l5_n353(x)
+ end
+end
+
+def fun_l4_n364(x)
+ if (x < 1)
+ fun_l5_n604(x)
+ else
+ fun_l5_n250(x)
+ end
+end
+
+def fun_l4_n365(x)
+ if (x < 1)
+ fun_l5_n347(x)
+ else
+ fun_l5_n964(x)
+ end
+end
+
+def fun_l4_n366(x)
+ if (x < 1)
+ fun_l5_n331(x)
+ else
+ fun_l5_n657(x)
+ end
+end
+
+def fun_l4_n367(x)
+ if (x < 1)
+ fun_l5_n74(x)
+ else
+ fun_l5_n504(x)
+ end
+end
+
+def fun_l4_n368(x)
+ if (x < 1)
+ fun_l5_n9(x)
+ else
+ fun_l5_n993(x)
+ end
+end
+
+def fun_l4_n369(x)
+ if (x < 1)
+ fun_l5_n492(x)
+ else
+ fun_l5_n155(x)
+ end
+end
+
+def fun_l4_n370(x)
+ if (x < 1)
+ fun_l5_n848(x)
+ else
+ fun_l5_n178(x)
+ end
+end
+
+def fun_l4_n371(x)
+ if (x < 1)
+ fun_l5_n395(x)
+ else
+ fun_l5_n837(x)
+ end
+end
+
+def fun_l4_n372(x)
+ if (x < 1)
+ fun_l5_n834(x)
+ else
+ fun_l5_n719(x)
+ end
+end
+
+def fun_l4_n373(x)
+ if (x < 1)
+ fun_l5_n422(x)
+ else
+ fun_l5_n776(x)
+ end
+end
+
+def fun_l4_n374(x)
+ if (x < 1)
+ fun_l5_n293(x)
+ else
+ fun_l5_n385(x)
+ end
+end
+
+def fun_l4_n375(x)
+ if (x < 1)
+ fun_l5_n487(x)
+ else
+ fun_l5_n61(x)
+ end
+end
+
+def fun_l4_n376(x)
+ if (x < 1)
+ fun_l5_n493(x)
+ else
+ fun_l5_n629(x)
+ end
+end
+
+def fun_l4_n377(x)
+ if (x < 1)
+ fun_l5_n429(x)
+ else
+ fun_l5_n157(x)
+ end
+end
+
+def fun_l4_n378(x)
+ if (x < 1)
+ fun_l5_n145(x)
+ else
+ fun_l5_n988(x)
+ end
+end
+
+def fun_l4_n379(x)
+ if (x < 1)
+ fun_l5_n430(x)
+ else
+ fun_l5_n246(x)
+ end
+end
+
+def fun_l4_n380(x)
+ if (x < 1)
+ fun_l5_n320(x)
+ else
+ fun_l5_n284(x)
+ end
+end
+
+def fun_l4_n381(x)
+ if (x < 1)
+ fun_l5_n278(x)
+ else
+ fun_l5_n163(x)
+ end
+end
+
+def fun_l4_n382(x)
+ if (x < 1)
+ fun_l5_n999(x)
+ else
+ fun_l5_n907(x)
+ end
+end
+
+def fun_l4_n383(x)
+ if (x < 1)
+ fun_l5_n979(x)
+ else
+ fun_l5_n370(x)
+ end
+end
+
+def fun_l4_n384(x)
+ if (x < 1)
+ fun_l5_n58(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n385(x)
+ if (x < 1)
+ fun_l5_n558(x)
+ else
+ fun_l5_n524(x)
+ end
+end
+
+def fun_l4_n386(x)
+ if (x < 1)
+ fun_l5_n438(x)
+ else
+ fun_l5_n799(x)
+ end
+end
+
+def fun_l4_n387(x)
+ if (x < 1)
+ fun_l5_n696(x)
+ else
+ fun_l5_n463(x)
+ end
+end
+
+def fun_l4_n388(x)
+ if (x < 1)
+ fun_l5_n376(x)
+ else
+ fun_l5_n943(x)
+ end
+end
+
+def fun_l4_n389(x)
+ if (x < 1)
+ fun_l5_n21(x)
+ else
+ fun_l5_n663(x)
+ end
+end
+
+def fun_l4_n390(x)
+ if (x < 1)
+ fun_l5_n8(x)
+ else
+ fun_l5_n348(x)
+ end
+end
+
+def fun_l4_n391(x)
+ if (x < 1)
+ fun_l5_n908(x)
+ else
+ fun_l5_n695(x)
+ end
+end
+
+def fun_l4_n392(x)
+ if (x < 1)
+ fun_l5_n97(x)
+ else
+ fun_l5_n466(x)
+ end
+end
+
+def fun_l4_n393(x)
+ if (x < 1)
+ fun_l5_n480(x)
+ else
+ fun_l5_n972(x)
+ end
+end
+
+def fun_l4_n394(x)
+ if (x < 1)
+ fun_l5_n85(x)
+ else
+ fun_l5_n849(x)
+ end
+end
+
+def fun_l4_n395(x)
+ if (x < 1)
+ fun_l5_n897(x)
+ else
+ fun_l5_n13(x)
+ end
+end
+
+def fun_l4_n396(x)
+ if (x < 1)
+ fun_l5_n628(x)
+ else
+ fun_l5_n743(x)
+ end
+end
+
+def fun_l4_n397(x)
+ if (x < 1)
+ fun_l5_n29(x)
+ else
+ fun_l5_n185(x)
+ end
+end
+
+def fun_l4_n398(x)
+ if (x < 1)
+ fun_l5_n464(x)
+ else
+ fun_l5_n742(x)
+ end
+end
+
+def fun_l4_n399(x)
+ if (x < 1)
+ fun_l5_n348(x)
+ else
+ fun_l5_n70(x)
+ end
+end
+
+def fun_l4_n400(x)
+ if (x < 1)
+ fun_l5_n397(x)
+ else
+ fun_l5_n132(x)
+ end
+end
+
+def fun_l4_n401(x)
+ if (x < 1)
+ fun_l5_n433(x)
+ else
+ fun_l5_n77(x)
+ end
+end
+
+def fun_l4_n402(x)
+ if (x < 1)
+ fun_l5_n24(x)
+ else
+ fun_l5_n160(x)
+ end
+end
+
+def fun_l4_n403(x)
+ if (x < 1)
+ fun_l5_n738(x)
+ else
+ fun_l5_n174(x)
+ end
+end
+
+def fun_l4_n404(x)
+ if (x < 1)
+ fun_l5_n585(x)
+ else
+ fun_l5_n670(x)
+ end
+end
+
+def fun_l4_n405(x)
+ if (x < 1)
+ fun_l5_n320(x)
+ else
+ fun_l5_n245(x)
+ end
+end
+
+def fun_l4_n406(x)
+ if (x < 1)
+ fun_l5_n357(x)
+ else
+ fun_l5_n742(x)
+ end
+end
+
+def fun_l4_n407(x)
+ if (x < 1)
+ fun_l5_n16(x)
+ else
+ fun_l5_n227(x)
+ end
+end
+
+def fun_l4_n408(x)
+ if (x < 1)
+ fun_l5_n360(x)
+ else
+ fun_l5_n18(x)
+ end
+end
+
+def fun_l4_n409(x)
+ if (x < 1)
+ fun_l5_n210(x)
+ else
+ fun_l5_n253(x)
+ end
+end
+
+def fun_l4_n410(x)
+ if (x < 1)
+ fun_l5_n915(x)
+ else
+ fun_l5_n605(x)
+ end
+end
+
+def fun_l4_n411(x)
+ if (x < 1)
+ fun_l5_n511(x)
+ else
+ fun_l5_n118(x)
+ end
+end
+
+def fun_l4_n412(x)
+ if (x < 1)
+ fun_l5_n680(x)
+ else
+ fun_l5_n445(x)
+ end
+end
+
+def fun_l4_n413(x)
+ if (x < 1)
+ fun_l5_n722(x)
+ else
+ fun_l5_n440(x)
+ end
+end
+
+def fun_l4_n414(x)
+ if (x < 1)
+ fun_l5_n382(x)
+ else
+ fun_l5_n380(x)
+ end
+end
+
+def fun_l4_n415(x)
+ if (x < 1)
+ fun_l5_n548(x)
+ else
+ fun_l5_n462(x)
+ end
+end
+
+def fun_l4_n416(x)
+ if (x < 1)
+ fun_l5_n12(x)
+ else
+ fun_l5_n952(x)
+ end
+end
+
+def fun_l4_n417(x)
+ if (x < 1)
+ fun_l5_n814(x)
+ else
+ fun_l5_n720(x)
+ end
+end
+
+def fun_l4_n418(x)
+ if (x < 1)
+ fun_l5_n804(x)
+ else
+ fun_l5_n243(x)
+ end
+end
+
+def fun_l4_n419(x)
+ if (x < 1)
+ fun_l5_n654(x)
+ else
+ fun_l5_n950(x)
+ end
+end
+
+def fun_l4_n420(x)
+ if (x < 1)
+ fun_l5_n998(x)
+ else
+ fun_l5_n937(x)
+ end
+end
+
+def fun_l4_n421(x)
+ if (x < 1)
+ fun_l5_n476(x)
+ else
+ fun_l5_n245(x)
+ end
+end
+
+def fun_l4_n422(x)
+ if (x < 1)
+ fun_l5_n778(x)
+ else
+ fun_l5_n950(x)
+ end
+end
+
+def fun_l4_n423(x)
+ if (x < 1)
+ fun_l5_n255(x)
+ else
+ fun_l5_n438(x)
+ end
+end
+
+def fun_l4_n424(x)
+ if (x < 1)
+ fun_l5_n906(x)
+ else
+ fun_l5_n329(x)
+ end
+end
+
+def fun_l4_n425(x)
+ if (x < 1)
+ fun_l5_n644(x)
+ else
+ fun_l5_n512(x)
+ end
+end
+
+def fun_l4_n426(x)
+ if (x < 1)
+ fun_l5_n558(x)
+ else
+ fun_l5_n925(x)
+ end
+end
+
+def fun_l4_n427(x)
+ if (x < 1)
+ fun_l5_n745(x)
+ else
+ fun_l5_n168(x)
+ end
+end
+
+def fun_l4_n428(x)
+ if (x < 1)
+ fun_l5_n682(x)
+ else
+ fun_l5_n298(x)
+ end
+end
+
+def fun_l4_n429(x)
+ if (x < 1)
+ fun_l5_n211(x)
+ else
+ fun_l5_n608(x)
+ end
+end
+
+def fun_l4_n430(x)
+ if (x < 1)
+ fun_l5_n100(x)
+ else
+ fun_l5_n287(x)
+ end
+end
+
+def fun_l4_n431(x)
+ if (x < 1)
+ fun_l5_n513(x)
+ else
+ fun_l5_n764(x)
+ end
+end
+
+def fun_l4_n432(x)
+ if (x < 1)
+ fun_l5_n925(x)
+ else
+ fun_l5_n857(x)
+ end
+end
+
+def fun_l4_n433(x)
+ if (x < 1)
+ fun_l5_n279(x)
+ else
+ fun_l5_n429(x)
+ end
+end
+
+def fun_l4_n434(x)
+ if (x < 1)
+ fun_l5_n376(x)
+ else
+ fun_l5_n811(x)
+ end
+end
+
+def fun_l4_n435(x)
+ if (x < 1)
+ fun_l5_n893(x)
+ else
+ fun_l5_n136(x)
+ end
+end
+
+def fun_l4_n436(x)
+ if (x < 1)
+ fun_l5_n283(x)
+ else
+ fun_l5_n508(x)
+ end
+end
+
+def fun_l4_n437(x)
+ if (x < 1)
+ fun_l5_n478(x)
+ else
+ fun_l5_n589(x)
+ end
+end
+
+def fun_l4_n438(x)
+ if (x < 1)
+ fun_l5_n460(x)
+ else
+ fun_l5_n589(x)
+ end
+end
+
+def fun_l4_n439(x)
+ if (x < 1)
+ fun_l5_n745(x)
+ else
+ fun_l5_n5(x)
+ end
+end
+
+def fun_l4_n440(x)
+ if (x < 1)
+ fun_l5_n601(x)
+ else
+ fun_l5_n322(x)
+ end
+end
+
+def fun_l4_n441(x)
+ if (x < 1)
+ fun_l5_n703(x)
+ else
+ fun_l5_n322(x)
+ end
+end
+
+def fun_l4_n442(x)
+ if (x < 1)
+ fun_l5_n810(x)
+ else
+ fun_l5_n363(x)
+ end
+end
+
+def fun_l4_n443(x)
+ if (x < 1)
+ fun_l5_n62(x)
+ else
+ fun_l5_n995(x)
+ end
+end
+
+def fun_l4_n444(x)
+ if (x < 1)
+ fun_l5_n196(x)
+ else
+ fun_l5_n156(x)
+ end
+end
+
+def fun_l4_n445(x)
+ if (x < 1)
+ fun_l5_n456(x)
+ else
+ fun_l5_n820(x)
+ end
+end
+
+def fun_l4_n446(x)
+ if (x < 1)
+ fun_l5_n592(x)
+ else
+ fun_l5_n214(x)
+ end
+end
+
+def fun_l4_n447(x)
+ if (x < 1)
+ fun_l5_n44(x)
+ else
+ fun_l5_n769(x)
+ end
+end
+
+def fun_l4_n448(x)
+ if (x < 1)
+ fun_l5_n694(x)
+ else
+ fun_l5_n909(x)
+ end
+end
+
+def fun_l4_n449(x)
+ if (x < 1)
+ fun_l5_n297(x)
+ else
+ fun_l5_n134(x)
+ end
+end
+
+def fun_l4_n450(x)
+ if (x < 1)
+ fun_l5_n878(x)
+ else
+ fun_l5_n475(x)
+ end
+end
+
+def fun_l4_n451(x)
+ if (x < 1)
+ fun_l5_n338(x)
+ else
+ fun_l5_n700(x)
+ end
+end
+
+def fun_l4_n452(x)
+ if (x < 1)
+ fun_l5_n813(x)
+ else
+ fun_l5_n41(x)
+ end
+end
+
+def fun_l4_n453(x)
+ if (x < 1)
+ fun_l5_n176(x)
+ else
+ fun_l5_n758(x)
+ end
+end
+
+def fun_l4_n454(x)
+ if (x < 1)
+ fun_l5_n60(x)
+ else
+ fun_l5_n608(x)
+ end
+end
+
+def fun_l4_n455(x)
+ if (x < 1)
+ fun_l5_n550(x)
+ else
+ fun_l5_n607(x)
+ end
+end
+
+def fun_l4_n456(x)
+ if (x < 1)
+ fun_l5_n535(x)
+ else
+ fun_l5_n478(x)
+ end
+end
+
+def fun_l4_n457(x)
+ if (x < 1)
+ fun_l5_n768(x)
+ else
+ fun_l5_n613(x)
+ end
+end
+
+def fun_l4_n458(x)
+ if (x < 1)
+ fun_l5_n686(x)
+ else
+ fun_l5_n208(x)
+ end
+end
+
+def fun_l4_n459(x)
+ if (x < 1)
+ fun_l5_n167(x)
+ else
+ fun_l5_n875(x)
+ end
+end
+
+def fun_l4_n460(x)
+ if (x < 1)
+ fun_l5_n202(x)
+ else
+ fun_l5_n440(x)
+ end
+end
+
+def fun_l4_n461(x)
+ if (x < 1)
+ fun_l5_n64(x)
+ else
+ fun_l5_n845(x)
+ end
+end
+
+def fun_l4_n462(x)
+ if (x < 1)
+ fun_l5_n914(x)
+ else
+ fun_l5_n699(x)
+ end
+end
+
+def fun_l4_n463(x)
+ if (x < 1)
+ fun_l5_n204(x)
+ else
+ fun_l5_n723(x)
+ end
+end
+
+def fun_l4_n464(x)
+ if (x < 1)
+ fun_l5_n549(x)
+ else
+ fun_l5_n375(x)
+ end
+end
+
+def fun_l4_n465(x)
+ if (x < 1)
+ fun_l5_n610(x)
+ else
+ fun_l5_n596(x)
+ end
+end
+
+def fun_l4_n466(x)
+ if (x < 1)
+ fun_l5_n571(x)
+ else
+ fun_l5_n618(x)
+ end
+end
+
+def fun_l4_n467(x)
+ if (x < 1)
+ fun_l5_n428(x)
+ else
+ fun_l5_n315(x)
+ end
+end
+
+def fun_l4_n468(x)
+ if (x < 1)
+ fun_l5_n19(x)
+ else
+ fun_l5_n301(x)
+ end
+end
+
+def fun_l4_n469(x)
+ if (x < 1)
+ fun_l5_n38(x)
+ else
+ fun_l5_n895(x)
+ end
+end
+
+def fun_l4_n470(x)
+ if (x < 1)
+ fun_l5_n815(x)
+ else
+ fun_l5_n303(x)
+ end
+end
+
+def fun_l4_n471(x)
+ if (x < 1)
+ fun_l5_n876(x)
+ else
+ fun_l5_n221(x)
+ end
+end
+
+def fun_l4_n472(x)
+ if (x < 1)
+ fun_l5_n199(x)
+ else
+ fun_l5_n354(x)
+ end
+end
+
+def fun_l4_n473(x)
+ if (x < 1)
+ fun_l5_n56(x)
+ else
+ fun_l5_n197(x)
+ end
+end
+
+def fun_l4_n474(x)
+ if (x < 1)
+ fun_l5_n573(x)
+ else
+ fun_l5_n616(x)
+ end
+end
+
+def fun_l4_n475(x)
+ if (x < 1)
+ fun_l5_n313(x)
+ else
+ fun_l5_n209(x)
+ end
+end
+
+def fun_l4_n476(x)
+ if (x < 1)
+ fun_l5_n229(x)
+ else
+ fun_l5_n51(x)
+ end
+end
+
+def fun_l4_n477(x)
+ if (x < 1)
+ fun_l5_n768(x)
+ else
+ fun_l5_n368(x)
+ end
+end
+
+def fun_l4_n478(x)
+ if (x < 1)
+ fun_l5_n80(x)
+ else
+ fun_l5_n411(x)
+ end
+end
+
+def fun_l4_n479(x)
+ if (x < 1)
+ fun_l5_n221(x)
+ else
+ fun_l5_n266(x)
+ end
+end
+
+def fun_l4_n480(x)
+ if (x < 1)
+ fun_l5_n463(x)
+ else
+ fun_l5_n71(x)
+ end
+end
+
+def fun_l4_n481(x)
+ if (x < 1)
+ fun_l5_n446(x)
+ else
+ fun_l5_n610(x)
+ end
+end
+
+def fun_l4_n482(x)
+ if (x < 1)
+ fun_l5_n402(x)
+ else
+ fun_l5_n449(x)
+ end
+end
+
+def fun_l4_n483(x)
+ if (x < 1)
+ fun_l5_n497(x)
+ else
+ fun_l5_n521(x)
+ end
+end
+
+def fun_l4_n484(x)
+ if (x < 1)
+ fun_l5_n895(x)
+ else
+ fun_l5_n361(x)
+ end
+end
+
+def fun_l4_n485(x)
+ if (x < 1)
+ fun_l5_n254(x)
+ else
+ fun_l5_n366(x)
+ end
+end
+
+def fun_l4_n486(x)
+ if (x < 1)
+ fun_l5_n179(x)
+ else
+ fun_l5_n154(x)
+ end
+end
+
+def fun_l4_n487(x)
+ if (x < 1)
+ fun_l5_n905(x)
+ else
+ fun_l5_n30(x)
+ end
+end
+
+def fun_l4_n488(x)
+ if (x < 1)
+ fun_l5_n989(x)
+ else
+ fun_l5_n640(x)
+ end
+end
+
+def fun_l4_n489(x)
+ if (x < 1)
+ fun_l5_n664(x)
+ else
+ fun_l5_n87(x)
+ end
+end
+
+def fun_l4_n490(x)
+ if (x < 1)
+ fun_l5_n518(x)
+ else
+ fun_l5_n986(x)
+ end
+end
+
+def fun_l4_n491(x)
+ if (x < 1)
+ fun_l5_n443(x)
+ else
+ fun_l5_n532(x)
+ end
+end
+
+def fun_l4_n492(x)
+ if (x < 1)
+ fun_l5_n349(x)
+ else
+ fun_l5_n373(x)
+ end
+end
+
+def fun_l4_n493(x)
+ if (x < 1)
+ fun_l5_n208(x)
+ else
+ fun_l5_n404(x)
+ end
+end
+
+def fun_l4_n494(x)
+ if (x < 1)
+ fun_l5_n12(x)
+ else
+ fun_l5_n608(x)
+ end
+end
+
+def fun_l4_n495(x)
+ if (x < 1)
+ fun_l5_n12(x)
+ else
+ fun_l5_n42(x)
+ end
+end
+
+def fun_l4_n496(x)
+ if (x < 1)
+ fun_l5_n442(x)
+ else
+ fun_l5_n809(x)
+ end
+end
+
+def fun_l4_n497(x)
+ if (x < 1)
+ fun_l5_n266(x)
+ else
+ fun_l5_n259(x)
+ end
+end
+
+def fun_l4_n498(x)
+ if (x < 1)
+ fun_l5_n342(x)
+ else
+ fun_l5_n275(x)
+ end
+end
+
+def fun_l4_n499(x)
+ if (x < 1)
+ fun_l5_n806(x)
+ else
+ fun_l5_n797(x)
+ end
+end
+
+def fun_l4_n500(x)
+ if (x < 1)
+ fun_l5_n646(x)
+ else
+ fun_l5_n426(x)
+ end
+end
+
+def fun_l4_n501(x)
+ if (x < 1)
+ fun_l5_n593(x)
+ else
+ fun_l5_n860(x)
+ end
+end
+
+def fun_l4_n502(x)
+ if (x < 1)
+ fun_l5_n355(x)
+ else
+ fun_l5_n411(x)
+ end
+end
+
+def fun_l4_n503(x)
+ if (x < 1)
+ fun_l5_n602(x)
+ else
+ fun_l5_n26(x)
+ end
+end
+
+def fun_l4_n504(x)
+ if (x < 1)
+ fun_l5_n875(x)
+ else
+ fun_l5_n716(x)
+ end
+end
+
+def fun_l4_n505(x)
+ if (x < 1)
+ fun_l5_n248(x)
+ else
+ fun_l5_n388(x)
+ end
+end
+
+def fun_l4_n506(x)
+ if (x < 1)
+ fun_l5_n273(x)
+ else
+ fun_l5_n11(x)
+ end
+end
+
+def fun_l4_n507(x)
+ if (x < 1)
+ fun_l5_n291(x)
+ else
+ fun_l5_n464(x)
+ end
+end
+
+def fun_l4_n508(x)
+ if (x < 1)
+ fun_l5_n309(x)
+ else
+ fun_l5_n198(x)
+ end
+end
+
+def fun_l4_n509(x)
+ if (x < 1)
+ fun_l5_n85(x)
+ else
+ fun_l5_n375(x)
+ end
+end
+
+def fun_l4_n510(x)
+ if (x < 1)
+ fun_l5_n993(x)
+ else
+ fun_l5_n311(x)
+ end
+end
+
+def fun_l4_n511(x)
+ if (x < 1)
+ fun_l5_n824(x)
+ else
+ fun_l5_n936(x)
+ end
+end
+
+def fun_l4_n512(x)
+ if (x < 1)
+ fun_l5_n897(x)
+ else
+ fun_l5_n995(x)
+ end
+end
+
+def fun_l4_n513(x)
+ if (x < 1)
+ fun_l5_n443(x)
+ else
+ fun_l5_n511(x)
+ end
+end
+
+def fun_l4_n514(x)
+ if (x < 1)
+ fun_l5_n965(x)
+ else
+ fun_l5_n506(x)
+ end
+end
+
+def fun_l4_n515(x)
+ if (x < 1)
+ fun_l5_n480(x)
+ else
+ fun_l5_n464(x)
+ end
+end
+
+def fun_l4_n516(x)
+ if (x < 1)
+ fun_l5_n396(x)
+ else
+ fun_l5_n355(x)
+ end
+end
+
+def fun_l4_n517(x)
+ if (x < 1)
+ fun_l5_n782(x)
+ else
+ fun_l5_n624(x)
+ end
+end
+
+def fun_l4_n518(x)
+ if (x < 1)
+ fun_l5_n460(x)
+ else
+ fun_l5_n920(x)
+ end
+end
+
+def fun_l4_n519(x)
+ if (x < 1)
+ fun_l5_n258(x)
+ else
+ fun_l5_n296(x)
+ end
+end
+
+def fun_l4_n520(x)
+ if (x < 1)
+ fun_l5_n344(x)
+ else
+ fun_l5_n180(x)
+ end
+end
+
+def fun_l4_n521(x)
+ if (x < 1)
+ fun_l5_n489(x)
+ else
+ fun_l5_n818(x)
+ end
+end
+
+def fun_l4_n522(x)
+ if (x < 1)
+ fun_l5_n246(x)
+ else
+ fun_l5_n25(x)
+ end
+end
+
+def fun_l4_n523(x)
+ if (x < 1)
+ fun_l5_n165(x)
+ else
+ fun_l5_n835(x)
+ end
+end
+
+def fun_l4_n524(x)
+ if (x < 1)
+ fun_l5_n836(x)
+ else
+ fun_l5_n838(x)
+ end
+end
+
+def fun_l4_n525(x)
+ if (x < 1)
+ fun_l5_n781(x)
+ else
+ fun_l5_n183(x)
+ end
+end
+
+def fun_l4_n526(x)
+ if (x < 1)
+ fun_l5_n335(x)
+ else
+ fun_l5_n809(x)
+ end
+end
+
+def fun_l4_n527(x)
+ if (x < 1)
+ fun_l5_n748(x)
+ else
+ fun_l5_n674(x)
+ end
+end
+
+def fun_l4_n528(x)
+ if (x < 1)
+ fun_l5_n612(x)
+ else
+ fun_l5_n933(x)
+ end
+end
+
+def fun_l4_n529(x)
+ if (x < 1)
+ fun_l5_n781(x)
+ else
+ fun_l5_n174(x)
+ end
+end
+
+def fun_l4_n530(x)
+ if (x < 1)
+ fun_l5_n299(x)
+ else
+ fun_l5_n677(x)
+ end
+end
+
+def fun_l4_n531(x)
+ if (x < 1)
+ fun_l5_n455(x)
+ else
+ fun_l5_n211(x)
+ end
+end
+
+def fun_l4_n532(x)
+ if (x < 1)
+ fun_l5_n981(x)
+ else
+ fun_l5_n605(x)
+ end
+end
+
+def fun_l4_n533(x)
+ if (x < 1)
+ fun_l5_n299(x)
+ else
+ fun_l5_n30(x)
+ end
+end
+
+def fun_l4_n534(x)
+ if (x < 1)
+ fun_l5_n642(x)
+ else
+ fun_l5_n652(x)
+ end
+end
+
+def fun_l4_n535(x)
+ if (x < 1)
+ fun_l5_n904(x)
+ else
+ fun_l5_n133(x)
+ end
+end
+
+def fun_l4_n536(x)
+ if (x < 1)
+ fun_l5_n253(x)
+ else
+ fun_l5_n330(x)
+ end
+end
+
+def fun_l4_n537(x)
+ if (x < 1)
+ fun_l5_n357(x)
+ else
+ fun_l5_n533(x)
+ end
+end
+
+def fun_l4_n538(x)
+ if (x < 1)
+ fun_l5_n484(x)
+ else
+ fun_l5_n438(x)
+ end
+end
+
+def fun_l4_n539(x)
+ if (x < 1)
+ fun_l5_n200(x)
+ else
+ fun_l5_n235(x)
+ end
+end
+
+def fun_l4_n540(x)
+ if (x < 1)
+ fun_l5_n929(x)
+ else
+ fun_l5_n875(x)
+ end
+end
+
+def fun_l4_n541(x)
+ if (x < 1)
+ fun_l5_n237(x)
+ else
+ fun_l5_n688(x)
+ end
+end
+
+def fun_l4_n542(x)
+ if (x < 1)
+ fun_l5_n723(x)
+ else
+ fun_l5_n308(x)
+ end
+end
+
+def fun_l4_n543(x)
+ if (x < 1)
+ fun_l5_n591(x)
+ else
+ fun_l5_n93(x)
+ end
+end
+
+def fun_l4_n544(x)
+ if (x < 1)
+ fun_l5_n258(x)
+ else
+ fun_l5_n205(x)
+ end
+end
+
+def fun_l4_n545(x)
+ if (x < 1)
+ fun_l5_n910(x)
+ else
+ fun_l5_n529(x)
+ end
+end
+
+def fun_l4_n546(x)
+ if (x < 1)
+ fun_l5_n255(x)
+ else
+ fun_l5_n262(x)
+ end
+end
+
+def fun_l4_n547(x)
+ if (x < 1)
+ fun_l5_n674(x)
+ else
+ fun_l5_n813(x)
+ end
+end
+
+def fun_l4_n548(x)
+ if (x < 1)
+ fun_l5_n9(x)
+ else
+ fun_l5_n709(x)
+ end
+end
+
+def fun_l4_n549(x)
+ if (x < 1)
+ fun_l5_n146(x)
+ else
+ fun_l5_n801(x)
+ end
+end
+
+def fun_l4_n550(x)
+ if (x < 1)
+ fun_l5_n593(x)
+ else
+ fun_l5_n428(x)
+ end
+end
+
+def fun_l4_n551(x)
+ if (x < 1)
+ fun_l5_n953(x)
+ else
+ fun_l5_n238(x)
+ end
+end
+
+def fun_l4_n552(x)
+ if (x < 1)
+ fun_l5_n900(x)
+ else
+ fun_l5_n246(x)
+ end
+end
+
+def fun_l4_n553(x)
+ if (x < 1)
+ fun_l5_n400(x)
+ else
+ fun_l5_n150(x)
+ end
+end
+
+def fun_l4_n554(x)
+ if (x < 1)
+ fun_l5_n697(x)
+ else
+ fun_l5_n681(x)
+ end
+end
+
+def fun_l4_n555(x)
+ if (x < 1)
+ fun_l5_n487(x)
+ else
+ fun_l5_n784(x)
+ end
+end
+
+def fun_l4_n556(x)
+ if (x < 1)
+ fun_l5_n485(x)
+ else
+ fun_l5_n984(x)
+ end
+end
+
+def fun_l4_n557(x)
+ if (x < 1)
+ fun_l5_n774(x)
+ else
+ fun_l5_n864(x)
+ end
+end
+
+def fun_l4_n558(x)
+ if (x < 1)
+ fun_l5_n823(x)
+ else
+ fun_l5_n527(x)
+ end
+end
+
+def fun_l4_n559(x)
+ if (x < 1)
+ fun_l5_n204(x)
+ else
+ fun_l5_n114(x)
+ end
+end
+
+def fun_l4_n560(x)
+ if (x < 1)
+ fun_l5_n835(x)
+ else
+ fun_l5_n930(x)
+ end
+end
+
+def fun_l4_n561(x)
+ if (x < 1)
+ fun_l5_n481(x)
+ else
+ fun_l5_n471(x)
+ end
+end
+
+def fun_l4_n562(x)
+ if (x < 1)
+ fun_l5_n459(x)
+ else
+ fun_l5_n526(x)
+ end
+end
+
+def fun_l4_n563(x)
+ if (x < 1)
+ fun_l5_n148(x)
+ else
+ fun_l5_n473(x)
+ end
+end
+
+def fun_l4_n564(x)
+ if (x < 1)
+ fun_l5_n448(x)
+ else
+ fun_l5_n389(x)
+ end
+end
+
+def fun_l4_n565(x)
+ if (x < 1)
+ fun_l5_n600(x)
+ else
+ fun_l5_n405(x)
+ end
+end
+
+def fun_l4_n566(x)
+ if (x < 1)
+ fun_l5_n67(x)
+ else
+ fun_l5_n145(x)
+ end
+end
+
+def fun_l4_n567(x)
+ if (x < 1)
+ fun_l5_n63(x)
+ else
+ fun_l5_n206(x)
+ end
+end
+
+def fun_l4_n568(x)
+ if (x < 1)
+ fun_l5_n463(x)
+ else
+ fun_l5_n288(x)
+ end
+end
+
+def fun_l4_n569(x)
+ if (x < 1)
+ fun_l5_n143(x)
+ else
+ fun_l5_n879(x)
+ end
+end
+
+def fun_l4_n570(x)
+ if (x < 1)
+ fun_l5_n552(x)
+ else
+ fun_l5_n517(x)
+ end
+end
+
+def fun_l4_n571(x)
+ if (x < 1)
+ fun_l5_n527(x)
+ else
+ fun_l5_n680(x)
+ end
+end
+
+def fun_l4_n572(x)
+ if (x < 1)
+ fun_l5_n853(x)
+ else
+ fun_l5_n97(x)
+ end
+end
+
+def fun_l4_n573(x)
+ if (x < 1)
+ fun_l5_n277(x)
+ else
+ fun_l5_n329(x)
+ end
+end
+
+def fun_l4_n574(x)
+ if (x < 1)
+ fun_l5_n952(x)
+ else
+ fun_l5_n515(x)
+ end
+end
+
+def fun_l4_n575(x)
+ if (x < 1)
+ fun_l5_n64(x)
+ else
+ fun_l5_n576(x)
+ end
+end
+
+def fun_l4_n576(x)
+ if (x < 1)
+ fun_l5_n57(x)
+ else
+ fun_l5_n499(x)
+ end
+end
+
+def fun_l4_n577(x)
+ if (x < 1)
+ fun_l5_n10(x)
+ else
+ fun_l5_n208(x)
+ end
+end
+
+def fun_l4_n578(x)
+ if (x < 1)
+ fun_l5_n361(x)
+ else
+ fun_l5_n447(x)
+ end
+end
+
+def fun_l4_n579(x)
+ if (x < 1)
+ fun_l5_n788(x)
+ else
+ fun_l5_n299(x)
+ end
+end
+
+def fun_l4_n580(x)
+ if (x < 1)
+ fun_l5_n973(x)
+ else
+ fun_l5_n753(x)
+ end
+end
+
+def fun_l4_n581(x)
+ if (x < 1)
+ fun_l5_n862(x)
+ else
+ fun_l5_n110(x)
+ end
+end
+
+def fun_l4_n582(x)
+ if (x < 1)
+ fun_l5_n760(x)
+ else
+ fun_l5_n256(x)
+ end
+end
+
+def fun_l4_n583(x)
+ if (x < 1)
+ fun_l5_n8(x)
+ else
+ fun_l5_n922(x)
+ end
+end
+
+def fun_l4_n584(x)
+ if (x < 1)
+ fun_l5_n100(x)
+ else
+ fun_l5_n230(x)
+ end
+end
+
+def fun_l4_n585(x)
+ if (x < 1)
+ fun_l5_n183(x)
+ else
+ fun_l5_n350(x)
+ end
+end
+
+def fun_l4_n586(x)
+ if (x < 1)
+ fun_l5_n294(x)
+ else
+ fun_l5_n673(x)
+ end
+end
+
+def fun_l4_n587(x)
+ if (x < 1)
+ fun_l5_n51(x)
+ else
+ fun_l5_n718(x)
+ end
+end
+
+def fun_l4_n588(x)
+ if (x < 1)
+ fun_l5_n257(x)
+ else
+ fun_l5_n111(x)
+ end
+end
+
+def fun_l4_n589(x)
+ if (x < 1)
+ fun_l5_n727(x)
+ else
+ fun_l5_n585(x)
+ end
+end
+
+def fun_l4_n590(x)
+ if (x < 1)
+ fun_l5_n205(x)
+ else
+ fun_l5_n308(x)
+ end
+end
+
+def fun_l4_n591(x)
+ if (x < 1)
+ fun_l5_n618(x)
+ else
+ fun_l5_n970(x)
+ end
+end
+
+def fun_l4_n592(x)
+ if (x < 1)
+ fun_l5_n631(x)
+ else
+ fun_l5_n513(x)
+ end
+end
+
+def fun_l4_n593(x)
+ if (x < 1)
+ fun_l5_n270(x)
+ else
+ fun_l5_n737(x)
+ end
+end
+
+def fun_l4_n594(x)
+ if (x < 1)
+ fun_l5_n464(x)
+ else
+ fun_l5_n217(x)
+ end
+end
+
+def fun_l4_n595(x)
+ if (x < 1)
+ fun_l5_n650(x)
+ else
+ fun_l5_n616(x)
+ end
+end
+
+def fun_l4_n596(x)
+ if (x < 1)
+ fun_l5_n542(x)
+ else
+ fun_l5_n613(x)
+ end
+end
+
+def fun_l4_n597(x)
+ if (x < 1)
+ fun_l5_n312(x)
+ else
+ fun_l5_n7(x)
+ end
+end
+
+def fun_l4_n598(x)
+ if (x < 1)
+ fun_l5_n164(x)
+ else
+ fun_l5_n592(x)
+ end
+end
+
+def fun_l4_n599(x)
+ if (x < 1)
+ fun_l5_n326(x)
+ else
+ fun_l5_n894(x)
+ end
+end
+
+def fun_l4_n600(x)
+ if (x < 1)
+ fun_l5_n243(x)
+ else
+ fun_l5_n233(x)
+ end
+end
+
+def fun_l4_n601(x)
+ if (x < 1)
+ fun_l5_n600(x)
+ else
+ fun_l5_n7(x)
+ end
+end
+
+def fun_l4_n602(x)
+ if (x < 1)
+ fun_l5_n334(x)
+ else
+ fun_l5_n282(x)
+ end
+end
+
+def fun_l4_n603(x)
+ if (x < 1)
+ fun_l5_n202(x)
+ else
+ fun_l5_n252(x)
+ end
+end
+
+def fun_l4_n604(x)
+ if (x < 1)
+ fun_l5_n173(x)
+ else
+ fun_l5_n685(x)
+ end
+end
+
+def fun_l4_n605(x)
+ if (x < 1)
+ fun_l5_n953(x)
+ else
+ fun_l5_n416(x)
+ end
+end
+
+def fun_l4_n606(x)
+ if (x < 1)
+ fun_l5_n775(x)
+ else
+ fun_l5_n372(x)
+ end
+end
+
+def fun_l4_n607(x)
+ if (x < 1)
+ fun_l5_n723(x)
+ else
+ fun_l5_n894(x)
+ end
+end
+
+def fun_l4_n608(x)
+ if (x < 1)
+ fun_l5_n690(x)
+ else
+ fun_l5_n26(x)
+ end
+end
+
+def fun_l4_n609(x)
+ if (x < 1)
+ fun_l5_n555(x)
+ else
+ fun_l5_n717(x)
+ end
+end
+
+def fun_l4_n610(x)
+ if (x < 1)
+ fun_l5_n597(x)
+ else
+ fun_l5_n106(x)
+ end
+end
+
+def fun_l4_n611(x)
+ if (x < 1)
+ fun_l5_n405(x)
+ else
+ fun_l5_n588(x)
+ end
+end
+
+def fun_l4_n612(x)
+ if (x < 1)
+ fun_l5_n41(x)
+ else
+ fun_l5_n558(x)
+ end
+end
+
+def fun_l4_n613(x)
+ if (x < 1)
+ fun_l5_n875(x)
+ else
+ fun_l5_n492(x)
+ end
+end
+
+def fun_l4_n614(x)
+ if (x < 1)
+ fun_l5_n605(x)
+ else
+ fun_l5_n461(x)
+ end
+end
+
+def fun_l4_n615(x)
+ if (x < 1)
+ fun_l5_n726(x)
+ else
+ fun_l5_n534(x)
+ end
+end
+
+def fun_l4_n616(x)
+ if (x < 1)
+ fun_l5_n919(x)
+ else
+ fun_l5_n404(x)
+ end
+end
+
+def fun_l4_n617(x)
+ if (x < 1)
+ fun_l5_n383(x)
+ else
+ fun_l5_n324(x)
+ end
+end
+
+def fun_l4_n618(x)
+ if (x < 1)
+ fun_l5_n286(x)
+ else
+ fun_l5_n157(x)
+ end
+end
+
+def fun_l4_n619(x)
+ if (x < 1)
+ fun_l5_n713(x)
+ else
+ fun_l5_n388(x)
+ end
+end
+
+def fun_l4_n620(x)
+ if (x < 1)
+ fun_l5_n773(x)
+ else
+ fun_l5_n790(x)
+ end
+end
+
+def fun_l4_n621(x)
+ if (x < 1)
+ fun_l5_n797(x)
+ else
+ fun_l5_n720(x)
+ end
+end
+
+def fun_l4_n622(x)
+ if (x < 1)
+ fun_l5_n799(x)
+ else
+ fun_l5_n423(x)
+ end
+end
+
+def fun_l4_n623(x)
+ if (x < 1)
+ fun_l5_n390(x)
+ else
+ fun_l5_n941(x)
+ end
+end
+
+def fun_l4_n624(x)
+ if (x < 1)
+ fun_l5_n584(x)
+ else
+ fun_l5_n191(x)
+ end
+end
+
+def fun_l4_n625(x)
+ if (x < 1)
+ fun_l5_n243(x)
+ else
+ fun_l5_n208(x)
+ end
+end
+
+def fun_l4_n626(x)
+ if (x < 1)
+ fun_l5_n136(x)
+ else
+ fun_l5_n791(x)
+ end
+end
+
+def fun_l4_n627(x)
+ if (x < 1)
+ fun_l5_n684(x)
+ else
+ fun_l5_n341(x)
+ end
+end
+
+def fun_l4_n628(x)
+ if (x < 1)
+ fun_l5_n876(x)
+ else
+ fun_l5_n27(x)
+ end
+end
+
+def fun_l4_n629(x)
+ if (x < 1)
+ fun_l5_n18(x)
+ else
+ fun_l5_n867(x)
+ end
+end
+
+def fun_l4_n630(x)
+ if (x < 1)
+ fun_l5_n4(x)
+ else
+ fun_l5_n871(x)
+ end
+end
+
+def fun_l4_n631(x)
+ if (x < 1)
+ fun_l5_n578(x)
+ else
+ fun_l5_n988(x)
+ end
+end
+
+def fun_l4_n632(x)
+ if (x < 1)
+ fun_l5_n388(x)
+ else
+ fun_l5_n258(x)
+ end
+end
+
+def fun_l4_n633(x)
+ if (x < 1)
+ fun_l5_n680(x)
+ else
+ fun_l5_n814(x)
+ end
+end
+
+def fun_l4_n634(x)
+ if (x < 1)
+ fun_l5_n857(x)
+ else
+ fun_l5_n595(x)
+ end
+end
+
+def fun_l4_n635(x)
+ if (x < 1)
+ fun_l5_n547(x)
+ else
+ fun_l5_n725(x)
+ end
+end
+
+def fun_l4_n636(x)
+ if (x < 1)
+ fun_l5_n644(x)
+ else
+ fun_l5_n485(x)
+ end
+end
+
+def fun_l4_n637(x)
+ if (x < 1)
+ fun_l5_n528(x)
+ else
+ fun_l5_n653(x)
+ end
+end
+
+def fun_l4_n638(x)
+ if (x < 1)
+ fun_l5_n924(x)
+ else
+ fun_l5_n956(x)
+ end
+end
+
+def fun_l4_n639(x)
+ if (x < 1)
+ fun_l5_n654(x)
+ else
+ fun_l5_n979(x)
+ end
+end
+
+def fun_l4_n640(x)
+ if (x < 1)
+ fun_l5_n287(x)
+ else
+ fun_l5_n778(x)
+ end
+end
+
+def fun_l4_n641(x)
+ if (x < 1)
+ fun_l5_n197(x)
+ else
+ fun_l5_n682(x)
+ end
+end
+
+def fun_l4_n642(x)
+ if (x < 1)
+ fun_l5_n559(x)
+ else
+ fun_l5_n812(x)
+ end
+end
+
+def fun_l4_n643(x)
+ if (x < 1)
+ fun_l5_n970(x)
+ else
+ fun_l5_n43(x)
+ end
+end
+
+def fun_l4_n644(x)
+ if (x < 1)
+ fun_l5_n222(x)
+ else
+ fun_l5_n741(x)
+ end
+end
+
+def fun_l4_n645(x)
+ if (x < 1)
+ fun_l5_n788(x)
+ else
+ fun_l5_n72(x)
+ end
+end
+
+def fun_l4_n646(x)
+ if (x < 1)
+ fun_l5_n877(x)
+ else
+ fun_l5_n371(x)
+ end
+end
+
+def fun_l4_n647(x)
+ if (x < 1)
+ fun_l5_n710(x)
+ else
+ fun_l5_n783(x)
+ end
+end
+
+def fun_l4_n648(x)
+ if (x < 1)
+ fun_l5_n957(x)
+ else
+ fun_l5_n801(x)
+ end
+end
+
+def fun_l4_n649(x)
+ if (x < 1)
+ fun_l5_n127(x)
+ else
+ fun_l5_n664(x)
+ end
+end
+
+def fun_l4_n650(x)
+ if (x < 1)
+ fun_l5_n176(x)
+ else
+ fun_l5_n511(x)
+ end
+end
+
+def fun_l4_n651(x)
+ if (x < 1)
+ fun_l5_n830(x)
+ else
+ fun_l5_n107(x)
+ end
+end
+
+def fun_l4_n652(x)
+ if (x < 1)
+ fun_l5_n207(x)
+ else
+ fun_l5_n894(x)
+ end
+end
+
+def fun_l4_n653(x)
+ if (x < 1)
+ fun_l5_n611(x)
+ else
+ fun_l5_n443(x)
+ end
+end
+
+def fun_l4_n654(x)
+ if (x < 1)
+ fun_l5_n953(x)
+ else
+ fun_l5_n214(x)
+ end
+end
+
+def fun_l4_n655(x)
+ if (x < 1)
+ fun_l5_n109(x)
+ else
+ fun_l5_n706(x)
+ end
+end
+
+def fun_l4_n656(x)
+ if (x < 1)
+ fun_l5_n312(x)
+ else
+ fun_l5_n914(x)
+ end
+end
+
+def fun_l4_n657(x)
+ if (x < 1)
+ fun_l5_n774(x)
+ else
+ fun_l5_n530(x)
+ end
+end
+
+def fun_l4_n658(x)
+ if (x < 1)
+ fun_l5_n79(x)
+ else
+ fun_l5_n303(x)
+ end
+end
+
+def fun_l4_n659(x)
+ if (x < 1)
+ fun_l5_n718(x)
+ else
+ fun_l5_n196(x)
+ end
+end
+
+def fun_l4_n660(x)
+ if (x < 1)
+ fun_l5_n196(x)
+ else
+ fun_l5_n661(x)
+ end
+end
+
+def fun_l4_n661(x)
+ if (x < 1)
+ fun_l5_n654(x)
+ else
+ fun_l5_n17(x)
+ end
+end
+
+def fun_l4_n662(x)
+ if (x < 1)
+ fun_l5_n413(x)
+ else
+ fun_l5_n214(x)
+ end
+end
+
+def fun_l4_n663(x)
+ if (x < 1)
+ fun_l5_n491(x)
+ else
+ fun_l5_n927(x)
+ end
+end
+
+def fun_l4_n664(x)
+ if (x < 1)
+ fun_l5_n671(x)
+ else
+ fun_l5_n611(x)
+ end
+end
+
+def fun_l4_n665(x)
+ if (x < 1)
+ fun_l5_n153(x)
+ else
+ fun_l5_n127(x)
+ end
+end
+
+def fun_l4_n666(x)
+ if (x < 1)
+ fun_l5_n661(x)
+ else
+ fun_l5_n590(x)
+ end
+end
+
+def fun_l4_n667(x)
+ if (x < 1)
+ fun_l5_n539(x)
+ else
+ fun_l5_n692(x)
+ end
+end
+
+def fun_l4_n668(x)
+ if (x < 1)
+ fun_l5_n390(x)
+ else
+ fun_l5_n423(x)
+ end
+end
+
+def fun_l4_n669(x)
+ if (x < 1)
+ fun_l5_n615(x)
+ else
+ fun_l5_n449(x)
+ end
+end
+
+def fun_l4_n670(x)
+ if (x < 1)
+ fun_l5_n49(x)
+ else
+ fun_l5_n632(x)
+ end
+end
+
+def fun_l4_n671(x)
+ if (x < 1)
+ fun_l5_n891(x)
+ else
+ fun_l5_n915(x)
+ end
+end
+
+def fun_l4_n672(x)
+ if (x < 1)
+ fun_l5_n257(x)
+ else
+ fun_l5_n719(x)
+ end
+end
+
+def fun_l4_n673(x)
+ if (x < 1)
+ fun_l5_n620(x)
+ else
+ fun_l5_n473(x)
+ end
+end
+
+def fun_l4_n674(x)
+ if (x < 1)
+ fun_l5_n422(x)
+ else
+ fun_l5_n776(x)
+ end
+end
+
+def fun_l4_n675(x)
+ if (x < 1)
+ fun_l5_n973(x)
+ else
+ fun_l5_n32(x)
+ end
+end
+
+def fun_l4_n676(x)
+ if (x < 1)
+ fun_l5_n434(x)
+ else
+ fun_l5_n85(x)
+ end
+end
+
+def fun_l4_n677(x)
+ if (x < 1)
+ fun_l5_n430(x)
+ else
+ fun_l5_n702(x)
+ end
+end
+
+def fun_l4_n678(x)
+ if (x < 1)
+ fun_l5_n698(x)
+ else
+ fun_l5_n482(x)
+ end
+end
+
+def fun_l4_n679(x)
+ if (x < 1)
+ fun_l5_n365(x)
+ else
+ fun_l5_n83(x)
+ end
+end
+
+def fun_l4_n680(x)
+ if (x < 1)
+ fun_l5_n397(x)
+ else
+ fun_l5_n356(x)
+ end
+end
+
+def fun_l4_n681(x)
+ if (x < 1)
+ fun_l5_n48(x)
+ else
+ fun_l5_n458(x)
+ end
+end
+
+def fun_l4_n682(x)
+ if (x < 1)
+ fun_l5_n205(x)
+ else
+ fun_l5_n693(x)
+ end
+end
+
+def fun_l4_n683(x)
+ if (x < 1)
+ fun_l5_n971(x)
+ else
+ fun_l5_n656(x)
+ end
+end
+
+def fun_l4_n684(x)
+ if (x < 1)
+ fun_l5_n147(x)
+ else
+ fun_l5_n314(x)
+ end
+end
+
+def fun_l4_n685(x)
+ if (x < 1)
+ fun_l5_n347(x)
+ else
+ fun_l5_n281(x)
+ end
+end
+
+def fun_l4_n686(x)
+ if (x < 1)
+ fun_l5_n259(x)
+ else
+ fun_l5_n395(x)
+ end
+end
+
+def fun_l4_n687(x)
+ if (x < 1)
+ fun_l5_n899(x)
+ else
+ fun_l5_n319(x)
+ end
+end
+
+def fun_l4_n688(x)
+ if (x < 1)
+ fun_l5_n293(x)
+ else
+ fun_l5_n831(x)
+ end
+end
+
+def fun_l4_n689(x)
+ if (x < 1)
+ fun_l5_n88(x)
+ else
+ fun_l5_n938(x)
+ end
+end
+
+def fun_l4_n690(x)
+ if (x < 1)
+ fun_l5_n72(x)
+ else
+ fun_l5_n172(x)
+ end
+end
+
+def fun_l4_n691(x)
+ if (x < 1)
+ fun_l5_n330(x)
+ else
+ fun_l5_n70(x)
+ end
+end
+
+def fun_l4_n692(x)
+ if (x < 1)
+ fun_l5_n901(x)
+ else
+ fun_l5_n984(x)
+ end
+end
+
+def fun_l4_n693(x)
+ if (x < 1)
+ fun_l5_n528(x)
+ else
+ fun_l5_n659(x)
+ end
+end
+
+def fun_l4_n694(x)
+ if (x < 1)
+ fun_l5_n522(x)
+ else
+ fun_l5_n219(x)
+ end
+end
+
+def fun_l4_n695(x)
+ if (x < 1)
+ fun_l5_n568(x)
+ else
+ fun_l5_n997(x)
+ end
+end
+
+def fun_l4_n696(x)
+ if (x < 1)
+ fun_l5_n248(x)
+ else
+ fun_l5_n508(x)
+ end
+end
+
+def fun_l4_n697(x)
+ if (x < 1)
+ fun_l5_n71(x)
+ else
+ fun_l5_n590(x)
+ end
+end
+
+def fun_l4_n698(x)
+ if (x < 1)
+ fun_l5_n398(x)
+ else
+ fun_l5_n125(x)
+ end
+end
+
+def fun_l4_n699(x)
+ if (x < 1)
+ fun_l5_n405(x)
+ else
+ fun_l5_n129(x)
+ end
+end
+
+def fun_l4_n700(x)
+ if (x < 1)
+ fun_l5_n818(x)
+ else
+ fun_l5_n792(x)
+ end
+end
+
+def fun_l4_n701(x)
+ if (x < 1)
+ fun_l5_n530(x)
+ else
+ fun_l5_n849(x)
+ end
+end
+
+def fun_l4_n702(x)
+ if (x < 1)
+ fun_l5_n640(x)
+ else
+ fun_l5_n558(x)
+ end
+end
+
+def fun_l4_n703(x)
+ if (x < 1)
+ fun_l5_n717(x)
+ else
+ fun_l5_n113(x)
+ end
+end
+
+def fun_l4_n704(x)
+ if (x < 1)
+ fun_l5_n139(x)
+ else
+ fun_l5_n743(x)
+ end
+end
+
+def fun_l4_n705(x)
+ if (x < 1)
+ fun_l5_n720(x)
+ else
+ fun_l5_n713(x)
+ end
+end
+
+def fun_l4_n706(x)
+ if (x < 1)
+ fun_l5_n774(x)
+ else
+ fun_l5_n90(x)
+ end
+end
+
+def fun_l4_n707(x)
+ if (x < 1)
+ fun_l5_n579(x)
+ else
+ fun_l5_n692(x)
+ end
+end
+
+def fun_l4_n708(x)
+ if (x < 1)
+ fun_l5_n448(x)
+ else
+ fun_l5_n146(x)
+ end
+end
+
+def fun_l4_n709(x)
+ if (x < 1)
+ fun_l5_n249(x)
+ else
+ fun_l5_n163(x)
+ end
+end
+
+def fun_l4_n710(x)
+ if (x < 1)
+ fun_l5_n694(x)
+ else
+ fun_l5_n532(x)
+ end
+end
+
+def fun_l4_n711(x)
+ if (x < 1)
+ fun_l5_n739(x)
+ else
+ fun_l5_n424(x)
+ end
+end
+
+def fun_l4_n712(x)
+ if (x < 1)
+ fun_l5_n700(x)
+ else
+ fun_l5_n761(x)
+ end
+end
+
+def fun_l4_n713(x)
+ if (x < 1)
+ fun_l5_n403(x)
+ else
+ fun_l5_n941(x)
+ end
+end
+
+def fun_l4_n714(x)
+ if (x < 1)
+ fun_l5_n724(x)
+ else
+ fun_l5_n863(x)
+ end
+end
+
+def fun_l4_n715(x)
+ if (x < 1)
+ fun_l5_n392(x)
+ else
+ fun_l5_n617(x)
+ end
+end
+
+def fun_l4_n716(x)
+ if (x < 1)
+ fun_l5_n76(x)
+ else
+ fun_l5_n896(x)
+ end
+end
+
+def fun_l4_n717(x)
+ if (x < 1)
+ fun_l5_n355(x)
+ else
+ fun_l5_n533(x)
+ end
+end
+
+def fun_l4_n718(x)
+ if (x < 1)
+ fun_l5_n225(x)
+ else
+ fun_l5_n273(x)
+ end
+end
+
+def fun_l4_n719(x)
+ if (x < 1)
+ fun_l5_n828(x)
+ else
+ fun_l5_n163(x)
+ end
+end
+
+def fun_l4_n720(x)
+ if (x < 1)
+ fun_l5_n309(x)
+ else
+ fun_l5_n702(x)
+ end
+end
+
+def fun_l4_n721(x)
+ if (x < 1)
+ fun_l5_n959(x)
+ else
+ fun_l5_n370(x)
+ end
+end
+
+def fun_l4_n722(x)
+ if (x < 1)
+ fun_l5_n640(x)
+ else
+ fun_l5_n96(x)
+ end
+end
+
+def fun_l4_n723(x)
+ if (x < 1)
+ fun_l5_n590(x)
+ else
+ fun_l5_n332(x)
+ end
+end
+
+def fun_l4_n724(x)
+ if (x < 1)
+ fun_l5_n14(x)
+ else
+ fun_l5_n161(x)
+ end
+end
+
+def fun_l4_n725(x)
+ if (x < 1)
+ fun_l5_n871(x)
+ else
+ fun_l5_n643(x)
+ end
+end
+
+def fun_l4_n726(x)
+ if (x < 1)
+ fun_l5_n885(x)
+ else
+ fun_l5_n142(x)
+ end
+end
+
+def fun_l4_n727(x)
+ if (x < 1)
+ fun_l5_n994(x)
+ else
+ fun_l5_n823(x)
+ end
+end
+
+def fun_l4_n728(x)
+ if (x < 1)
+ fun_l5_n825(x)
+ else
+ fun_l5_n315(x)
+ end
+end
+
+def fun_l4_n729(x)
+ if (x < 1)
+ fun_l5_n312(x)
+ else
+ fun_l5_n28(x)
+ end
+end
+
+def fun_l4_n730(x)
+ if (x < 1)
+ fun_l5_n545(x)
+ else
+ fun_l5_n87(x)
+ end
+end
+
+def fun_l4_n731(x)
+ if (x < 1)
+ fun_l5_n604(x)
+ else
+ fun_l5_n999(x)
+ end
+end
+
+def fun_l4_n732(x)
+ if (x < 1)
+ fun_l5_n21(x)
+ else
+ fun_l5_n170(x)
+ end
+end
+
+def fun_l4_n733(x)
+ if (x < 1)
+ fun_l5_n662(x)
+ else
+ fun_l5_n407(x)
+ end
+end
+
+def fun_l4_n734(x)
+ if (x < 1)
+ fun_l5_n808(x)
+ else
+ fun_l5_n653(x)
+ end
+end
+
+def fun_l4_n735(x)
+ if (x < 1)
+ fun_l5_n665(x)
+ else
+ fun_l5_n925(x)
+ end
+end
+
+def fun_l4_n736(x)
+ if (x < 1)
+ fun_l5_n186(x)
+ else
+ fun_l5_n817(x)
+ end
+end
+
+def fun_l4_n737(x)
+ if (x < 1)
+ fun_l5_n360(x)
+ else
+ fun_l5_n527(x)
+ end
+end
+
+def fun_l4_n738(x)
+ if (x < 1)
+ fun_l5_n278(x)
+ else
+ fun_l5_n759(x)
+ end
+end
+
+def fun_l4_n739(x)
+ if (x < 1)
+ fun_l5_n710(x)
+ else
+ fun_l5_n909(x)
+ end
+end
+
+def fun_l4_n740(x)
+ if (x < 1)
+ fun_l5_n770(x)
+ else
+ fun_l5_n382(x)
+ end
+end
+
+def fun_l4_n741(x)
+ if (x < 1)
+ fun_l5_n969(x)
+ else
+ fun_l5_n583(x)
+ end
+end
+
+def fun_l4_n742(x)
+ if (x < 1)
+ fun_l5_n653(x)
+ else
+ fun_l5_n258(x)
+ end
+end
+
+def fun_l4_n743(x)
+ if (x < 1)
+ fun_l5_n966(x)
+ else
+ fun_l5_n705(x)
+ end
+end
+
+def fun_l4_n744(x)
+ if (x < 1)
+ fun_l5_n454(x)
+ else
+ fun_l5_n748(x)
+ end
+end
+
+def fun_l4_n745(x)
+ if (x < 1)
+ fun_l5_n595(x)
+ else
+ fun_l5_n865(x)
+ end
+end
+
+def fun_l4_n746(x)
+ if (x < 1)
+ fun_l5_n593(x)
+ else
+ fun_l5_n615(x)
+ end
+end
+
+def fun_l4_n747(x)
+ if (x < 1)
+ fun_l5_n638(x)
+ else
+ fun_l5_n651(x)
+ end
+end
+
+def fun_l4_n748(x)
+ if (x < 1)
+ fun_l5_n331(x)
+ else
+ fun_l5_n847(x)
+ end
+end
+
+def fun_l4_n749(x)
+ if (x < 1)
+ fun_l5_n59(x)
+ else
+ fun_l5_n805(x)
+ end
+end
+
+def fun_l4_n750(x)
+ if (x < 1)
+ fun_l5_n269(x)
+ else
+ fun_l5_n904(x)
+ end
+end
+
+def fun_l4_n751(x)
+ if (x < 1)
+ fun_l5_n292(x)
+ else
+ fun_l5_n459(x)
+ end
+end
+
+def fun_l4_n752(x)
+ if (x < 1)
+ fun_l5_n581(x)
+ else
+ fun_l5_n353(x)
+ end
+end
+
+def fun_l4_n753(x)
+ if (x < 1)
+ fun_l5_n785(x)
+ else
+ fun_l5_n745(x)
+ end
+end
+
+def fun_l4_n754(x)
+ if (x < 1)
+ fun_l5_n317(x)
+ else
+ fun_l5_n604(x)
+ end
+end
+
+def fun_l4_n755(x)
+ if (x < 1)
+ fun_l5_n208(x)
+ else
+ fun_l5_n318(x)
+ end
+end
+
+def fun_l4_n756(x)
+ if (x < 1)
+ fun_l5_n986(x)
+ else
+ fun_l5_n83(x)
+ end
+end
+
+def fun_l4_n757(x)
+ if (x < 1)
+ fun_l5_n946(x)
+ else
+ fun_l5_n314(x)
+ end
+end
+
+def fun_l4_n758(x)
+ if (x < 1)
+ fun_l5_n571(x)
+ else
+ fun_l5_n919(x)
+ end
+end
+
+def fun_l4_n759(x)
+ if (x < 1)
+ fun_l5_n129(x)
+ else
+ fun_l5_n191(x)
+ end
+end
+
+def fun_l4_n760(x)
+ if (x < 1)
+ fun_l5_n838(x)
+ else
+ fun_l5_n29(x)
+ end
+end
+
+def fun_l4_n761(x)
+ if (x < 1)
+ fun_l5_n250(x)
+ else
+ fun_l5_n892(x)
+ end
+end
+
+def fun_l4_n762(x)
+ if (x < 1)
+ fun_l5_n588(x)
+ else
+ fun_l5_n59(x)
+ end
+end
+
+def fun_l4_n763(x)
+ if (x < 1)
+ fun_l5_n831(x)
+ else
+ fun_l5_n668(x)
+ end
+end
+
+def fun_l4_n764(x)
+ if (x < 1)
+ fun_l5_n337(x)
+ else
+ fun_l5_n514(x)
+ end
+end
+
+def fun_l4_n765(x)
+ if (x < 1)
+ fun_l5_n56(x)
+ else
+ fun_l5_n718(x)
+ end
+end
+
+def fun_l4_n766(x)
+ if (x < 1)
+ fun_l5_n189(x)
+ else
+ fun_l5_n103(x)
+ end
+end
+
+def fun_l4_n767(x)
+ if (x < 1)
+ fun_l5_n395(x)
+ else
+ fun_l5_n313(x)
+ end
+end
+
+def fun_l4_n768(x)
+ if (x < 1)
+ fun_l5_n388(x)
+ else
+ fun_l5_n757(x)
+ end
+end
+
+def fun_l4_n769(x)
+ if (x < 1)
+ fun_l5_n933(x)
+ else
+ fun_l5_n979(x)
+ end
+end
+
+def fun_l4_n770(x)
+ if (x < 1)
+ fun_l5_n765(x)
+ else
+ fun_l5_n472(x)
+ end
+end
+
+def fun_l4_n771(x)
+ if (x < 1)
+ fun_l5_n381(x)
+ else
+ fun_l5_n527(x)
+ end
+end
+
+def fun_l4_n772(x)
+ if (x < 1)
+ fun_l5_n314(x)
+ else
+ fun_l5_n990(x)
+ end
+end
+
+def fun_l4_n773(x)
+ if (x < 1)
+ fun_l5_n457(x)
+ else
+ fun_l5_n413(x)
+ end
+end
+
+def fun_l4_n774(x)
+ if (x < 1)
+ fun_l5_n245(x)
+ else
+ fun_l5_n85(x)
+ end
+end
+
+def fun_l4_n775(x)
+ if (x < 1)
+ fun_l5_n432(x)
+ else
+ fun_l5_n987(x)
+ end
+end
+
+def fun_l4_n776(x)
+ if (x < 1)
+ fun_l5_n588(x)
+ else
+ fun_l5_n352(x)
+ end
+end
+
+def fun_l4_n777(x)
+ if (x < 1)
+ fun_l5_n414(x)
+ else
+ fun_l5_n586(x)
+ end
+end
+
+def fun_l4_n778(x)
+ if (x < 1)
+ fun_l5_n290(x)
+ else
+ fun_l5_n776(x)
+ end
+end
+
+def fun_l4_n779(x)
+ if (x < 1)
+ fun_l5_n324(x)
+ else
+ fun_l5_n918(x)
+ end
+end
+
+def fun_l4_n780(x)
+ if (x < 1)
+ fun_l5_n928(x)
+ else
+ fun_l5_n107(x)
+ end
+end
+
+def fun_l4_n781(x)
+ if (x < 1)
+ fun_l5_n244(x)
+ else
+ fun_l5_n434(x)
+ end
+end
+
+def fun_l4_n782(x)
+ if (x < 1)
+ fun_l5_n828(x)
+ else
+ fun_l5_n141(x)
+ end
+end
+
+def fun_l4_n783(x)
+ if (x < 1)
+ fun_l5_n634(x)
+ else
+ fun_l5_n206(x)
+ end
+end
+
+def fun_l4_n784(x)
+ if (x < 1)
+ fun_l5_n387(x)
+ else
+ fun_l5_n57(x)
+ end
+end
+
+def fun_l4_n785(x)
+ if (x < 1)
+ fun_l5_n731(x)
+ else
+ fun_l5_n670(x)
+ end
+end
+
+def fun_l4_n786(x)
+ if (x < 1)
+ fun_l5_n173(x)
+ else
+ fun_l5_n657(x)
+ end
+end
+
+def fun_l4_n787(x)
+ if (x < 1)
+ fun_l5_n661(x)
+ else
+ fun_l5_n286(x)
+ end
+end
+
+def fun_l4_n788(x)
+ if (x < 1)
+ fun_l5_n364(x)
+ else
+ fun_l5_n520(x)
+ end
+end
+
+def fun_l4_n789(x)
+ if (x < 1)
+ fun_l5_n545(x)
+ else
+ fun_l5_n417(x)
+ end
+end
+
+def fun_l4_n790(x)
+ if (x < 1)
+ fun_l5_n270(x)
+ else
+ fun_l5_n550(x)
+ end
+end
+
+def fun_l4_n791(x)
+ if (x < 1)
+ fun_l5_n873(x)
+ else
+ fun_l5_n321(x)
+ end
+end
+
+def fun_l4_n792(x)
+ if (x < 1)
+ fun_l5_n243(x)
+ else
+ fun_l5_n406(x)
+ end
+end
+
+def fun_l4_n793(x)
+ if (x < 1)
+ fun_l5_n229(x)
+ else
+ fun_l5_n400(x)
+ end
+end
+
+def fun_l4_n794(x)
+ if (x < 1)
+ fun_l5_n670(x)
+ else
+ fun_l5_n535(x)
+ end
+end
+
+def fun_l4_n795(x)
+ if (x < 1)
+ fun_l5_n911(x)
+ else
+ fun_l5_n786(x)
+ end
+end
+
+def fun_l4_n796(x)
+ if (x < 1)
+ fun_l5_n247(x)
+ else
+ fun_l5_n775(x)
+ end
+end
+
+def fun_l4_n797(x)
+ if (x < 1)
+ fun_l5_n944(x)
+ else
+ fun_l5_n14(x)
+ end
+end
+
+def fun_l4_n798(x)
+ if (x < 1)
+ fun_l5_n57(x)
+ else
+ fun_l5_n644(x)
+ end
+end
+
+def fun_l4_n799(x)
+ if (x < 1)
+ fun_l5_n583(x)
+ else
+ fun_l5_n599(x)
+ end
+end
+
+def fun_l4_n800(x)
+ if (x < 1)
+ fun_l5_n685(x)
+ else
+ fun_l5_n366(x)
+ end
+end
+
+def fun_l4_n801(x)
+ if (x < 1)
+ fun_l5_n671(x)
+ else
+ fun_l5_n386(x)
+ end
+end
+
+def fun_l4_n802(x)
+ if (x < 1)
+ fun_l5_n19(x)
+ else
+ fun_l5_n403(x)
+ end
+end
+
+def fun_l4_n803(x)
+ if (x < 1)
+ fun_l5_n952(x)
+ else
+ fun_l5_n237(x)
+ end
+end
+
+def fun_l4_n804(x)
+ if (x < 1)
+ fun_l5_n929(x)
+ else
+ fun_l5_n737(x)
+ end
+end
+
+def fun_l4_n805(x)
+ if (x < 1)
+ fun_l5_n197(x)
+ else
+ fun_l5_n322(x)
+ end
+end
+
+def fun_l4_n806(x)
+ if (x < 1)
+ fun_l5_n966(x)
+ else
+ fun_l5_n531(x)
+ end
+end
+
+def fun_l4_n807(x)
+ if (x < 1)
+ fun_l5_n928(x)
+ else
+ fun_l5_n802(x)
+ end
+end
+
+def fun_l4_n808(x)
+ if (x < 1)
+ fun_l5_n34(x)
+ else
+ fun_l5_n107(x)
+ end
+end
+
+def fun_l4_n809(x)
+ if (x < 1)
+ fun_l5_n615(x)
+ else
+ fun_l5_n628(x)
+ end
+end
+
+def fun_l4_n810(x)
+ if (x < 1)
+ fun_l5_n187(x)
+ else
+ fun_l5_n424(x)
+ end
+end
+
+def fun_l4_n811(x)
+ if (x < 1)
+ fun_l5_n189(x)
+ else
+ fun_l5_n639(x)
+ end
+end
+
+def fun_l4_n812(x)
+ if (x < 1)
+ fun_l5_n177(x)
+ else
+ fun_l5_n580(x)
+ end
+end
+
+def fun_l4_n813(x)
+ if (x < 1)
+ fun_l5_n699(x)
+ else
+ fun_l5_n595(x)
+ end
+end
+
+def fun_l4_n814(x)
+ if (x < 1)
+ fun_l5_n44(x)
+ else
+ fun_l5_n966(x)
+ end
+end
+
+def fun_l4_n815(x)
+ if (x < 1)
+ fun_l5_n883(x)
+ else
+ fun_l5_n580(x)
+ end
+end
+
+def fun_l4_n816(x)
+ if (x < 1)
+ fun_l5_n306(x)
+ else
+ fun_l5_n564(x)
+ end
+end
+
+def fun_l4_n817(x)
+ if (x < 1)
+ fun_l5_n337(x)
+ else
+ fun_l5_n912(x)
+ end
+end
+
+def fun_l4_n818(x)
+ if (x < 1)
+ fun_l5_n36(x)
+ else
+ fun_l5_n164(x)
+ end
+end
+
+def fun_l4_n819(x)
+ if (x < 1)
+ fun_l5_n987(x)
+ else
+ fun_l5_n38(x)
+ end
+end
+
+def fun_l4_n820(x)
+ if (x < 1)
+ fun_l5_n656(x)
+ else
+ fun_l5_n647(x)
+ end
+end
+
+def fun_l4_n821(x)
+ if (x < 1)
+ fun_l5_n364(x)
+ else
+ fun_l5_n838(x)
+ end
+end
+
+def fun_l4_n822(x)
+ if (x < 1)
+ fun_l5_n301(x)
+ else
+ fun_l5_n850(x)
+ end
+end
+
+def fun_l4_n823(x)
+ if (x < 1)
+ fun_l5_n191(x)
+ else
+ fun_l5_n812(x)
+ end
+end
+
+def fun_l4_n824(x)
+ if (x < 1)
+ fun_l5_n148(x)
+ else
+ fun_l5_n332(x)
+ end
+end
+
+def fun_l4_n825(x)
+ if (x < 1)
+ fun_l5_n315(x)
+ else
+ fun_l5_n763(x)
+ end
+end
+
+def fun_l4_n826(x)
+ if (x < 1)
+ fun_l5_n612(x)
+ else
+ fun_l5_n993(x)
+ end
+end
+
+def fun_l4_n827(x)
+ if (x < 1)
+ fun_l5_n229(x)
+ else
+ fun_l5_n388(x)
+ end
+end
+
+def fun_l4_n828(x)
+ if (x < 1)
+ fun_l5_n131(x)
+ else
+ fun_l5_n283(x)
+ end
+end
+
+def fun_l4_n829(x)
+ if (x < 1)
+ fun_l5_n59(x)
+ else
+ fun_l5_n280(x)
+ end
+end
+
+def fun_l4_n830(x)
+ if (x < 1)
+ fun_l5_n993(x)
+ else
+ fun_l5_n160(x)
+ end
+end
+
+def fun_l4_n831(x)
+ if (x < 1)
+ fun_l5_n394(x)
+ else
+ fun_l5_n528(x)
+ end
+end
+
+def fun_l4_n832(x)
+ if (x < 1)
+ fun_l5_n376(x)
+ else
+ fun_l5_n201(x)
+ end
+end
+
+def fun_l4_n833(x)
+ if (x < 1)
+ fun_l5_n890(x)
+ else
+ fun_l5_n867(x)
+ end
+end
+
+def fun_l4_n834(x)
+ if (x < 1)
+ fun_l5_n320(x)
+ else
+ fun_l5_n237(x)
+ end
+end
+
+def fun_l4_n835(x)
+ if (x < 1)
+ fun_l5_n771(x)
+ else
+ fun_l5_n83(x)
+ end
+end
+
+def fun_l4_n836(x)
+ if (x < 1)
+ fun_l5_n751(x)
+ else
+ fun_l5_n2(x)
+ end
+end
+
+def fun_l4_n837(x)
+ if (x < 1)
+ fun_l5_n825(x)
+ else
+ fun_l5_n930(x)
+ end
+end
+
+def fun_l4_n838(x)
+ if (x < 1)
+ fun_l5_n968(x)
+ else
+ fun_l5_n136(x)
+ end
+end
+
+def fun_l4_n839(x)
+ if (x < 1)
+ fun_l5_n529(x)
+ else
+ fun_l5_n626(x)
+ end
+end
+
+def fun_l4_n840(x)
+ if (x < 1)
+ fun_l5_n228(x)
+ else
+ fun_l5_n915(x)
+ end
+end
+
+def fun_l4_n841(x)
+ if (x < 1)
+ fun_l5_n270(x)
+ else
+ fun_l5_n813(x)
+ end
+end
+
+def fun_l4_n842(x)
+ if (x < 1)
+ fun_l5_n392(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n843(x)
+ if (x < 1)
+ fun_l5_n470(x)
+ else
+ fun_l5_n699(x)
+ end
+end
+
+def fun_l4_n844(x)
+ if (x < 1)
+ fun_l5_n68(x)
+ else
+ fun_l5_n163(x)
+ end
+end
+
+def fun_l4_n845(x)
+ if (x < 1)
+ fun_l5_n469(x)
+ else
+ fun_l5_n472(x)
+ end
+end
+
+def fun_l4_n846(x)
+ if (x < 1)
+ fun_l5_n640(x)
+ else
+ fun_l5_n311(x)
+ end
+end
+
+def fun_l4_n847(x)
+ if (x < 1)
+ fun_l5_n968(x)
+ else
+ fun_l5_n414(x)
+ end
+end
+
+def fun_l4_n848(x)
+ if (x < 1)
+ fun_l5_n111(x)
+ else
+ fun_l5_n340(x)
+ end
+end
+
+def fun_l4_n849(x)
+ if (x < 1)
+ fun_l5_n906(x)
+ else
+ fun_l5_n278(x)
+ end
+end
+
+def fun_l4_n850(x)
+ if (x < 1)
+ fun_l5_n353(x)
+ else
+ fun_l5_n590(x)
+ end
+end
+
+def fun_l4_n851(x)
+ if (x < 1)
+ fun_l5_n218(x)
+ else
+ fun_l5_n341(x)
+ end
+end
+
+def fun_l4_n852(x)
+ if (x < 1)
+ fun_l5_n527(x)
+ else
+ fun_l5_n273(x)
+ end
+end
+
+def fun_l4_n853(x)
+ if (x < 1)
+ fun_l5_n589(x)
+ else
+ fun_l5_n417(x)
+ end
+end
+
+def fun_l4_n854(x)
+ if (x < 1)
+ fun_l5_n411(x)
+ else
+ fun_l5_n848(x)
+ end
+end
+
+def fun_l4_n855(x)
+ if (x < 1)
+ fun_l5_n607(x)
+ else
+ fun_l5_n65(x)
+ end
+end
+
+def fun_l4_n856(x)
+ if (x < 1)
+ fun_l5_n240(x)
+ else
+ fun_l5_n24(x)
+ end
+end
+
+def fun_l4_n857(x)
+ if (x < 1)
+ fun_l5_n165(x)
+ else
+ fun_l5_n362(x)
+ end
+end
+
+def fun_l4_n858(x)
+ if (x < 1)
+ fun_l5_n559(x)
+ else
+ fun_l5_n253(x)
+ end
+end
+
+def fun_l4_n859(x)
+ if (x < 1)
+ fun_l5_n834(x)
+ else
+ fun_l5_n217(x)
+ end
+end
+
+def fun_l4_n860(x)
+ if (x < 1)
+ fun_l5_n891(x)
+ else
+ fun_l5_n369(x)
+ end
+end
+
+def fun_l4_n861(x)
+ if (x < 1)
+ fun_l5_n676(x)
+ else
+ fun_l5_n614(x)
+ end
+end
+
+def fun_l4_n862(x)
+ if (x < 1)
+ fun_l5_n527(x)
+ else
+ fun_l5_n318(x)
+ end
+end
+
+def fun_l4_n863(x)
+ if (x < 1)
+ fun_l5_n991(x)
+ else
+ fun_l5_n997(x)
+ end
+end
+
+def fun_l4_n864(x)
+ if (x < 1)
+ fun_l5_n842(x)
+ else
+ fun_l5_n370(x)
+ end
+end
+
+def fun_l4_n865(x)
+ if (x < 1)
+ fun_l5_n623(x)
+ else
+ fun_l5_n741(x)
+ end
+end
+
+def fun_l4_n866(x)
+ if (x < 1)
+ fun_l5_n58(x)
+ else
+ fun_l5_n953(x)
+ end
+end
+
+def fun_l4_n867(x)
+ if (x < 1)
+ fun_l5_n269(x)
+ else
+ fun_l5_n341(x)
+ end
+end
+
+def fun_l4_n868(x)
+ if (x < 1)
+ fun_l5_n814(x)
+ else
+ fun_l5_n849(x)
+ end
+end
+
+def fun_l4_n869(x)
+ if (x < 1)
+ fun_l5_n163(x)
+ else
+ fun_l5_n246(x)
+ end
+end
+
+def fun_l4_n870(x)
+ if (x < 1)
+ fun_l5_n739(x)
+ else
+ fun_l5_n524(x)
+ end
+end
+
+def fun_l4_n871(x)
+ if (x < 1)
+ fun_l5_n589(x)
+ else
+ fun_l5_n592(x)
+ end
+end
+
+def fun_l4_n872(x)
+ if (x < 1)
+ fun_l5_n922(x)
+ else
+ fun_l5_n401(x)
+ end
+end
+
+def fun_l4_n873(x)
+ if (x < 1)
+ fun_l5_n600(x)
+ else
+ fun_l5_n184(x)
+ end
+end
+
+def fun_l4_n874(x)
+ if (x < 1)
+ fun_l5_n424(x)
+ else
+ fun_l5_n627(x)
+ end
+end
+
+def fun_l4_n875(x)
+ if (x < 1)
+ fun_l5_n48(x)
+ else
+ fun_l5_n127(x)
+ end
+end
+
+def fun_l4_n876(x)
+ if (x < 1)
+ fun_l5_n687(x)
+ else
+ fun_l5_n451(x)
+ end
+end
+
+def fun_l4_n877(x)
+ if (x < 1)
+ fun_l5_n849(x)
+ else
+ fun_l5_n480(x)
+ end
+end
+
+def fun_l4_n878(x)
+ if (x < 1)
+ fun_l5_n801(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n879(x)
+ if (x < 1)
+ fun_l5_n964(x)
+ else
+ fun_l5_n790(x)
+ end
+end
+
+def fun_l4_n880(x)
+ if (x < 1)
+ fun_l5_n483(x)
+ else
+ fun_l5_n817(x)
+ end
+end
+
+def fun_l4_n881(x)
+ if (x < 1)
+ fun_l5_n91(x)
+ else
+ fun_l5_n776(x)
+ end
+end
+
+def fun_l4_n882(x)
+ if (x < 1)
+ fun_l5_n8(x)
+ else
+ fun_l5_n726(x)
+ end
+end
+
+def fun_l4_n883(x)
+ if (x < 1)
+ fun_l5_n63(x)
+ else
+ fun_l5_n570(x)
+ end
+end
+
+def fun_l4_n884(x)
+ if (x < 1)
+ fun_l5_n691(x)
+ else
+ fun_l5_n117(x)
+ end
+end
+
+def fun_l4_n885(x)
+ if (x < 1)
+ fun_l5_n262(x)
+ else
+ fun_l5_n38(x)
+ end
+end
+
+def fun_l4_n886(x)
+ if (x < 1)
+ fun_l5_n678(x)
+ else
+ fun_l5_n108(x)
+ end
+end
+
+def fun_l4_n887(x)
+ if (x < 1)
+ fun_l5_n775(x)
+ else
+ fun_l5_n751(x)
+ end
+end
+
+def fun_l4_n888(x)
+ if (x < 1)
+ fun_l5_n917(x)
+ else
+ fun_l5_n769(x)
+ end
+end
+
+def fun_l4_n889(x)
+ if (x < 1)
+ fun_l5_n191(x)
+ else
+ fun_l5_n662(x)
+ end
+end
+
+def fun_l4_n890(x)
+ if (x < 1)
+ fun_l5_n34(x)
+ else
+ fun_l5_n806(x)
+ end
+end
+
+def fun_l4_n891(x)
+ if (x < 1)
+ fun_l5_n705(x)
+ else
+ fun_l5_n198(x)
+ end
+end
+
+def fun_l4_n892(x)
+ if (x < 1)
+ fun_l5_n647(x)
+ else
+ fun_l5_n0(x)
+ end
+end
+
+def fun_l4_n893(x)
+ if (x < 1)
+ fun_l5_n336(x)
+ else
+ fun_l5_n795(x)
+ end
+end
+
+def fun_l4_n894(x)
+ if (x < 1)
+ fun_l5_n984(x)
+ else
+ fun_l5_n751(x)
+ end
+end
+
+def fun_l4_n895(x)
+ if (x < 1)
+ fun_l5_n373(x)
+ else
+ fun_l5_n12(x)
+ end
+end
+
+def fun_l4_n896(x)
+ if (x < 1)
+ fun_l5_n672(x)
+ else
+ fun_l5_n17(x)
+ end
+end
+
+def fun_l4_n897(x)
+ if (x < 1)
+ fun_l5_n67(x)
+ else
+ fun_l5_n183(x)
+ end
+end
+
+def fun_l4_n898(x)
+ if (x < 1)
+ fun_l5_n557(x)
+ else
+ fun_l5_n43(x)
+ end
+end
+
+def fun_l4_n899(x)
+ if (x < 1)
+ fun_l5_n210(x)
+ else
+ fun_l5_n904(x)
+ end
+end
+
+def fun_l4_n900(x)
+ if (x < 1)
+ fun_l5_n665(x)
+ else
+ fun_l5_n173(x)
+ end
+end
+
+def fun_l4_n901(x)
+ if (x < 1)
+ fun_l5_n268(x)
+ else
+ fun_l5_n907(x)
+ end
+end
+
+def fun_l4_n902(x)
+ if (x < 1)
+ fun_l5_n19(x)
+ else
+ fun_l5_n145(x)
+ end
+end
+
+def fun_l4_n903(x)
+ if (x < 1)
+ fun_l5_n158(x)
+ else
+ fun_l5_n261(x)
+ end
+end
+
+def fun_l4_n904(x)
+ if (x < 1)
+ fun_l5_n677(x)
+ else
+ fun_l5_n880(x)
+ end
+end
+
+def fun_l4_n905(x)
+ if (x < 1)
+ fun_l5_n262(x)
+ else
+ fun_l5_n790(x)
+ end
+end
+
+def fun_l4_n906(x)
+ if (x < 1)
+ fun_l5_n775(x)
+ else
+ fun_l5_n785(x)
+ end
+end
+
+def fun_l4_n907(x)
+ if (x < 1)
+ fun_l5_n629(x)
+ else
+ fun_l5_n312(x)
+ end
+end
+
+def fun_l4_n908(x)
+ if (x < 1)
+ fun_l5_n84(x)
+ else
+ fun_l5_n605(x)
+ end
+end
+
+def fun_l4_n909(x)
+ if (x < 1)
+ fun_l5_n346(x)
+ else
+ fun_l5_n245(x)
+ end
+end
+
+def fun_l4_n910(x)
+ if (x < 1)
+ fun_l5_n768(x)
+ else
+ fun_l5_n47(x)
+ end
+end
+
+def fun_l4_n911(x)
+ if (x < 1)
+ fun_l5_n48(x)
+ else
+ fun_l5_n406(x)
+ end
+end
+
+def fun_l4_n912(x)
+ if (x < 1)
+ fun_l5_n493(x)
+ else
+ fun_l5_n608(x)
+ end
+end
+
+def fun_l4_n913(x)
+ if (x < 1)
+ fun_l5_n456(x)
+ else
+ fun_l5_n176(x)
+ end
+end
+
+def fun_l4_n914(x)
+ if (x < 1)
+ fun_l5_n201(x)
+ else
+ fun_l5_n233(x)
+ end
+end
+
+def fun_l4_n915(x)
+ if (x < 1)
+ fun_l5_n910(x)
+ else
+ fun_l5_n790(x)
+ end
+end
+
+def fun_l4_n916(x)
+ if (x < 1)
+ fun_l5_n734(x)
+ else
+ fun_l5_n685(x)
+ end
+end
+
+def fun_l4_n917(x)
+ if (x < 1)
+ fun_l5_n132(x)
+ else
+ fun_l5_n112(x)
+ end
+end
+
+def fun_l4_n918(x)
+ if (x < 1)
+ fun_l5_n897(x)
+ else
+ fun_l5_n196(x)
+ end
+end
+
+def fun_l4_n919(x)
+ if (x < 1)
+ fun_l5_n395(x)
+ else
+ fun_l5_n186(x)
+ end
+end
+
+def fun_l4_n920(x)
+ if (x < 1)
+ fun_l5_n19(x)
+ else
+ fun_l5_n810(x)
+ end
+end
+
+def fun_l4_n921(x)
+ if (x < 1)
+ fun_l5_n546(x)
+ else
+ fun_l5_n34(x)
+ end
+end
+
+def fun_l4_n922(x)
+ if (x < 1)
+ fun_l5_n863(x)
+ else
+ fun_l5_n928(x)
+ end
+end
+
+def fun_l4_n923(x)
+ if (x < 1)
+ fun_l5_n485(x)
+ else
+ fun_l5_n182(x)
+ end
+end
+
+def fun_l4_n924(x)
+ if (x < 1)
+ fun_l5_n303(x)
+ else
+ fun_l5_n17(x)
+ end
+end
+
+def fun_l4_n925(x)
+ if (x < 1)
+ fun_l5_n78(x)
+ else
+ fun_l5_n816(x)
+ end
+end
+
+def fun_l4_n926(x)
+ if (x < 1)
+ fun_l5_n797(x)
+ else
+ fun_l5_n761(x)
+ end
+end
+
+def fun_l4_n927(x)
+ if (x < 1)
+ fun_l5_n975(x)
+ else
+ fun_l5_n220(x)
+ end
+end
+
+def fun_l4_n928(x)
+ if (x < 1)
+ fun_l5_n213(x)
+ else
+ fun_l5_n815(x)
+ end
+end
+
+def fun_l4_n929(x)
+ if (x < 1)
+ fun_l5_n280(x)
+ else
+ fun_l5_n551(x)
+ end
+end
+
+def fun_l4_n930(x)
+ if (x < 1)
+ fun_l5_n631(x)
+ else
+ fun_l5_n629(x)
+ end
+end
+
+def fun_l4_n931(x)
+ if (x < 1)
+ fun_l5_n60(x)
+ else
+ fun_l5_n332(x)
+ end
+end
+
+def fun_l4_n932(x)
+ if (x < 1)
+ fun_l5_n336(x)
+ else
+ fun_l5_n733(x)
+ end
+end
+
+def fun_l4_n933(x)
+ if (x < 1)
+ fun_l5_n94(x)
+ else
+ fun_l5_n48(x)
+ end
+end
+
+def fun_l4_n934(x)
+ if (x < 1)
+ fun_l5_n527(x)
+ else
+ fun_l5_n108(x)
+ end
+end
+
+def fun_l4_n935(x)
+ if (x < 1)
+ fun_l5_n994(x)
+ else
+ fun_l5_n95(x)
+ end
+end
+
+def fun_l4_n936(x)
+ if (x < 1)
+ fun_l5_n631(x)
+ else
+ fun_l5_n310(x)
+ end
+end
+
+def fun_l4_n937(x)
+ if (x < 1)
+ fun_l5_n851(x)
+ else
+ fun_l5_n380(x)
+ end
+end
+
+def fun_l4_n938(x)
+ if (x < 1)
+ fun_l5_n256(x)
+ else
+ fun_l5_n231(x)
+ end
+end
+
+def fun_l4_n939(x)
+ if (x < 1)
+ fun_l5_n686(x)
+ else
+ fun_l5_n557(x)
+ end
+end
+
+def fun_l4_n940(x)
+ if (x < 1)
+ fun_l5_n311(x)
+ else
+ fun_l5_n611(x)
+ end
+end
+
+def fun_l4_n941(x)
+ if (x < 1)
+ fun_l5_n770(x)
+ else
+ fun_l5_n306(x)
+ end
+end
+
+def fun_l4_n942(x)
+ if (x < 1)
+ fun_l5_n649(x)
+ else
+ fun_l5_n60(x)
+ end
+end
+
+def fun_l4_n943(x)
+ if (x < 1)
+ fun_l5_n935(x)
+ else
+ fun_l5_n991(x)
+ end
+end
+
+def fun_l4_n944(x)
+ if (x < 1)
+ fun_l5_n851(x)
+ else
+ fun_l5_n131(x)
+ end
+end
+
+def fun_l4_n945(x)
+ if (x < 1)
+ fun_l5_n422(x)
+ else
+ fun_l5_n309(x)
+ end
+end
+
+def fun_l4_n946(x)
+ if (x < 1)
+ fun_l5_n906(x)
+ else
+ fun_l5_n798(x)
+ end
+end
+
+def fun_l4_n947(x)
+ if (x < 1)
+ fun_l5_n817(x)
+ else
+ fun_l5_n122(x)
+ end
+end
+
+def fun_l4_n948(x)
+ if (x < 1)
+ fun_l5_n233(x)
+ else
+ fun_l5_n600(x)
+ end
+end
+
+def fun_l4_n949(x)
+ if (x < 1)
+ fun_l5_n908(x)
+ else
+ fun_l5_n332(x)
+ end
+end
+
+def fun_l4_n950(x)
+ if (x < 1)
+ fun_l5_n71(x)
+ else
+ fun_l5_n893(x)
+ end
+end
+
+def fun_l4_n951(x)
+ if (x < 1)
+ fun_l5_n281(x)
+ else
+ fun_l5_n281(x)
+ end
+end
+
+def fun_l4_n952(x)
+ if (x < 1)
+ fun_l5_n312(x)
+ else
+ fun_l5_n164(x)
+ end
+end
+
+def fun_l4_n953(x)
+ if (x < 1)
+ fun_l5_n292(x)
+ else
+ fun_l5_n993(x)
+ end
+end
+
+def fun_l4_n954(x)
+ if (x < 1)
+ fun_l5_n271(x)
+ else
+ fun_l5_n635(x)
+ end
+end
+
+def fun_l4_n955(x)
+ if (x < 1)
+ fun_l5_n10(x)
+ else
+ fun_l5_n202(x)
+ end
+end
+
+def fun_l4_n956(x)
+ if (x < 1)
+ fun_l5_n574(x)
+ else
+ fun_l5_n29(x)
+ end
+end
+
+def fun_l4_n957(x)
+ if (x < 1)
+ fun_l5_n154(x)
+ else
+ fun_l5_n96(x)
+ end
+end
+
+def fun_l4_n958(x)
+ if (x < 1)
+ fun_l5_n287(x)
+ else
+ fun_l5_n509(x)
+ end
+end
+
+def fun_l4_n959(x)
+ if (x < 1)
+ fun_l5_n400(x)
+ else
+ fun_l5_n195(x)
+ end
+end
+
+def fun_l4_n960(x)
+ if (x < 1)
+ fun_l5_n94(x)
+ else
+ fun_l5_n165(x)
+ end
+end
+
+def fun_l4_n961(x)
+ if (x < 1)
+ fun_l5_n276(x)
+ else
+ fun_l5_n935(x)
+ end
+end
+
+def fun_l4_n962(x)
+ if (x < 1)
+ fun_l5_n504(x)
+ else
+ fun_l5_n480(x)
+ end
+end
+
+def fun_l4_n963(x)
+ if (x < 1)
+ fun_l5_n152(x)
+ else
+ fun_l5_n397(x)
+ end
+end
+
+def fun_l4_n964(x)
+ if (x < 1)
+ fun_l5_n303(x)
+ else
+ fun_l5_n481(x)
+ end
+end
+
+def fun_l4_n965(x)
+ if (x < 1)
+ fun_l5_n882(x)
+ else
+ fun_l5_n116(x)
+ end
+end
+
+def fun_l4_n966(x)
+ if (x < 1)
+ fun_l5_n329(x)
+ else
+ fun_l5_n484(x)
+ end
+end
+
+def fun_l4_n967(x)
+ if (x < 1)
+ fun_l5_n369(x)
+ else
+ fun_l5_n680(x)
+ end
+end
+
+def fun_l4_n968(x)
+ if (x < 1)
+ fun_l5_n30(x)
+ else
+ fun_l5_n653(x)
+ end
+end
+
+def fun_l4_n969(x)
+ if (x < 1)
+ fun_l5_n292(x)
+ else
+ fun_l5_n793(x)
+ end
+end
+
+def fun_l4_n970(x)
+ if (x < 1)
+ fun_l5_n796(x)
+ else
+ fun_l5_n387(x)
+ end
+end
+
+def fun_l4_n971(x)
+ if (x < 1)
+ fun_l5_n735(x)
+ else
+ fun_l5_n985(x)
+ end
+end
+
+def fun_l4_n972(x)
+ if (x < 1)
+ fun_l5_n925(x)
+ else
+ fun_l5_n689(x)
+ end
+end
+
+def fun_l4_n973(x)
+ if (x < 1)
+ fun_l5_n154(x)
+ else
+ fun_l5_n998(x)
+ end
+end
+
+def fun_l4_n974(x)
+ if (x < 1)
+ fun_l5_n708(x)
+ else
+ fun_l5_n253(x)
+ end
+end
+
+def fun_l4_n975(x)
+ if (x < 1)
+ fun_l5_n716(x)
+ else
+ fun_l5_n958(x)
+ end
+end
+
+def fun_l4_n976(x)
+ if (x < 1)
+ fun_l5_n488(x)
+ else
+ fun_l5_n299(x)
+ end
+end
+
+def fun_l4_n977(x)
+ if (x < 1)
+ fun_l5_n872(x)
+ else
+ fun_l5_n276(x)
+ end
+end
+
+def fun_l4_n978(x)
+ if (x < 1)
+ fun_l5_n219(x)
+ else
+ fun_l5_n76(x)
+ end
+end
+
+def fun_l4_n979(x)
+ if (x < 1)
+ fun_l5_n937(x)
+ else
+ fun_l5_n988(x)
+ end
+end
+
+def fun_l4_n980(x)
+ if (x < 1)
+ fun_l5_n681(x)
+ else
+ fun_l5_n264(x)
+ end
+end
+
+def fun_l4_n981(x)
+ if (x < 1)
+ fun_l5_n630(x)
+ else
+ fun_l5_n18(x)
+ end
+end
+
+def fun_l4_n982(x)
+ if (x < 1)
+ fun_l5_n910(x)
+ else
+ fun_l5_n97(x)
+ end
+end
+
+def fun_l4_n983(x)
+ if (x < 1)
+ fun_l5_n551(x)
+ else
+ fun_l5_n429(x)
+ end
+end
+
+def fun_l4_n984(x)
+ if (x < 1)
+ fun_l5_n304(x)
+ else
+ fun_l5_n192(x)
+ end
+end
+
+def fun_l4_n985(x)
+ if (x < 1)
+ fun_l5_n696(x)
+ else
+ fun_l5_n124(x)
+ end
+end
+
+def fun_l4_n986(x)
+ if (x < 1)
+ fun_l5_n603(x)
+ else
+ fun_l5_n967(x)
+ end
+end
+
+def fun_l4_n987(x)
+ if (x < 1)
+ fun_l5_n317(x)
+ else
+ fun_l5_n785(x)
+ end
+end
+
+def fun_l4_n988(x)
+ if (x < 1)
+ fun_l5_n762(x)
+ else
+ fun_l5_n999(x)
+ end
+end
+
+def fun_l4_n989(x)
+ if (x < 1)
+ fun_l5_n61(x)
+ else
+ fun_l5_n474(x)
+ end
+end
+
+def fun_l4_n990(x)
+ if (x < 1)
+ fun_l5_n465(x)
+ else
+ fun_l5_n878(x)
+ end
+end
+
+def fun_l4_n991(x)
+ if (x < 1)
+ fun_l5_n907(x)
+ else
+ fun_l5_n259(x)
+ end
+end
+
+def fun_l4_n992(x)
+ if (x < 1)
+ fun_l5_n594(x)
+ else
+ fun_l5_n378(x)
+ end
+end
+
+def fun_l4_n993(x)
+ if (x < 1)
+ fun_l5_n202(x)
+ else
+ fun_l5_n490(x)
+ end
+end
+
+def fun_l4_n994(x)
+ if (x < 1)
+ fun_l5_n105(x)
+ else
+ fun_l5_n675(x)
+ end
+end
+
+def fun_l4_n995(x)
+ if (x < 1)
+ fun_l5_n99(x)
+ else
+ fun_l5_n21(x)
+ end
+end
+
+def fun_l4_n996(x)
+ if (x < 1)
+ fun_l5_n831(x)
+ else
+ fun_l5_n692(x)
+ end
+end
+
+def fun_l4_n997(x)
+ if (x < 1)
+ fun_l5_n186(x)
+ else
+ fun_l5_n427(x)
+ end
+end
+
+def fun_l4_n998(x)
+ if (x < 1)
+ fun_l5_n597(x)
+ else
+ fun_l5_n978(x)
+ end
+end
+
+def fun_l4_n999(x)
+ if (x < 1)
+ fun_l5_n537(x)
+ else
+ fun_l5_n952(x)
+ end
+end
+
+def fun_l5_n0(x)
+ if (x < 1)
+ fun_l6_n104(x)
+ else
+ fun_l6_n249(x)
+ end
+end
+
+def fun_l5_n1(x)
+ if (x < 1)
+ fun_l6_n260(x)
+ else
+ fun_l6_n782(x)
+ end
+end
+
+def fun_l5_n2(x)
+ if (x < 1)
+ fun_l6_n974(x)
+ else
+ fun_l6_n301(x)
+ end
+end
+
+def fun_l5_n3(x)
+ if (x < 1)
+ fun_l6_n883(x)
+ else
+ fun_l6_n149(x)
+ end
+end
+
+def fun_l5_n4(x)
+ if (x < 1)
+ fun_l6_n134(x)
+ else
+ fun_l6_n111(x)
+ end
+end
+
+def fun_l5_n5(x)
+ if (x < 1)
+ fun_l6_n573(x)
+ else
+ fun_l6_n273(x)
+ end
+end
+
+def fun_l5_n6(x)
+ if (x < 1)
+ fun_l6_n221(x)
+ else
+ fun_l6_n843(x)
+ end
+end
+
+def fun_l5_n7(x)
+ if (x < 1)
+ fun_l6_n572(x)
+ else
+ fun_l6_n435(x)
+ end
+end
+
+def fun_l5_n8(x)
+ if (x < 1)
+ fun_l6_n43(x)
+ else
+ fun_l6_n598(x)
+ end
+end
+
+def fun_l5_n9(x)
+ if (x < 1)
+ fun_l6_n352(x)
+ else
+ fun_l6_n894(x)
+ end
+end
+
+def fun_l5_n10(x)
+ if (x < 1)
+ fun_l6_n161(x)
+ else
+ fun_l6_n654(x)
+ end
+end
+
+def fun_l5_n11(x)
+ if (x < 1)
+ fun_l6_n432(x)
+ else
+ fun_l6_n825(x)
+ end
+end
+
+def fun_l5_n12(x)
+ if (x < 1)
+ fun_l6_n863(x)
+ else
+ fun_l6_n940(x)
+ end
+end
+
+def fun_l5_n13(x)
+ if (x < 1)
+ fun_l6_n478(x)
+ else
+ fun_l6_n193(x)
+ end
+end
+
+def fun_l5_n14(x)
+ if (x < 1)
+ fun_l6_n327(x)
+ else
+ fun_l6_n808(x)
+ end
+end
+
+def fun_l5_n15(x)
+ if (x < 1)
+ fun_l6_n86(x)
+ else
+ fun_l6_n951(x)
+ end
+end
+
+def fun_l5_n16(x)
+ if (x < 1)
+ fun_l6_n492(x)
+ else
+ fun_l6_n704(x)
+ end
+end
+
+def fun_l5_n17(x)
+ if (x < 1)
+ fun_l6_n196(x)
+ else
+ fun_l6_n970(x)
+ end
+end
+
+def fun_l5_n18(x)
+ if (x < 1)
+ fun_l6_n325(x)
+ else
+ fun_l6_n30(x)
+ end
+end
+
+def fun_l5_n19(x)
+ if (x < 1)
+ fun_l6_n559(x)
+ else
+ fun_l6_n269(x)
+ end
+end
+
+def fun_l5_n20(x)
+ if (x < 1)
+ fun_l6_n716(x)
+ else
+ fun_l6_n783(x)
+ end
+end
+
+def fun_l5_n21(x)
+ if (x < 1)
+ fun_l6_n978(x)
+ else
+ fun_l6_n306(x)
+ end
+end
+
+def fun_l5_n22(x)
+ if (x < 1)
+ fun_l6_n220(x)
+ else
+ fun_l6_n823(x)
+ end
+end
+
+def fun_l5_n23(x)
+ if (x < 1)
+ fun_l6_n675(x)
+ else
+ fun_l6_n684(x)
+ end
+end
+
+def fun_l5_n24(x)
+ if (x < 1)
+ fun_l6_n851(x)
+ else
+ fun_l6_n450(x)
+ end
+end
+
+def fun_l5_n25(x)
+ if (x < 1)
+ fun_l6_n745(x)
+ else
+ fun_l6_n370(x)
+ end
+end
+
+def fun_l5_n26(x)
+ if (x < 1)
+ fun_l6_n431(x)
+ else
+ fun_l6_n130(x)
+ end
+end
+
+def fun_l5_n27(x)
+ if (x < 1)
+ fun_l6_n105(x)
+ else
+ fun_l6_n205(x)
+ end
+end
+
+def fun_l5_n28(x)
+ if (x < 1)
+ fun_l6_n718(x)
+ else
+ fun_l6_n742(x)
+ end
+end
+
+def fun_l5_n29(x)
+ if (x < 1)
+ fun_l6_n977(x)
+ else
+ fun_l6_n63(x)
+ end
+end
+
+def fun_l5_n30(x)
+ if (x < 1)
+ fun_l6_n902(x)
+ else
+ fun_l6_n471(x)
+ end
+end
+
+def fun_l5_n31(x)
+ if (x < 1)
+ fun_l6_n76(x)
+ else
+ fun_l6_n960(x)
+ end
+end
+
+def fun_l5_n32(x)
+ if (x < 1)
+ fun_l6_n75(x)
+ else
+ fun_l6_n640(x)
+ end
+end
+
+def fun_l5_n33(x)
+ if (x < 1)
+ fun_l6_n631(x)
+ else
+ fun_l6_n769(x)
+ end
+end
+
+def fun_l5_n34(x)
+ if (x < 1)
+ fun_l6_n201(x)
+ else
+ fun_l6_n771(x)
+ end
+end
+
+def fun_l5_n35(x)
+ if (x < 1)
+ fun_l6_n734(x)
+ else
+ fun_l6_n370(x)
+ end
+end
+
+def fun_l5_n36(x)
+ if (x < 1)
+ fun_l6_n490(x)
+ else
+ fun_l6_n994(x)
+ end
+end
+
+def fun_l5_n37(x)
+ if (x < 1)
+ fun_l6_n566(x)
+ else
+ fun_l6_n392(x)
+ end
+end
+
+def fun_l5_n38(x)
+ if (x < 1)
+ fun_l6_n120(x)
+ else
+ fun_l6_n774(x)
+ end
+end
+
+def fun_l5_n39(x)
+ if (x < 1)
+ fun_l6_n402(x)
+ else
+ fun_l6_n572(x)
+ end
+end
+
+def fun_l5_n40(x)
+ if (x < 1)
+ fun_l6_n911(x)
+ else
+ fun_l6_n968(x)
+ end
+end
+
+def fun_l5_n41(x)
+ if (x < 1)
+ fun_l6_n200(x)
+ else
+ fun_l6_n656(x)
+ end
+end
+
+def fun_l5_n42(x)
+ if (x < 1)
+ fun_l6_n59(x)
+ else
+ fun_l6_n426(x)
+ end
+end
+
+def fun_l5_n43(x)
+ if (x < 1)
+ fun_l6_n650(x)
+ else
+ fun_l6_n932(x)
+ end
+end
+
+def fun_l5_n44(x)
+ if (x < 1)
+ fun_l6_n365(x)
+ else
+ fun_l6_n755(x)
+ end
+end
+
+def fun_l5_n45(x)
+ if (x < 1)
+ fun_l6_n738(x)
+ else
+ fun_l6_n432(x)
+ end
+end
+
+def fun_l5_n46(x)
+ if (x < 1)
+ fun_l6_n82(x)
+ else
+ fun_l6_n484(x)
+ end
+end
+
+def fun_l5_n47(x)
+ if (x < 1)
+ fun_l6_n64(x)
+ else
+ fun_l6_n610(x)
+ end
+end
+
+def fun_l5_n48(x)
+ if (x < 1)
+ fun_l6_n875(x)
+ else
+ fun_l6_n464(x)
+ end
+end
+
+def fun_l5_n49(x)
+ if (x < 1)
+ fun_l6_n798(x)
+ else
+ fun_l6_n57(x)
+ end
+end
+
+def fun_l5_n50(x)
+ if (x < 1)
+ fun_l6_n76(x)
+ else
+ fun_l6_n462(x)
+ end
+end
+
+def fun_l5_n51(x)
+ if (x < 1)
+ fun_l6_n225(x)
+ else
+ fun_l6_n526(x)
+ end
+end
+
+def fun_l5_n52(x)
+ if (x < 1)
+ fun_l6_n388(x)
+ else
+ fun_l6_n167(x)
+ end
+end
+
+def fun_l5_n53(x)
+ if (x < 1)
+ fun_l6_n270(x)
+ else
+ fun_l6_n821(x)
+ end
+end
+
+def fun_l5_n54(x)
+ if (x < 1)
+ fun_l6_n790(x)
+ else
+ fun_l6_n95(x)
+ end
+end
+
+def fun_l5_n55(x)
+ if (x < 1)
+ fun_l6_n38(x)
+ else
+ fun_l6_n32(x)
+ end
+end
+
+def fun_l5_n56(x)
+ if (x < 1)
+ fun_l6_n400(x)
+ else
+ fun_l6_n513(x)
+ end
+end
+
+def fun_l5_n57(x)
+ if (x < 1)
+ fun_l6_n251(x)
+ else
+ fun_l6_n16(x)
+ end
+end
+
+def fun_l5_n58(x)
+ if (x < 1)
+ fun_l6_n303(x)
+ else
+ fun_l6_n858(x)
+ end
+end
+
+def fun_l5_n59(x)
+ if (x < 1)
+ fun_l6_n173(x)
+ else
+ fun_l6_n38(x)
+ end
+end
+
+def fun_l5_n60(x)
+ if (x < 1)
+ fun_l6_n466(x)
+ else
+ fun_l6_n64(x)
+ end
+end
+
+def fun_l5_n61(x)
+ if (x < 1)
+ fun_l6_n687(x)
+ else
+ fun_l6_n208(x)
+ end
+end
+
+def fun_l5_n62(x)
+ if (x < 1)
+ fun_l6_n891(x)
+ else
+ fun_l6_n789(x)
+ end
+end
+
+def fun_l5_n63(x)
+ if (x < 1)
+ fun_l6_n664(x)
+ else
+ fun_l6_n133(x)
+ end
+end
+
+def fun_l5_n64(x)
+ if (x < 1)
+ fun_l6_n121(x)
+ else
+ fun_l6_n989(x)
+ end
+end
+
+def fun_l5_n65(x)
+ if (x < 1)
+ fun_l6_n411(x)
+ else
+ fun_l6_n264(x)
+ end
+end
+
+def fun_l5_n66(x)
+ if (x < 1)
+ fun_l6_n528(x)
+ else
+ fun_l6_n662(x)
+ end
+end
+
+def fun_l5_n67(x)
+ if (x < 1)
+ fun_l6_n824(x)
+ else
+ fun_l6_n410(x)
+ end
+end
+
+def fun_l5_n68(x)
+ if (x < 1)
+ fun_l6_n29(x)
+ else
+ fun_l6_n946(x)
+ end
+end
+
+def fun_l5_n69(x)
+ if (x < 1)
+ fun_l6_n566(x)
+ else
+ fun_l6_n797(x)
+ end
+end
+
+def fun_l5_n70(x)
+ if (x < 1)
+ fun_l6_n816(x)
+ else
+ fun_l6_n112(x)
+ end
+end
+
+def fun_l5_n71(x)
+ if (x < 1)
+ fun_l6_n920(x)
+ else
+ fun_l6_n44(x)
+ end
+end
+
+def fun_l5_n72(x)
+ if (x < 1)
+ fun_l6_n725(x)
+ else
+ fun_l6_n113(x)
+ end
+end
+
+def fun_l5_n73(x)
+ if (x < 1)
+ fun_l6_n406(x)
+ else
+ fun_l6_n555(x)
+ end
+end
+
+def fun_l5_n74(x)
+ if (x < 1)
+ fun_l6_n527(x)
+ else
+ fun_l6_n991(x)
+ end
+end
+
+def fun_l5_n75(x)
+ if (x < 1)
+ fun_l6_n46(x)
+ else
+ fun_l6_n440(x)
+ end
+end
+
+def fun_l5_n76(x)
+ if (x < 1)
+ fun_l6_n242(x)
+ else
+ fun_l6_n488(x)
+ end
+end
+
+def fun_l5_n77(x)
+ if (x < 1)
+ fun_l6_n211(x)
+ else
+ fun_l6_n760(x)
+ end
+end
+
+def fun_l5_n78(x)
+ if (x < 1)
+ fun_l6_n821(x)
+ else
+ fun_l6_n653(x)
+ end
+end
+
+def fun_l5_n79(x)
+ if (x < 1)
+ fun_l6_n559(x)
+ else
+ fun_l6_n425(x)
+ end
+end
+
+def fun_l5_n80(x)
+ if (x < 1)
+ fun_l6_n792(x)
+ else
+ fun_l6_n813(x)
+ end
+end
+
+def fun_l5_n81(x)
+ if (x < 1)
+ fun_l6_n463(x)
+ else
+ fun_l6_n454(x)
+ end
+end
+
+def fun_l5_n82(x)
+ if (x < 1)
+ fun_l6_n731(x)
+ else
+ fun_l6_n718(x)
+ end
+end
+
+def fun_l5_n83(x)
+ if (x < 1)
+ fun_l6_n377(x)
+ else
+ fun_l6_n137(x)
+ end
+end
+
+def fun_l5_n84(x)
+ if (x < 1)
+ fun_l6_n829(x)
+ else
+ fun_l6_n77(x)
+ end
+end
+
+def fun_l5_n85(x)
+ if (x < 1)
+ fun_l6_n714(x)
+ else
+ fun_l6_n682(x)
+ end
+end
+
+def fun_l5_n86(x)
+ if (x < 1)
+ fun_l6_n47(x)
+ else
+ fun_l6_n527(x)
+ end
+end
+
+def fun_l5_n87(x)
+ if (x < 1)
+ fun_l6_n976(x)
+ else
+ fun_l6_n18(x)
+ end
+end
+
+def fun_l5_n88(x)
+ if (x < 1)
+ fun_l6_n710(x)
+ else
+ fun_l6_n998(x)
+ end
+end
+
+def fun_l5_n89(x)
+ if (x < 1)
+ fun_l6_n222(x)
+ else
+ fun_l6_n97(x)
+ end
+end
+
+def fun_l5_n90(x)
+ if (x < 1)
+ fun_l6_n862(x)
+ else
+ fun_l6_n627(x)
+ end
+end
+
+def fun_l5_n91(x)
+ if (x < 1)
+ fun_l6_n642(x)
+ else
+ fun_l6_n720(x)
+ end
+end
+
+def fun_l5_n92(x)
+ if (x < 1)
+ fun_l6_n444(x)
+ else
+ fun_l6_n506(x)
+ end
+end
+
+def fun_l5_n93(x)
+ if (x < 1)
+ fun_l6_n776(x)
+ else
+ fun_l6_n879(x)
+ end
+end
+
+def fun_l5_n94(x)
+ if (x < 1)
+ fun_l6_n629(x)
+ else
+ fun_l6_n322(x)
+ end
+end
+
+def fun_l5_n95(x)
+ if (x < 1)
+ fun_l6_n119(x)
+ else
+ fun_l6_n134(x)
+ end
+end
+
+def fun_l5_n96(x)
+ if (x < 1)
+ fun_l6_n385(x)
+ else
+ fun_l6_n343(x)
+ end
+end
+
+def fun_l5_n97(x)
+ if (x < 1)
+ fun_l6_n110(x)
+ else
+ fun_l6_n323(x)
+ end
+end
+
+def fun_l5_n98(x)
+ if (x < 1)
+ fun_l6_n547(x)
+ else
+ fun_l6_n762(x)
+ end
+end
+
+def fun_l5_n99(x)
+ if (x < 1)
+ fun_l6_n811(x)
+ else
+ fun_l6_n404(x)
+ end
+end
+
+def fun_l5_n100(x)
+ if (x < 1)
+ fun_l6_n893(x)
+ else
+ fun_l6_n120(x)
+ end
+end
+
+def fun_l5_n101(x)
+ if (x < 1)
+ fun_l6_n755(x)
+ else
+ fun_l6_n611(x)
+ end
+end
+
+def fun_l5_n102(x)
+ if (x < 1)
+ fun_l6_n65(x)
+ else
+ fun_l6_n897(x)
+ end
+end
+
+def fun_l5_n103(x)
+ if (x < 1)
+ fun_l6_n629(x)
+ else
+ fun_l6_n214(x)
+ end
+end
+
+def fun_l5_n104(x)
+ if (x < 1)
+ fun_l6_n211(x)
+ else
+ fun_l6_n179(x)
+ end
+end
+
+def fun_l5_n105(x)
+ if (x < 1)
+ fun_l6_n650(x)
+ else
+ fun_l6_n348(x)
+ end
+end
+
+def fun_l5_n106(x)
+ if (x < 1)
+ fun_l6_n966(x)
+ else
+ fun_l6_n654(x)
+ end
+end
+
+def fun_l5_n107(x)
+ if (x < 1)
+ fun_l6_n596(x)
+ else
+ fun_l6_n668(x)
+ end
+end
+
+def fun_l5_n108(x)
+ if (x < 1)
+ fun_l6_n392(x)
+ else
+ fun_l6_n629(x)
+ end
+end
+
+def fun_l5_n109(x)
+ if (x < 1)
+ fun_l6_n96(x)
+ else
+ fun_l6_n578(x)
+ end
+end
+
+def fun_l5_n110(x)
+ if (x < 1)
+ fun_l6_n88(x)
+ else
+ fun_l6_n214(x)
+ end
+end
+
+def fun_l5_n111(x)
+ if (x < 1)
+ fun_l6_n622(x)
+ else
+ fun_l6_n180(x)
+ end
+end
+
+def fun_l5_n112(x)
+ if (x < 1)
+ fun_l6_n100(x)
+ else
+ fun_l6_n373(x)
+ end
+end
+
+def fun_l5_n113(x)
+ if (x < 1)
+ fun_l6_n464(x)
+ else
+ fun_l6_n30(x)
+ end
+end
+
+def fun_l5_n114(x)
+ if (x < 1)
+ fun_l6_n703(x)
+ else
+ fun_l6_n116(x)
+ end
+end
+
+def fun_l5_n115(x)
+ if (x < 1)
+ fun_l6_n63(x)
+ else
+ fun_l6_n260(x)
+ end
+end
+
+def fun_l5_n116(x)
+ if (x < 1)
+ fun_l6_n935(x)
+ else
+ fun_l6_n951(x)
+ end
+end
+
+def fun_l5_n117(x)
+ if (x < 1)
+ fun_l6_n415(x)
+ else
+ fun_l6_n734(x)
+ end
+end
+
+def fun_l5_n118(x)
+ if (x < 1)
+ fun_l6_n873(x)
+ else
+ fun_l6_n163(x)
+ end
+end
+
+def fun_l5_n119(x)
+ if (x < 1)
+ fun_l6_n134(x)
+ else
+ fun_l6_n586(x)
+ end
+end
+
+def fun_l5_n120(x)
+ if (x < 1)
+ fun_l6_n793(x)
+ else
+ fun_l6_n197(x)
+ end
+end
+
+def fun_l5_n121(x)
+ if (x < 1)
+ fun_l6_n585(x)
+ else
+ fun_l6_n793(x)
+ end
+end
+
+def fun_l5_n122(x)
+ if (x < 1)
+ fun_l6_n10(x)
+ else
+ fun_l6_n12(x)
+ end
+end
+
+def fun_l5_n123(x)
+ if (x < 1)
+ fun_l6_n786(x)
+ else
+ fun_l6_n386(x)
+ end
+end
+
+def fun_l5_n124(x)
+ if (x < 1)
+ fun_l6_n891(x)
+ else
+ fun_l6_n903(x)
+ end
+end
+
+def fun_l5_n125(x)
+ if (x < 1)
+ fun_l6_n389(x)
+ else
+ fun_l6_n154(x)
+ end
+end
+
+def fun_l5_n126(x)
+ if (x < 1)
+ fun_l6_n214(x)
+ else
+ fun_l6_n754(x)
+ end
+end
+
+def fun_l5_n127(x)
+ if (x < 1)
+ fun_l6_n646(x)
+ else
+ fun_l6_n661(x)
+ end
+end
+
+def fun_l5_n128(x)
+ if (x < 1)
+ fun_l6_n662(x)
+ else
+ fun_l6_n527(x)
+ end
+end
+
+def fun_l5_n129(x)
+ if (x < 1)
+ fun_l6_n329(x)
+ else
+ fun_l6_n310(x)
+ end
+end
+
+def fun_l5_n130(x)
+ if (x < 1)
+ fun_l6_n352(x)
+ else
+ fun_l6_n820(x)
+ end
+end
+
+def fun_l5_n131(x)
+ if (x < 1)
+ fun_l6_n551(x)
+ else
+ fun_l6_n454(x)
+ end
+end
+
+def fun_l5_n132(x)
+ if (x < 1)
+ fun_l6_n586(x)
+ else
+ fun_l6_n340(x)
+ end
+end
+
+def fun_l5_n133(x)
+ if (x < 1)
+ fun_l6_n111(x)
+ else
+ fun_l6_n188(x)
+ end
+end
+
+def fun_l5_n134(x)
+ if (x < 1)
+ fun_l6_n261(x)
+ else
+ fun_l6_n464(x)
+ end
+end
+
+def fun_l5_n135(x)
+ if (x < 1)
+ fun_l6_n540(x)
+ else
+ fun_l6_n854(x)
+ end
+end
+
+def fun_l5_n136(x)
+ if (x < 1)
+ fun_l6_n120(x)
+ else
+ fun_l6_n230(x)
+ end
+end
+
+def fun_l5_n137(x)
+ if (x < 1)
+ fun_l6_n837(x)
+ else
+ fun_l6_n606(x)
+ end
+end
+
+def fun_l5_n138(x)
+ if (x < 1)
+ fun_l6_n663(x)
+ else
+ fun_l6_n195(x)
+ end
+end
+
+def fun_l5_n139(x)
+ if (x < 1)
+ fun_l6_n572(x)
+ else
+ fun_l6_n768(x)
+ end
+end
+
+def fun_l5_n140(x)
+ if (x < 1)
+ fun_l6_n747(x)
+ else
+ fun_l6_n304(x)
+ end
+end
+
+def fun_l5_n141(x)
+ if (x < 1)
+ fun_l6_n927(x)
+ else
+ fun_l6_n122(x)
+ end
+end
+
+def fun_l5_n142(x)
+ if (x < 1)
+ fun_l6_n311(x)
+ else
+ fun_l6_n920(x)
+ end
+end
+
+def fun_l5_n143(x)
+ if (x < 1)
+ fun_l6_n887(x)
+ else
+ fun_l6_n598(x)
+ end
+end
+
+def fun_l5_n144(x)
+ if (x < 1)
+ fun_l6_n289(x)
+ else
+ fun_l6_n894(x)
+ end
+end
+
+def fun_l5_n145(x)
+ if (x < 1)
+ fun_l6_n333(x)
+ else
+ fun_l6_n385(x)
+ end
+end
+
+def fun_l5_n146(x)
+ if (x < 1)
+ fun_l6_n926(x)
+ else
+ fun_l6_n310(x)
+ end
+end
+
+def fun_l5_n147(x)
+ if (x < 1)
+ fun_l6_n754(x)
+ else
+ fun_l6_n354(x)
+ end
+end
+
+def fun_l5_n148(x)
+ if (x < 1)
+ fun_l6_n800(x)
+ else
+ fun_l6_n634(x)
+ end
+end
+
+def fun_l5_n149(x)
+ if (x < 1)
+ fun_l6_n5(x)
+ else
+ fun_l6_n67(x)
+ end
+end
+
+def fun_l5_n150(x)
+ if (x < 1)
+ fun_l6_n766(x)
+ else
+ fun_l6_n237(x)
+ end
+end
+
+def fun_l5_n151(x)
+ if (x < 1)
+ fun_l6_n277(x)
+ else
+ fun_l6_n692(x)
+ end
+end
+
+def fun_l5_n152(x)
+ if (x < 1)
+ fun_l6_n328(x)
+ else
+ fun_l6_n216(x)
+ end
+end
+
+def fun_l5_n153(x)
+ if (x < 1)
+ fun_l6_n328(x)
+ else
+ fun_l6_n165(x)
+ end
+end
+
+def fun_l5_n154(x)
+ if (x < 1)
+ fun_l6_n884(x)
+ else
+ fun_l6_n811(x)
+ end
+end
+
+def fun_l5_n155(x)
+ if (x < 1)
+ fun_l6_n376(x)
+ else
+ fun_l6_n188(x)
+ end
+end
+
+def fun_l5_n156(x)
+ if (x < 1)
+ fun_l6_n276(x)
+ else
+ fun_l6_n19(x)
+ end
+end
+
+def fun_l5_n157(x)
+ if (x < 1)
+ fun_l6_n443(x)
+ else
+ fun_l6_n815(x)
+ end
+end
+
+def fun_l5_n158(x)
+ if (x < 1)
+ fun_l6_n610(x)
+ else
+ fun_l6_n341(x)
+ end
+end
+
+def fun_l5_n159(x)
+ if (x < 1)
+ fun_l6_n147(x)
+ else
+ fun_l6_n289(x)
+ end
+end
+
+def fun_l5_n160(x)
+ if (x < 1)
+ fun_l6_n258(x)
+ else
+ fun_l6_n683(x)
+ end
+end
+
+def fun_l5_n161(x)
+ if (x < 1)
+ fun_l6_n544(x)
+ else
+ fun_l6_n621(x)
+ end
+end
+
+def fun_l5_n162(x)
+ if (x < 1)
+ fun_l6_n119(x)
+ else
+ fun_l6_n336(x)
+ end
+end
+
+def fun_l5_n163(x)
+ if (x < 1)
+ fun_l6_n297(x)
+ else
+ fun_l6_n915(x)
+ end
+end
+
+def fun_l5_n164(x)
+ if (x < 1)
+ fun_l6_n782(x)
+ else
+ fun_l6_n499(x)
+ end
+end
+
+def fun_l5_n165(x)
+ if (x < 1)
+ fun_l6_n660(x)
+ else
+ fun_l6_n227(x)
+ end
+end
+
+def fun_l5_n166(x)
+ if (x < 1)
+ fun_l6_n820(x)
+ else
+ fun_l6_n822(x)
+ end
+end
+
+def fun_l5_n167(x)
+ if (x < 1)
+ fun_l6_n878(x)
+ else
+ fun_l6_n642(x)
+ end
+end
+
+def fun_l5_n168(x)
+ if (x < 1)
+ fun_l6_n123(x)
+ else
+ fun_l6_n451(x)
+ end
+end
+
+def fun_l5_n169(x)
+ if (x < 1)
+ fun_l6_n741(x)
+ else
+ fun_l6_n35(x)
+ end
+end
+
+def fun_l5_n170(x)
+ if (x < 1)
+ fun_l6_n522(x)
+ else
+ fun_l6_n546(x)
+ end
+end
+
+def fun_l5_n171(x)
+ if (x < 1)
+ fun_l6_n555(x)
+ else
+ fun_l6_n667(x)
+ end
+end
+
+def fun_l5_n172(x)
+ if (x < 1)
+ fun_l6_n760(x)
+ else
+ fun_l6_n292(x)
+ end
+end
+
+def fun_l5_n173(x)
+ if (x < 1)
+ fun_l6_n375(x)
+ else
+ fun_l6_n907(x)
+ end
+end
+
+def fun_l5_n174(x)
+ if (x < 1)
+ fun_l6_n382(x)
+ else
+ fun_l6_n693(x)
+ end
+end
+
+def fun_l5_n175(x)
+ if (x < 1)
+ fun_l6_n728(x)
+ else
+ fun_l6_n378(x)
+ end
+end
+
+def fun_l5_n176(x)
+ if (x < 1)
+ fun_l6_n79(x)
+ else
+ fun_l6_n402(x)
+ end
+end
+
+def fun_l5_n177(x)
+ if (x < 1)
+ fun_l6_n444(x)
+ else
+ fun_l6_n500(x)
+ end
+end
+
+def fun_l5_n178(x)
+ if (x < 1)
+ fun_l6_n535(x)
+ else
+ fun_l6_n754(x)
+ end
+end
+
+def fun_l5_n179(x)
+ if (x < 1)
+ fun_l6_n831(x)
+ else
+ fun_l6_n206(x)
+ end
+end
+
+def fun_l5_n180(x)
+ if (x < 1)
+ fun_l6_n878(x)
+ else
+ fun_l6_n715(x)
+ end
+end
+
+def fun_l5_n181(x)
+ if (x < 1)
+ fun_l6_n433(x)
+ else
+ fun_l6_n955(x)
+ end
+end
+
+def fun_l5_n182(x)
+ if (x < 1)
+ fun_l6_n611(x)
+ else
+ fun_l6_n258(x)
+ end
+end
+
+def fun_l5_n183(x)
+ if (x < 1)
+ fun_l6_n618(x)
+ else
+ fun_l6_n29(x)
+ end
+end
+
+def fun_l5_n184(x)
+ if (x < 1)
+ fun_l6_n838(x)
+ else
+ fun_l6_n918(x)
+ end
+end
+
+def fun_l5_n185(x)
+ if (x < 1)
+ fun_l6_n307(x)
+ else
+ fun_l6_n811(x)
+ end
+end
+
+def fun_l5_n186(x)
+ if (x < 1)
+ fun_l6_n564(x)
+ else
+ fun_l6_n73(x)
+ end
+end
+
+def fun_l5_n187(x)
+ if (x < 1)
+ fun_l6_n871(x)
+ else
+ fun_l6_n669(x)
+ end
+end
+
+def fun_l5_n188(x)
+ if (x < 1)
+ fun_l6_n546(x)
+ else
+ fun_l6_n41(x)
+ end
+end
+
+def fun_l5_n189(x)
+ if (x < 1)
+ fun_l6_n312(x)
+ else
+ fun_l6_n998(x)
+ end
+end
+
+def fun_l5_n190(x)
+ if (x < 1)
+ fun_l6_n519(x)
+ else
+ fun_l6_n275(x)
+ end
+end
+
+def fun_l5_n191(x)
+ if (x < 1)
+ fun_l6_n525(x)
+ else
+ fun_l6_n228(x)
+ end
+end
+
+def fun_l5_n192(x)
+ if (x < 1)
+ fun_l6_n115(x)
+ else
+ fun_l6_n790(x)
+ end
+end
+
+def fun_l5_n193(x)
+ if (x < 1)
+ fun_l6_n976(x)
+ else
+ fun_l6_n219(x)
+ end
+end
+
+def fun_l5_n194(x)
+ if (x < 1)
+ fun_l6_n785(x)
+ else
+ fun_l6_n834(x)
+ end
+end
+
+def fun_l5_n195(x)
+ if (x < 1)
+ fun_l6_n238(x)
+ else
+ fun_l6_n471(x)
+ end
+end
+
+def fun_l5_n196(x)
+ if (x < 1)
+ fun_l6_n275(x)
+ else
+ fun_l6_n218(x)
+ end
+end
+
+def fun_l5_n197(x)
+ if (x < 1)
+ fun_l6_n590(x)
+ else
+ fun_l6_n458(x)
+ end
+end
+
+def fun_l5_n198(x)
+ if (x < 1)
+ fun_l6_n498(x)
+ else
+ fun_l6_n906(x)
+ end
+end
+
+def fun_l5_n199(x)
+ if (x < 1)
+ fun_l6_n547(x)
+ else
+ fun_l6_n885(x)
+ end
+end
+
+def fun_l5_n200(x)
+ if (x < 1)
+ fun_l6_n631(x)
+ else
+ fun_l6_n0(x)
+ end
+end
+
+def fun_l5_n201(x)
+ if (x < 1)
+ fun_l6_n31(x)
+ else
+ fun_l6_n729(x)
+ end
+end
+
+def fun_l5_n202(x)
+ if (x < 1)
+ fun_l6_n303(x)
+ else
+ fun_l6_n847(x)
+ end
+end
+
+def fun_l5_n203(x)
+ if (x < 1)
+ fun_l6_n912(x)
+ else
+ fun_l6_n346(x)
+ end
+end
+
+def fun_l5_n204(x)
+ if (x < 1)
+ fun_l6_n153(x)
+ else
+ fun_l6_n831(x)
+ end
+end
+
+def fun_l5_n205(x)
+ if (x < 1)
+ fun_l6_n424(x)
+ else
+ fun_l6_n836(x)
+ end
+end
+
+def fun_l5_n206(x)
+ if (x < 1)
+ fun_l6_n214(x)
+ else
+ fun_l6_n207(x)
+ end
+end
+
+def fun_l5_n207(x)
+ if (x < 1)
+ fun_l6_n362(x)
+ else
+ fun_l6_n241(x)
+ end
+end
+
+def fun_l5_n208(x)
+ if (x < 1)
+ fun_l6_n796(x)
+ else
+ fun_l6_n763(x)
+ end
+end
+
+def fun_l5_n209(x)
+ if (x < 1)
+ fun_l6_n523(x)
+ else
+ fun_l6_n998(x)
+ end
+end
+
+def fun_l5_n210(x)
+ if (x < 1)
+ fun_l6_n326(x)
+ else
+ fun_l6_n755(x)
+ end
+end
+
+def fun_l5_n211(x)
+ if (x < 1)
+ fun_l6_n345(x)
+ else
+ fun_l6_n747(x)
+ end
+end
+
+def fun_l5_n212(x)
+ if (x < 1)
+ fun_l6_n631(x)
+ else
+ fun_l6_n576(x)
+ end
+end
+
+def fun_l5_n213(x)
+ if (x < 1)
+ fun_l6_n713(x)
+ else
+ fun_l6_n678(x)
+ end
+end
+
+def fun_l5_n214(x)
+ if (x < 1)
+ fun_l6_n470(x)
+ else
+ fun_l6_n877(x)
+ end
+end
+
+def fun_l5_n215(x)
+ if (x < 1)
+ fun_l6_n78(x)
+ else
+ fun_l6_n315(x)
+ end
+end
+
+def fun_l5_n216(x)
+ if (x < 1)
+ fun_l6_n281(x)
+ else
+ fun_l6_n872(x)
+ end
+end
+
+def fun_l5_n217(x)
+ if (x < 1)
+ fun_l6_n200(x)
+ else
+ fun_l6_n323(x)
+ end
+end
+
+def fun_l5_n218(x)
+ if (x < 1)
+ fun_l6_n483(x)
+ else
+ fun_l6_n938(x)
+ end
+end
+
+def fun_l5_n219(x)
+ if (x < 1)
+ fun_l6_n102(x)
+ else
+ fun_l6_n690(x)
+ end
+end
+
+def fun_l5_n220(x)
+ if (x < 1)
+ fun_l6_n740(x)
+ else
+ fun_l6_n684(x)
+ end
+end
+
+def fun_l5_n221(x)
+ if (x < 1)
+ fun_l6_n366(x)
+ else
+ fun_l6_n138(x)
+ end
+end
+
+def fun_l5_n222(x)
+ if (x < 1)
+ fun_l6_n306(x)
+ else
+ fun_l6_n874(x)
+ end
+end
+
+def fun_l5_n223(x)
+ if (x < 1)
+ fun_l6_n828(x)
+ else
+ fun_l6_n839(x)
+ end
+end
+
+def fun_l5_n224(x)
+ if (x < 1)
+ fun_l6_n739(x)
+ else
+ fun_l6_n569(x)
+ end
+end
+
+def fun_l5_n225(x)
+ if (x < 1)
+ fun_l6_n332(x)
+ else
+ fun_l6_n49(x)
+ end
+end
+
+def fun_l5_n226(x)
+ if (x < 1)
+ fun_l6_n783(x)
+ else
+ fun_l6_n20(x)
+ end
+end
+
+def fun_l5_n227(x)
+ if (x < 1)
+ fun_l6_n774(x)
+ else
+ fun_l6_n346(x)
+ end
+end
+
+def fun_l5_n228(x)
+ if (x < 1)
+ fun_l6_n637(x)
+ else
+ fun_l6_n302(x)
+ end
+end
+
+def fun_l5_n229(x)
+ if (x < 1)
+ fun_l6_n10(x)
+ else
+ fun_l6_n697(x)
+ end
+end
+
+def fun_l5_n230(x)
+ if (x < 1)
+ fun_l6_n804(x)
+ else
+ fun_l6_n141(x)
+ end
+end
+
+def fun_l5_n231(x)
+ if (x < 1)
+ fun_l6_n232(x)
+ else
+ fun_l6_n88(x)
+ end
+end
+
+def fun_l5_n232(x)
+ if (x < 1)
+ fun_l6_n248(x)
+ else
+ fun_l6_n862(x)
+ end
+end
+
+def fun_l5_n233(x)
+ if (x < 1)
+ fun_l6_n287(x)
+ else
+ fun_l6_n315(x)
+ end
+end
+
+def fun_l5_n234(x)
+ if (x < 1)
+ fun_l6_n543(x)
+ else
+ fun_l6_n182(x)
+ end
+end
+
+def fun_l5_n235(x)
+ if (x < 1)
+ fun_l6_n162(x)
+ else
+ fun_l6_n710(x)
+ end
+end
+
+def fun_l5_n236(x)
+ if (x < 1)
+ fun_l6_n879(x)
+ else
+ fun_l6_n262(x)
+ end
+end
+
+def fun_l5_n237(x)
+ if (x < 1)
+ fun_l6_n706(x)
+ else
+ fun_l6_n112(x)
+ end
+end
+
+def fun_l5_n238(x)
+ if (x < 1)
+ fun_l6_n578(x)
+ else
+ fun_l6_n792(x)
+ end
+end
+
+def fun_l5_n239(x)
+ if (x < 1)
+ fun_l6_n685(x)
+ else
+ fun_l6_n441(x)
+ end
+end
+
+def fun_l5_n240(x)
+ if (x < 1)
+ fun_l6_n706(x)
+ else
+ fun_l6_n737(x)
+ end
+end
+
+def fun_l5_n241(x)
+ if (x < 1)
+ fun_l6_n360(x)
+ else
+ fun_l6_n751(x)
+ end
+end
+
+def fun_l5_n242(x)
+ if (x < 1)
+ fun_l6_n823(x)
+ else
+ fun_l6_n888(x)
+ end
+end
+
+def fun_l5_n243(x)
+ if (x < 1)
+ fun_l6_n743(x)
+ else
+ fun_l6_n705(x)
+ end
+end
+
+def fun_l5_n244(x)
+ if (x < 1)
+ fun_l6_n340(x)
+ else
+ fun_l6_n541(x)
+ end
+end
+
+def fun_l5_n245(x)
+ if (x < 1)
+ fun_l6_n324(x)
+ else
+ fun_l6_n121(x)
+ end
+end
+
+def fun_l5_n246(x)
+ if (x < 1)
+ fun_l6_n241(x)
+ else
+ fun_l6_n584(x)
+ end
+end
+
+def fun_l5_n247(x)
+ if (x < 1)
+ fun_l6_n468(x)
+ else
+ fun_l6_n673(x)
+ end
+end
+
+def fun_l5_n248(x)
+ if (x < 1)
+ fun_l6_n595(x)
+ else
+ fun_l6_n537(x)
+ end
+end
+
+def fun_l5_n249(x)
+ if (x < 1)
+ fun_l6_n166(x)
+ else
+ fun_l6_n766(x)
+ end
+end
+
+def fun_l5_n250(x)
+ if (x < 1)
+ fun_l6_n322(x)
+ else
+ fun_l6_n904(x)
+ end
+end
+
+def fun_l5_n251(x)
+ if (x < 1)
+ fun_l6_n273(x)
+ else
+ fun_l6_n353(x)
+ end
+end
+
+def fun_l5_n252(x)
+ if (x < 1)
+ fun_l6_n990(x)
+ else
+ fun_l6_n360(x)
+ end
+end
+
+def fun_l5_n253(x)
+ if (x < 1)
+ fun_l6_n552(x)
+ else
+ fun_l6_n649(x)
+ end
+end
+
+def fun_l5_n254(x)
+ if (x < 1)
+ fun_l6_n917(x)
+ else
+ fun_l6_n803(x)
+ end
+end
+
+def fun_l5_n255(x)
+ if (x < 1)
+ fun_l6_n763(x)
+ else
+ fun_l6_n464(x)
+ end
+end
+
+def fun_l5_n256(x)
+ if (x < 1)
+ fun_l6_n577(x)
+ else
+ fun_l6_n70(x)
+ end
+end
+
+def fun_l5_n257(x)
+ if (x < 1)
+ fun_l6_n618(x)
+ else
+ fun_l6_n943(x)
+ end
+end
+
+def fun_l5_n258(x)
+ if (x < 1)
+ fun_l6_n683(x)
+ else
+ fun_l6_n761(x)
+ end
+end
+
+def fun_l5_n259(x)
+ if (x < 1)
+ fun_l6_n284(x)
+ else
+ fun_l6_n223(x)
+ end
+end
+
+def fun_l5_n260(x)
+ if (x < 1)
+ fun_l6_n189(x)
+ else
+ fun_l6_n455(x)
+ end
+end
+
+def fun_l5_n261(x)
+ if (x < 1)
+ fun_l6_n632(x)
+ else
+ fun_l6_n245(x)
+ end
+end
+
+def fun_l5_n262(x)
+ if (x < 1)
+ fun_l6_n940(x)
+ else
+ fun_l6_n38(x)
+ end
+end
+
+def fun_l5_n263(x)
+ if (x < 1)
+ fun_l6_n289(x)
+ else
+ fun_l6_n356(x)
+ end
+end
+
+def fun_l5_n264(x)
+ if (x < 1)
+ fun_l6_n268(x)
+ else
+ fun_l6_n412(x)
+ end
+end
+
+def fun_l5_n265(x)
+ if (x < 1)
+ fun_l6_n370(x)
+ else
+ fun_l6_n858(x)
+ end
+end
+
+def fun_l5_n266(x)
+ if (x < 1)
+ fun_l6_n523(x)
+ else
+ fun_l6_n809(x)
+ end
+end
+
+def fun_l5_n267(x)
+ if (x < 1)
+ fun_l6_n469(x)
+ else
+ fun_l6_n260(x)
+ end
+end
+
+def fun_l5_n268(x)
+ if (x < 1)
+ fun_l6_n442(x)
+ else
+ fun_l6_n738(x)
+ end
+end
+
+def fun_l5_n269(x)
+ if (x < 1)
+ fun_l6_n663(x)
+ else
+ fun_l6_n109(x)
+ end
+end
+
+def fun_l5_n270(x)
+ if (x < 1)
+ fun_l6_n302(x)
+ else
+ fun_l6_n664(x)
+ end
+end
+
+def fun_l5_n271(x)
+ if (x < 1)
+ fun_l6_n201(x)
+ else
+ fun_l6_n251(x)
+ end
+end
+
+def fun_l5_n272(x)
+ if (x < 1)
+ fun_l6_n776(x)
+ else
+ fun_l6_n903(x)
+ end
+end
+
+def fun_l5_n273(x)
+ if (x < 1)
+ fun_l6_n683(x)
+ else
+ fun_l6_n233(x)
+ end
+end
+
+def fun_l5_n274(x)
+ if (x < 1)
+ fun_l6_n530(x)
+ else
+ fun_l6_n487(x)
+ end
+end
+
+def fun_l5_n275(x)
+ if (x < 1)
+ fun_l6_n848(x)
+ else
+ fun_l6_n99(x)
+ end
+end
+
+def fun_l5_n276(x)
+ if (x < 1)
+ fun_l6_n126(x)
+ else
+ fun_l6_n914(x)
+ end
+end
+
+def fun_l5_n277(x)
+ if (x < 1)
+ fun_l6_n304(x)
+ else
+ fun_l6_n198(x)
+ end
+end
+
+def fun_l5_n278(x)
+ if (x < 1)
+ fun_l6_n47(x)
+ else
+ fun_l6_n179(x)
+ end
+end
+
+def fun_l5_n279(x)
+ if (x < 1)
+ fun_l6_n846(x)
+ else
+ fun_l6_n301(x)
+ end
+end
+
+def fun_l5_n280(x)
+ if (x < 1)
+ fun_l6_n576(x)
+ else
+ fun_l6_n561(x)
+ end
+end
+
+def fun_l5_n281(x)
+ if (x < 1)
+ fun_l6_n307(x)
+ else
+ fun_l6_n545(x)
+ end
+end
+
+def fun_l5_n282(x)
+ if (x < 1)
+ fun_l6_n434(x)
+ else
+ fun_l6_n669(x)
+ end
+end
+
+def fun_l5_n283(x)
+ if (x < 1)
+ fun_l6_n606(x)
+ else
+ fun_l6_n147(x)
+ end
+end
+
+def fun_l5_n284(x)
+ if (x < 1)
+ fun_l6_n212(x)
+ else
+ fun_l6_n504(x)
+ end
+end
+
+def fun_l5_n285(x)
+ if (x < 1)
+ fun_l6_n193(x)
+ else
+ fun_l6_n165(x)
+ end
+end
+
+def fun_l5_n286(x)
+ if (x < 1)
+ fun_l6_n569(x)
+ else
+ fun_l6_n100(x)
+ end
+end
+
+def fun_l5_n287(x)
+ if (x < 1)
+ fun_l6_n59(x)
+ else
+ fun_l6_n998(x)
+ end
+end
+
+def fun_l5_n288(x)
+ if (x < 1)
+ fun_l6_n544(x)
+ else
+ fun_l6_n923(x)
+ end
+end
+
+def fun_l5_n289(x)
+ if (x < 1)
+ fun_l6_n317(x)
+ else
+ fun_l6_n255(x)
+ end
+end
+
+def fun_l5_n290(x)
+ if (x < 1)
+ fun_l6_n476(x)
+ else
+ fun_l6_n789(x)
+ end
+end
+
+def fun_l5_n291(x)
+ if (x < 1)
+ fun_l6_n324(x)
+ else
+ fun_l6_n162(x)
+ end
+end
+
+def fun_l5_n292(x)
+ if (x < 1)
+ fun_l6_n704(x)
+ else
+ fun_l6_n454(x)
+ end
+end
+
+def fun_l5_n293(x)
+ if (x < 1)
+ fun_l6_n994(x)
+ else
+ fun_l6_n637(x)
+ end
+end
+
+def fun_l5_n294(x)
+ if (x < 1)
+ fun_l6_n801(x)
+ else
+ fun_l6_n913(x)
+ end
+end
+
+def fun_l5_n295(x)
+ if (x < 1)
+ fun_l6_n579(x)
+ else
+ fun_l6_n795(x)
+ end
+end
+
+def fun_l5_n296(x)
+ if (x < 1)
+ fun_l6_n689(x)
+ else
+ fun_l6_n546(x)
+ end
+end
+
+def fun_l5_n297(x)
+ if (x < 1)
+ fun_l6_n971(x)
+ else
+ fun_l6_n493(x)
+ end
+end
+
+def fun_l5_n298(x)
+ if (x < 1)
+ fun_l6_n67(x)
+ else
+ fun_l6_n372(x)
+ end
+end
+
+def fun_l5_n299(x)
+ if (x < 1)
+ fun_l6_n654(x)
+ else
+ fun_l6_n921(x)
+ end
+end
+
+def fun_l5_n300(x)
+ if (x < 1)
+ fun_l6_n402(x)
+ else
+ fun_l6_n437(x)
+ end
+end
+
+def fun_l5_n301(x)
+ if (x < 1)
+ fun_l6_n448(x)
+ else
+ fun_l6_n177(x)
+ end
+end
+
+def fun_l5_n302(x)
+ if (x < 1)
+ fun_l6_n308(x)
+ else
+ fun_l6_n869(x)
+ end
+end
+
+def fun_l5_n303(x)
+ if (x < 1)
+ fun_l6_n825(x)
+ else
+ fun_l6_n848(x)
+ end
+end
+
+def fun_l5_n304(x)
+ if (x < 1)
+ fun_l6_n735(x)
+ else
+ fun_l6_n653(x)
+ end
+end
+
+def fun_l5_n305(x)
+ if (x < 1)
+ fun_l6_n393(x)
+ else
+ fun_l6_n113(x)
+ end
+end
+
+def fun_l5_n306(x)
+ if (x < 1)
+ fun_l6_n821(x)
+ else
+ fun_l6_n827(x)
+ end
+end
+
+def fun_l5_n307(x)
+ if (x < 1)
+ fun_l6_n734(x)
+ else
+ fun_l6_n498(x)
+ end
+end
+
+def fun_l5_n308(x)
+ if (x < 1)
+ fun_l6_n833(x)
+ else
+ fun_l6_n302(x)
+ end
+end
+
+def fun_l5_n309(x)
+ if (x < 1)
+ fun_l6_n596(x)
+ else
+ fun_l6_n544(x)
+ end
+end
+
+def fun_l5_n310(x)
+ if (x < 1)
+ fun_l6_n61(x)
+ else
+ fun_l6_n823(x)
+ end
+end
+
+def fun_l5_n311(x)
+ if (x < 1)
+ fun_l6_n596(x)
+ else
+ fun_l6_n98(x)
+ end
+end
+
+def fun_l5_n312(x)
+ if (x < 1)
+ fun_l6_n78(x)
+ else
+ fun_l6_n186(x)
+ end
+end
+
+def fun_l5_n313(x)
+ if (x < 1)
+ fun_l6_n286(x)
+ else
+ fun_l6_n230(x)
+ end
+end
+
+def fun_l5_n314(x)
+ if (x < 1)
+ fun_l6_n613(x)
+ else
+ fun_l6_n412(x)
+ end
+end
+
+def fun_l5_n315(x)
+ if (x < 1)
+ fun_l6_n0(x)
+ else
+ fun_l6_n579(x)
+ end
+end
+
+def fun_l5_n316(x)
+ if (x < 1)
+ fun_l6_n991(x)
+ else
+ fun_l6_n379(x)
+ end
+end
+
+def fun_l5_n317(x)
+ if (x < 1)
+ fun_l6_n825(x)
+ else
+ fun_l6_n964(x)
+ end
+end
+
+def fun_l5_n318(x)
+ if (x < 1)
+ fun_l6_n707(x)
+ else
+ fun_l6_n664(x)
+ end
+end
+
+def fun_l5_n319(x)
+ if (x < 1)
+ fun_l6_n326(x)
+ else
+ fun_l6_n26(x)
+ end
+end
+
+def fun_l5_n320(x)
+ if (x < 1)
+ fun_l6_n684(x)
+ else
+ fun_l6_n333(x)
+ end
+end
+
+def fun_l5_n321(x)
+ if (x < 1)
+ fun_l6_n165(x)
+ else
+ fun_l6_n586(x)
+ end
+end
+
+def fun_l5_n322(x)
+ if (x < 1)
+ fun_l6_n28(x)
+ else
+ fun_l6_n53(x)
+ end
+end
+
+def fun_l5_n323(x)
+ if (x < 1)
+ fun_l6_n693(x)
+ else
+ fun_l6_n84(x)
+ end
+end
+
+def fun_l5_n324(x)
+ if (x < 1)
+ fun_l6_n500(x)
+ else
+ fun_l6_n445(x)
+ end
+end
+
+def fun_l5_n325(x)
+ if (x < 1)
+ fun_l6_n189(x)
+ else
+ fun_l6_n756(x)
+ end
+end
+
+def fun_l5_n326(x)
+ if (x < 1)
+ fun_l6_n147(x)
+ else
+ fun_l6_n709(x)
+ end
+end
+
+def fun_l5_n327(x)
+ if (x < 1)
+ fun_l6_n893(x)
+ else
+ fun_l6_n851(x)
+ end
+end
+
+def fun_l5_n328(x)
+ if (x < 1)
+ fun_l6_n685(x)
+ else
+ fun_l6_n399(x)
+ end
+end
+
+def fun_l5_n329(x)
+ if (x < 1)
+ fun_l6_n281(x)
+ else
+ fun_l6_n284(x)
+ end
+end
+
+def fun_l5_n330(x)
+ if (x < 1)
+ fun_l6_n579(x)
+ else
+ fun_l6_n671(x)
+ end
+end
+
+def fun_l5_n331(x)
+ if (x < 1)
+ fun_l6_n176(x)
+ else
+ fun_l6_n829(x)
+ end
+end
+
+def fun_l5_n332(x)
+ if (x < 1)
+ fun_l6_n209(x)
+ else
+ fun_l6_n91(x)
+ end
+end
+
+def fun_l5_n333(x)
+ if (x < 1)
+ fun_l6_n302(x)
+ else
+ fun_l6_n360(x)
+ end
+end
+
+def fun_l5_n334(x)
+ if (x < 1)
+ fun_l6_n701(x)
+ else
+ fun_l6_n438(x)
+ end
+end
+
+def fun_l5_n335(x)
+ if (x < 1)
+ fun_l6_n923(x)
+ else
+ fun_l6_n613(x)
+ end
+end
+
+def fun_l5_n336(x)
+ if (x < 1)
+ fun_l6_n490(x)
+ else
+ fun_l6_n405(x)
+ end
+end
+
+def fun_l5_n337(x)
+ if (x < 1)
+ fun_l6_n187(x)
+ else
+ fun_l6_n953(x)
+ end
+end
+
+def fun_l5_n338(x)
+ if (x < 1)
+ fun_l6_n396(x)
+ else
+ fun_l6_n917(x)
+ end
+end
+
+def fun_l5_n339(x)
+ if (x < 1)
+ fun_l6_n822(x)
+ else
+ fun_l6_n939(x)
+ end
+end
+
+def fun_l5_n340(x)
+ if (x < 1)
+ fun_l6_n665(x)
+ else
+ fun_l6_n890(x)
+ end
+end
+
+def fun_l5_n341(x)
+ if (x < 1)
+ fun_l6_n125(x)
+ else
+ fun_l6_n817(x)
+ end
+end
+
+def fun_l5_n342(x)
+ if (x < 1)
+ fun_l6_n825(x)
+ else
+ fun_l6_n853(x)
+ end
+end
+
+def fun_l5_n343(x)
+ if (x < 1)
+ fun_l6_n724(x)
+ else
+ fun_l6_n633(x)
+ end
+end
+
+def fun_l5_n344(x)
+ if (x < 1)
+ fun_l6_n901(x)
+ else
+ fun_l6_n26(x)
+ end
+end
+
+def fun_l5_n345(x)
+ if (x < 1)
+ fun_l6_n406(x)
+ else
+ fun_l6_n664(x)
+ end
+end
+
+def fun_l5_n346(x)
+ if (x < 1)
+ fun_l6_n720(x)
+ else
+ fun_l6_n856(x)
+ end
+end
+
+def fun_l5_n347(x)
+ if (x < 1)
+ fun_l6_n617(x)
+ else
+ fun_l6_n116(x)
+ end
+end
+
+def fun_l5_n348(x)
+ if (x < 1)
+ fun_l6_n560(x)
+ else
+ fun_l6_n24(x)
+ end
+end
+
+def fun_l5_n349(x)
+ if (x < 1)
+ fun_l6_n758(x)
+ else
+ fun_l6_n297(x)
+ end
+end
+
+def fun_l5_n350(x)
+ if (x < 1)
+ fun_l6_n583(x)
+ else
+ fun_l6_n673(x)
+ end
+end
+
+def fun_l5_n351(x)
+ if (x < 1)
+ fun_l6_n990(x)
+ else
+ fun_l6_n512(x)
+ end
+end
+
+def fun_l5_n352(x)
+ if (x < 1)
+ fun_l6_n250(x)
+ else
+ fun_l6_n819(x)
+ end
+end
+
+def fun_l5_n353(x)
+ if (x < 1)
+ fun_l6_n186(x)
+ else
+ fun_l6_n787(x)
+ end
+end
+
+def fun_l5_n354(x)
+ if (x < 1)
+ fun_l6_n217(x)
+ else
+ fun_l6_n231(x)
+ end
+end
+
+def fun_l5_n355(x)
+ if (x < 1)
+ fun_l6_n827(x)
+ else
+ fun_l6_n439(x)
+ end
+end
+
+def fun_l5_n356(x)
+ if (x < 1)
+ fun_l6_n456(x)
+ else
+ fun_l6_n352(x)
+ end
+end
+
+def fun_l5_n357(x)
+ if (x < 1)
+ fun_l6_n306(x)
+ else
+ fun_l6_n236(x)
+ end
+end
+
+def fun_l5_n358(x)
+ if (x < 1)
+ fun_l6_n515(x)
+ else
+ fun_l6_n100(x)
+ end
+end
+
+def fun_l5_n359(x)
+ if (x < 1)
+ fun_l6_n28(x)
+ else
+ fun_l6_n820(x)
+ end
+end
+
+def fun_l5_n360(x)
+ if (x < 1)
+ fun_l6_n683(x)
+ else
+ fun_l6_n547(x)
+ end
+end
+
+def fun_l5_n361(x)
+ if (x < 1)
+ fun_l6_n573(x)
+ else
+ fun_l6_n699(x)
+ end
+end
+
+def fun_l5_n362(x)
+ if (x < 1)
+ fun_l6_n807(x)
+ else
+ fun_l6_n548(x)
+ end
+end
+
+def fun_l5_n363(x)
+ if (x < 1)
+ fun_l6_n712(x)
+ else
+ fun_l6_n323(x)
+ end
+end
+
+def fun_l5_n364(x)
+ if (x < 1)
+ fun_l6_n457(x)
+ else
+ fun_l6_n447(x)
+ end
+end
+
+def fun_l5_n365(x)
+ if (x < 1)
+ fun_l6_n684(x)
+ else
+ fun_l6_n782(x)
+ end
+end
+
+def fun_l5_n366(x)
+ if (x < 1)
+ fun_l6_n217(x)
+ else
+ fun_l6_n344(x)
+ end
+end
+
+def fun_l5_n367(x)
+ if (x < 1)
+ fun_l6_n670(x)
+ else
+ fun_l6_n311(x)
+ end
+end
+
+def fun_l5_n368(x)
+ if (x < 1)
+ fun_l6_n224(x)
+ else
+ fun_l6_n198(x)
+ end
+end
+
+def fun_l5_n369(x)
+ if (x < 1)
+ fun_l6_n517(x)
+ else
+ fun_l6_n186(x)
+ end
+end
+
+def fun_l5_n370(x)
+ if (x < 1)
+ fun_l6_n511(x)
+ else
+ fun_l6_n27(x)
+ end
+end
+
+def fun_l5_n371(x)
+ if (x < 1)
+ fun_l6_n485(x)
+ else
+ fun_l6_n288(x)
+ end
+end
+
+def fun_l5_n372(x)
+ if (x < 1)
+ fun_l6_n931(x)
+ else
+ fun_l6_n473(x)
+ end
+end
+
+def fun_l5_n373(x)
+ if (x < 1)
+ fun_l6_n381(x)
+ else
+ fun_l6_n650(x)
+ end
+end
+
+def fun_l5_n374(x)
+ if (x < 1)
+ fun_l6_n132(x)
+ else
+ fun_l6_n243(x)
+ end
+end
+
+def fun_l5_n375(x)
+ if (x < 1)
+ fun_l6_n900(x)
+ else
+ fun_l6_n322(x)
+ end
+end
+
+def fun_l5_n376(x)
+ if (x < 1)
+ fun_l6_n787(x)
+ else
+ fun_l6_n588(x)
+ end
+end
+
+def fun_l5_n377(x)
+ if (x < 1)
+ fun_l6_n233(x)
+ else
+ fun_l6_n358(x)
+ end
+end
+
+def fun_l5_n378(x)
+ if (x < 1)
+ fun_l6_n601(x)
+ else
+ fun_l6_n40(x)
+ end
+end
+
+def fun_l5_n379(x)
+ if (x < 1)
+ fun_l6_n682(x)
+ else
+ fun_l6_n63(x)
+ end
+end
+
+def fun_l5_n380(x)
+ if (x < 1)
+ fun_l6_n279(x)
+ else
+ fun_l6_n393(x)
+ end
+end
+
+def fun_l5_n381(x)
+ if (x < 1)
+ fun_l6_n83(x)
+ else
+ fun_l6_n538(x)
+ end
+end
+
+def fun_l5_n382(x)
+ if (x < 1)
+ fun_l6_n956(x)
+ else
+ fun_l6_n194(x)
+ end
+end
+
+def fun_l5_n383(x)
+ if (x < 1)
+ fun_l6_n55(x)
+ else
+ fun_l6_n140(x)
+ end
+end
+
+def fun_l5_n384(x)
+ if (x < 1)
+ fun_l6_n165(x)
+ else
+ fun_l6_n784(x)
+ end
+end
+
+def fun_l5_n385(x)
+ if (x < 1)
+ fun_l6_n582(x)
+ else
+ fun_l6_n97(x)
+ end
+end
+
+def fun_l5_n386(x)
+ if (x < 1)
+ fun_l6_n362(x)
+ else
+ fun_l6_n935(x)
+ end
+end
+
+def fun_l5_n387(x)
+ if (x < 1)
+ fun_l6_n496(x)
+ else
+ fun_l6_n512(x)
+ end
+end
+
+def fun_l5_n388(x)
+ if (x < 1)
+ fun_l6_n793(x)
+ else
+ fun_l6_n746(x)
+ end
+end
+
+def fun_l5_n389(x)
+ if (x < 1)
+ fun_l6_n172(x)
+ else
+ fun_l6_n731(x)
+ end
+end
+
+def fun_l5_n390(x)
+ if (x < 1)
+ fun_l6_n895(x)
+ else
+ fun_l6_n694(x)
+ end
+end
+
+def fun_l5_n391(x)
+ if (x < 1)
+ fun_l6_n336(x)
+ else
+ fun_l6_n551(x)
+ end
+end
+
+def fun_l5_n392(x)
+ if (x < 1)
+ fun_l6_n453(x)
+ else
+ fun_l6_n83(x)
+ end
+end
+
+def fun_l5_n393(x)
+ if (x < 1)
+ fun_l6_n571(x)
+ else
+ fun_l6_n293(x)
+ end
+end
+
+def fun_l5_n394(x)
+ if (x < 1)
+ fun_l6_n872(x)
+ else
+ fun_l6_n519(x)
+ end
+end
+
+def fun_l5_n395(x)
+ if (x < 1)
+ fun_l6_n912(x)
+ else
+ fun_l6_n955(x)
+ end
+end
+
+def fun_l5_n396(x)
+ if (x < 1)
+ fun_l6_n961(x)
+ else
+ fun_l6_n367(x)
+ end
+end
+
+def fun_l5_n397(x)
+ if (x < 1)
+ fun_l6_n255(x)
+ else
+ fun_l6_n639(x)
+ end
+end
+
+def fun_l5_n398(x)
+ if (x < 1)
+ fun_l6_n970(x)
+ else
+ fun_l6_n465(x)
+ end
+end
+
+def fun_l5_n399(x)
+ if (x < 1)
+ fun_l6_n625(x)
+ else
+ fun_l6_n387(x)
+ end
+end
+
+def fun_l5_n400(x)
+ if (x < 1)
+ fun_l6_n537(x)
+ else
+ fun_l6_n336(x)
+ end
+end
+
+def fun_l5_n401(x)
+ if (x < 1)
+ fun_l6_n61(x)
+ else
+ fun_l6_n0(x)
+ end
+end
+
+def fun_l5_n402(x)
+ if (x < 1)
+ fun_l6_n358(x)
+ else
+ fun_l6_n715(x)
+ end
+end
+
+def fun_l5_n403(x)
+ if (x < 1)
+ fun_l6_n864(x)
+ else
+ fun_l6_n729(x)
+ end
+end
+
+def fun_l5_n404(x)
+ if (x < 1)
+ fun_l6_n393(x)
+ else
+ fun_l6_n962(x)
+ end
+end
+
+def fun_l5_n405(x)
+ if (x < 1)
+ fun_l6_n995(x)
+ else
+ fun_l6_n835(x)
+ end
+end
+
+def fun_l5_n406(x)
+ if (x < 1)
+ fun_l6_n605(x)
+ else
+ fun_l6_n732(x)
+ end
+end
+
+def fun_l5_n407(x)
+ if (x < 1)
+ fun_l6_n132(x)
+ else
+ fun_l6_n112(x)
+ end
+end
+
+def fun_l5_n408(x)
+ if (x < 1)
+ fun_l6_n311(x)
+ else
+ fun_l6_n972(x)
+ end
+end
+
+def fun_l5_n409(x)
+ if (x < 1)
+ fun_l6_n460(x)
+ else
+ fun_l6_n750(x)
+ end
+end
+
+def fun_l5_n410(x)
+ if (x < 1)
+ fun_l6_n237(x)
+ else
+ fun_l6_n463(x)
+ end
+end
+
+def fun_l5_n411(x)
+ if (x < 1)
+ fun_l6_n251(x)
+ else
+ fun_l6_n944(x)
+ end
+end
+
+def fun_l5_n412(x)
+ if (x < 1)
+ fun_l6_n123(x)
+ else
+ fun_l6_n369(x)
+ end
+end
+
+def fun_l5_n413(x)
+ if (x < 1)
+ fun_l6_n371(x)
+ else
+ fun_l6_n589(x)
+ end
+end
+
+def fun_l5_n414(x)
+ if (x < 1)
+ fun_l6_n232(x)
+ else
+ fun_l6_n354(x)
+ end
+end
+
+def fun_l5_n415(x)
+ if (x < 1)
+ fun_l6_n580(x)
+ else
+ fun_l6_n330(x)
+ end
+end
+
+def fun_l5_n416(x)
+ if (x < 1)
+ fun_l6_n483(x)
+ else
+ fun_l6_n446(x)
+ end
+end
+
+def fun_l5_n417(x)
+ if (x < 1)
+ fun_l6_n834(x)
+ else
+ fun_l6_n284(x)
+ end
+end
+
+def fun_l5_n418(x)
+ if (x < 1)
+ fun_l6_n864(x)
+ else
+ fun_l6_n825(x)
+ end
+end
+
+def fun_l5_n419(x)
+ if (x < 1)
+ fun_l6_n406(x)
+ else
+ fun_l6_n680(x)
+ end
+end
+
+def fun_l5_n420(x)
+ if (x < 1)
+ fun_l6_n101(x)
+ else
+ fun_l6_n4(x)
+ end
+end
+
+def fun_l5_n421(x)
+ if (x < 1)
+ fun_l6_n628(x)
+ else
+ fun_l6_n303(x)
+ end
+end
+
+def fun_l5_n422(x)
+ if (x < 1)
+ fun_l6_n521(x)
+ else
+ fun_l6_n547(x)
+ end
+end
+
+def fun_l5_n423(x)
+ if (x < 1)
+ fun_l6_n589(x)
+ else
+ fun_l6_n134(x)
+ end
+end
+
+def fun_l5_n424(x)
+ if (x < 1)
+ fun_l6_n161(x)
+ else
+ fun_l6_n347(x)
+ end
+end
+
+def fun_l5_n425(x)
+ if (x < 1)
+ fun_l6_n59(x)
+ else
+ fun_l6_n988(x)
+ end
+end
+
+def fun_l5_n426(x)
+ if (x < 1)
+ fun_l6_n388(x)
+ else
+ fun_l6_n182(x)
+ end
+end
+
+def fun_l5_n427(x)
+ if (x < 1)
+ fun_l6_n500(x)
+ else
+ fun_l6_n536(x)
+ end
+end
+
+def fun_l5_n428(x)
+ if (x < 1)
+ fun_l6_n792(x)
+ else
+ fun_l6_n253(x)
+ end
+end
+
+def fun_l5_n429(x)
+ if (x < 1)
+ fun_l6_n774(x)
+ else
+ fun_l6_n997(x)
+ end
+end
+
+def fun_l5_n430(x)
+ if (x < 1)
+ fun_l6_n876(x)
+ else
+ fun_l6_n798(x)
+ end
+end
+
+def fun_l5_n431(x)
+ if (x < 1)
+ fun_l6_n606(x)
+ else
+ fun_l6_n403(x)
+ end
+end
+
+def fun_l5_n432(x)
+ if (x < 1)
+ fun_l6_n920(x)
+ else
+ fun_l6_n827(x)
+ end
+end
+
+def fun_l5_n433(x)
+ if (x < 1)
+ fun_l6_n887(x)
+ else
+ fun_l6_n149(x)
+ end
+end
+
+def fun_l5_n434(x)
+ if (x < 1)
+ fun_l6_n413(x)
+ else
+ fun_l6_n44(x)
+ end
+end
+
+def fun_l5_n435(x)
+ if (x < 1)
+ fun_l6_n474(x)
+ else
+ fun_l6_n107(x)
+ end
+end
+
+def fun_l5_n436(x)
+ if (x < 1)
+ fun_l6_n807(x)
+ else
+ fun_l6_n636(x)
+ end
+end
+
+def fun_l5_n437(x)
+ if (x < 1)
+ fun_l6_n616(x)
+ else
+ fun_l6_n615(x)
+ end
+end
+
+def fun_l5_n438(x)
+ if (x < 1)
+ fun_l6_n384(x)
+ else
+ fun_l6_n535(x)
+ end
+end
+
+def fun_l5_n439(x)
+ if (x < 1)
+ fun_l6_n326(x)
+ else
+ fun_l6_n929(x)
+ end
+end
+
+def fun_l5_n440(x)
+ if (x < 1)
+ fun_l6_n852(x)
+ else
+ fun_l6_n597(x)
+ end
+end
+
+def fun_l5_n441(x)
+ if (x < 1)
+ fun_l6_n246(x)
+ else
+ fun_l6_n991(x)
+ end
+end
+
+def fun_l5_n442(x)
+ if (x < 1)
+ fun_l6_n258(x)
+ else
+ fun_l6_n140(x)
+ end
+end
+
+def fun_l5_n443(x)
+ if (x < 1)
+ fun_l6_n815(x)
+ else
+ fun_l6_n600(x)
+ end
+end
+
+def fun_l5_n444(x)
+ if (x < 1)
+ fun_l6_n153(x)
+ else
+ fun_l6_n902(x)
+ end
+end
+
+def fun_l5_n445(x)
+ if (x < 1)
+ fun_l6_n289(x)
+ else
+ fun_l6_n240(x)
+ end
+end
+
+def fun_l5_n446(x)
+ if (x < 1)
+ fun_l6_n398(x)
+ else
+ fun_l6_n273(x)
+ end
+end
+
+def fun_l5_n447(x)
+ if (x < 1)
+ fun_l6_n537(x)
+ else
+ fun_l6_n8(x)
+ end
+end
+
+def fun_l5_n448(x)
+ if (x < 1)
+ fun_l6_n801(x)
+ else
+ fun_l6_n389(x)
+ end
+end
+
+def fun_l5_n449(x)
+ if (x < 1)
+ fun_l6_n363(x)
+ else
+ fun_l6_n17(x)
+ end
+end
+
+def fun_l5_n450(x)
+ if (x < 1)
+ fun_l6_n511(x)
+ else
+ fun_l6_n151(x)
+ end
+end
+
+def fun_l5_n451(x)
+ if (x < 1)
+ fun_l6_n640(x)
+ else
+ fun_l6_n785(x)
+ end
+end
+
+def fun_l5_n452(x)
+ if (x < 1)
+ fun_l6_n961(x)
+ else
+ fun_l6_n567(x)
+ end
+end
+
+def fun_l5_n453(x)
+ if (x < 1)
+ fun_l6_n608(x)
+ else
+ fun_l6_n910(x)
+ end
+end
+
+def fun_l5_n454(x)
+ if (x < 1)
+ fun_l6_n898(x)
+ else
+ fun_l6_n231(x)
+ end
+end
+
+def fun_l5_n455(x)
+ if (x < 1)
+ fun_l6_n205(x)
+ else
+ fun_l6_n162(x)
+ end
+end
+
+def fun_l5_n456(x)
+ if (x < 1)
+ fun_l6_n374(x)
+ else
+ fun_l6_n544(x)
+ end
+end
+
+def fun_l5_n457(x)
+ if (x < 1)
+ fun_l6_n514(x)
+ else
+ fun_l6_n522(x)
+ end
+end
+
+def fun_l5_n458(x)
+ if (x < 1)
+ fun_l6_n385(x)
+ else
+ fun_l6_n808(x)
+ end
+end
+
+def fun_l5_n459(x)
+ if (x < 1)
+ fun_l6_n525(x)
+ else
+ fun_l6_n144(x)
+ end
+end
+
+def fun_l5_n460(x)
+ if (x < 1)
+ fun_l6_n781(x)
+ else
+ fun_l6_n180(x)
+ end
+end
+
+def fun_l5_n461(x)
+ if (x < 1)
+ fun_l6_n681(x)
+ else
+ fun_l6_n273(x)
+ end
+end
+
+def fun_l5_n462(x)
+ if (x < 1)
+ fun_l6_n497(x)
+ else
+ fun_l6_n399(x)
+ end
+end
+
+def fun_l5_n463(x)
+ if (x < 1)
+ fun_l6_n261(x)
+ else
+ fun_l6_n311(x)
+ end
+end
+
+def fun_l5_n464(x)
+ if (x < 1)
+ fun_l6_n64(x)
+ else
+ fun_l6_n253(x)
+ end
+end
+
+def fun_l5_n465(x)
+ if (x < 1)
+ fun_l6_n388(x)
+ else
+ fun_l6_n300(x)
+ end
+end
+
+def fun_l5_n466(x)
+ if (x < 1)
+ fun_l6_n822(x)
+ else
+ fun_l6_n277(x)
+ end
+end
+
+def fun_l5_n467(x)
+ if (x < 1)
+ fun_l6_n909(x)
+ else
+ fun_l6_n605(x)
+ end
+end
+
+def fun_l5_n468(x)
+ if (x < 1)
+ fun_l6_n879(x)
+ else
+ fun_l6_n870(x)
+ end
+end
+
+def fun_l5_n469(x)
+ if (x < 1)
+ fun_l6_n351(x)
+ else
+ fun_l6_n917(x)
+ end
+end
+
+def fun_l5_n470(x)
+ if (x < 1)
+ fun_l6_n202(x)
+ else
+ fun_l6_n40(x)
+ end
+end
+
+def fun_l5_n471(x)
+ if (x < 1)
+ fun_l6_n782(x)
+ else
+ fun_l6_n839(x)
+ end
+end
+
+def fun_l5_n472(x)
+ if (x < 1)
+ fun_l6_n370(x)
+ else
+ fun_l6_n868(x)
+ end
+end
+
+def fun_l5_n473(x)
+ if (x < 1)
+ fun_l6_n556(x)
+ else
+ fun_l6_n722(x)
+ end
+end
+
+def fun_l5_n474(x)
+ if (x < 1)
+ fun_l6_n220(x)
+ else
+ fun_l6_n994(x)
+ end
+end
+
+def fun_l5_n475(x)
+ if (x < 1)
+ fun_l6_n266(x)
+ else
+ fun_l6_n872(x)
+ end
+end
+
+def fun_l5_n476(x)
+ if (x < 1)
+ fun_l6_n720(x)
+ else
+ fun_l6_n412(x)
+ end
+end
+
+def fun_l5_n477(x)
+ if (x < 1)
+ fun_l6_n284(x)
+ else
+ fun_l6_n90(x)
+ end
+end
+
+def fun_l5_n478(x)
+ if (x < 1)
+ fun_l6_n716(x)
+ else
+ fun_l6_n125(x)
+ end
+end
+
+def fun_l5_n479(x)
+ if (x < 1)
+ fun_l6_n136(x)
+ else
+ fun_l6_n232(x)
+ end
+end
+
+def fun_l5_n480(x)
+ if (x < 1)
+ fun_l6_n627(x)
+ else
+ fun_l6_n641(x)
+ end
+end
+
+def fun_l5_n481(x)
+ if (x < 1)
+ fun_l6_n411(x)
+ else
+ fun_l6_n943(x)
+ end
+end
+
+def fun_l5_n482(x)
+ if (x < 1)
+ fun_l6_n86(x)
+ else
+ fun_l6_n839(x)
+ end
+end
+
+def fun_l5_n483(x)
+ if (x < 1)
+ fun_l6_n988(x)
+ else
+ fun_l6_n329(x)
+ end
+end
+
+def fun_l5_n484(x)
+ if (x < 1)
+ fun_l6_n595(x)
+ else
+ fun_l6_n499(x)
+ end
+end
+
+def fun_l5_n485(x)
+ if (x < 1)
+ fun_l6_n912(x)
+ else
+ fun_l6_n267(x)
+ end
+end
+
+def fun_l5_n486(x)
+ if (x < 1)
+ fun_l6_n334(x)
+ else
+ fun_l6_n459(x)
+ end
+end
+
+def fun_l5_n487(x)
+ if (x < 1)
+ fun_l6_n771(x)
+ else
+ fun_l6_n458(x)
+ end
+end
+
+def fun_l5_n488(x)
+ if (x < 1)
+ fun_l6_n609(x)
+ else
+ fun_l6_n280(x)
+ end
+end
+
+def fun_l5_n489(x)
+ if (x < 1)
+ fun_l6_n564(x)
+ else
+ fun_l6_n564(x)
+ end
+end
+
+def fun_l5_n490(x)
+ if (x < 1)
+ fun_l6_n271(x)
+ else
+ fun_l6_n904(x)
+ end
+end
+
+def fun_l5_n491(x)
+ if (x < 1)
+ fun_l6_n338(x)
+ else
+ fun_l6_n694(x)
+ end
+end
+
+def fun_l5_n492(x)
+ if (x < 1)
+ fun_l6_n596(x)
+ else
+ fun_l6_n191(x)
+ end
+end
+
+def fun_l5_n493(x)
+ if (x < 1)
+ fun_l6_n369(x)
+ else
+ fun_l6_n513(x)
+ end
+end
+
+def fun_l5_n494(x)
+ if (x < 1)
+ fun_l6_n972(x)
+ else
+ fun_l6_n945(x)
+ end
+end
+
+def fun_l5_n495(x)
+ if (x < 1)
+ fun_l6_n747(x)
+ else
+ fun_l6_n96(x)
+ end
+end
+
+def fun_l5_n496(x)
+ if (x < 1)
+ fun_l6_n220(x)
+ else
+ fun_l6_n665(x)
+ end
+end
+
+def fun_l5_n497(x)
+ if (x < 1)
+ fun_l6_n793(x)
+ else
+ fun_l6_n468(x)
+ end
+end
+
+def fun_l5_n498(x)
+ if (x < 1)
+ fun_l6_n227(x)
+ else
+ fun_l6_n576(x)
+ end
+end
+
+def fun_l5_n499(x)
+ if (x < 1)
+ fun_l6_n356(x)
+ else
+ fun_l6_n614(x)
+ end
+end
+
+def fun_l5_n500(x)
+ if (x < 1)
+ fun_l6_n256(x)
+ else
+ fun_l6_n237(x)
+ end
+end
+
+def fun_l5_n501(x)
+ if (x < 1)
+ fun_l6_n503(x)
+ else
+ fun_l6_n159(x)
+ end
+end
+
+def fun_l5_n502(x)
+ if (x < 1)
+ fun_l6_n523(x)
+ else
+ fun_l6_n547(x)
+ end
+end
+
+def fun_l5_n503(x)
+ if (x < 1)
+ fun_l6_n778(x)
+ else
+ fun_l6_n600(x)
+ end
+end
+
+def fun_l5_n504(x)
+ if (x < 1)
+ fun_l6_n654(x)
+ else
+ fun_l6_n950(x)
+ end
+end
+
+def fun_l5_n505(x)
+ if (x < 1)
+ fun_l6_n105(x)
+ else
+ fun_l6_n881(x)
+ end
+end
+
+def fun_l5_n506(x)
+ if (x < 1)
+ fun_l6_n956(x)
+ else
+ fun_l6_n71(x)
+ end
+end
+
+def fun_l5_n507(x)
+ if (x < 1)
+ fun_l6_n33(x)
+ else
+ fun_l6_n431(x)
+ end
+end
+
+def fun_l5_n508(x)
+ if (x < 1)
+ fun_l6_n587(x)
+ else
+ fun_l6_n1(x)
+ end
+end
+
+def fun_l5_n509(x)
+ if (x < 1)
+ fun_l6_n258(x)
+ else
+ fun_l6_n547(x)
+ end
+end
+
+def fun_l5_n510(x)
+ if (x < 1)
+ fun_l6_n816(x)
+ else
+ fun_l6_n558(x)
+ end
+end
+
+def fun_l5_n511(x)
+ if (x < 1)
+ fun_l6_n61(x)
+ else
+ fun_l6_n10(x)
+ end
+end
+
+def fun_l5_n512(x)
+ if (x < 1)
+ fun_l6_n674(x)
+ else
+ fun_l6_n466(x)
+ end
+end
+
+def fun_l5_n513(x)
+ if (x < 1)
+ fun_l6_n580(x)
+ else
+ fun_l6_n398(x)
+ end
+end
+
+def fun_l5_n514(x)
+ if (x < 1)
+ fun_l6_n495(x)
+ else
+ fun_l6_n407(x)
+ end
+end
+
+def fun_l5_n515(x)
+ if (x < 1)
+ fun_l6_n639(x)
+ else
+ fun_l6_n214(x)
+ end
+end
+
+def fun_l5_n516(x)
+ if (x < 1)
+ fun_l6_n15(x)
+ else
+ fun_l6_n716(x)
+ end
+end
+
+def fun_l5_n517(x)
+ if (x < 1)
+ fun_l6_n645(x)
+ else
+ fun_l6_n645(x)
+ end
+end
+
+def fun_l5_n518(x)
+ if (x < 1)
+ fun_l6_n615(x)
+ else
+ fun_l6_n44(x)
+ end
+end
+
+def fun_l5_n519(x)
+ if (x < 1)
+ fun_l6_n399(x)
+ else
+ fun_l6_n663(x)
+ end
+end
+
+def fun_l5_n520(x)
+ if (x < 1)
+ fun_l6_n85(x)
+ else
+ fun_l6_n870(x)
+ end
+end
+
+def fun_l5_n521(x)
+ if (x < 1)
+ fun_l6_n14(x)
+ else
+ fun_l6_n965(x)
+ end
+end
+
+def fun_l5_n522(x)
+ if (x < 1)
+ fun_l6_n24(x)
+ else
+ fun_l6_n581(x)
+ end
+end
+
+def fun_l5_n523(x)
+ if (x < 1)
+ fun_l6_n501(x)
+ else
+ fun_l6_n913(x)
+ end
+end
+
+def fun_l5_n524(x)
+ if (x < 1)
+ fun_l6_n772(x)
+ else
+ fun_l6_n999(x)
+ end
+end
+
+def fun_l5_n525(x)
+ if (x < 1)
+ fun_l6_n847(x)
+ else
+ fun_l6_n422(x)
+ end
+end
+
+def fun_l5_n526(x)
+ if (x < 1)
+ fun_l6_n377(x)
+ else
+ fun_l6_n986(x)
+ end
+end
+
+def fun_l5_n527(x)
+ if (x < 1)
+ fun_l6_n548(x)
+ else
+ fun_l6_n40(x)
+ end
+end
+
+def fun_l5_n528(x)
+ if (x < 1)
+ fun_l6_n392(x)
+ else
+ fun_l6_n577(x)
+ end
+end
+
+def fun_l5_n529(x)
+ if (x < 1)
+ fun_l6_n101(x)
+ else
+ fun_l6_n26(x)
+ end
+end
+
+def fun_l5_n530(x)
+ if (x < 1)
+ fun_l6_n800(x)
+ else
+ fun_l6_n958(x)
+ end
+end
+
+def fun_l5_n531(x)
+ if (x < 1)
+ fun_l6_n72(x)
+ else
+ fun_l6_n887(x)
+ end
+end
+
+def fun_l5_n532(x)
+ if (x < 1)
+ fun_l6_n467(x)
+ else
+ fun_l6_n740(x)
+ end
+end
+
+def fun_l5_n533(x)
+ if (x < 1)
+ fun_l6_n264(x)
+ else
+ fun_l6_n683(x)
+ end
+end
+
+def fun_l5_n534(x)
+ if (x < 1)
+ fun_l6_n953(x)
+ else
+ fun_l6_n560(x)
+ end
+end
+
+def fun_l5_n535(x)
+ if (x < 1)
+ fun_l6_n854(x)
+ else
+ fun_l6_n59(x)
+ end
+end
+
+def fun_l5_n536(x)
+ if (x < 1)
+ fun_l6_n940(x)
+ else
+ fun_l6_n832(x)
+ end
+end
+
+def fun_l5_n537(x)
+ if (x < 1)
+ fun_l6_n297(x)
+ else
+ fun_l6_n18(x)
+ end
+end
+
+def fun_l5_n538(x)
+ if (x < 1)
+ fun_l6_n188(x)
+ else
+ fun_l6_n537(x)
+ end
+end
+
+def fun_l5_n539(x)
+ if (x < 1)
+ fun_l6_n992(x)
+ else
+ fun_l6_n825(x)
+ end
+end
+
+def fun_l5_n540(x)
+ if (x < 1)
+ fun_l6_n691(x)
+ else
+ fun_l6_n850(x)
+ end
+end
+
+def fun_l5_n541(x)
+ if (x < 1)
+ fun_l6_n858(x)
+ else
+ fun_l6_n948(x)
+ end
+end
+
+def fun_l5_n542(x)
+ if (x < 1)
+ fun_l6_n923(x)
+ else
+ fun_l6_n112(x)
+ end
+end
+
+def fun_l5_n543(x)
+ if (x < 1)
+ fun_l6_n419(x)
+ else
+ fun_l6_n4(x)
+ end
+end
+
+def fun_l5_n544(x)
+ if (x < 1)
+ fun_l6_n766(x)
+ else
+ fun_l6_n147(x)
+ end
+end
+
+def fun_l5_n545(x)
+ if (x < 1)
+ fun_l6_n327(x)
+ else
+ fun_l6_n327(x)
+ end
+end
+
+def fun_l5_n546(x)
+ if (x < 1)
+ fun_l6_n94(x)
+ else
+ fun_l6_n662(x)
+ end
+end
+
+def fun_l5_n547(x)
+ if (x < 1)
+ fun_l6_n764(x)
+ else
+ fun_l6_n521(x)
+ end
+end
+
+def fun_l5_n548(x)
+ if (x < 1)
+ fun_l6_n509(x)
+ else
+ fun_l6_n231(x)
+ end
+end
+
+def fun_l5_n549(x)
+ if (x < 1)
+ fun_l6_n370(x)
+ else
+ fun_l6_n599(x)
+ end
+end
+
+def fun_l5_n550(x)
+ if (x < 1)
+ fun_l6_n710(x)
+ else
+ fun_l6_n104(x)
+ end
+end
+
+def fun_l5_n551(x)
+ if (x < 1)
+ fun_l6_n677(x)
+ else
+ fun_l6_n184(x)
+ end
+end
+
+def fun_l5_n552(x)
+ if (x < 1)
+ fun_l6_n700(x)
+ else
+ fun_l6_n299(x)
+ end
+end
+
+def fun_l5_n553(x)
+ if (x < 1)
+ fun_l6_n688(x)
+ else
+ fun_l6_n934(x)
+ end
+end
+
+def fun_l5_n554(x)
+ if (x < 1)
+ fun_l6_n771(x)
+ else
+ fun_l6_n989(x)
+ end
+end
+
+def fun_l5_n555(x)
+ if (x < 1)
+ fun_l6_n164(x)
+ else
+ fun_l6_n197(x)
+ end
+end
+
+def fun_l5_n556(x)
+ if (x < 1)
+ fun_l6_n901(x)
+ else
+ fun_l6_n235(x)
+ end
+end
+
+def fun_l5_n557(x)
+ if (x < 1)
+ fun_l6_n990(x)
+ else
+ fun_l6_n490(x)
+ end
+end
+
+def fun_l5_n558(x)
+ if (x < 1)
+ fun_l6_n476(x)
+ else
+ fun_l6_n612(x)
+ end
+end
+
+def fun_l5_n559(x)
+ if (x < 1)
+ fun_l6_n761(x)
+ else
+ fun_l6_n3(x)
+ end
+end
+
+def fun_l5_n560(x)
+ if (x < 1)
+ fun_l6_n461(x)
+ else
+ fun_l6_n832(x)
+ end
+end
+
+def fun_l5_n561(x)
+ if (x < 1)
+ fun_l6_n206(x)
+ else
+ fun_l6_n815(x)
+ end
+end
+
+def fun_l5_n562(x)
+ if (x < 1)
+ fun_l6_n180(x)
+ else
+ fun_l6_n640(x)
+ end
+end
+
+def fun_l5_n563(x)
+ if (x < 1)
+ fun_l6_n612(x)
+ else
+ fun_l6_n900(x)
+ end
+end
+
+def fun_l5_n564(x)
+ if (x < 1)
+ fun_l6_n31(x)
+ else
+ fun_l6_n290(x)
+ end
+end
+
+def fun_l5_n565(x)
+ if (x < 1)
+ fun_l6_n322(x)
+ else
+ fun_l6_n136(x)
+ end
+end
+
+def fun_l5_n566(x)
+ if (x < 1)
+ fun_l6_n657(x)
+ else
+ fun_l6_n649(x)
+ end
+end
+
+def fun_l5_n567(x)
+ if (x < 1)
+ fun_l6_n683(x)
+ else
+ fun_l6_n903(x)
+ end
+end
+
+def fun_l5_n568(x)
+ if (x < 1)
+ fun_l6_n391(x)
+ else
+ fun_l6_n117(x)
+ end
+end
+
+def fun_l5_n569(x)
+ if (x < 1)
+ fun_l6_n868(x)
+ else
+ fun_l6_n644(x)
+ end
+end
+
+def fun_l5_n570(x)
+ if (x < 1)
+ fun_l6_n493(x)
+ else
+ fun_l6_n638(x)
+ end
+end
+
+def fun_l5_n571(x)
+ if (x < 1)
+ fun_l6_n207(x)
+ else
+ fun_l6_n650(x)
+ end
+end
+
+def fun_l5_n572(x)
+ if (x < 1)
+ fun_l6_n575(x)
+ else
+ fun_l6_n421(x)
+ end
+end
+
+def fun_l5_n573(x)
+ if (x < 1)
+ fun_l6_n757(x)
+ else
+ fun_l6_n515(x)
+ end
+end
+
+def fun_l5_n574(x)
+ if (x < 1)
+ fun_l6_n619(x)
+ else
+ fun_l6_n39(x)
+ end
+end
+
+def fun_l5_n575(x)
+ if (x < 1)
+ fun_l6_n91(x)
+ else
+ fun_l6_n79(x)
+ end
+end
+
+def fun_l5_n576(x)
+ if (x < 1)
+ fun_l6_n492(x)
+ else
+ fun_l6_n938(x)
+ end
+end
+
+def fun_l5_n577(x)
+ if (x < 1)
+ fun_l6_n181(x)
+ else
+ fun_l6_n98(x)
+ end
+end
+
+def fun_l5_n578(x)
+ if (x < 1)
+ fun_l6_n823(x)
+ else
+ fun_l6_n528(x)
+ end
+end
+
+def fun_l5_n579(x)
+ if (x < 1)
+ fun_l6_n218(x)
+ else
+ fun_l6_n613(x)
+ end
+end
+
+def fun_l5_n580(x)
+ if (x < 1)
+ fun_l6_n81(x)
+ else
+ fun_l6_n318(x)
+ end
+end
+
+def fun_l5_n581(x)
+ if (x < 1)
+ fun_l6_n953(x)
+ else
+ fun_l6_n162(x)
+ end
+end
+
+def fun_l5_n582(x)
+ if (x < 1)
+ fun_l6_n225(x)
+ else
+ fun_l6_n441(x)
+ end
+end
+
+def fun_l5_n583(x)
+ if (x < 1)
+ fun_l6_n862(x)
+ else
+ fun_l6_n939(x)
+ end
+end
+
+def fun_l5_n584(x)
+ if (x < 1)
+ fun_l6_n401(x)
+ else
+ fun_l6_n149(x)
+ end
+end
+
+def fun_l5_n585(x)
+ if (x < 1)
+ fun_l6_n94(x)
+ else
+ fun_l6_n320(x)
+ end
+end
+
+def fun_l5_n586(x)
+ if (x < 1)
+ fun_l6_n609(x)
+ else
+ fun_l6_n524(x)
+ end
+end
+
+def fun_l5_n587(x)
+ if (x < 1)
+ fun_l6_n412(x)
+ else
+ fun_l6_n350(x)
+ end
+end
+
+def fun_l5_n588(x)
+ if (x < 1)
+ fun_l6_n874(x)
+ else
+ fun_l6_n217(x)
+ end
+end
+
+def fun_l5_n589(x)
+ if (x < 1)
+ fun_l6_n989(x)
+ else
+ fun_l6_n62(x)
+ end
+end
+
+def fun_l5_n590(x)
+ if (x < 1)
+ fun_l6_n91(x)
+ else
+ fun_l6_n360(x)
+ end
+end
+
+def fun_l5_n591(x)
+ if (x < 1)
+ fun_l6_n392(x)
+ else
+ fun_l6_n530(x)
+ end
+end
+
+def fun_l5_n592(x)
+ if (x < 1)
+ fun_l6_n635(x)
+ else
+ fun_l6_n268(x)
+ end
+end
+
+def fun_l5_n593(x)
+ if (x < 1)
+ fun_l6_n747(x)
+ else
+ fun_l6_n345(x)
+ end
+end
+
+def fun_l5_n594(x)
+ if (x < 1)
+ fun_l6_n450(x)
+ else
+ fun_l6_n165(x)
+ end
+end
+
+def fun_l5_n595(x)
+ if (x < 1)
+ fun_l6_n960(x)
+ else
+ fun_l6_n256(x)
+ end
+end
+
+def fun_l5_n596(x)
+ if (x < 1)
+ fun_l6_n724(x)
+ else
+ fun_l6_n506(x)
+ end
+end
+
+def fun_l5_n597(x)
+ if (x < 1)
+ fun_l6_n809(x)
+ else
+ fun_l6_n180(x)
+ end
+end
+
+def fun_l5_n598(x)
+ if (x < 1)
+ fun_l6_n799(x)
+ else
+ fun_l6_n59(x)
+ end
+end
+
+def fun_l5_n599(x)
+ if (x < 1)
+ fun_l6_n412(x)
+ else
+ fun_l6_n868(x)
+ end
+end
+
+def fun_l5_n600(x)
+ if (x < 1)
+ fun_l6_n459(x)
+ else
+ fun_l6_n537(x)
+ end
+end
+
+def fun_l5_n601(x)
+ if (x < 1)
+ fun_l6_n321(x)
+ else
+ fun_l6_n39(x)
+ end
+end
+
+def fun_l5_n602(x)
+ if (x < 1)
+ fun_l6_n561(x)
+ else
+ fun_l6_n413(x)
+ end
+end
+
+def fun_l5_n603(x)
+ if (x < 1)
+ fun_l6_n173(x)
+ else
+ fun_l6_n324(x)
+ end
+end
+
+def fun_l5_n604(x)
+ if (x < 1)
+ fun_l6_n583(x)
+ else
+ fun_l6_n763(x)
+ end
+end
+
+def fun_l5_n605(x)
+ if (x < 1)
+ fun_l6_n200(x)
+ else
+ fun_l6_n996(x)
+ end
+end
+
+def fun_l5_n606(x)
+ if (x < 1)
+ fun_l6_n465(x)
+ else
+ fun_l6_n777(x)
+ end
+end
+
+def fun_l5_n607(x)
+ if (x < 1)
+ fun_l6_n744(x)
+ else
+ fun_l6_n917(x)
+ end
+end
+
+def fun_l5_n608(x)
+ if (x < 1)
+ fun_l6_n825(x)
+ else
+ fun_l6_n751(x)
+ end
+end
+
+def fun_l5_n609(x)
+ if (x < 1)
+ fun_l6_n357(x)
+ else
+ fun_l6_n889(x)
+ end
+end
+
+def fun_l5_n610(x)
+ if (x < 1)
+ fun_l6_n534(x)
+ else
+ fun_l6_n628(x)
+ end
+end
+
+def fun_l5_n611(x)
+ if (x < 1)
+ fun_l6_n242(x)
+ else
+ fun_l6_n57(x)
+ end
+end
+
+def fun_l5_n612(x)
+ if (x < 1)
+ fun_l6_n426(x)
+ else
+ fun_l6_n295(x)
+ end
+end
+
+def fun_l5_n613(x)
+ if (x < 1)
+ fun_l6_n218(x)
+ else
+ fun_l6_n194(x)
+ end
+end
+
+def fun_l5_n614(x)
+ if (x < 1)
+ fun_l6_n618(x)
+ else
+ fun_l6_n757(x)
+ end
+end
+
+def fun_l5_n615(x)
+ if (x < 1)
+ fun_l6_n708(x)
+ else
+ fun_l6_n187(x)
+ end
+end
+
+def fun_l5_n616(x)
+ if (x < 1)
+ fun_l6_n824(x)
+ else
+ fun_l6_n384(x)
+ end
+end
+
+def fun_l5_n617(x)
+ if (x < 1)
+ fun_l6_n149(x)
+ else
+ fun_l6_n741(x)
+ end
+end
+
+def fun_l5_n618(x)
+ if (x < 1)
+ fun_l6_n889(x)
+ else
+ fun_l6_n768(x)
+ end
+end
+
+def fun_l5_n619(x)
+ if (x < 1)
+ fun_l6_n144(x)
+ else
+ fun_l6_n746(x)
+ end
+end
+
+def fun_l5_n620(x)
+ if (x < 1)
+ fun_l6_n338(x)
+ else
+ fun_l6_n757(x)
+ end
+end
+
+def fun_l5_n621(x)
+ if (x < 1)
+ fun_l6_n623(x)
+ else
+ fun_l6_n432(x)
+ end
+end
+
+def fun_l5_n622(x)
+ if (x < 1)
+ fun_l6_n139(x)
+ else
+ fun_l6_n162(x)
+ end
+end
+
+def fun_l5_n623(x)
+ if (x < 1)
+ fun_l6_n371(x)
+ else
+ fun_l6_n297(x)
+ end
+end
+
+def fun_l5_n624(x)
+ if (x < 1)
+ fun_l6_n166(x)
+ else
+ fun_l6_n172(x)
+ end
+end
+
+def fun_l5_n625(x)
+ if (x < 1)
+ fun_l6_n506(x)
+ else
+ fun_l6_n7(x)
+ end
+end
+
+def fun_l5_n626(x)
+ if (x < 1)
+ fun_l6_n334(x)
+ else
+ fun_l6_n631(x)
+ end
+end
+
+def fun_l5_n627(x)
+ if (x < 1)
+ fun_l6_n209(x)
+ else
+ fun_l6_n316(x)
+ end
+end
+
+def fun_l5_n628(x)
+ if (x < 1)
+ fun_l6_n461(x)
+ else
+ fun_l6_n34(x)
+ end
+end
+
+def fun_l5_n629(x)
+ if (x < 1)
+ fun_l6_n6(x)
+ else
+ fun_l6_n818(x)
+ end
+end
+
+def fun_l5_n630(x)
+ if (x < 1)
+ fun_l6_n265(x)
+ else
+ fun_l6_n111(x)
+ end
+end
+
+def fun_l5_n631(x)
+ if (x < 1)
+ fun_l6_n493(x)
+ else
+ fun_l6_n64(x)
+ end
+end
+
+def fun_l5_n632(x)
+ if (x < 1)
+ fun_l6_n513(x)
+ else
+ fun_l6_n890(x)
+ end
+end
+
+def fun_l5_n633(x)
+ if (x < 1)
+ fun_l6_n295(x)
+ else
+ fun_l6_n295(x)
+ end
+end
+
+def fun_l5_n634(x)
+ if (x < 1)
+ fun_l6_n158(x)
+ else
+ fun_l6_n971(x)
+ end
+end
+
+def fun_l5_n635(x)
+ if (x < 1)
+ fun_l6_n171(x)
+ else
+ fun_l6_n337(x)
+ end
+end
+
+def fun_l5_n636(x)
+ if (x < 1)
+ fun_l6_n943(x)
+ else
+ fun_l6_n502(x)
+ end
+end
+
+def fun_l5_n637(x)
+ if (x < 1)
+ fun_l6_n339(x)
+ else
+ fun_l6_n638(x)
+ end
+end
+
+def fun_l5_n638(x)
+ if (x < 1)
+ fun_l6_n155(x)
+ else
+ fun_l6_n393(x)
+ end
+end
+
+def fun_l5_n639(x)
+ if (x < 1)
+ fun_l6_n29(x)
+ else
+ fun_l6_n506(x)
+ end
+end
+
+def fun_l5_n640(x)
+ if (x < 1)
+ fun_l6_n677(x)
+ else
+ fun_l6_n606(x)
+ end
+end
+
+def fun_l5_n641(x)
+ if (x < 1)
+ fun_l6_n306(x)
+ else
+ fun_l6_n571(x)
+ end
+end
+
+def fun_l5_n642(x)
+ if (x < 1)
+ fun_l6_n490(x)
+ else
+ fun_l6_n281(x)
+ end
+end
+
+def fun_l5_n643(x)
+ if (x < 1)
+ fun_l6_n392(x)
+ else
+ fun_l6_n686(x)
+ end
+end
+
+def fun_l5_n644(x)
+ if (x < 1)
+ fun_l6_n257(x)
+ else
+ fun_l6_n358(x)
+ end
+end
+
+def fun_l5_n645(x)
+ if (x < 1)
+ fun_l6_n949(x)
+ else
+ fun_l6_n15(x)
+ end
+end
+
+def fun_l5_n646(x)
+ if (x < 1)
+ fun_l6_n866(x)
+ else
+ fun_l6_n657(x)
+ end
+end
+
+def fun_l5_n647(x)
+ if (x < 1)
+ fun_l6_n624(x)
+ else
+ fun_l6_n390(x)
+ end
+end
+
+def fun_l5_n648(x)
+ if (x < 1)
+ fun_l6_n394(x)
+ else
+ fun_l6_n951(x)
+ end
+end
+
+def fun_l5_n649(x)
+ if (x < 1)
+ fun_l6_n99(x)
+ else
+ fun_l6_n160(x)
+ end
+end
+
+def fun_l5_n650(x)
+ if (x < 1)
+ fun_l6_n84(x)
+ else
+ fun_l6_n111(x)
+ end
+end
+
+def fun_l5_n651(x)
+ if (x < 1)
+ fun_l6_n635(x)
+ else
+ fun_l6_n507(x)
+ end
+end
+
+def fun_l5_n652(x)
+ if (x < 1)
+ fun_l6_n674(x)
+ else
+ fun_l6_n501(x)
+ end
+end
+
+def fun_l5_n653(x)
+ if (x < 1)
+ fun_l6_n171(x)
+ else
+ fun_l6_n645(x)
+ end
+end
+
+def fun_l5_n654(x)
+ if (x < 1)
+ fun_l6_n327(x)
+ else
+ fun_l6_n152(x)
+ end
+end
+
+def fun_l5_n655(x)
+ if (x < 1)
+ fun_l6_n210(x)
+ else
+ fun_l6_n441(x)
+ end
+end
+
+def fun_l5_n656(x)
+ if (x < 1)
+ fun_l6_n691(x)
+ else
+ fun_l6_n813(x)
+ end
+end
+
+def fun_l5_n657(x)
+ if (x < 1)
+ fun_l6_n671(x)
+ else
+ fun_l6_n683(x)
+ end
+end
+
+def fun_l5_n658(x)
+ if (x < 1)
+ fun_l6_n939(x)
+ else
+ fun_l6_n580(x)
+ end
+end
+
+def fun_l5_n659(x)
+ if (x < 1)
+ fun_l6_n152(x)
+ else
+ fun_l6_n159(x)
+ end
+end
+
+def fun_l5_n660(x)
+ if (x < 1)
+ fun_l6_n50(x)
+ else
+ fun_l6_n911(x)
+ end
+end
+
+def fun_l5_n661(x)
+ if (x < 1)
+ fun_l6_n700(x)
+ else
+ fun_l6_n972(x)
+ end
+end
+
+def fun_l5_n662(x)
+ if (x < 1)
+ fun_l6_n22(x)
+ else
+ fun_l6_n82(x)
+ end
+end
+
+def fun_l5_n663(x)
+ if (x < 1)
+ fun_l6_n51(x)
+ else
+ fun_l6_n827(x)
+ end
+end
+
+def fun_l5_n664(x)
+ if (x < 1)
+ fun_l6_n997(x)
+ else
+ fun_l6_n289(x)
+ end
+end
+
+def fun_l5_n665(x)
+ if (x < 1)
+ fun_l6_n666(x)
+ else
+ fun_l6_n775(x)
+ end
+end
+
+def fun_l5_n666(x)
+ if (x < 1)
+ fun_l6_n373(x)
+ else
+ fun_l6_n175(x)
+ end
+end
+
+def fun_l5_n667(x)
+ if (x < 1)
+ fun_l6_n551(x)
+ else
+ fun_l6_n772(x)
+ end
+end
+
+def fun_l5_n668(x)
+ if (x < 1)
+ fun_l6_n107(x)
+ else
+ fun_l6_n197(x)
+ end
+end
+
+def fun_l5_n669(x)
+ if (x < 1)
+ fun_l6_n244(x)
+ else
+ fun_l6_n968(x)
+ end
+end
+
+def fun_l5_n670(x)
+ if (x < 1)
+ fun_l6_n798(x)
+ else
+ fun_l6_n30(x)
+ end
+end
+
+def fun_l5_n671(x)
+ if (x < 1)
+ fun_l6_n48(x)
+ else
+ fun_l6_n186(x)
+ end
+end
+
+def fun_l5_n672(x)
+ if (x < 1)
+ fun_l6_n373(x)
+ else
+ fun_l6_n937(x)
+ end
+end
+
+def fun_l5_n673(x)
+ if (x < 1)
+ fun_l6_n759(x)
+ else
+ fun_l6_n92(x)
+ end
+end
+
+def fun_l5_n674(x)
+ if (x < 1)
+ fun_l6_n380(x)
+ else
+ fun_l6_n772(x)
+ end
+end
+
+def fun_l5_n675(x)
+ if (x < 1)
+ fun_l6_n916(x)
+ else
+ fun_l6_n329(x)
+ end
+end
+
+def fun_l5_n676(x)
+ if (x < 1)
+ fun_l6_n110(x)
+ else
+ fun_l6_n951(x)
+ end
+end
+
+def fun_l5_n677(x)
+ if (x < 1)
+ fun_l6_n363(x)
+ else
+ fun_l6_n35(x)
+ end
+end
+
+def fun_l5_n678(x)
+ if (x < 1)
+ fun_l6_n484(x)
+ else
+ fun_l6_n492(x)
+ end
+end
+
+def fun_l5_n679(x)
+ if (x < 1)
+ fun_l6_n801(x)
+ else
+ fun_l6_n279(x)
+ end
+end
+
+def fun_l5_n680(x)
+ if (x < 1)
+ fun_l6_n499(x)
+ else
+ fun_l6_n561(x)
+ end
+end
+
+def fun_l5_n681(x)
+ if (x < 1)
+ fun_l6_n800(x)
+ else
+ fun_l6_n890(x)
+ end
+end
+
+def fun_l5_n682(x)
+ if (x < 1)
+ fun_l6_n191(x)
+ else
+ fun_l6_n686(x)
+ end
+end
+
+def fun_l5_n683(x)
+ if (x < 1)
+ fun_l6_n318(x)
+ else
+ fun_l6_n683(x)
+ end
+end
+
+def fun_l5_n684(x)
+ if (x < 1)
+ fun_l6_n500(x)
+ else
+ fun_l6_n914(x)
+ end
+end
+
+def fun_l5_n685(x)
+ if (x < 1)
+ fun_l6_n24(x)
+ else
+ fun_l6_n945(x)
+ end
+end
+
+def fun_l5_n686(x)
+ if (x < 1)
+ fun_l6_n602(x)
+ else
+ fun_l6_n291(x)
+ end
+end
+
+def fun_l5_n687(x)
+ if (x < 1)
+ fun_l6_n999(x)
+ else
+ fun_l6_n86(x)
+ end
+end
+
+def fun_l5_n688(x)
+ if (x < 1)
+ fun_l6_n106(x)
+ else
+ fun_l6_n754(x)
+ end
+end
+
+def fun_l5_n689(x)
+ if (x < 1)
+ fun_l6_n452(x)
+ else
+ fun_l6_n229(x)
+ end
+end
+
+def fun_l5_n690(x)
+ if (x < 1)
+ fun_l6_n672(x)
+ else
+ fun_l6_n587(x)
+ end
+end
+
+def fun_l5_n691(x)
+ if (x < 1)
+ fun_l6_n532(x)
+ else
+ fun_l6_n56(x)
+ end
+end
+
+def fun_l5_n692(x)
+ if (x < 1)
+ fun_l6_n606(x)
+ else
+ fun_l6_n552(x)
+ end
+end
+
+def fun_l5_n693(x)
+ if (x < 1)
+ fun_l6_n742(x)
+ else
+ fun_l6_n862(x)
+ end
+end
+
+def fun_l5_n694(x)
+ if (x < 1)
+ fun_l6_n964(x)
+ else
+ fun_l6_n475(x)
+ end
+end
+
+def fun_l5_n695(x)
+ if (x < 1)
+ fun_l6_n179(x)
+ else
+ fun_l6_n947(x)
+ end
+end
+
+def fun_l5_n696(x)
+ if (x < 1)
+ fun_l6_n563(x)
+ else
+ fun_l6_n329(x)
+ end
+end
+
+def fun_l5_n697(x)
+ if (x < 1)
+ fun_l6_n786(x)
+ else
+ fun_l6_n502(x)
+ end
+end
+
+def fun_l5_n698(x)
+ if (x < 1)
+ fun_l6_n178(x)
+ else
+ fun_l6_n757(x)
+ end
+end
+
+def fun_l5_n699(x)
+ if (x < 1)
+ fun_l6_n248(x)
+ else
+ fun_l6_n288(x)
+ end
+end
+
+def fun_l5_n700(x)
+ if (x < 1)
+ fun_l6_n262(x)
+ else
+ fun_l6_n650(x)
+ end
+end
+
+def fun_l5_n701(x)
+ if (x < 1)
+ fun_l6_n90(x)
+ else
+ fun_l6_n964(x)
+ end
+end
+
+def fun_l5_n702(x)
+ if (x < 1)
+ fun_l6_n864(x)
+ else
+ fun_l6_n743(x)
+ end
+end
+
+def fun_l5_n703(x)
+ if (x < 1)
+ fun_l6_n816(x)
+ else
+ fun_l6_n364(x)
+ end
+end
+
+def fun_l5_n704(x)
+ if (x < 1)
+ fun_l6_n590(x)
+ else
+ fun_l6_n434(x)
+ end
+end
+
+def fun_l5_n705(x)
+ if (x < 1)
+ fun_l6_n875(x)
+ else
+ fun_l6_n539(x)
+ end
+end
+
+def fun_l5_n706(x)
+ if (x < 1)
+ fun_l6_n964(x)
+ else
+ fun_l6_n564(x)
+ end
+end
+
+def fun_l5_n707(x)
+ if (x < 1)
+ fun_l6_n315(x)
+ else
+ fun_l6_n460(x)
+ end
+end
+
+def fun_l5_n708(x)
+ if (x < 1)
+ fun_l6_n139(x)
+ else
+ fun_l6_n210(x)
+ end
+end
+
+def fun_l5_n709(x)
+ if (x < 1)
+ fun_l6_n593(x)
+ else
+ fun_l6_n933(x)
+ end
+end
+
+def fun_l5_n710(x)
+ if (x < 1)
+ fun_l6_n37(x)
+ else
+ fun_l6_n459(x)
+ end
+end
+
+def fun_l5_n711(x)
+ if (x < 1)
+ fun_l6_n768(x)
+ else
+ fun_l6_n256(x)
+ end
+end
+
+def fun_l5_n712(x)
+ if (x < 1)
+ fun_l6_n506(x)
+ else
+ fun_l6_n936(x)
+ end
+end
+
+def fun_l5_n713(x)
+ if (x < 1)
+ fun_l6_n971(x)
+ else
+ fun_l6_n575(x)
+ end
+end
+
+def fun_l5_n714(x)
+ if (x < 1)
+ fun_l6_n498(x)
+ else
+ fun_l6_n932(x)
+ end
+end
+
+def fun_l5_n715(x)
+ if (x < 1)
+ fun_l6_n362(x)
+ else
+ fun_l6_n949(x)
+ end
+end
+
+def fun_l5_n716(x)
+ if (x < 1)
+ fun_l6_n706(x)
+ else
+ fun_l6_n788(x)
+ end
+end
+
+def fun_l5_n717(x)
+ if (x < 1)
+ fun_l6_n405(x)
+ else
+ fun_l6_n803(x)
+ end
+end
+
+def fun_l5_n718(x)
+ if (x < 1)
+ fun_l6_n166(x)
+ else
+ fun_l6_n917(x)
+ end
+end
+
+def fun_l5_n719(x)
+ if (x < 1)
+ fun_l6_n899(x)
+ else
+ fun_l6_n836(x)
+ end
+end
+
+def fun_l5_n720(x)
+ if (x < 1)
+ fun_l6_n805(x)
+ else
+ fun_l6_n159(x)
+ end
+end
+
+def fun_l5_n721(x)
+ if (x < 1)
+ fun_l6_n960(x)
+ else
+ fun_l6_n113(x)
+ end
+end
+
+def fun_l5_n722(x)
+ if (x < 1)
+ fun_l6_n807(x)
+ else
+ fun_l6_n533(x)
+ end
+end
+
+def fun_l5_n723(x)
+ if (x < 1)
+ fun_l6_n480(x)
+ else
+ fun_l6_n907(x)
+ end
+end
+
+def fun_l5_n724(x)
+ if (x < 1)
+ fun_l6_n951(x)
+ else
+ fun_l6_n793(x)
+ end
+end
+
+def fun_l5_n725(x)
+ if (x < 1)
+ fun_l6_n951(x)
+ else
+ fun_l6_n771(x)
+ end
+end
+
+def fun_l5_n726(x)
+ if (x < 1)
+ fun_l6_n435(x)
+ else
+ fun_l6_n336(x)
+ end
+end
+
+def fun_l5_n727(x)
+ if (x < 1)
+ fun_l6_n222(x)
+ else
+ fun_l6_n393(x)
+ end
+end
+
+def fun_l5_n728(x)
+ if (x < 1)
+ fun_l6_n988(x)
+ else
+ fun_l6_n402(x)
+ end
+end
+
+def fun_l5_n729(x)
+ if (x < 1)
+ fun_l6_n9(x)
+ else
+ fun_l6_n46(x)
+ end
+end
+
+def fun_l5_n730(x)
+ if (x < 1)
+ fun_l6_n722(x)
+ else
+ fun_l6_n112(x)
+ end
+end
+
+def fun_l5_n731(x)
+ if (x < 1)
+ fun_l6_n543(x)
+ else
+ fun_l6_n813(x)
+ end
+end
+
+def fun_l5_n732(x)
+ if (x < 1)
+ fun_l6_n337(x)
+ else
+ fun_l6_n245(x)
+ end
+end
+
+def fun_l5_n733(x)
+ if (x < 1)
+ fun_l6_n84(x)
+ else
+ fun_l6_n335(x)
+ end
+end
+
+def fun_l5_n734(x)
+ if (x < 1)
+ fun_l6_n697(x)
+ else
+ fun_l6_n498(x)
+ end
+end
+
+def fun_l5_n735(x)
+ if (x < 1)
+ fun_l6_n2(x)
+ else
+ fun_l6_n895(x)
+ end
+end
+
+def fun_l5_n736(x)
+ if (x < 1)
+ fun_l6_n619(x)
+ else
+ fun_l6_n163(x)
+ end
+end
+
+def fun_l5_n737(x)
+ if (x < 1)
+ fun_l6_n237(x)
+ else
+ fun_l6_n6(x)
+ end
+end
+
+def fun_l5_n738(x)
+ if (x < 1)
+ fun_l6_n259(x)
+ else
+ fun_l6_n95(x)
+ end
+end
+
+def fun_l5_n739(x)
+ if (x < 1)
+ fun_l6_n98(x)
+ else
+ fun_l6_n331(x)
+ end
+end
+
+def fun_l5_n740(x)
+ if (x < 1)
+ fun_l6_n489(x)
+ else
+ fun_l6_n305(x)
+ end
+end
+
+def fun_l5_n741(x)
+ if (x < 1)
+ fun_l6_n493(x)
+ else
+ fun_l6_n525(x)
+ end
+end
+
+def fun_l5_n742(x)
+ if (x < 1)
+ fun_l6_n269(x)
+ else
+ fun_l6_n742(x)
+ end
+end
+
+def fun_l5_n743(x)
+ if (x < 1)
+ fun_l6_n194(x)
+ else
+ fun_l6_n254(x)
+ end
+end
+
+def fun_l5_n744(x)
+ if (x < 1)
+ fun_l6_n247(x)
+ else
+ fun_l6_n909(x)
+ end
+end
+
+def fun_l5_n745(x)
+ if (x < 1)
+ fun_l6_n388(x)
+ else
+ fun_l6_n657(x)
+ end
+end
+
+def fun_l5_n746(x)
+ if (x < 1)
+ fun_l6_n27(x)
+ else
+ fun_l6_n286(x)
+ end
+end
+
+def fun_l5_n747(x)
+ if (x < 1)
+ fun_l6_n659(x)
+ else
+ fun_l6_n895(x)
+ end
+end
+
+def fun_l5_n748(x)
+ if (x < 1)
+ fun_l6_n538(x)
+ else
+ fun_l6_n667(x)
+ end
+end
+
+def fun_l5_n749(x)
+ if (x < 1)
+ fun_l6_n208(x)
+ else
+ fun_l6_n493(x)
+ end
+end
+
+def fun_l5_n750(x)
+ if (x < 1)
+ fun_l6_n326(x)
+ else
+ fun_l6_n570(x)
+ end
+end
+
+def fun_l5_n751(x)
+ if (x < 1)
+ fun_l6_n437(x)
+ else
+ fun_l6_n716(x)
+ end
+end
+
+def fun_l5_n752(x)
+ if (x < 1)
+ fun_l6_n957(x)
+ else
+ fun_l6_n231(x)
+ end
+end
+
+def fun_l5_n753(x)
+ if (x < 1)
+ fun_l6_n846(x)
+ else
+ fun_l6_n900(x)
+ end
+end
+
+def fun_l5_n754(x)
+ if (x < 1)
+ fun_l6_n81(x)
+ else
+ fun_l6_n464(x)
+ end
+end
+
+def fun_l5_n755(x)
+ if (x < 1)
+ fun_l6_n735(x)
+ else
+ fun_l6_n232(x)
+ end
+end
+
+def fun_l5_n756(x)
+ if (x < 1)
+ fun_l6_n577(x)
+ else
+ fun_l6_n804(x)
+ end
+end
+
+def fun_l5_n757(x)
+ if (x < 1)
+ fun_l6_n363(x)
+ else
+ fun_l6_n155(x)
+ end
+end
+
+def fun_l5_n758(x)
+ if (x < 1)
+ fun_l6_n534(x)
+ else
+ fun_l6_n827(x)
+ end
+end
+
+def fun_l5_n759(x)
+ if (x < 1)
+ fun_l6_n711(x)
+ else
+ fun_l6_n53(x)
+ end
+end
+
+def fun_l5_n760(x)
+ if (x < 1)
+ fun_l6_n80(x)
+ else
+ fun_l6_n734(x)
+ end
+end
+
+def fun_l5_n761(x)
+ if (x < 1)
+ fun_l6_n811(x)
+ else
+ fun_l6_n691(x)
+ end
+end
+
+def fun_l5_n762(x)
+ if (x < 1)
+ fun_l6_n847(x)
+ else
+ fun_l6_n570(x)
+ end
+end
+
+def fun_l5_n763(x)
+ if (x < 1)
+ fun_l6_n30(x)
+ else
+ fun_l6_n283(x)
+ end
+end
+
+def fun_l5_n764(x)
+ if (x < 1)
+ fun_l6_n270(x)
+ else
+ fun_l6_n965(x)
+ end
+end
+
+def fun_l5_n765(x)
+ if (x < 1)
+ fun_l6_n936(x)
+ else
+ fun_l6_n772(x)
+ end
+end
+
+def fun_l5_n766(x)
+ if (x < 1)
+ fun_l6_n181(x)
+ else
+ fun_l6_n682(x)
+ end
+end
+
+def fun_l5_n767(x)
+ if (x < 1)
+ fun_l6_n327(x)
+ else
+ fun_l6_n5(x)
+ end
+end
+
+def fun_l5_n768(x)
+ if (x < 1)
+ fun_l6_n296(x)
+ else
+ fun_l6_n940(x)
+ end
+end
+
+def fun_l5_n769(x)
+ if (x < 1)
+ fun_l6_n543(x)
+ else
+ fun_l6_n871(x)
+ end
+end
+
+def fun_l5_n770(x)
+ if (x < 1)
+ fun_l6_n670(x)
+ else
+ fun_l6_n128(x)
+ end
+end
+
+def fun_l5_n771(x)
+ if (x < 1)
+ fun_l6_n184(x)
+ else
+ fun_l6_n794(x)
+ end
+end
+
+def fun_l5_n772(x)
+ if (x < 1)
+ fun_l6_n571(x)
+ else
+ fun_l6_n337(x)
+ end
+end
+
+def fun_l5_n773(x)
+ if (x < 1)
+ fun_l6_n674(x)
+ else
+ fun_l6_n712(x)
+ end
+end
+
+def fun_l5_n774(x)
+ if (x < 1)
+ fun_l6_n572(x)
+ else
+ fun_l6_n944(x)
+ end
+end
+
+def fun_l5_n775(x)
+ if (x < 1)
+ fun_l6_n122(x)
+ else
+ fun_l6_n897(x)
+ end
+end
+
+def fun_l5_n776(x)
+ if (x < 1)
+ fun_l6_n461(x)
+ else
+ fun_l6_n202(x)
+ end
+end
+
+def fun_l5_n777(x)
+ if (x < 1)
+ fun_l6_n99(x)
+ else
+ fun_l6_n256(x)
+ end
+end
+
+def fun_l5_n778(x)
+ if (x < 1)
+ fun_l6_n547(x)
+ else
+ fun_l6_n138(x)
+ end
+end
+
+def fun_l5_n779(x)
+ if (x < 1)
+ fun_l6_n56(x)
+ else
+ fun_l6_n682(x)
+ end
+end
+
+def fun_l5_n780(x)
+ if (x < 1)
+ fun_l6_n10(x)
+ else
+ fun_l6_n238(x)
+ end
+end
+
+def fun_l5_n781(x)
+ if (x < 1)
+ fun_l6_n577(x)
+ else
+ fun_l6_n590(x)
+ end
+end
+
+def fun_l5_n782(x)
+ if (x < 1)
+ fun_l6_n415(x)
+ else
+ fun_l6_n522(x)
+ end
+end
+
+def fun_l5_n783(x)
+ if (x < 1)
+ fun_l6_n255(x)
+ else
+ fun_l6_n182(x)
+ end
+end
+
+def fun_l5_n784(x)
+ if (x < 1)
+ fun_l6_n755(x)
+ else
+ fun_l6_n644(x)
+ end
+end
+
+def fun_l5_n785(x)
+ if (x < 1)
+ fun_l6_n39(x)
+ else
+ fun_l6_n296(x)
+ end
+end
+
+def fun_l5_n786(x)
+ if (x < 1)
+ fun_l6_n17(x)
+ else
+ fun_l6_n811(x)
+ end
+end
+
+def fun_l5_n787(x)
+ if (x < 1)
+ fun_l6_n814(x)
+ else
+ fun_l6_n989(x)
+ end
+end
+
+def fun_l5_n788(x)
+ if (x < 1)
+ fun_l6_n791(x)
+ else
+ fun_l6_n688(x)
+ end
+end
+
+def fun_l5_n789(x)
+ if (x < 1)
+ fun_l6_n415(x)
+ else
+ fun_l6_n218(x)
+ end
+end
+
+def fun_l5_n790(x)
+ if (x < 1)
+ fun_l6_n227(x)
+ else
+ fun_l6_n391(x)
+ end
+end
+
+def fun_l5_n791(x)
+ if (x < 1)
+ fun_l6_n232(x)
+ else
+ fun_l6_n644(x)
+ end
+end
+
+def fun_l5_n792(x)
+ if (x < 1)
+ fun_l6_n325(x)
+ else
+ fun_l6_n740(x)
+ end
+end
+
+def fun_l5_n793(x)
+ if (x < 1)
+ fun_l6_n926(x)
+ else
+ fun_l6_n133(x)
+ end
+end
+
+def fun_l5_n794(x)
+ if (x < 1)
+ fun_l6_n114(x)
+ else
+ fun_l6_n76(x)
+ end
+end
+
+def fun_l5_n795(x)
+ if (x < 1)
+ fun_l6_n332(x)
+ else
+ fun_l6_n198(x)
+ end
+end
+
+def fun_l5_n796(x)
+ if (x < 1)
+ fun_l6_n584(x)
+ else
+ fun_l6_n298(x)
+ end
+end
+
+def fun_l5_n797(x)
+ if (x < 1)
+ fun_l6_n966(x)
+ else
+ fun_l6_n956(x)
+ end
+end
+
+def fun_l5_n798(x)
+ if (x < 1)
+ fun_l6_n604(x)
+ else
+ fun_l6_n311(x)
+ end
+end
+
+def fun_l5_n799(x)
+ if (x < 1)
+ fun_l6_n444(x)
+ else
+ fun_l6_n934(x)
+ end
+end
+
+def fun_l5_n800(x)
+ if (x < 1)
+ fun_l6_n805(x)
+ else
+ fun_l6_n83(x)
+ end
+end
+
+def fun_l5_n801(x)
+ if (x < 1)
+ fun_l6_n996(x)
+ else
+ fun_l6_n282(x)
+ end
+end
+
+def fun_l5_n802(x)
+ if (x < 1)
+ fun_l6_n759(x)
+ else
+ fun_l6_n681(x)
+ end
+end
+
+def fun_l5_n803(x)
+ if (x < 1)
+ fun_l6_n480(x)
+ else
+ fun_l6_n536(x)
+ end
+end
+
+def fun_l5_n804(x)
+ if (x < 1)
+ fun_l6_n536(x)
+ else
+ fun_l6_n64(x)
+ end
+end
+
+def fun_l5_n805(x)
+ if (x < 1)
+ fun_l6_n992(x)
+ else
+ fun_l6_n116(x)
+ end
+end
+
+def fun_l5_n806(x)
+ if (x < 1)
+ fun_l6_n446(x)
+ else
+ fun_l6_n553(x)
+ end
+end
+
+def fun_l5_n807(x)
+ if (x < 1)
+ fun_l6_n822(x)
+ else
+ fun_l6_n80(x)
+ end
+end
+
+def fun_l5_n808(x)
+ if (x < 1)
+ fun_l6_n912(x)
+ else
+ fun_l6_n525(x)
+ end
+end
+
+def fun_l5_n809(x)
+ if (x < 1)
+ fun_l6_n824(x)
+ else
+ fun_l6_n356(x)
+ end
+end
+
+def fun_l5_n810(x)
+ if (x < 1)
+ fun_l6_n144(x)
+ else
+ fun_l6_n193(x)
+ end
+end
+
+def fun_l5_n811(x)
+ if (x < 1)
+ fun_l6_n27(x)
+ else
+ fun_l6_n810(x)
+ end
+end
+
+def fun_l5_n812(x)
+ if (x < 1)
+ fun_l6_n244(x)
+ else
+ fun_l6_n696(x)
+ end
+end
+
+def fun_l5_n813(x)
+ if (x < 1)
+ fun_l6_n408(x)
+ else
+ fun_l6_n46(x)
+ end
+end
+
+def fun_l5_n814(x)
+ if (x < 1)
+ fun_l6_n496(x)
+ else
+ fun_l6_n149(x)
+ end
+end
+
+def fun_l5_n815(x)
+ if (x < 1)
+ fun_l6_n100(x)
+ else
+ fun_l6_n765(x)
+ end
+end
+
+def fun_l5_n816(x)
+ if (x < 1)
+ fun_l6_n731(x)
+ else
+ fun_l6_n953(x)
+ end
+end
+
+def fun_l5_n817(x)
+ if (x < 1)
+ fun_l6_n997(x)
+ else
+ fun_l6_n849(x)
+ end
+end
+
+def fun_l5_n818(x)
+ if (x < 1)
+ fun_l6_n570(x)
+ else
+ fun_l6_n918(x)
+ end
+end
+
+def fun_l5_n819(x)
+ if (x < 1)
+ fun_l6_n473(x)
+ else
+ fun_l6_n955(x)
+ end
+end
+
+def fun_l5_n820(x)
+ if (x < 1)
+ fun_l6_n691(x)
+ else
+ fun_l6_n271(x)
+ end
+end
+
+def fun_l5_n821(x)
+ if (x < 1)
+ fun_l6_n935(x)
+ else
+ fun_l6_n386(x)
+ end
+end
+
+def fun_l5_n822(x)
+ if (x < 1)
+ fun_l6_n210(x)
+ else
+ fun_l6_n871(x)
+ end
+end
+
+def fun_l5_n823(x)
+ if (x < 1)
+ fun_l6_n907(x)
+ else
+ fun_l6_n596(x)
+ end
+end
+
+def fun_l5_n824(x)
+ if (x < 1)
+ fun_l6_n701(x)
+ else
+ fun_l6_n541(x)
+ end
+end
+
+def fun_l5_n825(x)
+ if (x < 1)
+ fun_l6_n477(x)
+ else
+ fun_l6_n207(x)
+ end
+end
+
+def fun_l5_n826(x)
+ if (x < 1)
+ fun_l6_n95(x)
+ else
+ fun_l6_n26(x)
+ end
+end
+
+def fun_l5_n827(x)
+ if (x < 1)
+ fun_l6_n908(x)
+ else
+ fun_l6_n369(x)
+ end
+end
+
+def fun_l5_n828(x)
+ if (x < 1)
+ fun_l6_n213(x)
+ else
+ fun_l6_n607(x)
+ end
+end
+
+def fun_l5_n829(x)
+ if (x < 1)
+ fun_l6_n763(x)
+ else
+ fun_l6_n753(x)
+ end
+end
+
+def fun_l5_n830(x)
+ if (x < 1)
+ fun_l6_n24(x)
+ else
+ fun_l6_n157(x)
+ end
+end
+
+def fun_l5_n831(x)
+ if (x < 1)
+ fun_l6_n262(x)
+ else
+ fun_l6_n826(x)
+ end
+end
+
+def fun_l5_n832(x)
+ if (x < 1)
+ fun_l6_n743(x)
+ else
+ fun_l6_n37(x)
+ end
+end
+
+def fun_l5_n833(x)
+ if (x < 1)
+ fun_l6_n532(x)
+ else
+ fun_l6_n31(x)
+ end
+end
+
+def fun_l5_n834(x)
+ if (x < 1)
+ fun_l6_n309(x)
+ else
+ fun_l6_n454(x)
+ end
+end
+
+def fun_l5_n835(x)
+ if (x < 1)
+ fun_l6_n917(x)
+ else
+ fun_l6_n721(x)
+ end
+end
+
+def fun_l5_n836(x)
+ if (x < 1)
+ fun_l6_n376(x)
+ else
+ fun_l6_n758(x)
+ end
+end
+
+def fun_l5_n837(x)
+ if (x < 1)
+ fun_l6_n558(x)
+ else
+ fun_l6_n474(x)
+ end
+end
+
+def fun_l5_n838(x)
+ if (x < 1)
+ fun_l6_n436(x)
+ else
+ fun_l6_n675(x)
+ end
+end
+
+def fun_l5_n839(x)
+ if (x < 1)
+ fun_l6_n720(x)
+ else
+ fun_l6_n12(x)
+ end
+end
+
+def fun_l5_n840(x)
+ if (x < 1)
+ fun_l6_n957(x)
+ else
+ fun_l6_n200(x)
+ end
+end
+
+def fun_l5_n841(x)
+ if (x < 1)
+ fun_l6_n180(x)
+ else
+ fun_l6_n644(x)
+ end
+end
+
+def fun_l5_n842(x)
+ if (x < 1)
+ fun_l6_n510(x)
+ else
+ fun_l6_n73(x)
+ end
+end
+
+def fun_l5_n843(x)
+ if (x < 1)
+ fun_l6_n812(x)
+ else
+ fun_l6_n954(x)
+ end
+end
+
+def fun_l5_n844(x)
+ if (x < 1)
+ fun_l6_n566(x)
+ else
+ fun_l6_n866(x)
+ end
+end
+
+def fun_l5_n845(x)
+ if (x < 1)
+ fun_l6_n641(x)
+ else
+ fun_l6_n11(x)
+ end
+end
+
+def fun_l5_n846(x)
+ if (x < 1)
+ fun_l6_n607(x)
+ else
+ fun_l6_n884(x)
+ end
+end
+
+def fun_l5_n847(x)
+ if (x < 1)
+ fun_l6_n479(x)
+ else
+ fun_l6_n564(x)
+ end
+end
+
+def fun_l5_n848(x)
+ if (x < 1)
+ fun_l6_n365(x)
+ else
+ fun_l6_n285(x)
+ end
+end
+
+def fun_l5_n849(x)
+ if (x < 1)
+ fun_l6_n296(x)
+ else
+ fun_l6_n708(x)
+ end
+end
+
+def fun_l5_n850(x)
+ if (x < 1)
+ fun_l6_n429(x)
+ else
+ fun_l6_n758(x)
+ end
+end
+
+def fun_l5_n851(x)
+ if (x < 1)
+ fun_l6_n881(x)
+ else
+ fun_l6_n848(x)
+ end
+end
+
+def fun_l5_n852(x)
+ if (x < 1)
+ fun_l6_n257(x)
+ else
+ fun_l6_n51(x)
+ end
+end
+
+def fun_l5_n853(x)
+ if (x < 1)
+ fun_l6_n441(x)
+ else
+ fun_l6_n445(x)
+ end
+end
+
+def fun_l5_n854(x)
+ if (x < 1)
+ fun_l6_n80(x)
+ else
+ fun_l6_n767(x)
+ end
+end
+
+def fun_l5_n855(x)
+ if (x < 1)
+ fun_l6_n196(x)
+ else
+ fun_l6_n41(x)
+ end
+end
+
+def fun_l5_n856(x)
+ if (x < 1)
+ fun_l6_n548(x)
+ else
+ fun_l6_n860(x)
+ end
+end
+
+def fun_l5_n857(x)
+ if (x < 1)
+ fun_l6_n380(x)
+ else
+ fun_l6_n601(x)
+ end
+end
+
+def fun_l5_n858(x)
+ if (x < 1)
+ fun_l6_n272(x)
+ else
+ fun_l6_n376(x)
+ end
+end
+
+def fun_l5_n859(x)
+ if (x < 1)
+ fun_l6_n179(x)
+ else
+ fun_l6_n978(x)
+ end
+end
+
+def fun_l5_n860(x)
+ if (x < 1)
+ fun_l6_n52(x)
+ else
+ fun_l6_n827(x)
+ end
+end
+
+def fun_l5_n861(x)
+ if (x < 1)
+ fun_l6_n611(x)
+ else
+ fun_l6_n929(x)
+ end
+end
+
+def fun_l5_n862(x)
+ if (x < 1)
+ fun_l6_n179(x)
+ else
+ fun_l6_n171(x)
+ end
+end
+
+def fun_l5_n863(x)
+ if (x < 1)
+ fun_l6_n611(x)
+ else
+ fun_l6_n663(x)
+ end
+end
+
+def fun_l5_n864(x)
+ if (x < 1)
+ fun_l6_n539(x)
+ else
+ fun_l6_n356(x)
+ end
+end
+
+def fun_l5_n865(x)
+ if (x < 1)
+ fun_l6_n401(x)
+ else
+ fun_l6_n302(x)
+ end
+end
+
+def fun_l5_n866(x)
+ if (x < 1)
+ fun_l6_n94(x)
+ else
+ fun_l6_n761(x)
+ end
+end
+
+def fun_l5_n867(x)
+ if (x < 1)
+ fun_l6_n818(x)
+ else
+ fun_l6_n500(x)
+ end
+end
+
+def fun_l5_n868(x)
+ if (x < 1)
+ fun_l6_n956(x)
+ else
+ fun_l6_n661(x)
+ end
+end
+
+def fun_l5_n869(x)
+ if (x < 1)
+ fun_l6_n628(x)
+ else
+ fun_l6_n765(x)
+ end
+end
+
+def fun_l5_n870(x)
+ if (x < 1)
+ fun_l6_n654(x)
+ else
+ fun_l6_n181(x)
+ end
+end
+
+def fun_l5_n871(x)
+ if (x < 1)
+ fun_l6_n70(x)
+ else
+ fun_l6_n157(x)
+ end
+end
+
+def fun_l5_n872(x)
+ if (x < 1)
+ fun_l6_n133(x)
+ else
+ fun_l6_n806(x)
+ end
+end
+
+def fun_l5_n873(x)
+ if (x < 1)
+ fun_l6_n100(x)
+ else
+ fun_l6_n479(x)
+ end
+end
+
+def fun_l5_n874(x)
+ if (x < 1)
+ fun_l6_n401(x)
+ else
+ fun_l6_n567(x)
+ end
+end
+
+def fun_l5_n875(x)
+ if (x < 1)
+ fun_l6_n399(x)
+ else
+ fun_l6_n369(x)
+ end
+end
+
+def fun_l5_n876(x)
+ if (x < 1)
+ fun_l6_n412(x)
+ else
+ fun_l6_n763(x)
+ end
+end
+
+def fun_l5_n877(x)
+ if (x < 1)
+ fun_l6_n498(x)
+ else
+ fun_l6_n192(x)
+ end
+end
+
+def fun_l5_n878(x)
+ if (x < 1)
+ fun_l6_n798(x)
+ else
+ fun_l6_n473(x)
+ end
+end
+
+def fun_l5_n879(x)
+ if (x < 1)
+ fun_l6_n166(x)
+ else
+ fun_l6_n301(x)
+ end
+end
+
+def fun_l5_n880(x)
+ if (x < 1)
+ fun_l6_n616(x)
+ else
+ fun_l6_n28(x)
+ end
+end
+
+def fun_l5_n881(x)
+ if (x < 1)
+ fun_l6_n315(x)
+ else
+ fun_l6_n92(x)
+ end
+end
+
+def fun_l5_n882(x)
+ if (x < 1)
+ fun_l6_n548(x)
+ else
+ fun_l6_n41(x)
+ end
+end
+
+def fun_l5_n883(x)
+ if (x < 1)
+ fun_l6_n279(x)
+ else
+ fun_l6_n72(x)
+ end
+end
+
+def fun_l5_n884(x)
+ if (x < 1)
+ fun_l6_n206(x)
+ else
+ fun_l6_n384(x)
+ end
+end
+
+def fun_l5_n885(x)
+ if (x < 1)
+ fun_l6_n191(x)
+ else
+ fun_l6_n84(x)
+ end
+end
+
+def fun_l5_n886(x)
+ if (x < 1)
+ fun_l6_n960(x)
+ else
+ fun_l6_n495(x)
+ end
+end
+
+def fun_l5_n887(x)
+ if (x < 1)
+ fun_l6_n459(x)
+ else
+ fun_l6_n757(x)
+ end
+end
+
+def fun_l5_n888(x)
+ if (x < 1)
+ fun_l6_n634(x)
+ else
+ fun_l6_n463(x)
+ end
+end
+
+def fun_l5_n889(x)
+ if (x < 1)
+ fun_l6_n611(x)
+ else
+ fun_l6_n469(x)
+ end
+end
+
+def fun_l5_n890(x)
+ if (x < 1)
+ fun_l6_n787(x)
+ else
+ fun_l6_n707(x)
+ end
+end
+
+def fun_l5_n891(x)
+ if (x < 1)
+ fun_l6_n201(x)
+ else
+ fun_l6_n223(x)
+ end
+end
+
+def fun_l5_n892(x)
+ if (x < 1)
+ fun_l6_n214(x)
+ else
+ fun_l6_n303(x)
+ end
+end
+
+def fun_l5_n893(x)
+ if (x < 1)
+ fun_l6_n85(x)
+ else
+ fun_l6_n802(x)
+ end
+end
+
+def fun_l5_n894(x)
+ if (x < 1)
+ fun_l6_n816(x)
+ else
+ fun_l6_n325(x)
+ end
+end
+
+def fun_l5_n895(x)
+ if (x < 1)
+ fun_l6_n491(x)
+ else
+ fun_l6_n907(x)
+ end
+end
+
+def fun_l5_n896(x)
+ if (x < 1)
+ fun_l6_n809(x)
+ else
+ fun_l6_n364(x)
+ end
+end
+
+def fun_l5_n897(x)
+ if (x < 1)
+ fun_l6_n739(x)
+ else
+ fun_l6_n192(x)
+ end
+end
+
+def fun_l5_n898(x)
+ if (x < 1)
+ fun_l6_n461(x)
+ else
+ fun_l6_n594(x)
+ end
+end
+
+def fun_l5_n899(x)
+ if (x < 1)
+ fun_l6_n256(x)
+ else
+ fun_l6_n521(x)
+ end
+end
+
+def fun_l5_n900(x)
+ if (x < 1)
+ fun_l6_n6(x)
+ else
+ fun_l6_n127(x)
+ end
+end
+
+def fun_l5_n901(x)
+ if (x < 1)
+ fun_l6_n655(x)
+ else
+ fun_l6_n426(x)
+ end
+end
+
+def fun_l5_n902(x)
+ if (x < 1)
+ fun_l6_n936(x)
+ else
+ fun_l6_n275(x)
+ end
+end
+
+def fun_l5_n903(x)
+ if (x < 1)
+ fun_l6_n738(x)
+ else
+ fun_l6_n654(x)
+ end
+end
+
+def fun_l5_n904(x)
+ if (x < 1)
+ fun_l6_n583(x)
+ else
+ fun_l6_n600(x)
+ end
+end
+
+def fun_l5_n905(x)
+ if (x < 1)
+ fun_l6_n228(x)
+ else
+ fun_l6_n591(x)
+ end
+end
+
+def fun_l5_n906(x)
+ if (x < 1)
+ fun_l6_n292(x)
+ else
+ fun_l6_n55(x)
+ end
+end
+
+def fun_l5_n907(x)
+ if (x < 1)
+ fun_l6_n457(x)
+ else
+ fun_l6_n513(x)
+ end
+end
+
+def fun_l5_n908(x)
+ if (x < 1)
+ fun_l6_n542(x)
+ else
+ fun_l6_n593(x)
+ end
+end
+
+def fun_l5_n909(x)
+ if (x < 1)
+ fun_l6_n478(x)
+ else
+ fun_l6_n782(x)
+ end
+end
+
+def fun_l5_n910(x)
+ if (x < 1)
+ fun_l6_n780(x)
+ else
+ fun_l6_n275(x)
+ end
+end
+
+def fun_l5_n911(x)
+ if (x < 1)
+ fun_l6_n631(x)
+ else
+ fun_l6_n811(x)
+ end
+end
+
+def fun_l5_n912(x)
+ if (x < 1)
+ fun_l6_n17(x)
+ else
+ fun_l6_n837(x)
+ end
+end
+
+def fun_l5_n913(x)
+ if (x < 1)
+ fun_l6_n607(x)
+ else
+ fun_l6_n159(x)
+ end
+end
+
+def fun_l5_n914(x)
+ if (x < 1)
+ fun_l6_n23(x)
+ else
+ fun_l6_n70(x)
+ end
+end
+
+def fun_l5_n915(x)
+ if (x < 1)
+ fun_l6_n778(x)
+ else
+ fun_l6_n643(x)
+ end
+end
+
+def fun_l5_n916(x)
+ if (x < 1)
+ fun_l6_n707(x)
+ else
+ fun_l6_n121(x)
+ end
+end
+
+def fun_l5_n917(x)
+ if (x < 1)
+ fun_l6_n816(x)
+ else
+ fun_l6_n67(x)
+ end
+end
+
+def fun_l5_n918(x)
+ if (x < 1)
+ fun_l6_n963(x)
+ else
+ fun_l6_n520(x)
+ end
+end
+
+def fun_l5_n919(x)
+ if (x < 1)
+ fun_l6_n251(x)
+ else
+ fun_l6_n111(x)
+ end
+end
+
+def fun_l5_n920(x)
+ if (x < 1)
+ fun_l6_n198(x)
+ else
+ fun_l6_n872(x)
+ end
+end
+
+def fun_l5_n921(x)
+ if (x < 1)
+ fun_l6_n364(x)
+ else
+ fun_l6_n369(x)
+ end
+end
+
+def fun_l5_n922(x)
+ if (x < 1)
+ fun_l6_n7(x)
+ else
+ fun_l6_n314(x)
+ end
+end
+
+def fun_l5_n923(x)
+ if (x < 1)
+ fun_l6_n578(x)
+ else
+ fun_l6_n502(x)
+ end
+end
+
+def fun_l5_n924(x)
+ if (x < 1)
+ fun_l6_n450(x)
+ else
+ fun_l6_n680(x)
+ end
+end
+
+def fun_l5_n925(x)
+ if (x < 1)
+ fun_l6_n469(x)
+ else
+ fun_l6_n973(x)
+ end
+end
+
+def fun_l5_n926(x)
+ if (x < 1)
+ fun_l6_n114(x)
+ else
+ fun_l6_n862(x)
+ end
+end
+
+def fun_l5_n927(x)
+ if (x < 1)
+ fun_l6_n786(x)
+ else
+ fun_l6_n861(x)
+ end
+end
+
+def fun_l5_n928(x)
+ if (x < 1)
+ fun_l6_n40(x)
+ else
+ fun_l6_n665(x)
+ end
+end
+
+def fun_l5_n929(x)
+ if (x < 1)
+ fun_l6_n997(x)
+ else
+ fun_l6_n137(x)
+ end
+end
+
+def fun_l5_n930(x)
+ if (x < 1)
+ fun_l6_n547(x)
+ else
+ fun_l6_n547(x)
+ end
+end
+
+def fun_l5_n931(x)
+ if (x < 1)
+ fun_l6_n310(x)
+ else
+ fun_l6_n986(x)
+ end
+end
+
+def fun_l5_n932(x)
+ if (x < 1)
+ fun_l6_n339(x)
+ else
+ fun_l6_n18(x)
+ end
+end
+
+def fun_l5_n933(x)
+ if (x < 1)
+ fun_l6_n825(x)
+ else
+ fun_l6_n418(x)
+ end
+end
+
+def fun_l5_n934(x)
+ if (x < 1)
+ fun_l6_n509(x)
+ else
+ fun_l6_n589(x)
+ end
+end
+
+def fun_l5_n935(x)
+ if (x < 1)
+ fun_l6_n936(x)
+ else
+ fun_l6_n113(x)
+ end
+end
+
+def fun_l5_n936(x)
+ if (x < 1)
+ fun_l6_n530(x)
+ else
+ fun_l6_n841(x)
+ end
+end
+
+def fun_l5_n937(x)
+ if (x < 1)
+ fun_l6_n431(x)
+ else
+ fun_l6_n531(x)
+ end
+end
+
+def fun_l5_n938(x)
+ if (x < 1)
+ fun_l6_n791(x)
+ else
+ fun_l6_n41(x)
+ end
+end
+
+def fun_l5_n939(x)
+ if (x < 1)
+ fun_l6_n873(x)
+ else
+ fun_l6_n336(x)
+ end
+end
+
+def fun_l5_n940(x)
+ if (x < 1)
+ fun_l6_n925(x)
+ else
+ fun_l6_n746(x)
+ end
+end
+
+def fun_l5_n941(x)
+ if (x < 1)
+ fun_l6_n995(x)
+ else
+ fun_l6_n29(x)
+ end
+end
+
+def fun_l5_n942(x)
+ if (x < 1)
+ fun_l6_n984(x)
+ else
+ fun_l6_n455(x)
+ end
+end
+
+def fun_l5_n943(x)
+ if (x < 1)
+ fun_l6_n660(x)
+ else
+ fun_l6_n934(x)
+ end
+end
+
+def fun_l5_n944(x)
+ if (x < 1)
+ fun_l6_n625(x)
+ else
+ fun_l6_n523(x)
+ end
+end
+
+def fun_l5_n945(x)
+ if (x < 1)
+ fun_l6_n407(x)
+ else
+ fun_l6_n766(x)
+ end
+end
+
+def fun_l5_n946(x)
+ if (x < 1)
+ fun_l6_n80(x)
+ else
+ fun_l6_n75(x)
+ end
+end
+
+def fun_l5_n947(x)
+ if (x < 1)
+ fun_l6_n465(x)
+ else
+ fun_l6_n57(x)
+ end
+end
+
+def fun_l5_n948(x)
+ if (x < 1)
+ fun_l6_n750(x)
+ else
+ fun_l6_n278(x)
+ end
+end
+
+def fun_l5_n949(x)
+ if (x < 1)
+ fun_l6_n917(x)
+ else
+ fun_l6_n472(x)
+ end
+end
+
+def fun_l5_n950(x)
+ if (x < 1)
+ fun_l6_n917(x)
+ else
+ fun_l6_n71(x)
+ end
+end
+
+def fun_l5_n951(x)
+ if (x < 1)
+ fun_l6_n420(x)
+ else
+ fun_l6_n132(x)
+ end
+end
+
+def fun_l5_n952(x)
+ if (x < 1)
+ fun_l6_n112(x)
+ else
+ fun_l6_n396(x)
+ end
+end
+
+def fun_l5_n953(x)
+ if (x < 1)
+ fun_l6_n705(x)
+ else
+ fun_l6_n978(x)
+ end
+end
+
+def fun_l5_n954(x)
+ if (x < 1)
+ fun_l6_n761(x)
+ else
+ fun_l6_n136(x)
+ end
+end
+
+def fun_l5_n955(x)
+ if (x < 1)
+ fun_l6_n518(x)
+ else
+ fun_l6_n687(x)
+ end
+end
+
+def fun_l5_n956(x)
+ if (x < 1)
+ fun_l6_n308(x)
+ else
+ fun_l6_n34(x)
+ end
+end
+
+def fun_l5_n957(x)
+ if (x < 1)
+ fun_l6_n904(x)
+ else
+ fun_l6_n129(x)
+ end
+end
+
+def fun_l5_n958(x)
+ if (x < 1)
+ fun_l6_n271(x)
+ else
+ fun_l6_n444(x)
+ end
+end
+
+def fun_l5_n959(x)
+ if (x < 1)
+ fun_l6_n690(x)
+ else
+ fun_l6_n118(x)
+ end
+end
+
+def fun_l5_n960(x)
+ if (x < 1)
+ fun_l6_n509(x)
+ else
+ fun_l6_n957(x)
+ end
+end
+
+def fun_l5_n961(x)
+ if (x < 1)
+ fun_l6_n889(x)
+ else
+ fun_l6_n26(x)
+ end
+end
+
+def fun_l5_n962(x)
+ if (x < 1)
+ fun_l6_n802(x)
+ else
+ fun_l6_n364(x)
+ end
+end
+
+def fun_l5_n963(x)
+ if (x < 1)
+ fun_l6_n368(x)
+ else
+ fun_l6_n580(x)
+ end
+end
+
+def fun_l5_n964(x)
+ if (x < 1)
+ fun_l6_n879(x)
+ else
+ fun_l6_n925(x)
+ end
+end
+
+def fun_l5_n965(x)
+ if (x < 1)
+ fun_l6_n114(x)
+ else
+ fun_l6_n882(x)
+ end
+end
+
+def fun_l5_n966(x)
+ if (x < 1)
+ fun_l6_n9(x)
+ else
+ fun_l6_n5(x)
+ end
+end
+
+def fun_l5_n967(x)
+ if (x < 1)
+ fun_l6_n536(x)
+ else
+ fun_l6_n251(x)
+ end
+end
+
+def fun_l5_n968(x)
+ if (x < 1)
+ fun_l6_n804(x)
+ else
+ fun_l6_n179(x)
+ end
+end
+
+def fun_l5_n969(x)
+ if (x < 1)
+ fun_l6_n469(x)
+ else
+ fun_l6_n235(x)
+ end
+end
+
+def fun_l5_n970(x)
+ if (x < 1)
+ fun_l6_n328(x)
+ else
+ fun_l6_n763(x)
+ end
+end
+
+def fun_l5_n971(x)
+ if (x < 1)
+ fun_l6_n342(x)
+ else
+ fun_l6_n126(x)
+ end
+end
+
+def fun_l5_n972(x)
+ if (x < 1)
+ fun_l6_n901(x)
+ else
+ fun_l6_n674(x)
+ end
+end
+
+def fun_l5_n973(x)
+ if (x < 1)
+ fun_l6_n853(x)
+ else
+ fun_l6_n714(x)
+ end
+end
+
+def fun_l5_n974(x)
+ if (x < 1)
+ fun_l6_n670(x)
+ else
+ fun_l6_n905(x)
+ end
+end
+
+def fun_l5_n975(x)
+ if (x < 1)
+ fun_l6_n873(x)
+ else
+ fun_l6_n193(x)
+ end
+end
+
+def fun_l5_n976(x)
+ if (x < 1)
+ fun_l6_n603(x)
+ else
+ fun_l6_n186(x)
+ end
+end
+
+def fun_l5_n977(x)
+ if (x < 1)
+ fun_l6_n474(x)
+ else
+ fun_l6_n108(x)
+ end
+end
+
+def fun_l5_n978(x)
+ if (x < 1)
+ fun_l6_n347(x)
+ else
+ fun_l6_n872(x)
+ end
+end
+
+def fun_l5_n979(x)
+ if (x < 1)
+ fun_l6_n593(x)
+ else
+ fun_l6_n575(x)
+ end
+end
+
+def fun_l5_n980(x)
+ if (x < 1)
+ fun_l6_n692(x)
+ else
+ fun_l6_n262(x)
+ end
+end
+
+def fun_l5_n981(x)
+ if (x < 1)
+ fun_l6_n226(x)
+ else
+ fun_l6_n600(x)
+ end
+end
+
+def fun_l5_n982(x)
+ if (x < 1)
+ fun_l6_n357(x)
+ else
+ fun_l6_n165(x)
+ end
+end
+
+def fun_l5_n983(x)
+ if (x < 1)
+ fun_l6_n784(x)
+ else
+ fun_l6_n584(x)
+ end
+end
+
+def fun_l5_n984(x)
+ if (x < 1)
+ fun_l6_n339(x)
+ else
+ fun_l6_n754(x)
+ end
+end
+
+def fun_l5_n985(x)
+ if (x < 1)
+ fun_l6_n536(x)
+ else
+ fun_l6_n663(x)
+ end
+end
+
+def fun_l5_n986(x)
+ if (x < 1)
+ fun_l6_n239(x)
+ else
+ fun_l6_n723(x)
+ end
+end
+
+def fun_l5_n987(x)
+ if (x < 1)
+ fun_l6_n928(x)
+ else
+ fun_l6_n403(x)
+ end
+end
+
+def fun_l5_n988(x)
+ if (x < 1)
+ fun_l6_n328(x)
+ else
+ fun_l6_n551(x)
+ end
+end
+
+def fun_l5_n989(x)
+ if (x < 1)
+ fun_l6_n847(x)
+ else
+ fun_l6_n475(x)
+ end
+end
+
+def fun_l5_n990(x)
+ if (x < 1)
+ fun_l6_n405(x)
+ else
+ fun_l6_n39(x)
+ end
+end
+
+def fun_l5_n991(x)
+ if (x < 1)
+ fun_l6_n705(x)
+ else
+ fun_l6_n281(x)
+ end
+end
+
+def fun_l5_n992(x)
+ if (x < 1)
+ fun_l6_n59(x)
+ else
+ fun_l6_n465(x)
+ end
+end
+
+def fun_l5_n993(x)
+ if (x < 1)
+ fun_l6_n828(x)
+ else
+ fun_l6_n705(x)
+ end
+end
+
+def fun_l5_n994(x)
+ if (x < 1)
+ fun_l6_n687(x)
+ else
+ fun_l6_n451(x)
+ end
+end
+
+def fun_l5_n995(x)
+ if (x < 1)
+ fun_l6_n600(x)
+ else
+ fun_l6_n9(x)
+ end
+end
+
+def fun_l5_n996(x)
+ if (x < 1)
+ fun_l6_n205(x)
+ else
+ fun_l6_n242(x)
+ end
+end
+
+def fun_l5_n997(x)
+ if (x < 1)
+ fun_l6_n438(x)
+ else
+ fun_l6_n108(x)
+ end
+end
+
+def fun_l5_n998(x)
+ if (x < 1)
+ fun_l6_n164(x)
+ else
+ fun_l6_n302(x)
+ end
+end
+
+def fun_l5_n999(x)
+ if (x < 1)
+ fun_l6_n533(x)
+ else
+ fun_l6_n685(x)
+ end
+end
+
+def fun_l6_n0(x)
+ if (x < 1)
+ fun_l7_n74(x)
+ else
+ fun_l7_n45(x)
+ end
+end
+
+def fun_l6_n1(x)
+ if (x < 1)
+ fun_l7_n685(x)
+ else
+ fun_l7_n163(x)
+ end
+end
+
+def fun_l6_n2(x)
+ if (x < 1)
+ fun_l7_n325(x)
+ else
+ fun_l7_n365(x)
+ end
+end
+
+def fun_l6_n3(x)
+ if (x < 1)
+ fun_l7_n855(x)
+ else
+ fun_l7_n359(x)
+ end
+end
+
+def fun_l6_n4(x)
+ if (x < 1)
+ fun_l7_n939(x)
+ else
+ fun_l7_n690(x)
+ end
+end
+
+def fun_l6_n5(x)
+ if (x < 1)
+ fun_l7_n689(x)
+ else
+ fun_l7_n681(x)
+ end
+end
+
+def fun_l6_n6(x)
+ if (x < 1)
+ fun_l7_n226(x)
+ else
+ fun_l7_n307(x)
+ end
+end
+
+def fun_l6_n7(x)
+ if (x < 1)
+ fun_l7_n779(x)
+ else
+ fun_l7_n765(x)
+ end
+end
+
+def fun_l6_n8(x)
+ if (x < 1)
+ fun_l7_n85(x)
+ else
+ fun_l7_n967(x)
+ end
+end
+
+def fun_l6_n9(x)
+ if (x < 1)
+ fun_l7_n539(x)
+ else
+ fun_l7_n5(x)
+ end
+end
+
+def fun_l6_n10(x)
+ if (x < 1)
+ fun_l7_n503(x)
+ else
+ fun_l7_n163(x)
+ end
+end
+
+def fun_l6_n11(x)
+ if (x < 1)
+ fun_l7_n24(x)
+ else
+ fun_l7_n374(x)
+ end
+end
+
+def fun_l6_n12(x)
+ if (x < 1)
+ fun_l7_n633(x)
+ else
+ fun_l7_n395(x)
+ end
+end
+
+def fun_l6_n13(x)
+ if (x < 1)
+ fun_l7_n250(x)
+ else
+ fun_l7_n7(x)
+ end
+end
+
+def fun_l6_n14(x)
+ if (x < 1)
+ fun_l7_n22(x)
+ else
+ fun_l7_n560(x)
+ end
+end
+
+def fun_l6_n15(x)
+ if (x < 1)
+ fun_l7_n209(x)
+ else
+ fun_l7_n323(x)
+ end
+end
+
+def fun_l6_n16(x)
+ if (x < 1)
+ fun_l7_n770(x)
+ else
+ fun_l7_n155(x)
+ end
+end
+
+def fun_l6_n17(x)
+ if (x < 1)
+ fun_l7_n976(x)
+ else
+ fun_l7_n712(x)
+ end
+end
+
+def fun_l6_n18(x)
+ if (x < 1)
+ fun_l7_n762(x)
+ else
+ fun_l7_n307(x)
+ end
+end
+
+def fun_l6_n19(x)
+ if (x < 1)
+ fun_l7_n911(x)
+ else
+ fun_l7_n788(x)
+ end
+end
+
+def fun_l6_n20(x)
+ if (x < 1)
+ fun_l7_n40(x)
+ else
+ fun_l7_n269(x)
+ end
+end
+
+def fun_l6_n21(x)
+ if (x < 1)
+ fun_l7_n707(x)
+ else
+ fun_l7_n861(x)
+ end
+end
+
+def fun_l6_n22(x)
+ if (x < 1)
+ fun_l7_n591(x)
+ else
+ fun_l7_n557(x)
+ end
+end
+
+def fun_l6_n23(x)
+ if (x < 1)
+ fun_l7_n890(x)
+ else
+ fun_l7_n142(x)
+ end
+end
+
+def fun_l6_n24(x)
+ if (x < 1)
+ fun_l7_n563(x)
+ else
+ fun_l7_n509(x)
+ end
+end
+
+def fun_l6_n25(x)
+ if (x < 1)
+ fun_l7_n630(x)
+ else
+ fun_l7_n784(x)
+ end
+end
+
+def fun_l6_n26(x)
+ if (x < 1)
+ fun_l7_n30(x)
+ else
+ fun_l7_n826(x)
+ end
+end
+
+def fun_l6_n27(x)
+ if (x < 1)
+ fun_l7_n223(x)
+ else
+ fun_l7_n800(x)
+ end
+end
+
+def fun_l6_n28(x)
+ if (x < 1)
+ fun_l7_n51(x)
+ else
+ fun_l7_n963(x)
+ end
+end
+
+def fun_l6_n29(x)
+ if (x < 1)
+ fun_l7_n603(x)
+ else
+ fun_l7_n988(x)
+ end
+end
+
+def fun_l6_n30(x)
+ if (x < 1)
+ fun_l7_n258(x)
+ else
+ fun_l7_n512(x)
+ end
+end
+
+def fun_l6_n31(x)
+ if (x < 1)
+ fun_l7_n649(x)
+ else
+ fun_l7_n772(x)
+ end
+end
+
+def fun_l6_n32(x)
+ if (x < 1)
+ fun_l7_n999(x)
+ else
+ fun_l7_n592(x)
+ end
+end
+
+def fun_l6_n33(x)
+ if (x < 1)
+ fun_l7_n371(x)
+ else
+ fun_l7_n801(x)
+ end
+end
+
+def fun_l6_n34(x)
+ if (x < 1)
+ fun_l7_n905(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n35(x)
+ if (x < 1)
+ fun_l7_n142(x)
+ else
+ fun_l7_n933(x)
+ end
+end
+
+def fun_l6_n36(x)
+ if (x < 1)
+ fun_l7_n987(x)
+ else
+ fun_l7_n305(x)
+ end
+end
+
+def fun_l6_n37(x)
+ if (x < 1)
+ fun_l7_n360(x)
+ else
+ fun_l7_n266(x)
+ end
+end
+
+def fun_l6_n38(x)
+ if (x < 1)
+ fun_l7_n799(x)
+ else
+ fun_l7_n938(x)
+ end
+end
+
+def fun_l6_n39(x)
+ if (x < 1)
+ fun_l7_n921(x)
+ else
+ fun_l7_n739(x)
+ end
+end
+
+def fun_l6_n40(x)
+ if (x < 1)
+ fun_l7_n553(x)
+ else
+ fun_l7_n236(x)
+ end
+end
+
+def fun_l6_n41(x)
+ if (x < 1)
+ fun_l7_n592(x)
+ else
+ fun_l7_n335(x)
+ end
+end
+
+def fun_l6_n42(x)
+ if (x < 1)
+ fun_l7_n33(x)
+ else
+ fun_l7_n521(x)
+ end
+end
+
+def fun_l6_n43(x)
+ if (x < 1)
+ fun_l7_n278(x)
+ else
+ fun_l7_n866(x)
+ end
+end
+
+def fun_l6_n44(x)
+ if (x < 1)
+ fun_l7_n808(x)
+ else
+ fun_l7_n394(x)
+ end
+end
+
+def fun_l6_n45(x)
+ if (x < 1)
+ fun_l7_n556(x)
+ else
+ fun_l7_n462(x)
+ end
+end
+
+def fun_l6_n46(x)
+ if (x < 1)
+ fun_l7_n72(x)
+ else
+ fun_l7_n558(x)
+ end
+end
+
+def fun_l6_n47(x)
+ if (x < 1)
+ fun_l7_n583(x)
+ else
+ fun_l7_n472(x)
+ end
+end
+
+def fun_l6_n48(x)
+ if (x < 1)
+ fun_l7_n577(x)
+ else
+ fun_l7_n264(x)
+ end
+end
+
+def fun_l6_n49(x)
+ if (x < 1)
+ fun_l7_n167(x)
+ else
+ fun_l7_n570(x)
+ end
+end
+
+def fun_l6_n50(x)
+ if (x < 1)
+ fun_l7_n707(x)
+ else
+ fun_l7_n127(x)
+ end
+end
+
+def fun_l6_n51(x)
+ if (x < 1)
+ fun_l7_n151(x)
+ else
+ fun_l7_n82(x)
+ end
+end
+
+def fun_l6_n52(x)
+ if (x < 1)
+ fun_l7_n729(x)
+ else
+ fun_l7_n785(x)
+ end
+end
+
+def fun_l6_n53(x)
+ if (x < 1)
+ fun_l7_n236(x)
+ else
+ fun_l7_n84(x)
+ end
+end
+
+def fun_l6_n54(x)
+ if (x < 1)
+ fun_l7_n573(x)
+ else
+ fun_l7_n92(x)
+ end
+end
+
+def fun_l6_n55(x)
+ if (x < 1)
+ fun_l7_n601(x)
+ else
+ fun_l7_n531(x)
+ end
+end
+
+def fun_l6_n56(x)
+ if (x < 1)
+ fun_l7_n623(x)
+ else
+ fun_l7_n522(x)
+ end
+end
+
+def fun_l6_n57(x)
+ if (x < 1)
+ fun_l7_n707(x)
+ else
+ fun_l7_n830(x)
+ end
+end
+
+def fun_l6_n58(x)
+ if (x < 1)
+ fun_l7_n240(x)
+ else
+ fun_l7_n868(x)
+ end
+end
+
+def fun_l6_n59(x)
+ if (x < 1)
+ fun_l7_n233(x)
+ else
+ fun_l7_n595(x)
+ end
+end
+
+def fun_l6_n60(x)
+ if (x < 1)
+ fun_l7_n384(x)
+ else
+ fun_l7_n605(x)
+ end
+end
+
+def fun_l6_n61(x)
+ if (x < 1)
+ fun_l7_n721(x)
+ else
+ fun_l7_n509(x)
+ end
+end
+
+def fun_l6_n62(x)
+ if (x < 1)
+ fun_l7_n741(x)
+ else
+ fun_l7_n934(x)
+ end
+end
+
+def fun_l6_n63(x)
+ if (x < 1)
+ fun_l7_n724(x)
+ else
+ fun_l7_n963(x)
+ end
+end
+
+def fun_l6_n64(x)
+ if (x < 1)
+ fun_l7_n144(x)
+ else
+ fun_l7_n417(x)
+ end
+end
+
+def fun_l6_n65(x)
+ if (x < 1)
+ fun_l7_n618(x)
+ else
+ fun_l7_n19(x)
+ end
+end
+
+def fun_l6_n66(x)
+ if (x < 1)
+ fun_l7_n128(x)
+ else
+ fun_l7_n257(x)
+ end
+end
+
+def fun_l6_n67(x)
+ if (x < 1)
+ fun_l7_n623(x)
+ else
+ fun_l7_n182(x)
+ end
+end
+
+def fun_l6_n68(x)
+ if (x < 1)
+ fun_l7_n256(x)
+ else
+ fun_l7_n692(x)
+ end
+end
+
+def fun_l6_n69(x)
+ if (x < 1)
+ fun_l7_n360(x)
+ else
+ fun_l7_n34(x)
+ end
+end
+
+def fun_l6_n70(x)
+ if (x < 1)
+ fun_l7_n690(x)
+ else
+ fun_l7_n813(x)
+ end
+end
+
+def fun_l6_n71(x)
+ if (x < 1)
+ fun_l7_n533(x)
+ else
+ fun_l7_n94(x)
+ end
+end
+
+def fun_l6_n72(x)
+ if (x < 1)
+ fun_l7_n245(x)
+ else
+ fun_l7_n548(x)
+ end
+end
+
+def fun_l6_n73(x)
+ if (x < 1)
+ fun_l7_n919(x)
+ else
+ fun_l7_n295(x)
+ end
+end
+
+def fun_l6_n74(x)
+ if (x < 1)
+ fun_l7_n925(x)
+ else
+ fun_l7_n965(x)
+ end
+end
+
+def fun_l6_n75(x)
+ if (x < 1)
+ fun_l7_n825(x)
+ else
+ fun_l7_n79(x)
+ end
+end
+
+def fun_l6_n76(x)
+ if (x < 1)
+ fun_l7_n812(x)
+ else
+ fun_l7_n96(x)
+ end
+end
+
+def fun_l6_n77(x)
+ if (x < 1)
+ fun_l7_n688(x)
+ else
+ fun_l7_n424(x)
+ end
+end
+
+def fun_l6_n78(x)
+ if (x < 1)
+ fun_l7_n171(x)
+ else
+ fun_l7_n728(x)
+ end
+end
+
+def fun_l6_n79(x)
+ if (x < 1)
+ fun_l7_n786(x)
+ else
+ fun_l7_n135(x)
+ end
+end
+
+def fun_l6_n80(x)
+ if (x < 1)
+ fun_l7_n622(x)
+ else
+ fun_l7_n3(x)
+ end
+end
+
+def fun_l6_n81(x)
+ if (x < 1)
+ fun_l7_n386(x)
+ else
+ fun_l7_n946(x)
+ end
+end
+
+def fun_l6_n82(x)
+ if (x < 1)
+ fun_l7_n192(x)
+ else
+ fun_l7_n253(x)
+ end
+end
+
+def fun_l6_n83(x)
+ if (x < 1)
+ fun_l7_n534(x)
+ else
+ fun_l7_n4(x)
+ end
+end
+
+def fun_l6_n84(x)
+ if (x < 1)
+ fun_l7_n198(x)
+ else
+ fun_l7_n455(x)
+ end
+end
+
+def fun_l6_n85(x)
+ if (x < 1)
+ fun_l7_n471(x)
+ else
+ fun_l7_n26(x)
+ end
+end
+
+def fun_l6_n86(x)
+ if (x < 1)
+ fun_l7_n147(x)
+ else
+ fun_l7_n893(x)
+ end
+end
+
+def fun_l6_n87(x)
+ if (x < 1)
+ fun_l7_n424(x)
+ else
+ fun_l7_n713(x)
+ end
+end
+
+def fun_l6_n88(x)
+ if (x < 1)
+ fun_l7_n867(x)
+ else
+ fun_l7_n561(x)
+ end
+end
+
+def fun_l6_n89(x)
+ if (x < 1)
+ fun_l7_n64(x)
+ else
+ fun_l7_n662(x)
+ end
+end
+
+def fun_l6_n90(x)
+ if (x < 1)
+ fun_l7_n849(x)
+ else
+ fun_l7_n105(x)
+ end
+end
+
+def fun_l6_n91(x)
+ if (x < 1)
+ fun_l7_n564(x)
+ else
+ fun_l7_n758(x)
+ end
+end
+
+def fun_l6_n92(x)
+ if (x < 1)
+ fun_l7_n433(x)
+ else
+ fun_l7_n713(x)
+ end
+end
+
+def fun_l6_n93(x)
+ if (x < 1)
+ fun_l7_n283(x)
+ else
+ fun_l7_n577(x)
+ end
+end
+
+def fun_l6_n94(x)
+ if (x < 1)
+ fun_l7_n951(x)
+ else
+ fun_l7_n48(x)
+ end
+end
+
+def fun_l6_n95(x)
+ if (x < 1)
+ fun_l7_n966(x)
+ else
+ fun_l7_n789(x)
+ end
+end
+
+def fun_l6_n96(x)
+ if (x < 1)
+ fun_l7_n954(x)
+ else
+ fun_l7_n431(x)
+ end
+end
+
+def fun_l6_n97(x)
+ if (x < 1)
+ fun_l7_n720(x)
+ else
+ fun_l7_n847(x)
+ end
+end
+
+def fun_l6_n98(x)
+ if (x < 1)
+ fun_l7_n517(x)
+ else
+ fun_l7_n378(x)
+ end
+end
+
+def fun_l6_n99(x)
+ if (x < 1)
+ fun_l7_n951(x)
+ else
+ fun_l7_n688(x)
+ end
+end
+
+def fun_l6_n100(x)
+ if (x < 1)
+ fun_l7_n163(x)
+ else
+ fun_l7_n540(x)
+ end
+end
+
+def fun_l6_n101(x)
+ if (x < 1)
+ fun_l7_n423(x)
+ else
+ fun_l7_n10(x)
+ end
+end
+
+def fun_l6_n102(x)
+ if (x < 1)
+ fun_l7_n346(x)
+ else
+ fun_l7_n409(x)
+ end
+end
+
+def fun_l6_n103(x)
+ if (x < 1)
+ fun_l7_n686(x)
+ else
+ fun_l7_n432(x)
+ end
+end
+
+def fun_l6_n104(x)
+ if (x < 1)
+ fun_l7_n144(x)
+ else
+ fun_l7_n510(x)
+ end
+end
+
+def fun_l6_n105(x)
+ if (x < 1)
+ fun_l7_n568(x)
+ else
+ fun_l7_n756(x)
+ end
+end
+
+def fun_l6_n106(x)
+ if (x < 1)
+ fun_l7_n708(x)
+ else
+ fun_l7_n199(x)
+ end
+end
+
+def fun_l6_n107(x)
+ if (x < 1)
+ fun_l7_n823(x)
+ else
+ fun_l7_n969(x)
+ end
+end
+
+def fun_l6_n108(x)
+ if (x < 1)
+ fun_l7_n156(x)
+ else
+ fun_l7_n211(x)
+ end
+end
+
+def fun_l6_n109(x)
+ if (x < 1)
+ fun_l7_n527(x)
+ else
+ fun_l7_n791(x)
+ end
+end
+
+def fun_l6_n110(x)
+ if (x < 1)
+ fun_l7_n392(x)
+ else
+ fun_l7_n314(x)
+ end
+end
+
+def fun_l6_n111(x)
+ if (x < 1)
+ fun_l7_n355(x)
+ else
+ fun_l7_n222(x)
+ end
+end
+
+def fun_l6_n112(x)
+ if (x < 1)
+ fun_l7_n683(x)
+ else
+ fun_l7_n735(x)
+ end
+end
+
+def fun_l6_n113(x)
+ if (x < 1)
+ fun_l7_n38(x)
+ else
+ fun_l7_n874(x)
+ end
+end
+
+def fun_l6_n114(x)
+ if (x < 1)
+ fun_l7_n190(x)
+ else
+ fun_l7_n209(x)
+ end
+end
+
+def fun_l6_n115(x)
+ if (x < 1)
+ fun_l7_n544(x)
+ else
+ fun_l7_n267(x)
+ end
+end
+
+def fun_l6_n116(x)
+ if (x < 1)
+ fun_l7_n701(x)
+ else
+ fun_l7_n101(x)
+ end
+end
+
+def fun_l6_n117(x)
+ if (x < 1)
+ fun_l7_n283(x)
+ else
+ fun_l7_n979(x)
+ end
+end
+
+def fun_l6_n118(x)
+ if (x < 1)
+ fun_l7_n902(x)
+ else
+ fun_l7_n897(x)
+ end
+end
+
+def fun_l6_n119(x)
+ if (x < 1)
+ fun_l7_n115(x)
+ else
+ fun_l7_n660(x)
+ end
+end
+
+def fun_l6_n120(x)
+ if (x < 1)
+ fun_l7_n804(x)
+ else
+ fun_l7_n536(x)
+ end
+end
+
+def fun_l6_n121(x)
+ if (x < 1)
+ fun_l7_n278(x)
+ else
+ fun_l7_n666(x)
+ end
+end
+
+def fun_l6_n122(x)
+ if (x < 1)
+ fun_l7_n254(x)
+ else
+ fun_l7_n572(x)
+ end
+end
+
+def fun_l6_n123(x)
+ if (x < 1)
+ fun_l7_n474(x)
+ else
+ fun_l7_n912(x)
+ end
+end
+
+def fun_l6_n124(x)
+ if (x < 1)
+ fun_l7_n0(x)
+ else
+ fun_l7_n514(x)
+ end
+end
+
+def fun_l6_n125(x)
+ if (x < 1)
+ fun_l7_n916(x)
+ else
+ fun_l7_n633(x)
+ end
+end
+
+def fun_l6_n126(x)
+ if (x < 1)
+ fun_l7_n184(x)
+ else
+ fun_l7_n379(x)
+ end
+end
+
+def fun_l6_n127(x)
+ if (x < 1)
+ fun_l7_n316(x)
+ else
+ fun_l7_n422(x)
+ end
+end
+
+def fun_l6_n128(x)
+ if (x < 1)
+ fun_l7_n402(x)
+ else
+ fun_l7_n237(x)
+ end
+end
+
+def fun_l6_n129(x)
+ if (x < 1)
+ fun_l7_n303(x)
+ else
+ fun_l7_n61(x)
+ end
+end
+
+def fun_l6_n130(x)
+ if (x < 1)
+ fun_l7_n918(x)
+ else
+ fun_l7_n732(x)
+ end
+end
+
+def fun_l6_n131(x)
+ if (x < 1)
+ fun_l7_n74(x)
+ else
+ fun_l7_n472(x)
+ end
+end
+
+def fun_l6_n132(x)
+ if (x < 1)
+ fun_l7_n648(x)
+ else
+ fun_l7_n546(x)
+ end
+end
+
+def fun_l6_n133(x)
+ if (x < 1)
+ fun_l7_n388(x)
+ else
+ fun_l7_n359(x)
+ end
+end
+
+def fun_l6_n134(x)
+ if (x < 1)
+ fun_l7_n594(x)
+ else
+ fun_l7_n607(x)
+ end
+end
+
+def fun_l6_n135(x)
+ if (x < 1)
+ fun_l7_n642(x)
+ else
+ fun_l7_n188(x)
+ end
+end
+
+def fun_l6_n136(x)
+ if (x < 1)
+ fun_l7_n879(x)
+ else
+ fun_l7_n521(x)
+ end
+end
+
+def fun_l6_n137(x)
+ if (x < 1)
+ fun_l7_n362(x)
+ else
+ fun_l7_n564(x)
+ end
+end
+
+def fun_l6_n138(x)
+ if (x < 1)
+ fun_l7_n590(x)
+ else
+ fun_l7_n59(x)
+ end
+end
+
+def fun_l6_n139(x)
+ if (x < 1)
+ fun_l7_n464(x)
+ else
+ fun_l7_n563(x)
+ end
+end
+
+def fun_l6_n140(x)
+ if (x < 1)
+ fun_l7_n710(x)
+ else
+ fun_l7_n890(x)
+ end
+end
+
+def fun_l6_n141(x)
+ if (x < 1)
+ fun_l7_n63(x)
+ else
+ fun_l7_n470(x)
+ end
+end
+
+def fun_l6_n142(x)
+ if (x < 1)
+ fun_l7_n160(x)
+ else
+ fun_l7_n153(x)
+ end
+end
+
+def fun_l6_n143(x)
+ if (x < 1)
+ fun_l7_n908(x)
+ else
+ fun_l7_n286(x)
+ end
+end
+
+def fun_l6_n144(x)
+ if (x < 1)
+ fun_l7_n193(x)
+ else
+ fun_l7_n657(x)
+ end
+end
+
+def fun_l6_n145(x)
+ if (x < 1)
+ fun_l7_n885(x)
+ else
+ fun_l7_n981(x)
+ end
+end
+
+def fun_l6_n146(x)
+ if (x < 1)
+ fun_l7_n479(x)
+ else
+ fun_l7_n188(x)
+ end
+end
+
+def fun_l6_n147(x)
+ if (x < 1)
+ fun_l7_n378(x)
+ else
+ fun_l7_n299(x)
+ end
+end
+
+def fun_l6_n148(x)
+ if (x < 1)
+ fun_l7_n239(x)
+ else
+ fun_l7_n70(x)
+ end
+end
+
+def fun_l6_n149(x)
+ if (x < 1)
+ fun_l7_n864(x)
+ else
+ fun_l7_n131(x)
+ end
+end
+
+def fun_l6_n150(x)
+ if (x < 1)
+ fun_l7_n748(x)
+ else
+ fun_l7_n112(x)
+ end
+end
+
+def fun_l6_n151(x)
+ if (x < 1)
+ fun_l7_n466(x)
+ else
+ fun_l7_n672(x)
+ end
+end
+
+def fun_l6_n152(x)
+ if (x < 1)
+ fun_l7_n242(x)
+ else
+ fun_l7_n8(x)
+ end
+end
+
+def fun_l6_n153(x)
+ if (x < 1)
+ fun_l7_n408(x)
+ else
+ fun_l7_n538(x)
+ end
+end
+
+def fun_l6_n154(x)
+ if (x < 1)
+ fun_l7_n984(x)
+ else
+ fun_l7_n134(x)
+ end
+end
+
+def fun_l6_n155(x)
+ if (x < 1)
+ fun_l7_n384(x)
+ else
+ fun_l7_n62(x)
+ end
+end
+
+def fun_l6_n156(x)
+ if (x < 1)
+ fun_l7_n576(x)
+ else
+ fun_l7_n168(x)
+ end
+end
+
+def fun_l6_n157(x)
+ if (x < 1)
+ fun_l7_n371(x)
+ else
+ fun_l7_n470(x)
+ end
+end
+
+def fun_l6_n158(x)
+ if (x < 1)
+ fun_l7_n30(x)
+ else
+ fun_l7_n11(x)
+ end
+end
+
+def fun_l6_n159(x)
+ if (x < 1)
+ fun_l7_n45(x)
+ else
+ fun_l7_n191(x)
+ end
+end
+
+def fun_l6_n160(x)
+ if (x < 1)
+ fun_l7_n659(x)
+ else
+ fun_l7_n981(x)
+ end
+end
+
+def fun_l6_n161(x)
+ if (x < 1)
+ fun_l7_n586(x)
+ else
+ fun_l7_n617(x)
+ end
+end
+
+def fun_l6_n162(x)
+ if (x < 1)
+ fun_l7_n844(x)
+ else
+ fun_l7_n831(x)
+ end
+end
+
+def fun_l6_n163(x)
+ if (x < 1)
+ fun_l7_n14(x)
+ else
+ fun_l7_n631(x)
+ end
+end
+
+def fun_l6_n164(x)
+ if (x < 1)
+ fun_l7_n388(x)
+ else
+ fun_l7_n837(x)
+ end
+end
+
+def fun_l6_n165(x)
+ if (x < 1)
+ fun_l7_n825(x)
+ else
+ fun_l7_n902(x)
+ end
+end
+
+def fun_l6_n166(x)
+ if (x < 1)
+ fun_l7_n490(x)
+ else
+ fun_l7_n724(x)
+ end
+end
+
+def fun_l6_n167(x)
+ if (x < 1)
+ fun_l7_n612(x)
+ else
+ fun_l7_n792(x)
+ end
+end
+
+def fun_l6_n168(x)
+ if (x < 1)
+ fun_l7_n344(x)
+ else
+ fun_l7_n624(x)
+ end
+end
+
+def fun_l6_n169(x)
+ if (x < 1)
+ fun_l7_n255(x)
+ else
+ fun_l7_n456(x)
+ end
+end
+
+def fun_l6_n170(x)
+ if (x < 1)
+ fun_l7_n893(x)
+ else
+ fun_l7_n358(x)
+ end
+end
+
+def fun_l6_n171(x)
+ if (x < 1)
+ fun_l7_n926(x)
+ else
+ fun_l7_n988(x)
+ end
+end
+
+def fun_l6_n172(x)
+ if (x < 1)
+ fun_l7_n856(x)
+ else
+ fun_l7_n553(x)
+ end
+end
+
+def fun_l6_n173(x)
+ if (x < 1)
+ fun_l7_n694(x)
+ else
+ fun_l7_n918(x)
+ end
+end
+
+def fun_l6_n174(x)
+ if (x < 1)
+ fun_l7_n884(x)
+ else
+ fun_l7_n711(x)
+ end
+end
+
+def fun_l6_n175(x)
+ if (x < 1)
+ fun_l7_n884(x)
+ else
+ fun_l7_n28(x)
+ end
+end
+
+def fun_l6_n176(x)
+ if (x < 1)
+ fun_l7_n378(x)
+ else
+ fun_l7_n14(x)
+ end
+end
+
+def fun_l6_n177(x)
+ if (x < 1)
+ fun_l7_n844(x)
+ else
+ fun_l7_n549(x)
+ end
+end
+
+def fun_l6_n178(x)
+ if (x < 1)
+ fun_l7_n396(x)
+ else
+ fun_l7_n802(x)
+ end
+end
+
+def fun_l6_n179(x)
+ if (x < 1)
+ fun_l7_n407(x)
+ else
+ fun_l7_n612(x)
+ end
+end
+
+def fun_l6_n180(x)
+ if (x < 1)
+ fun_l7_n403(x)
+ else
+ fun_l7_n768(x)
+ end
+end
+
+def fun_l6_n181(x)
+ if (x < 1)
+ fun_l7_n412(x)
+ else
+ fun_l7_n301(x)
+ end
+end
+
+def fun_l6_n182(x)
+ if (x < 1)
+ fun_l7_n479(x)
+ else
+ fun_l7_n923(x)
+ end
+end
+
+def fun_l6_n183(x)
+ if (x < 1)
+ fun_l7_n664(x)
+ else
+ fun_l7_n451(x)
+ end
+end
+
+def fun_l6_n184(x)
+ if (x < 1)
+ fun_l7_n854(x)
+ else
+ fun_l7_n438(x)
+ end
+end
+
+def fun_l6_n185(x)
+ if (x < 1)
+ fun_l7_n994(x)
+ else
+ fun_l7_n726(x)
+ end
+end
+
+def fun_l6_n186(x)
+ if (x < 1)
+ fun_l7_n128(x)
+ else
+ fun_l7_n166(x)
+ end
+end
+
+def fun_l6_n187(x)
+ if (x < 1)
+ fun_l7_n515(x)
+ else
+ fun_l7_n21(x)
+ end
+end
+
+def fun_l6_n188(x)
+ if (x < 1)
+ fun_l7_n487(x)
+ else
+ fun_l7_n631(x)
+ end
+end
+
+def fun_l6_n189(x)
+ if (x < 1)
+ fun_l7_n16(x)
+ else
+ fun_l7_n579(x)
+ end
+end
+
+def fun_l6_n190(x)
+ if (x < 1)
+ fun_l7_n30(x)
+ else
+ fun_l7_n417(x)
+ end
+end
+
+def fun_l6_n191(x)
+ if (x < 1)
+ fun_l7_n737(x)
+ else
+ fun_l7_n436(x)
+ end
+end
+
+def fun_l6_n192(x)
+ if (x < 1)
+ fun_l7_n260(x)
+ else
+ fun_l7_n657(x)
+ end
+end
+
+def fun_l6_n193(x)
+ if (x < 1)
+ fun_l7_n722(x)
+ else
+ fun_l7_n489(x)
+ end
+end
+
+def fun_l6_n194(x)
+ if (x < 1)
+ fun_l7_n53(x)
+ else
+ fun_l7_n624(x)
+ end
+end
+
+def fun_l6_n195(x)
+ if (x < 1)
+ fun_l7_n91(x)
+ else
+ fun_l7_n597(x)
+ end
+end
+
+def fun_l6_n196(x)
+ if (x < 1)
+ fun_l7_n980(x)
+ else
+ fun_l7_n498(x)
+ end
+end
+
+def fun_l6_n197(x)
+ if (x < 1)
+ fun_l7_n918(x)
+ else
+ fun_l7_n328(x)
+ end
+end
+
+def fun_l6_n198(x)
+ if (x < 1)
+ fun_l7_n184(x)
+ else
+ fun_l7_n761(x)
+ end
+end
+
+def fun_l6_n199(x)
+ if (x < 1)
+ fun_l7_n692(x)
+ else
+ fun_l7_n610(x)
+ end
+end
+
+def fun_l6_n200(x)
+ if (x < 1)
+ fun_l7_n597(x)
+ else
+ fun_l7_n135(x)
+ end
+end
+
+def fun_l6_n201(x)
+ if (x < 1)
+ fun_l7_n973(x)
+ else
+ fun_l7_n453(x)
+ end
+end
+
+def fun_l6_n202(x)
+ if (x < 1)
+ fun_l7_n433(x)
+ else
+ fun_l7_n794(x)
+ end
+end
+
+def fun_l6_n203(x)
+ if (x < 1)
+ fun_l7_n294(x)
+ else
+ fun_l7_n271(x)
+ end
+end
+
+def fun_l6_n204(x)
+ if (x < 1)
+ fun_l7_n783(x)
+ else
+ fun_l7_n20(x)
+ end
+end
+
+def fun_l6_n205(x)
+ if (x < 1)
+ fun_l7_n941(x)
+ else
+ fun_l7_n517(x)
+ end
+end
+
+def fun_l6_n206(x)
+ if (x < 1)
+ fun_l7_n306(x)
+ else
+ fun_l7_n735(x)
+ end
+end
+
+def fun_l6_n207(x)
+ if (x < 1)
+ fun_l7_n63(x)
+ else
+ fun_l7_n313(x)
+ end
+end
+
+def fun_l6_n208(x)
+ if (x < 1)
+ fun_l7_n766(x)
+ else
+ fun_l7_n868(x)
+ end
+end
+
+def fun_l6_n209(x)
+ if (x < 1)
+ fun_l7_n780(x)
+ else
+ fun_l7_n422(x)
+ end
+end
+
+def fun_l6_n210(x)
+ if (x < 1)
+ fun_l7_n279(x)
+ else
+ fun_l7_n695(x)
+ end
+end
+
+def fun_l6_n211(x)
+ if (x < 1)
+ fun_l7_n981(x)
+ else
+ fun_l7_n946(x)
+ end
+end
+
+def fun_l6_n212(x)
+ if (x < 1)
+ fun_l7_n885(x)
+ else
+ fun_l7_n752(x)
+ end
+end
+
+def fun_l6_n213(x)
+ if (x < 1)
+ fun_l7_n238(x)
+ else
+ fun_l7_n322(x)
+ end
+end
+
+def fun_l6_n214(x)
+ if (x < 1)
+ fun_l7_n832(x)
+ else
+ fun_l7_n714(x)
+ end
+end
+
+def fun_l6_n215(x)
+ if (x < 1)
+ fun_l7_n369(x)
+ else
+ fun_l7_n793(x)
+ end
+end
+
+def fun_l6_n216(x)
+ if (x < 1)
+ fun_l7_n897(x)
+ else
+ fun_l7_n22(x)
+ end
+end
+
+def fun_l6_n217(x)
+ if (x < 1)
+ fun_l7_n94(x)
+ else
+ fun_l7_n93(x)
+ end
+end
+
+def fun_l6_n218(x)
+ if (x < 1)
+ fun_l7_n638(x)
+ else
+ fun_l7_n267(x)
+ end
+end
+
+def fun_l6_n219(x)
+ if (x < 1)
+ fun_l7_n254(x)
+ else
+ fun_l7_n162(x)
+ end
+end
+
+def fun_l6_n220(x)
+ if (x < 1)
+ fun_l7_n969(x)
+ else
+ fun_l7_n371(x)
+ end
+end
+
+def fun_l6_n221(x)
+ if (x < 1)
+ fun_l7_n692(x)
+ else
+ fun_l7_n421(x)
+ end
+end
+
+def fun_l6_n222(x)
+ if (x < 1)
+ fun_l7_n312(x)
+ else
+ fun_l7_n475(x)
+ end
+end
+
+def fun_l6_n223(x)
+ if (x < 1)
+ fun_l7_n566(x)
+ else
+ fun_l7_n497(x)
+ end
+end
+
+def fun_l6_n224(x)
+ if (x < 1)
+ fun_l7_n560(x)
+ else
+ fun_l7_n60(x)
+ end
+end
+
+def fun_l6_n225(x)
+ if (x < 1)
+ fun_l7_n484(x)
+ else
+ fun_l7_n602(x)
+ end
+end
+
+def fun_l6_n226(x)
+ if (x < 1)
+ fun_l7_n399(x)
+ else
+ fun_l7_n614(x)
+ end
+end
+
+def fun_l6_n227(x)
+ if (x < 1)
+ fun_l7_n344(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n228(x)
+ if (x < 1)
+ fun_l7_n840(x)
+ else
+ fun_l7_n211(x)
+ end
+end
+
+def fun_l6_n229(x)
+ if (x < 1)
+ fun_l7_n423(x)
+ else
+ fun_l7_n51(x)
+ end
+end
+
+def fun_l6_n230(x)
+ if (x < 1)
+ fun_l7_n978(x)
+ else
+ fun_l7_n334(x)
+ end
+end
+
+def fun_l6_n231(x)
+ if (x < 1)
+ fun_l7_n136(x)
+ else
+ fun_l7_n296(x)
+ end
+end
+
+def fun_l6_n232(x)
+ if (x < 1)
+ fun_l7_n24(x)
+ else
+ fun_l7_n282(x)
+ end
+end
+
+def fun_l6_n233(x)
+ if (x < 1)
+ fun_l7_n803(x)
+ else
+ fun_l7_n623(x)
+ end
+end
+
+def fun_l6_n234(x)
+ if (x < 1)
+ fun_l7_n720(x)
+ else
+ fun_l7_n492(x)
+ end
+end
+
+def fun_l6_n235(x)
+ if (x < 1)
+ fun_l7_n627(x)
+ else
+ fun_l7_n260(x)
+ end
+end
+
+def fun_l6_n236(x)
+ if (x < 1)
+ fun_l7_n460(x)
+ else
+ fun_l7_n693(x)
+ end
+end
+
+def fun_l6_n237(x)
+ if (x < 1)
+ fun_l7_n635(x)
+ else
+ fun_l7_n745(x)
+ end
+end
+
+def fun_l6_n238(x)
+ if (x < 1)
+ fun_l7_n76(x)
+ else
+ fun_l7_n283(x)
+ end
+end
+
+def fun_l6_n239(x)
+ if (x < 1)
+ fun_l7_n183(x)
+ else
+ fun_l7_n515(x)
+ end
+end
+
+def fun_l6_n240(x)
+ if (x < 1)
+ fun_l7_n266(x)
+ else
+ fun_l7_n34(x)
+ end
+end
+
+def fun_l6_n241(x)
+ if (x < 1)
+ fun_l7_n480(x)
+ else
+ fun_l7_n868(x)
+ end
+end
+
+def fun_l6_n242(x)
+ if (x < 1)
+ fun_l7_n998(x)
+ else
+ fun_l7_n669(x)
+ end
+end
+
+def fun_l6_n243(x)
+ if (x < 1)
+ fun_l7_n414(x)
+ else
+ fun_l7_n161(x)
+ end
+end
+
+def fun_l6_n244(x)
+ if (x < 1)
+ fun_l7_n104(x)
+ else
+ fun_l7_n659(x)
+ end
+end
+
+def fun_l6_n245(x)
+ if (x < 1)
+ fun_l7_n881(x)
+ else
+ fun_l7_n229(x)
+ end
+end
+
+def fun_l6_n246(x)
+ if (x < 1)
+ fun_l7_n328(x)
+ else
+ fun_l7_n935(x)
+ end
+end
+
+def fun_l6_n247(x)
+ if (x < 1)
+ fun_l7_n433(x)
+ else
+ fun_l7_n565(x)
+ end
+end
+
+def fun_l6_n248(x)
+ if (x < 1)
+ fun_l7_n161(x)
+ else
+ fun_l7_n760(x)
+ end
+end
+
+def fun_l6_n249(x)
+ if (x < 1)
+ fun_l7_n115(x)
+ else
+ fun_l7_n594(x)
+ end
+end
+
+def fun_l6_n250(x)
+ if (x < 1)
+ fun_l7_n350(x)
+ else
+ fun_l7_n310(x)
+ end
+end
+
+def fun_l6_n251(x)
+ if (x < 1)
+ fun_l7_n920(x)
+ else
+ fun_l7_n51(x)
+ end
+end
+
+def fun_l6_n252(x)
+ if (x < 1)
+ fun_l7_n132(x)
+ else
+ fun_l7_n492(x)
+ end
+end
+
+def fun_l6_n253(x)
+ if (x < 1)
+ fun_l7_n618(x)
+ else
+ fun_l7_n325(x)
+ end
+end
+
+def fun_l6_n254(x)
+ if (x < 1)
+ fun_l7_n682(x)
+ else
+ fun_l7_n840(x)
+ end
+end
+
+def fun_l6_n255(x)
+ if (x < 1)
+ fun_l7_n462(x)
+ else
+ fun_l7_n780(x)
+ end
+end
+
+def fun_l6_n256(x)
+ if (x < 1)
+ fun_l7_n712(x)
+ else
+ fun_l7_n995(x)
+ end
+end
+
+def fun_l6_n257(x)
+ if (x < 1)
+ fun_l7_n111(x)
+ else
+ fun_l7_n121(x)
+ end
+end
+
+def fun_l6_n258(x)
+ if (x < 1)
+ fun_l7_n255(x)
+ else
+ fun_l7_n384(x)
+ end
+end
+
+def fun_l6_n259(x)
+ if (x < 1)
+ fun_l7_n610(x)
+ else
+ fun_l7_n555(x)
+ end
+end
+
+def fun_l6_n260(x)
+ if (x < 1)
+ fun_l7_n778(x)
+ else
+ fun_l7_n454(x)
+ end
+end
+
+def fun_l6_n261(x)
+ if (x < 1)
+ fun_l7_n376(x)
+ else
+ fun_l7_n892(x)
+ end
+end
+
+def fun_l6_n262(x)
+ if (x < 1)
+ fun_l7_n454(x)
+ else
+ fun_l7_n468(x)
+ end
+end
+
+def fun_l6_n263(x)
+ if (x < 1)
+ fun_l7_n708(x)
+ else
+ fun_l7_n368(x)
+ end
+end
+
+def fun_l6_n264(x)
+ if (x < 1)
+ fun_l7_n517(x)
+ else
+ fun_l7_n299(x)
+ end
+end
+
+def fun_l6_n265(x)
+ if (x < 1)
+ fun_l7_n987(x)
+ else
+ fun_l7_n318(x)
+ end
+end
+
+def fun_l6_n266(x)
+ if (x < 1)
+ fun_l7_n372(x)
+ else
+ fun_l7_n560(x)
+ end
+end
+
+def fun_l6_n267(x)
+ if (x < 1)
+ fun_l7_n493(x)
+ else
+ fun_l7_n288(x)
+ end
+end
+
+def fun_l6_n268(x)
+ if (x < 1)
+ fun_l7_n278(x)
+ else
+ fun_l7_n10(x)
+ end
+end
+
+def fun_l6_n269(x)
+ if (x < 1)
+ fun_l7_n417(x)
+ else
+ fun_l7_n703(x)
+ end
+end
+
+def fun_l6_n270(x)
+ if (x < 1)
+ fun_l7_n410(x)
+ else
+ fun_l7_n91(x)
+ end
+end
+
+def fun_l6_n271(x)
+ if (x < 1)
+ fun_l7_n281(x)
+ else
+ fun_l7_n447(x)
+ end
+end
+
+def fun_l6_n272(x)
+ if (x < 1)
+ fun_l7_n263(x)
+ else
+ fun_l7_n374(x)
+ end
+end
+
+def fun_l6_n273(x)
+ if (x < 1)
+ fun_l7_n622(x)
+ else
+ fun_l7_n310(x)
+ end
+end
+
+def fun_l6_n274(x)
+ if (x < 1)
+ fun_l7_n176(x)
+ else
+ fun_l7_n227(x)
+ end
+end
+
+def fun_l6_n275(x)
+ if (x < 1)
+ fun_l7_n848(x)
+ else
+ fun_l7_n416(x)
+ end
+end
+
+def fun_l6_n276(x)
+ if (x < 1)
+ fun_l7_n998(x)
+ else
+ fun_l7_n969(x)
+ end
+end
+
+def fun_l6_n277(x)
+ if (x < 1)
+ fun_l7_n356(x)
+ else
+ fun_l7_n722(x)
+ end
+end
+
+def fun_l6_n278(x)
+ if (x < 1)
+ fun_l7_n888(x)
+ else
+ fun_l7_n156(x)
+ end
+end
+
+def fun_l6_n279(x)
+ if (x < 1)
+ fun_l7_n779(x)
+ else
+ fun_l7_n123(x)
+ end
+end
+
+def fun_l6_n280(x)
+ if (x < 1)
+ fun_l7_n393(x)
+ else
+ fun_l7_n765(x)
+ end
+end
+
+def fun_l6_n281(x)
+ if (x < 1)
+ fun_l7_n257(x)
+ else
+ fun_l7_n277(x)
+ end
+end
+
+def fun_l6_n282(x)
+ if (x < 1)
+ fun_l7_n780(x)
+ else
+ fun_l7_n643(x)
+ end
+end
+
+def fun_l6_n283(x)
+ if (x < 1)
+ fun_l7_n63(x)
+ else
+ fun_l7_n449(x)
+ end
+end
+
+def fun_l6_n284(x)
+ if (x < 1)
+ fun_l7_n200(x)
+ else
+ fun_l7_n806(x)
+ end
+end
+
+def fun_l6_n285(x)
+ if (x < 1)
+ fun_l7_n575(x)
+ else
+ fun_l7_n409(x)
+ end
+end
+
+def fun_l6_n286(x)
+ if (x < 1)
+ fun_l7_n377(x)
+ else
+ fun_l7_n456(x)
+ end
+end
+
+def fun_l6_n287(x)
+ if (x < 1)
+ fun_l7_n519(x)
+ else
+ fun_l7_n473(x)
+ end
+end
+
+def fun_l6_n288(x)
+ if (x < 1)
+ fun_l7_n525(x)
+ else
+ fun_l7_n45(x)
+ end
+end
+
+def fun_l6_n289(x)
+ if (x < 1)
+ fun_l7_n678(x)
+ else
+ fun_l7_n910(x)
+ end
+end
+
+def fun_l6_n290(x)
+ if (x < 1)
+ fun_l7_n628(x)
+ else
+ fun_l7_n939(x)
+ end
+end
+
+def fun_l6_n291(x)
+ if (x < 1)
+ fun_l7_n967(x)
+ else
+ fun_l7_n927(x)
+ end
+end
+
+def fun_l6_n292(x)
+ if (x < 1)
+ fun_l7_n634(x)
+ else
+ fun_l7_n184(x)
+ end
+end
+
+def fun_l6_n293(x)
+ if (x < 1)
+ fun_l7_n857(x)
+ else
+ fun_l7_n625(x)
+ end
+end
+
+def fun_l6_n294(x)
+ if (x < 1)
+ fun_l7_n105(x)
+ else
+ fun_l7_n46(x)
+ end
+end
+
+def fun_l6_n295(x)
+ if (x < 1)
+ fun_l7_n642(x)
+ else
+ fun_l7_n566(x)
+ end
+end
+
+def fun_l6_n296(x)
+ if (x < 1)
+ fun_l7_n173(x)
+ else
+ fun_l7_n619(x)
+ end
+end
+
+def fun_l6_n297(x)
+ if (x < 1)
+ fun_l7_n257(x)
+ else
+ fun_l7_n485(x)
+ end
+end
+
+def fun_l6_n298(x)
+ if (x < 1)
+ fun_l7_n447(x)
+ else
+ fun_l7_n808(x)
+ end
+end
+
+def fun_l6_n299(x)
+ if (x < 1)
+ fun_l7_n838(x)
+ else
+ fun_l7_n856(x)
+ end
+end
+
+def fun_l6_n300(x)
+ if (x < 1)
+ fun_l7_n893(x)
+ else
+ fun_l7_n99(x)
+ end
+end
+
+def fun_l6_n301(x)
+ if (x < 1)
+ fun_l7_n180(x)
+ else
+ fun_l7_n126(x)
+ end
+end
+
+def fun_l6_n302(x)
+ if (x < 1)
+ fun_l7_n62(x)
+ else
+ fun_l7_n266(x)
+ end
+end
+
+def fun_l6_n303(x)
+ if (x < 1)
+ fun_l7_n709(x)
+ else
+ fun_l7_n196(x)
+ end
+end
+
+def fun_l6_n304(x)
+ if (x < 1)
+ fun_l7_n408(x)
+ else
+ fun_l7_n730(x)
+ end
+end
+
+def fun_l6_n305(x)
+ if (x < 1)
+ fun_l7_n736(x)
+ else
+ fun_l7_n673(x)
+ end
+end
+
+def fun_l6_n306(x)
+ if (x < 1)
+ fun_l7_n734(x)
+ else
+ fun_l7_n519(x)
+ end
+end
+
+def fun_l6_n307(x)
+ if (x < 1)
+ fun_l7_n629(x)
+ else
+ fun_l7_n670(x)
+ end
+end
+
+def fun_l6_n308(x)
+ if (x < 1)
+ fun_l7_n839(x)
+ else
+ fun_l7_n191(x)
+ end
+end
+
+def fun_l6_n309(x)
+ if (x < 1)
+ fun_l7_n123(x)
+ else
+ fun_l7_n553(x)
+ end
+end
+
+def fun_l6_n310(x)
+ if (x < 1)
+ fun_l7_n812(x)
+ else
+ fun_l7_n815(x)
+ end
+end
+
+def fun_l6_n311(x)
+ if (x < 1)
+ fun_l7_n860(x)
+ else
+ fun_l7_n519(x)
+ end
+end
+
+def fun_l6_n312(x)
+ if (x < 1)
+ fun_l7_n181(x)
+ else
+ fun_l7_n674(x)
+ end
+end
+
+def fun_l6_n313(x)
+ if (x < 1)
+ fun_l7_n654(x)
+ else
+ fun_l7_n500(x)
+ end
+end
+
+def fun_l6_n314(x)
+ if (x < 1)
+ fun_l7_n690(x)
+ else
+ fun_l7_n136(x)
+ end
+end
+
+def fun_l6_n315(x)
+ if (x < 1)
+ fun_l7_n944(x)
+ else
+ fun_l7_n956(x)
+ end
+end
+
+def fun_l6_n316(x)
+ if (x < 1)
+ fun_l7_n471(x)
+ else
+ fun_l7_n245(x)
+ end
+end
+
+def fun_l6_n317(x)
+ if (x < 1)
+ fun_l7_n520(x)
+ else
+ fun_l7_n919(x)
+ end
+end
+
+def fun_l6_n318(x)
+ if (x < 1)
+ fun_l7_n843(x)
+ else
+ fun_l7_n793(x)
+ end
+end
+
+def fun_l6_n319(x)
+ if (x < 1)
+ fun_l7_n765(x)
+ else
+ fun_l7_n363(x)
+ end
+end
+
+def fun_l6_n320(x)
+ if (x < 1)
+ fun_l7_n483(x)
+ else
+ fun_l7_n439(x)
+ end
+end
+
+def fun_l6_n321(x)
+ if (x < 1)
+ fun_l7_n232(x)
+ else
+ fun_l7_n921(x)
+ end
+end
+
+def fun_l6_n322(x)
+ if (x < 1)
+ fun_l7_n398(x)
+ else
+ fun_l7_n862(x)
+ end
+end
+
+def fun_l6_n323(x)
+ if (x < 1)
+ fun_l7_n550(x)
+ else
+ fun_l7_n84(x)
+ end
+end
+
+def fun_l6_n324(x)
+ if (x < 1)
+ fun_l7_n788(x)
+ else
+ fun_l7_n512(x)
+ end
+end
+
+def fun_l6_n325(x)
+ if (x < 1)
+ fun_l7_n512(x)
+ else
+ fun_l7_n303(x)
+ end
+end
+
+def fun_l6_n326(x)
+ if (x < 1)
+ fun_l7_n86(x)
+ else
+ fun_l7_n555(x)
+ end
+end
+
+def fun_l6_n327(x)
+ if (x < 1)
+ fun_l7_n857(x)
+ else
+ fun_l7_n751(x)
+ end
+end
+
+def fun_l6_n328(x)
+ if (x < 1)
+ fun_l7_n341(x)
+ else
+ fun_l7_n208(x)
+ end
+end
+
+def fun_l6_n329(x)
+ if (x < 1)
+ fun_l7_n707(x)
+ else
+ fun_l7_n371(x)
+ end
+end
+
+def fun_l6_n330(x)
+ if (x < 1)
+ fun_l7_n217(x)
+ else
+ fun_l7_n604(x)
+ end
+end
+
+def fun_l6_n331(x)
+ if (x < 1)
+ fun_l7_n607(x)
+ else
+ fun_l7_n471(x)
+ end
+end
+
+def fun_l6_n332(x)
+ if (x < 1)
+ fun_l7_n818(x)
+ else
+ fun_l7_n787(x)
+ end
+end
+
+def fun_l6_n333(x)
+ if (x < 1)
+ fun_l7_n28(x)
+ else
+ fun_l7_n220(x)
+ end
+end
+
+def fun_l6_n334(x)
+ if (x < 1)
+ fun_l7_n666(x)
+ else
+ fun_l7_n995(x)
+ end
+end
+
+def fun_l6_n335(x)
+ if (x < 1)
+ fun_l7_n3(x)
+ else
+ fun_l7_n970(x)
+ end
+end
+
+def fun_l6_n336(x)
+ if (x < 1)
+ fun_l7_n977(x)
+ else
+ fun_l7_n77(x)
+ end
+end
+
+def fun_l6_n337(x)
+ if (x < 1)
+ fun_l7_n54(x)
+ else
+ fun_l7_n814(x)
+ end
+end
+
+def fun_l6_n338(x)
+ if (x < 1)
+ fun_l7_n129(x)
+ else
+ fun_l7_n624(x)
+ end
+end
+
+def fun_l6_n339(x)
+ if (x < 1)
+ fun_l7_n866(x)
+ else
+ fun_l7_n821(x)
+ end
+end
+
+def fun_l6_n340(x)
+ if (x < 1)
+ fun_l7_n912(x)
+ else
+ fun_l7_n24(x)
+ end
+end
+
+def fun_l6_n341(x)
+ if (x < 1)
+ fun_l7_n684(x)
+ else
+ fun_l7_n610(x)
+ end
+end
+
+def fun_l6_n342(x)
+ if (x < 1)
+ fun_l7_n816(x)
+ else
+ fun_l7_n826(x)
+ end
+end
+
+def fun_l6_n343(x)
+ if (x < 1)
+ fun_l7_n479(x)
+ else
+ fun_l7_n444(x)
+ end
+end
+
+def fun_l6_n344(x)
+ if (x < 1)
+ fun_l7_n51(x)
+ else
+ fun_l7_n731(x)
+ end
+end
+
+def fun_l6_n345(x)
+ if (x < 1)
+ fun_l7_n690(x)
+ else
+ fun_l7_n631(x)
+ end
+end
+
+def fun_l6_n346(x)
+ if (x < 1)
+ fun_l7_n254(x)
+ else
+ fun_l7_n353(x)
+ end
+end
+
+def fun_l6_n347(x)
+ if (x < 1)
+ fun_l7_n905(x)
+ else
+ fun_l7_n422(x)
+ end
+end
+
+def fun_l6_n348(x)
+ if (x < 1)
+ fun_l7_n249(x)
+ else
+ fun_l7_n200(x)
+ end
+end
+
+def fun_l6_n349(x)
+ if (x < 1)
+ fun_l7_n11(x)
+ else
+ fun_l7_n550(x)
+ end
+end
+
+def fun_l6_n350(x)
+ if (x < 1)
+ fun_l7_n818(x)
+ else
+ fun_l7_n444(x)
+ end
+end
+
+def fun_l6_n351(x)
+ if (x < 1)
+ fun_l7_n422(x)
+ else
+ fun_l7_n242(x)
+ end
+end
+
+def fun_l6_n352(x)
+ if (x < 1)
+ fun_l7_n653(x)
+ else
+ fun_l7_n912(x)
+ end
+end
+
+def fun_l6_n353(x)
+ if (x < 1)
+ fun_l7_n605(x)
+ else
+ fun_l7_n129(x)
+ end
+end
+
+def fun_l6_n354(x)
+ if (x < 1)
+ fun_l7_n622(x)
+ else
+ fun_l7_n172(x)
+ end
+end
+
+def fun_l6_n355(x)
+ if (x < 1)
+ fun_l7_n568(x)
+ else
+ fun_l7_n26(x)
+ end
+end
+
+def fun_l6_n356(x)
+ if (x < 1)
+ fun_l7_n777(x)
+ else
+ fun_l7_n818(x)
+ end
+end
+
+def fun_l6_n357(x)
+ if (x < 1)
+ fun_l7_n807(x)
+ else
+ fun_l7_n642(x)
+ end
+end
+
+def fun_l6_n358(x)
+ if (x < 1)
+ fun_l7_n745(x)
+ else
+ fun_l7_n866(x)
+ end
+end
+
+def fun_l6_n359(x)
+ if (x < 1)
+ fun_l7_n603(x)
+ else
+ fun_l7_n42(x)
+ end
+end
+
+def fun_l6_n360(x)
+ if (x < 1)
+ fun_l7_n818(x)
+ else
+ fun_l7_n203(x)
+ end
+end
+
+def fun_l6_n361(x)
+ if (x < 1)
+ fun_l7_n451(x)
+ else
+ fun_l7_n719(x)
+ end
+end
+
+def fun_l6_n362(x)
+ if (x < 1)
+ fun_l7_n31(x)
+ else
+ fun_l7_n148(x)
+ end
+end
+
+def fun_l6_n363(x)
+ if (x < 1)
+ fun_l7_n148(x)
+ else
+ fun_l7_n292(x)
+ end
+end
+
+def fun_l6_n364(x)
+ if (x < 1)
+ fun_l7_n175(x)
+ else
+ fun_l7_n849(x)
+ end
+end
+
+def fun_l6_n365(x)
+ if (x < 1)
+ fun_l7_n414(x)
+ else
+ fun_l7_n57(x)
+ end
+end
+
+def fun_l6_n366(x)
+ if (x < 1)
+ fun_l7_n771(x)
+ else
+ fun_l7_n625(x)
+ end
+end
+
+def fun_l6_n367(x)
+ if (x < 1)
+ fun_l7_n232(x)
+ else
+ fun_l7_n108(x)
+ end
+end
+
+def fun_l6_n368(x)
+ if (x < 1)
+ fun_l7_n123(x)
+ else
+ fun_l7_n413(x)
+ end
+end
+
+def fun_l6_n369(x)
+ if (x < 1)
+ fun_l7_n587(x)
+ else
+ fun_l7_n876(x)
+ end
+end
+
+def fun_l6_n370(x)
+ if (x < 1)
+ fun_l7_n750(x)
+ else
+ fun_l7_n531(x)
+ end
+end
+
+def fun_l6_n371(x)
+ if (x < 1)
+ fun_l7_n55(x)
+ else
+ fun_l7_n859(x)
+ end
+end
+
+def fun_l6_n372(x)
+ if (x < 1)
+ fun_l7_n848(x)
+ else
+ fun_l7_n272(x)
+ end
+end
+
+def fun_l6_n373(x)
+ if (x < 1)
+ fun_l7_n480(x)
+ else
+ fun_l7_n976(x)
+ end
+end
+
+def fun_l6_n374(x)
+ if (x < 1)
+ fun_l7_n298(x)
+ else
+ fun_l7_n844(x)
+ end
+end
+
+def fun_l6_n375(x)
+ if (x < 1)
+ fun_l7_n564(x)
+ else
+ fun_l7_n960(x)
+ end
+end
+
+def fun_l6_n376(x)
+ if (x < 1)
+ fun_l7_n684(x)
+ else
+ fun_l7_n181(x)
+ end
+end
+
+def fun_l6_n377(x)
+ if (x < 1)
+ fun_l7_n153(x)
+ else
+ fun_l7_n21(x)
+ end
+end
+
+def fun_l6_n378(x)
+ if (x < 1)
+ fun_l7_n377(x)
+ else
+ fun_l7_n761(x)
+ end
+end
+
+def fun_l6_n379(x)
+ if (x < 1)
+ fun_l7_n737(x)
+ else
+ fun_l7_n605(x)
+ end
+end
+
+def fun_l6_n380(x)
+ if (x < 1)
+ fun_l7_n536(x)
+ else
+ fun_l7_n143(x)
+ end
+end
+
+def fun_l6_n381(x)
+ if (x < 1)
+ fun_l7_n314(x)
+ else
+ fun_l7_n999(x)
+ end
+end
+
+def fun_l6_n382(x)
+ if (x < 1)
+ fun_l7_n995(x)
+ else
+ fun_l7_n564(x)
+ end
+end
+
+def fun_l6_n383(x)
+ if (x < 1)
+ fun_l7_n772(x)
+ else
+ fun_l7_n520(x)
+ end
+end
+
+def fun_l6_n384(x)
+ if (x < 1)
+ fun_l7_n250(x)
+ else
+ fun_l7_n142(x)
+ end
+end
+
+def fun_l6_n385(x)
+ if (x < 1)
+ fun_l7_n993(x)
+ else
+ fun_l7_n987(x)
+ end
+end
+
+def fun_l6_n386(x)
+ if (x < 1)
+ fun_l7_n717(x)
+ else
+ fun_l7_n674(x)
+ end
+end
+
+def fun_l6_n387(x)
+ if (x < 1)
+ fun_l7_n585(x)
+ else
+ fun_l7_n102(x)
+ end
+end
+
+def fun_l6_n388(x)
+ if (x < 1)
+ fun_l7_n779(x)
+ else
+ fun_l7_n110(x)
+ end
+end
+
+def fun_l6_n389(x)
+ if (x < 1)
+ fun_l7_n815(x)
+ else
+ fun_l7_n194(x)
+ end
+end
+
+def fun_l6_n390(x)
+ if (x < 1)
+ fun_l7_n261(x)
+ else
+ fun_l7_n30(x)
+ end
+end
+
+def fun_l6_n391(x)
+ if (x < 1)
+ fun_l7_n746(x)
+ else
+ fun_l7_n207(x)
+ end
+end
+
+def fun_l6_n392(x)
+ if (x < 1)
+ fun_l7_n866(x)
+ else
+ fun_l7_n862(x)
+ end
+end
+
+def fun_l6_n393(x)
+ if (x < 1)
+ fun_l7_n47(x)
+ else
+ fun_l7_n692(x)
+ end
+end
+
+def fun_l6_n394(x)
+ if (x < 1)
+ fun_l7_n140(x)
+ else
+ fun_l7_n104(x)
+ end
+end
+
+def fun_l6_n395(x)
+ if (x < 1)
+ fun_l7_n170(x)
+ else
+ fun_l7_n93(x)
+ end
+end
+
+def fun_l6_n396(x)
+ if (x < 1)
+ fun_l7_n184(x)
+ else
+ fun_l7_n218(x)
+ end
+end
+
+def fun_l6_n397(x)
+ if (x < 1)
+ fun_l7_n268(x)
+ else
+ fun_l7_n278(x)
+ end
+end
+
+def fun_l6_n398(x)
+ if (x < 1)
+ fun_l7_n859(x)
+ else
+ fun_l7_n888(x)
+ end
+end
+
+def fun_l6_n399(x)
+ if (x < 1)
+ fun_l7_n540(x)
+ else
+ fun_l7_n218(x)
+ end
+end
+
+def fun_l6_n400(x)
+ if (x < 1)
+ fun_l7_n148(x)
+ else
+ fun_l7_n220(x)
+ end
+end
+
+def fun_l6_n401(x)
+ if (x < 1)
+ fun_l7_n169(x)
+ else
+ fun_l7_n310(x)
+ end
+end
+
+def fun_l6_n402(x)
+ if (x < 1)
+ fun_l7_n256(x)
+ else
+ fun_l7_n336(x)
+ end
+end
+
+def fun_l6_n403(x)
+ if (x < 1)
+ fun_l7_n257(x)
+ else
+ fun_l7_n536(x)
+ end
+end
+
+def fun_l6_n404(x)
+ if (x < 1)
+ fun_l7_n47(x)
+ else
+ fun_l7_n714(x)
+ end
+end
+
+def fun_l6_n405(x)
+ if (x < 1)
+ fun_l7_n913(x)
+ else
+ fun_l7_n705(x)
+ end
+end
+
+def fun_l6_n406(x)
+ if (x < 1)
+ fun_l7_n816(x)
+ else
+ fun_l7_n168(x)
+ end
+end
+
+def fun_l6_n407(x)
+ if (x < 1)
+ fun_l7_n506(x)
+ else
+ fun_l7_n772(x)
+ end
+end
+
+def fun_l6_n408(x)
+ if (x < 1)
+ fun_l7_n983(x)
+ else
+ fun_l7_n973(x)
+ end
+end
+
+def fun_l6_n409(x)
+ if (x < 1)
+ fun_l7_n752(x)
+ else
+ fun_l7_n543(x)
+ end
+end
+
+def fun_l6_n410(x)
+ if (x < 1)
+ fun_l7_n580(x)
+ else
+ fun_l7_n265(x)
+ end
+end
+
+def fun_l6_n411(x)
+ if (x < 1)
+ fun_l7_n744(x)
+ else
+ fun_l7_n736(x)
+ end
+end
+
+def fun_l6_n412(x)
+ if (x < 1)
+ fun_l7_n950(x)
+ else
+ fun_l7_n5(x)
+ end
+end
+
+def fun_l6_n413(x)
+ if (x < 1)
+ fun_l7_n734(x)
+ else
+ fun_l7_n151(x)
+ end
+end
+
+def fun_l6_n414(x)
+ if (x < 1)
+ fun_l7_n907(x)
+ else
+ fun_l7_n113(x)
+ end
+end
+
+def fun_l6_n415(x)
+ if (x < 1)
+ fun_l7_n621(x)
+ else
+ fun_l7_n272(x)
+ end
+end
+
+def fun_l6_n416(x)
+ if (x < 1)
+ fun_l7_n598(x)
+ else
+ fun_l7_n872(x)
+ end
+end
+
+def fun_l6_n417(x)
+ if (x < 1)
+ fun_l7_n811(x)
+ else
+ fun_l7_n734(x)
+ end
+end
+
+def fun_l6_n418(x)
+ if (x < 1)
+ fun_l7_n18(x)
+ else
+ fun_l7_n405(x)
+ end
+end
+
+def fun_l6_n419(x)
+ if (x < 1)
+ fun_l7_n89(x)
+ else
+ fun_l7_n153(x)
+ end
+end
+
+def fun_l6_n420(x)
+ if (x < 1)
+ fun_l7_n438(x)
+ else
+ fun_l7_n452(x)
+ end
+end
+
+def fun_l6_n421(x)
+ if (x < 1)
+ fun_l7_n601(x)
+ else
+ fun_l7_n777(x)
+ end
+end
+
+def fun_l6_n422(x)
+ if (x < 1)
+ fun_l7_n202(x)
+ else
+ fun_l7_n368(x)
+ end
+end
+
+def fun_l6_n423(x)
+ if (x < 1)
+ fun_l7_n636(x)
+ else
+ fun_l7_n137(x)
+ end
+end
+
+def fun_l6_n424(x)
+ if (x < 1)
+ fun_l7_n222(x)
+ else
+ fun_l7_n838(x)
+ end
+end
+
+def fun_l6_n425(x)
+ if (x < 1)
+ fun_l7_n388(x)
+ else
+ fun_l7_n175(x)
+ end
+end
+
+def fun_l6_n426(x)
+ if (x < 1)
+ fun_l7_n629(x)
+ else
+ fun_l7_n376(x)
+ end
+end
+
+def fun_l6_n427(x)
+ if (x < 1)
+ fun_l7_n293(x)
+ else
+ fun_l7_n517(x)
+ end
+end
+
+def fun_l6_n428(x)
+ if (x < 1)
+ fun_l7_n859(x)
+ else
+ fun_l7_n129(x)
+ end
+end
+
+def fun_l6_n429(x)
+ if (x < 1)
+ fun_l7_n854(x)
+ else
+ fun_l7_n647(x)
+ end
+end
+
+def fun_l6_n430(x)
+ if (x < 1)
+ fun_l7_n117(x)
+ else
+ fun_l7_n291(x)
+ end
+end
+
+def fun_l6_n431(x)
+ if (x < 1)
+ fun_l7_n505(x)
+ else
+ fun_l7_n938(x)
+ end
+end
+
+def fun_l6_n432(x)
+ if (x < 1)
+ fun_l7_n536(x)
+ else
+ fun_l7_n303(x)
+ end
+end
+
+def fun_l6_n433(x)
+ if (x < 1)
+ fun_l7_n443(x)
+ else
+ fun_l7_n945(x)
+ end
+end
+
+def fun_l6_n434(x)
+ if (x < 1)
+ fun_l7_n74(x)
+ else
+ fun_l7_n594(x)
+ end
+end
+
+def fun_l6_n435(x)
+ if (x < 1)
+ fun_l7_n273(x)
+ else
+ fun_l7_n704(x)
+ end
+end
+
+def fun_l6_n436(x)
+ if (x < 1)
+ fun_l7_n451(x)
+ else
+ fun_l7_n371(x)
+ end
+end
+
+def fun_l6_n437(x)
+ if (x < 1)
+ fun_l7_n628(x)
+ else
+ fun_l7_n963(x)
+ end
+end
+
+def fun_l6_n438(x)
+ if (x < 1)
+ fun_l7_n361(x)
+ else
+ fun_l7_n506(x)
+ end
+end
+
+def fun_l6_n439(x)
+ if (x < 1)
+ fun_l7_n8(x)
+ else
+ fun_l7_n721(x)
+ end
+end
+
+def fun_l6_n440(x)
+ if (x < 1)
+ fun_l7_n728(x)
+ else
+ fun_l7_n372(x)
+ end
+end
+
+def fun_l6_n441(x)
+ if (x < 1)
+ fun_l7_n988(x)
+ else
+ fun_l7_n323(x)
+ end
+end
+
+def fun_l6_n442(x)
+ if (x < 1)
+ fun_l7_n5(x)
+ else
+ fun_l7_n56(x)
+ end
+end
+
+def fun_l6_n443(x)
+ if (x < 1)
+ fun_l7_n553(x)
+ else
+ fun_l7_n776(x)
+ end
+end
+
+def fun_l6_n444(x)
+ if (x < 1)
+ fun_l7_n194(x)
+ else
+ fun_l7_n101(x)
+ end
+end
+
+def fun_l6_n445(x)
+ if (x < 1)
+ fun_l7_n613(x)
+ else
+ fun_l7_n977(x)
+ end
+end
+
+def fun_l6_n446(x)
+ if (x < 1)
+ fun_l7_n23(x)
+ else
+ fun_l7_n311(x)
+ end
+end
+
+def fun_l6_n447(x)
+ if (x < 1)
+ fun_l7_n686(x)
+ else
+ fun_l7_n8(x)
+ end
+end
+
+def fun_l6_n448(x)
+ if (x < 1)
+ fun_l7_n812(x)
+ else
+ fun_l7_n229(x)
+ end
+end
+
+def fun_l6_n449(x)
+ if (x < 1)
+ fun_l7_n222(x)
+ else
+ fun_l7_n620(x)
+ end
+end
+
+def fun_l6_n450(x)
+ if (x < 1)
+ fun_l7_n599(x)
+ else
+ fun_l7_n468(x)
+ end
+end
+
+def fun_l6_n451(x)
+ if (x < 1)
+ fun_l7_n347(x)
+ else
+ fun_l7_n504(x)
+ end
+end
+
+def fun_l6_n452(x)
+ if (x < 1)
+ fun_l7_n95(x)
+ else
+ fun_l7_n482(x)
+ end
+end
+
+def fun_l6_n453(x)
+ if (x < 1)
+ fun_l7_n217(x)
+ else
+ fun_l7_n419(x)
+ end
+end
+
+def fun_l6_n454(x)
+ if (x < 1)
+ fun_l7_n28(x)
+ else
+ fun_l7_n609(x)
+ end
+end
+
+def fun_l6_n455(x)
+ if (x < 1)
+ fun_l7_n932(x)
+ else
+ fun_l7_n744(x)
+ end
+end
+
+def fun_l6_n456(x)
+ if (x < 1)
+ fun_l7_n901(x)
+ else
+ fun_l7_n882(x)
+ end
+end
+
+def fun_l6_n457(x)
+ if (x < 1)
+ fun_l7_n368(x)
+ else
+ fun_l7_n441(x)
+ end
+end
+
+def fun_l6_n458(x)
+ if (x < 1)
+ fun_l7_n49(x)
+ else
+ fun_l7_n135(x)
+ end
+end
+
+def fun_l6_n459(x)
+ if (x < 1)
+ fun_l7_n228(x)
+ else
+ fun_l7_n899(x)
+ end
+end
+
+def fun_l6_n460(x)
+ if (x < 1)
+ fun_l7_n90(x)
+ else
+ fun_l7_n190(x)
+ end
+end
+
+def fun_l6_n461(x)
+ if (x < 1)
+ fun_l7_n892(x)
+ else
+ fun_l7_n670(x)
+ end
+end
+
+def fun_l6_n462(x)
+ if (x < 1)
+ fun_l7_n961(x)
+ else
+ fun_l7_n769(x)
+ end
+end
+
+def fun_l6_n463(x)
+ if (x < 1)
+ fun_l7_n828(x)
+ else
+ fun_l7_n219(x)
+ end
+end
+
+def fun_l6_n464(x)
+ if (x < 1)
+ fun_l7_n17(x)
+ else
+ fun_l7_n345(x)
+ end
+end
+
+def fun_l6_n465(x)
+ if (x < 1)
+ fun_l7_n412(x)
+ else
+ fun_l7_n498(x)
+ end
+end
+
+def fun_l6_n466(x)
+ if (x < 1)
+ fun_l7_n659(x)
+ else
+ fun_l7_n781(x)
+ end
+end
+
+def fun_l6_n467(x)
+ if (x < 1)
+ fun_l7_n528(x)
+ else
+ fun_l7_n138(x)
+ end
+end
+
+def fun_l6_n468(x)
+ if (x < 1)
+ fun_l7_n272(x)
+ else
+ fun_l7_n512(x)
+ end
+end
+
+def fun_l6_n469(x)
+ if (x < 1)
+ fun_l7_n458(x)
+ else
+ fun_l7_n430(x)
+ end
+end
+
+def fun_l6_n470(x)
+ if (x < 1)
+ fun_l7_n192(x)
+ else
+ fun_l7_n755(x)
+ end
+end
+
+def fun_l6_n471(x)
+ if (x < 1)
+ fun_l7_n188(x)
+ else
+ fun_l7_n827(x)
+ end
+end
+
+def fun_l6_n472(x)
+ if (x < 1)
+ fun_l7_n467(x)
+ else
+ fun_l7_n167(x)
+ end
+end
+
+def fun_l6_n473(x)
+ if (x < 1)
+ fun_l7_n648(x)
+ else
+ fun_l7_n823(x)
+ end
+end
+
+def fun_l6_n474(x)
+ if (x < 1)
+ fun_l7_n788(x)
+ else
+ fun_l7_n120(x)
+ end
+end
+
+def fun_l6_n475(x)
+ if (x < 1)
+ fun_l7_n199(x)
+ else
+ fun_l7_n25(x)
+ end
+end
+
+def fun_l6_n476(x)
+ if (x < 1)
+ fun_l7_n812(x)
+ else
+ fun_l7_n258(x)
+ end
+end
+
+def fun_l6_n477(x)
+ if (x < 1)
+ fun_l7_n525(x)
+ else
+ fun_l7_n140(x)
+ end
+end
+
+def fun_l6_n478(x)
+ if (x < 1)
+ fun_l7_n728(x)
+ else
+ fun_l7_n157(x)
+ end
+end
+
+def fun_l6_n479(x)
+ if (x < 1)
+ fun_l7_n527(x)
+ else
+ fun_l7_n172(x)
+ end
+end
+
+def fun_l6_n480(x)
+ if (x < 1)
+ fun_l7_n295(x)
+ else
+ fun_l7_n230(x)
+ end
+end
+
+def fun_l6_n481(x)
+ if (x < 1)
+ fun_l7_n619(x)
+ else
+ fun_l7_n495(x)
+ end
+end
+
+def fun_l6_n482(x)
+ if (x < 1)
+ fun_l7_n412(x)
+ else
+ fun_l7_n30(x)
+ end
+end
+
+def fun_l6_n483(x)
+ if (x < 1)
+ fun_l7_n236(x)
+ else
+ fun_l7_n842(x)
+ end
+end
+
+def fun_l6_n484(x)
+ if (x < 1)
+ fun_l7_n59(x)
+ else
+ fun_l7_n341(x)
+ end
+end
+
+def fun_l6_n485(x)
+ if (x < 1)
+ fun_l7_n841(x)
+ else
+ fun_l7_n67(x)
+ end
+end
+
+def fun_l6_n486(x)
+ if (x < 1)
+ fun_l7_n299(x)
+ else
+ fun_l7_n144(x)
+ end
+end
+
+def fun_l6_n487(x)
+ if (x < 1)
+ fun_l7_n672(x)
+ else
+ fun_l7_n682(x)
+ end
+end
+
+def fun_l6_n488(x)
+ if (x < 1)
+ fun_l7_n110(x)
+ else
+ fun_l7_n231(x)
+ end
+end
+
+def fun_l6_n489(x)
+ if (x < 1)
+ fun_l7_n984(x)
+ else
+ fun_l7_n583(x)
+ end
+end
+
+def fun_l6_n490(x)
+ if (x < 1)
+ fun_l7_n354(x)
+ else
+ fun_l7_n90(x)
+ end
+end
+
+def fun_l6_n491(x)
+ if (x < 1)
+ fun_l7_n541(x)
+ else
+ fun_l7_n583(x)
+ end
+end
+
+def fun_l6_n492(x)
+ if (x < 1)
+ fun_l7_n35(x)
+ else
+ fun_l7_n209(x)
+ end
+end
+
+def fun_l6_n493(x)
+ if (x < 1)
+ fun_l7_n547(x)
+ else
+ fun_l7_n982(x)
+ end
+end
+
+def fun_l6_n494(x)
+ if (x < 1)
+ fun_l7_n3(x)
+ else
+ fun_l7_n230(x)
+ end
+end
+
+def fun_l6_n495(x)
+ if (x < 1)
+ fun_l7_n777(x)
+ else
+ fun_l7_n140(x)
+ end
+end
+
+def fun_l6_n496(x)
+ if (x < 1)
+ fun_l7_n927(x)
+ else
+ fun_l7_n934(x)
+ end
+end
+
+def fun_l6_n497(x)
+ if (x < 1)
+ fun_l7_n201(x)
+ else
+ fun_l7_n342(x)
+ end
+end
+
+def fun_l6_n498(x)
+ if (x < 1)
+ fun_l7_n973(x)
+ else
+ fun_l7_n106(x)
+ end
+end
+
+def fun_l6_n499(x)
+ if (x < 1)
+ fun_l7_n373(x)
+ else
+ fun_l7_n558(x)
+ end
+end
+
+def fun_l6_n500(x)
+ if (x < 1)
+ fun_l7_n835(x)
+ else
+ fun_l7_n981(x)
+ end
+end
+
+def fun_l6_n501(x)
+ if (x < 1)
+ fun_l7_n135(x)
+ else
+ fun_l7_n997(x)
+ end
+end
+
+def fun_l6_n502(x)
+ if (x < 1)
+ fun_l7_n129(x)
+ else
+ fun_l7_n530(x)
+ end
+end
+
+def fun_l6_n503(x)
+ if (x < 1)
+ fun_l7_n924(x)
+ else
+ fun_l7_n611(x)
+ end
+end
+
+def fun_l6_n504(x)
+ if (x < 1)
+ fun_l7_n125(x)
+ else
+ fun_l7_n26(x)
+ end
+end
+
+def fun_l6_n505(x)
+ if (x < 1)
+ fun_l7_n592(x)
+ else
+ fun_l7_n50(x)
+ end
+end
+
+def fun_l6_n506(x)
+ if (x < 1)
+ fun_l7_n220(x)
+ else
+ fun_l7_n787(x)
+ end
+end
+
+def fun_l6_n507(x)
+ if (x < 1)
+ fun_l7_n908(x)
+ else
+ fun_l7_n15(x)
+ end
+end
+
+def fun_l6_n508(x)
+ if (x < 1)
+ fun_l7_n475(x)
+ else
+ fun_l7_n899(x)
+ end
+end
+
+def fun_l6_n509(x)
+ if (x < 1)
+ fun_l7_n704(x)
+ else
+ fun_l7_n559(x)
+ end
+end
+
+def fun_l6_n510(x)
+ if (x < 1)
+ fun_l7_n625(x)
+ else
+ fun_l7_n73(x)
+ end
+end
+
+def fun_l6_n511(x)
+ if (x < 1)
+ fun_l7_n234(x)
+ else
+ fun_l7_n166(x)
+ end
+end
+
+def fun_l6_n512(x)
+ if (x < 1)
+ fun_l7_n502(x)
+ else
+ fun_l7_n304(x)
+ end
+end
+
+def fun_l6_n513(x)
+ if (x < 1)
+ fun_l7_n686(x)
+ else
+ fun_l7_n643(x)
+ end
+end
+
+def fun_l6_n514(x)
+ if (x < 1)
+ fun_l7_n804(x)
+ else
+ fun_l7_n116(x)
+ end
+end
+
+def fun_l6_n515(x)
+ if (x < 1)
+ fun_l7_n365(x)
+ else
+ fun_l7_n102(x)
+ end
+end
+
+def fun_l6_n516(x)
+ if (x < 1)
+ fun_l7_n563(x)
+ else
+ fun_l7_n161(x)
+ end
+end
+
+def fun_l6_n517(x)
+ if (x < 1)
+ fun_l7_n695(x)
+ else
+ fun_l7_n936(x)
+ end
+end
+
+def fun_l6_n518(x)
+ if (x < 1)
+ fun_l7_n220(x)
+ else
+ fun_l7_n884(x)
+ end
+end
+
+def fun_l6_n519(x)
+ if (x < 1)
+ fun_l7_n602(x)
+ else
+ fun_l7_n144(x)
+ end
+end
+
+def fun_l6_n520(x)
+ if (x < 1)
+ fun_l7_n409(x)
+ else
+ fun_l7_n861(x)
+ end
+end
+
+def fun_l6_n521(x)
+ if (x < 1)
+ fun_l7_n258(x)
+ else
+ fun_l7_n768(x)
+ end
+end
+
+def fun_l6_n522(x)
+ if (x < 1)
+ fun_l7_n878(x)
+ else
+ fun_l7_n503(x)
+ end
+end
+
+def fun_l6_n523(x)
+ if (x < 1)
+ fun_l7_n570(x)
+ else
+ fun_l7_n675(x)
+ end
+end
+
+def fun_l6_n524(x)
+ if (x < 1)
+ fun_l7_n741(x)
+ else
+ fun_l7_n748(x)
+ end
+end
+
+def fun_l6_n525(x)
+ if (x < 1)
+ fun_l7_n729(x)
+ else
+ fun_l7_n272(x)
+ end
+end
+
+def fun_l6_n526(x)
+ if (x < 1)
+ fun_l7_n734(x)
+ else
+ fun_l7_n70(x)
+ end
+end
+
+def fun_l6_n527(x)
+ if (x < 1)
+ fun_l7_n235(x)
+ else
+ fun_l7_n606(x)
+ end
+end
+
+def fun_l6_n528(x)
+ if (x < 1)
+ fun_l7_n67(x)
+ else
+ fun_l7_n399(x)
+ end
+end
+
+def fun_l6_n529(x)
+ if (x < 1)
+ fun_l7_n706(x)
+ else
+ fun_l7_n150(x)
+ end
+end
+
+def fun_l6_n530(x)
+ if (x < 1)
+ fun_l7_n35(x)
+ else
+ fun_l7_n951(x)
+ end
+end
+
+def fun_l6_n531(x)
+ if (x < 1)
+ fun_l7_n517(x)
+ else
+ fun_l7_n329(x)
+ end
+end
+
+def fun_l6_n532(x)
+ if (x < 1)
+ fun_l7_n392(x)
+ else
+ fun_l7_n970(x)
+ end
+end
+
+def fun_l6_n533(x)
+ if (x < 1)
+ fun_l7_n466(x)
+ else
+ fun_l7_n260(x)
+ end
+end
+
+def fun_l6_n534(x)
+ if (x < 1)
+ fun_l7_n957(x)
+ else
+ fun_l7_n417(x)
+ end
+end
+
+def fun_l6_n535(x)
+ if (x < 1)
+ fun_l7_n184(x)
+ else
+ fun_l7_n188(x)
+ end
+end
+
+def fun_l6_n536(x)
+ if (x < 1)
+ fun_l7_n298(x)
+ else
+ fun_l7_n192(x)
+ end
+end
+
+def fun_l6_n537(x)
+ if (x < 1)
+ fun_l7_n28(x)
+ else
+ fun_l7_n309(x)
+ end
+end
+
+def fun_l6_n538(x)
+ if (x < 1)
+ fun_l7_n801(x)
+ else
+ fun_l7_n84(x)
+ end
+end
+
+def fun_l6_n539(x)
+ if (x < 1)
+ fun_l7_n894(x)
+ else
+ fun_l7_n973(x)
+ end
+end
+
+def fun_l6_n540(x)
+ if (x < 1)
+ fun_l7_n895(x)
+ else
+ fun_l7_n231(x)
+ end
+end
+
+def fun_l6_n541(x)
+ if (x < 1)
+ fun_l7_n728(x)
+ else
+ fun_l7_n28(x)
+ end
+end
+
+def fun_l6_n542(x)
+ if (x < 1)
+ fun_l7_n655(x)
+ else
+ fun_l7_n845(x)
+ end
+end
+
+def fun_l6_n543(x)
+ if (x < 1)
+ fun_l7_n952(x)
+ else
+ fun_l7_n484(x)
+ end
+end
+
+def fun_l6_n544(x)
+ if (x < 1)
+ fun_l7_n835(x)
+ else
+ fun_l7_n187(x)
+ end
+end
+
+def fun_l6_n545(x)
+ if (x < 1)
+ fun_l7_n748(x)
+ else
+ fun_l7_n460(x)
+ end
+end
+
+def fun_l6_n546(x)
+ if (x < 1)
+ fun_l7_n734(x)
+ else
+ fun_l7_n165(x)
+ end
+end
+
+def fun_l6_n547(x)
+ if (x < 1)
+ fun_l7_n499(x)
+ else
+ fun_l7_n133(x)
+ end
+end
+
+def fun_l6_n548(x)
+ if (x < 1)
+ fun_l7_n751(x)
+ else
+ fun_l7_n731(x)
+ end
+end
+
+def fun_l6_n549(x)
+ if (x < 1)
+ fun_l7_n269(x)
+ else
+ fun_l7_n690(x)
+ end
+end
+
+def fun_l6_n550(x)
+ if (x < 1)
+ fun_l7_n320(x)
+ else
+ fun_l7_n308(x)
+ end
+end
+
+def fun_l6_n551(x)
+ if (x < 1)
+ fun_l7_n182(x)
+ else
+ fun_l7_n144(x)
+ end
+end
+
+def fun_l6_n552(x)
+ if (x < 1)
+ fun_l7_n683(x)
+ else
+ fun_l7_n691(x)
+ end
+end
+
+def fun_l6_n553(x)
+ if (x < 1)
+ fun_l7_n502(x)
+ else
+ fun_l7_n520(x)
+ end
+end
+
+def fun_l6_n554(x)
+ if (x < 1)
+ fun_l7_n60(x)
+ else
+ fun_l7_n551(x)
+ end
+end
+
+def fun_l6_n555(x)
+ if (x < 1)
+ fun_l7_n185(x)
+ else
+ fun_l7_n87(x)
+ end
+end
+
+def fun_l6_n556(x)
+ if (x < 1)
+ fun_l7_n140(x)
+ else
+ fun_l7_n725(x)
+ end
+end
+
+def fun_l6_n557(x)
+ if (x < 1)
+ fun_l7_n76(x)
+ else
+ fun_l7_n501(x)
+ end
+end
+
+def fun_l6_n558(x)
+ if (x < 1)
+ fun_l7_n553(x)
+ else
+ fun_l7_n146(x)
+ end
+end
+
+def fun_l6_n559(x)
+ if (x < 1)
+ fun_l7_n535(x)
+ else
+ fun_l7_n17(x)
+ end
+end
+
+def fun_l6_n560(x)
+ if (x < 1)
+ fun_l7_n566(x)
+ else
+ fun_l7_n773(x)
+ end
+end
+
+def fun_l6_n561(x)
+ if (x < 1)
+ fun_l7_n358(x)
+ else
+ fun_l7_n951(x)
+ end
+end
+
+def fun_l6_n562(x)
+ if (x < 1)
+ fun_l7_n492(x)
+ else
+ fun_l7_n478(x)
+ end
+end
+
+def fun_l6_n563(x)
+ if (x < 1)
+ fun_l7_n796(x)
+ else
+ fun_l7_n906(x)
+ end
+end
+
+def fun_l6_n564(x)
+ if (x < 1)
+ fun_l7_n751(x)
+ else
+ fun_l7_n546(x)
+ end
+end
+
+def fun_l6_n565(x)
+ if (x < 1)
+ fun_l7_n179(x)
+ else
+ fun_l7_n49(x)
+ end
+end
+
+def fun_l6_n566(x)
+ if (x < 1)
+ fun_l7_n550(x)
+ else
+ fun_l7_n440(x)
+ end
+end
+
+def fun_l6_n567(x)
+ if (x < 1)
+ fun_l7_n715(x)
+ else
+ fun_l7_n862(x)
+ end
+end
+
+def fun_l6_n568(x)
+ if (x < 1)
+ fun_l7_n124(x)
+ else
+ fun_l7_n191(x)
+ end
+end
+
+def fun_l6_n569(x)
+ if (x < 1)
+ fun_l7_n709(x)
+ else
+ fun_l7_n704(x)
+ end
+end
+
+def fun_l6_n570(x)
+ if (x < 1)
+ fun_l7_n864(x)
+ else
+ fun_l7_n84(x)
+ end
+end
+
+def fun_l6_n571(x)
+ if (x < 1)
+ fun_l7_n302(x)
+ else
+ fun_l7_n424(x)
+ end
+end
+
+def fun_l6_n572(x)
+ if (x < 1)
+ fun_l7_n488(x)
+ else
+ fun_l7_n570(x)
+ end
+end
+
+def fun_l6_n573(x)
+ if (x < 1)
+ fun_l7_n590(x)
+ else
+ fun_l7_n560(x)
+ end
+end
+
+def fun_l6_n574(x)
+ if (x < 1)
+ fun_l7_n38(x)
+ else
+ fun_l7_n444(x)
+ end
+end
+
+def fun_l6_n575(x)
+ if (x < 1)
+ fun_l7_n401(x)
+ else
+ fun_l7_n359(x)
+ end
+end
+
+def fun_l6_n576(x)
+ if (x < 1)
+ fun_l7_n518(x)
+ else
+ fun_l7_n240(x)
+ end
+end
+
+def fun_l6_n577(x)
+ if (x < 1)
+ fun_l7_n247(x)
+ else
+ fun_l7_n540(x)
+ end
+end
+
+def fun_l6_n578(x)
+ if (x < 1)
+ fun_l7_n223(x)
+ else
+ fun_l7_n729(x)
+ end
+end
+
+def fun_l6_n579(x)
+ if (x < 1)
+ fun_l7_n524(x)
+ else
+ fun_l7_n684(x)
+ end
+end
+
+def fun_l6_n580(x)
+ if (x < 1)
+ fun_l7_n113(x)
+ else
+ fun_l7_n865(x)
+ end
+end
+
+def fun_l6_n581(x)
+ if (x < 1)
+ fun_l7_n920(x)
+ else
+ fun_l7_n238(x)
+ end
+end
+
+def fun_l6_n582(x)
+ if (x < 1)
+ fun_l7_n78(x)
+ else
+ fun_l7_n85(x)
+ end
+end
+
+def fun_l6_n583(x)
+ if (x < 1)
+ fun_l7_n713(x)
+ else
+ fun_l7_n110(x)
+ end
+end
+
+def fun_l6_n584(x)
+ if (x < 1)
+ fun_l7_n170(x)
+ else
+ fun_l7_n183(x)
+ end
+end
+
+def fun_l6_n585(x)
+ if (x < 1)
+ fun_l7_n100(x)
+ else
+ fun_l7_n215(x)
+ end
+end
+
+def fun_l6_n586(x)
+ if (x < 1)
+ fun_l7_n126(x)
+ else
+ fun_l7_n136(x)
+ end
+end
+
+def fun_l6_n587(x)
+ if (x < 1)
+ fun_l7_n592(x)
+ else
+ fun_l7_n502(x)
+ end
+end
+
+def fun_l6_n588(x)
+ if (x < 1)
+ fun_l7_n155(x)
+ else
+ fun_l7_n591(x)
+ end
+end
+
+def fun_l6_n589(x)
+ if (x < 1)
+ fun_l7_n840(x)
+ else
+ fun_l7_n91(x)
+ end
+end
+
+def fun_l6_n590(x)
+ if (x < 1)
+ fun_l7_n146(x)
+ else
+ fun_l7_n849(x)
+ end
+end
+
+def fun_l6_n591(x)
+ if (x < 1)
+ fun_l7_n161(x)
+ else
+ fun_l7_n884(x)
+ end
+end
+
+def fun_l6_n592(x)
+ if (x < 1)
+ fun_l7_n994(x)
+ else
+ fun_l7_n341(x)
+ end
+end
+
+def fun_l6_n593(x)
+ if (x < 1)
+ fun_l7_n974(x)
+ else
+ fun_l7_n355(x)
+ end
+end
+
+def fun_l6_n594(x)
+ if (x < 1)
+ fun_l7_n726(x)
+ else
+ fun_l7_n266(x)
+ end
+end
+
+def fun_l6_n595(x)
+ if (x < 1)
+ fun_l7_n142(x)
+ else
+ fun_l7_n154(x)
+ end
+end
+
+def fun_l6_n596(x)
+ if (x < 1)
+ fun_l7_n287(x)
+ else
+ fun_l7_n155(x)
+ end
+end
+
+def fun_l6_n597(x)
+ if (x < 1)
+ fun_l7_n594(x)
+ else
+ fun_l7_n424(x)
+ end
+end
+
+def fun_l6_n598(x)
+ if (x < 1)
+ fun_l7_n227(x)
+ else
+ fun_l7_n445(x)
+ end
+end
+
+def fun_l6_n599(x)
+ if (x < 1)
+ fun_l7_n660(x)
+ else
+ fun_l7_n464(x)
+ end
+end
+
+def fun_l6_n600(x)
+ if (x < 1)
+ fun_l7_n930(x)
+ else
+ fun_l7_n520(x)
+ end
+end
+
+def fun_l6_n601(x)
+ if (x < 1)
+ fun_l7_n714(x)
+ else
+ fun_l7_n984(x)
+ end
+end
+
+def fun_l6_n602(x)
+ if (x < 1)
+ fun_l7_n226(x)
+ else
+ fun_l7_n316(x)
+ end
+end
+
+def fun_l6_n603(x)
+ if (x < 1)
+ fun_l7_n104(x)
+ else
+ fun_l7_n563(x)
+ end
+end
+
+def fun_l6_n604(x)
+ if (x < 1)
+ fun_l7_n149(x)
+ else
+ fun_l7_n921(x)
+ end
+end
+
+def fun_l6_n605(x)
+ if (x < 1)
+ fun_l7_n195(x)
+ else
+ fun_l7_n696(x)
+ end
+end
+
+def fun_l6_n606(x)
+ if (x < 1)
+ fun_l7_n337(x)
+ else
+ fun_l7_n347(x)
+ end
+end
+
+def fun_l6_n607(x)
+ if (x < 1)
+ fun_l7_n657(x)
+ else
+ fun_l7_n67(x)
+ end
+end
+
+def fun_l6_n608(x)
+ if (x < 1)
+ fun_l7_n796(x)
+ else
+ fun_l7_n589(x)
+ end
+end
+
+def fun_l6_n609(x)
+ if (x < 1)
+ fun_l7_n230(x)
+ else
+ fun_l7_n769(x)
+ end
+end
+
+def fun_l6_n610(x)
+ if (x < 1)
+ fun_l7_n427(x)
+ else
+ fun_l7_n892(x)
+ end
+end
+
+def fun_l6_n611(x)
+ if (x < 1)
+ fun_l7_n741(x)
+ else
+ fun_l7_n567(x)
+ end
+end
+
+def fun_l6_n612(x)
+ if (x < 1)
+ fun_l7_n471(x)
+ else
+ fun_l7_n824(x)
+ end
+end
+
+def fun_l6_n613(x)
+ if (x < 1)
+ fun_l7_n522(x)
+ else
+ fun_l7_n694(x)
+ end
+end
+
+def fun_l6_n614(x)
+ if (x < 1)
+ fun_l7_n95(x)
+ else
+ fun_l7_n84(x)
+ end
+end
+
+def fun_l6_n615(x)
+ if (x < 1)
+ fun_l7_n632(x)
+ else
+ fun_l7_n590(x)
+ end
+end
+
+def fun_l6_n616(x)
+ if (x < 1)
+ fun_l7_n372(x)
+ else
+ fun_l7_n659(x)
+ end
+end
+
+def fun_l6_n617(x)
+ if (x < 1)
+ fun_l7_n547(x)
+ else
+ fun_l7_n321(x)
+ end
+end
+
+def fun_l6_n618(x)
+ if (x < 1)
+ fun_l7_n53(x)
+ else
+ fun_l7_n723(x)
+ end
+end
+
+def fun_l6_n619(x)
+ if (x < 1)
+ fun_l7_n653(x)
+ else
+ fun_l7_n740(x)
+ end
+end
+
+def fun_l6_n620(x)
+ if (x < 1)
+ fun_l7_n16(x)
+ else
+ fun_l7_n228(x)
+ end
+end
+
+def fun_l6_n621(x)
+ if (x < 1)
+ fun_l7_n655(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n622(x)
+ if (x < 1)
+ fun_l7_n212(x)
+ else
+ fun_l7_n692(x)
+ end
+end
+
+def fun_l6_n623(x)
+ if (x < 1)
+ fun_l7_n959(x)
+ else
+ fun_l7_n327(x)
+ end
+end
+
+def fun_l6_n624(x)
+ if (x < 1)
+ fun_l7_n607(x)
+ else
+ fun_l7_n168(x)
+ end
+end
+
+def fun_l6_n625(x)
+ if (x < 1)
+ fun_l7_n229(x)
+ else
+ fun_l7_n584(x)
+ end
+end
+
+def fun_l6_n626(x)
+ if (x < 1)
+ fun_l7_n776(x)
+ else
+ fun_l7_n284(x)
+ end
+end
+
+def fun_l6_n627(x)
+ if (x < 1)
+ fun_l7_n770(x)
+ else
+ fun_l7_n169(x)
+ end
+end
+
+def fun_l6_n628(x)
+ if (x < 1)
+ fun_l7_n550(x)
+ else
+ fun_l7_n918(x)
+ end
+end
+
+def fun_l6_n629(x)
+ if (x < 1)
+ fun_l7_n450(x)
+ else
+ fun_l7_n654(x)
+ end
+end
+
+def fun_l6_n630(x)
+ if (x < 1)
+ fun_l7_n968(x)
+ else
+ fun_l7_n770(x)
+ end
+end
+
+def fun_l6_n631(x)
+ if (x < 1)
+ fun_l7_n118(x)
+ else
+ fun_l7_n411(x)
+ end
+end
+
+def fun_l6_n632(x)
+ if (x < 1)
+ fun_l7_n352(x)
+ else
+ fun_l7_n840(x)
+ end
+end
+
+def fun_l6_n633(x)
+ if (x < 1)
+ fun_l7_n588(x)
+ else
+ fun_l7_n810(x)
+ end
+end
+
+def fun_l6_n634(x)
+ if (x < 1)
+ fun_l7_n955(x)
+ else
+ fun_l7_n709(x)
+ end
+end
+
+def fun_l6_n635(x)
+ if (x < 1)
+ fun_l7_n137(x)
+ else
+ fun_l7_n239(x)
+ end
+end
+
+def fun_l6_n636(x)
+ if (x < 1)
+ fun_l7_n955(x)
+ else
+ fun_l7_n87(x)
+ end
+end
+
+def fun_l6_n637(x)
+ if (x < 1)
+ fun_l7_n479(x)
+ else
+ fun_l7_n91(x)
+ end
+end
+
+def fun_l6_n638(x)
+ if (x < 1)
+ fun_l7_n366(x)
+ else
+ fun_l7_n388(x)
+ end
+end
+
+def fun_l6_n639(x)
+ if (x < 1)
+ fun_l7_n90(x)
+ else
+ fun_l7_n971(x)
+ end
+end
+
+def fun_l6_n640(x)
+ if (x < 1)
+ fun_l7_n330(x)
+ else
+ fun_l7_n415(x)
+ end
+end
+
+def fun_l6_n641(x)
+ if (x < 1)
+ fun_l7_n233(x)
+ else
+ fun_l7_n653(x)
+ end
+end
+
+def fun_l6_n642(x)
+ if (x < 1)
+ fun_l7_n106(x)
+ else
+ fun_l7_n440(x)
+ end
+end
+
+def fun_l6_n643(x)
+ if (x < 1)
+ fun_l7_n156(x)
+ else
+ fun_l7_n818(x)
+ end
+end
+
+def fun_l6_n644(x)
+ if (x < 1)
+ fun_l7_n68(x)
+ else
+ fun_l7_n763(x)
+ end
+end
+
+def fun_l6_n645(x)
+ if (x < 1)
+ fun_l7_n858(x)
+ else
+ fun_l7_n465(x)
+ end
+end
+
+def fun_l6_n646(x)
+ if (x < 1)
+ fun_l7_n886(x)
+ else
+ fun_l7_n86(x)
+ end
+end
+
+def fun_l6_n647(x)
+ if (x < 1)
+ fun_l7_n689(x)
+ else
+ fun_l7_n964(x)
+ end
+end
+
+def fun_l6_n648(x)
+ if (x < 1)
+ fun_l7_n748(x)
+ else
+ fun_l7_n214(x)
+ end
+end
+
+def fun_l6_n649(x)
+ if (x < 1)
+ fun_l7_n830(x)
+ else
+ fun_l7_n567(x)
+ end
+end
+
+def fun_l6_n650(x)
+ if (x < 1)
+ fun_l7_n907(x)
+ else
+ fun_l7_n957(x)
+ end
+end
+
+def fun_l6_n651(x)
+ if (x < 1)
+ fun_l7_n242(x)
+ else
+ fun_l7_n239(x)
+ end
+end
+
+def fun_l6_n652(x)
+ if (x < 1)
+ fun_l7_n347(x)
+ else
+ fun_l7_n63(x)
+ end
+end
+
+def fun_l6_n653(x)
+ if (x < 1)
+ fun_l7_n480(x)
+ else
+ fun_l7_n441(x)
+ end
+end
+
+def fun_l6_n654(x)
+ if (x < 1)
+ fun_l7_n304(x)
+ else
+ fun_l7_n690(x)
+ end
+end
+
+def fun_l6_n655(x)
+ if (x < 1)
+ fun_l7_n511(x)
+ else
+ fun_l7_n710(x)
+ end
+end
+
+def fun_l6_n656(x)
+ if (x < 1)
+ fun_l7_n202(x)
+ else
+ fun_l7_n48(x)
+ end
+end
+
+def fun_l6_n657(x)
+ if (x < 1)
+ fun_l7_n232(x)
+ else
+ fun_l7_n919(x)
+ end
+end
+
+def fun_l6_n658(x)
+ if (x < 1)
+ fun_l7_n627(x)
+ else
+ fun_l7_n620(x)
+ end
+end
+
+def fun_l6_n659(x)
+ if (x < 1)
+ fun_l7_n716(x)
+ else
+ fun_l7_n116(x)
+ end
+end
+
+def fun_l6_n660(x)
+ if (x < 1)
+ fun_l7_n105(x)
+ else
+ fun_l7_n536(x)
+ end
+end
+
+def fun_l6_n661(x)
+ if (x < 1)
+ fun_l7_n376(x)
+ else
+ fun_l7_n965(x)
+ end
+end
+
+def fun_l6_n662(x)
+ if (x < 1)
+ fun_l7_n417(x)
+ else
+ fun_l7_n726(x)
+ end
+end
+
+def fun_l6_n663(x)
+ if (x < 1)
+ fun_l7_n567(x)
+ else
+ fun_l7_n948(x)
+ end
+end
+
+def fun_l6_n664(x)
+ if (x < 1)
+ fun_l7_n640(x)
+ else
+ fun_l7_n910(x)
+ end
+end
+
+def fun_l6_n665(x)
+ if (x < 1)
+ fun_l7_n874(x)
+ else
+ fun_l7_n314(x)
+ end
+end
+
+def fun_l6_n666(x)
+ if (x < 1)
+ fun_l7_n946(x)
+ else
+ fun_l7_n101(x)
+ end
+end
+
+def fun_l6_n667(x)
+ if (x < 1)
+ fun_l7_n960(x)
+ else
+ fun_l7_n199(x)
+ end
+end
+
+def fun_l6_n668(x)
+ if (x < 1)
+ fun_l7_n389(x)
+ else
+ fun_l7_n976(x)
+ end
+end
+
+def fun_l6_n669(x)
+ if (x < 1)
+ fun_l7_n31(x)
+ else
+ fun_l7_n903(x)
+ end
+end
+
+def fun_l6_n670(x)
+ if (x < 1)
+ fun_l7_n288(x)
+ else
+ fun_l7_n115(x)
+ end
+end
+
+def fun_l6_n671(x)
+ if (x < 1)
+ fun_l7_n418(x)
+ else
+ fun_l7_n249(x)
+ end
+end
+
+def fun_l6_n672(x)
+ if (x < 1)
+ fun_l7_n733(x)
+ else
+ fun_l7_n815(x)
+ end
+end
+
+def fun_l6_n673(x)
+ if (x < 1)
+ fun_l7_n227(x)
+ else
+ fun_l7_n23(x)
+ end
+end
+
+def fun_l6_n674(x)
+ if (x < 1)
+ fun_l7_n936(x)
+ else
+ fun_l7_n386(x)
+ end
+end
+
+def fun_l6_n675(x)
+ if (x < 1)
+ fun_l7_n638(x)
+ else
+ fun_l7_n39(x)
+ end
+end
+
+def fun_l6_n676(x)
+ if (x < 1)
+ fun_l7_n304(x)
+ else
+ fun_l7_n35(x)
+ end
+end
+
+def fun_l6_n677(x)
+ if (x < 1)
+ fun_l7_n676(x)
+ else
+ fun_l7_n443(x)
+ end
+end
+
+def fun_l6_n678(x)
+ if (x < 1)
+ fun_l7_n648(x)
+ else
+ fun_l7_n453(x)
+ end
+end
+
+def fun_l6_n679(x)
+ if (x < 1)
+ fun_l7_n15(x)
+ else
+ fun_l7_n220(x)
+ end
+end
+
+def fun_l6_n680(x)
+ if (x < 1)
+ fun_l7_n201(x)
+ else
+ fun_l7_n842(x)
+ end
+end
+
+def fun_l6_n681(x)
+ if (x < 1)
+ fun_l7_n67(x)
+ else
+ fun_l7_n73(x)
+ end
+end
+
+def fun_l6_n682(x)
+ if (x < 1)
+ fun_l7_n280(x)
+ else
+ fun_l7_n370(x)
+ end
+end
+
+def fun_l6_n683(x)
+ if (x < 1)
+ fun_l7_n822(x)
+ else
+ fun_l7_n27(x)
+ end
+end
+
+def fun_l6_n684(x)
+ if (x < 1)
+ fun_l7_n720(x)
+ else
+ fun_l7_n651(x)
+ end
+end
+
+def fun_l6_n685(x)
+ if (x < 1)
+ fun_l7_n414(x)
+ else
+ fun_l7_n257(x)
+ end
+end
+
+def fun_l6_n686(x)
+ if (x < 1)
+ fun_l7_n477(x)
+ else
+ fun_l7_n883(x)
+ end
+end
+
+def fun_l6_n687(x)
+ if (x < 1)
+ fun_l7_n467(x)
+ else
+ fun_l7_n739(x)
+ end
+end
+
+def fun_l6_n688(x)
+ if (x < 1)
+ fun_l7_n421(x)
+ else
+ fun_l7_n271(x)
+ end
+end
+
+def fun_l6_n689(x)
+ if (x < 1)
+ fun_l7_n444(x)
+ else
+ fun_l7_n601(x)
+ end
+end
+
+def fun_l6_n690(x)
+ if (x < 1)
+ fun_l7_n104(x)
+ else
+ fun_l7_n597(x)
+ end
+end
+
+def fun_l6_n691(x)
+ if (x < 1)
+ fun_l7_n273(x)
+ else
+ fun_l7_n79(x)
+ end
+end
+
+def fun_l6_n692(x)
+ if (x < 1)
+ fun_l7_n310(x)
+ else
+ fun_l7_n261(x)
+ end
+end
+
+def fun_l6_n693(x)
+ if (x < 1)
+ fun_l7_n190(x)
+ else
+ fun_l7_n330(x)
+ end
+end
+
+def fun_l6_n694(x)
+ if (x < 1)
+ fun_l7_n103(x)
+ else
+ fun_l7_n258(x)
+ end
+end
+
+def fun_l6_n695(x)
+ if (x < 1)
+ fun_l7_n524(x)
+ else
+ fun_l7_n988(x)
+ end
+end
+
+def fun_l6_n696(x)
+ if (x < 1)
+ fun_l7_n885(x)
+ else
+ fun_l7_n731(x)
+ end
+end
+
+def fun_l6_n697(x)
+ if (x < 1)
+ fun_l7_n212(x)
+ else
+ fun_l7_n98(x)
+ end
+end
+
+def fun_l6_n698(x)
+ if (x < 1)
+ fun_l7_n735(x)
+ else
+ fun_l7_n682(x)
+ end
+end
+
+def fun_l6_n699(x)
+ if (x < 1)
+ fun_l7_n610(x)
+ else
+ fun_l7_n512(x)
+ end
+end
+
+def fun_l6_n700(x)
+ if (x < 1)
+ fun_l7_n828(x)
+ else
+ fun_l7_n651(x)
+ end
+end
+
+def fun_l6_n701(x)
+ if (x < 1)
+ fun_l7_n269(x)
+ else
+ fun_l7_n192(x)
+ end
+end
+
+def fun_l6_n702(x)
+ if (x < 1)
+ fun_l7_n775(x)
+ else
+ fun_l7_n334(x)
+ end
+end
+
+def fun_l6_n703(x)
+ if (x < 1)
+ fun_l7_n880(x)
+ else
+ fun_l7_n396(x)
+ end
+end
+
+def fun_l6_n704(x)
+ if (x < 1)
+ fun_l7_n907(x)
+ else
+ fun_l7_n107(x)
+ end
+end
+
+def fun_l6_n705(x)
+ if (x < 1)
+ fun_l7_n425(x)
+ else
+ fun_l7_n555(x)
+ end
+end
+
+def fun_l6_n706(x)
+ if (x < 1)
+ fun_l7_n458(x)
+ else
+ fun_l7_n610(x)
+ end
+end
+
+def fun_l6_n707(x)
+ if (x < 1)
+ fun_l7_n527(x)
+ else
+ fun_l7_n69(x)
+ end
+end
+
+def fun_l6_n708(x)
+ if (x < 1)
+ fun_l7_n518(x)
+ else
+ fun_l7_n87(x)
+ end
+end
+
+def fun_l6_n709(x)
+ if (x < 1)
+ fun_l7_n441(x)
+ else
+ fun_l7_n533(x)
+ end
+end
+
+def fun_l6_n710(x)
+ if (x < 1)
+ fun_l7_n872(x)
+ else
+ fun_l7_n896(x)
+ end
+end
+
+def fun_l6_n711(x)
+ if (x < 1)
+ fun_l7_n388(x)
+ else
+ fun_l7_n476(x)
+ end
+end
+
+def fun_l6_n712(x)
+ if (x < 1)
+ fun_l7_n913(x)
+ else
+ fun_l7_n304(x)
+ end
+end
+
+def fun_l6_n713(x)
+ if (x < 1)
+ fun_l7_n203(x)
+ else
+ fun_l7_n457(x)
+ end
+end
+
+def fun_l6_n714(x)
+ if (x < 1)
+ fun_l7_n593(x)
+ else
+ fun_l7_n921(x)
+ end
+end
+
+def fun_l6_n715(x)
+ if (x < 1)
+ fun_l7_n452(x)
+ else
+ fun_l7_n68(x)
+ end
+end
+
+def fun_l6_n716(x)
+ if (x < 1)
+ fun_l7_n203(x)
+ else
+ fun_l7_n362(x)
+ end
+end
+
+def fun_l6_n717(x)
+ if (x < 1)
+ fun_l7_n455(x)
+ else
+ fun_l7_n199(x)
+ end
+end
+
+def fun_l6_n718(x)
+ if (x < 1)
+ fun_l7_n500(x)
+ else
+ fun_l7_n272(x)
+ end
+end
+
+def fun_l6_n719(x)
+ if (x < 1)
+ fun_l7_n970(x)
+ else
+ fun_l7_n572(x)
+ end
+end
+
+def fun_l6_n720(x)
+ if (x < 1)
+ fun_l7_n74(x)
+ else
+ fun_l7_n246(x)
+ end
+end
+
+def fun_l6_n721(x)
+ if (x < 1)
+ fun_l7_n943(x)
+ else
+ fun_l7_n640(x)
+ end
+end
+
+def fun_l6_n722(x)
+ if (x < 1)
+ fun_l7_n106(x)
+ else
+ fun_l7_n387(x)
+ end
+end
+
+def fun_l6_n723(x)
+ if (x < 1)
+ fun_l7_n474(x)
+ else
+ fun_l7_n530(x)
+ end
+end
+
+def fun_l6_n724(x)
+ if (x < 1)
+ fun_l7_n246(x)
+ else
+ fun_l7_n387(x)
+ end
+end
+
+def fun_l6_n725(x)
+ if (x < 1)
+ fun_l7_n572(x)
+ else
+ fun_l7_n874(x)
+ end
+end
+
+def fun_l6_n726(x)
+ if (x < 1)
+ fun_l7_n858(x)
+ else
+ fun_l7_n71(x)
+ end
+end
+
+def fun_l6_n727(x)
+ if (x < 1)
+ fun_l7_n615(x)
+ else
+ fun_l7_n14(x)
+ end
+end
+
+def fun_l6_n728(x)
+ if (x < 1)
+ fun_l7_n840(x)
+ else
+ fun_l7_n779(x)
+ end
+end
+
+def fun_l6_n729(x)
+ if (x < 1)
+ fun_l7_n811(x)
+ else
+ fun_l7_n981(x)
+ end
+end
+
+def fun_l6_n730(x)
+ if (x < 1)
+ fun_l7_n196(x)
+ else
+ fun_l7_n731(x)
+ end
+end
+
+def fun_l6_n731(x)
+ if (x < 1)
+ fun_l7_n202(x)
+ else
+ fun_l7_n781(x)
+ end
+end
+
+def fun_l6_n732(x)
+ if (x < 1)
+ fun_l7_n867(x)
+ else
+ fun_l7_n770(x)
+ end
+end
+
+def fun_l6_n733(x)
+ if (x < 1)
+ fun_l7_n90(x)
+ else
+ fun_l7_n937(x)
+ end
+end
+
+def fun_l6_n734(x)
+ if (x < 1)
+ fun_l7_n890(x)
+ else
+ fun_l7_n937(x)
+ end
+end
+
+def fun_l6_n735(x)
+ if (x < 1)
+ fun_l7_n967(x)
+ else
+ fun_l7_n235(x)
+ end
+end
+
+def fun_l6_n736(x)
+ if (x < 1)
+ fun_l7_n612(x)
+ else
+ fun_l7_n140(x)
+ end
+end
+
+def fun_l6_n737(x)
+ if (x < 1)
+ fun_l7_n156(x)
+ else
+ fun_l7_n600(x)
+ end
+end
+
+def fun_l6_n738(x)
+ if (x < 1)
+ fun_l7_n462(x)
+ else
+ fun_l7_n907(x)
+ end
+end
+
+def fun_l6_n739(x)
+ if (x < 1)
+ fun_l7_n226(x)
+ else
+ fun_l7_n83(x)
+ end
+end
+
+def fun_l6_n740(x)
+ if (x < 1)
+ fun_l7_n419(x)
+ else
+ fun_l7_n95(x)
+ end
+end
+
+def fun_l6_n741(x)
+ if (x < 1)
+ fun_l7_n358(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n742(x)
+ if (x < 1)
+ fun_l7_n451(x)
+ else
+ fun_l7_n700(x)
+ end
+end
+
+def fun_l6_n743(x)
+ if (x < 1)
+ fun_l7_n561(x)
+ else
+ fun_l7_n383(x)
+ end
+end
+
+def fun_l6_n744(x)
+ if (x < 1)
+ fun_l7_n28(x)
+ else
+ fun_l7_n56(x)
+ end
+end
+
+def fun_l6_n745(x)
+ if (x < 1)
+ fun_l7_n127(x)
+ else
+ fun_l7_n113(x)
+ end
+end
+
+def fun_l6_n746(x)
+ if (x < 1)
+ fun_l7_n767(x)
+ else
+ fun_l7_n907(x)
+ end
+end
+
+def fun_l6_n747(x)
+ if (x < 1)
+ fun_l7_n174(x)
+ else
+ fun_l7_n955(x)
+ end
+end
+
+def fun_l6_n748(x)
+ if (x < 1)
+ fun_l7_n51(x)
+ else
+ fun_l7_n951(x)
+ end
+end
+
+def fun_l6_n749(x)
+ if (x < 1)
+ fun_l7_n172(x)
+ else
+ fun_l7_n847(x)
+ end
+end
+
+def fun_l6_n750(x)
+ if (x < 1)
+ fun_l7_n240(x)
+ else
+ fun_l7_n869(x)
+ end
+end
+
+def fun_l6_n751(x)
+ if (x < 1)
+ fun_l7_n435(x)
+ else
+ fun_l7_n747(x)
+ end
+end
+
+def fun_l6_n752(x)
+ if (x < 1)
+ fun_l7_n673(x)
+ else
+ fun_l7_n454(x)
+ end
+end
+
+def fun_l6_n753(x)
+ if (x < 1)
+ fun_l7_n98(x)
+ else
+ fun_l7_n66(x)
+ end
+end
+
+def fun_l6_n754(x)
+ if (x < 1)
+ fun_l7_n63(x)
+ else
+ fun_l7_n943(x)
+ end
+end
+
+def fun_l6_n755(x)
+ if (x < 1)
+ fun_l7_n863(x)
+ else
+ fun_l7_n155(x)
+ end
+end
+
+def fun_l6_n756(x)
+ if (x < 1)
+ fun_l7_n197(x)
+ else
+ fun_l7_n807(x)
+ end
+end
+
+def fun_l6_n757(x)
+ if (x < 1)
+ fun_l7_n992(x)
+ else
+ fun_l7_n615(x)
+ end
+end
+
+def fun_l6_n758(x)
+ if (x < 1)
+ fun_l7_n172(x)
+ else
+ fun_l7_n507(x)
+ end
+end
+
+def fun_l6_n759(x)
+ if (x < 1)
+ fun_l7_n756(x)
+ else
+ fun_l7_n599(x)
+ end
+end
+
+def fun_l6_n760(x)
+ if (x < 1)
+ fun_l7_n876(x)
+ else
+ fun_l7_n185(x)
+ end
+end
+
+def fun_l6_n761(x)
+ if (x < 1)
+ fun_l7_n522(x)
+ else
+ fun_l7_n301(x)
+ end
+end
+
+def fun_l6_n762(x)
+ if (x < 1)
+ fun_l7_n994(x)
+ else
+ fun_l7_n408(x)
+ end
+end
+
+def fun_l6_n763(x)
+ if (x < 1)
+ fun_l7_n201(x)
+ else
+ fun_l7_n304(x)
+ end
+end
+
+def fun_l6_n764(x)
+ if (x < 1)
+ fun_l7_n200(x)
+ else
+ fun_l7_n123(x)
+ end
+end
+
+def fun_l6_n765(x)
+ if (x < 1)
+ fun_l7_n156(x)
+ else
+ fun_l7_n117(x)
+ end
+end
+
+def fun_l6_n766(x)
+ if (x < 1)
+ fun_l7_n918(x)
+ else
+ fun_l7_n416(x)
+ end
+end
+
+def fun_l6_n767(x)
+ if (x < 1)
+ fun_l7_n538(x)
+ else
+ fun_l7_n335(x)
+ end
+end
+
+def fun_l6_n768(x)
+ if (x < 1)
+ fun_l7_n699(x)
+ else
+ fun_l7_n980(x)
+ end
+end
+
+def fun_l6_n769(x)
+ if (x < 1)
+ fun_l7_n903(x)
+ else
+ fun_l7_n195(x)
+ end
+end
+
+def fun_l6_n770(x)
+ if (x < 1)
+ fun_l7_n419(x)
+ else
+ fun_l7_n523(x)
+ end
+end
+
+def fun_l6_n771(x)
+ if (x < 1)
+ fun_l7_n221(x)
+ else
+ fun_l7_n39(x)
+ end
+end
+
+def fun_l6_n772(x)
+ if (x < 1)
+ fun_l7_n369(x)
+ else
+ fun_l7_n227(x)
+ end
+end
+
+def fun_l6_n773(x)
+ if (x < 1)
+ fun_l7_n861(x)
+ else
+ fun_l7_n252(x)
+ end
+end
+
+def fun_l6_n774(x)
+ if (x < 1)
+ fun_l7_n682(x)
+ else
+ fun_l7_n42(x)
+ end
+end
+
+def fun_l6_n775(x)
+ if (x < 1)
+ fun_l7_n777(x)
+ else
+ fun_l7_n594(x)
+ end
+end
+
+def fun_l6_n776(x)
+ if (x < 1)
+ fun_l7_n794(x)
+ else
+ fun_l7_n71(x)
+ end
+end
+
+def fun_l6_n777(x)
+ if (x < 1)
+ fun_l7_n669(x)
+ else
+ fun_l7_n66(x)
+ end
+end
+
+def fun_l6_n778(x)
+ if (x < 1)
+ fun_l7_n824(x)
+ else
+ fun_l7_n95(x)
+ end
+end
+
+def fun_l6_n779(x)
+ if (x < 1)
+ fun_l7_n833(x)
+ else
+ fun_l7_n504(x)
+ end
+end
+
+def fun_l6_n780(x)
+ if (x < 1)
+ fun_l7_n50(x)
+ else
+ fun_l7_n647(x)
+ end
+end
+
+def fun_l6_n781(x)
+ if (x < 1)
+ fun_l7_n139(x)
+ else
+ fun_l7_n214(x)
+ end
+end
+
+def fun_l6_n782(x)
+ if (x < 1)
+ fun_l7_n450(x)
+ else
+ fun_l7_n660(x)
+ end
+end
+
+def fun_l6_n783(x)
+ if (x < 1)
+ fun_l7_n164(x)
+ else
+ fun_l7_n576(x)
+ end
+end
+
+def fun_l6_n784(x)
+ if (x < 1)
+ fun_l7_n722(x)
+ else
+ fun_l7_n714(x)
+ end
+end
+
+def fun_l6_n785(x)
+ if (x < 1)
+ fun_l7_n90(x)
+ else
+ fun_l7_n556(x)
+ end
+end
+
+def fun_l6_n786(x)
+ if (x < 1)
+ fun_l7_n413(x)
+ else
+ fun_l7_n722(x)
+ end
+end
+
+def fun_l6_n787(x)
+ if (x < 1)
+ fun_l7_n141(x)
+ else
+ fun_l7_n90(x)
+ end
+end
+
+def fun_l6_n788(x)
+ if (x < 1)
+ fun_l7_n750(x)
+ else
+ fun_l7_n660(x)
+ end
+end
+
+def fun_l6_n789(x)
+ if (x < 1)
+ fun_l7_n581(x)
+ else
+ fun_l7_n368(x)
+ end
+end
+
+def fun_l6_n790(x)
+ if (x < 1)
+ fun_l7_n922(x)
+ else
+ fun_l7_n551(x)
+ end
+end
+
+def fun_l6_n791(x)
+ if (x < 1)
+ fun_l7_n842(x)
+ else
+ fun_l7_n336(x)
+ end
+end
+
+def fun_l6_n792(x)
+ if (x < 1)
+ fun_l7_n264(x)
+ else
+ fun_l7_n7(x)
+ end
+end
+
+def fun_l6_n793(x)
+ if (x < 1)
+ fun_l7_n902(x)
+ else
+ fun_l7_n184(x)
+ end
+end
+
+def fun_l6_n794(x)
+ if (x < 1)
+ fun_l7_n788(x)
+ else
+ fun_l7_n854(x)
+ end
+end
+
+def fun_l6_n795(x)
+ if (x < 1)
+ fun_l7_n375(x)
+ else
+ fun_l7_n601(x)
+ end
+end
+
+def fun_l6_n796(x)
+ if (x < 1)
+ fun_l7_n674(x)
+ else
+ fun_l7_n136(x)
+ end
+end
+
+def fun_l6_n797(x)
+ if (x < 1)
+ fun_l7_n836(x)
+ else
+ fun_l7_n90(x)
+ end
+end
+
+def fun_l6_n798(x)
+ if (x < 1)
+ fun_l7_n461(x)
+ else
+ fun_l7_n686(x)
+ end
+end
+
+def fun_l6_n799(x)
+ if (x < 1)
+ fun_l7_n308(x)
+ else
+ fun_l7_n179(x)
+ end
+end
+
+def fun_l6_n800(x)
+ if (x < 1)
+ fun_l7_n154(x)
+ else
+ fun_l7_n618(x)
+ end
+end
+
+def fun_l6_n801(x)
+ if (x < 1)
+ fun_l7_n242(x)
+ else
+ fun_l7_n16(x)
+ end
+end
+
+def fun_l6_n802(x)
+ if (x < 1)
+ fun_l7_n880(x)
+ else
+ fun_l7_n143(x)
+ end
+end
+
+def fun_l6_n803(x)
+ if (x < 1)
+ fun_l7_n577(x)
+ else
+ fun_l7_n414(x)
+ end
+end
+
+def fun_l6_n804(x)
+ if (x < 1)
+ fun_l7_n409(x)
+ else
+ fun_l7_n116(x)
+ end
+end
+
+def fun_l6_n805(x)
+ if (x < 1)
+ fun_l7_n259(x)
+ else
+ fun_l7_n820(x)
+ end
+end
+
+def fun_l6_n806(x)
+ if (x < 1)
+ fun_l7_n384(x)
+ else
+ fun_l7_n939(x)
+ end
+end
+
+def fun_l6_n807(x)
+ if (x < 1)
+ fun_l7_n138(x)
+ else
+ fun_l7_n652(x)
+ end
+end
+
+def fun_l6_n808(x)
+ if (x < 1)
+ fun_l7_n455(x)
+ else
+ fun_l7_n693(x)
+ end
+end
+
+def fun_l6_n809(x)
+ if (x < 1)
+ fun_l7_n892(x)
+ else
+ fun_l7_n638(x)
+ end
+end
+
+def fun_l6_n810(x)
+ if (x < 1)
+ fun_l7_n498(x)
+ else
+ fun_l7_n716(x)
+ end
+end
+
+def fun_l6_n811(x)
+ if (x < 1)
+ fun_l7_n713(x)
+ else
+ fun_l7_n9(x)
+ end
+end
+
+def fun_l6_n812(x)
+ if (x < 1)
+ fun_l7_n854(x)
+ else
+ fun_l7_n507(x)
+ end
+end
+
+def fun_l6_n813(x)
+ if (x < 1)
+ fun_l7_n385(x)
+ else
+ fun_l7_n323(x)
+ end
+end
+
+def fun_l6_n814(x)
+ if (x < 1)
+ fun_l7_n437(x)
+ else
+ fun_l7_n954(x)
+ end
+end
+
+def fun_l6_n815(x)
+ if (x < 1)
+ fun_l7_n471(x)
+ else
+ fun_l7_n245(x)
+ end
+end
+
+def fun_l6_n816(x)
+ if (x < 1)
+ fun_l7_n485(x)
+ else
+ fun_l7_n935(x)
+ end
+end
+
+def fun_l6_n817(x)
+ if (x < 1)
+ fun_l7_n319(x)
+ else
+ fun_l7_n566(x)
+ end
+end
+
+def fun_l6_n818(x)
+ if (x < 1)
+ fun_l7_n339(x)
+ else
+ fun_l7_n152(x)
+ end
+end
+
+def fun_l6_n819(x)
+ if (x < 1)
+ fun_l7_n21(x)
+ else
+ fun_l7_n452(x)
+ end
+end
+
+def fun_l6_n820(x)
+ if (x < 1)
+ fun_l7_n16(x)
+ else
+ fun_l7_n502(x)
+ end
+end
+
+def fun_l6_n821(x)
+ if (x < 1)
+ fun_l7_n813(x)
+ else
+ fun_l7_n520(x)
+ end
+end
+
+def fun_l6_n822(x)
+ if (x < 1)
+ fun_l7_n519(x)
+ else
+ fun_l7_n651(x)
+ end
+end
+
+def fun_l6_n823(x)
+ if (x < 1)
+ fun_l7_n890(x)
+ else
+ fun_l7_n227(x)
+ end
+end
+
+def fun_l6_n824(x)
+ if (x < 1)
+ fun_l7_n517(x)
+ else
+ fun_l7_n799(x)
+ end
+end
+
+def fun_l6_n825(x)
+ if (x < 1)
+ fun_l7_n404(x)
+ else
+ fun_l7_n442(x)
+ end
+end
+
+def fun_l6_n826(x)
+ if (x < 1)
+ fun_l7_n308(x)
+ else
+ fun_l7_n328(x)
+ end
+end
+
+def fun_l6_n827(x)
+ if (x < 1)
+ fun_l7_n953(x)
+ else
+ fun_l7_n950(x)
+ end
+end
+
+def fun_l6_n828(x)
+ if (x < 1)
+ fun_l7_n206(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n829(x)
+ if (x < 1)
+ fun_l7_n499(x)
+ else
+ fun_l7_n972(x)
+ end
+end
+
+def fun_l6_n830(x)
+ if (x < 1)
+ fun_l7_n578(x)
+ else
+ fun_l7_n697(x)
+ end
+end
+
+def fun_l6_n831(x)
+ if (x < 1)
+ fun_l7_n116(x)
+ else
+ fun_l7_n747(x)
+ end
+end
+
+def fun_l6_n832(x)
+ if (x < 1)
+ fun_l7_n423(x)
+ else
+ fun_l7_n653(x)
+ end
+end
+
+def fun_l6_n833(x)
+ if (x < 1)
+ fun_l7_n524(x)
+ else
+ fun_l7_n423(x)
+ end
+end
+
+def fun_l6_n834(x)
+ if (x < 1)
+ fun_l7_n940(x)
+ else
+ fun_l7_n48(x)
+ end
+end
+
+def fun_l6_n835(x)
+ if (x < 1)
+ fun_l7_n336(x)
+ else
+ fun_l7_n584(x)
+ end
+end
+
+def fun_l6_n836(x)
+ if (x < 1)
+ fun_l7_n66(x)
+ else
+ fun_l7_n980(x)
+ end
+end
+
+def fun_l6_n837(x)
+ if (x < 1)
+ fun_l7_n176(x)
+ else
+ fun_l7_n845(x)
+ end
+end
+
+def fun_l6_n838(x)
+ if (x < 1)
+ fun_l7_n736(x)
+ else
+ fun_l7_n385(x)
+ end
+end
+
+def fun_l6_n839(x)
+ if (x < 1)
+ fun_l7_n948(x)
+ else
+ fun_l7_n258(x)
+ end
+end
+
+def fun_l6_n840(x)
+ if (x < 1)
+ fun_l7_n926(x)
+ else
+ fun_l7_n926(x)
+ end
+end
+
+def fun_l6_n841(x)
+ if (x < 1)
+ fun_l7_n334(x)
+ else
+ fun_l7_n134(x)
+ end
+end
+
+def fun_l6_n842(x)
+ if (x < 1)
+ fun_l7_n757(x)
+ else
+ fun_l7_n995(x)
+ end
+end
+
+def fun_l6_n843(x)
+ if (x < 1)
+ fun_l7_n75(x)
+ else
+ fun_l7_n6(x)
+ end
+end
+
+def fun_l6_n844(x)
+ if (x < 1)
+ fun_l7_n632(x)
+ else
+ fun_l7_n683(x)
+ end
+end
+
+def fun_l6_n845(x)
+ if (x < 1)
+ fun_l7_n788(x)
+ else
+ fun_l7_n153(x)
+ end
+end
+
+def fun_l6_n846(x)
+ if (x < 1)
+ fun_l7_n668(x)
+ else
+ fun_l7_n78(x)
+ end
+end
+
+def fun_l6_n847(x)
+ if (x < 1)
+ fun_l7_n509(x)
+ else
+ fun_l7_n210(x)
+ end
+end
+
+def fun_l6_n848(x)
+ if (x < 1)
+ fun_l7_n862(x)
+ else
+ fun_l7_n90(x)
+ end
+end
+
+def fun_l6_n849(x)
+ if (x < 1)
+ fun_l7_n837(x)
+ else
+ fun_l7_n37(x)
+ end
+end
+
+def fun_l6_n850(x)
+ if (x < 1)
+ fun_l7_n792(x)
+ else
+ fun_l7_n171(x)
+ end
+end
+
+def fun_l6_n851(x)
+ if (x < 1)
+ fun_l7_n869(x)
+ else
+ fun_l7_n217(x)
+ end
+end
+
+def fun_l6_n852(x)
+ if (x < 1)
+ fun_l7_n585(x)
+ else
+ fun_l7_n980(x)
+ end
+end
+
+def fun_l6_n853(x)
+ if (x < 1)
+ fun_l7_n752(x)
+ else
+ fun_l7_n214(x)
+ end
+end
+
+def fun_l6_n854(x)
+ if (x < 1)
+ fun_l7_n151(x)
+ else
+ fun_l7_n668(x)
+ end
+end
+
+def fun_l6_n855(x)
+ if (x < 1)
+ fun_l7_n145(x)
+ else
+ fun_l7_n99(x)
+ end
+end
+
+def fun_l6_n856(x)
+ if (x < 1)
+ fun_l7_n114(x)
+ else
+ fun_l7_n852(x)
+ end
+end
+
+def fun_l6_n857(x)
+ if (x < 1)
+ fun_l7_n571(x)
+ else
+ fun_l7_n6(x)
+ end
+end
+
+def fun_l6_n858(x)
+ if (x < 1)
+ fun_l7_n724(x)
+ else
+ fun_l7_n132(x)
+ end
+end
+
+def fun_l6_n859(x)
+ if (x < 1)
+ fun_l7_n146(x)
+ else
+ fun_l7_n627(x)
+ end
+end
+
+def fun_l6_n860(x)
+ if (x < 1)
+ fun_l7_n515(x)
+ else
+ fun_l7_n598(x)
+ end
+end
+
+def fun_l6_n861(x)
+ if (x < 1)
+ fun_l7_n49(x)
+ else
+ fun_l7_n781(x)
+ end
+end
+
+def fun_l6_n862(x)
+ if (x < 1)
+ fun_l7_n378(x)
+ else
+ fun_l7_n295(x)
+ end
+end
+
+def fun_l6_n863(x)
+ if (x < 1)
+ fun_l7_n122(x)
+ else
+ fun_l7_n738(x)
+ end
+end
+
+def fun_l6_n864(x)
+ if (x < 1)
+ fun_l7_n421(x)
+ else
+ fun_l7_n719(x)
+ end
+end
+
+def fun_l6_n865(x)
+ if (x < 1)
+ fun_l7_n965(x)
+ else
+ fun_l7_n963(x)
+ end
+end
+
+def fun_l6_n866(x)
+ if (x < 1)
+ fun_l7_n551(x)
+ else
+ fun_l7_n177(x)
+ end
+end
+
+def fun_l6_n867(x)
+ if (x < 1)
+ fun_l7_n136(x)
+ else
+ fun_l7_n289(x)
+ end
+end
+
+def fun_l6_n868(x)
+ if (x < 1)
+ fun_l7_n26(x)
+ else
+ fun_l7_n376(x)
+ end
+end
+
+def fun_l6_n869(x)
+ if (x < 1)
+ fun_l7_n888(x)
+ else
+ fun_l7_n948(x)
+ end
+end
+
+def fun_l6_n870(x)
+ if (x < 1)
+ fun_l7_n636(x)
+ else
+ fun_l7_n89(x)
+ end
+end
+
+def fun_l6_n871(x)
+ if (x < 1)
+ fun_l7_n953(x)
+ else
+ fun_l7_n634(x)
+ end
+end
+
+def fun_l6_n872(x)
+ if (x < 1)
+ fun_l7_n74(x)
+ else
+ fun_l7_n219(x)
+ end
+end
+
+def fun_l6_n873(x)
+ if (x < 1)
+ fun_l7_n317(x)
+ else
+ fun_l7_n863(x)
+ end
+end
+
+def fun_l6_n874(x)
+ if (x < 1)
+ fun_l7_n495(x)
+ else
+ fun_l7_n478(x)
+ end
+end
+
+def fun_l6_n875(x)
+ if (x < 1)
+ fun_l7_n908(x)
+ else
+ fun_l7_n634(x)
+ end
+end
+
+def fun_l6_n876(x)
+ if (x < 1)
+ fun_l7_n780(x)
+ else
+ fun_l7_n886(x)
+ end
+end
+
+def fun_l6_n877(x)
+ if (x < 1)
+ fun_l7_n768(x)
+ else
+ fun_l7_n820(x)
+ end
+end
+
+def fun_l6_n878(x)
+ if (x < 1)
+ fun_l7_n501(x)
+ else
+ fun_l7_n355(x)
+ end
+end
+
+def fun_l6_n879(x)
+ if (x < 1)
+ fun_l7_n412(x)
+ else
+ fun_l7_n701(x)
+ end
+end
+
+def fun_l6_n880(x)
+ if (x < 1)
+ fun_l7_n541(x)
+ else
+ fun_l7_n148(x)
+ end
+end
+
+def fun_l6_n881(x)
+ if (x < 1)
+ fun_l7_n460(x)
+ else
+ fun_l7_n579(x)
+ end
+end
+
+def fun_l6_n882(x)
+ if (x < 1)
+ fun_l7_n576(x)
+ else
+ fun_l7_n118(x)
+ end
+end
+
+def fun_l6_n883(x)
+ if (x < 1)
+ fun_l7_n218(x)
+ else
+ fun_l7_n197(x)
+ end
+end
+
+def fun_l6_n884(x)
+ if (x < 1)
+ fun_l7_n279(x)
+ else
+ fun_l7_n565(x)
+ end
+end
+
+def fun_l6_n885(x)
+ if (x < 1)
+ fun_l7_n934(x)
+ else
+ fun_l7_n46(x)
+ end
+end
+
+def fun_l6_n886(x)
+ if (x < 1)
+ fun_l7_n894(x)
+ else
+ fun_l7_n864(x)
+ end
+end
+
+def fun_l6_n887(x)
+ if (x < 1)
+ fun_l7_n45(x)
+ else
+ fun_l7_n151(x)
+ end
+end
+
+def fun_l6_n888(x)
+ if (x < 1)
+ fun_l7_n190(x)
+ else
+ fun_l7_n46(x)
+ end
+end
+
+def fun_l6_n889(x)
+ if (x < 1)
+ fun_l7_n56(x)
+ else
+ fun_l7_n451(x)
+ end
+end
+
+def fun_l6_n890(x)
+ if (x < 1)
+ fun_l7_n7(x)
+ else
+ fun_l7_n906(x)
+ end
+end
+
+def fun_l6_n891(x)
+ if (x < 1)
+ fun_l7_n507(x)
+ else
+ fun_l7_n121(x)
+ end
+end
+
+def fun_l6_n892(x)
+ if (x < 1)
+ fun_l7_n757(x)
+ else
+ fun_l7_n485(x)
+ end
+end
+
+def fun_l6_n893(x)
+ if (x < 1)
+ fun_l7_n242(x)
+ else
+ fun_l7_n366(x)
+ end
+end
+
+def fun_l6_n894(x)
+ if (x < 1)
+ fun_l7_n563(x)
+ else
+ fun_l7_n749(x)
+ end
+end
+
+def fun_l6_n895(x)
+ if (x < 1)
+ fun_l7_n976(x)
+ else
+ fun_l7_n907(x)
+ end
+end
+
+def fun_l6_n896(x)
+ if (x < 1)
+ fun_l7_n525(x)
+ else
+ fun_l7_n843(x)
+ end
+end
+
+def fun_l6_n897(x)
+ if (x < 1)
+ fun_l7_n255(x)
+ else
+ fun_l7_n133(x)
+ end
+end
+
+def fun_l6_n898(x)
+ if (x < 1)
+ fun_l7_n796(x)
+ else
+ fun_l7_n275(x)
+ end
+end
+
+def fun_l6_n899(x)
+ if (x < 1)
+ fun_l7_n985(x)
+ else
+ fun_l7_n485(x)
+ end
+end
+
+def fun_l6_n900(x)
+ if (x < 1)
+ fun_l7_n32(x)
+ else
+ fun_l7_n324(x)
+ end
+end
+
+def fun_l6_n901(x)
+ if (x < 1)
+ fun_l7_n334(x)
+ else
+ fun_l7_n618(x)
+ end
+end
+
+def fun_l6_n902(x)
+ if (x < 1)
+ fun_l7_n762(x)
+ else
+ fun_l7_n778(x)
+ end
+end
+
+def fun_l6_n903(x)
+ if (x < 1)
+ fun_l7_n343(x)
+ else
+ fun_l7_n349(x)
+ end
+end
+
+def fun_l6_n904(x)
+ if (x < 1)
+ fun_l7_n310(x)
+ else
+ fun_l7_n215(x)
+ end
+end
+
+def fun_l6_n905(x)
+ if (x < 1)
+ fun_l7_n162(x)
+ else
+ fun_l7_n405(x)
+ end
+end
+
+def fun_l6_n906(x)
+ if (x < 1)
+ fun_l7_n667(x)
+ else
+ fun_l7_n633(x)
+ end
+end
+
+def fun_l6_n907(x)
+ if (x < 1)
+ fun_l7_n652(x)
+ else
+ fun_l7_n771(x)
+ end
+end
+
+def fun_l6_n908(x)
+ if (x < 1)
+ fun_l7_n198(x)
+ else
+ fun_l7_n32(x)
+ end
+end
+
+def fun_l6_n909(x)
+ if (x < 1)
+ fun_l7_n577(x)
+ else
+ fun_l7_n116(x)
+ end
+end
+
+def fun_l6_n910(x)
+ if (x < 1)
+ fun_l7_n63(x)
+ else
+ fun_l7_n57(x)
+ end
+end
+
+def fun_l6_n911(x)
+ if (x < 1)
+ fun_l7_n908(x)
+ else
+ fun_l7_n556(x)
+ end
+end
+
+def fun_l6_n912(x)
+ if (x < 1)
+ fun_l7_n420(x)
+ else
+ fun_l7_n163(x)
+ end
+end
+
+def fun_l6_n913(x)
+ if (x < 1)
+ fun_l7_n795(x)
+ else
+ fun_l7_n225(x)
+ end
+end
+
+def fun_l6_n914(x)
+ if (x < 1)
+ fun_l7_n855(x)
+ else
+ fun_l7_n742(x)
+ end
+end
+
+def fun_l6_n915(x)
+ if (x < 1)
+ fun_l7_n386(x)
+ else
+ fun_l7_n314(x)
+ end
+end
+
+def fun_l6_n916(x)
+ if (x < 1)
+ fun_l7_n587(x)
+ else
+ fun_l7_n371(x)
+ end
+end
+
+def fun_l6_n917(x)
+ if (x < 1)
+ fun_l7_n570(x)
+ else
+ fun_l7_n735(x)
+ end
+end
+
+def fun_l6_n918(x)
+ if (x < 1)
+ fun_l7_n985(x)
+ else
+ fun_l7_n492(x)
+ end
+end
+
+def fun_l6_n919(x)
+ if (x < 1)
+ fun_l7_n991(x)
+ else
+ fun_l7_n454(x)
+ end
+end
+
+def fun_l6_n920(x)
+ if (x < 1)
+ fun_l7_n925(x)
+ else
+ fun_l7_n161(x)
+ end
+end
+
+def fun_l6_n921(x)
+ if (x < 1)
+ fun_l7_n398(x)
+ else
+ fun_l7_n621(x)
+ end
+end
+
+def fun_l6_n922(x)
+ if (x < 1)
+ fun_l7_n732(x)
+ else
+ fun_l7_n509(x)
+ end
+end
+
+def fun_l6_n923(x)
+ if (x < 1)
+ fun_l7_n879(x)
+ else
+ fun_l7_n219(x)
+ end
+end
+
+def fun_l6_n924(x)
+ if (x < 1)
+ fun_l7_n19(x)
+ else
+ fun_l7_n604(x)
+ end
+end
+
+def fun_l6_n925(x)
+ if (x < 1)
+ fun_l7_n474(x)
+ else
+ fun_l7_n439(x)
+ end
+end
+
+def fun_l6_n926(x)
+ if (x < 1)
+ fun_l7_n807(x)
+ else
+ fun_l7_n802(x)
+ end
+end
+
+def fun_l6_n927(x)
+ if (x < 1)
+ fun_l7_n146(x)
+ else
+ fun_l7_n966(x)
+ end
+end
+
+def fun_l6_n928(x)
+ if (x < 1)
+ fun_l7_n72(x)
+ else
+ fun_l7_n835(x)
+ end
+end
+
+def fun_l6_n929(x)
+ if (x < 1)
+ fun_l7_n389(x)
+ else
+ fun_l7_n951(x)
+ end
+end
+
+def fun_l6_n930(x)
+ if (x < 1)
+ fun_l7_n104(x)
+ else
+ fun_l7_n719(x)
+ end
+end
+
+def fun_l6_n931(x)
+ if (x < 1)
+ fun_l7_n250(x)
+ else
+ fun_l7_n13(x)
+ end
+end
+
+def fun_l6_n932(x)
+ if (x < 1)
+ fun_l7_n470(x)
+ else
+ fun_l7_n984(x)
+ end
+end
+
+def fun_l6_n933(x)
+ if (x < 1)
+ fun_l7_n485(x)
+ else
+ fun_l7_n750(x)
+ end
+end
+
+def fun_l6_n934(x)
+ if (x < 1)
+ fun_l7_n371(x)
+ else
+ fun_l7_n912(x)
+ end
+end
+
+def fun_l6_n935(x)
+ if (x < 1)
+ fun_l7_n686(x)
+ else
+ fun_l7_n523(x)
+ end
+end
+
+def fun_l6_n936(x)
+ if (x < 1)
+ fun_l7_n998(x)
+ else
+ fun_l7_n6(x)
+ end
+end
+
+def fun_l6_n937(x)
+ if (x < 1)
+ fun_l7_n753(x)
+ else
+ fun_l7_n781(x)
+ end
+end
+
+def fun_l6_n938(x)
+ if (x < 1)
+ fun_l7_n518(x)
+ else
+ fun_l7_n18(x)
+ end
+end
+
+def fun_l6_n939(x)
+ if (x < 1)
+ fun_l7_n771(x)
+ else
+ fun_l7_n1(x)
+ end
+end
+
+def fun_l6_n940(x)
+ if (x < 1)
+ fun_l7_n43(x)
+ else
+ fun_l7_n727(x)
+ end
+end
+
+def fun_l6_n941(x)
+ if (x < 1)
+ fun_l7_n282(x)
+ else
+ fun_l7_n676(x)
+ end
+end
+
+def fun_l6_n942(x)
+ if (x < 1)
+ fun_l7_n284(x)
+ else
+ fun_l7_n56(x)
+ end
+end
+
+def fun_l6_n943(x)
+ if (x < 1)
+ fun_l7_n304(x)
+ else
+ fun_l7_n287(x)
+ end
+end
+
+def fun_l6_n944(x)
+ if (x < 1)
+ fun_l7_n968(x)
+ else
+ fun_l7_n283(x)
+ end
+end
+
+def fun_l6_n945(x)
+ if (x < 1)
+ fun_l7_n892(x)
+ else
+ fun_l7_n413(x)
+ end
+end
+
+def fun_l6_n946(x)
+ if (x < 1)
+ fun_l7_n750(x)
+ else
+ fun_l7_n244(x)
+ end
+end
+
+def fun_l6_n947(x)
+ if (x < 1)
+ fun_l7_n599(x)
+ else
+ fun_l7_n238(x)
+ end
+end
+
+def fun_l6_n948(x)
+ if (x < 1)
+ fun_l7_n447(x)
+ else
+ fun_l7_n880(x)
+ end
+end
+
+def fun_l6_n949(x)
+ if (x < 1)
+ fun_l7_n242(x)
+ else
+ fun_l7_n210(x)
+ end
+end
+
+def fun_l6_n950(x)
+ if (x < 1)
+ fun_l7_n143(x)
+ else
+ fun_l7_n816(x)
+ end
+end
+
+def fun_l6_n951(x)
+ if (x < 1)
+ fun_l7_n125(x)
+ else
+ fun_l7_n909(x)
+ end
+end
+
+def fun_l6_n952(x)
+ if (x < 1)
+ fun_l7_n134(x)
+ else
+ fun_l7_n946(x)
+ end
+end
+
+def fun_l6_n953(x)
+ if (x < 1)
+ fun_l7_n858(x)
+ else
+ fun_l7_n927(x)
+ end
+end
+
+def fun_l6_n954(x)
+ if (x < 1)
+ fun_l7_n853(x)
+ else
+ fun_l7_n396(x)
+ end
+end
+
+def fun_l6_n955(x)
+ if (x < 1)
+ fun_l7_n725(x)
+ else
+ fun_l7_n42(x)
+ end
+end
+
+def fun_l6_n956(x)
+ if (x < 1)
+ fun_l7_n108(x)
+ else
+ fun_l7_n177(x)
+ end
+end
+
+def fun_l6_n957(x)
+ if (x < 1)
+ fun_l7_n742(x)
+ else
+ fun_l7_n482(x)
+ end
+end
+
+def fun_l6_n958(x)
+ if (x < 1)
+ fun_l7_n385(x)
+ else
+ fun_l7_n292(x)
+ end
+end
+
+def fun_l6_n959(x)
+ if (x < 1)
+ fun_l7_n325(x)
+ else
+ fun_l7_n27(x)
+ end
+end
+
+def fun_l6_n960(x)
+ if (x < 1)
+ fun_l7_n558(x)
+ else
+ fun_l7_n556(x)
+ end
+end
+
+def fun_l6_n961(x)
+ if (x < 1)
+ fun_l7_n472(x)
+ else
+ fun_l7_n322(x)
+ end
+end
+
+def fun_l6_n962(x)
+ if (x < 1)
+ fun_l7_n754(x)
+ else
+ fun_l7_n729(x)
+ end
+end
+
+def fun_l6_n963(x)
+ if (x < 1)
+ fun_l7_n35(x)
+ else
+ fun_l7_n232(x)
+ end
+end
+
+def fun_l6_n964(x)
+ if (x < 1)
+ fun_l7_n113(x)
+ else
+ fun_l7_n878(x)
+ end
+end
+
+def fun_l6_n965(x)
+ if (x < 1)
+ fun_l7_n982(x)
+ else
+ fun_l7_n404(x)
+ end
+end
+
+def fun_l6_n966(x)
+ if (x < 1)
+ fun_l7_n385(x)
+ else
+ fun_l7_n20(x)
+ end
+end
+
+def fun_l6_n967(x)
+ if (x < 1)
+ fun_l7_n394(x)
+ else
+ fun_l7_n873(x)
+ end
+end
+
+def fun_l6_n968(x)
+ if (x < 1)
+ fun_l7_n230(x)
+ else
+ fun_l7_n141(x)
+ end
+end
+
+def fun_l6_n969(x)
+ if (x < 1)
+ fun_l7_n742(x)
+ else
+ fun_l7_n75(x)
+ end
+end
+
+def fun_l6_n970(x)
+ if (x < 1)
+ fun_l7_n583(x)
+ else
+ fun_l7_n809(x)
+ end
+end
+
+def fun_l6_n971(x)
+ if (x < 1)
+ fun_l7_n535(x)
+ else
+ fun_l7_n151(x)
+ end
+end
+
+def fun_l6_n972(x)
+ if (x < 1)
+ fun_l7_n42(x)
+ else
+ fun_l7_n469(x)
+ end
+end
+
+def fun_l6_n973(x)
+ if (x < 1)
+ fun_l7_n964(x)
+ else
+ fun_l7_n759(x)
+ end
+end
+
+def fun_l6_n974(x)
+ if (x < 1)
+ fun_l7_n897(x)
+ else
+ fun_l7_n29(x)
+ end
+end
+
+def fun_l6_n975(x)
+ if (x < 1)
+ fun_l7_n331(x)
+ else
+ fun_l7_n972(x)
+ end
+end
+
+def fun_l6_n976(x)
+ if (x < 1)
+ fun_l7_n825(x)
+ else
+ fun_l7_n221(x)
+ end
+end
+
+def fun_l6_n977(x)
+ if (x < 1)
+ fun_l7_n207(x)
+ else
+ fun_l7_n520(x)
+ end
+end
+
+def fun_l6_n978(x)
+ if (x < 1)
+ fun_l7_n231(x)
+ else
+ fun_l7_n552(x)
+ end
+end
+
+def fun_l6_n979(x)
+ if (x < 1)
+ fun_l7_n621(x)
+ else
+ fun_l7_n766(x)
+ end
+end
+
+def fun_l6_n980(x)
+ if (x < 1)
+ fun_l7_n461(x)
+ else
+ fun_l7_n552(x)
+ end
+end
+
+def fun_l6_n981(x)
+ if (x < 1)
+ fun_l7_n891(x)
+ else
+ fun_l7_n710(x)
+ end
+end
+
+def fun_l6_n982(x)
+ if (x < 1)
+ fun_l7_n253(x)
+ else
+ fun_l7_n104(x)
+ end
+end
+
+def fun_l6_n983(x)
+ if (x < 1)
+ fun_l7_n726(x)
+ else
+ fun_l7_n903(x)
+ end
+end
+
+def fun_l6_n984(x)
+ if (x < 1)
+ fun_l7_n524(x)
+ else
+ fun_l7_n700(x)
+ end
+end
+
+def fun_l6_n985(x)
+ if (x < 1)
+ fun_l7_n234(x)
+ else
+ fun_l7_n454(x)
+ end
+end
+
+def fun_l6_n986(x)
+ if (x < 1)
+ fun_l7_n379(x)
+ else
+ fun_l7_n504(x)
+ end
+end
+
+def fun_l6_n987(x)
+ if (x < 1)
+ fun_l7_n194(x)
+ else
+ fun_l7_n962(x)
+ end
+end
+
+def fun_l6_n988(x)
+ if (x < 1)
+ fun_l7_n60(x)
+ else
+ fun_l7_n699(x)
+ end
+end
+
+def fun_l6_n989(x)
+ if (x < 1)
+ fun_l7_n692(x)
+ else
+ fun_l7_n28(x)
+ end
+end
+
+def fun_l6_n990(x)
+ if (x < 1)
+ fun_l7_n456(x)
+ else
+ fun_l7_n126(x)
+ end
+end
+
+def fun_l6_n991(x)
+ if (x < 1)
+ fun_l7_n104(x)
+ else
+ fun_l7_n156(x)
+ end
+end
+
+def fun_l6_n992(x)
+ if (x < 1)
+ fun_l7_n269(x)
+ else
+ fun_l7_n513(x)
+ end
+end
+
+def fun_l6_n993(x)
+ if (x < 1)
+ fun_l7_n20(x)
+ else
+ fun_l7_n754(x)
+ end
+end
+
+def fun_l6_n994(x)
+ if (x < 1)
+ fun_l7_n445(x)
+ else
+ fun_l7_n422(x)
+ end
+end
+
+def fun_l6_n995(x)
+ if (x < 1)
+ fun_l7_n320(x)
+ else
+ fun_l7_n398(x)
+ end
+end
+
+def fun_l6_n996(x)
+ if (x < 1)
+ fun_l7_n479(x)
+ else
+ fun_l7_n238(x)
+ end
+end
+
+def fun_l6_n997(x)
+ if (x < 1)
+ fun_l7_n254(x)
+ else
+ fun_l7_n692(x)
+ end
+end
+
+def fun_l6_n998(x)
+ if (x < 1)
+ fun_l7_n774(x)
+ else
+ fun_l7_n510(x)
+ end
+end
+
+def fun_l6_n999(x)
+ if (x < 1)
+ fun_l7_n158(x)
+ else
+ fun_l7_n929(x)
+ end
+end
+
+def fun_l7_n0(x)
+ if (x < 1)
+ fun_l8_n414(x)
+ else
+ fun_l8_n327(x)
+ end
+end
+
+def fun_l7_n1(x)
+ if (x < 1)
+ fun_l8_n446(x)
+ else
+ fun_l8_n611(x)
+ end
+end
+
+def fun_l7_n2(x)
+ if (x < 1)
+ fun_l8_n116(x)
+ else
+ fun_l8_n224(x)
+ end
+end
+
+def fun_l7_n3(x)
+ if (x < 1)
+ fun_l8_n809(x)
+ else
+ fun_l8_n962(x)
+ end
+end
+
+def fun_l7_n4(x)
+ if (x < 1)
+ fun_l8_n137(x)
+ else
+ fun_l8_n426(x)
+ end
+end
+
+def fun_l7_n5(x)
+ if (x < 1)
+ fun_l8_n686(x)
+ else
+ fun_l8_n600(x)
+ end
+end
+
+def fun_l7_n6(x)
+ if (x < 1)
+ fun_l8_n430(x)
+ else
+ fun_l8_n302(x)
+ end
+end
+
+def fun_l7_n7(x)
+ if (x < 1)
+ fun_l8_n865(x)
+ else
+ fun_l8_n60(x)
+ end
+end
+
+def fun_l7_n8(x)
+ if (x < 1)
+ fun_l8_n895(x)
+ else
+ fun_l8_n148(x)
+ end
+end
+
+def fun_l7_n9(x)
+ if (x < 1)
+ fun_l8_n740(x)
+ else
+ fun_l8_n982(x)
+ end
+end
+
+def fun_l7_n10(x)
+ if (x < 1)
+ fun_l8_n757(x)
+ else
+ fun_l8_n640(x)
+ end
+end
+
+def fun_l7_n11(x)
+ if (x < 1)
+ fun_l8_n744(x)
+ else
+ fun_l8_n256(x)
+ end
+end
+
+def fun_l7_n12(x)
+ if (x < 1)
+ fun_l8_n272(x)
+ else
+ fun_l8_n828(x)
+ end
+end
+
+def fun_l7_n13(x)
+ if (x < 1)
+ fun_l8_n395(x)
+ else
+ fun_l8_n932(x)
+ end
+end
+
+def fun_l7_n14(x)
+ if (x < 1)
+ fun_l8_n178(x)
+ else
+ fun_l8_n676(x)
+ end
+end
+
+def fun_l7_n15(x)
+ if (x < 1)
+ fun_l8_n40(x)
+ else
+ fun_l8_n548(x)
+ end
+end
+
+def fun_l7_n16(x)
+ if (x < 1)
+ fun_l8_n506(x)
+ else
+ fun_l8_n234(x)
+ end
+end
+
+def fun_l7_n17(x)
+ if (x < 1)
+ fun_l8_n239(x)
+ else
+ fun_l8_n56(x)
+ end
+end
+
+def fun_l7_n18(x)
+ if (x < 1)
+ fun_l8_n381(x)
+ else
+ fun_l8_n720(x)
+ end
+end
+
+def fun_l7_n19(x)
+ if (x < 1)
+ fun_l8_n781(x)
+ else
+ fun_l8_n605(x)
+ end
+end
+
+def fun_l7_n20(x)
+ if (x < 1)
+ fun_l8_n479(x)
+ else
+ fun_l8_n894(x)
+ end
+end
+
+def fun_l7_n21(x)
+ if (x < 1)
+ fun_l8_n437(x)
+ else
+ fun_l8_n123(x)
+ end
+end
+
+def fun_l7_n22(x)
+ if (x < 1)
+ fun_l8_n20(x)
+ else
+ fun_l8_n144(x)
+ end
+end
+
+def fun_l7_n23(x)
+ if (x < 1)
+ fun_l8_n684(x)
+ else
+ fun_l8_n866(x)
+ end
+end
+
+def fun_l7_n24(x)
+ if (x < 1)
+ fun_l8_n527(x)
+ else
+ fun_l8_n629(x)
+ end
+end
+
+def fun_l7_n25(x)
+ if (x < 1)
+ fun_l8_n399(x)
+ else
+ fun_l8_n52(x)
+ end
+end
+
+def fun_l7_n26(x)
+ if (x < 1)
+ fun_l8_n353(x)
+ else
+ fun_l8_n438(x)
+ end
+end
+
+def fun_l7_n27(x)
+ if (x < 1)
+ fun_l8_n916(x)
+ else
+ fun_l8_n488(x)
+ end
+end
+
+def fun_l7_n28(x)
+ if (x < 1)
+ fun_l8_n833(x)
+ else
+ fun_l8_n585(x)
+ end
+end
+
+def fun_l7_n29(x)
+ if (x < 1)
+ fun_l8_n38(x)
+ else
+ fun_l8_n785(x)
+ end
+end
+
+def fun_l7_n30(x)
+ if (x < 1)
+ fun_l8_n157(x)
+ else
+ fun_l8_n332(x)
+ end
+end
+
+def fun_l7_n31(x)
+ if (x < 1)
+ fun_l8_n467(x)
+ else
+ fun_l8_n442(x)
+ end
+end
+
+def fun_l7_n32(x)
+ if (x < 1)
+ fun_l8_n704(x)
+ else
+ fun_l8_n295(x)
+ end
+end
+
+def fun_l7_n33(x)
+ if (x < 1)
+ fun_l8_n829(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n34(x)
+ if (x < 1)
+ fun_l8_n227(x)
+ else
+ fun_l8_n865(x)
+ end
+end
+
+def fun_l7_n35(x)
+ if (x < 1)
+ fun_l8_n930(x)
+ else
+ fun_l8_n129(x)
+ end
+end
+
+def fun_l7_n36(x)
+ if (x < 1)
+ fun_l8_n519(x)
+ else
+ fun_l8_n587(x)
+ end
+end
+
+def fun_l7_n37(x)
+ if (x < 1)
+ fun_l8_n132(x)
+ else
+ fun_l8_n547(x)
+ end
+end
+
+def fun_l7_n38(x)
+ if (x < 1)
+ fun_l8_n627(x)
+ else
+ fun_l8_n712(x)
+ end
+end
+
+def fun_l7_n39(x)
+ if (x < 1)
+ fun_l8_n752(x)
+ else
+ fun_l8_n357(x)
+ end
+end
+
+def fun_l7_n40(x)
+ if (x < 1)
+ fun_l8_n542(x)
+ else
+ fun_l8_n86(x)
+ end
+end
+
+def fun_l7_n41(x)
+ if (x < 1)
+ fun_l8_n89(x)
+ else
+ fun_l8_n492(x)
+ end
+end
+
+def fun_l7_n42(x)
+ if (x < 1)
+ fun_l8_n508(x)
+ else
+ fun_l8_n288(x)
+ end
+end
+
+def fun_l7_n43(x)
+ if (x < 1)
+ fun_l8_n627(x)
+ else
+ fun_l8_n632(x)
+ end
+end
+
+def fun_l7_n44(x)
+ if (x < 1)
+ fun_l8_n513(x)
+ else
+ fun_l8_n472(x)
+ end
+end
+
+def fun_l7_n45(x)
+ if (x < 1)
+ fun_l8_n599(x)
+ else
+ fun_l8_n581(x)
+ end
+end
+
+def fun_l7_n46(x)
+ if (x < 1)
+ fun_l8_n907(x)
+ else
+ fun_l8_n71(x)
+ end
+end
+
+def fun_l7_n47(x)
+ if (x < 1)
+ fun_l8_n609(x)
+ else
+ fun_l8_n601(x)
+ end
+end
+
+def fun_l7_n48(x)
+ if (x < 1)
+ fun_l8_n985(x)
+ else
+ fun_l8_n536(x)
+ end
+end
+
+def fun_l7_n49(x)
+ if (x < 1)
+ fun_l8_n220(x)
+ else
+ fun_l8_n6(x)
+ end
+end
+
+def fun_l7_n50(x)
+ if (x < 1)
+ fun_l8_n445(x)
+ else
+ fun_l8_n939(x)
+ end
+end
+
+def fun_l7_n51(x)
+ if (x < 1)
+ fun_l8_n973(x)
+ else
+ fun_l8_n600(x)
+ end
+end
+
+def fun_l7_n52(x)
+ if (x < 1)
+ fun_l8_n377(x)
+ else
+ fun_l8_n70(x)
+ end
+end
+
+def fun_l7_n53(x)
+ if (x < 1)
+ fun_l8_n745(x)
+ else
+ fun_l8_n237(x)
+ end
+end
+
+def fun_l7_n54(x)
+ if (x < 1)
+ fun_l8_n782(x)
+ else
+ fun_l8_n756(x)
+ end
+end
+
+def fun_l7_n55(x)
+ if (x < 1)
+ fun_l8_n438(x)
+ else
+ fun_l8_n892(x)
+ end
+end
+
+def fun_l7_n56(x)
+ if (x < 1)
+ fun_l8_n564(x)
+ else
+ fun_l8_n600(x)
+ end
+end
+
+def fun_l7_n57(x)
+ if (x < 1)
+ fun_l8_n480(x)
+ else
+ fun_l8_n832(x)
+ end
+end
+
+def fun_l7_n58(x)
+ if (x < 1)
+ fun_l8_n239(x)
+ else
+ fun_l8_n540(x)
+ end
+end
+
+def fun_l7_n59(x)
+ if (x < 1)
+ fun_l8_n904(x)
+ else
+ fun_l8_n334(x)
+ end
+end
+
+def fun_l7_n60(x)
+ if (x < 1)
+ fun_l8_n407(x)
+ else
+ fun_l8_n573(x)
+ end
+end
+
+def fun_l7_n61(x)
+ if (x < 1)
+ fun_l8_n705(x)
+ else
+ fun_l8_n202(x)
+ end
+end
+
+def fun_l7_n62(x)
+ if (x < 1)
+ fun_l8_n715(x)
+ else
+ fun_l8_n394(x)
+ end
+end
+
+def fun_l7_n63(x)
+ if (x < 1)
+ fun_l8_n935(x)
+ else
+ fun_l8_n855(x)
+ end
+end
+
+def fun_l7_n64(x)
+ if (x < 1)
+ fun_l8_n525(x)
+ else
+ fun_l8_n81(x)
+ end
+end
+
+def fun_l7_n65(x)
+ if (x < 1)
+ fun_l8_n692(x)
+ else
+ fun_l8_n372(x)
+ end
+end
+
+def fun_l7_n66(x)
+ if (x < 1)
+ fun_l8_n286(x)
+ else
+ fun_l8_n568(x)
+ end
+end
+
+def fun_l7_n67(x)
+ if (x < 1)
+ fun_l8_n829(x)
+ else
+ fun_l8_n89(x)
+ end
+end
+
+def fun_l7_n68(x)
+ if (x < 1)
+ fun_l8_n542(x)
+ else
+ fun_l8_n362(x)
+ end
+end
+
+def fun_l7_n69(x)
+ if (x < 1)
+ fun_l8_n673(x)
+ else
+ fun_l8_n302(x)
+ end
+end
+
+def fun_l7_n70(x)
+ if (x < 1)
+ fun_l8_n649(x)
+ else
+ fun_l8_n890(x)
+ end
+end
+
+def fun_l7_n71(x)
+ if (x < 1)
+ fun_l8_n639(x)
+ else
+ fun_l8_n304(x)
+ end
+end
+
+def fun_l7_n72(x)
+ if (x < 1)
+ fun_l8_n797(x)
+ else
+ fun_l8_n132(x)
+ end
+end
+
+def fun_l7_n73(x)
+ if (x < 1)
+ fun_l8_n301(x)
+ else
+ fun_l8_n328(x)
+ end
+end
+
+def fun_l7_n74(x)
+ if (x < 1)
+ fun_l8_n438(x)
+ else
+ fun_l8_n979(x)
+ end
+end
+
+def fun_l7_n75(x)
+ if (x < 1)
+ fun_l8_n679(x)
+ else
+ fun_l8_n621(x)
+ end
+end
+
+def fun_l7_n76(x)
+ if (x < 1)
+ fun_l8_n136(x)
+ else
+ fun_l8_n916(x)
+ end
+end
+
+def fun_l7_n77(x)
+ if (x < 1)
+ fun_l8_n39(x)
+ else
+ fun_l8_n945(x)
+ end
+end
+
+def fun_l7_n78(x)
+ if (x < 1)
+ fun_l8_n365(x)
+ else
+ fun_l8_n883(x)
+ end
+end
+
+def fun_l7_n79(x)
+ if (x < 1)
+ fun_l8_n514(x)
+ else
+ fun_l8_n989(x)
+ end
+end
+
+def fun_l7_n80(x)
+ if (x < 1)
+ fun_l8_n378(x)
+ else
+ fun_l8_n634(x)
+ end
+end
+
+def fun_l7_n81(x)
+ if (x < 1)
+ fun_l8_n200(x)
+ else
+ fun_l8_n73(x)
+ end
+end
+
+def fun_l7_n82(x)
+ if (x < 1)
+ fun_l8_n521(x)
+ else
+ fun_l8_n848(x)
+ end
+end
+
+def fun_l7_n83(x)
+ if (x < 1)
+ fun_l8_n184(x)
+ else
+ fun_l8_n350(x)
+ end
+end
+
+def fun_l7_n84(x)
+ if (x < 1)
+ fun_l8_n215(x)
+ else
+ fun_l8_n615(x)
+ end
+end
+
+def fun_l7_n85(x)
+ if (x < 1)
+ fun_l8_n556(x)
+ else
+ fun_l8_n723(x)
+ end
+end
+
+def fun_l7_n86(x)
+ if (x < 1)
+ fun_l8_n565(x)
+ else
+ fun_l8_n661(x)
+ end
+end
+
+def fun_l7_n87(x)
+ if (x < 1)
+ fun_l8_n22(x)
+ else
+ fun_l8_n623(x)
+ end
+end
+
+def fun_l7_n88(x)
+ if (x < 1)
+ fun_l8_n995(x)
+ else
+ fun_l8_n30(x)
+ end
+end
+
+def fun_l7_n89(x)
+ if (x < 1)
+ fun_l8_n912(x)
+ else
+ fun_l8_n332(x)
+ end
+end
+
+def fun_l7_n90(x)
+ if (x < 1)
+ fun_l8_n776(x)
+ else
+ fun_l8_n362(x)
+ end
+end
+
+def fun_l7_n91(x)
+ if (x < 1)
+ fun_l8_n720(x)
+ else
+ fun_l8_n512(x)
+ end
+end
+
+def fun_l7_n92(x)
+ if (x < 1)
+ fun_l8_n437(x)
+ else
+ fun_l8_n107(x)
+ end
+end
+
+def fun_l7_n93(x)
+ if (x < 1)
+ fun_l8_n143(x)
+ else
+ fun_l8_n493(x)
+ end
+end
+
+def fun_l7_n94(x)
+ if (x < 1)
+ fun_l8_n814(x)
+ else
+ fun_l8_n892(x)
+ end
+end
+
+def fun_l7_n95(x)
+ if (x < 1)
+ fun_l8_n117(x)
+ else
+ fun_l8_n18(x)
+ end
+end
+
+def fun_l7_n96(x)
+ if (x < 1)
+ fun_l8_n769(x)
+ else
+ fun_l8_n37(x)
+ end
+end
+
+def fun_l7_n97(x)
+ if (x < 1)
+ fun_l8_n213(x)
+ else
+ fun_l8_n5(x)
+ end
+end
+
+def fun_l7_n98(x)
+ if (x < 1)
+ fun_l8_n608(x)
+ else
+ fun_l8_n551(x)
+ end
+end
+
+def fun_l7_n99(x)
+ if (x < 1)
+ fun_l8_n130(x)
+ else
+ fun_l8_n879(x)
+ end
+end
+
+def fun_l7_n100(x)
+ if (x < 1)
+ fun_l8_n279(x)
+ else
+ fun_l8_n786(x)
+ end
+end
+
+def fun_l7_n101(x)
+ if (x < 1)
+ fun_l8_n254(x)
+ else
+ fun_l8_n904(x)
+ end
+end
+
+def fun_l7_n102(x)
+ if (x < 1)
+ fun_l8_n661(x)
+ else
+ fun_l8_n873(x)
+ end
+end
+
+def fun_l7_n103(x)
+ if (x < 1)
+ fun_l8_n360(x)
+ else
+ fun_l8_n793(x)
+ end
+end
+
+def fun_l7_n104(x)
+ if (x < 1)
+ fun_l8_n687(x)
+ else
+ fun_l8_n853(x)
+ end
+end
+
+def fun_l7_n105(x)
+ if (x < 1)
+ fun_l8_n168(x)
+ else
+ fun_l8_n280(x)
+ end
+end
+
+def fun_l7_n106(x)
+ if (x < 1)
+ fun_l8_n742(x)
+ else
+ fun_l8_n222(x)
+ end
+end
+
+def fun_l7_n107(x)
+ if (x < 1)
+ fun_l8_n470(x)
+ else
+ fun_l8_n633(x)
+ end
+end
+
+def fun_l7_n108(x)
+ if (x < 1)
+ fun_l8_n495(x)
+ else
+ fun_l8_n253(x)
+ end
+end
+
+def fun_l7_n109(x)
+ if (x < 1)
+ fun_l8_n369(x)
+ else
+ fun_l8_n108(x)
+ end
+end
+
+def fun_l7_n110(x)
+ if (x < 1)
+ fun_l8_n254(x)
+ else
+ fun_l8_n162(x)
+ end
+end
+
+def fun_l7_n111(x)
+ if (x < 1)
+ fun_l8_n835(x)
+ else
+ fun_l8_n295(x)
+ end
+end
+
+def fun_l7_n112(x)
+ if (x < 1)
+ fun_l8_n349(x)
+ else
+ fun_l8_n432(x)
+ end
+end
+
+def fun_l7_n113(x)
+ if (x < 1)
+ fun_l8_n237(x)
+ else
+ fun_l8_n484(x)
+ end
+end
+
+def fun_l7_n114(x)
+ if (x < 1)
+ fun_l8_n755(x)
+ else
+ fun_l8_n819(x)
+ end
+end
+
+def fun_l7_n115(x)
+ if (x < 1)
+ fun_l8_n542(x)
+ else
+ fun_l8_n587(x)
+ end
+end
+
+def fun_l7_n116(x)
+ if (x < 1)
+ fun_l8_n837(x)
+ else
+ fun_l8_n274(x)
+ end
+end
+
+def fun_l7_n117(x)
+ if (x < 1)
+ fun_l8_n742(x)
+ else
+ fun_l8_n104(x)
+ end
+end
+
+def fun_l7_n118(x)
+ if (x < 1)
+ fun_l8_n201(x)
+ else
+ fun_l8_n340(x)
+ end
+end
+
+def fun_l7_n119(x)
+ if (x < 1)
+ fun_l8_n349(x)
+ else
+ fun_l8_n213(x)
+ end
+end
+
+def fun_l7_n120(x)
+ if (x < 1)
+ fun_l8_n563(x)
+ else
+ fun_l8_n193(x)
+ end
+end
+
+def fun_l7_n121(x)
+ if (x < 1)
+ fun_l8_n738(x)
+ else
+ fun_l8_n600(x)
+ end
+end
+
+def fun_l7_n122(x)
+ if (x < 1)
+ fun_l8_n261(x)
+ else
+ fun_l8_n500(x)
+ end
+end
+
+def fun_l7_n123(x)
+ if (x < 1)
+ fun_l8_n870(x)
+ else
+ fun_l8_n423(x)
+ end
+end
+
+def fun_l7_n124(x)
+ if (x < 1)
+ fun_l8_n405(x)
+ else
+ fun_l8_n749(x)
+ end
+end
+
+def fun_l7_n125(x)
+ if (x < 1)
+ fun_l8_n848(x)
+ else
+ fun_l8_n106(x)
+ end
+end
+
+def fun_l7_n126(x)
+ if (x < 1)
+ fun_l8_n382(x)
+ else
+ fun_l8_n379(x)
+ end
+end
+
+def fun_l7_n127(x)
+ if (x < 1)
+ fun_l8_n232(x)
+ else
+ fun_l8_n913(x)
+ end
+end
+
+def fun_l7_n128(x)
+ if (x < 1)
+ fun_l8_n7(x)
+ else
+ fun_l8_n177(x)
+ end
+end
+
+def fun_l7_n129(x)
+ if (x < 1)
+ fun_l8_n86(x)
+ else
+ fun_l8_n670(x)
+ end
+end
+
+def fun_l7_n130(x)
+ if (x < 1)
+ fun_l8_n361(x)
+ else
+ fun_l8_n132(x)
+ end
+end
+
+def fun_l7_n131(x)
+ if (x < 1)
+ fun_l8_n125(x)
+ else
+ fun_l8_n925(x)
+ end
+end
+
+def fun_l7_n132(x)
+ if (x < 1)
+ fun_l8_n529(x)
+ else
+ fun_l8_n996(x)
+ end
+end
+
+def fun_l7_n133(x)
+ if (x < 1)
+ fun_l8_n283(x)
+ else
+ fun_l8_n112(x)
+ end
+end
+
+def fun_l7_n134(x)
+ if (x < 1)
+ fun_l8_n974(x)
+ else
+ fun_l8_n204(x)
+ end
+end
+
+def fun_l7_n135(x)
+ if (x < 1)
+ fun_l8_n903(x)
+ else
+ fun_l8_n196(x)
+ end
+end
+
+def fun_l7_n136(x)
+ if (x < 1)
+ fun_l8_n59(x)
+ else
+ fun_l8_n505(x)
+ end
+end
+
+def fun_l7_n137(x)
+ if (x < 1)
+ fun_l8_n530(x)
+ else
+ fun_l8_n31(x)
+ end
+end
+
+def fun_l7_n138(x)
+ if (x < 1)
+ fun_l8_n990(x)
+ else
+ fun_l8_n924(x)
+ end
+end
+
+def fun_l7_n139(x)
+ if (x < 1)
+ fun_l8_n202(x)
+ else
+ fun_l8_n980(x)
+ end
+end
+
+def fun_l7_n140(x)
+ if (x < 1)
+ fun_l8_n354(x)
+ else
+ fun_l8_n694(x)
+ end
+end
+
+def fun_l7_n141(x)
+ if (x < 1)
+ fun_l8_n306(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n142(x)
+ if (x < 1)
+ fun_l8_n433(x)
+ else
+ fun_l8_n902(x)
+ end
+end
+
+def fun_l7_n143(x)
+ if (x < 1)
+ fun_l8_n522(x)
+ else
+ fun_l8_n904(x)
+ end
+end
+
+def fun_l7_n144(x)
+ if (x < 1)
+ fun_l8_n86(x)
+ else
+ fun_l8_n11(x)
+ end
+end
+
+def fun_l7_n145(x)
+ if (x < 1)
+ fun_l8_n147(x)
+ else
+ fun_l8_n21(x)
+ end
+end
+
+def fun_l7_n146(x)
+ if (x < 1)
+ fun_l8_n47(x)
+ else
+ fun_l8_n855(x)
+ end
+end
+
+def fun_l7_n147(x)
+ if (x < 1)
+ fun_l8_n306(x)
+ else
+ fun_l8_n309(x)
+ end
+end
+
+def fun_l7_n148(x)
+ if (x < 1)
+ fun_l8_n757(x)
+ else
+ fun_l8_n83(x)
+ end
+end
+
+def fun_l7_n149(x)
+ if (x < 1)
+ fun_l8_n377(x)
+ else
+ fun_l8_n124(x)
+ end
+end
+
+def fun_l7_n150(x)
+ if (x < 1)
+ fun_l8_n276(x)
+ else
+ fun_l8_n838(x)
+ end
+end
+
+def fun_l7_n151(x)
+ if (x < 1)
+ fun_l8_n148(x)
+ else
+ fun_l8_n653(x)
+ end
+end
+
+def fun_l7_n152(x)
+ if (x < 1)
+ fun_l8_n315(x)
+ else
+ fun_l8_n942(x)
+ end
+end
+
+def fun_l7_n153(x)
+ if (x < 1)
+ fun_l8_n794(x)
+ else
+ fun_l8_n680(x)
+ end
+end
+
+def fun_l7_n154(x)
+ if (x < 1)
+ fun_l8_n508(x)
+ else
+ fun_l8_n427(x)
+ end
+end
+
+def fun_l7_n155(x)
+ if (x < 1)
+ fun_l8_n249(x)
+ else
+ fun_l8_n615(x)
+ end
+end
+
+def fun_l7_n156(x)
+ if (x < 1)
+ fun_l8_n339(x)
+ else
+ fun_l8_n559(x)
+ end
+end
+
+def fun_l7_n157(x)
+ if (x < 1)
+ fun_l8_n772(x)
+ else
+ fun_l8_n128(x)
+ end
+end
+
+def fun_l7_n158(x)
+ if (x < 1)
+ fun_l8_n247(x)
+ else
+ fun_l8_n962(x)
+ end
+end
+
+def fun_l7_n159(x)
+ if (x < 1)
+ fun_l8_n648(x)
+ else
+ fun_l8_n338(x)
+ end
+end
+
+def fun_l7_n160(x)
+ if (x < 1)
+ fun_l8_n104(x)
+ else
+ fun_l8_n757(x)
+ end
+end
+
+def fun_l7_n161(x)
+ if (x < 1)
+ fun_l8_n74(x)
+ else
+ fun_l8_n288(x)
+ end
+end
+
+def fun_l7_n162(x)
+ if (x < 1)
+ fun_l8_n849(x)
+ else
+ fun_l8_n982(x)
+ end
+end
+
+def fun_l7_n163(x)
+ if (x < 1)
+ fun_l8_n433(x)
+ else
+ fun_l8_n442(x)
+ end
+end
+
+def fun_l7_n164(x)
+ if (x < 1)
+ fun_l8_n268(x)
+ else
+ fun_l8_n717(x)
+ end
+end
+
+def fun_l7_n165(x)
+ if (x < 1)
+ fun_l8_n185(x)
+ else
+ fun_l8_n628(x)
+ end
+end
+
+def fun_l7_n166(x)
+ if (x < 1)
+ fun_l8_n207(x)
+ else
+ fun_l8_n830(x)
+ end
+end
+
+def fun_l7_n167(x)
+ if (x < 1)
+ fun_l8_n334(x)
+ else
+ fun_l8_n20(x)
+ end
+end
+
+def fun_l7_n168(x)
+ if (x < 1)
+ fun_l8_n835(x)
+ else
+ fun_l8_n493(x)
+ end
+end
+
+def fun_l7_n169(x)
+ if (x < 1)
+ fun_l8_n559(x)
+ else
+ fun_l8_n561(x)
+ end
+end
+
+def fun_l7_n170(x)
+ if (x < 1)
+ fun_l8_n942(x)
+ else
+ fun_l8_n699(x)
+ end
+end
+
+def fun_l7_n171(x)
+ if (x < 1)
+ fun_l8_n833(x)
+ else
+ fun_l8_n928(x)
+ end
+end
+
+def fun_l7_n172(x)
+ if (x < 1)
+ fun_l8_n564(x)
+ else
+ fun_l8_n972(x)
+ end
+end
+
+def fun_l7_n173(x)
+ if (x < 1)
+ fun_l8_n509(x)
+ else
+ fun_l8_n125(x)
+ end
+end
+
+def fun_l7_n174(x)
+ if (x < 1)
+ fun_l8_n643(x)
+ else
+ fun_l8_n813(x)
+ end
+end
+
+def fun_l7_n175(x)
+ if (x < 1)
+ fun_l8_n763(x)
+ else
+ fun_l8_n22(x)
+ end
+end
+
+def fun_l7_n176(x)
+ if (x < 1)
+ fun_l8_n955(x)
+ else
+ fun_l8_n579(x)
+ end
+end
+
+def fun_l7_n177(x)
+ if (x < 1)
+ fun_l8_n577(x)
+ else
+ fun_l8_n675(x)
+ end
+end
+
+def fun_l7_n178(x)
+ if (x < 1)
+ fun_l8_n867(x)
+ else
+ fun_l8_n119(x)
+ end
+end
+
+def fun_l7_n179(x)
+ if (x < 1)
+ fun_l8_n357(x)
+ else
+ fun_l8_n543(x)
+ end
+end
+
+def fun_l7_n180(x)
+ if (x < 1)
+ fun_l8_n67(x)
+ else
+ fun_l8_n643(x)
+ end
+end
+
+def fun_l7_n181(x)
+ if (x < 1)
+ fun_l8_n377(x)
+ else
+ fun_l8_n931(x)
+ end
+end
+
+def fun_l7_n182(x)
+ if (x < 1)
+ fun_l8_n962(x)
+ else
+ fun_l8_n220(x)
+ end
+end
+
+def fun_l7_n183(x)
+ if (x < 1)
+ fun_l8_n568(x)
+ else
+ fun_l8_n702(x)
+ end
+end
+
+def fun_l7_n184(x)
+ if (x < 1)
+ fun_l8_n877(x)
+ else
+ fun_l8_n376(x)
+ end
+end
+
+def fun_l7_n185(x)
+ if (x < 1)
+ fun_l8_n171(x)
+ else
+ fun_l8_n981(x)
+ end
+end
+
+def fun_l7_n186(x)
+ if (x < 1)
+ fun_l8_n283(x)
+ else
+ fun_l8_n81(x)
+ end
+end
+
+def fun_l7_n187(x)
+ if (x < 1)
+ fun_l8_n318(x)
+ else
+ fun_l8_n7(x)
+ end
+end
+
+def fun_l7_n188(x)
+ if (x < 1)
+ fun_l8_n874(x)
+ else
+ fun_l8_n879(x)
+ end
+end
+
+def fun_l7_n189(x)
+ if (x < 1)
+ fun_l8_n944(x)
+ else
+ fun_l8_n881(x)
+ end
+end
+
+def fun_l7_n190(x)
+ if (x < 1)
+ fun_l8_n462(x)
+ else
+ fun_l8_n570(x)
+ end
+end
+
+def fun_l7_n191(x)
+ if (x < 1)
+ fun_l8_n815(x)
+ else
+ fun_l8_n957(x)
+ end
+end
+
+def fun_l7_n192(x)
+ if (x < 1)
+ fun_l8_n217(x)
+ else
+ fun_l8_n93(x)
+ end
+end
+
+def fun_l7_n193(x)
+ if (x < 1)
+ fun_l8_n708(x)
+ else
+ fun_l8_n323(x)
+ end
+end
+
+def fun_l7_n194(x)
+ if (x < 1)
+ fun_l8_n420(x)
+ else
+ fun_l8_n375(x)
+ end
+end
+
+def fun_l7_n195(x)
+ if (x < 1)
+ fun_l8_n307(x)
+ else
+ fun_l8_n427(x)
+ end
+end
+
+def fun_l7_n196(x)
+ if (x < 1)
+ fun_l8_n200(x)
+ else
+ fun_l8_n265(x)
+ end
+end
+
+def fun_l7_n197(x)
+ if (x < 1)
+ fun_l8_n547(x)
+ else
+ fun_l8_n687(x)
+ end
+end
+
+def fun_l7_n198(x)
+ if (x < 1)
+ fun_l8_n693(x)
+ else
+ fun_l8_n420(x)
+ end
+end
+
+def fun_l7_n199(x)
+ if (x < 1)
+ fun_l8_n297(x)
+ else
+ fun_l8_n702(x)
+ end
+end
+
+def fun_l7_n200(x)
+ if (x < 1)
+ fun_l8_n418(x)
+ else
+ fun_l8_n758(x)
+ end
+end
+
+def fun_l7_n201(x)
+ if (x < 1)
+ fun_l8_n204(x)
+ else
+ fun_l8_n572(x)
+ end
+end
+
+def fun_l7_n202(x)
+ if (x < 1)
+ fun_l8_n847(x)
+ else
+ fun_l8_n440(x)
+ end
+end
+
+def fun_l7_n203(x)
+ if (x < 1)
+ fun_l8_n692(x)
+ else
+ fun_l8_n595(x)
+ end
+end
+
+def fun_l7_n204(x)
+ if (x < 1)
+ fun_l8_n922(x)
+ else
+ fun_l8_n618(x)
+ end
+end
+
+def fun_l7_n205(x)
+ if (x < 1)
+ fun_l8_n431(x)
+ else
+ fun_l8_n135(x)
+ end
+end
+
+def fun_l7_n206(x)
+ if (x < 1)
+ fun_l8_n92(x)
+ else
+ fun_l8_n370(x)
+ end
+end
+
+def fun_l7_n207(x)
+ if (x < 1)
+ fun_l8_n141(x)
+ else
+ fun_l8_n845(x)
+ end
+end
+
+def fun_l7_n208(x)
+ if (x < 1)
+ fun_l8_n552(x)
+ else
+ fun_l8_n917(x)
+ end
+end
+
+def fun_l7_n209(x)
+ if (x < 1)
+ fun_l8_n341(x)
+ else
+ fun_l8_n794(x)
+ end
+end
+
+def fun_l7_n210(x)
+ if (x < 1)
+ fun_l8_n772(x)
+ else
+ fun_l8_n515(x)
+ end
+end
+
+def fun_l7_n211(x)
+ if (x < 1)
+ fun_l8_n37(x)
+ else
+ fun_l8_n635(x)
+ end
+end
+
+def fun_l7_n212(x)
+ if (x < 1)
+ fun_l8_n164(x)
+ else
+ fun_l8_n506(x)
+ end
+end
+
+def fun_l7_n213(x)
+ if (x < 1)
+ fun_l8_n621(x)
+ else
+ fun_l8_n722(x)
+ end
+end
+
+def fun_l7_n214(x)
+ if (x < 1)
+ fun_l8_n475(x)
+ else
+ fun_l8_n854(x)
+ end
+end
+
+def fun_l7_n215(x)
+ if (x < 1)
+ fun_l8_n275(x)
+ else
+ fun_l8_n884(x)
+ end
+end
+
+def fun_l7_n216(x)
+ if (x < 1)
+ fun_l8_n894(x)
+ else
+ fun_l8_n424(x)
+ end
+end
+
+def fun_l7_n217(x)
+ if (x < 1)
+ fun_l8_n32(x)
+ else
+ fun_l8_n698(x)
+ end
+end
+
+def fun_l7_n218(x)
+ if (x < 1)
+ fun_l8_n707(x)
+ else
+ fun_l8_n728(x)
+ end
+end
+
+def fun_l7_n219(x)
+ if (x < 1)
+ fun_l8_n294(x)
+ else
+ fun_l8_n583(x)
+ end
+end
+
+def fun_l7_n220(x)
+ if (x < 1)
+ fun_l8_n577(x)
+ else
+ fun_l8_n881(x)
+ end
+end
+
+def fun_l7_n221(x)
+ if (x < 1)
+ fun_l8_n925(x)
+ else
+ fun_l8_n177(x)
+ end
+end
+
+def fun_l7_n222(x)
+ if (x < 1)
+ fun_l8_n495(x)
+ else
+ fun_l8_n407(x)
+ end
+end
+
+def fun_l7_n223(x)
+ if (x < 1)
+ fun_l8_n11(x)
+ else
+ fun_l8_n753(x)
+ end
+end
+
+def fun_l7_n224(x)
+ if (x < 1)
+ fun_l8_n366(x)
+ else
+ fun_l8_n546(x)
+ end
+end
+
+def fun_l7_n225(x)
+ if (x < 1)
+ fun_l8_n644(x)
+ else
+ fun_l8_n728(x)
+ end
+end
+
+def fun_l7_n226(x)
+ if (x < 1)
+ fun_l8_n731(x)
+ else
+ fun_l8_n292(x)
+ end
+end
+
+def fun_l7_n227(x)
+ if (x < 1)
+ fun_l8_n653(x)
+ else
+ fun_l8_n521(x)
+ end
+end
+
+def fun_l7_n228(x)
+ if (x < 1)
+ fun_l8_n479(x)
+ else
+ fun_l8_n329(x)
+ end
+end
+
+def fun_l7_n229(x)
+ if (x < 1)
+ fun_l8_n151(x)
+ else
+ fun_l8_n620(x)
+ end
+end
+
+def fun_l7_n230(x)
+ if (x < 1)
+ fun_l8_n58(x)
+ else
+ fun_l8_n369(x)
+ end
+end
+
+def fun_l7_n231(x)
+ if (x < 1)
+ fun_l8_n301(x)
+ else
+ fun_l8_n869(x)
+ end
+end
+
+def fun_l7_n232(x)
+ if (x < 1)
+ fun_l8_n810(x)
+ else
+ fun_l8_n376(x)
+ end
+end
+
+def fun_l7_n233(x)
+ if (x < 1)
+ fun_l8_n19(x)
+ else
+ fun_l8_n278(x)
+ end
+end
+
+def fun_l7_n234(x)
+ if (x < 1)
+ fun_l8_n509(x)
+ else
+ fun_l8_n826(x)
+ end
+end
+
+def fun_l7_n235(x)
+ if (x < 1)
+ fun_l8_n302(x)
+ else
+ fun_l8_n62(x)
+ end
+end
+
+def fun_l7_n236(x)
+ if (x < 1)
+ fun_l8_n289(x)
+ else
+ fun_l8_n935(x)
+ end
+end
+
+def fun_l7_n237(x)
+ if (x < 1)
+ fun_l8_n217(x)
+ else
+ fun_l8_n652(x)
+ end
+end
+
+def fun_l7_n238(x)
+ if (x < 1)
+ fun_l8_n234(x)
+ else
+ fun_l8_n720(x)
+ end
+end
+
+def fun_l7_n239(x)
+ if (x < 1)
+ fun_l8_n158(x)
+ else
+ fun_l8_n409(x)
+ end
+end
+
+def fun_l7_n240(x)
+ if (x < 1)
+ fun_l8_n478(x)
+ else
+ fun_l8_n855(x)
+ end
+end
+
+def fun_l7_n241(x)
+ if (x < 1)
+ fun_l8_n115(x)
+ else
+ fun_l8_n406(x)
+ end
+end
+
+def fun_l7_n242(x)
+ if (x < 1)
+ fun_l8_n278(x)
+ else
+ fun_l8_n12(x)
+ end
+end
+
+def fun_l7_n243(x)
+ if (x < 1)
+ fun_l8_n273(x)
+ else
+ fun_l8_n243(x)
+ end
+end
+
+def fun_l7_n244(x)
+ if (x < 1)
+ fun_l8_n909(x)
+ else
+ fun_l8_n721(x)
+ end
+end
+
+def fun_l7_n245(x)
+ if (x < 1)
+ fun_l8_n415(x)
+ else
+ fun_l8_n530(x)
+ end
+end
+
+def fun_l7_n246(x)
+ if (x < 1)
+ fun_l8_n770(x)
+ else
+ fun_l8_n413(x)
+ end
+end
+
+def fun_l7_n247(x)
+ if (x < 1)
+ fun_l8_n228(x)
+ else
+ fun_l8_n668(x)
+ end
+end
+
+def fun_l7_n248(x)
+ if (x < 1)
+ fun_l8_n174(x)
+ else
+ fun_l8_n559(x)
+ end
+end
+
+def fun_l7_n249(x)
+ if (x < 1)
+ fun_l8_n740(x)
+ else
+ fun_l8_n314(x)
+ end
+end
+
+def fun_l7_n250(x)
+ if (x < 1)
+ fun_l8_n293(x)
+ else
+ fun_l8_n835(x)
+ end
+end
+
+def fun_l7_n251(x)
+ if (x < 1)
+ fun_l8_n584(x)
+ else
+ fun_l8_n755(x)
+ end
+end
+
+def fun_l7_n252(x)
+ if (x < 1)
+ fun_l8_n792(x)
+ else
+ fun_l8_n135(x)
+ end
+end
+
+def fun_l7_n253(x)
+ if (x < 1)
+ fun_l8_n116(x)
+ else
+ fun_l8_n82(x)
+ end
+end
+
+def fun_l7_n254(x)
+ if (x < 1)
+ fun_l8_n478(x)
+ else
+ fun_l8_n809(x)
+ end
+end
+
+def fun_l7_n255(x)
+ if (x < 1)
+ fun_l8_n924(x)
+ else
+ fun_l8_n708(x)
+ end
+end
+
+def fun_l7_n256(x)
+ if (x < 1)
+ fun_l8_n345(x)
+ else
+ fun_l8_n669(x)
+ end
+end
+
+def fun_l7_n257(x)
+ if (x < 1)
+ fun_l8_n300(x)
+ else
+ fun_l8_n166(x)
+ end
+end
+
+def fun_l7_n258(x)
+ if (x < 1)
+ fun_l8_n979(x)
+ else
+ fun_l8_n894(x)
+ end
+end
+
+def fun_l7_n259(x)
+ if (x < 1)
+ fun_l8_n765(x)
+ else
+ fun_l8_n838(x)
+ end
+end
+
+def fun_l7_n260(x)
+ if (x < 1)
+ fun_l8_n812(x)
+ else
+ fun_l8_n472(x)
+ end
+end
+
+def fun_l7_n261(x)
+ if (x < 1)
+ fun_l8_n220(x)
+ else
+ fun_l8_n106(x)
+ end
+end
+
+def fun_l7_n262(x)
+ if (x < 1)
+ fun_l8_n727(x)
+ else
+ fun_l8_n783(x)
+ end
+end
+
+def fun_l7_n263(x)
+ if (x < 1)
+ fun_l8_n560(x)
+ else
+ fun_l8_n781(x)
+ end
+end
+
+def fun_l7_n264(x)
+ if (x < 1)
+ fun_l8_n709(x)
+ else
+ fun_l8_n33(x)
+ end
+end
+
+def fun_l7_n265(x)
+ if (x < 1)
+ fun_l8_n904(x)
+ else
+ fun_l8_n64(x)
+ end
+end
+
+def fun_l7_n266(x)
+ if (x < 1)
+ fun_l8_n944(x)
+ else
+ fun_l8_n652(x)
+ end
+end
+
+def fun_l7_n267(x)
+ if (x < 1)
+ fun_l8_n154(x)
+ else
+ fun_l8_n103(x)
+ end
+end
+
+def fun_l7_n268(x)
+ if (x < 1)
+ fun_l8_n55(x)
+ else
+ fun_l8_n841(x)
+ end
+end
+
+def fun_l7_n269(x)
+ if (x < 1)
+ fun_l8_n914(x)
+ else
+ fun_l8_n108(x)
+ end
+end
+
+def fun_l7_n270(x)
+ if (x < 1)
+ fun_l8_n733(x)
+ else
+ fun_l8_n398(x)
+ end
+end
+
+def fun_l7_n271(x)
+ if (x < 1)
+ fun_l8_n145(x)
+ else
+ fun_l8_n735(x)
+ end
+end
+
+def fun_l7_n272(x)
+ if (x < 1)
+ fun_l8_n404(x)
+ else
+ fun_l8_n216(x)
+ end
+end
+
+def fun_l7_n273(x)
+ if (x < 1)
+ fun_l8_n380(x)
+ else
+ fun_l8_n798(x)
+ end
+end
+
+def fun_l7_n274(x)
+ if (x < 1)
+ fun_l8_n63(x)
+ else
+ fun_l8_n133(x)
+ end
+end
+
+def fun_l7_n275(x)
+ if (x < 1)
+ fun_l8_n878(x)
+ else
+ fun_l8_n284(x)
+ end
+end
+
+def fun_l7_n276(x)
+ if (x < 1)
+ fun_l8_n718(x)
+ else
+ fun_l8_n97(x)
+ end
+end
+
+def fun_l7_n277(x)
+ if (x < 1)
+ fun_l8_n509(x)
+ else
+ fun_l8_n695(x)
+ end
+end
+
+def fun_l7_n278(x)
+ if (x < 1)
+ fun_l8_n581(x)
+ else
+ fun_l8_n898(x)
+ end
+end
+
+def fun_l7_n279(x)
+ if (x < 1)
+ fun_l8_n247(x)
+ else
+ fun_l8_n526(x)
+ end
+end
+
+def fun_l7_n280(x)
+ if (x < 1)
+ fun_l8_n995(x)
+ else
+ fun_l8_n614(x)
+ end
+end
+
+def fun_l7_n281(x)
+ if (x < 1)
+ fun_l8_n301(x)
+ else
+ fun_l8_n178(x)
+ end
+end
+
+def fun_l7_n282(x)
+ if (x < 1)
+ fun_l8_n575(x)
+ else
+ fun_l8_n712(x)
+ end
+end
+
+def fun_l7_n283(x)
+ if (x < 1)
+ fun_l8_n261(x)
+ else
+ fun_l8_n740(x)
+ end
+end
+
+def fun_l7_n284(x)
+ if (x < 1)
+ fun_l8_n284(x)
+ else
+ fun_l8_n350(x)
+ end
+end
+
+def fun_l7_n285(x)
+ if (x < 1)
+ fun_l8_n521(x)
+ else
+ fun_l8_n305(x)
+ end
+end
+
+def fun_l7_n286(x)
+ if (x < 1)
+ fun_l8_n271(x)
+ else
+ fun_l8_n728(x)
+ end
+end
+
+def fun_l7_n287(x)
+ if (x < 1)
+ fun_l8_n292(x)
+ else
+ fun_l8_n799(x)
+ end
+end
+
+def fun_l7_n288(x)
+ if (x < 1)
+ fun_l8_n852(x)
+ else
+ fun_l8_n606(x)
+ end
+end
+
+def fun_l7_n289(x)
+ if (x < 1)
+ fun_l8_n177(x)
+ else
+ fun_l8_n649(x)
+ end
+end
+
+def fun_l7_n290(x)
+ if (x < 1)
+ fun_l8_n488(x)
+ else
+ fun_l8_n252(x)
+ end
+end
+
+def fun_l7_n291(x)
+ if (x < 1)
+ fun_l8_n815(x)
+ else
+ fun_l8_n690(x)
+ end
+end
+
+def fun_l7_n292(x)
+ if (x < 1)
+ fun_l8_n999(x)
+ else
+ fun_l8_n700(x)
+ end
+end
+
+def fun_l7_n293(x)
+ if (x < 1)
+ fun_l8_n9(x)
+ else
+ fun_l8_n194(x)
+ end
+end
+
+def fun_l7_n294(x)
+ if (x < 1)
+ fun_l8_n390(x)
+ else
+ fun_l8_n772(x)
+ end
+end
+
+def fun_l7_n295(x)
+ if (x < 1)
+ fun_l8_n487(x)
+ else
+ fun_l8_n587(x)
+ end
+end
+
+def fun_l7_n296(x)
+ if (x < 1)
+ fun_l8_n892(x)
+ else
+ fun_l8_n126(x)
+ end
+end
+
+def fun_l7_n297(x)
+ if (x < 1)
+ fun_l8_n199(x)
+ else
+ fun_l8_n312(x)
+ end
+end
+
+def fun_l7_n298(x)
+ if (x < 1)
+ fun_l8_n534(x)
+ else
+ fun_l8_n640(x)
+ end
+end
+
+def fun_l7_n299(x)
+ if (x < 1)
+ fun_l8_n344(x)
+ else
+ fun_l8_n58(x)
+ end
+end
+
+def fun_l7_n300(x)
+ if (x < 1)
+ fun_l8_n11(x)
+ else
+ fun_l8_n922(x)
+ end
+end
+
+def fun_l7_n301(x)
+ if (x < 1)
+ fun_l8_n848(x)
+ else
+ fun_l8_n432(x)
+ end
+end
+
+def fun_l7_n302(x)
+ if (x < 1)
+ fun_l8_n292(x)
+ else
+ fun_l8_n86(x)
+ end
+end
+
+def fun_l7_n303(x)
+ if (x < 1)
+ fun_l8_n239(x)
+ else
+ fun_l8_n296(x)
+ end
+end
+
+def fun_l7_n304(x)
+ if (x < 1)
+ fun_l8_n350(x)
+ else
+ fun_l8_n769(x)
+ end
+end
+
+def fun_l7_n305(x)
+ if (x < 1)
+ fun_l8_n959(x)
+ else
+ fun_l8_n292(x)
+ end
+end
+
+def fun_l7_n306(x)
+ if (x < 1)
+ fun_l8_n371(x)
+ else
+ fun_l8_n507(x)
+ end
+end
+
+def fun_l7_n307(x)
+ if (x < 1)
+ fun_l8_n910(x)
+ else
+ fun_l8_n542(x)
+ end
+end
+
+def fun_l7_n308(x)
+ if (x < 1)
+ fun_l8_n299(x)
+ else
+ fun_l8_n543(x)
+ end
+end
+
+def fun_l7_n309(x)
+ if (x < 1)
+ fun_l8_n145(x)
+ else
+ fun_l8_n393(x)
+ end
+end
+
+def fun_l7_n310(x)
+ if (x < 1)
+ fun_l8_n1(x)
+ else
+ fun_l8_n810(x)
+ end
+end
+
+def fun_l7_n311(x)
+ if (x < 1)
+ fun_l8_n866(x)
+ else
+ fun_l8_n519(x)
+ end
+end
+
+def fun_l7_n312(x)
+ if (x < 1)
+ fun_l8_n730(x)
+ else
+ fun_l8_n912(x)
+ end
+end
+
+def fun_l7_n313(x)
+ if (x < 1)
+ fun_l8_n128(x)
+ else
+ fun_l8_n3(x)
+ end
+end
+
+def fun_l7_n314(x)
+ if (x < 1)
+ fun_l8_n393(x)
+ else
+ fun_l8_n887(x)
+ end
+end
+
+def fun_l7_n315(x)
+ if (x < 1)
+ fun_l8_n165(x)
+ else
+ fun_l8_n540(x)
+ end
+end
+
+def fun_l7_n316(x)
+ if (x < 1)
+ fun_l8_n641(x)
+ else
+ fun_l8_n255(x)
+ end
+end
+
+def fun_l7_n317(x)
+ if (x < 1)
+ fun_l8_n265(x)
+ else
+ fun_l8_n754(x)
+ end
+end
+
+def fun_l7_n318(x)
+ if (x < 1)
+ fun_l8_n433(x)
+ else
+ fun_l8_n163(x)
+ end
+end
+
+def fun_l7_n319(x)
+ if (x < 1)
+ fun_l8_n409(x)
+ else
+ fun_l8_n110(x)
+ end
+end
+
+def fun_l7_n320(x)
+ if (x < 1)
+ fun_l8_n704(x)
+ else
+ fun_l8_n959(x)
+ end
+end
+
+def fun_l7_n321(x)
+ if (x < 1)
+ fun_l8_n334(x)
+ else
+ fun_l8_n280(x)
+ end
+end
+
+def fun_l7_n322(x)
+ if (x < 1)
+ fun_l8_n107(x)
+ else
+ fun_l8_n403(x)
+ end
+end
+
+def fun_l7_n323(x)
+ if (x < 1)
+ fun_l8_n108(x)
+ else
+ fun_l8_n426(x)
+ end
+end
+
+def fun_l7_n324(x)
+ if (x < 1)
+ fun_l8_n310(x)
+ else
+ fun_l8_n968(x)
+ end
+end
+
+def fun_l7_n325(x)
+ if (x < 1)
+ fun_l8_n600(x)
+ else
+ fun_l8_n850(x)
+ end
+end
+
+def fun_l7_n326(x)
+ if (x < 1)
+ fun_l8_n736(x)
+ else
+ fun_l8_n61(x)
+ end
+end
+
+def fun_l7_n327(x)
+ if (x < 1)
+ fun_l8_n86(x)
+ else
+ fun_l8_n948(x)
+ end
+end
+
+def fun_l7_n328(x)
+ if (x < 1)
+ fun_l8_n625(x)
+ else
+ fun_l8_n644(x)
+ end
+end
+
+def fun_l7_n329(x)
+ if (x < 1)
+ fun_l8_n507(x)
+ else
+ fun_l8_n624(x)
+ end
+end
+
+def fun_l7_n330(x)
+ if (x < 1)
+ fun_l8_n956(x)
+ else
+ fun_l8_n281(x)
+ end
+end
+
+def fun_l7_n331(x)
+ if (x < 1)
+ fun_l8_n72(x)
+ else
+ fun_l8_n695(x)
+ end
+end
+
+def fun_l7_n332(x)
+ if (x < 1)
+ fun_l8_n445(x)
+ else
+ fun_l8_n465(x)
+ end
+end
+
+def fun_l7_n333(x)
+ if (x < 1)
+ fun_l8_n438(x)
+ else
+ fun_l8_n698(x)
+ end
+end
+
+def fun_l7_n334(x)
+ if (x < 1)
+ fun_l8_n242(x)
+ else
+ fun_l8_n837(x)
+ end
+end
+
+def fun_l7_n335(x)
+ if (x < 1)
+ fun_l8_n299(x)
+ else
+ fun_l8_n312(x)
+ end
+end
+
+def fun_l7_n336(x)
+ if (x < 1)
+ fun_l8_n264(x)
+ else
+ fun_l8_n330(x)
+ end
+end
+
+def fun_l7_n337(x)
+ if (x < 1)
+ fun_l8_n251(x)
+ else
+ fun_l8_n459(x)
+ end
+end
+
+def fun_l7_n338(x)
+ if (x < 1)
+ fun_l8_n876(x)
+ else
+ fun_l8_n689(x)
+ end
+end
+
+def fun_l7_n339(x)
+ if (x < 1)
+ fun_l8_n547(x)
+ else
+ fun_l8_n745(x)
+ end
+end
+
+def fun_l7_n340(x)
+ if (x < 1)
+ fun_l8_n493(x)
+ else
+ fun_l8_n877(x)
+ end
+end
+
+def fun_l7_n341(x)
+ if (x < 1)
+ fun_l8_n143(x)
+ else
+ fun_l8_n429(x)
+ end
+end
+
+def fun_l7_n342(x)
+ if (x < 1)
+ fun_l8_n650(x)
+ else
+ fun_l8_n384(x)
+ end
+end
+
+def fun_l7_n343(x)
+ if (x < 1)
+ fun_l8_n897(x)
+ else
+ fun_l8_n980(x)
+ end
+end
+
+def fun_l7_n344(x)
+ if (x < 1)
+ fun_l8_n699(x)
+ else
+ fun_l8_n673(x)
+ end
+end
+
+def fun_l7_n345(x)
+ if (x < 1)
+ fun_l8_n25(x)
+ else
+ fun_l8_n342(x)
+ end
+end
+
+def fun_l7_n346(x)
+ if (x < 1)
+ fun_l8_n345(x)
+ else
+ fun_l8_n140(x)
+ end
+end
+
+def fun_l7_n347(x)
+ if (x < 1)
+ fun_l8_n661(x)
+ else
+ fun_l8_n153(x)
+ end
+end
+
+def fun_l7_n348(x)
+ if (x < 1)
+ fun_l8_n477(x)
+ else
+ fun_l8_n460(x)
+ end
+end
+
+def fun_l7_n349(x)
+ if (x < 1)
+ fun_l8_n641(x)
+ else
+ fun_l8_n941(x)
+ end
+end
+
+def fun_l7_n350(x)
+ if (x < 1)
+ fun_l8_n952(x)
+ else
+ fun_l8_n886(x)
+ end
+end
+
+def fun_l7_n351(x)
+ if (x < 1)
+ fun_l8_n338(x)
+ else
+ fun_l8_n655(x)
+ end
+end
+
+def fun_l7_n352(x)
+ if (x < 1)
+ fun_l8_n717(x)
+ else
+ fun_l8_n314(x)
+ end
+end
+
+def fun_l7_n353(x)
+ if (x < 1)
+ fun_l8_n645(x)
+ else
+ fun_l8_n464(x)
+ end
+end
+
+def fun_l7_n354(x)
+ if (x < 1)
+ fun_l8_n114(x)
+ else
+ fun_l8_n816(x)
+ end
+end
+
+def fun_l7_n355(x)
+ if (x < 1)
+ fun_l8_n18(x)
+ else
+ fun_l8_n173(x)
+ end
+end
+
+def fun_l7_n356(x)
+ if (x < 1)
+ fun_l8_n214(x)
+ else
+ fun_l8_n834(x)
+ end
+end
+
+def fun_l7_n357(x)
+ if (x < 1)
+ fun_l8_n6(x)
+ else
+ fun_l8_n161(x)
+ end
+end
+
+def fun_l7_n358(x)
+ if (x < 1)
+ fun_l8_n823(x)
+ else
+ fun_l8_n695(x)
+ end
+end
+
+def fun_l7_n359(x)
+ if (x < 1)
+ fun_l8_n86(x)
+ else
+ fun_l8_n174(x)
+ end
+end
+
+def fun_l7_n360(x)
+ if (x < 1)
+ fun_l8_n904(x)
+ else
+ fun_l8_n240(x)
+ end
+end
+
+def fun_l7_n361(x)
+ if (x < 1)
+ fun_l8_n857(x)
+ else
+ fun_l8_n494(x)
+ end
+end
+
+def fun_l7_n362(x)
+ if (x < 1)
+ fun_l8_n780(x)
+ else
+ fun_l8_n186(x)
+ end
+end
+
+def fun_l7_n363(x)
+ if (x < 1)
+ fun_l8_n575(x)
+ else
+ fun_l8_n510(x)
+ end
+end
+
+def fun_l7_n364(x)
+ if (x < 1)
+ fun_l8_n412(x)
+ else
+ fun_l8_n153(x)
+ end
+end
+
+def fun_l7_n365(x)
+ if (x < 1)
+ fun_l8_n840(x)
+ else
+ fun_l8_n199(x)
+ end
+end
+
+def fun_l7_n366(x)
+ if (x < 1)
+ fun_l8_n162(x)
+ else
+ fun_l8_n971(x)
+ end
+end
+
+def fun_l7_n367(x)
+ if (x < 1)
+ fun_l8_n200(x)
+ else
+ fun_l8_n128(x)
+ end
+end
+
+def fun_l7_n368(x)
+ if (x < 1)
+ fun_l8_n404(x)
+ else
+ fun_l8_n657(x)
+ end
+end
+
+def fun_l7_n369(x)
+ if (x < 1)
+ fun_l8_n631(x)
+ else
+ fun_l8_n714(x)
+ end
+end
+
+def fun_l7_n370(x)
+ if (x < 1)
+ fun_l8_n177(x)
+ else
+ fun_l8_n718(x)
+ end
+end
+
+def fun_l7_n371(x)
+ if (x < 1)
+ fun_l8_n284(x)
+ else
+ fun_l8_n474(x)
+ end
+end
+
+def fun_l7_n372(x)
+ if (x < 1)
+ fun_l8_n138(x)
+ else
+ fun_l8_n461(x)
+ end
+end
+
+def fun_l7_n373(x)
+ if (x < 1)
+ fun_l8_n78(x)
+ else
+ fun_l8_n750(x)
+ end
+end
+
+def fun_l7_n374(x)
+ if (x < 1)
+ fun_l8_n231(x)
+ else
+ fun_l8_n648(x)
+ end
+end
+
+def fun_l7_n375(x)
+ if (x < 1)
+ fun_l8_n238(x)
+ else
+ fun_l8_n644(x)
+ end
+end
+
+def fun_l7_n376(x)
+ if (x < 1)
+ fun_l8_n509(x)
+ else
+ fun_l8_n354(x)
+ end
+end
+
+def fun_l7_n377(x)
+ if (x < 1)
+ fun_l8_n332(x)
+ else
+ fun_l8_n739(x)
+ end
+end
+
+def fun_l7_n378(x)
+ if (x < 1)
+ fun_l8_n76(x)
+ else
+ fun_l8_n505(x)
+ end
+end
+
+def fun_l7_n379(x)
+ if (x < 1)
+ fun_l8_n781(x)
+ else
+ fun_l8_n918(x)
+ end
+end
+
+def fun_l7_n380(x)
+ if (x < 1)
+ fun_l8_n854(x)
+ else
+ fun_l8_n85(x)
+ end
+end
+
+def fun_l7_n381(x)
+ if (x < 1)
+ fun_l8_n67(x)
+ else
+ fun_l8_n690(x)
+ end
+end
+
+def fun_l7_n382(x)
+ if (x < 1)
+ fun_l8_n425(x)
+ else
+ fun_l8_n643(x)
+ end
+end
+
+def fun_l7_n383(x)
+ if (x < 1)
+ fun_l8_n210(x)
+ else
+ fun_l8_n533(x)
+ end
+end
+
+def fun_l7_n384(x)
+ if (x < 1)
+ fun_l8_n469(x)
+ else
+ fun_l8_n274(x)
+ end
+end
+
+def fun_l7_n385(x)
+ if (x < 1)
+ fun_l8_n398(x)
+ else
+ fun_l8_n583(x)
+ end
+end
+
+def fun_l7_n386(x)
+ if (x < 1)
+ fun_l8_n483(x)
+ else
+ fun_l8_n80(x)
+ end
+end
+
+def fun_l7_n387(x)
+ if (x < 1)
+ fun_l8_n557(x)
+ else
+ fun_l8_n165(x)
+ end
+end
+
+def fun_l7_n388(x)
+ if (x < 1)
+ fun_l8_n335(x)
+ else
+ fun_l8_n656(x)
+ end
+end
+
+def fun_l7_n389(x)
+ if (x < 1)
+ fun_l8_n810(x)
+ else
+ fun_l8_n586(x)
+ end
+end
+
+def fun_l7_n390(x)
+ if (x < 1)
+ fun_l8_n90(x)
+ else
+ fun_l8_n788(x)
+ end
+end
+
+def fun_l7_n391(x)
+ if (x < 1)
+ fun_l8_n709(x)
+ else
+ fun_l8_n948(x)
+ end
+end
+
+def fun_l7_n392(x)
+ if (x < 1)
+ fun_l8_n139(x)
+ else
+ fun_l8_n631(x)
+ end
+end
+
+def fun_l7_n393(x)
+ if (x < 1)
+ fun_l8_n341(x)
+ else
+ fun_l8_n506(x)
+ end
+end
+
+def fun_l7_n394(x)
+ if (x < 1)
+ fun_l8_n435(x)
+ else
+ fun_l8_n178(x)
+ end
+end
+
+def fun_l7_n395(x)
+ if (x < 1)
+ fun_l8_n186(x)
+ else
+ fun_l8_n58(x)
+ end
+end
+
+def fun_l7_n396(x)
+ if (x < 1)
+ fun_l8_n512(x)
+ else
+ fun_l8_n87(x)
+ end
+end
+
+def fun_l7_n397(x)
+ if (x < 1)
+ fun_l8_n763(x)
+ else
+ fun_l8_n220(x)
+ end
+end
+
+def fun_l7_n398(x)
+ if (x < 1)
+ fun_l8_n266(x)
+ else
+ fun_l8_n231(x)
+ end
+end
+
+def fun_l7_n399(x)
+ if (x < 1)
+ fun_l8_n308(x)
+ else
+ fun_l8_n512(x)
+ end
+end
+
+def fun_l7_n400(x)
+ if (x < 1)
+ fun_l8_n26(x)
+ else
+ fun_l8_n228(x)
+ end
+end
+
+def fun_l7_n401(x)
+ if (x < 1)
+ fun_l8_n143(x)
+ else
+ fun_l8_n826(x)
+ end
+end
+
+def fun_l7_n402(x)
+ if (x < 1)
+ fun_l8_n893(x)
+ else
+ fun_l8_n334(x)
+ end
+end
+
+def fun_l7_n403(x)
+ if (x < 1)
+ fun_l8_n9(x)
+ else
+ fun_l8_n867(x)
+ end
+end
+
+def fun_l7_n404(x)
+ if (x < 1)
+ fun_l8_n85(x)
+ else
+ fun_l8_n279(x)
+ end
+end
+
+def fun_l7_n405(x)
+ if (x < 1)
+ fun_l8_n30(x)
+ else
+ fun_l8_n85(x)
+ end
+end
+
+def fun_l7_n406(x)
+ if (x < 1)
+ fun_l8_n38(x)
+ else
+ fun_l8_n979(x)
+ end
+end
+
+def fun_l7_n407(x)
+ if (x < 1)
+ fun_l8_n630(x)
+ else
+ fun_l8_n262(x)
+ end
+end
+
+def fun_l7_n408(x)
+ if (x < 1)
+ fun_l8_n430(x)
+ else
+ fun_l8_n178(x)
+ end
+end
+
+def fun_l7_n409(x)
+ if (x < 1)
+ fun_l8_n131(x)
+ else
+ fun_l8_n66(x)
+ end
+end
+
+def fun_l7_n410(x)
+ if (x < 1)
+ fun_l8_n373(x)
+ else
+ fun_l8_n514(x)
+ end
+end
+
+def fun_l7_n411(x)
+ if (x < 1)
+ fun_l8_n334(x)
+ else
+ fun_l8_n591(x)
+ end
+end
+
+def fun_l7_n412(x)
+ if (x < 1)
+ fun_l8_n619(x)
+ else
+ fun_l8_n490(x)
+ end
+end
+
+def fun_l7_n413(x)
+ if (x < 1)
+ fun_l8_n318(x)
+ else
+ fun_l8_n456(x)
+ end
+end
+
+def fun_l7_n414(x)
+ if (x < 1)
+ fun_l8_n576(x)
+ else
+ fun_l8_n638(x)
+ end
+end
+
+def fun_l7_n415(x)
+ if (x < 1)
+ fun_l8_n407(x)
+ else
+ fun_l8_n44(x)
+ end
+end
+
+def fun_l7_n416(x)
+ if (x < 1)
+ fun_l8_n970(x)
+ else
+ fun_l8_n564(x)
+ end
+end
+
+def fun_l7_n417(x)
+ if (x < 1)
+ fun_l8_n163(x)
+ else
+ fun_l8_n533(x)
+ end
+end
+
+def fun_l7_n418(x)
+ if (x < 1)
+ fun_l8_n216(x)
+ else
+ fun_l8_n604(x)
+ end
+end
+
+def fun_l7_n419(x)
+ if (x < 1)
+ fun_l8_n505(x)
+ else
+ fun_l8_n620(x)
+ end
+end
+
+def fun_l7_n420(x)
+ if (x < 1)
+ fun_l8_n746(x)
+ else
+ fun_l8_n998(x)
+ end
+end
+
+def fun_l7_n421(x)
+ if (x < 1)
+ fun_l8_n266(x)
+ else
+ fun_l8_n762(x)
+ end
+end
+
+def fun_l7_n422(x)
+ if (x < 1)
+ fun_l8_n216(x)
+ else
+ fun_l8_n995(x)
+ end
+end
+
+def fun_l7_n423(x)
+ if (x < 1)
+ fun_l8_n824(x)
+ else
+ fun_l8_n349(x)
+ end
+end
+
+def fun_l7_n424(x)
+ if (x < 1)
+ fun_l8_n177(x)
+ else
+ fun_l8_n61(x)
+ end
+end
+
+def fun_l7_n425(x)
+ if (x < 1)
+ fun_l8_n286(x)
+ else
+ fun_l8_n213(x)
+ end
+end
+
+def fun_l7_n426(x)
+ if (x < 1)
+ fun_l8_n794(x)
+ else
+ fun_l8_n428(x)
+ end
+end
+
+def fun_l7_n427(x)
+ if (x < 1)
+ fun_l8_n404(x)
+ else
+ fun_l8_n202(x)
+ end
+end
+
+def fun_l7_n428(x)
+ if (x < 1)
+ fun_l8_n571(x)
+ else
+ fun_l8_n812(x)
+ end
+end
+
+def fun_l7_n429(x)
+ if (x < 1)
+ fun_l8_n165(x)
+ else
+ fun_l8_n277(x)
+ end
+end
+
+def fun_l7_n430(x)
+ if (x < 1)
+ fun_l8_n138(x)
+ else
+ fun_l8_n230(x)
+ end
+end
+
+def fun_l7_n431(x)
+ if (x < 1)
+ fun_l8_n832(x)
+ else
+ fun_l8_n78(x)
+ end
+end
+
+def fun_l7_n432(x)
+ if (x < 1)
+ fun_l8_n866(x)
+ else
+ fun_l8_n137(x)
+ end
+end
+
+def fun_l7_n433(x)
+ if (x < 1)
+ fun_l8_n92(x)
+ else
+ fun_l8_n638(x)
+ end
+end
+
+def fun_l7_n434(x)
+ if (x < 1)
+ fun_l8_n788(x)
+ else
+ fun_l8_n991(x)
+ end
+end
+
+def fun_l7_n435(x)
+ if (x < 1)
+ fun_l8_n584(x)
+ else
+ fun_l8_n783(x)
+ end
+end
+
+def fun_l7_n436(x)
+ if (x < 1)
+ fun_l8_n786(x)
+ else
+ fun_l8_n771(x)
+ end
+end
+
+def fun_l7_n437(x)
+ if (x < 1)
+ fun_l8_n650(x)
+ else
+ fun_l8_n684(x)
+ end
+end
+
+def fun_l7_n438(x)
+ if (x < 1)
+ fun_l8_n964(x)
+ else
+ fun_l8_n738(x)
+ end
+end
+
+def fun_l7_n439(x)
+ if (x < 1)
+ fun_l8_n356(x)
+ else
+ fun_l8_n979(x)
+ end
+end
+
+def fun_l7_n440(x)
+ if (x < 1)
+ fun_l8_n630(x)
+ else
+ fun_l8_n79(x)
+ end
+end
+
+def fun_l7_n441(x)
+ if (x < 1)
+ fun_l8_n326(x)
+ else
+ fun_l8_n667(x)
+ end
+end
+
+def fun_l7_n442(x)
+ if (x < 1)
+ fun_l8_n561(x)
+ else
+ fun_l8_n263(x)
+ end
+end
+
+def fun_l7_n443(x)
+ if (x < 1)
+ fun_l8_n62(x)
+ else
+ fun_l8_n528(x)
+ end
+end
+
+def fun_l7_n444(x)
+ if (x < 1)
+ fun_l8_n156(x)
+ else
+ fun_l8_n496(x)
+ end
+end
+
+def fun_l7_n445(x)
+ if (x < 1)
+ fun_l8_n971(x)
+ else
+ fun_l8_n853(x)
+ end
+end
+
+def fun_l7_n446(x)
+ if (x < 1)
+ fun_l8_n217(x)
+ else
+ fun_l8_n985(x)
+ end
+end
+
+def fun_l7_n447(x)
+ if (x < 1)
+ fun_l8_n569(x)
+ else
+ fun_l8_n320(x)
+ end
+end
+
+def fun_l7_n448(x)
+ if (x < 1)
+ fun_l8_n133(x)
+ else
+ fun_l8_n417(x)
+ end
+end
+
+def fun_l7_n449(x)
+ if (x < 1)
+ fun_l8_n369(x)
+ else
+ fun_l8_n25(x)
+ end
+end
+
+def fun_l7_n450(x)
+ if (x < 1)
+ fun_l8_n735(x)
+ else
+ fun_l8_n573(x)
+ end
+end
+
+def fun_l7_n451(x)
+ if (x < 1)
+ fun_l8_n764(x)
+ else
+ fun_l8_n247(x)
+ end
+end
+
+def fun_l7_n452(x)
+ if (x < 1)
+ fun_l8_n512(x)
+ else
+ fun_l8_n274(x)
+ end
+end
+
+def fun_l7_n453(x)
+ if (x < 1)
+ fun_l8_n388(x)
+ else
+ fun_l8_n438(x)
+ end
+end
+
+def fun_l7_n454(x)
+ if (x < 1)
+ fun_l8_n565(x)
+ else
+ fun_l8_n449(x)
+ end
+end
+
+def fun_l7_n455(x)
+ if (x < 1)
+ fun_l8_n771(x)
+ else
+ fun_l8_n827(x)
+ end
+end
+
+def fun_l7_n456(x)
+ if (x < 1)
+ fun_l8_n538(x)
+ else
+ fun_l8_n270(x)
+ end
+end
+
+def fun_l7_n457(x)
+ if (x < 1)
+ fun_l8_n288(x)
+ else
+ fun_l8_n325(x)
+ end
+end
+
+def fun_l7_n458(x)
+ if (x < 1)
+ fun_l8_n345(x)
+ else
+ fun_l8_n334(x)
+ end
+end
+
+def fun_l7_n459(x)
+ if (x < 1)
+ fun_l8_n696(x)
+ else
+ fun_l8_n440(x)
+ end
+end
+
+def fun_l7_n460(x)
+ if (x < 1)
+ fun_l8_n509(x)
+ else
+ fun_l8_n580(x)
+ end
+end
+
+def fun_l7_n461(x)
+ if (x < 1)
+ fun_l8_n254(x)
+ else
+ fun_l8_n162(x)
+ end
+end
+
+def fun_l7_n462(x)
+ if (x < 1)
+ fun_l8_n541(x)
+ else
+ fun_l8_n493(x)
+ end
+end
+
+def fun_l7_n463(x)
+ if (x < 1)
+ fun_l8_n371(x)
+ else
+ fun_l8_n302(x)
+ end
+end
+
+def fun_l7_n464(x)
+ if (x < 1)
+ fun_l8_n44(x)
+ else
+ fun_l8_n677(x)
+ end
+end
+
+def fun_l7_n465(x)
+ if (x < 1)
+ fun_l8_n312(x)
+ else
+ fun_l8_n716(x)
+ end
+end
+
+def fun_l7_n466(x)
+ if (x < 1)
+ fun_l8_n252(x)
+ else
+ fun_l8_n827(x)
+ end
+end
+
+def fun_l7_n467(x)
+ if (x < 1)
+ fun_l8_n871(x)
+ else
+ fun_l8_n962(x)
+ end
+end
+
+def fun_l7_n468(x)
+ if (x < 1)
+ fun_l8_n323(x)
+ else
+ fun_l8_n813(x)
+ end
+end
+
+def fun_l7_n469(x)
+ if (x < 1)
+ fun_l8_n100(x)
+ else
+ fun_l8_n905(x)
+ end
+end
+
+def fun_l7_n470(x)
+ if (x < 1)
+ fun_l8_n95(x)
+ else
+ fun_l8_n96(x)
+ end
+end
+
+def fun_l7_n471(x)
+ if (x < 1)
+ fun_l8_n398(x)
+ else
+ fun_l8_n40(x)
+ end
+end
+
+def fun_l7_n472(x)
+ if (x < 1)
+ fun_l8_n280(x)
+ else
+ fun_l8_n34(x)
+ end
+end
+
+def fun_l7_n473(x)
+ if (x < 1)
+ fun_l8_n262(x)
+ else
+ fun_l8_n399(x)
+ end
+end
+
+def fun_l7_n474(x)
+ if (x < 1)
+ fun_l8_n126(x)
+ else
+ fun_l8_n208(x)
+ end
+end
+
+def fun_l7_n475(x)
+ if (x < 1)
+ fun_l8_n371(x)
+ else
+ fun_l8_n697(x)
+ end
+end
+
+def fun_l7_n476(x)
+ if (x < 1)
+ fun_l8_n617(x)
+ else
+ fun_l8_n822(x)
+ end
+end
+
+def fun_l7_n477(x)
+ if (x < 1)
+ fun_l8_n24(x)
+ else
+ fun_l8_n300(x)
+ end
+end
+
+def fun_l7_n478(x)
+ if (x < 1)
+ fun_l8_n864(x)
+ else
+ fun_l8_n357(x)
+ end
+end
+
+def fun_l7_n479(x)
+ if (x < 1)
+ fun_l8_n231(x)
+ else
+ fun_l8_n892(x)
+ end
+end
+
+def fun_l7_n480(x)
+ if (x < 1)
+ fun_l8_n200(x)
+ else
+ fun_l8_n49(x)
+ end
+end
+
+def fun_l7_n481(x)
+ if (x < 1)
+ fun_l8_n43(x)
+ else
+ fun_l8_n86(x)
+ end
+end
+
+def fun_l7_n482(x)
+ if (x < 1)
+ fun_l8_n617(x)
+ else
+ fun_l8_n752(x)
+ end
+end
+
+def fun_l7_n483(x)
+ if (x < 1)
+ fun_l8_n65(x)
+ else
+ fun_l8_n796(x)
+ end
+end
+
+def fun_l7_n484(x)
+ if (x < 1)
+ fun_l8_n960(x)
+ else
+ fun_l8_n174(x)
+ end
+end
+
+def fun_l7_n485(x)
+ if (x < 1)
+ fun_l8_n383(x)
+ else
+ fun_l8_n50(x)
+ end
+end
+
+def fun_l7_n486(x)
+ if (x < 1)
+ fun_l8_n269(x)
+ else
+ fun_l8_n413(x)
+ end
+end
+
+def fun_l7_n487(x)
+ if (x < 1)
+ fun_l8_n762(x)
+ else
+ fun_l8_n368(x)
+ end
+end
+
+def fun_l7_n488(x)
+ if (x < 1)
+ fun_l8_n635(x)
+ else
+ fun_l8_n900(x)
+ end
+end
+
+def fun_l7_n489(x)
+ if (x < 1)
+ fun_l8_n707(x)
+ else
+ fun_l8_n376(x)
+ end
+end
+
+def fun_l7_n490(x)
+ if (x < 1)
+ fun_l8_n215(x)
+ else
+ fun_l8_n255(x)
+ end
+end
+
+def fun_l7_n491(x)
+ if (x < 1)
+ fun_l8_n730(x)
+ else
+ fun_l8_n489(x)
+ end
+end
+
+def fun_l7_n492(x)
+ if (x < 1)
+ fun_l8_n896(x)
+ else
+ fun_l8_n501(x)
+ end
+end
+
+def fun_l7_n493(x)
+ if (x < 1)
+ fun_l8_n359(x)
+ else
+ fun_l8_n876(x)
+ end
+end
+
+def fun_l7_n494(x)
+ if (x < 1)
+ fun_l8_n13(x)
+ else
+ fun_l8_n669(x)
+ end
+end
+
+def fun_l7_n495(x)
+ if (x < 1)
+ fun_l8_n442(x)
+ else
+ fun_l8_n975(x)
+ end
+end
+
+def fun_l7_n496(x)
+ if (x < 1)
+ fun_l8_n349(x)
+ else
+ fun_l8_n240(x)
+ end
+end
+
+def fun_l7_n497(x)
+ if (x < 1)
+ fun_l8_n174(x)
+ else
+ fun_l8_n416(x)
+ end
+end
+
+def fun_l7_n498(x)
+ if (x < 1)
+ fun_l8_n141(x)
+ else
+ fun_l8_n231(x)
+ end
+end
+
+def fun_l7_n499(x)
+ if (x < 1)
+ fun_l8_n868(x)
+ else
+ fun_l8_n370(x)
+ end
+end
+
+def fun_l7_n500(x)
+ if (x < 1)
+ fun_l8_n888(x)
+ else
+ fun_l8_n525(x)
+ end
+end
+
+def fun_l7_n501(x)
+ if (x < 1)
+ fun_l8_n418(x)
+ else
+ fun_l8_n402(x)
+ end
+end
+
+def fun_l7_n502(x)
+ if (x < 1)
+ fun_l8_n910(x)
+ else
+ fun_l8_n308(x)
+ end
+end
+
+def fun_l7_n503(x)
+ if (x < 1)
+ fun_l8_n435(x)
+ else
+ fun_l8_n106(x)
+ end
+end
+
+def fun_l7_n504(x)
+ if (x < 1)
+ fun_l8_n716(x)
+ else
+ fun_l8_n768(x)
+ end
+end
+
+def fun_l7_n505(x)
+ if (x < 1)
+ fun_l8_n690(x)
+ else
+ fun_l8_n382(x)
+ end
+end
+
+def fun_l7_n506(x)
+ if (x < 1)
+ fun_l8_n786(x)
+ else
+ fun_l8_n270(x)
+ end
+end
+
+def fun_l7_n507(x)
+ if (x < 1)
+ fun_l8_n317(x)
+ else
+ fun_l8_n802(x)
+ end
+end
+
+def fun_l7_n508(x)
+ if (x < 1)
+ fun_l8_n423(x)
+ else
+ fun_l8_n91(x)
+ end
+end
+
+def fun_l7_n509(x)
+ if (x < 1)
+ fun_l8_n853(x)
+ else
+ fun_l8_n434(x)
+ end
+end
+
+def fun_l7_n510(x)
+ if (x < 1)
+ fun_l8_n691(x)
+ else
+ fun_l8_n458(x)
+ end
+end
+
+def fun_l7_n511(x)
+ if (x < 1)
+ fun_l8_n806(x)
+ else
+ fun_l8_n989(x)
+ end
+end
+
+def fun_l7_n512(x)
+ if (x < 1)
+ fun_l8_n696(x)
+ else
+ fun_l8_n234(x)
+ end
+end
+
+def fun_l7_n513(x)
+ if (x < 1)
+ fun_l8_n370(x)
+ else
+ fun_l8_n440(x)
+ end
+end
+
+def fun_l7_n514(x)
+ if (x < 1)
+ fun_l8_n889(x)
+ else
+ fun_l8_n306(x)
+ end
+end
+
+def fun_l7_n515(x)
+ if (x < 1)
+ fun_l8_n147(x)
+ else
+ fun_l8_n527(x)
+ end
+end
+
+def fun_l7_n516(x)
+ if (x < 1)
+ fun_l8_n18(x)
+ else
+ fun_l8_n120(x)
+ end
+end
+
+def fun_l7_n517(x)
+ if (x < 1)
+ fun_l8_n93(x)
+ else
+ fun_l8_n861(x)
+ end
+end
+
+def fun_l7_n518(x)
+ if (x < 1)
+ fun_l8_n954(x)
+ else
+ fun_l8_n864(x)
+ end
+end
+
+def fun_l7_n519(x)
+ if (x < 1)
+ fun_l8_n886(x)
+ else
+ fun_l8_n227(x)
+ end
+end
+
+def fun_l7_n520(x)
+ if (x < 1)
+ fun_l8_n525(x)
+ else
+ fun_l8_n73(x)
+ end
+end
+
+def fun_l7_n521(x)
+ if (x < 1)
+ fun_l8_n550(x)
+ else
+ fun_l8_n638(x)
+ end
+end
+
+def fun_l7_n522(x)
+ if (x < 1)
+ fun_l8_n36(x)
+ else
+ fun_l8_n511(x)
+ end
+end
+
+def fun_l7_n523(x)
+ if (x < 1)
+ fun_l8_n346(x)
+ else
+ fun_l8_n257(x)
+ end
+end
+
+def fun_l7_n524(x)
+ if (x < 1)
+ fun_l8_n973(x)
+ else
+ fun_l8_n704(x)
+ end
+end
+
+def fun_l7_n525(x)
+ if (x < 1)
+ fun_l8_n21(x)
+ else
+ fun_l8_n354(x)
+ end
+end
+
+def fun_l7_n526(x)
+ if (x < 1)
+ fun_l8_n394(x)
+ else
+ fun_l8_n461(x)
+ end
+end
+
+def fun_l7_n527(x)
+ if (x < 1)
+ fun_l8_n444(x)
+ else
+ fun_l8_n333(x)
+ end
+end
+
+def fun_l7_n528(x)
+ if (x < 1)
+ fun_l8_n743(x)
+ else
+ fun_l8_n579(x)
+ end
+end
+
+def fun_l7_n529(x)
+ if (x < 1)
+ fun_l8_n135(x)
+ else
+ fun_l8_n69(x)
+ end
+end
+
+def fun_l7_n530(x)
+ if (x < 1)
+ fun_l8_n66(x)
+ else
+ fun_l8_n6(x)
+ end
+end
+
+def fun_l7_n531(x)
+ if (x < 1)
+ fun_l8_n84(x)
+ else
+ fun_l8_n392(x)
+ end
+end
+
+def fun_l7_n532(x)
+ if (x < 1)
+ fun_l8_n178(x)
+ else
+ fun_l8_n227(x)
+ end
+end
+
+def fun_l7_n533(x)
+ if (x < 1)
+ fun_l8_n695(x)
+ else
+ fun_l8_n696(x)
+ end
+end
+
+def fun_l7_n534(x)
+ if (x < 1)
+ fun_l8_n266(x)
+ else
+ fun_l8_n8(x)
+ end
+end
+
+def fun_l7_n535(x)
+ if (x < 1)
+ fun_l8_n806(x)
+ else
+ fun_l8_n878(x)
+ end
+end
+
+def fun_l7_n536(x)
+ if (x < 1)
+ fun_l8_n775(x)
+ else
+ fun_l8_n778(x)
+ end
+end
+
+def fun_l7_n537(x)
+ if (x < 1)
+ fun_l8_n133(x)
+ else
+ fun_l8_n552(x)
+ end
+end
+
+def fun_l7_n538(x)
+ if (x < 1)
+ fun_l8_n71(x)
+ else
+ fun_l8_n786(x)
+ end
+end
+
+def fun_l7_n539(x)
+ if (x < 1)
+ fun_l8_n679(x)
+ else
+ fun_l8_n407(x)
+ end
+end
+
+def fun_l7_n540(x)
+ if (x < 1)
+ fun_l8_n532(x)
+ else
+ fun_l8_n75(x)
+ end
+end
+
+def fun_l7_n541(x)
+ if (x < 1)
+ fun_l8_n367(x)
+ else
+ fun_l8_n505(x)
+ end
+end
+
+def fun_l7_n542(x)
+ if (x < 1)
+ fun_l8_n74(x)
+ else
+ fun_l8_n374(x)
+ end
+end
+
+def fun_l7_n543(x)
+ if (x < 1)
+ fun_l8_n207(x)
+ else
+ fun_l8_n874(x)
+ end
+end
+
+def fun_l7_n544(x)
+ if (x < 1)
+ fun_l8_n774(x)
+ else
+ fun_l8_n750(x)
+ end
+end
+
+def fun_l7_n545(x)
+ if (x < 1)
+ fun_l8_n503(x)
+ else
+ fun_l8_n933(x)
+ end
+end
+
+def fun_l7_n546(x)
+ if (x < 1)
+ fun_l8_n125(x)
+ else
+ fun_l8_n570(x)
+ end
+end
+
+def fun_l7_n547(x)
+ if (x < 1)
+ fun_l8_n743(x)
+ else
+ fun_l8_n506(x)
+ end
+end
+
+def fun_l7_n548(x)
+ if (x < 1)
+ fun_l8_n297(x)
+ else
+ fun_l8_n70(x)
+ end
+end
+
+def fun_l7_n549(x)
+ if (x < 1)
+ fun_l8_n692(x)
+ else
+ fun_l8_n652(x)
+ end
+end
+
+def fun_l7_n550(x)
+ if (x < 1)
+ fun_l8_n446(x)
+ else
+ fun_l8_n432(x)
+ end
+end
+
+def fun_l7_n551(x)
+ if (x < 1)
+ fun_l8_n947(x)
+ else
+ fun_l8_n429(x)
+ end
+end
+
+def fun_l7_n552(x)
+ if (x < 1)
+ fun_l8_n417(x)
+ else
+ fun_l8_n136(x)
+ end
+end
+
+def fun_l7_n553(x)
+ if (x < 1)
+ fun_l8_n236(x)
+ else
+ fun_l8_n291(x)
+ end
+end
+
+def fun_l7_n554(x)
+ if (x < 1)
+ fun_l8_n60(x)
+ else
+ fun_l8_n328(x)
+ end
+end
+
+def fun_l7_n555(x)
+ if (x < 1)
+ fun_l8_n97(x)
+ else
+ fun_l8_n461(x)
+ end
+end
+
+def fun_l7_n556(x)
+ if (x < 1)
+ fun_l8_n158(x)
+ else
+ fun_l8_n603(x)
+ end
+end
+
+def fun_l7_n557(x)
+ if (x < 1)
+ fun_l8_n328(x)
+ else
+ fun_l8_n725(x)
+ end
+end
+
+def fun_l7_n558(x)
+ if (x < 1)
+ fun_l8_n25(x)
+ else
+ fun_l8_n933(x)
+ end
+end
+
+def fun_l7_n559(x)
+ if (x < 1)
+ fun_l8_n352(x)
+ else
+ fun_l8_n552(x)
+ end
+end
+
+def fun_l7_n560(x)
+ if (x < 1)
+ fun_l8_n427(x)
+ else
+ fun_l8_n91(x)
+ end
+end
+
+def fun_l7_n561(x)
+ if (x < 1)
+ fun_l8_n293(x)
+ else
+ fun_l8_n749(x)
+ end
+end
+
+def fun_l7_n562(x)
+ if (x < 1)
+ fun_l8_n672(x)
+ else
+ fun_l8_n905(x)
+ end
+end
+
+def fun_l7_n563(x)
+ if (x < 1)
+ fun_l8_n201(x)
+ else
+ fun_l8_n668(x)
+ end
+end
+
+def fun_l7_n564(x)
+ if (x < 1)
+ fun_l8_n109(x)
+ else
+ fun_l8_n401(x)
+ end
+end
+
+def fun_l7_n565(x)
+ if (x < 1)
+ fun_l8_n678(x)
+ else
+ fun_l8_n890(x)
+ end
+end
+
+def fun_l7_n566(x)
+ if (x < 1)
+ fun_l8_n876(x)
+ else
+ fun_l8_n129(x)
+ end
+end
+
+def fun_l7_n567(x)
+ if (x < 1)
+ fun_l8_n908(x)
+ else
+ fun_l8_n979(x)
+ end
+end
+
+def fun_l7_n568(x)
+ if (x < 1)
+ fun_l8_n899(x)
+ else
+ fun_l8_n792(x)
+ end
+end
+
+def fun_l7_n569(x)
+ if (x < 1)
+ fun_l8_n742(x)
+ else
+ fun_l8_n441(x)
+ end
+end
+
+def fun_l7_n570(x)
+ if (x < 1)
+ fun_l8_n338(x)
+ else
+ fun_l8_n877(x)
+ end
+end
+
+def fun_l7_n571(x)
+ if (x < 1)
+ fun_l8_n684(x)
+ else
+ fun_l8_n167(x)
+ end
+end
+
+def fun_l7_n572(x)
+ if (x < 1)
+ fun_l8_n366(x)
+ else
+ fun_l8_n239(x)
+ end
+end
+
+def fun_l7_n573(x)
+ if (x < 1)
+ fun_l8_n925(x)
+ else
+ fun_l8_n648(x)
+ end
+end
+
+def fun_l7_n574(x)
+ if (x < 1)
+ fun_l8_n825(x)
+ else
+ fun_l8_n811(x)
+ end
+end
+
+def fun_l7_n575(x)
+ if (x < 1)
+ fun_l8_n348(x)
+ else
+ fun_l8_n994(x)
+ end
+end
+
+def fun_l7_n576(x)
+ if (x < 1)
+ fun_l8_n721(x)
+ else
+ fun_l8_n584(x)
+ end
+end
+
+def fun_l7_n577(x)
+ if (x < 1)
+ fun_l8_n827(x)
+ else
+ fun_l8_n968(x)
+ end
+end
+
+def fun_l7_n578(x)
+ if (x < 1)
+ fun_l8_n649(x)
+ else
+ fun_l8_n684(x)
+ end
+end
+
+def fun_l7_n579(x)
+ if (x < 1)
+ fun_l8_n43(x)
+ else
+ fun_l8_n183(x)
+ end
+end
+
+def fun_l7_n580(x)
+ if (x < 1)
+ fun_l8_n516(x)
+ else
+ fun_l8_n893(x)
+ end
+end
+
+def fun_l7_n581(x)
+ if (x < 1)
+ fun_l8_n334(x)
+ else
+ fun_l8_n677(x)
+ end
+end
+
+def fun_l7_n582(x)
+ if (x < 1)
+ fun_l8_n731(x)
+ else
+ fun_l8_n922(x)
+ end
+end
+
+def fun_l7_n583(x)
+ if (x < 1)
+ fun_l8_n653(x)
+ else
+ fun_l8_n403(x)
+ end
+end
+
+def fun_l7_n584(x)
+ if (x < 1)
+ fun_l8_n534(x)
+ else
+ fun_l8_n155(x)
+ end
+end
+
+def fun_l7_n585(x)
+ if (x < 1)
+ fun_l8_n1(x)
+ else
+ fun_l8_n903(x)
+ end
+end
+
+def fun_l7_n586(x)
+ if (x < 1)
+ fun_l8_n956(x)
+ else
+ fun_l8_n182(x)
+ end
+end
+
+def fun_l7_n587(x)
+ if (x < 1)
+ fun_l8_n590(x)
+ else
+ fun_l8_n707(x)
+ end
+end
+
+def fun_l7_n588(x)
+ if (x < 1)
+ fun_l8_n74(x)
+ else
+ fun_l8_n612(x)
+ end
+end
+
+def fun_l7_n589(x)
+ if (x < 1)
+ fun_l8_n17(x)
+ else
+ fun_l8_n193(x)
+ end
+end
+
+def fun_l7_n590(x)
+ if (x < 1)
+ fun_l8_n650(x)
+ else
+ fun_l8_n863(x)
+ end
+end
+
+def fun_l7_n591(x)
+ if (x < 1)
+ fun_l8_n974(x)
+ else
+ fun_l8_n932(x)
+ end
+end
+
+def fun_l7_n592(x)
+ if (x < 1)
+ fun_l8_n17(x)
+ else
+ fun_l8_n537(x)
+ end
+end
+
+def fun_l7_n593(x)
+ if (x < 1)
+ fun_l8_n118(x)
+ else
+ fun_l8_n588(x)
+ end
+end
+
+def fun_l7_n594(x)
+ if (x < 1)
+ fun_l8_n241(x)
+ else
+ fun_l8_n929(x)
+ end
+end
+
+def fun_l7_n595(x)
+ if (x < 1)
+ fun_l8_n667(x)
+ else
+ fun_l8_n251(x)
+ end
+end
+
+def fun_l7_n596(x)
+ if (x < 1)
+ fun_l8_n473(x)
+ else
+ fun_l8_n189(x)
+ end
+end
+
+def fun_l7_n597(x)
+ if (x < 1)
+ fun_l8_n687(x)
+ else
+ fun_l8_n666(x)
+ end
+end
+
+def fun_l7_n598(x)
+ if (x < 1)
+ fun_l8_n700(x)
+ else
+ fun_l8_n294(x)
+ end
+end
+
+def fun_l7_n599(x)
+ if (x < 1)
+ fun_l8_n144(x)
+ else
+ fun_l8_n656(x)
+ end
+end
+
+def fun_l7_n600(x)
+ if (x < 1)
+ fun_l8_n375(x)
+ else
+ fun_l8_n571(x)
+ end
+end
+
+def fun_l7_n601(x)
+ if (x < 1)
+ fun_l8_n506(x)
+ else
+ fun_l8_n212(x)
+ end
+end
+
+def fun_l7_n602(x)
+ if (x < 1)
+ fun_l8_n770(x)
+ else
+ fun_l8_n491(x)
+ end
+end
+
+def fun_l7_n603(x)
+ if (x < 1)
+ fun_l8_n325(x)
+ else
+ fun_l8_n660(x)
+ end
+end
+
+def fun_l7_n604(x)
+ if (x < 1)
+ fun_l8_n255(x)
+ else
+ fun_l8_n842(x)
+ end
+end
+
+def fun_l7_n605(x)
+ if (x < 1)
+ fun_l8_n149(x)
+ else
+ fun_l8_n648(x)
+ end
+end
+
+def fun_l7_n606(x)
+ if (x < 1)
+ fun_l8_n845(x)
+ else
+ fun_l8_n248(x)
+ end
+end
+
+def fun_l7_n607(x)
+ if (x < 1)
+ fun_l8_n484(x)
+ else
+ fun_l8_n333(x)
+ end
+end
+
+def fun_l7_n608(x)
+ if (x < 1)
+ fun_l8_n287(x)
+ else
+ fun_l8_n341(x)
+ end
+end
+
+def fun_l7_n609(x)
+ if (x < 1)
+ fun_l8_n873(x)
+ else
+ fun_l8_n113(x)
+ end
+end
+
+def fun_l7_n610(x)
+ if (x < 1)
+ fun_l8_n45(x)
+ else
+ fun_l8_n994(x)
+ end
+end
+
+def fun_l7_n611(x)
+ if (x < 1)
+ fun_l8_n427(x)
+ else
+ fun_l8_n359(x)
+ end
+end
+
+def fun_l7_n612(x)
+ if (x < 1)
+ fun_l8_n433(x)
+ else
+ fun_l8_n189(x)
+ end
+end
+
+def fun_l7_n613(x)
+ if (x < 1)
+ fun_l8_n25(x)
+ else
+ fun_l8_n564(x)
+ end
+end
+
+def fun_l7_n614(x)
+ if (x < 1)
+ fun_l8_n789(x)
+ else
+ fun_l8_n441(x)
+ end
+end
+
+def fun_l7_n615(x)
+ if (x < 1)
+ fun_l8_n353(x)
+ else
+ fun_l8_n217(x)
+ end
+end
+
+def fun_l7_n616(x)
+ if (x < 1)
+ fun_l8_n334(x)
+ else
+ fun_l8_n559(x)
+ end
+end
+
+def fun_l7_n617(x)
+ if (x < 1)
+ fun_l8_n709(x)
+ else
+ fun_l8_n764(x)
+ end
+end
+
+def fun_l7_n618(x)
+ if (x < 1)
+ fun_l8_n710(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n619(x)
+ if (x < 1)
+ fun_l8_n246(x)
+ else
+ fun_l8_n88(x)
+ end
+end
+
+def fun_l7_n620(x)
+ if (x < 1)
+ fun_l8_n259(x)
+ else
+ fun_l8_n813(x)
+ end
+end
+
+def fun_l7_n621(x)
+ if (x < 1)
+ fun_l8_n250(x)
+ else
+ fun_l8_n566(x)
+ end
+end
+
+def fun_l7_n622(x)
+ if (x < 1)
+ fun_l8_n223(x)
+ else
+ fun_l8_n627(x)
+ end
+end
+
+def fun_l7_n623(x)
+ if (x < 1)
+ fun_l8_n345(x)
+ else
+ fun_l8_n604(x)
+ end
+end
+
+def fun_l7_n624(x)
+ if (x < 1)
+ fun_l8_n405(x)
+ else
+ fun_l8_n850(x)
+ end
+end
+
+def fun_l7_n625(x)
+ if (x < 1)
+ fun_l8_n278(x)
+ else
+ fun_l8_n643(x)
+ end
+end
+
+def fun_l7_n626(x)
+ if (x < 1)
+ fun_l8_n359(x)
+ else
+ fun_l8_n167(x)
+ end
+end
+
+def fun_l7_n627(x)
+ if (x < 1)
+ fun_l8_n589(x)
+ else
+ fun_l8_n656(x)
+ end
+end
+
+def fun_l7_n628(x)
+ if (x < 1)
+ fun_l8_n612(x)
+ else
+ fun_l8_n227(x)
+ end
+end
+
+def fun_l7_n629(x)
+ if (x < 1)
+ fun_l8_n845(x)
+ else
+ fun_l8_n469(x)
+ end
+end
+
+def fun_l7_n630(x)
+ if (x < 1)
+ fun_l8_n833(x)
+ else
+ fun_l8_n92(x)
+ end
+end
+
+def fun_l7_n631(x)
+ if (x < 1)
+ fun_l8_n411(x)
+ else
+ fun_l8_n815(x)
+ end
+end
+
+def fun_l7_n632(x)
+ if (x < 1)
+ fun_l8_n844(x)
+ else
+ fun_l8_n349(x)
+ end
+end
+
+def fun_l7_n633(x)
+ if (x < 1)
+ fun_l8_n333(x)
+ else
+ fun_l8_n468(x)
+ end
+end
+
+def fun_l7_n634(x)
+ if (x < 1)
+ fun_l8_n12(x)
+ else
+ fun_l8_n727(x)
+ end
+end
+
+def fun_l7_n635(x)
+ if (x < 1)
+ fun_l8_n65(x)
+ else
+ fun_l8_n729(x)
+ end
+end
+
+def fun_l7_n636(x)
+ if (x < 1)
+ fun_l8_n54(x)
+ else
+ fun_l8_n524(x)
+ end
+end
+
+def fun_l7_n637(x)
+ if (x < 1)
+ fun_l8_n547(x)
+ else
+ fun_l8_n220(x)
+ end
+end
+
+def fun_l7_n638(x)
+ if (x < 1)
+ fun_l8_n679(x)
+ else
+ fun_l8_n693(x)
+ end
+end
+
+def fun_l7_n639(x)
+ if (x < 1)
+ fun_l8_n428(x)
+ else
+ fun_l8_n938(x)
+ end
+end
+
+def fun_l7_n640(x)
+ if (x < 1)
+ fun_l8_n779(x)
+ else
+ fun_l8_n323(x)
+ end
+end
+
+def fun_l7_n641(x)
+ if (x < 1)
+ fun_l8_n254(x)
+ else
+ fun_l8_n443(x)
+ end
+end
+
+def fun_l7_n642(x)
+ if (x < 1)
+ fun_l8_n623(x)
+ else
+ fun_l8_n361(x)
+ end
+end
+
+def fun_l7_n643(x)
+ if (x < 1)
+ fun_l8_n524(x)
+ else
+ fun_l8_n19(x)
+ end
+end
+
+def fun_l7_n644(x)
+ if (x < 1)
+ fun_l8_n77(x)
+ else
+ fun_l8_n696(x)
+ end
+end
+
+def fun_l7_n645(x)
+ if (x < 1)
+ fun_l8_n468(x)
+ else
+ fun_l8_n819(x)
+ end
+end
+
+def fun_l7_n646(x)
+ if (x < 1)
+ fun_l8_n319(x)
+ else
+ fun_l8_n921(x)
+ end
+end
+
+def fun_l7_n647(x)
+ if (x < 1)
+ fun_l8_n681(x)
+ else
+ fun_l8_n925(x)
+ end
+end
+
+def fun_l7_n648(x)
+ if (x < 1)
+ fun_l8_n146(x)
+ else
+ fun_l8_n451(x)
+ end
+end
+
+def fun_l7_n649(x)
+ if (x < 1)
+ fun_l8_n871(x)
+ else
+ fun_l8_n707(x)
+ end
+end
+
+def fun_l7_n650(x)
+ if (x < 1)
+ fun_l8_n782(x)
+ else
+ fun_l8_n556(x)
+ end
+end
+
+def fun_l7_n651(x)
+ if (x < 1)
+ fun_l8_n721(x)
+ else
+ fun_l8_n80(x)
+ end
+end
+
+def fun_l7_n652(x)
+ if (x < 1)
+ fun_l8_n110(x)
+ else
+ fun_l8_n529(x)
+ end
+end
+
+def fun_l7_n653(x)
+ if (x < 1)
+ fun_l8_n107(x)
+ else
+ fun_l8_n876(x)
+ end
+end
+
+def fun_l7_n654(x)
+ if (x < 1)
+ fun_l8_n902(x)
+ else
+ fun_l8_n45(x)
+ end
+end
+
+def fun_l7_n655(x)
+ if (x < 1)
+ fun_l8_n714(x)
+ else
+ fun_l8_n939(x)
+ end
+end
+
+def fun_l7_n656(x)
+ if (x < 1)
+ fun_l8_n761(x)
+ else
+ fun_l8_n940(x)
+ end
+end
+
+def fun_l7_n657(x)
+ if (x < 1)
+ fun_l8_n165(x)
+ else
+ fun_l8_n779(x)
+ end
+end
+
+def fun_l7_n658(x)
+ if (x < 1)
+ fun_l8_n848(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n659(x)
+ if (x < 1)
+ fun_l8_n414(x)
+ else
+ fun_l8_n855(x)
+ end
+end
+
+def fun_l7_n660(x)
+ if (x < 1)
+ fun_l8_n963(x)
+ else
+ fun_l8_n887(x)
+ end
+end
+
+def fun_l7_n661(x)
+ if (x < 1)
+ fun_l8_n71(x)
+ else
+ fun_l8_n249(x)
+ end
+end
+
+def fun_l7_n662(x)
+ if (x < 1)
+ fun_l8_n426(x)
+ else
+ fun_l8_n977(x)
+ end
+end
+
+def fun_l7_n663(x)
+ if (x < 1)
+ fun_l8_n924(x)
+ else
+ fun_l8_n606(x)
+ end
+end
+
+def fun_l7_n664(x)
+ if (x < 1)
+ fun_l8_n88(x)
+ else
+ fun_l8_n718(x)
+ end
+end
+
+def fun_l7_n665(x)
+ if (x < 1)
+ fun_l8_n611(x)
+ else
+ fun_l8_n898(x)
+ end
+end
+
+def fun_l7_n666(x)
+ if (x < 1)
+ fun_l8_n656(x)
+ else
+ fun_l8_n116(x)
+ end
+end
+
+def fun_l7_n667(x)
+ if (x < 1)
+ fun_l8_n196(x)
+ else
+ fun_l8_n688(x)
+ end
+end
+
+def fun_l7_n668(x)
+ if (x < 1)
+ fun_l8_n873(x)
+ else
+ fun_l8_n561(x)
+ end
+end
+
+def fun_l7_n669(x)
+ if (x < 1)
+ fun_l8_n947(x)
+ else
+ fun_l8_n64(x)
+ end
+end
+
+def fun_l7_n670(x)
+ if (x < 1)
+ fun_l8_n309(x)
+ else
+ fun_l8_n708(x)
+ end
+end
+
+def fun_l7_n671(x)
+ if (x < 1)
+ fun_l8_n699(x)
+ else
+ fun_l8_n218(x)
+ end
+end
+
+def fun_l7_n672(x)
+ if (x < 1)
+ fun_l8_n930(x)
+ else
+ fun_l8_n387(x)
+ end
+end
+
+def fun_l7_n673(x)
+ if (x < 1)
+ fun_l8_n598(x)
+ else
+ fun_l8_n245(x)
+ end
+end
+
+def fun_l7_n674(x)
+ if (x < 1)
+ fun_l8_n411(x)
+ else
+ fun_l8_n236(x)
+ end
+end
+
+def fun_l7_n675(x)
+ if (x < 1)
+ fun_l8_n193(x)
+ else
+ fun_l8_n61(x)
+ end
+end
+
+def fun_l7_n676(x)
+ if (x < 1)
+ fun_l8_n2(x)
+ else
+ fun_l8_n253(x)
+ end
+end
+
+def fun_l7_n677(x)
+ if (x < 1)
+ fun_l8_n839(x)
+ else
+ fun_l8_n919(x)
+ end
+end
+
+def fun_l7_n678(x)
+ if (x < 1)
+ fun_l8_n643(x)
+ else
+ fun_l8_n245(x)
+ end
+end
+
+def fun_l7_n679(x)
+ if (x < 1)
+ fun_l8_n625(x)
+ else
+ fun_l8_n690(x)
+ end
+end
+
+def fun_l7_n680(x)
+ if (x < 1)
+ fun_l8_n899(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n681(x)
+ if (x < 1)
+ fun_l8_n894(x)
+ else
+ fun_l8_n92(x)
+ end
+end
+
+def fun_l7_n682(x)
+ if (x < 1)
+ fun_l8_n139(x)
+ else
+ fun_l8_n252(x)
+ end
+end
+
+def fun_l7_n683(x)
+ if (x < 1)
+ fun_l8_n978(x)
+ else
+ fun_l8_n84(x)
+ end
+end
+
+def fun_l7_n684(x)
+ if (x < 1)
+ fun_l8_n426(x)
+ else
+ fun_l8_n329(x)
+ end
+end
+
+def fun_l7_n685(x)
+ if (x < 1)
+ fun_l8_n241(x)
+ else
+ fun_l8_n780(x)
+ end
+end
+
+def fun_l7_n686(x)
+ if (x < 1)
+ fun_l8_n793(x)
+ else
+ fun_l8_n534(x)
+ end
+end
+
+def fun_l7_n687(x)
+ if (x < 1)
+ fun_l8_n409(x)
+ else
+ fun_l8_n152(x)
+ end
+end
+
+def fun_l7_n688(x)
+ if (x < 1)
+ fun_l8_n838(x)
+ else
+ fun_l8_n555(x)
+ end
+end
+
+def fun_l7_n689(x)
+ if (x < 1)
+ fun_l8_n634(x)
+ else
+ fun_l8_n27(x)
+ end
+end
+
+def fun_l7_n690(x)
+ if (x < 1)
+ fun_l8_n629(x)
+ else
+ fun_l8_n448(x)
+ end
+end
+
+def fun_l7_n691(x)
+ if (x < 1)
+ fun_l8_n487(x)
+ else
+ fun_l8_n293(x)
+ end
+end
+
+def fun_l7_n692(x)
+ if (x < 1)
+ fun_l8_n739(x)
+ else
+ fun_l8_n472(x)
+ end
+end
+
+def fun_l7_n693(x)
+ if (x < 1)
+ fun_l8_n619(x)
+ else
+ fun_l8_n642(x)
+ end
+end
+
+def fun_l7_n694(x)
+ if (x < 1)
+ fun_l8_n123(x)
+ else
+ fun_l8_n880(x)
+ end
+end
+
+def fun_l7_n695(x)
+ if (x < 1)
+ fun_l8_n695(x)
+ else
+ fun_l8_n364(x)
+ end
+end
+
+def fun_l7_n696(x)
+ if (x < 1)
+ fun_l8_n610(x)
+ else
+ fun_l8_n798(x)
+ end
+end
+
+def fun_l7_n697(x)
+ if (x < 1)
+ fun_l8_n396(x)
+ else
+ fun_l8_n704(x)
+ end
+end
+
+def fun_l7_n698(x)
+ if (x < 1)
+ fun_l8_n759(x)
+ else
+ fun_l8_n880(x)
+ end
+end
+
+def fun_l7_n699(x)
+ if (x < 1)
+ fun_l8_n885(x)
+ else
+ fun_l8_n139(x)
+ end
+end
+
+def fun_l7_n700(x)
+ if (x < 1)
+ fun_l8_n244(x)
+ else
+ fun_l8_n307(x)
+ end
+end
+
+def fun_l7_n701(x)
+ if (x < 1)
+ fun_l8_n698(x)
+ else
+ fun_l8_n949(x)
+ end
+end
+
+def fun_l7_n702(x)
+ if (x < 1)
+ fun_l8_n585(x)
+ else
+ fun_l8_n211(x)
+ end
+end
+
+def fun_l7_n703(x)
+ if (x < 1)
+ fun_l8_n834(x)
+ else
+ fun_l8_n111(x)
+ end
+end
+
+def fun_l7_n704(x)
+ if (x < 1)
+ fun_l8_n690(x)
+ else
+ fun_l8_n981(x)
+ end
+end
+
+def fun_l7_n705(x)
+ if (x < 1)
+ fun_l8_n377(x)
+ else
+ fun_l8_n392(x)
+ end
+end
+
+def fun_l7_n706(x)
+ if (x < 1)
+ fun_l8_n988(x)
+ else
+ fun_l8_n759(x)
+ end
+end
+
+def fun_l7_n707(x)
+ if (x < 1)
+ fun_l8_n917(x)
+ else
+ fun_l8_n326(x)
+ end
+end
+
+def fun_l7_n708(x)
+ if (x < 1)
+ fun_l8_n662(x)
+ else
+ fun_l8_n488(x)
+ end
+end
+
+def fun_l7_n709(x)
+ if (x < 1)
+ fun_l8_n530(x)
+ else
+ fun_l8_n663(x)
+ end
+end
+
+def fun_l7_n710(x)
+ if (x < 1)
+ fun_l8_n344(x)
+ else
+ fun_l8_n282(x)
+ end
+end
+
+def fun_l7_n711(x)
+ if (x < 1)
+ fun_l8_n908(x)
+ else
+ fun_l8_n405(x)
+ end
+end
+
+def fun_l7_n712(x)
+ if (x < 1)
+ fun_l8_n332(x)
+ else
+ fun_l8_n660(x)
+ end
+end
+
+def fun_l7_n713(x)
+ if (x < 1)
+ fun_l8_n37(x)
+ else
+ fun_l8_n689(x)
+ end
+end
+
+def fun_l7_n714(x)
+ if (x < 1)
+ fun_l8_n642(x)
+ else
+ fun_l8_n996(x)
+ end
+end
+
+def fun_l7_n715(x)
+ if (x < 1)
+ fun_l8_n322(x)
+ else
+ fun_l8_n609(x)
+ end
+end
+
+def fun_l7_n716(x)
+ if (x < 1)
+ fun_l8_n567(x)
+ else
+ fun_l8_n492(x)
+ end
+end
+
+def fun_l7_n717(x)
+ if (x < 1)
+ fun_l8_n934(x)
+ else
+ fun_l8_n353(x)
+ end
+end
+
+def fun_l7_n718(x)
+ if (x < 1)
+ fun_l8_n572(x)
+ else
+ fun_l8_n859(x)
+ end
+end
+
+def fun_l7_n719(x)
+ if (x < 1)
+ fun_l8_n777(x)
+ else
+ fun_l8_n810(x)
+ end
+end
+
+def fun_l7_n720(x)
+ if (x < 1)
+ fun_l8_n121(x)
+ else
+ fun_l8_n847(x)
+ end
+end
+
+def fun_l7_n721(x)
+ if (x < 1)
+ fun_l8_n177(x)
+ else
+ fun_l8_n484(x)
+ end
+end
+
+def fun_l7_n722(x)
+ if (x < 1)
+ fun_l8_n73(x)
+ else
+ fun_l8_n795(x)
+ end
+end
+
+def fun_l7_n723(x)
+ if (x < 1)
+ fun_l8_n950(x)
+ else
+ fun_l8_n382(x)
+ end
+end
+
+def fun_l7_n724(x)
+ if (x < 1)
+ fun_l8_n349(x)
+ else
+ fun_l8_n644(x)
+ end
+end
+
+def fun_l7_n725(x)
+ if (x < 1)
+ fun_l8_n480(x)
+ else
+ fun_l8_n262(x)
+ end
+end
+
+def fun_l7_n726(x)
+ if (x < 1)
+ fun_l8_n39(x)
+ else
+ fun_l8_n543(x)
+ end
+end
+
+def fun_l7_n727(x)
+ if (x < 1)
+ fun_l8_n934(x)
+ else
+ fun_l8_n440(x)
+ end
+end
+
+def fun_l7_n728(x)
+ if (x < 1)
+ fun_l8_n312(x)
+ else
+ fun_l8_n341(x)
+ end
+end
+
+def fun_l7_n729(x)
+ if (x < 1)
+ fun_l8_n284(x)
+ else
+ fun_l8_n884(x)
+ end
+end
+
+def fun_l7_n730(x)
+ if (x < 1)
+ fun_l8_n841(x)
+ else
+ fun_l8_n221(x)
+ end
+end
+
+def fun_l7_n731(x)
+ if (x < 1)
+ fun_l8_n719(x)
+ else
+ fun_l8_n907(x)
+ end
+end
+
+def fun_l7_n732(x)
+ if (x < 1)
+ fun_l8_n422(x)
+ else
+ fun_l8_n65(x)
+ end
+end
+
+def fun_l7_n733(x)
+ if (x < 1)
+ fun_l8_n324(x)
+ else
+ fun_l8_n811(x)
+ end
+end
+
+def fun_l7_n734(x)
+ if (x < 1)
+ fun_l8_n643(x)
+ else
+ fun_l8_n622(x)
+ end
+end
+
+def fun_l7_n735(x)
+ if (x < 1)
+ fun_l8_n20(x)
+ else
+ fun_l8_n205(x)
+ end
+end
+
+def fun_l7_n736(x)
+ if (x < 1)
+ fun_l8_n487(x)
+ else
+ fun_l8_n908(x)
+ end
+end
+
+def fun_l7_n737(x)
+ if (x < 1)
+ fun_l8_n576(x)
+ else
+ fun_l8_n789(x)
+ end
+end
+
+def fun_l7_n738(x)
+ if (x < 1)
+ fun_l8_n353(x)
+ else
+ fun_l8_n286(x)
+ end
+end
+
+def fun_l7_n739(x)
+ if (x < 1)
+ fun_l8_n614(x)
+ else
+ fun_l8_n121(x)
+ end
+end
+
+def fun_l7_n740(x)
+ if (x < 1)
+ fun_l8_n79(x)
+ else
+ fun_l8_n637(x)
+ end
+end
+
+def fun_l7_n741(x)
+ if (x < 1)
+ fun_l8_n808(x)
+ else
+ fun_l8_n461(x)
+ end
+end
+
+def fun_l7_n742(x)
+ if (x < 1)
+ fun_l8_n590(x)
+ else
+ fun_l8_n198(x)
+ end
+end
+
+def fun_l7_n743(x)
+ if (x < 1)
+ fun_l8_n498(x)
+ else
+ fun_l8_n379(x)
+ end
+end
+
+def fun_l7_n744(x)
+ if (x < 1)
+ fun_l8_n599(x)
+ else
+ fun_l8_n359(x)
+ end
+end
+
+def fun_l7_n745(x)
+ if (x < 1)
+ fun_l8_n898(x)
+ else
+ fun_l8_n520(x)
+ end
+end
+
+def fun_l7_n746(x)
+ if (x < 1)
+ fun_l8_n835(x)
+ else
+ fun_l8_n131(x)
+ end
+end
+
+def fun_l7_n747(x)
+ if (x < 1)
+ fun_l8_n648(x)
+ else
+ fun_l8_n248(x)
+ end
+end
+
+def fun_l7_n748(x)
+ if (x < 1)
+ fun_l8_n451(x)
+ else
+ fun_l8_n352(x)
+ end
+end
+
+def fun_l7_n749(x)
+ if (x < 1)
+ fun_l8_n69(x)
+ else
+ fun_l8_n974(x)
+ end
+end
+
+def fun_l7_n750(x)
+ if (x < 1)
+ fun_l8_n108(x)
+ else
+ fun_l8_n744(x)
+ end
+end
+
+def fun_l7_n751(x)
+ if (x < 1)
+ fun_l8_n171(x)
+ else
+ fun_l8_n305(x)
+ end
+end
+
+def fun_l7_n752(x)
+ if (x < 1)
+ fun_l8_n180(x)
+ else
+ fun_l8_n293(x)
+ end
+end
+
+def fun_l7_n753(x)
+ if (x < 1)
+ fun_l8_n555(x)
+ else
+ fun_l8_n882(x)
+ end
+end
+
+def fun_l7_n754(x)
+ if (x < 1)
+ fun_l8_n756(x)
+ else
+ fun_l8_n604(x)
+ end
+end
+
+def fun_l7_n755(x)
+ if (x < 1)
+ fun_l8_n782(x)
+ else
+ fun_l8_n708(x)
+ end
+end
+
+def fun_l7_n756(x)
+ if (x < 1)
+ fun_l8_n65(x)
+ else
+ fun_l8_n474(x)
+ end
+end
+
+def fun_l7_n757(x)
+ if (x < 1)
+ fun_l8_n43(x)
+ else
+ fun_l8_n892(x)
+ end
+end
+
+def fun_l7_n758(x)
+ if (x < 1)
+ fun_l8_n90(x)
+ else
+ fun_l8_n968(x)
+ end
+end
+
+def fun_l7_n759(x)
+ if (x < 1)
+ fun_l8_n599(x)
+ else
+ fun_l8_n505(x)
+ end
+end
+
+def fun_l7_n760(x)
+ if (x < 1)
+ fun_l8_n344(x)
+ else
+ fun_l8_n122(x)
+ end
+end
+
+def fun_l7_n761(x)
+ if (x < 1)
+ fun_l8_n289(x)
+ else
+ fun_l8_n867(x)
+ end
+end
+
+def fun_l7_n762(x)
+ if (x < 1)
+ fun_l8_n107(x)
+ else
+ fun_l8_n950(x)
+ end
+end
+
+def fun_l7_n763(x)
+ if (x < 1)
+ fun_l8_n405(x)
+ else
+ fun_l8_n178(x)
+ end
+end
+
+def fun_l7_n764(x)
+ if (x < 1)
+ fun_l8_n91(x)
+ else
+ fun_l8_n760(x)
+ end
+end
+
+def fun_l7_n765(x)
+ if (x < 1)
+ fun_l8_n268(x)
+ else
+ fun_l8_n451(x)
+ end
+end
+
+def fun_l7_n766(x)
+ if (x < 1)
+ fun_l8_n693(x)
+ else
+ fun_l8_n150(x)
+ end
+end
+
+def fun_l7_n767(x)
+ if (x < 1)
+ fun_l8_n622(x)
+ else
+ fun_l8_n114(x)
+ end
+end
+
+def fun_l7_n768(x)
+ if (x < 1)
+ fun_l8_n662(x)
+ else
+ fun_l8_n514(x)
+ end
+end
+
+def fun_l7_n769(x)
+ if (x < 1)
+ fun_l8_n440(x)
+ else
+ fun_l8_n537(x)
+ end
+end
+
+def fun_l7_n770(x)
+ if (x < 1)
+ fun_l8_n207(x)
+ else
+ fun_l8_n513(x)
+ end
+end
+
+def fun_l7_n771(x)
+ if (x < 1)
+ fun_l8_n394(x)
+ else
+ fun_l8_n857(x)
+ end
+end
+
+def fun_l7_n772(x)
+ if (x < 1)
+ fun_l8_n635(x)
+ else
+ fun_l8_n696(x)
+ end
+end
+
+def fun_l7_n773(x)
+ if (x < 1)
+ fun_l8_n687(x)
+ else
+ fun_l8_n926(x)
+ end
+end
+
+def fun_l7_n774(x)
+ if (x < 1)
+ fun_l8_n54(x)
+ else
+ fun_l8_n410(x)
+ end
+end
+
+def fun_l7_n775(x)
+ if (x < 1)
+ fun_l8_n825(x)
+ else
+ fun_l8_n339(x)
+ end
+end
+
+def fun_l7_n776(x)
+ if (x < 1)
+ fun_l8_n130(x)
+ else
+ fun_l8_n48(x)
+ end
+end
+
+def fun_l7_n777(x)
+ if (x < 1)
+ fun_l8_n627(x)
+ else
+ fun_l8_n191(x)
+ end
+end
+
+def fun_l7_n778(x)
+ if (x < 1)
+ fun_l8_n843(x)
+ else
+ fun_l8_n627(x)
+ end
+end
+
+def fun_l7_n779(x)
+ if (x < 1)
+ fun_l8_n950(x)
+ else
+ fun_l8_n247(x)
+ end
+end
+
+def fun_l7_n780(x)
+ if (x < 1)
+ fun_l8_n865(x)
+ else
+ fun_l8_n540(x)
+ end
+end
+
+def fun_l7_n781(x)
+ if (x < 1)
+ fun_l8_n440(x)
+ else
+ fun_l8_n326(x)
+ end
+end
+
+def fun_l7_n782(x)
+ if (x < 1)
+ fun_l8_n463(x)
+ else
+ fun_l8_n808(x)
+ end
+end
+
+def fun_l7_n783(x)
+ if (x < 1)
+ fun_l8_n44(x)
+ else
+ fun_l8_n888(x)
+ end
+end
+
+def fun_l7_n784(x)
+ if (x < 1)
+ fun_l8_n690(x)
+ else
+ fun_l8_n673(x)
+ end
+end
+
+def fun_l7_n785(x)
+ if (x < 1)
+ fun_l8_n641(x)
+ else
+ fun_l8_n367(x)
+ end
+end
+
+def fun_l7_n786(x)
+ if (x < 1)
+ fun_l8_n193(x)
+ else
+ fun_l8_n764(x)
+ end
+end
+
+def fun_l7_n787(x)
+ if (x < 1)
+ fun_l8_n604(x)
+ else
+ fun_l8_n527(x)
+ end
+end
+
+def fun_l7_n788(x)
+ if (x < 1)
+ fun_l8_n626(x)
+ else
+ fun_l8_n101(x)
+ end
+end
+
+def fun_l7_n789(x)
+ if (x < 1)
+ fun_l8_n152(x)
+ else
+ fun_l8_n9(x)
+ end
+end
+
+def fun_l7_n790(x)
+ if (x < 1)
+ fun_l8_n541(x)
+ else
+ fun_l8_n789(x)
+ end
+end
+
+def fun_l7_n791(x)
+ if (x < 1)
+ fun_l8_n706(x)
+ else
+ fun_l8_n577(x)
+ end
+end
+
+def fun_l7_n792(x)
+ if (x < 1)
+ fun_l8_n480(x)
+ else
+ fun_l8_n284(x)
+ end
+end
+
+def fun_l7_n793(x)
+ if (x < 1)
+ fun_l8_n157(x)
+ else
+ fun_l8_n620(x)
+ end
+end
+
+def fun_l7_n794(x)
+ if (x < 1)
+ fun_l8_n666(x)
+ else
+ fun_l8_n755(x)
+ end
+end
+
+def fun_l7_n795(x)
+ if (x < 1)
+ fun_l8_n487(x)
+ else
+ fun_l8_n20(x)
+ end
+end
+
+def fun_l7_n796(x)
+ if (x < 1)
+ fun_l8_n750(x)
+ else
+ fun_l8_n974(x)
+ end
+end
+
+def fun_l7_n797(x)
+ if (x < 1)
+ fun_l8_n812(x)
+ else
+ fun_l8_n915(x)
+ end
+end
+
+def fun_l7_n798(x)
+ if (x < 1)
+ fun_l8_n297(x)
+ else
+ fun_l8_n8(x)
+ end
+end
+
+def fun_l7_n799(x)
+ if (x < 1)
+ fun_l8_n385(x)
+ else
+ fun_l8_n920(x)
+ end
+end
+
+def fun_l7_n800(x)
+ if (x < 1)
+ fun_l8_n322(x)
+ else
+ fun_l8_n603(x)
+ end
+end
+
+def fun_l7_n801(x)
+ if (x < 1)
+ fun_l8_n825(x)
+ else
+ fun_l8_n702(x)
+ end
+end
+
+def fun_l7_n802(x)
+ if (x < 1)
+ fun_l8_n902(x)
+ else
+ fun_l8_n978(x)
+ end
+end
+
+def fun_l7_n803(x)
+ if (x < 1)
+ fun_l8_n921(x)
+ else
+ fun_l8_n61(x)
+ end
+end
+
+def fun_l7_n804(x)
+ if (x < 1)
+ fun_l8_n171(x)
+ else
+ fun_l8_n630(x)
+ end
+end
+
+def fun_l7_n805(x)
+ if (x < 1)
+ fun_l8_n469(x)
+ else
+ fun_l8_n265(x)
+ end
+end
+
+def fun_l7_n806(x)
+ if (x < 1)
+ fun_l8_n367(x)
+ else
+ fun_l8_n820(x)
+ end
+end
+
+def fun_l7_n807(x)
+ if (x < 1)
+ fun_l8_n242(x)
+ else
+ fun_l8_n707(x)
+ end
+end
+
+def fun_l7_n808(x)
+ if (x < 1)
+ fun_l8_n512(x)
+ else
+ fun_l8_n139(x)
+ end
+end
+
+def fun_l7_n809(x)
+ if (x < 1)
+ fun_l8_n17(x)
+ else
+ fun_l8_n615(x)
+ end
+end
+
+def fun_l7_n810(x)
+ if (x < 1)
+ fun_l8_n600(x)
+ else
+ fun_l8_n6(x)
+ end
+end
+
+def fun_l7_n811(x)
+ if (x < 1)
+ fun_l8_n342(x)
+ else
+ fun_l8_n194(x)
+ end
+end
+
+def fun_l7_n812(x)
+ if (x < 1)
+ fun_l8_n191(x)
+ else
+ fun_l8_n864(x)
+ end
+end
+
+def fun_l7_n813(x)
+ if (x < 1)
+ fun_l8_n577(x)
+ else
+ fun_l8_n113(x)
+ end
+end
+
+def fun_l7_n814(x)
+ if (x < 1)
+ fun_l8_n729(x)
+ else
+ fun_l8_n989(x)
+ end
+end
+
+def fun_l7_n815(x)
+ if (x < 1)
+ fun_l8_n707(x)
+ else
+ fun_l8_n846(x)
+ end
+end
+
+def fun_l7_n816(x)
+ if (x < 1)
+ fun_l8_n874(x)
+ else
+ fun_l8_n790(x)
+ end
+end
+
+def fun_l7_n817(x)
+ if (x < 1)
+ fun_l8_n968(x)
+ else
+ fun_l8_n215(x)
+ end
+end
+
+def fun_l7_n818(x)
+ if (x < 1)
+ fun_l8_n444(x)
+ else
+ fun_l8_n182(x)
+ end
+end
+
+def fun_l7_n819(x)
+ if (x < 1)
+ fun_l8_n103(x)
+ else
+ fun_l8_n134(x)
+ end
+end
+
+def fun_l7_n820(x)
+ if (x < 1)
+ fun_l8_n718(x)
+ else
+ fun_l8_n950(x)
+ end
+end
+
+def fun_l7_n821(x)
+ if (x < 1)
+ fun_l8_n439(x)
+ else
+ fun_l8_n68(x)
+ end
+end
+
+def fun_l7_n822(x)
+ if (x < 1)
+ fun_l8_n961(x)
+ else
+ fun_l8_n593(x)
+ end
+end
+
+def fun_l7_n823(x)
+ if (x < 1)
+ fun_l8_n212(x)
+ else
+ fun_l8_n346(x)
+ end
+end
+
+def fun_l7_n824(x)
+ if (x < 1)
+ fun_l8_n926(x)
+ else
+ fun_l8_n225(x)
+ end
+end
+
+def fun_l7_n825(x)
+ if (x < 1)
+ fun_l8_n880(x)
+ else
+ fun_l8_n527(x)
+ end
+end
+
+def fun_l7_n826(x)
+ if (x < 1)
+ fun_l8_n13(x)
+ else
+ fun_l8_n436(x)
+ end
+end
+
+def fun_l7_n827(x)
+ if (x < 1)
+ fun_l8_n19(x)
+ else
+ fun_l8_n201(x)
+ end
+end
+
+def fun_l7_n828(x)
+ if (x < 1)
+ fun_l8_n568(x)
+ else
+ fun_l8_n450(x)
+ end
+end
+
+def fun_l7_n829(x)
+ if (x < 1)
+ fun_l8_n543(x)
+ else
+ fun_l8_n606(x)
+ end
+end
+
+def fun_l7_n830(x)
+ if (x < 1)
+ fun_l8_n503(x)
+ else
+ fun_l8_n104(x)
+ end
+end
+
+def fun_l7_n831(x)
+ if (x < 1)
+ fun_l8_n185(x)
+ else
+ fun_l8_n1(x)
+ end
+end
+
+def fun_l7_n832(x)
+ if (x < 1)
+ fun_l8_n598(x)
+ else
+ fun_l8_n637(x)
+ end
+end
+
+def fun_l7_n833(x)
+ if (x < 1)
+ fun_l8_n936(x)
+ else
+ fun_l8_n554(x)
+ end
+end
+
+def fun_l7_n834(x)
+ if (x < 1)
+ fun_l8_n864(x)
+ else
+ fun_l8_n766(x)
+ end
+end
+
+def fun_l7_n835(x)
+ if (x < 1)
+ fun_l8_n11(x)
+ else
+ fun_l8_n472(x)
+ end
+end
+
+def fun_l7_n836(x)
+ if (x < 1)
+ fun_l8_n596(x)
+ else
+ fun_l8_n429(x)
+ end
+end
+
+def fun_l7_n837(x)
+ if (x < 1)
+ fun_l8_n643(x)
+ else
+ fun_l8_n61(x)
+ end
+end
+
+def fun_l7_n838(x)
+ if (x < 1)
+ fun_l8_n905(x)
+ else
+ fun_l8_n605(x)
+ end
+end
+
+def fun_l7_n839(x)
+ if (x < 1)
+ fun_l8_n371(x)
+ else
+ fun_l8_n44(x)
+ end
+end
+
+def fun_l7_n840(x)
+ if (x < 1)
+ fun_l8_n195(x)
+ else
+ fun_l8_n368(x)
+ end
+end
+
+def fun_l7_n841(x)
+ if (x < 1)
+ fun_l8_n432(x)
+ else
+ fun_l8_n368(x)
+ end
+end
+
+def fun_l7_n842(x)
+ if (x < 1)
+ fun_l8_n145(x)
+ else
+ fun_l8_n180(x)
+ end
+end
+
+def fun_l7_n843(x)
+ if (x < 1)
+ fun_l8_n124(x)
+ else
+ fun_l8_n358(x)
+ end
+end
+
+def fun_l7_n844(x)
+ if (x < 1)
+ fun_l8_n87(x)
+ else
+ fun_l8_n364(x)
+ end
+end
+
+def fun_l7_n845(x)
+ if (x < 1)
+ fun_l8_n133(x)
+ else
+ fun_l8_n849(x)
+ end
+end
+
+def fun_l7_n846(x)
+ if (x < 1)
+ fun_l8_n686(x)
+ else
+ fun_l8_n556(x)
+ end
+end
+
+def fun_l7_n847(x)
+ if (x < 1)
+ fun_l8_n732(x)
+ else
+ fun_l8_n536(x)
+ end
+end
+
+def fun_l7_n848(x)
+ if (x < 1)
+ fun_l8_n950(x)
+ else
+ fun_l8_n173(x)
+ end
+end
+
+def fun_l7_n849(x)
+ if (x < 1)
+ fun_l8_n694(x)
+ else
+ fun_l8_n747(x)
+ end
+end
+
+def fun_l7_n850(x)
+ if (x < 1)
+ fun_l8_n421(x)
+ else
+ fun_l8_n940(x)
+ end
+end
+
+def fun_l7_n851(x)
+ if (x < 1)
+ fun_l8_n359(x)
+ else
+ fun_l8_n239(x)
+ end
+end
+
+def fun_l7_n852(x)
+ if (x < 1)
+ fun_l8_n731(x)
+ else
+ fun_l8_n530(x)
+ end
+end
+
+def fun_l7_n853(x)
+ if (x < 1)
+ fun_l8_n887(x)
+ else
+ fun_l8_n548(x)
+ end
+end
+
+def fun_l7_n854(x)
+ if (x < 1)
+ fun_l8_n47(x)
+ else
+ fun_l8_n675(x)
+ end
+end
+
+def fun_l7_n855(x)
+ if (x < 1)
+ fun_l8_n534(x)
+ else
+ fun_l8_n34(x)
+ end
+end
+
+def fun_l7_n856(x)
+ if (x < 1)
+ fun_l8_n935(x)
+ else
+ fun_l8_n402(x)
+ end
+end
+
+def fun_l7_n857(x)
+ if (x < 1)
+ fun_l8_n873(x)
+ else
+ fun_l8_n864(x)
+ end
+end
+
+def fun_l7_n858(x)
+ if (x < 1)
+ fun_l8_n325(x)
+ else
+ fun_l8_n495(x)
+ end
+end
+
+def fun_l7_n859(x)
+ if (x < 1)
+ fun_l8_n758(x)
+ else
+ fun_l8_n63(x)
+ end
+end
+
+def fun_l7_n860(x)
+ if (x < 1)
+ fun_l8_n811(x)
+ else
+ fun_l8_n150(x)
+ end
+end
+
+def fun_l7_n861(x)
+ if (x < 1)
+ fun_l8_n666(x)
+ else
+ fun_l8_n282(x)
+ end
+end
+
+def fun_l7_n862(x)
+ if (x < 1)
+ fun_l8_n123(x)
+ else
+ fun_l8_n893(x)
+ end
+end
+
+def fun_l7_n863(x)
+ if (x < 1)
+ fun_l8_n681(x)
+ else
+ fun_l8_n640(x)
+ end
+end
+
+def fun_l7_n864(x)
+ if (x < 1)
+ fun_l8_n861(x)
+ else
+ fun_l8_n922(x)
+ end
+end
+
+def fun_l7_n865(x)
+ if (x < 1)
+ fun_l8_n8(x)
+ else
+ fun_l8_n14(x)
+ end
+end
+
+def fun_l7_n866(x)
+ if (x < 1)
+ fun_l8_n713(x)
+ else
+ fun_l8_n802(x)
+ end
+end
+
+def fun_l7_n867(x)
+ if (x < 1)
+ fun_l8_n654(x)
+ else
+ fun_l8_n540(x)
+ end
+end
+
+def fun_l7_n868(x)
+ if (x < 1)
+ fun_l8_n308(x)
+ else
+ fun_l8_n504(x)
+ end
+end
+
+def fun_l7_n869(x)
+ if (x < 1)
+ fun_l8_n67(x)
+ else
+ fun_l8_n592(x)
+ end
+end
+
+def fun_l7_n870(x)
+ if (x < 1)
+ fun_l8_n295(x)
+ else
+ fun_l8_n585(x)
+ end
+end
+
+def fun_l7_n871(x)
+ if (x < 1)
+ fun_l8_n121(x)
+ else
+ fun_l8_n797(x)
+ end
+end
+
+def fun_l7_n872(x)
+ if (x < 1)
+ fun_l8_n234(x)
+ else
+ fun_l8_n834(x)
+ end
+end
+
+def fun_l7_n873(x)
+ if (x < 1)
+ fun_l8_n287(x)
+ else
+ fun_l8_n731(x)
+ end
+end
+
+def fun_l7_n874(x)
+ if (x < 1)
+ fun_l8_n460(x)
+ else
+ fun_l8_n261(x)
+ end
+end
+
+def fun_l7_n875(x)
+ if (x < 1)
+ fun_l8_n211(x)
+ else
+ fun_l8_n199(x)
+ end
+end
+
+def fun_l7_n876(x)
+ if (x < 1)
+ fun_l8_n256(x)
+ else
+ fun_l8_n547(x)
+ end
+end
+
+def fun_l7_n877(x)
+ if (x < 1)
+ fun_l8_n560(x)
+ else
+ fun_l8_n202(x)
+ end
+end
+
+def fun_l7_n878(x)
+ if (x < 1)
+ fun_l8_n5(x)
+ else
+ fun_l8_n955(x)
+ end
+end
+
+def fun_l7_n879(x)
+ if (x < 1)
+ fun_l8_n908(x)
+ else
+ fun_l8_n677(x)
+ end
+end
+
+def fun_l7_n880(x)
+ if (x < 1)
+ fun_l8_n366(x)
+ else
+ fun_l8_n226(x)
+ end
+end
+
+def fun_l7_n881(x)
+ if (x < 1)
+ fun_l8_n970(x)
+ else
+ fun_l8_n939(x)
+ end
+end
+
+def fun_l7_n882(x)
+ if (x < 1)
+ fun_l8_n562(x)
+ else
+ fun_l8_n420(x)
+ end
+end
+
+def fun_l7_n883(x)
+ if (x < 1)
+ fun_l8_n377(x)
+ else
+ fun_l8_n35(x)
+ end
+end
+
+def fun_l7_n884(x)
+ if (x < 1)
+ fun_l8_n459(x)
+ else
+ fun_l8_n155(x)
+ end
+end
+
+def fun_l7_n885(x)
+ if (x < 1)
+ fun_l8_n257(x)
+ else
+ fun_l8_n704(x)
+ end
+end
+
+def fun_l7_n886(x)
+ if (x < 1)
+ fun_l8_n393(x)
+ else
+ fun_l8_n741(x)
+ end
+end
+
+def fun_l7_n887(x)
+ if (x < 1)
+ fun_l8_n333(x)
+ else
+ fun_l8_n225(x)
+ end
+end
+
+def fun_l7_n888(x)
+ if (x < 1)
+ fun_l8_n614(x)
+ else
+ fun_l8_n106(x)
+ end
+end
+
+def fun_l7_n889(x)
+ if (x < 1)
+ fun_l8_n229(x)
+ else
+ fun_l8_n519(x)
+ end
+end
+
+def fun_l7_n890(x)
+ if (x < 1)
+ fun_l8_n651(x)
+ else
+ fun_l8_n68(x)
+ end
+end
+
+def fun_l7_n891(x)
+ if (x < 1)
+ fun_l8_n987(x)
+ else
+ fun_l8_n905(x)
+ end
+end
+
+def fun_l7_n892(x)
+ if (x < 1)
+ fun_l8_n698(x)
+ else
+ fun_l8_n942(x)
+ end
+end
+
+def fun_l7_n893(x)
+ if (x < 1)
+ fun_l8_n559(x)
+ else
+ fun_l8_n613(x)
+ end
+end
+
+def fun_l7_n894(x)
+ if (x < 1)
+ fun_l8_n402(x)
+ else
+ fun_l8_n966(x)
+ end
+end
+
+def fun_l7_n895(x)
+ if (x < 1)
+ fun_l8_n475(x)
+ else
+ fun_l8_n158(x)
+ end
+end
+
+def fun_l7_n896(x)
+ if (x < 1)
+ fun_l8_n420(x)
+ else
+ fun_l8_n113(x)
+ end
+end
+
+def fun_l7_n897(x)
+ if (x < 1)
+ fun_l8_n366(x)
+ else
+ fun_l8_n272(x)
+ end
+end
+
+def fun_l7_n898(x)
+ if (x < 1)
+ fun_l8_n252(x)
+ else
+ fun_l8_n821(x)
+ end
+end
+
+def fun_l7_n899(x)
+ if (x < 1)
+ fun_l8_n736(x)
+ else
+ fun_l8_n174(x)
+ end
+end
+
+def fun_l7_n900(x)
+ if (x < 1)
+ fun_l8_n151(x)
+ else
+ fun_l8_n611(x)
+ end
+end
+
+def fun_l7_n901(x)
+ if (x < 1)
+ fun_l8_n3(x)
+ else
+ fun_l8_n221(x)
+ end
+end
+
+def fun_l7_n902(x)
+ if (x < 1)
+ fun_l8_n319(x)
+ else
+ fun_l8_n930(x)
+ end
+end
+
+def fun_l7_n903(x)
+ if (x < 1)
+ fun_l8_n619(x)
+ else
+ fun_l8_n491(x)
+ end
+end
+
+def fun_l7_n904(x)
+ if (x < 1)
+ fun_l8_n144(x)
+ else
+ fun_l8_n304(x)
+ end
+end
+
+def fun_l7_n905(x)
+ if (x < 1)
+ fun_l8_n721(x)
+ else
+ fun_l8_n996(x)
+ end
+end
+
+def fun_l7_n906(x)
+ if (x < 1)
+ fun_l8_n700(x)
+ else
+ fun_l8_n688(x)
+ end
+end
+
+def fun_l7_n907(x)
+ if (x < 1)
+ fun_l8_n202(x)
+ else
+ fun_l8_n668(x)
+ end
+end
+
+def fun_l7_n908(x)
+ if (x < 1)
+ fun_l8_n514(x)
+ else
+ fun_l8_n306(x)
+ end
+end
+
+def fun_l7_n909(x)
+ if (x < 1)
+ fun_l8_n592(x)
+ else
+ fun_l8_n43(x)
+ end
+end
+
+def fun_l7_n910(x)
+ if (x < 1)
+ fun_l8_n743(x)
+ else
+ fun_l8_n406(x)
+ end
+end
+
+def fun_l7_n911(x)
+ if (x < 1)
+ fun_l8_n801(x)
+ else
+ fun_l8_n91(x)
+ end
+end
+
+def fun_l7_n912(x)
+ if (x < 1)
+ fun_l8_n392(x)
+ else
+ fun_l8_n461(x)
+ end
+end
+
+def fun_l7_n913(x)
+ if (x < 1)
+ fun_l8_n175(x)
+ else
+ fun_l8_n578(x)
+ end
+end
+
+def fun_l7_n914(x)
+ if (x < 1)
+ fun_l8_n155(x)
+ else
+ fun_l8_n795(x)
+ end
+end
+
+def fun_l7_n915(x)
+ if (x < 1)
+ fun_l8_n394(x)
+ else
+ fun_l8_n89(x)
+ end
+end
+
+def fun_l7_n916(x)
+ if (x < 1)
+ fun_l8_n59(x)
+ else
+ fun_l8_n345(x)
+ end
+end
+
+def fun_l7_n917(x)
+ if (x < 1)
+ fun_l8_n450(x)
+ else
+ fun_l8_n136(x)
+ end
+end
+
+def fun_l7_n918(x)
+ if (x < 1)
+ fun_l8_n530(x)
+ else
+ fun_l8_n233(x)
+ end
+end
+
+def fun_l7_n919(x)
+ if (x < 1)
+ fun_l8_n632(x)
+ else
+ fun_l8_n631(x)
+ end
+end
+
+def fun_l7_n920(x)
+ if (x < 1)
+ fun_l8_n252(x)
+ else
+ fun_l8_n95(x)
+ end
+end
+
+def fun_l7_n921(x)
+ if (x < 1)
+ fun_l8_n980(x)
+ else
+ fun_l8_n819(x)
+ end
+end
+
+def fun_l7_n922(x)
+ if (x < 1)
+ fun_l8_n866(x)
+ else
+ fun_l8_n652(x)
+ end
+end
+
+def fun_l7_n923(x)
+ if (x < 1)
+ fun_l8_n239(x)
+ else
+ fun_l8_n83(x)
+ end
+end
+
+def fun_l7_n924(x)
+ if (x < 1)
+ fun_l8_n162(x)
+ else
+ fun_l8_n193(x)
+ end
+end
+
+def fun_l7_n925(x)
+ if (x < 1)
+ fun_l8_n78(x)
+ else
+ fun_l8_n546(x)
+ end
+end
+
+def fun_l7_n926(x)
+ if (x < 1)
+ fun_l8_n102(x)
+ else
+ fun_l8_n847(x)
+ end
+end
+
+def fun_l7_n927(x)
+ if (x < 1)
+ fun_l8_n84(x)
+ else
+ fun_l8_n257(x)
+ end
+end
+
+def fun_l7_n928(x)
+ if (x < 1)
+ fun_l8_n195(x)
+ else
+ fun_l8_n200(x)
+ end
+end
+
+def fun_l7_n929(x)
+ if (x < 1)
+ fun_l8_n245(x)
+ else
+ fun_l8_n926(x)
+ end
+end
+
+def fun_l7_n930(x)
+ if (x < 1)
+ fun_l8_n651(x)
+ else
+ fun_l8_n308(x)
+ end
+end
+
+def fun_l7_n931(x)
+ if (x < 1)
+ fun_l8_n312(x)
+ else
+ fun_l8_n901(x)
+ end
+end
+
+def fun_l7_n932(x)
+ if (x < 1)
+ fun_l8_n221(x)
+ else
+ fun_l8_n775(x)
+ end
+end
+
+def fun_l7_n933(x)
+ if (x < 1)
+ fun_l8_n397(x)
+ else
+ fun_l8_n973(x)
+ end
+end
+
+def fun_l7_n934(x)
+ if (x < 1)
+ fun_l8_n788(x)
+ else
+ fun_l8_n952(x)
+ end
+end
+
+def fun_l7_n935(x)
+ if (x < 1)
+ fun_l8_n965(x)
+ else
+ fun_l8_n861(x)
+ end
+end
+
+def fun_l7_n936(x)
+ if (x < 1)
+ fun_l8_n969(x)
+ else
+ fun_l8_n773(x)
+ end
+end
+
+def fun_l7_n937(x)
+ if (x < 1)
+ fun_l8_n742(x)
+ else
+ fun_l8_n237(x)
+ end
+end
+
+def fun_l7_n938(x)
+ if (x < 1)
+ fun_l8_n369(x)
+ else
+ fun_l8_n444(x)
+ end
+end
+
+def fun_l7_n939(x)
+ if (x < 1)
+ fun_l8_n863(x)
+ else
+ fun_l8_n515(x)
+ end
+end
+
+def fun_l7_n940(x)
+ if (x < 1)
+ fun_l8_n573(x)
+ else
+ fun_l8_n356(x)
+ end
+end
+
+def fun_l7_n941(x)
+ if (x < 1)
+ fun_l8_n188(x)
+ else
+ fun_l8_n171(x)
+ end
+end
+
+def fun_l7_n942(x)
+ if (x < 1)
+ fun_l8_n483(x)
+ else
+ fun_l8_n556(x)
+ end
+end
+
+def fun_l7_n943(x)
+ if (x < 1)
+ fun_l8_n935(x)
+ else
+ fun_l8_n723(x)
+ end
+end
+
+def fun_l7_n944(x)
+ if (x < 1)
+ fun_l8_n451(x)
+ else
+ fun_l8_n227(x)
+ end
+end
+
+def fun_l7_n945(x)
+ if (x < 1)
+ fun_l8_n651(x)
+ else
+ fun_l8_n891(x)
+ end
+end
+
+def fun_l7_n946(x)
+ if (x < 1)
+ fun_l8_n225(x)
+ else
+ fun_l8_n178(x)
+ end
+end
+
+def fun_l7_n947(x)
+ if (x < 1)
+ fun_l8_n704(x)
+ else
+ fun_l8_n456(x)
+ end
+end
+
+def fun_l7_n948(x)
+ if (x < 1)
+ fun_l8_n995(x)
+ else
+ fun_l8_n816(x)
+ end
+end
+
+def fun_l7_n949(x)
+ if (x < 1)
+ fun_l8_n287(x)
+ else
+ fun_l8_n140(x)
+ end
+end
+
+def fun_l7_n950(x)
+ if (x < 1)
+ fun_l8_n302(x)
+ else
+ fun_l8_n582(x)
+ end
+end
+
+def fun_l7_n951(x)
+ if (x < 1)
+ fun_l8_n58(x)
+ else
+ fun_l8_n759(x)
+ end
+end
+
+def fun_l7_n952(x)
+ if (x < 1)
+ fun_l8_n54(x)
+ else
+ fun_l8_n812(x)
+ end
+end
+
+def fun_l7_n953(x)
+ if (x < 1)
+ fun_l8_n263(x)
+ else
+ fun_l8_n801(x)
+ end
+end
+
+def fun_l7_n954(x)
+ if (x < 1)
+ fun_l8_n507(x)
+ else
+ fun_l8_n781(x)
+ end
+end
+
+def fun_l7_n955(x)
+ if (x < 1)
+ fun_l8_n328(x)
+ else
+ fun_l8_n886(x)
+ end
+end
+
+def fun_l7_n956(x)
+ if (x < 1)
+ fun_l8_n653(x)
+ else
+ fun_l8_n847(x)
+ end
+end
+
+def fun_l7_n957(x)
+ if (x < 1)
+ fun_l8_n594(x)
+ else
+ fun_l8_n9(x)
+ end
+end
+
+def fun_l7_n958(x)
+ if (x < 1)
+ fun_l8_n818(x)
+ else
+ fun_l8_n912(x)
+ end
+end
+
+def fun_l7_n959(x)
+ if (x < 1)
+ fun_l8_n941(x)
+ else
+ fun_l8_n394(x)
+ end
+end
+
+def fun_l7_n960(x)
+ if (x < 1)
+ fun_l8_n151(x)
+ else
+ fun_l8_n426(x)
+ end
+end
+
+def fun_l7_n961(x)
+ if (x < 1)
+ fun_l8_n276(x)
+ else
+ fun_l8_n458(x)
+ end
+end
+
+def fun_l7_n962(x)
+ if (x < 1)
+ fun_l8_n310(x)
+ else
+ fun_l8_n472(x)
+ end
+end
+
+def fun_l7_n963(x)
+ if (x < 1)
+ fun_l8_n103(x)
+ else
+ fun_l8_n995(x)
+ end
+end
+
+def fun_l7_n964(x)
+ if (x < 1)
+ fun_l8_n808(x)
+ else
+ fun_l8_n41(x)
+ end
+end
+
+def fun_l7_n965(x)
+ if (x < 1)
+ fun_l8_n840(x)
+ else
+ fun_l8_n143(x)
+ end
+end
+
+def fun_l7_n966(x)
+ if (x < 1)
+ fun_l8_n855(x)
+ else
+ fun_l8_n38(x)
+ end
+end
+
+def fun_l7_n967(x)
+ if (x < 1)
+ fun_l8_n316(x)
+ else
+ fun_l8_n86(x)
+ end
+end
+
+def fun_l7_n968(x)
+ if (x < 1)
+ fun_l8_n856(x)
+ else
+ fun_l8_n182(x)
+ end
+end
+
+def fun_l7_n969(x)
+ if (x < 1)
+ fun_l8_n436(x)
+ else
+ fun_l8_n460(x)
+ end
+end
+
+def fun_l7_n970(x)
+ if (x < 1)
+ fun_l8_n187(x)
+ else
+ fun_l8_n90(x)
+ end
+end
+
+def fun_l7_n971(x)
+ if (x < 1)
+ fun_l8_n689(x)
+ else
+ fun_l8_n921(x)
+ end
+end
+
+def fun_l7_n972(x)
+ if (x < 1)
+ fun_l8_n207(x)
+ else
+ fun_l8_n79(x)
+ end
+end
+
+def fun_l7_n973(x)
+ if (x < 1)
+ fun_l8_n137(x)
+ else
+ fun_l8_n17(x)
+ end
+end
+
+def fun_l7_n974(x)
+ if (x < 1)
+ fun_l8_n813(x)
+ else
+ fun_l8_n944(x)
+ end
+end
+
+def fun_l7_n975(x)
+ if (x < 1)
+ fun_l8_n589(x)
+ else
+ fun_l8_n416(x)
+ end
+end
+
+def fun_l7_n976(x)
+ if (x < 1)
+ fun_l8_n763(x)
+ else
+ fun_l8_n289(x)
+ end
+end
+
+def fun_l7_n977(x)
+ if (x < 1)
+ fun_l8_n118(x)
+ else
+ fun_l8_n998(x)
+ end
+end
+
+def fun_l7_n978(x)
+ if (x < 1)
+ fun_l8_n382(x)
+ else
+ fun_l8_n216(x)
+ end
+end
+
+def fun_l7_n979(x)
+ if (x < 1)
+ fun_l8_n304(x)
+ else
+ fun_l8_n586(x)
+ end
+end
+
+def fun_l7_n980(x)
+ if (x < 1)
+ fun_l8_n693(x)
+ else
+ fun_l8_n118(x)
+ end
+end
+
+def fun_l7_n981(x)
+ if (x < 1)
+ fun_l8_n669(x)
+ else
+ fun_l8_n796(x)
+ end
+end
+
+def fun_l7_n982(x)
+ if (x < 1)
+ fun_l8_n187(x)
+ else
+ fun_l8_n143(x)
+ end
+end
+
+def fun_l7_n983(x)
+ if (x < 1)
+ fun_l8_n848(x)
+ else
+ fun_l8_n172(x)
+ end
+end
+
+def fun_l7_n984(x)
+ if (x < 1)
+ fun_l8_n782(x)
+ else
+ fun_l8_n670(x)
+ end
+end
+
+def fun_l7_n985(x)
+ if (x < 1)
+ fun_l8_n275(x)
+ else
+ fun_l8_n520(x)
+ end
+end
+
+def fun_l7_n986(x)
+ if (x < 1)
+ fun_l8_n841(x)
+ else
+ fun_l8_n446(x)
+ end
+end
+
+def fun_l7_n987(x)
+ if (x < 1)
+ fun_l8_n712(x)
+ else
+ fun_l8_n976(x)
+ end
+end
+
+def fun_l7_n988(x)
+ if (x < 1)
+ fun_l8_n115(x)
+ else
+ fun_l8_n222(x)
+ end
+end
+
+def fun_l7_n989(x)
+ if (x < 1)
+ fun_l8_n23(x)
+ else
+ fun_l8_n665(x)
+ end
+end
+
+def fun_l7_n990(x)
+ if (x < 1)
+ fun_l8_n416(x)
+ else
+ fun_l8_n455(x)
+ end
+end
+
+def fun_l7_n991(x)
+ if (x < 1)
+ fun_l8_n556(x)
+ else
+ fun_l8_n971(x)
+ end
+end
+
+def fun_l7_n992(x)
+ if (x < 1)
+ fun_l8_n726(x)
+ else
+ fun_l8_n312(x)
+ end
+end
+
+def fun_l7_n993(x)
+ if (x < 1)
+ fun_l8_n354(x)
+ else
+ fun_l8_n860(x)
+ end
+end
+
+def fun_l7_n994(x)
+ if (x < 1)
+ fun_l8_n62(x)
+ else
+ fun_l8_n290(x)
+ end
+end
+
+def fun_l7_n995(x)
+ if (x < 1)
+ fun_l8_n695(x)
+ else
+ fun_l8_n881(x)
+ end
+end
+
+def fun_l7_n996(x)
+ if (x < 1)
+ fun_l8_n938(x)
+ else
+ fun_l8_n566(x)
+ end
+end
+
+def fun_l7_n997(x)
+ if (x < 1)
+ fun_l8_n379(x)
+ else
+ fun_l8_n731(x)
+ end
+end
+
+def fun_l7_n998(x)
+ if (x < 1)
+ fun_l8_n320(x)
+ else
+ fun_l8_n339(x)
+ end
+end
+
+def fun_l7_n999(x)
+ if (x < 1)
+ fun_l8_n219(x)
+ else
+ fun_l8_n320(x)
+ end
+end
+
+def fun_l8_n0(x)
+ if (x < 1)
+ fun_l9_n590(x)
+ else
+ fun_l9_n825(x)
+ end
+end
+
+def fun_l8_n1(x)
+ if (x < 1)
+ fun_l9_n301(x)
+ else
+ fun_l9_n457(x)
+ end
+end
+
+def fun_l8_n2(x)
+ if (x < 1)
+ fun_l9_n637(x)
+ else
+ fun_l9_n909(x)
+ end
+end
+
+def fun_l8_n3(x)
+ if (x < 1)
+ fun_l9_n485(x)
+ else
+ fun_l9_n603(x)
+ end
+end
+
+def fun_l8_n4(x)
+ if (x < 1)
+ fun_l9_n465(x)
+ else
+ fun_l9_n39(x)
+ end
+end
+
+def fun_l8_n5(x)
+ if (x < 1)
+ fun_l9_n861(x)
+ else
+ fun_l9_n153(x)
+ end
+end
+
+def fun_l8_n6(x)
+ if (x < 1)
+ fun_l9_n130(x)
+ else
+ fun_l9_n401(x)
+ end
+end
+
+def fun_l8_n7(x)
+ if (x < 1)
+ fun_l9_n726(x)
+ else
+ fun_l9_n248(x)
+ end
+end
+
+def fun_l8_n8(x)
+ if (x < 1)
+ fun_l9_n607(x)
+ else
+ fun_l9_n681(x)
+ end
+end
+
+def fun_l8_n9(x)
+ if (x < 1)
+ fun_l9_n862(x)
+ else
+ fun_l9_n8(x)
+ end
+end
+
+def fun_l8_n10(x)
+ if (x < 1)
+ fun_l9_n607(x)
+ else
+ fun_l9_n373(x)
+ end
+end
+
+def fun_l8_n11(x)
+ if (x < 1)
+ fun_l9_n692(x)
+ else
+ fun_l9_n31(x)
+ end
+end
+
+def fun_l8_n12(x)
+ if (x < 1)
+ fun_l9_n412(x)
+ else
+ fun_l9_n576(x)
+ end
+end
+
+def fun_l8_n13(x)
+ if (x < 1)
+ fun_l9_n582(x)
+ else
+ fun_l9_n281(x)
+ end
+end
+
+def fun_l8_n14(x)
+ if (x < 1)
+ fun_l9_n986(x)
+ else
+ fun_l9_n99(x)
+ end
+end
+
+def fun_l8_n15(x)
+ if (x < 1)
+ fun_l9_n807(x)
+ else
+ fun_l9_n807(x)
+ end
+end
+
+def fun_l8_n16(x)
+ if (x < 1)
+ fun_l9_n635(x)
+ else
+ fun_l9_n51(x)
+ end
+end
+
+def fun_l8_n17(x)
+ if (x < 1)
+ fun_l9_n193(x)
+ else
+ fun_l9_n673(x)
+ end
+end
+
+def fun_l8_n18(x)
+ if (x < 1)
+ fun_l9_n897(x)
+ else
+ fun_l9_n881(x)
+ end
+end
+
+def fun_l8_n19(x)
+ if (x < 1)
+ fun_l9_n288(x)
+ else
+ fun_l9_n337(x)
+ end
+end
+
+def fun_l8_n20(x)
+ if (x < 1)
+ fun_l9_n754(x)
+ else
+ fun_l9_n581(x)
+ end
+end
+
+def fun_l8_n21(x)
+ if (x < 1)
+ fun_l9_n265(x)
+ else
+ fun_l9_n205(x)
+ end
+end
+
+def fun_l8_n22(x)
+ if (x < 1)
+ fun_l9_n784(x)
+ else
+ fun_l9_n428(x)
+ end
+end
+
+def fun_l8_n23(x)
+ if (x < 1)
+ fun_l9_n821(x)
+ else
+ fun_l9_n930(x)
+ end
+end
+
+def fun_l8_n24(x)
+ if (x < 1)
+ fun_l9_n237(x)
+ else
+ fun_l9_n681(x)
+ end
+end
+
+def fun_l8_n25(x)
+ if (x < 1)
+ fun_l9_n32(x)
+ else
+ fun_l9_n405(x)
+ end
+end
+
+def fun_l8_n26(x)
+ if (x < 1)
+ fun_l9_n370(x)
+ else
+ fun_l9_n802(x)
+ end
+end
+
+def fun_l8_n27(x)
+ if (x < 1)
+ fun_l9_n4(x)
+ else
+ fun_l9_n288(x)
+ end
+end
+
+def fun_l8_n28(x)
+ if (x < 1)
+ fun_l9_n9(x)
+ else
+ fun_l9_n180(x)
+ end
+end
+
+def fun_l8_n29(x)
+ if (x < 1)
+ fun_l9_n585(x)
+ else
+ fun_l9_n396(x)
+ end
+end
+
+def fun_l8_n30(x)
+ if (x < 1)
+ fun_l9_n954(x)
+ else
+ fun_l9_n603(x)
+ end
+end
+
+def fun_l8_n31(x)
+ if (x < 1)
+ fun_l9_n808(x)
+ else
+ fun_l9_n770(x)
+ end
+end
+
+def fun_l8_n32(x)
+ if (x < 1)
+ fun_l9_n442(x)
+ else
+ fun_l9_n243(x)
+ end
+end
+
+def fun_l8_n33(x)
+ if (x < 1)
+ fun_l9_n139(x)
+ else
+ fun_l9_n93(x)
+ end
+end
+
+def fun_l8_n34(x)
+ if (x < 1)
+ fun_l9_n270(x)
+ else
+ fun_l9_n333(x)
+ end
+end
+
+def fun_l8_n35(x)
+ if (x < 1)
+ fun_l9_n542(x)
+ else
+ fun_l9_n38(x)
+ end
+end
+
+def fun_l8_n36(x)
+ if (x < 1)
+ fun_l9_n892(x)
+ else
+ fun_l9_n517(x)
+ end
+end
+
+def fun_l8_n37(x)
+ if (x < 1)
+ fun_l9_n599(x)
+ else
+ fun_l9_n692(x)
+ end
+end
+
+def fun_l8_n38(x)
+ if (x < 1)
+ fun_l9_n0(x)
+ else
+ fun_l9_n879(x)
+ end
+end
+
+def fun_l8_n39(x)
+ if (x < 1)
+ fun_l9_n835(x)
+ else
+ fun_l9_n134(x)
+ end
+end
+
+def fun_l8_n40(x)
+ if (x < 1)
+ fun_l9_n151(x)
+ else
+ fun_l9_n546(x)
+ end
+end
+
+def fun_l8_n41(x)
+ if (x < 1)
+ fun_l9_n214(x)
+ else
+ fun_l9_n652(x)
+ end
+end
+
+def fun_l8_n42(x)
+ if (x < 1)
+ fun_l9_n239(x)
+ else
+ fun_l9_n123(x)
+ end
+end
+
+def fun_l8_n43(x)
+ if (x < 1)
+ fun_l9_n763(x)
+ else
+ fun_l9_n953(x)
+ end
+end
+
+def fun_l8_n44(x)
+ if (x < 1)
+ fun_l9_n449(x)
+ else
+ fun_l9_n343(x)
+ end
+end
+
+def fun_l8_n45(x)
+ if (x < 1)
+ fun_l9_n727(x)
+ else
+ fun_l9_n47(x)
+ end
+end
+
+def fun_l8_n46(x)
+ if (x < 1)
+ fun_l9_n684(x)
+ else
+ fun_l9_n711(x)
+ end
+end
+
+def fun_l8_n47(x)
+ if (x < 1)
+ fun_l9_n895(x)
+ else
+ fun_l9_n864(x)
+ end
+end
+
+def fun_l8_n48(x)
+ if (x < 1)
+ fun_l9_n544(x)
+ else
+ fun_l9_n358(x)
+ end
+end
+
+def fun_l8_n49(x)
+ if (x < 1)
+ fun_l9_n829(x)
+ else
+ fun_l9_n411(x)
+ end
+end
+
+def fun_l8_n50(x)
+ if (x < 1)
+ fun_l9_n673(x)
+ else
+ fun_l9_n640(x)
+ end
+end
+
+def fun_l8_n51(x)
+ if (x < 1)
+ fun_l9_n9(x)
+ else
+ fun_l9_n690(x)
+ end
+end
+
+def fun_l8_n52(x)
+ if (x < 1)
+ fun_l9_n293(x)
+ else
+ fun_l9_n889(x)
+ end
+end
+
+def fun_l8_n53(x)
+ if (x < 1)
+ fun_l9_n141(x)
+ else
+ fun_l9_n554(x)
+ end
+end
+
+def fun_l8_n54(x)
+ if (x < 1)
+ fun_l9_n982(x)
+ else
+ fun_l9_n955(x)
+ end
+end
+
+def fun_l8_n55(x)
+ if (x < 1)
+ fun_l9_n382(x)
+ else
+ fun_l9_n897(x)
+ end
+end
+
+def fun_l8_n56(x)
+ if (x < 1)
+ fun_l9_n332(x)
+ else
+ fun_l9_n550(x)
+ end
+end
+
+def fun_l8_n57(x)
+ if (x < 1)
+ fun_l9_n46(x)
+ else
+ fun_l9_n569(x)
+ end
+end
+
+def fun_l8_n58(x)
+ if (x < 1)
+ fun_l9_n556(x)
+ else
+ fun_l9_n0(x)
+ end
+end
+
+def fun_l8_n59(x)
+ if (x < 1)
+ fun_l9_n931(x)
+ else
+ fun_l9_n995(x)
+ end
+end
+
+def fun_l8_n60(x)
+ if (x < 1)
+ fun_l9_n470(x)
+ else
+ fun_l9_n679(x)
+ end
+end
+
+def fun_l8_n61(x)
+ if (x < 1)
+ fun_l9_n269(x)
+ else
+ fun_l9_n742(x)
+ end
+end
+
+def fun_l8_n62(x)
+ if (x < 1)
+ fun_l9_n542(x)
+ else
+ fun_l9_n556(x)
+ end
+end
+
+def fun_l8_n63(x)
+ if (x < 1)
+ fun_l9_n713(x)
+ else
+ fun_l9_n249(x)
+ end
+end
+
+def fun_l8_n64(x)
+ if (x < 1)
+ fun_l9_n842(x)
+ else
+ fun_l9_n566(x)
+ end
+end
+
+def fun_l8_n65(x)
+ if (x < 1)
+ fun_l9_n708(x)
+ else
+ fun_l9_n3(x)
+ end
+end
+
+def fun_l8_n66(x)
+ if (x < 1)
+ fun_l9_n845(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n67(x)
+ if (x < 1)
+ fun_l9_n823(x)
+ else
+ fun_l9_n326(x)
+ end
+end
+
+def fun_l8_n68(x)
+ if (x < 1)
+ fun_l9_n457(x)
+ else
+ fun_l9_n888(x)
+ end
+end
+
+def fun_l8_n69(x)
+ if (x < 1)
+ fun_l9_n454(x)
+ else
+ fun_l9_n601(x)
+ end
+end
+
+def fun_l8_n70(x)
+ if (x < 1)
+ fun_l9_n636(x)
+ else
+ fun_l9_n482(x)
+ end
+end
+
+def fun_l8_n71(x)
+ if (x < 1)
+ fun_l9_n778(x)
+ else
+ fun_l9_n678(x)
+ end
+end
+
+def fun_l8_n72(x)
+ if (x < 1)
+ fun_l9_n715(x)
+ else
+ fun_l9_n851(x)
+ end
+end
+
+def fun_l8_n73(x)
+ if (x < 1)
+ fun_l9_n330(x)
+ else
+ fun_l9_n84(x)
+ end
+end
+
+def fun_l8_n74(x)
+ if (x < 1)
+ fun_l9_n524(x)
+ else
+ fun_l9_n109(x)
+ end
+end
+
+def fun_l8_n75(x)
+ if (x < 1)
+ fun_l9_n610(x)
+ else
+ fun_l9_n723(x)
+ end
+end
+
+def fun_l8_n76(x)
+ if (x < 1)
+ fun_l9_n964(x)
+ else
+ fun_l9_n893(x)
+ end
+end
+
+def fun_l8_n77(x)
+ if (x < 1)
+ fun_l9_n653(x)
+ else
+ fun_l9_n451(x)
+ end
+end
+
+def fun_l8_n78(x)
+ if (x < 1)
+ fun_l9_n582(x)
+ else
+ fun_l9_n29(x)
+ end
+end
+
+def fun_l8_n79(x)
+ if (x < 1)
+ fun_l9_n219(x)
+ else
+ fun_l9_n25(x)
+ end
+end
+
+def fun_l8_n80(x)
+ if (x < 1)
+ fun_l9_n471(x)
+ else
+ fun_l9_n217(x)
+ end
+end
+
+def fun_l8_n81(x)
+ if (x < 1)
+ fun_l9_n339(x)
+ else
+ fun_l9_n365(x)
+ end
+end
+
+def fun_l8_n82(x)
+ if (x < 1)
+ fun_l9_n808(x)
+ else
+ fun_l9_n501(x)
+ end
+end
+
+def fun_l8_n83(x)
+ if (x < 1)
+ fun_l9_n23(x)
+ else
+ fun_l9_n252(x)
+ end
+end
+
+def fun_l8_n84(x)
+ if (x < 1)
+ fun_l9_n628(x)
+ else
+ fun_l9_n514(x)
+ end
+end
+
+def fun_l8_n85(x)
+ if (x < 1)
+ fun_l9_n22(x)
+ else
+ fun_l9_n465(x)
+ end
+end
+
+def fun_l8_n86(x)
+ if (x < 1)
+ fun_l9_n553(x)
+ else
+ fun_l9_n788(x)
+ end
+end
+
+def fun_l8_n87(x)
+ if (x < 1)
+ fun_l9_n852(x)
+ else
+ fun_l9_n945(x)
+ end
+end
+
+def fun_l8_n88(x)
+ if (x < 1)
+ fun_l9_n886(x)
+ else
+ fun_l9_n438(x)
+ end
+end
+
+def fun_l8_n89(x)
+ if (x < 1)
+ fun_l9_n821(x)
+ else
+ fun_l9_n697(x)
+ end
+end
+
+def fun_l8_n90(x)
+ if (x < 1)
+ fun_l9_n388(x)
+ else
+ fun_l9_n39(x)
+ end
+end
+
+def fun_l8_n91(x)
+ if (x < 1)
+ fun_l9_n135(x)
+ else
+ fun_l9_n736(x)
+ end
+end
+
+def fun_l8_n92(x)
+ if (x < 1)
+ fun_l9_n225(x)
+ else
+ fun_l9_n125(x)
+ end
+end
+
+def fun_l8_n93(x)
+ if (x < 1)
+ fun_l9_n201(x)
+ else
+ fun_l9_n320(x)
+ end
+end
+
+def fun_l8_n94(x)
+ if (x < 1)
+ fun_l9_n30(x)
+ else
+ fun_l9_n938(x)
+ end
+end
+
+def fun_l8_n95(x)
+ if (x < 1)
+ fun_l9_n987(x)
+ else
+ fun_l9_n141(x)
+ end
+end
+
+def fun_l8_n96(x)
+ if (x < 1)
+ fun_l9_n968(x)
+ else
+ fun_l9_n999(x)
+ end
+end
+
+def fun_l8_n97(x)
+ if (x < 1)
+ fun_l9_n852(x)
+ else
+ fun_l9_n927(x)
+ end
+end
+
+def fun_l8_n98(x)
+ if (x < 1)
+ fun_l9_n720(x)
+ else
+ fun_l9_n717(x)
+ end
+end
+
+def fun_l8_n99(x)
+ if (x < 1)
+ fun_l9_n907(x)
+ else
+ fun_l9_n8(x)
+ end
+end
+
+def fun_l8_n100(x)
+ if (x < 1)
+ fun_l9_n973(x)
+ else
+ fun_l9_n379(x)
+ end
+end
+
+def fun_l8_n101(x)
+ if (x < 1)
+ fun_l9_n370(x)
+ else
+ fun_l9_n530(x)
+ end
+end
+
+def fun_l8_n102(x)
+ if (x < 1)
+ fun_l9_n411(x)
+ else
+ fun_l9_n560(x)
+ end
+end
+
+def fun_l8_n103(x)
+ if (x < 1)
+ fun_l9_n54(x)
+ else
+ fun_l9_n813(x)
+ end
+end
+
+def fun_l8_n104(x)
+ if (x < 1)
+ fun_l9_n217(x)
+ else
+ fun_l9_n455(x)
+ end
+end
+
+def fun_l8_n105(x)
+ if (x < 1)
+ fun_l9_n667(x)
+ else
+ fun_l9_n92(x)
+ end
+end
+
+def fun_l8_n106(x)
+ if (x < 1)
+ fun_l9_n933(x)
+ else
+ fun_l9_n727(x)
+ end
+end
+
+def fun_l8_n107(x)
+ if (x < 1)
+ fun_l9_n578(x)
+ else
+ fun_l9_n350(x)
+ end
+end
+
+def fun_l8_n108(x)
+ if (x < 1)
+ fun_l9_n75(x)
+ else
+ fun_l9_n439(x)
+ end
+end
+
+def fun_l8_n109(x)
+ if (x < 1)
+ fun_l9_n21(x)
+ else
+ fun_l9_n112(x)
+ end
+end
+
+def fun_l8_n110(x)
+ if (x < 1)
+ fun_l9_n57(x)
+ else
+ fun_l9_n553(x)
+ end
+end
+
+def fun_l8_n111(x)
+ if (x < 1)
+ fun_l9_n347(x)
+ else
+ fun_l9_n285(x)
+ end
+end
+
+def fun_l8_n112(x)
+ if (x < 1)
+ fun_l9_n837(x)
+ else
+ fun_l9_n793(x)
+ end
+end
+
+def fun_l8_n113(x)
+ if (x < 1)
+ fun_l9_n517(x)
+ else
+ fun_l9_n668(x)
+ end
+end
+
+def fun_l8_n114(x)
+ if (x < 1)
+ fun_l9_n486(x)
+ else
+ fun_l9_n872(x)
+ end
+end
+
+def fun_l8_n115(x)
+ if (x < 1)
+ fun_l9_n454(x)
+ else
+ fun_l9_n507(x)
+ end
+end
+
+def fun_l8_n116(x)
+ if (x < 1)
+ fun_l9_n110(x)
+ else
+ fun_l9_n263(x)
+ end
+end
+
+def fun_l8_n117(x)
+ if (x < 1)
+ fun_l9_n878(x)
+ else
+ fun_l9_n21(x)
+ end
+end
+
+def fun_l8_n118(x)
+ if (x < 1)
+ fun_l9_n564(x)
+ else
+ fun_l9_n409(x)
+ end
+end
+
+def fun_l8_n119(x)
+ if (x < 1)
+ fun_l9_n511(x)
+ else
+ fun_l9_n800(x)
+ end
+end
+
+def fun_l8_n120(x)
+ if (x < 1)
+ fun_l9_n501(x)
+ else
+ fun_l9_n305(x)
+ end
+end
+
+def fun_l8_n121(x)
+ if (x < 1)
+ fun_l9_n630(x)
+ else
+ fun_l9_n319(x)
+ end
+end
+
+def fun_l8_n122(x)
+ if (x < 1)
+ fun_l9_n271(x)
+ else
+ fun_l9_n639(x)
+ end
+end
+
+def fun_l8_n123(x)
+ if (x < 1)
+ fun_l9_n812(x)
+ else
+ fun_l9_n735(x)
+ end
+end
+
+def fun_l8_n124(x)
+ if (x < 1)
+ fun_l9_n828(x)
+ else
+ fun_l9_n203(x)
+ end
+end
+
+def fun_l8_n125(x)
+ if (x < 1)
+ fun_l9_n228(x)
+ else
+ fun_l9_n536(x)
+ end
+end
+
+def fun_l8_n126(x)
+ if (x < 1)
+ fun_l9_n426(x)
+ else
+ fun_l9_n325(x)
+ end
+end
+
+def fun_l8_n127(x)
+ if (x < 1)
+ fun_l9_n19(x)
+ else
+ fun_l9_n324(x)
+ end
+end
+
+def fun_l8_n128(x)
+ if (x < 1)
+ fun_l9_n419(x)
+ else
+ fun_l9_n425(x)
+ end
+end
+
+def fun_l8_n129(x)
+ if (x < 1)
+ fun_l9_n384(x)
+ else
+ fun_l9_n550(x)
+ end
+end
+
+def fun_l8_n130(x)
+ if (x < 1)
+ fun_l9_n956(x)
+ else
+ fun_l9_n270(x)
+ end
+end
+
+def fun_l8_n131(x)
+ if (x < 1)
+ fun_l9_n20(x)
+ else
+ fun_l9_n949(x)
+ end
+end
+
+def fun_l8_n132(x)
+ if (x < 1)
+ fun_l9_n317(x)
+ else
+ fun_l9_n909(x)
+ end
+end
+
+def fun_l8_n133(x)
+ if (x < 1)
+ fun_l9_n131(x)
+ else
+ fun_l9_n108(x)
+ end
+end
+
+def fun_l8_n134(x)
+ if (x < 1)
+ fun_l9_n648(x)
+ else
+ fun_l9_n473(x)
+ end
+end
+
+def fun_l8_n135(x)
+ if (x < 1)
+ fun_l9_n837(x)
+ else
+ fun_l9_n89(x)
+ end
+end
+
+def fun_l8_n136(x)
+ if (x < 1)
+ fun_l9_n637(x)
+ else
+ fun_l9_n394(x)
+ end
+end
+
+def fun_l8_n137(x)
+ if (x < 1)
+ fun_l9_n608(x)
+ else
+ fun_l9_n283(x)
+ end
+end
+
+def fun_l8_n138(x)
+ if (x < 1)
+ fun_l9_n728(x)
+ else
+ fun_l9_n586(x)
+ end
+end
+
+def fun_l8_n139(x)
+ if (x < 1)
+ fun_l9_n689(x)
+ else
+ fun_l9_n700(x)
+ end
+end
+
+def fun_l8_n140(x)
+ if (x < 1)
+ fun_l9_n532(x)
+ else
+ fun_l9_n98(x)
+ end
+end
+
+def fun_l8_n141(x)
+ if (x < 1)
+ fun_l9_n696(x)
+ else
+ fun_l9_n951(x)
+ end
+end
+
+def fun_l8_n142(x)
+ if (x < 1)
+ fun_l9_n28(x)
+ else
+ fun_l9_n714(x)
+ end
+end
+
+def fun_l8_n143(x)
+ if (x < 1)
+ fun_l9_n438(x)
+ else
+ fun_l9_n934(x)
+ end
+end
+
+def fun_l8_n144(x)
+ if (x < 1)
+ fun_l9_n738(x)
+ else
+ fun_l9_n473(x)
+ end
+end
+
+def fun_l8_n145(x)
+ if (x < 1)
+ fun_l9_n201(x)
+ else
+ fun_l9_n634(x)
+ end
+end
+
+def fun_l8_n146(x)
+ if (x < 1)
+ fun_l9_n391(x)
+ else
+ fun_l9_n703(x)
+ end
+end
+
+def fun_l8_n147(x)
+ if (x < 1)
+ fun_l9_n740(x)
+ else
+ fun_l9_n265(x)
+ end
+end
+
+def fun_l8_n148(x)
+ if (x < 1)
+ fun_l9_n303(x)
+ else
+ fun_l9_n162(x)
+ end
+end
+
+def fun_l8_n149(x)
+ if (x < 1)
+ fun_l9_n518(x)
+ else
+ fun_l9_n899(x)
+ end
+end
+
+def fun_l8_n150(x)
+ if (x < 1)
+ fun_l9_n847(x)
+ else
+ fun_l9_n840(x)
+ end
+end
+
+def fun_l8_n151(x)
+ if (x < 1)
+ fun_l9_n567(x)
+ else
+ fun_l9_n29(x)
+ end
+end
+
+def fun_l8_n152(x)
+ if (x < 1)
+ fun_l9_n426(x)
+ else
+ fun_l9_n578(x)
+ end
+end
+
+def fun_l8_n153(x)
+ if (x < 1)
+ fun_l9_n617(x)
+ else
+ fun_l9_n703(x)
+ end
+end
+
+def fun_l8_n154(x)
+ if (x < 1)
+ fun_l9_n673(x)
+ else
+ fun_l9_n663(x)
+ end
+end
+
+def fun_l8_n155(x)
+ if (x < 1)
+ fun_l9_n456(x)
+ else
+ fun_l9_n406(x)
+ end
+end
+
+def fun_l8_n156(x)
+ if (x < 1)
+ fun_l9_n297(x)
+ else
+ fun_l9_n444(x)
+ end
+end
+
+def fun_l8_n157(x)
+ if (x < 1)
+ fun_l9_n300(x)
+ else
+ fun_l9_n179(x)
+ end
+end
+
+def fun_l8_n158(x)
+ if (x < 1)
+ fun_l9_n646(x)
+ else
+ fun_l9_n9(x)
+ end
+end
+
+def fun_l8_n159(x)
+ if (x < 1)
+ fun_l9_n133(x)
+ else
+ fun_l9_n228(x)
+ end
+end
+
+def fun_l8_n160(x)
+ if (x < 1)
+ fun_l9_n814(x)
+ else
+ fun_l9_n775(x)
+ end
+end
+
+def fun_l8_n161(x)
+ if (x < 1)
+ fun_l9_n748(x)
+ else
+ fun_l9_n849(x)
+ end
+end
+
+def fun_l8_n162(x)
+ if (x < 1)
+ fun_l9_n209(x)
+ else
+ fun_l9_n273(x)
+ end
+end
+
+def fun_l8_n163(x)
+ if (x < 1)
+ fun_l9_n116(x)
+ else
+ fun_l9_n669(x)
+ end
+end
+
+def fun_l8_n164(x)
+ if (x < 1)
+ fun_l9_n714(x)
+ else
+ fun_l9_n621(x)
+ end
+end
+
+def fun_l8_n165(x)
+ if (x < 1)
+ fun_l9_n619(x)
+ else
+ fun_l9_n365(x)
+ end
+end
+
+def fun_l8_n166(x)
+ if (x < 1)
+ fun_l9_n756(x)
+ else
+ fun_l9_n745(x)
+ end
+end
+
+def fun_l8_n167(x)
+ if (x < 1)
+ fun_l9_n12(x)
+ else
+ fun_l9_n633(x)
+ end
+end
+
+def fun_l8_n168(x)
+ if (x < 1)
+ fun_l9_n619(x)
+ else
+ fun_l9_n31(x)
+ end
+end
+
+def fun_l8_n169(x)
+ if (x < 1)
+ fun_l9_n685(x)
+ else
+ fun_l9_n107(x)
+ end
+end
+
+def fun_l8_n170(x)
+ if (x < 1)
+ fun_l9_n636(x)
+ else
+ fun_l9_n280(x)
+ end
+end
+
+def fun_l8_n171(x)
+ if (x < 1)
+ fun_l9_n254(x)
+ else
+ fun_l9_n742(x)
+ end
+end
+
+def fun_l8_n172(x)
+ if (x < 1)
+ fun_l9_n829(x)
+ else
+ fun_l9_n632(x)
+ end
+end
+
+def fun_l8_n173(x)
+ if (x < 1)
+ fun_l9_n341(x)
+ else
+ fun_l9_n186(x)
+ end
+end
+
+def fun_l8_n174(x)
+ if (x < 1)
+ fun_l9_n903(x)
+ else
+ fun_l9_n93(x)
+ end
+end
+
+def fun_l8_n175(x)
+ if (x < 1)
+ fun_l9_n416(x)
+ else
+ fun_l9_n318(x)
+ end
+end
+
+def fun_l8_n176(x)
+ if (x < 1)
+ fun_l9_n893(x)
+ else
+ fun_l9_n438(x)
+ end
+end
+
+def fun_l8_n177(x)
+ if (x < 1)
+ fun_l9_n551(x)
+ else
+ fun_l9_n312(x)
+ end
+end
+
+def fun_l8_n178(x)
+ if (x < 1)
+ fun_l9_n582(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n179(x)
+ if (x < 1)
+ fun_l9_n547(x)
+ else
+ fun_l9_n804(x)
+ end
+end
+
+def fun_l8_n180(x)
+ if (x < 1)
+ fun_l9_n589(x)
+ else
+ fun_l9_n246(x)
+ end
+end
+
+def fun_l8_n181(x)
+ if (x < 1)
+ fun_l9_n67(x)
+ else
+ fun_l9_n345(x)
+ end
+end
+
+def fun_l8_n182(x)
+ if (x < 1)
+ fun_l9_n958(x)
+ else
+ fun_l9_n923(x)
+ end
+end
+
+def fun_l8_n183(x)
+ if (x < 1)
+ fun_l9_n418(x)
+ else
+ fun_l9_n532(x)
+ end
+end
+
+def fun_l8_n184(x)
+ if (x < 1)
+ fun_l9_n372(x)
+ else
+ fun_l9_n808(x)
+ end
+end
+
+def fun_l8_n185(x)
+ if (x < 1)
+ fun_l9_n849(x)
+ else
+ fun_l9_n755(x)
+ end
+end
+
+def fun_l8_n186(x)
+ if (x < 1)
+ fun_l9_n544(x)
+ else
+ fun_l9_n73(x)
+ end
+end
+
+def fun_l8_n187(x)
+ if (x < 1)
+ fun_l9_n729(x)
+ else
+ fun_l9_n295(x)
+ end
+end
+
+def fun_l8_n188(x)
+ if (x < 1)
+ fun_l9_n782(x)
+ else
+ fun_l9_n117(x)
+ end
+end
+
+def fun_l8_n189(x)
+ if (x < 1)
+ fun_l9_n947(x)
+ else
+ fun_l9_n93(x)
+ end
+end
+
+def fun_l8_n190(x)
+ if (x < 1)
+ fun_l9_n989(x)
+ else
+ fun_l9_n444(x)
+ end
+end
+
+def fun_l8_n191(x)
+ if (x < 1)
+ fun_l9_n394(x)
+ else
+ fun_l9_n741(x)
+ end
+end
+
+def fun_l8_n192(x)
+ if (x < 1)
+ fun_l9_n582(x)
+ else
+ fun_l9_n333(x)
+ end
+end
+
+def fun_l8_n193(x)
+ if (x < 1)
+ fun_l9_n73(x)
+ else
+ fun_l9_n227(x)
+ end
+end
+
+def fun_l8_n194(x)
+ if (x < 1)
+ fun_l9_n946(x)
+ else
+ fun_l9_n354(x)
+ end
+end
+
+def fun_l8_n195(x)
+ if (x < 1)
+ fun_l9_n383(x)
+ else
+ fun_l9_n863(x)
+ end
+end
+
+def fun_l8_n196(x)
+ if (x < 1)
+ fun_l9_n441(x)
+ else
+ fun_l9_n947(x)
+ end
+end
+
+def fun_l8_n197(x)
+ if (x < 1)
+ fun_l9_n506(x)
+ else
+ fun_l9_n45(x)
+ end
+end
+
+def fun_l8_n198(x)
+ if (x < 1)
+ fun_l9_n890(x)
+ else
+ fun_l9_n341(x)
+ end
+end
+
+def fun_l8_n199(x)
+ if (x < 1)
+ fun_l9_n75(x)
+ else
+ fun_l9_n56(x)
+ end
+end
+
+def fun_l8_n200(x)
+ if (x < 1)
+ fun_l9_n386(x)
+ else
+ fun_l9_n280(x)
+ end
+end
+
+def fun_l8_n201(x)
+ if (x < 1)
+ fun_l9_n364(x)
+ else
+ fun_l9_n424(x)
+ end
+end
+
+def fun_l8_n202(x)
+ if (x < 1)
+ fun_l9_n923(x)
+ else
+ fun_l9_n326(x)
+ end
+end
+
+def fun_l8_n203(x)
+ if (x < 1)
+ fun_l9_n692(x)
+ else
+ fun_l9_n502(x)
+ end
+end
+
+def fun_l8_n204(x)
+ if (x < 1)
+ fun_l9_n508(x)
+ else
+ fun_l9_n561(x)
+ end
+end
+
+def fun_l8_n205(x)
+ if (x < 1)
+ fun_l9_n496(x)
+ else
+ fun_l9_n949(x)
+ end
+end
+
+def fun_l8_n206(x)
+ if (x < 1)
+ fun_l9_n852(x)
+ else
+ fun_l9_n447(x)
+ end
+end
+
+def fun_l8_n207(x)
+ if (x < 1)
+ fun_l9_n757(x)
+ else
+ fun_l9_n782(x)
+ end
+end
+
+def fun_l8_n208(x)
+ if (x < 1)
+ fun_l9_n505(x)
+ else
+ fun_l9_n32(x)
+ end
+end
+
+def fun_l8_n209(x)
+ if (x < 1)
+ fun_l9_n591(x)
+ else
+ fun_l9_n967(x)
+ end
+end
+
+def fun_l8_n210(x)
+ if (x < 1)
+ fun_l9_n537(x)
+ else
+ fun_l9_n380(x)
+ end
+end
+
+def fun_l8_n211(x)
+ if (x < 1)
+ fun_l9_n19(x)
+ else
+ fun_l9_n362(x)
+ end
+end
+
+def fun_l8_n212(x)
+ if (x < 1)
+ fun_l9_n759(x)
+ else
+ fun_l9_n835(x)
+ end
+end
+
+def fun_l8_n213(x)
+ if (x < 1)
+ fun_l9_n518(x)
+ else
+ fun_l9_n294(x)
+ end
+end
+
+def fun_l8_n214(x)
+ if (x < 1)
+ fun_l9_n921(x)
+ else
+ fun_l9_n687(x)
+ end
+end
+
+def fun_l8_n215(x)
+ if (x < 1)
+ fun_l9_n114(x)
+ else
+ fun_l9_n130(x)
+ end
+end
+
+def fun_l8_n216(x)
+ if (x < 1)
+ fun_l9_n829(x)
+ else
+ fun_l9_n8(x)
+ end
+end
+
+def fun_l8_n217(x)
+ if (x < 1)
+ fun_l9_n875(x)
+ else
+ fun_l9_n392(x)
+ end
+end
+
+def fun_l8_n218(x)
+ if (x < 1)
+ fun_l9_n13(x)
+ else
+ fun_l9_n907(x)
+ end
+end
+
+def fun_l8_n219(x)
+ if (x < 1)
+ fun_l9_n457(x)
+ else
+ fun_l9_n77(x)
+ end
+end
+
+def fun_l8_n220(x)
+ if (x < 1)
+ fun_l9_n404(x)
+ else
+ fun_l9_n12(x)
+ end
+end
+
+def fun_l8_n221(x)
+ if (x < 1)
+ fun_l9_n244(x)
+ else
+ fun_l9_n231(x)
+ end
+end
+
+def fun_l8_n222(x)
+ if (x < 1)
+ fun_l9_n205(x)
+ else
+ fun_l9_n458(x)
+ end
+end
+
+def fun_l8_n223(x)
+ if (x < 1)
+ fun_l9_n570(x)
+ else
+ fun_l9_n44(x)
+ end
+end
+
+def fun_l8_n224(x)
+ if (x < 1)
+ fun_l9_n651(x)
+ else
+ fun_l9_n836(x)
+ end
+end
+
+def fun_l8_n225(x)
+ if (x < 1)
+ fun_l9_n518(x)
+ else
+ fun_l9_n845(x)
+ end
+end
+
+def fun_l8_n226(x)
+ if (x < 1)
+ fun_l9_n92(x)
+ else
+ fun_l9_n637(x)
+ end
+end
+
+def fun_l8_n227(x)
+ if (x < 1)
+ fun_l9_n990(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n228(x)
+ if (x < 1)
+ fun_l9_n465(x)
+ else
+ fun_l9_n764(x)
+ end
+end
+
+def fun_l8_n229(x)
+ if (x < 1)
+ fun_l9_n7(x)
+ else
+ fun_l9_n981(x)
+ end
+end
+
+def fun_l8_n230(x)
+ if (x < 1)
+ fun_l9_n250(x)
+ else
+ fun_l9_n690(x)
+ end
+end
+
+def fun_l8_n231(x)
+ if (x < 1)
+ fun_l9_n101(x)
+ else
+ fun_l9_n342(x)
+ end
+end
+
+def fun_l8_n232(x)
+ if (x < 1)
+ fun_l9_n659(x)
+ else
+ fun_l9_n216(x)
+ end
+end
+
+def fun_l8_n233(x)
+ if (x < 1)
+ fun_l9_n129(x)
+ else
+ fun_l9_n439(x)
+ end
+end
+
+def fun_l8_n234(x)
+ if (x < 1)
+ fun_l9_n616(x)
+ else
+ fun_l9_n700(x)
+ end
+end
+
+def fun_l8_n235(x)
+ if (x < 1)
+ fun_l9_n850(x)
+ else
+ fun_l9_n254(x)
+ end
+end
+
+def fun_l8_n236(x)
+ if (x < 1)
+ fun_l9_n186(x)
+ else
+ fun_l9_n592(x)
+ end
+end
+
+def fun_l8_n237(x)
+ if (x < 1)
+ fun_l9_n895(x)
+ else
+ fun_l9_n752(x)
+ end
+end
+
+def fun_l8_n238(x)
+ if (x < 1)
+ fun_l9_n496(x)
+ else
+ fun_l9_n784(x)
+ end
+end
+
+def fun_l8_n239(x)
+ if (x < 1)
+ fun_l9_n579(x)
+ else
+ fun_l9_n144(x)
+ end
+end
+
+def fun_l8_n240(x)
+ if (x < 1)
+ fun_l9_n805(x)
+ else
+ fun_l9_n851(x)
+ end
+end
+
+def fun_l8_n241(x)
+ if (x < 1)
+ fun_l9_n756(x)
+ else
+ fun_l9_n332(x)
+ end
+end
+
+def fun_l8_n242(x)
+ if (x < 1)
+ fun_l9_n898(x)
+ else
+ fun_l9_n285(x)
+ end
+end
+
+def fun_l8_n243(x)
+ if (x < 1)
+ fun_l9_n729(x)
+ else
+ fun_l9_n149(x)
+ end
+end
+
+def fun_l8_n244(x)
+ if (x < 1)
+ fun_l9_n881(x)
+ else
+ fun_l9_n356(x)
+ end
+end
+
+def fun_l8_n245(x)
+ if (x < 1)
+ fun_l9_n351(x)
+ else
+ fun_l9_n805(x)
+ end
+end
+
+def fun_l8_n246(x)
+ if (x < 1)
+ fun_l9_n493(x)
+ else
+ fun_l9_n200(x)
+ end
+end
+
+def fun_l8_n247(x)
+ if (x < 1)
+ fun_l9_n706(x)
+ else
+ fun_l9_n917(x)
+ end
+end
+
+def fun_l8_n248(x)
+ if (x < 1)
+ fun_l9_n370(x)
+ else
+ fun_l9_n755(x)
+ end
+end
+
+def fun_l8_n249(x)
+ if (x < 1)
+ fun_l9_n859(x)
+ else
+ fun_l9_n496(x)
+ end
+end
+
+def fun_l8_n250(x)
+ if (x < 1)
+ fun_l9_n443(x)
+ else
+ fun_l9_n113(x)
+ end
+end
+
+def fun_l8_n251(x)
+ if (x < 1)
+ fun_l9_n631(x)
+ else
+ fun_l9_n195(x)
+ end
+end
+
+def fun_l8_n252(x)
+ if (x < 1)
+ fun_l9_n357(x)
+ else
+ fun_l9_n694(x)
+ end
+end
+
+def fun_l8_n253(x)
+ if (x < 1)
+ fun_l9_n387(x)
+ else
+ fun_l9_n820(x)
+ end
+end
+
+def fun_l8_n254(x)
+ if (x < 1)
+ fun_l9_n909(x)
+ else
+ fun_l9_n559(x)
+ end
+end
+
+def fun_l8_n255(x)
+ if (x < 1)
+ fun_l9_n474(x)
+ else
+ fun_l9_n864(x)
+ end
+end
+
+def fun_l8_n256(x)
+ if (x < 1)
+ fun_l9_n914(x)
+ else
+ fun_l9_n672(x)
+ end
+end
+
+def fun_l8_n257(x)
+ if (x < 1)
+ fun_l9_n915(x)
+ else
+ fun_l9_n177(x)
+ end
+end
+
+def fun_l8_n258(x)
+ if (x < 1)
+ fun_l9_n917(x)
+ else
+ fun_l9_n210(x)
+ end
+end
+
+def fun_l8_n259(x)
+ if (x < 1)
+ fun_l9_n851(x)
+ else
+ fun_l9_n342(x)
+ end
+end
+
+def fun_l8_n260(x)
+ if (x < 1)
+ fun_l9_n205(x)
+ else
+ fun_l9_n412(x)
+ end
+end
+
+def fun_l8_n261(x)
+ if (x < 1)
+ fun_l9_n110(x)
+ else
+ fun_l9_n62(x)
+ end
+end
+
+def fun_l8_n262(x)
+ if (x < 1)
+ fun_l9_n706(x)
+ else
+ fun_l9_n903(x)
+ end
+end
+
+def fun_l8_n263(x)
+ if (x < 1)
+ fun_l9_n403(x)
+ else
+ fun_l9_n994(x)
+ end
+end
+
+def fun_l8_n264(x)
+ if (x < 1)
+ fun_l9_n631(x)
+ else
+ fun_l9_n126(x)
+ end
+end
+
+def fun_l8_n265(x)
+ if (x < 1)
+ fun_l9_n216(x)
+ else
+ fun_l9_n573(x)
+ end
+end
+
+def fun_l8_n266(x)
+ if (x < 1)
+ fun_l9_n174(x)
+ else
+ fun_l9_n495(x)
+ end
+end
+
+def fun_l8_n267(x)
+ if (x < 1)
+ fun_l9_n802(x)
+ else
+ fun_l9_n881(x)
+ end
+end
+
+def fun_l8_n268(x)
+ if (x < 1)
+ fun_l9_n148(x)
+ else
+ fun_l9_n399(x)
+ end
+end
+
+def fun_l8_n269(x)
+ if (x < 1)
+ fun_l9_n675(x)
+ else
+ fun_l9_n596(x)
+ end
+end
+
+def fun_l8_n270(x)
+ if (x < 1)
+ fun_l9_n306(x)
+ else
+ fun_l9_n413(x)
+ end
+end
+
+def fun_l8_n271(x)
+ if (x < 1)
+ fun_l9_n205(x)
+ else
+ fun_l9_n569(x)
+ end
+end
+
+def fun_l8_n272(x)
+ if (x < 1)
+ fun_l9_n6(x)
+ else
+ fun_l9_n531(x)
+ end
+end
+
+def fun_l8_n273(x)
+ if (x < 1)
+ fun_l9_n516(x)
+ else
+ fun_l9_n172(x)
+ end
+end
+
+def fun_l8_n274(x)
+ if (x < 1)
+ fun_l9_n641(x)
+ else
+ fun_l9_n85(x)
+ end
+end
+
+def fun_l8_n275(x)
+ if (x < 1)
+ fun_l9_n258(x)
+ else
+ fun_l9_n773(x)
+ end
+end
+
+def fun_l8_n276(x)
+ if (x < 1)
+ fun_l9_n233(x)
+ else
+ fun_l9_n222(x)
+ end
+end
+
+def fun_l8_n277(x)
+ if (x < 1)
+ fun_l9_n615(x)
+ else
+ fun_l9_n598(x)
+ end
+end
+
+def fun_l8_n278(x)
+ if (x < 1)
+ fun_l9_n126(x)
+ else
+ fun_l9_n270(x)
+ end
+end
+
+def fun_l8_n279(x)
+ if (x < 1)
+ fun_l9_n186(x)
+ else
+ fun_l9_n78(x)
+ end
+end
+
+def fun_l8_n280(x)
+ if (x < 1)
+ fun_l9_n731(x)
+ else
+ fun_l9_n114(x)
+ end
+end
+
+def fun_l8_n281(x)
+ if (x < 1)
+ fun_l9_n513(x)
+ else
+ fun_l9_n69(x)
+ end
+end
+
+def fun_l8_n282(x)
+ if (x < 1)
+ fun_l9_n208(x)
+ else
+ fun_l9_n466(x)
+ end
+end
+
+def fun_l8_n283(x)
+ if (x < 1)
+ fun_l9_n958(x)
+ else
+ fun_l9_n86(x)
+ end
+end
+
+def fun_l8_n284(x)
+ if (x < 1)
+ fun_l9_n663(x)
+ else
+ fun_l9_n619(x)
+ end
+end
+
+def fun_l8_n285(x)
+ if (x < 1)
+ fun_l9_n698(x)
+ else
+ fun_l9_n97(x)
+ end
+end
+
+def fun_l8_n286(x)
+ if (x < 1)
+ fun_l9_n544(x)
+ else
+ fun_l9_n791(x)
+ end
+end
+
+def fun_l8_n287(x)
+ if (x < 1)
+ fun_l9_n51(x)
+ else
+ fun_l9_n415(x)
+ end
+end
+
+def fun_l8_n288(x)
+ if (x < 1)
+ fun_l9_n942(x)
+ else
+ fun_l9_n11(x)
+ end
+end
+
+def fun_l8_n289(x)
+ if (x < 1)
+ fun_l9_n386(x)
+ else
+ fun_l9_n507(x)
+ end
+end
+
+def fun_l8_n290(x)
+ if (x < 1)
+ fun_l9_n983(x)
+ else
+ fun_l9_n81(x)
+ end
+end
+
+def fun_l8_n291(x)
+ if (x < 1)
+ fun_l9_n403(x)
+ else
+ fun_l9_n628(x)
+ end
+end
+
+def fun_l8_n292(x)
+ if (x < 1)
+ fun_l9_n479(x)
+ else
+ fun_l9_n379(x)
+ end
+end
+
+def fun_l8_n293(x)
+ if (x < 1)
+ fun_l9_n284(x)
+ else
+ fun_l9_n109(x)
+ end
+end
+
+def fun_l8_n294(x)
+ if (x < 1)
+ fun_l9_n29(x)
+ else
+ fun_l9_n802(x)
+ end
+end
+
+def fun_l8_n295(x)
+ if (x < 1)
+ fun_l9_n579(x)
+ else
+ fun_l9_n371(x)
+ end
+end
+
+def fun_l8_n296(x)
+ if (x < 1)
+ fun_l9_n96(x)
+ else
+ fun_l9_n632(x)
+ end
+end
+
+def fun_l8_n297(x)
+ if (x < 1)
+ fun_l9_n442(x)
+ else
+ fun_l9_n396(x)
+ end
+end
+
+def fun_l8_n298(x)
+ if (x < 1)
+ fun_l9_n902(x)
+ else
+ fun_l9_n804(x)
+ end
+end
+
+def fun_l8_n299(x)
+ if (x < 1)
+ fun_l9_n561(x)
+ else
+ fun_l9_n952(x)
+ end
+end
+
+def fun_l8_n300(x)
+ if (x < 1)
+ fun_l9_n757(x)
+ else
+ fun_l9_n819(x)
+ end
+end
+
+def fun_l8_n301(x)
+ if (x < 1)
+ fun_l9_n97(x)
+ else
+ fun_l9_n892(x)
+ end
+end
+
+def fun_l8_n302(x)
+ if (x < 1)
+ fun_l9_n67(x)
+ else
+ fun_l9_n765(x)
+ end
+end
+
+def fun_l8_n303(x)
+ if (x < 1)
+ fun_l9_n166(x)
+ else
+ fun_l9_n769(x)
+ end
+end
+
+def fun_l8_n304(x)
+ if (x < 1)
+ fun_l9_n592(x)
+ else
+ fun_l9_n423(x)
+ end
+end
+
+def fun_l8_n305(x)
+ if (x < 1)
+ fun_l9_n354(x)
+ else
+ fun_l9_n953(x)
+ end
+end
+
+def fun_l8_n306(x)
+ if (x < 1)
+ fun_l9_n857(x)
+ else
+ fun_l9_n18(x)
+ end
+end
+
+def fun_l8_n307(x)
+ if (x < 1)
+ fun_l9_n445(x)
+ else
+ fun_l9_n796(x)
+ end
+end
+
+def fun_l8_n308(x)
+ if (x < 1)
+ fun_l9_n293(x)
+ else
+ fun_l9_n304(x)
+ end
+end
+
+def fun_l8_n309(x)
+ if (x < 1)
+ fun_l9_n859(x)
+ else
+ fun_l9_n282(x)
+ end
+end
+
+def fun_l8_n310(x)
+ if (x < 1)
+ fun_l9_n133(x)
+ else
+ fun_l9_n90(x)
+ end
+end
+
+def fun_l8_n311(x)
+ if (x < 1)
+ fun_l9_n997(x)
+ else
+ fun_l9_n201(x)
+ end
+end
+
+def fun_l8_n312(x)
+ if (x < 1)
+ fun_l9_n140(x)
+ else
+ fun_l9_n772(x)
+ end
+end
+
+def fun_l8_n313(x)
+ if (x < 1)
+ fun_l9_n761(x)
+ else
+ fun_l9_n980(x)
+ end
+end
+
+def fun_l8_n314(x)
+ if (x < 1)
+ fun_l9_n357(x)
+ else
+ fun_l9_n552(x)
+ end
+end
+
+def fun_l8_n315(x)
+ if (x < 1)
+ fun_l9_n312(x)
+ else
+ fun_l9_n412(x)
+ end
+end
+
+def fun_l8_n316(x)
+ if (x < 1)
+ fun_l9_n700(x)
+ else
+ fun_l9_n551(x)
+ end
+end
+
+def fun_l8_n317(x)
+ if (x < 1)
+ fun_l9_n623(x)
+ else
+ fun_l9_n219(x)
+ end
+end
+
+def fun_l8_n318(x)
+ if (x < 1)
+ fun_l9_n613(x)
+ else
+ fun_l9_n959(x)
+ end
+end
+
+def fun_l8_n319(x)
+ if (x < 1)
+ fun_l9_n978(x)
+ else
+ fun_l9_n596(x)
+ end
+end
+
+def fun_l8_n320(x)
+ if (x < 1)
+ fun_l9_n542(x)
+ else
+ fun_l9_n527(x)
+ end
+end
+
+def fun_l8_n321(x)
+ if (x < 1)
+ fun_l9_n877(x)
+ else
+ fun_l9_n108(x)
+ end
+end
+
+def fun_l8_n322(x)
+ if (x < 1)
+ fun_l9_n817(x)
+ else
+ fun_l9_n476(x)
+ end
+end
+
+def fun_l8_n323(x)
+ if (x < 1)
+ fun_l9_n765(x)
+ else
+ fun_l9_n672(x)
+ end
+end
+
+def fun_l8_n324(x)
+ if (x < 1)
+ fun_l9_n863(x)
+ else
+ fun_l9_n605(x)
+ end
+end
+
+def fun_l8_n325(x)
+ if (x < 1)
+ fun_l9_n566(x)
+ else
+ fun_l9_n592(x)
+ end
+end
+
+def fun_l8_n326(x)
+ if (x < 1)
+ fun_l9_n607(x)
+ else
+ fun_l9_n968(x)
+ end
+end
+
+def fun_l8_n327(x)
+ if (x < 1)
+ fun_l9_n36(x)
+ else
+ fun_l9_n380(x)
+ end
+end
+
+def fun_l8_n328(x)
+ if (x < 1)
+ fun_l9_n597(x)
+ else
+ fun_l9_n664(x)
+ end
+end
+
+def fun_l8_n329(x)
+ if (x < 1)
+ fun_l9_n195(x)
+ else
+ fun_l9_n268(x)
+ end
+end
+
+def fun_l8_n330(x)
+ if (x < 1)
+ fun_l9_n419(x)
+ else
+ fun_l9_n715(x)
+ end
+end
+
+def fun_l8_n331(x)
+ if (x < 1)
+ fun_l9_n451(x)
+ else
+ fun_l9_n518(x)
+ end
+end
+
+def fun_l8_n332(x)
+ if (x < 1)
+ fun_l9_n106(x)
+ else
+ fun_l9_n236(x)
+ end
+end
+
+def fun_l8_n333(x)
+ if (x < 1)
+ fun_l9_n611(x)
+ else
+ fun_l9_n825(x)
+ end
+end
+
+def fun_l8_n334(x)
+ if (x < 1)
+ fun_l9_n394(x)
+ else
+ fun_l9_n34(x)
+ end
+end
+
+def fun_l8_n335(x)
+ if (x < 1)
+ fun_l9_n63(x)
+ else
+ fun_l9_n58(x)
+ end
+end
+
+def fun_l8_n336(x)
+ if (x < 1)
+ fun_l9_n475(x)
+ else
+ fun_l9_n455(x)
+ end
+end
+
+def fun_l8_n337(x)
+ if (x < 1)
+ fun_l9_n836(x)
+ else
+ fun_l9_n318(x)
+ end
+end
+
+def fun_l8_n338(x)
+ if (x < 1)
+ fun_l9_n844(x)
+ else
+ fun_l9_n21(x)
+ end
+end
+
+def fun_l8_n339(x)
+ if (x < 1)
+ fun_l9_n628(x)
+ else
+ fun_l9_n721(x)
+ end
+end
+
+def fun_l8_n340(x)
+ if (x < 1)
+ fun_l9_n966(x)
+ else
+ fun_l9_n833(x)
+ end
+end
+
+def fun_l8_n341(x)
+ if (x < 1)
+ fun_l9_n267(x)
+ else
+ fun_l9_n28(x)
+ end
+end
+
+def fun_l8_n342(x)
+ if (x < 1)
+ fun_l9_n204(x)
+ else
+ fun_l9_n838(x)
+ end
+end
+
+def fun_l8_n343(x)
+ if (x < 1)
+ fun_l9_n151(x)
+ else
+ fun_l9_n382(x)
+ end
+end
+
+def fun_l8_n344(x)
+ if (x < 1)
+ fun_l9_n409(x)
+ else
+ fun_l9_n591(x)
+ end
+end
+
+def fun_l8_n345(x)
+ if (x < 1)
+ fun_l9_n680(x)
+ else
+ fun_l9_n912(x)
+ end
+end
+
+def fun_l8_n346(x)
+ if (x < 1)
+ fun_l9_n150(x)
+ else
+ fun_l9_n34(x)
+ end
+end
+
+def fun_l8_n347(x)
+ if (x < 1)
+ fun_l9_n538(x)
+ else
+ fun_l9_n441(x)
+ end
+end
+
+def fun_l8_n348(x)
+ if (x < 1)
+ fun_l9_n707(x)
+ else
+ fun_l9_n199(x)
+ end
+end
+
+def fun_l8_n349(x)
+ if (x < 1)
+ fun_l9_n245(x)
+ else
+ fun_l9_n809(x)
+ end
+end
+
+def fun_l8_n350(x)
+ if (x < 1)
+ fun_l9_n16(x)
+ else
+ fun_l9_n565(x)
+ end
+end
+
+def fun_l8_n351(x)
+ if (x < 1)
+ fun_l9_n857(x)
+ else
+ fun_l9_n37(x)
+ end
+end
+
+def fun_l8_n352(x)
+ if (x < 1)
+ fun_l9_n816(x)
+ else
+ fun_l9_n941(x)
+ end
+end
+
+def fun_l8_n353(x)
+ if (x < 1)
+ fun_l9_n605(x)
+ else
+ fun_l9_n476(x)
+ end
+end
+
+def fun_l8_n354(x)
+ if (x < 1)
+ fun_l9_n641(x)
+ else
+ fun_l9_n319(x)
+ end
+end
+
+def fun_l8_n355(x)
+ if (x < 1)
+ fun_l9_n133(x)
+ else
+ fun_l9_n676(x)
+ end
+end
+
+def fun_l8_n356(x)
+ if (x < 1)
+ fun_l9_n826(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n357(x)
+ if (x < 1)
+ fun_l9_n17(x)
+ else
+ fun_l9_n486(x)
+ end
+end
+
+def fun_l8_n358(x)
+ if (x < 1)
+ fun_l9_n90(x)
+ else
+ fun_l9_n744(x)
+ end
+end
+
+def fun_l8_n359(x)
+ if (x < 1)
+ fun_l9_n745(x)
+ else
+ fun_l9_n158(x)
+ end
+end
+
+def fun_l8_n360(x)
+ if (x < 1)
+ fun_l9_n261(x)
+ else
+ fun_l9_n878(x)
+ end
+end
+
+def fun_l8_n361(x)
+ if (x < 1)
+ fun_l9_n832(x)
+ else
+ fun_l9_n905(x)
+ end
+end
+
+def fun_l8_n362(x)
+ if (x < 1)
+ fun_l9_n879(x)
+ else
+ fun_l9_n475(x)
+ end
+end
+
+def fun_l8_n363(x)
+ if (x < 1)
+ fun_l9_n586(x)
+ else
+ fun_l9_n272(x)
+ end
+end
+
+def fun_l8_n364(x)
+ if (x < 1)
+ fun_l9_n469(x)
+ else
+ fun_l9_n918(x)
+ end
+end
+
+def fun_l8_n365(x)
+ if (x < 1)
+ fun_l9_n568(x)
+ else
+ fun_l9_n777(x)
+ end
+end
+
+def fun_l8_n366(x)
+ if (x < 1)
+ fun_l9_n662(x)
+ else
+ fun_l9_n957(x)
+ end
+end
+
+def fun_l8_n367(x)
+ if (x < 1)
+ fun_l9_n26(x)
+ else
+ fun_l9_n593(x)
+ end
+end
+
+def fun_l8_n368(x)
+ if (x < 1)
+ fun_l9_n766(x)
+ else
+ fun_l9_n598(x)
+ end
+end
+
+def fun_l8_n369(x)
+ if (x < 1)
+ fun_l9_n362(x)
+ else
+ fun_l9_n491(x)
+ end
+end
+
+def fun_l8_n370(x)
+ if (x < 1)
+ fun_l9_n205(x)
+ else
+ fun_l9_n585(x)
+ end
+end
+
+def fun_l8_n371(x)
+ if (x < 1)
+ fun_l9_n301(x)
+ else
+ fun_l9_n796(x)
+ end
+end
+
+def fun_l8_n372(x)
+ if (x < 1)
+ fun_l9_n527(x)
+ else
+ fun_l9_n31(x)
+ end
+end
+
+def fun_l8_n373(x)
+ if (x < 1)
+ fun_l9_n461(x)
+ else
+ fun_l9_n42(x)
+ end
+end
+
+def fun_l8_n374(x)
+ if (x < 1)
+ fun_l9_n288(x)
+ else
+ fun_l9_n534(x)
+ end
+end
+
+def fun_l8_n375(x)
+ if (x < 1)
+ fun_l9_n558(x)
+ else
+ fun_l9_n403(x)
+ end
+end
+
+def fun_l8_n376(x)
+ if (x < 1)
+ fun_l9_n835(x)
+ else
+ fun_l9_n390(x)
+ end
+end
+
+def fun_l8_n377(x)
+ if (x < 1)
+ fun_l9_n658(x)
+ else
+ fun_l9_n768(x)
+ end
+end
+
+def fun_l8_n378(x)
+ if (x < 1)
+ fun_l9_n856(x)
+ else
+ fun_l9_n299(x)
+ end
+end
+
+def fun_l8_n379(x)
+ if (x < 1)
+ fun_l9_n196(x)
+ else
+ fun_l9_n540(x)
+ end
+end
+
+def fun_l8_n380(x)
+ if (x < 1)
+ fun_l9_n70(x)
+ else
+ fun_l9_n627(x)
+ end
+end
+
+def fun_l8_n381(x)
+ if (x < 1)
+ fun_l9_n28(x)
+ else
+ fun_l9_n377(x)
+ end
+end
+
+def fun_l8_n382(x)
+ if (x < 1)
+ fun_l9_n955(x)
+ else
+ fun_l9_n124(x)
+ end
+end
+
+def fun_l8_n383(x)
+ if (x < 1)
+ fun_l9_n16(x)
+ else
+ fun_l9_n783(x)
+ end
+end
+
+def fun_l8_n384(x)
+ if (x < 1)
+ fun_l9_n843(x)
+ else
+ fun_l9_n801(x)
+ end
+end
+
+def fun_l8_n385(x)
+ if (x < 1)
+ fun_l9_n876(x)
+ else
+ fun_l9_n152(x)
+ end
+end
+
+def fun_l8_n386(x)
+ if (x < 1)
+ fun_l9_n6(x)
+ else
+ fun_l9_n432(x)
+ end
+end
+
+def fun_l8_n387(x)
+ if (x < 1)
+ fun_l9_n636(x)
+ else
+ fun_l9_n325(x)
+ end
+end
+
+def fun_l8_n388(x)
+ if (x < 1)
+ fun_l9_n267(x)
+ else
+ fun_l9_n716(x)
+ end
+end
+
+def fun_l8_n389(x)
+ if (x < 1)
+ fun_l9_n898(x)
+ else
+ fun_l9_n776(x)
+ end
+end
+
+def fun_l8_n390(x)
+ if (x < 1)
+ fun_l9_n481(x)
+ else
+ fun_l9_n878(x)
+ end
+end
+
+def fun_l8_n391(x)
+ if (x < 1)
+ fun_l9_n398(x)
+ else
+ fun_l9_n159(x)
+ end
+end
+
+def fun_l8_n392(x)
+ if (x < 1)
+ fun_l9_n889(x)
+ else
+ fun_l9_n517(x)
+ end
+end
+
+def fun_l8_n393(x)
+ if (x < 1)
+ fun_l9_n460(x)
+ else
+ fun_l9_n440(x)
+ end
+end
+
+def fun_l8_n394(x)
+ if (x < 1)
+ fun_l9_n576(x)
+ else
+ fun_l9_n421(x)
+ end
+end
+
+def fun_l8_n395(x)
+ if (x < 1)
+ fun_l9_n310(x)
+ else
+ fun_l9_n646(x)
+ end
+end
+
+def fun_l8_n396(x)
+ if (x < 1)
+ fun_l9_n914(x)
+ else
+ fun_l9_n414(x)
+ end
+end
+
+def fun_l8_n397(x)
+ if (x < 1)
+ fun_l9_n330(x)
+ else
+ fun_l9_n520(x)
+ end
+end
+
+def fun_l8_n398(x)
+ if (x < 1)
+ fun_l9_n175(x)
+ else
+ fun_l9_n975(x)
+ end
+end
+
+def fun_l8_n399(x)
+ if (x < 1)
+ fun_l9_n443(x)
+ else
+ fun_l9_n964(x)
+ end
+end
+
+def fun_l8_n400(x)
+ if (x < 1)
+ fun_l9_n810(x)
+ else
+ fun_l9_n102(x)
+ end
+end
+
+def fun_l8_n401(x)
+ if (x < 1)
+ fun_l9_n352(x)
+ else
+ fun_l9_n295(x)
+ end
+end
+
+def fun_l8_n402(x)
+ if (x < 1)
+ fun_l9_n980(x)
+ else
+ fun_l9_n974(x)
+ end
+end
+
+def fun_l8_n403(x)
+ if (x < 1)
+ fun_l9_n169(x)
+ else
+ fun_l9_n877(x)
+ end
+end
+
+def fun_l8_n404(x)
+ if (x < 1)
+ fun_l9_n333(x)
+ else
+ fun_l9_n306(x)
+ end
+end
+
+def fun_l8_n405(x)
+ if (x < 1)
+ fun_l9_n183(x)
+ else
+ fun_l9_n704(x)
+ end
+end
+
+def fun_l8_n406(x)
+ if (x < 1)
+ fun_l9_n532(x)
+ else
+ fun_l9_n684(x)
+ end
+end
+
+def fun_l8_n407(x)
+ if (x < 1)
+ fun_l9_n526(x)
+ else
+ fun_l9_n287(x)
+ end
+end
+
+def fun_l8_n408(x)
+ if (x < 1)
+ fun_l9_n377(x)
+ else
+ fun_l9_n351(x)
+ end
+end
+
+def fun_l8_n409(x)
+ if (x < 1)
+ fun_l9_n770(x)
+ else
+ fun_l9_n738(x)
+ end
+end
+
+def fun_l8_n410(x)
+ if (x < 1)
+ fun_l9_n61(x)
+ else
+ fun_l9_n499(x)
+ end
+end
+
+def fun_l8_n411(x)
+ if (x < 1)
+ fun_l9_n156(x)
+ else
+ fun_l9_n247(x)
+ end
+end
+
+def fun_l8_n412(x)
+ if (x < 1)
+ fun_l9_n431(x)
+ else
+ fun_l9_n636(x)
+ end
+end
+
+def fun_l8_n413(x)
+ if (x < 1)
+ fun_l9_n540(x)
+ else
+ fun_l9_n329(x)
+ end
+end
+
+def fun_l8_n414(x)
+ if (x < 1)
+ fun_l9_n49(x)
+ else
+ fun_l9_n979(x)
+ end
+end
+
+def fun_l8_n415(x)
+ if (x < 1)
+ fun_l9_n94(x)
+ else
+ fun_l9_n487(x)
+ end
+end
+
+def fun_l8_n416(x)
+ if (x < 1)
+ fun_l9_n679(x)
+ else
+ fun_l9_n644(x)
+ end
+end
+
+def fun_l8_n417(x)
+ if (x < 1)
+ fun_l9_n907(x)
+ else
+ fun_l9_n324(x)
+ end
+end
+
+def fun_l8_n418(x)
+ if (x < 1)
+ fun_l9_n426(x)
+ else
+ fun_l9_n495(x)
+ end
+end
+
+def fun_l8_n419(x)
+ if (x < 1)
+ fun_l9_n273(x)
+ else
+ fun_l9_n838(x)
+ end
+end
+
+def fun_l8_n420(x)
+ if (x < 1)
+ fun_l9_n631(x)
+ else
+ fun_l9_n205(x)
+ end
+end
+
+def fun_l8_n421(x)
+ if (x < 1)
+ fun_l9_n484(x)
+ else
+ fun_l9_n80(x)
+ end
+end
+
+def fun_l8_n422(x)
+ if (x < 1)
+ fun_l9_n908(x)
+ else
+ fun_l9_n514(x)
+ end
+end
+
+def fun_l8_n423(x)
+ if (x < 1)
+ fun_l9_n265(x)
+ else
+ fun_l9_n190(x)
+ end
+end
+
+def fun_l8_n424(x)
+ if (x < 1)
+ fun_l9_n463(x)
+ else
+ fun_l9_n714(x)
+ end
+end
+
+def fun_l8_n425(x)
+ if (x < 1)
+ fun_l9_n780(x)
+ else
+ fun_l9_n444(x)
+ end
+end
+
+def fun_l8_n426(x)
+ if (x < 1)
+ fun_l9_n418(x)
+ else
+ fun_l9_n518(x)
+ end
+end
+
+def fun_l8_n427(x)
+ if (x < 1)
+ fun_l9_n912(x)
+ else
+ fun_l9_n27(x)
+ end
+end
+
+def fun_l8_n428(x)
+ if (x < 1)
+ fun_l9_n157(x)
+ else
+ fun_l9_n547(x)
+ end
+end
+
+def fun_l8_n429(x)
+ if (x < 1)
+ fun_l9_n760(x)
+ else
+ fun_l9_n466(x)
+ end
+end
+
+def fun_l8_n430(x)
+ if (x < 1)
+ fun_l9_n726(x)
+ else
+ fun_l9_n609(x)
+ end
+end
+
+def fun_l8_n431(x)
+ if (x < 1)
+ fun_l9_n206(x)
+ else
+ fun_l9_n65(x)
+ end
+end
+
+def fun_l8_n432(x)
+ if (x < 1)
+ fun_l9_n396(x)
+ else
+ fun_l9_n325(x)
+ end
+end
+
+def fun_l8_n433(x)
+ if (x < 1)
+ fun_l9_n100(x)
+ else
+ fun_l9_n519(x)
+ end
+end
+
+def fun_l8_n434(x)
+ if (x < 1)
+ fun_l9_n923(x)
+ else
+ fun_l9_n387(x)
+ end
+end
+
+def fun_l8_n435(x)
+ if (x < 1)
+ fun_l9_n334(x)
+ else
+ fun_l9_n866(x)
+ end
+end
+
+def fun_l8_n436(x)
+ if (x < 1)
+ fun_l9_n896(x)
+ else
+ fun_l9_n780(x)
+ end
+end
+
+def fun_l8_n437(x)
+ if (x < 1)
+ fun_l9_n328(x)
+ else
+ fun_l9_n776(x)
+ end
+end
+
+def fun_l8_n438(x)
+ if (x < 1)
+ fun_l9_n414(x)
+ else
+ fun_l9_n884(x)
+ end
+end
+
+def fun_l8_n439(x)
+ if (x < 1)
+ fun_l9_n528(x)
+ else
+ fun_l9_n419(x)
+ end
+end
+
+def fun_l8_n440(x)
+ if (x < 1)
+ fun_l9_n192(x)
+ else
+ fun_l9_n973(x)
+ end
+end
+
+def fun_l8_n441(x)
+ if (x < 1)
+ fun_l9_n679(x)
+ else
+ fun_l9_n135(x)
+ end
+end
+
+def fun_l8_n442(x)
+ if (x < 1)
+ fun_l9_n294(x)
+ else
+ fun_l9_n138(x)
+ end
+end
+
+def fun_l8_n443(x)
+ if (x < 1)
+ fun_l9_n784(x)
+ else
+ fun_l9_n940(x)
+ end
+end
+
+def fun_l8_n444(x)
+ if (x < 1)
+ fun_l9_n834(x)
+ else
+ fun_l9_n127(x)
+ end
+end
+
+def fun_l8_n445(x)
+ if (x < 1)
+ fun_l9_n217(x)
+ else
+ fun_l9_n788(x)
+ end
+end
+
+def fun_l8_n446(x)
+ if (x < 1)
+ fun_l9_n173(x)
+ else
+ fun_l9_n49(x)
+ end
+end
+
+def fun_l8_n447(x)
+ if (x < 1)
+ fun_l9_n493(x)
+ else
+ fun_l9_n384(x)
+ end
+end
+
+def fun_l8_n448(x)
+ if (x < 1)
+ fun_l9_n770(x)
+ else
+ fun_l9_n761(x)
+ end
+end
+
+def fun_l8_n449(x)
+ if (x < 1)
+ fun_l9_n633(x)
+ else
+ fun_l9_n555(x)
+ end
+end
+
+def fun_l8_n450(x)
+ if (x < 1)
+ fun_l9_n25(x)
+ else
+ fun_l9_n714(x)
+ end
+end
+
+def fun_l8_n451(x)
+ if (x < 1)
+ fun_l9_n960(x)
+ else
+ fun_l9_n371(x)
+ end
+end
+
+def fun_l8_n452(x)
+ if (x < 1)
+ fun_l9_n733(x)
+ else
+ fun_l9_n996(x)
+ end
+end
+
+def fun_l8_n453(x)
+ if (x < 1)
+ fun_l9_n628(x)
+ else
+ fun_l9_n512(x)
+ end
+end
+
+def fun_l8_n454(x)
+ if (x < 1)
+ fun_l9_n406(x)
+ else
+ fun_l9_n671(x)
+ end
+end
+
+def fun_l8_n455(x)
+ if (x < 1)
+ fun_l9_n47(x)
+ else
+ fun_l9_n102(x)
+ end
+end
+
+def fun_l8_n456(x)
+ if (x < 1)
+ fun_l9_n85(x)
+ else
+ fun_l9_n591(x)
+ end
+end
+
+def fun_l8_n457(x)
+ if (x < 1)
+ fun_l9_n234(x)
+ else
+ fun_l9_n209(x)
+ end
+end
+
+def fun_l8_n458(x)
+ if (x < 1)
+ fun_l9_n186(x)
+ else
+ fun_l9_n928(x)
+ end
+end
+
+def fun_l8_n459(x)
+ if (x < 1)
+ fun_l9_n36(x)
+ else
+ fun_l9_n783(x)
+ end
+end
+
+def fun_l8_n460(x)
+ if (x < 1)
+ fun_l9_n775(x)
+ else
+ fun_l9_n641(x)
+ end
+end
+
+def fun_l8_n461(x)
+ if (x < 1)
+ fun_l9_n426(x)
+ else
+ fun_l9_n740(x)
+ end
+end
+
+def fun_l8_n462(x)
+ if (x < 1)
+ fun_l9_n770(x)
+ else
+ fun_l9_n113(x)
+ end
+end
+
+def fun_l8_n463(x)
+ if (x < 1)
+ fun_l9_n94(x)
+ else
+ fun_l9_n574(x)
+ end
+end
+
+def fun_l8_n464(x)
+ if (x < 1)
+ fun_l9_n457(x)
+ else
+ fun_l9_n776(x)
+ end
+end
+
+def fun_l8_n465(x)
+ if (x < 1)
+ fun_l9_n252(x)
+ else
+ fun_l9_n182(x)
+ end
+end
+
+def fun_l8_n466(x)
+ if (x < 1)
+ fun_l9_n157(x)
+ else
+ fun_l9_n849(x)
+ end
+end
+
+def fun_l8_n467(x)
+ if (x < 1)
+ fun_l9_n393(x)
+ else
+ fun_l9_n437(x)
+ end
+end
+
+def fun_l8_n468(x)
+ if (x < 1)
+ fun_l9_n269(x)
+ else
+ fun_l9_n381(x)
+ end
+end
+
+def fun_l8_n469(x)
+ if (x < 1)
+ fun_l9_n97(x)
+ else
+ fun_l9_n184(x)
+ end
+end
+
+def fun_l8_n470(x)
+ if (x < 1)
+ fun_l9_n157(x)
+ else
+ fun_l9_n621(x)
+ end
+end
+
+def fun_l8_n471(x)
+ if (x < 1)
+ fun_l9_n627(x)
+ else
+ fun_l9_n793(x)
+ end
+end
+
+def fun_l8_n472(x)
+ if (x < 1)
+ fun_l9_n117(x)
+ else
+ fun_l9_n318(x)
+ end
+end
+
+def fun_l8_n473(x)
+ if (x < 1)
+ fun_l9_n238(x)
+ else
+ fun_l9_n559(x)
+ end
+end
+
+def fun_l8_n474(x)
+ if (x < 1)
+ fun_l9_n81(x)
+ else
+ fun_l9_n355(x)
+ end
+end
+
+def fun_l8_n475(x)
+ if (x < 1)
+ fun_l9_n889(x)
+ else
+ fun_l9_n940(x)
+ end
+end
+
+def fun_l8_n476(x)
+ if (x < 1)
+ fun_l9_n358(x)
+ else
+ fun_l9_n52(x)
+ end
+end
+
+def fun_l8_n477(x)
+ if (x < 1)
+ fun_l9_n144(x)
+ else
+ fun_l9_n575(x)
+ end
+end
+
+def fun_l8_n478(x)
+ if (x < 1)
+ fun_l9_n975(x)
+ else
+ fun_l9_n740(x)
+ end
+end
+
+def fun_l8_n479(x)
+ if (x < 1)
+ fun_l9_n552(x)
+ else
+ fun_l9_n169(x)
+ end
+end
+
+def fun_l8_n480(x)
+ if (x < 1)
+ fun_l9_n854(x)
+ else
+ fun_l9_n524(x)
+ end
+end
+
+def fun_l8_n481(x)
+ if (x < 1)
+ fun_l9_n461(x)
+ else
+ fun_l9_n65(x)
+ end
+end
+
+def fun_l8_n482(x)
+ if (x < 1)
+ fun_l9_n809(x)
+ else
+ fun_l9_n844(x)
+ end
+end
+
+def fun_l8_n483(x)
+ if (x < 1)
+ fun_l9_n741(x)
+ else
+ fun_l9_n327(x)
+ end
+end
+
+def fun_l8_n484(x)
+ if (x < 1)
+ fun_l9_n560(x)
+ else
+ fun_l9_n385(x)
+ end
+end
+
+def fun_l8_n485(x)
+ if (x < 1)
+ fun_l9_n798(x)
+ else
+ fun_l9_n154(x)
+ end
+end
+
+def fun_l8_n486(x)
+ if (x < 1)
+ fun_l9_n892(x)
+ else
+ fun_l9_n367(x)
+ end
+end
+
+def fun_l8_n487(x)
+ if (x < 1)
+ fun_l9_n423(x)
+ else
+ fun_l9_n723(x)
+ end
+end
+
+def fun_l8_n488(x)
+ if (x < 1)
+ fun_l9_n618(x)
+ else
+ fun_l9_n649(x)
+ end
+end
+
+def fun_l8_n489(x)
+ if (x < 1)
+ fun_l9_n261(x)
+ else
+ fun_l9_n495(x)
+ end
+end
+
+def fun_l8_n490(x)
+ if (x < 1)
+ fun_l9_n566(x)
+ else
+ fun_l9_n405(x)
+ end
+end
+
+def fun_l8_n491(x)
+ if (x < 1)
+ fun_l9_n718(x)
+ else
+ fun_l9_n674(x)
+ end
+end
+
+def fun_l8_n492(x)
+ if (x < 1)
+ fun_l9_n487(x)
+ else
+ fun_l9_n95(x)
+ end
+end
+
+def fun_l8_n493(x)
+ if (x < 1)
+ fun_l9_n473(x)
+ else
+ fun_l9_n722(x)
+ end
+end
+
+def fun_l8_n494(x)
+ if (x < 1)
+ fun_l9_n460(x)
+ else
+ fun_l9_n157(x)
+ end
+end
+
+def fun_l8_n495(x)
+ if (x < 1)
+ fun_l9_n812(x)
+ else
+ fun_l9_n807(x)
+ end
+end
+
+def fun_l8_n496(x)
+ if (x < 1)
+ fun_l9_n609(x)
+ else
+ fun_l9_n697(x)
+ end
+end
+
+def fun_l8_n497(x)
+ if (x < 1)
+ fun_l9_n894(x)
+ else
+ fun_l9_n580(x)
+ end
+end
+
+def fun_l8_n498(x)
+ if (x < 1)
+ fun_l9_n642(x)
+ else
+ fun_l9_n13(x)
+ end
+end
+
+def fun_l8_n499(x)
+ if (x < 1)
+ fun_l9_n961(x)
+ else
+ fun_l9_n669(x)
+ end
+end
+
+def fun_l8_n500(x)
+ if (x < 1)
+ fun_l9_n587(x)
+ else
+ fun_l9_n828(x)
+ end
+end
+
+def fun_l8_n501(x)
+ if (x < 1)
+ fun_l9_n30(x)
+ else
+ fun_l9_n966(x)
+ end
+end
+
+def fun_l8_n502(x)
+ if (x < 1)
+ fun_l9_n436(x)
+ else
+ fun_l9_n170(x)
+ end
+end
+
+def fun_l8_n503(x)
+ if (x < 1)
+ fun_l9_n20(x)
+ else
+ fun_l9_n927(x)
+ end
+end
+
+def fun_l8_n504(x)
+ if (x < 1)
+ fun_l9_n326(x)
+ else
+ fun_l9_n223(x)
+ end
+end
+
+def fun_l8_n505(x)
+ if (x < 1)
+ fun_l9_n911(x)
+ else
+ fun_l9_n746(x)
+ end
+end
+
+def fun_l8_n506(x)
+ if (x < 1)
+ fun_l9_n333(x)
+ else
+ fun_l9_n773(x)
+ end
+end
+
+def fun_l8_n507(x)
+ if (x < 1)
+ fun_l9_n514(x)
+ else
+ fun_l9_n882(x)
+ end
+end
+
+def fun_l8_n508(x)
+ if (x < 1)
+ fun_l9_n918(x)
+ else
+ fun_l9_n713(x)
+ end
+end
+
+def fun_l8_n509(x)
+ if (x < 1)
+ fun_l9_n694(x)
+ else
+ fun_l9_n950(x)
+ end
+end
+
+def fun_l8_n510(x)
+ if (x < 1)
+ fun_l9_n77(x)
+ else
+ fun_l9_n65(x)
+ end
+end
+
+def fun_l8_n511(x)
+ if (x < 1)
+ fun_l9_n506(x)
+ else
+ fun_l9_n144(x)
+ end
+end
+
+def fun_l8_n512(x)
+ if (x < 1)
+ fun_l9_n69(x)
+ else
+ fun_l9_n308(x)
+ end
+end
+
+def fun_l8_n513(x)
+ if (x < 1)
+ fun_l9_n377(x)
+ else
+ fun_l9_n531(x)
+ end
+end
+
+def fun_l8_n514(x)
+ if (x < 1)
+ fun_l9_n342(x)
+ else
+ fun_l9_n265(x)
+ end
+end
+
+def fun_l8_n515(x)
+ if (x < 1)
+ fun_l9_n453(x)
+ else
+ fun_l9_n227(x)
+ end
+end
+
+def fun_l8_n516(x)
+ if (x < 1)
+ fun_l9_n396(x)
+ else
+ fun_l9_n130(x)
+ end
+end
+
+def fun_l8_n517(x)
+ if (x < 1)
+ fun_l9_n715(x)
+ else
+ fun_l9_n953(x)
+ end
+end
+
+def fun_l8_n518(x)
+ if (x < 1)
+ fun_l9_n326(x)
+ else
+ fun_l9_n949(x)
+ end
+end
+
+def fun_l8_n519(x)
+ if (x < 1)
+ fun_l9_n535(x)
+ else
+ fun_l9_n41(x)
+ end
+end
+
+def fun_l8_n520(x)
+ if (x < 1)
+ fun_l9_n985(x)
+ else
+ fun_l9_n942(x)
+ end
+end
+
+def fun_l8_n521(x)
+ if (x < 1)
+ fun_l9_n347(x)
+ else
+ fun_l9_n263(x)
+ end
+end
+
+def fun_l8_n522(x)
+ if (x < 1)
+ fun_l9_n532(x)
+ else
+ fun_l9_n378(x)
+ end
+end
+
+def fun_l8_n523(x)
+ if (x < 1)
+ fun_l9_n362(x)
+ else
+ fun_l9_n630(x)
+ end
+end
+
+def fun_l8_n524(x)
+ if (x < 1)
+ fun_l9_n382(x)
+ else
+ fun_l9_n256(x)
+ end
+end
+
+def fun_l8_n525(x)
+ if (x < 1)
+ fun_l9_n444(x)
+ else
+ fun_l9_n756(x)
+ end
+end
+
+def fun_l8_n526(x)
+ if (x < 1)
+ fun_l9_n5(x)
+ else
+ fun_l9_n754(x)
+ end
+end
+
+def fun_l8_n527(x)
+ if (x < 1)
+ fun_l9_n157(x)
+ else
+ fun_l9_n279(x)
+ end
+end
+
+def fun_l8_n528(x)
+ if (x < 1)
+ fun_l9_n110(x)
+ else
+ fun_l9_n246(x)
+ end
+end
+
+def fun_l8_n529(x)
+ if (x < 1)
+ fun_l9_n312(x)
+ else
+ fun_l9_n890(x)
+ end
+end
+
+def fun_l8_n530(x)
+ if (x < 1)
+ fun_l9_n624(x)
+ else
+ fun_l9_n548(x)
+ end
+end
+
+def fun_l8_n531(x)
+ if (x < 1)
+ fun_l9_n615(x)
+ else
+ fun_l9_n948(x)
+ end
+end
+
+def fun_l8_n532(x)
+ if (x < 1)
+ fun_l9_n519(x)
+ else
+ fun_l9_n583(x)
+ end
+end
+
+def fun_l8_n533(x)
+ if (x < 1)
+ fun_l9_n292(x)
+ else
+ fun_l9_n827(x)
+ end
+end
+
+def fun_l8_n534(x)
+ if (x < 1)
+ fun_l9_n893(x)
+ else
+ fun_l9_n877(x)
+ end
+end
+
+def fun_l8_n535(x)
+ if (x < 1)
+ fun_l9_n873(x)
+ else
+ fun_l9_n399(x)
+ end
+end
+
+def fun_l8_n536(x)
+ if (x < 1)
+ fun_l9_n497(x)
+ else
+ fun_l9_n507(x)
+ end
+end
+
+def fun_l8_n537(x)
+ if (x < 1)
+ fun_l9_n404(x)
+ else
+ fun_l9_n815(x)
+ end
+end
+
+def fun_l8_n538(x)
+ if (x < 1)
+ fun_l9_n258(x)
+ else
+ fun_l9_n810(x)
+ end
+end
+
+def fun_l8_n539(x)
+ if (x < 1)
+ fun_l9_n907(x)
+ else
+ fun_l9_n720(x)
+ end
+end
+
+def fun_l8_n540(x)
+ if (x < 1)
+ fun_l9_n752(x)
+ else
+ fun_l9_n597(x)
+ end
+end
+
+def fun_l8_n541(x)
+ if (x < 1)
+ fun_l9_n802(x)
+ else
+ fun_l9_n45(x)
+ end
+end
+
+def fun_l8_n542(x)
+ if (x < 1)
+ fun_l9_n635(x)
+ else
+ fun_l9_n470(x)
+ end
+end
+
+def fun_l8_n543(x)
+ if (x < 1)
+ fun_l9_n353(x)
+ else
+ fun_l9_n238(x)
+ end
+end
+
+def fun_l8_n544(x)
+ if (x < 1)
+ fun_l9_n656(x)
+ else
+ fun_l9_n569(x)
+ end
+end
+
+def fun_l8_n545(x)
+ if (x < 1)
+ fun_l9_n494(x)
+ else
+ fun_l9_n566(x)
+ end
+end
+
+def fun_l8_n546(x)
+ if (x < 1)
+ fun_l9_n65(x)
+ else
+ fun_l9_n896(x)
+ end
+end
+
+def fun_l8_n547(x)
+ if (x < 1)
+ fun_l9_n995(x)
+ else
+ fun_l9_n727(x)
+ end
+end
+
+def fun_l8_n548(x)
+ if (x < 1)
+ fun_l9_n562(x)
+ else
+ fun_l9_n759(x)
+ end
+end
+
+def fun_l8_n549(x)
+ if (x < 1)
+ fun_l9_n210(x)
+ else
+ fun_l9_n734(x)
+ end
+end
+
+def fun_l8_n550(x)
+ if (x < 1)
+ fun_l9_n482(x)
+ else
+ fun_l9_n11(x)
+ end
+end
+
+def fun_l8_n551(x)
+ if (x < 1)
+ fun_l9_n86(x)
+ else
+ fun_l9_n867(x)
+ end
+end
+
+def fun_l8_n552(x)
+ if (x < 1)
+ fun_l9_n647(x)
+ else
+ fun_l9_n293(x)
+ end
+end
+
+def fun_l8_n553(x)
+ if (x < 1)
+ fun_l9_n98(x)
+ else
+ fun_l9_n868(x)
+ end
+end
+
+def fun_l8_n554(x)
+ if (x < 1)
+ fun_l9_n380(x)
+ else
+ fun_l9_n2(x)
+ end
+end
+
+def fun_l8_n555(x)
+ if (x < 1)
+ fun_l9_n274(x)
+ else
+ fun_l9_n489(x)
+ end
+end
+
+def fun_l8_n556(x)
+ if (x < 1)
+ fun_l9_n623(x)
+ else
+ fun_l9_n848(x)
+ end
+end
+
+def fun_l8_n557(x)
+ if (x < 1)
+ fun_l9_n642(x)
+ else
+ fun_l9_n890(x)
+ end
+end
+
+def fun_l8_n558(x)
+ if (x < 1)
+ fun_l9_n247(x)
+ else
+ fun_l9_n65(x)
+ end
+end
+
+def fun_l8_n559(x)
+ if (x < 1)
+ fun_l9_n896(x)
+ else
+ fun_l9_n937(x)
+ end
+end
+
+def fun_l8_n560(x)
+ if (x < 1)
+ fun_l9_n592(x)
+ else
+ fun_l9_n211(x)
+ end
+end
+
+def fun_l8_n561(x)
+ if (x < 1)
+ fun_l9_n205(x)
+ else
+ fun_l9_n971(x)
+ end
+end
+
+def fun_l8_n562(x)
+ if (x < 1)
+ fun_l9_n663(x)
+ else
+ fun_l9_n147(x)
+ end
+end
+
+def fun_l8_n563(x)
+ if (x < 1)
+ fun_l9_n722(x)
+ else
+ fun_l9_n649(x)
+ end
+end
+
+def fun_l8_n564(x)
+ if (x < 1)
+ fun_l9_n605(x)
+ else
+ fun_l9_n58(x)
+ end
+end
+
+def fun_l8_n565(x)
+ if (x < 1)
+ fun_l9_n914(x)
+ else
+ fun_l9_n617(x)
+ end
+end
+
+def fun_l8_n566(x)
+ if (x < 1)
+ fun_l9_n772(x)
+ else
+ fun_l9_n428(x)
+ end
+end
+
+def fun_l8_n567(x)
+ if (x < 1)
+ fun_l9_n870(x)
+ else
+ fun_l9_n672(x)
+ end
+end
+
+def fun_l8_n568(x)
+ if (x < 1)
+ fun_l9_n946(x)
+ else
+ fun_l9_n465(x)
+ end
+end
+
+def fun_l8_n569(x)
+ if (x < 1)
+ fun_l9_n507(x)
+ else
+ fun_l9_n346(x)
+ end
+end
+
+def fun_l8_n570(x)
+ if (x < 1)
+ fun_l9_n157(x)
+ else
+ fun_l9_n70(x)
+ end
+end
+
+def fun_l8_n571(x)
+ if (x < 1)
+ fun_l9_n549(x)
+ else
+ fun_l9_n831(x)
+ end
+end
+
+def fun_l8_n572(x)
+ if (x < 1)
+ fun_l9_n463(x)
+ else
+ fun_l9_n843(x)
+ end
+end
+
+def fun_l8_n573(x)
+ if (x < 1)
+ fun_l9_n676(x)
+ else
+ fun_l9_n651(x)
+ end
+end
+
+def fun_l8_n574(x)
+ if (x < 1)
+ fun_l9_n648(x)
+ else
+ fun_l9_n562(x)
+ end
+end
+
+def fun_l8_n575(x)
+ if (x < 1)
+ fun_l9_n771(x)
+ else
+ fun_l9_n549(x)
+ end
+end
+
+def fun_l8_n576(x)
+ if (x < 1)
+ fun_l9_n899(x)
+ else
+ fun_l9_n436(x)
+ end
+end
+
+def fun_l8_n577(x)
+ if (x < 1)
+ fun_l9_n110(x)
+ else
+ fun_l9_n708(x)
+ end
+end
+
+def fun_l8_n578(x)
+ if (x < 1)
+ fun_l9_n49(x)
+ else
+ fun_l9_n559(x)
+ end
+end
+
+def fun_l8_n579(x)
+ if (x < 1)
+ fun_l9_n937(x)
+ else
+ fun_l9_n962(x)
+ end
+end
+
+def fun_l8_n580(x)
+ if (x < 1)
+ fun_l9_n970(x)
+ else
+ fun_l9_n203(x)
+ end
+end
+
+def fun_l8_n581(x)
+ if (x < 1)
+ fun_l9_n901(x)
+ else
+ fun_l9_n666(x)
+ end
+end
+
+def fun_l8_n582(x)
+ if (x < 1)
+ fun_l9_n79(x)
+ else
+ fun_l9_n260(x)
+ end
+end
+
+def fun_l8_n583(x)
+ if (x < 1)
+ fun_l9_n167(x)
+ else
+ fun_l9_n512(x)
+ end
+end
+
+def fun_l8_n584(x)
+ if (x < 1)
+ fun_l9_n750(x)
+ else
+ fun_l9_n406(x)
+ end
+end
+
+def fun_l8_n585(x)
+ if (x < 1)
+ fun_l9_n118(x)
+ else
+ fun_l9_n525(x)
+ end
+end
+
+def fun_l8_n586(x)
+ if (x < 1)
+ fun_l9_n573(x)
+ else
+ fun_l9_n657(x)
+ end
+end
+
+def fun_l8_n587(x)
+ if (x < 1)
+ fun_l9_n228(x)
+ else
+ fun_l9_n903(x)
+ end
+end
+
+def fun_l8_n588(x)
+ if (x < 1)
+ fun_l9_n971(x)
+ else
+ fun_l9_n608(x)
+ end
+end
+
+def fun_l8_n589(x)
+ if (x < 1)
+ fun_l9_n334(x)
+ else
+ fun_l9_n704(x)
+ end
+end
+
+def fun_l8_n590(x)
+ if (x < 1)
+ fun_l9_n398(x)
+ else
+ fun_l9_n500(x)
+ end
+end
+
+def fun_l8_n591(x)
+ if (x < 1)
+ fun_l9_n196(x)
+ else
+ fun_l9_n616(x)
+ end
+end
+
+def fun_l8_n592(x)
+ if (x < 1)
+ fun_l9_n756(x)
+ else
+ fun_l9_n655(x)
+ end
+end
+
+def fun_l8_n593(x)
+ if (x < 1)
+ fun_l9_n864(x)
+ else
+ fun_l9_n697(x)
+ end
+end
+
+def fun_l8_n594(x)
+ if (x < 1)
+ fun_l9_n35(x)
+ else
+ fun_l9_n554(x)
+ end
+end
+
+def fun_l8_n595(x)
+ if (x < 1)
+ fun_l9_n480(x)
+ else
+ fun_l9_n688(x)
+ end
+end
+
+def fun_l8_n596(x)
+ if (x < 1)
+ fun_l9_n846(x)
+ else
+ fun_l9_n403(x)
+ end
+end
+
+def fun_l8_n597(x)
+ if (x < 1)
+ fun_l9_n522(x)
+ else
+ fun_l9_n532(x)
+ end
+end
+
+def fun_l8_n598(x)
+ if (x < 1)
+ fun_l9_n800(x)
+ else
+ fun_l9_n531(x)
+ end
+end
+
+def fun_l8_n599(x)
+ if (x < 1)
+ fun_l9_n64(x)
+ else
+ fun_l9_n876(x)
+ end
+end
+
+def fun_l8_n600(x)
+ if (x < 1)
+ fun_l9_n614(x)
+ else
+ fun_l9_n660(x)
+ end
+end
+
+def fun_l8_n601(x)
+ if (x < 1)
+ fun_l9_n119(x)
+ else
+ fun_l9_n998(x)
+ end
+end
+
+def fun_l8_n602(x)
+ if (x < 1)
+ fun_l9_n549(x)
+ else
+ fun_l9_n911(x)
+ end
+end
+
+def fun_l8_n603(x)
+ if (x < 1)
+ fun_l9_n659(x)
+ else
+ fun_l9_n664(x)
+ end
+end
+
+def fun_l8_n604(x)
+ if (x < 1)
+ fun_l9_n570(x)
+ else
+ fun_l9_n960(x)
+ end
+end
+
+def fun_l8_n605(x)
+ if (x < 1)
+ fun_l9_n82(x)
+ else
+ fun_l9_n658(x)
+ end
+end
+
+def fun_l8_n606(x)
+ if (x < 1)
+ fun_l9_n379(x)
+ else
+ fun_l9_n881(x)
+ end
+end
+
+def fun_l8_n607(x)
+ if (x < 1)
+ fun_l9_n104(x)
+ else
+ fun_l9_n869(x)
+ end
+end
+
+def fun_l8_n608(x)
+ if (x < 1)
+ fun_l9_n874(x)
+ else
+ fun_l9_n63(x)
+ end
+end
+
+def fun_l8_n609(x)
+ if (x < 1)
+ fun_l9_n921(x)
+ else
+ fun_l9_n667(x)
+ end
+end
+
+def fun_l8_n610(x)
+ if (x < 1)
+ fun_l9_n1(x)
+ else
+ fun_l9_n524(x)
+ end
+end
+
+def fun_l8_n611(x)
+ if (x < 1)
+ fun_l9_n523(x)
+ else
+ fun_l9_n230(x)
+ end
+end
+
+def fun_l8_n612(x)
+ if (x < 1)
+ fun_l9_n914(x)
+ else
+ fun_l9_n129(x)
+ end
+end
+
+def fun_l8_n613(x)
+ if (x < 1)
+ fun_l9_n591(x)
+ else
+ fun_l9_n551(x)
+ end
+end
+
+def fun_l8_n614(x)
+ if (x < 1)
+ fun_l9_n860(x)
+ else
+ fun_l9_n358(x)
+ end
+end
+
+def fun_l8_n615(x)
+ if (x < 1)
+ fun_l9_n387(x)
+ else
+ fun_l9_n425(x)
+ end
+end
+
+def fun_l8_n616(x)
+ if (x < 1)
+ fun_l9_n426(x)
+ else
+ fun_l9_n449(x)
+ end
+end
+
+def fun_l8_n617(x)
+ if (x < 1)
+ fun_l9_n627(x)
+ else
+ fun_l9_n399(x)
+ end
+end
+
+def fun_l8_n618(x)
+ if (x < 1)
+ fun_l9_n244(x)
+ else
+ fun_l9_n24(x)
+ end
+end
+
+def fun_l8_n619(x)
+ if (x < 1)
+ fun_l9_n574(x)
+ else
+ fun_l9_n640(x)
+ end
+end
+
+def fun_l8_n620(x)
+ if (x < 1)
+ fun_l9_n20(x)
+ else
+ fun_l9_n6(x)
+ end
+end
+
+def fun_l8_n621(x)
+ if (x < 1)
+ fun_l9_n148(x)
+ else
+ fun_l9_n718(x)
+ end
+end
+
+def fun_l8_n622(x)
+ if (x < 1)
+ fun_l9_n151(x)
+ else
+ fun_l9_n56(x)
+ end
+end
+
+def fun_l8_n623(x)
+ if (x < 1)
+ fun_l9_n672(x)
+ else
+ fun_l9_n93(x)
+ end
+end
+
+def fun_l8_n624(x)
+ if (x < 1)
+ fun_l9_n948(x)
+ else
+ fun_l9_n530(x)
+ end
+end
+
+def fun_l8_n625(x)
+ if (x < 1)
+ fun_l9_n0(x)
+ else
+ fun_l9_n334(x)
+ end
+end
+
+def fun_l8_n626(x)
+ if (x < 1)
+ fun_l9_n736(x)
+ else
+ fun_l9_n922(x)
+ end
+end
+
+def fun_l8_n627(x)
+ if (x < 1)
+ fun_l9_n291(x)
+ else
+ fun_l9_n953(x)
+ end
+end
+
+def fun_l8_n628(x)
+ if (x < 1)
+ fun_l9_n493(x)
+ else
+ fun_l9_n4(x)
+ end
+end
+
+def fun_l8_n629(x)
+ if (x < 1)
+ fun_l9_n890(x)
+ else
+ fun_l9_n297(x)
+ end
+end
+
+def fun_l8_n630(x)
+ if (x < 1)
+ fun_l9_n860(x)
+ else
+ fun_l9_n74(x)
+ end
+end
+
+def fun_l8_n631(x)
+ if (x < 1)
+ fun_l9_n400(x)
+ else
+ fun_l9_n584(x)
+ end
+end
+
+def fun_l8_n632(x)
+ if (x < 1)
+ fun_l9_n714(x)
+ else
+ fun_l9_n200(x)
+ end
+end
+
+def fun_l8_n633(x)
+ if (x < 1)
+ fun_l9_n433(x)
+ else
+ fun_l9_n489(x)
+ end
+end
+
+def fun_l8_n634(x)
+ if (x < 1)
+ fun_l9_n974(x)
+ else
+ fun_l9_n25(x)
+ end
+end
+
+def fun_l8_n635(x)
+ if (x < 1)
+ fun_l9_n739(x)
+ else
+ fun_l9_n695(x)
+ end
+end
+
+def fun_l8_n636(x)
+ if (x < 1)
+ fun_l9_n855(x)
+ else
+ fun_l9_n898(x)
+ end
+end
+
+def fun_l8_n637(x)
+ if (x < 1)
+ fun_l9_n868(x)
+ else
+ fun_l9_n825(x)
+ end
+end
+
+def fun_l8_n638(x)
+ if (x < 1)
+ fun_l9_n537(x)
+ else
+ fun_l9_n417(x)
+ end
+end
+
+def fun_l8_n639(x)
+ if (x < 1)
+ fun_l9_n975(x)
+ else
+ fun_l9_n484(x)
+ end
+end
+
+def fun_l8_n640(x)
+ if (x < 1)
+ fun_l9_n228(x)
+ else
+ fun_l9_n964(x)
+ end
+end
+
+def fun_l8_n641(x)
+ if (x < 1)
+ fun_l9_n743(x)
+ else
+ fun_l9_n986(x)
+ end
+end
+
+def fun_l8_n642(x)
+ if (x < 1)
+ fun_l9_n763(x)
+ else
+ fun_l9_n747(x)
+ end
+end
+
+def fun_l8_n643(x)
+ if (x < 1)
+ fun_l9_n77(x)
+ else
+ fun_l9_n149(x)
+ end
+end
+
+def fun_l8_n644(x)
+ if (x < 1)
+ fun_l9_n393(x)
+ else
+ fun_l9_n694(x)
+ end
+end
+
+def fun_l8_n645(x)
+ if (x < 1)
+ fun_l9_n196(x)
+ else
+ fun_l9_n211(x)
+ end
+end
+
+def fun_l8_n646(x)
+ if (x < 1)
+ fun_l9_n94(x)
+ else
+ fun_l9_n649(x)
+ end
+end
+
+def fun_l8_n647(x)
+ if (x < 1)
+ fun_l9_n669(x)
+ else
+ fun_l9_n12(x)
+ end
+end
+
+def fun_l8_n648(x)
+ if (x < 1)
+ fun_l9_n175(x)
+ else
+ fun_l9_n388(x)
+ end
+end
+
+def fun_l8_n649(x)
+ if (x < 1)
+ fun_l9_n122(x)
+ else
+ fun_l9_n736(x)
+ end
+end
+
+def fun_l8_n650(x)
+ if (x < 1)
+ fun_l9_n817(x)
+ else
+ fun_l9_n274(x)
+ end
+end
+
+def fun_l8_n651(x)
+ if (x < 1)
+ fun_l9_n919(x)
+ else
+ fun_l9_n538(x)
+ end
+end
+
+def fun_l8_n652(x)
+ if (x < 1)
+ fun_l9_n171(x)
+ else
+ fun_l9_n895(x)
+ end
+end
+
+def fun_l8_n653(x)
+ if (x < 1)
+ fun_l9_n417(x)
+ else
+ fun_l9_n618(x)
+ end
+end
+
+def fun_l8_n654(x)
+ if (x < 1)
+ fun_l9_n709(x)
+ else
+ fun_l9_n892(x)
+ end
+end
+
+def fun_l8_n655(x)
+ if (x < 1)
+ fun_l9_n906(x)
+ else
+ fun_l9_n602(x)
+ end
+end
+
+def fun_l8_n656(x)
+ if (x < 1)
+ fun_l9_n769(x)
+ else
+ fun_l9_n554(x)
+ end
+end
+
+def fun_l8_n657(x)
+ if (x < 1)
+ fun_l9_n468(x)
+ else
+ fun_l9_n320(x)
+ end
+end
+
+def fun_l8_n658(x)
+ if (x < 1)
+ fun_l9_n38(x)
+ else
+ fun_l9_n947(x)
+ end
+end
+
+def fun_l8_n659(x)
+ if (x < 1)
+ fun_l9_n635(x)
+ else
+ fun_l9_n327(x)
+ end
+end
+
+def fun_l8_n660(x)
+ if (x < 1)
+ fun_l9_n452(x)
+ else
+ fun_l9_n313(x)
+ end
+end
+
+def fun_l8_n661(x)
+ if (x < 1)
+ fun_l9_n568(x)
+ else
+ fun_l9_n383(x)
+ end
+end
+
+def fun_l8_n662(x)
+ if (x < 1)
+ fun_l9_n795(x)
+ else
+ fun_l9_n680(x)
+ end
+end
+
+def fun_l8_n663(x)
+ if (x < 1)
+ fun_l9_n152(x)
+ else
+ fun_l9_n846(x)
+ end
+end
+
+def fun_l8_n664(x)
+ if (x < 1)
+ fun_l9_n585(x)
+ else
+ fun_l9_n670(x)
+ end
+end
+
+def fun_l8_n665(x)
+ if (x < 1)
+ fun_l9_n133(x)
+ else
+ fun_l9_n799(x)
+ end
+end
+
+def fun_l8_n666(x)
+ if (x < 1)
+ fun_l9_n699(x)
+ else
+ fun_l9_n311(x)
+ end
+end
+
+def fun_l8_n667(x)
+ if (x < 1)
+ fun_l9_n558(x)
+ else
+ fun_l9_n669(x)
+ end
+end
+
+def fun_l8_n668(x)
+ if (x < 1)
+ fun_l9_n825(x)
+ else
+ fun_l9_n534(x)
+ end
+end
+
+def fun_l8_n669(x)
+ if (x < 1)
+ fun_l9_n143(x)
+ else
+ fun_l9_n21(x)
+ end
+end
+
+def fun_l8_n670(x)
+ if (x < 1)
+ fun_l9_n827(x)
+ else
+ fun_l9_n679(x)
+ end
+end
+
+def fun_l8_n671(x)
+ if (x < 1)
+ fun_l9_n704(x)
+ else
+ fun_l9_n922(x)
+ end
+end
+
+def fun_l8_n672(x)
+ if (x < 1)
+ fun_l9_n776(x)
+ else
+ fun_l9_n867(x)
+ end
+end
+
+def fun_l8_n673(x)
+ if (x < 1)
+ fun_l9_n871(x)
+ else
+ fun_l9_n315(x)
+ end
+end
+
+def fun_l8_n674(x)
+ if (x < 1)
+ fun_l9_n860(x)
+ else
+ fun_l9_n945(x)
+ end
+end
+
+def fun_l8_n675(x)
+ if (x < 1)
+ fun_l9_n890(x)
+ else
+ fun_l9_n629(x)
+ end
+end
+
+def fun_l8_n676(x)
+ if (x < 1)
+ fun_l9_n91(x)
+ else
+ fun_l9_n35(x)
+ end
+end
+
+def fun_l8_n677(x)
+ if (x < 1)
+ fun_l9_n825(x)
+ else
+ fun_l9_n922(x)
+ end
+end
+
+def fun_l8_n678(x)
+ if (x < 1)
+ fun_l9_n457(x)
+ else
+ fun_l9_n156(x)
+ end
+end
+
+def fun_l8_n679(x)
+ if (x < 1)
+ fun_l9_n455(x)
+ else
+ fun_l9_n809(x)
+ end
+end
+
+def fun_l8_n680(x)
+ if (x < 1)
+ fun_l9_n213(x)
+ else
+ fun_l9_n944(x)
+ end
+end
+
+def fun_l8_n681(x)
+ if (x < 1)
+ fun_l9_n760(x)
+ else
+ fun_l9_n137(x)
+ end
+end
+
+def fun_l8_n682(x)
+ if (x < 1)
+ fun_l9_n998(x)
+ else
+ fun_l9_n703(x)
+ end
+end
+
+def fun_l8_n683(x)
+ if (x < 1)
+ fun_l9_n988(x)
+ else
+ fun_l9_n952(x)
+ end
+end
+
+def fun_l8_n684(x)
+ if (x < 1)
+ fun_l9_n583(x)
+ else
+ fun_l9_n890(x)
+ end
+end
+
+def fun_l8_n685(x)
+ if (x < 1)
+ fun_l9_n879(x)
+ else
+ fun_l9_n978(x)
+ end
+end
+
+def fun_l8_n686(x)
+ if (x < 1)
+ fun_l9_n6(x)
+ else
+ fun_l9_n978(x)
+ end
+end
+
+def fun_l8_n687(x)
+ if (x < 1)
+ fun_l9_n67(x)
+ else
+ fun_l9_n149(x)
+ end
+end
+
+def fun_l8_n688(x)
+ if (x < 1)
+ fun_l9_n386(x)
+ else
+ fun_l9_n293(x)
+ end
+end
+
+def fun_l8_n689(x)
+ if (x < 1)
+ fun_l9_n493(x)
+ else
+ fun_l9_n140(x)
+ end
+end
+
+def fun_l8_n690(x)
+ if (x < 1)
+ fun_l9_n92(x)
+ else
+ fun_l9_n550(x)
+ end
+end
+
+def fun_l8_n691(x)
+ if (x < 1)
+ fun_l9_n456(x)
+ else
+ fun_l9_n976(x)
+ end
+end
+
+def fun_l8_n692(x)
+ if (x < 1)
+ fun_l9_n516(x)
+ else
+ fun_l9_n145(x)
+ end
+end
+
+def fun_l8_n693(x)
+ if (x < 1)
+ fun_l9_n757(x)
+ else
+ fun_l9_n647(x)
+ end
+end
+
+def fun_l8_n694(x)
+ if (x < 1)
+ fun_l9_n348(x)
+ else
+ fun_l9_n86(x)
+ end
+end
+
+def fun_l8_n695(x)
+ if (x < 1)
+ fun_l9_n546(x)
+ else
+ fun_l9_n320(x)
+ end
+end
+
+def fun_l8_n696(x)
+ if (x < 1)
+ fun_l9_n588(x)
+ else
+ fun_l9_n285(x)
+ end
+end
+
+def fun_l8_n697(x)
+ if (x < 1)
+ fun_l9_n635(x)
+ else
+ fun_l9_n710(x)
+ end
+end
+
+def fun_l8_n698(x)
+ if (x < 1)
+ fun_l9_n312(x)
+ else
+ fun_l9_n217(x)
+ end
+end
+
+def fun_l8_n699(x)
+ if (x < 1)
+ fun_l9_n714(x)
+ else
+ fun_l9_n723(x)
+ end
+end
+
+def fun_l8_n700(x)
+ if (x < 1)
+ fun_l9_n378(x)
+ else
+ fun_l9_n122(x)
+ end
+end
+
+def fun_l8_n701(x)
+ if (x < 1)
+ fun_l9_n696(x)
+ else
+ fun_l9_n577(x)
+ end
+end
+
+def fun_l8_n702(x)
+ if (x < 1)
+ fun_l9_n388(x)
+ else
+ fun_l9_n578(x)
+ end
+end
+
+def fun_l8_n703(x)
+ if (x < 1)
+ fun_l9_n502(x)
+ else
+ fun_l9_n410(x)
+ end
+end
+
+def fun_l8_n704(x)
+ if (x < 1)
+ fun_l9_n532(x)
+ else
+ fun_l9_n532(x)
+ end
+end
+
+def fun_l8_n705(x)
+ if (x < 1)
+ fun_l9_n662(x)
+ else
+ fun_l9_n361(x)
+ end
+end
+
+def fun_l8_n706(x)
+ if (x < 1)
+ fun_l9_n109(x)
+ else
+ fun_l9_n380(x)
+ end
+end
+
+def fun_l8_n707(x)
+ if (x < 1)
+ fun_l9_n653(x)
+ else
+ fun_l9_n566(x)
+ end
+end
+
+def fun_l8_n708(x)
+ if (x < 1)
+ fun_l9_n587(x)
+ else
+ fun_l9_n465(x)
+ end
+end
+
+def fun_l8_n709(x)
+ if (x < 1)
+ fun_l9_n523(x)
+ else
+ fun_l9_n274(x)
+ end
+end
+
+def fun_l8_n710(x)
+ if (x < 1)
+ fun_l9_n459(x)
+ else
+ fun_l9_n872(x)
+ end
+end
+
+def fun_l8_n711(x)
+ if (x < 1)
+ fun_l9_n71(x)
+ else
+ fun_l9_n135(x)
+ end
+end
+
+def fun_l8_n712(x)
+ if (x < 1)
+ fun_l9_n770(x)
+ else
+ fun_l9_n405(x)
+ end
+end
+
+def fun_l8_n713(x)
+ if (x < 1)
+ fun_l9_n233(x)
+ else
+ fun_l9_n232(x)
+ end
+end
+
+def fun_l8_n714(x)
+ if (x < 1)
+ fun_l9_n29(x)
+ else
+ fun_l9_n23(x)
+ end
+end
+
+def fun_l8_n715(x)
+ if (x < 1)
+ fun_l9_n44(x)
+ else
+ fun_l9_n185(x)
+ end
+end
+
+def fun_l8_n716(x)
+ if (x < 1)
+ fun_l9_n980(x)
+ else
+ fun_l9_n967(x)
+ end
+end
+
+def fun_l8_n717(x)
+ if (x < 1)
+ fun_l9_n323(x)
+ else
+ fun_l9_n636(x)
+ end
+end
+
+def fun_l8_n718(x)
+ if (x < 1)
+ fun_l9_n733(x)
+ else
+ fun_l9_n10(x)
+ end
+end
+
+def fun_l8_n719(x)
+ if (x < 1)
+ fun_l9_n100(x)
+ else
+ fun_l9_n123(x)
+ end
+end
+
+def fun_l8_n720(x)
+ if (x < 1)
+ fun_l9_n572(x)
+ else
+ fun_l9_n813(x)
+ end
+end
+
+def fun_l8_n721(x)
+ if (x < 1)
+ fun_l9_n634(x)
+ else
+ fun_l9_n152(x)
+ end
+end
+
+def fun_l8_n722(x)
+ if (x < 1)
+ fun_l9_n527(x)
+ else
+ fun_l9_n881(x)
+ end
+end
+
+def fun_l8_n723(x)
+ if (x < 1)
+ fun_l9_n202(x)
+ else
+ fun_l9_n294(x)
+ end
+end
+
+def fun_l8_n724(x)
+ if (x < 1)
+ fun_l9_n668(x)
+ else
+ fun_l9_n792(x)
+ end
+end
+
+def fun_l8_n725(x)
+ if (x < 1)
+ fun_l9_n309(x)
+ else
+ fun_l9_n612(x)
+ end
+end
+
+def fun_l8_n726(x)
+ if (x < 1)
+ fun_l9_n320(x)
+ else
+ fun_l9_n459(x)
+ end
+end
+
+def fun_l8_n727(x)
+ if (x < 1)
+ fun_l9_n355(x)
+ else
+ fun_l9_n321(x)
+ end
+end
+
+def fun_l8_n728(x)
+ if (x < 1)
+ fun_l9_n237(x)
+ else
+ fun_l9_n135(x)
+ end
+end
+
+def fun_l8_n729(x)
+ if (x < 1)
+ fun_l9_n980(x)
+ else
+ fun_l9_n209(x)
+ end
+end
+
+def fun_l8_n730(x)
+ if (x < 1)
+ fun_l9_n957(x)
+ else
+ fun_l9_n481(x)
+ end
+end
+
+def fun_l8_n731(x)
+ if (x < 1)
+ fun_l9_n594(x)
+ else
+ fun_l9_n396(x)
+ end
+end
+
+def fun_l8_n732(x)
+ if (x < 1)
+ fun_l9_n916(x)
+ else
+ fun_l9_n473(x)
+ end
+end
+
+def fun_l8_n733(x)
+ if (x < 1)
+ fun_l9_n376(x)
+ else
+ fun_l9_n231(x)
+ end
+end
+
+def fun_l8_n734(x)
+ if (x < 1)
+ fun_l9_n758(x)
+ else
+ fun_l9_n111(x)
+ end
+end
+
+def fun_l8_n735(x)
+ if (x < 1)
+ fun_l9_n131(x)
+ else
+ fun_l9_n586(x)
+ end
+end
+
+def fun_l8_n736(x)
+ if (x < 1)
+ fun_l9_n290(x)
+ else
+ fun_l9_n227(x)
+ end
+end
+
+def fun_l8_n737(x)
+ if (x < 1)
+ fun_l9_n784(x)
+ else
+ fun_l9_n869(x)
+ end
+end
+
+def fun_l8_n738(x)
+ if (x < 1)
+ fun_l9_n94(x)
+ else
+ fun_l9_n79(x)
+ end
+end
+
+def fun_l8_n739(x)
+ if (x < 1)
+ fun_l9_n489(x)
+ else
+ fun_l9_n347(x)
+ end
+end
+
+def fun_l8_n740(x)
+ if (x < 1)
+ fun_l9_n4(x)
+ else
+ fun_l9_n587(x)
+ end
+end
+
+def fun_l8_n741(x)
+ if (x < 1)
+ fun_l9_n949(x)
+ else
+ fun_l9_n196(x)
+ end
+end
+
+def fun_l8_n742(x)
+ if (x < 1)
+ fun_l9_n577(x)
+ else
+ fun_l9_n562(x)
+ end
+end
+
+def fun_l8_n743(x)
+ if (x < 1)
+ fun_l9_n656(x)
+ else
+ fun_l9_n685(x)
+ end
+end
+
+def fun_l8_n744(x)
+ if (x < 1)
+ fun_l9_n792(x)
+ else
+ fun_l9_n572(x)
+ end
+end
+
+def fun_l8_n745(x)
+ if (x < 1)
+ fun_l9_n318(x)
+ else
+ fun_l9_n335(x)
+ end
+end
+
+def fun_l8_n746(x)
+ if (x < 1)
+ fun_l9_n59(x)
+ else
+ fun_l9_n109(x)
+ end
+end
+
+def fun_l8_n747(x)
+ if (x < 1)
+ fun_l9_n276(x)
+ else
+ fun_l9_n567(x)
+ end
+end
+
+def fun_l8_n748(x)
+ if (x < 1)
+ fun_l9_n902(x)
+ else
+ fun_l9_n220(x)
+ end
+end
+
+def fun_l8_n749(x)
+ if (x < 1)
+ fun_l9_n208(x)
+ else
+ fun_l9_n108(x)
+ end
+end
+
+def fun_l8_n750(x)
+ if (x < 1)
+ fun_l9_n927(x)
+ else
+ fun_l9_n950(x)
+ end
+end
+
+def fun_l8_n751(x)
+ if (x < 1)
+ fun_l9_n371(x)
+ else
+ fun_l9_n72(x)
+ end
+end
+
+def fun_l8_n752(x)
+ if (x < 1)
+ fun_l9_n455(x)
+ else
+ fun_l9_n467(x)
+ end
+end
+
+def fun_l8_n753(x)
+ if (x < 1)
+ fun_l9_n344(x)
+ else
+ fun_l9_n82(x)
+ end
+end
+
+def fun_l8_n754(x)
+ if (x < 1)
+ fun_l9_n902(x)
+ else
+ fun_l9_n219(x)
+ end
+end
+
+def fun_l8_n755(x)
+ if (x < 1)
+ fun_l9_n101(x)
+ else
+ fun_l9_n523(x)
+ end
+end
+
+def fun_l8_n756(x)
+ if (x < 1)
+ fun_l9_n517(x)
+ else
+ fun_l9_n97(x)
+ end
+end
+
+def fun_l8_n757(x)
+ if (x < 1)
+ fun_l9_n571(x)
+ else
+ fun_l9_n650(x)
+ end
+end
+
+def fun_l8_n758(x)
+ if (x < 1)
+ fun_l9_n701(x)
+ else
+ fun_l9_n962(x)
+ end
+end
+
+def fun_l8_n759(x)
+ if (x < 1)
+ fun_l9_n589(x)
+ else
+ fun_l9_n808(x)
+ end
+end
+
+def fun_l8_n760(x)
+ if (x < 1)
+ fun_l9_n570(x)
+ else
+ fun_l9_n90(x)
+ end
+end
+
+def fun_l8_n761(x)
+ if (x < 1)
+ fun_l9_n792(x)
+ else
+ fun_l9_n673(x)
+ end
+end
+
+def fun_l8_n762(x)
+ if (x < 1)
+ fun_l9_n514(x)
+ else
+ fun_l9_n771(x)
+ end
+end
+
+def fun_l8_n763(x)
+ if (x < 1)
+ fun_l9_n404(x)
+ else
+ fun_l9_n264(x)
+ end
+end
+
+def fun_l8_n764(x)
+ if (x < 1)
+ fun_l9_n270(x)
+ else
+ fun_l9_n738(x)
+ end
+end
+
+def fun_l8_n765(x)
+ if (x < 1)
+ fun_l9_n915(x)
+ else
+ fun_l9_n901(x)
+ end
+end
+
+def fun_l8_n766(x)
+ if (x < 1)
+ fun_l9_n120(x)
+ else
+ fun_l9_n176(x)
+ end
+end
+
+def fun_l8_n767(x)
+ if (x < 1)
+ fun_l9_n470(x)
+ else
+ fun_l9_n837(x)
+ end
+end
+
+def fun_l8_n768(x)
+ if (x < 1)
+ fun_l9_n912(x)
+ else
+ fun_l9_n898(x)
+ end
+end
+
+def fun_l8_n769(x)
+ if (x < 1)
+ fun_l9_n76(x)
+ else
+ fun_l9_n350(x)
+ end
+end
+
+def fun_l8_n770(x)
+ if (x < 1)
+ fun_l9_n487(x)
+ else
+ fun_l9_n572(x)
+ end
+end
+
+def fun_l8_n771(x)
+ if (x < 1)
+ fun_l9_n823(x)
+ else
+ fun_l9_n815(x)
+ end
+end
+
+def fun_l8_n772(x)
+ if (x < 1)
+ fun_l9_n655(x)
+ else
+ fun_l9_n968(x)
+ end
+end
+
+def fun_l8_n773(x)
+ if (x < 1)
+ fun_l9_n824(x)
+ else
+ fun_l9_n741(x)
+ end
+end
+
+def fun_l8_n774(x)
+ if (x < 1)
+ fun_l9_n143(x)
+ else
+ fun_l9_n641(x)
+ end
+end
+
+def fun_l8_n775(x)
+ if (x < 1)
+ fun_l9_n985(x)
+ else
+ fun_l9_n592(x)
+ end
+end
+
+def fun_l8_n776(x)
+ if (x < 1)
+ fun_l9_n686(x)
+ else
+ fun_l9_n234(x)
+ end
+end
+
+def fun_l8_n777(x)
+ if (x < 1)
+ fun_l9_n540(x)
+ else
+ fun_l9_n794(x)
+ end
+end
+
+def fun_l8_n778(x)
+ if (x < 1)
+ fun_l9_n154(x)
+ else
+ fun_l9_n656(x)
+ end
+end
+
+def fun_l8_n779(x)
+ if (x < 1)
+ fun_l9_n836(x)
+ else
+ fun_l9_n756(x)
+ end
+end
+
+def fun_l8_n780(x)
+ if (x < 1)
+ fun_l9_n98(x)
+ else
+ fun_l9_n233(x)
+ end
+end
+
+def fun_l8_n781(x)
+ if (x < 1)
+ fun_l9_n584(x)
+ else
+ fun_l9_n398(x)
+ end
+end
+
+def fun_l8_n782(x)
+ if (x < 1)
+ fun_l9_n851(x)
+ else
+ fun_l9_n967(x)
+ end
+end
+
+def fun_l8_n783(x)
+ if (x < 1)
+ fun_l9_n868(x)
+ else
+ fun_l9_n57(x)
+ end
+end
+
+def fun_l8_n784(x)
+ if (x < 1)
+ fun_l9_n782(x)
+ else
+ fun_l9_n214(x)
+ end
+end
+
+def fun_l8_n785(x)
+ if (x < 1)
+ fun_l9_n79(x)
+ else
+ fun_l9_n489(x)
+ end
+end
+
+def fun_l8_n786(x)
+ if (x < 1)
+ fun_l9_n757(x)
+ else
+ fun_l9_n918(x)
+ end
+end
+
+def fun_l8_n787(x)
+ if (x < 1)
+ fun_l9_n985(x)
+ else
+ fun_l9_n781(x)
+ end
+end
+
+def fun_l8_n788(x)
+ if (x < 1)
+ fun_l9_n921(x)
+ else
+ fun_l9_n542(x)
+ end
+end
+
+def fun_l8_n789(x)
+ if (x < 1)
+ fun_l9_n982(x)
+ else
+ fun_l9_n834(x)
+ end
+end
+
+def fun_l8_n790(x)
+ if (x < 1)
+ fun_l9_n482(x)
+ else
+ fun_l9_n424(x)
+ end
+end
+
+def fun_l8_n791(x)
+ if (x < 1)
+ fun_l9_n289(x)
+ else
+ fun_l9_n487(x)
+ end
+end
+
+def fun_l8_n792(x)
+ if (x < 1)
+ fun_l9_n820(x)
+ else
+ fun_l9_n242(x)
+ end
+end
+
+def fun_l8_n793(x)
+ if (x < 1)
+ fun_l9_n110(x)
+ else
+ fun_l9_n356(x)
+ end
+end
+
+def fun_l8_n794(x)
+ if (x < 1)
+ fun_l9_n142(x)
+ else
+ fun_l9_n607(x)
+ end
+end
+
+def fun_l8_n795(x)
+ if (x < 1)
+ fun_l9_n21(x)
+ else
+ fun_l9_n14(x)
+ end
+end
+
+def fun_l8_n796(x)
+ if (x < 1)
+ fun_l9_n147(x)
+ else
+ fun_l9_n767(x)
+ end
+end
+
+def fun_l8_n797(x)
+ if (x < 1)
+ fun_l9_n427(x)
+ else
+ fun_l9_n854(x)
+ end
+end
+
+def fun_l8_n798(x)
+ if (x < 1)
+ fun_l9_n557(x)
+ else
+ fun_l9_n729(x)
+ end
+end
+
+def fun_l8_n799(x)
+ if (x < 1)
+ fun_l9_n150(x)
+ else
+ fun_l9_n180(x)
+ end
+end
+
+def fun_l8_n800(x)
+ if (x < 1)
+ fun_l9_n888(x)
+ else
+ fun_l9_n612(x)
+ end
+end
+
+def fun_l8_n801(x)
+ if (x < 1)
+ fun_l9_n631(x)
+ else
+ fun_l9_n370(x)
+ end
+end
+
+def fun_l8_n802(x)
+ if (x < 1)
+ fun_l9_n759(x)
+ else
+ fun_l9_n446(x)
+ end
+end
+
+def fun_l8_n803(x)
+ if (x < 1)
+ fun_l9_n182(x)
+ else
+ fun_l9_n705(x)
+ end
+end
+
+def fun_l8_n804(x)
+ if (x < 1)
+ fun_l9_n474(x)
+ else
+ fun_l9_n461(x)
+ end
+end
+
+def fun_l8_n805(x)
+ if (x < 1)
+ fun_l9_n897(x)
+ else
+ fun_l9_n935(x)
+ end
+end
+
+def fun_l8_n806(x)
+ if (x < 1)
+ fun_l9_n793(x)
+ else
+ fun_l9_n981(x)
+ end
+end
+
+def fun_l8_n807(x)
+ if (x < 1)
+ fun_l9_n124(x)
+ else
+ fun_l9_n528(x)
+ end
+end
+
+def fun_l8_n808(x)
+ if (x < 1)
+ fun_l9_n637(x)
+ else
+ fun_l9_n989(x)
+ end
+end
+
+def fun_l8_n809(x)
+ if (x < 1)
+ fun_l9_n388(x)
+ else
+ fun_l9_n196(x)
+ end
+end
+
+def fun_l8_n810(x)
+ if (x < 1)
+ fun_l9_n333(x)
+ else
+ fun_l9_n806(x)
+ end
+end
+
+def fun_l8_n811(x)
+ if (x < 1)
+ fun_l9_n541(x)
+ else
+ fun_l9_n6(x)
+ end
+end
+
+def fun_l8_n812(x)
+ if (x < 1)
+ fun_l9_n346(x)
+ else
+ fun_l9_n496(x)
+ end
+end
+
+def fun_l8_n813(x)
+ if (x < 1)
+ fun_l9_n374(x)
+ else
+ fun_l9_n739(x)
+ end
+end
+
+def fun_l8_n814(x)
+ if (x < 1)
+ fun_l9_n121(x)
+ else
+ fun_l9_n184(x)
+ end
+end
+
+def fun_l8_n815(x)
+ if (x < 1)
+ fun_l9_n460(x)
+ else
+ fun_l9_n759(x)
+ end
+end
+
+def fun_l8_n816(x)
+ if (x < 1)
+ fun_l9_n598(x)
+ else
+ fun_l9_n638(x)
+ end
+end
+
+def fun_l8_n817(x)
+ if (x < 1)
+ fun_l9_n986(x)
+ else
+ fun_l9_n658(x)
+ end
+end
+
+def fun_l8_n818(x)
+ if (x < 1)
+ fun_l9_n169(x)
+ else
+ fun_l9_n696(x)
+ end
+end
+
+def fun_l8_n819(x)
+ if (x < 1)
+ fun_l9_n885(x)
+ else
+ fun_l9_n74(x)
+ end
+end
+
+def fun_l8_n820(x)
+ if (x < 1)
+ fun_l9_n24(x)
+ else
+ fun_l9_n87(x)
+ end
+end
+
+def fun_l8_n821(x)
+ if (x < 1)
+ fun_l9_n59(x)
+ else
+ fun_l9_n843(x)
+ end
+end
+
+def fun_l8_n822(x)
+ if (x < 1)
+ fun_l9_n640(x)
+ else
+ fun_l9_n360(x)
+ end
+end
+
+def fun_l8_n823(x)
+ if (x < 1)
+ fun_l9_n355(x)
+ else
+ fun_l9_n28(x)
+ end
+end
+
+def fun_l8_n824(x)
+ if (x < 1)
+ fun_l9_n553(x)
+ else
+ fun_l9_n475(x)
+ end
+end
+
+def fun_l8_n825(x)
+ if (x < 1)
+ fun_l9_n757(x)
+ else
+ fun_l9_n790(x)
+ end
+end
+
+def fun_l8_n826(x)
+ if (x < 1)
+ fun_l9_n787(x)
+ else
+ fun_l9_n226(x)
+ end
+end
+
+def fun_l8_n827(x)
+ if (x < 1)
+ fun_l9_n622(x)
+ else
+ fun_l9_n711(x)
+ end
+end
+
+def fun_l8_n828(x)
+ if (x < 1)
+ fun_l9_n399(x)
+ else
+ fun_l9_n7(x)
+ end
+end
+
+def fun_l8_n829(x)
+ if (x < 1)
+ fun_l9_n589(x)
+ else
+ fun_l9_n276(x)
+ end
+end
+
+def fun_l8_n830(x)
+ if (x < 1)
+ fun_l9_n83(x)
+ else
+ fun_l9_n126(x)
+ end
+end
+
+def fun_l8_n831(x)
+ if (x < 1)
+ fun_l9_n576(x)
+ else
+ fun_l9_n855(x)
+ end
+end
+
+def fun_l8_n832(x)
+ if (x < 1)
+ fun_l9_n756(x)
+ else
+ fun_l9_n638(x)
+ end
+end
+
+def fun_l8_n833(x)
+ if (x < 1)
+ fun_l9_n388(x)
+ else
+ fun_l9_n154(x)
+ end
+end
+
+def fun_l8_n834(x)
+ if (x < 1)
+ fun_l9_n268(x)
+ else
+ fun_l9_n85(x)
+ end
+end
+
+def fun_l8_n835(x)
+ if (x < 1)
+ fun_l9_n32(x)
+ else
+ fun_l9_n678(x)
+ end
+end
+
+def fun_l8_n836(x)
+ if (x < 1)
+ fun_l9_n537(x)
+ else
+ fun_l9_n984(x)
+ end
+end
+
+def fun_l8_n837(x)
+ if (x < 1)
+ fun_l9_n798(x)
+ else
+ fun_l9_n221(x)
+ end
+end
+
+def fun_l8_n838(x)
+ if (x < 1)
+ fun_l9_n153(x)
+ else
+ fun_l9_n414(x)
+ end
+end
+
+def fun_l8_n839(x)
+ if (x < 1)
+ fun_l9_n904(x)
+ else
+ fun_l9_n847(x)
+ end
+end
+
+def fun_l8_n840(x)
+ if (x < 1)
+ fun_l9_n501(x)
+ else
+ fun_l9_n971(x)
+ end
+end
+
+def fun_l8_n841(x)
+ if (x < 1)
+ fun_l9_n94(x)
+ else
+ fun_l9_n719(x)
+ end
+end
+
+def fun_l8_n842(x)
+ if (x < 1)
+ fun_l9_n343(x)
+ else
+ fun_l9_n365(x)
+ end
+end
+
+def fun_l8_n843(x)
+ if (x < 1)
+ fun_l9_n541(x)
+ else
+ fun_l9_n800(x)
+ end
+end
+
+def fun_l8_n844(x)
+ if (x < 1)
+ fun_l9_n122(x)
+ else
+ fun_l9_n662(x)
+ end
+end
+
+def fun_l8_n845(x)
+ if (x < 1)
+ fun_l9_n312(x)
+ else
+ fun_l9_n688(x)
+ end
+end
+
+def fun_l8_n846(x)
+ if (x < 1)
+ fun_l9_n668(x)
+ else
+ fun_l9_n805(x)
+ end
+end
+
+def fun_l8_n847(x)
+ if (x < 1)
+ fun_l9_n785(x)
+ else
+ fun_l9_n917(x)
+ end
+end
+
+def fun_l8_n848(x)
+ if (x < 1)
+ fun_l9_n333(x)
+ else
+ fun_l9_n782(x)
+ end
+end
+
+def fun_l8_n849(x)
+ if (x < 1)
+ fun_l9_n402(x)
+ else
+ fun_l9_n398(x)
+ end
+end
+
+def fun_l8_n850(x)
+ if (x < 1)
+ fun_l9_n708(x)
+ else
+ fun_l9_n199(x)
+ end
+end
+
+def fun_l8_n851(x)
+ if (x < 1)
+ fun_l9_n950(x)
+ else
+ fun_l9_n308(x)
+ end
+end
+
+def fun_l8_n852(x)
+ if (x < 1)
+ fun_l9_n524(x)
+ else
+ fun_l9_n411(x)
+ end
+end
+
+def fun_l8_n853(x)
+ if (x < 1)
+ fun_l9_n467(x)
+ else
+ fun_l9_n807(x)
+ end
+end
+
+def fun_l8_n854(x)
+ if (x < 1)
+ fun_l9_n316(x)
+ else
+ fun_l9_n717(x)
+ end
+end
+
+def fun_l8_n855(x)
+ if (x < 1)
+ fun_l9_n955(x)
+ else
+ fun_l9_n631(x)
+ end
+end
+
+def fun_l8_n856(x)
+ if (x < 1)
+ fun_l9_n244(x)
+ else
+ fun_l9_n838(x)
+ end
+end
+
+def fun_l8_n857(x)
+ if (x < 1)
+ fun_l9_n574(x)
+ else
+ fun_l9_n720(x)
+ end
+end
+
+def fun_l8_n858(x)
+ if (x < 1)
+ fun_l9_n80(x)
+ else
+ fun_l9_n888(x)
+ end
+end
+
+def fun_l8_n859(x)
+ if (x < 1)
+ fun_l9_n675(x)
+ else
+ fun_l9_n71(x)
+ end
+end
+
+def fun_l8_n860(x)
+ if (x < 1)
+ fun_l9_n375(x)
+ else
+ fun_l9_n507(x)
+ end
+end
+
+def fun_l8_n861(x)
+ if (x < 1)
+ fun_l9_n450(x)
+ else
+ fun_l9_n705(x)
+ end
+end
+
+def fun_l8_n862(x)
+ if (x < 1)
+ fun_l9_n358(x)
+ else
+ fun_l9_n614(x)
+ end
+end
+
+def fun_l8_n863(x)
+ if (x < 1)
+ fun_l9_n690(x)
+ else
+ fun_l9_n73(x)
+ end
+end
+
+def fun_l8_n864(x)
+ if (x < 1)
+ fun_l9_n806(x)
+ else
+ fun_l9_n85(x)
+ end
+end
+
+def fun_l8_n865(x)
+ if (x < 1)
+ fun_l9_n251(x)
+ else
+ fun_l9_n657(x)
+ end
+end
+
+def fun_l8_n866(x)
+ if (x < 1)
+ fun_l9_n921(x)
+ else
+ fun_l9_n199(x)
+ end
+end
+
+def fun_l8_n867(x)
+ if (x < 1)
+ fun_l9_n265(x)
+ else
+ fun_l9_n937(x)
+ end
+end
+
+def fun_l8_n868(x)
+ if (x < 1)
+ fun_l9_n610(x)
+ else
+ fun_l9_n7(x)
+ end
+end
+
+def fun_l8_n869(x)
+ if (x < 1)
+ fun_l9_n703(x)
+ else
+ fun_l9_n74(x)
+ end
+end
+
+def fun_l8_n870(x)
+ if (x < 1)
+ fun_l9_n869(x)
+ else
+ fun_l9_n665(x)
+ end
+end
+
+def fun_l8_n871(x)
+ if (x < 1)
+ fun_l9_n808(x)
+ else
+ fun_l9_n686(x)
+ end
+end
+
+def fun_l8_n872(x)
+ if (x < 1)
+ fun_l9_n678(x)
+ else
+ fun_l9_n709(x)
+ end
+end
+
+def fun_l8_n873(x)
+ if (x < 1)
+ fun_l9_n557(x)
+ else
+ fun_l9_n63(x)
+ end
+end
+
+def fun_l8_n874(x)
+ if (x < 1)
+ fun_l9_n214(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n875(x)
+ if (x < 1)
+ fun_l9_n218(x)
+ else
+ fun_l9_n810(x)
+ end
+end
+
+def fun_l8_n876(x)
+ if (x < 1)
+ fun_l9_n365(x)
+ else
+ fun_l9_n257(x)
+ end
+end
+
+def fun_l8_n877(x)
+ if (x < 1)
+ fun_l9_n51(x)
+ else
+ fun_l9_n68(x)
+ end
+end
+
+def fun_l8_n878(x)
+ if (x < 1)
+ fun_l9_n20(x)
+ else
+ fun_l9_n55(x)
+ end
+end
+
+def fun_l8_n879(x)
+ if (x < 1)
+ fun_l9_n686(x)
+ else
+ fun_l9_n226(x)
+ end
+end
+
+def fun_l8_n880(x)
+ if (x < 1)
+ fun_l9_n283(x)
+ else
+ fun_l9_n270(x)
+ end
+end
+
+def fun_l8_n881(x)
+ if (x < 1)
+ fun_l9_n811(x)
+ else
+ fun_l9_n820(x)
+ end
+end
+
+def fun_l8_n882(x)
+ if (x < 1)
+ fun_l9_n342(x)
+ else
+ fun_l9_n919(x)
+ end
+end
+
+def fun_l8_n883(x)
+ if (x < 1)
+ fun_l9_n515(x)
+ else
+ fun_l9_n24(x)
+ end
+end
+
+def fun_l8_n884(x)
+ if (x < 1)
+ fun_l9_n0(x)
+ else
+ fun_l9_n150(x)
+ end
+end
+
+def fun_l8_n885(x)
+ if (x < 1)
+ fun_l9_n481(x)
+ else
+ fun_l9_n65(x)
+ end
+end
+
+def fun_l8_n886(x)
+ if (x < 1)
+ fun_l9_n252(x)
+ else
+ fun_l9_n544(x)
+ end
+end
+
+def fun_l8_n887(x)
+ if (x < 1)
+ fun_l9_n635(x)
+ else
+ fun_l9_n402(x)
+ end
+end
+
+def fun_l8_n888(x)
+ if (x < 1)
+ fun_l9_n78(x)
+ else
+ fun_l9_n779(x)
+ end
+end
+
+def fun_l8_n889(x)
+ if (x < 1)
+ fun_l9_n249(x)
+ else
+ fun_l9_n331(x)
+ end
+end
+
+def fun_l8_n890(x)
+ if (x < 1)
+ fun_l9_n914(x)
+ else
+ fun_l9_n115(x)
+ end
+end
+
+def fun_l8_n891(x)
+ if (x < 1)
+ fun_l9_n832(x)
+ else
+ fun_l9_n34(x)
+ end
+end
+
+def fun_l8_n892(x)
+ if (x < 1)
+ fun_l9_n919(x)
+ else
+ fun_l9_n620(x)
+ end
+end
+
+def fun_l8_n893(x)
+ if (x < 1)
+ fun_l9_n360(x)
+ else
+ fun_l9_n189(x)
+ end
+end
+
+def fun_l8_n894(x)
+ if (x < 1)
+ fun_l9_n736(x)
+ else
+ fun_l9_n949(x)
+ end
+end
+
+def fun_l8_n895(x)
+ if (x < 1)
+ fun_l9_n56(x)
+ else
+ fun_l9_n826(x)
+ end
+end
+
+def fun_l8_n896(x)
+ if (x < 1)
+ fun_l9_n159(x)
+ else
+ fun_l9_n523(x)
+ end
+end
+
+def fun_l8_n897(x)
+ if (x < 1)
+ fun_l9_n630(x)
+ else
+ fun_l9_n601(x)
+ end
+end
+
+def fun_l8_n898(x)
+ if (x < 1)
+ fun_l9_n434(x)
+ else
+ fun_l9_n919(x)
+ end
+end
+
+def fun_l8_n899(x)
+ if (x < 1)
+ fun_l9_n872(x)
+ else
+ fun_l9_n652(x)
+ end
+end
+
+def fun_l8_n900(x)
+ if (x < 1)
+ fun_l9_n550(x)
+ else
+ fun_l9_n124(x)
+ end
+end
+
+def fun_l8_n901(x)
+ if (x < 1)
+ fun_l9_n56(x)
+ else
+ fun_l9_n422(x)
+ end
+end
+
+def fun_l8_n902(x)
+ if (x < 1)
+ fun_l9_n297(x)
+ else
+ fun_l9_n281(x)
+ end
+end
+
+def fun_l8_n903(x)
+ if (x < 1)
+ fun_l9_n764(x)
+ else
+ fun_l9_n942(x)
+ end
+end
+
+def fun_l8_n904(x)
+ if (x < 1)
+ fun_l9_n700(x)
+ else
+ fun_l9_n525(x)
+ end
+end
+
+def fun_l8_n905(x)
+ if (x < 1)
+ fun_l9_n370(x)
+ else
+ fun_l9_n871(x)
+ end
+end
+
+def fun_l8_n906(x)
+ if (x < 1)
+ fun_l9_n385(x)
+ else
+ fun_l9_n999(x)
+ end
+end
+
+def fun_l8_n907(x)
+ if (x < 1)
+ fun_l9_n63(x)
+ else
+ fun_l9_n137(x)
+ end
+end
+
+def fun_l8_n908(x)
+ if (x < 1)
+ fun_l9_n793(x)
+ else
+ fun_l9_n720(x)
+ end
+end
+
+def fun_l8_n909(x)
+ if (x < 1)
+ fun_l9_n141(x)
+ else
+ fun_l9_n838(x)
+ end
+end
+
+def fun_l8_n910(x)
+ if (x < 1)
+ fun_l9_n764(x)
+ else
+ fun_l9_n334(x)
+ end
+end
+
+def fun_l8_n911(x)
+ if (x < 1)
+ fun_l9_n429(x)
+ else
+ fun_l9_n309(x)
+ end
+end
+
+def fun_l8_n912(x)
+ if (x < 1)
+ fun_l9_n852(x)
+ else
+ fun_l9_n662(x)
+ end
+end
+
+def fun_l8_n913(x)
+ if (x < 1)
+ fun_l9_n467(x)
+ else
+ fun_l9_n817(x)
+ end
+end
+
+def fun_l8_n914(x)
+ if (x < 1)
+ fun_l9_n318(x)
+ else
+ fun_l9_n942(x)
+ end
+end
+
+def fun_l8_n915(x)
+ if (x < 1)
+ fun_l9_n442(x)
+ else
+ fun_l9_n987(x)
+ end
+end
+
+def fun_l8_n916(x)
+ if (x < 1)
+ fun_l9_n657(x)
+ else
+ fun_l9_n736(x)
+ end
+end
+
+def fun_l8_n917(x)
+ if (x < 1)
+ fun_l9_n839(x)
+ else
+ fun_l9_n897(x)
+ end
+end
+
+def fun_l8_n918(x)
+ if (x < 1)
+ fun_l9_n659(x)
+ else
+ fun_l9_n766(x)
+ end
+end
+
+def fun_l8_n919(x)
+ if (x < 1)
+ fun_l9_n523(x)
+ else
+ fun_l9_n54(x)
+ end
+end
+
+def fun_l8_n920(x)
+ if (x < 1)
+ fun_l9_n298(x)
+ else
+ fun_l9_n169(x)
+ end
+end
+
+def fun_l8_n921(x)
+ if (x < 1)
+ fun_l9_n752(x)
+ else
+ fun_l9_n281(x)
+ end
+end
+
+def fun_l8_n922(x)
+ if (x < 1)
+ fun_l9_n703(x)
+ else
+ fun_l9_n874(x)
+ end
+end
+
+def fun_l8_n923(x)
+ if (x < 1)
+ fun_l9_n218(x)
+ else
+ fun_l9_n880(x)
+ end
+end
+
+def fun_l8_n924(x)
+ if (x < 1)
+ fun_l9_n699(x)
+ else
+ fun_l9_n357(x)
+ end
+end
+
+def fun_l8_n925(x)
+ if (x < 1)
+ fun_l9_n279(x)
+ else
+ fun_l9_n300(x)
+ end
+end
+
+def fun_l8_n926(x)
+ if (x < 1)
+ fun_l9_n955(x)
+ else
+ fun_l9_n522(x)
+ end
+end
+
+def fun_l8_n927(x)
+ if (x < 1)
+ fun_l9_n943(x)
+ else
+ fun_l9_n597(x)
+ end
+end
+
+def fun_l8_n928(x)
+ if (x < 1)
+ fun_l9_n828(x)
+ else
+ fun_l9_n658(x)
+ end
+end
+
+def fun_l8_n929(x)
+ if (x < 1)
+ fun_l9_n160(x)
+ else
+ fun_l9_n536(x)
+ end
+end
+
+def fun_l8_n930(x)
+ if (x < 1)
+ fun_l9_n422(x)
+ else
+ fun_l9_n848(x)
+ end
+end
+
+def fun_l8_n931(x)
+ if (x < 1)
+ fun_l9_n66(x)
+ else
+ fun_l9_n298(x)
+ end
+end
+
+def fun_l8_n932(x)
+ if (x < 1)
+ fun_l9_n871(x)
+ else
+ fun_l9_n443(x)
+ end
+end
+
+def fun_l8_n933(x)
+ if (x < 1)
+ fun_l9_n876(x)
+ else
+ fun_l9_n459(x)
+ end
+end
+
+def fun_l8_n934(x)
+ if (x < 1)
+ fun_l9_n319(x)
+ else
+ fun_l9_n921(x)
+ end
+end
+
+def fun_l8_n935(x)
+ if (x < 1)
+ fun_l9_n741(x)
+ else
+ fun_l9_n659(x)
+ end
+end
+
+def fun_l8_n936(x)
+ if (x < 1)
+ fun_l9_n713(x)
+ else
+ fun_l9_n800(x)
+ end
+end
+
+def fun_l8_n937(x)
+ if (x < 1)
+ fun_l9_n945(x)
+ else
+ fun_l9_n548(x)
+ end
+end
+
+def fun_l8_n938(x)
+ if (x < 1)
+ fun_l9_n732(x)
+ else
+ fun_l9_n10(x)
+ end
+end
+
+def fun_l8_n939(x)
+ if (x < 1)
+ fun_l9_n5(x)
+ else
+ fun_l9_n864(x)
+ end
+end
+
+def fun_l8_n940(x)
+ if (x < 1)
+ fun_l9_n353(x)
+ else
+ fun_l9_n46(x)
+ end
+end
+
+def fun_l8_n941(x)
+ if (x < 1)
+ fun_l9_n622(x)
+ else
+ fun_l9_n430(x)
+ end
+end
+
+def fun_l8_n942(x)
+ if (x < 1)
+ fun_l9_n120(x)
+ else
+ fun_l9_n265(x)
+ end
+end
+
+def fun_l8_n943(x)
+ if (x < 1)
+ fun_l9_n272(x)
+ else
+ fun_l9_n290(x)
+ end
+end
+
+def fun_l8_n944(x)
+ if (x < 1)
+ fun_l9_n527(x)
+ else
+ fun_l9_n830(x)
+ end
+end
+
+def fun_l8_n945(x)
+ if (x < 1)
+ fun_l9_n202(x)
+ else
+ fun_l9_n597(x)
+ end
+end
+
+def fun_l8_n946(x)
+ if (x < 1)
+ fun_l9_n797(x)
+ else
+ fun_l9_n984(x)
+ end
+end
+
+def fun_l8_n947(x)
+ if (x < 1)
+ fun_l9_n3(x)
+ else
+ fun_l9_n173(x)
+ end
+end
+
+def fun_l8_n948(x)
+ if (x < 1)
+ fun_l9_n658(x)
+ else
+ fun_l9_n48(x)
+ end
+end
+
+def fun_l8_n949(x)
+ if (x < 1)
+ fun_l9_n302(x)
+ else
+ fun_l9_n549(x)
+ end
+end
+
+def fun_l8_n950(x)
+ if (x < 1)
+ fun_l9_n450(x)
+ else
+ fun_l9_n442(x)
+ end
+end
+
+def fun_l8_n951(x)
+ if (x < 1)
+ fun_l9_n32(x)
+ else
+ fun_l9_n287(x)
+ end
+end
+
+def fun_l8_n952(x)
+ if (x < 1)
+ fun_l9_n427(x)
+ else
+ fun_l9_n67(x)
+ end
+end
+
+def fun_l8_n953(x)
+ if (x < 1)
+ fun_l9_n153(x)
+ else
+ fun_l9_n748(x)
+ end
+end
+
+def fun_l8_n954(x)
+ if (x < 1)
+ fun_l9_n528(x)
+ else
+ fun_l9_n754(x)
+ end
+end
+
+def fun_l8_n955(x)
+ if (x < 1)
+ fun_l9_n722(x)
+ else
+ fun_l9_n982(x)
+ end
+end
+
+def fun_l8_n956(x)
+ if (x < 1)
+ fun_l9_n857(x)
+ else
+ fun_l9_n286(x)
+ end
+end
+
+def fun_l8_n957(x)
+ if (x < 1)
+ fun_l9_n579(x)
+ else
+ fun_l9_n830(x)
+ end
+end
+
+def fun_l8_n958(x)
+ if (x < 1)
+ fun_l9_n913(x)
+ else
+ fun_l9_n918(x)
+ end
+end
+
+def fun_l8_n959(x)
+ if (x < 1)
+ fun_l9_n575(x)
+ else
+ fun_l9_n441(x)
+ end
+end
+
+def fun_l8_n960(x)
+ if (x < 1)
+ fun_l9_n774(x)
+ else
+ fun_l9_n426(x)
+ end
+end
+
+def fun_l8_n961(x)
+ if (x < 1)
+ fun_l9_n415(x)
+ else
+ fun_l9_n720(x)
+ end
+end
+
+def fun_l8_n962(x)
+ if (x < 1)
+ fun_l9_n187(x)
+ else
+ fun_l9_n101(x)
+ end
+end
+
+def fun_l8_n963(x)
+ if (x < 1)
+ fun_l9_n146(x)
+ else
+ fun_l9_n911(x)
+ end
+end
+
+def fun_l8_n964(x)
+ if (x < 1)
+ fun_l9_n758(x)
+ else
+ fun_l9_n46(x)
+ end
+end
+
+def fun_l8_n965(x)
+ if (x < 1)
+ fun_l9_n316(x)
+ else
+ fun_l9_n874(x)
+ end
+end
+
+def fun_l8_n966(x)
+ if (x < 1)
+ fun_l9_n604(x)
+ else
+ fun_l9_n933(x)
+ end
+end
+
+def fun_l8_n967(x)
+ if (x < 1)
+ fun_l9_n185(x)
+ else
+ fun_l9_n729(x)
+ end
+end
+
+def fun_l8_n968(x)
+ if (x < 1)
+ fun_l9_n735(x)
+ else
+ fun_l9_n347(x)
+ end
+end
+
+def fun_l8_n969(x)
+ if (x < 1)
+ fun_l9_n796(x)
+ else
+ fun_l9_n163(x)
+ end
+end
+
+def fun_l8_n970(x)
+ if (x < 1)
+ fun_l9_n535(x)
+ else
+ fun_l9_n184(x)
+ end
+end
+
+def fun_l8_n971(x)
+ if (x < 1)
+ fun_l9_n919(x)
+ else
+ fun_l9_n838(x)
+ end
+end
+
+def fun_l8_n972(x)
+ if (x < 1)
+ fun_l9_n296(x)
+ else
+ fun_l9_n822(x)
+ end
+end
+
+def fun_l8_n973(x)
+ if (x < 1)
+ fun_l9_n503(x)
+ else
+ fun_l9_n979(x)
+ end
+end
+
+def fun_l8_n974(x)
+ if (x < 1)
+ fun_l9_n598(x)
+ else
+ fun_l9_n916(x)
+ end
+end
+
+def fun_l8_n975(x)
+ if (x < 1)
+ fun_l9_n119(x)
+ else
+ fun_l9_n138(x)
+ end
+end
+
+def fun_l8_n976(x)
+ if (x < 1)
+ fun_l9_n92(x)
+ else
+ fun_l9_n244(x)
+ end
+end
+
+def fun_l8_n977(x)
+ if (x < 1)
+ fun_l9_n250(x)
+ else
+ fun_l9_n496(x)
+ end
+end
+
+def fun_l8_n978(x)
+ if (x < 1)
+ fun_l9_n665(x)
+ else
+ fun_l9_n617(x)
+ end
+end
+
+def fun_l8_n979(x)
+ if (x < 1)
+ fun_l9_n212(x)
+ else
+ fun_l9_n63(x)
+ end
+end
+
+def fun_l8_n980(x)
+ if (x < 1)
+ fun_l9_n304(x)
+ else
+ fun_l9_n373(x)
+ end
+end
+
+def fun_l8_n981(x)
+ if (x < 1)
+ fun_l9_n70(x)
+ else
+ fun_l9_n194(x)
+ end
+end
+
+def fun_l8_n982(x)
+ if (x < 1)
+ fun_l9_n996(x)
+ else
+ fun_l9_n821(x)
+ end
+end
+
+def fun_l8_n983(x)
+ if (x < 1)
+ fun_l9_n109(x)
+ else
+ fun_l9_n926(x)
+ end
+end
+
+def fun_l8_n984(x)
+ if (x < 1)
+ fun_l9_n342(x)
+ else
+ fun_l9_n768(x)
+ end
+end
+
+def fun_l8_n985(x)
+ if (x < 1)
+ fun_l9_n12(x)
+ else
+ fun_l9_n55(x)
+ end
+end
+
+def fun_l8_n986(x)
+ if (x < 1)
+ fun_l9_n663(x)
+ else
+ fun_l9_n963(x)
+ end
+end
+
+def fun_l8_n987(x)
+ if (x < 1)
+ fun_l9_n108(x)
+ else
+ fun_l9_n139(x)
+ end
+end
+
+def fun_l8_n988(x)
+ if (x < 1)
+ fun_l9_n256(x)
+ else
+ fun_l9_n55(x)
+ end
+end
+
+def fun_l8_n989(x)
+ if (x < 1)
+ fun_l9_n261(x)
+ else
+ fun_l9_n962(x)
+ end
+end
+
+def fun_l8_n990(x)
+ if (x < 1)
+ fun_l9_n581(x)
+ else
+ fun_l9_n558(x)
+ end
+end
+
+def fun_l8_n991(x)
+ if (x < 1)
+ fun_l9_n379(x)
+ else
+ fun_l9_n179(x)
+ end
+end
+
+def fun_l8_n992(x)
+ if (x < 1)
+ fun_l9_n256(x)
+ else
+ fun_l9_n158(x)
+ end
+end
+
+def fun_l8_n993(x)
+ if (x < 1)
+ fun_l9_n75(x)
+ else
+ fun_l9_n669(x)
+ end
+end
+
+def fun_l8_n994(x)
+ if (x < 1)
+ fun_l9_n1(x)
+ else
+ fun_l9_n723(x)
+ end
+end
+
+def fun_l8_n995(x)
+ if (x < 1)
+ fun_l9_n52(x)
+ else
+ fun_l9_n706(x)
+ end
+end
+
+def fun_l8_n996(x)
+ if (x < 1)
+ fun_l9_n583(x)
+ else
+ fun_l9_n769(x)
+ end
+end
+
+def fun_l8_n997(x)
+ if (x < 1)
+ fun_l9_n91(x)
+ else
+ fun_l9_n86(x)
+ end
+end
+
+def fun_l8_n998(x)
+ if (x < 1)
+ fun_l9_n605(x)
+ else
+ fun_l9_n106(x)
+ end
+end
+
+def fun_l8_n999(x)
+ if (x < 1)
+ fun_l9_n634(x)
+ else
+ fun_l9_n110(x)
+ end
+end
+
+def fun_l9_n0(x)
+ if (x < 1)
+ fun_l10_n583(x)
+ else
+ fun_l10_n168(x)
+ end
+end
+
+def fun_l9_n1(x)
+ if (x < 1)
+ fun_l10_n523(x)
+ else
+ fun_l10_n486(x)
+ end
+end
+
+def fun_l9_n2(x)
+ if (x < 1)
+ fun_l10_n869(x)
+ else
+ fun_l10_n480(x)
+ end
+end
+
+def fun_l9_n3(x)
+ if (x < 1)
+ fun_l10_n227(x)
+ else
+ fun_l10_n798(x)
+ end
+end
+
+def fun_l9_n4(x)
+ if (x < 1)
+ fun_l10_n8(x)
+ else
+ fun_l10_n984(x)
+ end
+end
+
+def fun_l9_n5(x)
+ if (x < 1)
+ fun_l10_n757(x)
+ else
+ fun_l10_n791(x)
+ end
+end
+
+def fun_l9_n6(x)
+ if (x < 1)
+ fun_l10_n131(x)
+ else
+ fun_l10_n44(x)
+ end
+end
+
+def fun_l9_n7(x)
+ if (x < 1)
+ fun_l10_n292(x)
+ else
+ fun_l10_n793(x)
+ end
+end
+
+def fun_l9_n8(x)
+ if (x < 1)
+ fun_l10_n237(x)
+ else
+ fun_l10_n439(x)
+ end
+end
+
+def fun_l9_n9(x)
+ if (x < 1)
+ fun_l10_n99(x)
+ else
+ fun_l10_n914(x)
+ end
+end
+
+def fun_l9_n10(x)
+ if (x < 1)
+ fun_l10_n702(x)
+ else
+ fun_l10_n983(x)
+ end
+end
+
+def fun_l9_n11(x)
+ if (x < 1)
+ fun_l10_n843(x)
+ else
+ fun_l10_n774(x)
+ end
+end
+
+def fun_l9_n12(x)
+ if (x < 1)
+ fun_l10_n720(x)
+ else
+ fun_l10_n238(x)
+ end
+end
+
+def fun_l9_n13(x)
+ if (x < 1)
+ fun_l10_n339(x)
+ else
+ fun_l10_n613(x)
+ end
+end
+
+def fun_l9_n14(x)
+ if (x < 1)
+ fun_l10_n711(x)
+ else
+ fun_l10_n836(x)
+ end
+end
+
+def fun_l9_n15(x)
+ if (x < 1)
+ fun_l10_n542(x)
+ else
+ fun_l10_n90(x)
+ end
+end
+
+def fun_l9_n16(x)
+ if (x < 1)
+ fun_l10_n931(x)
+ else
+ fun_l10_n1(x)
+ end
+end
+
+def fun_l9_n17(x)
+ if (x < 1)
+ fun_l10_n568(x)
+ else
+ fun_l10_n397(x)
+ end
+end
+
+def fun_l9_n18(x)
+ if (x < 1)
+ fun_l10_n108(x)
+ else
+ fun_l10_n245(x)
+ end
+end
+
+def fun_l9_n19(x)
+ if (x < 1)
+ fun_l10_n413(x)
+ else
+ fun_l10_n644(x)
+ end
+end
+
+def fun_l9_n20(x)
+ if (x < 1)
+ fun_l10_n533(x)
+ else
+ fun_l10_n345(x)
+ end
+end
+
+def fun_l9_n21(x)
+ if (x < 1)
+ fun_l10_n84(x)
+ else
+ fun_l10_n821(x)
+ end
+end
+
+def fun_l9_n22(x)
+ if (x < 1)
+ fun_l10_n391(x)
+ else
+ fun_l10_n154(x)
+ end
+end
+
+def fun_l9_n23(x)
+ if (x < 1)
+ fun_l10_n591(x)
+ else
+ fun_l10_n443(x)
+ end
+end
+
+def fun_l9_n24(x)
+ if (x < 1)
+ fun_l10_n105(x)
+ else
+ fun_l10_n652(x)
+ end
+end
+
+def fun_l9_n25(x)
+ if (x < 1)
+ fun_l10_n495(x)
+ else
+ fun_l10_n185(x)
+ end
+end
+
+def fun_l9_n26(x)
+ if (x < 1)
+ fun_l10_n160(x)
+ else
+ fun_l10_n77(x)
+ end
+end
+
+def fun_l9_n27(x)
+ if (x < 1)
+ fun_l10_n307(x)
+ else
+ fun_l10_n813(x)
+ end
+end
+
+def fun_l9_n28(x)
+ if (x < 1)
+ fun_l10_n651(x)
+ else
+ fun_l10_n198(x)
+ end
+end
+
+def fun_l9_n29(x)
+ if (x < 1)
+ fun_l10_n689(x)
+ else
+ fun_l10_n995(x)
+ end
+end
+
+def fun_l9_n30(x)
+ if (x < 1)
+ fun_l10_n52(x)
+ else
+ fun_l10_n846(x)
+ end
+end
+
+def fun_l9_n31(x)
+ if (x < 1)
+ fun_l10_n151(x)
+ else
+ fun_l10_n758(x)
+ end
+end
+
+def fun_l9_n32(x)
+ if (x < 1)
+ fun_l10_n675(x)
+ else
+ fun_l10_n240(x)
+ end
+end
+
+def fun_l9_n33(x)
+ if (x < 1)
+ fun_l10_n660(x)
+ else
+ fun_l10_n826(x)
+ end
+end
+
+def fun_l9_n34(x)
+ if (x < 1)
+ fun_l10_n858(x)
+ else
+ fun_l10_n120(x)
+ end
+end
+
+def fun_l9_n35(x)
+ if (x < 1)
+ fun_l10_n28(x)
+ else
+ fun_l10_n870(x)
+ end
+end
+
+def fun_l9_n36(x)
+ if (x < 1)
+ fun_l10_n275(x)
+ else
+ fun_l10_n376(x)
+ end
+end
+
+def fun_l9_n37(x)
+ if (x < 1)
+ fun_l10_n852(x)
+ else
+ fun_l10_n413(x)
+ end
+end
+
+def fun_l9_n38(x)
+ if (x < 1)
+ fun_l10_n608(x)
+ else
+ fun_l10_n740(x)
+ end
+end
+
+def fun_l9_n39(x)
+ if (x < 1)
+ fun_l10_n856(x)
+ else
+ fun_l10_n543(x)
+ end
+end
+
+def fun_l9_n40(x)
+ if (x < 1)
+ fun_l10_n979(x)
+ else
+ fun_l10_n37(x)
+ end
+end
+
+def fun_l9_n41(x)
+ if (x < 1)
+ fun_l10_n752(x)
+ else
+ fun_l10_n94(x)
+ end
+end
+
+def fun_l9_n42(x)
+ if (x < 1)
+ fun_l10_n653(x)
+ else
+ fun_l10_n64(x)
+ end
+end
+
+def fun_l9_n43(x)
+ if (x < 1)
+ fun_l10_n860(x)
+ else
+ fun_l10_n658(x)
+ end
+end
+
+def fun_l9_n44(x)
+ if (x < 1)
+ fun_l10_n952(x)
+ else
+ fun_l10_n413(x)
+ end
+end
+
+def fun_l9_n45(x)
+ if (x < 1)
+ fun_l10_n70(x)
+ else
+ fun_l10_n297(x)
+ end
+end
+
+def fun_l9_n46(x)
+ if (x < 1)
+ fun_l10_n100(x)
+ else
+ fun_l10_n154(x)
+ end
+end
+
+def fun_l9_n47(x)
+ if (x < 1)
+ fun_l10_n746(x)
+ else
+ fun_l10_n937(x)
+ end
+end
+
+def fun_l9_n48(x)
+ if (x < 1)
+ fun_l10_n341(x)
+ else
+ fun_l10_n200(x)
+ end
+end
+
+def fun_l9_n49(x)
+ if (x < 1)
+ fun_l10_n317(x)
+ else
+ fun_l10_n607(x)
+ end
+end
+
+def fun_l9_n50(x)
+ if (x < 1)
+ fun_l10_n194(x)
+ else
+ fun_l10_n499(x)
+ end
+end
+
+def fun_l9_n51(x)
+ if (x < 1)
+ fun_l10_n936(x)
+ else
+ fun_l10_n387(x)
+ end
+end
+
+def fun_l9_n52(x)
+ if (x < 1)
+ fun_l10_n660(x)
+ else
+ fun_l10_n734(x)
+ end
+end
+
+def fun_l9_n53(x)
+ if (x < 1)
+ fun_l10_n523(x)
+ else
+ fun_l10_n532(x)
+ end
+end
+
+def fun_l9_n54(x)
+ if (x < 1)
+ fun_l10_n847(x)
+ else
+ fun_l10_n586(x)
+ end
+end
+
+def fun_l9_n55(x)
+ if (x < 1)
+ fun_l10_n378(x)
+ else
+ fun_l10_n226(x)
+ end
+end
+
+def fun_l9_n56(x)
+ if (x < 1)
+ fun_l10_n55(x)
+ else
+ fun_l10_n823(x)
+ end
+end
+
+def fun_l9_n57(x)
+ if (x < 1)
+ fun_l10_n931(x)
+ else
+ fun_l10_n268(x)
+ end
+end
+
+def fun_l9_n58(x)
+ if (x < 1)
+ fun_l10_n603(x)
+ else
+ fun_l10_n746(x)
+ end
+end
+
+def fun_l9_n59(x)
+ if (x < 1)
+ fun_l10_n174(x)
+ else
+ fun_l10_n196(x)
+ end
+end
+
+def fun_l9_n60(x)
+ if (x < 1)
+ fun_l10_n45(x)
+ else
+ fun_l10_n907(x)
+ end
+end
+
+def fun_l9_n61(x)
+ if (x < 1)
+ fun_l10_n282(x)
+ else
+ fun_l10_n478(x)
+ end
+end
+
+def fun_l9_n62(x)
+ if (x < 1)
+ fun_l10_n558(x)
+ else
+ fun_l10_n354(x)
+ end
+end
+
+def fun_l9_n63(x)
+ if (x < 1)
+ fun_l10_n729(x)
+ else
+ fun_l10_n275(x)
+ end
+end
+
+def fun_l9_n64(x)
+ if (x < 1)
+ fun_l10_n804(x)
+ else
+ fun_l10_n873(x)
+ end
+end
+
+def fun_l9_n65(x)
+ if (x < 1)
+ fun_l10_n901(x)
+ else
+ fun_l10_n684(x)
+ end
+end
+
+def fun_l9_n66(x)
+ if (x < 1)
+ fun_l10_n542(x)
+ else
+ fun_l10_n668(x)
+ end
+end
+
+def fun_l9_n67(x)
+ if (x < 1)
+ fun_l10_n112(x)
+ else
+ fun_l10_n48(x)
+ end
+end
+
+def fun_l9_n68(x)
+ if (x < 1)
+ fun_l10_n78(x)
+ else
+ fun_l10_n50(x)
+ end
+end
+
+def fun_l9_n69(x)
+ if (x < 1)
+ fun_l10_n595(x)
+ else
+ fun_l10_n163(x)
+ end
+end
+
+def fun_l9_n70(x)
+ if (x < 1)
+ fun_l10_n839(x)
+ else
+ fun_l10_n811(x)
+ end
+end
+
+def fun_l9_n71(x)
+ if (x < 1)
+ fun_l10_n704(x)
+ else
+ fun_l10_n81(x)
+ end
+end
+
+def fun_l9_n72(x)
+ if (x < 1)
+ fun_l10_n708(x)
+ else
+ fun_l10_n711(x)
+ end
+end
+
+def fun_l9_n73(x)
+ if (x < 1)
+ fun_l10_n948(x)
+ else
+ fun_l10_n397(x)
+ end
+end
+
+def fun_l9_n74(x)
+ if (x < 1)
+ fun_l10_n168(x)
+ else
+ fun_l10_n415(x)
+ end
+end
+
+def fun_l9_n75(x)
+ if (x < 1)
+ fun_l10_n191(x)
+ else
+ fun_l10_n547(x)
+ end
+end
+
+def fun_l9_n76(x)
+ if (x < 1)
+ fun_l10_n163(x)
+ else
+ fun_l10_n246(x)
+ end
+end
+
+def fun_l9_n77(x)
+ if (x < 1)
+ fun_l10_n948(x)
+ else
+ fun_l10_n80(x)
+ end
+end
+
+def fun_l9_n78(x)
+ if (x < 1)
+ fun_l10_n178(x)
+ else
+ fun_l10_n698(x)
+ end
+end
+
+def fun_l9_n79(x)
+ if (x < 1)
+ fun_l10_n150(x)
+ else
+ fun_l10_n545(x)
+ end
+end
+
+def fun_l9_n80(x)
+ if (x < 1)
+ fun_l10_n808(x)
+ else
+ fun_l10_n668(x)
+ end
+end
+
+def fun_l9_n81(x)
+ if (x < 1)
+ fun_l10_n597(x)
+ else
+ fun_l10_n908(x)
+ end
+end
+
+def fun_l9_n82(x)
+ if (x < 1)
+ fun_l10_n868(x)
+ else
+ fun_l10_n831(x)
+ end
+end
+
+def fun_l9_n83(x)
+ if (x < 1)
+ fun_l10_n432(x)
+ else
+ fun_l10_n281(x)
+ end
+end
+
+def fun_l9_n84(x)
+ if (x < 1)
+ fun_l10_n906(x)
+ else
+ fun_l10_n838(x)
+ end
+end
+
+def fun_l9_n85(x)
+ if (x < 1)
+ fun_l10_n828(x)
+ else
+ fun_l10_n876(x)
+ end
+end
+
+def fun_l9_n86(x)
+ if (x < 1)
+ fun_l10_n537(x)
+ else
+ fun_l10_n283(x)
+ end
+end
+
+def fun_l9_n87(x)
+ if (x < 1)
+ fun_l10_n108(x)
+ else
+ fun_l10_n157(x)
+ end
+end
+
+def fun_l9_n88(x)
+ if (x < 1)
+ fun_l10_n576(x)
+ else
+ fun_l10_n448(x)
+ end
+end
+
+def fun_l9_n89(x)
+ if (x < 1)
+ fun_l10_n633(x)
+ else
+ fun_l10_n43(x)
+ end
+end
+
+def fun_l9_n90(x)
+ if (x < 1)
+ fun_l10_n114(x)
+ else
+ fun_l10_n44(x)
+ end
+end
+
+def fun_l9_n91(x)
+ if (x < 1)
+ fun_l10_n656(x)
+ else
+ fun_l10_n586(x)
+ end
+end
+
+def fun_l9_n92(x)
+ if (x < 1)
+ fun_l10_n366(x)
+ else
+ fun_l10_n613(x)
+ end
+end
+
+def fun_l9_n93(x)
+ if (x < 1)
+ fun_l10_n174(x)
+ else
+ fun_l10_n250(x)
+ end
+end
+
+def fun_l9_n94(x)
+ if (x < 1)
+ fun_l10_n911(x)
+ else
+ fun_l10_n877(x)
+ end
+end
+
+def fun_l9_n95(x)
+ if (x < 1)
+ fun_l10_n940(x)
+ else
+ fun_l10_n334(x)
+ end
+end
+
+def fun_l9_n96(x)
+ if (x < 1)
+ fun_l10_n473(x)
+ else
+ fun_l10_n914(x)
+ end
+end
+
+def fun_l9_n97(x)
+ if (x < 1)
+ fun_l10_n550(x)
+ else
+ fun_l10_n80(x)
+ end
+end
+
+def fun_l9_n98(x)
+ if (x < 1)
+ fun_l10_n46(x)
+ else
+ fun_l10_n716(x)
+ end
+end
+
+def fun_l9_n99(x)
+ if (x < 1)
+ fun_l10_n294(x)
+ else
+ fun_l10_n615(x)
+ end
+end
+
+def fun_l9_n100(x)
+ if (x < 1)
+ fun_l10_n286(x)
+ else
+ fun_l10_n120(x)
+ end
+end
+
+def fun_l9_n101(x)
+ if (x < 1)
+ fun_l10_n674(x)
+ else
+ fun_l10_n498(x)
+ end
+end
+
+def fun_l9_n102(x)
+ if (x < 1)
+ fun_l10_n700(x)
+ else
+ fun_l10_n35(x)
+ end
+end
+
+def fun_l9_n103(x)
+ if (x < 1)
+ fun_l10_n225(x)
+ else
+ fun_l10_n206(x)
+ end
+end
+
+def fun_l9_n104(x)
+ if (x < 1)
+ fun_l10_n594(x)
+ else
+ fun_l10_n679(x)
+ end
+end
+
+def fun_l9_n105(x)
+ if (x < 1)
+ fun_l10_n148(x)
+ else
+ fun_l10_n449(x)
+ end
+end
+
+def fun_l9_n106(x)
+ if (x < 1)
+ fun_l10_n125(x)
+ else
+ fun_l10_n761(x)
+ end
+end
+
+def fun_l9_n107(x)
+ if (x < 1)
+ fun_l10_n642(x)
+ else
+ fun_l10_n988(x)
+ end
+end
+
+def fun_l9_n108(x)
+ if (x < 1)
+ fun_l10_n952(x)
+ else
+ fun_l10_n436(x)
+ end
+end
+
+def fun_l9_n109(x)
+ if (x < 1)
+ fun_l10_n955(x)
+ else
+ fun_l10_n380(x)
+ end
+end
+
+def fun_l9_n110(x)
+ if (x < 1)
+ fun_l10_n813(x)
+ else
+ fun_l10_n837(x)
+ end
+end
+
+def fun_l9_n111(x)
+ if (x < 1)
+ fun_l10_n471(x)
+ else
+ fun_l10_n69(x)
+ end
+end
+
+def fun_l9_n112(x)
+ if (x < 1)
+ fun_l10_n614(x)
+ else
+ fun_l10_n665(x)
+ end
+end
+
+def fun_l9_n113(x)
+ if (x < 1)
+ fun_l10_n485(x)
+ else
+ fun_l10_n276(x)
+ end
+end
+
+def fun_l9_n114(x)
+ if (x < 1)
+ fun_l10_n171(x)
+ else
+ fun_l10_n457(x)
+ end
+end
+
+def fun_l9_n115(x)
+ if (x < 1)
+ fun_l10_n106(x)
+ else
+ fun_l10_n555(x)
+ end
+end
+
+def fun_l9_n116(x)
+ if (x < 1)
+ fun_l10_n231(x)
+ else
+ fun_l10_n163(x)
+ end
+end
+
+def fun_l9_n117(x)
+ if (x < 1)
+ fun_l10_n569(x)
+ else
+ fun_l10_n345(x)
+ end
+end
+
+def fun_l9_n118(x)
+ if (x < 1)
+ fun_l10_n946(x)
+ else
+ fun_l10_n174(x)
+ end
+end
+
+def fun_l9_n119(x)
+ if (x < 1)
+ fun_l10_n716(x)
+ else
+ fun_l10_n882(x)
+ end
+end
+
+def fun_l9_n120(x)
+ if (x < 1)
+ fun_l10_n628(x)
+ else
+ fun_l10_n838(x)
+ end
+end
+
+def fun_l9_n121(x)
+ if (x < 1)
+ fun_l10_n699(x)
+ else
+ fun_l10_n384(x)
+ end
+end
+
+def fun_l9_n122(x)
+ if (x < 1)
+ fun_l10_n180(x)
+ else
+ fun_l10_n98(x)
+ end
+end
+
+def fun_l9_n123(x)
+ if (x < 1)
+ fun_l10_n177(x)
+ else
+ fun_l10_n635(x)
+ end
+end
+
+def fun_l9_n124(x)
+ if (x < 1)
+ fun_l10_n398(x)
+ else
+ fun_l10_n121(x)
+ end
+end
+
+def fun_l9_n125(x)
+ if (x < 1)
+ fun_l10_n866(x)
+ else
+ fun_l10_n595(x)
+ end
+end
+
+def fun_l9_n126(x)
+ if (x < 1)
+ fun_l10_n9(x)
+ else
+ fun_l10_n901(x)
+ end
+end
+
+def fun_l9_n127(x)
+ if (x < 1)
+ fun_l10_n579(x)
+ else
+ fun_l10_n640(x)
+ end
+end
+
+def fun_l9_n128(x)
+ if (x < 1)
+ fun_l10_n884(x)
+ else
+ fun_l10_n327(x)
+ end
+end
+
+def fun_l9_n129(x)
+ if (x < 1)
+ fun_l10_n553(x)
+ else
+ fun_l10_n73(x)
+ end
+end
+
+def fun_l9_n130(x)
+ if (x < 1)
+ fun_l10_n372(x)
+ else
+ fun_l10_n450(x)
+ end
+end
+
+def fun_l9_n131(x)
+ if (x < 1)
+ fun_l10_n748(x)
+ else
+ fun_l10_n534(x)
+ end
+end
+
+def fun_l9_n132(x)
+ if (x < 1)
+ fun_l10_n529(x)
+ else
+ fun_l10_n689(x)
+ end
+end
+
+def fun_l9_n133(x)
+ if (x < 1)
+ fun_l10_n24(x)
+ else
+ fun_l10_n677(x)
+ end
+end
+
+def fun_l9_n134(x)
+ if (x < 1)
+ fun_l10_n4(x)
+ else
+ fun_l10_n482(x)
+ end
+end
+
+def fun_l9_n135(x)
+ if (x < 1)
+ fun_l10_n314(x)
+ else
+ fun_l10_n509(x)
+ end
+end
+
+def fun_l9_n136(x)
+ if (x < 1)
+ fun_l10_n160(x)
+ else
+ fun_l10_n342(x)
+ end
+end
+
+def fun_l9_n137(x)
+ if (x < 1)
+ fun_l10_n289(x)
+ else
+ fun_l10_n910(x)
+ end
+end
+
+def fun_l9_n138(x)
+ if (x < 1)
+ fun_l10_n926(x)
+ else
+ fun_l10_n752(x)
+ end
+end
+
+def fun_l9_n139(x)
+ if (x < 1)
+ fun_l10_n303(x)
+ else
+ fun_l10_n399(x)
+ end
+end
+
+def fun_l9_n140(x)
+ if (x < 1)
+ fun_l10_n11(x)
+ else
+ fun_l10_n241(x)
+ end
+end
+
+def fun_l9_n141(x)
+ if (x < 1)
+ fun_l10_n528(x)
+ else
+ fun_l10_n727(x)
+ end
+end
+
+def fun_l9_n142(x)
+ if (x < 1)
+ fun_l10_n572(x)
+ else
+ fun_l10_n132(x)
+ end
+end
+
+def fun_l9_n143(x)
+ if (x < 1)
+ fun_l10_n858(x)
+ else
+ fun_l10_n712(x)
+ end
+end
+
+def fun_l9_n144(x)
+ if (x < 1)
+ fun_l10_n662(x)
+ else
+ fun_l10_n128(x)
+ end
+end
+
+def fun_l9_n145(x)
+ if (x < 1)
+ fun_l10_n668(x)
+ else
+ fun_l10_n483(x)
+ end
+end
+
+def fun_l9_n146(x)
+ if (x < 1)
+ fun_l10_n401(x)
+ else
+ fun_l10_n330(x)
+ end
+end
+
+def fun_l9_n147(x)
+ if (x < 1)
+ fun_l10_n103(x)
+ else
+ fun_l10_n859(x)
+ end
+end
+
+def fun_l9_n148(x)
+ if (x < 1)
+ fun_l10_n129(x)
+ else
+ fun_l10_n628(x)
+ end
+end
+
+def fun_l9_n149(x)
+ if (x < 1)
+ fun_l10_n898(x)
+ else
+ fun_l10_n984(x)
+ end
+end
+
+def fun_l9_n150(x)
+ if (x < 1)
+ fun_l10_n574(x)
+ else
+ fun_l10_n59(x)
+ end
+end
+
+def fun_l9_n151(x)
+ if (x < 1)
+ fun_l10_n759(x)
+ else
+ fun_l10_n782(x)
+ end
+end
+
+def fun_l9_n152(x)
+ if (x < 1)
+ fun_l10_n588(x)
+ else
+ fun_l10_n383(x)
+ end
+end
+
+def fun_l9_n153(x)
+ if (x < 1)
+ fun_l10_n889(x)
+ else
+ fun_l10_n628(x)
+ end
+end
+
+def fun_l9_n154(x)
+ if (x < 1)
+ fun_l10_n376(x)
+ else
+ fun_l10_n442(x)
+ end
+end
+
+def fun_l9_n155(x)
+ if (x < 1)
+ fun_l10_n497(x)
+ else
+ fun_l10_n269(x)
+ end
+end
+
+def fun_l9_n156(x)
+ if (x < 1)
+ fun_l10_n976(x)
+ else
+ fun_l10_n829(x)
+ end
+end
+
+def fun_l9_n157(x)
+ if (x < 1)
+ fun_l10_n366(x)
+ else
+ fun_l10_n416(x)
+ end
+end
+
+def fun_l9_n158(x)
+ if (x < 1)
+ fun_l10_n712(x)
+ else
+ fun_l10_n19(x)
+ end
+end
+
+def fun_l9_n159(x)
+ if (x < 1)
+ fun_l10_n151(x)
+ else
+ fun_l10_n129(x)
+ end
+end
+
+def fun_l9_n160(x)
+ if (x < 1)
+ fun_l10_n621(x)
+ else
+ fun_l10_n385(x)
+ end
+end
+
+def fun_l9_n161(x)
+ if (x < 1)
+ fun_l10_n626(x)
+ else
+ fun_l10_n686(x)
+ end
+end
+
+def fun_l9_n162(x)
+ if (x < 1)
+ fun_l10_n165(x)
+ else
+ fun_l10_n922(x)
+ end
+end
+
+def fun_l9_n163(x)
+ if (x < 1)
+ fun_l10_n670(x)
+ else
+ fun_l10_n889(x)
+ end
+end
+
+def fun_l9_n164(x)
+ if (x < 1)
+ fun_l10_n346(x)
+ else
+ fun_l10_n292(x)
+ end
+end
+
+def fun_l9_n165(x)
+ if (x < 1)
+ fun_l10_n812(x)
+ else
+ fun_l10_n799(x)
+ end
+end
+
+def fun_l9_n166(x)
+ if (x < 1)
+ fun_l10_n21(x)
+ else
+ fun_l10_n641(x)
+ end
+end
+
+def fun_l9_n167(x)
+ if (x < 1)
+ fun_l10_n268(x)
+ else
+ fun_l10_n943(x)
+ end
+end
+
+def fun_l9_n168(x)
+ if (x < 1)
+ fun_l10_n349(x)
+ else
+ fun_l10_n620(x)
+ end
+end
+
+def fun_l9_n169(x)
+ if (x < 1)
+ fun_l10_n894(x)
+ else
+ fun_l10_n625(x)
+ end
+end
+
+def fun_l9_n170(x)
+ if (x < 1)
+ fun_l10_n732(x)
+ else
+ fun_l10_n518(x)
+ end
+end
+
+def fun_l9_n171(x)
+ if (x < 1)
+ fun_l10_n272(x)
+ else
+ fun_l10_n148(x)
+ end
+end
+
+def fun_l9_n172(x)
+ if (x < 1)
+ fun_l10_n701(x)
+ else
+ fun_l10_n227(x)
+ end
+end
+
+def fun_l9_n173(x)
+ if (x < 1)
+ fun_l10_n833(x)
+ else
+ fun_l10_n853(x)
+ end
+end
+
+def fun_l9_n174(x)
+ if (x < 1)
+ fun_l10_n643(x)
+ else
+ fun_l10_n314(x)
+ end
+end
+
+def fun_l9_n175(x)
+ if (x < 1)
+ fun_l10_n217(x)
+ else
+ fun_l10_n64(x)
+ end
+end
+
+def fun_l9_n176(x)
+ if (x < 1)
+ fun_l10_n204(x)
+ else
+ fun_l10_n990(x)
+ end
+end
+
+def fun_l9_n177(x)
+ if (x < 1)
+ fun_l10_n130(x)
+ else
+ fun_l10_n829(x)
+ end
+end
+
+def fun_l9_n178(x)
+ if (x < 1)
+ fun_l10_n260(x)
+ else
+ fun_l10_n881(x)
+ end
+end
+
+def fun_l9_n179(x)
+ if (x < 1)
+ fun_l10_n728(x)
+ else
+ fun_l10_n491(x)
+ end
+end
+
+def fun_l9_n180(x)
+ if (x < 1)
+ fun_l10_n456(x)
+ else
+ fun_l10_n221(x)
+ end
+end
+
+def fun_l9_n181(x)
+ if (x < 1)
+ fun_l10_n634(x)
+ else
+ fun_l10_n166(x)
+ end
+end
+
+def fun_l9_n182(x)
+ if (x < 1)
+ fun_l10_n427(x)
+ else
+ fun_l10_n452(x)
+ end
+end
+
+def fun_l9_n183(x)
+ if (x < 1)
+ fun_l10_n754(x)
+ else
+ fun_l10_n54(x)
+ end
+end
+
+def fun_l9_n184(x)
+ if (x < 1)
+ fun_l10_n137(x)
+ else
+ fun_l10_n155(x)
+ end
+end
+
+def fun_l9_n185(x)
+ if (x < 1)
+ fun_l10_n611(x)
+ else
+ fun_l10_n573(x)
+ end
+end
+
+def fun_l9_n186(x)
+ if (x < 1)
+ fun_l10_n694(x)
+ else
+ fun_l10_n890(x)
+ end
+end
+
+def fun_l9_n187(x)
+ if (x < 1)
+ fun_l10_n533(x)
+ else
+ fun_l10_n102(x)
+ end
+end
+
+def fun_l9_n188(x)
+ if (x < 1)
+ fun_l10_n400(x)
+ else
+ fun_l10_n838(x)
+ end
+end
+
+def fun_l9_n189(x)
+ if (x < 1)
+ fun_l10_n783(x)
+ else
+ fun_l10_n620(x)
+ end
+end
+
+def fun_l9_n190(x)
+ if (x < 1)
+ fun_l10_n209(x)
+ else
+ fun_l10_n777(x)
+ end
+end
+
+def fun_l9_n191(x)
+ if (x < 1)
+ fun_l10_n760(x)
+ else
+ fun_l10_n299(x)
+ end
+end
+
+def fun_l9_n192(x)
+ if (x < 1)
+ fun_l10_n306(x)
+ else
+ fun_l10_n509(x)
+ end
+end
+
+def fun_l9_n193(x)
+ if (x < 1)
+ fun_l10_n842(x)
+ else
+ fun_l10_n0(x)
+ end
+end
+
+def fun_l9_n194(x)
+ if (x < 1)
+ fun_l10_n620(x)
+ else
+ fun_l10_n757(x)
+ end
+end
+
+def fun_l9_n195(x)
+ if (x < 1)
+ fun_l10_n944(x)
+ else
+ fun_l10_n257(x)
+ end
+end
+
+def fun_l9_n196(x)
+ if (x < 1)
+ fun_l10_n222(x)
+ else
+ fun_l10_n11(x)
+ end
+end
+
+def fun_l9_n197(x)
+ if (x < 1)
+ fun_l10_n419(x)
+ else
+ fun_l10_n704(x)
+ end
+end
+
+def fun_l9_n198(x)
+ if (x < 1)
+ fun_l10_n656(x)
+ else
+ fun_l10_n341(x)
+ end
+end
+
+def fun_l9_n199(x)
+ if (x < 1)
+ fun_l10_n129(x)
+ else
+ fun_l10_n815(x)
+ end
+end
+
+def fun_l9_n200(x)
+ if (x < 1)
+ fun_l10_n768(x)
+ else
+ fun_l10_n924(x)
+ end
+end
+
+def fun_l9_n201(x)
+ if (x < 1)
+ fun_l10_n439(x)
+ else
+ fun_l10_n361(x)
+ end
+end
+
+def fun_l9_n202(x)
+ if (x < 1)
+ fun_l10_n421(x)
+ else
+ fun_l10_n937(x)
+ end
+end
+
+def fun_l9_n203(x)
+ if (x < 1)
+ fun_l10_n323(x)
+ else
+ fun_l10_n262(x)
+ end
+end
+
+def fun_l9_n204(x)
+ if (x < 1)
+ fun_l10_n335(x)
+ else
+ fun_l10_n87(x)
+ end
+end
+
+def fun_l9_n205(x)
+ if (x < 1)
+ fun_l10_n973(x)
+ else
+ fun_l10_n262(x)
+ end
+end
+
+def fun_l9_n206(x)
+ if (x < 1)
+ fun_l10_n494(x)
+ else
+ fun_l10_n430(x)
+ end
+end
+
+def fun_l9_n207(x)
+ if (x < 1)
+ fun_l10_n482(x)
+ else
+ fun_l10_n828(x)
+ end
+end
+
+def fun_l9_n208(x)
+ if (x < 1)
+ fun_l10_n820(x)
+ else
+ fun_l10_n646(x)
+ end
+end
+
+def fun_l9_n209(x)
+ if (x < 1)
+ fun_l10_n669(x)
+ else
+ fun_l10_n176(x)
+ end
+end
+
+def fun_l9_n210(x)
+ if (x < 1)
+ fun_l10_n165(x)
+ else
+ fun_l10_n963(x)
+ end
+end
+
+def fun_l9_n211(x)
+ if (x < 1)
+ fun_l10_n772(x)
+ else
+ fun_l10_n49(x)
+ end
+end
+
+def fun_l9_n212(x)
+ if (x < 1)
+ fun_l10_n167(x)
+ else
+ fun_l10_n598(x)
+ end
+end
+
+def fun_l9_n213(x)
+ if (x < 1)
+ fun_l10_n552(x)
+ else
+ fun_l10_n374(x)
+ end
+end
+
+def fun_l9_n214(x)
+ if (x < 1)
+ fun_l10_n39(x)
+ else
+ fun_l10_n470(x)
+ end
+end
+
+def fun_l9_n215(x)
+ if (x < 1)
+ fun_l10_n489(x)
+ else
+ fun_l10_n812(x)
+ end
+end
+
+def fun_l9_n216(x)
+ if (x < 1)
+ fun_l10_n390(x)
+ else
+ fun_l10_n928(x)
+ end
+end
+
+def fun_l9_n217(x)
+ if (x < 1)
+ fun_l10_n909(x)
+ else
+ fun_l10_n876(x)
+ end
+end
+
+def fun_l9_n218(x)
+ if (x < 1)
+ fun_l10_n781(x)
+ else
+ fun_l10_n799(x)
+ end
+end
+
+def fun_l9_n219(x)
+ if (x < 1)
+ fun_l10_n958(x)
+ else
+ fun_l10_n697(x)
+ end
+end
+
+def fun_l9_n220(x)
+ if (x < 1)
+ fun_l10_n577(x)
+ else
+ fun_l10_n667(x)
+ end
+end
+
+def fun_l9_n221(x)
+ if (x < 1)
+ fun_l10_n206(x)
+ else
+ fun_l10_n573(x)
+ end
+end
+
+def fun_l9_n222(x)
+ if (x < 1)
+ fun_l10_n389(x)
+ else
+ fun_l10_n659(x)
+ end
+end
+
+def fun_l9_n223(x)
+ if (x < 1)
+ fun_l10_n951(x)
+ else
+ fun_l10_n572(x)
+ end
+end
+
+def fun_l9_n224(x)
+ if (x < 1)
+ fun_l10_n158(x)
+ else
+ fun_l10_n500(x)
+ end
+end
+
+def fun_l9_n225(x)
+ if (x < 1)
+ fun_l10_n681(x)
+ else
+ fun_l10_n983(x)
+ end
+end
+
+def fun_l9_n226(x)
+ if (x < 1)
+ fun_l10_n987(x)
+ else
+ fun_l10_n116(x)
+ end
+end
+
+def fun_l9_n227(x)
+ if (x < 1)
+ fun_l10_n347(x)
+ else
+ fun_l10_n606(x)
+ end
+end
+
+def fun_l9_n228(x)
+ if (x < 1)
+ fun_l10_n566(x)
+ else
+ fun_l10_n77(x)
+ end
+end
+
+def fun_l9_n229(x)
+ if (x < 1)
+ fun_l10_n879(x)
+ else
+ fun_l10_n66(x)
+ end
+end
+
+def fun_l9_n230(x)
+ if (x < 1)
+ fun_l10_n355(x)
+ else
+ fun_l10_n97(x)
+ end
+end
+
+def fun_l9_n231(x)
+ if (x < 1)
+ fun_l10_n938(x)
+ else
+ fun_l10_n5(x)
+ end
+end
+
+def fun_l9_n232(x)
+ if (x < 1)
+ fun_l10_n684(x)
+ else
+ fun_l10_n528(x)
+ end
+end
+
+def fun_l9_n233(x)
+ if (x < 1)
+ fun_l10_n500(x)
+ else
+ fun_l10_n246(x)
+ end
+end
+
+def fun_l9_n234(x)
+ if (x < 1)
+ fun_l10_n610(x)
+ else
+ fun_l10_n61(x)
+ end
+end
+
+def fun_l9_n235(x)
+ if (x < 1)
+ fun_l10_n199(x)
+ else
+ fun_l10_n838(x)
+ end
+end
+
+def fun_l9_n236(x)
+ if (x < 1)
+ fun_l10_n820(x)
+ else
+ fun_l10_n633(x)
+ end
+end
+
+def fun_l9_n237(x)
+ if (x < 1)
+ fun_l10_n216(x)
+ else
+ fun_l10_n546(x)
+ end
+end
+
+def fun_l9_n238(x)
+ if (x < 1)
+ fun_l10_n555(x)
+ else
+ fun_l10_n153(x)
+ end
+end
+
+def fun_l9_n239(x)
+ if (x < 1)
+ fun_l10_n236(x)
+ else
+ fun_l10_n231(x)
+ end
+end
+
+def fun_l9_n240(x)
+ if (x < 1)
+ fun_l10_n775(x)
+ else
+ fun_l10_n823(x)
+ end
+end
+
+def fun_l9_n241(x)
+ if (x < 1)
+ fun_l10_n275(x)
+ else
+ fun_l10_n519(x)
+ end
+end
+
+def fun_l9_n242(x)
+ if (x < 1)
+ fun_l10_n239(x)
+ else
+ fun_l10_n791(x)
+ end
+end
+
+def fun_l9_n243(x)
+ if (x < 1)
+ fun_l10_n639(x)
+ else
+ fun_l10_n972(x)
+ end
+end
+
+def fun_l9_n244(x)
+ if (x < 1)
+ fun_l10_n5(x)
+ else
+ fun_l10_n510(x)
+ end
+end
+
+def fun_l9_n245(x)
+ if (x < 1)
+ fun_l10_n256(x)
+ else
+ fun_l10_n298(x)
+ end
+end
+
+def fun_l9_n246(x)
+ if (x < 1)
+ fun_l10_n139(x)
+ else
+ fun_l10_n385(x)
+ end
+end
+
+def fun_l9_n247(x)
+ if (x < 1)
+ fun_l10_n4(x)
+ else
+ fun_l10_n323(x)
+ end
+end
+
+def fun_l9_n248(x)
+ if (x < 1)
+ fun_l10_n166(x)
+ else
+ fun_l10_n539(x)
+ end
+end
+
+def fun_l9_n249(x)
+ if (x < 1)
+ fun_l10_n374(x)
+ else
+ fun_l10_n351(x)
+ end
+end
+
+def fun_l9_n250(x)
+ if (x < 1)
+ fun_l10_n650(x)
+ else
+ fun_l10_n791(x)
+ end
+end
+
+def fun_l9_n251(x)
+ if (x < 1)
+ fun_l10_n799(x)
+ else
+ fun_l10_n990(x)
+ end
+end
+
+def fun_l9_n252(x)
+ if (x < 1)
+ fun_l10_n388(x)
+ else
+ fun_l10_n887(x)
+ end
+end
+
+def fun_l9_n253(x)
+ if (x < 1)
+ fun_l10_n564(x)
+ else
+ fun_l10_n997(x)
+ end
+end
+
+def fun_l9_n254(x)
+ if (x < 1)
+ fun_l10_n580(x)
+ else
+ fun_l10_n646(x)
+ end
+end
+
+def fun_l9_n255(x)
+ if (x < 1)
+ fun_l10_n0(x)
+ else
+ fun_l10_n480(x)
+ end
+end
+
+def fun_l9_n256(x)
+ if (x < 1)
+ fun_l10_n606(x)
+ else
+ fun_l10_n48(x)
+ end
+end
+
+def fun_l9_n257(x)
+ if (x < 1)
+ fun_l10_n601(x)
+ else
+ fun_l10_n657(x)
+ end
+end
+
+def fun_l9_n258(x)
+ if (x < 1)
+ fun_l10_n419(x)
+ else
+ fun_l10_n909(x)
+ end
+end
+
+def fun_l9_n259(x)
+ if (x < 1)
+ fun_l10_n194(x)
+ else
+ fun_l10_n961(x)
+ end
+end
+
+def fun_l9_n260(x)
+ if (x < 1)
+ fun_l10_n876(x)
+ else
+ fun_l10_n345(x)
+ end
+end
+
+def fun_l9_n261(x)
+ if (x < 1)
+ fun_l10_n643(x)
+ else
+ fun_l10_n905(x)
+ end
+end
+
+def fun_l9_n262(x)
+ if (x < 1)
+ fun_l10_n105(x)
+ else
+ fun_l10_n61(x)
+ end
+end
+
+def fun_l9_n263(x)
+ if (x < 1)
+ fun_l10_n610(x)
+ else
+ fun_l10_n527(x)
+ end
+end
+
+def fun_l9_n264(x)
+ if (x < 1)
+ fun_l10_n183(x)
+ else
+ fun_l10_n51(x)
+ end
+end
+
+def fun_l9_n265(x)
+ if (x < 1)
+ fun_l10_n800(x)
+ else
+ fun_l10_n103(x)
+ end
+end
+
+def fun_l9_n266(x)
+ if (x < 1)
+ fun_l10_n501(x)
+ else
+ fun_l10_n293(x)
+ end
+end
+
+def fun_l9_n267(x)
+ if (x < 1)
+ fun_l10_n207(x)
+ else
+ fun_l10_n162(x)
+ end
+end
+
+def fun_l9_n268(x)
+ if (x < 1)
+ fun_l10_n901(x)
+ else
+ fun_l10_n914(x)
+ end
+end
+
+def fun_l9_n269(x)
+ if (x < 1)
+ fun_l10_n711(x)
+ else
+ fun_l10_n227(x)
+ end
+end
+
+def fun_l9_n270(x)
+ if (x < 1)
+ fun_l10_n445(x)
+ else
+ fun_l10_n227(x)
+ end
+end
+
+def fun_l9_n271(x)
+ if (x < 1)
+ fun_l10_n585(x)
+ else
+ fun_l10_n371(x)
+ end
+end
+
+def fun_l9_n272(x)
+ if (x < 1)
+ fun_l10_n137(x)
+ else
+ fun_l10_n678(x)
+ end
+end
+
+def fun_l9_n273(x)
+ if (x < 1)
+ fun_l10_n284(x)
+ else
+ fun_l10_n801(x)
+ end
+end
+
+def fun_l9_n274(x)
+ if (x < 1)
+ fun_l10_n829(x)
+ else
+ fun_l10_n456(x)
+ end
+end
+
+def fun_l9_n275(x)
+ if (x < 1)
+ fun_l10_n663(x)
+ else
+ fun_l10_n529(x)
+ end
+end
+
+def fun_l9_n276(x)
+ if (x < 1)
+ fun_l10_n154(x)
+ else
+ fun_l10_n421(x)
+ end
+end
+
+def fun_l9_n277(x)
+ if (x < 1)
+ fun_l10_n778(x)
+ else
+ fun_l10_n325(x)
+ end
+end
+
+def fun_l9_n278(x)
+ if (x < 1)
+ fun_l10_n179(x)
+ else
+ fun_l10_n369(x)
+ end
+end
+
+def fun_l9_n279(x)
+ if (x < 1)
+ fun_l10_n800(x)
+ else
+ fun_l10_n488(x)
+ end
+end
+
+def fun_l9_n280(x)
+ if (x < 1)
+ fun_l10_n617(x)
+ else
+ fun_l10_n1(x)
+ end
+end
+
+def fun_l9_n281(x)
+ if (x < 1)
+ fun_l10_n951(x)
+ else
+ fun_l10_n763(x)
+ end
+end
+
+def fun_l9_n282(x)
+ if (x < 1)
+ fun_l10_n537(x)
+ else
+ fun_l10_n541(x)
+ end
+end
+
+def fun_l9_n283(x)
+ if (x < 1)
+ fun_l10_n664(x)
+ else
+ fun_l10_n854(x)
+ end
+end
+
+def fun_l9_n284(x)
+ if (x < 1)
+ fun_l10_n711(x)
+ else
+ fun_l10_n767(x)
+ end
+end
+
+def fun_l9_n285(x)
+ if (x < 1)
+ fun_l10_n211(x)
+ else
+ fun_l10_n733(x)
+ end
+end
+
+def fun_l9_n286(x)
+ if (x < 1)
+ fun_l10_n524(x)
+ else
+ fun_l10_n850(x)
+ end
+end
+
+def fun_l9_n287(x)
+ if (x < 1)
+ fun_l10_n270(x)
+ else
+ fun_l10_n798(x)
+ end
+end
+
+def fun_l9_n288(x)
+ if (x < 1)
+ fun_l10_n906(x)
+ else
+ fun_l10_n408(x)
+ end
+end
+
+def fun_l9_n289(x)
+ if (x < 1)
+ fun_l10_n873(x)
+ else
+ fun_l10_n298(x)
+ end
+end
+
+def fun_l9_n290(x)
+ if (x < 1)
+ fun_l10_n535(x)
+ else
+ fun_l10_n946(x)
+ end
+end
+
+def fun_l9_n291(x)
+ if (x < 1)
+ fun_l10_n290(x)
+ else
+ fun_l10_n631(x)
+ end
+end
+
+def fun_l9_n292(x)
+ if (x < 1)
+ fun_l10_n223(x)
+ else
+ fun_l10_n165(x)
+ end
+end
+
+def fun_l9_n293(x)
+ if (x < 1)
+ fun_l10_n768(x)
+ else
+ fun_l10_n512(x)
+ end
+end
+
+def fun_l9_n294(x)
+ if (x < 1)
+ fun_l10_n133(x)
+ else
+ fun_l10_n986(x)
+ end
+end
+
+def fun_l9_n295(x)
+ if (x < 1)
+ fun_l10_n657(x)
+ else
+ fun_l10_n914(x)
+ end
+end
+
+def fun_l9_n296(x)
+ if (x < 1)
+ fun_l10_n444(x)
+ else
+ fun_l10_n490(x)
+ end
+end
+
+def fun_l9_n297(x)
+ if (x < 1)
+ fun_l10_n478(x)
+ else
+ fun_l10_n979(x)
+ end
+end
+
+def fun_l9_n298(x)
+ if (x < 1)
+ fun_l10_n994(x)
+ else
+ fun_l10_n945(x)
+ end
+end
+
+def fun_l9_n299(x)
+ if (x < 1)
+ fun_l10_n865(x)
+ else
+ fun_l10_n206(x)
+ end
+end
+
+def fun_l9_n300(x)
+ if (x < 1)
+ fun_l10_n678(x)
+ else
+ fun_l10_n103(x)
+ end
+end
+
+def fun_l9_n301(x)
+ if (x < 1)
+ fun_l10_n115(x)
+ else
+ fun_l10_n742(x)
+ end
+end
+
+def fun_l9_n302(x)
+ if (x < 1)
+ fun_l10_n677(x)
+ else
+ fun_l10_n446(x)
+ end
+end
+
+def fun_l9_n303(x)
+ if (x < 1)
+ fun_l10_n144(x)
+ else
+ fun_l10_n856(x)
+ end
+end
+
+def fun_l9_n304(x)
+ if (x < 1)
+ fun_l10_n751(x)
+ else
+ fun_l10_n989(x)
+ end
+end
+
+def fun_l9_n305(x)
+ if (x < 1)
+ fun_l10_n200(x)
+ else
+ fun_l10_n97(x)
+ end
+end
+
+def fun_l9_n306(x)
+ if (x < 1)
+ fun_l10_n685(x)
+ else
+ fun_l10_n663(x)
+ end
+end
+
+def fun_l9_n307(x)
+ if (x < 1)
+ fun_l10_n831(x)
+ else
+ fun_l10_n770(x)
+ end
+end
+
+def fun_l9_n308(x)
+ if (x < 1)
+ fun_l10_n467(x)
+ else
+ fun_l10_n715(x)
+ end
+end
+
+def fun_l9_n309(x)
+ if (x < 1)
+ fun_l10_n676(x)
+ else
+ fun_l10_n885(x)
+ end
+end
+
+def fun_l9_n310(x)
+ if (x < 1)
+ fun_l10_n382(x)
+ else
+ fun_l10_n687(x)
+ end
+end
+
+def fun_l9_n311(x)
+ if (x < 1)
+ fun_l10_n489(x)
+ else
+ fun_l10_n810(x)
+ end
+end
+
+def fun_l9_n312(x)
+ if (x < 1)
+ fun_l10_n922(x)
+ else
+ fun_l10_n81(x)
+ end
+end
+
+def fun_l9_n313(x)
+ if (x < 1)
+ fun_l10_n788(x)
+ else
+ fun_l10_n519(x)
+ end
+end
+
+def fun_l9_n314(x)
+ if (x < 1)
+ fun_l10_n830(x)
+ else
+ fun_l10_n486(x)
+ end
+end
+
+def fun_l9_n315(x)
+ if (x < 1)
+ fun_l10_n848(x)
+ else
+ fun_l10_n250(x)
+ end
+end
+
+def fun_l9_n316(x)
+ if (x < 1)
+ fun_l10_n933(x)
+ else
+ fun_l10_n268(x)
+ end
+end
+
+def fun_l9_n317(x)
+ if (x < 1)
+ fun_l10_n659(x)
+ else
+ fun_l10_n91(x)
+ end
+end
+
+def fun_l9_n318(x)
+ if (x < 1)
+ fun_l10_n417(x)
+ else
+ fun_l10_n99(x)
+ end
+end
+
+def fun_l9_n319(x)
+ if (x < 1)
+ fun_l10_n781(x)
+ else
+ fun_l10_n770(x)
+ end
+end
+
+def fun_l9_n320(x)
+ if (x < 1)
+ fun_l10_n820(x)
+ else
+ fun_l10_n836(x)
+ end
+end
+
+def fun_l9_n321(x)
+ if (x < 1)
+ fun_l10_n865(x)
+ else
+ fun_l10_n232(x)
+ end
+end
+
+def fun_l9_n322(x)
+ if (x < 1)
+ fun_l10_n793(x)
+ else
+ fun_l10_n856(x)
+ end
+end
+
+def fun_l9_n323(x)
+ if (x < 1)
+ fun_l10_n91(x)
+ else
+ fun_l10_n356(x)
+ end
+end
+
+def fun_l9_n324(x)
+ if (x < 1)
+ fun_l10_n262(x)
+ else
+ fun_l10_n776(x)
+ end
+end
+
+def fun_l9_n325(x)
+ if (x < 1)
+ fun_l10_n733(x)
+ else
+ fun_l10_n866(x)
+ end
+end
+
+def fun_l9_n326(x)
+ if (x < 1)
+ fun_l10_n798(x)
+ else
+ fun_l10_n703(x)
+ end
+end
+
+def fun_l9_n327(x)
+ if (x < 1)
+ fun_l10_n478(x)
+ else
+ fun_l10_n181(x)
+ end
+end
+
+def fun_l9_n328(x)
+ if (x < 1)
+ fun_l10_n66(x)
+ else
+ fun_l10_n736(x)
+ end
+end
+
+def fun_l9_n329(x)
+ if (x < 1)
+ fun_l10_n388(x)
+ else
+ fun_l10_n122(x)
+ end
+end
+
+def fun_l9_n330(x)
+ if (x < 1)
+ fun_l10_n382(x)
+ else
+ fun_l10_n85(x)
+ end
+end
+
+def fun_l9_n331(x)
+ if (x < 1)
+ fun_l10_n987(x)
+ else
+ fun_l10_n769(x)
+ end
+end
+
+def fun_l9_n332(x)
+ if (x < 1)
+ fun_l10_n644(x)
+ else
+ fun_l10_n230(x)
+ end
+end
+
+def fun_l9_n333(x)
+ if (x < 1)
+ fun_l10_n604(x)
+ else
+ fun_l10_n157(x)
+ end
+end
+
+def fun_l9_n334(x)
+ if (x < 1)
+ fun_l10_n50(x)
+ else
+ fun_l10_n417(x)
+ end
+end
+
+def fun_l9_n335(x)
+ if (x < 1)
+ fun_l10_n37(x)
+ else
+ fun_l10_n564(x)
+ end
+end
+
+def fun_l9_n336(x)
+ if (x < 1)
+ fun_l10_n265(x)
+ else
+ fun_l10_n330(x)
+ end
+end
+
+def fun_l9_n337(x)
+ if (x < 1)
+ fun_l10_n816(x)
+ else
+ fun_l10_n723(x)
+ end
+end
+
+def fun_l9_n338(x)
+ if (x < 1)
+ fun_l10_n583(x)
+ else
+ fun_l10_n193(x)
+ end
+end
+
+def fun_l9_n339(x)
+ if (x < 1)
+ fun_l10_n552(x)
+ else
+ fun_l10_n710(x)
+ end
+end
+
+def fun_l9_n340(x)
+ if (x < 1)
+ fun_l10_n594(x)
+ else
+ fun_l10_n323(x)
+ end
+end
+
+def fun_l9_n341(x)
+ if (x < 1)
+ fun_l10_n727(x)
+ else
+ fun_l10_n305(x)
+ end
+end
+
+def fun_l9_n342(x)
+ if (x < 1)
+ fun_l10_n621(x)
+ else
+ fun_l10_n917(x)
+ end
+end
+
+def fun_l9_n343(x)
+ if (x < 1)
+ fun_l10_n634(x)
+ else
+ fun_l10_n36(x)
+ end
+end
+
+def fun_l9_n344(x)
+ if (x < 1)
+ fun_l10_n792(x)
+ else
+ fun_l10_n438(x)
+ end
+end
+
+def fun_l9_n345(x)
+ if (x < 1)
+ fun_l10_n399(x)
+ else
+ fun_l10_n577(x)
+ end
+end
+
+def fun_l9_n346(x)
+ if (x < 1)
+ fun_l10_n110(x)
+ else
+ fun_l10_n120(x)
+ end
+end
+
+def fun_l9_n347(x)
+ if (x < 1)
+ fun_l10_n521(x)
+ else
+ fun_l10_n111(x)
+ end
+end
+
+def fun_l9_n348(x)
+ if (x < 1)
+ fun_l10_n134(x)
+ else
+ fun_l10_n49(x)
+ end
+end
+
+def fun_l9_n349(x)
+ if (x < 1)
+ fun_l10_n353(x)
+ else
+ fun_l10_n156(x)
+ end
+end
+
+def fun_l9_n350(x)
+ if (x < 1)
+ fun_l10_n532(x)
+ else
+ fun_l10_n796(x)
+ end
+end
+
+def fun_l9_n351(x)
+ if (x < 1)
+ fun_l10_n896(x)
+ else
+ fun_l10_n176(x)
+ end
+end
+
+def fun_l9_n352(x)
+ if (x < 1)
+ fun_l10_n857(x)
+ else
+ fun_l10_n798(x)
+ end
+end
+
+def fun_l9_n353(x)
+ if (x < 1)
+ fun_l10_n676(x)
+ else
+ fun_l10_n870(x)
+ end
+end
+
+def fun_l9_n354(x)
+ if (x < 1)
+ fun_l10_n806(x)
+ else
+ fun_l10_n951(x)
+ end
+end
+
+def fun_l9_n355(x)
+ if (x < 1)
+ fun_l10_n841(x)
+ else
+ fun_l10_n918(x)
+ end
+end
+
+def fun_l9_n356(x)
+ if (x < 1)
+ fun_l10_n226(x)
+ else
+ fun_l10_n514(x)
+ end
+end
+
+def fun_l9_n357(x)
+ if (x < 1)
+ fun_l10_n289(x)
+ else
+ fun_l10_n911(x)
+ end
+end
+
+def fun_l9_n358(x)
+ if (x < 1)
+ fun_l10_n697(x)
+ else
+ fun_l10_n138(x)
+ end
+end
+
+def fun_l9_n359(x)
+ if (x < 1)
+ fun_l10_n432(x)
+ else
+ fun_l10_n88(x)
+ end
+end
+
+def fun_l9_n360(x)
+ if (x < 1)
+ fun_l10_n351(x)
+ else
+ fun_l10_n968(x)
+ end
+end
+
+def fun_l9_n361(x)
+ if (x < 1)
+ fun_l10_n782(x)
+ else
+ fun_l10_n506(x)
+ end
+end
+
+def fun_l9_n362(x)
+ if (x < 1)
+ fun_l10_n875(x)
+ else
+ fun_l10_n459(x)
+ end
+end
+
+def fun_l9_n363(x)
+ if (x < 1)
+ fun_l10_n2(x)
+ else
+ fun_l10_n468(x)
+ end
+end
+
+def fun_l9_n364(x)
+ if (x < 1)
+ fun_l10_n151(x)
+ else
+ fun_l10_n538(x)
+ end
+end
+
+def fun_l9_n365(x)
+ if (x < 1)
+ fun_l10_n203(x)
+ else
+ fun_l10_n890(x)
+ end
+end
+
+def fun_l9_n366(x)
+ if (x < 1)
+ fun_l10_n612(x)
+ else
+ fun_l10_n483(x)
+ end
+end
+
+def fun_l9_n367(x)
+ if (x < 1)
+ fun_l10_n465(x)
+ else
+ fun_l10_n724(x)
+ end
+end
+
+def fun_l9_n368(x)
+ if (x < 1)
+ fun_l10_n745(x)
+ else
+ fun_l10_n92(x)
+ end
+end
+
+def fun_l9_n369(x)
+ if (x < 1)
+ fun_l10_n312(x)
+ else
+ fun_l10_n754(x)
+ end
+end
+
+def fun_l9_n370(x)
+ if (x < 1)
+ fun_l10_n432(x)
+ else
+ fun_l10_n234(x)
+ end
+end
+
+def fun_l9_n371(x)
+ if (x < 1)
+ fun_l10_n629(x)
+ else
+ fun_l10_n751(x)
+ end
+end
+
+def fun_l9_n372(x)
+ if (x < 1)
+ fun_l10_n142(x)
+ else
+ fun_l10_n381(x)
+ end
+end
+
+def fun_l9_n373(x)
+ if (x < 1)
+ fun_l10_n490(x)
+ else
+ fun_l10_n405(x)
+ end
+end
+
+def fun_l9_n374(x)
+ if (x < 1)
+ fun_l10_n197(x)
+ else
+ fun_l10_n574(x)
+ end
+end
+
+def fun_l9_n375(x)
+ if (x < 1)
+ fun_l10_n808(x)
+ else
+ fun_l10_n753(x)
+ end
+end
+
+def fun_l9_n376(x)
+ if (x < 1)
+ fun_l10_n195(x)
+ else
+ fun_l10_n186(x)
+ end
+end
+
+def fun_l9_n377(x)
+ if (x < 1)
+ fun_l10_n172(x)
+ else
+ fun_l10_n233(x)
+ end
+end
+
+def fun_l9_n378(x)
+ if (x < 1)
+ fun_l10_n723(x)
+ else
+ fun_l10_n919(x)
+ end
+end
+
+def fun_l9_n379(x)
+ if (x < 1)
+ fun_l10_n937(x)
+ else
+ fun_l10_n149(x)
+ end
+end
+
+def fun_l9_n380(x)
+ if (x < 1)
+ fun_l10_n676(x)
+ else
+ fun_l10_n502(x)
+ end
+end
+
+def fun_l9_n381(x)
+ if (x < 1)
+ fun_l10_n756(x)
+ else
+ fun_l10_n346(x)
+ end
+end
+
+def fun_l9_n382(x)
+ if (x < 1)
+ fun_l10_n477(x)
+ else
+ fun_l10_n179(x)
+ end
+end
+
+def fun_l9_n383(x)
+ if (x < 1)
+ fun_l10_n729(x)
+ else
+ fun_l10_n862(x)
+ end
+end
+
+def fun_l9_n384(x)
+ if (x < 1)
+ fun_l10_n406(x)
+ else
+ fun_l10_n145(x)
+ end
+end
+
+def fun_l9_n385(x)
+ if (x < 1)
+ fun_l10_n239(x)
+ else
+ fun_l10_n169(x)
+ end
+end
+
+def fun_l9_n386(x)
+ if (x < 1)
+ fun_l10_n596(x)
+ else
+ fun_l10_n971(x)
+ end
+end
+
+def fun_l9_n387(x)
+ if (x < 1)
+ fun_l10_n466(x)
+ else
+ fun_l10_n488(x)
+ end
+end
+
+def fun_l9_n388(x)
+ if (x < 1)
+ fun_l10_n711(x)
+ else
+ fun_l10_n553(x)
+ end
+end
+
+def fun_l9_n389(x)
+ if (x < 1)
+ fun_l10_n776(x)
+ else
+ fun_l10_n227(x)
+ end
+end
+
+def fun_l9_n390(x)
+ if (x < 1)
+ fun_l10_n872(x)
+ else
+ fun_l10_n901(x)
+ end
+end
+
+def fun_l9_n391(x)
+ if (x < 1)
+ fun_l10_n579(x)
+ else
+ fun_l10_n906(x)
+ end
+end
+
+def fun_l9_n392(x)
+ if (x < 1)
+ fun_l10_n734(x)
+ else
+ fun_l10_n195(x)
+ end
+end
+
+def fun_l9_n393(x)
+ if (x < 1)
+ fun_l10_n691(x)
+ else
+ fun_l10_n68(x)
+ end
+end
+
+def fun_l9_n394(x)
+ if (x < 1)
+ fun_l10_n446(x)
+ else
+ fun_l10_n838(x)
+ end
+end
+
+def fun_l9_n395(x)
+ if (x < 1)
+ fun_l10_n708(x)
+ else
+ fun_l10_n319(x)
+ end
+end
+
+def fun_l9_n396(x)
+ if (x < 1)
+ fun_l10_n414(x)
+ else
+ fun_l10_n152(x)
+ end
+end
+
+def fun_l9_n397(x)
+ if (x < 1)
+ fun_l10_n637(x)
+ else
+ fun_l10_n662(x)
+ end
+end
+
+def fun_l9_n398(x)
+ if (x < 1)
+ fun_l10_n990(x)
+ else
+ fun_l10_n547(x)
+ end
+end
+
+def fun_l9_n399(x)
+ if (x < 1)
+ fun_l10_n43(x)
+ else
+ fun_l10_n845(x)
+ end
+end
+
+def fun_l9_n400(x)
+ if (x < 1)
+ fun_l10_n843(x)
+ else
+ fun_l10_n876(x)
+ end
+end
+
+def fun_l9_n401(x)
+ if (x < 1)
+ fun_l10_n925(x)
+ else
+ fun_l10_n221(x)
+ end
+end
+
+def fun_l9_n402(x)
+ if (x < 1)
+ fun_l10_n420(x)
+ else
+ fun_l10_n267(x)
+ end
+end
+
+def fun_l9_n403(x)
+ if (x < 1)
+ fun_l10_n78(x)
+ else
+ fun_l10_n316(x)
+ end
+end
+
+def fun_l9_n404(x)
+ if (x < 1)
+ fun_l10_n291(x)
+ else
+ fun_l10_n614(x)
+ end
+end
+
+def fun_l9_n405(x)
+ if (x < 1)
+ fun_l10_n956(x)
+ else
+ fun_l10_n550(x)
+ end
+end
+
+def fun_l9_n406(x)
+ if (x < 1)
+ fun_l10_n232(x)
+ else
+ fun_l10_n53(x)
+ end
+end
+
+def fun_l9_n407(x)
+ if (x < 1)
+ fun_l10_n171(x)
+ else
+ fun_l10_n51(x)
+ end
+end
+
+def fun_l9_n408(x)
+ if (x < 1)
+ fun_l10_n401(x)
+ else
+ fun_l10_n932(x)
+ end
+end
+
+def fun_l9_n409(x)
+ if (x < 1)
+ fun_l10_n863(x)
+ else
+ fun_l10_n951(x)
+ end
+end
+
+def fun_l9_n410(x)
+ if (x < 1)
+ fun_l10_n64(x)
+ else
+ fun_l10_n721(x)
+ end
+end
+
+def fun_l9_n411(x)
+ if (x < 1)
+ fun_l10_n539(x)
+ else
+ fun_l10_n951(x)
+ end
+end
+
+def fun_l9_n412(x)
+ if (x < 1)
+ fun_l10_n660(x)
+ else
+ fun_l10_n852(x)
+ end
+end
+
+def fun_l9_n413(x)
+ if (x < 1)
+ fun_l10_n777(x)
+ else
+ fun_l10_n366(x)
+ end
+end
+
+def fun_l9_n414(x)
+ if (x < 1)
+ fun_l10_n695(x)
+ else
+ fun_l10_n538(x)
+ end
+end
+
+def fun_l9_n415(x)
+ if (x < 1)
+ fun_l10_n208(x)
+ else
+ fun_l10_n892(x)
+ end
+end
+
+def fun_l9_n416(x)
+ if (x < 1)
+ fun_l10_n632(x)
+ else
+ fun_l10_n463(x)
+ end
+end
+
+def fun_l9_n417(x)
+ if (x < 1)
+ fun_l10_n238(x)
+ else
+ fun_l10_n55(x)
+ end
+end
+
+def fun_l9_n418(x)
+ if (x < 1)
+ fun_l10_n276(x)
+ else
+ fun_l10_n526(x)
+ end
+end
+
+def fun_l9_n419(x)
+ if (x < 1)
+ fun_l10_n625(x)
+ else
+ fun_l10_n806(x)
+ end
+end
+
+def fun_l9_n420(x)
+ if (x < 1)
+ fun_l10_n899(x)
+ else
+ fun_l10_n594(x)
+ end
+end
+
+def fun_l9_n421(x)
+ if (x < 1)
+ fun_l10_n725(x)
+ else
+ fun_l10_n461(x)
+ end
+end
+
+def fun_l9_n422(x)
+ if (x < 1)
+ fun_l10_n187(x)
+ else
+ fun_l10_n953(x)
+ end
+end
+
+def fun_l9_n423(x)
+ if (x < 1)
+ fun_l10_n698(x)
+ else
+ fun_l10_n751(x)
+ end
+end
+
+def fun_l9_n424(x)
+ if (x < 1)
+ fun_l10_n115(x)
+ else
+ fun_l10_n321(x)
+ end
+end
+
+def fun_l9_n425(x)
+ if (x < 1)
+ fun_l10_n775(x)
+ else
+ fun_l10_n100(x)
+ end
+end
+
+def fun_l9_n426(x)
+ if (x < 1)
+ fun_l10_n177(x)
+ else
+ fun_l10_n565(x)
+ end
+end
+
+def fun_l9_n427(x)
+ if (x < 1)
+ fun_l10_n568(x)
+ else
+ fun_l10_n234(x)
+ end
+end
+
+def fun_l9_n428(x)
+ if (x < 1)
+ fun_l10_n787(x)
+ else
+ fun_l10_n815(x)
+ end
+end
+
+def fun_l9_n429(x)
+ if (x < 1)
+ fun_l10_n580(x)
+ else
+ fun_l10_n990(x)
+ end
+end
+
+def fun_l9_n430(x)
+ if (x < 1)
+ fun_l10_n680(x)
+ else
+ fun_l10_n696(x)
+ end
+end
+
+def fun_l9_n431(x)
+ if (x < 1)
+ fun_l10_n650(x)
+ else
+ fun_l10_n776(x)
+ end
+end
+
+def fun_l9_n432(x)
+ if (x < 1)
+ fun_l10_n377(x)
+ else
+ fun_l10_n232(x)
+ end
+end
+
+def fun_l9_n433(x)
+ if (x < 1)
+ fun_l10_n621(x)
+ else
+ fun_l10_n948(x)
+ end
+end
+
+def fun_l9_n434(x)
+ if (x < 1)
+ fun_l10_n126(x)
+ else
+ fun_l10_n220(x)
+ end
+end
+
+def fun_l9_n435(x)
+ if (x < 1)
+ fun_l10_n395(x)
+ else
+ fun_l10_n732(x)
+ end
+end
+
+def fun_l9_n436(x)
+ if (x < 1)
+ fun_l10_n194(x)
+ else
+ fun_l10_n159(x)
+ end
+end
+
+def fun_l9_n437(x)
+ if (x < 1)
+ fun_l10_n123(x)
+ else
+ fun_l10_n40(x)
+ end
+end
+
+def fun_l9_n438(x)
+ if (x < 1)
+ fun_l10_n241(x)
+ else
+ fun_l10_n861(x)
+ end
+end
+
+def fun_l9_n439(x)
+ if (x < 1)
+ fun_l10_n333(x)
+ else
+ fun_l10_n950(x)
+ end
+end
+
+def fun_l9_n440(x)
+ if (x < 1)
+ fun_l10_n116(x)
+ else
+ fun_l10_n832(x)
+ end
+end
+
+def fun_l9_n441(x)
+ if (x < 1)
+ fun_l10_n598(x)
+ else
+ fun_l10_n68(x)
+ end
+end
+
+def fun_l9_n442(x)
+ if (x < 1)
+ fun_l10_n234(x)
+ else
+ fun_l10_n277(x)
+ end
+end
+
+def fun_l9_n443(x)
+ if (x < 1)
+ fun_l10_n943(x)
+ else
+ fun_l10_n895(x)
+ end
+end
+
+def fun_l9_n444(x)
+ if (x < 1)
+ fun_l10_n490(x)
+ else
+ fun_l10_n512(x)
+ end
+end
+
+def fun_l9_n445(x)
+ if (x < 1)
+ fun_l10_n54(x)
+ else
+ fun_l10_n74(x)
+ end
+end
+
+def fun_l9_n446(x)
+ if (x < 1)
+ fun_l10_n214(x)
+ else
+ fun_l10_n858(x)
+ end
+end
+
+def fun_l9_n447(x)
+ if (x < 1)
+ fun_l10_n274(x)
+ else
+ fun_l10_n255(x)
+ end
+end
+
+def fun_l9_n448(x)
+ if (x < 1)
+ fun_l10_n307(x)
+ else
+ fun_l10_n197(x)
+ end
+end
+
+def fun_l9_n449(x)
+ if (x < 1)
+ fun_l10_n152(x)
+ else
+ fun_l10_n543(x)
+ end
+end
+
+def fun_l9_n450(x)
+ if (x < 1)
+ fun_l10_n773(x)
+ else
+ fun_l10_n582(x)
+ end
+end
+
+def fun_l9_n451(x)
+ if (x < 1)
+ fun_l10_n757(x)
+ else
+ fun_l10_n298(x)
+ end
+end
+
+def fun_l9_n452(x)
+ if (x < 1)
+ fun_l10_n648(x)
+ else
+ fun_l10_n826(x)
+ end
+end
+
+def fun_l9_n453(x)
+ if (x < 1)
+ fun_l10_n209(x)
+ else
+ fun_l10_n767(x)
+ end
+end
+
+def fun_l9_n454(x)
+ if (x < 1)
+ fun_l10_n448(x)
+ else
+ fun_l10_n374(x)
+ end
+end
+
+def fun_l9_n455(x)
+ if (x < 1)
+ fun_l10_n975(x)
+ else
+ fun_l10_n45(x)
+ end
+end
+
+def fun_l9_n456(x)
+ if (x < 1)
+ fun_l10_n938(x)
+ else
+ fun_l10_n354(x)
+ end
+end
+
+def fun_l9_n457(x)
+ if (x < 1)
+ fun_l10_n723(x)
+ else
+ fun_l10_n511(x)
+ end
+end
+
+def fun_l9_n458(x)
+ if (x < 1)
+ fun_l10_n864(x)
+ else
+ fun_l10_n688(x)
+ end
+end
+
+def fun_l9_n459(x)
+ if (x < 1)
+ fun_l10_n283(x)
+ else
+ fun_l10_n776(x)
+ end
+end
+
+def fun_l9_n460(x)
+ if (x < 1)
+ fun_l10_n167(x)
+ else
+ fun_l10_n639(x)
+ end
+end
+
+def fun_l9_n461(x)
+ if (x < 1)
+ fun_l10_n493(x)
+ else
+ fun_l10_n538(x)
+ end
+end
+
+def fun_l9_n462(x)
+ if (x < 1)
+ fun_l10_n392(x)
+ else
+ fun_l10_n434(x)
+ end
+end
+
+def fun_l9_n463(x)
+ if (x < 1)
+ fun_l10_n958(x)
+ else
+ fun_l10_n305(x)
+ end
+end
+
+def fun_l9_n464(x)
+ if (x < 1)
+ fun_l10_n516(x)
+ else
+ fun_l10_n375(x)
+ end
+end
+
+def fun_l9_n465(x)
+ if (x < 1)
+ fun_l10_n371(x)
+ else
+ fun_l10_n596(x)
+ end
+end
+
+def fun_l9_n466(x)
+ if (x < 1)
+ fun_l10_n435(x)
+ else
+ fun_l10_n176(x)
+ end
+end
+
+def fun_l9_n467(x)
+ if (x < 1)
+ fun_l10_n391(x)
+ else
+ fun_l10_n83(x)
+ end
+end
+
+def fun_l9_n468(x)
+ if (x < 1)
+ fun_l10_n751(x)
+ else
+ fun_l10_n632(x)
+ end
+end
+
+def fun_l9_n469(x)
+ if (x < 1)
+ fun_l10_n14(x)
+ else
+ fun_l10_n530(x)
+ end
+end
+
+def fun_l9_n470(x)
+ if (x < 1)
+ fun_l10_n663(x)
+ else
+ fun_l10_n844(x)
+ end
+end
+
+def fun_l9_n471(x)
+ if (x < 1)
+ fun_l10_n82(x)
+ else
+ fun_l10_n493(x)
+ end
+end
+
+def fun_l9_n472(x)
+ if (x < 1)
+ fun_l10_n614(x)
+ else
+ fun_l10_n277(x)
+ end
+end
+
+def fun_l9_n473(x)
+ if (x < 1)
+ fun_l10_n492(x)
+ else
+ fun_l10_n492(x)
+ end
+end
+
+def fun_l9_n474(x)
+ if (x < 1)
+ fun_l10_n440(x)
+ else
+ fun_l10_n665(x)
+ end
+end
+
+def fun_l9_n475(x)
+ if (x < 1)
+ fun_l10_n284(x)
+ else
+ fun_l10_n513(x)
+ end
+end
+
+def fun_l9_n476(x)
+ if (x < 1)
+ fun_l10_n690(x)
+ else
+ fun_l10_n507(x)
+ end
+end
+
+def fun_l9_n477(x)
+ if (x < 1)
+ fun_l10_n281(x)
+ else
+ fun_l10_n519(x)
+ end
+end
+
+def fun_l9_n478(x)
+ if (x < 1)
+ fun_l10_n903(x)
+ else
+ fun_l10_n866(x)
+ end
+end
+
+def fun_l9_n479(x)
+ if (x < 1)
+ fun_l10_n880(x)
+ else
+ fun_l10_n310(x)
+ end
+end
+
+def fun_l9_n480(x)
+ if (x < 1)
+ fun_l10_n69(x)
+ else
+ fun_l10_n227(x)
+ end
+end
+
+def fun_l9_n481(x)
+ if (x < 1)
+ fun_l10_n316(x)
+ else
+ fun_l10_n692(x)
+ end
+end
+
+def fun_l9_n482(x)
+ if (x < 1)
+ fun_l10_n875(x)
+ else
+ fun_l10_n384(x)
+ end
+end
+
+def fun_l9_n483(x)
+ if (x < 1)
+ fun_l10_n496(x)
+ else
+ fun_l10_n81(x)
+ end
+end
+
+def fun_l9_n484(x)
+ if (x < 1)
+ fun_l10_n336(x)
+ else
+ fun_l10_n193(x)
+ end
+end
+
+def fun_l9_n485(x)
+ if (x < 1)
+ fun_l10_n541(x)
+ else
+ fun_l10_n465(x)
+ end
+end
+
+def fun_l9_n486(x)
+ if (x < 1)
+ fun_l10_n197(x)
+ else
+ fun_l10_n844(x)
+ end
+end
+
+def fun_l9_n487(x)
+ if (x < 1)
+ fun_l10_n652(x)
+ else
+ fun_l10_n736(x)
+ end
+end
+
+def fun_l9_n488(x)
+ if (x < 1)
+ fun_l10_n960(x)
+ else
+ fun_l10_n912(x)
+ end
+end
+
+def fun_l9_n489(x)
+ if (x < 1)
+ fun_l10_n238(x)
+ else
+ fun_l10_n64(x)
+ end
+end
+
+def fun_l9_n490(x)
+ if (x < 1)
+ fun_l10_n505(x)
+ else
+ fun_l10_n204(x)
+ end
+end
+
+def fun_l9_n491(x)
+ if (x < 1)
+ fun_l10_n960(x)
+ else
+ fun_l10_n198(x)
+ end
+end
+
+def fun_l9_n492(x)
+ if (x < 1)
+ fun_l10_n148(x)
+ else
+ fun_l10_n669(x)
+ end
+end
+
+def fun_l9_n493(x)
+ if (x < 1)
+ fun_l10_n860(x)
+ else
+ fun_l10_n676(x)
+ end
+end
+
+def fun_l9_n494(x)
+ if (x < 1)
+ fun_l10_n77(x)
+ else
+ fun_l10_n945(x)
+ end
+end
+
+def fun_l9_n495(x)
+ if (x < 1)
+ fun_l10_n151(x)
+ else
+ fun_l10_n588(x)
+ end
+end
+
+def fun_l9_n496(x)
+ if (x < 1)
+ fun_l10_n159(x)
+ else
+ fun_l10_n727(x)
+ end
+end
+
+def fun_l9_n497(x)
+ if (x < 1)
+ fun_l10_n803(x)
+ else
+ fun_l10_n292(x)
+ end
+end
+
+def fun_l9_n498(x)
+ if (x < 1)
+ fun_l10_n308(x)
+ else
+ fun_l10_n46(x)
+ end
+end
+
+def fun_l9_n499(x)
+ if (x < 1)
+ fun_l10_n511(x)
+ else
+ fun_l10_n766(x)
+ end
+end
+
+def fun_l9_n500(x)
+ if (x < 1)
+ fun_l10_n753(x)
+ else
+ fun_l10_n235(x)
+ end
+end
+
+def fun_l9_n501(x)
+ if (x < 1)
+ fun_l10_n776(x)
+ else
+ fun_l10_n779(x)
+ end
+end
+
+def fun_l9_n502(x)
+ if (x < 1)
+ fun_l10_n114(x)
+ else
+ fun_l10_n969(x)
+ end
+end
+
+def fun_l9_n503(x)
+ if (x < 1)
+ fun_l10_n511(x)
+ else
+ fun_l10_n678(x)
+ end
+end
+
+def fun_l9_n504(x)
+ if (x < 1)
+ fun_l10_n578(x)
+ else
+ fun_l10_n689(x)
+ end
+end
+
+def fun_l9_n505(x)
+ if (x < 1)
+ fun_l10_n434(x)
+ else
+ fun_l10_n0(x)
+ end
+end
+
+def fun_l9_n506(x)
+ if (x < 1)
+ fun_l10_n121(x)
+ else
+ fun_l10_n488(x)
+ end
+end
+
+def fun_l9_n507(x)
+ if (x < 1)
+ fun_l10_n865(x)
+ else
+ fun_l10_n540(x)
+ end
+end
+
+def fun_l9_n508(x)
+ if (x < 1)
+ fun_l10_n809(x)
+ else
+ fun_l10_n764(x)
+ end
+end
+
+def fun_l9_n509(x)
+ if (x < 1)
+ fun_l10_n463(x)
+ else
+ fun_l10_n141(x)
+ end
+end
+
+def fun_l9_n510(x)
+ if (x < 1)
+ fun_l10_n442(x)
+ else
+ fun_l10_n646(x)
+ end
+end
+
+def fun_l9_n511(x)
+ if (x < 1)
+ fun_l10_n971(x)
+ else
+ fun_l10_n57(x)
+ end
+end
+
+def fun_l9_n512(x)
+ if (x < 1)
+ fun_l10_n892(x)
+ else
+ fun_l10_n612(x)
+ end
+end
+
+def fun_l9_n513(x)
+ if (x < 1)
+ fun_l10_n864(x)
+ else
+ fun_l10_n438(x)
+ end
+end
+
+def fun_l9_n514(x)
+ if (x < 1)
+ fun_l10_n504(x)
+ else
+ fun_l10_n100(x)
+ end
+end
+
+def fun_l9_n515(x)
+ if (x < 1)
+ fun_l10_n881(x)
+ else
+ fun_l10_n621(x)
+ end
+end
+
+def fun_l9_n516(x)
+ if (x < 1)
+ fun_l10_n170(x)
+ else
+ fun_l10_n435(x)
+ end
+end
+
+def fun_l9_n517(x)
+ if (x < 1)
+ fun_l10_n712(x)
+ else
+ fun_l10_n537(x)
+ end
+end
+
+def fun_l9_n518(x)
+ if (x < 1)
+ fun_l10_n369(x)
+ else
+ fun_l10_n832(x)
+ end
+end
+
+def fun_l9_n519(x)
+ if (x < 1)
+ fun_l10_n654(x)
+ else
+ fun_l10_n364(x)
+ end
+end
+
+def fun_l9_n520(x)
+ if (x < 1)
+ fun_l10_n410(x)
+ else
+ fun_l10_n10(x)
+ end
+end
+
+def fun_l9_n521(x)
+ if (x < 1)
+ fun_l10_n814(x)
+ else
+ fun_l10_n569(x)
+ end
+end
+
+def fun_l9_n522(x)
+ if (x < 1)
+ fun_l10_n787(x)
+ else
+ fun_l10_n333(x)
+ end
+end
+
+def fun_l9_n523(x)
+ if (x < 1)
+ fun_l10_n336(x)
+ else
+ fun_l10_n720(x)
+ end
+end
+
+def fun_l9_n524(x)
+ if (x < 1)
+ fun_l10_n34(x)
+ else
+ fun_l10_n643(x)
+ end
+end
+
+def fun_l9_n525(x)
+ if (x < 1)
+ fun_l10_n147(x)
+ else
+ fun_l10_n62(x)
+ end
+end
+
+def fun_l9_n526(x)
+ if (x < 1)
+ fun_l10_n431(x)
+ else
+ fun_l10_n452(x)
+ end
+end
+
+def fun_l9_n527(x)
+ if (x < 1)
+ fun_l10_n374(x)
+ else
+ fun_l10_n831(x)
+ end
+end
+
+def fun_l9_n528(x)
+ if (x < 1)
+ fun_l10_n604(x)
+ else
+ fun_l10_n274(x)
+ end
+end
+
+def fun_l9_n529(x)
+ if (x < 1)
+ fun_l10_n470(x)
+ else
+ fun_l10_n764(x)
+ end
+end
+
+def fun_l9_n530(x)
+ if (x < 1)
+ fun_l10_n552(x)
+ else
+ fun_l10_n646(x)
+ end
+end
+
+def fun_l9_n531(x)
+ if (x < 1)
+ fun_l10_n427(x)
+ else
+ fun_l10_n464(x)
+ end
+end
+
+def fun_l9_n532(x)
+ if (x < 1)
+ fun_l10_n553(x)
+ else
+ fun_l10_n605(x)
+ end
+end
+
+def fun_l9_n533(x)
+ if (x < 1)
+ fun_l10_n59(x)
+ else
+ fun_l10_n794(x)
+ end
+end
+
+def fun_l9_n534(x)
+ if (x < 1)
+ fun_l10_n168(x)
+ else
+ fun_l10_n740(x)
+ end
+end
+
+def fun_l9_n535(x)
+ if (x < 1)
+ fun_l10_n227(x)
+ else
+ fun_l10_n651(x)
+ end
+end
+
+def fun_l9_n536(x)
+ if (x < 1)
+ fun_l10_n904(x)
+ else
+ fun_l10_n552(x)
+ end
+end
+
+def fun_l9_n537(x)
+ if (x < 1)
+ fun_l10_n389(x)
+ else
+ fun_l10_n397(x)
+ end
+end
+
+def fun_l9_n538(x)
+ if (x < 1)
+ fun_l10_n622(x)
+ else
+ fun_l10_n100(x)
+ end
+end
+
+def fun_l9_n539(x)
+ if (x < 1)
+ fun_l10_n117(x)
+ else
+ fun_l10_n715(x)
+ end
+end
+
+def fun_l9_n540(x)
+ if (x < 1)
+ fun_l10_n959(x)
+ else
+ fun_l10_n391(x)
+ end
+end
+
+def fun_l9_n541(x)
+ if (x < 1)
+ fun_l10_n733(x)
+ else
+ fun_l10_n393(x)
+ end
+end
+
+def fun_l9_n542(x)
+ if (x < 1)
+ fun_l10_n171(x)
+ else
+ fun_l10_n299(x)
+ end
+end
+
+def fun_l9_n543(x)
+ if (x < 1)
+ fun_l10_n655(x)
+ else
+ fun_l10_n285(x)
+ end
+end
+
+def fun_l9_n544(x)
+ if (x < 1)
+ fun_l10_n819(x)
+ else
+ fun_l10_n817(x)
+ end
+end
+
+def fun_l9_n545(x)
+ if (x < 1)
+ fun_l10_n938(x)
+ else
+ fun_l10_n54(x)
+ end
+end
+
+def fun_l9_n546(x)
+ if (x < 1)
+ fun_l10_n712(x)
+ else
+ fun_l10_n6(x)
+ end
+end
+
+def fun_l9_n547(x)
+ if (x < 1)
+ fun_l10_n203(x)
+ else
+ fun_l10_n626(x)
+ end
+end
+
+def fun_l9_n548(x)
+ if (x < 1)
+ fun_l10_n643(x)
+ else
+ fun_l10_n761(x)
+ end
+end
+
+def fun_l9_n549(x)
+ if (x < 1)
+ fun_l10_n450(x)
+ else
+ fun_l10_n673(x)
+ end
+end
+
+def fun_l9_n550(x)
+ if (x < 1)
+ fun_l10_n496(x)
+ else
+ fun_l10_n568(x)
+ end
+end
+
+def fun_l9_n551(x)
+ if (x < 1)
+ fun_l10_n30(x)
+ else
+ fun_l10_n518(x)
+ end
+end
+
+def fun_l9_n552(x)
+ if (x < 1)
+ fun_l10_n398(x)
+ else
+ fun_l10_n858(x)
+ end
+end
+
+def fun_l9_n553(x)
+ if (x < 1)
+ fun_l10_n253(x)
+ else
+ fun_l10_n831(x)
+ end
+end
+
+def fun_l9_n554(x)
+ if (x < 1)
+ fun_l10_n493(x)
+ else
+ fun_l10_n750(x)
+ end
+end
+
+def fun_l9_n555(x)
+ if (x < 1)
+ fun_l10_n111(x)
+ else
+ fun_l10_n279(x)
+ end
+end
+
+def fun_l9_n556(x)
+ if (x < 1)
+ fun_l10_n927(x)
+ else
+ fun_l10_n793(x)
+ end
+end
+
+def fun_l9_n557(x)
+ if (x < 1)
+ fun_l10_n530(x)
+ else
+ fun_l10_n182(x)
+ end
+end
+
+def fun_l9_n558(x)
+ if (x < 1)
+ fun_l10_n434(x)
+ else
+ fun_l10_n453(x)
+ end
+end
+
+def fun_l9_n559(x)
+ if (x < 1)
+ fun_l10_n480(x)
+ else
+ fun_l10_n590(x)
+ end
+end
+
+def fun_l9_n560(x)
+ if (x < 1)
+ fun_l10_n906(x)
+ else
+ fun_l10_n280(x)
+ end
+end
+
+def fun_l9_n561(x)
+ if (x < 1)
+ fun_l10_n107(x)
+ else
+ fun_l10_n716(x)
+ end
+end
+
+def fun_l9_n562(x)
+ if (x < 1)
+ fun_l10_n15(x)
+ else
+ fun_l10_n671(x)
+ end
+end
+
+def fun_l9_n563(x)
+ if (x < 1)
+ fun_l10_n544(x)
+ else
+ fun_l10_n571(x)
+ end
+end
+
+def fun_l9_n564(x)
+ if (x < 1)
+ fun_l10_n482(x)
+ else
+ fun_l10_n885(x)
+ end
+end
+
+def fun_l9_n565(x)
+ if (x < 1)
+ fun_l10_n465(x)
+ else
+ fun_l10_n916(x)
+ end
+end
+
+def fun_l9_n566(x)
+ if (x < 1)
+ fun_l10_n413(x)
+ else
+ fun_l10_n684(x)
+ end
+end
+
+def fun_l9_n567(x)
+ if (x < 1)
+ fun_l10_n413(x)
+ else
+ fun_l10_n577(x)
+ end
+end
+
+def fun_l9_n568(x)
+ if (x < 1)
+ fun_l10_n604(x)
+ else
+ fun_l10_n899(x)
+ end
+end
+
+def fun_l9_n569(x)
+ if (x < 1)
+ fun_l10_n138(x)
+ else
+ fun_l10_n164(x)
+ end
+end
+
+def fun_l9_n570(x)
+ if (x < 1)
+ fun_l10_n993(x)
+ else
+ fun_l10_n94(x)
+ end
+end
+
+def fun_l9_n571(x)
+ if (x < 1)
+ fun_l10_n602(x)
+ else
+ fun_l10_n989(x)
+ end
+end
+
+def fun_l9_n572(x)
+ if (x < 1)
+ fun_l10_n700(x)
+ else
+ fun_l10_n308(x)
+ end
+end
+
+def fun_l9_n573(x)
+ if (x < 1)
+ fun_l10_n773(x)
+ else
+ fun_l10_n945(x)
+ end
+end
+
+def fun_l9_n574(x)
+ if (x < 1)
+ fun_l10_n148(x)
+ else
+ fun_l10_n608(x)
+ end
+end
+
+def fun_l9_n575(x)
+ if (x < 1)
+ fun_l10_n439(x)
+ else
+ fun_l10_n908(x)
+ end
+end
+
+def fun_l9_n576(x)
+ if (x < 1)
+ fun_l10_n174(x)
+ else
+ fun_l10_n872(x)
+ end
+end
+
+def fun_l9_n577(x)
+ if (x < 1)
+ fun_l10_n291(x)
+ else
+ fun_l10_n265(x)
+ end
+end
+
+def fun_l9_n578(x)
+ if (x < 1)
+ fun_l10_n425(x)
+ else
+ fun_l10_n928(x)
+ end
+end
+
+def fun_l9_n579(x)
+ if (x < 1)
+ fun_l10_n674(x)
+ else
+ fun_l10_n666(x)
+ end
+end
+
+def fun_l9_n580(x)
+ if (x < 1)
+ fun_l10_n784(x)
+ else
+ fun_l10_n147(x)
+ end
+end
+
+def fun_l9_n581(x)
+ if (x < 1)
+ fun_l10_n550(x)
+ else
+ fun_l10_n119(x)
+ end
+end
+
+def fun_l9_n582(x)
+ if (x < 1)
+ fun_l10_n953(x)
+ else
+ fun_l10_n269(x)
+ end
+end
+
+def fun_l9_n583(x)
+ if (x < 1)
+ fun_l10_n575(x)
+ else
+ fun_l10_n79(x)
+ end
+end
+
+def fun_l9_n584(x)
+ if (x < 1)
+ fun_l10_n498(x)
+ else
+ fun_l10_n1(x)
+ end
+end
+
+def fun_l9_n585(x)
+ if (x < 1)
+ fun_l10_n728(x)
+ else
+ fun_l10_n92(x)
+ end
+end
+
+def fun_l9_n586(x)
+ if (x < 1)
+ fun_l10_n344(x)
+ else
+ fun_l10_n753(x)
+ end
+end
+
+def fun_l9_n587(x)
+ if (x < 1)
+ fun_l10_n911(x)
+ else
+ fun_l10_n327(x)
+ end
+end
+
+def fun_l9_n588(x)
+ if (x < 1)
+ fun_l10_n422(x)
+ else
+ fun_l10_n224(x)
+ end
+end
+
+def fun_l9_n589(x)
+ if (x < 1)
+ fun_l10_n311(x)
+ else
+ fun_l10_n457(x)
+ end
+end
+
+def fun_l9_n590(x)
+ if (x < 1)
+ fun_l10_n705(x)
+ else
+ fun_l10_n136(x)
+ end
+end
+
+def fun_l9_n591(x)
+ if (x < 1)
+ fun_l10_n338(x)
+ else
+ fun_l10_n14(x)
+ end
+end
+
+def fun_l9_n592(x)
+ if (x < 1)
+ fun_l10_n144(x)
+ else
+ fun_l10_n671(x)
+ end
+end
+
+def fun_l9_n593(x)
+ if (x < 1)
+ fun_l10_n402(x)
+ else
+ fun_l10_n218(x)
+ end
+end
+
+def fun_l9_n594(x)
+ if (x < 1)
+ fun_l10_n854(x)
+ else
+ fun_l10_n198(x)
+ end
+end
+
+def fun_l9_n595(x)
+ if (x < 1)
+ fun_l10_n932(x)
+ else
+ fun_l10_n181(x)
+ end
+end
+
+def fun_l9_n596(x)
+ if (x < 1)
+ fun_l10_n373(x)
+ else
+ fun_l10_n937(x)
+ end
+end
+
+def fun_l9_n597(x)
+ if (x < 1)
+ fun_l10_n181(x)
+ else
+ fun_l10_n925(x)
+ end
+end
+
+def fun_l9_n598(x)
+ if (x < 1)
+ fun_l10_n263(x)
+ else
+ fun_l10_n98(x)
+ end
+end
+
+def fun_l9_n599(x)
+ if (x < 1)
+ fun_l10_n736(x)
+ else
+ fun_l10_n951(x)
+ end
+end
+
+def fun_l9_n600(x)
+ if (x < 1)
+ fun_l10_n576(x)
+ else
+ fun_l10_n998(x)
+ end
+end
+
+def fun_l9_n601(x)
+ if (x < 1)
+ fun_l10_n577(x)
+ else
+ fun_l10_n559(x)
+ end
+end
+
+def fun_l9_n602(x)
+ if (x < 1)
+ fun_l10_n143(x)
+ else
+ fun_l10_n993(x)
+ end
+end
+
+def fun_l9_n603(x)
+ if (x < 1)
+ fun_l10_n35(x)
+ else
+ fun_l10_n132(x)
+ end
+end
+
+def fun_l9_n604(x)
+ if (x < 1)
+ fun_l10_n715(x)
+ else
+ fun_l10_n933(x)
+ end
+end
+
+def fun_l9_n605(x)
+ if (x < 1)
+ fun_l10_n570(x)
+ else
+ fun_l10_n455(x)
+ end
+end
+
+def fun_l9_n606(x)
+ if (x < 1)
+ fun_l10_n225(x)
+ else
+ fun_l10_n216(x)
+ end
+end
+
+def fun_l9_n607(x)
+ if (x < 1)
+ fun_l10_n431(x)
+ else
+ fun_l10_n285(x)
+ end
+end
+
+def fun_l9_n608(x)
+ if (x < 1)
+ fun_l10_n647(x)
+ else
+ fun_l10_n221(x)
+ end
+end
+
+def fun_l9_n609(x)
+ if (x < 1)
+ fun_l10_n348(x)
+ else
+ fun_l10_n849(x)
+ end
+end
+
+def fun_l9_n610(x)
+ if (x < 1)
+ fun_l10_n301(x)
+ else
+ fun_l10_n500(x)
+ end
+end
+
+def fun_l9_n611(x)
+ if (x < 1)
+ fun_l10_n152(x)
+ else
+ fun_l10_n1(x)
+ end
+end
+
+def fun_l9_n612(x)
+ if (x < 1)
+ fun_l10_n339(x)
+ else
+ fun_l10_n577(x)
+ end
+end
+
+def fun_l9_n613(x)
+ if (x < 1)
+ fun_l10_n427(x)
+ else
+ fun_l10_n779(x)
+ end
+end
+
+def fun_l9_n614(x)
+ if (x < 1)
+ fun_l10_n60(x)
+ else
+ fun_l10_n199(x)
+ end
+end
+
+def fun_l9_n615(x)
+ if (x < 1)
+ fun_l10_n616(x)
+ else
+ fun_l10_n33(x)
+ end
+end
+
+def fun_l9_n616(x)
+ if (x < 1)
+ fun_l10_n940(x)
+ else
+ fun_l10_n981(x)
+ end
+end
+
+def fun_l9_n617(x)
+ if (x < 1)
+ fun_l10_n594(x)
+ else
+ fun_l10_n321(x)
+ end
+end
+
+def fun_l9_n618(x)
+ if (x < 1)
+ fun_l10_n233(x)
+ else
+ fun_l10_n500(x)
+ end
+end
+
+def fun_l9_n619(x)
+ if (x < 1)
+ fun_l10_n169(x)
+ else
+ fun_l10_n883(x)
+ end
+end
+
+def fun_l9_n620(x)
+ if (x < 1)
+ fun_l10_n611(x)
+ else
+ fun_l10_n345(x)
+ end
+end
+
+def fun_l9_n621(x)
+ if (x < 1)
+ fun_l10_n155(x)
+ else
+ fun_l10_n547(x)
+ end
+end
+
+def fun_l9_n622(x)
+ if (x < 1)
+ fun_l10_n244(x)
+ else
+ fun_l10_n760(x)
+ end
+end
+
+def fun_l9_n623(x)
+ if (x < 1)
+ fun_l10_n893(x)
+ else
+ fun_l10_n13(x)
+ end
+end
+
+def fun_l9_n624(x)
+ if (x < 1)
+ fun_l10_n465(x)
+ else
+ fun_l10_n276(x)
+ end
+end
+
+def fun_l9_n625(x)
+ if (x < 1)
+ fun_l10_n196(x)
+ else
+ fun_l10_n920(x)
+ end
+end
+
+def fun_l9_n626(x)
+ if (x < 1)
+ fun_l10_n235(x)
+ else
+ fun_l10_n962(x)
+ end
+end
+
+def fun_l9_n627(x)
+ if (x < 1)
+ fun_l10_n361(x)
+ else
+ fun_l10_n162(x)
+ end
+end
+
+def fun_l9_n628(x)
+ if (x < 1)
+ fun_l10_n110(x)
+ else
+ fun_l10_n574(x)
+ end
+end
+
+def fun_l9_n629(x)
+ if (x < 1)
+ fun_l10_n861(x)
+ else
+ fun_l10_n839(x)
+ end
+end
+
+def fun_l9_n630(x)
+ if (x < 1)
+ fun_l10_n386(x)
+ else
+ fun_l10_n741(x)
+ end
+end
+
+def fun_l9_n631(x)
+ if (x < 1)
+ fun_l10_n426(x)
+ else
+ fun_l10_n430(x)
+ end
+end
+
+def fun_l9_n632(x)
+ if (x < 1)
+ fun_l10_n231(x)
+ else
+ fun_l10_n353(x)
+ end
+end
+
+def fun_l9_n633(x)
+ if (x < 1)
+ fun_l10_n945(x)
+ else
+ fun_l10_n199(x)
+ end
+end
+
+def fun_l9_n634(x)
+ if (x < 1)
+ fun_l10_n607(x)
+ else
+ fun_l10_n388(x)
+ end
+end
+
+def fun_l9_n635(x)
+ if (x < 1)
+ fun_l10_n214(x)
+ else
+ fun_l10_n135(x)
+ end
+end
+
+def fun_l9_n636(x)
+ if (x < 1)
+ fun_l10_n642(x)
+ else
+ fun_l10_n522(x)
+ end
+end
+
+def fun_l9_n637(x)
+ if (x < 1)
+ fun_l10_n605(x)
+ else
+ fun_l10_n336(x)
+ end
+end
+
+def fun_l9_n638(x)
+ if (x < 1)
+ fun_l10_n719(x)
+ else
+ fun_l10_n213(x)
+ end
+end
+
+def fun_l9_n639(x)
+ if (x < 1)
+ fun_l10_n202(x)
+ else
+ fun_l10_n767(x)
+ end
+end
+
+def fun_l9_n640(x)
+ if (x < 1)
+ fun_l10_n242(x)
+ else
+ fun_l10_n596(x)
+ end
+end
+
+def fun_l9_n641(x)
+ if (x < 1)
+ fun_l10_n851(x)
+ else
+ fun_l10_n216(x)
+ end
+end
+
+def fun_l9_n642(x)
+ if (x < 1)
+ fun_l10_n645(x)
+ else
+ fun_l10_n890(x)
+ end
+end
+
+def fun_l9_n643(x)
+ if (x < 1)
+ fun_l10_n241(x)
+ else
+ fun_l10_n350(x)
+ end
+end
+
+def fun_l9_n644(x)
+ if (x < 1)
+ fun_l10_n597(x)
+ else
+ fun_l10_n350(x)
+ end
+end
+
+def fun_l9_n645(x)
+ if (x < 1)
+ fun_l10_n170(x)
+ else
+ fun_l10_n962(x)
+ end
+end
+
+def fun_l9_n646(x)
+ if (x < 1)
+ fun_l10_n229(x)
+ else
+ fun_l10_n543(x)
+ end
+end
+
+def fun_l9_n647(x)
+ if (x < 1)
+ fun_l10_n473(x)
+ else
+ fun_l10_n942(x)
+ end
+end
+
+def fun_l9_n648(x)
+ if (x < 1)
+ fun_l10_n630(x)
+ else
+ fun_l10_n630(x)
+ end
+end
+
+def fun_l9_n649(x)
+ if (x < 1)
+ fun_l10_n183(x)
+ else
+ fun_l10_n313(x)
+ end
+end
+
+def fun_l9_n650(x)
+ if (x < 1)
+ fun_l10_n951(x)
+ else
+ fun_l10_n394(x)
+ end
+end
+
+def fun_l9_n651(x)
+ if (x < 1)
+ fun_l10_n107(x)
+ else
+ fun_l10_n849(x)
+ end
+end
+
+def fun_l9_n652(x)
+ if (x < 1)
+ fun_l10_n678(x)
+ else
+ fun_l10_n768(x)
+ end
+end
+
+def fun_l9_n653(x)
+ if (x < 1)
+ fun_l10_n534(x)
+ else
+ fun_l10_n410(x)
+ end
+end
+
+def fun_l9_n654(x)
+ if (x < 1)
+ fun_l10_n694(x)
+ else
+ fun_l10_n134(x)
+ end
+end
+
+def fun_l9_n655(x)
+ if (x < 1)
+ fun_l10_n751(x)
+ else
+ fun_l10_n923(x)
+ end
+end
+
+def fun_l9_n656(x)
+ if (x < 1)
+ fun_l10_n957(x)
+ else
+ fun_l10_n489(x)
+ end
+end
+
+def fun_l9_n657(x)
+ if (x < 1)
+ fun_l10_n612(x)
+ else
+ fun_l10_n577(x)
+ end
+end
+
+def fun_l9_n658(x)
+ if (x < 1)
+ fun_l10_n814(x)
+ else
+ fun_l10_n801(x)
+ end
+end
+
+def fun_l9_n659(x)
+ if (x < 1)
+ fun_l10_n297(x)
+ else
+ fun_l10_n344(x)
+ end
+end
+
+def fun_l9_n660(x)
+ if (x < 1)
+ fun_l10_n674(x)
+ else
+ fun_l10_n780(x)
+ end
+end
+
+def fun_l9_n661(x)
+ if (x < 1)
+ fun_l10_n302(x)
+ else
+ fun_l10_n184(x)
+ end
+end
+
+def fun_l9_n662(x)
+ if (x < 1)
+ fun_l10_n308(x)
+ else
+ fun_l10_n302(x)
+ end
+end
+
+def fun_l9_n663(x)
+ if (x < 1)
+ fun_l10_n825(x)
+ else
+ fun_l10_n866(x)
+ end
+end
+
+def fun_l9_n664(x)
+ if (x < 1)
+ fun_l10_n771(x)
+ else
+ fun_l10_n141(x)
+ end
+end
+
+def fun_l9_n665(x)
+ if (x < 1)
+ fun_l10_n369(x)
+ else
+ fun_l10_n63(x)
+ end
+end
+
+def fun_l9_n666(x)
+ if (x < 1)
+ fun_l10_n198(x)
+ else
+ fun_l10_n793(x)
+ end
+end
+
+def fun_l9_n667(x)
+ if (x < 1)
+ fun_l10_n800(x)
+ else
+ fun_l10_n748(x)
+ end
+end
+
+def fun_l9_n668(x)
+ if (x < 1)
+ fun_l10_n809(x)
+ else
+ fun_l10_n673(x)
+ end
+end
+
+def fun_l9_n669(x)
+ if (x < 1)
+ fun_l10_n438(x)
+ else
+ fun_l10_n301(x)
+ end
+end
+
+def fun_l9_n670(x)
+ if (x < 1)
+ fun_l10_n802(x)
+ else
+ fun_l10_n882(x)
+ end
+end
+
+def fun_l9_n671(x)
+ if (x < 1)
+ fun_l10_n690(x)
+ else
+ fun_l10_n524(x)
+ end
+end
+
+def fun_l9_n672(x)
+ if (x < 1)
+ fun_l10_n996(x)
+ else
+ fun_l10_n68(x)
+ end
+end
+
+def fun_l9_n673(x)
+ if (x < 1)
+ fun_l10_n773(x)
+ else
+ fun_l10_n26(x)
+ end
+end
+
+def fun_l9_n674(x)
+ if (x < 1)
+ fun_l10_n252(x)
+ else
+ fun_l10_n680(x)
+ end
+end
+
+def fun_l9_n675(x)
+ if (x < 1)
+ fun_l10_n466(x)
+ else
+ fun_l10_n885(x)
+ end
+end
+
+def fun_l9_n676(x)
+ if (x < 1)
+ fun_l10_n746(x)
+ else
+ fun_l10_n968(x)
+ end
+end
+
+def fun_l9_n677(x)
+ if (x < 1)
+ fun_l10_n827(x)
+ else
+ fun_l10_n69(x)
+ end
+end
+
+def fun_l9_n678(x)
+ if (x < 1)
+ fun_l10_n158(x)
+ else
+ fun_l10_n780(x)
+ end
+end
+
+def fun_l9_n679(x)
+ if (x < 1)
+ fun_l10_n267(x)
+ else
+ fun_l10_n907(x)
+ end
+end
+
+def fun_l9_n680(x)
+ if (x < 1)
+ fun_l10_n378(x)
+ else
+ fun_l10_n668(x)
+ end
+end
+
+def fun_l9_n681(x)
+ if (x < 1)
+ fun_l10_n481(x)
+ else
+ fun_l10_n421(x)
+ end
+end
+
+def fun_l9_n682(x)
+ if (x < 1)
+ fun_l10_n501(x)
+ else
+ fun_l10_n277(x)
+ end
+end
+
+def fun_l9_n683(x)
+ if (x < 1)
+ fun_l10_n533(x)
+ else
+ fun_l10_n604(x)
+ end
+end
+
+def fun_l9_n684(x)
+ if (x < 1)
+ fun_l10_n483(x)
+ else
+ fun_l10_n761(x)
+ end
+end
+
+def fun_l9_n685(x)
+ if (x < 1)
+ fun_l10_n41(x)
+ else
+ fun_l10_n374(x)
+ end
+end
+
+def fun_l9_n686(x)
+ if (x < 1)
+ fun_l10_n549(x)
+ else
+ fun_l10_n319(x)
+ end
+end
+
+def fun_l9_n687(x)
+ if (x < 1)
+ fun_l10_n246(x)
+ else
+ fun_l10_n854(x)
+ end
+end
+
+def fun_l9_n688(x)
+ if (x < 1)
+ fun_l10_n634(x)
+ else
+ fun_l10_n43(x)
+ end
+end
+
+def fun_l9_n689(x)
+ if (x < 1)
+ fun_l10_n994(x)
+ else
+ fun_l10_n549(x)
+ end
+end
+
+def fun_l9_n690(x)
+ if (x < 1)
+ fun_l10_n439(x)
+ else
+ fun_l10_n560(x)
+ end
+end
+
+def fun_l9_n691(x)
+ if (x < 1)
+ fun_l10_n227(x)
+ else
+ fun_l10_n877(x)
+ end
+end
+
+def fun_l9_n692(x)
+ if (x < 1)
+ fun_l10_n644(x)
+ else
+ fun_l10_n350(x)
+ end
+end
+
+def fun_l9_n693(x)
+ if (x < 1)
+ fun_l10_n543(x)
+ else
+ fun_l10_n638(x)
+ end
+end
+
+def fun_l9_n694(x)
+ if (x < 1)
+ fun_l10_n537(x)
+ else
+ fun_l10_n187(x)
+ end
+end
+
+def fun_l9_n695(x)
+ if (x < 1)
+ fun_l10_n1(x)
+ else
+ fun_l10_n540(x)
+ end
+end
+
+def fun_l9_n696(x)
+ if (x < 1)
+ fun_l10_n306(x)
+ else
+ fun_l10_n290(x)
+ end
+end
+
+def fun_l9_n697(x)
+ if (x < 1)
+ fun_l10_n140(x)
+ else
+ fun_l10_n72(x)
+ end
+end
+
+def fun_l9_n698(x)
+ if (x < 1)
+ fun_l10_n43(x)
+ else
+ fun_l10_n257(x)
+ end
+end
+
+def fun_l9_n699(x)
+ if (x < 1)
+ fun_l10_n91(x)
+ else
+ fun_l10_n816(x)
+ end
+end
+
+def fun_l9_n700(x)
+ if (x < 1)
+ fun_l10_n420(x)
+ else
+ fun_l10_n763(x)
+ end
+end
+
+def fun_l9_n701(x)
+ if (x < 1)
+ fun_l10_n429(x)
+ else
+ fun_l10_n28(x)
+ end
+end
+
+def fun_l9_n702(x)
+ if (x < 1)
+ fun_l10_n615(x)
+ else
+ fun_l10_n995(x)
+ end
+end
+
+def fun_l9_n703(x)
+ if (x < 1)
+ fun_l10_n776(x)
+ else
+ fun_l10_n85(x)
+ end
+end
+
+def fun_l9_n704(x)
+ if (x < 1)
+ fun_l10_n795(x)
+ else
+ fun_l10_n542(x)
+ end
+end
+
+def fun_l9_n705(x)
+ if (x < 1)
+ fun_l10_n114(x)
+ else
+ fun_l10_n166(x)
+ end
+end
+
+def fun_l9_n706(x)
+ if (x < 1)
+ fun_l10_n99(x)
+ else
+ fun_l10_n400(x)
+ end
+end
+
+def fun_l9_n707(x)
+ if (x < 1)
+ fun_l10_n292(x)
+ else
+ fun_l10_n801(x)
+ end
+end
+
+def fun_l9_n708(x)
+ if (x < 1)
+ fun_l10_n303(x)
+ else
+ fun_l10_n380(x)
+ end
+end
+
+def fun_l9_n709(x)
+ if (x < 1)
+ fun_l10_n369(x)
+ else
+ fun_l10_n938(x)
+ end
+end
+
+def fun_l9_n710(x)
+ if (x < 1)
+ fun_l10_n652(x)
+ else
+ fun_l10_n453(x)
+ end
+end
+
+def fun_l9_n711(x)
+ if (x < 1)
+ fun_l10_n770(x)
+ else
+ fun_l10_n32(x)
+ end
+end
+
+def fun_l9_n712(x)
+ if (x < 1)
+ fun_l10_n261(x)
+ else
+ fun_l10_n485(x)
+ end
+end
+
+def fun_l9_n713(x)
+ if (x < 1)
+ fun_l10_n935(x)
+ else
+ fun_l10_n39(x)
+ end
+end
+
+def fun_l9_n714(x)
+ if (x < 1)
+ fun_l10_n332(x)
+ else
+ fun_l10_n309(x)
+ end
+end
+
+def fun_l9_n715(x)
+ if (x < 1)
+ fun_l10_n824(x)
+ else
+ fun_l10_n614(x)
+ end
+end
+
+def fun_l9_n716(x)
+ if (x < 1)
+ fun_l10_n468(x)
+ else
+ fun_l10_n341(x)
+ end
+end
+
+def fun_l9_n717(x)
+ if (x < 1)
+ fun_l10_n425(x)
+ else
+ fun_l10_n67(x)
+ end
+end
+
+def fun_l9_n718(x)
+ if (x < 1)
+ fun_l10_n199(x)
+ else
+ fun_l10_n423(x)
+ end
+end
+
+def fun_l9_n719(x)
+ if (x < 1)
+ fun_l10_n294(x)
+ else
+ fun_l10_n484(x)
+ end
+end
+
+def fun_l9_n720(x)
+ if (x < 1)
+ fun_l10_n276(x)
+ else
+ fun_l10_n799(x)
+ end
+end
+
+def fun_l9_n721(x)
+ if (x < 1)
+ fun_l10_n98(x)
+ else
+ fun_l10_n278(x)
+ end
+end
+
+def fun_l9_n722(x)
+ if (x < 1)
+ fun_l10_n689(x)
+ else
+ fun_l10_n767(x)
+ end
+end
+
+def fun_l9_n723(x)
+ if (x < 1)
+ fun_l10_n786(x)
+ else
+ fun_l10_n409(x)
+ end
+end
+
+def fun_l9_n724(x)
+ if (x < 1)
+ fun_l10_n874(x)
+ else
+ fun_l10_n413(x)
+ end
+end
+
+def fun_l9_n725(x)
+ if (x < 1)
+ fun_l10_n806(x)
+ else
+ fun_l10_n529(x)
+ end
+end
+
+def fun_l9_n726(x)
+ if (x < 1)
+ fun_l10_n847(x)
+ else
+ fun_l10_n427(x)
+ end
+end
+
+def fun_l9_n727(x)
+ if (x < 1)
+ fun_l10_n285(x)
+ else
+ fun_l10_n878(x)
+ end
+end
+
+def fun_l9_n728(x)
+ if (x < 1)
+ fun_l10_n829(x)
+ else
+ fun_l10_n341(x)
+ end
+end
+
+def fun_l9_n729(x)
+ if (x < 1)
+ fun_l10_n797(x)
+ else
+ fun_l10_n865(x)
+ end
+end
+
+def fun_l9_n730(x)
+ if (x < 1)
+ fun_l10_n689(x)
+ else
+ fun_l10_n241(x)
+ end
+end
+
+def fun_l9_n731(x)
+ if (x < 1)
+ fun_l10_n764(x)
+ else
+ fun_l10_n451(x)
+ end
+end
+
+def fun_l9_n732(x)
+ if (x < 1)
+ fun_l10_n147(x)
+ else
+ fun_l10_n998(x)
+ end
+end
+
+def fun_l9_n733(x)
+ if (x < 1)
+ fun_l10_n192(x)
+ else
+ fun_l10_n293(x)
+ end
+end
+
+def fun_l9_n734(x)
+ if (x < 1)
+ fun_l10_n207(x)
+ else
+ fun_l10_n696(x)
+ end
+end
+
+def fun_l9_n735(x)
+ if (x < 1)
+ fun_l10_n457(x)
+ else
+ fun_l10_n93(x)
+ end
+end
+
+def fun_l9_n736(x)
+ if (x < 1)
+ fun_l10_n130(x)
+ else
+ fun_l10_n512(x)
+ end
+end
+
+def fun_l9_n737(x)
+ if (x < 1)
+ fun_l10_n86(x)
+ else
+ fun_l10_n409(x)
+ end
+end
+
+def fun_l9_n738(x)
+ if (x < 1)
+ fun_l10_n783(x)
+ else
+ fun_l10_n981(x)
+ end
+end
+
+def fun_l9_n739(x)
+ if (x < 1)
+ fun_l10_n927(x)
+ else
+ fun_l10_n831(x)
+ end
+end
+
+def fun_l9_n740(x)
+ if (x < 1)
+ fun_l10_n719(x)
+ else
+ fun_l10_n422(x)
+ end
+end
+
+def fun_l9_n741(x)
+ if (x < 1)
+ fun_l10_n287(x)
+ else
+ fun_l10_n139(x)
+ end
+end
+
+def fun_l9_n742(x)
+ if (x < 1)
+ fun_l10_n533(x)
+ else
+ fun_l10_n687(x)
+ end
+end
+
+def fun_l9_n743(x)
+ if (x < 1)
+ fun_l10_n550(x)
+ else
+ fun_l10_n972(x)
+ end
+end
+
+def fun_l9_n744(x)
+ if (x < 1)
+ fun_l10_n5(x)
+ else
+ fun_l10_n306(x)
+ end
+end
+
+def fun_l9_n745(x)
+ if (x < 1)
+ fun_l10_n755(x)
+ else
+ fun_l10_n849(x)
+ end
+end
+
+def fun_l9_n746(x)
+ if (x < 1)
+ fun_l10_n912(x)
+ else
+ fun_l10_n307(x)
+ end
+end
+
+def fun_l9_n747(x)
+ if (x < 1)
+ fun_l10_n181(x)
+ else
+ fun_l10_n476(x)
+ end
+end
+
+def fun_l9_n748(x)
+ if (x < 1)
+ fun_l10_n353(x)
+ else
+ fun_l10_n412(x)
+ end
+end
+
+def fun_l9_n749(x)
+ if (x < 1)
+ fun_l10_n187(x)
+ else
+ fun_l10_n591(x)
+ end
+end
+
+def fun_l9_n750(x)
+ if (x < 1)
+ fun_l10_n464(x)
+ else
+ fun_l10_n581(x)
+ end
+end
+
+def fun_l9_n751(x)
+ if (x < 1)
+ fun_l10_n1(x)
+ else
+ fun_l10_n557(x)
+ end
+end
+
+def fun_l9_n752(x)
+ if (x < 1)
+ fun_l10_n788(x)
+ else
+ fun_l10_n438(x)
+ end
+end
+
+def fun_l9_n753(x)
+ if (x < 1)
+ fun_l10_n535(x)
+ else
+ fun_l10_n13(x)
+ end
+end
+
+def fun_l9_n754(x)
+ if (x < 1)
+ fun_l10_n811(x)
+ else
+ fun_l10_n543(x)
+ end
+end
+
+def fun_l9_n755(x)
+ if (x < 1)
+ fun_l10_n328(x)
+ else
+ fun_l10_n44(x)
+ end
+end
+
+def fun_l9_n756(x)
+ if (x < 1)
+ fun_l10_n839(x)
+ else
+ fun_l10_n16(x)
+ end
+end
+
+def fun_l9_n757(x)
+ if (x < 1)
+ fun_l10_n778(x)
+ else
+ fun_l10_n865(x)
+ end
+end
+
+def fun_l9_n758(x)
+ if (x < 1)
+ fun_l10_n552(x)
+ else
+ fun_l10_n783(x)
+ end
+end
+
+def fun_l9_n759(x)
+ if (x < 1)
+ fun_l10_n293(x)
+ else
+ fun_l10_n140(x)
+ end
+end
+
+def fun_l9_n760(x)
+ if (x < 1)
+ fun_l10_n814(x)
+ else
+ fun_l10_n497(x)
+ end
+end
+
+def fun_l9_n761(x)
+ if (x < 1)
+ fun_l10_n922(x)
+ else
+ fun_l10_n986(x)
+ end
+end
+
+def fun_l9_n762(x)
+ if (x < 1)
+ fun_l10_n100(x)
+ else
+ fun_l10_n346(x)
+ end
+end
+
+def fun_l9_n763(x)
+ if (x < 1)
+ fun_l10_n738(x)
+ else
+ fun_l10_n223(x)
+ end
+end
+
+def fun_l9_n764(x)
+ if (x < 1)
+ fun_l10_n168(x)
+ else
+ fun_l10_n367(x)
+ end
+end
+
+def fun_l9_n765(x)
+ if (x < 1)
+ fun_l10_n929(x)
+ else
+ fun_l10_n684(x)
+ end
+end
+
+def fun_l9_n766(x)
+ if (x < 1)
+ fun_l10_n940(x)
+ else
+ fun_l10_n497(x)
+ end
+end
+
+def fun_l9_n767(x)
+ if (x < 1)
+ fun_l10_n198(x)
+ else
+ fun_l10_n386(x)
+ end
+end
+
+def fun_l9_n768(x)
+ if (x < 1)
+ fun_l10_n667(x)
+ else
+ fun_l10_n913(x)
+ end
+end
+
+def fun_l9_n769(x)
+ if (x < 1)
+ fun_l10_n210(x)
+ else
+ fun_l10_n233(x)
+ end
+end
+
+def fun_l9_n770(x)
+ if (x < 1)
+ fun_l10_n819(x)
+ else
+ fun_l10_n755(x)
+ end
+end
+
+def fun_l9_n771(x)
+ if (x < 1)
+ fun_l10_n519(x)
+ else
+ fun_l10_n554(x)
+ end
+end
+
+def fun_l9_n772(x)
+ if (x < 1)
+ fun_l10_n880(x)
+ else
+ fun_l10_n280(x)
+ end
+end
+
+def fun_l9_n773(x)
+ if (x < 1)
+ fun_l10_n368(x)
+ else
+ fun_l10_n97(x)
+ end
+end
+
+def fun_l9_n774(x)
+ if (x < 1)
+ fun_l10_n447(x)
+ else
+ fun_l10_n918(x)
+ end
+end
+
+def fun_l9_n775(x)
+ if (x < 1)
+ fun_l10_n222(x)
+ else
+ fun_l10_n35(x)
+ end
+end
+
+def fun_l9_n776(x)
+ if (x < 1)
+ fun_l10_n339(x)
+ else
+ fun_l10_n309(x)
+ end
+end
+
+def fun_l9_n777(x)
+ if (x < 1)
+ fun_l10_n948(x)
+ else
+ fun_l10_n967(x)
+ end
+end
+
+def fun_l9_n778(x)
+ if (x < 1)
+ fun_l10_n561(x)
+ else
+ fun_l10_n202(x)
+ end
+end
+
+def fun_l9_n779(x)
+ if (x < 1)
+ fun_l10_n863(x)
+ else
+ fun_l10_n356(x)
+ end
+end
+
+def fun_l9_n780(x)
+ if (x < 1)
+ fun_l10_n459(x)
+ else
+ fun_l10_n358(x)
+ end
+end
+
+def fun_l9_n781(x)
+ if (x < 1)
+ fun_l10_n543(x)
+ else
+ fun_l10_n229(x)
+ end
+end
+
+def fun_l9_n782(x)
+ if (x < 1)
+ fun_l10_n422(x)
+ else
+ fun_l10_n448(x)
+ end
+end
+
+def fun_l9_n783(x)
+ if (x < 1)
+ fun_l10_n222(x)
+ else
+ fun_l10_n63(x)
+ end
+end
+
+def fun_l9_n784(x)
+ if (x < 1)
+ fun_l10_n520(x)
+ else
+ fun_l10_n443(x)
+ end
+end
+
+def fun_l9_n785(x)
+ if (x < 1)
+ fun_l10_n894(x)
+ else
+ fun_l10_n379(x)
+ end
+end
+
+def fun_l9_n786(x)
+ if (x < 1)
+ fun_l10_n362(x)
+ else
+ fun_l10_n676(x)
+ end
+end
+
+def fun_l9_n787(x)
+ if (x < 1)
+ fun_l10_n545(x)
+ else
+ fun_l10_n263(x)
+ end
+end
+
+def fun_l9_n788(x)
+ if (x < 1)
+ fun_l10_n322(x)
+ else
+ fun_l10_n631(x)
+ end
+end
+
+def fun_l9_n789(x)
+ if (x < 1)
+ fun_l10_n916(x)
+ else
+ fun_l10_n877(x)
+ end
+end
+
+def fun_l9_n790(x)
+ if (x < 1)
+ fun_l10_n443(x)
+ else
+ fun_l10_n640(x)
+ end
+end
+
+def fun_l9_n791(x)
+ if (x < 1)
+ fun_l10_n202(x)
+ else
+ fun_l10_n686(x)
+ end
+end
+
+def fun_l9_n792(x)
+ if (x < 1)
+ fun_l10_n143(x)
+ else
+ fun_l10_n200(x)
+ end
+end
+
+def fun_l9_n793(x)
+ if (x < 1)
+ fun_l10_n939(x)
+ else
+ fun_l10_n374(x)
+ end
+end
+
+def fun_l9_n794(x)
+ if (x < 1)
+ fun_l10_n506(x)
+ else
+ fun_l10_n782(x)
+ end
+end
+
+def fun_l9_n795(x)
+ if (x < 1)
+ fun_l10_n619(x)
+ else
+ fun_l10_n439(x)
+ end
+end
+
+def fun_l9_n796(x)
+ if (x < 1)
+ fun_l10_n748(x)
+ else
+ fun_l10_n61(x)
+ end
+end
+
+def fun_l9_n797(x)
+ if (x < 1)
+ fun_l10_n217(x)
+ else
+ fun_l10_n816(x)
+ end
+end
+
+def fun_l9_n798(x)
+ if (x < 1)
+ fun_l10_n310(x)
+ else
+ fun_l10_n445(x)
+ end
+end
+
+def fun_l9_n799(x)
+ if (x < 1)
+ fun_l10_n262(x)
+ else
+ fun_l10_n776(x)
+ end
+end
+
+def fun_l9_n800(x)
+ if (x < 1)
+ fun_l10_n807(x)
+ else
+ fun_l10_n566(x)
+ end
+end
+
+def fun_l9_n801(x)
+ if (x < 1)
+ fun_l10_n466(x)
+ else
+ fun_l10_n287(x)
+ end
+end
+
+def fun_l9_n802(x)
+ if (x < 1)
+ fun_l10_n205(x)
+ else
+ fun_l10_n415(x)
+ end
+end
+
+def fun_l9_n803(x)
+ if (x < 1)
+ fun_l10_n618(x)
+ else
+ fun_l10_n87(x)
+ end
+end
+
+def fun_l9_n804(x)
+ if (x < 1)
+ fun_l10_n248(x)
+ else
+ fun_l10_n32(x)
+ end
+end
+
+def fun_l9_n805(x)
+ if (x < 1)
+ fun_l10_n537(x)
+ else
+ fun_l10_n844(x)
+ end
+end
+
+def fun_l9_n806(x)
+ if (x < 1)
+ fun_l10_n554(x)
+ else
+ fun_l10_n696(x)
+ end
+end
+
+def fun_l9_n807(x)
+ if (x < 1)
+ fun_l10_n774(x)
+ else
+ fun_l10_n486(x)
+ end
+end
+
+def fun_l9_n808(x)
+ if (x < 1)
+ fun_l10_n500(x)
+ else
+ fun_l10_n926(x)
+ end
+end
+
+def fun_l9_n809(x)
+ if (x < 1)
+ fun_l10_n601(x)
+ else
+ fun_l10_n696(x)
+ end
+end
+
+def fun_l9_n810(x)
+ if (x < 1)
+ fun_l10_n770(x)
+ else
+ fun_l10_n948(x)
+ end
+end
+
+def fun_l9_n811(x)
+ if (x < 1)
+ fun_l10_n658(x)
+ else
+ fun_l10_n840(x)
+ end
+end
+
+def fun_l9_n812(x)
+ if (x < 1)
+ fun_l10_n913(x)
+ else
+ fun_l10_n892(x)
+ end
+end
+
+def fun_l9_n813(x)
+ if (x < 1)
+ fun_l10_n440(x)
+ else
+ fun_l10_n204(x)
+ end
+end
+
+def fun_l9_n814(x)
+ if (x < 1)
+ fun_l10_n273(x)
+ else
+ fun_l10_n816(x)
+ end
+end
+
+def fun_l9_n815(x)
+ if (x < 1)
+ fun_l10_n190(x)
+ else
+ fun_l10_n735(x)
+ end
+end
+
+def fun_l9_n816(x)
+ if (x < 1)
+ fun_l10_n77(x)
+ else
+ fun_l10_n30(x)
+ end
+end
+
+def fun_l9_n817(x)
+ if (x < 1)
+ fun_l10_n697(x)
+ else
+ fun_l10_n985(x)
+ end
+end
+
+def fun_l9_n818(x)
+ if (x < 1)
+ fun_l10_n583(x)
+ else
+ fun_l10_n314(x)
+ end
+end
+
+def fun_l9_n819(x)
+ if (x < 1)
+ fun_l10_n149(x)
+ else
+ fun_l10_n556(x)
+ end
+end
+
+def fun_l9_n820(x)
+ if (x < 1)
+ fun_l10_n634(x)
+ else
+ fun_l10_n392(x)
+ end
+end
+
+def fun_l9_n821(x)
+ if (x < 1)
+ fun_l10_n401(x)
+ else
+ fun_l10_n217(x)
+ end
+end
+
+def fun_l9_n822(x)
+ if (x < 1)
+ fun_l10_n564(x)
+ else
+ fun_l10_n860(x)
+ end
+end
+
+def fun_l9_n823(x)
+ if (x < 1)
+ fun_l10_n901(x)
+ else
+ fun_l10_n836(x)
+ end
+end
+
+def fun_l9_n824(x)
+ if (x < 1)
+ fun_l10_n526(x)
+ else
+ fun_l10_n660(x)
+ end
+end
+
+def fun_l9_n825(x)
+ if (x < 1)
+ fun_l10_n245(x)
+ else
+ fun_l10_n914(x)
+ end
+end
+
+def fun_l9_n826(x)
+ if (x < 1)
+ fun_l10_n712(x)
+ else
+ fun_l10_n928(x)
+ end
+end
+
+def fun_l9_n827(x)
+ if (x < 1)
+ fun_l10_n596(x)
+ else
+ fun_l10_n803(x)
+ end
+end
+
+def fun_l9_n828(x)
+ if (x < 1)
+ fun_l10_n454(x)
+ else
+ fun_l10_n679(x)
+ end
+end
+
+def fun_l9_n829(x)
+ if (x < 1)
+ fun_l10_n104(x)
+ else
+ fun_l10_n137(x)
+ end
+end
+
+def fun_l9_n830(x)
+ if (x < 1)
+ fun_l10_n516(x)
+ else
+ fun_l10_n687(x)
+ end
+end
+
+def fun_l9_n831(x)
+ if (x < 1)
+ fun_l10_n720(x)
+ else
+ fun_l10_n770(x)
+ end
+end
+
+def fun_l9_n832(x)
+ if (x < 1)
+ fun_l10_n939(x)
+ else
+ fun_l10_n119(x)
+ end
+end
+
+def fun_l9_n833(x)
+ if (x < 1)
+ fun_l10_n515(x)
+ else
+ fun_l10_n71(x)
+ end
+end
+
+def fun_l9_n834(x)
+ if (x < 1)
+ fun_l10_n668(x)
+ else
+ fun_l10_n521(x)
+ end
+end
+
+def fun_l9_n835(x)
+ if (x < 1)
+ fun_l10_n405(x)
+ else
+ fun_l10_n69(x)
+ end
+end
+
+def fun_l9_n836(x)
+ if (x < 1)
+ fun_l10_n201(x)
+ else
+ fun_l10_n681(x)
+ end
+end
+
+def fun_l9_n837(x)
+ if (x < 1)
+ fun_l10_n161(x)
+ else
+ fun_l10_n258(x)
+ end
+end
+
+def fun_l9_n838(x)
+ if (x < 1)
+ fun_l10_n913(x)
+ else
+ fun_l10_n586(x)
+ end
+end
+
+def fun_l9_n839(x)
+ if (x < 1)
+ fun_l10_n566(x)
+ else
+ fun_l10_n543(x)
+ end
+end
+
+def fun_l9_n840(x)
+ if (x < 1)
+ fun_l10_n547(x)
+ else
+ fun_l10_n570(x)
+ end
+end
+
+def fun_l9_n841(x)
+ if (x < 1)
+ fun_l10_n888(x)
+ else
+ fun_l10_n843(x)
+ end
+end
+
+def fun_l9_n842(x)
+ if (x < 1)
+ fun_l10_n497(x)
+ else
+ fun_l10_n985(x)
+ end
+end
+
+def fun_l9_n843(x)
+ if (x < 1)
+ fun_l10_n754(x)
+ else
+ fun_l10_n390(x)
+ end
+end
+
+def fun_l9_n844(x)
+ if (x < 1)
+ fun_l10_n625(x)
+ else
+ fun_l10_n562(x)
+ end
+end
+
+def fun_l9_n845(x)
+ if (x < 1)
+ fun_l10_n858(x)
+ else
+ fun_l10_n553(x)
+ end
+end
+
+def fun_l9_n846(x)
+ if (x < 1)
+ fun_l10_n145(x)
+ else
+ fun_l10_n551(x)
+ end
+end
+
+def fun_l9_n847(x)
+ if (x < 1)
+ fun_l10_n916(x)
+ else
+ fun_l10_n851(x)
+ end
+end
+
+def fun_l9_n848(x)
+ if (x < 1)
+ fun_l10_n935(x)
+ else
+ fun_l10_n448(x)
+ end
+end
+
+def fun_l9_n849(x)
+ if (x < 1)
+ fun_l10_n664(x)
+ else
+ fun_l10_n832(x)
+ end
+end
+
+def fun_l9_n850(x)
+ if (x < 1)
+ fun_l10_n904(x)
+ else
+ fun_l10_n203(x)
+ end
+end
+
+def fun_l9_n851(x)
+ if (x < 1)
+ fun_l10_n863(x)
+ else
+ fun_l10_n491(x)
+ end
+end
+
+def fun_l9_n852(x)
+ if (x < 1)
+ fun_l10_n930(x)
+ else
+ fun_l10_n248(x)
+ end
+end
+
+def fun_l9_n853(x)
+ if (x < 1)
+ fun_l10_n637(x)
+ else
+ fun_l10_n716(x)
+ end
+end
+
+def fun_l9_n854(x)
+ if (x < 1)
+ fun_l10_n35(x)
+ else
+ fun_l10_n662(x)
+ end
+end
+
+def fun_l9_n855(x)
+ if (x < 1)
+ fun_l10_n57(x)
+ else
+ fun_l10_n392(x)
+ end
+end
+
+def fun_l9_n856(x)
+ if (x < 1)
+ fun_l10_n480(x)
+ else
+ fun_l10_n447(x)
+ end
+end
+
+def fun_l9_n857(x)
+ if (x < 1)
+ fun_l10_n134(x)
+ else
+ fun_l10_n842(x)
+ end
+end
+
+def fun_l9_n858(x)
+ if (x < 1)
+ fun_l10_n384(x)
+ else
+ fun_l10_n577(x)
+ end
+end
+
+def fun_l9_n859(x)
+ if (x < 1)
+ fun_l10_n718(x)
+ else
+ fun_l10_n571(x)
+ end
+end
+
+def fun_l9_n860(x)
+ if (x < 1)
+ fun_l10_n237(x)
+ else
+ fun_l10_n654(x)
+ end
+end
+
+def fun_l9_n861(x)
+ if (x < 1)
+ fun_l10_n807(x)
+ else
+ fun_l10_n409(x)
+ end
+end
+
+def fun_l9_n862(x)
+ if (x < 1)
+ fun_l10_n801(x)
+ else
+ fun_l10_n575(x)
+ end
+end
+
+def fun_l9_n863(x)
+ if (x < 1)
+ fun_l10_n500(x)
+ else
+ fun_l10_n133(x)
+ end
+end
+
+def fun_l9_n864(x)
+ if (x < 1)
+ fun_l10_n403(x)
+ else
+ fun_l10_n720(x)
+ end
+end
+
+def fun_l9_n865(x)
+ if (x < 1)
+ fun_l10_n648(x)
+ else
+ fun_l10_n677(x)
+ end
+end
+
+def fun_l9_n866(x)
+ if (x < 1)
+ fun_l10_n873(x)
+ else
+ fun_l10_n519(x)
+ end
+end
+
+def fun_l9_n867(x)
+ if (x < 1)
+ fun_l10_n459(x)
+ else
+ fun_l10_n331(x)
+ end
+end
+
+def fun_l9_n868(x)
+ if (x < 1)
+ fun_l10_n159(x)
+ else
+ fun_l10_n64(x)
+ end
+end
+
+def fun_l9_n869(x)
+ if (x < 1)
+ fun_l10_n155(x)
+ else
+ fun_l10_n41(x)
+ end
+end
+
+def fun_l9_n870(x)
+ if (x < 1)
+ fun_l10_n947(x)
+ else
+ fun_l10_n386(x)
+ end
+end
+
+def fun_l9_n871(x)
+ if (x < 1)
+ fun_l10_n868(x)
+ else
+ fun_l10_n794(x)
+ end
+end
+
+def fun_l9_n872(x)
+ if (x < 1)
+ fun_l10_n77(x)
+ else
+ fun_l10_n268(x)
+ end
+end
+
+def fun_l9_n873(x)
+ if (x < 1)
+ fun_l10_n119(x)
+ else
+ fun_l10_n819(x)
+ end
+end
+
+def fun_l9_n874(x)
+ if (x < 1)
+ fun_l10_n143(x)
+ else
+ fun_l10_n434(x)
+ end
+end
+
+def fun_l9_n875(x)
+ if (x < 1)
+ fun_l10_n238(x)
+ else
+ fun_l10_n489(x)
+ end
+end
+
+def fun_l9_n876(x)
+ if (x < 1)
+ fun_l10_n687(x)
+ else
+ fun_l10_n384(x)
+ end
+end
+
+def fun_l9_n877(x)
+ if (x < 1)
+ fun_l10_n27(x)
+ else
+ fun_l10_n138(x)
+ end
+end
+
+def fun_l9_n878(x)
+ if (x < 1)
+ fun_l10_n208(x)
+ else
+ fun_l10_n691(x)
+ end
+end
+
+def fun_l9_n879(x)
+ if (x < 1)
+ fun_l10_n793(x)
+ else
+ fun_l10_n165(x)
+ end
+end
+
+def fun_l9_n880(x)
+ if (x < 1)
+ fun_l10_n358(x)
+ else
+ fun_l10_n455(x)
+ end
+end
+
+def fun_l9_n881(x)
+ if (x < 1)
+ fun_l10_n558(x)
+ else
+ fun_l10_n184(x)
+ end
+end
+
+def fun_l9_n882(x)
+ if (x < 1)
+ fun_l10_n461(x)
+ else
+ fun_l10_n155(x)
+ end
+end
+
+def fun_l9_n883(x)
+ if (x < 1)
+ fun_l10_n503(x)
+ else
+ fun_l10_n225(x)
+ end
+end
+
+def fun_l9_n884(x)
+ if (x < 1)
+ fun_l10_n384(x)
+ else
+ fun_l10_n262(x)
+ end
+end
+
+def fun_l9_n885(x)
+ if (x < 1)
+ fun_l10_n565(x)
+ else
+ fun_l10_n633(x)
+ end
+end
+
+def fun_l9_n886(x)
+ if (x < 1)
+ fun_l10_n626(x)
+ else
+ fun_l10_n796(x)
+ end
+end
+
+def fun_l9_n887(x)
+ if (x < 1)
+ fun_l10_n424(x)
+ else
+ fun_l10_n458(x)
+ end
+end
+
+def fun_l9_n888(x)
+ if (x < 1)
+ fun_l10_n687(x)
+ else
+ fun_l10_n145(x)
+ end
+end
+
+def fun_l9_n889(x)
+ if (x < 1)
+ fun_l10_n787(x)
+ else
+ fun_l10_n225(x)
+ end
+end
+
+def fun_l9_n890(x)
+ if (x < 1)
+ fun_l10_n249(x)
+ else
+ fun_l10_n154(x)
+ end
+end
+
+def fun_l9_n891(x)
+ if (x < 1)
+ fun_l10_n38(x)
+ else
+ fun_l10_n635(x)
+ end
+end
+
+def fun_l9_n892(x)
+ if (x < 1)
+ fun_l10_n920(x)
+ else
+ fun_l10_n478(x)
+ end
+end
+
+def fun_l9_n893(x)
+ if (x < 1)
+ fun_l10_n13(x)
+ else
+ fun_l10_n174(x)
+ end
+end
+
+def fun_l9_n894(x)
+ if (x < 1)
+ fun_l10_n304(x)
+ else
+ fun_l10_n495(x)
+ end
+end
+
+def fun_l9_n895(x)
+ if (x < 1)
+ fun_l10_n226(x)
+ else
+ fun_l10_n420(x)
+ end
+end
+
+def fun_l9_n896(x)
+ if (x < 1)
+ fun_l10_n86(x)
+ else
+ fun_l10_n837(x)
+ end
+end
+
+def fun_l9_n897(x)
+ if (x < 1)
+ fun_l10_n927(x)
+ else
+ fun_l10_n344(x)
+ end
+end
+
+def fun_l9_n898(x)
+ if (x < 1)
+ fun_l10_n87(x)
+ else
+ fun_l10_n270(x)
+ end
+end
+
+def fun_l9_n899(x)
+ if (x < 1)
+ fun_l10_n549(x)
+ else
+ fun_l10_n349(x)
+ end
+end
+
+def fun_l9_n900(x)
+ if (x < 1)
+ fun_l10_n456(x)
+ else
+ fun_l10_n345(x)
+ end
+end
+
+def fun_l9_n901(x)
+ if (x < 1)
+ fun_l10_n154(x)
+ else
+ fun_l10_n764(x)
+ end
+end
+
+def fun_l9_n902(x)
+ if (x < 1)
+ fun_l10_n614(x)
+ else
+ fun_l10_n536(x)
+ end
+end
+
+def fun_l9_n903(x)
+ if (x < 1)
+ fun_l10_n108(x)
+ else
+ fun_l10_n197(x)
+ end
+end
+
+def fun_l9_n904(x)
+ if (x < 1)
+ fun_l10_n616(x)
+ else
+ fun_l10_n777(x)
+ end
+end
+
+def fun_l9_n905(x)
+ if (x < 1)
+ fun_l10_n515(x)
+ else
+ fun_l10_n830(x)
+ end
+end
+
+def fun_l9_n906(x)
+ if (x < 1)
+ fun_l10_n288(x)
+ else
+ fun_l10_n717(x)
+ end
+end
+
+def fun_l9_n907(x)
+ if (x < 1)
+ fun_l10_n704(x)
+ else
+ fun_l10_n962(x)
+ end
+end
+
+def fun_l9_n908(x)
+ if (x < 1)
+ fun_l10_n85(x)
+ else
+ fun_l10_n70(x)
+ end
+end
+
+def fun_l9_n909(x)
+ if (x < 1)
+ fun_l10_n806(x)
+ else
+ fun_l10_n97(x)
+ end
+end
+
+def fun_l9_n910(x)
+ if (x < 1)
+ fun_l10_n567(x)
+ else
+ fun_l10_n47(x)
+ end
+end
+
+def fun_l9_n911(x)
+ if (x < 1)
+ fun_l10_n919(x)
+ else
+ fun_l10_n879(x)
+ end
+end
+
+def fun_l9_n912(x)
+ if (x < 1)
+ fun_l10_n229(x)
+ else
+ fun_l10_n200(x)
+ end
+end
+
+def fun_l9_n913(x)
+ if (x < 1)
+ fun_l10_n502(x)
+ else
+ fun_l10_n820(x)
+ end
+end
+
+def fun_l9_n914(x)
+ if (x < 1)
+ fun_l10_n57(x)
+ else
+ fun_l10_n470(x)
+ end
+end
+
+def fun_l9_n915(x)
+ if (x < 1)
+ fun_l10_n909(x)
+ else
+ fun_l10_n845(x)
+ end
+end
+
+def fun_l9_n916(x)
+ if (x < 1)
+ fun_l10_n658(x)
+ else
+ fun_l10_n925(x)
+ end
+end
+
+def fun_l9_n917(x)
+ if (x < 1)
+ fun_l10_n886(x)
+ else
+ fun_l10_n285(x)
+ end
+end
+
+def fun_l9_n918(x)
+ if (x < 1)
+ fun_l10_n484(x)
+ else
+ fun_l10_n712(x)
+ end
+end
+
+def fun_l9_n919(x)
+ if (x < 1)
+ fun_l10_n299(x)
+ else
+ fun_l10_n144(x)
+ end
+end
+
+def fun_l9_n920(x)
+ if (x < 1)
+ fun_l10_n830(x)
+ else
+ fun_l10_n913(x)
+ end
+end
+
+def fun_l9_n921(x)
+ if (x < 1)
+ fun_l10_n306(x)
+ else
+ fun_l10_n242(x)
+ end
+end
+
+def fun_l9_n922(x)
+ if (x < 1)
+ fun_l10_n442(x)
+ else
+ fun_l10_n497(x)
+ end
+end
+
+def fun_l9_n923(x)
+ if (x < 1)
+ fun_l10_n22(x)
+ else
+ fun_l10_n376(x)
+ end
+end
+
+def fun_l9_n924(x)
+ if (x < 1)
+ fun_l10_n737(x)
+ else
+ fun_l10_n603(x)
+ end
+end
+
+def fun_l9_n925(x)
+ if (x < 1)
+ fun_l10_n300(x)
+ else
+ fun_l10_n974(x)
+ end
+end
+
+def fun_l9_n926(x)
+ if (x < 1)
+ fun_l10_n644(x)
+ else
+ fun_l10_n973(x)
+ end
+end
+
+def fun_l9_n927(x)
+ if (x < 1)
+ fun_l10_n413(x)
+ else
+ fun_l10_n353(x)
+ end
+end
+
+def fun_l9_n928(x)
+ if (x < 1)
+ fun_l10_n438(x)
+ else
+ fun_l10_n518(x)
+ end
+end
+
+def fun_l9_n929(x)
+ if (x < 1)
+ fun_l10_n30(x)
+ else
+ fun_l10_n207(x)
+ end
+end
+
+def fun_l9_n930(x)
+ if (x < 1)
+ fun_l10_n976(x)
+ else
+ fun_l10_n70(x)
+ end
+end
+
+def fun_l9_n931(x)
+ if (x < 1)
+ fun_l10_n5(x)
+ else
+ fun_l10_n37(x)
+ end
+end
+
+def fun_l9_n932(x)
+ if (x < 1)
+ fun_l10_n612(x)
+ else
+ fun_l10_n268(x)
+ end
+end
+
+def fun_l9_n933(x)
+ if (x < 1)
+ fun_l10_n81(x)
+ else
+ fun_l10_n373(x)
+ end
+end
+
+def fun_l9_n934(x)
+ if (x < 1)
+ fun_l10_n30(x)
+ else
+ fun_l10_n504(x)
+ end
+end
+
+def fun_l9_n935(x)
+ if (x < 1)
+ fun_l10_n131(x)
+ else
+ fun_l10_n617(x)
+ end
+end
+
+def fun_l9_n936(x)
+ if (x < 1)
+ fun_l10_n114(x)
+ else
+ fun_l10_n883(x)
+ end
+end
+
+def fun_l9_n937(x)
+ if (x < 1)
+ fun_l10_n859(x)
+ else
+ fun_l10_n788(x)
+ end
+end
+
+def fun_l9_n938(x)
+ if (x < 1)
+ fun_l10_n993(x)
+ else
+ fun_l10_n349(x)
+ end
+end
+
+def fun_l9_n939(x)
+ if (x < 1)
+ fun_l10_n775(x)
+ else
+ fun_l10_n195(x)
+ end
+end
+
+def fun_l9_n940(x)
+ if (x < 1)
+ fun_l10_n829(x)
+ else
+ fun_l10_n398(x)
+ end
+end
+
+def fun_l9_n941(x)
+ if (x < 1)
+ fun_l10_n906(x)
+ else
+ fun_l10_n529(x)
+ end
+end
+
+def fun_l9_n942(x)
+ if (x < 1)
+ fun_l10_n965(x)
+ else
+ fun_l10_n372(x)
+ end
+end
+
+def fun_l9_n943(x)
+ if (x < 1)
+ fun_l10_n953(x)
+ else
+ fun_l10_n397(x)
+ end
+end
+
+def fun_l9_n944(x)
+ if (x < 1)
+ fun_l10_n984(x)
+ else
+ fun_l10_n909(x)
+ end
+end
+
+def fun_l9_n945(x)
+ if (x < 1)
+ fun_l10_n649(x)
+ else
+ fun_l10_n304(x)
+ end
+end
+
+def fun_l9_n946(x)
+ if (x < 1)
+ fun_l10_n0(x)
+ else
+ fun_l10_n922(x)
+ end
+end
+
+def fun_l9_n947(x)
+ if (x < 1)
+ fun_l10_n460(x)
+ else
+ fun_l10_n215(x)
+ end
+end
+
+def fun_l9_n948(x)
+ if (x < 1)
+ fun_l10_n251(x)
+ else
+ fun_l10_n636(x)
+ end
+end
+
+def fun_l9_n949(x)
+ if (x < 1)
+ fun_l10_n14(x)
+ else
+ fun_l10_n494(x)
+ end
+end
+
+def fun_l9_n950(x)
+ if (x < 1)
+ fun_l10_n6(x)
+ else
+ fun_l10_n523(x)
+ end
+end
+
+def fun_l9_n951(x)
+ if (x < 1)
+ fun_l10_n705(x)
+ else
+ fun_l10_n689(x)
+ end
+end
+
+def fun_l9_n952(x)
+ if (x < 1)
+ fun_l10_n830(x)
+ else
+ fun_l10_n374(x)
+ end
+end
+
+def fun_l9_n953(x)
+ if (x < 1)
+ fun_l10_n451(x)
+ else
+ fun_l10_n87(x)
+ end
+end
+
+def fun_l9_n954(x)
+ if (x < 1)
+ fun_l10_n202(x)
+ else
+ fun_l10_n753(x)
+ end
+end
+
+def fun_l9_n955(x)
+ if (x < 1)
+ fun_l10_n384(x)
+ else
+ fun_l10_n216(x)
+ end
+end
+
+def fun_l9_n956(x)
+ if (x < 1)
+ fun_l10_n381(x)
+ else
+ fun_l10_n727(x)
+ end
+end
+
+def fun_l9_n957(x)
+ if (x < 1)
+ fun_l10_n876(x)
+ else
+ fun_l10_n760(x)
+ end
+end
+
+def fun_l9_n958(x)
+ if (x < 1)
+ fun_l10_n975(x)
+ else
+ fun_l10_n372(x)
+ end
+end
+
+def fun_l9_n959(x)
+ if (x < 1)
+ fun_l10_n714(x)
+ else
+ fun_l10_n680(x)
+ end
+end
+
+def fun_l9_n960(x)
+ if (x < 1)
+ fun_l10_n733(x)
+ else
+ fun_l10_n508(x)
+ end
+end
+
+def fun_l9_n961(x)
+ if (x < 1)
+ fun_l10_n319(x)
+ else
+ fun_l10_n90(x)
+ end
+end
+
+def fun_l9_n962(x)
+ if (x < 1)
+ fun_l10_n964(x)
+ else
+ fun_l10_n282(x)
+ end
+end
+
+def fun_l9_n963(x)
+ if (x < 1)
+ fun_l10_n179(x)
+ else
+ fun_l10_n324(x)
+ end
+end
+
+def fun_l9_n964(x)
+ if (x < 1)
+ fun_l10_n627(x)
+ else
+ fun_l10_n627(x)
+ end
+end
+
+def fun_l9_n965(x)
+ if (x < 1)
+ fun_l10_n7(x)
+ else
+ fun_l10_n375(x)
+ end
+end
+
+def fun_l9_n966(x)
+ if (x < 1)
+ fun_l10_n960(x)
+ else
+ fun_l10_n272(x)
+ end
+end
+
+def fun_l9_n967(x)
+ if (x < 1)
+ fun_l10_n869(x)
+ else
+ fun_l10_n737(x)
+ end
+end
+
+def fun_l9_n968(x)
+ if (x < 1)
+ fun_l10_n621(x)
+ else
+ fun_l10_n413(x)
+ end
+end
+
+def fun_l9_n969(x)
+ if (x < 1)
+ fun_l10_n258(x)
+ else
+ fun_l10_n105(x)
+ end
+end
+
+def fun_l9_n970(x)
+ if (x < 1)
+ fun_l10_n817(x)
+ else
+ fun_l10_n519(x)
+ end
+end
+
+def fun_l9_n971(x)
+ if (x < 1)
+ fun_l10_n462(x)
+ else
+ fun_l10_n335(x)
+ end
+end
+
+def fun_l9_n972(x)
+ if (x < 1)
+ fun_l10_n770(x)
+ else
+ fun_l10_n856(x)
+ end
+end
+
+def fun_l9_n973(x)
+ if (x < 1)
+ fun_l10_n607(x)
+ else
+ fun_l10_n142(x)
+ end
+end
+
+def fun_l9_n974(x)
+ if (x < 1)
+ fun_l10_n498(x)
+ else
+ fun_l10_n373(x)
+ end
+end
+
+def fun_l9_n975(x)
+ if (x < 1)
+ fun_l10_n239(x)
+ else
+ fun_l10_n895(x)
+ end
+end
+
+def fun_l9_n976(x)
+ if (x < 1)
+ fun_l10_n312(x)
+ else
+ fun_l10_n489(x)
+ end
+end
+
+def fun_l9_n977(x)
+ if (x < 1)
+ fun_l10_n595(x)
+ else
+ fun_l10_n674(x)
+ end
+end
+
+def fun_l9_n978(x)
+ if (x < 1)
+ fun_l10_n928(x)
+ else
+ fun_l10_n774(x)
+ end
+end
+
+def fun_l9_n979(x)
+ if (x < 1)
+ fun_l10_n964(x)
+ else
+ fun_l10_n860(x)
+ end
+end
+
+def fun_l9_n980(x)
+ if (x < 1)
+ fun_l10_n63(x)
+ else
+ fun_l10_n115(x)
+ end
+end
+
+def fun_l9_n981(x)
+ if (x < 1)
+ fun_l10_n930(x)
+ else
+ fun_l10_n559(x)
+ end
+end
+
+def fun_l9_n982(x)
+ if (x < 1)
+ fun_l10_n391(x)
+ else
+ fun_l10_n411(x)
+ end
+end
+
+def fun_l9_n983(x)
+ if (x < 1)
+ fun_l10_n71(x)
+ else
+ fun_l10_n632(x)
+ end
+end
+
+def fun_l9_n984(x)
+ if (x < 1)
+ fun_l10_n613(x)
+ else
+ fun_l10_n218(x)
+ end
+end
+
+def fun_l9_n985(x)
+ if (x < 1)
+ fun_l10_n263(x)
+ else
+ fun_l10_n858(x)
+ end
+end
+
+def fun_l9_n986(x)
+ if (x < 1)
+ fun_l10_n974(x)
+ else
+ fun_l10_n824(x)
+ end
+end
+
+def fun_l9_n987(x)
+ if (x < 1)
+ fun_l10_n636(x)
+ else
+ fun_l10_n55(x)
+ end
+end
+
+def fun_l9_n988(x)
+ if (x < 1)
+ fun_l10_n367(x)
+ else
+ fun_l10_n878(x)
+ end
+end
+
+def fun_l9_n989(x)
+ if (x < 1)
+ fun_l10_n316(x)
+ else
+ fun_l10_n800(x)
+ end
+end
+
+def fun_l9_n990(x)
+ if (x < 1)
+ fun_l10_n581(x)
+ else
+ fun_l10_n511(x)
+ end
+end
+
+def fun_l9_n991(x)
+ if (x < 1)
+ fun_l10_n667(x)
+ else
+ fun_l10_n566(x)
+ end
+end
+
+def fun_l9_n992(x)
+ if (x < 1)
+ fun_l10_n144(x)
+ else
+ fun_l10_n51(x)
+ end
+end
+
+def fun_l9_n993(x)
+ if (x < 1)
+ fun_l10_n652(x)
+ else
+ fun_l10_n436(x)
+ end
+end
+
+def fun_l9_n994(x)
+ if (x < 1)
+ fun_l10_n283(x)
+ else
+ fun_l10_n480(x)
+ end
+end
+
+def fun_l9_n995(x)
+ if (x < 1)
+ fun_l10_n908(x)
+ else
+ fun_l10_n86(x)
+ end
+end
+
+def fun_l9_n996(x)
+ if (x < 1)
+ fun_l10_n43(x)
+ else
+ fun_l10_n466(x)
+ end
+end
+
+def fun_l9_n997(x)
+ if (x < 1)
+ fun_l10_n968(x)
+ else
+ fun_l10_n97(x)
+ end
+end
+
+def fun_l9_n998(x)
+ if (x < 1)
+ fun_l10_n38(x)
+ else
+ fun_l10_n78(x)
+ end
+end
+
+def fun_l9_n999(x)
+ if (x < 1)
+ fun_l10_n947(x)
+ else
+ fun_l10_n322(x)
+ end
+end
+
+def fun_l10_n0(x)
+ if (x < 1)
+ fun_l11_n424(x)
+ else
+ fun_l11_n206(x)
+ end
+end
+
+def fun_l10_n1(x)
+ if (x < 1)
+ fun_l11_n263(x)
+ else
+ fun_l11_n886(x)
+ end
+end
+
+def fun_l10_n2(x)
+ if (x < 1)
+ fun_l11_n31(x)
+ else
+ fun_l11_n693(x)
+ end
+end
+
+def fun_l10_n3(x)
+ if (x < 1)
+ fun_l11_n924(x)
+ else
+ fun_l11_n585(x)
+ end
+end
+
+def fun_l10_n4(x)
+ if (x < 1)
+ fun_l11_n552(x)
+ else
+ fun_l11_n904(x)
+ end
+end
+
+def fun_l10_n5(x)
+ if (x < 1)
+ fun_l11_n912(x)
+ else
+ fun_l11_n127(x)
+ end
+end
+
+def fun_l10_n6(x)
+ if (x < 1)
+ fun_l11_n284(x)
+ else
+ fun_l11_n952(x)
+ end
+end
+
+def fun_l10_n7(x)
+ if (x < 1)
+ fun_l11_n294(x)
+ else
+ fun_l11_n527(x)
+ end
+end
+
+def fun_l10_n8(x)
+ if (x < 1)
+ fun_l11_n675(x)
+ else
+ fun_l11_n457(x)
+ end
+end
+
+def fun_l10_n9(x)
+ if (x < 1)
+ fun_l11_n908(x)
+ else
+ fun_l11_n963(x)
+ end
+end
+
+def fun_l10_n10(x)
+ if (x < 1)
+ fun_l11_n361(x)
+ else
+ fun_l11_n839(x)
+ end
+end
+
+def fun_l10_n11(x)
+ if (x < 1)
+ fun_l11_n402(x)
+ else
+ fun_l11_n228(x)
+ end
+end
+
+def fun_l10_n12(x)
+ if (x < 1)
+ fun_l11_n871(x)
+ else
+ fun_l11_n194(x)
+ end
+end
+
+def fun_l10_n13(x)
+ if (x < 1)
+ fun_l11_n255(x)
+ else
+ fun_l11_n816(x)
+ end
+end
+
+def fun_l10_n14(x)
+ if (x < 1)
+ fun_l11_n987(x)
+ else
+ fun_l11_n870(x)
+ end
+end
+
+def fun_l10_n15(x)
+ if (x < 1)
+ fun_l11_n538(x)
+ else
+ fun_l11_n837(x)
+ end
+end
+
+def fun_l10_n16(x)
+ if (x < 1)
+ fun_l11_n205(x)
+ else
+ fun_l11_n831(x)
+ end
+end
+
+def fun_l10_n17(x)
+ if (x < 1)
+ fun_l11_n737(x)
+ else
+ fun_l11_n242(x)
+ end
+end
+
+def fun_l10_n18(x)
+ if (x < 1)
+ fun_l11_n18(x)
+ else
+ fun_l11_n103(x)
+ end
+end
+
+def fun_l10_n19(x)
+ if (x < 1)
+ fun_l11_n928(x)
+ else
+ fun_l11_n300(x)
+ end
+end
+
+def fun_l10_n20(x)
+ if (x < 1)
+ fun_l11_n816(x)
+ else
+ fun_l11_n225(x)
+ end
+end
+
+def fun_l10_n21(x)
+ if (x < 1)
+ fun_l11_n52(x)
+ else
+ fun_l11_n901(x)
+ end
+end
+
+def fun_l10_n22(x)
+ if (x < 1)
+ fun_l11_n316(x)
+ else
+ fun_l11_n556(x)
+ end
+end
+
+def fun_l10_n23(x)
+ if (x < 1)
+ fun_l11_n103(x)
+ else
+ fun_l11_n223(x)
+ end
+end
+
+def fun_l10_n24(x)
+ if (x < 1)
+ fun_l11_n14(x)
+ else
+ fun_l11_n875(x)
+ end
+end
+
+def fun_l10_n25(x)
+ if (x < 1)
+ fun_l11_n359(x)
+ else
+ fun_l11_n504(x)
+ end
+end
+
+def fun_l10_n26(x)
+ if (x < 1)
+ fun_l11_n416(x)
+ else
+ fun_l11_n172(x)
+ end
+end
+
+def fun_l10_n27(x)
+ if (x < 1)
+ fun_l11_n142(x)
+ else
+ fun_l11_n238(x)
+ end
+end
+
+def fun_l10_n28(x)
+ if (x < 1)
+ fun_l11_n319(x)
+ else
+ fun_l11_n350(x)
+ end
+end
+
+def fun_l10_n29(x)
+ if (x < 1)
+ fun_l11_n53(x)
+ else
+ fun_l11_n162(x)
+ end
+end
+
+def fun_l10_n30(x)
+ if (x < 1)
+ fun_l11_n121(x)
+ else
+ fun_l11_n39(x)
+ end
+end
+
+def fun_l10_n31(x)
+ if (x < 1)
+ fun_l11_n447(x)
+ else
+ fun_l11_n259(x)
+ end
+end
+
+def fun_l10_n32(x)
+ if (x < 1)
+ fun_l11_n931(x)
+ else
+ fun_l11_n571(x)
+ end
+end
+
+def fun_l10_n33(x)
+ if (x < 1)
+ fun_l11_n705(x)
+ else
+ fun_l11_n544(x)
+ end
+end
+
+def fun_l10_n34(x)
+ if (x < 1)
+ fun_l11_n990(x)
+ else
+ fun_l11_n695(x)
+ end
+end
+
+def fun_l10_n35(x)
+ if (x < 1)
+ fun_l11_n197(x)
+ else
+ fun_l11_n391(x)
+ end
+end
+
+def fun_l10_n36(x)
+ if (x < 1)
+ fun_l11_n686(x)
+ else
+ fun_l11_n785(x)
+ end
+end
+
+def fun_l10_n37(x)
+ if (x < 1)
+ fun_l11_n466(x)
+ else
+ fun_l11_n783(x)
+ end
+end
+
+def fun_l10_n38(x)
+ if (x < 1)
+ fun_l11_n351(x)
+ else
+ fun_l11_n732(x)
+ end
+end
+
+def fun_l10_n39(x)
+ if (x < 1)
+ fun_l11_n22(x)
+ else
+ fun_l11_n995(x)
+ end
+end
+
+def fun_l10_n40(x)
+ if (x < 1)
+ fun_l11_n264(x)
+ else
+ fun_l11_n662(x)
+ end
+end
+
+def fun_l10_n41(x)
+ if (x < 1)
+ fun_l11_n91(x)
+ else
+ fun_l11_n673(x)
+ end
+end
+
+def fun_l10_n42(x)
+ if (x < 1)
+ fun_l11_n993(x)
+ else
+ fun_l11_n839(x)
+ end
+end
+
+def fun_l10_n43(x)
+ if (x < 1)
+ fun_l11_n158(x)
+ else
+ fun_l11_n774(x)
+ end
+end
+
+def fun_l10_n44(x)
+ if (x < 1)
+ fun_l11_n977(x)
+ else
+ fun_l11_n321(x)
+ end
+end
+
+def fun_l10_n45(x)
+ if (x < 1)
+ fun_l11_n121(x)
+ else
+ fun_l11_n184(x)
+ end
+end
+
+def fun_l10_n46(x)
+ if (x < 1)
+ fun_l11_n446(x)
+ else
+ fun_l11_n426(x)
+ end
+end
+
+def fun_l10_n47(x)
+ if (x < 1)
+ fun_l11_n524(x)
+ else
+ fun_l11_n123(x)
+ end
+end
+
+def fun_l10_n48(x)
+ if (x < 1)
+ fun_l11_n435(x)
+ else
+ fun_l11_n560(x)
+ end
+end
+
+def fun_l10_n49(x)
+ if (x < 1)
+ fun_l11_n94(x)
+ else
+ fun_l11_n731(x)
+ end
+end
+
+def fun_l10_n50(x)
+ if (x < 1)
+ fun_l11_n177(x)
+ else
+ fun_l11_n902(x)
+ end
+end
+
+def fun_l10_n51(x)
+ if (x < 1)
+ fun_l11_n648(x)
+ else
+ fun_l11_n807(x)
+ end
+end
+
+def fun_l10_n52(x)
+ if (x < 1)
+ fun_l11_n414(x)
+ else
+ fun_l11_n335(x)
+ end
+end
+
+def fun_l10_n53(x)
+ if (x < 1)
+ fun_l11_n754(x)
+ else
+ fun_l11_n789(x)
+ end
+end
+
+def fun_l10_n54(x)
+ if (x < 1)
+ fun_l11_n843(x)
+ else
+ fun_l11_n980(x)
+ end
+end
+
+def fun_l10_n55(x)
+ if (x < 1)
+ fun_l11_n706(x)
+ else
+ fun_l11_n160(x)
+ end
+end
+
+def fun_l10_n56(x)
+ if (x < 1)
+ fun_l11_n564(x)
+ else
+ fun_l11_n672(x)
+ end
+end
+
+def fun_l10_n57(x)
+ if (x < 1)
+ fun_l11_n158(x)
+ else
+ fun_l11_n154(x)
+ end
+end
+
+def fun_l10_n58(x)
+ if (x < 1)
+ fun_l11_n120(x)
+ else
+ fun_l11_n970(x)
+ end
+end
+
+def fun_l10_n59(x)
+ if (x < 1)
+ fun_l11_n561(x)
+ else
+ fun_l11_n872(x)
+ end
+end
+
+def fun_l10_n60(x)
+ if (x < 1)
+ fun_l11_n93(x)
+ else
+ fun_l11_n723(x)
+ end
+end
+
+def fun_l10_n61(x)
+ if (x < 1)
+ fun_l11_n921(x)
+ else
+ fun_l11_n578(x)
+ end
+end
+
+def fun_l10_n62(x)
+ if (x < 1)
+ fun_l11_n527(x)
+ else
+ fun_l11_n118(x)
+ end
+end
+
+def fun_l10_n63(x)
+ if (x < 1)
+ fun_l11_n225(x)
+ else
+ fun_l11_n937(x)
+ end
+end
+
+def fun_l10_n64(x)
+ if (x < 1)
+ fun_l11_n634(x)
+ else
+ fun_l11_n415(x)
+ end
+end
+
+def fun_l10_n65(x)
+ if (x < 1)
+ fun_l11_n718(x)
+ else
+ fun_l11_n958(x)
+ end
+end
+
+def fun_l10_n66(x)
+ if (x < 1)
+ fun_l11_n972(x)
+ else
+ fun_l11_n453(x)
+ end
+end
+
+def fun_l10_n67(x)
+ if (x < 1)
+ fun_l11_n85(x)
+ else
+ fun_l11_n934(x)
+ end
+end
+
+def fun_l10_n68(x)
+ if (x < 1)
+ fun_l11_n386(x)
+ else
+ fun_l11_n138(x)
+ end
+end
+
+def fun_l10_n69(x)
+ if (x < 1)
+ fun_l11_n312(x)
+ else
+ fun_l11_n62(x)
+ end
+end
+
+def fun_l10_n70(x)
+ if (x < 1)
+ fun_l11_n591(x)
+ else
+ fun_l11_n906(x)
+ end
+end
+
+def fun_l10_n71(x)
+ if (x < 1)
+ fun_l11_n571(x)
+ else
+ fun_l11_n429(x)
+ end
+end
+
+def fun_l10_n72(x)
+ if (x < 1)
+ fun_l11_n996(x)
+ else
+ fun_l11_n932(x)
+ end
+end
+
+def fun_l10_n73(x)
+ if (x < 1)
+ fun_l11_n691(x)
+ else
+ fun_l11_n116(x)
+ end
+end
+
+def fun_l10_n74(x)
+ if (x < 1)
+ fun_l11_n670(x)
+ else
+ fun_l11_n865(x)
+ end
+end
+
+def fun_l10_n75(x)
+ if (x < 1)
+ fun_l11_n568(x)
+ else
+ fun_l11_n164(x)
+ end
+end
+
+def fun_l10_n76(x)
+ if (x < 1)
+ fun_l11_n747(x)
+ else
+ fun_l11_n235(x)
+ end
+end
+
+def fun_l10_n77(x)
+ if (x < 1)
+ fun_l11_n402(x)
+ else
+ fun_l11_n670(x)
+ end
+end
+
+def fun_l10_n78(x)
+ if (x < 1)
+ fun_l11_n525(x)
+ else
+ fun_l11_n675(x)
+ end
+end
+
+def fun_l10_n79(x)
+ if (x < 1)
+ fun_l11_n6(x)
+ else
+ fun_l11_n238(x)
+ end
+end
+
+def fun_l10_n80(x)
+ if (x < 1)
+ fun_l11_n905(x)
+ else
+ fun_l11_n170(x)
+ end
+end
+
+def fun_l10_n81(x)
+ if (x < 1)
+ fun_l11_n610(x)
+ else
+ fun_l11_n527(x)
+ end
+end
+
+def fun_l10_n82(x)
+ if (x < 1)
+ fun_l11_n796(x)
+ else
+ fun_l11_n749(x)
+ end
+end
+
+def fun_l10_n83(x)
+ if (x < 1)
+ fun_l11_n634(x)
+ else
+ fun_l11_n49(x)
+ end
+end
+
+def fun_l10_n84(x)
+ if (x < 1)
+ fun_l11_n376(x)
+ else
+ fun_l11_n852(x)
+ end
+end
+
+def fun_l10_n85(x)
+ if (x < 1)
+ fun_l11_n593(x)
+ else
+ fun_l11_n752(x)
+ end
+end
+
+def fun_l10_n86(x)
+ if (x < 1)
+ fun_l11_n821(x)
+ else
+ fun_l11_n892(x)
+ end
+end
+
+def fun_l10_n87(x)
+ if (x < 1)
+ fun_l11_n950(x)
+ else
+ fun_l11_n309(x)
+ end
+end
+
+def fun_l10_n88(x)
+ if (x < 1)
+ fun_l11_n360(x)
+ else
+ fun_l11_n134(x)
+ end
+end
+
+def fun_l10_n89(x)
+ if (x < 1)
+ fun_l11_n935(x)
+ else
+ fun_l11_n241(x)
+ end
+end
+
+def fun_l10_n90(x)
+ if (x < 1)
+ fun_l11_n524(x)
+ else
+ fun_l11_n120(x)
+ end
+end
+
+def fun_l10_n91(x)
+ if (x < 1)
+ fun_l11_n25(x)
+ else
+ fun_l11_n357(x)
+ end
+end
+
+def fun_l10_n92(x)
+ if (x < 1)
+ fun_l11_n248(x)
+ else
+ fun_l11_n212(x)
+ end
+end
+
+def fun_l10_n93(x)
+ if (x < 1)
+ fun_l11_n860(x)
+ else
+ fun_l11_n733(x)
+ end
+end
+
+def fun_l10_n94(x)
+ if (x < 1)
+ fun_l11_n147(x)
+ else
+ fun_l11_n907(x)
+ end
+end
+
+def fun_l10_n95(x)
+ if (x < 1)
+ fun_l11_n758(x)
+ else
+ fun_l11_n62(x)
+ end
+end
+
+def fun_l10_n96(x)
+ if (x < 1)
+ fun_l11_n205(x)
+ else
+ fun_l11_n54(x)
+ end
+end
+
+def fun_l10_n97(x)
+ if (x < 1)
+ fun_l11_n8(x)
+ else
+ fun_l11_n813(x)
+ end
+end
+
+def fun_l10_n98(x)
+ if (x < 1)
+ fun_l11_n296(x)
+ else
+ fun_l11_n693(x)
+ end
+end
+
+def fun_l10_n99(x)
+ if (x < 1)
+ fun_l11_n181(x)
+ else
+ fun_l11_n709(x)
+ end
+end
+
+def fun_l10_n100(x)
+ if (x < 1)
+ fun_l11_n109(x)
+ else
+ fun_l11_n560(x)
+ end
+end
+
+def fun_l10_n101(x)
+ if (x < 1)
+ fun_l11_n290(x)
+ else
+ fun_l11_n693(x)
+ end
+end
+
+def fun_l10_n102(x)
+ if (x < 1)
+ fun_l11_n826(x)
+ else
+ fun_l11_n813(x)
+ end
+end
+
+def fun_l10_n103(x)
+ if (x < 1)
+ fun_l11_n3(x)
+ else
+ fun_l11_n787(x)
+ end
+end
+
+def fun_l10_n104(x)
+ if (x < 1)
+ fun_l11_n477(x)
+ else
+ fun_l11_n336(x)
+ end
+end
+
+def fun_l10_n105(x)
+ if (x < 1)
+ fun_l11_n131(x)
+ else
+ fun_l11_n500(x)
+ end
+end
+
+def fun_l10_n106(x)
+ if (x < 1)
+ fun_l11_n278(x)
+ else
+ fun_l11_n948(x)
+ end
+end
+
+def fun_l10_n107(x)
+ if (x < 1)
+ fun_l11_n950(x)
+ else
+ fun_l11_n848(x)
+ end
+end
+
+def fun_l10_n108(x)
+ if (x < 1)
+ fun_l11_n490(x)
+ else
+ fun_l11_n1(x)
+ end
+end
+
+def fun_l10_n109(x)
+ if (x < 1)
+ fun_l11_n297(x)
+ else
+ fun_l11_n902(x)
+ end
+end
+
+def fun_l10_n110(x)
+ if (x < 1)
+ fun_l11_n808(x)
+ else
+ fun_l11_n697(x)
+ end
+end
+
+def fun_l10_n111(x)
+ if (x < 1)
+ fun_l11_n330(x)
+ else
+ fun_l11_n424(x)
+ end
+end
+
+def fun_l10_n112(x)
+ if (x < 1)
+ fun_l11_n254(x)
+ else
+ fun_l11_n662(x)
+ end
+end
+
+def fun_l10_n113(x)
+ if (x < 1)
+ fun_l11_n811(x)
+ else
+ fun_l11_n196(x)
+ end
+end
+
+def fun_l10_n114(x)
+ if (x < 1)
+ fun_l11_n868(x)
+ else
+ fun_l11_n812(x)
+ end
+end
+
+def fun_l10_n115(x)
+ if (x < 1)
+ fun_l11_n308(x)
+ else
+ fun_l11_n184(x)
+ end
+end
+
+def fun_l10_n116(x)
+ if (x < 1)
+ fun_l11_n64(x)
+ else
+ fun_l11_n906(x)
+ end
+end
+
+def fun_l10_n117(x)
+ if (x < 1)
+ fun_l11_n339(x)
+ else
+ fun_l11_n338(x)
+ end
+end
+
+def fun_l10_n118(x)
+ if (x < 1)
+ fun_l11_n993(x)
+ else
+ fun_l11_n915(x)
+ end
+end
+
+def fun_l10_n119(x)
+ if (x < 1)
+ fun_l11_n729(x)
+ else
+ fun_l11_n472(x)
+ end
+end
+
+def fun_l10_n120(x)
+ if (x < 1)
+ fun_l11_n646(x)
+ else
+ fun_l11_n83(x)
+ end
+end
+
+def fun_l10_n121(x)
+ if (x < 1)
+ fun_l11_n294(x)
+ else
+ fun_l11_n208(x)
+ end
+end
+
+def fun_l10_n122(x)
+ if (x < 1)
+ fun_l11_n309(x)
+ else
+ fun_l11_n52(x)
+ end
+end
+
+def fun_l10_n123(x)
+ if (x < 1)
+ fun_l11_n5(x)
+ else
+ fun_l11_n124(x)
+ end
+end
+
+def fun_l10_n124(x)
+ if (x < 1)
+ fun_l11_n288(x)
+ else
+ fun_l11_n731(x)
+ end
+end
+
+def fun_l10_n125(x)
+ if (x < 1)
+ fun_l11_n835(x)
+ else
+ fun_l11_n381(x)
+ end
+end
+
+def fun_l10_n126(x)
+ if (x < 1)
+ fun_l11_n269(x)
+ else
+ fun_l11_n104(x)
+ end
+end
+
+def fun_l10_n127(x)
+ if (x < 1)
+ fun_l11_n377(x)
+ else
+ fun_l11_n650(x)
+ end
+end
+
+def fun_l10_n128(x)
+ if (x < 1)
+ fun_l11_n749(x)
+ else
+ fun_l11_n223(x)
+ end
+end
+
+def fun_l10_n129(x)
+ if (x < 1)
+ fun_l11_n493(x)
+ else
+ fun_l11_n834(x)
+ end
+end
+
+def fun_l10_n130(x)
+ if (x < 1)
+ fun_l11_n826(x)
+ else
+ fun_l11_n857(x)
+ end
+end
+
+def fun_l10_n131(x)
+ if (x < 1)
+ fun_l11_n19(x)
+ else
+ fun_l11_n932(x)
+ end
+end
+
+def fun_l10_n132(x)
+ if (x < 1)
+ fun_l11_n585(x)
+ else
+ fun_l11_n13(x)
+ end
+end
+
+def fun_l10_n133(x)
+ if (x < 1)
+ fun_l11_n91(x)
+ else
+ fun_l11_n748(x)
+ end
+end
+
+def fun_l10_n134(x)
+ if (x < 1)
+ fun_l11_n218(x)
+ else
+ fun_l11_n343(x)
+ end
+end
+
+def fun_l10_n135(x)
+ if (x < 1)
+ fun_l11_n386(x)
+ else
+ fun_l11_n655(x)
+ end
+end
+
+def fun_l10_n136(x)
+ if (x < 1)
+ fun_l11_n43(x)
+ else
+ fun_l11_n964(x)
+ end
+end
+
+def fun_l10_n137(x)
+ if (x < 1)
+ fun_l11_n50(x)
+ else
+ fun_l11_n836(x)
+ end
+end
+
+def fun_l10_n138(x)
+ if (x < 1)
+ fun_l11_n915(x)
+ else
+ fun_l11_n262(x)
+ end
+end
+
+def fun_l10_n139(x)
+ if (x < 1)
+ fun_l11_n187(x)
+ else
+ fun_l11_n321(x)
+ end
+end
+
+def fun_l10_n140(x)
+ if (x < 1)
+ fun_l11_n473(x)
+ else
+ fun_l11_n771(x)
+ end
+end
+
+def fun_l10_n141(x)
+ if (x < 1)
+ fun_l11_n125(x)
+ else
+ fun_l11_n118(x)
+ end
+end
+
+def fun_l10_n142(x)
+ if (x < 1)
+ fun_l11_n993(x)
+ else
+ fun_l11_n178(x)
+ end
+end
+
+def fun_l10_n143(x)
+ if (x < 1)
+ fun_l11_n223(x)
+ else
+ fun_l11_n509(x)
+ end
+end
+
+def fun_l10_n144(x)
+ if (x < 1)
+ fun_l11_n62(x)
+ else
+ fun_l11_n455(x)
+ end
+end
+
+def fun_l10_n145(x)
+ if (x < 1)
+ fun_l11_n155(x)
+ else
+ fun_l11_n486(x)
+ end
+end
+
+def fun_l10_n146(x)
+ if (x < 1)
+ fun_l11_n414(x)
+ else
+ fun_l11_n384(x)
+ end
+end
+
+def fun_l10_n147(x)
+ if (x < 1)
+ fun_l11_n840(x)
+ else
+ fun_l11_n287(x)
+ end
+end
+
+def fun_l10_n148(x)
+ if (x < 1)
+ fun_l11_n605(x)
+ else
+ fun_l11_n283(x)
+ end
+end
+
+def fun_l10_n149(x)
+ if (x < 1)
+ fun_l11_n101(x)
+ else
+ fun_l11_n710(x)
+ end
+end
+
+def fun_l10_n150(x)
+ if (x < 1)
+ fun_l11_n51(x)
+ else
+ fun_l11_n304(x)
+ end
+end
+
+def fun_l10_n151(x)
+ if (x < 1)
+ fun_l11_n501(x)
+ else
+ fun_l11_n789(x)
+ end
+end
+
+def fun_l10_n152(x)
+ if (x < 1)
+ fun_l11_n265(x)
+ else
+ fun_l11_n304(x)
+ end
+end
+
+def fun_l10_n153(x)
+ if (x < 1)
+ fun_l11_n500(x)
+ else
+ fun_l11_n32(x)
+ end
+end
+
+def fun_l10_n154(x)
+ if (x < 1)
+ fun_l11_n464(x)
+ else
+ fun_l11_n212(x)
+ end
+end
+
+def fun_l10_n155(x)
+ if (x < 1)
+ fun_l11_n729(x)
+ else
+ fun_l11_n805(x)
+ end
+end
+
+def fun_l10_n156(x)
+ if (x < 1)
+ fun_l11_n225(x)
+ else
+ fun_l11_n241(x)
+ end
+end
+
+def fun_l10_n157(x)
+ if (x < 1)
+ fun_l11_n600(x)
+ else
+ fun_l11_n424(x)
+ end
+end
+
+def fun_l10_n158(x)
+ if (x < 1)
+ fun_l11_n684(x)
+ else
+ fun_l11_n898(x)
+ end
+end
+
+def fun_l10_n159(x)
+ if (x < 1)
+ fun_l11_n354(x)
+ else
+ fun_l11_n909(x)
+ end
+end
+
+def fun_l10_n160(x)
+ if (x < 1)
+ fun_l11_n879(x)
+ else
+ fun_l11_n917(x)
+ end
+end
+
+def fun_l10_n161(x)
+ if (x < 1)
+ fun_l11_n547(x)
+ else
+ fun_l11_n333(x)
+ end
+end
+
+def fun_l10_n162(x)
+ if (x < 1)
+ fun_l11_n769(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n163(x)
+ if (x < 1)
+ fun_l11_n292(x)
+ else
+ fun_l11_n526(x)
+ end
+end
+
+def fun_l10_n164(x)
+ if (x < 1)
+ fun_l11_n355(x)
+ else
+ fun_l11_n783(x)
+ end
+end
+
+def fun_l10_n165(x)
+ if (x < 1)
+ fun_l11_n413(x)
+ else
+ fun_l11_n570(x)
+ end
+end
+
+def fun_l10_n166(x)
+ if (x < 1)
+ fun_l11_n535(x)
+ else
+ fun_l11_n953(x)
+ end
+end
+
+def fun_l10_n167(x)
+ if (x < 1)
+ fun_l11_n661(x)
+ else
+ fun_l11_n178(x)
+ end
+end
+
+def fun_l10_n168(x)
+ if (x < 1)
+ fun_l11_n749(x)
+ else
+ fun_l11_n853(x)
+ end
+end
+
+def fun_l10_n169(x)
+ if (x < 1)
+ fun_l11_n208(x)
+ else
+ fun_l11_n378(x)
+ end
+end
+
+def fun_l10_n170(x)
+ if (x < 1)
+ fun_l11_n385(x)
+ else
+ fun_l11_n811(x)
+ end
+end
+
+def fun_l10_n171(x)
+ if (x < 1)
+ fun_l11_n960(x)
+ else
+ fun_l11_n631(x)
+ end
+end
+
+def fun_l10_n172(x)
+ if (x < 1)
+ fun_l11_n104(x)
+ else
+ fun_l11_n667(x)
+ end
+end
+
+def fun_l10_n173(x)
+ if (x < 1)
+ fun_l11_n532(x)
+ else
+ fun_l11_n169(x)
+ end
+end
+
+def fun_l10_n174(x)
+ if (x < 1)
+ fun_l11_n794(x)
+ else
+ fun_l11_n761(x)
+ end
+end
+
+def fun_l10_n175(x)
+ if (x < 1)
+ fun_l11_n306(x)
+ else
+ fun_l11_n369(x)
+ end
+end
+
+def fun_l10_n176(x)
+ if (x < 1)
+ fun_l11_n693(x)
+ else
+ fun_l11_n254(x)
+ end
+end
+
+def fun_l10_n177(x)
+ if (x < 1)
+ fun_l11_n927(x)
+ else
+ fun_l11_n194(x)
+ end
+end
+
+def fun_l10_n178(x)
+ if (x < 1)
+ fun_l11_n197(x)
+ else
+ fun_l11_n136(x)
+ end
+end
+
+def fun_l10_n179(x)
+ if (x < 1)
+ fun_l11_n482(x)
+ else
+ fun_l11_n182(x)
+ end
+end
+
+def fun_l10_n180(x)
+ if (x < 1)
+ fun_l11_n20(x)
+ else
+ fun_l11_n978(x)
+ end
+end
+
+def fun_l10_n181(x)
+ if (x < 1)
+ fun_l11_n101(x)
+ else
+ fun_l11_n92(x)
+ end
+end
+
+def fun_l10_n182(x)
+ if (x < 1)
+ fun_l11_n179(x)
+ else
+ fun_l11_n634(x)
+ end
+end
+
+def fun_l10_n183(x)
+ if (x < 1)
+ fun_l11_n221(x)
+ else
+ fun_l11_n275(x)
+ end
+end
+
+def fun_l10_n184(x)
+ if (x < 1)
+ fun_l11_n826(x)
+ else
+ fun_l11_n630(x)
+ end
+end
+
+def fun_l10_n185(x)
+ if (x < 1)
+ fun_l11_n706(x)
+ else
+ fun_l11_n30(x)
+ end
+end
+
+def fun_l10_n186(x)
+ if (x < 1)
+ fun_l11_n491(x)
+ else
+ fun_l11_n182(x)
+ end
+end
+
+def fun_l10_n187(x)
+ if (x < 1)
+ fun_l11_n404(x)
+ else
+ fun_l11_n812(x)
+ end
+end
+
+def fun_l10_n188(x)
+ if (x < 1)
+ fun_l11_n41(x)
+ else
+ fun_l11_n39(x)
+ end
+end
+
+def fun_l10_n189(x)
+ if (x < 1)
+ fun_l11_n620(x)
+ else
+ fun_l11_n659(x)
+ end
+end
+
+def fun_l10_n190(x)
+ if (x < 1)
+ fun_l11_n717(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n191(x)
+ if (x < 1)
+ fun_l11_n328(x)
+ else
+ fun_l11_n223(x)
+ end
+end
+
+def fun_l10_n192(x)
+ if (x < 1)
+ fun_l11_n280(x)
+ else
+ fun_l11_n360(x)
+ end
+end
+
+def fun_l10_n193(x)
+ if (x < 1)
+ fun_l11_n798(x)
+ else
+ fun_l11_n303(x)
+ end
+end
+
+def fun_l10_n194(x)
+ if (x < 1)
+ fun_l11_n617(x)
+ else
+ fun_l11_n207(x)
+ end
+end
+
+def fun_l10_n195(x)
+ if (x < 1)
+ fun_l11_n918(x)
+ else
+ fun_l11_n398(x)
+ end
+end
+
+def fun_l10_n196(x)
+ if (x < 1)
+ fun_l11_n998(x)
+ else
+ fun_l11_n31(x)
+ end
+end
+
+def fun_l10_n197(x)
+ if (x < 1)
+ fun_l11_n740(x)
+ else
+ fun_l11_n220(x)
+ end
+end
+
+def fun_l10_n198(x)
+ if (x < 1)
+ fun_l11_n847(x)
+ else
+ fun_l11_n915(x)
+ end
+end
+
+def fun_l10_n199(x)
+ if (x < 1)
+ fun_l11_n946(x)
+ else
+ fun_l11_n300(x)
+ end
+end
+
+def fun_l10_n200(x)
+ if (x < 1)
+ fun_l11_n494(x)
+ else
+ fun_l11_n316(x)
+ end
+end
+
+def fun_l10_n201(x)
+ if (x < 1)
+ fun_l11_n871(x)
+ else
+ fun_l11_n310(x)
+ end
+end
+
+def fun_l10_n202(x)
+ if (x < 1)
+ fun_l11_n660(x)
+ else
+ fun_l11_n538(x)
+ end
+end
+
+def fun_l10_n203(x)
+ if (x < 1)
+ fun_l11_n478(x)
+ else
+ fun_l11_n618(x)
+ end
+end
+
+def fun_l10_n204(x)
+ if (x < 1)
+ fun_l11_n134(x)
+ else
+ fun_l11_n224(x)
+ end
+end
+
+def fun_l10_n205(x)
+ if (x < 1)
+ fun_l11_n128(x)
+ else
+ fun_l11_n279(x)
+ end
+end
+
+def fun_l10_n206(x)
+ if (x < 1)
+ fun_l11_n718(x)
+ else
+ fun_l11_n514(x)
+ end
+end
+
+def fun_l10_n207(x)
+ if (x < 1)
+ fun_l11_n466(x)
+ else
+ fun_l11_n979(x)
+ end
+end
+
+def fun_l10_n208(x)
+ if (x < 1)
+ fun_l11_n990(x)
+ else
+ fun_l11_n881(x)
+ end
+end
+
+def fun_l10_n209(x)
+ if (x < 1)
+ fun_l11_n860(x)
+ else
+ fun_l11_n995(x)
+ end
+end
+
+def fun_l10_n210(x)
+ if (x < 1)
+ fun_l11_n269(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n211(x)
+ if (x < 1)
+ fun_l11_n155(x)
+ else
+ fun_l11_n97(x)
+ end
+end
+
+def fun_l10_n212(x)
+ if (x < 1)
+ fun_l11_n377(x)
+ else
+ fun_l11_n749(x)
+ end
+end
+
+def fun_l10_n213(x)
+ if (x < 1)
+ fun_l11_n647(x)
+ else
+ fun_l11_n276(x)
+ end
+end
+
+def fun_l10_n214(x)
+ if (x < 1)
+ fun_l11_n290(x)
+ else
+ fun_l11_n325(x)
+ end
+end
+
+def fun_l10_n215(x)
+ if (x < 1)
+ fun_l11_n445(x)
+ else
+ fun_l11_n538(x)
+ end
+end
+
+def fun_l10_n216(x)
+ if (x < 1)
+ fun_l11_n433(x)
+ else
+ fun_l11_n937(x)
+ end
+end
+
+def fun_l10_n217(x)
+ if (x < 1)
+ fun_l11_n288(x)
+ else
+ fun_l11_n897(x)
+ end
+end
+
+def fun_l10_n218(x)
+ if (x < 1)
+ fun_l11_n386(x)
+ else
+ fun_l11_n545(x)
+ end
+end
+
+def fun_l10_n219(x)
+ if (x < 1)
+ fun_l11_n678(x)
+ else
+ fun_l11_n433(x)
+ end
+end
+
+def fun_l10_n220(x)
+ if (x < 1)
+ fun_l11_n203(x)
+ else
+ fun_l11_n163(x)
+ end
+end
+
+def fun_l10_n221(x)
+ if (x < 1)
+ fun_l11_n134(x)
+ else
+ fun_l11_n545(x)
+ end
+end
+
+def fun_l10_n222(x)
+ if (x < 1)
+ fun_l11_n556(x)
+ else
+ fun_l11_n537(x)
+ end
+end
+
+def fun_l10_n223(x)
+ if (x < 1)
+ fun_l11_n743(x)
+ else
+ fun_l11_n88(x)
+ end
+end
+
+def fun_l10_n224(x)
+ if (x < 1)
+ fun_l11_n678(x)
+ else
+ fun_l11_n643(x)
+ end
+end
+
+def fun_l10_n225(x)
+ if (x < 1)
+ fun_l11_n13(x)
+ else
+ fun_l11_n219(x)
+ end
+end
+
+def fun_l10_n226(x)
+ if (x < 1)
+ fun_l11_n454(x)
+ else
+ fun_l11_n691(x)
+ end
+end
+
+def fun_l10_n227(x)
+ if (x < 1)
+ fun_l11_n117(x)
+ else
+ fun_l11_n433(x)
+ end
+end
+
+def fun_l10_n228(x)
+ if (x < 1)
+ fun_l11_n559(x)
+ else
+ fun_l11_n884(x)
+ end
+end
+
+def fun_l10_n229(x)
+ if (x < 1)
+ fun_l11_n58(x)
+ else
+ fun_l11_n620(x)
+ end
+end
+
+def fun_l10_n230(x)
+ if (x < 1)
+ fun_l11_n688(x)
+ else
+ fun_l11_n76(x)
+ end
+end
+
+def fun_l10_n231(x)
+ if (x < 1)
+ fun_l11_n726(x)
+ else
+ fun_l11_n644(x)
+ end
+end
+
+def fun_l10_n232(x)
+ if (x < 1)
+ fun_l11_n918(x)
+ else
+ fun_l11_n0(x)
+ end
+end
+
+def fun_l10_n233(x)
+ if (x < 1)
+ fun_l11_n761(x)
+ else
+ fun_l11_n487(x)
+ end
+end
+
+def fun_l10_n234(x)
+ if (x < 1)
+ fun_l11_n657(x)
+ else
+ fun_l11_n107(x)
+ end
+end
+
+def fun_l10_n235(x)
+ if (x < 1)
+ fun_l11_n897(x)
+ else
+ fun_l11_n881(x)
+ end
+end
+
+def fun_l10_n236(x)
+ if (x < 1)
+ fun_l11_n851(x)
+ else
+ fun_l11_n593(x)
+ end
+end
+
+def fun_l10_n237(x)
+ if (x < 1)
+ fun_l11_n319(x)
+ else
+ fun_l11_n983(x)
+ end
+end
+
+def fun_l10_n238(x)
+ if (x < 1)
+ fun_l11_n648(x)
+ else
+ fun_l11_n870(x)
+ end
+end
+
+def fun_l10_n239(x)
+ if (x < 1)
+ fun_l11_n195(x)
+ else
+ fun_l11_n378(x)
+ end
+end
+
+def fun_l10_n240(x)
+ if (x < 1)
+ fun_l11_n398(x)
+ else
+ fun_l11_n284(x)
+ end
+end
+
+def fun_l10_n241(x)
+ if (x < 1)
+ fun_l11_n118(x)
+ else
+ fun_l11_n417(x)
+ end
+end
+
+def fun_l10_n242(x)
+ if (x < 1)
+ fun_l11_n220(x)
+ else
+ fun_l11_n445(x)
+ end
+end
+
+def fun_l10_n243(x)
+ if (x < 1)
+ fun_l11_n783(x)
+ else
+ fun_l11_n989(x)
+ end
+end
+
+def fun_l10_n244(x)
+ if (x < 1)
+ fun_l11_n229(x)
+ else
+ fun_l11_n439(x)
+ end
+end
+
+def fun_l10_n245(x)
+ if (x < 1)
+ fun_l11_n78(x)
+ else
+ fun_l11_n272(x)
+ end
+end
+
+def fun_l10_n246(x)
+ if (x < 1)
+ fun_l11_n481(x)
+ else
+ fun_l11_n499(x)
+ end
+end
+
+def fun_l10_n247(x)
+ if (x < 1)
+ fun_l11_n213(x)
+ else
+ fun_l11_n471(x)
+ end
+end
+
+def fun_l10_n248(x)
+ if (x < 1)
+ fun_l11_n45(x)
+ else
+ fun_l11_n919(x)
+ end
+end
+
+def fun_l10_n249(x)
+ if (x < 1)
+ fun_l11_n13(x)
+ else
+ fun_l11_n526(x)
+ end
+end
+
+def fun_l10_n250(x)
+ if (x < 1)
+ fun_l11_n997(x)
+ else
+ fun_l11_n112(x)
+ end
+end
+
+def fun_l10_n251(x)
+ if (x < 1)
+ fun_l11_n662(x)
+ else
+ fun_l11_n950(x)
+ end
+end
+
+def fun_l10_n252(x)
+ if (x < 1)
+ fun_l11_n272(x)
+ else
+ fun_l11_n345(x)
+ end
+end
+
+def fun_l10_n253(x)
+ if (x < 1)
+ fun_l11_n28(x)
+ else
+ fun_l11_n24(x)
+ end
+end
+
+def fun_l10_n254(x)
+ if (x < 1)
+ fun_l11_n326(x)
+ else
+ fun_l11_n907(x)
+ end
+end
+
+def fun_l10_n255(x)
+ if (x < 1)
+ fun_l11_n612(x)
+ else
+ fun_l11_n790(x)
+ end
+end
+
+def fun_l10_n256(x)
+ if (x < 1)
+ fun_l11_n50(x)
+ else
+ fun_l11_n16(x)
+ end
+end
+
+def fun_l10_n257(x)
+ if (x < 1)
+ fun_l11_n350(x)
+ else
+ fun_l11_n151(x)
+ end
+end
+
+def fun_l10_n258(x)
+ if (x < 1)
+ fun_l11_n290(x)
+ else
+ fun_l11_n113(x)
+ end
+end
+
+def fun_l10_n259(x)
+ if (x < 1)
+ fun_l11_n751(x)
+ else
+ fun_l11_n16(x)
+ end
+end
+
+def fun_l10_n260(x)
+ if (x < 1)
+ fun_l11_n337(x)
+ else
+ fun_l11_n516(x)
+ end
+end
+
+def fun_l10_n261(x)
+ if (x < 1)
+ fun_l11_n530(x)
+ else
+ fun_l11_n19(x)
+ end
+end
+
+def fun_l10_n262(x)
+ if (x < 1)
+ fun_l11_n977(x)
+ else
+ fun_l11_n529(x)
+ end
+end
+
+def fun_l10_n263(x)
+ if (x < 1)
+ fun_l11_n769(x)
+ else
+ fun_l11_n723(x)
+ end
+end
+
+def fun_l10_n264(x)
+ if (x < 1)
+ fun_l11_n673(x)
+ else
+ fun_l11_n771(x)
+ end
+end
+
+def fun_l10_n265(x)
+ if (x < 1)
+ fun_l11_n28(x)
+ else
+ fun_l11_n427(x)
+ end
+end
+
+def fun_l10_n266(x)
+ if (x < 1)
+ fun_l11_n92(x)
+ else
+ fun_l11_n590(x)
+ end
+end
+
+def fun_l10_n267(x)
+ if (x < 1)
+ fun_l11_n762(x)
+ else
+ fun_l11_n352(x)
+ end
+end
+
+def fun_l10_n268(x)
+ if (x < 1)
+ fun_l11_n988(x)
+ else
+ fun_l11_n126(x)
+ end
+end
+
+def fun_l10_n269(x)
+ if (x < 1)
+ fun_l11_n92(x)
+ else
+ fun_l11_n455(x)
+ end
+end
+
+def fun_l10_n270(x)
+ if (x < 1)
+ fun_l11_n233(x)
+ else
+ fun_l11_n404(x)
+ end
+end
+
+def fun_l10_n271(x)
+ if (x < 1)
+ fun_l11_n122(x)
+ else
+ fun_l11_n245(x)
+ end
+end
+
+def fun_l10_n272(x)
+ if (x < 1)
+ fun_l11_n277(x)
+ else
+ fun_l11_n969(x)
+ end
+end
+
+def fun_l10_n273(x)
+ if (x < 1)
+ fun_l11_n848(x)
+ else
+ fun_l11_n56(x)
+ end
+end
+
+def fun_l10_n274(x)
+ if (x < 1)
+ fun_l11_n640(x)
+ else
+ fun_l11_n632(x)
+ end
+end
+
+def fun_l10_n275(x)
+ if (x < 1)
+ fun_l11_n38(x)
+ else
+ fun_l11_n816(x)
+ end
+end
+
+def fun_l10_n276(x)
+ if (x < 1)
+ fun_l11_n706(x)
+ else
+ fun_l11_n126(x)
+ end
+end
+
+def fun_l10_n277(x)
+ if (x < 1)
+ fun_l11_n710(x)
+ else
+ fun_l11_n128(x)
+ end
+end
+
+def fun_l10_n278(x)
+ if (x < 1)
+ fun_l11_n175(x)
+ else
+ fun_l11_n954(x)
+ end
+end
+
+def fun_l10_n279(x)
+ if (x < 1)
+ fun_l11_n379(x)
+ else
+ fun_l11_n58(x)
+ end
+end
+
+def fun_l10_n280(x)
+ if (x < 1)
+ fun_l11_n926(x)
+ else
+ fun_l11_n287(x)
+ end
+end
+
+def fun_l10_n281(x)
+ if (x < 1)
+ fun_l11_n981(x)
+ else
+ fun_l11_n921(x)
+ end
+end
+
+def fun_l10_n282(x)
+ if (x < 1)
+ fun_l11_n222(x)
+ else
+ fun_l11_n954(x)
+ end
+end
+
+def fun_l10_n283(x)
+ if (x < 1)
+ fun_l11_n295(x)
+ else
+ fun_l11_n575(x)
+ end
+end
+
+def fun_l10_n284(x)
+ if (x < 1)
+ fun_l11_n554(x)
+ else
+ fun_l11_n559(x)
+ end
+end
+
+def fun_l10_n285(x)
+ if (x < 1)
+ fun_l11_n476(x)
+ else
+ fun_l11_n487(x)
+ end
+end
+
+def fun_l10_n286(x)
+ if (x < 1)
+ fun_l11_n102(x)
+ else
+ fun_l11_n928(x)
+ end
+end
+
+def fun_l10_n287(x)
+ if (x < 1)
+ fun_l11_n949(x)
+ else
+ fun_l11_n900(x)
+ end
+end
+
+def fun_l10_n288(x)
+ if (x < 1)
+ fun_l11_n717(x)
+ else
+ fun_l11_n762(x)
+ end
+end
+
+def fun_l10_n289(x)
+ if (x < 1)
+ fun_l11_n304(x)
+ else
+ fun_l11_n572(x)
+ end
+end
+
+def fun_l10_n290(x)
+ if (x < 1)
+ fun_l11_n748(x)
+ else
+ fun_l11_n791(x)
+ end
+end
+
+def fun_l10_n291(x)
+ if (x < 1)
+ fun_l11_n557(x)
+ else
+ fun_l11_n79(x)
+ end
+end
+
+def fun_l10_n292(x)
+ if (x < 1)
+ fun_l11_n74(x)
+ else
+ fun_l11_n931(x)
+ end
+end
+
+def fun_l10_n293(x)
+ if (x < 1)
+ fun_l11_n31(x)
+ else
+ fun_l11_n791(x)
+ end
+end
+
+def fun_l10_n294(x)
+ if (x < 1)
+ fun_l11_n29(x)
+ else
+ fun_l11_n377(x)
+ end
+end
+
+def fun_l10_n295(x)
+ if (x < 1)
+ fun_l11_n509(x)
+ else
+ fun_l11_n900(x)
+ end
+end
+
+def fun_l10_n296(x)
+ if (x < 1)
+ fun_l11_n594(x)
+ else
+ fun_l11_n835(x)
+ end
+end
+
+def fun_l10_n297(x)
+ if (x < 1)
+ fun_l11_n943(x)
+ else
+ fun_l11_n621(x)
+ end
+end
+
+def fun_l10_n298(x)
+ if (x < 1)
+ fun_l11_n860(x)
+ else
+ fun_l11_n403(x)
+ end
+end
+
+def fun_l10_n299(x)
+ if (x < 1)
+ fun_l11_n676(x)
+ else
+ fun_l11_n478(x)
+ end
+end
+
+def fun_l10_n300(x)
+ if (x < 1)
+ fun_l11_n513(x)
+ else
+ fun_l11_n661(x)
+ end
+end
+
+def fun_l10_n301(x)
+ if (x < 1)
+ fun_l11_n513(x)
+ else
+ fun_l11_n30(x)
+ end
+end
+
+def fun_l10_n302(x)
+ if (x < 1)
+ fun_l11_n763(x)
+ else
+ fun_l11_n823(x)
+ end
+end
+
+def fun_l10_n303(x)
+ if (x < 1)
+ fun_l11_n469(x)
+ else
+ fun_l11_n250(x)
+ end
+end
+
+def fun_l10_n304(x)
+ if (x < 1)
+ fun_l11_n637(x)
+ else
+ fun_l11_n478(x)
+ end
+end
+
+def fun_l10_n305(x)
+ if (x < 1)
+ fun_l11_n825(x)
+ else
+ fun_l11_n258(x)
+ end
+end
+
+def fun_l10_n306(x)
+ if (x < 1)
+ fun_l11_n264(x)
+ else
+ fun_l11_n698(x)
+ end
+end
+
+def fun_l10_n307(x)
+ if (x < 1)
+ fun_l11_n426(x)
+ else
+ fun_l11_n490(x)
+ end
+end
+
+def fun_l10_n308(x)
+ if (x < 1)
+ fun_l11_n157(x)
+ else
+ fun_l11_n407(x)
+ end
+end
+
+def fun_l10_n309(x)
+ if (x < 1)
+ fun_l11_n68(x)
+ else
+ fun_l11_n424(x)
+ end
+end
+
+def fun_l10_n310(x)
+ if (x < 1)
+ fun_l11_n844(x)
+ else
+ fun_l11_n955(x)
+ end
+end
+
+def fun_l10_n311(x)
+ if (x < 1)
+ fun_l11_n316(x)
+ else
+ fun_l11_n27(x)
+ end
+end
+
+def fun_l10_n312(x)
+ if (x < 1)
+ fun_l11_n771(x)
+ else
+ fun_l11_n604(x)
+ end
+end
+
+def fun_l10_n313(x)
+ if (x < 1)
+ fun_l11_n436(x)
+ else
+ fun_l11_n714(x)
+ end
+end
+
+def fun_l10_n314(x)
+ if (x < 1)
+ fun_l11_n791(x)
+ else
+ fun_l11_n889(x)
+ end
+end
+
+def fun_l10_n315(x)
+ if (x < 1)
+ fun_l11_n621(x)
+ else
+ fun_l11_n694(x)
+ end
+end
+
+def fun_l10_n316(x)
+ if (x < 1)
+ fun_l11_n403(x)
+ else
+ fun_l11_n625(x)
+ end
+end
+
+def fun_l10_n317(x)
+ if (x < 1)
+ fun_l11_n532(x)
+ else
+ fun_l11_n920(x)
+ end
+end
+
+def fun_l10_n318(x)
+ if (x < 1)
+ fun_l11_n895(x)
+ else
+ fun_l11_n781(x)
+ end
+end
+
+def fun_l10_n319(x)
+ if (x < 1)
+ fun_l11_n109(x)
+ else
+ fun_l11_n254(x)
+ end
+end
+
+def fun_l10_n320(x)
+ if (x < 1)
+ fun_l11_n842(x)
+ else
+ fun_l11_n879(x)
+ end
+end
+
+def fun_l10_n321(x)
+ if (x < 1)
+ fun_l11_n655(x)
+ else
+ fun_l11_n518(x)
+ end
+end
+
+def fun_l10_n322(x)
+ if (x < 1)
+ fun_l11_n727(x)
+ else
+ fun_l11_n14(x)
+ end
+end
+
+def fun_l10_n323(x)
+ if (x < 1)
+ fun_l11_n808(x)
+ else
+ fun_l11_n128(x)
+ end
+end
+
+def fun_l10_n324(x)
+ if (x < 1)
+ fun_l11_n412(x)
+ else
+ fun_l11_n940(x)
+ end
+end
+
+def fun_l10_n325(x)
+ if (x < 1)
+ fun_l11_n944(x)
+ else
+ fun_l11_n915(x)
+ end
+end
+
+def fun_l10_n326(x)
+ if (x < 1)
+ fun_l11_n120(x)
+ else
+ fun_l11_n572(x)
+ end
+end
+
+def fun_l10_n327(x)
+ if (x < 1)
+ fun_l11_n444(x)
+ else
+ fun_l11_n793(x)
+ end
+end
+
+def fun_l10_n328(x)
+ if (x < 1)
+ fun_l11_n892(x)
+ else
+ fun_l11_n475(x)
+ end
+end
+
+def fun_l10_n329(x)
+ if (x < 1)
+ fun_l11_n919(x)
+ else
+ fun_l11_n183(x)
+ end
+end
+
+def fun_l10_n330(x)
+ if (x < 1)
+ fun_l11_n80(x)
+ else
+ fun_l11_n357(x)
+ end
+end
+
+def fun_l10_n331(x)
+ if (x < 1)
+ fun_l11_n340(x)
+ else
+ fun_l11_n349(x)
+ end
+end
+
+def fun_l10_n332(x)
+ if (x < 1)
+ fun_l11_n579(x)
+ else
+ fun_l11_n845(x)
+ end
+end
+
+def fun_l10_n333(x)
+ if (x < 1)
+ fun_l11_n169(x)
+ else
+ fun_l11_n583(x)
+ end
+end
+
+def fun_l10_n334(x)
+ if (x < 1)
+ fun_l11_n544(x)
+ else
+ fun_l11_n462(x)
+ end
+end
+
+def fun_l10_n335(x)
+ if (x < 1)
+ fun_l11_n51(x)
+ else
+ fun_l11_n635(x)
+ end
+end
+
+def fun_l10_n336(x)
+ if (x < 1)
+ fun_l11_n965(x)
+ else
+ fun_l11_n538(x)
+ end
+end
+
+def fun_l10_n337(x)
+ if (x < 1)
+ fun_l11_n930(x)
+ else
+ fun_l11_n169(x)
+ end
+end
+
+def fun_l10_n338(x)
+ if (x < 1)
+ fun_l11_n732(x)
+ else
+ fun_l11_n574(x)
+ end
+end
+
+def fun_l10_n339(x)
+ if (x < 1)
+ fun_l11_n51(x)
+ else
+ fun_l11_n141(x)
+ end
+end
+
+def fun_l10_n340(x)
+ if (x < 1)
+ fun_l11_n149(x)
+ else
+ fun_l11_n346(x)
+ end
+end
+
+def fun_l10_n341(x)
+ if (x < 1)
+ fun_l11_n163(x)
+ else
+ fun_l11_n224(x)
+ end
+end
+
+def fun_l10_n342(x)
+ if (x < 1)
+ fun_l11_n175(x)
+ else
+ fun_l11_n40(x)
+ end
+end
+
+def fun_l10_n343(x)
+ if (x < 1)
+ fun_l11_n156(x)
+ else
+ fun_l11_n639(x)
+ end
+end
+
+def fun_l10_n344(x)
+ if (x < 1)
+ fun_l11_n934(x)
+ else
+ fun_l11_n85(x)
+ end
+end
+
+def fun_l10_n345(x)
+ if (x < 1)
+ fun_l11_n182(x)
+ else
+ fun_l11_n190(x)
+ end
+end
+
+def fun_l10_n346(x)
+ if (x < 1)
+ fun_l11_n879(x)
+ else
+ fun_l11_n702(x)
+ end
+end
+
+def fun_l10_n347(x)
+ if (x < 1)
+ fun_l11_n540(x)
+ else
+ fun_l11_n689(x)
+ end
+end
+
+def fun_l10_n348(x)
+ if (x < 1)
+ fun_l11_n945(x)
+ else
+ fun_l11_n39(x)
+ end
+end
+
+def fun_l10_n349(x)
+ if (x < 1)
+ fun_l11_n683(x)
+ else
+ fun_l11_n688(x)
+ end
+end
+
+def fun_l10_n350(x)
+ if (x < 1)
+ fun_l11_n750(x)
+ else
+ fun_l11_n577(x)
+ end
+end
+
+def fun_l10_n351(x)
+ if (x < 1)
+ fun_l11_n74(x)
+ else
+ fun_l11_n672(x)
+ end
+end
+
+def fun_l10_n352(x)
+ if (x < 1)
+ fun_l11_n252(x)
+ else
+ fun_l11_n766(x)
+ end
+end
+
+def fun_l10_n353(x)
+ if (x < 1)
+ fun_l11_n702(x)
+ else
+ fun_l11_n516(x)
+ end
+end
+
+def fun_l10_n354(x)
+ if (x < 1)
+ fun_l11_n19(x)
+ else
+ fun_l11_n290(x)
+ end
+end
+
+def fun_l10_n355(x)
+ if (x < 1)
+ fun_l11_n70(x)
+ else
+ fun_l11_n553(x)
+ end
+end
+
+def fun_l10_n356(x)
+ if (x < 1)
+ fun_l11_n654(x)
+ else
+ fun_l11_n108(x)
+ end
+end
+
+def fun_l10_n357(x)
+ if (x < 1)
+ fun_l11_n820(x)
+ else
+ fun_l11_n320(x)
+ end
+end
+
+def fun_l10_n358(x)
+ if (x < 1)
+ fun_l11_n417(x)
+ else
+ fun_l11_n290(x)
+ end
+end
+
+def fun_l10_n359(x)
+ if (x < 1)
+ fun_l11_n832(x)
+ else
+ fun_l11_n647(x)
+ end
+end
+
+def fun_l10_n360(x)
+ if (x < 1)
+ fun_l11_n625(x)
+ else
+ fun_l11_n723(x)
+ end
+end
+
+def fun_l10_n361(x)
+ if (x < 1)
+ fun_l11_n257(x)
+ else
+ fun_l11_n991(x)
+ end
+end
+
+def fun_l10_n362(x)
+ if (x < 1)
+ fun_l11_n101(x)
+ else
+ fun_l11_n247(x)
+ end
+end
+
+def fun_l10_n363(x)
+ if (x < 1)
+ fun_l11_n484(x)
+ else
+ fun_l11_n953(x)
+ end
+end
+
+def fun_l10_n364(x)
+ if (x < 1)
+ fun_l11_n281(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n365(x)
+ if (x < 1)
+ fun_l11_n425(x)
+ else
+ fun_l11_n772(x)
+ end
+end
+
+def fun_l10_n366(x)
+ if (x < 1)
+ fun_l11_n724(x)
+ else
+ fun_l11_n725(x)
+ end
+end
+
+def fun_l10_n367(x)
+ if (x < 1)
+ fun_l11_n943(x)
+ else
+ fun_l11_n360(x)
+ end
+end
+
+def fun_l10_n368(x)
+ if (x < 1)
+ fun_l11_n874(x)
+ else
+ fun_l11_n698(x)
+ end
+end
+
+def fun_l10_n369(x)
+ if (x < 1)
+ fun_l11_n419(x)
+ else
+ fun_l11_n672(x)
+ end
+end
+
+def fun_l10_n370(x)
+ if (x < 1)
+ fun_l11_n655(x)
+ else
+ fun_l11_n468(x)
+ end
+end
+
+def fun_l10_n371(x)
+ if (x < 1)
+ fun_l11_n577(x)
+ else
+ fun_l11_n402(x)
+ end
+end
+
+def fun_l10_n372(x)
+ if (x < 1)
+ fun_l11_n531(x)
+ else
+ fun_l11_n319(x)
+ end
+end
+
+def fun_l10_n373(x)
+ if (x < 1)
+ fun_l11_n972(x)
+ else
+ fun_l11_n901(x)
+ end
+end
+
+def fun_l10_n374(x)
+ if (x < 1)
+ fun_l11_n59(x)
+ else
+ fun_l11_n12(x)
+ end
+end
+
+def fun_l10_n375(x)
+ if (x < 1)
+ fun_l11_n409(x)
+ else
+ fun_l11_n214(x)
+ end
+end
+
+def fun_l10_n376(x)
+ if (x < 1)
+ fun_l11_n52(x)
+ else
+ fun_l11_n395(x)
+ end
+end
+
+def fun_l10_n377(x)
+ if (x < 1)
+ fun_l11_n594(x)
+ else
+ fun_l11_n434(x)
+ end
+end
+
+def fun_l10_n378(x)
+ if (x < 1)
+ fun_l11_n795(x)
+ else
+ fun_l11_n820(x)
+ end
+end
+
+def fun_l10_n379(x)
+ if (x < 1)
+ fun_l11_n962(x)
+ else
+ fun_l11_n111(x)
+ end
+end
+
+def fun_l10_n380(x)
+ if (x < 1)
+ fun_l11_n762(x)
+ else
+ fun_l11_n678(x)
+ end
+end
+
+def fun_l10_n381(x)
+ if (x < 1)
+ fun_l11_n324(x)
+ else
+ fun_l11_n478(x)
+ end
+end
+
+def fun_l10_n382(x)
+ if (x < 1)
+ fun_l11_n360(x)
+ else
+ fun_l11_n35(x)
+ end
+end
+
+def fun_l10_n383(x)
+ if (x < 1)
+ fun_l11_n710(x)
+ else
+ fun_l11_n898(x)
+ end
+end
+
+def fun_l10_n384(x)
+ if (x < 1)
+ fun_l11_n584(x)
+ else
+ fun_l11_n260(x)
+ end
+end
+
+def fun_l10_n385(x)
+ if (x < 1)
+ fun_l11_n514(x)
+ else
+ fun_l11_n649(x)
+ end
+end
+
+def fun_l10_n386(x)
+ if (x < 1)
+ fun_l11_n426(x)
+ else
+ fun_l11_n391(x)
+ end
+end
+
+def fun_l10_n387(x)
+ if (x < 1)
+ fun_l11_n713(x)
+ else
+ fun_l11_n734(x)
+ end
+end
+
+def fun_l10_n388(x)
+ if (x < 1)
+ fun_l11_n236(x)
+ else
+ fun_l11_n469(x)
+ end
+end
+
+def fun_l10_n389(x)
+ if (x < 1)
+ fun_l11_n267(x)
+ else
+ fun_l11_n965(x)
+ end
+end
+
+def fun_l10_n390(x)
+ if (x < 1)
+ fun_l11_n943(x)
+ else
+ fun_l11_n181(x)
+ end
+end
+
+def fun_l10_n391(x)
+ if (x < 1)
+ fun_l11_n869(x)
+ else
+ fun_l11_n348(x)
+ end
+end
+
+def fun_l10_n392(x)
+ if (x < 1)
+ fun_l11_n144(x)
+ else
+ fun_l11_n801(x)
+ end
+end
+
+def fun_l10_n393(x)
+ if (x < 1)
+ fun_l11_n907(x)
+ else
+ fun_l11_n609(x)
+ end
+end
+
+def fun_l10_n394(x)
+ if (x < 1)
+ fun_l11_n801(x)
+ else
+ fun_l11_n691(x)
+ end
+end
+
+def fun_l10_n395(x)
+ if (x < 1)
+ fun_l11_n629(x)
+ else
+ fun_l11_n924(x)
+ end
+end
+
+def fun_l10_n396(x)
+ if (x < 1)
+ fun_l11_n191(x)
+ else
+ fun_l11_n248(x)
+ end
+end
+
+def fun_l10_n397(x)
+ if (x < 1)
+ fun_l11_n339(x)
+ else
+ fun_l11_n805(x)
+ end
+end
+
+def fun_l10_n398(x)
+ if (x < 1)
+ fun_l11_n798(x)
+ else
+ fun_l11_n154(x)
+ end
+end
+
+def fun_l10_n399(x)
+ if (x < 1)
+ fun_l11_n847(x)
+ else
+ fun_l11_n14(x)
+ end
+end
+
+def fun_l10_n400(x)
+ if (x < 1)
+ fun_l11_n296(x)
+ else
+ fun_l11_n144(x)
+ end
+end
+
+def fun_l10_n401(x)
+ if (x < 1)
+ fun_l11_n853(x)
+ else
+ fun_l11_n156(x)
+ end
+end
+
+def fun_l10_n402(x)
+ if (x < 1)
+ fun_l11_n54(x)
+ else
+ fun_l11_n944(x)
+ end
+end
+
+def fun_l10_n403(x)
+ if (x < 1)
+ fun_l11_n617(x)
+ else
+ fun_l11_n324(x)
+ end
+end
+
+def fun_l10_n404(x)
+ if (x < 1)
+ fun_l11_n962(x)
+ else
+ fun_l11_n139(x)
+ end
+end
+
+def fun_l10_n405(x)
+ if (x < 1)
+ fun_l11_n466(x)
+ else
+ fun_l11_n388(x)
+ end
+end
+
+def fun_l10_n406(x)
+ if (x < 1)
+ fun_l11_n914(x)
+ else
+ fun_l11_n847(x)
+ end
+end
+
+def fun_l10_n407(x)
+ if (x < 1)
+ fun_l11_n741(x)
+ else
+ fun_l11_n757(x)
+ end
+end
+
+def fun_l10_n408(x)
+ if (x < 1)
+ fun_l11_n36(x)
+ else
+ fun_l11_n312(x)
+ end
+end
+
+def fun_l10_n409(x)
+ if (x < 1)
+ fun_l11_n203(x)
+ else
+ fun_l11_n523(x)
+ end
+end
+
+def fun_l10_n410(x)
+ if (x < 1)
+ fun_l11_n187(x)
+ else
+ fun_l11_n291(x)
+ end
+end
+
+def fun_l10_n411(x)
+ if (x < 1)
+ fun_l11_n13(x)
+ else
+ fun_l11_n107(x)
+ end
+end
+
+def fun_l10_n412(x)
+ if (x < 1)
+ fun_l11_n960(x)
+ else
+ fun_l11_n565(x)
+ end
+end
+
+def fun_l10_n413(x)
+ if (x < 1)
+ fun_l11_n549(x)
+ else
+ fun_l11_n885(x)
+ end
+end
+
+def fun_l10_n414(x)
+ if (x < 1)
+ fun_l11_n559(x)
+ else
+ fun_l11_n612(x)
+ end
+end
+
+def fun_l10_n415(x)
+ if (x < 1)
+ fun_l11_n18(x)
+ else
+ fun_l11_n167(x)
+ end
+end
+
+def fun_l10_n416(x)
+ if (x < 1)
+ fun_l11_n125(x)
+ else
+ fun_l11_n206(x)
+ end
+end
+
+def fun_l10_n417(x)
+ if (x < 1)
+ fun_l11_n980(x)
+ else
+ fun_l11_n497(x)
+ end
+end
+
+def fun_l10_n418(x)
+ if (x < 1)
+ fun_l11_n703(x)
+ else
+ fun_l11_n49(x)
+ end
+end
+
+def fun_l10_n419(x)
+ if (x < 1)
+ fun_l11_n690(x)
+ else
+ fun_l11_n63(x)
+ end
+end
+
+def fun_l10_n420(x)
+ if (x < 1)
+ fun_l11_n219(x)
+ else
+ fun_l11_n814(x)
+ end
+end
+
+def fun_l10_n421(x)
+ if (x < 1)
+ fun_l11_n864(x)
+ else
+ fun_l11_n963(x)
+ end
+end
+
+def fun_l10_n422(x)
+ if (x < 1)
+ fun_l11_n672(x)
+ else
+ fun_l11_n87(x)
+ end
+end
+
+def fun_l10_n423(x)
+ if (x < 1)
+ fun_l11_n41(x)
+ else
+ fun_l11_n461(x)
+ end
+end
+
+def fun_l10_n424(x)
+ if (x < 1)
+ fun_l11_n334(x)
+ else
+ fun_l11_n283(x)
+ end
+end
+
+def fun_l10_n425(x)
+ if (x < 1)
+ fun_l11_n369(x)
+ else
+ fun_l11_n269(x)
+ end
+end
+
+def fun_l10_n426(x)
+ if (x < 1)
+ fun_l11_n832(x)
+ else
+ fun_l11_n625(x)
+ end
+end
+
+def fun_l10_n427(x)
+ if (x < 1)
+ fun_l11_n272(x)
+ else
+ fun_l11_n634(x)
+ end
+end
+
+def fun_l10_n428(x)
+ if (x < 1)
+ fun_l11_n122(x)
+ else
+ fun_l11_n53(x)
+ end
+end
+
+def fun_l10_n429(x)
+ if (x < 1)
+ fun_l11_n895(x)
+ else
+ fun_l11_n292(x)
+ end
+end
+
+def fun_l10_n430(x)
+ if (x < 1)
+ fun_l11_n460(x)
+ else
+ fun_l11_n177(x)
+ end
+end
+
+def fun_l10_n431(x)
+ if (x < 1)
+ fun_l11_n238(x)
+ else
+ fun_l11_n938(x)
+ end
+end
+
+def fun_l10_n432(x)
+ if (x < 1)
+ fun_l11_n302(x)
+ else
+ fun_l11_n492(x)
+ end
+end
+
+def fun_l10_n433(x)
+ if (x < 1)
+ fun_l11_n307(x)
+ else
+ fun_l11_n876(x)
+ end
+end
+
+def fun_l10_n434(x)
+ if (x < 1)
+ fun_l11_n64(x)
+ else
+ fun_l11_n892(x)
+ end
+end
+
+def fun_l10_n435(x)
+ if (x < 1)
+ fun_l11_n940(x)
+ else
+ fun_l11_n718(x)
+ end
+end
+
+def fun_l10_n436(x)
+ if (x < 1)
+ fun_l11_n988(x)
+ else
+ fun_l11_n216(x)
+ end
+end
+
+def fun_l10_n437(x)
+ if (x < 1)
+ fun_l11_n282(x)
+ else
+ fun_l11_n168(x)
+ end
+end
+
+def fun_l10_n438(x)
+ if (x < 1)
+ fun_l11_n529(x)
+ else
+ fun_l11_n66(x)
+ end
+end
+
+def fun_l10_n439(x)
+ if (x < 1)
+ fun_l11_n286(x)
+ else
+ fun_l11_n134(x)
+ end
+end
+
+def fun_l10_n440(x)
+ if (x < 1)
+ fun_l11_n454(x)
+ else
+ fun_l11_n873(x)
+ end
+end
+
+def fun_l10_n441(x)
+ if (x < 1)
+ fun_l11_n871(x)
+ else
+ fun_l11_n13(x)
+ end
+end
+
+def fun_l10_n442(x)
+ if (x < 1)
+ fun_l11_n314(x)
+ else
+ fun_l11_n685(x)
+ end
+end
+
+def fun_l10_n443(x)
+ if (x < 1)
+ fun_l11_n752(x)
+ else
+ fun_l11_n162(x)
+ end
+end
+
+def fun_l10_n444(x)
+ if (x < 1)
+ fun_l11_n686(x)
+ else
+ fun_l11_n585(x)
+ end
+end
+
+def fun_l10_n445(x)
+ if (x < 1)
+ fun_l11_n42(x)
+ else
+ fun_l11_n932(x)
+ end
+end
+
+def fun_l10_n446(x)
+ if (x < 1)
+ fun_l11_n433(x)
+ else
+ fun_l11_n241(x)
+ end
+end
+
+def fun_l10_n447(x)
+ if (x < 1)
+ fun_l11_n99(x)
+ else
+ fun_l11_n563(x)
+ end
+end
+
+def fun_l10_n448(x)
+ if (x < 1)
+ fun_l11_n463(x)
+ else
+ fun_l11_n395(x)
+ end
+end
+
+def fun_l10_n449(x)
+ if (x < 1)
+ fun_l11_n393(x)
+ else
+ fun_l11_n151(x)
+ end
+end
+
+def fun_l10_n450(x)
+ if (x < 1)
+ fun_l11_n255(x)
+ else
+ fun_l11_n834(x)
+ end
+end
+
+def fun_l10_n451(x)
+ if (x < 1)
+ fun_l11_n195(x)
+ else
+ fun_l11_n0(x)
+ end
+end
+
+def fun_l10_n452(x)
+ if (x < 1)
+ fun_l11_n372(x)
+ else
+ fun_l11_n228(x)
+ end
+end
+
+def fun_l10_n453(x)
+ if (x < 1)
+ fun_l11_n526(x)
+ else
+ fun_l11_n54(x)
+ end
+end
+
+def fun_l10_n454(x)
+ if (x < 1)
+ fun_l11_n594(x)
+ else
+ fun_l11_n116(x)
+ end
+end
+
+def fun_l10_n455(x)
+ if (x < 1)
+ fun_l11_n25(x)
+ else
+ fun_l11_n930(x)
+ end
+end
+
+def fun_l10_n456(x)
+ if (x < 1)
+ fun_l11_n83(x)
+ else
+ fun_l11_n30(x)
+ end
+end
+
+def fun_l10_n457(x)
+ if (x < 1)
+ fun_l11_n644(x)
+ else
+ fun_l11_n837(x)
+ end
+end
+
+def fun_l10_n458(x)
+ if (x < 1)
+ fun_l11_n311(x)
+ else
+ fun_l11_n86(x)
+ end
+end
+
+def fun_l10_n459(x)
+ if (x < 1)
+ fun_l11_n139(x)
+ else
+ fun_l11_n735(x)
+ end
+end
+
+def fun_l10_n460(x)
+ if (x < 1)
+ fun_l11_n431(x)
+ else
+ fun_l11_n808(x)
+ end
+end
+
+def fun_l10_n461(x)
+ if (x < 1)
+ fun_l11_n488(x)
+ else
+ fun_l11_n439(x)
+ end
+end
+
+def fun_l10_n462(x)
+ if (x < 1)
+ fun_l11_n448(x)
+ else
+ fun_l11_n882(x)
+ end
+end
+
+def fun_l10_n463(x)
+ if (x < 1)
+ fun_l11_n362(x)
+ else
+ fun_l11_n875(x)
+ end
+end
+
+def fun_l10_n464(x)
+ if (x < 1)
+ fun_l11_n88(x)
+ else
+ fun_l11_n842(x)
+ end
+end
+
+def fun_l10_n465(x)
+ if (x < 1)
+ fun_l11_n651(x)
+ else
+ fun_l11_n368(x)
+ end
+end
+
+def fun_l10_n466(x)
+ if (x < 1)
+ fun_l11_n121(x)
+ else
+ fun_l11_n3(x)
+ end
+end
+
+def fun_l10_n467(x)
+ if (x < 1)
+ fun_l11_n654(x)
+ else
+ fun_l11_n260(x)
+ end
+end
+
+def fun_l10_n468(x)
+ if (x < 1)
+ fun_l11_n765(x)
+ else
+ fun_l11_n604(x)
+ end
+end
+
+def fun_l10_n469(x)
+ if (x < 1)
+ fun_l11_n881(x)
+ else
+ fun_l11_n567(x)
+ end
+end
+
+def fun_l10_n470(x)
+ if (x < 1)
+ fun_l11_n41(x)
+ else
+ fun_l11_n92(x)
+ end
+end
+
+def fun_l10_n471(x)
+ if (x < 1)
+ fun_l11_n905(x)
+ else
+ fun_l11_n731(x)
+ end
+end
+
+def fun_l10_n472(x)
+ if (x < 1)
+ fun_l11_n797(x)
+ else
+ fun_l11_n878(x)
+ end
+end
+
+def fun_l10_n473(x)
+ if (x < 1)
+ fun_l11_n487(x)
+ else
+ fun_l11_n951(x)
+ end
+end
+
+def fun_l10_n474(x)
+ if (x < 1)
+ fun_l11_n998(x)
+ else
+ fun_l11_n900(x)
+ end
+end
+
+def fun_l10_n475(x)
+ if (x < 1)
+ fun_l11_n451(x)
+ else
+ fun_l11_n780(x)
+ end
+end
+
+def fun_l10_n476(x)
+ if (x < 1)
+ fun_l11_n427(x)
+ else
+ fun_l11_n760(x)
+ end
+end
+
+def fun_l10_n477(x)
+ if (x < 1)
+ fun_l11_n758(x)
+ else
+ fun_l11_n177(x)
+ end
+end
+
+def fun_l10_n478(x)
+ if (x < 1)
+ fun_l11_n359(x)
+ else
+ fun_l11_n236(x)
+ end
+end
+
+def fun_l10_n479(x)
+ if (x < 1)
+ fun_l11_n70(x)
+ else
+ fun_l11_n49(x)
+ end
+end
+
+def fun_l10_n480(x)
+ if (x < 1)
+ fun_l11_n338(x)
+ else
+ fun_l11_n714(x)
+ end
+end
+
+def fun_l10_n481(x)
+ if (x < 1)
+ fun_l11_n6(x)
+ else
+ fun_l11_n194(x)
+ end
+end
+
+def fun_l10_n482(x)
+ if (x < 1)
+ fun_l11_n801(x)
+ else
+ fun_l11_n591(x)
+ end
+end
+
+def fun_l10_n483(x)
+ if (x < 1)
+ fun_l11_n362(x)
+ else
+ fun_l11_n687(x)
+ end
+end
+
+def fun_l10_n484(x)
+ if (x < 1)
+ fun_l11_n659(x)
+ else
+ fun_l11_n661(x)
+ end
+end
+
+def fun_l10_n485(x)
+ if (x < 1)
+ fun_l11_n903(x)
+ else
+ fun_l11_n419(x)
+ end
+end
+
+def fun_l10_n486(x)
+ if (x < 1)
+ fun_l11_n279(x)
+ else
+ fun_l11_n995(x)
+ end
+end
+
+def fun_l10_n487(x)
+ if (x < 1)
+ fun_l11_n529(x)
+ else
+ fun_l11_n373(x)
+ end
+end
+
+def fun_l10_n488(x)
+ if (x < 1)
+ fun_l11_n198(x)
+ else
+ fun_l11_n899(x)
+ end
+end
+
+def fun_l10_n489(x)
+ if (x < 1)
+ fun_l11_n174(x)
+ else
+ fun_l11_n485(x)
+ end
+end
+
+def fun_l10_n490(x)
+ if (x < 1)
+ fun_l11_n19(x)
+ else
+ fun_l11_n322(x)
+ end
+end
+
+def fun_l10_n491(x)
+ if (x < 1)
+ fun_l11_n0(x)
+ else
+ fun_l11_n855(x)
+ end
+end
+
+def fun_l10_n492(x)
+ if (x < 1)
+ fun_l11_n126(x)
+ else
+ fun_l11_n986(x)
+ end
+end
+
+def fun_l10_n493(x)
+ if (x < 1)
+ fun_l11_n263(x)
+ else
+ fun_l11_n374(x)
+ end
+end
+
+def fun_l10_n494(x)
+ if (x < 1)
+ fun_l11_n21(x)
+ else
+ fun_l11_n749(x)
+ end
+end
+
+def fun_l10_n495(x)
+ if (x < 1)
+ fun_l11_n618(x)
+ else
+ fun_l11_n955(x)
+ end
+end
+
+def fun_l10_n496(x)
+ if (x < 1)
+ fun_l11_n157(x)
+ else
+ fun_l11_n230(x)
+ end
+end
+
+def fun_l10_n497(x)
+ if (x < 1)
+ fun_l11_n387(x)
+ else
+ fun_l11_n841(x)
+ end
+end
+
+def fun_l10_n498(x)
+ if (x < 1)
+ fun_l11_n496(x)
+ else
+ fun_l11_n30(x)
+ end
+end
+
+def fun_l10_n499(x)
+ if (x < 1)
+ fun_l11_n581(x)
+ else
+ fun_l11_n821(x)
+ end
+end
+
+def fun_l10_n500(x)
+ if (x < 1)
+ fun_l11_n202(x)
+ else
+ fun_l11_n26(x)
+ end
+end
+
+def fun_l10_n501(x)
+ if (x < 1)
+ fun_l11_n273(x)
+ else
+ fun_l11_n294(x)
+ end
+end
+
+def fun_l10_n502(x)
+ if (x < 1)
+ fun_l11_n604(x)
+ else
+ fun_l11_n261(x)
+ end
+end
+
+def fun_l10_n503(x)
+ if (x < 1)
+ fun_l11_n632(x)
+ else
+ fun_l11_n340(x)
+ end
+end
+
+def fun_l10_n504(x)
+ if (x < 1)
+ fun_l11_n162(x)
+ else
+ fun_l11_n483(x)
+ end
+end
+
+def fun_l10_n505(x)
+ if (x < 1)
+ fun_l11_n824(x)
+ else
+ fun_l11_n747(x)
+ end
+end
+
+def fun_l10_n506(x)
+ if (x < 1)
+ fun_l11_n575(x)
+ else
+ fun_l11_n932(x)
+ end
+end
+
+def fun_l10_n507(x)
+ if (x < 1)
+ fun_l11_n645(x)
+ else
+ fun_l11_n486(x)
+ end
+end
+
+def fun_l10_n508(x)
+ if (x < 1)
+ fun_l11_n876(x)
+ else
+ fun_l11_n640(x)
+ end
+end
+
+def fun_l10_n509(x)
+ if (x < 1)
+ fun_l11_n280(x)
+ else
+ fun_l11_n116(x)
+ end
+end
+
+def fun_l10_n510(x)
+ if (x < 1)
+ fun_l11_n570(x)
+ else
+ fun_l11_n640(x)
+ end
+end
+
+def fun_l10_n511(x)
+ if (x < 1)
+ fun_l11_n576(x)
+ else
+ fun_l11_n124(x)
+ end
+end
+
+def fun_l10_n512(x)
+ if (x < 1)
+ fun_l11_n328(x)
+ else
+ fun_l11_n880(x)
+ end
+end
+
+def fun_l10_n513(x)
+ if (x < 1)
+ fun_l11_n185(x)
+ else
+ fun_l11_n977(x)
+ end
+end
+
+def fun_l10_n514(x)
+ if (x < 1)
+ fun_l11_n560(x)
+ else
+ fun_l11_n825(x)
+ end
+end
+
+def fun_l10_n515(x)
+ if (x < 1)
+ fun_l11_n28(x)
+ else
+ fun_l11_n908(x)
+ end
+end
+
+def fun_l10_n516(x)
+ if (x < 1)
+ fun_l11_n902(x)
+ else
+ fun_l11_n882(x)
+ end
+end
+
+def fun_l10_n517(x)
+ if (x < 1)
+ fun_l11_n429(x)
+ else
+ fun_l11_n824(x)
+ end
+end
+
+def fun_l10_n518(x)
+ if (x < 1)
+ fun_l11_n706(x)
+ else
+ fun_l11_n149(x)
+ end
+end
+
+def fun_l10_n519(x)
+ if (x < 1)
+ fun_l11_n837(x)
+ else
+ fun_l11_n573(x)
+ end
+end
+
+def fun_l10_n520(x)
+ if (x < 1)
+ fun_l11_n934(x)
+ else
+ fun_l11_n504(x)
+ end
+end
+
+def fun_l10_n521(x)
+ if (x < 1)
+ fun_l11_n254(x)
+ else
+ fun_l11_n551(x)
+ end
+end
+
+def fun_l10_n522(x)
+ if (x < 1)
+ fun_l11_n53(x)
+ else
+ fun_l11_n297(x)
+ end
+end
+
+def fun_l10_n523(x)
+ if (x < 1)
+ fun_l11_n648(x)
+ else
+ fun_l11_n695(x)
+ end
+end
+
+def fun_l10_n524(x)
+ if (x < 1)
+ fun_l11_n737(x)
+ else
+ fun_l11_n636(x)
+ end
+end
+
+def fun_l10_n525(x)
+ if (x < 1)
+ fun_l11_n249(x)
+ else
+ fun_l11_n757(x)
+ end
+end
+
+def fun_l10_n526(x)
+ if (x < 1)
+ fun_l11_n42(x)
+ else
+ fun_l11_n199(x)
+ end
+end
+
+def fun_l10_n527(x)
+ if (x < 1)
+ fun_l11_n783(x)
+ else
+ fun_l11_n856(x)
+ end
+end
+
+def fun_l10_n528(x)
+ if (x < 1)
+ fun_l11_n708(x)
+ else
+ fun_l11_n550(x)
+ end
+end
+
+def fun_l10_n529(x)
+ if (x < 1)
+ fun_l11_n749(x)
+ else
+ fun_l11_n56(x)
+ end
+end
+
+def fun_l10_n530(x)
+ if (x < 1)
+ fun_l11_n838(x)
+ else
+ fun_l11_n57(x)
+ end
+end
+
+def fun_l10_n531(x)
+ if (x < 1)
+ fun_l11_n293(x)
+ else
+ fun_l11_n938(x)
+ end
+end
+
+def fun_l10_n532(x)
+ if (x < 1)
+ fun_l11_n245(x)
+ else
+ fun_l11_n367(x)
+ end
+end
+
+def fun_l10_n533(x)
+ if (x < 1)
+ fun_l11_n255(x)
+ else
+ fun_l11_n234(x)
+ end
+end
+
+def fun_l10_n534(x)
+ if (x < 1)
+ fun_l11_n315(x)
+ else
+ fun_l11_n982(x)
+ end
+end
+
+def fun_l10_n535(x)
+ if (x < 1)
+ fun_l11_n841(x)
+ else
+ fun_l11_n112(x)
+ end
+end
+
+def fun_l10_n536(x)
+ if (x < 1)
+ fun_l11_n481(x)
+ else
+ fun_l11_n622(x)
+ end
+end
+
+def fun_l10_n537(x)
+ if (x < 1)
+ fun_l11_n666(x)
+ else
+ fun_l11_n775(x)
+ end
+end
+
+def fun_l10_n538(x)
+ if (x < 1)
+ fun_l11_n409(x)
+ else
+ fun_l11_n733(x)
+ end
+end
+
+def fun_l10_n539(x)
+ if (x < 1)
+ fun_l11_n633(x)
+ else
+ fun_l11_n122(x)
+ end
+end
+
+def fun_l10_n540(x)
+ if (x < 1)
+ fun_l11_n453(x)
+ else
+ fun_l11_n938(x)
+ end
+end
+
+def fun_l10_n541(x)
+ if (x < 1)
+ fun_l11_n55(x)
+ else
+ fun_l11_n344(x)
+ end
+end
+
+def fun_l10_n542(x)
+ if (x < 1)
+ fun_l11_n167(x)
+ else
+ fun_l11_n908(x)
+ end
+end
+
+def fun_l10_n543(x)
+ if (x < 1)
+ fun_l11_n318(x)
+ else
+ fun_l11_n893(x)
+ end
+end
+
+def fun_l10_n544(x)
+ if (x < 1)
+ fun_l11_n683(x)
+ else
+ fun_l11_n109(x)
+ end
+end
+
+def fun_l10_n545(x)
+ if (x < 1)
+ fun_l11_n728(x)
+ else
+ fun_l11_n432(x)
+ end
+end
+
+def fun_l10_n546(x)
+ if (x < 1)
+ fun_l11_n343(x)
+ else
+ fun_l11_n674(x)
+ end
+end
+
+def fun_l10_n547(x)
+ if (x < 1)
+ fun_l11_n374(x)
+ else
+ fun_l11_n293(x)
+ end
+end
+
+def fun_l10_n548(x)
+ if (x < 1)
+ fun_l11_n661(x)
+ else
+ fun_l11_n619(x)
+ end
+end
+
+def fun_l10_n549(x)
+ if (x < 1)
+ fun_l11_n984(x)
+ else
+ fun_l11_n261(x)
+ end
+end
+
+def fun_l10_n550(x)
+ if (x < 1)
+ fun_l11_n729(x)
+ else
+ fun_l11_n469(x)
+ end
+end
+
+def fun_l10_n551(x)
+ if (x < 1)
+ fun_l11_n829(x)
+ else
+ fun_l11_n30(x)
+ end
+end
+
+def fun_l10_n552(x)
+ if (x < 1)
+ fun_l11_n457(x)
+ else
+ fun_l11_n440(x)
+ end
+end
+
+def fun_l10_n553(x)
+ if (x < 1)
+ fun_l11_n128(x)
+ else
+ fun_l11_n790(x)
+ end
+end
+
+def fun_l10_n554(x)
+ if (x < 1)
+ fun_l11_n135(x)
+ else
+ fun_l11_n118(x)
+ end
+end
+
+def fun_l10_n555(x)
+ if (x < 1)
+ fun_l11_n558(x)
+ else
+ fun_l11_n415(x)
+ end
+end
+
+def fun_l10_n556(x)
+ if (x < 1)
+ fun_l11_n388(x)
+ else
+ fun_l11_n102(x)
+ end
+end
+
+def fun_l10_n557(x)
+ if (x < 1)
+ fun_l11_n575(x)
+ else
+ fun_l11_n877(x)
+ end
+end
+
+def fun_l10_n558(x)
+ if (x < 1)
+ fun_l11_n266(x)
+ else
+ fun_l11_n216(x)
+ end
+end
+
+def fun_l10_n559(x)
+ if (x < 1)
+ fun_l11_n681(x)
+ else
+ fun_l11_n259(x)
+ end
+end
+
+def fun_l10_n560(x)
+ if (x < 1)
+ fun_l11_n922(x)
+ else
+ fun_l11_n828(x)
+ end
+end
+
+def fun_l10_n561(x)
+ if (x < 1)
+ fun_l11_n135(x)
+ else
+ fun_l11_n971(x)
+ end
+end
+
+def fun_l10_n562(x)
+ if (x < 1)
+ fun_l11_n940(x)
+ else
+ fun_l11_n266(x)
+ end
+end
+
+def fun_l10_n563(x)
+ if (x < 1)
+ fun_l11_n291(x)
+ else
+ fun_l11_n587(x)
+ end
+end
+
+def fun_l10_n564(x)
+ if (x < 1)
+ fun_l11_n143(x)
+ else
+ fun_l11_n289(x)
+ end
+end
+
+def fun_l10_n565(x)
+ if (x < 1)
+ fun_l11_n947(x)
+ else
+ fun_l11_n462(x)
+ end
+end
+
+def fun_l10_n566(x)
+ if (x < 1)
+ fun_l11_n307(x)
+ else
+ fun_l11_n904(x)
+ end
+end
+
+def fun_l10_n567(x)
+ if (x < 1)
+ fun_l11_n945(x)
+ else
+ fun_l11_n814(x)
+ end
+end
+
+def fun_l10_n568(x)
+ if (x < 1)
+ fun_l11_n689(x)
+ else
+ fun_l11_n61(x)
+ end
+end
+
+def fun_l10_n569(x)
+ if (x < 1)
+ fun_l11_n446(x)
+ else
+ fun_l11_n305(x)
+ end
+end
+
+def fun_l10_n570(x)
+ if (x < 1)
+ fun_l11_n209(x)
+ else
+ fun_l11_n768(x)
+ end
+end
+
+def fun_l10_n571(x)
+ if (x < 1)
+ fun_l11_n904(x)
+ else
+ fun_l11_n736(x)
+ end
+end
+
+def fun_l10_n572(x)
+ if (x < 1)
+ fun_l11_n87(x)
+ else
+ fun_l11_n474(x)
+ end
+end
+
+def fun_l10_n573(x)
+ if (x < 1)
+ fun_l11_n886(x)
+ else
+ fun_l11_n75(x)
+ end
+end
+
+def fun_l10_n574(x)
+ if (x < 1)
+ fun_l11_n761(x)
+ else
+ fun_l11_n662(x)
+ end
+end
+
+def fun_l10_n575(x)
+ if (x < 1)
+ fun_l11_n255(x)
+ else
+ fun_l11_n321(x)
+ end
+end
+
+def fun_l10_n576(x)
+ if (x < 1)
+ fun_l11_n154(x)
+ else
+ fun_l11_n356(x)
+ end
+end
+
+def fun_l10_n577(x)
+ if (x < 1)
+ fun_l11_n802(x)
+ else
+ fun_l11_n912(x)
+ end
+end
+
+def fun_l10_n578(x)
+ if (x < 1)
+ fun_l11_n709(x)
+ else
+ fun_l11_n66(x)
+ end
+end
+
+def fun_l10_n579(x)
+ if (x < 1)
+ fun_l11_n994(x)
+ else
+ fun_l11_n424(x)
+ end
+end
+
+def fun_l10_n580(x)
+ if (x < 1)
+ fun_l11_n520(x)
+ else
+ fun_l11_n551(x)
+ end
+end
+
+def fun_l10_n581(x)
+ if (x < 1)
+ fun_l11_n386(x)
+ else
+ fun_l11_n615(x)
+ end
+end
+
+def fun_l10_n582(x)
+ if (x < 1)
+ fun_l11_n125(x)
+ else
+ fun_l11_n667(x)
+ end
+end
+
+def fun_l10_n583(x)
+ if (x < 1)
+ fun_l11_n829(x)
+ else
+ fun_l11_n802(x)
+ end
+end
+
+def fun_l10_n584(x)
+ if (x < 1)
+ fun_l11_n649(x)
+ else
+ fun_l11_n39(x)
+ end
+end
+
+def fun_l10_n585(x)
+ if (x < 1)
+ fun_l11_n454(x)
+ else
+ fun_l11_n541(x)
+ end
+end
+
+def fun_l10_n586(x)
+ if (x < 1)
+ fun_l11_n281(x)
+ else
+ fun_l11_n4(x)
+ end
+end
+
+def fun_l10_n587(x)
+ if (x < 1)
+ fun_l11_n382(x)
+ else
+ fun_l11_n656(x)
+ end
+end
+
+def fun_l10_n588(x)
+ if (x < 1)
+ fun_l11_n177(x)
+ else
+ fun_l11_n38(x)
+ end
+end
+
+def fun_l10_n589(x)
+ if (x < 1)
+ fun_l11_n555(x)
+ else
+ fun_l11_n557(x)
+ end
+end
+
+def fun_l10_n590(x)
+ if (x < 1)
+ fun_l11_n999(x)
+ else
+ fun_l11_n645(x)
+ end
+end
+
+def fun_l10_n591(x)
+ if (x < 1)
+ fun_l11_n714(x)
+ else
+ fun_l11_n872(x)
+ end
+end
+
+def fun_l10_n592(x)
+ if (x < 1)
+ fun_l11_n779(x)
+ else
+ fun_l11_n524(x)
+ end
+end
+
+def fun_l10_n593(x)
+ if (x < 1)
+ fun_l11_n557(x)
+ else
+ fun_l11_n906(x)
+ end
+end
+
+def fun_l10_n594(x)
+ if (x < 1)
+ fun_l11_n379(x)
+ else
+ fun_l11_n550(x)
+ end
+end
+
+def fun_l10_n595(x)
+ if (x < 1)
+ fun_l11_n138(x)
+ else
+ fun_l11_n785(x)
+ end
+end
+
+def fun_l10_n596(x)
+ if (x < 1)
+ fun_l11_n486(x)
+ else
+ fun_l11_n381(x)
+ end
+end
+
+def fun_l10_n597(x)
+ if (x < 1)
+ fun_l11_n374(x)
+ else
+ fun_l11_n477(x)
+ end
+end
+
+def fun_l10_n598(x)
+ if (x < 1)
+ fun_l11_n113(x)
+ else
+ fun_l11_n455(x)
+ end
+end
+
+def fun_l10_n599(x)
+ if (x < 1)
+ fun_l11_n31(x)
+ else
+ fun_l11_n983(x)
+ end
+end
+
+def fun_l10_n600(x)
+ if (x < 1)
+ fun_l11_n758(x)
+ else
+ fun_l11_n187(x)
+ end
+end
+
+def fun_l10_n601(x)
+ if (x < 1)
+ fun_l11_n198(x)
+ else
+ fun_l11_n436(x)
+ end
+end
+
+def fun_l10_n602(x)
+ if (x < 1)
+ fun_l11_n207(x)
+ else
+ fun_l11_n86(x)
+ end
+end
+
+def fun_l10_n603(x)
+ if (x < 1)
+ fun_l11_n827(x)
+ else
+ fun_l11_n267(x)
+ end
+end
+
+def fun_l10_n604(x)
+ if (x < 1)
+ fun_l11_n760(x)
+ else
+ fun_l11_n707(x)
+ end
+end
+
+def fun_l10_n605(x)
+ if (x < 1)
+ fun_l11_n791(x)
+ else
+ fun_l11_n249(x)
+ end
+end
+
+def fun_l10_n606(x)
+ if (x < 1)
+ fun_l11_n634(x)
+ else
+ fun_l11_n607(x)
+ end
+end
+
+def fun_l10_n607(x)
+ if (x < 1)
+ fun_l11_n605(x)
+ else
+ fun_l11_n698(x)
+ end
+end
+
+def fun_l10_n608(x)
+ if (x < 1)
+ fun_l11_n401(x)
+ else
+ fun_l11_n316(x)
+ end
+end
+
+def fun_l10_n609(x)
+ if (x < 1)
+ fun_l11_n928(x)
+ else
+ fun_l11_n313(x)
+ end
+end
+
+def fun_l10_n610(x)
+ if (x < 1)
+ fun_l11_n601(x)
+ else
+ fun_l11_n278(x)
+ end
+end
+
+def fun_l10_n611(x)
+ if (x < 1)
+ fun_l11_n554(x)
+ else
+ fun_l11_n584(x)
+ end
+end
+
+def fun_l10_n612(x)
+ if (x < 1)
+ fun_l11_n906(x)
+ else
+ fun_l11_n58(x)
+ end
+end
+
+def fun_l10_n613(x)
+ if (x < 1)
+ fun_l11_n85(x)
+ else
+ fun_l11_n631(x)
+ end
+end
+
+def fun_l10_n614(x)
+ if (x < 1)
+ fun_l11_n221(x)
+ else
+ fun_l11_n85(x)
+ end
+end
+
+def fun_l10_n615(x)
+ if (x < 1)
+ fun_l11_n88(x)
+ else
+ fun_l11_n367(x)
+ end
+end
+
+def fun_l10_n616(x)
+ if (x < 1)
+ fun_l11_n693(x)
+ else
+ fun_l11_n385(x)
+ end
+end
+
+def fun_l10_n617(x)
+ if (x < 1)
+ fun_l11_n18(x)
+ else
+ fun_l11_n526(x)
+ end
+end
+
+def fun_l10_n618(x)
+ if (x < 1)
+ fun_l11_n307(x)
+ else
+ fun_l11_n303(x)
+ end
+end
+
+def fun_l10_n619(x)
+ if (x < 1)
+ fun_l11_n972(x)
+ else
+ fun_l11_n246(x)
+ end
+end
+
+def fun_l10_n620(x)
+ if (x < 1)
+ fun_l11_n185(x)
+ else
+ fun_l11_n512(x)
+ end
+end
+
+def fun_l10_n621(x)
+ if (x < 1)
+ fun_l11_n87(x)
+ else
+ fun_l11_n131(x)
+ end
+end
+
+def fun_l10_n622(x)
+ if (x < 1)
+ fun_l11_n617(x)
+ else
+ fun_l11_n869(x)
+ end
+end
+
+def fun_l10_n623(x)
+ if (x < 1)
+ fun_l11_n514(x)
+ else
+ fun_l11_n824(x)
+ end
+end
+
+def fun_l10_n624(x)
+ if (x < 1)
+ fun_l11_n551(x)
+ else
+ fun_l11_n430(x)
+ end
+end
+
+def fun_l10_n625(x)
+ if (x < 1)
+ fun_l11_n266(x)
+ else
+ fun_l11_n826(x)
+ end
+end
+
+def fun_l10_n626(x)
+ if (x < 1)
+ fun_l11_n90(x)
+ else
+ fun_l11_n866(x)
+ end
+end
+
+def fun_l10_n627(x)
+ if (x < 1)
+ fun_l11_n34(x)
+ else
+ fun_l11_n694(x)
+ end
+end
+
+def fun_l10_n628(x)
+ if (x < 1)
+ fun_l11_n455(x)
+ else
+ fun_l11_n990(x)
+ end
+end
+
+def fun_l10_n629(x)
+ if (x < 1)
+ fun_l11_n573(x)
+ else
+ fun_l11_n874(x)
+ end
+end
+
+def fun_l10_n630(x)
+ if (x < 1)
+ fun_l11_n836(x)
+ else
+ fun_l11_n87(x)
+ end
+end
+
+def fun_l10_n631(x)
+ if (x < 1)
+ fun_l11_n234(x)
+ else
+ fun_l11_n389(x)
+ end
+end
+
+def fun_l10_n632(x)
+ if (x < 1)
+ fun_l11_n647(x)
+ else
+ fun_l11_n655(x)
+ end
+end
+
+def fun_l10_n633(x)
+ if (x < 1)
+ fun_l11_n649(x)
+ else
+ fun_l11_n426(x)
+ end
+end
+
+def fun_l10_n634(x)
+ if (x < 1)
+ fun_l11_n613(x)
+ else
+ fun_l11_n10(x)
+ end
+end
+
+def fun_l10_n635(x)
+ if (x < 1)
+ fun_l11_n315(x)
+ else
+ fun_l11_n419(x)
+ end
+end
+
+def fun_l10_n636(x)
+ if (x < 1)
+ fun_l11_n575(x)
+ else
+ fun_l11_n29(x)
+ end
+end
+
+def fun_l10_n637(x)
+ if (x < 1)
+ fun_l11_n75(x)
+ else
+ fun_l11_n710(x)
+ end
+end
+
+def fun_l10_n638(x)
+ if (x < 1)
+ fun_l11_n42(x)
+ else
+ fun_l11_n45(x)
+ end
+end
+
+def fun_l10_n639(x)
+ if (x < 1)
+ fun_l11_n629(x)
+ else
+ fun_l11_n850(x)
+ end
+end
+
+def fun_l10_n640(x)
+ if (x < 1)
+ fun_l11_n491(x)
+ else
+ fun_l11_n708(x)
+ end
+end
+
+def fun_l10_n641(x)
+ if (x < 1)
+ fun_l11_n673(x)
+ else
+ fun_l11_n722(x)
+ end
+end
+
+def fun_l10_n642(x)
+ if (x < 1)
+ fun_l11_n922(x)
+ else
+ fun_l11_n783(x)
+ end
+end
+
+def fun_l10_n643(x)
+ if (x < 1)
+ fun_l11_n855(x)
+ else
+ fun_l11_n145(x)
+ end
+end
+
+def fun_l10_n644(x)
+ if (x < 1)
+ fun_l11_n897(x)
+ else
+ fun_l11_n281(x)
+ end
+end
+
+def fun_l10_n645(x)
+ if (x < 1)
+ fun_l11_n148(x)
+ else
+ fun_l11_n786(x)
+ end
+end
+
+def fun_l10_n646(x)
+ if (x < 1)
+ fun_l11_n743(x)
+ else
+ fun_l11_n627(x)
+ end
+end
+
+def fun_l10_n647(x)
+ if (x < 1)
+ fun_l11_n343(x)
+ else
+ fun_l11_n234(x)
+ end
+end
+
+def fun_l10_n648(x)
+ if (x < 1)
+ fun_l11_n995(x)
+ else
+ fun_l11_n199(x)
+ end
+end
+
+def fun_l10_n649(x)
+ if (x < 1)
+ fun_l11_n155(x)
+ else
+ fun_l11_n384(x)
+ end
+end
+
+def fun_l10_n650(x)
+ if (x < 1)
+ fun_l11_n329(x)
+ else
+ fun_l11_n313(x)
+ end
+end
+
+def fun_l10_n651(x)
+ if (x < 1)
+ fun_l11_n254(x)
+ else
+ fun_l11_n763(x)
+ end
+end
+
+def fun_l10_n652(x)
+ if (x < 1)
+ fun_l11_n839(x)
+ else
+ fun_l11_n692(x)
+ end
+end
+
+def fun_l10_n653(x)
+ if (x < 1)
+ fun_l11_n388(x)
+ else
+ fun_l11_n187(x)
+ end
+end
+
+def fun_l10_n654(x)
+ if (x < 1)
+ fun_l11_n919(x)
+ else
+ fun_l11_n198(x)
+ end
+end
+
+def fun_l10_n655(x)
+ if (x < 1)
+ fun_l11_n313(x)
+ else
+ fun_l11_n686(x)
+ end
+end
+
+def fun_l10_n656(x)
+ if (x < 1)
+ fun_l11_n91(x)
+ else
+ fun_l11_n95(x)
+ end
+end
+
+def fun_l10_n657(x)
+ if (x < 1)
+ fun_l11_n801(x)
+ else
+ fun_l11_n700(x)
+ end
+end
+
+def fun_l10_n658(x)
+ if (x < 1)
+ fun_l11_n938(x)
+ else
+ fun_l11_n936(x)
+ end
+end
+
+def fun_l10_n659(x)
+ if (x < 1)
+ fun_l11_n78(x)
+ else
+ fun_l11_n611(x)
+ end
+end
+
+def fun_l10_n660(x)
+ if (x < 1)
+ fun_l11_n261(x)
+ else
+ fun_l11_n396(x)
+ end
+end
+
+def fun_l10_n661(x)
+ if (x < 1)
+ fun_l11_n154(x)
+ else
+ fun_l11_n132(x)
+ end
+end
+
+def fun_l10_n662(x)
+ if (x < 1)
+ fun_l11_n603(x)
+ else
+ fun_l11_n718(x)
+ end
+end
+
+def fun_l10_n663(x)
+ if (x < 1)
+ fun_l11_n512(x)
+ else
+ fun_l11_n158(x)
+ end
+end
+
+def fun_l10_n664(x)
+ if (x < 1)
+ fun_l11_n178(x)
+ else
+ fun_l11_n59(x)
+ end
+end
+
+def fun_l10_n665(x)
+ if (x < 1)
+ fun_l11_n703(x)
+ else
+ fun_l11_n54(x)
+ end
+end
+
+def fun_l10_n666(x)
+ if (x < 1)
+ fun_l11_n623(x)
+ else
+ fun_l11_n793(x)
+ end
+end
+
+def fun_l10_n667(x)
+ if (x < 1)
+ fun_l11_n350(x)
+ else
+ fun_l11_n244(x)
+ end
+end
+
+def fun_l10_n668(x)
+ if (x < 1)
+ fun_l11_n253(x)
+ else
+ fun_l11_n297(x)
+ end
+end
+
+def fun_l10_n669(x)
+ if (x < 1)
+ fun_l11_n137(x)
+ else
+ fun_l11_n76(x)
+ end
+end
+
+def fun_l10_n670(x)
+ if (x < 1)
+ fun_l11_n755(x)
+ else
+ fun_l11_n627(x)
+ end
+end
+
+def fun_l10_n671(x)
+ if (x < 1)
+ fun_l11_n393(x)
+ else
+ fun_l11_n394(x)
+ end
+end
+
+def fun_l10_n672(x)
+ if (x < 1)
+ fun_l11_n858(x)
+ else
+ fun_l11_n823(x)
+ end
+end
+
+def fun_l10_n673(x)
+ if (x < 1)
+ fun_l11_n202(x)
+ else
+ fun_l11_n800(x)
+ end
+end
+
+def fun_l10_n674(x)
+ if (x < 1)
+ fun_l11_n977(x)
+ else
+ fun_l11_n343(x)
+ end
+end
+
+def fun_l10_n675(x)
+ if (x < 1)
+ fun_l11_n352(x)
+ else
+ fun_l11_n690(x)
+ end
+end
+
+def fun_l10_n676(x)
+ if (x < 1)
+ fun_l11_n598(x)
+ else
+ fun_l11_n108(x)
+ end
+end
+
+def fun_l10_n677(x)
+ if (x < 1)
+ fun_l11_n126(x)
+ else
+ fun_l11_n226(x)
+ end
+end
+
+def fun_l10_n678(x)
+ if (x < 1)
+ fun_l11_n937(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n679(x)
+ if (x < 1)
+ fun_l11_n231(x)
+ else
+ fun_l11_n264(x)
+ end
+end
+
+def fun_l10_n680(x)
+ if (x < 1)
+ fun_l11_n657(x)
+ else
+ fun_l11_n766(x)
+ end
+end
+
+def fun_l10_n681(x)
+ if (x < 1)
+ fun_l11_n444(x)
+ else
+ fun_l11_n405(x)
+ end
+end
+
+def fun_l10_n682(x)
+ if (x < 1)
+ fun_l11_n410(x)
+ else
+ fun_l11_n409(x)
+ end
+end
+
+def fun_l10_n683(x)
+ if (x < 1)
+ fun_l11_n690(x)
+ else
+ fun_l11_n673(x)
+ end
+end
+
+def fun_l10_n684(x)
+ if (x < 1)
+ fun_l11_n737(x)
+ else
+ fun_l11_n61(x)
+ end
+end
+
+def fun_l10_n685(x)
+ if (x < 1)
+ fun_l11_n54(x)
+ else
+ fun_l11_n387(x)
+ end
+end
+
+def fun_l10_n686(x)
+ if (x < 1)
+ fun_l11_n271(x)
+ else
+ fun_l11_n698(x)
+ end
+end
+
+def fun_l10_n687(x)
+ if (x < 1)
+ fun_l11_n988(x)
+ else
+ fun_l11_n816(x)
+ end
+end
+
+def fun_l10_n688(x)
+ if (x < 1)
+ fun_l11_n309(x)
+ else
+ fun_l11_n576(x)
+ end
+end
+
+def fun_l10_n689(x)
+ if (x < 1)
+ fun_l11_n390(x)
+ else
+ fun_l11_n35(x)
+ end
+end
+
+def fun_l10_n690(x)
+ if (x < 1)
+ fun_l11_n93(x)
+ else
+ fun_l11_n712(x)
+ end
+end
+
+def fun_l10_n691(x)
+ if (x < 1)
+ fun_l11_n285(x)
+ else
+ fun_l11_n467(x)
+ end
+end
+
+def fun_l10_n692(x)
+ if (x < 1)
+ fun_l11_n403(x)
+ else
+ fun_l11_n41(x)
+ end
+end
+
+def fun_l10_n693(x)
+ if (x < 1)
+ fun_l11_n228(x)
+ else
+ fun_l11_n689(x)
+ end
+end
+
+def fun_l10_n694(x)
+ if (x < 1)
+ fun_l11_n581(x)
+ else
+ fun_l11_n989(x)
+ end
+end
+
+def fun_l10_n695(x)
+ if (x < 1)
+ fun_l11_n451(x)
+ else
+ fun_l11_n618(x)
+ end
+end
+
+def fun_l10_n696(x)
+ if (x < 1)
+ fun_l11_n640(x)
+ else
+ fun_l11_n13(x)
+ end
+end
+
+def fun_l10_n697(x)
+ if (x < 1)
+ fun_l11_n968(x)
+ else
+ fun_l11_n903(x)
+ end
+end
+
+def fun_l10_n698(x)
+ if (x < 1)
+ fun_l11_n918(x)
+ else
+ fun_l11_n244(x)
+ end
+end
+
+def fun_l10_n699(x)
+ if (x < 1)
+ fun_l11_n17(x)
+ else
+ fun_l11_n17(x)
+ end
+end
+
+def fun_l10_n700(x)
+ if (x < 1)
+ fun_l11_n918(x)
+ else
+ fun_l11_n539(x)
+ end
+end
+
+def fun_l10_n701(x)
+ if (x < 1)
+ fun_l11_n924(x)
+ else
+ fun_l11_n103(x)
+ end
+end
+
+def fun_l10_n702(x)
+ if (x < 1)
+ fun_l11_n908(x)
+ else
+ fun_l11_n328(x)
+ end
+end
+
+def fun_l10_n703(x)
+ if (x < 1)
+ fun_l11_n393(x)
+ else
+ fun_l11_n386(x)
+ end
+end
+
+def fun_l10_n704(x)
+ if (x < 1)
+ fun_l11_n194(x)
+ else
+ fun_l11_n812(x)
+ end
+end
+
+def fun_l10_n705(x)
+ if (x < 1)
+ fun_l11_n382(x)
+ else
+ fun_l11_n276(x)
+ end
+end
+
+def fun_l10_n706(x)
+ if (x < 1)
+ fun_l11_n257(x)
+ else
+ fun_l11_n269(x)
+ end
+end
+
+def fun_l10_n707(x)
+ if (x < 1)
+ fun_l11_n940(x)
+ else
+ fun_l11_n593(x)
+ end
+end
+
+def fun_l10_n708(x)
+ if (x < 1)
+ fun_l11_n710(x)
+ else
+ fun_l11_n992(x)
+ end
+end
+
+def fun_l10_n709(x)
+ if (x < 1)
+ fun_l11_n244(x)
+ else
+ fun_l11_n500(x)
+ end
+end
+
+def fun_l10_n710(x)
+ if (x < 1)
+ fun_l11_n712(x)
+ else
+ fun_l11_n544(x)
+ end
+end
+
+def fun_l10_n711(x)
+ if (x < 1)
+ fun_l11_n701(x)
+ else
+ fun_l11_n104(x)
+ end
+end
+
+def fun_l10_n712(x)
+ if (x < 1)
+ fun_l11_n706(x)
+ else
+ fun_l11_n199(x)
+ end
+end
+
+def fun_l10_n713(x)
+ if (x < 1)
+ fun_l11_n189(x)
+ else
+ fun_l11_n840(x)
+ end
+end
+
+def fun_l10_n714(x)
+ if (x < 1)
+ fun_l11_n122(x)
+ else
+ fun_l11_n318(x)
+ end
+end
+
+def fun_l10_n715(x)
+ if (x < 1)
+ fun_l11_n915(x)
+ else
+ fun_l11_n964(x)
+ end
+end
+
+def fun_l10_n716(x)
+ if (x < 1)
+ fun_l11_n341(x)
+ else
+ fun_l11_n118(x)
+ end
+end
+
+def fun_l10_n717(x)
+ if (x < 1)
+ fun_l11_n846(x)
+ else
+ fun_l11_n235(x)
+ end
+end
+
+def fun_l10_n718(x)
+ if (x < 1)
+ fun_l11_n679(x)
+ else
+ fun_l11_n959(x)
+ end
+end
+
+def fun_l10_n719(x)
+ if (x < 1)
+ fun_l11_n121(x)
+ else
+ fun_l11_n708(x)
+ end
+end
+
+def fun_l10_n720(x)
+ if (x < 1)
+ fun_l11_n651(x)
+ else
+ fun_l11_n480(x)
+ end
+end
+
+def fun_l10_n721(x)
+ if (x < 1)
+ fun_l11_n773(x)
+ else
+ fun_l11_n568(x)
+ end
+end
+
+def fun_l10_n722(x)
+ if (x < 1)
+ fun_l11_n809(x)
+ else
+ fun_l11_n111(x)
+ end
+end
+
+def fun_l10_n723(x)
+ if (x < 1)
+ fun_l11_n586(x)
+ else
+ fun_l11_n553(x)
+ end
+end
+
+def fun_l10_n724(x)
+ if (x < 1)
+ fun_l11_n473(x)
+ else
+ fun_l11_n387(x)
+ end
+end
+
+def fun_l10_n725(x)
+ if (x < 1)
+ fun_l11_n584(x)
+ else
+ fun_l11_n224(x)
+ end
+end
+
+def fun_l10_n726(x)
+ if (x < 1)
+ fun_l11_n110(x)
+ else
+ fun_l11_n827(x)
+ end
+end
+
+def fun_l10_n727(x)
+ if (x < 1)
+ fun_l11_n753(x)
+ else
+ fun_l11_n745(x)
+ end
+end
+
+def fun_l10_n728(x)
+ if (x < 1)
+ fun_l11_n550(x)
+ else
+ fun_l11_n380(x)
+ end
+end
+
+def fun_l10_n729(x)
+ if (x < 1)
+ fun_l11_n844(x)
+ else
+ fun_l11_n401(x)
+ end
+end
+
+def fun_l10_n730(x)
+ if (x < 1)
+ fun_l11_n837(x)
+ else
+ fun_l11_n759(x)
+ end
+end
+
+def fun_l10_n731(x)
+ if (x < 1)
+ fun_l11_n850(x)
+ else
+ fun_l11_n953(x)
+ end
+end
+
+def fun_l10_n732(x)
+ if (x < 1)
+ fun_l11_n872(x)
+ else
+ fun_l11_n864(x)
+ end
+end
+
+def fun_l10_n733(x)
+ if (x < 1)
+ fun_l11_n894(x)
+ else
+ fun_l11_n943(x)
+ end
+end
+
+def fun_l10_n734(x)
+ if (x < 1)
+ fun_l11_n830(x)
+ else
+ fun_l11_n858(x)
+ end
+end
+
+def fun_l10_n735(x)
+ if (x < 1)
+ fun_l11_n661(x)
+ else
+ fun_l11_n366(x)
+ end
+end
+
+def fun_l10_n736(x)
+ if (x < 1)
+ fun_l11_n736(x)
+ else
+ fun_l11_n636(x)
+ end
+end
+
+def fun_l10_n737(x)
+ if (x < 1)
+ fun_l11_n316(x)
+ else
+ fun_l11_n977(x)
+ end
+end
+
+def fun_l10_n738(x)
+ if (x < 1)
+ fun_l11_n54(x)
+ else
+ fun_l11_n386(x)
+ end
+end
+
+def fun_l10_n739(x)
+ if (x < 1)
+ fun_l11_n985(x)
+ else
+ fun_l11_n274(x)
+ end
+end
+
+def fun_l10_n740(x)
+ if (x < 1)
+ fun_l11_n756(x)
+ else
+ fun_l11_n171(x)
+ end
+end
+
+def fun_l10_n741(x)
+ if (x < 1)
+ fun_l11_n457(x)
+ else
+ fun_l11_n251(x)
+ end
+end
+
+def fun_l10_n742(x)
+ if (x < 1)
+ fun_l11_n751(x)
+ else
+ fun_l11_n29(x)
+ end
+end
+
+def fun_l10_n743(x)
+ if (x < 1)
+ fun_l11_n6(x)
+ else
+ fun_l11_n892(x)
+ end
+end
+
+def fun_l10_n744(x)
+ if (x < 1)
+ fun_l11_n85(x)
+ else
+ fun_l11_n205(x)
+ end
+end
+
+def fun_l10_n745(x)
+ if (x < 1)
+ fun_l11_n887(x)
+ else
+ fun_l11_n734(x)
+ end
+end
+
+def fun_l10_n746(x)
+ if (x < 1)
+ fun_l11_n478(x)
+ else
+ fun_l11_n505(x)
+ end
+end
+
+def fun_l10_n747(x)
+ if (x < 1)
+ fun_l11_n760(x)
+ else
+ fun_l11_n286(x)
+ end
+end
+
+def fun_l10_n748(x)
+ if (x < 1)
+ fun_l11_n391(x)
+ else
+ fun_l11_n69(x)
+ end
+end
+
+def fun_l10_n749(x)
+ if (x < 1)
+ fun_l11_n780(x)
+ else
+ fun_l11_n28(x)
+ end
+end
+
+def fun_l10_n750(x)
+ if (x < 1)
+ fun_l11_n337(x)
+ else
+ fun_l11_n647(x)
+ end
+end
+
+def fun_l10_n751(x)
+ if (x < 1)
+ fun_l11_n92(x)
+ else
+ fun_l11_n121(x)
+ end
+end
+
+def fun_l10_n752(x)
+ if (x < 1)
+ fun_l11_n358(x)
+ else
+ fun_l11_n177(x)
+ end
+end
+
+def fun_l10_n753(x)
+ if (x < 1)
+ fun_l11_n642(x)
+ else
+ fun_l11_n426(x)
+ end
+end
+
+def fun_l10_n754(x)
+ if (x < 1)
+ fun_l11_n66(x)
+ else
+ fun_l11_n948(x)
+ end
+end
+
+def fun_l10_n755(x)
+ if (x < 1)
+ fun_l11_n45(x)
+ else
+ fun_l11_n795(x)
+ end
+end
+
+def fun_l10_n756(x)
+ if (x < 1)
+ fun_l11_n734(x)
+ else
+ fun_l11_n162(x)
+ end
+end
+
+def fun_l10_n757(x)
+ if (x < 1)
+ fun_l11_n689(x)
+ else
+ fun_l11_n31(x)
+ end
+end
+
+def fun_l10_n758(x)
+ if (x < 1)
+ fun_l11_n33(x)
+ else
+ fun_l11_n992(x)
+ end
+end
+
+def fun_l10_n759(x)
+ if (x < 1)
+ fun_l11_n210(x)
+ else
+ fun_l11_n330(x)
+ end
+end
+
+def fun_l10_n760(x)
+ if (x < 1)
+ fun_l11_n727(x)
+ else
+ fun_l11_n265(x)
+ end
+end
+
+def fun_l10_n761(x)
+ if (x < 1)
+ fun_l11_n710(x)
+ else
+ fun_l11_n706(x)
+ end
+end
+
+def fun_l10_n762(x)
+ if (x < 1)
+ fun_l11_n791(x)
+ else
+ fun_l11_n325(x)
+ end
+end
+
+def fun_l10_n763(x)
+ if (x < 1)
+ fun_l11_n350(x)
+ else
+ fun_l11_n443(x)
+ end
+end
+
+def fun_l10_n764(x)
+ if (x < 1)
+ fun_l11_n522(x)
+ else
+ fun_l11_n662(x)
+ end
+end
+
+def fun_l10_n765(x)
+ if (x < 1)
+ fun_l11_n786(x)
+ else
+ fun_l11_n969(x)
+ end
+end
+
+def fun_l10_n766(x)
+ if (x < 1)
+ fun_l11_n486(x)
+ else
+ fun_l11_n834(x)
+ end
+end
+
+def fun_l10_n767(x)
+ if (x < 1)
+ fun_l11_n84(x)
+ else
+ fun_l11_n989(x)
+ end
+end
+
+def fun_l10_n768(x)
+ if (x < 1)
+ fun_l11_n511(x)
+ else
+ fun_l11_n0(x)
+ end
+end
+
+def fun_l10_n769(x)
+ if (x < 1)
+ fun_l11_n459(x)
+ else
+ fun_l11_n243(x)
+ end
+end
+
+def fun_l10_n770(x)
+ if (x < 1)
+ fun_l11_n59(x)
+ else
+ fun_l11_n267(x)
+ end
+end
+
+def fun_l10_n771(x)
+ if (x < 1)
+ fun_l11_n435(x)
+ else
+ fun_l11_n132(x)
+ end
+end
+
+def fun_l10_n772(x)
+ if (x < 1)
+ fun_l11_n986(x)
+ else
+ fun_l11_n227(x)
+ end
+end
+
+def fun_l10_n773(x)
+ if (x < 1)
+ fun_l11_n931(x)
+ else
+ fun_l11_n215(x)
+ end
+end
+
+def fun_l10_n774(x)
+ if (x < 1)
+ fun_l11_n586(x)
+ else
+ fun_l11_n170(x)
+ end
+end
+
+def fun_l10_n775(x)
+ if (x < 1)
+ fun_l11_n334(x)
+ else
+ fun_l11_n780(x)
+ end
+end
+
+def fun_l10_n776(x)
+ if (x < 1)
+ fun_l11_n81(x)
+ else
+ fun_l11_n583(x)
+ end
+end
+
+def fun_l10_n777(x)
+ if (x < 1)
+ fun_l11_n118(x)
+ else
+ fun_l11_n451(x)
+ end
+end
+
+def fun_l10_n778(x)
+ if (x < 1)
+ fun_l11_n767(x)
+ else
+ fun_l11_n824(x)
+ end
+end
+
+def fun_l10_n779(x)
+ if (x < 1)
+ fun_l11_n270(x)
+ else
+ fun_l11_n725(x)
+ end
+end
+
+def fun_l10_n780(x)
+ if (x < 1)
+ fun_l11_n146(x)
+ else
+ fun_l11_n407(x)
+ end
+end
+
+def fun_l10_n781(x)
+ if (x < 1)
+ fun_l11_n103(x)
+ else
+ fun_l11_n523(x)
+ end
+end
+
+def fun_l10_n782(x)
+ if (x < 1)
+ fun_l11_n499(x)
+ else
+ fun_l11_n710(x)
+ end
+end
+
+def fun_l10_n783(x)
+ if (x < 1)
+ fun_l11_n971(x)
+ else
+ fun_l11_n426(x)
+ end
+end
+
+def fun_l10_n784(x)
+ if (x < 1)
+ fun_l11_n457(x)
+ else
+ fun_l11_n207(x)
+ end
+end
+
+def fun_l10_n785(x)
+ if (x < 1)
+ fun_l11_n307(x)
+ else
+ fun_l11_n19(x)
+ end
+end
+
+def fun_l10_n786(x)
+ if (x < 1)
+ fun_l11_n458(x)
+ else
+ fun_l11_n243(x)
+ end
+end
+
+def fun_l10_n787(x)
+ if (x < 1)
+ fun_l11_n488(x)
+ else
+ fun_l11_n694(x)
+ end
+end
+
+def fun_l10_n788(x)
+ if (x < 1)
+ fun_l11_n422(x)
+ else
+ fun_l11_n201(x)
+ end
+end
+
+def fun_l10_n789(x)
+ if (x < 1)
+ fun_l11_n45(x)
+ else
+ fun_l11_n993(x)
+ end
+end
+
+def fun_l10_n790(x)
+ if (x < 1)
+ fun_l11_n443(x)
+ else
+ fun_l11_n124(x)
+ end
+end
+
+def fun_l10_n791(x)
+ if (x < 1)
+ fun_l11_n875(x)
+ else
+ fun_l11_n605(x)
+ end
+end
+
+def fun_l10_n792(x)
+ if (x < 1)
+ fun_l11_n836(x)
+ else
+ fun_l11_n776(x)
+ end
+end
+
+def fun_l10_n793(x)
+ if (x < 1)
+ fun_l11_n58(x)
+ else
+ fun_l11_n847(x)
+ end
+end
+
+def fun_l10_n794(x)
+ if (x < 1)
+ fun_l11_n334(x)
+ else
+ fun_l11_n981(x)
+ end
+end
+
+def fun_l10_n795(x)
+ if (x < 1)
+ fun_l11_n187(x)
+ else
+ fun_l11_n599(x)
+ end
+end
+
+def fun_l10_n796(x)
+ if (x < 1)
+ fun_l11_n37(x)
+ else
+ fun_l11_n211(x)
+ end
+end
+
+def fun_l10_n797(x)
+ if (x < 1)
+ fun_l11_n770(x)
+ else
+ fun_l11_n688(x)
+ end
+end
+
+def fun_l10_n798(x)
+ if (x < 1)
+ fun_l11_n728(x)
+ else
+ fun_l11_n150(x)
+ end
+end
+
+def fun_l10_n799(x)
+ if (x < 1)
+ fun_l11_n175(x)
+ else
+ fun_l11_n762(x)
+ end
+end
+
+def fun_l10_n800(x)
+ if (x < 1)
+ fun_l11_n977(x)
+ else
+ fun_l11_n86(x)
+ end
+end
+
+def fun_l10_n801(x)
+ if (x < 1)
+ fun_l11_n669(x)
+ else
+ fun_l11_n120(x)
+ end
+end
+
+def fun_l10_n802(x)
+ if (x < 1)
+ fun_l11_n630(x)
+ else
+ fun_l11_n839(x)
+ end
+end
+
+def fun_l10_n803(x)
+ if (x < 1)
+ fun_l11_n505(x)
+ else
+ fun_l11_n461(x)
+ end
+end
+
+def fun_l10_n804(x)
+ if (x < 1)
+ fun_l11_n757(x)
+ else
+ fun_l11_n620(x)
+ end
+end
+
+def fun_l10_n805(x)
+ if (x < 1)
+ fun_l11_n379(x)
+ else
+ fun_l11_n468(x)
+ end
+end
+
+def fun_l10_n806(x)
+ if (x < 1)
+ fun_l11_n708(x)
+ else
+ fun_l11_n73(x)
+ end
+end
+
+def fun_l10_n807(x)
+ if (x < 1)
+ fun_l11_n340(x)
+ else
+ fun_l11_n671(x)
+ end
+end
+
+def fun_l10_n808(x)
+ if (x < 1)
+ fun_l11_n628(x)
+ else
+ fun_l11_n912(x)
+ end
+end
+
+def fun_l10_n809(x)
+ if (x < 1)
+ fun_l11_n455(x)
+ else
+ fun_l11_n20(x)
+ end
+end
+
+def fun_l10_n810(x)
+ if (x < 1)
+ fun_l11_n211(x)
+ else
+ fun_l11_n724(x)
+ end
+end
+
+def fun_l10_n811(x)
+ if (x < 1)
+ fun_l11_n982(x)
+ else
+ fun_l11_n876(x)
+ end
+end
+
+def fun_l10_n812(x)
+ if (x < 1)
+ fun_l11_n455(x)
+ else
+ fun_l11_n846(x)
+ end
+end
+
+def fun_l10_n813(x)
+ if (x < 1)
+ fun_l11_n317(x)
+ else
+ fun_l11_n909(x)
+ end
+end
+
+def fun_l10_n814(x)
+ if (x < 1)
+ fun_l11_n622(x)
+ else
+ fun_l11_n147(x)
+ end
+end
+
+def fun_l10_n815(x)
+ if (x < 1)
+ fun_l11_n174(x)
+ else
+ fun_l11_n660(x)
+ end
+end
+
+def fun_l10_n816(x)
+ if (x < 1)
+ fun_l11_n63(x)
+ else
+ fun_l11_n427(x)
+ end
+end
+
+def fun_l10_n817(x)
+ if (x < 1)
+ fun_l11_n944(x)
+ else
+ fun_l11_n40(x)
+ end
+end
+
+def fun_l10_n818(x)
+ if (x < 1)
+ fun_l11_n887(x)
+ else
+ fun_l11_n641(x)
+ end
+end
+
+def fun_l10_n819(x)
+ if (x < 1)
+ fun_l11_n237(x)
+ else
+ fun_l11_n568(x)
+ end
+end
+
+def fun_l10_n820(x)
+ if (x < 1)
+ fun_l11_n415(x)
+ else
+ fun_l11_n374(x)
+ end
+end
+
+def fun_l10_n821(x)
+ if (x < 1)
+ fun_l11_n183(x)
+ else
+ fun_l11_n38(x)
+ end
+end
+
+def fun_l10_n822(x)
+ if (x < 1)
+ fun_l11_n835(x)
+ else
+ fun_l11_n406(x)
+ end
+end
+
+def fun_l10_n823(x)
+ if (x < 1)
+ fun_l11_n233(x)
+ else
+ fun_l11_n118(x)
+ end
+end
+
+def fun_l10_n824(x)
+ if (x < 1)
+ fun_l11_n898(x)
+ else
+ fun_l11_n543(x)
+ end
+end
+
+def fun_l10_n825(x)
+ if (x < 1)
+ fun_l11_n971(x)
+ else
+ fun_l11_n750(x)
+ end
+end
+
+def fun_l10_n826(x)
+ if (x < 1)
+ fun_l11_n254(x)
+ else
+ fun_l11_n759(x)
+ end
+end
+
+def fun_l10_n827(x)
+ if (x < 1)
+ fun_l11_n953(x)
+ else
+ fun_l11_n187(x)
+ end
+end
+
+def fun_l10_n828(x)
+ if (x < 1)
+ fun_l11_n403(x)
+ else
+ fun_l11_n170(x)
+ end
+end
+
+def fun_l10_n829(x)
+ if (x < 1)
+ fun_l11_n251(x)
+ else
+ fun_l11_n506(x)
+ end
+end
+
+def fun_l10_n830(x)
+ if (x < 1)
+ fun_l11_n426(x)
+ else
+ fun_l11_n325(x)
+ end
+end
+
+def fun_l10_n831(x)
+ if (x < 1)
+ fun_l11_n958(x)
+ else
+ fun_l11_n4(x)
+ end
+end
+
+def fun_l10_n832(x)
+ if (x < 1)
+ fun_l11_n628(x)
+ else
+ fun_l11_n920(x)
+ end
+end
+
+def fun_l10_n833(x)
+ if (x < 1)
+ fun_l11_n241(x)
+ else
+ fun_l11_n459(x)
+ end
+end
+
+def fun_l10_n834(x)
+ if (x < 1)
+ fun_l11_n559(x)
+ else
+ fun_l11_n671(x)
+ end
+end
+
+def fun_l10_n835(x)
+ if (x < 1)
+ fun_l11_n980(x)
+ else
+ fun_l11_n295(x)
+ end
+end
+
+def fun_l10_n836(x)
+ if (x < 1)
+ fun_l11_n306(x)
+ else
+ fun_l11_n143(x)
+ end
+end
+
+def fun_l10_n837(x)
+ if (x < 1)
+ fun_l11_n176(x)
+ else
+ fun_l11_n341(x)
+ end
+end
+
+def fun_l10_n838(x)
+ if (x < 1)
+ fun_l11_n130(x)
+ else
+ fun_l11_n380(x)
+ end
+end
+
+def fun_l10_n839(x)
+ if (x < 1)
+ fun_l11_n630(x)
+ else
+ fun_l11_n216(x)
+ end
+end
+
+def fun_l10_n840(x)
+ if (x < 1)
+ fun_l11_n500(x)
+ else
+ fun_l11_n579(x)
+ end
+end
+
+def fun_l10_n841(x)
+ if (x < 1)
+ fun_l11_n312(x)
+ else
+ fun_l11_n656(x)
+ end
+end
+
+def fun_l10_n842(x)
+ if (x < 1)
+ fun_l11_n209(x)
+ else
+ fun_l11_n332(x)
+ end
+end
+
+def fun_l10_n843(x)
+ if (x < 1)
+ fun_l11_n555(x)
+ else
+ fun_l11_n179(x)
+ end
+end
+
+def fun_l10_n844(x)
+ if (x < 1)
+ fun_l11_n154(x)
+ else
+ fun_l11_n284(x)
+ end
+end
+
+def fun_l10_n845(x)
+ if (x < 1)
+ fun_l11_n912(x)
+ else
+ fun_l11_n543(x)
+ end
+end
+
+def fun_l10_n846(x)
+ if (x < 1)
+ fun_l11_n346(x)
+ else
+ fun_l11_n553(x)
+ end
+end
+
+def fun_l10_n847(x)
+ if (x < 1)
+ fun_l11_n117(x)
+ else
+ fun_l11_n738(x)
+ end
+end
+
+def fun_l10_n848(x)
+ if (x < 1)
+ fun_l11_n664(x)
+ else
+ fun_l11_n988(x)
+ end
+end
+
+def fun_l10_n849(x)
+ if (x < 1)
+ fun_l11_n298(x)
+ else
+ fun_l11_n753(x)
+ end
+end
+
+def fun_l10_n850(x)
+ if (x < 1)
+ fun_l11_n177(x)
+ else
+ fun_l11_n690(x)
+ end
+end
+
+def fun_l10_n851(x)
+ if (x < 1)
+ fun_l11_n259(x)
+ else
+ fun_l11_n713(x)
+ end
+end
+
+def fun_l10_n852(x)
+ if (x < 1)
+ fun_l11_n151(x)
+ else
+ fun_l11_n580(x)
+ end
+end
+
+def fun_l10_n853(x)
+ if (x < 1)
+ fun_l11_n274(x)
+ else
+ fun_l11_n703(x)
+ end
+end
+
+def fun_l10_n854(x)
+ if (x < 1)
+ fun_l11_n295(x)
+ else
+ fun_l11_n885(x)
+ end
+end
+
+def fun_l10_n855(x)
+ if (x < 1)
+ fun_l11_n513(x)
+ else
+ fun_l11_n963(x)
+ end
+end
+
+def fun_l10_n856(x)
+ if (x < 1)
+ fun_l11_n855(x)
+ else
+ fun_l11_n435(x)
+ end
+end
+
+def fun_l10_n857(x)
+ if (x < 1)
+ fun_l11_n573(x)
+ else
+ fun_l11_n489(x)
+ end
+end
+
+def fun_l10_n858(x)
+ if (x < 1)
+ fun_l11_n880(x)
+ else
+ fun_l11_n91(x)
+ end
+end
+
+def fun_l10_n859(x)
+ if (x < 1)
+ fun_l11_n993(x)
+ else
+ fun_l11_n358(x)
+ end
+end
+
+def fun_l10_n860(x)
+ if (x < 1)
+ fun_l11_n836(x)
+ else
+ fun_l11_n192(x)
+ end
+end
+
+def fun_l10_n861(x)
+ if (x < 1)
+ fun_l11_n493(x)
+ else
+ fun_l11_n564(x)
+ end
+end
+
+def fun_l10_n862(x)
+ if (x < 1)
+ fun_l11_n111(x)
+ else
+ fun_l11_n8(x)
+ end
+end
+
+def fun_l10_n863(x)
+ if (x < 1)
+ fun_l11_n596(x)
+ else
+ fun_l11_n129(x)
+ end
+end
+
+def fun_l10_n864(x)
+ if (x < 1)
+ fun_l11_n0(x)
+ else
+ fun_l11_n687(x)
+ end
+end
+
+def fun_l10_n865(x)
+ if (x < 1)
+ fun_l11_n543(x)
+ else
+ fun_l11_n866(x)
+ end
+end
+
+def fun_l10_n866(x)
+ if (x < 1)
+ fun_l11_n398(x)
+ else
+ fun_l11_n532(x)
+ end
+end
+
+def fun_l10_n867(x)
+ if (x < 1)
+ fun_l11_n15(x)
+ else
+ fun_l11_n991(x)
+ end
+end
+
+def fun_l10_n868(x)
+ if (x < 1)
+ fun_l11_n890(x)
+ else
+ fun_l11_n222(x)
+ end
+end
+
+def fun_l10_n869(x)
+ if (x < 1)
+ fun_l11_n206(x)
+ else
+ fun_l11_n983(x)
+ end
+end
+
+def fun_l10_n870(x)
+ if (x < 1)
+ fun_l11_n869(x)
+ else
+ fun_l11_n619(x)
+ end
+end
+
+def fun_l10_n871(x)
+ if (x < 1)
+ fun_l11_n417(x)
+ else
+ fun_l11_n18(x)
+ end
+end
+
+def fun_l10_n872(x)
+ if (x < 1)
+ fun_l11_n738(x)
+ else
+ fun_l11_n473(x)
+ end
+end
+
+def fun_l10_n873(x)
+ if (x < 1)
+ fun_l11_n773(x)
+ else
+ fun_l11_n128(x)
+ end
+end
+
+def fun_l10_n874(x)
+ if (x < 1)
+ fun_l11_n930(x)
+ else
+ fun_l11_n563(x)
+ end
+end
+
+def fun_l10_n875(x)
+ if (x < 1)
+ fun_l11_n868(x)
+ else
+ fun_l11_n356(x)
+ end
+end
+
+def fun_l10_n876(x)
+ if (x < 1)
+ fun_l11_n533(x)
+ else
+ fun_l11_n402(x)
+ end
+end
+
+def fun_l10_n877(x)
+ if (x < 1)
+ fun_l11_n959(x)
+ else
+ fun_l11_n921(x)
+ end
+end
+
+def fun_l10_n878(x)
+ if (x < 1)
+ fun_l11_n717(x)
+ else
+ fun_l11_n484(x)
+ end
+end
+
+def fun_l10_n879(x)
+ if (x < 1)
+ fun_l11_n583(x)
+ else
+ fun_l11_n801(x)
+ end
+end
+
+def fun_l10_n880(x)
+ if (x < 1)
+ fun_l11_n576(x)
+ else
+ fun_l11_n811(x)
+ end
+end
+
+def fun_l10_n881(x)
+ if (x < 1)
+ fun_l11_n382(x)
+ else
+ fun_l11_n585(x)
+ end
+end
+
+def fun_l10_n882(x)
+ if (x < 1)
+ fun_l11_n648(x)
+ else
+ fun_l11_n930(x)
+ end
+end
+
+def fun_l10_n883(x)
+ if (x < 1)
+ fun_l11_n246(x)
+ else
+ fun_l11_n636(x)
+ end
+end
+
+def fun_l10_n884(x)
+ if (x < 1)
+ fun_l11_n112(x)
+ else
+ fun_l11_n798(x)
+ end
+end
+
+def fun_l10_n885(x)
+ if (x < 1)
+ fun_l11_n517(x)
+ else
+ fun_l11_n633(x)
+ end
+end
+
+def fun_l10_n886(x)
+ if (x < 1)
+ fun_l11_n651(x)
+ else
+ fun_l11_n377(x)
+ end
+end
+
+def fun_l10_n887(x)
+ if (x < 1)
+ fun_l11_n652(x)
+ else
+ fun_l11_n419(x)
+ end
+end
+
+def fun_l10_n888(x)
+ if (x < 1)
+ fun_l11_n346(x)
+ else
+ fun_l11_n294(x)
+ end
+end
+
+def fun_l10_n889(x)
+ if (x < 1)
+ fun_l11_n809(x)
+ else
+ fun_l11_n844(x)
+ end
+end
+
+def fun_l10_n890(x)
+ if (x < 1)
+ fun_l11_n382(x)
+ else
+ fun_l11_n930(x)
+ end
+end
+
+def fun_l10_n891(x)
+ if (x < 1)
+ fun_l11_n900(x)
+ else
+ fun_l11_n293(x)
+ end
+end
+
+def fun_l10_n892(x)
+ if (x < 1)
+ fun_l11_n912(x)
+ else
+ fun_l11_n46(x)
+ end
+end
+
+def fun_l10_n893(x)
+ if (x < 1)
+ fun_l11_n429(x)
+ else
+ fun_l11_n174(x)
+ end
+end
+
+def fun_l10_n894(x)
+ if (x < 1)
+ fun_l11_n142(x)
+ else
+ fun_l11_n739(x)
+ end
+end
+
+def fun_l10_n895(x)
+ if (x < 1)
+ fun_l11_n300(x)
+ else
+ fun_l11_n546(x)
+ end
+end
+
+def fun_l10_n896(x)
+ if (x < 1)
+ fun_l11_n253(x)
+ else
+ fun_l11_n555(x)
+ end
+end
+
+def fun_l10_n897(x)
+ if (x < 1)
+ fun_l11_n29(x)
+ else
+ fun_l11_n913(x)
+ end
+end
+
+def fun_l10_n898(x)
+ if (x < 1)
+ fun_l11_n879(x)
+ else
+ fun_l11_n2(x)
+ end
+end
+
+def fun_l10_n899(x)
+ if (x < 1)
+ fun_l11_n191(x)
+ else
+ fun_l11_n418(x)
+ end
+end
+
+def fun_l10_n900(x)
+ if (x < 1)
+ fun_l11_n239(x)
+ else
+ fun_l11_n904(x)
+ end
+end
+
+def fun_l10_n901(x)
+ if (x < 1)
+ fun_l11_n962(x)
+ else
+ fun_l11_n978(x)
+ end
+end
+
+def fun_l10_n902(x)
+ if (x < 1)
+ fun_l11_n343(x)
+ else
+ fun_l11_n358(x)
+ end
+end
+
+def fun_l10_n903(x)
+ if (x < 1)
+ fun_l11_n334(x)
+ else
+ fun_l11_n806(x)
+ end
+end
+
+def fun_l10_n904(x)
+ if (x < 1)
+ fun_l11_n973(x)
+ else
+ fun_l11_n708(x)
+ end
+end
+
+def fun_l10_n905(x)
+ if (x < 1)
+ fun_l11_n990(x)
+ else
+ fun_l11_n211(x)
+ end
+end
+
+def fun_l10_n906(x)
+ if (x < 1)
+ fun_l11_n499(x)
+ else
+ fun_l11_n605(x)
+ end
+end
+
+def fun_l10_n907(x)
+ if (x < 1)
+ fun_l11_n335(x)
+ else
+ fun_l11_n855(x)
+ end
+end
+
+def fun_l10_n908(x)
+ if (x < 1)
+ fun_l11_n197(x)
+ else
+ fun_l11_n130(x)
+ end
+end
+
+def fun_l10_n909(x)
+ if (x < 1)
+ fun_l11_n462(x)
+ else
+ fun_l11_n838(x)
+ end
+end
+
+def fun_l10_n910(x)
+ if (x < 1)
+ fun_l11_n254(x)
+ else
+ fun_l11_n16(x)
+ end
+end
+
+def fun_l10_n911(x)
+ if (x < 1)
+ fun_l11_n321(x)
+ else
+ fun_l11_n158(x)
+ end
+end
+
+def fun_l10_n912(x)
+ if (x < 1)
+ fun_l11_n113(x)
+ else
+ fun_l11_n50(x)
+ end
+end
+
+def fun_l10_n913(x)
+ if (x < 1)
+ fun_l11_n492(x)
+ else
+ fun_l11_n502(x)
+ end
+end
+
+def fun_l10_n914(x)
+ if (x < 1)
+ fun_l11_n221(x)
+ else
+ fun_l11_n732(x)
+ end
+end
+
+def fun_l10_n915(x)
+ if (x < 1)
+ fun_l11_n853(x)
+ else
+ fun_l11_n625(x)
+ end
+end
+
+def fun_l10_n916(x)
+ if (x < 1)
+ fun_l11_n172(x)
+ else
+ fun_l11_n17(x)
+ end
+end
+
+def fun_l10_n917(x)
+ if (x < 1)
+ fun_l11_n438(x)
+ else
+ fun_l11_n480(x)
+ end
+end
+
+def fun_l10_n918(x)
+ if (x < 1)
+ fun_l11_n646(x)
+ else
+ fun_l11_n833(x)
+ end
+end
+
+def fun_l10_n919(x)
+ if (x < 1)
+ fun_l11_n628(x)
+ else
+ fun_l11_n40(x)
+ end
+end
+
+def fun_l10_n920(x)
+ if (x < 1)
+ fun_l11_n387(x)
+ else
+ fun_l11_n824(x)
+ end
+end
+
+def fun_l10_n921(x)
+ if (x < 1)
+ fun_l11_n641(x)
+ else
+ fun_l11_n669(x)
+ end
+end
+
+def fun_l10_n922(x)
+ if (x < 1)
+ fun_l11_n484(x)
+ else
+ fun_l11_n591(x)
+ end
+end
+
+def fun_l10_n923(x)
+ if (x < 1)
+ fun_l11_n610(x)
+ else
+ fun_l11_n132(x)
+ end
+end
+
+def fun_l10_n924(x)
+ if (x < 1)
+ fun_l11_n90(x)
+ else
+ fun_l11_n727(x)
+ end
+end
+
+def fun_l10_n925(x)
+ if (x < 1)
+ fun_l11_n44(x)
+ else
+ fun_l11_n412(x)
+ end
+end
+
+def fun_l10_n926(x)
+ if (x < 1)
+ fun_l11_n912(x)
+ else
+ fun_l11_n229(x)
+ end
+end
+
+def fun_l10_n927(x)
+ if (x < 1)
+ fun_l11_n647(x)
+ else
+ fun_l11_n13(x)
+ end
+end
+
+def fun_l10_n928(x)
+ if (x < 1)
+ fun_l11_n820(x)
+ else
+ fun_l11_n316(x)
+ end
+end
+
+def fun_l10_n929(x)
+ if (x < 1)
+ fun_l11_n850(x)
+ else
+ fun_l11_n868(x)
+ end
+end
+
+def fun_l10_n930(x)
+ if (x < 1)
+ fun_l11_n373(x)
+ else
+ fun_l11_n183(x)
+ end
+end
+
+def fun_l10_n931(x)
+ if (x < 1)
+ fun_l11_n217(x)
+ else
+ fun_l11_n230(x)
+ end
+end
+
+def fun_l10_n932(x)
+ if (x < 1)
+ fun_l11_n77(x)
+ else
+ fun_l11_n917(x)
+ end
+end
+
+def fun_l10_n933(x)
+ if (x < 1)
+ fun_l11_n264(x)
+ else
+ fun_l11_n992(x)
+ end
+end
+
+def fun_l10_n934(x)
+ if (x < 1)
+ fun_l11_n125(x)
+ else
+ fun_l11_n441(x)
+ end
+end
+
+def fun_l10_n935(x)
+ if (x < 1)
+ fun_l11_n586(x)
+ else
+ fun_l11_n946(x)
+ end
+end
+
+def fun_l10_n936(x)
+ if (x < 1)
+ fun_l11_n186(x)
+ else
+ fun_l11_n595(x)
+ end
+end
+
+def fun_l10_n937(x)
+ if (x < 1)
+ fun_l11_n210(x)
+ else
+ fun_l11_n186(x)
+ end
+end
+
+def fun_l10_n938(x)
+ if (x < 1)
+ fun_l11_n131(x)
+ else
+ fun_l11_n519(x)
+ end
+end
+
+def fun_l10_n939(x)
+ if (x < 1)
+ fun_l11_n863(x)
+ else
+ fun_l11_n486(x)
+ end
+end
+
+def fun_l10_n940(x)
+ if (x < 1)
+ fun_l11_n753(x)
+ else
+ fun_l11_n916(x)
+ end
+end
+
+def fun_l10_n941(x)
+ if (x < 1)
+ fun_l11_n8(x)
+ else
+ fun_l11_n153(x)
+ end
+end
+
+def fun_l10_n942(x)
+ if (x < 1)
+ fun_l11_n798(x)
+ else
+ fun_l11_n873(x)
+ end
+end
+
+def fun_l10_n943(x)
+ if (x < 1)
+ fun_l11_n862(x)
+ else
+ fun_l11_n293(x)
+ end
+end
+
+def fun_l10_n944(x)
+ if (x < 1)
+ fun_l11_n554(x)
+ else
+ fun_l11_n599(x)
+ end
+end
+
+def fun_l10_n945(x)
+ if (x < 1)
+ fun_l11_n134(x)
+ else
+ fun_l11_n535(x)
+ end
+end
+
+def fun_l10_n946(x)
+ if (x < 1)
+ fun_l11_n992(x)
+ else
+ fun_l11_n624(x)
+ end
+end
+
+def fun_l10_n947(x)
+ if (x < 1)
+ fun_l11_n436(x)
+ else
+ fun_l11_n153(x)
+ end
+end
+
+def fun_l10_n948(x)
+ if (x < 1)
+ fun_l11_n72(x)
+ else
+ fun_l11_n154(x)
+ end
+end
+
+def fun_l10_n949(x)
+ if (x < 1)
+ fun_l11_n61(x)
+ else
+ fun_l11_n612(x)
+ end
+end
+
+def fun_l10_n950(x)
+ if (x < 1)
+ fun_l11_n964(x)
+ else
+ fun_l11_n999(x)
+ end
+end
+
+def fun_l10_n951(x)
+ if (x < 1)
+ fun_l11_n689(x)
+ else
+ fun_l11_n165(x)
+ end
+end
+
+def fun_l10_n952(x)
+ if (x < 1)
+ fun_l11_n856(x)
+ else
+ fun_l11_n7(x)
+ end
+end
+
+def fun_l10_n953(x)
+ if (x < 1)
+ fun_l11_n421(x)
+ else
+ fun_l11_n416(x)
+ end
+end
+
+def fun_l10_n954(x)
+ if (x < 1)
+ fun_l11_n969(x)
+ else
+ fun_l11_n260(x)
+ end
+end
+
+def fun_l10_n955(x)
+ if (x < 1)
+ fun_l11_n716(x)
+ else
+ fun_l11_n364(x)
+ end
+end
+
+def fun_l10_n956(x)
+ if (x < 1)
+ fun_l11_n491(x)
+ else
+ fun_l11_n575(x)
+ end
+end
+
+def fun_l10_n957(x)
+ if (x < 1)
+ fun_l11_n522(x)
+ else
+ fun_l11_n430(x)
+ end
+end
+
+def fun_l10_n958(x)
+ if (x < 1)
+ fun_l11_n712(x)
+ else
+ fun_l11_n939(x)
+ end
+end
+
+def fun_l10_n959(x)
+ if (x < 1)
+ fun_l11_n230(x)
+ else
+ fun_l11_n819(x)
+ end
+end
+
+def fun_l10_n960(x)
+ if (x < 1)
+ fun_l11_n790(x)
+ else
+ fun_l11_n939(x)
+ end
+end
+
+def fun_l10_n961(x)
+ if (x < 1)
+ fun_l11_n844(x)
+ else
+ fun_l11_n847(x)
+ end
+end
+
+def fun_l10_n962(x)
+ if (x < 1)
+ fun_l11_n105(x)
+ else
+ fun_l11_n722(x)
+ end
+end
+
+def fun_l10_n963(x)
+ if (x < 1)
+ fun_l11_n166(x)
+ else
+ fun_l11_n990(x)
+ end
+end
+
+def fun_l10_n964(x)
+ if (x < 1)
+ fun_l11_n224(x)
+ else
+ fun_l11_n751(x)
+ end
+end
+
+def fun_l10_n965(x)
+ if (x < 1)
+ fun_l11_n809(x)
+ else
+ fun_l11_n739(x)
+ end
+end
+
+def fun_l10_n966(x)
+ if (x < 1)
+ fun_l11_n840(x)
+ else
+ fun_l11_n795(x)
+ end
+end
+
+def fun_l10_n967(x)
+ if (x < 1)
+ fun_l11_n791(x)
+ else
+ fun_l11_n926(x)
+ end
+end
+
+def fun_l10_n968(x)
+ if (x < 1)
+ fun_l11_n484(x)
+ else
+ fun_l11_n409(x)
+ end
+end
+
+def fun_l10_n969(x)
+ if (x < 1)
+ fun_l11_n22(x)
+ else
+ fun_l11_n284(x)
+ end
+end
+
+def fun_l10_n970(x)
+ if (x < 1)
+ fun_l11_n539(x)
+ else
+ fun_l11_n661(x)
+ end
+end
+
+def fun_l10_n971(x)
+ if (x < 1)
+ fun_l11_n453(x)
+ else
+ fun_l11_n619(x)
+ end
+end
+
+def fun_l10_n972(x)
+ if (x < 1)
+ fun_l11_n80(x)
+ else
+ fun_l11_n848(x)
+ end
+end
+
+def fun_l10_n973(x)
+ if (x < 1)
+ fun_l11_n599(x)
+ else
+ fun_l11_n147(x)
+ end
+end
+
+def fun_l10_n974(x)
+ if (x < 1)
+ fun_l11_n784(x)
+ else
+ fun_l11_n603(x)
+ end
+end
+
+def fun_l10_n975(x)
+ if (x < 1)
+ fun_l11_n166(x)
+ else
+ fun_l11_n12(x)
+ end
+end
+
+def fun_l10_n976(x)
+ if (x < 1)
+ fun_l11_n739(x)
+ else
+ fun_l11_n381(x)
+ end
+end
+
+def fun_l10_n977(x)
+ if (x < 1)
+ fun_l11_n45(x)
+ else
+ fun_l11_n67(x)
+ end
+end
+
+def fun_l10_n978(x)
+ if (x < 1)
+ fun_l11_n243(x)
+ else
+ fun_l11_n51(x)
+ end
+end
+
+def fun_l10_n979(x)
+ if (x < 1)
+ fun_l11_n964(x)
+ else
+ fun_l11_n949(x)
+ end
+end
+
+def fun_l10_n980(x)
+ if (x < 1)
+ fun_l11_n881(x)
+ else
+ fun_l11_n893(x)
+ end
+end
+
+def fun_l10_n981(x)
+ if (x < 1)
+ fun_l11_n808(x)
+ else
+ fun_l11_n205(x)
+ end
+end
+
+def fun_l10_n982(x)
+ if (x < 1)
+ fun_l11_n897(x)
+ else
+ fun_l11_n259(x)
+ end
+end
+
+def fun_l10_n983(x)
+ if (x < 1)
+ fun_l11_n671(x)
+ else
+ fun_l11_n115(x)
+ end
+end
+
+def fun_l10_n984(x)
+ if (x < 1)
+ fun_l11_n9(x)
+ else
+ fun_l11_n994(x)
+ end
+end
+
+def fun_l10_n985(x)
+ if (x < 1)
+ fun_l11_n663(x)
+ else
+ fun_l11_n979(x)
+ end
+end
+
+def fun_l10_n986(x)
+ if (x < 1)
+ fun_l11_n8(x)
+ else
+ fun_l11_n949(x)
+ end
+end
+
+def fun_l10_n987(x)
+ if (x < 1)
+ fun_l11_n230(x)
+ else
+ fun_l11_n822(x)
+ end
+end
+
+def fun_l10_n988(x)
+ if (x < 1)
+ fun_l11_n767(x)
+ else
+ fun_l11_n691(x)
+ end
+end
+
+def fun_l10_n989(x)
+ if (x < 1)
+ fun_l11_n524(x)
+ else
+ fun_l11_n514(x)
+ end
+end
+
+def fun_l10_n990(x)
+ if (x < 1)
+ fun_l11_n556(x)
+ else
+ fun_l11_n34(x)
+ end
+end
+
+def fun_l10_n991(x)
+ if (x < 1)
+ fun_l11_n516(x)
+ else
+ fun_l11_n817(x)
+ end
+end
+
+def fun_l10_n992(x)
+ if (x < 1)
+ fun_l11_n273(x)
+ else
+ fun_l11_n189(x)
+ end
+end
+
+def fun_l10_n993(x)
+ if (x < 1)
+ fun_l11_n726(x)
+ else
+ fun_l11_n260(x)
+ end
+end
+
+def fun_l10_n994(x)
+ if (x < 1)
+ fun_l11_n789(x)
+ else
+ fun_l11_n993(x)
+ end
+end
+
+def fun_l10_n995(x)
+ if (x < 1)
+ fun_l11_n187(x)
+ else
+ fun_l11_n291(x)
+ end
+end
+
+def fun_l10_n996(x)
+ if (x < 1)
+ fun_l11_n145(x)
+ else
+ fun_l11_n500(x)
+ end
+end
+
+def fun_l10_n997(x)
+ if (x < 1)
+ fun_l11_n437(x)
+ else
+ fun_l11_n925(x)
+ end
+end
+
+def fun_l10_n998(x)
+ if (x < 1)
+ fun_l11_n945(x)
+ else
+ fun_l11_n300(x)
+ end
+end
+
+def fun_l10_n999(x)
+ if (x < 1)
+ fun_l11_n703(x)
+ else
+ fun_l11_n542(x)
+ end
+end
+
+def fun_l11_n0(x)
+ if (x < 1)
+ fun_l12_n539(x)
+ else
+ fun_l12_n60(x)
+ end
+end
+
+def fun_l11_n1(x)
+ if (x < 1)
+ fun_l12_n659(x)
+ else
+ fun_l12_n739(x)
+ end
+end
+
+def fun_l11_n2(x)
+ if (x < 1)
+ fun_l12_n273(x)
+ else
+ fun_l12_n392(x)
+ end
+end
+
+def fun_l11_n3(x)
+ if (x < 1)
+ fun_l12_n394(x)
+ else
+ fun_l12_n989(x)
+ end
+end
+
+def fun_l11_n4(x)
+ if (x < 1)
+ fun_l12_n254(x)
+ else
+ fun_l12_n906(x)
+ end
+end
+
+def fun_l11_n5(x)
+ if (x < 1)
+ fun_l12_n229(x)
+ else
+ fun_l12_n345(x)
+ end
+end
+
+def fun_l11_n6(x)
+ if (x < 1)
+ fun_l12_n15(x)
+ else
+ fun_l12_n893(x)
+ end
+end
+
+def fun_l11_n7(x)
+ if (x < 1)
+ fun_l12_n185(x)
+ else
+ fun_l12_n187(x)
+ end
+end
+
+def fun_l11_n8(x)
+ if (x < 1)
+ fun_l12_n761(x)
+ else
+ fun_l12_n850(x)
+ end
+end
+
+def fun_l11_n9(x)
+ if (x < 1)
+ fun_l12_n644(x)
+ else
+ fun_l12_n274(x)
+ end
+end
+
+def fun_l11_n10(x)
+ if (x < 1)
+ fun_l12_n652(x)
+ else
+ fun_l12_n223(x)
+ end
+end
+
+def fun_l11_n11(x)
+ if (x < 1)
+ fun_l12_n905(x)
+ else
+ fun_l12_n215(x)
+ end
+end
+
+def fun_l11_n12(x)
+ if (x < 1)
+ fun_l12_n58(x)
+ else
+ fun_l12_n495(x)
+ end
+end
+
+def fun_l11_n13(x)
+ if (x < 1)
+ fun_l12_n529(x)
+ else
+ fun_l12_n477(x)
+ end
+end
+
+def fun_l11_n14(x)
+ if (x < 1)
+ fun_l12_n743(x)
+ else
+ fun_l12_n847(x)
+ end
+end
+
+def fun_l11_n15(x)
+ if (x < 1)
+ fun_l12_n558(x)
+ else
+ fun_l12_n252(x)
+ end
+end
+
+def fun_l11_n16(x)
+ if (x < 1)
+ fun_l12_n115(x)
+ else
+ fun_l12_n972(x)
+ end
+end
+
+def fun_l11_n17(x)
+ if (x < 1)
+ fun_l12_n374(x)
+ else
+ fun_l12_n637(x)
+ end
+end
+
+def fun_l11_n18(x)
+ if (x < 1)
+ fun_l12_n978(x)
+ else
+ fun_l12_n570(x)
+ end
+end
+
+def fun_l11_n19(x)
+ if (x < 1)
+ fun_l12_n264(x)
+ else
+ fun_l12_n743(x)
+ end
+end
+
+def fun_l11_n20(x)
+ if (x < 1)
+ fun_l12_n936(x)
+ else
+ fun_l12_n986(x)
+ end
+end
+
+def fun_l11_n21(x)
+ if (x < 1)
+ fun_l12_n107(x)
+ else
+ fun_l12_n167(x)
+ end
+end
+
+def fun_l11_n22(x)
+ if (x < 1)
+ fun_l12_n777(x)
+ else
+ fun_l12_n143(x)
+ end
+end
+
+def fun_l11_n23(x)
+ if (x < 1)
+ fun_l12_n510(x)
+ else
+ fun_l12_n236(x)
+ end
+end
+
+def fun_l11_n24(x)
+ if (x < 1)
+ fun_l12_n180(x)
+ else
+ fun_l12_n309(x)
+ end
+end
+
+def fun_l11_n25(x)
+ if (x < 1)
+ fun_l12_n850(x)
+ else
+ fun_l12_n374(x)
+ end
+end
+
+def fun_l11_n26(x)
+ if (x < 1)
+ fun_l12_n573(x)
+ else
+ fun_l12_n722(x)
+ end
+end
+
+def fun_l11_n27(x)
+ if (x < 1)
+ fun_l12_n800(x)
+ else
+ fun_l12_n981(x)
+ end
+end
+
+def fun_l11_n28(x)
+ if (x < 1)
+ fun_l12_n705(x)
+ else
+ fun_l12_n636(x)
+ end
+end
+
+def fun_l11_n29(x)
+ if (x < 1)
+ fun_l12_n618(x)
+ else
+ fun_l12_n429(x)
+ end
+end
+
+def fun_l11_n30(x)
+ if (x < 1)
+ fun_l12_n139(x)
+ else
+ fun_l12_n95(x)
+ end
+end
+
+def fun_l11_n31(x)
+ if (x < 1)
+ fun_l12_n861(x)
+ else
+ fun_l12_n797(x)
+ end
+end
+
+def fun_l11_n32(x)
+ if (x < 1)
+ fun_l12_n576(x)
+ else
+ fun_l12_n719(x)
+ end
+end
+
+def fun_l11_n33(x)
+ if (x < 1)
+ fun_l12_n236(x)
+ else
+ fun_l12_n429(x)
+ end
+end
+
+def fun_l11_n34(x)
+ if (x < 1)
+ fun_l12_n375(x)
+ else
+ fun_l12_n696(x)
+ end
+end
+
+def fun_l11_n35(x)
+ if (x < 1)
+ fun_l12_n291(x)
+ else
+ fun_l12_n799(x)
+ end
+end
+
+def fun_l11_n36(x)
+ if (x < 1)
+ fun_l12_n180(x)
+ else
+ fun_l12_n228(x)
+ end
+end
+
+def fun_l11_n37(x)
+ if (x < 1)
+ fun_l12_n455(x)
+ else
+ fun_l12_n983(x)
+ end
+end
+
+def fun_l11_n38(x)
+ if (x < 1)
+ fun_l12_n486(x)
+ else
+ fun_l12_n871(x)
+ end
+end
+
+def fun_l11_n39(x)
+ if (x < 1)
+ fun_l12_n945(x)
+ else
+ fun_l12_n47(x)
+ end
+end
+
+def fun_l11_n40(x)
+ if (x < 1)
+ fun_l12_n531(x)
+ else
+ fun_l12_n506(x)
+ end
+end
+
+def fun_l11_n41(x)
+ if (x < 1)
+ fun_l12_n248(x)
+ else
+ fun_l12_n142(x)
+ end
+end
+
+def fun_l11_n42(x)
+ if (x < 1)
+ fun_l12_n415(x)
+ else
+ fun_l12_n177(x)
+ end
+end
+
+def fun_l11_n43(x)
+ if (x < 1)
+ fun_l12_n560(x)
+ else
+ fun_l12_n63(x)
+ end
+end
+
+def fun_l11_n44(x)
+ if (x < 1)
+ fun_l12_n180(x)
+ else
+ fun_l12_n268(x)
+ end
+end
+
+def fun_l11_n45(x)
+ if (x < 1)
+ fun_l12_n814(x)
+ else
+ fun_l12_n967(x)
+ end
+end
+
+def fun_l11_n46(x)
+ if (x < 1)
+ fun_l12_n273(x)
+ else
+ fun_l12_n702(x)
+ end
+end
+
+def fun_l11_n47(x)
+ if (x < 1)
+ fun_l12_n626(x)
+ else
+ fun_l12_n615(x)
+ end
+end
+
+def fun_l11_n48(x)
+ if (x < 1)
+ fun_l12_n374(x)
+ else
+ fun_l12_n669(x)
+ end
+end
+
+def fun_l11_n49(x)
+ if (x < 1)
+ fun_l12_n681(x)
+ else
+ fun_l12_n48(x)
+ end
+end
+
+def fun_l11_n50(x)
+ if (x < 1)
+ fun_l12_n3(x)
+ else
+ fun_l12_n455(x)
+ end
+end
+
+def fun_l11_n51(x)
+ if (x < 1)
+ fun_l12_n461(x)
+ else
+ fun_l12_n350(x)
+ end
+end
+
+def fun_l11_n52(x)
+ if (x < 1)
+ fun_l12_n129(x)
+ else
+ fun_l12_n266(x)
+ end
+end
+
+def fun_l11_n53(x)
+ if (x < 1)
+ fun_l12_n802(x)
+ else
+ fun_l12_n863(x)
+ end
+end
+
+def fun_l11_n54(x)
+ if (x < 1)
+ fun_l12_n216(x)
+ else
+ fun_l12_n820(x)
+ end
+end
+
+def fun_l11_n55(x)
+ if (x < 1)
+ fun_l12_n626(x)
+ else
+ fun_l12_n476(x)
+ end
+end
+
+def fun_l11_n56(x)
+ if (x < 1)
+ fun_l12_n162(x)
+ else
+ fun_l12_n796(x)
+ end
+end
+
+def fun_l11_n57(x)
+ if (x < 1)
+ fun_l12_n45(x)
+ else
+ fun_l12_n893(x)
+ end
+end
+
+def fun_l11_n58(x)
+ if (x < 1)
+ fun_l12_n227(x)
+ else
+ fun_l12_n919(x)
+ end
+end
+
+def fun_l11_n59(x)
+ if (x < 1)
+ fun_l12_n300(x)
+ else
+ fun_l12_n360(x)
+ end
+end
+
+def fun_l11_n60(x)
+ if (x < 1)
+ fun_l12_n265(x)
+ else
+ fun_l12_n552(x)
+ end
+end
+
+def fun_l11_n61(x)
+ if (x < 1)
+ fun_l12_n927(x)
+ else
+ fun_l12_n486(x)
+ end
+end
+
+def fun_l11_n62(x)
+ if (x < 1)
+ fun_l12_n94(x)
+ else
+ fun_l12_n28(x)
+ end
+end
+
+def fun_l11_n63(x)
+ if (x < 1)
+ fun_l12_n295(x)
+ else
+ fun_l12_n967(x)
+ end
+end
+
+def fun_l11_n64(x)
+ if (x < 1)
+ fun_l12_n713(x)
+ else
+ fun_l12_n463(x)
+ end
+end
+
+def fun_l11_n65(x)
+ if (x < 1)
+ fun_l12_n454(x)
+ else
+ fun_l12_n616(x)
+ end
+end
+
+def fun_l11_n66(x)
+ if (x < 1)
+ fun_l12_n121(x)
+ else
+ fun_l12_n277(x)
+ end
+end
+
+def fun_l11_n67(x)
+ if (x < 1)
+ fun_l12_n524(x)
+ else
+ fun_l12_n242(x)
+ end
+end
+
+def fun_l11_n68(x)
+ if (x < 1)
+ fun_l12_n570(x)
+ else
+ fun_l12_n658(x)
+ end
+end
+
+def fun_l11_n69(x)
+ if (x < 1)
+ fun_l12_n343(x)
+ else
+ fun_l12_n826(x)
+ end
+end
+
+def fun_l11_n70(x)
+ if (x < 1)
+ fun_l12_n732(x)
+ else
+ fun_l12_n993(x)
+ end
+end
+
+def fun_l11_n71(x)
+ if (x < 1)
+ fun_l12_n380(x)
+ else
+ fun_l12_n486(x)
+ end
+end
+
+def fun_l11_n72(x)
+ if (x < 1)
+ fun_l12_n55(x)
+ else
+ fun_l12_n342(x)
+ end
+end
+
+def fun_l11_n73(x)
+ if (x < 1)
+ fun_l12_n789(x)
+ else
+ fun_l12_n646(x)
+ end
+end
+
+def fun_l11_n74(x)
+ if (x < 1)
+ fun_l12_n106(x)
+ else
+ fun_l12_n557(x)
+ end
+end
+
+def fun_l11_n75(x)
+ if (x < 1)
+ fun_l12_n368(x)
+ else
+ fun_l12_n5(x)
+ end
+end
+
+def fun_l11_n76(x)
+ if (x < 1)
+ fun_l12_n992(x)
+ else
+ fun_l12_n521(x)
+ end
+end
+
+def fun_l11_n77(x)
+ if (x < 1)
+ fun_l12_n754(x)
+ else
+ fun_l12_n259(x)
+ end
+end
+
+def fun_l11_n78(x)
+ if (x < 1)
+ fun_l12_n855(x)
+ else
+ fun_l12_n946(x)
+ end
+end
+
+def fun_l11_n79(x)
+ if (x < 1)
+ fun_l12_n727(x)
+ else
+ fun_l12_n422(x)
+ end
+end
+
+def fun_l11_n80(x)
+ if (x < 1)
+ fun_l12_n649(x)
+ else
+ fun_l12_n593(x)
+ end
+end
+
+def fun_l11_n81(x)
+ if (x < 1)
+ fun_l12_n206(x)
+ else
+ fun_l12_n222(x)
+ end
+end
+
+def fun_l11_n82(x)
+ if (x < 1)
+ fun_l12_n995(x)
+ else
+ fun_l12_n471(x)
+ end
+end
+
+def fun_l11_n83(x)
+ if (x < 1)
+ fun_l12_n926(x)
+ else
+ fun_l12_n165(x)
+ end
+end
+
+def fun_l11_n84(x)
+ if (x < 1)
+ fun_l12_n988(x)
+ else
+ fun_l12_n495(x)
+ end
+end
+
+def fun_l11_n85(x)
+ if (x < 1)
+ fun_l12_n839(x)
+ else
+ fun_l12_n565(x)
+ end
+end
+
+def fun_l11_n86(x)
+ if (x < 1)
+ fun_l12_n381(x)
+ else
+ fun_l12_n981(x)
+ end
+end
+
+def fun_l11_n87(x)
+ if (x < 1)
+ fun_l12_n64(x)
+ else
+ fun_l12_n616(x)
+ end
+end
+
+def fun_l11_n88(x)
+ if (x < 1)
+ fun_l12_n714(x)
+ else
+ fun_l12_n995(x)
+ end
+end
+
+def fun_l11_n89(x)
+ if (x < 1)
+ fun_l12_n796(x)
+ else
+ fun_l12_n534(x)
+ end
+end
+
+def fun_l11_n90(x)
+ if (x < 1)
+ fun_l12_n31(x)
+ else
+ fun_l12_n584(x)
+ end
+end
+
+def fun_l11_n91(x)
+ if (x < 1)
+ fun_l12_n741(x)
+ else
+ fun_l12_n356(x)
+ end
+end
+
+def fun_l11_n92(x)
+ if (x < 1)
+ fun_l12_n418(x)
+ else
+ fun_l12_n184(x)
+ end
+end
+
+def fun_l11_n93(x)
+ if (x < 1)
+ fun_l12_n427(x)
+ else
+ fun_l12_n136(x)
+ end
+end
+
+def fun_l11_n94(x)
+ if (x < 1)
+ fun_l12_n968(x)
+ else
+ fun_l12_n647(x)
+ end
+end
+
+def fun_l11_n95(x)
+ if (x < 1)
+ fun_l12_n641(x)
+ else
+ fun_l12_n675(x)
+ end
+end
+
+def fun_l11_n96(x)
+ if (x < 1)
+ fun_l12_n465(x)
+ else
+ fun_l12_n507(x)
+ end
+end
+
+def fun_l11_n97(x)
+ if (x < 1)
+ fun_l12_n910(x)
+ else
+ fun_l12_n718(x)
+ end
+end
+
+def fun_l11_n98(x)
+ if (x < 1)
+ fun_l12_n686(x)
+ else
+ fun_l12_n94(x)
+ end
+end
+
+def fun_l11_n99(x)
+ if (x < 1)
+ fun_l12_n94(x)
+ else
+ fun_l12_n632(x)
+ end
+end
+
+def fun_l11_n100(x)
+ if (x < 1)
+ fun_l12_n270(x)
+ else
+ fun_l12_n228(x)
+ end
+end
+
+def fun_l11_n101(x)
+ if (x < 1)
+ fun_l12_n569(x)
+ else
+ fun_l12_n492(x)
+ end
+end
+
+def fun_l11_n102(x)
+ if (x < 1)
+ fun_l12_n187(x)
+ else
+ fun_l12_n183(x)
+ end
+end
+
+def fun_l11_n103(x)
+ if (x < 1)
+ fun_l12_n894(x)
+ else
+ fun_l12_n655(x)
+ end
+end
+
+def fun_l11_n104(x)
+ if (x < 1)
+ fun_l12_n347(x)
+ else
+ fun_l12_n467(x)
+ end
+end
+
+def fun_l11_n105(x)
+ if (x < 1)
+ fun_l12_n198(x)
+ else
+ fun_l12_n838(x)
+ end
+end
+
+def fun_l11_n106(x)
+ if (x < 1)
+ fun_l12_n941(x)
+ else
+ fun_l12_n98(x)
+ end
+end
+
+def fun_l11_n107(x)
+ if (x < 1)
+ fun_l12_n406(x)
+ else
+ fun_l12_n773(x)
+ end
+end
+
+def fun_l11_n108(x)
+ if (x < 1)
+ fun_l12_n980(x)
+ else
+ fun_l12_n508(x)
+ end
+end
+
+def fun_l11_n109(x)
+ if (x < 1)
+ fun_l12_n286(x)
+ else
+ fun_l12_n928(x)
+ end
+end
+
+def fun_l11_n110(x)
+ if (x < 1)
+ fun_l12_n710(x)
+ else
+ fun_l12_n20(x)
+ end
+end
+
+def fun_l11_n111(x)
+ if (x < 1)
+ fun_l12_n358(x)
+ else
+ fun_l12_n549(x)
+ end
+end
+
+def fun_l11_n112(x)
+ if (x < 1)
+ fun_l12_n359(x)
+ else
+ fun_l12_n548(x)
+ end
+end
+
+def fun_l11_n113(x)
+ if (x < 1)
+ fun_l12_n665(x)
+ else
+ fun_l12_n802(x)
+ end
+end
+
+def fun_l11_n114(x)
+ if (x < 1)
+ fun_l12_n199(x)
+ else
+ fun_l12_n904(x)
+ end
+end
+
+def fun_l11_n115(x)
+ if (x < 1)
+ fun_l12_n995(x)
+ else
+ fun_l12_n319(x)
+ end
+end
+
+def fun_l11_n116(x)
+ if (x < 1)
+ fun_l12_n873(x)
+ else
+ fun_l12_n786(x)
+ end
+end
+
+def fun_l11_n117(x)
+ if (x < 1)
+ fun_l12_n147(x)
+ else
+ fun_l12_n542(x)
+ end
+end
+
+def fun_l11_n118(x)
+ if (x < 1)
+ fun_l12_n669(x)
+ else
+ fun_l12_n871(x)
+ end
+end
+
+def fun_l11_n119(x)
+ if (x < 1)
+ fun_l12_n552(x)
+ else
+ fun_l12_n998(x)
+ end
+end
+
+def fun_l11_n120(x)
+ if (x < 1)
+ fun_l12_n300(x)
+ else
+ fun_l12_n333(x)
+ end
+end
+
+def fun_l11_n121(x)
+ if (x < 1)
+ fun_l12_n846(x)
+ else
+ fun_l12_n133(x)
+ end
+end
+
+def fun_l11_n122(x)
+ if (x < 1)
+ fun_l12_n946(x)
+ else
+ fun_l12_n540(x)
+ end
+end
+
+def fun_l11_n123(x)
+ if (x < 1)
+ fun_l12_n71(x)
+ else
+ fun_l12_n264(x)
+ end
+end
+
+def fun_l11_n124(x)
+ if (x < 1)
+ fun_l12_n410(x)
+ else
+ fun_l12_n60(x)
+ end
+end
+
+def fun_l11_n125(x)
+ if (x < 1)
+ fun_l12_n62(x)
+ else
+ fun_l12_n211(x)
+ end
+end
+
+def fun_l11_n126(x)
+ if (x < 1)
+ fun_l12_n252(x)
+ else
+ fun_l12_n635(x)
+ end
+end
+
+def fun_l11_n127(x)
+ if (x < 1)
+ fun_l12_n444(x)
+ else
+ fun_l12_n735(x)
+ end
+end
+
+def fun_l11_n128(x)
+ if (x < 1)
+ fun_l12_n3(x)
+ else
+ fun_l12_n403(x)
+ end
+end
+
+def fun_l11_n129(x)
+ if (x < 1)
+ fun_l12_n121(x)
+ else
+ fun_l12_n882(x)
+ end
+end
+
+def fun_l11_n130(x)
+ if (x < 1)
+ fun_l12_n985(x)
+ else
+ fun_l12_n983(x)
+ end
+end
+
+def fun_l11_n131(x)
+ if (x < 1)
+ fun_l12_n413(x)
+ else
+ fun_l12_n117(x)
+ end
+end
+
+def fun_l11_n132(x)
+ if (x < 1)
+ fun_l12_n856(x)
+ else
+ fun_l12_n312(x)
+ end
+end
+
+def fun_l11_n133(x)
+ if (x < 1)
+ fun_l12_n249(x)
+ else
+ fun_l12_n870(x)
+ end
+end
+
+def fun_l11_n134(x)
+ if (x < 1)
+ fun_l12_n367(x)
+ else
+ fun_l12_n748(x)
+ end
+end
+
+def fun_l11_n135(x)
+ if (x < 1)
+ fun_l12_n670(x)
+ else
+ fun_l12_n464(x)
+ end
+end
+
+def fun_l11_n136(x)
+ if (x < 1)
+ fun_l12_n698(x)
+ else
+ fun_l12_n238(x)
+ end
+end
+
+def fun_l11_n137(x)
+ if (x < 1)
+ fun_l12_n856(x)
+ else
+ fun_l12_n660(x)
+ end
+end
+
+def fun_l11_n138(x)
+ if (x < 1)
+ fun_l12_n693(x)
+ else
+ fun_l12_n793(x)
+ end
+end
+
+def fun_l11_n139(x)
+ if (x < 1)
+ fun_l12_n959(x)
+ else
+ fun_l12_n377(x)
+ end
+end
+
+def fun_l11_n140(x)
+ if (x < 1)
+ fun_l12_n24(x)
+ else
+ fun_l12_n250(x)
+ end
+end
+
+def fun_l11_n141(x)
+ if (x < 1)
+ fun_l12_n270(x)
+ else
+ fun_l12_n720(x)
+ end
+end
+
+def fun_l11_n142(x)
+ if (x < 1)
+ fun_l12_n775(x)
+ else
+ fun_l12_n781(x)
+ end
+end
+
+def fun_l11_n143(x)
+ if (x < 1)
+ fun_l12_n266(x)
+ else
+ fun_l12_n608(x)
+ end
+end
+
+def fun_l11_n144(x)
+ if (x < 1)
+ fun_l12_n196(x)
+ else
+ fun_l12_n70(x)
+ end
+end
+
+def fun_l11_n145(x)
+ if (x < 1)
+ fun_l12_n100(x)
+ else
+ fun_l12_n846(x)
+ end
+end
+
+def fun_l11_n146(x)
+ if (x < 1)
+ fun_l12_n406(x)
+ else
+ fun_l12_n966(x)
+ end
+end
+
+def fun_l11_n147(x)
+ if (x < 1)
+ fun_l12_n816(x)
+ else
+ fun_l12_n54(x)
+ end
+end
+
+def fun_l11_n148(x)
+ if (x < 1)
+ fun_l12_n856(x)
+ else
+ fun_l12_n710(x)
+ end
+end
+
+def fun_l11_n149(x)
+ if (x < 1)
+ fun_l12_n597(x)
+ else
+ fun_l12_n596(x)
+ end
+end
+
+def fun_l11_n150(x)
+ if (x < 1)
+ fun_l12_n938(x)
+ else
+ fun_l12_n349(x)
+ end
+end
+
+def fun_l11_n151(x)
+ if (x < 1)
+ fun_l12_n987(x)
+ else
+ fun_l12_n231(x)
+ end
+end
+
+def fun_l11_n152(x)
+ if (x < 1)
+ fun_l12_n67(x)
+ else
+ fun_l12_n685(x)
+ end
+end
+
+def fun_l11_n153(x)
+ if (x < 1)
+ fun_l12_n786(x)
+ else
+ fun_l12_n71(x)
+ end
+end
+
+def fun_l11_n154(x)
+ if (x < 1)
+ fun_l12_n245(x)
+ else
+ fun_l12_n109(x)
+ end
+end
+
+def fun_l11_n155(x)
+ if (x < 1)
+ fun_l12_n665(x)
+ else
+ fun_l12_n565(x)
+ end
+end
+
+def fun_l11_n156(x)
+ if (x < 1)
+ fun_l12_n885(x)
+ else
+ fun_l12_n27(x)
+ end
+end
+
+def fun_l11_n157(x)
+ if (x < 1)
+ fun_l12_n704(x)
+ else
+ fun_l12_n140(x)
+ end
+end
+
+def fun_l11_n158(x)
+ if (x < 1)
+ fun_l12_n505(x)
+ else
+ fun_l12_n428(x)
+ end
+end
+
+def fun_l11_n159(x)
+ if (x < 1)
+ fun_l12_n646(x)
+ else
+ fun_l12_n250(x)
+ end
+end
+
+def fun_l11_n160(x)
+ if (x < 1)
+ fun_l12_n125(x)
+ else
+ fun_l12_n22(x)
+ end
+end
+
+def fun_l11_n161(x)
+ if (x < 1)
+ fun_l12_n49(x)
+ else
+ fun_l12_n852(x)
+ end
+end
+
+def fun_l11_n162(x)
+ if (x < 1)
+ fun_l12_n992(x)
+ else
+ fun_l12_n321(x)
+ end
+end
+
+def fun_l11_n163(x)
+ if (x < 1)
+ fun_l12_n457(x)
+ else
+ fun_l12_n162(x)
+ end
+end
+
+def fun_l11_n164(x)
+ if (x < 1)
+ fun_l12_n612(x)
+ else
+ fun_l12_n107(x)
+ end
+end
+
+def fun_l11_n165(x)
+ if (x < 1)
+ fun_l12_n786(x)
+ else
+ fun_l12_n338(x)
+ end
+end
+
+def fun_l11_n166(x)
+ if (x < 1)
+ fun_l12_n623(x)
+ else
+ fun_l12_n18(x)
+ end
+end
+
+def fun_l11_n167(x)
+ if (x < 1)
+ fun_l12_n605(x)
+ else
+ fun_l12_n963(x)
+ end
+end
+
+def fun_l11_n168(x)
+ if (x < 1)
+ fun_l12_n111(x)
+ else
+ fun_l12_n822(x)
+ end
+end
+
+def fun_l11_n169(x)
+ if (x < 1)
+ fun_l12_n502(x)
+ else
+ fun_l12_n291(x)
+ end
+end
+
+def fun_l11_n170(x)
+ if (x < 1)
+ fun_l12_n984(x)
+ else
+ fun_l12_n950(x)
+ end
+end
+
+def fun_l11_n171(x)
+ if (x < 1)
+ fun_l12_n915(x)
+ else
+ fun_l12_n81(x)
+ end
+end
+
+def fun_l11_n172(x)
+ if (x < 1)
+ fun_l12_n839(x)
+ else
+ fun_l12_n405(x)
+ end
+end
+
+def fun_l11_n173(x)
+ if (x < 1)
+ fun_l12_n331(x)
+ else
+ fun_l12_n906(x)
+ end
+end
+
+def fun_l11_n174(x)
+ if (x < 1)
+ fun_l12_n698(x)
+ else
+ fun_l12_n378(x)
+ end
+end
+
+def fun_l11_n175(x)
+ if (x < 1)
+ fun_l12_n648(x)
+ else
+ fun_l12_n824(x)
+ end
+end
+
+def fun_l11_n176(x)
+ if (x < 1)
+ fun_l12_n876(x)
+ else
+ fun_l12_n873(x)
+ end
+end
+
+def fun_l11_n177(x)
+ if (x < 1)
+ fun_l12_n932(x)
+ else
+ fun_l12_n797(x)
+ end
+end
+
+def fun_l11_n178(x)
+ if (x < 1)
+ fun_l12_n975(x)
+ else
+ fun_l12_n166(x)
+ end
+end
+
+def fun_l11_n179(x)
+ if (x < 1)
+ fun_l12_n66(x)
+ else
+ fun_l12_n624(x)
+ end
+end
+
+def fun_l11_n180(x)
+ if (x < 1)
+ fun_l12_n676(x)
+ else
+ fun_l12_n603(x)
+ end
+end
+
+def fun_l11_n181(x)
+ if (x < 1)
+ fun_l12_n80(x)
+ else
+ fun_l12_n504(x)
+ end
+end
+
+def fun_l11_n182(x)
+ if (x < 1)
+ fun_l12_n465(x)
+ else
+ fun_l12_n319(x)
+ end
+end
+
+def fun_l11_n183(x)
+ if (x < 1)
+ fun_l12_n493(x)
+ else
+ fun_l12_n412(x)
+ end
+end
+
+def fun_l11_n184(x)
+ if (x < 1)
+ fun_l12_n278(x)
+ else
+ fun_l12_n145(x)
+ end
+end
+
+def fun_l11_n185(x)
+ if (x < 1)
+ fun_l12_n328(x)
+ else
+ fun_l12_n777(x)
+ end
+end
+
+def fun_l11_n186(x)
+ if (x < 1)
+ fun_l12_n120(x)
+ else
+ fun_l12_n462(x)
+ end
+end
+
+def fun_l11_n187(x)
+ if (x < 1)
+ fun_l12_n755(x)
+ else
+ fun_l12_n260(x)
+ end
+end
+
+def fun_l11_n188(x)
+ if (x < 1)
+ fun_l12_n378(x)
+ else
+ fun_l12_n174(x)
+ end
+end
+
+def fun_l11_n189(x)
+ if (x < 1)
+ fun_l12_n100(x)
+ else
+ fun_l12_n234(x)
+ end
+end
+
+def fun_l11_n190(x)
+ if (x < 1)
+ fun_l12_n132(x)
+ else
+ fun_l12_n437(x)
+ end
+end
+
+def fun_l11_n191(x)
+ if (x < 1)
+ fun_l12_n399(x)
+ else
+ fun_l12_n989(x)
+ end
+end
+
+def fun_l11_n192(x)
+ if (x < 1)
+ fun_l12_n355(x)
+ else
+ fun_l12_n953(x)
+ end
+end
+
+def fun_l11_n193(x)
+ if (x < 1)
+ fun_l12_n139(x)
+ else
+ fun_l12_n138(x)
+ end
+end
+
+def fun_l11_n194(x)
+ if (x < 1)
+ fun_l12_n294(x)
+ else
+ fun_l12_n676(x)
+ end
+end
+
+def fun_l11_n195(x)
+ if (x < 1)
+ fun_l12_n581(x)
+ else
+ fun_l12_n549(x)
+ end
+end
+
+def fun_l11_n196(x)
+ if (x < 1)
+ fun_l12_n555(x)
+ else
+ fun_l12_n738(x)
+ end
+end
+
+def fun_l11_n197(x)
+ if (x < 1)
+ fun_l12_n170(x)
+ else
+ fun_l12_n476(x)
+ end
+end
+
+def fun_l11_n198(x)
+ if (x < 1)
+ fun_l12_n350(x)
+ else
+ fun_l12_n576(x)
+ end
+end
+
+def fun_l11_n199(x)
+ if (x < 1)
+ fun_l12_n647(x)
+ else
+ fun_l12_n94(x)
+ end
+end
+
+def fun_l11_n200(x)
+ if (x < 1)
+ fun_l12_n28(x)
+ else
+ fun_l12_n706(x)
+ end
+end
+
+def fun_l11_n201(x)
+ if (x < 1)
+ fun_l12_n189(x)
+ else
+ fun_l12_n366(x)
+ end
+end
+
+def fun_l11_n202(x)
+ if (x < 1)
+ fun_l12_n690(x)
+ else
+ fun_l12_n807(x)
+ end
+end
+
+def fun_l11_n203(x)
+ if (x < 1)
+ fun_l12_n402(x)
+ else
+ fun_l12_n685(x)
+ end
+end
+
+def fun_l11_n204(x)
+ if (x < 1)
+ fun_l12_n232(x)
+ else
+ fun_l12_n257(x)
+ end
+end
+
+def fun_l11_n205(x)
+ if (x < 1)
+ fun_l12_n108(x)
+ else
+ fun_l12_n888(x)
+ end
+end
+
+def fun_l11_n206(x)
+ if (x < 1)
+ fun_l12_n494(x)
+ else
+ fun_l12_n372(x)
+ end
+end
+
+def fun_l11_n207(x)
+ if (x < 1)
+ fun_l12_n607(x)
+ else
+ fun_l12_n336(x)
+ end
+end
+
+def fun_l11_n208(x)
+ if (x < 1)
+ fun_l12_n913(x)
+ else
+ fun_l12_n134(x)
+ end
+end
+
+def fun_l11_n209(x)
+ if (x < 1)
+ fun_l12_n996(x)
+ else
+ fun_l12_n918(x)
+ end
+end
+
+def fun_l11_n210(x)
+ if (x < 1)
+ fun_l12_n674(x)
+ else
+ fun_l12_n260(x)
+ end
+end
+
+def fun_l11_n211(x)
+ if (x < 1)
+ fun_l12_n344(x)
+ else
+ fun_l12_n219(x)
+ end
+end
+
+def fun_l11_n212(x)
+ if (x < 1)
+ fun_l12_n161(x)
+ else
+ fun_l12_n415(x)
+ end
+end
+
+def fun_l11_n213(x)
+ if (x < 1)
+ fun_l12_n65(x)
+ else
+ fun_l12_n777(x)
+ end
+end
+
+def fun_l11_n214(x)
+ if (x < 1)
+ fun_l12_n369(x)
+ else
+ fun_l12_n899(x)
+ end
+end
+
+def fun_l11_n215(x)
+ if (x < 1)
+ fun_l12_n310(x)
+ else
+ fun_l12_n118(x)
+ end
+end
+
+def fun_l11_n216(x)
+ if (x < 1)
+ fun_l12_n326(x)
+ else
+ fun_l12_n823(x)
+ end
+end
+
+def fun_l11_n217(x)
+ if (x < 1)
+ fun_l12_n981(x)
+ else
+ fun_l12_n824(x)
+ end
+end
+
+def fun_l11_n218(x)
+ if (x < 1)
+ fun_l12_n425(x)
+ else
+ fun_l12_n483(x)
+ end
+end
+
+def fun_l11_n219(x)
+ if (x < 1)
+ fun_l12_n931(x)
+ else
+ fun_l12_n366(x)
+ end
+end
+
+def fun_l11_n220(x)
+ if (x < 1)
+ fun_l12_n325(x)
+ else
+ fun_l12_n926(x)
+ end
+end
+
+def fun_l11_n221(x)
+ if (x < 1)
+ fun_l12_n924(x)
+ else
+ fun_l12_n764(x)
+ end
+end
+
+def fun_l11_n222(x)
+ if (x < 1)
+ fun_l12_n407(x)
+ else
+ fun_l12_n137(x)
+ end
+end
+
+def fun_l11_n223(x)
+ if (x < 1)
+ fun_l12_n584(x)
+ else
+ fun_l12_n294(x)
+ end
+end
+
+def fun_l11_n224(x)
+ if (x < 1)
+ fun_l12_n39(x)
+ else
+ fun_l12_n795(x)
+ end
+end
+
+def fun_l11_n225(x)
+ if (x < 1)
+ fun_l12_n37(x)
+ else
+ fun_l12_n738(x)
+ end
+end
+
+def fun_l11_n226(x)
+ if (x < 1)
+ fun_l12_n779(x)
+ else
+ fun_l12_n152(x)
+ end
+end
+
+def fun_l11_n227(x)
+ if (x < 1)
+ fun_l12_n116(x)
+ else
+ fun_l12_n589(x)
+ end
+end
+
+def fun_l11_n228(x)
+ if (x < 1)
+ fun_l12_n500(x)
+ else
+ fun_l12_n916(x)
+ end
+end
+
+def fun_l11_n229(x)
+ if (x < 1)
+ fun_l12_n443(x)
+ else
+ fun_l12_n126(x)
+ end
+end
+
+def fun_l11_n230(x)
+ if (x < 1)
+ fun_l12_n311(x)
+ else
+ fun_l12_n184(x)
+ end
+end
+
+def fun_l11_n231(x)
+ if (x < 1)
+ fun_l12_n604(x)
+ else
+ fun_l12_n171(x)
+ end
+end
+
+def fun_l11_n232(x)
+ if (x < 1)
+ fun_l12_n287(x)
+ else
+ fun_l12_n899(x)
+ end
+end
+
+def fun_l11_n233(x)
+ if (x < 1)
+ fun_l12_n834(x)
+ else
+ fun_l12_n435(x)
+ end
+end
+
+def fun_l11_n234(x)
+ if (x < 1)
+ fun_l12_n187(x)
+ else
+ fun_l12_n584(x)
+ end
+end
+
+def fun_l11_n235(x)
+ if (x < 1)
+ fun_l12_n711(x)
+ else
+ fun_l12_n542(x)
+ end
+end
+
+def fun_l11_n236(x)
+ if (x < 1)
+ fun_l12_n797(x)
+ else
+ fun_l12_n702(x)
+ end
+end
+
+def fun_l11_n237(x)
+ if (x < 1)
+ fun_l12_n645(x)
+ else
+ fun_l12_n691(x)
+ end
+end
+
+def fun_l11_n238(x)
+ if (x < 1)
+ fun_l12_n920(x)
+ else
+ fun_l12_n97(x)
+ end
+end
+
+def fun_l11_n239(x)
+ if (x < 1)
+ fun_l12_n491(x)
+ else
+ fun_l12_n172(x)
+ end
+end
+
+def fun_l11_n240(x)
+ if (x < 1)
+ fun_l12_n882(x)
+ else
+ fun_l12_n596(x)
+ end
+end
+
+def fun_l11_n241(x)
+ if (x < 1)
+ fun_l12_n178(x)
+ else
+ fun_l12_n671(x)
+ end
+end
+
+def fun_l11_n242(x)
+ if (x < 1)
+ fun_l12_n483(x)
+ else
+ fun_l12_n143(x)
+ end
+end
+
+def fun_l11_n243(x)
+ if (x < 1)
+ fun_l12_n677(x)
+ else
+ fun_l12_n542(x)
+ end
+end
+
+def fun_l11_n244(x)
+ if (x < 1)
+ fun_l12_n676(x)
+ else
+ fun_l12_n873(x)
+ end
+end
+
+def fun_l11_n245(x)
+ if (x < 1)
+ fun_l12_n393(x)
+ else
+ fun_l12_n532(x)
+ end
+end
+
+def fun_l11_n246(x)
+ if (x < 1)
+ fun_l12_n704(x)
+ else
+ fun_l12_n885(x)
+ end
+end
+
+def fun_l11_n247(x)
+ if (x < 1)
+ fun_l12_n668(x)
+ else
+ fun_l12_n305(x)
+ end
+end
+
+def fun_l11_n248(x)
+ if (x < 1)
+ fun_l12_n925(x)
+ else
+ fun_l12_n342(x)
+ end
+end
+
+def fun_l11_n249(x)
+ if (x < 1)
+ fun_l12_n487(x)
+ else
+ fun_l12_n517(x)
+ end
+end
+
+def fun_l11_n250(x)
+ if (x < 1)
+ fun_l12_n889(x)
+ else
+ fun_l12_n91(x)
+ end
+end
+
+def fun_l11_n251(x)
+ if (x < 1)
+ fun_l12_n908(x)
+ else
+ fun_l12_n645(x)
+ end
+end
+
+def fun_l11_n252(x)
+ if (x < 1)
+ fun_l12_n747(x)
+ else
+ fun_l12_n736(x)
+ end
+end
+
+def fun_l11_n253(x)
+ if (x < 1)
+ fun_l12_n749(x)
+ else
+ fun_l12_n264(x)
+ end
+end
+
+def fun_l11_n254(x)
+ if (x < 1)
+ fun_l12_n353(x)
+ else
+ fun_l12_n120(x)
+ end
+end
+
+def fun_l11_n255(x)
+ if (x < 1)
+ fun_l12_n231(x)
+ else
+ fun_l12_n211(x)
+ end
+end
+
+def fun_l11_n256(x)
+ if (x < 1)
+ fun_l12_n66(x)
+ else
+ fun_l12_n998(x)
+ end
+end
+
+def fun_l11_n257(x)
+ if (x < 1)
+ fun_l12_n818(x)
+ else
+ fun_l12_n37(x)
+ end
+end
+
+def fun_l11_n258(x)
+ if (x < 1)
+ fun_l12_n96(x)
+ else
+ fun_l12_n489(x)
+ end
+end
+
+def fun_l11_n259(x)
+ if (x < 1)
+ fun_l12_n86(x)
+ else
+ fun_l12_n432(x)
+ end
+end
+
+def fun_l11_n260(x)
+ if (x < 1)
+ fun_l12_n774(x)
+ else
+ fun_l12_n203(x)
+ end
+end
+
+def fun_l11_n261(x)
+ if (x < 1)
+ fun_l12_n935(x)
+ else
+ fun_l12_n29(x)
+ end
+end
+
+def fun_l11_n262(x)
+ if (x < 1)
+ fun_l12_n599(x)
+ else
+ fun_l12_n204(x)
+ end
+end
+
+def fun_l11_n263(x)
+ if (x < 1)
+ fun_l12_n63(x)
+ else
+ fun_l12_n866(x)
+ end
+end
+
+def fun_l11_n264(x)
+ if (x < 1)
+ fun_l12_n892(x)
+ else
+ fun_l12_n847(x)
+ end
+end
+
+def fun_l11_n265(x)
+ if (x < 1)
+ fun_l12_n695(x)
+ else
+ fun_l12_n881(x)
+ end
+end
+
+def fun_l11_n266(x)
+ if (x < 1)
+ fun_l12_n176(x)
+ else
+ fun_l12_n39(x)
+ end
+end
+
+def fun_l11_n267(x)
+ if (x < 1)
+ fun_l12_n448(x)
+ else
+ fun_l12_n744(x)
+ end
+end
+
+def fun_l11_n268(x)
+ if (x < 1)
+ fun_l12_n587(x)
+ else
+ fun_l12_n462(x)
+ end
+end
+
+def fun_l11_n269(x)
+ if (x < 1)
+ fun_l12_n670(x)
+ else
+ fun_l12_n797(x)
+ end
+end
+
+def fun_l11_n270(x)
+ if (x < 1)
+ fun_l12_n856(x)
+ else
+ fun_l12_n903(x)
+ end
+end
+
+def fun_l11_n271(x)
+ if (x < 1)
+ fun_l12_n914(x)
+ else
+ fun_l12_n459(x)
+ end
+end
+
+def fun_l11_n272(x)
+ if (x < 1)
+ fun_l12_n932(x)
+ else
+ fun_l12_n10(x)
+ end
+end
+
+def fun_l11_n273(x)
+ if (x < 1)
+ fun_l12_n554(x)
+ else
+ fun_l12_n528(x)
+ end
+end
+
+def fun_l11_n274(x)
+ if (x < 1)
+ fun_l12_n698(x)
+ else
+ fun_l12_n899(x)
+ end
+end
+
+def fun_l11_n275(x)
+ if (x < 1)
+ fun_l12_n907(x)
+ else
+ fun_l12_n945(x)
+ end
+end
+
+def fun_l11_n276(x)
+ if (x < 1)
+ fun_l12_n421(x)
+ else
+ fun_l12_n575(x)
+ end
+end
+
+def fun_l11_n277(x)
+ if (x < 1)
+ fun_l12_n757(x)
+ else
+ fun_l12_n808(x)
+ end
+end
+
+def fun_l11_n278(x)
+ if (x < 1)
+ fun_l12_n527(x)
+ else
+ fun_l12_n438(x)
+ end
+end
+
+def fun_l11_n279(x)
+ if (x < 1)
+ fun_l12_n263(x)
+ else
+ fun_l12_n842(x)
+ end
+end
+
+def fun_l11_n280(x)
+ if (x < 1)
+ fun_l12_n603(x)
+ else
+ fun_l12_n899(x)
+ end
+end
+
+def fun_l11_n281(x)
+ if (x < 1)
+ fun_l12_n486(x)
+ else
+ fun_l12_n380(x)
+ end
+end
+
+def fun_l11_n282(x)
+ if (x < 1)
+ fun_l12_n699(x)
+ else
+ fun_l12_n199(x)
+ end
+end
+
+def fun_l11_n283(x)
+ if (x < 1)
+ fun_l12_n422(x)
+ else
+ fun_l12_n258(x)
+ end
+end
+
+def fun_l11_n284(x)
+ if (x < 1)
+ fun_l12_n255(x)
+ else
+ fun_l12_n752(x)
+ end
+end
+
+def fun_l11_n285(x)
+ if (x < 1)
+ fun_l12_n506(x)
+ else
+ fun_l12_n801(x)
+ end
+end
+
+def fun_l11_n286(x)
+ if (x < 1)
+ fun_l12_n535(x)
+ else
+ fun_l12_n892(x)
+ end
+end
+
+def fun_l11_n287(x)
+ if (x < 1)
+ fun_l12_n547(x)
+ else
+ fun_l12_n74(x)
+ end
+end
+
+def fun_l11_n288(x)
+ if (x < 1)
+ fun_l12_n923(x)
+ else
+ fun_l12_n135(x)
+ end
+end
+
+def fun_l11_n289(x)
+ if (x < 1)
+ fun_l12_n78(x)
+ else
+ fun_l12_n704(x)
+ end
+end
+
+def fun_l11_n290(x)
+ if (x < 1)
+ fun_l12_n771(x)
+ else
+ fun_l12_n915(x)
+ end
+end
+
+def fun_l11_n291(x)
+ if (x < 1)
+ fun_l12_n184(x)
+ else
+ fun_l12_n188(x)
+ end
+end
+
+def fun_l11_n292(x)
+ if (x < 1)
+ fun_l12_n736(x)
+ else
+ fun_l12_n190(x)
+ end
+end
+
+def fun_l11_n293(x)
+ if (x < 1)
+ fun_l12_n301(x)
+ else
+ fun_l12_n745(x)
+ end
+end
+
+def fun_l11_n294(x)
+ if (x < 1)
+ fun_l12_n525(x)
+ else
+ fun_l12_n603(x)
+ end
+end
+
+def fun_l11_n295(x)
+ if (x < 1)
+ fun_l12_n339(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n296(x)
+ if (x < 1)
+ fun_l12_n491(x)
+ else
+ fun_l12_n601(x)
+ end
+end
+
+def fun_l11_n297(x)
+ if (x < 1)
+ fun_l12_n449(x)
+ else
+ fun_l12_n361(x)
+ end
+end
+
+def fun_l11_n298(x)
+ if (x < 1)
+ fun_l12_n617(x)
+ else
+ fun_l12_n346(x)
+ end
+end
+
+def fun_l11_n299(x)
+ if (x < 1)
+ fun_l12_n578(x)
+ else
+ fun_l12_n147(x)
+ end
+end
+
+def fun_l11_n300(x)
+ if (x < 1)
+ fun_l12_n73(x)
+ else
+ fun_l12_n360(x)
+ end
+end
+
+def fun_l11_n301(x)
+ if (x < 1)
+ fun_l12_n398(x)
+ else
+ fun_l12_n749(x)
+ end
+end
+
+def fun_l11_n302(x)
+ if (x < 1)
+ fun_l12_n871(x)
+ else
+ fun_l12_n745(x)
+ end
+end
+
+def fun_l11_n303(x)
+ if (x < 1)
+ fun_l12_n669(x)
+ else
+ fun_l12_n196(x)
+ end
+end
+
+def fun_l11_n304(x)
+ if (x < 1)
+ fun_l12_n202(x)
+ else
+ fun_l12_n173(x)
+ end
+end
+
+def fun_l11_n305(x)
+ if (x < 1)
+ fun_l12_n975(x)
+ else
+ fun_l12_n859(x)
+ end
+end
+
+def fun_l11_n306(x)
+ if (x < 1)
+ fun_l12_n776(x)
+ else
+ fun_l12_n433(x)
+ end
+end
+
+def fun_l11_n307(x)
+ if (x < 1)
+ fun_l12_n760(x)
+ else
+ fun_l12_n4(x)
+ end
+end
+
+def fun_l11_n308(x)
+ if (x < 1)
+ fun_l12_n834(x)
+ else
+ fun_l12_n276(x)
+ end
+end
+
+def fun_l11_n309(x)
+ if (x < 1)
+ fun_l12_n162(x)
+ else
+ fun_l12_n741(x)
+ end
+end
+
+def fun_l11_n310(x)
+ if (x < 1)
+ fun_l12_n231(x)
+ else
+ fun_l12_n646(x)
+ end
+end
+
+def fun_l11_n311(x)
+ if (x < 1)
+ fun_l12_n90(x)
+ else
+ fun_l12_n46(x)
+ end
+end
+
+def fun_l11_n312(x)
+ if (x < 1)
+ fun_l12_n101(x)
+ else
+ fun_l12_n75(x)
+ end
+end
+
+def fun_l11_n313(x)
+ if (x < 1)
+ fun_l12_n415(x)
+ else
+ fun_l12_n535(x)
+ end
+end
+
+def fun_l11_n314(x)
+ if (x < 1)
+ fun_l12_n550(x)
+ else
+ fun_l12_n305(x)
+ end
+end
+
+def fun_l11_n315(x)
+ if (x < 1)
+ fun_l12_n971(x)
+ else
+ fun_l12_n700(x)
+ end
+end
+
+def fun_l11_n316(x)
+ if (x < 1)
+ fun_l12_n942(x)
+ else
+ fun_l12_n793(x)
+ end
+end
+
+def fun_l11_n317(x)
+ if (x < 1)
+ fun_l12_n771(x)
+ else
+ fun_l12_n383(x)
+ end
+end
+
+def fun_l11_n318(x)
+ if (x < 1)
+ fun_l12_n846(x)
+ else
+ fun_l12_n504(x)
+ end
+end
+
+def fun_l11_n319(x)
+ if (x < 1)
+ fun_l12_n28(x)
+ else
+ fun_l12_n174(x)
+ end
+end
+
+def fun_l11_n320(x)
+ if (x < 1)
+ fun_l12_n437(x)
+ else
+ fun_l12_n355(x)
+ end
+end
+
+def fun_l11_n321(x)
+ if (x < 1)
+ fun_l12_n954(x)
+ else
+ fun_l12_n78(x)
+ end
+end
+
+def fun_l11_n322(x)
+ if (x < 1)
+ fun_l12_n256(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n323(x)
+ if (x < 1)
+ fun_l12_n41(x)
+ else
+ fun_l12_n88(x)
+ end
+end
+
+def fun_l11_n324(x)
+ if (x < 1)
+ fun_l12_n256(x)
+ else
+ fun_l12_n162(x)
+ end
+end
+
+def fun_l11_n325(x)
+ if (x < 1)
+ fun_l12_n143(x)
+ else
+ fun_l12_n506(x)
+ end
+end
+
+def fun_l11_n326(x)
+ if (x < 1)
+ fun_l12_n686(x)
+ else
+ fun_l12_n968(x)
+ end
+end
+
+def fun_l11_n327(x)
+ if (x < 1)
+ fun_l12_n235(x)
+ else
+ fun_l12_n246(x)
+ end
+end
+
+def fun_l11_n328(x)
+ if (x < 1)
+ fun_l12_n85(x)
+ else
+ fun_l12_n125(x)
+ end
+end
+
+def fun_l11_n329(x)
+ if (x < 1)
+ fun_l12_n877(x)
+ else
+ fun_l12_n193(x)
+ end
+end
+
+def fun_l11_n330(x)
+ if (x < 1)
+ fun_l12_n678(x)
+ else
+ fun_l12_n147(x)
+ end
+end
+
+def fun_l11_n331(x)
+ if (x < 1)
+ fun_l12_n402(x)
+ else
+ fun_l12_n747(x)
+ end
+end
+
+def fun_l11_n332(x)
+ if (x < 1)
+ fun_l12_n390(x)
+ else
+ fun_l12_n852(x)
+ end
+end
+
+def fun_l11_n333(x)
+ if (x < 1)
+ fun_l12_n299(x)
+ else
+ fun_l12_n122(x)
+ end
+end
+
+def fun_l11_n334(x)
+ if (x < 1)
+ fun_l12_n398(x)
+ else
+ fun_l12_n886(x)
+ end
+end
+
+def fun_l11_n335(x)
+ if (x < 1)
+ fun_l12_n128(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n336(x)
+ if (x < 1)
+ fun_l12_n611(x)
+ else
+ fun_l12_n75(x)
+ end
+end
+
+def fun_l11_n337(x)
+ if (x < 1)
+ fun_l12_n327(x)
+ else
+ fun_l12_n442(x)
+ end
+end
+
+def fun_l11_n338(x)
+ if (x < 1)
+ fun_l12_n353(x)
+ else
+ fun_l12_n259(x)
+ end
+end
+
+def fun_l11_n339(x)
+ if (x < 1)
+ fun_l12_n173(x)
+ else
+ fun_l12_n846(x)
+ end
+end
+
+def fun_l11_n340(x)
+ if (x < 1)
+ fun_l12_n579(x)
+ else
+ fun_l12_n869(x)
+ end
+end
+
+def fun_l11_n341(x)
+ if (x < 1)
+ fun_l12_n336(x)
+ else
+ fun_l12_n364(x)
+ end
+end
+
+def fun_l11_n342(x)
+ if (x < 1)
+ fun_l12_n355(x)
+ else
+ fun_l12_n317(x)
+ end
+end
+
+def fun_l11_n343(x)
+ if (x < 1)
+ fun_l12_n560(x)
+ else
+ fun_l12_n202(x)
+ end
+end
+
+def fun_l11_n344(x)
+ if (x < 1)
+ fun_l12_n232(x)
+ else
+ fun_l12_n447(x)
+ end
+end
+
+def fun_l11_n345(x)
+ if (x < 1)
+ fun_l12_n712(x)
+ else
+ fun_l12_n205(x)
+ end
+end
+
+def fun_l11_n346(x)
+ if (x < 1)
+ fun_l12_n102(x)
+ else
+ fun_l12_n785(x)
+ end
+end
+
+def fun_l11_n347(x)
+ if (x < 1)
+ fun_l12_n545(x)
+ else
+ fun_l12_n186(x)
+ end
+end
+
+def fun_l11_n348(x)
+ if (x < 1)
+ fun_l12_n530(x)
+ else
+ fun_l12_n705(x)
+ end
+end
+
+def fun_l11_n349(x)
+ if (x < 1)
+ fun_l12_n428(x)
+ else
+ fun_l12_n295(x)
+ end
+end
+
+def fun_l11_n350(x)
+ if (x < 1)
+ fun_l12_n855(x)
+ else
+ fun_l12_n232(x)
+ end
+end
+
+def fun_l11_n351(x)
+ if (x < 1)
+ fun_l12_n759(x)
+ else
+ fun_l12_n13(x)
+ end
+end
+
+def fun_l11_n352(x)
+ if (x < 1)
+ fun_l12_n366(x)
+ else
+ fun_l12_n700(x)
+ end
+end
+
+def fun_l11_n353(x)
+ if (x < 1)
+ fun_l12_n814(x)
+ else
+ fun_l12_n101(x)
+ end
+end
+
+def fun_l11_n354(x)
+ if (x < 1)
+ fun_l12_n788(x)
+ else
+ fun_l12_n509(x)
+ end
+end
+
+def fun_l11_n355(x)
+ if (x < 1)
+ fun_l12_n619(x)
+ else
+ fun_l12_n531(x)
+ end
+end
+
+def fun_l11_n356(x)
+ if (x < 1)
+ fun_l12_n142(x)
+ else
+ fun_l12_n586(x)
+ end
+end
+
+def fun_l11_n357(x)
+ if (x < 1)
+ fun_l12_n772(x)
+ else
+ fun_l12_n714(x)
+ end
+end
+
+def fun_l11_n358(x)
+ if (x < 1)
+ fun_l12_n506(x)
+ else
+ fun_l12_n405(x)
+ end
+end
+
+def fun_l11_n359(x)
+ if (x < 1)
+ fun_l12_n991(x)
+ else
+ fun_l12_n141(x)
+ end
+end
+
+def fun_l11_n360(x)
+ if (x < 1)
+ fun_l12_n156(x)
+ else
+ fun_l12_n67(x)
+ end
+end
+
+def fun_l11_n361(x)
+ if (x < 1)
+ fun_l12_n525(x)
+ else
+ fun_l12_n293(x)
+ end
+end
+
+def fun_l11_n362(x)
+ if (x < 1)
+ fun_l12_n396(x)
+ else
+ fun_l12_n931(x)
+ end
+end
+
+def fun_l11_n363(x)
+ if (x < 1)
+ fun_l12_n153(x)
+ else
+ fun_l12_n831(x)
+ end
+end
+
+def fun_l11_n364(x)
+ if (x < 1)
+ fun_l12_n240(x)
+ else
+ fun_l12_n450(x)
+ end
+end
+
+def fun_l11_n365(x)
+ if (x < 1)
+ fun_l12_n514(x)
+ else
+ fun_l12_n312(x)
+ end
+end
+
+def fun_l11_n366(x)
+ if (x < 1)
+ fun_l12_n456(x)
+ else
+ fun_l12_n221(x)
+ end
+end
+
+def fun_l11_n367(x)
+ if (x < 1)
+ fun_l12_n920(x)
+ else
+ fun_l12_n699(x)
+ end
+end
+
+def fun_l11_n368(x)
+ if (x < 1)
+ fun_l12_n738(x)
+ else
+ fun_l12_n793(x)
+ end
+end
+
+def fun_l11_n369(x)
+ if (x < 1)
+ fun_l12_n13(x)
+ else
+ fun_l12_n812(x)
+ end
+end
+
+def fun_l11_n370(x)
+ if (x < 1)
+ fun_l12_n392(x)
+ else
+ fun_l12_n342(x)
+ end
+end
+
+def fun_l11_n371(x)
+ if (x < 1)
+ fun_l12_n470(x)
+ else
+ fun_l12_n623(x)
+ end
+end
+
+def fun_l11_n372(x)
+ if (x < 1)
+ fun_l12_n26(x)
+ else
+ fun_l12_n138(x)
+ end
+end
+
+def fun_l11_n373(x)
+ if (x < 1)
+ fun_l12_n70(x)
+ else
+ fun_l12_n682(x)
+ end
+end
+
+def fun_l11_n374(x)
+ if (x < 1)
+ fun_l12_n413(x)
+ else
+ fun_l12_n900(x)
+ end
+end
+
+def fun_l11_n375(x)
+ if (x < 1)
+ fun_l12_n328(x)
+ else
+ fun_l12_n848(x)
+ end
+end
+
+def fun_l11_n376(x)
+ if (x < 1)
+ fun_l12_n604(x)
+ else
+ fun_l12_n823(x)
+ end
+end
+
+def fun_l11_n377(x)
+ if (x < 1)
+ fun_l12_n469(x)
+ else
+ fun_l12_n868(x)
+ end
+end
+
+def fun_l11_n378(x)
+ if (x < 1)
+ fun_l12_n241(x)
+ else
+ fun_l12_n571(x)
+ end
+end
+
+def fun_l11_n379(x)
+ if (x < 1)
+ fun_l12_n669(x)
+ else
+ fun_l12_n75(x)
+ end
+end
+
+def fun_l11_n380(x)
+ if (x < 1)
+ fun_l12_n587(x)
+ else
+ fun_l12_n454(x)
+ end
+end
+
+def fun_l11_n381(x)
+ if (x < 1)
+ fun_l12_n210(x)
+ else
+ fun_l12_n512(x)
+ end
+end
+
+def fun_l11_n382(x)
+ if (x < 1)
+ fun_l12_n73(x)
+ else
+ fun_l12_n981(x)
+ end
+end
+
+def fun_l11_n383(x)
+ if (x < 1)
+ fun_l12_n59(x)
+ else
+ fun_l12_n274(x)
+ end
+end
+
+def fun_l11_n384(x)
+ if (x < 1)
+ fun_l12_n242(x)
+ else
+ fun_l12_n631(x)
+ end
+end
+
+def fun_l11_n385(x)
+ if (x < 1)
+ fun_l12_n933(x)
+ else
+ fun_l12_n678(x)
+ end
+end
+
+def fun_l11_n386(x)
+ if (x < 1)
+ fun_l12_n695(x)
+ else
+ fun_l12_n766(x)
+ end
+end
+
+def fun_l11_n387(x)
+ if (x < 1)
+ fun_l12_n49(x)
+ else
+ fun_l12_n459(x)
+ end
+end
+
+def fun_l11_n388(x)
+ if (x < 1)
+ fun_l12_n751(x)
+ else
+ fun_l12_n594(x)
+ end
+end
+
+def fun_l11_n389(x)
+ if (x < 1)
+ fun_l12_n149(x)
+ else
+ fun_l12_n290(x)
+ end
+end
+
+def fun_l11_n390(x)
+ if (x < 1)
+ fun_l12_n307(x)
+ else
+ fun_l12_n723(x)
+ end
+end
+
+def fun_l11_n391(x)
+ if (x < 1)
+ fun_l12_n606(x)
+ else
+ fun_l12_n97(x)
+ end
+end
+
+def fun_l11_n392(x)
+ if (x < 1)
+ fun_l12_n31(x)
+ else
+ fun_l12_n610(x)
+ end
+end
+
+def fun_l11_n393(x)
+ if (x < 1)
+ fun_l12_n798(x)
+ else
+ fun_l12_n940(x)
+ end
+end
+
+def fun_l11_n394(x)
+ if (x < 1)
+ fun_l12_n131(x)
+ else
+ fun_l12_n79(x)
+ end
+end
+
+def fun_l11_n395(x)
+ if (x < 1)
+ fun_l12_n230(x)
+ else
+ fun_l12_n72(x)
+ end
+end
+
+def fun_l11_n396(x)
+ if (x < 1)
+ fun_l12_n506(x)
+ else
+ fun_l12_n433(x)
+ end
+end
+
+def fun_l11_n397(x)
+ if (x < 1)
+ fun_l12_n410(x)
+ else
+ fun_l12_n648(x)
+ end
+end
+
+def fun_l11_n398(x)
+ if (x < 1)
+ fun_l12_n946(x)
+ else
+ fun_l12_n630(x)
+ end
+end
+
+def fun_l11_n399(x)
+ if (x < 1)
+ fun_l12_n394(x)
+ else
+ fun_l12_n220(x)
+ end
+end
+
+def fun_l11_n400(x)
+ if (x < 1)
+ fun_l12_n761(x)
+ else
+ fun_l12_n407(x)
+ end
+end
+
+def fun_l11_n401(x)
+ if (x < 1)
+ fun_l12_n386(x)
+ else
+ fun_l12_n411(x)
+ end
+end
+
+def fun_l11_n402(x)
+ if (x < 1)
+ fun_l12_n290(x)
+ else
+ fun_l12_n334(x)
+ end
+end
+
+def fun_l11_n403(x)
+ if (x < 1)
+ fun_l12_n600(x)
+ else
+ fun_l12_n282(x)
+ end
+end
+
+def fun_l11_n404(x)
+ if (x < 1)
+ fun_l12_n334(x)
+ else
+ fun_l12_n214(x)
+ end
+end
+
+def fun_l11_n405(x)
+ if (x < 1)
+ fun_l12_n103(x)
+ else
+ fun_l12_n188(x)
+ end
+end
+
+def fun_l11_n406(x)
+ if (x < 1)
+ fun_l12_n755(x)
+ else
+ fun_l12_n773(x)
+ end
+end
+
+def fun_l11_n407(x)
+ if (x < 1)
+ fun_l12_n269(x)
+ else
+ fun_l12_n579(x)
+ end
+end
+
+def fun_l11_n408(x)
+ if (x < 1)
+ fun_l12_n54(x)
+ else
+ fun_l12_n961(x)
+ end
+end
+
+def fun_l11_n409(x)
+ if (x < 1)
+ fun_l12_n699(x)
+ else
+ fun_l12_n117(x)
+ end
+end
+
+def fun_l11_n410(x)
+ if (x < 1)
+ fun_l12_n802(x)
+ else
+ fun_l12_n65(x)
+ end
+end
+
+def fun_l11_n411(x)
+ if (x < 1)
+ fun_l12_n776(x)
+ else
+ fun_l12_n676(x)
+ end
+end
+
+def fun_l11_n412(x)
+ if (x < 1)
+ fun_l12_n520(x)
+ else
+ fun_l12_n447(x)
+ end
+end
+
+def fun_l11_n413(x)
+ if (x < 1)
+ fun_l12_n856(x)
+ else
+ fun_l12_n285(x)
+ end
+end
+
+def fun_l11_n414(x)
+ if (x < 1)
+ fun_l12_n797(x)
+ else
+ fun_l12_n590(x)
+ end
+end
+
+def fun_l11_n415(x)
+ if (x < 1)
+ fun_l12_n128(x)
+ else
+ fun_l12_n677(x)
+ end
+end
+
+def fun_l11_n416(x)
+ if (x < 1)
+ fun_l12_n422(x)
+ else
+ fun_l12_n632(x)
+ end
+end
+
+def fun_l11_n417(x)
+ if (x < 1)
+ fun_l12_n159(x)
+ else
+ fun_l12_n722(x)
+ end
+end
+
+def fun_l11_n418(x)
+ if (x < 1)
+ fun_l12_n989(x)
+ else
+ fun_l12_n670(x)
+ end
+end
+
+def fun_l11_n419(x)
+ if (x < 1)
+ fun_l12_n952(x)
+ else
+ fun_l12_n65(x)
+ end
+end
+
+def fun_l11_n420(x)
+ if (x < 1)
+ fun_l12_n796(x)
+ else
+ fun_l12_n493(x)
+ end
+end
+
+def fun_l11_n421(x)
+ if (x < 1)
+ fun_l12_n897(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n422(x)
+ if (x < 1)
+ fun_l12_n557(x)
+ else
+ fun_l12_n545(x)
+ end
+end
+
+def fun_l11_n423(x)
+ if (x < 1)
+ fun_l12_n716(x)
+ else
+ fun_l12_n746(x)
+ end
+end
+
+def fun_l11_n424(x)
+ if (x < 1)
+ fun_l12_n335(x)
+ else
+ fun_l12_n968(x)
+ end
+end
+
+def fun_l11_n425(x)
+ if (x < 1)
+ fun_l12_n891(x)
+ else
+ fun_l12_n115(x)
+ end
+end
+
+def fun_l11_n426(x)
+ if (x < 1)
+ fun_l12_n757(x)
+ else
+ fun_l12_n750(x)
+ end
+end
+
+def fun_l11_n427(x)
+ if (x < 1)
+ fun_l12_n391(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n428(x)
+ if (x < 1)
+ fun_l12_n249(x)
+ else
+ fun_l12_n347(x)
+ end
+end
+
+def fun_l11_n429(x)
+ if (x < 1)
+ fun_l12_n234(x)
+ else
+ fun_l12_n154(x)
+ end
+end
+
+def fun_l11_n430(x)
+ if (x < 1)
+ fun_l12_n890(x)
+ else
+ fun_l12_n40(x)
+ end
+end
+
+def fun_l11_n431(x)
+ if (x < 1)
+ fun_l12_n804(x)
+ else
+ fun_l12_n90(x)
+ end
+end
+
+def fun_l11_n432(x)
+ if (x < 1)
+ fun_l12_n936(x)
+ else
+ fun_l12_n127(x)
+ end
+end
+
+def fun_l11_n433(x)
+ if (x < 1)
+ fun_l12_n551(x)
+ else
+ fun_l12_n404(x)
+ end
+end
+
+def fun_l11_n434(x)
+ if (x < 1)
+ fun_l12_n246(x)
+ else
+ fun_l12_n759(x)
+ end
+end
+
+def fun_l11_n435(x)
+ if (x < 1)
+ fun_l12_n708(x)
+ else
+ fun_l12_n735(x)
+ end
+end
+
+def fun_l11_n436(x)
+ if (x < 1)
+ fun_l12_n535(x)
+ else
+ fun_l12_n785(x)
+ end
+end
+
+def fun_l11_n437(x)
+ if (x < 1)
+ fun_l12_n322(x)
+ else
+ fun_l12_n629(x)
+ end
+end
+
+def fun_l11_n438(x)
+ if (x < 1)
+ fun_l12_n986(x)
+ else
+ fun_l12_n899(x)
+ end
+end
+
+def fun_l11_n439(x)
+ if (x < 1)
+ fun_l12_n147(x)
+ else
+ fun_l12_n582(x)
+ end
+end
+
+def fun_l11_n440(x)
+ if (x < 1)
+ fun_l12_n375(x)
+ else
+ fun_l12_n667(x)
+ end
+end
+
+def fun_l11_n441(x)
+ if (x < 1)
+ fun_l12_n467(x)
+ else
+ fun_l12_n994(x)
+ end
+end
+
+def fun_l11_n442(x)
+ if (x < 1)
+ fun_l12_n176(x)
+ else
+ fun_l12_n558(x)
+ end
+end
+
+def fun_l11_n443(x)
+ if (x < 1)
+ fun_l12_n452(x)
+ else
+ fun_l12_n37(x)
+ end
+end
+
+def fun_l11_n444(x)
+ if (x < 1)
+ fun_l12_n701(x)
+ else
+ fun_l12_n382(x)
+ end
+end
+
+def fun_l11_n445(x)
+ if (x < 1)
+ fun_l12_n881(x)
+ else
+ fun_l12_n896(x)
+ end
+end
+
+def fun_l11_n446(x)
+ if (x < 1)
+ fun_l12_n901(x)
+ else
+ fun_l12_n822(x)
+ end
+end
+
+def fun_l11_n447(x)
+ if (x < 1)
+ fun_l12_n6(x)
+ else
+ fun_l12_n648(x)
+ end
+end
+
+def fun_l11_n448(x)
+ if (x < 1)
+ fun_l12_n359(x)
+ else
+ fun_l12_n682(x)
+ end
+end
+
+def fun_l11_n449(x)
+ if (x < 1)
+ fun_l12_n675(x)
+ else
+ fun_l12_n379(x)
+ end
+end
+
+def fun_l11_n450(x)
+ if (x < 1)
+ fun_l12_n254(x)
+ else
+ fun_l12_n475(x)
+ end
+end
+
+def fun_l11_n451(x)
+ if (x < 1)
+ fun_l12_n951(x)
+ else
+ fun_l12_n947(x)
+ end
+end
+
+def fun_l11_n452(x)
+ if (x < 1)
+ fun_l12_n909(x)
+ else
+ fun_l12_n703(x)
+ end
+end
+
+def fun_l11_n453(x)
+ if (x < 1)
+ fun_l12_n555(x)
+ else
+ fun_l12_n862(x)
+ end
+end
+
+def fun_l11_n454(x)
+ if (x < 1)
+ fun_l12_n379(x)
+ else
+ fun_l12_n852(x)
+ end
+end
+
+def fun_l11_n455(x)
+ if (x < 1)
+ fun_l12_n85(x)
+ else
+ fun_l12_n219(x)
+ end
+end
+
+def fun_l11_n456(x)
+ if (x < 1)
+ fun_l12_n84(x)
+ else
+ fun_l12_n678(x)
+ end
+end
+
+def fun_l11_n457(x)
+ if (x < 1)
+ fun_l12_n663(x)
+ else
+ fun_l12_n637(x)
+ end
+end
+
+def fun_l11_n458(x)
+ if (x < 1)
+ fun_l12_n627(x)
+ else
+ fun_l12_n764(x)
+ end
+end
+
+def fun_l11_n459(x)
+ if (x < 1)
+ fun_l12_n3(x)
+ else
+ fun_l12_n419(x)
+ end
+end
+
+def fun_l11_n460(x)
+ if (x < 1)
+ fun_l12_n69(x)
+ else
+ fun_l12_n802(x)
+ end
+end
+
+def fun_l11_n461(x)
+ if (x < 1)
+ fun_l12_n708(x)
+ else
+ fun_l12_n304(x)
+ end
+end
+
+def fun_l11_n462(x)
+ if (x < 1)
+ fun_l12_n323(x)
+ else
+ fun_l12_n92(x)
+ end
+end
+
+def fun_l11_n463(x)
+ if (x < 1)
+ fun_l12_n987(x)
+ else
+ fun_l12_n434(x)
+ end
+end
+
+def fun_l11_n464(x)
+ if (x < 1)
+ fun_l12_n532(x)
+ else
+ fun_l12_n82(x)
+ end
+end
+
+def fun_l11_n465(x)
+ if (x < 1)
+ fun_l12_n664(x)
+ else
+ fun_l12_n982(x)
+ end
+end
+
+def fun_l11_n466(x)
+ if (x < 1)
+ fun_l12_n488(x)
+ else
+ fun_l12_n799(x)
+ end
+end
+
+def fun_l11_n467(x)
+ if (x < 1)
+ fun_l12_n882(x)
+ else
+ fun_l12_n948(x)
+ end
+end
+
+def fun_l11_n468(x)
+ if (x < 1)
+ fun_l12_n585(x)
+ else
+ fun_l12_n528(x)
+ end
+end
+
+def fun_l11_n469(x)
+ if (x < 1)
+ fun_l12_n318(x)
+ else
+ fun_l12_n233(x)
+ end
+end
+
+def fun_l11_n470(x)
+ if (x < 1)
+ fun_l12_n537(x)
+ else
+ fun_l12_n803(x)
+ end
+end
+
+def fun_l11_n471(x)
+ if (x < 1)
+ fun_l12_n391(x)
+ else
+ fun_l12_n298(x)
+ end
+end
+
+def fun_l11_n472(x)
+ if (x < 1)
+ fun_l12_n266(x)
+ else
+ fun_l12_n345(x)
+ end
+end
+
+def fun_l11_n473(x)
+ if (x < 1)
+ fun_l12_n355(x)
+ else
+ fun_l12_n713(x)
+ end
+end
+
+def fun_l11_n474(x)
+ if (x < 1)
+ fun_l12_n352(x)
+ else
+ fun_l12_n12(x)
+ end
+end
+
+def fun_l11_n475(x)
+ if (x < 1)
+ fun_l12_n23(x)
+ else
+ fun_l12_n715(x)
+ end
+end
+
+def fun_l11_n476(x)
+ if (x < 1)
+ fun_l12_n342(x)
+ else
+ fun_l12_n323(x)
+ end
+end
+
+def fun_l11_n477(x)
+ if (x < 1)
+ fun_l12_n563(x)
+ else
+ fun_l12_n905(x)
+ end
+end
+
+def fun_l11_n478(x)
+ if (x < 1)
+ fun_l12_n313(x)
+ else
+ fun_l12_n489(x)
+ end
+end
+
+def fun_l11_n479(x)
+ if (x < 1)
+ fun_l12_n75(x)
+ else
+ fun_l12_n291(x)
+ end
+end
+
+def fun_l11_n480(x)
+ if (x < 1)
+ fun_l12_n693(x)
+ else
+ fun_l12_n991(x)
+ end
+end
+
+def fun_l11_n481(x)
+ if (x < 1)
+ fun_l12_n246(x)
+ else
+ fun_l12_n664(x)
+ end
+end
+
+def fun_l11_n482(x)
+ if (x < 1)
+ fun_l12_n524(x)
+ else
+ fun_l12_n1(x)
+ end
+end
+
+def fun_l11_n483(x)
+ if (x < 1)
+ fun_l12_n712(x)
+ else
+ fun_l12_n289(x)
+ end
+end
+
+def fun_l11_n484(x)
+ if (x < 1)
+ fun_l12_n435(x)
+ else
+ fun_l12_n163(x)
+ end
+end
+
+def fun_l11_n485(x)
+ if (x < 1)
+ fun_l12_n338(x)
+ else
+ fun_l12_n883(x)
+ end
+end
+
+def fun_l11_n486(x)
+ if (x < 1)
+ fun_l12_n958(x)
+ else
+ fun_l12_n143(x)
+ end
+end
+
+def fun_l11_n487(x)
+ if (x < 1)
+ fun_l12_n22(x)
+ else
+ fun_l12_n674(x)
+ end
+end
+
+def fun_l11_n488(x)
+ if (x < 1)
+ fun_l12_n905(x)
+ else
+ fun_l12_n955(x)
+ end
+end
+
+def fun_l11_n489(x)
+ if (x < 1)
+ fun_l12_n590(x)
+ else
+ fun_l12_n623(x)
+ end
+end
+
+def fun_l11_n490(x)
+ if (x < 1)
+ fun_l12_n434(x)
+ else
+ fun_l12_n793(x)
+ end
+end
+
+def fun_l11_n491(x)
+ if (x < 1)
+ fun_l12_n274(x)
+ else
+ fun_l12_n879(x)
+ end
+end
+
+def fun_l11_n492(x)
+ if (x < 1)
+ fun_l12_n639(x)
+ else
+ fun_l12_n915(x)
+ end
+end
+
+def fun_l11_n493(x)
+ if (x < 1)
+ fun_l12_n547(x)
+ else
+ fun_l12_n87(x)
+ end
+end
+
+def fun_l11_n494(x)
+ if (x < 1)
+ fun_l12_n364(x)
+ else
+ fun_l12_n133(x)
+ end
+end
+
+def fun_l11_n495(x)
+ if (x < 1)
+ fun_l12_n568(x)
+ else
+ fun_l12_n449(x)
+ end
+end
+
+def fun_l11_n496(x)
+ if (x < 1)
+ fun_l12_n751(x)
+ else
+ fun_l12_n580(x)
+ end
+end
+
+def fun_l11_n497(x)
+ if (x < 1)
+ fun_l12_n864(x)
+ else
+ fun_l12_n505(x)
+ end
+end
+
+def fun_l11_n498(x)
+ if (x < 1)
+ fun_l12_n68(x)
+ else
+ fun_l12_n280(x)
+ end
+end
+
+def fun_l11_n499(x)
+ if (x < 1)
+ fun_l12_n821(x)
+ else
+ fun_l12_n816(x)
+ end
+end
+
+def fun_l11_n500(x)
+ if (x < 1)
+ fun_l12_n793(x)
+ else
+ fun_l12_n558(x)
+ end
+end
+
+def fun_l11_n501(x)
+ if (x < 1)
+ fun_l12_n460(x)
+ else
+ fun_l12_n358(x)
+ end
+end
+
+def fun_l11_n502(x)
+ if (x < 1)
+ fun_l12_n99(x)
+ else
+ fun_l12_n149(x)
+ end
+end
+
+def fun_l11_n503(x)
+ if (x < 1)
+ fun_l12_n599(x)
+ else
+ fun_l12_n257(x)
+ end
+end
+
+def fun_l11_n504(x)
+ if (x < 1)
+ fun_l12_n853(x)
+ else
+ fun_l12_n477(x)
+ end
+end
+
+def fun_l11_n505(x)
+ if (x < 1)
+ fun_l12_n845(x)
+ else
+ fun_l12_n776(x)
+ end
+end
+
+def fun_l11_n506(x)
+ if (x < 1)
+ fun_l12_n533(x)
+ else
+ fun_l12_n6(x)
+ end
+end
+
+def fun_l11_n507(x)
+ if (x < 1)
+ fun_l12_n700(x)
+ else
+ fun_l12_n47(x)
+ end
+end
+
+def fun_l11_n508(x)
+ if (x < 1)
+ fun_l12_n449(x)
+ else
+ fun_l12_n261(x)
+ end
+end
+
+def fun_l11_n509(x)
+ if (x < 1)
+ fun_l12_n773(x)
+ else
+ fun_l12_n583(x)
+ end
+end
+
+def fun_l11_n510(x)
+ if (x < 1)
+ fun_l12_n252(x)
+ else
+ fun_l12_n215(x)
+ end
+end
+
+def fun_l11_n511(x)
+ if (x < 1)
+ fun_l12_n280(x)
+ else
+ fun_l12_n589(x)
+ end
+end
+
+def fun_l11_n512(x)
+ if (x < 1)
+ fun_l12_n796(x)
+ else
+ fun_l12_n803(x)
+ end
+end
+
+def fun_l11_n513(x)
+ if (x < 1)
+ fun_l12_n450(x)
+ else
+ fun_l12_n606(x)
+ end
+end
+
+def fun_l11_n514(x)
+ if (x < 1)
+ fun_l12_n509(x)
+ else
+ fun_l12_n521(x)
+ end
+end
+
+def fun_l11_n515(x)
+ if (x < 1)
+ fun_l12_n658(x)
+ else
+ fun_l12_n912(x)
+ end
+end
+
+def fun_l11_n516(x)
+ if (x < 1)
+ fun_l12_n181(x)
+ else
+ fun_l12_n724(x)
+ end
+end
+
+def fun_l11_n517(x)
+ if (x < 1)
+ fun_l12_n167(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n518(x)
+ if (x < 1)
+ fun_l12_n654(x)
+ else
+ fun_l12_n67(x)
+ end
+end
+
+def fun_l11_n519(x)
+ if (x < 1)
+ fun_l12_n192(x)
+ else
+ fun_l12_n110(x)
+ end
+end
+
+def fun_l11_n520(x)
+ if (x < 1)
+ fun_l12_n271(x)
+ else
+ fun_l12_n74(x)
+ end
+end
+
+def fun_l11_n521(x)
+ if (x < 1)
+ fun_l12_n324(x)
+ else
+ fun_l12_n224(x)
+ end
+end
+
+def fun_l11_n522(x)
+ if (x < 1)
+ fun_l12_n535(x)
+ else
+ fun_l12_n537(x)
+ end
+end
+
+def fun_l11_n523(x)
+ if (x < 1)
+ fun_l12_n103(x)
+ else
+ fun_l12_n942(x)
+ end
+end
+
+def fun_l11_n524(x)
+ if (x < 1)
+ fun_l12_n755(x)
+ else
+ fun_l12_n431(x)
+ end
+end
+
+def fun_l11_n525(x)
+ if (x < 1)
+ fun_l12_n243(x)
+ else
+ fun_l12_n131(x)
+ end
+end
+
+def fun_l11_n526(x)
+ if (x < 1)
+ fun_l12_n270(x)
+ else
+ fun_l12_n747(x)
+ end
+end
+
+def fun_l11_n527(x)
+ if (x < 1)
+ fun_l12_n566(x)
+ else
+ fun_l12_n284(x)
+ end
+end
+
+def fun_l11_n528(x)
+ if (x < 1)
+ fun_l12_n510(x)
+ else
+ fun_l12_n928(x)
+ end
+end
+
+def fun_l11_n529(x)
+ if (x < 1)
+ fun_l12_n354(x)
+ else
+ fun_l12_n1(x)
+ end
+end
+
+def fun_l11_n530(x)
+ if (x < 1)
+ fun_l12_n271(x)
+ else
+ fun_l12_n875(x)
+ end
+end
+
+def fun_l11_n531(x)
+ if (x < 1)
+ fun_l12_n871(x)
+ else
+ fun_l12_n441(x)
+ end
+end
+
+def fun_l11_n532(x)
+ if (x < 1)
+ fun_l12_n727(x)
+ else
+ fun_l12_n903(x)
+ end
+end
+
+def fun_l11_n533(x)
+ if (x < 1)
+ fun_l12_n843(x)
+ else
+ fun_l12_n202(x)
+ end
+end
+
+def fun_l11_n534(x)
+ if (x < 1)
+ fun_l12_n798(x)
+ else
+ fun_l12_n309(x)
+ end
+end
+
+def fun_l11_n535(x)
+ if (x < 1)
+ fun_l12_n397(x)
+ else
+ fun_l12_n377(x)
+ end
+end
+
+def fun_l11_n536(x)
+ if (x < 1)
+ fun_l12_n441(x)
+ else
+ fun_l12_n253(x)
+ end
+end
+
+def fun_l11_n537(x)
+ if (x < 1)
+ fun_l12_n861(x)
+ else
+ fun_l12_n84(x)
+ end
+end
+
+def fun_l11_n538(x)
+ if (x < 1)
+ fun_l12_n268(x)
+ else
+ fun_l12_n627(x)
+ end
+end
+
+def fun_l11_n539(x)
+ if (x < 1)
+ fun_l12_n923(x)
+ else
+ fun_l12_n650(x)
+ end
+end
+
+def fun_l11_n540(x)
+ if (x < 1)
+ fun_l12_n503(x)
+ else
+ fun_l12_n598(x)
+ end
+end
+
+def fun_l11_n541(x)
+ if (x < 1)
+ fun_l12_n355(x)
+ else
+ fun_l12_n201(x)
+ end
+end
+
+def fun_l11_n542(x)
+ if (x < 1)
+ fun_l12_n956(x)
+ else
+ fun_l12_n789(x)
+ end
+end
+
+def fun_l11_n543(x)
+ if (x < 1)
+ fun_l12_n438(x)
+ else
+ fun_l12_n47(x)
+ end
+end
+
+def fun_l11_n544(x)
+ if (x < 1)
+ fun_l12_n425(x)
+ else
+ fun_l12_n109(x)
+ end
+end
+
+def fun_l11_n545(x)
+ if (x < 1)
+ fun_l12_n540(x)
+ else
+ fun_l12_n360(x)
+ end
+end
+
+def fun_l11_n546(x)
+ if (x < 1)
+ fun_l12_n228(x)
+ else
+ fun_l12_n270(x)
+ end
+end
+
+def fun_l11_n547(x)
+ if (x < 1)
+ fun_l12_n528(x)
+ else
+ fun_l12_n423(x)
+ end
+end
+
+def fun_l11_n548(x)
+ if (x < 1)
+ fun_l12_n656(x)
+ else
+ fun_l12_n269(x)
+ end
+end
+
+def fun_l11_n549(x)
+ if (x < 1)
+ fun_l12_n541(x)
+ else
+ fun_l12_n488(x)
+ end
+end
+
+def fun_l11_n550(x)
+ if (x < 1)
+ fun_l12_n240(x)
+ else
+ fun_l12_n990(x)
+ end
+end
+
+def fun_l11_n551(x)
+ if (x < 1)
+ fun_l12_n279(x)
+ else
+ fun_l12_n61(x)
+ end
+end
+
+def fun_l11_n552(x)
+ if (x < 1)
+ fun_l12_n996(x)
+ else
+ fun_l12_n738(x)
+ end
+end
+
+def fun_l11_n553(x)
+ if (x < 1)
+ fun_l12_n334(x)
+ else
+ fun_l12_n117(x)
+ end
+end
+
+def fun_l11_n554(x)
+ if (x < 1)
+ fun_l12_n943(x)
+ else
+ fun_l12_n754(x)
+ end
+end
+
+def fun_l11_n555(x)
+ if (x < 1)
+ fun_l12_n256(x)
+ else
+ fun_l12_n961(x)
+ end
+end
+
+def fun_l11_n556(x)
+ if (x < 1)
+ fun_l12_n530(x)
+ else
+ fun_l12_n378(x)
+ end
+end
+
+def fun_l11_n557(x)
+ if (x < 1)
+ fun_l12_n681(x)
+ else
+ fun_l12_n153(x)
+ end
+end
+
+def fun_l11_n558(x)
+ if (x < 1)
+ fun_l12_n145(x)
+ else
+ fun_l12_n951(x)
+ end
+end
+
+def fun_l11_n559(x)
+ if (x < 1)
+ fun_l12_n107(x)
+ else
+ fun_l12_n341(x)
+ end
+end
+
+def fun_l11_n560(x)
+ if (x < 1)
+ fun_l12_n570(x)
+ else
+ fun_l12_n152(x)
+ end
+end
+
+def fun_l11_n561(x)
+ if (x < 1)
+ fun_l12_n351(x)
+ else
+ fun_l12_n664(x)
+ end
+end
+
+def fun_l11_n562(x)
+ if (x < 1)
+ fun_l12_n825(x)
+ else
+ fun_l12_n226(x)
+ end
+end
+
+def fun_l11_n563(x)
+ if (x < 1)
+ fun_l12_n898(x)
+ else
+ fun_l12_n553(x)
+ end
+end
+
+def fun_l11_n564(x)
+ if (x < 1)
+ fun_l12_n122(x)
+ else
+ fun_l12_n618(x)
+ end
+end
+
+def fun_l11_n565(x)
+ if (x < 1)
+ fun_l12_n185(x)
+ else
+ fun_l12_n51(x)
+ end
+end
+
+def fun_l11_n566(x)
+ if (x < 1)
+ fun_l12_n359(x)
+ else
+ fun_l12_n67(x)
+ end
+end
+
+def fun_l11_n567(x)
+ if (x < 1)
+ fun_l12_n471(x)
+ else
+ fun_l12_n28(x)
+ end
+end
+
+def fun_l11_n568(x)
+ if (x < 1)
+ fun_l12_n195(x)
+ else
+ fun_l12_n104(x)
+ end
+end
+
+def fun_l11_n569(x)
+ if (x < 1)
+ fun_l12_n556(x)
+ else
+ fun_l12_n242(x)
+ end
+end
+
+def fun_l11_n570(x)
+ if (x < 1)
+ fun_l12_n203(x)
+ else
+ fun_l12_n204(x)
+ end
+end
+
+def fun_l11_n571(x)
+ if (x < 1)
+ fun_l12_n217(x)
+ else
+ fun_l12_n392(x)
+ end
+end
+
+def fun_l11_n572(x)
+ if (x < 1)
+ fun_l12_n223(x)
+ else
+ fun_l12_n176(x)
+ end
+end
+
+def fun_l11_n573(x)
+ if (x < 1)
+ fun_l12_n184(x)
+ else
+ fun_l12_n19(x)
+ end
+end
+
+def fun_l11_n574(x)
+ if (x < 1)
+ fun_l12_n799(x)
+ else
+ fun_l12_n652(x)
+ end
+end
+
+def fun_l11_n575(x)
+ if (x < 1)
+ fun_l12_n311(x)
+ else
+ fun_l12_n332(x)
+ end
+end
+
+def fun_l11_n576(x)
+ if (x < 1)
+ fun_l12_n928(x)
+ else
+ fun_l12_n584(x)
+ end
+end
+
+def fun_l11_n577(x)
+ if (x < 1)
+ fun_l12_n796(x)
+ else
+ fun_l12_n931(x)
+ end
+end
+
+def fun_l11_n578(x)
+ if (x < 1)
+ fun_l12_n991(x)
+ else
+ fun_l12_n985(x)
+ end
+end
+
+def fun_l11_n579(x)
+ if (x < 1)
+ fun_l12_n246(x)
+ else
+ fun_l12_n253(x)
+ end
+end
+
+def fun_l11_n580(x)
+ if (x < 1)
+ fun_l12_n492(x)
+ else
+ fun_l12_n239(x)
+ end
+end
+
+def fun_l11_n581(x)
+ if (x < 1)
+ fun_l12_n428(x)
+ else
+ fun_l12_n351(x)
+ end
+end
+
+def fun_l11_n582(x)
+ if (x < 1)
+ fun_l12_n184(x)
+ else
+ fun_l12_n37(x)
+ end
+end
+
+def fun_l11_n583(x)
+ if (x < 1)
+ fun_l12_n809(x)
+ else
+ fun_l12_n527(x)
+ end
+end
+
+def fun_l11_n584(x)
+ if (x < 1)
+ fun_l12_n661(x)
+ else
+ fun_l12_n539(x)
+ end
+end
+
+def fun_l11_n585(x)
+ if (x < 1)
+ fun_l12_n696(x)
+ else
+ fun_l12_n190(x)
+ end
+end
+
+def fun_l11_n586(x)
+ if (x < 1)
+ fun_l12_n178(x)
+ else
+ fun_l12_n301(x)
+ end
+end
+
+def fun_l11_n587(x)
+ if (x < 1)
+ fun_l12_n316(x)
+ else
+ fun_l12_n731(x)
+ end
+end
+
+def fun_l11_n588(x)
+ if (x < 1)
+ fun_l12_n502(x)
+ else
+ fun_l12_n776(x)
+ end
+end
+
+def fun_l11_n589(x)
+ if (x < 1)
+ fun_l12_n273(x)
+ else
+ fun_l12_n268(x)
+ end
+end
+
+def fun_l11_n590(x)
+ if (x < 1)
+ fun_l12_n623(x)
+ else
+ fun_l12_n622(x)
+ end
+end
+
+def fun_l11_n591(x)
+ if (x < 1)
+ fun_l12_n359(x)
+ else
+ fun_l12_n694(x)
+ end
+end
+
+def fun_l11_n592(x)
+ if (x < 1)
+ fun_l12_n71(x)
+ else
+ fun_l12_n984(x)
+ end
+end
+
+def fun_l11_n593(x)
+ if (x < 1)
+ fun_l12_n790(x)
+ else
+ fun_l12_n547(x)
+ end
+end
+
+def fun_l11_n594(x)
+ if (x < 1)
+ fun_l12_n313(x)
+ else
+ fun_l12_n526(x)
+ end
+end
+
+def fun_l11_n595(x)
+ if (x < 1)
+ fun_l12_n239(x)
+ else
+ fun_l12_n821(x)
+ end
+end
+
+def fun_l11_n596(x)
+ if (x < 1)
+ fun_l12_n36(x)
+ else
+ fun_l12_n141(x)
+ end
+end
+
+def fun_l11_n597(x)
+ if (x < 1)
+ fun_l12_n450(x)
+ else
+ fun_l12_n65(x)
+ end
+end
+
+def fun_l11_n598(x)
+ if (x < 1)
+ fun_l12_n226(x)
+ else
+ fun_l12_n490(x)
+ end
+end
+
+def fun_l11_n599(x)
+ if (x < 1)
+ fun_l12_n716(x)
+ else
+ fun_l12_n7(x)
+ end
+end
+
+def fun_l11_n600(x)
+ if (x < 1)
+ fun_l12_n694(x)
+ else
+ fun_l12_n663(x)
+ end
+end
+
+def fun_l11_n601(x)
+ if (x < 1)
+ fun_l12_n690(x)
+ else
+ fun_l12_n256(x)
+ end
+end
+
+def fun_l11_n602(x)
+ if (x < 1)
+ fun_l12_n251(x)
+ else
+ fun_l12_n177(x)
+ end
+end
+
+def fun_l11_n603(x)
+ if (x < 1)
+ fun_l12_n659(x)
+ else
+ fun_l12_n732(x)
+ end
+end
+
+def fun_l11_n604(x)
+ if (x < 1)
+ fun_l12_n440(x)
+ else
+ fun_l12_n334(x)
+ end
+end
+
+def fun_l11_n605(x)
+ if (x < 1)
+ fun_l12_n396(x)
+ else
+ fun_l12_n931(x)
+ end
+end
+
+def fun_l11_n606(x)
+ if (x < 1)
+ fun_l12_n687(x)
+ else
+ fun_l12_n88(x)
+ end
+end
+
+def fun_l11_n607(x)
+ if (x < 1)
+ fun_l12_n647(x)
+ else
+ fun_l12_n799(x)
+ end
+end
+
+def fun_l11_n608(x)
+ if (x < 1)
+ fun_l12_n383(x)
+ else
+ fun_l12_n889(x)
+ end
+end
+
+def fun_l11_n609(x)
+ if (x < 1)
+ fun_l12_n174(x)
+ else
+ fun_l12_n121(x)
+ end
+end
+
+def fun_l11_n610(x)
+ if (x < 1)
+ fun_l12_n818(x)
+ else
+ fun_l12_n835(x)
+ end
+end
+
+def fun_l11_n611(x)
+ if (x < 1)
+ fun_l12_n684(x)
+ else
+ fun_l12_n625(x)
+ end
+end
+
+def fun_l11_n612(x)
+ if (x < 1)
+ fun_l12_n961(x)
+ else
+ fun_l12_n711(x)
+ end
+end
+
+def fun_l11_n613(x)
+ if (x < 1)
+ fun_l12_n15(x)
+ else
+ fun_l12_n542(x)
+ end
+end
+
+def fun_l11_n614(x)
+ if (x < 1)
+ fun_l12_n378(x)
+ else
+ fun_l12_n809(x)
+ end
+end
+
+def fun_l11_n615(x)
+ if (x < 1)
+ fun_l12_n970(x)
+ else
+ fun_l12_n283(x)
+ end
+end
+
+def fun_l11_n616(x)
+ if (x < 1)
+ fun_l12_n391(x)
+ else
+ fun_l12_n949(x)
+ end
+end
+
+def fun_l11_n617(x)
+ if (x < 1)
+ fun_l12_n135(x)
+ else
+ fun_l12_n29(x)
+ end
+end
+
+def fun_l11_n618(x)
+ if (x < 1)
+ fun_l12_n449(x)
+ else
+ fun_l12_n834(x)
+ end
+end
+
+def fun_l11_n619(x)
+ if (x < 1)
+ fun_l12_n555(x)
+ else
+ fun_l12_n464(x)
+ end
+end
+
+def fun_l11_n620(x)
+ if (x < 1)
+ fun_l12_n414(x)
+ else
+ fun_l12_n632(x)
+ end
+end
+
+def fun_l11_n621(x)
+ if (x < 1)
+ fun_l12_n964(x)
+ else
+ fun_l12_n311(x)
+ end
+end
+
+def fun_l11_n622(x)
+ if (x < 1)
+ fun_l12_n184(x)
+ else
+ fun_l12_n499(x)
+ end
+end
+
+def fun_l11_n623(x)
+ if (x < 1)
+ fun_l12_n441(x)
+ else
+ fun_l12_n124(x)
+ end
+end
+
+def fun_l11_n624(x)
+ if (x < 1)
+ fun_l12_n884(x)
+ else
+ fun_l12_n484(x)
+ end
+end
+
+def fun_l11_n625(x)
+ if (x < 1)
+ fun_l12_n878(x)
+ else
+ fun_l12_n646(x)
+ end
+end
+
+def fun_l11_n626(x)
+ if (x < 1)
+ fun_l12_n918(x)
+ else
+ fun_l12_n481(x)
+ end
+end
+
+def fun_l11_n627(x)
+ if (x < 1)
+ fun_l12_n162(x)
+ else
+ fun_l12_n197(x)
+ end
+end
+
+def fun_l11_n628(x)
+ if (x < 1)
+ fun_l12_n852(x)
+ else
+ fun_l12_n874(x)
+ end
+end
+
+def fun_l11_n629(x)
+ if (x < 1)
+ fun_l12_n654(x)
+ else
+ fun_l12_n709(x)
+ end
+end
+
+def fun_l11_n630(x)
+ if (x < 1)
+ fun_l12_n819(x)
+ else
+ fun_l12_n325(x)
+ end
+end
+
+def fun_l11_n631(x)
+ if (x < 1)
+ fun_l12_n776(x)
+ else
+ fun_l12_n621(x)
+ end
+end
+
+def fun_l11_n632(x)
+ if (x < 1)
+ fun_l12_n648(x)
+ else
+ fun_l12_n53(x)
+ end
+end
+
+def fun_l11_n633(x)
+ if (x < 1)
+ fun_l12_n182(x)
+ else
+ fun_l12_n267(x)
+ end
+end
+
+def fun_l11_n634(x)
+ if (x < 1)
+ fun_l12_n17(x)
+ else
+ fun_l12_n415(x)
+ end
+end
+
+def fun_l11_n635(x)
+ if (x < 1)
+ fun_l12_n123(x)
+ else
+ fun_l12_n862(x)
+ end
+end
+
+def fun_l11_n636(x)
+ if (x < 1)
+ fun_l12_n594(x)
+ else
+ fun_l12_n878(x)
+ end
+end
+
+def fun_l11_n637(x)
+ if (x < 1)
+ fun_l12_n913(x)
+ else
+ fun_l12_n245(x)
+ end
+end
+
+def fun_l11_n638(x)
+ if (x < 1)
+ fun_l12_n976(x)
+ else
+ fun_l12_n19(x)
+ end
+end
+
+def fun_l11_n639(x)
+ if (x < 1)
+ fun_l12_n490(x)
+ else
+ fun_l12_n999(x)
+ end
+end
+
+def fun_l11_n640(x)
+ if (x < 1)
+ fun_l12_n345(x)
+ else
+ fun_l12_n585(x)
+ end
+end
+
+def fun_l11_n641(x)
+ if (x < 1)
+ fun_l12_n245(x)
+ else
+ fun_l12_n566(x)
+ end
+end
+
+def fun_l11_n642(x)
+ if (x < 1)
+ fun_l12_n680(x)
+ else
+ fun_l12_n77(x)
+ end
+end
+
+def fun_l11_n643(x)
+ if (x < 1)
+ fun_l12_n330(x)
+ else
+ fun_l12_n268(x)
+ end
+end
+
+def fun_l11_n644(x)
+ if (x < 1)
+ fun_l12_n651(x)
+ else
+ fun_l12_n386(x)
+ end
+end
+
+def fun_l11_n645(x)
+ if (x < 1)
+ fun_l12_n276(x)
+ else
+ fun_l12_n471(x)
+ end
+end
+
+def fun_l11_n646(x)
+ if (x < 1)
+ fun_l12_n784(x)
+ else
+ fun_l12_n892(x)
+ end
+end
+
+def fun_l11_n647(x)
+ if (x < 1)
+ fun_l12_n963(x)
+ else
+ fun_l12_n864(x)
+ end
+end
+
+def fun_l11_n648(x)
+ if (x < 1)
+ fun_l12_n58(x)
+ else
+ fun_l12_n252(x)
+ end
+end
+
+def fun_l11_n649(x)
+ if (x < 1)
+ fun_l12_n321(x)
+ else
+ fun_l12_n593(x)
+ end
+end
+
+def fun_l11_n650(x)
+ if (x < 1)
+ fun_l12_n598(x)
+ else
+ fun_l12_n54(x)
+ end
+end
+
+def fun_l11_n651(x)
+ if (x < 1)
+ fun_l12_n201(x)
+ else
+ fun_l12_n760(x)
+ end
+end
+
+def fun_l11_n652(x)
+ if (x < 1)
+ fun_l12_n880(x)
+ else
+ fun_l12_n841(x)
+ end
+end
+
+def fun_l11_n653(x)
+ if (x < 1)
+ fun_l12_n61(x)
+ else
+ fun_l12_n403(x)
+ end
+end
+
+def fun_l11_n654(x)
+ if (x < 1)
+ fun_l12_n114(x)
+ else
+ fun_l12_n768(x)
+ end
+end
+
+def fun_l11_n655(x)
+ if (x < 1)
+ fun_l12_n511(x)
+ else
+ fun_l12_n521(x)
+ end
+end
+
+def fun_l11_n656(x)
+ if (x < 1)
+ fun_l12_n27(x)
+ else
+ fun_l12_n490(x)
+ end
+end
+
+def fun_l11_n657(x)
+ if (x < 1)
+ fun_l12_n217(x)
+ else
+ fun_l12_n547(x)
+ end
+end
+
+def fun_l11_n658(x)
+ if (x < 1)
+ fun_l12_n549(x)
+ else
+ fun_l12_n823(x)
+ end
+end
+
+def fun_l11_n659(x)
+ if (x < 1)
+ fun_l12_n327(x)
+ else
+ fun_l12_n529(x)
+ end
+end
+
+def fun_l11_n660(x)
+ if (x < 1)
+ fun_l12_n395(x)
+ else
+ fun_l12_n797(x)
+ end
+end
+
+def fun_l11_n661(x)
+ if (x < 1)
+ fun_l12_n867(x)
+ else
+ fun_l12_n142(x)
+ end
+end
+
+def fun_l11_n662(x)
+ if (x < 1)
+ fun_l12_n818(x)
+ else
+ fun_l12_n311(x)
+ end
+end
+
+def fun_l11_n663(x)
+ if (x < 1)
+ fun_l12_n628(x)
+ else
+ fun_l12_n798(x)
+ end
+end
+
+def fun_l11_n664(x)
+ if (x < 1)
+ fun_l12_n260(x)
+ else
+ fun_l12_n607(x)
+ end
+end
+
+def fun_l11_n665(x)
+ if (x < 1)
+ fun_l12_n911(x)
+ else
+ fun_l12_n487(x)
+ end
+end
+
+def fun_l11_n666(x)
+ if (x < 1)
+ fun_l12_n340(x)
+ else
+ fun_l12_n23(x)
+ end
+end
+
+def fun_l11_n667(x)
+ if (x < 1)
+ fun_l12_n744(x)
+ else
+ fun_l12_n874(x)
+ end
+end
+
+def fun_l11_n668(x)
+ if (x < 1)
+ fun_l12_n53(x)
+ else
+ fun_l12_n203(x)
+ end
+end
+
+def fun_l11_n669(x)
+ if (x < 1)
+ fun_l12_n775(x)
+ else
+ fun_l12_n963(x)
+ end
+end
+
+def fun_l11_n670(x)
+ if (x < 1)
+ fun_l12_n922(x)
+ else
+ fun_l12_n0(x)
+ end
+end
+
+def fun_l11_n671(x)
+ if (x < 1)
+ fun_l12_n23(x)
+ else
+ fun_l12_n798(x)
+ end
+end
+
+def fun_l11_n672(x)
+ if (x < 1)
+ fun_l12_n453(x)
+ else
+ fun_l12_n667(x)
+ end
+end
+
+def fun_l11_n673(x)
+ if (x < 1)
+ fun_l12_n991(x)
+ else
+ fun_l12_n350(x)
+ end
+end
+
+def fun_l11_n674(x)
+ if (x < 1)
+ fun_l12_n865(x)
+ else
+ fun_l12_n95(x)
+ end
+end
+
+def fun_l11_n675(x)
+ if (x < 1)
+ fun_l12_n404(x)
+ else
+ fun_l12_n714(x)
+ end
+end
+
+def fun_l11_n676(x)
+ if (x < 1)
+ fun_l12_n576(x)
+ else
+ fun_l12_n162(x)
+ end
+end
+
+def fun_l11_n677(x)
+ if (x < 1)
+ fun_l12_n530(x)
+ else
+ fun_l12_n453(x)
+ end
+end
+
+def fun_l11_n678(x)
+ if (x < 1)
+ fun_l12_n127(x)
+ else
+ fun_l12_n224(x)
+ end
+end
+
+def fun_l11_n679(x)
+ if (x < 1)
+ fun_l12_n658(x)
+ else
+ fun_l12_n11(x)
+ end
+end
+
+def fun_l11_n680(x)
+ if (x < 1)
+ fun_l12_n778(x)
+ else
+ fun_l12_n202(x)
+ end
+end
+
+def fun_l11_n681(x)
+ if (x < 1)
+ fun_l12_n745(x)
+ else
+ fun_l12_n690(x)
+ end
+end
+
+def fun_l11_n682(x)
+ if (x < 1)
+ fun_l12_n920(x)
+ else
+ fun_l12_n54(x)
+ end
+end
+
+def fun_l11_n683(x)
+ if (x < 1)
+ fun_l12_n726(x)
+ else
+ fun_l12_n466(x)
+ end
+end
+
+def fun_l11_n684(x)
+ if (x < 1)
+ fun_l12_n709(x)
+ else
+ fun_l12_n287(x)
+ end
+end
+
+def fun_l11_n685(x)
+ if (x < 1)
+ fun_l12_n304(x)
+ else
+ fun_l12_n617(x)
+ end
+end
+
+def fun_l11_n686(x)
+ if (x < 1)
+ fun_l12_n834(x)
+ else
+ fun_l12_n240(x)
+ end
+end
+
+def fun_l11_n687(x)
+ if (x < 1)
+ fun_l12_n406(x)
+ else
+ fun_l12_n588(x)
+ end
+end
+
+def fun_l11_n688(x)
+ if (x < 1)
+ fun_l12_n308(x)
+ else
+ fun_l12_n790(x)
+ end
+end
+
+def fun_l11_n689(x)
+ if (x < 1)
+ fun_l12_n969(x)
+ else
+ fun_l12_n249(x)
+ end
+end
+
+def fun_l11_n690(x)
+ if (x < 1)
+ fun_l12_n760(x)
+ else
+ fun_l12_n807(x)
+ end
+end
+
+def fun_l11_n691(x)
+ if (x < 1)
+ fun_l12_n417(x)
+ else
+ fun_l12_n645(x)
+ end
+end
+
+def fun_l11_n692(x)
+ if (x < 1)
+ fun_l12_n722(x)
+ else
+ fun_l12_n614(x)
+ end
+end
+
+def fun_l11_n693(x)
+ if (x < 1)
+ fun_l12_n19(x)
+ else
+ fun_l12_n497(x)
+ end
+end
+
+def fun_l11_n694(x)
+ if (x < 1)
+ fun_l12_n580(x)
+ else
+ fun_l12_n76(x)
+ end
+end
+
+def fun_l11_n695(x)
+ if (x < 1)
+ fun_l12_n527(x)
+ else
+ fun_l12_n819(x)
+ end
+end
+
+def fun_l11_n696(x)
+ if (x < 1)
+ fun_l12_n71(x)
+ else
+ fun_l12_n906(x)
+ end
+end
+
+def fun_l11_n697(x)
+ if (x < 1)
+ fun_l12_n95(x)
+ else
+ fun_l12_n743(x)
+ end
+end
+
+def fun_l11_n698(x)
+ if (x < 1)
+ fun_l12_n544(x)
+ else
+ fun_l12_n265(x)
+ end
+end
+
+def fun_l11_n699(x)
+ if (x < 1)
+ fun_l12_n833(x)
+ else
+ fun_l12_n210(x)
+ end
+end
+
+def fun_l11_n700(x)
+ if (x < 1)
+ fun_l12_n865(x)
+ else
+ fun_l12_n318(x)
+ end
+end
+
+def fun_l11_n701(x)
+ if (x < 1)
+ fun_l12_n88(x)
+ else
+ fun_l12_n120(x)
+ end
+end
+
+def fun_l11_n702(x)
+ if (x < 1)
+ fun_l12_n165(x)
+ else
+ fun_l12_n671(x)
+ end
+end
+
+def fun_l11_n703(x)
+ if (x < 1)
+ fun_l12_n607(x)
+ else
+ fun_l12_n730(x)
+ end
+end
+
+def fun_l11_n704(x)
+ if (x < 1)
+ fun_l12_n690(x)
+ else
+ fun_l12_n553(x)
+ end
+end
+
+def fun_l11_n705(x)
+ if (x < 1)
+ fun_l12_n826(x)
+ else
+ fun_l12_n665(x)
+ end
+end
+
+def fun_l11_n706(x)
+ if (x < 1)
+ fun_l12_n125(x)
+ else
+ fun_l12_n167(x)
+ end
+end
+
+def fun_l11_n707(x)
+ if (x < 1)
+ fun_l12_n961(x)
+ else
+ fun_l12_n73(x)
+ end
+end
+
+def fun_l11_n708(x)
+ if (x < 1)
+ fun_l12_n446(x)
+ else
+ fun_l12_n373(x)
+ end
+end
+
+def fun_l11_n709(x)
+ if (x < 1)
+ fun_l12_n199(x)
+ else
+ fun_l12_n803(x)
+ end
+end
+
+def fun_l11_n710(x)
+ if (x < 1)
+ fun_l12_n960(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n711(x)
+ if (x < 1)
+ fun_l12_n602(x)
+ else
+ fun_l12_n896(x)
+ end
+end
+
+def fun_l11_n712(x)
+ if (x < 1)
+ fun_l12_n198(x)
+ else
+ fun_l12_n857(x)
+ end
+end
+
+def fun_l11_n713(x)
+ if (x < 1)
+ fun_l12_n19(x)
+ else
+ fun_l12_n938(x)
+ end
+end
+
+def fun_l11_n714(x)
+ if (x < 1)
+ fun_l12_n530(x)
+ else
+ fun_l12_n432(x)
+ end
+end
+
+def fun_l11_n715(x)
+ if (x < 1)
+ fun_l12_n99(x)
+ else
+ fun_l12_n382(x)
+ end
+end
+
+def fun_l11_n716(x)
+ if (x < 1)
+ fun_l12_n623(x)
+ else
+ fun_l12_n461(x)
+ end
+end
+
+def fun_l11_n717(x)
+ if (x < 1)
+ fun_l12_n658(x)
+ else
+ fun_l12_n432(x)
+ end
+end
+
+def fun_l11_n718(x)
+ if (x < 1)
+ fun_l12_n17(x)
+ else
+ fun_l12_n83(x)
+ end
+end
+
+def fun_l11_n719(x)
+ if (x < 1)
+ fun_l12_n439(x)
+ else
+ fun_l12_n747(x)
+ end
+end
+
+def fun_l11_n720(x)
+ if (x < 1)
+ fun_l12_n259(x)
+ else
+ fun_l12_n80(x)
+ end
+end
+
+def fun_l11_n721(x)
+ if (x < 1)
+ fun_l12_n749(x)
+ else
+ fun_l12_n108(x)
+ end
+end
+
+def fun_l11_n722(x)
+ if (x < 1)
+ fun_l12_n20(x)
+ else
+ fun_l12_n391(x)
+ end
+end
+
+def fun_l11_n723(x)
+ if (x < 1)
+ fun_l12_n181(x)
+ else
+ fun_l12_n204(x)
+ end
+end
+
+def fun_l11_n724(x)
+ if (x < 1)
+ fun_l12_n426(x)
+ else
+ fun_l12_n109(x)
+ end
+end
+
+def fun_l11_n725(x)
+ if (x < 1)
+ fun_l12_n436(x)
+ else
+ fun_l12_n754(x)
+ end
+end
+
+def fun_l11_n726(x)
+ if (x < 1)
+ fun_l12_n496(x)
+ else
+ fun_l12_n265(x)
+ end
+end
+
+def fun_l11_n727(x)
+ if (x < 1)
+ fun_l12_n58(x)
+ else
+ fun_l12_n982(x)
+ end
+end
+
+def fun_l11_n728(x)
+ if (x < 1)
+ fun_l12_n236(x)
+ else
+ fun_l12_n152(x)
+ end
+end
+
+def fun_l11_n729(x)
+ if (x < 1)
+ fun_l12_n818(x)
+ else
+ fun_l12_n95(x)
+ end
+end
+
+def fun_l11_n730(x)
+ if (x < 1)
+ fun_l12_n696(x)
+ else
+ fun_l12_n263(x)
+ end
+end
+
+def fun_l11_n731(x)
+ if (x < 1)
+ fun_l12_n539(x)
+ else
+ fun_l12_n774(x)
+ end
+end
+
+def fun_l11_n732(x)
+ if (x < 1)
+ fun_l12_n788(x)
+ else
+ fun_l12_n454(x)
+ end
+end
+
+def fun_l11_n733(x)
+ if (x < 1)
+ fun_l12_n131(x)
+ else
+ fun_l12_n877(x)
+ end
+end
+
+def fun_l11_n734(x)
+ if (x < 1)
+ fun_l12_n449(x)
+ else
+ fun_l12_n222(x)
+ end
+end
+
+def fun_l11_n735(x)
+ if (x < 1)
+ fun_l12_n71(x)
+ else
+ fun_l12_n467(x)
+ end
+end
+
+def fun_l11_n736(x)
+ if (x < 1)
+ fun_l12_n220(x)
+ else
+ fun_l12_n214(x)
+ end
+end
+
+def fun_l11_n737(x)
+ if (x < 1)
+ fun_l12_n537(x)
+ else
+ fun_l12_n173(x)
+ end
+end
+
+def fun_l11_n738(x)
+ if (x < 1)
+ fun_l12_n897(x)
+ else
+ fun_l12_n515(x)
+ end
+end
+
+def fun_l11_n739(x)
+ if (x < 1)
+ fun_l12_n724(x)
+ else
+ fun_l12_n48(x)
+ end
+end
+
+def fun_l11_n740(x)
+ if (x < 1)
+ fun_l12_n61(x)
+ else
+ fun_l12_n963(x)
+ end
+end
+
+def fun_l11_n741(x)
+ if (x < 1)
+ fun_l12_n40(x)
+ else
+ fun_l12_n553(x)
+ end
+end
+
+def fun_l11_n742(x)
+ if (x < 1)
+ fun_l12_n361(x)
+ else
+ fun_l12_n975(x)
+ end
+end
+
+def fun_l11_n743(x)
+ if (x < 1)
+ fun_l12_n306(x)
+ else
+ fun_l12_n982(x)
+ end
+end
+
+def fun_l11_n744(x)
+ if (x < 1)
+ fun_l12_n951(x)
+ else
+ fun_l12_n590(x)
+ end
+end
+
+def fun_l11_n745(x)
+ if (x < 1)
+ fun_l12_n224(x)
+ else
+ fun_l12_n409(x)
+ end
+end
+
+def fun_l11_n746(x)
+ if (x < 1)
+ fun_l12_n24(x)
+ else
+ fun_l12_n249(x)
+ end
+end
+
+def fun_l11_n747(x)
+ if (x < 1)
+ fun_l12_n533(x)
+ else
+ fun_l12_n543(x)
+ end
+end
+
+def fun_l11_n748(x)
+ if (x < 1)
+ fun_l12_n616(x)
+ else
+ fun_l12_n63(x)
+ end
+end
+
+def fun_l11_n749(x)
+ if (x < 1)
+ fun_l12_n365(x)
+ else
+ fun_l12_n335(x)
+ end
+end
+
+def fun_l11_n750(x)
+ if (x < 1)
+ fun_l12_n134(x)
+ else
+ fun_l12_n363(x)
+ end
+end
+
+def fun_l11_n751(x)
+ if (x < 1)
+ fun_l12_n413(x)
+ else
+ fun_l12_n582(x)
+ end
+end
+
+def fun_l11_n752(x)
+ if (x < 1)
+ fun_l12_n987(x)
+ else
+ fun_l12_n948(x)
+ end
+end
+
+def fun_l11_n753(x)
+ if (x < 1)
+ fun_l12_n696(x)
+ else
+ fun_l12_n374(x)
+ end
+end
+
+def fun_l11_n754(x)
+ if (x < 1)
+ fun_l12_n730(x)
+ else
+ fun_l12_n345(x)
+ end
+end
+
+def fun_l11_n755(x)
+ if (x < 1)
+ fun_l12_n857(x)
+ else
+ fun_l12_n441(x)
+ end
+end
+
+def fun_l11_n756(x)
+ if (x < 1)
+ fun_l12_n711(x)
+ else
+ fun_l12_n39(x)
+ end
+end
+
+def fun_l11_n757(x)
+ if (x < 1)
+ fun_l12_n946(x)
+ else
+ fun_l12_n657(x)
+ end
+end
+
+def fun_l11_n758(x)
+ if (x < 1)
+ fun_l12_n470(x)
+ else
+ fun_l12_n650(x)
+ end
+end
+
+def fun_l11_n759(x)
+ if (x < 1)
+ fun_l12_n119(x)
+ else
+ fun_l12_n479(x)
+ end
+end
+
+def fun_l11_n760(x)
+ if (x < 1)
+ fun_l12_n429(x)
+ else
+ fun_l12_n922(x)
+ end
+end
+
+def fun_l11_n761(x)
+ if (x < 1)
+ fun_l12_n13(x)
+ else
+ fun_l12_n134(x)
+ end
+end
+
+def fun_l11_n762(x)
+ if (x < 1)
+ fun_l12_n797(x)
+ else
+ fun_l12_n223(x)
+ end
+end
+
+def fun_l11_n763(x)
+ if (x < 1)
+ fun_l12_n945(x)
+ else
+ fun_l12_n197(x)
+ end
+end
+
+def fun_l11_n764(x)
+ if (x < 1)
+ fun_l12_n612(x)
+ else
+ fun_l12_n773(x)
+ end
+end
+
+def fun_l11_n765(x)
+ if (x < 1)
+ fun_l12_n478(x)
+ else
+ fun_l12_n972(x)
+ end
+end
+
+def fun_l11_n766(x)
+ if (x < 1)
+ fun_l12_n946(x)
+ else
+ fun_l12_n9(x)
+ end
+end
+
+def fun_l11_n767(x)
+ if (x < 1)
+ fun_l12_n247(x)
+ else
+ fun_l12_n730(x)
+ end
+end
+
+def fun_l11_n768(x)
+ if (x < 1)
+ fun_l12_n223(x)
+ else
+ fun_l12_n986(x)
+ end
+end
+
+def fun_l11_n769(x)
+ if (x < 1)
+ fun_l12_n676(x)
+ else
+ fun_l12_n527(x)
+ end
+end
+
+def fun_l11_n770(x)
+ if (x < 1)
+ fun_l12_n112(x)
+ else
+ fun_l12_n660(x)
+ end
+end
+
+def fun_l11_n771(x)
+ if (x < 1)
+ fun_l12_n457(x)
+ else
+ fun_l12_n733(x)
+ end
+end
+
+def fun_l11_n772(x)
+ if (x < 1)
+ fun_l12_n633(x)
+ else
+ fun_l12_n449(x)
+ end
+end
+
+def fun_l11_n773(x)
+ if (x < 1)
+ fun_l12_n910(x)
+ else
+ fun_l12_n329(x)
+ end
+end
+
+def fun_l11_n774(x)
+ if (x < 1)
+ fun_l12_n354(x)
+ else
+ fun_l12_n233(x)
+ end
+end
+
+def fun_l11_n775(x)
+ if (x < 1)
+ fun_l12_n887(x)
+ else
+ fun_l12_n100(x)
+ end
+end
+
+def fun_l11_n776(x)
+ if (x < 1)
+ fun_l12_n65(x)
+ else
+ fun_l12_n199(x)
+ end
+end
+
+def fun_l11_n777(x)
+ if (x < 1)
+ fun_l12_n978(x)
+ else
+ fun_l12_n364(x)
+ end
+end
+
+def fun_l11_n778(x)
+ if (x < 1)
+ fun_l12_n502(x)
+ else
+ fun_l12_n90(x)
+ end
+end
+
+def fun_l11_n779(x)
+ if (x < 1)
+ fun_l12_n37(x)
+ else
+ fun_l12_n668(x)
+ end
+end
+
+def fun_l11_n780(x)
+ if (x < 1)
+ fun_l12_n80(x)
+ else
+ fun_l12_n603(x)
+ end
+end
+
+def fun_l11_n781(x)
+ if (x < 1)
+ fun_l12_n435(x)
+ else
+ fun_l12_n583(x)
+ end
+end
+
+def fun_l11_n782(x)
+ if (x < 1)
+ fun_l12_n899(x)
+ else
+ fun_l12_n863(x)
+ end
+end
+
+def fun_l11_n783(x)
+ if (x < 1)
+ fun_l12_n414(x)
+ else
+ fun_l12_n96(x)
+ end
+end
+
+def fun_l11_n784(x)
+ if (x < 1)
+ fun_l12_n286(x)
+ else
+ fun_l12_n126(x)
+ end
+end
+
+def fun_l11_n785(x)
+ if (x < 1)
+ fun_l12_n444(x)
+ else
+ fun_l12_n344(x)
+ end
+end
+
+def fun_l11_n786(x)
+ if (x < 1)
+ fun_l12_n484(x)
+ else
+ fun_l12_n469(x)
+ end
+end
+
+def fun_l11_n787(x)
+ if (x < 1)
+ fun_l12_n686(x)
+ else
+ fun_l12_n728(x)
+ end
+end
+
+def fun_l11_n788(x)
+ if (x < 1)
+ fun_l12_n938(x)
+ else
+ fun_l12_n70(x)
+ end
+end
+
+def fun_l11_n789(x)
+ if (x < 1)
+ fun_l12_n958(x)
+ else
+ fun_l12_n633(x)
+ end
+end
+
+def fun_l11_n790(x)
+ if (x < 1)
+ fun_l12_n984(x)
+ else
+ fun_l12_n39(x)
+ end
+end
+
+def fun_l11_n791(x)
+ if (x < 1)
+ fun_l12_n877(x)
+ else
+ fun_l12_n721(x)
+ end
+end
+
+def fun_l11_n792(x)
+ if (x < 1)
+ fun_l12_n710(x)
+ else
+ fun_l12_n840(x)
+ end
+end
+
+def fun_l11_n793(x)
+ if (x < 1)
+ fun_l12_n955(x)
+ else
+ fun_l12_n774(x)
+ end
+end
+
+def fun_l11_n794(x)
+ if (x < 1)
+ fun_l12_n816(x)
+ else
+ fun_l12_n859(x)
+ end
+end
+
+def fun_l11_n795(x)
+ if (x < 1)
+ fun_l12_n722(x)
+ else
+ fun_l12_n700(x)
+ end
+end
+
+def fun_l11_n796(x)
+ if (x < 1)
+ fun_l12_n508(x)
+ else
+ fun_l12_n617(x)
+ end
+end
+
+def fun_l11_n797(x)
+ if (x < 1)
+ fun_l12_n382(x)
+ else
+ fun_l12_n1(x)
+ end
+end
+
+def fun_l11_n798(x)
+ if (x < 1)
+ fun_l12_n857(x)
+ else
+ fun_l12_n141(x)
+ end
+end
+
+def fun_l11_n799(x)
+ if (x < 1)
+ fun_l12_n711(x)
+ else
+ fun_l12_n842(x)
+ end
+end
+
+def fun_l11_n800(x)
+ if (x < 1)
+ fun_l12_n588(x)
+ else
+ fun_l12_n511(x)
+ end
+end
+
+def fun_l11_n801(x)
+ if (x < 1)
+ fun_l12_n114(x)
+ else
+ fun_l12_n516(x)
+ end
+end
+
+def fun_l11_n802(x)
+ if (x < 1)
+ fun_l12_n792(x)
+ else
+ fun_l12_n128(x)
+ end
+end
+
+def fun_l11_n803(x)
+ if (x < 1)
+ fun_l12_n833(x)
+ else
+ fun_l12_n444(x)
+ end
+end
+
+def fun_l11_n804(x)
+ if (x < 1)
+ fun_l12_n564(x)
+ else
+ fun_l12_n129(x)
+ end
+end
+
+def fun_l11_n805(x)
+ if (x < 1)
+ fun_l12_n234(x)
+ else
+ fun_l12_n429(x)
+ end
+end
+
+def fun_l11_n806(x)
+ if (x < 1)
+ fun_l12_n841(x)
+ else
+ fun_l12_n705(x)
+ end
+end
+
+def fun_l11_n807(x)
+ if (x < 1)
+ fun_l12_n72(x)
+ else
+ fun_l12_n87(x)
+ end
+end
+
+def fun_l11_n808(x)
+ if (x < 1)
+ fun_l12_n131(x)
+ else
+ fun_l12_n27(x)
+ end
+end
+
+def fun_l11_n809(x)
+ if (x < 1)
+ fun_l12_n136(x)
+ else
+ fun_l12_n84(x)
+ end
+end
+
+def fun_l11_n810(x)
+ if (x < 1)
+ fun_l12_n464(x)
+ else
+ fun_l12_n411(x)
+ end
+end
+
+def fun_l11_n811(x)
+ if (x < 1)
+ fun_l12_n939(x)
+ else
+ fun_l12_n584(x)
+ end
+end
+
+def fun_l11_n812(x)
+ if (x < 1)
+ fun_l12_n24(x)
+ else
+ fun_l12_n593(x)
+ end
+end
+
+def fun_l11_n813(x)
+ if (x < 1)
+ fun_l12_n980(x)
+ else
+ fun_l12_n318(x)
+ end
+end
+
+def fun_l11_n814(x)
+ if (x < 1)
+ fun_l12_n73(x)
+ else
+ fun_l12_n431(x)
+ end
+end
+
+def fun_l11_n815(x)
+ if (x < 1)
+ fun_l12_n938(x)
+ else
+ fun_l12_n794(x)
+ end
+end
+
+def fun_l11_n816(x)
+ if (x < 1)
+ fun_l12_n305(x)
+ else
+ fun_l12_n620(x)
+ end
+end
+
+def fun_l11_n817(x)
+ if (x < 1)
+ fun_l12_n881(x)
+ else
+ fun_l12_n636(x)
+ end
+end
+
+def fun_l11_n818(x)
+ if (x < 1)
+ fun_l12_n493(x)
+ else
+ fun_l12_n536(x)
+ end
+end
+
+def fun_l11_n819(x)
+ if (x < 1)
+ fun_l12_n32(x)
+ else
+ fun_l12_n69(x)
+ end
+end
+
+def fun_l11_n820(x)
+ if (x < 1)
+ fun_l12_n131(x)
+ else
+ fun_l12_n206(x)
+ end
+end
+
+def fun_l11_n821(x)
+ if (x < 1)
+ fun_l12_n130(x)
+ else
+ fun_l12_n63(x)
+ end
+end
+
+def fun_l11_n822(x)
+ if (x < 1)
+ fun_l12_n228(x)
+ else
+ fun_l12_n753(x)
+ end
+end
+
+def fun_l11_n823(x)
+ if (x < 1)
+ fun_l12_n171(x)
+ else
+ fun_l12_n605(x)
+ end
+end
+
+def fun_l11_n824(x)
+ if (x < 1)
+ fun_l12_n69(x)
+ else
+ fun_l12_n900(x)
+ end
+end
+
+def fun_l11_n825(x)
+ if (x < 1)
+ fun_l12_n802(x)
+ else
+ fun_l12_n682(x)
+ end
+end
+
+def fun_l11_n826(x)
+ if (x < 1)
+ fun_l12_n311(x)
+ else
+ fun_l12_n257(x)
+ end
+end
+
+def fun_l11_n827(x)
+ if (x < 1)
+ fun_l12_n994(x)
+ else
+ fun_l12_n162(x)
+ end
+end
+
+def fun_l11_n828(x)
+ if (x < 1)
+ fun_l12_n780(x)
+ else
+ fun_l12_n805(x)
+ end
+end
+
+def fun_l11_n829(x)
+ if (x < 1)
+ fun_l12_n744(x)
+ else
+ fun_l12_n55(x)
+ end
+end
+
+def fun_l11_n830(x)
+ if (x < 1)
+ fun_l12_n655(x)
+ else
+ fun_l12_n603(x)
+ end
+end
+
+def fun_l11_n831(x)
+ if (x < 1)
+ fun_l12_n245(x)
+ else
+ fun_l12_n196(x)
+ end
+end
+
+def fun_l11_n832(x)
+ if (x < 1)
+ fun_l12_n381(x)
+ else
+ fun_l12_n582(x)
+ end
+end
+
+def fun_l11_n833(x)
+ if (x < 1)
+ fun_l12_n185(x)
+ else
+ fun_l12_n339(x)
+ end
+end
+
+def fun_l11_n834(x)
+ if (x < 1)
+ fun_l12_n601(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n835(x)
+ if (x < 1)
+ fun_l12_n934(x)
+ else
+ fun_l12_n460(x)
+ end
+end
+
+def fun_l11_n836(x)
+ if (x < 1)
+ fun_l12_n550(x)
+ else
+ fun_l12_n55(x)
+ end
+end
+
+def fun_l11_n837(x)
+ if (x < 1)
+ fun_l12_n183(x)
+ else
+ fun_l12_n880(x)
+ end
+end
+
+def fun_l11_n838(x)
+ if (x < 1)
+ fun_l12_n742(x)
+ else
+ fun_l12_n249(x)
+ end
+end
+
+def fun_l11_n839(x)
+ if (x < 1)
+ fun_l12_n979(x)
+ else
+ fun_l12_n100(x)
+ end
+end
+
+def fun_l11_n840(x)
+ if (x < 1)
+ fun_l12_n889(x)
+ else
+ fun_l12_n683(x)
+ end
+end
+
+def fun_l11_n841(x)
+ if (x < 1)
+ fun_l12_n964(x)
+ else
+ fun_l12_n0(x)
+ end
+end
+
+def fun_l11_n842(x)
+ if (x < 1)
+ fun_l12_n461(x)
+ else
+ fun_l12_n126(x)
+ end
+end
+
+def fun_l11_n843(x)
+ if (x < 1)
+ fun_l12_n839(x)
+ else
+ fun_l12_n554(x)
+ end
+end
+
+def fun_l11_n844(x)
+ if (x < 1)
+ fun_l12_n150(x)
+ else
+ fun_l12_n857(x)
+ end
+end
+
+def fun_l11_n845(x)
+ if (x < 1)
+ fun_l12_n114(x)
+ else
+ fun_l12_n72(x)
+ end
+end
+
+def fun_l11_n846(x)
+ if (x < 1)
+ fun_l12_n953(x)
+ else
+ fun_l12_n695(x)
+ end
+end
+
+def fun_l11_n847(x)
+ if (x < 1)
+ fun_l12_n16(x)
+ else
+ fun_l12_n216(x)
+ end
+end
+
+def fun_l11_n848(x)
+ if (x < 1)
+ fun_l12_n440(x)
+ else
+ fun_l12_n893(x)
+ end
+end
+
+def fun_l11_n849(x)
+ if (x < 1)
+ fun_l12_n176(x)
+ else
+ fun_l12_n932(x)
+ end
+end
+
+def fun_l11_n850(x)
+ if (x < 1)
+ fun_l12_n723(x)
+ else
+ fun_l12_n363(x)
+ end
+end
+
+def fun_l11_n851(x)
+ if (x < 1)
+ fun_l12_n779(x)
+ else
+ fun_l12_n774(x)
+ end
+end
+
+def fun_l11_n852(x)
+ if (x < 1)
+ fun_l12_n618(x)
+ else
+ fun_l12_n252(x)
+ end
+end
+
+def fun_l11_n853(x)
+ if (x < 1)
+ fun_l12_n298(x)
+ else
+ fun_l12_n563(x)
+ end
+end
+
+def fun_l11_n854(x)
+ if (x < 1)
+ fun_l12_n972(x)
+ else
+ fun_l12_n681(x)
+ end
+end
+
+def fun_l11_n855(x)
+ if (x < 1)
+ fun_l12_n412(x)
+ else
+ fun_l12_n932(x)
+ end
+end
+
+def fun_l11_n856(x)
+ if (x < 1)
+ fun_l12_n132(x)
+ else
+ fun_l12_n699(x)
+ end
+end
+
+def fun_l11_n857(x)
+ if (x < 1)
+ fun_l12_n208(x)
+ else
+ fun_l12_n602(x)
+ end
+end
+
+def fun_l11_n858(x)
+ if (x < 1)
+ fun_l12_n705(x)
+ else
+ fun_l12_n833(x)
+ end
+end
+
+def fun_l11_n859(x)
+ if (x < 1)
+ fun_l12_n408(x)
+ else
+ fun_l12_n570(x)
+ end
+end
+
+def fun_l11_n860(x)
+ if (x < 1)
+ fun_l12_n720(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n861(x)
+ if (x < 1)
+ fun_l12_n926(x)
+ else
+ fun_l12_n490(x)
+ end
+end
+
+def fun_l11_n862(x)
+ if (x < 1)
+ fun_l12_n985(x)
+ else
+ fun_l12_n54(x)
+ end
+end
+
+def fun_l11_n863(x)
+ if (x < 1)
+ fun_l12_n214(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n864(x)
+ if (x < 1)
+ fun_l12_n351(x)
+ else
+ fun_l12_n951(x)
+ end
+end
+
+def fun_l11_n865(x)
+ if (x < 1)
+ fun_l12_n514(x)
+ else
+ fun_l12_n468(x)
+ end
+end
+
+def fun_l11_n866(x)
+ if (x < 1)
+ fun_l12_n793(x)
+ else
+ fun_l12_n712(x)
+ end
+end
+
+def fun_l11_n867(x)
+ if (x < 1)
+ fun_l12_n697(x)
+ else
+ fun_l12_n824(x)
+ end
+end
+
+def fun_l11_n868(x)
+ if (x < 1)
+ fun_l12_n144(x)
+ else
+ fun_l12_n703(x)
+ end
+end
+
+def fun_l11_n869(x)
+ if (x < 1)
+ fun_l12_n552(x)
+ else
+ fun_l12_n612(x)
+ end
+end
+
+def fun_l11_n870(x)
+ if (x < 1)
+ fun_l12_n2(x)
+ else
+ fun_l12_n287(x)
+ end
+end
+
+def fun_l11_n871(x)
+ if (x < 1)
+ fun_l12_n604(x)
+ else
+ fun_l12_n260(x)
+ end
+end
+
+def fun_l11_n872(x)
+ if (x < 1)
+ fun_l12_n517(x)
+ else
+ fun_l12_n173(x)
+ end
+end
+
+def fun_l11_n873(x)
+ if (x < 1)
+ fun_l12_n640(x)
+ else
+ fun_l12_n196(x)
+ end
+end
+
+def fun_l11_n874(x)
+ if (x < 1)
+ fun_l12_n874(x)
+ else
+ fun_l12_n697(x)
+ end
+end
+
+def fun_l11_n875(x)
+ if (x < 1)
+ fun_l12_n180(x)
+ else
+ fun_l12_n652(x)
+ end
+end
+
+def fun_l11_n876(x)
+ if (x < 1)
+ fun_l12_n432(x)
+ else
+ fun_l12_n971(x)
+ end
+end
+
+def fun_l11_n877(x)
+ if (x < 1)
+ fun_l12_n111(x)
+ else
+ fun_l12_n919(x)
+ end
+end
+
+def fun_l11_n878(x)
+ if (x < 1)
+ fun_l12_n631(x)
+ else
+ fun_l12_n439(x)
+ end
+end
+
+def fun_l11_n879(x)
+ if (x < 1)
+ fun_l12_n39(x)
+ else
+ fun_l12_n372(x)
+ end
+end
+
+def fun_l11_n880(x)
+ if (x < 1)
+ fun_l12_n675(x)
+ else
+ fun_l12_n64(x)
+ end
+end
+
+def fun_l11_n881(x)
+ if (x < 1)
+ fun_l12_n831(x)
+ else
+ fun_l12_n705(x)
+ end
+end
+
+def fun_l11_n882(x)
+ if (x < 1)
+ fun_l12_n126(x)
+ else
+ fun_l12_n648(x)
+ end
+end
+
+def fun_l11_n883(x)
+ if (x < 1)
+ fun_l12_n768(x)
+ else
+ fun_l12_n483(x)
+ end
+end
+
+def fun_l11_n884(x)
+ if (x < 1)
+ fun_l12_n328(x)
+ else
+ fun_l12_n646(x)
+ end
+end
+
+def fun_l11_n885(x)
+ if (x < 1)
+ fun_l12_n890(x)
+ else
+ fun_l12_n544(x)
+ end
+end
+
+def fun_l11_n886(x)
+ if (x < 1)
+ fun_l12_n651(x)
+ else
+ fun_l12_n557(x)
+ end
+end
+
+def fun_l11_n887(x)
+ if (x < 1)
+ fun_l12_n479(x)
+ else
+ fun_l12_n594(x)
+ end
+end
+
+def fun_l11_n888(x)
+ if (x < 1)
+ fun_l12_n649(x)
+ else
+ fun_l12_n488(x)
+ end
+end
+
+def fun_l11_n889(x)
+ if (x < 1)
+ fun_l12_n347(x)
+ else
+ fun_l12_n42(x)
+ end
+end
+
+def fun_l11_n890(x)
+ if (x < 1)
+ fun_l12_n111(x)
+ else
+ fun_l12_n683(x)
+ end
+end
+
+def fun_l11_n891(x)
+ if (x < 1)
+ fun_l12_n965(x)
+ else
+ fun_l12_n275(x)
+ end
+end
+
+def fun_l11_n892(x)
+ if (x < 1)
+ fun_l12_n148(x)
+ else
+ fun_l12_n541(x)
+ end
+end
+
+def fun_l11_n893(x)
+ if (x < 1)
+ fun_l12_n633(x)
+ else
+ fun_l12_n358(x)
+ end
+end
+
+def fun_l11_n894(x)
+ if (x < 1)
+ fun_l12_n681(x)
+ else
+ fun_l12_n236(x)
+ end
+end
+
+def fun_l11_n895(x)
+ if (x < 1)
+ fun_l12_n292(x)
+ else
+ fun_l12_n417(x)
+ end
+end
+
+def fun_l11_n896(x)
+ if (x < 1)
+ fun_l12_n165(x)
+ else
+ fun_l12_n80(x)
+ end
+end
+
+def fun_l11_n897(x)
+ if (x < 1)
+ fun_l12_n132(x)
+ else
+ fun_l12_n659(x)
+ end
+end
+
+def fun_l11_n898(x)
+ if (x < 1)
+ fun_l12_n329(x)
+ else
+ fun_l12_n204(x)
+ end
+end
+
+def fun_l11_n899(x)
+ if (x < 1)
+ fun_l12_n339(x)
+ else
+ fun_l12_n632(x)
+ end
+end
+
+def fun_l11_n900(x)
+ if (x < 1)
+ fun_l12_n957(x)
+ else
+ fun_l12_n282(x)
+ end
+end
+
+def fun_l11_n901(x)
+ if (x < 1)
+ fun_l12_n709(x)
+ else
+ fun_l12_n155(x)
+ end
+end
+
+def fun_l11_n902(x)
+ if (x < 1)
+ fun_l12_n227(x)
+ else
+ fun_l12_n659(x)
+ end
+end
+
+def fun_l11_n903(x)
+ if (x < 1)
+ fun_l12_n224(x)
+ else
+ fun_l12_n23(x)
+ end
+end
+
+def fun_l11_n904(x)
+ if (x < 1)
+ fun_l12_n494(x)
+ else
+ fun_l12_n292(x)
+ end
+end
+
+def fun_l11_n905(x)
+ if (x < 1)
+ fun_l12_n309(x)
+ else
+ fun_l12_n949(x)
+ end
+end
+
+def fun_l11_n906(x)
+ if (x < 1)
+ fun_l12_n960(x)
+ else
+ fun_l12_n24(x)
+ end
+end
+
+def fun_l11_n907(x)
+ if (x < 1)
+ fun_l12_n98(x)
+ else
+ fun_l12_n674(x)
+ end
+end
+
+def fun_l11_n908(x)
+ if (x < 1)
+ fun_l12_n84(x)
+ else
+ fun_l12_n307(x)
+ end
+end
+
+def fun_l11_n909(x)
+ if (x < 1)
+ fun_l12_n786(x)
+ else
+ fun_l12_n311(x)
+ end
+end
+
+def fun_l11_n910(x)
+ if (x < 1)
+ fun_l12_n631(x)
+ else
+ fun_l12_n605(x)
+ end
+end
+
+def fun_l11_n911(x)
+ if (x < 1)
+ fun_l12_n352(x)
+ else
+ fun_l12_n750(x)
+ end
+end
+
+def fun_l11_n912(x)
+ if (x < 1)
+ fun_l12_n75(x)
+ else
+ fun_l12_n112(x)
+ end
+end
+
+def fun_l11_n913(x)
+ if (x < 1)
+ fun_l12_n404(x)
+ else
+ fun_l12_n995(x)
+ end
+end
+
+def fun_l11_n914(x)
+ if (x < 1)
+ fun_l12_n656(x)
+ else
+ fun_l12_n203(x)
+ end
+end
+
+def fun_l11_n915(x)
+ if (x < 1)
+ fun_l12_n625(x)
+ else
+ fun_l12_n32(x)
+ end
+end
+
+def fun_l11_n916(x)
+ if (x < 1)
+ fun_l12_n785(x)
+ else
+ fun_l12_n237(x)
+ end
+end
+
+def fun_l11_n917(x)
+ if (x < 1)
+ fun_l12_n643(x)
+ else
+ fun_l12_n364(x)
+ end
+end
+
+def fun_l11_n918(x)
+ if (x < 1)
+ fun_l12_n920(x)
+ else
+ fun_l12_n957(x)
+ end
+end
+
+def fun_l11_n919(x)
+ if (x < 1)
+ fun_l12_n336(x)
+ else
+ fun_l12_n726(x)
+ end
+end
+
+def fun_l11_n920(x)
+ if (x < 1)
+ fun_l12_n329(x)
+ else
+ fun_l12_n15(x)
+ end
+end
+
+def fun_l11_n921(x)
+ if (x < 1)
+ fun_l12_n911(x)
+ else
+ fun_l12_n824(x)
+ end
+end
+
+def fun_l11_n922(x)
+ if (x < 1)
+ fun_l12_n907(x)
+ else
+ fun_l12_n854(x)
+ end
+end
+
+def fun_l11_n923(x)
+ if (x < 1)
+ fun_l12_n779(x)
+ else
+ fun_l12_n549(x)
+ end
+end
+
+def fun_l11_n924(x)
+ if (x < 1)
+ fun_l12_n833(x)
+ else
+ fun_l12_n986(x)
+ end
+end
+
+def fun_l11_n925(x)
+ if (x < 1)
+ fun_l12_n450(x)
+ else
+ fun_l12_n783(x)
+ end
+end
+
+def fun_l11_n926(x)
+ if (x < 1)
+ fun_l12_n405(x)
+ else
+ fun_l12_n960(x)
+ end
+end
+
+def fun_l11_n927(x)
+ if (x < 1)
+ fun_l12_n603(x)
+ else
+ fun_l12_n892(x)
+ end
+end
+
+def fun_l11_n928(x)
+ if (x < 1)
+ fun_l12_n137(x)
+ else
+ fun_l12_n200(x)
+ end
+end
+
+def fun_l11_n929(x)
+ if (x < 1)
+ fun_l12_n161(x)
+ else
+ fun_l12_n754(x)
+ end
+end
+
+def fun_l11_n930(x)
+ if (x < 1)
+ fun_l12_n107(x)
+ else
+ fun_l12_n258(x)
+ end
+end
+
+def fun_l11_n931(x)
+ if (x < 1)
+ fun_l12_n794(x)
+ else
+ fun_l12_n812(x)
+ end
+end
+
+def fun_l11_n932(x)
+ if (x < 1)
+ fun_l12_n956(x)
+ else
+ fun_l12_n156(x)
+ end
+end
+
+def fun_l11_n933(x)
+ if (x < 1)
+ fun_l12_n676(x)
+ else
+ fun_l12_n496(x)
+ end
+end
+
+def fun_l11_n934(x)
+ if (x < 1)
+ fun_l12_n229(x)
+ else
+ fun_l12_n339(x)
+ end
+end
+
+def fun_l11_n935(x)
+ if (x < 1)
+ fun_l12_n353(x)
+ else
+ fun_l12_n430(x)
+ end
+end
+
+def fun_l11_n936(x)
+ if (x < 1)
+ fun_l12_n721(x)
+ else
+ fun_l12_n409(x)
+ end
+end
+
+def fun_l11_n937(x)
+ if (x < 1)
+ fun_l12_n151(x)
+ else
+ fun_l12_n60(x)
+ end
+end
+
+def fun_l11_n938(x)
+ if (x < 1)
+ fun_l12_n362(x)
+ else
+ fun_l12_n92(x)
+ end
+end
+
+def fun_l11_n939(x)
+ if (x < 1)
+ fun_l12_n315(x)
+ else
+ fun_l12_n905(x)
+ end
+end
+
+def fun_l11_n940(x)
+ if (x < 1)
+ fun_l12_n788(x)
+ else
+ fun_l12_n105(x)
+ end
+end
+
+def fun_l11_n941(x)
+ if (x < 1)
+ fun_l12_n124(x)
+ else
+ fun_l12_n496(x)
+ end
+end
+
+def fun_l11_n942(x)
+ if (x < 1)
+ fun_l12_n546(x)
+ else
+ fun_l12_n17(x)
+ end
+end
+
+def fun_l11_n943(x)
+ if (x < 1)
+ fun_l12_n594(x)
+ else
+ fun_l12_n55(x)
+ end
+end
+
+def fun_l11_n944(x)
+ if (x < 1)
+ fun_l12_n187(x)
+ else
+ fun_l12_n139(x)
+ end
+end
+
+def fun_l11_n945(x)
+ if (x < 1)
+ fun_l12_n117(x)
+ else
+ fun_l12_n382(x)
+ end
+end
+
+def fun_l11_n946(x)
+ if (x < 1)
+ fun_l12_n579(x)
+ else
+ fun_l12_n895(x)
+ end
+end
+
+def fun_l11_n947(x)
+ if (x < 1)
+ fun_l12_n541(x)
+ else
+ fun_l12_n497(x)
+ end
+end
+
+def fun_l11_n948(x)
+ if (x < 1)
+ fun_l12_n250(x)
+ else
+ fun_l12_n257(x)
+ end
+end
+
+def fun_l11_n949(x)
+ if (x < 1)
+ fun_l12_n553(x)
+ else
+ fun_l12_n663(x)
+ end
+end
+
+def fun_l11_n950(x)
+ if (x < 1)
+ fun_l12_n779(x)
+ else
+ fun_l12_n414(x)
+ end
+end
+
+def fun_l11_n951(x)
+ if (x < 1)
+ fun_l12_n748(x)
+ else
+ fun_l12_n525(x)
+ end
+end
+
+def fun_l11_n952(x)
+ if (x < 1)
+ fun_l12_n669(x)
+ else
+ fun_l12_n339(x)
+ end
+end
+
+def fun_l11_n953(x)
+ if (x < 1)
+ fun_l12_n665(x)
+ else
+ fun_l12_n996(x)
+ end
+end
+
+def fun_l11_n954(x)
+ if (x < 1)
+ fun_l12_n366(x)
+ else
+ fun_l12_n149(x)
+ end
+end
+
+def fun_l11_n955(x)
+ if (x < 1)
+ fun_l12_n549(x)
+ else
+ fun_l12_n414(x)
+ end
+end
+
+def fun_l11_n956(x)
+ if (x < 1)
+ fun_l12_n258(x)
+ else
+ fun_l12_n67(x)
+ end
+end
+
+def fun_l11_n957(x)
+ if (x < 1)
+ fun_l12_n439(x)
+ else
+ fun_l12_n83(x)
+ end
+end
+
+def fun_l11_n958(x)
+ if (x < 1)
+ fun_l12_n601(x)
+ else
+ fun_l12_n938(x)
+ end
+end
+
+def fun_l11_n959(x)
+ if (x < 1)
+ fun_l12_n953(x)
+ else
+ fun_l12_n973(x)
+ end
+end
+
+def fun_l11_n960(x)
+ if (x < 1)
+ fun_l12_n426(x)
+ else
+ fun_l12_n8(x)
+ end
+end
+
+def fun_l11_n961(x)
+ if (x < 1)
+ fun_l12_n719(x)
+ else
+ fun_l12_n657(x)
+ end
+end
+
+def fun_l11_n962(x)
+ if (x < 1)
+ fun_l12_n391(x)
+ else
+ fun_l12_n992(x)
+ end
+end
+
+def fun_l11_n963(x)
+ if (x < 1)
+ fun_l12_n141(x)
+ else
+ fun_l12_n468(x)
+ end
+end
+
+def fun_l11_n964(x)
+ if (x < 1)
+ fun_l12_n463(x)
+ else
+ fun_l12_n94(x)
+ end
+end
+
+def fun_l11_n965(x)
+ if (x < 1)
+ fun_l12_n765(x)
+ else
+ fun_l12_n168(x)
+ end
+end
+
+def fun_l11_n966(x)
+ if (x < 1)
+ fun_l12_n237(x)
+ else
+ fun_l12_n437(x)
+ end
+end
+
+def fun_l11_n967(x)
+ if (x < 1)
+ fun_l12_n741(x)
+ else
+ fun_l12_n331(x)
+ end
+end
+
+def fun_l11_n968(x)
+ if (x < 1)
+ fun_l12_n617(x)
+ else
+ fun_l12_n773(x)
+ end
+end
+
+def fun_l11_n969(x)
+ if (x < 1)
+ fun_l12_n880(x)
+ else
+ fun_l12_n727(x)
+ end
+end
+
+def fun_l11_n970(x)
+ if (x < 1)
+ fun_l12_n781(x)
+ else
+ fun_l12_n270(x)
+ end
+end
+
+def fun_l11_n971(x)
+ if (x < 1)
+ fun_l12_n511(x)
+ else
+ fun_l12_n183(x)
+ end
+end
+
+def fun_l11_n972(x)
+ if (x < 1)
+ fun_l12_n448(x)
+ else
+ fun_l12_n965(x)
+ end
+end
+
+def fun_l11_n973(x)
+ if (x < 1)
+ fun_l12_n816(x)
+ else
+ fun_l12_n974(x)
+ end
+end
+
+def fun_l11_n974(x)
+ if (x < 1)
+ fun_l12_n583(x)
+ else
+ fun_l12_n731(x)
+ end
+end
+
+def fun_l11_n975(x)
+ if (x < 1)
+ fun_l12_n42(x)
+ else
+ fun_l12_n463(x)
+ end
+end
+
+def fun_l11_n976(x)
+ if (x < 1)
+ fun_l12_n267(x)
+ else
+ fun_l12_n769(x)
+ end
+end
+
+def fun_l11_n977(x)
+ if (x < 1)
+ fun_l12_n993(x)
+ else
+ fun_l12_n391(x)
+ end
+end
+
+def fun_l11_n978(x)
+ if (x < 1)
+ fun_l12_n507(x)
+ else
+ fun_l12_n905(x)
+ end
+end
+
+def fun_l11_n979(x)
+ if (x < 1)
+ fun_l12_n486(x)
+ else
+ fun_l12_n562(x)
+ end
+end
+
+def fun_l11_n980(x)
+ if (x < 1)
+ fun_l12_n252(x)
+ else
+ fun_l12_n475(x)
+ end
+end
+
+def fun_l11_n981(x)
+ if (x < 1)
+ fun_l12_n979(x)
+ else
+ fun_l12_n70(x)
+ end
+end
+
+def fun_l11_n982(x)
+ if (x < 1)
+ fun_l12_n11(x)
+ else
+ fun_l12_n483(x)
+ end
+end
+
+def fun_l11_n983(x)
+ if (x < 1)
+ fun_l12_n208(x)
+ else
+ fun_l12_n315(x)
+ end
+end
+
+def fun_l11_n984(x)
+ if (x < 1)
+ fun_l12_n452(x)
+ else
+ fun_l12_n367(x)
+ end
+end
+
+def fun_l11_n985(x)
+ if (x < 1)
+ fun_l12_n937(x)
+ else
+ fun_l12_n33(x)
+ end
+end
+
+def fun_l11_n986(x)
+ if (x < 1)
+ fun_l12_n227(x)
+ else
+ fun_l12_n448(x)
+ end
+end
+
+def fun_l11_n987(x)
+ if (x < 1)
+ fun_l12_n928(x)
+ else
+ fun_l12_n693(x)
+ end
+end
+
+def fun_l11_n988(x)
+ if (x < 1)
+ fun_l12_n731(x)
+ else
+ fun_l12_n872(x)
+ end
+end
+
+def fun_l11_n989(x)
+ if (x < 1)
+ fun_l12_n355(x)
+ else
+ fun_l12_n0(x)
+ end
+end
+
+def fun_l11_n990(x)
+ if (x < 1)
+ fun_l12_n203(x)
+ else
+ fun_l12_n545(x)
+ end
+end
+
+def fun_l11_n991(x)
+ if (x < 1)
+ fun_l12_n237(x)
+ else
+ fun_l12_n186(x)
+ end
+end
+
+def fun_l11_n992(x)
+ if (x < 1)
+ fun_l12_n22(x)
+ else
+ fun_l12_n597(x)
+ end
+end
+
+def fun_l11_n993(x)
+ if (x < 1)
+ fun_l12_n711(x)
+ else
+ fun_l12_n677(x)
+ end
+end
+
+def fun_l11_n994(x)
+ if (x < 1)
+ fun_l12_n892(x)
+ else
+ fun_l12_n729(x)
+ end
+end
+
+def fun_l11_n995(x)
+ if (x < 1)
+ fun_l12_n51(x)
+ else
+ fun_l12_n279(x)
+ end
+end
+
+def fun_l11_n996(x)
+ if (x < 1)
+ fun_l12_n430(x)
+ else
+ fun_l12_n527(x)
+ end
+end
+
+def fun_l11_n997(x)
+ if (x < 1)
+ fun_l12_n153(x)
+ else
+ fun_l12_n366(x)
+ end
+end
+
+def fun_l11_n998(x)
+ if (x < 1)
+ fun_l12_n574(x)
+ else
+ fun_l12_n432(x)
+ end
+end
+
+def fun_l11_n999(x)
+ if (x < 1)
+ fun_l12_n100(x)
+ else
+ fun_l12_n943(x)
+ end
+end
+
+def fun_l12_n0(x)
+ if (x < 1)
+ fun_l13_n874(x)
+ else
+ fun_l13_n769(x)
+ end
+end
+
+def fun_l12_n1(x)
+ if (x < 1)
+ fun_l13_n354(x)
+ else
+ fun_l13_n103(x)
+ end
+end
+
+def fun_l12_n2(x)
+ if (x < 1)
+ fun_l13_n265(x)
+ else
+ fun_l13_n936(x)
+ end
+end
+
+def fun_l12_n3(x)
+ if (x < 1)
+ fun_l13_n683(x)
+ else
+ fun_l13_n607(x)
+ end
+end
+
+def fun_l12_n4(x)
+ if (x < 1)
+ fun_l13_n398(x)
+ else
+ fun_l13_n902(x)
+ end
+end
+
+def fun_l12_n5(x)
+ if (x < 1)
+ fun_l13_n694(x)
+ else
+ fun_l13_n392(x)
+ end
+end
+
+def fun_l12_n6(x)
+ if (x < 1)
+ fun_l13_n170(x)
+ else
+ fun_l13_n207(x)
+ end
+end
+
+def fun_l12_n7(x)
+ if (x < 1)
+ fun_l13_n978(x)
+ else
+ fun_l13_n368(x)
+ end
+end
+
+def fun_l12_n8(x)
+ if (x < 1)
+ fun_l13_n970(x)
+ else
+ fun_l13_n560(x)
+ end
+end
+
+def fun_l12_n9(x)
+ if (x < 1)
+ fun_l13_n56(x)
+ else
+ fun_l13_n697(x)
+ end
+end
+
+def fun_l12_n10(x)
+ if (x < 1)
+ fun_l13_n860(x)
+ else
+ fun_l13_n407(x)
+ end
+end
+
+def fun_l12_n11(x)
+ if (x < 1)
+ fun_l13_n581(x)
+ else
+ fun_l13_n582(x)
+ end
+end
+
+def fun_l12_n12(x)
+ if (x < 1)
+ fun_l13_n835(x)
+ else
+ fun_l13_n706(x)
+ end
+end
+
+def fun_l12_n13(x)
+ if (x < 1)
+ fun_l13_n862(x)
+ else
+ fun_l13_n89(x)
+ end
+end
+
+def fun_l12_n14(x)
+ if (x < 1)
+ fun_l13_n379(x)
+ else
+ fun_l13_n896(x)
+ end
+end
+
+def fun_l12_n15(x)
+ if (x < 1)
+ fun_l13_n175(x)
+ else
+ fun_l13_n113(x)
+ end
+end
+
+def fun_l12_n16(x)
+ if (x < 1)
+ fun_l13_n553(x)
+ else
+ fun_l13_n935(x)
+ end
+end
+
+def fun_l12_n17(x)
+ if (x < 1)
+ fun_l13_n171(x)
+ else
+ fun_l13_n264(x)
+ end
+end
+
+def fun_l12_n18(x)
+ if (x < 1)
+ fun_l13_n61(x)
+ else
+ fun_l13_n412(x)
+ end
+end
+
+def fun_l12_n19(x)
+ if (x < 1)
+ fun_l13_n213(x)
+ else
+ fun_l13_n422(x)
+ end
+end
+
+def fun_l12_n20(x)
+ if (x < 1)
+ fun_l13_n401(x)
+ else
+ fun_l13_n537(x)
+ end
+end
+
+def fun_l12_n21(x)
+ if (x < 1)
+ fun_l13_n207(x)
+ else
+ fun_l13_n495(x)
+ end
+end
+
+def fun_l12_n22(x)
+ if (x < 1)
+ fun_l13_n941(x)
+ else
+ fun_l13_n466(x)
+ end
+end
+
+def fun_l12_n23(x)
+ if (x < 1)
+ fun_l13_n195(x)
+ else
+ fun_l13_n984(x)
+ end
+end
+
+def fun_l12_n24(x)
+ if (x < 1)
+ fun_l13_n106(x)
+ else
+ fun_l13_n812(x)
+ end
+end
+
+def fun_l12_n25(x)
+ if (x < 1)
+ fun_l13_n979(x)
+ else
+ fun_l13_n902(x)
+ end
+end
+
+def fun_l12_n26(x)
+ if (x < 1)
+ fun_l13_n726(x)
+ else
+ fun_l13_n440(x)
+ end
+end
+
+def fun_l12_n27(x)
+ if (x < 1)
+ fun_l13_n229(x)
+ else
+ fun_l13_n995(x)
+ end
+end
+
+def fun_l12_n28(x)
+ if (x < 1)
+ fun_l13_n764(x)
+ else
+ fun_l13_n333(x)
+ end
+end
+
+def fun_l12_n29(x)
+ if (x < 1)
+ fun_l13_n971(x)
+ else
+ fun_l13_n59(x)
+ end
+end
+
+def fun_l12_n30(x)
+ if (x < 1)
+ fun_l13_n731(x)
+ else
+ fun_l13_n138(x)
+ end
+end
+
+def fun_l12_n31(x)
+ if (x < 1)
+ fun_l13_n591(x)
+ else
+ fun_l13_n473(x)
+ end
+end
+
+def fun_l12_n32(x)
+ if (x < 1)
+ fun_l13_n50(x)
+ else
+ fun_l13_n175(x)
+ end
+end
+
+def fun_l12_n33(x)
+ if (x < 1)
+ fun_l13_n26(x)
+ else
+ fun_l13_n867(x)
+ end
+end
+
+def fun_l12_n34(x)
+ if (x < 1)
+ fun_l13_n349(x)
+ else
+ fun_l13_n332(x)
+ end
+end
+
+def fun_l12_n35(x)
+ if (x < 1)
+ fun_l13_n180(x)
+ else
+ fun_l13_n591(x)
+ end
+end
+
+def fun_l12_n36(x)
+ if (x < 1)
+ fun_l13_n339(x)
+ else
+ fun_l13_n354(x)
+ end
+end
+
+def fun_l12_n37(x)
+ if (x < 1)
+ fun_l13_n289(x)
+ else
+ fun_l13_n101(x)
+ end
+end
+
+def fun_l12_n38(x)
+ if (x < 1)
+ fun_l13_n410(x)
+ else
+ fun_l13_n91(x)
+ end
+end
+
+def fun_l12_n39(x)
+ if (x < 1)
+ fun_l13_n617(x)
+ else
+ fun_l13_n716(x)
+ end
+end
+
+def fun_l12_n40(x)
+ if (x < 1)
+ fun_l13_n116(x)
+ else
+ fun_l13_n875(x)
+ end
+end
+
+def fun_l12_n41(x)
+ if (x < 1)
+ fun_l13_n162(x)
+ else
+ fun_l13_n844(x)
+ end
+end
+
+def fun_l12_n42(x)
+ if (x < 1)
+ fun_l13_n79(x)
+ else
+ fun_l13_n589(x)
+ end
+end
+
+def fun_l12_n43(x)
+ if (x < 1)
+ fun_l13_n835(x)
+ else
+ fun_l13_n21(x)
+ end
+end
+
+def fun_l12_n44(x)
+ if (x < 1)
+ fun_l13_n420(x)
+ else
+ fun_l13_n403(x)
+ end
+end
+
+def fun_l12_n45(x)
+ if (x < 1)
+ fun_l13_n203(x)
+ else
+ fun_l13_n890(x)
+ end
+end
+
+def fun_l12_n46(x)
+ if (x < 1)
+ fun_l13_n529(x)
+ else
+ fun_l13_n717(x)
+ end
+end
+
+def fun_l12_n47(x)
+ if (x < 1)
+ fun_l13_n766(x)
+ else
+ fun_l13_n635(x)
+ end
+end
+
+def fun_l12_n48(x)
+ if (x < 1)
+ fun_l13_n223(x)
+ else
+ fun_l13_n460(x)
+ end
+end
+
+def fun_l12_n49(x)
+ if (x < 1)
+ fun_l13_n799(x)
+ else
+ fun_l13_n397(x)
+ end
+end
+
+def fun_l12_n50(x)
+ if (x < 1)
+ fun_l13_n200(x)
+ else
+ fun_l13_n608(x)
+ end
+end
+
+def fun_l12_n51(x)
+ if (x < 1)
+ fun_l13_n212(x)
+ else
+ fun_l13_n612(x)
+ end
+end
+
+def fun_l12_n52(x)
+ if (x < 1)
+ fun_l13_n271(x)
+ else
+ fun_l13_n324(x)
+ end
+end
+
+def fun_l12_n53(x)
+ if (x < 1)
+ fun_l13_n639(x)
+ else
+ fun_l13_n603(x)
+ end
+end
+
+def fun_l12_n54(x)
+ if (x < 1)
+ fun_l13_n125(x)
+ else
+ fun_l13_n726(x)
+ end
+end
+
+def fun_l12_n55(x)
+ if (x < 1)
+ fun_l13_n266(x)
+ else
+ fun_l13_n552(x)
+ end
+end
+
+def fun_l12_n56(x)
+ if (x < 1)
+ fun_l13_n412(x)
+ else
+ fun_l13_n132(x)
+ end
+end
+
+def fun_l12_n57(x)
+ if (x < 1)
+ fun_l13_n235(x)
+ else
+ fun_l13_n892(x)
+ end
+end
+
+def fun_l12_n58(x)
+ if (x < 1)
+ fun_l13_n515(x)
+ else
+ fun_l13_n465(x)
+ end
+end
+
+def fun_l12_n59(x)
+ if (x < 1)
+ fun_l13_n38(x)
+ else
+ fun_l13_n757(x)
+ end
+end
+
+def fun_l12_n60(x)
+ if (x < 1)
+ fun_l13_n544(x)
+ else
+ fun_l13_n794(x)
+ end
+end
+
+def fun_l12_n61(x)
+ if (x < 1)
+ fun_l13_n622(x)
+ else
+ fun_l13_n340(x)
+ end
+end
+
+def fun_l12_n62(x)
+ if (x < 1)
+ fun_l13_n563(x)
+ else
+ fun_l13_n313(x)
+ end
+end
+
+def fun_l12_n63(x)
+ if (x < 1)
+ fun_l13_n936(x)
+ else
+ fun_l13_n38(x)
+ end
+end
+
+def fun_l12_n64(x)
+ if (x < 1)
+ fun_l13_n951(x)
+ else
+ fun_l13_n543(x)
+ end
+end
+
+def fun_l12_n65(x)
+ if (x < 1)
+ fun_l13_n577(x)
+ else
+ fun_l13_n190(x)
+ end
+end
+
+def fun_l12_n66(x)
+ if (x < 1)
+ fun_l13_n649(x)
+ else
+ fun_l13_n887(x)
+ end
+end
+
+def fun_l12_n67(x)
+ if (x < 1)
+ fun_l13_n218(x)
+ else
+ fun_l13_n200(x)
+ end
+end
+
+def fun_l12_n68(x)
+ if (x < 1)
+ fun_l13_n111(x)
+ else
+ fun_l13_n849(x)
+ end
+end
+
+def fun_l12_n69(x)
+ if (x < 1)
+ fun_l13_n431(x)
+ else
+ fun_l13_n816(x)
+ end
+end
+
+def fun_l12_n70(x)
+ if (x < 1)
+ fun_l13_n970(x)
+ else
+ fun_l13_n545(x)
+ end
+end
+
+def fun_l12_n71(x)
+ if (x < 1)
+ fun_l13_n3(x)
+ else
+ fun_l13_n751(x)
+ end
+end
+
+def fun_l12_n72(x)
+ if (x < 1)
+ fun_l13_n58(x)
+ else
+ fun_l13_n994(x)
+ end
+end
+
+def fun_l12_n73(x)
+ if (x < 1)
+ fun_l13_n397(x)
+ else
+ fun_l13_n783(x)
+ end
+end
+
+def fun_l12_n74(x)
+ if (x < 1)
+ fun_l13_n705(x)
+ else
+ fun_l13_n318(x)
+ end
+end
+
+def fun_l12_n75(x)
+ if (x < 1)
+ fun_l13_n406(x)
+ else
+ fun_l13_n880(x)
+ end
+end
+
+def fun_l12_n76(x)
+ if (x < 1)
+ fun_l13_n867(x)
+ else
+ fun_l13_n234(x)
+ end
+end
+
+def fun_l12_n77(x)
+ if (x < 1)
+ fun_l13_n447(x)
+ else
+ fun_l13_n617(x)
+ end
+end
+
+def fun_l12_n78(x)
+ if (x < 1)
+ fun_l13_n631(x)
+ else
+ fun_l13_n687(x)
+ end
+end
+
+def fun_l12_n79(x)
+ if (x < 1)
+ fun_l13_n735(x)
+ else
+ fun_l13_n512(x)
+ end
+end
+
+def fun_l12_n80(x)
+ if (x < 1)
+ fun_l13_n826(x)
+ else
+ fun_l13_n626(x)
+ end
+end
+
+def fun_l12_n81(x)
+ if (x < 1)
+ fun_l13_n959(x)
+ else
+ fun_l13_n357(x)
+ end
+end
+
+def fun_l12_n82(x)
+ if (x < 1)
+ fun_l13_n17(x)
+ else
+ fun_l13_n722(x)
+ end
+end
+
+def fun_l12_n83(x)
+ if (x < 1)
+ fun_l13_n702(x)
+ else
+ fun_l13_n441(x)
+ end
+end
+
+def fun_l12_n84(x)
+ if (x < 1)
+ fun_l13_n939(x)
+ else
+ fun_l13_n972(x)
+ end
+end
+
+def fun_l12_n85(x)
+ if (x < 1)
+ fun_l13_n747(x)
+ else
+ fun_l13_n481(x)
+ end
+end
+
+def fun_l12_n86(x)
+ if (x < 1)
+ fun_l13_n813(x)
+ else
+ fun_l13_n780(x)
+ end
+end
+
+def fun_l12_n87(x)
+ if (x < 1)
+ fun_l13_n87(x)
+ else
+ fun_l13_n19(x)
+ end
+end
+
+def fun_l12_n88(x)
+ if (x < 1)
+ fun_l13_n422(x)
+ else
+ fun_l13_n938(x)
+ end
+end
+
+def fun_l12_n89(x)
+ if (x < 1)
+ fun_l13_n575(x)
+ else
+ fun_l13_n150(x)
+ end
+end
+
+def fun_l12_n90(x)
+ if (x < 1)
+ fun_l13_n294(x)
+ else
+ fun_l13_n666(x)
+ end
+end
+
+def fun_l12_n91(x)
+ if (x < 1)
+ fun_l13_n216(x)
+ else
+ fun_l13_n315(x)
+ end
+end
+
+def fun_l12_n92(x)
+ if (x < 1)
+ fun_l13_n580(x)
+ else
+ fun_l13_n487(x)
+ end
+end
+
+def fun_l12_n93(x)
+ if (x < 1)
+ fun_l13_n500(x)
+ else
+ fun_l13_n2(x)
+ end
+end
+
+def fun_l12_n94(x)
+ if (x < 1)
+ fun_l13_n362(x)
+ else
+ fun_l13_n69(x)
+ end
+end
+
+def fun_l12_n95(x)
+ if (x < 1)
+ fun_l13_n50(x)
+ else
+ fun_l13_n549(x)
+ end
+end
+
+def fun_l12_n96(x)
+ if (x < 1)
+ fun_l13_n407(x)
+ else
+ fun_l13_n935(x)
+ end
+end
+
+def fun_l12_n97(x)
+ if (x < 1)
+ fun_l13_n715(x)
+ else
+ fun_l13_n70(x)
+ end
+end
+
+def fun_l12_n98(x)
+ if (x < 1)
+ fun_l13_n184(x)
+ else
+ fun_l13_n702(x)
+ end
+end
+
+def fun_l12_n99(x)
+ if (x < 1)
+ fun_l13_n612(x)
+ else
+ fun_l13_n972(x)
+ end
+end
+
+def fun_l12_n100(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n458(x)
+ end
+end
+
+def fun_l12_n101(x)
+ if (x < 1)
+ fun_l13_n387(x)
+ else
+ fun_l13_n783(x)
+ end
+end
+
+def fun_l12_n102(x)
+ if (x < 1)
+ fun_l13_n764(x)
+ else
+ fun_l13_n647(x)
+ end
+end
+
+def fun_l12_n103(x)
+ if (x < 1)
+ fun_l13_n310(x)
+ else
+ fun_l13_n46(x)
+ end
+end
+
+def fun_l12_n104(x)
+ if (x < 1)
+ fun_l13_n643(x)
+ else
+ fun_l13_n479(x)
+ end
+end
+
+def fun_l12_n105(x)
+ if (x < 1)
+ fun_l13_n909(x)
+ else
+ fun_l13_n10(x)
+ end
+end
+
+def fun_l12_n106(x)
+ if (x < 1)
+ fun_l13_n181(x)
+ else
+ fun_l13_n671(x)
+ end
+end
+
+def fun_l12_n107(x)
+ if (x < 1)
+ fun_l13_n592(x)
+ else
+ fun_l13_n421(x)
+ end
+end
+
+def fun_l12_n108(x)
+ if (x < 1)
+ fun_l13_n438(x)
+ else
+ fun_l13_n196(x)
+ end
+end
+
+def fun_l12_n109(x)
+ if (x < 1)
+ fun_l13_n605(x)
+ else
+ fun_l13_n529(x)
+ end
+end
+
+def fun_l12_n110(x)
+ if (x < 1)
+ fun_l13_n31(x)
+ else
+ fun_l13_n769(x)
+ end
+end
+
+def fun_l12_n111(x)
+ if (x < 1)
+ fun_l13_n790(x)
+ else
+ fun_l13_n773(x)
+ end
+end
+
+def fun_l12_n112(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n621(x)
+ end
+end
+
+def fun_l12_n113(x)
+ if (x < 1)
+ fun_l13_n892(x)
+ else
+ fun_l13_n413(x)
+ end
+end
+
+def fun_l12_n114(x)
+ if (x < 1)
+ fun_l13_n675(x)
+ else
+ fun_l13_n124(x)
+ end
+end
+
+def fun_l12_n115(x)
+ if (x < 1)
+ fun_l13_n366(x)
+ else
+ fun_l13_n884(x)
+ end
+end
+
+def fun_l12_n116(x)
+ if (x < 1)
+ fun_l13_n552(x)
+ else
+ fun_l13_n769(x)
+ end
+end
+
+def fun_l12_n117(x)
+ if (x < 1)
+ fun_l13_n11(x)
+ else
+ fun_l13_n46(x)
+ end
+end
+
+def fun_l12_n118(x)
+ if (x < 1)
+ fun_l13_n766(x)
+ else
+ fun_l13_n914(x)
+ end
+end
+
+def fun_l12_n119(x)
+ if (x < 1)
+ fun_l13_n980(x)
+ else
+ fun_l13_n956(x)
+ end
+end
+
+def fun_l12_n120(x)
+ if (x < 1)
+ fun_l13_n668(x)
+ else
+ fun_l13_n532(x)
+ end
+end
+
+def fun_l12_n121(x)
+ if (x < 1)
+ fun_l13_n864(x)
+ else
+ fun_l13_n489(x)
+ end
+end
+
+def fun_l12_n122(x)
+ if (x < 1)
+ fun_l13_n581(x)
+ else
+ fun_l13_n33(x)
+ end
+end
+
+def fun_l12_n123(x)
+ if (x < 1)
+ fun_l13_n188(x)
+ else
+ fun_l13_n652(x)
+ end
+end
+
+def fun_l12_n124(x)
+ if (x < 1)
+ fun_l13_n631(x)
+ else
+ fun_l13_n932(x)
+ end
+end
+
+def fun_l12_n125(x)
+ if (x < 1)
+ fun_l13_n646(x)
+ else
+ fun_l13_n525(x)
+ end
+end
+
+def fun_l12_n126(x)
+ if (x < 1)
+ fun_l13_n878(x)
+ else
+ fun_l13_n98(x)
+ end
+end
+
+def fun_l12_n127(x)
+ if (x < 1)
+ fun_l13_n120(x)
+ else
+ fun_l13_n950(x)
+ end
+end
+
+def fun_l12_n128(x)
+ if (x < 1)
+ fun_l13_n405(x)
+ else
+ fun_l13_n60(x)
+ end
+end
+
+def fun_l12_n129(x)
+ if (x < 1)
+ fun_l13_n635(x)
+ else
+ fun_l13_n992(x)
+ end
+end
+
+def fun_l12_n130(x)
+ if (x < 1)
+ fun_l13_n711(x)
+ else
+ fun_l13_n172(x)
+ end
+end
+
+def fun_l12_n131(x)
+ if (x < 1)
+ fun_l13_n2(x)
+ else
+ fun_l13_n328(x)
+ end
+end
+
+def fun_l12_n132(x)
+ if (x < 1)
+ fun_l13_n506(x)
+ else
+ fun_l13_n258(x)
+ end
+end
+
+def fun_l12_n133(x)
+ if (x < 1)
+ fun_l13_n737(x)
+ else
+ fun_l13_n552(x)
+ end
+end
+
+def fun_l12_n134(x)
+ if (x < 1)
+ fun_l13_n596(x)
+ else
+ fun_l13_n475(x)
+ end
+end
+
+def fun_l12_n135(x)
+ if (x < 1)
+ fun_l13_n751(x)
+ else
+ fun_l13_n610(x)
+ end
+end
+
+def fun_l12_n136(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n719(x)
+ end
+end
+
+def fun_l12_n137(x)
+ if (x < 1)
+ fun_l13_n779(x)
+ else
+ fun_l13_n204(x)
+ end
+end
+
+def fun_l12_n138(x)
+ if (x < 1)
+ fun_l13_n765(x)
+ else
+ fun_l13_n280(x)
+ end
+end
+
+def fun_l12_n139(x)
+ if (x < 1)
+ fun_l13_n896(x)
+ else
+ fun_l13_n558(x)
+ end
+end
+
+def fun_l12_n140(x)
+ if (x < 1)
+ fun_l13_n16(x)
+ else
+ fun_l13_n809(x)
+ end
+end
+
+def fun_l12_n141(x)
+ if (x < 1)
+ fun_l13_n182(x)
+ else
+ fun_l13_n960(x)
+ end
+end
+
+def fun_l12_n142(x)
+ if (x < 1)
+ fun_l13_n196(x)
+ else
+ fun_l13_n794(x)
+ end
+end
+
+def fun_l12_n143(x)
+ if (x < 1)
+ fun_l13_n993(x)
+ else
+ fun_l13_n426(x)
+ end
+end
+
+def fun_l12_n144(x)
+ if (x < 1)
+ fun_l13_n926(x)
+ else
+ fun_l13_n554(x)
+ end
+end
+
+def fun_l12_n145(x)
+ if (x < 1)
+ fun_l13_n839(x)
+ else
+ fun_l13_n987(x)
+ end
+end
+
+def fun_l12_n146(x)
+ if (x < 1)
+ fun_l13_n412(x)
+ else
+ fun_l13_n359(x)
+ end
+end
+
+def fun_l12_n147(x)
+ if (x < 1)
+ fun_l13_n147(x)
+ else
+ fun_l13_n640(x)
+ end
+end
+
+def fun_l12_n148(x)
+ if (x < 1)
+ fun_l13_n831(x)
+ else
+ fun_l13_n862(x)
+ end
+end
+
+def fun_l12_n149(x)
+ if (x < 1)
+ fun_l13_n161(x)
+ else
+ fun_l13_n396(x)
+ end
+end
+
+def fun_l12_n150(x)
+ if (x < 1)
+ fun_l13_n734(x)
+ else
+ fun_l13_n226(x)
+ end
+end
+
+def fun_l12_n151(x)
+ if (x < 1)
+ fun_l13_n390(x)
+ else
+ fun_l13_n396(x)
+ end
+end
+
+def fun_l12_n152(x)
+ if (x < 1)
+ fun_l13_n722(x)
+ else
+ fun_l13_n939(x)
+ end
+end
+
+def fun_l12_n153(x)
+ if (x < 1)
+ fun_l13_n554(x)
+ else
+ fun_l13_n461(x)
+ end
+end
+
+def fun_l12_n154(x)
+ if (x < 1)
+ fun_l13_n223(x)
+ else
+ fun_l13_n502(x)
+ end
+end
+
+def fun_l12_n155(x)
+ if (x < 1)
+ fun_l13_n526(x)
+ else
+ fun_l13_n949(x)
+ end
+end
+
+def fun_l12_n156(x)
+ if (x < 1)
+ fun_l13_n764(x)
+ else
+ fun_l13_n290(x)
+ end
+end
+
+def fun_l12_n157(x)
+ if (x < 1)
+ fun_l13_n904(x)
+ else
+ fun_l13_n562(x)
+ end
+end
+
+def fun_l12_n158(x)
+ if (x < 1)
+ fun_l13_n308(x)
+ else
+ fun_l13_n646(x)
+ end
+end
+
+def fun_l12_n159(x)
+ if (x < 1)
+ fun_l13_n417(x)
+ else
+ fun_l13_n576(x)
+ end
+end
+
+def fun_l12_n160(x)
+ if (x < 1)
+ fun_l13_n846(x)
+ else
+ fun_l13_n989(x)
+ end
+end
+
+def fun_l12_n161(x)
+ if (x < 1)
+ fun_l13_n59(x)
+ else
+ fun_l13_n877(x)
+ end
+end
+
+def fun_l12_n162(x)
+ if (x < 1)
+ fun_l13_n194(x)
+ else
+ fun_l13_n654(x)
+ end
+end
+
+def fun_l12_n163(x)
+ if (x < 1)
+ fun_l13_n350(x)
+ else
+ fun_l13_n412(x)
+ end
+end
+
+def fun_l12_n164(x)
+ if (x < 1)
+ fun_l13_n482(x)
+ else
+ fun_l13_n820(x)
+ end
+end
+
+def fun_l12_n165(x)
+ if (x < 1)
+ fun_l13_n251(x)
+ else
+ fun_l13_n421(x)
+ end
+end
+
+def fun_l12_n166(x)
+ if (x < 1)
+ fun_l13_n832(x)
+ else
+ fun_l13_n505(x)
+ end
+end
+
+def fun_l12_n167(x)
+ if (x < 1)
+ fun_l13_n316(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n168(x)
+ if (x < 1)
+ fun_l13_n325(x)
+ else
+ fun_l13_n755(x)
+ end
+end
+
+def fun_l12_n169(x)
+ if (x < 1)
+ fun_l13_n536(x)
+ else
+ fun_l13_n753(x)
+ end
+end
+
+def fun_l12_n170(x)
+ if (x < 1)
+ fun_l13_n819(x)
+ else
+ fun_l13_n532(x)
+ end
+end
+
+def fun_l12_n171(x)
+ if (x < 1)
+ fun_l13_n633(x)
+ else
+ fun_l13_n96(x)
+ end
+end
+
+def fun_l12_n172(x)
+ if (x < 1)
+ fun_l13_n229(x)
+ else
+ fun_l13_n105(x)
+ end
+end
+
+def fun_l12_n173(x)
+ if (x < 1)
+ fun_l13_n796(x)
+ else
+ fun_l13_n466(x)
+ end
+end
+
+def fun_l12_n174(x)
+ if (x < 1)
+ fun_l13_n520(x)
+ else
+ fun_l13_n329(x)
+ end
+end
+
+def fun_l12_n175(x)
+ if (x < 1)
+ fun_l13_n358(x)
+ else
+ fun_l13_n201(x)
+ end
+end
+
+def fun_l12_n176(x)
+ if (x < 1)
+ fun_l13_n42(x)
+ else
+ fun_l13_n649(x)
+ end
+end
+
+def fun_l12_n177(x)
+ if (x < 1)
+ fun_l13_n933(x)
+ else
+ fun_l13_n719(x)
+ end
+end
+
+def fun_l12_n178(x)
+ if (x < 1)
+ fun_l13_n236(x)
+ else
+ fun_l13_n723(x)
+ end
+end
+
+def fun_l12_n179(x)
+ if (x < 1)
+ fun_l13_n992(x)
+ else
+ fun_l13_n436(x)
+ end
+end
+
+def fun_l12_n180(x)
+ if (x < 1)
+ fun_l13_n221(x)
+ else
+ fun_l13_n294(x)
+ end
+end
+
+def fun_l12_n181(x)
+ if (x < 1)
+ fun_l13_n580(x)
+ else
+ fun_l13_n939(x)
+ end
+end
+
+def fun_l12_n182(x)
+ if (x < 1)
+ fun_l13_n608(x)
+ else
+ fun_l13_n709(x)
+ end
+end
+
+def fun_l12_n183(x)
+ if (x < 1)
+ fun_l13_n644(x)
+ else
+ fun_l13_n717(x)
+ end
+end
+
+def fun_l12_n184(x)
+ if (x < 1)
+ fun_l13_n605(x)
+ else
+ fun_l13_n665(x)
+ end
+end
+
+def fun_l12_n185(x)
+ if (x < 1)
+ fun_l13_n729(x)
+ else
+ fun_l13_n876(x)
+ end
+end
+
+def fun_l12_n186(x)
+ if (x < 1)
+ fun_l13_n43(x)
+ else
+ fun_l13_n366(x)
+ end
+end
+
+def fun_l12_n187(x)
+ if (x < 1)
+ fun_l13_n401(x)
+ else
+ fun_l13_n610(x)
+ end
+end
+
+def fun_l12_n188(x)
+ if (x < 1)
+ fun_l13_n489(x)
+ else
+ fun_l13_n107(x)
+ end
+end
+
+def fun_l12_n189(x)
+ if (x < 1)
+ fun_l13_n859(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n190(x)
+ if (x < 1)
+ fun_l13_n631(x)
+ else
+ fun_l13_n399(x)
+ end
+end
+
+def fun_l12_n191(x)
+ if (x < 1)
+ fun_l13_n332(x)
+ else
+ fun_l13_n333(x)
+ end
+end
+
+def fun_l12_n192(x)
+ if (x < 1)
+ fun_l13_n535(x)
+ else
+ fun_l13_n191(x)
+ end
+end
+
+def fun_l12_n193(x)
+ if (x < 1)
+ fun_l13_n157(x)
+ else
+ fun_l13_n927(x)
+ end
+end
+
+def fun_l12_n194(x)
+ if (x < 1)
+ fun_l13_n733(x)
+ else
+ fun_l13_n798(x)
+ end
+end
+
+def fun_l12_n195(x)
+ if (x < 1)
+ fun_l13_n31(x)
+ else
+ fun_l13_n703(x)
+ end
+end
+
+def fun_l12_n196(x)
+ if (x < 1)
+ fun_l13_n976(x)
+ else
+ fun_l13_n862(x)
+ end
+end
+
+def fun_l12_n197(x)
+ if (x < 1)
+ fun_l13_n267(x)
+ else
+ fun_l13_n803(x)
+ end
+end
+
+def fun_l12_n198(x)
+ if (x < 1)
+ fun_l13_n598(x)
+ else
+ fun_l13_n255(x)
+ end
+end
+
+def fun_l12_n199(x)
+ if (x < 1)
+ fun_l13_n566(x)
+ else
+ fun_l13_n668(x)
+ end
+end
+
+def fun_l12_n200(x)
+ if (x < 1)
+ fun_l13_n48(x)
+ else
+ fun_l13_n406(x)
+ end
+end
+
+def fun_l12_n201(x)
+ if (x < 1)
+ fun_l13_n971(x)
+ else
+ fun_l13_n225(x)
+ end
+end
+
+def fun_l12_n202(x)
+ if (x < 1)
+ fun_l13_n120(x)
+ else
+ fun_l13_n72(x)
+ end
+end
+
+def fun_l12_n203(x)
+ if (x < 1)
+ fun_l13_n333(x)
+ else
+ fun_l13_n381(x)
+ end
+end
+
+def fun_l12_n204(x)
+ if (x < 1)
+ fun_l13_n558(x)
+ else
+ fun_l13_n474(x)
+ end
+end
+
+def fun_l12_n205(x)
+ if (x < 1)
+ fun_l13_n796(x)
+ else
+ fun_l13_n420(x)
+ end
+end
+
+def fun_l12_n206(x)
+ if (x < 1)
+ fun_l13_n287(x)
+ else
+ fun_l13_n43(x)
+ end
+end
+
+def fun_l12_n207(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n560(x)
+ end
+end
+
+def fun_l12_n208(x)
+ if (x < 1)
+ fun_l13_n707(x)
+ else
+ fun_l13_n824(x)
+ end
+end
+
+def fun_l12_n209(x)
+ if (x < 1)
+ fun_l13_n788(x)
+ else
+ fun_l13_n625(x)
+ end
+end
+
+def fun_l12_n210(x)
+ if (x < 1)
+ fun_l13_n818(x)
+ else
+ fun_l13_n667(x)
+ end
+end
+
+def fun_l12_n211(x)
+ if (x < 1)
+ fun_l13_n710(x)
+ else
+ fun_l13_n508(x)
+ end
+end
+
+def fun_l12_n212(x)
+ if (x < 1)
+ fun_l13_n497(x)
+ else
+ fun_l13_n20(x)
+ end
+end
+
+def fun_l12_n213(x)
+ if (x < 1)
+ fun_l13_n648(x)
+ else
+ fun_l13_n33(x)
+ end
+end
+
+def fun_l12_n214(x)
+ if (x < 1)
+ fun_l13_n404(x)
+ else
+ fun_l13_n918(x)
+ end
+end
+
+def fun_l12_n215(x)
+ if (x < 1)
+ fun_l13_n595(x)
+ else
+ fun_l13_n440(x)
+ end
+end
+
+def fun_l12_n216(x)
+ if (x < 1)
+ fun_l13_n302(x)
+ else
+ fun_l13_n388(x)
+ end
+end
+
+def fun_l12_n217(x)
+ if (x < 1)
+ fun_l13_n301(x)
+ else
+ fun_l13_n416(x)
+ end
+end
+
+def fun_l12_n218(x)
+ if (x < 1)
+ fun_l13_n114(x)
+ else
+ fun_l13_n650(x)
+ end
+end
+
+def fun_l12_n219(x)
+ if (x < 1)
+ fun_l13_n221(x)
+ else
+ fun_l13_n539(x)
+ end
+end
+
+def fun_l12_n220(x)
+ if (x < 1)
+ fun_l13_n529(x)
+ else
+ fun_l13_n438(x)
+ end
+end
+
+def fun_l12_n221(x)
+ if (x < 1)
+ fun_l13_n528(x)
+ else
+ fun_l13_n284(x)
+ end
+end
+
+def fun_l12_n222(x)
+ if (x < 1)
+ fun_l13_n746(x)
+ else
+ fun_l13_n634(x)
+ end
+end
+
+def fun_l12_n223(x)
+ if (x < 1)
+ fun_l13_n726(x)
+ else
+ fun_l13_n142(x)
+ end
+end
+
+def fun_l12_n224(x)
+ if (x < 1)
+ fun_l13_n57(x)
+ else
+ fun_l13_n625(x)
+ end
+end
+
+def fun_l12_n225(x)
+ if (x < 1)
+ fun_l13_n739(x)
+ else
+ fun_l13_n667(x)
+ end
+end
+
+def fun_l12_n226(x)
+ if (x < 1)
+ fun_l13_n693(x)
+ else
+ fun_l13_n819(x)
+ end
+end
+
+def fun_l12_n227(x)
+ if (x < 1)
+ fun_l13_n316(x)
+ else
+ fun_l13_n866(x)
+ end
+end
+
+def fun_l12_n228(x)
+ if (x < 1)
+ fun_l13_n88(x)
+ else
+ fun_l13_n336(x)
+ end
+end
+
+def fun_l12_n229(x)
+ if (x < 1)
+ fun_l13_n387(x)
+ else
+ fun_l13_n226(x)
+ end
+end
+
+def fun_l12_n230(x)
+ if (x < 1)
+ fun_l13_n644(x)
+ else
+ fun_l13_n933(x)
+ end
+end
+
+def fun_l12_n231(x)
+ if (x < 1)
+ fun_l13_n952(x)
+ else
+ fun_l13_n747(x)
+ end
+end
+
+def fun_l12_n232(x)
+ if (x < 1)
+ fun_l13_n107(x)
+ else
+ fun_l13_n0(x)
+ end
+end
+
+def fun_l12_n233(x)
+ if (x < 1)
+ fun_l13_n589(x)
+ else
+ fun_l13_n712(x)
+ end
+end
+
+def fun_l12_n234(x)
+ if (x < 1)
+ fun_l13_n429(x)
+ else
+ fun_l13_n845(x)
+ end
+end
+
+def fun_l12_n235(x)
+ if (x < 1)
+ fun_l13_n733(x)
+ else
+ fun_l13_n203(x)
+ end
+end
+
+def fun_l12_n236(x)
+ if (x < 1)
+ fun_l13_n842(x)
+ else
+ fun_l13_n134(x)
+ end
+end
+
+def fun_l12_n237(x)
+ if (x < 1)
+ fun_l13_n114(x)
+ else
+ fun_l13_n794(x)
+ end
+end
+
+def fun_l12_n238(x)
+ if (x < 1)
+ fun_l13_n463(x)
+ else
+ fun_l13_n127(x)
+ end
+end
+
+def fun_l12_n239(x)
+ if (x < 1)
+ fun_l13_n443(x)
+ else
+ fun_l13_n13(x)
+ end
+end
+
+def fun_l12_n240(x)
+ if (x < 1)
+ fun_l13_n713(x)
+ else
+ fun_l13_n447(x)
+ end
+end
+
+def fun_l12_n241(x)
+ if (x < 1)
+ fun_l13_n404(x)
+ else
+ fun_l13_n796(x)
+ end
+end
+
+def fun_l12_n242(x)
+ if (x < 1)
+ fun_l13_n277(x)
+ else
+ fun_l13_n106(x)
+ end
+end
+
+def fun_l12_n243(x)
+ if (x < 1)
+ fun_l13_n584(x)
+ else
+ fun_l13_n262(x)
+ end
+end
+
+def fun_l12_n244(x)
+ if (x < 1)
+ fun_l13_n670(x)
+ else
+ fun_l13_n989(x)
+ end
+end
+
+def fun_l12_n245(x)
+ if (x < 1)
+ fun_l13_n588(x)
+ else
+ fun_l13_n513(x)
+ end
+end
+
+def fun_l12_n246(x)
+ if (x < 1)
+ fun_l13_n98(x)
+ else
+ fun_l13_n400(x)
+ end
+end
+
+def fun_l12_n247(x)
+ if (x < 1)
+ fun_l13_n119(x)
+ else
+ fun_l13_n321(x)
+ end
+end
+
+def fun_l12_n248(x)
+ if (x < 1)
+ fun_l13_n157(x)
+ else
+ fun_l13_n557(x)
+ end
+end
+
+def fun_l12_n249(x)
+ if (x < 1)
+ fun_l13_n243(x)
+ else
+ fun_l13_n596(x)
+ end
+end
+
+def fun_l12_n250(x)
+ if (x < 1)
+ fun_l13_n280(x)
+ else
+ fun_l13_n779(x)
+ end
+end
+
+def fun_l12_n251(x)
+ if (x < 1)
+ fun_l13_n437(x)
+ else
+ fun_l13_n829(x)
+ end
+end
+
+def fun_l12_n252(x)
+ if (x < 1)
+ fun_l13_n472(x)
+ else
+ fun_l13_n224(x)
+ end
+end
+
+def fun_l12_n253(x)
+ if (x < 1)
+ fun_l13_n151(x)
+ else
+ fun_l13_n168(x)
+ end
+end
+
+def fun_l12_n254(x)
+ if (x < 1)
+ fun_l13_n724(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n255(x)
+ if (x < 1)
+ fun_l13_n27(x)
+ else
+ fun_l13_n776(x)
+ end
+end
+
+def fun_l12_n256(x)
+ if (x < 1)
+ fun_l13_n116(x)
+ else
+ fun_l13_n52(x)
+ end
+end
+
+def fun_l12_n257(x)
+ if (x < 1)
+ fun_l13_n201(x)
+ else
+ fun_l13_n982(x)
+ end
+end
+
+def fun_l12_n258(x)
+ if (x < 1)
+ fun_l13_n152(x)
+ else
+ fun_l13_n818(x)
+ end
+end
+
+def fun_l12_n259(x)
+ if (x < 1)
+ fun_l13_n859(x)
+ else
+ fun_l13_n555(x)
+ end
+end
+
+def fun_l12_n260(x)
+ if (x < 1)
+ fun_l13_n29(x)
+ else
+ fun_l13_n416(x)
+ end
+end
+
+def fun_l12_n261(x)
+ if (x < 1)
+ fun_l13_n811(x)
+ else
+ fun_l13_n827(x)
+ end
+end
+
+def fun_l12_n262(x)
+ if (x < 1)
+ fun_l13_n867(x)
+ else
+ fun_l13_n298(x)
+ end
+end
+
+def fun_l12_n263(x)
+ if (x < 1)
+ fun_l13_n464(x)
+ else
+ fun_l13_n420(x)
+ end
+end
+
+def fun_l12_n264(x)
+ if (x < 1)
+ fun_l13_n494(x)
+ else
+ fun_l13_n368(x)
+ end
+end
+
+def fun_l12_n265(x)
+ if (x < 1)
+ fun_l13_n959(x)
+ else
+ fun_l13_n425(x)
+ end
+end
+
+def fun_l12_n266(x)
+ if (x < 1)
+ fun_l13_n841(x)
+ else
+ fun_l13_n874(x)
+ end
+end
+
+def fun_l12_n267(x)
+ if (x < 1)
+ fun_l13_n885(x)
+ else
+ fun_l13_n631(x)
+ end
+end
+
+def fun_l12_n268(x)
+ if (x < 1)
+ fun_l13_n645(x)
+ else
+ fun_l13_n342(x)
+ end
+end
+
+def fun_l12_n269(x)
+ if (x < 1)
+ fun_l13_n4(x)
+ else
+ fun_l13_n81(x)
+ end
+end
+
+def fun_l12_n270(x)
+ if (x < 1)
+ fun_l13_n44(x)
+ else
+ fun_l13_n924(x)
+ end
+end
+
+def fun_l12_n271(x)
+ if (x < 1)
+ fun_l13_n955(x)
+ else
+ fun_l13_n834(x)
+ end
+end
+
+def fun_l12_n272(x)
+ if (x < 1)
+ fun_l13_n969(x)
+ else
+ fun_l13_n699(x)
+ end
+end
+
+def fun_l12_n273(x)
+ if (x < 1)
+ fun_l13_n590(x)
+ else
+ fun_l13_n608(x)
+ end
+end
+
+def fun_l12_n274(x)
+ if (x < 1)
+ fun_l13_n170(x)
+ else
+ fun_l13_n343(x)
+ end
+end
+
+def fun_l12_n275(x)
+ if (x < 1)
+ fun_l13_n317(x)
+ else
+ fun_l13_n998(x)
+ end
+end
+
+def fun_l12_n276(x)
+ if (x < 1)
+ fun_l13_n864(x)
+ else
+ fun_l13_n644(x)
+ end
+end
+
+def fun_l12_n277(x)
+ if (x < 1)
+ fun_l13_n42(x)
+ else
+ fun_l13_n663(x)
+ end
+end
+
+def fun_l12_n278(x)
+ if (x < 1)
+ fun_l13_n39(x)
+ else
+ fun_l13_n624(x)
+ end
+end
+
+def fun_l12_n279(x)
+ if (x < 1)
+ fun_l13_n578(x)
+ else
+ fun_l13_n592(x)
+ end
+end
+
+def fun_l12_n280(x)
+ if (x < 1)
+ fun_l13_n345(x)
+ else
+ fun_l13_n462(x)
+ end
+end
+
+def fun_l12_n281(x)
+ if (x < 1)
+ fun_l13_n741(x)
+ else
+ fun_l13_n93(x)
+ end
+end
+
+def fun_l12_n282(x)
+ if (x < 1)
+ fun_l13_n845(x)
+ else
+ fun_l13_n981(x)
+ end
+end
+
+def fun_l12_n283(x)
+ if (x < 1)
+ fun_l13_n479(x)
+ else
+ fun_l13_n823(x)
+ end
+end
+
+def fun_l12_n284(x)
+ if (x < 1)
+ fun_l13_n201(x)
+ else
+ fun_l13_n526(x)
+ end
+end
+
+def fun_l12_n285(x)
+ if (x < 1)
+ fun_l13_n890(x)
+ else
+ fun_l13_n237(x)
+ end
+end
+
+def fun_l12_n286(x)
+ if (x < 1)
+ fun_l13_n377(x)
+ else
+ fun_l13_n249(x)
+ end
+end
+
+def fun_l12_n287(x)
+ if (x < 1)
+ fun_l13_n147(x)
+ else
+ fun_l13_n306(x)
+ end
+end
+
+def fun_l12_n288(x)
+ if (x < 1)
+ fun_l13_n822(x)
+ else
+ fun_l13_n220(x)
+ end
+end
+
+def fun_l12_n289(x)
+ if (x < 1)
+ fun_l13_n106(x)
+ else
+ fun_l13_n648(x)
+ end
+end
+
+def fun_l12_n290(x)
+ if (x < 1)
+ fun_l13_n278(x)
+ else
+ fun_l13_n255(x)
+ end
+end
+
+def fun_l12_n291(x)
+ if (x < 1)
+ fun_l13_n994(x)
+ else
+ fun_l13_n36(x)
+ end
+end
+
+def fun_l12_n292(x)
+ if (x < 1)
+ fun_l13_n731(x)
+ else
+ fun_l13_n473(x)
+ end
+end
+
+def fun_l12_n293(x)
+ if (x < 1)
+ fun_l13_n321(x)
+ else
+ fun_l13_n518(x)
+ end
+end
+
+def fun_l12_n294(x)
+ if (x < 1)
+ fun_l13_n91(x)
+ else
+ fun_l13_n765(x)
+ end
+end
+
+def fun_l12_n295(x)
+ if (x < 1)
+ fun_l13_n39(x)
+ else
+ fun_l13_n639(x)
+ end
+end
+
+def fun_l12_n296(x)
+ if (x < 1)
+ fun_l13_n800(x)
+ else
+ fun_l13_n821(x)
+ end
+end
+
+def fun_l12_n297(x)
+ if (x < 1)
+ fun_l13_n553(x)
+ else
+ fun_l13_n898(x)
+ end
+end
+
+def fun_l12_n298(x)
+ if (x < 1)
+ fun_l13_n487(x)
+ else
+ fun_l13_n470(x)
+ end
+end
+
+def fun_l12_n299(x)
+ if (x < 1)
+ fun_l13_n743(x)
+ else
+ fun_l13_n684(x)
+ end
+end
+
+def fun_l12_n300(x)
+ if (x < 1)
+ fun_l13_n177(x)
+ else
+ fun_l13_n375(x)
+ end
+end
+
+def fun_l12_n301(x)
+ if (x < 1)
+ fun_l13_n714(x)
+ else
+ fun_l13_n922(x)
+ end
+end
+
+def fun_l12_n302(x)
+ if (x < 1)
+ fun_l13_n845(x)
+ else
+ fun_l13_n93(x)
+ end
+end
+
+def fun_l12_n303(x)
+ if (x < 1)
+ fun_l13_n806(x)
+ else
+ fun_l13_n706(x)
+ end
+end
+
+def fun_l12_n304(x)
+ if (x < 1)
+ fun_l13_n428(x)
+ else
+ fun_l13_n942(x)
+ end
+end
+
+def fun_l12_n305(x)
+ if (x < 1)
+ fun_l13_n170(x)
+ else
+ fun_l13_n634(x)
+ end
+end
+
+def fun_l12_n306(x)
+ if (x < 1)
+ fun_l13_n998(x)
+ else
+ fun_l13_n224(x)
+ end
+end
+
+def fun_l12_n307(x)
+ if (x < 1)
+ fun_l13_n15(x)
+ else
+ fun_l13_n753(x)
+ end
+end
+
+def fun_l12_n308(x)
+ if (x < 1)
+ fun_l13_n323(x)
+ else
+ fun_l13_n846(x)
+ end
+end
+
+def fun_l12_n309(x)
+ if (x < 1)
+ fun_l13_n779(x)
+ else
+ fun_l13_n330(x)
+ end
+end
+
+def fun_l12_n310(x)
+ if (x < 1)
+ fun_l13_n652(x)
+ else
+ fun_l13_n560(x)
+ end
+end
+
+def fun_l12_n311(x)
+ if (x < 1)
+ fun_l13_n54(x)
+ else
+ fun_l13_n144(x)
+ end
+end
+
+def fun_l12_n312(x)
+ if (x < 1)
+ fun_l13_n674(x)
+ else
+ fun_l13_n779(x)
+ end
+end
+
+def fun_l12_n313(x)
+ if (x < 1)
+ fun_l13_n975(x)
+ else
+ fun_l13_n109(x)
+ end
+end
+
+def fun_l12_n314(x)
+ if (x < 1)
+ fun_l13_n997(x)
+ else
+ fun_l13_n827(x)
+ end
+end
+
+def fun_l12_n315(x)
+ if (x < 1)
+ fun_l13_n822(x)
+ else
+ fun_l13_n349(x)
+ end
+end
+
+def fun_l12_n316(x)
+ if (x < 1)
+ fun_l13_n516(x)
+ else
+ fun_l13_n974(x)
+ end
+end
+
+def fun_l12_n317(x)
+ if (x < 1)
+ fun_l13_n538(x)
+ else
+ fun_l13_n786(x)
+ end
+end
+
+def fun_l12_n318(x)
+ if (x < 1)
+ fun_l13_n125(x)
+ else
+ fun_l13_n809(x)
+ end
+end
+
+def fun_l12_n319(x)
+ if (x < 1)
+ fun_l13_n642(x)
+ else
+ fun_l13_n188(x)
+ end
+end
+
+def fun_l12_n320(x)
+ if (x < 1)
+ fun_l13_n904(x)
+ else
+ fun_l13_n396(x)
+ end
+end
+
+def fun_l12_n321(x)
+ if (x < 1)
+ fun_l13_n278(x)
+ else
+ fun_l13_n752(x)
+ end
+end
+
+def fun_l12_n322(x)
+ if (x < 1)
+ fun_l13_n566(x)
+ else
+ fun_l13_n894(x)
+ end
+end
+
+def fun_l12_n323(x)
+ if (x < 1)
+ fun_l13_n357(x)
+ else
+ fun_l13_n742(x)
+ end
+end
+
+def fun_l12_n324(x)
+ if (x < 1)
+ fun_l13_n667(x)
+ else
+ fun_l13_n764(x)
+ end
+end
+
+def fun_l12_n325(x)
+ if (x < 1)
+ fun_l13_n333(x)
+ else
+ fun_l13_n445(x)
+ end
+end
+
+def fun_l12_n326(x)
+ if (x < 1)
+ fun_l13_n669(x)
+ else
+ fun_l13_n484(x)
+ end
+end
+
+def fun_l12_n327(x)
+ if (x < 1)
+ fun_l13_n662(x)
+ else
+ fun_l13_n610(x)
+ end
+end
+
+def fun_l12_n328(x)
+ if (x < 1)
+ fun_l13_n869(x)
+ else
+ fun_l13_n993(x)
+ end
+end
+
+def fun_l12_n329(x)
+ if (x < 1)
+ fun_l13_n305(x)
+ else
+ fun_l13_n45(x)
+ end
+end
+
+def fun_l12_n330(x)
+ if (x < 1)
+ fun_l13_n32(x)
+ else
+ fun_l13_n253(x)
+ end
+end
+
+def fun_l12_n331(x)
+ if (x < 1)
+ fun_l13_n45(x)
+ else
+ fun_l13_n327(x)
+ end
+end
+
+def fun_l12_n332(x)
+ if (x < 1)
+ fun_l13_n685(x)
+ else
+ fun_l13_n562(x)
+ end
+end
+
+def fun_l12_n333(x)
+ if (x < 1)
+ fun_l13_n274(x)
+ else
+ fun_l13_n461(x)
+ end
+end
+
+def fun_l12_n334(x)
+ if (x < 1)
+ fun_l13_n93(x)
+ else
+ fun_l13_n7(x)
+ end
+end
+
+def fun_l12_n335(x)
+ if (x < 1)
+ fun_l13_n742(x)
+ else
+ fun_l13_n259(x)
+ end
+end
+
+def fun_l12_n336(x)
+ if (x < 1)
+ fun_l13_n518(x)
+ else
+ fun_l13_n108(x)
+ end
+end
+
+def fun_l12_n337(x)
+ if (x < 1)
+ fun_l13_n439(x)
+ else
+ fun_l13_n21(x)
+ end
+end
+
+def fun_l12_n338(x)
+ if (x < 1)
+ fun_l13_n34(x)
+ else
+ fun_l13_n869(x)
+ end
+end
+
+def fun_l12_n339(x)
+ if (x < 1)
+ fun_l13_n995(x)
+ else
+ fun_l13_n810(x)
+ end
+end
+
+def fun_l12_n340(x)
+ if (x < 1)
+ fun_l13_n640(x)
+ else
+ fun_l13_n108(x)
+ end
+end
+
+def fun_l12_n341(x)
+ if (x < 1)
+ fun_l13_n332(x)
+ else
+ fun_l13_n174(x)
+ end
+end
+
+def fun_l12_n342(x)
+ if (x < 1)
+ fun_l13_n425(x)
+ else
+ fun_l13_n523(x)
+ end
+end
+
+def fun_l12_n343(x)
+ if (x < 1)
+ fun_l13_n886(x)
+ else
+ fun_l13_n9(x)
+ end
+end
+
+def fun_l12_n344(x)
+ if (x < 1)
+ fun_l13_n644(x)
+ else
+ fun_l13_n558(x)
+ end
+end
+
+def fun_l12_n345(x)
+ if (x < 1)
+ fun_l13_n40(x)
+ else
+ fun_l13_n569(x)
+ end
+end
+
+def fun_l12_n346(x)
+ if (x < 1)
+ fun_l13_n530(x)
+ else
+ fun_l13_n52(x)
+ end
+end
+
+def fun_l12_n347(x)
+ if (x < 1)
+ fun_l13_n624(x)
+ else
+ fun_l13_n525(x)
+ end
+end
+
+def fun_l12_n348(x)
+ if (x < 1)
+ fun_l13_n106(x)
+ else
+ fun_l13_n101(x)
+ end
+end
+
+def fun_l12_n349(x)
+ if (x < 1)
+ fun_l13_n164(x)
+ else
+ fun_l13_n675(x)
+ end
+end
+
+def fun_l12_n350(x)
+ if (x < 1)
+ fun_l13_n349(x)
+ else
+ fun_l13_n125(x)
+ end
+end
+
+def fun_l12_n351(x)
+ if (x < 1)
+ fun_l13_n536(x)
+ else
+ fun_l13_n949(x)
+ end
+end
+
+def fun_l12_n352(x)
+ if (x < 1)
+ fun_l13_n872(x)
+ else
+ fun_l13_n678(x)
+ end
+end
+
+def fun_l12_n353(x)
+ if (x < 1)
+ fun_l13_n566(x)
+ else
+ fun_l13_n576(x)
+ end
+end
+
+def fun_l12_n354(x)
+ if (x < 1)
+ fun_l13_n978(x)
+ else
+ fun_l13_n539(x)
+ end
+end
+
+def fun_l12_n355(x)
+ if (x < 1)
+ fun_l13_n929(x)
+ else
+ fun_l13_n301(x)
+ end
+end
+
+def fun_l12_n356(x)
+ if (x < 1)
+ fun_l13_n768(x)
+ else
+ fun_l13_n292(x)
+ end
+end
+
+def fun_l12_n357(x)
+ if (x < 1)
+ fun_l13_n873(x)
+ else
+ fun_l13_n201(x)
+ end
+end
+
+def fun_l12_n358(x)
+ if (x < 1)
+ fun_l13_n852(x)
+ else
+ fun_l13_n144(x)
+ end
+end
+
+def fun_l12_n359(x)
+ if (x < 1)
+ fun_l13_n220(x)
+ else
+ fun_l13_n318(x)
+ end
+end
+
+def fun_l12_n360(x)
+ if (x < 1)
+ fun_l13_n339(x)
+ else
+ fun_l13_n896(x)
+ end
+end
+
+def fun_l12_n361(x)
+ if (x < 1)
+ fun_l13_n896(x)
+ else
+ fun_l13_n611(x)
+ end
+end
+
+def fun_l12_n362(x)
+ if (x < 1)
+ fun_l13_n237(x)
+ else
+ fun_l13_n781(x)
+ end
+end
+
+def fun_l12_n363(x)
+ if (x < 1)
+ fun_l13_n994(x)
+ else
+ fun_l13_n306(x)
+ end
+end
+
+def fun_l12_n364(x)
+ if (x < 1)
+ fun_l13_n437(x)
+ else
+ fun_l13_n634(x)
+ end
+end
+
+def fun_l12_n365(x)
+ if (x < 1)
+ fun_l13_n367(x)
+ else
+ fun_l13_n798(x)
+ end
+end
+
+def fun_l12_n366(x)
+ if (x < 1)
+ fun_l13_n831(x)
+ else
+ fun_l13_n352(x)
+ end
+end
+
+def fun_l12_n367(x)
+ if (x < 1)
+ fun_l13_n554(x)
+ else
+ fun_l13_n999(x)
+ end
+end
+
+def fun_l12_n368(x)
+ if (x < 1)
+ fun_l13_n214(x)
+ else
+ fun_l13_n67(x)
+ end
+end
+
+def fun_l12_n369(x)
+ if (x < 1)
+ fun_l13_n628(x)
+ else
+ fun_l13_n637(x)
+ end
+end
+
+def fun_l12_n370(x)
+ if (x < 1)
+ fun_l13_n42(x)
+ else
+ fun_l13_n631(x)
+ end
+end
+
+def fun_l12_n371(x)
+ if (x < 1)
+ fun_l13_n53(x)
+ else
+ fun_l13_n226(x)
+ end
+end
+
+def fun_l12_n372(x)
+ if (x < 1)
+ fun_l13_n810(x)
+ else
+ fun_l13_n853(x)
+ end
+end
+
+def fun_l12_n373(x)
+ if (x < 1)
+ fun_l13_n257(x)
+ else
+ fun_l13_n480(x)
+ end
+end
+
+def fun_l12_n374(x)
+ if (x < 1)
+ fun_l13_n715(x)
+ else
+ fun_l13_n481(x)
+ end
+end
+
+def fun_l12_n375(x)
+ if (x < 1)
+ fun_l13_n499(x)
+ else
+ fun_l13_n694(x)
+ end
+end
+
+def fun_l12_n376(x)
+ if (x < 1)
+ fun_l13_n376(x)
+ else
+ fun_l13_n99(x)
+ end
+end
+
+def fun_l12_n377(x)
+ if (x < 1)
+ fun_l13_n672(x)
+ else
+ fun_l13_n421(x)
+ end
+end
+
+def fun_l12_n378(x)
+ if (x < 1)
+ fun_l13_n320(x)
+ else
+ fun_l13_n590(x)
+ end
+end
+
+def fun_l12_n379(x)
+ if (x < 1)
+ fun_l13_n678(x)
+ else
+ fun_l13_n727(x)
+ end
+end
+
+def fun_l12_n380(x)
+ if (x < 1)
+ fun_l13_n269(x)
+ else
+ fun_l13_n74(x)
+ end
+end
+
+def fun_l12_n381(x)
+ if (x < 1)
+ fun_l13_n838(x)
+ else
+ fun_l13_n105(x)
+ end
+end
+
+def fun_l12_n382(x)
+ if (x < 1)
+ fun_l13_n482(x)
+ else
+ fun_l13_n400(x)
+ end
+end
+
+def fun_l12_n383(x)
+ if (x < 1)
+ fun_l13_n376(x)
+ else
+ fun_l13_n829(x)
+ end
+end
+
+def fun_l12_n384(x)
+ if (x < 1)
+ fun_l13_n81(x)
+ else
+ fun_l13_n895(x)
+ end
+end
+
+def fun_l12_n385(x)
+ if (x < 1)
+ fun_l13_n718(x)
+ else
+ fun_l13_n641(x)
+ end
+end
+
+def fun_l12_n386(x)
+ if (x < 1)
+ fun_l13_n825(x)
+ else
+ fun_l13_n761(x)
+ end
+end
+
+def fun_l12_n387(x)
+ if (x < 1)
+ fun_l13_n930(x)
+ else
+ fun_l13_n204(x)
+ end
+end
+
+def fun_l12_n388(x)
+ if (x < 1)
+ fun_l13_n81(x)
+ else
+ fun_l13_n319(x)
+ end
+end
+
+def fun_l12_n389(x)
+ if (x < 1)
+ fun_l13_n40(x)
+ else
+ fun_l13_n57(x)
+ end
+end
+
+def fun_l12_n390(x)
+ if (x < 1)
+ fun_l13_n206(x)
+ else
+ fun_l13_n219(x)
+ end
+end
+
+def fun_l12_n391(x)
+ if (x < 1)
+ fun_l13_n538(x)
+ else
+ fun_l13_n239(x)
+ end
+end
+
+def fun_l12_n392(x)
+ if (x < 1)
+ fun_l13_n326(x)
+ else
+ fun_l13_n613(x)
+ end
+end
+
+def fun_l12_n393(x)
+ if (x < 1)
+ fun_l13_n860(x)
+ else
+ fun_l13_n712(x)
+ end
+end
+
+def fun_l12_n394(x)
+ if (x < 1)
+ fun_l13_n829(x)
+ else
+ fun_l13_n153(x)
+ end
+end
+
+def fun_l12_n395(x)
+ if (x < 1)
+ fun_l13_n734(x)
+ else
+ fun_l13_n926(x)
+ end
+end
+
+def fun_l12_n396(x)
+ if (x < 1)
+ fun_l13_n188(x)
+ else
+ fun_l13_n821(x)
+ end
+end
+
+def fun_l12_n397(x)
+ if (x < 1)
+ fun_l13_n161(x)
+ else
+ fun_l13_n284(x)
+ end
+end
+
+def fun_l12_n398(x)
+ if (x < 1)
+ fun_l13_n402(x)
+ else
+ fun_l13_n481(x)
+ end
+end
+
+def fun_l12_n399(x)
+ if (x < 1)
+ fun_l13_n469(x)
+ else
+ fun_l13_n348(x)
+ end
+end
+
+def fun_l12_n400(x)
+ if (x < 1)
+ fun_l13_n567(x)
+ else
+ fun_l13_n702(x)
+ end
+end
+
+def fun_l12_n401(x)
+ if (x < 1)
+ fun_l13_n787(x)
+ else
+ fun_l13_n5(x)
+ end
+end
+
+def fun_l12_n402(x)
+ if (x < 1)
+ fun_l13_n525(x)
+ else
+ fun_l13_n983(x)
+ end
+end
+
+def fun_l12_n403(x)
+ if (x < 1)
+ fun_l13_n185(x)
+ else
+ fun_l13_n315(x)
+ end
+end
+
+def fun_l12_n404(x)
+ if (x < 1)
+ fun_l13_n746(x)
+ else
+ fun_l13_n892(x)
+ end
+end
+
+def fun_l12_n405(x)
+ if (x < 1)
+ fun_l13_n990(x)
+ else
+ fun_l13_n868(x)
+ end
+end
+
+def fun_l12_n406(x)
+ if (x < 1)
+ fun_l13_n399(x)
+ else
+ fun_l13_n298(x)
+ end
+end
+
+def fun_l12_n407(x)
+ if (x < 1)
+ fun_l13_n283(x)
+ else
+ fun_l13_n87(x)
+ end
+end
+
+def fun_l12_n408(x)
+ if (x < 1)
+ fun_l13_n597(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n409(x)
+ if (x < 1)
+ fun_l13_n517(x)
+ else
+ fun_l13_n700(x)
+ end
+end
+
+def fun_l12_n410(x)
+ if (x < 1)
+ fun_l13_n796(x)
+ else
+ fun_l13_n282(x)
+ end
+end
+
+def fun_l12_n411(x)
+ if (x < 1)
+ fun_l13_n876(x)
+ else
+ fun_l13_n562(x)
+ end
+end
+
+def fun_l12_n412(x)
+ if (x < 1)
+ fun_l13_n344(x)
+ else
+ fun_l13_n182(x)
+ end
+end
+
+def fun_l12_n413(x)
+ if (x < 1)
+ fun_l13_n879(x)
+ else
+ fun_l13_n443(x)
+ end
+end
+
+def fun_l12_n414(x)
+ if (x < 1)
+ fun_l13_n335(x)
+ else
+ fun_l13_n451(x)
+ end
+end
+
+def fun_l12_n415(x)
+ if (x < 1)
+ fun_l13_n112(x)
+ else
+ fun_l13_n391(x)
+ end
+end
+
+def fun_l12_n416(x)
+ if (x < 1)
+ fun_l13_n217(x)
+ else
+ fun_l13_n221(x)
+ end
+end
+
+def fun_l12_n417(x)
+ if (x < 1)
+ fun_l13_n113(x)
+ else
+ fun_l13_n563(x)
+ end
+end
+
+def fun_l12_n418(x)
+ if (x < 1)
+ fun_l13_n486(x)
+ else
+ fun_l13_n374(x)
+ end
+end
+
+def fun_l12_n419(x)
+ if (x < 1)
+ fun_l13_n970(x)
+ else
+ fun_l13_n393(x)
+ end
+end
+
+def fun_l12_n420(x)
+ if (x < 1)
+ fun_l13_n273(x)
+ else
+ fun_l13_n64(x)
+ end
+end
+
+def fun_l12_n421(x)
+ if (x < 1)
+ fun_l13_n69(x)
+ else
+ fun_l13_n158(x)
+ end
+end
+
+def fun_l12_n422(x)
+ if (x < 1)
+ fun_l13_n308(x)
+ else
+ fun_l13_n609(x)
+ end
+end
+
+def fun_l12_n423(x)
+ if (x < 1)
+ fun_l13_n964(x)
+ else
+ fun_l13_n36(x)
+ end
+end
+
+def fun_l12_n424(x)
+ if (x < 1)
+ fun_l13_n783(x)
+ else
+ fun_l13_n513(x)
+ end
+end
+
+def fun_l12_n425(x)
+ if (x < 1)
+ fun_l13_n792(x)
+ else
+ fun_l13_n960(x)
+ end
+end
+
+def fun_l12_n426(x)
+ if (x < 1)
+ fun_l13_n160(x)
+ else
+ fun_l13_n911(x)
+ end
+end
+
+def fun_l12_n427(x)
+ if (x < 1)
+ fun_l13_n374(x)
+ else
+ fun_l13_n672(x)
+ end
+end
+
+def fun_l12_n428(x)
+ if (x < 1)
+ fun_l13_n694(x)
+ else
+ fun_l13_n166(x)
+ end
+end
+
+def fun_l12_n429(x)
+ if (x < 1)
+ fun_l13_n807(x)
+ else
+ fun_l13_n929(x)
+ end
+end
+
+def fun_l12_n430(x)
+ if (x < 1)
+ fun_l13_n997(x)
+ else
+ fun_l13_n938(x)
+ end
+end
+
+def fun_l12_n431(x)
+ if (x < 1)
+ fun_l13_n934(x)
+ else
+ fun_l13_n365(x)
+ end
+end
+
+def fun_l12_n432(x)
+ if (x < 1)
+ fun_l13_n546(x)
+ else
+ fun_l13_n272(x)
+ end
+end
+
+def fun_l12_n433(x)
+ if (x < 1)
+ fun_l13_n176(x)
+ else
+ fun_l13_n629(x)
+ end
+end
+
+def fun_l12_n434(x)
+ if (x < 1)
+ fun_l13_n536(x)
+ else
+ fun_l13_n165(x)
+ end
+end
+
+def fun_l12_n435(x)
+ if (x < 1)
+ fun_l13_n915(x)
+ else
+ fun_l13_n823(x)
+ end
+end
+
+def fun_l12_n436(x)
+ if (x < 1)
+ fun_l13_n580(x)
+ else
+ fun_l13_n214(x)
+ end
+end
+
+def fun_l12_n437(x)
+ if (x < 1)
+ fun_l13_n353(x)
+ else
+ fun_l13_n626(x)
+ end
+end
+
+def fun_l12_n438(x)
+ if (x < 1)
+ fun_l13_n888(x)
+ else
+ fun_l13_n874(x)
+ end
+end
+
+def fun_l12_n439(x)
+ if (x < 1)
+ fun_l13_n670(x)
+ else
+ fun_l13_n279(x)
+ end
+end
+
+def fun_l12_n440(x)
+ if (x < 1)
+ fun_l13_n818(x)
+ else
+ fun_l13_n927(x)
+ end
+end
+
+def fun_l12_n441(x)
+ if (x < 1)
+ fun_l13_n686(x)
+ else
+ fun_l13_n32(x)
+ end
+end
+
+def fun_l12_n442(x)
+ if (x < 1)
+ fun_l13_n882(x)
+ else
+ fun_l13_n932(x)
+ end
+end
+
+def fun_l12_n443(x)
+ if (x < 1)
+ fun_l13_n677(x)
+ else
+ fun_l13_n267(x)
+ end
+end
+
+def fun_l12_n444(x)
+ if (x < 1)
+ fun_l13_n632(x)
+ else
+ fun_l13_n808(x)
+ end
+end
+
+def fun_l12_n445(x)
+ if (x < 1)
+ fun_l13_n159(x)
+ else
+ fun_l13_n251(x)
+ end
+end
+
+def fun_l12_n446(x)
+ if (x < 1)
+ fun_l13_n939(x)
+ else
+ fun_l13_n231(x)
+ end
+end
+
+def fun_l12_n447(x)
+ if (x < 1)
+ fun_l13_n971(x)
+ else
+ fun_l13_n103(x)
+ end
+end
+
+def fun_l12_n448(x)
+ if (x < 1)
+ fun_l13_n556(x)
+ else
+ fun_l13_n356(x)
+ end
+end
+
+def fun_l12_n449(x)
+ if (x < 1)
+ fun_l13_n999(x)
+ else
+ fun_l13_n722(x)
+ end
+end
+
+def fun_l12_n450(x)
+ if (x < 1)
+ fun_l13_n387(x)
+ else
+ fun_l13_n15(x)
+ end
+end
+
+def fun_l12_n451(x)
+ if (x < 1)
+ fun_l13_n736(x)
+ else
+ fun_l13_n869(x)
+ end
+end
+
+def fun_l12_n452(x)
+ if (x < 1)
+ fun_l13_n984(x)
+ else
+ fun_l13_n396(x)
+ end
+end
+
+def fun_l12_n453(x)
+ if (x < 1)
+ fun_l13_n375(x)
+ else
+ fun_l13_n275(x)
+ end
+end
+
+def fun_l12_n454(x)
+ if (x < 1)
+ fun_l13_n100(x)
+ else
+ fun_l13_n956(x)
+ end
+end
+
+def fun_l12_n455(x)
+ if (x < 1)
+ fun_l13_n575(x)
+ else
+ fun_l13_n22(x)
+ end
+end
+
+def fun_l12_n456(x)
+ if (x < 1)
+ fun_l13_n515(x)
+ else
+ fun_l13_n716(x)
+ end
+end
+
+def fun_l12_n457(x)
+ if (x < 1)
+ fun_l13_n953(x)
+ else
+ fun_l13_n823(x)
+ end
+end
+
+def fun_l12_n458(x)
+ if (x < 1)
+ fun_l13_n343(x)
+ else
+ fun_l13_n843(x)
+ end
+end
+
+def fun_l12_n459(x)
+ if (x < 1)
+ fun_l13_n209(x)
+ else
+ fun_l13_n464(x)
+ end
+end
+
+def fun_l12_n460(x)
+ if (x < 1)
+ fun_l13_n281(x)
+ else
+ fun_l13_n165(x)
+ end
+end
+
+def fun_l12_n461(x)
+ if (x < 1)
+ fun_l13_n416(x)
+ else
+ fun_l13_n896(x)
+ end
+end
+
+def fun_l12_n462(x)
+ if (x < 1)
+ fun_l13_n677(x)
+ else
+ fun_l13_n767(x)
+ end
+end
+
+def fun_l12_n463(x)
+ if (x < 1)
+ fun_l13_n271(x)
+ else
+ fun_l13_n515(x)
+ end
+end
+
+def fun_l12_n464(x)
+ if (x < 1)
+ fun_l13_n589(x)
+ else
+ fun_l13_n447(x)
+ end
+end
+
+def fun_l12_n465(x)
+ if (x < 1)
+ fun_l13_n316(x)
+ else
+ fun_l13_n309(x)
+ end
+end
+
+def fun_l12_n466(x)
+ if (x < 1)
+ fun_l13_n48(x)
+ else
+ fun_l13_n999(x)
+ end
+end
+
+def fun_l12_n467(x)
+ if (x < 1)
+ fun_l13_n334(x)
+ else
+ fun_l13_n138(x)
+ end
+end
+
+def fun_l12_n468(x)
+ if (x < 1)
+ fun_l13_n483(x)
+ else
+ fun_l13_n353(x)
+ end
+end
+
+def fun_l12_n469(x)
+ if (x < 1)
+ fun_l13_n893(x)
+ else
+ fun_l13_n114(x)
+ end
+end
+
+def fun_l12_n470(x)
+ if (x < 1)
+ fun_l13_n945(x)
+ else
+ fun_l13_n438(x)
+ end
+end
+
+def fun_l12_n471(x)
+ if (x < 1)
+ fun_l13_n546(x)
+ else
+ fun_l13_n181(x)
+ end
+end
+
+def fun_l12_n472(x)
+ if (x < 1)
+ fun_l13_n443(x)
+ else
+ fun_l13_n35(x)
+ end
+end
+
+def fun_l12_n473(x)
+ if (x < 1)
+ fun_l13_n611(x)
+ else
+ fun_l13_n106(x)
+ end
+end
+
+def fun_l12_n474(x)
+ if (x < 1)
+ fun_l13_n408(x)
+ else
+ fun_l13_n162(x)
+ end
+end
+
+def fun_l12_n475(x)
+ if (x < 1)
+ fun_l13_n104(x)
+ else
+ fun_l13_n173(x)
+ end
+end
+
+def fun_l12_n476(x)
+ if (x < 1)
+ fun_l13_n922(x)
+ else
+ fun_l13_n593(x)
+ end
+end
+
+def fun_l12_n477(x)
+ if (x < 1)
+ fun_l13_n650(x)
+ else
+ fun_l13_n659(x)
+ end
+end
+
+def fun_l12_n478(x)
+ if (x < 1)
+ fun_l13_n746(x)
+ else
+ fun_l13_n484(x)
+ end
+end
+
+def fun_l12_n479(x)
+ if (x < 1)
+ fun_l13_n366(x)
+ else
+ fun_l13_n318(x)
+ end
+end
+
+def fun_l12_n480(x)
+ if (x < 1)
+ fun_l13_n995(x)
+ else
+ fun_l13_n108(x)
+ end
+end
+
+def fun_l12_n481(x)
+ if (x < 1)
+ fun_l13_n61(x)
+ else
+ fun_l13_n426(x)
+ end
+end
+
+def fun_l12_n482(x)
+ if (x < 1)
+ fun_l13_n578(x)
+ else
+ fun_l13_n955(x)
+ end
+end
+
+def fun_l12_n483(x)
+ if (x < 1)
+ fun_l13_n650(x)
+ else
+ fun_l13_n588(x)
+ end
+end
+
+def fun_l12_n484(x)
+ if (x < 1)
+ fun_l13_n842(x)
+ else
+ fun_l13_n198(x)
+ end
+end
+
+def fun_l12_n485(x)
+ if (x < 1)
+ fun_l13_n439(x)
+ else
+ fun_l13_n372(x)
+ end
+end
+
+def fun_l12_n486(x)
+ if (x < 1)
+ fun_l13_n94(x)
+ else
+ fun_l13_n531(x)
+ end
+end
+
+def fun_l12_n487(x)
+ if (x < 1)
+ fun_l13_n743(x)
+ else
+ fun_l13_n955(x)
+ end
+end
+
+def fun_l12_n488(x)
+ if (x < 1)
+ fun_l13_n648(x)
+ else
+ fun_l13_n849(x)
+ end
+end
+
+def fun_l12_n489(x)
+ if (x < 1)
+ fun_l13_n371(x)
+ else
+ fun_l13_n972(x)
+ end
+end
+
+def fun_l12_n490(x)
+ if (x < 1)
+ fun_l13_n128(x)
+ else
+ fun_l13_n617(x)
+ end
+end
+
+def fun_l12_n491(x)
+ if (x < 1)
+ fun_l13_n22(x)
+ else
+ fun_l13_n201(x)
+ end
+end
+
+def fun_l12_n492(x)
+ if (x < 1)
+ fun_l13_n209(x)
+ else
+ fun_l13_n679(x)
+ end
+end
+
+def fun_l12_n493(x)
+ if (x < 1)
+ fun_l13_n415(x)
+ else
+ fun_l13_n765(x)
+ end
+end
+
+def fun_l12_n494(x)
+ if (x < 1)
+ fun_l13_n498(x)
+ else
+ fun_l13_n719(x)
+ end
+end
+
+def fun_l12_n495(x)
+ if (x < 1)
+ fun_l13_n492(x)
+ else
+ fun_l13_n161(x)
+ end
+end
+
+def fun_l12_n496(x)
+ if (x < 1)
+ fun_l13_n162(x)
+ else
+ fun_l13_n54(x)
+ end
+end
+
+def fun_l12_n497(x)
+ if (x < 1)
+ fun_l13_n743(x)
+ else
+ fun_l13_n834(x)
+ end
+end
+
+def fun_l12_n498(x)
+ if (x < 1)
+ fun_l13_n376(x)
+ else
+ fun_l13_n676(x)
+ end
+end
+
+def fun_l12_n499(x)
+ if (x < 1)
+ fun_l13_n626(x)
+ else
+ fun_l13_n357(x)
+ end
+end
+
+def fun_l12_n500(x)
+ if (x < 1)
+ fun_l13_n874(x)
+ else
+ fun_l13_n53(x)
+ end
+end
+
+def fun_l12_n501(x)
+ if (x < 1)
+ fun_l13_n146(x)
+ else
+ fun_l13_n732(x)
+ end
+end
+
+def fun_l12_n502(x)
+ if (x < 1)
+ fun_l13_n908(x)
+ else
+ fun_l13_n933(x)
+ end
+end
+
+def fun_l12_n503(x)
+ if (x < 1)
+ fun_l13_n758(x)
+ else
+ fun_l13_n289(x)
+ end
+end
+
+def fun_l12_n504(x)
+ if (x < 1)
+ fun_l13_n913(x)
+ else
+ fun_l13_n770(x)
+ end
+end
+
+def fun_l12_n505(x)
+ if (x < 1)
+ fun_l13_n305(x)
+ else
+ fun_l13_n990(x)
+ end
+end
+
+def fun_l12_n506(x)
+ if (x < 1)
+ fun_l13_n79(x)
+ else
+ fun_l13_n199(x)
+ end
+end
+
+def fun_l12_n507(x)
+ if (x < 1)
+ fun_l13_n430(x)
+ else
+ fun_l13_n394(x)
+ end
+end
+
+def fun_l12_n508(x)
+ if (x < 1)
+ fun_l13_n835(x)
+ else
+ fun_l13_n64(x)
+ end
+end
+
+def fun_l12_n509(x)
+ if (x < 1)
+ fun_l13_n661(x)
+ else
+ fun_l13_n301(x)
+ end
+end
+
+def fun_l12_n510(x)
+ if (x < 1)
+ fun_l13_n672(x)
+ else
+ fun_l13_n498(x)
+ end
+end
+
+def fun_l12_n511(x)
+ if (x < 1)
+ fun_l13_n540(x)
+ else
+ fun_l13_n57(x)
+ end
+end
+
+def fun_l12_n512(x)
+ if (x < 1)
+ fun_l13_n634(x)
+ else
+ fun_l13_n790(x)
+ end
+end
+
+def fun_l12_n513(x)
+ if (x < 1)
+ fun_l13_n998(x)
+ else
+ fun_l13_n3(x)
+ end
+end
+
+def fun_l12_n514(x)
+ if (x < 1)
+ fun_l13_n482(x)
+ else
+ fun_l13_n116(x)
+ end
+end
+
+def fun_l12_n515(x)
+ if (x < 1)
+ fun_l13_n967(x)
+ else
+ fun_l13_n17(x)
+ end
+end
+
+def fun_l12_n516(x)
+ if (x < 1)
+ fun_l13_n614(x)
+ else
+ fun_l13_n260(x)
+ end
+end
+
+def fun_l12_n517(x)
+ if (x < 1)
+ fun_l13_n273(x)
+ else
+ fun_l13_n982(x)
+ end
+end
+
+def fun_l12_n518(x)
+ if (x < 1)
+ fun_l13_n786(x)
+ else
+ fun_l13_n186(x)
+ end
+end
+
+def fun_l12_n519(x)
+ if (x < 1)
+ fun_l13_n990(x)
+ else
+ fun_l13_n223(x)
+ end
+end
+
+def fun_l12_n520(x)
+ if (x < 1)
+ fun_l13_n406(x)
+ else
+ fun_l13_n374(x)
+ end
+end
+
+def fun_l12_n521(x)
+ if (x < 1)
+ fun_l13_n548(x)
+ else
+ fun_l13_n160(x)
+ end
+end
+
+def fun_l12_n522(x)
+ if (x < 1)
+ fun_l13_n249(x)
+ else
+ fun_l13_n295(x)
+ end
+end
+
+def fun_l12_n523(x)
+ if (x < 1)
+ fun_l13_n434(x)
+ else
+ fun_l13_n73(x)
+ end
+end
+
+def fun_l12_n524(x)
+ if (x < 1)
+ fun_l13_n550(x)
+ else
+ fun_l13_n472(x)
+ end
+end
+
+def fun_l12_n525(x)
+ if (x < 1)
+ fun_l13_n720(x)
+ else
+ fun_l13_n979(x)
+ end
+end
+
+def fun_l12_n526(x)
+ if (x < 1)
+ fun_l13_n806(x)
+ else
+ fun_l13_n156(x)
+ end
+end
+
+def fun_l12_n527(x)
+ if (x < 1)
+ fun_l13_n689(x)
+ else
+ fun_l13_n781(x)
+ end
+end
+
+def fun_l12_n528(x)
+ if (x < 1)
+ fun_l13_n130(x)
+ else
+ fun_l13_n909(x)
+ end
+end
+
+def fun_l12_n529(x)
+ if (x < 1)
+ fun_l13_n762(x)
+ else
+ fun_l13_n301(x)
+ end
+end
+
+def fun_l12_n530(x)
+ if (x < 1)
+ fun_l13_n580(x)
+ else
+ fun_l13_n269(x)
+ end
+end
+
+def fun_l12_n531(x)
+ if (x < 1)
+ fun_l13_n427(x)
+ else
+ fun_l13_n279(x)
+ end
+end
+
+def fun_l12_n532(x)
+ if (x < 1)
+ fun_l13_n408(x)
+ else
+ fun_l13_n523(x)
+ end
+end
+
+def fun_l12_n533(x)
+ if (x < 1)
+ fun_l13_n358(x)
+ else
+ fun_l13_n386(x)
+ end
+end
+
+def fun_l12_n534(x)
+ if (x < 1)
+ fun_l13_n401(x)
+ else
+ fun_l13_n148(x)
+ end
+end
+
+def fun_l12_n535(x)
+ if (x < 1)
+ fun_l13_n588(x)
+ else
+ fun_l13_n607(x)
+ end
+end
+
+def fun_l12_n536(x)
+ if (x < 1)
+ fun_l13_n445(x)
+ else
+ fun_l13_n681(x)
+ end
+end
+
+def fun_l12_n537(x)
+ if (x < 1)
+ fun_l13_n16(x)
+ else
+ fun_l13_n931(x)
+ end
+end
+
+def fun_l12_n538(x)
+ if (x < 1)
+ fun_l13_n567(x)
+ else
+ fun_l13_n9(x)
+ end
+end
+
+def fun_l12_n539(x)
+ if (x < 1)
+ fun_l13_n584(x)
+ else
+ fun_l13_n46(x)
+ end
+end
+
+def fun_l12_n540(x)
+ if (x < 1)
+ fun_l13_n147(x)
+ else
+ fun_l13_n498(x)
+ end
+end
+
+def fun_l12_n541(x)
+ if (x < 1)
+ fun_l13_n727(x)
+ else
+ fun_l13_n152(x)
+ end
+end
+
+def fun_l12_n542(x)
+ if (x < 1)
+ fun_l13_n797(x)
+ else
+ fun_l13_n789(x)
+ end
+end
+
+def fun_l12_n543(x)
+ if (x < 1)
+ fun_l13_n711(x)
+ else
+ fun_l13_n939(x)
+ end
+end
+
+def fun_l12_n544(x)
+ if (x < 1)
+ fun_l13_n276(x)
+ else
+ fun_l13_n325(x)
+ end
+end
+
+def fun_l12_n545(x)
+ if (x < 1)
+ fun_l13_n800(x)
+ else
+ fun_l13_n974(x)
+ end
+end
+
+def fun_l12_n546(x)
+ if (x < 1)
+ fun_l13_n654(x)
+ else
+ fun_l13_n331(x)
+ end
+end
+
+def fun_l12_n547(x)
+ if (x < 1)
+ fun_l13_n179(x)
+ else
+ fun_l13_n395(x)
+ end
+end
+
+def fun_l12_n548(x)
+ if (x < 1)
+ fun_l13_n348(x)
+ else
+ fun_l13_n210(x)
+ end
+end
+
+def fun_l12_n549(x)
+ if (x < 1)
+ fun_l13_n669(x)
+ else
+ fun_l13_n459(x)
+ end
+end
+
+def fun_l12_n550(x)
+ if (x < 1)
+ fun_l13_n316(x)
+ else
+ fun_l13_n846(x)
+ end
+end
+
+def fun_l12_n551(x)
+ if (x < 1)
+ fun_l13_n262(x)
+ else
+ fun_l13_n430(x)
+ end
+end
+
+def fun_l12_n552(x)
+ if (x < 1)
+ fun_l13_n224(x)
+ else
+ fun_l13_n866(x)
+ end
+end
+
+def fun_l12_n553(x)
+ if (x < 1)
+ fun_l13_n551(x)
+ else
+ fun_l13_n30(x)
+ end
+end
+
+def fun_l12_n554(x)
+ if (x < 1)
+ fun_l13_n864(x)
+ else
+ fun_l13_n931(x)
+ end
+end
+
+def fun_l12_n555(x)
+ if (x < 1)
+ fun_l13_n427(x)
+ else
+ fun_l13_n138(x)
+ end
+end
+
+def fun_l12_n556(x)
+ if (x < 1)
+ fun_l13_n603(x)
+ else
+ fun_l13_n167(x)
+ end
+end
+
+def fun_l12_n557(x)
+ if (x < 1)
+ fun_l13_n858(x)
+ else
+ fun_l13_n123(x)
+ end
+end
+
+def fun_l12_n558(x)
+ if (x < 1)
+ fun_l13_n729(x)
+ else
+ fun_l13_n769(x)
+ end
+end
+
+def fun_l12_n559(x)
+ if (x < 1)
+ fun_l13_n529(x)
+ else
+ fun_l13_n114(x)
+ end
+end
+
+def fun_l12_n560(x)
+ if (x < 1)
+ fun_l13_n727(x)
+ else
+ fun_l13_n673(x)
+ end
+end
+
+def fun_l12_n561(x)
+ if (x < 1)
+ fun_l13_n742(x)
+ else
+ fun_l13_n981(x)
+ end
+end
+
+def fun_l12_n562(x)
+ if (x < 1)
+ fun_l13_n29(x)
+ else
+ fun_l13_n493(x)
+ end
+end
+
+def fun_l12_n563(x)
+ if (x < 1)
+ fun_l13_n207(x)
+ else
+ fun_l13_n361(x)
+ end
+end
+
+def fun_l12_n564(x)
+ if (x < 1)
+ fun_l13_n370(x)
+ else
+ fun_l13_n185(x)
+ end
+end
+
+def fun_l12_n565(x)
+ if (x < 1)
+ fun_l13_n755(x)
+ else
+ fun_l13_n28(x)
+ end
+end
+
+def fun_l12_n566(x)
+ if (x < 1)
+ fun_l13_n332(x)
+ else
+ fun_l13_n718(x)
+ end
+end
+
+def fun_l12_n567(x)
+ if (x < 1)
+ fun_l13_n329(x)
+ else
+ fun_l13_n623(x)
+ end
+end
+
+def fun_l12_n568(x)
+ if (x < 1)
+ fun_l13_n592(x)
+ else
+ fun_l13_n870(x)
+ end
+end
+
+def fun_l12_n569(x)
+ if (x < 1)
+ fun_l13_n539(x)
+ else
+ fun_l13_n68(x)
+ end
+end
+
+def fun_l12_n570(x)
+ if (x < 1)
+ fun_l13_n794(x)
+ else
+ fun_l13_n617(x)
+ end
+end
+
+def fun_l12_n571(x)
+ if (x < 1)
+ fun_l13_n801(x)
+ else
+ fun_l13_n610(x)
+ end
+end
+
+def fun_l12_n572(x)
+ if (x < 1)
+ fun_l13_n781(x)
+ else
+ fun_l13_n879(x)
+ end
+end
+
+def fun_l12_n573(x)
+ if (x < 1)
+ fun_l13_n519(x)
+ else
+ fun_l13_n748(x)
+ end
+end
+
+def fun_l12_n574(x)
+ if (x < 1)
+ fun_l13_n416(x)
+ else
+ fun_l13_n908(x)
+ end
+end
+
+def fun_l12_n575(x)
+ if (x < 1)
+ fun_l13_n288(x)
+ else
+ fun_l13_n925(x)
+ end
+end
+
+def fun_l12_n576(x)
+ if (x < 1)
+ fun_l13_n398(x)
+ else
+ fun_l13_n185(x)
+ end
+end
+
+def fun_l12_n577(x)
+ if (x < 1)
+ fun_l13_n742(x)
+ else
+ fun_l13_n768(x)
+ end
+end
+
+def fun_l12_n578(x)
+ if (x < 1)
+ fun_l13_n472(x)
+ else
+ fun_l13_n474(x)
+ end
+end
+
+def fun_l12_n579(x)
+ if (x < 1)
+ fun_l13_n229(x)
+ else
+ fun_l13_n479(x)
+ end
+end
+
+def fun_l12_n580(x)
+ if (x < 1)
+ fun_l13_n483(x)
+ else
+ fun_l13_n60(x)
+ end
+end
+
+def fun_l12_n581(x)
+ if (x < 1)
+ fun_l13_n971(x)
+ else
+ fun_l13_n958(x)
+ end
+end
+
+def fun_l12_n582(x)
+ if (x < 1)
+ fun_l13_n612(x)
+ else
+ fun_l13_n491(x)
+ end
+end
+
+def fun_l12_n583(x)
+ if (x < 1)
+ fun_l13_n320(x)
+ else
+ fun_l13_n356(x)
+ end
+end
+
+def fun_l12_n584(x)
+ if (x < 1)
+ fun_l13_n521(x)
+ else
+ fun_l13_n126(x)
+ end
+end
+
+def fun_l12_n585(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n503(x)
+ end
+end
+
+def fun_l12_n586(x)
+ if (x < 1)
+ fun_l13_n715(x)
+ else
+ fun_l13_n849(x)
+ end
+end
+
+def fun_l12_n587(x)
+ if (x < 1)
+ fun_l13_n192(x)
+ else
+ fun_l13_n278(x)
+ end
+end
+
+def fun_l12_n588(x)
+ if (x < 1)
+ fun_l13_n882(x)
+ else
+ fun_l13_n992(x)
+ end
+end
+
+def fun_l12_n589(x)
+ if (x < 1)
+ fun_l13_n693(x)
+ else
+ fun_l13_n734(x)
+ end
+end
+
+def fun_l12_n590(x)
+ if (x < 1)
+ fun_l13_n207(x)
+ else
+ fun_l13_n674(x)
+ end
+end
+
+def fun_l12_n591(x)
+ if (x < 1)
+ fun_l13_n409(x)
+ else
+ fun_l13_n937(x)
+ end
+end
+
+def fun_l12_n592(x)
+ if (x < 1)
+ fun_l13_n424(x)
+ else
+ fun_l13_n709(x)
+ end
+end
+
+def fun_l12_n593(x)
+ if (x < 1)
+ fun_l13_n530(x)
+ else
+ fun_l13_n50(x)
+ end
+end
+
+def fun_l12_n594(x)
+ if (x < 1)
+ fun_l13_n451(x)
+ else
+ fun_l13_n513(x)
+ end
+end
+
+def fun_l12_n595(x)
+ if (x < 1)
+ fun_l13_n522(x)
+ else
+ fun_l13_n414(x)
+ end
+end
+
+def fun_l12_n596(x)
+ if (x < 1)
+ fun_l13_n352(x)
+ else
+ fun_l13_n323(x)
+ end
+end
+
+def fun_l12_n597(x)
+ if (x < 1)
+ fun_l13_n342(x)
+ else
+ fun_l13_n362(x)
+ end
+end
+
+def fun_l12_n598(x)
+ if (x < 1)
+ fun_l13_n870(x)
+ else
+ fun_l13_n366(x)
+ end
+end
+
+def fun_l12_n599(x)
+ if (x < 1)
+ fun_l13_n562(x)
+ else
+ fun_l13_n455(x)
+ end
+end
+
+def fun_l12_n600(x)
+ if (x < 1)
+ fun_l13_n554(x)
+ else
+ fun_l13_n929(x)
+ end
+end
+
+def fun_l12_n601(x)
+ if (x < 1)
+ fun_l13_n498(x)
+ else
+ fun_l13_n287(x)
+ end
+end
+
+def fun_l12_n602(x)
+ if (x < 1)
+ fun_l13_n9(x)
+ else
+ fun_l13_n258(x)
+ end
+end
+
+def fun_l12_n603(x)
+ if (x < 1)
+ fun_l13_n976(x)
+ else
+ fun_l13_n604(x)
+ end
+end
+
+def fun_l12_n604(x)
+ if (x < 1)
+ fun_l13_n411(x)
+ else
+ fun_l13_n238(x)
+ end
+end
+
+def fun_l12_n605(x)
+ if (x < 1)
+ fun_l13_n80(x)
+ else
+ fun_l13_n665(x)
+ end
+end
+
+def fun_l12_n606(x)
+ if (x < 1)
+ fun_l13_n453(x)
+ else
+ fun_l13_n642(x)
+ end
+end
+
+def fun_l12_n607(x)
+ if (x < 1)
+ fun_l13_n247(x)
+ else
+ fun_l13_n651(x)
+ end
+end
+
+def fun_l12_n608(x)
+ if (x < 1)
+ fun_l13_n586(x)
+ else
+ fun_l13_n372(x)
+ end
+end
+
+def fun_l12_n609(x)
+ if (x < 1)
+ fun_l13_n623(x)
+ else
+ fun_l13_n380(x)
+ end
+end
+
+def fun_l12_n610(x)
+ if (x < 1)
+ fun_l13_n399(x)
+ else
+ fun_l13_n43(x)
+ end
+end
+
+def fun_l12_n611(x)
+ if (x < 1)
+ fun_l13_n191(x)
+ else
+ fun_l13_n211(x)
+ end
+end
+
+def fun_l12_n612(x)
+ if (x < 1)
+ fun_l13_n719(x)
+ else
+ fun_l13_n663(x)
+ end
+end
+
+def fun_l12_n613(x)
+ if (x < 1)
+ fun_l13_n849(x)
+ else
+ fun_l13_n39(x)
+ end
+end
+
+def fun_l12_n614(x)
+ if (x < 1)
+ fun_l13_n822(x)
+ else
+ fun_l13_n927(x)
+ end
+end
+
+def fun_l12_n615(x)
+ if (x < 1)
+ fun_l13_n358(x)
+ else
+ fun_l13_n364(x)
+ end
+end
+
+def fun_l12_n616(x)
+ if (x < 1)
+ fun_l13_n685(x)
+ else
+ fun_l13_n897(x)
+ end
+end
+
+def fun_l12_n617(x)
+ if (x < 1)
+ fun_l13_n243(x)
+ else
+ fun_l13_n138(x)
+ end
+end
+
+def fun_l12_n618(x)
+ if (x < 1)
+ fun_l13_n737(x)
+ else
+ fun_l13_n187(x)
+ end
+end
+
+def fun_l12_n619(x)
+ if (x < 1)
+ fun_l13_n56(x)
+ else
+ fun_l13_n684(x)
+ end
+end
+
+def fun_l12_n620(x)
+ if (x < 1)
+ fun_l13_n865(x)
+ else
+ fun_l13_n886(x)
+ end
+end
+
+def fun_l12_n621(x)
+ if (x < 1)
+ fun_l13_n749(x)
+ else
+ fun_l13_n554(x)
+ end
+end
+
+def fun_l12_n622(x)
+ if (x < 1)
+ fun_l13_n162(x)
+ else
+ fun_l13_n600(x)
+ end
+end
+
+def fun_l12_n623(x)
+ if (x < 1)
+ fun_l13_n763(x)
+ else
+ fun_l13_n227(x)
+ end
+end
+
+def fun_l12_n624(x)
+ if (x < 1)
+ fun_l13_n767(x)
+ else
+ fun_l13_n431(x)
+ end
+end
+
+def fun_l12_n625(x)
+ if (x < 1)
+ fun_l13_n347(x)
+ else
+ fun_l13_n214(x)
+ end
+end
+
+def fun_l12_n626(x)
+ if (x < 1)
+ fun_l13_n365(x)
+ else
+ fun_l13_n747(x)
+ end
+end
+
+def fun_l12_n627(x)
+ if (x < 1)
+ fun_l13_n783(x)
+ else
+ fun_l13_n597(x)
+ end
+end
+
+def fun_l12_n628(x)
+ if (x < 1)
+ fun_l13_n249(x)
+ else
+ fun_l13_n906(x)
+ end
+end
+
+def fun_l12_n629(x)
+ if (x < 1)
+ fun_l13_n803(x)
+ else
+ fun_l13_n855(x)
+ end
+end
+
+def fun_l12_n630(x)
+ if (x < 1)
+ fun_l13_n981(x)
+ else
+ fun_l13_n38(x)
+ end
+end
+
+def fun_l12_n631(x)
+ if (x < 1)
+ fun_l13_n437(x)
+ else
+ fun_l13_n158(x)
+ end
+end
+
+def fun_l12_n632(x)
+ if (x < 1)
+ fun_l13_n611(x)
+ else
+ fun_l13_n142(x)
+ end
+end
+
+def fun_l12_n633(x)
+ if (x < 1)
+ fun_l13_n880(x)
+ else
+ fun_l13_n172(x)
+ end
+end
+
+def fun_l12_n634(x)
+ if (x < 1)
+ fun_l13_n135(x)
+ else
+ fun_l13_n529(x)
+ end
+end
+
+def fun_l12_n635(x)
+ if (x < 1)
+ fun_l13_n694(x)
+ else
+ fun_l13_n949(x)
+ end
+end
+
+def fun_l12_n636(x)
+ if (x < 1)
+ fun_l13_n153(x)
+ else
+ fun_l13_n326(x)
+ end
+end
+
+def fun_l12_n637(x)
+ if (x < 1)
+ fun_l13_n318(x)
+ else
+ fun_l13_n372(x)
+ end
+end
+
+def fun_l12_n638(x)
+ if (x < 1)
+ fun_l13_n467(x)
+ else
+ fun_l13_n450(x)
+ end
+end
+
+def fun_l12_n639(x)
+ if (x < 1)
+ fun_l13_n397(x)
+ else
+ fun_l13_n138(x)
+ end
+end
+
+def fun_l12_n640(x)
+ if (x < 1)
+ fun_l13_n408(x)
+ else
+ fun_l13_n335(x)
+ end
+end
+
+def fun_l12_n641(x)
+ if (x < 1)
+ fun_l13_n342(x)
+ else
+ fun_l13_n856(x)
+ end
+end
+
+def fun_l12_n642(x)
+ if (x < 1)
+ fun_l13_n163(x)
+ else
+ fun_l13_n979(x)
+ end
+end
+
+def fun_l12_n643(x)
+ if (x < 1)
+ fun_l13_n509(x)
+ else
+ fun_l13_n153(x)
+ end
+end
+
+def fun_l12_n644(x)
+ if (x < 1)
+ fun_l13_n3(x)
+ else
+ fun_l13_n55(x)
+ end
+end
+
+def fun_l12_n645(x)
+ if (x < 1)
+ fun_l13_n730(x)
+ else
+ fun_l13_n52(x)
+ end
+end
+
+def fun_l12_n646(x)
+ if (x < 1)
+ fun_l13_n553(x)
+ else
+ fun_l13_n885(x)
+ end
+end
+
+def fun_l12_n647(x)
+ if (x < 1)
+ fun_l13_n866(x)
+ else
+ fun_l13_n684(x)
+ end
+end
+
+def fun_l12_n648(x)
+ if (x < 1)
+ fun_l13_n989(x)
+ else
+ fun_l13_n511(x)
+ end
+end
+
+def fun_l12_n649(x)
+ if (x < 1)
+ fun_l13_n527(x)
+ else
+ fun_l13_n166(x)
+ end
+end
+
+def fun_l12_n650(x)
+ if (x < 1)
+ fun_l13_n507(x)
+ else
+ fun_l13_n527(x)
+ end
+end
+
+def fun_l12_n651(x)
+ if (x < 1)
+ fun_l13_n174(x)
+ else
+ fun_l13_n881(x)
+ end
+end
+
+def fun_l12_n652(x)
+ if (x < 1)
+ fun_l13_n302(x)
+ else
+ fun_l13_n3(x)
+ end
+end
+
+def fun_l12_n653(x)
+ if (x < 1)
+ fun_l13_n971(x)
+ else
+ fun_l13_n601(x)
+ end
+end
+
+def fun_l12_n654(x)
+ if (x < 1)
+ fun_l13_n440(x)
+ else
+ fun_l13_n286(x)
+ end
+end
+
+def fun_l12_n655(x)
+ if (x < 1)
+ fun_l13_n208(x)
+ else
+ fun_l13_n275(x)
+ end
+end
+
+def fun_l12_n656(x)
+ if (x < 1)
+ fun_l13_n954(x)
+ else
+ fun_l13_n991(x)
+ end
+end
+
+def fun_l12_n657(x)
+ if (x < 1)
+ fun_l13_n212(x)
+ else
+ fun_l13_n640(x)
+ end
+end
+
+def fun_l12_n658(x)
+ if (x < 1)
+ fun_l13_n733(x)
+ else
+ fun_l13_n459(x)
+ end
+end
+
+def fun_l12_n659(x)
+ if (x < 1)
+ fun_l13_n767(x)
+ else
+ fun_l13_n581(x)
+ end
+end
+
+def fun_l12_n660(x)
+ if (x < 1)
+ fun_l13_n421(x)
+ else
+ fun_l13_n19(x)
+ end
+end
+
+def fun_l12_n661(x)
+ if (x < 1)
+ fun_l13_n500(x)
+ else
+ fun_l13_n464(x)
+ end
+end
+
+def fun_l12_n662(x)
+ if (x < 1)
+ fun_l13_n26(x)
+ else
+ fun_l13_n300(x)
+ end
+end
+
+def fun_l12_n663(x)
+ if (x < 1)
+ fun_l13_n160(x)
+ else
+ fun_l13_n112(x)
+ end
+end
+
+def fun_l12_n664(x)
+ if (x < 1)
+ fun_l13_n181(x)
+ else
+ fun_l13_n511(x)
+ end
+end
+
+def fun_l12_n665(x)
+ if (x < 1)
+ fun_l13_n573(x)
+ else
+ fun_l13_n283(x)
+ end
+end
+
+def fun_l12_n666(x)
+ if (x < 1)
+ fun_l13_n562(x)
+ else
+ fun_l13_n992(x)
+ end
+end
+
+def fun_l12_n667(x)
+ if (x < 1)
+ fun_l13_n426(x)
+ else
+ fun_l13_n921(x)
+ end
+end
+
+def fun_l12_n668(x)
+ if (x < 1)
+ fun_l13_n319(x)
+ else
+ fun_l13_n226(x)
+ end
+end
+
+def fun_l12_n669(x)
+ if (x < 1)
+ fun_l13_n832(x)
+ else
+ fun_l13_n690(x)
+ end
+end
+
+def fun_l12_n670(x)
+ if (x < 1)
+ fun_l13_n921(x)
+ else
+ fun_l13_n964(x)
+ end
+end
+
+def fun_l12_n671(x)
+ if (x < 1)
+ fun_l13_n823(x)
+ else
+ fun_l13_n903(x)
+ end
+end
+
+def fun_l12_n672(x)
+ if (x < 1)
+ fun_l13_n469(x)
+ else
+ fun_l13_n914(x)
+ end
+end
+
+def fun_l12_n673(x)
+ if (x < 1)
+ fun_l13_n478(x)
+ else
+ fun_l13_n481(x)
+ end
+end
+
+def fun_l12_n674(x)
+ if (x < 1)
+ fun_l13_n762(x)
+ else
+ fun_l13_n464(x)
+ end
+end
+
+def fun_l12_n675(x)
+ if (x < 1)
+ fun_l13_n930(x)
+ else
+ fun_l13_n587(x)
+ end
+end
+
+def fun_l12_n676(x)
+ if (x < 1)
+ fun_l13_n351(x)
+ else
+ fun_l13_n239(x)
+ end
+end
+
+def fun_l12_n677(x)
+ if (x < 1)
+ fun_l13_n989(x)
+ else
+ fun_l13_n424(x)
+ end
+end
+
+def fun_l12_n678(x)
+ if (x < 1)
+ fun_l13_n505(x)
+ else
+ fun_l13_n186(x)
+ end
+end
+
+def fun_l12_n679(x)
+ if (x < 1)
+ fun_l13_n665(x)
+ else
+ fun_l13_n536(x)
+ end
+end
+
+def fun_l12_n680(x)
+ if (x < 1)
+ fun_l13_n734(x)
+ else
+ fun_l13_n36(x)
+ end
+end
+
+def fun_l12_n681(x)
+ if (x < 1)
+ fun_l13_n380(x)
+ else
+ fun_l13_n340(x)
+ end
+end
+
+def fun_l12_n682(x)
+ if (x < 1)
+ fun_l13_n293(x)
+ else
+ fun_l13_n205(x)
+ end
+end
+
+def fun_l12_n683(x)
+ if (x < 1)
+ fun_l13_n412(x)
+ else
+ fun_l13_n13(x)
+ end
+end
+
+def fun_l12_n684(x)
+ if (x < 1)
+ fun_l13_n187(x)
+ else
+ fun_l13_n186(x)
+ end
+end
+
+def fun_l12_n685(x)
+ if (x < 1)
+ fun_l13_n299(x)
+ else
+ fun_l13_n875(x)
+ end
+end
+
+def fun_l12_n686(x)
+ if (x < 1)
+ fun_l13_n943(x)
+ else
+ fun_l13_n96(x)
+ end
+end
+
+def fun_l12_n687(x)
+ if (x < 1)
+ fun_l13_n736(x)
+ else
+ fun_l13_n377(x)
+ end
+end
+
+def fun_l12_n688(x)
+ if (x < 1)
+ fun_l13_n559(x)
+ else
+ fun_l13_n410(x)
+ end
+end
+
+def fun_l12_n689(x)
+ if (x < 1)
+ fun_l13_n538(x)
+ else
+ fun_l13_n521(x)
+ end
+end
+
+def fun_l12_n690(x)
+ if (x < 1)
+ fun_l13_n568(x)
+ else
+ fun_l13_n838(x)
+ end
+end
+
+def fun_l12_n691(x)
+ if (x < 1)
+ fun_l13_n556(x)
+ else
+ fun_l13_n42(x)
+ end
+end
+
+def fun_l12_n692(x)
+ if (x < 1)
+ fun_l13_n137(x)
+ else
+ fun_l13_n939(x)
+ end
+end
+
+def fun_l12_n693(x)
+ if (x < 1)
+ fun_l13_n974(x)
+ else
+ fun_l13_n308(x)
+ end
+end
+
+def fun_l12_n694(x)
+ if (x < 1)
+ fun_l13_n459(x)
+ else
+ fun_l13_n323(x)
+ end
+end
+
+def fun_l12_n695(x)
+ if (x < 1)
+ fun_l13_n829(x)
+ else
+ fun_l13_n909(x)
+ end
+end
+
+def fun_l12_n696(x)
+ if (x < 1)
+ fun_l13_n710(x)
+ else
+ fun_l13_n648(x)
+ end
+end
+
+def fun_l12_n697(x)
+ if (x < 1)
+ fun_l13_n27(x)
+ else
+ fun_l13_n500(x)
+ end
+end
+
+def fun_l12_n698(x)
+ if (x < 1)
+ fun_l13_n553(x)
+ else
+ fun_l13_n865(x)
+ end
+end
+
+def fun_l12_n699(x)
+ if (x < 1)
+ fun_l13_n126(x)
+ else
+ fun_l13_n789(x)
+ end
+end
+
+def fun_l12_n700(x)
+ if (x < 1)
+ fun_l13_n408(x)
+ else
+ fun_l13_n391(x)
+ end
+end
+
+def fun_l12_n701(x)
+ if (x < 1)
+ fun_l13_n469(x)
+ else
+ fun_l13_n48(x)
+ end
+end
+
+def fun_l12_n702(x)
+ if (x < 1)
+ fun_l13_n646(x)
+ else
+ fun_l13_n117(x)
+ end
+end
+
+def fun_l12_n703(x)
+ if (x < 1)
+ fun_l13_n461(x)
+ else
+ fun_l13_n114(x)
+ end
+end
+
+def fun_l12_n704(x)
+ if (x < 1)
+ fun_l13_n603(x)
+ else
+ fun_l13_n27(x)
+ end
+end
+
+def fun_l12_n705(x)
+ if (x < 1)
+ fun_l13_n842(x)
+ else
+ fun_l13_n792(x)
+ end
+end
+
+def fun_l12_n706(x)
+ if (x < 1)
+ fun_l13_n194(x)
+ else
+ fun_l13_n405(x)
+ end
+end
+
+def fun_l12_n707(x)
+ if (x < 1)
+ fun_l13_n975(x)
+ else
+ fun_l13_n933(x)
+ end
+end
+
+def fun_l12_n708(x)
+ if (x < 1)
+ fun_l13_n919(x)
+ else
+ fun_l13_n558(x)
+ end
+end
+
+def fun_l12_n709(x)
+ if (x < 1)
+ fun_l13_n293(x)
+ else
+ fun_l13_n868(x)
+ end
+end
+
+def fun_l12_n710(x)
+ if (x < 1)
+ fun_l13_n577(x)
+ else
+ fun_l13_n816(x)
+ end
+end
+
+def fun_l12_n711(x)
+ if (x < 1)
+ fun_l13_n625(x)
+ else
+ fun_l13_n319(x)
+ end
+end
+
+def fun_l12_n712(x)
+ if (x < 1)
+ fun_l13_n100(x)
+ else
+ fun_l13_n421(x)
+ end
+end
+
+def fun_l12_n713(x)
+ if (x < 1)
+ fun_l13_n120(x)
+ else
+ fun_l13_n727(x)
+ end
+end
+
+def fun_l12_n714(x)
+ if (x < 1)
+ fun_l13_n346(x)
+ else
+ fun_l13_n399(x)
+ end
+end
+
+def fun_l12_n715(x)
+ if (x < 1)
+ fun_l13_n64(x)
+ else
+ fun_l13_n895(x)
+ end
+end
+
+def fun_l12_n716(x)
+ if (x < 1)
+ fun_l13_n810(x)
+ else
+ fun_l13_n958(x)
+ end
+end
+
+def fun_l12_n717(x)
+ if (x < 1)
+ fun_l13_n24(x)
+ else
+ fun_l13_n851(x)
+ end
+end
+
+def fun_l12_n718(x)
+ if (x < 1)
+ fun_l13_n716(x)
+ else
+ fun_l13_n859(x)
+ end
+end
+
+def fun_l12_n719(x)
+ if (x < 1)
+ fun_l13_n556(x)
+ else
+ fun_l13_n999(x)
+ end
+end
+
+def fun_l12_n720(x)
+ if (x < 1)
+ fun_l13_n388(x)
+ else
+ fun_l13_n127(x)
+ end
+end
+
+def fun_l12_n721(x)
+ if (x < 1)
+ fun_l13_n447(x)
+ else
+ fun_l13_n880(x)
+ end
+end
+
+def fun_l12_n722(x)
+ if (x < 1)
+ fun_l13_n415(x)
+ else
+ fun_l13_n636(x)
+ end
+end
+
+def fun_l12_n723(x)
+ if (x < 1)
+ fun_l13_n315(x)
+ else
+ fun_l13_n766(x)
+ end
+end
+
+def fun_l12_n724(x)
+ if (x < 1)
+ fun_l13_n600(x)
+ else
+ fun_l13_n223(x)
+ end
+end
+
+def fun_l12_n725(x)
+ if (x < 1)
+ fun_l13_n773(x)
+ else
+ fun_l13_n523(x)
+ end
+end
+
+def fun_l12_n726(x)
+ if (x < 1)
+ fun_l13_n662(x)
+ else
+ fun_l13_n775(x)
+ end
+end
+
+def fun_l12_n727(x)
+ if (x < 1)
+ fun_l13_n553(x)
+ else
+ fun_l13_n247(x)
+ end
+end
+
+def fun_l12_n728(x)
+ if (x < 1)
+ fun_l13_n180(x)
+ else
+ fun_l13_n815(x)
+ end
+end
+
+def fun_l12_n729(x)
+ if (x < 1)
+ fun_l13_n786(x)
+ else
+ fun_l13_n729(x)
+ end
+end
+
+def fun_l12_n730(x)
+ if (x < 1)
+ fun_l13_n1(x)
+ else
+ fun_l13_n791(x)
+ end
+end
+
+def fun_l12_n731(x)
+ if (x < 1)
+ fun_l13_n216(x)
+ else
+ fun_l13_n682(x)
+ end
+end
+
+def fun_l12_n732(x)
+ if (x < 1)
+ fun_l13_n953(x)
+ else
+ fun_l13_n364(x)
+ end
+end
+
+def fun_l12_n733(x)
+ if (x < 1)
+ fun_l13_n164(x)
+ else
+ fun_l13_n277(x)
+ end
+end
+
+def fun_l12_n734(x)
+ if (x < 1)
+ fun_l13_n486(x)
+ else
+ fun_l13_n741(x)
+ end
+end
+
+def fun_l12_n735(x)
+ if (x < 1)
+ fun_l13_n310(x)
+ else
+ fun_l13_n940(x)
+ end
+end
+
+def fun_l12_n736(x)
+ if (x < 1)
+ fun_l13_n312(x)
+ else
+ fun_l13_n46(x)
+ end
+end
+
+def fun_l12_n737(x)
+ if (x < 1)
+ fun_l13_n473(x)
+ else
+ fun_l13_n728(x)
+ end
+end
+
+def fun_l12_n738(x)
+ if (x < 1)
+ fun_l13_n602(x)
+ else
+ fun_l13_n652(x)
+ end
+end
+
+def fun_l12_n739(x)
+ if (x < 1)
+ fun_l13_n397(x)
+ else
+ fun_l13_n855(x)
+ end
+end
+
+def fun_l12_n740(x)
+ if (x < 1)
+ fun_l13_n81(x)
+ else
+ fun_l13_n32(x)
+ end
+end
+
+def fun_l12_n741(x)
+ if (x < 1)
+ fun_l13_n822(x)
+ else
+ fun_l13_n231(x)
+ end
+end
+
+def fun_l12_n742(x)
+ if (x < 1)
+ fun_l13_n200(x)
+ else
+ fun_l13_n440(x)
+ end
+end
+
+def fun_l12_n743(x)
+ if (x < 1)
+ fun_l13_n415(x)
+ else
+ fun_l13_n631(x)
+ end
+end
+
+def fun_l12_n744(x)
+ if (x < 1)
+ fun_l13_n353(x)
+ else
+ fun_l13_n536(x)
+ end
+end
+
+def fun_l12_n745(x)
+ if (x < 1)
+ fun_l13_n986(x)
+ else
+ fun_l13_n384(x)
+ end
+end
+
+def fun_l12_n746(x)
+ if (x < 1)
+ fun_l13_n237(x)
+ else
+ fun_l13_n583(x)
+ end
+end
+
+def fun_l12_n747(x)
+ if (x < 1)
+ fun_l13_n518(x)
+ else
+ fun_l13_n717(x)
+ end
+end
+
+def fun_l12_n748(x)
+ if (x < 1)
+ fun_l13_n242(x)
+ else
+ fun_l13_n180(x)
+ end
+end
+
+def fun_l12_n749(x)
+ if (x < 1)
+ fun_l13_n369(x)
+ else
+ fun_l13_n249(x)
+ end
+end
+
+def fun_l12_n750(x)
+ if (x < 1)
+ fun_l13_n335(x)
+ else
+ fun_l13_n180(x)
+ end
+end
+
+def fun_l12_n751(x)
+ if (x < 1)
+ fun_l13_n952(x)
+ else
+ fun_l13_n506(x)
+ end
+end
+
+def fun_l12_n752(x)
+ if (x < 1)
+ fun_l13_n941(x)
+ else
+ fun_l13_n251(x)
+ end
+end
+
+def fun_l12_n753(x)
+ if (x < 1)
+ fun_l13_n21(x)
+ else
+ fun_l13_n536(x)
+ end
+end
+
+def fun_l12_n754(x)
+ if (x < 1)
+ fun_l13_n123(x)
+ else
+ fun_l13_n976(x)
+ end
+end
+
+def fun_l12_n755(x)
+ if (x < 1)
+ fun_l13_n229(x)
+ else
+ fun_l13_n535(x)
+ end
+end
+
+def fun_l12_n756(x)
+ if (x < 1)
+ fun_l13_n23(x)
+ else
+ fun_l13_n976(x)
+ end
+end
+
+def fun_l12_n757(x)
+ if (x < 1)
+ fun_l13_n755(x)
+ else
+ fun_l13_n677(x)
+ end
+end
+
+def fun_l12_n758(x)
+ if (x < 1)
+ fun_l13_n692(x)
+ else
+ fun_l13_n334(x)
+ end
+end
+
+def fun_l12_n759(x)
+ if (x < 1)
+ fun_l13_n380(x)
+ else
+ fun_l13_n903(x)
+ end
+end
+
+def fun_l12_n760(x)
+ if (x < 1)
+ fun_l13_n16(x)
+ else
+ fun_l13_n750(x)
+ end
+end
+
+def fun_l12_n761(x)
+ if (x < 1)
+ fun_l13_n186(x)
+ else
+ fun_l13_n639(x)
+ end
+end
+
+def fun_l12_n762(x)
+ if (x < 1)
+ fun_l13_n163(x)
+ else
+ fun_l13_n273(x)
+ end
+end
+
+def fun_l12_n763(x)
+ if (x < 1)
+ fun_l13_n791(x)
+ else
+ fun_l13_n55(x)
+ end
+end
+
+def fun_l12_n764(x)
+ if (x < 1)
+ fun_l13_n10(x)
+ else
+ fun_l13_n672(x)
+ end
+end
+
+def fun_l12_n765(x)
+ if (x < 1)
+ fun_l13_n382(x)
+ else
+ fun_l13_n284(x)
+ end
+end
+
+def fun_l12_n766(x)
+ if (x < 1)
+ fun_l13_n940(x)
+ else
+ fun_l13_n716(x)
+ end
+end
+
+def fun_l12_n767(x)
+ if (x < 1)
+ fun_l13_n414(x)
+ else
+ fun_l13_n997(x)
+ end
+end
+
+def fun_l12_n768(x)
+ if (x < 1)
+ fun_l13_n345(x)
+ else
+ fun_l13_n511(x)
+ end
+end
+
+def fun_l12_n769(x)
+ if (x < 1)
+ fun_l13_n915(x)
+ else
+ fun_l13_n907(x)
+ end
+end
+
+def fun_l12_n770(x)
+ if (x < 1)
+ fun_l13_n508(x)
+ else
+ fun_l13_n144(x)
+ end
+end
+
+def fun_l12_n771(x)
+ if (x < 1)
+ fun_l13_n764(x)
+ else
+ fun_l13_n211(x)
+ end
+end
+
+def fun_l12_n772(x)
+ if (x < 1)
+ fun_l13_n571(x)
+ else
+ fun_l13_n486(x)
+ end
+end
+
+def fun_l12_n773(x)
+ if (x < 1)
+ fun_l13_n503(x)
+ else
+ fun_l13_n561(x)
+ end
+end
+
+def fun_l12_n774(x)
+ if (x < 1)
+ fun_l13_n831(x)
+ else
+ fun_l13_n608(x)
+ end
+end
+
+def fun_l12_n775(x)
+ if (x < 1)
+ fun_l13_n254(x)
+ else
+ fun_l13_n626(x)
+ end
+end
+
+def fun_l12_n776(x)
+ if (x < 1)
+ fun_l13_n155(x)
+ else
+ fun_l13_n602(x)
+ end
+end
+
+def fun_l12_n777(x)
+ if (x < 1)
+ fun_l13_n331(x)
+ else
+ fun_l13_n837(x)
+ end
+end
+
+def fun_l12_n778(x)
+ if (x < 1)
+ fun_l13_n109(x)
+ else
+ fun_l13_n558(x)
+ end
+end
+
+def fun_l12_n779(x)
+ if (x < 1)
+ fun_l13_n557(x)
+ else
+ fun_l13_n784(x)
+ end
+end
+
+def fun_l12_n780(x)
+ if (x < 1)
+ fun_l13_n719(x)
+ else
+ fun_l13_n933(x)
+ end
+end
+
+def fun_l12_n781(x)
+ if (x < 1)
+ fun_l13_n63(x)
+ else
+ fun_l13_n776(x)
+ end
+end
+
+def fun_l12_n782(x)
+ if (x < 1)
+ fun_l13_n146(x)
+ else
+ fun_l13_n32(x)
+ end
+end
+
+def fun_l12_n783(x)
+ if (x < 1)
+ fun_l13_n452(x)
+ else
+ fun_l13_n621(x)
+ end
+end
+
+def fun_l12_n784(x)
+ if (x < 1)
+ fun_l13_n821(x)
+ else
+ fun_l13_n454(x)
+ end
+end
+
+def fun_l12_n785(x)
+ if (x < 1)
+ fun_l13_n943(x)
+ else
+ fun_l13_n835(x)
+ end
+end
+
+def fun_l12_n786(x)
+ if (x < 1)
+ fun_l13_n47(x)
+ else
+ fun_l13_n252(x)
+ end
+end
+
+def fun_l12_n787(x)
+ if (x < 1)
+ fun_l13_n759(x)
+ else
+ fun_l13_n820(x)
+ end
+end
+
+def fun_l12_n788(x)
+ if (x < 1)
+ fun_l13_n883(x)
+ else
+ fun_l13_n218(x)
+ end
+end
+
+def fun_l12_n789(x)
+ if (x < 1)
+ fun_l13_n10(x)
+ else
+ fun_l13_n765(x)
+ end
+end
+
+def fun_l12_n790(x)
+ if (x < 1)
+ fun_l13_n6(x)
+ else
+ fun_l13_n424(x)
+ end
+end
+
+def fun_l12_n791(x)
+ if (x < 1)
+ fun_l13_n645(x)
+ else
+ fun_l13_n598(x)
+ end
+end
+
+def fun_l12_n792(x)
+ if (x < 1)
+ fun_l13_n237(x)
+ else
+ fun_l13_n141(x)
+ end
+end
+
+def fun_l12_n793(x)
+ if (x < 1)
+ fun_l13_n793(x)
+ else
+ fun_l13_n109(x)
+ end
+end
+
+def fun_l12_n794(x)
+ if (x < 1)
+ fun_l13_n404(x)
+ else
+ fun_l13_n864(x)
+ end
+end
+
+def fun_l12_n795(x)
+ if (x < 1)
+ fun_l13_n511(x)
+ else
+ fun_l13_n620(x)
+ end
+end
+
+def fun_l12_n796(x)
+ if (x < 1)
+ fun_l13_n880(x)
+ else
+ fun_l13_n330(x)
+ end
+end
+
+def fun_l12_n797(x)
+ if (x < 1)
+ fun_l13_n637(x)
+ else
+ fun_l13_n13(x)
+ end
+end
+
+def fun_l12_n798(x)
+ if (x < 1)
+ fun_l13_n567(x)
+ else
+ fun_l13_n958(x)
+ end
+end
+
+def fun_l12_n799(x)
+ if (x < 1)
+ fun_l13_n715(x)
+ else
+ fun_l13_n983(x)
+ end
+end
+
+def fun_l12_n800(x)
+ if (x < 1)
+ fun_l13_n502(x)
+ else
+ fun_l13_n600(x)
+ end
+end
+
+def fun_l12_n801(x)
+ if (x < 1)
+ fun_l13_n645(x)
+ else
+ fun_l13_n713(x)
+ end
+end
+
+def fun_l12_n802(x)
+ if (x < 1)
+ fun_l13_n804(x)
+ else
+ fun_l13_n475(x)
+ end
+end
+
+def fun_l12_n803(x)
+ if (x < 1)
+ fun_l13_n286(x)
+ else
+ fun_l13_n135(x)
+ end
+end
+
+def fun_l12_n804(x)
+ if (x < 1)
+ fun_l13_n420(x)
+ else
+ fun_l13_n534(x)
+ end
+end
+
+def fun_l12_n805(x)
+ if (x < 1)
+ fun_l13_n345(x)
+ else
+ fun_l13_n833(x)
+ end
+end
+
+def fun_l12_n806(x)
+ if (x < 1)
+ fun_l13_n558(x)
+ else
+ fun_l13_n831(x)
+ end
+end
+
+def fun_l12_n807(x)
+ if (x < 1)
+ fun_l13_n82(x)
+ else
+ fun_l13_n56(x)
+ end
+end
+
+def fun_l12_n808(x)
+ if (x < 1)
+ fun_l13_n809(x)
+ else
+ fun_l13_n12(x)
+ end
+end
+
+def fun_l12_n809(x)
+ if (x < 1)
+ fun_l13_n450(x)
+ else
+ fun_l13_n326(x)
+ end
+end
+
+def fun_l12_n810(x)
+ if (x < 1)
+ fun_l13_n567(x)
+ else
+ fun_l13_n437(x)
+ end
+end
+
+def fun_l12_n811(x)
+ if (x < 1)
+ fun_l13_n880(x)
+ else
+ fun_l13_n785(x)
+ end
+end
+
+def fun_l12_n812(x)
+ if (x < 1)
+ fun_l13_n585(x)
+ else
+ fun_l13_n610(x)
+ end
+end
+
+def fun_l12_n813(x)
+ if (x < 1)
+ fun_l13_n41(x)
+ else
+ fun_l13_n911(x)
+ end
+end
+
+def fun_l12_n814(x)
+ if (x < 1)
+ fun_l13_n438(x)
+ else
+ fun_l13_n300(x)
+ end
+end
+
+def fun_l12_n815(x)
+ if (x < 1)
+ fun_l13_n363(x)
+ else
+ fun_l13_n357(x)
+ end
+end
+
+def fun_l12_n816(x)
+ if (x < 1)
+ fun_l13_n172(x)
+ else
+ fun_l13_n25(x)
+ end
+end
+
+def fun_l12_n817(x)
+ if (x < 1)
+ fun_l13_n593(x)
+ else
+ fun_l13_n853(x)
+ end
+end
+
+def fun_l12_n818(x)
+ if (x < 1)
+ fun_l13_n790(x)
+ else
+ fun_l13_n575(x)
+ end
+end
+
+def fun_l12_n819(x)
+ if (x < 1)
+ fun_l13_n795(x)
+ else
+ fun_l13_n877(x)
+ end
+end
+
+def fun_l12_n820(x)
+ if (x < 1)
+ fun_l13_n563(x)
+ else
+ fun_l13_n170(x)
+ end
+end
+
+def fun_l12_n821(x)
+ if (x < 1)
+ fun_l13_n405(x)
+ else
+ fun_l13_n985(x)
+ end
+end
+
+def fun_l12_n822(x)
+ if (x < 1)
+ fun_l13_n668(x)
+ else
+ fun_l13_n702(x)
+ end
+end
+
+def fun_l12_n823(x)
+ if (x < 1)
+ fun_l13_n210(x)
+ else
+ fun_l13_n450(x)
+ end
+end
+
+def fun_l12_n824(x)
+ if (x < 1)
+ fun_l13_n817(x)
+ else
+ fun_l13_n693(x)
+ end
+end
+
+def fun_l12_n825(x)
+ if (x < 1)
+ fun_l13_n909(x)
+ else
+ fun_l13_n857(x)
+ end
+end
+
+def fun_l12_n826(x)
+ if (x < 1)
+ fun_l13_n944(x)
+ else
+ fun_l13_n601(x)
+ end
+end
+
+def fun_l12_n827(x)
+ if (x < 1)
+ fun_l13_n152(x)
+ else
+ fun_l13_n187(x)
+ end
+end
+
+def fun_l12_n828(x)
+ if (x < 1)
+ fun_l13_n735(x)
+ else
+ fun_l13_n198(x)
+ end
+end
+
+def fun_l12_n829(x)
+ if (x < 1)
+ fun_l13_n892(x)
+ else
+ fun_l13_n362(x)
+ end
+end
+
+def fun_l12_n830(x)
+ if (x < 1)
+ fun_l13_n636(x)
+ else
+ fun_l13_n779(x)
+ end
+end
+
+def fun_l12_n831(x)
+ if (x < 1)
+ fun_l13_n597(x)
+ else
+ fun_l13_n186(x)
+ end
+end
+
+def fun_l12_n832(x)
+ if (x < 1)
+ fun_l13_n680(x)
+ else
+ fun_l13_n477(x)
+ end
+end
+
+def fun_l12_n833(x)
+ if (x < 1)
+ fun_l13_n334(x)
+ else
+ fun_l13_n508(x)
+ end
+end
+
+def fun_l12_n834(x)
+ if (x < 1)
+ fun_l13_n927(x)
+ else
+ fun_l13_n111(x)
+ end
+end
+
+def fun_l12_n835(x)
+ if (x < 1)
+ fun_l13_n424(x)
+ else
+ fun_l13_n326(x)
+ end
+end
+
+def fun_l12_n836(x)
+ if (x < 1)
+ fun_l13_n624(x)
+ else
+ fun_l13_n270(x)
+ end
+end
+
+def fun_l12_n837(x)
+ if (x < 1)
+ fun_l13_n458(x)
+ else
+ fun_l13_n736(x)
+ end
+end
+
+def fun_l12_n838(x)
+ if (x < 1)
+ fun_l13_n881(x)
+ else
+ fun_l13_n702(x)
+ end
+end
+
+def fun_l12_n839(x)
+ if (x < 1)
+ fun_l13_n778(x)
+ else
+ fun_l13_n374(x)
+ end
+end
+
+def fun_l12_n840(x)
+ if (x < 1)
+ fun_l13_n118(x)
+ else
+ fun_l13_n543(x)
+ end
+end
+
+def fun_l12_n841(x)
+ if (x < 1)
+ fun_l13_n270(x)
+ else
+ fun_l13_n810(x)
+ end
+end
+
+def fun_l12_n842(x)
+ if (x < 1)
+ fun_l13_n122(x)
+ else
+ fun_l13_n905(x)
+ end
+end
+
+def fun_l12_n843(x)
+ if (x < 1)
+ fun_l13_n154(x)
+ else
+ fun_l13_n636(x)
+ end
+end
+
+def fun_l12_n844(x)
+ if (x < 1)
+ fun_l13_n603(x)
+ else
+ fun_l13_n586(x)
+ end
+end
+
+def fun_l12_n845(x)
+ if (x < 1)
+ fun_l13_n264(x)
+ else
+ fun_l13_n492(x)
+ end
+end
+
+def fun_l12_n846(x)
+ if (x < 1)
+ fun_l13_n264(x)
+ else
+ fun_l13_n214(x)
+ end
+end
+
+def fun_l12_n847(x)
+ if (x < 1)
+ fun_l13_n337(x)
+ else
+ fun_l13_n339(x)
+ end
+end
+
+def fun_l12_n848(x)
+ if (x < 1)
+ fun_l13_n83(x)
+ else
+ fun_l13_n454(x)
+ end
+end
+
+def fun_l12_n849(x)
+ if (x < 1)
+ fun_l13_n129(x)
+ else
+ fun_l13_n30(x)
+ end
+end
+
+def fun_l12_n850(x)
+ if (x < 1)
+ fun_l13_n602(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n851(x)
+ if (x < 1)
+ fun_l13_n650(x)
+ else
+ fun_l13_n715(x)
+ end
+end
+
+def fun_l12_n852(x)
+ if (x < 1)
+ fun_l13_n482(x)
+ else
+ fun_l13_n852(x)
+ end
+end
+
+def fun_l12_n853(x)
+ if (x < 1)
+ fun_l13_n946(x)
+ else
+ fun_l13_n393(x)
+ end
+end
+
+def fun_l12_n854(x)
+ if (x < 1)
+ fun_l13_n16(x)
+ else
+ fun_l13_n512(x)
+ end
+end
+
+def fun_l12_n855(x)
+ if (x < 1)
+ fun_l13_n469(x)
+ else
+ fun_l13_n567(x)
+ end
+end
+
+def fun_l12_n856(x)
+ if (x < 1)
+ fun_l13_n531(x)
+ else
+ fun_l13_n39(x)
+ end
+end
+
+def fun_l12_n857(x)
+ if (x < 1)
+ fun_l13_n673(x)
+ else
+ fun_l13_n670(x)
+ end
+end
+
+def fun_l12_n858(x)
+ if (x < 1)
+ fun_l13_n83(x)
+ else
+ fun_l13_n588(x)
+ end
+end
+
+def fun_l12_n859(x)
+ if (x < 1)
+ fun_l13_n247(x)
+ else
+ fun_l13_n460(x)
+ end
+end
+
+def fun_l12_n860(x)
+ if (x < 1)
+ fun_l13_n621(x)
+ else
+ fun_l13_n229(x)
+ end
+end
+
+def fun_l12_n861(x)
+ if (x < 1)
+ fun_l13_n121(x)
+ else
+ fun_l13_n147(x)
+ end
+end
+
+def fun_l12_n862(x)
+ if (x < 1)
+ fun_l13_n293(x)
+ else
+ fun_l13_n976(x)
+ end
+end
+
+def fun_l12_n863(x)
+ if (x < 1)
+ fun_l13_n64(x)
+ else
+ fun_l13_n569(x)
+ end
+end
+
+def fun_l12_n864(x)
+ if (x < 1)
+ fun_l13_n802(x)
+ else
+ fun_l13_n962(x)
+ end
+end
+
+def fun_l12_n865(x)
+ if (x < 1)
+ fun_l13_n406(x)
+ else
+ fun_l13_n571(x)
+ end
+end
+
+def fun_l12_n866(x)
+ if (x < 1)
+ fun_l13_n798(x)
+ else
+ fun_l13_n418(x)
+ end
+end
+
+def fun_l12_n867(x)
+ if (x < 1)
+ fun_l13_n725(x)
+ else
+ fun_l13_n716(x)
+ end
+end
+
+def fun_l12_n868(x)
+ if (x < 1)
+ fun_l13_n245(x)
+ else
+ fun_l13_n154(x)
+ end
+end
+
+def fun_l12_n869(x)
+ if (x < 1)
+ fun_l13_n954(x)
+ else
+ fun_l13_n242(x)
+ end
+end
+
+def fun_l12_n870(x)
+ if (x < 1)
+ fun_l13_n649(x)
+ else
+ fun_l13_n160(x)
+ end
+end
+
+def fun_l12_n871(x)
+ if (x < 1)
+ fun_l13_n700(x)
+ else
+ fun_l13_n863(x)
+ end
+end
+
+def fun_l12_n872(x)
+ if (x < 1)
+ fun_l13_n60(x)
+ else
+ fun_l13_n359(x)
+ end
+end
+
+def fun_l12_n873(x)
+ if (x < 1)
+ fun_l13_n820(x)
+ else
+ fun_l13_n247(x)
+ end
+end
+
+def fun_l12_n874(x)
+ if (x < 1)
+ fun_l13_n294(x)
+ else
+ fun_l13_n179(x)
+ end
+end
+
+def fun_l12_n875(x)
+ if (x < 1)
+ fun_l13_n599(x)
+ else
+ fun_l13_n309(x)
+ end
+end
+
+def fun_l12_n876(x)
+ if (x < 1)
+ fun_l13_n922(x)
+ else
+ fun_l13_n632(x)
+ end
+end
+
+def fun_l12_n877(x)
+ if (x < 1)
+ fun_l13_n921(x)
+ else
+ fun_l13_n200(x)
+ end
+end
+
+def fun_l12_n878(x)
+ if (x < 1)
+ fun_l13_n375(x)
+ else
+ fun_l13_n109(x)
+ end
+end
+
+def fun_l12_n879(x)
+ if (x < 1)
+ fun_l13_n771(x)
+ else
+ fun_l13_n758(x)
+ end
+end
+
+def fun_l12_n880(x)
+ if (x < 1)
+ fun_l13_n887(x)
+ else
+ fun_l13_n958(x)
+ end
+end
+
+def fun_l12_n881(x)
+ if (x < 1)
+ fun_l13_n668(x)
+ else
+ fun_l13_n508(x)
+ end
+end
+
+def fun_l12_n882(x)
+ if (x < 1)
+ fun_l13_n822(x)
+ else
+ fun_l13_n933(x)
+ end
+end
+
+def fun_l12_n883(x)
+ if (x < 1)
+ fun_l13_n328(x)
+ else
+ fun_l13_n152(x)
+ end
+end
+
+def fun_l12_n884(x)
+ if (x < 1)
+ fun_l13_n978(x)
+ else
+ fun_l13_n282(x)
+ end
+end
+
+def fun_l12_n885(x)
+ if (x < 1)
+ fun_l13_n91(x)
+ else
+ fun_l13_n592(x)
+ end
+end
+
+def fun_l12_n886(x)
+ if (x < 1)
+ fun_l13_n844(x)
+ else
+ fun_l13_n254(x)
+ end
+end
+
+def fun_l12_n887(x)
+ if (x < 1)
+ fun_l13_n49(x)
+ else
+ fun_l13_n430(x)
+ end
+end
+
+def fun_l12_n888(x)
+ if (x < 1)
+ fun_l13_n653(x)
+ else
+ fun_l13_n612(x)
+ end
+end
+
+def fun_l12_n889(x)
+ if (x < 1)
+ fun_l13_n352(x)
+ else
+ fun_l13_n228(x)
+ end
+end
+
+def fun_l12_n890(x)
+ if (x < 1)
+ fun_l13_n952(x)
+ else
+ fun_l13_n505(x)
+ end
+end
+
+def fun_l12_n891(x)
+ if (x < 1)
+ fun_l13_n381(x)
+ else
+ fun_l13_n799(x)
+ end
+end
+
+def fun_l12_n892(x)
+ if (x < 1)
+ fun_l13_n160(x)
+ else
+ fun_l13_n78(x)
+ end
+end
+
+def fun_l12_n893(x)
+ if (x < 1)
+ fun_l13_n554(x)
+ else
+ fun_l13_n383(x)
+ end
+end
+
+def fun_l12_n894(x)
+ if (x < 1)
+ fun_l13_n475(x)
+ else
+ fun_l13_n853(x)
+ end
+end
+
+def fun_l12_n895(x)
+ if (x < 1)
+ fun_l13_n588(x)
+ else
+ fun_l13_n452(x)
+ end
+end
+
+def fun_l12_n896(x)
+ if (x < 1)
+ fun_l13_n991(x)
+ else
+ fun_l13_n758(x)
+ end
+end
+
+def fun_l12_n897(x)
+ if (x < 1)
+ fun_l13_n808(x)
+ else
+ fun_l13_n742(x)
+ end
+end
+
+def fun_l12_n898(x)
+ if (x < 1)
+ fun_l13_n654(x)
+ else
+ fun_l13_n772(x)
+ end
+end
+
+def fun_l12_n899(x)
+ if (x < 1)
+ fun_l13_n365(x)
+ else
+ fun_l13_n3(x)
+ end
+end
+
+def fun_l12_n900(x)
+ if (x < 1)
+ fun_l13_n322(x)
+ else
+ fun_l13_n143(x)
+ end
+end
+
+def fun_l12_n901(x)
+ if (x < 1)
+ fun_l13_n833(x)
+ else
+ fun_l13_n19(x)
+ end
+end
+
+def fun_l12_n902(x)
+ if (x < 1)
+ fun_l13_n796(x)
+ else
+ fun_l13_n140(x)
+ end
+end
+
+def fun_l12_n903(x)
+ if (x < 1)
+ fun_l13_n866(x)
+ else
+ fun_l13_n227(x)
+ end
+end
+
+def fun_l12_n904(x)
+ if (x < 1)
+ fun_l13_n814(x)
+ else
+ fun_l13_n714(x)
+ end
+end
+
+def fun_l12_n905(x)
+ if (x < 1)
+ fun_l13_n841(x)
+ else
+ fun_l13_n802(x)
+ end
+end
+
+def fun_l12_n906(x)
+ if (x < 1)
+ fun_l13_n212(x)
+ else
+ fun_l13_n14(x)
+ end
+end
+
+def fun_l12_n907(x)
+ if (x < 1)
+ fun_l13_n35(x)
+ else
+ fun_l13_n952(x)
+ end
+end
+
+def fun_l12_n908(x)
+ if (x < 1)
+ fun_l13_n181(x)
+ else
+ fun_l13_n539(x)
+ end
+end
+
+def fun_l12_n909(x)
+ if (x < 1)
+ fun_l13_n770(x)
+ else
+ fun_l13_n80(x)
+ end
+end
+
+def fun_l12_n910(x)
+ if (x < 1)
+ fun_l13_n421(x)
+ else
+ fun_l13_n512(x)
+ end
+end
+
+def fun_l12_n911(x)
+ if (x < 1)
+ fun_l13_n710(x)
+ else
+ fun_l13_n666(x)
+ end
+end
+
+def fun_l12_n912(x)
+ if (x < 1)
+ fun_l13_n319(x)
+ else
+ fun_l13_n491(x)
+ end
+end
+
+def fun_l12_n913(x)
+ if (x < 1)
+ fun_l13_n924(x)
+ else
+ fun_l13_n198(x)
+ end
+end
+
+def fun_l12_n914(x)
+ if (x < 1)
+ fun_l13_n707(x)
+ else
+ fun_l13_n91(x)
+ end
+end
+
+def fun_l12_n915(x)
+ if (x < 1)
+ fun_l13_n29(x)
+ else
+ fun_l13_n134(x)
+ end
+end
+
+def fun_l12_n916(x)
+ if (x < 1)
+ fun_l13_n314(x)
+ else
+ fun_l13_n831(x)
+ end
+end
+
+def fun_l12_n917(x)
+ if (x < 1)
+ fun_l13_n986(x)
+ else
+ fun_l13_n732(x)
+ end
+end
+
+def fun_l12_n918(x)
+ if (x < 1)
+ fun_l13_n787(x)
+ else
+ fun_l13_n232(x)
+ end
+end
+
+def fun_l12_n919(x)
+ if (x < 1)
+ fun_l13_n452(x)
+ else
+ fun_l13_n386(x)
+ end
+end
+
+def fun_l12_n920(x)
+ if (x < 1)
+ fun_l13_n12(x)
+ else
+ fun_l13_n264(x)
+ end
+end
+
+def fun_l12_n921(x)
+ if (x < 1)
+ fun_l13_n734(x)
+ else
+ fun_l13_n885(x)
+ end
+end
+
+def fun_l12_n922(x)
+ if (x < 1)
+ fun_l13_n180(x)
+ else
+ fun_l13_n509(x)
+ end
+end
+
+def fun_l12_n923(x)
+ if (x < 1)
+ fun_l13_n783(x)
+ else
+ fun_l13_n212(x)
+ end
+end
+
+def fun_l12_n924(x)
+ if (x < 1)
+ fun_l13_n623(x)
+ else
+ fun_l13_n159(x)
+ end
+end
+
+def fun_l12_n925(x)
+ if (x < 1)
+ fun_l13_n361(x)
+ else
+ fun_l13_n47(x)
+ end
+end
+
+def fun_l12_n926(x)
+ if (x < 1)
+ fun_l13_n355(x)
+ else
+ fun_l13_n337(x)
+ end
+end
+
+def fun_l12_n927(x)
+ if (x < 1)
+ fun_l13_n892(x)
+ else
+ fun_l13_n814(x)
+ end
+end
+
+def fun_l12_n928(x)
+ if (x < 1)
+ fun_l13_n173(x)
+ else
+ fun_l13_n613(x)
+ end
+end
+
+def fun_l12_n929(x)
+ if (x < 1)
+ fun_l13_n140(x)
+ else
+ fun_l13_n782(x)
+ end
+end
+
+def fun_l12_n930(x)
+ if (x < 1)
+ fun_l13_n964(x)
+ else
+ fun_l13_n830(x)
+ end
+end
+
+def fun_l12_n931(x)
+ if (x < 1)
+ fun_l13_n110(x)
+ else
+ fun_l13_n767(x)
+ end
+end
+
+def fun_l12_n932(x)
+ if (x < 1)
+ fun_l13_n738(x)
+ else
+ fun_l13_n73(x)
+ end
+end
+
+def fun_l12_n933(x)
+ if (x < 1)
+ fun_l13_n92(x)
+ else
+ fun_l13_n113(x)
+ end
+end
+
+def fun_l12_n934(x)
+ if (x < 1)
+ fun_l13_n377(x)
+ else
+ fun_l13_n464(x)
+ end
+end
+
+def fun_l12_n935(x)
+ if (x < 1)
+ fun_l13_n544(x)
+ else
+ fun_l13_n808(x)
+ end
+end
+
+def fun_l12_n936(x)
+ if (x < 1)
+ fun_l13_n36(x)
+ else
+ fun_l13_n343(x)
+ end
+end
+
+def fun_l12_n937(x)
+ if (x < 1)
+ fun_l13_n745(x)
+ else
+ fun_l13_n342(x)
+ end
+end
+
+def fun_l12_n938(x)
+ if (x < 1)
+ fun_l13_n238(x)
+ else
+ fun_l13_n703(x)
+ end
+end
+
+def fun_l12_n939(x)
+ if (x < 1)
+ fun_l13_n229(x)
+ else
+ fun_l13_n118(x)
+ end
+end
+
+def fun_l12_n940(x)
+ if (x < 1)
+ fun_l13_n90(x)
+ else
+ fun_l13_n0(x)
+ end
+end
+
+def fun_l12_n941(x)
+ if (x < 1)
+ fun_l13_n586(x)
+ else
+ fun_l13_n99(x)
+ end
+end
+
+def fun_l12_n942(x)
+ if (x < 1)
+ fun_l13_n755(x)
+ else
+ fun_l13_n573(x)
+ end
+end
+
+def fun_l12_n943(x)
+ if (x < 1)
+ fun_l13_n74(x)
+ else
+ fun_l13_n805(x)
+ end
+end
+
+def fun_l12_n944(x)
+ if (x < 1)
+ fun_l13_n574(x)
+ else
+ fun_l13_n876(x)
+ end
+end
+
+def fun_l12_n945(x)
+ if (x < 1)
+ fun_l13_n0(x)
+ else
+ fun_l13_n478(x)
+ end
+end
+
+def fun_l12_n946(x)
+ if (x < 1)
+ fun_l13_n536(x)
+ else
+ fun_l13_n957(x)
+ end
+end
+
+def fun_l12_n947(x)
+ if (x < 1)
+ fun_l13_n644(x)
+ else
+ fun_l13_n285(x)
+ end
+end
+
+def fun_l12_n948(x)
+ if (x < 1)
+ fun_l13_n215(x)
+ else
+ fun_l13_n914(x)
+ end
+end
+
+def fun_l12_n949(x)
+ if (x < 1)
+ fun_l13_n265(x)
+ else
+ fun_l13_n262(x)
+ end
+end
+
+def fun_l12_n950(x)
+ if (x < 1)
+ fun_l13_n44(x)
+ else
+ fun_l13_n917(x)
+ end
+end
+
+def fun_l12_n951(x)
+ if (x < 1)
+ fun_l13_n222(x)
+ else
+ fun_l13_n53(x)
+ end
+end
+
+def fun_l12_n952(x)
+ if (x < 1)
+ fun_l13_n149(x)
+ else
+ fun_l13_n11(x)
+ end
+end
+
+def fun_l12_n953(x)
+ if (x < 1)
+ fun_l13_n827(x)
+ else
+ fun_l13_n737(x)
+ end
+end
+
+def fun_l12_n954(x)
+ if (x < 1)
+ fun_l13_n655(x)
+ else
+ fun_l13_n308(x)
+ end
+end
+
+def fun_l12_n955(x)
+ if (x < 1)
+ fun_l13_n108(x)
+ else
+ fun_l13_n940(x)
+ end
+end
+
+def fun_l12_n956(x)
+ if (x < 1)
+ fun_l13_n236(x)
+ else
+ fun_l13_n259(x)
+ end
+end
+
+def fun_l12_n957(x)
+ if (x < 1)
+ fun_l13_n886(x)
+ else
+ fun_l13_n955(x)
+ end
+end
+
+def fun_l12_n958(x)
+ if (x < 1)
+ fun_l13_n688(x)
+ else
+ fun_l13_n391(x)
+ end
+end
+
+def fun_l12_n959(x)
+ if (x < 1)
+ fun_l13_n521(x)
+ else
+ fun_l13_n395(x)
+ end
+end
+
+def fun_l12_n960(x)
+ if (x < 1)
+ fun_l13_n877(x)
+ else
+ fun_l13_n808(x)
+ end
+end
+
+def fun_l12_n961(x)
+ if (x < 1)
+ fun_l13_n29(x)
+ else
+ fun_l13_n422(x)
+ end
+end
+
+def fun_l12_n962(x)
+ if (x < 1)
+ fun_l13_n417(x)
+ else
+ fun_l13_n310(x)
+ end
+end
+
+def fun_l12_n963(x)
+ if (x < 1)
+ fun_l13_n987(x)
+ else
+ fun_l13_n462(x)
+ end
+end
+
+def fun_l12_n964(x)
+ if (x < 1)
+ fun_l13_n914(x)
+ else
+ fun_l13_n115(x)
+ end
+end
+
+def fun_l12_n965(x)
+ if (x < 1)
+ fun_l13_n895(x)
+ else
+ fun_l13_n504(x)
+ end
+end
+
+def fun_l12_n966(x)
+ if (x < 1)
+ fun_l13_n304(x)
+ else
+ fun_l13_n788(x)
+ end
+end
+
+def fun_l12_n967(x)
+ if (x < 1)
+ fun_l13_n354(x)
+ else
+ fun_l13_n592(x)
+ end
+end
+
+def fun_l12_n968(x)
+ if (x < 1)
+ fun_l13_n231(x)
+ else
+ fun_l13_n214(x)
+ end
+end
+
+def fun_l12_n969(x)
+ if (x < 1)
+ fun_l13_n435(x)
+ else
+ fun_l13_n779(x)
+ end
+end
+
+def fun_l12_n970(x)
+ if (x < 1)
+ fun_l13_n261(x)
+ else
+ fun_l13_n139(x)
+ end
+end
+
+def fun_l12_n971(x)
+ if (x < 1)
+ fun_l13_n320(x)
+ else
+ fun_l13_n749(x)
+ end
+end
+
+def fun_l12_n972(x)
+ if (x < 1)
+ fun_l13_n56(x)
+ else
+ fun_l13_n207(x)
+ end
+end
+
+def fun_l12_n973(x)
+ if (x < 1)
+ fun_l13_n238(x)
+ else
+ fun_l13_n637(x)
+ end
+end
+
+def fun_l12_n974(x)
+ if (x < 1)
+ fun_l13_n474(x)
+ else
+ fun_l13_n512(x)
+ end
+end
+
+def fun_l12_n975(x)
+ if (x < 1)
+ fun_l13_n552(x)
+ else
+ fun_l13_n355(x)
+ end
+end
+
+def fun_l12_n976(x)
+ if (x < 1)
+ fun_l13_n127(x)
+ else
+ fun_l13_n571(x)
+ end
+end
+
+def fun_l12_n977(x)
+ if (x < 1)
+ fun_l13_n261(x)
+ else
+ fun_l13_n845(x)
+ end
+end
+
+def fun_l12_n978(x)
+ if (x < 1)
+ fun_l13_n280(x)
+ else
+ fun_l13_n465(x)
+ end
+end
+
+def fun_l12_n979(x)
+ if (x < 1)
+ fun_l13_n249(x)
+ else
+ fun_l13_n66(x)
+ end
+end
+
+def fun_l12_n980(x)
+ if (x < 1)
+ fun_l13_n306(x)
+ else
+ fun_l13_n53(x)
+ end
+end
+
+def fun_l12_n981(x)
+ if (x < 1)
+ fun_l13_n827(x)
+ else
+ fun_l13_n395(x)
+ end
+end
+
+def fun_l12_n982(x)
+ if (x < 1)
+ fun_l13_n858(x)
+ else
+ fun_l13_n644(x)
+ end
+end
+
+def fun_l12_n983(x)
+ if (x < 1)
+ fun_l13_n50(x)
+ else
+ fun_l13_n671(x)
+ end
+end
+
+def fun_l12_n984(x)
+ if (x < 1)
+ fun_l13_n629(x)
+ else
+ fun_l13_n55(x)
+ end
+end
+
+def fun_l12_n985(x)
+ if (x < 1)
+ fun_l13_n73(x)
+ else
+ fun_l13_n958(x)
+ end
+end
+
+def fun_l12_n986(x)
+ if (x < 1)
+ fun_l13_n197(x)
+ else
+ fun_l13_n444(x)
+ end
+end
+
+def fun_l12_n987(x)
+ if (x < 1)
+ fun_l13_n108(x)
+ else
+ fun_l13_n898(x)
+ end
+end
+
+def fun_l12_n988(x)
+ if (x < 1)
+ fun_l13_n153(x)
+ else
+ fun_l13_n278(x)
+ end
+end
+
+def fun_l12_n989(x)
+ if (x < 1)
+ fun_l13_n764(x)
+ else
+ fun_l13_n712(x)
+ end
+end
+
+def fun_l12_n990(x)
+ if (x < 1)
+ fun_l13_n711(x)
+ else
+ fun_l13_n825(x)
+ end
+end
+
+def fun_l12_n991(x)
+ if (x < 1)
+ fun_l13_n767(x)
+ else
+ fun_l13_n169(x)
+ end
+end
+
+def fun_l12_n992(x)
+ if (x < 1)
+ fun_l13_n917(x)
+ else
+ fun_l13_n524(x)
+ end
+end
+
+def fun_l12_n993(x)
+ if (x < 1)
+ fun_l13_n589(x)
+ else
+ fun_l13_n695(x)
+ end
+end
+
+def fun_l12_n994(x)
+ if (x < 1)
+ fun_l13_n733(x)
+ else
+ fun_l13_n764(x)
+ end
+end
+
+def fun_l12_n995(x)
+ if (x < 1)
+ fun_l13_n86(x)
+ else
+ fun_l13_n547(x)
+ end
+end
+
+def fun_l12_n996(x)
+ if (x < 1)
+ fun_l13_n236(x)
+ else
+ fun_l13_n197(x)
+ end
+end
+
+def fun_l12_n997(x)
+ if (x < 1)
+ fun_l13_n592(x)
+ else
+ fun_l13_n313(x)
+ end
+end
+
+def fun_l12_n998(x)
+ if (x < 1)
+ fun_l13_n878(x)
+ else
+ fun_l13_n439(x)
+ end
+end
+
+def fun_l12_n999(x)
+ if (x < 1)
+ fun_l13_n904(x)
+ else
+ fun_l13_n651(x)
+ end
+end
+
+def fun_l13_n0(x)
+ if (x < 1)
+ fun_l14_n72(x)
+ else
+ fun_l14_n951(x)
+ end
+end
+
+def fun_l13_n1(x)
+ if (x < 1)
+ fun_l14_n950(x)
+ else
+ fun_l14_n170(x)
+ end
+end
+
+def fun_l13_n2(x)
+ if (x < 1)
+ fun_l14_n773(x)
+ else
+ fun_l14_n351(x)
+ end
+end
+
+def fun_l13_n3(x)
+ if (x < 1)
+ fun_l14_n814(x)
+ else
+ fun_l14_n304(x)
+ end
+end
+
+def fun_l13_n4(x)
+ if (x < 1)
+ fun_l14_n395(x)
+ else
+ fun_l14_n187(x)
+ end
+end
+
+def fun_l13_n5(x)
+ if (x < 1)
+ fun_l14_n60(x)
+ else
+ fun_l14_n165(x)
+ end
+end
+
+def fun_l13_n6(x)
+ if (x < 1)
+ fun_l14_n711(x)
+ else
+ fun_l14_n815(x)
+ end
+end
+
+def fun_l13_n7(x)
+ if (x < 1)
+ fun_l14_n396(x)
+ else
+ fun_l14_n614(x)
+ end
+end
+
+def fun_l13_n8(x)
+ if (x < 1)
+ fun_l14_n477(x)
+ else
+ fun_l14_n427(x)
+ end
+end
+
+def fun_l13_n9(x)
+ if (x < 1)
+ fun_l14_n803(x)
+ else
+ fun_l14_n655(x)
+ end
+end
+
+def fun_l13_n10(x)
+ if (x < 1)
+ fun_l14_n261(x)
+ else
+ fun_l14_n324(x)
+ end
+end
+
+def fun_l13_n11(x)
+ if (x < 1)
+ fun_l14_n485(x)
+ else
+ fun_l14_n302(x)
+ end
+end
+
+def fun_l13_n12(x)
+ if (x < 1)
+ fun_l14_n324(x)
+ else
+ fun_l14_n840(x)
+ end
+end
+
+def fun_l13_n13(x)
+ if (x < 1)
+ fun_l14_n811(x)
+ else
+ fun_l14_n357(x)
+ end
+end
+
+def fun_l13_n14(x)
+ if (x < 1)
+ fun_l14_n736(x)
+ else
+ fun_l14_n763(x)
+ end
+end
+
+def fun_l13_n15(x)
+ if (x < 1)
+ fun_l14_n572(x)
+ else
+ fun_l14_n557(x)
+ end
+end
+
+def fun_l13_n16(x)
+ if (x < 1)
+ fun_l14_n406(x)
+ else
+ fun_l14_n200(x)
+ end
+end
+
+def fun_l13_n17(x)
+ if (x < 1)
+ fun_l14_n500(x)
+ else
+ fun_l14_n480(x)
+ end
+end
+
+def fun_l13_n18(x)
+ if (x < 1)
+ fun_l14_n215(x)
+ else
+ fun_l14_n241(x)
+ end
+end
+
+def fun_l13_n19(x)
+ if (x < 1)
+ fun_l14_n341(x)
+ else
+ fun_l14_n142(x)
+ end
+end
+
+def fun_l13_n20(x)
+ if (x < 1)
+ fun_l14_n649(x)
+ else
+ fun_l14_n853(x)
+ end
+end
+
+def fun_l13_n21(x)
+ if (x < 1)
+ fun_l14_n153(x)
+ else
+ fun_l14_n295(x)
+ end
+end
+
+def fun_l13_n22(x)
+ if (x < 1)
+ fun_l14_n210(x)
+ else
+ fun_l14_n947(x)
+ end
+end
+
+def fun_l13_n23(x)
+ if (x < 1)
+ fun_l14_n764(x)
+ else
+ fun_l14_n810(x)
+ end
+end
+
+def fun_l13_n24(x)
+ if (x < 1)
+ fun_l14_n96(x)
+ else
+ fun_l14_n359(x)
+ end
+end
+
+def fun_l13_n25(x)
+ if (x < 1)
+ fun_l14_n542(x)
+ else
+ fun_l14_n506(x)
+ end
+end
+
+def fun_l13_n26(x)
+ if (x < 1)
+ fun_l14_n583(x)
+ else
+ fun_l14_n754(x)
+ end
+end
+
+def fun_l13_n27(x)
+ if (x < 1)
+ fun_l14_n881(x)
+ else
+ fun_l14_n693(x)
+ end
+end
+
+def fun_l13_n28(x)
+ if (x < 1)
+ fun_l14_n385(x)
+ else
+ fun_l14_n628(x)
+ end
+end
+
+def fun_l13_n29(x)
+ if (x < 1)
+ fun_l14_n429(x)
+ else
+ fun_l14_n370(x)
+ end
+end
+
+def fun_l13_n30(x)
+ if (x < 1)
+ fun_l14_n484(x)
+ else
+ fun_l14_n724(x)
+ end
+end
+
+def fun_l13_n31(x)
+ if (x < 1)
+ fun_l14_n328(x)
+ else
+ fun_l14_n857(x)
+ end
+end
+
+def fun_l13_n32(x)
+ if (x < 1)
+ fun_l14_n367(x)
+ else
+ fun_l14_n441(x)
+ end
+end
+
+def fun_l13_n33(x)
+ if (x < 1)
+ fun_l14_n322(x)
+ else
+ fun_l14_n390(x)
+ end
+end
+
+def fun_l13_n34(x)
+ if (x < 1)
+ fun_l14_n935(x)
+ else
+ fun_l14_n46(x)
+ end
+end
+
+def fun_l13_n35(x)
+ if (x < 1)
+ fun_l14_n274(x)
+ else
+ fun_l14_n536(x)
+ end
+end
+
+def fun_l13_n36(x)
+ if (x < 1)
+ fun_l14_n645(x)
+ else
+ fun_l14_n396(x)
+ end
+end
+
+def fun_l13_n37(x)
+ if (x < 1)
+ fun_l14_n905(x)
+ else
+ fun_l14_n19(x)
+ end
+end
+
+def fun_l13_n38(x)
+ if (x < 1)
+ fun_l14_n562(x)
+ else
+ fun_l14_n983(x)
+ end
+end
+
+def fun_l13_n39(x)
+ if (x < 1)
+ fun_l14_n846(x)
+ else
+ fun_l14_n140(x)
+ end
+end
+
+def fun_l13_n40(x)
+ if (x < 1)
+ fun_l14_n308(x)
+ else
+ fun_l14_n968(x)
+ end
+end
+
+def fun_l13_n41(x)
+ if (x < 1)
+ fun_l14_n299(x)
+ else
+ fun_l14_n364(x)
+ end
+end
+
+def fun_l13_n42(x)
+ if (x < 1)
+ fun_l14_n266(x)
+ else
+ fun_l14_n368(x)
+ end
+end
+
+def fun_l13_n43(x)
+ if (x < 1)
+ fun_l14_n216(x)
+ else
+ fun_l14_n894(x)
+ end
+end
+
+def fun_l13_n44(x)
+ if (x < 1)
+ fun_l14_n30(x)
+ else
+ fun_l14_n118(x)
+ end
+end
+
+def fun_l13_n45(x)
+ if (x < 1)
+ fun_l14_n66(x)
+ else
+ fun_l14_n677(x)
+ end
+end
+
+def fun_l13_n46(x)
+ if (x < 1)
+ fun_l14_n415(x)
+ else
+ fun_l14_n311(x)
+ end
+end
+
+def fun_l13_n47(x)
+ if (x < 1)
+ fun_l14_n63(x)
+ else
+ fun_l14_n410(x)
+ end
+end
+
+def fun_l13_n48(x)
+ if (x < 1)
+ fun_l14_n640(x)
+ else
+ fun_l14_n161(x)
+ end
+end
+
+def fun_l13_n49(x)
+ if (x < 1)
+ fun_l14_n546(x)
+ else
+ fun_l14_n655(x)
+ end
+end
+
+def fun_l13_n50(x)
+ if (x < 1)
+ fun_l14_n102(x)
+ else
+ fun_l14_n791(x)
+ end
+end
+
+def fun_l13_n51(x)
+ if (x < 1)
+ fun_l14_n333(x)
+ else
+ fun_l14_n641(x)
+ end
+end
+
+def fun_l13_n52(x)
+ if (x < 1)
+ fun_l14_n16(x)
+ else
+ fun_l14_n653(x)
+ end
+end
+
+def fun_l13_n53(x)
+ if (x < 1)
+ fun_l14_n842(x)
+ else
+ fun_l14_n780(x)
+ end
+end
+
+def fun_l13_n54(x)
+ if (x < 1)
+ fun_l14_n663(x)
+ else
+ fun_l14_n903(x)
+ end
+end
+
+def fun_l13_n55(x)
+ if (x < 1)
+ fun_l14_n745(x)
+ else
+ fun_l14_n925(x)
+ end
+end
+
+def fun_l13_n56(x)
+ if (x < 1)
+ fun_l14_n688(x)
+ else
+ fun_l14_n930(x)
+ end
+end
+
+def fun_l13_n57(x)
+ if (x < 1)
+ fun_l14_n58(x)
+ else
+ fun_l14_n864(x)
+ end
+end
+
+def fun_l13_n58(x)
+ if (x < 1)
+ fun_l14_n107(x)
+ else
+ fun_l14_n197(x)
+ end
+end
+
+def fun_l13_n59(x)
+ if (x < 1)
+ fun_l14_n334(x)
+ else
+ fun_l14_n147(x)
+ end
+end
+
+def fun_l13_n60(x)
+ if (x < 1)
+ fun_l14_n814(x)
+ else
+ fun_l14_n417(x)
+ end
+end
+
+def fun_l13_n61(x)
+ if (x < 1)
+ fun_l14_n696(x)
+ else
+ fun_l14_n973(x)
+ end
+end
+
+def fun_l13_n62(x)
+ if (x < 1)
+ fun_l14_n378(x)
+ else
+ fun_l14_n968(x)
+ end
+end
+
+def fun_l13_n63(x)
+ if (x < 1)
+ fun_l14_n107(x)
+ else
+ fun_l14_n100(x)
+ end
+end
+
+def fun_l13_n64(x)
+ if (x < 1)
+ fun_l14_n105(x)
+ else
+ fun_l14_n393(x)
+ end
+end
+
+def fun_l13_n65(x)
+ if (x < 1)
+ fun_l14_n833(x)
+ else
+ fun_l14_n424(x)
+ end
+end
+
+def fun_l13_n66(x)
+ if (x < 1)
+ fun_l14_n125(x)
+ else
+ fun_l14_n697(x)
+ end
+end
+
+def fun_l13_n67(x)
+ if (x < 1)
+ fun_l14_n684(x)
+ else
+ fun_l14_n458(x)
+ end
+end
+
+def fun_l13_n68(x)
+ if (x < 1)
+ fun_l14_n301(x)
+ else
+ fun_l14_n711(x)
+ end
+end
+
+def fun_l13_n69(x)
+ if (x < 1)
+ fun_l14_n131(x)
+ else
+ fun_l14_n552(x)
+ end
+end
+
+def fun_l13_n70(x)
+ if (x < 1)
+ fun_l14_n425(x)
+ else
+ fun_l14_n241(x)
+ end
+end
+
+def fun_l13_n71(x)
+ if (x < 1)
+ fun_l14_n531(x)
+ else
+ fun_l14_n364(x)
+ end
+end
+
+def fun_l13_n72(x)
+ if (x < 1)
+ fun_l14_n801(x)
+ else
+ fun_l14_n951(x)
+ end
+end
+
+def fun_l13_n73(x)
+ if (x < 1)
+ fun_l14_n415(x)
+ else
+ fun_l14_n294(x)
+ end
+end
+
+def fun_l13_n74(x)
+ if (x < 1)
+ fun_l14_n715(x)
+ else
+ fun_l14_n606(x)
+ end
+end
+
+def fun_l13_n75(x)
+ if (x < 1)
+ fun_l14_n932(x)
+ else
+ fun_l14_n928(x)
+ end
+end
+
+def fun_l13_n76(x)
+ if (x < 1)
+ fun_l14_n930(x)
+ else
+ fun_l14_n102(x)
+ end
+end
+
+def fun_l13_n77(x)
+ if (x < 1)
+ fun_l14_n293(x)
+ else
+ fun_l14_n301(x)
+ end
+end
+
+def fun_l13_n78(x)
+ if (x < 1)
+ fun_l14_n270(x)
+ else
+ fun_l14_n715(x)
+ end
+end
+
+def fun_l13_n79(x)
+ if (x < 1)
+ fun_l14_n862(x)
+ else
+ fun_l14_n589(x)
+ end
+end
+
+def fun_l13_n80(x)
+ if (x < 1)
+ fun_l14_n337(x)
+ else
+ fun_l14_n940(x)
+ end
+end
+
+def fun_l13_n81(x)
+ if (x < 1)
+ fun_l14_n394(x)
+ else
+ fun_l14_n902(x)
+ end
+end
+
+def fun_l13_n82(x)
+ if (x < 1)
+ fun_l14_n468(x)
+ else
+ fun_l14_n816(x)
+ end
+end
+
+def fun_l13_n83(x)
+ if (x < 1)
+ fun_l14_n517(x)
+ else
+ fun_l14_n633(x)
+ end
+end
+
+def fun_l13_n84(x)
+ if (x < 1)
+ fun_l14_n312(x)
+ else
+ fun_l14_n473(x)
+ end
+end
+
+def fun_l13_n85(x)
+ if (x < 1)
+ fun_l14_n377(x)
+ else
+ fun_l14_n616(x)
+ end
+end
+
+def fun_l13_n86(x)
+ if (x < 1)
+ fun_l14_n541(x)
+ else
+ fun_l14_n77(x)
+ end
+end
+
+def fun_l13_n87(x)
+ if (x < 1)
+ fun_l14_n66(x)
+ else
+ fun_l14_n162(x)
+ end
+end
+
+def fun_l13_n88(x)
+ if (x < 1)
+ fun_l14_n202(x)
+ else
+ fun_l14_n158(x)
+ end
+end
+
+def fun_l13_n89(x)
+ if (x < 1)
+ fun_l14_n549(x)
+ else
+ fun_l14_n947(x)
+ end
+end
+
+def fun_l13_n90(x)
+ if (x < 1)
+ fun_l14_n82(x)
+ else
+ fun_l14_n747(x)
+ end
+end
+
+def fun_l13_n91(x)
+ if (x < 1)
+ fun_l14_n374(x)
+ else
+ fun_l14_n738(x)
+ end
+end
+
+def fun_l13_n92(x)
+ if (x < 1)
+ fun_l14_n124(x)
+ else
+ fun_l14_n673(x)
+ end
+end
+
+def fun_l13_n93(x)
+ if (x < 1)
+ fun_l14_n405(x)
+ else
+ fun_l14_n562(x)
+ end
+end
+
+def fun_l13_n94(x)
+ if (x < 1)
+ fun_l14_n766(x)
+ else
+ fun_l14_n466(x)
+ end
+end
+
+def fun_l13_n95(x)
+ if (x < 1)
+ fun_l14_n908(x)
+ else
+ fun_l14_n208(x)
+ end
+end
+
+def fun_l13_n96(x)
+ if (x < 1)
+ fun_l14_n439(x)
+ else
+ fun_l14_n964(x)
+ end
+end
+
+def fun_l13_n97(x)
+ if (x < 1)
+ fun_l14_n529(x)
+ else
+ fun_l14_n374(x)
+ end
+end
+
+def fun_l13_n98(x)
+ if (x < 1)
+ fun_l14_n723(x)
+ else
+ fun_l14_n464(x)
+ end
+end
+
+def fun_l13_n99(x)
+ if (x < 1)
+ fun_l14_n849(x)
+ else
+ fun_l14_n951(x)
+ end
+end
+
+def fun_l13_n100(x)
+ if (x < 1)
+ fun_l14_n797(x)
+ else
+ fun_l14_n421(x)
+ end
+end
+
+def fun_l13_n101(x)
+ if (x < 1)
+ fun_l14_n989(x)
+ else
+ fun_l14_n392(x)
+ end
+end
+
+def fun_l13_n102(x)
+ if (x < 1)
+ fun_l14_n8(x)
+ else
+ fun_l14_n913(x)
+ end
+end
+
+def fun_l13_n103(x)
+ if (x < 1)
+ fun_l14_n498(x)
+ else
+ fun_l14_n248(x)
+ end
+end
+
+def fun_l13_n104(x)
+ if (x < 1)
+ fun_l14_n989(x)
+ else
+ fun_l14_n83(x)
+ end
+end
+
+def fun_l13_n105(x)
+ if (x < 1)
+ fun_l14_n943(x)
+ else
+ fun_l14_n358(x)
+ end
+end
+
+def fun_l13_n106(x)
+ if (x < 1)
+ fun_l14_n252(x)
+ else
+ fun_l14_n626(x)
+ end
+end
+
+def fun_l13_n107(x)
+ if (x < 1)
+ fun_l14_n495(x)
+ else
+ fun_l14_n627(x)
+ end
+end
+
+def fun_l13_n108(x)
+ if (x < 1)
+ fun_l14_n286(x)
+ else
+ fun_l14_n500(x)
+ end
+end
+
+def fun_l13_n109(x)
+ if (x < 1)
+ fun_l14_n927(x)
+ else
+ fun_l14_n627(x)
+ end
+end
+
+def fun_l13_n110(x)
+ if (x < 1)
+ fun_l14_n103(x)
+ else
+ fun_l14_n319(x)
+ end
+end
+
+def fun_l13_n111(x)
+ if (x < 1)
+ fun_l14_n730(x)
+ else
+ fun_l14_n960(x)
+ end
+end
+
+def fun_l13_n112(x)
+ if (x < 1)
+ fun_l14_n188(x)
+ else
+ fun_l14_n145(x)
+ end
+end
+
+def fun_l13_n113(x)
+ if (x < 1)
+ fun_l14_n361(x)
+ else
+ fun_l14_n707(x)
+ end
+end
+
+def fun_l13_n114(x)
+ if (x < 1)
+ fun_l14_n629(x)
+ else
+ fun_l14_n536(x)
+ end
+end
+
+def fun_l13_n115(x)
+ if (x < 1)
+ fun_l14_n276(x)
+ else
+ fun_l14_n244(x)
+ end
+end
+
+def fun_l13_n116(x)
+ if (x < 1)
+ fun_l14_n512(x)
+ else
+ fun_l14_n578(x)
+ end
+end
+
+def fun_l13_n117(x)
+ if (x < 1)
+ fun_l14_n448(x)
+ else
+ fun_l14_n437(x)
+ end
+end
+
+def fun_l13_n118(x)
+ if (x < 1)
+ fun_l14_n855(x)
+ else
+ fun_l14_n617(x)
+ end
+end
+
+def fun_l13_n119(x)
+ if (x < 1)
+ fun_l14_n467(x)
+ else
+ fun_l14_n594(x)
+ end
+end
+
+def fun_l13_n120(x)
+ if (x < 1)
+ fun_l14_n54(x)
+ else
+ fun_l14_n765(x)
+ end
+end
+
+def fun_l13_n121(x)
+ if (x < 1)
+ fun_l14_n700(x)
+ else
+ fun_l14_n189(x)
+ end
+end
+
+def fun_l13_n122(x)
+ if (x < 1)
+ fun_l14_n731(x)
+ else
+ fun_l14_n469(x)
+ end
+end
+
+def fun_l13_n123(x)
+ if (x < 1)
+ fun_l14_n6(x)
+ else
+ fun_l14_n451(x)
+ end
+end
+
+def fun_l13_n124(x)
+ if (x < 1)
+ fun_l14_n402(x)
+ else
+ fun_l14_n445(x)
+ end
+end
+
+def fun_l13_n125(x)
+ if (x < 1)
+ fun_l14_n412(x)
+ else
+ fun_l14_n551(x)
+ end
+end
+
+def fun_l13_n126(x)
+ if (x < 1)
+ fun_l14_n295(x)
+ else
+ fun_l14_n180(x)
+ end
+end
+
+def fun_l13_n127(x)
+ if (x < 1)
+ fun_l14_n873(x)
+ else
+ fun_l14_n209(x)
+ end
+end
+
+def fun_l13_n128(x)
+ if (x < 1)
+ fun_l14_n181(x)
+ else
+ fun_l14_n198(x)
+ end
+end
+
+def fun_l13_n129(x)
+ if (x < 1)
+ fun_l14_n817(x)
+ else
+ fun_l14_n894(x)
+ end
+end
+
+def fun_l13_n130(x)
+ if (x < 1)
+ fun_l14_n306(x)
+ else
+ fun_l14_n429(x)
+ end
+end
+
+def fun_l13_n131(x)
+ if (x < 1)
+ fun_l14_n573(x)
+ else
+ fun_l14_n120(x)
+ end
+end
+
+def fun_l13_n132(x)
+ if (x < 1)
+ fun_l14_n433(x)
+ else
+ fun_l14_n668(x)
+ end
+end
+
+def fun_l13_n133(x)
+ if (x < 1)
+ fun_l14_n653(x)
+ else
+ fun_l14_n934(x)
+ end
+end
+
+def fun_l13_n134(x)
+ if (x < 1)
+ fun_l14_n280(x)
+ else
+ fun_l14_n533(x)
+ end
+end
+
+def fun_l13_n135(x)
+ if (x < 1)
+ fun_l14_n471(x)
+ else
+ fun_l14_n612(x)
+ end
+end
+
+def fun_l13_n136(x)
+ if (x < 1)
+ fun_l14_n55(x)
+ else
+ fun_l14_n684(x)
+ end
+end
+
+def fun_l13_n137(x)
+ if (x < 1)
+ fun_l14_n458(x)
+ else
+ fun_l14_n107(x)
+ end
+end
+
+def fun_l13_n138(x)
+ if (x < 1)
+ fun_l14_n415(x)
+ else
+ fun_l14_n189(x)
+ end
+end
+
+def fun_l13_n139(x)
+ if (x < 1)
+ fun_l14_n877(x)
+ else
+ fun_l14_n862(x)
+ end
+end
+
+def fun_l13_n140(x)
+ if (x < 1)
+ fun_l14_n471(x)
+ else
+ fun_l14_n533(x)
+ end
+end
+
+def fun_l13_n141(x)
+ if (x < 1)
+ fun_l14_n817(x)
+ else
+ fun_l14_n121(x)
+ end
+end
+
+def fun_l13_n142(x)
+ if (x < 1)
+ fun_l14_n523(x)
+ else
+ fun_l14_n894(x)
+ end
+end
+
+def fun_l13_n143(x)
+ if (x < 1)
+ fun_l14_n893(x)
+ else
+ fun_l14_n187(x)
+ end
+end
+
+def fun_l13_n144(x)
+ if (x < 1)
+ fun_l14_n921(x)
+ else
+ fun_l14_n253(x)
+ end
+end
+
+def fun_l13_n145(x)
+ if (x < 1)
+ fun_l14_n0(x)
+ else
+ fun_l14_n608(x)
+ end
+end
+
+def fun_l13_n146(x)
+ if (x < 1)
+ fun_l14_n83(x)
+ else
+ fun_l14_n450(x)
+ end
+end
+
+def fun_l13_n147(x)
+ if (x < 1)
+ fun_l14_n689(x)
+ else
+ fun_l14_n19(x)
+ end
+end
+
+def fun_l13_n148(x)
+ if (x < 1)
+ fun_l14_n922(x)
+ else
+ fun_l14_n417(x)
+ end
+end
+
+def fun_l13_n149(x)
+ if (x < 1)
+ fun_l14_n449(x)
+ else
+ fun_l14_n273(x)
+ end
+end
+
+def fun_l13_n150(x)
+ if (x < 1)
+ fun_l14_n601(x)
+ else
+ fun_l14_n442(x)
+ end
+end
+
+def fun_l13_n151(x)
+ if (x < 1)
+ fun_l14_n96(x)
+ else
+ fun_l14_n552(x)
+ end
+end
+
+def fun_l13_n152(x)
+ if (x < 1)
+ fun_l14_n667(x)
+ else
+ fun_l14_n273(x)
+ end
+end
+
+def fun_l13_n153(x)
+ if (x < 1)
+ fun_l14_n445(x)
+ else
+ fun_l14_n81(x)
+ end
+end
+
+def fun_l13_n154(x)
+ if (x < 1)
+ fun_l14_n906(x)
+ else
+ fun_l14_n960(x)
+ end
+end
+
+def fun_l13_n155(x)
+ if (x < 1)
+ fun_l14_n781(x)
+ else
+ fun_l14_n763(x)
+ end
+end
+
+def fun_l13_n156(x)
+ if (x < 1)
+ fun_l14_n201(x)
+ else
+ fun_l14_n886(x)
+ end
+end
+
+def fun_l13_n157(x)
+ if (x < 1)
+ fun_l14_n926(x)
+ else
+ fun_l14_n852(x)
+ end
+end
+
+def fun_l13_n158(x)
+ if (x < 1)
+ fun_l14_n114(x)
+ else
+ fun_l14_n23(x)
+ end
+end
+
+def fun_l13_n159(x)
+ if (x < 1)
+ fun_l14_n967(x)
+ else
+ fun_l14_n885(x)
+ end
+end
+
+def fun_l13_n160(x)
+ if (x < 1)
+ fun_l14_n563(x)
+ else
+ fun_l14_n309(x)
+ end
+end
+
+def fun_l13_n161(x)
+ if (x < 1)
+ fun_l14_n26(x)
+ else
+ fun_l14_n232(x)
+ end
+end
+
+def fun_l13_n162(x)
+ if (x < 1)
+ fun_l14_n212(x)
+ else
+ fun_l14_n147(x)
+ end
+end
+
+def fun_l13_n163(x)
+ if (x < 1)
+ fun_l14_n841(x)
+ else
+ fun_l14_n636(x)
+ end
+end
+
+def fun_l13_n164(x)
+ if (x < 1)
+ fun_l14_n405(x)
+ else
+ fun_l14_n709(x)
+ end
+end
+
+def fun_l13_n165(x)
+ if (x < 1)
+ fun_l14_n803(x)
+ else
+ fun_l14_n398(x)
+ end
+end
+
+def fun_l13_n166(x)
+ if (x < 1)
+ fun_l14_n112(x)
+ else
+ fun_l14_n197(x)
+ end
+end
+
+def fun_l13_n167(x)
+ if (x < 1)
+ fun_l14_n414(x)
+ else
+ fun_l14_n509(x)
+ end
+end
+
+def fun_l13_n168(x)
+ if (x < 1)
+ fun_l14_n585(x)
+ else
+ fun_l14_n166(x)
+ end
+end
+
+def fun_l13_n169(x)
+ if (x < 1)
+ fun_l14_n653(x)
+ else
+ fun_l14_n581(x)
+ end
+end
+
+def fun_l13_n170(x)
+ if (x < 1)
+ fun_l14_n291(x)
+ else
+ fun_l14_n520(x)
+ end
+end
+
+def fun_l13_n171(x)
+ if (x < 1)
+ fun_l14_n920(x)
+ else
+ fun_l14_n599(x)
+ end
+end
+
+def fun_l13_n172(x)
+ if (x < 1)
+ fun_l14_n125(x)
+ else
+ fun_l14_n84(x)
+ end
+end
+
+def fun_l13_n173(x)
+ if (x < 1)
+ fun_l14_n635(x)
+ else
+ fun_l14_n224(x)
+ end
+end
+
+def fun_l13_n174(x)
+ if (x < 1)
+ fun_l14_n23(x)
+ else
+ fun_l14_n922(x)
+ end
+end
+
+def fun_l13_n175(x)
+ if (x < 1)
+ fun_l14_n736(x)
+ else
+ fun_l14_n685(x)
+ end
+end
+
+def fun_l13_n176(x)
+ if (x < 1)
+ fun_l14_n235(x)
+ else
+ fun_l14_n157(x)
+ end
+end
+
+def fun_l13_n177(x)
+ if (x < 1)
+ fun_l14_n284(x)
+ else
+ fun_l14_n601(x)
+ end
+end
+
+def fun_l13_n178(x)
+ if (x < 1)
+ fun_l14_n785(x)
+ else
+ fun_l14_n498(x)
+ end
+end
+
+def fun_l13_n179(x)
+ if (x < 1)
+ fun_l14_n416(x)
+ else
+ fun_l14_n624(x)
+ end
+end
+
+def fun_l13_n180(x)
+ if (x < 1)
+ fun_l14_n747(x)
+ else
+ fun_l14_n824(x)
+ end
+end
+
+def fun_l13_n181(x)
+ if (x < 1)
+ fun_l14_n658(x)
+ else
+ fun_l14_n814(x)
+ end
+end
+
+def fun_l13_n182(x)
+ if (x < 1)
+ fun_l14_n723(x)
+ else
+ fun_l14_n365(x)
+ end
+end
+
+def fun_l13_n183(x)
+ if (x < 1)
+ fun_l14_n772(x)
+ else
+ fun_l14_n831(x)
+ end
+end
+
+def fun_l13_n184(x)
+ if (x < 1)
+ fun_l14_n560(x)
+ else
+ fun_l14_n933(x)
+ end
+end
+
+def fun_l13_n185(x)
+ if (x < 1)
+ fun_l14_n550(x)
+ else
+ fun_l14_n716(x)
+ end
+end
+
+def fun_l13_n186(x)
+ if (x < 1)
+ fun_l14_n72(x)
+ else
+ fun_l14_n224(x)
+ end
+end
+
+def fun_l13_n187(x)
+ if (x < 1)
+ fun_l14_n910(x)
+ else
+ fun_l14_n31(x)
+ end
+end
+
+def fun_l13_n188(x)
+ if (x < 1)
+ fun_l14_n792(x)
+ else
+ fun_l14_n69(x)
+ end
+end
+
+def fun_l13_n189(x)
+ if (x < 1)
+ fun_l14_n42(x)
+ else
+ fun_l14_n942(x)
+ end
+end
+
+def fun_l13_n190(x)
+ if (x < 1)
+ fun_l14_n520(x)
+ else
+ fun_l14_n826(x)
+ end
+end
+
+def fun_l13_n191(x)
+ if (x < 1)
+ fun_l14_n723(x)
+ else
+ fun_l14_n5(x)
+ end
+end
+
+def fun_l13_n192(x)
+ if (x < 1)
+ fun_l14_n448(x)
+ else
+ fun_l14_n243(x)
+ end
+end
+
+def fun_l13_n193(x)
+ if (x < 1)
+ fun_l14_n722(x)
+ else
+ fun_l14_n450(x)
+ end
+end
+
+def fun_l13_n194(x)
+ if (x < 1)
+ fun_l14_n31(x)
+ else
+ fun_l14_n968(x)
+ end
+end
+
+def fun_l13_n195(x)
+ if (x < 1)
+ fun_l14_n381(x)
+ else
+ fun_l14_n964(x)
+ end
+end
+
+def fun_l13_n196(x)
+ if (x < 1)
+ fun_l14_n797(x)
+ else
+ fun_l14_n216(x)
+ end
+end
+
+def fun_l13_n197(x)
+ if (x < 1)
+ fun_l14_n351(x)
+ else
+ fun_l14_n439(x)
+ end
+end
+
+def fun_l13_n198(x)
+ if (x < 1)
+ fun_l14_n983(x)
+ else
+ fun_l14_n363(x)
+ end
+end
+
+def fun_l13_n199(x)
+ if (x < 1)
+ fun_l14_n939(x)
+ else
+ fun_l14_n806(x)
+ end
+end
+
+def fun_l13_n200(x)
+ if (x < 1)
+ fun_l14_n710(x)
+ else
+ fun_l14_n513(x)
+ end
+end
+
+def fun_l13_n201(x)
+ if (x < 1)
+ fun_l14_n431(x)
+ else
+ fun_l14_n81(x)
+ end
+end
+
+def fun_l13_n202(x)
+ if (x < 1)
+ fun_l14_n41(x)
+ else
+ fun_l14_n916(x)
+ end
+end
+
+def fun_l13_n203(x)
+ if (x < 1)
+ fun_l14_n368(x)
+ else
+ fun_l14_n626(x)
+ end
+end
+
+def fun_l13_n204(x)
+ if (x < 1)
+ fun_l14_n505(x)
+ else
+ fun_l14_n750(x)
+ end
+end
+
+def fun_l13_n205(x)
+ if (x < 1)
+ fun_l14_n263(x)
+ else
+ fun_l14_n636(x)
+ end
+end
+
+def fun_l13_n206(x)
+ if (x < 1)
+ fun_l14_n589(x)
+ else
+ fun_l14_n215(x)
+ end
+end
+
+def fun_l13_n207(x)
+ if (x < 1)
+ fun_l14_n435(x)
+ else
+ fun_l14_n69(x)
+ end
+end
+
+def fun_l13_n208(x)
+ if (x < 1)
+ fun_l14_n114(x)
+ else
+ fun_l14_n222(x)
+ end
+end
+
+def fun_l13_n209(x)
+ if (x < 1)
+ fun_l14_n784(x)
+ else
+ fun_l14_n337(x)
+ end
+end
+
+def fun_l13_n210(x)
+ if (x < 1)
+ fun_l14_n434(x)
+ else
+ fun_l14_n79(x)
+ end
+end
+
+def fun_l13_n211(x)
+ if (x < 1)
+ fun_l14_n152(x)
+ else
+ fun_l14_n428(x)
+ end
+end
+
+def fun_l13_n212(x)
+ if (x < 1)
+ fun_l14_n24(x)
+ else
+ fun_l14_n101(x)
+ end
+end
+
+def fun_l13_n213(x)
+ if (x < 1)
+ fun_l14_n880(x)
+ else
+ fun_l14_n672(x)
+ end
+end
+
+def fun_l13_n214(x)
+ if (x < 1)
+ fun_l14_n824(x)
+ else
+ fun_l14_n351(x)
+ end
+end
+
+def fun_l13_n215(x)
+ if (x < 1)
+ fun_l14_n657(x)
+ else
+ fun_l14_n822(x)
+ end
+end
+
+def fun_l13_n216(x)
+ if (x < 1)
+ fun_l14_n603(x)
+ else
+ fun_l14_n993(x)
+ end
+end
+
+def fun_l13_n217(x)
+ if (x < 1)
+ fun_l14_n593(x)
+ else
+ fun_l14_n808(x)
+ end
+end
+
+def fun_l13_n218(x)
+ if (x < 1)
+ fun_l14_n30(x)
+ else
+ fun_l14_n632(x)
+ end
+end
+
+def fun_l13_n219(x)
+ if (x < 1)
+ fun_l14_n175(x)
+ else
+ fun_l14_n124(x)
+ end
+end
+
+def fun_l13_n220(x)
+ if (x < 1)
+ fun_l14_n878(x)
+ else
+ fun_l14_n342(x)
+ end
+end
+
+def fun_l13_n221(x)
+ if (x < 1)
+ fun_l14_n857(x)
+ else
+ fun_l14_n204(x)
+ end
+end
+
+def fun_l13_n222(x)
+ if (x < 1)
+ fun_l14_n29(x)
+ else
+ fun_l14_n573(x)
+ end
+end
+
+def fun_l13_n223(x)
+ if (x < 1)
+ fun_l14_n329(x)
+ else
+ fun_l14_n35(x)
+ end
+end
+
+def fun_l13_n224(x)
+ if (x < 1)
+ fun_l14_n31(x)
+ else
+ fun_l14_n323(x)
+ end
+end
+
+def fun_l13_n225(x)
+ if (x < 1)
+ fun_l14_n921(x)
+ else
+ fun_l14_n161(x)
+ end
+end
+
+def fun_l13_n226(x)
+ if (x < 1)
+ fun_l14_n599(x)
+ else
+ fun_l14_n566(x)
+ end
+end
+
+def fun_l13_n227(x)
+ if (x < 1)
+ fun_l14_n994(x)
+ else
+ fun_l14_n549(x)
+ end
+end
+
+def fun_l13_n228(x)
+ if (x < 1)
+ fun_l14_n989(x)
+ else
+ fun_l14_n212(x)
+ end
+end
+
+def fun_l13_n229(x)
+ if (x < 1)
+ fun_l14_n22(x)
+ else
+ fun_l14_n656(x)
+ end
+end
+
+def fun_l13_n230(x)
+ if (x < 1)
+ fun_l14_n232(x)
+ else
+ fun_l14_n658(x)
+ end
+end
+
+def fun_l13_n231(x)
+ if (x < 1)
+ fun_l14_n522(x)
+ else
+ fun_l14_n596(x)
+ end
+end
+
+def fun_l13_n232(x)
+ if (x < 1)
+ fun_l14_n296(x)
+ else
+ fun_l14_n53(x)
+ end
+end
+
+def fun_l13_n233(x)
+ if (x < 1)
+ fun_l14_n958(x)
+ else
+ fun_l14_n818(x)
+ end
+end
+
+def fun_l13_n234(x)
+ if (x < 1)
+ fun_l14_n267(x)
+ else
+ fun_l14_n299(x)
+ end
+end
+
+def fun_l13_n235(x)
+ if (x < 1)
+ fun_l14_n776(x)
+ else
+ fun_l14_n99(x)
+ end
+end
+
+def fun_l13_n236(x)
+ if (x < 1)
+ fun_l14_n204(x)
+ else
+ fun_l14_n34(x)
+ end
+end
+
+def fun_l13_n237(x)
+ if (x < 1)
+ fun_l14_n704(x)
+ else
+ fun_l14_n808(x)
+ end
+end
+
+def fun_l13_n238(x)
+ if (x < 1)
+ fun_l14_n82(x)
+ else
+ fun_l14_n352(x)
+ end
+end
+
+def fun_l13_n239(x)
+ if (x < 1)
+ fun_l14_n382(x)
+ else
+ fun_l14_n447(x)
+ end
+end
+
+def fun_l13_n240(x)
+ if (x < 1)
+ fun_l14_n200(x)
+ else
+ fun_l14_n623(x)
+ end
+end
+
+def fun_l13_n241(x)
+ if (x < 1)
+ fun_l14_n563(x)
+ else
+ fun_l14_n259(x)
+ end
+end
+
+def fun_l13_n242(x)
+ if (x < 1)
+ fun_l14_n126(x)
+ else
+ fun_l14_n337(x)
+ end
+end
+
+def fun_l13_n243(x)
+ if (x < 1)
+ fun_l14_n287(x)
+ else
+ fun_l14_n441(x)
+ end
+end
+
+def fun_l13_n244(x)
+ if (x < 1)
+ fun_l14_n271(x)
+ else
+ fun_l14_n961(x)
+ end
+end
+
+def fun_l13_n245(x)
+ if (x < 1)
+ fun_l14_n677(x)
+ else
+ fun_l14_n310(x)
+ end
+end
+
+def fun_l13_n246(x)
+ if (x < 1)
+ fun_l14_n504(x)
+ else
+ fun_l14_n504(x)
+ end
+end
+
+def fun_l13_n247(x)
+ if (x < 1)
+ fun_l14_n61(x)
+ else
+ fun_l14_n560(x)
+ end
+end
+
+def fun_l13_n248(x)
+ if (x < 1)
+ fun_l14_n813(x)
+ else
+ fun_l14_n337(x)
+ end
+end
+
+def fun_l13_n249(x)
+ if (x < 1)
+ fun_l14_n89(x)
+ else
+ fun_l14_n733(x)
+ end
+end
+
+def fun_l13_n250(x)
+ if (x < 1)
+ fun_l14_n203(x)
+ else
+ fun_l14_n342(x)
+ end
+end
+
+def fun_l13_n251(x)
+ if (x < 1)
+ fun_l14_n605(x)
+ else
+ fun_l14_n767(x)
+ end
+end
+
+def fun_l13_n252(x)
+ if (x < 1)
+ fun_l14_n35(x)
+ else
+ fun_l14_n338(x)
+ end
+end
+
+def fun_l13_n253(x)
+ if (x < 1)
+ fun_l14_n894(x)
+ else
+ fun_l14_n905(x)
+ end
+end
+
+def fun_l13_n254(x)
+ if (x < 1)
+ fun_l14_n516(x)
+ else
+ fun_l14_n832(x)
+ end
+end
+
+def fun_l13_n255(x)
+ if (x < 1)
+ fun_l14_n106(x)
+ else
+ fun_l14_n672(x)
+ end
+end
+
+def fun_l13_n256(x)
+ if (x < 1)
+ fun_l14_n978(x)
+ else
+ fun_l14_n940(x)
+ end
+end
+
+def fun_l13_n257(x)
+ if (x < 1)
+ fun_l14_n808(x)
+ else
+ fun_l14_n906(x)
+ end
+end
+
+def fun_l13_n258(x)
+ if (x < 1)
+ fun_l14_n435(x)
+ else
+ fun_l14_n55(x)
+ end
+end
+
+def fun_l13_n259(x)
+ if (x < 1)
+ fun_l14_n981(x)
+ else
+ fun_l14_n550(x)
+ end
+end
+
+def fun_l13_n260(x)
+ if (x < 1)
+ fun_l14_n689(x)
+ else
+ fun_l14_n533(x)
+ end
+end
+
+def fun_l13_n261(x)
+ if (x < 1)
+ fun_l14_n995(x)
+ else
+ fun_l14_n174(x)
+ end
+end
+
+def fun_l13_n262(x)
+ if (x < 1)
+ fun_l14_n161(x)
+ else
+ fun_l14_n357(x)
+ end
+end
+
+def fun_l13_n263(x)
+ if (x < 1)
+ fun_l14_n248(x)
+ else
+ fun_l14_n509(x)
+ end
+end
+
+def fun_l13_n264(x)
+ if (x < 1)
+ fun_l14_n521(x)
+ else
+ fun_l14_n41(x)
+ end
+end
+
+def fun_l13_n265(x)
+ if (x < 1)
+ fun_l14_n771(x)
+ else
+ fun_l14_n387(x)
+ end
+end
+
+def fun_l13_n266(x)
+ if (x < 1)
+ fun_l14_n149(x)
+ else
+ fun_l14_n814(x)
+ end
+end
+
+def fun_l13_n267(x)
+ if (x < 1)
+ fun_l14_n958(x)
+ else
+ fun_l14_n172(x)
+ end
+end
+
+def fun_l13_n268(x)
+ if (x < 1)
+ fun_l14_n167(x)
+ else
+ fun_l14_n889(x)
+ end
+end
+
+def fun_l13_n269(x)
+ if (x < 1)
+ fun_l14_n321(x)
+ else
+ fun_l14_n152(x)
+ end
+end
+
+def fun_l13_n270(x)
+ if (x < 1)
+ fun_l14_n851(x)
+ else
+ fun_l14_n793(x)
+ end
+end
+
+def fun_l13_n271(x)
+ if (x < 1)
+ fun_l14_n306(x)
+ else
+ fun_l14_n843(x)
+ end
+end
+
+def fun_l13_n272(x)
+ if (x < 1)
+ fun_l14_n499(x)
+ else
+ fun_l14_n118(x)
+ end
+end
+
+def fun_l13_n273(x)
+ if (x < 1)
+ fun_l14_n958(x)
+ else
+ fun_l14_n597(x)
+ end
+end
+
+def fun_l13_n274(x)
+ if (x < 1)
+ fun_l14_n884(x)
+ else
+ fun_l14_n23(x)
+ end
+end
+
+def fun_l13_n275(x)
+ if (x < 1)
+ fun_l14_n203(x)
+ else
+ fun_l14_n796(x)
+ end
+end
+
+def fun_l13_n276(x)
+ if (x < 1)
+ fun_l14_n944(x)
+ else
+ fun_l14_n239(x)
+ end
+end
+
+def fun_l13_n277(x)
+ if (x < 1)
+ fun_l14_n511(x)
+ else
+ fun_l14_n464(x)
+ end
+end
+
+def fun_l13_n278(x)
+ if (x < 1)
+ fun_l14_n906(x)
+ else
+ fun_l14_n713(x)
+ end
+end
+
+def fun_l13_n279(x)
+ if (x < 1)
+ fun_l14_n872(x)
+ else
+ fun_l14_n77(x)
+ end
+end
+
+def fun_l13_n280(x)
+ if (x < 1)
+ fun_l14_n888(x)
+ else
+ fun_l14_n117(x)
+ end
+end
+
+def fun_l13_n281(x)
+ if (x < 1)
+ fun_l14_n298(x)
+ else
+ fun_l14_n695(x)
+ end
+end
+
+def fun_l13_n282(x)
+ if (x < 1)
+ fun_l14_n740(x)
+ else
+ fun_l14_n668(x)
+ end
+end
+
+def fun_l13_n283(x)
+ if (x < 1)
+ fun_l14_n438(x)
+ else
+ fun_l14_n322(x)
+ end
+end
+
+def fun_l13_n284(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n39(x)
+ end
+end
+
+def fun_l13_n285(x)
+ if (x < 1)
+ fun_l14_n271(x)
+ else
+ fun_l14_n984(x)
+ end
+end
+
+def fun_l13_n286(x)
+ if (x < 1)
+ fun_l14_n278(x)
+ else
+ fun_l14_n453(x)
+ end
+end
+
+def fun_l13_n287(x)
+ if (x < 1)
+ fun_l14_n303(x)
+ else
+ fun_l14_n812(x)
+ end
+end
+
+def fun_l13_n288(x)
+ if (x < 1)
+ fun_l14_n891(x)
+ else
+ fun_l14_n843(x)
+ end
+end
+
+def fun_l13_n289(x)
+ if (x < 1)
+ fun_l14_n672(x)
+ else
+ fun_l14_n543(x)
+ end
+end
+
+def fun_l13_n290(x)
+ if (x < 1)
+ fun_l14_n115(x)
+ else
+ fun_l14_n33(x)
+ end
+end
+
+def fun_l13_n291(x)
+ if (x < 1)
+ fun_l14_n467(x)
+ else
+ fun_l14_n427(x)
+ end
+end
+
+def fun_l13_n292(x)
+ if (x < 1)
+ fun_l14_n528(x)
+ else
+ fun_l14_n51(x)
+ end
+end
+
+def fun_l13_n293(x)
+ if (x < 1)
+ fun_l14_n50(x)
+ else
+ fun_l14_n917(x)
+ end
+end
+
+def fun_l13_n294(x)
+ if (x < 1)
+ fun_l14_n245(x)
+ else
+ fun_l14_n289(x)
+ end
+end
+
+def fun_l13_n295(x)
+ if (x < 1)
+ fun_l14_n108(x)
+ else
+ fun_l14_n772(x)
+ end
+end
+
+def fun_l13_n296(x)
+ if (x < 1)
+ fun_l14_n451(x)
+ else
+ fun_l14_n127(x)
+ end
+end
+
+def fun_l13_n297(x)
+ if (x < 1)
+ fun_l14_n374(x)
+ else
+ fun_l14_n20(x)
+ end
+end
+
+def fun_l13_n298(x)
+ if (x < 1)
+ fun_l14_n588(x)
+ else
+ fun_l14_n95(x)
+ end
+end
+
+def fun_l13_n299(x)
+ if (x < 1)
+ fun_l14_n33(x)
+ else
+ fun_l14_n146(x)
+ end
+end
+
+def fun_l13_n300(x)
+ if (x < 1)
+ fun_l14_n812(x)
+ else
+ fun_l14_n373(x)
+ end
+end
+
+def fun_l13_n301(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n228(x)
+ end
+end
+
+def fun_l13_n302(x)
+ if (x < 1)
+ fun_l14_n992(x)
+ else
+ fun_l14_n578(x)
+ end
+end
+
+def fun_l13_n303(x)
+ if (x < 1)
+ fun_l14_n106(x)
+ else
+ fun_l14_n413(x)
+ end
+end
+
+def fun_l13_n304(x)
+ if (x < 1)
+ fun_l14_n463(x)
+ else
+ fun_l14_n884(x)
+ end
+end
+
+def fun_l13_n305(x)
+ if (x < 1)
+ fun_l14_n754(x)
+ else
+ fun_l14_n114(x)
+ end
+end
+
+def fun_l13_n306(x)
+ if (x < 1)
+ fun_l14_n960(x)
+ else
+ fun_l14_n596(x)
+ end
+end
+
+def fun_l13_n307(x)
+ if (x < 1)
+ fun_l14_n858(x)
+ else
+ fun_l14_n488(x)
+ end
+end
+
+def fun_l13_n308(x)
+ if (x < 1)
+ fun_l14_n968(x)
+ else
+ fun_l14_n507(x)
+ end
+end
+
+def fun_l13_n309(x)
+ if (x < 1)
+ fun_l14_n956(x)
+ else
+ fun_l14_n125(x)
+ end
+end
+
+def fun_l13_n310(x)
+ if (x < 1)
+ fun_l14_n190(x)
+ else
+ fun_l14_n817(x)
+ end
+end
+
+def fun_l13_n311(x)
+ if (x < 1)
+ fun_l14_n574(x)
+ else
+ fun_l14_n447(x)
+ end
+end
+
+def fun_l13_n312(x)
+ if (x < 1)
+ fun_l14_n403(x)
+ else
+ fun_l14_n591(x)
+ end
+end
+
+def fun_l13_n313(x)
+ if (x < 1)
+ fun_l14_n499(x)
+ else
+ fun_l14_n458(x)
+ end
+end
+
+def fun_l13_n314(x)
+ if (x < 1)
+ fun_l14_n994(x)
+ else
+ fun_l14_n77(x)
+ end
+end
+
+def fun_l13_n315(x)
+ if (x < 1)
+ fun_l14_n421(x)
+ else
+ fun_l14_n810(x)
+ end
+end
+
+def fun_l13_n316(x)
+ if (x < 1)
+ fun_l14_n304(x)
+ else
+ fun_l14_n785(x)
+ end
+end
+
+def fun_l13_n317(x)
+ if (x < 1)
+ fun_l14_n624(x)
+ else
+ fun_l14_n399(x)
+ end
+end
+
+def fun_l13_n318(x)
+ if (x < 1)
+ fun_l14_n882(x)
+ else
+ fun_l14_n3(x)
+ end
+end
+
+def fun_l13_n319(x)
+ if (x < 1)
+ fun_l14_n267(x)
+ else
+ fun_l14_n955(x)
+ end
+end
+
+def fun_l13_n320(x)
+ if (x < 1)
+ fun_l14_n690(x)
+ else
+ fun_l14_n281(x)
+ end
+end
+
+def fun_l13_n321(x)
+ if (x < 1)
+ fun_l14_n453(x)
+ else
+ fun_l14_n969(x)
+ end
+end
+
+def fun_l13_n322(x)
+ if (x < 1)
+ fun_l14_n297(x)
+ else
+ fun_l14_n50(x)
+ end
+end
+
+def fun_l13_n323(x)
+ if (x < 1)
+ fun_l14_n342(x)
+ else
+ fun_l14_n618(x)
+ end
+end
+
+def fun_l13_n324(x)
+ if (x < 1)
+ fun_l14_n74(x)
+ else
+ fun_l14_n638(x)
+ end
+end
+
+def fun_l13_n325(x)
+ if (x < 1)
+ fun_l14_n218(x)
+ else
+ fun_l14_n169(x)
+ end
+end
+
+def fun_l13_n326(x)
+ if (x < 1)
+ fun_l14_n128(x)
+ else
+ fun_l14_n504(x)
+ end
+end
+
+def fun_l13_n327(x)
+ if (x < 1)
+ fun_l14_n612(x)
+ else
+ fun_l14_n62(x)
+ end
+end
+
+def fun_l13_n328(x)
+ if (x < 1)
+ fun_l14_n83(x)
+ else
+ fun_l14_n67(x)
+ end
+end
+
+def fun_l13_n329(x)
+ if (x < 1)
+ fun_l14_n515(x)
+ else
+ fun_l14_n15(x)
+ end
+end
+
+def fun_l13_n330(x)
+ if (x < 1)
+ fun_l14_n448(x)
+ else
+ fun_l14_n951(x)
+ end
+end
+
+def fun_l13_n331(x)
+ if (x < 1)
+ fun_l14_n804(x)
+ else
+ fun_l14_n315(x)
+ end
+end
+
+def fun_l13_n332(x)
+ if (x < 1)
+ fun_l14_n522(x)
+ else
+ fun_l14_n761(x)
+ end
+end
+
+def fun_l13_n333(x)
+ if (x < 1)
+ fun_l14_n421(x)
+ else
+ fun_l14_n542(x)
+ end
+end
+
+def fun_l13_n334(x)
+ if (x < 1)
+ fun_l14_n952(x)
+ else
+ fun_l14_n390(x)
+ end
+end
+
+def fun_l13_n335(x)
+ if (x < 1)
+ fun_l14_n324(x)
+ else
+ fun_l14_n60(x)
+ end
+end
+
+def fun_l13_n336(x)
+ if (x < 1)
+ fun_l14_n887(x)
+ else
+ fun_l14_n474(x)
+ end
+end
+
+def fun_l13_n337(x)
+ if (x < 1)
+ fun_l14_n355(x)
+ else
+ fun_l14_n840(x)
+ end
+end
+
+def fun_l13_n338(x)
+ if (x < 1)
+ fun_l14_n21(x)
+ else
+ fun_l14_n133(x)
+ end
+end
+
+def fun_l13_n339(x)
+ if (x < 1)
+ fun_l14_n12(x)
+ else
+ fun_l14_n30(x)
+ end
+end
+
+def fun_l13_n340(x)
+ if (x < 1)
+ fun_l14_n678(x)
+ else
+ fun_l14_n583(x)
+ end
+end
+
+def fun_l13_n341(x)
+ if (x < 1)
+ fun_l14_n289(x)
+ else
+ fun_l14_n490(x)
+ end
+end
+
+def fun_l13_n342(x)
+ if (x < 1)
+ fun_l14_n232(x)
+ else
+ fun_l14_n288(x)
+ end
+end
+
+def fun_l13_n343(x)
+ if (x < 1)
+ fun_l14_n744(x)
+ else
+ fun_l14_n963(x)
+ end
+end
+
+def fun_l13_n344(x)
+ if (x < 1)
+ fun_l14_n651(x)
+ else
+ fun_l14_n377(x)
+ end
+end
+
+def fun_l13_n345(x)
+ if (x < 1)
+ fun_l14_n13(x)
+ else
+ fun_l14_n749(x)
+ end
+end
+
+def fun_l13_n346(x)
+ if (x < 1)
+ fun_l14_n789(x)
+ else
+ fun_l14_n621(x)
+ end
+end
+
+def fun_l13_n347(x)
+ if (x < 1)
+ fun_l14_n346(x)
+ else
+ fun_l14_n663(x)
+ end
+end
+
+def fun_l13_n348(x)
+ if (x < 1)
+ fun_l14_n252(x)
+ else
+ fun_l14_n202(x)
+ end
+end
+
+def fun_l13_n349(x)
+ if (x < 1)
+ fun_l14_n919(x)
+ else
+ fun_l14_n997(x)
+ end
+end
+
+def fun_l13_n350(x)
+ if (x < 1)
+ fun_l14_n472(x)
+ else
+ fun_l14_n900(x)
+ end
+end
+
+def fun_l13_n351(x)
+ if (x < 1)
+ fun_l14_n954(x)
+ else
+ fun_l14_n606(x)
+ end
+end
+
+def fun_l13_n352(x)
+ if (x < 1)
+ fun_l14_n227(x)
+ else
+ fun_l14_n344(x)
+ end
+end
+
+def fun_l13_n353(x)
+ if (x < 1)
+ fun_l14_n110(x)
+ else
+ fun_l14_n266(x)
+ end
+end
+
+def fun_l13_n354(x)
+ if (x < 1)
+ fun_l14_n840(x)
+ else
+ fun_l14_n905(x)
+ end
+end
+
+def fun_l13_n355(x)
+ if (x < 1)
+ fun_l14_n950(x)
+ else
+ fun_l14_n307(x)
+ end
+end
+
+def fun_l13_n356(x)
+ if (x < 1)
+ fun_l14_n572(x)
+ else
+ fun_l14_n480(x)
+ end
+end
+
+def fun_l13_n357(x)
+ if (x < 1)
+ fun_l14_n122(x)
+ else
+ fun_l14_n408(x)
+ end
+end
+
+def fun_l13_n358(x)
+ if (x < 1)
+ fun_l14_n105(x)
+ else
+ fun_l14_n173(x)
+ end
+end
+
+def fun_l13_n359(x)
+ if (x < 1)
+ fun_l14_n358(x)
+ else
+ fun_l14_n336(x)
+ end
+end
+
+def fun_l13_n360(x)
+ if (x < 1)
+ fun_l14_n457(x)
+ else
+ fun_l14_n434(x)
+ end
+end
+
+def fun_l13_n361(x)
+ if (x < 1)
+ fun_l14_n679(x)
+ else
+ fun_l14_n771(x)
+ end
+end
+
+def fun_l13_n362(x)
+ if (x < 1)
+ fun_l14_n419(x)
+ else
+ fun_l14_n909(x)
+ end
+end
+
+def fun_l13_n363(x)
+ if (x < 1)
+ fun_l14_n672(x)
+ else
+ fun_l14_n132(x)
+ end
+end
+
+def fun_l13_n364(x)
+ if (x < 1)
+ fun_l14_n947(x)
+ else
+ fun_l14_n328(x)
+ end
+end
+
+def fun_l13_n365(x)
+ if (x < 1)
+ fun_l14_n959(x)
+ else
+ fun_l14_n122(x)
+ end
+end
+
+def fun_l13_n366(x)
+ if (x < 1)
+ fun_l14_n534(x)
+ else
+ fun_l14_n611(x)
+ end
+end
+
+def fun_l13_n367(x)
+ if (x < 1)
+ fun_l14_n349(x)
+ else
+ fun_l14_n149(x)
+ end
+end
+
+def fun_l13_n368(x)
+ if (x < 1)
+ fun_l14_n94(x)
+ else
+ fun_l14_n870(x)
+ end
+end
+
+def fun_l13_n369(x)
+ if (x < 1)
+ fun_l14_n774(x)
+ else
+ fun_l14_n696(x)
+ end
+end
+
+def fun_l13_n370(x)
+ if (x < 1)
+ fun_l14_n311(x)
+ else
+ fun_l14_n479(x)
+ end
+end
+
+def fun_l13_n371(x)
+ if (x < 1)
+ fun_l14_n650(x)
+ else
+ fun_l14_n66(x)
+ end
+end
+
+def fun_l13_n372(x)
+ if (x < 1)
+ fun_l14_n825(x)
+ else
+ fun_l14_n910(x)
+ end
+end
+
+def fun_l13_n373(x)
+ if (x < 1)
+ fun_l14_n454(x)
+ else
+ fun_l14_n492(x)
+ end
+end
+
+def fun_l13_n374(x)
+ if (x < 1)
+ fun_l14_n785(x)
+ else
+ fun_l14_n352(x)
+ end
+end
+
+def fun_l13_n375(x)
+ if (x < 1)
+ fun_l14_n124(x)
+ else
+ fun_l14_n664(x)
+ end
+end
+
+def fun_l13_n376(x)
+ if (x < 1)
+ fun_l14_n427(x)
+ else
+ fun_l14_n615(x)
+ end
+end
+
+def fun_l13_n377(x)
+ if (x < 1)
+ fun_l14_n926(x)
+ else
+ fun_l14_n307(x)
+ end
+end
+
+def fun_l13_n378(x)
+ if (x < 1)
+ fun_l14_n575(x)
+ else
+ fun_l14_n561(x)
+ end
+end
+
+def fun_l13_n379(x)
+ if (x < 1)
+ fun_l14_n497(x)
+ else
+ fun_l14_n690(x)
+ end
+end
+
+def fun_l13_n380(x)
+ if (x < 1)
+ fun_l14_n350(x)
+ else
+ fun_l14_n641(x)
+ end
+end
+
+def fun_l13_n381(x)
+ if (x < 1)
+ fun_l14_n292(x)
+ else
+ fun_l14_n739(x)
+ end
+end
+
+def fun_l13_n382(x)
+ if (x < 1)
+ fun_l14_n302(x)
+ else
+ fun_l14_n583(x)
+ end
+end
+
+def fun_l13_n383(x)
+ if (x < 1)
+ fun_l14_n36(x)
+ else
+ fun_l14_n603(x)
+ end
+end
+
+def fun_l13_n384(x)
+ if (x < 1)
+ fun_l14_n953(x)
+ else
+ fun_l14_n394(x)
+ end
+end
+
+def fun_l13_n385(x)
+ if (x < 1)
+ fun_l14_n107(x)
+ else
+ fun_l14_n149(x)
+ end
+end
+
+def fun_l13_n386(x)
+ if (x < 1)
+ fun_l14_n77(x)
+ else
+ fun_l14_n880(x)
+ end
+end
+
+def fun_l13_n387(x)
+ if (x < 1)
+ fun_l14_n670(x)
+ else
+ fun_l14_n649(x)
+ end
+end
+
+def fun_l13_n388(x)
+ if (x < 1)
+ fun_l14_n277(x)
+ else
+ fun_l14_n922(x)
+ end
+end
+
+def fun_l13_n389(x)
+ if (x < 1)
+ fun_l14_n981(x)
+ else
+ fun_l14_n427(x)
+ end
+end
+
+def fun_l13_n390(x)
+ if (x < 1)
+ fun_l14_n411(x)
+ else
+ fun_l14_n804(x)
+ end
+end
+
+def fun_l13_n391(x)
+ if (x < 1)
+ fun_l14_n52(x)
+ else
+ fun_l14_n770(x)
+ end
+end
+
+def fun_l13_n392(x)
+ if (x < 1)
+ fun_l14_n592(x)
+ else
+ fun_l14_n672(x)
+ end
+end
+
+def fun_l13_n393(x)
+ if (x < 1)
+ fun_l14_n274(x)
+ else
+ fun_l14_n778(x)
+ end
+end
+
+def fun_l13_n394(x)
+ if (x < 1)
+ fun_l14_n708(x)
+ else
+ fun_l14_n262(x)
+ end
+end
+
+def fun_l13_n395(x)
+ if (x < 1)
+ fun_l14_n449(x)
+ else
+ fun_l14_n273(x)
+ end
+end
+
+def fun_l13_n396(x)
+ if (x < 1)
+ fun_l14_n567(x)
+ else
+ fun_l14_n148(x)
+ end
+end
+
+def fun_l13_n397(x)
+ if (x < 1)
+ fun_l14_n127(x)
+ else
+ fun_l14_n309(x)
+ end
+end
+
+def fun_l13_n398(x)
+ if (x < 1)
+ fun_l14_n150(x)
+ else
+ fun_l14_n540(x)
+ end
+end
+
+def fun_l13_n399(x)
+ if (x < 1)
+ fun_l14_n791(x)
+ else
+ fun_l14_n517(x)
+ end
+end
+
+def fun_l13_n400(x)
+ if (x < 1)
+ fun_l14_n152(x)
+ else
+ fun_l14_n319(x)
+ end
+end
+
+def fun_l13_n401(x)
+ if (x < 1)
+ fun_l14_n911(x)
+ else
+ fun_l14_n544(x)
+ end
+end
+
+def fun_l13_n402(x)
+ if (x < 1)
+ fun_l14_n915(x)
+ else
+ fun_l14_n208(x)
+ end
+end
+
+def fun_l13_n403(x)
+ if (x < 1)
+ fun_l14_n452(x)
+ else
+ fun_l14_n62(x)
+ end
+end
+
+def fun_l13_n404(x)
+ if (x < 1)
+ fun_l14_n823(x)
+ else
+ fun_l14_n913(x)
+ end
+end
+
+def fun_l13_n405(x)
+ if (x < 1)
+ fun_l14_n808(x)
+ else
+ fun_l14_n49(x)
+ end
+end
+
+def fun_l13_n406(x)
+ if (x < 1)
+ fun_l14_n498(x)
+ else
+ fun_l14_n470(x)
+ end
+end
+
+def fun_l13_n407(x)
+ if (x < 1)
+ fun_l14_n314(x)
+ else
+ fun_l14_n248(x)
+ end
+end
+
+def fun_l13_n408(x)
+ if (x < 1)
+ fun_l14_n61(x)
+ else
+ fun_l14_n190(x)
+ end
+end
+
+def fun_l13_n409(x)
+ if (x < 1)
+ fun_l14_n126(x)
+ else
+ fun_l14_n505(x)
+ end
+end
+
+def fun_l13_n410(x)
+ if (x < 1)
+ fun_l14_n646(x)
+ else
+ fun_l14_n319(x)
+ end
+end
+
+def fun_l13_n411(x)
+ if (x < 1)
+ fun_l14_n741(x)
+ else
+ fun_l14_n979(x)
+ end
+end
+
+def fun_l13_n412(x)
+ if (x < 1)
+ fun_l14_n840(x)
+ else
+ fun_l14_n211(x)
+ end
+end
+
+def fun_l13_n413(x)
+ if (x < 1)
+ fun_l14_n217(x)
+ else
+ fun_l14_n98(x)
+ end
+end
+
+def fun_l13_n414(x)
+ if (x < 1)
+ fun_l14_n398(x)
+ else
+ fun_l14_n701(x)
+ end
+end
+
+def fun_l13_n415(x)
+ if (x < 1)
+ fun_l14_n470(x)
+ else
+ fun_l14_n394(x)
+ end
+end
+
+def fun_l13_n416(x)
+ if (x < 1)
+ fun_l14_n113(x)
+ else
+ fun_l14_n792(x)
+ end
+end
+
+def fun_l13_n417(x)
+ if (x < 1)
+ fun_l14_n969(x)
+ else
+ fun_l14_n99(x)
+ end
+end
+
+def fun_l13_n418(x)
+ if (x < 1)
+ fun_l14_n54(x)
+ else
+ fun_l14_n800(x)
+ end
+end
+
+def fun_l13_n419(x)
+ if (x < 1)
+ fun_l14_n763(x)
+ else
+ fun_l14_n510(x)
+ end
+end
+
+def fun_l13_n420(x)
+ if (x < 1)
+ fun_l14_n660(x)
+ else
+ fun_l14_n904(x)
+ end
+end
+
+def fun_l13_n421(x)
+ if (x < 1)
+ fun_l14_n345(x)
+ else
+ fun_l14_n200(x)
+ end
+end
+
+def fun_l13_n422(x)
+ if (x < 1)
+ fun_l14_n831(x)
+ else
+ fun_l14_n35(x)
+ end
+end
+
+def fun_l13_n423(x)
+ if (x < 1)
+ fun_l14_n644(x)
+ else
+ fun_l14_n963(x)
+ end
+end
+
+def fun_l13_n424(x)
+ if (x < 1)
+ fun_l14_n0(x)
+ else
+ fun_l14_n625(x)
+ end
+end
+
+def fun_l13_n425(x)
+ if (x < 1)
+ fun_l14_n186(x)
+ else
+ fun_l14_n409(x)
+ end
+end
+
+def fun_l13_n426(x)
+ if (x < 1)
+ fun_l14_n869(x)
+ else
+ fun_l14_n852(x)
+ end
+end
+
+def fun_l13_n427(x)
+ if (x < 1)
+ fun_l14_n322(x)
+ else
+ fun_l14_n160(x)
+ end
+end
+
+def fun_l13_n428(x)
+ if (x < 1)
+ fun_l14_n974(x)
+ else
+ fun_l14_n139(x)
+ end
+end
+
+def fun_l13_n429(x)
+ if (x < 1)
+ fun_l14_n570(x)
+ else
+ fun_l14_n10(x)
+ end
+end
+
+def fun_l13_n430(x)
+ if (x < 1)
+ fun_l14_n199(x)
+ else
+ fun_l14_n829(x)
+ end
+end
+
+def fun_l13_n431(x)
+ if (x < 1)
+ fun_l14_n700(x)
+ else
+ fun_l14_n362(x)
+ end
+end
+
+def fun_l13_n432(x)
+ if (x < 1)
+ fun_l14_n925(x)
+ else
+ fun_l14_n365(x)
+ end
+end
+
+def fun_l13_n433(x)
+ if (x < 1)
+ fun_l14_n837(x)
+ else
+ fun_l14_n119(x)
+ end
+end
+
+def fun_l13_n434(x)
+ if (x < 1)
+ fun_l14_n355(x)
+ else
+ fun_l14_n374(x)
+ end
+end
+
+def fun_l13_n435(x)
+ if (x < 1)
+ fun_l14_n126(x)
+ else
+ fun_l14_n568(x)
+ end
+end
+
+def fun_l13_n436(x)
+ if (x < 1)
+ fun_l14_n468(x)
+ else
+ fun_l14_n299(x)
+ end
+end
+
+def fun_l13_n437(x)
+ if (x < 1)
+ fun_l14_n667(x)
+ else
+ fun_l14_n795(x)
+ end
+end
+
+def fun_l13_n438(x)
+ if (x < 1)
+ fun_l14_n989(x)
+ else
+ fun_l14_n484(x)
+ end
+end
+
+def fun_l13_n439(x)
+ if (x < 1)
+ fun_l14_n109(x)
+ else
+ fun_l14_n534(x)
+ end
+end
+
+def fun_l13_n440(x)
+ if (x < 1)
+ fun_l14_n999(x)
+ else
+ fun_l14_n69(x)
+ end
+end
+
+def fun_l13_n441(x)
+ if (x < 1)
+ fun_l14_n616(x)
+ else
+ fun_l14_n794(x)
+ end
+end
+
+def fun_l13_n442(x)
+ if (x < 1)
+ fun_l14_n719(x)
+ else
+ fun_l14_n967(x)
+ end
+end
+
+def fun_l13_n443(x)
+ if (x < 1)
+ fun_l14_n279(x)
+ else
+ fun_l14_n240(x)
+ end
+end
+
+def fun_l13_n444(x)
+ if (x < 1)
+ fun_l14_n660(x)
+ else
+ fun_l14_n146(x)
+ end
+end
+
+def fun_l13_n445(x)
+ if (x < 1)
+ fun_l14_n164(x)
+ else
+ fun_l14_n903(x)
+ end
+end
+
+def fun_l13_n446(x)
+ if (x < 1)
+ fun_l14_n474(x)
+ else
+ fun_l14_n137(x)
+ end
+end
+
+def fun_l13_n447(x)
+ if (x < 1)
+ fun_l14_n198(x)
+ else
+ fun_l14_n66(x)
+ end
+end
+
+def fun_l13_n448(x)
+ if (x < 1)
+ fun_l14_n948(x)
+ else
+ fun_l14_n682(x)
+ end
+end
+
+def fun_l13_n449(x)
+ if (x < 1)
+ fun_l14_n545(x)
+ else
+ fun_l14_n928(x)
+ end
+end
+
+def fun_l13_n450(x)
+ if (x < 1)
+ fun_l14_n822(x)
+ else
+ fun_l14_n846(x)
+ end
+end
+
+def fun_l13_n451(x)
+ if (x < 1)
+ fun_l14_n514(x)
+ else
+ fun_l14_n54(x)
+ end
+end
+
+def fun_l13_n452(x)
+ if (x < 1)
+ fun_l14_n539(x)
+ else
+ fun_l14_n199(x)
+ end
+end
+
+def fun_l13_n453(x)
+ if (x < 1)
+ fun_l14_n917(x)
+ else
+ fun_l14_n173(x)
+ end
+end
+
+def fun_l13_n454(x)
+ if (x < 1)
+ fun_l14_n924(x)
+ else
+ fun_l14_n51(x)
+ end
+end
+
+def fun_l13_n455(x)
+ if (x < 1)
+ fun_l14_n675(x)
+ else
+ fun_l14_n139(x)
+ end
+end
+
+def fun_l13_n456(x)
+ if (x < 1)
+ fun_l14_n335(x)
+ else
+ fun_l14_n138(x)
+ end
+end
+
+def fun_l13_n457(x)
+ if (x < 1)
+ fun_l14_n112(x)
+ else
+ fun_l14_n707(x)
+ end
+end
+
+def fun_l13_n458(x)
+ if (x < 1)
+ fun_l14_n784(x)
+ else
+ fun_l14_n278(x)
+ end
+end
+
+def fun_l13_n459(x)
+ if (x < 1)
+ fun_l14_n165(x)
+ else
+ fun_l14_n985(x)
+ end
+end
+
+def fun_l13_n460(x)
+ if (x < 1)
+ fun_l14_n843(x)
+ else
+ fun_l14_n262(x)
+ end
+end
+
+def fun_l13_n461(x)
+ if (x < 1)
+ fun_l14_n492(x)
+ else
+ fun_l14_n21(x)
+ end
+end
+
+def fun_l13_n462(x)
+ if (x < 1)
+ fun_l14_n864(x)
+ else
+ fun_l14_n248(x)
+ end
+end
+
+def fun_l13_n463(x)
+ if (x < 1)
+ fun_l14_n940(x)
+ else
+ fun_l14_n713(x)
+ end
+end
+
+def fun_l13_n464(x)
+ if (x < 1)
+ fun_l14_n8(x)
+ else
+ fun_l14_n771(x)
+ end
+end
+
+def fun_l13_n465(x)
+ if (x < 1)
+ fun_l14_n83(x)
+ else
+ fun_l14_n663(x)
+ end
+end
+
+def fun_l13_n466(x)
+ if (x < 1)
+ fun_l14_n411(x)
+ else
+ fun_l14_n570(x)
+ end
+end
+
+def fun_l13_n467(x)
+ if (x < 1)
+ fun_l14_n464(x)
+ else
+ fun_l14_n497(x)
+ end
+end
+
+def fun_l13_n468(x)
+ if (x < 1)
+ fun_l14_n49(x)
+ else
+ fun_l14_n153(x)
+ end
+end
+
+def fun_l13_n469(x)
+ if (x < 1)
+ fun_l14_n33(x)
+ else
+ fun_l14_n562(x)
+ end
+end
+
+def fun_l13_n470(x)
+ if (x < 1)
+ fun_l14_n207(x)
+ else
+ fun_l14_n328(x)
+ end
+end
+
+def fun_l13_n471(x)
+ if (x < 1)
+ fun_l14_n356(x)
+ else
+ fun_l14_n834(x)
+ end
+end
+
+def fun_l13_n472(x)
+ if (x < 1)
+ fun_l14_n46(x)
+ else
+ fun_l14_n842(x)
+ end
+end
+
+def fun_l13_n473(x)
+ if (x < 1)
+ fun_l14_n14(x)
+ else
+ fun_l14_n488(x)
+ end
+end
+
+def fun_l13_n474(x)
+ if (x < 1)
+ fun_l14_n307(x)
+ else
+ fun_l14_n647(x)
+ end
+end
+
+def fun_l13_n475(x)
+ if (x < 1)
+ fun_l14_n474(x)
+ else
+ fun_l14_n369(x)
+ end
+end
+
+def fun_l13_n476(x)
+ if (x < 1)
+ fun_l14_n471(x)
+ else
+ fun_l14_n956(x)
+ end
+end
+
+def fun_l13_n477(x)
+ if (x < 1)
+ fun_l14_n368(x)
+ else
+ fun_l14_n478(x)
+ end
+end
+
+def fun_l13_n478(x)
+ if (x < 1)
+ fun_l14_n377(x)
+ else
+ fun_l14_n675(x)
+ end
+end
+
+def fun_l13_n479(x)
+ if (x < 1)
+ fun_l14_n370(x)
+ else
+ fun_l14_n819(x)
+ end
+end
+
+def fun_l13_n480(x)
+ if (x < 1)
+ fun_l14_n459(x)
+ else
+ fun_l14_n59(x)
+ end
+end
+
+def fun_l13_n481(x)
+ if (x < 1)
+ fun_l14_n200(x)
+ else
+ fun_l14_n681(x)
+ end
+end
+
+def fun_l13_n482(x)
+ if (x < 1)
+ fun_l14_n893(x)
+ else
+ fun_l14_n518(x)
+ end
+end
+
+def fun_l13_n483(x)
+ if (x < 1)
+ fun_l14_n130(x)
+ else
+ fun_l14_n902(x)
+ end
+end
+
+def fun_l13_n484(x)
+ if (x < 1)
+ fun_l14_n598(x)
+ else
+ fun_l14_n533(x)
+ end
+end
+
+def fun_l13_n485(x)
+ if (x < 1)
+ fun_l14_n254(x)
+ else
+ fun_l14_n294(x)
+ end
+end
+
+def fun_l13_n486(x)
+ if (x < 1)
+ fun_l14_n608(x)
+ else
+ fun_l14_n858(x)
+ end
+end
+
+def fun_l13_n487(x)
+ if (x < 1)
+ fun_l14_n82(x)
+ else
+ fun_l14_n379(x)
+ end
+end
+
+def fun_l13_n488(x)
+ if (x < 1)
+ fun_l14_n605(x)
+ else
+ fun_l14_n530(x)
+ end
+end
+
+def fun_l13_n489(x)
+ if (x < 1)
+ fun_l14_n572(x)
+ else
+ fun_l14_n199(x)
+ end
+end
+
+def fun_l13_n490(x)
+ if (x < 1)
+ fun_l14_n3(x)
+ else
+ fun_l14_n103(x)
+ end
+end
+
+def fun_l13_n491(x)
+ if (x < 1)
+ fun_l14_n922(x)
+ else
+ fun_l14_n372(x)
+ end
+end
+
+def fun_l13_n492(x)
+ if (x < 1)
+ fun_l14_n306(x)
+ else
+ fun_l14_n378(x)
+ end
+end
+
+def fun_l13_n493(x)
+ if (x < 1)
+ fun_l14_n980(x)
+ else
+ fun_l14_n617(x)
+ end
+end
+
+def fun_l13_n494(x)
+ if (x < 1)
+ fun_l14_n127(x)
+ else
+ fun_l14_n348(x)
+ end
+end
+
+def fun_l13_n495(x)
+ if (x < 1)
+ fun_l14_n631(x)
+ else
+ fun_l14_n281(x)
+ end
+end
+
+def fun_l13_n496(x)
+ if (x < 1)
+ fun_l14_n552(x)
+ else
+ fun_l14_n493(x)
+ end
+end
+
+def fun_l13_n497(x)
+ if (x < 1)
+ fun_l14_n342(x)
+ else
+ fun_l14_n931(x)
+ end
+end
+
+def fun_l13_n498(x)
+ if (x < 1)
+ fun_l14_n297(x)
+ else
+ fun_l14_n512(x)
+ end
+end
+
+def fun_l13_n499(x)
+ if (x < 1)
+ fun_l14_n950(x)
+ else
+ fun_l14_n952(x)
+ end
+end
+
+def fun_l13_n500(x)
+ if (x < 1)
+ fun_l14_n355(x)
+ else
+ fun_l14_n383(x)
+ end
+end
+
+def fun_l13_n501(x)
+ if (x < 1)
+ fun_l14_n278(x)
+ else
+ fun_l14_n442(x)
+ end
+end
+
+def fun_l13_n502(x)
+ if (x < 1)
+ fun_l14_n16(x)
+ else
+ fun_l14_n150(x)
+ end
+end
+
+def fun_l13_n503(x)
+ if (x < 1)
+ fun_l14_n399(x)
+ else
+ fun_l14_n989(x)
+ end
+end
+
+def fun_l13_n504(x)
+ if (x < 1)
+ fun_l14_n289(x)
+ else
+ fun_l14_n925(x)
+ end
+end
+
+def fun_l13_n505(x)
+ if (x < 1)
+ fun_l14_n743(x)
+ else
+ fun_l14_n784(x)
+ end
+end
+
+def fun_l13_n506(x)
+ if (x < 1)
+ fun_l14_n916(x)
+ else
+ fun_l14_n111(x)
+ end
+end
+
+def fun_l13_n507(x)
+ if (x < 1)
+ fun_l14_n912(x)
+ else
+ fun_l14_n448(x)
+ end
+end
+
+def fun_l13_n508(x)
+ if (x < 1)
+ fun_l14_n10(x)
+ else
+ fun_l14_n451(x)
+ end
+end
+
+def fun_l13_n509(x)
+ if (x < 1)
+ fun_l14_n15(x)
+ else
+ fun_l14_n697(x)
+ end
+end
+
+def fun_l13_n510(x)
+ if (x < 1)
+ fun_l14_n565(x)
+ else
+ fun_l14_n511(x)
+ end
+end
+
+def fun_l13_n511(x)
+ if (x < 1)
+ fun_l14_n843(x)
+ else
+ fun_l14_n272(x)
+ end
+end
+
+def fun_l13_n512(x)
+ if (x < 1)
+ fun_l14_n70(x)
+ else
+ fun_l14_n333(x)
+ end
+end
+
+def fun_l13_n513(x)
+ if (x < 1)
+ fun_l14_n100(x)
+ else
+ fun_l14_n399(x)
+ end
+end
+
+def fun_l13_n514(x)
+ if (x < 1)
+ fun_l14_n678(x)
+ else
+ fun_l14_n247(x)
+ end
+end
+
+def fun_l13_n515(x)
+ if (x < 1)
+ fun_l14_n823(x)
+ else
+ fun_l14_n371(x)
+ end
+end
+
+def fun_l13_n516(x)
+ if (x < 1)
+ fun_l14_n994(x)
+ else
+ fun_l14_n322(x)
+ end
+end
+
+def fun_l13_n517(x)
+ if (x < 1)
+ fun_l14_n399(x)
+ else
+ fun_l14_n567(x)
+ end
+end
+
+def fun_l13_n518(x)
+ if (x < 1)
+ fun_l14_n898(x)
+ else
+ fun_l14_n59(x)
+ end
+end
+
+def fun_l13_n519(x)
+ if (x < 1)
+ fun_l14_n33(x)
+ else
+ fun_l14_n640(x)
+ end
+end
+
+def fun_l13_n520(x)
+ if (x < 1)
+ fun_l14_n475(x)
+ else
+ fun_l14_n67(x)
+ end
+end
+
+def fun_l13_n521(x)
+ if (x < 1)
+ fun_l14_n896(x)
+ else
+ fun_l14_n312(x)
+ end
+end
+
+def fun_l13_n522(x)
+ if (x < 1)
+ fun_l14_n454(x)
+ else
+ fun_l14_n520(x)
+ end
+end
+
+def fun_l13_n523(x)
+ if (x < 1)
+ fun_l14_n334(x)
+ else
+ fun_l14_n879(x)
+ end
+end
+
+def fun_l13_n524(x)
+ if (x < 1)
+ fun_l14_n267(x)
+ else
+ fun_l14_n526(x)
+ end
+end
+
+def fun_l13_n525(x)
+ if (x < 1)
+ fun_l14_n552(x)
+ else
+ fun_l14_n103(x)
+ end
+end
+
+def fun_l13_n526(x)
+ if (x < 1)
+ fun_l14_n224(x)
+ else
+ fun_l14_n211(x)
+ end
+end
+
+def fun_l13_n527(x)
+ if (x < 1)
+ fun_l14_n113(x)
+ else
+ fun_l14_n193(x)
+ end
+end
+
+def fun_l13_n528(x)
+ if (x < 1)
+ fun_l14_n389(x)
+ else
+ fun_l14_n332(x)
+ end
+end
+
+def fun_l13_n529(x)
+ if (x < 1)
+ fun_l14_n881(x)
+ else
+ fun_l14_n655(x)
+ end
+end
+
+def fun_l13_n530(x)
+ if (x < 1)
+ fun_l14_n857(x)
+ else
+ fun_l14_n588(x)
+ end
+end
+
+def fun_l13_n531(x)
+ if (x < 1)
+ fun_l14_n70(x)
+ else
+ fun_l14_n232(x)
+ end
+end
+
+def fun_l13_n532(x)
+ if (x < 1)
+ fun_l14_n617(x)
+ else
+ fun_l14_n477(x)
+ end
+end
+
+def fun_l13_n533(x)
+ if (x < 1)
+ fun_l14_n655(x)
+ else
+ fun_l14_n801(x)
+ end
+end
+
+def fun_l13_n534(x)
+ if (x < 1)
+ fun_l14_n665(x)
+ else
+ fun_l14_n22(x)
+ end
+end
+
+def fun_l13_n535(x)
+ if (x < 1)
+ fun_l14_n314(x)
+ else
+ fun_l14_n924(x)
+ end
+end
+
+def fun_l13_n536(x)
+ if (x < 1)
+ fun_l14_n619(x)
+ else
+ fun_l14_n455(x)
+ end
+end
+
+def fun_l13_n537(x)
+ if (x < 1)
+ fun_l14_n183(x)
+ else
+ fun_l14_n767(x)
+ end
+end
+
+def fun_l13_n538(x)
+ if (x < 1)
+ fun_l14_n862(x)
+ else
+ fun_l14_n352(x)
+ end
+end
+
+def fun_l13_n539(x)
+ if (x < 1)
+ fun_l14_n540(x)
+ else
+ fun_l14_n813(x)
+ end
+end
+
+def fun_l13_n540(x)
+ if (x < 1)
+ fun_l14_n429(x)
+ else
+ fun_l14_n515(x)
+ end
+end
+
+def fun_l13_n541(x)
+ if (x < 1)
+ fun_l14_n294(x)
+ else
+ fun_l14_n341(x)
+ end
+end
+
+def fun_l13_n542(x)
+ if (x < 1)
+ fun_l14_n910(x)
+ else
+ fun_l14_n882(x)
+ end
+end
+
+def fun_l13_n543(x)
+ if (x < 1)
+ fun_l14_n971(x)
+ else
+ fun_l14_n19(x)
+ end
+end
+
+def fun_l13_n544(x)
+ if (x < 1)
+ fun_l14_n344(x)
+ else
+ fun_l14_n419(x)
+ end
+end
+
+def fun_l13_n545(x)
+ if (x < 1)
+ fun_l14_n410(x)
+ else
+ fun_l14_n996(x)
+ end
+end
+
+def fun_l13_n546(x)
+ if (x < 1)
+ fun_l14_n857(x)
+ else
+ fun_l14_n431(x)
+ end
+end
+
+def fun_l13_n547(x)
+ if (x < 1)
+ fun_l14_n548(x)
+ else
+ fun_l14_n934(x)
+ end
+end
+
+def fun_l13_n548(x)
+ if (x < 1)
+ fun_l14_n420(x)
+ else
+ fun_l14_n506(x)
+ end
+end
+
+def fun_l13_n549(x)
+ if (x < 1)
+ fun_l14_n992(x)
+ else
+ fun_l14_n213(x)
+ end
+end
+
+def fun_l13_n550(x)
+ if (x < 1)
+ fun_l14_n754(x)
+ else
+ fun_l14_n666(x)
+ end
+end
+
+def fun_l13_n551(x)
+ if (x < 1)
+ fun_l14_n412(x)
+ else
+ fun_l14_n908(x)
+ end
+end
+
+def fun_l13_n552(x)
+ if (x < 1)
+ fun_l14_n708(x)
+ else
+ fun_l14_n308(x)
+ end
+end
+
+def fun_l13_n553(x)
+ if (x < 1)
+ fun_l14_n797(x)
+ else
+ fun_l14_n622(x)
+ end
+end
+
+def fun_l13_n554(x)
+ if (x < 1)
+ fun_l14_n26(x)
+ else
+ fun_l14_n102(x)
+ end
+end
+
+def fun_l13_n555(x)
+ if (x < 1)
+ fun_l14_n614(x)
+ else
+ fun_l14_n110(x)
+ end
+end
+
+def fun_l13_n556(x)
+ if (x < 1)
+ fun_l14_n368(x)
+ else
+ fun_l14_n718(x)
+ end
+end
+
+def fun_l13_n557(x)
+ if (x < 1)
+ fun_l14_n782(x)
+ else
+ fun_l14_n659(x)
+ end
+end
+
+def fun_l13_n558(x)
+ if (x < 1)
+ fun_l14_n544(x)
+ else
+ fun_l14_n507(x)
+ end
+end
+
+def fun_l13_n559(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n97(x)
+ end
+end
+
+def fun_l13_n560(x)
+ if (x < 1)
+ fun_l14_n390(x)
+ else
+ fun_l14_n93(x)
+ end
+end
+
+def fun_l13_n561(x)
+ if (x < 1)
+ fun_l14_n28(x)
+ else
+ fun_l14_n267(x)
+ end
+end
+
+def fun_l13_n562(x)
+ if (x < 1)
+ fun_l14_n10(x)
+ else
+ fun_l14_n990(x)
+ end
+end
+
+def fun_l13_n563(x)
+ if (x < 1)
+ fun_l14_n428(x)
+ else
+ fun_l14_n878(x)
+ end
+end
+
+def fun_l13_n564(x)
+ if (x < 1)
+ fun_l14_n587(x)
+ else
+ fun_l14_n724(x)
+ end
+end
+
+def fun_l13_n565(x)
+ if (x < 1)
+ fun_l14_n524(x)
+ else
+ fun_l14_n87(x)
+ end
+end
+
+def fun_l13_n566(x)
+ if (x < 1)
+ fun_l14_n213(x)
+ else
+ fun_l14_n718(x)
+ end
+end
+
+def fun_l13_n567(x)
+ if (x < 1)
+ fun_l14_n821(x)
+ else
+ fun_l14_n478(x)
+ end
+end
+
+def fun_l13_n568(x)
+ if (x < 1)
+ fun_l14_n580(x)
+ else
+ fun_l14_n731(x)
+ end
+end
+
+def fun_l13_n569(x)
+ if (x < 1)
+ fun_l14_n673(x)
+ else
+ fun_l14_n780(x)
+ end
+end
+
+def fun_l13_n570(x)
+ if (x < 1)
+ fun_l14_n791(x)
+ else
+ fun_l14_n691(x)
+ end
+end
+
+def fun_l13_n571(x)
+ if (x < 1)
+ fun_l14_n192(x)
+ else
+ fun_l14_n712(x)
+ end
+end
+
+def fun_l13_n572(x)
+ if (x < 1)
+ fun_l14_n201(x)
+ else
+ fun_l14_n732(x)
+ end
+end
+
+def fun_l13_n573(x)
+ if (x < 1)
+ fun_l14_n180(x)
+ else
+ fun_l14_n260(x)
+ end
+end
+
+def fun_l13_n574(x)
+ if (x < 1)
+ fun_l14_n609(x)
+ else
+ fun_l14_n110(x)
+ end
+end
+
+def fun_l13_n575(x)
+ if (x < 1)
+ fun_l14_n993(x)
+ else
+ fun_l14_n510(x)
+ end
+end
+
+def fun_l13_n576(x)
+ if (x < 1)
+ fun_l14_n318(x)
+ else
+ fun_l14_n915(x)
+ end
+end
+
+def fun_l13_n577(x)
+ if (x < 1)
+ fun_l14_n635(x)
+ else
+ fun_l14_n21(x)
+ end
+end
+
+def fun_l13_n578(x)
+ if (x < 1)
+ fun_l14_n330(x)
+ else
+ fun_l14_n860(x)
+ end
+end
+
+def fun_l13_n579(x)
+ if (x < 1)
+ fun_l14_n24(x)
+ else
+ fun_l14_n87(x)
+ end
+end
+
+def fun_l13_n580(x)
+ if (x < 1)
+ fun_l14_n404(x)
+ else
+ fun_l14_n530(x)
+ end
+end
+
+def fun_l13_n581(x)
+ if (x < 1)
+ fun_l14_n831(x)
+ else
+ fun_l14_n384(x)
+ end
+end
+
+def fun_l13_n582(x)
+ if (x < 1)
+ fun_l14_n272(x)
+ else
+ fun_l14_n438(x)
+ end
+end
+
+def fun_l13_n583(x)
+ if (x < 1)
+ fun_l14_n297(x)
+ else
+ fun_l14_n414(x)
+ end
+end
+
+def fun_l13_n584(x)
+ if (x < 1)
+ fun_l14_n38(x)
+ else
+ fun_l14_n676(x)
+ end
+end
+
+def fun_l13_n585(x)
+ if (x < 1)
+ fun_l14_n104(x)
+ else
+ fun_l14_n566(x)
+ end
+end
+
+def fun_l13_n586(x)
+ if (x < 1)
+ fun_l14_n322(x)
+ else
+ fun_l14_n601(x)
+ end
+end
+
+def fun_l13_n587(x)
+ if (x < 1)
+ fun_l14_n20(x)
+ else
+ fun_l14_n242(x)
+ end
+end
+
+def fun_l13_n588(x)
+ if (x < 1)
+ fun_l14_n291(x)
+ else
+ fun_l14_n744(x)
+ end
+end
+
+def fun_l13_n589(x)
+ if (x < 1)
+ fun_l14_n702(x)
+ else
+ fun_l14_n456(x)
+ end
+end
+
+def fun_l13_n590(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n493(x)
+ end
+end
+
+def fun_l13_n591(x)
+ if (x < 1)
+ fun_l14_n51(x)
+ else
+ fun_l14_n193(x)
+ end
+end
+
+def fun_l13_n592(x)
+ if (x < 1)
+ fun_l14_n512(x)
+ else
+ fun_l14_n382(x)
+ end
+end
+
+def fun_l13_n593(x)
+ if (x < 1)
+ fun_l14_n550(x)
+ else
+ fun_l14_n711(x)
+ end
+end
+
+def fun_l13_n594(x)
+ if (x < 1)
+ fun_l14_n586(x)
+ else
+ fun_l14_n130(x)
+ end
+end
+
+def fun_l13_n595(x)
+ if (x < 1)
+ fun_l14_n348(x)
+ else
+ fun_l14_n214(x)
+ end
+end
+
+def fun_l13_n596(x)
+ if (x < 1)
+ fun_l14_n193(x)
+ else
+ fun_l14_n490(x)
+ end
+end
+
+def fun_l13_n597(x)
+ if (x < 1)
+ fun_l14_n736(x)
+ else
+ fun_l14_n824(x)
+ end
+end
+
+def fun_l13_n598(x)
+ if (x < 1)
+ fun_l14_n555(x)
+ else
+ fun_l14_n546(x)
+ end
+end
+
+def fun_l13_n599(x)
+ if (x < 1)
+ fun_l14_n244(x)
+ else
+ fun_l14_n903(x)
+ end
+end
+
+def fun_l13_n600(x)
+ if (x < 1)
+ fun_l14_n786(x)
+ else
+ fun_l14_n817(x)
+ end
+end
+
+def fun_l13_n601(x)
+ if (x < 1)
+ fun_l14_n991(x)
+ else
+ fun_l14_n691(x)
+ end
+end
+
+def fun_l13_n602(x)
+ if (x < 1)
+ fun_l14_n369(x)
+ else
+ fun_l14_n85(x)
+ end
+end
+
+def fun_l13_n603(x)
+ if (x < 1)
+ fun_l14_n232(x)
+ else
+ fun_l14_n287(x)
+ end
+end
+
+def fun_l13_n604(x)
+ if (x < 1)
+ fun_l14_n397(x)
+ else
+ fun_l14_n59(x)
+ end
+end
+
+def fun_l13_n605(x)
+ if (x < 1)
+ fun_l14_n394(x)
+ else
+ fun_l14_n297(x)
+ end
+end
+
+def fun_l13_n606(x)
+ if (x < 1)
+ fun_l14_n676(x)
+ else
+ fun_l14_n444(x)
+ end
+end
+
+def fun_l13_n607(x)
+ if (x < 1)
+ fun_l14_n894(x)
+ else
+ fun_l14_n147(x)
+ end
+end
+
+def fun_l13_n608(x)
+ if (x < 1)
+ fun_l14_n593(x)
+ else
+ fun_l14_n880(x)
+ end
+end
+
+def fun_l13_n609(x)
+ if (x < 1)
+ fun_l14_n306(x)
+ else
+ fun_l14_n610(x)
+ end
+end
+
+def fun_l13_n610(x)
+ if (x < 1)
+ fun_l14_n884(x)
+ else
+ fun_l14_n202(x)
+ end
+end
+
+def fun_l13_n611(x)
+ if (x < 1)
+ fun_l14_n763(x)
+ else
+ fun_l14_n592(x)
+ end
+end
+
+def fun_l13_n612(x)
+ if (x < 1)
+ fun_l14_n477(x)
+ else
+ fun_l14_n614(x)
+ end
+end
+
+def fun_l13_n613(x)
+ if (x < 1)
+ fun_l14_n372(x)
+ else
+ fun_l14_n330(x)
+ end
+end
+
+def fun_l13_n614(x)
+ if (x < 1)
+ fun_l14_n767(x)
+ else
+ fun_l14_n277(x)
+ end
+end
+
+def fun_l13_n615(x)
+ if (x < 1)
+ fun_l14_n530(x)
+ else
+ fun_l14_n24(x)
+ end
+end
+
+def fun_l13_n616(x)
+ if (x < 1)
+ fun_l14_n657(x)
+ else
+ fun_l14_n709(x)
+ end
+end
+
+def fun_l13_n617(x)
+ if (x < 1)
+ fun_l14_n559(x)
+ else
+ fun_l14_n125(x)
+ end
+end
+
+def fun_l13_n618(x)
+ if (x < 1)
+ fun_l14_n855(x)
+ else
+ fun_l14_n353(x)
+ end
+end
+
+def fun_l13_n619(x)
+ if (x < 1)
+ fun_l14_n635(x)
+ else
+ fun_l14_n907(x)
+ end
+end
+
+def fun_l13_n620(x)
+ if (x < 1)
+ fun_l14_n229(x)
+ else
+ fun_l14_n7(x)
+ end
+end
+
+def fun_l13_n621(x)
+ if (x < 1)
+ fun_l14_n568(x)
+ else
+ fun_l14_n393(x)
+ end
+end
+
+def fun_l13_n622(x)
+ if (x < 1)
+ fun_l14_n153(x)
+ else
+ fun_l14_n641(x)
+ end
+end
+
+def fun_l13_n623(x)
+ if (x < 1)
+ fun_l14_n249(x)
+ else
+ fun_l14_n139(x)
+ end
+end
+
+def fun_l13_n624(x)
+ if (x < 1)
+ fun_l14_n961(x)
+ else
+ fun_l14_n897(x)
+ end
+end
+
+def fun_l13_n625(x)
+ if (x < 1)
+ fun_l14_n535(x)
+ else
+ fun_l14_n252(x)
+ end
+end
+
+def fun_l13_n626(x)
+ if (x < 1)
+ fun_l14_n832(x)
+ else
+ fun_l14_n995(x)
+ end
+end
+
+def fun_l13_n627(x)
+ if (x < 1)
+ fun_l14_n896(x)
+ else
+ fun_l14_n173(x)
+ end
+end
+
+def fun_l13_n628(x)
+ if (x < 1)
+ fun_l14_n939(x)
+ else
+ fun_l14_n852(x)
+ end
+end
+
+def fun_l13_n629(x)
+ if (x < 1)
+ fun_l14_n424(x)
+ else
+ fun_l14_n161(x)
+ end
+end
+
+def fun_l13_n630(x)
+ if (x < 1)
+ fun_l14_n822(x)
+ else
+ fun_l14_n523(x)
+ end
+end
+
+def fun_l13_n631(x)
+ if (x < 1)
+ fun_l14_n697(x)
+ else
+ fun_l14_n939(x)
+ end
+end
+
+def fun_l13_n632(x)
+ if (x < 1)
+ fun_l14_n831(x)
+ else
+ fun_l14_n722(x)
+ end
+end
+
+def fun_l13_n633(x)
+ if (x < 1)
+ fun_l14_n837(x)
+ else
+ fun_l14_n994(x)
+ end
+end
+
+def fun_l13_n634(x)
+ if (x < 1)
+ fun_l14_n568(x)
+ else
+ fun_l14_n636(x)
+ end
+end
+
+def fun_l13_n635(x)
+ if (x < 1)
+ fun_l14_n573(x)
+ else
+ fun_l14_n156(x)
+ end
+end
+
+def fun_l13_n636(x)
+ if (x < 1)
+ fun_l14_n682(x)
+ else
+ fun_l14_n999(x)
+ end
+end
+
+def fun_l13_n637(x)
+ if (x < 1)
+ fun_l14_n648(x)
+ else
+ fun_l14_n567(x)
+ end
+end
+
+def fun_l13_n638(x)
+ if (x < 1)
+ fun_l14_n395(x)
+ else
+ fun_l14_n837(x)
+ end
+end
+
+def fun_l13_n639(x)
+ if (x < 1)
+ fun_l14_n294(x)
+ else
+ fun_l14_n508(x)
+ end
+end
+
+def fun_l13_n640(x)
+ if (x < 1)
+ fun_l14_n530(x)
+ else
+ fun_l14_n542(x)
+ end
+end
+
+def fun_l13_n641(x)
+ if (x < 1)
+ fun_l14_n227(x)
+ else
+ fun_l14_n939(x)
+ end
+end
+
+def fun_l13_n642(x)
+ if (x < 1)
+ fun_l14_n415(x)
+ else
+ fun_l14_n79(x)
+ end
+end
+
+def fun_l13_n643(x)
+ if (x < 1)
+ fun_l14_n354(x)
+ else
+ fun_l14_n606(x)
+ end
+end
+
+def fun_l13_n644(x)
+ if (x < 1)
+ fun_l14_n270(x)
+ else
+ fun_l14_n644(x)
+ end
+end
+
+def fun_l13_n645(x)
+ if (x < 1)
+ fun_l14_n345(x)
+ else
+ fun_l14_n299(x)
+ end
+end
+
+def fun_l13_n646(x)
+ if (x < 1)
+ fun_l14_n384(x)
+ else
+ fun_l14_n97(x)
+ end
+end
+
+def fun_l13_n647(x)
+ if (x < 1)
+ fun_l14_n86(x)
+ else
+ fun_l14_n103(x)
+ end
+end
+
+def fun_l13_n648(x)
+ if (x < 1)
+ fun_l14_n765(x)
+ else
+ fun_l14_n498(x)
+ end
+end
+
+def fun_l13_n649(x)
+ if (x < 1)
+ fun_l14_n135(x)
+ else
+ fun_l14_n993(x)
+ end
+end
+
+def fun_l13_n650(x)
+ if (x < 1)
+ fun_l14_n837(x)
+ else
+ fun_l14_n576(x)
+ end
+end
+
+def fun_l13_n651(x)
+ if (x < 1)
+ fun_l14_n75(x)
+ else
+ fun_l14_n351(x)
+ end
+end
+
+def fun_l13_n652(x)
+ if (x < 1)
+ fun_l14_n932(x)
+ else
+ fun_l14_n646(x)
+ end
+end
+
+def fun_l13_n653(x)
+ if (x < 1)
+ fun_l14_n908(x)
+ else
+ fun_l14_n384(x)
+ end
+end
+
+def fun_l13_n654(x)
+ if (x < 1)
+ fun_l14_n540(x)
+ else
+ fun_l14_n946(x)
+ end
+end
+
+def fun_l13_n655(x)
+ if (x < 1)
+ fun_l14_n686(x)
+ else
+ fun_l14_n926(x)
+ end
+end
+
+def fun_l13_n656(x)
+ if (x < 1)
+ fun_l14_n567(x)
+ else
+ fun_l14_n815(x)
+ end
+end
+
+def fun_l13_n657(x)
+ if (x < 1)
+ fun_l14_n101(x)
+ else
+ fun_l14_n960(x)
+ end
+end
+
+def fun_l13_n658(x)
+ if (x < 1)
+ fun_l14_n956(x)
+ else
+ fun_l14_n980(x)
+ end
+end
+
+def fun_l13_n659(x)
+ if (x < 1)
+ fun_l14_n196(x)
+ else
+ fun_l14_n632(x)
+ end
+end
+
+def fun_l13_n660(x)
+ if (x < 1)
+ fun_l14_n83(x)
+ else
+ fun_l14_n288(x)
+ end
+end
+
+def fun_l13_n661(x)
+ if (x < 1)
+ fun_l14_n907(x)
+ else
+ fun_l14_n719(x)
+ end
+end
+
+def fun_l13_n662(x)
+ if (x < 1)
+ fun_l14_n922(x)
+ else
+ fun_l14_n186(x)
+ end
+end
+
+def fun_l13_n663(x)
+ if (x < 1)
+ fun_l14_n439(x)
+ else
+ fun_l14_n890(x)
+ end
+end
+
+def fun_l13_n664(x)
+ if (x < 1)
+ fun_l14_n310(x)
+ else
+ fun_l14_n534(x)
+ end
+end
+
+def fun_l13_n665(x)
+ if (x < 1)
+ fun_l14_n584(x)
+ else
+ fun_l14_n322(x)
+ end
+end
+
+def fun_l13_n666(x)
+ if (x < 1)
+ fun_l14_n385(x)
+ else
+ fun_l14_n466(x)
+ end
+end
+
+def fun_l13_n667(x)
+ if (x < 1)
+ fun_l14_n387(x)
+ else
+ fun_l14_n284(x)
+ end
+end
+
+def fun_l13_n668(x)
+ if (x < 1)
+ fun_l14_n834(x)
+ else
+ fun_l14_n446(x)
+ end
+end
+
+def fun_l13_n669(x)
+ if (x < 1)
+ fun_l14_n839(x)
+ else
+ fun_l14_n820(x)
+ end
+end
+
+def fun_l13_n670(x)
+ if (x < 1)
+ fun_l14_n666(x)
+ else
+ fun_l14_n690(x)
+ end
+end
+
+def fun_l13_n671(x)
+ if (x < 1)
+ fun_l14_n640(x)
+ else
+ fun_l14_n83(x)
+ end
+end
+
+def fun_l13_n672(x)
+ if (x < 1)
+ fun_l14_n663(x)
+ else
+ fun_l14_n332(x)
+ end
+end
+
+def fun_l13_n673(x)
+ if (x < 1)
+ fun_l14_n776(x)
+ else
+ fun_l14_n818(x)
+ end
+end
+
+def fun_l13_n674(x)
+ if (x < 1)
+ fun_l14_n82(x)
+ else
+ fun_l14_n594(x)
+ end
+end
+
+def fun_l13_n675(x)
+ if (x < 1)
+ fun_l14_n491(x)
+ else
+ fun_l14_n0(x)
+ end
+end
+
+def fun_l13_n676(x)
+ if (x < 1)
+ fun_l14_n963(x)
+ else
+ fun_l14_n634(x)
+ end
+end
+
+def fun_l13_n677(x)
+ if (x < 1)
+ fun_l14_n716(x)
+ else
+ fun_l14_n99(x)
+ end
+end
+
+def fun_l13_n678(x)
+ if (x < 1)
+ fun_l14_n997(x)
+ else
+ fun_l14_n933(x)
+ end
+end
+
+def fun_l13_n679(x)
+ if (x < 1)
+ fun_l14_n171(x)
+ else
+ fun_l14_n356(x)
+ end
+end
+
+def fun_l13_n680(x)
+ if (x < 1)
+ fun_l14_n214(x)
+ else
+ fun_l14_n360(x)
+ end
+end
+
+def fun_l13_n681(x)
+ if (x < 1)
+ fun_l14_n758(x)
+ else
+ fun_l14_n185(x)
+ end
+end
+
+def fun_l13_n682(x)
+ if (x < 1)
+ fun_l14_n480(x)
+ else
+ fun_l14_n572(x)
+ end
+end
+
+def fun_l13_n683(x)
+ if (x < 1)
+ fun_l14_n595(x)
+ else
+ fun_l14_n534(x)
+ end
+end
+
+def fun_l13_n684(x)
+ if (x < 1)
+ fun_l14_n462(x)
+ else
+ fun_l14_n481(x)
+ end
+end
+
+def fun_l13_n685(x)
+ if (x < 1)
+ fun_l14_n946(x)
+ else
+ fun_l14_n726(x)
+ end
+end
+
+def fun_l13_n686(x)
+ if (x < 1)
+ fun_l14_n428(x)
+ else
+ fun_l14_n256(x)
+ end
+end
+
+def fun_l13_n687(x)
+ if (x < 1)
+ fun_l14_n562(x)
+ else
+ fun_l14_n290(x)
+ end
+end
+
+def fun_l13_n688(x)
+ if (x < 1)
+ fun_l14_n679(x)
+ else
+ fun_l14_n787(x)
+ end
+end
+
+def fun_l13_n689(x)
+ if (x < 1)
+ fun_l14_n972(x)
+ else
+ fun_l14_n809(x)
+ end
+end
+
+def fun_l13_n690(x)
+ if (x < 1)
+ fun_l14_n700(x)
+ else
+ fun_l14_n239(x)
+ end
+end
+
+def fun_l13_n691(x)
+ if (x < 1)
+ fun_l14_n525(x)
+ else
+ fun_l14_n251(x)
+ end
+end
+
+def fun_l13_n692(x)
+ if (x < 1)
+ fun_l14_n4(x)
+ else
+ fun_l14_n889(x)
+ end
+end
+
+def fun_l13_n693(x)
+ if (x < 1)
+ fun_l14_n362(x)
+ else
+ fun_l14_n495(x)
+ end
+end
+
+def fun_l13_n694(x)
+ if (x < 1)
+ fun_l14_n466(x)
+ else
+ fun_l14_n820(x)
+ end
+end
+
+def fun_l13_n695(x)
+ if (x < 1)
+ fun_l14_n244(x)
+ else
+ fun_l14_n233(x)
+ end
+end
+
+def fun_l13_n696(x)
+ if (x < 1)
+ fun_l14_n920(x)
+ else
+ fun_l14_n124(x)
+ end
+end
+
+def fun_l13_n697(x)
+ if (x < 1)
+ fun_l14_n926(x)
+ else
+ fun_l14_n417(x)
+ end
+end
+
+def fun_l13_n698(x)
+ if (x < 1)
+ fun_l14_n756(x)
+ else
+ fun_l14_n683(x)
+ end
+end
+
+def fun_l13_n699(x)
+ if (x < 1)
+ fun_l14_n487(x)
+ else
+ fun_l14_n191(x)
+ end
+end
+
+def fun_l13_n700(x)
+ if (x < 1)
+ fun_l14_n316(x)
+ else
+ fun_l14_n123(x)
+ end
+end
+
+def fun_l13_n701(x)
+ if (x < 1)
+ fun_l14_n851(x)
+ else
+ fun_l14_n695(x)
+ end
+end
+
+def fun_l13_n702(x)
+ if (x < 1)
+ fun_l14_n766(x)
+ else
+ fun_l14_n603(x)
+ end
+end
+
+def fun_l13_n703(x)
+ if (x < 1)
+ fun_l14_n689(x)
+ else
+ fun_l14_n524(x)
+ end
+end
+
+def fun_l13_n704(x)
+ if (x < 1)
+ fun_l14_n23(x)
+ else
+ fun_l14_n866(x)
+ end
+end
+
+def fun_l13_n705(x)
+ if (x < 1)
+ fun_l14_n62(x)
+ else
+ fun_l14_n926(x)
+ end
+end
+
+def fun_l13_n706(x)
+ if (x < 1)
+ fun_l14_n53(x)
+ else
+ fun_l14_n567(x)
+ end
+end
+
+def fun_l13_n707(x)
+ if (x < 1)
+ fun_l14_n756(x)
+ else
+ fun_l14_n595(x)
+ end
+end
+
+def fun_l13_n708(x)
+ if (x < 1)
+ fun_l14_n495(x)
+ else
+ fun_l14_n698(x)
+ end
+end
+
+def fun_l13_n709(x)
+ if (x < 1)
+ fun_l14_n511(x)
+ else
+ fun_l14_n131(x)
+ end
+end
+
+def fun_l13_n710(x)
+ if (x < 1)
+ fun_l14_n593(x)
+ else
+ fun_l14_n233(x)
+ end
+end
+
+def fun_l13_n711(x)
+ if (x < 1)
+ fun_l14_n846(x)
+ else
+ fun_l14_n166(x)
+ end
+end
+
+def fun_l13_n712(x)
+ if (x < 1)
+ fun_l14_n759(x)
+ else
+ fun_l14_n103(x)
+ end
+end
+
+def fun_l13_n713(x)
+ if (x < 1)
+ fun_l14_n364(x)
+ else
+ fun_l14_n805(x)
+ end
+end
+
+def fun_l13_n714(x)
+ if (x < 1)
+ fun_l14_n957(x)
+ else
+ fun_l14_n85(x)
+ end
+end
+
+def fun_l13_n715(x)
+ if (x < 1)
+ fun_l14_n877(x)
+ else
+ fun_l14_n111(x)
+ end
+end
+
+def fun_l13_n716(x)
+ if (x < 1)
+ fun_l14_n290(x)
+ else
+ fun_l14_n894(x)
+ end
+end
+
+def fun_l13_n717(x)
+ if (x < 1)
+ fun_l14_n354(x)
+ else
+ fun_l14_n646(x)
+ end
+end
+
+def fun_l13_n718(x)
+ if (x < 1)
+ fun_l14_n364(x)
+ else
+ fun_l14_n810(x)
+ end
+end
+
+def fun_l13_n719(x)
+ if (x < 1)
+ fun_l14_n392(x)
+ else
+ fun_l14_n537(x)
+ end
+end
+
+def fun_l13_n720(x)
+ if (x < 1)
+ fun_l14_n546(x)
+ else
+ fun_l14_n681(x)
+ end
+end
+
+def fun_l13_n721(x)
+ if (x < 1)
+ fun_l14_n153(x)
+ else
+ fun_l14_n925(x)
+ end
+end
+
+def fun_l13_n722(x)
+ if (x < 1)
+ fun_l14_n107(x)
+ else
+ fun_l14_n482(x)
+ end
+end
+
+def fun_l13_n723(x)
+ if (x < 1)
+ fun_l14_n981(x)
+ else
+ fun_l14_n364(x)
+ end
+end
+
+def fun_l13_n724(x)
+ if (x < 1)
+ fun_l14_n869(x)
+ else
+ fun_l14_n871(x)
+ end
+end
+
+def fun_l13_n725(x)
+ if (x < 1)
+ fun_l14_n693(x)
+ else
+ fun_l14_n690(x)
+ end
+end
+
+def fun_l13_n726(x)
+ if (x < 1)
+ fun_l14_n587(x)
+ else
+ fun_l14_n654(x)
+ end
+end
+
+def fun_l13_n727(x)
+ if (x < 1)
+ fun_l14_n150(x)
+ else
+ fun_l14_n904(x)
+ end
+end
+
+def fun_l13_n728(x)
+ if (x < 1)
+ fun_l14_n843(x)
+ else
+ fun_l14_n556(x)
+ end
+end
+
+def fun_l13_n729(x)
+ if (x < 1)
+ fun_l14_n726(x)
+ else
+ fun_l14_n114(x)
+ end
+end
+
+def fun_l13_n730(x)
+ if (x < 1)
+ fun_l14_n976(x)
+ else
+ fun_l14_n740(x)
+ end
+end
+
+def fun_l13_n731(x)
+ if (x < 1)
+ fun_l14_n709(x)
+ else
+ fun_l14_n293(x)
+ end
+end
+
+def fun_l13_n732(x)
+ if (x < 1)
+ fun_l14_n858(x)
+ else
+ fun_l14_n530(x)
+ end
+end
+
+def fun_l13_n733(x)
+ if (x < 1)
+ fun_l14_n789(x)
+ else
+ fun_l14_n475(x)
+ end
+end
+
+def fun_l13_n734(x)
+ if (x < 1)
+ fun_l14_n813(x)
+ else
+ fun_l14_n359(x)
+ end
+end
+
+def fun_l13_n735(x)
+ if (x < 1)
+ fun_l14_n209(x)
+ else
+ fun_l14_n29(x)
+ end
+end
+
+def fun_l13_n736(x)
+ if (x < 1)
+ fun_l14_n710(x)
+ else
+ fun_l14_n823(x)
+ end
+end
+
+def fun_l13_n737(x)
+ if (x < 1)
+ fun_l14_n434(x)
+ else
+ fun_l14_n864(x)
+ end
+end
+
+def fun_l13_n738(x)
+ if (x < 1)
+ fun_l14_n184(x)
+ else
+ fun_l14_n902(x)
+ end
+end
+
+def fun_l13_n739(x)
+ if (x < 1)
+ fun_l14_n206(x)
+ else
+ fun_l14_n65(x)
+ end
+end
+
+def fun_l13_n740(x)
+ if (x < 1)
+ fun_l14_n670(x)
+ else
+ fun_l14_n956(x)
+ end
+end
+
+def fun_l13_n741(x)
+ if (x < 1)
+ fun_l14_n91(x)
+ else
+ fun_l14_n341(x)
+ end
+end
+
+def fun_l13_n742(x)
+ if (x < 1)
+ fun_l14_n864(x)
+ else
+ fun_l14_n864(x)
+ end
+end
+
+def fun_l13_n743(x)
+ if (x < 1)
+ fun_l14_n426(x)
+ else
+ fun_l14_n302(x)
+ end
+end
+
+def fun_l13_n744(x)
+ if (x < 1)
+ fun_l14_n241(x)
+ else
+ fun_l14_n151(x)
+ end
+end
+
+def fun_l13_n745(x)
+ if (x < 1)
+ fun_l14_n161(x)
+ else
+ fun_l14_n715(x)
+ end
+end
+
+def fun_l13_n746(x)
+ if (x < 1)
+ fun_l14_n925(x)
+ else
+ fun_l14_n840(x)
+ end
+end
+
+def fun_l13_n747(x)
+ if (x < 1)
+ fun_l14_n864(x)
+ else
+ fun_l14_n610(x)
+ end
+end
+
+def fun_l13_n748(x)
+ if (x < 1)
+ fun_l14_n322(x)
+ else
+ fun_l14_n69(x)
+ end
+end
+
+def fun_l13_n749(x)
+ if (x < 1)
+ fun_l14_n847(x)
+ else
+ fun_l14_n3(x)
+ end
+end
+
+def fun_l13_n750(x)
+ if (x < 1)
+ fun_l14_n124(x)
+ else
+ fun_l14_n915(x)
+ end
+end
+
+def fun_l13_n751(x)
+ if (x < 1)
+ fun_l14_n163(x)
+ else
+ fun_l14_n136(x)
+ end
+end
+
+def fun_l13_n752(x)
+ if (x < 1)
+ fun_l14_n525(x)
+ else
+ fun_l14_n197(x)
+ end
+end
+
+def fun_l13_n753(x)
+ if (x < 1)
+ fun_l14_n109(x)
+ else
+ fun_l14_n208(x)
+ end
+end
+
+def fun_l13_n754(x)
+ if (x < 1)
+ fun_l14_n597(x)
+ else
+ fun_l14_n307(x)
+ end
+end
+
+def fun_l13_n755(x)
+ if (x < 1)
+ fun_l14_n36(x)
+ else
+ fun_l14_n948(x)
+ end
+end
+
+def fun_l13_n756(x)
+ if (x < 1)
+ fun_l14_n236(x)
+ else
+ fun_l14_n716(x)
+ end
+end
+
+def fun_l13_n757(x)
+ if (x < 1)
+ fun_l14_n326(x)
+ else
+ fun_l14_n870(x)
+ end
+end
+
+def fun_l13_n758(x)
+ if (x < 1)
+ fun_l14_n333(x)
+ else
+ fun_l14_n224(x)
+ end
+end
+
+def fun_l13_n759(x)
+ if (x < 1)
+ fun_l14_n141(x)
+ else
+ fun_l14_n232(x)
+ end
+end
+
+def fun_l13_n760(x)
+ if (x < 1)
+ fun_l14_n653(x)
+ else
+ fun_l14_n559(x)
+ end
+end
+
+def fun_l13_n761(x)
+ if (x < 1)
+ fun_l14_n305(x)
+ else
+ fun_l14_n296(x)
+ end
+end
+
+def fun_l13_n762(x)
+ if (x < 1)
+ fun_l14_n318(x)
+ else
+ fun_l14_n351(x)
+ end
+end
+
+def fun_l13_n763(x)
+ if (x < 1)
+ fun_l14_n685(x)
+ else
+ fun_l14_n643(x)
+ end
+end
+
+def fun_l13_n764(x)
+ if (x < 1)
+ fun_l14_n180(x)
+ else
+ fun_l14_n348(x)
+ end
+end
+
+def fun_l13_n765(x)
+ if (x < 1)
+ fun_l14_n72(x)
+ else
+ fun_l14_n99(x)
+ end
+end
+
+def fun_l13_n766(x)
+ if (x < 1)
+ fun_l14_n463(x)
+ else
+ fun_l14_n135(x)
+ end
+end
+
+def fun_l13_n767(x)
+ if (x < 1)
+ fun_l14_n461(x)
+ else
+ fun_l14_n989(x)
+ end
+end
+
+def fun_l13_n768(x)
+ if (x < 1)
+ fun_l14_n759(x)
+ else
+ fun_l14_n907(x)
+ end
+end
+
+def fun_l13_n769(x)
+ if (x < 1)
+ fun_l14_n330(x)
+ else
+ fun_l14_n268(x)
+ end
+end
+
+def fun_l13_n770(x)
+ if (x < 1)
+ fun_l14_n809(x)
+ else
+ fun_l14_n46(x)
+ end
+end
+
+def fun_l13_n771(x)
+ if (x < 1)
+ fun_l14_n396(x)
+ else
+ fun_l14_n114(x)
+ end
+end
+
+def fun_l13_n772(x)
+ if (x < 1)
+ fun_l14_n300(x)
+ else
+ fun_l14_n60(x)
+ end
+end
+
+def fun_l13_n773(x)
+ if (x < 1)
+ fun_l14_n938(x)
+ else
+ fun_l14_n112(x)
+ end
+end
+
+def fun_l13_n774(x)
+ if (x < 1)
+ fun_l14_n862(x)
+ else
+ fun_l14_n503(x)
+ end
+end
+
+def fun_l13_n775(x)
+ if (x < 1)
+ fun_l14_n305(x)
+ else
+ fun_l14_n11(x)
+ end
+end
+
+def fun_l13_n776(x)
+ if (x < 1)
+ fun_l14_n638(x)
+ else
+ fun_l14_n161(x)
+ end
+end
+
+def fun_l13_n777(x)
+ if (x < 1)
+ fun_l14_n2(x)
+ else
+ fun_l14_n176(x)
+ end
+end
+
+def fun_l13_n778(x)
+ if (x < 1)
+ fun_l14_n967(x)
+ else
+ fun_l14_n739(x)
+ end
+end
+
+def fun_l13_n779(x)
+ if (x < 1)
+ fun_l14_n961(x)
+ else
+ fun_l14_n609(x)
+ end
+end
+
+def fun_l13_n780(x)
+ if (x < 1)
+ fun_l14_n207(x)
+ else
+ fun_l14_n910(x)
+ end
+end
+
+def fun_l13_n781(x)
+ if (x < 1)
+ fun_l14_n370(x)
+ else
+ fun_l14_n163(x)
+ end
+end
+
+def fun_l13_n782(x)
+ if (x < 1)
+ fun_l14_n140(x)
+ else
+ fun_l14_n816(x)
+ end
+end
+
+def fun_l13_n783(x)
+ if (x < 1)
+ fun_l14_n351(x)
+ else
+ fun_l14_n406(x)
+ end
+end
+
+def fun_l13_n784(x)
+ if (x < 1)
+ fun_l14_n790(x)
+ else
+ fun_l14_n175(x)
+ end
+end
+
+def fun_l13_n785(x)
+ if (x < 1)
+ fun_l14_n644(x)
+ else
+ fun_l14_n713(x)
+ end
+end
+
+def fun_l13_n786(x)
+ if (x < 1)
+ fun_l14_n800(x)
+ else
+ fun_l14_n257(x)
+ end
+end
+
+def fun_l13_n787(x)
+ if (x < 1)
+ fun_l14_n248(x)
+ else
+ fun_l14_n709(x)
+ end
+end
+
+def fun_l13_n788(x)
+ if (x < 1)
+ fun_l14_n280(x)
+ else
+ fun_l14_n485(x)
+ end
+end
+
+def fun_l13_n789(x)
+ if (x < 1)
+ fun_l14_n900(x)
+ else
+ fun_l14_n675(x)
+ end
+end
+
+def fun_l13_n790(x)
+ if (x < 1)
+ fun_l14_n65(x)
+ else
+ fun_l14_n426(x)
+ end
+end
+
+def fun_l13_n791(x)
+ if (x < 1)
+ fun_l14_n410(x)
+ else
+ fun_l14_n484(x)
+ end
+end
+
+def fun_l13_n792(x)
+ if (x < 1)
+ fun_l14_n741(x)
+ else
+ fun_l14_n13(x)
+ end
+end
+
+def fun_l13_n793(x)
+ if (x < 1)
+ fun_l14_n550(x)
+ else
+ fun_l14_n884(x)
+ end
+end
+
+def fun_l13_n794(x)
+ if (x < 1)
+ fun_l14_n120(x)
+ else
+ fun_l14_n262(x)
+ end
+end
+
+def fun_l13_n795(x)
+ if (x < 1)
+ fun_l14_n537(x)
+ else
+ fun_l14_n980(x)
+ end
+end
+
+def fun_l13_n796(x)
+ if (x < 1)
+ fun_l14_n742(x)
+ else
+ fun_l14_n6(x)
+ end
+end
+
+def fun_l13_n797(x)
+ if (x < 1)
+ fun_l14_n986(x)
+ else
+ fun_l14_n434(x)
+ end
+end
+
+def fun_l13_n798(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n658(x)
+ end
+end
+
+def fun_l13_n799(x)
+ if (x < 1)
+ fun_l14_n838(x)
+ else
+ fun_l14_n810(x)
+ end
+end
+
+def fun_l13_n800(x)
+ if (x < 1)
+ fun_l14_n79(x)
+ else
+ fun_l14_n695(x)
+ end
+end
+
+def fun_l13_n801(x)
+ if (x < 1)
+ fun_l14_n99(x)
+ else
+ fun_l14_n26(x)
+ end
+end
+
+def fun_l13_n802(x)
+ if (x < 1)
+ fun_l14_n839(x)
+ else
+ fun_l14_n430(x)
+ end
+end
+
+def fun_l13_n803(x)
+ if (x < 1)
+ fun_l14_n410(x)
+ else
+ fun_l14_n403(x)
+ end
+end
+
+def fun_l13_n804(x)
+ if (x < 1)
+ fun_l14_n143(x)
+ else
+ fun_l14_n689(x)
+ end
+end
+
+def fun_l13_n805(x)
+ if (x < 1)
+ fun_l14_n695(x)
+ else
+ fun_l14_n721(x)
+ end
+end
+
+def fun_l13_n806(x)
+ if (x < 1)
+ fun_l14_n418(x)
+ else
+ fun_l14_n508(x)
+ end
+end
+
+def fun_l13_n807(x)
+ if (x < 1)
+ fun_l14_n569(x)
+ else
+ fun_l14_n86(x)
+ end
+end
+
+def fun_l13_n808(x)
+ if (x < 1)
+ fun_l14_n670(x)
+ else
+ fun_l14_n690(x)
+ end
+end
+
+def fun_l13_n809(x)
+ if (x < 1)
+ fun_l14_n283(x)
+ else
+ fun_l14_n630(x)
+ end
+end
+
+def fun_l13_n810(x)
+ if (x < 1)
+ fun_l14_n54(x)
+ else
+ fun_l14_n180(x)
+ end
+end
+
+def fun_l13_n811(x)
+ if (x < 1)
+ fun_l14_n669(x)
+ else
+ fun_l14_n131(x)
+ end
+end
+
+def fun_l13_n812(x)
+ if (x < 1)
+ fun_l14_n972(x)
+ else
+ fun_l14_n948(x)
+ end
+end
+
+def fun_l13_n813(x)
+ if (x < 1)
+ fun_l14_n585(x)
+ else
+ fun_l14_n244(x)
+ end
+end
+
+def fun_l13_n814(x)
+ if (x < 1)
+ fun_l14_n277(x)
+ else
+ fun_l14_n530(x)
+ end
+end
+
+def fun_l13_n815(x)
+ if (x < 1)
+ fun_l14_n908(x)
+ else
+ fun_l14_n380(x)
+ end
+end
+
+def fun_l13_n816(x)
+ if (x < 1)
+ fun_l14_n520(x)
+ else
+ fun_l14_n382(x)
+ end
+end
+
+def fun_l13_n817(x)
+ if (x < 1)
+ fun_l14_n40(x)
+ else
+ fun_l14_n757(x)
+ end
+end
+
+def fun_l13_n818(x)
+ if (x < 1)
+ fun_l14_n220(x)
+ else
+ fun_l14_n781(x)
+ end
+end
+
+def fun_l13_n819(x)
+ if (x < 1)
+ fun_l14_n507(x)
+ else
+ fun_l14_n602(x)
+ end
+end
+
+def fun_l13_n820(x)
+ if (x < 1)
+ fun_l14_n39(x)
+ else
+ fun_l14_n798(x)
+ end
+end
+
+def fun_l13_n821(x)
+ if (x < 1)
+ fun_l14_n412(x)
+ else
+ fun_l14_n58(x)
+ end
+end
+
+def fun_l13_n822(x)
+ if (x < 1)
+ fun_l14_n599(x)
+ else
+ fun_l14_n206(x)
+ end
+end
+
+def fun_l13_n823(x)
+ if (x < 1)
+ fun_l14_n294(x)
+ else
+ fun_l14_n711(x)
+ end
+end
+
+def fun_l13_n824(x)
+ if (x < 1)
+ fun_l14_n421(x)
+ else
+ fun_l14_n191(x)
+ end
+end
+
+def fun_l13_n825(x)
+ if (x < 1)
+ fun_l14_n598(x)
+ else
+ fun_l14_n547(x)
+ end
+end
+
+def fun_l13_n826(x)
+ if (x < 1)
+ fun_l14_n131(x)
+ else
+ fun_l14_n29(x)
+ end
+end
+
+def fun_l13_n827(x)
+ if (x < 1)
+ fun_l14_n19(x)
+ else
+ fun_l14_n213(x)
+ end
+end
+
+def fun_l13_n828(x)
+ if (x < 1)
+ fun_l14_n202(x)
+ else
+ fun_l14_n195(x)
+ end
+end
+
+def fun_l13_n829(x)
+ if (x < 1)
+ fun_l14_n133(x)
+ else
+ fun_l14_n949(x)
+ end
+end
+
+def fun_l13_n830(x)
+ if (x < 1)
+ fun_l14_n402(x)
+ else
+ fun_l14_n762(x)
+ end
+end
+
+def fun_l13_n831(x)
+ if (x < 1)
+ fun_l14_n233(x)
+ else
+ fun_l14_n984(x)
+ end
+end
+
+def fun_l13_n832(x)
+ if (x < 1)
+ fun_l14_n309(x)
+ else
+ fun_l14_n545(x)
+ end
+end
+
+def fun_l13_n833(x)
+ if (x < 1)
+ fun_l14_n160(x)
+ else
+ fun_l14_n434(x)
+ end
+end
+
+def fun_l13_n834(x)
+ if (x < 1)
+ fun_l14_n909(x)
+ else
+ fun_l14_n681(x)
+ end
+end
+
+def fun_l13_n835(x)
+ if (x < 1)
+ fun_l14_n747(x)
+ else
+ fun_l14_n813(x)
+ end
+end
+
+def fun_l13_n836(x)
+ if (x < 1)
+ fun_l14_n338(x)
+ else
+ fun_l14_n592(x)
+ end
+end
+
+def fun_l13_n837(x)
+ if (x < 1)
+ fun_l14_n707(x)
+ else
+ fun_l14_n587(x)
+ end
+end
+
+def fun_l13_n838(x)
+ if (x < 1)
+ fun_l14_n655(x)
+ else
+ fun_l14_n207(x)
+ end
+end
+
+def fun_l13_n839(x)
+ if (x < 1)
+ fun_l14_n231(x)
+ else
+ fun_l14_n459(x)
+ end
+end
+
+def fun_l13_n840(x)
+ if (x < 1)
+ fun_l14_n351(x)
+ else
+ fun_l14_n228(x)
+ end
+end
+
+def fun_l13_n841(x)
+ if (x < 1)
+ fun_l14_n205(x)
+ else
+ fun_l14_n628(x)
+ end
+end
+
+def fun_l13_n842(x)
+ if (x < 1)
+ fun_l14_n725(x)
+ else
+ fun_l14_n246(x)
+ end
+end
+
+def fun_l13_n843(x)
+ if (x < 1)
+ fun_l14_n297(x)
+ else
+ fun_l14_n891(x)
+ end
+end
+
+def fun_l13_n844(x)
+ if (x < 1)
+ fun_l14_n598(x)
+ else
+ fun_l14_n168(x)
+ end
+end
+
+def fun_l13_n845(x)
+ if (x < 1)
+ fun_l14_n101(x)
+ else
+ fun_l14_n681(x)
+ end
+end
+
+def fun_l13_n846(x)
+ if (x < 1)
+ fun_l14_n162(x)
+ else
+ fun_l14_n270(x)
+ end
+end
+
+def fun_l13_n847(x)
+ if (x < 1)
+ fun_l14_n84(x)
+ else
+ fun_l14_n957(x)
+ end
+end
+
+def fun_l13_n848(x)
+ if (x < 1)
+ fun_l14_n16(x)
+ else
+ fun_l14_n708(x)
+ end
+end
+
+def fun_l13_n849(x)
+ if (x < 1)
+ fun_l14_n636(x)
+ else
+ fun_l14_n518(x)
+ end
+end
+
+def fun_l13_n850(x)
+ if (x < 1)
+ fun_l14_n379(x)
+ else
+ fun_l14_n595(x)
+ end
+end
+
+def fun_l13_n851(x)
+ if (x < 1)
+ fun_l14_n258(x)
+ else
+ fun_l14_n757(x)
+ end
+end
+
+def fun_l13_n852(x)
+ if (x < 1)
+ fun_l14_n995(x)
+ else
+ fun_l14_n380(x)
+ end
+end
+
+def fun_l13_n853(x)
+ if (x < 1)
+ fun_l14_n505(x)
+ else
+ fun_l14_n934(x)
+ end
+end
+
+def fun_l13_n854(x)
+ if (x < 1)
+ fun_l14_n268(x)
+ else
+ fun_l14_n36(x)
+ end
+end
+
+def fun_l13_n855(x)
+ if (x < 1)
+ fun_l14_n795(x)
+ else
+ fun_l14_n905(x)
+ end
+end
+
+def fun_l13_n856(x)
+ if (x < 1)
+ fun_l14_n136(x)
+ else
+ fun_l14_n750(x)
+ end
+end
+
+def fun_l13_n857(x)
+ if (x < 1)
+ fun_l14_n120(x)
+ else
+ fun_l14_n156(x)
+ end
+end
+
+def fun_l13_n858(x)
+ if (x < 1)
+ fun_l14_n157(x)
+ else
+ fun_l14_n414(x)
+ end
+end
+
+def fun_l13_n859(x)
+ if (x < 1)
+ fun_l14_n926(x)
+ else
+ fun_l14_n718(x)
+ end
+end
+
+def fun_l13_n860(x)
+ if (x < 1)
+ fun_l14_n904(x)
+ else
+ fun_l14_n821(x)
+ end
+end
+
+def fun_l13_n861(x)
+ if (x < 1)
+ fun_l14_n887(x)
+ else
+ fun_l14_n407(x)
+ end
+end
+
+def fun_l13_n862(x)
+ if (x < 1)
+ fun_l14_n870(x)
+ else
+ fun_l14_n950(x)
+ end
+end
+
+def fun_l13_n863(x)
+ if (x < 1)
+ fun_l14_n267(x)
+ else
+ fun_l14_n712(x)
+ end
+end
+
+def fun_l13_n864(x)
+ if (x < 1)
+ fun_l14_n409(x)
+ else
+ fun_l14_n309(x)
+ end
+end
+
+def fun_l13_n865(x)
+ if (x < 1)
+ fun_l14_n345(x)
+ else
+ fun_l14_n110(x)
+ end
+end
+
+def fun_l13_n866(x)
+ if (x < 1)
+ fun_l14_n401(x)
+ else
+ fun_l14_n970(x)
+ end
+end
+
+def fun_l13_n867(x)
+ if (x < 1)
+ fun_l14_n814(x)
+ else
+ fun_l14_n260(x)
+ end
+end
+
+def fun_l13_n868(x)
+ if (x < 1)
+ fun_l14_n490(x)
+ else
+ fun_l14_n31(x)
+ end
+end
+
+def fun_l13_n869(x)
+ if (x < 1)
+ fun_l14_n214(x)
+ else
+ fun_l14_n425(x)
+ end
+end
+
+def fun_l13_n870(x)
+ if (x < 1)
+ fun_l14_n660(x)
+ else
+ fun_l14_n703(x)
+ end
+end
+
+def fun_l13_n871(x)
+ if (x < 1)
+ fun_l14_n650(x)
+ else
+ fun_l14_n257(x)
+ end
+end
+
+def fun_l13_n872(x)
+ if (x < 1)
+ fun_l14_n701(x)
+ else
+ fun_l14_n55(x)
+ end
+end
+
+def fun_l13_n873(x)
+ if (x < 1)
+ fun_l14_n225(x)
+ else
+ fun_l14_n701(x)
+ end
+end
+
+def fun_l13_n874(x)
+ if (x < 1)
+ fun_l14_n525(x)
+ else
+ fun_l14_n793(x)
+ end
+end
+
+def fun_l13_n875(x)
+ if (x < 1)
+ fun_l14_n87(x)
+ else
+ fun_l14_n807(x)
+ end
+end
+
+def fun_l13_n876(x)
+ if (x < 1)
+ fun_l14_n24(x)
+ else
+ fun_l14_n15(x)
+ end
+end
+
+def fun_l13_n877(x)
+ if (x < 1)
+ fun_l14_n120(x)
+ else
+ fun_l14_n551(x)
+ end
+end
+
+def fun_l13_n878(x)
+ if (x < 1)
+ fun_l14_n703(x)
+ else
+ fun_l14_n67(x)
+ end
+end
+
+def fun_l13_n879(x)
+ if (x < 1)
+ fun_l14_n496(x)
+ else
+ fun_l14_n197(x)
+ end
+end
+
+def fun_l13_n880(x)
+ if (x < 1)
+ fun_l14_n369(x)
+ else
+ fun_l14_n834(x)
+ end
+end
+
+def fun_l13_n881(x)
+ if (x < 1)
+ fun_l14_n892(x)
+ else
+ fun_l14_n210(x)
+ end
+end
+
+def fun_l13_n882(x)
+ if (x < 1)
+ fun_l14_n587(x)
+ else
+ fun_l14_n472(x)
+ end
+end
+
+def fun_l13_n883(x)
+ if (x < 1)
+ fun_l14_n1(x)
+ else
+ fun_l14_n778(x)
+ end
+end
+
+def fun_l13_n884(x)
+ if (x < 1)
+ fun_l14_n762(x)
+ else
+ fun_l14_n286(x)
+ end
+end
+
+def fun_l13_n885(x)
+ if (x < 1)
+ fun_l14_n36(x)
+ else
+ fun_l14_n326(x)
+ end
+end
+
+def fun_l13_n886(x)
+ if (x < 1)
+ fun_l14_n857(x)
+ else
+ fun_l14_n564(x)
+ end
+end
+
+def fun_l13_n887(x)
+ if (x < 1)
+ fun_l14_n461(x)
+ else
+ fun_l14_n415(x)
+ end
+end
+
+def fun_l13_n888(x)
+ if (x < 1)
+ fun_l14_n225(x)
+ else
+ fun_l14_n783(x)
+ end
+end
+
+def fun_l13_n889(x)
+ if (x < 1)
+ fun_l14_n10(x)
+ else
+ fun_l14_n114(x)
+ end
+end
+
+def fun_l13_n890(x)
+ if (x < 1)
+ fun_l14_n670(x)
+ else
+ fun_l14_n473(x)
+ end
+end
+
+def fun_l13_n891(x)
+ if (x < 1)
+ fun_l14_n777(x)
+ else
+ fun_l14_n98(x)
+ end
+end
+
+def fun_l13_n892(x)
+ if (x < 1)
+ fun_l14_n600(x)
+ else
+ fun_l14_n808(x)
+ end
+end
+
+def fun_l13_n893(x)
+ if (x < 1)
+ fun_l14_n605(x)
+ else
+ fun_l14_n687(x)
+ end
+end
+
+def fun_l13_n894(x)
+ if (x < 1)
+ fun_l14_n29(x)
+ else
+ fun_l14_n190(x)
+ end
+end
+
+def fun_l13_n895(x)
+ if (x < 1)
+ fun_l14_n26(x)
+ else
+ fun_l14_n887(x)
+ end
+end
+
+def fun_l13_n896(x)
+ if (x < 1)
+ fun_l14_n680(x)
+ else
+ fun_l14_n413(x)
+ end
+end
+
+def fun_l13_n897(x)
+ if (x < 1)
+ fun_l14_n634(x)
+ else
+ fun_l14_n184(x)
+ end
+end
+
+def fun_l13_n898(x)
+ if (x < 1)
+ fun_l14_n420(x)
+ else
+ fun_l14_n603(x)
+ end
+end
+
+def fun_l13_n899(x)
+ if (x < 1)
+ fun_l14_n702(x)
+ else
+ fun_l14_n54(x)
+ end
+end
+
+def fun_l13_n900(x)
+ if (x < 1)
+ fun_l14_n620(x)
+ else
+ fun_l14_n849(x)
+ end
+end
+
+def fun_l13_n901(x)
+ if (x < 1)
+ fun_l14_n848(x)
+ else
+ fun_l14_n384(x)
+ end
+end
+
+def fun_l13_n902(x)
+ if (x < 1)
+ fun_l14_n726(x)
+ else
+ fun_l14_n624(x)
+ end
+end
+
+def fun_l13_n903(x)
+ if (x < 1)
+ fun_l14_n663(x)
+ else
+ fun_l14_n395(x)
+ end
+end
+
+def fun_l13_n904(x)
+ if (x < 1)
+ fun_l14_n803(x)
+ else
+ fun_l14_n979(x)
+ end
+end
+
+def fun_l13_n905(x)
+ if (x < 1)
+ fun_l14_n487(x)
+ else
+ fun_l14_n530(x)
+ end
+end
+
+def fun_l13_n906(x)
+ if (x < 1)
+ fun_l14_n737(x)
+ else
+ fun_l14_n679(x)
+ end
+end
+
+def fun_l13_n907(x)
+ if (x < 1)
+ fun_l14_n815(x)
+ else
+ fun_l14_n84(x)
+ end
+end
+
+def fun_l13_n908(x)
+ if (x < 1)
+ fun_l14_n116(x)
+ else
+ fun_l14_n820(x)
+ end
+end
+
+def fun_l13_n909(x)
+ if (x < 1)
+ fun_l14_n353(x)
+ else
+ fun_l14_n949(x)
+ end
+end
+
+def fun_l13_n910(x)
+ if (x < 1)
+ fun_l14_n271(x)
+ else
+ fun_l14_n168(x)
+ end
+end
+
+def fun_l13_n911(x)
+ if (x < 1)
+ fun_l14_n54(x)
+ else
+ fun_l14_n236(x)
+ end
+end
+
+def fun_l13_n912(x)
+ if (x < 1)
+ fun_l14_n391(x)
+ else
+ fun_l14_n152(x)
+ end
+end
+
+def fun_l13_n913(x)
+ if (x < 1)
+ fun_l14_n450(x)
+ else
+ fun_l14_n521(x)
+ end
+end
+
+def fun_l13_n914(x)
+ if (x < 1)
+ fun_l14_n36(x)
+ else
+ fun_l14_n995(x)
+ end
+end
+
+def fun_l13_n915(x)
+ if (x < 1)
+ fun_l14_n177(x)
+ else
+ fun_l14_n358(x)
+ end
+end
+
+def fun_l13_n916(x)
+ if (x < 1)
+ fun_l14_n36(x)
+ else
+ fun_l14_n32(x)
+ end
+end
+
+def fun_l13_n917(x)
+ if (x < 1)
+ fun_l14_n970(x)
+ else
+ fun_l14_n957(x)
+ end
+end
+
+def fun_l13_n918(x)
+ if (x < 1)
+ fun_l14_n229(x)
+ else
+ fun_l14_n138(x)
+ end
+end
+
+def fun_l13_n919(x)
+ if (x < 1)
+ fun_l14_n439(x)
+ else
+ fun_l14_n641(x)
+ end
+end
+
+def fun_l13_n920(x)
+ if (x < 1)
+ fun_l14_n318(x)
+ else
+ fun_l14_n649(x)
+ end
+end
+
+def fun_l13_n921(x)
+ if (x < 1)
+ fun_l14_n455(x)
+ else
+ fun_l14_n312(x)
+ end
+end
+
+def fun_l13_n922(x)
+ if (x < 1)
+ fun_l14_n15(x)
+ else
+ fun_l14_n825(x)
+ end
+end
+
+def fun_l13_n923(x)
+ if (x < 1)
+ fun_l14_n546(x)
+ else
+ fun_l14_n629(x)
+ end
+end
+
+def fun_l13_n924(x)
+ if (x < 1)
+ fun_l14_n298(x)
+ else
+ fun_l14_n563(x)
+ end
+end
+
+def fun_l13_n925(x)
+ if (x < 1)
+ fun_l14_n312(x)
+ else
+ fun_l14_n736(x)
+ end
+end
+
+def fun_l13_n926(x)
+ if (x < 1)
+ fun_l14_n767(x)
+ else
+ fun_l14_n107(x)
+ end
+end
+
+def fun_l13_n927(x)
+ if (x < 1)
+ fun_l14_n966(x)
+ else
+ fun_l14_n765(x)
+ end
+end
+
+def fun_l13_n928(x)
+ if (x < 1)
+ fun_l14_n545(x)
+ else
+ fun_l14_n383(x)
+ end
+end
+
+def fun_l13_n929(x)
+ if (x < 1)
+ fun_l14_n389(x)
+ else
+ fun_l14_n48(x)
+ end
+end
+
+def fun_l13_n930(x)
+ if (x < 1)
+ fun_l14_n142(x)
+ else
+ fun_l14_n632(x)
+ end
+end
+
+def fun_l13_n931(x)
+ if (x < 1)
+ fun_l14_n146(x)
+ else
+ fun_l14_n275(x)
+ end
+end
+
+def fun_l13_n932(x)
+ if (x < 1)
+ fun_l14_n754(x)
+ else
+ fun_l14_n380(x)
+ end
+end
+
+def fun_l13_n933(x)
+ if (x < 1)
+ fun_l14_n561(x)
+ else
+ fun_l14_n677(x)
+ end
+end
+
+def fun_l13_n934(x)
+ if (x < 1)
+ fun_l14_n253(x)
+ else
+ fun_l14_n86(x)
+ end
+end
+
+def fun_l13_n935(x)
+ if (x < 1)
+ fun_l14_n528(x)
+ else
+ fun_l14_n177(x)
+ end
+end
+
+def fun_l13_n936(x)
+ if (x < 1)
+ fun_l14_n938(x)
+ else
+ fun_l14_n265(x)
+ end
+end
+
+def fun_l13_n937(x)
+ if (x < 1)
+ fun_l14_n763(x)
+ else
+ fun_l14_n662(x)
+ end
+end
+
+def fun_l13_n938(x)
+ if (x < 1)
+ fun_l14_n836(x)
+ else
+ fun_l14_n734(x)
+ end
+end
+
+def fun_l13_n939(x)
+ if (x < 1)
+ fun_l14_n127(x)
+ else
+ fun_l14_n111(x)
+ end
+end
+
+def fun_l13_n940(x)
+ if (x < 1)
+ fun_l14_n356(x)
+ else
+ fun_l14_n544(x)
+ end
+end
+
+def fun_l13_n941(x)
+ if (x < 1)
+ fun_l14_n525(x)
+ else
+ fun_l14_n762(x)
+ end
+end
+
+def fun_l13_n942(x)
+ if (x < 1)
+ fun_l14_n333(x)
+ else
+ fun_l14_n639(x)
+ end
+end
+
+def fun_l13_n943(x)
+ if (x < 1)
+ fun_l14_n452(x)
+ else
+ fun_l14_n944(x)
+ end
+end
+
+def fun_l13_n944(x)
+ if (x < 1)
+ fun_l14_n827(x)
+ else
+ fun_l14_n961(x)
+ end
+end
+
+def fun_l13_n945(x)
+ if (x < 1)
+ fun_l14_n991(x)
+ else
+ fun_l14_n431(x)
+ end
+end
+
+def fun_l13_n946(x)
+ if (x < 1)
+ fun_l14_n646(x)
+ else
+ fun_l14_n183(x)
+ end
+end
+
+def fun_l13_n947(x)
+ if (x < 1)
+ fun_l14_n107(x)
+ else
+ fun_l14_n273(x)
+ end
+end
+
+def fun_l13_n948(x)
+ if (x < 1)
+ fun_l14_n210(x)
+ else
+ fun_l14_n664(x)
+ end
+end
+
+def fun_l13_n949(x)
+ if (x < 1)
+ fun_l14_n542(x)
+ else
+ fun_l14_n462(x)
+ end
+end
+
+def fun_l13_n950(x)
+ if (x < 1)
+ fun_l14_n891(x)
+ else
+ fun_l14_n486(x)
+ end
+end
+
+def fun_l13_n951(x)
+ if (x < 1)
+ fun_l14_n527(x)
+ else
+ fun_l14_n721(x)
+ end
+end
+
+def fun_l13_n952(x)
+ if (x < 1)
+ fun_l14_n745(x)
+ else
+ fun_l14_n11(x)
+ end
+end
+
+def fun_l13_n953(x)
+ if (x < 1)
+ fun_l14_n427(x)
+ else
+ fun_l14_n521(x)
+ end
+end
+
+def fun_l13_n954(x)
+ if (x < 1)
+ fun_l14_n907(x)
+ else
+ fun_l14_n878(x)
+ end
+end
+
+def fun_l13_n955(x)
+ if (x < 1)
+ fun_l14_n818(x)
+ else
+ fun_l14_n722(x)
+ end
+end
+
+def fun_l13_n956(x)
+ if (x < 1)
+ fun_l14_n567(x)
+ else
+ fun_l14_n71(x)
+ end
+end
+
+def fun_l13_n957(x)
+ if (x < 1)
+ fun_l14_n203(x)
+ else
+ fun_l14_n221(x)
+ end
+end
+
+def fun_l13_n958(x)
+ if (x < 1)
+ fun_l14_n173(x)
+ else
+ fun_l14_n854(x)
+ end
+end
+
+def fun_l13_n959(x)
+ if (x < 1)
+ fun_l14_n201(x)
+ else
+ fun_l14_n930(x)
+ end
+end
+
+def fun_l13_n960(x)
+ if (x < 1)
+ fun_l14_n736(x)
+ else
+ fun_l14_n539(x)
+ end
+end
+
+def fun_l13_n961(x)
+ if (x < 1)
+ fun_l14_n459(x)
+ else
+ fun_l14_n771(x)
+ end
+end
+
+def fun_l13_n962(x)
+ if (x < 1)
+ fun_l14_n682(x)
+ else
+ fun_l14_n19(x)
+ end
+end
+
+def fun_l13_n963(x)
+ if (x < 1)
+ fun_l14_n897(x)
+ else
+ fun_l14_n650(x)
+ end
+end
+
+def fun_l13_n964(x)
+ if (x < 1)
+ fun_l14_n814(x)
+ else
+ fun_l14_n726(x)
+ end
+end
+
+def fun_l13_n965(x)
+ if (x < 1)
+ fun_l14_n31(x)
+ else
+ fun_l14_n211(x)
+ end
+end
+
+def fun_l13_n966(x)
+ if (x < 1)
+ fun_l14_n89(x)
+ else
+ fun_l14_n407(x)
+ end
+end
+
+def fun_l13_n967(x)
+ if (x < 1)
+ fun_l14_n772(x)
+ else
+ fun_l14_n7(x)
+ end
+end
+
+def fun_l13_n968(x)
+ if (x < 1)
+ fun_l14_n764(x)
+ else
+ fun_l14_n523(x)
+ end
+end
+
+def fun_l13_n969(x)
+ if (x < 1)
+ fun_l14_n680(x)
+ else
+ fun_l14_n674(x)
+ end
+end
+
+def fun_l13_n970(x)
+ if (x < 1)
+ fun_l14_n517(x)
+ else
+ fun_l14_n346(x)
+ end
+end
+
+def fun_l13_n971(x)
+ if (x < 1)
+ fun_l14_n136(x)
+ else
+ fun_l14_n921(x)
+ end
+end
+
+def fun_l13_n972(x)
+ if (x < 1)
+ fun_l14_n400(x)
+ else
+ fun_l14_n901(x)
+ end
+end
+
+def fun_l13_n973(x)
+ if (x < 1)
+ fun_l14_n62(x)
+ else
+ fun_l14_n784(x)
+ end
+end
+
+def fun_l13_n974(x)
+ if (x < 1)
+ fun_l14_n411(x)
+ else
+ fun_l14_n889(x)
+ end
+end
+
+def fun_l13_n975(x)
+ if (x < 1)
+ fun_l14_n291(x)
+ else
+ fun_l14_n198(x)
+ end
+end
+
+def fun_l13_n976(x)
+ if (x < 1)
+ fun_l14_n229(x)
+ else
+ fun_l14_n346(x)
+ end
+end
+
+def fun_l13_n977(x)
+ if (x < 1)
+ fun_l14_n769(x)
+ else
+ fun_l14_n381(x)
+ end
+end
+
+def fun_l13_n978(x)
+ if (x < 1)
+ fun_l14_n430(x)
+ else
+ fun_l14_n205(x)
+ end
+end
+
+def fun_l13_n979(x)
+ if (x < 1)
+ fun_l14_n170(x)
+ else
+ fun_l14_n927(x)
+ end
+end
+
+def fun_l13_n980(x)
+ if (x < 1)
+ fun_l14_n12(x)
+ else
+ fun_l14_n605(x)
+ end
+end
+
+def fun_l13_n981(x)
+ if (x < 1)
+ fun_l14_n613(x)
+ else
+ fun_l14_n912(x)
+ end
+end
+
+def fun_l13_n982(x)
+ if (x < 1)
+ fun_l14_n982(x)
+ else
+ fun_l14_n707(x)
+ end
+end
+
+def fun_l13_n983(x)
+ if (x < 1)
+ fun_l14_n230(x)
+ else
+ fun_l14_n239(x)
+ end
+end
+
+def fun_l13_n984(x)
+ if (x < 1)
+ fun_l14_n55(x)
+ else
+ fun_l14_n337(x)
+ end
+end
+
+def fun_l13_n985(x)
+ if (x < 1)
+ fun_l14_n853(x)
+ else
+ fun_l14_n425(x)
+ end
+end
+
+def fun_l13_n986(x)
+ if (x < 1)
+ fun_l14_n14(x)
+ else
+ fun_l14_n921(x)
+ end
+end
+
+def fun_l13_n987(x)
+ if (x < 1)
+ fun_l14_n166(x)
+ else
+ fun_l14_n948(x)
+ end
+end
+
+def fun_l13_n988(x)
+ if (x < 1)
+ fun_l14_n752(x)
+ else
+ fun_l14_n226(x)
+ end
+end
+
+def fun_l13_n989(x)
+ if (x < 1)
+ fun_l14_n730(x)
+ else
+ fun_l14_n671(x)
+ end
+end
+
+def fun_l13_n990(x)
+ if (x < 1)
+ fun_l14_n603(x)
+ else
+ fun_l14_n903(x)
+ end
+end
+
+def fun_l13_n991(x)
+ if (x < 1)
+ fun_l14_n598(x)
+ else
+ fun_l14_n842(x)
+ end
+end
+
+def fun_l13_n992(x)
+ if (x < 1)
+ fun_l14_n230(x)
+ else
+ fun_l14_n704(x)
+ end
+end
+
+def fun_l13_n993(x)
+ if (x < 1)
+ fun_l14_n897(x)
+ else
+ fun_l14_n190(x)
+ end
+end
+
+def fun_l13_n994(x)
+ if (x < 1)
+ fun_l14_n640(x)
+ else
+ fun_l14_n622(x)
+ end
+end
+
+def fun_l13_n995(x)
+ if (x < 1)
+ fun_l14_n988(x)
+ else
+ fun_l14_n471(x)
+ end
+end
+
+def fun_l13_n996(x)
+ if (x < 1)
+ fun_l14_n721(x)
+ else
+ fun_l14_n672(x)
+ end
+end
+
+def fun_l13_n997(x)
+ if (x < 1)
+ fun_l14_n425(x)
+ else
+ fun_l14_n885(x)
+ end
+end
+
+def fun_l13_n998(x)
+ if (x < 1)
+ fun_l14_n279(x)
+ else
+ fun_l14_n966(x)
+ end
+end
+
+def fun_l13_n999(x)
+ if (x < 1)
+ fun_l14_n610(x)
+ else
+ fun_l14_n319(x)
+ end
+end
+
+def fun_l14_n0(x)
+ if (x < 1)
+ fun_l15_n46(x)
+ else
+ fun_l15_n966(x)
+ end
+end
+
+def fun_l14_n1(x)
+ if (x < 1)
+ fun_l15_n360(x)
+ else
+ fun_l15_n637(x)
+ end
+end
+
+def fun_l14_n2(x)
+ if (x < 1)
+ fun_l15_n381(x)
+ else
+ fun_l15_n728(x)
+ end
+end
+
+def fun_l14_n3(x)
+ if (x < 1)
+ fun_l15_n189(x)
+ else
+ fun_l15_n826(x)
+ end
+end
+
+def fun_l14_n4(x)
+ if (x < 1)
+ fun_l15_n789(x)
+ else
+ fun_l15_n157(x)
+ end
+end
+
+def fun_l14_n5(x)
+ if (x < 1)
+ fun_l15_n132(x)
+ else
+ fun_l15_n703(x)
+ end
+end
+
+def fun_l14_n6(x)
+ if (x < 1)
+ fun_l15_n64(x)
+ else
+ fun_l15_n537(x)
+ end
+end
+
+def fun_l14_n7(x)
+ if (x < 1)
+ fun_l15_n423(x)
+ else
+ fun_l15_n162(x)
+ end
+end
+
+def fun_l14_n8(x)
+ if (x < 1)
+ fun_l15_n177(x)
+ else
+ fun_l15_n923(x)
+ end
+end
+
+def fun_l14_n9(x)
+ if (x < 1)
+ fun_l15_n508(x)
+ else
+ fun_l15_n135(x)
+ end
+end
+
+def fun_l14_n10(x)
+ if (x < 1)
+ fun_l15_n640(x)
+ else
+ fun_l15_n869(x)
+ end
+end
+
+def fun_l14_n11(x)
+ if (x < 1)
+ fun_l15_n592(x)
+ else
+ fun_l15_n519(x)
+ end
+end
+
+def fun_l14_n12(x)
+ if (x < 1)
+ fun_l15_n332(x)
+ else
+ fun_l15_n263(x)
+ end
+end
+
+def fun_l14_n13(x)
+ if (x < 1)
+ fun_l15_n644(x)
+ else
+ fun_l15_n21(x)
+ end
+end
+
+def fun_l14_n14(x)
+ if (x < 1)
+ fun_l15_n436(x)
+ else
+ fun_l15_n566(x)
+ end
+end
+
+def fun_l14_n15(x)
+ if (x < 1)
+ fun_l15_n160(x)
+ else
+ fun_l15_n291(x)
+ end
+end
+
+def fun_l14_n16(x)
+ if (x < 1)
+ fun_l15_n726(x)
+ else
+ fun_l15_n704(x)
+ end
+end
+
+def fun_l14_n17(x)
+ if (x < 1)
+ fun_l15_n237(x)
+ else
+ fun_l15_n962(x)
+ end
+end
+
+def fun_l14_n18(x)
+ if (x < 1)
+ fun_l15_n941(x)
+ else
+ fun_l15_n217(x)
+ end
+end
+
+def fun_l14_n19(x)
+ if (x < 1)
+ fun_l15_n904(x)
+ else
+ fun_l15_n36(x)
+ end
+end
+
+def fun_l14_n20(x)
+ if (x < 1)
+ fun_l15_n74(x)
+ else
+ fun_l15_n790(x)
+ end
+end
+
+def fun_l14_n21(x)
+ if (x < 1)
+ fun_l15_n694(x)
+ else
+ fun_l15_n298(x)
+ end
+end
+
+def fun_l14_n22(x)
+ if (x < 1)
+ fun_l15_n757(x)
+ else
+ fun_l15_n636(x)
+ end
+end
+
+def fun_l14_n23(x)
+ if (x < 1)
+ fun_l15_n989(x)
+ else
+ fun_l15_n508(x)
+ end
+end
+
+def fun_l14_n24(x)
+ if (x < 1)
+ fun_l15_n80(x)
+ else
+ fun_l15_n686(x)
+ end
+end
+
+def fun_l14_n25(x)
+ if (x < 1)
+ fun_l15_n365(x)
+ else
+ fun_l15_n922(x)
+ end
+end
+
+def fun_l14_n26(x)
+ if (x < 1)
+ fun_l15_n922(x)
+ else
+ fun_l15_n207(x)
+ end
+end
+
+def fun_l14_n27(x)
+ if (x < 1)
+ fun_l15_n406(x)
+ else
+ fun_l15_n481(x)
+ end
+end
+
+def fun_l14_n28(x)
+ if (x < 1)
+ fun_l15_n986(x)
+ else
+ fun_l15_n181(x)
+ end
+end
+
+def fun_l14_n29(x)
+ if (x < 1)
+ fun_l15_n958(x)
+ else
+ fun_l15_n804(x)
+ end
+end
+
+def fun_l14_n30(x)
+ if (x < 1)
+ fun_l15_n233(x)
+ else
+ fun_l15_n877(x)
+ end
+end
+
+def fun_l14_n31(x)
+ if (x < 1)
+ fun_l15_n648(x)
+ else
+ fun_l15_n547(x)
+ end
+end
+
+def fun_l14_n32(x)
+ if (x < 1)
+ fun_l15_n641(x)
+ else
+ fun_l15_n628(x)
+ end
+end
+
+def fun_l14_n33(x)
+ if (x < 1)
+ fun_l15_n351(x)
+ else
+ fun_l15_n280(x)
+ end
+end
+
+def fun_l14_n34(x)
+ if (x < 1)
+ fun_l15_n373(x)
+ else
+ fun_l15_n948(x)
+ end
+end
+
+def fun_l14_n35(x)
+ if (x < 1)
+ fun_l15_n761(x)
+ else
+ fun_l15_n384(x)
+ end
+end
+
+def fun_l14_n36(x)
+ if (x < 1)
+ fun_l15_n75(x)
+ else
+ fun_l15_n581(x)
+ end
+end
+
+def fun_l14_n37(x)
+ if (x < 1)
+ fun_l15_n962(x)
+ else
+ fun_l15_n723(x)
+ end
+end
+
+def fun_l14_n38(x)
+ if (x < 1)
+ fun_l15_n422(x)
+ else
+ fun_l15_n953(x)
+ end
+end
+
+def fun_l14_n39(x)
+ if (x < 1)
+ fun_l15_n123(x)
+ else
+ fun_l15_n989(x)
+ end
+end
+
+def fun_l14_n40(x)
+ if (x < 1)
+ fun_l15_n789(x)
+ else
+ fun_l15_n472(x)
+ end
+end
+
+def fun_l14_n41(x)
+ if (x < 1)
+ fun_l15_n261(x)
+ else
+ fun_l15_n997(x)
+ end
+end
+
+def fun_l14_n42(x)
+ if (x < 1)
+ fun_l15_n231(x)
+ else
+ fun_l15_n703(x)
+ end
+end
+
+def fun_l14_n43(x)
+ if (x < 1)
+ fun_l15_n520(x)
+ else
+ fun_l15_n252(x)
+ end
+end
+
+def fun_l14_n44(x)
+ if (x < 1)
+ fun_l15_n966(x)
+ else
+ fun_l15_n244(x)
+ end
+end
+
+def fun_l14_n45(x)
+ if (x < 1)
+ fun_l15_n192(x)
+ else
+ fun_l15_n280(x)
+ end
+end
+
+def fun_l14_n46(x)
+ if (x < 1)
+ fun_l15_n422(x)
+ else
+ fun_l15_n847(x)
+ end
+end
+
+def fun_l14_n47(x)
+ if (x < 1)
+ fun_l15_n228(x)
+ else
+ fun_l15_n564(x)
+ end
+end
+
+def fun_l14_n48(x)
+ if (x < 1)
+ fun_l15_n263(x)
+ else
+ fun_l15_n226(x)
+ end
+end
+
+def fun_l14_n49(x)
+ if (x < 1)
+ fun_l15_n440(x)
+ else
+ fun_l15_n592(x)
+ end
+end
+
+def fun_l14_n50(x)
+ if (x < 1)
+ fun_l15_n464(x)
+ else
+ fun_l15_n135(x)
+ end
+end
+
+def fun_l14_n51(x)
+ if (x < 1)
+ fun_l15_n903(x)
+ else
+ fun_l15_n821(x)
+ end
+end
+
+def fun_l14_n52(x)
+ if (x < 1)
+ fun_l15_n472(x)
+ else
+ fun_l15_n322(x)
+ end
+end
+
+def fun_l14_n53(x)
+ if (x < 1)
+ fun_l15_n107(x)
+ else
+ fun_l15_n497(x)
+ end
+end
+
+def fun_l14_n54(x)
+ if (x < 1)
+ fun_l15_n692(x)
+ else
+ fun_l15_n392(x)
+ end
+end
+
+def fun_l14_n55(x)
+ if (x < 1)
+ fun_l15_n694(x)
+ else
+ fun_l15_n995(x)
+ end
+end
+
+def fun_l14_n56(x)
+ if (x < 1)
+ fun_l15_n181(x)
+ else
+ fun_l15_n200(x)
+ end
+end
+
+def fun_l14_n57(x)
+ if (x < 1)
+ fun_l15_n721(x)
+ else
+ fun_l15_n849(x)
+ end
+end
+
+def fun_l14_n58(x)
+ if (x < 1)
+ fun_l15_n626(x)
+ else
+ fun_l15_n866(x)
+ end
+end
+
+def fun_l14_n59(x)
+ if (x < 1)
+ fun_l15_n689(x)
+ else
+ fun_l15_n387(x)
+ end
+end
+
+def fun_l14_n60(x)
+ if (x < 1)
+ fun_l15_n805(x)
+ else
+ fun_l15_n842(x)
+ end
+end
+
+def fun_l14_n61(x)
+ if (x < 1)
+ fun_l15_n457(x)
+ else
+ fun_l15_n472(x)
+ end
+end
+
+def fun_l14_n62(x)
+ if (x < 1)
+ fun_l15_n884(x)
+ else
+ fun_l15_n786(x)
+ end
+end
+
+def fun_l14_n63(x)
+ if (x < 1)
+ fun_l15_n509(x)
+ else
+ fun_l15_n106(x)
+ end
+end
+
+def fun_l14_n64(x)
+ if (x < 1)
+ fun_l15_n600(x)
+ else
+ fun_l15_n314(x)
+ end
+end
+
+def fun_l14_n65(x)
+ if (x < 1)
+ fun_l15_n761(x)
+ else
+ fun_l15_n362(x)
+ end
+end
+
+def fun_l14_n66(x)
+ if (x < 1)
+ fun_l15_n812(x)
+ else
+ fun_l15_n640(x)
+ end
+end
+
+def fun_l14_n67(x)
+ if (x < 1)
+ fun_l15_n862(x)
+ else
+ fun_l15_n627(x)
+ end
+end
+
+def fun_l14_n68(x)
+ if (x < 1)
+ fun_l15_n503(x)
+ else
+ fun_l15_n381(x)
+ end
+end
+
+def fun_l14_n69(x)
+ if (x < 1)
+ fun_l15_n482(x)
+ else
+ fun_l15_n851(x)
+ end
+end
+
+def fun_l14_n70(x)
+ if (x < 1)
+ fun_l15_n253(x)
+ else
+ fun_l15_n728(x)
+ end
+end
+
+def fun_l14_n71(x)
+ if (x < 1)
+ fun_l15_n195(x)
+ else
+ fun_l15_n537(x)
+ end
+end
+
+def fun_l14_n72(x)
+ if (x < 1)
+ fun_l15_n482(x)
+ else
+ fun_l15_n604(x)
+ end
+end
+
+def fun_l14_n73(x)
+ if (x < 1)
+ fun_l15_n373(x)
+ else
+ fun_l15_n502(x)
+ end
+end
+
+def fun_l14_n74(x)
+ if (x < 1)
+ fun_l15_n183(x)
+ else
+ fun_l15_n50(x)
+ end
+end
+
+def fun_l14_n75(x)
+ if (x < 1)
+ fun_l15_n397(x)
+ else
+ fun_l15_n467(x)
+ end
+end
+
+def fun_l14_n76(x)
+ if (x < 1)
+ fun_l15_n207(x)
+ else
+ fun_l15_n566(x)
+ end
+end
+
+def fun_l14_n77(x)
+ if (x < 1)
+ fun_l15_n416(x)
+ else
+ fun_l15_n846(x)
+ end
+end
+
+def fun_l14_n78(x)
+ if (x < 1)
+ fun_l15_n426(x)
+ else
+ fun_l15_n142(x)
+ end
+end
+
+def fun_l14_n79(x)
+ if (x < 1)
+ fun_l15_n234(x)
+ else
+ fun_l15_n5(x)
+ end
+end
+
+def fun_l14_n80(x)
+ if (x < 1)
+ fun_l15_n133(x)
+ else
+ fun_l15_n216(x)
+ end
+end
+
+def fun_l14_n81(x)
+ if (x < 1)
+ fun_l15_n23(x)
+ else
+ fun_l15_n126(x)
+ end
+end
+
+def fun_l14_n82(x)
+ if (x < 1)
+ fun_l15_n129(x)
+ else
+ fun_l15_n614(x)
+ end
+end
+
+def fun_l14_n83(x)
+ if (x < 1)
+ fun_l15_n560(x)
+ else
+ fun_l15_n559(x)
+ end
+end
+
+def fun_l14_n84(x)
+ if (x < 1)
+ fun_l15_n113(x)
+ else
+ fun_l15_n300(x)
+ end
+end
+
+def fun_l14_n85(x)
+ if (x < 1)
+ fun_l15_n584(x)
+ else
+ fun_l15_n249(x)
+ end
+end
+
+def fun_l14_n86(x)
+ if (x < 1)
+ fun_l15_n933(x)
+ else
+ fun_l15_n280(x)
+ end
+end
+
+def fun_l14_n87(x)
+ if (x < 1)
+ fun_l15_n528(x)
+ else
+ fun_l15_n350(x)
+ end
+end
+
+def fun_l14_n88(x)
+ if (x < 1)
+ fun_l15_n568(x)
+ else
+ fun_l15_n762(x)
+ end
+end
+
+def fun_l14_n89(x)
+ if (x < 1)
+ fun_l15_n190(x)
+ else
+ fun_l15_n858(x)
+ end
+end
+
+def fun_l14_n90(x)
+ if (x < 1)
+ fun_l15_n896(x)
+ else
+ fun_l15_n543(x)
+ end
+end
+
+def fun_l14_n91(x)
+ if (x < 1)
+ fun_l15_n937(x)
+ else
+ fun_l15_n593(x)
+ end
+end
+
+def fun_l14_n92(x)
+ if (x < 1)
+ fun_l15_n135(x)
+ else
+ fun_l15_n5(x)
+ end
+end
+
+def fun_l14_n93(x)
+ if (x < 1)
+ fun_l15_n351(x)
+ else
+ fun_l15_n779(x)
+ end
+end
+
+def fun_l14_n94(x)
+ if (x < 1)
+ fun_l15_n617(x)
+ else
+ fun_l15_n375(x)
+ end
+end
+
+def fun_l14_n95(x)
+ if (x < 1)
+ fun_l15_n111(x)
+ else
+ fun_l15_n870(x)
+ end
+end
+
+def fun_l14_n96(x)
+ if (x < 1)
+ fun_l15_n187(x)
+ else
+ fun_l15_n881(x)
+ end
+end
+
+def fun_l14_n97(x)
+ if (x < 1)
+ fun_l15_n150(x)
+ else
+ fun_l15_n98(x)
+ end
+end
+
+def fun_l14_n98(x)
+ if (x < 1)
+ fun_l15_n629(x)
+ else
+ fun_l15_n548(x)
+ end
+end
+
+def fun_l14_n99(x)
+ if (x < 1)
+ fun_l15_n37(x)
+ else
+ fun_l15_n383(x)
+ end
+end
+
+def fun_l14_n100(x)
+ if (x < 1)
+ fun_l15_n719(x)
+ else
+ fun_l15_n503(x)
+ end
+end
+
+def fun_l14_n101(x)
+ if (x < 1)
+ fun_l15_n415(x)
+ else
+ fun_l15_n650(x)
+ end
+end
+
+def fun_l14_n102(x)
+ if (x < 1)
+ fun_l15_n924(x)
+ else
+ fun_l15_n520(x)
+ end
+end
+
+def fun_l14_n103(x)
+ if (x < 1)
+ fun_l15_n194(x)
+ else
+ fun_l15_n613(x)
+ end
+end
+
+def fun_l14_n104(x)
+ if (x < 1)
+ fun_l15_n909(x)
+ else
+ fun_l15_n333(x)
+ end
+end
+
+def fun_l14_n105(x)
+ if (x < 1)
+ fun_l15_n586(x)
+ else
+ fun_l15_n2(x)
+ end
+end
+
+def fun_l14_n106(x)
+ if (x < 1)
+ fun_l15_n373(x)
+ else
+ fun_l15_n316(x)
+ end
+end
+
+def fun_l14_n107(x)
+ if (x < 1)
+ fun_l15_n737(x)
+ else
+ fun_l15_n469(x)
+ end
+end
+
+def fun_l14_n108(x)
+ if (x < 1)
+ fun_l15_n841(x)
+ else
+ fun_l15_n888(x)
+ end
+end
+
+def fun_l14_n109(x)
+ if (x < 1)
+ fun_l15_n165(x)
+ else
+ fun_l15_n108(x)
+ end
+end
+
+def fun_l14_n110(x)
+ if (x < 1)
+ fun_l15_n344(x)
+ else
+ fun_l15_n893(x)
+ end
+end
+
+def fun_l14_n111(x)
+ if (x < 1)
+ fun_l15_n424(x)
+ else
+ fun_l15_n702(x)
+ end
+end
+
+def fun_l14_n112(x)
+ if (x < 1)
+ fun_l15_n161(x)
+ else
+ fun_l15_n827(x)
+ end
+end
+
+def fun_l14_n113(x)
+ if (x < 1)
+ fun_l15_n982(x)
+ else
+ fun_l15_n172(x)
+ end
+end
+
+def fun_l14_n114(x)
+ if (x < 1)
+ fun_l15_n233(x)
+ else
+ fun_l15_n178(x)
+ end
+end
+
+def fun_l14_n115(x)
+ if (x < 1)
+ fun_l15_n130(x)
+ else
+ fun_l15_n266(x)
+ end
+end
+
+def fun_l14_n116(x)
+ if (x < 1)
+ fun_l15_n32(x)
+ else
+ fun_l15_n63(x)
+ end
+end
+
+def fun_l14_n117(x)
+ if (x < 1)
+ fun_l15_n117(x)
+ else
+ fun_l15_n659(x)
+ end
+end
+
+def fun_l14_n118(x)
+ if (x < 1)
+ fun_l15_n607(x)
+ else
+ fun_l15_n516(x)
+ end
+end
+
+def fun_l14_n119(x)
+ if (x < 1)
+ fun_l15_n30(x)
+ else
+ fun_l15_n130(x)
+ end
+end
+
+def fun_l14_n120(x)
+ if (x < 1)
+ fun_l15_n510(x)
+ else
+ fun_l15_n789(x)
+ end
+end
+
+def fun_l14_n121(x)
+ if (x < 1)
+ fun_l15_n906(x)
+ else
+ fun_l15_n700(x)
+ end
+end
+
+def fun_l14_n122(x)
+ if (x < 1)
+ fun_l15_n51(x)
+ else
+ fun_l15_n378(x)
+ end
+end
+
+def fun_l14_n123(x)
+ if (x < 1)
+ fun_l15_n243(x)
+ else
+ fun_l15_n896(x)
+ end
+end
+
+def fun_l14_n124(x)
+ if (x < 1)
+ fun_l15_n23(x)
+ else
+ fun_l15_n648(x)
+ end
+end
+
+def fun_l14_n125(x)
+ if (x < 1)
+ fun_l15_n290(x)
+ else
+ fun_l15_n604(x)
+ end
+end
+
+def fun_l14_n126(x)
+ if (x < 1)
+ fun_l15_n410(x)
+ else
+ fun_l15_n646(x)
+ end
+end
+
+def fun_l14_n127(x)
+ if (x < 1)
+ fun_l15_n162(x)
+ else
+ fun_l15_n43(x)
+ end
+end
+
+def fun_l14_n128(x)
+ if (x < 1)
+ fun_l15_n775(x)
+ else
+ fun_l15_n176(x)
+ end
+end
+
+def fun_l14_n129(x)
+ if (x < 1)
+ fun_l15_n642(x)
+ else
+ fun_l15_n709(x)
+ end
+end
+
+def fun_l14_n130(x)
+ if (x < 1)
+ fun_l15_n669(x)
+ else
+ fun_l15_n936(x)
+ end
+end
+
+def fun_l14_n131(x)
+ if (x < 1)
+ fun_l15_n301(x)
+ else
+ fun_l15_n578(x)
+ end
+end
+
+def fun_l14_n132(x)
+ if (x < 1)
+ fun_l15_n112(x)
+ else
+ fun_l15_n72(x)
+ end
+end
+
+def fun_l14_n133(x)
+ if (x < 1)
+ fun_l15_n293(x)
+ else
+ fun_l15_n516(x)
+ end
+end
+
+def fun_l14_n134(x)
+ if (x < 1)
+ fun_l15_n525(x)
+ else
+ fun_l15_n199(x)
+ end
+end
+
+def fun_l14_n135(x)
+ if (x < 1)
+ fun_l15_n168(x)
+ else
+ fun_l15_n430(x)
+ end
+end
+
+def fun_l14_n136(x)
+ if (x < 1)
+ fun_l15_n889(x)
+ else
+ fun_l15_n635(x)
+ end
+end
+
+def fun_l14_n137(x)
+ if (x < 1)
+ fun_l15_n348(x)
+ else
+ fun_l15_n445(x)
+ end
+end
+
+def fun_l14_n138(x)
+ if (x < 1)
+ fun_l15_n828(x)
+ else
+ fun_l15_n23(x)
+ end
+end
+
+def fun_l14_n139(x)
+ if (x < 1)
+ fun_l15_n621(x)
+ else
+ fun_l15_n25(x)
+ end
+end
+
+def fun_l14_n140(x)
+ if (x < 1)
+ fun_l15_n268(x)
+ else
+ fun_l15_n105(x)
+ end
+end
+
+def fun_l14_n141(x)
+ if (x < 1)
+ fun_l15_n296(x)
+ else
+ fun_l15_n856(x)
+ end
+end
+
+def fun_l14_n142(x)
+ if (x < 1)
+ fun_l15_n206(x)
+ else
+ fun_l15_n417(x)
+ end
+end
+
+def fun_l14_n143(x)
+ if (x < 1)
+ fun_l15_n203(x)
+ else
+ fun_l15_n240(x)
+ end
+end
+
+def fun_l14_n144(x)
+ if (x < 1)
+ fun_l15_n556(x)
+ else
+ fun_l15_n47(x)
+ end
+end
+
+def fun_l14_n145(x)
+ if (x < 1)
+ fun_l15_n340(x)
+ else
+ fun_l15_n511(x)
+ end
+end
+
+def fun_l14_n146(x)
+ if (x < 1)
+ fun_l15_n250(x)
+ else
+ fun_l15_n402(x)
+ end
+end
+
+def fun_l14_n147(x)
+ if (x < 1)
+ fun_l15_n4(x)
+ else
+ fun_l15_n26(x)
+ end
+end
+
+def fun_l14_n148(x)
+ if (x < 1)
+ fun_l15_n52(x)
+ else
+ fun_l15_n366(x)
+ end
+end
+
+def fun_l14_n149(x)
+ if (x < 1)
+ fun_l15_n163(x)
+ else
+ fun_l15_n884(x)
+ end
+end
+
+def fun_l14_n150(x)
+ if (x < 1)
+ fun_l15_n677(x)
+ else
+ fun_l15_n509(x)
+ end
+end
+
+def fun_l14_n151(x)
+ if (x < 1)
+ fun_l15_n949(x)
+ else
+ fun_l15_n393(x)
+ end
+end
+
+def fun_l14_n152(x)
+ if (x < 1)
+ fun_l15_n719(x)
+ else
+ fun_l15_n307(x)
+ end
+end
+
+def fun_l14_n153(x)
+ if (x < 1)
+ fun_l15_n12(x)
+ else
+ fun_l15_n985(x)
+ end
+end
+
+def fun_l14_n154(x)
+ if (x < 1)
+ fun_l15_n639(x)
+ else
+ fun_l15_n367(x)
+ end
+end
+
+def fun_l14_n155(x)
+ if (x < 1)
+ fun_l15_n401(x)
+ else
+ fun_l15_n431(x)
+ end
+end
+
+def fun_l14_n156(x)
+ if (x < 1)
+ fun_l15_n897(x)
+ else
+ fun_l15_n136(x)
+ end
+end
+
+def fun_l14_n157(x)
+ if (x < 1)
+ fun_l15_n792(x)
+ else
+ fun_l15_n865(x)
+ end
+end
+
+def fun_l14_n158(x)
+ if (x < 1)
+ fun_l15_n851(x)
+ else
+ fun_l15_n167(x)
+ end
+end
+
+def fun_l14_n159(x)
+ if (x < 1)
+ fun_l15_n643(x)
+ else
+ fun_l15_n458(x)
+ end
+end
+
+def fun_l14_n160(x)
+ if (x < 1)
+ fun_l15_n539(x)
+ else
+ fun_l15_n36(x)
+ end
+end
+
+def fun_l14_n161(x)
+ if (x < 1)
+ fun_l15_n91(x)
+ else
+ fun_l15_n130(x)
+ end
+end
+
+def fun_l14_n162(x)
+ if (x < 1)
+ fun_l15_n214(x)
+ else
+ fun_l15_n712(x)
+ end
+end
+
+def fun_l14_n163(x)
+ if (x < 1)
+ fun_l15_n47(x)
+ else
+ fun_l15_n799(x)
+ end
+end
+
+def fun_l14_n164(x)
+ if (x < 1)
+ fun_l15_n715(x)
+ else
+ fun_l15_n888(x)
+ end
+end
+
+def fun_l14_n165(x)
+ if (x < 1)
+ fun_l15_n904(x)
+ else
+ fun_l15_n484(x)
+ end
+end
+
+def fun_l14_n166(x)
+ if (x < 1)
+ fun_l15_n870(x)
+ else
+ fun_l15_n121(x)
+ end
+end
+
+def fun_l14_n167(x)
+ if (x < 1)
+ fun_l15_n960(x)
+ else
+ fun_l15_n33(x)
+ end
+end
+
+def fun_l14_n168(x)
+ if (x < 1)
+ fun_l15_n16(x)
+ else
+ fun_l15_n24(x)
+ end
+end
+
+def fun_l14_n169(x)
+ if (x < 1)
+ fun_l15_n913(x)
+ else
+ fun_l15_n793(x)
+ end
+end
+
+def fun_l14_n170(x)
+ if (x < 1)
+ fun_l15_n35(x)
+ else
+ fun_l15_n204(x)
+ end
+end
+
+def fun_l14_n171(x)
+ if (x < 1)
+ fun_l15_n526(x)
+ else
+ fun_l15_n92(x)
+ end
+end
+
+def fun_l14_n172(x)
+ if (x < 1)
+ fun_l15_n648(x)
+ else
+ fun_l15_n535(x)
+ end
+end
+
+def fun_l14_n173(x)
+ if (x < 1)
+ fun_l15_n415(x)
+ else
+ fun_l15_n610(x)
+ end
+end
+
+def fun_l14_n174(x)
+ if (x < 1)
+ fun_l15_n352(x)
+ else
+ fun_l15_n256(x)
+ end
+end
+
+def fun_l14_n175(x)
+ if (x < 1)
+ fun_l15_n692(x)
+ else
+ fun_l15_n686(x)
+ end
+end
+
+def fun_l14_n176(x)
+ if (x < 1)
+ fun_l15_n189(x)
+ else
+ fun_l15_n307(x)
+ end
+end
+
+def fun_l14_n177(x)
+ if (x < 1)
+ fun_l15_n725(x)
+ else
+ fun_l15_n714(x)
+ end
+end
+
+def fun_l14_n178(x)
+ if (x < 1)
+ fun_l15_n43(x)
+ else
+ fun_l15_n392(x)
+ end
+end
+
+def fun_l14_n179(x)
+ if (x < 1)
+ fun_l15_n890(x)
+ else
+ fun_l15_n887(x)
+ end
+end
+
+def fun_l14_n180(x)
+ if (x < 1)
+ fun_l15_n499(x)
+ else
+ fun_l15_n729(x)
+ end
+end
+
+def fun_l14_n181(x)
+ if (x < 1)
+ fun_l15_n714(x)
+ else
+ fun_l15_n417(x)
+ end
+end
+
+def fun_l14_n182(x)
+ if (x < 1)
+ fun_l15_n935(x)
+ else
+ fun_l15_n671(x)
+ end
+end
+
+def fun_l14_n183(x)
+ if (x < 1)
+ fun_l15_n123(x)
+ else
+ fun_l15_n349(x)
+ end
+end
+
+def fun_l14_n184(x)
+ if (x < 1)
+ fun_l15_n653(x)
+ else
+ fun_l15_n160(x)
+ end
+end
+
+def fun_l14_n185(x)
+ if (x < 1)
+ fun_l15_n43(x)
+ else
+ fun_l15_n965(x)
+ end
+end
+
+def fun_l14_n186(x)
+ if (x < 1)
+ fun_l15_n38(x)
+ else
+ fun_l15_n411(x)
+ end
+end
+
+def fun_l14_n187(x)
+ if (x < 1)
+ fun_l15_n788(x)
+ else
+ fun_l15_n297(x)
+ end
+end
+
+def fun_l14_n188(x)
+ if (x < 1)
+ fun_l15_n83(x)
+ else
+ fun_l15_n784(x)
+ end
+end
+
+def fun_l14_n189(x)
+ if (x < 1)
+ fun_l15_n403(x)
+ else
+ fun_l15_n469(x)
+ end
+end
+
+def fun_l14_n190(x)
+ if (x < 1)
+ fun_l15_n77(x)
+ else
+ fun_l15_n55(x)
+ end
+end
+
+def fun_l14_n191(x)
+ if (x < 1)
+ fun_l15_n835(x)
+ else
+ fun_l15_n462(x)
+ end
+end
+
+def fun_l14_n192(x)
+ if (x < 1)
+ fun_l15_n830(x)
+ else
+ fun_l15_n680(x)
+ end
+end
+
+def fun_l14_n193(x)
+ if (x < 1)
+ fun_l15_n750(x)
+ else
+ fun_l15_n580(x)
+ end
+end
+
+def fun_l14_n194(x)
+ if (x < 1)
+ fun_l15_n668(x)
+ else
+ fun_l15_n911(x)
+ end
+end
+
+def fun_l14_n195(x)
+ if (x < 1)
+ fun_l15_n90(x)
+ else
+ fun_l15_n232(x)
+ end
+end
+
+def fun_l14_n196(x)
+ if (x < 1)
+ fun_l15_n936(x)
+ else
+ fun_l15_n127(x)
+ end
+end
+
+def fun_l14_n197(x)
+ if (x < 1)
+ fun_l15_n566(x)
+ else
+ fun_l15_n687(x)
+ end
+end
+
+def fun_l14_n198(x)
+ if (x < 1)
+ fun_l15_n797(x)
+ else
+ fun_l15_n835(x)
+ end
+end
+
+def fun_l14_n199(x)
+ if (x < 1)
+ fun_l15_n96(x)
+ else
+ fun_l15_n917(x)
+ end
+end
+
+def fun_l14_n200(x)
+ if (x < 1)
+ fun_l15_n891(x)
+ else
+ fun_l15_n566(x)
+ end
+end
+
+def fun_l14_n201(x)
+ if (x < 1)
+ fun_l15_n697(x)
+ else
+ fun_l15_n218(x)
+ end
+end
+
+def fun_l14_n202(x)
+ if (x < 1)
+ fun_l15_n802(x)
+ else
+ fun_l15_n977(x)
+ end
+end
+
+def fun_l14_n203(x)
+ if (x < 1)
+ fun_l15_n38(x)
+ else
+ fun_l15_n992(x)
+ end
+end
+
+def fun_l14_n204(x)
+ if (x < 1)
+ fun_l15_n591(x)
+ else
+ fun_l15_n394(x)
+ end
+end
+
+def fun_l14_n205(x)
+ if (x < 1)
+ fun_l15_n552(x)
+ else
+ fun_l15_n522(x)
+ end
+end
+
+def fun_l14_n206(x)
+ if (x < 1)
+ fun_l15_n90(x)
+ else
+ fun_l15_n470(x)
+ end
+end
+
+def fun_l14_n207(x)
+ if (x < 1)
+ fun_l15_n92(x)
+ else
+ fun_l15_n148(x)
+ end
+end
+
+def fun_l14_n208(x)
+ if (x < 1)
+ fun_l15_n954(x)
+ else
+ fun_l15_n769(x)
+ end
+end
+
+def fun_l14_n209(x)
+ if (x < 1)
+ fun_l15_n32(x)
+ else
+ fun_l15_n211(x)
+ end
+end
+
+def fun_l14_n210(x)
+ if (x < 1)
+ fun_l15_n338(x)
+ else
+ fun_l15_n678(x)
+ end
+end
+
+def fun_l14_n211(x)
+ if (x < 1)
+ fun_l15_n113(x)
+ else
+ fun_l15_n605(x)
+ end
+end
+
+def fun_l14_n212(x)
+ if (x < 1)
+ fun_l15_n359(x)
+ else
+ fun_l15_n970(x)
+ end
+end
+
+def fun_l14_n213(x)
+ if (x < 1)
+ fun_l15_n437(x)
+ else
+ fun_l15_n279(x)
+ end
+end
+
+def fun_l14_n214(x)
+ if (x < 1)
+ fun_l15_n782(x)
+ else
+ fun_l15_n344(x)
+ end
+end
+
+def fun_l14_n215(x)
+ if (x < 1)
+ fun_l15_n501(x)
+ else
+ fun_l15_n19(x)
+ end
+end
+
+def fun_l14_n216(x)
+ if (x < 1)
+ fun_l15_n525(x)
+ else
+ fun_l15_n269(x)
+ end
+end
+
+def fun_l14_n217(x)
+ if (x < 1)
+ fun_l15_n35(x)
+ else
+ fun_l15_n786(x)
+ end
+end
+
+def fun_l14_n218(x)
+ if (x < 1)
+ fun_l15_n759(x)
+ else
+ fun_l15_n547(x)
+ end
+end
+
+def fun_l14_n219(x)
+ if (x < 1)
+ fun_l15_n260(x)
+ else
+ fun_l15_n155(x)
+ end
+end
+
+def fun_l14_n220(x)
+ if (x < 1)
+ fun_l15_n691(x)
+ else
+ fun_l15_n969(x)
+ end
+end
+
+def fun_l14_n221(x)
+ if (x < 1)
+ fun_l15_n632(x)
+ else
+ fun_l15_n803(x)
+ end
+end
+
+def fun_l14_n222(x)
+ if (x < 1)
+ fun_l15_n652(x)
+ else
+ fun_l15_n70(x)
+ end
+end
+
+def fun_l14_n223(x)
+ if (x < 1)
+ fun_l15_n710(x)
+ else
+ fun_l15_n873(x)
+ end
+end
+
+def fun_l14_n224(x)
+ if (x < 1)
+ fun_l15_n3(x)
+ else
+ fun_l15_n509(x)
+ end
+end
+
+def fun_l14_n225(x)
+ if (x < 1)
+ fun_l15_n37(x)
+ else
+ fun_l15_n814(x)
+ end
+end
+
+def fun_l14_n226(x)
+ if (x < 1)
+ fun_l15_n88(x)
+ else
+ fun_l15_n683(x)
+ end
+end
+
+def fun_l14_n227(x)
+ if (x < 1)
+ fun_l15_n898(x)
+ else
+ fun_l15_n996(x)
+ end
+end
+
+def fun_l14_n228(x)
+ if (x < 1)
+ fun_l15_n510(x)
+ else
+ fun_l15_n315(x)
+ end
+end
+
+def fun_l14_n229(x)
+ if (x < 1)
+ fun_l15_n509(x)
+ else
+ fun_l15_n75(x)
+ end
+end
+
+def fun_l14_n230(x)
+ if (x < 1)
+ fun_l15_n184(x)
+ else
+ fun_l15_n650(x)
+ end
+end
+
+def fun_l14_n231(x)
+ if (x < 1)
+ fun_l15_n227(x)
+ else
+ fun_l15_n607(x)
+ end
+end
+
+def fun_l14_n232(x)
+ if (x < 1)
+ fun_l15_n245(x)
+ else
+ fun_l15_n347(x)
+ end
+end
+
+def fun_l14_n233(x)
+ if (x < 1)
+ fun_l15_n728(x)
+ else
+ fun_l15_n457(x)
+ end
+end
+
+def fun_l14_n234(x)
+ if (x < 1)
+ fun_l15_n619(x)
+ else
+ fun_l15_n936(x)
+ end
+end
+
+def fun_l14_n235(x)
+ if (x < 1)
+ fun_l15_n855(x)
+ else
+ fun_l15_n774(x)
+ end
+end
+
+def fun_l14_n236(x)
+ if (x < 1)
+ fun_l15_n217(x)
+ else
+ fun_l15_n908(x)
+ end
+end
+
+def fun_l14_n237(x)
+ if (x < 1)
+ fun_l15_n537(x)
+ else
+ fun_l15_n441(x)
+ end
+end
+
+def fun_l14_n238(x)
+ if (x < 1)
+ fun_l15_n930(x)
+ else
+ fun_l15_n601(x)
+ end
+end
+
+def fun_l14_n239(x)
+ if (x < 1)
+ fun_l15_n976(x)
+ else
+ fun_l15_n903(x)
+ end
+end
+
+def fun_l14_n240(x)
+ if (x < 1)
+ fun_l15_n792(x)
+ else
+ fun_l15_n882(x)
+ end
+end
+
+def fun_l14_n241(x)
+ if (x < 1)
+ fun_l15_n662(x)
+ else
+ fun_l15_n197(x)
+ end
+end
+
+def fun_l14_n242(x)
+ if (x < 1)
+ fun_l15_n839(x)
+ else
+ fun_l15_n486(x)
+ end
+end
+
+def fun_l14_n243(x)
+ if (x < 1)
+ fun_l15_n122(x)
+ else
+ fun_l15_n165(x)
+ end
+end
+
+def fun_l14_n244(x)
+ if (x < 1)
+ fun_l15_n209(x)
+ else
+ fun_l15_n977(x)
+ end
+end
+
+def fun_l14_n245(x)
+ if (x < 1)
+ fun_l15_n231(x)
+ else
+ fun_l15_n318(x)
+ end
+end
+
+def fun_l14_n246(x)
+ if (x < 1)
+ fun_l15_n53(x)
+ else
+ fun_l15_n995(x)
+ end
+end
+
+def fun_l14_n247(x)
+ if (x < 1)
+ fun_l15_n276(x)
+ else
+ fun_l15_n458(x)
+ end
+end
+
+def fun_l14_n248(x)
+ if (x < 1)
+ fun_l15_n964(x)
+ else
+ fun_l15_n753(x)
+ end
+end
+
+def fun_l14_n249(x)
+ if (x < 1)
+ fun_l15_n964(x)
+ else
+ fun_l15_n783(x)
+ end
+end
+
+def fun_l14_n250(x)
+ if (x < 1)
+ fun_l15_n865(x)
+ else
+ fun_l15_n736(x)
+ end
+end
+
+def fun_l14_n251(x)
+ if (x < 1)
+ fun_l15_n861(x)
+ else
+ fun_l15_n414(x)
+ end
+end
+
+def fun_l14_n252(x)
+ if (x < 1)
+ fun_l15_n327(x)
+ else
+ fun_l15_n440(x)
+ end
+end
+
+def fun_l14_n253(x)
+ if (x < 1)
+ fun_l15_n800(x)
+ else
+ fun_l15_n186(x)
+ end
+end
+
+def fun_l14_n254(x)
+ if (x < 1)
+ fun_l15_n687(x)
+ else
+ fun_l15_n245(x)
+ end
+end
+
+def fun_l14_n255(x)
+ if (x < 1)
+ fun_l15_n421(x)
+ else
+ fun_l15_n421(x)
+ end
+end
+
+def fun_l14_n256(x)
+ if (x < 1)
+ fun_l15_n417(x)
+ else
+ fun_l15_n975(x)
+ end
+end
+
+def fun_l14_n257(x)
+ if (x < 1)
+ fun_l15_n835(x)
+ else
+ fun_l15_n697(x)
+ end
+end
+
+def fun_l14_n258(x)
+ if (x < 1)
+ fun_l15_n433(x)
+ else
+ fun_l15_n811(x)
+ end
+end
+
+def fun_l14_n259(x)
+ if (x < 1)
+ fun_l15_n473(x)
+ else
+ fun_l15_n747(x)
+ end
+end
+
+def fun_l14_n260(x)
+ if (x < 1)
+ fun_l15_n636(x)
+ else
+ fun_l15_n718(x)
+ end
+end
+
+def fun_l14_n261(x)
+ if (x < 1)
+ fun_l15_n472(x)
+ else
+ fun_l15_n971(x)
+ end
+end
+
+def fun_l14_n262(x)
+ if (x < 1)
+ fun_l15_n91(x)
+ else
+ fun_l15_n18(x)
+ end
+end
+
+def fun_l14_n263(x)
+ if (x < 1)
+ fun_l15_n582(x)
+ else
+ fun_l15_n629(x)
+ end
+end
+
+def fun_l14_n264(x)
+ if (x < 1)
+ fun_l15_n493(x)
+ else
+ fun_l15_n718(x)
+ end
+end
+
+def fun_l14_n265(x)
+ if (x < 1)
+ fun_l15_n857(x)
+ else
+ fun_l15_n134(x)
+ end
+end
+
+def fun_l14_n266(x)
+ if (x < 1)
+ fun_l15_n351(x)
+ else
+ fun_l15_n454(x)
+ end
+end
+
+def fun_l14_n267(x)
+ if (x < 1)
+ fun_l15_n578(x)
+ else
+ fun_l15_n453(x)
+ end
+end
+
+def fun_l14_n268(x)
+ if (x < 1)
+ fun_l15_n679(x)
+ else
+ fun_l15_n886(x)
+ end
+end
+
+def fun_l14_n269(x)
+ if (x < 1)
+ fun_l15_n446(x)
+ else
+ fun_l15_n7(x)
+ end
+end
+
+def fun_l14_n270(x)
+ if (x < 1)
+ fun_l15_n375(x)
+ else
+ fun_l15_n83(x)
+ end
+end
+
+def fun_l14_n271(x)
+ if (x < 1)
+ fun_l15_n688(x)
+ else
+ fun_l15_n863(x)
+ end
+end
+
+def fun_l14_n272(x)
+ if (x < 1)
+ fun_l15_n382(x)
+ else
+ fun_l15_n997(x)
+ end
+end
+
+def fun_l14_n273(x)
+ if (x < 1)
+ fun_l15_n281(x)
+ else
+ fun_l15_n909(x)
+ end
+end
+
+def fun_l14_n274(x)
+ if (x < 1)
+ fun_l15_n618(x)
+ else
+ fun_l15_n967(x)
+ end
+end
+
+def fun_l14_n275(x)
+ if (x < 1)
+ fun_l15_n651(x)
+ else
+ fun_l15_n826(x)
+ end
+end
+
+def fun_l14_n276(x)
+ if (x < 1)
+ fun_l15_n326(x)
+ else
+ fun_l15_n11(x)
+ end
+end
+
+def fun_l14_n277(x)
+ if (x < 1)
+ fun_l15_n193(x)
+ else
+ fun_l15_n719(x)
+ end
+end
+
+def fun_l14_n278(x)
+ if (x < 1)
+ fun_l15_n973(x)
+ else
+ fun_l15_n313(x)
+ end
+end
+
+def fun_l14_n279(x)
+ if (x < 1)
+ fun_l15_n33(x)
+ else
+ fun_l15_n526(x)
+ end
+end
+
+def fun_l14_n280(x)
+ if (x < 1)
+ fun_l15_n334(x)
+ else
+ fun_l15_n158(x)
+ end
+end
+
+def fun_l14_n281(x)
+ if (x < 1)
+ fun_l15_n627(x)
+ else
+ fun_l15_n346(x)
+ end
+end
+
+def fun_l14_n282(x)
+ if (x < 1)
+ fun_l15_n537(x)
+ else
+ fun_l15_n198(x)
+ end
+end
+
+def fun_l14_n283(x)
+ if (x < 1)
+ fun_l15_n779(x)
+ else
+ fun_l15_n0(x)
+ end
+end
+
+def fun_l14_n284(x)
+ if (x < 1)
+ fun_l15_n487(x)
+ else
+ fun_l15_n489(x)
+ end
+end
+
+def fun_l14_n285(x)
+ if (x < 1)
+ fun_l15_n793(x)
+ else
+ fun_l15_n803(x)
+ end
+end
+
+def fun_l14_n286(x)
+ if (x < 1)
+ fun_l15_n206(x)
+ else
+ fun_l15_n936(x)
+ end
+end
+
+def fun_l14_n287(x)
+ if (x < 1)
+ fun_l15_n223(x)
+ else
+ fun_l15_n278(x)
+ end
+end
+
+def fun_l14_n288(x)
+ if (x < 1)
+ fun_l15_n601(x)
+ else
+ fun_l15_n251(x)
+ end
+end
+
+def fun_l14_n289(x)
+ if (x < 1)
+ fun_l15_n144(x)
+ else
+ fun_l15_n420(x)
+ end
+end
+
+def fun_l14_n290(x)
+ if (x < 1)
+ fun_l15_n964(x)
+ else
+ fun_l15_n319(x)
+ end
+end
+
+def fun_l14_n291(x)
+ if (x < 1)
+ fun_l15_n385(x)
+ else
+ fun_l15_n498(x)
+ end
+end
+
+def fun_l14_n292(x)
+ if (x < 1)
+ fun_l15_n19(x)
+ else
+ fun_l15_n959(x)
+ end
+end
+
+def fun_l14_n293(x)
+ if (x < 1)
+ fun_l15_n77(x)
+ else
+ fun_l15_n849(x)
+ end
+end
+
+def fun_l14_n294(x)
+ if (x < 1)
+ fun_l15_n96(x)
+ else
+ fun_l15_n964(x)
+ end
+end
+
+def fun_l14_n295(x)
+ if (x < 1)
+ fun_l15_n374(x)
+ else
+ fun_l15_n337(x)
+ end
+end
+
+def fun_l14_n296(x)
+ if (x < 1)
+ fun_l15_n210(x)
+ else
+ fun_l15_n621(x)
+ end
+end
+
+def fun_l14_n297(x)
+ if (x < 1)
+ fun_l15_n992(x)
+ else
+ fun_l15_n90(x)
+ end
+end
+
+def fun_l14_n298(x)
+ if (x < 1)
+ fun_l15_n442(x)
+ else
+ fun_l15_n799(x)
+ end
+end
+
+def fun_l14_n299(x)
+ if (x < 1)
+ fun_l15_n133(x)
+ else
+ fun_l15_n21(x)
+ end
+end
+
+def fun_l14_n300(x)
+ if (x < 1)
+ fun_l15_n619(x)
+ else
+ fun_l15_n46(x)
+ end
+end
+
+def fun_l14_n301(x)
+ if (x < 1)
+ fun_l15_n359(x)
+ else
+ fun_l15_n386(x)
+ end
+end
+
+def fun_l14_n302(x)
+ if (x < 1)
+ fun_l15_n163(x)
+ else
+ fun_l15_n197(x)
+ end
+end
+
+def fun_l14_n303(x)
+ if (x < 1)
+ fun_l15_n382(x)
+ else
+ fun_l15_n693(x)
+ end
+end
+
+def fun_l14_n304(x)
+ if (x < 1)
+ fun_l15_n700(x)
+ else
+ fun_l15_n167(x)
+ end
+end
+
+def fun_l14_n305(x)
+ if (x < 1)
+ fun_l15_n124(x)
+ else
+ fun_l15_n448(x)
+ end
+end
+
+def fun_l14_n306(x)
+ if (x < 1)
+ fun_l15_n829(x)
+ else
+ fun_l15_n986(x)
+ end
+end
+
+def fun_l14_n307(x)
+ if (x < 1)
+ fun_l15_n39(x)
+ else
+ fun_l15_n557(x)
+ end
+end
+
+def fun_l14_n308(x)
+ if (x < 1)
+ fun_l15_n495(x)
+ else
+ fun_l15_n259(x)
+ end
+end
+
+def fun_l14_n309(x)
+ if (x < 1)
+ fun_l15_n462(x)
+ else
+ fun_l15_n121(x)
+ end
+end
+
+def fun_l14_n310(x)
+ if (x < 1)
+ fun_l15_n110(x)
+ else
+ fun_l15_n159(x)
+ end
+end
+
+def fun_l14_n311(x)
+ if (x < 1)
+ fun_l15_n144(x)
+ else
+ fun_l15_n969(x)
+ end
+end
+
+def fun_l14_n312(x)
+ if (x < 1)
+ fun_l15_n679(x)
+ else
+ fun_l15_n610(x)
+ end
+end
+
+def fun_l14_n313(x)
+ if (x < 1)
+ fun_l15_n332(x)
+ else
+ fun_l15_n759(x)
+ end
+end
+
+def fun_l14_n314(x)
+ if (x < 1)
+ fun_l15_n819(x)
+ else
+ fun_l15_n595(x)
+ end
+end
+
+def fun_l14_n315(x)
+ if (x < 1)
+ fun_l15_n180(x)
+ else
+ fun_l15_n555(x)
+ end
+end
+
+def fun_l14_n316(x)
+ if (x < 1)
+ fun_l15_n218(x)
+ else
+ fun_l15_n844(x)
+ end
+end
+
+def fun_l14_n317(x)
+ if (x < 1)
+ fun_l15_n486(x)
+ else
+ fun_l15_n666(x)
+ end
+end
+
+def fun_l14_n318(x)
+ if (x < 1)
+ fun_l15_n277(x)
+ else
+ fun_l15_n486(x)
+ end
+end
+
+def fun_l14_n319(x)
+ if (x < 1)
+ fun_l15_n874(x)
+ else
+ fun_l15_n802(x)
+ end
+end
+
+def fun_l14_n320(x)
+ if (x < 1)
+ fun_l15_n717(x)
+ else
+ fun_l15_n348(x)
+ end
+end
+
+def fun_l14_n321(x)
+ if (x < 1)
+ fun_l15_n701(x)
+ else
+ fun_l15_n897(x)
+ end
+end
+
+def fun_l14_n322(x)
+ if (x < 1)
+ fun_l15_n229(x)
+ else
+ fun_l15_n976(x)
+ end
+end
+
+def fun_l14_n323(x)
+ if (x < 1)
+ fun_l15_n288(x)
+ else
+ fun_l15_n801(x)
+ end
+end
+
+def fun_l14_n324(x)
+ if (x < 1)
+ fun_l15_n25(x)
+ else
+ fun_l15_n566(x)
+ end
+end
+
+def fun_l14_n325(x)
+ if (x < 1)
+ fun_l15_n489(x)
+ else
+ fun_l15_n165(x)
+ end
+end
+
+def fun_l14_n326(x)
+ if (x < 1)
+ fun_l15_n646(x)
+ else
+ fun_l15_n529(x)
+ end
+end
+
+def fun_l14_n327(x)
+ if (x < 1)
+ fun_l15_n126(x)
+ else
+ fun_l15_n247(x)
+ end
+end
+
+def fun_l14_n328(x)
+ if (x < 1)
+ fun_l15_n180(x)
+ else
+ fun_l15_n838(x)
+ end
+end
+
+def fun_l14_n329(x)
+ if (x < 1)
+ fun_l15_n827(x)
+ else
+ fun_l15_n251(x)
+ end
+end
+
+def fun_l14_n330(x)
+ if (x < 1)
+ fun_l15_n232(x)
+ else
+ fun_l15_n371(x)
+ end
+end
+
+def fun_l14_n331(x)
+ if (x < 1)
+ fun_l15_n742(x)
+ else
+ fun_l15_n365(x)
+ end
+end
+
+def fun_l14_n332(x)
+ if (x < 1)
+ fun_l15_n254(x)
+ else
+ fun_l15_n895(x)
+ end
+end
+
+def fun_l14_n333(x)
+ if (x < 1)
+ fun_l15_n267(x)
+ else
+ fun_l15_n716(x)
+ end
+end
+
+def fun_l14_n334(x)
+ if (x < 1)
+ fun_l15_n907(x)
+ else
+ fun_l15_n846(x)
+ end
+end
+
+def fun_l14_n335(x)
+ if (x < 1)
+ fun_l15_n432(x)
+ else
+ fun_l15_n207(x)
+ end
+end
+
+def fun_l14_n336(x)
+ if (x < 1)
+ fun_l15_n342(x)
+ else
+ fun_l15_n533(x)
+ end
+end
+
+def fun_l14_n337(x)
+ if (x < 1)
+ fun_l15_n155(x)
+ else
+ fun_l15_n626(x)
+ end
+end
+
+def fun_l14_n338(x)
+ if (x < 1)
+ fun_l15_n457(x)
+ else
+ fun_l15_n226(x)
+ end
+end
+
+def fun_l14_n339(x)
+ if (x < 1)
+ fun_l15_n621(x)
+ else
+ fun_l15_n685(x)
+ end
+end
+
+def fun_l14_n340(x)
+ if (x < 1)
+ fun_l15_n502(x)
+ else
+ fun_l15_n604(x)
+ end
+end
+
+def fun_l14_n341(x)
+ if (x < 1)
+ fun_l15_n578(x)
+ else
+ fun_l15_n250(x)
+ end
+end
+
+def fun_l14_n342(x)
+ if (x < 1)
+ fun_l15_n16(x)
+ else
+ fun_l15_n897(x)
+ end
+end
+
+def fun_l14_n343(x)
+ if (x < 1)
+ fun_l15_n173(x)
+ else
+ fun_l15_n441(x)
+ end
+end
+
+def fun_l14_n344(x)
+ if (x < 1)
+ fun_l15_n882(x)
+ else
+ fun_l15_n287(x)
+ end
+end
+
+def fun_l14_n345(x)
+ if (x < 1)
+ fun_l15_n549(x)
+ else
+ fun_l15_n559(x)
+ end
+end
+
+def fun_l14_n346(x)
+ if (x < 1)
+ fun_l15_n587(x)
+ else
+ fun_l15_n712(x)
+ end
+end
+
+def fun_l14_n347(x)
+ if (x < 1)
+ fun_l15_n2(x)
+ else
+ fun_l15_n279(x)
+ end
+end
+
+def fun_l14_n348(x)
+ if (x < 1)
+ fun_l15_n602(x)
+ else
+ fun_l15_n801(x)
+ end
+end
+
+def fun_l14_n349(x)
+ if (x < 1)
+ fun_l15_n114(x)
+ else
+ fun_l15_n181(x)
+ end
+end
+
+def fun_l14_n350(x)
+ if (x < 1)
+ fun_l15_n751(x)
+ else
+ fun_l15_n760(x)
+ end
+end
+
+def fun_l14_n351(x)
+ if (x < 1)
+ fun_l15_n570(x)
+ else
+ fun_l15_n168(x)
+ end
+end
+
+def fun_l14_n352(x)
+ if (x < 1)
+ fun_l15_n342(x)
+ else
+ fun_l15_n401(x)
+ end
+end
+
+def fun_l14_n353(x)
+ if (x < 1)
+ fun_l15_n775(x)
+ else
+ fun_l15_n175(x)
+ end
+end
+
+def fun_l14_n354(x)
+ if (x < 1)
+ fun_l15_n0(x)
+ else
+ fun_l15_n831(x)
+ end
+end
+
+def fun_l14_n355(x)
+ if (x < 1)
+ fun_l15_n127(x)
+ else
+ fun_l15_n751(x)
+ end
+end
+
+def fun_l14_n356(x)
+ if (x < 1)
+ fun_l15_n57(x)
+ else
+ fun_l15_n58(x)
+ end
+end
+
+def fun_l14_n357(x)
+ if (x < 1)
+ fun_l15_n696(x)
+ else
+ fun_l15_n694(x)
+ end
+end
+
+def fun_l14_n358(x)
+ if (x < 1)
+ fun_l15_n240(x)
+ else
+ fun_l15_n525(x)
+ end
+end
+
+def fun_l14_n359(x)
+ if (x < 1)
+ fun_l15_n552(x)
+ else
+ fun_l15_n126(x)
+ end
+end
+
+def fun_l14_n360(x)
+ if (x < 1)
+ fun_l15_n435(x)
+ else
+ fun_l15_n24(x)
+ end
+end
+
+def fun_l14_n361(x)
+ if (x < 1)
+ fun_l15_n366(x)
+ else
+ fun_l15_n397(x)
+ end
+end
+
+def fun_l14_n362(x)
+ if (x < 1)
+ fun_l15_n626(x)
+ else
+ fun_l15_n288(x)
+ end
+end
+
+def fun_l14_n363(x)
+ if (x < 1)
+ fun_l15_n474(x)
+ else
+ fun_l15_n205(x)
+ end
+end
+
+def fun_l14_n364(x)
+ if (x < 1)
+ fun_l15_n299(x)
+ else
+ fun_l15_n9(x)
+ end
+end
+
+def fun_l14_n365(x)
+ if (x < 1)
+ fun_l15_n115(x)
+ else
+ fun_l15_n126(x)
+ end
+end
+
+def fun_l14_n366(x)
+ if (x < 1)
+ fun_l15_n777(x)
+ else
+ fun_l15_n714(x)
+ end
+end
+
+def fun_l14_n367(x)
+ if (x < 1)
+ fun_l15_n697(x)
+ else
+ fun_l15_n663(x)
+ end
+end
+
+def fun_l14_n368(x)
+ if (x < 1)
+ fun_l15_n72(x)
+ else
+ fun_l15_n339(x)
+ end
+end
+
+def fun_l14_n369(x)
+ if (x < 1)
+ fun_l15_n703(x)
+ else
+ fun_l15_n901(x)
+ end
+end
+
+def fun_l14_n370(x)
+ if (x < 1)
+ fun_l15_n38(x)
+ else
+ fun_l15_n920(x)
+ end
+end
+
+def fun_l14_n371(x)
+ if (x < 1)
+ fun_l15_n97(x)
+ else
+ fun_l15_n418(x)
+ end
+end
+
+def fun_l14_n372(x)
+ if (x < 1)
+ fun_l15_n831(x)
+ else
+ fun_l15_n295(x)
+ end
+end
+
+def fun_l14_n373(x)
+ if (x < 1)
+ fun_l15_n849(x)
+ else
+ fun_l15_n818(x)
+ end
+end
+
+def fun_l14_n374(x)
+ if (x < 1)
+ fun_l15_n308(x)
+ else
+ fun_l15_n379(x)
+ end
+end
+
+def fun_l14_n375(x)
+ if (x < 1)
+ fun_l15_n552(x)
+ else
+ fun_l15_n109(x)
+ end
+end
+
+def fun_l14_n376(x)
+ if (x < 1)
+ fun_l15_n444(x)
+ else
+ fun_l15_n509(x)
+ end
+end
+
+def fun_l14_n377(x)
+ if (x < 1)
+ fun_l15_n498(x)
+ else
+ fun_l15_n363(x)
+ end
+end
+
+def fun_l14_n378(x)
+ if (x < 1)
+ fun_l15_n475(x)
+ else
+ fun_l15_n250(x)
+ end
+end
+
+def fun_l14_n379(x)
+ if (x < 1)
+ fun_l15_n635(x)
+ else
+ fun_l15_n550(x)
+ end
+end
+
+def fun_l14_n380(x)
+ if (x < 1)
+ fun_l15_n835(x)
+ else
+ fun_l15_n261(x)
+ end
+end
+
+def fun_l14_n381(x)
+ if (x < 1)
+ fun_l15_n903(x)
+ else
+ fun_l15_n492(x)
+ end
+end
+
+def fun_l14_n382(x)
+ if (x < 1)
+ fun_l15_n447(x)
+ else
+ fun_l15_n570(x)
+ end
+end
+
+def fun_l14_n383(x)
+ if (x < 1)
+ fun_l15_n785(x)
+ else
+ fun_l15_n711(x)
+ end
+end
+
+def fun_l14_n384(x)
+ if (x < 1)
+ fun_l15_n321(x)
+ else
+ fun_l15_n966(x)
+ end
+end
+
+def fun_l14_n385(x)
+ if (x < 1)
+ fun_l15_n786(x)
+ else
+ fun_l15_n667(x)
+ end
+end
+
+def fun_l14_n386(x)
+ if (x < 1)
+ fun_l15_n954(x)
+ else
+ fun_l15_n101(x)
+ end
+end
+
+def fun_l14_n387(x)
+ if (x < 1)
+ fun_l15_n868(x)
+ else
+ fun_l15_n1(x)
+ end
+end
+
+def fun_l14_n388(x)
+ if (x < 1)
+ fun_l15_n380(x)
+ else
+ fun_l15_n949(x)
+ end
+end
+
+def fun_l14_n389(x)
+ if (x < 1)
+ fun_l15_n456(x)
+ else
+ fun_l15_n122(x)
+ end
+end
+
+def fun_l14_n390(x)
+ if (x < 1)
+ fun_l15_n644(x)
+ else
+ fun_l15_n601(x)
+ end
+end
+
+def fun_l14_n391(x)
+ if (x < 1)
+ fun_l15_n523(x)
+ else
+ fun_l15_n754(x)
+ end
+end
+
+def fun_l14_n392(x)
+ if (x < 1)
+ fun_l15_n882(x)
+ else
+ fun_l15_n453(x)
+ end
+end
+
+def fun_l14_n393(x)
+ if (x < 1)
+ fun_l15_n249(x)
+ else
+ fun_l15_n773(x)
+ end
+end
+
+def fun_l14_n394(x)
+ if (x < 1)
+ fun_l15_n453(x)
+ else
+ fun_l15_n490(x)
+ end
+end
+
+def fun_l14_n395(x)
+ if (x < 1)
+ fun_l15_n699(x)
+ else
+ fun_l15_n95(x)
+ end
+end
+
+def fun_l14_n396(x)
+ if (x < 1)
+ fun_l15_n726(x)
+ else
+ fun_l15_n632(x)
+ end
+end
+
+def fun_l14_n397(x)
+ if (x < 1)
+ fun_l15_n139(x)
+ else
+ fun_l15_n682(x)
+ end
+end
+
+def fun_l14_n398(x)
+ if (x < 1)
+ fun_l15_n246(x)
+ else
+ fun_l15_n74(x)
+ end
+end
+
+def fun_l14_n399(x)
+ if (x < 1)
+ fun_l15_n334(x)
+ else
+ fun_l15_n504(x)
+ end
+end
+
+def fun_l14_n400(x)
+ if (x < 1)
+ fun_l15_n450(x)
+ else
+ fun_l15_n778(x)
+ end
+end
+
+def fun_l14_n401(x)
+ if (x < 1)
+ fun_l15_n428(x)
+ else
+ fun_l15_n101(x)
+ end
+end
+
+def fun_l14_n402(x)
+ if (x < 1)
+ fun_l15_n779(x)
+ else
+ fun_l15_n924(x)
+ end
+end
+
+def fun_l14_n403(x)
+ if (x < 1)
+ fun_l15_n957(x)
+ else
+ fun_l15_n83(x)
+ end
+end
+
+def fun_l14_n404(x)
+ if (x < 1)
+ fun_l15_n0(x)
+ else
+ fun_l15_n781(x)
+ end
+end
+
+def fun_l14_n405(x)
+ if (x < 1)
+ fun_l15_n100(x)
+ else
+ fun_l15_n21(x)
+ end
+end
+
+def fun_l14_n406(x)
+ if (x < 1)
+ fun_l15_n262(x)
+ else
+ fun_l15_n925(x)
+ end
+end
+
+def fun_l14_n407(x)
+ if (x < 1)
+ fun_l15_n935(x)
+ else
+ fun_l15_n193(x)
+ end
+end
+
+def fun_l14_n408(x)
+ if (x < 1)
+ fun_l15_n140(x)
+ else
+ fun_l15_n459(x)
+ end
+end
+
+def fun_l14_n409(x)
+ if (x < 1)
+ fun_l15_n484(x)
+ else
+ fun_l15_n584(x)
+ end
+end
+
+def fun_l14_n410(x)
+ if (x < 1)
+ fun_l15_n762(x)
+ else
+ fun_l15_n640(x)
+ end
+end
+
+def fun_l14_n411(x)
+ if (x < 1)
+ fun_l15_n347(x)
+ else
+ fun_l15_n395(x)
+ end
+end
+
+def fun_l14_n412(x)
+ if (x < 1)
+ fun_l15_n809(x)
+ else
+ fun_l15_n105(x)
+ end
+end
+
+def fun_l14_n413(x)
+ if (x < 1)
+ fun_l15_n929(x)
+ else
+ fun_l15_n265(x)
+ end
+end
+
+def fun_l14_n414(x)
+ if (x < 1)
+ fun_l15_n228(x)
+ else
+ fun_l15_n88(x)
+ end
+end
+
+def fun_l14_n415(x)
+ if (x < 1)
+ fun_l15_n650(x)
+ else
+ fun_l15_n785(x)
+ end
+end
+
+def fun_l14_n416(x)
+ if (x < 1)
+ fun_l15_n806(x)
+ else
+ fun_l15_n743(x)
+ end
+end
+
+def fun_l14_n417(x)
+ if (x < 1)
+ fun_l15_n417(x)
+ else
+ fun_l15_n454(x)
+ end
+end
+
+def fun_l14_n418(x)
+ if (x < 1)
+ fun_l15_n571(x)
+ else
+ fun_l15_n651(x)
+ end
+end
+
+def fun_l14_n419(x)
+ if (x < 1)
+ fun_l15_n341(x)
+ else
+ fun_l15_n242(x)
+ end
+end
+
+def fun_l14_n420(x)
+ if (x < 1)
+ fun_l15_n613(x)
+ else
+ fun_l15_n339(x)
+ end
+end
+
+def fun_l14_n421(x)
+ if (x < 1)
+ fun_l15_n657(x)
+ else
+ fun_l15_n759(x)
+ end
+end
+
+def fun_l14_n422(x)
+ if (x < 1)
+ fun_l15_n33(x)
+ else
+ fun_l15_n669(x)
+ end
+end
+
+def fun_l14_n423(x)
+ if (x < 1)
+ fun_l15_n628(x)
+ else
+ fun_l15_n963(x)
+ end
+end
+
+def fun_l14_n424(x)
+ if (x < 1)
+ fun_l15_n940(x)
+ else
+ fun_l15_n773(x)
+ end
+end
+
+def fun_l14_n425(x)
+ if (x < 1)
+ fun_l15_n489(x)
+ else
+ fun_l15_n625(x)
+ end
+end
+
+def fun_l14_n426(x)
+ if (x < 1)
+ fun_l15_n501(x)
+ else
+ fun_l15_n278(x)
+ end
+end
+
+def fun_l14_n427(x)
+ if (x < 1)
+ fun_l15_n620(x)
+ else
+ fun_l15_n426(x)
+ end
+end
+
+def fun_l14_n428(x)
+ if (x < 1)
+ fun_l15_n606(x)
+ else
+ fun_l15_n123(x)
+ end
+end
+
+def fun_l14_n429(x)
+ if (x < 1)
+ fun_l15_n622(x)
+ else
+ fun_l15_n873(x)
+ end
+end
+
+def fun_l14_n430(x)
+ if (x < 1)
+ fun_l15_n660(x)
+ else
+ fun_l15_n736(x)
+ end
+end
+
+def fun_l14_n431(x)
+ if (x < 1)
+ fun_l15_n927(x)
+ else
+ fun_l15_n893(x)
+ end
+end
+
+def fun_l14_n432(x)
+ if (x < 1)
+ fun_l15_n492(x)
+ else
+ fun_l15_n947(x)
+ end
+end
+
+def fun_l14_n433(x)
+ if (x < 1)
+ fun_l15_n164(x)
+ else
+ fun_l15_n853(x)
+ end
+end
+
+def fun_l14_n434(x)
+ if (x < 1)
+ fun_l15_n730(x)
+ else
+ fun_l15_n265(x)
+ end
+end
+
+def fun_l14_n435(x)
+ if (x < 1)
+ fun_l15_n548(x)
+ else
+ fun_l15_n272(x)
+ end
+end
+
+def fun_l14_n436(x)
+ if (x < 1)
+ fun_l15_n944(x)
+ else
+ fun_l15_n344(x)
+ end
+end
+
+def fun_l14_n437(x)
+ if (x < 1)
+ fun_l15_n931(x)
+ else
+ fun_l15_n376(x)
+ end
+end
+
+def fun_l14_n438(x)
+ if (x < 1)
+ fun_l15_n261(x)
+ else
+ fun_l15_n270(x)
+ end
+end
+
+def fun_l14_n439(x)
+ if (x < 1)
+ fun_l15_n705(x)
+ else
+ fun_l15_n700(x)
+ end
+end
+
+def fun_l14_n440(x)
+ if (x < 1)
+ fun_l15_n115(x)
+ else
+ fun_l15_n964(x)
+ end
+end
+
+def fun_l14_n441(x)
+ if (x < 1)
+ fun_l15_n396(x)
+ else
+ fun_l15_n780(x)
+ end
+end
+
+def fun_l14_n442(x)
+ if (x < 1)
+ fun_l15_n813(x)
+ else
+ fun_l15_n25(x)
+ end
+end
+
+def fun_l14_n443(x)
+ if (x < 1)
+ fun_l15_n405(x)
+ else
+ fun_l15_n264(x)
+ end
+end
+
+def fun_l14_n444(x)
+ if (x < 1)
+ fun_l15_n816(x)
+ else
+ fun_l15_n857(x)
+ end
+end
+
+def fun_l14_n445(x)
+ if (x < 1)
+ fun_l15_n191(x)
+ else
+ fun_l15_n886(x)
+ end
+end
+
+def fun_l14_n446(x)
+ if (x < 1)
+ fun_l15_n415(x)
+ else
+ fun_l15_n611(x)
+ end
+end
+
+def fun_l14_n447(x)
+ if (x < 1)
+ fun_l15_n473(x)
+ else
+ fun_l15_n701(x)
+ end
+end
+
+def fun_l14_n448(x)
+ if (x < 1)
+ fun_l15_n532(x)
+ else
+ fun_l15_n501(x)
+ end
+end
+
+def fun_l14_n449(x)
+ if (x < 1)
+ fun_l15_n731(x)
+ else
+ fun_l15_n631(x)
+ end
+end
+
+def fun_l14_n450(x)
+ if (x < 1)
+ fun_l15_n75(x)
+ else
+ fun_l15_n356(x)
+ end
+end
+
+def fun_l14_n451(x)
+ if (x < 1)
+ fun_l15_n614(x)
+ else
+ fun_l15_n600(x)
+ end
+end
+
+def fun_l14_n452(x)
+ if (x < 1)
+ fun_l15_n592(x)
+ else
+ fun_l15_n995(x)
+ end
+end
+
+def fun_l14_n453(x)
+ if (x < 1)
+ fun_l15_n712(x)
+ else
+ fun_l15_n815(x)
+ end
+end
+
+def fun_l14_n454(x)
+ if (x < 1)
+ fun_l15_n859(x)
+ else
+ fun_l15_n560(x)
+ end
+end
+
+def fun_l14_n455(x)
+ if (x < 1)
+ fun_l15_n665(x)
+ else
+ fun_l15_n408(x)
+ end
+end
+
+def fun_l14_n456(x)
+ if (x < 1)
+ fun_l15_n693(x)
+ else
+ fun_l15_n491(x)
+ end
+end
+
+def fun_l14_n457(x)
+ if (x < 1)
+ fun_l15_n29(x)
+ else
+ fun_l15_n515(x)
+ end
+end
+
+def fun_l14_n458(x)
+ if (x < 1)
+ fun_l15_n598(x)
+ else
+ fun_l15_n448(x)
+ end
+end
+
+def fun_l14_n459(x)
+ if (x < 1)
+ fun_l15_n937(x)
+ else
+ fun_l15_n199(x)
+ end
+end
+
+def fun_l14_n460(x)
+ if (x < 1)
+ fun_l15_n950(x)
+ else
+ fun_l15_n874(x)
+ end
+end
+
+def fun_l14_n461(x)
+ if (x < 1)
+ fun_l15_n38(x)
+ else
+ fun_l15_n650(x)
+ end
+end
+
+def fun_l14_n462(x)
+ if (x < 1)
+ fun_l15_n366(x)
+ else
+ fun_l15_n271(x)
+ end
+end
+
+def fun_l14_n463(x)
+ if (x < 1)
+ fun_l15_n21(x)
+ else
+ fun_l15_n690(x)
+ end
+end
+
+def fun_l14_n464(x)
+ if (x < 1)
+ fun_l15_n660(x)
+ else
+ fun_l15_n71(x)
+ end
+end
+
+def fun_l14_n465(x)
+ if (x < 1)
+ fun_l15_n889(x)
+ else
+ fun_l15_n324(x)
+ end
+end
+
+def fun_l14_n466(x)
+ if (x < 1)
+ fun_l15_n808(x)
+ else
+ fun_l15_n532(x)
+ end
+end
+
+def fun_l14_n467(x)
+ if (x < 1)
+ fun_l15_n72(x)
+ else
+ fun_l15_n52(x)
+ end
+end
+
+def fun_l14_n468(x)
+ if (x < 1)
+ fun_l15_n563(x)
+ else
+ fun_l15_n327(x)
+ end
+end
+
+def fun_l14_n469(x)
+ if (x < 1)
+ fun_l15_n570(x)
+ else
+ fun_l15_n794(x)
+ end
+end
+
+def fun_l14_n470(x)
+ if (x < 1)
+ fun_l15_n8(x)
+ else
+ fun_l15_n594(x)
+ end
+end
+
+def fun_l14_n471(x)
+ if (x < 1)
+ fun_l15_n859(x)
+ else
+ fun_l15_n519(x)
+ end
+end
+
+def fun_l14_n472(x)
+ if (x < 1)
+ fun_l15_n539(x)
+ else
+ fun_l15_n432(x)
+ end
+end
+
+def fun_l14_n473(x)
+ if (x < 1)
+ fun_l15_n795(x)
+ else
+ fun_l15_n916(x)
+ end
+end
+
+def fun_l14_n474(x)
+ if (x < 1)
+ fun_l15_n851(x)
+ else
+ fun_l15_n157(x)
+ end
+end
+
+def fun_l14_n475(x)
+ if (x < 1)
+ fun_l15_n274(x)
+ else
+ fun_l15_n678(x)
+ end
+end
+
+def fun_l14_n476(x)
+ if (x < 1)
+ fun_l15_n221(x)
+ else
+ fun_l15_n906(x)
+ end
+end
+
+def fun_l14_n477(x)
+ if (x < 1)
+ fun_l15_n116(x)
+ else
+ fun_l15_n778(x)
+ end
+end
+
+def fun_l14_n478(x)
+ if (x < 1)
+ fun_l15_n715(x)
+ else
+ fun_l15_n855(x)
+ end
+end
+
+def fun_l14_n479(x)
+ if (x < 1)
+ fun_l15_n705(x)
+ else
+ fun_l15_n935(x)
+ end
+end
+
+def fun_l14_n480(x)
+ if (x < 1)
+ fun_l15_n119(x)
+ else
+ fun_l15_n559(x)
+ end
+end
+
+def fun_l14_n481(x)
+ if (x < 1)
+ fun_l15_n996(x)
+ else
+ fun_l15_n768(x)
+ end
+end
+
+def fun_l14_n482(x)
+ if (x < 1)
+ fun_l15_n619(x)
+ else
+ fun_l15_n475(x)
+ end
+end
+
+def fun_l14_n483(x)
+ if (x < 1)
+ fun_l15_n189(x)
+ else
+ fun_l15_n398(x)
+ end
+end
+
+def fun_l14_n484(x)
+ if (x < 1)
+ fun_l15_n758(x)
+ else
+ fun_l15_n864(x)
+ end
+end
+
+def fun_l14_n485(x)
+ if (x < 1)
+ fun_l15_n508(x)
+ else
+ fun_l15_n393(x)
+ end
+end
+
+def fun_l14_n486(x)
+ if (x < 1)
+ fun_l15_n825(x)
+ else
+ fun_l15_n337(x)
+ end
+end
+
+def fun_l14_n487(x)
+ if (x < 1)
+ fun_l15_n449(x)
+ else
+ fun_l15_n389(x)
+ end
+end
+
+def fun_l14_n488(x)
+ if (x < 1)
+ fun_l15_n328(x)
+ else
+ fun_l15_n658(x)
+ end
+end
+
+def fun_l14_n489(x)
+ if (x < 1)
+ fun_l15_n138(x)
+ else
+ fun_l15_n938(x)
+ end
+end
+
+def fun_l14_n490(x)
+ if (x < 1)
+ fun_l15_n387(x)
+ else
+ fun_l15_n865(x)
+ end
+end
+
+def fun_l14_n491(x)
+ if (x < 1)
+ fun_l15_n621(x)
+ else
+ fun_l15_n516(x)
+ end
+end
+
+def fun_l14_n492(x)
+ if (x < 1)
+ fun_l15_n962(x)
+ else
+ fun_l15_n821(x)
+ end
+end
+
+def fun_l14_n493(x)
+ if (x < 1)
+ fun_l15_n544(x)
+ else
+ fun_l15_n625(x)
+ end
+end
+
+def fun_l14_n494(x)
+ if (x < 1)
+ fun_l15_n610(x)
+ else
+ fun_l15_n404(x)
+ end
+end
+
+def fun_l14_n495(x)
+ if (x < 1)
+ fun_l15_n329(x)
+ else
+ fun_l15_n537(x)
+ end
+end
+
+def fun_l14_n496(x)
+ if (x < 1)
+ fun_l15_n659(x)
+ else
+ fun_l15_n837(x)
+ end
+end
+
+def fun_l14_n497(x)
+ if (x < 1)
+ fun_l15_n974(x)
+ else
+ fun_l15_n55(x)
+ end
+end
+
+def fun_l14_n498(x)
+ if (x < 1)
+ fun_l15_n243(x)
+ else
+ fun_l15_n810(x)
+ end
+end
+
+def fun_l14_n499(x)
+ if (x < 1)
+ fun_l15_n260(x)
+ else
+ fun_l15_n412(x)
+ end
+end
+
+def fun_l14_n500(x)
+ if (x < 1)
+ fun_l15_n940(x)
+ else
+ fun_l15_n920(x)
+ end
+end
+
+def fun_l14_n501(x)
+ if (x < 1)
+ fun_l15_n829(x)
+ else
+ fun_l15_n877(x)
+ end
+end
+
+def fun_l14_n502(x)
+ if (x < 1)
+ fun_l15_n457(x)
+ else
+ fun_l15_n307(x)
+ end
+end
+
+def fun_l14_n503(x)
+ if (x < 1)
+ fun_l15_n301(x)
+ else
+ fun_l15_n812(x)
+ end
+end
+
+def fun_l14_n504(x)
+ if (x < 1)
+ fun_l15_n175(x)
+ else
+ fun_l15_n715(x)
+ end
+end
+
+def fun_l14_n505(x)
+ if (x < 1)
+ fun_l15_n897(x)
+ else
+ fun_l15_n103(x)
+ end
+end
+
+def fun_l14_n506(x)
+ if (x < 1)
+ fun_l15_n357(x)
+ else
+ fun_l15_n606(x)
+ end
+end
+
+def fun_l14_n507(x)
+ if (x < 1)
+ fun_l15_n974(x)
+ else
+ fun_l15_n389(x)
+ end
+end
+
+def fun_l14_n508(x)
+ if (x < 1)
+ fun_l15_n641(x)
+ else
+ fun_l15_n450(x)
+ end
+end
+
+def fun_l14_n509(x)
+ if (x < 1)
+ fun_l15_n4(x)
+ else
+ fun_l15_n533(x)
+ end
+end
+
+def fun_l14_n510(x)
+ if (x < 1)
+ fun_l15_n258(x)
+ else
+ fun_l15_n716(x)
+ end
+end
+
+def fun_l14_n511(x)
+ if (x < 1)
+ fun_l15_n919(x)
+ else
+ fun_l15_n881(x)
+ end
+end
+
+def fun_l14_n512(x)
+ if (x < 1)
+ fun_l15_n313(x)
+ else
+ fun_l15_n282(x)
+ end
+end
+
+def fun_l14_n513(x)
+ if (x < 1)
+ fun_l15_n116(x)
+ else
+ fun_l15_n861(x)
+ end
+end
+
+def fun_l14_n514(x)
+ if (x < 1)
+ fun_l15_n178(x)
+ else
+ fun_l15_n717(x)
+ end
+end
+
+def fun_l14_n515(x)
+ if (x < 1)
+ fun_l15_n896(x)
+ else
+ fun_l15_n583(x)
+ end
+end
+
+def fun_l14_n516(x)
+ if (x < 1)
+ fun_l15_n203(x)
+ else
+ fun_l15_n802(x)
+ end
+end
+
+def fun_l14_n517(x)
+ if (x < 1)
+ fun_l15_n810(x)
+ else
+ fun_l15_n34(x)
+ end
+end
+
+def fun_l14_n518(x)
+ if (x < 1)
+ fun_l15_n908(x)
+ else
+ fun_l15_n623(x)
+ end
+end
+
+def fun_l14_n519(x)
+ if (x < 1)
+ fun_l15_n954(x)
+ else
+ fun_l15_n411(x)
+ end
+end
+
+def fun_l14_n520(x)
+ if (x < 1)
+ fun_l15_n880(x)
+ else
+ fun_l15_n38(x)
+ end
+end
+
+def fun_l14_n521(x)
+ if (x < 1)
+ fun_l15_n954(x)
+ else
+ fun_l15_n917(x)
+ end
+end
+
+def fun_l14_n522(x)
+ if (x < 1)
+ fun_l15_n693(x)
+ else
+ fun_l15_n950(x)
+ end
+end
+
+def fun_l14_n523(x)
+ if (x < 1)
+ fun_l15_n654(x)
+ else
+ fun_l15_n27(x)
+ end
+end
+
+def fun_l14_n524(x)
+ if (x < 1)
+ fun_l15_n316(x)
+ else
+ fun_l15_n873(x)
+ end
+end
+
+def fun_l14_n525(x)
+ if (x < 1)
+ fun_l15_n554(x)
+ else
+ fun_l15_n656(x)
+ end
+end
+
+def fun_l14_n526(x)
+ if (x < 1)
+ fun_l15_n739(x)
+ else
+ fun_l15_n69(x)
+ end
+end
+
+def fun_l14_n527(x)
+ if (x < 1)
+ fun_l15_n851(x)
+ else
+ fun_l15_n366(x)
+ end
+end
+
+def fun_l14_n528(x)
+ if (x < 1)
+ fun_l15_n113(x)
+ else
+ fun_l15_n271(x)
+ end
+end
+
+def fun_l14_n529(x)
+ if (x < 1)
+ fun_l15_n652(x)
+ else
+ fun_l15_n831(x)
+ end
+end
+
+def fun_l14_n530(x)
+ if (x < 1)
+ fun_l15_n746(x)
+ else
+ fun_l15_n841(x)
+ end
+end
+
+def fun_l14_n531(x)
+ if (x < 1)
+ fun_l15_n758(x)
+ else
+ fun_l15_n893(x)
+ end
+end
+
+def fun_l14_n532(x)
+ if (x < 1)
+ fun_l15_n976(x)
+ else
+ fun_l15_n514(x)
+ end
+end
+
+def fun_l14_n533(x)
+ if (x < 1)
+ fun_l15_n375(x)
+ else
+ fun_l15_n84(x)
+ end
+end
+
+def fun_l14_n534(x)
+ if (x < 1)
+ fun_l15_n226(x)
+ else
+ fun_l15_n770(x)
+ end
+end
+
+def fun_l14_n535(x)
+ if (x < 1)
+ fun_l15_n106(x)
+ else
+ fun_l15_n230(x)
+ end
+end
+
+def fun_l14_n536(x)
+ if (x < 1)
+ fun_l15_n18(x)
+ else
+ fun_l15_n335(x)
+ end
+end
+
+def fun_l14_n537(x)
+ if (x < 1)
+ fun_l15_n755(x)
+ else
+ fun_l15_n16(x)
+ end
+end
+
+def fun_l14_n538(x)
+ if (x < 1)
+ fun_l15_n653(x)
+ else
+ fun_l15_n486(x)
+ end
+end
+
+def fun_l14_n539(x)
+ if (x < 1)
+ fun_l15_n665(x)
+ else
+ fun_l15_n768(x)
+ end
+end
+
+def fun_l14_n540(x)
+ if (x < 1)
+ fun_l15_n282(x)
+ else
+ fun_l15_n780(x)
+ end
+end
+
+def fun_l14_n541(x)
+ if (x < 1)
+ fun_l15_n633(x)
+ else
+ fun_l15_n240(x)
+ end
+end
+
+def fun_l14_n542(x)
+ if (x < 1)
+ fun_l15_n141(x)
+ else
+ fun_l15_n474(x)
+ end
+end
+
+def fun_l14_n543(x)
+ if (x < 1)
+ fun_l15_n80(x)
+ else
+ fun_l15_n708(x)
+ end
+end
+
+def fun_l14_n544(x)
+ if (x < 1)
+ fun_l15_n309(x)
+ else
+ fun_l15_n808(x)
+ end
+end
+
+def fun_l14_n545(x)
+ if (x < 1)
+ fun_l15_n744(x)
+ else
+ fun_l15_n51(x)
+ end
+end
+
+def fun_l14_n546(x)
+ if (x < 1)
+ fun_l15_n571(x)
+ else
+ fun_l15_n581(x)
+ end
+end
+
+def fun_l14_n547(x)
+ if (x < 1)
+ fun_l15_n272(x)
+ else
+ fun_l15_n867(x)
+ end
+end
+
+def fun_l14_n548(x)
+ if (x < 1)
+ fun_l15_n96(x)
+ else
+ fun_l15_n83(x)
+ end
+end
+
+def fun_l14_n549(x)
+ if (x < 1)
+ fun_l15_n828(x)
+ else
+ fun_l15_n109(x)
+ end
+end
+
+def fun_l14_n550(x)
+ if (x < 1)
+ fun_l15_n94(x)
+ else
+ fun_l15_n839(x)
+ end
+end
+
+def fun_l14_n551(x)
+ if (x < 1)
+ fun_l15_n704(x)
+ else
+ fun_l15_n88(x)
+ end
+end
+
+def fun_l14_n552(x)
+ if (x < 1)
+ fun_l15_n531(x)
+ else
+ fun_l15_n865(x)
+ end
+end
+
+def fun_l14_n553(x)
+ if (x < 1)
+ fun_l15_n506(x)
+ else
+ fun_l15_n16(x)
+ end
+end
+
+def fun_l14_n554(x)
+ if (x < 1)
+ fun_l15_n583(x)
+ else
+ fun_l15_n186(x)
+ end
+end
+
+def fun_l14_n555(x)
+ if (x < 1)
+ fun_l15_n673(x)
+ else
+ fun_l15_n560(x)
+ end
+end
+
+def fun_l14_n556(x)
+ if (x < 1)
+ fun_l15_n947(x)
+ else
+ fun_l15_n268(x)
+ end
+end
+
+def fun_l14_n557(x)
+ if (x < 1)
+ fun_l15_n88(x)
+ else
+ fun_l15_n43(x)
+ end
+end
+
+def fun_l14_n558(x)
+ if (x < 1)
+ fun_l15_n690(x)
+ else
+ fun_l15_n145(x)
+ end
+end
+
+def fun_l14_n559(x)
+ if (x < 1)
+ fun_l15_n24(x)
+ else
+ fun_l15_n631(x)
+ end
+end
+
+def fun_l14_n560(x)
+ if (x < 1)
+ fun_l15_n381(x)
+ else
+ fun_l15_n3(x)
+ end
+end
+
+def fun_l14_n561(x)
+ if (x < 1)
+ fun_l15_n954(x)
+ else
+ fun_l15_n816(x)
+ end
+end
+
+def fun_l14_n562(x)
+ if (x < 1)
+ fun_l15_n948(x)
+ else
+ fun_l15_n886(x)
+ end
+end
+
+def fun_l14_n563(x)
+ if (x < 1)
+ fun_l15_n749(x)
+ else
+ fun_l15_n558(x)
+ end
+end
+
+def fun_l14_n564(x)
+ if (x < 1)
+ fun_l15_n715(x)
+ else
+ fun_l15_n157(x)
+ end
+end
+
+def fun_l14_n565(x)
+ if (x < 1)
+ fun_l15_n674(x)
+ else
+ fun_l15_n643(x)
+ end
+end
+
+def fun_l14_n566(x)
+ if (x < 1)
+ fun_l15_n151(x)
+ else
+ fun_l15_n686(x)
+ end
+end
+
+def fun_l14_n567(x)
+ if (x < 1)
+ fun_l15_n362(x)
+ else
+ fun_l15_n37(x)
+ end
+end
+
+def fun_l14_n568(x)
+ if (x < 1)
+ fun_l15_n132(x)
+ else
+ fun_l15_n146(x)
+ end
+end
+
+def fun_l14_n569(x)
+ if (x < 1)
+ fun_l15_n32(x)
+ else
+ fun_l15_n203(x)
+ end
+end
+
+def fun_l14_n570(x)
+ if (x < 1)
+ fun_l15_n477(x)
+ else
+ fun_l15_n403(x)
+ end
+end
+
+def fun_l14_n571(x)
+ if (x < 1)
+ fun_l15_n976(x)
+ else
+ fun_l15_n632(x)
+ end
+end
+
+def fun_l14_n572(x)
+ if (x < 1)
+ fun_l15_n735(x)
+ else
+ fun_l15_n100(x)
+ end
+end
+
+def fun_l14_n573(x)
+ if (x < 1)
+ fun_l15_n186(x)
+ else
+ fun_l15_n83(x)
+ end
+end
+
+def fun_l14_n574(x)
+ if (x < 1)
+ fun_l15_n246(x)
+ else
+ fun_l15_n573(x)
+ end
+end
+
+def fun_l14_n575(x)
+ if (x < 1)
+ fun_l15_n316(x)
+ else
+ fun_l15_n618(x)
+ end
+end
+
+def fun_l14_n576(x)
+ if (x < 1)
+ fun_l15_n426(x)
+ else
+ fun_l15_n616(x)
+ end
+end
+
+def fun_l14_n577(x)
+ if (x < 1)
+ fun_l15_n810(x)
+ else
+ fun_l15_n817(x)
+ end
+end
+
+def fun_l14_n578(x)
+ if (x < 1)
+ fun_l15_n262(x)
+ else
+ fun_l15_n815(x)
+ end
+end
+
+def fun_l14_n579(x)
+ if (x < 1)
+ fun_l15_n851(x)
+ else
+ fun_l15_n524(x)
+ end
+end
+
+def fun_l14_n580(x)
+ if (x < 1)
+ fun_l15_n748(x)
+ else
+ fun_l15_n843(x)
+ end
+end
+
+def fun_l14_n581(x)
+ if (x < 1)
+ fun_l15_n284(x)
+ else
+ fun_l15_n108(x)
+ end
+end
+
+def fun_l14_n582(x)
+ if (x < 1)
+ fun_l15_n976(x)
+ else
+ fun_l15_n294(x)
+ end
+end
+
+def fun_l14_n583(x)
+ if (x < 1)
+ fun_l15_n609(x)
+ else
+ fun_l15_n866(x)
+ end
+end
+
+def fun_l14_n584(x)
+ if (x < 1)
+ fun_l15_n293(x)
+ else
+ fun_l15_n980(x)
+ end
+end
+
+def fun_l14_n585(x)
+ if (x < 1)
+ fun_l15_n548(x)
+ else
+ fun_l15_n319(x)
+ end
+end
+
+def fun_l14_n586(x)
+ if (x < 1)
+ fun_l15_n566(x)
+ else
+ fun_l15_n843(x)
+ end
+end
+
+def fun_l14_n587(x)
+ if (x < 1)
+ fun_l15_n963(x)
+ else
+ fun_l15_n120(x)
+ end
+end
+
+def fun_l14_n588(x)
+ if (x < 1)
+ fun_l15_n149(x)
+ else
+ fun_l15_n17(x)
+ end
+end
+
+def fun_l14_n589(x)
+ if (x < 1)
+ fun_l15_n11(x)
+ else
+ fun_l15_n396(x)
+ end
+end
+
+def fun_l14_n590(x)
+ if (x < 1)
+ fun_l15_n40(x)
+ else
+ fun_l15_n687(x)
+ end
+end
+
+def fun_l14_n591(x)
+ if (x < 1)
+ fun_l15_n617(x)
+ else
+ fun_l15_n564(x)
+ end
+end
+
+def fun_l14_n592(x)
+ if (x < 1)
+ fun_l15_n26(x)
+ else
+ fun_l15_n812(x)
+ end
+end
+
+def fun_l14_n593(x)
+ if (x < 1)
+ fun_l15_n890(x)
+ else
+ fun_l15_n403(x)
+ end
+end
+
+def fun_l14_n594(x)
+ if (x < 1)
+ fun_l15_n455(x)
+ else
+ fun_l15_n248(x)
+ end
+end
+
+def fun_l14_n595(x)
+ if (x < 1)
+ fun_l15_n880(x)
+ else
+ fun_l15_n488(x)
+ end
+end
+
+def fun_l14_n596(x)
+ if (x < 1)
+ fun_l15_n412(x)
+ else
+ fun_l15_n986(x)
+ end
+end
+
+def fun_l14_n597(x)
+ if (x < 1)
+ fun_l15_n487(x)
+ else
+ fun_l15_n75(x)
+ end
+end
+
+def fun_l14_n598(x)
+ if (x < 1)
+ fun_l15_n911(x)
+ else
+ fun_l15_n789(x)
+ end
+end
+
+def fun_l14_n599(x)
+ if (x < 1)
+ fun_l15_n856(x)
+ else
+ fun_l15_n773(x)
+ end
+end
+
+def fun_l14_n600(x)
+ if (x < 1)
+ fun_l15_n57(x)
+ else
+ fun_l15_n538(x)
+ end
+end
+
+def fun_l14_n601(x)
+ if (x < 1)
+ fun_l15_n828(x)
+ else
+ fun_l15_n165(x)
+ end
+end
+
+def fun_l14_n602(x)
+ if (x < 1)
+ fun_l15_n230(x)
+ else
+ fun_l15_n326(x)
+ end
+end
+
+def fun_l14_n603(x)
+ if (x < 1)
+ fun_l15_n463(x)
+ else
+ fun_l15_n906(x)
+ end
+end
+
+def fun_l14_n604(x)
+ if (x < 1)
+ fun_l15_n584(x)
+ else
+ fun_l15_n205(x)
+ end
+end
+
+def fun_l14_n605(x)
+ if (x < 1)
+ fun_l15_n243(x)
+ else
+ fun_l15_n0(x)
+ end
+end
+
+def fun_l14_n606(x)
+ if (x < 1)
+ fun_l15_n258(x)
+ else
+ fun_l15_n574(x)
+ end
+end
+
+def fun_l14_n607(x)
+ if (x < 1)
+ fun_l15_n821(x)
+ else
+ fun_l15_n786(x)
+ end
+end
+
+def fun_l14_n608(x)
+ if (x < 1)
+ fun_l15_n553(x)
+ else
+ fun_l15_n183(x)
+ end
+end
+
+def fun_l14_n609(x)
+ if (x < 1)
+ fun_l15_n853(x)
+ else
+ fun_l15_n600(x)
+ end
+end
+
+def fun_l14_n610(x)
+ if (x < 1)
+ fun_l15_n606(x)
+ else
+ fun_l15_n76(x)
+ end
+end
+
+def fun_l14_n611(x)
+ if (x < 1)
+ fun_l15_n488(x)
+ else
+ fun_l15_n313(x)
+ end
+end
+
+def fun_l14_n612(x)
+ if (x < 1)
+ fun_l15_n261(x)
+ else
+ fun_l15_n320(x)
+ end
+end
+
+def fun_l14_n613(x)
+ if (x < 1)
+ fun_l15_n410(x)
+ else
+ fun_l15_n225(x)
+ end
+end
+
+def fun_l14_n614(x)
+ if (x < 1)
+ fun_l15_n653(x)
+ else
+ fun_l15_n699(x)
+ end
+end
+
+def fun_l14_n615(x)
+ if (x < 1)
+ fun_l15_n917(x)
+ else
+ fun_l15_n199(x)
+ end
+end
+
+def fun_l14_n616(x)
+ if (x < 1)
+ fun_l15_n583(x)
+ else
+ fun_l15_n676(x)
+ end
+end
+
+def fun_l14_n617(x)
+ if (x < 1)
+ fun_l15_n708(x)
+ else
+ fun_l15_n323(x)
+ end
+end
+
+def fun_l14_n618(x)
+ if (x < 1)
+ fun_l15_n935(x)
+ else
+ fun_l15_n570(x)
+ end
+end
+
+def fun_l14_n619(x)
+ if (x < 1)
+ fun_l15_n440(x)
+ else
+ fun_l15_n765(x)
+ end
+end
+
+def fun_l14_n620(x)
+ if (x < 1)
+ fun_l15_n621(x)
+ else
+ fun_l15_n239(x)
+ end
+end
+
+def fun_l14_n621(x)
+ if (x < 1)
+ fun_l15_n498(x)
+ else
+ fun_l15_n586(x)
+ end
+end
+
+def fun_l14_n622(x)
+ if (x < 1)
+ fun_l15_n786(x)
+ else
+ fun_l15_n894(x)
+ end
+end
+
+def fun_l14_n623(x)
+ if (x < 1)
+ fun_l15_n637(x)
+ else
+ fun_l15_n502(x)
+ end
+end
+
+def fun_l14_n624(x)
+ if (x < 1)
+ fun_l15_n982(x)
+ else
+ fun_l15_n690(x)
+ end
+end
+
+def fun_l14_n625(x)
+ if (x < 1)
+ fun_l15_n696(x)
+ else
+ fun_l15_n407(x)
+ end
+end
+
+def fun_l14_n626(x)
+ if (x < 1)
+ fun_l15_n324(x)
+ else
+ fun_l15_n937(x)
+ end
+end
+
+def fun_l14_n627(x)
+ if (x < 1)
+ fun_l15_n223(x)
+ else
+ fun_l15_n538(x)
+ end
+end
+
+def fun_l14_n628(x)
+ if (x < 1)
+ fun_l15_n865(x)
+ else
+ fun_l15_n459(x)
+ end
+end
+
+def fun_l14_n629(x)
+ if (x < 1)
+ fun_l15_n990(x)
+ else
+ fun_l15_n602(x)
+ end
+end
+
+def fun_l14_n630(x)
+ if (x < 1)
+ fun_l15_n289(x)
+ else
+ fun_l15_n608(x)
+ end
+end
+
+def fun_l14_n631(x)
+ if (x < 1)
+ fun_l15_n802(x)
+ else
+ fun_l15_n254(x)
+ end
+end
+
+def fun_l14_n632(x)
+ if (x < 1)
+ fun_l15_n8(x)
+ else
+ fun_l15_n114(x)
+ end
+end
+
+def fun_l14_n633(x)
+ if (x < 1)
+ fun_l15_n91(x)
+ else
+ fun_l15_n130(x)
+ end
+end
+
+def fun_l14_n634(x)
+ if (x < 1)
+ fun_l15_n691(x)
+ else
+ fun_l15_n961(x)
+ end
+end
+
+def fun_l14_n635(x)
+ if (x < 1)
+ fun_l15_n590(x)
+ else
+ fun_l15_n739(x)
+ end
+end
+
+def fun_l14_n636(x)
+ if (x < 1)
+ fun_l15_n552(x)
+ else
+ fun_l15_n526(x)
+ end
+end
+
+def fun_l14_n637(x)
+ if (x < 1)
+ fun_l15_n741(x)
+ else
+ fun_l15_n506(x)
+ end
+end
+
+def fun_l14_n638(x)
+ if (x < 1)
+ fun_l15_n458(x)
+ else
+ fun_l15_n1(x)
+ end
+end
+
+def fun_l14_n639(x)
+ if (x < 1)
+ fun_l15_n933(x)
+ else
+ fun_l15_n500(x)
+ end
+end
+
+def fun_l14_n640(x)
+ if (x < 1)
+ fun_l15_n267(x)
+ else
+ fun_l15_n450(x)
+ end
+end
+
+def fun_l14_n641(x)
+ if (x < 1)
+ fun_l15_n51(x)
+ else
+ fun_l15_n591(x)
+ end
+end
+
+def fun_l14_n642(x)
+ if (x < 1)
+ fun_l15_n262(x)
+ else
+ fun_l15_n254(x)
+ end
+end
+
+def fun_l14_n643(x)
+ if (x < 1)
+ fun_l15_n320(x)
+ else
+ fun_l15_n610(x)
+ end
+end
+
+def fun_l14_n644(x)
+ if (x < 1)
+ fun_l15_n137(x)
+ else
+ fun_l15_n802(x)
+ end
+end
+
+def fun_l14_n645(x)
+ if (x < 1)
+ fun_l15_n365(x)
+ else
+ fun_l15_n779(x)
+ end
+end
+
+def fun_l14_n646(x)
+ if (x < 1)
+ fun_l15_n863(x)
+ else
+ fun_l15_n273(x)
+ end
+end
+
+def fun_l14_n647(x)
+ if (x < 1)
+ fun_l15_n334(x)
+ else
+ fun_l15_n519(x)
+ end
+end
+
+def fun_l14_n648(x)
+ if (x < 1)
+ fun_l15_n232(x)
+ else
+ fun_l15_n876(x)
+ end
+end
+
+def fun_l14_n649(x)
+ if (x < 1)
+ fun_l15_n850(x)
+ else
+ fun_l15_n51(x)
+ end
+end
+
+def fun_l14_n650(x)
+ if (x < 1)
+ fun_l15_n610(x)
+ else
+ fun_l15_n52(x)
+ end
+end
+
+def fun_l14_n651(x)
+ if (x < 1)
+ fun_l15_n701(x)
+ else
+ fun_l15_n143(x)
+ end
+end
+
+def fun_l14_n652(x)
+ if (x < 1)
+ fun_l15_n933(x)
+ else
+ fun_l15_n748(x)
+ end
+end
+
+def fun_l14_n653(x)
+ if (x < 1)
+ fun_l15_n280(x)
+ else
+ fun_l15_n632(x)
+ end
+end
+
+def fun_l14_n654(x)
+ if (x < 1)
+ fun_l15_n361(x)
+ else
+ fun_l15_n107(x)
+ end
+end
+
+def fun_l14_n655(x)
+ if (x < 1)
+ fun_l15_n743(x)
+ else
+ fun_l15_n899(x)
+ end
+end
+
+def fun_l14_n656(x)
+ if (x < 1)
+ fun_l15_n383(x)
+ else
+ fun_l15_n441(x)
+ end
+end
+
+def fun_l14_n657(x)
+ if (x < 1)
+ fun_l15_n244(x)
+ else
+ fun_l15_n349(x)
+ end
+end
+
+def fun_l14_n658(x)
+ if (x < 1)
+ fun_l15_n69(x)
+ else
+ fun_l15_n758(x)
+ end
+end
+
+def fun_l14_n659(x)
+ if (x < 1)
+ fun_l15_n570(x)
+ else
+ fun_l15_n760(x)
+ end
+end
+
+def fun_l14_n660(x)
+ if (x < 1)
+ fun_l15_n554(x)
+ else
+ fun_l15_n258(x)
+ end
+end
+
+def fun_l14_n661(x)
+ if (x < 1)
+ fun_l15_n417(x)
+ else
+ fun_l15_n934(x)
+ end
+end
+
+def fun_l14_n662(x)
+ if (x < 1)
+ fun_l15_n717(x)
+ else
+ fun_l15_n99(x)
+ end
+end
+
+def fun_l14_n663(x)
+ if (x < 1)
+ fun_l15_n882(x)
+ else
+ fun_l15_n515(x)
+ end
+end
+
+def fun_l14_n664(x)
+ if (x < 1)
+ fun_l15_n623(x)
+ else
+ fun_l15_n679(x)
+ end
+end
+
+def fun_l14_n665(x)
+ if (x < 1)
+ fun_l15_n974(x)
+ else
+ fun_l15_n127(x)
+ end
+end
+
+def fun_l14_n666(x)
+ if (x < 1)
+ fun_l15_n592(x)
+ else
+ fun_l15_n322(x)
+ end
+end
+
+def fun_l14_n667(x)
+ if (x < 1)
+ fun_l15_n698(x)
+ else
+ fun_l15_n670(x)
+ end
+end
+
+def fun_l14_n668(x)
+ if (x < 1)
+ fun_l15_n164(x)
+ else
+ fun_l15_n670(x)
+ end
+end
+
+def fun_l14_n669(x)
+ if (x < 1)
+ fun_l15_n837(x)
+ else
+ fun_l15_n113(x)
+ end
+end
+
+def fun_l14_n670(x)
+ if (x < 1)
+ fun_l15_n200(x)
+ else
+ fun_l15_n486(x)
+ end
+end
+
+def fun_l14_n671(x)
+ if (x < 1)
+ fun_l15_n593(x)
+ else
+ fun_l15_n822(x)
+ end
+end
+
+def fun_l14_n672(x)
+ if (x < 1)
+ fun_l15_n191(x)
+ else
+ fun_l15_n842(x)
+ end
+end
+
+def fun_l14_n673(x)
+ if (x < 1)
+ fun_l15_n391(x)
+ else
+ fun_l15_n119(x)
+ end
+end
+
+def fun_l14_n674(x)
+ if (x < 1)
+ fun_l15_n914(x)
+ else
+ fun_l15_n453(x)
+ end
+end
+
+def fun_l14_n675(x)
+ if (x < 1)
+ fun_l15_n73(x)
+ else
+ fun_l15_n366(x)
+ end
+end
+
+def fun_l14_n676(x)
+ if (x < 1)
+ fun_l15_n58(x)
+ else
+ fun_l15_n804(x)
+ end
+end
+
+def fun_l14_n677(x)
+ if (x < 1)
+ fun_l15_n905(x)
+ else
+ fun_l15_n969(x)
+ end
+end
+
+def fun_l14_n678(x)
+ if (x < 1)
+ fun_l15_n301(x)
+ else
+ fun_l15_n838(x)
+ end
+end
+
+def fun_l14_n679(x)
+ if (x < 1)
+ fun_l15_n14(x)
+ else
+ fun_l15_n567(x)
+ end
+end
+
+def fun_l14_n680(x)
+ if (x < 1)
+ fun_l15_n262(x)
+ else
+ fun_l15_n325(x)
+ end
+end
+
+def fun_l14_n681(x)
+ if (x < 1)
+ fun_l15_n985(x)
+ else
+ fun_l15_n181(x)
+ end
+end
+
+def fun_l14_n682(x)
+ if (x < 1)
+ fun_l15_n197(x)
+ else
+ fun_l15_n175(x)
+ end
+end
+
+def fun_l14_n683(x)
+ if (x < 1)
+ fun_l15_n714(x)
+ else
+ fun_l15_n276(x)
+ end
+end
+
+def fun_l14_n684(x)
+ if (x < 1)
+ fun_l15_n720(x)
+ else
+ fun_l15_n517(x)
+ end
+end
+
+def fun_l14_n685(x)
+ if (x < 1)
+ fun_l15_n351(x)
+ else
+ fun_l15_n917(x)
+ end
+end
+
+def fun_l14_n686(x)
+ if (x < 1)
+ fun_l15_n199(x)
+ else
+ fun_l15_n163(x)
+ end
+end
+
+def fun_l14_n687(x)
+ if (x < 1)
+ fun_l15_n769(x)
+ else
+ fun_l15_n205(x)
+ end
+end
+
+def fun_l14_n688(x)
+ if (x < 1)
+ fun_l15_n840(x)
+ else
+ fun_l15_n756(x)
+ end
+end
+
+def fun_l14_n689(x)
+ if (x < 1)
+ fun_l15_n306(x)
+ else
+ fun_l15_n273(x)
+ end
+end
+
+def fun_l14_n690(x)
+ if (x < 1)
+ fun_l15_n549(x)
+ else
+ fun_l15_n192(x)
+ end
+end
+
+def fun_l14_n691(x)
+ if (x < 1)
+ fun_l15_n167(x)
+ else
+ fun_l15_n403(x)
+ end
+end
+
+def fun_l14_n692(x)
+ if (x < 1)
+ fun_l15_n175(x)
+ else
+ fun_l15_n361(x)
+ end
+end
+
+def fun_l14_n693(x)
+ if (x < 1)
+ fun_l15_n208(x)
+ else
+ fun_l15_n582(x)
+ end
+end
+
+def fun_l14_n694(x)
+ if (x < 1)
+ fun_l15_n347(x)
+ else
+ fun_l15_n962(x)
+ end
+end
+
+def fun_l14_n695(x)
+ if (x < 1)
+ fun_l15_n381(x)
+ else
+ fun_l15_n865(x)
+ end
+end
+
+def fun_l14_n696(x)
+ if (x < 1)
+ fun_l15_n76(x)
+ else
+ fun_l15_n140(x)
+ end
+end
+
+def fun_l14_n697(x)
+ if (x < 1)
+ fun_l15_n801(x)
+ else
+ fun_l15_n267(x)
+ end
+end
+
+def fun_l14_n698(x)
+ if (x < 1)
+ fun_l15_n137(x)
+ else
+ fun_l15_n518(x)
+ end
+end
+
+def fun_l14_n699(x)
+ if (x < 1)
+ fun_l15_n56(x)
+ else
+ fun_l15_n758(x)
+ end
+end
+
+def fun_l14_n700(x)
+ if (x < 1)
+ fun_l15_n178(x)
+ else
+ fun_l15_n641(x)
+ end
+end
+
+def fun_l14_n701(x)
+ if (x < 1)
+ fun_l15_n815(x)
+ else
+ fun_l15_n692(x)
+ end
+end
+
+def fun_l14_n702(x)
+ if (x < 1)
+ fun_l15_n355(x)
+ else
+ fun_l15_n338(x)
+ end
+end
+
+def fun_l14_n703(x)
+ if (x < 1)
+ fun_l15_n894(x)
+ else
+ fun_l15_n843(x)
+ end
+end
+
+def fun_l14_n704(x)
+ if (x < 1)
+ fun_l15_n728(x)
+ else
+ fun_l15_n140(x)
+ end
+end
+
+def fun_l14_n705(x)
+ if (x < 1)
+ fun_l15_n304(x)
+ else
+ fun_l15_n237(x)
+ end
+end
+
+def fun_l14_n706(x)
+ if (x < 1)
+ fun_l15_n57(x)
+ else
+ fun_l15_n947(x)
+ end
+end
+
+def fun_l14_n707(x)
+ if (x < 1)
+ fun_l15_n90(x)
+ else
+ fun_l15_n831(x)
+ end
+end
+
+def fun_l14_n708(x)
+ if (x < 1)
+ fun_l15_n487(x)
+ else
+ fun_l15_n937(x)
+ end
+end
+
+def fun_l14_n709(x)
+ if (x < 1)
+ fun_l15_n898(x)
+ else
+ fun_l15_n151(x)
+ end
+end
+
+def fun_l14_n710(x)
+ if (x < 1)
+ fun_l15_n306(x)
+ else
+ fun_l15_n687(x)
+ end
+end
+
+def fun_l14_n711(x)
+ if (x < 1)
+ fun_l15_n151(x)
+ else
+ fun_l15_n239(x)
+ end
+end
+
+def fun_l14_n712(x)
+ if (x < 1)
+ fun_l15_n512(x)
+ else
+ fun_l15_n203(x)
+ end
+end
+
+def fun_l14_n713(x)
+ if (x < 1)
+ fun_l15_n611(x)
+ else
+ fun_l15_n474(x)
+ end
+end
+
+def fun_l14_n714(x)
+ if (x < 1)
+ fun_l15_n109(x)
+ else
+ fun_l15_n149(x)
+ end
+end
+
+def fun_l14_n715(x)
+ if (x < 1)
+ fun_l15_n187(x)
+ else
+ fun_l15_n563(x)
+ end
+end
+
+def fun_l14_n716(x)
+ if (x < 1)
+ fun_l15_n877(x)
+ else
+ fun_l15_n644(x)
+ end
+end
+
+def fun_l14_n717(x)
+ if (x < 1)
+ fun_l15_n960(x)
+ else
+ fun_l15_n471(x)
+ end
+end
+
+def fun_l14_n718(x)
+ if (x < 1)
+ fun_l15_n250(x)
+ else
+ fun_l15_n93(x)
+ end
+end
+
+def fun_l14_n719(x)
+ if (x < 1)
+ fun_l15_n177(x)
+ else
+ fun_l15_n14(x)
+ end
+end
+
+def fun_l14_n720(x)
+ if (x < 1)
+ fun_l15_n912(x)
+ else
+ fun_l15_n95(x)
+ end
+end
+
+def fun_l14_n721(x)
+ if (x < 1)
+ fun_l15_n776(x)
+ else
+ fun_l15_n256(x)
+ end
+end
+
+def fun_l14_n722(x)
+ if (x < 1)
+ fun_l15_n968(x)
+ else
+ fun_l15_n857(x)
+ end
+end
+
+def fun_l14_n723(x)
+ if (x < 1)
+ fun_l15_n402(x)
+ else
+ fun_l15_n60(x)
+ end
+end
+
+def fun_l14_n724(x)
+ if (x < 1)
+ fun_l15_n345(x)
+ else
+ fun_l15_n688(x)
+ end
+end
+
+def fun_l14_n725(x)
+ if (x < 1)
+ fun_l15_n72(x)
+ else
+ fun_l15_n943(x)
+ end
+end
+
+def fun_l14_n726(x)
+ if (x < 1)
+ fun_l15_n535(x)
+ else
+ fun_l15_n916(x)
+ end
+end
+
+def fun_l14_n727(x)
+ if (x < 1)
+ fun_l15_n717(x)
+ else
+ fun_l15_n354(x)
+ end
+end
+
+def fun_l14_n728(x)
+ if (x < 1)
+ fun_l15_n679(x)
+ else
+ fun_l15_n348(x)
+ end
+end
+
+def fun_l14_n729(x)
+ if (x < 1)
+ fun_l15_n187(x)
+ else
+ fun_l15_n910(x)
+ end
+end
+
+def fun_l14_n730(x)
+ if (x < 1)
+ fun_l15_n151(x)
+ else
+ fun_l15_n689(x)
+ end
+end
+
+def fun_l14_n731(x)
+ if (x < 1)
+ fun_l15_n653(x)
+ else
+ fun_l15_n380(x)
+ end
+end
+
+def fun_l14_n732(x)
+ if (x < 1)
+ fun_l15_n627(x)
+ else
+ fun_l15_n214(x)
+ end
+end
+
+def fun_l14_n733(x)
+ if (x < 1)
+ fun_l15_n53(x)
+ else
+ fun_l15_n882(x)
+ end
+end
+
+def fun_l14_n734(x)
+ if (x < 1)
+ fun_l15_n628(x)
+ else
+ fun_l15_n632(x)
+ end
+end
+
+def fun_l14_n735(x)
+ if (x < 1)
+ fun_l15_n415(x)
+ else
+ fun_l15_n719(x)
+ end
+end
+
+def fun_l14_n736(x)
+ if (x < 1)
+ fun_l15_n474(x)
+ else
+ fun_l15_n966(x)
+ end
+end
+
+def fun_l14_n737(x)
+ if (x < 1)
+ fun_l15_n140(x)
+ else
+ fun_l15_n79(x)
+ end
+end
+
+def fun_l14_n738(x)
+ if (x < 1)
+ fun_l15_n682(x)
+ else
+ fun_l15_n788(x)
+ end
+end
+
+def fun_l14_n739(x)
+ if (x < 1)
+ fun_l15_n62(x)
+ else
+ fun_l15_n289(x)
+ end
+end
+
+def fun_l14_n740(x)
+ if (x < 1)
+ fun_l15_n256(x)
+ else
+ fun_l15_n53(x)
+ end
+end
+
+def fun_l14_n741(x)
+ if (x < 1)
+ fun_l15_n571(x)
+ else
+ fun_l15_n912(x)
+ end
+end
+
+def fun_l14_n742(x)
+ if (x < 1)
+ fun_l15_n477(x)
+ else
+ fun_l15_n757(x)
+ end
+end
+
+def fun_l14_n743(x)
+ if (x < 1)
+ fun_l15_n914(x)
+ else
+ fun_l15_n216(x)
+ end
+end
+
+def fun_l14_n744(x)
+ if (x < 1)
+ fun_l15_n474(x)
+ else
+ fun_l15_n860(x)
+ end
+end
+
+def fun_l14_n745(x)
+ if (x < 1)
+ fun_l15_n303(x)
+ else
+ fun_l15_n417(x)
+ end
+end
+
+def fun_l14_n746(x)
+ if (x < 1)
+ fun_l15_n601(x)
+ else
+ fun_l15_n872(x)
+ end
+end
+
+def fun_l14_n747(x)
+ if (x < 1)
+ fun_l15_n70(x)
+ else
+ fun_l15_n245(x)
+ end
+end
+
+def fun_l14_n748(x)
+ if (x < 1)
+ fun_l15_n628(x)
+ else
+ fun_l15_n503(x)
+ end
+end
+
+def fun_l14_n749(x)
+ if (x < 1)
+ fun_l15_n965(x)
+ else
+ fun_l15_n89(x)
+ end
+end
+
+def fun_l14_n750(x)
+ if (x < 1)
+ fun_l15_n910(x)
+ else
+ fun_l15_n386(x)
+ end
+end
+
+def fun_l14_n751(x)
+ if (x < 1)
+ fun_l15_n444(x)
+ else
+ fun_l15_n765(x)
+ end
+end
+
+def fun_l14_n752(x)
+ if (x < 1)
+ fun_l15_n481(x)
+ else
+ fun_l15_n356(x)
+ end
+end
+
+def fun_l14_n753(x)
+ if (x < 1)
+ fun_l15_n45(x)
+ else
+ fun_l15_n644(x)
+ end
+end
+
+def fun_l14_n754(x)
+ if (x < 1)
+ fun_l15_n262(x)
+ else
+ fun_l15_n681(x)
+ end
+end
+
+def fun_l14_n755(x)
+ if (x < 1)
+ fun_l15_n984(x)
+ else
+ fun_l15_n488(x)
+ end
+end
+
+def fun_l14_n756(x)
+ if (x < 1)
+ fun_l15_n751(x)
+ else
+ fun_l15_n165(x)
+ end
+end
+
+def fun_l14_n757(x)
+ if (x < 1)
+ fun_l15_n716(x)
+ else
+ fun_l15_n483(x)
+ end
+end
+
+def fun_l14_n758(x)
+ if (x < 1)
+ fun_l15_n863(x)
+ else
+ fun_l15_n841(x)
+ end
+end
+
+def fun_l14_n759(x)
+ if (x < 1)
+ fun_l15_n654(x)
+ else
+ fun_l15_n782(x)
+ end
+end
+
+def fun_l14_n760(x)
+ if (x < 1)
+ fun_l15_n390(x)
+ else
+ fun_l15_n254(x)
+ end
+end
+
+def fun_l14_n761(x)
+ if (x < 1)
+ fun_l15_n888(x)
+ else
+ fun_l15_n739(x)
+ end
+end
+
+def fun_l14_n762(x)
+ if (x < 1)
+ fun_l15_n775(x)
+ else
+ fun_l15_n310(x)
+ end
+end
+
+def fun_l14_n763(x)
+ if (x < 1)
+ fun_l15_n713(x)
+ else
+ fun_l15_n246(x)
+ end
+end
+
+def fun_l14_n764(x)
+ if (x < 1)
+ fun_l15_n318(x)
+ else
+ fun_l15_n121(x)
+ end
+end
+
+def fun_l14_n765(x)
+ if (x < 1)
+ fun_l15_n424(x)
+ else
+ fun_l15_n538(x)
+ end
+end
+
+def fun_l14_n766(x)
+ if (x < 1)
+ fun_l15_n58(x)
+ else
+ fun_l15_n487(x)
+ end
+end
+
+def fun_l14_n767(x)
+ if (x < 1)
+ fun_l15_n48(x)
+ else
+ fun_l15_n776(x)
+ end
+end
+
+def fun_l14_n768(x)
+ if (x < 1)
+ fun_l15_n156(x)
+ else
+ fun_l15_n340(x)
+ end
+end
+
+def fun_l14_n769(x)
+ if (x < 1)
+ fun_l15_n66(x)
+ else
+ fun_l15_n655(x)
+ end
+end
+
+def fun_l14_n770(x)
+ if (x < 1)
+ fun_l15_n15(x)
+ else
+ fun_l15_n392(x)
+ end
+end
+
+def fun_l14_n771(x)
+ if (x < 1)
+ fun_l15_n331(x)
+ else
+ fun_l15_n114(x)
+ end
+end
+
+def fun_l14_n772(x)
+ if (x < 1)
+ fun_l15_n267(x)
+ else
+ fun_l15_n711(x)
+ end
+end
+
+def fun_l14_n773(x)
+ if (x < 1)
+ fun_l15_n567(x)
+ else
+ fun_l15_n869(x)
+ end
+end
+
+def fun_l14_n774(x)
+ if (x < 1)
+ fun_l15_n915(x)
+ else
+ fun_l15_n594(x)
+ end
+end
+
+def fun_l14_n775(x)
+ if (x < 1)
+ fun_l15_n139(x)
+ else
+ fun_l15_n285(x)
+ end
+end
+
+def fun_l14_n776(x)
+ if (x < 1)
+ fun_l15_n994(x)
+ else
+ fun_l15_n116(x)
+ end
+end
+
+def fun_l14_n777(x)
+ if (x < 1)
+ fun_l15_n999(x)
+ else
+ fun_l15_n356(x)
+ end
+end
+
+def fun_l14_n778(x)
+ if (x < 1)
+ fun_l15_n46(x)
+ else
+ fun_l15_n845(x)
+ end
+end
+
+def fun_l14_n779(x)
+ if (x < 1)
+ fun_l15_n313(x)
+ else
+ fun_l15_n785(x)
+ end
+end
+
+def fun_l14_n780(x)
+ if (x < 1)
+ fun_l15_n282(x)
+ else
+ fun_l15_n489(x)
+ end
+end
+
+def fun_l14_n781(x)
+ if (x < 1)
+ fun_l15_n101(x)
+ else
+ fun_l15_n928(x)
+ end
+end
+
+def fun_l14_n782(x)
+ if (x < 1)
+ fun_l15_n307(x)
+ else
+ fun_l15_n808(x)
+ end
+end
+
+def fun_l14_n783(x)
+ if (x < 1)
+ fun_l15_n475(x)
+ else
+ fun_l15_n347(x)
+ end
+end
+
+def fun_l14_n784(x)
+ if (x < 1)
+ fun_l15_n404(x)
+ else
+ fun_l15_n65(x)
+ end
+end
+
+def fun_l14_n785(x)
+ if (x < 1)
+ fun_l15_n61(x)
+ else
+ fun_l15_n145(x)
+ end
+end
+
+def fun_l14_n786(x)
+ if (x < 1)
+ fun_l15_n919(x)
+ else
+ fun_l15_n700(x)
+ end
+end
+
+def fun_l14_n787(x)
+ if (x < 1)
+ fun_l15_n333(x)
+ else
+ fun_l15_n702(x)
+ end
+end
+
+def fun_l14_n788(x)
+ if (x < 1)
+ fun_l15_n924(x)
+ else
+ fun_l15_n354(x)
+ end
+end
+
+def fun_l14_n789(x)
+ if (x < 1)
+ fun_l15_n171(x)
+ else
+ fun_l15_n643(x)
+ end
+end
+
+def fun_l14_n790(x)
+ if (x < 1)
+ fun_l15_n852(x)
+ else
+ fun_l15_n421(x)
+ end
+end
+
+def fun_l14_n791(x)
+ if (x < 1)
+ fun_l15_n706(x)
+ else
+ fun_l15_n260(x)
+ end
+end
+
+def fun_l14_n792(x)
+ if (x < 1)
+ fun_l15_n908(x)
+ else
+ fun_l15_n145(x)
+ end
+end
+
+def fun_l14_n793(x)
+ if (x < 1)
+ fun_l15_n802(x)
+ else
+ fun_l15_n365(x)
+ end
+end
+
+def fun_l14_n794(x)
+ if (x < 1)
+ fun_l15_n727(x)
+ else
+ fun_l15_n758(x)
+ end
+end
+
+def fun_l14_n795(x)
+ if (x < 1)
+ fun_l15_n463(x)
+ else
+ fun_l15_n58(x)
+ end
+end
+
+def fun_l14_n796(x)
+ if (x < 1)
+ fun_l15_n413(x)
+ else
+ fun_l15_n525(x)
+ end
+end
+
+def fun_l14_n797(x)
+ if (x < 1)
+ fun_l15_n970(x)
+ else
+ fun_l15_n480(x)
+ end
+end
+
+def fun_l14_n798(x)
+ if (x < 1)
+ fun_l15_n476(x)
+ else
+ fun_l15_n316(x)
+ end
+end
+
+def fun_l14_n799(x)
+ if (x < 1)
+ fun_l15_n578(x)
+ else
+ fun_l15_n586(x)
+ end
+end
+
+def fun_l14_n800(x)
+ if (x < 1)
+ fun_l15_n848(x)
+ else
+ fun_l15_n286(x)
+ end
+end
+
+def fun_l14_n801(x)
+ if (x < 1)
+ fun_l15_n745(x)
+ else
+ fun_l15_n144(x)
+ end
+end
+
+def fun_l14_n802(x)
+ if (x < 1)
+ fun_l15_n369(x)
+ else
+ fun_l15_n819(x)
+ end
+end
+
+def fun_l14_n803(x)
+ if (x < 1)
+ fun_l15_n498(x)
+ else
+ fun_l15_n206(x)
+ end
+end
+
+def fun_l14_n804(x)
+ if (x < 1)
+ fun_l15_n817(x)
+ else
+ fun_l15_n707(x)
+ end
+end
+
+def fun_l14_n805(x)
+ if (x < 1)
+ fun_l15_n935(x)
+ else
+ fun_l15_n43(x)
+ end
+end
+
+def fun_l14_n806(x)
+ if (x < 1)
+ fun_l15_n285(x)
+ else
+ fun_l15_n605(x)
+ end
+end
+
+def fun_l14_n807(x)
+ if (x < 1)
+ fun_l15_n392(x)
+ else
+ fun_l15_n672(x)
+ end
+end
+
+def fun_l14_n808(x)
+ if (x < 1)
+ fun_l15_n965(x)
+ else
+ fun_l15_n610(x)
+ end
+end
+
+def fun_l14_n809(x)
+ if (x < 1)
+ fun_l15_n266(x)
+ else
+ fun_l15_n233(x)
+ end
+end
+
+def fun_l14_n810(x)
+ if (x < 1)
+ fun_l15_n514(x)
+ else
+ fun_l15_n204(x)
+ end
+end
+
+def fun_l14_n811(x)
+ if (x < 1)
+ fun_l15_n973(x)
+ else
+ fun_l15_n768(x)
+ end
+end
+
+def fun_l14_n812(x)
+ if (x < 1)
+ fun_l15_n241(x)
+ else
+ fun_l15_n329(x)
+ end
+end
+
+def fun_l14_n813(x)
+ if (x < 1)
+ fun_l15_n150(x)
+ else
+ fun_l15_n264(x)
+ end
+end
+
+def fun_l14_n814(x)
+ if (x < 1)
+ fun_l15_n205(x)
+ else
+ fun_l15_n595(x)
+ end
+end
+
+def fun_l14_n815(x)
+ if (x < 1)
+ fun_l15_n452(x)
+ else
+ fun_l15_n288(x)
+ end
+end
+
+def fun_l14_n816(x)
+ if (x < 1)
+ fun_l15_n385(x)
+ else
+ fun_l15_n633(x)
+ end
+end
+
+def fun_l14_n817(x)
+ if (x < 1)
+ fun_l15_n290(x)
+ else
+ fun_l15_n656(x)
+ end
+end
+
+def fun_l14_n818(x)
+ if (x < 1)
+ fun_l15_n463(x)
+ else
+ fun_l15_n785(x)
+ end
+end
+
+def fun_l14_n819(x)
+ if (x < 1)
+ fun_l15_n183(x)
+ else
+ fun_l15_n787(x)
+ end
+end
+
+def fun_l14_n820(x)
+ if (x < 1)
+ fun_l15_n515(x)
+ else
+ fun_l15_n104(x)
+ end
+end
+
+def fun_l14_n821(x)
+ if (x < 1)
+ fun_l15_n848(x)
+ else
+ fun_l15_n745(x)
+ end
+end
+
+def fun_l14_n822(x)
+ if (x < 1)
+ fun_l15_n268(x)
+ else
+ fun_l15_n140(x)
+ end
+end
+
+def fun_l14_n823(x)
+ if (x < 1)
+ fun_l15_n607(x)
+ else
+ fun_l15_n785(x)
+ end
+end
+
+def fun_l14_n824(x)
+ if (x < 1)
+ fun_l15_n261(x)
+ else
+ fun_l15_n659(x)
+ end
+end
+
+def fun_l14_n825(x)
+ if (x < 1)
+ fun_l15_n628(x)
+ else
+ fun_l15_n427(x)
+ end
+end
+
+def fun_l14_n826(x)
+ if (x < 1)
+ fun_l15_n293(x)
+ else
+ fun_l15_n141(x)
+ end
+end
+
+def fun_l14_n827(x)
+ if (x < 1)
+ fun_l15_n112(x)
+ else
+ fun_l15_n135(x)
+ end
+end
+
+def fun_l14_n828(x)
+ if (x < 1)
+ fun_l15_n779(x)
+ else
+ fun_l15_n323(x)
+ end
+end
+
+def fun_l14_n829(x)
+ if (x < 1)
+ fun_l15_n295(x)
+ else
+ fun_l15_n753(x)
+ end
+end
+
+def fun_l14_n830(x)
+ if (x < 1)
+ fun_l15_n683(x)
+ else
+ fun_l15_n303(x)
+ end
+end
+
+def fun_l14_n831(x)
+ if (x < 1)
+ fun_l15_n522(x)
+ else
+ fun_l15_n983(x)
+ end
+end
+
+def fun_l14_n832(x)
+ if (x < 1)
+ fun_l15_n338(x)
+ else
+ fun_l15_n835(x)
+ end
+end
+
+def fun_l14_n833(x)
+ if (x < 1)
+ fun_l15_n888(x)
+ else
+ fun_l15_n95(x)
+ end
+end
+
+def fun_l14_n834(x)
+ if (x < 1)
+ fun_l15_n510(x)
+ else
+ fun_l15_n342(x)
+ end
+end
+
+def fun_l14_n835(x)
+ if (x < 1)
+ fun_l15_n168(x)
+ else
+ fun_l15_n864(x)
+ end
+end
+
+def fun_l14_n836(x)
+ if (x < 1)
+ fun_l15_n392(x)
+ else
+ fun_l15_n779(x)
+ end
+end
+
+def fun_l14_n837(x)
+ if (x < 1)
+ fun_l15_n176(x)
+ else
+ fun_l15_n354(x)
+ end
+end
+
+def fun_l14_n838(x)
+ if (x < 1)
+ fun_l15_n477(x)
+ else
+ fun_l15_n95(x)
+ end
+end
+
+def fun_l14_n839(x)
+ if (x < 1)
+ fun_l15_n223(x)
+ else
+ fun_l15_n213(x)
+ end
+end
+
+def fun_l14_n840(x)
+ if (x < 1)
+ fun_l15_n228(x)
+ else
+ fun_l15_n897(x)
+ end
+end
+
+def fun_l14_n841(x)
+ if (x < 1)
+ fun_l15_n551(x)
+ else
+ fun_l15_n649(x)
+ end
+end
+
+def fun_l14_n842(x)
+ if (x < 1)
+ fun_l15_n541(x)
+ else
+ fun_l15_n741(x)
+ end
+end
+
+def fun_l14_n843(x)
+ if (x < 1)
+ fun_l15_n464(x)
+ else
+ fun_l15_n403(x)
+ end
+end
+
+def fun_l14_n844(x)
+ if (x < 1)
+ fun_l15_n853(x)
+ else
+ fun_l15_n223(x)
+ end
+end
+
+def fun_l14_n845(x)
+ if (x < 1)
+ fun_l15_n443(x)
+ else
+ fun_l15_n441(x)
+ end
+end
+
+def fun_l14_n846(x)
+ if (x < 1)
+ fun_l15_n864(x)
+ else
+ fun_l15_n912(x)
+ end
+end
+
+def fun_l14_n847(x)
+ if (x < 1)
+ fun_l15_n631(x)
+ else
+ fun_l15_n764(x)
+ end
+end
+
+def fun_l14_n848(x)
+ if (x < 1)
+ fun_l15_n198(x)
+ else
+ fun_l15_n825(x)
+ end
+end
+
+def fun_l14_n849(x)
+ if (x < 1)
+ fun_l15_n525(x)
+ else
+ fun_l15_n31(x)
+ end
+end
+
+def fun_l14_n850(x)
+ if (x < 1)
+ fun_l15_n928(x)
+ else
+ fun_l15_n893(x)
+ end
+end
+
+def fun_l14_n851(x)
+ if (x < 1)
+ fun_l15_n499(x)
+ else
+ fun_l15_n297(x)
+ end
+end
+
+def fun_l14_n852(x)
+ if (x < 1)
+ fun_l15_n777(x)
+ else
+ fun_l15_n239(x)
+ end
+end
+
+def fun_l14_n853(x)
+ if (x < 1)
+ fun_l15_n120(x)
+ else
+ fun_l15_n134(x)
+ end
+end
+
+def fun_l14_n854(x)
+ if (x < 1)
+ fun_l15_n613(x)
+ else
+ fun_l15_n324(x)
+ end
+end
+
+def fun_l14_n855(x)
+ if (x < 1)
+ fun_l15_n22(x)
+ else
+ fun_l15_n192(x)
+ end
+end
+
+def fun_l14_n856(x)
+ if (x < 1)
+ fun_l15_n609(x)
+ else
+ fun_l15_n284(x)
+ end
+end
+
+def fun_l14_n857(x)
+ if (x < 1)
+ fun_l15_n130(x)
+ else
+ fun_l15_n256(x)
+ end
+end
+
+def fun_l14_n858(x)
+ if (x < 1)
+ fun_l15_n40(x)
+ else
+ fun_l15_n340(x)
+ end
+end
+
+def fun_l14_n859(x)
+ if (x < 1)
+ fun_l15_n644(x)
+ else
+ fun_l15_n522(x)
+ end
+end
+
+def fun_l14_n860(x)
+ if (x < 1)
+ fun_l15_n363(x)
+ else
+ fun_l15_n52(x)
+ end
+end
+
+def fun_l14_n861(x)
+ if (x < 1)
+ fun_l15_n166(x)
+ else
+ fun_l15_n452(x)
+ end
+end
+
+def fun_l14_n862(x)
+ if (x < 1)
+ fun_l15_n552(x)
+ else
+ fun_l15_n534(x)
+ end
+end
+
+def fun_l14_n863(x)
+ if (x < 1)
+ fun_l15_n489(x)
+ else
+ fun_l15_n181(x)
+ end
+end
+
+def fun_l14_n864(x)
+ if (x < 1)
+ fun_l15_n584(x)
+ else
+ fun_l15_n871(x)
+ end
+end
+
+def fun_l14_n865(x)
+ if (x < 1)
+ fun_l15_n868(x)
+ else
+ fun_l15_n807(x)
+ end
+end
+
+def fun_l14_n866(x)
+ if (x < 1)
+ fun_l15_n159(x)
+ else
+ fun_l15_n226(x)
+ end
+end
+
+def fun_l14_n867(x)
+ if (x < 1)
+ fun_l15_n440(x)
+ else
+ fun_l15_n318(x)
+ end
+end
+
+def fun_l14_n868(x)
+ if (x < 1)
+ fun_l15_n603(x)
+ else
+ fun_l15_n440(x)
+ end
+end
+
+def fun_l14_n869(x)
+ if (x < 1)
+ fun_l15_n478(x)
+ else
+ fun_l15_n896(x)
+ end
+end
+
+def fun_l14_n870(x)
+ if (x < 1)
+ fun_l15_n593(x)
+ else
+ fun_l15_n973(x)
+ end
+end
+
+def fun_l14_n871(x)
+ if (x < 1)
+ fun_l15_n767(x)
+ else
+ fun_l15_n828(x)
+ end
+end
+
+def fun_l14_n872(x)
+ if (x < 1)
+ fun_l15_n578(x)
+ else
+ fun_l15_n309(x)
+ end
+end
+
+def fun_l14_n873(x)
+ if (x < 1)
+ fun_l15_n959(x)
+ else
+ fun_l15_n263(x)
+ end
+end
+
+def fun_l14_n874(x)
+ if (x < 1)
+ fun_l15_n170(x)
+ else
+ fun_l15_n700(x)
+ end
+end
+
+def fun_l14_n875(x)
+ if (x < 1)
+ fun_l15_n800(x)
+ else
+ fun_l15_n703(x)
+ end
+end
+
+def fun_l14_n876(x)
+ if (x < 1)
+ fun_l15_n556(x)
+ else
+ fun_l15_n854(x)
+ end
+end
+
+def fun_l14_n877(x)
+ if (x < 1)
+ fun_l15_n472(x)
+ else
+ fun_l15_n893(x)
+ end
+end
+
+def fun_l14_n878(x)
+ if (x < 1)
+ fun_l15_n847(x)
+ else
+ fun_l15_n438(x)
+ end
+end
+
+def fun_l14_n879(x)
+ if (x < 1)
+ fun_l15_n401(x)
+ else
+ fun_l15_n59(x)
+ end
+end
+
+def fun_l14_n880(x)
+ if (x < 1)
+ fun_l15_n321(x)
+ else
+ fun_l15_n57(x)
+ end
+end
+
+def fun_l14_n881(x)
+ if (x < 1)
+ fun_l15_n664(x)
+ else
+ fun_l15_n448(x)
+ end
+end
+
+def fun_l14_n882(x)
+ if (x < 1)
+ fun_l15_n113(x)
+ else
+ fun_l15_n270(x)
+ end
+end
+
+def fun_l14_n883(x)
+ if (x < 1)
+ fun_l15_n596(x)
+ else
+ fun_l15_n354(x)
+ end
+end
+
+def fun_l14_n884(x)
+ if (x < 1)
+ fun_l15_n681(x)
+ else
+ fun_l15_n801(x)
+ end
+end
+
+def fun_l14_n885(x)
+ if (x < 1)
+ fun_l15_n802(x)
+ else
+ fun_l15_n327(x)
+ end
+end
+
+def fun_l14_n886(x)
+ if (x < 1)
+ fun_l15_n657(x)
+ else
+ fun_l15_n325(x)
+ end
+end
+
+def fun_l14_n887(x)
+ if (x < 1)
+ fun_l15_n108(x)
+ else
+ fun_l15_n11(x)
+ end
+end
+
+def fun_l14_n888(x)
+ if (x < 1)
+ fun_l15_n696(x)
+ else
+ fun_l15_n88(x)
+ end
+end
+
+def fun_l14_n889(x)
+ if (x < 1)
+ fun_l15_n220(x)
+ else
+ fun_l15_n282(x)
+ end
+end
+
+def fun_l14_n890(x)
+ if (x < 1)
+ fun_l15_n702(x)
+ else
+ fun_l15_n550(x)
+ end
+end
+
+def fun_l14_n891(x)
+ if (x < 1)
+ fun_l15_n67(x)
+ else
+ fun_l15_n763(x)
+ end
+end
+
+def fun_l14_n892(x)
+ if (x < 1)
+ fun_l15_n386(x)
+ else
+ fun_l15_n938(x)
+ end
+end
+
+def fun_l14_n893(x)
+ if (x < 1)
+ fun_l15_n193(x)
+ else
+ fun_l15_n110(x)
+ end
+end
+
+def fun_l14_n894(x)
+ if (x < 1)
+ fun_l15_n408(x)
+ else
+ fun_l15_n392(x)
+ end
+end
+
+def fun_l14_n895(x)
+ if (x < 1)
+ fun_l15_n488(x)
+ else
+ fun_l15_n445(x)
+ end
+end
+
+def fun_l14_n896(x)
+ if (x < 1)
+ fun_l15_n572(x)
+ else
+ fun_l15_n645(x)
+ end
+end
+
+def fun_l14_n897(x)
+ if (x < 1)
+ fun_l15_n432(x)
+ else
+ fun_l15_n288(x)
+ end
+end
+
+def fun_l14_n898(x)
+ if (x < 1)
+ fun_l15_n466(x)
+ else
+ fun_l15_n877(x)
+ end
+end
+
+def fun_l14_n899(x)
+ if (x < 1)
+ fun_l15_n981(x)
+ else
+ fun_l15_n546(x)
+ end
+end
+
+def fun_l14_n900(x)
+ if (x < 1)
+ fun_l15_n334(x)
+ else
+ fun_l15_n198(x)
+ end
+end
+
+def fun_l14_n901(x)
+ if (x < 1)
+ fun_l15_n447(x)
+ else
+ fun_l15_n881(x)
+ end
+end
+
+def fun_l14_n902(x)
+ if (x < 1)
+ fun_l15_n818(x)
+ else
+ fun_l15_n882(x)
+ end
+end
+
+def fun_l14_n903(x)
+ if (x < 1)
+ fun_l15_n86(x)
+ else
+ fun_l15_n864(x)
+ end
+end
+
+def fun_l14_n904(x)
+ if (x < 1)
+ fun_l15_n981(x)
+ else
+ fun_l15_n472(x)
+ end
+end
+
+def fun_l14_n905(x)
+ if (x < 1)
+ fun_l15_n684(x)
+ else
+ fun_l15_n314(x)
+ end
+end
+
+def fun_l14_n906(x)
+ if (x < 1)
+ fun_l15_n792(x)
+ else
+ fun_l15_n270(x)
+ end
+end
+
+def fun_l14_n907(x)
+ if (x < 1)
+ fun_l15_n958(x)
+ else
+ fun_l15_n293(x)
+ end
+end
+
+def fun_l14_n908(x)
+ if (x < 1)
+ fun_l15_n953(x)
+ else
+ fun_l15_n837(x)
+ end
+end
+
+def fun_l14_n909(x)
+ if (x < 1)
+ fun_l15_n448(x)
+ else
+ fun_l15_n985(x)
+ end
+end
+
+def fun_l14_n910(x)
+ if (x < 1)
+ fun_l15_n148(x)
+ else
+ fun_l15_n210(x)
+ end
+end
+
+def fun_l14_n911(x)
+ if (x < 1)
+ fun_l15_n51(x)
+ else
+ fun_l15_n714(x)
+ end
+end
+
+def fun_l14_n912(x)
+ if (x < 1)
+ fun_l15_n538(x)
+ else
+ fun_l15_n653(x)
+ end
+end
+
+def fun_l14_n913(x)
+ if (x < 1)
+ fun_l15_n374(x)
+ else
+ fun_l15_n836(x)
+ end
+end
+
+def fun_l14_n914(x)
+ if (x < 1)
+ fun_l15_n5(x)
+ else
+ fun_l15_n307(x)
+ end
+end
+
+def fun_l14_n915(x)
+ if (x < 1)
+ fun_l15_n670(x)
+ else
+ fun_l15_n961(x)
+ end
+end
+
+def fun_l14_n916(x)
+ if (x < 1)
+ fun_l15_n600(x)
+ else
+ fun_l15_n843(x)
+ end
+end
+
+def fun_l14_n917(x)
+ if (x < 1)
+ fun_l15_n235(x)
+ else
+ fun_l15_n542(x)
+ end
+end
+
+def fun_l14_n918(x)
+ if (x < 1)
+ fun_l15_n883(x)
+ else
+ fun_l15_n990(x)
+ end
+end
+
+def fun_l14_n919(x)
+ if (x < 1)
+ fun_l15_n988(x)
+ else
+ fun_l15_n678(x)
+ end
+end
+
+def fun_l14_n920(x)
+ if (x < 1)
+ fun_l15_n246(x)
+ else
+ fun_l15_n942(x)
+ end
+end
+
+def fun_l14_n921(x)
+ if (x < 1)
+ fun_l15_n316(x)
+ else
+ fun_l15_n503(x)
+ end
+end
+
+def fun_l14_n922(x)
+ if (x < 1)
+ fun_l15_n392(x)
+ else
+ fun_l15_n948(x)
+ end
+end
+
+def fun_l14_n923(x)
+ if (x < 1)
+ fun_l15_n79(x)
+ else
+ fun_l15_n375(x)
+ end
+end
+
+def fun_l14_n924(x)
+ if (x < 1)
+ fun_l15_n139(x)
+ else
+ fun_l15_n350(x)
+ end
+end
+
+def fun_l14_n925(x)
+ if (x < 1)
+ fun_l15_n132(x)
+ else
+ fun_l15_n27(x)
+ end
+end
+
+def fun_l14_n926(x)
+ if (x < 1)
+ fun_l15_n608(x)
+ else
+ fun_l15_n910(x)
+ end
+end
+
+def fun_l14_n927(x)
+ if (x < 1)
+ fun_l15_n447(x)
+ else
+ fun_l15_n361(x)
+ end
+end
+
+def fun_l14_n928(x)
+ if (x < 1)
+ fun_l15_n432(x)
+ else
+ fun_l15_n943(x)
+ end
+end
+
+def fun_l14_n929(x)
+ if (x < 1)
+ fun_l15_n726(x)
+ else
+ fun_l15_n19(x)
+ end
+end
+
+def fun_l14_n930(x)
+ if (x < 1)
+ fun_l15_n311(x)
+ else
+ fun_l15_n683(x)
+ end
+end
+
+def fun_l14_n931(x)
+ if (x < 1)
+ fun_l15_n988(x)
+ else
+ fun_l15_n731(x)
+ end
+end
+
+def fun_l14_n932(x)
+ if (x < 1)
+ fun_l15_n916(x)
+ else
+ fun_l15_n625(x)
+ end
+end
+
+def fun_l14_n933(x)
+ if (x < 1)
+ fun_l15_n723(x)
+ else
+ fun_l15_n954(x)
+ end
+end
+
+def fun_l14_n934(x)
+ if (x < 1)
+ fun_l15_n82(x)
+ else
+ fun_l15_n140(x)
+ end
+end
+
+def fun_l14_n935(x)
+ if (x < 1)
+ fun_l15_n11(x)
+ else
+ fun_l15_n407(x)
+ end
+end
+
+def fun_l14_n936(x)
+ if (x < 1)
+ fun_l15_n261(x)
+ else
+ fun_l15_n733(x)
+ end
+end
+
+def fun_l14_n937(x)
+ if (x < 1)
+ fun_l15_n37(x)
+ else
+ fun_l15_n617(x)
+ end
+end
+
+def fun_l14_n938(x)
+ if (x < 1)
+ fun_l15_n733(x)
+ else
+ fun_l15_n178(x)
+ end
+end
+
+def fun_l14_n939(x)
+ if (x < 1)
+ fun_l15_n989(x)
+ else
+ fun_l15_n917(x)
+ end
+end
+
+def fun_l14_n940(x)
+ if (x < 1)
+ fun_l15_n297(x)
+ else
+ fun_l15_n393(x)
+ end
+end
+
+def fun_l14_n941(x)
+ if (x < 1)
+ fun_l15_n167(x)
+ else
+ fun_l15_n498(x)
+ end
+end
+
+def fun_l14_n942(x)
+ if (x < 1)
+ fun_l15_n365(x)
+ else
+ fun_l15_n158(x)
+ end
+end
+
+def fun_l14_n943(x)
+ if (x < 1)
+ fun_l15_n340(x)
+ else
+ fun_l15_n813(x)
+ end
+end
+
+def fun_l14_n944(x)
+ if (x < 1)
+ fun_l15_n417(x)
+ else
+ fun_l15_n150(x)
+ end
+end
+
+def fun_l14_n945(x)
+ if (x < 1)
+ fun_l15_n477(x)
+ else
+ fun_l15_n639(x)
+ end
+end
+
+def fun_l14_n946(x)
+ if (x < 1)
+ fun_l15_n243(x)
+ else
+ fun_l15_n439(x)
+ end
+end
+
+def fun_l14_n947(x)
+ if (x < 1)
+ fun_l15_n149(x)
+ else
+ fun_l15_n881(x)
+ end
+end
+
+def fun_l14_n948(x)
+ if (x < 1)
+ fun_l15_n383(x)
+ else
+ fun_l15_n525(x)
+ end
+end
+
+def fun_l14_n949(x)
+ if (x < 1)
+ fun_l15_n482(x)
+ else
+ fun_l15_n625(x)
+ end
+end
+
+def fun_l14_n950(x)
+ if (x < 1)
+ fun_l15_n376(x)
+ else
+ fun_l15_n743(x)
+ end
+end
+
+def fun_l14_n951(x)
+ if (x < 1)
+ fun_l15_n53(x)
+ else
+ fun_l15_n734(x)
+ end
+end
+
+def fun_l14_n952(x)
+ if (x < 1)
+ fun_l15_n437(x)
+ else
+ fun_l15_n829(x)
+ end
+end
+
+def fun_l14_n953(x)
+ if (x < 1)
+ fun_l15_n673(x)
+ else
+ fun_l15_n540(x)
+ end
+end
+
+def fun_l14_n954(x)
+ if (x < 1)
+ fun_l15_n477(x)
+ else
+ fun_l15_n488(x)
+ end
+end
+
+def fun_l14_n955(x)
+ if (x < 1)
+ fun_l15_n876(x)
+ else
+ fun_l15_n710(x)
+ end
+end
+
+def fun_l14_n956(x)
+ if (x < 1)
+ fun_l15_n823(x)
+ else
+ fun_l15_n841(x)
+ end
+end
+
+def fun_l14_n957(x)
+ if (x < 1)
+ fun_l15_n948(x)
+ else
+ fun_l15_n378(x)
+ end
+end
+
+def fun_l14_n958(x)
+ if (x < 1)
+ fun_l15_n941(x)
+ else
+ fun_l15_n555(x)
+ end
+end
+
+def fun_l14_n959(x)
+ if (x < 1)
+ fun_l15_n204(x)
+ else
+ fun_l15_n792(x)
+ end
+end
+
+def fun_l14_n960(x)
+ if (x < 1)
+ fun_l15_n897(x)
+ else
+ fun_l15_n287(x)
+ end
+end
+
+def fun_l14_n961(x)
+ if (x < 1)
+ fun_l15_n771(x)
+ else
+ fun_l15_n409(x)
+ end
+end
+
+def fun_l14_n962(x)
+ if (x < 1)
+ fun_l15_n597(x)
+ else
+ fun_l15_n190(x)
+ end
+end
+
+def fun_l14_n963(x)
+ if (x < 1)
+ fun_l15_n573(x)
+ else
+ fun_l15_n982(x)
+ end
+end
+
+def fun_l14_n964(x)
+ if (x < 1)
+ fun_l15_n186(x)
+ else
+ fun_l15_n363(x)
+ end
+end
+
+def fun_l14_n965(x)
+ if (x < 1)
+ fun_l15_n694(x)
+ else
+ fun_l15_n319(x)
+ end
+end
+
+def fun_l14_n966(x)
+ if (x < 1)
+ fun_l15_n312(x)
+ else
+ fun_l15_n332(x)
+ end
+end
+
+def fun_l14_n967(x)
+ if (x < 1)
+ fun_l15_n754(x)
+ else
+ fun_l15_n965(x)
+ end
+end
+
+def fun_l14_n968(x)
+ if (x < 1)
+ fun_l15_n18(x)
+ else
+ fun_l15_n723(x)
+ end
+end
+
+def fun_l14_n969(x)
+ if (x < 1)
+ fun_l15_n111(x)
+ else
+ fun_l15_n447(x)
+ end
+end
+
+def fun_l14_n970(x)
+ if (x < 1)
+ fun_l15_n3(x)
+ else
+ fun_l15_n302(x)
+ end
+end
+
+def fun_l14_n971(x)
+ if (x < 1)
+ fun_l15_n121(x)
+ else
+ fun_l15_n764(x)
+ end
+end
+
+def fun_l14_n972(x)
+ if (x < 1)
+ fun_l15_n192(x)
+ else
+ fun_l15_n692(x)
+ end
+end
+
+def fun_l14_n973(x)
+ if (x < 1)
+ fun_l15_n596(x)
+ else
+ fun_l15_n514(x)
+ end
+end
+
+def fun_l14_n974(x)
+ if (x < 1)
+ fun_l15_n845(x)
+ else
+ fun_l15_n245(x)
+ end
+end
+
+def fun_l14_n975(x)
+ if (x < 1)
+ fun_l15_n566(x)
+ else
+ fun_l15_n58(x)
+ end
+end
+
+def fun_l14_n976(x)
+ if (x < 1)
+ fun_l15_n843(x)
+ else
+ fun_l15_n35(x)
+ end
+end
+
+def fun_l14_n977(x)
+ if (x < 1)
+ fun_l15_n995(x)
+ else
+ fun_l15_n723(x)
+ end
+end
+
+def fun_l14_n978(x)
+ if (x < 1)
+ fun_l15_n534(x)
+ else
+ fun_l15_n704(x)
+ end
+end
+
+def fun_l14_n979(x)
+ if (x < 1)
+ fun_l15_n533(x)
+ else
+ fun_l15_n492(x)
+ end
+end
+
+def fun_l14_n980(x)
+ if (x < 1)
+ fun_l15_n758(x)
+ else
+ fun_l15_n655(x)
+ end
+end
+
+def fun_l14_n981(x)
+ if (x < 1)
+ fun_l15_n94(x)
+ else
+ fun_l15_n246(x)
+ end
+end
+
+def fun_l14_n982(x)
+ if (x < 1)
+ fun_l15_n873(x)
+ else
+ fun_l15_n996(x)
+ end
+end
+
+def fun_l14_n983(x)
+ if (x < 1)
+ fun_l15_n681(x)
+ else
+ fun_l15_n522(x)
+ end
+end
+
+def fun_l14_n984(x)
+ if (x < 1)
+ fun_l15_n272(x)
+ else
+ fun_l15_n501(x)
+ end
+end
+
+def fun_l14_n985(x)
+ if (x < 1)
+ fun_l15_n345(x)
+ else
+ fun_l15_n61(x)
+ end
+end
+
+def fun_l14_n986(x)
+ if (x < 1)
+ fun_l15_n517(x)
+ else
+ fun_l15_n151(x)
+ end
+end
+
+def fun_l14_n987(x)
+ if (x < 1)
+ fun_l15_n792(x)
+ else
+ fun_l15_n969(x)
+ end
+end
+
+def fun_l14_n988(x)
+ if (x < 1)
+ fun_l15_n683(x)
+ else
+ fun_l15_n537(x)
+ end
+end
+
+def fun_l14_n989(x)
+ if (x < 1)
+ fun_l15_n310(x)
+ else
+ fun_l15_n367(x)
+ end
+end
+
+def fun_l14_n990(x)
+ if (x < 1)
+ fun_l15_n249(x)
+ else
+ fun_l15_n897(x)
+ end
+end
+
+def fun_l14_n991(x)
+ if (x < 1)
+ fun_l15_n389(x)
+ else
+ fun_l15_n176(x)
+ end
+end
+
+def fun_l14_n992(x)
+ if (x < 1)
+ fun_l15_n233(x)
+ else
+ fun_l15_n220(x)
+ end
+end
+
+def fun_l14_n993(x)
+ if (x < 1)
+ fun_l15_n161(x)
+ else
+ fun_l15_n642(x)
+ end
+end
+
+def fun_l14_n994(x)
+ if (x < 1)
+ fun_l15_n163(x)
+ else
+ fun_l15_n5(x)
+ end
+end
+
+def fun_l14_n995(x)
+ if (x < 1)
+ fun_l15_n678(x)
+ else
+ fun_l15_n108(x)
+ end
+end
+
+def fun_l14_n996(x)
+ if (x < 1)
+ fun_l15_n732(x)
+ else
+ fun_l15_n26(x)
+ end
+end
+
+def fun_l14_n997(x)
+ if (x < 1)
+ fun_l15_n805(x)
+ else
+ fun_l15_n726(x)
+ end
+end
+
+def fun_l14_n998(x)
+ if (x < 1)
+ fun_l15_n543(x)
+ else
+ fun_l15_n102(x)
+ end
+end
+
+def fun_l14_n999(x)
+ if (x < 1)
+ fun_l15_n358(x)
+ else
+ fun_l15_n986(x)
+ end
+end
+
+def fun_l15_n0(x)
+ if (x < 1)
+ fun_l16_n832(x)
+ else
+ fun_l16_n319(x)
+ end
+end
+
+def fun_l15_n1(x)
+ if (x < 1)
+ fun_l16_n920(x)
+ else
+ fun_l16_n27(x)
+ end
+end
+
+def fun_l15_n2(x)
+ if (x < 1)
+ fun_l16_n929(x)
+ else
+ fun_l16_n230(x)
+ end
+end
+
+def fun_l15_n3(x)
+ if (x < 1)
+ fun_l16_n135(x)
+ else
+ fun_l16_n427(x)
+ end
+end
+
+def fun_l15_n4(x)
+ if (x < 1)
+ fun_l16_n299(x)
+ else
+ fun_l16_n811(x)
+ end
+end
+
+def fun_l15_n5(x)
+ if (x < 1)
+ fun_l16_n821(x)
+ else
+ fun_l16_n717(x)
+ end
+end
+
+def fun_l15_n6(x)
+ if (x < 1)
+ fun_l16_n907(x)
+ else
+ fun_l16_n348(x)
+ end
+end
+
+def fun_l15_n7(x)
+ if (x < 1)
+ fun_l16_n708(x)
+ else
+ fun_l16_n180(x)
+ end
+end
+
+def fun_l15_n8(x)
+ if (x < 1)
+ fun_l16_n835(x)
+ else
+ fun_l16_n754(x)
+ end
+end
+
+def fun_l15_n9(x)
+ if (x < 1)
+ fun_l16_n25(x)
+ else
+ fun_l16_n607(x)
+ end
+end
+
+def fun_l15_n10(x)
+ if (x < 1)
+ fun_l16_n73(x)
+ else
+ fun_l16_n784(x)
+ end
+end
+
+def fun_l15_n11(x)
+ if (x < 1)
+ fun_l16_n413(x)
+ else
+ fun_l16_n914(x)
+ end
+end
+
+def fun_l15_n12(x)
+ if (x < 1)
+ fun_l16_n734(x)
+ else
+ fun_l16_n688(x)
+ end
+end
+
+def fun_l15_n13(x)
+ if (x < 1)
+ fun_l16_n658(x)
+ else
+ fun_l16_n491(x)
+ end
+end
+
+def fun_l15_n14(x)
+ if (x < 1)
+ fun_l16_n839(x)
+ else
+ fun_l16_n740(x)
+ end
+end
+
+def fun_l15_n15(x)
+ if (x < 1)
+ fun_l16_n378(x)
+ else
+ fun_l16_n800(x)
+ end
+end
+
+def fun_l15_n16(x)
+ if (x < 1)
+ fun_l16_n980(x)
+ else
+ fun_l16_n83(x)
+ end
+end
+
+def fun_l15_n17(x)
+ if (x < 1)
+ fun_l16_n338(x)
+ else
+ fun_l16_n871(x)
+ end
+end
+
+def fun_l15_n18(x)
+ if (x < 1)
+ fun_l16_n497(x)
+ else
+ fun_l16_n347(x)
+ end
+end
+
+def fun_l15_n19(x)
+ if (x < 1)
+ fun_l16_n483(x)
+ else
+ fun_l16_n913(x)
+ end
+end
+
+def fun_l15_n20(x)
+ if (x < 1)
+ fun_l16_n663(x)
+ else
+ fun_l16_n432(x)
+ end
+end
+
+def fun_l15_n21(x)
+ if (x < 1)
+ fun_l16_n787(x)
+ else
+ fun_l16_n248(x)
+ end
+end
+
+def fun_l15_n22(x)
+ if (x < 1)
+ fun_l16_n257(x)
+ else
+ fun_l16_n944(x)
+ end
+end
+
+def fun_l15_n23(x)
+ if (x < 1)
+ fun_l16_n11(x)
+ else
+ fun_l16_n343(x)
+ end
+end
+
+def fun_l15_n24(x)
+ if (x < 1)
+ fun_l16_n860(x)
+ else
+ fun_l16_n752(x)
+ end
+end
+
+def fun_l15_n25(x)
+ if (x < 1)
+ fun_l16_n766(x)
+ else
+ fun_l16_n719(x)
+ end
+end
+
+def fun_l15_n26(x)
+ if (x < 1)
+ fun_l16_n144(x)
+ else
+ fun_l16_n963(x)
+ end
+end
+
+def fun_l15_n27(x)
+ if (x < 1)
+ fun_l16_n659(x)
+ else
+ fun_l16_n916(x)
+ end
+end
+
+def fun_l15_n28(x)
+ if (x < 1)
+ fun_l16_n429(x)
+ else
+ fun_l16_n272(x)
+ end
+end
+
+def fun_l15_n29(x)
+ if (x < 1)
+ fun_l16_n54(x)
+ else
+ fun_l16_n794(x)
+ end
+end
+
+def fun_l15_n30(x)
+ if (x < 1)
+ fun_l16_n273(x)
+ else
+ fun_l16_n929(x)
+ end
+end
+
+def fun_l15_n31(x)
+ if (x < 1)
+ fun_l16_n868(x)
+ else
+ fun_l16_n967(x)
+ end
+end
+
+def fun_l15_n32(x)
+ if (x < 1)
+ fun_l16_n888(x)
+ else
+ fun_l16_n283(x)
+ end
+end
+
+def fun_l15_n33(x)
+ if (x < 1)
+ fun_l16_n6(x)
+ else
+ fun_l16_n677(x)
+ end
+end
+
+def fun_l15_n34(x)
+ if (x < 1)
+ fun_l16_n248(x)
+ else
+ fun_l16_n831(x)
+ end
+end
+
+def fun_l15_n35(x)
+ if (x < 1)
+ fun_l16_n832(x)
+ else
+ fun_l16_n634(x)
+ end
+end
+
+def fun_l15_n36(x)
+ if (x < 1)
+ fun_l16_n221(x)
+ else
+ fun_l16_n401(x)
+ end
+end
+
+def fun_l15_n37(x)
+ if (x < 1)
+ fun_l16_n403(x)
+ else
+ fun_l16_n29(x)
+ end
+end
+
+def fun_l15_n38(x)
+ if (x < 1)
+ fun_l16_n11(x)
+ else
+ fun_l16_n517(x)
+ end
+end
+
+def fun_l15_n39(x)
+ if (x < 1)
+ fun_l16_n234(x)
+ else
+ fun_l16_n231(x)
+ end
+end
+
+def fun_l15_n40(x)
+ if (x < 1)
+ fun_l16_n185(x)
+ else
+ fun_l16_n818(x)
+ end
+end
+
+def fun_l15_n41(x)
+ if (x < 1)
+ fun_l16_n169(x)
+ else
+ fun_l16_n239(x)
+ end
+end
+
+def fun_l15_n42(x)
+ if (x < 1)
+ fun_l16_n111(x)
+ else
+ fun_l16_n836(x)
+ end
+end
+
+def fun_l15_n43(x)
+ if (x < 1)
+ fun_l16_n832(x)
+ else
+ fun_l16_n714(x)
+ end
+end
+
+def fun_l15_n44(x)
+ if (x < 1)
+ fun_l16_n167(x)
+ else
+ fun_l16_n65(x)
+ end
+end
+
+def fun_l15_n45(x)
+ if (x < 1)
+ fun_l16_n801(x)
+ else
+ fun_l16_n456(x)
+ end
+end
+
+def fun_l15_n46(x)
+ if (x < 1)
+ fun_l16_n894(x)
+ else
+ fun_l16_n103(x)
+ end
+end
+
+def fun_l15_n47(x)
+ if (x < 1)
+ fun_l16_n156(x)
+ else
+ fun_l16_n228(x)
+ end
+end
+
+def fun_l15_n48(x)
+ if (x < 1)
+ fun_l16_n167(x)
+ else
+ fun_l16_n317(x)
+ end
+end
+
+def fun_l15_n49(x)
+ if (x < 1)
+ fun_l16_n864(x)
+ else
+ fun_l16_n425(x)
+ end
+end
+
+def fun_l15_n50(x)
+ if (x < 1)
+ fun_l16_n11(x)
+ else
+ fun_l16_n498(x)
+ end
+end
+
+def fun_l15_n51(x)
+ if (x < 1)
+ fun_l16_n209(x)
+ else
+ fun_l16_n399(x)
+ end
+end
+
+def fun_l15_n52(x)
+ if (x < 1)
+ fun_l16_n320(x)
+ else
+ fun_l16_n912(x)
+ end
+end
+
+def fun_l15_n53(x)
+ if (x < 1)
+ fun_l16_n135(x)
+ else
+ fun_l16_n349(x)
+ end
+end
+
+def fun_l15_n54(x)
+ if (x < 1)
+ fun_l16_n410(x)
+ else
+ fun_l16_n849(x)
+ end
+end
+
+def fun_l15_n55(x)
+ if (x < 1)
+ fun_l16_n989(x)
+ else
+ fun_l16_n700(x)
+ end
+end
+
+def fun_l15_n56(x)
+ if (x < 1)
+ fun_l16_n79(x)
+ else
+ fun_l16_n549(x)
+ end
+end
+
+def fun_l15_n57(x)
+ if (x < 1)
+ fun_l16_n396(x)
+ else
+ fun_l16_n182(x)
+ end
+end
+
+def fun_l15_n58(x)
+ if (x < 1)
+ fun_l16_n765(x)
+ else
+ fun_l16_n225(x)
+ end
+end
+
+def fun_l15_n59(x)
+ if (x < 1)
+ fun_l16_n124(x)
+ else
+ fun_l16_n694(x)
+ end
+end
+
+def fun_l15_n60(x)
+ if (x < 1)
+ fun_l16_n813(x)
+ else
+ fun_l16_n319(x)
+ end
+end
+
+def fun_l15_n61(x)
+ if (x < 1)
+ fun_l16_n568(x)
+ else
+ fun_l16_n581(x)
+ end
+end
+
+def fun_l15_n62(x)
+ if (x < 1)
+ fun_l16_n667(x)
+ else
+ fun_l16_n12(x)
+ end
+end
+
+def fun_l15_n63(x)
+ if (x < 1)
+ fun_l16_n176(x)
+ else
+ fun_l16_n136(x)
+ end
+end
+
+def fun_l15_n64(x)
+ if (x < 1)
+ fun_l16_n620(x)
+ else
+ fun_l16_n937(x)
+ end
+end
+
+def fun_l15_n65(x)
+ if (x < 1)
+ fun_l16_n130(x)
+ else
+ fun_l16_n503(x)
+ end
+end
+
+def fun_l15_n66(x)
+ if (x < 1)
+ fun_l16_n774(x)
+ else
+ fun_l16_n109(x)
+ end
+end
+
+def fun_l15_n67(x)
+ if (x < 1)
+ fun_l16_n817(x)
+ else
+ fun_l16_n497(x)
+ end
+end
+
+def fun_l15_n68(x)
+ if (x < 1)
+ fun_l16_n123(x)
+ else
+ fun_l16_n482(x)
+ end
+end
+
+def fun_l15_n69(x)
+ if (x < 1)
+ fun_l16_n173(x)
+ else
+ fun_l16_n22(x)
+ end
+end
+
+def fun_l15_n70(x)
+ if (x < 1)
+ fun_l16_n648(x)
+ else
+ fun_l16_n671(x)
+ end
+end
+
+def fun_l15_n71(x)
+ if (x < 1)
+ fun_l16_n831(x)
+ else
+ fun_l16_n126(x)
+ end
+end
+
+def fun_l15_n72(x)
+ if (x < 1)
+ fun_l16_n731(x)
+ else
+ fun_l16_n273(x)
+ end
+end
+
+def fun_l15_n73(x)
+ if (x < 1)
+ fun_l16_n695(x)
+ else
+ fun_l16_n772(x)
+ end
+end
+
+def fun_l15_n74(x)
+ if (x < 1)
+ fun_l16_n831(x)
+ else
+ fun_l16_n49(x)
+ end
+end
+
+def fun_l15_n75(x)
+ if (x < 1)
+ fun_l16_n501(x)
+ else
+ fun_l16_n4(x)
+ end
+end
+
+def fun_l15_n76(x)
+ if (x < 1)
+ fun_l16_n712(x)
+ else
+ fun_l16_n762(x)
+ end
+end
+
+def fun_l15_n77(x)
+ if (x < 1)
+ fun_l16_n585(x)
+ else
+ fun_l16_n398(x)
+ end
+end
+
+def fun_l15_n78(x)
+ if (x < 1)
+ fun_l16_n811(x)
+ else
+ fun_l16_n866(x)
+ end
+end
+
+def fun_l15_n79(x)
+ if (x < 1)
+ fun_l16_n69(x)
+ else
+ fun_l16_n502(x)
+ end
+end
+
+def fun_l15_n80(x)
+ if (x < 1)
+ fun_l16_n885(x)
+ else
+ fun_l16_n116(x)
+ end
+end
+
+def fun_l15_n81(x)
+ if (x < 1)
+ fun_l16_n30(x)
+ else
+ fun_l16_n1(x)
+ end
+end
+
+def fun_l15_n82(x)
+ if (x < 1)
+ fun_l16_n105(x)
+ else
+ fun_l16_n526(x)
+ end
+end
+
+def fun_l15_n83(x)
+ if (x < 1)
+ fun_l16_n760(x)
+ else
+ fun_l16_n206(x)
+ end
+end
+
+def fun_l15_n84(x)
+ if (x < 1)
+ fun_l16_n722(x)
+ else
+ fun_l16_n211(x)
+ end
+end
+
+def fun_l15_n85(x)
+ if (x < 1)
+ fun_l16_n145(x)
+ else
+ fun_l16_n222(x)
+ end
+end
+
+def fun_l15_n86(x)
+ if (x < 1)
+ fun_l16_n691(x)
+ else
+ fun_l16_n885(x)
+ end
+end
+
+def fun_l15_n87(x)
+ if (x < 1)
+ fun_l16_n2(x)
+ else
+ fun_l16_n180(x)
+ end
+end
+
+def fun_l15_n88(x)
+ if (x < 1)
+ fun_l16_n272(x)
+ else
+ fun_l16_n433(x)
+ end
+end
+
+def fun_l15_n89(x)
+ if (x < 1)
+ fun_l16_n31(x)
+ else
+ fun_l16_n854(x)
+ end
+end
+
+def fun_l15_n90(x)
+ if (x < 1)
+ fun_l16_n264(x)
+ else
+ fun_l16_n231(x)
+ end
+end
+
+def fun_l15_n91(x)
+ if (x < 1)
+ fun_l16_n637(x)
+ else
+ fun_l16_n96(x)
+ end
+end
+
+def fun_l15_n92(x)
+ if (x < 1)
+ fun_l16_n317(x)
+ else
+ fun_l16_n56(x)
+ end
+end
+
+def fun_l15_n93(x)
+ if (x < 1)
+ fun_l16_n523(x)
+ else
+ fun_l16_n948(x)
+ end
+end
+
+def fun_l15_n94(x)
+ if (x < 1)
+ fun_l16_n694(x)
+ else
+ fun_l16_n948(x)
+ end
+end
+
+def fun_l15_n95(x)
+ if (x < 1)
+ fun_l16_n708(x)
+ else
+ fun_l16_n581(x)
+ end
+end
+
+def fun_l15_n96(x)
+ if (x < 1)
+ fun_l16_n725(x)
+ else
+ fun_l16_n931(x)
+ end
+end
+
+def fun_l15_n97(x)
+ if (x < 1)
+ fun_l16_n432(x)
+ else
+ fun_l16_n367(x)
+ end
+end
+
+def fun_l15_n98(x)
+ if (x < 1)
+ fun_l16_n671(x)
+ else
+ fun_l16_n165(x)
+ end
+end
+
+def fun_l15_n99(x)
+ if (x < 1)
+ fun_l16_n617(x)
+ else
+ fun_l16_n498(x)
+ end
+end
+
+def fun_l15_n100(x)
+ if (x < 1)
+ fun_l16_n32(x)
+ else
+ fun_l16_n103(x)
+ end
+end
+
+def fun_l15_n101(x)
+ if (x < 1)
+ fun_l16_n619(x)
+ else
+ fun_l16_n556(x)
+ end
+end
+
+def fun_l15_n102(x)
+ if (x < 1)
+ fun_l16_n0(x)
+ else
+ fun_l16_n925(x)
+ end
+end
+
+def fun_l15_n103(x)
+ if (x < 1)
+ fun_l16_n484(x)
+ else
+ fun_l16_n889(x)
+ end
+end
+
+def fun_l15_n104(x)
+ if (x < 1)
+ fun_l16_n557(x)
+ else
+ fun_l16_n465(x)
+ end
+end
+
+def fun_l15_n105(x)
+ if (x < 1)
+ fun_l16_n486(x)
+ else
+ fun_l16_n720(x)
+ end
+end
+
+def fun_l15_n106(x)
+ if (x < 1)
+ fun_l16_n281(x)
+ else
+ fun_l16_n61(x)
+ end
+end
+
+def fun_l15_n107(x)
+ if (x < 1)
+ fun_l16_n861(x)
+ else
+ fun_l16_n944(x)
+ end
+end
+
+def fun_l15_n108(x)
+ if (x < 1)
+ fun_l16_n739(x)
+ else
+ fun_l16_n192(x)
+ end
+end
+
+def fun_l15_n109(x)
+ if (x < 1)
+ fun_l16_n327(x)
+ else
+ fun_l16_n423(x)
+ end
+end
+
+def fun_l15_n110(x)
+ if (x < 1)
+ fun_l16_n541(x)
+ else
+ fun_l16_n927(x)
+ end
+end
+
+def fun_l15_n111(x)
+ if (x < 1)
+ fun_l16_n86(x)
+ else
+ fun_l16_n170(x)
+ end
+end
+
+def fun_l15_n112(x)
+ if (x < 1)
+ fun_l16_n508(x)
+ else
+ fun_l16_n554(x)
+ end
+end
+
+def fun_l15_n113(x)
+ if (x < 1)
+ fun_l16_n326(x)
+ else
+ fun_l16_n289(x)
+ end
+end
+
+def fun_l15_n114(x)
+ if (x < 1)
+ fun_l16_n309(x)
+ else
+ fun_l16_n125(x)
+ end
+end
+
+def fun_l15_n115(x)
+ if (x < 1)
+ fun_l16_n936(x)
+ else
+ fun_l16_n64(x)
+ end
+end
+
+def fun_l15_n116(x)
+ if (x < 1)
+ fun_l16_n942(x)
+ else
+ fun_l16_n737(x)
+ end
+end
+
+def fun_l15_n117(x)
+ if (x < 1)
+ fun_l16_n717(x)
+ else
+ fun_l16_n701(x)
+ end
+end
+
+def fun_l15_n118(x)
+ if (x < 1)
+ fun_l16_n789(x)
+ else
+ fun_l16_n901(x)
+ end
+end
+
+def fun_l15_n119(x)
+ if (x < 1)
+ fun_l16_n49(x)
+ else
+ fun_l16_n610(x)
+ end
+end
+
+def fun_l15_n120(x)
+ if (x < 1)
+ fun_l16_n578(x)
+ else
+ fun_l16_n372(x)
+ end
+end
+
+def fun_l15_n121(x)
+ if (x < 1)
+ fun_l16_n262(x)
+ else
+ fun_l16_n441(x)
+ end
+end
+
+def fun_l15_n122(x)
+ if (x < 1)
+ fun_l16_n29(x)
+ else
+ fun_l16_n837(x)
+ end
+end
+
+def fun_l15_n123(x)
+ if (x < 1)
+ fun_l16_n796(x)
+ else
+ fun_l16_n771(x)
+ end
+end
+
+def fun_l15_n124(x)
+ if (x < 1)
+ fun_l16_n354(x)
+ else
+ fun_l16_n818(x)
+ end
+end
+
+def fun_l15_n125(x)
+ if (x < 1)
+ fun_l16_n971(x)
+ else
+ fun_l16_n305(x)
+ end
+end
+
+def fun_l15_n126(x)
+ if (x < 1)
+ fun_l16_n435(x)
+ else
+ fun_l16_n307(x)
+ end
+end
+
+def fun_l15_n127(x)
+ if (x < 1)
+ fun_l16_n809(x)
+ else
+ fun_l16_n884(x)
+ end
+end
+
+def fun_l15_n128(x)
+ if (x < 1)
+ fun_l16_n794(x)
+ else
+ fun_l16_n480(x)
+ end
+end
+
+def fun_l15_n129(x)
+ if (x < 1)
+ fun_l16_n797(x)
+ else
+ fun_l16_n193(x)
+ end
+end
+
+def fun_l15_n130(x)
+ if (x < 1)
+ fun_l16_n415(x)
+ else
+ fun_l16_n255(x)
+ end
+end
+
+def fun_l15_n131(x)
+ if (x < 1)
+ fun_l16_n736(x)
+ else
+ fun_l16_n904(x)
+ end
+end
+
+def fun_l15_n132(x)
+ if (x < 1)
+ fun_l16_n753(x)
+ else
+ fun_l16_n408(x)
+ end
+end
+
+def fun_l15_n133(x)
+ if (x < 1)
+ fun_l16_n61(x)
+ else
+ fun_l16_n231(x)
+ end
+end
+
+def fun_l15_n134(x)
+ if (x < 1)
+ fun_l16_n541(x)
+ else
+ fun_l16_n93(x)
+ end
+end
+
+def fun_l15_n135(x)
+ if (x < 1)
+ fun_l16_n617(x)
+ else
+ fun_l16_n765(x)
+ end
+end
+
+def fun_l15_n136(x)
+ if (x < 1)
+ fun_l16_n749(x)
+ else
+ fun_l16_n344(x)
+ end
+end
+
+def fun_l15_n137(x)
+ if (x < 1)
+ fun_l16_n431(x)
+ else
+ fun_l16_n354(x)
+ end
+end
+
+def fun_l15_n138(x)
+ if (x < 1)
+ fun_l16_n116(x)
+ else
+ fun_l16_n963(x)
+ end
+end
+
+def fun_l15_n139(x)
+ if (x < 1)
+ fun_l16_n500(x)
+ else
+ fun_l16_n380(x)
+ end
+end
+
+def fun_l15_n140(x)
+ if (x < 1)
+ fun_l16_n120(x)
+ else
+ fun_l16_n953(x)
+ end
+end
+
+def fun_l15_n141(x)
+ if (x < 1)
+ fun_l16_n287(x)
+ else
+ fun_l16_n154(x)
+ end
+end
+
+def fun_l15_n142(x)
+ if (x < 1)
+ fun_l16_n347(x)
+ else
+ fun_l16_n841(x)
+ end
+end
+
+def fun_l15_n143(x)
+ if (x < 1)
+ fun_l16_n562(x)
+ else
+ fun_l16_n674(x)
+ end
+end
+
+def fun_l15_n144(x)
+ if (x < 1)
+ fun_l16_n146(x)
+ else
+ fun_l16_n788(x)
+ end
+end
+
+def fun_l15_n145(x)
+ if (x < 1)
+ fun_l16_n463(x)
+ else
+ fun_l16_n590(x)
+ end
+end
+
+def fun_l15_n146(x)
+ if (x < 1)
+ fun_l16_n452(x)
+ else
+ fun_l16_n732(x)
+ end
+end
+
+def fun_l15_n147(x)
+ if (x < 1)
+ fun_l16_n840(x)
+ else
+ fun_l16_n254(x)
+ end
+end
+
+def fun_l15_n148(x)
+ if (x < 1)
+ fun_l16_n224(x)
+ else
+ fun_l16_n826(x)
+ end
+end
+
+def fun_l15_n149(x)
+ if (x < 1)
+ fun_l16_n40(x)
+ else
+ fun_l16_n267(x)
+ end
+end
+
+def fun_l15_n150(x)
+ if (x < 1)
+ fun_l16_n160(x)
+ else
+ fun_l16_n745(x)
+ end
+end
+
+def fun_l15_n151(x)
+ if (x < 1)
+ fun_l16_n926(x)
+ else
+ fun_l16_n567(x)
+ end
+end
+
+def fun_l15_n152(x)
+ if (x < 1)
+ fun_l16_n392(x)
+ else
+ fun_l16_n487(x)
+ end
+end
+
+def fun_l15_n153(x)
+ if (x < 1)
+ fun_l16_n603(x)
+ else
+ fun_l16_n549(x)
+ end
+end
+
+def fun_l15_n154(x)
+ if (x < 1)
+ fun_l16_n993(x)
+ else
+ fun_l16_n451(x)
+ end
+end
+
+def fun_l15_n155(x)
+ if (x < 1)
+ fun_l16_n358(x)
+ else
+ fun_l16_n52(x)
+ end
+end
+
+def fun_l15_n156(x)
+ if (x < 1)
+ fun_l16_n694(x)
+ else
+ fun_l16_n419(x)
+ end
+end
+
+def fun_l15_n157(x)
+ if (x < 1)
+ fun_l16_n138(x)
+ else
+ fun_l16_n127(x)
+ end
+end
+
+def fun_l15_n158(x)
+ if (x < 1)
+ fun_l16_n619(x)
+ else
+ fun_l16_n328(x)
+ end
+end
+
+def fun_l15_n159(x)
+ if (x < 1)
+ fun_l16_n281(x)
+ else
+ fun_l16_n503(x)
+ end
+end
+
+def fun_l15_n160(x)
+ if (x < 1)
+ fun_l16_n631(x)
+ else
+ fun_l16_n69(x)
+ end
+end
+
+def fun_l15_n161(x)
+ if (x < 1)
+ fun_l16_n41(x)
+ else
+ fun_l16_n734(x)
+ end
+end
+
+def fun_l15_n162(x)
+ if (x < 1)
+ fun_l16_n809(x)
+ else
+ fun_l16_n303(x)
+ end
+end
+
+def fun_l15_n163(x)
+ if (x < 1)
+ fun_l16_n851(x)
+ else
+ fun_l16_n420(x)
+ end
+end
+
+def fun_l15_n164(x)
+ if (x < 1)
+ fun_l16_n534(x)
+ else
+ fun_l16_n686(x)
+ end
+end
+
+def fun_l15_n165(x)
+ if (x < 1)
+ fun_l16_n639(x)
+ else
+ fun_l16_n155(x)
+ end
+end
+
+def fun_l15_n166(x)
+ if (x < 1)
+ fun_l16_n196(x)
+ else
+ fun_l16_n478(x)
+ end
+end
+
+def fun_l15_n167(x)
+ if (x < 1)
+ fun_l16_n926(x)
+ else
+ fun_l16_n506(x)
+ end
+end
+
+def fun_l15_n168(x)
+ if (x < 1)
+ fun_l16_n74(x)
+ else
+ fun_l16_n442(x)
+ end
+end
+
+def fun_l15_n169(x)
+ if (x < 1)
+ fun_l16_n122(x)
+ else
+ fun_l16_n150(x)
+ end
+end
+
+def fun_l15_n170(x)
+ if (x < 1)
+ fun_l16_n805(x)
+ else
+ fun_l16_n46(x)
+ end
+end
+
+def fun_l15_n171(x)
+ if (x < 1)
+ fun_l16_n741(x)
+ else
+ fun_l16_n88(x)
+ end
+end
+
+def fun_l15_n172(x)
+ if (x < 1)
+ fun_l16_n749(x)
+ else
+ fun_l16_n896(x)
+ end
+end
+
+def fun_l15_n173(x)
+ if (x < 1)
+ fun_l16_n310(x)
+ else
+ fun_l16_n517(x)
+ end
+end
+
+def fun_l15_n174(x)
+ if (x < 1)
+ fun_l16_n237(x)
+ else
+ fun_l16_n948(x)
+ end
+end
+
+def fun_l15_n175(x)
+ if (x < 1)
+ fun_l16_n402(x)
+ else
+ fun_l16_n332(x)
+ end
+end
+
+def fun_l15_n176(x)
+ if (x < 1)
+ fun_l16_n189(x)
+ else
+ fun_l16_n223(x)
+ end
+end
+
+def fun_l15_n177(x)
+ if (x < 1)
+ fun_l16_n1(x)
+ else
+ fun_l16_n577(x)
+ end
+end
+
+def fun_l15_n178(x)
+ if (x < 1)
+ fun_l16_n738(x)
+ else
+ fun_l16_n775(x)
+ end
+end
+
+def fun_l15_n179(x)
+ if (x < 1)
+ fun_l16_n80(x)
+ else
+ fun_l16_n652(x)
+ end
+end
+
+def fun_l15_n180(x)
+ if (x < 1)
+ fun_l16_n72(x)
+ else
+ fun_l16_n635(x)
+ end
+end
+
+def fun_l15_n181(x)
+ if (x < 1)
+ fun_l16_n721(x)
+ else
+ fun_l16_n661(x)
+ end
+end
+
+def fun_l15_n182(x)
+ if (x < 1)
+ fun_l16_n354(x)
+ else
+ fun_l16_n681(x)
+ end
+end
+
+def fun_l15_n183(x)
+ if (x < 1)
+ fun_l16_n689(x)
+ else
+ fun_l16_n775(x)
+ end
+end
+
+def fun_l15_n184(x)
+ if (x < 1)
+ fun_l16_n923(x)
+ else
+ fun_l16_n719(x)
+ end
+end
+
+def fun_l15_n185(x)
+ if (x < 1)
+ fun_l16_n33(x)
+ else
+ fun_l16_n98(x)
+ end
+end
+
+def fun_l15_n186(x)
+ if (x < 1)
+ fun_l16_n155(x)
+ else
+ fun_l16_n880(x)
+ end
+end
+
+def fun_l15_n187(x)
+ if (x < 1)
+ fun_l16_n625(x)
+ else
+ fun_l16_n314(x)
+ end
+end
+
+def fun_l15_n188(x)
+ if (x < 1)
+ fun_l16_n284(x)
+ else
+ fun_l16_n229(x)
+ end
+end
+
+def fun_l15_n189(x)
+ if (x < 1)
+ fun_l16_n471(x)
+ else
+ fun_l16_n740(x)
+ end
+end
+
+def fun_l15_n190(x)
+ if (x < 1)
+ fun_l16_n102(x)
+ else
+ fun_l16_n766(x)
+ end
+end
+
+def fun_l15_n191(x)
+ if (x < 1)
+ fun_l16_n812(x)
+ else
+ fun_l16_n94(x)
+ end
+end
+
+def fun_l15_n192(x)
+ if (x < 1)
+ fun_l16_n797(x)
+ else
+ fun_l16_n736(x)
+ end
+end
+
+def fun_l15_n193(x)
+ if (x < 1)
+ fun_l16_n976(x)
+ else
+ fun_l16_n4(x)
+ end
+end
+
+def fun_l15_n194(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n612(x)
+ end
+end
+
+def fun_l15_n195(x)
+ if (x < 1)
+ fun_l16_n510(x)
+ else
+ fun_l16_n237(x)
+ end
+end
+
+def fun_l15_n196(x)
+ if (x < 1)
+ fun_l16_n116(x)
+ else
+ fun_l16_n624(x)
+ end
+end
+
+def fun_l15_n197(x)
+ if (x < 1)
+ fun_l16_n515(x)
+ else
+ fun_l16_n979(x)
+ end
+end
+
+def fun_l15_n198(x)
+ if (x < 1)
+ fun_l16_n700(x)
+ else
+ fun_l16_n284(x)
+ end
+end
+
+def fun_l15_n199(x)
+ if (x < 1)
+ fun_l16_n226(x)
+ else
+ fun_l16_n32(x)
+ end
+end
+
+def fun_l15_n200(x)
+ if (x < 1)
+ fun_l16_n453(x)
+ else
+ fun_l16_n959(x)
+ end
+end
+
+def fun_l15_n201(x)
+ if (x < 1)
+ fun_l16_n132(x)
+ else
+ fun_l16_n323(x)
+ end
+end
+
+def fun_l15_n202(x)
+ if (x < 1)
+ fun_l16_n539(x)
+ else
+ fun_l16_n670(x)
+ end
+end
+
+def fun_l15_n203(x)
+ if (x < 1)
+ fun_l16_n786(x)
+ else
+ fun_l16_n633(x)
+ end
+end
+
+def fun_l15_n204(x)
+ if (x < 1)
+ fun_l16_n498(x)
+ else
+ fun_l16_n520(x)
+ end
+end
+
+def fun_l15_n205(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n573(x)
+ end
+end
+
+def fun_l15_n206(x)
+ if (x < 1)
+ fun_l16_n746(x)
+ else
+ fun_l16_n562(x)
+ end
+end
+
+def fun_l15_n207(x)
+ if (x < 1)
+ fun_l16_n500(x)
+ else
+ fun_l16_n951(x)
+ end
+end
+
+def fun_l15_n208(x)
+ if (x < 1)
+ fun_l16_n331(x)
+ else
+ fun_l16_n596(x)
+ end
+end
+
+def fun_l15_n209(x)
+ if (x < 1)
+ fun_l16_n1(x)
+ else
+ fun_l16_n69(x)
+ end
+end
+
+def fun_l15_n210(x)
+ if (x < 1)
+ fun_l16_n19(x)
+ else
+ fun_l16_n148(x)
+ end
+end
+
+def fun_l15_n211(x)
+ if (x < 1)
+ fun_l16_n770(x)
+ else
+ fun_l16_n216(x)
+ end
+end
+
+def fun_l15_n212(x)
+ if (x < 1)
+ fun_l16_n863(x)
+ else
+ fun_l16_n319(x)
+ end
+end
+
+def fun_l15_n213(x)
+ if (x < 1)
+ fun_l16_n675(x)
+ else
+ fun_l16_n797(x)
+ end
+end
+
+def fun_l15_n214(x)
+ if (x < 1)
+ fun_l16_n392(x)
+ else
+ fun_l16_n593(x)
+ end
+end
+
+def fun_l15_n215(x)
+ if (x < 1)
+ fun_l16_n120(x)
+ else
+ fun_l16_n232(x)
+ end
+end
+
+def fun_l15_n216(x)
+ if (x < 1)
+ fun_l16_n549(x)
+ else
+ fun_l16_n175(x)
+ end
+end
+
+def fun_l15_n217(x)
+ if (x < 1)
+ fun_l16_n784(x)
+ else
+ fun_l16_n8(x)
+ end
+end
+
+def fun_l15_n218(x)
+ if (x < 1)
+ fun_l16_n296(x)
+ else
+ fun_l16_n454(x)
+ end
+end
+
+def fun_l15_n219(x)
+ if (x < 1)
+ fun_l16_n585(x)
+ else
+ fun_l16_n628(x)
+ end
+end
+
+def fun_l15_n220(x)
+ if (x < 1)
+ fun_l16_n375(x)
+ else
+ fun_l16_n294(x)
+ end
+end
+
+def fun_l15_n221(x)
+ if (x < 1)
+ fun_l16_n69(x)
+ else
+ fun_l16_n771(x)
+ end
+end
+
+def fun_l15_n222(x)
+ if (x < 1)
+ fun_l16_n885(x)
+ else
+ fun_l16_n476(x)
+ end
+end
+
+def fun_l15_n223(x)
+ if (x < 1)
+ fun_l16_n929(x)
+ else
+ fun_l16_n850(x)
+ end
+end
+
+def fun_l15_n224(x)
+ if (x < 1)
+ fun_l16_n489(x)
+ else
+ fun_l16_n234(x)
+ end
+end
+
+def fun_l15_n225(x)
+ if (x < 1)
+ fun_l16_n478(x)
+ else
+ fun_l16_n744(x)
+ end
+end
+
+def fun_l15_n226(x)
+ if (x < 1)
+ fun_l16_n714(x)
+ else
+ fun_l16_n323(x)
+ end
+end
+
+def fun_l15_n227(x)
+ if (x < 1)
+ fun_l16_n146(x)
+ else
+ fun_l16_n937(x)
+ end
+end
+
+def fun_l15_n228(x)
+ if (x < 1)
+ fun_l16_n611(x)
+ else
+ fun_l16_n320(x)
+ end
+end
+
+def fun_l15_n229(x)
+ if (x < 1)
+ fun_l16_n184(x)
+ else
+ fun_l16_n129(x)
+ end
+end
+
+def fun_l15_n230(x)
+ if (x < 1)
+ fun_l16_n563(x)
+ else
+ fun_l16_n581(x)
+ end
+end
+
+def fun_l15_n231(x)
+ if (x < 1)
+ fun_l16_n585(x)
+ else
+ fun_l16_n63(x)
+ end
+end
+
+def fun_l15_n232(x)
+ if (x < 1)
+ fun_l16_n895(x)
+ else
+ fun_l16_n622(x)
+ end
+end
+
+def fun_l15_n233(x)
+ if (x < 1)
+ fun_l16_n998(x)
+ else
+ fun_l16_n95(x)
+ end
+end
+
+def fun_l15_n234(x)
+ if (x < 1)
+ fun_l16_n770(x)
+ else
+ fun_l16_n557(x)
+ end
+end
+
+def fun_l15_n235(x)
+ if (x < 1)
+ fun_l16_n418(x)
+ else
+ fun_l16_n382(x)
+ end
+end
+
+def fun_l15_n236(x)
+ if (x < 1)
+ fun_l16_n842(x)
+ else
+ fun_l16_n543(x)
+ end
+end
+
+def fun_l15_n237(x)
+ if (x < 1)
+ fun_l16_n677(x)
+ else
+ fun_l16_n108(x)
+ end
+end
+
+def fun_l15_n238(x)
+ if (x < 1)
+ fun_l16_n557(x)
+ else
+ fun_l16_n288(x)
+ end
+end
+
+def fun_l15_n239(x)
+ if (x < 1)
+ fun_l16_n467(x)
+ else
+ fun_l16_n661(x)
+ end
+end
+
+def fun_l15_n240(x)
+ if (x < 1)
+ fun_l16_n267(x)
+ else
+ fun_l16_n559(x)
+ end
+end
+
+def fun_l15_n241(x)
+ if (x < 1)
+ fun_l16_n655(x)
+ else
+ fun_l16_n990(x)
+ end
+end
+
+def fun_l15_n242(x)
+ if (x < 1)
+ fun_l16_n673(x)
+ else
+ fun_l16_n390(x)
+ end
+end
+
+def fun_l15_n243(x)
+ if (x < 1)
+ fun_l16_n691(x)
+ else
+ fun_l16_n901(x)
+ end
+end
+
+def fun_l15_n244(x)
+ if (x < 1)
+ fun_l16_n490(x)
+ else
+ fun_l16_n627(x)
+ end
+end
+
+def fun_l15_n245(x)
+ if (x < 1)
+ fun_l16_n293(x)
+ else
+ fun_l16_n569(x)
+ end
+end
+
+def fun_l15_n246(x)
+ if (x < 1)
+ fun_l16_n818(x)
+ else
+ fun_l16_n74(x)
+ end
+end
+
+def fun_l15_n247(x)
+ if (x < 1)
+ fun_l16_n141(x)
+ else
+ fun_l16_n743(x)
+ end
+end
+
+def fun_l15_n248(x)
+ if (x < 1)
+ fun_l16_n819(x)
+ else
+ fun_l16_n141(x)
+ end
+end
+
+def fun_l15_n249(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n53(x)
+ end
+end
+
+def fun_l15_n250(x)
+ if (x < 1)
+ fun_l16_n694(x)
+ else
+ fun_l16_n463(x)
+ end
+end
+
+def fun_l15_n251(x)
+ if (x < 1)
+ fun_l16_n828(x)
+ else
+ fun_l16_n739(x)
+ end
+end
+
+def fun_l15_n252(x)
+ if (x < 1)
+ fun_l16_n18(x)
+ else
+ fun_l16_n694(x)
+ end
+end
+
+def fun_l15_n253(x)
+ if (x < 1)
+ fun_l16_n668(x)
+ else
+ fun_l16_n501(x)
+ end
+end
+
+def fun_l15_n254(x)
+ if (x < 1)
+ fun_l16_n649(x)
+ else
+ fun_l16_n397(x)
+ end
+end
+
+def fun_l15_n255(x)
+ if (x < 1)
+ fun_l16_n376(x)
+ else
+ fun_l16_n375(x)
+ end
+end
+
+def fun_l15_n256(x)
+ if (x < 1)
+ fun_l16_n451(x)
+ else
+ fun_l16_n537(x)
+ end
+end
+
+def fun_l15_n257(x)
+ if (x < 1)
+ fun_l16_n360(x)
+ else
+ fun_l16_n330(x)
+ end
+end
+
+def fun_l15_n258(x)
+ if (x < 1)
+ fun_l16_n581(x)
+ else
+ fun_l16_n193(x)
+ end
+end
+
+def fun_l15_n259(x)
+ if (x < 1)
+ fun_l16_n738(x)
+ else
+ fun_l16_n662(x)
+ end
+end
+
+def fun_l15_n260(x)
+ if (x < 1)
+ fun_l16_n450(x)
+ else
+ fun_l16_n942(x)
+ end
+end
+
+def fun_l15_n261(x)
+ if (x < 1)
+ fun_l16_n23(x)
+ else
+ fun_l16_n534(x)
+ end
+end
+
+def fun_l15_n262(x)
+ if (x < 1)
+ fun_l16_n364(x)
+ else
+ fun_l16_n716(x)
+ end
+end
+
+def fun_l15_n263(x)
+ if (x < 1)
+ fun_l16_n528(x)
+ else
+ fun_l16_n185(x)
+ end
+end
+
+def fun_l15_n264(x)
+ if (x < 1)
+ fun_l16_n491(x)
+ else
+ fun_l16_n686(x)
+ end
+end
+
+def fun_l15_n265(x)
+ if (x < 1)
+ fun_l16_n242(x)
+ else
+ fun_l16_n986(x)
+ end
+end
+
+def fun_l15_n266(x)
+ if (x < 1)
+ fun_l16_n726(x)
+ else
+ fun_l16_n88(x)
+ end
+end
+
+def fun_l15_n267(x)
+ if (x < 1)
+ fun_l16_n611(x)
+ else
+ fun_l16_n11(x)
+ end
+end
+
+def fun_l15_n268(x)
+ if (x < 1)
+ fun_l16_n993(x)
+ else
+ fun_l16_n269(x)
+ end
+end
+
+def fun_l15_n269(x)
+ if (x < 1)
+ fun_l16_n296(x)
+ else
+ fun_l16_n8(x)
+ end
+end
+
+def fun_l15_n270(x)
+ if (x < 1)
+ fun_l16_n700(x)
+ else
+ fun_l16_n692(x)
+ end
+end
+
+def fun_l15_n271(x)
+ if (x < 1)
+ fun_l16_n902(x)
+ else
+ fun_l16_n548(x)
+ end
+end
+
+def fun_l15_n272(x)
+ if (x < 1)
+ fun_l16_n39(x)
+ else
+ fun_l16_n635(x)
+ end
+end
+
+def fun_l15_n273(x)
+ if (x < 1)
+ fun_l16_n520(x)
+ else
+ fun_l16_n49(x)
+ end
+end
+
+def fun_l15_n274(x)
+ if (x < 1)
+ fun_l16_n24(x)
+ else
+ fun_l16_n466(x)
+ end
+end
+
+def fun_l15_n275(x)
+ if (x < 1)
+ fun_l16_n144(x)
+ else
+ fun_l16_n555(x)
+ end
+end
+
+def fun_l15_n276(x)
+ if (x < 1)
+ fun_l16_n719(x)
+ else
+ fun_l16_n693(x)
+ end
+end
+
+def fun_l15_n277(x)
+ if (x < 1)
+ fun_l16_n687(x)
+ else
+ fun_l16_n987(x)
+ end
+end
+
+def fun_l15_n278(x)
+ if (x < 1)
+ fun_l16_n426(x)
+ else
+ fun_l16_n179(x)
+ end
+end
+
+def fun_l15_n279(x)
+ if (x < 1)
+ fun_l16_n659(x)
+ else
+ fun_l16_n36(x)
+ end
+end
+
+def fun_l15_n280(x)
+ if (x < 1)
+ fun_l16_n460(x)
+ else
+ fun_l16_n450(x)
+ end
+end
+
+def fun_l15_n281(x)
+ if (x < 1)
+ fun_l16_n42(x)
+ else
+ fun_l16_n230(x)
+ end
+end
+
+def fun_l15_n282(x)
+ if (x < 1)
+ fun_l16_n168(x)
+ else
+ fun_l16_n422(x)
+ end
+end
+
+def fun_l15_n283(x)
+ if (x < 1)
+ fun_l16_n305(x)
+ else
+ fun_l16_n554(x)
+ end
+end
+
+def fun_l15_n284(x)
+ if (x < 1)
+ fun_l16_n680(x)
+ else
+ fun_l16_n147(x)
+ end
+end
+
+def fun_l15_n285(x)
+ if (x < 1)
+ fun_l16_n632(x)
+ else
+ fun_l16_n767(x)
+ end
+end
+
+def fun_l15_n286(x)
+ if (x < 1)
+ fun_l16_n735(x)
+ else
+ fun_l16_n465(x)
+ end
+end
+
+def fun_l15_n287(x)
+ if (x < 1)
+ fun_l16_n17(x)
+ else
+ fun_l16_n638(x)
+ end
+end
+
+def fun_l15_n288(x)
+ if (x < 1)
+ fun_l16_n517(x)
+ else
+ fun_l16_n47(x)
+ end
+end
+
+def fun_l15_n289(x)
+ if (x < 1)
+ fun_l16_n101(x)
+ else
+ fun_l16_n882(x)
+ end
+end
+
+def fun_l15_n290(x)
+ if (x < 1)
+ fun_l16_n697(x)
+ else
+ fun_l16_n963(x)
+ end
+end
+
+def fun_l15_n291(x)
+ if (x < 1)
+ fun_l16_n468(x)
+ else
+ fun_l16_n340(x)
+ end
+end
+
+def fun_l15_n292(x)
+ if (x < 1)
+ fun_l16_n817(x)
+ else
+ fun_l16_n454(x)
+ end
+end
+
+def fun_l15_n293(x)
+ if (x < 1)
+ fun_l16_n885(x)
+ else
+ fun_l16_n733(x)
+ end
+end
+
+def fun_l15_n294(x)
+ if (x < 1)
+ fun_l16_n844(x)
+ else
+ fun_l16_n564(x)
+ end
+end
+
+def fun_l15_n295(x)
+ if (x < 1)
+ fun_l16_n667(x)
+ else
+ fun_l16_n286(x)
+ end
+end
+
+def fun_l15_n296(x)
+ if (x < 1)
+ fun_l16_n694(x)
+ else
+ fun_l16_n660(x)
+ end
+end
+
+def fun_l15_n297(x)
+ if (x < 1)
+ fun_l16_n839(x)
+ else
+ fun_l16_n274(x)
+ end
+end
+
+def fun_l15_n298(x)
+ if (x < 1)
+ fun_l16_n385(x)
+ else
+ fun_l16_n821(x)
+ end
+end
+
+def fun_l15_n299(x)
+ if (x < 1)
+ fun_l16_n137(x)
+ else
+ fun_l16_n548(x)
+ end
+end
+
+def fun_l15_n300(x)
+ if (x < 1)
+ fun_l16_n662(x)
+ else
+ fun_l16_n2(x)
+ end
+end
+
+def fun_l15_n301(x)
+ if (x < 1)
+ fun_l16_n998(x)
+ else
+ fun_l16_n186(x)
+ end
+end
+
+def fun_l15_n302(x)
+ if (x < 1)
+ fun_l16_n667(x)
+ else
+ fun_l16_n454(x)
+ end
+end
+
+def fun_l15_n303(x)
+ if (x < 1)
+ fun_l16_n765(x)
+ else
+ fun_l16_n519(x)
+ end
+end
+
+def fun_l15_n304(x)
+ if (x < 1)
+ fun_l16_n936(x)
+ else
+ fun_l16_n213(x)
+ end
+end
+
+def fun_l15_n305(x)
+ if (x < 1)
+ fun_l16_n695(x)
+ else
+ fun_l16_n545(x)
+ end
+end
+
+def fun_l15_n306(x)
+ if (x < 1)
+ fun_l16_n221(x)
+ else
+ fun_l16_n545(x)
+ end
+end
+
+def fun_l15_n307(x)
+ if (x < 1)
+ fun_l16_n555(x)
+ else
+ fun_l16_n570(x)
+ end
+end
+
+def fun_l15_n308(x)
+ if (x < 1)
+ fun_l16_n57(x)
+ else
+ fun_l16_n91(x)
+ end
+end
+
+def fun_l15_n309(x)
+ if (x < 1)
+ fun_l16_n37(x)
+ else
+ fun_l16_n516(x)
+ end
+end
+
+def fun_l15_n310(x)
+ if (x < 1)
+ fun_l16_n661(x)
+ else
+ fun_l16_n98(x)
+ end
+end
+
+def fun_l15_n311(x)
+ if (x < 1)
+ fun_l16_n119(x)
+ else
+ fun_l16_n613(x)
+ end
+end
+
+def fun_l15_n312(x)
+ if (x < 1)
+ fun_l16_n982(x)
+ else
+ fun_l16_n20(x)
+ end
+end
+
+def fun_l15_n313(x)
+ if (x < 1)
+ fun_l16_n241(x)
+ else
+ fun_l16_n555(x)
+ end
+end
+
+def fun_l15_n314(x)
+ if (x < 1)
+ fun_l16_n638(x)
+ else
+ fun_l16_n854(x)
+ end
+end
+
+def fun_l15_n315(x)
+ if (x < 1)
+ fun_l16_n580(x)
+ else
+ fun_l16_n39(x)
+ end
+end
+
+def fun_l15_n316(x)
+ if (x < 1)
+ fun_l16_n705(x)
+ else
+ fun_l16_n240(x)
+ end
+end
+
+def fun_l15_n317(x)
+ if (x < 1)
+ fun_l16_n395(x)
+ else
+ fun_l16_n114(x)
+ end
+end
+
+def fun_l15_n318(x)
+ if (x < 1)
+ fun_l16_n554(x)
+ else
+ fun_l16_n239(x)
+ end
+end
+
+def fun_l15_n319(x)
+ if (x < 1)
+ fun_l16_n108(x)
+ else
+ fun_l16_n537(x)
+ end
+end
+
+def fun_l15_n320(x)
+ if (x < 1)
+ fun_l16_n554(x)
+ else
+ fun_l16_n902(x)
+ end
+end
+
+def fun_l15_n321(x)
+ if (x < 1)
+ fun_l16_n665(x)
+ else
+ fun_l16_n369(x)
+ end
+end
+
+def fun_l15_n322(x)
+ if (x < 1)
+ fun_l16_n4(x)
+ else
+ fun_l16_n572(x)
+ end
+end
+
+def fun_l15_n323(x)
+ if (x < 1)
+ fun_l16_n579(x)
+ else
+ fun_l16_n182(x)
+ end
+end
+
+def fun_l15_n324(x)
+ if (x < 1)
+ fun_l16_n593(x)
+ else
+ fun_l16_n203(x)
+ end
+end
+
+def fun_l15_n325(x)
+ if (x < 1)
+ fun_l16_n678(x)
+ else
+ fun_l16_n0(x)
+ end
+end
+
+def fun_l15_n326(x)
+ if (x < 1)
+ fun_l16_n809(x)
+ else
+ fun_l16_n833(x)
+ end
+end
+
+def fun_l15_n327(x)
+ if (x < 1)
+ fun_l16_n618(x)
+ else
+ fun_l16_n381(x)
+ end
+end
+
+def fun_l15_n328(x)
+ if (x < 1)
+ fun_l16_n133(x)
+ else
+ fun_l16_n744(x)
+ end
+end
+
+def fun_l15_n329(x)
+ if (x < 1)
+ fun_l16_n488(x)
+ else
+ fun_l16_n88(x)
+ end
+end
+
+def fun_l15_n330(x)
+ if (x < 1)
+ fun_l16_n205(x)
+ else
+ fun_l16_n402(x)
+ end
+end
+
+def fun_l15_n331(x)
+ if (x < 1)
+ fun_l16_n515(x)
+ else
+ fun_l16_n145(x)
+ end
+end
+
+def fun_l15_n332(x)
+ if (x < 1)
+ fun_l16_n581(x)
+ else
+ fun_l16_n607(x)
+ end
+end
+
+def fun_l15_n333(x)
+ if (x < 1)
+ fun_l16_n356(x)
+ else
+ fun_l16_n155(x)
+ end
+end
+
+def fun_l15_n334(x)
+ if (x < 1)
+ fun_l16_n936(x)
+ else
+ fun_l16_n272(x)
+ end
+end
+
+def fun_l15_n335(x)
+ if (x < 1)
+ fun_l16_n714(x)
+ else
+ fun_l16_n245(x)
+ end
+end
+
+def fun_l15_n336(x)
+ if (x < 1)
+ fun_l16_n581(x)
+ else
+ fun_l16_n877(x)
+ end
+end
+
+def fun_l15_n337(x)
+ if (x < 1)
+ fun_l16_n558(x)
+ else
+ fun_l16_n944(x)
+ end
+end
+
+def fun_l15_n338(x)
+ if (x < 1)
+ fun_l16_n49(x)
+ else
+ fun_l16_n501(x)
+ end
+end
+
+def fun_l15_n339(x)
+ if (x < 1)
+ fun_l16_n68(x)
+ else
+ fun_l16_n448(x)
+ end
+end
+
+def fun_l15_n340(x)
+ if (x < 1)
+ fun_l16_n249(x)
+ else
+ fun_l16_n210(x)
+ end
+end
+
+def fun_l15_n341(x)
+ if (x < 1)
+ fun_l16_n720(x)
+ else
+ fun_l16_n977(x)
+ end
+end
+
+def fun_l15_n342(x)
+ if (x < 1)
+ fun_l16_n771(x)
+ else
+ fun_l16_n519(x)
+ end
+end
+
+def fun_l15_n343(x)
+ if (x < 1)
+ fun_l16_n995(x)
+ else
+ fun_l16_n759(x)
+ end
+end
+
+def fun_l15_n344(x)
+ if (x < 1)
+ fun_l16_n972(x)
+ else
+ fun_l16_n558(x)
+ end
+end
+
+def fun_l15_n345(x)
+ if (x < 1)
+ fun_l16_n184(x)
+ else
+ fun_l16_n774(x)
+ end
+end
+
+def fun_l15_n346(x)
+ if (x < 1)
+ fun_l16_n881(x)
+ else
+ fun_l16_n858(x)
+ end
+end
+
+def fun_l15_n347(x)
+ if (x < 1)
+ fun_l16_n921(x)
+ else
+ fun_l16_n640(x)
+ end
+end
+
+def fun_l15_n348(x)
+ if (x < 1)
+ fun_l16_n840(x)
+ else
+ fun_l16_n366(x)
+ end
+end
+
+def fun_l15_n349(x)
+ if (x < 1)
+ fun_l16_n835(x)
+ else
+ fun_l16_n701(x)
+ end
+end
+
+def fun_l15_n350(x)
+ if (x < 1)
+ fun_l16_n304(x)
+ else
+ fun_l16_n144(x)
+ end
+end
+
+def fun_l15_n351(x)
+ if (x < 1)
+ fun_l16_n867(x)
+ else
+ fun_l16_n247(x)
+ end
+end
+
+def fun_l15_n352(x)
+ if (x < 1)
+ fun_l16_n595(x)
+ else
+ fun_l16_n676(x)
+ end
+end
+
+def fun_l15_n353(x)
+ if (x < 1)
+ fun_l16_n125(x)
+ else
+ fun_l16_n99(x)
+ end
+end
+
+def fun_l15_n354(x)
+ if (x < 1)
+ fun_l16_n659(x)
+ else
+ fun_l16_n559(x)
+ end
+end
+
+def fun_l15_n355(x)
+ if (x < 1)
+ fun_l16_n405(x)
+ else
+ fun_l16_n182(x)
+ end
+end
+
+def fun_l15_n356(x)
+ if (x < 1)
+ fun_l16_n347(x)
+ else
+ fun_l16_n482(x)
+ end
+end
+
+def fun_l15_n357(x)
+ if (x < 1)
+ fun_l16_n742(x)
+ else
+ fun_l16_n531(x)
+ end
+end
+
+def fun_l15_n358(x)
+ if (x < 1)
+ fun_l16_n954(x)
+ else
+ fun_l16_n908(x)
+ end
+end
+
+def fun_l15_n359(x)
+ if (x < 1)
+ fun_l16_n670(x)
+ else
+ fun_l16_n401(x)
+ end
+end
+
+def fun_l15_n360(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n802(x)
+ end
+end
+
+def fun_l15_n361(x)
+ if (x < 1)
+ fun_l16_n12(x)
+ else
+ fun_l16_n985(x)
+ end
+end
+
+def fun_l15_n362(x)
+ if (x < 1)
+ fun_l16_n644(x)
+ else
+ fun_l16_n40(x)
+ end
+end
+
+def fun_l15_n363(x)
+ if (x < 1)
+ fun_l16_n491(x)
+ else
+ fun_l16_n255(x)
+ end
+end
+
+def fun_l15_n364(x)
+ if (x < 1)
+ fun_l16_n14(x)
+ else
+ fun_l16_n433(x)
+ end
+end
+
+def fun_l15_n365(x)
+ if (x < 1)
+ fun_l16_n652(x)
+ else
+ fun_l16_n418(x)
+ end
+end
+
+def fun_l15_n366(x)
+ if (x < 1)
+ fun_l16_n815(x)
+ else
+ fun_l16_n325(x)
+ end
+end
+
+def fun_l15_n367(x)
+ if (x < 1)
+ fun_l16_n623(x)
+ else
+ fun_l16_n34(x)
+ end
+end
+
+def fun_l15_n368(x)
+ if (x < 1)
+ fun_l16_n596(x)
+ else
+ fun_l16_n382(x)
+ end
+end
+
+def fun_l15_n369(x)
+ if (x < 1)
+ fun_l16_n144(x)
+ else
+ fun_l16_n18(x)
+ end
+end
+
+def fun_l15_n370(x)
+ if (x < 1)
+ fun_l16_n37(x)
+ else
+ fun_l16_n626(x)
+ end
+end
+
+def fun_l15_n371(x)
+ if (x < 1)
+ fun_l16_n275(x)
+ else
+ fun_l16_n343(x)
+ end
+end
+
+def fun_l15_n372(x)
+ if (x < 1)
+ fun_l16_n951(x)
+ else
+ fun_l16_n93(x)
+ end
+end
+
+def fun_l15_n373(x)
+ if (x < 1)
+ fun_l16_n893(x)
+ else
+ fun_l16_n137(x)
+ end
+end
+
+def fun_l15_n374(x)
+ if (x < 1)
+ fun_l16_n32(x)
+ else
+ fun_l16_n663(x)
+ end
+end
+
+def fun_l15_n375(x)
+ if (x < 1)
+ fun_l16_n888(x)
+ else
+ fun_l16_n708(x)
+ end
+end
+
+def fun_l15_n376(x)
+ if (x < 1)
+ fun_l16_n745(x)
+ else
+ fun_l16_n275(x)
+ end
+end
+
+def fun_l15_n377(x)
+ if (x < 1)
+ fun_l16_n957(x)
+ else
+ fun_l16_n766(x)
+ end
+end
+
+def fun_l15_n378(x)
+ if (x < 1)
+ fun_l16_n242(x)
+ else
+ fun_l16_n309(x)
+ end
+end
+
+def fun_l15_n379(x)
+ if (x < 1)
+ fun_l16_n855(x)
+ else
+ fun_l16_n289(x)
+ end
+end
+
+def fun_l15_n380(x)
+ if (x < 1)
+ fun_l16_n511(x)
+ else
+ fun_l16_n261(x)
+ end
+end
+
+def fun_l15_n381(x)
+ if (x < 1)
+ fun_l16_n867(x)
+ else
+ fun_l16_n169(x)
+ end
+end
+
+def fun_l15_n382(x)
+ if (x < 1)
+ fun_l16_n646(x)
+ else
+ fun_l16_n821(x)
+ end
+end
+
+def fun_l15_n383(x)
+ if (x < 1)
+ fun_l16_n181(x)
+ else
+ fun_l16_n798(x)
+ end
+end
+
+def fun_l15_n384(x)
+ if (x < 1)
+ fun_l16_n290(x)
+ else
+ fun_l16_n756(x)
+ end
+end
+
+def fun_l15_n385(x)
+ if (x < 1)
+ fun_l16_n896(x)
+ else
+ fun_l16_n14(x)
+ end
+end
+
+def fun_l15_n386(x)
+ if (x < 1)
+ fun_l16_n602(x)
+ else
+ fun_l16_n817(x)
+ end
+end
+
+def fun_l15_n387(x)
+ if (x < 1)
+ fun_l16_n908(x)
+ else
+ fun_l16_n773(x)
+ end
+end
+
+def fun_l15_n388(x)
+ if (x < 1)
+ fun_l16_n708(x)
+ else
+ fun_l16_n416(x)
+ end
+end
+
+def fun_l15_n389(x)
+ if (x < 1)
+ fun_l16_n42(x)
+ else
+ fun_l16_n325(x)
+ end
+end
+
+def fun_l15_n390(x)
+ if (x < 1)
+ fun_l16_n245(x)
+ else
+ fun_l16_n211(x)
+ end
+end
+
+def fun_l15_n391(x)
+ if (x < 1)
+ fun_l16_n674(x)
+ else
+ fun_l16_n854(x)
+ end
+end
+
+def fun_l15_n392(x)
+ if (x < 1)
+ fun_l16_n294(x)
+ else
+ fun_l16_n299(x)
+ end
+end
+
+def fun_l15_n393(x)
+ if (x < 1)
+ fun_l16_n873(x)
+ else
+ fun_l16_n17(x)
+ end
+end
+
+def fun_l15_n394(x)
+ if (x < 1)
+ fun_l16_n375(x)
+ else
+ fun_l16_n976(x)
+ end
+end
+
+def fun_l15_n395(x)
+ if (x < 1)
+ fun_l16_n753(x)
+ else
+ fun_l16_n362(x)
+ end
+end
+
+def fun_l15_n396(x)
+ if (x < 1)
+ fun_l16_n326(x)
+ else
+ fun_l16_n878(x)
+ end
+end
+
+def fun_l15_n397(x)
+ if (x < 1)
+ fun_l16_n118(x)
+ else
+ fun_l16_n552(x)
+ end
+end
+
+def fun_l15_n398(x)
+ if (x < 1)
+ fun_l16_n931(x)
+ else
+ fun_l16_n552(x)
+ end
+end
+
+def fun_l15_n399(x)
+ if (x < 1)
+ fun_l16_n125(x)
+ else
+ fun_l16_n817(x)
+ end
+end
+
+def fun_l15_n400(x)
+ if (x < 1)
+ fun_l16_n747(x)
+ else
+ fun_l16_n328(x)
+ end
+end
+
+def fun_l15_n401(x)
+ if (x < 1)
+ fun_l16_n204(x)
+ else
+ fun_l16_n644(x)
+ end
+end
+
+def fun_l15_n402(x)
+ if (x < 1)
+ fun_l16_n730(x)
+ else
+ fun_l16_n622(x)
+ end
+end
+
+def fun_l15_n403(x)
+ if (x < 1)
+ fun_l16_n718(x)
+ else
+ fun_l16_n616(x)
+ end
+end
+
+def fun_l15_n404(x)
+ if (x < 1)
+ fun_l16_n260(x)
+ else
+ fun_l16_n96(x)
+ end
+end
+
+def fun_l15_n405(x)
+ if (x < 1)
+ fun_l16_n123(x)
+ else
+ fun_l16_n377(x)
+ end
+end
+
+def fun_l15_n406(x)
+ if (x < 1)
+ fun_l16_n425(x)
+ else
+ fun_l16_n601(x)
+ end
+end
+
+def fun_l15_n407(x)
+ if (x < 1)
+ fun_l16_n842(x)
+ else
+ fun_l16_n936(x)
+ end
+end
+
+def fun_l15_n408(x)
+ if (x < 1)
+ fun_l16_n797(x)
+ else
+ fun_l16_n194(x)
+ end
+end
+
+def fun_l15_n409(x)
+ if (x < 1)
+ fun_l16_n930(x)
+ else
+ fun_l16_n976(x)
+ end
+end
+
+def fun_l15_n410(x)
+ if (x < 1)
+ fun_l16_n163(x)
+ else
+ fun_l16_n703(x)
+ end
+end
+
+def fun_l15_n411(x)
+ if (x < 1)
+ fun_l16_n109(x)
+ else
+ fun_l16_n276(x)
+ end
+end
+
+def fun_l15_n412(x)
+ if (x < 1)
+ fun_l16_n37(x)
+ else
+ fun_l16_n372(x)
+ end
+end
+
+def fun_l15_n413(x)
+ if (x < 1)
+ fun_l16_n995(x)
+ else
+ fun_l16_n762(x)
+ end
+end
+
+def fun_l15_n414(x)
+ if (x < 1)
+ fun_l16_n789(x)
+ else
+ fun_l16_n601(x)
+ end
+end
+
+def fun_l15_n415(x)
+ if (x < 1)
+ fun_l16_n699(x)
+ else
+ fun_l16_n853(x)
+ end
+end
+
+def fun_l15_n416(x)
+ if (x < 1)
+ fun_l16_n936(x)
+ else
+ fun_l16_n478(x)
+ end
+end
+
+def fun_l15_n417(x)
+ if (x < 1)
+ fun_l16_n50(x)
+ else
+ fun_l16_n67(x)
+ end
+end
+
+def fun_l15_n418(x)
+ if (x < 1)
+ fun_l16_n563(x)
+ else
+ fun_l16_n248(x)
+ end
+end
+
+def fun_l15_n419(x)
+ if (x < 1)
+ fun_l16_n238(x)
+ else
+ fun_l16_n188(x)
+ end
+end
+
+def fun_l15_n420(x)
+ if (x < 1)
+ fun_l16_n369(x)
+ else
+ fun_l16_n706(x)
+ end
+end
+
+def fun_l15_n421(x)
+ if (x < 1)
+ fun_l16_n641(x)
+ else
+ fun_l16_n869(x)
+ end
+end
+
+def fun_l15_n422(x)
+ if (x < 1)
+ fun_l16_n219(x)
+ else
+ fun_l16_n333(x)
+ end
+end
+
+def fun_l15_n423(x)
+ if (x < 1)
+ fun_l16_n156(x)
+ else
+ fun_l16_n22(x)
+ end
+end
+
+def fun_l15_n424(x)
+ if (x < 1)
+ fun_l16_n443(x)
+ else
+ fun_l16_n1(x)
+ end
+end
+
+def fun_l15_n425(x)
+ if (x < 1)
+ fun_l16_n892(x)
+ else
+ fun_l16_n937(x)
+ end
+end
+
+def fun_l15_n426(x)
+ if (x < 1)
+ fun_l16_n586(x)
+ else
+ fun_l16_n636(x)
+ end
+end
+
+def fun_l15_n427(x)
+ if (x < 1)
+ fun_l16_n519(x)
+ else
+ fun_l16_n269(x)
+ end
+end
+
+def fun_l15_n428(x)
+ if (x < 1)
+ fun_l16_n379(x)
+ else
+ fun_l16_n994(x)
+ end
+end
+
+def fun_l15_n429(x)
+ if (x < 1)
+ fun_l16_n588(x)
+ else
+ fun_l16_n532(x)
+ end
+end
+
+def fun_l15_n430(x)
+ if (x < 1)
+ fun_l16_n584(x)
+ else
+ fun_l16_n445(x)
+ end
+end
+
+def fun_l15_n431(x)
+ if (x < 1)
+ fun_l16_n63(x)
+ else
+ fun_l16_n678(x)
+ end
+end
+
+def fun_l15_n432(x)
+ if (x < 1)
+ fun_l16_n487(x)
+ else
+ fun_l16_n435(x)
+ end
+end
+
+def fun_l15_n433(x)
+ if (x < 1)
+ fun_l16_n673(x)
+ else
+ fun_l16_n220(x)
+ end
+end
+
+def fun_l15_n434(x)
+ if (x < 1)
+ fun_l16_n131(x)
+ else
+ fun_l16_n751(x)
+ end
+end
+
+def fun_l15_n435(x)
+ if (x < 1)
+ fun_l16_n557(x)
+ else
+ fun_l16_n340(x)
+ end
+end
+
+def fun_l15_n436(x)
+ if (x < 1)
+ fun_l16_n511(x)
+ else
+ fun_l16_n751(x)
+ end
+end
+
+def fun_l15_n437(x)
+ if (x < 1)
+ fun_l16_n983(x)
+ else
+ fun_l16_n632(x)
+ end
+end
+
+def fun_l15_n438(x)
+ if (x < 1)
+ fun_l16_n350(x)
+ else
+ fun_l16_n492(x)
+ end
+end
+
+def fun_l15_n439(x)
+ if (x < 1)
+ fun_l16_n994(x)
+ else
+ fun_l16_n76(x)
+ end
+end
+
+def fun_l15_n440(x)
+ if (x < 1)
+ fun_l16_n756(x)
+ else
+ fun_l16_n177(x)
+ end
+end
+
+def fun_l15_n441(x)
+ if (x < 1)
+ fun_l16_n619(x)
+ else
+ fun_l16_n473(x)
+ end
+end
+
+def fun_l15_n442(x)
+ if (x < 1)
+ fun_l16_n667(x)
+ else
+ fun_l16_n714(x)
+ end
+end
+
+def fun_l15_n443(x)
+ if (x < 1)
+ fun_l16_n790(x)
+ else
+ fun_l16_n848(x)
+ end
+end
+
+def fun_l15_n444(x)
+ if (x < 1)
+ fun_l16_n925(x)
+ else
+ fun_l16_n113(x)
+ end
+end
+
+def fun_l15_n445(x)
+ if (x < 1)
+ fun_l16_n990(x)
+ else
+ fun_l16_n566(x)
+ end
+end
+
+def fun_l15_n446(x)
+ if (x < 1)
+ fun_l16_n589(x)
+ else
+ fun_l16_n881(x)
+ end
+end
+
+def fun_l15_n447(x)
+ if (x < 1)
+ fun_l16_n961(x)
+ else
+ fun_l16_n786(x)
+ end
+end
+
+def fun_l15_n448(x)
+ if (x < 1)
+ fun_l16_n928(x)
+ else
+ fun_l16_n631(x)
+ end
+end
+
+def fun_l15_n449(x)
+ if (x < 1)
+ fun_l16_n317(x)
+ else
+ fun_l16_n980(x)
+ end
+end
+
+def fun_l15_n450(x)
+ if (x < 1)
+ fun_l16_n276(x)
+ else
+ fun_l16_n941(x)
+ end
+end
+
+def fun_l15_n451(x)
+ if (x < 1)
+ fun_l16_n552(x)
+ else
+ fun_l16_n545(x)
+ end
+end
+
+def fun_l15_n452(x)
+ if (x < 1)
+ fun_l16_n334(x)
+ else
+ fun_l16_n340(x)
+ end
+end
+
+def fun_l15_n453(x)
+ if (x < 1)
+ fun_l16_n800(x)
+ else
+ fun_l16_n548(x)
+ end
+end
+
+def fun_l15_n454(x)
+ if (x < 1)
+ fun_l16_n676(x)
+ else
+ fun_l16_n742(x)
+ end
+end
+
+def fun_l15_n455(x)
+ if (x < 1)
+ fun_l16_n722(x)
+ else
+ fun_l16_n446(x)
+ end
+end
+
+def fun_l15_n456(x)
+ if (x < 1)
+ fun_l16_n570(x)
+ else
+ fun_l16_n203(x)
+ end
+end
+
+def fun_l15_n457(x)
+ if (x < 1)
+ fun_l16_n425(x)
+ else
+ fun_l16_n401(x)
+ end
+end
+
+def fun_l15_n458(x)
+ if (x < 1)
+ fun_l16_n3(x)
+ else
+ fun_l16_n483(x)
+ end
+end
+
+def fun_l15_n459(x)
+ if (x < 1)
+ fun_l16_n450(x)
+ else
+ fun_l16_n468(x)
+ end
+end
+
+def fun_l15_n460(x)
+ if (x < 1)
+ fun_l16_n447(x)
+ else
+ fun_l16_n758(x)
+ end
+end
+
+def fun_l15_n461(x)
+ if (x < 1)
+ fun_l16_n531(x)
+ else
+ fun_l16_n268(x)
+ end
+end
+
+def fun_l15_n462(x)
+ if (x < 1)
+ fun_l16_n628(x)
+ else
+ fun_l16_n142(x)
+ end
+end
+
+def fun_l15_n463(x)
+ if (x < 1)
+ fun_l16_n823(x)
+ else
+ fun_l16_n97(x)
+ end
+end
+
+def fun_l15_n464(x)
+ if (x < 1)
+ fun_l16_n807(x)
+ else
+ fun_l16_n231(x)
+ end
+end
+
+def fun_l15_n465(x)
+ if (x < 1)
+ fun_l16_n113(x)
+ else
+ fun_l16_n438(x)
+ end
+end
+
+def fun_l15_n466(x)
+ if (x < 1)
+ fun_l16_n234(x)
+ else
+ fun_l16_n369(x)
+ end
+end
+
+def fun_l15_n467(x)
+ if (x < 1)
+ fun_l16_n242(x)
+ else
+ fun_l16_n121(x)
+ end
+end
+
+def fun_l15_n468(x)
+ if (x < 1)
+ fun_l16_n38(x)
+ else
+ fun_l16_n223(x)
+ end
+end
+
+def fun_l15_n469(x)
+ if (x < 1)
+ fun_l16_n618(x)
+ else
+ fun_l16_n550(x)
+ end
+end
+
+def fun_l15_n470(x)
+ if (x < 1)
+ fun_l16_n318(x)
+ else
+ fun_l16_n182(x)
+ end
+end
+
+def fun_l15_n471(x)
+ if (x < 1)
+ fun_l16_n782(x)
+ else
+ fun_l16_n876(x)
+ end
+end
+
+def fun_l15_n472(x)
+ if (x < 1)
+ fun_l16_n995(x)
+ else
+ fun_l16_n4(x)
+ end
+end
+
+def fun_l15_n473(x)
+ if (x < 1)
+ fun_l16_n425(x)
+ else
+ fun_l16_n891(x)
+ end
+end
+
+def fun_l15_n474(x)
+ if (x < 1)
+ fun_l16_n263(x)
+ else
+ fun_l16_n278(x)
+ end
+end
+
+def fun_l15_n475(x)
+ if (x < 1)
+ fun_l16_n116(x)
+ else
+ fun_l16_n62(x)
+ end
+end
+
+def fun_l15_n476(x)
+ if (x < 1)
+ fun_l16_n855(x)
+ else
+ fun_l16_n153(x)
+ end
+end
+
+def fun_l15_n477(x)
+ if (x < 1)
+ fun_l16_n979(x)
+ else
+ fun_l16_n957(x)
+ end
+end
+
+def fun_l15_n478(x)
+ if (x < 1)
+ fun_l16_n671(x)
+ else
+ fun_l16_n694(x)
+ end
+end
+
+def fun_l15_n479(x)
+ if (x < 1)
+ fun_l16_n479(x)
+ else
+ fun_l16_n400(x)
+ end
+end
+
+def fun_l15_n480(x)
+ if (x < 1)
+ fun_l16_n740(x)
+ else
+ fun_l16_n940(x)
+ end
+end
+
+def fun_l15_n481(x)
+ if (x < 1)
+ fun_l16_n270(x)
+ else
+ fun_l16_n802(x)
+ end
+end
+
+def fun_l15_n482(x)
+ if (x < 1)
+ fun_l16_n489(x)
+ else
+ fun_l16_n402(x)
+ end
+end
+
+def fun_l15_n483(x)
+ if (x < 1)
+ fun_l16_n505(x)
+ else
+ fun_l16_n97(x)
+ end
+end
+
+def fun_l15_n484(x)
+ if (x < 1)
+ fun_l16_n64(x)
+ else
+ fun_l16_n748(x)
+ end
+end
+
+def fun_l15_n485(x)
+ if (x < 1)
+ fun_l16_n7(x)
+ else
+ fun_l16_n627(x)
+ end
+end
+
+def fun_l15_n486(x)
+ if (x < 1)
+ fun_l16_n302(x)
+ else
+ fun_l16_n331(x)
+ end
+end
+
+def fun_l15_n487(x)
+ if (x < 1)
+ fun_l16_n771(x)
+ else
+ fun_l16_n895(x)
+ end
+end
+
+def fun_l15_n488(x)
+ if (x < 1)
+ fun_l16_n306(x)
+ else
+ fun_l16_n740(x)
+ end
+end
+
+def fun_l15_n489(x)
+ if (x < 1)
+ fun_l16_n722(x)
+ else
+ fun_l16_n848(x)
+ end
+end
+
+def fun_l15_n490(x)
+ if (x < 1)
+ fun_l16_n764(x)
+ else
+ fun_l16_n851(x)
+ end
+end
+
+def fun_l15_n491(x)
+ if (x < 1)
+ fun_l16_n357(x)
+ else
+ fun_l16_n117(x)
+ end
+end
+
+def fun_l15_n492(x)
+ if (x < 1)
+ fun_l16_n483(x)
+ else
+ fun_l16_n187(x)
+ end
+end
+
+def fun_l15_n493(x)
+ if (x < 1)
+ fun_l16_n695(x)
+ else
+ fun_l16_n727(x)
+ end
+end
+
+def fun_l15_n494(x)
+ if (x < 1)
+ fun_l16_n460(x)
+ else
+ fun_l16_n154(x)
+ end
+end
+
+def fun_l15_n495(x)
+ if (x < 1)
+ fun_l16_n130(x)
+ else
+ fun_l16_n999(x)
+ end
+end
+
+def fun_l15_n496(x)
+ if (x < 1)
+ fun_l16_n963(x)
+ else
+ fun_l16_n746(x)
+ end
+end
+
+def fun_l15_n497(x)
+ if (x < 1)
+ fun_l16_n630(x)
+ else
+ fun_l16_n852(x)
+ end
+end
+
+def fun_l15_n498(x)
+ if (x < 1)
+ fun_l16_n847(x)
+ else
+ fun_l16_n836(x)
+ end
+end
+
+def fun_l15_n499(x)
+ if (x < 1)
+ fun_l16_n100(x)
+ else
+ fun_l16_n40(x)
+ end
+end
+
+def fun_l15_n500(x)
+ if (x < 1)
+ fun_l16_n246(x)
+ else
+ fun_l16_n442(x)
+ end
+end
+
+def fun_l15_n501(x)
+ if (x < 1)
+ fun_l16_n355(x)
+ else
+ fun_l16_n405(x)
+ end
+end
+
+def fun_l15_n502(x)
+ if (x < 1)
+ fun_l16_n857(x)
+ else
+ fun_l16_n652(x)
+ end
+end
+
+def fun_l15_n503(x)
+ if (x < 1)
+ fun_l16_n612(x)
+ else
+ fun_l16_n779(x)
+ end
+end
+
+def fun_l15_n504(x)
+ if (x < 1)
+ fun_l16_n836(x)
+ else
+ fun_l16_n625(x)
+ end
+end
+
+def fun_l15_n505(x)
+ if (x < 1)
+ fun_l16_n872(x)
+ else
+ fun_l16_n905(x)
+ end
+end
+
+def fun_l15_n506(x)
+ if (x < 1)
+ fun_l16_n953(x)
+ else
+ fun_l16_n955(x)
+ end
+end
+
+def fun_l15_n507(x)
+ if (x < 1)
+ fun_l16_n678(x)
+ else
+ fun_l16_n663(x)
+ end
+end
+
+def fun_l15_n508(x)
+ if (x < 1)
+ fun_l16_n848(x)
+ else
+ fun_l16_n438(x)
+ end
+end
+
+def fun_l15_n509(x)
+ if (x < 1)
+ fun_l16_n558(x)
+ else
+ fun_l16_n430(x)
+ end
+end
+
+def fun_l15_n510(x)
+ if (x < 1)
+ fun_l16_n424(x)
+ else
+ fun_l16_n473(x)
+ end
+end
+
+def fun_l15_n511(x)
+ if (x < 1)
+ fun_l16_n897(x)
+ else
+ fun_l16_n359(x)
+ end
+end
+
+def fun_l15_n512(x)
+ if (x < 1)
+ fun_l16_n229(x)
+ else
+ fun_l16_n205(x)
+ end
+end
+
+def fun_l15_n513(x)
+ if (x < 1)
+ fun_l16_n553(x)
+ else
+ fun_l16_n438(x)
+ end
+end
+
+def fun_l15_n514(x)
+ if (x < 1)
+ fun_l16_n300(x)
+ else
+ fun_l16_n588(x)
+ end
+end
+
+def fun_l15_n515(x)
+ if (x < 1)
+ fun_l16_n819(x)
+ else
+ fun_l16_n467(x)
+ end
+end
+
+def fun_l15_n516(x)
+ if (x < 1)
+ fun_l16_n767(x)
+ else
+ fun_l16_n786(x)
+ end
+end
+
+def fun_l15_n517(x)
+ if (x < 1)
+ fun_l16_n50(x)
+ else
+ fun_l16_n309(x)
+ end
+end
+
+def fun_l15_n518(x)
+ if (x < 1)
+ fun_l16_n671(x)
+ else
+ fun_l16_n635(x)
+ end
+end
+
+def fun_l15_n519(x)
+ if (x < 1)
+ fun_l16_n935(x)
+ else
+ fun_l16_n497(x)
+ end
+end
+
+def fun_l15_n520(x)
+ if (x < 1)
+ fun_l16_n343(x)
+ else
+ fun_l16_n175(x)
+ end
+end
+
+def fun_l15_n521(x)
+ if (x < 1)
+ fun_l16_n212(x)
+ else
+ fun_l16_n987(x)
+ end
+end
+
+def fun_l15_n522(x)
+ if (x < 1)
+ fun_l16_n780(x)
+ else
+ fun_l16_n331(x)
+ end
+end
+
+def fun_l15_n523(x)
+ if (x < 1)
+ fun_l16_n452(x)
+ else
+ fun_l16_n393(x)
+ end
+end
+
+def fun_l15_n524(x)
+ if (x < 1)
+ fun_l16_n823(x)
+ else
+ fun_l16_n212(x)
+ end
+end
+
+def fun_l15_n525(x)
+ if (x < 1)
+ fun_l16_n516(x)
+ else
+ fun_l16_n906(x)
+ end
+end
+
+def fun_l15_n526(x)
+ if (x < 1)
+ fun_l16_n590(x)
+ else
+ fun_l16_n278(x)
+ end
+end
+
+def fun_l15_n527(x)
+ if (x < 1)
+ fun_l16_n392(x)
+ else
+ fun_l16_n714(x)
+ end
+end
+
+def fun_l15_n528(x)
+ if (x < 1)
+ fun_l16_n729(x)
+ else
+ fun_l16_n751(x)
+ end
+end
+
+def fun_l15_n529(x)
+ if (x < 1)
+ fun_l16_n863(x)
+ else
+ fun_l16_n478(x)
+ end
+end
+
+def fun_l15_n530(x)
+ if (x < 1)
+ fun_l16_n472(x)
+ else
+ fun_l16_n672(x)
+ end
+end
+
+def fun_l15_n531(x)
+ if (x < 1)
+ fun_l16_n811(x)
+ else
+ fun_l16_n201(x)
+ end
+end
+
+def fun_l15_n532(x)
+ if (x < 1)
+ fun_l16_n558(x)
+ else
+ fun_l16_n602(x)
+ end
+end
+
+def fun_l15_n533(x)
+ if (x < 1)
+ fun_l16_n788(x)
+ else
+ fun_l16_n175(x)
+ end
+end
+
+def fun_l15_n534(x)
+ if (x < 1)
+ fun_l16_n497(x)
+ else
+ fun_l16_n807(x)
+ end
+end
+
+def fun_l15_n535(x)
+ if (x < 1)
+ fun_l16_n712(x)
+ else
+ fun_l16_n870(x)
+ end
+end
+
+def fun_l15_n536(x)
+ if (x < 1)
+ fun_l16_n699(x)
+ else
+ fun_l16_n879(x)
+ end
+end
+
+def fun_l15_n537(x)
+ if (x < 1)
+ fun_l16_n215(x)
+ else
+ fun_l16_n807(x)
+ end
+end
+
+def fun_l15_n538(x)
+ if (x < 1)
+ fun_l16_n569(x)
+ else
+ fun_l16_n385(x)
+ end
+end
+
+def fun_l15_n539(x)
+ if (x < 1)
+ fun_l16_n807(x)
+ else
+ fun_l16_n699(x)
+ end
+end
+
+def fun_l15_n540(x)
+ if (x < 1)
+ fun_l16_n982(x)
+ else
+ fun_l16_n436(x)
+ end
+end
+
+def fun_l15_n541(x)
+ if (x < 1)
+ fun_l16_n852(x)
+ else
+ fun_l16_n800(x)
+ end
+end
+
+def fun_l15_n542(x)
+ if (x < 1)
+ fun_l16_n401(x)
+ else
+ fun_l16_n478(x)
+ end
+end
+
+def fun_l15_n543(x)
+ if (x < 1)
+ fun_l16_n373(x)
+ else
+ fun_l16_n465(x)
+ end
+end
+
+def fun_l15_n544(x)
+ if (x < 1)
+ fun_l16_n299(x)
+ else
+ fun_l16_n337(x)
+ end
+end
+
+def fun_l15_n545(x)
+ if (x < 1)
+ fun_l16_n931(x)
+ else
+ fun_l16_n68(x)
+ end
+end
+
+def fun_l15_n546(x)
+ if (x < 1)
+ fun_l16_n87(x)
+ else
+ fun_l16_n947(x)
+ end
+end
+
+def fun_l15_n547(x)
+ if (x < 1)
+ fun_l16_n287(x)
+ else
+ fun_l16_n530(x)
+ end
+end
+
+def fun_l15_n548(x)
+ if (x < 1)
+ fun_l16_n910(x)
+ else
+ fun_l16_n112(x)
+ end
+end
+
+def fun_l15_n549(x)
+ if (x < 1)
+ fun_l16_n878(x)
+ else
+ fun_l16_n737(x)
+ end
+end
+
+def fun_l15_n550(x)
+ if (x < 1)
+ fun_l16_n538(x)
+ else
+ fun_l16_n634(x)
+ end
+end
+
+def fun_l15_n551(x)
+ if (x < 1)
+ fun_l16_n109(x)
+ else
+ fun_l16_n493(x)
+ end
+end
+
+def fun_l15_n552(x)
+ if (x < 1)
+ fun_l16_n631(x)
+ else
+ fun_l16_n244(x)
+ end
+end
+
+def fun_l15_n553(x)
+ if (x < 1)
+ fun_l16_n107(x)
+ else
+ fun_l16_n718(x)
+ end
+end
+
+def fun_l15_n554(x)
+ if (x < 1)
+ fun_l16_n572(x)
+ else
+ fun_l16_n199(x)
+ end
+end
+
+def fun_l15_n555(x)
+ if (x < 1)
+ fun_l16_n109(x)
+ else
+ fun_l16_n705(x)
+ end
+end
+
+def fun_l15_n556(x)
+ if (x < 1)
+ fun_l16_n679(x)
+ else
+ fun_l16_n999(x)
+ end
+end
+
+def fun_l15_n557(x)
+ if (x < 1)
+ fun_l16_n714(x)
+ else
+ fun_l16_n121(x)
+ end
+end
+
+def fun_l15_n558(x)
+ if (x < 1)
+ fun_l16_n408(x)
+ else
+ fun_l16_n239(x)
+ end
+end
+
+def fun_l15_n559(x)
+ if (x < 1)
+ fun_l16_n861(x)
+ else
+ fun_l16_n83(x)
+ end
+end
+
+def fun_l15_n560(x)
+ if (x < 1)
+ fun_l16_n597(x)
+ else
+ fun_l16_n413(x)
+ end
+end
+
+def fun_l15_n561(x)
+ if (x < 1)
+ fun_l16_n485(x)
+ else
+ fun_l16_n42(x)
+ end
+end
+
+def fun_l15_n562(x)
+ if (x < 1)
+ fun_l16_n798(x)
+ else
+ fun_l16_n340(x)
+ end
+end
+
+def fun_l15_n563(x)
+ if (x < 1)
+ fun_l16_n50(x)
+ else
+ fun_l16_n858(x)
+ end
+end
+
+def fun_l15_n564(x)
+ if (x < 1)
+ fun_l16_n92(x)
+ else
+ fun_l16_n3(x)
+ end
+end
+
+def fun_l15_n565(x)
+ if (x < 1)
+ fun_l16_n311(x)
+ else
+ fun_l16_n953(x)
+ end
+end
+
+def fun_l15_n566(x)
+ if (x < 1)
+ fun_l16_n649(x)
+ else
+ fun_l16_n670(x)
+ end
+end
+
+def fun_l15_n567(x)
+ if (x < 1)
+ fun_l16_n598(x)
+ else
+ fun_l16_n268(x)
+ end
+end
+
+def fun_l15_n568(x)
+ if (x < 1)
+ fun_l16_n425(x)
+ else
+ fun_l16_n821(x)
+ end
+end
+
+def fun_l15_n569(x)
+ if (x < 1)
+ fun_l16_n447(x)
+ else
+ fun_l16_n940(x)
+ end
+end
+
+def fun_l15_n570(x)
+ if (x < 1)
+ fun_l16_n755(x)
+ else
+ fun_l16_n26(x)
+ end
+end
+
+def fun_l15_n571(x)
+ if (x < 1)
+ fun_l16_n157(x)
+ else
+ fun_l16_n582(x)
+ end
+end
+
+def fun_l15_n572(x)
+ if (x < 1)
+ fun_l16_n530(x)
+ else
+ fun_l16_n202(x)
+ end
+end
+
+def fun_l15_n573(x)
+ if (x < 1)
+ fun_l16_n95(x)
+ else
+ fun_l16_n137(x)
+ end
+end
+
+def fun_l15_n574(x)
+ if (x < 1)
+ fun_l16_n789(x)
+ else
+ fun_l16_n531(x)
+ end
+end
+
+def fun_l15_n575(x)
+ if (x < 1)
+ fun_l16_n677(x)
+ else
+ fun_l16_n686(x)
+ end
+end
+
+def fun_l15_n576(x)
+ if (x < 1)
+ fun_l16_n253(x)
+ else
+ fun_l16_n101(x)
+ end
+end
+
+def fun_l15_n577(x)
+ if (x < 1)
+ fun_l16_n579(x)
+ else
+ fun_l16_n250(x)
+ end
+end
+
+def fun_l15_n578(x)
+ if (x < 1)
+ fun_l16_n104(x)
+ else
+ fun_l16_n860(x)
+ end
+end
+
+def fun_l15_n579(x)
+ if (x < 1)
+ fun_l16_n415(x)
+ else
+ fun_l16_n480(x)
+ end
+end
+
+def fun_l15_n580(x)
+ if (x < 1)
+ fun_l16_n255(x)
+ else
+ fun_l16_n123(x)
+ end
+end
+
+def fun_l15_n581(x)
+ if (x < 1)
+ fun_l16_n40(x)
+ else
+ fun_l16_n36(x)
+ end
+end
+
+def fun_l15_n582(x)
+ if (x < 1)
+ fun_l16_n612(x)
+ else
+ fun_l16_n46(x)
+ end
+end
+
+def fun_l15_n583(x)
+ if (x < 1)
+ fun_l16_n328(x)
+ else
+ fun_l16_n638(x)
+ end
+end
+
+def fun_l15_n584(x)
+ if (x < 1)
+ fun_l16_n219(x)
+ else
+ fun_l16_n672(x)
+ end
+end
+
+def fun_l15_n585(x)
+ if (x < 1)
+ fun_l16_n67(x)
+ else
+ fun_l16_n584(x)
+ end
+end
+
+def fun_l15_n586(x)
+ if (x < 1)
+ fun_l16_n222(x)
+ else
+ fun_l16_n366(x)
+ end
+end
+
+def fun_l15_n587(x)
+ if (x < 1)
+ fun_l16_n194(x)
+ else
+ fun_l16_n54(x)
+ end
+end
+
+def fun_l15_n588(x)
+ if (x < 1)
+ fun_l16_n742(x)
+ else
+ fun_l16_n725(x)
+ end
+end
+
+def fun_l15_n589(x)
+ if (x < 1)
+ fun_l16_n557(x)
+ else
+ fun_l16_n688(x)
+ end
+end
+
+def fun_l15_n590(x)
+ if (x < 1)
+ fun_l16_n588(x)
+ else
+ fun_l16_n296(x)
+ end
+end
+
+def fun_l15_n591(x)
+ if (x < 1)
+ fun_l16_n756(x)
+ else
+ fun_l16_n619(x)
+ end
+end
+
+def fun_l15_n592(x)
+ if (x < 1)
+ fun_l16_n919(x)
+ else
+ fun_l16_n607(x)
+ end
+end
+
+def fun_l15_n593(x)
+ if (x < 1)
+ fun_l16_n168(x)
+ else
+ fun_l16_n425(x)
+ end
+end
+
+def fun_l15_n594(x)
+ if (x < 1)
+ fun_l16_n641(x)
+ else
+ fun_l16_n980(x)
+ end
+end
+
+def fun_l15_n595(x)
+ if (x < 1)
+ fun_l16_n132(x)
+ else
+ fun_l16_n120(x)
+ end
+end
+
+def fun_l15_n596(x)
+ if (x < 1)
+ fun_l16_n998(x)
+ else
+ fun_l16_n383(x)
+ end
+end
+
+def fun_l15_n597(x)
+ if (x < 1)
+ fun_l16_n987(x)
+ else
+ fun_l16_n685(x)
+ end
+end
+
+def fun_l15_n598(x)
+ if (x < 1)
+ fun_l16_n898(x)
+ else
+ fun_l16_n53(x)
+ end
+end
+
+def fun_l15_n599(x)
+ if (x < 1)
+ fun_l16_n589(x)
+ else
+ fun_l16_n25(x)
+ end
+end
+
+def fun_l15_n600(x)
+ if (x < 1)
+ fun_l16_n841(x)
+ else
+ fun_l16_n623(x)
+ end
+end
+
+def fun_l15_n601(x)
+ if (x < 1)
+ fun_l16_n63(x)
+ else
+ fun_l16_n515(x)
+ end
+end
+
+def fun_l15_n602(x)
+ if (x < 1)
+ fun_l16_n708(x)
+ else
+ fun_l16_n318(x)
+ end
+end
+
+def fun_l15_n603(x)
+ if (x < 1)
+ fun_l16_n679(x)
+ else
+ fun_l16_n31(x)
+ end
+end
+
+def fun_l15_n604(x)
+ if (x < 1)
+ fun_l16_n617(x)
+ else
+ fun_l16_n20(x)
+ end
+end
+
+def fun_l15_n605(x)
+ if (x < 1)
+ fun_l16_n635(x)
+ else
+ fun_l16_n990(x)
+ end
+end
+
+def fun_l15_n606(x)
+ if (x < 1)
+ fun_l16_n174(x)
+ else
+ fun_l16_n977(x)
+ end
+end
+
+def fun_l15_n607(x)
+ if (x < 1)
+ fun_l16_n449(x)
+ else
+ fun_l16_n658(x)
+ end
+end
+
+def fun_l15_n608(x)
+ if (x < 1)
+ fun_l16_n208(x)
+ else
+ fun_l16_n875(x)
+ end
+end
+
+def fun_l15_n609(x)
+ if (x < 1)
+ fun_l16_n665(x)
+ else
+ fun_l16_n431(x)
+ end
+end
+
+def fun_l15_n610(x)
+ if (x < 1)
+ fun_l16_n6(x)
+ else
+ fun_l16_n78(x)
+ end
+end
+
+def fun_l15_n611(x)
+ if (x < 1)
+ fun_l16_n335(x)
+ else
+ fun_l16_n558(x)
+ end
+end
+
+def fun_l15_n612(x)
+ if (x < 1)
+ fun_l16_n259(x)
+ else
+ fun_l16_n893(x)
+ end
+end
+
+def fun_l15_n613(x)
+ if (x < 1)
+ fun_l16_n511(x)
+ else
+ fun_l16_n519(x)
+ end
+end
+
+def fun_l15_n614(x)
+ if (x < 1)
+ fun_l16_n96(x)
+ else
+ fun_l16_n28(x)
+ end
+end
+
+def fun_l15_n615(x)
+ if (x < 1)
+ fun_l16_n166(x)
+ else
+ fun_l16_n417(x)
+ end
+end
+
+def fun_l15_n616(x)
+ if (x < 1)
+ fun_l16_n666(x)
+ else
+ fun_l16_n932(x)
+ end
+end
+
+def fun_l15_n617(x)
+ if (x < 1)
+ fun_l16_n745(x)
+ else
+ fun_l16_n967(x)
+ end
+end
+
+def fun_l15_n618(x)
+ if (x < 1)
+ fun_l16_n5(x)
+ else
+ fun_l16_n769(x)
+ end
+end
+
+def fun_l15_n619(x)
+ if (x < 1)
+ fun_l16_n108(x)
+ else
+ fun_l16_n658(x)
+ end
+end
+
+def fun_l15_n620(x)
+ if (x < 1)
+ fun_l16_n454(x)
+ else
+ fun_l16_n666(x)
+ end
+end
+
+def fun_l15_n621(x)
+ if (x < 1)
+ fun_l16_n756(x)
+ else
+ fun_l16_n580(x)
+ end
+end
+
+def fun_l15_n622(x)
+ if (x < 1)
+ fun_l16_n419(x)
+ else
+ fun_l16_n450(x)
+ end
+end
+
+def fun_l15_n623(x)
+ if (x < 1)
+ fun_l16_n793(x)
+ else
+ fun_l16_n268(x)
+ end
+end
+
+def fun_l15_n624(x)
+ if (x < 1)
+ fun_l16_n78(x)
+ else
+ fun_l16_n311(x)
+ end
+end
+
+def fun_l15_n625(x)
+ if (x < 1)
+ fun_l16_n35(x)
+ else
+ fun_l16_n378(x)
+ end
+end
+
+def fun_l15_n626(x)
+ if (x < 1)
+ fun_l16_n974(x)
+ else
+ fun_l16_n483(x)
+ end
+end
+
+def fun_l15_n627(x)
+ if (x < 1)
+ fun_l16_n67(x)
+ else
+ fun_l16_n497(x)
+ end
+end
+
+def fun_l15_n628(x)
+ if (x < 1)
+ fun_l16_n640(x)
+ else
+ fun_l16_n32(x)
+ end
+end
+
+def fun_l15_n629(x)
+ if (x < 1)
+ fun_l16_n297(x)
+ else
+ fun_l16_n63(x)
+ end
+end
+
+def fun_l15_n630(x)
+ if (x < 1)
+ fun_l16_n546(x)
+ else
+ fun_l16_n931(x)
+ end
+end
+
+def fun_l15_n631(x)
+ if (x < 1)
+ fun_l16_n688(x)
+ else
+ fun_l16_n542(x)
+ end
+end
+
+def fun_l15_n632(x)
+ if (x < 1)
+ fun_l16_n313(x)
+ else
+ fun_l16_n1(x)
+ end
+end
+
+def fun_l15_n633(x)
+ if (x < 1)
+ fun_l16_n743(x)
+ else
+ fun_l16_n382(x)
+ end
+end
+
+def fun_l15_n634(x)
+ if (x < 1)
+ fun_l16_n224(x)
+ else
+ fun_l16_n311(x)
+ end
+end
+
+def fun_l15_n635(x)
+ if (x < 1)
+ fun_l16_n926(x)
+ else
+ fun_l16_n329(x)
+ end
+end
+
+def fun_l15_n636(x)
+ if (x < 1)
+ fun_l16_n735(x)
+ else
+ fun_l16_n759(x)
+ end
+end
+
+def fun_l15_n637(x)
+ if (x < 1)
+ fun_l16_n699(x)
+ else
+ fun_l16_n27(x)
+ end
+end
+
+def fun_l15_n638(x)
+ if (x < 1)
+ fun_l16_n710(x)
+ else
+ fun_l16_n194(x)
+ end
+end
+
+def fun_l15_n639(x)
+ if (x < 1)
+ fun_l16_n245(x)
+ else
+ fun_l16_n950(x)
+ end
+end
+
+def fun_l15_n640(x)
+ if (x < 1)
+ fun_l16_n488(x)
+ else
+ fun_l16_n357(x)
+ end
+end
+
+def fun_l15_n641(x)
+ if (x < 1)
+ fun_l16_n331(x)
+ else
+ fun_l16_n962(x)
+ end
+end
+
+def fun_l15_n642(x)
+ if (x < 1)
+ fun_l16_n144(x)
+ else
+ fun_l16_n877(x)
+ end
+end
+
+def fun_l15_n643(x)
+ if (x < 1)
+ fun_l16_n605(x)
+ else
+ fun_l16_n733(x)
+ end
+end
+
+def fun_l15_n644(x)
+ if (x < 1)
+ fun_l16_n22(x)
+ else
+ fun_l16_n176(x)
+ end
+end
+
+def fun_l15_n645(x)
+ if (x < 1)
+ fun_l16_n934(x)
+ else
+ fun_l16_n351(x)
+ end
+end
+
+def fun_l15_n646(x)
+ if (x < 1)
+ fun_l16_n224(x)
+ else
+ fun_l16_n308(x)
+ end
+end
+
+def fun_l15_n647(x)
+ if (x < 1)
+ fun_l16_n374(x)
+ else
+ fun_l16_n612(x)
+ end
+end
+
+def fun_l15_n648(x)
+ if (x < 1)
+ fun_l16_n105(x)
+ else
+ fun_l16_n563(x)
+ end
+end
+
+def fun_l15_n649(x)
+ if (x < 1)
+ fun_l16_n955(x)
+ else
+ fun_l16_n63(x)
+ end
+end
+
+def fun_l15_n650(x)
+ if (x < 1)
+ fun_l16_n734(x)
+ else
+ fun_l16_n194(x)
+ end
+end
+
+def fun_l15_n651(x)
+ if (x < 1)
+ fun_l16_n237(x)
+ else
+ fun_l16_n425(x)
+ end
+end
+
+def fun_l15_n652(x)
+ if (x < 1)
+ fun_l16_n135(x)
+ else
+ fun_l16_n217(x)
+ end
+end
+
+def fun_l15_n653(x)
+ if (x < 1)
+ fun_l16_n565(x)
+ else
+ fun_l16_n437(x)
+ end
+end
+
+def fun_l15_n654(x)
+ if (x < 1)
+ fun_l16_n471(x)
+ else
+ fun_l16_n426(x)
+ end
+end
+
+def fun_l15_n655(x)
+ if (x < 1)
+ fun_l16_n570(x)
+ else
+ fun_l16_n64(x)
+ end
+end
+
+def fun_l15_n656(x)
+ if (x < 1)
+ fun_l16_n456(x)
+ else
+ fun_l16_n479(x)
+ end
+end
+
+def fun_l15_n657(x)
+ if (x < 1)
+ fun_l16_n446(x)
+ else
+ fun_l16_n362(x)
+ end
+end
+
+def fun_l15_n658(x)
+ if (x < 1)
+ fun_l16_n294(x)
+ else
+ fun_l16_n485(x)
+ end
+end
+
+def fun_l15_n659(x)
+ if (x < 1)
+ fun_l16_n96(x)
+ else
+ fun_l16_n60(x)
+ end
+end
+
+def fun_l15_n660(x)
+ if (x < 1)
+ fun_l16_n436(x)
+ else
+ fun_l16_n12(x)
+ end
+end
+
+def fun_l15_n661(x)
+ if (x < 1)
+ fun_l16_n5(x)
+ else
+ fun_l16_n452(x)
+ end
+end
+
+def fun_l15_n662(x)
+ if (x < 1)
+ fun_l16_n70(x)
+ else
+ fun_l16_n564(x)
+ end
+end
+
+def fun_l15_n663(x)
+ if (x < 1)
+ fun_l16_n92(x)
+ else
+ fun_l16_n333(x)
+ end
+end
+
+def fun_l15_n664(x)
+ if (x < 1)
+ fun_l16_n884(x)
+ else
+ fun_l16_n381(x)
+ end
+end
+
+def fun_l15_n665(x)
+ if (x < 1)
+ fun_l16_n816(x)
+ else
+ fun_l16_n243(x)
+ end
+end
+
+def fun_l15_n666(x)
+ if (x < 1)
+ fun_l16_n680(x)
+ else
+ fun_l16_n306(x)
+ end
+end
+
+def fun_l15_n667(x)
+ if (x < 1)
+ fun_l16_n470(x)
+ else
+ fun_l16_n559(x)
+ end
+end
+
+def fun_l15_n668(x)
+ if (x < 1)
+ fun_l16_n34(x)
+ else
+ fun_l16_n261(x)
+ end
+end
+
+def fun_l15_n669(x)
+ if (x < 1)
+ fun_l16_n644(x)
+ else
+ fun_l16_n389(x)
+ end
+end
+
+def fun_l15_n670(x)
+ if (x < 1)
+ fun_l16_n313(x)
+ else
+ fun_l16_n575(x)
+ end
+end
+
+def fun_l15_n671(x)
+ if (x < 1)
+ fun_l16_n241(x)
+ else
+ fun_l16_n304(x)
+ end
+end
+
+def fun_l15_n672(x)
+ if (x < 1)
+ fun_l16_n280(x)
+ else
+ fun_l16_n996(x)
+ end
+end
+
+def fun_l15_n673(x)
+ if (x < 1)
+ fun_l16_n723(x)
+ else
+ fun_l16_n42(x)
+ end
+end
+
+def fun_l15_n674(x)
+ if (x < 1)
+ fun_l16_n503(x)
+ else
+ fun_l16_n837(x)
+ end
+end
+
+def fun_l15_n675(x)
+ if (x < 1)
+ fun_l16_n105(x)
+ else
+ fun_l16_n815(x)
+ end
+end
+
+def fun_l15_n676(x)
+ if (x < 1)
+ fun_l16_n441(x)
+ else
+ fun_l16_n313(x)
+ end
+end
+
+def fun_l15_n677(x)
+ if (x < 1)
+ fun_l16_n277(x)
+ else
+ fun_l16_n653(x)
+ end
+end
+
+def fun_l15_n678(x)
+ if (x < 1)
+ fun_l16_n105(x)
+ else
+ fun_l16_n907(x)
+ end
+end
+
+def fun_l15_n679(x)
+ if (x < 1)
+ fun_l16_n549(x)
+ else
+ fun_l16_n956(x)
+ end
+end
+
+def fun_l15_n680(x)
+ if (x < 1)
+ fun_l16_n177(x)
+ else
+ fun_l16_n238(x)
+ end
+end
+
+def fun_l15_n681(x)
+ if (x < 1)
+ fun_l16_n931(x)
+ else
+ fun_l16_n278(x)
+ end
+end
+
+def fun_l15_n682(x)
+ if (x < 1)
+ fun_l16_n923(x)
+ else
+ fun_l16_n924(x)
+ end
+end
+
+def fun_l15_n683(x)
+ if (x < 1)
+ fun_l16_n926(x)
+ else
+ fun_l16_n76(x)
+ end
+end
+
+def fun_l15_n684(x)
+ if (x < 1)
+ fun_l16_n828(x)
+ else
+ fun_l16_n961(x)
+ end
+end
+
+def fun_l15_n685(x)
+ if (x < 1)
+ fun_l16_n298(x)
+ else
+ fun_l16_n95(x)
+ end
+end
+
+def fun_l15_n686(x)
+ if (x < 1)
+ fun_l16_n929(x)
+ else
+ fun_l16_n239(x)
+ end
+end
+
+def fun_l15_n687(x)
+ if (x < 1)
+ fun_l16_n488(x)
+ else
+ fun_l16_n543(x)
+ end
+end
+
+def fun_l15_n688(x)
+ if (x < 1)
+ fun_l16_n562(x)
+ else
+ fun_l16_n879(x)
+ end
+end
+
+def fun_l15_n689(x)
+ if (x < 1)
+ fun_l16_n348(x)
+ else
+ fun_l16_n458(x)
+ end
+end
+
+def fun_l15_n690(x)
+ if (x < 1)
+ fun_l16_n431(x)
+ else
+ fun_l16_n653(x)
+ end
+end
+
+def fun_l15_n691(x)
+ if (x < 1)
+ fun_l16_n173(x)
+ else
+ fun_l16_n600(x)
+ end
+end
+
+def fun_l15_n692(x)
+ if (x < 1)
+ fun_l16_n820(x)
+ else
+ fun_l16_n793(x)
+ end
+end
+
+def fun_l15_n693(x)
+ if (x < 1)
+ fun_l16_n611(x)
+ else
+ fun_l16_n308(x)
+ end
+end
+
+def fun_l15_n694(x)
+ if (x < 1)
+ fun_l16_n325(x)
+ else
+ fun_l16_n791(x)
+ end
+end
+
+def fun_l15_n695(x)
+ if (x < 1)
+ fun_l16_n890(x)
+ else
+ fun_l16_n98(x)
+ end
+end
+
+def fun_l15_n696(x)
+ if (x < 1)
+ fun_l16_n803(x)
+ else
+ fun_l16_n890(x)
+ end
+end
+
+def fun_l15_n697(x)
+ if (x < 1)
+ fun_l16_n182(x)
+ else
+ fun_l16_n229(x)
+ end
+end
+
+def fun_l15_n698(x)
+ if (x < 1)
+ fun_l16_n238(x)
+ else
+ fun_l16_n395(x)
+ end
+end
+
+def fun_l15_n699(x)
+ if (x < 1)
+ fun_l16_n349(x)
+ else
+ fun_l16_n903(x)
+ end
+end
+
+def fun_l15_n700(x)
+ if (x < 1)
+ fun_l16_n328(x)
+ else
+ fun_l16_n664(x)
+ end
+end
+
+def fun_l15_n701(x)
+ if (x < 1)
+ fun_l16_n924(x)
+ else
+ fun_l16_n415(x)
+ end
+end
+
+def fun_l15_n702(x)
+ if (x < 1)
+ fun_l16_n504(x)
+ else
+ fun_l16_n180(x)
+ end
+end
+
+def fun_l15_n703(x)
+ if (x < 1)
+ fun_l16_n754(x)
+ else
+ fun_l16_n580(x)
+ end
+end
+
+def fun_l15_n704(x)
+ if (x < 1)
+ fun_l16_n686(x)
+ else
+ fun_l16_n75(x)
+ end
+end
+
+def fun_l15_n705(x)
+ if (x < 1)
+ fun_l16_n295(x)
+ else
+ fun_l16_n789(x)
+ end
+end
+
+def fun_l15_n706(x)
+ if (x < 1)
+ fun_l16_n796(x)
+ else
+ fun_l16_n628(x)
+ end
+end
+
+def fun_l15_n707(x)
+ if (x < 1)
+ fun_l16_n603(x)
+ else
+ fun_l16_n864(x)
+ end
+end
+
+def fun_l15_n708(x)
+ if (x < 1)
+ fun_l16_n420(x)
+ else
+ fun_l16_n506(x)
+ end
+end
+
+def fun_l15_n709(x)
+ if (x < 1)
+ fun_l16_n417(x)
+ else
+ fun_l16_n677(x)
+ end
+end
+
+def fun_l15_n710(x)
+ if (x < 1)
+ fun_l16_n484(x)
+ else
+ fun_l16_n210(x)
+ end
+end
+
+def fun_l15_n711(x)
+ if (x < 1)
+ fun_l16_n127(x)
+ else
+ fun_l16_n423(x)
+ end
+end
+
+def fun_l15_n712(x)
+ if (x < 1)
+ fun_l16_n395(x)
+ else
+ fun_l16_n75(x)
+ end
+end
+
+def fun_l15_n713(x)
+ if (x < 1)
+ fun_l16_n388(x)
+ else
+ fun_l16_n261(x)
+ end
+end
+
+def fun_l15_n714(x)
+ if (x < 1)
+ fun_l16_n508(x)
+ else
+ fun_l16_n160(x)
+ end
+end
+
+def fun_l15_n715(x)
+ if (x < 1)
+ fun_l16_n468(x)
+ else
+ fun_l16_n784(x)
+ end
+end
+
+def fun_l15_n716(x)
+ if (x < 1)
+ fun_l16_n156(x)
+ else
+ fun_l16_n769(x)
+ end
+end
+
+def fun_l15_n717(x)
+ if (x < 1)
+ fun_l16_n219(x)
+ else
+ fun_l16_n618(x)
+ end
+end
+
+def fun_l15_n718(x)
+ if (x < 1)
+ fun_l16_n921(x)
+ else
+ fun_l16_n83(x)
+ end
+end
+
+def fun_l15_n719(x)
+ if (x < 1)
+ fun_l16_n262(x)
+ else
+ fun_l16_n170(x)
+ end
+end
+
+def fun_l15_n720(x)
+ if (x < 1)
+ fun_l16_n420(x)
+ else
+ fun_l16_n504(x)
+ end
+end
+
+def fun_l15_n721(x)
+ if (x < 1)
+ fun_l16_n485(x)
+ else
+ fun_l16_n782(x)
+ end
+end
+
+def fun_l15_n722(x)
+ if (x < 1)
+ fun_l16_n607(x)
+ else
+ fun_l16_n706(x)
+ end
+end
+
+def fun_l15_n723(x)
+ if (x < 1)
+ fun_l16_n116(x)
+ else
+ fun_l16_n73(x)
+ end
+end
+
+def fun_l15_n724(x)
+ if (x < 1)
+ fun_l16_n946(x)
+ else
+ fun_l16_n694(x)
+ end
+end
+
+def fun_l15_n725(x)
+ if (x < 1)
+ fun_l16_n73(x)
+ else
+ fun_l16_n223(x)
+ end
+end
+
+def fun_l15_n726(x)
+ if (x < 1)
+ fun_l16_n54(x)
+ else
+ fun_l16_n681(x)
+ end
+end
+
+def fun_l15_n727(x)
+ if (x < 1)
+ fun_l16_n474(x)
+ else
+ fun_l16_n339(x)
+ end
+end
+
+def fun_l15_n728(x)
+ if (x < 1)
+ fun_l16_n780(x)
+ else
+ fun_l16_n364(x)
+ end
+end
+
+def fun_l15_n729(x)
+ if (x < 1)
+ fun_l16_n537(x)
+ else
+ fun_l16_n1(x)
+ end
+end
+
+def fun_l15_n730(x)
+ if (x < 1)
+ fun_l16_n81(x)
+ else
+ fun_l16_n591(x)
+ end
+end
+
+def fun_l15_n731(x)
+ if (x < 1)
+ fun_l16_n631(x)
+ else
+ fun_l16_n626(x)
+ end
+end
+
+def fun_l15_n732(x)
+ if (x < 1)
+ fun_l16_n904(x)
+ else
+ fun_l16_n988(x)
+ end
+end
+
+def fun_l15_n733(x)
+ if (x < 1)
+ fun_l16_n933(x)
+ else
+ fun_l16_n761(x)
+ end
+end
+
+def fun_l15_n734(x)
+ if (x < 1)
+ fun_l16_n687(x)
+ else
+ fun_l16_n611(x)
+ end
+end
+
+def fun_l15_n735(x)
+ if (x < 1)
+ fun_l16_n197(x)
+ else
+ fun_l16_n210(x)
+ end
+end
+
+def fun_l15_n736(x)
+ if (x < 1)
+ fun_l16_n227(x)
+ else
+ fun_l16_n82(x)
+ end
+end
+
+def fun_l15_n737(x)
+ if (x < 1)
+ fun_l16_n981(x)
+ else
+ fun_l16_n18(x)
+ end
+end
+
+def fun_l15_n738(x)
+ if (x < 1)
+ fun_l16_n673(x)
+ else
+ fun_l16_n452(x)
+ end
+end
+
+def fun_l15_n739(x)
+ if (x < 1)
+ fun_l16_n225(x)
+ else
+ fun_l16_n555(x)
+ end
+end
+
+def fun_l15_n740(x)
+ if (x < 1)
+ fun_l16_n409(x)
+ else
+ fun_l16_n29(x)
+ end
+end
+
+def fun_l15_n741(x)
+ if (x < 1)
+ fun_l16_n550(x)
+ else
+ fun_l16_n880(x)
+ end
+end
+
+def fun_l15_n742(x)
+ if (x < 1)
+ fun_l16_n930(x)
+ else
+ fun_l16_n280(x)
+ end
+end
+
+def fun_l15_n743(x)
+ if (x < 1)
+ fun_l16_n622(x)
+ else
+ fun_l16_n438(x)
+ end
+end
+
+def fun_l15_n744(x)
+ if (x < 1)
+ fun_l16_n874(x)
+ else
+ fun_l16_n921(x)
+ end
+end
+
+def fun_l15_n745(x)
+ if (x < 1)
+ fun_l16_n337(x)
+ else
+ fun_l16_n879(x)
+ end
+end
+
+def fun_l15_n746(x)
+ if (x < 1)
+ fun_l16_n668(x)
+ else
+ fun_l16_n858(x)
+ end
+end
+
+def fun_l15_n747(x)
+ if (x < 1)
+ fun_l16_n588(x)
+ else
+ fun_l16_n433(x)
+ end
+end
+
+def fun_l15_n748(x)
+ if (x < 1)
+ fun_l16_n263(x)
+ else
+ fun_l16_n389(x)
+ end
+end
+
+def fun_l15_n749(x)
+ if (x < 1)
+ fun_l16_n79(x)
+ else
+ fun_l16_n218(x)
+ end
+end
+
+def fun_l15_n750(x)
+ if (x < 1)
+ fun_l16_n586(x)
+ else
+ fun_l16_n426(x)
+ end
+end
+
+def fun_l15_n751(x)
+ if (x < 1)
+ fun_l16_n29(x)
+ else
+ fun_l16_n183(x)
+ end
+end
+
+def fun_l15_n752(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n994(x)
+ end
+end
+
+def fun_l15_n753(x)
+ if (x < 1)
+ fun_l16_n176(x)
+ else
+ fun_l16_n425(x)
+ end
+end
+
+def fun_l15_n754(x)
+ if (x < 1)
+ fun_l16_n58(x)
+ else
+ fun_l16_n980(x)
+ end
+end
+
+def fun_l15_n755(x)
+ if (x < 1)
+ fun_l16_n333(x)
+ else
+ fun_l16_n949(x)
+ end
+end
+
+def fun_l15_n756(x)
+ if (x < 1)
+ fun_l16_n846(x)
+ else
+ fun_l16_n449(x)
+ end
+end
+
+def fun_l15_n757(x)
+ if (x < 1)
+ fun_l16_n341(x)
+ else
+ fun_l16_n200(x)
+ end
+end
+
+def fun_l15_n758(x)
+ if (x < 1)
+ fun_l16_n32(x)
+ else
+ fun_l16_n271(x)
+ end
+end
+
+def fun_l15_n759(x)
+ if (x < 1)
+ fun_l16_n654(x)
+ else
+ fun_l16_n978(x)
+ end
+end
+
+def fun_l15_n760(x)
+ if (x < 1)
+ fun_l16_n438(x)
+ else
+ fun_l16_n426(x)
+ end
+end
+
+def fun_l15_n761(x)
+ if (x < 1)
+ fun_l16_n218(x)
+ else
+ fun_l16_n393(x)
+ end
+end
+
+def fun_l15_n762(x)
+ if (x < 1)
+ fun_l16_n873(x)
+ else
+ fun_l16_n231(x)
+ end
+end
+
+def fun_l15_n763(x)
+ if (x < 1)
+ fun_l16_n957(x)
+ else
+ fun_l16_n801(x)
+ end
+end
+
+def fun_l15_n764(x)
+ if (x < 1)
+ fun_l16_n571(x)
+ else
+ fun_l16_n369(x)
+ end
+end
+
+def fun_l15_n765(x)
+ if (x < 1)
+ fun_l16_n806(x)
+ else
+ fun_l16_n527(x)
+ end
+end
+
+def fun_l15_n766(x)
+ if (x < 1)
+ fun_l16_n511(x)
+ else
+ fun_l16_n911(x)
+ end
+end
+
+def fun_l15_n767(x)
+ if (x < 1)
+ fun_l16_n589(x)
+ else
+ fun_l16_n468(x)
+ end
+end
+
+def fun_l15_n768(x)
+ if (x < 1)
+ fun_l16_n846(x)
+ else
+ fun_l16_n325(x)
+ end
+end
+
+def fun_l15_n769(x)
+ if (x < 1)
+ fun_l16_n350(x)
+ else
+ fun_l16_n268(x)
+ end
+end
+
+def fun_l15_n770(x)
+ if (x < 1)
+ fun_l16_n200(x)
+ else
+ fun_l16_n151(x)
+ end
+end
+
+def fun_l15_n771(x)
+ if (x < 1)
+ fun_l16_n246(x)
+ else
+ fun_l16_n442(x)
+ end
+end
+
+def fun_l15_n772(x)
+ if (x < 1)
+ fun_l16_n768(x)
+ else
+ fun_l16_n303(x)
+ end
+end
+
+def fun_l15_n773(x)
+ if (x < 1)
+ fun_l16_n414(x)
+ else
+ fun_l16_n857(x)
+ end
+end
+
+def fun_l15_n774(x)
+ if (x < 1)
+ fun_l16_n654(x)
+ else
+ fun_l16_n151(x)
+ end
+end
+
+def fun_l15_n775(x)
+ if (x < 1)
+ fun_l16_n283(x)
+ else
+ fun_l16_n565(x)
+ end
+end
+
+def fun_l15_n776(x)
+ if (x < 1)
+ fun_l16_n375(x)
+ else
+ fun_l16_n897(x)
+ end
+end
+
+def fun_l15_n777(x)
+ if (x < 1)
+ fun_l16_n711(x)
+ else
+ fun_l16_n487(x)
+ end
+end
+
+def fun_l15_n778(x)
+ if (x < 1)
+ fun_l16_n445(x)
+ else
+ fun_l16_n99(x)
+ end
+end
+
+def fun_l15_n779(x)
+ if (x < 1)
+ fun_l16_n320(x)
+ else
+ fun_l16_n614(x)
+ end
+end
+
+def fun_l15_n780(x)
+ if (x < 1)
+ fun_l16_n330(x)
+ else
+ fun_l16_n478(x)
+ end
+end
+
+def fun_l15_n781(x)
+ if (x < 1)
+ fun_l16_n680(x)
+ else
+ fun_l16_n882(x)
+ end
+end
+
+def fun_l15_n782(x)
+ if (x < 1)
+ fun_l16_n799(x)
+ else
+ fun_l16_n511(x)
+ end
+end
+
+def fun_l15_n783(x)
+ if (x < 1)
+ fun_l16_n630(x)
+ else
+ fun_l16_n946(x)
+ end
+end
+
+def fun_l15_n784(x)
+ if (x < 1)
+ fun_l16_n867(x)
+ else
+ fun_l16_n4(x)
+ end
+end
+
+def fun_l15_n785(x)
+ if (x < 1)
+ fun_l16_n154(x)
+ else
+ fun_l16_n400(x)
+ end
+end
+
+def fun_l15_n786(x)
+ if (x < 1)
+ fun_l16_n166(x)
+ else
+ fun_l16_n224(x)
+ end
+end
+
+def fun_l15_n787(x)
+ if (x < 1)
+ fun_l16_n120(x)
+ else
+ fun_l16_n518(x)
+ end
+end
+
+def fun_l15_n788(x)
+ if (x < 1)
+ fun_l16_n648(x)
+ else
+ fun_l16_n56(x)
+ end
+end
+
+def fun_l15_n789(x)
+ if (x < 1)
+ fun_l16_n965(x)
+ else
+ fun_l16_n760(x)
+ end
+end
+
+def fun_l15_n790(x)
+ if (x < 1)
+ fun_l16_n880(x)
+ else
+ fun_l16_n809(x)
+ end
+end
+
+def fun_l15_n791(x)
+ if (x < 1)
+ fun_l16_n836(x)
+ else
+ fun_l16_n61(x)
+ end
+end
+
+def fun_l15_n792(x)
+ if (x < 1)
+ fun_l16_n874(x)
+ else
+ fun_l16_n559(x)
+ end
+end
+
+def fun_l15_n793(x)
+ if (x < 1)
+ fun_l16_n896(x)
+ else
+ fun_l16_n72(x)
+ end
+end
+
+def fun_l15_n794(x)
+ if (x < 1)
+ fun_l16_n994(x)
+ else
+ fun_l16_n411(x)
+ end
+end
+
+def fun_l15_n795(x)
+ if (x < 1)
+ fun_l16_n289(x)
+ else
+ fun_l16_n151(x)
+ end
+end
+
+def fun_l15_n796(x)
+ if (x < 1)
+ fun_l16_n190(x)
+ else
+ fun_l16_n693(x)
+ end
+end
+
+def fun_l15_n797(x)
+ if (x < 1)
+ fun_l16_n320(x)
+ else
+ fun_l16_n955(x)
+ end
+end
+
+def fun_l15_n798(x)
+ if (x < 1)
+ fun_l16_n572(x)
+ else
+ fun_l16_n626(x)
+ end
+end
+
+def fun_l15_n799(x)
+ if (x < 1)
+ fun_l16_n35(x)
+ else
+ fun_l16_n838(x)
+ end
+end
+
+def fun_l15_n800(x)
+ if (x < 1)
+ fun_l16_n423(x)
+ else
+ fun_l16_n834(x)
+ end
+end
+
+def fun_l15_n801(x)
+ if (x < 1)
+ fun_l16_n964(x)
+ else
+ fun_l16_n824(x)
+ end
+end
+
+def fun_l15_n802(x)
+ if (x < 1)
+ fun_l16_n77(x)
+ else
+ fun_l16_n62(x)
+ end
+end
+
+def fun_l15_n803(x)
+ if (x < 1)
+ fun_l16_n226(x)
+ else
+ fun_l16_n373(x)
+ end
+end
+
+def fun_l15_n804(x)
+ if (x < 1)
+ fun_l16_n832(x)
+ else
+ fun_l16_n915(x)
+ end
+end
+
+def fun_l15_n805(x)
+ if (x < 1)
+ fun_l16_n421(x)
+ else
+ fun_l16_n621(x)
+ end
+end
+
+def fun_l15_n806(x)
+ if (x < 1)
+ fun_l16_n303(x)
+ else
+ fun_l16_n713(x)
+ end
+end
+
+def fun_l15_n807(x)
+ if (x < 1)
+ fun_l16_n393(x)
+ else
+ fun_l16_n698(x)
+ end
+end
+
+def fun_l15_n808(x)
+ if (x < 1)
+ fun_l16_n303(x)
+ else
+ fun_l16_n341(x)
+ end
+end
+
+def fun_l15_n809(x)
+ if (x < 1)
+ fun_l16_n116(x)
+ else
+ fun_l16_n976(x)
+ end
+end
+
+def fun_l15_n810(x)
+ if (x < 1)
+ fun_l16_n873(x)
+ else
+ fun_l16_n822(x)
+ end
+end
+
+def fun_l15_n811(x)
+ if (x < 1)
+ fun_l16_n358(x)
+ else
+ fun_l16_n334(x)
+ end
+end
+
+def fun_l15_n812(x)
+ if (x < 1)
+ fun_l16_n599(x)
+ else
+ fun_l16_n527(x)
+ end
+end
+
+def fun_l15_n813(x)
+ if (x < 1)
+ fun_l16_n842(x)
+ else
+ fun_l16_n791(x)
+ end
+end
+
+def fun_l15_n814(x)
+ if (x < 1)
+ fun_l16_n45(x)
+ else
+ fun_l16_n280(x)
+ end
+end
+
+def fun_l15_n815(x)
+ if (x < 1)
+ fun_l16_n187(x)
+ else
+ fun_l16_n151(x)
+ end
+end
+
+def fun_l15_n816(x)
+ if (x < 1)
+ fun_l16_n8(x)
+ else
+ fun_l16_n409(x)
+ end
+end
+
+def fun_l15_n817(x)
+ if (x < 1)
+ fun_l16_n670(x)
+ else
+ fun_l16_n569(x)
+ end
+end
+
+def fun_l15_n818(x)
+ if (x < 1)
+ fun_l16_n344(x)
+ else
+ fun_l16_n618(x)
+ end
+end
+
+def fun_l15_n819(x)
+ if (x < 1)
+ fun_l16_n659(x)
+ else
+ fun_l16_n321(x)
+ end
+end
+
+def fun_l15_n820(x)
+ if (x < 1)
+ fun_l16_n890(x)
+ else
+ fun_l16_n911(x)
+ end
+end
+
+def fun_l15_n821(x)
+ if (x < 1)
+ fun_l16_n360(x)
+ else
+ fun_l16_n742(x)
+ end
+end
+
+def fun_l15_n822(x)
+ if (x < 1)
+ fun_l16_n166(x)
+ else
+ fun_l16_n803(x)
+ end
+end
+
+def fun_l15_n823(x)
+ if (x < 1)
+ fun_l16_n765(x)
+ else
+ fun_l16_n958(x)
+ end
+end
+
+def fun_l15_n824(x)
+ if (x < 1)
+ fun_l16_n439(x)
+ else
+ fun_l16_n931(x)
+ end
+end
+
+def fun_l15_n825(x)
+ if (x < 1)
+ fun_l16_n740(x)
+ else
+ fun_l16_n901(x)
+ end
+end
+
+def fun_l15_n826(x)
+ if (x < 1)
+ fun_l16_n223(x)
+ else
+ fun_l16_n878(x)
+ end
+end
+
+def fun_l15_n827(x)
+ if (x < 1)
+ fun_l16_n969(x)
+ else
+ fun_l16_n553(x)
+ end
+end
+
+def fun_l15_n828(x)
+ if (x < 1)
+ fun_l16_n42(x)
+ else
+ fun_l16_n915(x)
+ end
+end
+
+def fun_l15_n829(x)
+ if (x < 1)
+ fun_l16_n386(x)
+ else
+ fun_l16_n430(x)
+ end
+end
+
+def fun_l15_n830(x)
+ if (x < 1)
+ fun_l16_n164(x)
+ else
+ fun_l16_n337(x)
+ end
+end
+
+def fun_l15_n831(x)
+ if (x < 1)
+ fun_l16_n465(x)
+ else
+ fun_l16_n898(x)
+ end
+end
+
+def fun_l15_n832(x)
+ if (x < 1)
+ fun_l16_n145(x)
+ else
+ fun_l16_n688(x)
+ end
+end
+
+def fun_l15_n833(x)
+ if (x < 1)
+ fun_l16_n238(x)
+ else
+ fun_l16_n624(x)
+ end
+end
+
+def fun_l15_n834(x)
+ if (x < 1)
+ fun_l16_n973(x)
+ else
+ fun_l16_n507(x)
+ end
+end
+
+def fun_l15_n835(x)
+ if (x < 1)
+ fun_l16_n24(x)
+ else
+ fun_l16_n607(x)
+ end
+end
+
+def fun_l15_n836(x)
+ if (x < 1)
+ fun_l16_n307(x)
+ else
+ fun_l16_n265(x)
+ end
+end
+
+def fun_l15_n837(x)
+ if (x < 1)
+ fun_l16_n91(x)
+ else
+ fun_l16_n543(x)
+ end
+end
+
+def fun_l15_n838(x)
+ if (x < 1)
+ fun_l16_n544(x)
+ else
+ fun_l16_n397(x)
+ end
+end
+
+def fun_l15_n839(x)
+ if (x < 1)
+ fun_l16_n121(x)
+ else
+ fun_l16_n503(x)
+ end
+end
+
+def fun_l15_n840(x)
+ if (x < 1)
+ fun_l16_n806(x)
+ else
+ fun_l16_n831(x)
+ end
+end
+
+def fun_l15_n841(x)
+ if (x < 1)
+ fun_l16_n629(x)
+ else
+ fun_l16_n553(x)
+ end
+end
+
+def fun_l15_n842(x)
+ if (x < 1)
+ fun_l16_n674(x)
+ else
+ fun_l16_n945(x)
+ end
+end
+
+def fun_l15_n843(x)
+ if (x < 1)
+ fun_l16_n409(x)
+ else
+ fun_l16_n469(x)
+ end
+end
+
+def fun_l15_n844(x)
+ if (x < 1)
+ fun_l16_n779(x)
+ else
+ fun_l16_n168(x)
+ end
+end
+
+def fun_l15_n845(x)
+ if (x < 1)
+ fun_l16_n258(x)
+ else
+ fun_l16_n501(x)
+ end
+end
+
+def fun_l15_n846(x)
+ if (x < 1)
+ fun_l16_n408(x)
+ else
+ fun_l16_n211(x)
+ end
+end
+
+def fun_l15_n847(x)
+ if (x < 1)
+ fun_l16_n844(x)
+ else
+ fun_l16_n458(x)
+ end
+end
+
+def fun_l15_n848(x)
+ if (x < 1)
+ fun_l16_n565(x)
+ else
+ fun_l16_n177(x)
+ end
+end
+
+def fun_l15_n849(x)
+ if (x < 1)
+ fun_l16_n111(x)
+ else
+ fun_l16_n995(x)
+ end
+end
+
+def fun_l15_n850(x)
+ if (x < 1)
+ fun_l16_n883(x)
+ else
+ fun_l16_n776(x)
+ end
+end
+
+def fun_l15_n851(x)
+ if (x < 1)
+ fun_l16_n821(x)
+ else
+ fun_l16_n352(x)
+ end
+end
+
+def fun_l15_n852(x)
+ if (x < 1)
+ fun_l16_n977(x)
+ else
+ fun_l16_n520(x)
+ end
+end
+
+def fun_l15_n853(x)
+ if (x < 1)
+ fun_l16_n602(x)
+ else
+ fun_l16_n88(x)
+ end
+end
+
+def fun_l15_n854(x)
+ if (x < 1)
+ fun_l16_n819(x)
+ else
+ fun_l16_n177(x)
+ end
+end
+
+def fun_l15_n855(x)
+ if (x < 1)
+ fun_l16_n878(x)
+ else
+ fun_l16_n648(x)
+ end
+end
+
+def fun_l15_n856(x)
+ if (x < 1)
+ fun_l16_n69(x)
+ else
+ fun_l16_n134(x)
+ end
+end
+
+def fun_l15_n857(x)
+ if (x < 1)
+ fun_l16_n728(x)
+ else
+ fun_l16_n282(x)
+ end
+end
+
+def fun_l15_n858(x)
+ if (x < 1)
+ fun_l16_n152(x)
+ else
+ fun_l16_n725(x)
+ end
+end
+
+def fun_l15_n859(x)
+ if (x < 1)
+ fun_l16_n140(x)
+ else
+ fun_l16_n12(x)
+ end
+end
+
+def fun_l15_n860(x)
+ if (x < 1)
+ fun_l16_n691(x)
+ else
+ fun_l16_n159(x)
+ end
+end
+
+def fun_l15_n861(x)
+ if (x < 1)
+ fun_l16_n366(x)
+ else
+ fun_l16_n97(x)
+ end
+end
+
+def fun_l15_n862(x)
+ if (x < 1)
+ fun_l16_n812(x)
+ else
+ fun_l16_n178(x)
+ end
+end
+
+def fun_l15_n863(x)
+ if (x < 1)
+ fun_l16_n491(x)
+ else
+ fun_l16_n167(x)
+ end
+end
+
+def fun_l15_n864(x)
+ if (x < 1)
+ fun_l16_n280(x)
+ else
+ fun_l16_n463(x)
+ end
+end
+
+def fun_l15_n865(x)
+ if (x < 1)
+ fun_l16_n405(x)
+ else
+ fun_l16_n108(x)
+ end
+end
+
+def fun_l15_n866(x)
+ if (x < 1)
+ fun_l16_n956(x)
+ else
+ fun_l16_n840(x)
+ end
+end
+
+def fun_l15_n867(x)
+ if (x < 1)
+ fun_l16_n866(x)
+ else
+ fun_l16_n291(x)
+ end
+end
+
+def fun_l15_n868(x)
+ if (x < 1)
+ fun_l16_n176(x)
+ else
+ fun_l16_n192(x)
+ end
+end
+
+def fun_l15_n869(x)
+ if (x < 1)
+ fun_l16_n833(x)
+ else
+ fun_l16_n503(x)
+ end
+end
+
+def fun_l15_n870(x)
+ if (x < 1)
+ fun_l16_n648(x)
+ else
+ fun_l16_n778(x)
+ end
+end
+
+def fun_l15_n871(x)
+ if (x < 1)
+ fun_l16_n237(x)
+ else
+ fun_l16_n206(x)
+ end
+end
+
+def fun_l15_n872(x)
+ if (x < 1)
+ fun_l16_n676(x)
+ else
+ fun_l16_n868(x)
+ end
+end
+
+def fun_l15_n873(x)
+ if (x < 1)
+ fun_l16_n547(x)
+ else
+ fun_l16_n731(x)
+ end
+end
+
+def fun_l15_n874(x)
+ if (x < 1)
+ fun_l16_n870(x)
+ else
+ fun_l16_n43(x)
+ end
+end
+
+def fun_l15_n875(x)
+ if (x < 1)
+ fun_l16_n246(x)
+ else
+ fun_l16_n654(x)
+ end
+end
+
+def fun_l15_n876(x)
+ if (x < 1)
+ fun_l16_n570(x)
+ else
+ fun_l16_n842(x)
+ end
+end
+
+def fun_l15_n877(x)
+ if (x < 1)
+ fun_l16_n272(x)
+ else
+ fun_l16_n784(x)
+ end
+end
+
+def fun_l15_n878(x)
+ if (x < 1)
+ fun_l16_n702(x)
+ else
+ fun_l16_n758(x)
+ end
+end
+
+def fun_l15_n879(x)
+ if (x < 1)
+ fun_l16_n691(x)
+ else
+ fun_l16_n303(x)
+ end
+end
+
+def fun_l15_n880(x)
+ if (x < 1)
+ fun_l16_n944(x)
+ else
+ fun_l16_n449(x)
+ end
+end
+
+def fun_l15_n881(x)
+ if (x < 1)
+ fun_l16_n741(x)
+ else
+ fun_l16_n254(x)
+ end
+end
+
+def fun_l15_n882(x)
+ if (x < 1)
+ fun_l16_n195(x)
+ else
+ fun_l16_n294(x)
+ end
+end
+
+def fun_l15_n883(x)
+ if (x < 1)
+ fun_l16_n776(x)
+ else
+ fun_l16_n147(x)
+ end
+end
+
+def fun_l15_n884(x)
+ if (x < 1)
+ fun_l16_n145(x)
+ else
+ fun_l16_n856(x)
+ end
+end
+
+def fun_l15_n885(x)
+ if (x < 1)
+ fun_l16_n671(x)
+ else
+ fun_l16_n429(x)
+ end
+end
+
+def fun_l15_n886(x)
+ if (x < 1)
+ fun_l16_n72(x)
+ else
+ fun_l16_n455(x)
+ end
+end
+
+def fun_l15_n887(x)
+ if (x < 1)
+ fun_l16_n775(x)
+ else
+ fun_l16_n43(x)
+ end
+end
+
+def fun_l15_n888(x)
+ if (x < 1)
+ fun_l16_n936(x)
+ else
+ fun_l16_n642(x)
+ end
+end
+
+def fun_l15_n889(x)
+ if (x < 1)
+ fun_l16_n794(x)
+ else
+ fun_l16_n277(x)
+ end
+end
+
+def fun_l15_n890(x)
+ if (x < 1)
+ fun_l16_n72(x)
+ else
+ fun_l16_n450(x)
+ end
+end
+
+def fun_l15_n891(x)
+ if (x < 1)
+ fun_l16_n417(x)
+ else
+ fun_l16_n5(x)
+ end
+end
+
+def fun_l15_n892(x)
+ if (x < 1)
+ fun_l16_n69(x)
+ else
+ fun_l16_n355(x)
+ end
+end
+
+def fun_l15_n893(x)
+ if (x < 1)
+ fun_l16_n352(x)
+ else
+ fun_l16_n635(x)
+ end
+end
+
+def fun_l15_n894(x)
+ if (x < 1)
+ fun_l16_n168(x)
+ else
+ fun_l16_n16(x)
+ end
+end
+
+def fun_l15_n895(x)
+ if (x < 1)
+ fun_l16_n922(x)
+ else
+ fun_l16_n440(x)
+ end
+end
+
+def fun_l15_n896(x)
+ if (x < 1)
+ fun_l16_n808(x)
+ else
+ fun_l16_n896(x)
+ end
+end
+
+def fun_l15_n897(x)
+ if (x < 1)
+ fun_l16_n736(x)
+ else
+ fun_l16_n596(x)
+ end
+end
+
+def fun_l15_n898(x)
+ if (x < 1)
+ fun_l16_n886(x)
+ else
+ fun_l16_n386(x)
+ end
+end
+
+def fun_l15_n899(x)
+ if (x < 1)
+ fun_l16_n374(x)
+ else
+ fun_l16_n746(x)
+ end
+end
+
+def fun_l15_n900(x)
+ if (x < 1)
+ fun_l16_n623(x)
+ else
+ fun_l16_n329(x)
+ end
+end
+
+def fun_l15_n901(x)
+ if (x < 1)
+ fun_l16_n313(x)
+ else
+ fun_l16_n102(x)
+ end
+end
+
+def fun_l15_n902(x)
+ if (x < 1)
+ fun_l16_n234(x)
+ else
+ fun_l16_n425(x)
+ end
+end
+
+def fun_l15_n903(x)
+ if (x < 1)
+ fun_l16_n836(x)
+ else
+ fun_l16_n492(x)
+ end
+end
+
+def fun_l15_n904(x)
+ if (x < 1)
+ fun_l16_n690(x)
+ else
+ fun_l16_n241(x)
+ end
+end
+
+def fun_l15_n905(x)
+ if (x < 1)
+ fun_l16_n129(x)
+ else
+ fun_l16_n57(x)
+ end
+end
+
+def fun_l15_n906(x)
+ if (x < 1)
+ fun_l16_n50(x)
+ else
+ fun_l16_n24(x)
+ end
+end
+
+def fun_l15_n907(x)
+ if (x < 1)
+ fun_l16_n609(x)
+ else
+ fun_l16_n4(x)
+ end
+end
+
+def fun_l15_n908(x)
+ if (x < 1)
+ fun_l16_n483(x)
+ else
+ fun_l16_n708(x)
+ end
+end
+
+def fun_l15_n909(x)
+ if (x < 1)
+ fun_l16_n656(x)
+ else
+ fun_l16_n234(x)
+ end
+end
+
+def fun_l15_n910(x)
+ if (x < 1)
+ fun_l16_n945(x)
+ else
+ fun_l16_n753(x)
+ end
+end
+
+def fun_l15_n911(x)
+ if (x < 1)
+ fun_l16_n152(x)
+ else
+ fun_l16_n739(x)
+ end
+end
+
+def fun_l15_n912(x)
+ if (x < 1)
+ fun_l16_n855(x)
+ else
+ fun_l16_n518(x)
+ end
+end
+
+def fun_l15_n913(x)
+ if (x < 1)
+ fun_l16_n295(x)
+ else
+ fun_l16_n719(x)
+ end
+end
+
+def fun_l15_n914(x)
+ if (x < 1)
+ fun_l16_n442(x)
+ else
+ fun_l16_n803(x)
+ end
+end
+
+def fun_l15_n915(x)
+ if (x < 1)
+ fun_l16_n672(x)
+ else
+ fun_l16_n935(x)
+ end
+end
+
+def fun_l15_n916(x)
+ if (x < 1)
+ fun_l16_n908(x)
+ else
+ fun_l16_n900(x)
+ end
+end
+
+def fun_l15_n917(x)
+ if (x < 1)
+ fun_l16_n853(x)
+ else
+ fun_l16_n896(x)
+ end
+end
+
+def fun_l15_n918(x)
+ if (x < 1)
+ fun_l16_n90(x)
+ else
+ fun_l16_n56(x)
+ end
+end
+
+def fun_l15_n919(x)
+ if (x < 1)
+ fun_l16_n944(x)
+ else
+ fun_l16_n763(x)
+ end
+end
+
+def fun_l15_n920(x)
+ if (x < 1)
+ fun_l16_n303(x)
+ else
+ fun_l16_n328(x)
+ end
+end
+
+def fun_l15_n921(x)
+ if (x < 1)
+ fun_l16_n599(x)
+ else
+ fun_l16_n648(x)
+ end
+end
+
+def fun_l15_n922(x)
+ if (x < 1)
+ fun_l16_n113(x)
+ else
+ fun_l16_n665(x)
+ end
+end
+
+def fun_l15_n923(x)
+ if (x < 1)
+ fun_l16_n97(x)
+ else
+ fun_l16_n757(x)
+ end
+end
+
+def fun_l15_n924(x)
+ if (x < 1)
+ fun_l16_n815(x)
+ else
+ fun_l16_n821(x)
+ end
+end
+
+def fun_l15_n925(x)
+ if (x < 1)
+ fun_l16_n146(x)
+ else
+ fun_l16_n970(x)
+ end
+end
+
+def fun_l15_n926(x)
+ if (x < 1)
+ fun_l16_n74(x)
+ else
+ fun_l16_n203(x)
+ end
+end
+
+def fun_l15_n927(x)
+ if (x < 1)
+ fun_l16_n573(x)
+ else
+ fun_l16_n763(x)
+ end
+end
+
+def fun_l15_n928(x)
+ if (x < 1)
+ fun_l16_n656(x)
+ else
+ fun_l16_n691(x)
+ end
+end
+
+def fun_l15_n929(x)
+ if (x < 1)
+ fun_l16_n240(x)
+ else
+ fun_l16_n536(x)
+ end
+end
+
+def fun_l15_n930(x)
+ if (x < 1)
+ fun_l16_n168(x)
+ else
+ fun_l16_n145(x)
+ end
+end
+
+def fun_l15_n931(x)
+ if (x < 1)
+ fun_l16_n502(x)
+ else
+ fun_l16_n603(x)
+ end
+end
+
+def fun_l15_n932(x)
+ if (x < 1)
+ fun_l16_n998(x)
+ else
+ fun_l16_n259(x)
+ end
+end
+
+def fun_l15_n933(x)
+ if (x < 1)
+ fun_l16_n633(x)
+ else
+ fun_l16_n66(x)
+ end
+end
+
+def fun_l15_n934(x)
+ if (x < 1)
+ fun_l16_n657(x)
+ else
+ fun_l16_n727(x)
+ end
+end
+
+def fun_l15_n935(x)
+ if (x < 1)
+ fun_l16_n641(x)
+ else
+ fun_l16_n975(x)
+ end
+end
+
+def fun_l15_n936(x)
+ if (x < 1)
+ fun_l16_n610(x)
+ else
+ fun_l16_n256(x)
+ end
+end
+
+def fun_l15_n937(x)
+ if (x < 1)
+ fun_l16_n760(x)
+ else
+ fun_l16_n304(x)
+ end
+end
+
+def fun_l15_n938(x)
+ if (x < 1)
+ fun_l16_n395(x)
+ else
+ fun_l16_n302(x)
+ end
+end
+
+def fun_l15_n939(x)
+ if (x < 1)
+ fun_l16_n810(x)
+ else
+ fun_l16_n549(x)
+ end
+end
+
+def fun_l15_n940(x)
+ if (x < 1)
+ fun_l16_n452(x)
+ else
+ fun_l16_n914(x)
+ end
+end
+
+def fun_l15_n941(x)
+ if (x < 1)
+ fun_l16_n472(x)
+ else
+ fun_l16_n328(x)
+ end
+end
+
+def fun_l15_n942(x)
+ if (x < 1)
+ fun_l16_n886(x)
+ else
+ fun_l16_n535(x)
+ end
+end
+
+def fun_l15_n943(x)
+ if (x < 1)
+ fun_l16_n162(x)
+ else
+ fun_l16_n449(x)
+ end
+end
+
+def fun_l15_n944(x)
+ if (x < 1)
+ fun_l16_n152(x)
+ else
+ fun_l16_n790(x)
+ end
+end
+
+def fun_l15_n945(x)
+ if (x < 1)
+ fun_l16_n228(x)
+ else
+ fun_l16_n391(x)
+ end
+end
+
+def fun_l15_n946(x)
+ if (x < 1)
+ fun_l16_n115(x)
+ else
+ fun_l16_n371(x)
+ end
+end
+
+def fun_l15_n947(x)
+ if (x < 1)
+ fun_l16_n359(x)
+ else
+ fun_l16_n928(x)
+ end
+end
+
+def fun_l15_n948(x)
+ if (x < 1)
+ fun_l16_n246(x)
+ else
+ fun_l16_n907(x)
+ end
+end
+
+def fun_l15_n949(x)
+ if (x < 1)
+ fun_l16_n448(x)
+ else
+ fun_l16_n845(x)
+ end
+end
+
+def fun_l15_n950(x)
+ if (x < 1)
+ fun_l16_n457(x)
+ else
+ fun_l16_n954(x)
+ end
+end
+
+def fun_l15_n951(x)
+ if (x < 1)
+ fun_l16_n627(x)
+ else
+ fun_l16_n684(x)
+ end
+end
+
+def fun_l15_n952(x)
+ if (x < 1)
+ fun_l16_n887(x)
+ else
+ fun_l16_n928(x)
+ end
+end
+
+def fun_l15_n953(x)
+ if (x < 1)
+ fun_l16_n782(x)
+ else
+ fun_l16_n619(x)
+ end
+end
+
+def fun_l15_n954(x)
+ if (x < 1)
+ fun_l16_n436(x)
+ else
+ fun_l16_n745(x)
+ end
+end
+
+def fun_l15_n955(x)
+ if (x < 1)
+ fun_l16_n9(x)
+ else
+ fun_l16_n604(x)
+ end
+end
+
+def fun_l15_n956(x)
+ if (x < 1)
+ fun_l16_n149(x)
+ else
+ fun_l16_n357(x)
+ end
+end
+
+def fun_l15_n957(x)
+ if (x < 1)
+ fun_l16_n664(x)
+ else
+ fun_l16_n371(x)
+ end
+end
+
+def fun_l15_n958(x)
+ if (x < 1)
+ fun_l16_n236(x)
+ else
+ fun_l16_n402(x)
+ end
+end
+
+def fun_l15_n959(x)
+ if (x < 1)
+ fun_l16_n681(x)
+ else
+ fun_l16_n410(x)
+ end
+end
+
+def fun_l15_n960(x)
+ if (x < 1)
+ fun_l16_n909(x)
+ else
+ fun_l16_n958(x)
+ end
+end
+
+def fun_l15_n961(x)
+ if (x < 1)
+ fun_l16_n400(x)
+ else
+ fun_l16_n497(x)
+ end
+end
+
+def fun_l15_n962(x)
+ if (x < 1)
+ fun_l16_n949(x)
+ else
+ fun_l16_n794(x)
+ end
+end
+
+def fun_l15_n963(x)
+ if (x < 1)
+ fun_l16_n774(x)
+ else
+ fun_l16_n770(x)
+ end
+end
+
+def fun_l15_n964(x)
+ if (x < 1)
+ fun_l16_n573(x)
+ else
+ fun_l16_n73(x)
+ end
+end
+
+def fun_l15_n965(x)
+ if (x < 1)
+ fun_l16_n33(x)
+ else
+ fun_l16_n978(x)
+ end
+end
+
+def fun_l15_n966(x)
+ if (x < 1)
+ fun_l16_n8(x)
+ else
+ fun_l16_n542(x)
+ end
+end
+
+def fun_l15_n967(x)
+ if (x < 1)
+ fun_l16_n780(x)
+ else
+ fun_l16_n96(x)
+ end
+end
+
+def fun_l15_n968(x)
+ if (x < 1)
+ fun_l16_n75(x)
+ else
+ fun_l16_n560(x)
+ end
+end
+
+def fun_l15_n969(x)
+ if (x < 1)
+ fun_l16_n950(x)
+ else
+ fun_l16_n610(x)
+ end
+end
+
+def fun_l15_n970(x)
+ if (x < 1)
+ fun_l16_n254(x)
+ else
+ fun_l16_n2(x)
+ end
+end
+
+def fun_l15_n971(x)
+ if (x < 1)
+ fun_l16_n793(x)
+ else
+ fun_l16_n89(x)
+ end
+end
+
+def fun_l15_n972(x)
+ if (x < 1)
+ fun_l16_n409(x)
+ else
+ fun_l16_n967(x)
+ end
+end
+
+def fun_l15_n973(x)
+ if (x < 1)
+ fun_l16_n356(x)
+ else
+ fun_l16_n421(x)
+ end
+end
+
+def fun_l15_n974(x)
+ if (x < 1)
+ fun_l16_n539(x)
+ else
+ fun_l16_n997(x)
+ end
+end
+
+def fun_l15_n975(x)
+ if (x < 1)
+ fun_l16_n772(x)
+ else
+ fun_l16_n304(x)
+ end
+end
+
+def fun_l15_n976(x)
+ if (x < 1)
+ fun_l16_n228(x)
+ else
+ fun_l16_n420(x)
+ end
+end
+
+def fun_l15_n977(x)
+ if (x < 1)
+ fun_l16_n508(x)
+ else
+ fun_l16_n352(x)
+ end
+end
+
+def fun_l15_n978(x)
+ if (x < 1)
+ fun_l16_n878(x)
+ else
+ fun_l16_n316(x)
+ end
+end
+
+def fun_l15_n979(x)
+ if (x < 1)
+ fun_l16_n279(x)
+ else
+ fun_l16_n325(x)
+ end
+end
+
+def fun_l15_n980(x)
+ if (x < 1)
+ fun_l16_n98(x)
+ else
+ fun_l16_n10(x)
+ end
+end
+
+def fun_l15_n981(x)
+ if (x < 1)
+ fun_l16_n320(x)
+ else
+ fun_l16_n578(x)
+ end
+end
+
+def fun_l15_n982(x)
+ if (x < 1)
+ fun_l16_n112(x)
+ else
+ fun_l16_n353(x)
+ end
+end
+
+def fun_l15_n983(x)
+ if (x < 1)
+ fun_l16_n579(x)
+ else
+ fun_l16_n946(x)
+ end
+end
+
+def fun_l15_n984(x)
+ if (x < 1)
+ fun_l16_n183(x)
+ else
+ fun_l16_n638(x)
+ end
+end
+
+def fun_l15_n985(x)
+ if (x < 1)
+ fun_l16_n500(x)
+ else
+ fun_l16_n11(x)
+ end
+end
+
+def fun_l15_n986(x)
+ if (x < 1)
+ fun_l16_n773(x)
+ else
+ fun_l16_n135(x)
+ end
+end
+
+def fun_l15_n987(x)
+ if (x < 1)
+ fun_l16_n997(x)
+ else
+ fun_l16_n645(x)
+ end
+end
+
+def fun_l15_n988(x)
+ if (x < 1)
+ fun_l16_n392(x)
+ else
+ fun_l16_n172(x)
+ end
+end
+
+def fun_l15_n989(x)
+ if (x < 1)
+ fun_l16_n150(x)
+ else
+ fun_l16_n163(x)
+ end
+end
+
+def fun_l15_n990(x)
+ if (x < 1)
+ fun_l16_n351(x)
+ else
+ fun_l16_n297(x)
+ end
+end
+
+def fun_l15_n991(x)
+ if (x < 1)
+ fun_l16_n676(x)
+ else
+ fun_l16_n31(x)
+ end
+end
+
+def fun_l15_n992(x)
+ if (x < 1)
+ fun_l16_n257(x)
+ else
+ fun_l16_n45(x)
+ end
+end
+
+def fun_l15_n993(x)
+ if (x < 1)
+ fun_l16_n971(x)
+ else
+ fun_l16_n60(x)
+ end
+end
+
+def fun_l15_n994(x)
+ if (x < 1)
+ fun_l16_n472(x)
+ else
+ fun_l16_n774(x)
+ end
+end
+
+def fun_l15_n995(x)
+ if (x < 1)
+ fun_l16_n559(x)
+ else
+ fun_l16_n605(x)
+ end
+end
+
+def fun_l15_n996(x)
+ if (x < 1)
+ fun_l16_n122(x)
+ else
+ fun_l16_n695(x)
+ end
+end
+
+def fun_l15_n997(x)
+ if (x < 1)
+ fun_l16_n118(x)
+ else
+ fun_l16_n613(x)
+ end
+end
+
+def fun_l15_n998(x)
+ if (x < 1)
+ fun_l16_n973(x)
+ else
+ fun_l16_n193(x)
+ end
+end
+
+def fun_l15_n999(x)
+ if (x < 1)
+ fun_l16_n652(x)
+ else
+ fun_l16_n658(x)
+ end
+end
+
+def fun_l16_n0(x)
+ if (x < 1)
+ fun_l17_n352(x)
+ else
+ fun_l17_n155(x)
+ end
+end
+
+def fun_l16_n1(x)
+ if (x < 1)
+ fun_l17_n786(x)
+ else
+ fun_l17_n961(x)
+ end
+end
+
+def fun_l16_n2(x)
+ if (x < 1)
+ fun_l17_n760(x)
+ else
+ fun_l17_n629(x)
+ end
+end
+
+def fun_l16_n3(x)
+ if (x < 1)
+ fun_l17_n788(x)
+ else
+ fun_l17_n70(x)
+ end
+end
+
+def fun_l16_n4(x)
+ if (x < 1)
+ fun_l17_n116(x)
+ else
+ fun_l17_n616(x)
+ end
+end
+
+def fun_l16_n5(x)
+ if (x < 1)
+ fun_l17_n470(x)
+ else
+ fun_l17_n859(x)
+ end
+end
+
+def fun_l16_n6(x)
+ if (x < 1)
+ fun_l17_n830(x)
+ else
+ fun_l17_n987(x)
+ end
+end
+
+def fun_l16_n7(x)
+ if (x < 1)
+ fun_l17_n339(x)
+ else
+ fun_l17_n284(x)
+ end
+end
+
+def fun_l16_n8(x)
+ if (x < 1)
+ fun_l17_n677(x)
+ else
+ fun_l17_n77(x)
+ end
+end
+
+def fun_l16_n9(x)
+ if (x < 1)
+ fun_l17_n7(x)
+ else
+ fun_l17_n159(x)
+ end
+end
+
+def fun_l16_n10(x)
+ if (x < 1)
+ fun_l17_n275(x)
+ else
+ fun_l17_n37(x)
+ end
+end
+
+def fun_l16_n11(x)
+ if (x < 1)
+ fun_l17_n406(x)
+ else
+ fun_l17_n588(x)
+ end
+end
+
+def fun_l16_n12(x)
+ if (x < 1)
+ fun_l17_n132(x)
+ else
+ fun_l17_n208(x)
+ end
+end
+
+def fun_l16_n13(x)
+ if (x < 1)
+ fun_l17_n87(x)
+ else
+ fun_l17_n850(x)
+ end
+end
+
+def fun_l16_n14(x)
+ if (x < 1)
+ fun_l17_n965(x)
+ else
+ fun_l17_n106(x)
+ end
+end
+
+def fun_l16_n15(x)
+ if (x < 1)
+ fun_l17_n176(x)
+ else
+ fun_l17_n966(x)
+ end
+end
+
+def fun_l16_n16(x)
+ if (x < 1)
+ fun_l17_n825(x)
+ else
+ fun_l17_n815(x)
+ end
+end
+
+def fun_l16_n17(x)
+ if (x < 1)
+ fun_l17_n939(x)
+ else
+ fun_l17_n591(x)
+ end
+end
+
+def fun_l16_n18(x)
+ if (x < 1)
+ fun_l17_n166(x)
+ else
+ fun_l17_n732(x)
+ end
+end
+
+def fun_l16_n19(x)
+ if (x < 1)
+ fun_l17_n471(x)
+ else
+ fun_l17_n175(x)
+ end
+end
+
+def fun_l16_n20(x)
+ if (x < 1)
+ fun_l17_n887(x)
+ else
+ fun_l17_n304(x)
+ end
+end
+
+def fun_l16_n21(x)
+ if (x < 1)
+ fun_l17_n545(x)
+ else
+ fun_l17_n221(x)
+ end
+end
+
+def fun_l16_n22(x)
+ if (x < 1)
+ fun_l17_n879(x)
+ else
+ fun_l17_n143(x)
+ end
+end
+
+def fun_l16_n23(x)
+ if (x < 1)
+ fun_l17_n732(x)
+ else
+ fun_l17_n902(x)
+ end
+end
+
+def fun_l16_n24(x)
+ if (x < 1)
+ fun_l17_n490(x)
+ else
+ fun_l17_n327(x)
+ end
+end
+
+def fun_l16_n25(x)
+ if (x < 1)
+ fun_l17_n588(x)
+ else
+ fun_l17_n658(x)
+ end
+end
+
+def fun_l16_n26(x)
+ if (x < 1)
+ fun_l17_n555(x)
+ else
+ fun_l17_n507(x)
+ end
+end
+
+def fun_l16_n27(x)
+ if (x < 1)
+ fun_l17_n228(x)
+ else
+ fun_l17_n808(x)
+ end
+end
+
+def fun_l16_n28(x)
+ if (x < 1)
+ fun_l17_n705(x)
+ else
+ fun_l17_n696(x)
+ end
+end
+
+def fun_l16_n29(x)
+ if (x < 1)
+ fun_l17_n711(x)
+ else
+ fun_l17_n913(x)
+ end
+end
+
+def fun_l16_n30(x)
+ if (x < 1)
+ fun_l17_n264(x)
+ else
+ fun_l17_n287(x)
+ end
+end
+
+def fun_l16_n31(x)
+ if (x < 1)
+ fun_l17_n624(x)
+ else
+ fun_l17_n358(x)
+ end
+end
+
+def fun_l16_n32(x)
+ if (x < 1)
+ fun_l17_n102(x)
+ else
+ fun_l17_n303(x)
+ end
+end
+
+def fun_l16_n33(x)
+ if (x < 1)
+ fun_l17_n613(x)
+ else
+ fun_l17_n921(x)
+ end
+end
+
+def fun_l16_n34(x)
+ if (x < 1)
+ fun_l17_n637(x)
+ else
+ fun_l17_n142(x)
+ end
+end
+
+def fun_l16_n35(x)
+ if (x < 1)
+ fun_l17_n8(x)
+ else
+ fun_l17_n752(x)
+ end
+end
+
+def fun_l16_n36(x)
+ if (x < 1)
+ fun_l17_n748(x)
+ else
+ fun_l17_n956(x)
+ end
+end
+
+def fun_l16_n37(x)
+ if (x < 1)
+ fun_l17_n985(x)
+ else
+ fun_l17_n133(x)
+ end
+end
+
+def fun_l16_n38(x)
+ if (x < 1)
+ fun_l17_n422(x)
+ else
+ fun_l17_n608(x)
+ end
+end
+
+def fun_l16_n39(x)
+ if (x < 1)
+ fun_l17_n455(x)
+ else
+ fun_l17_n247(x)
+ end
+end
+
+def fun_l16_n40(x)
+ if (x < 1)
+ fun_l17_n363(x)
+ else
+ fun_l17_n874(x)
+ end
+end
+
+def fun_l16_n41(x)
+ if (x < 1)
+ fun_l17_n299(x)
+ else
+ fun_l17_n971(x)
+ end
+end
+
+def fun_l16_n42(x)
+ if (x < 1)
+ fun_l17_n788(x)
+ else
+ fun_l17_n535(x)
+ end
+end
+
+def fun_l16_n43(x)
+ if (x < 1)
+ fun_l17_n282(x)
+ else
+ fun_l17_n468(x)
+ end
+end
+
+def fun_l16_n44(x)
+ if (x < 1)
+ fun_l17_n493(x)
+ else
+ fun_l17_n931(x)
+ end
+end
+
+def fun_l16_n45(x)
+ if (x < 1)
+ fun_l17_n750(x)
+ else
+ fun_l17_n725(x)
+ end
+end
+
+def fun_l16_n46(x)
+ if (x < 1)
+ fun_l17_n227(x)
+ else
+ fun_l17_n769(x)
+ end
+end
+
+def fun_l16_n47(x)
+ if (x < 1)
+ fun_l17_n348(x)
+ else
+ fun_l17_n83(x)
+ end
+end
+
+def fun_l16_n48(x)
+ if (x < 1)
+ fun_l17_n624(x)
+ else
+ fun_l17_n398(x)
+ end
+end
+
+def fun_l16_n49(x)
+ if (x < 1)
+ fun_l17_n645(x)
+ else
+ fun_l17_n645(x)
+ end
+end
+
+def fun_l16_n50(x)
+ if (x < 1)
+ fun_l17_n191(x)
+ else
+ fun_l17_n256(x)
+ end
+end
+
+def fun_l16_n51(x)
+ if (x < 1)
+ fun_l17_n947(x)
+ else
+ fun_l17_n188(x)
+ end
+end
+
+def fun_l16_n52(x)
+ if (x < 1)
+ fun_l17_n135(x)
+ else
+ fun_l17_n923(x)
+ end
+end
+
+def fun_l16_n53(x)
+ if (x < 1)
+ fun_l17_n867(x)
+ else
+ fun_l17_n520(x)
+ end
+end
+
+def fun_l16_n54(x)
+ if (x < 1)
+ fun_l17_n450(x)
+ else
+ fun_l17_n864(x)
+ end
+end
+
+def fun_l16_n55(x)
+ if (x < 1)
+ fun_l17_n116(x)
+ else
+ fun_l17_n370(x)
+ end
+end
+
+def fun_l16_n56(x)
+ if (x < 1)
+ fun_l17_n754(x)
+ else
+ fun_l17_n919(x)
+ end
+end
+
+def fun_l16_n57(x)
+ if (x < 1)
+ fun_l17_n360(x)
+ else
+ fun_l17_n513(x)
+ end
+end
+
+def fun_l16_n58(x)
+ if (x < 1)
+ fun_l17_n436(x)
+ else
+ fun_l17_n618(x)
+ end
+end
+
+def fun_l16_n59(x)
+ if (x < 1)
+ fun_l17_n795(x)
+ else
+ fun_l17_n851(x)
+ end
+end
+
+def fun_l16_n60(x)
+ if (x < 1)
+ fun_l17_n624(x)
+ else
+ fun_l17_n305(x)
+ end
+end
+
+def fun_l16_n61(x)
+ if (x < 1)
+ fun_l17_n520(x)
+ else
+ fun_l17_n360(x)
+ end
+end
+
+def fun_l16_n62(x)
+ if (x < 1)
+ fun_l17_n297(x)
+ else
+ fun_l17_n218(x)
+ end
+end
+
+def fun_l16_n63(x)
+ if (x < 1)
+ fun_l17_n116(x)
+ else
+ fun_l17_n888(x)
+ end
+end
+
+def fun_l16_n64(x)
+ if (x < 1)
+ fun_l17_n800(x)
+ else
+ fun_l17_n985(x)
+ end
+end
+
+def fun_l16_n65(x)
+ if (x < 1)
+ fun_l17_n875(x)
+ else
+ fun_l17_n821(x)
+ end
+end
+
+def fun_l16_n66(x)
+ if (x < 1)
+ fun_l17_n677(x)
+ else
+ fun_l17_n705(x)
+ end
+end
+
+def fun_l16_n67(x)
+ if (x < 1)
+ fun_l17_n643(x)
+ else
+ fun_l17_n240(x)
+ end
+end
+
+def fun_l16_n68(x)
+ if (x < 1)
+ fun_l17_n290(x)
+ else
+ fun_l17_n885(x)
+ end
+end
+
+def fun_l16_n69(x)
+ if (x < 1)
+ fun_l17_n987(x)
+ else
+ fun_l17_n611(x)
+ end
+end
+
+def fun_l16_n70(x)
+ if (x < 1)
+ fun_l17_n546(x)
+ else
+ fun_l17_n95(x)
+ end
+end
+
+def fun_l16_n71(x)
+ if (x < 1)
+ fun_l17_n301(x)
+ else
+ fun_l17_n260(x)
+ end
+end
+
+def fun_l16_n72(x)
+ if (x < 1)
+ fun_l17_n118(x)
+ else
+ fun_l17_n110(x)
+ end
+end
+
+def fun_l16_n73(x)
+ if (x < 1)
+ fun_l17_n254(x)
+ else
+ fun_l17_n602(x)
+ end
+end
+
+def fun_l16_n74(x)
+ if (x < 1)
+ fun_l17_n725(x)
+ else
+ fun_l17_n606(x)
+ end
+end
+
+def fun_l16_n75(x)
+ if (x < 1)
+ fun_l17_n114(x)
+ else
+ fun_l17_n336(x)
+ end
+end
+
+def fun_l16_n76(x)
+ if (x < 1)
+ fun_l17_n930(x)
+ else
+ fun_l17_n513(x)
+ end
+end
+
+def fun_l16_n77(x)
+ if (x < 1)
+ fun_l17_n217(x)
+ else
+ fun_l17_n158(x)
+ end
+end
+
+def fun_l16_n78(x)
+ if (x < 1)
+ fun_l17_n987(x)
+ else
+ fun_l17_n538(x)
+ end
+end
+
+def fun_l16_n79(x)
+ if (x < 1)
+ fun_l17_n467(x)
+ else
+ fun_l17_n675(x)
+ end
+end
+
+def fun_l16_n80(x)
+ if (x < 1)
+ fun_l17_n553(x)
+ else
+ fun_l17_n77(x)
+ end
+end
+
+def fun_l16_n81(x)
+ if (x < 1)
+ fun_l17_n643(x)
+ else
+ fun_l17_n156(x)
+ end
+end
+
+def fun_l16_n82(x)
+ if (x < 1)
+ fun_l17_n858(x)
+ else
+ fun_l17_n300(x)
+ end
+end
+
+def fun_l16_n83(x)
+ if (x < 1)
+ fun_l17_n136(x)
+ else
+ fun_l17_n637(x)
+ end
+end
+
+def fun_l16_n84(x)
+ if (x < 1)
+ fun_l17_n71(x)
+ else
+ fun_l17_n979(x)
+ end
+end
+
+def fun_l16_n85(x)
+ if (x < 1)
+ fun_l17_n135(x)
+ else
+ fun_l17_n893(x)
+ end
+end
+
+def fun_l16_n86(x)
+ if (x < 1)
+ fun_l17_n734(x)
+ else
+ fun_l17_n254(x)
+ end
+end
+
+def fun_l16_n87(x)
+ if (x < 1)
+ fun_l17_n809(x)
+ else
+ fun_l17_n475(x)
+ end
+end
+
+def fun_l16_n88(x)
+ if (x < 1)
+ fun_l17_n931(x)
+ else
+ fun_l17_n110(x)
+ end
+end
+
+def fun_l16_n89(x)
+ if (x < 1)
+ fun_l17_n957(x)
+ else
+ fun_l17_n489(x)
+ end
+end
+
+def fun_l16_n90(x)
+ if (x < 1)
+ fun_l17_n145(x)
+ else
+ fun_l17_n861(x)
+ end
+end
+
+def fun_l16_n91(x)
+ if (x < 1)
+ fun_l17_n276(x)
+ else
+ fun_l17_n967(x)
+ end
+end
+
+def fun_l16_n92(x)
+ if (x < 1)
+ fun_l17_n657(x)
+ else
+ fun_l17_n638(x)
+ end
+end
+
+def fun_l16_n93(x)
+ if (x < 1)
+ fun_l17_n714(x)
+ else
+ fun_l17_n52(x)
+ end
+end
+
+def fun_l16_n94(x)
+ if (x < 1)
+ fun_l17_n487(x)
+ else
+ fun_l17_n380(x)
+ end
+end
+
+def fun_l16_n95(x)
+ if (x < 1)
+ fun_l17_n58(x)
+ else
+ fun_l17_n67(x)
+ end
+end
+
+def fun_l16_n96(x)
+ if (x < 1)
+ fun_l17_n9(x)
+ else
+ fun_l17_n896(x)
+ end
+end
+
+def fun_l16_n97(x)
+ if (x < 1)
+ fun_l17_n723(x)
+ else
+ fun_l17_n16(x)
+ end
+end
+
+def fun_l16_n98(x)
+ if (x < 1)
+ fun_l17_n143(x)
+ else
+ fun_l17_n31(x)
+ end
+end
+
+def fun_l16_n99(x)
+ if (x < 1)
+ fun_l17_n33(x)
+ else
+ fun_l17_n615(x)
+ end
+end
+
+def fun_l16_n100(x)
+ if (x < 1)
+ fun_l17_n318(x)
+ else
+ fun_l17_n83(x)
+ end
+end
+
+def fun_l16_n101(x)
+ if (x < 1)
+ fun_l17_n694(x)
+ else
+ fun_l17_n851(x)
+ end
+end
+
+def fun_l16_n102(x)
+ if (x < 1)
+ fun_l17_n31(x)
+ else
+ fun_l17_n881(x)
+ end
+end
+
+def fun_l16_n103(x)
+ if (x < 1)
+ fun_l17_n739(x)
+ else
+ fun_l17_n680(x)
+ end
+end
+
+def fun_l16_n104(x)
+ if (x < 1)
+ fun_l17_n123(x)
+ else
+ fun_l17_n969(x)
+ end
+end
+
+def fun_l16_n105(x)
+ if (x < 1)
+ fun_l17_n526(x)
+ else
+ fun_l17_n529(x)
+ end
+end
+
+def fun_l16_n106(x)
+ if (x < 1)
+ fun_l17_n613(x)
+ else
+ fun_l17_n738(x)
+ end
+end
+
+def fun_l16_n107(x)
+ if (x < 1)
+ fun_l17_n48(x)
+ else
+ fun_l17_n107(x)
+ end
+end
+
+def fun_l16_n108(x)
+ if (x < 1)
+ fun_l17_n493(x)
+ else
+ fun_l17_n875(x)
+ end
+end
+
+def fun_l16_n109(x)
+ if (x < 1)
+ fun_l17_n101(x)
+ else
+ fun_l17_n295(x)
+ end
+end
+
+def fun_l16_n110(x)
+ if (x < 1)
+ fun_l17_n257(x)
+ else
+ fun_l17_n132(x)
+ end
+end
+
+def fun_l16_n111(x)
+ if (x < 1)
+ fun_l17_n702(x)
+ else
+ fun_l17_n635(x)
+ end
+end
+
+def fun_l16_n112(x)
+ if (x < 1)
+ fun_l17_n193(x)
+ else
+ fun_l17_n931(x)
+ end
+end
+
+def fun_l16_n113(x)
+ if (x < 1)
+ fun_l17_n973(x)
+ else
+ fun_l17_n708(x)
+ end
+end
+
+def fun_l16_n114(x)
+ if (x < 1)
+ fun_l17_n110(x)
+ else
+ fun_l17_n247(x)
+ end
+end
+
+def fun_l16_n115(x)
+ if (x < 1)
+ fun_l17_n769(x)
+ else
+ fun_l17_n872(x)
+ end
+end
+
+def fun_l16_n116(x)
+ if (x < 1)
+ fun_l17_n63(x)
+ else
+ fun_l17_n90(x)
+ end
+end
+
+def fun_l16_n117(x)
+ if (x < 1)
+ fun_l17_n392(x)
+ else
+ fun_l17_n3(x)
+ end
+end
+
+def fun_l16_n118(x)
+ if (x < 1)
+ fun_l17_n73(x)
+ else
+ fun_l17_n354(x)
+ end
+end
+
+def fun_l16_n119(x)
+ if (x < 1)
+ fun_l17_n173(x)
+ else
+ fun_l17_n573(x)
+ end
+end
+
+def fun_l16_n120(x)
+ if (x < 1)
+ fun_l17_n481(x)
+ else
+ fun_l17_n571(x)
+ end
+end
+
+def fun_l16_n121(x)
+ if (x < 1)
+ fun_l17_n838(x)
+ else
+ fun_l17_n736(x)
+ end
+end
+
+def fun_l16_n122(x)
+ if (x < 1)
+ fun_l17_n400(x)
+ else
+ fun_l17_n169(x)
+ end
+end
+
+def fun_l16_n123(x)
+ if (x < 1)
+ fun_l17_n806(x)
+ else
+ fun_l17_n954(x)
+ end
+end
+
+def fun_l16_n124(x)
+ if (x < 1)
+ fun_l17_n328(x)
+ else
+ fun_l17_n200(x)
+ end
+end
+
+def fun_l16_n125(x)
+ if (x < 1)
+ fun_l17_n388(x)
+ else
+ fun_l17_n875(x)
+ end
+end
+
+def fun_l16_n126(x)
+ if (x < 1)
+ fun_l17_n178(x)
+ else
+ fun_l17_n122(x)
+ end
+end
+
+def fun_l16_n127(x)
+ if (x < 1)
+ fun_l17_n974(x)
+ else
+ fun_l17_n490(x)
+ end
+end
+
+def fun_l16_n128(x)
+ if (x < 1)
+ fun_l17_n731(x)
+ else
+ fun_l17_n807(x)
+ end
+end
+
+def fun_l16_n129(x)
+ if (x < 1)
+ fun_l17_n939(x)
+ else
+ fun_l17_n532(x)
+ end
+end
+
+def fun_l16_n130(x)
+ if (x < 1)
+ fun_l17_n482(x)
+ else
+ fun_l17_n926(x)
+ end
+end
+
+def fun_l16_n131(x)
+ if (x < 1)
+ fun_l17_n884(x)
+ else
+ fun_l17_n179(x)
+ end
+end
+
+def fun_l16_n132(x)
+ if (x < 1)
+ fun_l17_n683(x)
+ else
+ fun_l17_n24(x)
+ end
+end
+
+def fun_l16_n133(x)
+ if (x < 1)
+ fun_l17_n968(x)
+ else
+ fun_l17_n536(x)
+ end
+end
+
+def fun_l16_n134(x)
+ if (x < 1)
+ fun_l17_n229(x)
+ else
+ fun_l17_n280(x)
+ end
+end
+
+def fun_l16_n135(x)
+ if (x < 1)
+ fun_l17_n47(x)
+ else
+ fun_l17_n12(x)
+ end
+end
+
+def fun_l16_n136(x)
+ if (x < 1)
+ fun_l17_n905(x)
+ else
+ fun_l17_n461(x)
+ end
+end
+
+def fun_l16_n137(x)
+ if (x < 1)
+ fun_l17_n992(x)
+ else
+ fun_l17_n294(x)
+ end
+end
+
+def fun_l16_n138(x)
+ if (x < 1)
+ fun_l17_n383(x)
+ else
+ fun_l17_n916(x)
+ end
+end
+
+def fun_l16_n139(x)
+ if (x < 1)
+ fun_l17_n116(x)
+ else
+ fun_l17_n96(x)
+ end
+end
+
+def fun_l16_n140(x)
+ if (x < 1)
+ fun_l17_n702(x)
+ else
+ fun_l17_n294(x)
+ end
+end
+
+def fun_l16_n141(x)
+ if (x < 1)
+ fun_l17_n528(x)
+ else
+ fun_l17_n650(x)
+ end
+end
+
+def fun_l16_n142(x)
+ if (x < 1)
+ fun_l17_n341(x)
+ else
+ fun_l17_n168(x)
+ end
+end
+
+def fun_l16_n143(x)
+ if (x < 1)
+ fun_l17_n85(x)
+ else
+ fun_l17_n384(x)
+ end
+end
+
+def fun_l16_n144(x)
+ if (x < 1)
+ fun_l17_n738(x)
+ else
+ fun_l17_n842(x)
+ end
+end
+
+def fun_l16_n145(x)
+ if (x < 1)
+ fun_l17_n359(x)
+ else
+ fun_l17_n691(x)
+ end
+end
+
+def fun_l16_n146(x)
+ if (x < 1)
+ fun_l17_n465(x)
+ else
+ fun_l17_n310(x)
+ end
+end
+
+def fun_l16_n147(x)
+ if (x < 1)
+ fun_l17_n610(x)
+ else
+ fun_l17_n133(x)
+ end
+end
+
+def fun_l16_n148(x)
+ if (x < 1)
+ fun_l17_n829(x)
+ else
+ fun_l17_n449(x)
+ end
+end
+
+def fun_l16_n149(x)
+ if (x < 1)
+ fun_l17_n319(x)
+ else
+ fun_l17_n875(x)
+ end
+end
+
+def fun_l16_n150(x)
+ if (x < 1)
+ fun_l17_n493(x)
+ else
+ fun_l17_n39(x)
+ end
+end
+
+def fun_l16_n151(x)
+ if (x < 1)
+ fun_l17_n801(x)
+ else
+ fun_l17_n294(x)
+ end
+end
+
+def fun_l16_n152(x)
+ if (x < 1)
+ fun_l17_n39(x)
+ else
+ fun_l17_n113(x)
+ end
+end
+
+def fun_l16_n153(x)
+ if (x < 1)
+ fun_l17_n299(x)
+ else
+ fun_l17_n560(x)
+ end
+end
+
+def fun_l16_n154(x)
+ if (x < 1)
+ fun_l17_n220(x)
+ else
+ fun_l17_n485(x)
+ end
+end
+
+def fun_l16_n155(x)
+ if (x < 1)
+ fun_l17_n219(x)
+ else
+ fun_l17_n210(x)
+ end
+end
+
+def fun_l16_n156(x)
+ if (x < 1)
+ fun_l17_n44(x)
+ else
+ fun_l17_n394(x)
+ end
+end
+
+def fun_l16_n157(x)
+ if (x < 1)
+ fun_l17_n858(x)
+ else
+ fun_l17_n9(x)
+ end
+end
+
+def fun_l16_n158(x)
+ if (x < 1)
+ fun_l17_n298(x)
+ else
+ fun_l17_n584(x)
+ end
+end
+
+def fun_l16_n159(x)
+ if (x < 1)
+ fun_l17_n627(x)
+ else
+ fun_l17_n991(x)
+ end
+end
+
+def fun_l16_n160(x)
+ if (x < 1)
+ fun_l17_n459(x)
+ else
+ fun_l17_n686(x)
+ end
+end
+
+def fun_l16_n161(x)
+ if (x < 1)
+ fun_l17_n694(x)
+ else
+ fun_l17_n503(x)
+ end
+end
+
+def fun_l16_n162(x)
+ if (x < 1)
+ fun_l17_n331(x)
+ else
+ fun_l17_n869(x)
+ end
+end
+
+def fun_l16_n163(x)
+ if (x < 1)
+ fun_l17_n958(x)
+ else
+ fun_l17_n102(x)
+ end
+end
+
+def fun_l16_n164(x)
+ if (x < 1)
+ fun_l17_n254(x)
+ else
+ fun_l17_n888(x)
+ end
+end
+
+def fun_l16_n165(x)
+ if (x < 1)
+ fun_l17_n639(x)
+ else
+ fun_l17_n342(x)
+ end
+end
+
+def fun_l16_n166(x)
+ if (x < 1)
+ fun_l17_n859(x)
+ else
+ fun_l17_n2(x)
+ end
+end
+
+def fun_l16_n167(x)
+ if (x < 1)
+ fun_l17_n504(x)
+ else
+ fun_l17_n726(x)
+ end
+end
+
+def fun_l16_n168(x)
+ if (x < 1)
+ fun_l17_n426(x)
+ else
+ fun_l17_n532(x)
+ end
+end
+
+def fun_l16_n169(x)
+ if (x < 1)
+ fun_l17_n919(x)
+ else
+ fun_l17_n515(x)
+ end
+end
+
+def fun_l16_n170(x)
+ if (x < 1)
+ fun_l17_n394(x)
+ else
+ fun_l17_n259(x)
+ end
+end
+
+def fun_l16_n171(x)
+ if (x < 1)
+ fun_l17_n920(x)
+ else
+ fun_l17_n502(x)
+ end
+end
+
+def fun_l16_n172(x)
+ if (x < 1)
+ fun_l17_n898(x)
+ else
+ fun_l17_n984(x)
+ end
+end
+
+def fun_l16_n173(x)
+ if (x < 1)
+ fun_l17_n869(x)
+ else
+ fun_l17_n470(x)
+ end
+end
+
+def fun_l16_n174(x)
+ if (x < 1)
+ fun_l17_n959(x)
+ else
+ fun_l17_n283(x)
+ end
+end
+
+def fun_l16_n175(x)
+ if (x < 1)
+ fun_l17_n1(x)
+ else
+ fun_l17_n68(x)
+ end
+end
+
+def fun_l16_n176(x)
+ if (x < 1)
+ fun_l17_n91(x)
+ else
+ fun_l17_n684(x)
+ end
+end
+
+def fun_l16_n177(x)
+ if (x < 1)
+ fun_l17_n803(x)
+ else
+ fun_l17_n335(x)
+ end
+end
+
+def fun_l16_n178(x)
+ if (x < 1)
+ fun_l17_n242(x)
+ else
+ fun_l17_n671(x)
+ end
+end
+
+def fun_l16_n179(x)
+ if (x < 1)
+ fun_l17_n944(x)
+ else
+ fun_l17_n136(x)
+ end
+end
+
+def fun_l16_n180(x)
+ if (x < 1)
+ fun_l17_n681(x)
+ else
+ fun_l17_n587(x)
+ end
+end
+
+def fun_l16_n181(x)
+ if (x < 1)
+ fun_l17_n564(x)
+ else
+ fun_l17_n965(x)
+ end
+end
+
+def fun_l16_n182(x)
+ if (x < 1)
+ fun_l17_n107(x)
+ else
+ fun_l17_n229(x)
+ end
+end
+
+def fun_l16_n183(x)
+ if (x < 1)
+ fun_l17_n467(x)
+ else
+ fun_l17_n155(x)
+ end
+end
+
+def fun_l16_n184(x)
+ if (x < 1)
+ fun_l17_n62(x)
+ else
+ fun_l17_n507(x)
+ end
+end
+
+def fun_l16_n185(x)
+ if (x < 1)
+ fun_l17_n632(x)
+ else
+ fun_l17_n792(x)
+ end
+end
+
+def fun_l16_n186(x)
+ if (x < 1)
+ fun_l17_n174(x)
+ else
+ fun_l17_n623(x)
+ end
+end
+
+def fun_l16_n187(x)
+ if (x < 1)
+ fun_l17_n733(x)
+ else
+ fun_l17_n640(x)
+ end
+end
+
+def fun_l16_n188(x)
+ if (x < 1)
+ fun_l17_n968(x)
+ else
+ fun_l17_n554(x)
+ end
+end
+
+def fun_l16_n189(x)
+ if (x < 1)
+ fun_l17_n363(x)
+ else
+ fun_l17_n381(x)
+ end
+end
+
+def fun_l16_n190(x)
+ if (x < 1)
+ fun_l17_n34(x)
+ else
+ fun_l17_n145(x)
+ end
+end
+
+def fun_l16_n191(x)
+ if (x < 1)
+ fun_l17_n407(x)
+ else
+ fun_l17_n567(x)
+ end
+end
+
+def fun_l16_n192(x)
+ if (x < 1)
+ fun_l17_n497(x)
+ else
+ fun_l17_n842(x)
+ end
+end
+
+def fun_l16_n193(x)
+ if (x < 1)
+ fun_l17_n935(x)
+ else
+ fun_l17_n394(x)
+ end
+end
+
+def fun_l16_n194(x)
+ if (x < 1)
+ fun_l17_n728(x)
+ else
+ fun_l17_n885(x)
+ end
+end
+
+def fun_l16_n195(x)
+ if (x < 1)
+ fun_l17_n974(x)
+ else
+ fun_l17_n678(x)
+ end
+end
+
+def fun_l16_n196(x)
+ if (x < 1)
+ fun_l17_n420(x)
+ else
+ fun_l17_n894(x)
+ end
+end
+
+def fun_l16_n197(x)
+ if (x < 1)
+ fun_l17_n651(x)
+ else
+ fun_l17_n569(x)
+ end
+end
+
+def fun_l16_n198(x)
+ if (x < 1)
+ fun_l17_n274(x)
+ else
+ fun_l17_n683(x)
+ end
+end
+
+def fun_l16_n199(x)
+ if (x < 1)
+ fun_l17_n624(x)
+ else
+ fun_l17_n343(x)
+ end
+end
+
+def fun_l16_n200(x)
+ if (x < 1)
+ fun_l17_n82(x)
+ else
+ fun_l17_n472(x)
+ end
+end
+
+def fun_l16_n201(x)
+ if (x < 1)
+ fun_l17_n519(x)
+ else
+ fun_l17_n54(x)
+ end
+end
+
+def fun_l16_n202(x)
+ if (x < 1)
+ fun_l17_n858(x)
+ else
+ fun_l17_n379(x)
+ end
+end
+
+def fun_l16_n203(x)
+ if (x < 1)
+ fun_l17_n515(x)
+ else
+ fun_l17_n59(x)
+ end
+end
+
+def fun_l16_n204(x)
+ if (x < 1)
+ fun_l17_n736(x)
+ else
+ fun_l17_n880(x)
+ end
+end
+
+def fun_l16_n205(x)
+ if (x < 1)
+ fun_l17_n724(x)
+ else
+ fun_l17_n890(x)
+ end
+end
+
+def fun_l16_n206(x)
+ if (x < 1)
+ fun_l17_n92(x)
+ else
+ fun_l17_n305(x)
+ end
+end
+
+def fun_l16_n207(x)
+ if (x < 1)
+ fun_l17_n123(x)
+ else
+ fun_l17_n455(x)
+ end
+end
+
+def fun_l16_n208(x)
+ if (x < 1)
+ fun_l17_n722(x)
+ else
+ fun_l17_n142(x)
+ end
+end
+
+def fun_l16_n209(x)
+ if (x < 1)
+ fun_l17_n250(x)
+ else
+ fun_l17_n810(x)
+ end
+end
+
+def fun_l16_n210(x)
+ if (x < 1)
+ fun_l17_n118(x)
+ else
+ fun_l17_n902(x)
+ end
+end
+
+def fun_l16_n211(x)
+ if (x < 1)
+ fun_l17_n8(x)
+ else
+ fun_l17_n874(x)
+ end
+end
+
+def fun_l16_n212(x)
+ if (x < 1)
+ fun_l17_n589(x)
+ else
+ fun_l17_n731(x)
+ end
+end
+
+def fun_l16_n213(x)
+ if (x < 1)
+ fun_l17_n786(x)
+ else
+ fun_l17_n249(x)
+ end
+end
+
+def fun_l16_n214(x)
+ if (x < 1)
+ fun_l17_n80(x)
+ else
+ fun_l17_n763(x)
+ end
+end
+
+def fun_l16_n215(x)
+ if (x < 1)
+ fun_l17_n733(x)
+ else
+ fun_l17_n657(x)
+ end
+end
+
+def fun_l16_n216(x)
+ if (x < 1)
+ fun_l17_n168(x)
+ else
+ fun_l17_n881(x)
+ end
+end
+
+def fun_l16_n217(x)
+ if (x < 1)
+ fun_l17_n568(x)
+ else
+ fun_l17_n698(x)
+ end
+end
+
+def fun_l16_n218(x)
+ if (x < 1)
+ fun_l17_n727(x)
+ else
+ fun_l17_n388(x)
+ end
+end
+
+def fun_l16_n219(x)
+ if (x < 1)
+ fun_l17_n443(x)
+ else
+ fun_l17_n600(x)
+ end
+end
+
+def fun_l16_n220(x)
+ if (x < 1)
+ fun_l17_n901(x)
+ else
+ fun_l17_n875(x)
+ end
+end
+
+def fun_l16_n221(x)
+ if (x < 1)
+ fun_l17_n374(x)
+ else
+ fun_l17_n819(x)
+ end
+end
+
+def fun_l16_n222(x)
+ if (x < 1)
+ fun_l17_n563(x)
+ else
+ fun_l17_n341(x)
+ end
+end
+
+def fun_l16_n223(x)
+ if (x < 1)
+ fun_l17_n404(x)
+ else
+ fun_l17_n201(x)
+ end
+end
+
+def fun_l16_n224(x)
+ if (x < 1)
+ fun_l17_n932(x)
+ else
+ fun_l17_n803(x)
+ end
+end
+
+def fun_l16_n225(x)
+ if (x < 1)
+ fun_l17_n970(x)
+ else
+ fun_l17_n717(x)
+ end
+end
+
+def fun_l16_n226(x)
+ if (x < 1)
+ fun_l17_n599(x)
+ else
+ fun_l17_n692(x)
+ end
+end
+
+def fun_l16_n227(x)
+ if (x < 1)
+ fun_l17_n351(x)
+ else
+ fun_l17_n177(x)
+ end
+end
+
+def fun_l16_n228(x)
+ if (x < 1)
+ fun_l17_n891(x)
+ else
+ fun_l17_n79(x)
+ end
+end
+
+def fun_l16_n229(x)
+ if (x < 1)
+ fun_l17_n143(x)
+ else
+ fun_l17_n702(x)
+ end
+end
+
+def fun_l16_n230(x)
+ if (x < 1)
+ fun_l17_n591(x)
+ else
+ fun_l17_n317(x)
+ end
+end
+
+def fun_l16_n231(x)
+ if (x < 1)
+ fun_l17_n727(x)
+ else
+ fun_l17_n881(x)
+ end
+end
+
+def fun_l16_n232(x)
+ if (x < 1)
+ fun_l17_n390(x)
+ else
+ fun_l17_n580(x)
+ end
+end
+
+def fun_l16_n233(x)
+ if (x < 1)
+ fun_l17_n530(x)
+ else
+ fun_l17_n102(x)
+ end
+end
+
+def fun_l16_n234(x)
+ if (x < 1)
+ fun_l17_n891(x)
+ else
+ fun_l17_n783(x)
+ end
+end
+
+def fun_l16_n235(x)
+ if (x < 1)
+ fun_l17_n91(x)
+ else
+ fun_l17_n142(x)
+ end
+end
+
+def fun_l16_n236(x)
+ if (x < 1)
+ fun_l17_n55(x)
+ else
+ fun_l17_n897(x)
+ end
+end
+
+def fun_l16_n237(x)
+ if (x < 1)
+ fun_l17_n471(x)
+ else
+ fun_l17_n24(x)
+ end
+end
+
+def fun_l16_n238(x)
+ if (x < 1)
+ fun_l17_n812(x)
+ else
+ fun_l17_n833(x)
+ end
+end
+
+def fun_l16_n239(x)
+ if (x < 1)
+ fun_l17_n879(x)
+ else
+ fun_l17_n560(x)
+ end
+end
+
+def fun_l16_n240(x)
+ if (x < 1)
+ fun_l17_n882(x)
+ else
+ fun_l17_n473(x)
+ end
+end
+
+def fun_l16_n241(x)
+ if (x < 1)
+ fun_l17_n30(x)
+ else
+ fun_l17_n299(x)
+ end
+end
+
+def fun_l16_n242(x)
+ if (x < 1)
+ fun_l17_n855(x)
+ else
+ fun_l17_n751(x)
+ end
+end
+
+def fun_l16_n243(x)
+ if (x < 1)
+ fun_l17_n184(x)
+ else
+ fun_l17_n997(x)
+ end
+end
+
+def fun_l16_n244(x)
+ if (x < 1)
+ fun_l17_n151(x)
+ else
+ fun_l17_n495(x)
+ end
+end
+
+def fun_l16_n245(x)
+ if (x < 1)
+ fun_l17_n181(x)
+ else
+ fun_l17_n360(x)
+ end
+end
+
+def fun_l16_n246(x)
+ if (x < 1)
+ fun_l17_n208(x)
+ else
+ fun_l17_n767(x)
+ end
+end
+
+def fun_l16_n247(x)
+ if (x < 1)
+ fun_l17_n969(x)
+ else
+ fun_l17_n15(x)
+ end
+end
+
+def fun_l16_n248(x)
+ if (x < 1)
+ fun_l17_n529(x)
+ else
+ fun_l17_n879(x)
+ end
+end
+
+def fun_l16_n249(x)
+ if (x < 1)
+ fun_l17_n729(x)
+ else
+ fun_l17_n355(x)
+ end
+end
+
+def fun_l16_n250(x)
+ if (x < 1)
+ fun_l17_n239(x)
+ else
+ fun_l17_n414(x)
+ end
+end
+
+def fun_l16_n251(x)
+ if (x < 1)
+ fun_l17_n257(x)
+ else
+ fun_l17_n362(x)
+ end
+end
+
+def fun_l16_n252(x)
+ if (x < 1)
+ fun_l17_n832(x)
+ else
+ fun_l17_n924(x)
+ end
+end
+
+def fun_l16_n253(x)
+ if (x < 1)
+ fun_l17_n907(x)
+ else
+ fun_l17_n548(x)
+ end
+end
+
+def fun_l16_n254(x)
+ if (x < 1)
+ fun_l17_n391(x)
+ else
+ fun_l17_n316(x)
+ end
+end
+
+def fun_l16_n255(x)
+ if (x < 1)
+ fun_l17_n163(x)
+ else
+ fun_l17_n164(x)
+ end
+end
+
+def fun_l16_n256(x)
+ if (x < 1)
+ fun_l17_n86(x)
+ else
+ fun_l17_n473(x)
+ end
+end
+
+def fun_l16_n257(x)
+ if (x < 1)
+ fun_l17_n519(x)
+ else
+ fun_l17_n556(x)
+ end
+end
+
+def fun_l16_n258(x)
+ if (x < 1)
+ fun_l17_n819(x)
+ else
+ fun_l17_n41(x)
+ end
+end
+
+def fun_l16_n259(x)
+ if (x < 1)
+ fun_l17_n330(x)
+ else
+ fun_l17_n334(x)
+ end
+end
+
+def fun_l16_n260(x)
+ if (x < 1)
+ fun_l17_n441(x)
+ else
+ fun_l17_n529(x)
+ end
+end
+
+def fun_l16_n261(x)
+ if (x < 1)
+ fun_l17_n116(x)
+ else
+ fun_l17_n597(x)
+ end
+end
+
+def fun_l16_n262(x)
+ if (x < 1)
+ fun_l17_n537(x)
+ else
+ fun_l17_n594(x)
+ end
+end
+
+def fun_l16_n263(x)
+ if (x < 1)
+ fun_l17_n511(x)
+ else
+ fun_l17_n56(x)
+ end
+end
+
+def fun_l16_n264(x)
+ if (x < 1)
+ fun_l17_n264(x)
+ else
+ fun_l17_n641(x)
+ end
+end
+
+def fun_l16_n265(x)
+ if (x < 1)
+ fun_l17_n806(x)
+ else
+ fun_l17_n432(x)
+ end
+end
+
+def fun_l16_n266(x)
+ if (x < 1)
+ fun_l17_n428(x)
+ else
+ fun_l17_n463(x)
+ end
+end
+
+def fun_l16_n267(x)
+ if (x < 1)
+ fun_l17_n39(x)
+ else
+ fun_l17_n362(x)
+ end
+end
+
+def fun_l16_n268(x)
+ if (x < 1)
+ fun_l17_n502(x)
+ else
+ fun_l17_n87(x)
+ end
+end
+
+def fun_l16_n269(x)
+ if (x < 1)
+ fun_l17_n143(x)
+ else
+ fun_l17_n92(x)
+ end
+end
+
+def fun_l16_n270(x)
+ if (x < 1)
+ fun_l17_n675(x)
+ else
+ fun_l17_n629(x)
+ end
+end
+
+def fun_l16_n271(x)
+ if (x < 1)
+ fun_l17_n33(x)
+ else
+ fun_l17_n158(x)
+ end
+end
+
+def fun_l16_n272(x)
+ if (x < 1)
+ fun_l17_n480(x)
+ else
+ fun_l17_n204(x)
+ end
+end
+
+def fun_l16_n273(x)
+ if (x < 1)
+ fun_l17_n81(x)
+ else
+ fun_l17_n855(x)
+ end
+end
+
+def fun_l16_n274(x)
+ if (x < 1)
+ fun_l17_n608(x)
+ else
+ fun_l17_n969(x)
+ end
+end
+
+def fun_l16_n275(x)
+ if (x < 1)
+ fun_l17_n606(x)
+ else
+ fun_l17_n292(x)
+ end
+end
+
+def fun_l16_n276(x)
+ if (x < 1)
+ fun_l17_n494(x)
+ else
+ fun_l17_n689(x)
+ end
+end
+
+def fun_l16_n277(x)
+ if (x < 1)
+ fun_l17_n3(x)
+ else
+ fun_l17_n207(x)
+ end
+end
+
+def fun_l16_n278(x)
+ if (x < 1)
+ fun_l17_n85(x)
+ else
+ fun_l17_n59(x)
+ end
+end
+
+def fun_l16_n279(x)
+ if (x < 1)
+ fun_l17_n363(x)
+ else
+ fun_l17_n651(x)
+ end
+end
+
+def fun_l16_n280(x)
+ if (x < 1)
+ fun_l17_n199(x)
+ else
+ fun_l17_n77(x)
+ end
+end
+
+def fun_l16_n281(x)
+ if (x < 1)
+ fun_l17_n83(x)
+ else
+ fun_l17_n865(x)
+ end
+end
+
+def fun_l16_n282(x)
+ if (x < 1)
+ fun_l17_n120(x)
+ else
+ fun_l17_n466(x)
+ end
+end
+
+def fun_l16_n283(x)
+ if (x < 1)
+ fun_l17_n667(x)
+ else
+ fun_l17_n867(x)
+ end
+end
+
+def fun_l16_n284(x)
+ if (x < 1)
+ fun_l17_n248(x)
+ else
+ fun_l17_n480(x)
+ end
+end
+
+def fun_l16_n285(x)
+ if (x < 1)
+ fun_l17_n766(x)
+ else
+ fun_l17_n609(x)
+ end
+end
+
+def fun_l16_n286(x)
+ if (x < 1)
+ fun_l17_n95(x)
+ else
+ fun_l17_n341(x)
+ end
+end
+
+def fun_l16_n287(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n552(x)
+ end
+end
+
+def fun_l16_n288(x)
+ if (x < 1)
+ fun_l17_n955(x)
+ else
+ fun_l17_n434(x)
+ end
+end
+
+def fun_l16_n289(x)
+ if (x < 1)
+ fun_l17_n954(x)
+ else
+ fun_l17_n554(x)
+ end
+end
+
+def fun_l16_n290(x)
+ if (x < 1)
+ fun_l17_n981(x)
+ else
+ fun_l17_n374(x)
+ end
+end
+
+def fun_l16_n291(x)
+ if (x < 1)
+ fun_l17_n153(x)
+ else
+ fun_l17_n849(x)
+ end
+end
+
+def fun_l16_n292(x)
+ if (x < 1)
+ fun_l17_n89(x)
+ else
+ fun_l17_n491(x)
+ end
+end
+
+def fun_l16_n293(x)
+ if (x < 1)
+ fun_l17_n908(x)
+ else
+ fun_l17_n75(x)
+ end
+end
+
+def fun_l16_n294(x)
+ if (x < 1)
+ fun_l17_n772(x)
+ else
+ fun_l17_n474(x)
+ end
+end
+
+def fun_l16_n295(x)
+ if (x < 1)
+ fun_l17_n577(x)
+ else
+ fun_l17_n470(x)
+ end
+end
+
+def fun_l16_n296(x)
+ if (x < 1)
+ fun_l17_n699(x)
+ else
+ fun_l17_n172(x)
+ end
+end
+
+def fun_l16_n297(x)
+ if (x < 1)
+ fun_l17_n408(x)
+ else
+ fun_l17_n314(x)
+ end
+end
+
+def fun_l16_n298(x)
+ if (x < 1)
+ fun_l17_n521(x)
+ else
+ fun_l17_n940(x)
+ end
+end
+
+def fun_l16_n299(x)
+ if (x < 1)
+ fun_l17_n804(x)
+ else
+ fun_l17_n503(x)
+ end
+end
+
+def fun_l16_n300(x)
+ if (x < 1)
+ fun_l17_n712(x)
+ else
+ fun_l17_n227(x)
+ end
+end
+
+def fun_l16_n301(x)
+ if (x < 1)
+ fun_l17_n700(x)
+ else
+ fun_l17_n102(x)
+ end
+end
+
+def fun_l16_n302(x)
+ if (x < 1)
+ fun_l17_n290(x)
+ else
+ fun_l17_n212(x)
+ end
+end
+
+def fun_l16_n303(x)
+ if (x < 1)
+ fun_l17_n525(x)
+ else
+ fun_l17_n273(x)
+ end
+end
+
+def fun_l16_n304(x)
+ if (x < 1)
+ fun_l17_n356(x)
+ else
+ fun_l17_n359(x)
+ end
+end
+
+def fun_l16_n305(x)
+ if (x < 1)
+ fun_l17_n84(x)
+ else
+ fun_l17_n207(x)
+ end
+end
+
+def fun_l16_n306(x)
+ if (x < 1)
+ fun_l17_n566(x)
+ else
+ fun_l17_n945(x)
+ end
+end
+
+def fun_l16_n307(x)
+ if (x < 1)
+ fun_l17_n692(x)
+ else
+ fun_l17_n326(x)
+ end
+end
+
+def fun_l16_n308(x)
+ if (x < 1)
+ fun_l17_n727(x)
+ else
+ fun_l17_n205(x)
+ end
+end
+
+def fun_l16_n309(x)
+ if (x < 1)
+ fun_l17_n568(x)
+ else
+ fun_l17_n386(x)
+ end
+end
+
+def fun_l16_n310(x)
+ if (x < 1)
+ fun_l17_n244(x)
+ else
+ fun_l17_n472(x)
+ end
+end
+
+def fun_l16_n311(x)
+ if (x < 1)
+ fun_l17_n956(x)
+ else
+ fun_l17_n546(x)
+ end
+end
+
+def fun_l16_n312(x)
+ if (x < 1)
+ fun_l17_n807(x)
+ else
+ fun_l17_n924(x)
+ end
+end
+
+def fun_l16_n313(x)
+ if (x < 1)
+ fun_l17_n931(x)
+ else
+ fun_l17_n962(x)
+ end
+end
+
+def fun_l16_n314(x)
+ if (x < 1)
+ fun_l17_n64(x)
+ else
+ fun_l17_n178(x)
+ end
+end
+
+def fun_l16_n315(x)
+ if (x < 1)
+ fun_l17_n460(x)
+ else
+ fun_l17_n438(x)
+ end
+end
+
+def fun_l16_n316(x)
+ if (x < 1)
+ fun_l17_n185(x)
+ else
+ fun_l17_n25(x)
+ end
+end
+
+def fun_l16_n317(x)
+ if (x < 1)
+ fun_l17_n732(x)
+ else
+ fun_l17_n460(x)
+ end
+end
+
+def fun_l16_n318(x)
+ if (x < 1)
+ fun_l17_n5(x)
+ else
+ fun_l17_n947(x)
+ end
+end
+
+def fun_l16_n319(x)
+ if (x < 1)
+ fun_l17_n682(x)
+ else
+ fun_l17_n644(x)
+ end
+end
+
+def fun_l16_n320(x)
+ if (x < 1)
+ fun_l17_n151(x)
+ else
+ fun_l17_n578(x)
+ end
+end
+
+def fun_l16_n321(x)
+ if (x < 1)
+ fun_l17_n219(x)
+ else
+ fun_l17_n4(x)
+ end
+end
+
+def fun_l16_n322(x)
+ if (x < 1)
+ fun_l17_n214(x)
+ else
+ fun_l17_n594(x)
+ end
+end
+
+def fun_l16_n323(x)
+ if (x < 1)
+ fun_l17_n970(x)
+ else
+ fun_l17_n275(x)
+ end
+end
+
+def fun_l16_n324(x)
+ if (x < 1)
+ fun_l17_n442(x)
+ else
+ fun_l17_n377(x)
+ end
+end
+
+def fun_l16_n325(x)
+ if (x < 1)
+ fun_l17_n783(x)
+ else
+ fun_l17_n731(x)
+ end
+end
+
+def fun_l16_n326(x)
+ if (x < 1)
+ fun_l17_n43(x)
+ else
+ fun_l17_n884(x)
+ end
+end
+
+def fun_l16_n327(x)
+ if (x < 1)
+ fun_l17_n857(x)
+ else
+ fun_l17_n593(x)
+ end
+end
+
+def fun_l16_n328(x)
+ if (x < 1)
+ fun_l17_n942(x)
+ else
+ fun_l17_n772(x)
+ end
+end
+
+def fun_l16_n329(x)
+ if (x < 1)
+ fun_l17_n309(x)
+ else
+ fun_l17_n508(x)
+ end
+end
+
+def fun_l16_n330(x)
+ if (x < 1)
+ fun_l17_n30(x)
+ else
+ fun_l17_n165(x)
+ end
+end
+
+def fun_l16_n331(x)
+ if (x < 1)
+ fun_l17_n981(x)
+ else
+ fun_l17_n355(x)
+ end
+end
+
+def fun_l16_n332(x)
+ if (x < 1)
+ fun_l17_n159(x)
+ else
+ fun_l17_n228(x)
+ end
+end
+
+def fun_l16_n333(x)
+ if (x < 1)
+ fun_l17_n499(x)
+ else
+ fun_l17_n565(x)
+ end
+end
+
+def fun_l16_n334(x)
+ if (x < 1)
+ fun_l17_n371(x)
+ else
+ fun_l17_n856(x)
+ end
+end
+
+def fun_l16_n335(x)
+ if (x < 1)
+ fun_l17_n717(x)
+ else
+ fun_l17_n229(x)
+ end
+end
+
+def fun_l16_n336(x)
+ if (x < 1)
+ fun_l17_n678(x)
+ else
+ fun_l17_n236(x)
+ end
+end
+
+def fun_l16_n337(x)
+ if (x < 1)
+ fun_l17_n472(x)
+ else
+ fun_l17_n566(x)
+ end
+end
+
+def fun_l16_n338(x)
+ if (x < 1)
+ fun_l17_n74(x)
+ else
+ fun_l17_n247(x)
+ end
+end
+
+def fun_l16_n339(x)
+ if (x < 1)
+ fun_l17_n379(x)
+ else
+ fun_l17_n443(x)
+ end
+end
+
+def fun_l16_n340(x)
+ if (x < 1)
+ fun_l17_n233(x)
+ else
+ fun_l17_n79(x)
+ end
+end
+
+def fun_l16_n341(x)
+ if (x < 1)
+ fun_l17_n136(x)
+ else
+ fun_l17_n900(x)
+ end
+end
+
+def fun_l16_n342(x)
+ if (x < 1)
+ fun_l17_n785(x)
+ else
+ fun_l17_n63(x)
+ end
+end
+
+def fun_l16_n343(x)
+ if (x < 1)
+ fun_l17_n429(x)
+ else
+ fun_l17_n111(x)
+ end
+end
+
+def fun_l16_n344(x)
+ if (x < 1)
+ fun_l17_n226(x)
+ else
+ fun_l17_n137(x)
+ end
+end
+
+def fun_l16_n345(x)
+ if (x < 1)
+ fun_l17_n428(x)
+ else
+ fun_l17_n674(x)
+ end
+end
+
+def fun_l16_n346(x)
+ if (x < 1)
+ fun_l17_n940(x)
+ else
+ fun_l17_n987(x)
+ end
+end
+
+def fun_l16_n347(x)
+ if (x < 1)
+ fun_l17_n579(x)
+ else
+ fun_l17_n220(x)
+ end
+end
+
+def fun_l16_n348(x)
+ if (x < 1)
+ fun_l17_n502(x)
+ else
+ fun_l17_n530(x)
+ end
+end
+
+def fun_l16_n349(x)
+ if (x < 1)
+ fun_l17_n334(x)
+ else
+ fun_l17_n955(x)
+ end
+end
+
+def fun_l16_n350(x)
+ if (x < 1)
+ fun_l17_n680(x)
+ else
+ fun_l17_n41(x)
+ end
+end
+
+def fun_l16_n351(x)
+ if (x < 1)
+ fun_l17_n821(x)
+ else
+ fun_l17_n750(x)
+ end
+end
+
+def fun_l16_n352(x)
+ if (x < 1)
+ fun_l17_n212(x)
+ else
+ fun_l17_n537(x)
+ end
+end
+
+def fun_l16_n353(x)
+ if (x < 1)
+ fun_l17_n555(x)
+ else
+ fun_l17_n834(x)
+ end
+end
+
+def fun_l16_n354(x)
+ if (x < 1)
+ fun_l17_n532(x)
+ else
+ fun_l17_n940(x)
+ end
+end
+
+def fun_l16_n355(x)
+ if (x < 1)
+ fun_l17_n771(x)
+ else
+ fun_l17_n915(x)
+ end
+end
+
+def fun_l16_n356(x)
+ if (x < 1)
+ fun_l17_n844(x)
+ else
+ fun_l17_n235(x)
+ end
+end
+
+def fun_l16_n357(x)
+ if (x < 1)
+ fun_l17_n604(x)
+ else
+ fun_l17_n241(x)
+ end
+end
+
+def fun_l16_n358(x)
+ if (x < 1)
+ fun_l17_n156(x)
+ else
+ fun_l17_n832(x)
+ end
+end
+
+def fun_l16_n359(x)
+ if (x < 1)
+ fun_l17_n335(x)
+ else
+ fun_l17_n115(x)
+ end
+end
+
+def fun_l16_n360(x)
+ if (x < 1)
+ fun_l17_n563(x)
+ else
+ fun_l17_n779(x)
+ end
+end
+
+def fun_l16_n361(x)
+ if (x < 1)
+ fun_l17_n280(x)
+ else
+ fun_l17_n946(x)
+ end
+end
+
+def fun_l16_n362(x)
+ if (x < 1)
+ fun_l17_n497(x)
+ else
+ fun_l17_n390(x)
+ end
+end
+
+def fun_l16_n363(x)
+ if (x < 1)
+ fun_l17_n59(x)
+ else
+ fun_l17_n178(x)
+ end
+end
+
+def fun_l16_n364(x)
+ if (x < 1)
+ fun_l17_n509(x)
+ else
+ fun_l17_n963(x)
+ end
+end
+
+def fun_l16_n365(x)
+ if (x < 1)
+ fun_l17_n670(x)
+ else
+ fun_l17_n455(x)
+ end
+end
+
+def fun_l16_n366(x)
+ if (x < 1)
+ fun_l17_n852(x)
+ else
+ fun_l17_n590(x)
+ end
+end
+
+def fun_l16_n367(x)
+ if (x < 1)
+ fun_l17_n714(x)
+ else
+ fun_l17_n98(x)
+ end
+end
+
+def fun_l16_n368(x)
+ if (x < 1)
+ fun_l17_n456(x)
+ else
+ fun_l17_n754(x)
+ end
+end
+
+def fun_l16_n369(x)
+ if (x < 1)
+ fun_l17_n809(x)
+ else
+ fun_l17_n38(x)
+ end
+end
+
+def fun_l16_n370(x)
+ if (x < 1)
+ fun_l17_n127(x)
+ else
+ fun_l17_n395(x)
+ end
+end
+
+def fun_l16_n371(x)
+ if (x < 1)
+ fun_l17_n700(x)
+ else
+ fun_l17_n175(x)
+ end
+end
+
+def fun_l16_n372(x)
+ if (x < 1)
+ fun_l17_n705(x)
+ else
+ fun_l17_n598(x)
+ end
+end
+
+def fun_l16_n373(x)
+ if (x < 1)
+ fun_l17_n808(x)
+ else
+ fun_l17_n253(x)
+ end
+end
+
+def fun_l16_n374(x)
+ if (x < 1)
+ fun_l17_n195(x)
+ else
+ fun_l17_n47(x)
+ end
+end
+
+def fun_l16_n375(x)
+ if (x < 1)
+ fun_l17_n124(x)
+ else
+ fun_l17_n438(x)
+ end
+end
+
+def fun_l16_n376(x)
+ if (x < 1)
+ fun_l17_n261(x)
+ else
+ fun_l17_n317(x)
+ end
+end
+
+def fun_l16_n377(x)
+ if (x < 1)
+ fun_l17_n702(x)
+ else
+ fun_l17_n67(x)
+ end
+end
+
+def fun_l16_n378(x)
+ if (x < 1)
+ fun_l17_n194(x)
+ else
+ fun_l17_n990(x)
+ end
+end
+
+def fun_l16_n379(x)
+ if (x < 1)
+ fun_l17_n574(x)
+ else
+ fun_l17_n379(x)
+ end
+end
+
+def fun_l16_n380(x)
+ if (x < 1)
+ fun_l17_n182(x)
+ else
+ fun_l17_n902(x)
+ end
+end
+
+def fun_l16_n381(x)
+ if (x < 1)
+ fun_l17_n963(x)
+ else
+ fun_l17_n627(x)
+ end
+end
+
+def fun_l16_n382(x)
+ if (x < 1)
+ fun_l17_n200(x)
+ else
+ fun_l17_n889(x)
+ end
+end
+
+def fun_l16_n383(x)
+ if (x < 1)
+ fun_l17_n14(x)
+ else
+ fun_l17_n422(x)
+ end
+end
+
+def fun_l16_n384(x)
+ if (x < 1)
+ fun_l17_n543(x)
+ else
+ fun_l17_n940(x)
+ end
+end
+
+def fun_l16_n385(x)
+ if (x < 1)
+ fun_l17_n762(x)
+ else
+ fun_l17_n493(x)
+ end
+end
+
+def fun_l16_n386(x)
+ if (x < 1)
+ fun_l17_n824(x)
+ else
+ fun_l17_n963(x)
+ end
+end
+
+def fun_l16_n387(x)
+ if (x < 1)
+ fun_l17_n298(x)
+ else
+ fun_l17_n831(x)
+ end
+end
+
+def fun_l16_n388(x)
+ if (x < 1)
+ fun_l17_n284(x)
+ else
+ fun_l17_n784(x)
+ end
+end
+
+def fun_l16_n389(x)
+ if (x < 1)
+ fun_l17_n461(x)
+ else
+ fun_l17_n684(x)
+ end
+end
+
+def fun_l16_n390(x)
+ if (x < 1)
+ fun_l17_n829(x)
+ else
+ fun_l17_n788(x)
+ end
+end
+
+def fun_l16_n391(x)
+ if (x < 1)
+ fun_l17_n263(x)
+ else
+ fun_l17_n21(x)
+ end
+end
+
+def fun_l16_n392(x)
+ if (x < 1)
+ fun_l17_n994(x)
+ else
+ fun_l17_n646(x)
+ end
+end
+
+def fun_l16_n393(x)
+ if (x < 1)
+ fun_l17_n438(x)
+ else
+ fun_l17_n84(x)
+ end
+end
+
+def fun_l16_n394(x)
+ if (x < 1)
+ fun_l17_n660(x)
+ else
+ fun_l17_n269(x)
+ end
+end
+
+def fun_l16_n395(x)
+ if (x < 1)
+ fun_l17_n939(x)
+ else
+ fun_l17_n676(x)
+ end
+end
+
+def fun_l16_n396(x)
+ if (x < 1)
+ fun_l17_n608(x)
+ else
+ fun_l17_n483(x)
+ end
+end
+
+def fun_l16_n397(x)
+ if (x < 1)
+ fun_l17_n504(x)
+ else
+ fun_l17_n499(x)
+ end
+end
+
+def fun_l16_n398(x)
+ if (x < 1)
+ fun_l17_n793(x)
+ else
+ fun_l17_n489(x)
+ end
+end
+
+def fun_l16_n399(x)
+ if (x < 1)
+ fun_l17_n28(x)
+ else
+ fun_l17_n158(x)
+ end
+end
+
+def fun_l16_n400(x)
+ if (x < 1)
+ fun_l17_n30(x)
+ else
+ fun_l17_n21(x)
+ end
+end
+
+def fun_l16_n401(x)
+ if (x < 1)
+ fun_l17_n532(x)
+ else
+ fun_l17_n730(x)
+ end
+end
+
+def fun_l16_n402(x)
+ if (x < 1)
+ fun_l17_n593(x)
+ else
+ fun_l17_n4(x)
+ end
+end
+
+def fun_l16_n403(x)
+ if (x < 1)
+ fun_l17_n881(x)
+ else
+ fun_l17_n956(x)
+ end
+end
+
+def fun_l16_n404(x)
+ if (x < 1)
+ fun_l17_n676(x)
+ else
+ fun_l17_n625(x)
+ end
+end
+
+def fun_l16_n405(x)
+ if (x < 1)
+ fun_l17_n192(x)
+ else
+ fun_l17_n301(x)
+ end
+end
+
+def fun_l16_n406(x)
+ if (x < 1)
+ fun_l17_n170(x)
+ else
+ fun_l17_n970(x)
+ end
+end
+
+def fun_l16_n407(x)
+ if (x < 1)
+ fun_l17_n268(x)
+ else
+ fun_l17_n765(x)
+ end
+end
+
+def fun_l16_n408(x)
+ if (x < 1)
+ fun_l17_n310(x)
+ else
+ fun_l17_n578(x)
+ end
+end
+
+def fun_l16_n409(x)
+ if (x < 1)
+ fun_l17_n301(x)
+ else
+ fun_l17_n870(x)
+ end
+end
+
+def fun_l16_n410(x)
+ if (x < 1)
+ fun_l17_n390(x)
+ else
+ fun_l17_n769(x)
+ end
+end
+
+def fun_l16_n411(x)
+ if (x < 1)
+ fun_l17_n973(x)
+ else
+ fun_l17_n545(x)
+ end
+end
+
+def fun_l16_n412(x)
+ if (x < 1)
+ fun_l17_n108(x)
+ else
+ fun_l17_n731(x)
+ end
+end
+
+def fun_l16_n413(x)
+ if (x < 1)
+ fun_l17_n842(x)
+ else
+ fun_l17_n106(x)
+ end
+end
+
+def fun_l16_n414(x)
+ if (x < 1)
+ fun_l17_n10(x)
+ else
+ fun_l17_n421(x)
+ end
+end
+
+def fun_l16_n415(x)
+ if (x < 1)
+ fun_l17_n765(x)
+ else
+ fun_l17_n584(x)
+ end
+end
+
+def fun_l16_n416(x)
+ if (x < 1)
+ fun_l17_n480(x)
+ else
+ fun_l17_n494(x)
+ end
+end
+
+def fun_l16_n417(x)
+ if (x < 1)
+ fun_l17_n977(x)
+ else
+ fun_l17_n66(x)
+ end
+end
+
+def fun_l16_n418(x)
+ if (x < 1)
+ fun_l17_n291(x)
+ else
+ fun_l17_n161(x)
+ end
+end
+
+def fun_l16_n419(x)
+ if (x < 1)
+ fun_l17_n400(x)
+ else
+ fun_l17_n99(x)
+ end
+end
+
+def fun_l16_n420(x)
+ if (x < 1)
+ fun_l17_n621(x)
+ else
+ fun_l17_n778(x)
+ end
+end
+
+def fun_l16_n421(x)
+ if (x < 1)
+ fun_l17_n286(x)
+ else
+ fun_l17_n784(x)
+ end
+end
+
+def fun_l16_n422(x)
+ if (x < 1)
+ fun_l17_n575(x)
+ else
+ fun_l17_n606(x)
+ end
+end
+
+def fun_l16_n423(x)
+ if (x < 1)
+ fun_l17_n459(x)
+ else
+ fun_l17_n198(x)
+ end
+end
+
+def fun_l16_n424(x)
+ if (x < 1)
+ fun_l17_n190(x)
+ else
+ fun_l17_n597(x)
+ end
+end
+
+def fun_l16_n425(x)
+ if (x < 1)
+ fun_l17_n365(x)
+ else
+ fun_l17_n73(x)
+ end
+end
+
+def fun_l16_n426(x)
+ if (x < 1)
+ fun_l17_n769(x)
+ else
+ fun_l17_n658(x)
+ end
+end
+
+def fun_l16_n427(x)
+ if (x < 1)
+ fun_l17_n980(x)
+ else
+ fun_l17_n594(x)
+ end
+end
+
+def fun_l16_n428(x)
+ if (x < 1)
+ fun_l17_n210(x)
+ else
+ fun_l17_n33(x)
+ end
+end
+
+def fun_l16_n429(x)
+ if (x < 1)
+ fun_l17_n585(x)
+ else
+ fun_l17_n997(x)
+ end
+end
+
+def fun_l16_n430(x)
+ if (x < 1)
+ fun_l17_n660(x)
+ else
+ fun_l17_n883(x)
+ end
+end
+
+def fun_l16_n431(x)
+ if (x < 1)
+ fun_l17_n613(x)
+ else
+ fun_l17_n7(x)
+ end
+end
+
+def fun_l16_n432(x)
+ if (x < 1)
+ fun_l17_n764(x)
+ else
+ fun_l17_n150(x)
+ end
+end
+
+def fun_l16_n433(x)
+ if (x < 1)
+ fun_l17_n582(x)
+ else
+ fun_l17_n197(x)
+ end
+end
+
+def fun_l16_n434(x)
+ if (x < 1)
+ fun_l17_n553(x)
+ else
+ fun_l17_n107(x)
+ end
+end
+
+def fun_l16_n435(x)
+ if (x < 1)
+ fun_l17_n975(x)
+ else
+ fun_l17_n865(x)
+ end
+end
+
+def fun_l16_n436(x)
+ if (x < 1)
+ fun_l17_n622(x)
+ else
+ fun_l17_n351(x)
+ end
+end
+
+def fun_l16_n437(x)
+ if (x < 1)
+ fun_l17_n681(x)
+ else
+ fun_l17_n472(x)
+ end
+end
+
+def fun_l16_n438(x)
+ if (x < 1)
+ fun_l17_n329(x)
+ else
+ fun_l17_n54(x)
+ end
+end
+
+def fun_l16_n439(x)
+ if (x < 1)
+ fun_l17_n340(x)
+ else
+ fun_l17_n567(x)
+ end
+end
+
+def fun_l16_n440(x)
+ if (x < 1)
+ fun_l17_n563(x)
+ else
+ fun_l17_n134(x)
+ end
+end
+
+def fun_l16_n441(x)
+ if (x < 1)
+ fun_l17_n194(x)
+ else
+ fun_l17_n986(x)
+ end
+end
+
+def fun_l16_n442(x)
+ if (x < 1)
+ fun_l17_n926(x)
+ else
+ fun_l17_n35(x)
+ end
+end
+
+def fun_l16_n443(x)
+ if (x < 1)
+ fun_l17_n771(x)
+ else
+ fun_l17_n383(x)
+ end
+end
+
+def fun_l16_n444(x)
+ if (x < 1)
+ fun_l17_n682(x)
+ else
+ fun_l17_n1(x)
+ end
+end
+
+def fun_l16_n445(x)
+ if (x < 1)
+ fun_l17_n633(x)
+ else
+ fun_l17_n757(x)
+ end
+end
+
+def fun_l16_n446(x)
+ if (x < 1)
+ fun_l17_n95(x)
+ else
+ fun_l17_n256(x)
+ end
+end
+
+def fun_l16_n447(x)
+ if (x < 1)
+ fun_l17_n183(x)
+ else
+ fun_l17_n214(x)
+ end
+end
+
+def fun_l16_n448(x)
+ if (x < 1)
+ fun_l17_n140(x)
+ else
+ fun_l17_n371(x)
+ end
+end
+
+def fun_l16_n449(x)
+ if (x < 1)
+ fun_l17_n188(x)
+ else
+ fun_l17_n898(x)
+ end
+end
+
+def fun_l16_n450(x)
+ if (x < 1)
+ fun_l17_n710(x)
+ else
+ fun_l17_n512(x)
+ end
+end
+
+def fun_l16_n451(x)
+ if (x < 1)
+ fun_l17_n796(x)
+ else
+ fun_l17_n56(x)
+ end
+end
+
+def fun_l16_n452(x)
+ if (x < 1)
+ fun_l17_n124(x)
+ else
+ fun_l17_n304(x)
+ end
+end
+
+def fun_l16_n453(x)
+ if (x < 1)
+ fun_l17_n150(x)
+ else
+ fun_l17_n503(x)
+ end
+end
+
+def fun_l16_n454(x)
+ if (x < 1)
+ fun_l17_n369(x)
+ else
+ fun_l17_n623(x)
+ end
+end
+
+def fun_l16_n455(x)
+ if (x < 1)
+ fun_l17_n514(x)
+ else
+ fun_l17_n672(x)
+ end
+end
+
+def fun_l16_n456(x)
+ if (x < 1)
+ fun_l17_n80(x)
+ else
+ fun_l17_n332(x)
+ end
+end
+
+def fun_l16_n457(x)
+ if (x < 1)
+ fun_l17_n80(x)
+ else
+ fun_l17_n32(x)
+ end
+end
+
+def fun_l16_n458(x)
+ if (x < 1)
+ fun_l17_n310(x)
+ else
+ fun_l17_n90(x)
+ end
+end
+
+def fun_l16_n459(x)
+ if (x < 1)
+ fun_l17_n730(x)
+ else
+ fun_l17_n170(x)
+ end
+end
+
+def fun_l16_n460(x)
+ if (x < 1)
+ fun_l17_n908(x)
+ else
+ fun_l17_n865(x)
+ end
+end
+
+def fun_l16_n461(x)
+ if (x < 1)
+ fun_l17_n399(x)
+ else
+ fun_l17_n536(x)
+ end
+end
+
+def fun_l16_n462(x)
+ if (x < 1)
+ fun_l17_n123(x)
+ else
+ fun_l17_n216(x)
+ end
+end
+
+def fun_l16_n463(x)
+ if (x < 1)
+ fun_l17_n577(x)
+ else
+ fun_l17_n757(x)
+ end
+end
+
+def fun_l16_n464(x)
+ if (x < 1)
+ fun_l17_n750(x)
+ else
+ fun_l17_n916(x)
+ end
+end
+
+def fun_l16_n465(x)
+ if (x < 1)
+ fun_l17_n621(x)
+ else
+ fun_l17_n386(x)
+ end
+end
+
+def fun_l16_n466(x)
+ if (x < 1)
+ fun_l17_n904(x)
+ else
+ fun_l17_n732(x)
+ end
+end
+
+def fun_l16_n467(x)
+ if (x < 1)
+ fun_l17_n625(x)
+ else
+ fun_l17_n1(x)
+ end
+end
+
+def fun_l16_n468(x)
+ if (x < 1)
+ fun_l17_n762(x)
+ else
+ fun_l17_n373(x)
+ end
+end
+
+def fun_l16_n469(x)
+ if (x < 1)
+ fun_l17_n816(x)
+ else
+ fun_l17_n490(x)
+ end
+end
+
+def fun_l16_n470(x)
+ if (x < 1)
+ fun_l17_n908(x)
+ else
+ fun_l17_n701(x)
+ end
+end
+
+def fun_l16_n471(x)
+ if (x < 1)
+ fun_l17_n690(x)
+ else
+ fun_l17_n374(x)
+ end
+end
+
+def fun_l16_n472(x)
+ if (x < 1)
+ fun_l17_n753(x)
+ else
+ fun_l17_n625(x)
+ end
+end
+
+def fun_l16_n473(x)
+ if (x < 1)
+ fun_l17_n602(x)
+ else
+ fun_l17_n947(x)
+ end
+end
+
+def fun_l16_n474(x)
+ if (x < 1)
+ fun_l17_n565(x)
+ else
+ fun_l17_n320(x)
+ end
+end
+
+def fun_l16_n475(x)
+ if (x < 1)
+ fun_l17_n990(x)
+ else
+ fun_l17_n431(x)
+ end
+end
+
+def fun_l16_n476(x)
+ if (x < 1)
+ fun_l17_n135(x)
+ else
+ fun_l17_n506(x)
+ end
+end
+
+def fun_l16_n477(x)
+ if (x < 1)
+ fun_l17_n57(x)
+ else
+ fun_l17_n944(x)
+ end
+end
+
+def fun_l16_n478(x)
+ if (x < 1)
+ fun_l17_n877(x)
+ else
+ fun_l17_n28(x)
+ end
+end
+
+def fun_l16_n479(x)
+ if (x < 1)
+ fun_l17_n132(x)
+ else
+ fun_l17_n280(x)
+ end
+end
+
+def fun_l16_n480(x)
+ if (x < 1)
+ fun_l17_n514(x)
+ else
+ fun_l17_n51(x)
+ end
+end
+
+def fun_l16_n481(x)
+ if (x < 1)
+ fun_l17_n55(x)
+ else
+ fun_l17_n366(x)
+ end
+end
+
+def fun_l16_n482(x)
+ if (x < 1)
+ fun_l17_n59(x)
+ else
+ fun_l17_n810(x)
+ end
+end
+
+def fun_l16_n483(x)
+ if (x < 1)
+ fun_l17_n965(x)
+ else
+ fun_l17_n55(x)
+ end
+end
+
+def fun_l16_n484(x)
+ if (x < 1)
+ fun_l17_n813(x)
+ else
+ fun_l17_n408(x)
+ end
+end
+
+def fun_l16_n485(x)
+ if (x < 1)
+ fun_l17_n190(x)
+ else
+ fun_l17_n126(x)
+ end
+end
+
+def fun_l16_n486(x)
+ if (x < 1)
+ fun_l17_n479(x)
+ else
+ fun_l17_n964(x)
+ end
+end
+
+def fun_l16_n487(x)
+ if (x < 1)
+ fun_l17_n267(x)
+ else
+ fun_l17_n867(x)
+ end
+end
+
+def fun_l16_n488(x)
+ if (x < 1)
+ fun_l17_n787(x)
+ else
+ fun_l17_n34(x)
+ end
+end
+
+def fun_l16_n489(x)
+ if (x < 1)
+ fun_l17_n223(x)
+ else
+ fun_l17_n568(x)
+ end
+end
+
+def fun_l16_n490(x)
+ if (x < 1)
+ fun_l17_n773(x)
+ else
+ fun_l17_n11(x)
+ end
+end
+
+def fun_l16_n491(x)
+ if (x < 1)
+ fun_l17_n906(x)
+ else
+ fun_l17_n146(x)
+ end
+end
+
+def fun_l16_n492(x)
+ if (x < 1)
+ fun_l17_n221(x)
+ else
+ fun_l17_n136(x)
+ end
+end
+
+def fun_l16_n493(x)
+ if (x < 1)
+ fun_l17_n40(x)
+ else
+ fun_l17_n599(x)
+ end
+end
+
+def fun_l16_n494(x)
+ if (x < 1)
+ fun_l17_n494(x)
+ else
+ fun_l17_n591(x)
+ end
+end
+
+def fun_l16_n495(x)
+ if (x < 1)
+ fun_l17_n237(x)
+ else
+ fun_l17_n149(x)
+ end
+end
+
+def fun_l16_n496(x)
+ if (x < 1)
+ fun_l17_n501(x)
+ else
+ fun_l17_n681(x)
+ end
+end
+
+def fun_l16_n497(x)
+ if (x < 1)
+ fun_l17_n141(x)
+ else
+ fun_l17_n226(x)
+ end
+end
+
+def fun_l16_n498(x)
+ if (x < 1)
+ fun_l17_n868(x)
+ else
+ fun_l17_n837(x)
+ end
+end
+
+def fun_l16_n499(x)
+ if (x < 1)
+ fun_l17_n921(x)
+ else
+ fun_l17_n806(x)
+ end
+end
+
+def fun_l16_n500(x)
+ if (x < 1)
+ fun_l17_n117(x)
+ else
+ fun_l17_n835(x)
+ end
+end
+
+def fun_l16_n501(x)
+ if (x < 1)
+ fun_l17_n872(x)
+ else
+ fun_l17_n567(x)
+ end
+end
+
+def fun_l16_n502(x)
+ if (x < 1)
+ fun_l17_n787(x)
+ else
+ fun_l17_n785(x)
+ end
+end
+
+def fun_l16_n503(x)
+ if (x < 1)
+ fun_l17_n827(x)
+ else
+ fun_l17_n388(x)
+ end
+end
+
+def fun_l16_n504(x)
+ if (x < 1)
+ fun_l17_n328(x)
+ else
+ fun_l17_n849(x)
+ end
+end
+
+def fun_l16_n505(x)
+ if (x < 1)
+ fun_l17_n348(x)
+ else
+ fun_l17_n580(x)
+ end
+end
+
+def fun_l16_n506(x)
+ if (x < 1)
+ fun_l17_n408(x)
+ else
+ fun_l17_n236(x)
+ end
+end
+
+def fun_l16_n507(x)
+ if (x < 1)
+ fun_l17_n959(x)
+ else
+ fun_l17_n739(x)
+ end
+end
+
+def fun_l16_n508(x)
+ if (x < 1)
+ fun_l17_n496(x)
+ else
+ fun_l17_n774(x)
+ end
+end
+
+def fun_l16_n509(x)
+ if (x < 1)
+ fun_l17_n639(x)
+ else
+ fun_l17_n147(x)
+ end
+end
+
+def fun_l16_n510(x)
+ if (x < 1)
+ fun_l17_n910(x)
+ else
+ fun_l17_n697(x)
+ end
+end
+
+def fun_l16_n511(x)
+ if (x < 1)
+ fun_l17_n239(x)
+ else
+ fun_l17_n691(x)
+ end
+end
+
+def fun_l16_n512(x)
+ if (x < 1)
+ fun_l17_n923(x)
+ else
+ fun_l17_n735(x)
+ end
+end
+
+def fun_l16_n513(x)
+ if (x < 1)
+ fun_l17_n911(x)
+ else
+ fun_l17_n372(x)
+ end
+end
+
+def fun_l16_n514(x)
+ if (x < 1)
+ fun_l17_n706(x)
+ else
+ fun_l17_n27(x)
+ end
+end
+
+def fun_l16_n515(x)
+ if (x < 1)
+ fun_l17_n788(x)
+ else
+ fun_l17_n670(x)
+ end
+end
+
+def fun_l16_n516(x)
+ if (x < 1)
+ fun_l17_n507(x)
+ else
+ fun_l17_n330(x)
+ end
+end
+
+def fun_l16_n517(x)
+ if (x < 1)
+ fun_l17_n398(x)
+ else
+ fun_l17_n997(x)
+ end
+end
+
+def fun_l16_n518(x)
+ if (x < 1)
+ fun_l17_n675(x)
+ else
+ fun_l17_n383(x)
+ end
+end
+
+def fun_l16_n519(x)
+ if (x < 1)
+ fun_l17_n193(x)
+ else
+ fun_l17_n611(x)
+ end
+end
+
+def fun_l16_n520(x)
+ if (x < 1)
+ fun_l17_n884(x)
+ else
+ fun_l17_n200(x)
+ end
+end
+
+def fun_l16_n521(x)
+ if (x < 1)
+ fun_l17_n574(x)
+ else
+ fun_l17_n192(x)
+ end
+end
+
+def fun_l16_n522(x)
+ if (x < 1)
+ fun_l17_n883(x)
+ else
+ fun_l17_n399(x)
+ end
+end
+
+def fun_l16_n523(x)
+ if (x < 1)
+ fun_l17_n516(x)
+ else
+ fun_l17_n592(x)
+ end
+end
+
+def fun_l16_n524(x)
+ if (x < 1)
+ fun_l17_n653(x)
+ else
+ fun_l17_n355(x)
+ end
+end
+
+def fun_l16_n525(x)
+ if (x < 1)
+ fun_l17_n872(x)
+ else
+ fun_l17_n714(x)
+ end
+end
+
+def fun_l16_n526(x)
+ if (x < 1)
+ fun_l17_n891(x)
+ else
+ fun_l17_n70(x)
+ end
+end
+
+def fun_l16_n527(x)
+ if (x < 1)
+ fun_l17_n46(x)
+ else
+ fun_l17_n591(x)
+ end
+end
+
+def fun_l16_n528(x)
+ if (x < 1)
+ fun_l17_n969(x)
+ else
+ fun_l17_n289(x)
+ end
+end
+
+def fun_l16_n529(x)
+ if (x < 1)
+ fun_l17_n713(x)
+ else
+ fun_l17_n775(x)
+ end
+end
+
+def fun_l16_n530(x)
+ if (x < 1)
+ fun_l17_n374(x)
+ else
+ fun_l17_n708(x)
+ end
+end
+
+def fun_l16_n531(x)
+ if (x < 1)
+ fun_l17_n996(x)
+ else
+ fun_l17_n764(x)
+ end
+end
+
+def fun_l16_n532(x)
+ if (x < 1)
+ fun_l17_n314(x)
+ else
+ fun_l17_n445(x)
+ end
+end
+
+def fun_l16_n533(x)
+ if (x < 1)
+ fun_l17_n951(x)
+ else
+ fun_l17_n912(x)
+ end
+end
+
+def fun_l16_n534(x)
+ if (x < 1)
+ fun_l17_n760(x)
+ else
+ fun_l17_n445(x)
+ end
+end
+
+def fun_l16_n535(x)
+ if (x < 1)
+ fun_l17_n310(x)
+ else
+ fun_l17_n16(x)
+ end
+end
+
+def fun_l16_n536(x)
+ if (x < 1)
+ fun_l17_n254(x)
+ else
+ fun_l17_n693(x)
+ end
+end
+
+def fun_l16_n537(x)
+ if (x < 1)
+ fun_l17_n631(x)
+ else
+ fun_l17_n934(x)
+ end
+end
+
+def fun_l16_n538(x)
+ if (x < 1)
+ fun_l17_n944(x)
+ else
+ fun_l17_n922(x)
+ end
+end
+
+def fun_l16_n539(x)
+ if (x < 1)
+ fun_l17_n263(x)
+ else
+ fun_l17_n796(x)
+ end
+end
+
+def fun_l16_n540(x)
+ if (x < 1)
+ fun_l17_n928(x)
+ else
+ fun_l17_n604(x)
+ end
+end
+
+def fun_l16_n541(x)
+ if (x < 1)
+ fun_l17_n678(x)
+ else
+ fun_l17_n880(x)
+ end
+end
+
+def fun_l16_n542(x)
+ if (x < 1)
+ fun_l17_n286(x)
+ else
+ fun_l17_n123(x)
+ end
+end
+
+def fun_l16_n543(x)
+ if (x < 1)
+ fun_l17_n604(x)
+ else
+ fun_l17_n57(x)
+ end
+end
+
+def fun_l16_n544(x)
+ if (x < 1)
+ fun_l17_n204(x)
+ else
+ fun_l17_n950(x)
+ end
+end
+
+def fun_l16_n545(x)
+ if (x < 1)
+ fun_l17_n60(x)
+ else
+ fun_l17_n667(x)
+ end
+end
+
+def fun_l16_n546(x)
+ if (x < 1)
+ fun_l17_n472(x)
+ else
+ fun_l17_n818(x)
+ end
+end
+
+def fun_l16_n547(x)
+ if (x < 1)
+ fun_l17_n515(x)
+ else
+ fun_l17_n180(x)
+ end
+end
+
+def fun_l16_n548(x)
+ if (x < 1)
+ fun_l17_n443(x)
+ else
+ fun_l17_n159(x)
+ end
+end
+
+def fun_l16_n549(x)
+ if (x < 1)
+ fun_l17_n820(x)
+ else
+ fun_l17_n468(x)
+ end
+end
+
+def fun_l16_n550(x)
+ if (x < 1)
+ fun_l17_n938(x)
+ else
+ fun_l17_n307(x)
+ end
+end
+
+def fun_l16_n551(x)
+ if (x < 1)
+ fun_l17_n350(x)
+ else
+ fun_l17_n177(x)
+ end
+end
+
+def fun_l16_n552(x)
+ if (x < 1)
+ fun_l17_n761(x)
+ else
+ fun_l17_n35(x)
+ end
+end
+
+def fun_l16_n553(x)
+ if (x < 1)
+ fun_l17_n189(x)
+ else
+ fun_l17_n991(x)
+ end
+end
+
+def fun_l16_n554(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n721(x)
+ end
+end
+
+def fun_l16_n555(x)
+ if (x < 1)
+ fun_l17_n42(x)
+ else
+ fun_l17_n273(x)
+ end
+end
+
+def fun_l16_n556(x)
+ if (x < 1)
+ fun_l17_n261(x)
+ else
+ fun_l17_n328(x)
+ end
+end
+
+def fun_l16_n557(x)
+ if (x < 1)
+ fun_l17_n28(x)
+ else
+ fun_l17_n403(x)
+ end
+end
+
+def fun_l16_n558(x)
+ if (x < 1)
+ fun_l17_n766(x)
+ else
+ fun_l17_n363(x)
+ end
+end
+
+def fun_l16_n559(x)
+ if (x < 1)
+ fun_l17_n35(x)
+ else
+ fun_l17_n648(x)
+ end
+end
+
+def fun_l16_n560(x)
+ if (x < 1)
+ fun_l17_n288(x)
+ else
+ fun_l17_n684(x)
+ end
+end
+
+def fun_l16_n561(x)
+ if (x < 1)
+ fun_l17_n529(x)
+ else
+ fun_l17_n908(x)
+ end
+end
+
+def fun_l16_n562(x)
+ if (x < 1)
+ fun_l17_n244(x)
+ else
+ fun_l17_n342(x)
+ end
+end
+
+def fun_l16_n563(x)
+ if (x < 1)
+ fun_l17_n535(x)
+ else
+ fun_l17_n750(x)
+ end
+end
+
+def fun_l16_n564(x)
+ if (x < 1)
+ fun_l17_n761(x)
+ else
+ fun_l17_n106(x)
+ end
+end
+
+def fun_l16_n565(x)
+ if (x < 1)
+ fun_l17_n236(x)
+ else
+ fun_l17_n95(x)
+ end
+end
+
+def fun_l16_n566(x)
+ if (x < 1)
+ fun_l17_n356(x)
+ else
+ fun_l17_n129(x)
+ end
+end
+
+def fun_l16_n567(x)
+ if (x < 1)
+ fun_l17_n297(x)
+ else
+ fun_l17_n247(x)
+ end
+end
+
+def fun_l16_n568(x)
+ if (x < 1)
+ fun_l17_n735(x)
+ else
+ fun_l17_n781(x)
+ end
+end
+
+def fun_l16_n569(x)
+ if (x < 1)
+ fun_l17_n650(x)
+ else
+ fun_l17_n377(x)
+ end
+end
+
+def fun_l16_n570(x)
+ if (x < 1)
+ fun_l17_n872(x)
+ else
+ fun_l17_n52(x)
+ end
+end
+
+def fun_l16_n571(x)
+ if (x < 1)
+ fun_l17_n970(x)
+ else
+ fun_l17_n719(x)
+ end
+end
+
+def fun_l16_n572(x)
+ if (x < 1)
+ fun_l17_n380(x)
+ else
+ fun_l17_n121(x)
+ end
+end
+
+def fun_l16_n573(x)
+ if (x < 1)
+ fun_l17_n190(x)
+ else
+ fun_l17_n675(x)
+ end
+end
+
+def fun_l16_n574(x)
+ if (x < 1)
+ fun_l17_n269(x)
+ else
+ fun_l17_n362(x)
+ end
+end
+
+def fun_l16_n575(x)
+ if (x < 1)
+ fun_l17_n480(x)
+ else
+ fun_l17_n228(x)
+ end
+end
+
+def fun_l16_n576(x)
+ if (x < 1)
+ fun_l17_n791(x)
+ else
+ fun_l17_n45(x)
+ end
+end
+
+def fun_l16_n577(x)
+ if (x < 1)
+ fun_l17_n403(x)
+ else
+ fun_l17_n887(x)
+ end
+end
+
+def fun_l16_n578(x)
+ if (x < 1)
+ fun_l17_n139(x)
+ else
+ fun_l17_n446(x)
+ end
+end
+
+def fun_l16_n579(x)
+ if (x < 1)
+ fun_l17_n472(x)
+ else
+ fun_l17_n869(x)
+ end
+end
+
+def fun_l16_n580(x)
+ if (x < 1)
+ fun_l17_n738(x)
+ else
+ fun_l17_n298(x)
+ end
+end
+
+def fun_l16_n581(x)
+ if (x < 1)
+ fun_l17_n822(x)
+ else
+ fun_l17_n859(x)
+ end
+end
+
+def fun_l16_n582(x)
+ if (x < 1)
+ fun_l17_n768(x)
+ else
+ fun_l17_n814(x)
+ end
+end
+
+def fun_l16_n583(x)
+ if (x < 1)
+ fun_l17_n892(x)
+ else
+ fun_l17_n821(x)
+ end
+end
+
+def fun_l16_n584(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n276(x)
+ end
+end
+
+def fun_l16_n585(x)
+ if (x < 1)
+ fun_l17_n162(x)
+ else
+ fun_l17_n873(x)
+ end
+end
+
+def fun_l16_n586(x)
+ if (x < 1)
+ fun_l17_n932(x)
+ else
+ fun_l17_n227(x)
+ end
+end
+
+def fun_l16_n587(x)
+ if (x < 1)
+ fun_l17_n105(x)
+ else
+ fun_l17_n620(x)
+ end
+end
+
+def fun_l16_n588(x)
+ if (x < 1)
+ fun_l17_n137(x)
+ else
+ fun_l17_n941(x)
+ end
+end
+
+def fun_l16_n589(x)
+ if (x < 1)
+ fun_l17_n936(x)
+ else
+ fun_l17_n877(x)
+ end
+end
+
+def fun_l16_n590(x)
+ if (x < 1)
+ fun_l17_n280(x)
+ else
+ fun_l17_n711(x)
+ end
+end
+
+def fun_l16_n591(x)
+ if (x < 1)
+ fun_l17_n968(x)
+ else
+ fun_l17_n695(x)
+ end
+end
+
+def fun_l16_n592(x)
+ if (x < 1)
+ fun_l17_n774(x)
+ else
+ fun_l17_n674(x)
+ end
+end
+
+def fun_l16_n593(x)
+ if (x < 1)
+ fun_l17_n421(x)
+ else
+ fun_l17_n516(x)
+ end
+end
+
+def fun_l16_n594(x)
+ if (x < 1)
+ fun_l17_n830(x)
+ else
+ fun_l17_n852(x)
+ end
+end
+
+def fun_l16_n595(x)
+ if (x < 1)
+ fun_l17_n659(x)
+ else
+ fun_l17_n114(x)
+ end
+end
+
+def fun_l16_n596(x)
+ if (x < 1)
+ fun_l17_n411(x)
+ else
+ fun_l17_n217(x)
+ end
+end
+
+def fun_l16_n597(x)
+ if (x < 1)
+ fun_l17_n506(x)
+ else
+ fun_l17_n721(x)
+ end
+end
+
+def fun_l16_n598(x)
+ if (x < 1)
+ fun_l17_n979(x)
+ else
+ fun_l17_n579(x)
+ end
+end
+
+def fun_l16_n599(x)
+ if (x < 1)
+ fun_l17_n423(x)
+ else
+ fun_l17_n765(x)
+ end
+end
+
+def fun_l16_n600(x)
+ if (x < 1)
+ fun_l17_n138(x)
+ else
+ fun_l17_n878(x)
+ end
+end
+
+def fun_l16_n601(x)
+ if (x < 1)
+ fun_l17_n616(x)
+ else
+ fun_l17_n531(x)
+ end
+end
+
+def fun_l16_n602(x)
+ if (x < 1)
+ fun_l17_n737(x)
+ else
+ fun_l17_n936(x)
+ end
+end
+
+def fun_l16_n603(x)
+ if (x < 1)
+ fun_l17_n106(x)
+ else
+ fun_l17_n147(x)
+ end
+end
+
+def fun_l16_n604(x)
+ if (x < 1)
+ fun_l17_n562(x)
+ else
+ fun_l17_n852(x)
+ end
+end
+
+def fun_l16_n605(x)
+ if (x < 1)
+ fun_l17_n473(x)
+ else
+ fun_l17_n771(x)
+ end
+end
+
+def fun_l16_n606(x)
+ if (x < 1)
+ fun_l17_n778(x)
+ else
+ fun_l17_n463(x)
+ end
+end
+
+def fun_l16_n607(x)
+ if (x < 1)
+ fun_l17_n35(x)
+ else
+ fun_l17_n341(x)
+ end
+end
+
+def fun_l16_n608(x)
+ if (x < 1)
+ fun_l17_n268(x)
+ else
+ fun_l17_n659(x)
+ end
+end
+
+def fun_l16_n609(x)
+ if (x < 1)
+ fun_l17_n734(x)
+ else
+ fun_l17_n174(x)
+ end
+end
+
+def fun_l16_n610(x)
+ if (x < 1)
+ fun_l17_n815(x)
+ else
+ fun_l17_n798(x)
+ end
+end
+
+def fun_l16_n611(x)
+ if (x < 1)
+ fun_l17_n251(x)
+ else
+ fun_l17_n694(x)
+ end
+end
+
+def fun_l16_n612(x)
+ if (x < 1)
+ fun_l17_n597(x)
+ else
+ fun_l17_n245(x)
+ end
+end
+
+def fun_l16_n613(x)
+ if (x < 1)
+ fun_l17_n990(x)
+ else
+ fun_l17_n58(x)
+ end
+end
+
+def fun_l16_n614(x)
+ if (x < 1)
+ fun_l17_n877(x)
+ else
+ fun_l17_n13(x)
+ end
+end
+
+def fun_l16_n615(x)
+ if (x < 1)
+ fun_l17_n7(x)
+ else
+ fun_l17_n787(x)
+ end
+end
+
+def fun_l16_n616(x)
+ if (x < 1)
+ fun_l17_n372(x)
+ else
+ fun_l17_n643(x)
+ end
+end
+
+def fun_l16_n617(x)
+ if (x < 1)
+ fun_l17_n592(x)
+ else
+ fun_l17_n508(x)
+ end
+end
+
+def fun_l16_n618(x)
+ if (x < 1)
+ fun_l17_n928(x)
+ else
+ fun_l17_n923(x)
+ end
+end
+
+def fun_l16_n619(x)
+ if (x < 1)
+ fun_l17_n407(x)
+ else
+ fun_l17_n885(x)
+ end
+end
+
+def fun_l16_n620(x)
+ if (x < 1)
+ fun_l17_n4(x)
+ else
+ fun_l17_n532(x)
+ end
+end
+
+def fun_l16_n621(x)
+ if (x < 1)
+ fun_l17_n791(x)
+ else
+ fun_l17_n141(x)
+ end
+end
+
+def fun_l16_n622(x)
+ if (x < 1)
+ fun_l17_n529(x)
+ else
+ fun_l17_n140(x)
+ end
+end
+
+def fun_l16_n623(x)
+ if (x < 1)
+ fun_l17_n713(x)
+ else
+ fun_l17_n867(x)
+ end
+end
+
+def fun_l16_n624(x)
+ if (x < 1)
+ fun_l17_n148(x)
+ else
+ fun_l17_n195(x)
+ end
+end
+
+def fun_l16_n625(x)
+ if (x < 1)
+ fun_l17_n287(x)
+ else
+ fun_l17_n662(x)
+ end
+end
+
+def fun_l16_n626(x)
+ if (x < 1)
+ fun_l17_n678(x)
+ else
+ fun_l17_n262(x)
+ end
+end
+
+def fun_l16_n627(x)
+ if (x < 1)
+ fun_l17_n217(x)
+ else
+ fun_l17_n612(x)
+ end
+end
+
+def fun_l16_n628(x)
+ if (x < 1)
+ fun_l17_n826(x)
+ else
+ fun_l17_n164(x)
+ end
+end
+
+def fun_l16_n629(x)
+ if (x < 1)
+ fun_l17_n360(x)
+ else
+ fun_l17_n221(x)
+ end
+end
+
+def fun_l16_n630(x)
+ if (x < 1)
+ fun_l17_n842(x)
+ else
+ fun_l17_n362(x)
+ end
+end
+
+def fun_l16_n631(x)
+ if (x < 1)
+ fun_l17_n53(x)
+ else
+ fun_l17_n216(x)
+ end
+end
+
+def fun_l16_n632(x)
+ if (x < 1)
+ fun_l17_n628(x)
+ else
+ fun_l17_n150(x)
+ end
+end
+
+def fun_l16_n633(x)
+ if (x < 1)
+ fun_l17_n206(x)
+ else
+ fun_l17_n789(x)
+ end
+end
+
+def fun_l16_n634(x)
+ if (x < 1)
+ fun_l17_n26(x)
+ else
+ fun_l17_n376(x)
+ end
+end
+
+def fun_l16_n635(x)
+ if (x < 1)
+ fun_l17_n614(x)
+ else
+ fun_l17_n109(x)
+ end
+end
+
+def fun_l16_n636(x)
+ if (x < 1)
+ fun_l17_n626(x)
+ else
+ fun_l17_n456(x)
+ end
+end
+
+def fun_l16_n637(x)
+ if (x < 1)
+ fun_l17_n836(x)
+ else
+ fun_l17_n602(x)
+ end
+end
+
+def fun_l16_n638(x)
+ if (x < 1)
+ fun_l17_n793(x)
+ else
+ fun_l17_n791(x)
+ end
+end
+
+def fun_l16_n639(x)
+ if (x < 1)
+ fun_l17_n689(x)
+ else
+ fun_l17_n714(x)
+ end
+end
+
+def fun_l16_n640(x)
+ if (x < 1)
+ fun_l17_n587(x)
+ else
+ fun_l17_n203(x)
+ end
+end
+
+def fun_l16_n641(x)
+ if (x < 1)
+ fun_l17_n686(x)
+ else
+ fun_l17_n297(x)
+ end
+end
+
+def fun_l16_n642(x)
+ if (x < 1)
+ fun_l17_n394(x)
+ else
+ fun_l17_n564(x)
+ end
+end
+
+def fun_l16_n643(x)
+ if (x < 1)
+ fun_l17_n669(x)
+ else
+ fun_l17_n250(x)
+ end
+end
+
+def fun_l16_n644(x)
+ if (x < 1)
+ fun_l17_n407(x)
+ else
+ fun_l17_n631(x)
+ end
+end
+
+def fun_l16_n645(x)
+ if (x < 1)
+ fun_l17_n928(x)
+ else
+ fun_l17_n856(x)
+ end
+end
+
+def fun_l16_n646(x)
+ if (x < 1)
+ fun_l17_n344(x)
+ else
+ fun_l17_n529(x)
+ end
+end
+
+def fun_l16_n647(x)
+ if (x < 1)
+ fun_l17_n540(x)
+ else
+ fun_l17_n468(x)
+ end
+end
+
+def fun_l16_n648(x)
+ if (x < 1)
+ fun_l17_n831(x)
+ else
+ fun_l17_n350(x)
+ end
+end
+
+def fun_l16_n649(x)
+ if (x < 1)
+ fun_l17_n154(x)
+ else
+ fun_l17_n587(x)
+ end
+end
+
+def fun_l16_n650(x)
+ if (x < 1)
+ fun_l17_n379(x)
+ else
+ fun_l17_n421(x)
+ end
+end
+
+def fun_l16_n651(x)
+ if (x < 1)
+ fun_l17_n839(x)
+ else
+ fun_l17_n782(x)
+ end
+end
+
+def fun_l16_n652(x)
+ if (x < 1)
+ fun_l17_n408(x)
+ else
+ fun_l17_n923(x)
+ end
+end
+
+def fun_l16_n653(x)
+ if (x < 1)
+ fun_l17_n51(x)
+ else
+ fun_l17_n317(x)
+ end
+end
+
+def fun_l16_n654(x)
+ if (x < 1)
+ fun_l17_n635(x)
+ else
+ fun_l17_n39(x)
+ end
+end
+
+def fun_l16_n655(x)
+ if (x < 1)
+ fun_l17_n921(x)
+ else
+ fun_l17_n641(x)
+ end
+end
+
+def fun_l16_n656(x)
+ if (x < 1)
+ fun_l17_n615(x)
+ else
+ fun_l17_n118(x)
+ end
+end
+
+def fun_l16_n657(x)
+ if (x < 1)
+ fun_l17_n673(x)
+ else
+ fun_l17_n842(x)
+ end
+end
+
+def fun_l16_n658(x)
+ if (x < 1)
+ fun_l17_n743(x)
+ else
+ fun_l17_n594(x)
+ end
+end
+
+def fun_l16_n659(x)
+ if (x < 1)
+ fun_l17_n85(x)
+ else
+ fun_l17_n787(x)
+ end
+end
+
+def fun_l16_n660(x)
+ if (x < 1)
+ fun_l17_n363(x)
+ else
+ fun_l17_n830(x)
+ end
+end
+
+def fun_l16_n661(x)
+ if (x < 1)
+ fun_l17_n897(x)
+ else
+ fun_l17_n989(x)
+ end
+end
+
+def fun_l16_n662(x)
+ if (x < 1)
+ fun_l17_n644(x)
+ else
+ fun_l17_n924(x)
+ end
+end
+
+def fun_l16_n663(x)
+ if (x < 1)
+ fun_l17_n812(x)
+ else
+ fun_l17_n159(x)
+ end
+end
+
+def fun_l16_n664(x)
+ if (x < 1)
+ fun_l17_n937(x)
+ else
+ fun_l17_n720(x)
+ end
+end
+
+def fun_l16_n665(x)
+ if (x < 1)
+ fun_l17_n732(x)
+ else
+ fun_l17_n516(x)
+ end
+end
+
+def fun_l16_n666(x)
+ if (x < 1)
+ fun_l17_n399(x)
+ else
+ fun_l17_n728(x)
+ end
+end
+
+def fun_l16_n667(x)
+ if (x < 1)
+ fun_l17_n673(x)
+ else
+ fun_l17_n735(x)
+ end
+end
+
+def fun_l16_n668(x)
+ if (x < 1)
+ fun_l17_n321(x)
+ else
+ fun_l17_n850(x)
+ end
+end
+
+def fun_l16_n669(x)
+ if (x < 1)
+ fun_l17_n873(x)
+ else
+ fun_l17_n701(x)
+ end
+end
+
+def fun_l16_n670(x)
+ if (x < 1)
+ fun_l17_n683(x)
+ else
+ fun_l17_n903(x)
+ end
+end
+
+def fun_l16_n671(x)
+ if (x < 1)
+ fun_l17_n440(x)
+ else
+ fun_l17_n178(x)
+ end
+end
+
+def fun_l16_n672(x)
+ if (x < 1)
+ fun_l17_n619(x)
+ else
+ fun_l17_n785(x)
+ end
+end
+
+def fun_l16_n673(x)
+ if (x < 1)
+ fun_l17_n185(x)
+ else
+ fun_l17_n794(x)
+ end
+end
+
+def fun_l16_n674(x)
+ if (x < 1)
+ fun_l17_n543(x)
+ else
+ fun_l17_n161(x)
+ end
+end
+
+def fun_l16_n675(x)
+ if (x < 1)
+ fun_l17_n898(x)
+ else
+ fun_l17_n590(x)
+ end
+end
+
+def fun_l16_n676(x)
+ if (x < 1)
+ fun_l17_n471(x)
+ else
+ fun_l17_n66(x)
+ end
+end
+
+def fun_l16_n677(x)
+ if (x < 1)
+ fun_l17_n764(x)
+ else
+ fun_l17_n163(x)
+ end
+end
+
+def fun_l16_n678(x)
+ if (x < 1)
+ fun_l17_n290(x)
+ else
+ fun_l17_n353(x)
+ end
+end
+
+def fun_l16_n679(x)
+ if (x < 1)
+ fun_l17_n851(x)
+ else
+ fun_l17_n7(x)
+ end
+end
+
+def fun_l16_n680(x)
+ if (x < 1)
+ fun_l17_n741(x)
+ else
+ fun_l17_n180(x)
+ end
+end
+
+def fun_l16_n681(x)
+ if (x < 1)
+ fun_l17_n887(x)
+ else
+ fun_l17_n258(x)
+ end
+end
+
+def fun_l16_n682(x)
+ if (x < 1)
+ fun_l17_n536(x)
+ else
+ fun_l17_n84(x)
+ end
+end
+
+def fun_l16_n683(x)
+ if (x < 1)
+ fun_l17_n447(x)
+ else
+ fun_l17_n455(x)
+ end
+end
+
+def fun_l16_n684(x)
+ if (x < 1)
+ fun_l17_n23(x)
+ else
+ fun_l17_n47(x)
+ end
+end
+
+def fun_l16_n685(x)
+ if (x < 1)
+ fun_l17_n983(x)
+ else
+ fun_l17_n470(x)
+ end
+end
+
+def fun_l16_n686(x)
+ if (x < 1)
+ fun_l17_n261(x)
+ else
+ fun_l17_n138(x)
+ end
+end
+
+def fun_l16_n687(x)
+ if (x < 1)
+ fun_l17_n791(x)
+ else
+ fun_l17_n474(x)
+ end
+end
+
+def fun_l16_n688(x)
+ if (x < 1)
+ fun_l17_n148(x)
+ else
+ fun_l17_n317(x)
+ end
+end
+
+def fun_l16_n689(x)
+ if (x < 1)
+ fun_l17_n107(x)
+ else
+ fun_l17_n529(x)
+ end
+end
+
+def fun_l16_n690(x)
+ if (x < 1)
+ fun_l17_n310(x)
+ else
+ fun_l17_n394(x)
+ end
+end
+
+def fun_l16_n691(x)
+ if (x < 1)
+ fun_l17_n193(x)
+ else
+ fun_l17_n348(x)
+ end
+end
+
+def fun_l16_n692(x)
+ if (x < 1)
+ fun_l17_n308(x)
+ else
+ fun_l17_n26(x)
+ end
+end
+
+def fun_l16_n693(x)
+ if (x < 1)
+ fun_l17_n502(x)
+ else
+ fun_l17_n517(x)
+ end
+end
+
+def fun_l16_n694(x)
+ if (x < 1)
+ fun_l17_n396(x)
+ else
+ fun_l17_n886(x)
+ end
+end
+
+def fun_l16_n695(x)
+ if (x < 1)
+ fun_l17_n179(x)
+ else
+ fun_l17_n35(x)
+ end
+end
+
+def fun_l16_n696(x)
+ if (x < 1)
+ fun_l17_n431(x)
+ else
+ fun_l17_n392(x)
+ end
+end
+
+def fun_l16_n697(x)
+ if (x < 1)
+ fun_l17_n778(x)
+ else
+ fun_l17_n766(x)
+ end
+end
+
+def fun_l16_n698(x)
+ if (x < 1)
+ fun_l17_n868(x)
+ else
+ fun_l17_n31(x)
+ end
+end
+
+def fun_l16_n699(x)
+ if (x < 1)
+ fun_l17_n277(x)
+ else
+ fun_l17_n649(x)
+ end
+end
+
+def fun_l16_n700(x)
+ if (x < 1)
+ fun_l17_n638(x)
+ else
+ fun_l17_n411(x)
+ end
+end
+
+def fun_l16_n701(x)
+ if (x < 1)
+ fun_l17_n730(x)
+ else
+ fun_l17_n188(x)
+ end
+end
+
+def fun_l16_n702(x)
+ if (x < 1)
+ fun_l17_n530(x)
+ else
+ fun_l17_n540(x)
+ end
+end
+
+def fun_l16_n703(x)
+ if (x < 1)
+ fun_l17_n691(x)
+ else
+ fun_l17_n550(x)
+ end
+end
+
+def fun_l16_n704(x)
+ if (x < 1)
+ fun_l17_n691(x)
+ else
+ fun_l17_n25(x)
+ end
+end
+
+def fun_l16_n705(x)
+ if (x < 1)
+ fun_l17_n744(x)
+ else
+ fun_l17_n333(x)
+ end
+end
+
+def fun_l16_n706(x)
+ if (x < 1)
+ fun_l17_n845(x)
+ else
+ fun_l17_n229(x)
+ end
+end
+
+def fun_l16_n707(x)
+ if (x < 1)
+ fun_l17_n784(x)
+ else
+ fun_l17_n123(x)
+ end
+end
+
+def fun_l16_n708(x)
+ if (x < 1)
+ fun_l17_n88(x)
+ else
+ fun_l17_n961(x)
+ end
+end
+
+def fun_l16_n709(x)
+ if (x < 1)
+ fun_l17_n310(x)
+ else
+ fun_l17_n943(x)
+ end
+end
+
+def fun_l16_n710(x)
+ if (x < 1)
+ fun_l17_n265(x)
+ else
+ fun_l17_n958(x)
+ end
+end
+
+def fun_l16_n711(x)
+ if (x < 1)
+ fun_l17_n483(x)
+ else
+ fun_l17_n577(x)
+ end
+end
+
+def fun_l16_n712(x)
+ if (x < 1)
+ fun_l17_n703(x)
+ else
+ fun_l17_n625(x)
+ end
+end
+
+def fun_l16_n713(x)
+ if (x < 1)
+ fun_l17_n301(x)
+ else
+ fun_l17_n17(x)
+ end
+end
+
+def fun_l16_n714(x)
+ if (x < 1)
+ fun_l17_n455(x)
+ else
+ fun_l17_n647(x)
+ end
+end
+
+def fun_l16_n715(x)
+ if (x < 1)
+ fun_l17_n628(x)
+ else
+ fun_l17_n748(x)
+ end
+end
+
+def fun_l16_n716(x)
+ if (x < 1)
+ fun_l17_n10(x)
+ else
+ fun_l17_n632(x)
+ end
+end
+
+def fun_l16_n717(x)
+ if (x < 1)
+ fun_l17_n82(x)
+ else
+ fun_l17_n888(x)
+ end
+end
+
+def fun_l16_n718(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n554(x)
+ end
+end
+
+def fun_l16_n719(x)
+ if (x < 1)
+ fun_l17_n811(x)
+ else
+ fun_l17_n46(x)
+ end
+end
+
+def fun_l16_n720(x)
+ if (x < 1)
+ fun_l17_n227(x)
+ else
+ fun_l17_n89(x)
+ end
+end
+
+def fun_l16_n721(x)
+ if (x < 1)
+ fun_l17_n780(x)
+ else
+ fun_l17_n941(x)
+ end
+end
+
+def fun_l16_n722(x)
+ if (x < 1)
+ fun_l17_n877(x)
+ else
+ fun_l17_n262(x)
+ end
+end
+
+def fun_l16_n723(x)
+ if (x < 1)
+ fun_l17_n649(x)
+ else
+ fun_l17_n477(x)
+ end
+end
+
+def fun_l16_n724(x)
+ if (x < 1)
+ fun_l17_n902(x)
+ else
+ fun_l17_n315(x)
+ end
+end
+
+def fun_l16_n725(x)
+ if (x < 1)
+ fun_l17_n985(x)
+ else
+ fun_l17_n232(x)
+ end
+end
+
+def fun_l16_n726(x)
+ if (x < 1)
+ fun_l17_n5(x)
+ else
+ fun_l17_n981(x)
+ end
+end
+
+def fun_l16_n727(x)
+ if (x < 1)
+ fun_l17_n730(x)
+ else
+ fun_l17_n780(x)
+ end
+end
+
+def fun_l16_n728(x)
+ if (x < 1)
+ fun_l17_n626(x)
+ else
+ fun_l17_n272(x)
+ end
+end
+
+def fun_l16_n729(x)
+ if (x < 1)
+ fun_l17_n380(x)
+ else
+ fun_l17_n289(x)
+ end
+end
+
+def fun_l16_n730(x)
+ if (x < 1)
+ fun_l17_n711(x)
+ else
+ fun_l17_n861(x)
+ end
+end
+
+def fun_l16_n731(x)
+ if (x < 1)
+ fun_l17_n351(x)
+ else
+ fun_l17_n948(x)
+ end
+end
+
+def fun_l16_n732(x)
+ if (x < 1)
+ fun_l17_n864(x)
+ else
+ fun_l17_n60(x)
+ end
+end
+
+def fun_l16_n733(x)
+ if (x < 1)
+ fun_l17_n974(x)
+ else
+ fun_l17_n475(x)
+ end
+end
+
+def fun_l16_n734(x)
+ if (x < 1)
+ fun_l17_n855(x)
+ else
+ fun_l17_n988(x)
+ end
+end
+
+def fun_l16_n735(x)
+ if (x < 1)
+ fun_l17_n740(x)
+ else
+ fun_l17_n559(x)
+ end
+end
+
+def fun_l16_n736(x)
+ if (x < 1)
+ fun_l17_n449(x)
+ else
+ fun_l17_n580(x)
+ end
+end
+
+def fun_l16_n737(x)
+ if (x < 1)
+ fun_l17_n313(x)
+ else
+ fun_l17_n462(x)
+ end
+end
+
+def fun_l16_n738(x)
+ if (x < 1)
+ fun_l17_n177(x)
+ else
+ fun_l17_n812(x)
+ end
+end
+
+def fun_l16_n739(x)
+ if (x < 1)
+ fun_l17_n518(x)
+ else
+ fun_l17_n453(x)
+ end
+end
+
+def fun_l16_n740(x)
+ if (x < 1)
+ fun_l17_n190(x)
+ else
+ fun_l17_n722(x)
+ end
+end
+
+def fun_l16_n741(x)
+ if (x < 1)
+ fun_l17_n509(x)
+ else
+ fun_l17_n203(x)
+ end
+end
+
+def fun_l16_n742(x)
+ if (x < 1)
+ fun_l17_n901(x)
+ else
+ fun_l17_n497(x)
+ end
+end
+
+def fun_l16_n743(x)
+ if (x < 1)
+ fun_l17_n19(x)
+ else
+ fun_l17_n789(x)
+ end
+end
+
+def fun_l16_n744(x)
+ if (x < 1)
+ fun_l17_n879(x)
+ else
+ fun_l17_n554(x)
+ end
+end
+
+def fun_l16_n745(x)
+ if (x < 1)
+ fun_l17_n106(x)
+ else
+ fun_l17_n255(x)
+ end
+end
+
+def fun_l16_n746(x)
+ if (x < 1)
+ fun_l17_n942(x)
+ else
+ fun_l17_n701(x)
+ end
+end
+
+def fun_l16_n747(x)
+ if (x < 1)
+ fun_l17_n738(x)
+ else
+ fun_l17_n459(x)
+ end
+end
+
+def fun_l16_n748(x)
+ if (x < 1)
+ fun_l17_n984(x)
+ else
+ fun_l17_n501(x)
+ end
+end
+
+def fun_l16_n749(x)
+ if (x < 1)
+ fun_l17_n399(x)
+ else
+ fun_l17_n165(x)
+ end
+end
+
+def fun_l16_n750(x)
+ if (x < 1)
+ fun_l17_n956(x)
+ else
+ fun_l17_n210(x)
+ end
+end
+
+def fun_l16_n751(x)
+ if (x < 1)
+ fun_l17_n549(x)
+ else
+ fun_l17_n406(x)
+ end
+end
+
+def fun_l16_n752(x)
+ if (x < 1)
+ fun_l17_n671(x)
+ else
+ fun_l17_n809(x)
+ end
+end
+
+def fun_l16_n753(x)
+ if (x < 1)
+ fun_l17_n807(x)
+ else
+ fun_l17_n544(x)
+ end
+end
+
+def fun_l16_n754(x)
+ if (x < 1)
+ fun_l17_n150(x)
+ else
+ fun_l17_n705(x)
+ end
+end
+
+def fun_l16_n755(x)
+ if (x < 1)
+ fun_l17_n822(x)
+ else
+ fun_l17_n627(x)
+ end
+end
+
+def fun_l16_n756(x)
+ if (x < 1)
+ fun_l17_n429(x)
+ else
+ fun_l17_n598(x)
+ end
+end
+
+def fun_l16_n757(x)
+ if (x < 1)
+ fun_l17_n327(x)
+ else
+ fun_l17_n391(x)
+ end
+end
+
+def fun_l16_n758(x)
+ if (x < 1)
+ fun_l17_n335(x)
+ else
+ fun_l17_n779(x)
+ end
+end
+
+def fun_l16_n759(x)
+ if (x < 1)
+ fun_l17_n149(x)
+ else
+ fun_l17_n637(x)
+ end
+end
+
+def fun_l16_n760(x)
+ if (x < 1)
+ fun_l17_n83(x)
+ else
+ fun_l17_n616(x)
+ end
+end
+
+def fun_l16_n761(x)
+ if (x < 1)
+ fun_l17_n997(x)
+ else
+ fun_l17_n189(x)
+ end
+end
+
+def fun_l16_n762(x)
+ if (x < 1)
+ fun_l17_n779(x)
+ else
+ fun_l17_n175(x)
+ end
+end
+
+def fun_l16_n763(x)
+ if (x < 1)
+ fun_l17_n73(x)
+ else
+ fun_l17_n473(x)
+ end
+end
+
+def fun_l16_n764(x)
+ if (x < 1)
+ fun_l17_n784(x)
+ else
+ fun_l17_n415(x)
+ end
+end
+
+def fun_l16_n765(x)
+ if (x < 1)
+ fun_l17_n809(x)
+ else
+ fun_l17_n263(x)
+ end
+end
+
+def fun_l16_n766(x)
+ if (x < 1)
+ fun_l17_n114(x)
+ else
+ fun_l17_n898(x)
+ end
+end
+
+def fun_l16_n767(x)
+ if (x < 1)
+ fun_l17_n983(x)
+ else
+ fun_l17_n114(x)
+ end
+end
+
+def fun_l16_n768(x)
+ if (x < 1)
+ fun_l17_n141(x)
+ else
+ fun_l17_n492(x)
+ end
+end
+
+def fun_l16_n769(x)
+ if (x < 1)
+ fun_l17_n216(x)
+ else
+ fun_l17_n610(x)
+ end
+end
+
+def fun_l16_n770(x)
+ if (x < 1)
+ fun_l17_n797(x)
+ else
+ fun_l17_n164(x)
+ end
+end
+
+def fun_l16_n771(x)
+ if (x < 1)
+ fun_l17_n434(x)
+ else
+ fun_l17_n876(x)
+ end
+end
+
+def fun_l16_n772(x)
+ if (x < 1)
+ fun_l17_n165(x)
+ else
+ fun_l17_n646(x)
+ end
+end
+
+def fun_l16_n773(x)
+ if (x < 1)
+ fun_l17_n359(x)
+ else
+ fun_l17_n754(x)
+ end
+end
+
+def fun_l16_n774(x)
+ if (x < 1)
+ fun_l17_n314(x)
+ else
+ fun_l17_n745(x)
+ end
+end
+
+def fun_l16_n775(x)
+ if (x < 1)
+ fun_l17_n35(x)
+ else
+ fun_l17_n673(x)
+ end
+end
+
+def fun_l16_n776(x)
+ if (x < 1)
+ fun_l17_n51(x)
+ else
+ fun_l17_n708(x)
+ end
+end
+
+def fun_l16_n777(x)
+ if (x < 1)
+ fun_l17_n451(x)
+ else
+ fun_l17_n30(x)
+ end
+end
+
+def fun_l16_n778(x)
+ if (x < 1)
+ fun_l17_n821(x)
+ else
+ fun_l17_n114(x)
+ end
+end
+
+def fun_l16_n779(x)
+ if (x < 1)
+ fun_l17_n727(x)
+ else
+ fun_l17_n71(x)
+ end
+end
+
+def fun_l16_n780(x)
+ if (x < 1)
+ fun_l17_n404(x)
+ else
+ fun_l17_n42(x)
+ end
+end
+
+def fun_l16_n781(x)
+ if (x < 1)
+ fun_l17_n926(x)
+ else
+ fun_l17_n53(x)
+ end
+end
+
+def fun_l16_n782(x)
+ if (x < 1)
+ fun_l17_n499(x)
+ else
+ fun_l17_n429(x)
+ end
+end
+
+def fun_l16_n783(x)
+ if (x < 1)
+ fun_l17_n887(x)
+ else
+ fun_l17_n912(x)
+ end
+end
+
+def fun_l16_n784(x)
+ if (x < 1)
+ fun_l17_n900(x)
+ else
+ fun_l17_n163(x)
+ end
+end
+
+def fun_l16_n785(x)
+ if (x < 1)
+ fun_l17_n589(x)
+ else
+ fun_l17_n271(x)
+ end
+end
+
+def fun_l16_n786(x)
+ if (x < 1)
+ fun_l17_n732(x)
+ else
+ fun_l17_n296(x)
+ end
+end
+
+def fun_l16_n787(x)
+ if (x < 1)
+ fun_l17_n711(x)
+ else
+ fun_l17_n777(x)
+ end
+end
+
+def fun_l16_n788(x)
+ if (x < 1)
+ fun_l17_n426(x)
+ else
+ fun_l17_n291(x)
+ end
+end
+
+def fun_l16_n789(x)
+ if (x < 1)
+ fun_l17_n833(x)
+ else
+ fun_l17_n958(x)
+ end
+end
+
+def fun_l16_n790(x)
+ if (x < 1)
+ fun_l17_n680(x)
+ else
+ fun_l17_n707(x)
+ end
+end
+
+def fun_l16_n791(x)
+ if (x < 1)
+ fun_l17_n668(x)
+ else
+ fun_l17_n727(x)
+ end
+end
+
+def fun_l16_n792(x)
+ if (x < 1)
+ fun_l17_n948(x)
+ else
+ fun_l17_n160(x)
+ end
+end
+
+def fun_l16_n793(x)
+ if (x < 1)
+ fun_l17_n847(x)
+ else
+ fun_l17_n643(x)
+ end
+end
+
+def fun_l16_n794(x)
+ if (x < 1)
+ fun_l17_n89(x)
+ else
+ fun_l17_n704(x)
+ end
+end
+
+def fun_l16_n795(x)
+ if (x < 1)
+ fun_l17_n52(x)
+ else
+ fun_l17_n307(x)
+ end
+end
+
+def fun_l16_n796(x)
+ if (x < 1)
+ fun_l17_n632(x)
+ else
+ fun_l17_n839(x)
+ end
+end
+
+def fun_l16_n797(x)
+ if (x < 1)
+ fun_l17_n343(x)
+ else
+ fun_l17_n969(x)
+ end
+end
+
+def fun_l16_n798(x)
+ if (x < 1)
+ fun_l17_n850(x)
+ else
+ fun_l17_n975(x)
+ end
+end
+
+def fun_l16_n799(x)
+ if (x < 1)
+ fun_l17_n119(x)
+ else
+ fun_l17_n303(x)
+ end
+end
+
+def fun_l16_n800(x)
+ if (x < 1)
+ fun_l17_n870(x)
+ else
+ fun_l17_n4(x)
+ end
+end
+
+def fun_l16_n801(x)
+ if (x < 1)
+ fun_l17_n223(x)
+ else
+ fun_l17_n618(x)
+ end
+end
+
+def fun_l16_n802(x)
+ if (x < 1)
+ fun_l17_n183(x)
+ else
+ fun_l17_n358(x)
+ end
+end
+
+def fun_l16_n803(x)
+ if (x < 1)
+ fun_l17_n152(x)
+ else
+ fun_l17_n76(x)
+ end
+end
+
+def fun_l16_n804(x)
+ if (x < 1)
+ fun_l17_n487(x)
+ else
+ fun_l17_n475(x)
+ end
+end
+
+def fun_l16_n805(x)
+ if (x < 1)
+ fun_l17_n900(x)
+ else
+ fun_l17_n786(x)
+ end
+end
+
+def fun_l16_n806(x)
+ if (x < 1)
+ fun_l17_n881(x)
+ else
+ fun_l17_n523(x)
+ end
+end
+
+def fun_l16_n807(x)
+ if (x < 1)
+ fun_l17_n686(x)
+ else
+ fun_l17_n5(x)
+ end
+end
+
+def fun_l16_n808(x)
+ if (x < 1)
+ fun_l17_n841(x)
+ else
+ fun_l17_n73(x)
+ end
+end
+
+def fun_l16_n809(x)
+ if (x < 1)
+ fun_l17_n737(x)
+ else
+ fun_l17_n590(x)
+ end
+end
+
+def fun_l16_n810(x)
+ if (x < 1)
+ fun_l17_n252(x)
+ else
+ fun_l17_n867(x)
+ end
+end
+
+def fun_l16_n811(x)
+ if (x < 1)
+ fun_l17_n333(x)
+ else
+ fun_l17_n418(x)
+ end
+end
+
+def fun_l16_n812(x)
+ if (x < 1)
+ fun_l17_n155(x)
+ else
+ fun_l17_n104(x)
+ end
+end
+
+def fun_l16_n813(x)
+ if (x < 1)
+ fun_l17_n933(x)
+ else
+ fun_l17_n344(x)
+ end
+end
+
+def fun_l16_n814(x)
+ if (x < 1)
+ fun_l17_n107(x)
+ else
+ fun_l17_n784(x)
+ end
+end
+
+def fun_l16_n815(x)
+ if (x < 1)
+ fun_l17_n355(x)
+ else
+ fun_l17_n184(x)
+ end
+end
+
+def fun_l16_n816(x)
+ if (x < 1)
+ fun_l17_n266(x)
+ else
+ fun_l17_n315(x)
+ end
+end
+
+def fun_l16_n817(x)
+ if (x < 1)
+ fun_l17_n821(x)
+ else
+ fun_l17_n534(x)
+ end
+end
+
+def fun_l16_n818(x)
+ if (x < 1)
+ fun_l17_n126(x)
+ else
+ fun_l17_n712(x)
+ end
+end
+
+def fun_l16_n819(x)
+ if (x < 1)
+ fun_l17_n309(x)
+ else
+ fun_l17_n39(x)
+ end
+end
+
+def fun_l16_n820(x)
+ if (x < 1)
+ fun_l17_n629(x)
+ else
+ fun_l17_n689(x)
+ end
+end
+
+def fun_l16_n821(x)
+ if (x < 1)
+ fun_l17_n35(x)
+ else
+ fun_l17_n250(x)
+ end
+end
+
+def fun_l16_n822(x)
+ if (x < 1)
+ fun_l17_n276(x)
+ else
+ fun_l17_n350(x)
+ end
+end
+
+def fun_l16_n823(x)
+ if (x < 1)
+ fun_l17_n775(x)
+ else
+ fun_l17_n542(x)
+ end
+end
+
+def fun_l16_n824(x)
+ if (x < 1)
+ fun_l17_n739(x)
+ else
+ fun_l17_n441(x)
+ end
+end
+
+def fun_l16_n825(x)
+ if (x < 1)
+ fun_l17_n86(x)
+ else
+ fun_l17_n360(x)
+ end
+end
+
+def fun_l16_n826(x)
+ if (x < 1)
+ fun_l17_n196(x)
+ else
+ fun_l17_n406(x)
+ end
+end
+
+def fun_l16_n827(x)
+ if (x < 1)
+ fun_l17_n612(x)
+ else
+ fun_l17_n471(x)
+ end
+end
+
+def fun_l16_n828(x)
+ if (x < 1)
+ fun_l17_n409(x)
+ else
+ fun_l17_n572(x)
+ end
+end
+
+def fun_l16_n829(x)
+ if (x < 1)
+ fun_l17_n347(x)
+ else
+ fun_l17_n450(x)
+ end
+end
+
+def fun_l16_n830(x)
+ if (x < 1)
+ fun_l17_n75(x)
+ else
+ fun_l17_n185(x)
+ end
+end
+
+def fun_l16_n831(x)
+ if (x < 1)
+ fun_l17_n904(x)
+ else
+ fun_l17_n894(x)
+ end
+end
+
+def fun_l16_n832(x)
+ if (x < 1)
+ fun_l17_n889(x)
+ else
+ fun_l17_n651(x)
+ end
+end
+
+def fun_l16_n833(x)
+ if (x < 1)
+ fun_l17_n670(x)
+ else
+ fun_l17_n216(x)
+ end
+end
+
+def fun_l16_n834(x)
+ if (x < 1)
+ fun_l17_n212(x)
+ else
+ fun_l17_n445(x)
+ end
+end
+
+def fun_l16_n835(x)
+ if (x < 1)
+ fun_l17_n453(x)
+ else
+ fun_l17_n187(x)
+ end
+end
+
+def fun_l16_n836(x)
+ if (x < 1)
+ fun_l17_n614(x)
+ else
+ fun_l17_n203(x)
+ end
+end
+
+def fun_l16_n837(x)
+ if (x < 1)
+ fun_l17_n177(x)
+ else
+ fun_l17_n721(x)
+ end
+end
+
+def fun_l16_n838(x)
+ if (x < 1)
+ fun_l17_n910(x)
+ else
+ fun_l17_n510(x)
+ end
+end
+
+def fun_l16_n839(x)
+ if (x < 1)
+ fun_l17_n880(x)
+ else
+ fun_l17_n365(x)
+ end
+end
+
+def fun_l16_n840(x)
+ if (x < 1)
+ fun_l17_n336(x)
+ else
+ fun_l17_n483(x)
+ end
+end
+
+def fun_l16_n841(x)
+ if (x < 1)
+ fun_l17_n83(x)
+ else
+ fun_l17_n947(x)
+ end
+end
+
+def fun_l16_n842(x)
+ if (x < 1)
+ fun_l17_n723(x)
+ else
+ fun_l17_n209(x)
+ end
+end
+
+def fun_l16_n843(x)
+ if (x < 1)
+ fun_l17_n432(x)
+ else
+ fun_l17_n664(x)
+ end
+end
+
+def fun_l16_n844(x)
+ if (x < 1)
+ fun_l17_n906(x)
+ else
+ fun_l17_n472(x)
+ end
+end
+
+def fun_l16_n845(x)
+ if (x < 1)
+ fun_l17_n147(x)
+ else
+ fun_l17_n623(x)
+ end
+end
+
+def fun_l16_n846(x)
+ if (x < 1)
+ fun_l17_n296(x)
+ else
+ fun_l17_n44(x)
+ end
+end
+
+def fun_l16_n847(x)
+ if (x < 1)
+ fun_l17_n498(x)
+ else
+ fun_l17_n764(x)
+ end
+end
+
+def fun_l16_n848(x)
+ if (x < 1)
+ fun_l17_n428(x)
+ else
+ fun_l17_n575(x)
+ end
+end
+
+def fun_l16_n849(x)
+ if (x < 1)
+ fun_l17_n311(x)
+ else
+ fun_l17_n975(x)
+ end
+end
+
+def fun_l16_n850(x)
+ if (x < 1)
+ fun_l17_n482(x)
+ else
+ fun_l17_n388(x)
+ end
+end
+
+def fun_l16_n851(x)
+ if (x < 1)
+ fun_l17_n174(x)
+ else
+ fun_l17_n190(x)
+ end
+end
+
+def fun_l16_n852(x)
+ if (x < 1)
+ fun_l17_n28(x)
+ else
+ fun_l17_n598(x)
+ end
+end
+
+def fun_l16_n853(x)
+ if (x < 1)
+ fun_l17_n142(x)
+ else
+ fun_l17_n340(x)
+ end
+end
+
+def fun_l16_n854(x)
+ if (x < 1)
+ fun_l17_n793(x)
+ else
+ fun_l17_n226(x)
+ end
+end
+
+def fun_l16_n855(x)
+ if (x < 1)
+ fun_l17_n268(x)
+ else
+ fun_l17_n201(x)
+ end
+end
+
+def fun_l16_n856(x)
+ if (x < 1)
+ fun_l17_n52(x)
+ else
+ fun_l17_n871(x)
+ end
+end
+
+def fun_l16_n857(x)
+ if (x < 1)
+ fun_l17_n30(x)
+ else
+ fun_l17_n673(x)
+ end
+end
+
+def fun_l16_n858(x)
+ if (x < 1)
+ fun_l17_n794(x)
+ else
+ fun_l17_n839(x)
+ end
+end
+
+def fun_l16_n859(x)
+ if (x < 1)
+ fun_l17_n162(x)
+ else
+ fun_l17_n655(x)
+ end
+end
+
+def fun_l16_n860(x)
+ if (x < 1)
+ fun_l17_n770(x)
+ else
+ fun_l17_n879(x)
+ end
+end
+
+def fun_l16_n861(x)
+ if (x < 1)
+ fun_l17_n93(x)
+ else
+ fun_l17_n338(x)
+ end
+end
+
+def fun_l16_n862(x)
+ if (x < 1)
+ fun_l17_n468(x)
+ else
+ fun_l17_n977(x)
+ end
+end
+
+def fun_l16_n863(x)
+ if (x < 1)
+ fun_l17_n627(x)
+ else
+ fun_l17_n296(x)
+ end
+end
+
+def fun_l16_n864(x)
+ if (x < 1)
+ fun_l17_n402(x)
+ else
+ fun_l17_n515(x)
+ end
+end
+
+def fun_l16_n865(x)
+ if (x < 1)
+ fun_l17_n793(x)
+ else
+ fun_l17_n62(x)
+ end
+end
+
+def fun_l16_n866(x)
+ if (x < 1)
+ fun_l17_n87(x)
+ else
+ fun_l17_n532(x)
+ end
+end
+
+def fun_l16_n867(x)
+ if (x < 1)
+ fun_l17_n766(x)
+ else
+ fun_l17_n162(x)
+ end
+end
+
+def fun_l16_n868(x)
+ if (x < 1)
+ fun_l17_n214(x)
+ else
+ fun_l17_n827(x)
+ end
+end
+
+def fun_l16_n869(x)
+ if (x < 1)
+ fun_l17_n879(x)
+ else
+ fun_l17_n285(x)
+ end
+end
+
+def fun_l16_n870(x)
+ if (x < 1)
+ fun_l17_n619(x)
+ else
+ fun_l17_n648(x)
+ end
+end
+
+def fun_l16_n871(x)
+ if (x < 1)
+ fun_l17_n150(x)
+ else
+ fun_l17_n458(x)
+ end
+end
+
+def fun_l16_n872(x)
+ if (x < 1)
+ fun_l17_n346(x)
+ else
+ fun_l17_n824(x)
+ end
+end
+
+def fun_l16_n873(x)
+ if (x < 1)
+ fun_l17_n839(x)
+ else
+ fun_l17_n188(x)
+ end
+end
+
+def fun_l16_n874(x)
+ if (x < 1)
+ fun_l17_n202(x)
+ else
+ fun_l17_n147(x)
+ end
+end
+
+def fun_l16_n875(x)
+ if (x < 1)
+ fun_l17_n779(x)
+ else
+ fun_l17_n217(x)
+ end
+end
+
+def fun_l16_n876(x)
+ if (x < 1)
+ fun_l17_n417(x)
+ else
+ fun_l17_n350(x)
+ end
+end
+
+def fun_l16_n877(x)
+ if (x < 1)
+ fun_l17_n971(x)
+ else
+ fun_l17_n825(x)
+ end
+end
+
+def fun_l16_n878(x)
+ if (x < 1)
+ fun_l17_n843(x)
+ else
+ fun_l17_n431(x)
+ end
+end
+
+def fun_l16_n879(x)
+ if (x < 1)
+ fun_l17_n560(x)
+ else
+ fun_l17_n421(x)
+ end
+end
+
+def fun_l16_n880(x)
+ if (x < 1)
+ fun_l17_n399(x)
+ else
+ fun_l17_n101(x)
+ end
+end
+
+def fun_l16_n881(x)
+ if (x < 1)
+ fun_l17_n458(x)
+ else
+ fun_l17_n805(x)
+ end
+end
+
+def fun_l16_n882(x)
+ if (x < 1)
+ fun_l17_n590(x)
+ else
+ fun_l17_n924(x)
+ end
+end
+
+def fun_l16_n883(x)
+ if (x < 1)
+ fun_l17_n753(x)
+ else
+ fun_l17_n128(x)
+ end
+end
+
+def fun_l16_n884(x)
+ if (x < 1)
+ fun_l17_n271(x)
+ else
+ fun_l17_n366(x)
+ end
+end
+
+def fun_l16_n885(x)
+ if (x < 1)
+ fun_l17_n251(x)
+ else
+ fun_l17_n581(x)
+ end
+end
+
+def fun_l16_n886(x)
+ if (x < 1)
+ fun_l17_n82(x)
+ else
+ fun_l17_n212(x)
+ end
+end
+
+def fun_l16_n887(x)
+ if (x < 1)
+ fun_l17_n254(x)
+ else
+ fun_l17_n476(x)
+ end
+end
+
+def fun_l16_n888(x)
+ if (x < 1)
+ fun_l17_n774(x)
+ else
+ fun_l17_n23(x)
+ end
+end
+
+def fun_l16_n889(x)
+ if (x < 1)
+ fun_l17_n258(x)
+ else
+ fun_l17_n931(x)
+ end
+end
+
+def fun_l16_n890(x)
+ if (x < 1)
+ fun_l17_n60(x)
+ else
+ fun_l17_n267(x)
+ end
+end
+
+def fun_l16_n891(x)
+ if (x < 1)
+ fun_l17_n465(x)
+ else
+ fun_l17_n298(x)
+ end
+end
+
+def fun_l16_n892(x)
+ if (x < 1)
+ fun_l17_n284(x)
+ else
+ fun_l17_n59(x)
+ end
+end
+
+def fun_l16_n893(x)
+ if (x < 1)
+ fun_l17_n485(x)
+ else
+ fun_l17_n19(x)
+ end
+end
+
+def fun_l16_n894(x)
+ if (x < 1)
+ fun_l17_n676(x)
+ else
+ fun_l17_n196(x)
+ end
+end
+
+def fun_l16_n895(x)
+ if (x < 1)
+ fun_l17_n894(x)
+ else
+ fun_l17_n667(x)
+ end
+end
+
+def fun_l16_n896(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n115(x)
+ end
+end
+
+def fun_l16_n897(x)
+ if (x < 1)
+ fun_l17_n161(x)
+ else
+ fun_l17_n47(x)
+ end
+end
+
+def fun_l16_n898(x)
+ if (x < 1)
+ fun_l17_n598(x)
+ else
+ fun_l17_n796(x)
+ end
+end
+
+def fun_l16_n899(x)
+ if (x < 1)
+ fun_l17_n191(x)
+ else
+ fun_l17_n36(x)
+ end
+end
+
+def fun_l16_n900(x)
+ if (x < 1)
+ fun_l17_n803(x)
+ else
+ fun_l17_n894(x)
+ end
+end
+
+def fun_l16_n901(x)
+ if (x < 1)
+ fun_l17_n225(x)
+ else
+ fun_l17_n608(x)
+ end
+end
+
+def fun_l16_n902(x)
+ if (x < 1)
+ fun_l17_n318(x)
+ else
+ fun_l17_n667(x)
+ end
+end
+
+def fun_l16_n903(x)
+ if (x < 1)
+ fun_l17_n815(x)
+ else
+ fun_l17_n645(x)
+ end
+end
+
+def fun_l16_n904(x)
+ if (x < 1)
+ fun_l17_n891(x)
+ else
+ fun_l17_n465(x)
+ end
+end
+
+def fun_l16_n905(x)
+ if (x < 1)
+ fun_l17_n789(x)
+ else
+ fun_l17_n573(x)
+ end
+end
+
+def fun_l16_n906(x)
+ if (x < 1)
+ fun_l17_n139(x)
+ else
+ fun_l17_n745(x)
+ end
+end
+
+def fun_l16_n907(x)
+ if (x < 1)
+ fun_l17_n632(x)
+ else
+ fun_l17_n625(x)
+ end
+end
+
+def fun_l16_n908(x)
+ if (x < 1)
+ fun_l17_n249(x)
+ else
+ fun_l17_n279(x)
+ end
+end
+
+def fun_l16_n909(x)
+ if (x < 1)
+ fun_l17_n357(x)
+ else
+ fun_l17_n477(x)
+ end
+end
+
+def fun_l16_n910(x)
+ if (x < 1)
+ fun_l17_n796(x)
+ else
+ fun_l17_n313(x)
+ end
+end
+
+def fun_l16_n911(x)
+ if (x < 1)
+ fun_l17_n917(x)
+ else
+ fun_l17_n775(x)
+ end
+end
+
+def fun_l16_n912(x)
+ if (x < 1)
+ fun_l17_n451(x)
+ else
+ fun_l17_n102(x)
+ end
+end
+
+def fun_l16_n913(x)
+ if (x < 1)
+ fun_l17_n782(x)
+ else
+ fun_l17_n998(x)
+ end
+end
+
+def fun_l16_n914(x)
+ if (x < 1)
+ fun_l17_n237(x)
+ else
+ fun_l17_n586(x)
+ end
+end
+
+def fun_l16_n915(x)
+ if (x < 1)
+ fun_l17_n399(x)
+ else
+ fun_l17_n676(x)
+ end
+end
+
+def fun_l16_n916(x)
+ if (x < 1)
+ fun_l17_n65(x)
+ else
+ fun_l17_n61(x)
+ end
+end
+
+def fun_l16_n917(x)
+ if (x < 1)
+ fun_l17_n861(x)
+ else
+ fun_l17_n72(x)
+ end
+end
+
+def fun_l16_n918(x)
+ if (x < 1)
+ fun_l17_n375(x)
+ else
+ fun_l17_n446(x)
+ end
+end
+
+def fun_l16_n919(x)
+ if (x < 1)
+ fun_l17_n776(x)
+ else
+ fun_l17_n302(x)
+ end
+end
+
+def fun_l16_n920(x)
+ if (x < 1)
+ fun_l17_n216(x)
+ else
+ fun_l17_n804(x)
+ end
+end
+
+def fun_l16_n921(x)
+ if (x < 1)
+ fun_l17_n667(x)
+ else
+ fun_l17_n593(x)
+ end
+end
+
+def fun_l16_n922(x)
+ if (x < 1)
+ fun_l17_n499(x)
+ else
+ fun_l17_n577(x)
+ end
+end
+
+def fun_l16_n923(x)
+ if (x < 1)
+ fun_l17_n41(x)
+ else
+ fun_l17_n316(x)
+ end
+end
+
+def fun_l16_n924(x)
+ if (x < 1)
+ fun_l17_n521(x)
+ else
+ fun_l17_n86(x)
+ end
+end
+
+def fun_l16_n925(x)
+ if (x < 1)
+ fun_l17_n695(x)
+ else
+ fun_l17_n662(x)
+ end
+end
+
+def fun_l16_n926(x)
+ if (x < 1)
+ fun_l17_n379(x)
+ else
+ fun_l17_n58(x)
+ end
+end
+
+def fun_l16_n927(x)
+ if (x < 1)
+ fun_l17_n820(x)
+ else
+ fun_l17_n801(x)
+ end
+end
+
+def fun_l16_n928(x)
+ if (x < 1)
+ fun_l17_n175(x)
+ else
+ fun_l17_n865(x)
+ end
+end
+
+def fun_l16_n929(x)
+ if (x < 1)
+ fun_l17_n903(x)
+ else
+ fun_l17_n644(x)
+ end
+end
+
+def fun_l16_n930(x)
+ if (x < 1)
+ fun_l17_n801(x)
+ else
+ fun_l17_n265(x)
+ end
+end
+
+def fun_l16_n931(x)
+ if (x < 1)
+ fun_l17_n292(x)
+ else
+ fun_l17_n897(x)
+ end
+end
+
+def fun_l16_n932(x)
+ if (x < 1)
+ fun_l17_n666(x)
+ else
+ fun_l17_n531(x)
+ end
+end
+
+def fun_l16_n933(x)
+ if (x < 1)
+ fun_l17_n929(x)
+ else
+ fun_l17_n205(x)
+ end
+end
+
+def fun_l16_n934(x)
+ if (x < 1)
+ fun_l17_n557(x)
+ else
+ fun_l17_n70(x)
+ end
+end
+
+def fun_l16_n935(x)
+ if (x < 1)
+ fun_l17_n831(x)
+ else
+ fun_l17_n194(x)
+ end
+end
+
+def fun_l16_n936(x)
+ if (x < 1)
+ fun_l17_n277(x)
+ else
+ fun_l17_n786(x)
+ end
+end
+
+def fun_l16_n937(x)
+ if (x < 1)
+ fun_l17_n464(x)
+ else
+ fun_l17_n482(x)
+ end
+end
+
+def fun_l16_n938(x)
+ if (x < 1)
+ fun_l17_n782(x)
+ else
+ fun_l17_n60(x)
+ end
+end
+
+def fun_l16_n939(x)
+ if (x < 1)
+ fun_l17_n780(x)
+ else
+ fun_l17_n786(x)
+ end
+end
+
+def fun_l16_n940(x)
+ if (x < 1)
+ fun_l17_n201(x)
+ else
+ fun_l17_n614(x)
+ end
+end
+
+def fun_l16_n941(x)
+ if (x < 1)
+ fun_l17_n318(x)
+ else
+ fun_l17_n210(x)
+ end
+end
+
+def fun_l16_n942(x)
+ if (x < 1)
+ fun_l17_n831(x)
+ else
+ fun_l17_n293(x)
+ end
+end
+
+def fun_l16_n943(x)
+ if (x < 1)
+ fun_l17_n368(x)
+ else
+ fun_l17_n292(x)
+ end
+end
+
+def fun_l16_n944(x)
+ if (x < 1)
+ fun_l17_n924(x)
+ else
+ fun_l17_n20(x)
+ end
+end
+
+def fun_l16_n945(x)
+ if (x < 1)
+ fun_l17_n340(x)
+ else
+ fun_l17_n268(x)
+ end
+end
+
+def fun_l16_n946(x)
+ if (x < 1)
+ fun_l17_n913(x)
+ else
+ fun_l17_n877(x)
+ end
+end
+
+def fun_l16_n947(x)
+ if (x < 1)
+ fun_l17_n577(x)
+ else
+ fun_l17_n973(x)
+ end
+end
+
+def fun_l16_n948(x)
+ if (x < 1)
+ fun_l17_n101(x)
+ else
+ fun_l17_n350(x)
+ end
+end
+
+def fun_l16_n949(x)
+ if (x < 1)
+ fun_l17_n1(x)
+ else
+ fun_l17_n683(x)
+ end
+end
+
+def fun_l16_n950(x)
+ if (x < 1)
+ fun_l17_n290(x)
+ else
+ fun_l17_n30(x)
+ end
+end
+
+def fun_l16_n951(x)
+ if (x < 1)
+ fun_l17_n965(x)
+ else
+ fun_l17_n165(x)
+ end
+end
+
+def fun_l16_n952(x)
+ if (x < 1)
+ fun_l17_n532(x)
+ else
+ fun_l17_n887(x)
+ end
+end
+
+def fun_l16_n953(x)
+ if (x < 1)
+ fun_l17_n73(x)
+ else
+ fun_l17_n82(x)
+ end
+end
+
+def fun_l16_n954(x)
+ if (x < 1)
+ fun_l17_n518(x)
+ else
+ fun_l17_n886(x)
+ end
+end
+
+def fun_l16_n955(x)
+ if (x < 1)
+ fun_l17_n990(x)
+ else
+ fun_l17_n213(x)
+ end
+end
+
+def fun_l16_n956(x)
+ if (x < 1)
+ fun_l17_n489(x)
+ else
+ fun_l17_n937(x)
+ end
+end
+
+def fun_l16_n957(x)
+ if (x < 1)
+ fun_l17_n657(x)
+ else
+ fun_l17_n25(x)
+ end
+end
+
+def fun_l16_n958(x)
+ if (x < 1)
+ fun_l17_n988(x)
+ else
+ fun_l17_n684(x)
+ end
+end
+
+def fun_l16_n959(x)
+ if (x < 1)
+ fun_l17_n142(x)
+ else
+ fun_l17_n291(x)
+ end
+end
+
+def fun_l16_n960(x)
+ if (x < 1)
+ fun_l17_n495(x)
+ else
+ fun_l17_n806(x)
+ end
+end
+
+def fun_l16_n961(x)
+ if (x < 1)
+ fun_l17_n92(x)
+ else
+ fun_l17_n137(x)
+ end
+end
+
+def fun_l16_n962(x)
+ if (x < 1)
+ fun_l17_n954(x)
+ else
+ fun_l17_n943(x)
+ end
+end
+
+def fun_l16_n963(x)
+ if (x < 1)
+ fun_l17_n761(x)
+ else
+ fun_l17_n839(x)
+ end
+end
+
+def fun_l16_n964(x)
+ if (x < 1)
+ fun_l17_n591(x)
+ else
+ fun_l17_n519(x)
+ end
+end
+
+def fun_l16_n965(x)
+ if (x < 1)
+ fun_l17_n548(x)
+ else
+ fun_l17_n190(x)
+ end
+end
+
+def fun_l16_n966(x)
+ if (x < 1)
+ fun_l17_n206(x)
+ else
+ fun_l17_n491(x)
+ end
+end
+
+def fun_l16_n967(x)
+ if (x < 1)
+ fun_l17_n895(x)
+ else
+ fun_l17_n404(x)
+ end
+end
+
+def fun_l16_n968(x)
+ if (x < 1)
+ fun_l17_n284(x)
+ else
+ fun_l17_n715(x)
+ end
+end
+
+def fun_l16_n969(x)
+ if (x < 1)
+ fun_l17_n507(x)
+ else
+ fun_l17_n623(x)
+ end
+end
+
+def fun_l16_n970(x)
+ if (x < 1)
+ fun_l17_n415(x)
+ else
+ fun_l17_n718(x)
+ end
+end
+
+def fun_l16_n971(x)
+ if (x < 1)
+ fun_l17_n72(x)
+ else
+ fun_l17_n938(x)
+ end
+end
+
+def fun_l16_n972(x)
+ if (x < 1)
+ fun_l17_n661(x)
+ else
+ fun_l17_n525(x)
+ end
+end
+
+def fun_l16_n973(x)
+ if (x < 1)
+ fun_l17_n314(x)
+ else
+ fun_l17_n195(x)
+ end
+end
+
+def fun_l16_n974(x)
+ if (x < 1)
+ fun_l17_n53(x)
+ else
+ fun_l17_n562(x)
+ end
+end
+
+def fun_l16_n975(x)
+ if (x < 1)
+ fun_l17_n381(x)
+ else
+ fun_l17_n241(x)
+ end
+end
+
+def fun_l16_n976(x)
+ if (x < 1)
+ fun_l17_n919(x)
+ else
+ fun_l17_n291(x)
+ end
+end
+
+def fun_l16_n977(x)
+ if (x < 1)
+ fun_l17_n455(x)
+ else
+ fun_l17_n773(x)
+ end
+end
+
+def fun_l16_n978(x)
+ if (x < 1)
+ fun_l17_n75(x)
+ else
+ fun_l17_n737(x)
+ end
+end
+
+def fun_l16_n979(x)
+ if (x < 1)
+ fun_l17_n68(x)
+ else
+ fun_l17_n339(x)
+ end
+end
+
+def fun_l16_n980(x)
+ if (x < 1)
+ fun_l17_n719(x)
+ else
+ fun_l17_n464(x)
+ end
+end
+
+def fun_l16_n981(x)
+ if (x < 1)
+ fun_l17_n681(x)
+ else
+ fun_l17_n611(x)
+ end
+end
+
+def fun_l16_n982(x)
+ if (x < 1)
+ fun_l17_n367(x)
+ else
+ fun_l17_n446(x)
+ end
+end
+
+def fun_l16_n983(x)
+ if (x < 1)
+ fun_l17_n493(x)
+ else
+ fun_l17_n958(x)
+ end
+end
+
+def fun_l16_n984(x)
+ if (x < 1)
+ fun_l17_n271(x)
+ else
+ fun_l17_n982(x)
+ end
+end
+
+def fun_l16_n985(x)
+ if (x < 1)
+ fun_l17_n136(x)
+ else
+ fun_l17_n446(x)
+ end
+end
+
+def fun_l16_n986(x)
+ if (x < 1)
+ fun_l17_n362(x)
+ else
+ fun_l17_n114(x)
+ end
+end
+
+def fun_l16_n987(x)
+ if (x < 1)
+ fun_l17_n234(x)
+ else
+ fun_l17_n236(x)
+ end
+end
+
+def fun_l16_n988(x)
+ if (x < 1)
+ fun_l17_n339(x)
+ else
+ fun_l17_n2(x)
+ end
+end
+
+def fun_l16_n989(x)
+ if (x < 1)
+ fun_l17_n66(x)
+ else
+ fun_l17_n378(x)
+ end
+end
+
+def fun_l16_n990(x)
+ if (x < 1)
+ fun_l17_n366(x)
+ else
+ fun_l17_n289(x)
+ end
+end
+
+def fun_l16_n991(x)
+ if (x < 1)
+ fun_l17_n977(x)
+ else
+ fun_l17_n520(x)
+ end
+end
+
+def fun_l16_n992(x)
+ if (x < 1)
+ fun_l17_n953(x)
+ else
+ fun_l17_n254(x)
+ end
+end
+
+def fun_l16_n993(x)
+ if (x < 1)
+ fun_l17_n569(x)
+ else
+ fun_l17_n63(x)
+ end
+end
+
+def fun_l16_n994(x)
+ if (x < 1)
+ fun_l17_n844(x)
+ else
+ fun_l17_n42(x)
+ end
+end
+
+def fun_l16_n995(x)
+ if (x < 1)
+ fun_l17_n184(x)
+ else
+ fun_l17_n371(x)
+ end
+end
+
+def fun_l16_n996(x)
+ if (x < 1)
+ fun_l17_n229(x)
+ else
+ fun_l17_n309(x)
+ end
+end
+
+def fun_l16_n997(x)
+ if (x < 1)
+ fun_l17_n468(x)
+ else
+ fun_l17_n653(x)
+ end
+end
+
+def fun_l16_n998(x)
+ if (x < 1)
+ fun_l17_n173(x)
+ else
+ fun_l17_n709(x)
+ end
+end
+
+def fun_l16_n999(x)
+ if (x < 1)
+ fun_l17_n625(x)
+ else
+ fun_l17_n831(x)
+ end
+end
+
+def fun_l17_n0(x)
+ if (x < 1)
+ fun_l18_n495(x)
+ else
+ fun_l18_n122(x)
+ end
+end
+
+def fun_l17_n1(x)
+ if (x < 1)
+ fun_l18_n99(x)
+ else
+ fun_l18_n84(x)
+ end
+end
+
+def fun_l17_n2(x)
+ if (x < 1)
+ fun_l18_n464(x)
+ else
+ fun_l18_n321(x)
+ end
+end
+
+def fun_l17_n3(x)
+ if (x < 1)
+ fun_l18_n391(x)
+ else
+ fun_l18_n122(x)
+ end
+end
+
+def fun_l17_n4(x)
+ if (x < 1)
+ fun_l18_n65(x)
+ else
+ fun_l18_n514(x)
+ end
+end
+
+def fun_l17_n5(x)
+ if (x < 1)
+ fun_l18_n972(x)
+ else
+ fun_l18_n802(x)
+ end
+end
+
+def fun_l17_n6(x)
+ if (x < 1)
+ fun_l18_n577(x)
+ else
+ fun_l18_n26(x)
+ end
+end
+
+def fun_l17_n7(x)
+ if (x < 1)
+ fun_l18_n988(x)
+ else
+ fun_l18_n403(x)
+ end
+end
+
+def fun_l17_n8(x)
+ if (x < 1)
+ fun_l18_n466(x)
+ else
+ fun_l18_n162(x)
+ end
+end
+
+def fun_l17_n9(x)
+ if (x < 1)
+ fun_l18_n30(x)
+ else
+ fun_l18_n438(x)
+ end
+end
+
+def fun_l17_n10(x)
+ if (x < 1)
+ fun_l18_n92(x)
+ else
+ fun_l18_n365(x)
+ end
+end
+
+def fun_l17_n11(x)
+ if (x < 1)
+ fun_l18_n230(x)
+ else
+ fun_l18_n466(x)
+ end
+end
+
+def fun_l17_n12(x)
+ if (x < 1)
+ fun_l18_n274(x)
+ else
+ fun_l18_n38(x)
+ end
+end
+
+def fun_l17_n13(x)
+ if (x < 1)
+ fun_l18_n84(x)
+ else
+ fun_l18_n951(x)
+ end
+end
+
+def fun_l17_n14(x)
+ if (x < 1)
+ fun_l18_n878(x)
+ else
+ fun_l18_n981(x)
+ end
+end
+
+def fun_l17_n15(x)
+ if (x < 1)
+ fun_l18_n592(x)
+ else
+ fun_l18_n917(x)
+ end
+end
+
+def fun_l17_n16(x)
+ if (x < 1)
+ fun_l18_n524(x)
+ else
+ fun_l18_n812(x)
+ end
+end
+
+def fun_l17_n17(x)
+ if (x < 1)
+ fun_l18_n267(x)
+ else
+ fun_l18_n335(x)
+ end
+end
+
+def fun_l17_n18(x)
+ if (x < 1)
+ fun_l18_n427(x)
+ else
+ fun_l18_n591(x)
+ end
+end
+
+def fun_l17_n19(x)
+ if (x < 1)
+ fun_l18_n520(x)
+ else
+ fun_l18_n240(x)
+ end
+end
+
+def fun_l17_n20(x)
+ if (x < 1)
+ fun_l18_n729(x)
+ else
+ fun_l18_n709(x)
+ end
+end
+
+def fun_l17_n21(x)
+ if (x < 1)
+ fun_l18_n100(x)
+ else
+ fun_l18_n192(x)
+ end
+end
+
+def fun_l17_n22(x)
+ if (x < 1)
+ fun_l18_n762(x)
+ else
+ fun_l18_n373(x)
+ end
+end
+
+def fun_l17_n23(x)
+ if (x < 1)
+ fun_l18_n485(x)
+ else
+ fun_l18_n736(x)
+ end
+end
+
+def fun_l17_n24(x)
+ if (x < 1)
+ fun_l18_n743(x)
+ else
+ fun_l18_n83(x)
+ end
+end
+
+def fun_l17_n25(x)
+ if (x < 1)
+ fun_l18_n750(x)
+ else
+ fun_l18_n545(x)
+ end
+end
+
+def fun_l17_n26(x)
+ if (x < 1)
+ fun_l18_n488(x)
+ else
+ fun_l18_n870(x)
+ end
+end
+
+def fun_l17_n27(x)
+ if (x < 1)
+ fun_l18_n0(x)
+ else
+ fun_l18_n675(x)
+ end
+end
+
+def fun_l17_n28(x)
+ if (x < 1)
+ fun_l18_n878(x)
+ else
+ fun_l18_n32(x)
+ end
+end
+
+def fun_l17_n29(x)
+ if (x < 1)
+ fun_l18_n906(x)
+ else
+ fun_l18_n376(x)
+ end
+end
+
+def fun_l17_n30(x)
+ if (x < 1)
+ fun_l18_n182(x)
+ else
+ fun_l18_n58(x)
+ end
+end
+
+def fun_l17_n31(x)
+ if (x < 1)
+ fun_l18_n117(x)
+ else
+ fun_l18_n592(x)
+ end
+end
+
+def fun_l17_n32(x)
+ if (x < 1)
+ fun_l18_n123(x)
+ else
+ fun_l18_n697(x)
+ end
+end
+
+def fun_l17_n33(x)
+ if (x < 1)
+ fun_l18_n672(x)
+ else
+ fun_l18_n645(x)
+ end
+end
+
+def fun_l17_n34(x)
+ if (x < 1)
+ fun_l18_n640(x)
+ else
+ fun_l18_n280(x)
+ end
+end
+
+def fun_l17_n35(x)
+ if (x < 1)
+ fun_l18_n851(x)
+ else
+ fun_l18_n723(x)
+ end
+end
+
+def fun_l17_n36(x)
+ if (x < 1)
+ fun_l18_n968(x)
+ else
+ fun_l18_n840(x)
+ end
+end
+
+def fun_l17_n37(x)
+ if (x < 1)
+ fun_l18_n153(x)
+ else
+ fun_l18_n979(x)
+ end
+end
+
+def fun_l17_n38(x)
+ if (x < 1)
+ fun_l18_n817(x)
+ else
+ fun_l18_n521(x)
+ end
+end
+
+def fun_l17_n39(x)
+ if (x < 1)
+ fun_l18_n742(x)
+ else
+ fun_l18_n576(x)
+ end
+end
+
+def fun_l17_n40(x)
+ if (x < 1)
+ fun_l18_n5(x)
+ else
+ fun_l18_n998(x)
+ end
+end
+
+def fun_l17_n41(x)
+ if (x < 1)
+ fun_l18_n442(x)
+ else
+ fun_l18_n157(x)
+ end
+end
+
+def fun_l17_n42(x)
+ if (x < 1)
+ fun_l18_n832(x)
+ else
+ fun_l18_n218(x)
+ end
+end
+
+def fun_l17_n43(x)
+ if (x < 1)
+ fun_l18_n298(x)
+ else
+ fun_l18_n132(x)
+ end
+end
+
+def fun_l17_n44(x)
+ if (x < 1)
+ fun_l18_n397(x)
+ else
+ fun_l18_n375(x)
+ end
+end
+
+def fun_l17_n45(x)
+ if (x < 1)
+ fun_l18_n974(x)
+ else
+ fun_l18_n19(x)
+ end
+end
+
+def fun_l17_n46(x)
+ if (x < 1)
+ fun_l18_n340(x)
+ else
+ fun_l18_n506(x)
+ end
+end
+
+def fun_l17_n47(x)
+ if (x < 1)
+ fun_l18_n943(x)
+ else
+ fun_l18_n585(x)
+ end
+end
+
+def fun_l17_n48(x)
+ if (x < 1)
+ fun_l18_n756(x)
+ else
+ fun_l18_n2(x)
+ end
+end
+
+def fun_l17_n49(x)
+ if (x < 1)
+ fun_l18_n229(x)
+ else
+ fun_l18_n313(x)
+ end
+end
+
+def fun_l17_n50(x)
+ if (x < 1)
+ fun_l18_n243(x)
+ else
+ fun_l18_n562(x)
+ end
+end
+
+def fun_l17_n51(x)
+ if (x < 1)
+ fun_l18_n231(x)
+ else
+ fun_l18_n381(x)
+ end
+end
+
+def fun_l17_n52(x)
+ if (x < 1)
+ fun_l18_n509(x)
+ else
+ fun_l18_n693(x)
+ end
+end
+
+def fun_l17_n53(x)
+ if (x < 1)
+ fun_l18_n877(x)
+ else
+ fun_l18_n620(x)
+ end
+end
+
+def fun_l17_n54(x)
+ if (x < 1)
+ fun_l18_n435(x)
+ else
+ fun_l18_n3(x)
+ end
+end
+
+def fun_l17_n55(x)
+ if (x < 1)
+ fun_l18_n929(x)
+ else
+ fun_l18_n640(x)
+ end
+end
+
+def fun_l17_n56(x)
+ if (x < 1)
+ fun_l18_n913(x)
+ else
+ fun_l18_n374(x)
+ end
+end
+
+def fun_l17_n57(x)
+ if (x < 1)
+ fun_l18_n174(x)
+ else
+ fun_l18_n588(x)
+ end
+end
+
+def fun_l17_n58(x)
+ if (x < 1)
+ fun_l18_n339(x)
+ else
+ fun_l18_n860(x)
+ end
+end
+
+def fun_l17_n59(x)
+ if (x < 1)
+ fun_l18_n649(x)
+ else
+ fun_l18_n986(x)
+ end
+end
+
+def fun_l17_n60(x)
+ if (x < 1)
+ fun_l18_n326(x)
+ else
+ fun_l18_n739(x)
+ end
+end
+
+def fun_l17_n61(x)
+ if (x < 1)
+ fun_l18_n692(x)
+ else
+ fun_l18_n673(x)
+ end
+end
+
+def fun_l17_n62(x)
+ if (x < 1)
+ fun_l18_n515(x)
+ else
+ fun_l18_n951(x)
+ end
+end
+
+def fun_l17_n63(x)
+ if (x < 1)
+ fun_l18_n502(x)
+ else
+ fun_l18_n781(x)
+ end
+end
+
+def fun_l17_n64(x)
+ if (x < 1)
+ fun_l18_n833(x)
+ else
+ fun_l18_n235(x)
+ end
+end
+
+def fun_l17_n65(x)
+ if (x < 1)
+ fun_l18_n483(x)
+ else
+ fun_l18_n207(x)
+ end
+end
+
+def fun_l17_n66(x)
+ if (x < 1)
+ fun_l18_n292(x)
+ else
+ fun_l18_n916(x)
+ end
+end
+
+def fun_l17_n67(x)
+ if (x < 1)
+ fun_l18_n677(x)
+ else
+ fun_l18_n937(x)
+ end
+end
+
+def fun_l17_n68(x)
+ if (x < 1)
+ fun_l18_n733(x)
+ else
+ fun_l18_n426(x)
+ end
+end
+
+def fun_l17_n69(x)
+ if (x < 1)
+ fun_l18_n186(x)
+ else
+ fun_l18_n146(x)
+ end
+end
+
+def fun_l17_n70(x)
+ if (x < 1)
+ fun_l18_n493(x)
+ else
+ fun_l18_n418(x)
+ end
+end
+
+def fun_l17_n71(x)
+ if (x < 1)
+ fun_l18_n732(x)
+ else
+ fun_l18_n584(x)
+ end
+end
+
+def fun_l17_n72(x)
+ if (x < 1)
+ fun_l18_n774(x)
+ else
+ fun_l18_n349(x)
+ end
+end
+
+def fun_l17_n73(x)
+ if (x < 1)
+ fun_l18_n833(x)
+ else
+ fun_l18_n142(x)
+ end
+end
+
+def fun_l17_n74(x)
+ if (x < 1)
+ fun_l18_n506(x)
+ else
+ fun_l18_n882(x)
+ end
+end
+
+def fun_l17_n75(x)
+ if (x < 1)
+ fun_l18_n856(x)
+ else
+ fun_l18_n906(x)
+ end
+end
+
+def fun_l17_n76(x)
+ if (x < 1)
+ fun_l18_n172(x)
+ else
+ fun_l18_n426(x)
+ end
+end
+
+def fun_l17_n77(x)
+ if (x < 1)
+ fun_l18_n357(x)
+ else
+ fun_l18_n508(x)
+ end
+end
+
+def fun_l17_n78(x)
+ if (x < 1)
+ fun_l18_n25(x)
+ else
+ fun_l18_n899(x)
+ end
+end
+
+def fun_l17_n79(x)
+ if (x < 1)
+ fun_l18_n639(x)
+ else
+ fun_l18_n644(x)
+ end
+end
+
+def fun_l17_n80(x)
+ if (x < 1)
+ fun_l18_n207(x)
+ else
+ fun_l18_n193(x)
+ end
+end
+
+def fun_l17_n81(x)
+ if (x < 1)
+ fun_l18_n200(x)
+ else
+ fun_l18_n766(x)
+ end
+end
+
+def fun_l17_n82(x)
+ if (x < 1)
+ fun_l18_n815(x)
+ else
+ fun_l18_n533(x)
+ end
+end
+
+def fun_l17_n83(x)
+ if (x < 1)
+ fun_l18_n740(x)
+ else
+ fun_l18_n507(x)
+ end
+end
+
+def fun_l17_n84(x)
+ if (x < 1)
+ fun_l18_n484(x)
+ else
+ fun_l18_n158(x)
+ end
+end
+
+def fun_l17_n85(x)
+ if (x < 1)
+ fun_l18_n924(x)
+ else
+ fun_l18_n963(x)
+ end
+end
+
+def fun_l17_n86(x)
+ if (x < 1)
+ fun_l18_n614(x)
+ else
+ fun_l18_n806(x)
+ end
+end
+
+def fun_l17_n87(x)
+ if (x < 1)
+ fun_l18_n553(x)
+ else
+ fun_l18_n510(x)
+ end
+end
+
+def fun_l17_n88(x)
+ if (x < 1)
+ fun_l18_n561(x)
+ else
+ fun_l18_n860(x)
+ end
+end
+
+def fun_l17_n89(x)
+ if (x < 1)
+ fun_l18_n757(x)
+ else
+ fun_l18_n248(x)
+ end
+end
+
+def fun_l17_n90(x)
+ if (x < 1)
+ fun_l18_n616(x)
+ else
+ fun_l18_n217(x)
+ end
+end
+
+def fun_l17_n91(x)
+ if (x < 1)
+ fun_l18_n997(x)
+ else
+ fun_l18_n861(x)
+ end
+end
+
+def fun_l17_n92(x)
+ if (x < 1)
+ fun_l18_n18(x)
+ else
+ fun_l18_n457(x)
+ end
+end
+
+def fun_l17_n93(x)
+ if (x < 1)
+ fun_l18_n264(x)
+ else
+ fun_l18_n213(x)
+ end
+end
+
+def fun_l17_n94(x)
+ if (x < 1)
+ fun_l18_n352(x)
+ else
+ fun_l18_n304(x)
+ end
+end
+
+def fun_l17_n95(x)
+ if (x < 1)
+ fun_l18_n975(x)
+ else
+ fun_l18_n868(x)
+ end
+end
+
+def fun_l17_n96(x)
+ if (x < 1)
+ fun_l18_n859(x)
+ else
+ fun_l18_n786(x)
+ end
+end
+
+def fun_l17_n97(x)
+ if (x < 1)
+ fun_l18_n610(x)
+ else
+ fun_l18_n423(x)
+ end
+end
+
+def fun_l17_n98(x)
+ if (x < 1)
+ fun_l18_n814(x)
+ else
+ fun_l18_n71(x)
+ end
+end
+
+def fun_l17_n99(x)
+ if (x < 1)
+ fun_l18_n897(x)
+ else
+ fun_l18_n412(x)
+ end
+end
+
+def fun_l17_n100(x)
+ if (x < 1)
+ fun_l18_n654(x)
+ else
+ fun_l18_n600(x)
+ end
+end
+
+def fun_l17_n101(x)
+ if (x < 1)
+ fun_l18_n185(x)
+ else
+ fun_l18_n188(x)
+ end
+end
+
+def fun_l17_n102(x)
+ if (x < 1)
+ fun_l18_n262(x)
+ else
+ fun_l18_n509(x)
+ end
+end
+
+def fun_l17_n103(x)
+ if (x < 1)
+ fun_l18_n115(x)
+ else
+ fun_l18_n497(x)
+ end
+end
+
+def fun_l17_n104(x)
+ if (x < 1)
+ fun_l18_n650(x)
+ else
+ fun_l18_n389(x)
+ end
+end
+
+def fun_l17_n105(x)
+ if (x < 1)
+ fun_l18_n939(x)
+ else
+ fun_l18_n842(x)
+ end
+end
+
+def fun_l17_n106(x)
+ if (x < 1)
+ fun_l18_n645(x)
+ else
+ fun_l18_n34(x)
+ end
+end
+
+def fun_l17_n107(x)
+ if (x < 1)
+ fun_l18_n510(x)
+ else
+ fun_l18_n313(x)
+ end
+end
+
+def fun_l17_n108(x)
+ if (x < 1)
+ fun_l18_n377(x)
+ else
+ fun_l18_n397(x)
+ end
+end
+
+def fun_l17_n109(x)
+ if (x < 1)
+ fun_l18_n884(x)
+ else
+ fun_l18_n380(x)
+ end
+end
+
+def fun_l17_n110(x)
+ if (x < 1)
+ fun_l18_n924(x)
+ else
+ fun_l18_n102(x)
+ end
+end
+
+def fun_l17_n111(x)
+ if (x < 1)
+ fun_l18_n856(x)
+ else
+ fun_l18_n646(x)
+ end
+end
+
+def fun_l17_n112(x)
+ if (x < 1)
+ fun_l18_n270(x)
+ else
+ fun_l18_n345(x)
+ end
+end
+
+def fun_l17_n113(x)
+ if (x < 1)
+ fun_l18_n211(x)
+ else
+ fun_l18_n672(x)
+ end
+end
+
+def fun_l17_n114(x)
+ if (x < 1)
+ fun_l18_n947(x)
+ else
+ fun_l18_n376(x)
+ end
+end
+
+def fun_l17_n115(x)
+ if (x < 1)
+ fun_l18_n219(x)
+ else
+ fun_l18_n927(x)
+ end
+end
+
+def fun_l17_n116(x)
+ if (x < 1)
+ fun_l18_n731(x)
+ else
+ fun_l18_n327(x)
+ end
+end
+
+def fun_l17_n117(x)
+ if (x < 1)
+ fun_l18_n512(x)
+ else
+ fun_l18_n658(x)
+ end
+end
+
+def fun_l17_n118(x)
+ if (x < 1)
+ fun_l18_n248(x)
+ else
+ fun_l18_n661(x)
+ end
+end
+
+def fun_l17_n119(x)
+ if (x < 1)
+ fun_l18_n18(x)
+ else
+ fun_l18_n56(x)
+ end
+end
+
+def fun_l17_n120(x)
+ if (x < 1)
+ fun_l18_n441(x)
+ else
+ fun_l18_n648(x)
+ end
+end
+
+def fun_l17_n121(x)
+ if (x < 1)
+ fun_l18_n122(x)
+ else
+ fun_l18_n717(x)
+ end
+end
+
+def fun_l17_n122(x)
+ if (x < 1)
+ fun_l18_n495(x)
+ else
+ fun_l18_n30(x)
+ end
+end
+
+def fun_l17_n123(x)
+ if (x < 1)
+ fun_l18_n418(x)
+ else
+ fun_l18_n686(x)
+ end
+end
+
+def fun_l17_n124(x)
+ if (x < 1)
+ fun_l18_n274(x)
+ else
+ fun_l18_n300(x)
+ end
+end
+
+def fun_l17_n125(x)
+ if (x < 1)
+ fun_l18_n677(x)
+ else
+ fun_l18_n662(x)
+ end
+end
+
+def fun_l17_n126(x)
+ if (x < 1)
+ fun_l18_n448(x)
+ else
+ fun_l18_n584(x)
+ end
+end
+
+def fun_l17_n127(x)
+ if (x < 1)
+ fun_l18_n316(x)
+ else
+ fun_l18_n507(x)
+ end
+end
+
+def fun_l17_n128(x)
+ if (x < 1)
+ fun_l18_n166(x)
+ else
+ fun_l18_n266(x)
+ end
+end
+
+def fun_l17_n129(x)
+ if (x < 1)
+ fun_l18_n890(x)
+ else
+ fun_l18_n581(x)
+ end
+end
+
+def fun_l17_n130(x)
+ if (x < 1)
+ fun_l18_n554(x)
+ else
+ fun_l18_n925(x)
+ end
+end
+
+def fun_l17_n131(x)
+ if (x < 1)
+ fun_l18_n607(x)
+ else
+ fun_l18_n43(x)
+ end
+end
+
+def fun_l17_n132(x)
+ if (x < 1)
+ fun_l18_n747(x)
+ else
+ fun_l18_n461(x)
+ end
+end
+
+def fun_l17_n133(x)
+ if (x < 1)
+ fun_l18_n399(x)
+ else
+ fun_l18_n436(x)
+ end
+end
+
+def fun_l17_n134(x)
+ if (x < 1)
+ fun_l18_n922(x)
+ else
+ fun_l18_n33(x)
+ end
+end
+
+def fun_l17_n135(x)
+ if (x < 1)
+ fun_l18_n719(x)
+ else
+ fun_l18_n70(x)
+ end
+end
+
+def fun_l17_n136(x)
+ if (x < 1)
+ fun_l18_n664(x)
+ else
+ fun_l18_n842(x)
+ end
+end
+
+def fun_l17_n137(x)
+ if (x < 1)
+ fun_l18_n626(x)
+ else
+ fun_l18_n328(x)
+ end
+end
+
+def fun_l17_n138(x)
+ if (x < 1)
+ fun_l18_n64(x)
+ else
+ fun_l18_n24(x)
+ end
+end
+
+def fun_l17_n139(x)
+ if (x < 1)
+ fun_l18_n198(x)
+ else
+ fun_l18_n658(x)
+ end
+end
+
+def fun_l17_n140(x)
+ if (x < 1)
+ fun_l18_n813(x)
+ else
+ fun_l18_n5(x)
+ end
+end
+
+def fun_l17_n141(x)
+ if (x < 1)
+ fun_l18_n8(x)
+ else
+ fun_l18_n115(x)
+ end
+end
+
+def fun_l17_n142(x)
+ if (x < 1)
+ fun_l18_n699(x)
+ else
+ fun_l18_n135(x)
+ end
+end
+
+def fun_l17_n143(x)
+ if (x < 1)
+ fun_l18_n595(x)
+ else
+ fun_l18_n607(x)
+ end
+end
+
+def fun_l17_n144(x)
+ if (x < 1)
+ fun_l18_n650(x)
+ else
+ fun_l18_n994(x)
+ end
+end
+
+def fun_l17_n145(x)
+ if (x < 1)
+ fun_l18_n14(x)
+ else
+ fun_l18_n798(x)
+ end
+end
+
+def fun_l17_n146(x)
+ if (x < 1)
+ fun_l18_n107(x)
+ else
+ fun_l18_n144(x)
+ end
+end
+
+def fun_l17_n147(x)
+ if (x < 1)
+ fun_l18_n923(x)
+ else
+ fun_l18_n482(x)
+ end
+end
+
+def fun_l17_n148(x)
+ if (x < 1)
+ fun_l18_n629(x)
+ else
+ fun_l18_n224(x)
+ end
+end
+
+def fun_l17_n149(x)
+ if (x < 1)
+ fun_l18_n363(x)
+ else
+ fun_l18_n958(x)
+ end
+end
+
+def fun_l17_n150(x)
+ if (x < 1)
+ fun_l18_n143(x)
+ else
+ fun_l18_n828(x)
+ end
+end
+
+def fun_l17_n151(x)
+ if (x < 1)
+ fun_l18_n615(x)
+ else
+ fun_l18_n561(x)
+ end
+end
+
+def fun_l17_n152(x)
+ if (x < 1)
+ fun_l18_n418(x)
+ else
+ fun_l18_n46(x)
+ end
+end
+
+def fun_l17_n153(x)
+ if (x < 1)
+ fun_l18_n331(x)
+ else
+ fun_l18_n736(x)
+ end
+end
+
+def fun_l17_n154(x)
+ if (x < 1)
+ fun_l18_n340(x)
+ else
+ fun_l18_n221(x)
+ end
+end
+
+def fun_l17_n155(x)
+ if (x < 1)
+ fun_l18_n488(x)
+ else
+ fun_l18_n995(x)
+ end
+end
+
+def fun_l17_n156(x)
+ if (x < 1)
+ fun_l18_n500(x)
+ else
+ fun_l18_n106(x)
+ end
+end
+
+def fun_l17_n157(x)
+ if (x < 1)
+ fun_l18_n76(x)
+ else
+ fun_l18_n147(x)
+ end
+end
+
+def fun_l17_n158(x)
+ if (x < 1)
+ fun_l18_n258(x)
+ else
+ fun_l18_n754(x)
+ end
+end
+
+def fun_l17_n159(x)
+ if (x < 1)
+ fun_l18_n174(x)
+ else
+ fun_l18_n676(x)
+ end
+end
+
+def fun_l17_n160(x)
+ if (x < 1)
+ fun_l18_n997(x)
+ else
+ fun_l18_n662(x)
+ end
+end
+
+def fun_l17_n161(x)
+ if (x < 1)
+ fun_l18_n614(x)
+ else
+ fun_l18_n425(x)
+ end
+end
+
+def fun_l17_n162(x)
+ if (x < 1)
+ fun_l18_n943(x)
+ else
+ fun_l18_n534(x)
+ end
+end
+
+def fun_l17_n163(x)
+ if (x < 1)
+ fun_l18_n577(x)
+ else
+ fun_l18_n670(x)
+ end
+end
+
+def fun_l17_n164(x)
+ if (x < 1)
+ fun_l18_n707(x)
+ else
+ fun_l18_n701(x)
+ end
+end
+
+def fun_l17_n165(x)
+ if (x < 1)
+ fun_l18_n316(x)
+ else
+ fun_l18_n981(x)
+ end
+end
+
+def fun_l17_n166(x)
+ if (x < 1)
+ fun_l18_n557(x)
+ else
+ fun_l18_n710(x)
+ end
+end
+
+def fun_l17_n167(x)
+ if (x < 1)
+ fun_l18_n763(x)
+ else
+ fun_l18_n900(x)
+ end
+end
+
+def fun_l17_n168(x)
+ if (x < 1)
+ fun_l18_n818(x)
+ else
+ fun_l18_n2(x)
+ end
+end
+
+def fun_l17_n169(x)
+ if (x < 1)
+ fun_l18_n68(x)
+ else
+ fun_l18_n894(x)
+ end
+end
+
+def fun_l17_n170(x)
+ if (x < 1)
+ fun_l18_n88(x)
+ else
+ fun_l18_n431(x)
+ end
+end
+
+def fun_l17_n171(x)
+ if (x < 1)
+ fun_l18_n530(x)
+ else
+ fun_l18_n714(x)
+ end
+end
+
+def fun_l17_n172(x)
+ if (x < 1)
+ fun_l18_n636(x)
+ else
+ fun_l18_n747(x)
+ end
+end
+
+def fun_l17_n173(x)
+ if (x < 1)
+ fun_l18_n481(x)
+ else
+ fun_l18_n804(x)
+ end
+end
+
+def fun_l17_n174(x)
+ if (x < 1)
+ fun_l18_n591(x)
+ else
+ fun_l18_n121(x)
+ end
+end
+
+def fun_l17_n175(x)
+ if (x < 1)
+ fun_l18_n320(x)
+ else
+ fun_l18_n881(x)
+ end
+end
+
+def fun_l17_n176(x)
+ if (x < 1)
+ fun_l18_n524(x)
+ else
+ fun_l18_n948(x)
+ end
+end
+
+def fun_l17_n177(x)
+ if (x < 1)
+ fun_l18_n540(x)
+ else
+ fun_l18_n508(x)
+ end
+end
+
+def fun_l17_n178(x)
+ if (x < 1)
+ fun_l18_n949(x)
+ else
+ fun_l18_n492(x)
+ end
+end
+
+def fun_l17_n179(x)
+ if (x < 1)
+ fun_l18_n548(x)
+ else
+ fun_l18_n534(x)
+ end
+end
+
+def fun_l17_n180(x)
+ if (x < 1)
+ fun_l18_n591(x)
+ else
+ fun_l18_n104(x)
+ end
+end
+
+def fun_l17_n181(x)
+ if (x < 1)
+ fun_l18_n727(x)
+ else
+ fun_l18_n144(x)
+ end
+end
+
+def fun_l17_n182(x)
+ if (x < 1)
+ fun_l18_n365(x)
+ else
+ fun_l18_n628(x)
+ end
+end
+
+def fun_l17_n183(x)
+ if (x < 1)
+ fun_l18_n32(x)
+ else
+ fun_l18_n752(x)
+ end
+end
+
+def fun_l17_n184(x)
+ if (x < 1)
+ fun_l18_n778(x)
+ else
+ fun_l18_n929(x)
+ end
+end
+
+def fun_l17_n185(x)
+ if (x < 1)
+ fun_l18_n797(x)
+ else
+ fun_l18_n525(x)
+ end
+end
+
+def fun_l17_n186(x)
+ if (x < 1)
+ fun_l18_n800(x)
+ else
+ fun_l18_n799(x)
+ end
+end
+
+def fun_l17_n187(x)
+ if (x < 1)
+ fun_l18_n974(x)
+ else
+ fun_l18_n982(x)
+ end
+end
+
+def fun_l17_n188(x)
+ if (x < 1)
+ fun_l18_n259(x)
+ else
+ fun_l18_n465(x)
+ end
+end
+
+def fun_l17_n189(x)
+ if (x < 1)
+ fun_l18_n905(x)
+ else
+ fun_l18_n477(x)
+ end
+end
+
+def fun_l17_n190(x)
+ if (x < 1)
+ fun_l18_n453(x)
+ else
+ fun_l18_n894(x)
+ end
+end
+
+def fun_l17_n191(x)
+ if (x < 1)
+ fun_l18_n461(x)
+ else
+ fun_l18_n251(x)
+ end
+end
+
+def fun_l17_n192(x)
+ if (x < 1)
+ fun_l18_n377(x)
+ else
+ fun_l18_n371(x)
+ end
+end
+
+def fun_l17_n193(x)
+ if (x < 1)
+ fun_l18_n252(x)
+ else
+ fun_l18_n493(x)
+ end
+end
+
+def fun_l17_n194(x)
+ if (x < 1)
+ fun_l18_n398(x)
+ else
+ fun_l18_n104(x)
+ end
+end
+
+def fun_l17_n195(x)
+ if (x < 1)
+ fun_l18_n791(x)
+ else
+ fun_l18_n4(x)
+ end
+end
+
+def fun_l17_n196(x)
+ if (x < 1)
+ fun_l18_n801(x)
+ else
+ fun_l18_n429(x)
+ end
+end
+
+def fun_l17_n197(x)
+ if (x < 1)
+ fun_l18_n106(x)
+ else
+ fun_l18_n622(x)
+ end
+end
+
+def fun_l17_n198(x)
+ if (x < 1)
+ fun_l18_n581(x)
+ else
+ fun_l18_n312(x)
+ end
+end
+
+def fun_l17_n199(x)
+ if (x < 1)
+ fun_l18_n142(x)
+ else
+ fun_l18_n296(x)
+ end
+end
+
+def fun_l17_n200(x)
+ if (x < 1)
+ fun_l18_n234(x)
+ else
+ fun_l18_n185(x)
+ end
+end
+
+def fun_l17_n201(x)
+ if (x < 1)
+ fun_l18_n486(x)
+ else
+ fun_l18_n857(x)
+ end
+end
+
+def fun_l17_n202(x)
+ if (x < 1)
+ fun_l18_n84(x)
+ else
+ fun_l18_n718(x)
+ end
+end
+
+def fun_l17_n203(x)
+ if (x < 1)
+ fun_l18_n830(x)
+ else
+ fun_l18_n618(x)
+ end
+end
+
+def fun_l17_n204(x)
+ if (x < 1)
+ fun_l18_n860(x)
+ else
+ fun_l18_n28(x)
+ end
+end
+
+def fun_l17_n205(x)
+ if (x < 1)
+ fun_l18_n244(x)
+ else
+ fun_l18_n575(x)
+ end
+end
+
+def fun_l17_n206(x)
+ if (x < 1)
+ fun_l18_n189(x)
+ else
+ fun_l18_n722(x)
+ end
+end
+
+def fun_l17_n207(x)
+ if (x < 1)
+ fun_l18_n164(x)
+ else
+ fun_l18_n197(x)
+ end
+end
+
+def fun_l17_n208(x)
+ if (x < 1)
+ fun_l18_n109(x)
+ else
+ fun_l18_n392(x)
+ end
+end
+
+def fun_l17_n209(x)
+ if (x < 1)
+ fun_l18_n629(x)
+ else
+ fun_l18_n290(x)
+ end
+end
+
+def fun_l17_n210(x)
+ if (x < 1)
+ fun_l18_n637(x)
+ else
+ fun_l18_n317(x)
+ end
+end
+
+def fun_l17_n211(x)
+ if (x < 1)
+ fun_l18_n148(x)
+ else
+ fun_l18_n702(x)
+ end
+end
+
+def fun_l17_n212(x)
+ if (x < 1)
+ fun_l18_n892(x)
+ else
+ fun_l18_n395(x)
+ end
+end
+
+def fun_l17_n213(x)
+ if (x < 1)
+ fun_l18_n457(x)
+ else
+ fun_l18_n859(x)
+ end
+end
+
+def fun_l17_n214(x)
+ if (x < 1)
+ fun_l18_n561(x)
+ else
+ fun_l18_n295(x)
+ end
+end
+
+def fun_l17_n215(x)
+ if (x < 1)
+ fun_l18_n459(x)
+ else
+ fun_l18_n407(x)
+ end
+end
+
+def fun_l17_n216(x)
+ if (x < 1)
+ fun_l18_n761(x)
+ else
+ fun_l18_n308(x)
+ end
+end
+
+def fun_l17_n217(x)
+ if (x < 1)
+ fun_l18_n350(x)
+ else
+ fun_l18_n680(x)
+ end
+end
+
+def fun_l17_n218(x)
+ if (x < 1)
+ fun_l18_n240(x)
+ else
+ fun_l18_n119(x)
+ end
+end
+
+def fun_l17_n219(x)
+ if (x < 1)
+ fun_l18_n538(x)
+ else
+ fun_l18_n732(x)
+ end
+end
+
+def fun_l17_n220(x)
+ if (x < 1)
+ fun_l18_n45(x)
+ else
+ fun_l18_n643(x)
+ end
+end
+
+def fun_l17_n221(x)
+ if (x < 1)
+ fun_l18_n258(x)
+ else
+ fun_l18_n690(x)
+ end
+end
+
+def fun_l17_n222(x)
+ if (x < 1)
+ fun_l18_n288(x)
+ else
+ fun_l18_n998(x)
+ end
+end
+
+def fun_l17_n223(x)
+ if (x < 1)
+ fun_l18_n591(x)
+ else
+ fun_l18_n278(x)
+ end
+end
+
+def fun_l17_n224(x)
+ if (x < 1)
+ fun_l18_n433(x)
+ else
+ fun_l18_n852(x)
+ end
+end
+
+def fun_l17_n225(x)
+ if (x < 1)
+ fun_l18_n51(x)
+ else
+ fun_l18_n837(x)
+ end
+end
+
+def fun_l17_n226(x)
+ if (x < 1)
+ fun_l18_n755(x)
+ else
+ fun_l18_n949(x)
+ end
+end
+
+def fun_l17_n227(x)
+ if (x < 1)
+ fun_l18_n566(x)
+ else
+ fun_l18_n754(x)
+ end
+end
+
+def fun_l17_n228(x)
+ if (x < 1)
+ fun_l18_n915(x)
+ else
+ fun_l18_n893(x)
+ end
+end
+
+def fun_l17_n229(x)
+ if (x < 1)
+ fun_l18_n990(x)
+ else
+ fun_l18_n208(x)
+ end
+end
+
+def fun_l17_n230(x)
+ if (x < 1)
+ fun_l18_n220(x)
+ else
+ fun_l18_n292(x)
+ end
+end
+
+def fun_l17_n231(x)
+ if (x < 1)
+ fun_l18_n39(x)
+ else
+ fun_l18_n211(x)
+ end
+end
+
+def fun_l17_n232(x)
+ if (x < 1)
+ fun_l18_n669(x)
+ else
+ fun_l18_n818(x)
+ end
+end
+
+def fun_l17_n233(x)
+ if (x < 1)
+ fun_l18_n804(x)
+ else
+ fun_l18_n400(x)
+ end
+end
+
+def fun_l17_n234(x)
+ if (x < 1)
+ fun_l18_n198(x)
+ else
+ fun_l18_n393(x)
+ end
+end
+
+def fun_l17_n235(x)
+ if (x < 1)
+ fun_l18_n154(x)
+ else
+ fun_l18_n980(x)
+ end
+end
+
+def fun_l17_n236(x)
+ if (x < 1)
+ fun_l18_n46(x)
+ else
+ fun_l18_n926(x)
+ end
+end
+
+def fun_l17_n237(x)
+ if (x < 1)
+ fun_l18_n158(x)
+ else
+ fun_l18_n364(x)
+ end
+end
+
+def fun_l17_n238(x)
+ if (x < 1)
+ fun_l18_n728(x)
+ else
+ fun_l18_n864(x)
+ end
+end
+
+def fun_l17_n239(x)
+ if (x < 1)
+ fun_l18_n793(x)
+ else
+ fun_l18_n985(x)
+ end
+end
+
+def fun_l17_n240(x)
+ if (x < 1)
+ fun_l18_n619(x)
+ else
+ fun_l18_n216(x)
+ end
+end
+
+def fun_l17_n241(x)
+ if (x < 1)
+ fun_l18_n338(x)
+ else
+ fun_l18_n289(x)
+ end
+end
+
+def fun_l17_n242(x)
+ if (x < 1)
+ fun_l18_n42(x)
+ else
+ fun_l18_n360(x)
+ end
+end
+
+def fun_l17_n243(x)
+ if (x < 1)
+ fun_l18_n883(x)
+ else
+ fun_l18_n243(x)
+ end
+end
+
+def fun_l17_n244(x)
+ if (x < 1)
+ fun_l18_n474(x)
+ else
+ fun_l18_n236(x)
+ end
+end
+
+def fun_l17_n245(x)
+ if (x < 1)
+ fun_l18_n694(x)
+ else
+ fun_l18_n579(x)
+ end
+end
+
+def fun_l17_n246(x)
+ if (x < 1)
+ fun_l18_n787(x)
+ else
+ fun_l18_n349(x)
+ end
+end
+
+def fun_l17_n247(x)
+ if (x < 1)
+ fun_l18_n140(x)
+ else
+ fun_l18_n894(x)
+ end
+end
+
+def fun_l17_n248(x)
+ if (x < 1)
+ fun_l18_n587(x)
+ else
+ fun_l18_n19(x)
+ end
+end
+
+def fun_l17_n249(x)
+ if (x < 1)
+ fun_l18_n7(x)
+ else
+ fun_l18_n352(x)
+ end
+end
+
+def fun_l17_n250(x)
+ if (x < 1)
+ fun_l18_n330(x)
+ else
+ fun_l18_n779(x)
+ end
+end
+
+def fun_l17_n251(x)
+ if (x < 1)
+ fun_l18_n655(x)
+ else
+ fun_l18_n45(x)
+ end
+end
+
+def fun_l17_n252(x)
+ if (x < 1)
+ fun_l18_n263(x)
+ else
+ fun_l18_n668(x)
+ end
+end
+
+def fun_l17_n253(x)
+ if (x < 1)
+ fun_l18_n799(x)
+ else
+ fun_l18_n141(x)
+ end
+end
+
+def fun_l17_n254(x)
+ if (x < 1)
+ fun_l18_n868(x)
+ else
+ fun_l18_n486(x)
+ end
+end
+
+def fun_l17_n255(x)
+ if (x < 1)
+ fun_l18_n238(x)
+ else
+ fun_l18_n298(x)
+ end
+end
+
+def fun_l17_n256(x)
+ if (x < 1)
+ fun_l18_n939(x)
+ else
+ fun_l18_n977(x)
+ end
+end
+
+def fun_l17_n257(x)
+ if (x < 1)
+ fun_l18_n999(x)
+ else
+ fun_l18_n241(x)
+ end
+end
+
+def fun_l17_n258(x)
+ if (x < 1)
+ fun_l18_n362(x)
+ else
+ fun_l18_n19(x)
+ end
+end
+
+def fun_l17_n259(x)
+ if (x < 1)
+ fun_l18_n166(x)
+ else
+ fun_l18_n550(x)
+ end
+end
+
+def fun_l17_n260(x)
+ if (x < 1)
+ fun_l18_n18(x)
+ else
+ fun_l18_n453(x)
+ end
+end
+
+def fun_l17_n261(x)
+ if (x < 1)
+ fun_l18_n590(x)
+ else
+ fun_l18_n217(x)
+ end
+end
+
+def fun_l17_n262(x)
+ if (x < 1)
+ fun_l18_n703(x)
+ else
+ fun_l18_n827(x)
+ end
+end
+
+def fun_l17_n263(x)
+ if (x < 1)
+ fun_l18_n911(x)
+ else
+ fun_l18_n869(x)
+ end
+end
+
+def fun_l17_n264(x)
+ if (x < 1)
+ fun_l18_n980(x)
+ else
+ fun_l18_n598(x)
+ end
+end
+
+def fun_l17_n265(x)
+ if (x < 1)
+ fun_l18_n751(x)
+ else
+ fun_l18_n298(x)
+ end
+end
+
+def fun_l17_n266(x)
+ if (x < 1)
+ fun_l18_n527(x)
+ else
+ fun_l18_n392(x)
+ end
+end
+
+def fun_l17_n267(x)
+ if (x < 1)
+ fun_l18_n257(x)
+ else
+ fun_l18_n731(x)
+ end
+end
+
+def fun_l17_n268(x)
+ if (x < 1)
+ fun_l18_n254(x)
+ else
+ fun_l18_n188(x)
+ end
+end
+
+def fun_l17_n269(x)
+ if (x < 1)
+ fun_l18_n145(x)
+ else
+ fun_l18_n987(x)
+ end
+end
+
+def fun_l17_n270(x)
+ if (x < 1)
+ fun_l18_n640(x)
+ else
+ fun_l18_n370(x)
+ end
+end
+
+def fun_l17_n271(x)
+ if (x < 1)
+ fun_l18_n767(x)
+ else
+ fun_l18_n246(x)
+ end
+end
+
+def fun_l17_n272(x)
+ if (x < 1)
+ fun_l18_n274(x)
+ else
+ fun_l18_n851(x)
+ end
+end
+
+def fun_l17_n273(x)
+ if (x < 1)
+ fun_l18_n12(x)
+ else
+ fun_l18_n48(x)
+ end
+end
+
+def fun_l17_n274(x)
+ if (x < 1)
+ fun_l18_n389(x)
+ else
+ fun_l18_n353(x)
+ end
+end
+
+def fun_l17_n275(x)
+ if (x < 1)
+ fun_l18_n966(x)
+ else
+ fun_l18_n248(x)
+ end
+end
+
+def fun_l17_n276(x)
+ if (x < 1)
+ fun_l18_n459(x)
+ else
+ fun_l18_n989(x)
+ end
+end
+
+def fun_l17_n277(x)
+ if (x < 1)
+ fun_l18_n416(x)
+ else
+ fun_l18_n976(x)
+ end
+end
+
+def fun_l17_n278(x)
+ if (x < 1)
+ fun_l18_n752(x)
+ else
+ fun_l18_n282(x)
+ end
+end
+
+def fun_l17_n279(x)
+ if (x < 1)
+ fun_l18_n774(x)
+ else
+ fun_l18_n478(x)
+ end
+end
+
+def fun_l17_n280(x)
+ if (x < 1)
+ fun_l18_n713(x)
+ else
+ fun_l18_n117(x)
+ end
+end
+
+def fun_l17_n281(x)
+ if (x < 1)
+ fun_l18_n365(x)
+ else
+ fun_l18_n932(x)
+ end
+end
+
+def fun_l17_n282(x)
+ if (x < 1)
+ fun_l18_n791(x)
+ else
+ fun_l18_n331(x)
+ end
+end
+
+def fun_l17_n283(x)
+ if (x < 1)
+ fun_l18_n955(x)
+ else
+ fun_l18_n847(x)
+ end
+end
+
+def fun_l17_n284(x)
+ if (x < 1)
+ fun_l18_n409(x)
+ else
+ fun_l18_n681(x)
+ end
+end
+
+def fun_l17_n285(x)
+ if (x < 1)
+ fun_l18_n185(x)
+ else
+ fun_l18_n651(x)
+ end
+end
+
+def fun_l17_n286(x)
+ if (x < 1)
+ fun_l18_n894(x)
+ else
+ fun_l18_n827(x)
+ end
+end
+
+def fun_l17_n287(x)
+ if (x < 1)
+ fun_l18_n788(x)
+ else
+ fun_l18_n794(x)
+ end
+end
+
+def fun_l17_n288(x)
+ if (x < 1)
+ fun_l18_n361(x)
+ else
+ fun_l18_n415(x)
+ end
+end
+
+def fun_l17_n289(x)
+ if (x < 1)
+ fun_l18_n357(x)
+ else
+ fun_l18_n375(x)
+ end
+end
+
+def fun_l17_n290(x)
+ if (x < 1)
+ fun_l18_n557(x)
+ else
+ fun_l18_n85(x)
+ end
+end
+
+def fun_l17_n291(x)
+ if (x < 1)
+ fun_l18_n490(x)
+ else
+ fun_l18_n260(x)
+ end
+end
+
+def fun_l17_n292(x)
+ if (x < 1)
+ fun_l18_n21(x)
+ else
+ fun_l18_n497(x)
+ end
+end
+
+def fun_l17_n293(x)
+ if (x < 1)
+ fun_l18_n716(x)
+ else
+ fun_l18_n94(x)
+ end
+end
+
+def fun_l17_n294(x)
+ if (x < 1)
+ fun_l18_n462(x)
+ else
+ fun_l18_n408(x)
+ end
+end
+
+def fun_l17_n295(x)
+ if (x < 1)
+ fun_l18_n87(x)
+ else
+ fun_l18_n732(x)
+ end
+end
+
+def fun_l17_n296(x)
+ if (x < 1)
+ fun_l18_n889(x)
+ else
+ fun_l18_n755(x)
+ end
+end
+
+def fun_l17_n297(x)
+ if (x < 1)
+ fun_l18_n539(x)
+ else
+ fun_l18_n130(x)
+ end
+end
+
+def fun_l17_n298(x)
+ if (x < 1)
+ fun_l18_n729(x)
+ else
+ fun_l18_n861(x)
+ end
+end
+
+def fun_l17_n299(x)
+ if (x < 1)
+ fun_l18_n605(x)
+ else
+ fun_l18_n408(x)
+ end
+end
+
+def fun_l17_n300(x)
+ if (x < 1)
+ fun_l18_n408(x)
+ else
+ fun_l18_n281(x)
+ end
+end
+
+def fun_l17_n301(x)
+ if (x < 1)
+ fun_l18_n793(x)
+ else
+ fun_l18_n188(x)
+ end
+end
+
+def fun_l17_n302(x)
+ if (x < 1)
+ fun_l18_n42(x)
+ else
+ fun_l18_n970(x)
+ end
+end
+
+def fun_l17_n303(x)
+ if (x < 1)
+ fun_l18_n904(x)
+ else
+ fun_l18_n630(x)
+ end
+end
+
+def fun_l17_n304(x)
+ if (x < 1)
+ fun_l18_n142(x)
+ else
+ fun_l18_n366(x)
+ end
+end
+
+def fun_l17_n305(x)
+ if (x < 1)
+ fun_l18_n242(x)
+ else
+ fun_l18_n111(x)
+ end
+end
+
+def fun_l17_n306(x)
+ if (x < 1)
+ fun_l18_n184(x)
+ else
+ fun_l18_n301(x)
+ end
+end
+
+def fun_l17_n307(x)
+ if (x < 1)
+ fun_l18_n297(x)
+ else
+ fun_l18_n722(x)
+ end
+end
+
+def fun_l17_n308(x)
+ if (x < 1)
+ fun_l18_n608(x)
+ else
+ fun_l18_n502(x)
+ end
+end
+
+def fun_l17_n309(x)
+ if (x < 1)
+ fun_l18_n513(x)
+ else
+ fun_l18_n828(x)
+ end
+end
+
+def fun_l17_n310(x)
+ if (x < 1)
+ fun_l18_n5(x)
+ else
+ fun_l18_n638(x)
+ end
+end
+
+def fun_l17_n311(x)
+ if (x < 1)
+ fun_l18_n404(x)
+ else
+ fun_l18_n510(x)
+ end
+end
+
+def fun_l17_n312(x)
+ if (x < 1)
+ fun_l18_n961(x)
+ else
+ fun_l18_n526(x)
+ end
+end
+
+def fun_l17_n313(x)
+ if (x < 1)
+ fun_l18_n795(x)
+ else
+ fun_l18_n24(x)
+ end
+end
+
+def fun_l17_n314(x)
+ if (x < 1)
+ fun_l18_n505(x)
+ else
+ fun_l18_n526(x)
+ end
+end
+
+def fun_l17_n315(x)
+ if (x < 1)
+ fun_l18_n458(x)
+ else
+ fun_l18_n767(x)
+ end
+end
+
+def fun_l17_n316(x)
+ if (x < 1)
+ fun_l18_n778(x)
+ else
+ fun_l18_n972(x)
+ end
+end
+
+def fun_l17_n317(x)
+ if (x < 1)
+ fun_l18_n734(x)
+ else
+ fun_l18_n289(x)
+ end
+end
+
+def fun_l17_n318(x)
+ if (x < 1)
+ fun_l18_n950(x)
+ else
+ fun_l18_n507(x)
+ end
+end
+
+def fun_l17_n319(x)
+ if (x < 1)
+ fun_l18_n597(x)
+ else
+ fun_l18_n697(x)
+ end
+end
+
+def fun_l17_n320(x)
+ if (x < 1)
+ fun_l18_n270(x)
+ else
+ fun_l18_n323(x)
+ end
+end
+
+def fun_l17_n321(x)
+ if (x < 1)
+ fun_l18_n558(x)
+ else
+ fun_l18_n357(x)
+ end
+end
+
+def fun_l17_n322(x)
+ if (x < 1)
+ fun_l18_n948(x)
+ else
+ fun_l18_n726(x)
+ end
+end
+
+def fun_l17_n323(x)
+ if (x < 1)
+ fun_l18_n787(x)
+ else
+ fun_l18_n89(x)
+ end
+end
+
+def fun_l17_n324(x)
+ if (x < 1)
+ fun_l18_n894(x)
+ else
+ fun_l18_n454(x)
+ end
+end
+
+def fun_l17_n325(x)
+ if (x < 1)
+ fun_l18_n173(x)
+ else
+ fun_l18_n815(x)
+ end
+end
+
+def fun_l17_n326(x)
+ if (x < 1)
+ fun_l18_n102(x)
+ else
+ fun_l18_n261(x)
+ end
+end
+
+def fun_l17_n327(x)
+ if (x < 1)
+ fun_l18_n83(x)
+ else
+ fun_l18_n732(x)
+ end
+end
+
+def fun_l17_n328(x)
+ if (x < 1)
+ fun_l18_n675(x)
+ else
+ fun_l18_n186(x)
+ end
+end
+
+def fun_l17_n329(x)
+ if (x < 1)
+ fun_l18_n783(x)
+ else
+ fun_l18_n481(x)
+ end
+end
+
+def fun_l17_n330(x)
+ if (x < 1)
+ fun_l18_n828(x)
+ else
+ fun_l18_n829(x)
+ end
+end
+
+def fun_l17_n331(x)
+ if (x < 1)
+ fun_l18_n195(x)
+ else
+ fun_l18_n264(x)
+ end
+end
+
+def fun_l17_n332(x)
+ if (x < 1)
+ fun_l18_n842(x)
+ else
+ fun_l18_n198(x)
+ end
+end
+
+def fun_l17_n333(x)
+ if (x < 1)
+ fun_l18_n549(x)
+ else
+ fun_l18_n208(x)
+ end
+end
+
+def fun_l17_n334(x)
+ if (x < 1)
+ fun_l18_n976(x)
+ else
+ fun_l18_n316(x)
+ end
+end
+
+def fun_l17_n335(x)
+ if (x < 1)
+ fun_l18_n401(x)
+ else
+ fun_l18_n105(x)
+ end
+end
+
+def fun_l17_n336(x)
+ if (x < 1)
+ fun_l18_n357(x)
+ else
+ fun_l18_n54(x)
+ end
+end
+
+def fun_l17_n337(x)
+ if (x < 1)
+ fun_l18_n685(x)
+ else
+ fun_l18_n140(x)
+ end
+end
+
+def fun_l17_n338(x)
+ if (x < 1)
+ fun_l18_n301(x)
+ else
+ fun_l18_n167(x)
+ end
+end
+
+def fun_l17_n339(x)
+ if (x < 1)
+ fun_l18_n398(x)
+ else
+ fun_l18_n643(x)
+ end
+end
+
+def fun_l17_n340(x)
+ if (x < 1)
+ fun_l18_n147(x)
+ else
+ fun_l18_n27(x)
+ end
+end
+
+def fun_l17_n341(x)
+ if (x < 1)
+ fun_l18_n813(x)
+ else
+ fun_l18_n935(x)
+ end
+end
+
+def fun_l17_n342(x)
+ if (x < 1)
+ fun_l18_n319(x)
+ else
+ fun_l18_n429(x)
+ end
+end
+
+def fun_l17_n343(x)
+ if (x < 1)
+ fun_l18_n957(x)
+ else
+ fun_l18_n961(x)
+ end
+end
+
+def fun_l17_n344(x)
+ if (x < 1)
+ fun_l18_n380(x)
+ else
+ fun_l18_n604(x)
+ end
+end
+
+def fun_l17_n345(x)
+ if (x < 1)
+ fun_l18_n321(x)
+ else
+ fun_l18_n473(x)
+ end
+end
+
+def fun_l17_n346(x)
+ if (x < 1)
+ fun_l18_n346(x)
+ else
+ fun_l18_n752(x)
+ end
+end
+
+def fun_l17_n347(x)
+ if (x < 1)
+ fun_l18_n645(x)
+ else
+ fun_l18_n511(x)
+ end
+end
+
+def fun_l17_n348(x)
+ if (x < 1)
+ fun_l18_n647(x)
+ else
+ fun_l18_n997(x)
+ end
+end
+
+def fun_l17_n349(x)
+ if (x < 1)
+ fun_l18_n291(x)
+ else
+ fun_l18_n580(x)
+ end
+end
+
+def fun_l17_n350(x)
+ if (x < 1)
+ fun_l18_n745(x)
+ else
+ fun_l18_n402(x)
+ end
+end
+
+def fun_l17_n351(x)
+ if (x < 1)
+ fun_l18_n533(x)
+ else
+ fun_l18_n117(x)
+ end
+end
+
+def fun_l17_n352(x)
+ if (x < 1)
+ fun_l18_n490(x)
+ else
+ fun_l18_n458(x)
+ end
+end
+
+def fun_l17_n353(x)
+ if (x < 1)
+ fun_l18_n526(x)
+ else
+ fun_l18_n311(x)
+ end
+end
+
+def fun_l17_n354(x)
+ if (x < 1)
+ fun_l18_n315(x)
+ else
+ fun_l18_n306(x)
+ end
+end
+
+def fun_l17_n355(x)
+ if (x < 1)
+ fun_l18_n349(x)
+ else
+ fun_l18_n975(x)
+ end
+end
+
+def fun_l17_n356(x)
+ if (x < 1)
+ fun_l18_n764(x)
+ else
+ fun_l18_n897(x)
+ end
+end
+
+def fun_l17_n357(x)
+ if (x < 1)
+ fun_l18_n308(x)
+ else
+ fun_l18_n662(x)
+ end
+end
+
+def fun_l17_n358(x)
+ if (x < 1)
+ fun_l18_n7(x)
+ else
+ fun_l18_n807(x)
+ end
+end
+
+def fun_l17_n359(x)
+ if (x < 1)
+ fun_l18_n896(x)
+ else
+ fun_l18_n277(x)
+ end
+end
+
+def fun_l17_n360(x)
+ if (x < 1)
+ fun_l18_n606(x)
+ else
+ fun_l18_n605(x)
+ end
+end
+
+def fun_l17_n361(x)
+ if (x < 1)
+ fun_l18_n971(x)
+ else
+ fun_l18_n59(x)
+ end
+end
+
+def fun_l17_n362(x)
+ if (x < 1)
+ fun_l18_n304(x)
+ else
+ fun_l18_n604(x)
+ end
+end
+
+def fun_l17_n363(x)
+ if (x < 1)
+ fun_l18_n607(x)
+ else
+ fun_l18_n758(x)
+ end
+end
+
+def fun_l17_n364(x)
+ if (x < 1)
+ fun_l18_n454(x)
+ else
+ fun_l18_n635(x)
+ end
+end
+
+def fun_l17_n365(x)
+ if (x < 1)
+ fun_l18_n287(x)
+ else
+ fun_l18_n979(x)
+ end
+end
+
+def fun_l17_n366(x)
+ if (x < 1)
+ fun_l18_n708(x)
+ else
+ fun_l18_n480(x)
+ end
+end
+
+def fun_l17_n367(x)
+ if (x < 1)
+ fun_l18_n925(x)
+ else
+ fun_l18_n96(x)
+ end
+end
+
+def fun_l17_n368(x)
+ if (x < 1)
+ fun_l18_n756(x)
+ else
+ fun_l18_n765(x)
+ end
+end
+
+def fun_l17_n369(x)
+ if (x < 1)
+ fun_l18_n134(x)
+ else
+ fun_l18_n320(x)
+ end
+end
+
+def fun_l17_n370(x)
+ if (x < 1)
+ fun_l18_n167(x)
+ else
+ fun_l18_n112(x)
+ end
+end
+
+def fun_l17_n371(x)
+ if (x < 1)
+ fun_l18_n393(x)
+ else
+ fun_l18_n701(x)
+ end
+end
+
+def fun_l17_n372(x)
+ if (x < 1)
+ fun_l18_n363(x)
+ else
+ fun_l18_n934(x)
+ end
+end
+
+def fun_l17_n373(x)
+ if (x < 1)
+ fun_l18_n431(x)
+ else
+ fun_l18_n343(x)
+ end
+end
+
+def fun_l17_n374(x)
+ if (x < 1)
+ fun_l18_n111(x)
+ else
+ fun_l18_n689(x)
+ end
+end
+
+def fun_l17_n375(x)
+ if (x < 1)
+ fun_l18_n609(x)
+ else
+ fun_l18_n814(x)
+ end
+end
+
+def fun_l17_n376(x)
+ if (x < 1)
+ fun_l18_n9(x)
+ else
+ fun_l18_n711(x)
+ end
+end
+
+def fun_l17_n377(x)
+ if (x < 1)
+ fun_l18_n270(x)
+ else
+ fun_l18_n455(x)
+ end
+end
+
+def fun_l17_n378(x)
+ if (x < 1)
+ fun_l18_n432(x)
+ else
+ fun_l18_n348(x)
+ end
+end
+
+def fun_l17_n379(x)
+ if (x < 1)
+ fun_l18_n646(x)
+ else
+ fun_l18_n934(x)
+ end
+end
+
+def fun_l17_n380(x)
+ if (x < 1)
+ fun_l18_n737(x)
+ else
+ fun_l18_n472(x)
+ end
+end
+
+def fun_l17_n381(x)
+ if (x < 1)
+ fun_l18_n163(x)
+ else
+ fun_l18_n533(x)
+ end
+end
+
+def fun_l17_n382(x)
+ if (x < 1)
+ fun_l18_n71(x)
+ else
+ fun_l18_n343(x)
+ end
+end
+
+def fun_l17_n383(x)
+ if (x < 1)
+ fun_l18_n52(x)
+ else
+ fun_l18_n0(x)
+ end
+end
+
+def fun_l17_n384(x)
+ if (x < 1)
+ fun_l18_n708(x)
+ else
+ fun_l18_n616(x)
+ end
+end
+
+def fun_l17_n385(x)
+ if (x < 1)
+ fun_l18_n525(x)
+ else
+ fun_l18_n818(x)
+ end
+end
+
+def fun_l17_n386(x)
+ if (x < 1)
+ fun_l18_n154(x)
+ else
+ fun_l18_n588(x)
+ end
+end
+
+def fun_l17_n387(x)
+ if (x < 1)
+ fun_l18_n295(x)
+ else
+ fun_l18_n462(x)
+ end
+end
+
+def fun_l17_n388(x)
+ if (x < 1)
+ fun_l18_n331(x)
+ else
+ fun_l18_n773(x)
+ end
+end
+
+def fun_l17_n389(x)
+ if (x < 1)
+ fun_l18_n221(x)
+ else
+ fun_l18_n168(x)
+ end
+end
+
+def fun_l17_n390(x)
+ if (x < 1)
+ fun_l18_n575(x)
+ else
+ fun_l18_n284(x)
+ end
+end
+
+def fun_l17_n391(x)
+ if (x < 1)
+ fun_l18_n936(x)
+ else
+ fun_l18_n71(x)
+ end
+end
+
+def fun_l17_n392(x)
+ if (x < 1)
+ fun_l18_n123(x)
+ else
+ fun_l18_n863(x)
+ end
+end
+
+def fun_l17_n393(x)
+ if (x < 1)
+ fun_l18_n664(x)
+ else
+ fun_l18_n189(x)
+ end
+end
+
+def fun_l17_n394(x)
+ if (x < 1)
+ fun_l18_n456(x)
+ else
+ fun_l18_n476(x)
+ end
+end
+
+def fun_l17_n395(x)
+ if (x < 1)
+ fun_l18_n557(x)
+ else
+ fun_l18_n877(x)
+ end
+end
+
+def fun_l17_n396(x)
+ if (x < 1)
+ fun_l18_n192(x)
+ else
+ fun_l18_n312(x)
+ end
+end
+
+def fun_l17_n397(x)
+ if (x < 1)
+ fun_l18_n87(x)
+ else
+ fun_l18_n56(x)
+ end
+end
+
+def fun_l17_n398(x)
+ if (x < 1)
+ fun_l18_n769(x)
+ else
+ fun_l18_n597(x)
+ end
+end
+
+def fun_l17_n399(x)
+ if (x < 1)
+ fun_l18_n534(x)
+ else
+ fun_l18_n366(x)
+ end
+end
+
+def fun_l17_n400(x)
+ if (x < 1)
+ fun_l18_n284(x)
+ else
+ fun_l18_n503(x)
+ end
+end
+
+def fun_l17_n401(x)
+ if (x < 1)
+ fun_l18_n655(x)
+ else
+ fun_l18_n242(x)
+ end
+end
+
+def fun_l17_n402(x)
+ if (x < 1)
+ fun_l18_n491(x)
+ else
+ fun_l18_n81(x)
+ end
+end
+
+def fun_l17_n403(x)
+ if (x < 1)
+ fun_l18_n861(x)
+ else
+ fun_l18_n372(x)
+ end
+end
+
+def fun_l17_n404(x)
+ if (x < 1)
+ fun_l18_n600(x)
+ else
+ fun_l18_n692(x)
+ end
+end
+
+def fun_l17_n405(x)
+ if (x < 1)
+ fun_l18_n336(x)
+ else
+ fun_l18_n778(x)
+ end
+end
+
+def fun_l17_n406(x)
+ if (x < 1)
+ fun_l18_n224(x)
+ else
+ fun_l18_n277(x)
+ end
+end
+
+def fun_l17_n407(x)
+ if (x < 1)
+ fun_l18_n630(x)
+ else
+ fun_l18_n861(x)
+ end
+end
+
+def fun_l17_n408(x)
+ if (x < 1)
+ fun_l18_n829(x)
+ else
+ fun_l18_n213(x)
+ end
+end
+
+def fun_l17_n409(x)
+ if (x < 1)
+ fun_l18_n325(x)
+ else
+ fun_l18_n599(x)
+ end
+end
+
+def fun_l17_n410(x)
+ if (x < 1)
+ fun_l18_n850(x)
+ else
+ fun_l18_n828(x)
+ end
+end
+
+def fun_l17_n411(x)
+ if (x < 1)
+ fun_l18_n557(x)
+ else
+ fun_l18_n757(x)
+ end
+end
+
+def fun_l17_n412(x)
+ if (x < 1)
+ fun_l18_n755(x)
+ else
+ fun_l18_n474(x)
+ end
+end
+
+def fun_l17_n413(x)
+ if (x < 1)
+ fun_l18_n945(x)
+ else
+ fun_l18_n113(x)
+ end
+end
+
+def fun_l17_n414(x)
+ if (x < 1)
+ fun_l18_n584(x)
+ else
+ fun_l18_n815(x)
+ end
+end
+
+def fun_l17_n415(x)
+ if (x < 1)
+ fun_l18_n136(x)
+ else
+ fun_l18_n997(x)
+ end
+end
+
+def fun_l17_n416(x)
+ if (x < 1)
+ fun_l18_n57(x)
+ else
+ fun_l18_n361(x)
+ end
+end
+
+def fun_l17_n417(x)
+ if (x < 1)
+ fun_l18_n3(x)
+ else
+ fun_l18_n882(x)
+ end
+end
+
+def fun_l17_n418(x)
+ if (x < 1)
+ fun_l18_n578(x)
+ else
+ fun_l18_n719(x)
+ end
+end
+
+def fun_l17_n419(x)
+ if (x < 1)
+ fun_l18_n426(x)
+ else
+ fun_l18_n958(x)
+ end
+end
+
+def fun_l17_n420(x)
+ if (x < 1)
+ fun_l18_n384(x)
+ else
+ fun_l18_n182(x)
+ end
+end
+
+def fun_l17_n421(x)
+ if (x < 1)
+ fun_l18_n458(x)
+ else
+ fun_l18_n314(x)
+ end
+end
+
+def fun_l17_n422(x)
+ if (x < 1)
+ fun_l18_n641(x)
+ else
+ fun_l18_n678(x)
+ end
+end
+
+def fun_l17_n423(x)
+ if (x < 1)
+ fun_l18_n790(x)
+ else
+ fun_l18_n830(x)
+ end
+end
+
+def fun_l17_n424(x)
+ if (x < 1)
+ fun_l18_n207(x)
+ else
+ fun_l18_n686(x)
+ end
+end
+
+def fun_l17_n425(x)
+ if (x < 1)
+ fun_l18_n847(x)
+ else
+ fun_l18_n387(x)
+ end
+end
+
+def fun_l17_n426(x)
+ if (x < 1)
+ fun_l18_n744(x)
+ else
+ fun_l18_n9(x)
+ end
+end
+
+def fun_l17_n427(x)
+ if (x < 1)
+ fun_l18_n446(x)
+ else
+ fun_l18_n533(x)
+ end
+end
+
+def fun_l17_n428(x)
+ if (x < 1)
+ fun_l18_n910(x)
+ else
+ fun_l18_n749(x)
+ end
+end
+
+def fun_l17_n429(x)
+ if (x < 1)
+ fun_l18_n918(x)
+ else
+ fun_l18_n260(x)
+ end
+end
+
+def fun_l17_n430(x)
+ if (x < 1)
+ fun_l18_n812(x)
+ else
+ fun_l18_n545(x)
+ end
+end
+
+def fun_l17_n431(x)
+ if (x < 1)
+ fun_l18_n191(x)
+ else
+ fun_l18_n260(x)
+ end
+end
+
+def fun_l17_n432(x)
+ if (x < 1)
+ fun_l18_n155(x)
+ else
+ fun_l18_n582(x)
+ end
+end
+
+def fun_l17_n433(x)
+ if (x < 1)
+ fun_l18_n374(x)
+ else
+ fun_l18_n991(x)
+ end
+end
+
+def fun_l17_n434(x)
+ if (x < 1)
+ fun_l18_n611(x)
+ else
+ fun_l18_n334(x)
+ end
+end
+
+def fun_l17_n435(x)
+ if (x < 1)
+ fun_l18_n876(x)
+ else
+ fun_l18_n386(x)
+ end
+end
+
+def fun_l17_n436(x)
+ if (x < 1)
+ fun_l18_n985(x)
+ else
+ fun_l18_n874(x)
+ end
+end
+
+def fun_l17_n437(x)
+ if (x < 1)
+ fun_l18_n715(x)
+ else
+ fun_l18_n52(x)
+ end
+end
+
+def fun_l17_n438(x)
+ if (x < 1)
+ fun_l18_n53(x)
+ else
+ fun_l18_n15(x)
+ end
+end
+
+def fun_l17_n439(x)
+ if (x < 1)
+ fun_l18_n689(x)
+ else
+ fun_l18_n498(x)
+ end
+end
+
+def fun_l17_n440(x)
+ if (x < 1)
+ fun_l18_n990(x)
+ else
+ fun_l18_n70(x)
+ end
+end
+
+def fun_l17_n441(x)
+ if (x < 1)
+ fun_l18_n369(x)
+ else
+ fun_l18_n327(x)
+ end
+end
+
+def fun_l17_n442(x)
+ if (x < 1)
+ fun_l18_n157(x)
+ else
+ fun_l18_n917(x)
+ end
+end
+
+def fun_l17_n443(x)
+ if (x < 1)
+ fun_l18_n822(x)
+ else
+ fun_l18_n472(x)
+ end
+end
+
+def fun_l17_n444(x)
+ if (x < 1)
+ fun_l18_n465(x)
+ else
+ fun_l18_n19(x)
+ end
+end
+
+def fun_l17_n445(x)
+ if (x < 1)
+ fun_l18_n543(x)
+ else
+ fun_l18_n499(x)
+ end
+end
+
+def fun_l17_n446(x)
+ if (x < 1)
+ fun_l18_n662(x)
+ else
+ fun_l18_n531(x)
+ end
+end
+
+def fun_l17_n447(x)
+ if (x < 1)
+ fun_l18_n452(x)
+ else
+ fun_l18_n150(x)
+ end
+end
+
+def fun_l17_n448(x)
+ if (x < 1)
+ fun_l18_n438(x)
+ else
+ fun_l18_n552(x)
+ end
+end
+
+def fun_l17_n449(x)
+ if (x < 1)
+ fun_l18_n23(x)
+ else
+ fun_l18_n89(x)
+ end
+end
+
+def fun_l17_n450(x)
+ if (x < 1)
+ fun_l18_n896(x)
+ else
+ fun_l18_n313(x)
+ end
+end
+
+def fun_l17_n451(x)
+ if (x < 1)
+ fun_l18_n221(x)
+ else
+ fun_l18_n622(x)
+ end
+end
+
+def fun_l17_n452(x)
+ if (x < 1)
+ fun_l18_n347(x)
+ else
+ fun_l18_n43(x)
+ end
+end
+
+def fun_l17_n453(x)
+ if (x < 1)
+ fun_l18_n695(x)
+ else
+ fun_l18_n5(x)
+ end
+end
+
+def fun_l17_n454(x)
+ if (x < 1)
+ fun_l18_n829(x)
+ else
+ fun_l18_n409(x)
+ end
+end
+
+def fun_l17_n455(x)
+ if (x < 1)
+ fun_l18_n398(x)
+ else
+ fun_l18_n906(x)
+ end
+end
+
+def fun_l17_n456(x)
+ if (x < 1)
+ fun_l18_n983(x)
+ else
+ fun_l18_n235(x)
+ end
+end
+
+def fun_l17_n457(x)
+ if (x < 1)
+ fun_l18_n542(x)
+ else
+ fun_l18_n819(x)
+ end
+end
+
+def fun_l17_n458(x)
+ if (x < 1)
+ fun_l18_n952(x)
+ else
+ fun_l18_n123(x)
+ end
+end
+
+def fun_l17_n459(x)
+ if (x < 1)
+ fun_l18_n249(x)
+ else
+ fun_l18_n525(x)
+ end
+end
+
+def fun_l17_n460(x)
+ if (x < 1)
+ fun_l18_n833(x)
+ else
+ fun_l18_n657(x)
+ end
+end
+
+def fun_l17_n461(x)
+ if (x < 1)
+ fun_l18_n847(x)
+ else
+ fun_l18_n396(x)
+ end
+end
+
+def fun_l17_n462(x)
+ if (x < 1)
+ fun_l18_n611(x)
+ else
+ fun_l18_n790(x)
+ end
+end
+
+def fun_l17_n463(x)
+ if (x < 1)
+ fun_l18_n944(x)
+ else
+ fun_l18_n655(x)
+ end
+end
+
+def fun_l17_n464(x)
+ if (x < 1)
+ fun_l18_n688(x)
+ else
+ fun_l18_n804(x)
+ end
+end
+
+def fun_l17_n465(x)
+ if (x < 1)
+ fun_l18_n29(x)
+ else
+ fun_l18_n324(x)
+ end
+end
+
+def fun_l17_n466(x)
+ if (x < 1)
+ fun_l18_n496(x)
+ else
+ fun_l18_n76(x)
+ end
+end
+
+def fun_l17_n467(x)
+ if (x < 1)
+ fun_l18_n317(x)
+ else
+ fun_l18_n241(x)
+ end
+end
+
+def fun_l17_n468(x)
+ if (x < 1)
+ fun_l18_n759(x)
+ else
+ fun_l18_n516(x)
+ end
+end
+
+def fun_l17_n469(x)
+ if (x < 1)
+ fun_l18_n430(x)
+ else
+ fun_l18_n355(x)
+ end
+end
+
+def fun_l17_n470(x)
+ if (x < 1)
+ fun_l18_n683(x)
+ else
+ fun_l18_n16(x)
+ end
+end
+
+def fun_l17_n471(x)
+ if (x < 1)
+ fun_l18_n46(x)
+ else
+ fun_l18_n216(x)
+ end
+end
+
+def fun_l17_n472(x)
+ if (x < 1)
+ fun_l18_n460(x)
+ else
+ fun_l18_n460(x)
+ end
+end
+
+def fun_l17_n473(x)
+ if (x < 1)
+ fun_l18_n120(x)
+ else
+ fun_l18_n189(x)
+ end
+end
+
+def fun_l17_n474(x)
+ if (x < 1)
+ fun_l18_n663(x)
+ else
+ fun_l18_n732(x)
+ end
+end
+
+def fun_l17_n475(x)
+ if (x < 1)
+ fun_l18_n441(x)
+ else
+ fun_l18_n460(x)
+ end
+end
+
+def fun_l17_n476(x)
+ if (x < 1)
+ fun_l18_n759(x)
+ else
+ fun_l18_n533(x)
+ end
+end
+
+def fun_l17_n477(x)
+ if (x < 1)
+ fun_l18_n105(x)
+ else
+ fun_l18_n671(x)
+ end
+end
+
+def fun_l17_n478(x)
+ if (x < 1)
+ fun_l18_n849(x)
+ else
+ fun_l18_n316(x)
+ end
+end
+
+def fun_l17_n479(x)
+ if (x < 1)
+ fun_l18_n482(x)
+ else
+ fun_l18_n502(x)
+ end
+end
+
+def fun_l17_n480(x)
+ if (x < 1)
+ fun_l18_n335(x)
+ else
+ fun_l18_n795(x)
+ end
+end
+
+def fun_l17_n481(x)
+ if (x < 1)
+ fun_l18_n168(x)
+ else
+ fun_l18_n799(x)
+ end
+end
+
+def fun_l17_n482(x)
+ if (x < 1)
+ fun_l18_n981(x)
+ else
+ fun_l18_n633(x)
+ end
+end
+
+def fun_l17_n483(x)
+ if (x < 1)
+ fun_l18_n873(x)
+ else
+ fun_l18_n723(x)
+ end
+end
+
+def fun_l17_n484(x)
+ if (x < 1)
+ fun_l18_n448(x)
+ else
+ fun_l18_n954(x)
+ end
+end
+
+def fun_l17_n485(x)
+ if (x < 1)
+ fun_l18_n421(x)
+ else
+ fun_l18_n802(x)
+ end
+end
+
+def fun_l17_n486(x)
+ if (x < 1)
+ fun_l18_n477(x)
+ else
+ fun_l18_n976(x)
+ end
+end
+
+def fun_l17_n487(x)
+ if (x < 1)
+ fun_l18_n53(x)
+ else
+ fun_l18_n298(x)
+ end
+end
+
+def fun_l17_n488(x)
+ if (x < 1)
+ fun_l18_n733(x)
+ else
+ fun_l18_n585(x)
+ end
+end
+
+def fun_l17_n489(x)
+ if (x < 1)
+ fun_l18_n684(x)
+ else
+ fun_l18_n537(x)
+ end
+end
+
+def fun_l17_n490(x)
+ if (x < 1)
+ fun_l18_n409(x)
+ else
+ fun_l18_n178(x)
+ end
+end
+
+def fun_l17_n491(x)
+ if (x < 1)
+ fun_l18_n335(x)
+ else
+ fun_l18_n255(x)
+ end
+end
+
+def fun_l17_n492(x)
+ if (x < 1)
+ fun_l18_n798(x)
+ else
+ fun_l18_n398(x)
+ end
+end
+
+def fun_l17_n493(x)
+ if (x < 1)
+ fun_l18_n112(x)
+ else
+ fun_l18_n83(x)
+ end
+end
+
+def fun_l17_n494(x)
+ if (x < 1)
+ fun_l18_n888(x)
+ else
+ fun_l18_n136(x)
+ end
+end
+
+def fun_l17_n495(x)
+ if (x < 1)
+ fun_l18_n726(x)
+ else
+ fun_l18_n678(x)
+ end
+end
+
+def fun_l17_n496(x)
+ if (x < 1)
+ fun_l18_n224(x)
+ else
+ fun_l18_n625(x)
+ end
+end
+
+def fun_l17_n497(x)
+ if (x < 1)
+ fun_l18_n772(x)
+ else
+ fun_l18_n14(x)
+ end
+end
+
+def fun_l17_n498(x)
+ if (x < 1)
+ fun_l18_n646(x)
+ else
+ fun_l18_n758(x)
+ end
+end
+
+def fun_l17_n499(x)
+ if (x < 1)
+ fun_l18_n961(x)
+ else
+ fun_l18_n570(x)
+ end
+end
+
+def fun_l17_n500(x)
+ if (x < 1)
+ fun_l18_n368(x)
+ else
+ fun_l18_n681(x)
+ end
+end
+
+def fun_l17_n501(x)
+ if (x < 1)
+ fun_l18_n768(x)
+ else
+ fun_l18_n747(x)
+ end
+end
+
+def fun_l17_n502(x)
+ if (x < 1)
+ fun_l18_n957(x)
+ else
+ fun_l18_n851(x)
+ end
+end
+
+def fun_l17_n503(x)
+ if (x < 1)
+ fun_l18_n669(x)
+ else
+ fun_l18_n939(x)
+ end
+end
+
+def fun_l17_n504(x)
+ if (x < 1)
+ fun_l18_n969(x)
+ else
+ fun_l18_n899(x)
+ end
+end
+
+def fun_l17_n505(x)
+ if (x < 1)
+ fun_l18_n756(x)
+ else
+ fun_l18_n29(x)
+ end
+end
+
+def fun_l17_n506(x)
+ if (x < 1)
+ fun_l18_n92(x)
+ else
+ fun_l18_n230(x)
+ end
+end
+
+def fun_l17_n507(x)
+ if (x < 1)
+ fun_l18_n670(x)
+ else
+ fun_l18_n744(x)
+ end
+end
+
+def fun_l17_n508(x)
+ if (x < 1)
+ fun_l18_n646(x)
+ else
+ fun_l18_n900(x)
+ end
+end
+
+def fun_l17_n509(x)
+ if (x < 1)
+ fun_l18_n480(x)
+ else
+ fun_l18_n6(x)
+ end
+end
+
+def fun_l17_n510(x)
+ if (x < 1)
+ fun_l18_n141(x)
+ else
+ fun_l18_n735(x)
+ end
+end
+
+def fun_l17_n511(x)
+ if (x < 1)
+ fun_l18_n622(x)
+ else
+ fun_l18_n617(x)
+ end
+end
+
+def fun_l17_n512(x)
+ if (x < 1)
+ fun_l18_n491(x)
+ else
+ fun_l18_n154(x)
+ end
+end
+
+def fun_l17_n513(x)
+ if (x < 1)
+ fun_l18_n931(x)
+ else
+ fun_l18_n730(x)
+ end
+end
+
+def fun_l17_n514(x)
+ if (x < 1)
+ fun_l18_n935(x)
+ else
+ fun_l18_n51(x)
+ end
+end
+
+def fun_l17_n515(x)
+ if (x < 1)
+ fun_l18_n751(x)
+ else
+ fun_l18_n786(x)
+ end
+end
+
+def fun_l17_n516(x)
+ if (x < 1)
+ fun_l18_n538(x)
+ else
+ fun_l18_n630(x)
+ end
+end
+
+def fun_l17_n517(x)
+ if (x < 1)
+ fun_l18_n832(x)
+ else
+ fun_l18_n932(x)
+ end
+end
+
+def fun_l17_n518(x)
+ if (x < 1)
+ fun_l18_n572(x)
+ else
+ fun_l18_n408(x)
+ end
+end
+
+def fun_l17_n519(x)
+ if (x < 1)
+ fun_l18_n961(x)
+ else
+ fun_l18_n820(x)
+ end
+end
+
+def fun_l17_n520(x)
+ if (x < 1)
+ fun_l18_n33(x)
+ else
+ fun_l18_n655(x)
+ end
+end
+
+def fun_l17_n521(x)
+ if (x < 1)
+ fun_l18_n940(x)
+ else
+ fun_l18_n436(x)
+ end
+end
+
+def fun_l17_n522(x)
+ if (x < 1)
+ fun_l18_n471(x)
+ else
+ fun_l18_n975(x)
+ end
+end
+
+def fun_l17_n523(x)
+ if (x < 1)
+ fun_l18_n752(x)
+ else
+ fun_l18_n640(x)
+ end
+end
+
+def fun_l17_n524(x)
+ if (x < 1)
+ fun_l18_n226(x)
+ else
+ fun_l18_n645(x)
+ end
+end
+
+def fun_l17_n525(x)
+ if (x < 1)
+ fun_l18_n986(x)
+ else
+ fun_l18_n858(x)
+ end
+end
+
+def fun_l17_n526(x)
+ if (x < 1)
+ fun_l18_n362(x)
+ else
+ fun_l18_n842(x)
+ end
+end
+
+def fun_l17_n527(x)
+ if (x < 1)
+ fun_l18_n273(x)
+ else
+ fun_l18_n510(x)
+ end
+end
+
+def fun_l17_n528(x)
+ if (x < 1)
+ fun_l18_n728(x)
+ else
+ fun_l18_n906(x)
+ end
+end
+
+def fun_l17_n529(x)
+ if (x < 1)
+ fun_l18_n225(x)
+ else
+ fun_l18_n988(x)
+ end
+end
+
+def fun_l17_n530(x)
+ if (x < 1)
+ fun_l18_n472(x)
+ else
+ fun_l18_n933(x)
+ end
+end
+
+def fun_l17_n531(x)
+ if (x < 1)
+ fun_l18_n105(x)
+ else
+ fun_l18_n501(x)
+ end
+end
+
+def fun_l17_n532(x)
+ if (x < 1)
+ fun_l18_n77(x)
+ else
+ fun_l18_n616(x)
+ end
+end
+
+def fun_l17_n533(x)
+ if (x < 1)
+ fun_l18_n404(x)
+ else
+ fun_l18_n86(x)
+ end
+end
+
+def fun_l17_n534(x)
+ if (x < 1)
+ fun_l18_n312(x)
+ else
+ fun_l18_n638(x)
+ end
+end
+
+def fun_l17_n535(x)
+ if (x < 1)
+ fun_l18_n908(x)
+ else
+ fun_l18_n697(x)
+ end
+end
+
+def fun_l17_n536(x)
+ if (x < 1)
+ fun_l18_n520(x)
+ else
+ fun_l18_n379(x)
+ end
+end
+
+def fun_l17_n537(x)
+ if (x < 1)
+ fun_l18_n15(x)
+ else
+ fun_l18_n97(x)
+ end
+end
+
+def fun_l17_n538(x)
+ if (x < 1)
+ fun_l18_n312(x)
+ else
+ fun_l18_n981(x)
+ end
+end
+
+def fun_l17_n539(x)
+ if (x < 1)
+ fun_l18_n901(x)
+ else
+ fun_l18_n579(x)
+ end
+end
+
+def fun_l17_n540(x)
+ if (x < 1)
+ fun_l18_n569(x)
+ else
+ fun_l18_n512(x)
+ end
+end
+
+def fun_l17_n541(x)
+ if (x < 1)
+ fun_l18_n319(x)
+ else
+ fun_l18_n388(x)
+ end
+end
+
+def fun_l17_n542(x)
+ if (x < 1)
+ fun_l18_n288(x)
+ else
+ fun_l18_n422(x)
+ end
+end
+
+def fun_l17_n543(x)
+ if (x < 1)
+ fun_l18_n873(x)
+ else
+ fun_l18_n614(x)
+ end
+end
+
+def fun_l17_n544(x)
+ if (x < 1)
+ fun_l18_n104(x)
+ else
+ fun_l18_n771(x)
+ end
+end
+
+def fun_l17_n545(x)
+ if (x < 1)
+ fun_l18_n204(x)
+ else
+ fun_l18_n452(x)
+ end
+end
+
+def fun_l17_n546(x)
+ if (x < 1)
+ fun_l18_n288(x)
+ else
+ fun_l18_n558(x)
+ end
+end
+
+def fun_l17_n547(x)
+ if (x < 1)
+ fun_l18_n265(x)
+ else
+ fun_l18_n768(x)
+ end
+end
+
+def fun_l17_n548(x)
+ if (x < 1)
+ fun_l18_n21(x)
+ else
+ fun_l18_n44(x)
+ end
+end
+
+def fun_l17_n549(x)
+ if (x < 1)
+ fun_l18_n72(x)
+ else
+ fun_l18_n321(x)
+ end
+end
+
+def fun_l17_n550(x)
+ if (x < 1)
+ fun_l18_n473(x)
+ else
+ fun_l18_n127(x)
+ end
+end
+
+def fun_l17_n551(x)
+ if (x < 1)
+ fun_l18_n188(x)
+ else
+ fun_l18_n782(x)
+ end
+end
+
+def fun_l17_n552(x)
+ if (x < 1)
+ fun_l18_n118(x)
+ else
+ fun_l18_n466(x)
+ end
+end
+
+def fun_l17_n553(x)
+ if (x < 1)
+ fun_l18_n279(x)
+ else
+ fun_l18_n605(x)
+ end
+end
+
+def fun_l17_n554(x)
+ if (x < 1)
+ fun_l18_n760(x)
+ else
+ fun_l18_n561(x)
+ end
+end
+
+def fun_l17_n555(x)
+ if (x < 1)
+ fun_l18_n873(x)
+ else
+ fun_l18_n846(x)
+ end
+end
+
+def fun_l17_n556(x)
+ if (x < 1)
+ fun_l18_n555(x)
+ else
+ fun_l18_n955(x)
+ end
+end
+
+def fun_l17_n557(x)
+ if (x < 1)
+ fun_l18_n757(x)
+ else
+ fun_l18_n171(x)
+ end
+end
+
+def fun_l17_n558(x)
+ if (x < 1)
+ fun_l18_n684(x)
+ else
+ fun_l18_n784(x)
+ end
+end
+
+def fun_l17_n559(x)
+ if (x < 1)
+ fun_l18_n457(x)
+ else
+ fun_l18_n798(x)
+ end
+end
+
+def fun_l17_n560(x)
+ if (x < 1)
+ fun_l18_n472(x)
+ else
+ fun_l18_n291(x)
+ end
+end
+
+def fun_l17_n561(x)
+ if (x < 1)
+ fun_l18_n870(x)
+ else
+ fun_l18_n395(x)
+ end
+end
+
+def fun_l17_n562(x)
+ if (x < 1)
+ fun_l18_n482(x)
+ else
+ fun_l18_n281(x)
+ end
+end
+
+def fun_l17_n563(x)
+ if (x < 1)
+ fun_l18_n761(x)
+ else
+ fun_l18_n362(x)
+ end
+end
+
+def fun_l17_n564(x)
+ if (x < 1)
+ fun_l18_n586(x)
+ else
+ fun_l18_n92(x)
+ end
+end
+
+def fun_l17_n565(x)
+ if (x < 1)
+ fun_l18_n620(x)
+ else
+ fun_l18_n356(x)
+ end
+end
+
+def fun_l17_n566(x)
+ if (x < 1)
+ fun_l18_n529(x)
+ else
+ fun_l18_n985(x)
+ end
+end
+
+def fun_l17_n567(x)
+ if (x < 1)
+ fun_l18_n351(x)
+ else
+ fun_l18_n77(x)
+ end
+end
+
+def fun_l17_n568(x)
+ if (x < 1)
+ fun_l18_n659(x)
+ else
+ fun_l18_n631(x)
+ end
+end
+
+def fun_l17_n569(x)
+ if (x < 1)
+ fun_l18_n630(x)
+ else
+ fun_l18_n466(x)
+ end
+end
+
+def fun_l17_n570(x)
+ if (x < 1)
+ fun_l18_n374(x)
+ else
+ fun_l18_n203(x)
+ end
+end
+
+def fun_l17_n571(x)
+ if (x < 1)
+ fun_l18_n479(x)
+ else
+ fun_l18_n977(x)
+ end
+end
+
+def fun_l17_n572(x)
+ if (x < 1)
+ fun_l18_n862(x)
+ else
+ fun_l18_n323(x)
+ end
+end
+
+def fun_l17_n573(x)
+ if (x < 1)
+ fun_l18_n148(x)
+ else
+ fun_l18_n848(x)
+ end
+end
+
+def fun_l17_n574(x)
+ if (x < 1)
+ fun_l18_n29(x)
+ else
+ fun_l18_n210(x)
+ end
+end
+
+def fun_l17_n575(x)
+ if (x < 1)
+ fun_l18_n39(x)
+ else
+ fun_l18_n874(x)
+ end
+end
+
+def fun_l17_n576(x)
+ if (x < 1)
+ fun_l18_n843(x)
+ else
+ fun_l18_n5(x)
+ end
+end
+
+def fun_l17_n577(x)
+ if (x < 1)
+ fun_l18_n284(x)
+ else
+ fun_l18_n242(x)
+ end
+end
+
+def fun_l17_n578(x)
+ if (x < 1)
+ fun_l18_n768(x)
+ else
+ fun_l18_n683(x)
+ end
+end
+
+def fun_l17_n579(x)
+ if (x < 1)
+ fun_l18_n67(x)
+ else
+ fun_l18_n423(x)
+ end
+end
+
+def fun_l17_n580(x)
+ if (x < 1)
+ fun_l18_n326(x)
+ else
+ fun_l18_n200(x)
+ end
+end
+
+def fun_l17_n581(x)
+ if (x < 1)
+ fun_l18_n186(x)
+ else
+ fun_l18_n772(x)
+ end
+end
+
+def fun_l17_n582(x)
+ if (x < 1)
+ fun_l18_n151(x)
+ else
+ fun_l18_n222(x)
+ end
+end
+
+def fun_l17_n583(x)
+ if (x < 1)
+ fun_l18_n690(x)
+ else
+ fun_l18_n925(x)
+ end
+end
+
+def fun_l17_n584(x)
+ if (x < 1)
+ fun_l18_n225(x)
+ else
+ fun_l18_n286(x)
+ end
+end
+
+def fun_l17_n585(x)
+ if (x < 1)
+ fun_l18_n542(x)
+ else
+ fun_l18_n703(x)
+ end
+end
+
+def fun_l17_n586(x)
+ if (x < 1)
+ fun_l18_n417(x)
+ else
+ fun_l18_n364(x)
+ end
+end
+
+def fun_l17_n587(x)
+ if (x < 1)
+ fun_l18_n540(x)
+ else
+ fun_l18_n231(x)
+ end
+end
+
+def fun_l17_n588(x)
+ if (x < 1)
+ fun_l18_n859(x)
+ else
+ fun_l18_n557(x)
+ end
+end
+
+def fun_l17_n589(x)
+ if (x < 1)
+ fun_l18_n131(x)
+ else
+ fun_l18_n847(x)
+ end
+end
+
+def fun_l17_n590(x)
+ if (x < 1)
+ fun_l18_n267(x)
+ else
+ fun_l18_n613(x)
+ end
+end
+
+def fun_l17_n591(x)
+ if (x < 1)
+ fun_l18_n273(x)
+ else
+ fun_l18_n857(x)
+ end
+end
+
+def fun_l17_n592(x)
+ if (x < 1)
+ fun_l18_n561(x)
+ else
+ fun_l18_n243(x)
+ end
+end
+
+def fun_l17_n593(x)
+ if (x < 1)
+ fun_l18_n742(x)
+ else
+ fun_l18_n123(x)
+ end
+end
+
+def fun_l17_n594(x)
+ if (x < 1)
+ fun_l18_n480(x)
+ else
+ fun_l18_n290(x)
+ end
+end
+
+def fun_l17_n595(x)
+ if (x < 1)
+ fun_l18_n56(x)
+ else
+ fun_l18_n727(x)
+ end
+end
+
+def fun_l17_n596(x)
+ if (x < 1)
+ fun_l18_n901(x)
+ else
+ fun_l18_n723(x)
+ end
+end
+
+def fun_l17_n597(x)
+ if (x < 1)
+ fun_l18_n405(x)
+ else
+ fun_l18_n498(x)
+ end
+end
+
+def fun_l17_n598(x)
+ if (x < 1)
+ fun_l18_n772(x)
+ else
+ fun_l18_n543(x)
+ end
+end
+
+def fun_l17_n599(x)
+ if (x < 1)
+ fun_l18_n20(x)
+ else
+ fun_l18_n39(x)
+ end
+end
+
+def fun_l17_n600(x)
+ if (x < 1)
+ fun_l18_n657(x)
+ else
+ fun_l18_n381(x)
+ end
+end
+
+def fun_l17_n601(x)
+ if (x < 1)
+ fun_l18_n505(x)
+ else
+ fun_l18_n196(x)
+ end
+end
+
+def fun_l17_n602(x)
+ if (x < 1)
+ fun_l18_n250(x)
+ else
+ fun_l18_n503(x)
+ end
+end
+
+def fun_l17_n603(x)
+ if (x < 1)
+ fun_l18_n694(x)
+ else
+ fun_l18_n589(x)
+ end
+end
+
+def fun_l17_n604(x)
+ if (x < 1)
+ fun_l18_n27(x)
+ else
+ fun_l18_n202(x)
+ end
+end
+
+def fun_l17_n605(x)
+ if (x < 1)
+ fun_l18_n901(x)
+ else
+ fun_l18_n823(x)
+ end
+end
+
+def fun_l17_n606(x)
+ if (x < 1)
+ fun_l18_n296(x)
+ else
+ fun_l18_n854(x)
+ end
+end
+
+def fun_l17_n607(x)
+ if (x < 1)
+ fun_l18_n226(x)
+ else
+ fun_l18_n110(x)
+ end
+end
+
+def fun_l17_n608(x)
+ if (x < 1)
+ fun_l18_n205(x)
+ else
+ fun_l18_n215(x)
+ end
+end
+
+def fun_l17_n609(x)
+ if (x < 1)
+ fun_l18_n265(x)
+ else
+ fun_l18_n715(x)
+ end
+end
+
+def fun_l17_n610(x)
+ if (x < 1)
+ fun_l18_n881(x)
+ else
+ fun_l18_n106(x)
+ end
+end
+
+def fun_l17_n611(x)
+ if (x < 1)
+ fun_l18_n674(x)
+ else
+ fun_l18_n189(x)
+ end
+end
+
+def fun_l17_n612(x)
+ if (x < 1)
+ fun_l18_n20(x)
+ else
+ fun_l18_n96(x)
+ end
+end
+
+def fun_l17_n613(x)
+ if (x < 1)
+ fun_l18_n880(x)
+ else
+ fun_l18_n599(x)
+ end
+end
+
+def fun_l17_n614(x)
+ if (x < 1)
+ fun_l18_n47(x)
+ else
+ fun_l18_n633(x)
+ end
+end
+
+def fun_l17_n615(x)
+ if (x < 1)
+ fun_l18_n7(x)
+ else
+ fun_l18_n165(x)
+ end
+end
+
+def fun_l17_n616(x)
+ if (x < 1)
+ fun_l18_n478(x)
+ else
+ fun_l18_n94(x)
+ end
+end
+
+def fun_l17_n617(x)
+ if (x < 1)
+ fun_l18_n97(x)
+ else
+ fun_l18_n369(x)
+ end
+end
+
+def fun_l17_n618(x)
+ if (x < 1)
+ fun_l18_n291(x)
+ else
+ fun_l18_n637(x)
+ end
+end
+
+def fun_l17_n619(x)
+ if (x < 1)
+ fun_l18_n966(x)
+ else
+ fun_l18_n851(x)
+ end
+end
+
+def fun_l17_n620(x)
+ if (x < 1)
+ fun_l18_n349(x)
+ else
+ fun_l18_n413(x)
+ end
+end
+
+def fun_l17_n621(x)
+ if (x < 1)
+ fun_l18_n343(x)
+ else
+ fun_l18_n224(x)
+ end
+end
+
+def fun_l17_n622(x)
+ if (x < 1)
+ fun_l18_n452(x)
+ else
+ fun_l18_n3(x)
+ end
+end
+
+def fun_l17_n623(x)
+ if (x < 1)
+ fun_l18_n539(x)
+ else
+ fun_l18_n542(x)
+ end
+end
+
+def fun_l17_n624(x)
+ if (x < 1)
+ fun_l18_n117(x)
+ else
+ fun_l18_n348(x)
+ end
+end
+
+def fun_l17_n625(x)
+ if (x < 1)
+ fun_l18_n753(x)
+ else
+ fun_l18_n284(x)
+ end
+end
+
+def fun_l17_n626(x)
+ if (x < 1)
+ fun_l18_n146(x)
+ else
+ fun_l18_n228(x)
+ end
+end
+
+def fun_l17_n627(x)
+ if (x < 1)
+ fun_l18_n286(x)
+ else
+ fun_l18_n413(x)
+ end
+end
+
+def fun_l17_n628(x)
+ if (x < 1)
+ fun_l18_n730(x)
+ else
+ fun_l18_n311(x)
+ end
+end
+
+def fun_l17_n629(x)
+ if (x < 1)
+ fun_l18_n455(x)
+ else
+ fun_l18_n141(x)
+ end
+end
+
+def fun_l17_n630(x)
+ if (x < 1)
+ fun_l18_n300(x)
+ else
+ fun_l18_n368(x)
+ end
+end
+
+def fun_l17_n631(x)
+ if (x < 1)
+ fun_l18_n490(x)
+ else
+ fun_l18_n711(x)
+ end
+end
+
+def fun_l17_n632(x)
+ if (x < 1)
+ fun_l18_n310(x)
+ else
+ fun_l18_n805(x)
+ end
+end
+
+def fun_l17_n633(x)
+ if (x < 1)
+ fun_l18_n2(x)
+ else
+ fun_l18_n709(x)
+ end
+end
+
+def fun_l17_n634(x)
+ if (x < 1)
+ fun_l18_n239(x)
+ else
+ fun_l18_n394(x)
+ end
+end
+
+def fun_l17_n635(x)
+ if (x < 1)
+ fun_l18_n933(x)
+ else
+ fun_l18_n749(x)
+ end
+end
+
+def fun_l17_n636(x)
+ if (x < 1)
+ fun_l18_n54(x)
+ else
+ fun_l18_n511(x)
+ end
+end
+
+def fun_l17_n637(x)
+ if (x < 1)
+ fun_l18_n908(x)
+ else
+ fun_l18_n550(x)
+ end
+end
+
+def fun_l17_n638(x)
+ if (x < 1)
+ fun_l18_n262(x)
+ else
+ fun_l18_n485(x)
+ end
+end
+
+def fun_l17_n639(x)
+ if (x < 1)
+ fun_l18_n676(x)
+ else
+ fun_l18_n860(x)
+ end
+end
+
+def fun_l17_n640(x)
+ if (x < 1)
+ fun_l18_n205(x)
+ else
+ fun_l18_n901(x)
+ end
+end
+
+def fun_l17_n641(x)
+ if (x < 1)
+ fun_l18_n834(x)
+ else
+ fun_l18_n133(x)
+ end
+end
+
+def fun_l17_n642(x)
+ if (x < 1)
+ fun_l18_n824(x)
+ else
+ fun_l18_n551(x)
+ end
+end
+
+def fun_l17_n643(x)
+ if (x < 1)
+ fun_l18_n362(x)
+ else
+ fun_l18_n684(x)
+ end
+end
+
+def fun_l17_n644(x)
+ if (x < 1)
+ fun_l18_n856(x)
+ else
+ fun_l18_n103(x)
+ end
+end
+
+def fun_l17_n645(x)
+ if (x < 1)
+ fun_l18_n999(x)
+ else
+ fun_l18_n995(x)
+ end
+end
+
+def fun_l17_n646(x)
+ if (x < 1)
+ fun_l18_n24(x)
+ else
+ fun_l18_n405(x)
+ end
+end
+
+def fun_l17_n647(x)
+ if (x < 1)
+ fun_l18_n71(x)
+ else
+ fun_l18_n201(x)
+ end
+end
+
+def fun_l17_n648(x)
+ if (x < 1)
+ fun_l18_n905(x)
+ else
+ fun_l18_n14(x)
+ end
+end
+
+def fun_l17_n649(x)
+ if (x < 1)
+ fun_l18_n490(x)
+ else
+ fun_l18_n932(x)
+ end
+end
+
+def fun_l17_n650(x)
+ if (x < 1)
+ fun_l18_n25(x)
+ else
+ fun_l18_n333(x)
+ end
+end
+
+def fun_l17_n651(x)
+ if (x < 1)
+ fun_l18_n282(x)
+ else
+ fun_l18_n197(x)
+ end
+end
+
+def fun_l17_n652(x)
+ if (x < 1)
+ fun_l18_n684(x)
+ else
+ fun_l18_n618(x)
+ end
+end
+
+def fun_l17_n653(x)
+ if (x < 1)
+ fun_l18_n201(x)
+ else
+ fun_l18_n571(x)
+ end
+end
+
+def fun_l17_n654(x)
+ if (x < 1)
+ fun_l18_n26(x)
+ else
+ fun_l18_n813(x)
+ end
+end
+
+def fun_l17_n655(x)
+ if (x < 1)
+ fun_l18_n879(x)
+ else
+ fun_l18_n860(x)
+ end
+end
+
+def fun_l17_n656(x)
+ if (x < 1)
+ fun_l18_n193(x)
+ else
+ fun_l18_n635(x)
+ end
+end
+
+def fun_l17_n657(x)
+ if (x < 1)
+ fun_l18_n163(x)
+ else
+ fun_l18_n601(x)
+ end
+end
+
+def fun_l17_n658(x)
+ if (x < 1)
+ fun_l18_n794(x)
+ else
+ fun_l18_n582(x)
+ end
+end
+
+def fun_l17_n659(x)
+ if (x < 1)
+ fun_l18_n22(x)
+ else
+ fun_l18_n427(x)
+ end
+end
+
+def fun_l17_n660(x)
+ if (x < 1)
+ fun_l18_n959(x)
+ else
+ fun_l18_n21(x)
+ end
+end
+
+def fun_l17_n661(x)
+ if (x < 1)
+ fun_l18_n233(x)
+ else
+ fun_l18_n852(x)
+ end
+end
+
+def fun_l17_n662(x)
+ if (x < 1)
+ fun_l18_n367(x)
+ else
+ fun_l18_n119(x)
+ end
+end
+
+def fun_l17_n663(x)
+ if (x < 1)
+ fun_l18_n511(x)
+ else
+ fun_l18_n425(x)
+ end
+end
+
+def fun_l17_n664(x)
+ if (x < 1)
+ fun_l18_n256(x)
+ else
+ fun_l18_n294(x)
+ end
+end
+
+def fun_l17_n665(x)
+ if (x < 1)
+ fun_l18_n263(x)
+ else
+ fun_l18_n549(x)
+ end
+end
+
+def fun_l17_n666(x)
+ if (x < 1)
+ fun_l18_n868(x)
+ else
+ fun_l18_n221(x)
+ end
+end
+
+def fun_l17_n667(x)
+ if (x < 1)
+ fun_l18_n703(x)
+ else
+ fun_l18_n157(x)
+ end
+end
+
+def fun_l17_n668(x)
+ if (x < 1)
+ fun_l18_n639(x)
+ else
+ fun_l18_n685(x)
+ end
+end
+
+def fun_l17_n669(x)
+ if (x < 1)
+ fun_l18_n278(x)
+ else
+ fun_l18_n366(x)
+ end
+end
+
+def fun_l17_n670(x)
+ if (x < 1)
+ fun_l18_n267(x)
+ else
+ fun_l18_n641(x)
+ end
+end
+
+def fun_l17_n671(x)
+ if (x < 1)
+ fun_l18_n452(x)
+ else
+ fun_l18_n851(x)
+ end
+end
+
+def fun_l17_n672(x)
+ if (x < 1)
+ fun_l18_n256(x)
+ else
+ fun_l18_n282(x)
+ end
+end
+
+def fun_l17_n673(x)
+ if (x < 1)
+ fun_l18_n397(x)
+ else
+ fun_l18_n446(x)
+ end
+end
+
+def fun_l17_n674(x)
+ if (x < 1)
+ fun_l18_n499(x)
+ else
+ fun_l18_n166(x)
+ end
+end
+
+def fun_l17_n675(x)
+ if (x < 1)
+ fun_l18_n299(x)
+ else
+ fun_l18_n473(x)
+ end
+end
+
+def fun_l17_n676(x)
+ if (x < 1)
+ fun_l18_n331(x)
+ else
+ fun_l18_n590(x)
+ end
+end
+
+def fun_l17_n677(x)
+ if (x < 1)
+ fun_l18_n951(x)
+ else
+ fun_l18_n227(x)
+ end
+end
+
+def fun_l17_n678(x)
+ if (x < 1)
+ fun_l18_n874(x)
+ else
+ fun_l18_n359(x)
+ end
+end
+
+def fun_l17_n679(x)
+ if (x < 1)
+ fun_l18_n187(x)
+ else
+ fun_l18_n13(x)
+ end
+end
+
+def fun_l17_n680(x)
+ if (x < 1)
+ fun_l18_n878(x)
+ else
+ fun_l18_n902(x)
+ end
+end
+
+def fun_l17_n681(x)
+ if (x < 1)
+ fun_l18_n450(x)
+ else
+ fun_l18_n262(x)
+ end
+end
+
+def fun_l17_n682(x)
+ if (x < 1)
+ fun_l18_n759(x)
+ else
+ fun_l18_n253(x)
+ end
+end
+
+def fun_l17_n683(x)
+ if (x < 1)
+ fun_l18_n199(x)
+ else
+ fun_l18_n191(x)
+ end
+end
+
+def fun_l17_n684(x)
+ if (x < 1)
+ fun_l18_n93(x)
+ else
+ fun_l18_n275(x)
+ end
+end
+
+def fun_l17_n685(x)
+ if (x < 1)
+ fun_l18_n17(x)
+ else
+ fun_l18_n575(x)
+ end
+end
+
+def fun_l17_n686(x)
+ if (x < 1)
+ fun_l18_n971(x)
+ else
+ fun_l18_n540(x)
+ end
+end
+
+def fun_l17_n687(x)
+ if (x < 1)
+ fun_l18_n942(x)
+ else
+ fun_l18_n285(x)
+ end
+end
+
+def fun_l17_n688(x)
+ if (x < 1)
+ fun_l18_n348(x)
+ else
+ fun_l18_n7(x)
+ end
+end
+
+def fun_l17_n689(x)
+ if (x < 1)
+ fun_l18_n839(x)
+ else
+ fun_l18_n532(x)
+ end
+end
+
+def fun_l17_n690(x)
+ if (x < 1)
+ fun_l18_n578(x)
+ else
+ fun_l18_n751(x)
+ end
+end
+
+def fun_l17_n691(x)
+ if (x < 1)
+ fun_l18_n85(x)
+ else
+ fun_l18_n311(x)
+ end
+end
+
+def fun_l17_n692(x)
+ if (x < 1)
+ fun_l18_n573(x)
+ else
+ fun_l18_n685(x)
+ end
+end
+
+def fun_l17_n693(x)
+ if (x < 1)
+ fun_l18_n449(x)
+ else
+ fun_l18_n749(x)
+ end
+end
+
+def fun_l17_n694(x)
+ if (x < 1)
+ fun_l18_n251(x)
+ else
+ fun_l18_n266(x)
+ end
+end
+
+def fun_l17_n695(x)
+ if (x < 1)
+ fun_l18_n69(x)
+ else
+ fun_l18_n725(x)
+ end
+end
+
+def fun_l17_n696(x)
+ if (x < 1)
+ fun_l18_n54(x)
+ else
+ fun_l18_n196(x)
+ end
+end
+
+def fun_l17_n697(x)
+ if (x < 1)
+ fun_l18_n950(x)
+ else
+ fun_l18_n423(x)
+ end
+end
+
+def fun_l17_n698(x)
+ if (x < 1)
+ fun_l18_n809(x)
+ else
+ fun_l18_n787(x)
+ end
+end
+
+def fun_l17_n699(x)
+ if (x < 1)
+ fun_l18_n211(x)
+ else
+ fun_l18_n79(x)
+ end
+end
+
+def fun_l17_n700(x)
+ if (x < 1)
+ fun_l18_n686(x)
+ else
+ fun_l18_n287(x)
+ end
+end
+
+def fun_l17_n701(x)
+ if (x < 1)
+ fun_l18_n412(x)
+ else
+ fun_l18_n769(x)
+ end
+end
+
+def fun_l17_n702(x)
+ if (x < 1)
+ fun_l18_n62(x)
+ else
+ fun_l18_n592(x)
+ end
+end
+
+def fun_l17_n703(x)
+ if (x < 1)
+ fun_l18_n628(x)
+ else
+ fun_l18_n121(x)
+ end
+end
+
+def fun_l17_n704(x)
+ if (x < 1)
+ fun_l18_n84(x)
+ else
+ fun_l18_n350(x)
+ end
+end
+
+def fun_l17_n705(x)
+ if (x < 1)
+ fun_l18_n599(x)
+ else
+ fun_l18_n174(x)
+ end
+end
+
+def fun_l17_n706(x)
+ if (x < 1)
+ fun_l18_n39(x)
+ else
+ fun_l18_n266(x)
+ end
+end
+
+def fun_l17_n707(x)
+ if (x < 1)
+ fun_l18_n196(x)
+ else
+ fun_l18_n838(x)
+ end
+end
+
+def fun_l17_n708(x)
+ if (x < 1)
+ fun_l18_n647(x)
+ else
+ fun_l18_n26(x)
+ end
+end
+
+def fun_l17_n709(x)
+ if (x < 1)
+ fun_l18_n693(x)
+ else
+ fun_l18_n660(x)
+ end
+end
+
+def fun_l17_n710(x)
+ if (x < 1)
+ fun_l18_n530(x)
+ else
+ fun_l18_n654(x)
+ end
+end
+
+def fun_l17_n711(x)
+ if (x < 1)
+ fun_l18_n580(x)
+ else
+ fun_l18_n65(x)
+ end
+end
+
+def fun_l17_n712(x)
+ if (x < 1)
+ fun_l18_n789(x)
+ else
+ fun_l18_n832(x)
+ end
+end
+
+def fun_l17_n713(x)
+ if (x < 1)
+ fun_l18_n366(x)
+ else
+ fun_l18_n168(x)
+ end
+end
+
+def fun_l17_n714(x)
+ if (x < 1)
+ fun_l18_n571(x)
+ else
+ fun_l18_n23(x)
+ end
+end
+
+def fun_l17_n715(x)
+ if (x < 1)
+ fun_l18_n552(x)
+ else
+ fun_l18_n400(x)
+ end
+end
+
+def fun_l17_n716(x)
+ if (x < 1)
+ fun_l18_n752(x)
+ else
+ fun_l18_n403(x)
+ end
+end
+
+def fun_l17_n717(x)
+ if (x < 1)
+ fun_l18_n498(x)
+ else
+ fun_l18_n173(x)
+ end
+end
+
+def fun_l17_n718(x)
+ if (x < 1)
+ fun_l18_n168(x)
+ else
+ fun_l18_n656(x)
+ end
+end
+
+def fun_l17_n719(x)
+ if (x < 1)
+ fun_l18_n75(x)
+ else
+ fun_l18_n393(x)
+ end
+end
+
+def fun_l17_n720(x)
+ if (x < 1)
+ fun_l18_n856(x)
+ else
+ fun_l18_n101(x)
+ end
+end
+
+def fun_l17_n721(x)
+ if (x < 1)
+ fun_l18_n445(x)
+ else
+ fun_l18_n846(x)
+ end
+end
+
+def fun_l17_n722(x)
+ if (x < 1)
+ fun_l18_n450(x)
+ else
+ fun_l18_n136(x)
+ end
+end
+
+def fun_l17_n723(x)
+ if (x < 1)
+ fun_l18_n267(x)
+ else
+ fun_l18_n800(x)
+ end
+end
+
+def fun_l17_n724(x)
+ if (x < 1)
+ fun_l18_n98(x)
+ else
+ fun_l18_n955(x)
+ end
+end
+
+def fun_l17_n725(x)
+ if (x < 1)
+ fun_l18_n951(x)
+ else
+ fun_l18_n319(x)
+ end
+end
+
+def fun_l17_n726(x)
+ if (x < 1)
+ fun_l18_n531(x)
+ else
+ fun_l18_n846(x)
+ end
+end
+
+def fun_l17_n727(x)
+ if (x < 1)
+ fun_l18_n888(x)
+ else
+ fun_l18_n600(x)
+ end
+end
+
+def fun_l17_n728(x)
+ if (x < 1)
+ fun_l18_n278(x)
+ else
+ fun_l18_n445(x)
+ end
+end
+
+def fun_l17_n729(x)
+ if (x < 1)
+ fun_l18_n113(x)
+ else
+ fun_l18_n991(x)
+ end
+end
+
+def fun_l17_n730(x)
+ if (x < 1)
+ fun_l18_n756(x)
+ else
+ fun_l18_n935(x)
+ end
+end
+
+def fun_l17_n731(x)
+ if (x < 1)
+ fun_l18_n2(x)
+ else
+ fun_l18_n969(x)
+ end
+end
+
+def fun_l17_n732(x)
+ if (x < 1)
+ fun_l18_n138(x)
+ else
+ fun_l18_n198(x)
+ end
+end
+
+def fun_l17_n733(x)
+ if (x < 1)
+ fun_l18_n845(x)
+ else
+ fun_l18_n614(x)
+ end
+end
+
+def fun_l17_n734(x)
+ if (x < 1)
+ fun_l18_n603(x)
+ else
+ fun_l18_n568(x)
+ end
+end
+
+def fun_l17_n735(x)
+ if (x < 1)
+ fun_l18_n276(x)
+ else
+ fun_l18_n58(x)
+ end
+end
+
+def fun_l17_n736(x)
+ if (x < 1)
+ fun_l18_n404(x)
+ else
+ fun_l18_n906(x)
+ end
+end
+
+def fun_l17_n737(x)
+ if (x < 1)
+ fun_l18_n199(x)
+ else
+ fun_l18_n734(x)
+ end
+end
+
+def fun_l17_n738(x)
+ if (x < 1)
+ fun_l18_n327(x)
+ else
+ fun_l18_n667(x)
+ end
+end
+
+def fun_l17_n739(x)
+ if (x < 1)
+ fun_l18_n600(x)
+ else
+ fun_l18_n986(x)
+ end
+end
+
+def fun_l17_n740(x)
+ if (x < 1)
+ fun_l18_n820(x)
+ else
+ fun_l18_n615(x)
+ end
+end
+
+def fun_l17_n741(x)
+ if (x < 1)
+ fun_l18_n779(x)
+ else
+ fun_l18_n912(x)
+ end
+end
+
+def fun_l17_n742(x)
+ if (x < 1)
+ fun_l18_n55(x)
+ else
+ fun_l18_n41(x)
+ end
+end
+
+def fun_l17_n743(x)
+ if (x < 1)
+ fun_l18_n24(x)
+ else
+ fun_l18_n877(x)
+ end
+end
+
+def fun_l17_n744(x)
+ if (x < 1)
+ fun_l18_n834(x)
+ else
+ fun_l18_n10(x)
+ end
+end
+
+def fun_l17_n745(x)
+ if (x < 1)
+ fun_l18_n369(x)
+ else
+ fun_l18_n761(x)
+ end
+end
+
+def fun_l17_n746(x)
+ if (x < 1)
+ fun_l18_n534(x)
+ else
+ fun_l18_n292(x)
+ end
+end
+
+def fun_l17_n747(x)
+ if (x < 1)
+ fun_l18_n260(x)
+ else
+ fun_l18_n98(x)
+ end
+end
+
+def fun_l17_n748(x)
+ if (x < 1)
+ fun_l18_n738(x)
+ else
+ fun_l18_n298(x)
+ end
+end
+
+def fun_l17_n749(x)
+ if (x < 1)
+ fun_l18_n156(x)
+ else
+ fun_l18_n322(x)
+ end
+end
+
+def fun_l17_n750(x)
+ if (x < 1)
+ fun_l18_n519(x)
+ else
+ fun_l18_n566(x)
+ end
+end
+
+def fun_l17_n751(x)
+ if (x < 1)
+ fun_l18_n599(x)
+ else
+ fun_l18_n525(x)
+ end
+end
+
+def fun_l17_n752(x)
+ if (x < 1)
+ fun_l18_n51(x)
+ else
+ fun_l18_n334(x)
+ end
+end
+
+def fun_l17_n753(x)
+ if (x < 1)
+ fun_l18_n593(x)
+ else
+ fun_l18_n799(x)
+ end
+end
+
+def fun_l17_n754(x)
+ if (x < 1)
+ fun_l18_n599(x)
+ else
+ fun_l18_n167(x)
+ end
+end
+
+def fun_l17_n755(x)
+ if (x < 1)
+ fun_l18_n799(x)
+ else
+ fun_l18_n909(x)
+ end
+end
+
+def fun_l17_n756(x)
+ if (x < 1)
+ fun_l18_n988(x)
+ else
+ fun_l18_n793(x)
+ end
+end
+
+def fun_l17_n757(x)
+ if (x < 1)
+ fun_l18_n144(x)
+ else
+ fun_l18_n279(x)
+ end
+end
+
+def fun_l17_n758(x)
+ if (x < 1)
+ fun_l18_n981(x)
+ else
+ fun_l18_n603(x)
+ end
+end
+
+def fun_l17_n759(x)
+ if (x < 1)
+ fun_l18_n576(x)
+ else
+ fun_l18_n730(x)
+ end
+end
+
+def fun_l17_n760(x)
+ if (x < 1)
+ fun_l18_n66(x)
+ else
+ fun_l18_n359(x)
+ end
+end
+
+def fun_l17_n761(x)
+ if (x < 1)
+ fun_l18_n555(x)
+ else
+ fun_l18_n553(x)
+ end
+end
+
+def fun_l17_n762(x)
+ if (x < 1)
+ fun_l18_n508(x)
+ else
+ fun_l18_n665(x)
+ end
+end
+
+def fun_l17_n763(x)
+ if (x < 1)
+ fun_l18_n911(x)
+ else
+ fun_l18_n19(x)
+ end
+end
+
+def fun_l17_n764(x)
+ if (x < 1)
+ fun_l18_n162(x)
+ else
+ fun_l18_n707(x)
+ end
+end
+
+def fun_l17_n765(x)
+ if (x < 1)
+ fun_l18_n262(x)
+ else
+ fun_l18_n494(x)
+ end
+end
+
+def fun_l17_n766(x)
+ if (x < 1)
+ fun_l18_n220(x)
+ else
+ fun_l18_n144(x)
+ end
+end
+
+def fun_l17_n767(x)
+ if (x < 1)
+ fun_l18_n245(x)
+ else
+ fun_l18_n727(x)
+ end
+end
+
+def fun_l17_n768(x)
+ if (x < 1)
+ fun_l18_n875(x)
+ else
+ fun_l18_n610(x)
+ end
+end
+
+def fun_l17_n769(x)
+ if (x < 1)
+ fun_l18_n338(x)
+ else
+ fun_l18_n344(x)
+ end
+end
+
+def fun_l17_n770(x)
+ if (x < 1)
+ fun_l18_n224(x)
+ else
+ fun_l18_n682(x)
+ end
+end
+
+def fun_l17_n771(x)
+ if (x < 1)
+ fun_l18_n353(x)
+ else
+ fun_l18_n102(x)
+ end
+end
+
+def fun_l17_n772(x)
+ if (x < 1)
+ fun_l18_n122(x)
+ else
+ fun_l18_n979(x)
+ end
+end
+
+def fun_l17_n773(x)
+ if (x < 1)
+ fun_l18_n549(x)
+ else
+ fun_l18_n296(x)
+ end
+end
+
+def fun_l17_n774(x)
+ if (x < 1)
+ fun_l18_n82(x)
+ else
+ fun_l18_n748(x)
+ end
+end
+
+def fun_l17_n775(x)
+ if (x < 1)
+ fun_l18_n958(x)
+ else
+ fun_l18_n917(x)
+ end
+end
+
+def fun_l17_n776(x)
+ if (x < 1)
+ fun_l18_n173(x)
+ else
+ fun_l18_n438(x)
+ end
+end
+
+def fun_l17_n777(x)
+ if (x < 1)
+ fun_l18_n222(x)
+ else
+ fun_l18_n55(x)
+ end
+end
+
+def fun_l17_n778(x)
+ if (x < 1)
+ fun_l18_n529(x)
+ else
+ fun_l18_n548(x)
+ end
+end
+
+def fun_l17_n779(x)
+ if (x < 1)
+ fun_l18_n28(x)
+ else
+ fun_l18_n582(x)
+ end
+end
+
+def fun_l17_n780(x)
+ if (x < 1)
+ fun_l18_n818(x)
+ else
+ fun_l18_n836(x)
+ end
+end
+
+def fun_l17_n781(x)
+ if (x < 1)
+ fun_l18_n972(x)
+ else
+ fun_l18_n73(x)
+ end
+end
+
+def fun_l17_n782(x)
+ if (x < 1)
+ fun_l18_n527(x)
+ else
+ fun_l18_n999(x)
+ end
+end
+
+def fun_l17_n783(x)
+ if (x < 1)
+ fun_l18_n832(x)
+ else
+ fun_l18_n833(x)
+ end
+end
+
+def fun_l17_n784(x)
+ if (x < 1)
+ fun_l18_n987(x)
+ else
+ fun_l18_n329(x)
+ end
+end
+
+def fun_l17_n785(x)
+ if (x < 1)
+ fun_l18_n715(x)
+ else
+ fun_l18_n441(x)
+ end
+end
+
+def fun_l17_n786(x)
+ if (x < 1)
+ fun_l18_n55(x)
+ else
+ fun_l18_n682(x)
+ end
+end
+
+def fun_l17_n787(x)
+ if (x < 1)
+ fun_l18_n606(x)
+ else
+ fun_l18_n656(x)
+ end
+end
+
+def fun_l17_n788(x)
+ if (x < 1)
+ fun_l18_n254(x)
+ else
+ fun_l18_n544(x)
+ end
+end
+
+def fun_l17_n789(x)
+ if (x < 1)
+ fun_l18_n285(x)
+ else
+ fun_l18_n585(x)
+ end
+end
+
+def fun_l17_n790(x)
+ if (x < 1)
+ fun_l18_n441(x)
+ else
+ fun_l18_n716(x)
+ end
+end
+
+def fun_l17_n791(x)
+ if (x < 1)
+ fun_l18_n415(x)
+ else
+ fun_l18_n126(x)
+ end
+end
+
+def fun_l17_n792(x)
+ if (x < 1)
+ fun_l18_n490(x)
+ else
+ fun_l18_n753(x)
+ end
+end
+
+def fun_l17_n793(x)
+ if (x < 1)
+ fun_l18_n324(x)
+ else
+ fun_l18_n223(x)
+ end
+end
+
+def fun_l17_n794(x)
+ if (x < 1)
+ fun_l18_n913(x)
+ else
+ fun_l18_n94(x)
+ end
+end
+
+def fun_l17_n795(x)
+ if (x < 1)
+ fun_l18_n879(x)
+ else
+ fun_l18_n404(x)
+ end
+end
+
+def fun_l17_n796(x)
+ if (x < 1)
+ fun_l18_n309(x)
+ else
+ fun_l18_n65(x)
+ end
+end
+
+def fun_l17_n797(x)
+ if (x < 1)
+ fun_l18_n712(x)
+ else
+ fun_l18_n947(x)
+ end
+end
+
+def fun_l17_n798(x)
+ if (x < 1)
+ fun_l18_n238(x)
+ else
+ fun_l18_n83(x)
+ end
+end
+
+def fun_l17_n799(x)
+ if (x < 1)
+ fun_l18_n25(x)
+ else
+ fun_l18_n371(x)
+ end
+end
+
+def fun_l17_n800(x)
+ if (x < 1)
+ fun_l18_n501(x)
+ else
+ fun_l18_n386(x)
+ end
+end
+
+def fun_l17_n801(x)
+ if (x < 1)
+ fun_l18_n453(x)
+ else
+ fun_l18_n168(x)
+ end
+end
+
+def fun_l17_n802(x)
+ if (x < 1)
+ fun_l18_n763(x)
+ else
+ fun_l18_n675(x)
+ end
+end
+
+def fun_l17_n803(x)
+ if (x < 1)
+ fun_l18_n984(x)
+ else
+ fun_l18_n882(x)
+ end
+end
+
+def fun_l17_n804(x)
+ if (x < 1)
+ fun_l18_n545(x)
+ else
+ fun_l18_n79(x)
+ end
+end
+
+def fun_l17_n805(x)
+ if (x < 1)
+ fun_l18_n263(x)
+ else
+ fun_l18_n143(x)
+ end
+end
+
+def fun_l17_n806(x)
+ if (x < 1)
+ fun_l18_n232(x)
+ else
+ fun_l18_n864(x)
+ end
+end
+
+def fun_l17_n807(x)
+ if (x < 1)
+ fun_l18_n6(x)
+ else
+ fun_l18_n983(x)
+ end
+end
+
+def fun_l17_n808(x)
+ if (x < 1)
+ fun_l18_n17(x)
+ else
+ fun_l18_n426(x)
+ end
+end
+
+def fun_l17_n809(x)
+ if (x < 1)
+ fun_l18_n1(x)
+ else
+ fun_l18_n669(x)
+ end
+end
+
+def fun_l17_n810(x)
+ if (x < 1)
+ fun_l18_n191(x)
+ else
+ fun_l18_n540(x)
+ end
+end
+
+def fun_l17_n811(x)
+ if (x < 1)
+ fun_l18_n16(x)
+ else
+ fun_l18_n871(x)
+ end
+end
+
+def fun_l17_n812(x)
+ if (x < 1)
+ fun_l18_n352(x)
+ else
+ fun_l18_n156(x)
+ end
+end
+
+def fun_l17_n813(x)
+ if (x < 1)
+ fun_l18_n239(x)
+ else
+ fun_l18_n314(x)
+ end
+end
+
+def fun_l17_n814(x)
+ if (x < 1)
+ fun_l18_n890(x)
+ else
+ fun_l18_n21(x)
+ end
+end
+
+def fun_l17_n815(x)
+ if (x < 1)
+ fun_l18_n894(x)
+ else
+ fun_l18_n894(x)
+ end
+end
+
+def fun_l17_n816(x)
+ if (x < 1)
+ fun_l18_n75(x)
+ else
+ fun_l18_n631(x)
+ end
+end
+
+def fun_l17_n817(x)
+ if (x < 1)
+ fun_l18_n118(x)
+ else
+ fun_l18_n857(x)
+ end
+end
+
+def fun_l17_n818(x)
+ if (x < 1)
+ fun_l18_n403(x)
+ else
+ fun_l18_n364(x)
+ end
+end
+
+def fun_l17_n819(x)
+ if (x < 1)
+ fun_l18_n15(x)
+ else
+ fun_l18_n232(x)
+ end
+end
+
+def fun_l17_n820(x)
+ if (x < 1)
+ fun_l18_n610(x)
+ else
+ fun_l18_n43(x)
+ end
+end
+
+def fun_l17_n821(x)
+ if (x < 1)
+ fun_l18_n949(x)
+ else
+ fun_l18_n884(x)
+ end
+end
+
+def fun_l17_n822(x)
+ if (x < 1)
+ fun_l18_n387(x)
+ else
+ fun_l18_n587(x)
+ end
+end
+
+def fun_l17_n823(x)
+ if (x < 1)
+ fun_l18_n99(x)
+ else
+ fun_l18_n653(x)
+ end
+end
+
+def fun_l17_n824(x)
+ if (x < 1)
+ fun_l18_n41(x)
+ else
+ fun_l18_n822(x)
+ end
+end
+
+def fun_l17_n825(x)
+ if (x < 1)
+ fun_l18_n325(x)
+ else
+ fun_l18_n735(x)
+ end
+end
+
+def fun_l17_n826(x)
+ if (x < 1)
+ fun_l18_n415(x)
+ else
+ fun_l18_n684(x)
+ end
+end
+
+def fun_l17_n827(x)
+ if (x < 1)
+ fun_l18_n856(x)
+ else
+ fun_l18_n257(x)
+ end
+end
+
+def fun_l17_n828(x)
+ if (x < 1)
+ fun_l18_n455(x)
+ else
+ fun_l18_n200(x)
+ end
+end
+
+def fun_l17_n829(x)
+ if (x < 1)
+ fun_l18_n486(x)
+ else
+ fun_l18_n528(x)
+ end
+end
+
+def fun_l17_n830(x)
+ if (x < 1)
+ fun_l18_n321(x)
+ else
+ fun_l18_n619(x)
+ end
+end
+
+def fun_l17_n831(x)
+ if (x < 1)
+ fun_l18_n910(x)
+ else
+ fun_l18_n796(x)
+ end
+end
+
+def fun_l17_n832(x)
+ if (x < 1)
+ fun_l18_n303(x)
+ else
+ fun_l18_n278(x)
+ end
+end
+
+def fun_l17_n833(x)
+ if (x < 1)
+ fun_l18_n477(x)
+ else
+ fun_l18_n733(x)
+ end
+end
+
+def fun_l17_n834(x)
+ if (x < 1)
+ fun_l18_n320(x)
+ else
+ fun_l18_n801(x)
+ end
+end
+
+def fun_l17_n835(x)
+ if (x < 1)
+ fun_l18_n672(x)
+ else
+ fun_l18_n183(x)
+ end
+end
+
+def fun_l17_n836(x)
+ if (x < 1)
+ fun_l18_n810(x)
+ else
+ fun_l18_n923(x)
+ end
+end
+
+def fun_l17_n837(x)
+ if (x < 1)
+ fun_l18_n775(x)
+ else
+ fun_l18_n884(x)
+ end
+end
+
+def fun_l17_n838(x)
+ if (x < 1)
+ fun_l18_n9(x)
+ else
+ fun_l18_n690(x)
+ end
+end
+
+def fun_l17_n839(x)
+ if (x < 1)
+ fun_l18_n843(x)
+ else
+ fun_l18_n482(x)
+ end
+end
+
+def fun_l17_n840(x)
+ if (x < 1)
+ fun_l18_n527(x)
+ else
+ fun_l18_n331(x)
+ end
+end
+
+def fun_l17_n841(x)
+ if (x < 1)
+ fun_l18_n210(x)
+ else
+ fun_l18_n119(x)
+ end
+end
+
+def fun_l17_n842(x)
+ if (x < 1)
+ fun_l18_n365(x)
+ else
+ fun_l18_n752(x)
+ end
+end
+
+def fun_l17_n843(x)
+ if (x < 1)
+ fun_l18_n855(x)
+ else
+ fun_l18_n149(x)
+ end
+end
+
+def fun_l17_n844(x)
+ if (x < 1)
+ fun_l18_n822(x)
+ else
+ fun_l18_n852(x)
+ end
+end
+
+def fun_l17_n845(x)
+ if (x < 1)
+ fun_l18_n182(x)
+ else
+ fun_l18_n145(x)
+ end
+end
+
+def fun_l17_n846(x)
+ if (x < 1)
+ fun_l18_n167(x)
+ else
+ fun_l18_n47(x)
+ end
+end
+
+def fun_l17_n847(x)
+ if (x < 1)
+ fun_l18_n350(x)
+ else
+ fun_l18_n894(x)
+ end
+end
+
+def fun_l17_n848(x)
+ if (x < 1)
+ fun_l18_n264(x)
+ else
+ fun_l18_n739(x)
+ end
+end
+
+def fun_l17_n849(x)
+ if (x < 1)
+ fun_l18_n475(x)
+ else
+ fun_l18_n974(x)
+ end
+end
+
+def fun_l17_n850(x)
+ if (x < 1)
+ fun_l18_n849(x)
+ else
+ fun_l18_n68(x)
+ end
+end
+
+def fun_l17_n851(x)
+ if (x < 1)
+ fun_l18_n160(x)
+ else
+ fun_l18_n173(x)
+ end
+end
+
+def fun_l17_n852(x)
+ if (x < 1)
+ fun_l18_n353(x)
+ else
+ fun_l18_n931(x)
+ end
+end
+
+def fun_l17_n853(x)
+ if (x < 1)
+ fun_l18_n706(x)
+ else
+ fun_l18_n540(x)
+ end
+end
+
+def fun_l17_n854(x)
+ if (x < 1)
+ fun_l18_n559(x)
+ else
+ fun_l18_n149(x)
+ end
+end
+
+def fun_l17_n855(x)
+ if (x < 1)
+ fun_l18_n347(x)
+ else
+ fun_l18_n559(x)
+ end
+end
+
+def fun_l17_n856(x)
+ if (x < 1)
+ fun_l18_n640(x)
+ else
+ fun_l18_n529(x)
+ end
+end
+
+def fun_l17_n857(x)
+ if (x < 1)
+ fun_l18_n410(x)
+ else
+ fun_l18_n278(x)
+ end
+end
+
+def fun_l17_n858(x)
+ if (x < 1)
+ fun_l18_n15(x)
+ else
+ fun_l18_n21(x)
+ end
+end
+
+def fun_l17_n859(x)
+ if (x < 1)
+ fun_l18_n180(x)
+ else
+ fun_l18_n530(x)
+ end
+end
+
+def fun_l17_n860(x)
+ if (x < 1)
+ fun_l18_n739(x)
+ else
+ fun_l18_n817(x)
+ end
+end
+
+def fun_l17_n861(x)
+ if (x < 1)
+ fun_l18_n341(x)
+ else
+ fun_l18_n962(x)
+ end
+end
+
+def fun_l17_n862(x)
+ if (x < 1)
+ fun_l18_n994(x)
+ else
+ fun_l18_n338(x)
+ end
+end
+
+def fun_l17_n863(x)
+ if (x < 1)
+ fun_l18_n428(x)
+ else
+ fun_l18_n608(x)
+ end
+end
+
+def fun_l17_n864(x)
+ if (x < 1)
+ fun_l18_n889(x)
+ else
+ fun_l18_n974(x)
+ end
+end
+
+def fun_l17_n865(x)
+ if (x < 1)
+ fun_l18_n300(x)
+ else
+ fun_l18_n164(x)
+ end
+end
+
+def fun_l17_n866(x)
+ if (x < 1)
+ fun_l18_n195(x)
+ else
+ fun_l18_n75(x)
+ end
+end
+
+def fun_l17_n867(x)
+ if (x < 1)
+ fun_l18_n725(x)
+ else
+ fun_l18_n639(x)
+ end
+end
+
+def fun_l17_n868(x)
+ if (x < 1)
+ fun_l18_n793(x)
+ else
+ fun_l18_n925(x)
+ end
+end
+
+def fun_l17_n869(x)
+ if (x < 1)
+ fun_l18_n845(x)
+ else
+ fun_l18_n174(x)
+ end
+end
+
+def fun_l17_n870(x)
+ if (x < 1)
+ fun_l18_n202(x)
+ else
+ fun_l18_n376(x)
+ end
+end
+
+def fun_l17_n871(x)
+ if (x < 1)
+ fun_l18_n503(x)
+ else
+ fun_l18_n441(x)
+ end
+end
+
+def fun_l17_n872(x)
+ if (x < 1)
+ fun_l18_n675(x)
+ else
+ fun_l18_n180(x)
+ end
+end
+
+def fun_l17_n873(x)
+ if (x < 1)
+ fun_l18_n457(x)
+ else
+ fun_l18_n286(x)
+ end
+end
+
+def fun_l17_n874(x)
+ if (x < 1)
+ fun_l18_n918(x)
+ else
+ fun_l18_n438(x)
+ end
+end
+
+def fun_l17_n875(x)
+ if (x < 1)
+ fun_l18_n269(x)
+ else
+ fun_l18_n539(x)
+ end
+end
+
+def fun_l17_n876(x)
+ if (x < 1)
+ fun_l18_n417(x)
+ else
+ fun_l18_n68(x)
+ end
+end
+
+def fun_l17_n877(x)
+ if (x < 1)
+ fun_l18_n382(x)
+ else
+ fun_l18_n392(x)
+ end
+end
+
+def fun_l17_n878(x)
+ if (x < 1)
+ fun_l18_n981(x)
+ else
+ fun_l18_n997(x)
+ end
+end
+
+def fun_l17_n879(x)
+ if (x < 1)
+ fun_l18_n8(x)
+ else
+ fun_l18_n255(x)
+ end
+end
+
+def fun_l17_n880(x)
+ if (x < 1)
+ fun_l18_n634(x)
+ else
+ fun_l18_n971(x)
+ end
+end
+
+def fun_l17_n881(x)
+ if (x < 1)
+ fun_l18_n940(x)
+ else
+ fun_l18_n410(x)
+ end
+end
+
+def fun_l17_n882(x)
+ if (x < 1)
+ fun_l18_n550(x)
+ else
+ fun_l18_n959(x)
+ end
+end
+
+def fun_l17_n883(x)
+ if (x < 1)
+ fun_l18_n258(x)
+ else
+ fun_l18_n766(x)
+ end
+end
+
+def fun_l17_n884(x)
+ if (x < 1)
+ fun_l18_n841(x)
+ else
+ fun_l18_n387(x)
+ end
+end
+
+def fun_l17_n885(x)
+ if (x < 1)
+ fun_l18_n357(x)
+ else
+ fun_l18_n128(x)
+ end
+end
+
+def fun_l17_n886(x)
+ if (x < 1)
+ fun_l18_n872(x)
+ else
+ fun_l18_n471(x)
+ end
+end
+
+def fun_l17_n887(x)
+ if (x < 1)
+ fun_l18_n596(x)
+ else
+ fun_l18_n639(x)
+ end
+end
+
+def fun_l17_n888(x)
+ if (x < 1)
+ fun_l18_n665(x)
+ else
+ fun_l18_n999(x)
+ end
+end
+
+def fun_l17_n889(x)
+ if (x < 1)
+ fun_l18_n898(x)
+ else
+ fun_l18_n899(x)
+ end
+end
+
+def fun_l17_n890(x)
+ if (x < 1)
+ fun_l18_n457(x)
+ else
+ fun_l18_n370(x)
+ end
+end
+
+def fun_l17_n891(x)
+ if (x < 1)
+ fun_l18_n100(x)
+ else
+ fun_l18_n899(x)
+ end
+end
+
+def fun_l17_n892(x)
+ if (x < 1)
+ fun_l18_n785(x)
+ else
+ fun_l18_n552(x)
+ end
+end
+
+def fun_l17_n893(x)
+ if (x < 1)
+ fun_l18_n386(x)
+ else
+ fun_l18_n971(x)
+ end
+end
+
+def fun_l17_n894(x)
+ if (x < 1)
+ fun_l18_n128(x)
+ else
+ fun_l18_n28(x)
+ end
+end
+
+def fun_l17_n895(x)
+ if (x < 1)
+ fun_l18_n18(x)
+ else
+ fun_l18_n682(x)
+ end
+end
+
+def fun_l17_n896(x)
+ if (x < 1)
+ fun_l18_n470(x)
+ else
+ fun_l18_n477(x)
+ end
+end
+
+def fun_l17_n897(x)
+ if (x < 1)
+ fun_l18_n543(x)
+ else
+ fun_l18_n943(x)
+ end
+end
+
+def fun_l17_n898(x)
+ if (x < 1)
+ fun_l18_n554(x)
+ else
+ fun_l18_n431(x)
+ end
+end
+
+def fun_l17_n899(x)
+ if (x < 1)
+ fun_l18_n615(x)
+ else
+ fun_l18_n480(x)
+ end
+end
+
+def fun_l17_n900(x)
+ if (x < 1)
+ fun_l18_n557(x)
+ else
+ fun_l18_n831(x)
+ end
+end
+
+def fun_l17_n901(x)
+ if (x < 1)
+ fun_l18_n245(x)
+ else
+ fun_l18_n79(x)
+ end
+end
+
+def fun_l17_n902(x)
+ if (x < 1)
+ fun_l18_n332(x)
+ else
+ fun_l18_n536(x)
+ end
+end
+
+def fun_l17_n903(x)
+ if (x < 1)
+ fun_l18_n531(x)
+ else
+ fun_l18_n933(x)
+ end
+end
+
+def fun_l17_n904(x)
+ if (x < 1)
+ fun_l18_n748(x)
+ else
+ fun_l18_n210(x)
+ end
+end
+
+def fun_l17_n905(x)
+ if (x < 1)
+ fun_l18_n351(x)
+ else
+ fun_l18_n698(x)
+ end
+end
+
+def fun_l17_n906(x)
+ if (x < 1)
+ fun_l18_n112(x)
+ else
+ fun_l18_n397(x)
+ end
+end
+
+def fun_l17_n907(x)
+ if (x < 1)
+ fun_l18_n177(x)
+ else
+ fun_l18_n826(x)
+ end
+end
+
+def fun_l17_n908(x)
+ if (x < 1)
+ fun_l18_n635(x)
+ else
+ fun_l18_n885(x)
+ end
+end
+
+def fun_l17_n909(x)
+ if (x < 1)
+ fun_l18_n225(x)
+ else
+ fun_l18_n139(x)
+ end
+end
+
+def fun_l17_n910(x)
+ if (x < 1)
+ fun_l18_n30(x)
+ else
+ fun_l18_n113(x)
+ end
+end
+
+def fun_l17_n911(x)
+ if (x < 1)
+ fun_l18_n5(x)
+ else
+ fun_l18_n324(x)
+ end
+end
+
+def fun_l17_n912(x)
+ if (x < 1)
+ fun_l18_n626(x)
+ else
+ fun_l18_n326(x)
+ end
+end
+
+def fun_l17_n913(x)
+ if (x < 1)
+ fun_l18_n478(x)
+ else
+ fun_l18_n373(x)
+ end
+end
+
+def fun_l17_n914(x)
+ if (x < 1)
+ fun_l18_n348(x)
+ else
+ fun_l18_n420(x)
+ end
+end
+
+def fun_l17_n915(x)
+ if (x < 1)
+ fun_l18_n777(x)
+ else
+ fun_l18_n185(x)
+ end
+end
+
+def fun_l17_n916(x)
+ if (x < 1)
+ fun_l18_n18(x)
+ else
+ fun_l18_n286(x)
+ end
+end
+
+def fun_l17_n917(x)
+ if (x < 1)
+ fun_l18_n199(x)
+ else
+ fun_l18_n378(x)
+ end
+end
+
+def fun_l17_n918(x)
+ if (x < 1)
+ fun_l18_n282(x)
+ else
+ fun_l18_n617(x)
+ end
+end
+
+def fun_l17_n919(x)
+ if (x < 1)
+ fun_l18_n634(x)
+ else
+ fun_l18_n396(x)
+ end
+end
+
+def fun_l17_n920(x)
+ if (x < 1)
+ fun_l18_n630(x)
+ else
+ fun_l18_n479(x)
+ end
+end
+
+def fun_l17_n921(x)
+ if (x < 1)
+ fun_l18_n828(x)
+ else
+ fun_l18_n189(x)
+ end
+end
+
+def fun_l17_n922(x)
+ if (x < 1)
+ fun_l18_n468(x)
+ else
+ fun_l18_n400(x)
+ end
+end
+
+def fun_l17_n923(x)
+ if (x < 1)
+ fun_l18_n815(x)
+ else
+ fun_l18_n0(x)
+ end
+end
+
+def fun_l17_n924(x)
+ if (x < 1)
+ fun_l18_n796(x)
+ else
+ fun_l18_n357(x)
+ end
+end
+
+def fun_l17_n925(x)
+ if (x < 1)
+ fun_l18_n4(x)
+ else
+ fun_l18_n293(x)
+ end
+end
+
+def fun_l17_n926(x)
+ if (x < 1)
+ fun_l18_n187(x)
+ else
+ fun_l18_n131(x)
+ end
+end
+
+def fun_l17_n927(x)
+ if (x < 1)
+ fun_l18_n896(x)
+ else
+ fun_l18_n257(x)
+ end
+end
+
+def fun_l17_n928(x)
+ if (x < 1)
+ fun_l18_n596(x)
+ else
+ fun_l18_n115(x)
+ end
+end
+
+def fun_l17_n929(x)
+ if (x < 1)
+ fun_l18_n630(x)
+ else
+ fun_l18_n62(x)
+ end
+end
+
+def fun_l17_n930(x)
+ if (x < 1)
+ fun_l18_n776(x)
+ else
+ fun_l18_n664(x)
+ end
+end
+
+def fun_l17_n931(x)
+ if (x < 1)
+ fun_l18_n424(x)
+ else
+ fun_l18_n298(x)
+ end
+end
+
+def fun_l17_n932(x)
+ if (x < 1)
+ fun_l18_n734(x)
+ else
+ fun_l18_n652(x)
+ end
+end
+
+def fun_l17_n933(x)
+ if (x < 1)
+ fun_l18_n796(x)
+ else
+ fun_l18_n8(x)
+ end
+end
+
+def fun_l17_n934(x)
+ if (x < 1)
+ fun_l18_n783(x)
+ else
+ fun_l18_n177(x)
+ end
+end
+
+def fun_l17_n935(x)
+ if (x < 1)
+ fun_l18_n288(x)
+ else
+ fun_l18_n274(x)
+ end
+end
+
+def fun_l17_n936(x)
+ if (x < 1)
+ fun_l18_n289(x)
+ else
+ fun_l18_n938(x)
+ end
+end
+
+def fun_l17_n937(x)
+ if (x < 1)
+ fun_l18_n815(x)
+ else
+ fun_l18_n924(x)
+ end
+end
+
+def fun_l17_n938(x)
+ if (x < 1)
+ fun_l18_n145(x)
+ else
+ fun_l18_n497(x)
+ end
+end
+
+def fun_l17_n939(x)
+ if (x < 1)
+ fun_l18_n433(x)
+ else
+ fun_l18_n628(x)
+ end
+end
+
+def fun_l17_n940(x)
+ if (x < 1)
+ fun_l18_n410(x)
+ else
+ fun_l18_n461(x)
+ end
+end
+
+def fun_l17_n941(x)
+ if (x < 1)
+ fun_l18_n682(x)
+ else
+ fun_l18_n81(x)
+ end
+end
+
+def fun_l17_n942(x)
+ if (x < 1)
+ fun_l18_n948(x)
+ else
+ fun_l18_n29(x)
+ end
+end
+
+def fun_l17_n943(x)
+ if (x < 1)
+ fun_l18_n78(x)
+ else
+ fun_l18_n237(x)
+ end
+end
+
+def fun_l17_n944(x)
+ if (x < 1)
+ fun_l18_n683(x)
+ else
+ fun_l18_n936(x)
+ end
+end
+
+def fun_l17_n945(x)
+ if (x < 1)
+ fun_l18_n339(x)
+ else
+ fun_l18_n471(x)
+ end
+end
+
+def fun_l17_n946(x)
+ if (x < 1)
+ fun_l18_n903(x)
+ else
+ fun_l18_n983(x)
+ end
+end
+
+def fun_l17_n947(x)
+ if (x < 1)
+ fun_l18_n231(x)
+ else
+ fun_l18_n985(x)
+ end
+end
+
+def fun_l17_n948(x)
+ if (x < 1)
+ fun_l18_n379(x)
+ else
+ fun_l18_n385(x)
+ end
+end
+
+def fun_l17_n949(x)
+ if (x < 1)
+ fun_l18_n89(x)
+ else
+ fun_l18_n499(x)
+ end
+end
+
+def fun_l17_n950(x)
+ if (x < 1)
+ fun_l18_n851(x)
+ else
+ fun_l18_n563(x)
+ end
+end
+
+def fun_l17_n951(x)
+ if (x < 1)
+ fun_l18_n803(x)
+ else
+ fun_l18_n109(x)
+ end
+end
+
+def fun_l17_n952(x)
+ if (x < 1)
+ fun_l18_n178(x)
+ else
+ fun_l18_n886(x)
+ end
+end
+
+def fun_l17_n953(x)
+ if (x < 1)
+ fun_l18_n705(x)
+ else
+ fun_l18_n340(x)
+ end
+end
+
+def fun_l17_n954(x)
+ if (x < 1)
+ fun_l18_n207(x)
+ else
+ fun_l18_n499(x)
+ end
+end
+
+def fun_l17_n955(x)
+ if (x < 1)
+ fun_l18_n298(x)
+ else
+ fun_l18_n921(x)
+ end
+end
+
+def fun_l17_n956(x)
+ if (x < 1)
+ fun_l18_n291(x)
+ else
+ fun_l18_n768(x)
+ end
+end
+
+def fun_l17_n957(x)
+ if (x < 1)
+ fun_l18_n144(x)
+ else
+ fun_l18_n316(x)
+ end
+end
+
+def fun_l17_n958(x)
+ if (x < 1)
+ fun_l18_n375(x)
+ else
+ fun_l18_n891(x)
+ end
+end
+
+def fun_l17_n959(x)
+ if (x < 1)
+ fun_l18_n989(x)
+ else
+ fun_l18_n773(x)
+ end
+end
+
+def fun_l17_n960(x)
+ if (x < 1)
+ fun_l18_n615(x)
+ else
+ fun_l18_n252(x)
+ end
+end
+
+def fun_l17_n961(x)
+ if (x < 1)
+ fun_l18_n827(x)
+ else
+ fun_l18_n567(x)
+ end
+end
+
+def fun_l17_n962(x)
+ if (x < 1)
+ fun_l18_n792(x)
+ else
+ fun_l18_n81(x)
+ end
+end
+
+def fun_l17_n963(x)
+ if (x < 1)
+ fun_l18_n561(x)
+ else
+ fun_l18_n732(x)
+ end
+end
+
+def fun_l17_n964(x)
+ if (x < 1)
+ fun_l18_n113(x)
+ else
+ fun_l18_n110(x)
+ end
+end
+
+def fun_l17_n965(x)
+ if (x < 1)
+ fun_l18_n321(x)
+ else
+ fun_l18_n557(x)
+ end
+end
+
+def fun_l17_n966(x)
+ if (x < 1)
+ fun_l18_n409(x)
+ else
+ fun_l18_n449(x)
+ end
+end
+
+def fun_l17_n967(x)
+ if (x < 1)
+ fun_l18_n316(x)
+ else
+ fun_l18_n669(x)
+ end
+end
+
+def fun_l17_n968(x)
+ if (x < 1)
+ fun_l18_n190(x)
+ else
+ fun_l18_n450(x)
+ end
+end
+
+def fun_l17_n969(x)
+ if (x < 1)
+ fun_l18_n174(x)
+ else
+ fun_l18_n425(x)
+ end
+end
+
+def fun_l17_n970(x)
+ if (x < 1)
+ fun_l18_n918(x)
+ else
+ fun_l18_n537(x)
+ end
+end
+
+def fun_l17_n971(x)
+ if (x < 1)
+ fun_l18_n923(x)
+ else
+ fun_l18_n998(x)
+ end
+end
+
+def fun_l17_n972(x)
+ if (x < 1)
+ fun_l18_n625(x)
+ else
+ fun_l18_n75(x)
+ end
+end
+
+def fun_l17_n973(x)
+ if (x < 1)
+ fun_l18_n171(x)
+ else
+ fun_l18_n180(x)
+ end
+end
+
+def fun_l17_n974(x)
+ if (x < 1)
+ fun_l18_n430(x)
+ else
+ fun_l18_n659(x)
+ end
+end
+
+def fun_l17_n975(x)
+ if (x < 1)
+ fun_l18_n88(x)
+ else
+ fun_l18_n363(x)
+ end
+end
+
+def fun_l17_n976(x)
+ if (x < 1)
+ fun_l18_n408(x)
+ else
+ fun_l18_n986(x)
+ end
+end
+
+def fun_l17_n977(x)
+ if (x < 1)
+ fun_l18_n988(x)
+ else
+ fun_l18_n818(x)
+ end
+end
+
+def fun_l17_n978(x)
+ if (x < 1)
+ fun_l18_n824(x)
+ else
+ fun_l18_n24(x)
+ end
+end
+
+def fun_l17_n979(x)
+ if (x < 1)
+ fun_l18_n182(x)
+ else
+ fun_l18_n969(x)
+ end
+end
+
+def fun_l17_n980(x)
+ if (x < 1)
+ fun_l18_n187(x)
+ else
+ fun_l18_n615(x)
+ end
+end
+
+def fun_l17_n981(x)
+ if (x < 1)
+ fun_l18_n646(x)
+ else
+ fun_l18_n25(x)
+ end
+end
+
+def fun_l17_n982(x)
+ if (x < 1)
+ fun_l18_n700(x)
+ else
+ fun_l18_n127(x)
+ end
+end
+
+def fun_l17_n983(x)
+ if (x < 1)
+ fun_l18_n153(x)
+ else
+ fun_l18_n831(x)
+ end
+end
+
+def fun_l17_n984(x)
+ if (x < 1)
+ fun_l18_n884(x)
+ else
+ fun_l18_n540(x)
+ end
+end
+
+def fun_l17_n985(x)
+ if (x < 1)
+ fun_l18_n225(x)
+ else
+ fun_l18_n221(x)
+ end
+end
+
+def fun_l17_n986(x)
+ if (x < 1)
+ fun_l18_n431(x)
+ else
+ fun_l18_n884(x)
+ end
+end
+
+def fun_l17_n987(x)
+ if (x < 1)
+ fun_l18_n271(x)
+ else
+ fun_l18_n541(x)
+ end
+end
+
+def fun_l17_n988(x)
+ if (x < 1)
+ fun_l18_n419(x)
+ else
+ fun_l18_n183(x)
+ end
+end
+
+def fun_l17_n989(x)
+ if (x < 1)
+ fun_l18_n85(x)
+ else
+ fun_l18_n51(x)
+ end
+end
+
+def fun_l17_n990(x)
+ if (x < 1)
+ fun_l18_n528(x)
+ else
+ fun_l18_n380(x)
+ end
+end
+
+def fun_l17_n991(x)
+ if (x < 1)
+ fun_l18_n13(x)
+ else
+ fun_l18_n137(x)
+ end
+end
+
+def fun_l17_n992(x)
+ if (x < 1)
+ fun_l18_n655(x)
+ else
+ fun_l18_n344(x)
+ end
+end
+
+def fun_l17_n993(x)
+ if (x < 1)
+ fun_l18_n911(x)
+ else
+ fun_l18_n21(x)
+ end
+end
+
+def fun_l17_n994(x)
+ if (x < 1)
+ fun_l18_n887(x)
+ else
+ fun_l18_n935(x)
+ end
+end
+
+def fun_l17_n995(x)
+ if (x < 1)
+ fun_l18_n206(x)
+ else
+ fun_l18_n374(x)
+ end
+end
+
+def fun_l17_n996(x)
+ if (x < 1)
+ fun_l18_n552(x)
+ else
+ fun_l18_n209(x)
+ end
+end
+
+def fun_l17_n997(x)
+ if (x < 1)
+ fun_l18_n540(x)
+ else
+ fun_l18_n901(x)
+ end
+end
+
+def fun_l17_n998(x)
+ if (x < 1)
+ fun_l18_n547(x)
+ else
+ fun_l18_n304(x)
+ end
+end
+
+def fun_l17_n999(x)
+ if (x < 1)
+ fun_l18_n297(x)
+ else
+ fun_l18_n868(x)
+ end
+end
+
+def fun_l18_n0(x)
+ if (x < 1)
+ fun_l19_n619(x)
+ else
+ fun_l19_n167(x)
+ end
+end
+
+def fun_l18_n1(x)
+ if (x < 1)
+ fun_l19_n669(x)
+ else
+ fun_l19_n962(x)
+ end
+end
+
+def fun_l18_n2(x)
+ if (x < 1)
+ fun_l19_n235(x)
+ else
+ fun_l19_n99(x)
+ end
+end
+
+def fun_l18_n3(x)
+ if (x < 1)
+ fun_l19_n961(x)
+ else
+ fun_l19_n200(x)
+ end
+end
+
+def fun_l18_n4(x)
+ if (x < 1)
+ fun_l19_n812(x)
+ else
+ fun_l19_n764(x)
+ end
+end
+
+def fun_l18_n5(x)
+ if (x < 1)
+ fun_l19_n605(x)
+ else
+ fun_l19_n260(x)
+ end
+end
+
+def fun_l18_n6(x)
+ if (x < 1)
+ fun_l19_n146(x)
+ else
+ fun_l19_n617(x)
+ end
+end
+
+def fun_l18_n7(x)
+ if (x < 1)
+ fun_l19_n181(x)
+ else
+ fun_l19_n31(x)
+ end
+end
+
+def fun_l18_n8(x)
+ if (x < 1)
+ fun_l19_n884(x)
+ else
+ fun_l19_n341(x)
+ end
+end
+
+def fun_l18_n9(x)
+ if (x < 1)
+ fun_l19_n741(x)
+ else
+ fun_l19_n704(x)
+ end
+end
+
+def fun_l18_n10(x)
+ if (x < 1)
+ fun_l19_n610(x)
+ else
+ fun_l19_n24(x)
+ end
+end
+
+def fun_l18_n11(x)
+ if (x < 1)
+ fun_l19_n184(x)
+ else
+ fun_l19_n125(x)
+ end
+end
+
+def fun_l18_n12(x)
+ if (x < 1)
+ fun_l19_n59(x)
+ else
+ fun_l19_n30(x)
+ end
+end
+
+def fun_l18_n13(x)
+ if (x < 1)
+ fun_l19_n255(x)
+ else
+ fun_l19_n18(x)
+ end
+end
+
+def fun_l18_n14(x)
+ if (x < 1)
+ fun_l19_n661(x)
+ else
+ fun_l19_n554(x)
+ end
+end
+
+def fun_l18_n15(x)
+ if (x < 1)
+ fun_l19_n557(x)
+ else
+ fun_l19_n757(x)
+ end
+end
+
+def fun_l18_n16(x)
+ if (x < 1)
+ fun_l19_n946(x)
+ else
+ fun_l19_n403(x)
+ end
+end
+
+def fun_l18_n17(x)
+ if (x < 1)
+ fun_l19_n872(x)
+ else
+ fun_l19_n64(x)
+ end
+end
+
+def fun_l18_n18(x)
+ if (x < 1)
+ fun_l19_n531(x)
+ else
+ fun_l19_n200(x)
+ end
+end
+
+def fun_l18_n19(x)
+ if (x < 1)
+ fun_l19_n172(x)
+ else
+ fun_l19_n319(x)
+ end
+end
+
+def fun_l18_n20(x)
+ if (x < 1)
+ fun_l19_n369(x)
+ else
+ fun_l19_n707(x)
+ end
+end
+
+def fun_l18_n21(x)
+ if (x < 1)
+ fun_l19_n726(x)
+ else
+ fun_l19_n718(x)
+ end
+end
+
+def fun_l18_n22(x)
+ if (x < 1)
+ fun_l19_n169(x)
+ else
+ fun_l19_n117(x)
+ end
+end
+
+def fun_l18_n23(x)
+ if (x < 1)
+ fun_l19_n913(x)
+ else
+ fun_l19_n489(x)
+ end
+end
+
+def fun_l18_n24(x)
+ if (x < 1)
+ fun_l19_n950(x)
+ else
+ fun_l19_n272(x)
+ end
+end
+
+def fun_l18_n25(x)
+ if (x < 1)
+ fun_l19_n835(x)
+ else
+ fun_l19_n341(x)
+ end
+end
+
+def fun_l18_n26(x)
+ if (x < 1)
+ fun_l19_n771(x)
+ else
+ fun_l19_n805(x)
+ end
+end
+
+def fun_l18_n27(x)
+ if (x < 1)
+ fun_l19_n71(x)
+ else
+ fun_l19_n515(x)
+ end
+end
+
+def fun_l18_n28(x)
+ if (x < 1)
+ fun_l19_n472(x)
+ else
+ fun_l19_n807(x)
+ end
+end
+
+def fun_l18_n29(x)
+ if (x < 1)
+ fun_l19_n957(x)
+ else
+ fun_l19_n555(x)
+ end
+end
+
+def fun_l18_n30(x)
+ if (x < 1)
+ fun_l19_n629(x)
+ else
+ fun_l19_n113(x)
+ end
+end
+
+def fun_l18_n31(x)
+ if (x < 1)
+ fun_l19_n791(x)
+ else
+ fun_l19_n340(x)
+ end
+end
+
+def fun_l18_n32(x)
+ if (x < 1)
+ fun_l19_n852(x)
+ else
+ fun_l19_n204(x)
+ end
+end
+
+def fun_l18_n33(x)
+ if (x < 1)
+ fun_l19_n441(x)
+ else
+ fun_l19_n331(x)
+ end
+end
+
+def fun_l18_n34(x)
+ if (x < 1)
+ fun_l19_n51(x)
+ else
+ fun_l19_n199(x)
+ end
+end
+
+def fun_l18_n35(x)
+ if (x < 1)
+ fun_l19_n472(x)
+ else
+ fun_l19_n589(x)
+ end
+end
+
+def fun_l18_n36(x)
+ if (x < 1)
+ fun_l19_n191(x)
+ else
+ fun_l19_n333(x)
+ end
+end
+
+def fun_l18_n37(x)
+ if (x < 1)
+ fun_l19_n412(x)
+ else
+ fun_l19_n661(x)
+ end
+end
+
+def fun_l18_n38(x)
+ if (x < 1)
+ fun_l19_n427(x)
+ else
+ fun_l19_n401(x)
+ end
+end
+
+def fun_l18_n39(x)
+ if (x < 1)
+ fun_l19_n96(x)
+ else
+ fun_l19_n235(x)
+ end
+end
+
+def fun_l18_n40(x)
+ if (x < 1)
+ fun_l19_n984(x)
+ else
+ fun_l19_n586(x)
+ end
+end
+
+def fun_l18_n41(x)
+ if (x < 1)
+ fun_l19_n559(x)
+ else
+ fun_l19_n382(x)
+ end
+end
+
+def fun_l18_n42(x)
+ if (x < 1)
+ fun_l19_n802(x)
+ else
+ fun_l19_n217(x)
+ end
+end
+
+def fun_l18_n43(x)
+ if (x < 1)
+ fun_l19_n693(x)
+ else
+ fun_l19_n178(x)
+ end
+end
+
+def fun_l18_n44(x)
+ if (x < 1)
+ fun_l19_n961(x)
+ else
+ fun_l19_n425(x)
+ end
+end
+
+def fun_l18_n45(x)
+ if (x < 1)
+ fun_l19_n242(x)
+ else
+ fun_l19_n949(x)
+ end
+end
+
+def fun_l18_n46(x)
+ if (x < 1)
+ fun_l19_n418(x)
+ else
+ fun_l19_n462(x)
+ end
+end
+
+def fun_l18_n47(x)
+ if (x < 1)
+ fun_l19_n56(x)
+ else
+ fun_l19_n79(x)
+ end
+end
+
+def fun_l18_n48(x)
+ if (x < 1)
+ fun_l19_n5(x)
+ else
+ fun_l19_n939(x)
+ end
+end
+
+def fun_l18_n49(x)
+ if (x < 1)
+ fun_l19_n4(x)
+ else
+ fun_l19_n262(x)
+ end
+end
+
+def fun_l18_n50(x)
+ if (x < 1)
+ fun_l19_n476(x)
+ else
+ fun_l19_n751(x)
+ end
+end
+
+def fun_l18_n51(x)
+ if (x < 1)
+ fun_l19_n687(x)
+ else
+ fun_l19_n489(x)
+ end
+end
+
+def fun_l18_n52(x)
+ if (x < 1)
+ fun_l19_n965(x)
+ else
+ fun_l19_n198(x)
+ end
+end
+
+def fun_l18_n53(x)
+ if (x < 1)
+ fun_l19_n349(x)
+ else
+ fun_l19_n603(x)
+ end
+end
+
+def fun_l18_n54(x)
+ if (x < 1)
+ fun_l19_n893(x)
+ else
+ fun_l19_n279(x)
+ end
+end
+
+def fun_l18_n55(x)
+ if (x < 1)
+ fun_l19_n816(x)
+ else
+ fun_l19_n922(x)
+ end
+end
+
+def fun_l18_n56(x)
+ if (x < 1)
+ fun_l19_n10(x)
+ else
+ fun_l19_n750(x)
+ end
+end
+
+def fun_l18_n57(x)
+ if (x < 1)
+ fun_l19_n787(x)
+ else
+ fun_l19_n446(x)
+ end
+end
+
+def fun_l18_n58(x)
+ if (x < 1)
+ fun_l19_n662(x)
+ else
+ fun_l19_n636(x)
+ end
+end
+
+def fun_l18_n59(x)
+ if (x < 1)
+ fun_l19_n640(x)
+ else
+ fun_l19_n604(x)
+ end
+end
+
+def fun_l18_n60(x)
+ if (x < 1)
+ fun_l19_n1(x)
+ else
+ fun_l19_n657(x)
+ end
+end
+
+def fun_l18_n61(x)
+ if (x < 1)
+ fun_l19_n657(x)
+ else
+ fun_l19_n516(x)
+ end
+end
+
+def fun_l18_n62(x)
+ if (x < 1)
+ fun_l19_n167(x)
+ else
+ fun_l19_n770(x)
+ end
+end
+
+def fun_l18_n63(x)
+ if (x < 1)
+ fun_l19_n572(x)
+ else
+ fun_l19_n224(x)
+ end
+end
+
+def fun_l18_n64(x)
+ if (x < 1)
+ fun_l19_n564(x)
+ else
+ fun_l19_n64(x)
+ end
+end
+
+def fun_l18_n65(x)
+ if (x < 1)
+ fun_l19_n200(x)
+ else
+ fun_l19_n724(x)
+ end
+end
+
+def fun_l18_n66(x)
+ if (x < 1)
+ fun_l19_n295(x)
+ else
+ fun_l19_n127(x)
+ end
+end
+
+def fun_l18_n67(x)
+ if (x < 1)
+ fun_l19_n81(x)
+ else
+ fun_l19_n757(x)
+ end
+end
+
+def fun_l18_n68(x)
+ if (x < 1)
+ fun_l19_n573(x)
+ else
+ fun_l19_n473(x)
+ end
+end
+
+def fun_l18_n69(x)
+ if (x < 1)
+ fun_l19_n475(x)
+ else
+ fun_l19_n8(x)
+ end
+end
+
+def fun_l18_n70(x)
+ if (x < 1)
+ fun_l19_n564(x)
+ else
+ fun_l19_n74(x)
+ end
+end
+
+def fun_l18_n71(x)
+ if (x < 1)
+ fun_l19_n270(x)
+ else
+ fun_l19_n12(x)
+ end
+end
+
+def fun_l18_n72(x)
+ if (x < 1)
+ fun_l19_n809(x)
+ else
+ fun_l19_n857(x)
+ end
+end
+
+def fun_l18_n73(x)
+ if (x < 1)
+ fun_l19_n329(x)
+ else
+ fun_l19_n850(x)
+ end
+end
+
+def fun_l18_n74(x)
+ if (x < 1)
+ fun_l19_n471(x)
+ else
+ fun_l19_n127(x)
+ end
+end
+
+def fun_l18_n75(x)
+ if (x < 1)
+ fun_l19_n558(x)
+ else
+ fun_l19_n626(x)
+ end
+end
+
+def fun_l18_n76(x)
+ if (x < 1)
+ fun_l19_n648(x)
+ else
+ fun_l19_n687(x)
+ end
+end
+
+def fun_l18_n77(x)
+ if (x < 1)
+ fun_l19_n690(x)
+ else
+ fun_l19_n612(x)
+ end
+end
+
+def fun_l18_n78(x)
+ if (x < 1)
+ fun_l19_n122(x)
+ else
+ fun_l19_n843(x)
+ end
+end
+
+def fun_l18_n79(x)
+ if (x < 1)
+ fun_l19_n375(x)
+ else
+ fun_l19_n56(x)
+ end
+end
+
+def fun_l18_n80(x)
+ if (x < 1)
+ fun_l19_n184(x)
+ else
+ fun_l19_n280(x)
+ end
+end
+
+def fun_l18_n81(x)
+ if (x < 1)
+ fun_l19_n588(x)
+ else
+ fun_l19_n433(x)
+ end
+end
+
+def fun_l18_n82(x)
+ if (x < 1)
+ fun_l19_n144(x)
+ else
+ fun_l19_n754(x)
+ end
+end
+
+def fun_l18_n83(x)
+ if (x < 1)
+ fun_l19_n468(x)
+ else
+ fun_l19_n951(x)
+ end
+end
+
+def fun_l18_n84(x)
+ if (x < 1)
+ fun_l19_n380(x)
+ else
+ fun_l19_n597(x)
+ end
+end
+
+def fun_l18_n85(x)
+ if (x < 1)
+ fun_l19_n651(x)
+ else
+ fun_l19_n756(x)
+ end
+end
+
+def fun_l18_n86(x)
+ if (x < 1)
+ fun_l19_n440(x)
+ else
+ fun_l19_n184(x)
+ end
+end
+
+def fun_l18_n87(x)
+ if (x < 1)
+ fun_l19_n851(x)
+ else
+ fun_l19_n753(x)
+ end
+end
+
+def fun_l18_n88(x)
+ if (x < 1)
+ fun_l19_n808(x)
+ else
+ fun_l19_n102(x)
+ end
+end
+
+def fun_l18_n89(x)
+ if (x < 1)
+ fun_l19_n768(x)
+ else
+ fun_l19_n885(x)
+ end
+end
+
+def fun_l18_n90(x)
+ if (x < 1)
+ fun_l19_n933(x)
+ else
+ fun_l19_n284(x)
+ end
+end
+
+def fun_l18_n91(x)
+ if (x < 1)
+ fun_l19_n234(x)
+ else
+ fun_l19_n927(x)
+ end
+end
+
+def fun_l18_n92(x)
+ if (x < 1)
+ fun_l19_n901(x)
+ else
+ fun_l19_n690(x)
+ end
+end
+
+def fun_l18_n93(x)
+ if (x < 1)
+ fun_l19_n386(x)
+ else
+ fun_l19_n692(x)
+ end
+end
+
+def fun_l18_n94(x)
+ if (x < 1)
+ fun_l19_n572(x)
+ else
+ fun_l19_n795(x)
+ end
+end
+
+def fun_l18_n95(x)
+ if (x < 1)
+ fun_l19_n647(x)
+ else
+ fun_l19_n337(x)
+ end
+end
+
+def fun_l18_n96(x)
+ if (x < 1)
+ fun_l19_n794(x)
+ else
+ fun_l19_n611(x)
+ end
+end
+
+def fun_l18_n97(x)
+ if (x < 1)
+ fun_l19_n752(x)
+ else
+ fun_l19_n548(x)
+ end
+end
+
+def fun_l18_n98(x)
+ if (x < 1)
+ fun_l19_n710(x)
+ else
+ fun_l19_n685(x)
+ end
+end
+
+def fun_l18_n99(x)
+ if (x < 1)
+ fun_l19_n711(x)
+ else
+ fun_l19_n307(x)
+ end
+end
+
+def fun_l18_n100(x)
+ if (x < 1)
+ fun_l19_n834(x)
+ else
+ fun_l19_n355(x)
+ end
+end
+
+def fun_l18_n101(x)
+ if (x < 1)
+ fun_l19_n473(x)
+ else
+ fun_l19_n924(x)
+ end
+end
+
+def fun_l18_n102(x)
+ if (x < 1)
+ fun_l19_n79(x)
+ else
+ fun_l19_n87(x)
+ end
+end
+
+def fun_l18_n103(x)
+ if (x < 1)
+ fun_l19_n27(x)
+ else
+ fun_l19_n914(x)
+ end
+end
+
+def fun_l18_n104(x)
+ if (x < 1)
+ fun_l19_n327(x)
+ else
+ fun_l19_n136(x)
+ end
+end
+
+def fun_l18_n105(x)
+ if (x < 1)
+ fun_l19_n42(x)
+ else
+ fun_l19_n289(x)
+ end
+end
+
+def fun_l18_n106(x)
+ if (x < 1)
+ fun_l19_n371(x)
+ else
+ fun_l19_n453(x)
+ end
+end
+
+def fun_l18_n107(x)
+ if (x < 1)
+ fun_l19_n579(x)
+ else
+ fun_l19_n500(x)
+ end
+end
+
+def fun_l18_n108(x)
+ if (x < 1)
+ fun_l19_n351(x)
+ else
+ fun_l19_n683(x)
+ end
+end
+
+def fun_l18_n109(x)
+ if (x < 1)
+ fun_l19_n831(x)
+ else
+ fun_l19_n310(x)
+ end
+end
+
+def fun_l18_n110(x)
+ if (x < 1)
+ fun_l19_n618(x)
+ else
+ fun_l19_n113(x)
+ end
+end
+
+def fun_l18_n111(x)
+ if (x < 1)
+ fun_l19_n147(x)
+ else
+ fun_l19_n324(x)
+ end
+end
+
+def fun_l18_n112(x)
+ if (x < 1)
+ fun_l19_n97(x)
+ else
+ fun_l19_n901(x)
+ end
+end
+
+def fun_l18_n113(x)
+ if (x < 1)
+ fun_l19_n223(x)
+ else
+ fun_l19_n819(x)
+ end
+end
+
+def fun_l18_n114(x)
+ if (x < 1)
+ fun_l19_n929(x)
+ else
+ fun_l19_n143(x)
+ end
+end
+
+def fun_l18_n115(x)
+ if (x < 1)
+ fun_l19_n697(x)
+ else
+ fun_l19_n934(x)
+ end
+end
+
+def fun_l18_n116(x)
+ if (x < 1)
+ fun_l19_n143(x)
+ else
+ fun_l19_n815(x)
+ end
+end
+
+def fun_l18_n117(x)
+ if (x < 1)
+ fun_l19_n889(x)
+ else
+ fun_l19_n859(x)
+ end
+end
+
+def fun_l18_n118(x)
+ if (x < 1)
+ fun_l19_n233(x)
+ else
+ fun_l19_n6(x)
+ end
+end
+
+def fun_l18_n119(x)
+ if (x < 1)
+ fun_l19_n490(x)
+ else
+ fun_l19_n783(x)
+ end
+end
+
+def fun_l18_n120(x)
+ if (x < 1)
+ fun_l19_n930(x)
+ else
+ fun_l19_n376(x)
+ end
+end
+
+def fun_l18_n121(x)
+ if (x < 1)
+ fun_l19_n567(x)
+ else
+ fun_l19_n882(x)
+ end
+end
+
+def fun_l18_n122(x)
+ if (x < 1)
+ fun_l19_n532(x)
+ else
+ fun_l19_n294(x)
+ end
+end
+
+def fun_l18_n123(x)
+ if (x < 1)
+ fun_l19_n20(x)
+ else
+ fun_l19_n433(x)
+ end
+end
+
+def fun_l18_n124(x)
+ if (x < 1)
+ fun_l19_n301(x)
+ else
+ fun_l19_n591(x)
+ end
+end
+
+def fun_l18_n125(x)
+ if (x < 1)
+ fun_l19_n424(x)
+ else
+ fun_l19_n524(x)
+ end
+end
+
+def fun_l18_n126(x)
+ if (x < 1)
+ fun_l19_n12(x)
+ else
+ fun_l19_n537(x)
+ end
+end
+
+def fun_l18_n127(x)
+ if (x < 1)
+ fun_l19_n548(x)
+ else
+ fun_l19_n850(x)
+ end
+end
+
+def fun_l18_n128(x)
+ if (x < 1)
+ fun_l19_n463(x)
+ else
+ fun_l19_n714(x)
+ end
+end
+
+def fun_l18_n129(x)
+ if (x < 1)
+ fun_l19_n438(x)
+ else
+ fun_l19_n667(x)
+ end
+end
+
+def fun_l18_n130(x)
+ if (x < 1)
+ fun_l19_n481(x)
+ else
+ fun_l19_n236(x)
+ end
+end
+
+def fun_l18_n131(x)
+ if (x < 1)
+ fun_l19_n84(x)
+ else
+ fun_l19_n370(x)
+ end
+end
+
+def fun_l18_n132(x)
+ if (x < 1)
+ fun_l19_n447(x)
+ else
+ fun_l19_n740(x)
+ end
+end
+
+def fun_l18_n133(x)
+ if (x < 1)
+ fun_l19_n807(x)
+ else
+ fun_l19_n595(x)
+ end
+end
+
+def fun_l18_n134(x)
+ if (x < 1)
+ fun_l19_n716(x)
+ else
+ fun_l19_n440(x)
+ end
+end
+
+def fun_l18_n135(x)
+ if (x < 1)
+ fun_l19_n657(x)
+ else
+ fun_l19_n683(x)
+ end
+end
+
+def fun_l18_n136(x)
+ if (x < 1)
+ fun_l19_n683(x)
+ else
+ fun_l19_n344(x)
+ end
+end
+
+def fun_l18_n137(x)
+ if (x < 1)
+ fun_l19_n228(x)
+ else
+ fun_l19_n186(x)
+ end
+end
+
+def fun_l18_n138(x)
+ if (x < 1)
+ fun_l19_n666(x)
+ else
+ fun_l19_n66(x)
+ end
+end
+
+def fun_l18_n139(x)
+ if (x < 1)
+ fun_l19_n416(x)
+ else
+ fun_l19_n398(x)
+ end
+end
+
+def fun_l18_n140(x)
+ if (x < 1)
+ fun_l19_n766(x)
+ else
+ fun_l19_n534(x)
+ end
+end
+
+def fun_l18_n141(x)
+ if (x < 1)
+ fun_l19_n370(x)
+ else
+ fun_l19_n653(x)
+ end
+end
+
+def fun_l18_n142(x)
+ if (x < 1)
+ fun_l19_n953(x)
+ else
+ fun_l19_n917(x)
+ end
+end
+
+def fun_l18_n143(x)
+ if (x < 1)
+ fun_l19_n989(x)
+ else
+ fun_l19_n862(x)
+ end
+end
+
+def fun_l18_n144(x)
+ if (x < 1)
+ fun_l19_n969(x)
+ else
+ fun_l19_n243(x)
+ end
+end
+
+def fun_l18_n145(x)
+ if (x < 1)
+ fun_l19_n379(x)
+ else
+ fun_l19_n315(x)
+ end
+end
+
+def fun_l18_n146(x)
+ if (x < 1)
+ fun_l19_n360(x)
+ else
+ fun_l19_n585(x)
+ end
+end
+
+def fun_l18_n147(x)
+ if (x < 1)
+ fun_l19_n4(x)
+ else
+ fun_l19_n372(x)
+ end
+end
+
+def fun_l18_n148(x)
+ if (x < 1)
+ fun_l19_n395(x)
+ else
+ fun_l19_n817(x)
+ end
+end
+
+def fun_l18_n149(x)
+ if (x < 1)
+ fun_l19_n237(x)
+ else
+ fun_l19_n506(x)
+ end
+end
+
+def fun_l18_n150(x)
+ if (x < 1)
+ fun_l19_n940(x)
+ else
+ fun_l19_n380(x)
+ end
+end
+
+def fun_l18_n151(x)
+ if (x < 1)
+ fun_l19_n190(x)
+ else
+ fun_l19_n925(x)
+ end
+end
+
+def fun_l18_n152(x)
+ if (x < 1)
+ fun_l19_n810(x)
+ else
+ fun_l19_n958(x)
+ end
+end
+
+def fun_l18_n153(x)
+ if (x < 1)
+ fun_l19_n69(x)
+ else
+ fun_l19_n19(x)
+ end
+end
+
+def fun_l18_n154(x)
+ if (x < 1)
+ fun_l19_n984(x)
+ else
+ fun_l19_n149(x)
+ end
+end
+
+def fun_l18_n155(x)
+ if (x < 1)
+ fun_l19_n179(x)
+ else
+ fun_l19_n583(x)
+ end
+end
+
+def fun_l18_n156(x)
+ if (x < 1)
+ fun_l19_n583(x)
+ else
+ fun_l19_n374(x)
+ end
+end
+
+def fun_l18_n157(x)
+ if (x < 1)
+ fun_l19_n908(x)
+ else
+ fun_l19_n769(x)
+ end
+end
+
+def fun_l18_n158(x)
+ if (x < 1)
+ fun_l19_n288(x)
+ else
+ fun_l19_n715(x)
+ end
+end
+
+def fun_l18_n159(x)
+ if (x < 1)
+ fun_l19_n742(x)
+ else
+ fun_l19_n733(x)
+ end
+end
+
+def fun_l18_n160(x)
+ if (x < 1)
+ fun_l19_n994(x)
+ else
+ fun_l19_n434(x)
+ end
+end
+
+def fun_l18_n161(x)
+ if (x < 1)
+ fun_l19_n440(x)
+ else
+ fun_l19_n994(x)
+ end
+end
+
+def fun_l18_n162(x)
+ if (x < 1)
+ fun_l19_n400(x)
+ else
+ fun_l19_n632(x)
+ end
+end
+
+def fun_l18_n163(x)
+ if (x < 1)
+ fun_l19_n237(x)
+ else
+ fun_l19_n369(x)
+ end
+end
+
+def fun_l18_n164(x)
+ if (x < 1)
+ fun_l19_n431(x)
+ else
+ fun_l19_n276(x)
+ end
+end
+
+def fun_l18_n165(x)
+ if (x < 1)
+ fun_l19_n173(x)
+ else
+ fun_l19_n93(x)
+ end
+end
+
+def fun_l18_n166(x)
+ if (x < 1)
+ fun_l19_n875(x)
+ else
+ fun_l19_n568(x)
+ end
+end
+
+def fun_l18_n167(x)
+ if (x < 1)
+ fun_l19_n61(x)
+ else
+ fun_l19_n79(x)
+ end
+end
+
+def fun_l18_n168(x)
+ if (x < 1)
+ fun_l19_n683(x)
+ else
+ fun_l19_n958(x)
+ end
+end
+
+def fun_l18_n169(x)
+ if (x < 1)
+ fun_l19_n419(x)
+ else
+ fun_l19_n648(x)
+ end
+end
+
+def fun_l18_n170(x)
+ if (x < 1)
+ fun_l19_n152(x)
+ else
+ fun_l19_n746(x)
+ end
+end
+
+def fun_l18_n171(x)
+ if (x < 1)
+ fun_l19_n670(x)
+ else
+ fun_l19_n974(x)
+ end
+end
+
+def fun_l18_n172(x)
+ if (x < 1)
+ fun_l19_n142(x)
+ else
+ fun_l19_n751(x)
+ end
+end
+
+def fun_l18_n173(x)
+ if (x < 1)
+ fun_l19_n640(x)
+ else
+ fun_l19_n911(x)
+ end
+end
+
+def fun_l18_n174(x)
+ if (x < 1)
+ fun_l19_n256(x)
+ else
+ fun_l19_n414(x)
+ end
+end
+
+def fun_l18_n175(x)
+ if (x < 1)
+ fun_l19_n207(x)
+ else
+ fun_l19_n80(x)
+ end
+end
+
+def fun_l18_n176(x)
+ if (x < 1)
+ fun_l19_n317(x)
+ else
+ fun_l19_n22(x)
+ end
+end
+
+def fun_l18_n177(x)
+ if (x < 1)
+ fun_l19_n457(x)
+ else
+ fun_l19_n723(x)
+ end
+end
+
+def fun_l18_n178(x)
+ if (x < 1)
+ fun_l19_n36(x)
+ else
+ fun_l19_n44(x)
+ end
+end
+
+def fun_l18_n179(x)
+ if (x < 1)
+ fun_l19_n92(x)
+ else
+ fun_l19_n75(x)
+ end
+end
+
+def fun_l18_n180(x)
+ if (x < 1)
+ fun_l19_n878(x)
+ else
+ fun_l19_n318(x)
+ end
+end
+
+def fun_l18_n181(x)
+ if (x < 1)
+ fun_l19_n499(x)
+ else
+ fun_l19_n462(x)
+ end
+end
+
+def fun_l18_n182(x)
+ if (x < 1)
+ fun_l19_n172(x)
+ else
+ fun_l19_n91(x)
+ end
+end
+
+def fun_l18_n183(x)
+ if (x < 1)
+ fun_l19_n549(x)
+ else
+ fun_l19_n126(x)
+ end
+end
+
+def fun_l18_n184(x)
+ if (x < 1)
+ fun_l19_n484(x)
+ else
+ fun_l19_n45(x)
+ end
+end
+
+def fun_l18_n185(x)
+ if (x < 1)
+ fun_l19_n237(x)
+ else
+ fun_l19_n651(x)
+ end
+end
+
+def fun_l18_n186(x)
+ if (x < 1)
+ fun_l19_n458(x)
+ else
+ fun_l19_n466(x)
+ end
+end
+
+def fun_l18_n187(x)
+ if (x < 1)
+ fun_l19_n856(x)
+ else
+ fun_l19_n184(x)
+ end
+end
+
+def fun_l18_n188(x)
+ if (x < 1)
+ fun_l19_n432(x)
+ else
+ fun_l19_n251(x)
+ end
+end
+
+def fun_l18_n189(x)
+ if (x < 1)
+ fun_l19_n719(x)
+ else
+ fun_l19_n442(x)
+ end
+end
+
+def fun_l18_n190(x)
+ if (x < 1)
+ fun_l19_n516(x)
+ else
+ fun_l19_n331(x)
+ end
+end
+
+def fun_l18_n191(x)
+ if (x < 1)
+ fun_l19_n342(x)
+ else
+ fun_l19_n750(x)
+ end
+end
+
+def fun_l18_n192(x)
+ if (x < 1)
+ fun_l19_n820(x)
+ else
+ fun_l19_n137(x)
+ end
+end
+
+def fun_l18_n193(x)
+ if (x < 1)
+ fun_l19_n514(x)
+ else
+ fun_l19_n594(x)
+ end
+end
+
+def fun_l18_n194(x)
+ if (x < 1)
+ fun_l19_n744(x)
+ else
+ fun_l19_n605(x)
+ end
+end
+
+def fun_l18_n195(x)
+ if (x < 1)
+ fun_l19_n428(x)
+ else
+ fun_l19_n528(x)
+ end
+end
+
+def fun_l18_n196(x)
+ if (x < 1)
+ fun_l19_n291(x)
+ else
+ fun_l19_n382(x)
+ end
+end
+
+def fun_l18_n197(x)
+ if (x < 1)
+ fun_l19_n238(x)
+ else
+ fun_l19_n38(x)
+ end
+end
+
+def fun_l18_n198(x)
+ if (x < 1)
+ fun_l19_n332(x)
+ else
+ fun_l19_n112(x)
+ end
+end
+
+def fun_l18_n199(x)
+ if (x < 1)
+ fun_l19_n703(x)
+ else
+ fun_l19_n108(x)
+ end
+end
+
+def fun_l18_n200(x)
+ if (x < 1)
+ fun_l19_n917(x)
+ else
+ fun_l19_n629(x)
+ end
+end
+
+def fun_l18_n201(x)
+ if (x < 1)
+ fun_l19_n402(x)
+ else
+ fun_l19_n223(x)
+ end
+end
+
+def fun_l18_n202(x)
+ if (x < 1)
+ fun_l19_n9(x)
+ else
+ fun_l19_n318(x)
+ end
+end
+
+def fun_l18_n203(x)
+ if (x < 1)
+ fun_l19_n560(x)
+ else
+ fun_l19_n77(x)
+ end
+end
+
+def fun_l18_n204(x)
+ if (x < 1)
+ fun_l19_n379(x)
+ else
+ fun_l19_n903(x)
+ end
+end
+
+def fun_l18_n205(x)
+ if (x < 1)
+ fun_l19_n185(x)
+ else
+ fun_l19_n174(x)
+ end
+end
+
+def fun_l18_n206(x)
+ if (x < 1)
+ fun_l19_n738(x)
+ else
+ fun_l19_n518(x)
+ end
+end
+
+def fun_l18_n207(x)
+ if (x < 1)
+ fun_l19_n343(x)
+ else
+ fun_l19_n567(x)
+ end
+end
+
+def fun_l18_n208(x)
+ if (x < 1)
+ fun_l19_n546(x)
+ else
+ fun_l19_n370(x)
+ end
+end
+
+def fun_l18_n209(x)
+ if (x < 1)
+ fun_l19_n589(x)
+ else
+ fun_l19_n511(x)
+ end
+end
+
+def fun_l18_n210(x)
+ if (x < 1)
+ fun_l19_n507(x)
+ else
+ fun_l19_n912(x)
+ end
+end
+
+def fun_l18_n211(x)
+ if (x < 1)
+ fun_l19_n779(x)
+ else
+ fun_l19_n133(x)
+ end
+end
+
+def fun_l18_n212(x)
+ if (x < 1)
+ fun_l19_n400(x)
+ else
+ fun_l19_n345(x)
+ end
+end
+
+def fun_l18_n213(x)
+ if (x < 1)
+ fun_l19_n214(x)
+ else
+ fun_l19_n393(x)
+ end
+end
+
+def fun_l18_n214(x)
+ if (x < 1)
+ fun_l19_n829(x)
+ else
+ fun_l19_n769(x)
+ end
+end
+
+def fun_l18_n215(x)
+ if (x < 1)
+ fun_l19_n835(x)
+ else
+ fun_l19_n80(x)
+ end
+end
+
+def fun_l18_n216(x)
+ if (x < 1)
+ fun_l19_n640(x)
+ else
+ fun_l19_n836(x)
+ end
+end
+
+def fun_l18_n217(x)
+ if (x < 1)
+ fun_l19_n861(x)
+ else
+ fun_l19_n801(x)
+ end
+end
+
+def fun_l18_n218(x)
+ if (x < 1)
+ fun_l19_n316(x)
+ else
+ fun_l19_n263(x)
+ end
+end
+
+def fun_l18_n219(x)
+ if (x < 1)
+ fun_l19_n231(x)
+ else
+ fun_l19_n315(x)
+ end
+end
+
+def fun_l18_n220(x)
+ if (x < 1)
+ fun_l19_n700(x)
+ else
+ fun_l19_n276(x)
+ end
+end
+
+def fun_l18_n221(x)
+ if (x < 1)
+ fun_l19_n654(x)
+ else
+ fun_l19_n32(x)
+ end
+end
+
+def fun_l18_n222(x)
+ if (x < 1)
+ fun_l19_n758(x)
+ else
+ fun_l19_n598(x)
+ end
+end
+
+def fun_l18_n223(x)
+ if (x < 1)
+ fun_l19_n819(x)
+ else
+ fun_l19_n764(x)
+ end
+end
+
+def fun_l18_n224(x)
+ if (x < 1)
+ fun_l19_n31(x)
+ else
+ fun_l19_n51(x)
+ end
+end
+
+def fun_l18_n225(x)
+ if (x < 1)
+ fun_l19_n704(x)
+ else
+ fun_l19_n932(x)
+ end
+end
+
+def fun_l18_n226(x)
+ if (x < 1)
+ fun_l19_n635(x)
+ else
+ fun_l19_n411(x)
+ end
+end
+
+def fun_l18_n227(x)
+ if (x < 1)
+ fun_l19_n368(x)
+ else
+ fun_l19_n472(x)
+ end
+end
+
+def fun_l18_n228(x)
+ if (x < 1)
+ fun_l19_n928(x)
+ else
+ fun_l19_n357(x)
+ end
+end
+
+def fun_l18_n229(x)
+ if (x < 1)
+ fun_l19_n503(x)
+ else
+ fun_l19_n495(x)
+ end
+end
+
+def fun_l18_n230(x)
+ if (x < 1)
+ fun_l19_n497(x)
+ else
+ fun_l19_n73(x)
+ end
+end
+
+def fun_l18_n231(x)
+ if (x < 1)
+ fun_l19_n718(x)
+ else
+ fun_l19_n971(x)
+ end
+end
+
+def fun_l18_n232(x)
+ if (x < 1)
+ fun_l19_n314(x)
+ else
+ fun_l19_n100(x)
+ end
+end
+
+def fun_l18_n233(x)
+ if (x < 1)
+ fun_l19_n490(x)
+ else
+ fun_l19_n569(x)
+ end
+end
+
+def fun_l18_n234(x)
+ if (x < 1)
+ fun_l19_n309(x)
+ else
+ fun_l19_n806(x)
+ end
+end
+
+def fun_l18_n235(x)
+ if (x < 1)
+ fun_l19_n839(x)
+ else
+ fun_l19_n388(x)
+ end
+end
+
+def fun_l18_n236(x)
+ if (x < 1)
+ fun_l19_n158(x)
+ else
+ fun_l19_n438(x)
+ end
+end
+
+def fun_l18_n237(x)
+ if (x < 1)
+ fun_l19_n181(x)
+ else
+ fun_l19_n728(x)
+ end
+end
+
+def fun_l18_n238(x)
+ if (x < 1)
+ fun_l19_n238(x)
+ else
+ fun_l19_n41(x)
+ end
+end
+
+def fun_l18_n239(x)
+ if (x < 1)
+ fun_l19_n342(x)
+ else
+ fun_l19_n756(x)
+ end
+end
+
+def fun_l18_n240(x)
+ if (x < 1)
+ fun_l19_n873(x)
+ else
+ fun_l19_n274(x)
+ end
+end
+
+def fun_l18_n241(x)
+ if (x < 1)
+ fun_l19_n273(x)
+ else
+ fun_l19_n740(x)
+ end
+end
+
+def fun_l18_n242(x)
+ if (x < 1)
+ fun_l19_n256(x)
+ else
+ fun_l19_n99(x)
+ end
+end
+
+def fun_l18_n243(x)
+ if (x < 1)
+ fun_l19_n482(x)
+ else
+ fun_l19_n569(x)
+ end
+end
+
+def fun_l18_n244(x)
+ if (x < 1)
+ fun_l19_n598(x)
+ else
+ fun_l19_n393(x)
+ end
+end
+
+def fun_l18_n245(x)
+ if (x < 1)
+ fun_l19_n320(x)
+ else
+ fun_l19_n164(x)
+ end
+end
+
+def fun_l18_n246(x)
+ if (x < 1)
+ fun_l19_n803(x)
+ else
+ fun_l19_n240(x)
+ end
+end
+
+def fun_l18_n247(x)
+ if (x < 1)
+ fun_l19_n790(x)
+ else
+ fun_l19_n55(x)
+ end
+end
+
+def fun_l18_n248(x)
+ if (x < 1)
+ fun_l19_n193(x)
+ else
+ fun_l19_n754(x)
+ end
+end
+
+def fun_l18_n249(x)
+ if (x < 1)
+ fun_l19_n122(x)
+ else
+ fun_l19_n841(x)
+ end
+end
+
+def fun_l18_n250(x)
+ if (x < 1)
+ fun_l19_n724(x)
+ else
+ fun_l19_n359(x)
+ end
+end
+
+def fun_l18_n251(x)
+ if (x < 1)
+ fun_l19_n497(x)
+ else
+ fun_l19_n777(x)
+ end
+end
+
+def fun_l18_n252(x)
+ if (x < 1)
+ fun_l19_n986(x)
+ else
+ fun_l19_n666(x)
+ end
+end
+
+def fun_l18_n253(x)
+ if (x < 1)
+ fun_l19_n864(x)
+ else
+ fun_l19_n320(x)
+ end
+end
+
+def fun_l18_n254(x)
+ if (x < 1)
+ fun_l19_n386(x)
+ else
+ fun_l19_n582(x)
+ end
+end
+
+def fun_l18_n255(x)
+ if (x < 1)
+ fun_l19_n434(x)
+ else
+ fun_l19_n224(x)
+ end
+end
+
+def fun_l18_n256(x)
+ if (x < 1)
+ fun_l19_n921(x)
+ else
+ fun_l19_n8(x)
+ end
+end
+
+def fun_l18_n257(x)
+ if (x < 1)
+ fun_l19_n789(x)
+ else
+ fun_l19_n546(x)
+ end
+end
+
+def fun_l18_n258(x)
+ if (x < 1)
+ fun_l19_n324(x)
+ else
+ fun_l19_n987(x)
+ end
+end
+
+def fun_l18_n259(x)
+ if (x < 1)
+ fun_l19_n279(x)
+ else
+ fun_l19_n180(x)
+ end
+end
+
+def fun_l18_n260(x)
+ if (x < 1)
+ fun_l19_n596(x)
+ else
+ fun_l19_n670(x)
+ end
+end
+
+def fun_l18_n261(x)
+ if (x < 1)
+ fun_l19_n940(x)
+ else
+ fun_l19_n982(x)
+ end
+end
+
+def fun_l18_n262(x)
+ if (x < 1)
+ fun_l19_n54(x)
+ else
+ fun_l19_n342(x)
+ end
+end
+
+def fun_l18_n263(x)
+ if (x < 1)
+ fun_l19_n815(x)
+ else
+ fun_l19_n663(x)
+ end
+end
+
+def fun_l18_n264(x)
+ if (x < 1)
+ fun_l19_n794(x)
+ else
+ fun_l19_n251(x)
+ end
+end
+
+def fun_l18_n265(x)
+ if (x < 1)
+ fun_l19_n485(x)
+ else
+ fun_l19_n896(x)
+ end
+end
+
+def fun_l18_n266(x)
+ if (x < 1)
+ fun_l19_n346(x)
+ else
+ fun_l19_n151(x)
+ end
+end
+
+def fun_l18_n267(x)
+ if (x < 1)
+ fun_l19_n162(x)
+ else
+ fun_l19_n395(x)
+ end
+end
+
+def fun_l18_n268(x)
+ if (x < 1)
+ fun_l19_n76(x)
+ else
+ fun_l19_n25(x)
+ end
+end
+
+def fun_l18_n269(x)
+ if (x < 1)
+ fun_l19_n943(x)
+ else
+ fun_l19_n587(x)
+ end
+end
+
+def fun_l18_n270(x)
+ if (x < 1)
+ fun_l19_n663(x)
+ else
+ fun_l19_n255(x)
+ end
+end
+
+def fun_l18_n271(x)
+ if (x < 1)
+ fun_l19_n307(x)
+ else
+ fun_l19_n261(x)
+ end
+end
+
+def fun_l18_n272(x)
+ if (x < 1)
+ fun_l19_n478(x)
+ else
+ fun_l19_n600(x)
+ end
+end
+
+def fun_l18_n273(x)
+ if (x < 1)
+ fun_l19_n345(x)
+ else
+ fun_l19_n877(x)
+ end
+end
+
+def fun_l18_n274(x)
+ if (x < 1)
+ fun_l19_n637(x)
+ else
+ fun_l19_n27(x)
+ end
+end
+
+def fun_l18_n275(x)
+ if (x < 1)
+ fun_l19_n752(x)
+ else
+ fun_l19_n946(x)
+ end
+end
+
+def fun_l18_n276(x)
+ if (x < 1)
+ fun_l19_n571(x)
+ else
+ fun_l19_n973(x)
+ end
+end
+
+def fun_l18_n277(x)
+ if (x < 1)
+ fun_l19_n274(x)
+ else
+ fun_l19_n673(x)
+ end
+end
+
+def fun_l18_n278(x)
+ if (x < 1)
+ fun_l19_n922(x)
+ else
+ fun_l19_n826(x)
+ end
+end
+
+def fun_l18_n279(x)
+ if (x < 1)
+ fun_l19_n294(x)
+ else
+ fun_l19_n236(x)
+ end
+end
+
+def fun_l18_n280(x)
+ if (x < 1)
+ fun_l19_n661(x)
+ else
+ fun_l19_n531(x)
+ end
+end
+
+def fun_l18_n281(x)
+ if (x < 1)
+ fun_l19_n295(x)
+ else
+ fun_l19_n961(x)
+ end
+end
+
+def fun_l18_n282(x)
+ if (x < 1)
+ fun_l19_n902(x)
+ else
+ fun_l19_n364(x)
+ end
+end
+
+def fun_l18_n283(x)
+ if (x < 1)
+ fun_l19_n147(x)
+ else
+ fun_l19_n709(x)
+ end
+end
+
+def fun_l18_n284(x)
+ if (x < 1)
+ fun_l19_n394(x)
+ else
+ fun_l19_n757(x)
+ end
+end
+
+def fun_l18_n285(x)
+ if (x < 1)
+ fun_l19_n372(x)
+ else
+ fun_l19_n45(x)
+ end
+end
+
+def fun_l18_n286(x)
+ if (x < 1)
+ fun_l19_n323(x)
+ else
+ fun_l19_n128(x)
+ end
+end
+
+def fun_l18_n287(x)
+ if (x < 1)
+ fun_l19_n50(x)
+ else
+ fun_l19_n650(x)
+ end
+end
+
+def fun_l18_n288(x)
+ if (x < 1)
+ fun_l19_n300(x)
+ else
+ fun_l19_n308(x)
+ end
+end
+
+def fun_l18_n289(x)
+ if (x < 1)
+ fun_l19_n2(x)
+ else
+ fun_l19_n27(x)
+ end
+end
+
+def fun_l18_n290(x)
+ if (x < 1)
+ fun_l19_n341(x)
+ else
+ fun_l19_n281(x)
+ end
+end
+
+def fun_l18_n291(x)
+ if (x < 1)
+ fun_l19_n797(x)
+ else
+ fun_l19_n575(x)
+ end
+end
+
+def fun_l18_n292(x)
+ if (x < 1)
+ fun_l19_n740(x)
+ else
+ fun_l19_n772(x)
+ end
+end
+
+def fun_l18_n293(x)
+ if (x < 1)
+ fun_l19_n707(x)
+ else
+ fun_l19_n456(x)
+ end
+end
+
+def fun_l18_n294(x)
+ if (x < 1)
+ fun_l19_n714(x)
+ else
+ fun_l19_n601(x)
+ end
+end
+
+def fun_l18_n295(x)
+ if (x < 1)
+ fun_l19_n298(x)
+ else
+ fun_l19_n367(x)
+ end
+end
+
+def fun_l18_n296(x)
+ if (x < 1)
+ fun_l19_n0(x)
+ else
+ fun_l19_n970(x)
+ end
+end
+
+def fun_l18_n297(x)
+ if (x < 1)
+ fun_l19_n703(x)
+ else
+ fun_l19_n673(x)
+ end
+end
+
+def fun_l18_n298(x)
+ if (x < 1)
+ fun_l19_n890(x)
+ else
+ fun_l19_n932(x)
+ end
+end
+
+def fun_l18_n299(x)
+ if (x < 1)
+ fun_l19_n152(x)
+ else
+ fun_l19_n784(x)
+ end
+end
+
+def fun_l18_n300(x)
+ if (x < 1)
+ fun_l19_n24(x)
+ else
+ fun_l19_n449(x)
+ end
+end
+
+def fun_l18_n301(x)
+ if (x < 1)
+ fun_l19_n161(x)
+ else
+ fun_l19_n51(x)
+ end
+end
+
+def fun_l18_n302(x)
+ if (x < 1)
+ fun_l19_n695(x)
+ else
+ fun_l19_n604(x)
+ end
+end
+
+def fun_l18_n303(x)
+ if (x < 1)
+ fun_l19_n415(x)
+ else
+ fun_l19_n752(x)
+ end
+end
+
+def fun_l18_n304(x)
+ if (x < 1)
+ fun_l19_n737(x)
+ else
+ fun_l19_n944(x)
+ end
+end
+
+def fun_l18_n305(x)
+ if (x < 1)
+ fun_l19_n833(x)
+ else
+ fun_l19_n98(x)
+ end
+end
+
+def fun_l18_n306(x)
+ if (x < 1)
+ fun_l19_n598(x)
+ else
+ fun_l19_n601(x)
+ end
+end
+
+def fun_l18_n307(x)
+ if (x < 1)
+ fun_l19_n728(x)
+ else
+ fun_l19_n116(x)
+ end
+end
+
+def fun_l18_n308(x)
+ if (x < 1)
+ fun_l19_n892(x)
+ else
+ fun_l19_n826(x)
+ end
+end
+
+def fun_l18_n309(x)
+ if (x < 1)
+ fun_l19_n926(x)
+ else
+ fun_l19_n119(x)
+ end
+end
+
+def fun_l18_n310(x)
+ if (x < 1)
+ fun_l19_n194(x)
+ else
+ fun_l19_n331(x)
+ end
+end
+
+def fun_l18_n311(x)
+ if (x < 1)
+ fun_l19_n490(x)
+ else
+ fun_l19_n401(x)
+ end
+end
+
+def fun_l18_n312(x)
+ if (x < 1)
+ fun_l19_n727(x)
+ else
+ fun_l19_n193(x)
+ end
+end
+
+def fun_l18_n313(x)
+ if (x < 1)
+ fun_l19_n643(x)
+ else
+ fun_l19_n327(x)
+ end
+end
+
+def fun_l18_n314(x)
+ if (x < 1)
+ fun_l19_n747(x)
+ else
+ fun_l19_n938(x)
+ end
+end
+
+def fun_l18_n315(x)
+ if (x < 1)
+ fun_l19_n153(x)
+ else
+ fun_l19_n438(x)
+ end
+end
+
+def fun_l18_n316(x)
+ if (x < 1)
+ fun_l19_n719(x)
+ else
+ fun_l19_n471(x)
+ end
+end
+
+def fun_l18_n317(x)
+ if (x < 1)
+ fun_l19_n105(x)
+ else
+ fun_l19_n832(x)
+ end
+end
+
+def fun_l18_n318(x)
+ if (x < 1)
+ fun_l19_n652(x)
+ else
+ fun_l19_n826(x)
+ end
+end
+
+def fun_l18_n319(x)
+ if (x < 1)
+ fun_l19_n3(x)
+ else
+ fun_l19_n250(x)
+ end
+end
+
+def fun_l18_n320(x)
+ if (x < 1)
+ fun_l19_n854(x)
+ else
+ fun_l19_n371(x)
+ end
+end
+
+def fun_l18_n321(x)
+ if (x < 1)
+ fun_l19_n241(x)
+ else
+ fun_l19_n51(x)
+ end
+end
+
+def fun_l18_n322(x)
+ if (x < 1)
+ fun_l19_n832(x)
+ else
+ fun_l19_n897(x)
+ end
+end
+
+def fun_l18_n323(x)
+ if (x < 1)
+ fun_l19_n472(x)
+ else
+ fun_l19_n838(x)
+ end
+end
+
+def fun_l18_n324(x)
+ if (x < 1)
+ fun_l19_n844(x)
+ else
+ fun_l19_n228(x)
+ end
+end
+
+def fun_l18_n325(x)
+ if (x < 1)
+ fun_l19_n132(x)
+ else
+ fun_l19_n424(x)
+ end
+end
+
+def fun_l18_n326(x)
+ if (x < 1)
+ fun_l19_n311(x)
+ else
+ fun_l19_n388(x)
+ end
+end
+
+def fun_l18_n327(x)
+ if (x < 1)
+ fun_l19_n709(x)
+ else
+ fun_l19_n98(x)
+ end
+end
+
+def fun_l18_n328(x)
+ if (x < 1)
+ fun_l19_n342(x)
+ else
+ fun_l19_n743(x)
+ end
+end
+
+def fun_l18_n329(x)
+ if (x < 1)
+ fun_l19_n984(x)
+ else
+ fun_l19_n762(x)
+ end
+end
+
+def fun_l18_n330(x)
+ if (x < 1)
+ fun_l19_n358(x)
+ else
+ fun_l19_n624(x)
+ end
+end
+
+def fun_l18_n331(x)
+ if (x < 1)
+ fun_l19_n574(x)
+ else
+ fun_l19_n35(x)
+ end
+end
+
+def fun_l18_n332(x)
+ if (x < 1)
+ fun_l19_n564(x)
+ else
+ fun_l19_n629(x)
+ end
+end
+
+def fun_l18_n333(x)
+ if (x < 1)
+ fun_l19_n70(x)
+ else
+ fun_l19_n150(x)
+ end
+end
+
+def fun_l18_n334(x)
+ if (x < 1)
+ fun_l19_n538(x)
+ else
+ fun_l19_n239(x)
+ end
+end
+
+def fun_l18_n335(x)
+ if (x < 1)
+ fun_l19_n818(x)
+ else
+ fun_l19_n878(x)
+ end
+end
+
+def fun_l18_n336(x)
+ if (x < 1)
+ fun_l19_n233(x)
+ else
+ fun_l19_n286(x)
+ end
+end
+
+def fun_l18_n337(x)
+ if (x < 1)
+ fun_l19_n731(x)
+ else
+ fun_l19_n416(x)
+ end
+end
+
+def fun_l18_n338(x)
+ if (x < 1)
+ fun_l19_n917(x)
+ else
+ fun_l19_n710(x)
+ end
+end
+
+def fun_l18_n339(x)
+ if (x < 1)
+ fun_l19_n638(x)
+ else
+ fun_l19_n187(x)
+ end
+end
+
+def fun_l18_n340(x)
+ if (x < 1)
+ fun_l19_n922(x)
+ else
+ fun_l19_n767(x)
+ end
+end
+
+def fun_l18_n341(x)
+ if (x < 1)
+ fun_l19_n9(x)
+ else
+ fun_l19_n708(x)
+ end
+end
+
+def fun_l18_n342(x)
+ if (x < 1)
+ fun_l19_n76(x)
+ else
+ fun_l19_n479(x)
+ end
+end
+
+def fun_l18_n343(x)
+ if (x < 1)
+ fun_l19_n679(x)
+ else
+ fun_l19_n85(x)
+ end
+end
+
+def fun_l18_n344(x)
+ if (x < 1)
+ fun_l19_n725(x)
+ else
+ fun_l19_n809(x)
+ end
+end
+
+def fun_l18_n345(x)
+ if (x < 1)
+ fun_l19_n680(x)
+ else
+ fun_l19_n416(x)
+ end
+end
+
+def fun_l18_n346(x)
+ if (x < 1)
+ fun_l19_n66(x)
+ else
+ fun_l19_n36(x)
+ end
+end
+
+def fun_l18_n347(x)
+ if (x < 1)
+ fun_l19_n420(x)
+ else
+ fun_l19_n879(x)
+ end
+end
+
+def fun_l18_n348(x)
+ if (x < 1)
+ fun_l19_n653(x)
+ else
+ fun_l19_n634(x)
+ end
+end
+
+def fun_l18_n349(x)
+ if (x < 1)
+ fun_l19_n134(x)
+ else
+ fun_l19_n840(x)
+ end
+end
+
+def fun_l18_n350(x)
+ if (x < 1)
+ fun_l19_n21(x)
+ else
+ fun_l19_n843(x)
+ end
+end
+
+def fun_l18_n351(x)
+ if (x < 1)
+ fun_l19_n917(x)
+ else
+ fun_l19_n101(x)
+ end
+end
+
+def fun_l18_n352(x)
+ if (x < 1)
+ fun_l19_n541(x)
+ else
+ fun_l19_n646(x)
+ end
+end
+
+def fun_l18_n353(x)
+ if (x < 1)
+ fun_l19_n555(x)
+ else
+ fun_l19_n648(x)
+ end
+end
+
+def fun_l18_n354(x)
+ if (x < 1)
+ fun_l19_n431(x)
+ else
+ fun_l19_n736(x)
+ end
+end
+
+def fun_l18_n355(x)
+ if (x < 1)
+ fun_l19_n294(x)
+ else
+ fun_l19_n512(x)
+ end
+end
+
+def fun_l18_n356(x)
+ if (x < 1)
+ fun_l19_n852(x)
+ else
+ fun_l19_n348(x)
+ end
+end
+
+def fun_l18_n357(x)
+ if (x < 1)
+ fun_l19_n670(x)
+ else
+ fun_l19_n997(x)
+ end
+end
+
+def fun_l18_n358(x)
+ if (x < 1)
+ fun_l19_n595(x)
+ else
+ fun_l19_n544(x)
+ end
+end
+
+def fun_l18_n359(x)
+ if (x < 1)
+ fun_l19_n13(x)
+ else
+ fun_l19_n838(x)
+ end
+end
+
+def fun_l18_n360(x)
+ if (x < 1)
+ fun_l19_n518(x)
+ else
+ fun_l19_n642(x)
+ end
+end
+
+def fun_l18_n361(x)
+ if (x < 1)
+ fun_l19_n333(x)
+ else
+ fun_l19_n59(x)
+ end
+end
+
+def fun_l18_n362(x)
+ if (x < 1)
+ fun_l19_n670(x)
+ else
+ fun_l19_n844(x)
+ end
+end
+
+def fun_l18_n363(x)
+ if (x < 1)
+ fun_l19_n14(x)
+ else
+ fun_l19_n932(x)
+ end
+end
+
+def fun_l18_n364(x)
+ if (x < 1)
+ fun_l19_n508(x)
+ else
+ fun_l19_n466(x)
+ end
+end
+
+def fun_l18_n365(x)
+ if (x < 1)
+ fun_l19_n177(x)
+ else
+ fun_l19_n365(x)
+ end
+end
+
+def fun_l18_n366(x)
+ if (x < 1)
+ fun_l19_n367(x)
+ else
+ fun_l19_n205(x)
+ end
+end
+
+def fun_l18_n367(x)
+ if (x < 1)
+ fun_l19_n353(x)
+ else
+ fun_l19_n328(x)
+ end
+end
+
+def fun_l18_n368(x)
+ if (x < 1)
+ fun_l19_n801(x)
+ else
+ fun_l19_n420(x)
+ end
+end
+
+def fun_l18_n369(x)
+ if (x < 1)
+ fun_l19_n162(x)
+ else
+ fun_l19_n670(x)
+ end
+end
+
+def fun_l18_n370(x)
+ if (x < 1)
+ fun_l19_n908(x)
+ else
+ fun_l19_n852(x)
+ end
+end
+
+def fun_l18_n371(x)
+ if (x < 1)
+ fun_l19_n47(x)
+ else
+ fun_l19_n130(x)
+ end
+end
+
+def fun_l18_n372(x)
+ if (x < 1)
+ fun_l19_n774(x)
+ else
+ fun_l19_n792(x)
+ end
+end
+
+def fun_l18_n373(x)
+ if (x < 1)
+ fun_l19_n124(x)
+ else
+ fun_l19_n665(x)
+ end
+end
+
+def fun_l18_n374(x)
+ if (x < 1)
+ fun_l19_n24(x)
+ else
+ fun_l19_n371(x)
+ end
+end
+
+def fun_l18_n375(x)
+ if (x < 1)
+ fun_l19_n484(x)
+ else
+ fun_l19_n708(x)
+ end
+end
+
+def fun_l18_n376(x)
+ if (x < 1)
+ fun_l19_n810(x)
+ else
+ fun_l19_n856(x)
+ end
+end
+
+def fun_l18_n377(x)
+ if (x < 1)
+ fun_l19_n23(x)
+ else
+ fun_l19_n817(x)
+ end
+end
+
+def fun_l18_n378(x)
+ if (x < 1)
+ fun_l19_n827(x)
+ else
+ fun_l19_n639(x)
+ end
+end
+
+def fun_l18_n379(x)
+ if (x < 1)
+ fun_l19_n557(x)
+ else
+ fun_l19_n268(x)
+ end
+end
+
+def fun_l18_n380(x)
+ if (x < 1)
+ fun_l19_n885(x)
+ else
+ fun_l19_n421(x)
+ end
+end
+
+def fun_l18_n381(x)
+ if (x < 1)
+ fun_l19_n543(x)
+ else
+ fun_l19_n230(x)
+ end
+end
+
+def fun_l18_n382(x)
+ if (x < 1)
+ fun_l19_n978(x)
+ else
+ fun_l19_n848(x)
+ end
+end
+
+def fun_l18_n383(x)
+ if (x < 1)
+ fun_l19_n31(x)
+ else
+ fun_l19_n731(x)
+ end
+end
+
+def fun_l18_n384(x)
+ if (x < 1)
+ fun_l19_n20(x)
+ else
+ fun_l19_n149(x)
+ end
+end
+
+def fun_l18_n385(x)
+ if (x < 1)
+ fun_l19_n650(x)
+ else
+ fun_l19_n268(x)
+ end
+end
+
+def fun_l18_n386(x)
+ if (x < 1)
+ fun_l19_n491(x)
+ else
+ fun_l19_n644(x)
+ end
+end
+
+def fun_l18_n387(x)
+ if (x < 1)
+ fun_l19_n537(x)
+ else
+ fun_l19_n400(x)
+ end
+end
+
+def fun_l18_n388(x)
+ if (x < 1)
+ fun_l19_n939(x)
+ else
+ fun_l19_n861(x)
+ end
+end
+
+def fun_l18_n389(x)
+ if (x < 1)
+ fun_l19_n728(x)
+ else
+ fun_l19_n877(x)
+ end
+end
+
+def fun_l18_n390(x)
+ if (x < 1)
+ fun_l19_n226(x)
+ else
+ fun_l19_n288(x)
+ end
+end
+
+def fun_l18_n391(x)
+ if (x < 1)
+ fun_l19_n921(x)
+ else
+ fun_l19_n754(x)
+ end
+end
+
+def fun_l18_n392(x)
+ if (x < 1)
+ fun_l19_n71(x)
+ else
+ fun_l19_n844(x)
+ end
+end
+
+def fun_l18_n393(x)
+ if (x < 1)
+ fun_l19_n310(x)
+ else
+ fun_l19_n442(x)
+ end
+end
+
+def fun_l18_n394(x)
+ if (x < 1)
+ fun_l19_n539(x)
+ else
+ fun_l19_n933(x)
+ end
+end
+
+def fun_l18_n395(x)
+ if (x < 1)
+ fun_l19_n849(x)
+ else
+ fun_l19_n719(x)
+ end
+end
+
+def fun_l18_n396(x)
+ if (x < 1)
+ fun_l19_n922(x)
+ else
+ fun_l19_n435(x)
+ end
+end
+
+def fun_l18_n397(x)
+ if (x < 1)
+ fun_l19_n916(x)
+ else
+ fun_l19_n399(x)
+ end
+end
+
+def fun_l18_n398(x)
+ if (x < 1)
+ fun_l19_n820(x)
+ else
+ fun_l19_n650(x)
+ end
+end
+
+def fun_l18_n399(x)
+ if (x < 1)
+ fun_l19_n497(x)
+ else
+ fun_l19_n678(x)
+ end
+end
+
+def fun_l18_n400(x)
+ if (x < 1)
+ fun_l19_n562(x)
+ else
+ fun_l19_n392(x)
+ end
+end
+
+def fun_l18_n401(x)
+ if (x < 1)
+ fun_l19_n298(x)
+ else
+ fun_l19_n61(x)
+ end
+end
+
+def fun_l18_n402(x)
+ if (x < 1)
+ fun_l19_n803(x)
+ else
+ fun_l19_n535(x)
+ end
+end
+
+def fun_l18_n403(x)
+ if (x < 1)
+ fun_l19_n335(x)
+ else
+ fun_l19_n431(x)
+ end
+end
+
+def fun_l18_n404(x)
+ if (x < 1)
+ fun_l19_n558(x)
+ else
+ fun_l19_n821(x)
+ end
+end
+
+def fun_l18_n405(x)
+ if (x < 1)
+ fun_l19_n608(x)
+ else
+ fun_l19_n415(x)
+ end
+end
+
+def fun_l18_n406(x)
+ if (x < 1)
+ fun_l19_n709(x)
+ else
+ fun_l19_n635(x)
+ end
+end
+
+def fun_l18_n407(x)
+ if (x < 1)
+ fun_l19_n432(x)
+ else
+ fun_l19_n923(x)
+ end
+end
+
+def fun_l18_n408(x)
+ if (x < 1)
+ fun_l19_n612(x)
+ else
+ fun_l19_n386(x)
+ end
+end
+
+def fun_l18_n409(x)
+ if (x < 1)
+ fun_l19_n1(x)
+ else
+ fun_l19_n679(x)
+ end
+end
+
+def fun_l18_n410(x)
+ if (x < 1)
+ fun_l19_n998(x)
+ else
+ fun_l19_n969(x)
+ end
+end
+
+def fun_l18_n411(x)
+ if (x < 1)
+ fun_l19_n210(x)
+ else
+ fun_l19_n642(x)
+ end
+end
+
+def fun_l18_n412(x)
+ if (x < 1)
+ fun_l19_n902(x)
+ else
+ fun_l19_n591(x)
+ end
+end
+
+def fun_l18_n413(x)
+ if (x < 1)
+ fun_l19_n417(x)
+ else
+ fun_l19_n192(x)
+ end
+end
+
+def fun_l18_n414(x)
+ if (x < 1)
+ fun_l19_n543(x)
+ else
+ fun_l19_n277(x)
+ end
+end
+
+def fun_l18_n415(x)
+ if (x < 1)
+ fun_l19_n145(x)
+ else
+ fun_l19_n157(x)
+ end
+end
+
+def fun_l18_n416(x)
+ if (x < 1)
+ fun_l19_n696(x)
+ else
+ fun_l19_n453(x)
+ end
+end
+
+def fun_l18_n417(x)
+ if (x < 1)
+ fun_l19_n593(x)
+ else
+ fun_l19_n683(x)
+ end
+end
+
+def fun_l18_n418(x)
+ if (x < 1)
+ fun_l19_n459(x)
+ else
+ fun_l19_n292(x)
+ end
+end
+
+def fun_l18_n419(x)
+ if (x < 1)
+ fun_l19_n37(x)
+ else
+ fun_l19_n281(x)
+ end
+end
+
+def fun_l18_n420(x)
+ if (x < 1)
+ fun_l19_n39(x)
+ else
+ fun_l19_n642(x)
+ end
+end
+
+def fun_l18_n421(x)
+ if (x < 1)
+ fun_l19_n942(x)
+ else
+ fun_l19_n997(x)
+ end
+end
+
+def fun_l18_n422(x)
+ if (x < 1)
+ fun_l19_n18(x)
+ else
+ fun_l19_n301(x)
+ end
+end
+
+def fun_l18_n423(x)
+ if (x < 1)
+ fun_l19_n473(x)
+ else
+ fun_l19_n231(x)
+ end
+end
+
+def fun_l18_n424(x)
+ if (x < 1)
+ fun_l19_n331(x)
+ else
+ fun_l19_n110(x)
+ end
+end
+
+def fun_l18_n425(x)
+ if (x < 1)
+ fun_l19_n786(x)
+ else
+ fun_l19_n991(x)
+ end
+end
+
+def fun_l18_n426(x)
+ if (x < 1)
+ fun_l19_n440(x)
+ else
+ fun_l19_n17(x)
+ end
+end
+
+def fun_l18_n427(x)
+ if (x < 1)
+ fun_l19_n294(x)
+ else
+ fun_l19_n3(x)
+ end
+end
+
+def fun_l18_n428(x)
+ if (x < 1)
+ fun_l19_n369(x)
+ else
+ fun_l19_n576(x)
+ end
+end
+
+def fun_l18_n429(x)
+ if (x < 1)
+ fun_l19_n818(x)
+ else
+ fun_l19_n236(x)
+ end
+end
+
+def fun_l18_n430(x)
+ if (x < 1)
+ fun_l19_n360(x)
+ else
+ fun_l19_n443(x)
+ end
+end
+
+def fun_l18_n431(x)
+ if (x < 1)
+ fun_l19_n432(x)
+ else
+ fun_l19_n863(x)
+ end
+end
+
+def fun_l18_n432(x)
+ if (x < 1)
+ fun_l19_n591(x)
+ else
+ fun_l19_n167(x)
+ end
+end
+
+def fun_l18_n433(x)
+ if (x < 1)
+ fun_l19_n955(x)
+ else
+ fun_l19_n265(x)
+ end
+end
+
+def fun_l18_n434(x)
+ if (x < 1)
+ fun_l19_n374(x)
+ else
+ fun_l19_n812(x)
+ end
+end
+
+def fun_l18_n435(x)
+ if (x < 1)
+ fun_l19_n712(x)
+ else
+ fun_l19_n603(x)
+ end
+end
+
+def fun_l18_n436(x)
+ if (x < 1)
+ fun_l19_n750(x)
+ else
+ fun_l19_n852(x)
+ end
+end
+
+def fun_l18_n437(x)
+ if (x < 1)
+ fun_l19_n393(x)
+ else
+ fun_l19_n121(x)
+ end
+end
+
+def fun_l18_n438(x)
+ if (x < 1)
+ fun_l19_n555(x)
+ else
+ fun_l19_n33(x)
+ end
+end
+
+def fun_l18_n439(x)
+ if (x < 1)
+ fun_l19_n872(x)
+ else
+ fun_l19_n841(x)
+ end
+end
+
+def fun_l18_n440(x)
+ if (x < 1)
+ fun_l19_n828(x)
+ else
+ fun_l19_n549(x)
+ end
+end
+
+def fun_l18_n441(x)
+ if (x < 1)
+ fun_l19_n647(x)
+ else
+ fun_l19_n795(x)
+ end
+end
+
+def fun_l18_n442(x)
+ if (x < 1)
+ fun_l19_n609(x)
+ else
+ fun_l19_n837(x)
+ end
+end
+
+def fun_l18_n443(x)
+ if (x < 1)
+ fun_l19_n977(x)
+ else
+ fun_l19_n670(x)
+ end
+end
+
+def fun_l18_n444(x)
+ if (x < 1)
+ fun_l19_n649(x)
+ else
+ fun_l19_n912(x)
+ end
+end
+
+def fun_l18_n445(x)
+ if (x < 1)
+ fun_l19_n856(x)
+ else
+ fun_l19_n994(x)
+ end
+end
+
+def fun_l18_n446(x)
+ if (x < 1)
+ fun_l19_n868(x)
+ else
+ fun_l19_n105(x)
+ end
+end
+
+def fun_l18_n447(x)
+ if (x < 1)
+ fun_l19_n405(x)
+ else
+ fun_l19_n318(x)
+ end
+end
+
+def fun_l18_n448(x)
+ if (x < 1)
+ fun_l19_n966(x)
+ else
+ fun_l19_n214(x)
+ end
+end
+
+def fun_l18_n449(x)
+ if (x < 1)
+ fun_l19_n458(x)
+ else
+ fun_l19_n650(x)
+ end
+end
+
+def fun_l18_n450(x)
+ if (x < 1)
+ fun_l19_n875(x)
+ else
+ fun_l19_n697(x)
+ end
+end
+
+def fun_l18_n451(x)
+ if (x < 1)
+ fun_l19_n799(x)
+ else
+ fun_l19_n661(x)
+ end
+end
+
+def fun_l18_n452(x)
+ if (x < 1)
+ fun_l19_n677(x)
+ else
+ fun_l19_n750(x)
+ end
+end
+
+def fun_l18_n453(x)
+ if (x < 1)
+ fun_l19_n530(x)
+ else
+ fun_l19_n110(x)
+ end
+end
+
+def fun_l18_n454(x)
+ if (x < 1)
+ fun_l19_n785(x)
+ else
+ fun_l19_n381(x)
+ end
+end
+
+def fun_l18_n455(x)
+ if (x < 1)
+ fun_l19_n680(x)
+ else
+ fun_l19_n201(x)
+ end
+end
+
+def fun_l18_n456(x)
+ if (x < 1)
+ fun_l19_n246(x)
+ else
+ fun_l19_n972(x)
+ end
+end
+
+def fun_l18_n457(x)
+ if (x < 1)
+ fun_l19_n656(x)
+ else
+ fun_l19_n451(x)
+ end
+end
+
+def fun_l18_n458(x)
+ if (x < 1)
+ fun_l19_n612(x)
+ else
+ fun_l19_n288(x)
+ end
+end
+
+def fun_l18_n459(x)
+ if (x < 1)
+ fun_l19_n612(x)
+ else
+ fun_l19_n150(x)
+ end
+end
+
+def fun_l18_n460(x)
+ if (x < 1)
+ fun_l19_n549(x)
+ else
+ fun_l19_n917(x)
+ end
+end
+
+def fun_l18_n461(x)
+ if (x < 1)
+ fun_l19_n661(x)
+ else
+ fun_l19_n11(x)
+ end
+end
+
+def fun_l18_n462(x)
+ if (x < 1)
+ fun_l19_n172(x)
+ else
+ fun_l19_n561(x)
+ end
+end
+
+def fun_l18_n463(x)
+ if (x < 1)
+ fun_l19_n687(x)
+ else
+ fun_l19_n12(x)
+ end
+end
+
+def fun_l18_n464(x)
+ if (x < 1)
+ fun_l19_n57(x)
+ else
+ fun_l19_n835(x)
+ end
+end
+
+def fun_l18_n465(x)
+ if (x < 1)
+ fun_l19_n116(x)
+ else
+ fun_l19_n993(x)
+ end
+end
+
+def fun_l18_n466(x)
+ if (x < 1)
+ fun_l19_n932(x)
+ else
+ fun_l19_n623(x)
+ end
+end
+
+def fun_l18_n467(x)
+ if (x < 1)
+ fun_l19_n839(x)
+ else
+ fun_l19_n70(x)
+ end
+end
+
+def fun_l18_n468(x)
+ if (x < 1)
+ fun_l19_n574(x)
+ else
+ fun_l19_n193(x)
+ end
+end
+
+def fun_l18_n469(x)
+ if (x < 1)
+ fun_l19_n762(x)
+ else
+ fun_l19_n654(x)
+ end
+end
+
+def fun_l18_n470(x)
+ if (x < 1)
+ fun_l19_n656(x)
+ else
+ fun_l19_n42(x)
+ end
+end
+
+def fun_l18_n471(x)
+ if (x < 1)
+ fun_l19_n959(x)
+ else
+ fun_l19_n368(x)
+ end
+end
+
+def fun_l18_n472(x)
+ if (x < 1)
+ fun_l19_n494(x)
+ else
+ fun_l19_n357(x)
+ end
+end
+
+def fun_l18_n473(x)
+ if (x < 1)
+ fun_l19_n394(x)
+ else
+ fun_l19_n313(x)
+ end
+end
+
+def fun_l18_n474(x)
+ if (x < 1)
+ fun_l19_n826(x)
+ else
+ fun_l19_n33(x)
+ end
+end
+
+def fun_l18_n475(x)
+ if (x < 1)
+ fun_l19_n202(x)
+ else
+ fun_l19_n455(x)
+ end
+end
+
+def fun_l18_n476(x)
+ if (x < 1)
+ fun_l19_n855(x)
+ else
+ fun_l19_n375(x)
+ end
+end
+
+def fun_l18_n477(x)
+ if (x < 1)
+ fun_l19_n554(x)
+ else
+ fun_l19_n176(x)
+ end
+end
+
+def fun_l18_n478(x)
+ if (x < 1)
+ fun_l19_n705(x)
+ else
+ fun_l19_n509(x)
+ end
+end
+
+def fun_l18_n479(x)
+ if (x < 1)
+ fun_l19_n473(x)
+ else
+ fun_l19_n123(x)
+ end
+end
+
+def fun_l18_n480(x)
+ if (x < 1)
+ fun_l19_n108(x)
+ else
+ fun_l19_n125(x)
+ end
+end
+
+def fun_l18_n481(x)
+ if (x < 1)
+ fun_l19_n476(x)
+ else
+ fun_l19_n657(x)
+ end
+end
+
+def fun_l18_n482(x)
+ if (x < 1)
+ fun_l19_n800(x)
+ else
+ fun_l19_n691(x)
+ end
+end
+
+def fun_l18_n483(x)
+ if (x < 1)
+ fun_l19_n343(x)
+ else
+ fun_l19_n573(x)
+ end
+end
+
+def fun_l18_n484(x)
+ if (x < 1)
+ fun_l19_n654(x)
+ else
+ fun_l19_n114(x)
+ end
+end
+
+def fun_l18_n485(x)
+ if (x < 1)
+ fun_l19_n231(x)
+ else
+ fun_l19_n291(x)
+ end
+end
+
+def fun_l18_n486(x)
+ if (x < 1)
+ fun_l19_n877(x)
+ else
+ fun_l19_n628(x)
+ end
+end
+
+def fun_l18_n487(x)
+ if (x < 1)
+ fun_l19_n35(x)
+ else
+ fun_l19_n992(x)
+ end
+end
+
+def fun_l18_n488(x)
+ if (x < 1)
+ fun_l19_n592(x)
+ else
+ fun_l19_n951(x)
+ end
+end
+
+def fun_l18_n489(x)
+ if (x < 1)
+ fun_l19_n292(x)
+ else
+ fun_l19_n768(x)
+ end
+end
+
+def fun_l18_n490(x)
+ if (x < 1)
+ fun_l19_n191(x)
+ else
+ fun_l19_n759(x)
+ end
+end
+
+def fun_l18_n491(x)
+ if (x < 1)
+ fun_l19_n474(x)
+ else
+ fun_l19_n393(x)
+ end
+end
+
+def fun_l18_n492(x)
+ if (x < 1)
+ fun_l19_n556(x)
+ else
+ fun_l19_n691(x)
+ end
+end
+
+def fun_l18_n493(x)
+ if (x < 1)
+ fun_l19_n717(x)
+ else
+ fun_l19_n714(x)
+ end
+end
+
+def fun_l18_n494(x)
+ if (x < 1)
+ fun_l19_n542(x)
+ else
+ fun_l19_n505(x)
+ end
+end
+
+def fun_l18_n495(x)
+ if (x < 1)
+ fun_l19_n154(x)
+ else
+ fun_l19_n500(x)
+ end
+end
+
+def fun_l18_n496(x)
+ if (x < 1)
+ fun_l19_n311(x)
+ else
+ fun_l19_n458(x)
+ end
+end
+
+def fun_l18_n497(x)
+ if (x < 1)
+ fun_l19_n523(x)
+ else
+ fun_l19_n475(x)
+ end
+end
+
+def fun_l18_n498(x)
+ if (x < 1)
+ fun_l19_n101(x)
+ else
+ fun_l19_n478(x)
+ end
+end
+
+def fun_l18_n499(x)
+ if (x < 1)
+ fun_l19_n243(x)
+ else
+ fun_l19_n586(x)
+ end
+end
+
+def fun_l18_n500(x)
+ if (x < 1)
+ fun_l19_n263(x)
+ else
+ fun_l19_n888(x)
+ end
+end
+
+def fun_l18_n501(x)
+ if (x < 1)
+ fun_l19_n415(x)
+ else
+ fun_l19_n808(x)
+ end
+end
+
+def fun_l18_n502(x)
+ if (x < 1)
+ fun_l19_n38(x)
+ else
+ fun_l19_n640(x)
+ end
+end
+
+def fun_l18_n503(x)
+ if (x < 1)
+ fun_l19_n218(x)
+ else
+ fun_l19_n577(x)
+ end
+end
+
+def fun_l18_n504(x)
+ if (x < 1)
+ fun_l19_n723(x)
+ else
+ fun_l19_n594(x)
+ end
+end
+
+def fun_l18_n505(x)
+ if (x < 1)
+ fun_l19_n392(x)
+ else
+ fun_l19_n984(x)
+ end
+end
+
+def fun_l18_n506(x)
+ if (x < 1)
+ fun_l19_n310(x)
+ else
+ fun_l19_n668(x)
+ end
+end
+
+def fun_l18_n507(x)
+ if (x < 1)
+ fun_l19_n278(x)
+ else
+ fun_l19_n812(x)
+ end
+end
+
+def fun_l18_n508(x)
+ if (x < 1)
+ fun_l19_n230(x)
+ else
+ fun_l19_n479(x)
+ end
+end
+
+def fun_l18_n509(x)
+ if (x < 1)
+ fun_l19_n63(x)
+ else
+ fun_l19_n774(x)
+ end
+end
+
+def fun_l18_n510(x)
+ if (x < 1)
+ fun_l19_n607(x)
+ else
+ fun_l19_n433(x)
+ end
+end
+
+def fun_l18_n511(x)
+ if (x < 1)
+ fun_l19_n28(x)
+ else
+ fun_l19_n672(x)
+ end
+end
+
+def fun_l18_n512(x)
+ if (x < 1)
+ fun_l19_n684(x)
+ else
+ fun_l19_n247(x)
+ end
+end
+
+def fun_l18_n513(x)
+ if (x < 1)
+ fun_l19_n181(x)
+ else
+ fun_l19_n649(x)
+ end
+end
+
+def fun_l18_n514(x)
+ if (x < 1)
+ fun_l19_n787(x)
+ else
+ fun_l19_n281(x)
+ end
+end
+
+def fun_l18_n515(x)
+ if (x < 1)
+ fun_l19_n191(x)
+ else
+ fun_l19_n848(x)
+ end
+end
+
+def fun_l18_n516(x)
+ if (x < 1)
+ fun_l19_n796(x)
+ else
+ fun_l19_n572(x)
+ end
+end
+
+def fun_l18_n517(x)
+ if (x < 1)
+ fun_l19_n780(x)
+ else
+ fun_l19_n816(x)
+ end
+end
+
+def fun_l18_n518(x)
+ if (x < 1)
+ fun_l19_n429(x)
+ else
+ fun_l19_n681(x)
+ end
+end
+
+def fun_l18_n519(x)
+ if (x < 1)
+ fun_l19_n476(x)
+ else
+ fun_l19_n954(x)
+ end
+end
+
+def fun_l18_n520(x)
+ if (x < 1)
+ fun_l19_n537(x)
+ else
+ fun_l19_n690(x)
+ end
+end
+
+def fun_l18_n521(x)
+ if (x < 1)
+ fun_l19_n657(x)
+ else
+ fun_l19_n293(x)
+ end
+end
+
+def fun_l18_n522(x)
+ if (x < 1)
+ fun_l19_n369(x)
+ else
+ fun_l19_n685(x)
+ end
+end
+
+def fun_l18_n523(x)
+ if (x < 1)
+ fun_l19_n785(x)
+ else
+ fun_l19_n184(x)
+ end
+end
+
+def fun_l18_n524(x)
+ if (x < 1)
+ fun_l19_n6(x)
+ else
+ fun_l19_n970(x)
+ end
+end
+
+def fun_l18_n525(x)
+ if (x < 1)
+ fun_l19_n395(x)
+ else
+ fun_l19_n570(x)
+ end
+end
+
+def fun_l18_n526(x)
+ if (x < 1)
+ fun_l19_n837(x)
+ else
+ fun_l19_n992(x)
+ end
+end
+
+def fun_l18_n527(x)
+ if (x < 1)
+ fun_l19_n827(x)
+ else
+ fun_l19_n119(x)
+ end
+end
+
+def fun_l18_n528(x)
+ if (x < 1)
+ fun_l19_n819(x)
+ else
+ fun_l19_n382(x)
+ end
+end
+
+def fun_l18_n529(x)
+ if (x < 1)
+ fun_l19_n365(x)
+ else
+ fun_l19_n713(x)
+ end
+end
+
+def fun_l18_n530(x)
+ if (x < 1)
+ fun_l19_n223(x)
+ else
+ fun_l19_n346(x)
+ end
+end
+
+def fun_l18_n531(x)
+ if (x < 1)
+ fun_l19_n624(x)
+ else
+ fun_l19_n671(x)
+ end
+end
+
+def fun_l18_n532(x)
+ if (x < 1)
+ fun_l19_n522(x)
+ else
+ fun_l19_n354(x)
+ end
+end
+
+def fun_l18_n533(x)
+ if (x < 1)
+ fun_l19_n324(x)
+ else
+ fun_l19_n602(x)
+ end
+end
+
+def fun_l18_n534(x)
+ if (x < 1)
+ fun_l19_n138(x)
+ else
+ fun_l19_n259(x)
+ end
+end
+
+def fun_l18_n535(x)
+ if (x < 1)
+ fun_l19_n692(x)
+ else
+ fun_l19_n810(x)
+ end
+end
+
+def fun_l18_n536(x)
+ if (x < 1)
+ fun_l19_n694(x)
+ else
+ fun_l19_n39(x)
+ end
+end
+
+def fun_l18_n537(x)
+ if (x < 1)
+ fun_l19_n441(x)
+ else
+ fun_l19_n158(x)
+ end
+end
+
+def fun_l18_n538(x)
+ if (x < 1)
+ fun_l19_n609(x)
+ else
+ fun_l19_n54(x)
+ end
+end
+
+def fun_l18_n539(x)
+ if (x < 1)
+ fun_l19_n984(x)
+ else
+ fun_l19_n206(x)
+ end
+end
+
+def fun_l18_n540(x)
+ if (x < 1)
+ fun_l19_n548(x)
+ else
+ fun_l19_n558(x)
+ end
+end
+
+def fun_l18_n541(x)
+ if (x < 1)
+ fun_l19_n640(x)
+ else
+ fun_l19_n721(x)
+ end
+end
+
+def fun_l18_n542(x)
+ if (x < 1)
+ fun_l19_n50(x)
+ else
+ fun_l19_n598(x)
+ end
+end
+
+def fun_l18_n543(x)
+ if (x < 1)
+ fun_l19_n774(x)
+ else
+ fun_l19_n753(x)
+ end
+end
+
+def fun_l18_n544(x)
+ if (x < 1)
+ fun_l19_n151(x)
+ else
+ fun_l19_n75(x)
+ end
+end
+
+def fun_l18_n545(x)
+ if (x < 1)
+ fun_l19_n162(x)
+ else
+ fun_l19_n550(x)
+ end
+end
+
+def fun_l18_n546(x)
+ if (x < 1)
+ fun_l19_n892(x)
+ else
+ fun_l19_n322(x)
+ end
+end
+
+def fun_l18_n547(x)
+ if (x < 1)
+ fun_l19_n15(x)
+ else
+ fun_l19_n854(x)
+ end
+end
+
+def fun_l18_n548(x)
+ if (x < 1)
+ fun_l19_n54(x)
+ else
+ fun_l19_n627(x)
+ end
+end
+
+def fun_l18_n549(x)
+ if (x < 1)
+ fun_l19_n847(x)
+ else
+ fun_l19_n236(x)
+ end
+end
+
+def fun_l18_n550(x)
+ if (x < 1)
+ fun_l19_n796(x)
+ else
+ fun_l19_n895(x)
+ end
+end
+
+def fun_l18_n551(x)
+ if (x < 1)
+ fun_l19_n922(x)
+ else
+ fun_l19_n854(x)
+ end
+end
+
+def fun_l18_n552(x)
+ if (x < 1)
+ fun_l19_n378(x)
+ else
+ fun_l19_n449(x)
+ end
+end
+
+def fun_l18_n553(x)
+ if (x < 1)
+ fun_l19_n188(x)
+ else
+ fun_l19_n65(x)
+ end
+end
+
+def fun_l18_n554(x)
+ if (x < 1)
+ fun_l19_n606(x)
+ else
+ fun_l19_n292(x)
+ end
+end
+
+def fun_l18_n555(x)
+ if (x < 1)
+ fun_l19_n718(x)
+ else
+ fun_l19_n926(x)
+ end
+end
+
+def fun_l18_n556(x)
+ if (x < 1)
+ fun_l19_n765(x)
+ else
+ fun_l19_n975(x)
+ end
+end
+
+def fun_l18_n557(x)
+ if (x < 1)
+ fun_l19_n987(x)
+ else
+ fun_l19_n152(x)
+ end
+end
+
+def fun_l18_n558(x)
+ if (x < 1)
+ fun_l19_n978(x)
+ else
+ fun_l19_n861(x)
+ end
+end
+
+def fun_l18_n559(x)
+ if (x < 1)
+ fun_l19_n563(x)
+ else
+ fun_l19_n532(x)
+ end
+end
+
+def fun_l18_n560(x)
+ if (x < 1)
+ fun_l19_n492(x)
+ else
+ fun_l19_n337(x)
+ end
+end
+
+def fun_l18_n561(x)
+ if (x < 1)
+ fun_l19_n967(x)
+ else
+ fun_l19_n33(x)
+ end
+end
+
+def fun_l18_n562(x)
+ if (x < 1)
+ fun_l19_n509(x)
+ else
+ fun_l19_n212(x)
+ end
+end
+
+def fun_l18_n563(x)
+ if (x < 1)
+ fun_l19_n55(x)
+ else
+ fun_l19_n167(x)
+ end
+end
+
+def fun_l18_n564(x)
+ if (x < 1)
+ fun_l19_n263(x)
+ else
+ fun_l19_n386(x)
+ end
+end
+
+def fun_l18_n565(x)
+ if (x < 1)
+ fun_l19_n292(x)
+ else
+ fun_l19_n576(x)
+ end
+end
+
+def fun_l18_n566(x)
+ if (x < 1)
+ fun_l19_n16(x)
+ else
+ fun_l19_n180(x)
+ end
+end
+
+def fun_l18_n567(x)
+ if (x < 1)
+ fun_l19_n359(x)
+ else
+ fun_l19_n398(x)
+ end
+end
+
+def fun_l18_n568(x)
+ if (x < 1)
+ fun_l19_n799(x)
+ else
+ fun_l19_n616(x)
+ end
+end
+
+def fun_l18_n569(x)
+ if (x < 1)
+ fun_l19_n751(x)
+ else
+ fun_l19_n539(x)
+ end
+end
+
+def fun_l18_n570(x)
+ if (x < 1)
+ fun_l19_n497(x)
+ else
+ fun_l19_n197(x)
+ end
+end
+
+def fun_l18_n571(x)
+ if (x < 1)
+ fun_l19_n88(x)
+ else
+ fun_l19_n565(x)
+ end
+end
+
+def fun_l18_n572(x)
+ if (x < 1)
+ fun_l19_n213(x)
+ else
+ fun_l19_n137(x)
+ end
+end
+
+def fun_l18_n573(x)
+ if (x < 1)
+ fun_l19_n570(x)
+ else
+ fun_l19_n893(x)
+ end
+end
+
+def fun_l18_n574(x)
+ if (x < 1)
+ fun_l19_n436(x)
+ else
+ fun_l19_n285(x)
+ end
+end
+
+def fun_l18_n575(x)
+ if (x < 1)
+ fun_l19_n787(x)
+ else
+ fun_l19_n541(x)
+ end
+end
+
+def fun_l18_n576(x)
+ if (x < 1)
+ fun_l19_n432(x)
+ else
+ fun_l19_n371(x)
+ end
+end
+
+def fun_l18_n577(x)
+ if (x < 1)
+ fun_l19_n542(x)
+ else
+ fun_l19_n431(x)
+ end
+end
+
+def fun_l18_n578(x)
+ if (x < 1)
+ fun_l19_n829(x)
+ else
+ fun_l19_n415(x)
+ end
+end
+
+def fun_l18_n579(x)
+ if (x < 1)
+ fun_l19_n925(x)
+ else
+ fun_l19_n862(x)
+ end
+end
+
+def fun_l18_n580(x)
+ if (x < 1)
+ fun_l19_n214(x)
+ else
+ fun_l19_n67(x)
+ end
+end
+
+def fun_l18_n581(x)
+ if (x < 1)
+ fun_l19_n734(x)
+ else
+ fun_l19_n220(x)
+ end
+end
+
+def fun_l18_n582(x)
+ if (x < 1)
+ fun_l19_n971(x)
+ else
+ fun_l19_n359(x)
+ end
+end
+
+def fun_l18_n583(x)
+ if (x < 1)
+ fun_l19_n293(x)
+ else
+ fun_l19_n286(x)
+ end
+end
+
+def fun_l18_n584(x)
+ if (x < 1)
+ fun_l19_n618(x)
+ else
+ fun_l19_n866(x)
+ end
+end
+
+def fun_l18_n585(x)
+ if (x < 1)
+ fun_l19_n315(x)
+ else
+ fun_l19_n594(x)
+ end
+end
+
+def fun_l18_n586(x)
+ if (x < 1)
+ fun_l19_n230(x)
+ else
+ fun_l19_n450(x)
+ end
+end
+
+def fun_l18_n587(x)
+ if (x < 1)
+ fun_l19_n805(x)
+ else
+ fun_l19_n429(x)
+ end
+end
+
+def fun_l18_n588(x)
+ if (x < 1)
+ fun_l19_n782(x)
+ else
+ fun_l19_n133(x)
+ end
+end
+
+def fun_l18_n589(x)
+ if (x < 1)
+ fun_l19_n166(x)
+ else
+ fun_l19_n111(x)
+ end
+end
+
+def fun_l18_n590(x)
+ if (x < 1)
+ fun_l19_n26(x)
+ else
+ fun_l19_n678(x)
+ end
+end
+
+def fun_l18_n591(x)
+ if (x < 1)
+ fun_l19_n728(x)
+ else
+ fun_l19_n346(x)
+ end
+end
+
+def fun_l18_n592(x)
+ if (x < 1)
+ fun_l19_n882(x)
+ else
+ fun_l19_n930(x)
+ end
+end
+
+def fun_l18_n593(x)
+ if (x < 1)
+ fun_l19_n454(x)
+ else
+ fun_l19_n560(x)
+ end
+end
+
+def fun_l18_n594(x)
+ if (x < 1)
+ fun_l19_n881(x)
+ else
+ fun_l19_n929(x)
+ end
+end
+
+def fun_l18_n595(x)
+ if (x < 1)
+ fun_l19_n464(x)
+ else
+ fun_l19_n8(x)
+ end
+end
+
+def fun_l18_n596(x)
+ if (x < 1)
+ fun_l19_n247(x)
+ else
+ fun_l19_n48(x)
+ end
+end
+
+def fun_l18_n597(x)
+ if (x < 1)
+ fun_l19_n838(x)
+ else
+ fun_l19_n811(x)
+ end
+end
+
+def fun_l18_n598(x)
+ if (x < 1)
+ fun_l19_n493(x)
+ else
+ fun_l19_n975(x)
+ end
+end
+
+def fun_l18_n599(x)
+ if (x < 1)
+ fun_l19_n372(x)
+ else
+ fun_l19_n334(x)
+ end
+end
+
+def fun_l18_n600(x)
+ if (x < 1)
+ fun_l19_n971(x)
+ else
+ fun_l19_n198(x)
+ end
+end
+
+def fun_l18_n601(x)
+ if (x < 1)
+ fun_l19_n494(x)
+ else
+ fun_l19_n273(x)
+ end
+end
+
+def fun_l18_n602(x)
+ if (x < 1)
+ fun_l19_n778(x)
+ else
+ fun_l19_n815(x)
+ end
+end
+
+def fun_l18_n603(x)
+ if (x < 1)
+ fun_l19_n247(x)
+ else
+ fun_l19_n615(x)
+ end
+end
+
+def fun_l18_n604(x)
+ if (x < 1)
+ fun_l19_n659(x)
+ else
+ fun_l19_n613(x)
+ end
+end
+
+def fun_l18_n605(x)
+ if (x < 1)
+ fun_l19_n814(x)
+ else
+ fun_l19_n742(x)
+ end
+end
+
+def fun_l18_n606(x)
+ if (x < 1)
+ fun_l19_n988(x)
+ else
+ fun_l19_n877(x)
+ end
+end
+
+def fun_l18_n607(x)
+ if (x < 1)
+ fun_l19_n908(x)
+ else
+ fun_l19_n491(x)
+ end
+end
+
+def fun_l18_n608(x)
+ if (x < 1)
+ fun_l19_n600(x)
+ else
+ fun_l19_n381(x)
+ end
+end
+
+def fun_l18_n609(x)
+ if (x < 1)
+ fun_l19_n695(x)
+ else
+ fun_l19_n343(x)
+ end
+end
+
+def fun_l18_n610(x)
+ if (x < 1)
+ fun_l19_n686(x)
+ else
+ fun_l19_n154(x)
+ end
+end
+
+def fun_l18_n611(x)
+ if (x < 1)
+ fun_l19_n413(x)
+ else
+ fun_l19_n364(x)
+ end
+end
+
+def fun_l18_n612(x)
+ if (x < 1)
+ fun_l19_n86(x)
+ else
+ fun_l19_n478(x)
+ end
+end
+
+def fun_l18_n613(x)
+ if (x < 1)
+ fun_l19_n288(x)
+ else
+ fun_l19_n134(x)
+ end
+end
+
+def fun_l18_n614(x)
+ if (x < 1)
+ fun_l19_n71(x)
+ else
+ fun_l19_n95(x)
+ end
+end
+
+def fun_l18_n615(x)
+ if (x < 1)
+ fun_l19_n716(x)
+ else
+ fun_l19_n697(x)
+ end
+end
+
+def fun_l18_n616(x)
+ if (x < 1)
+ fun_l19_n24(x)
+ else
+ fun_l19_n365(x)
+ end
+end
+
+def fun_l18_n617(x)
+ if (x < 1)
+ fun_l19_n317(x)
+ else
+ fun_l19_n117(x)
+ end
+end
+
+def fun_l18_n618(x)
+ if (x < 1)
+ fun_l19_n304(x)
+ else
+ fun_l19_n115(x)
+ end
+end
+
+def fun_l18_n619(x)
+ if (x < 1)
+ fun_l19_n322(x)
+ else
+ fun_l19_n105(x)
+ end
+end
+
+def fun_l18_n620(x)
+ if (x < 1)
+ fun_l19_n213(x)
+ else
+ fun_l19_n122(x)
+ end
+end
+
+def fun_l18_n621(x)
+ if (x < 1)
+ fun_l19_n675(x)
+ else
+ fun_l19_n769(x)
+ end
+end
+
+def fun_l18_n622(x)
+ if (x < 1)
+ fun_l19_n660(x)
+ else
+ fun_l19_n895(x)
+ end
+end
+
+def fun_l18_n623(x)
+ if (x < 1)
+ fun_l19_n656(x)
+ else
+ fun_l19_n698(x)
+ end
+end
+
+def fun_l18_n624(x)
+ if (x < 1)
+ fun_l19_n575(x)
+ else
+ fun_l19_n274(x)
+ end
+end
+
+def fun_l18_n625(x)
+ if (x < 1)
+ fun_l19_n44(x)
+ else
+ fun_l19_n78(x)
+ end
+end
+
+def fun_l18_n626(x)
+ if (x < 1)
+ fun_l19_n326(x)
+ else
+ fun_l19_n76(x)
+ end
+end
+
+def fun_l18_n627(x)
+ if (x < 1)
+ fun_l19_n365(x)
+ else
+ fun_l19_n453(x)
+ end
+end
+
+def fun_l18_n628(x)
+ if (x < 1)
+ fun_l19_n306(x)
+ else
+ fun_l19_n63(x)
+ end
+end
+
+def fun_l18_n629(x)
+ if (x < 1)
+ fun_l19_n116(x)
+ else
+ fun_l19_n577(x)
+ end
+end
+
+def fun_l18_n630(x)
+ if (x < 1)
+ fun_l19_n625(x)
+ else
+ fun_l19_n321(x)
+ end
+end
+
+def fun_l18_n631(x)
+ if (x < 1)
+ fun_l19_n328(x)
+ else
+ fun_l19_n989(x)
+ end
+end
+
+def fun_l18_n632(x)
+ if (x < 1)
+ fun_l19_n216(x)
+ else
+ fun_l19_n375(x)
+ end
+end
+
+def fun_l18_n633(x)
+ if (x < 1)
+ fun_l19_n942(x)
+ else
+ fun_l19_n17(x)
+ end
+end
+
+def fun_l18_n634(x)
+ if (x < 1)
+ fun_l19_n821(x)
+ else
+ fun_l19_n132(x)
+ end
+end
+
+def fun_l18_n635(x)
+ if (x < 1)
+ fun_l19_n164(x)
+ else
+ fun_l19_n679(x)
+ end
+end
+
+def fun_l18_n636(x)
+ if (x < 1)
+ fun_l19_n494(x)
+ else
+ fun_l19_n404(x)
+ end
+end
+
+def fun_l18_n637(x)
+ if (x < 1)
+ fun_l19_n715(x)
+ else
+ fun_l19_n955(x)
+ end
+end
+
+def fun_l18_n638(x)
+ if (x < 1)
+ fun_l19_n297(x)
+ else
+ fun_l19_n349(x)
+ end
+end
+
+def fun_l18_n639(x)
+ if (x < 1)
+ fun_l19_n835(x)
+ else
+ fun_l19_n965(x)
+ end
+end
+
+def fun_l18_n640(x)
+ if (x < 1)
+ fun_l19_n778(x)
+ else
+ fun_l19_n572(x)
+ end
+end
+
+def fun_l18_n641(x)
+ if (x < 1)
+ fun_l19_n51(x)
+ else
+ fun_l19_n497(x)
+ end
+end
+
+def fun_l18_n642(x)
+ if (x < 1)
+ fun_l19_n390(x)
+ else
+ fun_l19_n341(x)
+ end
+end
+
+def fun_l18_n643(x)
+ if (x < 1)
+ fun_l19_n961(x)
+ else
+ fun_l19_n966(x)
+ end
+end
+
+def fun_l18_n644(x)
+ if (x < 1)
+ fun_l19_n832(x)
+ else
+ fun_l19_n279(x)
+ end
+end
+
+def fun_l18_n645(x)
+ if (x < 1)
+ fun_l19_n0(x)
+ else
+ fun_l19_n266(x)
+ end
+end
+
+def fun_l18_n646(x)
+ if (x < 1)
+ fun_l19_n512(x)
+ else
+ fun_l19_n988(x)
+ end
+end
+
+def fun_l18_n647(x)
+ if (x < 1)
+ fun_l19_n728(x)
+ else
+ fun_l19_n390(x)
+ end
+end
+
+def fun_l18_n648(x)
+ if (x < 1)
+ fun_l19_n61(x)
+ else
+ fun_l19_n188(x)
+ end
+end
+
+def fun_l18_n649(x)
+ if (x < 1)
+ fun_l19_n772(x)
+ else
+ fun_l19_n457(x)
+ end
+end
+
+def fun_l18_n650(x)
+ if (x < 1)
+ fun_l19_n768(x)
+ else
+ fun_l19_n624(x)
+ end
+end
+
+def fun_l18_n651(x)
+ if (x < 1)
+ fun_l19_n30(x)
+ else
+ fun_l19_n663(x)
+ end
+end
+
+def fun_l18_n652(x)
+ if (x < 1)
+ fun_l19_n42(x)
+ else
+ fun_l19_n781(x)
+ end
+end
+
+def fun_l18_n653(x)
+ if (x < 1)
+ fun_l19_n59(x)
+ else
+ fun_l19_n99(x)
+ end
+end
+
+def fun_l18_n654(x)
+ if (x < 1)
+ fun_l19_n81(x)
+ else
+ fun_l19_n368(x)
+ end
+end
+
+def fun_l18_n655(x)
+ if (x < 1)
+ fun_l19_n0(x)
+ else
+ fun_l19_n321(x)
+ end
+end
+
+def fun_l18_n656(x)
+ if (x < 1)
+ fun_l19_n344(x)
+ else
+ fun_l19_n996(x)
+ end
+end
+
+def fun_l18_n657(x)
+ if (x < 1)
+ fun_l19_n384(x)
+ else
+ fun_l19_n123(x)
+ end
+end
+
+def fun_l18_n658(x)
+ if (x < 1)
+ fun_l19_n336(x)
+ else
+ fun_l19_n928(x)
+ end
+end
+
+def fun_l18_n659(x)
+ if (x < 1)
+ fun_l19_n785(x)
+ else
+ fun_l19_n370(x)
+ end
+end
+
+def fun_l18_n660(x)
+ if (x < 1)
+ fun_l19_n508(x)
+ else
+ fun_l19_n200(x)
+ end
+end
+
+def fun_l18_n661(x)
+ if (x < 1)
+ fun_l19_n674(x)
+ else
+ fun_l19_n95(x)
+ end
+end
+
+def fun_l18_n662(x)
+ if (x < 1)
+ fun_l19_n839(x)
+ else
+ fun_l19_n737(x)
+ end
+end
+
+def fun_l18_n663(x)
+ if (x < 1)
+ fun_l19_n670(x)
+ else
+ fun_l19_n77(x)
+ end
+end
+
+def fun_l18_n664(x)
+ if (x < 1)
+ fun_l19_n402(x)
+ else
+ fun_l19_n7(x)
+ end
+end
+
+def fun_l18_n665(x)
+ if (x < 1)
+ fun_l19_n357(x)
+ else
+ fun_l19_n961(x)
+ end
+end
+
+def fun_l18_n666(x)
+ if (x < 1)
+ fun_l19_n72(x)
+ else
+ fun_l19_n535(x)
+ end
+end
+
+def fun_l18_n667(x)
+ if (x < 1)
+ fun_l19_n317(x)
+ else
+ fun_l19_n450(x)
+ end
+end
+
+def fun_l18_n668(x)
+ if (x < 1)
+ fun_l19_n823(x)
+ else
+ fun_l19_n301(x)
+ end
+end
+
+def fun_l18_n669(x)
+ if (x < 1)
+ fun_l19_n36(x)
+ else
+ fun_l19_n660(x)
+ end
+end
+
+def fun_l18_n670(x)
+ if (x < 1)
+ fun_l19_n322(x)
+ else
+ fun_l19_n626(x)
+ end
+end
+
+def fun_l18_n671(x)
+ if (x < 1)
+ fun_l19_n408(x)
+ else
+ fun_l19_n872(x)
+ end
+end
+
+def fun_l18_n672(x)
+ if (x < 1)
+ fun_l19_n614(x)
+ else
+ fun_l19_n567(x)
+ end
+end
+
+def fun_l18_n673(x)
+ if (x < 1)
+ fun_l19_n601(x)
+ else
+ fun_l19_n429(x)
+ end
+end
+
+def fun_l18_n674(x)
+ if (x < 1)
+ fun_l19_n658(x)
+ else
+ fun_l19_n424(x)
+ end
+end
+
+def fun_l18_n675(x)
+ if (x < 1)
+ fun_l19_n248(x)
+ else
+ fun_l19_n29(x)
+ end
+end
+
+def fun_l18_n676(x)
+ if (x < 1)
+ fun_l19_n206(x)
+ else
+ fun_l19_n838(x)
+ end
+end
+
+def fun_l18_n677(x)
+ if (x < 1)
+ fun_l19_n354(x)
+ else
+ fun_l19_n700(x)
+ end
+end
+
+def fun_l18_n678(x)
+ if (x < 1)
+ fun_l19_n264(x)
+ else
+ fun_l19_n591(x)
+ end
+end
+
+def fun_l18_n679(x)
+ if (x < 1)
+ fun_l19_n73(x)
+ else
+ fun_l19_n419(x)
+ end
+end
+
+def fun_l18_n680(x)
+ if (x < 1)
+ fun_l19_n260(x)
+ else
+ fun_l19_n902(x)
+ end
+end
+
+def fun_l18_n681(x)
+ if (x < 1)
+ fun_l19_n776(x)
+ else
+ fun_l19_n148(x)
+ end
+end
+
+def fun_l18_n682(x)
+ if (x < 1)
+ fun_l19_n819(x)
+ else
+ fun_l19_n743(x)
+ end
+end
+
+def fun_l18_n683(x)
+ if (x < 1)
+ fun_l19_n831(x)
+ else
+ fun_l19_n194(x)
+ end
+end
+
+def fun_l18_n684(x)
+ if (x < 1)
+ fun_l19_n652(x)
+ else
+ fun_l19_n229(x)
+ end
+end
+
+def fun_l18_n685(x)
+ if (x < 1)
+ fun_l19_n533(x)
+ else
+ fun_l19_n600(x)
+ end
+end
+
+def fun_l18_n686(x)
+ if (x < 1)
+ fun_l19_n45(x)
+ else
+ fun_l19_n623(x)
+ end
+end
+
+def fun_l18_n687(x)
+ if (x < 1)
+ fun_l19_n287(x)
+ else
+ fun_l19_n443(x)
+ end
+end
+
+def fun_l18_n688(x)
+ if (x < 1)
+ fun_l19_n719(x)
+ else
+ fun_l19_n819(x)
+ end
+end
+
+def fun_l18_n689(x)
+ if (x < 1)
+ fun_l19_n872(x)
+ else
+ fun_l19_n944(x)
+ end
+end
+
+def fun_l18_n690(x)
+ if (x < 1)
+ fun_l19_n352(x)
+ else
+ fun_l19_n49(x)
+ end
+end
+
+def fun_l18_n691(x)
+ if (x < 1)
+ fun_l19_n438(x)
+ else
+ fun_l19_n592(x)
+ end
+end
+
+def fun_l18_n692(x)
+ if (x < 1)
+ fun_l19_n717(x)
+ else
+ fun_l19_n30(x)
+ end
+end
+
+def fun_l18_n693(x)
+ if (x < 1)
+ fun_l19_n132(x)
+ else
+ fun_l19_n830(x)
+ end
+end
+
+def fun_l18_n694(x)
+ if (x < 1)
+ fun_l19_n17(x)
+ else
+ fun_l19_n649(x)
+ end
+end
+
+def fun_l18_n695(x)
+ if (x < 1)
+ fun_l19_n883(x)
+ else
+ fun_l19_n812(x)
+ end
+end
+
+def fun_l18_n696(x)
+ if (x < 1)
+ fun_l19_n354(x)
+ else
+ fun_l19_n927(x)
+ end
+end
+
+def fun_l18_n697(x)
+ if (x < 1)
+ fun_l19_n534(x)
+ else
+ fun_l19_n192(x)
+ end
+end
+
+def fun_l18_n698(x)
+ if (x < 1)
+ fun_l19_n911(x)
+ else
+ fun_l19_n386(x)
+ end
+end
+
+def fun_l18_n699(x)
+ if (x < 1)
+ fun_l19_n1(x)
+ else
+ fun_l19_n253(x)
+ end
+end
+
+def fun_l18_n700(x)
+ if (x < 1)
+ fun_l19_n318(x)
+ else
+ fun_l19_n323(x)
+ end
+end
+
+def fun_l18_n701(x)
+ if (x < 1)
+ fun_l19_n158(x)
+ else
+ fun_l19_n61(x)
+ end
+end
+
+def fun_l18_n702(x)
+ if (x < 1)
+ fun_l19_n719(x)
+ else
+ fun_l19_n842(x)
+ end
+end
+
+def fun_l18_n703(x)
+ if (x < 1)
+ fun_l19_n918(x)
+ else
+ fun_l19_n231(x)
+ end
+end
+
+def fun_l18_n704(x)
+ if (x < 1)
+ fun_l19_n136(x)
+ else
+ fun_l19_n28(x)
+ end
+end
+
+def fun_l18_n705(x)
+ if (x < 1)
+ fun_l19_n451(x)
+ else
+ fun_l19_n328(x)
+ end
+end
+
+def fun_l18_n706(x)
+ if (x < 1)
+ fun_l19_n182(x)
+ else
+ fun_l19_n434(x)
+ end
+end
+
+def fun_l18_n707(x)
+ if (x < 1)
+ fun_l19_n368(x)
+ else
+ fun_l19_n302(x)
+ end
+end
+
+def fun_l18_n708(x)
+ if (x < 1)
+ fun_l19_n370(x)
+ else
+ fun_l19_n291(x)
+ end
+end
+
+def fun_l18_n709(x)
+ if (x < 1)
+ fun_l19_n104(x)
+ else
+ fun_l19_n530(x)
+ end
+end
+
+def fun_l18_n710(x)
+ if (x < 1)
+ fun_l19_n712(x)
+ else
+ fun_l19_n325(x)
+ end
+end
+
+def fun_l18_n711(x)
+ if (x < 1)
+ fun_l19_n555(x)
+ else
+ fun_l19_n299(x)
+ end
+end
+
+def fun_l18_n712(x)
+ if (x < 1)
+ fun_l19_n40(x)
+ else
+ fun_l19_n342(x)
+ end
+end
+
+def fun_l18_n713(x)
+ if (x < 1)
+ fun_l19_n871(x)
+ else
+ fun_l19_n72(x)
+ end
+end
+
+def fun_l18_n714(x)
+ if (x < 1)
+ fun_l19_n137(x)
+ else
+ fun_l19_n195(x)
+ end
+end
+
+def fun_l18_n715(x)
+ if (x < 1)
+ fun_l19_n534(x)
+ else
+ fun_l19_n613(x)
+ end
+end
+
+def fun_l18_n716(x)
+ if (x < 1)
+ fun_l19_n591(x)
+ else
+ fun_l19_n899(x)
+ end
+end
+
+def fun_l18_n717(x)
+ if (x < 1)
+ fun_l19_n103(x)
+ else
+ fun_l19_n333(x)
+ end
+end
+
+def fun_l18_n718(x)
+ if (x < 1)
+ fun_l19_n470(x)
+ else
+ fun_l19_n576(x)
+ end
+end
+
+def fun_l18_n719(x)
+ if (x < 1)
+ fun_l19_n494(x)
+ else
+ fun_l19_n765(x)
+ end
+end
+
+def fun_l18_n720(x)
+ if (x < 1)
+ fun_l19_n317(x)
+ else
+ fun_l19_n720(x)
+ end
+end
+
+def fun_l18_n721(x)
+ if (x < 1)
+ fun_l19_n567(x)
+ else
+ fun_l19_n280(x)
+ end
+end
+
+def fun_l18_n722(x)
+ if (x < 1)
+ fun_l19_n642(x)
+ else
+ fun_l19_n700(x)
+ end
+end
+
+def fun_l18_n723(x)
+ if (x < 1)
+ fun_l19_n775(x)
+ else
+ fun_l19_n239(x)
+ end
+end
+
+def fun_l18_n724(x)
+ if (x < 1)
+ fun_l19_n346(x)
+ else
+ fun_l19_n974(x)
+ end
+end
+
+def fun_l18_n725(x)
+ if (x < 1)
+ fun_l19_n509(x)
+ else
+ fun_l19_n90(x)
+ end
+end
+
+def fun_l18_n726(x)
+ if (x < 1)
+ fun_l19_n834(x)
+ else
+ fun_l19_n793(x)
+ end
+end
+
+def fun_l18_n727(x)
+ if (x < 1)
+ fun_l19_n588(x)
+ else
+ fun_l19_n895(x)
+ end
+end
+
+def fun_l18_n728(x)
+ if (x < 1)
+ fun_l19_n18(x)
+ else
+ fun_l19_n218(x)
+ end
+end
+
+def fun_l18_n729(x)
+ if (x < 1)
+ fun_l19_n109(x)
+ else
+ fun_l19_n970(x)
+ end
+end
+
+def fun_l18_n730(x)
+ if (x < 1)
+ fun_l19_n721(x)
+ else
+ fun_l19_n81(x)
+ end
+end
+
+def fun_l18_n731(x)
+ if (x < 1)
+ fun_l19_n935(x)
+ else
+ fun_l19_n652(x)
+ end
+end
+
+def fun_l18_n732(x)
+ if (x < 1)
+ fun_l19_n821(x)
+ else
+ fun_l19_n32(x)
+ end
+end
+
+def fun_l18_n733(x)
+ if (x < 1)
+ fun_l19_n189(x)
+ else
+ fun_l19_n469(x)
+ end
+end
+
+def fun_l18_n734(x)
+ if (x < 1)
+ fun_l19_n11(x)
+ else
+ fun_l19_n741(x)
+ end
+end
+
+def fun_l18_n735(x)
+ if (x < 1)
+ fun_l19_n575(x)
+ else
+ fun_l19_n679(x)
+ end
+end
+
+def fun_l18_n736(x)
+ if (x < 1)
+ fun_l19_n442(x)
+ else
+ fun_l19_n652(x)
+ end
+end
+
+def fun_l18_n737(x)
+ if (x < 1)
+ fun_l19_n22(x)
+ else
+ fun_l19_n950(x)
+ end
+end
+
+def fun_l18_n738(x)
+ if (x < 1)
+ fun_l19_n605(x)
+ else
+ fun_l19_n16(x)
+ end
+end
+
+def fun_l18_n739(x)
+ if (x < 1)
+ fun_l19_n888(x)
+ else
+ fun_l19_n873(x)
+ end
+end
+
+def fun_l18_n740(x)
+ if (x < 1)
+ fun_l19_n355(x)
+ else
+ fun_l19_n558(x)
+ end
+end
+
+def fun_l18_n741(x)
+ if (x < 1)
+ fun_l19_n171(x)
+ else
+ fun_l19_n513(x)
+ end
+end
+
+def fun_l18_n742(x)
+ if (x < 1)
+ fun_l19_n843(x)
+ else
+ fun_l19_n833(x)
+ end
+end
+
+def fun_l18_n743(x)
+ if (x < 1)
+ fun_l19_n774(x)
+ else
+ fun_l19_n992(x)
+ end
+end
+
+def fun_l18_n744(x)
+ if (x < 1)
+ fun_l19_n505(x)
+ else
+ fun_l19_n353(x)
+ end
+end
+
+def fun_l18_n745(x)
+ if (x < 1)
+ fun_l19_n93(x)
+ else
+ fun_l19_n476(x)
+ end
+end
+
+def fun_l18_n746(x)
+ if (x < 1)
+ fun_l19_n555(x)
+ else
+ fun_l19_n233(x)
+ end
+end
+
+def fun_l18_n747(x)
+ if (x < 1)
+ fun_l19_n639(x)
+ else
+ fun_l19_n239(x)
+ end
+end
+
+def fun_l18_n748(x)
+ if (x < 1)
+ fun_l19_n318(x)
+ else
+ fun_l19_n342(x)
+ end
+end
+
+def fun_l18_n749(x)
+ if (x < 1)
+ fun_l19_n80(x)
+ else
+ fun_l19_n252(x)
+ end
+end
+
+def fun_l18_n750(x)
+ if (x < 1)
+ fun_l19_n546(x)
+ else
+ fun_l19_n57(x)
+ end
+end
+
+def fun_l18_n751(x)
+ if (x < 1)
+ fun_l19_n620(x)
+ else
+ fun_l19_n732(x)
+ end
+end
+
+def fun_l18_n752(x)
+ if (x < 1)
+ fun_l19_n870(x)
+ else
+ fun_l19_n696(x)
+ end
+end
+
+def fun_l18_n753(x)
+ if (x < 1)
+ fun_l19_n633(x)
+ else
+ fun_l19_n547(x)
+ end
+end
+
+def fun_l18_n754(x)
+ if (x < 1)
+ fun_l19_n860(x)
+ else
+ fun_l19_n70(x)
+ end
+end
+
+def fun_l18_n755(x)
+ if (x < 1)
+ fun_l19_n4(x)
+ else
+ fun_l19_n560(x)
+ end
+end
+
+def fun_l18_n756(x)
+ if (x < 1)
+ fun_l19_n227(x)
+ else
+ fun_l19_n189(x)
+ end
+end
+
+def fun_l18_n757(x)
+ if (x < 1)
+ fun_l19_n560(x)
+ else
+ fun_l19_n467(x)
+ end
+end
+
+def fun_l18_n758(x)
+ if (x < 1)
+ fun_l19_n777(x)
+ else
+ fun_l19_n761(x)
+ end
+end
+
+def fun_l18_n759(x)
+ if (x < 1)
+ fun_l19_n626(x)
+ else
+ fun_l19_n391(x)
+ end
+end
+
+def fun_l18_n760(x)
+ if (x < 1)
+ fun_l19_n989(x)
+ else
+ fun_l19_n629(x)
+ end
+end
+
+def fun_l18_n761(x)
+ if (x < 1)
+ fun_l19_n509(x)
+ else
+ fun_l19_n268(x)
+ end
+end
+
+def fun_l18_n762(x)
+ if (x < 1)
+ fun_l19_n49(x)
+ else
+ fun_l19_n149(x)
+ end
+end
+
+def fun_l18_n763(x)
+ if (x < 1)
+ fun_l19_n614(x)
+ else
+ fun_l19_n490(x)
+ end
+end
+
+def fun_l18_n764(x)
+ if (x < 1)
+ fun_l19_n7(x)
+ else
+ fun_l19_n686(x)
+ end
+end
+
+def fun_l18_n765(x)
+ if (x < 1)
+ fun_l19_n93(x)
+ else
+ fun_l19_n334(x)
+ end
+end
+
+def fun_l18_n766(x)
+ if (x < 1)
+ fun_l19_n30(x)
+ else
+ fun_l19_n396(x)
+ end
+end
+
+def fun_l18_n767(x)
+ if (x < 1)
+ fun_l19_n437(x)
+ else
+ fun_l19_n614(x)
+ end
+end
+
+def fun_l18_n768(x)
+ if (x < 1)
+ fun_l19_n168(x)
+ else
+ fun_l19_n915(x)
+ end
+end
+
+def fun_l18_n769(x)
+ if (x < 1)
+ fun_l19_n465(x)
+ else
+ fun_l19_n816(x)
+ end
+end
+
+def fun_l18_n770(x)
+ if (x < 1)
+ fun_l19_n692(x)
+ else
+ fun_l19_n772(x)
+ end
+end
+
+def fun_l18_n771(x)
+ if (x < 1)
+ fun_l19_n196(x)
+ else
+ fun_l19_n812(x)
+ end
+end
+
+def fun_l18_n772(x)
+ if (x < 1)
+ fun_l19_n785(x)
+ else
+ fun_l19_n592(x)
+ end
+end
+
+def fun_l18_n773(x)
+ if (x < 1)
+ fun_l19_n649(x)
+ else
+ fun_l19_n50(x)
+ end
+end
+
+def fun_l18_n774(x)
+ if (x < 1)
+ fun_l19_n102(x)
+ else
+ fun_l19_n843(x)
+ end
+end
+
+def fun_l18_n775(x)
+ if (x < 1)
+ fun_l19_n856(x)
+ else
+ fun_l19_n805(x)
+ end
+end
+
+def fun_l18_n776(x)
+ if (x < 1)
+ fun_l19_n449(x)
+ else
+ fun_l19_n425(x)
+ end
+end
+
+def fun_l18_n777(x)
+ if (x < 1)
+ fun_l19_n855(x)
+ else
+ fun_l19_n345(x)
+ end
+end
+
+def fun_l18_n778(x)
+ if (x < 1)
+ fun_l19_n714(x)
+ else
+ fun_l19_n499(x)
+ end
+end
+
+def fun_l18_n779(x)
+ if (x < 1)
+ fun_l19_n131(x)
+ else
+ fun_l19_n396(x)
+ end
+end
+
+def fun_l18_n780(x)
+ if (x < 1)
+ fun_l19_n709(x)
+ else
+ fun_l19_n851(x)
+ end
+end
+
+def fun_l18_n781(x)
+ if (x < 1)
+ fun_l19_n104(x)
+ else
+ fun_l19_n569(x)
+ end
+end
+
+def fun_l18_n782(x)
+ if (x < 1)
+ fun_l19_n121(x)
+ else
+ fun_l19_n690(x)
+ end
+end
+
+def fun_l18_n783(x)
+ if (x < 1)
+ fun_l19_n72(x)
+ else
+ fun_l19_n522(x)
+ end
+end
+
+def fun_l18_n784(x)
+ if (x < 1)
+ fun_l19_n212(x)
+ else
+ fun_l19_n199(x)
+ end
+end
+
+def fun_l18_n785(x)
+ if (x < 1)
+ fun_l19_n168(x)
+ else
+ fun_l19_n948(x)
+ end
+end
+
+def fun_l18_n786(x)
+ if (x < 1)
+ fun_l19_n288(x)
+ else
+ fun_l19_n631(x)
+ end
+end
+
+def fun_l18_n787(x)
+ if (x < 1)
+ fun_l19_n713(x)
+ else
+ fun_l19_n232(x)
+ end
+end
+
+def fun_l18_n788(x)
+ if (x < 1)
+ fun_l19_n6(x)
+ else
+ fun_l19_n725(x)
+ end
+end
+
+def fun_l18_n789(x)
+ if (x < 1)
+ fun_l19_n893(x)
+ else
+ fun_l19_n677(x)
+ end
+end
+
+def fun_l18_n790(x)
+ if (x < 1)
+ fun_l19_n734(x)
+ else
+ fun_l19_n589(x)
+ end
+end
+
+def fun_l18_n791(x)
+ if (x < 1)
+ fun_l19_n369(x)
+ else
+ fun_l19_n710(x)
+ end
+end
+
+def fun_l18_n792(x)
+ if (x < 1)
+ fun_l19_n373(x)
+ else
+ fun_l19_n226(x)
+ end
+end
+
+def fun_l18_n793(x)
+ if (x < 1)
+ fun_l19_n651(x)
+ else
+ fun_l19_n292(x)
+ end
+end
+
+def fun_l18_n794(x)
+ if (x < 1)
+ fun_l19_n625(x)
+ else
+ fun_l19_n494(x)
+ end
+end
+
+def fun_l18_n795(x)
+ if (x < 1)
+ fun_l19_n463(x)
+ else
+ fun_l19_n113(x)
+ end
+end
+
+def fun_l18_n796(x)
+ if (x < 1)
+ fun_l19_n857(x)
+ else
+ fun_l19_n561(x)
+ end
+end
+
+def fun_l18_n797(x)
+ if (x < 1)
+ fun_l19_n845(x)
+ else
+ fun_l19_n598(x)
+ end
+end
+
+def fun_l18_n798(x)
+ if (x < 1)
+ fun_l19_n606(x)
+ else
+ fun_l19_n822(x)
+ end
+end
+
+def fun_l18_n799(x)
+ if (x < 1)
+ fun_l19_n649(x)
+ else
+ fun_l19_n610(x)
+ end
+end
+
+def fun_l18_n800(x)
+ if (x < 1)
+ fun_l19_n619(x)
+ else
+ fun_l19_n753(x)
+ end
+end
+
+def fun_l18_n801(x)
+ if (x < 1)
+ fun_l19_n947(x)
+ else
+ fun_l19_n665(x)
+ end
+end
+
+def fun_l18_n802(x)
+ if (x < 1)
+ fun_l19_n869(x)
+ else
+ fun_l19_n928(x)
+ end
+end
+
+def fun_l18_n803(x)
+ if (x < 1)
+ fun_l19_n568(x)
+ else
+ fun_l19_n624(x)
+ end
+end
+
+def fun_l18_n804(x)
+ if (x < 1)
+ fun_l19_n724(x)
+ else
+ fun_l19_n104(x)
+ end
+end
+
+def fun_l18_n805(x)
+ if (x < 1)
+ fun_l19_n687(x)
+ else
+ fun_l19_n906(x)
+ end
+end
+
+def fun_l18_n806(x)
+ if (x < 1)
+ fun_l19_n387(x)
+ else
+ fun_l19_n317(x)
+ end
+end
+
+def fun_l18_n807(x)
+ if (x < 1)
+ fun_l19_n433(x)
+ else
+ fun_l19_n211(x)
+ end
+end
+
+def fun_l18_n808(x)
+ if (x < 1)
+ fun_l19_n574(x)
+ else
+ fun_l19_n848(x)
+ end
+end
+
+def fun_l18_n809(x)
+ if (x < 1)
+ fun_l19_n929(x)
+ else
+ fun_l19_n751(x)
+ end
+end
+
+def fun_l18_n810(x)
+ if (x < 1)
+ fun_l19_n24(x)
+ else
+ fun_l19_n97(x)
+ end
+end
+
+def fun_l18_n811(x)
+ if (x < 1)
+ fun_l19_n503(x)
+ else
+ fun_l19_n173(x)
+ end
+end
+
+def fun_l18_n812(x)
+ if (x < 1)
+ fun_l19_n431(x)
+ else
+ fun_l19_n553(x)
+ end
+end
+
+def fun_l18_n813(x)
+ if (x < 1)
+ fun_l19_n215(x)
+ else
+ fun_l19_n920(x)
+ end
+end
+
+def fun_l18_n814(x)
+ if (x < 1)
+ fun_l19_n952(x)
+ else
+ fun_l19_n484(x)
+ end
+end
+
+def fun_l18_n815(x)
+ if (x < 1)
+ fun_l19_n253(x)
+ else
+ fun_l19_n20(x)
+ end
+end
+
+def fun_l18_n816(x)
+ if (x < 1)
+ fun_l19_n853(x)
+ else
+ fun_l19_n902(x)
+ end
+end
+
+def fun_l18_n817(x)
+ if (x < 1)
+ fun_l19_n606(x)
+ else
+ fun_l19_n732(x)
+ end
+end
+
+def fun_l18_n818(x)
+ if (x < 1)
+ fun_l19_n227(x)
+ else
+ fun_l19_n908(x)
+ end
+end
+
+def fun_l18_n819(x)
+ if (x < 1)
+ fun_l19_n423(x)
+ else
+ fun_l19_n511(x)
+ end
+end
+
+def fun_l18_n820(x)
+ if (x < 1)
+ fun_l19_n25(x)
+ else
+ fun_l19_n939(x)
+ end
+end
+
+def fun_l18_n821(x)
+ if (x < 1)
+ fun_l19_n709(x)
+ else
+ fun_l19_n776(x)
+ end
+end
+
+def fun_l18_n822(x)
+ if (x < 1)
+ fun_l19_n539(x)
+ else
+ fun_l19_n41(x)
+ end
+end
+
+def fun_l18_n823(x)
+ if (x < 1)
+ fun_l19_n764(x)
+ else
+ fun_l19_n240(x)
+ end
+end
+
+def fun_l18_n824(x)
+ if (x < 1)
+ fun_l19_n508(x)
+ else
+ fun_l19_n505(x)
+ end
+end
+
+def fun_l18_n825(x)
+ if (x < 1)
+ fun_l19_n788(x)
+ else
+ fun_l19_n245(x)
+ end
+end
+
+def fun_l18_n826(x)
+ if (x < 1)
+ fun_l19_n315(x)
+ else
+ fun_l19_n391(x)
+ end
+end
+
+def fun_l18_n827(x)
+ if (x < 1)
+ fun_l19_n210(x)
+ else
+ fun_l19_n17(x)
+ end
+end
+
+def fun_l18_n828(x)
+ if (x < 1)
+ fun_l19_n726(x)
+ else
+ fun_l19_n57(x)
+ end
+end
+
+def fun_l18_n829(x)
+ if (x < 1)
+ fun_l19_n228(x)
+ else
+ fun_l19_n44(x)
+ end
+end
+
+def fun_l18_n830(x)
+ if (x < 1)
+ fun_l19_n5(x)
+ else
+ fun_l19_n110(x)
+ end
+end
+
+def fun_l18_n831(x)
+ if (x < 1)
+ fun_l19_n409(x)
+ else
+ fun_l19_n874(x)
+ end
+end
+
+def fun_l18_n832(x)
+ if (x < 1)
+ fun_l19_n710(x)
+ else
+ fun_l19_n960(x)
+ end
+end
+
+def fun_l18_n833(x)
+ if (x < 1)
+ fun_l19_n92(x)
+ else
+ fun_l19_n869(x)
+ end
+end
+
+def fun_l18_n834(x)
+ if (x < 1)
+ fun_l19_n420(x)
+ else
+ fun_l19_n616(x)
+ end
+end
+
+def fun_l18_n835(x)
+ if (x < 1)
+ fun_l19_n705(x)
+ else
+ fun_l19_n727(x)
+ end
+end
+
+def fun_l18_n836(x)
+ if (x < 1)
+ fun_l19_n78(x)
+ else
+ fun_l19_n211(x)
+ end
+end
+
+def fun_l18_n837(x)
+ if (x < 1)
+ fun_l19_n214(x)
+ else
+ fun_l19_n504(x)
+ end
+end
+
+def fun_l18_n838(x)
+ if (x < 1)
+ fun_l19_n320(x)
+ else
+ fun_l19_n303(x)
+ end
+end
+
+def fun_l18_n839(x)
+ if (x < 1)
+ fun_l19_n168(x)
+ else
+ fun_l19_n677(x)
+ end
+end
+
+def fun_l18_n840(x)
+ if (x < 1)
+ fun_l19_n523(x)
+ else
+ fun_l19_n183(x)
+ end
+end
+
+def fun_l18_n841(x)
+ if (x < 1)
+ fun_l19_n757(x)
+ else
+ fun_l19_n554(x)
+ end
+end
+
+def fun_l18_n842(x)
+ if (x < 1)
+ fun_l19_n309(x)
+ else
+ fun_l19_n70(x)
+ end
+end
+
+def fun_l18_n843(x)
+ if (x < 1)
+ fun_l19_n316(x)
+ else
+ fun_l19_n758(x)
+ end
+end
+
+def fun_l18_n844(x)
+ if (x < 1)
+ fun_l19_n459(x)
+ else
+ fun_l19_n28(x)
+ end
+end
+
+def fun_l18_n845(x)
+ if (x < 1)
+ fun_l19_n458(x)
+ else
+ fun_l19_n597(x)
+ end
+end
+
+def fun_l18_n846(x)
+ if (x < 1)
+ fun_l19_n662(x)
+ else
+ fun_l19_n480(x)
+ end
+end
+
+def fun_l18_n847(x)
+ if (x < 1)
+ fun_l19_n967(x)
+ else
+ fun_l19_n764(x)
+ end
+end
+
+def fun_l18_n848(x)
+ if (x < 1)
+ fun_l19_n248(x)
+ else
+ fun_l19_n459(x)
+ end
+end
+
+def fun_l18_n849(x)
+ if (x < 1)
+ fun_l19_n306(x)
+ else
+ fun_l19_n892(x)
+ end
+end
+
+def fun_l18_n850(x)
+ if (x < 1)
+ fun_l19_n541(x)
+ else
+ fun_l19_n745(x)
+ end
+end
+
+def fun_l18_n851(x)
+ if (x < 1)
+ fun_l19_n974(x)
+ else
+ fun_l19_n593(x)
+ end
+end
+
+def fun_l18_n852(x)
+ if (x < 1)
+ fun_l19_n564(x)
+ else
+ fun_l19_n598(x)
+ end
+end
+
+def fun_l18_n853(x)
+ if (x < 1)
+ fun_l19_n447(x)
+ else
+ fun_l19_n207(x)
+ end
+end
+
+def fun_l18_n854(x)
+ if (x < 1)
+ fun_l19_n261(x)
+ else
+ fun_l19_n35(x)
+ end
+end
+
+def fun_l18_n855(x)
+ if (x < 1)
+ fun_l19_n597(x)
+ else
+ fun_l19_n898(x)
+ end
+end
+
+def fun_l18_n856(x)
+ if (x < 1)
+ fun_l19_n97(x)
+ else
+ fun_l19_n109(x)
+ end
+end
+
+def fun_l18_n857(x)
+ if (x < 1)
+ fun_l19_n487(x)
+ else
+ fun_l19_n423(x)
+ end
+end
+
+def fun_l18_n858(x)
+ if (x < 1)
+ fun_l19_n804(x)
+ else
+ fun_l19_n250(x)
+ end
+end
+
+def fun_l18_n859(x)
+ if (x < 1)
+ fun_l19_n935(x)
+ else
+ fun_l19_n952(x)
+ end
+end
+
+def fun_l18_n860(x)
+ if (x < 1)
+ fun_l19_n149(x)
+ else
+ fun_l19_n586(x)
+ end
+end
+
+def fun_l18_n861(x)
+ if (x < 1)
+ fun_l19_n750(x)
+ else
+ fun_l19_n962(x)
+ end
+end
+
+def fun_l18_n862(x)
+ if (x < 1)
+ fun_l19_n396(x)
+ else
+ fun_l19_n324(x)
+ end
+end
+
+def fun_l18_n863(x)
+ if (x < 1)
+ fun_l19_n231(x)
+ else
+ fun_l19_n897(x)
+ end
+end
+
+def fun_l18_n864(x)
+ if (x < 1)
+ fun_l19_n239(x)
+ else
+ fun_l19_n118(x)
+ end
+end
+
+def fun_l18_n865(x)
+ if (x < 1)
+ fun_l19_n221(x)
+ else
+ fun_l19_n771(x)
+ end
+end
+
+def fun_l18_n866(x)
+ if (x < 1)
+ fun_l19_n258(x)
+ else
+ fun_l19_n868(x)
+ end
+end
+
+def fun_l18_n867(x)
+ if (x < 1)
+ fun_l19_n629(x)
+ else
+ fun_l19_n491(x)
+ end
+end
+
+def fun_l18_n868(x)
+ if (x < 1)
+ fun_l19_n685(x)
+ else
+ fun_l19_n532(x)
+ end
+end
+
+def fun_l18_n869(x)
+ if (x < 1)
+ fun_l19_n45(x)
+ else
+ fun_l19_n769(x)
+ end
+end
+
+def fun_l18_n870(x)
+ if (x < 1)
+ fun_l19_n249(x)
+ else
+ fun_l19_n677(x)
+ end
+end
+
+def fun_l18_n871(x)
+ if (x < 1)
+ fun_l19_n685(x)
+ else
+ fun_l19_n953(x)
+ end
+end
+
+def fun_l18_n872(x)
+ if (x < 1)
+ fun_l19_n270(x)
+ else
+ fun_l19_n208(x)
+ end
+end
+
+def fun_l18_n873(x)
+ if (x < 1)
+ fun_l19_n195(x)
+ else
+ fun_l19_n811(x)
+ end
+end
+
+def fun_l18_n874(x)
+ if (x < 1)
+ fun_l19_n700(x)
+ else
+ fun_l19_n331(x)
+ end
+end
+
+def fun_l18_n875(x)
+ if (x < 1)
+ fun_l19_n209(x)
+ else
+ fun_l19_n304(x)
+ end
+end
+
+def fun_l18_n876(x)
+ if (x < 1)
+ fun_l19_n897(x)
+ else
+ fun_l19_n98(x)
+ end
+end
+
+def fun_l18_n877(x)
+ if (x < 1)
+ fun_l19_n400(x)
+ else
+ fun_l19_n325(x)
+ end
+end
+
+def fun_l18_n878(x)
+ if (x < 1)
+ fun_l19_n312(x)
+ else
+ fun_l19_n872(x)
+ end
+end
+
+def fun_l18_n879(x)
+ if (x < 1)
+ fun_l19_n669(x)
+ else
+ fun_l19_n729(x)
+ end
+end
+
+def fun_l18_n880(x)
+ if (x < 1)
+ fun_l19_n644(x)
+ else
+ fun_l19_n243(x)
+ end
+end
+
+def fun_l18_n881(x)
+ if (x < 1)
+ fun_l19_n440(x)
+ else
+ fun_l19_n495(x)
+ end
+end
+
+def fun_l18_n882(x)
+ if (x < 1)
+ fun_l19_n694(x)
+ else
+ fun_l19_n189(x)
+ end
+end
+
+def fun_l18_n883(x)
+ if (x < 1)
+ fun_l19_n610(x)
+ else
+ fun_l19_n802(x)
+ end
+end
+
+def fun_l18_n884(x)
+ if (x < 1)
+ fun_l19_n69(x)
+ else
+ fun_l19_n129(x)
+ end
+end
+
+def fun_l18_n885(x)
+ if (x < 1)
+ fun_l19_n837(x)
+ else
+ fun_l19_n521(x)
+ end
+end
+
+def fun_l18_n886(x)
+ if (x < 1)
+ fun_l19_n204(x)
+ else
+ fun_l19_n284(x)
+ end
+end
+
+def fun_l18_n887(x)
+ if (x < 1)
+ fun_l19_n2(x)
+ else
+ fun_l19_n378(x)
+ end
+end
+
+def fun_l18_n888(x)
+ if (x < 1)
+ fun_l19_n410(x)
+ else
+ fun_l19_n871(x)
+ end
+end
+
+def fun_l18_n889(x)
+ if (x < 1)
+ fun_l19_n976(x)
+ else
+ fun_l19_n581(x)
+ end
+end
+
+def fun_l18_n890(x)
+ if (x < 1)
+ fun_l19_n274(x)
+ else
+ fun_l19_n57(x)
+ end
+end
+
+def fun_l18_n891(x)
+ if (x < 1)
+ fun_l19_n983(x)
+ else
+ fun_l19_n900(x)
+ end
+end
+
+def fun_l18_n892(x)
+ if (x < 1)
+ fun_l19_n351(x)
+ else
+ fun_l19_n621(x)
+ end
+end
+
+def fun_l18_n893(x)
+ if (x < 1)
+ fun_l19_n539(x)
+ else
+ fun_l19_n847(x)
+ end
+end
+
+def fun_l18_n894(x)
+ if (x < 1)
+ fun_l19_n56(x)
+ else
+ fun_l19_n918(x)
+ end
+end
+
+def fun_l18_n895(x)
+ if (x < 1)
+ fun_l19_n906(x)
+ else
+ fun_l19_n509(x)
+ end
+end
+
+def fun_l18_n896(x)
+ if (x < 1)
+ fun_l19_n64(x)
+ else
+ fun_l19_n269(x)
+ end
+end
+
+def fun_l18_n897(x)
+ if (x < 1)
+ fun_l19_n348(x)
+ else
+ fun_l19_n983(x)
+ end
+end
+
+def fun_l18_n898(x)
+ if (x < 1)
+ fun_l19_n699(x)
+ else
+ fun_l19_n322(x)
+ end
+end
+
+def fun_l18_n899(x)
+ if (x < 1)
+ fun_l19_n754(x)
+ else
+ fun_l19_n608(x)
+ end
+end
+
+def fun_l18_n900(x)
+ if (x < 1)
+ fun_l19_n530(x)
+ else
+ fun_l19_n919(x)
+ end
+end
+
+def fun_l18_n901(x)
+ if (x < 1)
+ fun_l19_n359(x)
+ else
+ fun_l19_n739(x)
+ end
+end
+
+def fun_l18_n902(x)
+ if (x < 1)
+ fun_l19_n647(x)
+ else
+ fun_l19_n389(x)
+ end
+end
+
+def fun_l18_n903(x)
+ if (x < 1)
+ fun_l19_n908(x)
+ else
+ fun_l19_n680(x)
+ end
+end
+
+def fun_l18_n904(x)
+ if (x < 1)
+ fun_l19_n78(x)
+ else
+ fun_l19_n512(x)
+ end
+end
+
+def fun_l18_n905(x)
+ if (x < 1)
+ fun_l19_n514(x)
+ else
+ fun_l19_n250(x)
+ end
+end
+
+def fun_l18_n906(x)
+ if (x < 1)
+ fun_l19_n320(x)
+ else
+ fun_l19_n393(x)
+ end
+end
+
+def fun_l18_n907(x)
+ if (x < 1)
+ fun_l19_n666(x)
+ else
+ fun_l19_n846(x)
+ end
+end
+
+def fun_l18_n908(x)
+ if (x < 1)
+ fun_l19_n757(x)
+ else
+ fun_l19_n194(x)
+ end
+end
+
+def fun_l18_n909(x)
+ if (x < 1)
+ fun_l19_n386(x)
+ else
+ fun_l19_n965(x)
+ end
+end
+
+def fun_l18_n910(x)
+ if (x < 1)
+ fun_l19_n561(x)
+ else
+ fun_l19_n897(x)
+ end
+end
+
+def fun_l18_n911(x)
+ if (x < 1)
+ fun_l19_n281(x)
+ else
+ fun_l19_n960(x)
+ end
+end
+
+def fun_l18_n912(x)
+ if (x < 1)
+ fun_l19_n215(x)
+ else
+ fun_l19_n54(x)
+ end
+end
+
+def fun_l18_n913(x)
+ if (x < 1)
+ fun_l19_n561(x)
+ else
+ fun_l19_n353(x)
+ end
+end
+
+def fun_l18_n914(x)
+ if (x < 1)
+ fun_l19_n780(x)
+ else
+ fun_l19_n924(x)
+ end
+end
+
+def fun_l18_n915(x)
+ if (x < 1)
+ fun_l19_n663(x)
+ else
+ fun_l19_n112(x)
+ end
+end
+
+def fun_l18_n916(x)
+ if (x < 1)
+ fun_l19_n15(x)
+ else
+ fun_l19_n342(x)
+ end
+end
+
+def fun_l18_n917(x)
+ if (x < 1)
+ fun_l19_n226(x)
+ else
+ fun_l19_n337(x)
+ end
+end
+
+def fun_l18_n918(x)
+ if (x < 1)
+ fun_l19_n477(x)
+ else
+ fun_l19_n12(x)
+ end
+end
+
+def fun_l18_n919(x)
+ if (x < 1)
+ fun_l19_n495(x)
+ else
+ fun_l19_n721(x)
+ end
+end
+
+def fun_l18_n920(x)
+ if (x < 1)
+ fun_l19_n551(x)
+ else
+ fun_l19_n626(x)
+ end
+end
+
+def fun_l18_n921(x)
+ if (x < 1)
+ fun_l19_n491(x)
+ else
+ fun_l19_n442(x)
+ end
+end
+
+def fun_l18_n922(x)
+ if (x < 1)
+ fun_l19_n72(x)
+ else
+ fun_l19_n165(x)
+ end
+end
+
+def fun_l18_n923(x)
+ if (x < 1)
+ fun_l19_n475(x)
+ else
+ fun_l19_n381(x)
+ end
+end
+
+def fun_l18_n924(x)
+ if (x < 1)
+ fun_l19_n655(x)
+ else
+ fun_l19_n95(x)
+ end
+end
+
+def fun_l18_n925(x)
+ if (x < 1)
+ fun_l19_n882(x)
+ else
+ fun_l19_n888(x)
+ end
+end
+
+def fun_l18_n926(x)
+ if (x < 1)
+ fun_l19_n620(x)
+ else
+ fun_l19_n85(x)
+ end
+end
+
+def fun_l18_n927(x)
+ if (x < 1)
+ fun_l19_n13(x)
+ else
+ fun_l19_n776(x)
+ end
+end
+
+def fun_l18_n928(x)
+ if (x < 1)
+ fun_l19_n797(x)
+ else
+ fun_l19_n547(x)
+ end
+end
+
+def fun_l18_n929(x)
+ if (x < 1)
+ fun_l19_n34(x)
+ else
+ fun_l19_n753(x)
+ end
+end
+
+def fun_l18_n930(x)
+ if (x < 1)
+ fun_l19_n894(x)
+ else
+ fun_l19_n527(x)
+ end
+end
+
+def fun_l18_n931(x)
+ if (x < 1)
+ fun_l19_n951(x)
+ else
+ fun_l19_n261(x)
+ end
+end
+
+def fun_l18_n932(x)
+ if (x < 1)
+ fun_l19_n178(x)
+ else
+ fun_l19_n365(x)
+ end
+end
+
+def fun_l18_n933(x)
+ if (x < 1)
+ fun_l19_n813(x)
+ else
+ fun_l19_n404(x)
+ end
+end
+
+def fun_l18_n934(x)
+ if (x < 1)
+ fun_l19_n920(x)
+ else
+ fun_l19_n674(x)
+ end
+end
+
+def fun_l18_n935(x)
+ if (x < 1)
+ fun_l19_n155(x)
+ else
+ fun_l19_n250(x)
+ end
+end
+
+def fun_l18_n936(x)
+ if (x < 1)
+ fun_l19_n376(x)
+ else
+ fun_l19_n29(x)
+ end
+end
+
+def fun_l18_n937(x)
+ if (x < 1)
+ fun_l19_n104(x)
+ else
+ fun_l19_n802(x)
+ end
+end
+
+def fun_l18_n938(x)
+ if (x < 1)
+ fun_l19_n340(x)
+ else
+ fun_l19_n424(x)
+ end
+end
+
+def fun_l18_n939(x)
+ if (x < 1)
+ fun_l19_n590(x)
+ else
+ fun_l19_n525(x)
+ end
+end
+
+def fun_l18_n940(x)
+ if (x < 1)
+ fun_l19_n15(x)
+ else
+ fun_l19_n48(x)
+ end
+end
+
+def fun_l18_n941(x)
+ if (x < 1)
+ fun_l19_n83(x)
+ else
+ fun_l19_n975(x)
+ end
+end
+
+def fun_l18_n942(x)
+ if (x < 1)
+ fun_l19_n219(x)
+ else
+ fun_l19_n173(x)
+ end
+end
+
+def fun_l18_n943(x)
+ if (x < 1)
+ fun_l19_n457(x)
+ else
+ fun_l19_n956(x)
+ end
+end
+
+def fun_l18_n944(x)
+ if (x < 1)
+ fun_l19_n900(x)
+ else
+ fun_l19_n363(x)
+ end
+end
+
+def fun_l18_n945(x)
+ if (x < 1)
+ fun_l19_n973(x)
+ else
+ fun_l19_n279(x)
+ end
+end
+
+def fun_l18_n946(x)
+ if (x < 1)
+ fun_l19_n155(x)
+ else
+ fun_l19_n554(x)
+ end
+end
+
+def fun_l18_n947(x)
+ if (x < 1)
+ fun_l19_n744(x)
+ else
+ fun_l19_n854(x)
+ end
+end
+
+def fun_l18_n948(x)
+ if (x < 1)
+ fun_l19_n574(x)
+ else
+ fun_l19_n385(x)
+ end
+end
+
+def fun_l18_n949(x)
+ if (x < 1)
+ fun_l19_n447(x)
+ else
+ fun_l19_n93(x)
+ end
+end
+
+def fun_l18_n950(x)
+ if (x < 1)
+ fun_l19_n621(x)
+ else
+ fun_l19_n467(x)
+ end
+end
+
+def fun_l18_n951(x)
+ if (x < 1)
+ fun_l19_n409(x)
+ else
+ fun_l19_n260(x)
+ end
+end
+
+def fun_l18_n952(x)
+ if (x < 1)
+ fun_l19_n992(x)
+ else
+ fun_l19_n728(x)
+ end
+end
+
+def fun_l18_n953(x)
+ if (x < 1)
+ fun_l19_n760(x)
+ else
+ fun_l19_n724(x)
+ end
+end
+
+def fun_l18_n954(x)
+ if (x < 1)
+ fun_l19_n567(x)
+ else
+ fun_l19_n857(x)
+ end
+end
+
+def fun_l18_n955(x)
+ if (x < 1)
+ fun_l19_n225(x)
+ else
+ fun_l19_n132(x)
+ end
+end
+
+def fun_l18_n956(x)
+ if (x < 1)
+ fun_l19_n856(x)
+ else
+ fun_l19_n449(x)
+ end
+end
+
+def fun_l18_n957(x)
+ if (x < 1)
+ fun_l19_n200(x)
+ else
+ fun_l19_n216(x)
+ end
+end
+
+def fun_l18_n958(x)
+ if (x < 1)
+ fun_l19_n684(x)
+ else
+ fun_l19_n151(x)
+ end
+end
+
+def fun_l18_n959(x)
+ if (x < 1)
+ fun_l19_n989(x)
+ else
+ fun_l19_n137(x)
+ end
+end
+
+def fun_l18_n960(x)
+ if (x < 1)
+ fun_l19_n207(x)
+ else
+ fun_l19_n736(x)
+ end
+end
+
+def fun_l18_n961(x)
+ if (x < 1)
+ fun_l19_n984(x)
+ else
+ fun_l19_n840(x)
+ end
+end
+
+def fun_l18_n962(x)
+ if (x < 1)
+ fun_l19_n367(x)
+ else
+ fun_l19_n155(x)
+ end
+end
+
+def fun_l18_n963(x)
+ if (x < 1)
+ fun_l19_n202(x)
+ else
+ fun_l19_n237(x)
+ end
+end
+
+def fun_l18_n964(x)
+ if (x < 1)
+ fun_l19_n932(x)
+ else
+ fun_l19_n167(x)
+ end
+end
+
+def fun_l18_n965(x)
+ if (x < 1)
+ fun_l19_n269(x)
+ else
+ fun_l19_n105(x)
+ end
+end
+
+def fun_l18_n966(x)
+ if (x < 1)
+ fun_l19_n775(x)
+ else
+ fun_l19_n776(x)
+ end
+end
+
+def fun_l18_n967(x)
+ if (x < 1)
+ fun_l19_n636(x)
+ else
+ fun_l19_n460(x)
+ end
+end
+
+def fun_l18_n968(x)
+ if (x < 1)
+ fun_l19_n335(x)
+ else
+ fun_l19_n4(x)
+ end
+end
+
+def fun_l18_n969(x)
+ if (x < 1)
+ fun_l19_n987(x)
+ else
+ fun_l19_n935(x)
+ end
+end
+
+def fun_l18_n970(x)
+ if (x < 1)
+ fun_l19_n692(x)
+ else
+ fun_l19_n20(x)
+ end
+end
+
+def fun_l18_n971(x)
+ if (x < 1)
+ fun_l19_n805(x)
+ else
+ fun_l19_n139(x)
+ end
+end
+
+def fun_l18_n972(x)
+ if (x < 1)
+ fun_l19_n53(x)
+ else
+ fun_l19_n539(x)
+ end
+end
+
+def fun_l18_n973(x)
+ if (x < 1)
+ fun_l19_n620(x)
+ else
+ fun_l19_n680(x)
+ end
+end
+
+def fun_l18_n974(x)
+ if (x < 1)
+ fun_l19_n662(x)
+ else
+ fun_l19_n580(x)
+ end
+end
+
+def fun_l18_n975(x)
+ if (x < 1)
+ fun_l19_n401(x)
+ else
+ fun_l19_n428(x)
+ end
+end
+
+def fun_l18_n976(x)
+ if (x < 1)
+ fun_l19_n367(x)
+ else
+ fun_l19_n794(x)
+ end
+end
+
+def fun_l18_n977(x)
+ if (x < 1)
+ fun_l19_n204(x)
+ else
+ fun_l19_n258(x)
+ end
+end
+
+def fun_l18_n978(x)
+ if (x < 1)
+ fun_l19_n868(x)
+ else
+ fun_l19_n300(x)
+ end
+end
+
+def fun_l18_n979(x)
+ if (x < 1)
+ fun_l19_n245(x)
+ else
+ fun_l19_n460(x)
+ end
+end
+
+def fun_l18_n980(x)
+ if (x < 1)
+ fun_l19_n965(x)
+ else
+ fun_l19_n639(x)
+ end
+end
+
+def fun_l18_n981(x)
+ if (x < 1)
+ fun_l19_n903(x)
+ else
+ fun_l19_n139(x)
+ end
+end
+
+def fun_l18_n982(x)
+ if (x < 1)
+ fun_l19_n890(x)
+ else
+ fun_l19_n497(x)
+ end
+end
+
+def fun_l18_n983(x)
+ if (x < 1)
+ fun_l19_n723(x)
+ else
+ fun_l19_n705(x)
+ end
+end
+
+def fun_l18_n984(x)
+ if (x < 1)
+ fun_l19_n592(x)
+ else
+ fun_l19_n965(x)
+ end
+end
+
+def fun_l18_n985(x)
+ if (x < 1)
+ fun_l19_n660(x)
+ else
+ fun_l19_n985(x)
+ end
+end
+
+def fun_l18_n986(x)
+ if (x < 1)
+ fun_l19_n230(x)
+ else
+ fun_l19_n447(x)
+ end
+end
+
+def fun_l18_n987(x)
+ if (x < 1)
+ fun_l19_n875(x)
+ else
+ fun_l19_n86(x)
+ end
+end
+
+def fun_l18_n988(x)
+ if (x < 1)
+ fun_l19_n864(x)
+ else
+ fun_l19_n460(x)
+ end
+end
+
+def fun_l18_n989(x)
+ if (x < 1)
+ fun_l19_n834(x)
+ else
+ fun_l19_n628(x)
+ end
+end
+
+def fun_l18_n990(x)
+ if (x < 1)
+ fun_l19_n578(x)
+ else
+ fun_l19_n160(x)
+ end
+end
+
+def fun_l18_n991(x)
+ if (x < 1)
+ fun_l19_n58(x)
+ else
+ fun_l19_n839(x)
+ end
+end
+
+def fun_l18_n992(x)
+ if (x < 1)
+ fun_l19_n282(x)
+ else
+ fun_l19_n864(x)
+ end
+end
+
+def fun_l18_n993(x)
+ if (x < 1)
+ fun_l19_n957(x)
+ else
+ fun_l19_n280(x)
+ end
+end
+
+def fun_l18_n994(x)
+ if (x < 1)
+ fun_l19_n184(x)
+ else
+ fun_l19_n741(x)
+ end
+end
+
+def fun_l18_n995(x)
+ if (x < 1)
+ fun_l19_n458(x)
+ else
+ fun_l19_n802(x)
+ end
+end
+
+def fun_l18_n996(x)
+ if (x < 1)
+ fun_l19_n260(x)
+ else
+ fun_l19_n840(x)
+ end
+end
+
+def fun_l18_n997(x)
+ if (x < 1)
+ fun_l19_n500(x)
+ else
+ fun_l19_n142(x)
+ end
+end
+
+def fun_l18_n998(x)
+ if (x < 1)
+ fun_l19_n712(x)
+ else
+ fun_l19_n736(x)
+ end
+end
+
+def fun_l18_n999(x)
+ if (x < 1)
+ fun_l19_n366(x)
+ else
+ fun_l19_n726(x)
+ end
+end
+
+def fun_l19_n0(x)
+ if (x < 1)
+ fun_l20_n238(x)
+ else
+ fun_l20_n685(x)
+ end
+end
+
+def fun_l19_n1(x)
+ if (x < 1)
+ fun_l20_n892(x)
+ else
+ fun_l20_n786(x)
+ end
+end
+
+def fun_l19_n2(x)
+ if (x < 1)
+ fun_l20_n99(x)
+ else
+ fun_l20_n337(x)
+ end
+end
+
+def fun_l19_n3(x)
+ if (x < 1)
+ fun_l20_n40(x)
+ else
+ fun_l20_n773(x)
+ end
+end
+
+def fun_l19_n4(x)
+ if (x < 1)
+ fun_l20_n815(x)
+ else
+ fun_l20_n576(x)
+ end
+end
+
+def fun_l19_n5(x)
+ if (x < 1)
+ fun_l20_n294(x)
+ else
+ fun_l20_n362(x)
+ end
+end
+
+def fun_l19_n6(x)
+ if (x < 1)
+ fun_l20_n352(x)
+ else
+ fun_l20_n263(x)
+ end
+end
+
+def fun_l19_n7(x)
+ if (x < 1)
+ fun_l20_n920(x)
+ else
+ fun_l20_n164(x)
+ end
+end
+
+def fun_l19_n8(x)
+ if (x < 1)
+ fun_l20_n313(x)
+ else
+ fun_l20_n663(x)
+ end
+end
+
+def fun_l19_n9(x)
+ if (x < 1)
+ fun_l20_n261(x)
+ else
+ fun_l20_n769(x)
+ end
+end
+
+def fun_l19_n10(x)
+ if (x < 1)
+ fun_l20_n85(x)
+ else
+ fun_l20_n243(x)
+ end
+end
+
+def fun_l19_n11(x)
+ if (x < 1)
+ fun_l20_n560(x)
+ else
+ fun_l20_n969(x)
+ end
+end
+
+def fun_l19_n12(x)
+ if (x < 1)
+ fun_l20_n954(x)
+ else
+ fun_l20_n340(x)
+ end
+end
+
+def fun_l19_n13(x)
+ if (x < 1)
+ fun_l20_n548(x)
+ else
+ fun_l20_n689(x)
+ end
+end
+
+def fun_l19_n14(x)
+ if (x < 1)
+ fun_l20_n577(x)
+ else
+ fun_l20_n954(x)
+ end
+end
+
+def fun_l19_n15(x)
+ if (x < 1)
+ fun_l20_n43(x)
+ else
+ fun_l20_n3(x)
+ end
+end
+
+def fun_l19_n16(x)
+ if (x < 1)
+ fun_l20_n15(x)
+ else
+ fun_l20_n281(x)
+ end
+end
+
+def fun_l19_n17(x)
+ if (x < 1)
+ fun_l20_n439(x)
+ else
+ fun_l20_n26(x)
+ end
+end
+
+def fun_l19_n18(x)
+ if (x < 1)
+ fun_l20_n534(x)
+ else
+ fun_l20_n419(x)
+ end
+end
+
+def fun_l19_n19(x)
+ if (x < 1)
+ fun_l20_n456(x)
+ else
+ fun_l20_n959(x)
+ end
+end
+
+def fun_l19_n20(x)
+ if (x < 1)
+ fun_l20_n706(x)
+ else
+ fun_l20_n404(x)
+ end
+end
+
+def fun_l19_n21(x)
+ if (x < 1)
+ fun_l20_n559(x)
+ else
+ fun_l20_n61(x)
+ end
+end
+
+def fun_l19_n22(x)
+ if (x < 1)
+ fun_l20_n986(x)
+ else
+ fun_l20_n202(x)
+ end
+end
+
+def fun_l19_n23(x)
+ if (x < 1)
+ fun_l20_n935(x)
+ else
+ fun_l20_n804(x)
+ end
+end
+
+def fun_l19_n24(x)
+ if (x < 1)
+ fun_l20_n775(x)
+ else
+ fun_l20_n909(x)
+ end
+end
+
+def fun_l19_n25(x)
+ if (x < 1)
+ fun_l20_n28(x)
+ else
+ fun_l20_n631(x)
+ end
+end
+
+def fun_l19_n26(x)
+ if (x < 1)
+ fun_l20_n257(x)
+ else
+ fun_l20_n822(x)
+ end
+end
+
+def fun_l19_n27(x)
+ if (x < 1)
+ fun_l20_n198(x)
+ else
+ fun_l20_n1(x)
+ end
+end
+
+def fun_l19_n28(x)
+ if (x < 1)
+ fun_l20_n534(x)
+ else
+ fun_l20_n46(x)
+ end
+end
+
+def fun_l19_n29(x)
+ if (x < 1)
+ fun_l20_n880(x)
+ else
+ fun_l20_n995(x)
+ end
+end
+
+def fun_l19_n30(x)
+ if (x < 1)
+ fun_l20_n953(x)
+ else
+ fun_l20_n367(x)
+ end
+end
+
+def fun_l19_n31(x)
+ if (x < 1)
+ fun_l20_n165(x)
+ else
+ fun_l20_n404(x)
+ end
+end
+
+def fun_l19_n32(x)
+ if (x < 1)
+ fun_l20_n752(x)
+ else
+ fun_l20_n570(x)
+ end
+end
+
+def fun_l19_n33(x)
+ if (x < 1)
+ fun_l20_n973(x)
+ else
+ fun_l20_n357(x)
+ end
+end
+
+def fun_l19_n34(x)
+ if (x < 1)
+ fun_l20_n897(x)
+ else
+ fun_l20_n501(x)
+ end
+end
+
+def fun_l19_n35(x)
+ if (x < 1)
+ fun_l20_n607(x)
+ else
+ fun_l20_n679(x)
+ end
+end
+
+def fun_l19_n36(x)
+ if (x < 1)
+ fun_l20_n870(x)
+ else
+ fun_l20_n590(x)
+ end
+end
+
+def fun_l19_n37(x)
+ if (x < 1)
+ fun_l20_n620(x)
+ else
+ fun_l20_n462(x)
+ end
+end
+
+def fun_l19_n38(x)
+ if (x < 1)
+ fun_l20_n176(x)
+ else
+ fun_l20_n891(x)
+ end
+end
+
+def fun_l19_n39(x)
+ if (x < 1)
+ fun_l20_n850(x)
+ else
+ fun_l20_n730(x)
+ end
+end
+
+def fun_l19_n40(x)
+ if (x < 1)
+ fun_l20_n193(x)
+ else
+ fun_l20_n635(x)
+ end
+end
+
+def fun_l19_n41(x)
+ if (x < 1)
+ fun_l20_n443(x)
+ else
+ fun_l20_n398(x)
+ end
+end
+
+def fun_l19_n42(x)
+ if (x < 1)
+ fun_l20_n324(x)
+ else
+ fun_l20_n566(x)
+ end
+end
+
+def fun_l19_n43(x)
+ if (x < 1)
+ fun_l20_n817(x)
+ else
+ fun_l20_n791(x)
+ end
+end
+
+def fun_l19_n44(x)
+ if (x < 1)
+ fun_l20_n46(x)
+ else
+ fun_l20_n375(x)
+ end
+end
+
+def fun_l19_n45(x)
+ if (x < 1)
+ fun_l20_n504(x)
+ else
+ fun_l20_n64(x)
+ end
+end
+
+def fun_l19_n46(x)
+ if (x < 1)
+ fun_l20_n174(x)
+ else
+ fun_l20_n621(x)
+ end
+end
+
+def fun_l19_n47(x)
+ if (x < 1)
+ fun_l20_n756(x)
+ else
+ fun_l20_n857(x)
+ end
+end
+
+def fun_l19_n48(x)
+ if (x < 1)
+ fun_l20_n635(x)
+ else
+ fun_l20_n216(x)
+ end
+end
+
+def fun_l19_n49(x)
+ if (x < 1)
+ fun_l20_n806(x)
+ else
+ fun_l20_n291(x)
+ end
+end
+
+def fun_l19_n50(x)
+ if (x < 1)
+ fun_l20_n998(x)
+ else
+ fun_l20_n46(x)
+ end
+end
+
+def fun_l19_n51(x)
+ if (x < 1)
+ fun_l20_n685(x)
+ else
+ fun_l20_n968(x)
+ end
+end
+
+def fun_l19_n52(x)
+ if (x < 1)
+ fun_l20_n906(x)
+ else
+ fun_l20_n788(x)
+ end
+end
+
+def fun_l19_n53(x)
+ if (x < 1)
+ fun_l20_n814(x)
+ else
+ fun_l20_n343(x)
+ end
+end
+
+def fun_l19_n54(x)
+ if (x < 1)
+ fun_l20_n320(x)
+ else
+ fun_l20_n293(x)
+ end
+end
+
+def fun_l19_n55(x)
+ if (x < 1)
+ fun_l20_n608(x)
+ else
+ fun_l20_n958(x)
+ end
+end
+
+def fun_l19_n56(x)
+ if (x < 1)
+ fun_l20_n83(x)
+ else
+ fun_l20_n839(x)
+ end
+end
+
+def fun_l19_n57(x)
+ if (x < 1)
+ fun_l20_n618(x)
+ else
+ fun_l20_n483(x)
+ end
+end
+
+def fun_l19_n58(x)
+ if (x < 1)
+ fun_l20_n647(x)
+ else
+ fun_l20_n782(x)
+ end
+end
+
+def fun_l19_n59(x)
+ if (x < 1)
+ fun_l20_n664(x)
+ else
+ fun_l20_n3(x)
+ end
+end
+
+def fun_l19_n60(x)
+ if (x < 1)
+ fun_l20_n556(x)
+ else
+ fun_l20_n185(x)
+ end
+end
+
+def fun_l19_n61(x)
+ if (x < 1)
+ fun_l20_n657(x)
+ else
+ fun_l20_n162(x)
+ end
+end
+
+def fun_l19_n62(x)
+ if (x < 1)
+ fun_l20_n668(x)
+ else
+ fun_l20_n585(x)
+ end
+end
+
+def fun_l19_n63(x)
+ if (x < 1)
+ fun_l20_n913(x)
+ else
+ fun_l20_n855(x)
+ end
+end
+
+def fun_l19_n64(x)
+ if (x < 1)
+ fun_l20_n331(x)
+ else
+ fun_l20_n71(x)
+ end
+end
+
+def fun_l19_n65(x)
+ if (x < 1)
+ fun_l20_n321(x)
+ else
+ fun_l20_n314(x)
+ end
+end
+
+def fun_l19_n66(x)
+ if (x < 1)
+ fun_l20_n512(x)
+ else
+ fun_l20_n607(x)
+ end
+end
+
+def fun_l19_n67(x)
+ if (x < 1)
+ fun_l20_n649(x)
+ else
+ fun_l20_n733(x)
+ end
+end
+
+def fun_l19_n68(x)
+ if (x < 1)
+ fun_l20_n651(x)
+ else
+ fun_l20_n844(x)
+ end
+end
+
+def fun_l19_n69(x)
+ if (x < 1)
+ fun_l20_n510(x)
+ else
+ fun_l20_n675(x)
+ end
+end
+
+def fun_l19_n70(x)
+ if (x < 1)
+ fun_l20_n830(x)
+ else
+ fun_l20_n338(x)
+ end
+end
+
+def fun_l19_n71(x)
+ if (x < 1)
+ fun_l20_n110(x)
+ else
+ fun_l20_n806(x)
+ end
+end
+
+def fun_l19_n72(x)
+ if (x < 1)
+ fun_l20_n588(x)
+ else
+ fun_l20_n7(x)
+ end
+end
+
+def fun_l19_n73(x)
+ if (x < 1)
+ fun_l20_n495(x)
+ else
+ fun_l20_n293(x)
+ end
+end
+
+def fun_l19_n74(x)
+ if (x < 1)
+ fun_l20_n891(x)
+ else
+ fun_l20_n514(x)
+ end
+end
+
+def fun_l19_n75(x)
+ if (x < 1)
+ fun_l20_n419(x)
+ else
+ fun_l20_n934(x)
+ end
+end
+
+def fun_l19_n76(x)
+ if (x < 1)
+ fun_l20_n476(x)
+ else
+ fun_l20_n652(x)
+ end
+end
+
+def fun_l19_n77(x)
+ if (x < 1)
+ fun_l20_n927(x)
+ else
+ fun_l20_n656(x)
+ end
+end
+
+def fun_l19_n78(x)
+ if (x < 1)
+ fun_l20_n361(x)
+ else
+ fun_l20_n847(x)
+ end
+end
+
+def fun_l19_n79(x)
+ if (x < 1)
+ fun_l20_n584(x)
+ else
+ fun_l20_n24(x)
+ end
+end
+
+def fun_l19_n80(x)
+ if (x < 1)
+ fun_l20_n428(x)
+ else
+ fun_l20_n219(x)
+ end
+end
+
+def fun_l19_n81(x)
+ if (x < 1)
+ fun_l20_n922(x)
+ else
+ fun_l20_n758(x)
+ end
+end
+
+def fun_l19_n82(x)
+ if (x < 1)
+ fun_l20_n188(x)
+ else
+ fun_l20_n378(x)
+ end
+end
+
+def fun_l19_n83(x)
+ if (x < 1)
+ fun_l20_n239(x)
+ else
+ fun_l20_n690(x)
+ end
+end
+
+def fun_l19_n84(x)
+ if (x < 1)
+ fun_l20_n262(x)
+ else
+ fun_l20_n162(x)
+ end
+end
+
+def fun_l19_n85(x)
+ if (x < 1)
+ fun_l20_n117(x)
+ else
+ fun_l20_n117(x)
+ end
+end
+
+def fun_l19_n86(x)
+ if (x < 1)
+ fun_l20_n154(x)
+ else
+ fun_l20_n564(x)
+ end
+end
+
+def fun_l19_n87(x)
+ if (x < 1)
+ fun_l20_n560(x)
+ else
+ fun_l20_n591(x)
+ end
+end
+
+def fun_l19_n88(x)
+ if (x < 1)
+ fun_l20_n529(x)
+ else
+ fun_l20_n107(x)
+ end
+end
+
+def fun_l19_n89(x)
+ if (x < 1)
+ fun_l20_n609(x)
+ else
+ fun_l20_n287(x)
+ end
+end
+
+def fun_l19_n90(x)
+ if (x < 1)
+ fun_l20_n780(x)
+ else
+ fun_l20_n397(x)
+ end
+end
+
+def fun_l19_n91(x)
+ if (x < 1)
+ fun_l20_n587(x)
+ else
+ fun_l20_n416(x)
+ end
+end
+
+def fun_l19_n92(x)
+ if (x < 1)
+ fun_l20_n784(x)
+ else
+ fun_l20_n413(x)
+ end
+end
+
+def fun_l19_n93(x)
+ if (x < 1)
+ fun_l20_n83(x)
+ else
+ fun_l20_n560(x)
+ end
+end
+
+def fun_l19_n94(x)
+ if (x < 1)
+ fun_l20_n126(x)
+ else
+ fun_l20_n67(x)
+ end
+end
+
+def fun_l19_n95(x)
+ if (x < 1)
+ fun_l20_n22(x)
+ else
+ fun_l20_n865(x)
+ end
+end
+
+def fun_l19_n96(x)
+ if (x < 1)
+ fun_l20_n35(x)
+ else
+ fun_l20_n160(x)
+ end
+end
+
+def fun_l19_n97(x)
+ if (x < 1)
+ fun_l20_n701(x)
+ else
+ fun_l20_n139(x)
+ end
+end
+
+def fun_l19_n98(x)
+ if (x < 1)
+ fun_l20_n488(x)
+ else
+ fun_l20_n407(x)
+ end
+end
+
+def fun_l19_n99(x)
+ if (x < 1)
+ fun_l20_n636(x)
+ else
+ fun_l20_n135(x)
+ end
+end
+
+def fun_l19_n100(x)
+ if (x < 1)
+ fun_l20_n83(x)
+ else
+ fun_l20_n923(x)
+ end
+end
+
+def fun_l19_n101(x)
+ if (x < 1)
+ fun_l20_n232(x)
+ else
+ fun_l20_n955(x)
+ end
+end
+
+def fun_l19_n102(x)
+ if (x < 1)
+ fun_l20_n816(x)
+ else
+ fun_l20_n671(x)
+ end
+end
+
+def fun_l19_n103(x)
+ if (x < 1)
+ fun_l20_n366(x)
+ else
+ fun_l20_n646(x)
+ end
+end
+
+def fun_l19_n104(x)
+ if (x < 1)
+ fun_l20_n465(x)
+ else
+ fun_l20_n659(x)
+ end
+end
+
+def fun_l19_n105(x)
+ if (x < 1)
+ fun_l20_n488(x)
+ else
+ fun_l20_n720(x)
+ end
+end
+
+def fun_l19_n106(x)
+ if (x < 1)
+ fun_l20_n278(x)
+ else
+ fun_l20_n570(x)
+ end
+end
+
+def fun_l19_n107(x)
+ if (x < 1)
+ fun_l20_n630(x)
+ else
+ fun_l20_n280(x)
+ end
+end
+
+def fun_l19_n108(x)
+ if (x < 1)
+ fun_l20_n688(x)
+ else
+ fun_l20_n999(x)
+ end
+end
+
+def fun_l19_n109(x)
+ if (x < 1)
+ fun_l20_n175(x)
+ else
+ fun_l20_n633(x)
+ end
+end
+
+def fun_l19_n110(x)
+ if (x < 1)
+ fun_l20_n111(x)
+ else
+ fun_l20_n130(x)
+ end
+end
+
+def fun_l19_n111(x)
+ if (x < 1)
+ fun_l20_n405(x)
+ else
+ fun_l20_n148(x)
+ end
+end
+
+def fun_l19_n112(x)
+ if (x < 1)
+ fun_l20_n645(x)
+ else
+ fun_l20_n303(x)
+ end
+end
+
+def fun_l19_n113(x)
+ if (x < 1)
+ fun_l20_n685(x)
+ else
+ fun_l20_n122(x)
+ end
+end
+
+def fun_l19_n114(x)
+ if (x < 1)
+ fun_l20_n808(x)
+ else
+ fun_l20_n780(x)
+ end
+end
+
+def fun_l19_n115(x)
+ if (x < 1)
+ fun_l20_n136(x)
+ else
+ fun_l20_n749(x)
+ end
+end
+
+def fun_l19_n116(x)
+ if (x < 1)
+ fun_l20_n134(x)
+ else
+ fun_l20_n291(x)
+ end
+end
+
+def fun_l19_n117(x)
+ if (x < 1)
+ fun_l20_n288(x)
+ else
+ fun_l20_n759(x)
+ end
+end
+
+def fun_l19_n118(x)
+ if (x < 1)
+ fun_l20_n617(x)
+ else
+ fun_l20_n823(x)
+ end
+end
+
+def fun_l19_n119(x)
+ if (x < 1)
+ fun_l20_n412(x)
+ else
+ fun_l20_n548(x)
+ end
+end
+
+def fun_l19_n120(x)
+ if (x < 1)
+ fun_l20_n897(x)
+ else
+ fun_l20_n455(x)
+ end
+end
+
+def fun_l19_n121(x)
+ if (x < 1)
+ fun_l20_n105(x)
+ else
+ fun_l20_n753(x)
+ end
+end
+
+def fun_l19_n122(x)
+ if (x < 1)
+ fun_l20_n84(x)
+ else
+ fun_l20_n575(x)
+ end
+end
+
+def fun_l19_n123(x)
+ if (x < 1)
+ fun_l20_n326(x)
+ else
+ fun_l20_n858(x)
+ end
+end
+
+def fun_l19_n124(x)
+ if (x < 1)
+ fun_l20_n878(x)
+ else
+ fun_l20_n348(x)
+ end
+end
+
+def fun_l19_n125(x)
+ if (x < 1)
+ fun_l20_n285(x)
+ else
+ fun_l20_n182(x)
+ end
+end
+
+def fun_l19_n126(x)
+ if (x < 1)
+ fun_l20_n560(x)
+ else
+ fun_l20_n413(x)
+ end
+end
+
+def fun_l19_n127(x)
+ if (x < 1)
+ fun_l20_n597(x)
+ else
+ fun_l20_n748(x)
+ end
+end
+
+def fun_l19_n128(x)
+ if (x < 1)
+ fun_l20_n642(x)
+ else
+ fun_l20_n529(x)
+ end
+end
+
+def fun_l19_n129(x)
+ if (x < 1)
+ fun_l20_n842(x)
+ else
+ fun_l20_n228(x)
+ end
+end
+
+def fun_l19_n130(x)
+ if (x < 1)
+ fun_l20_n283(x)
+ else
+ fun_l20_n656(x)
+ end
+end
+
+def fun_l19_n131(x)
+ if (x < 1)
+ fun_l20_n699(x)
+ else
+ fun_l20_n135(x)
+ end
+end
+
+def fun_l19_n132(x)
+ if (x < 1)
+ fun_l20_n276(x)
+ else
+ fun_l20_n41(x)
+ end
+end
+
+def fun_l19_n133(x)
+ if (x < 1)
+ fun_l20_n734(x)
+ else
+ fun_l20_n157(x)
+ end
+end
+
+def fun_l19_n134(x)
+ if (x < 1)
+ fun_l20_n612(x)
+ else
+ fun_l20_n318(x)
+ end
+end
+
+def fun_l19_n135(x)
+ if (x < 1)
+ fun_l20_n345(x)
+ else
+ fun_l20_n332(x)
+ end
+end
+
+def fun_l19_n136(x)
+ if (x < 1)
+ fun_l20_n131(x)
+ else
+ fun_l20_n747(x)
+ end
+end
+
+def fun_l19_n137(x)
+ if (x < 1)
+ fun_l20_n911(x)
+ else
+ fun_l20_n84(x)
+ end
+end
+
+def fun_l19_n138(x)
+ if (x < 1)
+ fun_l20_n665(x)
+ else
+ fun_l20_n194(x)
+ end
+end
+
+def fun_l19_n139(x)
+ if (x < 1)
+ fun_l20_n301(x)
+ else
+ fun_l20_n71(x)
+ end
+end
+
+def fun_l19_n140(x)
+ if (x < 1)
+ fun_l20_n432(x)
+ else
+ fun_l20_n679(x)
+ end
+end
+
+def fun_l19_n141(x)
+ if (x < 1)
+ fun_l20_n628(x)
+ else
+ fun_l20_n268(x)
+ end
+end
+
+def fun_l19_n142(x)
+ if (x < 1)
+ fun_l20_n982(x)
+ else
+ fun_l20_n241(x)
+ end
+end
+
+def fun_l19_n143(x)
+ if (x < 1)
+ fun_l20_n35(x)
+ else
+ fun_l20_n593(x)
+ end
+end
+
+def fun_l19_n144(x)
+ if (x < 1)
+ fun_l20_n791(x)
+ else
+ fun_l20_n960(x)
+ end
+end
+
+def fun_l19_n145(x)
+ if (x < 1)
+ fun_l20_n613(x)
+ else
+ fun_l20_n366(x)
+ end
+end
+
+def fun_l19_n146(x)
+ if (x < 1)
+ fun_l20_n997(x)
+ else
+ fun_l20_n7(x)
+ end
+end
+
+def fun_l19_n147(x)
+ if (x < 1)
+ fun_l20_n206(x)
+ else
+ fun_l20_n785(x)
+ end
+end
+
+def fun_l19_n148(x)
+ if (x < 1)
+ fun_l20_n822(x)
+ else
+ fun_l20_n178(x)
+ end
+end
+
+def fun_l19_n149(x)
+ if (x < 1)
+ fun_l20_n793(x)
+ else
+ fun_l20_n860(x)
+ end
+end
+
+def fun_l19_n150(x)
+ if (x < 1)
+ fun_l20_n260(x)
+ else
+ fun_l20_n523(x)
+ end
+end
+
+def fun_l19_n151(x)
+ if (x < 1)
+ fun_l20_n848(x)
+ else
+ fun_l20_n568(x)
+ end
+end
+
+def fun_l19_n152(x)
+ if (x < 1)
+ fun_l20_n466(x)
+ else
+ fun_l20_n959(x)
+ end
+end
+
+def fun_l19_n153(x)
+ if (x < 1)
+ fun_l20_n972(x)
+ else
+ fun_l20_n780(x)
+ end
+end
+
+def fun_l19_n154(x)
+ if (x < 1)
+ fun_l20_n349(x)
+ else
+ fun_l20_n490(x)
+ end
+end
+
+def fun_l19_n155(x)
+ if (x < 1)
+ fun_l20_n658(x)
+ else
+ fun_l20_n766(x)
+ end
+end
+
+def fun_l19_n156(x)
+ if (x < 1)
+ fun_l20_n788(x)
+ else
+ fun_l20_n961(x)
+ end
+end
+
+def fun_l19_n157(x)
+ if (x < 1)
+ fun_l20_n32(x)
+ else
+ fun_l20_n155(x)
+ end
+end
+
+def fun_l19_n158(x)
+ if (x < 1)
+ fun_l20_n820(x)
+ else
+ fun_l20_n317(x)
+ end
+end
+
+def fun_l19_n159(x)
+ if (x < 1)
+ fun_l20_n818(x)
+ else
+ fun_l20_n570(x)
+ end
+end
+
+def fun_l19_n160(x)
+ if (x < 1)
+ fun_l20_n82(x)
+ else
+ fun_l20_n331(x)
+ end
+end
+
+def fun_l19_n161(x)
+ if (x < 1)
+ fun_l20_n576(x)
+ else
+ fun_l20_n134(x)
+ end
+end
+
+def fun_l19_n162(x)
+ if (x < 1)
+ fun_l20_n287(x)
+ else
+ fun_l20_n748(x)
+ end
+end
+
+def fun_l19_n163(x)
+ if (x < 1)
+ fun_l20_n855(x)
+ else
+ fun_l20_n97(x)
+ end
+end
+
+def fun_l19_n164(x)
+ if (x < 1)
+ fun_l20_n218(x)
+ else
+ fun_l20_n195(x)
+ end
+end
+
+def fun_l19_n165(x)
+ if (x < 1)
+ fun_l20_n179(x)
+ else
+ fun_l20_n566(x)
+ end
+end
+
+def fun_l19_n166(x)
+ if (x < 1)
+ fun_l20_n833(x)
+ else
+ fun_l20_n35(x)
+ end
+end
+
+def fun_l19_n167(x)
+ if (x < 1)
+ fun_l20_n595(x)
+ else
+ fun_l20_n344(x)
+ end
+end
+
+def fun_l19_n168(x)
+ if (x < 1)
+ fun_l20_n171(x)
+ else
+ fun_l20_n199(x)
+ end
+end
+
+def fun_l19_n169(x)
+ if (x < 1)
+ fun_l20_n531(x)
+ else
+ fun_l20_n385(x)
+ end
+end
+
+def fun_l19_n170(x)
+ if (x < 1)
+ fun_l20_n168(x)
+ else
+ fun_l20_n911(x)
+ end
+end
+
+def fun_l19_n171(x)
+ if (x < 1)
+ fun_l20_n767(x)
+ else
+ fun_l20_n521(x)
+ end
+end
+
+def fun_l19_n172(x)
+ if (x < 1)
+ fun_l20_n769(x)
+ else
+ fun_l20_n56(x)
+ end
+end
+
+def fun_l19_n173(x)
+ if (x < 1)
+ fun_l20_n521(x)
+ else
+ fun_l20_n600(x)
+ end
+end
+
+def fun_l19_n174(x)
+ if (x < 1)
+ fun_l20_n239(x)
+ else
+ fun_l20_n22(x)
+ end
+end
+
+def fun_l19_n175(x)
+ if (x < 1)
+ fun_l20_n963(x)
+ else
+ fun_l20_n497(x)
+ end
+end
+
+def fun_l19_n176(x)
+ if (x < 1)
+ fun_l20_n989(x)
+ else
+ fun_l20_n748(x)
+ end
+end
+
+def fun_l19_n177(x)
+ if (x < 1)
+ fun_l20_n105(x)
+ else
+ fun_l20_n315(x)
+ end
+end
+
+def fun_l19_n178(x)
+ if (x < 1)
+ fun_l20_n48(x)
+ else
+ fun_l20_n550(x)
+ end
+end
+
+def fun_l19_n179(x)
+ if (x < 1)
+ fun_l20_n66(x)
+ else
+ fun_l20_n595(x)
+ end
+end
+
+def fun_l19_n180(x)
+ if (x < 1)
+ fun_l20_n692(x)
+ else
+ fun_l20_n71(x)
+ end
+end
+
+def fun_l19_n181(x)
+ if (x < 1)
+ fun_l20_n639(x)
+ else
+ fun_l20_n869(x)
+ end
+end
+
+def fun_l19_n182(x)
+ if (x < 1)
+ fun_l20_n925(x)
+ else
+ fun_l20_n868(x)
+ end
+end
+
+def fun_l19_n183(x)
+ if (x < 1)
+ fun_l20_n890(x)
+ else
+ fun_l20_n924(x)
+ end
+end
+
+def fun_l19_n184(x)
+ if (x < 1)
+ fun_l20_n579(x)
+ else
+ fun_l20_n349(x)
+ end
+end
+
+def fun_l19_n185(x)
+ if (x < 1)
+ fun_l20_n313(x)
+ else
+ fun_l20_n16(x)
+ end
+end
+
+def fun_l19_n186(x)
+ if (x < 1)
+ fun_l20_n947(x)
+ else
+ fun_l20_n644(x)
+ end
+end
+
+def fun_l19_n187(x)
+ if (x < 1)
+ fun_l20_n424(x)
+ else
+ fun_l20_n815(x)
+ end
+end
+
+def fun_l19_n188(x)
+ if (x < 1)
+ fun_l20_n177(x)
+ else
+ fun_l20_n230(x)
+ end
+end
+
+def fun_l19_n189(x)
+ if (x < 1)
+ fun_l20_n556(x)
+ else
+ fun_l20_n47(x)
+ end
+end
+
+def fun_l19_n190(x)
+ if (x < 1)
+ fun_l20_n804(x)
+ else
+ fun_l20_n516(x)
+ end
+end
+
+def fun_l19_n191(x)
+ if (x < 1)
+ fun_l20_n411(x)
+ else
+ fun_l20_n779(x)
+ end
+end
+
+def fun_l19_n192(x)
+ if (x < 1)
+ fun_l20_n124(x)
+ else
+ fun_l20_n827(x)
+ end
+end
+
+def fun_l19_n193(x)
+ if (x < 1)
+ fun_l20_n514(x)
+ else
+ fun_l20_n516(x)
+ end
+end
+
+def fun_l19_n194(x)
+ if (x < 1)
+ fun_l20_n134(x)
+ else
+ fun_l20_n356(x)
+ end
+end
+
+def fun_l19_n195(x)
+ if (x < 1)
+ fun_l20_n499(x)
+ else
+ fun_l20_n809(x)
+ end
+end
+
+def fun_l19_n196(x)
+ if (x < 1)
+ fun_l20_n958(x)
+ else
+ fun_l20_n675(x)
+ end
+end
+
+def fun_l19_n197(x)
+ if (x < 1)
+ fun_l20_n847(x)
+ else
+ fun_l20_n418(x)
+ end
+end
+
+def fun_l19_n198(x)
+ if (x < 1)
+ fun_l20_n294(x)
+ else
+ fun_l20_n510(x)
+ end
+end
+
+def fun_l19_n199(x)
+ if (x < 1)
+ fun_l20_n365(x)
+ else
+ fun_l20_n952(x)
+ end
+end
+
+def fun_l19_n200(x)
+ if (x < 1)
+ fun_l20_n961(x)
+ else
+ fun_l20_n747(x)
+ end
+end
+
+def fun_l19_n201(x)
+ if (x < 1)
+ fun_l20_n731(x)
+ else
+ fun_l20_n618(x)
+ end
+end
+
+def fun_l19_n202(x)
+ if (x < 1)
+ fun_l20_n825(x)
+ else
+ fun_l20_n907(x)
+ end
+end
+
+def fun_l19_n203(x)
+ if (x < 1)
+ fun_l20_n865(x)
+ else
+ fun_l20_n886(x)
+ end
+end
+
+def fun_l19_n204(x)
+ if (x < 1)
+ fun_l20_n732(x)
+ else
+ fun_l20_n823(x)
+ end
+end
+
+def fun_l19_n205(x)
+ if (x < 1)
+ fun_l20_n305(x)
+ else
+ fun_l20_n596(x)
+ end
+end
+
+def fun_l19_n206(x)
+ if (x < 1)
+ fun_l20_n245(x)
+ else
+ fun_l20_n370(x)
+ end
+end
+
+def fun_l19_n207(x)
+ if (x < 1)
+ fun_l20_n728(x)
+ else
+ fun_l20_n917(x)
+ end
+end
+
+def fun_l19_n208(x)
+ if (x < 1)
+ fun_l20_n448(x)
+ else
+ fun_l20_n904(x)
+ end
+end
+
+def fun_l19_n209(x)
+ if (x < 1)
+ fun_l20_n90(x)
+ else
+ fun_l20_n181(x)
+ end
+end
+
+def fun_l19_n210(x)
+ if (x < 1)
+ fun_l20_n569(x)
+ else
+ fun_l20_n268(x)
+ end
+end
+
+def fun_l19_n211(x)
+ if (x < 1)
+ fun_l20_n772(x)
+ else
+ fun_l20_n770(x)
+ end
+end
+
+def fun_l19_n212(x)
+ if (x < 1)
+ fun_l20_n781(x)
+ else
+ fun_l20_n603(x)
+ end
+end
+
+def fun_l19_n213(x)
+ if (x < 1)
+ fun_l20_n733(x)
+ else
+ fun_l20_n904(x)
+ end
+end
+
+def fun_l19_n214(x)
+ if (x < 1)
+ fun_l20_n303(x)
+ else
+ fun_l20_n888(x)
+ end
+end
+
+def fun_l19_n215(x)
+ if (x < 1)
+ fun_l20_n280(x)
+ else
+ fun_l20_n428(x)
+ end
+end
+
+def fun_l19_n216(x)
+ if (x < 1)
+ fun_l20_n737(x)
+ else
+ fun_l20_n483(x)
+ end
+end
+
+def fun_l19_n217(x)
+ if (x < 1)
+ fun_l20_n780(x)
+ else
+ fun_l20_n240(x)
+ end
+end
+
+def fun_l19_n218(x)
+ if (x < 1)
+ fun_l20_n202(x)
+ else
+ fun_l20_n580(x)
+ end
+end
+
+def fun_l19_n219(x)
+ if (x < 1)
+ fun_l20_n837(x)
+ else
+ fun_l20_n83(x)
+ end
+end
+
+def fun_l19_n220(x)
+ if (x < 1)
+ fun_l20_n68(x)
+ else
+ fun_l20_n292(x)
+ end
+end
+
+def fun_l19_n221(x)
+ if (x < 1)
+ fun_l20_n289(x)
+ else
+ fun_l20_n655(x)
+ end
+end
+
+def fun_l19_n222(x)
+ if (x < 1)
+ fun_l20_n505(x)
+ else
+ fun_l20_n660(x)
+ end
+end
+
+def fun_l19_n223(x)
+ if (x < 1)
+ fun_l20_n534(x)
+ else
+ fun_l20_n391(x)
+ end
+end
+
+def fun_l19_n224(x)
+ if (x < 1)
+ fun_l20_n72(x)
+ else
+ fun_l20_n81(x)
+ end
+end
+
+def fun_l19_n225(x)
+ if (x < 1)
+ fun_l20_n194(x)
+ else
+ fun_l20_n437(x)
+ end
+end
+
+def fun_l19_n226(x)
+ if (x < 1)
+ fun_l20_n629(x)
+ else
+ fun_l20_n645(x)
+ end
+end
+
+def fun_l19_n227(x)
+ if (x < 1)
+ fun_l20_n912(x)
+ else
+ fun_l20_n425(x)
+ end
+end
+
+def fun_l19_n228(x)
+ if (x < 1)
+ fun_l20_n773(x)
+ else
+ fun_l20_n456(x)
+ end
+end
+
+def fun_l19_n229(x)
+ if (x < 1)
+ fun_l20_n247(x)
+ else
+ fun_l20_n275(x)
+ end
+end
+
+def fun_l19_n230(x)
+ if (x < 1)
+ fun_l20_n263(x)
+ else
+ fun_l20_n482(x)
+ end
+end
+
+def fun_l19_n231(x)
+ if (x < 1)
+ fun_l20_n999(x)
+ else
+ fun_l20_n146(x)
+ end
+end
+
+def fun_l19_n232(x)
+ if (x < 1)
+ fun_l20_n117(x)
+ else
+ fun_l20_n851(x)
+ end
+end
+
+def fun_l19_n233(x)
+ if (x < 1)
+ fun_l20_n889(x)
+ else
+ fun_l20_n441(x)
+ end
+end
+
+def fun_l19_n234(x)
+ if (x < 1)
+ fun_l20_n885(x)
+ else
+ fun_l20_n374(x)
+ end
+end
+
+def fun_l19_n235(x)
+ if (x < 1)
+ fun_l20_n703(x)
+ else
+ fun_l20_n962(x)
+ end
+end
+
+def fun_l19_n236(x)
+ if (x < 1)
+ fun_l20_n298(x)
+ else
+ fun_l20_n57(x)
+ end
+end
+
+def fun_l19_n237(x)
+ if (x < 1)
+ fun_l20_n821(x)
+ else
+ fun_l20_n120(x)
+ end
+end
+
+def fun_l19_n238(x)
+ if (x < 1)
+ fun_l20_n437(x)
+ else
+ fun_l20_n204(x)
+ end
+end
+
+def fun_l19_n239(x)
+ if (x < 1)
+ fun_l20_n558(x)
+ else
+ fun_l20_n645(x)
+ end
+end
+
+def fun_l19_n240(x)
+ if (x < 1)
+ fun_l20_n631(x)
+ else
+ fun_l20_n986(x)
+ end
+end
+
+def fun_l19_n241(x)
+ if (x < 1)
+ fun_l20_n418(x)
+ else
+ fun_l20_n738(x)
+ end
+end
+
+def fun_l19_n242(x)
+ if (x < 1)
+ fun_l20_n249(x)
+ else
+ fun_l20_n322(x)
+ end
+end
+
+def fun_l19_n243(x)
+ if (x < 1)
+ fun_l20_n484(x)
+ else
+ fun_l20_n270(x)
+ end
+end
+
+def fun_l19_n244(x)
+ if (x < 1)
+ fun_l20_n749(x)
+ else
+ fun_l20_n322(x)
+ end
+end
+
+def fun_l19_n245(x)
+ if (x < 1)
+ fun_l20_n562(x)
+ else
+ fun_l20_n353(x)
+ end
+end
+
+def fun_l19_n246(x)
+ if (x < 1)
+ fun_l20_n974(x)
+ else
+ fun_l20_n333(x)
+ end
+end
+
+def fun_l19_n247(x)
+ if (x < 1)
+ fun_l20_n929(x)
+ else
+ fun_l20_n885(x)
+ end
+end
+
+def fun_l19_n248(x)
+ if (x < 1)
+ fun_l20_n421(x)
+ else
+ fun_l20_n576(x)
+ end
+end
+
+def fun_l19_n249(x)
+ if (x < 1)
+ fun_l20_n757(x)
+ else
+ fun_l20_n618(x)
+ end
+end
+
+def fun_l19_n250(x)
+ if (x < 1)
+ fun_l20_n108(x)
+ else
+ fun_l20_n704(x)
+ end
+end
+
+def fun_l19_n251(x)
+ if (x < 1)
+ fun_l20_n882(x)
+ else
+ fun_l20_n994(x)
+ end
+end
+
+def fun_l19_n252(x)
+ if (x < 1)
+ fun_l20_n995(x)
+ else
+ fun_l20_n580(x)
+ end
+end
+
+def fun_l19_n253(x)
+ if (x < 1)
+ fun_l20_n869(x)
+ else
+ fun_l20_n302(x)
+ end
+end
+
+def fun_l19_n254(x)
+ if (x < 1)
+ fun_l20_n873(x)
+ else
+ fun_l20_n315(x)
+ end
+end
+
+def fun_l19_n255(x)
+ if (x < 1)
+ fun_l20_n266(x)
+ else
+ fun_l20_n263(x)
+ end
+end
+
+def fun_l19_n256(x)
+ if (x < 1)
+ fun_l20_n450(x)
+ else
+ fun_l20_n994(x)
+ end
+end
+
+def fun_l19_n257(x)
+ if (x < 1)
+ fun_l20_n552(x)
+ else
+ fun_l20_n407(x)
+ end
+end
+
+def fun_l19_n258(x)
+ if (x < 1)
+ fun_l20_n603(x)
+ else
+ fun_l20_n453(x)
+ end
+end
+
+def fun_l19_n259(x)
+ if (x < 1)
+ fun_l20_n933(x)
+ else
+ fun_l20_n609(x)
+ end
+end
+
+def fun_l19_n260(x)
+ if (x < 1)
+ fun_l20_n983(x)
+ else
+ fun_l20_n404(x)
+ end
+end
+
+def fun_l19_n261(x)
+ if (x < 1)
+ fun_l20_n123(x)
+ else
+ fun_l20_n159(x)
+ end
+end
+
+def fun_l19_n262(x)
+ if (x < 1)
+ fun_l20_n890(x)
+ else
+ fun_l20_n749(x)
+ end
+end
+
+def fun_l19_n263(x)
+ if (x < 1)
+ fun_l20_n758(x)
+ else
+ fun_l20_n123(x)
+ end
+end
+
+def fun_l19_n264(x)
+ if (x < 1)
+ fun_l20_n194(x)
+ else
+ fun_l20_n645(x)
+ end
+end
+
+def fun_l19_n265(x)
+ if (x < 1)
+ fun_l20_n71(x)
+ else
+ fun_l20_n750(x)
+ end
+end
+
+def fun_l19_n266(x)
+ if (x < 1)
+ fun_l20_n713(x)
+ else
+ fun_l20_n125(x)
+ end
+end
+
+def fun_l19_n267(x)
+ if (x < 1)
+ fun_l20_n286(x)
+ else
+ fun_l20_n227(x)
+ end
+end
+
+def fun_l19_n268(x)
+ if (x < 1)
+ fun_l20_n220(x)
+ else
+ fun_l20_n233(x)
+ end
+end
+
+def fun_l19_n269(x)
+ if (x < 1)
+ fun_l20_n263(x)
+ else
+ fun_l20_n306(x)
+ end
+end
+
+def fun_l19_n270(x)
+ if (x < 1)
+ fun_l20_n959(x)
+ else
+ fun_l20_n552(x)
+ end
+end
+
+def fun_l19_n271(x)
+ if (x < 1)
+ fun_l20_n154(x)
+ else
+ fun_l20_n212(x)
+ end
+end
+
+def fun_l19_n272(x)
+ if (x < 1)
+ fun_l20_n985(x)
+ else
+ fun_l20_n370(x)
+ end
+end
+
+def fun_l19_n273(x)
+ if (x < 1)
+ fun_l20_n763(x)
+ else
+ fun_l20_n897(x)
+ end
+end
+
+def fun_l19_n274(x)
+ if (x < 1)
+ fun_l20_n582(x)
+ else
+ fun_l20_n638(x)
+ end
+end
+
+def fun_l19_n275(x)
+ if (x < 1)
+ fun_l20_n509(x)
+ else
+ fun_l20_n366(x)
+ end
+end
+
+def fun_l19_n276(x)
+ if (x < 1)
+ fun_l20_n500(x)
+ else
+ fun_l20_n814(x)
+ end
+end
+
+def fun_l19_n277(x)
+ if (x < 1)
+ fun_l20_n726(x)
+ else
+ fun_l20_n934(x)
+ end
+end
+
+def fun_l19_n278(x)
+ if (x < 1)
+ fun_l20_n198(x)
+ else
+ fun_l20_n852(x)
+ end
+end
+
+def fun_l19_n279(x)
+ if (x < 1)
+ fun_l20_n43(x)
+ else
+ fun_l20_n614(x)
+ end
+end
+
+def fun_l19_n280(x)
+ if (x < 1)
+ fun_l20_n79(x)
+ else
+ fun_l20_n821(x)
+ end
+end
+
+def fun_l19_n281(x)
+ if (x < 1)
+ fun_l20_n269(x)
+ else
+ fun_l20_n697(x)
+ end
+end
+
+def fun_l19_n282(x)
+ if (x < 1)
+ fun_l20_n327(x)
+ else
+ fun_l20_n528(x)
+ end
+end
+
+def fun_l19_n283(x)
+ if (x < 1)
+ fun_l20_n77(x)
+ else
+ fun_l20_n743(x)
+ end
+end
+
+def fun_l19_n284(x)
+ if (x < 1)
+ fun_l20_n282(x)
+ else
+ fun_l20_n406(x)
+ end
+end
+
+def fun_l19_n285(x)
+ if (x < 1)
+ fun_l20_n129(x)
+ else
+ fun_l20_n855(x)
+ end
+end
+
+def fun_l19_n286(x)
+ if (x < 1)
+ fun_l20_n897(x)
+ else
+ fun_l20_n687(x)
+ end
+end
+
+def fun_l19_n287(x)
+ if (x < 1)
+ fun_l20_n166(x)
+ else
+ fun_l20_n5(x)
+ end
+end
+
+def fun_l19_n288(x)
+ if (x < 1)
+ fun_l20_n545(x)
+ else
+ fun_l20_n661(x)
+ end
+end
+
+def fun_l19_n289(x)
+ if (x < 1)
+ fun_l20_n630(x)
+ else
+ fun_l20_n820(x)
+ end
+end
+
+def fun_l19_n290(x)
+ if (x < 1)
+ fun_l20_n774(x)
+ else
+ fun_l20_n125(x)
+ end
+end
+
+def fun_l19_n291(x)
+ if (x < 1)
+ fun_l20_n110(x)
+ else
+ fun_l20_n721(x)
+ end
+end
+
+def fun_l19_n292(x)
+ if (x < 1)
+ fun_l20_n777(x)
+ else
+ fun_l20_n44(x)
+ end
+end
+
+def fun_l19_n293(x)
+ if (x < 1)
+ fun_l20_n504(x)
+ else
+ fun_l20_n478(x)
+ end
+end
+
+def fun_l19_n294(x)
+ if (x < 1)
+ fun_l20_n540(x)
+ else
+ fun_l20_n603(x)
+ end
+end
+
+def fun_l19_n295(x)
+ if (x < 1)
+ fun_l20_n576(x)
+ else
+ fun_l20_n417(x)
+ end
+end
+
+def fun_l19_n296(x)
+ if (x < 1)
+ fun_l20_n553(x)
+ else
+ fun_l20_n295(x)
+ end
+end
+
+def fun_l19_n297(x)
+ if (x < 1)
+ fun_l20_n56(x)
+ else
+ fun_l20_n990(x)
+ end
+end
+
+def fun_l19_n298(x)
+ if (x < 1)
+ fun_l20_n362(x)
+ else
+ fun_l20_n158(x)
+ end
+end
+
+def fun_l19_n299(x)
+ if (x < 1)
+ fun_l20_n788(x)
+ else
+ fun_l20_n70(x)
+ end
+end
+
+def fun_l19_n300(x)
+ if (x < 1)
+ fun_l20_n670(x)
+ else
+ fun_l20_n542(x)
+ end
+end
+
+def fun_l19_n301(x)
+ if (x < 1)
+ fun_l20_n960(x)
+ else
+ fun_l20_n827(x)
+ end
+end
+
+def fun_l19_n302(x)
+ if (x < 1)
+ fun_l20_n366(x)
+ else
+ fun_l20_n325(x)
+ end
+end
+
+def fun_l19_n303(x)
+ if (x < 1)
+ fun_l20_n252(x)
+ else
+ fun_l20_n931(x)
+ end
+end
+
+def fun_l19_n304(x)
+ if (x < 1)
+ fun_l20_n124(x)
+ else
+ fun_l20_n102(x)
+ end
+end
+
+def fun_l19_n305(x)
+ if (x < 1)
+ fun_l20_n678(x)
+ else
+ fun_l20_n299(x)
+ end
+end
+
+def fun_l19_n306(x)
+ if (x < 1)
+ fun_l20_n538(x)
+ else
+ fun_l20_n371(x)
+ end
+end
+
+def fun_l19_n307(x)
+ if (x < 1)
+ fun_l20_n452(x)
+ else
+ fun_l20_n879(x)
+ end
+end
+
+def fun_l19_n308(x)
+ if (x < 1)
+ fun_l20_n410(x)
+ else
+ fun_l20_n156(x)
+ end
+end
+
+def fun_l19_n309(x)
+ if (x < 1)
+ fun_l20_n259(x)
+ else
+ fun_l20_n236(x)
+ end
+end
+
+def fun_l19_n310(x)
+ if (x < 1)
+ fun_l20_n710(x)
+ else
+ fun_l20_n23(x)
+ end
+end
+
+def fun_l19_n311(x)
+ if (x < 1)
+ fun_l20_n214(x)
+ else
+ fun_l20_n649(x)
+ end
+end
+
+def fun_l19_n312(x)
+ if (x < 1)
+ fun_l20_n603(x)
+ else
+ fun_l20_n213(x)
+ end
+end
+
+def fun_l19_n313(x)
+ if (x < 1)
+ fun_l20_n874(x)
+ else
+ fun_l20_n83(x)
+ end
+end
+
+def fun_l19_n314(x)
+ if (x < 1)
+ fun_l20_n902(x)
+ else
+ fun_l20_n303(x)
+ end
+end
+
+def fun_l19_n315(x)
+ if (x < 1)
+ fun_l20_n601(x)
+ else
+ fun_l20_n801(x)
+ end
+end
+
+def fun_l19_n316(x)
+ if (x < 1)
+ fun_l20_n76(x)
+ else
+ fun_l20_n960(x)
+ end
+end
+
+def fun_l19_n317(x)
+ if (x < 1)
+ fun_l20_n926(x)
+ else
+ fun_l20_n700(x)
+ end
+end
+
+def fun_l19_n318(x)
+ if (x < 1)
+ fun_l20_n233(x)
+ else
+ fun_l20_n278(x)
+ end
+end
+
+def fun_l19_n319(x)
+ if (x < 1)
+ fun_l20_n724(x)
+ else
+ fun_l20_n181(x)
+ end
+end
+
+def fun_l19_n320(x)
+ if (x < 1)
+ fun_l20_n367(x)
+ else
+ fun_l20_n511(x)
+ end
+end
+
+def fun_l19_n321(x)
+ if (x < 1)
+ fun_l20_n855(x)
+ else
+ fun_l20_n601(x)
+ end
+end
+
+def fun_l19_n322(x)
+ if (x < 1)
+ fun_l20_n173(x)
+ else
+ fun_l20_n151(x)
+ end
+end
+
+def fun_l19_n323(x)
+ if (x < 1)
+ fun_l20_n628(x)
+ else
+ fun_l20_n790(x)
+ end
+end
+
+def fun_l19_n324(x)
+ if (x < 1)
+ fun_l20_n423(x)
+ else
+ fun_l20_n40(x)
+ end
+end
+
+def fun_l19_n325(x)
+ if (x < 1)
+ fun_l20_n850(x)
+ else
+ fun_l20_n698(x)
+ end
+end
+
+def fun_l19_n326(x)
+ if (x < 1)
+ fun_l20_n351(x)
+ else
+ fun_l20_n562(x)
+ end
+end
+
+def fun_l19_n327(x)
+ if (x < 1)
+ fun_l20_n717(x)
+ else
+ fun_l20_n386(x)
+ end
+end
+
+def fun_l19_n328(x)
+ if (x < 1)
+ fun_l20_n461(x)
+ else
+ fun_l20_n604(x)
+ end
+end
+
+def fun_l19_n329(x)
+ if (x < 1)
+ fun_l20_n423(x)
+ else
+ fun_l20_n506(x)
+ end
+end
+
+def fun_l19_n330(x)
+ if (x < 1)
+ fun_l20_n389(x)
+ else
+ fun_l20_n365(x)
+ end
+end
+
+def fun_l19_n331(x)
+ if (x < 1)
+ fun_l20_n858(x)
+ else
+ fun_l20_n623(x)
+ end
+end
+
+def fun_l19_n332(x)
+ if (x < 1)
+ fun_l20_n34(x)
+ else
+ fun_l20_n598(x)
+ end
+end
+
+def fun_l19_n333(x)
+ if (x < 1)
+ fun_l20_n458(x)
+ else
+ fun_l20_n619(x)
+ end
+end
+
+def fun_l19_n334(x)
+ if (x < 1)
+ fun_l20_n203(x)
+ else
+ fun_l20_n391(x)
+ end
+end
+
+def fun_l19_n335(x)
+ if (x < 1)
+ fun_l20_n745(x)
+ else
+ fun_l20_n197(x)
+ end
+end
+
+def fun_l19_n336(x)
+ if (x < 1)
+ fun_l20_n388(x)
+ else
+ fun_l20_n682(x)
+ end
+end
+
+def fun_l19_n337(x)
+ if (x < 1)
+ fun_l20_n340(x)
+ else
+ fun_l20_n836(x)
+ end
+end
+
+def fun_l19_n338(x)
+ if (x < 1)
+ fun_l20_n231(x)
+ else
+ fun_l20_n508(x)
+ end
+end
+
+def fun_l19_n339(x)
+ if (x < 1)
+ fun_l20_n376(x)
+ else
+ fun_l20_n733(x)
+ end
+end
+
+def fun_l19_n340(x)
+ if (x < 1)
+ fun_l20_n162(x)
+ else
+ fun_l20_n397(x)
+ end
+end
+
+def fun_l19_n341(x)
+ if (x < 1)
+ fun_l20_n526(x)
+ else
+ fun_l20_n431(x)
+ end
+end
+
+def fun_l19_n342(x)
+ if (x < 1)
+ fun_l20_n850(x)
+ else
+ fun_l20_n226(x)
+ end
+end
+
+def fun_l19_n343(x)
+ if (x < 1)
+ fun_l20_n936(x)
+ else
+ fun_l20_n739(x)
+ end
+end
+
+def fun_l19_n344(x)
+ if (x < 1)
+ fun_l20_n639(x)
+ else
+ fun_l20_n844(x)
+ end
+end
+
+def fun_l19_n345(x)
+ if (x < 1)
+ fun_l20_n230(x)
+ else
+ fun_l20_n8(x)
+ end
+end
+
+def fun_l19_n346(x)
+ if (x < 1)
+ fun_l20_n156(x)
+ else
+ fun_l20_n417(x)
+ end
+end
+
+def fun_l19_n347(x)
+ if (x < 1)
+ fun_l20_n823(x)
+ else
+ fun_l20_n843(x)
+ end
+end
+
+def fun_l19_n348(x)
+ if (x < 1)
+ fun_l20_n798(x)
+ else
+ fun_l20_n538(x)
+ end
+end
+
+def fun_l19_n349(x)
+ if (x < 1)
+ fun_l20_n701(x)
+ else
+ fun_l20_n949(x)
+ end
+end
+
+def fun_l19_n350(x)
+ if (x < 1)
+ fun_l20_n131(x)
+ else
+ fun_l20_n727(x)
+ end
+end
+
+def fun_l19_n351(x)
+ if (x < 1)
+ fun_l20_n661(x)
+ else
+ fun_l20_n655(x)
+ end
+end
+
+def fun_l19_n352(x)
+ if (x < 1)
+ fun_l20_n824(x)
+ else
+ fun_l20_n436(x)
+ end
+end
+
+def fun_l19_n353(x)
+ if (x < 1)
+ fun_l20_n599(x)
+ else
+ fun_l20_n581(x)
+ end
+end
+
+def fun_l19_n354(x)
+ if (x < 1)
+ fun_l20_n290(x)
+ else
+ fun_l20_n632(x)
+ end
+end
+
+def fun_l19_n355(x)
+ if (x < 1)
+ fun_l20_n495(x)
+ else
+ fun_l20_n466(x)
+ end
+end
+
+def fun_l19_n356(x)
+ if (x < 1)
+ fun_l20_n70(x)
+ else
+ fun_l20_n270(x)
+ end
+end
+
+def fun_l19_n357(x)
+ if (x < 1)
+ fun_l20_n409(x)
+ else
+ fun_l20_n635(x)
+ end
+end
+
+def fun_l19_n358(x)
+ if (x < 1)
+ fun_l20_n396(x)
+ else
+ fun_l20_n41(x)
+ end
+end
+
+def fun_l19_n359(x)
+ if (x < 1)
+ fun_l20_n302(x)
+ else
+ fun_l20_n209(x)
+ end
+end
+
+def fun_l19_n360(x)
+ if (x < 1)
+ fun_l20_n844(x)
+ else
+ fun_l20_n23(x)
+ end
+end
+
+def fun_l19_n361(x)
+ if (x < 1)
+ fun_l20_n18(x)
+ else
+ fun_l20_n20(x)
+ end
+end
+
+def fun_l19_n362(x)
+ if (x < 1)
+ fun_l20_n821(x)
+ else
+ fun_l20_n806(x)
+ end
+end
+
+def fun_l19_n363(x)
+ if (x < 1)
+ fun_l20_n710(x)
+ else
+ fun_l20_n209(x)
+ end
+end
+
+def fun_l19_n364(x)
+ if (x < 1)
+ fun_l20_n979(x)
+ else
+ fun_l20_n457(x)
+ end
+end
+
+def fun_l19_n365(x)
+ if (x < 1)
+ fun_l20_n787(x)
+ else
+ fun_l20_n582(x)
+ end
+end
+
+def fun_l19_n366(x)
+ if (x < 1)
+ fun_l20_n274(x)
+ else
+ fun_l20_n710(x)
+ end
+end
+
+def fun_l19_n367(x)
+ if (x < 1)
+ fun_l20_n461(x)
+ else
+ fun_l20_n685(x)
+ end
+end
+
+def fun_l19_n368(x)
+ if (x < 1)
+ fun_l20_n953(x)
+ else
+ fun_l20_n477(x)
+ end
+end
+
+def fun_l19_n369(x)
+ if (x < 1)
+ fun_l20_n363(x)
+ else
+ fun_l20_n976(x)
+ end
+end
+
+def fun_l19_n370(x)
+ if (x < 1)
+ fun_l20_n934(x)
+ else
+ fun_l20_n742(x)
+ end
+end
+
+def fun_l19_n371(x)
+ if (x < 1)
+ fun_l20_n769(x)
+ else
+ fun_l20_n358(x)
+ end
+end
+
+def fun_l19_n372(x)
+ if (x < 1)
+ fun_l20_n53(x)
+ else
+ fun_l20_n915(x)
+ end
+end
+
+def fun_l19_n373(x)
+ if (x < 1)
+ fun_l20_n678(x)
+ else
+ fun_l20_n930(x)
+ end
+end
+
+def fun_l19_n374(x)
+ if (x < 1)
+ fun_l20_n160(x)
+ else
+ fun_l20_n937(x)
+ end
+end
+
+def fun_l19_n375(x)
+ if (x < 1)
+ fun_l20_n54(x)
+ else
+ fun_l20_n844(x)
+ end
+end
+
+def fun_l19_n376(x)
+ if (x < 1)
+ fun_l20_n911(x)
+ else
+ fun_l20_n756(x)
+ end
+end
+
+def fun_l19_n377(x)
+ if (x < 1)
+ fun_l20_n138(x)
+ else
+ fun_l20_n673(x)
+ end
+end
+
+def fun_l19_n378(x)
+ if (x < 1)
+ fun_l20_n976(x)
+ else
+ fun_l20_n720(x)
+ end
+end
+
+def fun_l19_n379(x)
+ if (x < 1)
+ fun_l20_n704(x)
+ else
+ fun_l20_n53(x)
+ end
+end
+
+def fun_l19_n380(x)
+ if (x < 1)
+ fun_l20_n762(x)
+ else
+ fun_l20_n340(x)
+ end
+end
+
+def fun_l19_n381(x)
+ if (x < 1)
+ fun_l20_n323(x)
+ else
+ fun_l20_n634(x)
+ end
+end
+
+def fun_l19_n382(x)
+ if (x < 1)
+ fun_l20_n515(x)
+ else
+ fun_l20_n562(x)
+ end
+end
+
+def fun_l19_n383(x)
+ if (x < 1)
+ fun_l20_n160(x)
+ else
+ fun_l20_n826(x)
+ end
+end
+
+def fun_l19_n384(x)
+ if (x < 1)
+ fun_l20_n779(x)
+ else
+ fun_l20_n638(x)
+ end
+end
+
+def fun_l19_n385(x)
+ if (x < 1)
+ fun_l20_n401(x)
+ else
+ fun_l20_n4(x)
+ end
+end
+
+def fun_l19_n386(x)
+ if (x < 1)
+ fun_l20_n604(x)
+ else
+ fun_l20_n820(x)
+ end
+end
+
+def fun_l19_n387(x)
+ if (x < 1)
+ fun_l20_n694(x)
+ else
+ fun_l20_n533(x)
+ end
+end
+
+def fun_l19_n388(x)
+ if (x < 1)
+ fun_l20_n687(x)
+ else
+ fun_l20_n697(x)
+ end
+end
+
+def fun_l19_n389(x)
+ if (x < 1)
+ fun_l20_n19(x)
+ else
+ fun_l20_n457(x)
+ end
+end
+
+def fun_l19_n390(x)
+ if (x < 1)
+ fun_l20_n812(x)
+ else
+ fun_l20_n152(x)
+ end
+end
+
+def fun_l19_n391(x)
+ if (x < 1)
+ fun_l20_n773(x)
+ else
+ fun_l20_n25(x)
+ end
+end
+
+def fun_l19_n392(x)
+ if (x < 1)
+ fun_l20_n24(x)
+ else
+ fun_l20_n930(x)
+ end
+end
+
+def fun_l19_n393(x)
+ if (x < 1)
+ fun_l20_n277(x)
+ else
+ fun_l20_n727(x)
+ end
+end
+
+def fun_l19_n394(x)
+ if (x < 1)
+ fun_l20_n272(x)
+ else
+ fun_l20_n298(x)
+ end
+end
+
+def fun_l19_n395(x)
+ if (x < 1)
+ fun_l20_n661(x)
+ else
+ fun_l20_n269(x)
+ end
+end
+
+def fun_l19_n396(x)
+ if (x < 1)
+ fun_l20_n624(x)
+ else
+ fun_l20_n654(x)
+ end
+end
+
+def fun_l19_n397(x)
+ if (x < 1)
+ fun_l20_n501(x)
+ else
+ fun_l20_n625(x)
+ end
+end
+
+def fun_l19_n398(x)
+ if (x < 1)
+ fun_l20_n596(x)
+ else
+ fun_l20_n160(x)
+ end
+end
+
+def fun_l19_n399(x)
+ if (x < 1)
+ fun_l20_n612(x)
+ else
+ fun_l20_n954(x)
+ end
+end
+
+def fun_l19_n400(x)
+ if (x < 1)
+ fun_l20_n911(x)
+ else
+ fun_l20_n321(x)
+ end
+end
+
+def fun_l19_n401(x)
+ if (x < 1)
+ fun_l20_n294(x)
+ else
+ fun_l20_n382(x)
+ end
+end
+
+def fun_l19_n402(x)
+ if (x < 1)
+ fun_l20_n193(x)
+ else
+ fun_l20_n732(x)
+ end
+end
+
+def fun_l19_n403(x)
+ if (x < 1)
+ fun_l20_n929(x)
+ else
+ fun_l20_n109(x)
+ end
+end
+
+def fun_l19_n404(x)
+ if (x < 1)
+ fun_l20_n647(x)
+ else
+ fun_l20_n497(x)
+ end
+end
+
+def fun_l19_n405(x)
+ if (x < 1)
+ fun_l20_n124(x)
+ else
+ fun_l20_n395(x)
+ end
+end
+
+def fun_l19_n406(x)
+ if (x < 1)
+ fun_l20_n949(x)
+ else
+ fun_l20_n195(x)
+ end
+end
+
+def fun_l19_n407(x)
+ if (x < 1)
+ fun_l20_n249(x)
+ else
+ fun_l20_n771(x)
+ end
+end
+
+def fun_l19_n408(x)
+ if (x < 1)
+ fun_l20_n728(x)
+ else
+ fun_l20_n752(x)
+ end
+end
+
+def fun_l19_n409(x)
+ if (x < 1)
+ fun_l20_n135(x)
+ else
+ fun_l20_n774(x)
+ end
+end
+
+def fun_l19_n410(x)
+ if (x < 1)
+ fun_l20_n277(x)
+ else
+ fun_l20_n499(x)
+ end
+end
+
+def fun_l19_n411(x)
+ if (x < 1)
+ fun_l20_n634(x)
+ else
+ fun_l20_n713(x)
+ end
+end
+
+def fun_l19_n412(x)
+ if (x < 1)
+ fun_l20_n118(x)
+ else
+ fun_l20_n879(x)
+ end
+end
+
+def fun_l19_n413(x)
+ if (x < 1)
+ fun_l20_n202(x)
+ else
+ fun_l20_n146(x)
+ end
+end
+
+def fun_l19_n414(x)
+ if (x < 1)
+ fun_l20_n668(x)
+ else
+ fun_l20_n22(x)
+ end
+end
+
+def fun_l19_n415(x)
+ if (x < 1)
+ fun_l20_n673(x)
+ else
+ fun_l20_n91(x)
+ end
+end
+
+def fun_l19_n416(x)
+ if (x < 1)
+ fun_l20_n399(x)
+ else
+ fun_l20_n288(x)
+ end
+end
+
+def fun_l19_n417(x)
+ if (x < 1)
+ fun_l20_n985(x)
+ else
+ fun_l20_n63(x)
+ end
+end
+
+def fun_l19_n418(x)
+ if (x < 1)
+ fun_l20_n973(x)
+ else
+ fun_l20_n37(x)
+ end
+end
+
+def fun_l19_n419(x)
+ if (x < 1)
+ fun_l20_n907(x)
+ else
+ fun_l20_n274(x)
+ end
+end
+
+def fun_l19_n420(x)
+ if (x < 1)
+ fun_l20_n0(x)
+ else
+ fun_l20_n895(x)
+ end
+end
+
+def fun_l19_n421(x)
+ if (x < 1)
+ fun_l20_n138(x)
+ else
+ fun_l20_n941(x)
+ end
+end
+
+def fun_l19_n422(x)
+ if (x < 1)
+ fun_l20_n944(x)
+ else
+ fun_l20_n393(x)
+ end
+end
+
+def fun_l19_n423(x)
+ if (x < 1)
+ fun_l20_n7(x)
+ else
+ fun_l20_n879(x)
+ end
+end
+
+def fun_l19_n424(x)
+ if (x < 1)
+ fun_l20_n855(x)
+ else
+ fun_l20_n19(x)
+ end
+end
+
+def fun_l19_n425(x)
+ if (x < 1)
+ fun_l20_n11(x)
+ else
+ fun_l20_n12(x)
+ end
+end
+
+def fun_l19_n426(x)
+ if (x < 1)
+ fun_l20_n652(x)
+ else
+ fun_l20_n501(x)
+ end
+end
+
+def fun_l19_n427(x)
+ if (x < 1)
+ fun_l20_n825(x)
+ else
+ fun_l20_n547(x)
+ end
+end
+
+def fun_l19_n428(x)
+ if (x < 1)
+ fun_l20_n485(x)
+ else
+ fun_l20_n905(x)
+ end
+end
+
+def fun_l19_n429(x)
+ if (x < 1)
+ fun_l20_n800(x)
+ else
+ fun_l20_n922(x)
+ end
+end
+
+def fun_l19_n430(x)
+ if (x < 1)
+ fun_l20_n122(x)
+ else
+ fun_l20_n79(x)
+ end
+end
+
+def fun_l19_n431(x)
+ if (x < 1)
+ fun_l20_n822(x)
+ else
+ fun_l20_n228(x)
+ end
+end
+
+def fun_l19_n432(x)
+ if (x < 1)
+ fun_l20_n616(x)
+ else
+ fun_l20_n886(x)
+ end
+end
+
+def fun_l19_n433(x)
+ if (x < 1)
+ fun_l20_n232(x)
+ else
+ fun_l20_n716(x)
+ end
+end
+
+def fun_l19_n434(x)
+ if (x < 1)
+ fun_l20_n288(x)
+ else
+ fun_l20_n497(x)
+ end
+end
+
+def fun_l19_n435(x)
+ if (x < 1)
+ fun_l20_n606(x)
+ else
+ fun_l20_n220(x)
+ end
+end
+
+def fun_l19_n436(x)
+ if (x < 1)
+ fun_l20_n185(x)
+ else
+ fun_l20_n69(x)
+ end
+end
+
+def fun_l19_n437(x)
+ if (x < 1)
+ fun_l20_n869(x)
+ else
+ fun_l20_n264(x)
+ end
+end
+
+def fun_l19_n438(x)
+ if (x < 1)
+ fun_l20_n142(x)
+ else
+ fun_l20_n766(x)
+ end
+end
+
+def fun_l19_n439(x)
+ if (x < 1)
+ fun_l20_n155(x)
+ else
+ fun_l20_n697(x)
+ end
+end
+
+def fun_l19_n440(x)
+ if (x < 1)
+ fun_l20_n486(x)
+ else
+ fun_l20_n442(x)
+ end
+end
+
+def fun_l19_n441(x)
+ if (x < 1)
+ fun_l20_n896(x)
+ else
+ fun_l20_n404(x)
+ end
+end
+
+def fun_l19_n442(x)
+ if (x < 1)
+ fun_l20_n944(x)
+ else
+ fun_l20_n906(x)
+ end
+end
+
+def fun_l19_n443(x)
+ if (x < 1)
+ fun_l20_n400(x)
+ else
+ fun_l20_n230(x)
+ end
+end
+
+def fun_l19_n444(x)
+ if (x < 1)
+ fun_l20_n646(x)
+ else
+ fun_l20_n89(x)
+ end
+end
+
+def fun_l19_n445(x)
+ if (x < 1)
+ fun_l20_n683(x)
+ else
+ fun_l20_n434(x)
+ end
+end
+
+def fun_l19_n446(x)
+ if (x < 1)
+ fun_l20_n333(x)
+ else
+ fun_l20_n164(x)
+ end
+end
+
+def fun_l19_n447(x)
+ if (x < 1)
+ fun_l20_n732(x)
+ else
+ fun_l20_n721(x)
+ end
+end
+
+def fun_l19_n448(x)
+ if (x < 1)
+ fun_l20_n948(x)
+ else
+ fun_l20_n343(x)
+ end
+end
+
+def fun_l19_n449(x)
+ if (x < 1)
+ fun_l20_n211(x)
+ else
+ fun_l20_n754(x)
+ end
+end
+
+def fun_l19_n450(x)
+ if (x < 1)
+ fun_l20_n984(x)
+ else
+ fun_l20_n952(x)
+ end
+end
+
+def fun_l19_n451(x)
+ if (x < 1)
+ fun_l20_n349(x)
+ else
+ fun_l20_n424(x)
+ end
+end
+
+def fun_l19_n452(x)
+ if (x < 1)
+ fun_l20_n721(x)
+ else
+ fun_l20_n475(x)
+ end
+end
+
+def fun_l19_n453(x)
+ if (x < 1)
+ fun_l20_n143(x)
+ else
+ fun_l20_n875(x)
+ end
+end
+
+def fun_l19_n454(x)
+ if (x < 1)
+ fun_l20_n561(x)
+ else
+ fun_l20_n255(x)
+ end
+end
+
+def fun_l19_n455(x)
+ if (x < 1)
+ fun_l20_n962(x)
+ else
+ fun_l20_n489(x)
+ end
+end
+
+def fun_l19_n456(x)
+ if (x < 1)
+ fun_l20_n95(x)
+ else
+ fun_l20_n434(x)
+ end
+end
+
+def fun_l19_n457(x)
+ if (x < 1)
+ fun_l20_n863(x)
+ else
+ fun_l20_n198(x)
+ end
+end
+
+def fun_l19_n458(x)
+ if (x < 1)
+ fun_l20_n106(x)
+ else
+ fun_l20_n786(x)
+ end
+end
+
+def fun_l19_n459(x)
+ if (x < 1)
+ fun_l20_n415(x)
+ else
+ fun_l20_n456(x)
+ end
+end
+
+def fun_l19_n460(x)
+ if (x < 1)
+ fun_l20_n706(x)
+ else
+ fun_l20_n47(x)
+ end
+end
+
+def fun_l19_n461(x)
+ if (x < 1)
+ fun_l20_n894(x)
+ else
+ fun_l20_n119(x)
+ end
+end
+
+def fun_l19_n462(x)
+ if (x < 1)
+ fun_l20_n267(x)
+ else
+ fun_l20_n662(x)
+ end
+end
+
+def fun_l19_n463(x)
+ if (x < 1)
+ fun_l20_n689(x)
+ else
+ fun_l20_n633(x)
+ end
+end
+
+def fun_l19_n464(x)
+ if (x < 1)
+ fun_l20_n94(x)
+ else
+ fun_l20_n967(x)
+ end
+end
+
+def fun_l19_n465(x)
+ if (x < 1)
+ fun_l20_n902(x)
+ else
+ fun_l20_n619(x)
+ end
+end
+
+def fun_l19_n466(x)
+ if (x < 1)
+ fun_l20_n574(x)
+ else
+ fun_l20_n204(x)
+ end
+end
+
+def fun_l19_n467(x)
+ if (x < 1)
+ fun_l20_n195(x)
+ else
+ fun_l20_n455(x)
+ end
+end
+
+def fun_l19_n468(x)
+ if (x < 1)
+ fun_l20_n173(x)
+ else
+ fun_l20_n4(x)
+ end
+end
+
+def fun_l19_n469(x)
+ if (x < 1)
+ fun_l20_n769(x)
+ else
+ fun_l20_n314(x)
+ end
+end
+
+def fun_l19_n470(x)
+ if (x < 1)
+ fun_l20_n669(x)
+ else
+ fun_l20_n648(x)
+ end
+end
+
+def fun_l19_n471(x)
+ if (x < 1)
+ fun_l20_n741(x)
+ else
+ fun_l20_n238(x)
+ end
+end
+
+def fun_l19_n472(x)
+ if (x < 1)
+ fun_l20_n370(x)
+ else
+ fun_l20_n610(x)
+ end
+end
+
+def fun_l19_n473(x)
+ if (x < 1)
+ fun_l20_n200(x)
+ else
+ fun_l20_n698(x)
+ end
+end
+
+def fun_l19_n474(x)
+ if (x < 1)
+ fun_l20_n200(x)
+ else
+ fun_l20_n951(x)
+ end
+end
+
+def fun_l19_n475(x)
+ if (x < 1)
+ fun_l20_n47(x)
+ else
+ fun_l20_n244(x)
+ end
+end
+
+def fun_l19_n476(x)
+ if (x < 1)
+ fun_l20_n314(x)
+ else
+ fun_l20_n163(x)
+ end
+end
+
+def fun_l19_n477(x)
+ if (x < 1)
+ fun_l20_n665(x)
+ else
+ fun_l20_n278(x)
+ end
+end
+
+def fun_l19_n478(x)
+ if (x < 1)
+ fun_l20_n539(x)
+ else
+ fun_l20_n149(x)
+ end
+end
+
+def fun_l19_n479(x)
+ if (x < 1)
+ fun_l20_n10(x)
+ else
+ fun_l20_n686(x)
+ end
+end
+
+def fun_l19_n480(x)
+ if (x < 1)
+ fun_l20_n684(x)
+ else
+ fun_l20_n531(x)
+ end
+end
+
+def fun_l19_n481(x)
+ if (x < 1)
+ fun_l20_n579(x)
+ else
+ fun_l20_n468(x)
+ end
+end
+
+def fun_l19_n482(x)
+ if (x < 1)
+ fun_l20_n794(x)
+ else
+ fun_l20_n116(x)
+ end
+end
+
+def fun_l19_n483(x)
+ if (x < 1)
+ fun_l20_n848(x)
+ else
+ fun_l20_n278(x)
+ end
+end
+
+def fun_l19_n484(x)
+ if (x < 1)
+ fun_l20_n965(x)
+ else
+ fun_l20_n23(x)
+ end
+end
+
+def fun_l19_n485(x)
+ if (x < 1)
+ fun_l20_n123(x)
+ else
+ fun_l20_n905(x)
+ end
+end
+
+def fun_l19_n486(x)
+ if (x < 1)
+ fun_l20_n69(x)
+ else
+ fun_l20_n4(x)
+ end
+end
+
+def fun_l19_n487(x)
+ if (x < 1)
+ fun_l20_n234(x)
+ else
+ fun_l20_n648(x)
+ end
+end
+
+def fun_l19_n488(x)
+ if (x < 1)
+ fun_l20_n31(x)
+ else
+ fun_l20_n127(x)
+ end
+end
+
+def fun_l19_n489(x)
+ if (x < 1)
+ fun_l20_n469(x)
+ else
+ fun_l20_n300(x)
+ end
+end
+
+def fun_l19_n490(x)
+ if (x < 1)
+ fun_l20_n855(x)
+ else
+ fun_l20_n722(x)
+ end
+end
+
+def fun_l19_n491(x)
+ if (x < 1)
+ fun_l20_n949(x)
+ else
+ fun_l20_n567(x)
+ end
+end
+
+def fun_l19_n492(x)
+ if (x < 1)
+ fun_l20_n465(x)
+ else
+ fun_l20_n226(x)
+ end
+end
+
+def fun_l19_n493(x)
+ if (x < 1)
+ fun_l20_n436(x)
+ else
+ fun_l20_n292(x)
+ end
+end
+
+def fun_l19_n494(x)
+ if (x < 1)
+ fun_l20_n552(x)
+ else
+ fun_l20_n81(x)
+ end
+end
+
+def fun_l19_n495(x)
+ if (x < 1)
+ fun_l20_n950(x)
+ else
+ fun_l20_n481(x)
+ end
+end
+
+def fun_l19_n496(x)
+ if (x < 1)
+ fun_l20_n382(x)
+ else
+ fun_l20_n846(x)
+ end
+end
+
+def fun_l19_n497(x)
+ if (x < 1)
+ fun_l20_n355(x)
+ else
+ fun_l20_n546(x)
+ end
+end
+
+def fun_l19_n498(x)
+ if (x < 1)
+ fun_l20_n404(x)
+ else
+ fun_l20_n655(x)
+ end
+end
+
+def fun_l19_n499(x)
+ if (x < 1)
+ fun_l20_n794(x)
+ else
+ fun_l20_n531(x)
+ end
+end
+
+def fun_l19_n500(x)
+ if (x < 1)
+ fun_l20_n555(x)
+ else
+ fun_l20_n37(x)
+ end
+end
+
+def fun_l19_n501(x)
+ if (x < 1)
+ fun_l20_n955(x)
+ else
+ fun_l20_n60(x)
+ end
+end
+
+def fun_l19_n502(x)
+ if (x < 1)
+ fun_l20_n957(x)
+ else
+ fun_l20_n482(x)
+ end
+end
+
+def fun_l19_n503(x)
+ if (x < 1)
+ fun_l20_n683(x)
+ else
+ fun_l20_n374(x)
+ end
+end
+
+def fun_l19_n504(x)
+ if (x < 1)
+ fun_l20_n839(x)
+ else
+ fun_l20_n867(x)
+ end
+end
+
+def fun_l19_n505(x)
+ if (x < 1)
+ fun_l20_n956(x)
+ else
+ fun_l20_n336(x)
+ end
+end
+
+def fun_l19_n506(x)
+ if (x < 1)
+ fun_l20_n234(x)
+ else
+ fun_l20_n50(x)
+ end
+end
+
+def fun_l19_n507(x)
+ if (x < 1)
+ fun_l20_n968(x)
+ else
+ fun_l20_n627(x)
+ end
+end
+
+def fun_l19_n508(x)
+ if (x < 1)
+ fun_l20_n680(x)
+ else
+ fun_l20_n812(x)
+ end
+end
+
+def fun_l19_n509(x)
+ if (x < 1)
+ fun_l20_n106(x)
+ else
+ fun_l20_n428(x)
+ end
+end
+
+def fun_l19_n510(x)
+ if (x < 1)
+ fun_l20_n50(x)
+ else
+ fun_l20_n101(x)
+ end
+end
+
+def fun_l19_n511(x)
+ if (x < 1)
+ fun_l20_n75(x)
+ else
+ fun_l20_n299(x)
+ end
+end
+
+def fun_l19_n512(x)
+ if (x < 1)
+ fun_l20_n612(x)
+ else
+ fun_l20_n367(x)
+ end
+end
+
+def fun_l19_n513(x)
+ if (x < 1)
+ fun_l20_n278(x)
+ else
+ fun_l20_n803(x)
+ end
+end
+
+def fun_l19_n514(x)
+ if (x < 1)
+ fun_l20_n637(x)
+ else
+ fun_l20_n837(x)
+ end
+end
+
+def fun_l19_n515(x)
+ if (x < 1)
+ fun_l20_n908(x)
+ else
+ fun_l20_n410(x)
+ end
+end
+
+def fun_l19_n516(x)
+ if (x < 1)
+ fun_l20_n349(x)
+ else
+ fun_l20_n219(x)
+ end
+end
+
+def fun_l19_n517(x)
+ if (x < 1)
+ fun_l20_n869(x)
+ else
+ fun_l20_n922(x)
+ end
+end
+
+def fun_l19_n518(x)
+ if (x < 1)
+ fun_l20_n429(x)
+ else
+ fun_l20_n332(x)
+ end
+end
+
+def fun_l19_n519(x)
+ if (x < 1)
+ fun_l20_n775(x)
+ else
+ fun_l20_n417(x)
+ end
+end
+
+def fun_l19_n520(x)
+ if (x < 1)
+ fun_l20_n551(x)
+ else
+ fun_l20_n214(x)
+ end
+end
+
+def fun_l19_n521(x)
+ if (x < 1)
+ fun_l20_n643(x)
+ else
+ fun_l20_n74(x)
+ end
+end
+
+def fun_l19_n522(x)
+ if (x < 1)
+ fun_l20_n960(x)
+ else
+ fun_l20_n189(x)
+ end
+end
+
+def fun_l19_n523(x)
+ if (x < 1)
+ fun_l20_n815(x)
+ else
+ fun_l20_n624(x)
+ end
+end
+
+def fun_l19_n524(x)
+ if (x < 1)
+ fun_l20_n247(x)
+ else
+ fun_l20_n679(x)
+ end
+end
+
+def fun_l19_n525(x)
+ if (x < 1)
+ fun_l20_n261(x)
+ else
+ fun_l20_n728(x)
+ end
+end
+
+def fun_l19_n526(x)
+ if (x < 1)
+ fun_l20_n361(x)
+ else
+ fun_l20_n295(x)
+ end
+end
+
+def fun_l19_n527(x)
+ if (x < 1)
+ fun_l20_n559(x)
+ else
+ fun_l20_n763(x)
+ end
+end
+
+def fun_l19_n528(x)
+ if (x < 1)
+ fun_l20_n291(x)
+ else
+ fun_l20_n815(x)
+ end
+end
+
+def fun_l19_n529(x)
+ if (x < 1)
+ fun_l20_n224(x)
+ else
+ fun_l20_n305(x)
+ end
+end
+
+def fun_l19_n530(x)
+ if (x < 1)
+ fun_l20_n579(x)
+ else
+ fun_l20_n370(x)
+ end
+end
+
+def fun_l19_n531(x)
+ if (x < 1)
+ fun_l20_n571(x)
+ else
+ fun_l20_n65(x)
+ end
+end
+
+def fun_l19_n532(x)
+ if (x < 1)
+ fun_l20_n815(x)
+ else
+ fun_l20_n567(x)
+ end
+end
+
+def fun_l19_n533(x)
+ if (x < 1)
+ fun_l20_n48(x)
+ else
+ fun_l20_n386(x)
+ end
+end
+
+def fun_l19_n534(x)
+ if (x < 1)
+ fun_l20_n478(x)
+ else
+ fun_l20_n679(x)
+ end
+end
+
+def fun_l19_n535(x)
+ if (x < 1)
+ fun_l20_n241(x)
+ else
+ fun_l20_n829(x)
+ end
+end
+
+def fun_l19_n536(x)
+ if (x < 1)
+ fun_l20_n267(x)
+ else
+ fun_l20_n160(x)
+ end
+end
+
+def fun_l19_n537(x)
+ if (x < 1)
+ fun_l20_n719(x)
+ else
+ fun_l20_n199(x)
+ end
+end
+
+def fun_l19_n538(x)
+ if (x < 1)
+ fun_l20_n477(x)
+ else
+ fun_l20_n662(x)
+ end
+end
+
+def fun_l19_n539(x)
+ if (x < 1)
+ fun_l20_n506(x)
+ else
+ fun_l20_n856(x)
+ end
+end
+
+def fun_l19_n540(x)
+ if (x < 1)
+ fun_l20_n717(x)
+ else
+ fun_l20_n207(x)
+ end
+end
+
+def fun_l19_n541(x)
+ if (x < 1)
+ fun_l20_n94(x)
+ else
+ fun_l20_n988(x)
+ end
+end
+
+def fun_l19_n542(x)
+ if (x < 1)
+ fun_l20_n837(x)
+ else
+ fun_l20_n334(x)
+ end
+end
+
+def fun_l19_n543(x)
+ if (x < 1)
+ fun_l20_n23(x)
+ else
+ fun_l20_n991(x)
+ end
+end
+
+def fun_l19_n544(x)
+ if (x < 1)
+ fun_l20_n558(x)
+ else
+ fun_l20_n740(x)
+ end
+end
+
+def fun_l19_n545(x)
+ if (x < 1)
+ fun_l20_n762(x)
+ else
+ fun_l20_n79(x)
+ end
+end
+
+def fun_l19_n546(x)
+ if (x < 1)
+ fun_l20_n81(x)
+ else
+ fun_l20_n331(x)
+ end
+end
+
+def fun_l19_n547(x)
+ if (x < 1)
+ fun_l20_n9(x)
+ else
+ fun_l20_n267(x)
+ end
+end
+
+def fun_l19_n548(x)
+ if (x < 1)
+ fun_l20_n550(x)
+ else
+ fun_l20_n98(x)
+ end
+end
+
+def fun_l19_n549(x)
+ if (x < 1)
+ fun_l20_n735(x)
+ else
+ fun_l20_n361(x)
+ end
+end
+
+def fun_l19_n550(x)
+ if (x < 1)
+ fun_l20_n155(x)
+ else
+ fun_l20_n560(x)
+ end
+end
+
+def fun_l19_n551(x)
+ if (x < 1)
+ fun_l20_n394(x)
+ else
+ fun_l20_n793(x)
+ end
+end
+
+def fun_l19_n552(x)
+ if (x < 1)
+ fun_l20_n826(x)
+ else
+ fun_l20_n508(x)
+ end
+end
+
+def fun_l19_n553(x)
+ if (x < 1)
+ fun_l20_n569(x)
+ else
+ fun_l20_n981(x)
+ end
+end
+
+def fun_l19_n554(x)
+ if (x < 1)
+ fun_l20_n580(x)
+ else
+ fun_l20_n848(x)
+ end
+end
+
+def fun_l19_n555(x)
+ if (x < 1)
+ fun_l20_n31(x)
+ else
+ fun_l20_n191(x)
+ end
+end
+
+def fun_l19_n556(x)
+ if (x < 1)
+ fun_l20_n283(x)
+ else
+ fun_l20_n376(x)
+ end
+end
+
+def fun_l19_n557(x)
+ if (x < 1)
+ fun_l20_n978(x)
+ else
+ fun_l20_n554(x)
+ end
+end
+
+def fun_l19_n558(x)
+ if (x < 1)
+ fun_l20_n727(x)
+ else
+ fun_l20_n89(x)
+ end
+end
+
+def fun_l19_n559(x)
+ if (x < 1)
+ fun_l20_n204(x)
+ else
+ fun_l20_n652(x)
+ end
+end
+
+def fun_l19_n560(x)
+ if (x < 1)
+ fun_l20_n481(x)
+ else
+ fun_l20_n114(x)
+ end
+end
+
+def fun_l19_n561(x)
+ if (x < 1)
+ fun_l20_n601(x)
+ else
+ fun_l20_n187(x)
+ end
+end
+
+def fun_l19_n562(x)
+ if (x < 1)
+ fun_l20_n682(x)
+ else
+ fun_l20_n88(x)
+ end
+end
+
+def fun_l19_n563(x)
+ if (x < 1)
+ fun_l20_n346(x)
+ else
+ fun_l20_n190(x)
+ end
+end
+
+def fun_l19_n564(x)
+ if (x < 1)
+ fun_l20_n15(x)
+ else
+ fun_l20_n315(x)
+ end
+end
+
+def fun_l19_n565(x)
+ if (x < 1)
+ fun_l20_n555(x)
+ else
+ fun_l20_n208(x)
+ end
+end
+
+def fun_l19_n566(x)
+ if (x < 1)
+ fun_l20_n29(x)
+ else
+ fun_l20_n511(x)
+ end
+end
+
+def fun_l19_n567(x)
+ if (x < 1)
+ fun_l20_n897(x)
+ else
+ fun_l20_n309(x)
+ end
+end
+
+def fun_l19_n568(x)
+ if (x < 1)
+ fun_l20_n586(x)
+ else
+ fun_l20_n602(x)
+ end
+end
+
+def fun_l19_n569(x)
+ if (x < 1)
+ fun_l20_n51(x)
+ else
+ fun_l20_n483(x)
+ end
+end
+
+def fun_l19_n570(x)
+ if (x < 1)
+ fun_l20_n159(x)
+ else
+ fun_l20_n5(x)
+ end
+end
+
+def fun_l19_n571(x)
+ if (x < 1)
+ fun_l20_n892(x)
+ else
+ fun_l20_n336(x)
+ end
+end
+
+def fun_l19_n572(x)
+ if (x < 1)
+ fun_l20_n203(x)
+ else
+ fun_l20_n287(x)
+ end
+end
+
+def fun_l19_n573(x)
+ if (x < 1)
+ fun_l20_n41(x)
+ else
+ fun_l20_n51(x)
+ end
+end
+
+def fun_l19_n574(x)
+ if (x < 1)
+ fun_l20_n977(x)
+ else
+ fun_l20_n474(x)
+ end
+end
+
+def fun_l19_n575(x)
+ if (x < 1)
+ fun_l20_n247(x)
+ else
+ fun_l20_n281(x)
+ end
+end
+
+def fun_l19_n576(x)
+ if (x < 1)
+ fun_l20_n877(x)
+ else
+ fun_l20_n836(x)
+ end
+end
+
+def fun_l19_n577(x)
+ if (x < 1)
+ fun_l20_n527(x)
+ else
+ fun_l20_n549(x)
+ end
+end
+
+def fun_l19_n578(x)
+ if (x < 1)
+ fun_l20_n102(x)
+ else
+ fun_l20_n906(x)
+ end
+end
+
+def fun_l19_n579(x)
+ if (x < 1)
+ fun_l20_n842(x)
+ else
+ fun_l20_n554(x)
+ end
+end
+
+def fun_l19_n580(x)
+ if (x < 1)
+ fun_l20_n371(x)
+ else
+ fun_l20_n44(x)
+ end
+end
+
+def fun_l19_n581(x)
+ if (x < 1)
+ fun_l20_n306(x)
+ else
+ fun_l20_n571(x)
+ end
+end
+
+def fun_l19_n582(x)
+ if (x < 1)
+ fun_l20_n548(x)
+ else
+ fun_l20_n596(x)
+ end
+end
+
+def fun_l19_n583(x)
+ if (x < 1)
+ fun_l20_n724(x)
+ else
+ fun_l20_n835(x)
+ end
+end
+
+def fun_l19_n584(x)
+ if (x < 1)
+ fun_l20_n238(x)
+ else
+ fun_l20_n408(x)
+ end
+end
+
+def fun_l19_n585(x)
+ if (x < 1)
+ fun_l20_n378(x)
+ else
+ fun_l20_n272(x)
+ end
+end
+
+def fun_l19_n586(x)
+ if (x < 1)
+ fun_l20_n647(x)
+ else
+ fun_l20_n814(x)
+ end
+end
+
+def fun_l19_n587(x)
+ if (x < 1)
+ fun_l20_n210(x)
+ else
+ fun_l20_n801(x)
+ end
+end
+
+def fun_l19_n588(x)
+ if (x < 1)
+ fun_l20_n796(x)
+ else
+ fun_l20_n329(x)
+ end
+end
+
+def fun_l19_n589(x)
+ if (x < 1)
+ fun_l20_n403(x)
+ else
+ fun_l20_n392(x)
+ end
+end
+
+def fun_l19_n590(x)
+ if (x < 1)
+ fun_l20_n677(x)
+ else
+ fun_l20_n574(x)
+ end
+end
+
+def fun_l19_n591(x)
+ if (x < 1)
+ fun_l20_n183(x)
+ else
+ fun_l20_n962(x)
+ end
+end
+
+def fun_l19_n592(x)
+ if (x < 1)
+ fun_l20_n230(x)
+ else
+ fun_l20_n783(x)
+ end
+end
+
+def fun_l19_n593(x)
+ if (x < 1)
+ fun_l20_n191(x)
+ else
+ fun_l20_n42(x)
+ end
+end
+
+def fun_l19_n594(x)
+ if (x < 1)
+ fun_l20_n244(x)
+ else
+ fun_l20_n760(x)
+ end
+end
+
+def fun_l19_n595(x)
+ if (x < 1)
+ fun_l20_n754(x)
+ else
+ fun_l20_n570(x)
+ end
+end
+
+def fun_l19_n596(x)
+ if (x < 1)
+ fun_l20_n612(x)
+ else
+ fun_l20_n287(x)
+ end
+end
+
+def fun_l19_n597(x)
+ if (x < 1)
+ fun_l20_n89(x)
+ else
+ fun_l20_n625(x)
+ end
+end
+
+def fun_l19_n598(x)
+ if (x < 1)
+ fun_l20_n782(x)
+ else
+ fun_l20_n516(x)
+ end
+end
+
+def fun_l19_n599(x)
+ if (x < 1)
+ fun_l20_n75(x)
+ else
+ fun_l20_n857(x)
+ end
+end
+
+def fun_l19_n600(x)
+ if (x < 1)
+ fun_l20_n717(x)
+ else
+ fun_l20_n408(x)
+ end
+end
+
+def fun_l19_n601(x)
+ if (x < 1)
+ fun_l20_n528(x)
+ else
+ fun_l20_n761(x)
+ end
+end
+
+def fun_l19_n602(x)
+ if (x < 1)
+ fun_l20_n319(x)
+ else
+ fun_l20_n645(x)
+ end
+end
+
+def fun_l19_n603(x)
+ if (x < 1)
+ fun_l20_n20(x)
+ else
+ fun_l20_n621(x)
+ end
+end
+
+def fun_l19_n604(x)
+ if (x < 1)
+ fun_l20_n118(x)
+ else
+ fun_l20_n699(x)
+ end
+end
+
+def fun_l19_n605(x)
+ if (x < 1)
+ fun_l20_n19(x)
+ else
+ fun_l20_n63(x)
+ end
+end
+
+def fun_l19_n606(x)
+ if (x < 1)
+ fun_l20_n845(x)
+ else
+ fun_l20_n618(x)
+ end
+end
+
+def fun_l19_n607(x)
+ if (x < 1)
+ fun_l20_n733(x)
+ else
+ fun_l20_n880(x)
+ end
+end
+
+def fun_l19_n608(x)
+ if (x < 1)
+ fun_l20_n785(x)
+ else
+ fun_l20_n254(x)
+ end
+end
+
+def fun_l19_n609(x)
+ if (x < 1)
+ fun_l20_n393(x)
+ else
+ fun_l20_n946(x)
+ end
+end
+
+def fun_l19_n610(x)
+ if (x < 1)
+ fun_l20_n635(x)
+ else
+ fun_l20_n418(x)
+ end
+end
+
+def fun_l19_n611(x)
+ if (x < 1)
+ fun_l20_n987(x)
+ else
+ fun_l20_n703(x)
+ end
+end
+
+def fun_l19_n612(x)
+ if (x < 1)
+ fun_l20_n130(x)
+ else
+ fun_l20_n439(x)
+ end
+end
+
+def fun_l19_n613(x)
+ if (x < 1)
+ fun_l20_n516(x)
+ else
+ fun_l20_n724(x)
+ end
+end
+
+def fun_l19_n614(x)
+ if (x < 1)
+ fun_l20_n44(x)
+ else
+ fun_l20_n102(x)
+ end
+end
+
+def fun_l19_n615(x)
+ if (x < 1)
+ fun_l20_n353(x)
+ else
+ fun_l20_n999(x)
+ end
+end
+
+def fun_l19_n616(x)
+ if (x < 1)
+ fun_l20_n191(x)
+ else
+ fun_l20_n726(x)
+ end
+end
+
+def fun_l19_n617(x)
+ if (x < 1)
+ fun_l20_n375(x)
+ else
+ fun_l20_n575(x)
+ end
+end
+
+def fun_l19_n618(x)
+ if (x < 1)
+ fun_l20_n719(x)
+ else
+ fun_l20_n581(x)
+ end
+end
+
+def fun_l19_n619(x)
+ if (x < 1)
+ fun_l20_n960(x)
+ else
+ fun_l20_n316(x)
+ end
+end
+
+def fun_l19_n620(x)
+ if (x < 1)
+ fun_l20_n860(x)
+ else
+ fun_l20_n784(x)
+ end
+end
+
+def fun_l19_n621(x)
+ if (x < 1)
+ fun_l20_n124(x)
+ else
+ fun_l20_n577(x)
+ end
+end
+
+def fun_l19_n622(x)
+ if (x < 1)
+ fun_l20_n547(x)
+ else
+ fun_l20_n623(x)
+ end
+end
+
+def fun_l19_n623(x)
+ if (x < 1)
+ fun_l20_n842(x)
+ else
+ fun_l20_n380(x)
+ end
+end
+
+def fun_l19_n624(x)
+ if (x < 1)
+ fun_l20_n331(x)
+ else
+ fun_l20_n473(x)
+ end
+end
+
+def fun_l19_n625(x)
+ if (x < 1)
+ fun_l20_n118(x)
+ else
+ fun_l20_n392(x)
+ end
+end
+
+def fun_l19_n626(x)
+ if (x < 1)
+ fun_l20_n836(x)
+ else
+ fun_l20_n988(x)
+ end
+end
+
+def fun_l19_n627(x)
+ if (x < 1)
+ fun_l20_n641(x)
+ else
+ fun_l20_n372(x)
+ end
+end
+
+def fun_l19_n628(x)
+ if (x < 1)
+ fun_l20_n377(x)
+ else
+ fun_l20_n780(x)
+ end
+end
+
+def fun_l19_n629(x)
+ if (x < 1)
+ fun_l20_n180(x)
+ else
+ fun_l20_n670(x)
+ end
+end
+
+def fun_l19_n630(x)
+ if (x < 1)
+ fun_l20_n985(x)
+ else
+ fun_l20_n613(x)
+ end
+end
+
+def fun_l19_n631(x)
+ if (x < 1)
+ fun_l20_n149(x)
+ else
+ fun_l20_n754(x)
+ end
+end
+
+def fun_l19_n632(x)
+ if (x < 1)
+ fun_l20_n967(x)
+ else
+ fun_l20_n940(x)
+ end
+end
+
+def fun_l19_n633(x)
+ if (x < 1)
+ fun_l20_n91(x)
+ else
+ fun_l20_n772(x)
+ end
+end
+
+def fun_l19_n634(x)
+ if (x < 1)
+ fun_l20_n637(x)
+ else
+ fun_l20_n296(x)
+ end
+end
+
+def fun_l19_n635(x)
+ if (x < 1)
+ fun_l20_n50(x)
+ else
+ fun_l20_n314(x)
+ end
+end
+
+def fun_l19_n636(x)
+ if (x < 1)
+ fun_l20_n367(x)
+ else
+ fun_l20_n849(x)
+ end
+end
+
+def fun_l19_n637(x)
+ if (x < 1)
+ fun_l20_n229(x)
+ else
+ fun_l20_n550(x)
+ end
+end
+
+def fun_l19_n638(x)
+ if (x < 1)
+ fun_l20_n680(x)
+ else
+ fun_l20_n783(x)
+ end
+end
+
+def fun_l19_n639(x)
+ if (x < 1)
+ fun_l20_n879(x)
+ else
+ fun_l20_n264(x)
+ end
+end
+
+def fun_l19_n640(x)
+ if (x < 1)
+ fun_l20_n143(x)
+ else
+ fun_l20_n455(x)
+ end
+end
+
+def fun_l19_n641(x)
+ if (x < 1)
+ fun_l20_n191(x)
+ else
+ fun_l20_n110(x)
+ end
+end
+
+def fun_l19_n642(x)
+ if (x < 1)
+ fun_l20_n782(x)
+ else
+ fun_l20_n43(x)
+ end
+end
+
+def fun_l19_n643(x)
+ if (x < 1)
+ fun_l20_n320(x)
+ else
+ fun_l20_n376(x)
+ end
+end
+
+def fun_l19_n644(x)
+ if (x < 1)
+ fun_l20_n554(x)
+ else
+ fun_l20_n667(x)
+ end
+end
+
+def fun_l19_n645(x)
+ if (x < 1)
+ fun_l20_n29(x)
+ else
+ fun_l20_n938(x)
+ end
+end
+
+def fun_l19_n646(x)
+ if (x < 1)
+ fun_l20_n789(x)
+ else
+ fun_l20_n907(x)
+ end
+end
+
+def fun_l19_n647(x)
+ if (x < 1)
+ fun_l20_n859(x)
+ else
+ fun_l20_n138(x)
+ end
+end
+
+def fun_l19_n648(x)
+ if (x < 1)
+ fun_l20_n373(x)
+ else
+ fun_l20_n843(x)
+ end
+end
+
+def fun_l19_n649(x)
+ if (x < 1)
+ fun_l20_n50(x)
+ else
+ fun_l20_n982(x)
+ end
+end
+
+def fun_l19_n650(x)
+ if (x < 1)
+ fun_l20_n622(x)
+ else
+ fun_l20_n368(x)
+ end
+end
+
+def fun_l19_n651(x)
+ if (x < 1)
+ fun_l20_n231(x)
+ else
+ fun_l20_n523(x)
+ end
+end
+
+def fun_l19_n652(x)
+ if (x < 1)
+ fun_l20_n233(x)
+ else
+ fun_l20_n963(x)
+ end
+end
+
+def fun_l19_n653(x)
+ if (x < 1)
+ fun_l20_n363(x)
+ else
+ fun_l20_n177(x)
+ end
+end
+
+def fun_l19_n654(x)
+ if (x < 1)
+ fun_l20_n952(x)
+ else
+ fun_l20_n96(x)
+ end
+end
+
+def fun_l19_n655(x)
+ if (x < 1)
+ fun_l20_n98(x)
+ else
+ fun_l20_n93(x)
+ end
+end
+
+def fun_l19_n656(x)
+ if (x < 1)
+ fun_l20_n200(x)
+ else
+ fun_l20_n137(x)
+ end
+end
+
+def fun_l19_n657(x)
+ if (x < 1)
+ fun_l20_n485(x)
+ else
+ fun_l20_n45(x)
+ end
+end
+
+def fun_l19_n658(x)
+ if (x < 1)
+ fun_l20_n234(x)
+ else
+ fun_l20_n366(x)
+ end
+end
+
+def fun_l19_n659(x)
+ if (x < 1)
+ fun_l20_n120(x)
+ else
+ fun_l20_n850(x)
+ end
+end
+
+def fun_l19_n660(x)
+ if (x < 1)
+ fun_l20_n932(x)
+ else
+ fun_l20_n551(x)
+ end
+end
+
+def fun_l19_n661(x)
+ if (x < 1)
+ fun_l20_n952(x)
+ else
+ fun_l20_n178(x)
+ end
+end
+
+def fun_l19_n662(x)
+ if (x < 1)
+ fun_l20_n761(x)
+ else
+ fun_l20_n2(x)
+ end
+end
+
+def fun_l19_n663(x)
+ if (x < 1)
+ fun_l20_n674(x)
+ else
+ fun_l20_n698(x)
+ end
+end
+
+def fun_l19_n664(x)
+ if (x < 1)
+ fun_l20_n669(x)
+ else
+ fun_l20_n563(x)
+ end
+end
+
+def fun_l19_n665(x)
+ if (x < 1)
+ fun_l20_n106(x)
+ else
+ fun_l20_n442(x)
+ end
+end
+
+def fun_l19_n666(x)
+ if (x < 1)
+ fun_l20_n476(x)
+ else
+ fun_l20_n620(x)
+ end
+end
+
+def fun_l19_n667(x)
+ if (x < 1)
+ fun_l20_n813(x)
+ else
+ fun_l20_n501(x)
+ end
+end
+
+def fun_l19_n668(x)
+ if (x < 1)
+ fun_l20_n773(x)
+ else
+ fun_l20_n485(x)
+ end
+end
+
+def fun_l19_n669(x)
+ if (x < 1)
+ fun_l20_n533(x)
+ else
+ fun_l20_n801(x)
+ end
+end
+
+def fun_l19_n670(x)
+ if (x < 1)
+ fun_l20_n64(x)
+ else
+ fun_l20_n872(x)
+ end
+end
+
+def fun_l19_n671(x)
+ if (x < 1)
+ fun_l20_n770(x)
+ else
+ fun_l20_n101(x)
+ end
+end
+
+def fun_l19_n672(x)
+ if (x < 1)
+ fun_l20_n22(x)
+ else
+ fun_l20_n644(x)
+ end
+end
+
+def fun_l19_n673(x)
+ if (x < 1)
+ fun_l20_n634(x)
+ else
+ fun_l20_n955(x)
+ end
+end
+
+def fun_l19_n674(x)
+ if (x < 1)
+ fun_l20_n976(x)
+ else
+ fun_l20_n665(x)
+ end
+end
+
+def fun_l19_n675(x)
+ if (x < 1)
+ fun_l20_n988(x)
+ else
+ fun_l20_n793(x)
+ end
+end
+
+def fun_l19_n676(x)
+ if (x < 1)
+ fun_l20_n235(x)
+ else
+ fun_l20_n833(x)
+ end
+end
+
+def fun_l19_n677(x)
+ if (x < 1)
+ fun_l20_n604(x)
+ else
+ fun_l20_n797(x)
+ end
+end
+
+def fun_l19_n678(x)
+ if (x < 1)
+ fun_l20_n622(x)
+ else
+ fun_l20_n896(x)
+ end
+end
+
+def fun_l19_n679(x)
+ if (x < 1)
+ fun_l20_n190(x)
+ else
+ fun_l20_n281(x)
+ end
+end
+
+def fun_l19_n680(x)
+ if (x < 1)
+ fun_l20_n325(x)
+ else
+ fun_l20_n669(x)
+ end
+end
+
+def fun_l19_n681(x)
+ if (x < 1)
+ fun_l20_n898(x)
+ else
+ fun_l20_n352(x)
+ end
+end
+
+def fun_l19_n682(x)
+ if (x < 1)
+ fun_l20_n820(x)
+ else
+ fun_l20_n117(x)
+ end
+end
+
+def fun_l19_n683(x)
+ if (x < 1)
+ fun_l20_n148(x)
+ else
+ fun_l20_n842(x)
+ end
+end
+
+def fun_l19_n684(x)
+ if (x < 1)
+ fun_l20_n468(x)
+ else
+ fun_l20_n596(x)
+ end
+end
+
+def fun_l19_n685(x)
+ if (x < 1)
+ fun_l20_n285(x)
+ else
+ fun_l20_n730(x)
+ end
+end
+
+def fun_l19_n686(x)
+ if (x < 1)
+ fun_l20_n426(x)
+ else
+ fun_l20_n657(x)
+ end
+end
+
+def fun_l19_n687(x)
+ if (x < 1)
+ fun_l20_n874(x)
+ else
+ fun_l20_n867(x)
+ end
+end
+
+def fun_l19_n688(x)
+ if (x < 1)
+ fun_l20_n451(x)
+ else
+ fun_l20_n846(x)
+ end
+end
+
+def fun_l19_n689(x)
+ if (x < 1)
+ fun_l20_n425(x)
+ else
+ fun_l20_n796(x)
+ end
+end
+
+def fun_l19_n690(x)
+ if (x < 1)
+ fun_l20_n37(x)
+ else
+ fun_l20_n301(x)
+ end
+end
+
+def fun_l19_n691(x)
+ if (x < 1)
+ fun_l20_n886(x)
+ else
+ fun_l20_n513(x)
+ end
+end
+
+def fun_l19_n692(x)
+ if (x < 1)
+ fun_l20_n426(x)
+ else
+ fun_l20_n46(x)
+ end
+end
+
+def fun_l19_n693(x)
+ if (x < 1)
+ fun_l20_n622(x)
+ else
+ fun_l20_n738(x)
+ end
+end
+
+def fun_l19_n694(x)
+ if (x < 1)
+ fun_l20_n530(x)
+ else
+ fun_l20_n981(x)
+ end
+end
+
+def fun_l19_n695(x)
+ if (x < 1)
+ fun_l20_n568(x)
+ else
+ fun_l20_n934(x)
+ end
+end
+
+def fun_l19_n696(x)
+ if (x < 1)
+ fun_l20_n974(x)
+ else
+ fun_l20_n585(x)
+ end
+end
+
+def fun_l19_n697(x)
+ if (x < 1)
+ fun_l20_n780(x)
+ else
+ fun_l20_n408(x)
+ end
+end
+
+def fun_l19_n698(x)
+ if (x < 1)
+ fun_l20_n373(x)
+ else
+ fun_l20_n163(x)
+ end
+end
+
+def fun_l19_n699(x)
+ if (x < 1)
+ fun_l20_n745(x)
+ else
+ fun_l20_n4(x)
+ end
+end
+
+def fun_l19_n700(x)
+ if (x < 1)
+ fun_l20_n307(x)
+ else
+ fun_l20_n172(x)
+ end
+end
+
+def fun_l19_n701(x)
+ if (x < 1)
+ fun_l20_n342(x)
+ else
+ fun_l20_n381(x)
+ end
+end
+
+def fun_l19_n702(x)
+ if (x < 1)
+ fun_l20_n67(x)
+ else
+ fun_l20_n841(x)
+ end
+end
+
+def fun_l19_n703(x)
+ if (x < 1)
+ fun_l20_n697(x)
+ else
+ fun_l20_n597(x)
+ end
+end
+
+def fun_l19_n704(x)
+ if (x < 1)
+ fun_l20_n809(x)
+ else
+ fun_l20_n306(x)
+ end
+end
+
+def fun_l19_n705(x)
+ if (x < 1)
+ fun_l20_n575(x)
+ else
+ fun_l20_n401(x)
+ end
+end
+
+def fun_l19_n706(x)
+ if (x < 1)
+ fun_l20_n651(x)
+ else
+ fun_l20_n552(x)
+ end
+end
+
+def fun_l19_n707(x)
+ if (x < 1)
+ fun_l20_n644(x)
+ else
+ fun_l20_n697(x)
+ end
+end
+
+def fun_l19_n708(x)
+ if (x < 1)
+ fun_l20_n572(x)
+ else
+ fun_l20_n86(x)
+ end
+end
+
+def fun_l19_n709(x)
+ if (x < 1)
+ fun_l20_n239(x)
+ else
+ fun_l20_n18(x)
+ end
+end
+
+def fun_l19_n710(x)
+ if (x < 1)
+ fun_l20_n48(x)
+ else
+ fun_l20_n822(x)
+ end
+end
+
+def fun_l19_n711(x)
+ if (x < 1)
+ fun_l20_n126(x)
+ else
+ fun_l20_n186(x)
+ end
+end
+
+def fun_l19_n712(x)
+ if (x < 1)
+ fun_l20_n552(x)
+ else
+ fun_l20_n901(x)
+ end
+end
+
+def fun_l19_n713(x)
+ if (x < 1)
+ fun_l20_n993(x)
+ else
+ fun_l20_n313(x)
+ end
+end
+
+def fun_l19_n714(x)
+ if (x < 1)
+ fun_l20_n918(x)
+ else
+ fun_l20_n718(x)
+ end
+end
+
+def fun_l19_n715(x)
+ if (x < 1)
+ fun_l20_n442(x)
+ else
+ fun_l20_n652(x)
+ end
+end
+
+def fun_l19_n716(x)
+ if (x < 1)
+ fun_l20_n624(x)
+ else
+ fun_l20_n492(x)
+ end
+end
+
+def fun_l19_n717(x)
+ if (x < 1)
+ fun_l20_n585(x)
+ else
+ fun_l20_n980(x)
+ end
+end
+
+def fun_l19_n718(x)
+ if (x < 1)
+ fun_l20_n159(x)
+ else
+ fun_l20_n327(x)
+ end
+end
+
+def fun_l19_n719(x)
+ if (x < 1)
+ fun_l20_n867(x)
+ else
+ fun_l20_n239(x)
+ end
+end
+
+def fun_l19_n720(x)
+ if (x < 1)
+ fun_l20_n551(x)
+ else
+ fun_l20_n123(x)
+ end
+end
+
+def fun_l19_n721(x)
+ if (x < 1)
+ fun_l20_n794(x)
+ else
+ fun_l20_n1(x)
+ end
+end
+
+def fun_l19_n722(x)
+ if (x < 1)
+ fun_l20_n193(x)
+ else
+ fun_l20_n847(x)
+ end
+end
+
+def fun_l19_n723(x)
+ if (x < 1)
+ fun_l20_n560(x)
+ else
+ fun_l20_n163(x)
+ end
+end
+
+def fun_l19_n724(x)
+ if (x < 1)
+ fun_l20_n338(x)
+ else
+ fun_l20_n411(x)
+ end
+end
+
+def fun_l19_n725(x)
+ if (x < 1)
+ fun_l20_n227(x)
+ else
+ fun_l20_n437(x)
+ end
+end
+
+def fun_l19_n726(x)
+ if (x < 1)
+ fun_l20_n691(x)
+ else
+ fun_l20_n821(x)
+ end
+end
+
+def fun_l19_n727(x)
+ if (x < 1)
+ fun_l20_n578(x)
+ else
+ fun_l20_n589(x)
+ end
+end
+
+def fun_l19_n728(x)
+ if (x < 1)
+ fun_l20_n990(x)
+ else
+ fun_l20_n164(x)
+ end
+end
+
+def fun_l19_n729(x)
+ if (x < 1)
+ fun_l20_n620(x)
+ else
+ fun_l20_n736(x)
+ end
+end
+
+def fun_l19_n730(x)
+ if (x < 1)
+ fun_l20_n980(x)
+ else
+ fun_l20_n345(x)
+ end
+end
+
+def fun_l19_n731(x)
+ if (x < 1)
+ fun_l20_n302(x)
+ else
+ fun_l20_n75(x)
+ end
+end
+
+def fun_l19_n732(x)
+ if (x < 1)
+ fun_l20_n684(x)
+ else
+ fun_l20_n2(x)
+ end
+end
+
+def fun_l19_n733(x)
+ if (x < 1)
+ fun_l20_n11(x)
+ else
+ fun_l20_n503(x)
+ end
+end
+
+def fun_l19_n734(x)
+ if (x < 1)
+ fun_l20_n719(x)
+ else
+ fun_l20_n745(x)
+ end
+end
+
+def fun_l19_n735(x)
+ if (x < 1)
+ fun_l20_n74(x)
+ else
+ fun_l20_n413(x)
+ end
+end
+
+def fun_l19_n736(x)
+ if (x < 1)
+ fun_l20_n858(x)
+ else
+ fun_l20_n224(x)
+ end
+end
+
+def fun_l19_n737(x)
+ if (x < 1)
+ fun_l20_n372(x)
+ else
+ fun_l20_n1(x)
+ end
+end
+
+def fun_l19_n738(x)
+ if (x < 1)
+ fun_l20_n274(x)
+ else
+ fun_l20_n967(x)
+ end
+end
+
+def fun_l19_n739(x)
+ if (x < 1)
+ fun_l20_n191(x)
+ else
+ fun_l20_n984(x)
+ end
+end
+
+def fun_l19_n740(x)
+ if (x < 1)
+ fun_l20_n646(x)
+ else
+ fun_l20_n279(x)
+ end
+end
+
+def fun_l19_n741(x)
+ if (x < 1)
+ fun_l20_n55(x)
+ else
+ fun_l20_n947(x)
+ end
+end
+
+def fun_l19_n742(x)
+ if (x < 1)
+ fun_l20_n306(x)
+ else
+ fun_l20_n798(x)
+ end
+end
+
+def fun_l19_n743(x)
+ if (x < 1)
+ fun_l20_n571(x)
+ else
+ fun_l20_n905(x)
+ end
+end
+
+def fun_l19_n744(x)
+ if (x < 1)
+ fun_l20_n270(x)
+ else
+ fun_l20_n290(x)
+ end
+end
+
+def fun_l19_n745(x)
+ if (x < 1)
+ fun_l20_n39(x)
+ else
+ fun_l20_n983(x)
+ end
+end
+
+def fun_l19_n746(x)
+ if (x < 1)
+ fun_l20_n405(x)
+ else
+ fun_l20_n727(x)
+ end
+end
+
+def fun_l19_n747(x)
+ if (x < 1)
+ fun_l20_n424(x)
+ else
+ fun_l20_n597(x)
+ end
+end
+
+def fun_l19_n748(x)
+ if (x < 1)
+ fun_l20_n602(x)
+ else
+ fun_l20_n467(x)
+ end
+end
+
+def fun_l19_n749(x)
+ if (x < 1)
+ fun_l20_n859(x)
+ else
+ fun_l20_n76(x)
+ end
+end
+
+def fun_l19_n750(x)
+ if (x < 1)
+ fun_l20_n201(x)
+ else
+ fun_l20_n948(x)
+ end
+end
+
+def fun_l19_n751(x)
+ if (x < 1)
+ fun_l20_n998(x)
+ else
+ fun_l20_n425(x)
+ end
+end
+
+def fun_l19_n752(x)
+ if (x < 1)
+ fun_l20_n352(x)
+ else
+ fun_l20_n762(x)
+ end
+end
+
+def fun_l19_n753(x)
+ if (x < 1)
+ fun_l20_n996(x)
+ else
+ fun_l20_n136(x)
+ end
+end
+
+def fun_l19_n754(x)
+ if (x < 1)
+ fun_l20_n462(x)
+ else
+ fun_l20_n544(x)
+ end
+end
+
+def fun_l19_n755(x)
+ if (x < 1)
+ fun_l20_n126(x)
+ else
+ fun_l20_n857(x)
+ end
+end
+
+def fun_l19_n756(x)
+ if (x < 1)
+ fun_l20_n695(x)
+ else
+ fun_l20_n444(x)
+ end
+end
+
+def fun_l19_n757(x)
+ if (x < 1)
+ fun_l20_n694(x)
+ else
+ fun_l20_n718(x)
+ end
+end
+
+def fun_l19_n758(x)
+ if (x < 1)
+ fun_l20_n308(x)
+ else
+ fun_l20_n867(x)
+ end
+end
+
+def fun_l19_n759(x)
+ if (x < 1)
+ fun_l20_n224(x)
+ else
+ fun_l20_n739(x)
+ end
+end
+
+def fun_l19_n760(x)
+ if (x < 1)
+ fun_l20_n286(x)
+ else
+ fun_l20_n660(x)
+ end
+end
+
+def fun_l19_n761(x)
+ if (x < 1)
+ fun_l20_n486(x)
+ else
+ fun_l20_n614(x)
+ end
+end
+
+def fun_l19_n762(x)
+ if (x < 1)
+ fun_l20_n234(x)
+ else
+ fun_l20_n812(x)
+ end
+end
+
+def fun_l19_n763(x)
+ if (x < 1)
+ fun_l20_n663(x)
+ else
+ fun_l20_n649(x)
+ end
+end
+
+def fun_l19_n764(x)
+ if (x < 1)
+ fun_l20_n815(x)
+ else
+ fun_l20_n436(x)
+ end
+end
+
+def fun_l19_n765(x)
+ if (x < 1)
+ fun_l20_n330(x)
+ else
+ fun_l20_n350(x)
+ end
+end
+
+def fun_l19_n766(x)
+ if (x < 1)
+ fun_l20_n532(x)
+ else
+ fun_l20_n676(x)
+ end
+end
+
+def fun_l19_n767(x)
+ if (x < 1)
+ fun_l20_n74(x)
+ else
+ fun_l20_n182(x)
+ end
+end
+
+def fun_l19_n768(x)
+ if (x < 1)
+ fun_l20_n432(x)
+ else
+ fun_l20_n912(x)
+ end
+end
+
+def fun_l19_n769(x)
+ if (x < 1)
+ fun_l20_n413(x)
+ else
+ fun_l20_n315(x)
+ end
+end
+
+def fun_l19_n770(x)
+ if (x < 1)
+ fun_l20_n457(x)
+ else
+ fun_l20_n917(x)
+ end
+end
+
+def fun_l19_n771(x)
+ if (x < 1)
+ fun_l20_n435(x)
+ else
+ fun_l20_n768(x)
+ end
+end
+
+def fun_l19_n772(x)
+ if (x < 1)
+ fun_l20_n994(x)
+ else
+ fun_l20_n865(x)
+ end
+end
+
+def fun_l19_n773(x)
+ if (x < 1)
+ fun_l20_n425(x)
+ else
+ fun_l20_n347(x)
+ end
+end
+
+def fun_l19_n774(x)
+ if (x < 1)
+ fun_l20_n405(x)
+ else
+ fun_l20_n1(x)
+ end
+end
+
+def fun_l19_n775(x)
+ if (x < 1)
+ fun_l20_n460(x)
+ else
+ fun_l20_n417(x)
+ end
+end
+
+def fun_l19_n776(x)
+ if (x < 1)
+ fun_l20_n539(x)
+ else
+ fun_l20_n825(x)
+ end
+end
+
+def fun_l19_n777(x)
+ if (x < 1)
+ fun_l20_n180(x)
+ else
+ fun_l20_n613(x)
+ end
+end
+
+def fun_l19_n778(x)
+ if (x < 1)
+ fun_l20_n452(x)
+ else
+ fun_l20_n717(x)
+ end
+end
+
+def fun_l19_n779(x)
+ if (x < 1)
+ fun_l20_n265(x)
+ else
+ fun_l20_n802(x)
+ end
+end
+
+def fun_l19_n780(x)
+ if (x < 1)
+ fun_l20_n941(x)
+ else
+ fun_l20_n939(x)
+ end
+end
+
+def fun_l19_n781(x)
+ if (x < 1)
+ fun_l20_n777(x)
+ else
+ fun_l20_n796(x)
+ end
+end
+
+def fun_l19_n782(x)
+ if (x < 1)
+ fun_l20_n924(x)
+ else
+ fun_l20_n442(x)
+ end
+end
+
+def fun_l19_n783(x)
+ if (x < 1)
+ fun_l20_n901(x)
+ else
+ fun_l20_n817(x)
+ end
+end
+
+def fun_l19_n784(x)
+ if (x < 1)
+ fun_l20_n101(x)
+ else
+ fun_l20_n983(x)
+ end
+end
+
+def fun_l19_n785(x)
+ if (x < 1)
+ fun_l20_n992(x)
+ else
+ fun_l20_n790(x)
+ end
+end
+
+def fun_l19_n786(x)
+ if (x < 1)
+ fun_l20_n426(x)
+ else
+ fun_l20_n337(x)
+ end
+end
+
+def fun_l19_n787(x)
+ if (x < 1)
+ fun_l20_n812(x)
+ else
+ fun_l20_n7(x)
+ end
+end
+
+def fun_l19_n788(x)
+ if (x < 1)
+ fun_l20_n768(x)
+ else
+ fun_l20_n25(x)
+ end
+end
+
+def fun_l19_n789(x)
+ if (x < 1)
+ fun_l20_n292(x)
+ else
+ fun_l20_n440(x)
+ end
+end
+
+def fun_l19_n790(x)
+ if (x < 1)
+ fun_l20_n855(x)
+ else
+ fun_l20_n191(x)
+ end
+end
+
+def fun_l19_n791(x)
+ if (x < 1)
+ fun_l20_n32(x)
+ else
+ fun_l20_n855(x)
+ end
+end
+
+def fun_l19_n792(x)
+ if (x < 1)
+ fun_l20_n920(x)
+ else
+ fun_l20_n198(x)
+ end
+end
+
+def fun_l19_n793(x)
+ if (x < 1)
+ fun_l20_n411(x)
+ else
+ fun_l20_n396(x)
+ end
+end
+
+def fun_l19_n794(x)
+ if (x < 1)
+ fun_l20_n977(x)
+ else
+ fun_l20_n712(x)
+ end
+end
+
+def fun_l19_n795(x)
+ if (x < 1)
+ fun_l20_n636(x)
+ else
+ fun_l20_n66(x)
+ end
+end
+
+def fun_l19_n796(x)
+ if (x < 1)
+ fun_l20_n137(x)
+ else
+ fun_l20_n656(x)
+ end
+end
+
+def fun_l19_n797(x)
+ if (x < 1)
+ fun_l20_n51(x)
+ else
+ fun_l20_n244(x)
+ end
+end
+
+def fun_l19_n798(x)
+ if (x < 1)
+ fun_l20_n426(x)
+ else
+ fun_l20_n418(x)
+ end
+end
+
+def fun_l19_n799(x)
+ if (x < 1)
+ fun_l20_n272(x)
+ else
+ fun_l20_n365(x)
+ end
+end
+
+def fun_l19_n800(x)
+ if (x < 1)
+ fun_l20_n361(x)
+ else
+ fun_l20_n952(x)
+ end
+end
+
+def fun_l19_n801(x)
+ if (x < 1)
+ fun_l20_n428(x)
+ else
+ fun_l20_n683(x)
+ end
+end
+
+def fun_l19_n802(x)
+ if (x < 1)
+ fun_l20_n54(x)
+ else
+ fun_l20_n86(x)
+ end
+end
+
+def fun_l19_n803(x)
+ if (x < 1)
+ fun_l20_n771(x)
+ else
+ fun_l20_n555(x)
+ end
+end
+
+def fun_l19_n804(x)
+ if (x < 1)
+ fun_l20_n498(x)
+ else
+ fun_l20_n744(x)
+ end
+end
+
+def fun_l19_n805(x)
+ if (x < 1)
+ fun_l20_n30(x)
+ else
+ fun_l20_n813(x)
+ end
+end
+
+def fun_l19_n806(x)
+ if (x < 1)
+ fun_l20_n96(x)
+ else
+ fun_l20_n295(x)
+ end
+end
+
+def fun_l19_n807(x)
+ if (x < 1)
+ fun_l20_n128(x)
+ else
+ fun_l20_n584(x)
+ end
+end
+
+def fun_l19_n808(x)
+ if (x < 1)
+ fun_l20_n818(x)
+ else
+ fun_l20_n396(x)
+ end
+end
+
+def fun_l19_n809(x)
+ if (x < 1)
+ fun_l20_n896(x)
+ else
+ fun_l20_n779(x)
+ end
+end
+
+def fun_l19_n810(x)
+ if (x < 1)
+ fun_l20_n40(x)
+ else
+ fun_l20_n638(x)
+ end
+end
+
+def fun_l19_n811(x)
+ if (x < 1)
+ fun_l20_n925(x)
+ else
+ fun_l20_n914(x)
+ end
+end
+
+def fun_l19_n812(x)
+ if (x < 1)
+ fun_l20_n217(x)
+ else
+ fun_l20_n833(x)
+ end
+end
+
+def fun_l19_n813(x)
+ if (x < 1)
+ fun_l20_n687(x)
+ else
+ fun_l20_n469(x)
+ end
+end
+
+def fun_l19_n814(x)
+ if (x < 1)
+ fun_l20_n709(x)
+ else
+ fun_l20_n196(x)
+ end
+end
+
+def fun_l19_n815(x)
+ if (x < 1)
+ fun_l20_n633(x)
+ else
+ fun_l20_n622(x)
+ end
+end
+
+def fun_l19_n816(x)
+ if (x < 1)
+ fun_l20_n976(x)
+ else
+ fun_l20_n691(x)
+ end
+end
+
+def fun_l19_n817(x)
+ if (x < 1)
+ fun_l20_n260(x)
+ else
+ fun_l20_n592(x)
+ end
+end
+
+def fun_l19_n818(x)
+ if (x < 1)
+ fun_l20_n893(x)
+ else
+ fun_l20_n353(x)
+ end
+end
+
+def fun_l19_n819(x)
+ if (x < 1)
+ fun_l20_n824(x)
+ else
+ fun_l20_n875(x)
+ end
+end
+
+def fun_l19_n820(x)
+ if (x < 1)
+ fun_l20_n605(x)
+ else
+ fun_l20_n797(x)
+ end
+end
+
+def fun_l19_n821(x)
+ if (x < 1)
+ fun_l20_n990(x)
+ else
+ fun_l20_n272(x)
+ end
+end
+
+def fun_l19_n822(x)
+ if (x < 1)
+ fun_l20_n819(x)
+ else
+ fun_l20_n313(x)
+ end
+end
+
+def fun_l19_n823(x)
+ if (x < 1)
+ fun_l20_n838(x)
+ else
+ fun_l20_n513(x)
+ end
+end
+
+def fun_l19_n824(x)
+ if (x < 1)
+ fun_l20_n332(x)
+ else
+ fun_l20_n838(x)
+ end
+end
+
+def fun_l19_n825(x)
+ if (x < 1)
+ fun_l20_n994(x)
+ else
+ fun_l20_n641(x)
+ end
+end
+
+def fun_l19_n826(x)
+ if (x < 1)
+ fun_l20_n820(x)
+ else
+ fun_l20_n17(x)
+ end
+end
+
+def fun_l19_n827(x)
+ if (x < 1)
+ fun_l20_n645(x)
+ else
+ fun_l20_n587(x)
+ end
+end
+
+def fun_l19_n828(x)
+ if (x < 1)
+ fun_l20_n352(x)
+ else
+ fun_l20_n726(x)
+ end
+end
+
+def fun_l19_n829(x)
+ if (x < 1)
+ fun_l20_n33(x)
+ else
+ fun_l20_n803(x)
+ end
+end
+
+def fun_l19_n830(x)
+ if (x < 1)
+ fun_l20_n854(x)
+ else
+ fun_l20_n468(x)
+ end
+end
+
+def fun_l19_n831(x)
+ if (x < 1)
+ fun_l20_n149(x)
+ else
+ fun_l20_n529(x)
+ end
+end
+
+def fun_l19_n832(x)
+ if (x < 1)
+ fun_l20_n442(x)
+ else
+ fun_l20_n114(x)
+ end
+end
+
+def fun_l19_n833(x)
+ if (x < 1)
+ fun_l20_n986(x)
+ else
+ fun_l20_n778(x)
+ end
+end
+
+def fun_l19_n834(x)
+ if (x < 1)
+ fun_l20_n220(x)
+ else
+ fun_l20_n782(x)
+ end
+end
+
+def fun_l19_n835(x)
+ if (x < 1)
+ fun_l20_n330(x)
+ else
+ fun_l20_n361(x)
+ end
+end
+
+def fun_l19_n836(x)
+ if (x < 1)
+ fun_l20_n805(x)
+ else
+ fun_l20_n204(x)
+ end
+end
+
+def fun_l19_n837(x)
+ if (x < 1)
+ fun_l20_n534(x)
+ else
+ fun_l20_n970(x)
+ end
+end
+
+def fun_l19_n838(x)
+ if (x < 1)
+ fun_l20_n890(x)
+ else
+ fun_l20_n526(x)
+ end
+end
+
+def fun_l19_n839(x)
+ if (x < 1)
+ fun_l20_n511(x)
+ else
+ fun_l20_n743(x)
+ end
+end
+
+def fun_l19_n840(x)
+ if (x < 1)
+ fun_l20_n730(x)
+ else
+ fun_l20_n435(x)
+ end
+end
+
+def fun_l19_n841(x)
+ if (x < 1)
+ fun_l20_n34(x)
+ else
+ fun_l20_n228(x)
+ end
+end
+
+def fun_l19_n842(x)
+ if (x < 1)
+ fun_l20_n170(x)
+ else
+ fun_l20_n162(x)
+ end
+end
+
+def fun_l19_n843(x)
+ if (x < 1)
+ fun_l20_n987(x)
+ else
+ fun_l20_n631(x)
+ end
+end
+
+def fun_l19_n844(x)
+ if (x < 1)
+ fun_l20_n193(x)
+ else
+ fun_l20_n48(x)
+ end
+end
+
+def fun_l19_n845(x)
+ if (x < 1)
+ fun_l20_n479(x)
+ else
+ fun_l20_n295(x)
+ end
+end
+
+def fun_l19_n846(x)
+ if (x < 1)
+ fun_l20_n545(x)
+ else
+ fun_l20_n474(x)
+ end
+end
+
+def fun_l19_n847(x)
+ if (x < 1)
+ fun_l20_n155(x)
+ else
+ fun_l20_n222(x)
+ end
+end
+
+def fun_l19_n848(x)
+ if (x < 1)
+ fun_l20_n641(x)
+ else
+ fun_l20_n151(x)
+ end
+end
+
+def fun_l19_n849(x)
+ if (x < 1)
+ fun_l20_n191(x)
+ else
+ fun_l20_n563(x)
+ end
+end
+
+def fun_l19_n850(x)
+ if (x < 1)
+ fun_l20_n891(x)
+ else
+ fun_l20_n247(x)
+ end
+end
+
+def fun_l19_n851(x)
+ if (x < 1)
+ fun_l20_n987(x)
+ else
+ fun_l20_n296(x)
+ end
+end
+
+def fun_l19_n852(x)
+ if (x < 1)
+ fun_l20_n86(x)
+ else
+ fun_l20_n346(x)
+ end
+end
+
+def fun_l19_n853(x)
+ if (x < 1)
+ fun_l20_n93(x)
+ else
+ fun_l20_n198(x)
+ end
+end
+
+def fun_l19_n854(x)
+ if (x < 1)
+ fun_l20_n767(x)
+ else
+ fun_l20_n759(x)
+ end
+end
+
+def fun_l19_n855(x)
+ if (x < 1)
+ fun_l20_n571(x)
+ else
+ fun_l20_n456(x)
+ end
+end
+
+def fun_l19_n856(x)
+ if (x < 1)
+ fun_l20_n722(x)
+ else
+ fun_l20_n603(x)
+ end
+end
+
+def fun_l19_n857(x)
+ if (x < 1)
+ fun_l20_n940(x)
+ else
+ fun_l20_n163(x)
+ end
+end
+
+def fun_l19_n858(x)
+ if (x < 1)
+ fun_l20_n973(x)
+ else
+ fun_l20_n598(x)
+ end
+end
+
+def fun_l19_n859(x)
+ if (x < 1)
+ fun_l20_n79(x)
+ else
+ fun_l20_n401(x)
+ end
+end
+
+def fun_l19_n860(x)
+ if (x < 1)
+ fun_l20_n234(x)
+ else
+ fun_l20_n769(x)
+ end
+end
+
+def fun_l19_n861(x)
+ if (x < 1)
+ fun_l20_n292(x)
+ else
+ fun_l20_n526(x)
+ end
+end
+
+def fun_l19_n862(x)
+ if (x < 1)
+ fun_l20_n554(x)
+ else
+ fun_l20_n468(x)
+ end
+end
+
+def fun_l19_n863(x)
+ if (x < 1)
+ fun_l20_n386(x)
+ else
+ fun_l20_n946(x)
+ end
+end
+
+def fun_l19_n864(x)
+ if (x < 1)
+ fun_l20_n227(x)
+ else
+ fun_l20_n287(x)
+ end
+end
+
+def fun_l19_n865(x)
+ if (x < 1)
+ fun_l20_n485(x)
+ else
+ fun_l20_n276(x)
+ end
+end
+
+def fun_l19_n866(x)
+ if (x < 1)
+ fun_l20_n38(x)
+ else
+ fun_l20_n329(x)
+ end
+end
+
+def fun_l19_n867(x)
+ if (x < 1)
+ fun_l20_n1(x)
+ else
+ fun_l20_n985(x)
+ end
+end
+
+def fun_l19_n868(x)
+ if (x < 1)
+ fun_l20_n13(x)
+ else
+ fun_l20_n823(x)
+ end
+end
+
+def fun_l19_n869(x)
+ if (x < 1)
+ fun_l20_n834(x)
+ else
+ fun_l20_n959(x)
+ end
+end
+
+def fun_l19_n870(x)
+ if (x < 1)
+ fun_l20_n177(x)
+ else
+ fun_l20_n232(x)
+ end
+end
+
+def fun_l19_n871(x)
+ if (x < 1)
+ fun_l20_n56(x)
+ else
+ fun_l20_n712(x)
+ end
+end
+
+def fun_l19_n872(x)
+ if (x < 1)
+ fun_l20_n69(x)
+ else
+ fun_l20_n850(x)
+ end
+end
+
+def fun_l19_n873(x)
+ if (x < 1)
+ fun_l20_n558(x)
+ else
+ fun_l20_n877(x)
+ end
+end
+
+def fun_l19_n874(x)
+ if (x < 1)
+ fun_l20_n34(x)
+ else
+ fun_l20_n540(x)
+ end
+end
+
+def fun_l19_n875(x)
+ if (x < 1)
+ fun_l20_n392(x)
+ else
+ fun_l20_n904(x)
+ end
+end
+
+def fun_l19_n876(x)
+ if (x < 1)
+ fun_l20_n99(x)
+ else
+ fun_l20_n691(x)
+ end
+end
+
+def fun_l19_n877(x)
+ if (x < 1)
+ fun_l20_n799(x)
+ else
+ fun_l20_n982(x)
+ end
+end
+
+def fun_l19_n878(x)
+ if (x < 1)
+ fun_l20_n511(x)
+ else
+ fun_l20_n869(x)
+ end
+end
+
+def fun_l19_n879(x)
+ if (x < 1)
+ fun_l20_n65(x)
+ else
+ fun_l20_n318(x)
+ end
+end
+
+def fun_l19_n880(x)
+ if (x < 1)
+ fun_l20_n335(x)
+ else
+ fun_l20_n811(x)
+ end
+end
+
+def fun_l19_n881(x)
+ if (x < 1)
+ fun_l20_n165(x)
+ else
+ fun_l20_n870(x)
+ end
+end
+
+def fun_l19_n882(x)
+ if (x < 1)
+ fun_l20_n427(x)
+ else
+ fun_l20_n597(x)
+ end
+end
+
+def fun_l19_n883(x)
+ if (x < 1)
+ fun_l20_n319(x)
+ else
+ fun_l20_n503(x)
+ end
+end
+
+def fun_l19_n884(x)
+ if (x < 1)
+ fun_l20_n57(x)
+ else
+ fun_l20_n620(x)
+ end
+end
+
+def fun_l19_n885(x)
+ if (x < 1)
+ fun_l20_n489(x)
+ else
+ fun_l20_n359(x)
+ end
+end
+
+def fun_l19_n886(x)
+ if (x < 1)
+ fun_l20_n773(x)
+ else
+ fun_l20_n719(x)
+ end
+end
+
+def fun_l19_n887(x)
+ if (x < 1)
+ fun_l20_n969(x)
+ else
+ fun_l20_n32(x)
+ end
+end
+
+def fun_l19_n888(x)
+ if (x < 1)
+ fun_l20_n758(x)
+ else
+ fun_l20_n132(x)
+ end
+end
+
+def fun_l19_n889(x)
+ if (x < 1)
+ fun_l20_n130(x)
+ else
+ fun_l20_n886(x)
+ end
+end
+
+def fun_l19_n890(x)
+ if (x < 1)
+ fun_l20_n195(x)
+ else
+ fun_l20_n258(x)
+ end
+end
+
+def fun_l19_n891(x)
+ if (x < 1)
+ fun_l20_n747(x)
+ else
+ fun_l20_n967(x)
+ end
+end
+
+def fun_l19_n892(x)
+ if (x < 1)
+ fun_l20_n403(x)
+ else
+ fun_l20_n314(x)
+ end
+end
+
+def fun_l19_n893(x)
+ if (x < 1)
+ fun_l20_n927(x)
+ else
+ fun_l20_n923(x)
+ end
+end
+
+def fun_l19_n894(x)
+ if (x < 1)
+ fun_l20_n894(x)
+ else
+ fun_l20_n318(x)
+ end
+end
+
+def fun_l19_n895(x)
+ if (x < 1)
+ fun_l20_n825(x)
+ else
+ fun_l20_n574(x)
+ end
+end
+
+def fun_l19_n896(x)
+ if (x < 1)
+ fun_l20_n436(x)
+ else
+ fun_l20_n321(x)
+ end
+end
+
+def fun_l19_n897(x)
+ if (x < 1)
+ fun_l20_n317(x)
+ else
+ fun_l20_n312(x)
+ end
+end
+
+def fun_l19_n898(x)
+ if (x < 1)
+ fun_l20_n219(x)
+ else
+ fun_l20_n362(x)
+ end
+end
+
+def fun_l19_n899(x)
+ if (x < 1)
+ fun_l20_n731(x)
+ else
+ fun_l20_n1(x)
+ end
+end
+
+def fun_l19_n900(x)
+ if (x < 1)
+ fun_l20_n804(x)
+ else
+ fun_l20_n629(x)
+ end
+end
+
+def fun_l19_n901(x)
+ if (x < 1)
+ fun_l20_n152(x)
+ else
+ fun_l20_n232(x)
+ end
+end
+
+def fun_l19_n902(x)
+ if (x < 1)
+ fun_l20_n104(x)
+ else
+ fun_l20_n579(x)
+ end
+end
+
+def fun_l19_n903(x)
+ if (x < 1)
+ fun_l20_n860(x)
+ else
+ fun_l20_n322(x)
+ end
+end
+
+def fun_l19_n904(x)
+ if (x < 1)
+ fun_l20_n55(x)
+ else
+ fun_l20_n70(x)
+ end
+end
+
+def fun_l19_n905(x)
+ if (x < 1)
+ fun_l20_n674(x)
+ else
+ fun_l20_n713(x)
+ end
+end
+
+def fun_l19_n906(x)
+ if (x < 1)
+ fun_l20_n957(x)
+ else
+ fun_l20_n962(x)
+ end
+end
+
+def fun_l19_n907(x)
+ if (x < 1)
+ fun_l20_n656(x)
+ else
+ fun_l20_n582(x)
+ end
+end
+
+def fun_l19_n908(x)
+ if (x < 1)
+ fun_l20_n3(x)
+ else
+ fun_l20_n323(x)
+ end
+end
+
+def fun_l19_n909(x)
+ if (x < 1)
+ fun_l20_n763(x)
+ else
+ fun_l20_n387(x)
+ end
+end
+
+def fun_l19_n910(x)
+ if (x < 1)
+ fun_l20_n434(x)
+ else
+ fun_l20_n113(x)
+ end
+end
+
+def fun_l19_n911(x)
+ if (x < 1)
+ fun_l20_n713(x)
+ else
+ fun_l20_n4(x)
+ end
+end
+
+def fun_l19_n912(x)
+ if (x < 1)
+ fun_l20_n313(x)
+ else
+ fun_l20_n776(x)
+ end
+end
+
+def fun_l19_n913(x)
+ if (x < 1)
+ fun_l20_n541(x)
+ else
+ fun_l20_n80(x)
+ end
+end
+
+def fun_l19_n914(x)
+ if (x < 1)
+ fun_l20_n131(x)
+ else
+ fun_l20_n982(x)
+ end
+end
+
+def fun_l19_n915(x)
+ if (x < 1)
+ fun_l20_n558(x)
+ else
+ fun_l20_n538(x)
+ end
+end
+
+def fun_l19_n916(x)
+ if (x < 1)
+ fun_l20_n715(x)
+ else
+ fun_l20_n401(x)
+ end
+end
+
+def fun_l19_n917(x)
+ if (x < 1)
+ fun_l20_n820(x)
+ else
+ fun_l20_n576(x)
+ end
+end
+
+def fun_l19_n918(x)
+ if (x < 1)
+ fun_l20_n602(x)
+ else
+ fun_l20_n158(x)
+ end
+end
+
+def fun_l19_n919(x)
+ if (x < 1)
+ fun_l20_n127(x)
+ else
+ fun_l20_n493(x)
+ end
+end
+
+def fun_l19_n920(x)
+ if (x < 1)
+ fun_l20_n719(x)
+ else
+ fun_l20_n895(x)
+ end
+end
+
+def fun_l19_n921(x)
+ if (x < 1)
+ fun_l20_n277(x)
+ else
+ fun_l20_n588(x)
+ end
+end
+
+def fun_l19_n922(x)
+ if (x < 1)
+ fun_l20_n479(x)
+ else
+ fun_l20_n799(x)
+ end
+end
+
+def fun_l19_n923(x)
+ if (x < 1)
+ fun_l20_n879(x)
+ else
+ fun_l20_n809(x)
+ end
+end
+
+def fun_l19_n924(x)
+ if (x < 1)
+ fun_l20_n574(x)
+ else
+ fun_l20_n756(x)
+ end
+end
+
+def fun_l19_n925(x)
+ if (x < 1)
+ fun_l20_n774(x)
+ else
+ fun_l20_n806(x)
+ end
+end
+
+def fun_l19_n926(x)
+ if (x < 1)
+ fun_l20_n804(x)
+ else
+ fun_l20_n87(x)
+ end
+end
+
+def fun_l19_n927(x)
+ if (x < 1)
+ fun_l20_n647(x)
+ else
+ fun_l20_n497(x)
+ end
+end
+
+def fun_l19_n928(x)
+ if (x < 1)
+ fun_l20_n134(x)
+ else
+ fun_l20_n690(x)
+ end
+end
+
+def fun_l19_n929(x)
+ if (x < 1)
+ fun_l20_n981(x)
+ else
+ fun_l20_n590(x)
+ end
+end
+
+def fun_l19_n930(x)
+ if (x < 1)
+ fun_l20_n393(x)
+ else
+ fun_l20_n585(x)
+ end
+end
+
+def fun_l19_n931(x)
+ if (x < 1)
+ fun_l20_n408(x)
+ else
+ fun_l20_n753(x)
+ end
+end
+
+def fun_l19_n932(x)
+ if (x < 1)
+ fun_l20_n133(x)
+ else
+ fun_l20_n289(x)
+ end
+end
+
+def fun_l19_n933(x)
+ if (x < 1)
+ fun_l20_n552(x)
+ else
+ fun_l20_n867(x)
+ end
+end
+
+def fun_l19_n934(x)
+ if (x < 1)
+ fun_l20_n232(x)
+ else
+ fun_l20_n134(x)
+ end
+end
+
+def fun_l19_n935(x)
+ if (x < 1)
+ fun_l20_n45(x)
+ else
+ fun_l20_n100(x)
+ end
+end
+
+def fun_l19_n936(x)
+ if (x < 1)
+ fun_l20_n263(x)
+ else
+ fun_l20_n686(x)
+ end
+end
+
+def fun_l19_n937(x)
+ if (x < 1)
+ fun_l20_n63(x)
+ else
+ fun_l20_n401(x)
+ end
+end
+
+def fun_l19_n938(x)
+ if (x < 1)
+ fun_l20_n564(x)
+ else
+ fun_l20_n265(x)
+ end
+end
+
+def fun_l19_n939(x)
+ if (x < 1)
+ fun_l20_n414(x)
+ else
+ fun_l20_n32(x)
+ end
+end
+
+def fun_l19_n940(x)
+ if (x < 1)
+ fun_l20_n686(x)
+ else
+ fun_l20_n116(x)
+ end
+end
+
+def fun_l19_n941(x)
+ if (x < 1)
+ fun_l20_n812(x)
+ else
+ fun_l20_n438(x)
+ end
+end
+
+def fun_l19_n942(x)
+ if (x < 1)
+ fun_l20_n365(x)
+ else
+ fun_l20_n95(x)
+ end
+end
+
+def fun_l19_n943(x)
+ if (x < 1)
+ fun_l20_n159(x)
+ else
+ fun_l20_n763(x)
+ end
+end
+
+def fun_l19_n944(x)
+ if (x < 1)
+ fun_l20_n844(x)
+ else
+ fun_l20_n958(x)
+ end
+end
+
+def fun_l19_n945(x)
+ if (x < 1)
+ fun_l20_n730(x)
+ else
+ fun_l20_n814(x)
+ end
+end
+
+def fun_l19_n946(x)
+ if (x < 1)
+ fun_l20_n963(x)
+ else
+ fun_l20_n2(x)
+ end
+end
+
+def fun_l19_n947(x)
+ if (x < 1)
+ fun_l20_n285(x)
+ else
+ fun_l20_n605(x)
+ end
+end
+
+def fun_l19_n948(x)
+ if (x < 1)
+ fun_l20_n869(x)
+ else
+ fun_l20_n409(x)
+ end
+end
+
+def fun_l19_n949(x)
+ if (x < 1)
+ fun_l20_n313(x)
+ else
+ fun_l20_n854(x)
+ end
+end
+
+def fun_l19_n950(x)
+ if (x < 1)
+ fun_l20_n802(x)
+ else
+ fun_l20_n411(x)
+ end
+end
+
+def fun_l19_n951(x)
+ if (x < 1)
+ fun_l20_n273(x)
+ else
+ fun_l20_n100(x)
+ end
+end
+
+def fun_l19_n952(x)
+ if (x < 1)
+ fun_l20_n283(x)
+ else
+ fun_l20_n253(x)
+ end
+end
+
+def fun_l19_n953(x)
+ if (x < 1)
+ fun_l20_n137(x)
+ else
+ fun_l20_n535(x)
+ end
+end
+
+def fun_l19_n954(x)
+ if (x < 1)
+ fun_l20_n504(x)
+ else
+ fun_l20_n849(x)
+ end
+end
+
+def fun_l19_n955(x)
+ if (x < 1)
+ fun_l20_n568(x)
+ else
+ fun_l20_n208(x)
+ end
+end
+
+def fun_l19_n956(x)
+ if (x < 1)
+ fun_l20_n775(x)
+ else
+ fun_l20_n781(x)
+ end
+end
+
+def fun_l19_n957(x)
+ if (x < 1)
+ fun_l20_n144(x)
+ else
+ fun_l20_n411(x)
+ end
+end
+
+def fun_l19_n958(x)
+ if (x < 1)
+ fun_l20_n791(x)
+ else
+ fun_l20_n720(x)
+ end
+end
+
+def fun_l19_n959(x)
+ if (x < 1)
+ fun_l20_n268(x)
+ else
+ fun_l20_n251(x)
+ end
+end
+
+def fun_l19_n960(x)
+ if (x < 1)
+ fun_l20_n661(x)
+ else
+ fun_l20_n114(x)
+ end
+end
+
+def fun_l19_n961(x)
+ if (x < 1)
+ fun_l20_n559(x)
+ else
+ fun_l20_n177(x)
+ end
+end
+
+def fun_l19_n962(x)
+ if (x < 1)
+ fun_l20_n536(x)
+ else
+ fun_l20_n671(x)
+ end
+end
+
+def fun_l19_n963(x)
+ if (x < 1)
+ fun_l20_n64(x)
+ else
+ fun_l20_n656(x)
+ end
+end
+
+def fun_l19_n964(x)
+ if (x < 1)
+ fun_l20_n618(x)
+ else
+ fun_l20_n837(x)
+ end
+end
+
+def fun_l19_n965(x)
+ if (x < 1)
+ fun_l20_n201(x)
+ else
+ fun_l20_n562(x)
+ end
+end
+
+def fun_l19_n966(x)
+ if (x < 1)
+ fun_l20_n562(x)
+ else
+ fun_l20_n632(x)
+ end
+end
+
+def fun_l19_n967(x)
+ if (x < 1)
+ fun_l20_n183(x)
+ else
+ fun_l20_n589(x)
+ end
+end
+
+def fun_l19_n968(x)
+ if (x < 1)
+ fun_l20_n971(x)
+ else
+ fun_l20_n619(x)
+ end
+end
+
+def fun_l19_n969(x)
+ if (x < 1)
+ fun_l20_n826(x)
+ else
+ fun_l20_n745(x)
+ end
+end
+
+def fun_l19_n970(x)
+ if (x < 1)
+ fun_l20_n140(x)
+ else
+ fun_l20_n370(x)
+ end
+end
+
+def fun_l19_n971(x)
+ if (x < 1)
+ fun_l20_n26(x)
+ else
+ fun_l20_n243(x)
+ end
+end
+
+def fun_l19_n972(x)
+ if (x < 1)
+ fun_l20_n375(x)
+ else
+ fun_l20_n6(x)
+ end
+end
+
+def fun_l19_n973(x)
+ if (x < 1)
+ fun_l20_n289(x)
+ else
+ fun_l20_n266(x)
+ end
+end
+
+def fun_l19_n974(x)
+ if (x < 1)
+ fun_l20_n932(x)
+ else
+ fun_l20_n602(x)
+ end
+end
+
+def fun_l19_n975(x)
+ if (x < 1)
+ fun_l20_n272(x)
+ else
+ fun_l20_n671(x)
+ end
+end
+
+def fun_l19_n976(x)
+ if (x < 1)
+ fun_l20_n653(x)
+ else
+ fun_l20_n201(x)
+ end
+end
+
+def fun_l19_n977(x)
+ if (x < 1)
+ fun_l20_n785(x)
+ else
+ fun_l20_n976(x)
+ end
+end
+
+def fun_l19_n978(x)
+ if (x < 1)
+ fun_l20_n212(x)
+ else
+ fun_l20_n601(x)
+ end
+end
+
+def fun_l19_n979(x)
+ if (x < 1)
+ fun_l20_n218(x)
+ else
+ fun_l20_n914(x)
+ end
+end
+
+def fun_l19_n980(x)
+ if (x < 1)
+ fun_l20_n109(x)
+ else
+ fun_l20_n147(x)
+ end
+end
+
+def fun_l19_n981(x)
+ if (x < 1)
+ fun_l20_n46(x)
+ else
+ fun_l20_n276(x)
+ end
+end
+
+def fun_l19_n982(x)
+ if (x < 1)
+ fun_l20_n727(x)
+ else
+ fun_l20_n545(x)
+ end
+end
+
+def fun_l19_n983(x)
+ if (x < 1)
+ fun_l20_n679(x)
+ else
+ fun_l20_n731(x)
+ end
+end
+
+def fun_l19_n984(x)
+ if (x < 1)
+ fun_l20_n291(x)
+ else
+ fun_l20_n294(x)
+ end
+end
+
+def fun_l19_n985(x)
+ if (x < 1)
+ fun_l20_n741(x)
+ else
+ fun_l20_n508(x)
+ end
+end
+
+def fun_l19_n986(x)
+ if (x < 1)
+ fun_l20_n417(x)
+ else
+ fun_l20_n169(x)
+ end
+end
+
+def fun_l19_n987(x)
+ if (x < 1)
+ fun_l20_n685(x)
+ else
+ fun_l20_n871(x)
+ end
+end
+
+def fun_l19_n988(x)
+ if (x < 1)
+ fun_l20_n386(x)
+ else
+ fun_l20_n616(x)
+ end
+end
+
+def fun_l19_n989(x)
+ if (x < 1)
+ fun_l20_n317(x)
+ else
+ fun_l20_n954(x)
+ end
+end
+
+def fun_l19_n990(x)
+ if (x < 1)
+ fun_l20_n954(x)
+ else
+ fun_l20_n974(x)
+ end
+end
+
+def fun_l19_n991(x)
+ if (x < 1)
+ fun_l20_n251(x)
+ else
+ fun_l20_n56(x)
+ end
+end
+
+def fun_l19_n992(x)
+ if (x < 1)
+ fun_l20_n775(x)
+ else
+ fun_l20_n175(x)
+ end
+end
+
+def fun_l19_n993(x)
+ if (x < 1)
+ fun_l20_n578(x)
+ else
+ fun_l20_n217(x)
+ end
+end
+
+def fun_l19_n994(x)
+ if (x < 1)
+ fun_l20_n483(x)
+ else
+ fun_l20_n279(x)
+ end
+end
+
+def fun_l19_n995(x)
+ if (x < 1)
+ fun_l20_n316(x)
+ else
+ fun_l20_n343(x)
+ end
+end
+
+def fun_l19_n996(x)
+ if (x < 1)
+ fun_l20_n618(x)
+ else
+ fun_l20_n995(x)
+ end
+end
+
+def fun_l19_n997(x)
+ if (x < 1)
+ fun_l20_n396(x)
+ else
+ fun_l20_n540(x)
+ end
+end
+
+def fun_l19_n998(x)
+ if (x < 1)
+ fun_l20_n184(x)
+ else
+ fun_l20_n380(x)
+ end
+end
+
+def fun_l19_n999(x)
+ if (x < 1)
+ fun_l20_n360(x)
+ else
+ fun_l20_n48(x)
+ end
+end
+
+def fun_l20_n0(x)
+ if (x < 1)
+ fun_l21_n609(x)
+ else
+ fun_l21_n305(x)
+ end
+end
+
+def fun_l20_n1(x)
+ if (x < 1)
+ fun_l21_n937(x)
+ else
+ fun_l21_n174(x)
+ end
+end
+
+def fun_l20_n2(x)
+ if (x < 1)
+ fun_l21_n939(x)
+ else
+ fun_l21_n174(x)
+ end
+end
+
+def fun_l20_n3(x)
+ if (x < 1)
+ fun_l21_n163(x)
+ else
+ fun_l21_n572(x)
+ end
+end
+
+def fun_l20_n4(x)
+ if (x < 1)
+ fun_l21_n43(x)
+ else
+ fun_l21_n384(x)
+ end
+end
+
+def fun_l20_n5(x)
+ if (x < 1)
+ fun_l21_n565(x)
+ else
+ fun_l21_n788(x)
+ end
+end
+
+def fun_l20_n6(x)
+ if (x < 1)
+ fun_l21_n539(x)
+ else
+ fun_l21_n806(x)
+ end
+end
+
+def fun_l20_n7(x)
+ if (x < 1)
+ fun_l21_n395(x)
+ else
+ fun_l21_n9(x)
+ end
+end
+
+def fun_l20_n8(x)
+ if (x < 1)
+ fun_l21_n231(x)
+ else
+ fun_l21_n788(x)
+ end
+end
+
+def fun_l20_n9(x)
+ if (x < 1)
+ fun_l21_n511(x)
+ else
+ fun_l21_n236(x)
+ end
+end
+
+def fun_l20_n10(x)
+ if (x < 1)
+ fun_l21_n141(x)
+ else
+ fun_l21_n34(x)
+ end
+end
+
+def fun_l20_n11(x)
+ if (x < 1)
+ fun_l21_n801(x)
+ else
+ fun_l21_n760(x)
+ end
+end
+
+def fun_l20_n12(x)
+ if (x < 1)
+ fun_l21_n627(x)
+ else
+ fun_l21_n289(x)
+ end
+end
+
+def fun_l20_n13(x)
+ if (x < 1)
+ fun_l21_n795(x)
+ else
+ fun_l21_n183(x)
+ end
+end
+
+def fun_l20_n14(x)
+ if (x < 1)
+ fun_l21_n384(x)
+ else
+ fun_l21_n3(x)
+ end
+end
+
+def fun_l20_n15(x)
+ if (x < 1)
+ fun_l21_n823(x)
+ else
+ fun_l21_n312(x)
+ end
+end
+
+def fun_l20_n16(x)
+ if (x < 1)
+ fun_l21_n727(x)
+ else
+ fun_l21_n897(x)
+ end
+end
+
+def fun_l20_n17(x)
+ if (x < 1)
+ fun_l21_n710(x)
+ else
+ fun_l21_n532(x)
+ end
+end
+
+def fun_l20_n18(x)
+ if (x < 1)
+ fun_l21_n373(x)
+ else
+ fun_l21_n807(x)
+ end
+end
+
+def fun_l20_n19(x)
+ if (x < 1)
+ fun_l21_n164(x)
+ else
+ fun_l21_n472(x)
+ end
+end
+
+def fun_l20_n20(x)
+ if (x < 1)
+ fun_l21_n522(x)
+ else
+ fun_l21_n264(x)
+ end
+end
+
+def fun_l20_n21(x)
+ if (x < 1)
+ fun_l21_n122(x)
+ else
+ fun_l21_n897(x)
+ end
+end
+
+def fun_l20_n22(x)
+ if (x < 1)
+ fun_l21_n292(x)
+ else
+ fun_l21_n873(x)
+ end
+end
+
+def fun_l20_n23(x)
+ if (x < 1)
+ fun_l21_n461(x)
+ else
+ fun_l21_n681(x)
+ end
+end
+
+def fun_l20_n24(x)
+ if (x < 1)
+ fun_l21_n80(x)
+ else
+ fun_l21_n484(x)
+ end
+end
+
+def fun_l20_n25(x)
+ if (x < 1)
+ fun_l21_n7(x)
+ else
+ fun_l21_n444(x)
+ end
+end
+
+def fun_l20_n26(x)
+ if (x < 1)
+ fun_l21_n269(x)
+ else
+ fun_l21_n58(x)
+ end
+end
+
+def fun_l20_n27(x)
+ if (x < 1)
+ fun_l21_n318(x)
+ else
+ fun_l21_n224(x)
+ end
+end
+
+def fun_l20_n28(x)
+ if (x < 1)
+ fun_l21_n437(x)
+ else
+ fun_l21_n621(x)
+ end
+end
+
+def fun_l20_n29(x)
+ if (x < 1)
+ fun_l21_n907(x)
+ else
+ fun_l21_n32(x)
+ end
+end
+
+def fun_l20_n30(x)
+ if (x < 1)
+ fun_l21_n525(x)
+ else
+ fun_l21_n10(x)
+ end
+end
+
+def fun_l20_n31(x)
+ if (x < 1)
+ fun_l21_n278(x)
+ else
+ fun_l21_n243(x)
+ end
+end
+
+def fun_l20_n32(x)
+ if (x < 1)
+ fun_l21_n865(x)
+ else
+ fun_l21_n236(x)
+ end
+end
+
+def fun_l20_n33(x)
+ if (x < 1)
+ fun_l21_n732(x)
+ else
+ fun_l21_n472(x)
+ end
+end
+
+def fun_l20_n34(x)
+ if (x < 1)
+ fun_l21_n331(x)
+ else
+ fun_l21_n162(x)
+ end
+end
+
+def fun_l20_n35(x)
+ if (x < 1)
+ fun_l21_n217(x)
+ else
+ fun_l21_n877(x)
+ end
+end
+
+def fun_l20_n36(x)
+ if (x < 1)
+ fun_l21_n125(x)
+ else
+ fun_l21_n683(x)
+ end
+end
+
+def fun_l20_n37(x)
+ if (x < 1)
+ fun_l21_n236(x)
+ else
+ fun_l21_n79(x)
+ end
+end
+
+def fun_l20_n38(x)
+ if (x < 1)
+ fun_l21_n308(x)
+ else
+ fun_l21_n995(x)
+ end
+end
+
+def fun_l20_n39(x)
+ if (x < 1)
+ fun_l21_n923(x)
+ else
+ fun_l21_n956(x)
+ end
+end
+
+def fun_l20_n40(x)
+ if (x < 1)
+ fun_l21_n505(x)
+ else
+ fun_l21_n47(x)
+ end
+end
+
+def fun_l20_n41(x)
+ if (x < 1)
+ fun_l21_n24(x)
+ else
+ fun_l21_n894(x)
+ end
+end
+
+def fun_l20_n42(x)
+ if (x < 1)
+ fun_l21_n824(x)
+ else
+ fun_l21_n106(x)
+ end
+end
+
+def fun_l20_n43(x)
+ if (x < 1)
+ fun_l21_n898(x)
+ else
+ fun_l21_n576(x)
+ end
+end
+
+def fun_l20_n44(x)
+ if (x < 1)
+ fun_l21_n231(x)
+ else
+ fun_l21_n689(x)
+ end
+end
+
+def fun_l20_n45(x)
+ if (x < 1)
+ fun_l21_n340(x)
+ else
+ fun_l21_n887(x)
+ end
+end
+
+def fun_l20_n46(x)
+ if (x < 1)
+ fun_l21_n157(x)
+ else
+ fun_l21_n551(x)
+ end
+end
+
+def fun_l20_n47(x)
+ if (x < 1)
+ fun_l21_n904(x)
+ else
+ fun_l21_n975(x)
+ end
+end
+
+def fun_l20_n48(x)
+ if (x < 1)
+ fun_l21_n392(x)
+ else
+ fun_l21_n882(x)
+ end
+end
+
+def fun_l20_n49(x)
+ if (x < 1)
+ fun_l21_n484(x)
+ else
+ fun_l21_n810(x)
+ end
+end
+
+def fun_l20_n50(x)
+ if (x < 1)
+ fun_l21_n517(x)
+ else
+ fun_l21_n434(x)
+ end
+end
+
+def fun_l20_n51(x)
+ if (x < 1)
+ fun_l21_n115(x)
+ else
+ fun_l21_n975(x)
+ end
+end
+
+def fun_l20_n52(x)
+ if (x < 1)
+ fun_l21_n633(x)
+ else
+ fun_l21_n799(x)
+ end
+end
+
+def fun_l20_n53(x)
+ if (x < 1)
+ fun_l21_n938(x)
+ else
+ fun_l21_n321(x)
+ end
+end
+
+def fun_l20_n54(x)
+ if (x < 1)
+ fun_l21_n98(x)
+ else
+ fun_l21_n343(x)
+ end
+end
+
+def fun_l20_n55(x)
+ if (x < 1)
+ fun_l21_n851(x)
+ else
+ fun_l21_n794(x)
+ end
+end
+
+def fun_l20_n56(x)
+ if (x < 1)
+ fun_l21_n119(x)
+ else
+ fun_l21_n649(x)
+ end
+end
+
+def fun_l20_n57(x)
+ if (x < 1)
+ fun_l21_n799(x)
+ else
+ fun_l21_n397(x)
+ end
+end
+
+def fun_l20_n58(x)
+ if (x < 1)
+ fun_l21_n429(x)
+ else
+ fun_l21_n781(x)
+ end
+end
+
+def fun_l20_n59(x)
+ if (x < 1)
+ fun_l21_n862(x)
+ else
+ fun_l21_n870(x)
+ end
+end
+
+def fun_l20_n60(x)
+ if (x < 1)
+ fun_l21_n864(x)
+ else
+ fun_l21_n333(x)
+ end
+end
+
+def fun_l20_n61(x)
+ if (x < 1)
+ fun_l21_n673(x)
+ else
+ fun_l21_n481(x)
+ end
+end
+
+def fun_l20_n62(x)
+ if (x < 1)
+ fun_l21_n193(x)
+ else
+ fun_l21_n524(x)
+ end
+end
+
+def fun_l20_n63(x)
+ if (x < 1)
+ fun_l21_n976(x)
+ else
+ fun_l21_n0(x)
+ end
+end
+
+def fun_l20_n64(x)
+ if (x < 1)
+ fun_l21_n804(x)
+ else
+ fun_l21_n833(x)
+ end
+end
+
+def fun_l20_n65(x)
+ if (x < 1)
+ fun_l21_n20(x)
+ else
+ fun_l21_n285(x)
+ end
+end
+
+def fun_l20_n66(x)
+ if (x < 1)
+ fun_l21_n70(x)
+ else
+ fun_l21_n932(x)
+ end
+end
+
+def fun_l20_n67(x)
+ if (x < 1)
+ fun_l21_n213(x)
+ else
+ fun_l21_n196(x)
+ end
+end
+
+def fun_l20_n68(x)
+ if (x < 1)
+ fun_l21_n806(x)
+ else
+ fun_l21_n322(x)
+ end
+end
+
+def fun_l20_n69(x)
+ if (x < 1)
+ fun_l21_n583(x)
+ else
+ fun_l21_n62(x)
+ end
+end
+
+def fun_l20_n70(x)
+ if (x < 1)
+ fun_l21_n141(x)
+ else
+ fun_l21_n490(x)
+ end
+end
+
+def fun_l20_n71(x)
+ if (x < 1)
+ fun_l21_n995(x)
+ else
+ fun_l21_n398(x)
+ end
+end
+
+def fun_l20_n72(x)
+ if (x < 1)
+ fun_l21_n436(x)
+ else
+ fun_l21_n490(x)
+ end
+end
+
+def fun_l20_n73(x)
+ if (x < 1)
+ fun_l21_n585(x)
+ else
+ fun_l21_n275(x)
+ end
+end
+
+def fun_l20_n74(x)
+ if (x < 1)
+ fun_l21_n120(x)
+ else
+ fun_l21_n968(x)
+ end
+end
+
+def fun_l20_n75(x)
+ if (x < 1)
+ fun_l21_n562(x)
+ else
+ fun_l21_n896(x)
+ end
+end
+
+def fun_l20_n76(x)
+ if (x < 1)
+ fun_l21_n794(x)
+ else
+ fun_l21_n224(x)
+ end
+end
+
+def fun_l20_n77(x)
+ if (x < 1)
+ fun_l21_n71(x)
+ else
+ fun_l21_n870(x)
+ end
+end
+
+def fun_l20_n78(x)
+ if (x < 1)
+ fun_l21_n0(x)
+ else
+ fun_l21_n41(x)
+ end
+end
+
+def fun_l20_n79(x)
+ if (x < 1)
+ fun_l21_n325(x)
+ else
+ fun_l21_n814(x)
+ end
+end
+
+def fun_l20_n80(x)
+ if (x < 1)
+ fun_l21_n963(x)
+ else
+ fun_l21_n792(x)
+ end
+end
+
+def fun_l20_n81(x)
+ if (x < 1)
+ fun_l21_n415(x)
+ else
+ fun_l21_n200(x)
+ end
+end
+
+def fun_l20_n82(x)
+ if (x < 1)
+ fun_l21_n438(x)
+ else
+ fun_l21_n506(x)
+ end
+end
+
+def fun_l20_n83(x)
+ if (x < 1)
+ fun_l21_n283(x)
+ else
+ fun_l21_n708(x)
+ end
+end
+
+def fun_l20_n84(x)
+ if (x < 1)
+ fun_l21_n968(x)
+ else
+ fun_l21_n80(x)
+ end
+end
+
+def fun_l20_n85(x)
+ if (x < 1)
+ fun_l21_n839(x)
+ else
+ fun_l21_n808(x)
+ end
+end
+
+def fun_l20_n86(x)
+ if (x < 1)
+ fun_l21_n653(x)
+ else
+ fun_l21_n343(x)
+ end
+end
+
+def fun_l20_n87(x)
+ if (x < 1)
+ fun_l21_n580(x)
+ else
+ fun_l21_n652(x)
+ end
+end
+
+def fun_l20_n88(x)
+ if (x < 1)
+ fun_l21_n64(x)
+ else
+ fun_l21_n899(x)
+ end
+end
+
+def fun_l20_n89(x)
+ if (x < 1)
+ fun_l21_n325(x)
+ else
+ fun_l21_n645(x)
+ end
+end
+
+def fun_l20_n90(x)
+ if (x < 1)
+ fun_l21_n251(x)
+ else
+ fun_l21_n210(x)
+ end
+end
+
+def fun_l20_n91(x)
+ if (x < 1)
+ fun_l21_n943(x)
+ else
+ fun_l21_n451(x)
+ end
+end
+
+def fun_l20_n92(x)
+ if (x < 1)
+ fun_l21_n95(x)
+ else
+ fun_l21_n937(x)
+ end
+end
+
+def fun_l20_n93(x)
+ if (x < 1)
+ fun_l21_n263(x)
+ else
+ fun_l21_n107(x)
+ end
+end
+
+def fun_l20_n94(x)
+ if (x < 1)
+ fun_l21_n438(x)
+ else
+ fun_l21_n213(x)
+ end
+end
+
+def fun_l20_n95(x)
+ if (x < 1)
+ fun_l21_n283(x)
+ else
+ fun_l21_n203(x)
+ end
+end
+
+def fun_l20_n96(x)
+ if (x < 1)
+ fun_l21_n809(x)
+ else
+ fun_l21_n154(x)
+ end
+end
+
+def fun_l20_n97(x)
+ if (x < 1)
+ fun_l21_n513(x)
+ else
+ fun_l21_n15(x)
+ end
+end
+
+def fun_l20_n98(x)
+ if (x < 1)
+ fun_l21_n854(x)
+ else
+ fun_l21_n679(x)
+ end
+end
+
+def fun_l20_n99(x)
+ if (x < 1)
+ fun_l21_n102(x)
+ else
+ fun_l21_n546(x)
+ end
+end
+
+def fun_l20_n100(x)
+ if (x < 1)
+ fun_l21_n790(x)
+ else
+ fun_l21_n143(x)
+ end
+end
+
+def fun_l20_n101(x)
+ if (x < 1)
+ fun_l21_n835(x)
+ else
+ fun_l21_n78(x)
+ end
+end
+
+def fun_l20_n102(x)
+ if (x < 1)
+ fun_l21_n96(x)
+ else
+ fun_l21_n995(x)
+ end
+end
+
+def fun_l20_n103(x)
+ if (x < 1)
+ fun_l21_n445(x)
+ else
+ fun_l21_n332(x)
+ end
+end
+
+def fun_l20_n104(x)
+ if (x < 1)
+ fun_l21_n532(x)
+ else
+ fun_l21_n509(x)
+ end
+end
+
+def fun_l20_n105(x)
+ if (x < 1)
+ fun_l21_n592(x)
+ else
+ fun_l21_n237(x)
+ end
+end
+
+def fun_l20_n106(x)
+ if (x < 1)
+ fun_l21_n837(x)
+ else
+ fun_l21_n13(x)
+ end
+end
+
+def fun_l20_n107(x)
+ if (x < 1)
+ fun_l21_n518(x)
+ else
+ fun_l21_n463(x)
+ end
+end
+
+def fun_l20_n108(x)
+ if (x < 1)
+ fun_l21_n373(x)
+ else
+ fun_l21_n597(x)
+ end
+end
+
+def fun_l20_n109(x)
+ if (x < 1)
+ fun_l21_n832(x)
+ else
+ fun_l21_n784(x)
+ end
+end
+
+def fun_l20_n110(x)
+ if (x < 1)
+ fun_l21_n408(x)
+ else
+ fun_l21_n738(x)
+ end
+end
+
+def fun_l20_n111(x)
+ if (x < 1)
+ fun_l21_n243(x)
+ else
+ fun_l21_n96(x)
+ end
+end
+
+def fun_l20_n112(x)
+ if (x < 1)
+ fun_l21_n251(x)
+ else
+ fun_l21_n151(x)
+ end
+end
+
+def fun_l20_n113(x)
+ if (x < 1)
+ fun_l21_n970(x)
+ else
+ fun_l21_n329(x)
+ end
+end
+
+def fun_l20_n114(x)
+ if (x < 1)
+ fun_l21_n691(x)
+ else
+ fun_l21_n309(x)
+ end
+end
+
+def fun_l20_n115(x)
+ if (x < 1)
+ fun_l21_n250(x)
+ else
+ fun_l21_n927(x)
+ end
+end
+
+def fun_l20_n116(x)
+ if (x < 1)
+ fun_l21_n819(x)
+ else
+ fun_l21_n49(x)
+ end
+end
+
+def fun_l20_n117(x)
+ if (x < 1)
+ fun_l21_n761(x)
+ else
+ fun_l21_n91(x)
+ end
+end
+
+def fun_l20_n118(x)
+ if (x < 1)
+ fun_l21_n170(x)
+ else
+ fun_l21_n317(x)
+ end
+end
+
+def fun_l20_n119(x)
+ if (x < 1)
+ fun_l21_n199(x)
+ else
+ fun_l21_n406(x)
+ end
+end
+
+def fun_l20_n120(x)
+ if (x < 1)
+ fun_l21_n983(x)
+ else
+ fun_l21_n742(x)
+ end
+end
+
+def fun_l20_n121(x)
+ if (x < 1)
+ fun_l21_n428(x)
+ else
+ fun_l21_n887(x)
+ end
+end
+
+def fun_l20_n122(x)
+ if (x < 1)
+ fun_l21_n369(x)
+ else
+ fun_l21_n64(x)
+ end
+end
+
+def fun_l20_n123(x)
+ if (x < 1)
+ fun_l21_n727(x)
+ else
+ fun_l21_n484(x)
+ end
+end
+
+def fun_l20_n124(x)
+ if (x < 1)
+ fun_l21_n310(x)
+ else
+ fun_l21_n198(x)
+ end
+end
+
+def fun_l20_n125(x)
+ if (x < 1)
+ fun_l21_n747(x)
+ else
+ fun_l21_n935(x)
+ end
+end
+
+def fun_l20_n126(x)
+ if (x < 1)
+ fun_l21_n389(x)
+ else
+ fun_l21_n966(x)
+ end
+end
+
+def fun_l20_n127(x)
+ if (x < 1)
+ fun_l21_n852(x)
+ else
+ fun_l21_n128(x)
+ end
+end
+
+def fun_l20_n128(x)
+ if (x < 1)
+ fun_l21_n10(x)
+ else
+ fun_l21_n376(x)
+ end
+end
+
+def fun_l20_n129(x)
+ if (x < 1)
+ fun_l21_n413(x)
+ else
+ fun_l21_n465(x)
+ end
+end
+
+def fun_l20_n130(x)
+ if (x < 1)
+ fun_l21_n536(x)
+ else
+ fun_l21_n689(x)
+ end
+end
+
+def fun_l20_n131(x)
+ if (x < 1)
+ fun_l21_n707(x)
+ else
+ fun_l21_n793(x)
+ end
+end
+
+def fun_l20_n132(x)
+ if (x < 1)
+ fun_l21_n328(x)
+ else
+ fun_l21_n56(x)
+ end
+end
+
+def fun_l20_n133(x)
+ if (x < 1)
+ fun_l21_n318(x)
+ else
+ fun_l21_n570(x)
+ end
+end
+
+def fun_l20_n134(x)
+ if (x < 1)
+ fun_l21_n656(x)
+ else
+ fun_l21_n187(x)
+ end
+end
+
+def fun_l20_n135(x)
+ if (x < 1)
+ fun_l21_n259(x)
+ else
+ fun_l21_n718(x)
+ end
+end
+
+def fun_l20_n136(x)
+ if (x < 1)
+ fun_l21_n284(x)
+ else
+ fun_l21_n167(x)
+ end
+end
+
+def fun_l20_n137(x)
+ if (x < 1)
+ fun_l21_n788(x)
+ else
+ fun_l21_n595(x)
+ end
+end
+
+def fun_l20_n138(x)
+ if (x < 1)
+ fun_l21_n431(x)
+ else
+ fun_l21_n620(x)
+ end
+end
+
+def fun_l20_n139(x)
+ if (x < 1)
+ fun_l21_n365(x)
+ else
+ fun_l21_n995(x)
+ end
+end
+
+def fun_l20_n140(x)
+ if (x < 1)
+ fun_l21_n614(x)
+ else
+ fun_l21_n79(x)
+ end
+end
+
+def fun_l20_n141(x)
+ if (x < 1)
+ fun_l21_n138(x)
+ else
+ fun_l21_n655(x)
+ end
+end
+
+def fun_l20_n142(x)
+ if (x < 1)
+ fun_l21_n155(x)
+ else
+ fun_l21_n34(x)
+ end
+end
+
+def fun_l20_n143(x)
+ if (x < 1)
+ fun_l21_n829(x)
+ else
+ fun_l21_n703(x)
+ end
+end
+
+def fun_l20_n144(x)
+ if (x < 1)
+ fun_l21_n290(x)
+ else
+ fun_l21_n279(x)
+ end
+end
+
+def fun_l20_n145(x)
+ if (x < 1)
+ fun_l21_n825(x)
+ else
+ fun_l21_n720(x)
+ end
+end
+
+def fun_l20_n146(x)
+ if (x < 1)
+ fun_l21_n678(x)
+ else
+ fun_l21_n347(x)
+ end
+end
+
+def fun_l20_n147(x)
+ if (x < 1)
+ fun_l21_n967(x)
+ else
+ fun_l21_n133(x)
+ end
+end
+
+def fun_l20_n148(x)
+ if (x < 1)
+ fun_l21_n935(x)
+ else
+ fun_l21_n438(x)
+ end
+end
+
+def fun_l20_n149(x)
+ if (x < 1)
+ fun_l21_n14(x)
+ else
+ fun_l21_n233(x)
+ end
+end
+
+def fun_l20_n150(x)
+ if (x < 1)
+ fun_l21_n42(x)
+ else
+ fun_l21_n507(x)
+ end
+end
+
+def fun_l20_n151(x)
+ if (x < 1)
+ fun_l21_n33(x)
+ else
+ fun_l21_n404(x)
+ end
+end
+
+def fun_l20_n152(x)
+ if (x < 1)
+ fun_l21_n897(x)
+ else
+ fun_l21_n972(x)
+ end
+end
+
+def fun_l20_n153(x)
+ if (x < 1)
+ fun_l21_n221(x)
+ else
+ fun_l21_n718(x)
+ end
+end
+
+def fun_l20_n154(x)
+ if (x < 1)
+ fun_l21_n737(x)
+ else
+ fun_l21_n257(x)
+ end
+end
+
+def fun_l20_n155(x)
+ if (x < 1)
+ fun_l21_n465(x)
+ else
+ fun_l21_n917(x)
+ end
+end
+
+def fun_l20_n156(x)
+ if (x < 1)
+ fun_l21_n338(x)
+ else
+ fun_l21_n673(x)
+ end
+end
+
+def fun_l20_n157(x)
+ if (x < 1)
+ fun_l21_n429(x)
+ else
+ fun_l21_n23(x)
+ end
+end
+
+def fun_l20_n158(x)
+ if (x < 1)
+ fun_l21_n826(x)
+ else
+ fun_l21_n115(x)
+ end
+end
+
+def fun_l20_n159(x)
+ if (x < 1)
+ fun_l21_n713(x)
+ else
+ fun_l21_n954(x)
+ end
+end
+
+def fun_l20_n160(x)
+ if (x < 1)
+ fun_l21_n897(x)
+ else
+ fun_l21_n46(x)
+ end
+end
+
+def fun_l20_n161(x)
+ if (x < 1)
+ fun_l21_n751(x)
+ else
+ fun_l21_n885(x)
+ end
+end
+
+def fun_l20_n162(x)
+ if (x < 1)
+ fun_l21_n935(x)
+ else
+ fun_l21_n230(x)
+ end
+end
+
+def fun_l20_n163(x)
+ if (x < 1)
+ fun_l21_n862(x)
+ else
+ fun_l21_n874(x)
+ end
+end
+
+def fun_l20_n164(x)
+ if (x < 1)
+ fun_l21_n695(x)
+ else
+ fun_l21_n707(x)
+ end
+end
+
+def fun_l20_n165(x)
+ if (x < 1)
+ fun_l21_n539(x)
+ else
+ fun_l21_n14(x)
+ end
+end
+
+def fun_l20_n166(x)
+ if (x < 1)
+ fun_l21_n139(x)
+ else
+ fun_l21_n766(x)
+ end
+end
+
+def fun_l20_n167(x)
+ if (x < 1)
+ fun_l21_n100(x)
+ else
+ fun_l21_n229(x)
+ end
+end
+
+def fun_l20_n168(x)
+ if (x < 1)
+ fun_l21_n88(x)
+ else
+ fun_l21_n642(x)
+ end
+end
+
+def fun_l20_n169(x)
+ if (x < 1)
+ fun_l21_n57(x)
+ else
+ fun_l21_n252(x)
+ end
+end
+
+def fun_l20_n170(x)
+ if (x < 1)
+ fun_l21_n470(x)
+ else
+ fun_l21_n224(x)
+ end
+end
+
+def fun_l20_n171(x)
+ if (x < 1)
+ fun_l21_n163(x)
+ else
+ fun_l21_n114(x)
+ end
+end
+
+def fun_l20_n172(x)
+ if (x < 1)
+ fun_l21_n231(x)
+ else
+ fun_l21_n405(x)
+ end
+end
+
+def fun_l20_n173(x)
+ if (x < 1)
+ fun_l21_n553(x)
+ else
+ fun_l21_n758(x)
+ end
+end
+
+def fun_l20_n174(x)
+ if (x < 1)
+ fun_l21_n874(x)
+ else
+ fun_l21_n43(x)
+ end
+end
+
+def fun_l20_n175(x)
+ if (x < 1)
+ fun_l21_n911(x)
+ else
+ fun_l21_n644(x)
+ end
+end
+
+def fun_l20_n176(x)
+ if (x < 1)
+ fun_l21_n747(x)
+ else
+ fun_l21_n900(x)
+ end
+end
+
+def fun_l20_n177(x)
+ if (x < 1)
+ fun_l21_n956(x)
+ else
+ fun_l21_n152(x)
+ end
+end
+
+def fun_l20_n178(x)
+ if (x < 1)
+ fun_l21_n226(x)
+ else
+ fun_l21_n654(x)
+ end
+end
+
+def fun_l20_n179(x)
+ if (x < 1)
+ fun_l21_n284(x)
+ else
+ fun_l21_n968(x)
+ end
+end
+
+def fun_l20_n180(x)
+ if (x < 1)
+ fun_l21_n181(x)
+ else
+ fun_l21_n690(x)
+ end
+end
+
+def fun_l20_n181(x)
+ if (x < 1)
+ fun_l21_n35(x)
+ else
+ fun_l21_n500(x)
+ end
+end
+
+def fun_l20_n182(x)
+ if (x < 1)
+ fun_l21_n212(x)
+ else
+ fun_l21_n559(x)
+ end
+end
+
+def fun_l20_n183(x)
+ if (x < 1)
+ fun_l21_n981(x)
+ else
+ fun_l21_n605(x)
+ end
+end
+
+def fun_l20_n184(x)
+ if (x < 1)
+ fun_l21_n447(x)
+ else
+ fun_l21_n718(x)
+ end
+end
+
+def fun_l20_n185(x)
+ if (x < 1)
+ fun_l21_n272(x)
+ else
+ fun_l21_n341(x)
+ end
+end
+
+def fun_l20_n186(x)
+ if (x < 1)
+ fun_l21_n5(x)
+ else
+ fun_l21_n426(x)
+ end
+end
+
+def fun_l20_n187(x)
+ if (x < 1)
+ fun_l21_n630(x)
+ else
+ fun_l21_n62(x)
+ end
+end
+
+def fun_l20_n188(x)
+ if (x < 1)
+ fun_l21_n600(x)
+ else
+ fun_l21_n674(x)
+ end
+end
+
+def fun_l20_n189(x)
+ if (x < 1)
+ fun_l21_n645(x)
+ else
+ fun_l21_n936(x)
+ end
+end
+
+def fun_l20_n190(x)
+ if (x < 1)
+ fun_l21_n15(x)
+ else
+ fun_l21_n158(x)
+ end
+end
+
+def fun_l20_n191(x)
+ if (x < 1)
+ fun_l21_n789(x)
+ else
+ fun_l21_n103(x)
+ end
+end
+
+def fun_l20_n192(x)
+ if (x < 1)
+ fun_l21_n501(x)
+ else
+ fun_l21_n655(x)
+ end
+end
+
+def fun_l20_n193(x)
+ if (x < 1)
+ fun_l21_n242(x)
+ else
+ fun_l21_n241(x)
+ end
+end
+
+def fun_l20_n194(x)
+ if (x < 1)
+ fun_l21_n296(x)
+ else
+ fun_l21_n442(x)
+ end
+end
+
+def fun_l20_n195(x)
+ if (x < 1)
+ fun_l21_n288(x)
+ else
+ fun_l21_n165(x)
+ end
+end
+
+def fun_l20_n196(x)
+ if (x < 1)
+ fun_l21_n336(x)
+ else
+ fun_l21_n328(x)
+ end
+end
+
+def fun_l20_n197(x)
+ if (x < 1)
+ fun_l21_n423(x)
+ else
+ fun_l21_n906(x)
+ end
+end
+
+def fun_l20_n198(x)
+ if (x < 1)
+ fun_l21_n875(x)
+ else
+ fun_l21_n801(x)
+ end
+end
+
+def fun_l20_n199(x)
+ if (x < 1)
+ fun_l21_n864(x)
+ else
+ fun_l21_n594(x)
+ end
+end
+
+def fun_l20_n200(x)
+ if (x < 1)
+ fun_l21_n145(x)
+ else
+ fun_l21_n728(x)
+ end
+end
+
+def fun_l20_n201(x)
+ if (x < 1)
+ fun_l21_n941(x)
+ else
+ fun_l21_n592(x)
+ end
+end
+
+def fun_l20_n202(x)
+ if (x < 1)
+ fun_l21_n458(x)
+ else
+ fun_l21_n839(x)
+ end
+end
+
+def fun_l20_n203(x)
+ if (x < 1)
+ fun_l21_n352(x)
+ else
+ fun_l21_n319(x)
+ end
+end
+
+def fun_l20_n204(x)
+ if (x < 1)
+ fun_l21_n453(x)
+ else
+ fun_l21_n944(x)
+ end
+end
+
+def fun_l20_n205(x)
+ if (x < 1)
+ fun_l21_n479(x)
+ else
+ fun_l21_n409(x)
+ end
+end
+
+def fun_l20_n206(x)
+ if (x < 1)
+ fun_l21_n72(x)
+ else
+ fun_l21_n177(x)
+ end
+end
+
+def fun_l20_n207(x)
+ if (x < 1)
+ fun_l21_n895(x)
+ else
+ fun_l21_n77(x)
+ end
+end
+
+def fun_l20_n208(x)
+ if (x < 1)
+ fun_l21_n308(x)
+ else
+ fun_l21_n181(x)
+ end
+end
+
+def fun_l20_n209(x)
+ if (x < 1)
+ fun_l21_n358(x)
+ else
+ fun_l21_n666(x)
+ end
+end
+
+def fun_l20_n210(x)
+ if (x < 1)
+ fun_l21_n275(x)
+ else
+ fun_l21_n739(x)
+ end
+end
+
+def fun_l20_n211(x)
+ if (x < 1)
+ fun_l21_n706(x)
+ else
+ fun_l21_n722(x)
+ end
+end
+
+def fun_l20_n212(x)
+ if (x < 1)
+ fun_l21_n185(x)
+ else
+ fun_l21_n893(x)
+ end
+end
+
+def fun_l20_n213(x)
+ if (x < 1)
+ fun_l21_n307(x)
+ else
+ fun_l21_n871(x)
+ end
+end
+
+def fun_l20_n214(x)
+ if (x < 1)
+ fun_l21_n365(x)
+ else
+ fun_l21_n311(x)
+ end
+end
+
+def fun_l20_n215(x)
+ if (x < 1)
+ fun_l21_n176(x)
+ else
+ fun_l21_n998(x)
+ end
+end
+
+def fun_l20_n216(x)
+ if (x < 1)
+ fun_l21_n542(x)
+ else
+ fun_l21_n248(x)
+ end
+end
+
+def fun_l20_n217(x)
+ if (x < 1)
+ fun_l21_n568(x)
+ else
+ fun_l21_n671(x)
+ end
+end
+
+def fun_l20_n218(x)
+ if (x < 1)
+ fun_l21_n704(x)
+ else
+ fun_l21_n992(x)
+ end
+end
+
+def fun_l20_n219(x)
+ if (x < 1)
+ fun_l21_n500(x)
+ else
+ fun_l21_n845(x)
+ end
+end
+
+def fun_l20_n220(x)
+ if (x < 1)
+ fun_l21_n75(x)
+ else
+ fun_l21_n365(x)
+ end
+end
+
+def fun_l20_n221(x)
+ if (x < 1)
+ fun_l21_n780(x)
+ else
+ fun_l21_n574(x)
+ end
+end
+
+def fun_l20_n222(x)
+ if (x < 1)
+ fun_l21_n778(x)
+ else
+ fun_l21_n315(x)
+ end
+end
+
+def fun_l20_n223(x)
+ if (x < 1)
+ fun_l21_n845(x)
+ else
+ fun_l21_n521(x)
+ end
+end
+
+def fun_l20_n224(x)
+ if (x < 1)
+ fun_l21_n608(x)
+ else
+ fun_l21_n762(x)
+ end
+end
+
+def fun_l20_n225(x)
+ if (x < 1)
+ fun_l21_n912(x)
+ else
+ fun_l21_n651(x)
+ end
+end
+
+def fun_l20_n226(x)
+ if (x < 1)
+ fun_l21_n337(x)
+ else
+ fun_l21_n723(x)
+ end
+end
+
+def fun_l20_n227(x)
+ if (x < 1)
+ fun_l21_n734(x)
+ else
+ fun_l21_n967(x)
+ end
+end
+
+def fun_l20_n228(x)
+ if (x < 1)
+ fun_l21_n342(x)
+ else
+ fun_l21_n611(x)
+ end
+end
+
+def fun_l20_n229(x)
+ if (x < 1)
+ fun_l21_n607(x)
+ else
+ fun_l21_n317(x)
+ end
+end
+
+def fun_l20_n230(x)
+ if (x < 1)
+ fun_l21_n478(x)
+ else
+ fun_l21_n208(x)
+ end
+end
+
+def fun_l20_n231(x)
+ if (x < 1)
+ fun_l21_n481(x)
+ else
+ fun_l21_n171(x)
+ end
+end
+
+def fun_l20_n232(x)
+ if (x < 1)
+ fun_l21_n80(x)
+ else
+ fun_l21_n810(x)
+ end
+end
+
+def fun_l20_n233(x)
+ if (x < 1)
+ fun_l21_n597(x)
+ else
+ fun_l21_n474(x)
+ end
+end
+
+def fun_l20_n234(x)
+ if (x < 1)
+ fun_l21_n997(x)
+ else
+ fun_l21_n98(x)
+ end
+end
+
+def fun_l20_n235(x)
+ if (x < 1)
+ fun_l21_n663(x)
+ else
+ fun_l21_n103(x)
+ end
+end
+
+def fun_l20_n236(x)
+ if (x < 1)
+ fun_l21_n602(x)
+ else
+ fun_l21_n421(x)
+ end
+end
+
+def fun_l20_n237(x)
+ if (x < 1)
+ fun_l21_n888(x)
+ else
+ fun_l21_n759(x)
+ end
+end
+
+def fun_l20_n238(x)
+ if (x < 1)
+ fun_l21_n21(x)
+ else
+ fun_l21_n56(x)
+ end
+end
+
+def fun_l20_n239(x)
+ if (x < 1)
+ fun_l21_n663(x)
+ else
+ fun_l21_n102(x)
+ end
+end
+
+def fun_l20_n240(x)
+ if (x < 1)
+ fun_l21_n244(x)
+ else
+ fun_l21_n507(x)
+ end
+end
+
+def fun_l20_n241(x)
+ if (x < 1)
+ fun_l21_n263(x)
+ else
+ fun_l21_n382(x)
+ end
+end
+
+def fun_l20_n242(x)
+ if (x < 1)
+ fun_l21_n639(x)
+ else
+ fun_l21_n380(x)
+ end
+end
+
+def fun_l20_n243(x)
+ if (x < 1)
+ fun_l21_n99(x)
+ else
+ fun_l21_n35(x)
+ end
+end
+
+def fun_l20_n244(x)
+ if (x < 1)
+ fun_l21_n648(x)
+ else
+ fun_l21_n266(x)
+ end
+end
+
+def fun_l20_n245(x)
+ if (x < 1)
+ fun_l21_n613(x)
+ else
+ fun_l21_n277(x)
+ end
+end
+
+def fun_l20_n246(x)
+ if (x < 1)
+ fun_l21_n886(x)
+ else
+ fun_l21_n4(x)
+ end
+end
+
+def fun_l20_n247(x)
+ if (x < 1)
+ fun_l21_n510(x)
+ else
+ fun_l21_n146(x)
+ end
+end
+
+def fun_l20_n248(x)
+ if (x < 1)
+ fun_l21_n933(x)
+ else
+ fun_l21_n765(x)
+ end
+end
+
+def fun_l20_n249(x)
+ if (x < 1)
+ fun_l21_n323(x)
+ else
+ fun_l21_n222(x)
+ end
+end
+
+def fun_l20_n250(x)
+ if (x < 1)
+ fun_l21_n708(x)
+ else
+ fun_l21_n241(x)
+ end
+end
+
+def fun_l20_n251(x)
+ if (x < 1)
+ fun_l21_n394(x)
+ else
+ fun_l21_n899(x)
+ end
+end
+
+def fun_l20_n252(x)
+ if (x < 1)
+ fun_l21_n253(x)
+ else
+ fun_l21_n221(x)
+ end
+end
+
+def fun_l20_n253(x)
+ if (x < 1)
+ fun_l21_n842(x)
+ else
+ fun_l21_n594(x)
+ end
+end
+
+def fun_l20_n254(x)
+ if (x < 1)
+ fun_l21_n325(x)
+ else
+ fun_l21_n145(x)
+ end
+end
+
+def fun_l20_n255(x)
+ if (x < 1)
+ fun_l21_n568(x)
+ else
+ fun_l21_n736(x)
+ end
+end
+
+def fun_l20_n256(x)
+ if (x < 1)
+ fun_l21_n862(x)
+ else
+ fun_l21_n388(x)
+ end
+end
+
+def fun_l20_n257(x)
+ if (x < 1)
+ fun_l21_n738(x)
+ else
+ fun_l21_n255(x)
+ end
+end
+
+def fun_l20_n258(x)
+ if (x < 1)
+ fun_l21_n704(x)
+ else
+ fun_l21_n539(x)
+ end
+end
+
+def fun_l20_n259(x)
+ if (x < 1)
+ fun_l21_n149(x)
+ else
+ fun_l21_n940(x)
+ end
+end
+
+def fun_l20_n260(x)
+ if (x < 1)
+ fun_l21_n462(x)
+ else
+ fun_l21_n840(x)
+ end
+end
+
+def fun_l20_n261(x)
+ if (x < 1)
+ fun_l21_n549(x)
+ else
+ fun_l21_n968(x)
+ end
+end
+
+def fun_l20_n262(x)
+ if (x < 1)
+ fun_l21_n290(x)
+ else
+ fun_l21_n127(x)
+ end
+end
+
+def fun_l20_n263(x)
+ if (x < 1)
+ fun_l21_n311(x)
+ else
+ fun_l21_n652(x)
+ end
+end
+
+def fun_l20_n264(x)
+ if (x < 1)
+ fun_l21_n544(x)
+ else
+ fun_l21_n521(x)
+ end
+end
+
+def fun_l20_n265(x)
+ if (x < 1)
+ fun_l21_n984(x)
+ else
+ fun_l21_n957(x)
+ end
+end
+
+def fun_l20_n266(x)
+ if (x < 1)
+ fun_l21_n10(x)
+ else
+ fun_l21_n154(x)
+ end
+end
+
+def fun_l20_n267(x)
+ if (x < 1)
+ fun_l21_n707(x)
+ else
+ fun_l21_n623(x)
+ end
+end
+
+def fun_l20_n268(x)
+ if (x < 1)
+ fun_l21_n420(x)
+ else
+ fun_l21_n31(x)
+ end
+end
+
+def fun_l20_n269(x)
+ if (x < 1)
+ fun_l21_n380(x)
+ else
+ fun_l21_n397(x)
+ end
+end
+
+def fun_l20_n270(x)
+ if (x < 1)
+ fun_l21_n95(x)
+ else
+ fun_l21_n881(x)
+ end
+end
+
+def fun_l20_n271(x)
+ if (x < 1)
+ fun_l21_n731(x)
+ else
+ fun_l21_n521(x)
+ end
+end
+
+def fun_l20_n272(x)
+ if (x < 1)
+ fun_l21_n255(x)
+ else
+ fun_l21_n412(x)
+ end
+end
+
+def fun_l20_n273(x)
+ if (x < 1)
+ fun_l21_n455(x)
+ else
+ fun_l21_n225(x)
+ end
+end
+
+def fun_l20_n274(x)
+ if (x < 1)
+ fun_l21_n223(x)
+ else
+ fun_l21_n71(x)
+ end
+end
+
+def fun_l20_n275(x)
+ if (x < 1)
+ fun_l21_n819(x)
+ else
+ fun_l21_n765(x)
+ end
+end
+
+def fun_l20_n276(x)
+ if (x < 1)
+ fun_l21_n379(x)
+ else
+ fun_l21_n892(x)
+ end
+end
+
+def fun_l20_n277(x)
+ if (x < 1)
+ fun_l21_n695(x)
+ else
+ fun_l21_n856(x)
+ end
+end
+
+def fun_l20_n278(x)
+ if (x < 1)
+ fun_l21_n217(x)
+ else
+ fun_l21_n166(x)
+ end
+end
+
+def fun_l20_n279(x)
+ if (x < 1)
+ fun_l21_n708(x)
+ else
+ fun_l21_n987(x)
+ end
+end
+
+def fun_l20_n280(x)
+ if (x < 1)
+ fun_l21_n251(x)
+ else
+ fun_l21_n144(x)
+ end
+end
+
+def fun_l20_n281(x)
+ if (x < 1)
+ fun_l21_n262(x)
+ else
+ fun_l21_n428(x)
+ end
+end
+
+def fun_l20_n282(x)
+ if (x < 1)
+ fun_l21_n439(x)
+ else
+ fun_l21_n1(x)
+ end
+end
+
+def fun_l20_n283(x)
+ if (x < 1)
+ fun_l21_n405(x)
+ else
+ fun_l21_n413(x)
+ end
+end
+
+def fun_l20_n284(x)
+ if (x < 1)
+ fun_l21_n729(x)
+ else
+ fun_l21_n61(x)
+ end
+end
+
+def fun_l20_n285(x)
+ if (x < 1)
+ fun_l21_n255(x)
+ else
+ fun_l21_n985(x)
+ end
+end
+
+def fun_l20_n286(x)
+ if (x < 1)
+ fun_l21_n348(x)
+ else
+ fun_l21_n54(x)
+ end
+end
+
+def fun_l20_n287(x)
+ if (x < 1)
+ fun_l21_n663(x)
+ else
+ fun_l21_n837(x)
+ end
+end
+
+def fun_l20_n288(x)
+ if (x < 1)
+ fun_l21_n444(x)
+ else
+ fun_l21_n767(x)
+ end
+end
+
+def fun_l20_n289(x)
+ if (x < 1)
+ fun_l21_n756(x)
+ else
+ fun_l21_n246(x)
+ end
+end
+
+def fun_l20_n290(x)
+ if (x < 1)
+ fun_l21_n0(x)
+ else
+ fun_l21_n253(x)
+ end
+end
+
+def fun_l20_n291(x)
+ if (x < 1)
+ fun_l21_n867(x)
+ else
+ fun_l21_n464(x)
+ end
+end
+
+def fun_l20_n292(x)
+ if (x < 1)
+ fun_l21_n885(x)
+ else
+ fun_l21_n588(x)
+ end
+end
+
+def fun_l20_n293(x)
+ if (x < 1)
+ fun_l21_n420(x)
+ else
+ fun_l21_n622(x)
+ end
+end
+
+def fun_l20_n294(x)
+ if (x < 1)
+ fun_l21_n411(x)
+ else
+ fun_l21_n351(x)
+ end
+end
+
+def fun_l20_n295(x)
+ if (x < 1)
+ fun_l21_n208(x)
+ else
+ fun_l21_n0(x)
+ end
+end
+
+def fun_l20_n296(x)
+ if (x < 1)
+ fun_l21_n551(x)
+ else
+ fun_l21_n68(x)
+ end
+end
+
+def fun_l20_n297(x)
+ if (x < 1)
+ fun_l21_n351(x)
+ else
+ fun_l21_n108(x)
+ end
+end
+
+def fun_l20_n298(x)
+ if (x < 1)
+ fun_l21_n134(x)
+ else
+ fun_l21_n893(x)
+ end
+end
+
+def fun_l20_n299(x)
+ if (x < 1)
+ fun_l21_n697(x)
+ else
+ fun_l21_n538(x)
+ end
+end
+
+def fun_l20_n300(x)
+ if (x < 1)
+ fun_l21_n61(x)
+ else
+ fun_l21_n641(x)
+ end
+end
+
+def fun_l20_n301(x)
+ if (x < 1)
+ fun_l21_n13(x)
+ else
+ fun_l21_n103(x)
+ end
+end
+
+def fun_l20_n302(x)
+ if (x < 1)
+ fun_l21_n260(x)
+ else
+ fun_l21_n430(x)
+ end
+end
+
+def fun_l20_n303(x)
+ if (x < 1)
+ fun_l21_n63(x)
+ else
+ fun_l21_n911(x)
+ end
+end
+
+def fun_l20_n304(x)
+ if (x < 1)
+ fun_l21_n470(x)
+ else
+ fun_l21_n407(x)
+ end
+end
+
+def fun_l20_n305(x)
+ if (x < 1)
+ fun_l21_n615(x)
+ else
+ fun_l21_n767(x)
+ end
+end
+
+def fun_l20_n306(x)
+ if (x < 1)
+ fun_l21_n898(x)
+ else
+ fun_l21_n215(x)
+ end
+end
+
+def fun_l20_n307(x)
+ if (x < 1)
+ fun_l21_n793(x)
+ else
+ fun_l21_n468(x)
+ end
+end
+
+def fun_l20_n308(x)
+ if (x < 1)
+ fun_l21_n582(x)
+ else
+ fun_l21_n968(x)
+ end
+end
+
+def fun_l20_n309(x)
+ if (x < 1)
+ fun_l21_n7(x)
+ else
+ fun_l21_n703(x)
+ end
+end
+
+def fun_l20_n310(x)
+ if (x < 1)
+ fun_l21_n826(x)
+ else
+ fun_l21_n735(x)
+ end
+end
+
+def fun_l20_n311(x)
+ if (x < 1)
+ fun_l21_n856(x)
+ else
+ fun_l21_n959(x)
+ end
+end
+
+def fun_l20_n312(x)
+ if (x < 1)
+ fun_l21_n194(x)
+ else
+ fun_l21_n158(x)
+ end
+end
+
+def fun_l20_n313(x)
+ if (x < 1)
+ fun_l21_n690(x)
+ else
+ fun_l21_n813(x)
+ end
+end
+
+def fun_l20_n314(x)
+ if (x < 1)
+ fun_l21_n699(x)
+ else
+ fun_l21_n842(x)
+ end
+end
+
+def fun_l20_n315(x)
+ if (x < 1)
+ fun_l21_n485(x)
+ else
+ fun_l21_n0(x)
+ end
+end
+
+def fun_l20_n316(x)
+ if (x < 1)
+ fun_l21_n753(x)
+ else
+ fun_l21_n306(x)
+ end
+end
+
+def fun_l20_n317(x)
+ if (x < 1)
+ fun_l21_n516(x)
+ else
+ fun_l21_n35(x)
+ end
+end
+
+def fun_l20_n318(x)
+ if (x < 1)
+ fun_l21_n78(x)
+ else
+ fun_l21_n104(x)
+ end
+end
+
+def fun_l20_n319(x)
+ if (x < 1)
+ fun_l21_n492(x)
+ else
+ fun_l21_n211(x)
+ end
+end
+
+def fun_l20_n320(x)
+ if (x < 1)
+ fun_l21_n303(x)
+ else
+ fun_l21_n218(x)
+ end
+end
+
+def fun_l20_n321(x)
+ if (x < 1)
+ fun_l21_n614(x)
+ else
+ fun_l21_n743(x)
+ end
+end
+
+def fun_l20_n322(x)
+ if (x < 1)
+ fun_l21_n141(x)
+ else
+ fun_l21_n320(x)
+ end
+end
+
+def fun_l20_n323(x)
+ if (x < 1)
+ fun_l21_n349(x)
+ else
+ fun_l21_n396(x)
+ end
+end
+
+def fun_l20_n324(x)
+ if (x < 1)
+ fun_l21_n189(x)
+ else
+ fun_l21_n32(x)
+ end
+end
+
+def fun_l20_n325(x)
+ if (x < 1)
+ fun_l21_n938(x)
+ else
+ fun_l21_n747(x)
+ end
+end
+
+def fun_l20_n326(x)
+ if (x < 1)
+ fun_l21_n571(x)
+ else
+ fun_l21_n20(x)
+ end
+end
+
+def fun_l20_n327(x)
+ if (x < 1)
+ fun_l21_n905(x)
+ else
+ fun_l21_n106(x)
+ end
+end
+
+def fun_l20_n328(x)
+ if (x < 1)
+ fun_l21_n849(x)
+ else
+ fun_l21_n747(x)
+ end
+end
+
+def fun_l20_n329(x)
+ if (x < 1)
+ fun_l21_n830(x)
+ else
+ fun_l21_n61(x)
+ end
+end
+
+def fun_l20_n330(x)
+ if (x < 1)
+ fun_l21_n613(x)
+ else
+ fun_l21_n945(x)
+ end
+end
+
+def fun_l20_n331(x)
+ if (x < 1)
+ fun_l21_n379(x)
+ else
+ fun_l21_n920(x)
+ end
+end
+
+def fun_l20_n332(x)
+ if (x < 1)
+ fun_l21_n315(x)
+ else
+ fun_l21_n968(x)
+ end
+end
+
+def fun_l20_n333(x)
+ if (x < 1)
+ fun_l21_n256(x)
+ else
+ fun_l21_n460(x)
+ end
+end
+
+def fun_l20_n334(x)
+ if (x < 1)
+ fun_l21_n644(x)
+ else
+ fun_l21_n372(x)
+ end
+end
+
+def fun_l20_n335(x)
+ if (x < 1)
+ fun_l21_n588(x)
+ else
+ fun_l21_n351(x)
+ end
+end
+
+def fun_l20_n336(x)
+ if (x < 1)
+ fun_l21_n516(x)
+ else
+ fun_l21_n975(x)
+ end
+end
+
+def fun_l20_n337(x)
+ if (x < 1)
+ fun_l21_n432(x)
+ else
+ fun_l21_n47(x)
+ end
+end
+
+def fun_l20_n338(x)
+ if (x < 1)
+ fun_l21_n31(x)
+ else
+ fun_l21_n728(x)
+ end
+end
+
+def fun_l20_n339(x)
+ if (x < 1)
+ fun_l21_n700(x)
+ else
+ fun_l21_n454(x)
+ end
+end
+
+def fun_l20_n340(x)
+ if (x < 1)
+ fun_l21_n947(x)
+ else
+ fun_l21_n880(x)
+ end
+end
+
+def fun_l20_n341(x)
+ if (x < 1)
+ fun_l21_n363(x)
+ else
+ fun_l21_n861(x)
+ end
+end
+
+def fun_l20_n342(x)
+ if (x < 1)
+ fun_l21_n338(x)
+ else
+ fun_l21_n118(x)
+ end
+end
+
+def fun_l20_n343(x)
+ if (x < 1)
+ fun_l21_n352(x)
+ else
+ fun_l21_n402(x)
+ end
+end
+
+def fun_l20_n344(x)
+ if (x < 1)
+ fun_l21_n344(x)
+ else
+ fun_l21_n407(x)
+ end
+end
+
+def fun_l20_n345(x)
+ if (x < 1)
+ fun_l21_n869(x)
+ else
+ fun_l21_n912(x)
+ end
+end
+
+def fun_l20_n346(x)
+ if (x < 1)
+ fun_l21_n397(x)
+ else
+ fun_l21_n429(x)
+ end
+end
+
+def fun_l20_n347(x)
+ if (x < 1)
+ fun_l21_n28(x)
+ else
+ fun_l21_n671(x)
+ end
+end
+
+def fun_l20_n348(x)
+ if (x < 1)
+ fun_l21_n215(x)
+ else
+ fun_l21_n821(x)
+ end
+end
+
+def fun_l20_n349(x)
+ if (x < 1)
+ fun_l21_n432(x)
+ else
+ fun_l21_n250(x)
+ end
+end
+
+def fun_l20_n350(x)
+ if (x < 1)
+ fun_l21_n496(x)
+ else
+ fun_l21_n988(x)
+ end
+end
+
+def fun_l20_n351(x)
+ if (x < 1)
+ fun_l21_n317(x)
+ else
+ fun_l21_n516(x)
+ end
+end
+
+def fun_l20_n352(x)
+ if (x < 1)
+ fun_l21_n968(x)
+ else
+ fun_l21_n638(x)
+ end
+end
+
+def fun_l20_n353(x)
+ if (x < 1)
+ fun_l21_n447(x)
+ else
+ fun_l21_n14(x)
+ end
+end
+
+def fun_l20_n354(x)
+ if (x < 1)
+ fun_l21_n151(x)
+ else
+ fun_l21_n545(x)
+ end
+end
+
+def fun_l20_n355(x)
+ if (x < 1)
+ fun_l21_n579(x)
+ else
+ fun_l21_n934(x)
+ end
+end
+
+def fun_l20_n356(x)
+ if (x < 1)
+ fun_l21_n612(x)
+ else
+ fun_l21_n433(x)
+ end
+end
+
+def fun_l20_n357(x)
+ if (x < 1)
+ fun_l21_n969(x)
+ else
+ fun_l21_n816(x)
+ end
+end
+
+def fun_l20_n358(x)
+ if (x < 1)
+ fun_l21_n24(x)
+ else
+ fun_l21_n272(x)
+ end
+end
+
+def fun_l20_n359(x)
+ if (x < 1)
+ fun_l21_n945(x)
+ else
+ fun_l21_n458(x)
+ end
+end
+
+def fun_l20_n360(x)
+ if (x < 1)
+ fun_l21_n294(x)
+ else
+ fun_l21_n934(x)
+ end
+end
+
+def fun_l20_n361(x)
+ if (x < 1)
+ fun_l21_n777(x)
+ else
+ fun_l21_n499(x)
+ end
+end
+
+def fun_l20_n362(x)
+ if (x < 1)
+ fun_l21_n538(x)
+ else
+ fun_l21_n400(x)
+ end
+end
+
+def fun_l20_n363(x)
+ if (x < 1)
+ fun_l21_n660(x)
+ else
+ fun_l21_n970(x)
+ end
+end
+
+def fun_l20_n364(x)
+ if (x < 1)
+ fun_l21_n230(x)
+ else
+ fun_l21_n977(x)
+ end
+end
+
+def fun_l20_n365(x)
+ if (x < 1)
+ fun_l21_n335(x)
+ else
+ fun_l21_n436(x)
+ end
+end
+
+def fun_l20_n366(x)
+ if (x < 1)
+ fun_l21_n596(x)
+ else
+ fun_l21_n992(x)
+ end
+end
+
+def fun_l20_n367(x)
+ if (x < 1)
+ fun_l21_n502(x)
+ else
+ fun_l21_n251(x)
+ end
+end
+
+def fun_l20_n368(x)
+ if (x < 1)
+ fun_l21_n501(x)
+ else
+ fun_l21_n493(x)
+ end
+end
+
+def fun_l20_n369(x)
+ if (x < 1)
+ fun_l21_n48(x)
+ else
+ fun_l21_n850(x)
+ end
+end
+
+def fun_l20_n370(x)
+ if (x < 1)
+ fun_l21_n900(x)
+ else
+ fun_l21_n919(x)
+ end
+end
+
+def fun_l20_n371(x)
+ if (x < 1)
+ fun_l21_n349(x)
+ else
+ fun_l21_n80(x)
+ end
+end
+
+def fun_l20_n372(x)
+ if (x < 1)
+ fun_l21_n275(x)
+ else
+ fun_l21_n135(x)
+ end
+end
+
+def fun_l20_n373(x)
+ if (x < 1)
+ fun_l21_n987(x)
+ else
+ fun_l21_n472(x)
+ end
+end
+
+def fun_l20_n374(x)
+ if (x < 1)
+ fun_l21_n877(x)
+ else
+ fun_l21_n298(x)
+ end
+end
+
+def fun_l20_n375(x)
+ if (x < 1)
+ fun_l21_n518(x)
+ else
+ fun_l21_n676(x)
+ end
+end
+
+def fun_l20_n376(x)
+ if (x < 1)
+ fun_l21_n108(x)
+ else
+ fun_l21_n470(x)
+ end
+end
+
+def fun_l20_n377(x)
+ if (x < 1)
+ fun_l21_n643(x)
+ else
+ fun_l21_n189(x)
+ end
+end
+
+def fun_l20_n378(x)
+ if (x < 1)
+ fun_l21_n608(x)
+ else
+ fun_l21_n376(x)
+ end
+end
+
+def fun_l20_n379(x)
+ if (x < 1)
+ fun_l21_n520(x)
+ else
+ fun_l21_n651(x)
+ end
+end
+
+def fun_l20_n380(x)
+ if (x < 1)
+ fun_l21_n399(x)
+ else
+ fun_l21_n867(x)
+ end
+end
+
+def fun_l20_n381(x)
+ if (x < 1)
+ fun_l21_n815(x)
+ else
+ fun_l21_n78(x)
+ end
+end
+
+def fun_l20_n382(x)
+ if (x < 1)
+ fun_l21_n216(x)
+ else
+ fun_l21_n379(x)
+ end
+end
+
+def fun_l20_n383(x)
+ if (x < 1)
+ fun_l21_n628(x)
+ else
+ fun_l21_n227(x)
+ end
+end
+
+def fun_l20_n384(x)
+ if (x < 1)
+ fun_l21_n699(x)
+ else
+ fun_l21_n170(x)
+ end
+end
+
+def fun_l20_n385(x)
+ if (x < 1)
+ fun_l21_n444(x)
+ else
+ fun_l21_n603(x)
+ end
+end
+
+def fun_l20_n386(x)
+ if (x < 1)
+ fun_l21_n299(x)
+ else
+ fun_l21_n803(x)
+ end
+end
+
+def fun_l20_n387(x)
+ if (x < 1)
+ fun_l21_n708(x)
+ else
+ fun_l21_n187(x)
+ end
+end
+
+def fun_l20_n388(x)
+ if (x < 1)
+ fun_l21_n490(x)
+ else
+ fun_l21_n75(x)
+ end
+end
+
+def fun_l20_n389(x)
+ if (x < 1)
+ fun_l21_n856(x)
+ else
+ fun_l21_n257(x)
+ end
+end
+
+def fun_l20_n390(x)
+ if (x < 1)
+ fun_l21_n394(x)
+ else
+ fun_l21_n669(x)
+ end
+end
+
+def fun_l20_n391(x)
+ if (x < 1)
+ fun_l21_n501(x)
+ else
+ fun_l21_n555(x)
+ end
+end
+
+def fun_l20_n392(x)
+ if (x < 1)
+ fun_l21_n657(x)
+ else
+ fun_l21_n226(x)
+ end
+end
+
+def fun_l20_n393(x)
+ if (x < 1)
+ fun_l21_n229(x)
+ else
+ fun_l21_n898(x)
+ end
+end
+
+def fun_l20_n394(x)
+ if (x < 1)
+ fun_l21_n726(x)
+ else
+ fun_l21_n349(x)
+ end
+end
+
+def fun_l20_n395(x)
+ if (x < 1)
+ fun_l21_n247(x)
+ else
+ fun_l21_n996(x)
+ end
+end
+
+def fun_l20_n396(x)
+ if (x < 1)
+ fun_l21_n136(x)
+ else
+ fun_l21_n601(x)
+ end
+end
+
+def fun_l20_n397(x)
+ if (x < 1)
+ fun_l21_n365(x)
+ else
+ fun_l21_n203(x)
+ end
+end
+
+def fun_l20_n398(x)
+ if (x < 1)
+ fun_l21_n376(x)
+ else
+ fun_l21_n172(x)
+ end
+end
+
+def fun_l20_n399(x)
+ if (x < 1)
+ fun_l21_n23(x)
+ else
+ fun_l21_n577(x)
+ end
+end
+
+def fun_l20_n400(x)
+ if (x < 1)
+ fun_l21_n368(x)
+ else
+ fun_l21_n448(x)
+ end
+end
+
+def fun_l20_n401(x)
+ if (x < 1)
+ fun_l21_n934(x)
+ else
+ fun_l21_n949(x)
+ end
+end
+
+def fun_l20_n402(x)
+ if (x < 1)
+ fun_l21_n127(x)
+ else
+ fun_l21_n132(x)
+ end
+end
+
+def fun_l20_n403(x)
+ if (x < 1)
+ fun_l21_n133(x)
+ else
+ fun_l21_n389(x)
+ end
+end
+
+def fun_l20_n404(x)
+ if (x < 1)
+ fun_l21_n750(x)
+ else
+ fun_l21_n591(x)
+ end
+end
+
+def fun_l20_n405(x)
+ if (x < 1)
+ fun_l21_n492(x)
+ else
+ fun_l21_n763(x)
+ end
+end
+
+def fun_l20_n406(x)
+ if (x < 1)
+ fun_l21_n137(x)
+ else
+ fun_l21_n552(x)
+ end
+end
+
+def fun_l20_n407(x)
+ if (x < 1)
+ fun_l21_n200(x)
+ else
+ fun_l21_n537(x)
+ end
+end
+
+def fun_l20_n408(x)
+ if (x < 1)
+ fun_l21_n681(x)
+ else
+ fun_l21_n645(x)
+ end
+end
+
+def fun_l20_n409(x)
+ if (x < 1)
+ fun_l21_n86(x)
+ else
+ fun_l21_n239(x)
+ end
+end
+
+def fun_l20_n410(x)
+ if (x < 1)
+ fun_l21_n357(x)
+ else
+ fun_l21_n98(x)
+ end
+end
+
+def fun_l20_n411(x)
+ if (x < 1)
+ fun_l21_n889(x)
+ else
+ fun_l21_n199(x)
+ end
+end
+
+def fun_l20_n412(x)
+ if (x < 1)
+ fun_l21_n504(x)
+ else
+ fun_l21_n950(x)
+ end
+end
+
+def fun_l20_n413(x)
+ if (x < 1)
+ fun_l21_n220(x)
+ else
+ fun_l21_n351(x)
+ end
+end
+
+def fun_l20_n414(x)
+ if (x < 1)
+ fun_l21_n287(x)
+ else
+ fun_l21_n614(x)
+ end
+end
+
+def fun_l20_n415(x)
+ if (x < 1)
+ fun_l21_n699(x)
+ else
+ fun_l21_n464(x)
+ end
+end
+
+def fun_l20_n416(x)
+ if (x < 1)
+ fun_l21_n638(x)
+ else
+ fun_l21_n10(x)
+ end
+end
+
+def fun_l20_n417(x)
+ if (x < 1)
+ fun_l21_n52(x)
+ else
+ fun_l21_n348(x)
+ end
+end
+
+def fun_l20_n418(x)
+ if (x < 1)
+ fun_l21_n248(x)
+ else
+ fun_l21_n703(x)
+ end
+end
+
+def fun_l20_n419(x)
+ if (x < 1)
+ fun_l21_n430(x)
+ else
+ fun_l21_n886(x)
+ end
+end
+
+def fun_l20_n420(x)
+ if (x < 1)
+ fun_l21_n695(x)
+ else
+ fun_l21_n528(x)
+ end
+end
+
+def fun_l20_n421(x)
+ if (x < 1)
+ fun_l21_n545(x)
+ else
+ fun_l21_n521(x)
+ end
+end
+
+def fun_l20_n422(x)
+ if (x < 1)
+ fun_l21_n66(x)
+ else
+ fun_l21_n31(x)
+ end
+end
+
+def fun_l20_n423(x)
+ if (x < 1)
+ fun_l21_n411(x)
+ else
+ fun_l21_n476(x)
+ end
+end
+
+def fun_l20_n424(x)
+ if (x < 1)
+ fun_l21_n433(x)
+ else
+ fun_l21_n940(x)
+ end
+end
+
+def fun_l20_n425(x)
+ if (x < 1)
+ fun_l21_n622(x)
+ else
+ fun_l21_n817(x)
+ end
+end
+
+def fun_l20_n426(x)
+ if (x < 1)
+ fun_l21_n516(x)
+ else
+ fun_l21_n665(x)
+ end
+end
+
+def fun_l20_n427(x)
+ if (x < 1)
+ fun_l21_n828(x)
+ else
+ fun_l21_n47(x)
+ end
+end
+
+def fun_l20_n428(x)
+ if (x < 1)
+ fun_l21_n445(x)
+ else
+ fun_l21_n94(x)
+ end
+end
+
+def fun_l20_n429(x)
+ if (x < 1)
+ fun_l21_n799(x)
+ else
+ fun_l21_n676(x)
+ end
+end
+
+def fun_l20_n430(x)
+ if (x < 1)
+ fun_l21_n518(x)
+ else
+ fun_l21_n988(x)
+ end
+end
+
+def fun_l20_n431(x)
+ if (x < 1)
+ fun_l21_n787(x)
+ else
+ fun_l21_n127(x)
+ end
+end
+
+def fun_l20_n432(x)
+ if (x < 1)
+ fun_l21_n502(x)
+ else
+ fun_l21_n719(x)
+ end
+end
+
+def fun_l20_n433(x)
+ if (x < 1)
+ fun_l21_n406(x)
+ else
+ fun_l21_n828(x)
+ end
+end
+
+def fun_l20_n434(x)
+ if (x < 1)
+ fun_l21_n845(x)
+ else
+ fun_l21_n75(x)
+ end
+end
+
+def fun_l20_n435(x)
+ if (x < 1)
+ fun_l21_n425(x)
+ else
+ fun_l21_n449(x)
+ end
+end
+
+def fun_l20_n436(x)
+ if (x < 1)
+ fun_l21_n520(x)
+ else
+ fun_l21_n68(x)
+ end
+end
+
+def fun_l20_n437(x)
+ if (x < 1)
+ fun_l21_n872(x)
+ else
+ fun_l21_n978(x)
+ end
+end
+
+def fun_l20_n438(x)
+ if (x < 1)
+ fun_l21_n522(x)
+ else
+ fun_l21_n658(x)
+ end
+end
+
+def fun_l20_n439(x)
+ if (x < 1)
+ fun_l21_n976(x)
+ else
+ fun_l21_n224(x)
+ end
+end
+
+def fun_l20_n440(x)
+ if (x < 1)
+ fun_l21_n256(x)
+ else
+ fun_l21_n700(x)
+ end
+end
+
+def fun_l20_n441(x)
+ if (x < 1)
+ fun_l21_n722(x)
+ else
+ fun_l21_n348(x)
+ end
+end
+
+def fun_l20_n442(x)
+ if (x < 1)
+ fun_l21_n377(x)
+ else
+ fun_l21_n966(x)
+ end
+end
+
+def fun_l20_n443(x)
+ if (x < 1)
+ fun_l21_n519(x)
+ else
+ fun_l21_n611(x)
+ end
+end
+
+def fun_l20_n444(x)
+ if (x < 1)
+ fun_l21_n318(x)
+ else
+ fun_l21_n937(x)
+ end
+end
+
+def fun_l20_n445(x)
+ if (x < 1)
+ fun_l21_n416(x)
+ else
+ fun_l21_n874(x)
+ end
+end
+
+def fun_l20_n446(x)
+ if (x < 1)
+ fun_l21_n157(x)
+ else
+ fun_l21_n328(x)
+ end
+end
+
+def fun_l20_n447(x)
+ if (x < 1)
+ fun_l21_n540(x)
+ else
+ fun_l21_n906(x)
+ end
+end
+
+def fun_l20_n448(x)
+ if (x < 1)
+ fun_l21_n13(x)
+ else
+ fun_l21_n325(x)
+ end
+end
+
+def fun_l20_n449(x)
+ if (x < 1)
+ fun_l21_n771(x)
+ else
+ fun_l21_n929(x)
+ end
+end
+
+def fun_l20_n450(x)
+ if (x < 1)
+ fun_l21_n770(x)
+ else
+ fun_l21_n778(x)
+ end
+end
+
+def fun_l20_n451(x)
+ if (x < 1)
+ fun_l21_n939(x)
+ else
+ fun_l21_n493(x)
+ end
+end
+
+def fun_l20_n452(x)
+ if (x < 1)
+ fun_l21_n481(x)
+ else
+ fun_l21_n407(x)
+ end
+end
+
+def fun_l20_n453(x)
+ if (x < 1)
+ fun_l21_n759(x)
+ else
+ fun_l21_n322(x)
+ end
+end
+
+def fun_l20_n454(x)
+ if (x < 1)
+ fun_l21_n703(x)
+ else
+ fun_l21_n409(x)
+ end
+end
+
+def fun_l20_n455(x)
+ if (x < 1)
+ fun_l21_n394(x)
+ else
+ fun_l21_n415(x)
+ end
+end
+
+def fun_l20_n456(x)
+ if (x < 1)
+ fun_l21_n583(x)
+ else
+ fun_l21_n188(x)
+ end
+end
+
+def fun_l20_n457(x)
+ if (x < 1)
+ fun_l21_n668(x)
+ else
+ fun_l21_n46(x)
+ end
+end
+
+def fun_l20_n458(x)
+ if (x < 1)
+ fun_l21_n855(x)
+ else
+ fun_l21_n802(x)
+ end
+end
+
+def fun_l20_n459(x)
+ if (x < 1)
+ fun_l21_n720(x)
+ else
+ fun_l21_n691(x)
+ end
+end
+
+def fun_l20_n460(x)
+ if (x < 1)
+ fun_l21_n440(x)
+ else
+ fun_l21_n353(x)
+ end
+end
+
+def fun_l20_n461(x)
+ if (x < 1)
+ fun_l21_n604(x)
+ else
+ fun_l21_n872(x)
+ end
+end
+
+def fun_l20_n462(x)
+ if (x < 1)
+ fun_l21_n355(x)
+ else
+ fun_l21_n699(x)
+ end
+end
+
+def fun_l20_n463(x)
+ if (x < 1)
+ fun_l21_n476(x)
+ else
+ fun_l21_n447(x)
+ end
+end
+
+def fun_l20_n464(x)
+ if (x < 1)
+ fun_l21_n554(x)
+ else
+ fun_l21_n745(x)
+ end
+end
+
+def fun_l20_n465(x)
+ if (x < 1)
+ fun_l21_n632(x)
+ else
+ fun_l21_n281(x)
+ end
+end
+
+def fun_l20_n466(x)
+ if (x < 1)
+ fun_l21_n873(x)
+ else
+ fun_l21_n449(x)
+ end
+end
+
+def fun_l20_n467(x)
+ if (x < 1)
+ fun_l21_n90(x)
+ else
+ fun_l21_n933(x)
+ end
+end
+
+def fun_l20_n468(x)
+ if (x < 1)
+ fun_l21_n915(x)
+ else
+ fun_l21_n801(x)
+ end
+end
+
+def fun_l20_n469(x)
+ if (x < 1)
+ fun_l21_n429(x)
+ else
+ fun_l21_n139(x)
+ end
+end
+
+def fun_l20_n470(x)
+ if (x < 1)
+ fun_l21_n858(x)
+ else
+ fun_l21_n450(x)
+ end
+end
+
+def fun_l20_n471(x)
+ if (x < 1)
+ fun_l21_n556(x)
+ else
+ fun_l21_n109(x)
+ end
+end
+
+def fun_l20_n472(x)
+ if (x < 1)
+ fun_l21_n395(x)
+ else
+ fun_l21_n129(x)
+ end
+end
+
+def fun_l20_n473(x)
+ if (x < 1)
+ fun_l21_n282(x)
+ else
+ fun_l21_n277(x)
+ end
+end
+
+def fun_l20_n474(x)
+ if (x < 1)
+ fun_l21_n90(x)
+ else
+ fun_l21_n399(x)
+ end
+end
+
+def fun_l20_n475(x)
+ if (x < 1)
+ fun_l21_n719(x)
+ else
+ fun_l21_n698(x)
+ end
+end
+
+def fun_l20_n476(x)
+ if (x < 1)
+ fun_l21_n597(x)
+ else
+ fun_l21_n210(x)
+ end
+end
+
+def fun_l20_n477(x)
+ if (x < 1)
+ fun_l21_n722(x)
+ else
+ fun_l21_n31(x)
+ end
+end
+
+def fun_l20_n478(x)
+ if (x < 1)
+ fun_l21_n874(x)
+ else
+ fun_l21_n527(x)
+ end
+end
+
+def fun_l20_n479(x)
+ if (x < 1)
+ fun_l21_n247(x)
+ else
+ fun_l21_n164(x)
+ end
+end
+
+def fun_l20_n480(x)
+ if (x < 1)
+ fun_l21_n449(x)
+ else
+ fun_l21_n106(x)
+ end
+end
+
+def fun_l20_n481(x)
+ if (x < 1)
+ fun_l21_n787(x)
+ else
+ fun_l21_n678(x)
+ end
+end
+
+def fun_l20_n482(x)
+ if (x < 1)
+ fun_l21_n176(x)
+ else
+ fun_l21_n650(x)
+ end
+end
+
+def fun_l20_n483(x)
+ if (x < 1)
+ fun_l21_n314(x)
+ else
+ fun_l21_n325(x)
+ end
+end
+
+def fun_l20_n484(x)
+ if (x < 1)
+ fun_l21_n877(x)
+ else
+ fun_l21_n539(x)
+ end
+end
+
+def fun_l20_n485(x)
+ if (x < 1)
+ fun_l21_n230(x)
+ else
+ fun_l21_n314(x)
+ end
+end
+
+def fun_l20_n486(x)
+ if (x < 1)
+ fun_l21_n778(x)
+ else
+ fun_l21_n493(x)
+ end
+end
+
+def fun_l20_n487(x)
+ if (x < 1)
+ fun_l21_n615(x)
+ else
+ fun_l21_n111(x)
+ end
+end
+
+def fun_l20_n488(x)
+ if (x < 1)
+ fun_l21_n133(x)
+ else
+ fun_l21_n381(x)
+ end
+end
+
+def fun_l20_n489(x)
+ if (x < 1)
+ fun_l21_n332(x)
+ else
+ fun_l21_n68(x)
+ end
+end
+
+def fun_l20_n490(x)
+ if (x < 1)
+ fun_l21_n995(x)
+ else
+ fun_l21_n861(x)
+ end
+end
+
+def fun_l20_n491(x)
+ if (x < 1)
+ fun_l21_n537(x)
+ else
+ fun_l21_n164(x)
+ end
+end
+
+def fun_l20_n492(x)
+ if (x < 1)
+ fun_l21_n759(x)
+ else
+ fun_l21_n598(x)
+ end
+end
+
+def fun_l20_n493(x)
+ if (x < 1)
+ fun_l21_n890(x)
+ else
+ fun_l21_n644(x)
+ end
+end
+
+def fun_l20_n494(x)
+ if (x < 1)
+ fun_l21_n641(x)
+ else
+ fun_l21_n420(x)
+ end
+end
+
+def fun_l20_n495(x)
+ if (x < 1)
+ fun_l21_n826(x)
+ else
+ fun_l21_n821(x)
+ end
+end
+
+def fun_l20_n496(x)
+ if (x < 1)
+ fun_l21_n348(x)
+ else
+ fun_l21_n277(x)
+ end
+end
+
+def fun_l20_n497(x)
+ if (x < 1)
+ fun_l21_n14(x)
+ else
+ fun_l21_n950(x)
+ end
+end
+
+def fun_l20_n498(x)
+ if (x < 1)
+ fun_l21_n43(x)
+ else
+ fun_l21_n759(x)
+ end
+end
+
+def fun_l20_n499(x)
+ if (x < 1)
+ fun_l21_n899(x)
+ else
+ fun_l21_n730(x)
+ end
+end
+
+def fun_l20_n500(x)
+ if (x < 1)
+ fun_l21_n918(x)
+ else
+ fun_l21_n454(x)
+ end
+end
+
+def fun_l20_n501(x)
+ if (x < 1)
+ fun_l21_n821(x)
+ else
+ fun_l21_n388(x)
+ end
+end
+
+def fun_l20_n502(x)
+ if (x < 1)
+ fun_l21_n164(x)
+ else
+ fun_l21_n718(x)
+ end
+end
+
+def fun_l20_n503(x)
+ if (x < 1)
+ fun_l21_n152(x)
+ else
+ fun_l21_n613(x)
+ end
+end
+
+def fun_l20_n504(x)
+ if (x < 1)
+ fun_l21_n931(x)
+ else
+ fun_l21_n912(x)
+ end
+end
+
+def fun_l20_n505(x)
+ if (x < 1)
+ fun_l21_n655(x)
+ else
+ fun_l21_n38(x)
+ end
+end
+
+def fun_l20_n506(x)
+ if (x < 1)
+ fun_l21_n408(x)
+ else
+ fun_l21_n38(x)
+ end
+end
+
+def fun_l20_n507(x)
+ if (x < 1)
+ fun_l21_n960(x)
+ else
+ fun_l21_n857(x)
+ end
+end
+
+def fun_l20_n508(x)
+ if (x < 1)
+ fun_l21_n308(x)
+ else
+ fun_l21_n210(x)
+ end
+end
+
+def fun_l20_n509(x)
+ if (x < 1)
+ fun_l21_n985(x)
+ else
+ fun_l21_n537(x)
+ end
+end
+
+def fun_l20_n510(x)
+ if (x < 1)
+ fun_l21_n200(x)
+ else
+ fun_l21_n598(x)
+ end
+end
+
+def fun_l20_n511(x)
+ if (x < 1)
+ fun_l21_n451(x)
+ else
+ fun_l21_n958(x)
+ end
+end
+
+def fun_l20_n512(x)
+ if (x < 1)
+ fun_l21_n459(x)
+ else
+ fun_l21_n823(x)
+ end
+end
+
+def fun_l20_n513(x)
+ if (x < 1)
+ fun_l21_n153(x)
+ else
+ fun_l21_n931(x)
+ end
+end
+
+def fun_l20_n514(x)
+ if (x < 1)
+ fun_l21_n213(x)
+ else
+ fun_l21_n336(x)
+ end
+end
+
+def fun_l20_n515(x)
+ if (x < 1)
+ fun_l21_n401(x)
+ else
+ fun_l21_n222(x)
+ end
+end
+
+def fun_l20_n516(x)
+ if (x < 1)
+ fun_l21_n582(x)
+ else
+ fun_l21_n735(x)
+ end
+end
+
+def fun_l20_n517(x)
+ if (x < 1)
+ fun_l21_n799(x)
+ else
+ fun_l21_n139(x)
+ end
+end
+
+def fun_l20_n518(x)
+ if (x < 1)
+ fun_l21_n279(x)
+ else
+ fun_l21_n476(x)
+ end
+end
+
+def fun_l20_n519(x)
+ if (x < 1)
+ fun_l21_n624(x)
+ else
+ fun_l21_n276(x)
+ end
+end
+
+def fun_l20_n520(x)
+ if (x < 1)
+ fun_l21_n505(x)
+ else
+ fun_l21_n523(x)
+ end
+end
+
+def fun_l20_n521(x)
+ if (x < 1)
+ fun_l21_n887(x)
+ else
+ fun_l21_n948(x)
+ end
+end
+
+def fun_l20_n522(x)
+ if (x < 1)
+ fun_l21_n969(x)
+ else
+ fun_l21_n988(x)
+ end
+end
+
+def fun_l20_n523(x)
+ if (x < 1)
+ fun_l21_n271(x)
+ else
+ fun_l21_n189(x)
+ end
+end
+
+def fun_l20_n524(x)
+ if (x < 1)
+ fun_l21_n478(x)
+ else
+ fun_l21_n111(x)
+ end
+end
+
+def fun_l20_n525(x)
+ if (x < 1)
+ fun_l21_n808(x)
+ else
+ fun_l21_n256(x)
+ end
+end
+
+def fun_l20_n526(x)
+ if (x < 1)
+ fun_l21_n715(x)
+ else
+ fun_l21_n508(x)
+ end
+end
+
+def fun_l20_n527(x)
+ if (x < 1)
+ fun_l21_n819(x)
+ else
+ fun_l21_n670(x)
+ end
+end
+
+def fun_l20_n528(x)
+ if (x < 1)
+ fun_l21_n598(x)
+ else
+ fun_l21_n369(x)
+ end
+end
+
+def fun_l20_n529(x)
+ if (x < 1)
+ fun_l21_n391(x)
+ else
+ fun_l21_n651(x)
+ end
+end
+
+def fun_l20_n530(x)
+ if (x < 1)
+ fun_l21_n69(x)
+ else
+ fun_l21_n706(x)
+ end
+end
+
+def fun_l20_n531(x)
+ if (x < 1)
+ fun_l21_n786(x)
+ else
+ fun_l21_n289(x)
+ end
+end
+
+def fun_l20_n532(x)
+ if (x < 1)
+ fun_l21_n128(x)
+ else
+ fun_l21_n789(x)
+ end
+end
+
+def fun_l20_n533(x)
+ if (x < 1)
+ fun_l21_n935(x)
+ else
+ fun_l21_n29(x)
+ end
+end
+
+def fun_l20_n534(x)
+ if (x < 1)
+ fun_l21_n735(x)
+ else
+ fun_l21_n381(x)
+ end
+end
+
+def fun_l20_n535(x)
+ if (x < 1)
+ fun_l21_n299(x)
+ else
+ fun_l21_n932(x)
+ end
+end
+
+def fun_l20_n536(x)
+ if (x < 1)
+ fun_l21_n823(x)
+ else
+ fun_l21_n7(x)
+ end
+end
+
+def fun_l20_n537(x)
+ if (x < 1)
+ fun_l21_n152(x)
+ else
+ fun_l21_n758(x)
+ end
+end
+
+def fun_l20_n538(x)
+ if (x < 1)
+ fun_l21_n8(x)
+ else
+ fun_l21_n772(x)
+ end
+end
+
+def fun_l20_n539(x)
+ if (x < 1)
+ fun_l21_n900(x)
+ else
+ fun_l21_n984(x)
+ end
+end
+
+def fun_l20_n540(x)
+ if (x < 1)
+ fun_l21_n726(x)
+ else
+ fun_l21_n337(x)
+ end
+end
+
+def fun_l20_n541(x)
+ if (x < 1)
+ fun_l21_n557(x)
+ else
+ fun_l21_n998(x)
+ end
+end
+
+def fun_l20_n542(x)
+ if (x < 1)
+ fun_l21_n898(x)
+ else
+ fun_l21_n389(x)
+ end
+end
+
+def fun_l20_n543(x)
+ if (x < 1)
+ fun_l21_n71(x)
+ else
+ fun_l21_n276(x)
+ end
+end
+
+def fun_l20_n544(x)
+ if (x < 1)
+ fun_l21_n888(x)
+ else
+ fun_l21_n525(x)
+ end
+end
+
+def fun_l20_n545(x)
+ if (x < 1)
+ fun_l21_n797(x)
+ else
+ fun_l21_n487(x)
+ end
+end
+
+def fun_l20_n546(x)
+ if (x < 1)
+ fun_l21_n825(x)
+ else
+ fun_l21_n349(x)
+ end
+end
+
+def fun_l20_n547(x)
+ if (x < 1)
+ fun_l21_n538(x)
+ else
+ fun_l21_n817(x)
+ end
+end
+
+def fun_l20_n548(x)
+ if (x < 1)
+ fun_l21_n630(x)
+ else
+ fun_l21_n432(x)
+ end
+end
+
+def fun_l20_n549(x)
+ if (x < 1)
+ fun_l21_n553(x)
+ else
+ fun_l21_n179(x)
+ end
+end
+
+def fun_l20_n550(x)
+ if (x < 1)
+ fun_l21_n982(x)
+ else
+ fun_l21_n350(x)
+ end
+end
+
+def fun_l20_n551(x)
+ if (x < 1)
+ fun_l21_n404(x)
+ else
+ fun_l21_n313(x)
+ end
+end
+
+def fun_l20_n552(x)
+ if (x < 1)
+ fun_l21_n893(x)
+ else
+ fun_l21_n879(x)
+ end
+end
+
+def fun_l20_n553(x)
+ if (x < 1)
+ fun_l21_n360(x)
+ else
+ fun_l21_n403(x)
+ end
+end
+
+def fun_l20_n554(x)
+ if (x < 1)
+ fun_l21_n607(x)
+ else
+ fun_l21_n18(x)
+ end
+end
+
+def fun_l20_n555(x)
+ if (x < 1)
+ fun_l21_n269(x)
+ else
+ fun_l21_n514(x)
+ end
+end
+
+def fun_l20_n556(x)
+ if (x < 1)
+ fun_l21_n22(x)
+ else
+ fun_l21_n164(x)
+ end
+end
+
+def fun_l20_n557(x)
+ if (x < 1)
+ fun_l21_n560(x)
+ else
+ fun_l21_n671(x)
+ end
+end
+
+def fun_l20_n558(x)
+ if (x < 1)
+ fun_l21_n857(x)
+ else
+ fun_l21_n34(x)
+ end
+end
+
+def fun_l20_n559(x)
+ if (x < 1)
+ fun_l21_n750(x)
+ else
+ fun_l21_n267(x)
+ end
+end
+
+def fun_l20_n560(x)
+ if (x < 1)
+ fun_l21_n97(x)
+ else
+ fun_l21_n72(x)
+ end
+end
+
+def fun_l20_n561(x)
+ if (x < 1)
+ fun_l21_n482(x)
+ else
+ fun_l21_n644(x)
+ end
+end
+
+def fun_l20_n562(x)
+ if (x < 1)
+ fun_l21_n147(x)
+ else
+ fun_l21_n524(x)
+ end
+end
+
+def fun_l20_n563(x)
+ if (x < 1)
+ fun_l21_n509(x)
+ else
+ fun_l21_n124(x)
+ end
+end
+
+def fun_l20_n564(x)
+ if (x < 1)
+ fun_l21_n183(x)
+ else
+ fun_l21_n254(x)
+ end
+end
+
+def fun_l20_n565(x)
+ if (x < 1)
+ fun_l21_n919(x)
+ else
+ fun_l21_n727(x)
+ end
+end
+
+def fun_l20_n566(x)
+ if (x < 1)
+ fun_l21_n847(x)
+ else
+ fun_l21_n546(x)
+ end
+end
+
+def fun_l20_n567(x)
+ if (x < 1)
+ fun_l21_n214(x)
+ else
+ fun_l21_n692(x)
+ end
+end
+
+def fun_l20_n568(x)
+ if (x < 1)
+ fun_l21_n867(x)
+ else
+ fun_l21_n747(x)
+ end
+end
+
+def fun_l20_n569(x)
+ if (x < 1)
+ fun_l21_n277(x)
+ else
+ fun_l21_n130(x)
+ end
+end
+
+def fun_l20_n570(x)
+ if (x < 1)
+ fun_l21_n472(x)
+ else
+ fun_l21_n296(x)
+ end
+end
+
+def fun_l20_n571(x)
+ if (x < 1)
+ fun_l21_n633(x)
+ else
+ fun_l21_n704(x)
+ end
+end
+
+def fun_l20_n572(x)
+ if (x < 1)
+ fun_l21_n179(x)
+ else
+ fun_l21_n683(x)
+ end
+end
+
+def fun_l20_n573(x)
+ if (x < 1)
+ fun_l21_n607(x)
+ else
+ fun_l21_n140(x)
+ end
+end
+
+def fun_l20_n574(x)
+ if (x < 1)
+ fun_l21_n647(x)
+ else
+ fun_l21_n233(x)
+ end
+end
+
+def fun_l20_n575(x)
+ if (x < 1)
+ fun_l21_n992(x)
+ else
+ fun_l21_n951(x)
+ end
+end
+
+def fun_l20_n576(x)
+ if (x < 1)
+ fun_l21_n750(x)
+ else
+ fun_l21_n574(x)
+ end
+end
+
+def fun_l20_n577(x)
+ if (x < 1)
+ fun_l21_n116(x)
+ else
+ fun_l21_n488(x)
+ end
+end
+
+def fun_l20_n578(x)
+ if (x < 1)
+ fun_l21_n580(x)
+ else
+ fun_l21_n547(x)
+ end
+end
+
+def fun_l20_n579(x)
+ if (x < 1)
+ fun_l21_n576(x)
+ else
+ fun_l21_n744(x)
+ end
+end
+
+def fun_l20_n580(x)
+ if (x < 1)
+ fun_l21_n791(x)
+ else
+ fun_l21_n495(x)
+ end
+end
+
+def fun_l20_n581(x)
+ if (x < 1)
+ fun_l21_n188(x)
+ else
+ fun_l21_n795(x)
+ end
+end
+
+def fun_l20_n582(x)
+ if (x < 1)
+ fun_l21_n477(x)
+ else
+ fun_l21_n965(x)
+ end
+end
+
+def fun_l20_n583(x)
+ if (x < 1)
+ fun_l21_n436(x)
+ else
+ fun_l21_n169(x)
+ end
+end
+
+def fun_l20_n584(x)
+ if (x < 1)
+ fun_l21_n518(x)
+ else
+ fun_l21_n849(x)
+ end
+end
+
+def fun_l20_n585(x)
+ if (x < 1)
+ fun_l21_n747(x)
+ else
+ fun_l21_n882(x)
+ end
+end
+
+def fun_l20_n586(x)
+ if (x < 1)
+ fun_l21_n0(x)
+ else
+ fun_l21_n481(x)
+ end
+end
+
+def fun_l20_n587(x)
+ if (x < 1)
+ fun_l21_n876(x)
+ else
+ fun_l21_n279(x)
+ end
+end
+
+def fun_l20_n588(x)
+ if (x < 1)
+ fun_l21_n355(x)
+ else
+ fun_l21_n744(x)
+ end
+end
+
+def fun_l20_n589(x)
+ if (x < 1)
+ fun_l21_n408(x)
+ else
+ fun_l21_n27(x)
+ end
+end
+
+def fun_l20_n590(x)
+ if (x < 1)
+ fun_l21_n152(x)
+ else
+ fun_l21_n867(x)
+ end
+end
+
+def fun_l20_n591(x)
+ if (x < 1)
+ fun_l21_n543(x)
+ else
+ fun_l21_n193(x)
+ end
+end
+
+def fun_l20_n592(x)
+ if (x < 1)
+ fun_l21_n160(x)
+ else
+ fun_l21_n185(x)
+ end
+end
+
+def fun_l20_n593(x)
+ if (x < 1)
+ fun_l21_n613(x)
+ else
+ fun_l21_n403(x)
+ end
+end
+
+def fun_l20_n594(x)
+ if (x < 1)
+ fun_l21_n660(x)
+ else
+ fun_l21_n933(x)
+ end
+end
+
+def fun_l20_n595(x)
+ if (x < 1)
+ fun_l21_n222(x)
+ else
+ fun_l21_n922(x)
+ end
+end
+
+def fun_l20_n596(x)
+ if (x < 1)
+ fun_l21_n668(x)
+ else
+ fun_l21_n857(x)
+ end
+end
+
+def fun_l20_n597(x)
+ if (x < 1)
+ fun_l21_n846(x)
+ else
+ fun_l21_n164(x)
+ end
+end
+
+def fun_l20_n598(x)
+ if (x < 1)
+ fun_l21_n755(x)
+ else
+ fun_l21_n591(x)
+ end
+end
+
+def fun_l20_n599(x)
+ if (x < 1)
+ fun_l21_n224(x)
+ else
+ fun_l21_n390(x)
+ end
+end
+
+def fun_l20_n600(x)
+ if (x < 1)
+ fun_l21_n713(x)
+ else
+ fun_l21_n735(x)
+ end
+end
+
+def fun_l20_n601(x)
+ if (x < 1)
+ fun_l21_n551(x)
+ else
+ fun_l21_n57(x)
+ end
+end
+
+def fun_l20_n602(x)
+ if (x < 1)
+ fun_l21_n808(x)
+ else
+ fun_l21_n928(x)
+ end
+end
+
+def fun_l20_n603(x)
+ if (x < 1)
+ fun_l21_n471(x)
+ else
+ fun_l21_n436(x)
+ end
+end
+
+def fun_l20_n604(x)
+ if (x < 1)
+ fun_l21_n482(x)
+ else
+ fun_l21_n445(x)
+ end
+end
+
+def fun_l20_n605(x)
+ if (x < 1)
+ fun_l21_n680(x)
+ else
+ fun_l21_n433(x)
+ end
+end
+
+def fun_l20_n606(x)
+ if (x < 1)
+ fun_l21_n687(x)
+ else
+ fun_l21_n885(x)
+ end
+end
+
+def fun_l20_n607(x)
+ if (x < 1)
+ fun_l21_n370(x)
+ else
+ fun_l21_n414(x)
+ end
+end
+
+def fun_l20_n608(x)
+ if (x < 1)
+ fun_l21_n11(x)
+ else
+ fun_l21_n792(x)
+ end
+end
+
+def fun_l20_n609(x)
+ if (x < 1)
+ fun_l21_n490(x)
+ else
+ fun_l21_n947(x)
+ end
+end
+
+def fun_l20_n610(x)
+ if (x < 1)
+ fun_l21_n609(x)
+ else
+ fun_l21_n514(x)
+ end
+end
+
+def fun_l20_n611(x)
+ if (x < 1)
+ fun_l21_n873(x)
+ else
+ fun_l21_n247(x)
+ end
+end
+
+def fun_l20_n612(x)
+ if (x < 1)
+ fun_l21_n199(x)
+ else
+ fun_l21_n421(x)
+ end
+end
+
+def fun_l20_n613(x)
+ if (x < 1)
+ fun_l21_n807(x)
+ else
+ fun_l21_n905(x)
+ end
+end
+
+def fun_l20_n614(x)
+ if (x < 1)
+ fun_l21_n260(x)
+ else
+ fun_l21_n926(x)
+ end
+end
+
+def fun_l20_n615(x)
+ if (x < 1)
+ fun_l21_n288(x)
+ else
+ fun_l21_n944(x)
+ end
+end
+
+def fun_l20_n616(x)
+ if (x < 1)
+ fun_l21_n346(x)
+ else
+ fun_l21_n949(x)
+ end
+end
+
+def fun_l20_n617(x)
+ if (x < 1)
+ fun_l21_n243(x)
+ else
+ fun_l21_n527(x)
+ end
+end
+
+def fun_l20_n618(x)
+ if (x < 1)
+ fun_l21_n193(x)
+ else
+ fun_l21_n576(x)
+ end
+end
+
+def fun_l20_n619(x)
+ if (x < 1)
+ fun_l21_n861(x)
+ else
+ fun_l21_n19(x)
+ end
+end
+
+def fun_l20_n620(x)
+ if (x < 1)
+ fun_l21_n735(x)
+ else
+ fun_l21_n477(x)
+ end
+end
+
+def fun_l20_n621(x)
+ if (x < 1)
+ fun_l21_n368(x)
+ else
+ fun_l21_n250(x)
+ end
+end
+
+def fun_l20_n622(x)
+ if (x < 1)
+ fun_l21_n235(x)
+ else
+ fun_l21_n461(x)
+ end
+end
+
+def fun_l20_n623(x)
+ if (x < 1)
+ fun_l21_n289(x)
+ else
+ fun_l21_n217(x)
+ end
+end
+
+def fun_l20_n624(x)
+ if (x < 1)
+ fun_l21_n951(x)
+ else
+ fun_l21_n124(x)
+ end
+end
+
+def fun_l20_n625(x)
+ if (x < 1)
+ fun_l21_n590(x)
+ else
+ fun_l21_n163(x)
+ end
+end
+
+def fun_l20_n626(x)
+ if (x < 1)
+ fun_l21_n122(x)
+ else
+ fun_l21_n34(x)
+ end
+end
+
+def fun_l20_n627(x)
+ if (x < 1)
+ fun_l21_n139(x)
+ else
+ fun_l21_n452(x)
+ end
+end
+
+def fun_l20_n628(x)
+ if (x < 1)
+ fun_l21_n626(x)
+ else
+ fun_l21_n816(x)
+ end
+end
+
+def fun_l20_n629(x)
+ if (x < 1)
+ fun_l21_n713(x)
+ else
+ fun_l21_n291(x)
+ end
+end
+
+def fun_l20_n630(x)
+ if (x < 1)
+ fun_l21_n896(x)
+ else
+ fun_l21_n167(x)
+ end
+end
+
+def fun_l20_n631(x)
+ if (x < 1)
+ fun_l21_n461(x)
+ else
+ fun_l21_n965(x)
+ end
+end
+
+def fun_l20_n632(x)
+ if (x < 1)
+ fun_l21_n984(x)
+ else
+ fun_l21_n336(x)
+ end
+end
+
+def fun_l20_n633(x)
+ if (x < 1)
+ fun_l21_n525(x)
+ else
+ fun_l21_n500(x)
+ end
+end
+
+def fun_l20_n634(x)
+ if (x < 1)
+ fun_l21_n296(x)
+ else
+ fun_l21_n535(x)
+ end
+end
+
+def fun_l20_n635(x)
+ if (x < 1)
+ fun_l21_n961(x)
+ else
+ fun_l21_n296(x)
+ end
+end
+
+def fun_l20_n636(x)
+ if (x < 1)
+ fun_l21_n736(x)
+ else
+ fun_l21_n474(x)
+ end
+end
+
+def fun_l20_n637(x)
+ if (x < 1)
+ fun_l21_n942(x)
+ else
+ fun_l21_n503(x)
+ end
+end
+
+def fun_l20_n638(x)
+ if (x < 1)
+ fun_l21_n906(x)
+ else
+ fun_l21_n612(x)
+ end
+end
+
+def fun_l20_n639(x)
+ if (x < 1)
+ fun_l21_n152(x)
+ else
+ fun_l21_n772(x)
+ end
+end
+
+def fun_l20_n640(x)
+ if (x < 1)
+ fun_l21_n109(x)
+ else
+ fun_l21_n416(x)
+ end
+end
+
+def fun_l20_n641(x)
+ if (x < 1)
+ fun_l21_n189(x)
+ else
+ fun_l21_n353(x)
+ end
+end
+
+def fun_l20_n642(x)
+ if (x < 1)
+ fun_l21_n414(x)
+ else
+ fun_l21_n550(x)
+ end
+end
+
+def fun_l20_n643(x)
+ if (x < 1)
+ fun_l21_n469(x)
+ else
+ fun_l21_n542(x)
+ end
+end
+
+def fun_l20_n644(x)
+ if (x < 1)
+ fun_l21_n465(x)
+ else
+ fun_l21_n742(x)
+ end
+end
+
+def fun_l20_n645(x)
+ if (x < 1)
+ fun_l21_n139(x)
+ else
+ fun_l21_n138(x)
+ end
+end
+
+def fun_l20_n646(x)
+ if (x < 1)
+ fun_l21_n550(x)
+ else
+ fun_l21_n910(x)
+ end
+end
+
+def fun_l20_n647(x)
+ if (x < 1)
+ fun_l21_n939(x)
+ else
+ fun_l21_n347(x)
+ end
+end
+
+def fun_l20_n648(x)
+ if (x < 1)
+ fun_l21_n391(x)
+ else
+ fun_l21_n648(x)
+ end
+end
+
+def fun_l20_n649(x)
+ if (x < 1)
+ fun_l21_n690(x)
+ else
+ fun_l21_n627(x)
+ end
+end
+
+def fun_l20_n650(x)
+ if (x < 1)
+ fun_l21_n596(x)
+ else
+ fun_l21_n681(x)
+ end
+end
+
+def fun_l20_n651(x)
+ if (x < 1)
+ fun_l21_n686(x)
+ else
+ fun_l21_n399(x)
+ end
+end
+
+def fun_l20_n652(x)
+ if (x < 1)
+ fun_l21_n461(x)
+ else
+ fun_l21_n851(x)
+ end
+end
+
+def fun_l20_n653(x)
+ if (x < 1)
+ fun_l21_n562(x)
+ else
+ fun_l21_n60(x)
+ end
+end
+
+def fun_l20_n654(x)
+ if (x < 1)
+ fun_l21_n269(x)
+ else
+ fun_l21_n937(x)
+ end
+end
+
+def fun_l20_n655(x)
+ if (x < 1)
+ fun_l21_n994(x)
+ else
+ fun_l21_n386(x)
+ end
+end
+
+def fun_l20_n656(x)
+ if (x < 1)
+ fun_l21_n568(x)
+ else
+ fun_l21_n180(x)
+ end
+end
+
+def fun_l20_n657(x)
+ if (x < 1)
+ fun_l21_n334(x)
+ else
+ fun_l21_n362(x)
+ end
+end
+
+def fun_l20_n658(x)
+ if (x < 1)
+ fun_l21_n14(x)
+ else
+ fun_l21_n311(x)
+ end
+end
+
+def fun_l20_n659(x)
+ if (x < 1)
+ fun_l21_n715(x)
+ else
+ fun_l21_n945(x)
+ end
+end
+
+def fun_l20_n660(x)
+ if (x < 1)
+ fun_l21_n739(x)
+ else
+ fun_l21_n456(x)
+ end
+end
+
+def fun_l20_n661(x)
+ if (x < 1)
+ fun_l21_n298(x)
+ else
+ fun_l21_n344(x)
+ end
+end
+
+def fun_l20_n662(x)
+ if (x < 1)
+ fun_l21_n134(x)
+ else
+ fun_l21_n828(x)
+ end
+end
+
+def fun_l20_n663(x)
+ if (x < 1)
+ fun_l21_n831(x)
+ else
+ fun_l21_n231(x)
+ end
+end
+
+def fun_l20_n664(x)
+ if (x < 1)
+ fun_l21_n330(x)
+ else
+ fun_l21_n733(x)
+ end
+end
+
+def fun_l20_n665(x)
+ if (x < 1)
+ fun_l21_n22(x)
+ else
+ fun_l21_n973(x)
+ end
+end
+
+def fun_l20_n666(x)
+ if (x < 1)
+ fun_l21_n277(x)
+ else
+ fun_l21_n988(x)
+ end
+end
+
+def fun_l20_n667(x)
+ if (x < 1)
+ fun_l21_n252(x)
+ else
+ fun_l21_n8(x)
+ end
+end
+
+def fun_l20_n668(x)
+ if (x < 1)
+ fun_l21_n991(x)
+ else
+ fun_l21_n801(x)
+ end
+end
+
+def fun_l20_n669(x)
+ if (x < 1)
+ fun_l21_n811(x)
+ else
+ fun_l21_n660(x)
+ end
+end
+
+def fun_l20_n670(x)
+ if (x < 1)
+ fun_l21_n384(x)
+ else
+ fun_l21_n596(x)
+ end
+end
+
+def fun_l20_n671(x)
+ if (x < 1)
+ fun_l21_n509(x)
+ else
+ fun_l21_n133(x)
+ end
+end
+
+def fun_l20_n672(x)
+ if (x < 1)
+ fun_l21_n650(x)
+ else
+ fun_l21_n679(x)
+ end
+end
+
+def fun_l20_n673(x)
+ if (x < 1)
+ fun_l21_n323(x)
+ else
+ fun_l21_n824(x)
+ end
+end
+
+def fun_l20_n674(x)
+ if (x < 1)
+ fun_l21_n728(x)
+ else
+ fun_l21_n697(x)
+ end
+end
+
+def fun_l20_n675(x)
+ if (x < 1)
+ fun_l21_n367(x)
+ else
+ fun_l21_n383(x)
+ end
+end
+
+def fun_l20_n676(x)
+ if (x < 1)
+ fun_l21_n280(x)
+ else
+ fun_l21_n309(x)
+ end
+end
+
+def fun_l20_n677(x)
+ if (x < 1)
+ fun_l21_n17(x)
+ else
+ fun_l21_n687(x)
+ end
+end
+
+def fun_l20_n678(x)
+ if (x < 1)
+ fun_l21_n133(x)
+ else
+ fun_l21_n250(x)
+ end
+end
+
+def fun_l20_n679(x)
+ if (x < 1)
+ fun_l21_n713(x)
+ else
+ fun_l21_n630(x)
+ end
+end
+
+def fun_l20_n680(x)
+ if (x < 1)
+ fun_l21_n348(x)
+ else
+ fun_l21_n737(x)
+ end
+end
+
+def fun_l20_n681(x)
+ if (x < 1)
+ fun_l21_n450(x)
+ else
+ fun_l21_n283(x)
+ end
+end
+
+def fun_l20_n682(x)
+ if (x < 1)
+ fun_l21_n568(x)
+ else
+ fun_l21_n22(x)
+ end
+end
+
+def fun_l20_n683(x)
+ if (x < 1)
+ fun_l21_n173(x)
+ else
+ fun_l21_n457(x)
+ end
+end
+
+def fun_l20_n684(x)
+ if (x < 1)
+ fun_l21_n846(x)
+ else
+ fun_l21_n415(x)
+ end
+end
+
+def fun_l20_n685(x)
+ if (x < 1)
+ fun_l21_n757(x)
+ else
+ fun_l21_n817(x)
+ end
+end
+
+def fun_l20_n686(x)
+ if (x < 1)
+ fun_l21_n282(x)
+ else
+ fun_l21_n503(x)
+ end
+end
+
+def fun_l20_n687(x)
+ if (x < 1)
+ fun_l21_n337(x)
+ else
+ fun_l21_n407(x)
+ end
+end
+
+def fun_l20_n688(x)
+ if (x < 1)
+ fun_l21_n783(x)
+ else
+ fun_l21_n307(x)
+ end
+end
+
+def fun_l20_n689(x)
+ if (x < 1)
+ fun_l21_n397(x)
+ else
+ fun_l21_n10(x)
+ end
+end
+
+def fun_l20_n690(x)
+ if (x < 1)
+ fun_l21_n100(x)
+ else
+ fun_l21_n704(x)
+ end
+end
+
+def fun_l20_n691(x)
+ if (x < 1)
+ fun_l21_n380(x)
+ else
+ fun_l21_n780(x)
+ end
+end
+
+def fun_l20_n692(x)
+ if (x < 1)
+ fun_l21_n782(x)
+ else
+ fun_l21_n955(x)
+ end
+end
+
+def fun_l20_n693(x)
+ if (x < 1)
+ fun_l21_n40(x)
+ else
+ fun_l21_n599(x)
+ end
+end
+
+def fun_l20_n694(x)
+ if (x < 1)
+ fun_l21_n730(x)
+ else
+ fun_l21_n215(x)
+ end
+end
+
+def fun_l20_n695(x)
+ if (x < 1)
+ fun_l21_n168(x)
+ else
+ fun_l21_n757(x)
+ end
+end
+
+def fun_l20_n696(x)
+ if (x < 1)
+ fun_l21_n622(x)
+ else
+ fun_l21_n411(x)
+ end
+end
+
+def fun_l20_n697(x)
+ if (x < 1)
+ fun_l21_n958(x)
+ else
+ fun_l21_n832(x)
+ end
+end
+
+def fun_l20_n698(x)
+ if (x < 1)
+ fun_l21_n452(x)
+ else
+ fun_l21_n390(x)
+ end
+end
+
+def fun_l20_n699(x)
+ if (x < 1)
+ fun_l21_n669(x)
+ else
+ fun_l21_n642(x)
+ end
+end
+
+def fun_l20_n700(x)
+ if (x < 1)
+ fun_l21_n481(x)
+ else
+ fun_l21_n273(x)
+ end
+end
+
+def fun_l20_n701(x)
+ if (x < 1)
+ fun_l21_n305(x)
+ else
+ fun_l21_n783(x)
+ end
+end
+
+def fun_l20_n702(x)
+ if (x < 1)
+ fun_l21_n766(x)
+ else
+ fun_l21_n943(x)
+ end
+end
+
+def fun_l20_n703(x)
+ if (x < 1)
+ fun_l21_n440(x)
+ else
+ fun_l21_n875(x)
+ end
+end
+
+def fun_l20_n704(x)
+ if (x < 1)
+ fun_l21_n332(x)
+ else
+ fun_l21_n839(x)
+ end
+end
+
+def fun_l20_n705(x)
+ if (x < 1)
+ fun_l21_n459(x)
+ else
+ fun_l21_n341(x)
+ end
+end
+
+def fun_l20_n706(x)
+ if (x < 1)
+ fun_l21_n897(x)
+ else
+ fun_l21_n235(x)
+ end
+end
+
+def fun_l20_n707(x)
+ if (x < 1)
+ fun_l21_n400(x)
+ else
+ fun_l21_n349(x)
+ end
+end
+
+def fun_l20_n708(x)
+ if (x < 1)
+ fun_l21_n121(x)
+ else
+ fun_l21_n40(x)
+ end
+end
+
+def fun_l20_n709(x)
+ if (x < 1)
+ fun_l21_n496(x)
+ else
+ fun_l21_n473(x)
+ end
+end
+
+def fun_l20_n710(x)
+ if (x < 1)
+ fun_l21_n146(x)
+ else
+ fun_l21_n944(x)
+ end
+end
+
+def fun_l20_n711(x)
+ if (x < 1)
+ fun_l21_n497(x)
+ else
+ fun_l21_n322(x)
+ end
+end
+
+def fun_l20_n712(x)
+ if (x < 1)
+ fun_l21_n647(x)
+ else
+ fun_l21_n76(x)
+ end
+end
+
+def fun_l20_n713(x)
+ if (x < 1)
+ fun_l21_n402(x)
+ else
+ fun_l21_n904(x)
+ end
+end
+
+def fun_l20_n714(x)
+ if (x < 1)
+ fun_l21_n834(x)
+ else
+ fun_l21_n904(x)
+ end
+end
+
+def fun_l20_n715(x)
+ if (x < 1)
+ fun_l21_n482(x)
+ else
+ fun_l21_n399(x)
+ end
+end
+
+def fun_l20_n716(x)
+ if (x < 1)
+ fun_l21_n441(x)
+ else
+ fun_l21_n348(x)
+ end
+end
+
+def fun_l20_n717(x)
+ if (x < 1)
+ fun_l21_n577(x)
+ else
+ fun_l21_n815(x)
+ end
+end
+
+def fun_l20_n718(x)
+ if (x < 1)
+ fun_l21_n18(x)
+ else
+ fun_l21_n399(x)
+ end
+end
+
+def fun_l20_n719(x)
+ if (x < 1)
+ fun_l21_n245(x)
+ else
+ fun_l21_n928(x)
+ end
+end
+
+def fun_l20_n720(x)
+ if (x < 1)
+ fun_l21_n373(x)
+ else
+ fun_l21_n432(x)
+ end
+end
+
+def fun_l20_n721(x)
+ if (x < 1)
+ fun_l21_n20(x)
+ else
+ fun_l21_n485(x)
+ end
+end
+
+def fun_l20_n722(x)
+ if (x < 1)
+ fun_l21_n79(x)
+ else
+ fun_l21_n525(x)
+ end
+end
+
+def fun_l20_n723(x)
+ if (x < 1)
+ fun_l21_n474(x)
+ else
+ fun_l21_n706(x)
+ end
+end
+
+def fun_l20_n724(x)
+ if (x < 1)
+ fun_l21_n27(x)
+ else
+ fun_l21_n833(x)
+ end
+end
+
+def fun_l20_n725(x)
+ if (x < 1)
+ fun_l21_n386(x)
+ else
+ fun_l21_n422(x)
+ end
+end
+
+def fun_l20_n726(x)
+ if (x < 1)
+ fun_l21_n816(x)
+ else
+ fun_l21_n204(x)
+ end
+end
+
+def fun_l20_n727(x)
+ if (x < 1)
+ fun_l21_n502(x)
+ else
+ fun_l21_n554(x)
+ end
+end
+
+def fun_l20_n728(x)
+ if (x < 1)
+ fun_l21_n846(x)
+ else
+ fun_l21_n948(x)
+ end
+end
+
+def fun_l20_n729(x)
+ if (x < 1)
+ fun_l21_n308(x)
+ else
+ fun_l21_n408(x)
+ end
+end
+
+def fun_l20_n730(x)
+ if (x < 1)
+ fun_l21_n882(x)
+ else
+ fun_l21_n151(x)
+ end
+end
+
+def fun_l20_n731(x)
+ if (x < 1)
+ fun_l21_n22(x)
+ else
+ fun_l21_n839(x)
+ end
+end
+
+def fun_l20_n732(x)
+ if (x < 1)
+ fun_l21_n482(x)
+ else
+ fun_l21_n942(x)
+ end
+end
+
+def fun_l20_n733(x)
+ if (x < 1)
+ fun_l21_n959(x)
+ else
+ fun_l21_n615(x)
+ end
+end
+
+def fun_l20_n734(x)
+ if (x < 1)
+ fun_l21_n137(x)
+ else
+ fun_l21_n455(x)
+ end
+end
+
+def fun_l20_n735(x)
+ if (x < 1)
+ fun_l21_n388(x)
+ else
+ fun_l21_n362(x)
+ end
+end
+
+def fun_l20_n736(x)
+ if (x < 1)
+ fun_l21_n107(x)
+ else
+ fun_l21_n883(x)
+ end
+end
+
+def fun_l20_n737(x)
+ if (x < 1)
+ fun_l21_n42(x)
+ else
+ fun_l21_n288(x)
+ end
+end
+
+def fun_l20_n738(x)
+ if (x < 1)
+ fun_l21_n885(x)
+ else
+ fun_l21_n443(x)
+ end
+end
+
+def fun_l20_n739(x)
+ if (x < 1)
+ fun_l21_n414(x)
+ else
+ fun_l21_n976(x)
+ end
+end
+
+def fun_l20_n740(x)
+ if (x < 1)
+ fun_l21_n244(x)
+ else
+ fun_l21_n327(x)
+ end
+end
+
+def fun_l20_n741(x)
+ if (x < 1)
+ fun_l21_n832(x)
+ else
+ fun_l21_n951(x)
+ end
+end
+
+def fun_l20_n742(x)
+ if (x < 1)
+ fun_l21_n408(x)
+ else
+ fun_l21_n978(x)
+ end
+end
+
+def fun_l20_n743(x)
+ if (x < 1)
+ fun_l21_n517(x)
+ else
+ fun_l21_n468(x)
+ end
+end
+
+def fun_l20_n744(x)
+ if (x < 1)
+ fun_l21_n281(x)
+ else
+ fun_l21_n9(x)
+ end
+end
+
+def fun_l20_n745(x)
+ if (x < 1)
+ fun_l21_n488(x)
+ else
+ fun_l21_n526(x)
+ end
+end
+
+def fun_l20_n746(x)
+ if (x < 1)
+ fun_l21_n494(x)
+ else
+ fun_l21_n769(x)
+ end
+end
+
+def fun_l20_n747(x)
+ if (x < 1)
+ fun_l21_n277(x)
+ else
+ fun_l21_n103(x)
+ end
+end
+
+def fun_l20_n748(x)
+ if (x < 1)
+ fun_l21_n663(x)
+ else
+ fun_l21_n281(x)
+ end
+end
+
+def fun_l20_n749(x)
+ if (x < 1)
+ fun_l21_n260(x)
+ else
+ fun_l21_n320(x)
+ end
+end
+
+def fun_l20_n750(x)
+ if (x < 1)
+ fun_l21_n781(x)
+ else
+ fun_l21_n705(x)
+ end
+end
+
+def fun_l20_n751(x)
+ if (x < 1)
+ fun_l21_n317(x)
+ else
+ fun_l21_n728(x)
+ end
+end
+
+def fun_l20_n752(x)
+ if (x < 1)
+ fun_l21_n573(x)
+ else
+ fun_l21_n172(x)
+ end
+end
+
+def fun_l20_n753(x)
+ if (x < 1)
+ fun_l21_n352(x)
+ else
+ fun_l21_n933(x)
+ end
+end
+
+def fun_l20_n754(x)
+ if (x < 1)
+ fun_l21_n876(x)
+ else
+ fun_l21_n180(x)
+ end
+end
+
+def fun_l20_n755(x)
+ if (x < 1)
+ fun_l21_n937(x)
+ else
+ fun_l21_n387(x)
+ end
+end
+
+def fun_l20_n756(x)
+ if (x < 1)
+ fun_l21_n154(x)
+ else
+ fun_l21_n187(x)
+ end
+end
+
+def fun_l20_n757(x)
+ if (x < 1)
+ fun_l21_n766(x)
+ else
+ fun_l21_n259(x)
+ end
+end
+
+def fun_l20_n758(x)
+ if (x < 1)
+ fun_l21_n235(x)
+ else
+ fun_l21_n636(x)
+ end
+end
+
+def fun_l20_n759(x)
+ if (x < 1)
+ fun_l21_n872(x)
+ else
+ fun_l21_n913(x)
+ end
+end
+
+def fun_l20_n760(x)
+ if (x < 1)
+ fun_l21_n73(x)
+ else
+ fun_l21_n743(x)
+ end
+end
+
+def fun_l20_n761(x)
+ if (x < 1)
+ fun_l21_n666(x)
+ else
+ fun_l21_n777(x)
+ end
+end
+
+def fun_l20_n762(x)
+ if (x < 1)
+ fun_l21_n829(x)
+ else
+ fun_l21_n800(x)
+ end
+end
+
+def fun_l20_n763(x)
+ if (x < 1)
+ fun_l21_n37(x)
+ else
+ fun_l21_n152(x)
+ end
+end
+
+def fun_l20_n764(x)
+ if (x < 1)
+ fun_l21_n53(x)
+ else
+ fun_l21_n196(x)
+ end
+end
+
+def fun_l20_n765(x)
+ if (x < 1)
+ fun_l21_n511(x)
+ else
+ fun_l21_n415(x)
+ end
+end
+
+def fun_l20_n766(x)
+ if (x < 1)
+ fun_l21_n375(x)
+ else
+ fun_l21_n885(x)
+ end
+end
+
+def fun_l20_n767(x)
+ if (x < 1)
+ fun_l21_n267(x)
+ else
+ fun_l21_n597(x)
+ end
+end
+
+def fun_l20_n768(x)
+ if (x < 1)
+ fun_l21_n920(x)
+ else
+ fun_l21_n943(x)
+ end
+end
+
+def fun_l20_n769(x)
+ if (x < 1)
+ fun_l21_n585(x)
+ else
+ fun_l21_n659(x)
+ end
+end
+
+def fun_l20_n770(x)
+ if (x < 1)
+ fun_l21_n897(x)
+ else
+ fun_l21_n742(x)
+ end
+end
+
+def fun_l20_n771(x)
+ if (x < 1)
+ fun_l21_n41(x)
+ else
+ fun_l21_n431(x)
+ end
+end
+
+def fun_l20_n772(x)
+ if (x < 1)
+ fun_l21_n446(x)
+ else
+ fun_l21_n22(x)
+ end
+end
+
+def fun_l20_n773(x)
+ if (x < 1)
+ fun_l21_n918(x)
+ else
+ fun_l21_n387(x)
+ end
+end
+
+def fun_l20_n774(x)
+ if (x < 1)
+ fun_l21_n88(x)
+ else
+ fun_l21_n763(x)
+ end
+end
+
+def fun_l20_n775(x)
+ if (x < 1)
+ fun_l21_n224(x)
+ else
+ fun_l21_n886(x)
+ end
+end
+
+def fun_l20_n776(x)
+ if (x < 1)
+ fun_l21_n860(x)
+ else
+ fun_l21_n145(x)
+ end
+end
+
+def fun_l20_n777(x)
+ if (x < 1)
+ fun_l21_n198(x)
+ else
+ fun_l21_n593(x)
+ end
+end
+
+def fun_l20_n778(x)
+ if (x < 1)
+ fun_l21_n510(x)
+ else
+ fun_l21_n146(x)
+ end
+end
+
+def fun_l20_n779(x)
+ if (x < 1)
+ fun_l21_n125(x)
+ else
+ fun_l21_n390(x)
+ end
+end
+
+def fun_l20_n780(x)
+ if (x < 1)
+ fun_l21_n278(x)
+ else
+ fun_l21_n100(x)
+ end
+end
+
+def fun_l20_n781(x)
+ if (x < 1)
+ fun_l21_n9(x)
+ else
+ fun_l21_n312(x)
+ end
+end
+
+def fun_l20_n782(x)
+ if (x < 1)
+ fun_l21_n883(x)
+ else
+ fun_l21_n118(x)
+ end
+end
+
+def fun_l20_n783(x)
+ if (x < 1)
+ fun_l21_n314(x)
+ else
+ fun_l21_n357(x)
+ end
+end
+
+def fun_l20_n784(x)
+ if (x < 1)
+ fun_l21_n599(x)
+ else
+ fun_l21_n211(x)
+ end
+end
+
+def fun_l20_n785(x)
+ if (x < 1)
+ fun_l21_n882(x)
+ else
+ fun_l21_n903(x)
+ end
+end
+
+def fun_l20_n786(x)
+ if (x < 1)
+ fun_l21_n741(x)
+ else
+ fun_l21_n634(x)
+ end
+end
+
+def fun_l20_n787(x)
+ if (x < 1)
+ fun_l21_n186(x)
+ else
+ fun_l21_n68(x)
+ end
+end
+
+def fun_l20_n788(x)
+ if (x < 1)
+ fun_l21_n620(x)
+ else
+ fun_l21_n976(x)
+ end
+end
+
+def fun_l20_n789(x)
+ if (x < 1)
+ fun_l21_n692(x)
+ else
+ fun_l21_n8(x)
+ end
+end
+
+def fun_l20_n790(x)
+ if (x < 1)
+ fun_l21_n893(x)
+ else
+ fun_l21_n916(x)
+ end
+end
+
+def fun_l20_n791(x)
+ if (x < 1)
+ fun_l21_n823(x)
+ else
+ fun_l21_n498(x)
+ end
+end
+
+def fun_l20_n792(x)
+ if (x < 1)
+ fun_l21_n390(x)
+ else
+ fun_l21_n711(x)
+ end
+end
+
+def fun_l20_n793(x)
+ if (x < 1)
+ fun_l21_n918(x)
+ else
+ fun_l21_n819(x)
+ end
+end
+
+def fun_l20_n794(x)
+ if (x < 1)
+ fun_l21_n809(x)
+ else
+ fun_l21_n320(x)
+ end
+end
+
+def fun_l20_n795(x)
+ if (x < 1)
+ fun_l21_n387(x)
+ else
+ fun_l21_n377(x)
+ end
+end
+
+def fun_l20_n796(x)
+ if (x < 1)
+ fun_l21_n243(x)
+ else
+ fun_l21_n555(x)
+ end
+end
+
+def fun_l20_n797(x)
+ if (x < 1)
+ fun_l21_n946(x)
+ else
+ fun_l21_n811(x)
+ end
+end
+
+def fun_l20_n798(x)
+ if (x < 1)
+ fun_l21_n492(x)
+ else
+ fun_l21_n367(x)
+ end
+end
+
+def fun_l20_n799(x)
+ if (x < 1)
+ fun_l21_n161(x)
+ else
+ fun_l21_n818(x)
+ end
+end
+
+def fun_l20_n800(x)
+ if (x < 1)
+ fun_l21_n365(x)
+ else
+ fun_l21_n560(x)
+ end
+end
+
+def fun_l20_n801(x)
+ if (x < 1)
+ fun_l21_n456(x)
+ else
+ fun_l21_n880(x)
+ end
+end
+
+def fun_l20_n802(x)
+ if (x < 1)
+ fun_l21_n683(x)
+ else
+ fun_l21_n71(x)
+ end
+end
+
+def fun_l20_n803(x)
+ if (x < 1)
+ fun_l21_n250(x)
+ else
+ fun_l21_n183(x)
+ end
+end
+
+def fun_l20_n804(x)
+ if (x < 1)
+ fun_l21_n900(x)
+ else
+ fun_l21_n63(x)
+ end
+end
+
+def fun_l20_n805(x)
+ if (x < 1)
+ fun_l21_n798(x)
+ else
+ fun_l21_n91(x)
+ end
+end
+
+def fun_l20_n806(x)
+ if (x < 1)
+ fun_l21_n525(x)
+ else
+ fun_l21_n59(x)
+ end
+end
+
+def fun_l20_n807(x)
+ if (x < 1)
+ fun_l21_n515(x)
+ else
+ fun_l21_n457(x)
+ end
+end
+
+def fun_l20_n808(x)
+ if (x < 1)
+ fun_l21_n410(x)
+ else
+ fun_l21_n172(x)
+ end
+end
+
+def fun_l20_n809(x)
+ if (x < 1)
+ fun_l21_n194(x)
+ else
+ fun_l21_n425(x)
+ end
+end
+
+def fun_l20_n810(x)
+ if (x < 1)
+ fun_l21_n660(x)
+ else
+ fun_l21_n120(x)
+ end
+end
+
+def fun_l20_n811(x)
+ if (x < 1)
+ fun_l21_n920(x)
+ else
+ fun_l21_n97(x)
+ end
+end
+
+def fun_l20_n812(x)
+ if (x < 1)
+ fun_l21_n443(x)
+ else
+ fun_l21_n876(x)
+ end
+end
+
+def fun_l20_n813(x)
+ if (x < 1)
+ fun_l21_n935(x)
+ else
+ fun_l21_n186(x)
+ end
+end
+
+def fun_l20_n814(x)
+ if (x < 1)
+ fun_l21_n139(x)
+ else
+ fun_l21_n313(x)
+ end
+end
+
+def fun_l20_n815(x)
+ if (x < 1)
+ fun_l21_n21(x)
+ else
+ fun_l21_n500(x)
+ end
+end
+
+def fun_l20_n816(x)
+ if (x < 1)
+ fun_l21_n682(x)
+ else
+ fun_l21_n17(x)
+ end
+end
+
+def fun_l20_n817(x)
+ if (x < 1)
+ fun_l21_n945(x)
+ else
+ fun_l21_n472(x)
+ end
+end
+
+def fun_l20_n818(x)
+ if (x < 1)
+ fun_l21_n76(x)
+ else
+ fun_l21_n464(x)
+ end
+end
+
+def fun_l20_n819(x)
+ if (x < 1)
+ fun_l21_n696(x)
+ else
+ fun_l21_n989(x)
+ end
+end
+
+def fun_l20_n820(x)
+ if (x < 1)
+ fun_l21_n150(x)
+ else
+ fun_l21_n459(x)
+ end
+end
+
+def fun_l20_n821(x)
+ if (x < 1)
+ fun_l21_n280(x)
+ else
+ fun_l21_n535(x)
+ end
+end
+
+def fun_l20_n822(x)
+ if (x < 1)
+ fun_l21_n120(x)
+ else
+ fun_l21_n553(x)
+ end
+end
+
+def fun_l20_n823(x)
+ if (x < 1)
+ fun_l21_n450(x)
+ else
+ fun_l21_n168(x)
+ end
+end
+
+def fun_l20_n824(x)
+ if (x < 1)
+ fun_l21_n635(x)
+ else
+ fun_l21_n45(x)
+ end
+end
+
+def fun_l20_n825(x)
+ if (x < 1)
+ fun_l21_n245(x)
+ else
+ fun_l21_n491(x)
+ end
+end
+
+def fun_l20_n826(x)
+ if (x < 1)
+ fun_l21_n202(x)
+ else
+ fun_l21_n307(x)
+ end
+end
+
+def fun_l20_n827(x)
+ if (x < 1)
+ fun_l21_n883(x)
+ else
+ fun_l21_n113(x)
+ end
+end
+
+def fun_l20_n828(x)
+ if (x < 1)
+ fun_l21_n864(x)
+ else
+ fun_l21_n982(x)
+ end
+end
+
+def fun_l20_n829(x)
+ if (x < 1)
+ fun_l21_n707(x)
+ else
+ fun_l21_n909(x)
+ end
+end
+
+def fun_l20_n830(x)
+ if (x < 1)
+ fun_l21_n838(x)
+ else
+ fun_l21_n784(x)
+ end
+end
+
+def fun_l20_n831(x)
+ if (x < 1)
+ fun_l21_n179(x)
+ else
+ fun_l21_n445(x)
+ end
+end
+
+def fun_l20_n832(x)
+ if (x < 1)
+ fun_l21_n563(x)
+ else
+ fun_l21_n981(x)
+ end
+end
+
+def fun_l20_n833(x)
+ if (x < 1)
+ fun_l21_n441(x)
+ else
+ fun_l21_n911(x)
+ end
+end
+
+def fun_l20_n834(x)
+ if (x < 1)
+ fun_l21_n46(x)
+ else
+ fun_l21_n244(x)
+ end
+end
+
+def fun_l20_n835(x)
+ if (x < 1)
+ fun_l21_n740(x)
+ else
+ fun_l21_n877(x)
+ end
+end
+
+def fun_l20_n836(x)
+ if (x < 1)
+ fun_l21_n987(x)
+ else
+ fun_l21_n459(x)
+ end
+end
+
+def fun_l20_n837(x)
+ if (x < 1)
+ fun_l21_n51(x)
+ else
+ fun_l21_n533(x)
+ end
+end
+
+def fun_l20_n838(x)
+ if (x < 1)
+ fun_l21_n530(x)
+ else
+ fun_l21_n916(x)
+ end
+end
+
+def fun_l20_n839(x)
+ if (x < 1)
+ fun_l21_n644(x)
+ else
+ fun_l21_n574(x)
+ end
+end
+
+def fun_l20_n840(x)
+ if (x < 1)
+ fun_l21_n167(x)
+ else
+ fun_l21_n935(x)
+ end
+end
+
+def fun_l20_n841(x)
+ if (x < 1)
+ fun_l21_n657(x)
+ else
+ fun_l21_n914(x)
+ end
+end
+
+def fun_l20_n842(x)
+ if (x < 1)
+ fun_l21_n646(x)
+ else
+ fun_l21_n191(x)
+ end
+end
+
+def fun_l20_n843(x)
+ if (x < 1)
+ fun_l21_n881(x)
+ else
+ fun_l21_n744(x)
+ end
+end
+
+def fun_l20_n844(x)
+ if (x < 1)
+ fun_l21_n293(x)
+ else
+ fun_l21_n474(x)
+ end
+end
+
+def fun_l20_n845(x)
+ if (x < 1)
+ fun_l21_n481(x)
+ else
+ fun_l21_n80(x)
+ end
+end
+
+def fun_l20_n846(x)
+ if (x < 1)
+ fun_l21_n785(x)
+ else
+ fun_l21_n694(x)
+ end
+end
+
+def fun_l20_n847(x)
+ if (x < 1)
+ fun_l21_n874(x)
+ else
+ fun_l21_n465(x)
+ end
+end
+
+def fun_l20_n848(x)
+ if (x < 1)
+ fun_l21_n43(x)
+ else
+ fun_l21_n666(x)
+ end
+end
+
+def fun_l20_n849(x)
+ if (x < 1)
+ fun_l21_n868(x)
+ else
+ fun_l21_n272(x)
+ end
+end
+
+def fun_l20_n850(x)
+ if (x < 1)
+ fun_l21_n194(x)
+ else
+ fun_l21_n995(x)
+ end
+end
+
+def fun_l20_n851(x)
+ if (x < 1)
+ fun_l21_n989(x)
+ else
+ fun_l21_n385(x)
+ end
+end
+
+def fun_l20_n852(x)
+ if (x < 1)
+ fun_l21_n396(x)
+ else
+ fun_l21_n366(x)
+ end
+end
+
+def fun_l20_n853(x)
+ if (x < 1)
+ fun_l21_n439(x)
+ else
+ fun_l21_n141(x)
+ end
+end
+
+def fun_l20_n854(x)
+ if (x < 1)
+ fun_l21_n78(x)
+ else
+ fun_l21_n180(x)
+ end
+end
+
+def fun_l20_n855(x)
+ if (x < 1)
+ fun_l21_n203(x)
+ else
+ fun_l21_n382(x)
+ end
+end
+
+def fun_l20_n856(x)
+ if (x < 1)
+ fun_l21_n387(x)
+ else
+ fun_l21_n696(x)
+ end
+end
+
+def fun_l20_n857(x)
+ if (x < 1)
+ fun_l21_n383(x)
+ else
+ fun_l21_n655(x)
+ end
+end
+
+def fun_l20_n858(x)
+ if (x < 1)
+ fun_l21_n375(x)
+ else
+ fun_l21_n14(x)
+ end
+end
+
+def fun_l20_n859(x)
+ if (x < 1)
+ fun_l21_n418(x)
+ else
+ fun_l21_n435(x)
+ end
+end
+
+def fun_l20_n860(x)
+ if (x < 1)
+ fun_l21_n75(x)
+ else
+ fun_l21_n258(x)
+ end
+end
+
+def fun_l20_n861(x)
+ if (x < 1)
+ fun_l21_n509(x)
+ else
+ fun_l21_n585(x)
+ end
+end
+
+def fun_l20_n862(x)
+ if (x < 1)
+ fun_l21_n388(x)
+ else
+ fun_l21_n962(x)
+ end
+end
+
+def fun_l20_n863(x)
+ if (x < 1)
+ fun_l21_n826(x)
+ else
+ fun_l21_n691(x)
+ end
+end
+
+def fun_l20_n864(x)
+ if (x < 1)
+ fun_l21_n230(x)
+ else
+ fun_l21_n588(x)
+ end
+end
+
+def fun_l20_n865(x)
+ if (x < 1)
+ fun_l21_n138(x)
+ else
+ fun_l21_n779(x)
+ end
+end
+
+def fun_l20_n866(x)
+ if (x < 1)
+ fun_l21_n994(x)
+ else
+ fun_l21_n325(x)
+ end
+end
+
+def fun_l20_n867(x)
+ if (x < 1)
+ fun_l21_n169(x)
+ else
+ fun_l21_n384(x)
+ end
+end
+
+def fun_l20_n868(x)
+ if (x < 1)
+ fun_l21_n30(x)
+ else
+ fun_l21_n922(x)
+ end
+end
+
+def fun_l20_n869(x)
+ if (x < 1)
+ fun_l21_n500(x)
+ else
+ fun_l21_n896(x)
+ end
+end
+
+def fun_l20_n870(x)
+ if (x < 1)
+ fun_l21_n25(x)
+ else
+ fun_l21_n292(x)
+ end
+end
+
+def fun_l20_n871(x)
+ if (x < 1)
+ fun_l21_n266(x)
+ else
+ fun_l21_n58(x)
+ end
+end
+
+def fun_l20_n872(x)
+ if (x < 1)
+ fun_l21_n172(x)
+ else
+ fun_l21_n721(x)
+ end
+end
+
+def fun_l20_n873(x)
+ if (x < 1)
+ fun_l21_n87(x)
+ else
+ fun_l21_n717(x)
+ end
+end
+
+def fun_l20_n874(x)
+ if (x < 1)
+ fun_l21_n235(x)
+ else
+ fun_l21_n891(x)
+ end
+end
+
+def fun_l20_n875(x)
+ if (x < 1)
+ fun_l21_n87(x)
+ else
+ fun_l21_n810(x)
+ end
+end
+
+def fun_l20_n876(x)
+ if (x < 1)
+ fun_l21_n785(x)
+ else
+ fun_l21_n668(x)
+ end
+end
+
+def fun_l20_n877(x)
+ if (x < 1)
+ fun_l21_n532(x)
+ else
+ fun_l21_n505(x)
+ end
+end
+
+def fun_l20_n878(x)
+ if (x < 1)
+ fun_l21_n885(x)
+ else
+ fun_l21_n820(x)
+ end
+end
+
+def fun_l20_n879(x)
+ if (x < 1)
+ fun_l21_n986(x)
+ else
+ fun_l21_n916(x)
+ end
+end
+
+def fun_l20_n880(x)
+ if (x < 1)
+ fun_l21_n46(x)
+ else
+ fun_l21_n751(x)
+ end
+end
+
+def fun_l20_n881(x)
+ if (x < 1)
+ fun_l21_n964(x)
+ else
+ fun_l21_n829(x)
+ end
+end
+
+def fun_l20_n882(x)
+ if (x < 1)
+ fun_l21_n938(x)
+ else
+ fun_l21_n862(x)
+ end
+end
+
+def fun_l20_n883(x)
+ if (x < 1)
+ fun_l21_n880(x)
+ else
+ fun_l21_n548(x)
+ end
+end
+
+def fun_l20_n884(x)
+ if (x < 1)
+ fun_l21_n621(x)
+ else
+ fun_l21_n184(x)
+ end
+end
+
+def fun_l20_n885(x)
+ if (x < 1)
+ fun_l21_n587(x)
+ else
+ fun_l21_n603(x)
+ end
+end
+
+def fun_l20_n886(x)
+ if (x < 1)
+ fun_l21_n935(x)
+ else
+ fun_l21_n105(x)
+ end
+end
+
+def fun_l20_n887(x)
+ if (x < 1)
+ fun_l21_n76(x)
+ else
+ fun_l21_n96(x)
+ end
+end
+
+def fun_l20_n888(x)
+ if (x < 1)
+ fun_l21_n241(x)
+ else
+ fun_l21_n56(x)
+ end
+end
+
+def fun_l20_n889(x)
+ if (x < 1)
+ fun_l21_n180(x)
+ else
+ fun_l21_n360(x)
+ end
+end
+
+def fun_l20_n890(x)
+ if (x < 1)
+ fun_l21_n179(x)
+ else
+ fun_l21_n510(x)
+ end
+end
+
+def fun_l20_n891(x)
+ if (x < 1)
+ fun_l21_n641(x)
+ else
+ fun_l21_n70(x)
+ end
+end
+
+def fun_l20_n892(x)
+ if (x < 1)
+ fun_l21_n615(x)
+ else
+ fun_l21_n30(x)
+ end
+end
+
+def fun_l20_n893(x)
+ if (x < 1)
+ fun_l21_n787(x)
+ else
+ fun_l21_n914(x)
+ end
+end
+
+def fun_l20_n894(x)
+ if (x < 1)
+ fun_l21_n949(x)
+ else
+ fun_l21_n449(x)
+ end
+end
+
+def fun_l20_n895(x)
+ if (x < 1)
+ fun_l21_n182(x)
+ else
+ fun_l21_n935(x)
+ end
+end
+
+def fun_l20_n896(x)
+ if (x < 1)
+ fun_l21_n411(x)
+ else
+ fun_l21_n43(x)
+ end
+end
+
+def fun_l20_n897(x)
+ if (x < 1)
+ fun_l21_n70(x)
+ else
+ fun_l21_n363(x)
+ end
+end
+
+def fun_l20_n898(x)
+ if (x < 1)
+ fun_l21_n910(x)
+ else
+ fun_l21_n271(x)
+ end
+end
+
+def fun_l20_n899(x)
+ if (x < 1)
+ fun_l21_n722(x)
+ else
+ fun_l21_n793(x)
+ end
+end
+
+def fun_l20_n900(x)
+ if (x < 1)
+ fun_l21_n356(x)
+ else
+ fun_l21_n301(x)
+ end
+end
+
+def fun_l20_n901(x)
+ if (x < 1)
+ fun_l21_n915(x)
+ else
+ fun_l21_n373(x)
+ end
+end
+
+def fun_l20_n902(x)
+ if (x < 1)
+ fun_l21_n468(x)
+ else
+ fun_l21_n632(x)
+ end
+end
+
+def fun_l20_n903(x)
+ if (x < 1)
+ fun_l21_n970(x)
+ else
+ fun_l21_n54(x)
+ end
+end
+
+def fun_l20_n904(x)
+ if (x < 1)
+ fun_l21_n452(x)
+ else
+ fun_l21_n536(x)
+ end
+end
+
+def fun_l20_n905(x)
+ if (x < 1)
+ fun_l21_n223(x)
+ else
+ fun_l21_n423(x)
+ end
+end
+
+def fun_l20_n906(x)
+ if (x < 1)
+ fun_l21_n102(x)
+ else
+ fun_l21_n755(x)
+ end
+end
+
+def fun_l20_n907(x)
+ if (x < 1)
+ fun_l21_n537(x)
+ else
+ fun_l21_n84(x)
+ end
+end
+
+def fun_l20_n908(x)
+ if (x < 1)
+ fun_l21_n786(x)
+ else
+ fun_l21_n979(x)
+ end
+end
+
+def fun_l20_n909(x)
+ if (x < 1)
+ fun_l21_n573(x)
+ else
+ fun_l21_n965(x)
+ end
+end
+
+def fun_l20_n910(x)
+ if (x < 1)
+ fun_l21_n764(x)
+ else
+ fun_l21_n375(x)
+ end
+end
+
+def fun_l20_n911(x)
+ if (x < 1)
+ fun_l21_n673(x)
+ else
+ fun_l21_n545(x)
+ end
+end
+
+def fun_l20_n912(x)
+ if (x < 1)
+ fun_l21_n616(x)
+ else
+ fun_l21_n257(x)
+ end
+end
+
+def fun_l20_n913(x)
+ if (x < 1)
+ fun_l21_n276(x)
+ else
+ fun_l21_n670(x)
+ end
+end
+
+def fun_l20_n914(x)
+ if (x < 1)
+ fun_l21_n969(x)
+ else
+ fun_l21_n482(x)
+ end
+end
+
+def fun_l20_n915(x)
+ if (x < 1)
+ fun_l21_n603(x)
+ else
+ fun_l21_n916(x)
+ end
+end
+
+def fun_l20_n916(x)
+ if (x < 1)
+ fun_l21_n287(x)
+ else
+ fun_l21_n253(x)
+ end
+end
+
+def fun_l20_n917(x)
+ if (x < 1)
+ fun_l21_n201(x)
+ else
+ fun_l21_n175(x)
+ end
+end
+
+def fun_l20_n918(x)
+ if (x < 1)
+ fun_l21_n557(x)
+ else
+ fun_l21_n668(x)
+ end
+end
+
+def fun_l20_n919(x)
+ if (x < 1)
+ fun_l21_n598(x)
+ else
+ fun_l21_n85(x)
+ end
+end
+
+def fun_l20_n920(x)
+ if (x < 1)
+ fun_l21_n998(x)
+ else
+ fun_l21_n611(x)
+ end
+end
+
+def fun_l20_n921(x)
+ if (x < 1)
+ fun_l21_n22(x)
+ else
+ fun_l21_n76(x)
+ end
+end
+
+def fun_l20_n922(x)
+ if (x < 1)
+ fun_l21_n611(x)
+ else
+ fun_l21_n823(x)
+ end
+end
+
+def fun_l20_n923(x)
+ if (x < 1)
+ fun_l21_n739(x)
+ else
+ fun_l21_n231(x)
+ end
+end
+
+def fun_l20_n924(x)
+ if (x < 1)
+ fun_l21_n806(x)
+ else
+ fun_l21_n362(x)
+ end
+end
+
+def fun_l20_n925(x)
+ if (x < 1)
+ fun_l21_n32(x)
+ else
+ fun_l21_n593(x)
+ end
+end
+
+def fun_l20_n926(x)
+ if (x < 1)
+ fun_l21_n592(x)
+ else
+ fun_l21_n422(x)
+ end
+end
+
+def fun_l20_n927(x)
+ if (x < 1)
+ fun_l21_n624(x)
+ else
+ fun_l21_n690(x)
+ end
+end
+
+def fun_l20_n928(x)
+ if (x < 1)
+ fun_l21_n838(x)
+ else
+ fun_l21_n351(x)
+ end
+end
+
+def fun_l20_n929(x)
+ if (x < 1)
+ fun_l21_n289(x)
+ else
+ fun_l21_n842(x)
+ end
+end
+
+def fun_l20_n930(x)
+ if (x < 1)
+ fun_l21_n948(x)
+ else
+ fun_l21_n679(x)
+ end
+end
+
+def fun_l20_n931(x)
+ if (x < 1)
+ fun_l21_n746(x)
+ else
+ fun_l21_n267(x)
+ end
+end
+
+def fun_l20_n932(x)
+ if (x < 1)
+ fun_l21_n494(x)
+ else
+ fun_l21_n19(x)
+ end
+end
+
+def fun_l20_n933(x)
+ if (x < 1)
+ fun_l21_n8(x)
+ else
+ fun_l21_n234(x)
+ end
+end
+
+def fun_l20_n934(x)
+ if (x < 1)
+ fun_l21_n743(x)
+ else
+ fun_l21_n175(x)
+ end
+end
+
+def fun_l20_n935(x)
+ if (x < 1)
+ fun_l21_n111(x)
+ else
+ fun_l21_n300(x)
+ end
+end
+
+def fun_l20_n936(x)
+ if (x < 1)
+ fun_l21_n482(x)
+ else
+ fun_l21_n431(x)
+ end
+end
+
+def fun_l20_n937(x)
+ if (x < 1)
+ fun_l21_n885(x)
+ else
+ fun_l21_n523(x)
+ end
+end
+
+def fun_l20_n938(x)
+ if (x < 1)
+ fun_l21_n661(x)
+ else
+ fun_l21_n461(x)
+ end
+end
+
+def fun_l20_n939(x)
+ if (x < 1)
+ fun_l21_n809(x)
+ else
+ fun_l21_n868(x)
+ end
+end
+
+def fun_l20_n940(x)
+ if (x < 1)
+ fun_l21_n549(x)
+ else
+ fun_l21_n287(x)
+ end
+end
+
+def fun_l20_n941(x)
+ if (x < 1)
+ fun_l21_n246(x)
+ else
+ fun_l21_n228(x)
+ end
+end
+
+def fun_l20_n942(x)
+ if (x < 1)
+ fun_l21_n656(x)
+ else
+ fun_l21_n399(x)
+ end
+end
+
+def fun_l20_n943(x)
+ if (x < 1)
+ fun_l21_n344(x)
+ else
+ fun_l21_n77(x)
+ end
+end
+
+def fun_l20_n944(x)
+ if (x < 1)
+ fun_l21_n862(x)
+ else
+ fun_l21_n696(x)
+ end
+end
+
+def fun_l20_n945(x)
+ if (x < 1)
+ fun_l21_n892(x)
+ else
+ fun_l21_n782(x)
+ end
+end
+
+def fun_l20_n946(x)
+ if (x < 1)
+ fun_l21_n461(x)
+ else
+ fun_l21_n946(x)
+ end
+end
+
+def fun_l20_n947(x)
+ if (x < 1)
+ fun_l21_n576(x)
+ else
+ fun_l21_n216(x)
+ end
+end
+
+def fun_l20_n948(x)
+ if (x < 1)
+ fun_l21_n136(x)
+ else
+ fun_l21_n132(x)
+ end
+end
+
+def fun_l20_n949(x)
+ if (x < 1)
+ fun_l21_n987(x)
+ else
+ fun_l21_n615(x)
+ end
+end
+
+def fun_l20_n950(x)
+ if (x < 1)
+ fun_l21_n170(x)
+ else
+ fun_l21_n55(x)
+ end
+end
+
+def fun_l20_n951(x)
+ if (x < 1)
+ fun_l21_n260(x)
+ else
+ fun_l21_n675(x)
+ end
+end
+
+def fun_l20_n952(x)
+ if (x < 1)
+ fun_l21_n406(x)
+ else
+ fun_l21_n569(x)
+ end
+end
+
+def fun_l20_n953(x)
+ if (x < 1)
+ fun_l21_n41(x)
+ else
+ fun_l21_n951(x)
+ end
+end
+
+def fun_l20_n954(x)
+ if (x < 1)
+ fun_l21_n467(x)
+ else
+ fun_l21_n837(x)
+ end
+end
+
+def fun_l20_n955(x)
+ if (x < 1)
+ fun_l21_n41(x)
+ else
+ fun_l21_n349(x)
+ end
+end
+
+def fun_l20_n956(x)
+ if (x < 1)
+ fun_l21_n105(x)
+ else
+ fun_l21_n595(x)
+ end
+end
+
+def fun_l20_n957(x)
+ if (x < 1)
+ fun_l21_n132(x)
+ else
+ fun_l21_n622(x)
+ end
+end
+
+def fun_l20_n958(x)
+ if (x < 1)
+ fun_l21_n1(x)
+ else
+ fun_l21_n770(x)
+ end
+end
+
+def fun_l20_n959(x)
+ if (x < 1)
+ fun_l21_n768(x)
+ else
+ fun_l21_n979(x)
+ end
+end
+
+def fun_l20_n960(x)
+ if (x < 1)
+ fun_l21_n954(x)
+ else
+ fun_l21_n906(x)
+ end
+end
+
+def fun_l20_n961(x)
+ if (x < 1)
+ fun_l21_n759(x)
+ else
+ fun_l21_n381(x)
+ end
+end
+
+def fun_l20_n962(x)
+ if (x < 1)
+ fun_l21_n590(x)
+ else
+ fun_l21_n868(x)
+ end
+end
+
+def fun_l20_n963(x)
+ if (x < 1)
+ fun_l21_n119(x)
+ else
+ fun_l21_n962(x)
+ end
+end
+
+def fun_l20_n964(x)
+ if (x < 1)
+ fun_l21_n350(x)
+ else
+ fun_l21_n930(x)
+ end
+end
+
+def fun_l20_n965(x)
+ if (x < 1)
+ fun_l21_n542(x)
+ else
+ fun_l21_n217(x)
+ end
+end
+
+def fun_l20_n966(x)
+ if (x < 1)
+ fun_l21_n375(x)
+ else
+ fun_l21_n244(x)
+ end
+end
+
+def fun_l20_n967(x)
+ if (x < 1)
+ fun_l21_n160(x)
+ else
+ fun_l21_n610(x)
+ end
+end
+
+def fun_l20_n968(x)
+ if (x < 1)
+ fun_l21_n28(x)
+ else
+ fun_l21_n925(x)
+ end
+end
+
+def fun_l20_n969(x)
+ if (x < 1)
+ fun_l21_n661(x)
+ else
+ fun_l21_n944(x)
+ end
+end
+
+def fun_l20_n970(x)
+ if (x < 1)
+ fun_l21_n534(x)
+ else
+ fun_l21_n872(x)
+ end
+end
+
+def fun_l20_n971(x)
+ if (x < 1)
+ fun_l21_n684(x)
+ else
+ fun_l21_n271(x)
+ end
+end
+
+def fun_l20_n972(x)
+ if (x < 1)
+ fun_l21_n493(x)
+ else
+ fun_l21_n893(x)
+ end
+end
+
+def fun_l20_n973(x)
+ if (x < 1)
+ fun_l21_n912(x)
+ else
+ fun_l21_n385(x)
+ end
+end
+
+def fun_l20_n974(x)
+ if (x < 1)
+ fun_l21_n528(x)
+ else
+ fun_l21_n948(x)
+ end
+end
+
+def fun_l20_n975(x)
+ if (x < 1)
+ fun_l21_n263(x)
+ else
+ fun_l21_n362(x)
+ end
+end
+
+def fun_l20_n976(x)
+ if (x < 1)
+ fun_l21_n86(x)
+ else
+ fun_l21_n937(x)
+ end
+end
+
+def fun_l20_n977(x)
+ if (x < 1)
+ fun_l21_n886(x)
+ else
+ fun_l21_n845(x)
+ end
+end
+
+def fun_l20_n978(x)
+ if (x < 1)
+ fun_l21_n681(x)
+ else
+ fun_l21_n437(x)
+ end
+end
+
+def fun_l20_n979(x)
+ if (x < 1)
+ fun_l21_n342(x)
+ else
+ fun_l21_n333(x)
+ end
+end
+
+def fun_l20_n980(x)
+ if (x < 1)
+ fun_l21_n160(x)
+ else
+ fun_l21_n635(x)
+ end
+end
+
+def fun_l20_n981(x)
+ if (x < 1)
+ fun_l21_n580(x)
+ else
+ fun_l21_n895(x)
+ end
+end
+
+def fun_l20_n982(x)
+ if (x < 1)
+ fun_l21_n578(x)
+ else
+ fun_l21_n669(x)
+ end
+end
+
+def fun_l20_n983(x)
+ if (x < 1)
+ fun_l21_n939(x)
+ else
+ fun_l21_n321(x)
+ end
+end
+
+def fun_l20_n984(x)
+ if (x < 1)
+ fun_l21_n465(x)
+ else
+ fun_l21_n175(x)
+ end
+end
+
+def fun_l20_n985(x)
+ if (x < 1)
+ fun_l21_n522(x)
+ else
+ fun_l21_n108(x)
+ end
+end
+
+def fun_l20_n986(x)
+ if (x < 1)
+ fun_l21_n347(x)
+ else
+ fun_l21_n207(x)
+ end
+end
+
+def fun_l20_n987(x)
+ if (x < 1)
+ fun_l21_n844(x)
+ else
+ fun_l21_n39(x)
+ end
+end
+
+def fun_l20_n988(x)
+ if (x < 1)
+ fun_l21_n104(x)
+ else
+ fun_l21_n528(x)
+ end
+end
+
+def fun_l20_n989(x)
+ if (x < 1)
+ fun_l21_n486(x)
+ else
+ fun_l21_n443(x)
+ end
+end
+
+def fun_l20_n990(x)
+ if (x < 1)
+ fun_l21_n643(x)
+ else
+ fun_l21_n503(x)
+ end
+end
+
+def fun_l20_n991(x)
+ if (x < 1)
+ fun_l21_n428(x)
+ else
+ fun_l21_n813(x)
+ end
+end
+
+def fun_l20_n992(x)
+ if (x < 1)
+ fun_l21_n452(x)
+ else
+ fun_l21_n536(x)
+ end
+end
+
+def fun_l20_n993(x)
+ if (x < 1)
+ fun_l21_n247(x)
+ else
+ fun_l21_n961(x)
+ end
+end
+
+def fun_l20_n994(x)
+ if (x < 1)
+ fun_l21_n749(x)
+ else
+ fun_l21_n554(x)
+ end
+end
+
+def fun_l20_n995(x)
+ if (x < 1)
+ fun_l21_n333(x)
+ else
+ fun_l21_n162(x)
+ end
+end
+
+def fun_l20_n996(x)
+ if (x < 1)
+ fun_l21_n686(x)
+ else
+ fun_l21_n635(x)
+ end
+end
+
+def fun_l20_n997(x)
+ if (x < 1)
+ fun_l21_n709(x)
+ else
+ fun_l21_n953(x)
+ end
+end
+
+def fun_l20_n998(x)
+ if (x < 1)
+ fun_l21_n315(x)
+ else
+ fun_l21_n818(x)
+ end
+end
+
+def fun_l20_n999(x)
+ if (x < 1)
+ fun_l21_n543(x)
+ else
+ fun_l21_n385(x)
+ end
+end
+
+def fun_l21_n0(x)
+ if (x < 1)
+ fun_l22_n736(x)
+ else
+ fun_l22_n837(x)
+ end
+end
+
+def fun_l21_n1(x)
+ if (x < 1)
+ fun_l22_n333(x)
+ else
+ fun_l22_n358(x)
+ end
+end
+
+def fun_l21_n2(x)
+ if (x < 1)
+ fun_l22_n150(x)
+ else
+ fun_l22_n469(x)
+ end
+end
+
+def fun_l21_n3(x)
+ if (x < 1)
+ fun_l22_n899(x)
+ else
+ fun_l22_n917(x)
+ end
+end
+
+def fun_l21_n4(x)
+ if (x < 1)
+ fun_l22_n943(x)
+ else
+ fun_l22_n435(x)
+ end
+end
+
+def fun_l21_n5(x)
+ if (x < 1)
+ fun_l22_n56(x)
+ else
+ fun_l22_n123(x)
+ end
+end
+
+def fun_l21_n6(x)
+ if (x < 1)
+ fun_l22_n849(x)
+ else
+ fun_l22_n475(x)
+ end
+end
+
+def fun_l21_n7(x)
+ if (x < 1)
+ fun_l22_n931(x)
+ else
+ fun_l22_n529(x)
+ end
+end
+
+def fun_l21_n8(x)
+ if (x < 1)
+ fun_l22_n192(x)
+ else
+ fun_l22_n441(x)
+ end
+end
+
+def fun_l21_n9(x)
+ if (x < 1)
+ fun_l22_n84(x)
+ else
+ fun_l22_n428(x)
+ end
+end
+
+def fun_l21_n10(x)
+ if (x < 1)
+ fun_l22_n355(x)
+ else
+ fun_l22_n432(x)
+ end
+end
+
+def fun_l21_n11(x)
+ if (x < 1)
+ fun_l22_n380(x)
+ else
+ fun_l22_n739(x)
+ end
+end
+
+def fun_l21_n12(x)
+ if (x < 1)
+ fun_l22_n559(x)
+ else
+ fun_l22_n492(x)
+ end
+end
+
+def fun_l21_n13(x)
+ if (x < 1)
+ fun_l22_n542(x)
+ else
+ fun_l22_n284(x)
+ end
+end
+
+def fun_l21_n14(x)
+ if (x < 1)
+ fun_l22_n106(x)
+ else
+ fun_l22_n443(x)
+ end
+end
+
+def fun_l21_n15(x)
+ if (x < 1)
+ fun_l22_n769(x)
+ else
+ fun_l22_n111(x)
+ end
+end
+
+def fun_l21_n16(x)
+ if (x < 1)
+ fun_l22_n982(x)
+ else
+ fun_l22_n855(x)
+ end
+end
+
+def fun_l21_n17(x)
+ if (x < 1)
+ fun_l22_n994(x)
+ else
+ fun_l22_n952(x)
+ end
+end
+
+def fun_l21_n18(x)
+ if (x < 1)
+ fun_l22_n567(x)
+ else
+ fun_l22_n741(x)
+ end
+end
+
+def fun_l21_n19(x)
+ if (x < 1)
+ fun_l22_n851(x)
+ else
+ fun_l22_n830(x)
+ end
+end
+
+def fun_l21_n20(x)
+ if (x < 1)
+ fun_l22_n353(x)
+ else
+ fun_l22_n184(x)
+ end
+end
+
+def fun_l21_n21(x)
+ if (x < 1)
+ fun_l22_n891(x)
+ else
+ fun_l22_n629(x)
+ end
+end
+
+def fun_l21_n22(x)
+ if (x < 1)
+ fun_l22_n521(x)
+ else
+ fun_l22_n932(x)
+ end
+end
+
+def fun_l21_n23(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n913(x)
+ end
+end
+
+def fun_l21_n24(x)
+ if (x < 1)
+ fun_l22_n839(x)
+ else
+ fun_l22_n402(x)
+ end
+end
+
+def fun_l21_n25(x)
+ if (x < 1)
+ fun_l22_n525(x)
+ else
+ fun_l22_n247(x)
+ end
+end
+
+def fun_l21_n26(x)
+ if (x < 1)
+ fun_l22_n906(x)
+ else
+ fun_l22_n392(x)
+ end
+end
+
+def fun_l21_n27(x)
+ if (x < 1)
+ fun_l22_n716(x)
+ else
+ fun_l22_n804(x)
+ end
+end
+
+def fun_l21_n28(x)
+ if (x < 1)
+ fun_l22_n444(x)
+ else
+ fun_l22_n21(x)
+ end
+end
+
+def fun_l21_n29(x)
+ if (x < 1)
+ fun_l22_n674(x)
+ else
+ fun_l22_n695(x)
+ end
+end
+
+def fun_l21_n30(x)
+ if (x < 1)
+ fun_l22_n948(x)
+ else
+ fun_l22_n447(x)
+ end
+end
+
+def fun_l21_n31(x)
+ if (x < 1)
+ fun_l22_n460(x)
+ else
+ fun_l22_n743(x)
+ end
+end
+
+def fun_l21_n32(x)
+ if (x < 1)
+ fun_l22_n369(x)
+ else
+ fun_l22_n331(x)
+ end
+end
+
+def fun_l21_n33(x)
+ if (x < 1)
+ fun_l22_n602(x)
+ else
+ fun_l22_n934(x)
+ end
+end
+
+def fun_l21_n34(x)
+ if (x < 1)
+ fun_l22_n572(x)
+ else
+ fun_l22_n267(x)
+ end
+end
+
+def fun_l21_n35(x)
+ if (x < 1)
+ fun_l22_n517(x)
+ else
+ fun_l22_n298(x)
+ end
+end
+
+def fun_l21_n36(x)
+ if (x < 1)
+ fun_l22_n998(x)
+ else
+ fun_l22_n561(x)
+ end
+end
+
+def fun_l21_n37(x)
+ if (x < 1)
+ fun_l22_n457(x)
+ else
+ fun_l22_n513(x)
+ end
+end
+
+def fun_l21_n38(x)
+ if (x < 1)
+ fun_l22_n378(x)
+ else
+ fun_l22_n238(x)
+ end
+end
+
+def fun_l21_n39(x)
+ if (x < 1)
+ fun_l22_n788(x)
+ else
+ fun_l22_n45(x)
+ end
+end
+
+def fun_l21_n40(x)
+ if (x < 1)
+ fun_l22_n299(x)
+ else
+ fun_l22_n516(x)
+ end
+end
+
+def fun_l21_n41(x)
+ if (x < 1)
+ fun_l22_n454(x)
+ else
+ fun_l22_n274(x)
+ end
+end
+
+def fun_l21_n42(x)
+ if (x < 1)
+ fun_l22_n855(x)
+ else
+ fun_l22_n360(x)
+ end
+end
+
+def fun_l21_n43(x)
+ if (x < 1)
+ fun_l22_n577(x)
+ else
+ fun_l22_n213(x)
+ end
+end
+
+def fun_l21_n44(x)
+ if (x < 1)
+ fun_l22_n569(x)
+ else
+ fun_l22_n857(x)
+ end
+end
+
+def fun_l21_n45(x)
+ if (x < 1)
+ fun_l22_n667(x)
+ else
+ fun_l22_n285(x)
+ end
+end
+
+def fun_l21_n46(x)
+ if (x < 1)
+ fun_l22_n915(x)
+ else
+ fun_l22_n232(x)
+ end
+end
+
+def fun_l21_n47(x)
+ if (x < 1)
+ fun_l22_n124(x)
+ else
+ fun_l22_n708(x)
+ end
+end
+
+def fun_l21_n48(x)
+ if (x < 1)
+ fun_l22_n184(x)
+ else
+ fun_l22_n272(x)
+ end
+end
+
+def fun_l21_n49(x)
+ if (x < 1)
+ fun_l22_n376(x)
+ else
+ fun_l22_n138(x)
+ end
+end
+
+def fun_l21_n50(x)
+ if (x < 1)
+ fun_l22_n897(x)
+ else
+ fun_l22_n857(x)
+ end
+end
+
+def fun_l21_n51(x)
+ if (x < 1)
+ fun_l22_n335(x)
+ else
+ fun_l22_n614(x)
+ end
+end
+
+def fun_l21_n52(x)
+ if (x < 1)
+ fun_l22_n921(x)
+ else
+ fun_l22_n109(x)
+ end
+end
+
+def fun_l21_n53(x)
+ if (x < 1)
+ fun_l22_n27(x)
+ else
+ fun_l22_n609(x)
+ end
+end
+
+def fun_l21_n54(x)
+ if (x < 1)
+ fun_l22_n831(x)
+ else
+ fun_l22_n769(x)
+ end
+end
+
+def fun_l21_n55(x)
+ if (x < 1)
+ fun_l22_n936(x)
+ else
+ fun_l22_n250(x)
+ end
+end
+
+def fun_l21_n56(x)
+ if (x < 1)
+ fun_l22_n261(x)
+ else
+ fun_l22_n142(x)
+ end
+end
+
+def fun_l21_n57(x)
+ if (x < 1)
+ fun_l22_n721(x)
+ else
+ fun_l22_n604(x)
+ end
+end
+
+def fun_l21_n58(x)
+ if (x < 1)
+ fun_l22_n760(x)
+ else
+ fun_l22_n545(x)
+ end
+end
+
+def fun_l21_n59(x)
+ if (x < 1)
+ fun_l22_n934(x)
+ else
+ fun_l22_n110(x)
+ end
+end
+
+def fun_l21_n60(x)
+ if (x < 1)
+ fun_l22_n422(x)
+ else
+ fun_l22_n31(x)
+ end
+end
+
+def fun_l21_n61(x)
+ if (x < 1)
+ fun_l22_n776(x)
+ else
+ fun_l22_n251(x)
+ end
+end
+
+def fun_l21_n62(x)
+ if (x < 1)
+ fun_l22_n76(x)
+ else
+ fun_l22_n930(x)
+ end
+end
+
+def fun_l21_n63(x)
+ if (x < 1)
+ fun_l22_n331(x)
+ else
+ fun_l22_n550(x)
+ end
+end
+
+def fun_l21_n64(x)
+ if (x < 1)
+ fun_l22_n845(x)
+ else
+ fun_l22_n62(x)
+ end
+end
+
+def fun_l21_n65(x)
+ if (x < 1)
+ fun_l22_n887(x)
+ else
+ fun_l22_n784(x)
+ end
+end
+
+def fun_l21_n66(x)
+ if (x < 1)
+ fun_l22_n353(x)
+ else
+ fun_l22_n918(x)
+ end
+end
+
+def fun_l21_n67(x)
+ if (x < 1)
+ fun_l22_n682(x)
+ else
+ fun_l22_n840(x)
+ end
+end
+
+def fun_l21_n68(x)
+ if (x < 1)
+ fun_l22_n966(x)
+ else
+ fun_l22_n187(x)
+ end
+end
+
+def fun_l21_n69(x)
+ if (x < 1)
+ fun_l22_n424(x)
+ else
+ fun_l22_n674(x)
+ end
+end
+
+def fun_l21_n70(x)
+ if (x < 1)
+ fun_l22_n530(x)
+ else
+ fun_l22_n148(x)
+ end
+end
+
+def fun_l21_n71(x)
+ if (x < 1)
+ fun_l22_n616(x)
+ else
+ fun_l22_n945(x)
+ end
+end
+
+def fun_l21_n72(x)
+ if (x < 1)
+ fun_l22_n634(x)
+ else
+ fun_l22_n945(x)
+ end
+end
+
+def fun_l21_n73(x)
+ if (x < 1)
+ fun_l22_n153(x)
+ else
+ fun_l22_n657(x)
+ end
+end
+
+def fun_l21_n74(x)
+ if (x < 1)
+ fun_l22_n284(x)
+ else
+ fun_l22_n83(x)
+ end
+end
+
+def fun_l21_n75(x)
+ if (x < 1)
+ fun_l22_n292(x)
+ else
+ fun_l22_n440(x)
+ end
+end
+
+def fun_l21_n76(x)
+ if (x < 1)
+ fun_l22_n932(x)
+ else
+ fun_l22_n29(x)
+ end
+end
+
+def fun_l21_n77(x)
+ if (x < 1)
+ fun_l22_n292(x)
+ else
+ fun_l22_n866(x)
+ end
+end
+
+def fun_l21_n78(x)
+ if (x < 1)
+ fun_l22_n822(x)
+ else
+ fun_l22_n838(x)
+ end
+end
+
+def fun_l21_n79(x)
+ if (x < 1)
+ fun_l22_n297(x)
+ else
+ fun_l22_n677(x)
+ end
+end
+
+def fun_l21_n80(x)
+ if (x < 1)
+ fun_l22_n540(x)
+ else
+ fun_l22_n975(x)
+ end
+end
+
+def fun_l21_n81(x)
+ if (x < 1)
+ fun_l22_n375(x)
+ else
+ fun_l22_n735(x)
+ end
+end
+
+def fun_l21_n82(x)
+ if (x < 1)
+ fun_l22_n549(x)
+ else
+ fun_l22_n844(x)
+ end
+end
+
+def fun_l21_n83(x)
+ if (x < 1)
+ fun_l22_n763(x)
+ else
+ fun_l22_n863(x)
+ end
+end
+
+def fun_l21_n84(x)
+ if (x < 1)
+ fun_l22_n993(x)
+ else
+ fun_l22_n155(x)
+ end
+end
+
+def fun_l21_n85(x)
+ if (x < 1)
+ fun_l22_n751(x)
+ else
+ fun_l22_n264(x)
+ end
+end
+
+def fun_l21_n86(x)
+ if (x < 1)
+ fun_l22_n517(x)
+ else
+ fun_l22_n752(x)
+ end
+end
+
+def fun_l21_n87(x)
+ if (x < 1)
+ fun_l22_n477(x)
+ else
+ fun_l22_n486(x)
+ end
+end
+
+def fun_l21_n88(x)
+ if (x < 1)
+ fun_l22_n220(x)
+ else
+ fun_l22_n4(x)
+ end
+end
+
+def fun_l21_n89(x)
+ if (x < 1)
+ fun_l22_n678(x)
+ else
+ fun_l22_n692(x)
+ end
+end
+
+def fun_l21_n90(x)
+ if (x < 1)
+ fun_l22_n75(x)
+ else
+ fun_l22_n306(x)
+ end
+end
+
+def fun_l21_n91(x)
+ if (x < 1)
+ fun_l22_n460(x)
+ else
+ fun_l22_n514(x)
+ end
+end
+
+def fun_l21_n92(x)
+ if (x < 1)
+ fun_l22_n446(x)
+ else
+ fun_l22_n201(x)
+ end
+end
+
+def fun_l21_n93(x)
+ if (x < 1)
+ fun_l22_n872(x)
+ else
+ fun_l22_n611(x)
+ end
+end
+
+def fun_l21_n94(x)
+ if (x < 1)
+ fun_l22_n809(x)
+ else
+ fun_l22_n91(x)
+ end
+end
+
+def fun_l21_n95(x)
+ if (x < 1)
+ fun_l22_n565(x)
+ else
+ fun_l22_n968(x)
+ end
+end
+
+def fun_l21_n96(x)
+ if (x < 1)
+ fun_l22_n765(x)
+ else
+ fun_l22_n622(x)
+ end
+end
+
+def fun_l21_n97(x)
+ if (x < 1)
+ fun_l22_n856(x)
+ else
+ fun_l22_n923(x)
+ end
+end
+
+def fun_l21_n98(x)
+ if (x < 1)
+ fun_l22_n14(x)
+ else
+ fun_l22_n742(x)
+ end
+end
+
+def fun_l21_n99(x)
+ if (x < 1)
+ fun_l22_n214(x)
+ else
+ fun_l22_n118(x)
+ end
+end
+
+def fun_l21_n100(x)
+ if (x < 1)
+ fun_l22_n992(x)
+ else
+ fun_l22_n610(x)
+ end
+end
+
+def fun_l21_n101(x)
+ if (x < 1)
+ fun_l22_n603(x)
+ else
+ fun_l22_n208(x)
+ end
+end
+
+def fun_l21_n102(x)
+ if (x < 1)
+ fun_l22_n647(x)
+ else
+ fun_l22_n753(x)
+ end
+end
+
+def fun_l21_n103(x)
+ if (x < 1)
+ fun_l22_n952(x)
+ else
+ fun_l22_n25(x)
+ end
+end
+
+def fun_l21_n104(x)
+ if (x < 1)
+ fun_l22_n635(x)
+ else
+ fun_l22_n381(x)
+ end
+end
+
+def fun_l21_n105(x)
+ if (x < 1)
+ fun_l22_n258(x)
+ else
+ fun_l22_n346(x)
+ end
+end
+
+def fun_l21_n106(x)
+ if (x < 1)
+ fun_l22_n732(x)
+ else
+ fun_l22_n851(x)
+ end
+end
+
+def fun_l21_n107(x)
+ if (x < 1)
+ fun_l22_n67(x)
+ else
+ fun_l22_n80(x)
+ end
+end
+
+def fun_l21_n108(x)
+ if (x < 1)
+ fun_l22_n237(x)
+ else
+ fun_l22_n600(x)
+ end
+end
+
+def fun_l21_n109(x)
+ if (x < 1)
+ fun_l22_n448(x)
+ else
+ fun_l22_n768(x)
+ end
+end
+
+def fun_l21_n110(x)
+ if (x < 1)
+ fun_l22_n52(x)
+ else
+ fun_l22_n849(x)
+ end
+end
+
+def fun_l21_n111(x)
+ if (x < 1)
+ fun_l22_n471(x)
+ else
+ fun_l22_n400(x)
+ end
+end
+
+def fun_l21_n112(x)
+ if (x < 1)
+ fun_l22_n655(x)
+ else
+ fun_l22_n691(x)
+ end
+end
+
+def fun_l21_n113(x)
+ if (x < 1)
+ fun_l22_n325(x)
+ else
+ fun_l22_n936(x)
+ end
+end
+
+def fun_l21_n114(x)
+ if (x < 1)
+ fun_l22_n693(x)
+ else
+ fun_l22_n118(x)
+ end
+end
+
+def fun_l21_n115(x)
+ if (x < 1)
+ fun_l22_n881(x)
+ else
+ fun_l22_n167(x)
+ end
+end
+
+def fun_l21_n116(x)
+ if (x < 1)
+ fun_l22_n958(x)
+ else
+ fun_l22_n36(x)
+ end
+end
+
+def fun_l21_n117(x)
+ if (x < 1)
+ fun_l22_n233(x)
+ else
+ fun_l22_n649(x)
+ end
+end
+
+def fun_l21_n118(x)
+ if (x < 1)
+ fun_l22_n847(x)
+ else
+ fun_l22_n544(x)
+ end
+end
+
+def fun_l21_n119(x)
+ if (x < 1)
+ fun_l22_n392(x)
+ else
+ fun_l22_n2(x)
+ end
+end
+
+def fun_l21_n120(x)
+ if (x < 1)
+ fun_l22_n750(x)
+ else
+ fun_l22_n481(x)
+ end
+end
+
+def fun_l21_n121(x)
+ if (x < 1)
+ fun_l22_n124(x)
+ else
+ fun_l22_n769(x)
+ end
+end
+
+def fun_l21_n122(x)
+ if (x < 1)
+ fun_l22_n483(x)
+ else
+ fun_l22_n147(x)
+ end
+end
+
+def fun_l21_n123(x)
+ if (x < 1)
+ fun_l22_n543(x)
+ else
+ fun_l22_n454(x)
+ end
+end
+
+def fun_l21_n124(x)
+ if (x < 1)
+ fun_l22_n24(x)
+ else
+ fun_l22_n815(x)
+ end
+end
+
+def fun_l21_n125(x)
+ if (x < 1)
+ fun_l22_n315(x)
+ else
+ fun_l22_n263(x)
+ end
+end
+
+def fun_l21_n126(x)
+ if (x < 1)
+ fun_l22_n934(x)
+ else
+ fun_l22_n351(x)
+ end
+end
+
+def fun_l21_n127(x)
+ if (x < 1)
+ fun_l22_n982(x)
+ else
+ fun_l22_n755(x)
+ end
+end
+
+def fun_l21_n128(x)
+ if (x < 1)
+ fun_l22_n146(x)
+ else
+ fun_l22_n345(x)
+ end
+end
+
+def fun_l21_n129(x)
+ if (x < 1)
+ fun_l22_n85(x)
+ else
+ fun_l22_n356(x)
+ end
+end
+
+def fun_l21_n130(x)
+ if (x < 1)
+ fun_l22_n987(x)
+ else
+ fun_l22_n103(x)
+ end
+end
+
+def fun_l21_n131(x)
+ if (x < 1)
+ fun_l22_n413(x)
+ else
+ fun_l22_n260(x)
+ end
+end
+
+def fun_l21_n132(x)
+ if (x < 1)
+ fun_l22_n615(x)
+ else
+ fun_l22_n742(x)
+ end
+end
+
+def fun_l21_n133(x)
+ if (x < 1)
+ fun_l22_n836(x)
+ else
+ fun_l22_n214(x)
+ end
+end
+
+def fun_l21_n134(x)
+ if (x < 1)
+ fun_l22_n85(x)
+ else
+ fun_l22_n916(x)
+ end
+end
+
+def fun_l21_n135(x)
+ if (x < 1)
+ fun_l22_n21(x)
+ else
+ fun_l22_n902(x)
+ end
+end
+
+def fun_l21_n136(x)
+ if (x < 1)
+ fun_l22_n842(x)
+ else
+ fun_l22_n475(x)
+ end
+end
+
+def fun_l21_n137(x)
+ if (x < 1)
+ fun_l22_n573(x)
+ else
+ fun_l22_n108(x)
+ end
+end
+
+def fun_l21_n138(x)
+ if (x < 1)
+ fun_l22_n394(x)
+ else
+ fun_l22_n783(x)
+ end
+end
+
+def fun_l21_n139(x)
+ if (x < 1)
+ fun_l22_n514(x)
+ else
+ fun_l22_n37(x)
+ end
+end
+
+def fun_l21_n140(x)
+ if (x < 1)
+ fun_l22_n358(x)
+ else
+ fun_l22_n768(x)
+ end
+end
+
+def fun_l21_n141(x)
+ if (x < 1)
+ fun_l22_n201(x)
+ else
+ fun_l22_n981(x)
+ end
+end
+
+def fun_l21_n142(x)
+ if (x < 1)
+ fun_l22_n371(x)
+ else
+ fun_l22_n66(x)
+ end
+end
+
+def fun_l21_n143(x)
+ if (x < 1)
+ fun_l22_n41(x)
+ else
+ fun_l22_n869(x)
+ end
+end
+
+def fun_l21_n144(x)
+ if (x < 1)
+ fun_l22_n961(x)
+ else
+ fun_l22_n488(x)
+ end
+end
+
+def fun_l21_n145(x)
+ if (x < 1)
+ fun_l22_n769(x)
+ else
+ fun_l22_n82(x)
+ end
+end
+
+def fun_l21_n146(x)
+ if (x < 1)
+ fun_l22_n700(x)
+ else
+ fun_l22_n276(x)
+ end
+end
+
+def fun_l21_n147(x)
+ if (x < 1)
+ fun_l22_n439(x)
+ else
+ fun_l22_n654(x)
+ end
+end
+
+def fun_l21_n148(x)
+ if (x < 1)
+ fun_l22_n130(x)
+ else
+ fun_l22_n825(x)
+ end
+end
+
+def fun_l21_n149(x)
+ if (x < 1)
+ fun_l22_n174(x)
+ else
+ fun_l22_n907(x)
+ end
+end
+
+def fun_l21_n150(x)
+ if (x < 1)
+ fun_l22_n386(x)
+ else
+ fun_l22_n760(x)
+ end
+end
+
+def fun_l21_n151(x)
+ if (x < 1)
+ fun_l22_n460(x)
+ else
+ fun_l22_n403(x)
+ end
+end
+
+def fun_l21_n152(x)
+ if (x < 1)
+ fun_l22_n861(x)
+ else
+ fun_l22_n832(x)
+ end
+end
+
+def fun_l21_n153(x)
+ if (x < 1)
+ fun_l22_n564(x)
+ else
+ fun_l22_n604(x)
+ end
+end
+
+def fun_l21_n154(x)
+ if (x < 1)
+ fun_l22_n402(x)
+ else
+ fun_l22_n999(x)
+ end
+end
+
+def fun_l21_n155(x)
+ if (x < 1)
+ fun_l22_n645(x)
+ else
+ fun_l22_n807(x)
+ end
+end
+
+def fun_l21_n156(x)
+ if (x < 1)
+ fun_l22_n709(x)
+ else
+ fun_l22_n930(x)
+ end
+end
+
+def fun_l21_n157(x)
+ if (x < 1)
+ fun_l22_n353(x)
+ else
+ fun_l22_n462(x)
+ end
+end
+
+def fun_l21_n158(x)
+ if (x < 1)
+ fun_l22_n697(x)
+ else
+ fun_l22_n463(x)
+ end
+end
+
+def fun_l21_n159(x)
+ if (x < 1)
+ fun_l22_n690(x)
+ else
+ fun_l22_n309(x)
+ end
+end
+
+def fun_l21_n160(x)
+ if (x < 1)
+ fun_l22_n889(x)
+ else
+ fun_l22_n326(x)
+ end
+end
+
+def fun_l21_n161(x)
+ if (x < 1)
+ fun_l22_n952(x)
+ else
+ fun_l22_n225(x)
+ end
+end
+
+def fun_l21_n162(x)
+ if (x < 1)
+ fun_l22_n345(x)
+ else
+ fun_l22_n168(x)
+ end
+end
+
+def fun_l21_n163(x)
+ if (x < 1)
+ fun_l22_n437(x)
+ else
+ fun_l22_n494(x)
+ end
+end
+
+def fun_l21_n164(x)
+ if (x < 1)
+ fun_l22_n151(x)
+ else
+ fun_l22_n846(x)
+ end
+end
+
+def fun_l21_n165(x)
+ if (x < 1)
+ fun_l22_n324(x)
+ else
+ fun_l22_n999(x)
+ end
+end
+
+def fun_l21_n166(x)
+ if (x < 1)
+ fun_l22_n232(x)
+ else
+ fun_l22_n473(x)
+ end
+end
+
+def fun_l21_n167(x)
+ if (x < 1)
+ fun_l22_n934(x)
+ else
+ fun_l22_n437(x)
+ end
+end
+
+def fun_l21_n168(x)
+ if (x < 1)
+ fun_l22_n738(x)
+ else
+ fun_l22_n410(x)
+ end
+end
+
+def fun_l21_n169(x)
+ if (x < 1)
+ fun_l22_n686(x)
+ else
+ fun_l22_n108(x)
+ end
+end
+
+def fun_l21_n170(x)
+ if (x < 1)
+ fun_l22_n595(x)
+ else
+ fun_l22_n935(x)
+ end
+end
+
+def fun_l21_n171(x)
+ if (x < 1)
+ fun_l22_n723(x)
+ else
+ fun_l22_n478(x)
+ end
+end
+
+def fun_l21_n172(x)
+ if (x < 1)
+ fun_l22_n610(x)
+ else
+ fun_l22_n709(x)
+ end
+end
+
+def fun_l21_n173(x)
+ if (x < 1)
+ fun_l22_n539(x)
+ else
+ fun_l22_n17(x)
+ end
+end
+
+def fun_l21_n174(x)
+ if (x < 1)
+ fun_l22_n612(x)
+ else
+ fun_l22_n235(x)
+ end
+end
+
+def fun_l21_n175(x)
+ if (x < 1)
+ fun_l22_n835(x)
+ else
+ fun_l22_n138(x)
+ end
+end
+
+def fun_l21_n176(x)
+ if (x < 1)
+ fun_l22_n997(x)
+ else
+ fun_l22_n123(x)
+ end
+end
+
+def fun_l21_n177(x)
+ if (x < 1)
+ fun_l22_n97(x)
+ else
+ fun_l22_n997(x)
+ end
+end
+
+def fun_l21_n178(x)
+ if (x < 1)
+ fun_l22_n842(x)
+ else
+ fun_l22_n925(x)
+ end
+end
+
+def fun_l21_n179(x)
+ if (x < 1)
+ fun_l22_n159(x)
+ else
+ fun_l22_n412(x)
+ end
+end
+
+def fun_l21_n180(x)
+ if (x < 1)
+ fun_l22_n109(x)
+ else
+ fun_l22_n691(x)
+ end
+end
+
+def fun_l21_n181(x)
+ if (x < 1)
+ fun_l22_n315(x)
+ else
+ fun_l22_n127(x)
+ end
+end
+
+def fun_l21_n182(x)
+ if (x < 1)
+ fun_l22_n220(x)
+ else
+ fun_l22_n143(x)
+ end
+end
+
+def fun_l21_n183(x)
+ if (x < 1)
+ fun_l22_n493(x)
+ else
+ fun_l22_n895(x)
+ end
+end
+
+def fun_l21_n184(x)
+ if (x < 1)
+ fun_l22_n667(x)
+ else
+ fun_l22_n675(x)
+ end
+end
+
+def fun_l21_n185(x)
+ if (x < 1)
+ fun_l22_n995(x)
+ else
+ fun_l22_n4(x)
+ end
+end
+
+def fun_l21_n186(x)
+ if (x < 1)
+ fun_l22_n210(x)
+ else
+ fun_l22_n690(x)
+ end
+end
+
+def fun_l21_n187(x)
+ if (x < 1)
+ fun_l22_n413(x)
+ else
+ fun_l22_n227(x)
+ end
+end
+
+def fun_l21_n188(x)
+ if (x < 1)
+ fun_l22_n562(x)
+ else
+ fun_l22_n591(x)
+ end
+end
+
+def fun_l21_n189(x)
+ if (x < 1)
+ fun_l22_n171(x)
+ else
+ fun_l22_n891(x)
+ end
+end
+
+def fun_l21_n190(x)
+ if (x < 1)
+ fun_l22_n207(x)
+ else
+ fun_l22_n401(x)
+ end
+end
+
+def fun_l21_n191(x)
+ if (x < 1)
+ fun_l22_n703(x)
+ else
+ fun_l22_n604(x)
+ end
+end
+
+def fun_l21_n192(x)
+ if (x < 1)
+ fun_l22_n772(x)
+ else
+ fun_l22_n321(x)
+ end
+end
+
+def fun_l21_n193(x)
+ if (x < 1)
+ fun_l22_n576(x)
+ else
+ fun_l22_n273(x)
+ end
+end
+
+def fun_l21_n194(x)
+ if (x < 1)
+ fun_l22_n897(x)
+ else
+ fun_l22_n624(x)
+ end
+end
+
+def fun_l21_n195(x)
+ if (x < 1)
+ fun_l22_n909(x)
+ else
+ fun_l22_n216(x)
+ end
+end
+
+def fun_l21_n196(x)
+ if (x < 1)
+ fun_l22_n904(x)
+ else
+ fun_l22_n618(x)
+ end
+end
+
+def fun_l21_n197(x)
+ if (x < 1)
+ fun_l22_n410(x)
+ else
+ fun_l22_n926(x)
+ end
+end
+
+def fun_l21_n198(x)
+ if (x < 1)
+ fun_l22_n884(x)
+ else
+ fun_l22_n174(x)
+ end
+end
+
+def fun_l21_n199(x)
+ if (x < 1)
+ fun_l22_n407(x)
+ else
+ fun_l22_n270(x)
+ end
+end
+
+def fun_l21_n200(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n2(x)
+ end
+end
+
+def fun_l21_n201(x)
+ if (x < 1)
+ fun_l22_n143(x)
+ else
+ fun_l22_n93(x)
+ end
+end
+
+def fun_l21_n202(x)
+ if (x < 1)
+ fun_l22_n397(x)
+ else
+ fun_l22_n424(x)
+ end
+end
+
+def fun_l21_n203(x)
+ if (x < 1)
+ fun_l22_n183(x)
+ else
+ fun_l22_n258(x)
+ end
+end
+
+def fun_l21_n204(x)
+ if (x < 1)
+ fun_l22_n12(x)
+ else
+ fun_l22_n50(x)
+ end
+end
+
+def fun_l21_n205(x)
+ if (x < 1)
+ fun_l22_n488(x)
+ else
+ fun_l22_n148(x)
+ end
+end
+
+def fun_l21_n206(x)
+ if (x < 1)
+ fun_l22_n516(x)
+ else
+ fun_l22_n87(x)
+ end
+end
+
+def fun_l21_n207(x)
+ if (x < 1)
+ fun_l22_n810(x)
+ else
+ fun_l22_n773(x)
+ end
+end
+
+def fun_l21_n208(x)
+ if (x < 1)
+ fun_l22_n508(x)
+ else
+ fun_l22_n898(x)
+ end
+end
+
+def fun_l21_n209(x)
+ if (x < 1)
+ fun_l22_n188(x)
+ else
+ fun_l22_n815(x)
+ end
+end
+
+def fun_l21_n210(x)
+ if (x < 1)
+ fun_l22_n86(x)
+ else
+ fun_l22_n615(x)
+ end
+end
+
+def fun_l21_n211(x)
+ if (x < 1)
+ fun_l22_n589(x)
+ else
+ fun_l22_n774(x)
+ end
+end
+
+def fun_l21_n212(x)
+ if (x < 1)
+ fun_l22_n926(x)
+ else
+ fun_l22_n14(x)
+ end
+end
+
+def fun_l21_n213(x)
+ if (x < 1)
+ fun_l22_n104(x)
+ else
+ fun_l22_n723(x)
+ end
+end
+
+def fun_l21_n214(x)
+ if (x < 1)
+ fun_l22_n699(x)
+ else
+ fun_l22_n775(x)
+ end
+end
+
+def fun_l21_n215(x)
+ if (x < 1)
+ fun_l22_n941(x)
+ else
+ fun_l22_n997(x)
+ end
+end
+
+def fun_l21_n216(x)
+ if (x < 1)
+ fun_l22_n182(x)
+ else
+ fun_l22_n409(x)
+ end
+end
+
+def fun_l21_n217(x)
+ if (x < 1)
+ fun_l22_n410(x)
+ else
+ fun_l22_n807(x)
+ end
+end
+
+def fun_l21_n218(x)
+ if (x < 1)
+ fun_l22_n787(x)
+ else
+ fun_l22_n143(x)
+ end
+end
+
+def fun_l21_n219(x)
+ if (x < 1)
+ fun_l22_n515(x)
+ else
+ fun_l22_n558(x)
+ end
+end
+
+def fun_l21_n220(x)
+ if (x < 1)
+ fun_l22_n22(x)
+ else
+ fun_l22_n37(x)
+ end
+end
+
+def fun_l21_n221(x)
+ if (x < 1)
+ fun_l22_n366(x)
+ else
+ fun_l22_n63(x)
+ end
+end
+
+def fun_l21_n222(x)
+ if (x < 1)
+ fun_l22_n846(x)
+ else
+ fun_l22_n655(x)
+ end
+end
+
+def fun_l21_n223(x)
+ if (x < 1)
+ fun_l22_n946(x)
+ else
+ fun_l22_n587(x)
+ end
+end
+
+def fun_l21_n224(x)
+ if (x < 1)
+ fun_l22_n841(x)
+ else
+ fun_l22_n874(x)
+ end
+end
+
+def fun_l21_n225(x)
+ if (x < 1)
+ fun_l22_n19(x)
+ else
+ fun_l22_n142(x)
+ end
+end
+
+def fun_l21_n226(x)
+ if (x < 1)
+ fun_l22_n939(x)
+ else
+ fun_l22_n214(x)
+ end
+end
+
+def fun_l21_n227(x)
+ if (x < 1)
+ fun_l22_n900(x)
+ else
+ fun_l22_n673(x)
+ end
+end
+
+def fun_l21_n228(x)
+ if (x < 1)
+ fun_l22_n784(x)
+ else
+ fun_l22_n258(x)
+ end
+end
+
+def fun_l21_n229(x)
+ if (x < 1)
+ fun_l22_n553(x)
+ else
+ fun_l22_n253(x)
+ end
+end
+
+def fun_l21_n230(x)
+ if (x < 1)
+ fun_l22_n927(x)
+ else
+ fun_l22_n9(x)
+ end
+end
+
+def fun_l21_n231(x)
+ if (x < 1)
+ fun_l22_n822(x)
+ else
+ fun_l22_n870(x)
+ end
+end
+
+def fun_l21_n232(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n185(x)
+ end
+end
+
+def fun_l21_n233(x)
+ if (x < 1)
+ fun_l22_n691(x)
+ else
+ fun_l22_n613(x)
+ end
+end
+
+def fun_l21_n234(x)
+ if (x < 1)
+ fun_l22_n995(x)
+ else
+ fun_l22_n73(x)
+ end
+end
+
+def fun_l21_n235(x)
+ if (x < 1)
+ fun_l22_n250(x)
+ else
+ fun_l22_n356(x)
+ end
+end
+
+def fun_l21_n236(x)
+ if (x < 1)
+ fun_l22_n531(x)
+ else
+ fun_l22_n335(x)
+ end
+end
+
+def fun_l21_n237(x)
+ if (x < 1)
+ fun_l22_n376(x)
+ else
+ fun_l22_n732(x)
+ end
+end
+
+def fun_l21_n238(x)
+ if (x < 1)
+ fun_l22_n293(x)
+ else
+ fun_l22_n886(x)
+ end
+end
+
+def fun_l21_n239(x)
+ if (x < 1)
+ fun_l22_n266(x)
+ else
+ fun_l22_n820(x)
+ end
+end
+
+def fun_l21_n240(x)
+ if (x < 1)
+ fun_l22_n450(x)
+ else
+ fun_l22_n418(x)
+ end
+end
+
+def fun_l21_n241(x)
+ if (x < 1)
+ fun_l22_n902(x)
+ else
+ fun_l22_n991(x)
+ end
+end
+
+def fun_l21_n242(x)
+ if (x < 1)
+ fun_l22_n521(x)
+ else
+ fun_l22_n516(x)
+ end
+end
+
+def fun_l21_n243(x)
+ if (x < 1)
+ fun_l22_n97(x)
+ else
+ fun_l22_n388(x)
+ end
+end
+
+def fun_l21_n244(x)
+ if (x < 1)
+ fun_l22_n596(x)
+ else
+ fun_l22_n758(x)
+ end
+end
+
+def fun_l21_n245(x)
+ if (x < 1)
+ fun_l22_n370(x)
+ else
+ fun_l22_n747(x)
+ end
+end
+
+def fun_l21_n246(x)
+ if (x < 1)
+ fun_l22_n73(x)
+ else
+ fun_l22_n84(x)
+ end
+end
+
+def fun_l21_n247(x)
+ if (x < 1)
+ fun_l22_n489(x)
+ else
+ fun_l22_n166(x)
+ end
+end
+
+def fun_l21_n248(x)
+ if (x < 1)
+ fun_l22_n419(x)
+ else
+ fun_l22_n698(x)
+ end
+end
+
+def fun_l21_n249(x)
+ if (x < 1)
+ fun_l22_n330(x)
+ else
+ fun_l22_n995(x)
+ end
+end
+
+def fun_l21_n250(x)
+ if (x < 1)
+ fun_l22_n443(x)
+ else
+ fun_l22_n341(x)
+ end
+end
+
+def fun_l21_n251(x)
+ if (x < 1)
+ fun_l22_n442(x)
+ else
+ fun_l22_n311(x)
+ end
+end
+
+def fun_l21_n252(x)
+ if (x < 1)
+ fun_l22_n60(x)
+ else
+ fun_l22_n399(x)
+ end
+end
+
+def fun_l21_n253(x)
+ if (x < 1)
+ fun_l22_n831(x)
+ else
+ fun_l22_n245(x)
+ end
+end
+
+def fun_l21_n254(x)
+ if (x < 1)
+ fun_l22_n946(x)
+ else
+ fun_l22_n205(x)
+ end
+end
+
+def fun_l21_n255(x)
+ if (x < 1)
+ fun_l22_n499(x)
+ else
+ fun_l22_n476(x)
+ end
+end
+
+def fun_l21_n256(x)
+ if (x < 1)
+ fun_l22_n841(x)
+ else
+ fun_l22_n70(x)
+ end
+end
+
+def fun_l21_n257(x)
+ if (x < 1)
+ fun_l22_n289(x)
+ else
+ fun_l22_n329(x)
+ end
+end
+
+def fun_l21_n258(x)
+ if (x < 1)
+ fun_l22_n149(x)
+ else
+ fun_l22_n270(x)
+ end
+end
+
+def fun_l21_n259(x)
+ if (x < 1)
+ fun_l22_n569(x)
+ else
+ fun_l22_n972(x)
+ end
+end
+
+def fun_l21_n260(x)
+ if (x < 1)
+ fun_l22_n313(x)
+ else
+ fun_l22_n573(x)
+ end
+end
+
+def fun_l21_n261(x)
+ if (x < 1)
+ fun_l22_n458(x)
+ else
+ fun_l22_n964(x)
+ end
+end
+
+def fun_l21_n262(x)
+ if (x < 1)
+ fun_l22_n308(x)
+ else
+ fun_l22_n825(x)
+ end
+end
+
+def fun_l21_n263(x)
+ if (x < 1)
+ fun_l22_n810(x)
+ else
+ fun_l22_n864(x)
+ end
+end
+
+def fun_l21_n264(x)
+ if (x < 1)
+ fun_l22_n52(x)
+ else
+ fun_l22_n486(x)
+ end
+end
+
+def fun_l21_n265(x)
+ if (x < 1)
+ fun_l22_n520(x)
+ else
+ fun_l22_n758(x)
+ end
+end
+
+def fun_l21_n266(x)
+ if (x < 1)
+ fun_l22_n954(x)
+ else
+ fun_l22_n819(x)
+ end
+end
+
+def fun_l21_n267(x)
+ if (x < 1)
+ fun_l22_n226(x)
+ else
+ fun_l22_n893(x)
+ end
+end
+
+def fun_l21_n268(x)
+ if (x < 1)
+ fun_l22_n854(x)
+ else
+ fun_l22_n281(x)
+ end
+end
+
+def fun_l21_n269(x)
+ if (x < 1)
+ fun_l22_n354(x)
+ else
+ fun_l22_n296(x)
+ end
+end
+
+def fun_l21_n270(x)
+ if (x < 1)
+ fun_l22_n970(x)
+ else
+ fun_l22_n898(x)
+ end
+end
+
+def fun_l21_n271(x)
+ if (x < 1)
+ fun_l22_n769(x)
+ else
+ fun_l22_n94(x)
+ end
+end
+
+def fun_l21_n272(x)
+ if (x < 1)
+ fun_l22_n100(x)
+ else
+ fun_l22_n830(x)
+ end
+end
+
+def fun_l21_n273(x)
+ if (x < 1)
+ fun_l22_n514(x)
+ else
+ fun_l22_n522(x)
+ end
+end
+
+def fun_l21_n274(x)
+ if (x < 1)
+ fun_l22_n897(x)
+ else
+ fun_l22_n260(x)
+ end
+end
+
+def fun_l21_n275(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n125(x)
+ end
+end
+
+def fun_l21_n276(x)
+ if (x < 1)
+ fun_l22_n262(x)
+ else
+ fun_l22_n617(x)
+ end
+end
+
+def fun_l21_n277(x)
+ if (x < 1)
+ fun_l22_n84(x)
+ else
+ fun_l22_n483(x)
+ end
+end
+
+def fun_l21_n278(x)
+ if (x < 1)
+ fun_l22_n657(x)
+ else
+ fun_l22_n10(x)
+ end
+end
+
+def fun_l21_n279(x)
+ if (x < 1)
+ fun_l22_n142(x)
+ else
+ fun_l22_n666(x)
+ end
+end
+
+def fun_l21_n280(x)
+ if (x < 1)
+ fun_l22_n824(x)
+ else
+ fun_l22_n408(x)
+ end
+end
+
+def fun_l21_n281(x)
+ if (x < 1)
+ fun_l22_n39(x)
+ else
+ fun_l22_n225(x)
+ end
+end
+
+def fun_l21_n282(x)
+ if (x < 1)
+ fun_l22_n93(x)
+ else
+ fun_l22_n410(x)
+ end
+end
+
+def fun_l21_n283(x)
+ if (x < 1)
+ fun_l22_n294(x)
+ else
+ fun_l22_n268(x)
+ end
+end
+
+def fun_l21_n284(x)
+ if (x < 1)
+ fun_l22_n636(x)
+ else
+ fun_l22_n767(x)
+ end
+end
+
+def fun_l21_n285(x)
+ if (x < 1)
+ fun_l22_n181(x)
+ else
+ fun_l22_n317(x)
+ end
+end
+
+def fun_l21_n286(x)
+ if (x < 1)
+ fun_l22_n208(x)
+ else
+ fun_l22_n803(x)
+ end
+end
+
+def fun_l21_n287(x)
+ if (x < 1)
+ fun_l22_n910(x)
+ else
+ fun_l22_n872(x)
+ end
+end
+
+def fun_l21_n288(x)
+ if (x < 1)
+ fun_l22_n771(x)
+ else
+ fun_l22_n858(x)
+ end
+end
+
+def fun_l21_n289(x)
+ if (x < 1)
+ fun_l22_n109(x)
+ else
+ fun_l22_n577(x)
+ end
+end
+
+def fun_l21_n290(x)
+ if (x < 1)
+ fun_l22_n474(x)
+ else
+ fun_l22_n289(x)
+ end
+end
+
+def fun_l21_n291(x)
+ if (x < 1)
+ fun_l22_n55(x)
+ else
+ fun_l22_n448(x)
+ end
+end
+
+def fun_l21_n292(x)
+ if (x < 1)
+ fun_l22_n644(x)
+ else
+ fun_l22_n958(x)
+ end
+end
+
+def fun_l21_n293(x)
+ if (x < 1)
+ fun_l22_n775(x)
+ else
+ fun_l22_n131(x)
+ end
+end
+
+def fun_l21_n294(x)
+ if (x < 1)
+ fun_l22_n950(x)
+ else
+ fun_l22_n216(x)
+ end
+end
+
+def fun_l21_n295(x)
+ if (x < 1)
+ fun_l22_n258(x)
+ else
+ fun_l22_n919(x)
+ end
+end
+
+def fun_l21_n296(x)
+ if (x < 1)
+ fun_l22_n298(x)
+ else
+ fun_l22_n334(x)
+ end
+end
+
+def fun_l21_n297(x)
+ if (x < 1)
+ fun_l22_n124(x)
+ else
+ fun_l22_n704(x)
+ end
+end
+
+def fun_l21_n298(x)
+ if (x < 1)
+ fun_l22_n526(x)
+ else
+ fun_l22_n139(x)
+ end
+end
+
+def fun_l21_n299(x)
+ if (x < 1)
+ fun_l22_n133(x)
+ else
+ fun_l22_n65(x)
+ end
+end
+
+def fun_l21_n300(x)
+ if (x < 1)
+ fun_l22_n476(x)
+ else
+ fun_l22_n858(x)
+ end
+end
+
+def fun_l21_n301(x)
+ if (x < 1)
+ fun_l22_n23(x)
+ else
+ fun_l22_n391(x)
+ end
+end
+
+def fun_l21_n302(x)
+ if (x < 1)
+ fun_l22_n292(x)
+ else
+ fun_l22_n127(x)
+ end
+end
+
+def fun_l21_n303(x)
+ if (x < 1)
+ fun_l22_n935(x)
+ else
+ fun_l22_n399(x)
+ end
+end
+
+def fun_l21_n304(x)
+ if (x < 1)
+ fun_l22_n110(x)
+ else
+ fun_l22_n904(x)
+ end
+end
+
+def fun_l21_n305(x)
+ if (x < 1)
+ fun_l22_n865(x)
+ else
+ fun_l22_n510(x)
+ end
+end
+
+def fun_l21_n306(x)
+ if (x < 1)
+ fun_l22_n930(x)
+ else
+ fun_l22_n892(x)
+ end
+end
+
+def fun_l21_n307(x)
+ if (x < 1)
+ fun_l22_n701(x)
+ else
+ fun_l22_n172(x)
+ end
+end
+
+def fun_l21_n308(x)
+ if (x < 1)
+ fun_l22_n424(x)
+ else
+ fun_l22_n169(x)
+ end
+end
+
+def fun_l21_n309(x)
+ if (x < 1)
+ fun_l22_n494(x)
+ else
+ fun_l22_n608(x)
+ end
+end
+
+def fun_l21_n310(x)
+ if (x < 1)
+ fun_l22_n862(x)
+ else
+ fun_l22_n54(x)
+ end
+end
+
+def fun_l21_n311(x)
+ if (x < 1)
+ fun_l22_n679(x)
+ else
+ fun_l22_n246(x)
+ end
+end
+
+def fun_l21_n312(x)
+ if (x < 1)
+ fun_l22_n897(x)
+ else
+ fun_l22_n581(x)
+ end
+end
+
+def fun_l21_n313(x)
+ if (x < 1)
+ fun_l22_n788(x)
+ else
+ fun_l22_n32(x)
+ end
+end
+
+def fun_l21_n314(x)
+ if (x < 1)
+ fun_l22_n68(x)
+ else
+ fun_l22_n920(x)
+ end
+end
+
+def fun_l21_n315(x)
+ if (x < 1)
+ fun_l22_n520(x)
+ else
+ fun_l22_n814(x)
+ end
+end
+
+def fun_l21_n316(x)
+ if (x < 1)
+ fun_l22_n190(x)
+ else
+ fun_l22_n832(x)
+ end
+end
+
+def fun_l21_n317(x)
+ if (x < 1)
+ fun_l22_n500(x)
+ else
+ fun_l22_n576(x)
+ end
+end
+
+def fun_l21_n318(x)
+ if (x < 1)
+ fun_l22_n999(x)
+ else
+ fun_l22_n423(x)
+ end
+end
+
+def fun_l21_n319(x)
+ if (x < 1)
+ fun_l22_n62(x)
+ else
+ fun_l22_n451(x)
+ end
+end
+
+def fun_l21_n320(x)
+ if (x < 1)
+ fun_l22_n265(x)
+ else
+ fun_l22_n421(x)
+ end
+end
+
+def fun_l21_n321(x)
+ if (x < 1)
+ fun_l22_n340(x)
+ else
+ fun_l22_n297(x)
+ end
+end
+
+def fun_l21_n322(x)
+ if (x < 1)
+ fun_l22_n526(x)
+ else
+ fun_l22_n834(x)
+ end
+end
+
+def fun_l21_n323(x)
+ if (x < 1)
+ fun_l22_n305(x)
+ else
+ fun_l22_n444(x)
+ end
+end
+
+def fun_l21_n324(x)
+ if (x < 1)
+ fun_l22_n117(x)
+ else
+ fun_l22_n617(x)
+ end
+end
+
+def fun_l21_n325(x)
+ if (x < 1)
+ fun_l22_n715(x)
+ else
+ fun_l22_n551(x)
+ end
+end
+
+def fun_l21_n326(x)
+ if (x < 1)
+ fun_l22_n921(x)
+ else
+ fun_l22_n69(x)
+ end
+end
+
+def fun_l21_n327(x)
+ if (x < 1)
+ fun_l22_n226(x)
+ else
+ fun_l22_n21(x)
+ end
+end
+
+def fun_l21_n328(x)
+ if (x < 1)
+ fun_l22_n181(x)
+ else
+ fun_l22_n409(x)
+ end
+end
+
+def fun_l21_n329(x)
+ if (x < 1)
+ fun_l22_n894(x)
+ else
+ fun_l22_n17(x)
+ end
+end
+
+def fun_l21_n330(x)
+ if (x < 1)
+ fun_l22_n633(x)
+ else
+ fun_l22_n370(x)
+ end
+end
+
+def fun_l21_n331(x)
+ if (x < 1)
+ fun_l22_n638(x)
+ else
+ fun_l22_n994(x)
+ end
+end
+
+def fun_l21_n332(x)
+ if (x < 1)
+ fun_l22_n663(x)
+ else
+ fun_l22_n981(x)
+ end
+end
+
+def fun_l21_n333(x)
+ if (x < 1)
+ fun_l22_n861(x)
+ else
+ fun_l22_n472(x)
+ end
+end
+
+def fun_l21_n334(x)
+ if (x < 1)
+ fun_l22_n265(x)
+ else
+ fun_l22_n534(x)
+ end
+end
+
+def fun_l21_n335(x)
+ if (x < 1)
+ fun_l22_n43(x)
+ else
+ fun_l22_n613(x)
+ end
+end
+
+def fun_l21_n336(x)
+ if (x < 1)
+ fun_l22_n788(x)
+ else
+ fun_l22_n649(x)
+ end
+end
+
+def fun_l21_n337(x)
+ if (x < 1)
+ fun_l22_n406(x)
+ else
+ fun_l22_n644(x)
+ end
+end
+
+def fun_l21_n338(x)
+ if (x < 1)
+ fun_l22_n582(x)
+ else
+ fun_l22_n463(x)
+ end
+end
+
+def fun_l21_n339(x)
+ if (x < 1)
+ fun_l22_n825(x)
+ else
+ fun_l22_n775(x)
+ end
+end
+
+def fun_l21_n340(x)
+ if (x < 1)
+ fun_l22_n696(x)
+ else
+ fun_l22_n318(x)
+ end
+end
+
+def fun_l21_n341(x)
+ if (x < 1)
+ fun_l22_n21(x)
+ else
+ fun_l22_n285(x)
+ end
+end
+
+def fun_l21_n342(x)
+ if (x < 1)
+ fun_l22_n10(x)
+ else
+ fun_l22_n423(x)
+ end
+end
+
+def fun_l21_n343(x)
+ if (x < 1)
+ fun_l22_n205(x)
+ else
+ fun_l22_n86(x)
+ end
+end
+
+def fun_l21_n344(x)
+ if (x < 1)
+ fun_l22_n437(x)
+ else
+ fun_l22_n712(x)
+ end
+end
+
+def fun_l21_n345(x)
+ if (x < 1)
+ fun_l22_n941(x)
+ else
+ fun_l22_n655(x)
+ end
+end
+
+def fun_l21_n346(x)
+ if (x < 1)
+ fun_l22_n673(x)
+ else
+ fun_l22_n750(x)
+ end
+end
+
+def fun_l21_n347(x)
+ if (x < 1)
+ fun_l22_n728(x)
+ else
+ fun_l22_n605(x)
+ end
+end
+
+def fun_l21_n348(x)
+ if (x < 1)
+ fun_l22_n452(x)
+ else
+ fun_l22_n968(x)
+ end
+end
+
+def fun_l21_n349(x)
+ if (x < 1)
+ fun_l22_n554(x)
+ else
+ fun_l22_n997(x)
+ end
+end
+
+def fun_l21_n350(x)
+ if (x < 1)
+ fun_l22_n784(x)
+ else
+ fun_l22_n801(x)
+ end
+end
+
+def fun_l21_n351(x)
+ if (x < 1)
+ fun_l22_n397(x)
+ else
+ fun_l22_n636(x)
+ end
+end
+
+def fun_l21_n352(x)
+ if (x < 1)
+ fun_l22_n562(x)
+ else
+ fun_l22_n150(x)
+ end
+end
+
+def fun_l21_n353(x)
+ if (x < 1)
+ fun_l22_n142(x)
+ else
+ fun_l22_n396(x)
+ end
+end
+
+def fun_l21_n354(x)
+ if (x < 1)
+ fun_l22_n455(x)
+ else
+ fun_l22_n424(x)
+ end
+end
+
+def fun_l21_n355(x)
+ if (x < 1)
+ fun_l22_n736(x)
+ else
+ fun_l22_n534(x)
+ end
+end
+
+def fun_l21_n356(x)
+ if (x < 1)
+ fun_l22_n111(x)
+ else
+ fun_l22_n903(x)
+ end
+end
+
+def fun_l21_n357(x)
+ if (x < 1)
+ fun_l22_n996(x)
+ else
+ fun_l22_n350(x)
+ end
+end
+
+def fun_l21_n358(x)
+ if (x < 1)
+ fun_l22_n516(x)
+ else
+ fun_l22_n202(x)
+ end
+end
+
+def fun_l21_n359(x)
+ if (x < 1)
+ fun_l22_n68(x)
+ else
+ fun_l22_n823(x)
+ end
+end
+
+def fun_l21_n360(x)
+ if (x < 1)
+ fun_l22_n298(x)
+ else
+ fun_l22_n873(x)
+ end
+end
+
+def fun_l21_n361(x)
+ if (x < 1)
+ fun_l22_n491(x)
+ else
+ fun_l22_n86(x)
+ end
+end
+
+def fun_l21_n362(x)
+ if (x < 1)
+ fun_l22_n340(x)
+ else
+ fun_l22_n215(x)
+ end
+end
+
+def fun_l21_n363(x)
+ if (x < 1)
+ fun_l22_n452(x)
+ else
+ fun_l22_n416(x)
+ end
+end
+
+def fun_l21_n364(x)
+ if (x < 1)
+ fun_l22_n625(x)
+ else
+ fun_l22_n638(x)
+ end
+end
+
+def fun_l21_n365(x)
+ if (x < 1)
+ fun_l22_n166(x)
+ else
+ fun_l22_n380(x)
+ end
+end
+
+def fun_l21_n366(x)
+ if (x < 1)
+ fun_l22_n934(x)
+ else
+ fun_l22_n937(x)
+ end
+end
+
+def fun_l21_n367(x)
+ if (x < 1)
+ fun_l22_n77(x)
+ else
+ fun_l22_n117(x)
+ end
+end
+
+def fun_l21_n368(x)
+ if (x < 1)
+ fun_l22_n688(x)
+ else
+ fun_l22_n529(x)
+ end
+end
+
+def fun_l21_n369(x)
+ if (x < 1)
+ fun_l22_n950(x)
+ else
+ fun_l22_n148(x)
+ end
+end
+
+def fun_l21_n370(x)
+ if (x < 1)
+ fun_l22_n216(x)
+ else
+ fun_l22_n588(x)
+ end
+end
+
+def fun_l21_n371(x)
+ if (x < 1)
+ fun_l22_n127(x)
+ else
+ fun_l22_n901(x)
+ end
+end
+
+def fun_l21_n372(x)
+ if (x < 1)
+ fun_l22_n244(x)
+ else
+ fun_l22_n516(x)
+ end
+end
+
+def fun_l21_n373(x)
+ if (x < 1)
+ fun_l22_n791(x)
+ else
+ fun_l22_n466(x)
+ end
+end
+
+def fun_l21_n374(x)
+ if (x < 1)
+ fun_l22_n469(x)
+ else
+ fun_l22_n38(x)
+ end
+end
+
+def fun_l21_n375(x)
+ if (x < 1)
+ fun_l22_n894(x)
+ else
+ fun_l22_n82(x)
+ end
+end
+
+def fun_l21_n376(x)
+ if (x < 1)
+ fun_l22_n663(x)
+ else
+ fun_l22_n865(x)
+ end
+end
+
+def fun_l21_n377(x)
+ if (x < 1)
+ fun_l22_n782(x)
+ else
+ fun_l22_n10(x)
+ end
+end
+
+def fun_l21_n378(x)
+ if (x < 1)
+ fun_l22_n930(x)
+ else
+ fun_l22_n767(x)
+ end
+end
+
+def fun_l21_n379(x)
+ if (x < 1)
+ fun_l22_n130(x)
+ else
+ fun_l22_n437(x)
+ end
+end
+
+def fun_l21_n380(x)
+ if (x < 1)
+ fun_l22_n496(x)
+ else
+ fun_l22_n413(x)
+ end
+end
+
+def fun_l21_n381(x)
+ if (x < 1)
+ fun_l22_n453(x)
+ else
+ fun_l22_n542(x)
+ end
+end
+
+def fun_l21_n382(x)
+ if (x < 1)
+ fun_l22_n404(x)
+ else
+ fun_l22_n637(x)
+ end
+end
+
+def fun_l21_n383(x)
+ if (x < 1)
+ fun_l22_n829(x)
+ else
+ fun_l22_n526(x)
+ end
+end
+
+def fun_l21_n384(x)
+ if (x < 1)
+ fun_l22_n882(x)
+ else
+ fun_l22_n922(x)
+ end
+end
+
+def fun_l21_n385(x)
+ if (x < 1)
+ fun_l22_n58(x)
+ else
+ fun_l22_n401(x)
+ end
+end
+
+def fun_l21_n386(x)
+ if (x < 1)
+ fun_l22_n936(x)
+ else
+ fun_l22_n164(x)
+ end
+end
+
+def fun_l21_n387(x)
+ if (x < 1)
+ fun_l22_n773(x)
+ else
+ fun_l22_n323(x)
+ end
+end
+
+def fun_l21_n388(x)
+ if (x < 1)
+ fun_l22_n718(x)
+ else
+ fun_l22_n189(x)
+ end
+end
+
+def fun_l21_n389(x)
+ if (x < 1)
+ fun_l22_n950(x)
+ else
+ fun_l22_n283(x)
+ end
+end
+
+def fun_l21_n390(x)
+ if (x < 1)
+ fun_l22_n278(x)
+ else
+ fun_l22_n325(x)
+ end
+end
+
+def fun_l21_n391(x)
+ if (x < 1)
+ fun_l22_n98(x)
+ else
+ fun_l22_n162(x)
+ end
+end
+
+def fun_l21_n392(x)
+ if (x < 1)
+ fun_l22_n268(x)
+ else
+ fun_l22_n416(x)
+ end
+end
+
+def fun_l21_n393(x)
+ if (x < 1)
+ fun_l22_n344(x)
+ else
+ fun_l22_n680(x)
+ end
+end
+
+def fun_l21_n394(x)
+ if (x < 1)
+ fun_l22_n545(x)
+ else
+ fun_l22_n41(x)
+ end
+end
+
+def fun_l21_n395(x)
+ if (x < 1)
+ fun_l22_n149(x)
+ else
+ fun_l22_n659(x)
+ end
+end
+
+def fun_l21_n396(x)
+ if (x < 1)
+ fun_l22_n81(x)
+ else
+ fun_l22_n316(x)
+ end
+end
+
+def fun_l21_n397(x)
+ if (x < 1)
+ fun_l22_n657(x)
+ else
+ fun_l22_n414(x)
+ end
+end
+
+def fun_l21_n398(x)
+ if (x < 1)
+ fun_l22_n262(x)
+ else
+ fun_l22_n26(x)
+ end
+end
+
+def fun_l21_n399(x)
+ if (x < 1)
+ fun_l22_n509(x)
+ else
+ fun_l22_n658(x)
+ end
+end
+
+def fun_l21_n400(x)
+ if (x < 1)
+ fun_l22_n533(x)
+ else
+ fun_l22_n416(x)
+ end
+end
+
+def fun_l21_n401(x)
+ if (x < 1)
+ fun_l22_n631(x)
+ else
+ fun_l22_n575(x)
+ end
+end
+
+def fun_l21_n402(x)
+ if (x < 1)
+ fun_l22_n171(x)
+ else
+ fun_l22_n727(x)
+ end
+end
+
+def fun_l21_n403(x)
+ if (x < 1)
+ fun_l22_n65(x)
+ else
+ fun_l22_n109(x)
+ end
+end
+
+def fun_l21_n404(x)
+ if (x < 1)
+ fun_l22_n818(x)
+ else
+ fun_l22_n638(x)
+ end
+end
+
+def fun_l21_n405(x)
+ if (x < 1)
+ fun_l22_n515(x)
+ else
+ fun_l22_n86(x)
+ end
+end
+
+def fun_l21_n406(x)
+ if (x < 1)
+ fun_l22_n500(x)
+ else
+ fun_l22_n367(x)
+ end
+end
+
+def fun_l21_n407(x)
+ if (x < 1)
+ fun_l22_n609(x)
+ else
+ fun_l22_n926(x)
+ end
+end
+
+def fun_l21_n408(x)
+ if (x < 1)
+ fun_l22_n553(x)
+ else
+ fun_l22_n494(x)
+ end
+end
+
+def fun_l21_n409(x)
+ if (x < 1)
+ fun_l22_n837(x)
+ else
+ fun_l22_n800(x)
+ end
+end
+
+def fun_l21_n410(x)
+ if (x < 1)
+ fun_l22_n511(x)
+ else
+ fun_l22_n376(x)
+ end
+end
+
+def fun_l21_n411(x)
+ if (x < 1)
+ fun_l22_n691(x)
+ else
+ fun_l22_n135(x)
+ end
+end
+
+def fun_l21_n412(x)
+ if (x < 1)
+ fun_l22_n537(x)
+ else
+ fun_l22_n708(x)
+ end
+end
+
+def fun_l21_n413(x)
+ if (x < 1)
+ fun_l22_n858(x)
+ else
+ fun_l22_n75(x)
+ end
+end
+
+def fun_l21_n414(x)
+ if (x < 1)
+ fun_l22_n473(x)
+ else
+ fun_l22_n26(x)
+ end
+end
+
+def fun_l21_n415(x)
+ if (x < 1)
+ fun_l22_n443(x)
+ else
+ fun_l22_n709(x)
+ end
+end
+
+def fun_l21_n416(x)
+ if (x < 1)
+ fun_l22_n464(x)
+ else
+ fun_l22_n329(x)
+ end
+end
+
+def fun_l21_n417(x)
+ if (x < 1)
+ fun_l22_n402(x)
+ else
+ fun_l22_n438(x)
+ end
+end
+
+def fun_l21_n418(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n704(x)
+ end
+end
+
+def fun_l21_n419(x)
+ if (x < 1)
+ fun_l22_n949(x)
+ else
+ fun_l22_n46(x)
+ end
+end
+
+def fun_l21_n420(x)
+ if (x < 1)
+ fun_l22_n102(x)
+ else
+ fun_l22_n20(x)
+ end
+end
+
+def fun_l21_n421(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n876(x)
+ end
+end
+
+def fun_l21_n422(x)
+ if (x < 1)
+ fun_l22_n881(x)
+ else
+ fun_l22_n100(x)
+ end
+end
+
+def fun_l21_n423(x)
+ if (x < 1)
+ fun_l22_n155(x)
+ else
+ fun_l22_n99(x)
+ end
+end
+
+def fun_l21_n424(x)
+ if (x < 1)
+ fun_l22_n913(x)
+ else
+ fun_l22_n839(x)
+ end
+end
+
+def fun_l21_n425(x)
+ if (x < 1)
+ fun_l22_n981(x)
+ else
+ fun_l22_n73(x)
+ end
+end
+
+def fun_l21_n426(x)
+ if (x < 1)
+ fun_l22_n221(x)
+ else
+ fun_l22_n548(x)
+ end
+end
+
+def fun_l21_n427(x)
+ if (x < 1)
+ fun_l22_n563(x)
+ else
+ fun_l22_n978(x)
+ end
+end
+
+def fun_l21_n428(x)
+ if (x < 1)
+ fun_l22_n310(x)
+ else
+ fun_l22_n591(x)
+ end
+end
+
+def fun_l21_n429(x)
+ if (x < 1)
+ fun_l22_n962(x)
+ else
+ fun_l22_n156(x)
+ end
+end
+
+def fun_l21_n430(x)
+ if (x < 1)
+ fun_l22_n810(x)
+ else
+ fun_l22_n766(x)
+ end
+end
+
+def fun_l21_n431(x)
+ if (x < 1)
+ fun_l22_n675(x)
+ else
+ fun_l22_n354(x)
+ end
+end
+
+def fun_l21_n432(x)
+ if (x < 1)
+ fun_l22_n320(x)
+ else
+ fun_l22_n474(x)
+ end
+end
+
+def fun_l21_n433(x)
+ if (x < 1)
+ fun_l22_n50(x)
+ else
+ fun_l22_n626(x)
+ end
+end
+
+def fun_l21_n434(x)
+ if (x < 1)
+ fun_l22_n956(x)
+ else
+ fun_l22_n238(x)
+ end
+end
+
+def fun_l21_n435(x)
+ if (x < 1)
+ fun_l22_n966(x)
+ else
+ fun_l22_n729(x)
+ end
+end
+
+def fun_l21_n436(x)
+ if (x < 1)
+ fun_l22_n856(x)
+ else
+ fun_l22_n553(x)
+ end
+end
+
+def fun_l21_n437(x)
+ if (x < 1)
+ fun_l22_n833(x)
+ else
+ fun_l22_n312(x)
+ end
+end
+
+def fun_l21_n438(x)
+ if (x < 1)
+ fun_l22_n254(x)
+ else
+ fun_l22_n515(x)
+ end
+end
+
+def fun_l21_n439(x)
+ if (x < 1)
+ fun_l22_n548(x)
+ else
+ fun_l22_n184(x)
+ end
+end
+
+def fun_l21_n440(x)
+ if (x < 1)
+ fun_l22_n922(x)
+ else
+ fun_l22_n465(x)
+ end
+end
+
+def fun_l21_n441(x)
+ if (x < 1)
+ fun_l22_n136(x)
+ else
+ fun_l22_n739(x)
+ end
+end
+
+def fun_l21_n442(x)
+ if (x < 1)
+ fun_l22_n4(x)
+ else
+ fun_l22_n359(x)
+ end
+end
+
+def fun_l21_n443(x)
+ if (x < 1)
+ fun_l22_n269(x)
+ else
+ fun_l22_n417(x)
+ end
+end
+
+def fun_l21_n444(x)
+ if (x < 1)
+ fun_l22_n809(x)
+ else
+ fun_l22_n430(x)
+ end
+end
+
+def fun_l21_n445(x)
+ if (x < 1)
+ fun_l22_n428(x)
+ else
+ fun_l22_n55(x)
+ end
+end
+
+def fun_l21_n446(x)
+ if (x < 1)
+ fun_l22_n265(x)
+ else
+ fun_l22_n394(x)
+ end
+end
+
+def fun_l21_n447(x)
+ if (x < 1)
+ fun_l22_n885(x)
+ else
+ fun_l22_n139(x)
+ end
+end
+
+def fun_l21_n448(x)
+ if (x < 1)
+ fun_l22_n219(x)
+ else
+ fun_l22_n578(x)
+ end
+end
+
+def fun_l21_n449(x)
+ if (x < 1)
+ fun_l22_n458(x)
+ else
+ fun_l22_n226(x)
+ end
+end
+
+def fun_l21_n450(x)
+ if (x < 1)
+ fun_l22_n128(x)
+ else
+ fun_l22_n790(x)
+ end
+end
+
+def fun_l21_n451(x)
+ if (x < 1)
+ fun_l22_n134(x)
+ else
+ fun_l22_n471(x)
+ end
+end
+
+def fun_l21_n452(x)
+ if (x < 1)
+ fun_l22_n180(x)
+ else
+ fun_l22_n183(x)
+ end
+end
+
+def fun_l21_n453(x)
+ if (x < 1)
+ fun_l22_n823(x)
+ else
+ fun_l22_n667(x)
+ end
+end
+
+def fun_l21_n454(x)
+ if (x < 1)
+ fun_l22_n324(x)
+ else
+ fun_l22_n487(x)
+ end
+end
+
+def fun_l21_n455(x)
+ if (x < 1)
+ fun_l22_n341(x)
+ else
+ fun_l22_n784(x)
+ end
+end
+
+def fun_l21_n456(x)
+ if (x < 1)
+ fun_l22_n32(x)
+ else
+ fun_l22_n227(x)
+ end
+end
+
+def fun_l21_n457(x)
+ if (x < 1)
+ fun_l22_n567(x)
+ else
+ fun_l22_n774(x)
+ end
+end
+
+def fun_l21_n458(x)
+ if (x < 1)
+ fun_l22_n342(x)
+ else
+ fun_l22_n126(x)
+ end
+end
+
+def fun_l21_n459(x)
+ if (x < 1)
+ fun_l22_n116(x)
+ else
+ fun_l22_n367(x)
+ end
+end
+
+def fun_l21_n460(x)
+ if (x < 1)
+ fun_l22_n864(x)
+ else
+ fun_l22_n618(x)
+ end
+end
+
+def fun_l21_n461(x)
+ if (x < 1)
+ fun_l22_n823(x)
+ else
+ fun_l22_n799(x)
+ end
+end
+
+def fun_l21_n462(x)
+ if (x < 1)
+ fun_l22_n684(x)
+ else
+ fun_l22_n758(x)
+ end
+end
+
+def fun_l21_n463(x)
+ if (x < 1)
+ fun_l22_n662(x)
+ else
+ fun_l22_n514(x)
+ end
+end
+
+def fun_l21_n464(x)
+ if (x < 1)
+ fun_l22_n736(x)
+ else
+ fun_l22_n794(x)
+ end
+end
+
+def fun_l21_n465(x)
+ if (x < 1)
+ fun_l22_n200(x)
+ else
+ fun_l22_n565(x)
+ end
+end
+
+def fun_l21_n466(x)
+ if (x < 1)
+ fun_l22_n787(x)
+ else
+ fun_l22_n835(x)
+ end
+end
+
+def fun_l21_n467(x)
+ if (x < 1)
+ fun_l22_n927(x)
+ else
+ fun_l22_n399(x)
+ end
+end
+
+def fun_l21_n468(x)
+ if (x < 1)
+ fun_l22_n102(x)
+ else
+ fun_l22_n738(x)
+ end
+end
+
+def fun_l21_n469(x)
+ if (x < 1)
+ fun_l22_n833(x)
+ else
+ fun_l22_n917(x)
+ end
+end
+
+def fun_l21_n470(x)
+ if (x < 1)
+ fun_l22_n422(x)
+ else
+ fun_l22_n108(x)
+ end
+end
+
+def fun_l21_n471(x)
+ if (x < 1)
+ fun_l22_n884(x)
+ else
+ fun_l22_n19(x)
+ end
+end
+
+def fun_l21_n472(x)
+ if (x < 1)
+ fun_l22_n849(x)
+ else
+ fun_l22_n251(x)
+ end
+end
+
+def fun_l21_n473(x)
+ if (x < 1)
+ fun_l22_n636(x)
+ else
+ fun_l22_n439(x)
+ end
+end
+
+def fun_l21_n474(x)
+ if (x < 1)
+ fun_l22_n867(x)
+ else
+ fun_l22_n227(x)
+ end
+end
+
+def fun_l21_n475(x)
+ if (x < 1)
+ fun_l22_n809(x)
+ else
+ fun_l22_n548(x)
+ end
+end
+
+def fun_l21_n476(x)
+ if (x < 1)
+ fun_l22_n213(x)
+ else
+ fun_l22_n607(x)
+ end
+end
+
+def fun_l21_n477(x)
+ if (x < 1)
+ fun_l22_n44(x)
+ else
+ fun_l22_n38(x)
+ end
+end
+
+def fun_l21_n478(x)
+ if (x < 1)
+ fun_l22_n400(x)
+ else
+ fun_l22_n436(x)
+ end
+end
+
+def fun_l21_n479(x)
+ if (x < 1)
+ fun_l22_n701(x)
+ else
+ fun_l22_n84(x)
+ end
+end
+
+def fun_l21_n480(x)
+ if (x < 1)
+ fun_l22_n21(x)
+ else
+ fun_l22_n215(x)
+ end
+end
+
+def fun_l21_n481(x)
+ if (x < 1)
+ fun_l22_n27(x)
+ else
+ fun_l22_n198(x)
+ end
+end
+
+def fun_l21_n482(x)
+ if (x < 1)
+ fun_l22_n803(x)
+ else
+ fun_l22_n82(x)
+ end
+end
+
+def fun_l21_n483(x)
+ if (x < 1)
+ fun_l22_n490(x)
+ else
+ fun_l22_n126(x)
+ end
+end
+
+def fun_l21_n484(x)
+ if (x < 1)
+ fun_l22_n348(x)
+ else
+ fun_l22_n586(x)
+ end
+end
+
+def fun_l21_n485(x)
+ if (x < 1)
+ fun_l22_n279(x)
+ else
+ fun_l22_n266(x)
+ end
+end
+
+def fun_l21_n486(x)
+ if (x < 1)
+ fun_l22_n398(x)
+ else
+ fun_l22_n26(x)
+ end
+end
+
+def fun_l21_n487(x)
+ if (x < 1)
+ fun_l22_n529(x)
+ else
+ fun_l22_n972(x)
+ end
+end
+
+def fun_l21_n488(x)
+ if (x < 1)
+ fun_l22_n390(x)
+ else
+ fun_l22_n220(x)
+ end
+end
+
+def fun_l21_n489(x)
+ if (x < 1)
+ fun_l22_n909(x)
+ else
+ fun_l22_n777(x)
+ end
+end
+
+def fun_l21_n490(x)
+ if (x < 1)
+ fun_l22_n797(x)
+ else
+ fun_l22_n643(x)
+ end
+end
+
+def fun_l21_n491(x)
+ if (x < 1)
+ fun_l22_n920(x)
+ else
+ fun_l22_n820(x)
+ end
+end
+
+def fun_l21_n492(x)
+ if (x < 1)
+ fun_l22_n170(x)
+ else
+ fun_l22_n236(x)
+ end
+end
+
+def fun_l21_n493(x)
+ if (x < 1)
+ fun_l22_n352(x)
+ else
+ fun_l22_n147(x)
+ end
+end
+
+def fun_l21_n494(x)
+ if (x < 1)
+ fun_l22_n938(x)
+ else
+ fun_l22_n83(x)
+ end
+end
+
+def fun_l21_n495(x)
+ if (x < 1)
+ fun_l22_n512(x)
+ else
+ fun_l22_n798(x)
+ end
+end
+
+def fun_l21_n496(x)
+ if (x < 1)
+ fun_l22_n254(x)
+ else
+ fun_l22_n827(x)
+ end
+end
+
+def fun_l21_n497(x)
+ if (x < 1)
+ fun_l22_n730(x)
+ else
+ fun_l22_n995(x)
+ end
+end
+
+def fun_l21_n498(x)
+ if (x < 1)
+ fun_l22_n130(x)
+ else
+ fun_l22_n269(x)
+ end
+end
+
+def fun_l21_n499(x)
+ if (x < 1)
+ fun_l22_n275(x)
+ else
+ fun_l22_n176(x)
+ end
+end
+
+def fun_l21_n500(x)
+ if (x < 1)
+ fun_l22_n493(x)
+ else
+ fun_l22_n322(x)
+ end
+end
+
+def fun_l21_n501(x)
+ if (x < 1)
+ fun_l22_n421(x)
+ else
+ fun_l22_n859(x)
+ end
+end
+
+def fun_l21_n502(x)
+ if (x < 1)
+ fun_l22_n611(x)
+ else
+ fun_l22_n727(x)
+ end
+end
+
+def fun_l21_n503(x)
+ if (x < 1)
+ fun_l22_n42(x)
+ else
+ fun_l22_n294(x)
+ end
+end
+
+def fun_l21_n504(x)
+ if (x < 1)
+ fun_l22_n735(x)
+ else
+ fun_l22_n145(x)
+ end
+end
+
+def fun_l21_n505(x)
+ if (x < 1)
+ fun_l22_n865(x)
+ else
+ fun_l22_n225(x)
+ end
+end
+
+def fun_l21_n506(x)
+ if (x < 1)
+ fun_l22_n922(x)
+ else
+ fun_l22_n619(x)
+ end
+end
+
+def fun_l21_n507(x)
+ if (x < 1)
+ fun_l22_n646(x)
+ else
+ fun_l22_n145(x)
+ end
+end
+
+def fun_l21_n508(x)
+ if (x < 1)
+ fun_l22_n608(x)
+ else
+ fun_l22_n320(x)
+ end
+end
+
+def fun_l21_n509(x)
+ if (x < 1)
+ fun_l22_n624(x)
+ else
+ fun_l22_n984(x)
+ end
+end
+
+def fun_l21_n510(x)
+ if (x < 1)
+ fun_l22_n454(x)
+ else
+ fun_l22_n988(x)
+ end
+end
+
+def fun_l21_n511(x)
+ if (x < 1)
+ fun_l22_n593(x)
+ else
+ fun_l22_n796(x)
+ end
+end
+
+def fun_l21_n512(x)
+ if (x < 1)
+ fun_l22_n922(x)
+ else
+ fun_l22_n5(x)
+ end
+end
+
+def fun_l21_n513(x)
+ if (x < 1)
+ fun_l22_n0(x)
+ else
+ fun_l22_n338(x)
+ end
+end
+
+def fun_l21_n514(x)
+ if (x < 1)
+ fun_l22_n454(x)
+ else
+ fun_l22_n743(x)
+ end
+end
+
+def fun_l21_n515(x)
+ if (x < 1)
+ fun_l22_n215(x)
+ else
+ fun_l22_n689(x)
+ end
+end
+
+def fun_l21_n516(x)
+ if (x < 1)
+ fun_l22_n148(x)
+ else
+ fun_l22_n850(x)
+ end
+end
+
+def fun_l21_n517(x)
+ if (x < 1)
+ fun_l22_n466(x)
+ else
+ fun_l22_n529(x)
+ end
+end
+
+def fun_l21_n518(x)
+ if (x < 1)
+ fun_l22_n967(x)
+ else
+ fun_l22_n790(x)
+ end
+end
+
+def fun_l21_n519(x)
+ if (x < 1)
+ fun_l22_n97(x)
+ else
+ fun_l22_n461(x)
+ end
+end
+
+def fun_l21_n520(x)
+ if (x < 1)
+ fun_l22_n106(x)
+ else
+ fun_l22_n41(x)
+ end
+end
+
+def fun_l21_n521(x)
+ if (x < 1)
+ fun_l22_n561(x)
+ else
+ fun_l22_n428(x)
+ end
+end
+
+def fun_l21_n522(x)
+ if (x < 1)
+ fun_l22_n816(x)
+ else
+ fun_l22_n42(x)
+ end
+end
+
+def fun_l21_n523(x)
+ if (x < 1)
+ fun_l22_n229(x)
+ else
+ fun_l22_n720(x)
+ end
+end
+
+def fun_l21_n524(x)
+ if (x < 1)
+ fun_l22_n341(x)
+ else
+ fun_l22_n875(x)
+ end
+end
+
+def fun_l21_n525(x)
+ if (x < 1)
+ fun_l22_n23(x)
+ else
+ fun_l22_n227(x)
+ end
+end
+
+def fun_l21_n526(x)
+ if (x < 1)
+ fun_l22_n230(x)
+ else
+ fun_l22_n655(x)
+ end
+end
+
+def fun_l21_n527(x)
+ if (x < 1)
+ fun_l22_n19(x)
+ else
+ fun_l22_n957(x)
+ end
+end
+
+def fun_l21_n528(x)
+ if (x < 1)
+ fun_l22_n680(x)
+ else
+ fun_l22_n142(x)
+ end
+end
+
+def fun_l21_n529(x)
+ if (x < 1)
+ fun_l22_n994(x)
+ else
+ fun_l22_n674(x)
+ end
+end
+
+def fun_l21_n530(x)
+ if (x < 1)
+ fun_l22_n762(x)
+ else
+ fun_l22_n10(x)
+ end
+end
+
+def fun_l21_n531(x)
+ if (x < 1)
+ fun_l22_n75(x)
+ else
+ fun_l22_n43(x)
+ end
+end
+
+def fun_l21_n532(x)
+ if (x < 1)
+ fun_l22_n481(x)
+ else
+ fun_l22_n766(x)
+ end
+end
+
+def fun_l21_n533(x)
+ if (x < 1)
+ fun_l22_n261(x)
+ else
+ fun_l22_n256(x)
+ end
+end
+
+def fun_l21_n534(x)
+ if (x < 1)
+ fun_l22_n316(x)
+ else
+ fun_l22_n547(x)
+ end
+end
+
+def fun_l21_n535(x)
+ if (x < 1)
+ fun_l22_n304(x)
+ else
+ fun_l22_n392(x)
+ end
+end
+
+def fun_l21_n536(x)
+ if (x < 1)
+ fun_l22_n83(x)
+ else
+ fun_l22_n789(x)
+ end
+end
+
+def fun_l21_n537(x)
+ if (x < 1)
+ fun_l22_n434(x)
+ else
+ fun_l22_n783(x)
+ end
+end
+
+def fun_l21_n538(x)
+ if (x < 1)
+ fun_l22_n445(x)
+ else
+ fun_l22_n960(x)
+ end
+end
+
+def fun_l21_n539(x)
+ if (x < 1)
+ fun_l22_n398(x)
+ else
+ fun_l22_n529(x)
+ end
+end
+
+def fun_l21_n540(x)
+ if (x < 1)
+ fun_l22_n413(x)
+ else
+ fun_l22_n684(x)
+ end
+end
+
+def fun_l21_n541(x)
+ if (x < 1)
+ fun_l22_n812(x)
+ else
+ fun_l22_n257(x)
+ end
+end
+
+def fun_l21_n542(x)
+ if (x < 1)
+ fun_l22_n186(x)
+ else
+ fun_l22_n35(x)
+ end
+end
+
+def fun_l21_n543(x)
+ if (x < 1)
+ fun_l22_n489(x)
+ else
+ fun_l22_n93(x)
+ end
+end
+
+def fun_l21_n544(x)
+ if (x < 1)
+ fun_l22_n105(x)
+ else
+ fun_l22_n282(x)
+ end
+end
+
+def fun_l21_n545(x)
+ if (x < 1)
+ fun_l22_n586(x)
+ else
+ fun_l22_n614(x)
+ end
+end
+
+def fun_l21_n546(x)
+ if (x < 1)
+ fun_l22_n75(x)
+ else
+ fun_l22_n589(x)
+ end
+end
+
+def fun_l21_n547(x)
+ if (x < 1)
+ fun_l22_n128(x)
+ else
+ fun_l22_n552(x)
+ end
+end
+
+def fun_l21_n548(x)
+ if (x < 1)
+ fun_l22_n961(x)
+ else
+ fun_l22_n209(x)
+ end
+end
+
+def fun_l21_n549(x)
+ if (x < 1)
+ fun_l22_n727(x)
+ else
+ fun_l22_n615(x)
+ end
+end
+
+def fun_l21_n550(x)
+ if (x < 1)
+ fun_l22_n45(x)
+ else
+ fun_l22_n161(x)
+ end
+end
+
+def fun_l21_n551(x)
+ if (x < 1)
+ fun_l22_n480(x)
+ else
+ fun_l22_n852(x)
+ end
+end
+
+def fun_l21_n552(x)
+ if (x < 1)
+ fun_l22_n383(x)
+ else
+ fun_l22_n698(x)
+ end
+end
+
+def fun_l21_n553(x)
+ if (x < 1)
+ fun_l22_n805(x)
+ else
+ fun_l22_n309(x)
+ end
+end
+
+def fun_l21_n554(x)
+ if (x < 1)
+ fun_l22_n635(x)
+ else
+ fun_l22_n821(x)
+ end
+end
+
+def fun_l21_n555(x)
+ if (x < 1)
+ fun_l22_n616(x)
+ else
+ fun_l22_n52(x)
+ end
+end
+
+def fun_l21_n556(x)
+ if (x < 1)
+ fun_l22_n283(x)
+ else
+ fun_l22_n514(x)
+ end
+end
+
+def fun_l21_n557(x)
+ if (x < 1)
+ fun_l22_n6(x)
+ else
+ fun_l22_n174(x)
+ end
+end
+
+def fun_l21_n558(x)
+ if (x < 1)
+ fun_l22_n344(x)
+ else
+ fun_l22_n932(x)
+ end
+end
+
+def fun_l21_n559(x)
+ if (x < 1)
+ fun_l22_n287(x)
+ else
+ fun_l22_n98(x)
+ end
+end
+
+def fun_l21_n560(x)
+ if (x < 1)
+ fun_l22_n510(x)
+ else
+ fun_l22_n672(x)
+ end
+end
+
+def fun_l21_n561(x)
+ if (x < 1)
+ fun_l22_n951(x)
+ else
+ fun_l22_n984(x)
+ end
+end
+
+def fun_l21_n562(x)
+ if (x < 1)
+ fun_l22_n133(x)
+ else
+ fun_l22_n207(x)
+ end
+end
+
+def fun_l21_n563(x)
+ if (x < 1)
+ fun_l22_n780(x)
+ else
+ fun_l22_n402(x)
+ end
+end
+
+def fun_l21_n564(x)
+ if (x < 1)
+ fun_l22_n783(x)
+ else
+ fun_l22_n189(x)
+ end
+end
+
+def fun_l21_n565(x)
+ if (x < 1)
+ fun_l22_n736(x)
+ else
+ fun_l22_n590(x)
+ end
+end
+
+def fun_l21_n566(x)
+ if (x < 1)
+ fun_l22_n724(x)
+ else
+ fun_l22_n69(x)
+ end
+end
+
+def fun_l21_n567(x)
+ if (x < 1)
+ fun_l22_n521(x)
+ else
+ fun_l22_n242(x)
+ end
+end
+
+def fun_l21_n568(x)
+ if (x < 1)
+ fun_l22_n440(x)
+ else
+ fun_l22_n156(x)
+ end
+end
+
+def fun_l21_n569(x)
+ if (x < 1)
+ fun_l22_n776(x)
+ else
+ fun_l22_n456(x)
+ end
+end
+
+def fun_l21_n570(x)
+ if (x < 1)
+ fun_l22_n336(x)
+ else
+ fun_l22_n615(x)
+ end
+end
+
+def fun_l21_n571(x)
+ if (x < 1)
+ fun_l22_n775(x)
+ else
+ fun_l22_n585(x)
+ end
+end
+
+def fun_l21_n572(x)
+ if (x < 1)
+ fun_l22_n466(x)
+ else
+ fun_l22_n559(x)
+ end
+end
+
+def fun_l21_n573(x)
+ if (x < 1)
+ fun_l22_n609(x)
+ else
+ fun_l22_n177(x)
+ end
+end
+
+def fun_l21_n574(x)
+ if (x < 1)
+ fun_l22_n310(x)
+ else
+ fun_l22_n190(x)
+ end
+end
+
+def fun_l21_n575(x)
+ if (x < 1)
+ fun_l22_n861(x)
+ else
+ fun_l22_n289(x)
+ end
+end
+
+def fun_l21_n576(x)
+ if (x < 1)
+ fun_l22_n978(x)
+ else
+ fun_l22_n460(x)
+ end
+end
+
+def fun_l21_n577(x)
+ if (x < 1)
+ fun_l22_n440(x)
+ else
+ fun_l22_n816(x)
+ end
+end
+
+def fun_l21_n578(x)
+ if (x < 1)
+ fun_l22_n522(x)
+ else
+ fun_l22_n214(x)
+ end
+end
+
+def fun_l21_n579(x)
+ if (x < 1)
+ fun_l22_n38(x)
+ else
+ fun_l22_n166(x)
+ end
+end
+
+def fun_l21_n580(x)
+ if (x < 1)
+ fun_l22_n114(x)
+ else
+ fun_l22_n314(x)
+ end
+end
+
+def fun_l21_n581(x)
+ if (x < 1)
+ fun_l22_n233(x)
+ else
+ fun_l22_n840(x)
+ end
+end
+
+def fun_l21_n582(x)
+ if (x < 1)
+ fun_l22_n867(x)
+ else
+ fun_l22_n213(x)
+ end
+end
+
+def fun_l21_n583(x)
+ if (x < 1)
+ fun_l22_n742(x)
+ else
+ fun_l22_n798(x)
+ end
+end
+
+def fun_l21_n584(x)
+ if (x < 1)
+ fun_l22_n772(x)
+ else
+ fun_l22_n400(x)
+ end
+end
+
+def fun_l21_n585(x)
+ if (x < 1)
+ fun_l22_n564(x)
+ else
+ fun_l22_n70(x)
+ end
+end
+
+def fun_l21_n586(x)
+ if (x < 1)
+ fun_l22_n836(x)
+ else
+ fun_l22_n188(x)
+ end
+end
+
+def fun_l21_n587(x)
+ if (x < 1)
+ fun_l22_n624(x)
+ else
+ fun_l22_n923(x)
+ end
+end
+
+def fun_l21_n588(x)
+ if (x < 1)
+ fun_l22_n265(x)
+ else
+ fun_l22_n733(x)
+ end
+end
+
+def fun_l21_n589(x)
+ if (x < 1)
+ fun_l22_n545(x)
+ else
+ fun_l22_n399(x)
+ end
+end
+
+def fun_l21_n590(x)
+ if (x < 1)
+ fun_l22_n22(x)
+ else
+ fun_l22_n266(x)
+ end
+end
+
+def fun_l21_n591(x)
+ if (x < 1)
+ fun_l22_n504(x)
+ else
+ fun_l22_n798(x)
+ end
+end
+
+def fun_l21_n592(x)
+ if (x < 1)
+ fun_l22_n979(x)
+ else
+ fun_l22_n712(x)
+ end
+end
+
+def fun_l21_n593(x)
+ if (x < 1)
+ fun_l22_n343(x)
+ else
+ fun_l22_n54(x)
+ end
+end
+
+def fun_l21_n594(x)
+ if (x < 1)
+ fun_l22_n893(x)
+ else
+ fun_l22_n465(x)
+ end
+end
+
+def fun_l21_n595(x)
+ if (x < 1)
+ fun_l22_n28(x)
+ else
+ fun_l22_n162(x)
+ end
+end
+
+def fun_l21_n596(x)
+ if (x < 1)
+ fun_l22_n609(x)
+ else
+ fun_l22_n882(x)
+ end
+end
+
+def fun_l21_n597(x)
+ if (x < 1)
+ fun_l22_n575(x)
+ else
+ fun_l22_n951(x)
+ end
+end
+
+def fun_l21_n598(x)
+ if (x < 1)
+ fun_l22_n794(x)
+ else
+ fun_l22_n767(x)
+ end
+end
+
+def fun_l21_n599(x)
+ if (x < 1)
+ fun_l22_n605(x)
+ else
+ fun_l22_n141(x)
+ end
+end
+
+def fun_l21_n600(x)
+ if (x < 1)
+ fun_l22_n54(x)
+ else
+ fun_l22_n958(x)
+ end
+end
+
+def fun_l21_n601(x)
+ if (x < 1)
+ fun_l22_n506(x)
+ else
+ fun_l22_n269(x)
+ end
+end
+
+def fun_l21_n602(x)
+ if (x < 1)
+ fun_l22_n401(x)
+ else
+ fun_l22_n104(x)
+ end
+end
+
+def fun_l21_n603(x)
+ if (x < 1)
+ fun_l22_n379(x)
+ else
+ fun_l22_n489(x)
+ end
+end
+
+def fun_l21_n604(x)
+ if (x < 1)
+ fun_l22_n673(x)
+ else
+ fun_l22_n502(x)
+ end
+end
+
+def fun_l21_n605(x)
+ if (x < 1)
+ fun_l22_n355(x)
+ else
+ fun_l22_n483(x)
+ end
+end
+
+def fun_l21_n606(x)
+ if (x < 1)
+ fun_l22_n763(x)
+ else
+ fun_l22_n160(x)
+ end
+end
+
+def fun_l21_n607(x)
+ if (x < 1)
+ fun_l22_n802(x)
+ else
+ fun_l22_n414(x)
+ end
+end
+
+def fun_l21_n608(x)
+ if (x < 1)
+ fun_l22_n401(x)
+ else
+ fun_l22_n987(x)
+ end
+end
+
+def fun_l21_n609(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n511(x)
+ end
+end
+
+def fun_l21_n610(x)
+ if (x < 1)
+ fun_l22_n883(x)
+ else
+ fun_l22_n73(x)
+ end
+end
+
+def fun_l21_n611(x)
+ if (x < 1)
+ fun_l22_n105(x)
+ else
+ fun_l22_n612(x)
+ end
+end
+
+def fun_l21_n612(x)
+ if (x < 1)
+ fun_l22_n911(x)
+ else
+ fun_l22_n764(x)
+ end
+end
+
+def fun_l21_n613(x)
+ if (x < 1)
+ fun_l22_n818(x)
+ else
+ fun_l22_n43(x)
+ end
+end
+
+def fun_l21_n614(x)
+ if (x < 1)
+ fun_l22_n388(x)
+ else
+ fun_l22_n99(x)
+ end
+end
+
+def fun_l21_n615(x)
+ if (x < 1)
+ fun_l22_n657(x)
+ else
+ fun_l22_n231(x)
+ end
+end
+
+def fun_l21_n616(x)
+ if (x < 1)
+ fun_l22_n937(x)
+ else
+ fun_l22_n357(x)
+ end
+end
+
+def fun_l21_n617(x)
+ if (x < 1)
+ fun_l22_n691(x)
+ else
+ fun_l22_n952(x)
+ end
+end
+
+def fun_l21_n618(x)
+ if (x < 1)
+ fun_l22_n712(x)
+ else
+ fun_l22_n84(x)
+ end
+end
+
+def fun_l21_n619(x)
+ if (x < 1)
+ fun_l22_n483(x)
+ else
+ fun_l22_n506(x)
+ end
+end
+
+def fun_l21_n620(x)
+ if (x < 1)
+ fun_l22_n804(x)
+ else
+ fun_l22_n813(x)
+ end
+end
+
+def fun_l21_n621(x)
+ if (x < 1)
+ fun_l22_n280(x)
+ else
+ fun_l22_n626(x)
+ end
+end
+
+def fun_l21_n622(x)
+ if (x < 1)
+ fun_l22_n979(x)
+ else
+ fun_l22_n508(x)
+ end
+end
+
+def fun_l21_n623(x)
+ if (x < 1)
+ fun_l22_n482(x)
+ else
+ fun_l22_n120(x)
+ end
+end
+
+def fun_l21_n624(x)
+ if (x < 1)
+ fun_l22_n99(x)
+ else
+ fun_l22_n975(x)
+ end
+end
+
+def fun_l21_n625(x)
+ if (x < 1)
+ fun_l22_n540(x)
+ else
+ fun_l22_n68(x)
+ end
+end
+
+def fun_l21_n626(x)
+ if (x < 1)
+ fun_l22_n818(x)
+ else
+ fun_l22_n591(x)
+ end
+end
+
+def fun_l21_n627(x)
+ if (x < 1)
+ fun_l22_n37(x)
+ else
+ fun_l22_n984(x)
+ end
+end
+
+def fun_l21_n628(x)
+ if (x < 1)
+ fun_l22_n547(x)
+ else
+ fun_l22_n482(x)
+ end
+end
+
+def fun_l21_n629(x)
+ if (x < 1)
+ fun_l22_n851(x)
+ else
+ fun_l22_n335(x)
+ end
+end
+
+def fun_l21_n630(x)
+ if (x < 1)
+ fun_l22_n474(x)
+ else
+ fun_l22_n402(x)
+ end
+end
+
+def fun_l21_n631(x)
+ if (x < 1)
+ fun_l22_n433(x)
+ else
+ fun_l22_n298(x)
+ end
+end
+
+def fun_l21_n632(x)
+ if (x < 1)
+ fun_l22_n376(x)
+ else
+ fun_l22_n898(x)
+ end
+end
+
+def fun_l21_n633(x)
+ if (x < 1)
+ fun_l22_n456(x)
+ else
+ fun_l22_n753(x)
+ end
+end
+
+def fun_l21_n634(x)
+ if (x < 1)
+ fun_l22_n888(x)
+ else
+ fun_l22_n394(x)
+ end
+end
+
+def fun_l21_n635(x)
+ if (x < 1)
+ fun_l22_n555(x)
+ else
+ fun_l22_n69(x)
+ end
+end
+
+def fun_l21_n636(x)
+ if (x < 1)
+ fun_l22_n572(x)
+ else
+ fun_l22_n822(x)
+ end
+end
+
+def fun_l21_n637(x)
+ if (x < 1)
+ fun_l22_n645(x)
+ else
+ fun_l22_n968(x)
+ end
+end
+
+def fun_l21_n638(x)
+ if (x < 1)
+ fun_l22_n406(x)
+ else
+ fun_l22_n318(x)
+ end
+end
+
+def fun_l21_n639(x)
+ if (x < 1)
+ fun_l22_n554(x)
+ else
+ fun_l22_n591(x)
+ end
+end
+
+def fun_l21_n640(x)
+ if (x < 1)
+ fun_l22_n478(x)
+ else
+ fun_l22_n962(x)
+ end
+end
+
+def fun_l21_n641(x)
+ if (x < 1)
+ fun_l22_n688(x)
+ else
+ fun_l22_n305(x)
+ end
+end
+
+def fun_l21_n642(x)
+ if (x < 1)
+ fun_l22_n767(x)
+ else
+ fun_l22_n156(x)
+ end
+end
+
+def fun_l21_n643(x)
+ if (x < 1)
+ fun_l22_n264(x)
+ else
+ fun_l22_n489(x)
+ end
+end
+
+def fun_l21_n644(x)
+ if (x < 1)
+ fun_l22_n678(x)
+ else
+ fun_l22_n196(x)
+ end
+end
+
+def fun_l21_n645(x)
+ if (x < 1)
+ fun_l22_n849(x)
+ else
+ fun_l22_n488(x)
+ end
+end
+
+def fun_l21_n646(x)
+ if (x < 1)
+ fun_l22_n837(x)
+ else
+ fun_l22_n274(x)
+ end
+end
+
+def fun_l21_n647(x)
+ if (x < 1)
+ fun_l22_n58(x)
+ else
+ fun_l22_n694(x)
+ end
+end
+
+def fun_l21_n648(x)
+ if (x < 1)
+ fun_l22_n878(x)
+ else
+ fun_l22_n356(x)
+ end
+end
+
+def fun_l21_n649(x)
+ if (x < 1)
+ fun_l22_n945(x)
+ else
+ fun_l22_n28(x)
+ end
+end
+
+def fun_l21_n650(x)
+ if (x < 1)
+ fun_l22_n10(x)
+ else
+ fun_l22_n330(x)
+ end
+end
+
+def fun_l21_n651(x)
+ if (x < 1)
+ fun_l22_n461(x)
+ else
+ fun_l22_n872(x)
+ end
+end
+
+def fun_l21_n652(x)
+ if (x < 1)
+ fun_l22_n860(x)
+ else
+ fun_l22_n358(x)
+ end
+end
+
+def fun_l21_n653(x)
+ if (x < 1)
+ fun_l22_n11(x)
+ else
+ fun_l22_n596(x)
+ end
+end
+
+def fun_l21_n654(x)
+ if (x < 1)
+ fun_l22_n340(x)
+ else
+ fun_l22_n335(x)
+ end
+end
+
+def fun_l21_n655(x)
+ if (x < 1)
+ fun_l22_n259(x)
+ else
+ fun_l22_n642(x)
+ end
+end
+
+def fun_l21_n656(x)
+ if (x < 1)
+ fun_l22_n78(x)
+ else
+ fun_l22_n442(x)
+ end
+end
+
+def fun_l21_n657(x)
+ if (x < 1)
+ fun_l22_n151(x)
+ else
+ fun_l22_n122(x)
+ end
+end
+
+def fun_l21_n658(x)
+ if (x < 1)
+ fun_l22_n440(x)
+ else
+ fun_l22_n940(x)
+ end
+end
+
+def fun_l21_n659(x)
+ if (x < 1)
+ fun_l22_n237(x)
+ else
+ fun_l22_n899(x)
+ end
+end
+
+def fun_l21_n660(x)
+ if (x < 1)
+ fun_l22_n906(x)
+ else
+ fun_l22_n789(x)
+ end
+end
+
+def fun_l21_n661(x)
+ if (x < 1)
+ fun_l22_n812(x)
+ else
+ fun_l22_n492(x)
+ end
+end
+
+def fun_l21_n662(x)
+ if (x < 1)
+ fun_l22_n241(x)
+ else
+ fun_l22_n732(x)
+ end
+end
+
+def fun_l21_n663(x)
+ if (x < 1)
+ fun_l22_n557(x)
+ else
+ fun_l22_n570(x)
+ end
+end
+
+def fun_l21_n664(x)
+ if (x < 1)
+ fun_l22_n928(x)
+ else
+ fun_l22_n943(x)
+ end
+end
+
+def fun_l21_n665(x)
+ if (x < 1)
+ fun_l22_n400(x)
+ else
+ fun_l22_n914(x)
+ end
+end
+
+def fun_l21_n666(x)
+ if (x < 1)
+ fun_l22_n368(x)
+ else
+ fun_l22_n434(x)
+ end
+end
+
+def fun_l21_n667(x)
+ if (x < 1)
+ fun_l22_n827(x)
+ else
+ fun_l22_n213(x)
+ end
+end
+
+def fun_l21_n668(x)
+ if (x < 1)
+ fun_l22_n729(x)
+ else
+ fun_l22_n273(x)
+ end
+end
+
+def fun_l21_n669(x)
+ if (x < 1)
+ fun_l22_n649(x)
+ else
+ fun_l22_n29(x)
+ end
+end
+
+def fun_l21_n670(x)
+ if (x < 1)
+ fun_l22_n878(x)
+ else
+ fun_l22_n794(x)
+ end
+end
+
+def fun_l21_n671(x)
+ if (x < 1)
+ fun_l22_n474(x)
+ else
+ fun_l22_n960(x)
+ end
+end
+
+def fun_l21_n672(x)
+ if (x < 1)
+ fun_l22_n250(x)
+ else
+ fun_l22_n935(x)
+ end
+end
+
+def fun_l21_n673(x)
+ if (x < 1)
+ fun_l22_n766(x)
+ else
+ fun_l22_n325(x)
+ end
+end
+
+def fun_l21_n674(x)
+ if (x < 1)
+ fun_l22_n64(x)
+ else
+ fun_l22_n334(x)
+ end
+end
+
+def fun_l21_n675(x)
+ if (x < 1)
+ fun_l22_n737(x)
+ else
+ fun_l22_n983(x)
+ end
+end
+
+def fun_l21_n676(x)
+ if (x < 1)
+ fun_l22_n506(x)
+ else
+ fun_l22_n393(x)
+ end
+end
+
+def fun_l21_n677(x)
+ if (x < 1)
+ fun_l22_n348(x)
+ else
+ fun_l22_n558(x)
+ end
+end
+
+def fun_l21_n678(x)
+ if (x < 1)
+ fun_l22_n68(x)
+ else
+ fun_l22_n483(x)
+ end
+end
+
+def fun_l21_n679(x)
+ if (x < 1)
+ fun_l22_n816(x)
+ else
+ fun_l22_n959(x)
+ end
+end
+
+def fun_l21_n680(x)
+ if (x < 1)
+ fun_l22_n128(x)
+ else
+ fun_l22_n393(x)
+ end
+end
+
+def fun_l21_n681(x)
+ if (x < 1)
+ fun_l22_n738(x)
+ else
+ fun_l22_n609(x)
+ end
+end
+
+def fun_l21_n682(x)
+ if (x < 1)
+ fun_l22_n113(x)
+ else
+ fun_l22_n664(x)
+ end
+end
+
+def fun_l21_n683(x)
+ if (x < 1)
+ fun_l22_n904(x)
+ else
+ fun_l22_n699(x)
+ end
+end
+
+def fun_l21_n684(x)
+ if (x < 1)
+ fun_l22_n759(x)
+ else
+ fun_l22_n277(x)
+ end
+end
+
+def fun_l21_n685(x)
+ if (x < 1)
+ fun_l22_n359(x)
+ else
+ fun_l22_n961(x)
+ end
+end
+
+def fun_l21_n686(x)
+ if (x < 1)
+ fun_l22_n269(x)
+ else
+ fun_l22_n66(x)
+ end
+end
+
+def fun_l21_n687(x)
+ if (x < 1)
+ fun_l22_n510(x)
+ else
+ fun_l22_n935(x)
+ end
+end
+
+def fun_l21_n688(x)
+ if (x < 1)
+ fun_l22_n127(x)
+ else
+ fun_l22_n441(x)
+ end
+end
+
+def fun_l21_n689(x)
+ if (x < 1)
+ fun_l22_n515(x)
+ else
+ fun_l22_n184(x)
+ end
+end
+
+def fun_l21_n690(x)
+ if (x < 1)
+ fun_l22_n339(x)
+ else
+ fun_l22_n121(x)
+ end
+end
+
+def fun_l21_n691(x)
+ if (x < 1)
+ fun_l22_n74(x)
+ else
+ fun_l22_n172(x)
+ end
+end
+
+def fun_l21_n692(x)
+ if (x < 1)
+ fun_l22_n156(x)
+ else
+ fun_l22_n829(x)
+ end
+end
+
+def fun_l21_n693(x)
+ if (x < 1)
+ fun_l22_n761(x)
+ else
+ fun_l22_n322(x)
+ end
+end
+
+def fun_l21_n694(x)
+ if (x < 1)
+ fun_l22_n168(x)
+ else
+ fun_l22_n789(x)
+ end
+end
+
+def fun_l21_n695(x)
+ if (x < 1)
+ fun_l22_n896(x)
+ else
+ fun_l22_n275(x)
+ end
+end
+
+def fun_l21_n696(x)
+ if (x < 1)
+ fun_l22_n283(x)
+ else
+ fun_l22_n195(x)
+ end
+end
+
+def fun_l21_n697(x)
+ if (x < 1)
+ fun_l22_n353(x)
+ else
+ fun_l22_n664(x)
+ end
+end
+
+def fun_l21_n698(x)
+ if (x < 1)
+ fun_l22_n801(x)
+ else
+ fun_l22_n544(x)
+ end
+end
+
+def fun_l21_n699(x)
+ if (x < 1)
+ fun_l22_n729(x)
+ else
+ fun_l22_n323(x)
+ end
+end
+
+def fun_l21_n700(x)
+ if (x < 1)
+ fun_l22_n47(x)
+ else
+ fun_l22_n340(x)
+ end
+end
+
+def fun_l21_n701(x)
+ if (x < 1)
+ fun_l22_n132(x)
+ else
+ fun_l22_n968(x)
+ end
+end
+
+def fun_l21_n702(x)
+ if (x < 1)
+ fun_l22_n556(x)
+ else
+ fun_l22_n23(x)
+ end
+end
+
+def fun_l21_n703(x)
+ if (x < 1)
+ fun_l22_n274(x)
+ else
+ fun_l22_n276(x)
+ end
+end
+
+def fun_l21_n704(x)
+ if (x < 1)
+ fun_l22_n152(x)
+ else
+ fun_l22_n244(x)
+ end
+end
+
+def fun_l21_n705(x)
+ if (x < 1)
+ fun_l22_n508(x)
+ else
+ fun_l22_n350(x)
+ end
+end
+
+def fun_l21_n706(x)
+ if (x < 1)
+ fun_l22_n188(x)
+ else
+ fun_l22_n60(x)
+ end
+end
+
+def fun_l21_n707(x)
+ if (x < 1)
+ fun_l22_n970(x)
+ else
+ fun_l22_n55(x)
+ end
+end
+
+def fun_l21_n708(x)
+ if (x < 1)
+ fun_l22_n840(x)
+ else
+ fun_l22_n990(x)
+ end
+end
+
+def fun_l21_n709(x)
+ if (x < 1)
+ fun_l22_n466(x)
+ else
+ fun_l22_n25(x)
+ end
+end
+
+def fun_l21_n710(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n481(x)
+ end
+end
+
+def fun_l21_n711(x)
+ if (x < 1)
+ fun_l22_n859(x)
+ else
+ fun_l22_n58(x)
+ end
+end
+
+def fun_l21_n712(x)
+ if (x < 1)
+ fun_l22_n282(x)
+ else
+ fun_l22_n807(x)
+ end
+end
+
+def fun_l21_n713(x)
+ if (x < 1)
+ fun_l22_n387(x)
+ else
+ fun_l22_n235(x)
+ end
+end
+
+def fun_l21_n714(x)
+ if (x < 1)
+ fun_l22_n558(x)
+ else
+ fun_l22_n494(x)
+ end
+end
+
+def fun_l21_n715(x)
+ if (x < 1)
+ fun_l22_n613(x)
+ else
+ fun_l22_n194(x)
+ end
+end
+
+def fun_l21_n716(x)
+ if (x < 1)
+ fun_l22_n120(x)
+ else
+ fun_l22_n154(x)
+ end
+end
+
+def fun_l21_n717(x)
+ if (x < 1)
+ fun_l22_n501(x)
+ else
+ fun_l22_n540(x)
+ end
+end
+
+def fun_l21_n718(x)
+ if (x < 1)
+ fun_l22_n283(x)
+ else
+ fun_l22_n102(x)
+ end
+end
+
+def fun_l21_n719(x)
+ if (x < 1)
+ fun_l22_n569(x)
+ else
+ fun_l22_n407(x)
+ end
+end
+
+def fun_l21_n720(x)
+ if (x < 1)
+ fun_l22_n86(x)
+ else
+ fun_l22_n99(x)
+ end
+end
+
+def fun_l21_n721(x)
+ if (x < 1)
+ fun_l22_n872(x)
+ else
+ fun_l22_n331(x)
+ end
+end
+
+def fun_l21_n722(x)
+ if (x < 1)
+ fun_l22_n772(x)
+ else
+ fun_l22_n57(x)
+ end
+end
+
+def fun_l21_n723(x)
+ if (x < 1)
+ fun_l22_n396(x)
+ else
+ fun_l22_n534(x)
+ end
+end
+
+def fun_l21_n724(x)
+ if (x < 1)
+ fun_l22_n928(x)
+ else
+ fun_l22_n576(x)
+ end
+end
+
+def fun_l21_n725(x)
+ if (x < 1)
+ fun_l22_n650(x)
+ else
+ fun_l22_n790(x)
+ end
+end
+
+def fun_l21_n726(x)
+ if (x < 1)
+ fun_l22_n173(x)
+ else
+ fun_l22_n480(x)
+ end
+end
+
+def fun_l21_n727(x)
+ if (x < 1)
+ fun_l22_n222(x)
+ else
+ fun_l22_n258(x)
+ end
+end
+
+def fun_l21_n728(x)
+ if (x < 1)
+ fun_l22_n797(x)
+ else
+ fun_l22_n793(x)
+ end
+end
+
+def fun_l21_n729(x)
+ if (x < 1)
+ fun_l22_n260(x)
+ else
+ fun_l22_n737(x)
+ end
+end
+
+def fun_l21_n730(x)
+ if (x < 1)
+ fun_l22_n419(x)
+ else
+ fun_l22_n974(x)
+ end
+end
+
+def fun_l21_n731(x)
+ if (x < 1)
+ fun_l22_n837(x)
+ else
+ fun_l22_n628(x)
+ end
+end
+
+def fun_l21_n732(x)
+ if (x < 1)
+ fun_l22_n753(x)
+ else
+ fun_l22_n380(x)
+ end
+end
+
+def fun_l21_n733(x)
+ if (x < 1)
+ fun_l22_n420(x)
+ else
+ fun_l22_n890(x)
+ end
+end
+
+def fun_l21_n734(x)
+ if (x < 1)
+ fun_l22_n993(x)
+ else
+ fun_l22_n172(x)
+ end
+end
+
+def fun_l21_n735(x)
+ if (x < 1)
+ fun_l22_n123(x)
+ else
+ fun_l22_n290(x)
+ end
+end
+
+def fun_l21_n736(x)
+ if (x < 1)
+ fun_l22_n805(x)
+ else
+ fun_l22_n923(x)
+ end
+end
+
+def fun_l21_n737(x)
+ if (x < 1)
+ fun_l22_n124(x)
+ else
+ fun_l22_n25(x)
+ end
+end
+
+def fun_l21_n738(x)
+ if (x < 1)
+ fun_l22_n192(x)
+ else
+ fun_l22_n258(x)
+ end
+end
+
+def fun_l21_n739(x)
+ if (x < 1)
+ fun_l22_n243(x)
+ else
+ fun_l22_n512(x)
+ end
+end
+
+def fun_l21_n740(x)
+ if (x < 1)
+ fun_l22_n577(x)
+ else
+ fun_l22_n307(x)
+ end
+end
+
+def fun_l21_n741(x)
+ if (x < 1)
+ fun_l22_n422(x)
+ else
+ fun_l22_n51(x)
+ end
+end
+
+def fun_l21_n742(x)
+ if (x < 1)
+ fun_l22_n247(x)
+ else
+ fun_l22_n453(x)
+ end
+end
+
+def fun_l21_n743(x)
+ if (x < 1)
+ fun_l22_n369(x)
+ else
+ fun_l22_n564(x)
+ end
+end
+
+def fun_l21_n744(x)
+ if (x < 1)
+ fun_l22_n815(x)
+ else
+ fun_l22_n894(x)
+ end
+end
+
+def fun_l21_n745(x)
+ if (x < 1)
+ fun_l22_n526(x)
+ else
+ fun_l22_n555(x)
+ end
+end
+
+def fun_l21_n746(x)
+ if (x < 1)
+ fun_l22_n281(x)
+ else
+ fun_l22_n121(x)
+ end
+end
+
+def fun_l21_n747(x)
+ if (x < 1)
+ fun_l22_n141(x)
+ else
+ fun_l22_n335(x)
+ end
+end
+
+def fun_l21_n748(x)
+ if (x < 1)
+ fun_l22_n73(x)
+ else
+ fun_l22_n241(x)
+ end
+end
+
+def fun_l21_n749(x)
+ if (x < 1)
+ fun_l22_n201(x)
+ else
+ fun_l22_n650(x)
+ end
+end
+
+def fun_l21_n750(x)
+ if (x < 1)
+ fun_l22_n569(x)
+ else
+ fun_l22_n231(x)
+ end
+end
+
+def fun_l21_n751(x)
+ if (x < 1)
+ fun_l22_n23(x)
+ else
+ fun_l22_n315(x)
+ end
+end
+
+def fun_l21_n752(x)
+ if (x < 1)
+ fun_l22_n951(x)
+ else
+ fun_l22_n697(x)
+ end
+end
+
+def fun_l21_n753(x)
+ if (x < 1)
+ fun_l22_n734(x)
+ else
+ fun_l22_n991(x)
+ end
+end
+
+def fun_l21_n754(x)
+ if (x < 1)
+ fun_l22_n557(x)
+ else
+ fun_l22_n85(x)
+ end
+end
+
+def fun_l21_n755(x)
+ if (x < 1)
+ fun_l22_n213(x)
+ else
+ fun_l22_n918(x)
+ end
+end
+
+def fun_l21_n756(x)
+ if (x < 1)
+ fun_l22_n995(x)
+ else
+ fun_l22_n134(x)
+ end
+end
+
+def fun_l21_n757(x)
+ if (x < 1)
+ fun_l22_n173(x)
+ else
+ fun_l22_n764(x)
+ end
+end
+
+def fun_l21_n758(x)
+ if (x < 1)
+ fun_l22_n503(x)
+ else
+ fun_l22_n370(x)
+ end
+end
+
+def fun_l21_n759(x)
+ if (x < 1)
+ fun_l22_n922(x)
+ else
+ fun_l22_n819(x)
+ end
+end
+
+def fun_l21_n760(x)
+ if (x < 1)
+ fun_l22_n901(x)
+ else
+ fun_l22_n252(x)
+ end
+end
+
+def fun_l21_n761(x)
+ if (x < 1)
+ fun_l22_n928(x)
+ else
+ fun_l22_n958(x)
+ end
+end
+
+def fun_l21_n762(x)
+ if (x < 1)
+ fun_l22_n402(x)
+ else
+ fun_l22_n756(x)
+ end
+end
+
+def fun_l21_n763(x)
+ if (x < 1)
+ fun_l22_n223(x)
+ else
+ fun_l22_n781(x)
+ end
+end
+
+def fun_l21_n764(x)
+ if (x < 1)
+ fun_l22_n692(x)
+ else
+ fun_l22_n893(x)
+ end
+end
+
+def fun_l21_n765(x)
+ if (x < 1)
+ fun_l22_n308(x)
+ else
+ fun_l22_n485(x)
+ end
+end
+
+def fun_l21_n766(x)
+ if (x < 1)
+ fun_l22_n858(x)
+ else
+ fun_l22_n316(x)
+ end
+end
+
+def fun_l21_n767(x)
+ if (x < 1)
+ fun_l22_n546(x)
+ else
+ fun_l22_n793(x)
+ end
+end
+
+def fun_l21_n768(x)
+ if (x < 1)
+ fun_l22_n75(x)
+ else
+ fun_l22_n999(x)
+ end
+end
+
+def fun_l21_n769(x)
+ if (x < 1)
+ fun_l22_n758(x)
+ else
+ fun_l22_n149(x)
+ end
+end
+
+def fun_l21_n770(x)
+ if (x < 1)
+ fun_l22_n801(x)
+ else
+ fun_l22_n594(x)
+ end
+end
+
+def fun_l21_n771(x)
+ if (x < 1)
+ fun_l22_n544(x)
+ else
+ fun_l22_n477(x)
+ end
+end
+
+def fun_l21_n772(x)
+ if (x < 1)
+ fun_l22_n118(x)
+ else
+ fun_l22_n406(x)
+ end
+end
+
+def fun_l21_n773(x)
+ if (x < 1)
+ fun_l22_n741(x)
+ else
+ fun_l22_n539(x)
+ end
+end
+
+def fun_l21_n774(x)
+ if (x < 1)
+ fun_l22_n99(x)
+ else
+ fun_l22_n636(x)
+ end
+end
+
+def fun_l21_n775(x)
+ if (x < 1)
+ fun_l22_n54(x)
+ else
+ fun_l22_n139(x)
+ end
+end
+
+def fun_l21_n776(x)
+ if (x < 1)
+ fun_l22_n990(x)
+ else
+ fun_l22_n518(x)
+ end
+end
+
+def fun_l21_n777(x)
+ if (x < 1)
+ fun_l22_n172(x)
+ else
+ fun_l22_n432(x)
+ end
+end
+
+def fun_l21_n778(x)
+ if (x < 1)
+ fun_l22_n302(x)
+ else
+ fun_l22_n406(x)
+ end
+end
+
+def fun_l21_n779(x)
+ if (x < 1)
+ fun_l22_n199(x)
+ else
+ fun_l22_n198(x)
+ end
+end
+
+def fun_l21_n780(x)
+ if (x < 1)
+ fun_l22_n454(x)
+ else
+ fun_l22_n547(x)
+ end
+end
+
+def fun_l21_n781(x)
+ if (x < 1)
+ fun_l22_n234(x)
+ else
+ fun_l22_n332(x)
+ end
+end
+
+def fun_l21_n782(x)
+ if (x < 1)
+ fun_l22_n693(x)
+ else
+ fun_l22_n800(x)
+ end
+end
+
+def fun_l21_n783(x)
+ if (x < 1)
+ fun_l22_n728(x)
+ else
+ fun_l22_n799(x)
+ end
+end
+
+def fun_l21_n784(x)
+ if (x < 1)
+ fun_l22_n594(x)
+ else
+ fun_l22_n350(x)
+ end
+end
+
+def fun_l21_n785(x)
+ if (x < 1)
+ fun_l22_n695(x)
+ else
+ fun_l22_n596(x)
+ end
+end
+
+def fun_l21_n786(x)
+ if (x < 1)
+ fun_l22_n141(x)
+ else
+ fun_l22_n372(x)
+ end
+end
+
+def fun_l21_n787(x)
+ if (x < 1)
+ fun_l22_n15(x)
+ else
+ fun_l22_n352(x)
+ end
+end
+
+def fun_l21_n788(x)
+ if (x < 1)
+ fun_l22_n769(x)
+ else
+ fun_l22_n62(x)
+ end
+end
+
+def fun_l21_n789(x)
+ if (x < 1)
+ fun_l22_n284(x)
+ else
+ fun_l22_n119(x)
+ end
+end
+
+def fun_l21_n790(x)
+ if (x < 1)
+ fun_l22_n335(x)
+ else
+ fun_l22_n570(x)
+ end
+end
+
+def fun_l21_n791(x)
+ if (x < 1)
+ fun_l22_n779(x)
+ else
+ fun_l22_n104(x)
+ end
+end
+
+def fun_l21_n792(x)
+ if (x < 1)
+ fun_l22_n835(x)
+ else
+ fun_l22_n612(x)
+ end
+end
+
+def fun_l21_n793(x)
+ if (x < 1)
+ fun_l22_n241(x)
+ else
+ fun_l22_n883(x)
+ end
+end
+
+def fun_l21_n794(x)
+ if (x < 1)
+ fun_l22_n957(x)
+ else
+ fun_l22_n357(x)
+ end
+end
+
+def fun_l21_n795(x)
+ if (x < 1)
+ fun_l22_n78(x)
+ else
+ fun_l22_n392(x)
+ end
+end
+
+def fun_l21_n796(x)
+ if (x < 1)
+ fun_l22_n711(x)
+ else
+ fun_l22_n364(x)
+ end
+end
+
+def fun_l21_n797(x)
+ if (x < 1)
+ fun_l22_n909(x)
+ else
+ fun_l22_n77(x)
+ end
+end
+
+def fun_l21_n798(x)
+ if (x < 1)
+ fun_l22_n901(x)
+ else
+ fun_l22_n483(x)
+ end
+end
+
+def fun_l21_n799(x)
+ if (x < 1)
+ fun_l22_n429(x)
+ else
+ fun_l22_n244(x)
+ end
+end
+
+def fun_l21_n800(x)
+ if (x < 1)
+ fun_l22_n394(x)
+ else
+ fun_l22_n652(x)
+ end
+end
+
+def fun_l21_n801(x)
+ if (x < 1)
+ fun_l22_n831(x)
+ else
+ fun_l22_n698(x)
+ end
+end
+
+def fun_l21_n802(x)
+ if (x < 1)
+ fun_l22_n623(x)
+ else
+ fun_l22_n382(x)
+ end
+end
+
+def fun_l21_n803(x)
+ if (x < 1)
+ fun_l22_n803(x)
+ else
+ fun_l22_n370(x)
+ end
+end
+
+def fun_l21_n804(x)
+ if (x < 1)
+ fun_l22_n173(x)
+ else
+ fun_l22_n697(x)
+ end
+end
+
+def fun_l21_n805(x)
+ if (x < 1)
+ fun_l22_n653(x)
+ else
+ fun_l22_n514(x)
+ end
+end
+
+def fun_l21_n806(x)
+ if (x < 1)
+ fun_l22_n703(x)
+ else
+ fun_l22_n642(x)
+ end
+end
+
+def fun_l21_n807(x)
+ if (x < 1)
+ fun_l22_n788(x)
+ else
+ fun_l22_n594(x)
+ end
+end
+
+def fun_l21_n808(x)
+ if (x < 1)
+ fun_l22_n389(x)
+ else
+ fun_l22_n3(x)
+ end
+end
+
+def fun_l21_n809(x)
+ if (x < 1)
+ fun_l22_n548(x)
+ else
+ fun_l22_n338(x)
+ end
+end
+
+def fun_l21_n810(x)
+ if (x < 1)
+ fun_l22_n157(x)
+ else
+ fun_l22_n967(x)
+ end
+end
+
+def fun_l21_n811(x)
+ if (x < 1)
+ fun_l22_n573(x)
+ else
+ fun_l22_n91(x)
+ end
+end
+
+def fun_l21_n812(x)
+ if (x < 1)
+ fun_l22_n594(x)
+ else
+ fun_l22_n240(x)
+ end
+end
+
+def fun_l21_n813(x)
+ if (x < 1)
+ fun_l22_n661(x)
+ else
+ fun_l22_n557(x)
+ end
+end
+
+def fun_l21_n814(x)
+ if (x < 1)
+ fun_l22_n29(x)
+ else
+ fun_l22_n808(x)
+ end
+end
+
+def fun_l21_n815(x)
+ if (x < 1)
+ fun_l22_n212(x)
+ else
+ fun_l22_n592(x)
+ end
+end
+
+def fun_l21_n816(x)
+ if (x < 1)
+ fun_l22_n57(x)
+ else
+ fun_l22_n248(x)
+ end
+end
+
+def fun_l21_n817(x)
+ if (x < 1)
+ fun_l22_n656(x)
+ else
+ fun_l22_n588(x)
+ end
+end
+
+def fun_l21_n818(x)
+ if (x < 1)
+ fun_l22_n949(x)
+ else
+ fun_l22_n284(x)
+ end
+end
+
+def fun_l21_n819(x)
+ if (x < 1)
+ fun_l22_n488(x)
+ else
+ fun_l22_n543(x)
+ end
+end
+
+def fun_l21_n820(x)
+ if (x < 1)
+ fun_l22_n938(x)
+ else
+ fun_l22_n155(x)
+ end
+end
+
+def fun_l21_n821(x)
+ if (x < 1)
+ fun_l22_n4(x)
+ else
+ fun_l22_n888(x)
+ end
+end
+
+def fun_l21_n822(x)
+ if (x < 1)
+ fun_l22_n460(x)
+ else
+ fun_l22_n249(x)
+ end
+end
+
+def fun_l21_n823(x)
+ if (x < 1)
+ fun_l22_n494(x)
+ else
+ fun_l22_n864(x)
+ end
+end
+
+def fun_l21_n824(x)
+ if (x < 1)
+ fun_l22_n239(x)
+ else
+ fun_l22_n305(x)
+ end
+end
+
+def fun_l21_n825(x)
+ if (x < 1)
+ fun_l22_n578(x)
+ else
+ fun_l22_n568(x)
+ end
+end
+
+def fun_l21_n826(x)
+ if (x < 1)
+ fun_l22_n669(x)
+ else
+ fun_l22_n28(x)
+ end
+end
+
+def fun_l21_n827(x)
+ if (x < 1)
+ fun_l22_n928(x)
+ else
+ fun_l22_n43(x)
+ end
+end
+
+def fun_l21_n828(x)
+ if (x < 1)
+ fun_l22_n459(x)
+ else
+ fun_l22_n450(x)
+ end
+end
+
+def fun_l21_n829(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n583(x)
+ end
+end
+
+def fun_l21_n830(x)
+ if (x < 1)
+ fun_l22_n655(x)
+ else
+ fun_l22_n674(x)
+ end
+end
+
+def fun_l21_n831(x)
+ if (x < 1)
+ fun_l22_n551(x)
+ else
+ fun_l22_n367(x)
+ end
+end
+
+def fun_l21_n832(x)
+ if (x < 1)
+ fun_l22_n921(x)
+ else
+ fun_l22_n750(x)
+ end
+end
+
+def fun_l21_n833(x)
+ if (x < 1)
+ fun_l22_n255(x)
+ else
+ fun_l22_n253(x)
+ end
+end
+
+def fun_l21_n834(x)
+ if (x < 1)
+ fun_l22_n873(x)
+ else
+ fun_l22_n84(x)
+ end
+end
+
+def fun_l21_n835(x)
+ if (x < 1)
+ fun_l22_n362(x)
+ else
+ fun_l22_n976(x)
+ end
+end
+
+def fun_l21_n836(x)
+ if (x < 1)
+ fun_l22_n677(x)
+ else
+ fun_l22_n429(x)
+ end
+end
+
+def fun_l21_n837(x)
+ if (x < 1)
+ fun_l22_n78(x)
+ else
+ fun_l22_n782(x)
+ end
+end
+
+def fun_l21_n838(x)
+ if (x < 1)
+ fun_l22_n339(x)
+ else
+ fun_l22_n855(x)
+ end
+end
+
+def fun_l21_n839(x)
+ if (x < 1)
+ fun_l22_n73(x)
+ else
+ fun_l22_n13(x)
+ end
+end
+
+def fun_l21_n840(x)
+ if (x < 1)
+ fun_l22_n788(x)
+ else
+ fun_l22_n701(x)
+ end
+end
+
+def fun_l21_n841(x)
+ if (x < 1)
+ fun_l22_n583(x)
+ else
+ fun_l22_n501(x)
+ end
+end
+
+def fun_l21_n842(x)
+ if (x < 1)
+ fun_l22_n532(x)
+ else
+ fun_l22_n190(x)
+ end
+end
+
+def fun_l21_n843(x)
+ if (x < 1)
+ fun_l22_n206(x)
+ else
+ fun_l22_n718(x)
+ end
+end
+
+def fun_l21_n844(x)
+ if (x < 1)
+ fun_l22_n307(x)
+ else
+ fun_l22_n200(x)
+ end
+end
+
+def fun_l21_n845(x)
+ if (x < 1)
+ fun_l22_n83(x)
+ else
+ fun_l22_n294(x)
+ end
+end
+
+def fun_l21_n846(x)
+ if (x < 1)
+ fun_l22_n157(x)
+ else
+ fun_l22_n225(x)
+ end
+end
+
+def fun_l21_n847(x)
+ if (x < 1)
+ fun_l22_n935(x)
+ else
+ fun_l22_n888(x)
+ end
+end
+
+def fun_l21_n848(x)
+ if (x < 1)
+ fun_l22_n840(x)
+ else
+ fun_l22_n606(x)
+ end
+end
+
+def fun_l21_n849(x)
+ if (x < 1)
+ fun_l22_n214(x)
+ else
+ fun_l22_n198(x)
+ end
+end
+
+def fun_l21_n850(x)
+ if (x < 1)
+ fun_l22_n793(x)
+ else
+ fun_l22_n503(x)
+ end
+end
+
+def fun_l21_n851(x)
+ if (x < 1)
+ fun_l22_n210(x)
+ else
+ fun_l22_n267(x)
+ end
+end
+
+def fun_l21_n852(x)
+ if (x < 1)
+ fun_l22_n558(x)
+ else
+ fun_l22_n226(x)
+ end
+end
+
+def fun_l21_n853(x)
+ if (x < 1)
+ fun_l22_n12(x)
+ else
+ fun_l22_n765(x)
+ end
+end
+
+def fun_l21_n854(x)
+ if (x < 1)
+ fun_l22_n136(x)
+ else
+ fun_l22_n713(x)
+ end
+end
+
+def fun_l21_n855(x)
+ if (x < 1)
+ fun_l22_n638(x)
+ else
+ fun_l22_n999(x)
+ end
+end
+
+def fun_l21_n856(x)
+ if (x < 1)
+ fun_l22_n366(x)
+ else
+ fun_l22_n505(x)
+ end
+end
+
+def fun_l21_n857(x)
+ if (x < 1)
+ fun_l22_n935(x)
+ else
+ fun_l22_n657(x)
+ end
+end
+
+def fun_l21_n858(x)
+ if (x < 1)
+ fun_l22_n4(x)
+ else
+ fun_l22_n732(x)
+ end
+end
+
+def fun_l21_n859(x)
+ if (x < 1)
+ fun_l22_n433(x)
+ else
+ fun_l22_n350(x)
+ end
+end
+
+def fun_l21_n860(x)
+ if (x < 1)
+ fun_l22_n988(x)
+ else
+ fun_l22_n855(x)
+ end
+end
+
+def fun_l21_n861(x)
+ if (x < 1)
+ fun_l22_n906(x)
+ else
+ fun_l22_n118(x)
+ end
+end
+
+def fun_l21_n862(x)
+ if (x < 1)
+ fun_l22_n127(x)
+ else
+ fun_l22_n299(x)
+ end
+end
+
+def fun_l21_n863(x)
+ if (x < 1)
+ fun_l22_n324(x)
+ else
+ fun_l22_n776(x)
+ end
+end
+
+def fun_l21_n864(x)
+ if (x < 1)
+ fun_l22_n208(x)
+ else
+ fun_l22_n827(x)
+ end
+end
+
+def fun_l21_n865(x)
+ if (x < 1)
+ fun_l22_n846(x)
+ else
+ fun_l22_n750(x)
+ end
+end
+
+def fun_l21_n866(x)
+ if (x < 1)
+ fun_l22_n275(x)
+ else
+ fun_l22_n179(x)
+ end
+end
+
+def fun_l21_n867(x)
+ if (x < 1)
+ fun_l22_n234(x)
+ else
+ fun_l22_n809(x)
+ end
+end
+
+def fun_l21_n868(x)
+ if (x < 1)
+ fun_l22_n597(x)
+ else
+ fun_l22_n563(x)
+ end
+end
+
+def fun_l21_n869(x)
+ if (x < 1)
+ fun_l22_n987(x)
+ else
+ fun_l22_n690(x)
+ end
+end
+
+def fun_l21_n870(x)
+ if (x < 1)
+ fun_l22_n176(x)
+ else
+ fun_l22_n991(x)
+ end
+end
+
+def fun_l21_n871(x)
+ if (x < 1)
+ fun_l22_n272(x)
+ else
+ fun_l22_n211(x)
+ end
+end
+
+def fun_l21_n872(x)
+ if (x < 1)
+ fun_l22_n976(x)
+ else
+ fun_l22_n940(x)
+ end
+end
+
+def fun_l21_n873(x)
+ if (x < 1)
+ fun_l22_n871(x)
+ else
+ fun_l22_n866(x)
+ end
+end
+
+def fun_l21_n874(x)
+ if (x < 1)
+ fun_l22_n727(x)
+ else
+ fun_l22_n560(x)
+ end
+end
+
+def fun_l21_n875(x)
+ if (x < 1)
+ fun_l22_n201(x)
+ else
+ fun_l22_n423(x)
+ end
+end
+
+def fun_l21_n876(x)
+ if (x < 1)
+ fun_l22_n245(x)
+ else
+ fun_l22_n33(x)
+ end
+end
+
+def fun_l21_n877(x)
+ if (x < 1)
+ fun_l22_n535(x)
+ else
+ fun_l22_n11(x)
+ end
+end
+
+def fun_l21_n878(x)
+ if (x < 1)
+ fun_l22_n11(x)
+ else
+ fun_l22_n140(x)
+ end
+end
+
+def fun_l21_n879(x)
+ if (x < 1)
+ fun_l22_n757(x)
+ else
+ fun_l22_n64(x)
+ end
+end
+
+def fun_l21_n880(x)
+ if (x < 1)
+ fun_l22_n982(x)
+ else
+ fun_l22_n774(x)
+ end
+end
+
+def fun_l21_n881(x)
+ if (x < 1)
+ fun_l22_n324(x)
+ else
+ fun_l22_n903(x)
+ end
+end
+
+def fun_l21_n882(x)
+ if (x < 1)
+ fun_l22_n257(x)
+ else
+ fun_l22_n232(x)
+ end
+end
+
+def fun_l21_n883(x)
+ if (x < 1)
+ fun_l22_n546(x)
+ else
+ fun_l22_n317(x)
+ end
+end
+
+def fun_l21_n884(x)
+ if (x < 1)
+ fun_l22_n40(x)
+ else
+ fun_l22_n393(x)
+ end
+end
+
+def fun_l21_n885(x)
+ if (x < 1)
+ fun_l22_n281(x)
+ else
+ fun_l22_n572(x)
+ end
+end
+
+def fun_l21_n886(x)
+ if (x < 1)
+ fun_l22_n41(x)
+ else
+ fun_l22_n656(x)
+ end
+end
+
+def fun_l21_n887(x)
+ if (x < 1)
+ fun_l22_n911(x)
+ else
+ fun_l22_n55(x)
+ end
+end
+
+def fun_l21_n888(x)
+ if (x < 1)
+ fun_l22_n555(x)
+ else
+ fun_l22_n60(x)
+ end
+end
+
+def fun_l21_n889(x)
+ if (x < 1)
+ fun_l22_n69(x)
+ else
+ fun_l22_n330(x)
+ end
+end
+
+def fun_l21_n890(x)
+ if (x < 1)
+ fun_l22_n332(x)
+ else
+ fun_l22_n573(x)
+ end
+end
+
+def fun_l21_n891(x)
+ if (x < 1)
+ fun_l22_n529(x)
+ else
+ fun_l22_n555(x)
+ end
+end
+
+def fun_l21_n892(x)
+ if (x < 1)
+ fun_l22_n900(x)
+ else
+ fun_l22_n137(x)
+ end
+end
+
+def fun_l21_n893(x)
+ if (x < 1)
+ fun_l22_n479(x)
+ else
+ fun_l22_n196(x)
+ end
+end
+
+def fun_l21_n894(x)
+ if (x < 1)
+ fun_l22_n418(x)
+ else
+ fun_l22_n124(x)
+ end
+end
+
+def fun_l21_n895(x)
+ if (x < 1)
+ fun_l22_n658(x)
+ else
+ fun_l22_n196(x)
+ end
+end
+
+def fun_l21_n896(x)
+ if (x < 1)
+ fun_l22_n739(x)
+ else
+ fun_l22_n454(x)
+ end
+end
+
+def fun_l21_n897(x)
+ if (x < 1)
+ fun_l22_n716(x)
+ else
+ fun_l22_n150(x)
+ end
+end
+
+def fun_l21_n898(x)
+ if (x < 1)
+ fun_l22_n356(x)
+ else
+ fun_l22_n264(x)
+ end
+end
+
+def fun_l21_n899(x)
+ if (x < 1)
+ fun_l22_n667(x)
+ else
+ fun_l22_n629(x)
+ end
+end
+
+def fun_l21_n900(x)
+ if (x < 1)
+ fun_l22_n879(x)
+ else
+ fun_l22_n237(x)
+ end
+end
+
+def fun_l21_n901(x)
+ if (x < 1)
+ fun_l22_n462(x)
+ else
+ fun_l22_n401(x)
+ end
+end
+
+def fun_l21_n902(x)
+ if (x < 1)
+ fun_l22_n902(x)
+ else
+ fun_l22_n203(x)
+ end
+end
+
+def fun_l21_n903(x)
+ if (x < 1)
+ fun_l22_n802(x)
+ else
+ fun_l22_n383(x)
+ end
+end
+
+def fun_l21_n904(x)
+ if (x < 1)
+ fun_l22_n672(x)
+ else
+ fun_l22_n808(x)
+ end
+end
+
+def fun_l21_n905(x)
+ if (x < 1)
+ fun_l22_n625(x)
+ else
+ fun_l22_n320(x)
+ end
+end
+
+def fun_l21_n906(x)
+ if (x < 1)
+ fun_l22_n963(x)
+ else
+ fun_l22_n101(x)
+ end
+end
+
+def fun_l21_n907(x)
+ if (x < 1)
+ fun_l22_n609(x)
+ else
+ fun_l22_n500(x)
+ end
+end
+
+def fun_l21_n908(x)
+ if (x < 1)
+ fun_l22_n79(x)
+ else
+ fun_l22_n774(x)
+ end
+end
+
+def fun_l21_n909(x)
+ if (x < 1)
+ fun_l22_n152(x)
+ else
+ fun_l22_n245(x)
+ end
+end
+
+def fun_l21_n910(x)
+ if (x < 1)
+ fun_l22_n981(x)
+ else
+ fun_l22_n647(x)
+ end
+end
+
+def fun_l21_n911(x)
+ if (x < 1)
+ fun_l22_n457(x)
+ else
+ fun_l22_n394(x)
+ end
+end
+
+def fun_l21_n912(x)
+ if (x < 1)
+ fun_l22_n516(x)
+ else
+ fun_l22_n411(x)
+ end
+end
+
+def fun_l21_n913(x)
+ if (x < 1)
+ fun_l22_n212(x)
+ else
+ fun_l22_n159(x)
+ end
+end
+
+def fun_l21_n914(x)
+ if (x < 1)
+ fun_l22_n756(x)
+ else
+ fun_l22_n612(x)
+ end
+end
+
+def fun_l21_n915(x)
+ if (x < 1)
+ fun_l22_n78(x)
+ else
+ fun_l22_n387(x)
+ end
+end
+
+def fun_l21_n916(x)
+ if (x < 1)
+ fun_l22_n973(x)
+ else
+ fun_l22_n854(x)
+ end
+end
+
+def fun_l21_n917(x)
+ if (x < 1)
+ fun_l22_n613(x)
+ else
+ fun_l22_n78(x)
+ end
+end
+
+def fun_l21_n918(x)
+ if (x < 1)
+ fun_l22_n199(x)
+ else
+ fun_l22_n637(x)
+ end
+end
+
+def fun_l21_n919(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n804(x)
+ end
+end
+
+def fun_l21_n920(x)
+ if (x < 1)
+ fun_l22_n410(x)
+ else
+ fun_l22_n728(x)
+ end
+end
+
+def fun_l21_n921(x)
+ if (x < 1)
+ fun_l22_n139(x)
+ else
+ fun_l22_n236(x)
+ end
+end
+
+def fun_l21_n922(x)
+ if (x < 1)
+ fun_l22_n443(x)
+ else
+ fun_l22_n683(x)
+ end
+end
+
+def fun_l21_n923(x)
+ if (x < 1)
+ fun_l22_n226(x)
+ else
+ fun_l22_n906(x)
+ end
+end
+
+def fun_l21_n924(x)
+ if (x < 1)
+ fun_l22_n487(x)
+ else
+ fun_l22_n551(x)
+ end
+end
+
+def fun_l21_n925(x)
+ if (x < 1)
+ fun_l22_n143(x)
+ else
+ fun_l22_n932(x)
+ end
+end
+
+def fun_l21_n926(x)
+ if (x < 1)
+ fun_l22_n533(x)
+ else
+ fun_l22_n307(x)
+ end
+end
+
+def fun_l21_n927(x)
+ if (x < 1)
+ fun_l22_n89(x)
+ else
+ fun_l22_n278(x)
+ end
+end
+
+def fun_l21_n928(x)
+ if (x < 1)
+ fun_l22_n802(x)
+ else
+ fun_l22_n18(x)
+ end
+end
+
+def fun_l21_n929(x)
+ if (x < 1)
+ fun_l22_n266(x)
+ else
+ fun_l22_n924(x)
+ end
+end
+
+def fun_l21_n930(x)
+ if (x < 1)
+ fun_l22_n607(x)
+ else
+ fun_l22_n47(x)
+ end
+end
+
+def fun_l21_n931(x)
+ if (x < 1)
+ fun_l22_n241(x)
+ else
+ fun_l22_n983(x)
+ end
+end
+
+def fun_l21_n932(x)
+ if (x < 1)
+ fun_l22_n264(x)
+ else
+ fun_l22_n88(x)
+ end
+end
+
+def fun_l21_n933(x)
+ if (x < 1)
+ fun_l22_n26(x)
+ else
+ fun_l22_n940(x)
+ end
+end
+
+def fun_l21_n934(x)
+ if (x < 1)
+ fun_l22_n688(x)
+ else
+ fun_l22_n248(x)
+ end
+end
+
+def fun_l21_n935(x)
+ if (x < 1)
+ fun_l22_n704(x)
+ else
+ fun_l22_n808(x)
+ end
+end
+
+def fun_l21_n936(x)
+ if (x < 1)
+ fun_l22_n91(x)
+ else
+ fun_l22_n650(x)
+ end
+end
+
+def fun_l21_n937(x)
+ if (x < 1)
+ fun_l22_n308(x)
+ else
+ fun_l22_n389(x)
+ end
+end
+
+def fun_l21_n938(x)
+ if (x < 1)
+ fun_l22_n63(x)
+ else
+ fun_l22_n704(x)
+ end
+end
+
+def fun_l21_n939(x)
+ if (x < 1)
+ fun_l22_n785(x)
+ else
+ fun_l22_n852(x)
+ end
+end
+
+def fun_l21_n940(x)
+ if (x < 1)
+ fun_l22_n515(x)
+ else
+ fun_l22_n148(x)
+ end
+end
+
+def fun_l21_n941(x)
+ if (x < 1)
+ fun_l22_n607(x)
+ else
+ fun_l22_n162(x)
+ end
+end
+
+def fun_l21_n942(x)
+ if (x < 1)
+ fun_l22_n34(x)
+ else
+ fun_l22_n167(x)
+ end
+end
+
+def fun_l21_n943(x)
+ if (x < 1)
+ fun_l22_n239(x)
+ else
+ fun_l22_n100(x)
+ end
+end
+
+def fun_l21_n944(x)
+ if (x < 1)
+ fun_l22_n724(x)
+ else
+ fun_l22_n702(x)
+ end
+end
+
+def fun_l21_n945(x)
+ if (x < 1)
+ fun_l22_n121(x)
+ else
+ fun_l22_n89(x)
+ end
+end
+
+def fun_l21_n946(x)
+ if (x < 1)
+ fun_l22_n699(x)
+ else
+ fun_l22_n410(x)
+ end
+end
+
+def fun_l21_n947(x)
+ if (x < 1)
+ fun_l22_n33(x)
+ else
+ fun_l22_n843(x)
+ end
+end
+
+def fun_l21_n948(x)
+ if (x < 1)
+ fun_l22_n327(x)
+ else
+ fun_l22_n702(x)
+ end
+end
+
+def fun_l21_n949(x)
+ if (x < 1)
+ fun_l22_n191(x)
+ else
+ fun_l22_n137(x)
+ end
+end
+
+def fun_l21_n950(x)
+ if (x < 1)
+ fun_l22_n834(x)
+ else
+ fun_l22_n504(x)
+ end
+end
+
+def fun_l21_n951(x)
+ if (x < 1)
+ fun_l22_n444(x)
+ else
+ fun_l22_n857(x)
+ end
+end
+
+def fun_l21_n952(x)
+ if (x < 1)
+ fun_l22_n961(x)
+ else
+ fun_l22_n817(x)
+ end
+end
+
+def fun_l21_n953(x)
+ if (x < 1)
+ fun_l22_n166(x)
+ else
+ fun_l22_n538(x)
+ end
+end
+
+def fun_l21_n954(x)
+ if (x < 1)
+ fun_l22_n934(x)
+ else
+ fun_l22_n552(x)
+ end
+end
+
+def fun_l21_n955(x)
+ if (x < 1)
+ fun_l22_n144(x)
+ else
+ fun_l22_n814(x)
+ end
+end
+
+def fun_l21_n956(x)
+ if (x < 1)
+ fun_l22_n965(x)
+ else
+ fun_l22_n929(x)
+ end
+end
+
+def fun_l21_n957(x)
+ if (x < 1)
+ fun_l22_n812(x)
+ else
+ fun_l22_n529(x)
+ end
+end
+
+def fun_l21_n958(x)
+ if (x < 1)
+ fun_l22_n625(x)
+ else
+ fun_l22_n974(x)
+ end
+end
+
+def fun_l21_n959(x)
+ if (x < 1)
+ fun_l22_n627(x)
+ else
+ fun_l22_n262(x)
+ end
+end
+
+def fun_l21_n960(x)
+ if (x < 1)
+ fun_l22_n751(x)
+ else
+ fun_l22_n858(x)
+ end
+end
+
+def fun_l21_n961(x)
+ if (x < 1)
+ fun_l22_n819(x)
+ else
+ fun_l22_n408(x)
+ end
+end
+
+def fun_l21_n962(x)
+ if (x < 1)
+ fun_l22_n635(x)
+ else
+ fun_l22_n730(x)
+ end
+end
+
+def fun_l21_n963(x)
+ if (x < 1)
+ fun_l22_n865(x)
+ else
+ fun_l22_n919(x)
+ end
+end
+
+def fun_l21_n964(x)
+ if (x < 1)
+ fun_l22_n368(x)
+ else
+ fun_l22_n912(x)
+ end
+end
+
+def fun_l21_n965(x)
+ if (x < 1)
+ fun_l22_n202(x)
+ else
+ fun_l22_n493(x)
+ end
+end
+
+def fun_l21_n966(x)
+ if (x < 1)
+ fun_l22_n191(x)
+ else
+ fun_l22_n632(x)
+ end
+end
+
+def fun_l21_n967(x)
+ if (x < 1)
+ fun_l22_n96(x)
+ else
+ fun_l22_n329(x)
+ end
+end
+
+def fun_l21_n968(x)
+ if (x < 1)
+ fun_l22_n42(x)
+ else
+ fun_l22_n196(x)
+ end
+end
+
+def fun_l21_n969(x)
+ if (x < 1)
+ fun_l22_n521(x)
+ else
+ fun_l22_n875(x)
+ end
+end
+
+def fun_l21_n970(x)
+ if (x < 1)
+ fun_l22_n202(x)
+ else
+ fun_l22_n373(x)
+ end
+end
+
+def fun_l21_n971(x)
+ if (x < 1)
+ fun_l22_n647(x)
+ else
+ fun_l22_n591(x)
+ end
+end
+
+def fun_l21_n972(x)
+ if (x < 1)
+ fun_l22_n341(x)
+ else
+ fun_l22_n935(x)
+ end
+end
+
+def fun_l21_n973(x)
+ if (x < 1)
+ fun_l22_n151(x)
+ else
+ fun_l22_n396(x)
+ end
+end
+
+def fun_l21_n974(x)
+ if (x < 1)
+ fun_l22_n65(x)
+ else
+ fun_l22_n562(x)
+ end
+end
+
+def fun_l21_n975(x)
+ if (x < 1)
+ fun_l22_n450(x)
+ else
+ fun_l22_n482(x)
+ end
+end
+
+def fun_l21_n976(x)
+ if (x < 1)
+ fun_l22_n179(x)
+ else
+ fun_l22_n838(x)
+ end
+end
+
+def fun_l21_n977(x)
+ if (x < 1)
+ fun_l22_n571(x)
+ else
+ fun_l22_n703(x)
+ end
+end
+
+def fun_l21_n978(x)
+ if (x < 1)
+ fun_l22_n540(x)
+ else
+ fun_l22_n728(x)
+ end
+end
+
+def fun_l21_n979(x)
+ if (x < 1)
+ fun_l22_n170(x)
+ else
+ fun_l22_n487(x)
+ end
+end
+
+def fun_l21_n980(x)
+ if (x < 1)
+ fun_l22_n12(x)
+ else
+ fun_l22_n165(x)
+ end
+end
+
+def fun_l21_n981(x)
+ if (x < 1)
+ fun_l22_n722(x)
+ else
+ fun_l22_n456(x)
+ end
+end
+
+def fun_l21_n982(x)
+ if (x < 1)
+ fun_l22_n313(x)
+ else
+ fun_l22_n175(x)
+ end
+end
+
+def fun_l21_n983(x)
+ if (x < 1)
+ fun_l22_n473(x)
+ else
+ fun_l22_n840(x)
+ end
+end
+
+def fun_l21_n984(x)
+ if (x < 1)
+ fun_l22_n942(x)
+ else
+ fun_l22_n804(x)
+ end
+end
+
+def fun_l21_n985(x)
+ if (x < 1)
+ fun_l22_n116(x)
+ else
+ fun_l22_n117(x)
+ end
+end
+
+def fun_l21_n986(x)
+ if (x < 1)
+ fun_l22_n610(x)
+ else
+ fun_l22_n580(x)
+ end
+end
+
+def fun_l21_n987(x)
+ if (x < 1)
+ fun_l22_n299(x)
+ else
+ fun_l22_n416(x)
+ end
+end
+
+def fun_l21_n988(x)
+ if (x < 1)
+ fun_l22_n507(x)
+ else
+ fun_l22_n995(x)
+ end
+end
+
+def fun_l21_n989(x)
+ if (x < 1)
+ fun_l22_n239(x)
+ else
+ fun_l22_n414(x)
+ end
+end
+
+def fun_l21_n990(x)
+ if (x < 1)
+ fun_l22_n488(x)
+ else
+ fun_l22_n874(x)
+ end
+end
+
+def fun_l21_n991(x)
+ if (x < 1)
+ fun_l22_n586(x)
+ else
+ fun_l22_n88(x)
+ end
+end
+
+def fun_l21_n992(x)
+ if (x < 1)
+ fun_l22_n391(x)
+ else
+ fun_l22_n254(x)
+ end
+end
+
+def fun_l21_n993(x)
+ if (x < 1)
+ fun_l22_n64(x)
+ else
+ fun_l22_n485(x)
+ end
+end
+
+def fun_l21_n994(x)
+ if (x < 1)
+ fun_l22_n507(x)
+ else
+ fun_l22_n266(x)
+ end
+end
+
+def fun_l21_n995(x)
+ if (x < 1)
+ fun_l22_n660(x)
+ else
+ fun_l22_n208(x)
+ end
+end
+
+def fun_l21_n996(x)
+ if (x < 1)
+ fun_l22_n731(x)
+ else
+ fun_l22_n882(x)
+ end
+end
+
+def fun_l21_n997(x)
+ if (x < 1)
+ fun_l22_n283(x)
+ else
+ fun_l22_n719(x)
+ end
+end
+
+def fun_l21_n998(x)
+ if (x < 1)
+ fun_l22_n794(x)
+ else
+ fun_l22_n654(x)
+ end
+end
+
+def fun_l21_n999(x)
+ if (x < 1)
+ fun_l22_n642(x)
+ else
+ fun_l22_n158(x)
+ end
+end
+
+def fun_l22_n0(x)
+ if (x < 1)
+ fun_l23_n423(x)
+ else
+ fun_l23_n28(x)
+ end
+end
+
+def fun_l22_n1(x)
+ if (x < 1)
+ fun_l23_n494(x)
+ else
+ fun_l23_n894(x)
+ end
+end
+
+def fun_l22_n2(x)
+ if (x < 1)
+ fun_l23_n735(x)
+ else
+ fun_l23_n584(x)
+ end
+end
+
+def fun_l22_n3(x)
+ if (x < 1)
+ fun_l23_n982(x)
+ else
+ fun_l23_n790(x)
+ end
+end
+
+def fun_l22_n4(x)
+ if (x < 1)
+ fun_l23_n281(x)
+ else
+ fun_l23_n256(x)
+ end
+end
+
+def fun_l22_n5(x)
+ if (x < 1)
+ fun_l23_n286(x)
+ else
+ fun_l23_n48(x)
+ end
+end
+
+def fun_l22_n6(x)
+ if (x < 1)
+ fun_l23_n982(x)
+ else
+ fun_l23_n731(x)
+ end
+end
+
+def fun_l22_n7(x)
+ if (x < 1)
+ fun_l23_n83(x)
+ else
+ fun_l23_n267(x)
+ end
+end
+
+def fun_l22_n8(x)
+ if (x < 1)
+ fun_l23_n730(x)
+ else
+ fun_l23_n47(x)
+ end
+end
+
+def fun_l22_n9(x)
+ if (x < 1)
+ fun_l23_n106(x)
+ else
+ fun_l23_n125(x)
+ end
+end
+
+def fun_l22_n10(x)
+ if (x < 1)
+ fun_l23_n392(x)
+ else
+ fun_l23_n114(x)
+ end
+end
+
+def fun_l22_n11(x)
+ if (x < 1)
+ fun_l23_n778(x)
+ else
+ fun_l23_n103(x)
+ end
+end
+
+def fun_l22_n12(x)
+ if (x < 1)
+ fun_l23_n145(x)
+ else
+ fun_l23_n449(x)
+ end
+end
+
+def fun_l22_n13(x)
+ if (x < 1)
+ fun_l23_n106(x)
+ else
+ fun_l23_n67(x)
+ end
+end
+
+def fun_l22_n14(x)
+ if (x < 1)
+ fun_l23_n721(x)
+ else
+ fun_l23_n844(x)
+ end
+end
+
+def fun_l22_n15(x)
+ if (x < 1)
+ fun_l23_n411(x)
+ else
+ fun_l23_n479(x)
+ end
+end
+
+def fun_l22_n16(x)
+ if (x < 1)
+ fun_l23_n718(x)
+ else
+ fun_l23_n203(x)
+ end
+end
+
+def fun_l22_n17(x)
+ if (x < 1)
+ fun_l23_n660(x)
+ else
+ fun_l23_n606(x)
+ end
+end
+
+def fun_l22_n18(x)
+ if (x < 1)
+ fun_l23_n225(x)
+ else
+ fun_l23_n310(x)
+ end
+end
+
+def fun_l22_n19(x)
+ if (x < 1)
+ fun_l23_n923(x)
+ else
+ fun_l23_n10(x)
+ end
+end
+
+def fun_l22_n20(x)
+ if (x < 1)
+ fun_l23_n88(x)
+ else
+ fun_l23_n488(x)
+ end
+end
+
+def fun_l22_n21(x)
+ if (x < 1)
+ fun_l23_n986(x)
+ else
+ fun_l23_n123(x)
+ end
+end
+
+def fun_l22_n22(x)
+ if (x < 1)
+ fun_l23_n91(x)
+ else
+ fun_l23_n445(x)
+ end
+end
+
+def fun_l22_n23(x)
+ if (x < 1)
+ fun_l23_n525(x)
+ else
+ fun_l23_n454(x)
+ end
+end
+
+def fun_l22_n24(x)
+ if (x < 1)
+ fun_l23_n55(x)
+ else
+ fun_l23_n540(x)
+ end
+end
+
+def fun_l22_n25(x)
+ if (x < 1)
+ fun_l23_n562(x)
+ else
+ fun_l23_n323(x)
+ end
+end
+
+def fun_l22_n26(x)
+ if (x < 1)
+ fun_l23_n796(x)
+ else
+ fun_l23_n443(x)
+ end
+end
+
+def fun_l22_n27(x)
+ if (x < 1)
+ fun_l23_n421(x)
+ else
+ fun_l23_n654(x)
+ end
+end
+
+def fun_l22_n28(x)
+ if (x < 1)
+ fun_l23_n910(x)
+ else
+ fun_l23_n421(x)
+ end
+end
+
+def fun_l22_n29(x)
+ if (x < 1)
+ fun_l23_n184(x)
+ else
+ fun_l23_n24(x)
+ end
+end
+
+def fun_l22_n30(x)
+ if (x < 1)
+ fun_l23_n803(x)
+ else
+ fun_l23_n375(x)
+ end
+end
+
+def fun_l22_n31(x)
+ if (x < 1)
+ fun_l23_n662(x)
+ else
+ fun_l23_n50(x)
+ end
+end
+
+def fun_l22_n32(x)
+ if (x < 1)
+ fun_l23_n69(x)
+ else
+ fun_l23_n198(x)
+ end
+end
+
+def fun_l22_n33(x)
+ if (x < 1)
+ fun_l23_n465(x)
+ else
+ fun_l23_n979(x)
+ end
+end
+
+def fun_l22_n34(x)
+ if (x < 1)
+ fun_l23_n743(x)
+ else
+ fun_l23_n859(x)
+ end
+end
+
+def fun_l22_n35(x)
+ if (x < 1)
+ fun_l23_n524(x)
+ else
+ fun_l23_n157(x)
+ end
+end
+
+def fun_l22_n36(x)
+ if (x < 1)
+ fun_l23_n530(x)
+ else
+ fun_l23_n938(x)
+ end
+end
+
+def fun_l22_n37(x)
+ if (x < 1)
+ fun_l23_n386(x)
+ else
+ fun_l23_n882(x)
+ end
+end
+
+def fun_l22_n38(x)
+ if (x < 1)
+ fun_l23_n373(x)
+ else
+ fun_l23_n220(x)
+ end
+end
+
+def fun_l22_n39(x)
+ if (x < 1)
+ fun_l23_n783(x)
+ else
+ fun_l23_n731(x)
+ end
+end
+
+def fun_l22_n40(x)
+ if (x < 1)
+ fun_l23_n911(x)
+ else
+ fun_l23_n373(x)
+ end
+end
+
+def fun_l22_n41(x)
+ if (x < 1)
+ fun_l23_n516(x)
+ else
+ fun_l23_n586(x)
+ end
+end
+
+def fun_l22_n42(x)
+ if (x < 1)
+ fun_l23_n40(x)
+ else
+ fun_l23_n350(x)
+ end
+end
+
+def fun_l22_n43(x)
+ if (x < 1)
+ fun_l23_n690(x)
+ else
+ fun_l23_n349(x)
+ end
+end
+
+def fun_l22_n44(x)
+ if (x < 1)
+ fun_l23_n170(x)
+ else
+ fun_l23_n758(x)
+ end
+end
+
+def fun_l22_n45(x)
+ if (x < 1)
+ fun_l23_n317(x)
+ else
+ fun_l23_n856(x)
+ end
+end
+
+def fun_l22_n46(x)
+ if (x < 1)
+ fun_l23_n692(x)
+ else
+ fun_l23_n330(x)
+ end
+end
+
+def fun_l22_n47(x)
+ if (x < 1)
+ fun_l23_n848(x)
+ else
+ fun_l23_n767(x)
+ end
+end
+
+def fun_l22_n48(x)
+ if (x < 1)
+ fun_l23_n683(x)
+ else
+ fun_l23_n225(x)
+ end
+end
+
+def fun_l22_n49(x)
+ if (x < 1)
+ fun_l23_n967(x)
+ else
+ fun_l23_n872(x)
+ end
+end
+
+def fun_l22_n50(x)
+ if (x < 1)
+ fun_l23_n584(x)
+ else
+ fun_l23_n799(x)
+ end
+end
+
+def fun_l22_n51(x)
+ if (x < 1)
+ fun_l23_n156(x)
+ else
+ fun_l23_n710(x)
+ end
+end
+
+def fun_l22_n52(x)
+ if (x < 1)
+ fun_l23_n129(x)
+ else
+ fun_l23_n733(x)
+ end
+end
+
+def fun_l22_n53(x)
+ if (x < 1)
+ fun_l23_n364(x)
+ else
+ fun_l23_n460(x)
+ end
+end
+
+def fun_l22_n54(x)
+ if (x < 1)
+ fun_l23_n284(x)
+ else
+ fun_l23_n13(x)
+ end
+end
+
+def fun_l22_n55(x)
+ if (x < 1)
+ fun_l23_n734(x)
+ else
+ fun_l23_n498(x)
+ end
+end
+
+def fun_l22_n56(x)
+ if (x < 1)
+ fun_l23_n981(x)
+ else
+ fun_l23_n602(x)
+ end
+end
+
+def fun_l22_n57(x)
+ if (x < 1)
+ fun_l23_n632(x)
+ else
+ fun_l23_n123(x)
+ end
+end
+
+def fun_l22_n58(x)
+ if (x < 1)
+ fun_l23_n602(x)
+ else
+ fun_l23_n274(x)
+ end
+end
+
+def fun_l22_n59(x)
+ if (x < 1)
+ fun_l23_n718(x)
+ else
+ fun_l23_n351(x)
+ end
+end
+
+def fun_l22_n60(x)
+ if (x < 1)
+ fun_l23_n618(x)
+ else
+ fun_l23_n583(x)
+ end
+end
+
+def fun_l22_n61(x)
+ if (x < 1)
+ fun_l23_n63(x)
+ else
+ fun_l23_n573(x)
+ end
+end
+
+def fun_l22_n62(x)
+ if (x < 1)
+ fun_l23_n73(x)
+ else
+ fun_l23_n429(x)
+ end
+end
+
+def fun_l22_n63(x)
+ if (x < 1)
+ fun_l23_n969(x)
+ else
+ fun_l23_n518(x)
+ end
+end
+
+def fun_l22_n64(x)
+ if (x < 1)
+ fun_l23_n493(x)
+ else
+ fun_l23_n868(x)
+ end
+end
+
+def fun_l22_n65(x)
+ if (x < 1)
+ fun_l23_n31(x)
+ else
+ fun_l23_n366(x)
+ end
+end
+
+def fun_l22_n66(x)
+ if (x < 1)
+ fun_l23_n442(x)
+ else
+ fun_l23_n362(x)
+ end
+end
+
+def fun_l22_n67(x)
+ if (x < 1)
+ fun_l23_n804(x)
+ else
+ fun_l23_n513(x)
+ end
+end
+
+def fun_l22_n68(x)
+ if (x < 1)
+ fun_l23_n973(x)
+ else
+ fun_l23_n723(x)
+ end
+end
+
+def fun_l22_n69(x)
+ if (x < 1)
+ fun_l23_n424(x)
+ else
+ fun_l23_n247(x)
+ end
+end
+
+def fun_l22_n70(x)
+ if (x < 1)
+ fun_l23_n992(x)
+ else
+ fun_l23_n944(x)
+ end
+end
+
+def fun_l22_n71(x)
+ if (x < 1)
+ fun_l23_n209(x)
+ else
+ fun_l23_n645(x)
+ end
+end
+
+def fun_l22_n72(x)
+ if (x < 1)
+ fun_l23_n373(x)
+ else
+ fun_l23_n540(x)
+ end
+end
+
+def fun_l22_n73(x)
+ if (x < 1)
+ fun_l23_n785(x)
+ else
+ fun_l23_n840(x)
+ end
+end
+
+def fun_l22_n74(x)
+ if (x < 1)
+ fun_l23_n607(x)
+ else
+ fun_l23_n584(x)
+ end
+end
+
+def fun_l22_n75(x)
+ if (x < 1)
+ fun_l23_n331(x)
+ else
+ fun_l23_n196(x)
+ end
+end
+
+def fun_l22_n76(x)
+ if (x < 1)
+ fun_l23_n453(x)
+ else
+ fun_l23_n991(x)
+ end
+end
+
+def fun_l22_n77(x)
+ if (x < 1)
+ fun_l23_n689(x)
+ else
+ fun_l23_n222(x)
+ end
+end
+
+def fun_l22_n78(x)
+ if (x < 1)
+ fun_l23_n446(x)
+ else
+ fun_l23_n767(x)
+ end
+end
+
+def fun_l22_n79(x)
+ if (x < 1)
+ fun_l23_n648(x)
+ else
+ fun_l23_n811(x)
+ end
+end
+
+def fun_l22_n80(x)
+ if (x < 1)
+ fun_l23_n210(x)
+ else
+ fun_l23_n52(x)
+ end
+end
+
+def fun_l22_n81(x)
+ if (x < 1)
+ fun_l23_n786(x)
+ else
+ fun_l23_n984(x)
+ end
+end
+
+def fun_l22_n82(x)
+ if (x < 1)
+ fun_l23_n693(x)
+ else
+ fun_l23_n103(x)
+ end
+end
+
+def fun_l22_n83(x)
+ if (x < 1)
+ fun_l23_n768(x)
+ else
+ fun_l23_n794(x)
+ end
+end
+
+def fun_l22_n84(x)
+ if (x < 1)
+ fun_l23_n820(x)
+ else
+ fun_l23_n774(x)
+ end
+end
+
+def fun_l22_n85(x)
+ if (x < 1)
+ fun_l23_n972(x)
+ else
+ fun_l23_n254(x)
+ end
+end
+
+def fun_l22_n86(x)
+ if (x < 1)
+ fun_l23_n609(x)
+ else
+ fun_l23_n524(x)
+ end
+end
+
+def fun_l22_n87(x)
+ if (x < 1)
+ fun_l23_n486(x)
+ else
+ fun_l23_n173(x)
+ end
+end
+
+def fun_l22_n88(x)
+ if (x < 1)
+ fun_l23_n236(x)
+ else
+ fun_l23_n359(x)
+ end
+end
+
+def fun_l22_n89(x)
+ if (x < 1)
+ fun_l23_n292(x)
+ else
+ fun_l23_n232(x)
+ end
+end
+
+def fun_l22_n90(x)
+ if (x < 1)
+ fun_l23_n104(x)
+ else
+ fun_l23_n799(x)
+ end
+end
+
+def fun_l22_n91(x)
+ if (x < 1)
+ fun_l23_n957(x)
+ else
+ fun_l23_n836(x)
+ end
+end
+
+def fun_l22_n92(x)
+ if (x < 1)
+ fun_l23_n179(x)
+ else
+ fun_l23_n416(x)
+ end
+end
+
+def fun_l22_n93(x)
+ if (x < 1)
+ fun_l23_n281(x)
+ else
+ fun_l23_n530(x)
+ end
+end
+
+def fun_l22_n94(x)
+ if (x < 1)
+ fun_l23_n627(x)
+ else
+ fun_l23_n577(x)
+ end
+end
+
+def fun_l22_n95(x)
+ if (x < 1)
+ fun_l23_n594(x)
+ else
+ fun_l23_n949(x)
+ end
+end
+
+def fun_l22_n96(x)
+ if (x < 1)
+ fun_l23_n408(x)
+ else
+ fun_l23_n547(x)
+ end
+end
+
+def fun_l22_n97(x)
+ if (x < 1)
+ fun_l23_n276(x)
+ else
+ fun_l23_n105(x)
+ end
+end
+
+def fun_l22_n98(x)
+ if (x < 1)
+ fun_l23_n181(x)
+ else
+ fun_l23_n659(x)
+ end
+end
+
+def fun_l22_n99(x)
+ if (x < 1)
+ fun_l23_n7(x)
+ else
+ fun_l23_n423(x)
+ end
+end
+
+def fun_l22_n100(x)
+ if (x < 1)
+ fun_l23_n123(x)
+ else
+ fun_l23_n244(x)
+ end
+end
+
+def fun_l22_n101(x)
+ if (x < 1)
+ fun_l23_n476(x)
+ else
+ fun_l23_n319(x)
+ end
+end
+
+def fun_l22_n102(x)
+ if (x < 1)
+ fun_l23_n443(x)
+ else
+ fun_l23_n959(x)
+ end
+end
+
+def fun_l22_n103(x)
+ if (x < 1)
+ fun_l23_n78(x)
+ else
+ fun_l23_n490(x)
+ end
+end
+
+def fun_l22_n104(x)
+ if (x < 1)
+ fun_l23_n761(x)
+ else
+ fun_l23_n23(x)
+ end
+end
+
+def fun_l22_n105(x)
+ if (x < 1)
+ fun_l23_n126(x)
+ else
+ fun_l23_n426(x)
+ end
+end
+
+def fun_l22_n106(x)
+ if (x < 1)
+ fun_l23_n740(x)
+ else
+ fun_l23_n328(x)
+ end
+end
+
+def fun_l22_n107(x)
+ if (x < 1)
+ fun_l23_n249(x)
+ else
+ fun_l23_n890(x)
+ end
+end
+
+def fun_l22_n108(x)
+ if (x < 1)
+ fun_l23_n665(x)
+ else
+ fun_l23_n60(x)
+ end
+end
+
+def fun_l22_n109(x)
+ if (x < 1)
+ fun_l23_n617(x)
+ else
+ fun_l23_n42(x)
+ end
+end
+
+def fun_l22_n110(x)
+ if (x < 1)
+ fun_l23_n484(x)
+ else
+ fun_l23_n480(x)
+ end
+end
+
+def fun_l22_n111(x)
+ if (x < 1)
+ fun_l23_n135(x)
+ else
+ fun_l23_n447(x)
+ end
+end
+
+def fun_l22_n112(x)
+ if (x < 1)
+ fun_l23_n881(x)
+ else
+ fun_l23_n410(x)
+ end
+end
+
+def fun_l22_n113(x)
+ if (x < 1)
+ fun_l23_n989(x)
+ else
+ fun_l23_n849(x)
+ end
+end
+
+def fun_l22_n114(x)
+ if (x < 1)
+ fun_l23_n660(x)
+ else
+ fun_l23_n307(x)
+ end
+end
+
+def fun_l22_n115(x)
+ if (x < 1)
+ fun_l23_n372(x)
+ else
+ fun_l23_n150(x)
+ end
+end
+
+def fun_l22_n116(x)
+ if (x < 1)
+ fun_l23_n770(x)
+ else
+ fun_l23_n109(x)
+ end
+end
+
+def fun_l22_n117(x)
+ if (x < 1)
+ fun_l23_n364(x)
+ else
+ fun_l23_n321(x)
+ end
+end
+
+def fun_l22_n118(x)
+ if (x < 1)
+ fun_l23_n363(x)
+ else
+ fun_l23_n876(x)
+ end
+end
+
+def fun_l22_n119(x)
+ if (x < 1)
+ fun_l23_n114(x)
+ else
+ fun_l23_n25(x)
+ end
+end
+
+def fun_l22_n120(x)
+ if (x < 1)
+ fun_l23_n160(x)
+ else
+ fun_l23_n744(x)
+ end
+end
+
+def fun_l22_n121(x)
+ if (x < 1)
+ fun_l23_n265(x)
+ else
+ fun_l23_n972(x)
+ end
+end
+
+def fun_l22_n122(x)
+ if (x < 1)
+ fun_l23_n259(x)
+ else
+ fun_l23_n203(x)
+ end
+end
+
+def fun_l22_n123(x)
+ if (x < 1)
+ fun_l23_n865(x)
+ else
+ fun_l23_n137(x)
+ end
+end
+
+def fun_l22_n124(x)
+ if (x < 1)
+ fun_l23_n427(x)
+ else
+ fun_l23_n437(x)
+ end
+end
+
+def fun_l22_n125(x)
+ if (x < 1)
+ fun_l23_n405(x)
+ else
+ fun_l23_n603(x)
+ end
+end
+
+def fun_l22_n126(x)
+ if (x < 1)
+ fun_l23_n938(x)
+ else
+ fun_l23_n505(x)
+ end
+end
+
+def fun_l22_n127(x)
+ if (x < 1)
+ fun_l23_n307(x)
+ else
+ fun_l23_n26(x)
+ end
+end
+
+def fun_l22_n128(x)
+ if (x < 1)
+ fun_l23_n15(x)
+ else
+ fun_l23_n406(x)
+ end
+end
+
+def fun_l22_n129(x)
+ if (x < 1)
+ fun_l23_n633(x)
+ else
+ fun_l23_n831(x)
+ end
+end
+
+def fun_l22_n130(x)
+ if (x < 1)
+ fun_l23_n805(x)
+ else
+ fun_l23_n216(x)
+ end
+end
+
+def fun_l22_n131(x)
+ if (x < 1)
+ fun_l23_n552(x)
+ else
+ fun_l23_n864(x)
+ end
+end
+
+def fun_l22_n132(x)
+ if (x < 1)
+ fun_l23_n50(x)
+ else
+ fun_l23_n805(x)
+ end
+end
+
+def fun_l22_n133(x)
+ if (x < 1)
+ fun_l23_n823(x)
+ else
+ fun_l23_n427(x)
+ end
+end
+
+def fun_l22_n134(x)
+ if (x < 1)
+ fun_l23_n964(x)
+ else
+ fun_l23_n214(x)
+ end
+end
+
+def fun_l22_n135(x)
+ if (x < 1)
+ fun_l23_n267(x)
+ else
+ fun_l23_n351(x)
+ end
+end
+
+def fun_l22_n136(x)
+ if (x < 1)
+ fun_l23_n557(x)
+ else
+ fun_l23_n257(x)
+ end
+end
+
+def fun_l22_n137(x)
+ if (x < 1)
+ fun_l23_n966(x)
+ else
+ fun_l23_n248(x)
+ end
+end
+
+def fun_l22_n138(x)
+ if (x < 1)
+ fun_l23_n569(x)
+ else
+ fun_l23_n376(x)
+ end
+end
+
+def fun_l22_n139(x)
+ if (x < 1)
+ fun_l23_n198(x)
+ else
+ fun_l23_n595(x)
+ end
+end
+
+def fun_l22_n140(x)
+ if (x < 1)
+ fun_l23_n107(x)
+ else
+ fun_l23_n134(x)
+ end
+end
+
+def fun_l22_n141(x)
+ if (x < 1)
+ fun_l23_n113(x)
+ else
+ fun_l23_n290(x)
+ end
+end
+
+def fun_l22_n142(x)
+ if (x < 1)
+ fun_l23_n721(x)
+ else
+ fun_l23_n641(x)
+ end
+end
+
+def fun_l22_n143(x)
+ if (x < 1)
+ fun_l23_n535(x)
+ else
+ fun_l23_n103(x)
+ end
+end
+
+def fun_l22_n144(x)
+ if (x < 1)
+ fun_l23_n690(x)
+ else
+ fun_l23_n125(x)
+ end
+end
+
+def fun_l22_n145(x)
+ if (x < 1)
+ fun_l23_n514(x)
+ else
+ fun_l23_n999(x)
+ end
+end
+
+def fun_l22_n146(x)
+ if (x < 1)
+ fun_l23_n503(x)
+ else
+ fun_l23_n951(x)
+ end
+end
+
+def fun_l22_n147(x)
+ if (x < 1)
+ fun_l23_n413(x)
+ else
+ fun_l23_n634(x)
+ end
+end
+
+def fun_l22_n148(x)
+ if (x < 1)
+ fun_l23_n818(x)
+ else
+ fun_l23_n286(x)
+ end
+end
+
+def fun_l22_n149(x)
+ if (x < 1)
+ fun_l23_n768(x)
+ else
+ fun_l23_n832(x)
+ end
+end
+
+def fun_l22_n150(x)
+ if (x < 1)
+ fun_l23_n128(x)
+ else
+ fun_l23_n588(x)
+ end
+end
+
+def fun_l22_n151(x)
+ if (x < 1)
+ fun_l23_n787(x)
+ else
+ fun_l23_n742(x)
+ end
+end
+
+def fun_l22_n152(x)
+ if (x < 1)
+ fun_l23_n166(x)
+ else
+ fun_l23_n856(x)
+ end
+end
+
+def fun_l22_n153(x)
+ if (x < 1)
+ fun_l23_n377(x)
+ else
+ fun_l23_n90(x)
+ end
+end
+
+def fun_l22_n154(x)
+ if (x < 1)
+ fun_l23_n851(x)
+ else
+ fun_l23_n591(x)
+ end
+end
+
+def fun_l22_n155(x)
+ if (x < 1)
+ fun_l23_n896(x)
+ else
+ fun_l23_n372(x)
+ end
+end
+
+def fun_l22_n156(x)
+ if (x < 1)
+ fun_l23_n132(x)
+ else
+ fun_l23_n144(x)
+ end
+end
+
+def fun_l22_n157(x)
+ if (x < 1)
+ fun_l23_n251(x)
+ else
+ fun_l23_n620(x)
+ end
+end
+
+def fun_l22_n158(x)
+ if (x < 1)
+ fun_l23_n612(x)
+ else
+ fun_l23_n246(x)
+ end
+end
+
+def fun_l22_n159(x)
+ if (x < 1)
+ fun_l23_n530(x)
+ else
+ fun_l23_n94(x)
+ end
+end
+
+def fun_l22_n160(x)
+ if (x < 1)
+ fun_l23_n310(x)
+ else
+ fun_l23_n706(x)
+ end
+end
+
+def fun_l22_n161(x)
+ if (x < 1)
+ fun_l23_n420(x)
+ else
+ fun_l23_n576(x)
+ end
+end
+
+def fun_l22_n162(x)
+ if (x < 1)
+ fun_l23_n544(x)
+ else
+ fun_l23_n277(x)
+ end
+end
+
+def fun_l22_n163(x)
+ if (x < 1)
+ fun_l23_n770(x)
+ else
+ fun_l23_n94(x)
+ end
+end
+
+def fun_l22_n164(x)
+ if (x < 1)
+ fun_l23_n49(x)
+ else
+ fun_l23_n576(x)
+ end
+end
+
+def fun_l22_n165(x)
+ if (x < 1)
+ fun_l23_n610(x)
+ else
+ fun_l23_n184(x)
+ end
+end
+
+def fun_l22_n166(x)
+ if (x < 1)
+ fun_l23_n974(x)
+ else
+ fun_l23_n54(x)
+ end
+end
+
+def fun_l22_n167(x)
+ if (x < 1)
+ fun_l23_n179(x)
+ else
+ fun_l23_n485(x)
+ end
+end
+
+def fun_l22_n168(x)
+ if (x < 1)
+ fun_l23_n114(x)
+ else
+ fun_l23_n766(x)
+ end
+end
+
+def fun_l22_n169(x)
+ if (x < 1)
+ fun_l23_n399(x)
+ else
+ fun_l23_n830(x)
+ end
+end
+
+def fun_l22_n170(x)
+ if (x < 1)
+ fun_l23_n332(x)
+ else
+ fun_l23_n536(x)
+ end
+end
+
+def fun_l22_n171(x)
+ if (x < 1)
+ fun_l23_n384(x)
+ else
+ fun_l23_n773(x)
+ end
+end
+
+def fun_l22_n172(x)
+ if (x < 1)
+ fun_l23_n52(x)
+ else
+ fun_l23_n7(x)
+ end
+end
+
+def fun_l22_n173(x)
+ if (x < 1)
+ fun_l23_n85(x)
+ else
+ fun_l23_n803(x)
+ end
+end
+
+def fun_l22_n174(x)
+ if (x < 1)
+ fun_l23_n853(x)
+ else
+ fun_l23_n682(x)
+ end
+end
+
+def fun_l22_n175(x)
+ if (x < 1)
+ fun_l23_n112(x)
+ else
+ fun_l23_n295(x)
+ end
+end
+
+def fun_l22_n176(x)
+ if (x < 1)
+ fun_l23_n347(x)
+ else
+ fun_l23_n908(x)
+ end
+end
+
+def fun_l22_n177(x)
+ if (x < 1)
+ fun_l23_n267(x)
+ else
+ fun_l23_n19(x)
+ end
+end
+
+def fun_l22_n178(x)
+ if (x < 1)
+ fun_l23_n8(x)
+ else
+ fun_l23_n739(x)
+ end
+end
+
+def fun_l22_n179(x)
+ if (x < 1)
+ fun_l23_n201(x)
+ else
+ fun_l23_n321(x)
+ end
+end
+
+def fun_l22_n180(x)
+ if (x < 1)
+ fun_l23_n773(x)
+ else
+ fun_l23_n224(x)
+ end
+end
+
+def fun_l22_n181(x)
+ if (x < 1)
+ fun_l23_n966(x)
+ else
+ fun_l23_n324(x)
+ end
+end
+
+def fun_l22_n182(x)
+ if (x < 1)
+ fun_l23_n389(x)
+ else
+ fun_l23_n190(x)
+ end
+end
+
+def fun_l22_n183(x)
+ if (x < 1)
+ fun_l23_n918(x)
+ else
+ fun_l23_n512(x)
+ end
+end
+
+def fun_l22_n184(x)
+ if (x < 1)
+ fun_l23_n360(x)
+ else
+ fun_l23_n702(x)
+ end
+end
+
+def fun_l22_n185(x)
+ if (x < 1)
+ fun_l23_n794(x)
+ else
+ fun_l23_n51(x)
+ end
+end
+
+def fun_l22_n186(x)
+ if (x < 1)
+ fun_l23_n982(x)
+ else
+ fun_l23_n779(x)
+ end
+end
+
+def fun_l22_n187(x)
+ if (x < 1)
+ fun_l23_n263(x)
+ else
+ fun_l23_n659(x)
+ end
+end
+
+def fun_l22_n188(x)
+ if (x < 1)
+ fun_l23_n203(x)
+ else
+ fun_l23_n705(x)
+ end
+end
+
+def fun_l22_n189(x)
+ if (x < 1)
+ fun_l23_n976(x)
+ else
+ fun_l23_n307(x)
+ end
+end
+
+def fun_l22_n190(x)
+ if (x < 1)
+ fun_l23_n281(x)
+ else
+ fun_l23_n880(x)
+ end
+end
+
+def fun_l22_n191(x)
+ if (x < 1)
+ fun_l23_n238(x)
+ else
+ fun_l23_n752(x)
+ end
+end
+
+def fun_l22_n192(x)
+ if (x < 1)
+ fun_l23_n679(x)
+ else
+ fun_l23_n935(x)
+ end
+end
+
+def fun_l22_n193(x)
+ if (x < 1)
+ fun_l23_n823(x)
+ else
+ fun_l23_n340(x)
+ end
+end
+
+def fun_l22_n194(x)
+ if (x < 1)
+ fun_l23_n687(x)
+ else
+ fun_l23_n71(x)
+ end
+end
+
+def fun_l22_n195(x)
+ if (x < 1)
+ fun_l23_n47(x)
+ else
+ fun_l23_n119(x)
+ end
+end
+
+def fun_l22_n196(x)
+ if (x < 1)
+ fun_l23_n702(x)
+ else
+ fun_l23_n213(x)
+ end
+end
+
+def fun_l22_n197(x)
+ if (x < 1)
+ fun_l23_n300(x)
+ else
+ fun_l23_n52(x)
+ end
+end
+
+def fun_l22_n198(x)
+ if (x < 1)
+ fun_l23_n85(x)
+ else
+ fun_l23_n845(x)
+ end
+end
+
+def fun_l22_n199(x)
+ if (x < 1)
+ fun_l23_n503(x)
+ else
+ fun_l23_n322(x)
+ end
+end
+
+def fun_l22_n200(x)
+ if (x < 1)
+ fun_l23_n151(x)
+ else
+ fun_l23_n743(x)
+ end
+end
+
+def fun_l22_n201(x)
+ if (x < 1)
+ fun_l23_n531(x)
+ else
+ fun_l23_n597(x)
+ end
+end
+
+def fun_l22_n202(x)
+ if (x < 1)
+ fun_l23_n120(x)
+ else
+ fun_l23_n300(x)
+ end
+end
+
+def fun_l22_n203(x)
+ if (x < 1)
+ fun_l23_n124(x)
+ else
+ fun_l23_n609(x)
+ end
+end
+
+def fun_l22_n204(x)
+ if (x < 1)
+ fun_l23_n945(x)
+ else
+ fun_l23_n498(x)
+ end
+end
+
+def fun_l22_n205(x)
+ if (x < 1)
+ fun_l23_n983(x)
+ else
+ fun_l23_n16(x)
+ end
+end
+
+def fun_l22_n206(x)
+ if (x < 1)
+ fun_l23_n271(x)
+ else
+ fun_l23_n612(x)
+ end
+end
+
+def fun_l22_n207(x)
+ if (x < 1)
+ fun_l23_n762(x)
+ else
+ fun_l23_n596(x)
+ end
+end
+
+def fun_l22_n208(x)
+ if (x < 1)
+ fun_l23_n992(x)
+ else
+ fun_l23_n90(x)
+ end
+end
+
+def fun_l22_n209(x)
+ if (x < 1)
+ fun_l23_n994(x)
+ else
+ fun_l23_n265(x)
+ end
+end
+
+def fun_l22_n210(x)
+ if (x < 1)
+ fun_l23_n449(x)
+ else
+ fun_l23_n609(x)
+ end
+end
+
+def fun_l22_n211(x)
+ if (x < 1)
+ fun_l23_n816(x)
+ else
+ fun_l23_n8(x)
+ end
+end
+
+def fun_l22_n212(x)
+ if (x < 1)
+ fun_l23_n526(x)
+ else
+ fun_l23_n982(x)
+ end
+end
+
+def fun_l22_n213(x)
+ if (x < 1)
+ fun_l23_n25(x)
+ else
+ fun_l23_n302(x)
+ end
+end
+
+def fun_l22_n214(x)
+ if (x < 1)
+ fun_l23_n868(x)
+ else
+ fun_l23_n895(x)
+ end
+end
+
+def fun_l22_n215(x)
+ if (x < 1)
+ fun_l23_n3(x)
+ else
+ fun_l23_n914(x)
+ end
+end
+
+def fun_l22_n216(x)
+ if (x < 1)
+ fun_l23_n106(x)
+ else
+ fun_l23_n271(x)
+ end
+end
+
+def fun_l22_n217(x)
+ if (x < 1)
+ fun_l23_n567(x)
+ else
+ fun_l23_n931(x)
+ end
+end
+
+def fun_l22_n218(x)
+ if (x < 1)
+ fun_l23_n7(x)
+ else
+ fun_l23_n319(x)
+ end
+end
+
+def fun_l22_n219(x)
+ if (x < 1)
+ fun_l23_n510(x)
+ else
+ fun_l23_n753(x)
+ end
+end
+
+def fun_l22_n220(x)
+ if (x < 1)
+ fun_l23_n529(x)
+ else
+ fun_l23_n514(x)
+ end
+end
+
+def fun_l22_n221(x)
+ if (x < 1)
+ fun_l23_n871(x)
+ else
+ fun_l23_n571(x)
+ end
+end
+
+def fun_l22_n222(x)
+ if (x < 1)
+ fun_l23_n739(x)
+ else
+ fun_l23_n716(x)
+ end
+end
+
+def fun_l22_n223(x)
+ if (x < 1)
+ fun_l23_n781(x)
+ else
+ fun_l23_n730(x)
+ end
+end
+
+def fun_l22_n224(x)
+ if (x < 1)
+ fun_l23_n647(x)
+ else
+ fun_l23_n647(x)
+ end
+end
+
+def fun_l22_n225(x)
+ if (x < 1)
+ fun_l23_n968(x)
+ else
+ fun_l23_n680(x)
+ end
+end
+
+def fun_l22_n226(x)
+ if (x < 1)
+ fun_l23_n400(x)
+ else
+ fun_l23_n725(x)
+ end
+end
+
+def fun_l22_n227(x)
+ if (x < 1)
+ fun_l23_n386(x)
+ else
+ fun_l23_n859(x)
+ end
+end
+
+def fun_l22_n228(x)
+ if (x < 1)
+ fun_l23_n751(x)
+ else
+ fun_l23_n640(x)
+ end
+end
+
+def fun_l22_n229(x)
+ if (x < 1)
+ fun_l23_n273(x)
+ else
+ fun_l23_n754(x)
+ end
+end
+
+def fun_l22_n230(x)
+ if (x < 1)
+ fun_l23_n861(x)
+ else
+ fun_l23_n783(x)
+ end
+end
+
+def fun_l22_n231(x)
+ if (x < 1)
+ fun_l23_n665(x)
+ else
+ fun_l23_n18(x)
+ end
+end
+
+def fun_l22_n232(x)
+ if (x < 1)
+ fun_l23_n680(x)
+ else
+ fun_l23_n471(x)
+ end
+end
+
+def fun_l22_n233(x)
+ if (x < 1)
+ fun_l23_n400(x)
+ else
+ fun_l23_n935(x)
+ end
+end
+
+def fun_l22_n234(x)
+ if (x < 1)
+ fun_l23_n563(x)
+ else
+ fun_l23_n799(x)
+ end
+end
+
+def fun_l22_n235(x)
+ if (x < 1)
+ fun_l23_n712(x)
+ else
+ fun_l23_n20(x)
+ end
+end
+
+def fun_l22_n236(x)
+ if (x < 1)
+ fun_l23_n579(x)
+ else
+ fun_l23_n152(x)
+ end
+end
+
+def fun_l22_n237(x)
+ if (x < 1)
+ fun_l23_n752(x)
+ else
+ fun_l23_n282(x)
+ end
+end
+
+def fun_l22_n238(x)
+ if (x < 1)
+ fun_l23_n609(x)
+ else
+ fun_l23_n980(x)
+ end
+end
+
+def fun_l22_n239(x)
+ if (x < 1)
+ fun_l23_n916(x)
+ else
+ fun_l23_n52(x)
+ end
+end
+
+def fun_l22_n240(x)
+ if (x < 1)
+ fun_l23_n468(x)
+ else
+ fun_l23_n735(x)
+ end
+end
+
+def fun_l22_n241(x)
+ if (x < 1)
+ fun_l23_n894(x)
+ else
+ fun_l23_n776(x)
+ end
+end
+
+def fun_l22_n242(x)
+ if (x < 1)
+ fun_l23_n782(x)
+ else
+ fun_l23_n406(x)
+ end
+end
+
+def fun_l22_n243(x)
+ if (x < 1)
+ fun_l23_n90(x)
+ else
+ fun_l23_n226(x)
+ end
+end
+
+def fun_l22_n244(x)
+ if (x < 1)
+ fun_l23_n967(x)
+ else
+ fun_l23_n252(x)
+ end
+end
+
+def fun_l22_n245(x)
+ if (x < 1)
+ fun_l23_n189(x)
+ else
+ fun_l23_n252(x)
+ end
+end
+
+def fun_l22_n246(x)
+ if (x < 1)
+ fun_l23_n919(x)
+ else
+ fun_l23_n581(x)
+ end
+end
+
+def fun_l22_n247(x)
+ if (x < 1)
+ fun_l23_n212(x)
+ else
+ fun_l23_n465(x)
+ end
+end
+
+def fun_l22_n248(x)
+ if (x < 1)
+ fun_l23_n880(x)
+ else
+ fun_l23_n823(x)
+ end
+end
+
+def fun_l22_n249(x)
+ if (x < 1)
+ fun_l23_n227(x)
+ else
+ fun_l23_n620(x)
+ end
+end
+
+def fun_l22_n250(x)
+ if (x < 1)
+ fun_l23_n875(x)
+ else
+ fun_l23_n707(x)
+ end
+end
+
+def fun_l22_n251(x)
+ if (x < 1)
+ fun_l23_n623(x)
+ else
+ fun_l23_n132(x)
+ end
+end
+
+def fun_l22_n252(x)
+ if (x < 1)
+ fun_l23_n739(x)
+ else
+ fun_l23_n417(x)
+ end
+end
+
+def fun_l22_n253(x)
+ if (x < 1)
+ fun_l23_n977(x)
+ else
+ fun_l23_n216(x)
+ end
+end
+
+def fun_l22_n254(x)
+ if (x < 1)
+ fun_l23_n725(x)
+ else
+ fun_l23_n168(x)
+ end
+end
+
+def fun_l22_n255(x)
+ if (x < 1)
+ fun_l23_n878(x)
+ else
+ fun_l23_n699(x)
+ end
+end
+
+def fun_l22_n256(x)
+ if (x < 1)
+ fun_l23_n423(x)
+ else
+ fun_l23_n626(x)
+ end
+end
+
+def fun_l22_n257(x)
+ if (x < 1)
+ fun_l23_n29(x)
+ else
+ fun_l23_n248(x)
+ end
+end
+
+def fun_l22_n258(x)
+ if (x < 1)
+ fun_l23_n78(x)
+ else
+ fun_l23_n925(x)
+ end
+end
+
+def fun_l22_n259(x)
+ if (x < 1)
+ fun_l23_n798(x)
+ else
+ fun_l23_n220(x)
+ end
+end
+
+def fun_l22_n260(x)
+ if (x < 1)
+ fun_l23_n621(x)
+ else
+ fun_l23_n936(x)
+ end
+end
+
+def fun_l22_n261(x)
+ if (x < 1)
+ fun_l23_n894(x)
+ else
+ fun_l23_n463(x)
+ end
+end
+
+def fun_l22_n262(x)
+ if (x < 1)
+ fun_l23_n336(x)
+ else
+ fun_l23_n535(x)
+ end
+end
+
+def fun_l22_n263(x)
+ if (x < 1)
+ fun_l23_n246(x)
+ else
+ fun_l23_n676(x)
+ end
+end
+
+def fun_l22_n264(x)
+ if (x < 1)
+ fun_l23_n986(x)
+ else
+ fun_l23_n675(x)
+ end
+end
+
+def fun_l22_n265(x)
+ if (x < 1)
+ fun_l23_n92(x)
+ else
+ fun_l23_n380(x)
+ end
+end
+
+def fun_l22_n266(x)
+ if (x < 1)
+ fun_l23_n945(x)
+ else
+ fun_l23_n842(x)
+ end
+end
+
+def fun_l22_n267(x)
+ if (x < 1)
+ fun_l23_n351(x)
+ else
+ fun_l23_n261(x)
+ end
+end
+
+def fun_l22_n268(x)
+ if (x < 1)
+ fun_l23_n784(x)
+ else
+ fun_l23_n306(x)
+ end
+end
+
+def fun_l22_n269(x)
+ if (x < 1)
+ fun_l23_n940(x)
+ else
+ fun_l23_n129(x)
+ end
+end
+
+def fun_l22_n270(x)
+ if (x < 1)
+ fun_l23_n491(x)
+ else
+ fun_l23_n806(x)
+ end
+end
+
+def fun_l22_n271(x)
+ if (x < 1)
+ fun_l23_n68(x)
+ else
+ fun_l23_n91(x)
+ end
+end
+
+def fun_l22_n272(x)
+ if (x < 1)
+ fun_l23_n965(x)
+ else
+ fun_l23_n665(x)
+ end
+end
+
+def fun_l22_n273(x)
+ if (x < 1)
+ fun_l23_n461(x)
+ else
+ fun_l23_n619(x)
+ end
+end
+
+def fun_l22_n274(x)
+ if (x < 1)
+ fun_l23_n635(x)
+ else
+ fun_l23_n755(x)
+ end
+end
+
+def fun_l22_n275(x)
+ if (x < 1)
+ fun_l23_n192(x)
+ else
+ fun_l23_n729(x)
+ end
+end
+
+def fun_l22_n276(x)
+ if (x < 1)
+ fun_l23_n94(x)
+ else
+ fun_l23_n832(x)
+ end
+end
+
+def fun_l22_n277(x)
+ if (x < 1)
+ fun_l23_n619(x)
+ else
+ fun_l23_n444(x)
+ end
+end
+
+def fun_l22_n278(x)
+ if (x < 1)
+ fun_l23_n682(x)
+ else
+ fun_l23_n579(x)
+ end
+end
+
+def fun_l22_n279(x)
+ if (x < 1)
+ fun_l23_n889(x)
+ else
+ fun_l23_n425(x)
+ end
+end
+
+def fun_l22_n280(x)
+ if (x < 1)
+ fun_l23_n101(x)
+ else
+ fun_l23_n215(x)
+ end
+end
+
+def fun_l22_n281(x)
+ if (x < 1)
+ fun_l23_n747(x)
+ else
+ fun_l23_n436(x)
+ end
+end
+
+def fun_l22_n282(x)
+ if (x < 1)
+ fun_l23_n519(x)
+ else
+ fun_l23_n438(x)
+ end
+end
+
+def fun_l22_n283(x)
+ if (x < 1)
+ fun_l23_n312(x)
+ else
+ fun_l23_n804(x)
+ end
+end
+
+def fun_l22_n284(x)
+ if (x < 1)
+ fun_l23_n150(x)
+ else
+ fun_l23_n71(x)
+ end
+end
+
+def fun_l22_n285(x)
+ if (x < 1)
+ fun_l23_n698(x)
+ else
+ fun_l23_n254(x)
+ end
+end
+
+def fun_l22_n286(x)
+ if (x < 1)
+ fun_l23_n97(x)
+ else
+ fun_l23_n782(x)
+ end
+end
+
+def fun_l22_n287(x)
+ if (x < 1)
+ fun_l23_n315(x)
+ else
+ fun_l23_n164(x)
+ end
+end
+
+def fun_l22_n288(x)
+ if (x < 1)
+ fun_l23_n704(x)
+ else
+ fun_l23_n927(x)
+ end
+end
+
+def fun_l22_n289(x)
+ if (x < 1)
+ fun_l23_n447(x)
+ else
+ fun_l23_n104(x)
+ end
+end
+
+def fun_l22_n290(x)
+ if (x < 1)
+ fun_l23_n533(x)
+ else
+ fun_l23_n687(x)
+ end
+end
+
+def fun_l22_n291(x)
+ if (x < 1)
+ fun_l23_n897(x)
+ else
+ fun_l23_n692(x)
+ end
+end
+
+def fun_l22_n292(x)
+ if (x < 1)
+ fun_l23_n515(x)
+ else
+ fun_l23_n258(x)
+ end
+end
+
+def fun_l22_n293(x)
+ if (x < 1)
+ fun_l23_n25(x)
+ else
+ fun_l23_n608(x)
+ end
+end
+
+def fun_l22_n294(x)
+ if (x < 1)
+ fun_l23_n313(x)
+ else
+ fun_l23_n675(x)
+ end
+end
+
+def fun_l22_n295(x)
+ if (x < 1)
+ fun_l23_n154(x)
+ else
+ fun_l23_n779(x)
+ end
+end
+
+def fun_l22_n296(x)
+ if (x < 1)
+ fun_l23_n731(x)
+ else
+ fun_l23_n310(x)
+ end
+end
+
+def fun_l22_n297(x)
+ if (x < 1)
+ fun_l23_n443(x)
+ else
+ fun_l23_n709(x)
+ end
+end
+
+def fun_l22_n298(x)
+ if (x < 1)
+ fun_l23_n100(x)
+ else
+ fun_l23_n900(x)
+ end
+end
+
+def fun_l22_n299(x)
+ if (x < 1)
+ fun_l23_n64(x)
+ else
+ fun_l23_n80(x)
+ end
+end
+
+def fun_l22_n300(x)
+ if (x < 1)
+ fun_l23_n361(x)
+ else
+ fun_l23_n535(x)
+ end
+end
+
+def fun_l22_n301(x)
+ if (x < 1)
+ fun_l23_n628(x)
+ else
+ fun_l23_n272(x)
+ end
+end
+
+def fun_l22_n302(x)
+ if (x < 1)
+ fun_l23_n930(x)
+ else
+ fun_l23_n795(x)
+ end
+end
+
+def fun_l22_n303(x)
+ if (x < 1)
+ fun_l23_n642(x)
+ else
+ fun_l23_n766(x)
+ end
+end
+
+def fun_l22_n304(x)
+ if (x < 1)
+ fun_l23_n191(x)
+ else
+ fun_l23_n439(x)
+ end
+end
+
+def fun_l22_n305(x)
+ if (x < 1)
+ fun_l23_n387(x)
+ else
+ fun_l23_n999(x)
+ end
+end
+
+def fun_l22_n306(x)
+ if (x < 1)
+ fun_l23_n470(x)
+ else
+ fun_l23_n572(x)
+ end
+end
+
+def fun_l22_n307(x)
+ if (x < 1)
+ fun_l23_n942(x)
+ else
+ fun_l23_n254(x)
+ end
+end
+
+def fun_l22_n308(x)
+ if (x < 1)
+ fun_l23_n664(x)
+ else
+ fun_l23_n73(x)
+ end
+end
+
+def fun_l22_n309(x)
+ if (x < 1)
+ fun_l23_n63(x)
+ else
+ fun_l23_n321(x)
+ end
+end
+
+def fun_l22_n310(x)
+ if (x < 1)
+ fun_l23_n348(x)
+ else
+ fun_l23_n961(x)
+ end
+end
+
+def fun_l22_n311(x)
+ if (x < 1)
+ fun_l23_n555(x)
+ else
+ fun_l23_n315(x)
+ end
+end
+
+def fun_l22_n312(x)
+ if (x < 1)
+ fun_l23_n978(x)
+ else
+ fun_l23_n498(x)
+ end
+end
+
+def fun_l22_n313(x)
+ if (x < 1)
+ fun_l23_n880(x)
+ else
+ fun_l23_n696(x)
+ end
+end
+
+def fun_l22_n314(x)
+ if (x < 1)
+ fun_l23_n325(x)
+ else
+ fun_l23_n43(x)
+ end
+end
+
+def fun_l22_n315(x)
+ if (x < 1)
+ fun_l23_n848(x)
+ else
+ fun_l23_n314(x)
+ end
+end
+
+def fun_l22_n316(x)
+ if (x < 1)
+ fun_l23_n660(x)
+ else
+ fun_l23_n378(x)
+ end
+end
+
+def fun_l22_n317(x)
+ if (x < 1)
+ fun_l23_n975(x)
+ else
+ fun_l23_n503(x)
+ end
+end
+
+def fun_l22_n318(x)
+ if (x < 1)
+ fun_l23_n41(x)
+ else
+ fun_l23_n746(x)
+ end
+end
+
+def fun_l22_n319(x)
+ if (x < 1)
+ fun_l23_n325(x)
+ else
+ fun_l23_n565(x)
+ end
+end
+
+def fun_l22_n320(x)
+ if (x < 1)
+ fun_l23_n19(x)
+ else
+ fun_l23_n922(x)
+ end
+end
+
+def fun_l22_n321(x)
+ if (x < 1)
+ fun_l23_n235(x)
+ else
+ fun_l23_n284(x)
+ end
+end
+
+def fun_l22_n322(x)
+ if (x < 1)
+ fun_l23_n591(x)
+ else
+ fun_l23_n821(x)
+ end
+end
+
+def fun_l22_n323(x)
+ if (x < 1)
+ fun_l23_n23(x)
+ else
+ fun_l23_n151(x)
+ end
+end
+
+def fun_l22_n324(x)
+ if (x < 1)
+ fun_l23_n361(x)
+ else
+ fun_l23_n322(x)
+ end
+end
+
+def fun_l22_n325(x)
+ if (x < 1)
+ fun_l23_n245(x)
+ else
+ fun_l23_n205(x)
+ end
+end
+
+def fun_l22_n326(x)
+ if (x < 1)
+ fun_l23_n568(x)
+ else
+ fun_l23_n133(x)
+ end
+end
+
+def fun_l22_n327(x)
+ if (x < 1)
+ fun_l23_n895(x)
+ else
+ fun_l23_n315(x)
+ end
+end
+
+def fun_l22_n328(x)
+ if (x < 1)
+ fun_l23_n473(x)
+ else
+ fun_l23_n315(x)
+ end
+end
+
+def fun_l22_n329(x)
+ if (x < 1)
+ fun_l23_n618(x)
+ else
+ fun_l23_n196(x)
+ end
+end
+
+def fun_l22_n330(x)
+ if (x < 1)
+ fun_l23_n97(x)
+ else
+ fun_l23_n422(x)
+ end
+end
+
+def fun_l22_n331(x)
+ if (x < 1)
+ fun_l23_n101(x)
+ else
+ fun_l23_n447(x)
+ end
+end
+
+def fun_l22_n332(x)
+ if (x < 1)
+ fun_l23_n875(x)
+ else
+ fun_l23_n197(x)
+ end
+end
+
+def fun_l22_n333(x)
+ if (x < 1)
+ fun_l23_n25(x)
+ else
+ fun_l23_n499(x)
+ end
+end
+
+def fun_l22_n334(x)
+ if (x < 1)
+ fun_l23_n602(x)
+ else
+ fun_l23_n75(x)
+ end
+end
+
+def fun_l22_n335(x)
+ if (x < 1)
+ fun_l23_n370(x)
+ else
+ fun_l23_n150(x)
+ end
+end
+
+def fun_l22_n336(x)
+ if (x < 1)
+ fun_l23_n960(x)
+ else
+ fun_l23_n498(x)
+ end
+end
+
+def fun_l22_n337(x)
+ if (x < 1)
+ fun_l23_n675(x)
+ else
+ fun_l23_n525(x)
+ end
+end
+
+def fun_l22_n338(x)
+ if (x < 1)
+ fun_l23_n445(x)
+ else
+ fun_l23_n581(x)
+ end
+end
+
+def fun_l22_n339(x)
+ if (x < 1)
+ fun_l23_n718(x)
+ else
+ fun_l23_n995(x)
+ end
+end
+
+def fun_l22_n340(x)
+ if (x < 1)
+ fun_l23_n790(x)
+ else
+ fun_l23_n370(x)
+ end
+end
+
+def fun_l22_n341(x)
+ if (x < 1)
+ fun_l23_n234(x)
+ else
+ fun_l23_n187(x)
+ end
+end
+
+def fun_l22_n342(x)
+ if (x < 1)
+ fun_l23_n777(x)
+ else
+ fun_l23_n411(x)
+ end
+end
+
+def fun_l22_n343(x)
+ if (x < 1)
+ fun_l23_n258(x)
+ else
+ fun_l23_n129(x)
+ end
+end
+
+def fun_l22_n344(x)
+ if (x < 1)
+ fun_l23_n715(x)
+ else
+ fun_l23_n381(x)
+ end
+end
+
+def fun_l22_n345(x)
+ if (x < 1)
+ fun_l23_n495(x)
+ else
+ fun_l23_n892(x)
+ end
+end
+
+def fun_l22_n346(x)
+ if (x < 1)
+ fun_l23_n433(x)
+ else
+ fun_l23_n987(x)
+ end
+end
+
+def fun_l22_n347(x)
+ if (x < 1)
+ fun_l23_n569(x)
+ else
+ fun_l23_n832(x)
+ end
+end
+
+def fun_l22_n348(x)
+ if (x < 1)
+ fun_l23_n425(x)
+ else
+ fun_l23_n894(x)
+ end
+end
+
+def fun_l22_n349(x)
+ if (x < 1)
+ fun_l23_n186(x)
+ else
+ fun_l23_n211(x)
+ end
+end
+
+def fun_l22_n350(x)
+ if (x < 1)
+ fun_l23_n435(x)
+ else
+ fun_l23_n393(x)
+ end
+end
+
+def fun_l22_n351(x)
+ if (x < 1)
+ fun_l23_n942(x)
+ else
+ fun_l23_n364(x)
+ end
+end
+
+def fun_l22_n352(x)
+ if (x < 1)
+ fun_l23_n29(x)
+ else
+ fun_l23_n574(x)
+ end
+end
+
+def fun_l22_n353(x)
+ if (x < 1)
+ fun_l23_n548(x)
+ else
+ fun_l23_n663(x)
+ end
+end
+
+def fun_l22_n354(x)
+ if (x < 1)
+ fun_l23_n238(x)
+ else
+ fun_l23_n693(x)
+ end
+end
+
+def fun_l22_n355(x)
+ if (x < 1)
+ fun_l23_n459(x)
+ else
+ fun_l23_n197(x)
+ end
+end
+
+def fun_l22_n356(x)
+ if (x < 1)
+ fun_l23_n478(x)
+ else
+ fun_l23_n905(x)
+ end
+end
+
+def fun_l22_n357(x)
+ if (x < 1)
+ fun_l23_n732(x)
+ else
+ fun_l23_n124(x)
+ end
+end
+
+def fun_l22_n358(x)
+ if (x < 1)
+ fun_l23_n716(x)
+ else
+ fun_l23_n758(x)
+ end
+end
+
+def fun_l22_n359(x)
+ if (x < 1)
+ fun_l23_n376(x)
+ else
+ fun_l23_n883(x)
+ end
+end
+
+def fun_l22_n360(x)
+ if (x < 1)
+ fun_l23_n100(x)
+ else
+ fun_l23_n485(x)
+ end
+end
+
+def fun_l22_n361(x)
+ if (x < 1)
+ fun_l23_n62(x)
+ else
+ fun_l23_n794(x)
+ end
+end
+
+def fun_l22_n362(x)
+ if (x < 1)
+ fun_l23_n951(x)
+ else
+ fun_l23_n23(x)
+ end
+end
+
+def fun_l22_n363(x)
+ if (x < 1)
+ fun_l23_n298(x)
+ else
+ fun_l23_n775(x)
+ end
+end
+
+def fun_l22_n364(x)
+ if (x < 1)
+ fun_l23_n53(x)
+ else
+ fun_l23_n595(x)
+ end
+end
+
+def fun_l22_n365(x)
+ if (x < 1)
+ fun_l23_n695(x)
+ else
+ fun_l23_n401(x)
+ end
+end
+
+def fun_l22_n366(x)
+ if (x < 1)
+ fun_l23_n475(x)
+ else
+ fun_l23_n762(x)
+ end
+end
+
+def fun_l22_n367(x)
+ if (x < 1)
+ fun_l23_n706(x)
+ else
+ fun_l23_n527(x)
+ end
+end
+
+def fun_l22_n368(x)
+ if (x < 1)
+ fun_l23_n919(x)
+ else
+ fun_l23_n301(x)
+ end
+end
+
+def fun_l22_n369(x)
+ if (x < 1)
+ fun_l23_n755(x)
+ else
+ fun_l23_n256(x)
+ end
+end
+
+def fun_l22_n370(x)
+ if (x < 1)
+ fun_l23_n592(x)
+ else
+ fun_l23_n608(x)
+ end
+end
+
+def fun_l22_n371(x)
+ if (x < 1)
+ fun_l23_n192(x)
+ else
+ fun_l23_n10(x)
+ end
+end
+
+def fun_l22_n372(x)
+ if (x < 1)
+ fun_l23_n332(x)
+ else
+ fun_l23_n448(x)
+ end
+end
+
+def fun_l22_n373(x)
+ if (x < 1)
+ fun_l23_n135(x)
+ else
+ fun_l23_n793(x)
+ end
+end
+
+def fun_l22_n374(x)
+ if (x < 1)
+ fun_l23_n141(x)
+ else
+ fun_l23_n669(x)
+ end
+end
+
+def fun_l22_n375(x)
+ if (x < 1)
+ fun_l23_n474(x)
+ else
+ fun_l23_n356(x)
+ end
+end
+
+def fun_l22_n376(x)
+ if (x < 1)
+ fun_l23_n69(x)
+ else
+ fun_l23_n384(x)
+ end
+end
+
+def fun_l22_n377(x)
+ if (x < 1)
+ fun_l23_n386(x)
+ else
+ fun_l23_n552(x)
+ end
+end
+
+def fun_l22_n378(x)
+ if (x < 1)
+ fun_l23_n878(x)
+ else
+ fun_l23_n131(x)
+ end
+end
+
+def fun_l22_n379(x)
+ if (x < 1)
+ fun_l23_n929(x)
+ else
+ fun_l23_n479(x)
+ end
+end
+
+def fun_l22_n380(x)
+ if (x < 1)
+ fun_l23_n782(x)
+ else
+ fun_l23_n745(x)
+ end
+end
+
+def fun_l22_n381(x)
+ if (x < 1)
+ fun_l23_n126(x)
+ else
+ fun_l23_n732(x)
+ end
+end
+
+def fun_l22_n382(x)
+ if (x < 1)
+ fun_l23_n694(x)
+ else
+ fun_l23_n291(x)
+ end
+end
+
+def fun_l22_n383(x)
+ if (x < 1)
+ fun_l23_n165(x)
+ else
+ fun_l23_n49(x)
+ end
+end
+
+def fun_l22_n384(x)
+ if (x < 1)
+ fun_l23_n453(x)
+ else
+ fun_l23_n144(x)
+ end
+end
+
+def fun_l22_n385(x)
+ if (x < 1)
+ fun_l23_n182(x)
+ else
+ fun_l23_n974(x)
+ end
+end
+
+def fun_l22_n386(x)
+ if (x < 1)
+ fun_l23_n861(x)
+ else
+ fun_l23_n185(x)
+ end
+end
+
+def fun_l22_n387(x)
+ if (x < 1)
+ fun_l23_n962(x)
+ else
+ fun_l23_n578(x)
+ end
+end
+
+def fun_l22_n388(x)
+ if (x < 1)
+ fun_l23_n88(x)
+ else
+ fun_l23_n508(x)
+ end
+end
+
+def fun_l22_n389(x)
+ if (x < 1)
+ fun_l23_n421(x)
+ else
+ fun_l23_n886(x)
+ end
+end
+
+def fun_l22_n390(x)
+ if (x < 1)
+ fun_l23_n992(x)
+ else
+ fun_l23_n540(x)
+ end
+end
+
+def fun_l22_n391(x)
+ if (x < 1)
+ fun_l23_n996(x)
+ else
+ fun_l23_n533(x)
+ end
+end
+
+def fun_l22_n392(x)
+ if (x < 1)
+ fun_l23_n97(x)
+ else
+ fun_l23_n803(x)
+ end
+end
+
+def fun_l22_n393(x)
+ if (x < 1)
+ fun_l23_n505(x)
+ else
+ fun_l23_n263(x)
+ end
+end
+
+def fun_l22_n394(x)
+ if (x < 1)
+ fun_l23_n52(x)
+ else
+ fun_l23_n566(x)
+ end
+end
+
+def fun_l22_n395(x)
+ if (x < 1)
+ fun_l23_n290(x)
+ else
+ fun_l23_n558(x)
+ end
+end
+
+def fun_l22_n396(x)
+ if (x < 1)
+ fun_l23_n51(x)
+ else
+ fun_l23_n365(x)
+ end
+end
+
+def fun_l22_n397(x)
+ if (x < 1)
+ fun_l23_n505(x)
+ else
+ fun_l23_n461(x)
+ end
+end
+
+def fun_l22_n398(x)
+ if (x < 1)
+ fun_l23_n415(x)
+ else
+ fun_l23_n460(x)
+ end
+end
+
+def fun_l22_n399(x)
+ if (x < 1)
+ fun_l23_n370(x)
+ else
+ fun_l23_n377(x)
+ end
+end
+
+def fun_l22_n400(x)
+ if (x < 1)
+ fun_l23_n644(x)
+ else
+ fun_l23_n300(x)
+ end
+end
+
+def fun_l22_n401(x)
+ if (x < 1)
+ fun_l23_n22(x)
+ else
+ fun_l23_n348(x)
+ end
+end
+
+def fun_l22_n402(x)
+ if (x < 1)
+ fun_l23_n286(x)
+ else
+ fun_l23_n991(x)
+ end
+end
+
+def fun_l22_n403(x)
+ if (x < 1)
+ fun_l23_n928(x)
+ else
+ fun_l23_n627(x)
+ end
+end
+
+def fun_l22_n404(x)
+ if (x < 1)
+ fun_l23_n884(x)
+ else
+ fun_l23_n326(x)
+ end
+end
+
+def fun_l22_n405(x)
+ if (x < 1)
+ fun_l23_n586(x)
+ else
+ fun_l23_n913(x)
+ end
+end
+
+def fun_l22_n406(x)
+ if (x < 1)
+ fun_l23_n732(x)
+ else
+ fun_l23_n964(x)
+ end
+end
+
+def fun_l22_n407(x)
+ if (x < 1)
+ fun_l23_n301(x)
+ else
+ fun_l23_n946(x)
+ end
+end
+
+def fun_l22_n408(x)
+ if (x < 1)
+ fun_l23_n540(x)
+ else
+ fun_l23_n29(x)
+ end
+end
+
+def fun_l22_n409(x)
+ if (x < 1)
+ fun_l23_n793(x)
+ else
+ fun_l23_n420(x)
+ end
+end
+
+def fun_l22_n410(x)
+ if (x < 1)
+ fun_l23_n766(x)
+ else
+ fun_l23_n473(x)
+ end
+end
+
+def fun_l22_n411(x)
+ if (x < 1)
+ fun_l23_n683(x)
+ else
+ fun_l23_n12(x)
+ end
+end
+
+def fun_l22_n412(x)
+ if (x < 1)
+ fun_l23_n273(x)
+ else
+ fun_l23_n45(x)
+ end
+end
+
+def fun_l22_n413(x)
+ if (x < 1)
+ fun_l23_n732(x)
+ else
+ fun_l23_n313(x)
+ end
+end
+
+def fun_l22_n414(x)
+ if (x < 1)
+ fun_l23_n291(x)
+ else
+ fun_l23_n216(x)
+ end
+end
+
+def fun_l22_n415(x)
+ if (x < 1)
+ fun_l23_n6(x)
+ else
+ fun_l23_n482(x)
+ end
+end
+
+def fun_l22_n416(x)
+ if (x < 1)
+ fun_l23_n214(x)
+ else
+ fun_l23_n341(x)
+ end
+end
+
+def fun_l22_n417(x)
+ if (x < 1)
+ fun_l23_n690(x)
+ else
+ fun_l23_n773(x)
+ end
+end
+
+def fun_l22_n418(x)
+ if (x < 1)
+ fun_l23_n437(x)
+ else
+ fun_l23_n941(x)
+ end
+end
+
+def fun_l22_n419(x)
+ if (x < 1)
+ fun_l23_n131(x)
+ else
+ fun_l23_n14(x)
+ end
+end
+
+def fun_l22_n420(x)
+ if (x < 1)
+ fun_l23_n924(x)
+ else
+ fun_l23_n359(x)
+ end
+end
+
+def fun_l22_n421(x)
+ if (x < 1)
+ fun_l23_n653(x)
+ else
+ fun_l23_n875(x)
+ end
+end
+
+def fun_l22_n422(x)
+ if (x < 1)
+ fun_l23_n411(x)
+ else
+ fun_l23_n981(x)
+ end
+end
+
+def fun_l22_n423(x)
+ if (x < 1)
+ fun_l23_n258(x)
+ else
+ fun_l23_n876(x)
+ end
+end
+
+def fun_l22_n424(x)
+ if (x < 1)
+ fun_l23_n430(x)
+ else
+ fun_l23_n62(x)
+ end
+end
+
+def fun_l22_n425(x)
+ if (x < 1)
+ fun_l23_n444(x)
+ else
+ fun_l23_n48(x)
+ end
+end
+
+def fun_l22_n426(x)
+ if (x < 1)
+ fun_l23_n905(x)
+ else
+ fun_l23_n458(x)
+ end
+end
+
+def fun_l22_n427(x)
+ if (x < 1)
+ fun_l23_n440(x)
+ else
+ fun_l23_n411(x)
+ end
+end
+
+def fun_l22_n428(x)
+ if (x < 1)
+ fun_l23_n655(x)
+ else
+ fun_l23_n622(x)
+ end
+end
+
+def fun_l22_n429(x)
+ if (x < 1)
+ fun_l23_n587(x)
+ else
+ fun_l23_n638(x)
+ end
+end
+
+def fun_l22_n430(x)
+ if (x < 1)
+ fun_l23_n156(x)
+ else
+ fun_l23_n900(x)
+ end
+end
+
+def fun_l22_n431(x)
+ if (x < 1)
+ fun_l23_n136(x)
+ else
+ fun_l23_n562(x)
+ end
+end
+
+def fun_l22_n432(x)
+ if (x < 1)
+ fun_l23_n897(x)
+ else
+ fun_l23_n16(x)
+ end
+end
+
+def fun_l22_n433(x)
+ if (x < 1)
+ fun_l23_n28(x)
+ else
+ fun_l23_n504(x)
+ end
+end
+
+def fun_l22_n434(x)
+ if (x < 1)
+ fun_l23_n987(x)
+ else
+ fun_l23_n640(x)
+ end
+end
+
+def fun_l22_n435(x)
+ if (x < 1)
+ fun_l23_n395(x)
+ else
+ fun_l23_n922(x)
+ end
+end
+
+def fun_l22_n436(x)
+ if (x < 1)
+ fun_l23_n679(x)
+ else
+ fun_l23_n576(x)
+ end
+end
+
+def fun_l22_n437(x)
+ if (x < 1)
+ fun_l23_n915(x)
+ else
+ fun_l23_n240(x)
+ end
+end
+
+def fun_l22_n438(x)
+ if (x < 1)
+ fun_l23_n889(x)
+ else
+ fun_l23_n38(x)
+ end
+end
+
+def fun_l22_n439(x)
+ if (x < 1)
+ fun_l23_n522(x)
+ else
+ fun_l23_n481(x)
+ end
+end
+
+def fun_l22_n440(x)
+ if (x < 1)
+ fun_l23_n458(x)
+ else
+ fun_l23_n81(x)
+ end
+end
+
+def fun_l22_n441(x)
+ if (x < 1)
+ fun_l23_n220(x)
+ else
+ fun_l23_n393(x)
+ end
+end
+
+def fun_l22_n442(x)
+ if (x < 1)
+ fun_l23_n404(x)
+ else
+ fun_l23_n945(x)
+ end
+end
+
+def fun_l22_n443(x)
+ if (x < 1)
+ fun_l23_n347(x)
+ else
+ fun_l23_n377(x)
+ end
+end
+
+def fun_l22_n444(x)
+ if (x < 1)
+ fun_l23_n484(x)
+ else
+ fun_l23_n277(x)
+ end
+end
+
+def fun_l22_n445(x)
+ if (x < 1)
+ fun_l23_n118(x)
+ else
+ fun_l23_n578(x)
+ end
+end
+
+def fun_l22_n446(x)
+ if (x < 1)
+ fun_l23_n674(x)
+ else
+ fun_l23_n238(x)
+ end
+end
+
+def fun_l22_n447(x)
+ if (x < 1)
+ fun_l23_n290(x)
+ else
+ fun_l23_n275(x)
+ end
+end
+
+def fun_l22_n448(x)
+ if (x < 1)
+ fun_l23_n358(x)
+ else
+ fun_l23_n939(x)
+ end
+end
+
+def fun_l22_n449(x)
+ if (x < 1)
+ fun_l23_n38(x)
+ else
+ fun_l23_n122(x)
+ end
+end
+
+def fun_l22_n450(x)
+ if (x < 1)
+ fun_l23_n575(x)
+ else
+ fun_l23_n582(x)
+ end
+end
+
+def fun_l22_n451(x)
+ if (x < 1)
+ fun_l23_n657(x)
+ else
+ fun_l23_n986(x)
+ end
+end
+
+def fun_l22_n452(x)
+ if (x < 1)
+ fun_l23_n771(x)
+ else
+ fun_l23_n603(x)
+ end
+end
+
+def fun_l22_n453(x)
+ if (x < 1)
+ fun_l23_n981(x)
+ else
+ fun_l23_n762(x)
+ end
+end
+
+def fun_l22_n454(x)
+ if (x < 1)
+ fun_l23_n93(x)
+ else
+ fun_l23_n26(x)
+ end
+end
+
+def fun_l22_n455(x)
+ if (x < 1)
+ fun_l23_n675(x)
+ else
+ fun_l23_n332(x)
+ end
+end
+
+def fun_l22_n456(x)
+ if (x < 1)
+ fun_l23_n923(x)
+ else
+ fun_l23_n416(x)
+ end
+end
+
+def fun_l22_n457(x)
+ if (x < 1)
+ fun_l23_n179(x)
+ else
+ fun_l23_n485(x)
+ end
+end
+
+def fun_l22_n458(x)
+ if (x < 1)
+ fun_l23_n38(x)
+ else
+ fun_l23_n319(x)
+ end
+end
+
+def fun_l22_n459(x)
+ if (x < 1)
+ fun_l23_n22(x)
+ else
+ fun_l23_n747(x)
+ end
+end
+
+def fun_l22_n460(x)
+ if (x < 1)
+ fun_l23_n643(x)
+ else
+ fun_l23_n132(x)
+ end
+end
+
+def fun_l22_n461(x)
+ if (x < 1)
+ fun_l23_n165(x)
+ else
+ fun_l23_n673(x)
+ end
+end
+
+def fun_l22_n462(x)
+ if (x < 1)
+ fun_l23_n988(x)
+ else
+ fun_l23_n916(x)
+ end
+end
+
+def fun_l22_n463(x)
+ if (x < 1)
+ fun_l23_n331(x)
+ else
+ fun_l23_n853(x)
+ end
+end
+
+def fun_l22_n464(x)
+ if (x < 1)
+ fun_l23_n699(x)
+ else
+ fun_l23_n771(x)
+ end
+end
+
+def fun_l22_n465(x)
+ if (x < 1)
+ fun_l23_n358(x)
+ else
+ fun_l23_n966(x)
+ end
+end
+
+def fun_l22_n466(x)
+ if (x < 1)
+ fun_l23_n723(x)
+ else
+ fun_l23_n897(x)
+ end
+end
+
+def fun_l22_n467(x)
+ if (x < 1)
+ fun_l23_n69(x)
+ else
+ fun_l23_n186(x)
+ end
+end
+
+def fun_l22_n468(x)
+ if (x < 1)
+ fun_l23_n661(x)
+ else
+ fun_l23_n420(x)
+ end
+end
+
+def fun_l22_n469(x)
+ if (x < 1)
+ fun_l23_n175(x)
+ else
+ fun_l23_n270(x)
+ end
+end
+
+def fun_l22_n470(x)
+ if (x < 1)
+ fun_l23_n556(x)
+ else
+ fun_l23_n344(x)
+ end
+end
+
+def fun_l22_n471(x)
+ if (x < 1)
+ fun_l23_n413(x)
+ else
+ fun_l23_n338(x)
+ end
+end
+
+def fun_l22_n472(x)
+ if (x < 1)
+ fun_l23_n456(x)
+ else
+ fun_l23_n125(x)
+ end
+end
+
+def fun_l22_n473(x)
+ if (x < 1)
+ fun_l23_n364(x)
+ else
+ fun_l23_n347(x)
+ end
+end
+
+def fun_l22_n474(x)
+ if (x < 1)
+ fun_l23_n436(x)
+ else
+ fun_l23_n897(x)
+ end
+end
+
+def fun_l22_n475(x)
+ if (x < 1)
+ fun_l23_n613(x)
+ else
+ fun_l23_n851(x)
+ end
+end
+
+def fun_l22_n476(x)
+ if (x < 1)
+ fun_l23_n754(x)
+ else
+ fun_l23_n755(x)
+ end
+end
+
+def fun_l22_n477(x)
+ if (x < 1)
+ fun_l23_n899(x)
+ else
+ fun_l23_n496(x)
+ end
+end
+
+def fun_l22_n478(x)
+ if (x < 1)
+ fun_l23_n183(x)
+ else
+ fun_l23_n864(x)
+ end
+end
+
+def fun_l22_n479(x)
+ if (x < 1)
+ fun_l23_n11(x)
+ else
+ fun_l23_n679(x)
+ end
+end
+
+def fun_l22_n480(x)
+ if (x < 1)
+ fun_l23_n160(x)
+ else
+ fun_l23_n747(x)
+ end
+end
+
+def fun_l22_n481(x)
+ if (x < 1)
+ fun_l23_n138(x)
+ else
+ fun_l23_n762(x)
+ end
+end
+
+def fun_l22_n482(x)
+ if (x < 1)
+ fun_l23_n467(x)
+ else
+ fun_l23_n148(x)
+ end
+end
+
+def fun_l22_n483(x)
+ if (x < 1)
+ fun_l23_n97(x)
+ else
+ fun_l23_n826(x)
+ end
+end
+
+def fun_l22_n484(x)
+ if (x < 1)
+ fun_l23_n754(x)
+ else
+ fun_l23_n661(x)
+ end
+end
+
+def fun_l22_n485(x)
+ if (x < 1)
+ fun_l23_n415(x)
+ else
+ fun_l23_n531(x)
+ end
+end
+
+def fun_l22_n486(x)
+ if (x < 1)
+ fun_l23_n543(x)
+ else
+ fun_l23_n271(x)
+ end
+end
+
+def fun_l22_n487(x)
+ if (x < 1)
+ fun_l23_n240(x)
+ else
+ fun_l23_n221(x)
+ end
+end
+
+def fun_l22_n488(x)
+ if (x < 1)
+ fun_l23_n208(x)
+ else
+ fun_l23_n633(x)
+ end
+end
+
+def fun_l22_n489(x)
+ if (x < 1)
+ fun_l23_n539(x)
+ else
+ fun_l23_n925(x)
+ end
+end
+
+def fun_l22_n490(x)
+ if (x < 1)
+ fun_l23_n141(x)
+ else
+ fun_l23_n142(x)
+ end
+end
+
+def fun_l22_n491(x)
+ if (x < 1)
+ fun_l23_n899(x)
+ else
+ fun_l23_n407(x)
+ end
+end
+
+def fun_l22_n492(x)
+ if (x < 1)
+ fun_l23_n237(x)
+ else
+ fun_l23_n836(x)
+ end
+end
+
+def fun_l22_n493(x)
+ if (x < 1)
+ fun_l23_n23(x)
+ else
+ fun_l23_n266(x)
+ end
+end
+
+def fun_l22_n494(x)
+ if (x < 1)
+ fun_l23_n819(x)
+ else
+ fun_l23_n473(x)
+ end
+end
+
+def fun_l22_n495(x)
+ if (x < 1)
+ fun_l23_n182(x)
+ else
+ fun_l23_n253(x)
+ end
+end
+
+def fun_l22_n496(x)
+ if (x < 1)
+ fun_l23_n459(x)
+ else
+ fun_l23_n421(x)
+ end
+end
+
+def fun_l22_n497(x)
+ if (x < 1)
+ fun_l23_n553(x)
+ else
+ fun_l23_n207(x)
+ end
+end
+
+def fun_l22_n498(x)
+ if (x < 1)
+ fun_l23_n5(x)
+ else
+ fun_l23_n261(x)
+ end
+end
+
+def fun_l22_n499(x)
+ if (x < 1)
+ fun_l23_n53(x)
+ else
+ fun_l23_n478(x)
+ end
+end
+
+def fun_l22_n500(x)
+ if (x < 1)
+ fun_l23_n489(x)
+ else
+ fun_l23_n77(x)
+ end
+end
+
+def fun_l22_n501(x)
+ if (x < 1)
+ fun_l23_n551(x)
+ else
+ fun_l23_n854(x)
+ end
+end
+
+def fun_l22_n502(x)
+ if (x < 1)
+ fun_l23_n32(x)
+ else
+ fun_l23_n241(x)
+ end
+end
+
+def fun_l22_n503(x)
+ if (x < 1)
+ fun_l23_n536(x)
+ else
+ fun_l23_n820(x)
+ end
+end
+
+def fun_l22_n504(x)
+ if (x < 1)
+ fun_l23_n521(x)
+ else
+ fun_l23_n551(x)
+ end
+end
+
+def fun_l22_n505(x)
+ if (x < 1)
+ fun_l23_n812(x)
+ else
+ fun_l23_n885(x)
+ end
+end
+
+def fun_l22_n506(x)
+ if (x < 1)
+ fun_l23_n935(x)
+ else
+ fun_l23_n38(x)
+ end
+end
+
+def fun_l22_n507(x)
+ if (x < 1)
+ fun_l23_n99(x)
+ else
+ fun_l23_n907(x)
+ end
+end
+
+def fun_l22_n508(x)
+ if (x < 1)
+ fun_l23_n89(x)
+ else
+ fun_l23_n322(x)
+ end
+end
+
+def fun_l22_n509(x)
+ if (x < 1)
+ fun_l23_n279(x)
+ else
+ fun_l23_n103(x)
+ end
+end
+
+def fun_l22_n510(x)
+ if (x < 1)
+ fun_l23_n476(x)
+ else
+ fun_l23_n947(x)
+ end
+end
+
+def fun_l22_n511(x)
+ if (x < 1)
+ fun_l23_n872(x)
+ else
+ fun_l23_n497(x)
+ end
+end
+
+def fun_l22_n512(x)
+ if (x < 1)
+ fun_l23_n508(x)
+ else
+ fun_l23_n548(x)
+ end
+end
+
+def fun_l22_n513(x)
+ if (x < 1)
+ fun_l23_n640(x)
+ else
+ fun_l23_n696(x)
+ end
+end
+
+def fun_l22_n514(x)
+ if (x < 1)
+ fun_l23_n694(x)
+ else
+ fun_l23_n483(x)
+ end
+end
+
+def fun_l22_n515(x)
+ if (x < 1)
+ fun_l23_n914(x)
+ else
+ fun_l23_n772(x)
+ end
+end
+
+def fun_l22_n516(x)
+ if (x < 1)
+ fun_l23_n192(x)
+ else
+ fun_l23_n35(x)
+ end
+end
+
+def fun_l22_n517(x)
+ if (x < 1)
+ fun_l23_n597(x)
+ else
+ fun_l23_n473(x)
+ end
+end
+
+def fun_l22_n518(x)
+ if (x < 1)
+ fun_l23_n974(x)
+ else
+ fun_l23_n315(x)
+ end
+end
+
+def fun_l22_n519(x)
+ if (x < 1)
+ fun_l23_n391(x)
+ else
+ fun_l23_n800(x)
+ end
+end
+
+def fun_l22_n520(x)
+ if (x < 1)
+ fun_l23_n106(x)
+ else
+ fun_l23_n170(x)
+ end
+end
+
+def fun_l22_n521(x)
+ if (x < 1)
+ fun_l23_n926(x)
+ else
+ fun_l23_n495(x)
+ end
+end
+
+def fun_l22_n522(x)
+ if (x < 1)
+ fun_l23_n135(x)
+ else
+ fun_l23_n304(x)
+ end
+end
+
+def fun_l22_n523(x)
+ if (x < 1)
+ fun_l23_n765(x)
+ else
+ fun_l23_n53(x)
+ end
+end
+
+def fun_l22_n524(x)
+ if (x < 1)
+ fun_l23_n699(x)
+ else
+ fun_l23_n158(x)
+ end
+end
+
+def fun_l22_n525(x)
+ if (x < 1)
+ fun_l23_n759(x)
+ else
+ fun_l23_n34(x)
+ end
+end
+
+def fun_l22_n526(x)
+ if (x < 1)
+ fun_l23_n813(x)
+ else
+ fun_l23_n938(x)
+ end
+end
+
+def fun_l22_n527(x)
+ if (x < 1)
+ fun_l23_n207(x)
+ else
+ fun_l23_n549(x)
+ end
+end
+
+def fun_l22_n528(x)
+ if (x < 1)
+ fun_l23_n468(x)
+ else
+ fun_l23_n681(x)
+ end
+end
+
+def fun_l22_n529(x)
+ if (x < 1)
+ fun_l23_n643(x)
+ else
+ fun_l23_n652(x)
+ end
+end
+
+def fun_l22_n530(x)
+ if (x < 1)
+ fun_l23_n254(x)
+ else
+ fun_l23_n283(x)
+ end
+end
+
+def fun_l22_n531(x)
+ if (x < 1)
+ fun_l23_n750(x)
+ else
+ fun_l23_n969(x)
+ end
+end
+
+def fun_l22_n532(x)
+ if (x < 1)
+ fun_l23_n343(x)
+ else
+ fun_l23_n578(x)
+ end
+end
+
+def fun_l22_n533(x)
+ if (x < 1)
+ fun_l23_n240(x)
+ else
+ fun_l23_n698(x)
+ end
+end
+
+def fun_l22_n534(x)
+ if (x < 1)
+ fun_l23_n497(x)
+ else
+ fun_l23_n992(x)
+ end
+end
+
+def fun_l22_n535(x)
+ if (x < 1)
+ fun_l23_n554(x)
+ else
+ fun_l23_n53(x)
+ end
+end
+
+def fun_l22_n536(x)
+ if (x < 1)
+ fun_l23_n165(x)
+ else
+ fun_l23_n467(x)
+ end
+end
+
+def fun_l22_n537(x)
+ if (x < 1)
+ fun_l23_n2(x)
+ else
+ fun_l23_n560(x)
+ end
+end
+
+def fun_l22_n538(x)
+ if (x < 1)
+ fun_l23_n151(x)
+ else
+ fun_l23_n434(x)
+ end
+end
+
+def fun_l22_n539(x)
+ if (x < 1)
+ fun_l23_n108(x)
+ else
+ fun_l23_n108(x)
+ end
+end
+
+def fun_l22_n540(x)
+ if (x < 1)
+ fun_l23_n879(x)
+ else
+ fun_l23_n608(x)
+ end
+end
+
+def fun_l22_n541(x)
+ if (x < 1)
+ fun_l23_n160(x)
+ else
+ fun_l23_n820(x)
+ end
+end
+
+def fun_l22_n542(x)
+ if (x < 1)
+ fun_l23_n813(x)
+ else
+ fun_l23_n169(x)
+ end
+end
+
+def fun_l22_n543(x)
+ if (x < 1)
+ fun_l23_n151(x)
+ else
+ fun_l23_n420(x)
+ end
+end
+
+def fun_l22_n544(x)
+ if (x < 1)
+ fun_l23_n81(x)
+ else
+ fun_l23_n226(x)
+ end
+end
+
+def fun_l22_n545(x)
+ if (x < 1)
+ fun_l23_n464(x)
+ else
+ fun_l23_n602(x)
+ end
+end
+
+def fun_l22_n546(x)
+ if (x < 1)
+ fun_l23_n798(x)
+ else
+ fun_l23_n395(x)
+ end
+end
+
+def fun_l22_n547(x)
+ if (x < 1)
+ fun_l23_n597(x)
+ else
+ fun_l23_n147(x)
+ end
+end
+
+def fun_l22_n548(x)
+ if (x < 1)
+ fun_l23_n952(x)
+ else
+ fun_l23_n515(x)
+ end
+end
+
+def fun_l22_n549(x)
+ if (x < 1)
+ fun_l23_n134(x)
+ else
+ fun_l23_n154(x)
+ end
+end
+
+def fun_l22_n550(x)
+ if (x < 1)
+ fun_l23_n35(x)
+ else
+ fun_l23_n492(x)
+ end
+end
+
+def fun_l22_n551(x)
+ if (x < 1)
+ fun_l23_n878(x)
+ else
+ fun_l23_n899(x)
+ end
+end
+
+def fun_l22_n552(x)
+ if (x < 1)
+ fun_l23_n574(x)
+ else
+ fun_l23_n108(x)
+ end
+end
+
+def fun_l22_n553(x)
+ if (x < 1)
+ fun_l23_n386(x)
+ else
+ fun_l23_n565(x)
+ end
+end
+
+def fun_l22_n554(x)
+ if (x < 1)
+ fun_l23_n551(x)
+ else
+ fun_l23_n905(x)
+ end
+end
+
+def fun_l22_n555(x)
+ if (x < 1)
+ fun_l23_n680(x)
+ else
+ fun_l23_n367(x)
+ end
+end
+
+def fun_l22_n556(x)
+ if (x < 1)
+ fun_l23_n452(x)
+ else
+ fun_l23_n211(x)
+ end
+end
+
+def fun_l22_n557(x)
+ if (x < 1)
+ fun_l23_n597(x)
+ else
+ fun_l23_n112(x)
+ end
+end
+
+def fun_l22_n558(x)
+ if (x < 1)
+ fun_l23_n22(x)
+ else
+ fun_l23_n966(x)
+ end
+end
+
+def fun_l22_n559(x)
+ if (x < 1)
+ fun_l23_n512(x)
+ else
+ fun_l23_n337(x)
+ end
+end
+
+def fun_l22_n560(x)
+ if (x < 1)
+ fun_l23_n649(x)
+ else
+ fun_l23_n361(x)
+ end
+end
+
+def fun_l22_n561(x)
+ if (x < 1)
+ fun_l23_n500(x)
+ else
+ fun_l23_n113(x)
+ end
+end
+
+def fun_l22_n562(x)
+ if (x < 1)
+ fun_l23_n455(x)
+ else
+ fun_l23_n734(x)
+ end
+end
+
+def fun_l22_n563(x)
+ if (x < 1)
+ fun_l23_n847(x)
+ else
+ fun_l23_n86(x)
+ end
+end
+
+def fun_l22_n564(x)
+ if (x < 1)
+ fun_l23_n251(x)
+ else
+ fun_l23_n203(x)
+ end
+end
+
+def fun_l22_n565(x)
+ if (x < 1)
+ fun_l23_n977(x)
+ else
+ fun_l23_n893(x)
+ end
+end
+
+def fun_l22_n566(x)
+ if (x < 1)
+ fun_l23_n693(x)
+ else
+ fun_l23_n507(x)
+ end
+end
+
+def fun_l22_n567(x)
+ if (x < 1)
+ fun_l23_n194(x)
+ else
+ fun_l23_n972(x)
+ end
+end
+
+def fun_l22_n568(x)
+ if (x < 1)
+ fun_l23_n44(x)
+ else
+ fun_l23_n694(x)
+ end
+end
+
+def fun_l22_n569(x)
+ if (x < 1)
+ fun_l23_n277(x)
+ else
+ fun_l23_n317(x)
+ end
+end
+
+def fun_l22_n570(x)
+ if (x < 1)
+ fun_l23_n40(x)
+ else
+ fun_l23_n10(x)
+ end
+end
+
+def fun_l22_n571(x)
+ if (x < 1)
+ fun_l23_n199(x)
+ else
+ fun_l23_n454(x)
+ end
+end
+
+def fun_l22_n572(x)
+ if (x < 1)
+ fun_l23_n821(x)
+ else
+ fun_l23_n556(x)
+ end
+end
+
+def fun_l22_n573(x)
+ if (x < 1)
+ fun_l23_n142(x)
+ else
+ fun_l23_n307(x)
+ end
+end
+
+def fun_l22_n574(x)
+ if (x < 1)
+ fun_l23_n291(x)
+ else
+ fun_l23_n152(x)
+ end
+end
+
+def fun_l22_n575(x)
+ if (x < 1)
+ fun_l23_n547(x)
+ else
+ fun_l23_n580(x)
+ end
+end
+
+def fun_l22_n576(x)
+ if (x < 1)
+ fun_l23_n841(x)
+ else
+ fun_l23_n518(x)
+ end
+end
+
+def fun_l22_n577(x)
+ if (x < 1)
+ fun_l23_n91(x)
+ else
+ fun_l23_n730(x)
+ end
+end
+
+def fun_l22_n578(x)
+ if (x < 1)
+ fun_l23_n626(x)
+ else
+ fun_l23_n403(x)
+ end
+end
+
+def fun_l22_n579(x)
+ if (x < 1)
+ fun_l23_n12(x)
+ else
+ fun_l23_n863(x)
+ end
+end
+
+def fun_l22_n580(x)
+ if (x < 1)
+ fun_l23_n878(x)
+ else
+ fun_l23_n28(x)
+ end
+end
+
+def fun_l22_n581(x)
+ if (x < 1)
+ fun_l23_n793(x)
+ else
+ fun_l23_n942(x)
+ end
+end
+
+def fun_l22_n582(x)
+ if (x < 1)
+ fun_l23_n168(x)
+ else
+ fun_l23_n102(x)
+ end
+end
+
+def fun_l22_n583(x)
+ if (x < 1)
+ fun_l23_n40(x)
+ else
+ fun_l23_n231(x)
+ end
+end
+
+def fun_l22_n584(x)
+ if (x < 1)
+ fun_l23_n54(x)
+ else
+ fun_l23_n734(x)
+ end
+end
+
+def fun_l22_n585(x)
+ if (x < 1)
+ fun_l23_n878(x)
+ else
+ fun_l23_n938(x)
+ end
+end
+
+def fun_l22_n586(x)
+ if (x < 1)
+ fun_l23_n89(x)
+ else
+ fun_l23_n533(x)
+ end
+end
+
+def fun_l22_n587(x)
+ if (x < 1)
+ fun_l23_n289(x)
+ else
+ fun_l23_n587(x)
+ end
+end
+
+def fun_l22_n588(x)
+ if (x < 1)
+ fun_l23_n716(x)
+ else
+ fun_l23_n785(x)
+ end
+end
+
+def fun_l22_n589(x)
+ if (x < 1)
+ fun_l23_n22(x)
+ else
+ fun_l23_n820(x)
+ end
+end
+
+def fun_l22_n590(x)
+ if (x < 1)
+ fun_l23_n945(x)
+ else
+ fun_l23_n644(x)
+ end
+end
+
+def fun_l22_n591(x)
+ if (x < 1)
+ fun_l23_n209(x)
+ else
+ fun_l23_n86(x)
+ end
+end
+
+def fun_l22_n592(x)
+ if (x < 1)
+ fun_l23_n209(x)
+ else
+ fun_l23_n971(x)
+ end
+end
+
+def fun_l22_n593(x)
+ if (x < 1)
+ fun_l23_n489(x)
+ else
+ fun_l23_n725(x)
+ end
+end
+
+def fun_l22_n594(x)
+ if (x < 1)
+ fun_l23_n42(x)
+ else
+ fun_l23_n405(x)
+ end
+end
+
+def fun_l22_n595(x)
+ if (x < 1)
+ fun_l23_n162(x)
+ else
+ fun_l23_n222(x)
+ end
+end
+
+def fun_l22_n596(x)
+ if (x < 1)
+ fun_l23_n942(x)
+ else
+ fun_l23_n193(x)
+ end
+end
+
+def fun_l22_n597(x)
+ if (x < 1)
+ fun_l23_n616(x)
+ else
+ fun_l23_n806(x)
+ end
+end
+
+def fun_l22_n598(x)
+ if (x < 1)
+ fun_l23_n278(x)
+ else
+ fun_l23_n330(x)
+ end
+end
+
+def fun_l22_n599(x)
+ if (x < 1)
+ fun_l23_n863(x)
+ else
+ fun_l23_n428(x)
+ end
+end
+
+def fun_l22_n600(x)
+ if (x < 1)
+ fun_l23_n315(x)
+ else
+ fun_l23_n319(x)
+ end
+end
+
+def fun_l22_n601(x)
+ if (x < 1)
+ fun_l23_n409(x)
+ else
+ fun_l23_n682(x)
+ end
+end
+
+def fun_l22_n602(x)
+ if (x < 1)
+ fun_l23_n307(x)
+ else
+ fun_l23_n47(x)
+ end
+end
+
+def fun_l22_n603(x)
+ if (x < 1)
+ fun_l23_n578(x)
+ else
+ fun_l23_n762(x)
+ end
+end
+
+def fun_l22_n604(x)
+ if (x < 1)
+ fun_l23_n208(x)
+ else
+ fun_l23_n314(x)
+ end
+end
+
+def fun_l22_n605(x)
+ if (x < 1)
+ fun_l23_n259(x)
+ else
+ fun_l23_n720(x)
+ end
+end
+
+def fun_l22_n606(x)
+ if (x < 1)
+ fun_l23_n272(x)
+ else
+ fun_l23_n619(x)
+ end
+end
+
+def fun_l22_n607(x)
+ if (x < 1)
+ fun_l23_n550(x)
+ else
+ fun_l23_n850(x)
+ end
+end
+
+def fun_l22_n608(x)
+ if (x < 1)
+ fun_l23_n617(x)
+ else
+ fun_l23_n999(x)
+ end
+end
+
+def fun_l22_n609(x)
+ if (x < 1)
+ fun_l23_n203(x)
+ else
+ fun_l23_n597(x)
+ end
+end
+
+def fun_l22_n610(x)
+ if (x < 1)
+ fun_l23_n547(x)
+ else
+ fun_l23_n252(x)
+ end
+end
+
+def fun_l22_n611(x)
+ if (x < 1)
+ fun_l23_n427(x)
+ else
+ fun_l23_n16(x)
+ end
+end
+
+def fun_l22_n612(x)
+ if (x < 1)
+ fun_l23_n236(x)
+ else
+ fun_l23_n142(x)
+ end
+end
+
+def fun_l22_n613(x)
+ if (x < 1)
+ fun_l23_n94(x)
+ else
+ fun_l23_n739(x)
+ end
+end
+
+def fun_l22_n614(x)
+ if (x < 1)
+ fun_l23_n504(x)
+ else
+ fun_l23_n101(x)
+ end
+end
+
+def fun_l22_n615(x)
+ if (x < 1)
+ fun_l23_n469(x)
+ else
+ fun_l23_n650(x)
+ end
+end
+
+def fun_l22_n616(x)
+ if (x < 1)
+ fun_l23_n752(x)
+ else
+ fun_l23_n262(x)
+ end
+end
+
+def fun_l22_n617(x)
+ if (x < 1)
+ fun_l23_n256(x)
+ else
+ fun_l23_n269(x)
+ end
+end
+
+def fun_l22_n618(x)
+ if (x < 1)
+ fun_l23_n784(x)
+ else
+ fun_l23_n402(x)
+ end
+end
+
+def fun_l22_n619(x)
+ if (x < 1)
+ fun_l23_n405(x)
+ else
+ fun_l23_n585(x)
+ end
+end
+
+def fun_l22_n620(x)
+ if (x < 1)
+ fun_l23_n33(x)
+ else
+ fun_l23_n357(x)
+ end
+end
+
+def fun_l22_n621(x)
+ if (x < 1)
+ fun_l23_n448(x)
+ else
+ fun_l23_n618(x)
+ end
+end
+
+def fun_l22_n622(x)
+ if (x < 1)
+ fun_l23_n520(x)
+ else
+ fun_l23_n612(x)
+ end
+end
+
+def fun_l22_n623(x)
+ if (x < 1)
+ fun_l23_n54(x)
+ else
+ fun_l23_n872(x)
+ end
+end
+
+def fun_l22_n624(x)
+ if (x < 1)
+ fun_l23_n915(x)
+ else
+ fun_l23_n1(x)
+ end
+end
+
+def fun_l22_n625(x)
+ if (x < 1)
+ fun_l23_n274(x)
+ else
+ fun_l23_n509(x)
+ end
+end
+
+def fun_l22_n626(x)
+ if (x < 1)
+ fun_l23_n506(x)
+ else
+ fun_l23_n938(x)
+ end
+end
+
+def fun_l22_n627(x)
+ if (x < 1)
+ fun_l23_n463(x)
+ else
+ fun_l23_n436(x)
+ end
+end
+
+def fun_l22_n628(x)
+ if (x < 1)
+ fun_l23_n33(x)
+ else
+ fun_l23_n279(x)
+ end
+end
+
+def fun_l22_n629(x)
+ if (x < 1)
+ fun_l23_n825(x)
+ else
+ fun_l23_n11(x)
+ end
+end
+
+def fun_l22_n630(x)
+ if (x < 1)
+ fun_l23_n778(x)
+ else
+ fun_l23_n77(x)
+ end
+end
+
+def fun_l22_n631(x)
+ if (x < 1)
+ fun_l23_n826(x)
+ else
+ fun_l23_n601(x)
+ end
+end
+
+def fun_l22_n632(x)
+ if (x < 1)
+ fun_l23_n973(x)
+ else
+ fun_l23_n444(x)
+ end
+end
+
+def fun_l22_n633(x)
+ if (x < 1)
+ fun_l23_n59(x)
+ else
+ fun_l23_n578(x)
+ end
+end
+
+def fun_l22_n634(x)
+ if (x < 1)
+ fun_l23_n366(x)
+ else
+ fun_l23_n128(x)
+ end
+end
+
+def fun_l22_n635(x)
+ if (x < 1)
+ fun_l23_n733(x)
+ else
+ fun_l23_n486(x)
+ end
+end
+
+def fun_l22_n636(x)
+ if (x < 1)
+ fun_l23_n22(x)
+ else
+ fun_l23_n997(x)
+ end
+end
+
+def fun_l22_n637(x)
+ if (x < 1)
+ fun_l23_n286(x)
+ else
+ fun_l23_n609(x)
+ end
+end
+
+def fun_l22_n638(x)
+ if (x < 1)
+ fun_l23_n519(x)
+ else
+ fun_l23_n381(x)
+ end
+end
+
+def fun_l22_n639(x)
+ if (x < 1)
+ fun_l23_n697(x)
+ else
+ fun_l23_n954(x)
+ end
+end
+
+def fun_l22_n640(x)
+ if (x < 1)
+ fun_l23_n348(x)
+ else
+ fun_l23_n261(x)
+ end
+end
+
+def fun_l22_n641(x)
+ if (x < 1)
+ fun_l23_n426(x)
+ else
+ fun_l23_n166(x)
+ end
+end
+
+def fun_l22_n642(x)
+ if (x < 1)
+ fun_l23_n488(x)
+ else
+ fun_l23_n79(x)
+ end
+end
+
+def fun_l22_n643(x)
+ if (x < 1)
+ fun_l23_n186(x)
+ else
+ fun_l23_n723(x)
+ end
+end
+
+def fun_l22_n644(x)
+ if (x < 1)
+ fun_l23_n582(x)
+ else
+ fun_l23_n365(x)
+ end
+end
+
+def fun_l22_n645(x)
+ if (x < 1)
+ fun_l23_n36(x)
+ else
+ fun_l23_n726(x)
+ end
+end
+
+def fun_l22_n646(x)
+ if (x < 1)
+ fun_l23_n585(x)
+ else
+ fun_l23_n770(x)
+ end
+end
+
+def fun_l22_n647(x)
+ if (x < 1)
+ fun_l23_n68(x)
+ else
+ fun_l23_n261(x)
+ end
+end
+
+def fun_l22_n648(x)
+ if (x < 1)
+ fun_l23_n208(x)
+ else
+ fun_l23_n302(x)
+ end
+end
+
+def fun_l22_n649(x)
+ if (x < 1)
+ fun_l23_n539(x)
+ else
+ fun_l23_n731(x)
+ end
+end
+
+def fun_l22_n650(x)
+ if (x < 1)
+ fun_l23_n709(x)
+ else
+ fun_l23_n144(x)
+ end
+end
+
+def fun_l22_n651(x)
+ if (x < 1)
+ fun_l23_n802(x)
+ else
+ fun_l23_n886(x)
+ end
+end
+
+def fun_l22_n652(x)
+ if (x < 1)
+ fun_l23_n796(x)
+ else
+ fun_l23_n574(x)
+ end
+end
+
+def fun_l22_n653(x)
+ if (x < 1)
+ fun_l23_n755(x)
+ else
+ fun_l23_n960(x)
+ end
+end
+
+def fun_l22_n654(x)
+ if (x < 1)
+ fun_l23_n415(x)
+ else
+ fun_l23_n543(x)
+ end
+end
+
+def fun_l22_n655(x)
+ if (x < 1)
+ fun_l23_n932(x)
+ else
+ fun_l23_n412(x)
+ end
+end
+
+def fun_l22_n656(x)
+ if (x < 1)
+ fun_l23_n216(x)
+ else
+ fun_l23_n869(x)
+ end
+end
+
+def fun_l22_n657(x)
+ if (x < 1)
+ fun_l23_n750(x)
+ else
+ fun_l23_n66(x)
+ end
+end
+
+def fun_l22_n658(x)
+ if (x < 1)
+ fun_l23_n400(x)
+ else
+ fun_l23_n31(x)
+ end
+end
+
+def fun_l22_n659(x)
+ if (x < 1)
+ fun_l23_n815(x)
+ else
+ fun_l23_n866(x)
+ end
+end
+
+def fun_l22_n660(x)
+ if (x < 1)
+ fun_l23_n459(x)
+ else
+ fun_l23_n833(x)
+ end
+end
+
+def fun_l22_n661(x)
+ if (x < 1)
+ fun_l23_n167(x)
+ else
+ fun_l23_n861(x)
+ end
+end
+
+def fun_l22_n662(x)
+ if (x < 1)
+ fun_l23_n789(x)
+ else
+ fun_l23_n543(x)
+ end
+end
+
+def fun_l22_n663(x)
+ if (x < 1)
+ fun_l23_n850(x)
+ else
+ fun_l23_n899(x)
+ end
+end
+
+def fun_l22_n664(x)
+ if (x < 1)
+ fun_l23_n986(x)
+ else
+ fun_l23_n924(x)
+ end
+end
+
+def fun_l22_n665(x)
+ if (x < 1)
+ fun_l23_n667(x)
+ else
+ fun_l23_n510(x)
+ end
+end
+
+def fun_l22_n666(x)
+ if (x < 1)
+ fun_l23_n744(x)
+ else
+ fun_l23_n530(x)
+ end
+end
+
+def fun_l22_n667(x)
+ if (x < 1)
+ fun_l23_n930(x)
+ else
+ fun_l23_n693(x)
+ end
+end
+
+def fun_l22_n668(x)
+ if (x < 1)
+ fun_l23_n942(x)
+ else
+ fun_l23_n785(x)
+ end
+end
+
+def fun_l22_n669(x)
+ if (x < 1)
+ fun_l23_n520(x)
+ else
+ fun_l23_n342(x)
+ end
+end
+
+def fun_l22_n670(x)
+ if (x < 1)
+ fun_l23_n865(x)
+ else
+ fun_l23_n63(x)
+ end
+end
+
+def fun_l22_n671(x)
+ if (x < 1)
+ fun_l23_n173(x)
+ else
+ fun_l23_n142(x)
+ end
+end
+
+def fun_l22_n672(x)
+ if (x < 1)
+ fun_l23_n487(x)
+ else
+ fun_l23_n400(x)
+ end
+end
+
+def fun_l22_n673(x)
+ if (x < 1)
+ fun_l23_n330(x)
+ else
+ fun_l23_n639(x)
+ end
+end
+
+def fun_l22_n674(x)
+ if (x < 1)
+ fun_l23_n593(x)
+ else
+ fun_l23_n653(x)
+ end
+end
+
+def fun_l22_n675(x)
+ if (x < 1)
+ fun_l23_n167(x)
+ else
+ fun_l23_n173(x)
+ end
+end
+
+def fun_l22_n676(x)
+ if (x < 1)
+ fun_l23_n288(x)
+ else
+ fun_l23_n412(x)
+ end
+end
+
+def fun_l22_n677(x)
+ if (x < 1)
+ fun_l23_n266(x)
+ else
+ fun_l23_n728(x)
+ end
+end
+
+def fun_l22_n678(x)
+ if (x < 1)
+ fun_l23_n137(x)
+ else
+ fun_l23_n277(x)
+ end
+end
+
+def fun_l22_n679(x)
+ if (x < 1)
+ fun_l23_n732(x)
+ else
+ fun_l23_n760(x)
+ end
+end
+
+def fun_l22_n680(x)
+ if (x < 1)
+ fun_l23_n372(x)
+ else
+ fun_l23_n26(x)
+ end
+end
+
+def fun_l22_n681(x)
+ if (x < 1)
+ fun_l23_n156(x)
+ else
+ fun_l23_n449(x)
+ end
+end
+
+def fun_l22_n682(x)
+ if (x < 1)
+ fun_l23_n117(x)
+ else
+ fun_l23_n711(x)
+ end
+end
+
+def fun_l22_n683(x)
+ if (x < 1)
+ fun_l23_n732(x)
+ else
+ fun_l23_n922(x)
+ end
+end
+
+def fun_l22_n684(x)
+ if (x < 1)
+ fun_l23_n116(x)
+ else
+ fun_l23_n347(x)
+ end
+end
+
+def fun_l22_n685(x)
+ if (x < 1)
+ fun_l23_n277(x)
+ else
+ fun_l23_n837(x)
+ end
+end
+
+def fun_l22_n686(x)
+ if (x < 1)
+ fun_l23_n578(x)
+ else
+ fun_l23_n290(x)
+ end
+end
+
+def fun_l22_n687(x)
+ if (x < 1)
+ fun_l23_n858(x)
+ else
+ fun_l23_n390(x)
+ end
+end
+
+def fun_l22_n688(x)
+ if (x < 1)
+ fun_l23_n52(x)
+ else
+ fun_l23_n759(x)
+ end
+end
+
+def fun_l22_n689(x)
+ if (x < 1)
+ fun_l23_n873(x)
+ else
+ fun_l23_n25(x)
+ end
+end
+
+def fun_l22_n690(x)
+ if (x < 1)
+ fun_l23_n262(x)
+ else
+ fun_l23_n511(x)
+ end
+end
+
+def fun_l22_n691(x)
+ if (x < 1)
+ fun_l23_n654(x)
+ else
+ fun_l23_n359(x)
+ end
+end
+
+def fun_l22_n692(x)
+ if (x < 1)
+ fun_l23_n933(x)
+ else
+ fun_l23_n369(x)
+ end
+end
+
+def fun_l22_n693(x)
+ if (x < 1)
+ fun_l23_n845(x)
+ else
+ fun_l23_n999(x)
+ end
+end
+
+def fun_l22_n694(x)
+ if (x < 1)
+ fun_l23_n479(x)
+ else
+ fun_l23_n284(x)
+ end
+end
+
+def fun_l22_n695(x)
+ if (x < 1)
+ fun_l23_n383(x)
+ else
+ fun_l23_n91(x)
+ end
+end
+
+def fun_l22_n696(x)
+ if (x < 1)
+ fun_l23_n467(x)
+ else
+ fun_l23_n555(x)
+ end
+end
+
+def fun_l22_n697(x)
+ if (x < 1)
+ fun_l23_n590(x)
+ else
+ fun_l23_n372(x)
+ end
+end
+
+def fun_l22_n698(x)
+ if (x < 1)
+ fun_l23_n706(x)
+ else
+ fun_l23_n195(x)
+ end
+end
+
+def fun_l22_n699(x)
+ if (x < 1)
+ fun_l23_n621(x)
+ else
+ fun_l23_n265(x)
+ end
+end
+
+def fun_l22_n700(x)
+ if (x < 1)
+ fun_l23_n505(x)
+ else
+ fun_l23_n831(x)
+ end
+end
+
+def fun_l22_n701(x)
+ if (x < 1)
+ fun_l23_n361(x)
+ else
+ fun_l23_n74(x)
+ end
+end
+
+def fun_l22_n702(x)
+ if (x < 1)
+ fun_l23_n734(x)
+ else
+ fun_l23_n922(x)
+ end
+end
+
+def fun_l22_n703(x)
+ if (x < 1)
+ fun_l23_n457(x)
+ else
+ fun_l23_n219(x)
+ end
+end
+
+def fun_l22_n704(x)
+ if (x < 1)
+ fun_l23_n436(x)
+ else
+ fun_l23_n733(x)
+ end
+end
+
+def fun_l22_n705(x)
+ if (x < 1)
+ fun_l23_n150(x)
+ else
+ fun_l23_n463(x)
+ end
+end
+
+def fun_l22_n706(x)
+ if (x < 1)
+ fun_l23_n486(x)
+ else
+ fun_l23_n906(x)
+ end
+end
+
+def fun_l22_n707(x)
+ if (x < 1)
+ fun_l23_n826(x)
+ else
+ fun_l23_n829(x)
+ end
+end
+
+def fun_l22_n708(x)
+ if (x < 1)
+ fun_l23_n186(x)
+ else
+ fun_l23_n555(x)
+ end
+end
+
+def fun_l22_n709(x)
+ if (x < 1)
+ fun_l23_n186(x)
+ else
+ fun_l23_n739(x)
+ end
+end
+
+def fun_l22_n710(x)
+ if (x < 1)
+ fun_l23_n58(x)
+ else
+ fun_l23_n395(x)
+ end
+end
+
+def fun_l22_n711(x)
+ if (x < 1)
+ fun_l23_n916(x)
+ else
+ fun_l23_n546(x)
+ end
+end
+
+def fun_l22_n712(x)
+ if (x < 1)
+ fun_l23_n309(x)
+ else
+ fun_l23_n582(x)
+ end
+end
+
+def fun_l22_n713(x)
+ if (x < 1)
+ fun_l23_n460(x)
+ else
+ fun_l23_n1(x)
+ end
+end
+
+def fun_l22_n714(x)
+ if (x < 1)
+ fun_l23_n270(x)
+ else
+ fun_l23_n888(x)
+ end
+end
+
+def fun_l22_n715(x)
+ if (x < 1)
+ fun_l23_n564(x)
+ else
+ fun_l23_n652(x)
+ end
+end
+
+def fun_l22_n716(x)
+ if (x < 1)
+ fun_l23_n14(x)
+ else
+ fun_l23_n862(x)
+ end
+end
+
+def fun_l22_n717(x)
+ if (x < 1)
+ fun_l23_n15(x)
+ else
+ fun_l23_n366(x)
+ end
+end
+
+def fun_l22_n718(x)
+ if (x < 1)
+ fun_l23_n580(x)
+ else
+ fun_l23_n367(x)
+ end
+end
+
+def fun_l22_n719(x)
+ if (x < 1)
+ fun_l23_n256(x)
+ else
+ fun_l23_n385(x)
+ end
+end
+
+def fun_l22_n720(x)
+ if (x < 1)
+ fun_l23_n735(x)
+ else
+ fun_l23_n811(x)
+ end
+end
+
+def fun_l22_n721(x)
+ if (x < 1)
+ fun_l23_n348(x)
+ else
+ fun_l23_n681(x)
+ end
+end
+
+def fun_l22_n722(x)
+ if (x < 1)
+ fun_l23_n908(x)
+ else
+ fun_l23_n80(x)
+ end
+end
+
+def fun_l22_n723(x)
+ if (x < 1)
+ fun_l23_n523(x)
+ else
+ fun_l23_n91(x)
+ end
+end
+
+def fun_l22_n724(x)
+ if (x < 1)
+ fun_l23_n212(x)
+ else
+ fun_l23_n220(x)
+ end
+end
+
+def fun_l22_n725(x)
+ if (x < 1)
+ fun_l23_n396(x)
+ else
+ fun_l23_n855(x)
+ end
+end
+
+def fun_l22_n726(x)
+ if (x < 1)
+ fun_l23_n717(x)
+ else
+ fun_l23_n314(x)
+ end
+end
+
+def fun_l22_n727(x)
+ if (x < 1)
+ fun_l23_n152(x)
+ else
+ fun_l23_n374(x)
+ end
+end
+
+def fun_l22_n728(x)
+ if (x < 1)
+ fun_l23_n464(x)
+ else
+ fun_l23_n439(x)
+ end
+end
+
+def fun_l22_n729(x)
+ if (x < 1)
+ fun_l23_n631(x)
+ else
+ fun_l23_n601(x)
+ end
+end
+
+def fun_l22_n730(x)
+ if (x < 1)
+ fun_l23_n689(x)
+ else
+ fun_l23_n929(x)
+ end
+end
+
+def fun_l22_n731(x)
+ if (x < 1)
+ fun_l23_n691(x)
+ else
+ fun_l23_n868(x)
+ end
+end
+
+def fun_l22_n732(x)
+ if (x < 1)
+ fun_l23_n629(x)
+ else
+ fun_l23_n997(x)
+ end
+end
+
+def fun_l22_n733(x)
+ if (x < 1)
+ fun_l23_n815(x)
+ else
+ fun_l23_n696(x)
+ end
+end
+
+def fun_l22_n734(x)
+ if (x < 1)
+ fun_l23_n636(x)
+ else
+ fun_l23_n858(x)
+ end
+end
+
+def fun_l22_n735(x)
+ if (x < 1)
+ fun_l23_n131(x)
+ else
+ fun_l23_n350(x)
+ end
+end
+
+def fun_l22_n736(x)
+ if (x < 1)
+ fun_l23_n509(x)
+ else
+ fun_l23_n197(x)
+ end
+end
+
+def fun_l22_n737(x)
+ if (x < 1)
+ fun_l23_n549(x)
+ else
+ fun_l23_n16(x)
+ end
+end
+
+def fun_l22_n738(x)
+ if (x < 1)
+ fun_l23_n797(x)
+ else
+ fun_l23_n829(x)
+ end
+end
+
+def fun_l22_n739(x)
+ if (x < 1)
+ fun_l23_n78(x)
+ else
+ fun_l23_n299(x)
+ end
+end
+
+def fun_l22_n740(x)
+ if (x < 1)
+ fun_l23_n165(x)
+ else
+ fun_l23_n822(x)
+ end
+end
+
+def fun_l22_n741(x)
+ if (x < 1)
+ fun_l23_n494(x)
+ else
+ fun_l23_n226(x)
+ end
+end
+
+def fun_l22_n742(x)
+ if (x < 1)
+ fun_l23_n930(x)
+ else
+ fun_l23_n301(x)
+ end
+end
+
+def fun_l22_n743(x)
+ if (x < 1)
+ fun_l23_n357(x)
+ else
+ fun_l23_n399(x)
+ end
+end
+
+def fun_l22_n744(x)
+ if (x < 1)
+ fun_l23_n865(x)
+ else
+ fun_l23_n499(x)
+ end
+end
+
+def fun_l22_n745(x)
+ if (x < 1)
+ fun_l23_n437(x)
+ else
+ fun_l23_n145(x)
+ end
+end
+
+def fun_l22_n746(x)
+ if (x < 1)
+ fun_l23_n883(x)
+ else
+ fun_l23_n269(x)
+ end
+end
+
+def fun_l22_n747(x)
+ if (x < 1)
+ fun_l23_n323(x)
+ else
+ fun_l23_n199(x)
+ end
+end
+
+def fun_l22_n748(x)
+ if (x < 1)
+ fun_l23_n843(x)
+ else
+ fun_l23_n179(x)
+ end
+end
+
+def fun_l22_n749(x)
+ if (x < 1)
+ fun_l23_n413(x)
+ else
+ fun_l23_n195(x)
+ end
+end
+
+def fun_l22_n750(x)
+ if (x < 1)
+ fun_l23_n50(x)
+ else
+ fun_l23_n219(x)
+ end
+end
+
+def fun_l22_n751(x)
+ if (x < 1)
+ fun_l23_n574(x)
+ else
+ fun_l23_n649(x)
+ end
+end
+
+def fun_l22_n752(x)
+ if (x < 1)
+ fun_l23_n495(x)
+ else
+ fun_l23_n664(x)
+ end
+end
+
+def fun_l22_n753(x)
+ if (x < 1)
+ fun_l23_n899(x)
+ else
+ fun_l23_n14(x)
+ end
+end
+
+def fun_l22_n754(x)
+ if (x < 1)
+ fun_l23_n230(x)
+ else
+ fun_l23_n933(x)
+ end
+end
+
+def fun_l22_n755(x)
+ if (x < 1)
+ fun_l23_n236(x)
+ else
+ fun_l23_n854(x)
+ end
+end
+
+def fun_l22_n756(x)
+ if (x < 1)
+ fun_l23_n786(x)
+ else
+ fun_l23_n599(x)
+ end
+end
+
+def fun_l22_n757(x)
+ if (x < 1)
+ fun_l23_n921(x)
+ else
+ fun_l23_n805(x)
+ end
+end
+
+def fun_l22_n758(x)
+ if (x < 1)
+ fun_l23_n990(x)
+ else
+ fun_l23_n724(x)
+ end
+end
+
+def fun_l22_n759(x)
+ if (x < 1)
+ fun_l23_n376(x)
+ else
+ fun_l23_n568(x)
+ end
+end
+
+def fun_l22_n760(x)
+ if (x < 1)
+ fun_l23_n676(x)
+ else
+ fun_l23_n995(x)
+ end
+end
+
+def fun_l22_n761(x)
+ if (x < 1)
+ fun_l23_n144(x)
+ else
+ fun_l23_n104(x)
+ end
+end
+
+def fun_l22_n762(x)
+ if (x < 1)
+ fun_l23_n463(x)
+ else
+ fun_l23_n736(x)
+ end
+end
+
+def fun_l22_n763(x)
+ if (x < 1)
+ fun_l23_n436(x)
+ else
+ fun_l23_n475(x)
+ end
+end
+
+def fun_l22_n764(x)
+ if (x < 1)
+ fun_l23_n607(x)
+ else
+ fun_l23_n737(x)
+ end
+end
+
+def fun_l22_n765(x)
+ if (x < 1)
+ fun_l23_n108(x)
+ else
+ fun_l23_n396(x)
+ end
+end
+
+def fun_l22_n766(x)
+ if (x < 1)
+ fun_l23_n35(x)
+ else
+ fun_l23_n422(x)
+ end
+end
+
+def fun_l22_n767(x)
+ if (x < 1)
+ fun_l23_n541(x)
+ else
+ fun_l23_n756(x)
+ end
+end
+
+def fun_l22_n768(x)
+ if (x < 1)
+ fun_l23_n558(x)
+ else
+ fun_l23_n858(x)
+ end
+end
+
+def fun_l22_n769(x)
+ if (x < 1)
+ fun_l23_n153(x)
+ else
+ fun_l23_n544(x)
+ end
+end
+
+def fun_l22_n770(x)
+ if (x < 1)
+ fun_l23_n201(x)
+ else
+ fun_l23_n905(x)
+ end
+end
+
+def fun_l22_n771(x)
+ if (x < 1)
+ fun_l23_n373(x)
+ else
+ fun_l23_n420(x)
+ end
+end
+
+def fun_l22_n772(x)
+ if (x < 1)
+ fun_l23_n635(x)
+ else
+ fun_l23_n464(x)
+ end
+end
+
+def fun_l22_n773(x)
+ if (x < 1)
+ fun_l23_n822(x)
+ else
+ fun_l23_n803(x)
+ end
+end
+
+def fun_l22_n774(x)
+ if (x < 1)
+ fun_l23_n118(x)
+ else
+ fun_l23_n127(x)
+ end
+end
+
+def fun_l22_n775(x)
+ if (x < 1)
+ fun_l23_n364(x)
+ else
+ fun_l23_n512(x)
+ end
+end
+
+def fun_l22_n776(x)
+ if (x < 1)
+ fun_l23_n186(x)
+ else
+ fun_l23_n275(x)
+ end
+end
+
+def fun_l22_n777(x)
+ if (x < 1)
+ fun_l23_n803(x)
+ else
+ fun_l23_n105(x)
+ end
+end
+
+def fun_l22_n778(x)
+ if (x < 1)
+ fun_l23_n535(x)
+ else
+ fun_l23_n569(x)
+ end
+end
+
+def fun_l22_n779(x)
+ if (x < 1)
+ fun_l23_n847(x)
+ else
+ fun_l23_n505(x)
+ end
+end
+
+def fun_l22_n780(x)
+ if (x < 1)
+ fun_l23_n323(x)
+ else
+ fun_l23_n552(x)
+ end
+end
+
+def fun_l22_n781(x)
+ if (x < 1)
+ fun_l23_n294(x)
+ else
+ fun_l23_n914(x)
+ end
+end
+
+def fun_l22_n782(x)
+ if (x < 1)
+ fun_l23_n887(x)
+ else
+ fun_l23_n214(x)
+ end
+end
+
+def fun_l22_n783(x)
+ if (x < 1)
+ fun_l23_n900(x)
+ else
+ fun_l23_n729(x)
+ end
+end
+
+def fun_l22_n784(x)
+ if (x < 1)
+ fun_l23_n458(x)
+ else
+ fun_l23_n233(x)
+ end
+end
+
+def fun_l22_n785(x)
+ if (x < 1)
+ fun_l23_n553(x)
+ else
+ fun_l23_n306(x)
+ end
+end
+
+def fun_l22_n786(x)
+ if (x < 1)
+ fun_l23_n853(x)
+ else
+ fun_l23_n946(x)
+ end
+end
+
+def fun_l22_n787(x)
+ if (x < 1)
+ fun_l23_n595(x)
+ else
+ fun_l23_n288(x)
+ end
+end
+
+def fun_l22_n788(x)
+ if (x < 1)
+ fun_l23_n785(x)
+ else
+ fun_l23_n752(x)
+ end
+end
+
+def fun_l22_n789(x)
+ if (x < 1)
+ fun_l23_n787(x)
+ else
+ fun_l23_n788(x)
+ end
+end
+
+def fun_l22_n790(x)
+ if (x < 1)
+ fun_l23_n461(x)
+ else
+ fun_l23_n251(x)
+ end
+end
+
+def fun_l22_n791(x)
+ if (x < 1)
+ fun_l23_n523(x)
+ else
+ fun_l23_n328(x)
+ end
+end
+
+def fun_l22_n792(x)
+ if (x < 1)
+ fun_l23_n200(x)
+ else
+ fun_l23_n689(x)
+ end
+end
+
+def fun_l22_n793(x)
+ if (x < 1)
+ fun_l23_n612(x)
+ else
+ fun_l23_n398(x)
+ end
+end
+
+def fun_l22_n794(x)
+ if (x < 1)
+ fun_l23_n937(x)
+ else
+ fun_l23_n965(x)
+ end
+end
+
+def fun_l22_n795(x)
+ if (x < 1)
+ fun_l23_n362(x)
+ else
+ fun_l23_n789(x)
+ end
+end
+
+def fun_l22_n796(x)
+ if (x < 1)
+ fun_l23_n145(x)
+ else
+ fun_l23_n36(x)
+ end
+end
+
+def fun_l22_n797(x)
+ if (x < 1)
+ fun_l23_n923(x)
+ else
+ fun_l23_n251(x)
+ end
+end
+
+def fun_l22_n798(x)
+ if (x < 1)
+ fun_l23_n15(x)
+ else
+ fun_l23_n563(x)
+ end
+end
+
+def fun_l22_n799(x)
+ if (x < 1)
+ fun_l23_n554(x)
+ else
+ fun_l23_n336(x)
+ end
+end
+
+def fun_l22_n800(x)
+ if (x < 1)
+ fun_l23_n939(x)
+ else
+ fun_l23_n993(x)
+ end
+end
+
+def fun_l22_n801(x)
+ if (x < 1)
+ fun_l23_n506(x)
+ else
+ fun_l23_n656(x)
+ end
+end
+
+def fun_l22_n802(x)
+ if (x < 1)
+ fun_l23_n591(x)
+ else
+ fun_l23_n582(x)
+ end
+end
+
+def fun_l22_n803(x)
+ if (x < 1)
+ fun_l23_n707(x)
+ else
+ fun_l23_n235(x)
+ end
+end
+
+def fun_l22_n804(x)
+ if (x < 1)
+ fun_l23_n474(x)
+ else
+ fun_l23_n253(x)
+ end
+end
+
+def fun_l22_n805(x)
+ if (x < 1)
+ fun_l23_n707(x)
+ else
+ fun_l23_n885(x)
+ end
+end
+
+def fun_l22_n806(x)
+ if (x < 1)
+ fun_l23_n155(x)
+ else
+ fun_l23_n210(x)
+ end
+end
+
+def fun_l22_n807(x)
+ if (x < 1)
+ fun_l23_n489(x)
+ else
+ fun_l23_n249(x)
+ end
+end
+
+def fun_l22_n808(x)
+ if (x < 1)
+ fun_l23_n840(x)
+ else
+ fun_l23_n748(x)
+ end
+end
+
+def fun_l22_n809(x)
+ if (x < 1)
+ fun_l23_n910(x)
+ else
+ fun_l23_n884(x)
+ end
+end
+
+def fun_l22_n810(x)
+ if (x < 1)
+ fun_l23_n653(x)
+ else
+ fun_l23_n321(x)
+ end
+end
+
+def fun_l22_n811(x)
+ if (x < 1)
+ fun_l23_n310(x)
+ else
+ fun_l23_n366(x)
+ end
+end
+
+def fun_l22_n812(x)
+ if (x < 1)
+ fun_l23_n441(x)
+ else
+ fun_l23_n795(x)
+ end
+end
+
+def fun_l22_n813(x)
+ if (x < 1)
+ fun_l23_n666(x)
+ else
+ fun_l23_n631(x)
+ end
+end
+
+def fun_l22_n814(x)
+ if (x < 1)
+ fun_l23_n680(x)
+ else
+ fun_l23_n88(x)
+ end
+end
+
+def fun_l22_n815(x)
+ if (x < 1)
+ fun_l23_n80(x)
+ else
+ fun_l23_n989(x)
+ end
+end
+
+def fun_l22_n816(x)
+ if (x < 1)
+ fun_l23_n65(x)
+ else
+ fun_l23_n46(x)
+ end
+end
+
+def fun_l22_n817(x)
+ if (x < 1)
+ fun_l23_n427(x)
+ else
+ fun_l23_n868(x)
+ end
+end
+
+def fun_l22_n818(x)
+ if (x < 1)
+ fun_l23_n900(x)
+ else
+ fun_l23_n213(x)
+ end
+end
+
+def fun_l22_n819(x)
+ if (x < 1)
+ fun_l23_n394(x)
+ else
+ fun_l23_n647(x)
+ end
+end
+
+def fun_l22_n820(x)
+ if (x < 1)
+ fun_l23_n981(x)
+ else
+ fun_l23_n530(x)
+ end
+end
+
+def fun_l22_n821(x)
+ if (x < 1)
+ fun_l23_n806(x)
+ else
+ fun_l23_n511(x)
+ end
+end
+
+def fun_l22_n822(x)
+ if (x < 1)
+ fun_l23_n141(x)
+ else
+ fun_l23_n91(x)
+ end
+end
+
+def fun_l22_n823(x)
+ if (x < 1)
+ fun_l23_n604(x)
+ else
+ fun_l23_n270(x)
+ end
+end
+
+def fun_l22_n824(x)
+ if (x < 1)
+ fun_l23_n347(x)
+ else
+ fun_l23_n937(x)
+ end
+end
+
+def fun_l22_n825(x)
+ if (x < 1)
+ fun_l23_n302(x)
+ else
+ fun_l23_n659(x)
+ end
+end
+
+def fun_l22_n826(x)
+ if (x < 1)
+ fun_l23_n386(x)
+ else
+ fun_l23_n174(x)
+ end
+end
+
+def fun_l22_n827(x)
+ if (x < 1)
+ fun_l23_n347(x)
+ else
+ fun_l23_n659(x)
+ end
+end
+
+def fun_l22_n828(x)
+ if (x < 1)
+ fun_l23_n647(x)
+ else
+ fun_l23_n648(x)
+ end
+end
+
+def fun_l22_n829(x)
+ if (x < 1)
+ fun_l23_n892(x)
+ else
+ fun_l23_n910(x)
+ end
+end
+
+def fun_l22_n830(x)
+ if (x < 1)
+ fun_l23_n274(x)
+ else
+ fun_l23_n739(x)
+ end
+end
+
+def fun_l22_n831(x)
+ if (x < 1)
+ fun_l23_n211(x)
+ else
+ fun_l23_n658(x)
+ end
+end
+
+def fun_l22_n832(x)
+ if (x < 1)
+ fun_l23_n584(x)
+ else
+ fun_l23_n163(x)
+ end
+end
+
+def fun_l22_n833(x)
+ if (x < 1)
+ fun_l23_n598(x)
+ else
+ fun_l23_n735(x)
+ end
+end
+
+def fun_l22_n834(x)
+ if (x < 1)
+ fun_l23_n934(x)
+ else
+ fun_l23_n579(x)
+ end
+end
+
+def fun_l22_n835(x)
+ if (x < 1)
+ fun_l23_n483(x)
+ else
+ fun_l23_n632(x)
+ end
+end
+
+def fun_l22_n836(x)
+ if (x < 1)
+ fun_l23_n329(x)
+ else
+ fun_l23_n799(x)
+ end
+end
+
+def fun_l22_n837(x)
+ if (x < 1)
+ fun_l23_n699(x)
+ else
+ fun_l23_n846(x)
+ end
+end
+
+def fun_l22_n838(x)
+ if (x < 1)
+ fun_l23_n40(x)
+ else
+ fun_l23_n715(x)
+ end
+end
+
+def fun_l22_n839(x)
+ if (x < 1)
+ fun_l23_n917(x)
+ else
+ fun_l23_n595(x)
+ end
+end
+
+def fun_l22_n840(x)
+ if (x < 1)
+ fun_l23_n171(x)
+ else
+ fun_l23_n204(x)
+ end
+end
+
+def fun_l22_n841(x)
+ if (x < 1)
+ fun_l23_n652(x)
+ else
+ fun_l23_n342(x)
+ end
+end
+
+def fun_l22_n842(x)
+ if (x < 1)
+ fun_l23_n853(x)
+ else
+ fun_l23_n981(x)
+ end
+end
+
+def fun_l22_n843(x)
+ if (x < 1)
+ fun_l23_n673(x)
+ else
+ fun_l23_n2(x)
+ end
+end
+
+def fun_l22_n844(x)
+ if (x < 1)
+ fun_l23_n799(x)
+ else
+ fun_l23_n654(x)
+ end
+end
+
+def fun_l22_n845(x)
+ if (x < 1)
+ fun_l23_n989(x)
+ else
+ fun_l23_n563(x)
+ end
+end
+
+def fun_l22_n846(x)
+ if (x < 1)
+ fun_l23_n415(x)
+ else
+ fun_l23_n245(x)
+ end
+end
+
+def fun_l22_n847(x)
+ if (x < 1)
+ fun_l23_n836(x)
+ else
+ fun_l23_n347(x)
+ end
+end
+
+def fun_l22_n848(x)
+ if (x < 1)
+ fun_l23_n493(x)
+ else
+ fun_l23_n712(x)
+ end
+end
+
+def fun_l22_n849(x)
+ if (x < 1)
+ fun_l23_n780(x)
+ else
+ fun_l23_n43(x)
+ end
+end
+
+def fun_l22_n850(x)
+ if (x < 1)
+ fun_l23_n511(x)
+ else
+ fun_l23_n356(x)
+ end
+end
+
+def fun_l22_n851(x)
+ if (x < 1)
+ fun_l23_n229(x)
+ else
+ fun_l23_n355(x)
+ end
+end
+
+def fun_l22_n852(x)
+ if (x < 1)
+ fun_l23_n50(x)
+ else
+ fun_l23_n908(x)
+ end
+end
+
+def fun_l22_n853(x)
+ if (x < 1)
+ fun_l23_n156(x)
+ else
+ fun_l23_n422(x)
+ end
+end
+
+def fun_l22_n854(x)
+ if (x < 1)
+ fun_l23_n448(x)
+ else
+ fun_l23_n763(x)
+ end
+end
+
+def fun_l22_n855(x)
+ if (x < 1)
+ fun_l23_n662(x)
+ else
+ fun_l23_n887(x)
+ end
+end
+
+def fun_l22_n856(x)
+ if (x < 1)
+ fun_l23_n511(x)
+ else
+ fun_l23_n292(x)
+ end
+end
+
+def fun_l22_n857(x)
+ if (x < 1)
+ fun_l23_n313(x)
+ else
+ fun_l23_n207(x)
+ end
+end
+
+def fun_l22_n858(x)
+ if (x < 1)
+ fun_l23_n544(x)
+ else
+ fun_l23_n488(x)
+ end
+end
+
+def fun_l22_n859(x)
+ if (x < 1)
+ fun_l23_n34(x)
+ else
+ fun_l23_n133(x)
+ end
+end
+
+def fun_l22_n860(x)
+ if (x < 1)
+ fun_l23_n739(x)
+ else
+ fun_l23_n127(x)
+ end
+end
+
+def fun_l22_n861(x)
+ if (x < 1)
+ fun_l23_n727(x)
+ else
+ fun_l23_n339(x)
+ end
+end
+
+def fun_l22_n862(x)
+ if (x < 1)
+ fun_l23_n78(x)
+ else
+ fun_l23_n101(x)
+ end
+end
+
+def fun_l22_n863(x)
+ if (x < 1)
+ fun_l23_n310(x)
+ else
+ fun_l23_n884(x)
+ end
+end
+
+def fun_l22_n864(x)
+ if (x < 1)
+ fun_l23_n97(x)
+ else
+ fun_l23_n716(x)
+ end
+end
+
+def fun_l22_n865(x)
+ if (x < 1)
+ fun_l23_n63(x)
+ else
+ fun_l23_n654(x)
+ end
+end
+
+def fun_l22_n866(x)
+ if (x < 1)
+ fun_l23_n336(x)
+ else
+ fun_l23_n334(x)
+ end
+end
+
+def fun_l22_n867(x)
+ if (x < 1)
+ fun_l23_n317(x)
+ else
+ fun_l23_n197(x)
+ end
+end
+
+def fun_l22_n868(x)
+ if (x < 1)
+ fun_l23_n98(x)
+ else
+ fun_l23_n466(x)
+ end
+end
+
+def fun_l22_n869(x)
+ if (x < 1)
+ fun_l23_n157(x)
+ else
+ fun_l23_n43(x)
+ end
+end
+
+def fun_l22_n870(x)
+ if (x < 1)
+ fun_l23_n347(x)
+ else
+ fun_l23_n961(x)
+ end
+end
+
+def fun_l22_n871(x)
+ if (x < 1)
+ fun_l23_n460(x)
+ else
+ fun_l23_n820(x)
+ end
+end
+
+def fun_l22_n872(x)
+ if (x < 1)
+ fun_l23_n216(x)
+ else
+ fun_l23_n419(x)
+ end
+end
+
+def fun_l22_n873(x)
+ if (x < 1)
+ fun_l23_n879(x)
+ else
+ fun_l23_n343(x)
+ end
+end
+
+def fun_l22_n874(x)
+ if (x < 1)
+ fun_l23_n507(x)
+ else
+ fun_l23_n572(x)
+ end
+end
+
+def fun_l22_n875(x)
+ if (x < 1)
+ fun_l23_n959(x)
+ else
+ fun_l23_n750(x)
+ end
+end
+
+def fun_l22_n876(x)
+ if (x < 1)
+ fun_l23_n718(x)
+ else
+ fun_l23_n406(x)
+ end
+end
+
+def fun_l22_n877(x)
+ if (x < 1)
+ fun_l23_n733(x)
+ else
+ fun_l23_n486(x)
+ end
+end
+
+def fun_l22_n878(x)
+ if (x < 1)
+ fun_l23_n95(x)
+ else
+ fun_l23_n842(x)
+ end
+end
+
+def fun_l22_n879(x)
+ if (x < 1)
+ fun_l23_n626(x)
+ else
+ fun_l23_n428(x)
+ end
+end
+
+def fun_l22_n880(x)
+ if (x < 1)
+ fun_l23_n194(x)
+ else
+ fun_l23_n441(x)
+ end
+end
+
+def fun_l22_n881(x)
+ if (x < 1)
+ fun_l23_n10(x)
+ else
+ fun_l23_n727(x)
+ end
+end
+
+def fun_l22_n882(x)
+ if (x < 1)
+ fun_l23_n173(x)
+ else
+ fun_l23_n301(x)
+ end
+end
+
+def fun_l22_n883(x)
+ if (x < 1)
+ fun_l23_n338(x)
+ else
+ fun_l23_n420(x)
+ end
+end
+
+def fun_l22_n884(x)
+ if (x < 1)
+ fun_l23_n615(x)
+ else
+ fun_l23_n923(x)
+ end
+end
+
+def fun_l22_n885(x)
+ if (x < 1)
+ fun_l23_n547(x)
+ else
+ fun_l23_n979(x)
+ end
+end
+
+def fun_l22_n886(x)
+ if (x < 1)
+ fun_l23_n28(x)
+ else
+ fun_l23_n213(x)
+ end
+end
+
+def fun_l22_n887(x)
+ if (x < 1)
+ fun_l23_n919(x)
+ else
+ fun_l23_n228(x)
+ end
+end
+
+def fun_l22_n888(x)
+ if (x < 1)
+ fun_l23_n264(x)
+ else
+ fun_l23_n156(x)
+ end
+end
+
+def fun_l22_n889(x)
+ if (x < 1)
+ fun_l23_n137(x)
+ else
+ fun_l23_n582(x)
+ end
+end
+
+def fun_l22_n890(x)
+ if (x < 1)
+ fun_l23_n468(x)
+ else
+ fun_l23_n409(x)
+ end
+end
+
+def fun_l22_n891(x)
+ if (x < 1)
+ fun_l23_n823(x)
+ else
+ fun_l23_n999(x)
+ end
+end
+
+def fun_l22_n892(x)
+ if (x < 1)
+ fun_l23_n248(x)
+ else
+ fun_l23_n821(x)
+ end
+end
+
+def fun_l22_n893(x)
+ if (x < 1)
+ fun_l23_n117(x)
+ else
+ fun_l23_n127(x)
+ end
+end
+
+def fun_l22_n894(x)
+ if (x < 1)
+ fun_l23_n622(x)
+ else
+ fun_l23_n737(x)
+ end
+end
+
+def fun_l22_n895(x)
+ if (x < 1)
+ fun_l23_n66(x)
+ else
+ fun_l23_n261(x)
+ end
+end
+
+def fun_l22_n896(x)
+ if (x < 1)
+ fun_l23_n245(x)
+ else
+ fun_l23_n18(x)
+ end
+end
+
+def fun_l22_n897(x)
+ if (x < 1)
+ fun_l23_n269(x)
+ else
+ fun_l23_n666(x)
+ end
+end
+
+def fun_l22_n898(x)
+ if (x < 1)
+ fun_l23_n807(x)
+ else
+ fun_l23_n449(x)
+ end
+end
+
+def fun_l22_n899(x)
+ if (x < 1)
+ fun_l23_n801(x)
+ else
+ fun_l23_n34(x)
+ end
+end
+
+def fun_l22_n900(x)
+ if (x < 1)
+ fun_l23_n17(x)
+ else
+ fun_l23_n117(x)
+ end
+end
+
+def fun_l22_n901(x)
+ if (x < 1)
+ fun_l23_n677(x)
+ else
+ fun_l23_n872(x)
+ end
+end
+
+def fun_l22_n902(x)
+ if (x < 1)
+ fun_l23_n221(x)
+ else
+ fun_l23_n685(x)
+ end
+end
+
+def fun_l22_n903(x)
+ if (x < 1)
+ fun_l23_n224(x)
+ else
+ fun_l23_n15(x)
+ end
+end
+
+def fun_l22_n904(x)
+ if (x < 1)
+ fun_l23_n353(x)
+ else
+ fun_l23_n367(x)
+ end
+end
+
+def fun_l22_n905(x)
+ if (x < 1)
+ fun_l23_n466(x)
+ else
+ fun_l23_n466(x)
+ end
+end
+
+def fun_l22_n906(x)
+ if (x < 1)
+ fun_l23_n674(x)
+ else
+ fun_l23_n521(x)
+ end
+end
+
+def fun_l22_n907(x)
+ if (x < 1)
+ fun_l23_n978(x)
+ else
+ fun_l23_n79(x)
+ end
+end
+
+def fun_l22_n908(x)
+ if (x < 1)
+ fun_l23_n976(x)
+ else
+ fun_l23_n513(x)
+ end
+end
+
+def fun_l22_n909(x)
+ if (x < 1)
+ fun_l23_n478(x)
+ else
+ fun_l23_n524(x)
+ end
+end
+
+def fun_l22_n910(x)
+ if (x < 1)
+ fun_l23_n744(x)
+ else
+ fun_l23_n451(x)
+ end
+end
+
+def fun_l22_n911(x)
+ if (x < 1)
+ fun_l23_n524(x)
+ else
+ fun_l23_n409(x)
+ end
+end
+
+def fun_l22_n912(x)
+ if (x < 1)
+ fun_l23_n651(x)
+ else
+ fun_l23_n424(x)
+ end
+end
+
+def fun_l22_n913(x)
+ if (x < 1)
+ fun_l23_n740(x)
+ else
+ fun_l23_n841(x)
+ end
+end
+
+def fun_l22_n914(x)
+ if (x < 1)
+ fun_l23_n388(x)
+ else
+ fun_l23_n790(x)
+ end
+end
+
+def fun_l22_n915(x)
+ if (x < 1)
+ fun_l23_n625(x)
+ else
+ fun_l23_n276(x)
+ end
+end
+
+def fun_l22_n916(x)
+ if (x < 1)
+ fun_l23_n322(x)
+ else
+ fun_l23_n598(x)
+ end
+end
+
+def fun_l22_n917(x)
+ if (x < 1)
+ fun_l23_n51(x)
+ else
+ fun_l23_n286(x)
+ end
+end
+
+def fun_l22_n918(x)
+ if (x < 1)
+ fun_l23_n265(x)
+ else
+ fun_l23_n553(x)
+ end
+end
+
+def fun_l22_n919(x)
+ if (x < 1)
+ fun_l23_n525(x)
+ else
+ fun_l23_n825(x)
+ end
+end
+
+def fun_l22_n920(x)
+ if (x < 1)
+ fun_l23_n59(x)
+ else
+ fun_l23_n643(x)
+ end
+end
+
+def fun_l22_n921(x)
+ if (x < 1)
+ fun_l23_n135(x)
+ else
+ fun_l23_n811(x)
+ end
+end
+
+def fun_l22_n922(x)
+ if (x < 1)
+ fun_l23_n587(x)
+ else
+ fun_l23_n564(x)
+ end
+end
+
+def fun_l22_n923(x)
+ if (x < 1)
+ fun_l23_n235(x)
+ else
+ fun_l23_n337(x)
+ end
+end
+
+def fun_l22_n924(x)
+ if (x < 1)
+ fun_l23_n99(x)
+ else
+ fun_l23_n805(x)
+ end
+end
+
+def fun_l22_n925(x)
+ if (x < 1)
+ fun_l23_n360(x)
+ else
+ fun_l23_n67(x)
+ end
+end
+
+def fun_l22_n926(x)
+ if (x < 1)
+ fun_l23_n438(x)
+ else
+ fun_l23_n948(x)
+ end
+end
+
+def fun_l22_n927(x)
+ if (x < 1)
+ fun_l23_n545(x)
+ else
+ fun_l23_n287(x)
+ end
+end
+
+def fun_l22_n928(x)
+ if (x < 1)
+ fun_l23_n632(x)
+ else
+ fun_l23_n769(x)
+ end
+end
+
+def fun_l22_n929(x)
+ if (x < 1)
+ fun_l23_n17(x)
+ else
+ fun_l23_n240(x)
+ end
+end
+
+def fun_l22_n930(x)
+ if (x < 1)
+ fun_l23_n948(x)
+ else
+ fun_l23_n690(x)
+ end
+end
+
+def fun_l22_n931(x)
+ if (x < 1)
+ fun_l23_n12(x)
+ else
+ fun_l23_n640(x)
+ end
+end
+
+def fun_l22_n932(x)
+ if (x < 1)
+ fun_l23_n157(x)
+ else
+ fun_l23_n594(x)
+ end
+end
+
+def fun_l22_n933(x)
+ if (x < 1)
+ fun_l23_n96(x)
+ else
+ fun_l23_n771(x)
+ end
+end
+
+def fun_l22_n934(x)
+ if (x < 1)
+ fun_l23_n237(x)
+ else
+ fun_l23_n910(x)
+ end
+end
+
+def fun_l22_n935(x)
+ if (x < 1)
+ fun_l23_n553(x)
+ else
+ fun_l23_n300(x)
+ end
+end
+
+def fun_l22_n936(x)
+ if (x < 1)
+ fun_l23_n224(x)
+ else
+ fun_l23_n566(x)
+ end
+end
+
+def fun_l22_n937(x)
+ if (x < 1)
+ fun_l23_n314(x)
+ else
+ fun_l23_n328(x)
+ end
+end
+
+def fun_l22_n938(x)
+ if (x < 1)
+ fun_l23_n775(x)
+ else
+ fun_l23_n72(x)
+ end
+end
+
+def fun_l22_n939(x)
+ if (x < 1)
+ fun_l23_n273(x)
+ else
+ fun_l23_n43(x)
+ end
+end
+
+def fun_l22_n940(x)
+ if (x < 1)
+ fun_l23_n215(x)
+ else
+ fun_l23_n646(x)
+ end
+end
+
+def fun_l22_n941(x)
+ if (x < 1)
+ fun_l23_n925(x)
+ else
+ fun_l23_n97(x)
+ end
+end
+
+def fun_l22_n942(x)
+ if (x < 1)
+ fun_l23_n391(x)
+ else
+ fun_l23_n972(x)
+ end
+end
+
+def fun_l22_n943(x)
+ if (x < 1)
+ fun_l23_n276(x)
+ else
+ fun_l23_n725(x)
+ end
+end
+
+def fun_l22_n944(x)
+ if (x < 1)
+ fun_l23_n928(x)
+ else
+ fun_l23_n94(x)
+ end
+end
+
+def fun_l22_n945(x)
+ if (x < 1)
+ fun_l23_n176(x)
+ else
+ fun_l23_n598(x)
+ end
+end
+
+def fun_l22_n946(x)
+ if (x < 1)
+ fun_l23_n530(x)
+ else
+ fun_l23_n37(x)
+ end
+end
+
+def fun_l22_n947(x)
+ if (x < 1)
+ fun_l23_n412(x)
+ else
+ fun_l23_n718(x)
+ end
+end
+
+def fun_l22_n948(x)
+ if (x < 1)
+ fun_l23_n905(x)
+ else
+ fun_l23_n723(x)
+ end
+end
+
+def fun_l22_n949(x)
+ if (x < 1)
+ fun_l23_n451(x)
+ else
+ fun_l23_n232(x)
+ end
+end
+
+def fun_l22_n950(x)
+ if (x < 1)
+ fun_l23_n312(x)
+ else
+ fun_l23_n556(x)
+ end
+end
+
+def fun_l22_n951(x)
+ if (x < 1)
+ fun_l23_n906(x)
+ else
+ fun_l23_n33(x)
+ end
+end
+
+def fun_l22_n952(x)
+ if (x < 1)
+ fun_l23_n964(x)
+ else
+ fun_l23_n46(x)
+ end
+end
+
+def fun_l22_n953(x)
+ if (x < 1)
+ fun_l23_n813(x)
+ else
+ fun_l23_n494(x)
+ end
+end
+
+def fun_l22_n954(x)
+ if (x < 1)
+ fun_l23_n725(x)
+ else
+ fun_l23_n705(x)
+ end
+end
+
+def fun_l22_n955(x)
+ if (x < 1)
+ fun_l23_n525(x)
+ else
+ fun_l23_n370(x)
+ end
+end
+
+def fun_l22_n956(x)
+ if (x < 1)
+ fun_l23_n266(x)
+ else
+ fun_l23_n872(x)
+ end
+end
+
+def fun_l22_n957(x)
+ if (x < 1)
+ fun_l23_n492(x)
+ else
+ fun_l23_n730(x)
+ end
+end
+
+def fun_l22_n958(x)
+ if (x < 1)
+ fun_l23_n950(x)
+ else
+ fun_l23_n557(x)
+ end
+end
+
+def fun_l22_n959(x)
+ if (x < 1)
+ fun_l23_n156(x)
+ else
+ fun_l23_n379(x)
+ end
+end
+
+def fun_l22_n960(x)
+ if (x < 1)
+ fun_l23_n270(x)
+ else
+ fun_l23_n486(x)
+ end
+end
+
+def fun_l22_n961(x)
+ if (x < 1)
+ fun_l23_n789(x)
+ else
+ fun_l23_n316(x)
+ end
+end
+
+def fun_l22_n962(x)
+ if (x < 1)
+ fun_l23_n425(x)
+ else
+ fun_l23_n470(x)
+ end
+end
+
+def fun_l22_n963(x)
+ if (x < 1)
+ fun_l23_n598(x)
+ else
+ fun_l23_n304(x)
+ end
+end
+
+def fun_l22_n964(x)
+ if (x < 1)
+ fun_l23_n249(x)
+ else
+ fun_l23_n517(x)
+ end
+end
+
+def fun_l22_n965(x)
+ if (x < 1)
+ fun_l23_n775(x)
+ else
+ fun_l23_n892(x)
+ end
+end
+
+def fun_l22_n966(x)
+ if (x < 1)
+ fun_l23_n771(x)
+ else
+ fun_l23_n879(x)
+ end
+end
+
+def fun_l22_n967(x)
+ if (x < 1)
+ fun_l23_n596(x)
+ else
+ fun_l23_n22(x)
+ end
+end
+
+def fun_l22_n968(x)
+ if (x < 1)
+ fun_l23_n722(x)
+ else
+ fun_l23_n203(x)
+ end
+end
+
+def fun_l22_n969(x)
+ if (x < 1)
+ fun_l23_n912(x)
+ else
+ fun_l23_n216(x)
+ end
+end
+
+def fun_l22_n970(x)
+ if (x < 1)
+ fun_l23_n230(x)
+ else
+ fun_l23_n295(x)
+ end
+end
+
+def fun_l22_n971(x)
+ if (x < 1)
+ fun_l23_n255(x)
+ else
+ fun_l23_n407(x)
+ end
+end
+
+def fun_l22_n972(x)
+ if (x < 1)
+ fun_l23_n673(x)
+ else
+ fun_l23_n940(x)
+ end
+end
+
+def fun_l22_n973(x)
+ if (x < 1)
+ fun_l23_n793(x)
+ else
+ fun_l23_n776(x)
+ end
+end
+
+def fun_l22_n974(x)
+ if (x < 1)
+ fun_l23_n812(x)
+ else
+ fun_l23_n653(x)
+ end
+end
+
+def fun_l22_n975(x)
+ if (x < 1)
+ fun_l23_n866(x)
+ else
+ fun_l23_n25(x)
+ end
+end
+
+def fun_l22_n976(x)
+ if (x < 1)
+ fun_l23_n143(x)
+ else
+ fun_l23_n236(x)
+ end
+end
+
+def fun_l22_n977(x)
+ if (x < 1)
+ fun_l23_n274(x)
+ else
+ fun_l23_n414(x)
+ end
+end
+
+def fun_l22_n978(x)
+ if (x < 1)
+ fun_l23_n281(x)
+ else
+ fun_l23_n946(x)
+ end
+end
+
+def fun_l22_n979(x)
+ if (x < 1)
+ fun_l23_n255(x)
+ else
+ fun_l23_n585(x)
+ end
+end
+
+def fun_l22_n980(x)
+ if (x < 1)
+ fun_l23_n269(x)
+ else
+ fun_l23_n182(x)
+ end
+end
+
+def fun_l22_n981(x)
+ if (x < 1)
+ fun_l23_n340(x)
+ else
+ fun_l23_n262(x)
+ end
+end
+
+def fun_l22_n982(x)
+ if (x < 1)
+ fun_l23_n713(x)
+ else
+ fun_l23_n247(x)
+ end
+end
+
+def fun_l22_n983(x)
+ if (x < 1)
+ fun_l23_n827(x)
+ else
+ fun_l23_n821(x)
+ end
+end
+
+def fun_l22_n984(x)
+ if (x < 1)
+ fun_l23_n628(x)
+ else
+ fun_l23_n243(x)
+ end
+end
+
+def fun_l22_n985(x)
+ if (x < 1)
+ fun_l23_n479(x)
+ else
+ fun_l23_n440(x)
+ end
+end
+
+def fun_l22_n986(x)
+ if (x < 1)
+ fun_l23_n451(x)
+ else
+ fun_l23_n299(x)
+ end
+end
+
+def fun_l22_n987(x)
+ if (x < 1)
+ fun_l23_n528(x)
+ else
+ fun_l23_n336(x)
+ end
+end
+
+def fun_l22_n988(x)
+ if (x < 1)
+ fun_l23_n825(x)
+ else
+ fun_l23_n767(x)
+ end
+end
+
+def fun_l22_n989(x)
+ if (x < 1)
+ fun_l23_n427(x)
+ else
+ fun_l23_n996(x)
+ end
+end
+
+def fun_l22_n990(x)
+ if (x < 1)
+ fun_l23_n175(x)
+ else
+ fun_l23_n888(x)
+ end
+end
+
+def fun_l22_n991(x)
+ if (x < 1)
+ fun_l23_n351(x)
+ else
+ fun_l23_n982(x)
+ end
+end
+
+def fun_l22_n992(x)
+ if (x < 1)
+ fun_l23_n235(x)
+ else
+ fun_l23_n91(x)
+ end
+end
+
+def fun_l22_n993(x)
+ if (x < 1)
+ fun_l23_n966(x)
+ else
+ fun_l23_n520(x)
+ end
+end
+
+def fun_l22_n994(x)
+ if (x < 1)
+ fun_l23_n854(x)
+ else
+ fun_l23_n937(x)
+ end
+end
+
+def fun_l22_n995(x)
+ if (x < 1)
+ fun_l23_n922(x)
+ else
+ fun_l23_n176(x)
+ end
+end
+
+def fun_l22_n996(x)
+ if (x < 1)
+ fun_l23_n925(x)
+ else
+ fun_l23_n271(x)
+ end
+end
+
+def fun_l22_n997(x)
+ if (x < 1)
+ fun_l23_n513(x)
+ else
+ fun_l23_n195(x)
+ end
+end
+
+def fun_l22_n998(x)
+ if (x < 1)
+ fun_l23_n135(x)
+ else
+ fun_l23_n834(x)
+ end
+end
+
+def fun_l22_n999(x)
+ if (x < 1)
+ fun_l23_n664(x)
+ else
+ fun_l23_n861(x)
+ end
+end
+
+def fun_l23_n0(x)
+ if (x < 1)
+ fun_l24_n327(x)
+ else
+ fun_l24_n159(x)
+ end
+end
+
+def fun_l23_n1(x)
+ if (x < 1)
+ fun_l24_n433(x)
+ else
+ fun_l24_n862(x)
+ end
+end
+
+def fun_l23_n2(x)
+ if (x < 1)
+ fun_l24_n56(x)
+ else
+ fun_l24_n651(x)
+ end
+end
+
+def fun_l23_n3(x)
+ if (x < 1)
+ fun_l24_n267(x)
+ else
+ fun_l24_n566(x)
+ end
+end
+
+def fun_l23_n4(x)
+ if (x < 1)
+ fun_l24_n880(x)
+ else
+ fun_l24_n886(x)
+ end
+end
+
+def fun_l23_n5(x)
+ if (x < 1)
+ fun_l24_n66(x)
+ else
+ fun_l24_n894(x)
+ end
+end
+
+def fun_l23_n6(x)
+ if (x < 1)
+ fun_l24_n965(x)
+ else
+ fun_l24_n453(x)
+ end
+end
+
+def fun_l23_n7(x)
+ if (x < 1)
+ fun_l24_n250(x)
+ else
+ fun_l24_n42(x)
+ end
+end
+
+def fun_l23_n8(x)
+ if (x < 1)
+ fun_l24_n376(x)
+ else
+ fun_l24_n736(x)
+ end
+end
+
+def fun_l23_n9(x)
+ if (x < 1)
+ fun_l24_n434(x)
+ else
+ fun_l24_n334(x)
+ end
+end
+
+def fun_l23_n10(x)
+ if (x < 1)
+ fun_l24_n944(x)
+ else
+ fun_l24_n70(x)
+ end
+end
+
+def fun_l23_n11(x)
+ if (x < 1)
+ fun_l24_n38(x)
+ else
+ fun_l24_n532(x)
+ end
+end
+
+def fun_l23_n12(x)
+ if (x < 1)
+ fun_l24_n603(x)
+ else
+ fun_l24_n682(x)
+ end
+end
+
+def fun_l23_n13(x)
+ if (x < 1)
+ fun_l24_n716(x)
+ else
+ fun_l24_n754(x)
+ end
+end
+
+def fun_l23_n14(x)
+ if (x < 1)
+ fun_l24_n578(x)
+ else
+ fun_l24_n727(x)
+ end
+end
+
+def fun_l23_n15(x)
+ if (x < 1)
+ fun_l24_n166(x)
+ else
+ fun_l24_n224(x)
+ end
+end
+
+def fun_l23_n16(x)
+ if (x < 1)
+ fun_l24_n755(x)
+ else
+ fun_l24_n548(x)
+ end
+end
+
+def fun_l23_n17(x)
+ if (x < 1)
+ fun_l24_n355(x)
+ else
+ fun_l24_n625(x)
+ end
+end
+
+def fun_l23_n18(x)
+ if (x < 1)
+ fun_l24_n400(x)
+ else
+ fun_l24_n834(x)
+ end
+end
+
+def fun_l23_n19(x)
+ if (x < 1)
+ fun_l24_n188(x)
+ else
+ fun_l24_n305(x)
+ end
+end
+
+def fun_l23_n20(x)
+ if (x < 1)
+ fun_l24_n392(x)
+ else
+ fun_l24_n466(x)
+ end
+end
+
+def fun_l23_n21(x)
+ if (x < 1)
+ fun_l24_n937(x)
+ else
+ fun_l24_n603(x)
+ end
+end
+
+def fun_l23_n22(x)
+ if (x < 1)
+ fun_l24_n767(x)
+ else
+ fun_l24_n750(x)
+ end
+end
+
+def fun_l23_n23(x)
+ if (x < 1)
+ fun_l24_n888(x)
+ else
+ fun_l24_n472(x)
+ end
+end
+
+def fun_l23_n24(x)
+ if (x < 1)
+ fun_l24_n937(x)
+ else
+ fun_l24_n192(x)
+ end
+end
+
+def fun_l23_n25(x)
+ if (x < 1)
+ fun_l24_n704(x)
+ else
+ fun_l24_n839(x)
+ end
+end
+
+def fun_l23_n26(x)
+ if (x < 1)
+ fun_l24_n758(x)
+ else
+ fun_l24_n579(x)
+ end
+end
+
+def fun_l23_n27(x)
+ if (x < 1)
+ fun_l24_n161(x)
+ else
+ fun_l24_n268(x)
+ end
+end
+
+def fun_l23_n28(x)
+ if (x < 1)
+ fun_l24_n628(x)
+ else
+ fun_l24_n413(x)
+ end
+end
+
+def fun_l23_n29(x)
+ if (x < 1)
+ fun_l24_n954(x)
+ else
+ fun_l24_n962(x)
+ end
+end
+
+def fun_l23_n30(x)
+ if (x < 1)
+ fun_l24_n723(x)
+ else
+ fun_l24_n220(x)
+ end
+end
+
+def fun_l23_n31(x)
+ if (x < 1)
+ fun_l24_n841(x)
+ else
+ fun_l24_n331(x)
+ end
+end
+
+def fun_l23_n32(x)
+ if (x < 1)
+ fun_l24_n42(x)
+ else
+ fun_l24_n331(x)
+ end
+end
+
+def fun_l23_n33(x)
+ if (x < 1)
+ fun_l24_n873(x)
+ else
+ fun_l24_n58(x)
+ end
+end
+
+def fun_l23_n34(x)
+ if (x < 1)
+ fun_l24_n586(x)
+ else
+ fun_l24_n981(x)
+ end
+end
+
+def fun_l23_n35(x)
+ if (x < 1)
+ fun_l24_n455(x)
+ else
+ fun_l24_n279(x)
+ end
+end
+
+def fun_l23_n36(x)
+ if (x < 1)
+ fun_l24_n401(x)
+ else
+ fun_l24_n633(x)
+ end
+end
+
+def fun_l23_n37(x)
+ if (x < 1)
+ fun_l24_n432(x)
+ else
+ fun_l24_n389(x)
+ end
+end
+
+def fun_l23_n38(x)
+ if (x < 1)
+ fun_l24_n46(x)
+ else
+ fun_l24_n426(x)
+ end
+end
+
+def fun_l23_n39(x)
+ if (x < 1)
+ fun_l24_n679(x)
+ else
+ fun_l24_n222(x)
+ end
+end
+
+def fun_l23_n40(x)
+ if (x < 1)
+ fun_l24_n129(x)
+ else
+ fun_l24_n2(x)
+ end
+end
+
+def fun_l23_n41(x)
+ if (x < 1)
+ fun_l24_n228(x)
+ else
+ fun_l24_n386(x)
+ end
+end
+
+def fun_l23_n42(x)
+ if (x < 1)
+ fun_l24_n740(x)
+ else
+ fun_l24_n605(x)
+ end
+end
+
+def fun_l23_n43(x)
+ if (x < 1)
+ fun_l24_n686(x)
+ else
+ fun_l24_n755(x)
+ end
+end
+
+def fun_l23_n44(x)
+ if (x < 1)
+ fun_l24_n569(x)
+ else
+ fun_l24_n553(x)
+ end
+end
+
+def fun_l23_n45(x)
+ if (x < 1)
+ fun_l24_n908(x)
+ else
+ fun_l24_n388(x)
+ end
+end
+
+def fun_l23_n46(x)
+ if (x < 1)
+ fun_l24_n106(x)
+ else
+ fun_l24_n335(x)
+ end
+end
+
+def fun_l23_n47(x)
+ if (x < 1)
+ fun_l24_n876(x)
+ else
+ fun_l24_n813(x)
+ end
+end
+
+def fun_l23_n48(x)
+ if (x < 1)
+ fun_l24_n337(x)
+ else
+ fun_l24_n967(x)
+ end
+end
+
+def fun_l23_n49(x)
+ if (x < 1)
+ fun_l24_n309(x)
+ else
+ fun_l24_n988(x)
+ end
+end
+
+def fun_l23_n50(x)
+ if (x < 1)
+ fun_l24_n325(x)
+ else
+ fun_l24_n703(x)
+ end
+end
+
+def fun_l23_n51(x)
+ if (x < 1)
+ fun_l24_n755(x)
+ else
+ fun_l24_n146(x)
+ end
+end
+
+def fun_l23_n52(x)
+ if (x < 1)
+ fun_l24_n597(x)
+ else
+ fun_l24_n764(x)
+ end
+end
+
+def fun_l23_n53(x)
+ if (x < 1)
+ fun_l24_n259(x)
+ else
+ fun_l24_n9(x)
+ end
+end
+
+def fun_l23_n54(x)
+ if (x < 1)
+ fun_l24_n73(x)
+ else
+ fun_l24_n700(x)
+ end
+end
+
+def fun_l23_n55(x)
+ if (x < 1)
+ fun_l24_n369(x)
+ else
+ fun_l24_n632(x)
+ end
+end
+
+def fun_l23_n56(x)
+ if (x < 1)
+ fun_l24_n475(x)
+ else
+ fun_l24_n553(x)
+ end
+end
+
+def fun_l23_n57(x)
+ if (x < 1)
+ fun_l24_n473(x)
+ else
+ fun_l24_n84(x)
+ end
+end
+
+def fun_l23_n58(x)
+ if (x < 1)
+ fun_l24_n837(x)
+ else
+ fun_l24_n164(x)
+ end
+end
+
+def fun_l23_n59(x)
+ if (x < 1)
+ fun_l24_n129(x)
+ else
+ fun_l24_n993(x)
+ end
+end
+
+def fun_l23_n60(x)
+ if (x < 1)
+ fun_l24_n201(x)
+ else
+ fun_l24_n644(x)
+ end
+end
+
+def fun_l23_n61(x)
+ if (x < 1)
+ fun_l24_n825(x)
+ else
+ fun_l24_n513(x)
+ end
+end
+
+def fun_l23_n62(x)
+ if (x < 1)
+ fun_l24_n162(x)
+ else
+ fun_l24_n575(x)
+ end
+end
+
+def fun_l23_n63(x)
+ if (x < 1)
+ fun_l24_n959(x)
+ else
+ fun_l24_n514(x)
+ end
+end
+
+def fun_l23_n64(x)
+ if (x < 1)
+ fun_l24_n133(x)
+ else
+ fun_l24_n731(x)
+ end
+end
+
+def fun_l23_n65(x)
+ if (x < 1)
+ fun_l24_n370(x)
+ else
+ fun_l24_n903(x)
+ end
+end
+
+def fun_l23_n66(x)
+ if (x < 1)
+ fun_l24_n787(x)
+ else
+ fun_l24_n11(x)
+ end
+end
+
+def fun_l23_n67(x)
+ if (x < 1)
+ fun_l24_n307(x)
+ else
+ fun_l24_n7(x)
+ end
+end
+
+def fun_l23_n68(x)
+ if (x < 1)
+ fun_l24_n157(x)
+ else
+ fun_l24_n747(x)
+ end
+end
+
+def fun_l23_n69(x)
+ if (x < 1)
+ fun_l24_n435(x)
+ else
+ fun_l24_n763(x)
+ end
+end
+
+def fun_l23_n70(x)
+ if (x < 1)
+ fun_l24_n623(x)
+ else
+ fun_l24_n279(x)
+ end
+end
+
+def fun_l23_n71(x)
+ if (x < 1)
+ fun_l24_n456(x)
+ else
+ fun_l24_n465(x)
+ end
+end
+
+def fun_l23_n72(x)
+ if (x < 1)
+ fun_l24_n411(x)
+ else
+ fun_l24_n397(x)
+ end
+end
+
+def fun_l23_n73(x)
+ if (x < 1)
+ fun_l24_n964(x)
+ else
+ fun_l24_n144(x)
+ end
+end
+
+def fun_l23_n74(x)
+ if (x < 1)
+ fun_l24_n170(x)
+ else
+ fun_l24_n406(x)
+ end
+end
+
+def fun_l23_n75(x)
+ if (x < 1)
+ fun_l24_n838(x)
+ else
+ fun_l24_n295(x)
+ end
+end
+
+def fun_l23_n76(x)
+ if (x < 1)
+ fun_l24_n89(x)
+ else
+ fun_l24_n803(x)
+ end
+end
+
+def fun_l23_n77(x)
+ if (x < 1)
+ fun_l24_n580(x)
+ else
+ fun_l24_n931(x)
+ end
+end
+
+def fun_l23_n78(x)
+ if (x < 1)
+ fun_l24_n504(x)
+ else
+ fun_l24_n150(x)
+ end
+end
+
+def fun_l23_n79(x)
+ if (x < 1)
+ fun_l24_n363(x)
+ else
+ fun_l24_n717(x)
+ end
+end
+
+def fun_l23_n80(x)
+ if (x < 1)
+ fun_l24_n765(x)
+ else
+ fun_l24_n917(x)
+ end
+end
+
+def fun_l23_n81(x)
+ if (x < 1)
+ fun_l24_n673(x)
+ else
+ fun_l24_n549(x)
+ end
+end
+
+def fun_l23_n82(x)
+ if (x < 1)
+ fun_l24_n986(x)
+ else
+ fun_l24_n177(x)
+ end
+end
+
+def fun_l23_n83(x)
+ if (x < 1)
+ fun_l24_n821(x)
+ else
+ fun_l24_n302(x)
+ end
+end
+
+def fun_l23_n84(x)
+ if (x < 1)
+ fun_l24_n530(x)
+ else
+ fun_l24_n744(x)
+ end
+end
+
+def fun_l23_n85(x)
+ if (x < 1)
+ fun_l24_n456(x)
+ else
+ fun_l24_n964(x)
+ end
+end
+
+def fun_l23_n86(x)
+ if (x < 1)
+ fun_l24_n901(x)
+ else
+ fun_l24_n214(x)
+ end
+end
+
+def fun_l23_n87(x)
+ if (x < 1)
+ fun_l24_n308(x)
+ else
+ fun_l24_n329(x)
+ end
+end
+
+def fun_l23_n88(x)
+ if (x < 1)
+ fun_l24_n749(x)
+ else
+ fun_l24_n822(x)
+ end
+end
+
+def fun_l23_n89(x)
+ if (x < 1)
+ fun_l24_n283(x)
+ else
+ fun_l24_n865(x)
+ end
+end
+
+def fun_l23_n90(x)
+ if (x < 1)
+ fun_l24_n834(x)
+ else
+ fun_l24_n422(x)
+ end
+end
+
+def fun_l23_n91(x)
+ if (x < 1)
+ fun_l24_n920(x)
+ else
+ fun_l24_n799(x)
+ end
+end
+
+def fun_l23_n92(x)
+ if (x < 1)
+ fun_l24_n272(x)
+ else
+ fun_l24_n846(x)
+ end
+end
+
+def fun_l23_n93(x)
+ if (x < 1)
+ fun_l24_n447(x)
+ else
+ fun_l24_n809(x)
+ end
+end
+
+def fun_l23_n94(x)
+ if (x < 1)
+ fun_l24_n826(x)
+ else
+ fun_l24_n521(x)
+ end
+end
+
+def fun_l23_n95(x)
+ if (x < 1)
+ fun_l24_n934(x)
+ else
+ fun_l24_n774(x)
+ end
+end
+
+def fun_l23_n96(x)
+ if (x < 1)
+ fun_l24_n440(x)
+ else
+ fun_l24_n40(x)
+ end
+end
+
+def fun_l23_n97(x)
+ if (x < 1)
+ fun_l24_n980(x)
+ else
+ fun_l24_n801(x)
+ end
+end
+
+def fun_l23_n98(x)
+ if (x < 1)
+ fun_l24_n344(x)
+ else
+ fun_l24_n239(x)
+ end
+end
+
+def fun_l23_n99(x)
+ if (x < 1)
+ fun_l24_n918(x)
+ else
+ fun_l24_n241(x)
+ end
+end
+
+def fun_l23_n100(x)
+ if (x < 1)
+ fun_l24_n902(x)
+ else
+ fun_l24_n12(x)
+ end
+end
+
+def fun_l23_n101(x)
+ if (x < 1)
+ fun_l24_n533(x)
+ else
+ fun_l24_n510(x)
+ end
+end
+
+def fun_l23_n102(x)
+ if (x < 1)
+ fun_l24_n337(x)
+ else
+ fun_l24_n144(x)
+ end
+end
+
+def fun_l23_n103(x)
+ if (x < 1)
+ fun_l24_n835(x)
+ else
+ fun_l24_n268(x)
+ end
+end
+
+def fun_l23_n104(x)
+ if (x < 1)
+ fun_l24_n352(x)
+ else
+ fun_l24_n772(x)
+ end
+end
+
+def fun_l23_n105(x)
+ if (x < 1)
+ fun_l24_n135(x)
+ else
+ fun_l24_n97(x)
+ end
+end
+
+def fun_l23_n106(x)
+ if (x < 1)
+ fun_l24_n70(x)
+ else
+ fun_l24_n528(x)
+ end
+end
+
+def fun_l23_n107(x)
+ if (x < 1)
+ fun_l24_n945(x)
+ else
+ fun_l24_n85(x)
+ end
+end
+
+def fun_l23_n108(x)
+ if (x < 1)
+ fun_l24_n233(x)
+ else
+ fun_l24_n637(x)
+ end
+end
+
+def fun_l23_n109(x)
+ if (x < 1)
+ fun_l24_n715(x)
+ else
+ fun_l24_n111(x)
+ end
+end
+
+def fun_l23_n110(x)
+ if (x < 1)
+ fun_l24_n673(x)
+ else
+ fun_l24_n423(x)
+ end
+end
+
+def fun_l23_n111(x)
+ if (x < 1)
+ fun_l24_n408(x)
+ else
+ fun_l24_n5(x)
+ end
+end
+
+def fun_l23_n112(x)
+ if (x < 1)
+ fun_l24_n89(x)
+ else
+ fun_l24_n669(x)
+ end
+end
+
+def fun_l23_n113(x)
+ if (x < 1)
+ fun_l24_n733(x)
+ else
+ fun_l24_n76(x)
+ end
+end
+
+def fun_l23_n114(x)
+ if (x < 1)
+ fun_l24_n767(x)
+ else
+ fun_l24_n465(x)
+ end
+end
+
+def fun_l23_n115(x)
+ if (x < 1)
+ fun_l24_n428(x)
+ else
+ fun_l24_n948(x)
+ end
+end
+
+def fun_l23_n116(x)
+ if (x < 1)
+ fun_l24_n412(x)
+ else
+ fun_l24_n355(x)
+ end
+end
+
+def fun_l23_n117(x)
+ if (x < 1)
+ fun_l24_n550(x)
+ else
+ fun_l24_n616(x)
+ end
+end
+
+def fun_l23_n118(x)
+ if (x < 1)
+ fun_l24_n858(x)
+ else
+ fun_l24_n74(x)
+ end
+end
+
+def fun_l23_n119(x)
+ if (x < 1)
+ fun_l24_n709(x)
+ else
+ fun_l24_n939(x)
+ end
+end
+
+def fun_l23_n120(x)
+ if (x < 1)
+ fun_l24_n712(x)
+ else
+ fun_l24_n74(x)
+ end
+end
+
+def fun_l23_n121(x)
+ if (x < 1)
+ fun_l24_n34(x)
+ else
+ fun_l24_n532(x)
+ end
+end
+
+def fun_l23_n122(x)
+ if (x < 1)
+ fun_l24_n998(x)
+ else
+ fun_l24_n736(x)
+ end
+end
+
+def fun_l23_n123(x)
+ if (x < 1)
+ fun_l24_n33(x)
+ else
+ fun_l24_n561(x)
+ end
+end
+
+def fun_l23_n124(x)
+ if (x < 1)
+ fun_l24_n750(x)
+ else
+ fun_l24_n634(x)
+ end
+end
+
+def fun_l23_n125(x)
+ if (x < 1)
+ fun_l24_n935(x)
+ else
+ fun_l24_n29(x)
+ end
+end
+
+def fun_l23_n126(x)
+ if (x < 1)
+ fun_l24_n249(x)
+ else
+ fun_l24_n571(x)
+ end
+end
+
+def fun_l23_n127(x)
+ if (x < 1)
+ fun_l24_n827(x)
+ else
+ fun_l24_n892(x)
+ end
+end
+
+def fun_l23_n128(x)
+ if (x < 1)
+ fun_l24_n903(x)
+ else
+ fun_l24_n171(x)
+ end
+end
+
+def fun_l23_n129(x)
+ if (x < 1)
+ fun_l24_n725(x)
+ else
+ fun_l24_n358(x)
+ end
+end
+
+def fun_l23_n130(x)
+ if (x < 1)
+ fun_l24_n616(x)
+ else
+ fun_l24_n795(x)
+ end
+end
+
+def fun_l23_n131(x)
+ if (x < 1)
+ fun_l24_n942(x)
+ else
+ fun_l24_n574(x)
+ end
+end
+
+def fun_l23_n132(x)
+ if (x < 1)
+ fun_l24_n290(x)
+ else
+ fun_l24_n869(x)
+ end
+end
+
+def fun_l23_n133(x)
+ if (x < 1)
+ fun_l24_n73(x)
+ else
+ fun_l24_n542(x)
+ end
+end
+
+def fun_l23_n134(x)
+ if (x < 1)
+ fun_l24_n730(x)
+ else
+ fun_l24_n857(x)
+ end
+end
+
+def fun_l23_n135(x)
+ if (x < 1)
+ fun_l24_n754(x)
+ else
+ fun_l24_n579(x)
+ end
+end
+
+def fun_l23_n136(x)
+ if (x < 1)
+ fun_l24_n503(x)
+ else
+ fun_l24_n574(x)
+ end
+end
+
+def fun_l23_n137(x)
+ if (x < 1)
+ fun_l24_n682(x)
+ else
+ fun_l24_n630(x)
+ end
+end
+
+def fun_l23_n138(x)
+ if (x < 1)
+ fun_l24_n918(x)
+ else
+ fun_l24_n440(x)
+ end
+end
+
+def fun_l23_n139(x)
+ if (x < 1)
+ fun_l24_n938(x)
+ else
+ fun_l24_n524(x)
+ end
+end
+
+def fun_l23_n140(x)
+ if (x < 1)
+ fun_l24_n966(x)
+ else
+ fun_l24_n921(x)
+ end
+end
+
+def fun_l23_n141(x)
+ if (x < 1)
+ fun_l24_n87(x)
+ else
+ fun_l24_n548(x)
+ end
+end
+
+def fun_l23_n142(x)
+ if (x < 1)
+ fun_l24_n828(x)
+ else
+ fun_l24_n708(x)
+ end
+end
+
+def fun_l23_n143(x)
+ if (x < 1)
+ fun_l24_n655(x)
+ else
+ fun_l24_n322(x)
+ end
+end
+
+def fun_l23_n144(x)
+ if (x < 1)
+ fun_l24_n382(x)
+ else
+ fun_l24_n484(x)
+ end
+end
+
+def fun_l23_n145(x)
+ if (x < 1)
+ fun_l24_n830(x)
+ else
+ fun_l24_n755(x)
+ end
+end
+
+def fun_l23_n146(x)
+ if (x < 1)
+ fun_l24_n432(x)
+ else
+ fun_l24_n487(x)
+ end
+end
+
+def fun_l23_n147(x)
+ if (x < 1)
+ fun_l24_n954(x)
+ else
+ fun_l24_n453(x)
+ end
+end
+
+def fun_l23_n148(x)
+ if (x < 1)
+ fun_l24_n562(x)
+ else
+ fun_l24_n872(x)
+ end
+end
+
+def fun_l23_n149(x)
+ if (x < 1)
+ fun_l24_n929(x)
+ else
+ fun_l24_n212(x)
+ end
+end
+
+def fun_l23_n150(x)
+ if (x < 1)
+ fun_l24_n143(x)
+ else
+ fun_l24_n344(x)
+ end
+end
+
+def fun_l23_n151(x)
+ if (x < 1)
+ fun_l24_n475(x)
+ else
+ fun_l24_n379(x)
+ end
+end
+
+def fun_l23_n152(x)
+ if (x < 1)
+ fun_l24_n160(x)
+ else
+ fun_l24_n774(x)
+ end
+end
+
+def fun_l23_n153(x)
+ if (x < 1)
+ fun_l24_n689(x)
+ else
+ fun_l24_n19(x)
+ end
+end
+
+def fun_l23_n154(x)
+ if (x < 1)
+ fun_l24_n98(x)
+ else
+ fun_l24_n572(x)
+ end
+end
+
+def fun_l23_n155(x)
+ if (x < 1)
+ fun_l24_n104(x)
+ else
+ fun_l24_n797(x)
+ end
+end
+
+def fun_l23_n156(x)
+ if (x < 1)
+ fun_l24_n892(x)
+ else
+ fun_l24_n874(x)
+ end
+end
+
+def fun_l23_n157(x)
+ if (x < 1)
+ fun_l24_n900(x)
+ else
+ fun_l24_n458(x)
+ end
+end
+
+def fun_l23_n158(x)
+ if (x < 1)
+ fun_l24_n50(x)
+ else
+ fun_l24_n912(x)
+ end
+end
+
+def fun_l23_n159(x)
+ if (x < 1)
+ fun_l24_n303(x)
+ else
+ fun_l24_n373(x)
+ end
+end
+
+def fun_l23_n160(x)
+ if (x < 1)
+ fun_l24_n137(x)
+ else
+ fun_l24_n102(x)
+ end
+end
+
+def fun_l23_n161(x)
+ if (x < 1)
+ fun_l24_n263(x)
+ else
+ fun_l24_n818(x)
+ end
+end
+
+def fun_l23_n162(x)
+ if (x < 1)
+ fun_l24_n618(x)
+ else
+ fun_l24_n895(x)
+ end
+end
+
+def fun_l23_n163(x)
+ if (x < 1)
+ fun_l24_n845(x)
+ else
+ fun_l24_n26(x)
+ end
+end
+
+def fun_l23_n164(x)
+ if (x < 1)
+ fun_l24_n941(x)
+ else
+ fun_l24_n242(x)
+ end
+end
+
+def fun_l23_n165(x)
+ if (x < 1)
+ fun_l24_n145(x)
+ else
+ fun_l24_n492(x)
+ end
+end
+
+def fun_l23_n166(x)
+ if (x < 1)
+ fun_l24_n261(x)
+ else
+ fun_l24_n235(x)
+ end
+end
+
+def fun_l23_n167(x)
+ if (x < 1)
+ fun_l24_n941(x)
+ else
+ fun_l24_n618(x)
+ end
+end
+
+def fun_l23_n168(x)
+ if (x < 1)
+ fun_l24_n709(x)
+ else
+ fun_l24_n908(x)
+ end
+end
+
+def fun_l23_n169(x)
+ if (x < 1)
+ fun_l24_n746(x)
+ else
+ fun_l24_n116(x)
+ end
+end
+
+def fun_l23_n170(x)
+ if (x < 1)
+ fun_l24_n911(x)
+ else
+ fun_l24_n599(x)
+ end
+end
+
+def fun_l23_n171(x)
+ if (x < 1)
+ fun_l24_n526(x)
+ else
+ fun_l24_n275(x)
+ end
+end
+
+def fun_l23_n172(x)
+ if (x < 1)
+ fun_l24_n919(x)
+ else
+ fun_l24_n525(x)
+ end
+end
+
+def fun_l23_n173(x)
+ if (x < 1)
+ fun_l24_n945(x)
+ else
+ fun_l24_n894(x)
+ end
+end
+
+def fun_l23_n174(x)
+ if (x < 1)
+ fun_l24_n349(x)
+ else
+ fun_l24_n434(x)
+ end
+end
+
+def fun_l23_n175(x)
+ if (x < 1)
+ fun_l24_n498(x)
+ else
+ fun_l24_n679(x)
+ end
+end
+
+def fun_l23_n176(x)
+ if (x < 1)
+ fun_l24_n867(x)
+ else
+ fun_l24_n177(x)
+ end
+end
+
+def fun_l23_n177(x)
+ if (x < 1)
+ fun_l24_n680(x)
+ else
+ fun_l24_n601(x)
+ end
+end
+
+def fun_l23_n178(x)
+ if (x < 1)
+ fun_l24_n838(x)
+ else
+ fun_l24_n5(x)
+ end
+end
+
+def fun_l23_n179(x)
+ if (x < 1)
+ fun_l24_n418(x)
+ else
+ fun_l24_n780(x)
+ end
+end
+
+def fun_l23_n180(x)
+ if (x < 1)
+ fun_l24_n88(x)
+ else
+ fun_l24_n333(x)
+ end
+end
+
+def fun_l23_n181(x)
+ if (x < 1)
+ fun_l24_n657(x)
+ else
+ fun_l24_n787(x)
+ end
+end
+
+def fun_l23_n182(x)
+ if (x < 1)
+ fun_l24_n767(x)
+ else
+ fun_l24_n903(x)
+ end
+end
+
+def fun_l23_n183(x)
+ if (x < 1)
+ fun_l24_n878(x)
+ else
+ fun_l24_n426(x)
+ end
+end
+
+def fun_l23_n184(x)
+ if (x < 1)
+ fun_l24_n649(x)
+ else
+ fun_l24_n221(x)
+ end
+end
+
+def fun_l23_n185(x)
+ if (x < 1)
+ fun_l24_n315(x)
+ else
+ fun_l24_n955(x)
+ end
+end
+
+def fun_l23_n186(x)
+ if (x < 1)
+ fun_l24_n599(x)
+ else
+ fun_l24_n201(x)
+ end
+end
+
+def fun_l23_n187(x)
+ if (x < 1)
+ fun_l24_n851(x)
+ else
+ fun_l24_n294(x)
+ end
+end
+
+def fun_l23_n188(x)
+ if (x < 1)
+ fun_l24_n585(x)
+ else
+ fun_l24_n139(x)
+ end
+end
+
+def fun_l23_n189(x)
+ if (x < 1)
+ fun_l24_n893(x)
+ else
+ fun_l24_n159(x)
+ end
+end
+
+def fun_l23_n190(x)
+ if (x < 1)
+ fun_l24_n70(x)
+ else
+ fun_l24_n50(x)
+ end
+end
+
+def fun_l23_n191(x)
+ if (x < 1)
+ fun_l24_n111(x)
+ else
+ fun_l24_n967(x)
+ end
+end
+
+def fun_l23_n192(x)
+ if (x < 1)
+ fun_l24_n979(x)
+ else
+ fun_l24_n91(x)
+ end
+end
+
+def fun_l23_n193(x)
+ if (x < 1)
+ fun_l24_n651(x)
+ else
+ fun_l24_n321(x)
+ end
+end
+
+def fun_l23_n194(x)
+ if (x < 1)
+ fun_l24_n236(x)
+ else
+ fun_l24_n251(x)
+ end
+end
+
+def fun_l23_n195(x)
+ if (x < 1)
+ fun_l24_n947(x)
+ else
+ fun_l24_n116(x)
+ end
+end
+
+def fun_l23_n196(x)
+ if (x < 1)
+ fun_l24_n336(x)
+ else
+ fun_l24_n637(x)
+ end
+end
+
+def fun_l23_n197(x)
+ if (x < 1)
+ fun_l24_n192(x)
+ else
+ fun_l24_n824(x)
+ end
+end
+
+def fun_l23_n198(x)
+ if (x < 1)
+ fun_l24_n747(x)
+ else
+ fun_l24_n610(x)
+ end
+end
+
+def fun_l23_n199(x)
+ if (x < 1)
+ fun_l24_n735(x)
+ else
+ fun_l24_n347(x)
+ end
+end
+
+def fun_l23_n200(x)
+ if (x < 1)
+ fun_l24_n543(x)
+ else
+ fun_l24_n463(x)
+ end
+end
+
+def fun_l23_n201(x)
+ if (x < 1)
+ fun_l24_n933(x)
+ else
+ fun_l24_n185(x)
+ end
+end
+
+def fun_l23_n202(x)
+ if (x < 1)
+ fun_l24_n319(x)
+ else
+ fun_l24_n739(x)
+ end
+end
+
+def fun_l23_n203(x)
+ if (x < 1)
+ fun_l24_n994(x)
+ else
+ fun_l24_n248(x)
+ end
+end
+
+def fun_l23_n204(x)
+ if (x < 1)
+ fun_l24_n980(x)
+ else
+ fun_l24_n248(x)
+ end
+end
+
+def fun_l23_n205(x)
+ if (x < 1)
+ fun_l24_n427(x)
+ else
+ fun_l24_n670(x)
+ end
+end
+
+def fun_l23_n206(x)
+ if (x < 1)
+ fun_l24_n562(x)
+ else
+ fun_l24_n752(x)
+ end
+end
+
+def fun_l23_n207(x)
+ if (x < 1)
+ fun_l24_n424(x)
+ else
+ fun_l24_n310(x)
+ end
+end
+
+def fun_l23_n208(x)
+ if (x < 1)
+ fun_l24_n761(x)
+ else
+ fun_l24_n562(x)
+ end
+end
+
+def fun_l23_n209(x)
+ if (x < 1)
+ fun_l24_n264(x)
+ else
+ fun_l24_n20(x)
+ end
+end
+
+def fun_l23_n210(x)
+ if (x < 1)
+ fun_l24_n886(x)
+ else
+ fun_l24_n505(x)
+ end
+end
+
+def fun_l23_n211(x)
+ if (x < 1)
+ fun_l24_n715(x)
+ else
+ fun_l24_n641(x)
+ end
+end
+
+def fun_l23_n212(x)
+ if (x < 1)
+ fun_l24_n132(x)
+ else
+ fun_l24_n875(x)
+ end
+end
+
+def fun_l23_n213(x)
+ if (x < 1)
+ fun_l24_n121(x)
+ else
+ fun_l24_n38(x)
+ end
+end
+
+def fun_l23_n214(x)
+ if (x < 1)
+ fun_l24_n672(x)
+ else
+ fun_l24_n497(x)
+ end
+end
+
+def fun_l23_n215(x)
+ if (x < 1)
+ fun_l24_n36(x)
+ else
+ fun_l24_n696(x)
+ end
+end
+
+def fun_l23_n216(x)
+ if (x < 1)
+ fun_l24_n559(x)
+ else
+ fun_l24_n772(x)
+ end
+end
+
+def fun_l23_n217(x)
+ if (x < 1)
+ fun_l24_n63(x)
+ else
+ fun_l24_n990(x)
+ end
+end
+
+def fun_l23_n218(x)
+ if (x < 1)
+ fun_l24_n482(x)
+ else
+ fun_l24_n811(x)
+ end
+end
+
+def fun_l23_n219(x)
+ if (x < 1)
+ fun_l24_n572(x)
+ else
+ fun_l24_n651(x)
+ end
+end
+
+def fun_l23_n220(x)
+ if (x < 1)
+ fun_l24_n588(x)
+ else
+ fun_l24_n87(x)
+ end
+end
+
+def fun_l23_n221(x)
+ if (x < 1)
+ fun_l24_n462(x)
+ else
+ fun_l24_n909(x)
+ end
+end
+
+def fun_l23_n222(x)
+ if (x < 1)
+ fun_l24_n729(x)
+ else
+ fun_l24_n364(x)
+ end
+end
+
+def fun_l23_n223(x)
+ if (x < 1)
+ fun_l24_n259(x)
+ else
+ fun_l24_n661(x)
+ end
+end
+
+def fun_l23_n224(x)
+ if (x < 1)
+ fun_l24_n504(x)
+ else
+ fun_l24_n531(x)
+ end
+end
+
+def fun_l23_n225(x)
+ if (x < 1)
+ fun_l24_n114(x)
+ else
+ fun_l24_n292(x)
+ end
+end
+
+def fun_l23_n226(x)
+ if (x < 1)
+ fun_l24_n207(x)
+ else
+ fun_l24_n206(x)
+ end
+end
+
+def fun_l23_n227(x)
+ if (x < 1)
+ fun_l24_n153(x)
+ else
+ fun_l24_n572(x)
+ end
+end
+
+def fun_l23_n228(x)
+ if (x < 1)
+ fun_l24_n738(x)
+ else
+ fun_l24_n767(x)
+ end
+end
+
+def fun_l23_n229(x)
+ if (x < 1)
+ fun_l24_n374(x)
+ else
+ fun_l24_n336(x)
+ end
+end
+
+def fun_l23_n230(x)
+ if (x < 1)
+ fun_l24_n727(x)
+ else
+ fun_l24_n842(x)
+ end
+end
+
+def fun_l23_n231(x)
+ if (x < 1)
+ fun_l24_n506(x)
+ else
+ fun_l24_n8(x)
+ end
+end
+
+def fun_l23_n232(x)
+ if (x < 1)
+ fun_l24_n101(x)
+ else
+ fun_l24_n502(x)
+ end
+end
+
+def fun_l23_n233(x)
+ if (x < 1)
+ fun_l24_n469(x)
+ else
+ fun_l24_n274(x)
+ end
+end
+
+def fun_l23_n234(x)
+ if (x < 1)
+ fun_l24_n67(x)
+ else
+ fun_l24_n66(x)
+ end
+end
+
+def fun_l23_n235(x)
+ if (x < 1)
+ fun_l24_n874(x)
+ else
+ fun_l24_n104(x)
+ end
+end
+
+def fun_l23_n236(x)
+ if (x < 1)
+ fun_l24_n154(x)
+ else
+ fun_l24_n723(x)
+ end
+end
+
+def fun_l23_n237(x)
+ if (x < 1)
+ fun_l24_n300(x)
+ else
+ fun_l24_n0(x)
+ end
+end
+
+def fun_l23_n238(x)
+ if (x < 1)
+ fun_l24_n767(x)
+ else
+ fun_l24_n134(x)
+ end
+end
+
+def fun_l23_n239(x)
+ if (x < 1)
+ fun_l24_n647(x)
+ else
+ fun_l24_n890(x)
+ end
+end
+
+def fun_l23_n240(x)
+ if (x < 1)
+ fun_l24_n258(x)
+ else
+ fun_l24_n302(x)
+ end
+end
+
+def fun_l23_n241(x)
+ if (x < 1)
+ fun_l24_n104(x)
+ else
+ fun_l24_n335(x)
+ end
+end
+
+def fun_l23_n242(x)
+ if (x < 1)
+ fun_l24_n500(x)
+ else
+ fun_l24_n383(x)
+ end
+end
+
+def fun_l23_n243(x)
+ if (x < 1)
+ fun_l24_n63(x)
+ else
+ fun_l24_n421(x)
+ end
+end
+
+def fun_l23_n244(x)
+ if (x < 1)
+ fun_l24_n105(x)
+ else
+ fun_l24_n451(x)
+ end
+end
+
+def fun_l23_n245(x)
+ if (x < 1)
+ fun_l24_n729(x)
+ else
+ fun_l24_n333(x)
+ end
+end
+
+def fun_l23_n246(x)
+ if (x < 1)
+ fun_l24_n966(x)
+ else
+ fun_l24_n556(x)
+ end
+end
+
+def fun_l23_n247(x)
+ if (x < 1)
+ fun_l24_n118(x)
+ else
+ fun_l24_n565(x)
+ end
+end
+
+def fun_l23_n248(x)
+ if (x < 1)
+ fun_l24_n61(x)
+ else
+ fun_l24_n816(x)
+ end
+end
+
+def fun_l23_n249(x)
+ if (x < 1)
+ fun_l24_n769(x)
+ else
+ fun_l24_n183(x)
+ end
+end
+
+def fun_l23_n250(x)
+ if (x < 1)
+ fun_l24_n688(x)
+ else
+ fun_l24_n60(x)
+ end
+end
+
+def fun_l23_n251(x)
+ if (x < 1)
+ fun_l24_n859(x)
+ else
+ fun_l24_n434(x)
+ end
+end
+
+def fun_l23_n252(x)
+ if (x < 1)
+ fun_l24_n650(x)
+ else
+ fun_l24_n448(x)
+ end
+end
+
+def fun_l23_n253(x)
+ if (x < 1)
+ fun_l24_n519(x)
+ else
+ fun_l24_n963(x)
+ end
+end
+
+def fun_l23_n254(x)
+ if (x < 1)
+ fun_l24_n176(x)
+ else
+ fun_l24_n908(x)
+ end
+end
+
+def fun_l23_n255(x)
+ if (x < 1)
+ fun_l24_n146(x)
+ else
+ fun_l24_n751(x)
+ end
+end
+
+def fun_l23_n256(x)
+ if (x < 1)
+ fun_l24_n742(x)
+ else
+ fun_l24_n928(x)
+ end
+end
+
+def fun_l23_n257(x)
+ if (x < 1)
+ fun_l24_n22(x)
+ else
+ fun_l24_n48(x)
+ end
+end
+
+def fun_l23_n258(x)
+ if (x < 1)
+ fun_l24_n158(x)
+ else
+ fun_l24_n299(x)
+ end
+end
+
+def fun_l23_n259(x)
+ if (x < 1)
+ fun_l24_n247(x)
+ else
+ fun_l24_n419(x)
+ end
+end
+
+def fun_l23_n260(x)
+ if (x < 1)
+ fun_l24_n161(x)
+ else
+ fun_l24_n387(x)
+ end
+end
+
+def fun_l23_n261(x)
+ if (x < 1)
+ fun_l24_n627(x)
+ else
+ fun_l24_n321(x)
+ end
+end
+
+def fun_l23_n262(x)
+ if (x < 1)
+ fun_l24_n946(x)
+ else
+ fun_l24_n617(x)
+ end
+end
+
+def fun_l23_n263(x)
+ if (x < 1)
+ fun_l24_n853(x)
+ else
+ fun_l24_n208(x)
+ end
+end
+
+def fun_l23_n264(x)
+ if (x < 1)
+ fun_l24_n213(x)
+ else
+ fun_l24_n27(x)
+ end
+end
+
+def fun_l23_n265(x)
+ if (x < 1)
+ fun_l24_n819(x)
+ else
+ fun_l24_n438(x)
+ end
+end
+
+def fun_l23_n266(x)
+ if (x < 1)
+ fun_l24_n351(x)
+ else
+ fun_l24_n739(x)
+ end
+end
+
+def fun_l23_n267(x)
+ if (x < 1)
+ fun_l24_n333(x)
+ else
+ fun_l24_n179(x)
+ end
+end
+
+def fun_l23_n268(x)
+ if (x < 1)
+ fun_l24_n528(x)
+ else
+ fun_l24_n397(x)
+ end
+end
+
+def fun_l23_n269(x)
+ if (x < 1)
+ fun_l24_n655(x)
+ else
+ fun_l24_n994(x)
+ end
+end
+
+def fun_l23_n270(x)
+ if (x < 1)
+ fun_l24_n257(x)
+ else
+ fun_l24_n346(x)
+ end
+end
+
+def fun_l23_n271(x)
+ if (x < 1)
+ fun_l24_n183(x)
+ else
+ fun_l24_n908(x)
+ end
+end
+
+def fun_l23_n272(x)
+ if (x < 1)
+ fun_l24_n742(x)
+ else
+ fun_l24_n483(x)
+ end
+end
+
+def fun_l23_n273(x)
+ if (x < 1)
+ fun_l24_n803(x)
+ else
+ fun_l24_n318(x)
+ end
+end
+
+def fun_l23_n274(x)
+ if (x < 1)
+ fun_l24_n228(x)
+ else
+ fun_l24_n540(x)
+ end
+end
+
+def fun_l23_n275(x)
+ if (x < 1)
+ fun_l24_n999(x)
+ else
+ fun_l24_n55(x)
+ end
+end
+
+def fun_l23_n276(x)
+ if (x < 1)
+ fun_l24_n129(x)
+ else
+ fun_l24_n235(x)
+ end
+end
+
+def fun_l23_n277(x)
+ if (x < 1)
+ fun_l24_n320(x)
+ else
+ fun_l24_n211(x)
+ end
+end
+
+def fun_l23_n278(x)
+ if (x < 1)
+ fun_l24_n757(x)
+ else
+ fun_l24_n440(x)
+ end
+end
+
+def fun_l23_n279(x)
+ if (x < 1)
+ fun_l24_n784(x)
+ else
+ fun_l24_n117(x)
+ end
+end
+
+def fun_l23_n280(x)
+ if (x < 1)
+ fun_l24_n280(x)
+ else
+ fun_l24_n560(x)
+ end
+end
+
+def fun_l23_n281(x)
+ if (x < 1)
+ fun_l24_n981(x)
+ else
+ fun_l24_n939(x)
+ end
+end
+
+def fun_l23_n282(x)
+ if (x < 1)
+ fun_l24_n500(x)
+ else
+ fun_l24_n90(x)
+ end
+end
+
+def fun_l23_n283(x)
+ if (x < 1)
+ fun_l24_n958(x)
+ else
+ fun_l24_n415(x)
+ end
+end
+
+def fun_l23_n284(x)
+ if (x < 1)
+ fun_l24_n237(x)
+ else
+ fun_l24_n556(x)
+ end
+end
+
+def fun_l23_n285(x)
+ if (x < 1)
+ fun_l24_n87(x)
+ else
+ fun_l24_n630(x)
+ end
+end
+
+def fun_l23_n286(x)
+ if (x < 1)
+ fun_l24_n121(x)
+ else
+ fun_l24_n974(x)
+ end
+end
+
+def fun_l23_n287(x)
+ if (x < 1)
+ fun_l24_n491(x)
+ else
+ fun_l24_n505(x)
+ end
+end
+
+def fun_l23_n288(x)
+ if (x < 1)
+ fun_l24_n342(x)
+ else
+ fun_l24_n408(x)
+ end
+end
+
+def fun_l23_n289(x)
+ if (x < 1)
+ fun_l24_n456(x)
+ else
+ fun_l24_n768(x)
+ end
+end
+
+def fun_l23_n290(x)
+ if (x < 1)
+ fun_l24_n64(x)
+ else
+ fun_l24_n515(x)
+ end
+end
+
+def fun_l23_n291(x)
+ if (x < 1)
+ fun_l24_n86(x)
+ else
+ fun_l24_n420(x)
+ end
+end
+
+def fun_l23_n292(x)
+ if (x < 1)
+ fun_l24_n61(x)
+ else
+ fun_l24_n295(x)
+ end
+end
+
+def fun_l23_n293(x)
+ if (x < 1)
+ fun_l24_n893(x)
+ else
+ fun_l24_n680(x)
+ end
+end
+
+def fun_l23_n294(x)
+ if (x < 1)
+ fun_l24_n81(x)
+ else
+ fun_l24_n946(x)
+ end
+end
+
+def fun_l23_n295(x)
+ if (x < 1)
+ fun_l24_n444(x)
+ else
+ fun_l24_n205(x)
+ end
+end
+
+def fun_l23_n296(x)
+ if (x < 1)
+ fun_l24_n898(x)
+ else
+ fun_l24_n101(x)
+ end
+end
+
+def fun_l23_n297(x)
+ if (x < 1)
+ fun_l24_n617(x)
+ else
+ fun_l24_n660(x)
+ end
+end
+
+def fun_l23_n298(x)
+ if (x < 1)
+ fun_l24_n117(x)
+ else
+ fun_l24_n806(x)
+ end
+end
+
+def fun_l23_n299(x)
+ if (x < 1)
+ fun_l24_n92(x)
+ else
+ fun_l24_n660(x)
+ end
+end
+
+def fun_l23_n300(x)
+ if (x < 1)
+ fun_l24_n202(x)
+ else
+ fun_l24_n611(x)
+ end
+end
+
+def fun_l23_n301(x)
+ if (x < 1)
+ fun_l24_n852(x)
+ else
+ fun_l24_n569(x)
+ end
+end
+
+def fun_l23_n302(x)
+ if (x < 1)
+ fun_l24_n69(x)
+ else
+ fun_l24_n725(x)
+ end
+end
+
+def fun_l23_n303(x)
+ if (x < 1)
+ fun_l24_n183(x)
+ else
+ fun_l24_n406(x)
+ end
+end
+
+def fun_l23_n304(x)
+ if (x < 1)
+ fun_l24_n926(x)
+ else
+ fun_l24_n838(x)
+ end
+end
+
+def fun_l23_n305(x)
+ if (x < 1)
+ fun_l24_n16(x)
+ else
+ fun_l24_n681(x)
+ end
+end
+
+def fun_l23_n306(x)
+ if (x < 1)
+ fun_l24_n43(x)
+ else
+ fun_l24_n504(x)
+ end
+end
+
+def fun_l23_n307(x)
+ if (x < 1)
+ fun_l24_n417(x)
+ else
+ fun_l24_n239(x)
+ end
+end
+
+def fun_l23_n308(x)
+ if (x < 1)
+ fun_l24_n353(x)
+ else
+ fun_l24_n467(x)
+ end
+end
+
+def fun_l23_n309(x)
+ if (x < 1)
+ fun_l24_n633(x)
+ else
+ fun_l24_n593(x)
+ end
+end
+
+def fun_l23_n310(x)
+ if (x < 1)
+ fun_l24_n974(x)
+ else
+ fun_l24_n894(x)
+ end
+end
+
+def fun_l23_n311(x)
+ if (x < 1)
+ fun_l24_n3(x)
+ else
+ fun_l24_n751(x)
+ end
+end
+
+def fun_l23_n312(x)
+ if (x < 1)
+ fun_l24_n728(x)
+ else
+ fun_l24_n116(x)
+ end
+end
+
+def fun_l23_n313(x)
+ if (x < 1)
+ fun_l24_n588(x)
+ else
+ fun_l24_n636(x)
+ end
+end
+
+def fun_l23_n314(x)
+ if (x < 1)
+ fun_l24_n284(x)
+ else
+ fun_l24_n751(x)
+ end
+end
+
+def fun_l23_n315(x)
+ if (x < 1)
+ fun_l24_n567(x)
+ else
+ fun_l24_n356(x)
+ end
+end
+
+def fun_l23_n316(x)
+ if (x < 1)
+ fun_l24_n78(x)
+ else
+ fun_l24_n714(x)
+ end
+end
+
+def fun_l23_n317(x)
+ if (x < 1)
+ fun_l24_n592(x)
+ else
+ fun_l24_n720(x)
+ end
+end
+
+def fun_l23_n318(x)
+ if (x < 1)
+ fun_l24_n273(x)
+ else
+ fun_l24_n367(x)
+ end
+end
+
+def fun_l23_n319(x)
+ if (x < 1)
+ fun_l24_n816(x)
+ else
+ fun_l24_n964(x)
+ end
+end
+
+def fun_l23_n320(x)
+ if (x < 1)
+ fun_l24_n59(x)
+ else
+ fun_l24_n630(x)
+ end
+end
+
+def fun_l23_n321(x)
+ if (x < 1)
+ fun_l24_n298(x)
+ else
+ fun_l24_n639(x)
+ end
+end
+
+def fun_l23_n322(x)
+ if (x < 1)
+ fun_l24_n70(x)
+ else
+ fun_l24_n714(x)
+ end
+end
+
+def fun_l23_n323(x)
+ if (x < 1)
+ fun_l24_n495(x)
+ else
+ fun_l24_n630(x)
+ end
+end
+
+def fun_l23_n324(x)
+ if (x < 1)
+ fun_l24_n780(x)
+ else
+ fun_l24_n932(x)
+ end
+end
+
+def fun_l23_n325(x)
+ if (x < 1)
+ fun_l24_n494(x)
+ else
+ fun_l24_n610(x)
+ end
+end
+
+def fun_l23_n326(x)
+ if (x < 1)
+ fun_l24_n509(x)
+ else
+ fun_l24_n635(x)
+ end
+end
+
+def fun_l23_n327(x)
+ if (x < 1)
+ fun_l24_n991(x)
+ else
+ fun_l24_n355(x)
+ end
+end
+
+def fun_l23_n328(x)
+ if (x < 1)
+ fun_l24_n153(x)
+ else
+ fun_l24_n234(x)
+ end
+end
+
+def fun_l23_n329(x)
+ if (x < 1)
+ fun_l24_n483(x)
+ else
+ fun_l24_n812(x)
+ end
+end
+
+def fun_l23_n330(x)
+ if (x < 1)
+ fun_l24_n123(x)
+ else
+ fun_l24_n665(x)
+ end
+end
+
+def fun_l23_n331(x)
+ if (x < 1)
+ fun_l24_n752(x)
+ else
+ fun_l24_n471(x)
+ end
+end
+
+def fun_l23_n332(x)
+ if (x < 1)
+ fun_l24_n440(x)
+ else
+ fun_l24_n788(x)
+ end
+end
+
+def fun_l23_n333(x)
+ if (x < 1)
+ fun_l24_n381(x)
+ else
+ fun_l24_n95(x)
+ end
+end
+
+def fun_l23_n334(x)
+ if (x < 1)
+ fun_l24_n379(x)
+ else
+ fun_l24_n982(x)
+ end
+end
+
+def fun_l23_n335(x)
+ if (x < 1)
+ fun_l24_n766(x)
+ else
+ fun_l24_n14(x)
+ end
+end
+
+def fun_l23_n336(x)
+ if (x < 1)
+ fun_l24_n733(x)
+ else
+ fun_l24_n614(x)
+ end
+end
+
+def fun_l23_n337(x)
+ if (x < 1)
+ fun_l24_n946(x)
+ else
+ fun_l24_n408(x)
+ end
+end
+
+def fun_l23_n338(x)
+ if (x < 1)
+ fun_l24_n98(x)
+ else
+ fun_l24_n542(x)
+ end
+end
+
+def fun_l23_n339(x)
+ if (x < 1)
+ fun_l24_n60(x)
+ else
+ fun_l24_n970(x)
+ end
+end
+
+def fun_l23_n340(x)
+ if (x < 1)
+ fun_l24_n933(x)
+ else
+ fun_l24_n517(x)
+ end
+end
+
+def fun_l23_n341(x)
+ if (x < 1)
+ fun_l24_n634(x)
+ else
+ fun_l24_n943(x)
+ end
+end
+
+def fun_l23_n342(x)
+ if (x < 1)
+ fun_l24_n50(x)
+ else
+ fun_l24_n800(x)
+ end
+end
+
+def fun_l23_n343(x)
+ if (x < 1)
+ fun_l24_n352(x)
+ else
+ fun_l24_n450(x)
+ end
+end
+
+def fun_l23_n344(x)
+ if (x < 1)
+ fun_l24_n340(x)
+ else
+ fun_l24_n101(x)
+ end
+end
+
+def fun_l23_n345(x)
+ if (x < 1)
+ fun_l24_n383(x)
+ else
+ fun_l24_n493(x)
+ end
+end
+
+def fun_l23_n346(x)
+ if (x < 1)
+ fun_l24_n805(x)
+ else
+ fun_l24_n845(x)
+ end
+end
+
+def fun_l23_n347(x)
+ if (x < 1)
+ fun_l24_n491(x)
+ else
+ fun_l24_n756(x)
+ end
+end
+
+def fun_l23_n348(x)
+ if (x < 1)
+ fun_l24_n508(x)
+ else
+ fun_l24_n2(x)
+ end
+end
+
+def fun_l23_n349(x)
+ if (x < 1)
+ fun_l24_n865(x)
+ else
+ fun_l24_n55(x)
+ end
+end
+
+def fun_l23_n350(x)
+ if (x < 1)
+ fun_l24_n218(x)
+ else
+ fun_l24_n456(x)
+ end
+end
+
+def fun_l23_n351(x)
+ if (x < 1)
+ fun_l24_n162(x)
+ else
+ fun_l24_n312(x)
+ end
+end
+
+def fun_l23_n352(x)
+ if (x < 1)
+ fun_l24_n309(x)
+ else
+ fun_l24_n431(x)
+ end
+end
+
+def fun_l23_n353(x)
+ if (x < 1)
+ fun_l24_n411(x)
+ else
+ fun_l24_n684(x)
+ end
+end
+
+def fun_l23_n354(x)
+ if (x < 1)
+ fun_l24_n381(x)
+ else
+ fun_l24_n703(x)
+ end
+end
+
+def fun_l23_n355(x)
+ if (x < 1)
+ fun_l24_n189(x)
+ else
+ fun_l24_n217(x)
+ end
+end
+
+def fun_l23_n356(x)
+ if (x < 1)
+ fun_l24_n180(x)
+ else
+ fun_l24_n706(x)
+ end
+end
+
+def fun_l23_n357(x)
+ if (x < 1)
+ fun_l24_n76(x)
+ else
+ fun_l24_n575(x)
+ end
+end
+
+def fun_l23_n358(x)
+ if (x < 1)
+ fun_l24_n574(x)
+ else
+ fun_l24_n842(x)
+ end
+end
+
+def fun_l23_n359(x)
+ if (x < 1)
+ fun_l24_n281(x)
+ else
+ fun_l24_n572(x)
+ end
+end
+
+def fun_l23_n360(x)
+ if (x < 1)
+ fun_l24_n2(x)
+ else
+ fun_l24_n928(x)
+ end
+end
+
+def fun_l23_n361(x)
+ if (x < 1)
+ fun_l24_n840(x)
+ else
+ fun_l24_n794(x)
+ end
+end
+
+def fun_l23_n362(x)
+ if (x < 1)
+ fun_l24_n657(x)
+ else
+ fun_l24_n987(x)
+ end
+end
+
+def fun_l23_n363(x)
+ if (x < 1)
+ fun_l24_n400(x)
+ else
+ fun_l24_n151(x)
+ end
+end
+
+def fun_l23_n364(x)
+ if (x < 1)
+ fun_l24_n123(x)
+ else
+ fun_l24_n873(x)
+ end
+end
+
+def fun_l23_n365(x)
+ if (x < 1)
+ fun_l24_n51(x)
+ else
+ fun_l24_n52(x)
+ end
+end
+
+def fun_l23_n366(x)
+ if (x < 1)
+ fun_l24_n809(x)
+ else
+ fun_l24_n32(x)
+ end
+end
+
+def fun_l23_n367(x)
+ if (x < 1)
+ fun_l24_n928(x)
+ else
+ fun_l24_n618(x)
+ end
+end
+
+def fun_l23_n368(x)
+ if (x < 1)
+ fun_l24_n563(x)
+ else
+ fun_l24_n937(x)
+ end
+end
+
+def fun_l23_n369(x)
+ if (x < 1)
+ fun_l24_n312(x)
+ else
+ fun_l24_n918(x)
+ end
+end
+
+def fun_l23_n370(x)
+ if (x < 1)
+ fun_l24_n940(x)
+ else
+ fun_l24_n994(x)
+ end
+end
+
+def fun_l23_n371(x)
+ if (x < 1)
+ fun_l24_n788(x)
+ else
+ fun_l24_n187(x)
+ end
+end
+
+def fun_l23_n372(x)
+ if (x < 1)
+ fun_l24_n110(x)
+ else
+ fun_l24_n523(x)
+ end
+end
+
+def fun_l23_n373(x)
+ if (x < 1)
+ fun_l24_n158(x)
+ else
+ fun_l24_n656(x)
+ end
+end
+
+def fun_l23_n374(x)
+ if (x < 1)
+ fun_l24_n522(x)
+ else
+ fun_l24_n395(x)
+ end
+end
+
+def fun_l23_n375(x)
+ if (x < 1)
+ fun_l24_n90(x)
+ else
+ fun_l24_n732(x)
+ end
+end
+
+def fun_l23_n376(x)
+ if (x < 1)
+ fun_l24_n809(x)
+ else
+ fun_l24_n513(x)
+ end
+end
+
+def fun_l23_n377(x)
+ if (x < 1)
+ fun_l24_n916(x)
+ else
+ fun_l24_n962(x)
+ end
+end
+
+def fun_l23_n378(x)
+ if (x < 1)
+ fun_l24_n852(x)
+ else
+ fun_l24_n350(x)
+ end
+end
+
+def fun_l23_n379(x)
+ if (x < 1)
+ fun_l24_n555(x)
+ else
+ fun_l24_n375(x)
+ end
+end
+
+def fun_l23_n380(x)
+ if (x < 1)
+ fun_l24_n17(x)
+ else
+ fun_l24_n566(x)
+ end
+end
+
+def fun_l23_n381(x)
+ if (x < 1)
+ fun_l24_n332(x)
+ else
+ fun_l24_n35(x)
+ end
+end
+
+def fun_l23_n382(x)
+ if (x < 1)
+ fun_l24_n531(x)
+ else
+ fun_l24_n368(x)
+ end
+end
+
+def fun_l23_n383(x)
+ if (x < 1)
+ fun_l24_n712(x)
+ else
+ fun_l24_n32(x)
+ end
+end
+
+def fun_l23_n384(x)
+ if (x < 1)
+ fun_l24_n239(x)
+ else
+ fun_l24_n542(x)
+ end
+end
+
+def fun_l23_n385(x)
+ if (x < 1)
+ fun_l24_n914(x)
+ else
+ fun_l24_n820(x)
+ end
+end
+
+def fun_l23_n386(x)
+ if (x < 1)
+ fun_l24_n579(x)
+ else
+ fun_l24_n202(x)
+ end
+end
+
+def fun_l23_n387(x)
+ if (x < 1)
+ fun_l24_n36(x)
+ else
+ fun_l24_n591(x)
+ end
+end
+
+def fun_l23_n388(x)
+ if (x < 1)
+ fun_l24_n485(x)
+ else
+ fun_l24_n707(x)
+ end
+end
+
+def fun_l23_n389(x)
+ if (x < 1)
+ fun_l24_n587(x)
+ else
+ fun_l24_n588(x)
+ end
+end
+
+def fun_l23_n390(x)
+ if (x < 1)
+ fun_l24_n837(x)
+ else
+ fun_l24_n352(x)
+ end
+end
+
+def fun_l23_n391(x)
+ if (x < 1)
+ fun_l24_n926(x)
+ else
+ fun_l24_n553(x)
+ end
+end
+
+def fun_l23_n392(x)
+ if (x < 1)
+ fun_l24_n557(x)
+ else
+ fun_l24_n944(x)
+ end
+end
+
+def fun_l23_n393(x)
+ if (x < 1)
+ fun_l24_n870(x)
+ else
+ fun_l24_n632(x)
+ end
+end
+
+def fun_l23_n394(x)
+ if (x < 1)
+ fun_l24_n732(x)
+ else
+ fun_l24_n285(x)
+ end
+end
+
+def fun_l23_n395(x)
+ if (x < 1)
+ fun_l24_n249(x)
+ else
+ fun_l24_n709(x)
+ end
+end
+
+def fun_l23_n396(x)
+ if (x < 1)
+ fun_l24_n674(x)
+ else
+ fun_l24_n693(x)
+ end
+end
+
+def fun_l23_n397(x)
+ if (x < 1)
+ fun_l24_n20(x)
+ else
+ fun_l24_n367(x)
+ end
+end
+
+def fun_l23_n398(x)
+ if (x < 1)
+ fun_l24_n545(x)
+ else
+ fun_l24_n973(x)
+ end
+end
+
+def fun_l23_n399(x)
+ if (x < 1)
+ fun_l24_n460(x)
+ else
+ fun_l24_n627(x)
+ end
+end
+
+def fun_l23_n400(x)
+ if (x < 1)
+ fun_l24_n941(x)
+ else
+ fun_l24_n679(x)
+ end
+end
+
+def fun_l23_n401(x)
+ if (x < 1)
+ fun_l24_n161(x)
+ else
+ fun_l24_n518(x)
+ end
+end
+
+def fun_l23_n402(x)
+ if (x < 1)
+ fun_l24_n738(x)
+ else
+ fun_l24_n393(x)
+ end
+end
+
+def fun_l23_n403(x)
+ if (x < 1)
+ fun_l24_n75(x)
+ else
+ fun_l24_n776(x)
+ end
+end
+
+def fun_l23_n404(x)
+ if (x < 1)
+ fun_l24_n996(x)
+ else
+ fun_l24_n71(x)
+ end
+end
+
+def fun_l23_n405(x)
+ if (x < 1)
+ fun_l24_n732(x)
+ else
+ fun_l24_n649(x)
+ end
+end
+
+def fun_l23_n406(x)
+ if (x < 1)
+ fun_l24_n142(x)
+ else
+ fun_l24_n563(x)
+ end
+end
+
+def fun_l23_n407(x)
+ if (x < 1)
+ fun_l24_n63(x)
+ else
+ fun_l24_n629(x)
+ end
+end
+
+def fun_l23_n408(x)
+ if (x < 1)
+ fun_l24_n734(x)
+ else
+ fun_l24_n857(x)
+ end
+end
+
+def fun_l23_n409(x)
+ if (x < 1)
+ fun_l24_n100(x)
+ else
+ fun_l24_n340(x)
+ end
+end
+
+def fun_l23_n410(x)
+ if (x < 1)
+ fun_l24_n471(x)
+ else
+ fun_l24_n114(x)
+ end
+end
+
+def fun_l23_n411(x)
+ if (x < 1)
+ fun_l24_n316(x)
+ else
+ fun_l24_n965(x)
+ end
+end
+
+def fun_l23_n412(x)
+ if (x < 1)
+ fun_l24_n909(x)
+ else
+ fun_l24_n779(x)
+ end
+end
+
+def fun_l23_n413(x)
+ if (x < 1)
+ fun_l24_n846(x)
+ else
+ fun_l24_n473(x)
+ end
+end
+
+def fun_l23_n414(x)
+ if (x < 1)
+ fun_l24_n117(x)
+ else
+ fun_l24_n751(x)
+ end
+end
+
+def fun_l23_n415(x)
+ if (x < 1)
+ fun_l24_n360(x)
+ else
+ fun_l24_n285(x)
+ end
+end
+
+def fun_l23_n416(x)
+ if (x < 1)
+ fun_l24_n430(x)
+ else
+ fun_l24_n273(x)
+ end
+end
+
+def fun_l23_n417(x)
+ if (x < 1)
+ fun_l24_n925(x)
+ else
+ fun_l24_n928(x)
+ end
+end
+
+def fun_l23_n418(x)
+ if (x < 1)
+ fun_l24_n478(x)
+ else
+ fun_l24_n511(x)
+ end
+end
+
+def fun_l23_n419(x)
+ if (x < 1)
+ fun_l24_n415(x)
+ else
+ fun_l24_n127(x)
+ end
+end
+
+def fun_l23_n420(x)
+ if (x < 1)
+ fun_l24_n33(x)
+ else
+ fun_l24_n897(x)
+ end
+end
+
+def fun_l23_n421(x)
+ if (x < 1)
+ fun_l24_n112(x)
+ else
+ fun_l24_n87(x)
+ end
+end
+
+def fun_l23_n422(x)
+ if (x < 1)
+ fun_l24_n386(x)
+ else
+ fun_l24_n450(x)
+ end
+end
+
+def fun_l23_n423(x)
+ if (x < 1)
+ fun_l24_n430(x)
+ else
+ fun_l24_n517(x)
+ end
+end
+
+def fun_l23_n424(x)
+ if (x < 1)
+ fun_l24_n413(x)
+ else
+ fun_l24_n799(x)
+ end
+end
+
+def fun_l23_n425(x)
+ if (x < 1)
+ fun_l24_n744(x)
+ else
+ fun_l24_n218(x)
+ end
+end
+
+def fun_l23_n426(x)
+ if (x < 1)
+ fun_l24_n231(x)
+ else
+ fun_l24_n454(x)
+ end
+end
+
+def fun_l23_n427(x)
+ if (x < 1)
+ fun_l24_n693(x)
+ else
+ fun_l24_n28(x)
+ end
+end
+
+def fun_l23_n428(x)
+ if (x < 1)
+ fun_l24_n694(x)
+ else
+ fun_l24_n712(x)
+ end
+end
+
+def fun_l23_n429(x)
+ if (x < 1)
+ fun_l24_n949(x)
+ else
+ fun_l24_n983(x)
+ end
+end
+
+def fun_l23_n430(x)
+ if (x < 1)
+ fun_l24_n324(x)
+ else
+ fun_l24_n818(x)
+ end
+end
+
+def fun_l23_n431(x)
+ if (x < 1)
+ fun_l24_n820(x)
+ else
+ fun_l24_n662(x)
+ end
+end
+
+def fun_l23_n432(x)
+ if (x < 1)
+ fun_l24_n391(x)
+ else
+ fun_l24_n801(x)
+ end
+end
+
+def fun_l23_n433(x)
+ if (x < 1)
+ fun_l24_n285(x)
+ else
+ fun_l24_n79(x)
+ end
+end
+
+def fun_l23_n434(x)
+ if (x < 1)
+ fun_l24_n582(x)
+ else
+ fun_l24_n820(x)
+ end
+end
+
+def fun_l23_n435(x)
+ if (x < 1)
+ fun_l24_n324(x)
+ else
+ fun_l24_n348(x)
+ end
+end
+
+def fun_l23_n436(x)
+ if (x < 1)
+ fun_l24_n241(x)
+ else
+ fun_l24_n568(x)
+ end
+end
+
+def fun_l23_n437(x)
+ if (x < 1)
+ fun_l24_n261(x)
+ else
+ fun_l24_n374(x)
+ end
+end
+
+def fun_l23_n438(x)
+ if (x < 1)
+ fun_l24_n886(x)
+ else
+ fun_l24_n38(x)
+ end
+end
+
+def fun_l23_n439(x)
+ if (x < 1)
+ fun_l24_n344(x)
+ else
+ fun_l24_n991(x)
+ end
+end
+
+def fun_l23_n440(x)
+ if (x < 1)
+ fun_l24_n792(x)
+ else
+ fun_l24_n298(x)
+ end
+end
+
+def fun_l23_n441(x)
+ if (x < 1)
+ fun_l24_n728(x)
+ else
+ fun_l24_n575(x)
+ end
+end
+
+def fun_l23_n442(x)
+ if (x < 1)
+ fun_l24_n22(x)
+ else
+ fun_l24_n804(x)
+ end
+end
+
+def fun_l23_n443(x)
+ if (x < 1)
+ fun_l24_n406(x)
+ else
+ fun_l24_n723(x)
+ end
+end
+
+def fun_l23_n444(x)
+ if (x < 1)
+ fun_l24_n921(x)
+ else
+ fun_l24_n455(x)
+ end
+end
+
+def fun_l23_n445(x)
+ if (x < 1)
+ fun_l24_n725(x)
+ else
+ fun_l24_n799(x)
+ end
+end
+
+def fun_l23_n446(x)
+ if (x < 1)
+ fun_l24_n543(x)
+ else
+ fun_l24_n350(x)
+ end
+end
+
+def fun_l23_n447(x)
+ if (x < 1)
+ fun_l24_n849(x)
+ else
+ fun_l24_n447(x)
+ end
+end
+
+def fun_l23_n448(x)
+ if (x < 1)
+ fun_l24_n357(x)
+ else
+ fun_l24_n915(x)
+ end
+end
+
+def fun_l23_n449(x)
+ if (x < 1)
+ fun_l24_n143(x)
+ else
+ fun_l24_n164(x)
+ end
+end
+
+def fun_l23_n450(x)
+ if (x < 1)
+ fun_l24_n702(x)
+ else
+ fun_l24_n940(x)
+ end
+end
+
+def fun_l23_n451(x)
+ if (x < 1)
+ fun_l24_n76(x)
+ else
+ fun_l24_n229(x)
+ end
+end
+
+def fun_l23_n452(x)
+ if (x < 1)
+ fun_l24_n55(x)
+ else
+ fun_l24_n177(x)
+ end
+end
+
+def fun_l23_n453(x)
+ if (x < 1)
+ fun_l24_n65(x)
+ else
+ fun_l24_n310(x)
+ end
+end
+
+def fun_l23_n454(x)
+ if (x < 1)
+ fun_l24_n818(x)
+ else
+ fun_l24_n1(x)
+ end
+end
+
+def fun_l23_n455(x)
+ if (x < 1)
+ fun_l24_n555(x)
+ else
+ fun_l24_n475(x)
+ end
+end
+
+def fun_l23_n456(x)
+ if (x < 1)
+ fun_l24_n867(x)
+ else
+ fun_l24_n350(x)
+ end
+end
+
+def fun_l23_n457(x)
+ if (x < 1)
+ fun_l24_n953(x)
+ else
+ fun_l24_n932(x)
+ end
+end
+
+def fun_l23_n458(x)
+ if (x < 1)
+ fun_l24_n104(x)
+ else
+ fun_l24_n555(x)
+ end
+end
+
+def fun_l23_n459(x)
+ if (x < 1)
+ fun_l24_n259(x)
+ else
+ fun_l24_n196(x)
+ end
+end
+
+def fun_l23_n460(x)
+ if (x < 1)
+ fun_l24_n747(x)
+ else
+ fun_l24_n788(x)
+ end
+end
+
+def fun_l23_n461(x)
+ if (x < 1)
+ fun_l24_n302(x)
+ else
+ fun_l24_n479(x)
+ end
+end
+
+def fun_l23_n462(x)
+ if (x < 1)
+ fun_l24_n292(x)
+ else
+ fun_l24_n235(x)
+ end
+end
+
+def fun_l23_n463(x)
+ if (x < 1)
+ fun_l24_n589(x)
+ else
+ fun_l24_n277(x)
+ end
+end
+
+def fun_l23_n464(x)
+ if (x < 1)
+ fun_l24_n212(x)
+ else
+ fun_l24_n334(x)
+ end
+end
+
+def fun_l23_n465(x)
+ if (x < 1)
+ fun_l24_n878(x)
+ else
+ fun_l24_n111(x)
+ end
+end
+
+def fun_l23_n466(x)
+ if (x < 1)
+ fun_l24_n862(x)
+ else
+ fun_l24_n736(x)
+ end
+end
+
+def fun_l23_n467(x)
+ if (x < 1)
+ fun_l24_n257(x)
+ else
+ fun_l24_n745(x)
+ end
+end
+
+def fun_l23_n468(x)
+ if (x < 1)
+ fun_l24_n922(x)
+ else
+ fun_l24_n453(x)
+ end
+end
+
+def fun_l23_n469(x)
+ if (x < 1)
+ fun_l24_n334(x)
+ else
+ fun_l24_n23(x)
+ end
+end
+
+def fun_l23_n470(x)
+ if (x < 1)
+ fun_l24_n585(x)
+ else
+ fun_l24_n512(x)
+ end
+end
+
+def fun_l23_n471(x)
+ if (x < 1)
+ fun_l24_n135(x)
+ else
+ fun_l24_n244(x)
+ end
+end
+
+def fun_l23_n472(x)
+ if (x < 1)
+ fun_l24_n151(x)
+ else
+ fun_l24_n479(x)
+ end
+end
+
+def fun_l23_n473(x)
+ if (x < 1)
+ fun_l24_n192(x)
+ else
+ fun_l24_n748(x)
+ end
+end
+
+def fun_l23_n474(x)
+ if (x < 1)
+ fun_l24_n729(x)
+ else
+ fun_l24_n283(x)
+ end
+end
+
+def fun_l23_n475(x)
+ if (x < 1)
+ fun_l24_n453(x)
+ else
+ fun_l24_n244(x)
+ end
+end
+
+def fun_l23_n476(x)
+ if (x < 1)
+ fun_l24_n210(x)
+ else
+ fun_l24_n6(x)
+ end
+end
+
+def fun_l23_n477(x)
+ if (x < 1)
+ fun_l24_n387(x)
+ else
+ fun_l24_n857(x)
+ end
+end
+
+def fun_l23_n478(x)
+ if (x < 1)
+ fun_l24_n312(x)
+ else
+ fun_l24_n378(x)
+ end
+end
+
+def fun_l23_n479(x)
+ if (x < 1)
+ fun_l24_n553(x)
+ else
+ fun_l24_n264(x)
+ end
+end
+
+def fun_l23_n480(x)
+ if (x < 1)
+ fun_l24_n903(x)
+ else
+ fun_l24_n374(x)
+ end
+end
+
+def fun_l23_n481(x)
+ if (x < 1)
+ fun_l24_n9(x)
+ else
+ fun_l24_n494(x)
+ end
+end
+
+def fun_l23_n482(x)
+ if (x < 1)
+ fun_l24_n4(x)
+ else
+ fun_l24_n119(x)
+ end
+end
+
+def fun_l23_n483(x)
+ if (x < 1)
+ fun_l24_n969(x)
+ else
+ fun_l24_n716(x)
+ end
+end
+
+def fun_l23_n484(x)
+ if (x < 1)
+ fun_l24_n132(x)
+ else
+ fun_l24_n950(x)
+ end
+end
+
+def fun_l23_n485(x)
+ if (x < 1)
+ fun_l24_n641(x)
+ else
+ fun_l24_n134(x)
+ end
+end
+
+def fun_l23_n486(x)
+ if (x < 1)
+ fun_l24_n499(x)
+ else
+ fun_l24_n506(x)
+ end
+end
+
+def fun_l23_n487(x)
+ if (x < 1)
+ fun_l24_n594(x)
+ else
+ fun_l24_n508(x)
+ end
+end
+
+def fun_l23_n488(x)
+ if (x < 1)
+ fun_l24_n730(x)
+ else
+ fun_l24_n464(x)
+ end
+end
+
+def fun_l23_n489(x)
+ if (x < 1)
+ fun_l24_n564(x)
+ else
+ fun_l24_n716(x)
+ end
+end
+
+def fun_l23_n490(x)
+ if (x < 1)
+ fun_l24_n658(x)
+ else
+ fun_l24_n63(x)
+ end
+end
+
+def fun_l23_n491(x)
+ if (x < 1)
+ fun_l24_n404(x)
+ else
+ fun_l24_n982(x)
+ end
+end
+
+def fun_l23_n492(x)
+ if (x < 1)
+ fun_l24_n182(x)
+ else
+ fun_l24_n97(x)
+ end
+end
+
+def fun_l23_n493(x)
+ if (x < 1)
+ fun_l24_n97(x)
+ else
+ fun_l24_n765(x)
+ end
+end
+
+def fun_l23_n494(x)
+ if (x < 1)
+ fun_l24_n728(x)
+ else
+ fun_l24_n703(x)
+ end
+end
+
+def fun_l23_n495(x)
+ if (x < 1)
+ fun_l24_n327(x)
+ else
+ fun_l24_n484(x)
+ end
+end
+
+def fun_l23_n496(x)
+ if (x < 1)
+ fun_l24_n544(x)
+ else
+ fun_l24_n814(x)
+ end
+end
+
+def fun_l23_n497(x)
+ if (x < 1)
+ fun_l24_n555(x)
+ else
+ fun_l24_n160(x)
+ end
+end
+
+def fun_l23_n498(x)
+ if (x < 1)
+ fun_l24_n336(x)
+ else
+ fun_l24_n544(x)
+ end
+end
+
+def fun_l23_n499(x)
+ if (x < 1)
+ fun_l24_n242(x)
+ else
+ fun_l24_n337(x)
+ end
+end
+
+def fun_l23_n500(x)
+ if (x < 1)
+ fun_l24_n71(x)
+ else
+ fun_l24_n446(x)
+ end
+end
+
+def fun_l23_n501(x)
+ if (x < 1)
+ fun_l24_n726(x)
+ else
+ fun_l24_n127(x)
+ end
+end
+
+def fun_l23_n502(x)
+ if (x < 1)
+ fun_l24_n430(x)
+ else
+ fun_l24_n136(x)
+ end
+end
+
+def fun_l23_n503(x)
+ if (x < 1)
+ fun_l24_n140(x)
+ else
+ fun_l24_n942(x)
+ end
+end
+
+def fun_l23_n504(x)
+ if (x < 1)
+ fun_l24_n135(x)
+ else
+ fun_l24_n701(x)
+ end
+end
+
+def fun_l23_n505(x)
+ if (x < 1)
+ fun_l24_n409(x)
+ else
+ fun_l24_n825(x)
+ end
+end
+
+def fun_l23_n506(x)
+ if (x < 1)
+ fun_l24_n415(x)
+ else
+ fun_l24_n336(x)
+ end
+end
+
+def fun_l23_n507(x)
+ if (x < 1)
+ fun_l24_n118(x)
+ else
+ fun_l24_n904(x)
+ end
+end
+
+def fun_l23_n508(x)
+ if (x < 1)
+ fun_l24_n870(x)
+ else
+ fun_l24_n473(x)
+ end
+end
+
+def fun_l23_n509(x)
+ if (x < 1)
+ fun_l24_n99(x)
+ else
+ fun_l24_n157(x)
+ end
+end
+
+def fun_l23_n510(x)
+ if (x < 1)
+ fun_l24_n484(x)
+ else
+ fun_l24_n933(x)
+ end
+end
+
+def fun_l23_n511(x)
+ if (x < 1)
+ fun_l24_n204(x)
+ else
+ fun_l24_n95(x)
+ end
+end
+
+def fun_l23_n512(x)
+ if (x < 1)
+ fun_l24_n783(x)
+ else
+ fun_l24_n490(x)
+ end
+end
+
+def fun_l23_n513(x)
+ if (x < 1)
+ fun_l24_n642(x)
+ else
+ fun_l24_n622(x)
+ end
+end
+
+def fun_l23_n514(x)
+ if (x < 1)
+ fun_l24_n514(x)
+ else
+ fun_l24_n287(x)
+ end
+end
+
+def fun_l23_n515(x)
+ if (x < 1)
+ fun_l24_n174(x)
+ else
+ fun_l24_n19(x)
+ end
+end
+
+def fun_l23_n516(x)
+ if (x < 1)
+ fun_l24_n840(x)
+ else
+ fun_l24_n710(x)
+ end
+end
+
+def fun_l23_n517(x)
+ if (x < 1)
+ fun_l24_n921(x)
+ else
+ fun_l24_n11(x)
+ end
+end
+
+def fun_l23_n518(x)
+ if (x < 1)
+ fun_l24_n162(x)
+ else
+ fun_l24_n185(x)
+ end
+end
+
+def fun_l23_n519(x)
+ if (x < 1)
+ fun_l24_n654(x)
+ else
+ fun_l24_n514(x)
+ end
+end
+
+def fun_l23_n520(x)
+ if (x < 1)
+ fun_l24_n763(x)
+ else
+ fun_l24_n158(x)
+ end
+end
+
+def fun_l23_n521(x)
+ if (x < 1)
+ fun_l24_n471(x)
+ else
+ fun_l24_n617(x)
+ end
+end
+
+def fun_l23_n522(x)
+ if (x < 1)
+ fun_l24_n146(x)
+ else
+ fun_l24_n6(x)
+ end
+end
+
+def fun_l23_n523(x)
+ if (x < 1)
+ fun_l24_n447(x)
+ else
+ fun_l24_n981(x)
+ end
+end
+
+def fun_l23_n524(x)
+ if (x < 1)
+ fun_l24_n809(x)
+ else
+ fun_l24_n78(x)
+ end
+end
+
+def fun_l23_n525(x)
+ if (x < 1)
+ fun_l24_n554(x)
+ else
+ fun_l24_n50(x)
+ end
+end
+
+def fun_l23_n526(x)
+ if (x < 1)
+ fun_l24_n970(x)
+ else
+ fun_l24_n600(x)
+ end
+end
+
+def fun_l23_n527(x)
+ if (x < 1)
+ fun_l24_n700(x)
+ else
+ fun_l24_n982(x)
+ end
+end
+
+def fun_l23_n528(x)
+ if (x < 1)
+ fun_l24_n947(x)
+ else
+ fun_l24_n886(x)
+ end
+end
+
+def fun_l23_n529(x)
+ if (x < 1)
+ fun_l24_n198(x)
+ else
+ fun_l24_n283(x)
+ end
+end
+
+def fun_l23_n530(x)
+ if (x < 1)
+ fun_l24_n641(x)
+ else
+ fun_l24_n879(x)
+ end
+end
+
+def fun_l23_n531(x)
+ if (x < 1)
+ fun_l24_n393(x)
+ else
+ fun_l24_n451(x)
+ end
+end
+
+def fun_l23_n532(x)
+ if (x < 1)
+ fun_l24_n802(x)
+ else
+ fun_l24_n271(x)
+ end
+end
+
+def fun_l23_n533(x)
+ if (x < 1)
+ fun_l24_n926(x)
+ else
+ fun_l24_n315(x)
+ end
+end
+
+def fun_l23_n534(x)
+ if (x < 1)
+ fun_l24_n544(x)
+ else
+ fun_l24_n358(x)
+ end
+end
+
+def fun_l23_n535(x)
+ if (x < 1)
+ fun_l24_n456(x)
+ else
+ fun_l24_n569(x)
+ end
+end
+
+def fun_l23_n536(x)
+ if (x < 1)
+ fun_l24_n235(x)
+ else
+ fun_l24_n182(x)
+ end
+end
+
+def fun_l23_n537(x)
+ if (x < 1)
+ fun_l24_n159(x)
+ else
+ fun_l24_n674(x)
+ end
+end
+
+def fun_l23_n538(x)
+ if (x < 1)
+ fun_l24_n956(x)
+ else
+ fun_l24_n145(x)
+ end
+end
+
+def fun_l23_n539(x)
+ if (x < 1)
+ fun_l24_n294(x)
+ else
+ fun_l24_n910(x)
+ end
+end
+
+def fun_l23_n540(x)
+ if (x < 1)
+ fun_l24_n434(x)
+ else
+ fun_l24_n336(x)
+ end
+end
+
+def fun_l23_n541(x)
+ if (x < 1)
+ fun_l24_n635(x)
+ else
+ fun_l24_n182(x)
+ end
+end
+
+def fun_l23_n542(x)
+ if (x < 1)
+ fun_l24_n418(x)
+ else
+ fun_l24_n828(x)
+ end
+end
+
+def fun_l23_n543(x)
+ if (x < 1)
+ fun_l24_n337(x)
+ else
+ fun_l24_n740(x)
+ end
+end
+
+def fun_l23_n544(x)
+ if (x < 1)
+ fun_l24_n893(x)
+ else
+ fun_l24_n402(x)
+ end
+end
+
+def fun_l23_n545(x)
+ if (x < 1)
+ fun_l24_n407(x)
+ else
+ fun_l24_n124(x)
+ end
+end
+
+def fun_l23_n546(x)
+ if (x < 1)
+ fun_l24_n170(x)
+ else
+ fun_l24_n64(x)
+ end
+end
+
+def fun_l23_n547(x)
+ if (x < 1)
+ fun_l24_n936(x)
+ else
+ fun_l24_n876(x)
+ end
+end
+
+def fun_l23_n548(x)
+ if (x < 1)
+ fun_l24_n387(x)
+ else
+ fun_l24_n655(x)
+ end
+end
+
+def fun_l23_n549(x)
+ if (x < 1)
+ fun_l24_n162(x)
+ else
+ fun_l24_n210(x)
+ end
+end
+
+def fun_l23_n550(x)
+ if (x < 1)
+ fun_l24_n454(x)
+ else
+ fun_l24_n695(x)
+ end
+end
+
+def fun_l23_n551(x)
+ if (x < 1)
+ fun_l24_n410(x)
+ else
+ fun_l24_n529(x)
+ end
+end
+
+def fun_l23_n552(x)
+ if (x < 1)
+ fun_l24_n726(x)
+ else
+ fun_l24_n450(x)
+ end
+end
+
+def fun_l23_n553(x)
+ if (x < 1)
+ fun_l24_n39(x)
+ else
+ fun_l24_n37(x)
+ end
+end
+
+def fun_l23_n554(x)
+ if (x < 1)
+ fun_l24_n994(x)
+ else
+ fun_l24_n106(x)
+ end
+end
+
+def fun_l23_n555(x)
+ if (x < 1)
+ fun_l24_n929(x)
+ else
+ fun_l24_n766(x)
+ end
+end
+
+def fun_l23_n556(x)
+ if (x < 1)
+ fun_l24_n531(x)
+ else
+ fun_l24_n502(x)
+ end
+end
+
+def fun_l23_n557(x)
+ if (x < 1)
+ fun_l24_n890(x)
+ else
+ fun_l24_n919(x)
+ end
+end
+
+def fun_l23_n558(x)
+ if (x < 1)
+ fun_l24_n803(x)
+ else
+ fun_l24_n460(x)
+ end
+end
+
+def fun_l23_n559(x)
+ if (x < 1)
+ fun_l24_n5(x)
+ else
+ fun_l24_n464(x)
+ end
+end
+
+def fun_l23_n560(x)
+ if (x < 1)
+ fun_l24_n506(x)
+ else
+ fun_l24_n891(x)
+ end
+end
+
+def fun_l23_n561(x)
+ if (x < 1)
+ fun_l24_n98(x)
+ else
+ fun_l24_n534(x)
+ end
+end
+
+def fun_l23_n562(x)
+ if (x < 1)
+ fun_l24_n130(x)
+ else
+ fun_l24_n54(x)
+ end
+end
+
+def fun_l23_n563(x)
+ if (x < 1)
+ fun_l24_n881(x)
+ else
+ fun_l24_n699(x)
+ end
+end
+
+def fun_l23_n564(x)
+ if (x < 1)
+ fun_l24_n192(x)
+ else
+ fun_l24_n112(x)
+ end
+end
+
+def fun_l23_n565(x)
+ if (x < 1)
+ fun_l24_n249(x)
+ else
+ fun_l24_n796(x)
+ end
+end
+
+def fun_l23_n566(x)
+ if (x < 1)
+ fun_l24_n113(x)
+ else
+ fun_l24_n599(x)
+ end
+end
+
+def fun_l23_n567(x)
+ if (x < 1)
+ fun_l24_n334(x)
+ else
+ fun_l24_n80(x)
+ end
+end
+
+def fun_l23_n568(x)
+ if (x < 1)
+ fun_l24_n347(x)
+ else
+ fun_l24_n726(x)
+ end
+end
+
+def fun_l23_n569(x)
+ if (x < 1)
+ fun_l24_n60(x)
+ else
+ fun_l24_n249(x)
+ end
+end
+
+def fun_l23_n570(x)
+ if (x < 1)
+ fun_l24_n400(x)
+ else
+ fun_l24_n773(x)
+ end
+end
+
+def fun_l23_n571(x)
+ if (x < 1)
+ fun_l24_n172(x)
+ else
+ fun_l24_n787(x)
+ end
+end
+
+def fun_l23_n572(x)
+ if (x < 1)
+ fun_l24_n973(x)
+ else
+ fun_l24_n875(x)
+ end
+end
+
+def fun_l23_n573(x)
+ if (x < 1)
+ fun_l24_n290(x)
+ else
+ fun_l24_n225(x)
+ end
+end
+
+def fun_l23_n574(x)
+ if (x < 1)
+ fun_l24_n383(x)
+ else
+ fun_l24_n714(x)
+ end
+end
+
+def fun_l23_n575(x)
+ if (x < 1)
+ fun_l24_n32(x)
+ else
+ fun_l24_n508(x)
+ end
+end
+
+def fun_l23_n576(x)
+ if (x < 1)
+ fun_l24_n74(x)
+ else
+ fun_l24_n368(x)
+ end
+end
+
+def fun_l23_n577(x)
+ if (x < 1)
+ fun_l24_n431(x)
+ else
+ fun_l24_n2(x)
+ end
+end
+
+def fun_l23_n578(x)
+ if (x < 1)
+ fun_l24_n758(x)
+ else
+ fun_l24_n178(x)
+ end
+end
+
+def fun_l23_n579(x)
+ if (x < 1)
+ fun_l24_n130(x)
+ else
+ fun_l24_n512(x)
+ end
+end
+
+def fun_l23_n580(x)
+ if (x < 1)
+ fun_l24_n790(x)
+ else
+ fun_l24_n280(x)
+ end
+end
+
+def fun_l23_n581(x)
+ if (x < 1)
+ fun_l24_n76(x)
+ else
+ fun_l24_n596(x)
+ end
+end
+
+def fun_l23_n582(x)
+ if (x < 1)
+ fun_l24_n643(x)
+ else
+ fun_l24_n506(x)
+ end
+end
+
+def fun_l23_n583(x)
+ if (x < 1)
+ fun_l24_n392(x)
+ else
+ fun_l24_n671(x)
+ end
+end
+
+def fun_l23_n584(x)
+ if (x < 1)
+ fun_l24_n722(x)
+ else
+ fun_l24_n390(x)
+ end
+end
+
+def fun_l23_n585(x)
+ if (x < 1)
+ fun_l24_n613(x)
+ else
+ fun_l24_n461(x)
+ end
+end
+
+def fun_l23_n586(x)
+ if (x < 1)
+ fun_l24_n784(x)
+ else
+ fun_l24_n426(x)
+ end
+end
+
+def fun_l23_n587(x)
+ if (x < 1)
+ fun_l24_n351(x)
+ else
+ fun_l24_n68(x)
+ end
+end
+
+def fun_l23_n588(x)
+ if (x < 1)
+ fun_l24_n8(x)
+ else
+ fun_l24_n9(x)
+ end
+end
+
+def fun_l23_n589(x)
+ if (x < 1)
+ fun_l24_n984(x)
+ else
+ fun_l24_n704(x)
+ end
+end
+
+def fun_l23_n590(x)
+ if (x < 1)
+ fun_l24_n150(x)
+ else
+ fun_l24_n36(x)
+ end
+end
+
+def fun_l23_n591(x)
+ if (x < 1)
+ fun_l24_n232(x)
+ else
+ fun_l24_n293(x)
+ end
+end
+
+def fun_l23_n592(x)
+ if (x < 1)
+ fun_l24_n763(x)
+ else
+ fun_l24_n444(x)
+ end
+end
+
+def fun_l23_n593(x)
+ if (x < 1)
+ fun_l24_n246(x)
+ else
+ fun_l24_n101(x)
+ end
+end
+
+def fun_l23_n594(x)
+ if (x < 1)
+ fun_l24_n145(x)
+ else
+ fun_l24_n626(x)
+ end
+end
+
+def fun_l23_n595(x)
+ if (x < 1)
+ fun_l24_n835(x)
+ else
+ fun_l24_n827(x)
+ end
+end
+
+def fun_l23_n596(x)
+ if (x < 1)
+ fun_l24_n925(x)
+ else
+ fun_l24_n875(x)
+ end
+end
+
+def fun_l23_n597(x)
+ if (x < 1)
+ fun_l24_n600(x)
+ else
+ fun_l24_n817(x)
+ end
+end
+
+def fun_l23_n598(x)
+ if (x < 1)
+ fun_l24_n653(x)
+ else
+ fun_l24_n632(x)
+ end
+end
+
+def fun_l23_n599(x)
+ if (x < 1)
+ fun_l24_n103(x)
+ else
+ fun_l24_n675(x)
+ end
+end
+
+def fun_l23_n600(x)
+ if (x < 1)
+ fun_l24_n1(x)
+ else
+ fun_l24_n899(x)
+ end
+end
+
+def fun_l23_n601(x)
+ if (x < 1)
+ fun_l24_n357(x)
+ else
+ fun_l24_n88(x)
+ end
+end
+
+def fun_l23_n602(x)
+ if (x < 1)
+ fun_l24_n213(x)
+ else
+ fun_l24_n71(x)
+ end
+end
+
+def fun_l23_n603(x)
+ if (x < 1)
+ fun_l24_n299(x)
+ else
+ fun_l24_n283(x)
+ end
+end
+
+def fun_l23_n604(x)
+ if (x < 1)
+ fun_l24_n647(x)
+ else
+ fun_l24_n891(x)
+ end
+end
+
+def fun_l23_n605(x)
+ if (x < 1)
+ fun_l24_n86(x)
+ else
+ fun_l24_n581(x)
+ end
+end
+
+def fun_l23_n606(x)
+ if (x < 1)
+ fun_l24_n749(x)
+ else
+ fun_l24_n780(x)
+ end
+end
+
+def fun_l23_n607(x)
+ if (x < 1)
+ fun_l24_n537(x)
+ else
+ fun_l24_n22(x)
+ end
+end
+
+def fun_l23_n608(x)
+ if (x < 1)
+ fun_l24_n535(x)
+ else
+ fun_l24_n379(x)
+ end
+end
+
+def fun_l23_n609(x)
+ if (x < 1)
+ fun_l24_n860(x)
+ else
+ fun_l24_n220(x)
+ end
+end
+
+def fun_l23_n610(x)
+ if (x < 1)
+ fun_l24_n366(x)
+ else
+ fun_l24_n216(x)
+ end
+end
+
+def fun_l23_n611(x)
+ if (x < 1)
+ fun_l24_n79(x)
+ else
+ fun_l24_n506(x)
+ end
+end
+
+def fun_l23_n612(x)
+ if (x < 1)
+ fun_l24_n600(x)
+ else
+ fun_l24_n367(x)
+ end
+end
+
+def fun_l23_n613(x)
+ if (x < 1)
+ fun_l24_n764(x)
+ else
+ fun_l24_n167(x)
+ end
+end
+
+def fun_l23_n614(x)
+ if (x < 1)
+ fun_l24_n113(x)
+ else
+ fun_l24_n398(x)
+ end
+end
+
+def fun_l23_n615(x)
+ if (x < 1)
+ fun_l24_n292(x)
+ else
+ fun_l24_n1(x)
+ end
+end
+
+def fun_l23_n616(x)
+ if (x < 1)
+ fun_l24_n523(x)
+ else
+ fun_l24_n344(x)
+ end
+end
+
+def fun_l23_n617(x)
+ if (x < 1)
+ fun_l24_n60(x)
+ else
+ fun_l24_n618(x)
+ end
+end
+
+def fun_l23_n618(x)
+ if (x < 1)
+ fun_l24_n252(x)
+ else
+ fun_l24_n718(x)
+ end
+end
+
+def fun_l23_n619(x)
+ if (x < 1)
+ fun_l24_n962(x)
+ else
+ fun_l24_n69(x)
+ end
+end
+
+def fun_l23_n620(x)
+ if (x < 1)
+ fun_l24_n10(x)
+ else
+ fun_l24_n87(x)
+ end
+end
+
+def fun_l23_n621(x)
+ if (x < 1)
+ fun_l24_n128(x)
+ else
+ fun_l24_n958(x)
+ end
+end
+
+def fun_l23_n622(x)
+ if (x < 1)
+ fun_l24_n775(x)
+ else
+ fun_l24_n205(x)
+ end
+end
+
+def fun_l23_n623(x)
+ if (x < 1)
+ fun_l24_n121(x)
+ else
+ fun_l24_n69(x)
+ end
+end
+
+def fun_l23_n624(x)
+ if (x < 1)
+ fun_l24_n768(x)
+ else
+ fun_l24_n439(x)
+ end
+end
+
+def fun_l23_n625(x)
+ if (x < 1)
+ fun_l24_n332(x)
+ else
+ fun_l24_n73(x)
+ end
+end
+
+def fun_l23_n626(x)
+ if (x < 1)
+ fun_l24_n735(x)
+ else
+ fun_l24_n651(x)
+ end
+end
+
+def fun_l23_n627(x)
+ if (x < 1)
+ fun_l24_n661(x)
+ else
+ fun_l24_n827(x)
+ end
+end
+
+def fun_l23_n628(x)
+ if (x < 1)
+ fun_l24_n607(x)
+ else
+ fun_l24_n343(x)
+ end
+end
+
+def fun_l23_n629(x)
+ if (x < 1)
+ fun_l24_n868(x)
+ else
+ fun_l24_n633(x)
+ end
+end
+
+def fun_l23_n630(x)
+ if (x < 1)
+ fun_l24_n321(x)
+ else
+ fun_l24_n44(x)
+ end
+end
+
+def fun_l23_n631(x)
+ if (x < 1)
+ fun_l24_n840(x)
+ else
+ fun_l24_n265(x)
+ end
+end
+
+def fun_l23_n632(x)
+ if (x < 1)
+ fun_l24_n710(x)
+ else
+ fun_l24_n343(x)
+ end
+end
+
+def fun_l23_n633(x)
+ if (x < 1)
+ fun_l24_n640(x)
+ else
+ fun_l24_n112(x)
+ end
+end
+
+def fun_l23_n634(x)
+ if (x < 1)
+ fun_l24_n237(x)
+ else
+ fun_l24_n83(x)
+ end
+end
+
+def fun_l23_n635(x)
+ if (x < 1)
+ fun_l24_n235(x)
+ else
+ fun_l24_n970(x)
+ end
+end
+
+def fun_l23_n636(x)
+ if (x < 1)
+ fun_l24_n576(x)
+ else
+ fun_l24_n891(x)
+ end
+end
+
+def fun_l23_n637(x)
+ if (x < 1)
+ fun_l24_n489(x)
+ else
+ fun_l24_n136(x)
+ end
+end
+
+def fun_l23_n638(x)
+ if (x < 1)
+ fun_l24_n532(x)
+ else
+ fun_l24_n150(x)
+ end
+end
+
+def fun_l23_n639(x)
+ if (x < 1)
+ fun_l24_n496(x)
+ else
+ fun_l24_n57(x)
+ end
+end
+
+def fun_l23_n640(x)
+ if (x < 1)
+ fun_l24_n857(x)
+ else
+ fun_l24_n564(x)
+ end
+end
+
+def fun_l23_n641(x)
+ if (x < 1)
+ fun_l24_n203(x)
+ else
+ fun_l24_n730(x)
+ end
+end
+
+def fun_l23_n642(x)
+ if (x < 1)
+ fun_l24_n38(x)
+ else
+ fun_l24_n388(x)
+ end
+end
+
+def fun_l23_n643(x)
+ if (x < 1)
+ fun_l24_n650(x)
+ else
+ fun_l24_n672(x)
+ end
+end
+
+def fun_l23_n644(x)
+ if (x < 1)
+ fun_l24_n842(x)
+ else
+ fun_l24_n473(x)
+ end
+end
+
+def fun_l23_n645(x)
+ if (x < 1)
+ fun_l24_n650(x)
+ else
+ fun_l24_n36(x)
+ end
+end
+
+def fun_l23_n646(x)
+ if (x < 1)
+ fun_l24_n25(x)
+ else
+ fun_l24_n696(x)
+ end
+end
+
+def fun_l23_n647(x)
+ if (x < 1)
+ fun_l24_n24(x)
+ else
+ fun_l24_n414(x)
+ end
+end
+
+def fun_l23_n648(x)
+ if (x < 1)
+ fun_l24_n778(x)
+ else
+ fun_l24_n794(x)
+ end
+end
+
+def fun_l23_n649(x)
+ if (x < 1)
+ fun_l24_n132(x)
+ else
+ fun_l24_n833(x)
+ end
+end
+
+def fun_l23_n650(x)
+ if (x < 1)
+ fun_l24_n718(x)
+ else
+ fun_l24_n327(x)
+ end
+end
+
+def fun_l23_n651(x)
+ if (x < 1)
+ fun_l24_n969(x)
+ else
+ fun_l24_n865(x)
+ end
+end
+
+def fun_l23_n652(x)
+ if (x < 1)
+ fun_l24_n904(x)
+ else
+ fun_l24_n4(x)
+ end
+end
+
+def fun_l23_n653(x)
+ if (x < 1)
+ fun_l24_n342(x)
+ else
+ fun_l24_n953(x)
+ end
+end
+
+def fun_l23_n654(x)
+ if (x < 1)
+ fun_l24_n393(x)
+ else
+ fun_l24_n175(x)
+ end
+end
+
+def fun_l23_n655(x)
+ if (x < 1)
+ fun_l24_n241(x)
+ else
+ fun_l24_n835(x)
+ end
+end
+
+def fun_l23_n656(x)
+ if (x < 1)
+ fun_l24_n326(x)
+ else
+ fun_l24_n294(x)
+ end
+end
+
+def fun_l23_n657(x)
+ if (x < 1)
+ fun_l24_n8(x)
+ else
+ fun_l24_n327(x)
+ end
+end
+
+def fun_l23_n658(x)
+ if (x < 1)
+ fun_l24_n859(x)
+ else
+ fun_l24_n138(x)
+ end
+end
+
+def fun_l23_n659(x)
+ if (x < 1)
+ fun_l24_n389(x)
+ else
+ fun_l24_n840(x)
+ end
+end
+
+def fun_l23_n660(x)
+ if (x < 1)
+ fun_l24_n171(x)
+ else
+ fun_l24_n731(x)
+ end
+end
+
+def fun_l23_n661(x)
+ if (x < 1)
+ fun_l24_n284(x)
+ else
+ fun_l24_n358(x)
+ end
+end
+
+def fun_l23_n662(x)
+ if (x < 1)
+ fun_l24_n329(x)
+ else
+ fun_l24_n459(x)
+ end
+end
+
+def fun_l23_n663(x)
+ if (x < 1)
+ fun_l24_n6(x)
+ else
+ fun_l24_n29(x)
+ end
+end
+
+def fun_l23_n664(x)
+ if (x < 1)
+ fun_l24_n324(x)
+ else
+ fun_l24_n58(x)
+ end
+end
+
+def fun_l23_n665(x)
+ if (x < 1)
+ fun_l24_n473(x)
+ else
+ fun_l24_n932(x)
+ end
+end
+
+def fun_l23_n666(x)
+ if (x < 1)
+ fun_l24_n425(x)
+ else
+ fun_l24_n49(x)
+ end
+end
+
+def fun_l23_n667(x)
+ if (x < 1)
+ fun_l24_n122(x)
+ else
+ fun_l24_n515(x)
+ end
+end
+
+def fun_l23_n668(x)
+ if (x < 1)
+ fun_l24_n883(x)
+ else
+ fun_l24_n383(x)
+ end
+end
+
+def fun_l23_n669(x)
+ if (x < 1)
+ fun_l24_n316(x)
+ else
+ fun_l24_n456(x)
+ end
+end
+
+def fun_l23_n670(x)
+ if (x < 1)
+ fun_l24_n812(x)
+ else
+ fun_l24_n625(x)
+ end
+end
+
+def fun_l23_n671(x)
+ if (x < 1)
+ fun_l24_n431(x)
+ else
+ fun_l24_n685(x)
+ end
+end
+
+def fun_l23_n672(x)
+ if (x < 1)
+ fun_l24_n68(x)
+ else
+ fun_l24_n112(x)
+ end
+end
+
+def fun_l23_n673(x)
+ if (x < 1)
+ fun_l24_n137(x)
+ else
+ fun_l24_n349(x)
+ end
+end
+
+def fun_l23_n674(x)
+ if (x < 1)
+ fun_l24_n629(x)
+ else
+ fun_l24_n165(x)
+ end
+end
+
+def fun_l23_n675(x)
+ if (x < 1)
+ fun_l24_n484(x)
+ else
+ fun_l24_n102(x)
+ end
+end
+
+def fun_l23_n676(x)
+ if (x < 1)
+ fun_l24_n641(x)
+ else
+ fun_l24_n912(x)
+ end
+end
+
+def fun_l23_n677(x)
+ if (x < 1)
+ fun_l24_n817(x)
+ else
+ fun_l24_n975(x)
+ end
+end
+
+def fun_l23_n678(x)
+ if (x < 1)
+ fun_l24_n510(x)
+ else
+ fun_l24_n346(x)
+ end
+end
+
+def fun_l23_n679(x)
+ if (x < 1)
+ fun_l24_n129(x)
+ else
+ fun_l24_n602(x)
+ end
+end
+
+def fun_l23_n680(x)
+ if (x < 1)
+ fun_l24_n991(x)
+ else
+ fun_l24_n406(x)
+ end
+end
+
+def fun_l23_n681(x)
+ if (x < 1)
+ fun_l24_n433(x)
+ else
+ fun_l24_n998(x)
+ end
+end
+
+def fun_l23_n682(x)
+ if (x < 1)
+ fun_l24_n645(x)
+ else
+ fun_l24_n275(x)
+ end
+end
+
+def fun_l23_n683(x)
+ if (x < 1)
+ fun_l24_n832(x)
+ else
+ fun_l24_n346(x)
+ end
+end
+
+def fun_l23_n684(x)
+ if (x < 1)
+ fun_l24_n769(x)
+ else
+ fun_l24_n927(x)
+ end
+end
+
+def fun_l23_n685(x)
+ if (x < 1)
+ fun_l24_n389(x)
+ else
+ fun_l24_n777(x)
+ end
+end
+
+def fun_l23_n686(x)
+ if (x < 1)
+ fun_l24_n658(x)
+ else
+ fun_l24_n184(x)
+ end
+end
+
+def fun_l23_n687(x)
+ if (x < 1)
+ fun_l24_n134(x)
+ else
+ fun_l24_n517(x)
+ end
+end
+
+def fun_l23_n688(x)
+ if (x < 1)
+ fun_l24_n49(x)
+ else
+ fun_l24_n392(x)
+ end
+end
+
+def fun_l23_n689(x)
+ if (x < 1)
+ fun_l24_n23(x)
+ else
+ fun_l24_n402(x)
+ end
+end
+
+def fun_l23_n690(x)
+ if (x < 1)
+ fun_l24_n719(x)
+ else
+ fun_l24_n529(x)
+ end
+end
+
+def fun_l23_n691(x)
+ if (x < 1)
+ fun_l24_n543(x)
+ else
+ fun_l24_n789(x)
+ end
+end
+
+def fun_l23_n692(x)
+ if (x < 1)
+ fun_l24_n850(x)
+ else
+ fun_l24_n50(x)
+ end
+end
+
+def fun_l23_n693(x)
+ if (x < 1)
+ fun_l24_n728(x)
+ else
+ fun_l24_n730(x)
+ end
+end
+
+def fun_l23_n694(x)
+ if (x < 1)
+ fun_l24_n810(x)
+ else
+ fun_l24_n999(x)
+ end
+end
+
+def fun_l23_n695(x)
+ if (x < 1)
+ fun_l24_n856(x)
+ else
+ fun_l24_n404(x)
+ end
+end
+
+def fun_l23_n696(x)
+ if (x < 1)
+ fun_l24_n405(x)
+ else
+ fun_l24_n275(x)
+ end
+end
+
+def fun_l23_n697(x)
+ if (x < 1)
+ fun_l24_n446(x)
+ else
+ fun_l24_n773(x)
+ end
+end
+
+def fun_l23_n698(x)
+ if (x < 1)
+ fun_l24_n509(x)
+ else
+ fun_l24_n146(x)
+ end
+end
+
+def fun_l23_n699(x)
+ if (x < 1)
+ fun_l24_n770(x)
+ else
+ fun_l24_n275(x)
+ end
+end
+
+def fun_l23_n700(x)
+ if (x < 1)
+ fun_l24_n222(x)
+ else
+ fun_l24_n60(x)
+ end
+end
+
+def fun_l23_n701(x)
+ if (x < 1)
+ fun_l24_n380(x)
+ else
+ fun_l24_n654(x)
+ end
+end
+
+def fun_l23_n702(x)
+ if (x < 1)
+ fun_l24_n417(x)
+ else
+ fun_l24_n221(x)
+ end
+end
+
+def fun_l23_n703(x)
+ if (x < 1)
+ fun_l24_n283(x)
+ else
+ fun_l24_n171(x)
+ end
+end
+
+def fun_l23_n704(x)
+ if (x < 1)
+ fun_l24_n822(x)
+ else
+ fun_l24_n72(x)
+ end
+end
+
+def fun_l23_n705(x)
+ if (x < 1)
+ fun_l24_n171(x)
+ else
+ fun_l24_n258(x)
+ end
+end
+
+def fun_l23_n706(x)
+ if (x < 1)
+ fun_l24_n147(x)
+ else
+ fun_l24_n518(x)
+ end
+end
+
+def fun_l23_n707(x)
+ if (x < 1)
+ fun_l24_n479(x)
+ else
+ fun_l24_n267(x)
+ end
+end
+
+def fun_l23_n708(x)
+ if (x < 1)
+ fun_l24_n424(x)
+ else
+ fun_l24_n517(x)
+ end
+end
+
+def fun_l23_n709(x)
+ if (x < 1)
+ fun_l24_n816(x)
+ else
+ fun_l24_n329(x)
+ end
+end
+
+def fun_l23_n710(x)
+ if (x < 1)
+ fun_l24_n870(x)
+ else
+ fun_l24_n185(x)
+ end
+end
+
+def fun_l23_n711(x)
+ if (x < 1)
+ fun_l24_n726(x)
+ else
+ fun_l24_n950(x)
+ end
+end
+
+def fun_l23_n712(x)
+ if (x < 1)
+ fun_l24_n473(x)
+ else
+ fun_l24_n179(x)
+ end
+end
+
+def fun_l23_n713(x)
+ if (x < 1)
+ fun_l24_n345(x)
+ else
+ fun_l24_n872(x)
+ end
+end
+
+def fun_l23_n714(x)
+ if (x < 1)
+ fun_l24_n757(x)
+ else
+ fun_l24_n364(x)
+ end
+end
+
+def fun_l23_n715(x)
+ if (x < 1)
+ fun_l24_n91(x)
+ else
+ fun_l24_n999(x)
+ end
+end
+
+def fun_l23_n716(x)
+ if (x < 1)
+ fun_l24_n308(x)
+ else
+ fun_l24_n281(x)
+ end
+end
+
+def fun_l23_n717(x)
+ if (x < 1)
+ fun_l24_n855(x)
+ else
+ fun_l24_n175(x)
+ end
+end
+
+def fun_l23_n718(x)
+ if (x < 1)
+ fun_l24_n251(x)
+ else
+ fun_l24_n532(x)
+ end
+end
+
+def fun_l23_n719(x)
+ if (x < 1)
+ fun_l24_n261(x)
+ else
+ fun_l24_n755(x)
+ end
+end
+
+def fun_l23_n720(x)
+ if (x < 1)
+ fun_l24_n182(x)
+ else
+ fun_l24_n115(x)
+ end
+end
+
+def fun_l23_n721(x)
+ if (x < 1)
+ fun_l24_n648(x)
+ else
+ fun_l24_n728(x)
+ end
+end
+
+def fun_l23_n722(x)
+ if (x < 1)
+ fun_l24_n552(x)
+ else
+ fun_l24_n549(x)
+ end
+end
+
+def fun_l23_n723(x)
+ if (x < 1)
+ fun_l24_n24(x)
+ else
+ fun_l24_n794(x)
+ end
+end
+
+def fun_l23_n724(x)
+ if (x < 1)
+ fun_l24_n242(x)
+ else
+ fun_l24_n980(x)
+ end
+end
+
+def fun_l23_n725(x)
+ if (x < 1)
+ fun_l24_n931(x)
+ else
+ fun_l24_n711(x)
+ end
+end
+
+def fun_l23_n726(x)
+ if (x < 1)
+ fun_l24_n659(x)
+ else
+ fun_l24_n981(x)
+ end
+end
+
+def fun_l23_n727(x)
+ if (x < 1)
+ fun_l24_n258(x)
+ else
+ fun_l24_n915(x)
+ end
+end
+
+def fun_l23_n728(x)
+ if (x < 1)
+ fun_l24_n544(x)
+ else
+ fun_l24_n89(x)
+ end
+end
+
+def fun_l23_n729(x)
+ if (x < 1)
+ fun_l24_n497(x)
+ else
+ fun_l24_n320(x)
+ end
+end
+
+def fun_l23_n730(x)
+ if (x < 1)
+ fun_l24_n936(x)
+ else
+ fun_l24_n209(x)
+ end
+end
+
+def fun_l23_n731(x)
+ if (x < 1)
+ fun_l24_n763(x)
+ else
+ fun_l24_n836(x)
+ end
+end
+
+def fun_l23_n732(x)
+ if (x < 1)
+ fun_l24_n60(x)
+ else
+ fun_l24_n867(x)
+ end
+end
+
+def fun_l23_n733(x)
+ if (x < 1)
+ fun_l24_n146(x)
+ else
+ fun_l24_n294(x)
+ end
+end
+
+def fun_l23_n734(x)
+ if (x < 1)
+ fun_l24_n905(x)
+ else
+ fun_l24_n463(x)
+ end
+end
+
+def fun_l23_n735(x)
+ if (x < 1)
+ fun_l24_n566(x)
+ else
+ fun_l24_n240(x)
+ end
+end
+
+def fun_l23_n736(x)
+ if (x < 1)
+ fun_l24_n321(x)
+ else
+ fun_l24_n597(x)
+ end
+end
+
+def fun_l23_n737(x)
+ if (x < 1)
+ fun_l24_n169(x)
+ else
+ fun_l24_n201(x)
+ end
+end
+
+def fun_l23_n738(x)
+ if (x < 1)
+ fun_l24_n157(x)
+ else
+ fun_l24_n349(x)
+ end
+end
+
+def fun_l23_n739(x)
+ if (x < 1)
+ fun_l24_n503(x)
+ else
+ fun_l24_n342(x)
+ end
+end
+
+def fun_l23_n740(x)
+ if (x < 1)
+ fun_l24_n974(x)
+ else
+ fun_l24_n467(x)
+ end
+end
+
+def fun_l23_n741(x)
+ if (x < 1)
+ fun_l24_n566(x)
+ else
+ fun_l24_n162(x)
+ end
+end
+
+def fun_l23_n742(x)
+ if (x < 1)
+ fun_l24_n19(x)
+ else
+ fun_l24_n750(x)
+ end
+end
+
+def fun_l23_n743(x)
+ if (x < 1)
+ fun_l24_n409(x)
+ else
+ fun_l24_n362(x)
+ end
+end
+
+def fun_l23_n744(x)
+ if (x < 1)
+ fun_l24_n281(x)
+ else
+ fun_l24_n439(x)
+ end
+end
+
+def fun_l23_n745(x)
+ if (x < 1)
+ fun_l24_n808(x)
+ else
+ fun_l24_n794(x)
+ end
+end
+
+def fun_l23_n746(x)
+ if (x < 1)
+ fun_l24_n173(x)
+ else
+ fun_l24_n892(x)
+ end
+end
+
+def fun_l23_n747(x)
+ if (x < 1)
+ fun_l24_n762(x)
+ else
+ fun_l24_n339(x)
+ end
+end
+
+def fun_l23_n748(x)
+ if (x < 1)
+ fun_l24_n319(x)
+ else
+ fun_l24_n753(x)
+ end
+end
+
+def fun_l23_n749(x)
+ if (x < 1)
+ fun_l24_n546(x)
+ else
+ fun_l24_n727(x)
+ end
+end
+
+def fun_l23_n750(x)
+ if (x < 1)
+ fun_l24_n699(x)
+ else
+ fun_l24_n173(x)
+ end
+end
+
+def fun_l23_n751(x)
+ if (x < 1)
+ fun_l24_n280(x)
+ else
+ fun_l24_n468(x)
+ end
+end
+
+def fun_l23_n752(x)
+ if (x < 1)
+ fun_l24_n910(x)
+ else
+ fun_l24_n500(x)
+ end
+end
+
+def fun_l23_n753(x)
+ if (x < 1)
+ fun_l24_n463(x)
+ else
+ fun_l24_n81(x)
+ end
+end
+
+def fun_l23_n754(x)
+ if (x < 1)
+ fun_l24_n769(x)
+ else
+ fun_l24_n584(x)
+ end
+end
+
+def fun_l23_n755(x)
+ if (x < 1)
+ fun_l24_n702(x)
+ else
+ fun_l24_n337(x)
+ end
+end
+
+def fun_l23_n756(x)
+ if (x < 1)
+ fun_l24_n12(x)
+ else
+ fun_l24_n335(x)
+ end
+end
+
+def fun_l23_n757(x)
+ if (x < 1)
+ fun_l24_n100(x)
+ else
+ fun_l24_n743(x)
+ end
+end
+
+def fun_l23_n758(x)
+ if (x < 1)
+ fun_l24_n865(x)
+ else
+ fun_l24_n594(x)
+ end
+end
+
+def fun_l23_n759(x)
+ if (x < 1)
+ fun_l24_n948(x)
+ else
+ fun_l24_n32(x)
+ end
+end
+
+def fun_l23_n760(x)
+ if (x < 1)
+ fun_l24_n487(x)
+ else
+ fun_l24_n72(x)
+ end
+end
+
+def fun_l23_n761(x)
+ if (x < 1)
+ fun_l24_n566(x)
+ else
+ fun_l24_n290(x)
+ end
+end
+
+def fun_l23_n762(x)
+ if (x < 1)
+ fun_l24_n896(x)
+ else
+ fun_l24_n840(x)
+ end
+end
+
+def fun_l23_n763(x)
+ if (x < 1)
+ fun_l24_n175(x)
+ else
+ fun_l24_n50(x)
+ end
+end
+
+def fun_l23_n764(x)
+ if (x < 1)
+ fun_l24_n107(x)
+ else
+ fun_l24_n446(x)
+ end
+end
+
+def fun_l23_n765(x)
+ if (x < 1)
+ fun_l24_n238(x)
+ else
+ fun_l24_n944(x)
+ end
+end
+
+def fun_l23_n766(x)
+ if (x < 1)
+ fun_l24_n999(x)
+ else
+ fun_l24_n419(x)
+ end
+end
+
+def fun_l23_n767(x)
+ if (x < 1)
+ fun_l24_n476(x)
+ else
+ fun_l24_n976(x)
+ end
+end
+
+def fun_l23_n768(x)
+ if (x < 1)
+ fun_l24_n328(x)
+ else
+ fun_l24_n782(x)
+ end
+end
+
+def fun_l23_n769(x)
+ if (x < 1)
+ fun_l24_n875(x)
+ else
+ fun_l24_n847(x)
+ end
+end
+
+def fun_l23_n770(x)
+ if (x < 1)
+ fun_l24_n391(x)
+ else
+ fun_l24_n123(x)
+ end
+end
+
+def fun_l23_n771(x)
+ if (x < 1)
+ fun_l24_n968(x)
+ else
+ fun_l24_n915(x)
+ end
+end
+
+def fun_l23_n772(x)
+ if (x < 1)
+ fun_l24_n883(x)
+ else
+ fun_l24_n604(x)
+ end
+end
+
+def fun_l23_n773(x)
+ if (x < 1)
+ fun_l24_n307(x)
+ else
+ fun_l24_n70(x)
+ end
+end
+
+def fun_l23_n774(x)
+ if (x < 1)
+ fun_l24_n615(x)
+ else
+ fun_l24_n115(x)
+ end
+end
+
+def fun_l23_n775(x)
+ if (x < 1)
+ fun_l24_n250(x)
+ else
+ fun_l24_n178(x)
+ end
+end
+
+def fun_l23_n776(x)
+ if (x < 1)
+ fun_l24_n982(x)
+ else
+ fun_l24_n570(x)
+ end
+end
+
+def fun_l23_n777(x)
+ if (x < 1)
+ fun_l24_n317(x)
+ else
+ fun_l24_n170(x)
+ end
+end
+
+def fun_l23_n778(x)
+ if (x < 1)
+ fun_l24_n895(x)
+ else
+ fun_l24_n147(x)
+ end
+end
+
+def fun_l23_n779(x)
+ if (x < 1)
+ fun_l24_n393(x)
+ else
+ fun_l24_n513(x)
+ end
+end
+
+def fun_l23_n780(x)
+ if (x < 1)
+ fun_l24_n635(x)
+ else
+ fun_l24_n161(x)
+ end
+end
+
+def fun_l23_n781(x)
+ if (x < 1)
+ fun_l24_n189(x)
+ else
+ fun_l24_n225(x)
+ end
+end
+
+def fun_l23_n782(x)
+ if (x < 1)
+ fun_l24_n205(x)
+ else
+ fun_l24_n620(x)
+ end
+end
+
+def fun_l23_n783(x)
+ if (x < 1)
+ fun_l24_n203(x)
+ else
+ fun_l24_n58(x)
+ end
+end
+
+def fun_l23_n784(x)
+ if (x < 1)
+ fun_l24_n198(x)
+ else
+ fun_l24_n948(x)
+ end
+end
+
+def fun_l23_n785(x)
+ if (x < 1)
+ fun_l24_n60(x)
+ else
+ fun_l24_n406(x)
+ end
+end
+
+def fun_l23_n786(x)
+ if (x < 1)
+ fun_l24_n538(x)
+ else
+ fun_l24_n992(x)
+ end
+end
+
+def fun_l23_n787(x)
+ if (x < 1)
+ fun_l24_n83(x)
+ else
+ fun_l24_n544(x)
+ end
+end
+
+def fun_l23_n788(x)
+ if (x < 1)
+ fun_l24_n964(x)
+ else
+ fun_l24_n939(x)
+ end
+end
+
+def fun_l23_n789(x)
+ if (x < 1)
+ fun_l24_n120(x)
+ else
+ fun_l24_n843(x)
+ end
+end
+
+def fun_l23_n790(x)
+ if (x < 1)
+ fun_l24_n772(x)
+ else
+ fun_l24_n111(x)
+ end
+end
+
+def fun_l23_n791(x)
+ if (x < 1)
+ fun_l24_n983(x)
+ else
+ fun_l24_n934(x)
+ end
+end
+
+def fun_l23_n792(x)
+ if (x < 1)
+ fun_l24_n475(x)
+ else
+ fun_l24_n532(x)
+ end
+end
+
+def fun_l23_n793(x)
+ if (x < 1)
+ fun_l24_n316(x)
+ else
+ fun_l24_n400(x)
+ end
+end
+
+def fun_l23_n794(x)
+ if (x < 1)
+ fun_l24_n103(x)
+ else
+ fun_l24_n19(x)
+ end
+end
+
+def fun_l23_n795(x)
+ if (x < 1)
+ fun_l24_n371(x)
+ else
+ fun_l24_n176(x)
+ end
+end
+
+def fun_l23_n796(x)
+ if (x < 1)
+ fun_l24_n469(x)
+ else
+ fun_l24_n958(x)
+ end
+end
+
+def fun_l23_n797(x)
+ if (x < 1)
+ fun_l24_n706(x)
+ else
+ fun_l24_n953(x)
+ end
+end
+
+def fun_l23_n798(x)
+ if (x < 1)
+ fun_l24_n384(x)
+ else
+ fun_l24_n439(x)
+ end
+end
+
+def fun_l23_n799(x)
+ if (x < 1)
+ fun_l24_n352(x)
+ else
+ fun_l24_n36(x)
+ end
+end
+
+def fun_l23_n800(x)
+ if (x < 1)
+ fun_l24_n390(x)
+ else
+ fun_l24_n963(x)
+ end
+end
+
+def fun_l23_n801(x)
+ if (x < 1)
+ fun_l24_n470(x)
+ else
+ fun_l24_n818(x)
+ end
+end
+
+def fun_l23_n802(x)
+ if (x < 1)
+ fun_l24_n262(x)
+ else
+ fun_l24_n893(x)
+ end
+end
+
+def fun_l23_n803(x)
+ if (x < 1)
+ fun_l24_n118(x)
+ else
+ fun_l24_n684(x)
+ end
+end
+
+def fun_l23_n804(x)
+ if (x < 1)
+ fun_l24_n484(x)
+ else
+ fun_l24_n520(x)
+ end
+end
+
+def fun_l23_n805(x)
+ if (x < 1)
+ fun_l24_n370(x)
+ else
+ fun_l24_n80(x)
+ end
+end
+
+def fun_l23_n806(x)
+ if (x < 1)
+ fun_l24_n326(x)
+ else
+ fun_l24_n436(x)
+ end
+end
+
+def fun_l23_n807(x)
+ if (x < 1)
+ fun_l24_n490(x)
+ else
+ fun_l24_n811(x)
+ end
+end
+
+def fun_l23_n808(x)
+ if (x < 1)
+ fun_l24_n447(x)
+ else
+ fun_l24_n150(x)
+ end
+end
+
+def fun_l23_n809(x)
+ if (x < 1)
+ fun_l24_n339(x)
+ else
+ fun_l24_n367(x)
+ end
+end
+
+def fun_l23_n810(x)
+ if (x < 1)
+ fun_l24_n221(x)
+ else
+ fun_l24_n505(x)
+ end
+end
+
+def fun_l23_n811(x)
+ if (x < 1)
+ fun_l24_n637(x)
+ else
+ fun_l24_n101(x)
+ end
+end
+
+def fun_l23_n812(x)
+ if (x < 1)
+ fun_l24_n83(x)
+ else
+ fun_l24_n538(x)
+ end
+end
+
+def fun_l23_n813(x)
+ if (x < 1)
+ fun_l24_n927(x)
+ else
+ fun_l24_n513(x)
+ end
+end
+
+def fun_l23_n814(x)
+ if (x < 1)
+ fun_l24_n496(x)
+ else
+ fun_l24_n290(x)
+ end
+end
+
+def fun_l23_n815(x)
+ if (x < 1)
+ fun_l24_n640(x)
+ else
+ fun_l24_n796(x)
+ end
+end
+
+def fun_l23_n816(x)
+ if (x < 1)
+ fun_l24_n999(x)
+ else
+ fun_l24_n54(x)
+ end
+end
+
+def fun_l23_n817(x)
+ if (x < 1)
+ fun_l24_n162(x)
+ else
+ fun_l24_n617(x)
+ end
+end
+
+def fun_l23_n818(x)
+ if (x < 1)
+ fun_l24_n118(x)
+ else
+ fun_l24_n187(x)
+ end
+end
+
+def fun_l23_n819(x)
+ if (x < 1)
+ fun_l24_n334(x)
+ else
+ fun_l24_n901(x)
+ end
+end
+
+def fun_l23_n820(x)
+ if (x < 1)
+ fun_l24_n939(x)
+ else
+ fun_l24_n896(x)
+ end
+end
+
+def fun_l23_n821(x)
+ if (x < 1)
+ fun_l24_n970(x)
+ else
+ fun_l24_n725(x)
+ end
+end
+
+def fun_l23_n822(x)
+ if (x < 1)
+ fun_l24_n357(x)
+ else
+ fun_l24_n771(x)
+ end
+end
+
+def fun_l23_n823(x)
+ if (x < 1)
+ fun_l24_n8(x)
+ else
+ fun_l24_n214(x)
+ end
+end
+
+def fun_l23_n824(x)
+ if (x < 1)
+ fun_l24_n412(x)
+ else
+ fun_l24_n145(x)
+ end
+end
+
+def fun_l23_n825(x)
+ if (x < 1)
+ fun_l24_n218(x)
+ else
+ fun_l24_n700(x)
+ end
+end
+
+def fun_l23_n826(x)
+ if (x < 1)
+ fun_l24_n945(x)
+ else
+ fun_l24_n523(x)
+ end
+end
+
+def fun_l23_n827(x)
+ if (x < 1)
+ fun_l24_n251(x)
+ else
+ fun_l24_n854(x)
+ end
+end
+
+def fun_l23_n828(x)
+ if (x < 1)
+ fun_l24_n704(x)
+ else
+ fun_l24_n879(x)
+ end
+end
+
+def fun_l23_n829(x)
+ if (x < 1)
+ fun_l24_n161(x)
+ else
+ fun_l24_n529(x)
+ end
+end
+
+def fun_l23_n830(x)
+ if (x < 1)
+ fun_l24_n751(x)
+ else
+ fun_l24_n409(x)
+ end
+end
+
+def fun_l23_n831(x)
+ if (x < 1)
+ fun_l24_n883(x)
+ else
+ fun_l24_n1(x)
+ end
+end
+
+def fun_l23_n832(x)
+ if (x < 1)
+ fun_l24_n135(x)
+ else
+ fun_l24_n738(x)
+ end
+end
+
+def fun_l23_n833(x)
+ if (x < 1)
+ fun_l24_n507(x)
+ else
+ fun_l24_n727(x)
+ end
+end
+
+def fun_l23_n834(x)
+ if (x < 1)
+ fun_l24_n677(x)
+ else
+ fun_l24_n602(x)
+ end
+end
+
+def fun_l23_n835(x)
+ if (x < 1)
+ fun_l24_n197(x)
+ else
+ fun_l24_n481(x)
+ end
+end
+
+def fun_l23_n836(x)
+ if (x < 1)
+ fun_l24_n39(x)
+ else
+ fun_l24_n149(x)
+ end
+end
+
+def fun_l23_n837(x)
+ if (x < 1)
+ fun_l24_n950(x)
+ else
+ fun_l24_n455(x)
+ end
+end
+
+def fun_l23_n838(x)
+ if (x < 1)
+ fun_l24_n718(x)
+ else
+ fun_l24_n264(x)
+ end
+end
+
+def fun_l23_n839(x)
+ if (x < 1)
+ fun_l24_n831(x)
+ else
+ fun_l24_n576(x)
+ end
+end
+
+def fun_l23_n840(x)
+ if (x < 1)
+ fun_l24_n813(x)
+ else
+ fun_l24_n564(x)
+ end
+end
+
+def fun_l23_n841(x)
+ if (x < 1)
+ fun_l24_n537(x)
+ else
+ fun_l24_n880(x)
+ end
+end
+
+def fun_l23_n842(x)
+ if (x < 1)
+ fun_l24_n958(x)
+ else
+ fun_l24_n963(x)
+ end
+end
+
+def fun_l23_n843(x)
+ if (x < 1)
+ fun_l24_n879(x)
+ else
+ fun_l24_n281(x)
+ end
+end
+
+def fun_l23_n844(x)
+ if (x < 1)
+ fun_l24_n138(x)
+ else
+ fun_l24_n562(x)
+ end
+end
+
+def fun_l23_n845(x)
+ if (x < 1)
+ fun_l24_n804(x)
+ else
+ fun_l24_n283(x)
+ end
+end
+
+def fun_l23_n846(x)
+ if (x < 1)
+ fun_l24_n253(x)
+ else
+ fun_l24_n339(x)
+ end
+end
+
+def fun_l23_n847(x)
+ if (x < 1)
+ fun_l24_n99(x)
+ else
+ fun_l24_n623(x)
+ end
+end
+
+def fun_l23_n848(x)
+ if (x < 1)
+ fun_l24_n955(x)
+ else
+ fun_l24_n121(x)
+ end
+end
+
+def fun_l23_n849(x)
+ if (x < 1)
+ fun_l24_n437(x)
+ else
+ fun_l24_n387(x)
+ end
+end
+
+def fun_l23_n850(x)
+ if (x < 1)
+ fun_l24_n19(x)
+ else
+ fun_l24_n790(x)
+ end
+end
+
+def fun_l23_n851(x)
+ if (x < 1)
+ fun_l24_n11(x)
+ else
+ fun_l24_n931(x)
+ end
+end
+
+def fun_l23_n852(x)
+ if (x < 1)
+ fun_l24_n506(x)
+ else
+ fun_l24_n162(x)
+ end
+end
+
+def fun_l23_n853(x)
+ if (x < 1)
+ fun_l24_n262(x)
+ else
+ fun_l24_n1(x)
+ end
+end
+
+def fun_l23_n854(x)
+ if (x < 1)
+ fun_l24_n275(x)
+ else
+ fun_l24_n549(x)
+ end
+end
+
+def fun_l23_n855(x)
+ if (x < 1)
+ fun_l24_n865(x)
+ else
+ fun_l24_n472(x)
+ end
+end
+
+def fun_l23_n856(x)
+ if (x < 1)
+ fun_l24_n270(x)
+ else
+ fun_l24_n312(x)
+ end
+end
+
+def fun_l23_n857(x)
+ if (x < 1)
+ fun_l24_n261(x)
+ else
+ fun_l24_n240(x)
+ end
+end
+
+def fun_l23_n858(x)
+ if (x < 1)
+ fun_l24_n166(x)
+ else
+ fun_l24_n996(x)
+ end
+end
+
+def fun_l23_n859(x)
+ if (x < 1)
+ fun_l24_n653(x)
+ else
+ fun_l24_n464(x)
+ end
+end
+
+def fun_l23_n860(x)
+ if (x < 1)
+ fun_l24_n446(x)
+ else
+ fun_l24_n706(x)
+ end
+end
+
+def fun_l23_n861(x)
+ if (x < 1)
+ fun_l24_n744(x)
+ else
+ fun_l24_n53(x)
+ end
+end
+
+def fun_l23_n862(x)
+ if (x < 1)
+ fun_l24_n983(x)
+ else
+ fun_l24_n188(x)
+ end
+end
+
+def fun_l23_n863(x)
+ if (x < 1)
+ fun_l24_n399(x)
+ else
+ fun_l24_n582(x)
+ end
+end
+
+def fun_l23_n864(x)
+ if (x < 1)
+ fun_l24_n392(x)
+ else
+ fun_l24_n937(x)
+ end
+end
+
+def fun_l23_n865(x)
+ if (x < 1)
+ fun_l24_n495(x)
+ else
+ fun_l24_n557(x)
+ end
+end
+
+def fun_l23_n866(x)
+ if (x < 1)
+ fun_l24_n94(x)
+ else
+ fun_l24_n295(x)
+ end
+end
+
+def fun_l23_n867(x)
+ if (x < 1)
+ fun_l24_n628(x)
+ else
+ fun_l24_n432(x)
+ end
+end
+
+def fun_l23_n868(x)
+ if (x < 1)
+ fun_l24_n386(x)
+ else
+ fun_l24_n385(x)
+ end
+end
+
+def fun_l23_n869(x)
+ if (x < 1)
+ fun_l24_n376(x)
+ else
+ fun_l24_n469(x)
+ end
+end
+
+def fun_l23_n870(x)
+ if (x < 1)
+ fun_l24_n74(x)
+ else
+ fun_l24_n712(x)
+ end
+end
+
+def fun_l23_n871(x)
+ if (x < 1)
+ fun_l24_n72(x)
+ else
+ fun_l24_n642(x)
+ end
+end
+
+def fun_l23_n872(x)
+ if (x < 1)
+ fun_l24_n937(x)
+ else
+ fun_l24_n751(x)
+ end
+end
+
+def fun_l23_n873(x)
+ if (x < 1)
+ fun_l24_n385(x)
+ else
+ fun_l24_n404(x)
+ end
+end
+
+def fun_l23_n874(x)
+ if (x < 1)
+ fun_l24_n336(x)
+ else
+ fun_l24_n226(x)
+ end
+end
+
+def fun_l23_n875(x)
+ if (x < 1)
+ fun_l24_n289(x)
+ else
+ fun_l24_n989(x)
+ end
+end
+
+def fun_l23_n876(x)
+ if (x < 1)
+ fun_l24_n45(x)
+ else
+ fun_l24_n279(x)
+ end
+end
+
+def fun_l23_n877(x)
+ if (x < 1)
+ fun_l24_n683(x)
+ else
+ fun_l24_n342(x)
+ end
+end
+
+def fun_l23_n878(x)
+ if (x < 1)
+ fun_l24_n279(x)
+ else
+ fun_l24_n600(x)
+ end
+end
+
+def fun_l23_n879(x)
+ if (x < 1)
+ fun_l24_n82(x)
+ else
+ fun_l24_n177(x)
+ end
+end
+
+def fun_l23_n880(x)
+ if (x < 1)
+ fun_l24_n167(x)
+ else
+ fun_l24_n912(x)
+ end
+end
+
+def fun_l23_n881(x)
+ if (x < 1)
+ fun_l24_n311(x)
+ else
+ fun_l24_n634(x)
+ end
+end
+
+def fun_l23_n882(x)
+ if (x < 1)
+ fun_l24_n127(x)
+ else
+ fun_l24_n661(x)
+ end
+end
+
+def fun_l23_n883(x)
+ if (x < 1)
+ fun_l24_n199(x)
+ else
+ fun_l24_n999(x)
+ end
+end
+
+def fun_l23_n884(x)
+ if (x < 1)
+ fun_l24_n525(x)
+ else
+ fun_l24_n948(x)
+ end
+end
+
+def fun_l23_n885(x)
+ if (x < 1)
+ fun_l24_n590(x)
+ else
+ fun_l24_n822(x)
+ end
+end
+
+def fun_l23_n886(x)
+ if (x < 1)
+ fun_l24_n811(x)
+ else
+ fun_l24_n975(x)
+ end
+end
+
+def fun_l23_n887(x)
+ if (x < 1)
+ fun_l24_n446(x)
+ else
+ fun_l24_n710(x)
+ end
+end
+
+def fun_l23_n888(x)
+ if (x < 1)
+ fun_l24_n31(x)
+ else
+ fun_l24_n92(x)
+ end
+end
+
+def fun_l23_n889(x)
+ if (x < 1)
+ fun_l24_n535(x)
+ else
+ fun_l24_n819(x)
+ end
+end
+
+def fun_l23_n890(x)
+ if (x < 1)
+ fun_l24_n526(x)
+ else
+ fun_l24_n207(x)
+ end
+end
+
+def fun_l23_n891(x)
+ if (x < 1)
+ fun_l24_n752(x)
+ else
+ fun_l24_n994(x)
+ end
+end
+
+def fun_l23_n892(x)
+ if (x < 1)
+ fun_l24_n758(x)
+ else
+ fun_l24_n292(x)
+ end
+end
+
+def fun_l23_n893(x)
+ if (x < 1)
+ fun_l24_n106(x)
+ else
+ fun_l24_n742(x)
+ end
+end
+
+def fun_l23_n894(x)
+ if (x < 1)
+ fun_l24_n385(x)
+ else
+ fun_l24_n562(x)
+ end
+end
+
+def fun_l23_n895(x)
+ if (x < 1)
+ fun_l24_n565(x)
+ else
+ fun_l24_n242(x)
+ end
+end
+
+def fun_l23_n896(x)
+ if (x < 1)
+ fun_l24_n570(x)
+ else
+ fun_l24_n241(x)
+ end
+end
+
+def fun_l23_n897(x)
+ if (x < 1)
+ fun_l24_n840(x)
+ else
+ fun_l24_n681(x)
+ end
+end
+
+def fun_l23_n898(x)
+ if (x < 1)
+ fun_l24_n524(x)
+ else
+ fun_l24_n9(x)
+ end
+end
+
+def fun_l23_n899(x)
+ if (x < 1)
+ fun_l24_n161(x)
+ else
+ fun_l24_n795(x)
+ end
+end
+
+def fun_l23_n900(x)
+ if (x < 1)
+ fun_l24_n64(x)
+ else
+ fun_l24_n447(x)
+ end
+end
+
+def fun_l23_n901(x)
+ if (x < 1)
+ fun_l24_n676(x)
+ else
+ fun_l24_n286(x)
+ end
+end
+
+def fun_l23_n902(x)
+ if (x < 1)
+ fun_l24_n623(x)
+ else
+ fun_l24_n298(x)
+ end
+end
+
+def fun_l23_n903(x)
+ if (x < 1)
+ fun_l24_n795(x)
+ else
+ fun_l24_n646(x)
+ end
+end
+
+def fun_l23_n904(x)
+ if (x < 1)
+ fun_l24_n746(x)
+ else
+ fun_l24_n7(x)
+ end
+end
+
+def fun_l23_n905(x)
+ if (x < 1)
+ fun_l24_n311(x)
+ else
+ fun_l24_n417(x)
+ end
+end
+
+def fun_l23_n906(x)
+ if (x < 1)
+ fun_l24_n338(x)
+ else
+ fun_l24_n592(x)
+ end
+end
+
+def fun_l23_n907(x)
+ if (x < 1)
+ fun_l24_n667(x)
+ else
+ fun_l24_n370(x)
+ end
+end
+
+def fun_l23_n908(x)
+ if (x < 1)
+ fun_l24_n444(x)
+ else
+ fun_l24_n703(x)
+ end
+end
+
+def fun_l23_n909(x)
+ if (x < 1)
+ fun_l24_n325(x)
+ else
+ fun_l24_n977(x)
+ end
+end
+
+def fun_l23_n910(x)
+ if (x < 1)
+ fun_l24_n994(x)
+ else
+ fun_l24_n765(x)
+ end
+end
+
+def fun_l23_n911(x)
+ if (x < 1)
+ fun_l24_n327(x)
+ else
+ fun_l24_n657(x)
+ end
+end
+
+def fun_l23_n912(x)
+ if (x < 1)
+ fun_l24_n932(x)
+ else
+ fun_l24_n769(x)
+ end
+end
+
+def fun_l23_n913(x)
+ if (x < 1)
+ fun_l24_n263(x)
+ else
+ fun_l24_n729(x)
+ end
+end
+
+def fun_l23_n914(x)
+ if (x < 1)
+ fun_l24_n248(x)
+ else
+ fun_l24_n412(x)
+ end
+end
+
+def fun_l23_n915(x)
+ if (x < 1)
+ fun_l24_n793(x)
+ else
+ fun_l24_n329(x)
+ end
+end
+
+def fun_l23_n916(x)
+ if (x < 1)
+ fun_l24_n7(x)
+ else
+ fun_l24_n460(x)
+ end
+end
+
+def fun_l23_n917(x)
+ if (x < 1)
+ fun_l24_n612(x)
+ else
+ fun_l24_n79(x)
+ end
+end
+
+def fun_l23_n918(x)
+ if (x < 1)
+ fun_l24_n450(x)
+ else
+ fun_l24_n950(x)
+ end
+end
+
+def fun_l23_n919(x)
+ if (x < 1)
+ fun_l24_n72(x)
+ else
+ fun_l24_n550(x)
+ end
+end
+
+def fun_l23_n920(x)
+ if (x < 1)
+ fun_l24_n73(x)
+ else
+ fun_l24_n339(x)
+ end
+end
+
+def fun_l23_n921(x)
+ if (x < 1)
+ fun_l24_n6(x)
+ else
+ fun_l24_n865(x)
+ end
+end
+
+def fun_l23_n922(x)
+ if (x < 1)
+ fun_l24_n507(x)
+ else
+ fun_l24_n475(x)
+ end
+end
+
+def fun_l23_n923(x)
+ if (x < 1)
+ fun_l24_n579(x)
+ else
+ fun_l24_n832(x)
+ end
+end
+
+def fun_l23_n924(x)
+ if (x < 1)
+ fun_l24_n681(x)
+ else
+ fun_l24_n253(x)
+ end
+end
+
+def fun_l23_n925(x)
+ if (x < 1)
+ fun_l24_n611(x)
+ else
+ fun_l24_n831(x)
+ end
+end
+
+def fun_l23_n926(x)
+ if (x < 1)
+ fun_l24_n371(x)
+ else
+ fun_l24_n236(x)
+ end
+end
+
+def fun_l23_n927(x)
+ if (x < 1)
+ fun_l24_n941(x)
+ else
+ fun_l24_n905(x)
+ end
+end
+
+def fun_l23_n928(x)
+ if (x < 1)
+ fun_l24_n616(x)
+ else
+ fun_l24_n421(x)
+ end
+end
+
+def fun_l23_n929(x)
+ if (x < 1)
+ fun_l24_n469(x)
+ else
+ fun_l24_n405(x)
+ end
+end
+
+def fun_l23_n930(x)
+ if (x < 1)
+ fun_l24_n584(x)
+ else
+ fun_l24_n694(x)
+ end
+end
+
+def fun_l23_n931(x)
+ if (x < 1)
+ fun_l24_n530(x)
+ else
+ fun_l24_n112(x)
+ end
+end
+
+def fun_l23_n932(x)
+ if (x < 1)
+ fun_l24_n115(x)
+ else
+ fun_l24_n667(x)
+ end
+end
+
+def fun_l23_n933(x)
+ if (x < 1)
+ fun_l24_n23(x)
+ else
+ fun_l24_n68(x)
+ end
+end
+
+def fun_l23_n934(x)
+ if (x < 1)
+ fun_l24_n215(x)
+ else
+ fun_l24_n459(x)
+ end
+end
+
+def fun_l23_n935(x)
+ if (x < 1)
+ fun_l24_n533(x)
+ else
+ fun_l24_n882(x)
+ end
+end
+
+def fun_l23_n936(x)
+ if (x < 1)
+ fun_l24_n918(x)
+ else
+ fun_l24_n522(x)
+ end
+end
+
+def fun_l23_n937(x)
+ if (x < 1)
+ fun_l24_n472(x)
+ else
+ fun_l24_n322(x)
+ end
+end
+
+def fun_l23_n938(x)
+ if (x < 1)
+ fun_l24_n528(x)
+ else
+ fun_l24_n937(x)
+ end
+end
+
+def fun_l23_n939(x)
+ if (x < 1)
+ fun_l24_n426(x)
+ else
+ fun_l24_n904(x)
+ end
+end
+
+def fun_l23_n940(x)
+ if (x < 1)
+ fun_l24_n259(x)
+ else
+ fun_l24_n350(x)
+ end
+end
+
+def fun_l23_n941(x)
+ if (x < 1)
+ fun_l24_n770(x)
+ else
+ fun_l24_n449(x)
+ end
+end
+
+def fun_l23_n942(x)
+ if (x < 1)
+ fun_l24_n159(x)
+ else
+ fun_l24_n312(x)
+ end
+end
+
+def fun_l23_n943(x)
+ if (x < 1)
+ fun_l24_n168(x)
+ else
+ fun_l24_n820(x)
+ end
+end
+
+def fun_l23_n944(x)
+ if (x < 1)
+ fun_l24_n861(x)
+ else
+ fun_l24_n395(x)
+ end
+end
+
+def fun_l23_n945(x)
+ if (x < 1)
+ fun_l24_n802(x)
+ else
+ fun_l24_n651(x)
+ end
+end
+
+def fun_l23_n946(x)
+ if (x < 1)
+ fun_l24_n519(x)
+ else
+ fun_l24_n736(x)
+ end
+end
+
+def fun_l23_n947(x)
+ if (x < 1)
+ fun_l24_n277(x)
+ else
+ fun_l24_n705(x)
+ end
+end
+
+def fun_l23_n948(x)
+ if (x < 1)
+ fun_l24_n658(x)
+ else
+ fun_l24_n983(x)
+ end
+end
+
+def fun_l23_n949(x)
+ if (x < 1)
+ fun_l24_n390(x)
+ else
+ fun_l24_n365(x)
+ end
+end
+
+def fun_l23_n950(x)
+ if (x < 1)
+ fun_l24_n362(x)
+ else
+ fun_l24_n895(x)
+ end
+end
+
+def fun_l23_n951(x)
+ if (x < 1)
+ fun_l24_n431(x)
+ else
+ fun_l24_n240(x)
+ end
+end
+
+def fun_l23_n952(x)
+ if (x < 1)
+ fun_l24_n87(x)
+ else
+ fun_l24_n923(x)
+ end
+end
+
+def fun_l23_n953(x)
+ if (x < 1)
+ fun_l24_n605(x)
+ else
+ fun_l24_n369(x)
+ end
+end
+
+def fun_l23_n954(x)
+ if (x < 1)
+ fun_l24_n659(x)
+ else
+ fun_l24_n485(x)
+ end
+end
+
+def fun_l23_n955(x)
+ if (x < 1)
+ fun_l24_n204(x)
+ else
+ fun_l24_n719(x)
+ end
+end
+
+def fun_l23_n956(x)
+ if (x < 1)
+ fun_l24_n752(x)
+ else
+ fun_l24_n522(x)
+ end
+end
+
+def fun_l23_n957(x)
+ if (x < 1)
+ fun_l24_n827(x)
+ else
+ fun_l24_n740(x)
+ end
+end
+
+def fun_l23_n958(x)
+ if (x < 1)
+ fun_l24_n476(x)
+ else
+ fun_l24_n766(x)
+ end
+end
+
+def fun_l23_n959(x)
+ if (x < 1)
+ fun_l24_n167(x)
+ else
+ fun_l24_n552(x)
+ end
+end
+
+def fun_l23_n960(x)
+ if (x < 1)
+ fun_l24_n352(x)
+ else
+ fun_l24_n147(x)
+ end
+end
+
+def fun_l23_n961(x)
+ if (x < 1)
+ fun_l24_n641(x)
+ else
+ fun_l24_n263(x)
+ end
+end
+
+def fun_l23_n962(x)
+ if (x < 1)
+ fun_l24_n2(x)
+ else
+ fun_l24_n819(x)
+ end
+end
+
+def fun_l23_n963(x)
+ if (x < 1)
+ fun_l24_n649(x)
+ else
+ fun_l24_n589(x)
+ end
+end
+
+def fun_l23_n964(x)
+ if (x < 1)
+ fun_l24_n351(x)
+ else
+ fun_l24_n170(x)
+ end
+end
+
+def fun_l23_n965(x)
+ if (x < 1)
+ fun_l24_n913(x)
+ else
+ fun_l24_n141(x)
+ end
+end
+
+def fun_l23_n966(x)
+ if (x < 1)
+ fun_l24_n230(x)
+ else
+ fun_l24_n438(x)
+ end
+end
+
+def fun_l23_n967(x)
+ if (x < 1)
+ fun_l24_n649(x)
+ else
+ fun_l24_n867(x)
+ end
+end
+
+def fun_l23_n968(x)
+ if (x < 1)
+ fun_l24_n877(x)
+ else
+ fun_l24_n341(x)
+ end
+end
+
+def fun_l23_n969(x)
+ if (x < 1)
+ fun_l24_n802(x)
+ else
+ fun_l24_n409(x)
+ end
+end
+
+def fun_l23_n970(x)
+ if (x < 1)
+ fun_l24_n388(x)
+ else
+ fun_l24_n521(x)
+ end
+end
+
+def fun_l23_n971(x)
+ if (x < 1)
+ fun_l24_n533(x)
+ else
+ fun_l24_n856(x)
+ end
+end
+
+def fun_l23_n972(x)
+ if (x < 1)
+ fun_l24_n409(x)
+ else
+ fun_l24_n119(x)
+ end
+end
+
+def fun_l23_n973(x)
+ if (x < 1)
+ fun_l24_n774(x)
+ else
+ fun_l24_n561(x)
+ end
+end
+
+def fun_l23_n974(x)
+ if (x < 1)
+ fun_l24_n96(x)
+ else
+ fun_l24_n629(x)
+ end
+end
+
+def fun_l23_n975(x)
+ if (x < 1)
+ fun_l24_n985(x)
+ else
+ fun_l24_n651(x)
+ end
+end
+
+def fun_l23_n976(x)
+ if (x < 1)
+ fun_l24_n977(x)
+ else
+ fun_l24_n274(x)
+ end
+end
+
+def fun_l23_n977(x)
+ if (x < 1)
+ fun_l24_n85(x)
+ else
+ fun_l24_n337(x)
+ end
+end
+
+def fun_l23_n978(x)
+ if (x < 1)
+ fun_l24_n312(x)
+ else
+ fun_l24_n990(x)
+ end
+end
+
+def fun_l23_n979(x)
+ if (x < 1)
+ fun_l24_n438(x)
+ else
+ fun_l24_n42(x)
+ end
+end
+
+def fun_l23_n980(x)
+ if (x < 1)
+ fun_l24_n341(x)
+ else
+ fun_l24_n27(x)
+ end
+end
+
+def fun_l23_n981(x)
+ if (x < 1)
+ fun_l24_n300(x)
+ else
+ fun_l24_n669(x)
+ end
+end
+
+def fun_l23_n982(x)
+ if (x < 1)
+ fun_l24_n586(x)
+ else
+ fun_l24_n822(x)
+ end
+end
+
+def fun_l23_n983(x)
+ if (x < 1)
+ fun_l24_n388(x)
+ else
+ fun_l24_n966(x)
+ end
+end
+
+def fun_l23_n984(x)
+ if (x < 1)
+ fun_l24_n661(x)
+ else
+ fun_l24_n66(x)
+ end
+end
+
+def fun_l23_n985(x)
+ if (x < 1)
+ fun_l24_n384(x)
+ else
+ fun_l24_n419(x)
+ end
+end
+
+def fun_l23_n986(x)
+ if (x < 1)
+ fun_l24_n698(x)
+ else
+ fun_l24_n961(x)
+ end
+end
+
+def fun_l23_n987(x)
+ if (x < 1)
+ fun_l24_n820(x)
+ else
+ fun_l24_n112(x)
+ end
+end
+
+def fun_l23_n988(x)
+ if (x < 1)
+ fun_l24_n976(x)
+ else
+ fun_l24_n232(x)
+ end
+end
+
+def fun_l23_n989(x)
+ if (x < 1)
+ fun_l24_n292(x)
+ else
+ fun_l24_n77(x)
+ end
+end
+
+def fun_l23_n990(x)
+ if (x < 1)
+ fun_l24_n572(x)
+ else
+ fun_l24_n524(x)
+ end
+end
+
+def fun_l23_n991(x)
+ if (x < 1)
+ fun_l24_n226(x)
+ else
+ fun_l24_n821(x)
+ end
+end
+
+def fun_l23_n992(x)
+ if (x < 1)
+ fun_l24_n12(x)
+ else
+ fun_l24_n891(x)
+ end
+end
+
+def fun_l23_n993(x)
+ if (x < 1)
+ fun_l24_n101(x)
+ else
+ fun_l24_n592(x)
+ end
+end
+
+def fun_l23_n994(x)
+ if (x < 1)
+ fun_l24_n796(x)
+ else
+ fun_l24_n594(x)
+ end
+end
+
+def fun_l23_n995(x)
+ if (x < 1)
+ fun_l24_n707(x)
+ else
+ fun_l24_n577(x)
+ end
+end
+
+def fun_l23_n996(x)
+ if (x < 1)
+ fun_l24_n123(x)
+ else
+ fun_l24_n730(x)
+ end
+end
+
+def fun_l23_n997(x)
+ if (x < 1)
+ fun_l24_n520(x)
+ else
+ fun_l24_n888(x)
+ end
+end
+
+def fun_l23_n998(x)
+ if (x < 1)
+ fun_l24_n165(x)
+ else
+ fun_l24_n576(x)
+ end
+end
+
+def fun_l23_n999(x)
+ if (x < 1)
+ fun_l24_n496(x)
+ else
+ fun_l24_n722(x)
+ end
+end
+
+def fun_l24_n0(x)
+ if (x < 1)
+ fun_l25_n357(x)
+ else
+ fun_l25_n144(x)
+ end
+end
+
+def fun_l24_n1(x)
+ if (x < 1)
+ fun_l25_n49(x)
+ else
+ fun_l25_n870(x)
+ end
+end
+
+def fun_l24_n2(x)
+ if (x < 1)
+ fun_l25_n547(x)
+ else
+ fun_l25_n357(x)
+ end
+end
+
+def fun_l24_n3(x)
+ if (x < 1)
+ fun_l25_n167(x)
+ else
+ fun_l25_n908(x)
+ end
+end
+
+def fun_l24_n4(x)
+ if (x < 1)
+ fun_l25_n943(x)
+ else
+ fun_l25_n882(x)
+ end
+end
+
+def fun_l24_n5(x)
+ if (x < 1)
+ fun_l25_n635(x)
+ else
+ fun_l25_n988(x)
+ end
+end
+
+def fun_l24_n6(x)
+ if (x < 1)
+ fun_l25_n648(x)
+ else
+ fun_l25_n62(x)
+ end
+end
+
+def fun_l24_n7(x)
+ if (x < 1)
+ fun_l25_n896(x)
+ else
+ fun_l25_n636(x)
+ end
+end
+
+def fun_l24_n8(x)
+ if (x < 1)
+ fun_l25_n666(x)
+ else
+ fun_l25_n50(x)
+ end
+end
+
+def fun_l24_n9(x)
+ if (x < 1)
+ fun_l25_n42(x)
+ else
+ fun_l25_n216(x)
+ end
+end
+
+def fun_l24_n10(x)
+ if (x < 1)
+ fun_l25_n979(x)
+ else
+ fun_l25_n27(x)
+ end
+end
+
+def fun_l24_n11(x)
+ if (x < 1)
+ fun_l25_n421(x)
+ else
+ fun_l25_n239(x)
+ end
+end
+
+def fun_l24_n12(x)
+ if (x < 1)
+ fun_l25_n465(x)
+ else
+ fun_l25_n483(x)
+ end
+end
+
+def fun_l24_n13(x)
+ if (x < 1)
+ fun_l25_n172(x)
+ else
+ fun_l25_n918(x)
+ end
+end
+
+def fun_l24_n14(x)
+ if (x < 1)
+ fun_l25_n130(x)
+ else
+ fun_l25_n144(x)
+ end
+end
+
+def fun_l24_n15(x)
+ if (x < 1)
+ fun_l25_n569(x)
+ else
+ fun_l25_n319(x)
+ end
+end
+
+def fun_l24_n16(x)
+ if (x < 1)
+ fun_l25_n54(x)
+ else
+ fun_l25_n253(x)
+ end
+end
+
+def fun_l24_n17(x)
+ if (x < 1)
+ fun_l25_n127(x)
+ else
+ fun_l25_n594(x)
+ end
+end
+
+def fun_l24_n18(x)
+ if (x < 1)
+ fun_l25_n94(x)
+ else
+ fun_l25_n486(x)
+ end
+end
+
+def fun_l24_n19(x)
+ if (x < 1)
+ fun_l25_n322(x)
+ else
+ fun_l25_n731(x)
+ end
+end
+
+def fun_l24_n20(x)
+ if (x < 1)
+ fun_l25_n828(x)
+ else
+ fun_l25_n410(x)
+ end
+end
+
+def fun_l24_n21(x)
+ if (x < 1)
+ fun_l25_n422(x)
+ else
+ fun_l25_n265(x)
+ end
+end
+
+def fun_l24_n22(x)
+ if (x < 1)
+ fun_l25_n259(x)
+ else
+ fun_l25_n902(x)
+ end
+end
+
+def fun_l24_n23(x)
+ if (x < 1)
+ fun_l25_n660(x)
+ else
+ fun_l25_n525(x)
+ end
+end
+
+def fun_l24_n24(x)
+ if (x < 1)
+ fun_l25_n898(x)
+ else
+ fun_l25_n231(x)
+ end
+end
+
+def fun_l24_n25(x)
+ if (x < 1)
+ fun_l25_n319(x)
+ else
+ fun_l25_n306(x)
+ end
+end
+
+def fun_l24_n26(x)
+ if (x < 1)
+ fun_l25_n447(x)
+ else
+ fun_l25_n110(x)
+ end
+end
+
+def fun_l24_n27(x)
+ if (x < 1)
+ fun_l25_n416(x)
+ else
+ fun_l25_n335(x)
+ end
+end
+
+def fun_l24_n28(x)
+ if (x < 1)
+ fun_l25_n132(x)
+ else
+ fun_l25_n549(x)
+ end
+end
+
+def fun_l24_n29(x)
+ if (x < 1)
+ fun_l25_n878(x)
+ else
+ fun_l25_n790(x)
+ end
+end
+
+def fun_l24_n30(x)
+ if (x < 1)
+ fun_l25_n205(x)
+ else
+ fun_l25_n328(x)
+ end
+end
+
+def fun_l24_n31(x)
+ if (x < 1)
+ fun_l25_n448(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n32(x)
+ if (x < 1)
+ fun_l25_n800(x)
+ else
+ fun_l25_n254(x)
+ end
+end
+
+def fun_l24_n33(x)
+ if (x < 1)
+ fun_l25_n377(x)
+ else
+ fun_l25_n178(x)
+ end
+end
+
+def fun_l24_n34(x)
+ if (x < 1)
+ fun_l25_n317(x)
+ else
+ fun_l25_n271(x)
+ end
+end
+
+def fun_l24_n35(x)
+ if (x < 1)
+ fun_l25_n50(x)
+ else
+ fun_l25_n801(x)
+ end
+end
+
+def fun_l24_n36(x)
+ if (x < 1)
+ fun_l25_n720(x)
+ else
+ fun_l25_n267(x)
+ end
+end
+
+def fun_l24_n37(x)
+ if (x < 1)
+ fun_l25_n688(x)
+ else
+ fun_l25_n901(x)
+ end
+end
+
+def fun_l24_n38(x)
+ if (x < 1)
+ fun_l25_n752(x)
+ else
+ fun_l25_n541(x)
+ end
+end
+
+def fun_l24_n39(x)
+ if (x < 1)
+ fun_l25_n716(x)
+ else
+ fun_l25_n884(x)
+ end
+end
+
+def fun_l24_n40(x)
+ if (x < 1)
+ fun_l25_n138(x)
+ else
+ fun_l25_n536(x)
+ end
+end
+
+def fun_l24_n41(x)
+ if (x < 1)
+ fun_l25_n382(x)
+ else
+ fun_l25_n496(x)
+ end
+end
+
+def fun_l24_n42(x)
+ if (x < 1)
+ fun_l25_n729(x)
+ else
+ fun_l25_n443(x)
+ end
+end
+
+def fun_l24_n43(x)
+ if (x < 1)
+ fun_l25_n401(x)
+ else
+ fun_l25_n300(x)
+ end
+end
+
+def fun_l24_n44(x)
+ if (x < 1)
+ fun_l25_n695(x)
+ else
+ fun_l25_n139(x)
+ end
+end
+
+def fun_l24_n45(x)
+ if (x < 1)
+ fun_l25_n186(x)
+ else
+ fun_l25_n446(x)
+ end
+end
+
+def fun_l24_n46(x)
+ if (x < 1)
+ fun_l25_n102(x)
+ else
+ fun_l25_n415(x)
+ end
+end
+
+def fun_l24_n47(x)
+ if (x < 1)
+ fun_l25_n74(x)
+ else
+ fun_l25_n947(x)
+ end
+end
+
+def fun_l24_n48(x)
+ if (x < 1)
+ fun_l25_n720(x)
+ else
+ fun_l25_n873(x)
+ end
+end
+
+def fun_l24_n49(x)
+ if (x < 1)
+ fun_l25_n779(x)
+ else
+ fun_l25_n61(x)
+ end
+end
+
+def fun_l24_n50(x)
+ if (x < 1)
+ fun_l25_n889(x)
+ else
+ fun_l25_n620(x)
+ end
+end
+
+def fun_l24_n51(x)
+ if (x < 1)
+ fun_l25_n323(x)
+ else
+ fun_l25_n412(x)
+ end
+end
+
+def fun_l24_n52(x)
+ if (x < 1)
+ fun_l25_n986(x)
+ else
+ fun_l25_n950(x)
+ end
+end
+
+def fun_l24_n53(x)
+ if (x < 1)
+ fun_l25_n810(x)
+ else
+ fun_l25_n956(x)
+ end
+end
+
+def fun_l24_n54(x)
+ if (x < 1)
+ fun_l25_n89(x)
+ else
+ fun_l25_n110(x)
+ end
+end
+
+def fun_l24_n55(x)
+ if (x < 1)
+ fun_l25_n255(x)
+ else
+ fun_l25_n953(x)
+ end
+end
+
+def fun_l24_n56(x)
+ if (x < 1)
+ fun_l25_n200(x)
+ else
+ fun_l25_n366(x)
+ end
+end
+
+def fun_l24_n57(x)
+ if (x < 1)
+ fun_l25_n431(x)
+ else
+ fun_l25_n49(x)
+ end
+end
+
+def fun_l24_n58(x)
+ if (x < 1)
+ fun_l25_n705(x)
+ else
+ fun_l25_n362(x)
+ end
+end
+
+def fun_l24_n59(x)
+ if (x < 1)
+ fun_l25_n587(x)
+ else
+ fun_l25_n511(x)
+ end
+end
+
+def fun_l24_n60(x)
+ if (x < 1)
+ fun_l25_n72(x)
+ else
+ fun_l25_n560(x)
+ end
+end
+
+def fun_l24_n61(x)
+ if (x < 1)
+ fun_l25_n732(x)
+ else
+ fun_l25_n214(x)
+ end
+end
+
+def fun_l24_n62(x)
+ if (x < 1)
+ fun_l25_n348(x)
+ else
+ fun_l25_n70(x)
+ end
+end
+
+def fun_l24_n63(x)
+ if (x < 1)
+ fun_l25_n371(x)
+ else
+ fun_l25_n625(x)
+ end
+end
+
+def fun_l24_n64(x)
+ if (x < 1)
+ fun_l25_n204(x)
+ else
+ fun_l25_n249(x)
+ end
+end
+
+def fun_l24_n65(x)
+ if (x < 1)
+ fun_l25_n608(x)
+ else
+ fun_l25_n682(x)
+ end
+end
+
+def fun_l24_n66(x)
+ if (x < 1)
+ fun_l25_n450(x)
+ else
+ fun_l25_n951(x)
+ end
+end
+
+def fun_l24_n67(x)
+ if (x < 1)
+ fun_l25_n749(x)
+ else
+ fun_l25_n39(x)
+ end
+end
+
+def fun_l24_n68(x)
+ if (x < 1)
+ fun_l25_n169(x)
+ else
+ fun_l25_n801(x)
+ end
+end
+
+def fun_l24_n69(x)
+ if (x < 1)
+ fun_l25_n55(x)
+ else
+ fun_l25_n728(x)
+ end
+end
+
+def fun_l24_n70(x)
+ if (x < 1)
+ fun_l25_n115(x)
+ else
+ fun_l25_n689(x)
+ end
+end
+
+def fun_l24_n71(x)
+ if (x < 1)
+ fun_l25_n332(x)
+ else
+ fun_l25_n474(x)
+ end
+end
+
+def fun_l24_n72(x)
+ if (x < 1)
+ fun_l25_n846(x)
+ else
+ fun_l25_n808(x)
+ end
+end
+
+def fun_l24_n73(x)
+ if (x < 1)
+ fun_l25_n521(x)
+ else
+ fun_l25_n229(x)
+ end
+end
+
+def fun_l24_n74(x)
+ if (x < 1)
+ fun_l25_n307(x)
+ else
+ fun_l25_n992(x)
+ end
+end
+
+def fun_l24_n75(x)
+ if (x < 1)
+ fun_l25_n564(x)
+ else
+ fun_l25_n940(x)
+ end
+end
+
+def fun_l24_n76(x)
+ if (x < 1)
+ fun_l25_n348(x)
+ else
+ fun_l25_n453(x)
+ end
+end
+
+def fun_l24_n77(x)
+ if (x < 1)
+ fun_l25_n252(x)
+ else
+ fun_l25_n270(x)
+ end
+end
+
+def fun_l24_n78(x)
+ if (x < 1)
+ fun_l25_n333(x)
+ else
+ fun_l25_n980(x)
+ end
+end
+
+def fun_l24_n79(x)
+ if (x < 1)
+ fun_l25_n486(x)
+ else
+ fun_l25_n276(x)
+ end
+end
+
+def fun_l24_n80(x)
+ if (x < 1)
+ fun_l25_n45(x)
+ else
+ fun_l25_n930(x)
+ end
+end
+
+def fun_l24_n81(x)
+ if (x < 1)
+ fun_l25_n527(x)
+ else
+ fun_l25_n181(x)
+ end
+end
+
+def fun_l24_n82(x)
+ if (x < 1)
+ fun_l25_n768(x)
+ else
+ fun_l25_n869(x)
+ end
+end
+
+def fun_l24_n83(x)
+ if (x < 1)
+ fun_l25_n505(x)
+ else
+ fun_l25_n214(x)
+ end
+end
+
+def fun_l24_n84(x)
+ if (x < 1)
+ fun_l25_n41(x)
+ else
+ fun_l25_n873(x)
+ end
+end
+
+def fun_l24_n85(x)
+ if (x < 1)
+ fun_l25_n646(x)
+ else
+ fun_l25_n105(x)
+ end
+end
+
+def fun_l24_n86(x)
+ if (x < 1)
+ fun_l25_n675(x)
+ else
+ fun_l25_n830(x)
+ end
+end
+
+def fun_l24_n87(x)
+ if (x < 1)
+ fun_l25_n953(x)
+ else
+ fun_l25_n268(x)
+ end
+end
+
+def fun_l24_n88(x)
+ if (x < 1)
+ fun_l25_n36(x)
+ else
+ fun_l25_n31(x)
+ end
+end
+
+def fun_l24_n89(x)
+ if (x < 1)
+ fun_l25_n810(x)
+ else
+ fun_l25_n315(x)
+ end
+end
+
+def fun_l24_n90(x)
+ if (x < 1)
+ fun_l25_n100(x)
+ else
+ fun_l25_n882(x)
+ end
+end
+
+def fun_l24_n91(x)
+ if (x < 1)
+ fun_l25_n278(x)
+ else
+ fun_l25_n720(x)
+ end
+end
+
+def fun_l24_n92(x)
+ if (x < 1)
+ fun_l25_n472(x)
+ else
+ fun_l25_n615(x)
+ end
+end
+
+def fun_l24_n93(x)
+ if (x < 1)
+ fun_l25_n42(x)
+ else
+ fun_l25_n16(x)
+ end
+end
+
+def fun_l24_n94(x)
+ if (x < 1)
+ fun_l25_n905(x)
+ else
+ fun_l25_n988(x)
+ end
+end
+
+def fun_l24_n95(x)
+ if (x < 1)
+ fun_l25_n862(x)
+ else
+ fun_l25_n355(x)
+ end
+end
+
+def fun_l24_n96(x)
+ if (x < 1)
+ fun_l25_n931(x)
+ else
+ fun_l25_n539(x)
+ end
+end
+
+def fun_l24_n97(x)
+ if (x < 1)
+ fun_l25_n185(x)
+ else
+ fun_l25_n868(x)
+ end
+end
+
+def fun_l24_n98(x)
+ if (x < 1)
+ fun_l25_n276(x)
+ else
+ fun_l25_n591(x)
+ end
+end
+
+def fun_l24_n99(x)
+ if (x < 1)
+ fun_l25_n695(x)
+ else
+ fun_l25_n965(x)
+ end
+end
+
+def fun_l24_n100(x)
+ if (x < 1)
+ fun_l25_n293(x)
+ else
+ fun_l25_n127(x)
+ end
+end
+
+def fun_l24_n101(x)
+ if (x < 1)
+ fun_l25_n71(x)
+ else
+ fun_l25_n245(x)
+ end
+end
+
+def fun_l24_n102(x)
+ if (x < 1)
+ fun_l25_n397(x)
+ else
+ fun_l25_n893(x)
+ end
+end
+
+def fun_l24_n103(x)
+ if (x < 1)
+ fun_l25_n191(x)
+ else
+ fun_l25_n101(x)
+ end
+end
+
+def fun_l24_n104(x)
+ if (x < 1)
+ fun_l25_n982(x)
+ else
+ fun_l25_n101(x)
+ end
+end
+
+def fun_l24_n105(x)
+ if (x < 1)
+ fun_l25_n385(x)
+ else
+ fun_l25_n651(x)
+ end
+end
+
+def fun_l24_n106(x)
+ if (x < 1)
+ fun_l25_n577(x)
+ else
+ fun_l25_n241(x)
+ end
+end
+
+def fun_l24_n107(x)
+ if (x < 1)
+ fun_l25_n219(x)
+ else
+ fun_l25_n92(x)
+ end
+end
+
+def fun_l24_n108(x)
+ if (x < 1)
+ fun_l25_n202(x)
+ else
+ fun_l25_n133(x)
+ end
+end
+
+def fun_l24_n109(x)
+ if (x < 1)
+ fun_l25_n706(x)
+ else
+ fun_l25_n970(x)
+ end
+end
+
+def fun_l24_n110(x)
+ if (x < 1)
+ fun_l25_n948(x)
+ else
+ fun_l25_n595(x)
+ end
+end
+
+def fun_l24_n111(x)
+ if (x < 1)
+ fun_l25_n775(x)
+ else
+ fun_l25_n609(x)
+ end
+end
+
+def fun_l24_n112(x)
+ if (x < 1)
+ fun_l25_n905(x)
+ else
+ fun_l25_n11(x)
+ end
+end
+
+def fun_l24_n113(x)
+ if (x < 1)
+ fun_l25_n730(x)
+ else
+ fun_l25_n826(x)
+ end
+end
+
+def fun_l24_n114(x)
+ if (x < 1)
+ fun_l25_n403(x)
+ else
+ fun_l25_n562(x)
+ end
+end
+
+def fun_l24_n115(x)
+ if (x < 1)
+ fun_l25_n272(x)
+ else
+ fun_l25_n844(x)
+ end
+end
+
+def fun_l24_n116(x)
+ if (x < 1)
+ fun_l25_n907(x)
+ else
+ fun_l25_n797(x)
+ end
+end
+
+def fun_l24_n117(x)
+ if (x < 1)
+ fun_l25_n910(x)
+ else
+ fun_l25_n632(x)
+ end
+end
+
+def fun_l24_n118(x)
+ if (x < 1)
+ fun_l25_n570(x)
+ else
+ fun_l25_n645(x)
+ end
+end
+
+def fun_l24_n119(x)
+ if (x < 1)
+ fun_l25_n930(x)
+ else
+ fun_l25_n31(x)
+ end
+end
+
+def fun_l24_n120(x)
+ if (x < 1)
+ fun_l25_n228(x)
+ else
+ fun_l25_n340(x)
+ end
+end
+
+def fun_l24_n121(x)
+ if (x < 1)
+ fun_l25_n891(x)
+ else
+ fun_l25_n395(x)
+ end
+end
+
+def fun_l24_n122(x)
+ if (x < 1)
+ fun_l25_n340(x)
+ else
+ fun_l25_n966(x)
+ end
+end
+
+def fun_l24_n123(x)
+ if (x < 1)
+ fun_l25_n835(x)
+ else
+ fun_l25_n407(x)
+ end
+end
+
+def fun_l24_n124(x)
+ if (x < 1)
+ fun_l25_n156(x)
+ else
+ fun_l25_n151(x)
+ end
+end
+
+def fun_l24_n125(x)
+ if (x < 1)
+ fun_l25_n912(x)
+ else
+ fun_l25_n733(x)
+ end
+end
+
+def fun_l24_n126(x)
+ if (x < 1)
+ fun_l25_n385(x)
+ else
+ fun_l25_n406(x)
+ end
+end
+
+def fun_l24_n127(x)
+ if (x < 1)
+ fun_l25_n662(x)
+ else
+ fun_l25_n932(x)
+ end
+end
+
+def fun_l24_n128(x)
+ if (x < 1)
+ fun_l25_n418(x)
+ else
+ fun_l25_n445(x)
+ end
+end
+
+def fun_l24_n129(x)
+ if (x < 1)
+ fun_l25_n659(x)
+ else
+ fun_l25_n518(x)
+ end
+end
+
+def fun_l24_n130(x)
+ if (x < 1)
+ fun_l25_n784(x)
+ else
+ fun_l25_n342(x)
+ end
+end
+
+def fun_l24_n131(x)
+ if (x < 1)
+ fun_l25_n184(x)
+ else
+ fun_l25_n316(x)
+ end
+end
+
+def fun_l24_n132(x)
+ if (x < 1)
+ fun_l25_n76(x)
+ else
+ fun_l25_n156(x)
+ end
+end
+
+def fun_l24_n133(x)
+ if (x < 1)
+ fun_l25_n355(x)
+ else
+ fun_l25_n430(x)
+ end
+end
+
+def fun_l24_n134(x)
+ if (x < 1)
+ fun_l25_n643(x)
+ else
+ fun_l25_n109(x)
+ end
+end
+
+def fun_l24_n135(x)
+ if (x < 1)
+ fun_l25_n277(x)
+ else
+ fun_l25_n76(x)
+ end
+end
+
+def fun_l24_n136(x)
+ if (x < 1)
+ fun_l25_n898(x)
+ else
+ fun_l25_n870(x)
+ end
+end
+
+def fun_l24_n137(x)
+ if (x < 1)
+ fun_l25_n275(x)
+ else
+ fun_l25_n762(x)
+ end
+end
+
+def fun_l24_n138(x)
+ if (x < 1)
+ fun_l25_n109(x)
+ else
+ fun_l25_n913(x)
+ end
+end
+
+def fun_l24_n139(x)
+ if (x < 1)
+ fun_l25_n731(x)
+ else
+ fun_l25_n767(x)
+ end
+end
+
+def fun_l24_n140(x)
+ if (x < 1)
+ fun_l25_n385(x)
+ else
+ fun_l25_n743(x)
+ end
+end
+
+def fun_l24_n141(x)
+ if (x < 1)
+ fun_l25_n518(x)
+ else
+ fun_l25_n185(x)
+ end
+end
+
+def fun_l24_n142(x)
+ if (x < 1)
+ fun_l25_n656(x)
+ else
+ fun_l25_n614(x)
+ end
+end
+
+def fun_l24_n143(x)
+ if (x < 1)
+ fun_l25_n86(x)
+ else
+ fun_l25_n825(x)
+ end
+end
+
+def fun_l24_n144(x)
+ if (x < 1)
+ fun_l25_n982(x)
+ else
+ fun_l25_n970(x)
+ end
+end
+
+def fun_l24_n145(x)
+ if (x < 1)
+ fun_l25_n608(x)
+ else
+ fun_l25_n970(x)
+ end
+end
+
+def fun_l24_n146(x)
+ if (x < 1)
+ fun_l25_n273(x)
+ else
+ fun_l25_n4(x)
+ end
+end
+
+def fun_l24_n147(x)
+ if (x < 1)
+ fun_l25_n366(x)
+ else
+ fun_l25_n902(x)
+ end
+end
+
+def fun_l24_n148(x)
+ if (x < 1)
+ fun_l25_n682(x)
+ else
+ fun_l25_n210(x)
+ end
+end
+
+def fun_l24_n149(x)
+ if (x < 1)
+ fun_l25_n212(x)
+ else
+ fun_l25_n429(x)
+ end
+end
+
+def fun_l24_n150(x)
+ if (x < 1)
+ fun_l25_n680(x)
+ else
+ fun_l25_n959(x)
+ end
+end
+
+def fun_l24_n151(x)
+ if (x < 1)
+ fun_l25_n65(x)
+ else
+ fun_l25_n654(x)
+ end
+end
+
+def fun_l24_n152(x)
+ if (x < 1)
+ fun_l25_n465(x)
+ else
+ fun_l25_n24(x)
+ end
+end
+
+def fun_l24_n153(x)
+ if (x < 1)
+ fun_l25_n254(x)
+ else
+ fun_l25_n611(x)
+ end
+end
+
+def fun_l24_n154(x)
+ if (x < 1)
+ fun_l25_n525(x)
+ else
+ fun_l25_n25(x)
+ end
+end
+
+def fun_l24_n155(x)
+ if (x < 1)
+ fun_l25_n967(x)
+ else
+ fun_l25_n163(x)
+ end
+end
+
+def fun_l24_n156(x)
+ if (x < 1)
+ fun_l25_n191(x)
+ else
+ fun_l25_n603(x)
+ end
+end
+
+def fun_l24_n157(x)
+ if (x < 1)
+ fun_l25_n724(x)
+ else
+ fun_l25_n537(x)
+ end
+end
+
+def fun_l24_n158(x)
+ if (x < 1)
+ fun_l25_n115(x)
+ else
+ fun_l25_n967(x)
+ end
+end
+
+def fun_l24_n159(x)
+ if (x < 1)
+ fun_l25_n247(x)
+ else
+ fun_l25_n650(x)
+ end
+end
+
+def fun_l24_n160(x)
+ if (x < 1)
+ fun_l25_n681(x)
+ else
+ fun_l25_n754(x)
+ end
+end
+
+def fun_l24_n161(x)
+ if (x < 1)
+ fun_l25_n689(x)
+ else
+ fun_l25_n283(x)
+ end
+end
+
+def fun_l24_n162(x)
+ if (x < 1)
+ fun_l25_n697(x)
+ else
+ fun_l25_n262(x)
+ end
+end
+
+def fun_l24_n163(x)
+ if (x < 1)
+ fun_l25_n584(x)
+ else
+ fun_l25_n502(x)
+ end
+end
+
+def fun_l24_n164(x)
+ if (x < 1)
+ fun_l25_n949(x)
+ else
+ fun_l25_n738(x)
+ end
+end
+
+def fun_l24_n165(x)
+ if (x < 1)
+ fun_l25_n847(x)
+ else
+ fun_l25_n317(x)
+ end
+end
+
+def fun_l24_n166(x)
+ if (x < 1)
+ fun_l25_n827(x)
+ else
+ fun_l25_n831(x)
+ end
+end
+
+def fun_l24_n167(x)
+ if (x < 1)
+ fun_l25_n400(x)
+ else
+ fun_l25_n60(x)
+ end
+end
+
+def fun_l24_n168(x)
+ if (x < 1)
+ fun_l25_n411(x)
+ else
+ fun_l25_n333(x)
+ end
+end
+
+def fun_l24_n169(x)
+ if (x < 1)
+ fun_l25_n481(x)
+ else
+ fun_l25_n336(x)
+ end
+end
+
+def fun_l24_n170(x)
+ if (x < 1)
+ fun_l25_n551(x)
+ else
+ fun_l25_n184(x)
+ end
+end
+
+def fun_l24_n171(x)
+ if (x < 1)
+ fun_l25_n700(x)
+ else
+ fun_l25_n542(x)
+ end
+end
+
+def fun_l24_n172(x)
+ if (x < 1)
+ fun_l25_n496(x)
+ else
+ fun_l25_n494(x)
+ end
+end
+
+def fun_l24_n173(x)
+ if (x < 1)
+ fun_l25_n684(x)
+ else
+ fun_l25_n865(x)
+ end
+end
+
+def fun_l24_n174(x)
+ if (x < 1)
+ fun_l25_n304(x)
+ else
+ fun_l25_n641(x)
+ end
+end
+
+def fun_l24_n175(x)
+ if (x < 1)
+ fun_l25_n252(x)
+ else
+ fun_l25_n573(x)
+ end
+end
+
+def fun_l24_n176(x)
+ if (x < 1)
+ fun_l25_n463(x)
+ else
+ fun_l25_n596(x)
+ end
+end
+
+def fun_l24_n177(x)
+ if (x < 1)
+ fun_l25_n864(x)
+ else
+ fun_l25_n810(x)
+ end
+end
+
+def fun_l24_n178(x)
+ if (x < 1)
+ fun_l25_n182(x)
+ else
+ fun_l25_n900(x)
+ end
+end
+
+def fun_l24_n179(x)
+ if (x < 1)
+ fun_l25_n678(x)
+ else
+ fun_l25_n299(x)
+ end
+end
+
+def fun_l24_n180(x)
+ if (x < 1)
+ fun_l25_n423(x)
+ else
+ fun_l25_n791(x)
+ end
+end
+
+def fun_l24_n181(x)
+ if (x < 1)
+ fun_l25_n582(x)
+ else
+ fun_l25_n382(x)
+ end
+end
+
+def fun_l24_n182(x)
+ if (x < 1)
+ fun_l25_n498(x)
+ else
+ fun_l25_n247(x)
+ end
+end
+
+def fun_l24_n183(x)
+ if (x < 1)
+ fun_l25_n534(x)
+ else
+ fun_l25_n504(x)
+ end
+end
+
+def fun_l24_n184(x)
+ if (x < 1)
+ fun_l25_n947(x)
+ else
+ fun_l25_n708(x)
+ end
+end
+
+def fun_l24_n185(x)
+ if (x < 1)
+ fun_l25_n673(x)
+ else
+ fun_l25_n711(x)
+ end
+end
+
+def fun_l24_n186(x)
+ if (x < 1)
+ fun_l25_n155(x)
+ else
+ fun_l25_n233(x)
+ end
+end
+
+def fun_l24_n187(x)
+ if (x < 1)
+ fun_l25_n669(x)
+ else
+ fun_l25_n558(x)
+ end
+end
+
+def fun_l24_n188(x)
+ if (x < 1)
+ fun_l25_n307(x)
+ else
+ fun_l25_n839(x)
+ end
+end
+
+def fun_l24_n189(x)
+ if (x < 1)
+ fun_l25_n623(x)
+ else
+ fun_l25_n17(x)
+ end
+end
+
+def fun_l24_n190(x)
+ if (x < 1)
+ fun_l25_n468(x)
+ else
+ fun_l25_n391(x)
+ end
+end
+
+def fun_l24_n191(x)
+ if (x < 1)
+ fun_l25_n492(x)
+ else
+ fun_l25_n953(x)
+ end
+end
+
+def fun_l24_n192(x)
+ if (x < 1)
+ fun_l25_n644(x)
+ else
+ fun_l25_n724(x)
+ end
+end
+
+def fun_l24_n193(x)
+ if (x < 1)
+ fun_l25_n438(x)
+ else
+ fun_l25_n110(x)
+ end
+end
+
+def fun_l24_n194(x)
+ if (x < 1)
+ fun_l25_n763(x)
+ else
+ fun_l25_n0(x)
+ end
+end
+
+def fun_l24_n195(x)
+ if (x < 1)
+ fun_l25_n766(x)
+ else
+ fun_l25_n436(x)
+ end
+end
+
+def fun_l24_n196(x)
+ if (x < 1)
+ fun_l25_n646(x)
+ else
+ fun_l25_n264(x)
+ end
+end
+
+def fun_l24_n197(x)
+ if (x < 1)
+ fun_l25_n140(x)
+ else
+ fun_l25_n387(x)
+ end
+end
+
+def fun_l24_n198(x)
+ if (x < 1)
+ fun_l25_n890(x)
+ else
+ fun_l25_n756(x)
+ end
+end
+
+def fun_l24_n199(x)
+ if (x < 1)
+ fun_l25_n597(x)
+ else
+ fun_l25_n330(x)
+ end
+end
+
+def fun_l24_n200(x)
+ if (x < 1)
+ fun_l25_n656(x)
+ else
+ fun_l25_n292(x)
+ end
+end
+
+def fun_l24_n201(x)
+ if (x < 1)
+ fun_l25_n224(x)
+ else
+ fun_l25_n233(x)
+ end
+end
+
+def fun_l24_n202(x)
+ if (x < 1)
+ fun_l25_n153(x)
+ else
+ fun_l25_n926(x)
+ end
+end
+
+def fun_l24_n203(x)
+ if (x < 1)
+ fun_l25_n897(x)
+ else
+ fun_l25_n680(x)
+ end
+end
+
+def fun_l24_n204(x)
+ if (x < 1)
+ fun_l25_n610(x)
+ else
+ fun_l25_n154(x)
+ end
+end
+
+def fun_l24_n205(x)
+ if (x < 1)
+ fun_l25_n307(x)
+ else
+ fun_l25_n451(x)
+ end
+end
+
+def fun_l24_n206(x)
+ if (x < 1)
+ fun_l25_n138(x)
+ else
+ fun_l25_n875(x)
+ end
+end
+
+def fun_l24_n207(x)
+ if (x < 1)
+ fun_l25_n306(x)
+ else
+ fun_l25_n474(x)
+ end
+end
+
+def fun_l24_n208(x)
+ if (x < 1)
+ fun_l25_n771(x)
+ else
+ fun_l25_n105(x)
+ end
+end
+
+def fun_l24_n209(x)
+ if (x < 1)
+ fun_l25_n120(x)
+ else
+ fun_l25_n961(x)
+ end
+end
+
+def fun_l24_n210(x)
+ if (x < 1)
+ fun_l25_n455(x)
+ else
+ fun_l25_n244(x)
+ end
+end
+
+def fun_l24_n211(x)
+ if (x < 1)
+ fun_l25_n93(x)
+ else
+ fun_l25_n31(x)
+ end
+end
+
+def fun_l24_n212(x)
+ if (x < 1)
+ fun_l25_n69(x)
+ else
+ fun_l25_n39(x)
+ end
+end
+
+def fun_l24_n213(x)
+ if (x < 1)
+ fun_l25_n379(x)
+ else
+ fun_l25_n482(x)
+ end
+end
+
+def fun_l24_n214(x)
+ if (x < 1)
+ fun_l25_n839(x)
+ else
+ fun_l25_n669(x)
+ end
+end
+
+def fun_l24_n215(x)
+ if (x < 1)
+ fun_l25_n27(x)
+ else
+ fun_l25_n46(x)
+ end
+end
+
+def fun_l24_n216(x)
+ if (x < 1)
+ fun_l25_n290(x)
+ else
+ fun_l25_n908(x)
+ end
+end
+
+def fun_l24_n217(x)
+ if (x < 1)
+ fun_l25_n618(x)
+ else
+ fun_l25_n242(x)
+ end
+end
+
+def fun_l24_n218(x)
+ if (x < 1)
+ fun_l25_n42(x)
+ else
+ fun_l25_n674(x)
+ end
+end
+
+def fun_l24_n219(x)
+ if (x < 1)
+ fun_l25_n510(x)
+ else
+ fun_l25_n963(x)
+ end
+end
+
+def fun_l24_n220(x)
+ if (x < 1)
+ fun_l25_n345(x)
+ else
+ fun_l25_n666(x)
+ end
+end
+
+def fun_l24_n221(x)
+ if (x < 1)
+ fun_l25_n548(x)
+ else
+ fun_l25_n424(x)
+ end
+end
+
+def fun_l24_n222(x)
+ if (x < 1)
+ fun_l25_n387(x)
+ else
+ fun_l25_n30(x)
+ end
+end
+
+def fun_l24_n223(x)
+ if (x < 1)
+ fun_l25_n124(x)
+ else
+ fun_l25_n374(x)
+ end
+end
+
+def fun_l24_n224(x)
+ if (x < 1)
+ fun_l25_n200(x)
+ else
+ fun_l25_n108(x)
+ end
+end
+
+def fun_l24_n225(x)
+ if (x < 1)
+ fun_l25_n462(x)
+ else
+ fun_l25_n11(x)
+ end
+end
+
+def fun_l24_n226(x)
+ if (x < 1)
+ fun_l25_n930(x)
+ else
+ fun_l25_n791(x)
+ end
+end
+
+def fun_l24_n227(x)
+ if (x < 1)
+ fun_l25_n10(x)
+ else
+ fun_l25_n447(x)
+ end
+end
+
+def fun_l24_n228(x)
+ if (x < 1)
+ fun_l25_n858(x)
+ else
+ fun_l25_n472(x)
+ end
+end
+
+def fun_l24_n229(x)
+ if (x < 1)
+ fun_l25_n409(x)
+ else
+ fun_l25_n228(x)
+ end
+end
+
+def fun_l24_n230(x)
+ if (x < 1)
+ fun_l25_n82(x)
+ else
+ fun_l25_n665(x)
+ end
+end
+
+def fun_l24_n231(x)
+ if (x < 1)
+ fun_l25_n148(x)
+ else
+ fun_l25_n174(x)
+ end
+end
+
+def fun_l24_n232(x)
+ if (x < 1)
+ fun_l25_n785(x)
+ else
+ fun_l25_n996(x)
+ end
+end
+
+def fun_l24_n233(x)
+ if (x < 1)
+ fun_l25_n827(x)
+ else
+ fun_l25_n393(x)
+ end
+end
+
+def fun_l24_n234(x)
+ if (x < 1)
+ fun_l25_n619(x)
+ else
+ fun_l25_n361(x)
+ end
+end
+
+def fun_l24_n235(x)
+ if (x < 1)
+ fun_l25_n52(x)
+ else
+ fun_l25_n420(x)
+ end
+end
+
+def fun_l24_n236(x)
+ if (x < 1)
+ fun_l25_n355(x)
+ else
+ fun_l25_n561(x)
+ end
+end
+
+def fun_l24_n237(x)
+ if (x < 1)
+ fun_l25_n36(x)
+ else
+ fun_l25_n885(x)
+ end
+end
+
+def fun_l24_n238(x)
+ if (x < 1)
+ fun_l25_n15(x)
+ else
+ fun_l25_n19(x)
+ end
+end
+
+def fun_l24_n239(x)
+ if (x < 1)
+ fun_l25_n137(x)
+ else
+ fun_l25_n34(x)
+ end
+end
+
+def fun_l24_n240(x)
+ if (x < 1)
+ fun_l25_n776(x)
+ else
+ fun_l25_n199(x)
+ end
+end
+
+def fun_l24_n241(x)
+ if (x < 1)
+ fun_l25_n904(x)
+ else
+ fun_l25_n396(x)
+ end
+end
+
+def fun_l24_n242(x)
+ if (x < 1)
+ fun_l25_n122(x)
+ else
+ fun_l25_n720(x)
+ end
+end
+
+def fun_l24_n243(x)
+ if (x < 1)
+ fun_l25_n513(x)
+ else
+ fun_l25_n429(x)
+ end
+end
+
+def fun_l24_n244(x)
+ if (x < 1)
+ fun_l25_n289(x)
+ else
+ fun_l25_n265(x)
+ end
+end
+
+def fun_l24_n245(x)
+ if (x < 1)
+ fun_l25_n334(x)
+ else
+ fun_l25_n42(x)
+ end
+end
+
+def fun_l24_n246(x)
+ if (x < 1)
+ fun_l25_n55(x)
+ else
+ fun_l25_n67(x)
+ end
+end
+
+def fun_l24_n247(x)
+ if (x < 1)
+ fun_l25_n648(x)
+ else
+ fun_l25_n38(x)
+ end
+end
+
+def fun_l24_n248(x)
+ if (x < 1)
+ fun_l25_n904(x)
+ else
+ fun_l25_n732(x)
+ end
+end
+
+def fun_l24_n249(x)
+ if (x < 1)
+ fun_l25_n243(x)
+ else
+ fun_l25_n704(x)
+ end
+end
+
+def fun_l24_n250(x)
+ if (x < 1)
+ fun_l25_n513(x)
+ else
+ fun_l25_n326(x)
+ end
+end
+
+def fun_l24_n251(x)
+ if (x < 1)
+ fun_l25_n122(x)
+ else
+ fun_l25_n617(x)
+ end
+end
+
+def fun_l24_n252(x)
+ if (x < 1)
+ fun_l25_n837(x)
+ else
+ fun_l25_n891(x)
+ end
+end
+
+def fun_l24_n253(x)
+ if (x < 1)
+ fun_l25_n39(x)
+ else
+ fun_l25_n318(x)
+ end
+end
+
+def fun_l24_n254(x)
+ if (x < 1)
+ fun_l25_n79(x)
+ else
+ fun_l25_n195(x)
+ end
+end
+
+def fun_l24_n255(x)
+ if (x < 1)
+ fun_l25_n671(x)
+ else
+ fun_l25_n485(x)
+ end
+end
+
+def fun_l24_n256(x)
+ if (x < 1)
+ fun_l25_n775(x)
+ else
+ fun_l25_n187(x)
+ end
+end
+
+def fun_l24_n257(x)
+ if (x < 1)
+ fun_l25_n150(x)
+ else
+ fun_l25_n740(x)
+ end
+end
+
+def fun_l24_n258(x)
+ if (x < 1)
+ fun_l25_n131(x)
+ else
+ fun_l25_n960(x)
+ end
+end
+
+def fun_l24_n259(x)
+ if (x < 1)
+ fun_l25_n608(x)
+ else
+ fun_l25_n931(x)
+ end
+end
+
+def fun_l24_n260(x)
+ if (x < 1)
+ fun_l25_n846(x)
+ else
+ fun_l25_n278(x)
+ end
+end
+
+def fun_l24_n261(x)
+ if (x < 1)
+ fun_l25_n532(x)
+ else
+ fun_l25_n432(x)
+ end
+end
+
+def fun_l24_n262(x)
+ if (x < 1)
+ fun_l25_n367(x)
+ else
+ fun_l25_n847(x)
+ end
+end
+
+def fun_l24_n263(x)
+ if (x < 1)
+ fun_l25_n782(x)
+ else
+ fun_l25_n33(x)
+ end
+end
+
+def fun_l24_n264(x)
+ if (x < 1)
+ fun_l25_n822(x)
+ else
+ fun_l25_n711(x)
+ end
+end
+
+def fun_l24_n265(x)
+ if (x < 1)
+ fun_l25_n994(x)
+ else
+ fun_l25_n573(x)
+ end
+end
+
+def fun_l24_n266(x)
+ if (x < 1)
+ fun_l25_n234(x)
+ else
+ fun_l25_n617(x)
+ end
+end
+
+def fun_l24_n267(x)
+ if (x < 1)
+ fun_l25_n52(x)
+ else
+ fun_l25_n759(x)
+ end
+end
+
+def fun_l24_n268(x)
+ if (x < 1)
+ fun_l25_n161(x)
+ else
+ fun_l25_n167(x)
+ end
+end
+
+def fun_l24_n269(x)
+ if (x < 1)
+ fun_l25_n113(x)
+ else
+ fun_l25_n158(x)
+ end
+end
+
+def fun_l24_n270(x)
+ if (x < 1)
+ fun_l25_n151(x)
+ else
+ fun_l25_n127(x)
+ end
+end
+
+def fun_l24_n271(x)
+ if (x < 1)
+ fun_l25_n811(x)
+ else
+ fun_l25_n81(x)
+ end
+end
+
+def fun_l24_n272(x)
+ if (x < 1)
+ fun_l25_n622(x)
+ else
+ fun_l25_n796(x)
+ end
+end
+
+def fun_l24_n273(x)
+ if (x < 1)
+ fun_l25_n106(x)
+ else
+ fun_l25_n697(x)
+ end
+end
+
+def fun_l24_n274(x)
+ if (x < 1)
+ fun_l25_n63(x)
+ else
+ fun_l25_n599(x)
+ end
+end
+
+def fun_l24_n275(x)
+ if (x < 1)
+ fun_l25_n999(x)
+ else
+ fun_l25_n188(x)
+ end
+end
+
+def fun_l24_n276(x)
+ if (x < 1)
+ fun_l25_n491(x)
+ else
+ fun_l25_n614(x)
+ end
+end
+
+def fun_l24_n277(x)
+ if (x < 1)
+ fun_l25_n549(x)
+ else
+ fun_l25_n141(x)
+ end
+end
+
+def fun_l24_n278(x)
+ if (x < 1)
+ fun_l25_n442(x)
+ else
+ fun_l25_n900(x)
+ end
+end
+
+def fun_l24_n279(x)
+ if (x < 1)
+ fun_l25_n816(x)
+ else
+ fun_l25_n904(x)
+ end
+end
+
+def fun_l24_n280(x)
+ if (x < 1)
+ fun_l25_n508(x)
+ else
+ fun_l25_n569(x)
+ end
+end
+
+def fun_l24_n281(x)
+ if (x < 1)
+ fun_l25_n438(x)
+ else
+ fun_l25_n750(x)
+ end
+end
+
+def fun_l24_n282(x)
+ if (x < 1)
+ fun_l25_n984(x)
+ else
+ fun_l25_n573(x)
+ end
+end
+
+def fun_l24_n283(x)
+ if (x < 1)
+ fun_l25_n425(x)
+ else
+ fun_l25_n963(x)
+ end
+end
+
+def fun_l24_n284(x)
+ if (x < 1)
+ fun_l25_n213(x)
+ else
+ fun_l25_n344(x)
+ end
+end
+
+def fun_l24_n285(x)
+ if (x < 1)
+ fun_l25_n1(x)
+ else
+ fun_l25_n826(x)
+ end
+end
+
+def fun_l24_n286(x)
+ if (x < 1)
+ fun_l25_n297(x)
+ else
+ fun_l25_n266(x)
+ end
+end
+
+def fun_l24_n287(x)
+ if (x < 1)
+ fun_l25_n203(x)
+ else
+ fun_l25_n570(x)
+ end
+end
+
+def fun_l24_n288(x)
+ if (x < 1)
+ fun_l25_n849(x)
+ else
+ fun_l25_n336(x)
+ end
+end
+
+def fun_l24_n289(x)
+ if (x < 1)
+ fun_l25_n982(x)
+ else
+ fun_l25_n38(x)
+ end
+end
+
+def fun_l24_n290(x)
+ if (x < 1)
+ fun_l25_n687(x)
+ else
+ fun_l25_n906(x)
+ end
+end
+
+def fun_l24_n291(x)
+ if (x < 1)
+ fun_l25_n921(x)
+ else
+ fun_l25_n229(x)
+ end
+end
+
+def fun_l24_n292(x)
+ if (x < 1)
+ fun_l25_n494(x)
+ else
+ fun_l25_n138(x)
+ end
+end
+
+def fun_l24_n293(x)
+ if (x < 1)
+ fun_l25_n175(x)
+ else
+ fun_l25_n575(x)
+ end
+end
+
+def fun_l24_n294(x)
+ if (x < 1)
+ fun_l25_n126(x)
+ else
+ fun_l25_n902(x)
+ end
+end
+
+def fun_l24_n295(x)
+ if (x < 1)
+ fun_l25_n634(x)
+ else
+ fun_l25_n199(x)
+ end
+end
+
+def fun_l24_n296(x)
+ if (x < 1)
+ fun_l25_n929(x)
+ else
+ fun_l25_n468(x)
+ end
+end
+
+def fun_l24_n297(x)
+ if (x < 1)
+ fun_l25_n856(x)
+ else
+ fun_l25_n135(x)
+ end
+end
+
+def fun_l24_n298(x)
+ if (x < 1)
+ fun_l25_n655(x)
+ else
+ fun_l25_n545(x)
+ end
+end
+
+def fun_l24_n299(x)
+ if (x < 1)
+ fun_l25_n373(x)
+ else
+ fun_l25_n173(x)
+ end
+end
+
+def fun_l24_n300(x)
+ if (x < 1)
+ fun_l25_n874(x)
+ else
+ fun_l25_n85(x)
+ end
+end
+
+def fun_l24_n301(x)
+ if (x < 1)
+ fun_l25_n398(x)
+ else
+ fun_l25_n43(x)
+ end
+end
+
+def fun_l24_n302(x)
+ if (x < 1)
+ fun_l25_n995(x)
+ else
+ fun_l25_n890(x)
+ end
+end
+
+def fun_l24_n303(x)
+ if (x < 1)
+ fun_l25_n971(x)
+ else
+ fun_l25_n250(x)
+ end
+end
+
+def fun_l24_n304(x)
+ if (x < 1)
+ fun_l25_n752(x)
+ else
+ fun_l25_n681(x)
+ end
+end
+
+def fun_l24_n305(x)
+ if (x < 1)
+ fun_l25_n688(x)
+ else
+ fun_l25_n451(x)
+ end
+end
+
+def fun_l24_n306(x)
+ if (x < 1)
+ fun_l25_n167(x)
+ else
+ fun_l25_n784(x)
+ end
+end
+
+def fun_l24_n307(x)
+ if (x < 1)
+ fun_l25_n479(x)
+ else
+ fun_l25_n295(x)
+ end
+end
+
+def fun_l24_n308(x)
+ if (x < 1)
+ fun_l25_n779(x)
+ else
+ fun_l25_n472(x)
+ end
+end
+
+def fun_l24_n309(x)
+ if (x < 1)
+ fun_l25_n10(x)
+ else
+ fun_l25_n301(x)
+ end
+end
+
+def fun_l24_n310(x)
+ if (x < 1)
+ fun_l25_n197(x)
+ else
+ fun_l25_n152(x)
+ end
+end
+
+def fun_l24_n311(x)
+ if (x < 1)
+ fun_l25_n300(x)
+ else
+ fun_l25_n105(x)
+ end
+end
+
+def fun_l24_n312(x)
+ if (x < 1)
+ fun_l25_n1(x)
+ else
+ fun_l25_n956(x)
+ end
+end
+
+def fun_l24_n313(x)
+ if (x < 1)
+ fun_l25_n310(x)
+ else
+ fun_l25_n701(x)
+ end
+end
+
+def fun_l24_n314(x)
+ if (x < 1)
+ fun_l25_n0(x)
+ else
+ fun_l25_n58(x)
+ end
+end
+
+def fun_l24_n315(x)
+ if (x < 1)
+ fun_l25_n31(x)
+ else
+ fun_l25_n69(x)
+ end
+end
+
+def fun_l24_n316(x)
+ if (x < 1)
+ fun_l25_n967(x)
+ else
+ fun_l25_n130(x)
+ end
+end
+
+def fun_l24_n317(x)
+ if (x < 1)
+ fun_l25_n995(x)
+ else
+ fun_l25_n630(x)
+ end
+end
+
+def fun_l24_n318(x)
+ if (x < 1)
+ fun_l25_n349(x)
+ else
+ fun_l25_n916(x)
+ end
+end
+
+def fun_l24_n319(x)
+ if (x < 1)
+ fun_l25_n230(x)
+ else
+ fun_l25_n880(x)
+ end
+end
+
+def fun_l24_n320(x)
+ if (x < 1)
+ fun_l25_n452(x)
+ else
+ fun_l25_n316(x)
+ end
+end
+
+def fun_l24_n321(x)
+ if (x < 1)
+ fun_l25_n581(x)
+ else
+ fun_l25_n262(x)
+ end
+end
+
+def fun_l24_n322(x)
+ if (x < 1)
+ fun_l25_n70(x)
+ else
+ fun_l25_n674(x)
+ end
+end
+
+def fun_l24_n323(x)
+ if (x < 1)
+ fun_l25_n726(x)
+ else
+ fun_l25_n943(x)
+ end
+end
+
+def fun_l24_n324(x)
+ if (x < 1)
+ fun_l25_n779(x)
+ else
+ fun_l25_n209(x)
+ end
+end
+
+def fun_l24_n325(x)
+ if (x < 1)
+ fun_l25_n132(x)
+ else
+ fun_l25_n301(x)
+ end
+end
+
+def fun_l24_n326(x)
+ if (x < 1)
+ fun_l25_n255(x)
+ else
+ fun_l25_n154(x)
+ end
+end
+
+def fun_l24_n327(x)
+ if (x < 1)
+ fun_l25_n248(x)
+ else
+ fun_l25_n152(x)
+ end
+end
+
+def fun_l24_n328(x)
+ if (x < 1)
+ fun_l25_n536(x)
+ else
+ fun_l25_n703(x)
+ end
+end
+
+def fun_l24_n329(x)
+ if (x < 1)
+ fun_l25_n744(x)
+ else
+ fun_l25_n133(x)
+ end
+end
+
+def fun_l24_n330(x)
+ if (x < 1)
+ fun_l25_n455(x)
+ else
+ fun_l25_n576(x)
+ end
+end
+
+def fun_l24_n331(x)
+ if (x < 1)
+ fun_l25_n590(x)
+ else
+ fun_l25_n357(x)
+ end
+end
+
+def fun_l24_n332(x)
+ if (x < 1)
+ fun_l25_n151(x)
+ else
+ fun_l25_n969(x)
+ end
+end
+
+def fun_l24_n333(x)
+ if (x < 1)
+ fun_l25_n725(x)
+ else
+ fun_l25_n681(x)
+ end
+end
+
+def fun_l24_n334(x)
+ if (x < 1)
+ fun_l25_n157(x)
+ else
+ fun_l25_n643(x)
+ end
+end
+
+def fun_l24_n335(x)
+ if (x < 1)
+ fun_l25_n42(x)
+ else
+ fun_l25_n749(x)
+ end
+end
+
+def fun_l24_n336(x)
+ if (x < 1)
+ fun_l25_n831(x)
+ else
+ fun_l25_n126(x)
+ end
+end
+
+def fun_l24_n337(x)
+ if (x < 1)
+ fun_l25_n424(x)
+ else
+ fun_l25_n559(x)
+ end
+end
+
+def fun_l24_n338(x)
+ if (x < 1)
+ fun_l25_n897(x)
+ else
+ fun_l25_n89(x)
+ end
+end
+
+def fun_l24_n339(x)
+ if (x < 1)
+ fun_l25_n755(x)
+ else
+ fun_l25_n506(x)
+ end
+end
+
+def fun_l24_n340(x)
+ if (x < 1)
+ fun_l25_n387(x)
+ else
+ fun_l25_n631(x)
+ end
+end
+
+def fun_l24_n341(x)
+ if (x < 1)
+ fun_l25_n694(x)
+ else
+ fun_l25_n707(x)
+ end
+end
+
+def fun_l24_n342(x)
+ if (x < 1)
+ fun_l25_n65(x)
+ else
+ fun_l25_n687(x)
+ end
+end
+
+def fun_l24_n343(x)
+ if (x < 1)
+ fun_l25_n84(x)
+ else
+ fun_l25_n738(x)
+ end
+end
+
+def fun_l24_n344(x)
+ if (x < 1)
+ fun_l25_n729(x)
+ else
+ fun_l25_n639(x)
+ end
+end
+
+def fun_l24_n345(x)
+ if (x < 1)
+ fun_l25_n102(x)
+ else
+ fun_l25_n299(x)
+ end
+end
+
+def fun_l24_n346(x)
+ if (x < 1)
+ fun_l25_n604(x)
+ else
+ fun_l25_n94(x)
+ end
+end
+
+def fun_l24_n347(x)
+ if (x < 1)
+ fun_l25_n93(x)
+ else
+ fun_l25_n975(x)
+ end
+end
+
+def fun_l24_n348(x)
+ if (x < 1)
+ fun_l25_n124(x)
+ else
+ fun_l25_n927(x)
+ end
+end
+
+def fun_l24_n349(x)
+ if (x < 1)
+ fun_l25_n944(x)
+ else
+ fun_l25_n162(x)
+ end
+end
+
+def fun_l24_n350(x)
+ if (x < 1)
+ fun_l25_n623(x)
+ else
+ fun_l25_n5(x)
+ end
+end
+
+def fun_l24_n351(x)
+ if (x < 1)
+ fun_l25_n885(x)
+ else
+ fun_l25_n884(x)
+ end
+end
+
+def fun_l24_n352(x)
+ if (x < 1)
+ fun_l25_n1(x)
+ else
+ fun_l25_n366(x)
+ end
+end
+
+def fun_l24_n353(x)
+ if (x < 1)
+ fun_l25_n240(x)
+ else
+ fun_l25_n630(x)
+ end
+end
+
+def fun_l24_n354(x)
+ if (x < 1)
+ fun_l25_n232(x)
+ else
+ fun_l25_n758(x)
+ end
+end
+
+def fun_l24_n355(x)
+ if (x < 1)
+ fun_l25_n529(x)
+ else
+ fun_l25_n810(x)
+ end
+end
+
+def fun_l24_n356(x)
+ if (x < 1)
+ fun_l25_n438(x)
+ else
+ fun_l25_n146(x)
+ end
+end
+
+def fun_l24_n357(x)
+ if (x < 1)
+ fun_l25_n551(x)
+ else
+ fun_l25_n727(x)
+ end
+end
+
+def fun_l24_n358(x)
+ if (x < 1)
+ fun_l25_n764(x)
+ else
+ fun_l25_n379(x)
+ end
+end
+
+def fun_l24_n359(x)
+ if (x < 1)
+ fun_l25_n89(x)
+ else
+ fun_l25_n518(x)
+ end
+end
+
+def fun_l24_n360(x)
+ if (x < 1)
+ fun_l25_n567(x)
+ else
+ fun_l25_n98(x)
+ end
+end
+
+def fun_l24_n361(x)
+ if (x < 1)
+ fun_l25_n26(x)
+ else
+ fun_l25_n818(x)
+ end
+end
+
+def fun_l24_n362(x)
+ if (x < 1)
+ fun_l25_n205(x)
+ else
+ fun_l25_n460(x)
+ end
+end
+
+def fun_l24_n363(x)
+ if (x < 1)
+ fun_l25_n19(x)
+ else
+ fun_l25_n134(x)
+ end
+end
+
+def fun_l24_n364(x)
+ if (x < 1)
+ fun_l25_n221(x)
+ else
+ fun_l25_n391(x)
+ end
+end
+
+def fun_l24_n365(x)
+ if (x < 1)
+ fun_l25_n546(x)
+ else
+ fun_l25_n62(x)
+ end
+end
+
+def fun_l24_n366(x)
+ if (x < 1)
+ fun_l25_n412(x)
+ else
+ fun_l25_n593(x)
+ end
+end
+
+def fun_l24_n367(x)
+ if (x < 1)
+ fun_l25_n576(x)
+ else
+ fun_l25_n798(x)
+ end
+end
+
+def fun_l24_n368(x)
+ if (x < 1)
+ fun_l25_n528(x)
+ else
+ fun_l25_n575(x)
+ end
+end
+
+def fun_l24_n369(x)
+ if (x < 1)
+ fun_l25_n914(x)
+ else
+ fun_l25_n417(x)
+ end
+end
+
+def fun_l24_n370(x)
+ if (x < 1)
+ fun_l25_n397(x)
+ else
+ fun_l25_n684(x)
+ end
+end
+
+def fun_l24_n371(x)
+ if (x < 1)
+ fun_l25_n827(x)
+ else
+ fun_l25_n677(x)
+ end
+end
+
+def fun_l24_n372(x)
+ if (x < 1)
+ fun_l25_n256(x)
+ else
+ fun_l25_n841(x)
+ end
+end
+
+def fun_l24_n373(x)
+ if (x < 1)
+ fun_l25_n671(x)
+ else
+ fun_l25_n712(x)
+ end
+end
+
+def fun_l24_n374(x)
+ if (x < 1)
+ fun_l25_n696(x)
+ else
+ fun_l25_n598(x)
+ end
+end
+
+def fun_l24_n375(x)
+ if (x < 1)
+ fun_l25_n384(x)
+ else
+ fun_l25_n426(x)
+ end
+end
+
+def fun_l24_n376(x)
+ if (x < 1)
+ fun_l25_n578(x)
+ else
+ fun_l25_n555(x)
+ end
+end
+
+def fun_l24_n377(x)
+ if (x < 1)
+ fun_l25_n290(x)
+ else
+ fun_l25_n480(x)
+ end
+end
+
+def fun_l24_n378(x)
+ if (x < 1)
+ fun_l25_n481(x)
+ else
+ fun_l25_n647(x)
+ end
+end
+
+def fun_l24_n379(x)
+ if (x < 1)
+ fun_l25_n502(x)
+ else
+ fun_l25_n985(x)
+ end
+end
+
+def fun_l24_n380(x)
+ if (x < 1)
+ fun_l25_n275(x)
+ else
+ fun_l25_n575(x)
+ end
+end
+
+def fun_l24_n381(x)
+ if (x < 1)
+ fun_l25_n901(x)
+ else
+ fun_l25_n396(x)
+ end
+end
+
+def fun_l24_n382(x)
+ if (x < 1)
+ fun_l25_n283(x)
+ else
+ fun_l25_n544(x)
+ end
+end
+
+def fun_l24_n383(x)
+ if (x < 1)
+ fun_l25_n192(x)
+ else
+ fun_l25_n953(x)
+ end
+end
+
+def fun_l24_n384(x)
+ if (x < 1)
+ fun_l25_n862(x)
+ else
+ fun_l25_n264(x)
+ end
+end
+
+def fun_l24_n385(x)
+ if (x < 1)
+ fun_l25_n528(x)
+ else
+ fun_l25_n429(x)
+ end
+end
+
+def fun_l24_n386(x)
+ if (x < 1)
+ fun_l25_n29(x)
+ else
+ fun_l25_n831(x)
+ end
+end
+
+def fun_l24_n387(x)
+ if (x < 1)
+ fun_l25_n152(x)
+ else
+ fun_l25_n902(x)
+ end
+end
+
+def fun_l24_n388(x)
+ if (x < 1)
+ fun_l25_n538(x)
+ else
+ fun_l25_n468(x)
+ end
+end
+
+def fun_l24_n389(x)
+ if (x < 1)
+ fun_l25_n772(x)
+ else
+ fun_l25_n105(x)
+ end
+end
+
+def fun_l24_n390(x)
+ if (x < 1)
+ fun_l25_n875(x)
+ else
+ fun_l25_n723(x)
+ end
+end
+
+def fun_l24_n391(x)
+ if (x < 1)
+ fun_l25_n330(x)
+ else
+ fun_l25_n659(x)
+ end
+end
+
+def fun_l24_n392(x)
+ if (x < 1)
+ fun_l25_n168(x)
+ else
+ fun_l25_n68(x)
+ end
+end
+
+def fun_l24_n393(x)
+ if (x < 1)
+ fun_l25_n481(x)
+ else
+ fun_l25_n200(x)
+ end
+end
+
+def fun_l24_n394(x)
+ if (x < 1)
+ fun_l25_n391(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n395(x)
+ if (x < 1)
+ fun_l25_n383(x)
+ else
+ fun_l25_n250(x)
+ end
+end
+
+def fun_l24_n396(x)
+ if (x < 1)
+ fun_l25_n537(x)
+ else
+ fun_l25_n283(x)
+ end
+end
+
+def fun_l24_n397(x)
+ if (x < 1)
+ fun_l25_n504(x)
+ else
+ fun_l25_n916(x)
+ end
+end
+
+def fun_l24_n398(x)
+ if (x < 1)
+ fun_l25_n992(x)
+ else
+ fun_l25_n504(x)
+ end
+end
+
+def fun_l24_n399(x)
+ if (x < 1)
+ fun_l25_n294(x)
+ else
+ fun_l25_n412(x)
+ end
+end
+
+def fun_l24_n400(x)
+ if (x < 1)
+ fun_l25_n686(x)
+ else
+ fun_l25_n85(x)
+ end
+end
+
+def fun_l24_n401(x)
+ if (x < 1)
+ fun_l25_n874(x)
+ else
+ fun_l25_n980(x)
+ end
+end
+
+def fun_l24_n402(x)
+ if (x < 1)
+ fun_l25_n454(x)
+ else
+ fun_l25_n867(x)
+ end
+end
+
+def fun_l24_n403(x)
+ if (x < 1)
+ fun_l25_n594(x)
+ else
+ fun_l25_n970(x)
+ end
+end
+
+def fun_l24_n404(x)
+ if (x < 1)
+ fun_l25_n281(x)
+ else
+ fun_l25_n881(x)
+ end
+end
+
+def fun_l24_n405(x)
+ if (x < 1)
+ fun_l25_n713(x)
+ else
+ fun_l25_n530(x)
+ end
+end
+
+def fun_l24_n406(x)
+ if (x < 1)
+ fun_l25_n874(x)
+ else
+ fun_l25_n953(x)
+ end
+end
+
+def fun_l24_n407(x)
+ if (x < 1)
+ fun_l25_n569(x)
+ else
+ fun_l25_n991(x)
+ end
+end
+
+def fun_l24_n408(x)
+ if (x < 1)
+ fun_l25_n875(x)
+ else
+ fun_l25_n409(x)
+ end
+end
+
+def fun_l24_n409(x)
+ if (x < 1)
+ fun_l25_n604(x)
+ else
+ fun_l25_n454(x)
+ end
+end
+
+def fun_l24_n410(x)
+ if (x < 1)
+ fun_l25_n267(x)
+ else
+ fun_l25_n100(x)
+ end
+end
+
+def fun_l24_n411(x)
+ if (x < 1)
+ fun_l25_n966(x)
+ else
+ fun_l25_n537(x)
+ end
+end
+
+def fun_l24_n412(x)
+ if (x < 1)
+ fun_l25_n261(x)
+ else
+ fun_l25_n106(x)
+ end
+end
+
+def fun_l24_n413(x)
+ if (x < 1)
+ fun_l25_n869(x)
+ else
+ fun_l25_n890(x)
+ end
+end
+
+def fun_l24_n414(x)
+ if (x < 1)
+ fun_l25_n784(x)
+ else
+ fun_l25_n147(x)
+ end
+end
+
+def fun_l24_n415(x)
+ if (x < 1)
+ fun_l25_n6(x)
+ else
+ fun_l25_n808(x)
+ end
+end
+
+def fun_l24_n416(x)
+ if (x < 1)
+ fun_l25_n940(x)
+ else
+ fun_l25_n680(x)
+ end
+end
+
+def fun_l24_n417(x)
+ if (x < 1)
+ fun_l25_n3(x)
+ else
+ fun_l25_n799(x)
+ end
+end
+
+def fun_l24_n418(x)
+ if (x < 1)
+ fun_l25_n196(x)
+ else
+ fun_l25_n785(x)
+ end
+end
+
+def fun_l24_n419(x)
+ if (x < 1)
+ fun_l25_n786(x)
+ else
+ fun_l25_n607(x)
+ end
+end
+
+def fun_l24_n420(x)
+ if (x < 1)
+ fun_l25_n720(x)
+ else
+ fun_l25_n74(x)
+ end
+end
+
+def fun_l24_n421(x)
+ if (x < 1)
+ fun_l25_n962(x)
+ else
+ fun_l25_n489(x)
+ end
+end
+
+def fun_l24_n422(x)
+ if (x < 1)
+ fun_l25_n231(x)
+ else
+ fun_l25_n878(x)
+ end
+end
+
+def fun_l24_n423(x)
+ if (x < 1)
+ fun_l25_n720(x)
+ else
+ fun_l25_n988(x)
+ end
+end
+
+def fun_l24_n424(x)
+ if (x < 1)
+ fun_l25_n883(x)
+ else
+ fun_l25_n510(x)
+ end
+end
+
+def fun_l24_n425(x)
+ if (x < 1)
+ fun_l25_n443(x)
+ else
+ fun_l25_n533(x)
+ end
+end
+
+def fun_l24_n426(x)
+ if (x < 1)
+ fun_l25_n541(x)
+ else
+ fun_l25_n747(x)
+ end
+end
+
+def fun_l24_n427(x)
+ if (x < 1)
+ fun_l25_n308(x)
+ else
+ fun_l25_n373(x)
+ end
+end
+
+def fun_l24_n428(x)
+ if (x < 1)
+ fun_l25_n484(x)
+ else
+ fun_l25_n632(x)
+ end
+end
+
+def fun_l24_n429(x)
+ if (x < 1)
+ fun_l25_n777(x)
+ else
+ fun_l25_n128(x)
+ end
+end
+
+def fun_l24_n430(x)
+ if (x < 1)
+ fun_l25_n729(x)
+ else
+ fun_l25_n644(x)
+ end
+end
+
+def fun_l24_n431(x)
+ if (x < 1)
+ fun_l25_n330(x)
+ else
+ fun_l25_n947(x)
+ end
+end
+
+def fun_l24_n432(x)
+ if (x < 1)
+ fun_l25_n929(x)
+ else
+ fun_l25_n80(x)
+ end
+end
+
+def fun_l24_n433(x)
+ if (x < 1)
+ fun_l25_n269(x)
+ else
+ fun_l25_n307(x)
+ end
+end
+
+def fun_l24_n434(x)
+ if (x < 1)
+ fun_l25_n824(x)
+ else
+ fun_l25_n451(x)
+ end
+end
+
+def fun_l24_n435(x)
+ if (x < 1)
+ fun_l25_n93(x)
+ else
+ fun_l25_n198(x)
+ end
+end
+
+def fun_l24_n436(x)
+ if (x < 1)
+ fun_l25_n359(x)
+ else
+ fun_l25_n412(x)
+ end
+end
+
+def fun_l24_n437(x)
+ if (x < 1)
+ fun_l25_n427(x)
+ else
+ fun_l25_n321(x)
+ end
+end
+
+def fun_l24_n438(x)
+ if (x < 1)
+ fun_l25_n765(x)
+ else
+ fun_l25_n223(x)
+ end
+end
+
+def fun_l24_n439(x)
+ if (x < 1)
+ fun_l25_n918(x)
+ else
+ fun_l25_n902(x)
+ end
+end
+
+def fun_l24_n440(x)
+ if (x < 1)
+ fun_l25_n320(x)
+ else
+ fun_l25_n428(x)
+ end
+end
+
+def fun_l24_n441(x)
+ if (x < 1)
+ fun_l25_n159(x)
+ else
+ fun_l25_n857(x)
+ end
+end
+
+def fun_l24_n442(x)
+ if (x < 1)
+ fun_l25_n505(x)
+ else
+ fun_l25_n565(x)
+ end
+end
+
+def fun_l24_n443(x)
+ if (x < 1)
+ fun_l25_n214(x)
+ else
+ fun_l25_n861(x)
+ end
+end
+
+def fun_l24_n444(x)
+ if (x < 1)
+ fun_l25_n185(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n445(x)
+ if (x < 1)
+ fun_l25_n198(x)
+ else
+ fun_l25_n314(x)
+ end
+end
+
+def fun_l24_n446(x)
+ if (x < 1)
+ fun_l25_n334(x)
+ else
+ fun_l25_n633(x)
+ end
+end
+
+def fun_l24_n447(x)
+ if (x < 1)
+ fun_l25_n972(x)
+ else
+ fun_l25_n671(x)
+ end
+end
+
+def fun_l24_n448(x)
+ if (x < 1)
+ fun_l25_n608(x)
+ else
+ fun_l25_n720(x)
+ end
+end
+
+def fun_l24_n449(x)
+ if (x < 1)
+ fun_l25_n71(x)
+ else
+ fun_l25_n479(x)
+ end
+end
+
+def fun_l24_n450(x)
+ if (x < 1)
+ fun_l25_n689(x)
+ else
+ fun_l25_n716(x)
+ end
+end
+
+def fun_l24_n451(x)
+ if (x < 1)
+ fun_l25_n696(x)
+ else
+ fun_l25_n453(x)
+ end
+end
+
+def fun_l24_n452(x)
+ if (x < 1)
+ fun_l25_n804(x)
+ else
+ fun_l25_n508(x)
+ end
+end
+
+def fun_l24_n453(x)
+ if (x < 1)
+ fun_l25_n32(x)
+ else
+ fun_l25_n180(x)
+ end
+end
+
+def fun_l24_n454(x)
+ if (x < 1)
+ fun_l25_n493(x)
+ else
+ fun_l25_n200(x)
+ end
+end
+
+def fun_l24_n455(x)
+ if (x < 1)
+ fun_l25_n763(x)
+ else
+ fun_l25_n362(x)
+ end
+end
+
+def fun_l24_n456(x)
+ if (x < 1)
+ fun_l25_n488(x)
+ else
+ fun_l25_n202(x)
+ end
+end
+
+def fun_l24_n457(x)
+ if (x < 1)
+ fun_l25_n752(x)
+ else
+ fun_l25_n670(x)
+ end
+end
+
+def fun_l24_n458(x)
+ if (x < 1)
+ fun_l25_n462(x)
+ else
+ fun_l25_n457(x)
+ end
+end
+
+def fun_l24_n459(x)
+ if (x < 1)
+ fun_l25_n266(x)
+ else
+ fun_l25_n455(x)
+ end
+end
+
+def fun_l24_n460(x)
+ if (x < 1)
+ fun_l25_n173(x)
+ else
+ fun_l25_n873(x)
+ end
+end
+
+def fun_l24_n461(x)
+ if (x < 1)
+ fun_l25_n127(x)
+ else
+ fun_l25_n213(x)
+ end
+end
+
+def fun_l24_n462(x)
+ if (x < 1)
+ fun_l25_n579(x)
+ else
+ fun_l25_n44(x)
+ end
+end
+
+def fun_l24_n463(x)
+ if (x < 1)
+ fun_l25_n68(x)
+ else
+ fun_l25_n989(x)
+ end
+end
+
+def fun_l24_n464(x)
+ if (x < 1)
+ fun_l25_n826(x)
+ else
+ fun_l25_n883(x)
+ end
+end
+
+def fun_l24_n465(x)
+ if (x < 1)
+ fun_l25_n855(x)
+ else
+ fun_l25_n131(x)
+ end
+end
+
+def fun_l24_n466(x)
+ if (x < 1)
+ fun_l25_n923(x)
+ else
+ fun_l25_n433(x)
+ end
+end
+
+def fun_l24_n467(x)
+ if (x < 1)
+ fun_l25_n84(x)
+ else
+ fun_l25_n648(x)
+ end
+end
+
+def fun_l24_n468(x)
+ if (x < 1)
+ fun_l25_n53(x)
+ else
+ fun_l25_n766(x)
+ end
+end
+
+def fun_l24_n469(x)
+ if (x < 1)
+ fun_l25_n689(x)
+ else
+ fun_l25_n201(x)
+ end
+end
+
+def fun_l24_n470(x)
+ if (x < 1)
+ fun_l25_n361(x)
+ else
+ fun_l25_n459(x)
+ end
+end
+
+def fun_l24_n471(x)
+ if (x < 1)
+ fun_l25_n550(x)
+ else
+ fun_l25_n522(x)
+ end
+end
+
+def fun_l24_n472(x)
+ if (x < 1)
+ fun_l25_n128(x)
+ else
+ fun_l25_n417(x)
+ end
+end
+
+def fun_l24_n473(x)
+ if (x < 1)
+ fun_l25_n600(x)
+ else
+ fun_l25_n137(x)
+ end
+end
+
+def fun_l24_n474(x)
+ if (x < 1)
+ fun_l25_n72(x)
+ else
+ fun_l25_n548(x)
+ end
+end
+
+def fun_l24_n475(x)
+ if (x < 1)
+ fun_l25_n879(x)
+ else
+ fun_l25_n376(x)
+ end
+end
+
+def fun_l24_n476(x)
+ if (x < 1)
+ fun_l25_n822(x)
+ else
+ fun_l25_n695(x)
+ end
+end
+
+def fun_l24_n477(x)
+ if (x < 1)
+ fun_l25_n991(x)
+ else
+ fun_l25_n208(x)
+ end
+end
+
+def fun_l24_n478(x)
+ if (x < 1)
+ fun_l25_n17(x)
+ else
+ fun_l25_n332(x)
+ end
+end
+
+def fun_l24_n479(x)
+ if (x < 1)
+ fun_l25_n353(x)
+ else
+ fun_l25_n438(x)
+ end
+end
+
+def fun_l24_n480(x)
+ if (x < 1)
+ fun_l25_n109(x)
+ else
+ fun_l25_n360(x)
+ end
+end
+
+def fun_l24_n481(x)
+ if (x < 1)
+ fun_l25_n57(x)
+ else
+ fun_l25_n417(x)
+ end
+end
+
+def fun_l24_n482(x)
+ if (x < 1)
+ fun_l25_n903(x)
+ else
+ fun_l25_n486(x)
+ end
+end
+
+def fun_l24_n483(x)
+ if (x < 1)
+ fun_l25_n677(x)
+ else
+ fun_l25_n77(x)
+ end
+end
+
+def fun_l24_n484(x)
+ if (x < 1)
+ fun_l25_n117(x)
+ else
+ fun_l25_n582(x)
+ end
+end
+
+def fun_l24_n485(x)
+ if (x < 1)
+ fun_l25_n454(x)
+ else
+ fun_l25_n198(x)
+ end
+end
+
+def fun_l24_n486(x)
+ if (x < 1)
+ fun_l25_n779(x)
+ else
+ fun_l25_n301(x)
+ end
+end
+
+def fun_l24_n487(x)
+ if (x < 1)
+ fun_l25_n3(x)
+ else
+ fun_l25_n363(x)
+ end
+end
+
+def fun_l24_n488(x)
+ if (x < 1)
+ fun_l25_n84(x)
+ else
+ fun_l25_n793(x)
+ end
+end
+
+def fun_l24_n489(x)
+ if (x < 1)
+ fun_l25_n344(x)
+ else
+ fun_l25_n342(x)
+ end
+end
+
+def fun_l24_n490(x)
+ if (x < 1)
+ fun_l25_n365(x)
+ else
+ fun_l25_n546(x)
+ end
+end
+
+def fun_l24_n491(x)
+ if (x < 1)
+ fun_l25_n431(x)
+ else
+ fun_l25_n193(x)
+ end
+end
+
+def fun_l24_n492(x)
+ if (x < 1)
+ fun_l25_n763(x)
+ else
+ fun_l25_n174(x)
+ end
+end
+
+def fun_l24_n493(x)
+ if (x < 1)
+ fun_l25_n231(x)
+ else
+ fun_l25_n435(x)
+ end
+end
+
+def fun_l24_n494(x)
+ if (x < 1)
+ fun_l25_n408(x)
+ else
+ fun_l25_n848(x)
+ end
+end
+
+def fun_l24_n495(x)
+ if (x < 1)
+ fun_l25_n955(x)
+ else
+ fun_l25_n232(x)
+ end
+end
+
+def fun_l24_n496(x)
+ if (x < 1)
+ fun_l25_n72(x)
+ else
+ fun_l25_n11(x)
+ end
+end
+
+def fun_l24_n497(x)
+ if (x < 1)
+ fun_l25_n196(x)
+ else
+ fun_l25_n180(x)
+ end
+end
+
+def fun_l24_n498(x)
+ if (x < 1)
+ fun_l25_n102(x)
+ else
+ fun_l25_n360(x)
+ end
+end
+
+def fun_l24_n499(x)
+ if (x < 1)
+ fun_l25_n755(x)
+ else
+ fun_l25_n760(x)
+ end
+end
+
+def fun_l24_n500(x)
+ if (x < 1)
+ fun_l25_n676(x)
+ else
+ fun_l25_n825(x)
+ end
+end
+
+def fun_l24_n501(x)
+ if (x < 1)
+ fun_l25_n203(x)
+ else
+ fun_l25_n731(x)
+ end
+end
+
+def fun_l24_n502(x)
+ if (x < 1)
+ fun_l25_n551(x)
+ else
+ fun_l25_n165(x)
+ end
+end
+
+def fun_l24_n503(x)
+ if (x < 1)
+ fun_l25_n702(x)
+ else
+ fun_l25_n779(x)
+ end
+end
+
+def fun_l24_n504(x)
+ if (x < 1)
+ fun_l25_n525(x)
+ else
+ fun_l25_n846(x)
+ end
+end
+
+def fun_l24_n505(x)
+ if (x < 1)
+ fun_l25_n97(x)
+ else
+ fun_l25_n331(x)
+ end
+end
+
+def fun_l24_n506(x)
+ if (x < 1)
+ fun_l25_n572(x)
+ else
+ fun_l25_n759(x)
+ end
+end
+
+def fun_l24_n507(x)
+ if (x < 1)
+ fun_l25_n402(x)
+ else
+ fun_l25_n460(x)
+ end
+end
+
+def fun_l24_n508(x)
+ if (x < 1)
+ fun_l25_n640(x)
+ else
+ fun_l25_n833(x)
+ end
+end
+
+def fun_l24_n509(x)
+ if (x < 1)
+ fun_l25_n190(x)
+ else
+ fun_l25_n524(x)
+ end
+end
+
+def fun_l24_n510(x)
+ if (x < 1)
+ fun_l25_n307(x)
+ else
+ fun_l25_n92(x)
+ end
+end
+
+def fun_l24_n511(x)
+ if (x < 1)
+ fun_l25_n444(x)
+ else
+ fun_l25_n593(x)
+ end
+end
+
+def fun_l24_n512(x)
+ if (x < 1)
+ fun_l25_n684(x)
+ else
+ fun_l25_n163(x)
+ end
+end
+
+def fun_l24_n513(x)
+ if (x < 1)
+ fun_l25_n998(x)
+ else
+ fun_l25_n582(x)
+ end
+end
+
+def fun_l24_n514(x)
+ if (x < 1)
+ fun_l25_n767(x)
+ else
+ fun_l25_n557(x)
+ end
+end
+
+def fun_l24_n515(x)
+ if (x < 1)
+ fun_l25_n893(x)
+ else
+ fun_l25_n179(x)
+ end
+end
+
+def fun_l24_n516(x)
+ if (x < 1)
+ fun_l25_n726(x)
+ else
+ fun_l25_n651(x)
+ end
+end
+
+def fun_l24_n517(x)
+ if (x < 1)
+ fun_l25_n57(x)
+ else
+ fun_l25_n454(x)
+ end
+end
+
+def fun_l24_n518(x)
+ if (x < 1)
+ fun_l25_n598(x)
+ else
+ fun_l25_n554(x)
+ end
+end
+
+def fun_l24_n519(x)
+ if (x < 1)
+ fun_l25_n437(x)
+ else
+ fun_l25_n349(x)
+ end
+end
+
+def fun_l24_n520(x)
+ if (x < 1)
+ fun_l25_n754(x)
+ else
+ fun_l25_n259(x)
+ end
+end
+
+def fun_l24_n521(x)
+ if (x < 1)
+ fun_l25_n856(x)
+ else
+ fun_l25_n155(x)
+ end
+end
+
+def fun_l24_n522(x)
+ if (x < 1)
+ fun_l25_n607(x)
+ else
+ fun_l25_n751(x)
+ end
+end
+
+def fun_l24_n523(x)
+ if (x < 1)
+ fun_l25_n510(x)
+ else
+ fun_l25_n297(x)
+ end
+end
+
+def fun_l24_n524(x)
+ if (x < 1)
+ fun_l25_n433(x)
+ else
+ fun_l25_n102(x)
+ end
+end
+
+def fun_l24_n525(x)
+ if (x < 1)
+ fun_l25_n173(x)
+ else
+ fun_l25_n487(x)
+ end
+end
+
+def fun_l24_n526(x)
+ if (x < 1)
+ fun_l25_n716(x)
+ else
+ fun_l25_n230(x)
+ end
+end
+
+def fun_l24_n527(x)
+ if (x < 1)
+ fun_l25_n511(x)
+ else
+ fun_l25_n272(x)
+ end
+end
+
+def fun_l24_n528(x)
+ if (x < 1)
+ fun_l25_n974(x)
+ else
+ fun_l25_n954(x)
+ end
+end
+
+def fun_l24_n529(x)
+ if (x < 1)
+ fun_l25_n92(x)
+ else
+ fun_l25_n704(x)
+ end
+end
+
+def fun_l24_n530(x)
+ if (x < 1)
+ fun_l25_n117(x)
+ else
+ fun_l25_n725(x)
+ end
+end
+
+def fun_l24_n531(x)
+ if (x < 1)
+ fun_l25_n817(x)
+ else
+ fun_l25_n6(x)
+ end
+end
+
+def fun_l24_n532(x)
+ if (x < 1)
+ fun_l25_n27(x)
+ else
+ fun_l25_n438(x)
+ end
+end
+
+def fun_l24_n533(x)
+ if (x < 1)
+ fun_l25_n964(x)
+ else
+ fun_l25_n291(x)
+ end
+end
+
+def fun_l24_n534(x)
+ if (x < 1)
+ fun_l25_n786(x)
+ else
+ fun_l25_n871(x)
+ end
+end
+
+def fun_l24_n535(x)
+ if (x < 1)
+ fun_l25_n79(x)
+ else
+ fun_l25_n786(x)
+ end
+end
+
+def fun_l24_n536(x)
+ if (x < 1)
+ fun_l25_n403(x)
+ else
+ fun_l25_n78(x)
+ end
+end
+
+def fun_l24_n537(x)
+ if (x < 1)
+ fun_l25_n20(x)
+ else
+ fun_l25_n239(x)
+ end
+end
+
+def fun_l24_n538(x)
+ if (x < 1)
+ fun_l25_n818(x)
+ else
+ fun_l25_n917(x)
+ end
+end
+
+def fun_l24_n539(x)
+ if (x < 1)
+ fun_l25_n598(x)
+ else
+ fun_l25_n708(x)
+ end
+end
+
+def fun_l24_n540(x)
+ if (x < 1)
+ fun_l25_n802(x)
+ else
+ fun_l25_n208(x)
+ end
+end
+
+def fun_l24_n541(x)
+ if (x < 1)
+ fun_l25_n962(x)
+ else
+ fun_l25_n487(x)
+ end
+end
+
+def fun_l24_n542(x)
+ if (x < 1)
+ fun_l25_n690(x)
+ else
+ fun_l25_n503(x)
+ end
+end
+
+def fun_l24_n543(x)
+ if (x < 1)
+ fun_l25_n548(x)
+ else
+ fun_l25_n295(x)
+ end
+end
+
+def fun_l24_n544(x)
+ if (x < 1)
+ fun_l25_n373(x)
+ else
+ fun_l25_n896(x)
+ end
+end
+
+def fun_l24_n545(x)
+ if (x < 1)
+ fun_l25_n759(x)
+ else
+ fun_l25_n171(x)
+ end
+end
+
+def fun_l24_n546(x)
+ if (x < 1)
+ fun_l25_n269(x)
+ else
+ fun_l25_n153(x)
+ end
+end
+
+def fun_l24_n547(x)
+ if (x < 1)
+ fun_l25_n489(x)
+ else
+ fun_l25_n628(x)
+ end
+end
+
+def fun_l24_n548(x)
+ if (x < 1)
+ fun_l25_n540(x)
+ else
+ fun_l25_n7(x)
+ end
+end
+
+def fun_l24_n549(x)
+ if (x < 1)
+ fun_l25_n916(x)
+ else
+ fun_l25_n365(x)
+ end
+end
+
+def fun_l24_n550(x)
+ if (x < 1)
+ fun_l25_n377(x)
+ else
+ fun_l25_n420(x)
+ end
+end
+
+def fun_l24_n551(x)
+ if (x < 1)
+ fun_l25_n331(x)
+ else
+ fun_l25_n568(x)
+ end
+end
+
+def fun_l24_n552(x)
+ if (x < 1)
+ fun_l25_n348(x)
+ else
+ fun_l25_n934(x)
+ end
+end
+
+def fun_l24_n553(x)
+ if (x < 1)
+ fun_l25_n676(x)
+ else
+ fun_l25_n142(x)
+ end
+end
+
+def fun_l24_n554(x)
+ if (x < 1)
+ fun_l25_n913(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n555(x)
+ if (x < 1)
+ fun_l25_n873(x)
+ else
+ fun_l25_n951(x)
+ end
+end
+
+def fun_l24_n556(x)
+ if (x < 1)
+ fun_l25_n300(x)
+ else
+ fun_l25_n969(x)
+ end
+end
+
+def fun_l24_n557(x)
+ if (x < 1)
+ fun_l25_n674(x)
+ else
+ fun_l25_n290(x)
+ end
+end
+
+def fun_l24_n558(x)
+ if (x < 1)
+ fun_l25_n323(x)
+ else
+ fun_l25_n325(x)
+ end
+end
+
+def fun_l24_n559(x)
+ if (x < 1)
+ fun_l25_n547(x)
+ else
+ fun_l25_n207(x)
+ end
+end
+
+def fun_l24_n560(x)
+ if (x < 1)
+ fun_l25_n858(x)
+ else
+ fun_l25_n304(x)
+ end
+end
+
+def fun_l24_n561(x)
+ if (x < 1)
+ fun_l25_n831(x)
+ else
+ fun_l25_n840(x)
+ end
+end
+
+def fun_l24_n562(x)
+ if (x < 1)
+ fun_l25_n174(x)
+ else
+ fun_l25_n162(x)
+ end
+end
+
+def fun_l24_n563(x)
+ if (x < 1)
+ fun_l25_n662(x)
+ else
+ fun_l25_n676(x)
+ end
+end
+
+def fun_l24_n564(x)
+ if (x < 1)
+ fun_l25_n474(x)
+ else
+ fun_l25_n173(x)
+ end
+end
+
+def fun_l24_n565(x)
+ if (x < 1)
+ fun_l25_n232(x)
+ else
+ fun_l25_n57(x)
+ end
+end
+
+def fun_l24_n566(x)
+ if (x < 1)
+ fun_l25_n615(x)
+ else
+ fun_l25_n944(x)
+ end
+end
+
+def fun_l24_n567(x)
+ if (x < 1)
+ fun_l25_n586(x)
+ else
+ fun_l25_n183(x)
+ end
+end
+
+def fun_l24_n568(x)
+ if (x < 1)
+ fun_l25_n758(x)
+ else
+ fun_l25_n376(x)
+ end
+end
+
+def fun_l24_n569(x)
+ if (x < 1)
+ fun_l25_n755(x)
+ else
+ fun_l25_n903(x)
+ end
+end
+
+def fun_l24_n570(x)
+ if (x < 1)
+ fun_l25_n562(x)
+ else
+ fun_l25_n843(x)
+ end
+end
+
+def fun_l24_n571(x)
+ if (x < 1)
+ fun_l25_n369(x)
+ else
+ fun_l25_n712(x)
+ end
+end
+
+def fun_l24_n572(x)
+ if (x < 1)
+ fun_l25_n183(x)
+ else
+ fun_l25_n273(x)
+ end
+end
+
+def fun_l24_n573(x)
+ if (x < 1)
+ fun_l25_n150(x)
+ else
+ fun_l25_n309(x)
+ end
+end
+
+def fun_l24_n574(x)
+ if (x < 1)
+ fun_l25_n485(x)
+ else
+ fun_l25_n20(x)
+ end
+end
+
+def fun_l24_n575(x)
+ if (x < 1)
+ fun_l25_n325(x)
+ else
+ fun_l25_n770(x)
+ end
+end
+
+def fun_l24_n576(x)
+ if (x < 1)
+ fun_l25_n528(x)
+ else
+ fun_l25_n529(x)
+ end
+end
+
+def fun_l24_n577(x)
+ if (x < 1)
+ fun_l25_n557(x)
+ else
+ fun_l25_n416(x)
+ end
+end
+
+def fun_l24_n578(x)
+ if (x < 1)
+ fun_l25_n501(x)
+ else
+ fun_l25_n81(x)
+ end
+end
+
+def fun_l24_n579(x)
+ if (x < 1)
+ fun_l25_n355(x)
+ else
+ fun_l25_n391(x)
+ end
+end
+
+def fun_l24_n580(x)
+ if (x < 1)
+ fun_l25_n665(x)
+ else
+ fun_l25_n656(x)
+ end
+end
+
+def fun_l24_n581(x)
+ if (x < 1)
+ fun_l25_n496(x)
+ else
+ fun_l25_n933(x)
+ end
+end
+
+def fun_l24_n582(x)
+ if (x < 1)
+ fun_l25_n71(x)
+ else
+ fun_l25_n815(x)
+ end
+end
+
+def fun_l24_n583(x)
+ if (x < 1)
+ fun_l25_n488(x)
+ else
+ fun_l25_n587(x)
+ end
+end
+
+def fun_l24_n584(x)
+ if (x < 1)
+ fun_l25_n909(x)
+ else
+ fun_l25_n673(x)
+ end
+end
+
+def fun_l24_n585(x)
+ if (x < 1)
+ fun_l25_n452(x)
+ else
+ fun_l25_n774(x)
+ end
+end
+
+def fun_l24_n586(x)
+ if (x < 1)
+ fun_l25_n376(x)
+ else
+ fun_l25_n855(x)
+ end
+end
+
+def fun_l24_n587(x)
+ if (x < 1)
+ fun_l25_n452(x)
+ else
+ fun_l25_n331(x)
+ end
+end
+
+def fun_l24_n588(x)
+ if (x < 1)
+ fun_l25_n718(x)
+ else
+ fun_l25_n496(x)
+ end
+end
+
+def fun_l24_n589(x)
+ if (x < 1)
+ fun_l25_n923(x)
+ else
+ fun_l25_n633(x)
+ end
+end
+
+def fun_l24_n590(x)
+ if (x < 1)
+ fun_l25_n815(x)
+ else
+ fun_l25_n633(x)
+ end
+end
+
+def fun_l24_n591(x)
+ if (x < 1)
+ fun_l25_n699(x)
+ else
+ fun_l25_n609(x)
+ end
+end
+
+def fun_l24_n592(x)
+ if (x < 1)
+ fun_l25_n722(x)
+ else
+ fun_l25_n884(x)
+ end
+end
+
+def fun_l24_n593(x)
+ if (x < 1)
+ fun_l25_n580(x)
+ else
+ fun_l25_n48(x)
+ end
+end
+
+def fun_l24_n594(x)
+ if (x < 1)
+ fun_l25_n245(x)
+ else
+ fun_l25_n126(x)
+ end
+end
+
+def fun_l24_n595(x)
+ if (x < 1)
+ fun_l25_n778(x)
+ else
+ fun_l25_n989(x)
+ end
+end
+
+def fun_l24_n596(x)
+ if (x < 1)
+ fun_l25_n813(x)
+ else
+ fun_l25_n117(x)
+ end
+end
+
+def fun_l24_n597(x)
+ if (x < 1)
+ fun_l25_n622(x)
+ else
+ fun_l25_n293(x)
+ end
+end
+
+def fun_l24_n598(x)
+ if (x < 1)
+ fun_l25_n996(x)
+ else
+ fun_l25_n704(x)
+ end
+end
+
+def fun_l24_n599(x)
+ if (x < 1)
+ fun_l25_n173(x)
+ else
+ fun_l25_n336(x)
+ end
+end
+
+def fun_l24_n600(x)
+ if (x < 1)
+ fun_l25_n295(x)
+ else
+ fun_l25_n293(x)
+ end
+end
+
+def fun_l24_n601(x)
+ if (x < 1)
+ fun_l25_n104(x)
+ else
+ fun_l25_n907(x)
+ end
+end
+
+def fun_l24_n602(x)
+ if (x < 1)
+ fun_l25_n136(x)
+ else
+ fun_l25_n915(x)
+ end
+end
+
+def fun_l24_n603(x)
+ if (x < 1)
+ fun_l25_n19(x)
+ else
+ fun_l25_n113(x)
+ end
+end
+
+def fun_l24_n604(x)
+ if (x < 1)
+ fun_l25_n389(x)
+ else
+ fun_l25_n863(x)
+ end
+end
+
+def fun_l24_n605(x)
+ if (x < 1)
+ fun_l25_n20(x)
+ else
+ fun_l25_n830(x)
+ end
+end
+
+def fun_l24_n606(x)
+ if (x < 1)
+ fun_l25_n723(x)
+ else
+ fun_l25_n956(x)
+ end
+end
+
+def fun_l24_n607(x)
+ if (x < 1)
+ fun_l25_n765(x)
+ else
+ fun_l25_n27(x)
+ end
+end
+
+def fun_l24_n608(x)
+ if (x < 1)
+ fun_l25_n682(x)
+ else
+ fun_l25_n953(x)
+ end
+end
+
+def fun_l24_n609(x)
+ if (x < 1)
+ fun_l25_n501(x)
+ else
+ fun_l25_n81(x)
+ end
+end
+
+def fun_l24_n610(x)
+ if (x < 1)
+ fun_l25_n896(x)
+ else
+ fun_l25_n192(x)
+ end
+end
+
+def fun_l24_n611(x)
+ if (x < 1)
+ fun_l25_n605(x)
+ else
+ fun_l25_n443(x)
+ end
+end
+
+def fun_l24_n612(x)
+ if (x < 1)
+ fun_l25_n298(x)
+ else
+ fun_l25_n818(x)
+ end
+end
+
+def fun_l24_n613(x)
+ if (x < 1)
+ fun_l25_n289(x)
+ else
+ fun_l25_n227(x)
+ end
+end
+
+def fun_l24_n614(x)
+ if (x < 1)
+ fun_l25_n511(x)
+ else
+ fun_l25_n460(x)
+ end
+end
+
+def fun_l24_n615(x)
+ if (x < 1)
+ fun_l25_n774(x)
+ else
+ fun_l25_n794(x)
+ end
+end
+
+def fun_l24_n616(x)
+ if (x < 1)
+ fun_l25_n933(x)
+ else
+ fun_l25_n448(x)
+ end
+end
+
+def fun_l24_n617(x)
+ if (x < 1)
+ fun_l25_n239(x)
+ else
+ fun_l25_n156(x)
+ end
+end
+
+def fun_l24_n618(x)
+ if (x < 1)
+ fun_l25_n713(x)
+ else
+ fun_l25_n337(x)
+ end
+end
+
+def fun_l24_n619(x)
+ if (x < 1)
+ fun_l25_n450(x)
+ else
+ fun_l25_n282(x)
+ end
+end
+
+def fun_l24_n620(x)
+ if (x < 1)
+ fun_l25_n97(x)
+ else
+ fun_l25_n360(x)
+ end
+end
+
+def fun_l24_n621(x)
+ if (x < 1)
+ fun_l25_n197(x)
+ else
+ fun_l25_n406(x)
+ end
+end
+
+def fun_l24_n622(x)
+ if (x < 1)
+ fun_l25_n791(x)
+ else
+ fun_l25_n876(x)
+ end
+end
+
+def fun_l24_n623(x)
+ if (x < 1)
+ fun_l25_n989(x)
+ else
+ fun_l25_n616(x)
+ end
+end
+
+def fun_l24_n624(x)
+ if (x < 1)
+ fun_l25_n754(x)
+ else
+ fun_l25_n605(x)
+ end
+end
+
+def fun_l24_n625(x)
+ if (x < 1)
+ fun_l25_n113(x)
+ else
+ fun_l25_n400(x)
+ end
+end
+
+def fun_l24_n626(x)
+ if (x < 1)
+ fun_l25_n6(x)
+ else
+ fun_l25_n742(x)
+ end
+end
+
+def fun_l24_n627(x)
+ if (x < 1)
+ fun_l25_n916(x)
+ else
+ fun_l25_n5(x)
+ end
+end
+
+def fun_l24_n628(x)
+ if (x < 1)
+ fun_l25_n5(x)
+ else
+ fun_l25_n327(x)
+ end
+end
+
+def fun_l24_n629(x)
+ if (x < 1)
+ fun_l25_n867(x)
+ else
+ fun_l25_n37(x)
+ end
+end
+
+def fun_l24_n630(x)
+ if (x < 1)
+ fun_l25_n409(x)
+ else
+ fun_l25_n137(x)
+ end
+end
+
+def fun_l24_n631(x)
+ if (x < 1)
+ fun_l25_n128(x)
+ else
+ fun_l25_n499(x)
+ end
+end
+
+def fun_l24_n632(x)
+ if (x < 1)
+ fun_l25_n694(x)
+ else
+ fun_l25_n983(x)
+ end
+end
+
+def fun_l24_n633(x)
+ if (x < 1)
+ fun_l25_n62(x)
+ else
+ fun_l25_n538(x)
+ end
+end
+
+def fun_l24_n634(x)
+ if (x < 1)
+ fun_l25_n740(x)
+ else
+ fun_l25_n795(x)
+ end
+end
+
+def fun_l24_n635(x)
+ if (x < 1)
+ fun_l25_n597(x)
+ else
+ fun_l25_n557(x)
+ end
+end
+
+def fun_l24_n636(x)
+ if (x < 1)
+ fun_l25_n642(x)
+ else
+ fun_l25_n40(x)
+ end
+end
+
+def fun_l24_n637(x)
+ if (x < 1)
+ fun_l25_n303(x)
+ else
+ fun_l25_n931(x)
+ end
+end
+
+def fun_l24_n638(x)
+ if (x < 1)
+ fun_l25_n977(x)
+ else
+ fun_l25_n848(x)
+ end
+end
+
+def fun_l24_n639(x)
+ if (x < 1)
+ fun_l25_n983(x)
+ else
+ fun_l25_n11(x)
+ end
+end
+
+def fun_l24_n640(x)
+ if (x < 1)
+ fun_l25_n258(x)
+ else
+ fun_l25_n280(x)
+ end
+end
+
+def fun_l24_n641(x)
+ if (x < 1)
+ fun_l25_n553(x)
+ else
+ fun_l25_n351(x)
+ end
+end
+
+def fun_l24_n642(x)
+ if (x < 1)
+ fun_l25_n4(x)
+ else
+ fun_l25_n375(x)
+ end
+end
+
+def fun_l24_n643(x)
+ if (x < 1)
+ fun_l25_n678(x)
+ else
+ fun_l25_n139(x)
+ end
+end
+
+def fun_l24_n644(x)
+ if (x < 1)
+ fun_l25_n193(x)
+ else
+ fun_l25_n490(x)
+ end
+end
+
+def fun_l24_n645(x)
+ if (x < 1)
+ fun_l25_n146(x)
+ else
+ fun_l25_n450(x)
+ end
+end
+
+def fun_l24_n646(x)
+ if (x < 1)
+ fun_l25_n813(x)
+ else
+ fun_l25_n59(x)
+ end
+end
+
+def fun_l24_n647(x)
+ if (x < 1)
+ fun_l25_n726(x)
+ else
+ fun_l25_n792(x)
+ end
+end
+
+def fun_l24_n648(x)
+ if (x < 1)
+ fun_l25_n508(x)
+ else
+ fun_l25_n496(x)
+ end
+end
+
+def fun_l24_n649(x)
+ if (x < 1)
+ fun_l25_n231(x)
+ else
+ fun_l25_n688(x)
+ end
+end
+
+def fun_l24_n650(x)
+ if (x < 1)
+ fun_l25_n602(x)
+ else
+ fun_l25_n641(x)
+ end
+end
+
+def fun_l24_n651(x)
+ if (x < 1)
+ fun_l25_n101(x)
+ else
+ fun_l25_n394(x)
+ end
+end
+
+def fun_l24_n652(x)
+ if (x < 1)
+ fun_l25_n454(x)
+ else
+ fun_l25_n466(x)
+ end
+end
+
+def fun_l24_n653(x)
+ if (x < 1)
+ fun_l25_n147(x)
+ else
+ fun_l25_n116(x)
+ end
+end
+
+def fun_l24_n654(x)
+ if (x < 1)
+ fun_l25_n83(x)
+ else
+ fun_l25_n951(x)
+ end
+end
+
+def fun_l24_n655(x)
+ if (x < 1)
+ fun_l25_n667(x)
+ else
+ fun_l25_n293(x)
+ end
+end
+
+def fun_l24_n656(x)
+ if (x < 1)
+ fun_l25_n413(x)
+ else
+ fun_l25_n708(x)
+ end
+end
+
+def fun_l24_n657(x)
+ if (x < 1)
+ fun_l25_n495(x)
+ else
+ fun_l25_n277(x)
+ end
+end
+
+def fun_l24_n658(x)
+ if (x < 1)
+ fun_l25_n926(x)
+ else
+ fun_l25_n624(x)
+ end
+end
+
+def fun_l24_n659(x)
+ if (x < 1)
+ fun_l25_n612(x)
+ else
+ fun_l25_n666(x)
+ end
+end
+
+def fun_l24_n660(x)
+ if (x < 1)
+ fun_l25_n32(x)
+ else
+ fun_l25_n290(x)
+ end
+end
+
+def fun_l24_n661(x)
+ if (x < 1)
+ fun_l25_n674(x)
+ else
+ fun_l25_n937(x)
+ end
+end
+
+def fun_l24_n662(x)
+ if (x < 1)
+ fun_l25_n556(x)
+ else
+ fun_l25_n576(x)
+ end
+end
+
+def fun_l24_n663(x)
+ if (x < 1)
+ fun_l25_n763(x)
+ else
+ fun_l25_n898(x)
+ end
+end
+
+def fun_l24_n664(x)
+ if (x < 1)
+ fun_l25_n564(x)
+ else
+ fun_l25_n478(x)
+ end
+end
+
+def fun_l24_n665(x)
+ if (x < 1)
+ fun_l25_n515(x)
+ else
+ fun_l25_n991(x)
+ end
+end
+
+def fun_l24_n666(x)
+ if (x < 1)
+ fun_l25_n737(x)
+ else
+ fun_l25_n936(x)
+ end
+end
+
+def fun_l24_n667(x)
+ if (x < 1)
+ fun_l25_n829(x)
+ else
+ fun_l25_n350(x)
+ end
+end
+
+def fun_l24_n668(x)
+ if (x < 1)
+ fun_l25_n59(x)
+ else
+ fun_l25_n979(x)
+ end
+end
+
+def fun_l24_n669(x)
+ if (x < 1)
+ fun_l25_n866(x)
+ else
+ fun_l25_n624(x)
+ end
+end
+
+def fun_l24_n670(x)
+ if (x < 1)
+ fun_l25_n572(x)
+ else
+ fun_l25_n203(x)
+ end
+end
+
+def fun_l24_n671(x)
+ if (x < 1)
+ fun_l25_n96(x)
+ else
+ fun_l25_n862(x)
+ end
+end
+
+def fun_l24_n672(x)
+ if (x < 1)
+ fun_l25_n979(x)
+ else
+ fun_l25_n484(x)
+ end
+end
+
+def fun_l24_n673(x)
+ if (x < 1)
+ fun_l25_n20(x)
+ else
+ fun_l25_n201(x)
+ end
+end
+
+def fun_l24_n674(x)
+ if (x < 1)
+ fun_l25_n109(x)
+ else
+ fun_l25_n788(x)
+ end
+end
+
+def fun_l24_n675(x)
+ if (x < 1)
+ fun_l25_n792(x)
+ else
+ fun_l25_n132(x)
+ end
+end
+
+def fun_l24_n676(x)
+ if (x < 1)
+ fun_l25_n786(x)
+ else
+ fun_l25_n77(x)
+ end
+end
+
+def fun_l24_n677(x)
+ if (x < 1)
+ fun_l25_n21(x)
+ else
+ fun_l25_n96(x)
+ end
+end
+
+def fun_l24_n678(x)
+ if (x < 1)
+ fun_l25_n299(x)
+ else
+ fun_l25_n649(x)
+ end
+end
+
+def fun_l24_n679(x)
+ if (x < 1)
+ fun_l25_n247(x)
+ else
+ fun_l25_n607(x)
+ end
+end
+
+def fun_l24_n680(x)
+ if (x < 1)
+ fun_l25_n480(x)
+ else
+ fun_l25_n471(x)
+ end
+end
+
+def fun_l24_n681(x)
+ if (x < 1)
+ fun_l25_n277(x)
+ else
+ fun_l25_n460(x)
+ end
+end
+
+def fun_l24_n682(x)
+ if (x < 1)
+ fun_l25_n573(x)
+ else
+ fun_l25_n193(x)
+ end
+end
+
+def fun_l24_n683(x)
+ if (x < 1)
+ fun_l25_n741(x)
+ else
+ fun_l25_n441(x)
+ end
+end
+
+def fun_l24_n684(x)
+ if (x < 1)
+ fun_l25_n821(x)
+ else
+ fun_l25_n24(x)
+ end
+end
+
+def fun_l24_n685(x)
+ if (x < 1)
+ fun_l25_n150(x)
+ else
+ fun_l25_n530(x)
+ end
+end
+
+def fun_l24_n686(x)
+ if (x < 1)
+ fun_l25_n564(x)
+ else
+ fun_l25_n26(x)
+ end
+end
+
+def fun_l24_n687(x)
+ if (x < 1)
+ fun_l25_n872(x)
+ else
+ fun_l25_n522(x)
+ end
+end
+
+def fun_l24_n688(x)
+ if (x < 1)
+ fun_l25_n963(x)
+ else
+ fun_l25_n422(x)
+ end
+end
+
+def fun_l24_n689(x)
+ if (x < 1)
+ fun_l25_n418(x)
+ else
+ fun_l25_n900(x)
+ end
+end
+
+def fun_l24_n690(x)
+ if (x < 1)
+ fun_l25_n117(x)
+ else
+ fun_l25_n900(x)
+ end
+end
+
+def fun_l24_n691(x)
+ if (x < 1)
+ fun_l25_n412(x)
+ else
+ fun_l25_n466(x)
+ end
+end
+
+def fun_l24_n692(x)
+ if (x < 1)
+ fun_l25_n761(x)
+ else
+ fun_l25_n190(x)
+ end
+end
+
+def fun_l24_n693(x)
+ if (x < 1)
+ fun_l25_n875(x)
+ else
+ fun_l25_n222(x)
+ end
+end
+
+def fun_l24_n694(x)
+ if (x < 1)
+ fun_l25_n405(x)
+ else
+ fun_l25_n66(x)
+ end
+end
+
+def fun_l24_n695(x)
+ if (x < 1)
+ fun_l25_n570(x)
+ else
+ fun_l25_n801(x)
+ end
+end
+
+def fun_l24_n696(x)
+ if (x < 1)
+ fun_l25_n591(x)
+ else
+ fun_l25_n121(x)
+ end
+end
+
+def fun_l24_n697(x)
+ if (x < 1)
+ fun_l25_n27(x)
+ else
+ fun_l25_n610(x)
+ end
+end
+
+def fun_l24_n698(x)
+ if (x < 1)
+ fun_l25_n843(x)
+ else
+ fun_l25_n488(x)
+ end
+end
+
+def fun_l24_n699(x)
+ if (x < 1)
+ fun_l25_n946(x)
+ else
+ fun_l25_n164(x)
+ end
+end
+
+def fun_l24_n700(x)
+ if (x < 1)
+ fun_l25_n424(x)
+ else
+ fun_l25_n614(x)
+ end
+end
+
+def fun_l24_n701(x)
+ if (x < 1)
+ fun_l25_n692(x)
+ else
+ fun_l25_n893(x)
+ end
+end
+
+def fun_l24_n702(x)
+ if (x < 1)
+ fun_l25_n39(x)
+ else
+ fun_l25_n274(x)
+ end
+end
+
+def fun_l24_n703(x)
+ if (x < 1)
+ fun_l25_n814(x)
+ else
+ fun_l25_n281(x)
+ end
+end
+
+def fun_l24_n704(x)
+ if (x < 1)
+ fun_l25_n670(x)
+ else
+ fun_l25_n882(x)
+ end
+end
+
+def fun_l24_n705(x)
+ if (x < 1)
+ fun_l25_n498(x)
+ else
+ fun_l25_n881(x)
+ end
+end
+
+def fun_l24_n706(x)
+ if (x < 1)
+ fun_l25_n193(x)
+ else
+ fun_l25_n10(x)
+ end
+end
+
+def fun_l24_n707(x)
+ if (x < 1)
+ fun_l25_n531(x)
+ else
+ fun_l25_n870(x)
+ end
+end
+
+def fun_l24_n708(x)
+ if (x < 1)
+ fun_l25_n106(x)
+ else
+ fun_l25_n692(x)
+ end
+end
+
+def fun_l24_n709(x)
+ if (x < 1)
+ fun_l25_n484(x)
+ else
+ fun_l25_n700(x)
+ end
+end
+
+def fun_l24_n710(x)
+ if (x < 1)
+ fun_l25_n699(x)
+ else
+ fun_l25_n117(x)
+ end
+end
+
+def fun_l24_n711(x)
+ if (x < 1)
+ fun_l25_n138(x)
+ else
+ fun_l25_n532(x)
+ end
+end
+
+def fun_l24_n712(x)
+ if (x < 1)
+ fun_l25_n468(x)
+ else
+ fun_l25_n350(x)
+ end
+end
+
+def fun_l24_n713(x)
+ if (x < 1)
+ fun_l25_n906(x)
+ else
+ fun_l25_n25(x)
+ end
+end
+
+def fun_l24_n714(x)
+ if (x < 1)
+ fun_l25_n23(x)
+ else
+ fun_l25_n745(x)
+ end
+end
+
+def fun_l24_n715(x)
+ if (x < 1)
+ fun_l25_n917(x)
+ else
+ fun_l25_n942(x)
+ end
+end
+
+def fun_l24_n716(x)
+ if (x < 1)
+ fun_l25_n986(x)
+ else
+ fun_l25_n605(x)
+ end
+end
+
+def fun_l24_n717(x)
+ if (x < 1)
+ fun_l25_n771(x)
+ else
+ fun_l25_n100(x)
+ end
+end
+
+def fun_l24_n718(x)
+ if (x < 1)
+ fun_l25_n994(x)
+ else
+ fun_l25_n249(x)
+ end
+end
+
+def fun_l24_n719(x)
+ if (x < 1)
+ fun_l25_n368(x)
+ else
+ fun_l25_n657(x)
+ end
+end
+
+def fun_l24_n720(x)
+ if (x < 1)
+ fun_l25_n856(x)
+ else
+ fun_l25_n650(x)
+ end
+end
+
+def fun_l24_n721(x)
+ if (x < 1)
+ fun_l25_n667(x)
+ else
+ fun_l25_n609(x)
+ end
+end
+
+def fun_l24_n722(x)
+ if (x < 1)
+ fun_l25_n353(x)
+ else
+ fun_l25_n665(x)
+ end
+end
+
+def fun_l24_n723(x)
+ if (x < 1)
+ fun_l25_n520(x)
+ else
+ fun_l25_n771(x)
+ end
+end
+
+def fun_l24_n724(x)
+ if (x < 1)
+ fun_l25_n636(x)
+ else
+ fun_l25_n34(x)
+ end
+end
+
+def fun_l24_n725(x)
+ if (x < 1)
+ fun_l25_n222(x)
+ else
+ fun_l25_n444(x)
+ end
+end
+
+def fun_l24_n726(x)
+ if (x < 1)
+ fun_l25_n519(x)
+ else
+ fun_l25_n675(x)
+ end
+end
+
+def fun_l24_n727(x)
+ if (x < 1)
+ fun_l25_n739(x)
+ else
+ fun_l25_n910(x)
+ end
+end
+
+def fun_l24_n728(x)
+ if (x < 1)
+ fun_l25_n669(x)
+ else
+ fun_l25_n645(x)
+ end
+end
+
+def fun_l24_n729(x)
+ if (x < 1)
+ fun_l25_n358(x)
+ else
+ fun_l25_n316(x)
+ end
+end
+
+def fun_l24_n730(x)
+ if (x < 1)
+ fun_l25_n614(x)
+ else
+ fun_l25_n484(x)
+ end
+end
+
+def fun_l24_n731(x)
+ if (x < 1)
+ fun_l25_n640(x)
+ else
+ fun_l25_n613(x)
+ end
+end
+
+def fun_l24_n732(x)
+ if (x < 1)
+ fun_l25_n16(x)
+ else
+ fun_l25_n596(x)
+ end
+end
+
+def fun_l24_n733(x)
+ if (x < 1)
+ fun_l25_n780(x)
+ else
+ fun_l25_n673(x)
+ end
+end
+
+def fun_l24_n734(x)
+ if (x < 1)
+ fun_l25_n999(x)
+ else
+ fun_l25_n210(x)
+ end
+end
+
+def fun_l24_n735(x)
+ if (x < 1)
+ fun_l25_n915(x)
+ else
+ fun_l25_n788(x)
+ end
+end
+
+def fun_l24_n736(x)
+ if (x < 1)
+ fun_l25_n484(x)
+ else
+ fun_l25_n369(x)
+ end
+end
+
+def fun_l24_n737(x)
+ if (x < 1)
+ fun_l25_n851(x)
+ else
+ fun_l25_n674(x)
+ end
+end
+
+def fun_l24_n738(x)
+ if (x < 1)
+ fun_l25_n830(x)
+ else
+ fun_l25_n382(x)
+ end
+end
+
+def fun_l24_n739(x)
+ if (x < 1)
+ fun_l25_n861(x)
+ else
+ fun_l25_n482(x)
+ end
+end
+
+def fun_l24_n740(x)
+ if (x < 1)
+ fun_l25_n244(x)
+ else
+ fun_l25_n414(x)
+ end
+end
+
+def fun_l24_n741(x)
+ if (x < 1)
+ fun_l25_n829(x)
+ else
+ fun_l25_n846(x)
+ end
+end
+
+def fun_l24_n742(x)
+ if (x < 1)
+ fun_l25_n197(x)
+ else
+ fun_l25_n943(x)
+ end
+end
+
+def fun_l24_n743(x)
+ if (x < 1)
+ fun_l25_n290(x)
+ else
+ fun_l25_n394(x)
+ end
+end
+
+def fun_l24_n744(x)
+ if (x < 1)
+ fun_l25_n965(x)
+ else
+ fun_l25_n987(x)
+ end
+end
+
+def fun_l24_n745(x)
+ if (x < 1)
+ fun_l25_n104(x)
+ else
+ fun_l25_n369(x)
+ end
+end
+
+def fun_l24_n746(x)
+ if (x < 1)
+ fun_l25_n880(x)
+ else
+ fun_l25_n541(x)
+ end
+end
+
+def fun_l24_n747(x)
+ if (x < 1)
+ fun_l25_n345(x)
+ else
+ fun_l25_n155(x)
+ end
+end
+
+def fun_l24_n748(x)
+ if (x < 1)
+ fun_l25_n803(x)
+ else
+ fun_l25_n383(x)
+ end
+end
+
+def fun_l24_n749(x)
+ if (x < 1)
+ fun_l25_n848(x)
+ else
+ fun_l25_n340(x)
+ end
+end
+
+def fun_l24_n750(x)
+ if (x < 1)
+ fun_l25_n197(x)
+ else
+ fun_l25_n313(x)
+ end
+end
+
+def fun_l24_n751(x)
+ if (x < 1)
+ fun_l25_n253(x)
+ else
+ fun_l25_n99(x)
+ end
+end
+
+def fun_l24_n752(x)
+ if (x < 1)
+ fun_l25_n873(x)
+ else
+ fun_l25_n347(x)
+ end
+end
+
+def fun_l24_n753(x)
+ if (x < 1)
+ fun_l25_n849(x)
+ else
+ fun_l25_n627(x)
+ end
+end
+
+def fun_l24_n754(x)
+ if (x < 1)
+ fun_l25_n817(x)
+ else
+ fun_l25_n441(x)
+ end
+end
+
+def fun_l24_n755(x)
+ if (x < 1)
+ fun_l25_n235(x)
+ else
+ fun_l25_n602(x)
+ end
+end
+
+def fun_l24_n756(x)
+ if (x < 1)
+ fun_l25_n950(x)
+ else
+ fun_l25_n516(x)
+ end
+end
+
+def fun_l24_n757(x)
+ if (x < 1)
+ fun_l25_n646(x)
+ else
+ fun_l25_n996(x)
+ end
+end
+
+def fun_l24_n758(x)
+ if (x < 1)
+ fun_l25_n27(x)
+ else
+ fun_l25_n650(x)
+ end
+end
+
+def fun_l24_n759(x)
+ if (x < 1)
+ fun_l25_n290(x)
+ else
+ fun_l25_n852(x)
+ end
+end
+
+def fun_l24_n760(x)
+ if (x < 1)
+ fun_l25_n118(x)
+ else
+ fun_l25_n871(x)
+ end
+end
+
+def fun_l24_n761(x)
+ if (x < 1)
+ fun_l25_n372(x)
+ else
+ fun_l25_n537(x)
+ end
+end
+
+def fun_l24_n762(x)
+ if (x < 1)
+ fun_l25_n124(x)
+ else
+ fun_l25_n939(x)
+ end
+end
+
+def fun_l24_n763(x)
+ if (x < 1)
+ fun_l25_n163(x)
+ else
+ fun_l25_n787(x)
+ end
+end
+
+def fun_l24_n764(x)
+ if (x < 1)
+ fun_l25_n485(x)
+ else
+ fun_l25_n753(x)
+ end
+end
+
+def fun_l24_n765(x)
+ if (x < 1)
+ fun_l25_n181(x)
+ else
+ fun_l25_n595(x)
+ end
+end
+
+def fun_l24_n766(x)
+ if (x < 1)
+ fun_l25_n909(x)
+ else
+ fun_l25_n734(x)
+ end
+end
+
+def fun_l24_n767(x)
+ if (x < 1)
+ fun_l25_n980(x)
+ else
+ fun_l25_n673(x)
+ end
+end
+
+def fun_l24_n768(x)
+ if (x < 1)
+ fun_l25_n756(x)
+ else
+ fun_l25_n429(x)
+ end
+end
+
+def fun_l24_n769(x)
+ if (x < 1)
+ fun_l25_n301(x)
+ else
+ fun_l25_n197(x)
+ end
+end
+
+def fun_l24_n770(x)
+ if (x < 1)
+ fun_l25_n977(x)
+ else
+ fun_l25_n569(x)
+ end
+end
+
+def fun_l24_n771(x)
+ if (x < 1)
+ fun_l25_n829(x)
+ else
+ fun_l25_n34(x)
+ end
+end
+
+def fun_l24_n772(x)
+ if (x < 1)
+ fun_l25_n601(x)
+ else
+ fun_l25_n762(x)
+ end
+end
+
+def fun_l24_n773(x)
+ if (x < 1)
+ fun_l25_n790(x)
+ else
+ fun_l25_n282(x)
+ end
+end
+
+def fun_l24_n774(x)
+ if (x < 1)
+ fun_l25_n464(x)
+ else
+ fun_l25_n814(x)
+ end
+end
+
+def fun_l24_n775(x)
+ if (x < 1)
+ fun_l25_n562(x)
+ else
+ fun_l25_n543(x)
+ end
+end
+
+def fun_l24_n776(x)
+ if (x < 1)
+ fun_l25_n869(x)
+ else
+ fun_l25_n857(x)
+ end
+end
+
+def fun_l24_n777(x)
+ if (x < 1)
+ fun_l25_n206(x)
+ else
+ fun_l25_n369(x)
+ end
+end
+
+def fun_l24_n778(x)
+ if (x < 1)
+ fun_l25_n43(x)
+ else
+ fun_l25_n405(x)
+ end
+end
+
+def fun_l24_n779(x)
+ if (x < 1)
+ fun_l25_n116(x)
+ else
+ fun_l25_n644(x)
+ end
+end
+
+def fun_l24_n780(x)
+ if (x < 1)
+ fun_l25_n455(x)
+ else
+ fun_l25_n174(x)
+ end
+end
+
+def fun_l24_n781(x)
+ if (x < 1)
+ fun_l25_n234(x)
+ else
+ fun_l25_n887(x)
+ end
+end
+
+def fun_l24_n782(x)
+ if (x < 1)
+ fun_l25_n157(x)
+ else
+ fun_l25_n459(x)
+ end
+end
+
+def fun_l24_n783(x)
+ if (x < 1)
+ fun_l25_n441(x)
+ else
+ fun_l25_n830(x)
+ end
+end
+
+def fun_l24_n784(x)
+ if (x < 1)
+ fun_l25_n908(x)
+ else
+ fun_l25_n363(x)
+ end
+end
+
+def fun_l24_n785(x)
+ if (x < 1)
+ fun_l25_n495(x)
+ else
+ fun_l25_n790(x)
+ end
+end
+
+def fun_l24_n786(x)
+ if (x < 1)
+ fun_l25_n365(x)
+ else
+ fun_l25_n561(x)
+ end
+end
+
+def fun_l24_n787(x)
+ if (x < 1)
+ fun_l25_n419(x)
+ else
+ fun_l25_n471(x)
+ end
+end
+
+def fun_l24_n788(x)
+ if (x < 1)
+ fun_l25_n568(x)
+ else
+ fun_l25_n807(x)
+ end
+end
+
+def fun_l24_n789(x)
+ if (x < 1)
+ fun_l25_n148(x)
+ else
+ fun_l25_n476(x)
+ end
+end
+
+def fun_l24_n790(x)
+ if (x < 1)
+ fun_l25_n470(x)
+ else
+ fun_l25_n662(x)
+ end
+end
+
+def fun_l24_n791(x)
+ if (x < 1)
+ fun_l25_n307(x)
+ else
+ fun_l25_n828(x)
+ end
+end
+
+def fun_l24_n792(x)
+ if (x < 1)
+ fun_l25_n227(x)
+ else
+ fun_l25_n802(x)
+ end
+end
+
+def fun_l24_n793(x)
+ if (x < 1)
+ fun_l25_n891(x)
+ else
+ fun_l25_n561(x)
+ end
+end
+
+def fun_l24_n794(x)
+ if (x < 1)
+ fun_l25_n465(x)
+ else
+ fun_l25_n805(x)
+ end
+end
+
+def fun_l24_n795(x)
+ if (x < 1)
+ fun_l25_n869(x)
+ else
+ fun_l25_n250(x)
+ end
+end
+
+def fun_l24_n796(x)
+ if (x < 1)
+ fun_l25_n479(x)
+ else
+ fun_l25_n996(x)
+ end
+end
+
+def fun_l24_n797(x)
+ if (x < 1)
+ fun_l25_n773(x)
+ else
+ fun_l25_n294(x)
+ end
+end
+
+def fun_l24_n798(x)
+ if (x < 1)
+ fun_l25_n601(x)
+ else
+ fun_l25_n259(x)
+ end
+end
+
+def fun_l24_n799(x)
+ if (x < 1)
+ fun_l25_n334(x)
+ else
+ fun_l25_n696(x)
+ end
+end
+
+def fun_l24_n800(x)
+ if (x < 1)
+ fun_l25_n6(x)
+ else
+ fun_l25_n184(x)
+ end
+end
+
+def fun_l24_n801(x)
+ if (x < 1)
+ fun_l25_n345(x)
+ else
+ fun_l25_n476(x)
+ end
+end
+
+def fun_l24_n802(x)
+ if (x < 1)
+ fun_l25_n957(x)
+ else
+ fun_l25_n893(x)
+ end
+end
+
+def fun_l24_n803(x)
+ if (x < 1)
+ fun_l25_n541(x)
+ else
+ fun_l25_n562(x)
+ end
+end
+
+def fun_l24_n804(x)
+ if (x < 1)
+ fun_l25_n403(x)
+ else
+ fun_l25_n398(x)
+ end
+end
+
+def fun_l24_n805(x)
+ if (x < 1)
+ fun_l25_n759(x)
+ else
+ fun_l25_n861(x)
+ end
+end
+
+def fun_l24_n806(x)
+ if (x < 1)
+ fun_l25_n145(x)
+ else
+ fun_l25_n460(x)
+ end
+end
+
+def fun_l24_n807(x)
+ if (x < 1)
+ fun_l25_n960(x)
+ else
+ fun_l25_n865(x)
+ end
+end
+
+def fun_l24_n808(x)
+ if (x < 1)
+ fun_l25_n386(x)
+ else
+ fun_l25_n443(x)
+ end
+end
+
+def fun_l24_n809(x)
+ if (x < 1)
+ fun_l25_n789(x)
+ else
+ fun_l25_n295(x)
+ end
+end
+
+def fun_l24_n810(x)
+ if (x < 1)
+ fun_l25_n985(x)
+ else
+ fun_l25_n15(x)
+ end
+end
+
+def fun_l24_n811(x)
+ if (x < 1)
+ fun_l25_n976(x)
+ else
+ fun_l25_n636(x)
+ end
+end
+
+def fun_l24_n812(x)
+ if (x < 1)
+ fun_l25_n183(x)
+ else
+ fun_l25_n146(x)
+ end
+end
+
+def fun_l24_n813(x)
+ if (x < 1)
+ fun_l25_n457(x)
+ else
+ fun_l25_n141(x)
+ end
+end
+
+def fun_l24_n814(x)
+ if (x < 1)
+ fun_l25_n1(x)
+ else
+ fun_l25_n708(x)
+ end
+end
+
+def fun_l24_n815(x)
+ if (x < 1)
+ fun_l25_n696(x)
+ else
+ fun_l25_n898(x)
+ end
+end
+
+def fun_l24_n816(x)
+ if (x < 1)
+ fun_l25_n423(x)
+ else
+ fun_l25_n250(x)
+ end
+end
+
+def fun_l24_n817(x)
+ if (x < 1)
+ fun_l25_n432(x)
+ else
+ fun_l25_n918(x)
+ end
+end
+
+def fun_l24_n818(x)
+ if (x < 1)
+ fun_l25_n712(x)
+ else
+ fun_l25_n8(x)
+ end
+end
+
+def fun_l24_n819(x)
+ if (x < 1)
+ fun_l25_n331(x)
+ else
+ fun_l25_n194(x)
+ end
+end
+
+def fun_l24_n820(x)
+ if (x < 1)
+ fun_l25_n106(x)
+ else
+ fun_l25_n588(x)
+ end
+end
+
+def fun_l24_n821(x)
+ if (x < 1)
+ fun_l25_n662(x)
+ else
+ fun_l25_n365(x)
+ end
+end
+
+def fun_l24_n822(x)
+ if (x < 1)
+ fun_l25_n461(x)
+ else
+ fun_l25_n931(x)
+ end
+end
+
+def fun_l24_n823(x)
+ if (x < 1)
+ fun_l25_n243(x)
+ else
+ fun_l25_n26(x)
+ end
+end
+
+def fun_l24_n824(x)
+ if (x < 1)
+ fun_l25_n6(x)
+ else
+ fun_l25_n787(x)
+ end
+end
+
+def fun_l24_n825(x)
+ if (x < 1)
+ fun_l25_n536(x)
+ else
+ fun_l25_n721(x)
+ end
+end
+
+def fun_l24_n826(x)
+ if (x < 1)
+ fun_l25_n693(x)
+ else
+ fun_l25_n649(x)
+ end
+end
+
+def fun_l24_n827(x)
+ if (x < 1)
+ fun_l25_n662(x)
+ else
+ fun_l25_n981(x)
+ end
+end
+
+def fun_l24_n828(x)
+ if (x < 1)
+ fun_l25_n594(x)
+ else
+ fun_l25_n345(x)
+ end
+end
+
+def fun_l24_n829(x)
+ if (x < 1)
+ fun_l25_n917(x)
+ else
+ fun_l25_n665(x)
+ end
+end
+
+def fun_l24_n830(x)
+ if (x < 1)
+ fun_l25_n246(x)
+ else
+ fun_l25_n58(x)
+ end
+end
+
+def fun_l24_n831(x)
+ if (x < 1)
+ fun_l25_n415(x)
+ else
+ fun_l25_n617(x)
+ end
+end
+
+def fun_l24_n832(x)
+ if (x < 1)
+ fun_l25_n596(x)
+ else
+ fun_l25_n858(x)
+ end
+end
+
+def fun_l24_n833(x)
+ if (x < 1)
+ fun_l25_n810(x)
+ else
+ fun_l25_n532(x)
+ end
+end
+
+def fun_l24_n834(x)
+ if (x < 1)
+ fun_l25_n298(x)
+ else
+ fun_l25_n881(x)
+ end
+end
+
+def fun_l24_n835(x)
+ if (x < 1)
+ fun_l25_n791(x)
+ else
+ fun_l25_n344(x)
+ end
+end
+
+def fun_l24_n836(x)
+ if (x < 1)
+ fun_l25_n531(x)
+ else
+ fun_l25_n880(x)
+ end
+end
+
+def fun_l24_n837(x)
+ if (x < 1)
+ fun_l25_n571(x)
+ else
+ fun_l25_n306(x)
+ end
+end
+
+def fun_l24_n838(x)
+ if (x < 1)
+ fun_l25_n191(x)
+ else
+ fun_l25_n450(x)
+ end
+end
+
+def fun_l24_n839(x)
+ if (x < 1)
+ fun_l25_n777(x)
+ else
+ fun_l25_n234(x)
+ end
+end
+
+def fun_l24_n840(x)
+ if (x < 1)
+ fun_l25_n876(x)
+ else
+ fun_l25_n548(x)
+ end
+end
+
+def fun_l24_n841(x)
+ if (x < 1)
+ fun_l25_n83(x)
+ else
+ fun_l25_n346(x)
+ end
+end
+
+def fun_l24_n842(x)
+ if (x < 1)
+ fun_l25_n976(x)
+ else
+ fun_l25_n843(x)
+ end
+end
+
+def fun_l24_n843(x)
+ if (x < 1)
+ fun_l25_n559(x)
+ else
+ fun_l25_n424(x)
+ end
+end
+
+def fun_l24_n844(x)
+ if (x < 1)
+ fun_l25_n974(x)
+ else
+ fun_l25_n906(x)
+ end
+end
+
+def fun_l24_n845(x)
+ if (x < 1)
+ fun_l25_n274(x)
+ else
+ fun_l25_n528(x)
+ end
+end
+
+def fun_l24_n846(x)
+ if (x < 1)
+ fun_l25_n773(x)
+ else
+ fun_l25_n507(x)
+ end
+end
+
+def fun_l24_n847(x)
+ if (x < 1)
+ fun_l25_n80(x)
+ else
+ fun_l25_n274(x)
+ end
+end
+
+def fun_l24_n848(x)
+ if (x < 1)
+ fun_l25_n557(x)
+ else
+ fun_l25_n541(x)
+ end
+end
+
+def fun_l24_n849(x)
+ if (x < 1)
+ fun_l25_n208(x)
+ else
+ fun_l25_n765(x)
+ end
+end
+
+def fun_l24_n850(x)
+ if (x < 1)
+ fun_l25_n705(x)
+ else
+ fun_l25_n81(x)
+ end
+end
+
+def fun_l24_n851(x)
+ if (x < 1)
+ fun_l25_n151(x)
+ else
+ fun_l25_n706(x)
+ end
+end
+
+def fun_l24_n852(x)
+ if (x < 1)
+ fun_l25_n723(x)
+ else
+ fun_l25_n451(x)
+ end
+end
+
+def fun_l24_n853(x)
+ if (x < 1)
+ fun_l25_n155(x)
+ else
+ fun_l25_n48(x)
+ end
+end
+
+def fun_l24_n854(x)
+ if (x < 1)
+ fun_l25_n317(x)
+ else
+ fun_l25_n118(x)
+ end
+end
+
+def fun_l24_n855(x)
+ if (x < 1)
+ fun_l25_n794(x)
+ else
+ fun_l25_n880(x)
+ end
+end
+
+def fun_l24_n856(x)
+ if (x < 1)
+ fun_l25_n556(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n857(x)
+ if (x < 1)
+ fun_l25_n665(x)
+ else
+ fun_l25_n640(x)
+ end
+end
+
+def fun_l24_n858(x)
+ if (x < 1)
+ fun_l25_n732(x)
+ else
+ fun_l25_n771(x)
+ end
+end
+
+def fun_l24_n859(x)
+ if (x < 1)
+ fun_l25_n367(x)
+ else
+ fun_l25_n616(x)
+ end
+end
+
+def fun_l24_n860(x)
+ if (x < 1)
+ fun_l25_n184(x)
+ else
+ fun_l25_n912(x)
+ end
+end
+
+def fun_l24_n861(x)
+ if (x < 1)
+ fun_l25_n916(x)
+ else
+ fun_l25_n66(x)
+ end
+end
+
+def fun_l24_n862(x)
+ if (x < 1)
+ fun_l25_n526(x)
+ else
+ fun_l25_n807(x)
+ end
+end
+
+def fun_l24_n863(x)
+ if (x < 1)
+ fun_l25_n83(x)
+ else
+ fun_l25_n180(x)
+ end
+end
+
+def fun_l24_n864(x)
+ if (x < 1)
+ fun_l25_n199(x)
+ else
+ fun_l25_n471(x)
+ end
+end
+
+def fun_l24_n865(x)
+ if (x < 1)
+ fun_l25_n763(x)
+ else
+ fun_l25_n16(x)
+ end
+end
+
+def fun_l24_n866(x)
+ if (x < 1)
+ fun_l25_n280(x)
+ else
+ fun_l25_n66(x)
+ end
+end
+
+def fun_l24_n867(x)
+ if (x < 1)
+ fun_l25_n366(x)
+ else
+ fun_l25_n143(x)
+ end
+end
+
+def fun_l24_n868(x)
+ if (x < 1)
+ fun_l25_n110(x)
+ else
+ fun_l25_n151(x)
+ end
+end
+
+def fun_l24_n869(x)
+ if (x < 1)
+ fun_l25_n936(x)
+ else
+ fun_l25_n153(x)
+ end
+end
+
+def fun_l24_n870(x)
+ if (x < 1)
+ fun_l25_n555(x)
+ else
+ fun_l25_n915(x)
+ end
+end
+
+def fun_l24_n871(x)
+ if (x < 1)
+ fun_l25_n199(x)
+ else
+ fun_l25_n613(x)
+ end
+end
+
+def fun_l24_n872(x)
+ if (x < 1)
+ fun_l25_n381(x)
+ else
+ fun_l25_n899(x)
+ end
+end
+
+def fun_l24_n873(x)
+ if (x < 1)
+ fun_l25_n64(x)
+ else
+ fun_l25_n337(x)
+ end
+end
+
+def fun_l24_n874(x)
+ if (x < 1)
+ fun_l25_n753(x)
+ else
+ fun_l25_n981(x)
+ end
+end
+
+def fun_l24_n875(x)
+ if (x < 1)
+ fun_l25_n113(x)
+ else
+ fun_l25_n126(x)
+ end
+end
+
+def fun_l24_n876(x)
+ if (x < 1)
+ fun_l25_n3(x)
+ else
+ fun_l25_n288(x)
+ end
+end
+
+def fun_l24_n877(x)
+ if (x < 1)
+ fun_l25_n359(x)
+ else
+ fun_l25_n596(x)
+ end
+end
+
+def fun_l24_n878(x)
+ if (x < 1)
+ fun_l25_n937(x)
+ else
+ fun_l25_n72(x)
+ end
+end
+
+def fun_l24_n879(x)
+ if (x < 1)
+ fun_l25_n495(x)
+ else
+ fun_l25_n368(x)
+ end
+end
+
+def fun_l24_n880(x)
+ if (x < 1)
+ fun_l25_n524(x)
+ else
+ fun_l25_n228(x)
+ end
+end
+
+def fun_l24_n881(x)
+ if (x < 1)
+ fun_l25_n438(x)
+ else
+ fun_l25_n986(x)
+ end
+end
+
+def fun_l24_n882(x)
+ if (x < 1)
+ fun_l25_n334(x)
+ else
+ fun_l25_n54(x)
+ end
+end
+
+def fun_l24_n883(x)
+ if (x < 1)
+ fun_l25_n612(x)
+ else
+ fun_l25_n126(x)
+ end
+end
+
+def fun_l24_n884(x)
+ if (x < 1)
+ fun_l25_n316(x)
+ else
+ fun_l25_n222(x)
+ end
+end
+
+def fun_l24_n885(x)
+ if (x < 1)
+ fun_l25_n915(x)
+ else
+ fun_l25_n971(x)
+ end
+end
+
+def fun_l24_n886(x)
+ if (x < 1)
+ fun_l25_n987(x)
+ else
+ fun_l25_n499(x)
+ end
+end
+
+def fun_l24_n887(x)
+ if (x < 1)
+ fun_l25_n476(x)
+ else
+ fun_l25_n280(x)
+ end
+end
+
+def fun_l24_n888(x)
+ if (x < 1)
+ fun_l25_n420(x)
+ else
+ fun_l25_n584(x)
+ end
+end
+
+def fun_l24_n889(x)
+ if (x < 1)
+ fun_l25_n560(x)
+ else
+ fun_l25_n767(x)
+ end
+end
+
+def fun_l24_n890(x)
+ if (x < 1)
+ fun_l25_n26(x)
+ else
+ fun_l25_n431(x)
+ end
+end
+
+def fun_l24_n891(x)
+ if (x < 1)
+ fun_l25_n107(x)
+ else
+ fun_l25_n803(x)
+ end
+end
+
+def fun_l24_n892(x)
+ if (x < 1)
+ fun_l25_n225(x)
+ else
+ fun_l25_n665(x)
+ end
+end
+
+def fun_l24_n893(x)
+ if (x < 1)
+ fun_l25_n19(x)
+ else
+ fun_l25_n507(x)
+ end
+end
+
+def fun_l24_n894(x)
+ if (x < 1)
+ fun_l25_n44(x)
+ else
+ fun_l25_n420(x)
+ end
+end
+
+def fun_l24_n895(x)
+ if (x < 1)
+ fun_l25_n526(x)
+ else
+ fun_l25_n871(x)
+ end
+end
+
+def fun_l24_n896(x)
+ if (x < 1)
+ fun_l25_n900(x)
+ else
+ fun_l25_n824(x)
+ end
+end
+
+def fun_l24_n897(x)
+ if (x < 1)
+ fun_l25_n105(x)
+ else
+ fun_l25_n602(x)
+ end
+end
+
+def fun_l24_n898(x)
+ if (x < 1)
+ fun_l25_n228(x)
+ else
+ fun_l25_n993(x)
+ end
+end
+
+def fun_l24_n899(x)
+ if (x < 1)
+ fun_l25_n330(x)
+ else
+ fun_l25_n60(x)
+ end
+end
+
+def fun_l24_n900(x)
+ if (x < 1)
+ fun_l25_n512(x)
+ else
+ fun_l25_n708(x)
+ end
+end
+
+def fun_l24_n901(x)
+ if (x < 1)
+ fun_l25_n791(x)
+ else
+ fun_l25_n554(x)
+ end
+end
+
+def fun_l24_n902(x)
+ if (x < 1)
+ fun_l25_n204(x)
+ else
+ fun_l25_n439(x)
+ end
+end
+
+def fun_l24_n903(x)
+ if (x < 1)
+ fun_l25_n577(x)
+ else
+ fun_l25_n174(x)
+ end
+end
+
+def fun_l24_n904(x)
+ if (x < 1)
+ fun_l25_n713(x)
+ else
+ fun_l25_n35(x)
+ end
+end
+
+def fun_l24_n905(x)
+ if (x < 1)
+ fun_l25_n290(x)
+ else
+ fun_l25_n342(x)
+ end
+end
+
+def fun_l24_n906(x)
+ if (x < 1)
+ fun_l25_n607(x)
+ else
+ fun_l25_n52(x)
+ end
+end
+
+def fun_l24_n907(x)
+ if (x < 1)
+ fun_l25_n72(x)
+ else
+ fun_l25_n169(x)
+ end
+end
+
+def fun_l24_n908(x)
+ if (x < 1)
+ fun_l25_n179(x)
+ else
+ fun_l25_n383(x)
+ end
+end
+
+def fun_l24_n909(x)
+ if (x < 1)
+ fun_l25_n52(x)
+ else
+ fun_l25_n504(x)
+ end
+end
+
+def fun_l24_n910(x)
+ if (x < 1)
+ fun_l25_n346(x)
+ else
+ fun_l25_n775(x)
+ end
+end
+
+def fun_l24_n911(x)
+ if (x < 1)
+ fun_l25_n535(x)
+ else
+ fun_l25_n210(x)
+ end
+end
+
+def fun_l24_n912(x)
+ if (x < 1)
+ fun_l25_n937(x)
+ else
+ fun_l25_n409(x)
+ end
+end
+
+def fun_l24_n913(x)
+ if (x < 1)
+ fun_l25_n889(x)
+ else
+ fun_l25_n463(x)
+ end
+end
+
+def fun_l24_n914(x)
+ if (x < 1)
+ fun_l25_n75(x)
+ else
+ fun_l25_n817(x)
+ end
+end
+
+def fun_l24_n915(x)
+ if (x < 1)
+ fun_l25_n277(x)
+ else
+ fun_l25_n3(x)
+ end
+end
+
+def fun_l24_n916(x)
+ if (x < 1)
+ fun_l25_n97(x)
+ else
+ fun_l25_n819(x)
+ end
+end
+
+def fun_l24_n917(x)
+ if (x < 1)
+ fun_l25_n412(x)
+ else
+ fun_l25_n851(x)
+ end
+end
+
+def fun_l24_n918(x)
+ if (x < 1)
+ fun_l25_n803(x)
+ else
+ fun_l25_n429(x)
+ end
+end
+
+def fun_l24_n919(x)
+ if (x < 1)
+ fun_l25_n12(x)
+ else
+ fun_l25_n434(x)
+ end
+end
+
+def fun_l24_n920(x)
+ if (x < 1)
+ fun_l25_n721(x)
+ else
+ fun_l25_n553(x)
+ end
+end
+
+def fun_l24_n921(x)
+ if (x < 1)
+ fun_l25_n438(x)
+ else
+ fun_l25_n211(x)
+ end
+end
+
+def fun_l24_n922(x)
+ if (x < 1)
+ fun_l25_n123(x)
+ else
+ fun_l25_n89(x)
+ end
+end
+
+def fun_l24_n923(x)
+ if (x < 1)
+ fun_l25_n696(x)
+ else
+ fun_l25_n78(x)
+ end
+end
+
+def fun_l24_n924(x)
+ if (x < 1)
+ fun_l25_n556(x)
+ else
+ fun_l25_n788(x)
+ end
+end
+
+def fun_l24_n925(x)
+ if (x < 1)
+ fun_l25_n928(x)
+ else
+ fun_l25_n797(x)
+ end
+end
+
+def fun_l24_n926(x)
+ if (x < 1)
+ fun_l25_n796(x)
+ else
+ fun_l25_n84(x)
+ end
+end
+
+def fun_l24_n927(x)
+ if (x < 1)
+ fun_l25_n874(x)
+ else
+ fun_l25_n255(x)
+ end
+end
+
+def fun_l24_n928(x)
+ if (x < 1)
+ fun_l25_n715(x)
+ else
+ fun_l25_n812(x)
+ end
+end
+
+def fun_l24_n929(x)
+ if (x < 1)
+ fun_l25_n384(x)
+ else
+ fun_l25_n859(x)
+ end
+end
+
+def fun_l24_n930(x)
+ if (x < 1)
+ fun_l25_n133(x)
+ else
+ fun_l25_n923(x)
+ end
+end
+
+def fun_l24_n931(x)
+ if (x < 1)
+ fun_l25_n712(x)
+ else
+ fun_l25_n850(x)
+ end
+end
+
+def fun_l24_n932(x)
+ if (x < 1)
+ fun_l25_n301(x)
+ else
+ fun_l25_n743(x)
+ end
+end
+
+def fun_l24_n933(x)
+ if (x < 1)
+ fun_l25_n554(x)
+ else
+ fun_l25_n4(x)
+ end
+end
+
+def fun_l24_n934(x)
+ if (x < 1)
+ fun_l25_n407(x)
+ else
+ fun_l25_n656(x)
+ end
+end
+
+def fun_l24_n935(x)
+ if (x < 1)
+ fun_l25_n109(x)
+ else
+ fun_l25_n356(x)
+ end
+end
+
+def fun_l24_n936(x)
+ if (x < 1)
+ fun_l25_n985(x)
+ else
+ fun_l25_n183(x)
+ end
+end
+
+def fun_l24_n937(x)
+ if (x < 1)
+ fun_l25_n365(x)
+ else
+ fun_l25_n949(x)
+ end
+end
+
+def fun_l24_n938(x)
+ if (x < 1)
+ fun_l25_n672(x)
+ else
+ fun_l25_n417(x)
+ end
+end
+
+def fun_l24_n939(x)
+ if (x < 1)
+ fun_l25_n360(x)
+ else
+ fun_l25_n271(x)
+ end
+end
+
+def fun_l24_n940(x)
+ if (x < 1)
+ fun_l25_n654(x)
+ else
+ fun_l25_n365(x)
+ end
+end
+
+def fun_l24_n941(x)
+ if (x < 1)
+ fun_l25_n836(x)
+ else
+ fun_l25_n303(x)
+ end
+end
+
+def fun_l24_n942(x)
+ if (x < 1)
+ fun_l25_n299(x)
+ else
+ fun_l25_n130(x)
+ end
+end
+
+def fun_l24_n943(x)
+ if (x < 1)
+ fun_l25_n566(x)
+ else
+ fun_l25_n347(x)
+ end
+end
+
+def fun_l24_n944(x)
+ if (x < 1)
+ fun_l25_n754(x)
+ else
+ fun_l25_n670(x)
+ end
+end
+
+def fun_l24_n945(x)
+ if (x < 1)
+ fun_l25_n484(x)
+ else
+ fun_l25_n278(x)
+ end
+end
+
+def fun_l24_n946(x)
+ if (x < 1)
+ fun_l25_n35(x)
+ else
+ fun_l25_n915(x)
+ end
+end
+
+def fun_l24_n947(x)
+ if (x < 1)
+ fun_l25_n488(x)
+ else
+ fun_l25_n664(x)
+ end
+end
+
+def fun_l24_n948(x)
+ if (x < 1)
+ fun_l25_n249(x)
+ else
+ fun_l25_n931(x)
+ end
+end
+
+def fun_l24_n949(x)
+ if (x < 1)
+ fun_l25_n165(x)
+ else
+ fun_l25_n101(x)
+ end
+end
+
+def fun_l24_n950(x)
+ if (x < 1)
+ fun_l25_n304(x)
+ else
+ fun_l25_n668(x)
+ end
+end
+
+def fun_l24_n951(x)
+ if (x < 1)
+ fun_l25_n279(x)
+ else
+ fun_l25_n600(x)
+ end
+end
+
+def fun_l24_n952(x)
+ if (x < 1)
+ fun_l25_n70(x)
+ else
+ fun_l25_n852(x)
+ end
+end
+
+def fun_l24_n953(x)
+ if (x < 1)
+ fun_l25_n419(x)
+ else
+ fun_l25_n856(x)
+ end
+end
+
+def fun_l24_n954(x)
+ if (x < 1)
+ fun_l25_n55(x)
+ else
+ fun_l25_n857(x)
+ end
+end
+
+def fun_l24_n955(x)
+ if (x < 1)
+ fun_l25_n122(x)
+ else
+ fun_l25_n658(x)
+ end
+end
+
+def fun_l24_n956(x)
+ if (x < 1)
+ fun_l25_n973(x)
+ else
+ fun_l25_n421(x)
+ end
+end
+
+def fun_l24_n957(x)
+ if (x < 1)
+ fun_l25_n82(x)
+ else
+ fun_l25_n264(x)
+ end
+end
+
+def fun_l24_n958(x)
+ if (x < 1)
+ fun_l25_n608(x)
+ else
+ fun_l25_n469(x)
+ end
+end
+
+def fun_l24_n959(x)
+ if (x < 1)
+ fun_l25_n823(x)
+ else
+ fun_l25_n320(x)
+ end
+end
+
+def fun_l24_n960(x)
+ if (x < 1)
+ fun_l25_n765(x)
+ else
+ fun_l25_n461(x)
+ end
+end
+
+def fun_l24_n961(x)
+ if (x < 1)
+ fun_l25_n343(x)
+ else
+ fun_l25_n18(x)
+ end
+end
+
+def fun_l24_n962(x)
+ if (x < 1)
+ fun_l25_n346(x)
+ else
+ fun_l25_n821(x)
+ end
+end
+
+def fun_l24_n963(x)
+ if (x < 1)
+ fun_l25_n80(x)
+ else
+ fun_l25_n949(x)
+ end
+end
+
+def fun_l24_n964(x)
+ if (x < 1)
+ fun_l25_n171(x)
+ else
+ fun_l25_n514(x)
+ end
+end
+
+def fun_l24_n965(x)
+ if (x < 1)
+ fun_l25_n625(x)
+ else
+ fun_l25_n768(x)
+ end
+end
+
+def fun_l24_n966(x)
+ if (x < 1)
+ fun_l25_n390(x)
+ else
+ fun_l25_n195(x)
+ end
+end
+
+def fun_l24_n967(x)
+ if (x < 1)
+ fun_l25_n774(x)
+ else
+ fun_l25_n928(x)
+ end
+end
+
+def fun_l24_n968(x)
+ if (x < 1)
+ fun_l25_n997(x)
+ else
+ fun_l25_n441(x)
+ end
+end
+
+def fun_l24_n969(x)
+ if (x < 1)
+ fun_l25_n865(x)
+ else
+ fun_l25_n418(x)
+ end
+end
+
+def fun_l24_n970(x)
+ if (x < 1)
+ fun_l25_n238(x)
+ else
+ fun_l25_n816(x)
+ end
+end
+
+def fun_l24_n971(x)
+ if (x < 1)
+ fun_l25_n521(x)
+ else
+ fun_l25_n427(x)
+ end
+end
+
+def fun_l24_n972(x)
+ if (x < 1)
+ fun_l25_n214(x)
+ else
+ fun_l25_n282(x)
+ end
+end
+
+def fun_l24_n973(x)
+ if (x < 1)
+ fun_l25_n611(x)
+ else
+ fun_l25_n439(x)
+ end
+end
+
+def fun_l24_n974(x)
+ if (x < 1)
+ fun_l25_n395(x)
+ else
+ fun_l25_n593(x)
+ end
+end
+
+def fun_l24_n975(x)
+ if (x < 1)
+ fun_l25_n720(x)
+ else
+ fun_l25_n477(x)
+ end
+end
+
+def fun_l24_n976(x)
+ if (x < 1)
+ fun_l25_n204(x)
+ else
+ fun_l25_n912(x)
+ end
+end
+
+def fun_l24_n977(x)
+ if (x < 1)
+ fun_l25_n703(x)
+ else
+ fun_l25_n651(x)
+ end
+end
+
+def fun_l24_n978(x)
+ if (x < 1)
+ fun_l25_n247(x)
+ else
+ fun_l25_n917(x)
+ end
+end
+
+def fun_l24_n979(x)
+ if (x < 1)
+ fun_l25_n792(x)
+ else
+ fun_l25_n320(x)
+ end
+end
+
+def fun_l24_n980(x)
+ if (x < 1)
+ fun_l25_n480(x)
+ else
+ fun_l25_n128(x)
+ end
+end
+
+def fun_l24_n981(x)
+ if (x < 1)
+ fun_l25_n848(x)
+ else
+ fun_l25_n344(x)
+ end
+end
+
+def fun_l24_n982(x)
+ if (x < 1)
+ fun_l25_n84(x)
+ else
+ fun_l25_n977(x)
+ end
+end
+
+def fun_l24_n983(x)
+ if (x < 1)
+ fun_l25_n213(x)
+ else
+ fun_l25_n131(x)
+ end
+end
+
+def fun_l24_n984(x)
+ if (x < 1)
+ fun_l25_n2(x)
+ else
+ fun_l25_n21(x)
+ end
+end
+
+def fun_l24_n985(x)
+ if (x < 1)
+ fun_l25_n301(x)
+ else
+ fun_l25_n910(x)
+ end
+end
+
+def fun_l24_n986(x)
+ if (x < 1)
+ fun_l25_n533(x)
+ else
+ fun_l25_n397(x)
+ end
+end
+
+def fun_l24_n987(x)
+ if (x < 1)
+ fun_l25_n226(x)
+ else
+ fun_l25_n281(x)
+ end
+end
+
+def fun_l24_n988(x)
+ if (x < 1)
+ fun_l25_n402(x)
+ else
+ fun_l25_n70(x)
+ end
+end
+
+def fun_l24_n989(x)
+ if (x < 1)
+ fun_l25_n190(x)
+ else
+ fun_l25_n70(x)
+ end
+end
+
+def fun_l24_n990(x)
+ if (x < 1)
+ fun_l25_n376(x)
+ else
+ fun_l25_n331(x)
+ end
+end
+
+def fun_l24_n991(x)
+ if (x < 1)
+ fun_l25_n915(x)
+ else
+ fun_l25_n234(x)
+ end
+end
+
+def fun_l24_n992(x)
+ if (x < 1)
+ fun_l25_n146(x)
+ else
+ fun_l25_n825(x)
+ end
+end
+
+def fun_l24_n993(x)
+ if (x < 1)
+ fun_l25_n877(x)
+ else
+ fun_l25_n237(x)
+ end
+end
+
+def fun_l24_n994(x)
+ if (x < 1)
+ fun_l25_n454(x)
+ else
+ fun_l25_n852(x)
+ end
+end
+
+def fun_l24_n995(x)
+ if (x < 1)
+ fun_l25_n45(x)
+ else
+ fun_l25_n337(x)
+ end
+end
+
+def fun_l24_n996(x)
+ if (x < 1)
+ fun_l25_n491(x)
+ else
+ fun_l25_n319(x)
+ end
+end
+
+def fun_l24_n997(x)
+ if (x < 1)
+ fun_l25_n216(x)
+ else
+ fun_l25_n249(x)
+ end
+end
+
+def fun_l24_n998(x)
+ if (x < 1)
+ fun_l25_n370(x)
+ else
+ fun_l25_n747(x)
+ end
+end
+
+def fun_l24_n999(x)
+ if (x < 1)
+ fun_l25_n584(x)
+ else
+ fun_l25_n813(x)
+ end
+end
+
+def fun_l25_n0(x)
+ if (x < 1)
+ fun_l26_n818(x)
+ else
+ fun_l26_n750(x)
+ end
+end
+
+def fun_l25_n1(x)
+ if (x < 1)
+ fun_l26_n725(x)
+ else
+ fun_l26_n848(x)
+ end
+end
+
+def fun_l25_n2(x)
+ if (x < 1)
+ fun_l26_n716(x)
+ else
+ fun_l26_n190(x)
+ end
+end
+
+def fun_l25_n3(x)
+ if (x < 1)
+ fun_l26_n977(x)
+ else
+ fun_l26_n222(x)
+ end
+end
+
+def fun_l25_n4(x)
+ if (x < 1)
+ fun_l26_n931(x)
+ else
+ fun_l26_n615(x)
+ end
+end
+
+def fun_l25_n5(x)
+ if (x < 1)
+ fun_l26_n720(x)
+ else
+ fun_l26_n440(x)
+ end
+end
+
+def fun_l25_n6(x)
+ if (x < 1)
+ fun_l26_n400(x)
+ else
+ fun_l26_n336(x)
+ end
+end
+
+def fun_l25_n7(x)
+ if (x < 1)
+ fun_l26_n109(x)
+ else
+ fun_l26_n74(x)
+ end
+end
+
+def fun_l25_n8(x)
+ if (x < 1)
+ fun_l26_n12(x)
+ else
+ fun_l26_n857(x)
+ end
+end
+
+def fun_l25_n9(x)
+ if (x < 1)
+ fun_l26_n778(x)
+ else
+ fun_l26_n286(x)
+ end
+end
+
+def fun_l25_n10(x)
+ if (x < 1)
+ fun_l26_n857(x)
+ else
+ fun_l26_n311(x)
+ end
+end
+
+def fun_l25_n11(x)
+ if (x < 1)
+ fun_l26_n204(x)
+ else
+ fun_l26_n348(x)
+ end
+end
+
+def fun_l25_n12(x)
+ if (x < 1)
+ fun_l26_n626(x)
+ else
+ fun_l26_n983(x)
+ end
+end
+
+def fun_l25_n13(x)
+ if (x < 1)
+ fun_l26_n417(x)
+ else
+ fun_l26_n334(x)
+ end
+end
+
+def fun_l25_n14(x)
+ if (x < 1)
+ fun_l26_n34(x)
+ else
+ fun_l26_n269(x)
+ end
+end
+
+def fun_l25_n15(x)
+ if (x < 1)
+ fun_l26_n184(x)
+ else
+ fun_l26_n183(x)
+ end
+end
+
+def fun_l25_n16(x)
+ if (x < 1)
+ fun_l26_n744(x)
+ else
+ fun_l26_n450(x)
+ end
+end
+
+def fun_l25_n17(x)
+ if (x < 1)
+ fun_l26_n763(x)
+ else
+ fun_l26_n390(x)
+ end
+end
+
+def fun_l25_n18(x)
+ if (x < 1)
+ fun_l26_n926(x)
+ else
+ fun_l26_n379(x)
+ end
+end
+
+def fun_l25_n19(x)
+ if (x < 1)
+ fun_l26_n746(x)
+ else
+ fun_l26_n946(x)
+ end
+end
+
+def fun_l25_n20(x)
+ if (x < 1)
+ fun_l26_n500(x)
+ else
+ fun_l26_n599(x)
+ end
+end
+
+def fun_l25_n21(x)
+ if (x < 1)
+ fun_l26_n757(x)
+ else
+ fun_l26_n725(x)
+ end
+end
+
+def fun_l25_n22(x)
+ if (x < 1)
+ fun_l26_n738(x)
+ else
+ fun_l26_n24(x)
+ end
+end
+
+def fun_l25_n23(x)
+ if (x < 1)
+ fun_l26_n350(x)
+ else
+ fun_l26_n344(x)
+ end
+end
+
+def fun_l25_n24(x)
+ if (x < 1)
+ fun_l26_n521(x)
+ else
+ fun_l26_n680(x)
+ end
+end
+
+def fun_l25_n25(x)
+ if (x < 1)
+ fun_l26_n647(x)
+ else
+ fun_l26_n604(x)
+ end
+end
+
+def fun_l25_n26(x)
+ if (x < 1)
+ fun_l26_n990(x)
+ else
+ fun_l26_n262(x)
+ end
+end
+
+def fun_l25_n27(x)
+ if (x < 1)
+ fun_l26_n309(x)
+ else
+ fun_l26_n759(x)
+ end
+end
+
+def fun_l25_n28(x)
+ if (x < 1)
+ fun_l26_n720(x)
+ else
+ fun_l26_n11(x)
+ end
+end
+
+def fun_l25_n29(x)
+ if (x < 1)
+ fun_l26_n761(x)
+ else
+ fun_l26_n690(x)
+ end
+end
+
+def fun_l25_n30(x)
+ if (x < 1)
+ fun_l26_n729(x)
+ else
+ fun_l26_n577(x)
+ end
+end
+
+def fun_l25_n31(x)
+ if (x < 1)
+ fun_l26_n321(x)
+ else
+ fun_l26_n608(x)
+ end
+end
+
+def fun_l25_n32(x)
+ if (x < 1)
+ fun_l26_n325(x)
+ else
+ fun_l26_n541(x)
+ end
+end
+
+def fun_l25_n33(x)
+ if (x < 1)
+ fun_l26_n644(x)
+ else
+ fun_l26_n15(x)
+ end
+end
+
+def fun_l25_n34(x)
+ if (x < 1)
+ fun_l26_n53(x)
+ else
+ fun_l26_n887(x)
+ end
+end
+
+def fun_l25_n35(x)
+ if (x < 1)
+ fun_l26_n470(x)
+ else
+ fun_l26_n564(x)
+ end
+end
+
+def fun_l25_n36(x)
+ if (x < 1)
+ fun_l26_n198(x)
+ else
+ fun_l26_n542(x)
+ end
+end
+
+def fun_l25_n37(x)
+ if (x < 1)
+ fun_l26_n455(x)
+ else
+ fun_l26_n373(x)
+ end
+end
+
+def fun_l25_n38(x)
+ if (x < 1)
+ fun_l26_n216(x)
+ else
+ fun_l26_n86(x)
+ end
+end
+
+def fun_l25_n39(x)
+ if (x < 1)
+ fun_l26_n417(x)
+ else
+ fun_l26_n50(x)
+ end
+end
+
+def fun_l25_n40(x)
+ if (x < 1)
+ fun_l26_n955(x)
+ else
+ fun_l26_n979(x)
+ end
+end
+
+def fun_l25_n41(x)
+ if (x < 1)
+ fun_l26_n692(x)
+ else
+ fun_l26_n935(x)
+ end
+end
+
+def fun_l25_n42(x)
+ if (x < 1)
+ fun_l26_n360(x)
+ else
+ fun_l26_n246(x)
+ end
+end
+
+def fun_l25_n43(x)
+ if (x < 1)
+ fun_l26_n826(x)
+ else
+ fun_l26_n433(x)
+ end
+end
+
+def fun_l25_n44(x)
+ if (x < 1)
+ fun_l26_n222(x)
+ else
+ fun_l26_n101(x)
+ end
+end
+
+def fun_l25_n45(x)
+ if (x < 1)
+ fun_l26_n590(x)
+ else
+ fun_l26_n398(x)
+ end
+end
+
+def fun_l25_n46(x)
+ if (x < 1)
+ fun_l26_n959(x)
+ else
+ fun_l26_n620(x)
+ end
+end
+
+def fun_l25_n47(x)
+ if (x < 1)
+ fun_l26_n530(x)
+ else
+ fun_l26_n503(x)
+ end
+end
+
+def fun_l25_n48(x)
+ if (x < 1)
+ fun_l26_n615(x)
+ else
+ fun_l26_n640(x)
+ end
+end
+
+def fun_l25_n49(x)
+ if (x < 1)
+ fun_l26_n774(x)
+ else
+ fun_l26_n23(x)
+ end
+end
+
+def fun_l25_n50(x)
+ if (x < 1)
+ fun_l26_n344(x)
+ else
+ fun_l26_n303(x)
+ end
+end
+
+def fun_l25_n51(x)
+ if (x < 1)
+ fun_l26_n54(x)
+ else
+ fun_l26_n26(x)
+ end
+end
+
+def fun_l25_n52(x)
+ if (x < 1)
+ fun_l26_n545(x)
+ else
+ fun_l26_n791(x)
+ end
+end
+
+def fun_l25_n53(x)
+ if (x < 1)
+ fun_l26_n554(x)
+ else
+ fun_l26_n42(x)
+ end
+end
+
+def fun_l25_n54(x)
+ if (x < 1)
+ fun_l26_n419(x)
+ else
+ fun_l26_n179(x)
+ end
+end
+
+def fun_l25_n55(x)
+ if (x < 1)
+ fun_l26_n845(x)
+ else
+ fun_l26_n641(x)
+ end
+end
+
+def fun_l25_n56(x)
+ if (x < 1)
+ fun_l26_n389(x)
+ else
+ fun_l26_n547(x)
+ end
+end
+
+def fun_l25_n57(x)
+ if (x < 1)
+ fun_l26_n744(x)
+ else
+ fun_l26_n946(x)
+ end
+end
+
+def fun_l25_n58(x)
+ if (x < 1)
+ fun_l26_n410(x)
+ else
+ fun_l26_n909(x)
+ end
+end
+
+def fun_l25_n59(x)
+ if (x < 1)
+ fun_l26_n126(x)
+ else
+ fun_l26_n382(x)
+ end
+end
+
+def fun_l25_n60(x)
+ if (x < 1)
+ fun_l26_n355(x)
+ else
+ fun_l26_n902(x)
+ end
+end
+
+def fun_l25_n61(x)
+ if (x < 1)
+ fun_l26_n759(x)
+ else
+ fun_l26_n445(x)
+ end
+end
+
+def fun_l25_n62(x)
+ if (x < 1)
+ fun_l26_n859(x)
+ else
+ fun_l26_n362(x)
+ end
+end
+
+def fun_l25_n63(x)
+ if (x < 1)
+ fun_l26_n488(x)
+ else
+ fun_l26_n725(x)
+ end
+end
+
+def fun_l25_n64(x)
+ if (x < 1)
+ fun_l26_n268(x)
+ else
+ fun_l26_n865(x)
+ end
+end
+
+def fun_l25_n65(x)
+ if (x < 1)
+ fun_l26_n33(x)
+ else
+ fun_l26_n417(x)
+ end
+end
+
+def fun_l25_n66(x)
+ if (x < 1)
+ fun_l26_n281(x)
+ else
+ fun_l26_n485(x)
+ end
+end
+
+def fun_l25_n67(x)
+ if (x < 1)
+ fun_l26_n627(x)
+ else
+ fun_l26_n200(x)
+ end
+end
+
+def fun_l25_n68(x)
+ if (x < 1)
+ fun_l26_n392(x)
+ else
+ fun_l26_n639(x)
+ end
+end
+
+def fun_l25_n69(x)
+ if (x < 1)
+ fun_l26_n799(x)
+ else
+ fun_l26_n242(x)
+ end
+end
+
+def fun_l25_n70(x)
+ if (x < 1)
+ fun_l26_n783(x)
+ else
+ fun_l26_n564(x)
+ end
+end
+
+def fun_l25_n71(x)
+ if (x < 1)
+ fun_l26_n768(x)
+ else
+ fun_l26_n908(x)
+ end
+end
+
+def fun_l25_n72(x)
+ if (x < 1)
+ fun_l26_n567(x)
+ else
+ fun_l26_n365(x)
+ end
+end
+
+def fun_l25_n73(x)
+ if (x < 1)
+ fun_l26_n291(x)
+ else
+ fun_l26_n887(x)
+ end
+end
+
+def fun_l25_n74(x)
+ if (x < 1)
+ fun_l26_n889(x)
+ else
+ fun_l26_n180(x)
+ end
+end
+
+def fun_l25_n75(x)
+ if (x < 1)
+ fun_l26_n142(x)
+ else
+ fun_l26_n101(x)
+ end
+end
+
+def fun_l25_n76(x)
+ if (x < 1)
+ fun_l26_n108(x)
+ else
+ fun_l26_n863(x)
+ end
+end
+
+def fun_l25_n77(x)
+ if (x < 1)
+ fun_l26_n441(x)
+ else
+ fun_l26_n51(x)
+ end
+end
+
+def fun_l25_n78(x)
+ if (x < 1)
+ fun_l26_n787(x)
+ else
+ fun_l26_n543(x)
+ end
+end
+
+def fun_l25_n79(x)
+ if (x < 1)
+ fun_l26_n699(x)
+ else
+ fun_l26_n513(x)
+ end
+end
+
+def fun_l25_n80(x)
+ if (x < 1)
+ fun_l26_n400(x)
+ else
+ fun_l26_n72(x)
+ end
+end
+
+def fun_l25_n81(x)
+ if (x < 1)
+ fun_l26_n814(x)
+ else
+ fun_l26_n732(x)
+ end
+end
+
+def fun_l25_n82(x)
+ if (x < 1)
+ fun_l26_n755(x)
+ else
+ fun_l26_n606(x)
+ end
+end
+
+def fun_l25_n83(x)
+ if (x < 1)
+ fun_l26_n351(x)
+ else
+ fun_l26_n208(x)
+ end
+end
+
+def fun_l25_n84(x)
+ if (x < 1)
+ fun_l26_n124(x)
+ else
+ fun_l26_n554(x)
+ end
+end
+
+def fun_l25_n85(x)
+ if (x < 1)
+ fun_l26_n19(x)
+ else
+ fun_l26_n58(x)
+ end
+end
+
+def fun_l25_n86(x)
+ if (x < 1)
+ fun_l26_n710(x)
+ else
+ fun_l26_n300(x)
+ end
+end
+
+def fun_l25_n87(x)
+ if (x < 1)
+ fun_l26_n833(x)
+ else
+ fun_l26_n53(x)
+ end
+end
+
+def fun_l25_n88(x)
+ if (x < 1)
+ fun_l26_n923(x)
+ else
+ fun_l26_n445(x)
+ end
+end
+
+def fun_l25_n89(x)
+ if (x < 1)
+ fun_l26_n674(x)
+ else
+ fun_l26_n176(x)
+ end
+end
+
+def fun_l25_n90(x)
+ if (x < 1)
+ fun_l26_n78(x)
+ else
+ fun_l26_n506(x)
+ end
+end
+
+def fun_l25_n91(x)
+ if (x < 1)
+ fun_l26_n352(x)
+ else
+ fun_l26_n312(x)
+ end
+end
+
+def fun_l25_n92(x)
+ if (x < 1)
+ fun_l26_n400(x)
+ else
+ fun_l26_n787(x)
+ end
+end
+
+def fun_l25_n93(x)
+ if (x < 1)
+ fun_l26_n897(x)
+ else
+ fun_l26_n395(x)
+ end
+end
+
+def fun_l25_n94(x)
+ if (x < 1)
+ fun_l26_n267(x)
+ else
+ fun_l26_n974(x)
+ end
+end
+
+def fun_l25_n95(x)
+ if (x < 1)
+ fun_l26_n547(x)
+ else
+ fun_l26_n280(x)
+ end
+end
+
+def fun_l25_n96(x)
+ if (x < 1)
+ fun_l26_n281(x)
+ else
+ fun_l26_n222(x)
+ end
+end
+
+def fun_l25_n97(x)
+ if (x < 1)
+ fun_l26_n130(x)
+ else
+ fun_l26_n232(x)
+ end
+end
+
+def fun_l25_n98(x)
+ if (x < 1)
+ fun_l26_n863(x)
+ else
+ fun_l26_n970(x)
+ end
+end
+
+def fun_l25_n99(x)
+ if (x < 1)
+ fun_l26_n28(x)
+ else
+ fun_l26_n344(x)
+ end
+end
+
+def fun_l25_n100(x)
+ if (x < 1)
+ fun_l26_n906(x)
+ else
+ fun_l26_n818(x)
+ end
+end
+
+def fun_l25_n101(x)
+ if (x < 1)
+ fun_l26_n658(x)
+ else
+ fun_l26_n708(x)
+ end
+end
+
+def fun_l25_n102(x)
+ if (x < 1)
+ fun_l26_n545(x)
+ else
+ fun_l26_n627(x)
+ end
+end
+
+def fun_l25_n103(x)
+ if (x < 1)
+ fun_l26_n377(x)
+ else
+ fun_l26_n555(x)
+ end
+end
+
+def fun_l25_n104(x)
+ if (x < 1)
+ fun_l26_n628(x)
+ else
+ fun_l26_n465(x)
+ end
+end
+
+def fun_l25_n105(x)
+ if (x < 1)
+ fun_l26_n208(x)
+ else
+ fun_l26_n720(x)
+ end
+end
+
+def fun_l25_n106(x)
+ if (x < 1)
+ fun_l26_n203(x)
+ else
+ fun_l26_n984(x)
+ end
+end
+
+def fun_l25_n107(x)
+ if (x < 1)
+ fun_l26_n265(x)
+ else
+ fun_l26_n124(x)
+ end
+end
+
+def fun_l25_n108(x)
+ if (x < 1)
+ fun_l26_n786(x)
+ else
+ fun_l26_n305(x)
+ end
+end
+
+def fun_l25_n109(x)
+ if (x < 1)
+ fun_l26_n907(x)
+ else
+ fun_l26_n57(x)
+ end
+end
+
+def fun_l25_n110(x)
+ if (x < 1)
+ fun_l26_n883(x)
+ else
+ fun_l26_n107(x)
+ end
+end
+
+def fun_l25_n111(x)
+ if (x < 1)
+ fun_l26_n783(x)
+ else
+ fun_l26_n443(x)
+ end
+end
+
+def fun_l25_n112(x)
+ if (x < 1)
+ fun_l26_n309(x)
+ else
+ fun_l26_n127(x)
+ end
+end
+
+def fun_l25_n113(x)
+ if (x < 1)
+ fun_l26_n578(x)
+ else
+ fun_l26_n656(x)
+ end
+end
+
+def fun_l25_n114(x)
+ if (x < 1)
+ fun_l26_n352(x)
+ else
+ fun_l26_n610(x)
+ end
+end
+
+def fun_l25_n115(x)
+ if (x < 1)
+ fun_l26_n975(x)
+ else
+ fun_l26_n580(x)
+ end
+end
+
+def fun_l25_n116(x)
+ if (x < 1)
+ fun_l26_n892(x)
+ else
+ fun_l26_n596(x)
+ end
+end
+
+def fun_l25_n117(x)
+ if (x < 1)
+ fun_l26_n80(x)
+ else
+ fun_l26_n759(x)
+ end
+end
+
+def fun_l25_n118(x)
+ if (x < 1)
+ fun_l26_n866(x)
+ else
+ fun_l26_n964(x)
+ end
+end
+
+def fun_l25_n119(x)
+ if (x < 1)
+ fun_l26_n367(x)
+ else
+ fun_l26_n896(x)
+ end
+end
+
+def fun_l25_n120(x)
+ if (x < 1)
+ fun_l26_n787(x)
+ else
+ fun_l26_n17(x)
+ end
+end
+
+def fun_l25_n121(x)
+ if (x < 1)
+ fun_l26_n312(x)
+ else
+ fun_l26_n247(x)
+ end
+end
+
+def fun_l25_n122(x)
+ if (x < 1)
+ fun_l26_n163(x)
+ else
+ fun_l26_n906(x)
+ end
+end
+
+def fun_l25_n123(x)
+ if (x < 1)
+ fun_l26_n706(x)
+ else
+ fun_l26_n840(x)
+ end
+end
+
+def fun_l25_n124(x)
+ if (x < 1)
+ fun_l26_n85(x)
+ else
+ fun_l26_n200(x)
+ end
+end
+
+def fun_l25_n125(x)
+ if (x < 1)
+ fun_l26_n389(x)
+ else
+ fun_l26_n274(x)
+ end
+end
+
+def fun_l25_n126(x)
+ if (x < 1)
+ fun_l26_n509(x)
+ else
+ fun_l26_n471(x)
+ end
+end
+
+def fun_l25_n127(x)
+ if (x < 1)
+ fun_l26_n924(x)
+ else
+ fun_l26_n132(x)
+ end
+end
+
+def fun_l25_n128(x)
+ if (x < 1)
+ fun_l26_n496(x)
+ else
+ fun_l26_n865(x)
+ end
+end
+
+def fun_l25_n129(x)
+ if (x < 1)
+ fun_l26_n775(x)
+ else
+ fun_l26_n22(x)
+ end
+end
+
+def fun_l25_n130(x)
+ if (x < 1)
+ fun_l26_n875(x)
+ else
+ fun_l26_n771(x)
+ end
+end
+
+def fun_l25_n131(x)
+ if (x < 1)
+ fun_l26_n656(x)
+ else
+ fun_l26_n709(x)
+ end
+end
+
+def fun_l25_n132(x)
+ if (x < 1)
+ fun_l26_n733(x)
+ else
+ fun_l26_n343(x)
+ end
+end
+
+def fun_l25_n133(x)
+ if (x < 1)
+ fun_l26_n791(x)
+ else
+ fun_l26_n954(x)
+ end
+end
+
+def fun_l25_n134(x)
+ if (x < 1)
+ fun_l26_n792(x)
+ else
+ fun_l26_n118(x)
+ end
+end
+
+def fun_l25_n135(x)
+ if (x < 1)
+ fun_l26_n93(x)
+ else
+ fun_l26_n683(x)
+ end
+end
+
+def fun_l25_n136(x)
+ if (x < 1)
+ fun_l26_n290(x)
+ else
+ fun_l26_n787(x)
+ end
+end
+
+def fun_l25_n137(x)
+ if (x < 1)
+ fun_l26_n459(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n138(x)
+ if (x < 1)
+ fun_l26_n240(x)
+ else
+ fun_l26_n552(x)
+ end
+end
+
+def fun_l25_n139(x)
+ if (x < 1)
+ fun_l26_n323(x)
+ else
+ fun_l26_n157(x)
+ end
+end
+
+def fun_l25_n140(x)
+ if (x < 1)
+ fun_l26_n926(x)
+ else
+ fun_l26_n446(x)
+ end
+end
+
+def fun_l25_n141(x)
+ if (x < 1)
+ fun_l26_n382(x)
+ else
+ fun_l26_n317(x)
+ end
+end
+
+def fun_l25_n142(x)
+ if (x < 1)
+ fun_l26_n296(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n143(x)
+ if (x < 1)
+ fun_l26_n313(x)
+ else
+ fun_l26_n222(x)
+ end
+end
+
+def fun_l25_n144(x)
+ if (x < 1)
+ fun_l26_n25(x)
+ else
+ fun_l26_n260(x)
+ end
+end
+
+def fun_l25_n145(x)
+ if (x < 1)
+ fun_l26_n457(x)
+ else
+ fun_l26_n876(x)
+ end
+end
+
+def fun_l25_n146(x)
+ if (x < 1)
+ fun_l26_n503(x)
+ else
+ fun_l26_n850(x)
+ end
+end
+
+def fun_l25_n147(x)
+ if (x < 1)
+ fun_l26_n811(x)
+ else
+ fun_l26_n293(x)
+ end
+end
+
+def fun_l25_n148(x)
+ if (x < 1)
+ fun_l26_n433(x)
+ else
+ fun_l26_n582(x)
+ end
+end
+
+def fun_l25_n149(x)
+ if (x < 1)
+ fun_l26_n860(x)
+ else
+ fun_l26_n663(x)
+ end
+end
+
+def fun_l25_n150(x)
+ if (x < 1)
+ fun_l26_n293(x)
+ else
+ fun_l26_n341(x)
+ end
+end
+
+def fun_l25_n151(x)
+ if (x < 1)
+ fun_l26_n187(x)
+ else
+ fun_l26_n430(x)
+ end
+end
+
+def fun_l25_n152(x)
+ if (x < 1)
+ fun_l26_n914(x)
+ else
+ fun_l26_n250(x)
+ end
+end
+
+def fun_l25_n153(x)
+ if (x < 1)
+ fun_l26_n370(x)
+ else
+ fun_l26_n378(x)
+ end
+end
+
+def fun_l25_n154(x)
+ if (x < 1)
+ fun_l26_n238(x)
+ else
+ fun_l26_n743(x)
+ end
+end
+
+def fun_l25_n155(x)
+ if (x < 1)
+ fun_l26_n149(x)
+ else
+ fun_l26_n556(x)
+ end
+end
+
+def fun_l25_n156(x)
+ if (x < 1)
+ fun_l26_n530(x)
+ else
+ fun_l26_n543(x)
+ end
+end
+
+def fun_l25_n157(x)
+ if (x < 1)
+ fun_l26_n230(x)
+ else
+ fun_l26_n600(x)
+ end
+end
+
+def fun_l25_n158(x)
+ if (x < 1)
+ fun_l26_n110(x)
+ else
+ fun_l26_n954(x)
+ end
+end
+
+def fun_l25_n159(x)
+ if (x < 1)
+ fun_l26_n952(x)
+ else
+ fun_l26_n110(x)
+ end
+end
+
+def fun_l25_n160(x)
+ if (x < 1)
+ fun_l26_n525(x)
+ else
+ fun_l26_n435(x)
+ end
+end
+
+def fun_l25_n161(x)
+ if (x < 1)
+ fun_l26_n511(x)
+ else
+ fun_l26_n10(x)
+ end
+end
+
+def fun_l25_n162(x)
+ if (x < 1)
+ fun_l26_n755(x)
+ else
+ fun_l26_n567(x)
+ end
+end
+
+def fun_l25_n163(x)
+ if (x < 1)
+ fun_l26_n618(x)
+ else
+ fun_l26_n249(x)
+ end
+end
+
+def fun_l25_n164(x)
+ if (x < 1)
+ fun_l26_n803(x)
+ else
+ fun_l26_n512(x)
+ end
+end
+
+def fun_l25_n165(x)
+ if (x < 1)
+ fun_l26_n234(x)
+ else
+ fun_l26_n806(x)
+ end
+end
+
+def fun_l25_n166(x)
+ if (x < 1)
+ fun_l26_n442(x)
+ else
+ fun_l26_n904(x)
+ end
+end
+
+def fun_l25_n167(x)
+ if (x < 1)
+ fun_l26_n369(x)
+ else
+ fun_l26_n910(x)
+ end
+end
+
+def fun_l25_n168(x)
+ if (x < 1)
+ fun_l26_n107(x)
+ else
+ fun_l26_n125(x)
+ end
+end
+
+def fun_l25_n169(x)
+ if (x < 1)
+ fun_l26_n415(x)
+ else
+ fun_l26_n37(x)
+ end
+end
+
+def fun_l25_n170(x)
+ if (x < 1)
+ fun_l26_n315(x)
+ else
+ fun_l26_n977(x)
+ end
+end
+
+def fun_l25_n171(x)
+ if (x < 1)
+ fun_l26_n106(x)
+ else
+ fun_l26_n908(x)
+ end
+end
+
+def fun_l25_n172(x)
+ if (x < 1)
+ fun_l26_n870(x)
+ else
+ fun_l26_n74(x)
+ end
+end
+
+def fun_l25_n173(x)
+ if (x < 1)
+ fun_l26_n290(x)
+ else
+ fun_l26_n938(x)
+ end
+end
+
+def fun_l25_n174(x)
+ if (x < 1)
+ fun_l26_n908(x)
+ else
+ fun_l26_n215(x)
+ end
+end
+
+def fun_l25_n175(x)
+ if (x < 1)
+ fun_l26_n671(x)
+ else
+ fun_l26_n976(x)
+ end
+end
+
+def fun_l25_n176(x)
+ if (x < 1)
+ fun_l26_n727(x)
+ else
+ fun_l26_n559(x)
+ end
+end
+
+def fun_l25_n177(x)
+ if (x < 1)
+ fun_l26_n684(x)
+ else
+ fun_l26_n353(x)
+ end
+end
+
+def fun_l25_n178(x)
+ if (x < 1)
+ fun_l26_n353(x)
+ else
+ fun_l26_n327(x)
+ end
+end
+
+def fun_l25_n179(x)
+ if (x < 1)
+ fun_l26_n393(x)
+ else
+ fun_l26_n774(x)
+ end
+end
+
+def fun_l25_n180(x)
+ if (x < 1)
+ fun_l26_n500(x)
+ else
+ fun_l26_n23(x)
+ end
+end
+
+def fun_l25_n181(x)
+ if (x < 1)
+ fun_l26_n49(x)
+ else
+ fun_l26_n504(x)
+ end
+end
+
+def fun_l25_n182(x)
+ if (x < 1)
+ fun_l26_n631(x)
+ else
+ fun_l26_n147(x)
+ end
+end
+
+def fun_l25_n183(x)
+ if (x < 1)
+ fun_l26_n353(x)
+ else
+ fun_l26_n64(x)
+ end
+end
+
+def fun_l25_n184(x)
+ if (x < 1)
+ fun_l26_n215(x)
+ else
+ fun_l26_n416(x)
+ end
+end
+
+def fun_l25_n185(x)
+ if (x < 1)
+ fun_l26_n701(x)
+ else
+ fun_l26_n809(x)
+ end
+end
+
+def fun_l25_n186(x)
+ if (x < 1)
+ fun_l26_n267(x)
+ else
+ fun_l26_n197(x)
+ end
+end
+
+def fun_l25_n187(x)
+ if (x < 1)
+ fun_l26_n436(x)
+ else
+ fun_l26_n609(x)
+ end
+end
+
+def fun_l25_n188(x)
+ if (x < 1)
+ fun_l26_n993(x)
+ else
+ fun_l26_n740(x)
+ end
+end
+
+def fun_l25_n189(x)
+ if (x < 1)
+ fun_l26_n742(x)
+ else
+ fun_l26_n507(x)
+ end
+end
+
+def fun_l25_n190(x)
+ if (x < 1)
+ fun_l26_n850(x)
+ else
+ fun_l26_n394(x)
+ end
+end
+
+def fun_l25_n191(x)
+ if (x < 1)
+ fun_l26_n494(x)
+ else
+ fun_l26_n219(x)
+ end
+end
+
+def fun_l25_n192(x)
+ if (x < 1)
+ fun_l26_n477(x)
+ else
+ fun_l26_n115(x)
+ end
+end
+
+def fun_l25_n193(x)
+ if (x < 1)
+ fun_l26_n629(x)
+ else
+ fun_l26_n772(x)
+ end
+end
+
+def fun_l25_n194(x)
+ if (x < 1)
+ fun_l26_n995(x)
+ else
+ fun_l26_n75(x)
+ end
+end
+
+def fun_l25_n195(x)
+ if (x < 1)
+ fun_l26_n34(x)
+ else
+ fun_l26_n590(x)
+ end
+end
+
+def fun_l25_n196(x)
+ if (x < 1)
+ fun_l26_n767(x)
+ else
+ fun_l26_n468(x)
+ end
+end
+
+def fun_l25_n197(x)
+ if (x < 1)
+ fun_l26_n883(x)
+ else
+ fun_l26_n757(x)
+ end
+end
+
+def fun_l25_n198(x)
+ if (x < 1)
+ fun_l26_n687(x)
+ else
+ fun_l26_n288(x)
+ end
+end
+
+def fun_l25_n199(x)
+ if (x < 1)
+ fun_l26_n328(x)
+ else
+ fun_l26_n556(x)
+ end
+end
+
+def fun_l25_n200(x)
+ if (x < 1)
+ fun_l26_n894(x)
+ else
+ fun_l26_n854(x)
+ end
+end
+
+def fun_l25_n201(x)
+ if (x < 1)
+ fun_l26_n343(x)
+ else
+ fun_l26_n889(x)
+ end
+end
+
+def fun_l25_n202(x)
+ if (x < 1)
+ fun_l26_n430(x)
+ else
+ fun_l26_n935(x)
+ end
+end
+
+def fun_l25_n203(x)
+ if (x < 1)
+ fun_l26_n384(x)
+ else
+ fun_l26_n37(x)
+ end
+end
+
+def fun_l25_n204(x)
+ if (x < 1)
+ fun_l26_n821(x)
+ else
+ fun_l26_n509(x)
+ end
+end
+
+def fun_l25_n205(x)
+ if (x < 1)
+ fun_l26_n985(x)
+ else
+ fun_l26_n877(x)
+ end
+end
+
+def fun_l25_n206(x)
+ if (x < 1)
+ fun_l26_n184(x)
+ else
+ fun_l26_n568(x)
+ end
+end
+
+def fun_l25_n207(x)
+ if (x < 1)
+ fun_l26_n753(x)
+ else
+ fun_l26_n922(x)
+ end
+end
+
+def fun_l25_n208(x)
+ if (x < 1)
+ fun_l26_n454(x)
+ else
+ fun_l26_n499(x)
+ end
+end
+
+def fun_l25_n209(x)
+ if (x < 1)
+ fun_l26_n695(x)
+ else
+ fun_l26_n181(x)
+ end
+end
+
+def fun_l25_n210(x)
+ if (x < 1)
+ fun_l26_n139(x)
+ else
+ fun_l26_n456(x)
+ end
+end
+
+def fun_l25_n211(x)
+ if (x < 1)
+ fun_l26_n745(x)
+ else
+ fun_l26_n447(x)
+ end
+end
+
+def fun_l25_n212(x)
+ if (x < 1)
+ fun_l26_n785(x)
+ else
+ fun_l26_n946(x)
+ end
+end
+
+def fun_l25_n213(x)
+ if (x < 1)
+ fun_l26_n161(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n214(x)
+ if (x < 1)
+ fun_l26_n16(x)
+ else
+ fun_l26_n450(x)
+ end
+end
+
+def fun_l25_n215(x)
+ if (x < 1)
+ fun_l26_n818(x)
+ else
+ fun_l26_n2(x)
+ end
+end
+
+def fun_l25_n216(x)
+ if (x < 1)
+ fun_l26_n242(x)
+ else
+ fun_l26_n691(x)
+ end
+end
+
+def fun_l25_n217(x)
+ if (x < 1)
+ fun_l26_n18(x)
+ else
+ fun_l26_n522(x)
+ end
+end
+
+def fun_l25_n218(x)
+ if (x < 1)
+ fun_l26_n87(x)
+ else
+ fun_l26_n888(x)
+ end
+end
+
+def fun_l25_n219(x)
+ if (x < 1)
+ fun_l26_n317(x)
+ else
+ fun_l26_n593(x)
+ end
+end
+
+def fun_l25_n220(x)
+ if (x < 1)
+ fun_l26_n650(x)
+ else
+ fun_l26_n258(x)
+ end
+end
+
+def fun_l25_n221(x)
+ if (x < 1)
+ fun_l26_n381(x)
+ else
+ fun_l26_n500(x)
+ end
+end
+
+def fun_l25_n222(x)
+ if (x < 1)
+ fun_l26_n607(x)
+ else
+ fun_l26_n138(x)
+ end
+end
+
+def fun_l25_n223(x)
+ if (x < 1)
+ fun_l26_n595(x)
+ else
+ fun_l26_n657(x)
+ end
+end
+
+def fun_l25_n224(x)
+ if (x < 1)
+ fun_l26_n166(x)
+ else
+ fun_l26_n420(x)
+ end
+end
+
+def fun_l25_n225(x)
+ if (x < 1)
+ fun_l26_n744(x)
+ else
+ fun_l26_n684(x)
+ end
+end
+
+def fun_l25_n226(x)
+ if (x < 1)
+ fun_l26_n225(x)
+ else
+ fun_l26_n264(x)
+ end
+end
+
+def fun_l25_n227(x)
+ if (x < 1)
+ fun_l26_n140(x)
+ else
+ fun_l26_n387(x)
+ end
+end
+
+def fun_l25_n228(x)
+ if (x < 1)
+ fun_l26_n563(x)
+ else
+ fun_l26_n83(x)
+ end
+end
+
+def fun_l25_n229(x)
+ if (x < 1)
+ fun_l26_n392(x)
+ else
+ fun_l26_n130(x)
+ end
+end
+
+def fun_l25_n230(x)
+ if (x < 1)
+ fun_l26_n687(x)
+ else
+ fun_l26_n970(x)
+ end
+end
+
+def fun_l25_n231(x)
+ if (x < 1)
+ fun_l26_n328(x)
+ else
+ fun_l26_n809(x)
+ end
+end
+
+def fun_l25_n232(x)
+ if (x < 1)
+ fun_l26_n963(x)
+ else
+ fun_l26_n429(x)
+ end
+end
+
+def fun_l25_n233(x)
+ if (x < 1)
+ fun_l26_n290(x)
+ else
+ fun_l26_n131(x)
+ end
+end
+
+def fun_l25_n234(x)
+ if (x < 1)
+ fun_l26_n877(x)
+ else
+ fun_l26_n729(x)
+ end
+end
+
+def fun_l25_n235(x)
+ if (x < 1)
+ fun_l26_n916(x)
+ else
+ fun_l26_n694(x)
+ end
+end
+
+def fun_l25_n236(x)
+ if (x < 1)
+ fun_l26_n901(x)
+ else
+ fun_l26_n226(x)
+ end
+end
+
+def fun_l25_n237(x)
+ if (x < 1)
+ fun_l26_n65(x)
+ else
+ fun_l26_n748(x)
+ end
+end
+
+def fun_l25_n238(x)
+ if (x < 1)
+ fun_l26_n171(x)
+ else
+ fun_l26_n858(x)
+ end
+end
+
+def fun_l25_n239(x)
+ if (x < 1)
+ fun_l26_n391(x)
+ else
+ fun_l26_n809(x)
+ end
+end
+
+def fun_l25_n240(x)
+ if (x < 1)
+ fun_l26_n336(x)
+ else
+ fun_l26_n391(x)
+ end
+end
+
+def fun_l25_n241(x)
+ if (x < 1)
+ fun_l26_n418(x)
+ else
+ fun_l26_n133(x)
+ end
+end
+
+def fun_l25_n242(x)
+ if (x < 1)
+ fun_l26_n617(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n243(x)
+ if (x < 1)
+ fun_l26_n962(x)
+ else
+ fun_l26_n763(x)
+ end
+end
+
+def fun_l25_n244(x)
+ if (x < 1)
+ fun_l26_n34(x)
+ else
+ fun_l26_n629(x)
+ end
+end
+
+def fun_l25_n245(x)
+ if (x < 1)
+ fun_l26_n444(x)
+ else
+ fun_l26_n271(x)
+ end
+end
+
+def fun_l25_n246(x)
+ if (x < 1)
+ fun_l26_n478(x)
+ else
+ fun_l26_n541(x)
+ end
+end
+
+def fun_l25_n247(x)
+ if (x < 1)
+ fun_l26_n796(x)
+ else
+ fun_l26_n673(x)
+ end
+end
+
+def fun_l25_n248(x)
+ if (x < 1)
+ fun_l26_n400(x)
+ else
+ fun_l26_n602(x)
+ end
+end
+
+def fun_l25_n249(x)
+ if (x < 1)
+ fun_l26_n70(x)
+ else
+ fun_l26_n796(x)
+ end
+end
+
+def fun_l25_n250(x)
+ if (x < 1)
+ fun_l26_n187(x)
+ else
+ fun_l26_n602(x)
+ end
+end
+
+def fun_l25_n251(x)
+ if (x < 1)
+ fun_l26_n29(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n252(x)
+ if (x < 1)
+ fun_l26_n49(x)
+ else
+ fun_l26_n522(x)
+ end
+end
+
+def fun_l25_n253(x)
+ if (x < 1)
+ fun_l26_n998(x)
+ else
+ fun_l26_n986(x)
+ end
+end
+
+def fun_l25_n254(x)
+ if (x < 1)
+ fun_l26_n586(x)
+ else
+ fun_l26_n566(x)
+ end
+end
+
+def fun_l25_n255(x)
+ if (x < 1)
+ fun_l26_n474(x)
+ else
+ fun_l26_n279(x)
+ end
+end
+
+def fun_l25_n256(x)
+ if (x < 1)
+ fun_l26_n769(x)
+ else
+ fun_l26_n240(x)
+ end
+end
+
+def fun_l25_n257(x)
+ if (x < 1)
+ fun_l26_n212(x)
+ else
+ fun_l26_n512(x)
+ end
+end
+
+def fun_l25_n258(x)
+ if (x < 1)
+ fun_l26_n980(x)
+ else
+ fun_l26_n715(x)
+ end
+end
+
+def fun_l25_n259(x)
+ if (x < 1)
+ fun_l26_n237(x)
+ else
+ fun_l26_n355(x)
+ end
+end
+
+def fun_l25_n260(x)
+ if (x < 1)
+ fun_l26_n406(x)
+ else
+ fun_l26_n584(x)
+ end
+end
+
+def fun_l25_n261(x)
+ if (x < 1)
+ fun_l26_n632(x)
+ else
+ fun_l26_n28(x)
+ end
+end
+
+def fun_l25_n262(x)
+ if (x < 1)
+ fun_l26_n481(x)
+ else
+ fun_l26_n303(x)
+ end
+end
+
+def fun_l25_n263(x)
+ if (x < 1)
+ fun_l26_n676(x)
+ else
+ fun_l26_n220(x)
+ end
+end
+
+def fun_l25_n264(x)
+ if (x < 1)
+ fun_l26_n757(x)
+ else
+ fun_l26_n58(x)
+ end
+end
+
+def fun_l25_n265(x)
+ if (x < 1)
+ fun_l26_n525(x)
+ else
+ fun_l26_n168(x)
+ end
+end
+
+def fun_l25_n266(x)
+ if (x < 1)
+ fun_l26_n832(x)
+ else
+ fun_l26_n754(x)
+ end
+end
+
+def fun_l25_n267(x)
+ if (x < 1)
+ fun_l26_n723(x)
+ else
+ fun_l26_n830(x)
+ end
+end
+
+def fun_l25_n268(x)
+ if (x < 1)
+ fun_l26_n171(x)
+ else
+ fun_l26_n411(x)
+ end
+end
+
+def fun_l25_n269(x)
+ if (x < 1)
+ fun_l26_n150(x)
+ else
+ fun_l26_n360(x)
+ end
+end
+
+def fun_l25_n270(x)
+ if (x < 1)
+ fun_l26_n401(x)
+ else
+ fun_l26_n767(x)
+ end
+end
+
+def fun_l25_n271(x)
+ if (x < 1)
+ fun_l26_n462(x)
+ else
+ fun_l26_n305(x)
+ end
+end
+
+def fun_l25_n272(x)
+ if (x < 1)
+ fun_l26_n989(x)
+ else
+ fun_l26_n780(x)
+ end
+end
+
+def fun_l25_n273(x)
+ if (x < 1)
+ fun_l26_n2(x)
+ else
+ fun_l26_n735(x)
+ end
+end
+
+def fun_l25_n274(x)
+ if (x < 1)
+ fun_l26_n646(x)
+ else
+ fun_l26_n30(x)
+ end
+end
+
+def fun_l25_n275(x)
+ if (x < 1)
+ fun_l26_n197(x)
+ else
+ fun_l26_n262(x)
+ end
+end
+
+def fun_l25_n276(x)
+ if (x < 1)
+ fun_l26_n647(x)
+ else
+ fun_l26_n715(x)
+ end
+end
+
+def fun_l25_n277(x)
+ if (x < 1)
+ fun_l26_n597(x)
+ else
+ fun_l26_n228(x)
+ end
+end
+
+def fun_l25_n278(x)
+ if (x < 1)
+ fun_l26_n880(x)
+ else
+ fun_l26_n324(x)
+ end
+end
+
+def fun_l25_n279(x)
+ if (x < 1)
+ fun_l26_n40(x)
+ else
+ fun_l26_n615(x)
+ end
+end
+
+def fun_l25_n280(x)
+ if (x < 1)
+ fun_l26_n697(x)
+ else
+ fun_l26_n671(x)
+ end
+end
+
+def fun_l25_n281(x)
+ if (x < 1)
+ fun_l26_n819(x)
+ else
+ fun_l26_n469(x)
+ end
+end
+
+def fun_l25_n282(x)
+ if (x < 1)
+ fun_l26_n427(x)
+ else
+ fun_l26_n295(x)
+ end
+end
+
+def fun_l25_n283(x)
+ if (x < 1)
+ fun_l26_n35(x)
+ else
+ fun_l26_n432(x)
+ end
+end
+
+def fun_l25_n284(x)
+ if (x < 1)
+ fun_l26_n691(x)
+ else
+ fun_l26_n846(x)
+ end
+end
+
+def fun_l25_n285(x)
+ if (x < 1)
+ fun_l26_n353(x)
+ else
+ fun_l26_n473(x)
+ end
+end
+
+def fun_l25_n286(x)
+ if (x < 1)
+ fun_l26_n959(x)
+ else
+ fun_l26_n608(x)
+ end
+end
+
+def fun_l25_n287(x)
+ if (x < 1)
+ fun_l26_n728(x)
+ else
+ fun_l26_n993(x)
+ end
+end
+
+def fun_l25_n288(x)
+ if (x < 1)
+ fun_l26_n836(x)
+ else
+ fun_l26_n587(x)
+ end
+end
+
+def fun_l25_n289(x)
+ if (x < 1)
+ fun_l26_n300(x)
+ else
+ fun_l26_n965(x)
+ end
+end
+
+def fun_l25_n290(x)
+ if (x < 1)
+ fun_l26_n925(x)
+ else
+ fun_l26_n180(x)
+ end
+end
+
+def fun_l25_n291(x)
+ if (x < 1)
+ fun_l26_n934(x)
+ else
+ fun_l26_n579(x)
+ end
+end
+
+def fun_l25_n292(x)
+ if (x < 1)
+ fun_l26_n97(x)
+ else
+ fun_l26_n33(x)
+ end
+end
+
+def fun_l25_n293(x)
+ if (x < 1)
+ fun_l26_n653(x)
+ else
+ fun_l26_n968(x)
+ end
+end
+
+def fun_l25_n294(x)
+ if (x < 1)
+ fun_l26_n264(x)
+ else
+ fun_l26_n68(x)
+ end
+end
+
+def fun_l25_n295(x)
+ if (x < 1)
+ fun_l26_n420(x)
+ else
+ fun_l26_n450(x)
+ end
+end
+
+def fun_l25_n296(x)
+ if (x < 1)
+ fun_l26_n200(x)
+ else
+ fun_l26_n599(x)
+ end
+end
+
+def fun_l25_n297(x)
+ if (x < 1)
+ fun_l26_n922(x)
+ else
+ fun_l26_n36(x)
+ end
+end
+
+def fun_l25_n298(x)
+ if (x < 1)
+ fun_l26_n741(x)
+ else
+ fun_l26_n743(x)
+ end
+end
+
+def fun_l25_n299(x)
+ if (x < 1)
+ fun_l26_n989(x)
+ else
+ fun_l26_n777(x)
+ end
+end
+
+def fun_l25_n300(x)
+ if (x < 1)
+ fun_l26_n600(x)
+ else
+ fun_l26_n228(x)
+ end
+end
+
+def fun_l25_n301(x)
+ if (x < 1)
+ fun_l26_n493(x)
+ else
+ fun_l26_n852(x)
+ end
+end
+
+def fun_l25_n302(x)
+ if (x < 1)
+ fun_l26_n552(x)
+ else
+ fun_l26_n305(x)
+ end
+end
+
+def fun_l25_n303(x)
+ if (x < 1)
+ fun_l26_n280(x)
+ else
+ fun_l26_n373(x)
+ end
+end
+
+def fun_l25_n304(x)
+ if (x < 1)
+ fun_l26_n379(x)
+ else
+ fun_l26_n877(x)
+ end
+end
+
+def fun_l25_n305(x)
+ if (x < 1)
+ fun_l26_n562(x)
+ else
+ fun_l26_n165(x)
+ end
+end
+
+def fun_l25_n306(x)
+ if (x < 1)
+ fun_l26_n890(x)
+ else
+ fun_l26_n24(x)
+ end
+end
+
+def fun_l25_n307(x)
+ if (x < 1)
+ fun_l26_n881(x)
+ else
+ fun_l26_n936(x)
+ end
+end
+
+def fun_l25_n308(x)
+ if (x < 1)
+ fun_l26_n31(x)
+ else
+ fun_l26_n851(x)
+ end
+end
+
+def fun_l25_n309(x)
+ if (x < 1)
+ fun_l26_n894(x)
+ else
+ fun_l26_n496(x)
+ end
+end
+
+def fun_l25_n310(x)
+ if (x < 1)
+ fun_l26_n477(x)
+ else
+ fun_l26_n436(x)
+ end
+end
+
+def fun_l25_n311(x)
+ if (x < 1)
+ fun_l26_n943(x)
+ else
+ fun_l26_n565(x)
+ end
+end
+
+def fun_l25_n312(x)
+ if (x < 1)
+ fun_l26_n795(x)
+ else
+ fun_l26_n416(x)
+ end
+end
+
+def fun_l25_n313(x)
+ if (x < 1)
+ fun_l26_n264(x)
+ else
+ fun_l26_n528(x)
+ end
+end
+
+def fun_l25_n314(x)
+ if (x < 1)
+ fun_l26_n269(x)
+ else
+ fun_l26_n666(x)
+ end
+end
+
+def fun_l25_n315(x)
+ if (x < 1)
+ fun_l26_n166(x)
+ else
+ fun_l26_n633(x)
+ end
+end
+
+def fun_l25_n316(x)
+ if (x < 1)
+ fun_l26_n463(x)
+ else
+ fun_l26_n82(x)
+ end
+end
+
+def fun_l25_n317(x)
+ if (x < 1)
+ fun_l26_n379(x)
+ else
+ fun_l26_n429(x)
+ end
+end
+
+def fun_l25_n318(x)
+ if (x < 1)
+ fun_l26_n538(x)
+ else
+ fun_l26_n714(x)
+ end
+end
+
+def fun_l25_n319(x)
+ if (x < 1)
+ fun_l26_n913(x)
+ else
+ fun_l26_n584(x)
+ end
+end
+
+def fun_l25_n320(x)
+ if (x < 1)
+ fun_l26_n833(x)
+ else
+ fun_l26_n887(x)
+ end
+end
+
+def fun_l25_n321(x)
+ if (x < 1)
+ fun_l26_n332(x)
+ else
+ fun_l26_n720(x)
+ end
+end
+
+def fun_l25_n322(x)
+ if (x < 1)
+ fun_l26_n409(x)
+ else
+ fun_l26_n924(x)
+ end
+end
+
+def fun_l25_n323(x)
+ if (x < 1)
+ fun_l26_n201(x)
+ else
+ fun_l26_n15(x)
+ end
+end
+
+def fun_l25_n324(x)
+ if (x < 1)
+ fun_l26_n454(x)
+ else
+ fun_l26_n348(x)
+ end
+end
+
+def fun_l25_n325(x)
+ if (x < 1)
+ fun_l26_n798(x)
+ else
+ fun_l26_n310(x)
+ end
+end
+
+def fun_l25_n326(x)
+ if (x < 1)
+ fun_l26_n70(x)
+ else
+ fun_l26_n973(x)
+ end
+end
+
+def fun_l25_n327(x)
+ if (x < 1)
+ fun_l26_n683(x)
+ else
+ fun_l26_n857(x)
+ end
+end
+
+def fun_l25_n328(x)
+ if (x < 1)
+ fun_l26_n885(x)
+ else
+ fun_l26_n855(x)
+ end
+end
+
+def fun_l25_n329(x)
+ if (x < 1)
+ fun_l26_n725(x)
+ else
+ fun_l26_n625(x)
+ end
+end
+
+def fun_l25_n330(x)
+ if (x < 1)
+ fun_l26_n960(x)
+ else
+ fun_l26_n710(x)
+ end
+end
+
+def fun_l25_n331(x)
+ if (x < 1)
+ fun_l26_n899(x)
+ else
+ fun_l26_n671(x)
+ end
+end
+
+def fun_l25_n332(x)
+ if (x < 1)
+ fun_l26_n743(x)
+ else
+ fun_l26_n541(x)
+ end
+end
+
+def fun_l25_n333(x)
+ if (x < 1)
+ fun_l26_n353(x)
+ else
+ fun_l26_n336(x)
+ end
+end
+
+def fun_l25_n334(x)
+ if (x < 1)
+ fun_l26_n53(x)
+ else
+ fun_l26_n422(x)
+ end
+end
+
+def fun_l25_n335(x)
+ if (x < 1)
+ fun_l26_n291(x)
+ else
+ fun_l26_n586(x)
+ end
+end
+
+def fun_l25_n336(x)
+ if (x < 1)
+ fun_l26_n395(x)
+ else
+ fun_l26_n716(x)
+ end
+end
+
+def fun_l25_n337(x)
+ if (x < 1)
+ fun_l26_n655(x)
+ else
+ fun_l26_n590(x)
+ end
+end
+
+def fun_l25_n338(x)
+ if (x < 1)
+ fun_l26_n443(x)
+ else
+ fun_l26_n680(x)
+ end
+end
+
+def fun_l25_n339(x)
+ if (x < 1)
+ fun_l26_n930(x)
+ else
+ fun_l26_n828(x)
+ end
+end
+
+def fun_l25_n340(x)
+ if (x < 1)
+ fun_l26_n488(x)
+ else
+ fun_l26_n514(x)
+ end
+end
+
+def fun_l25_n341(x)
+ if (x < 1)
+ fun_l26_n504(x)
+ else
+ fun_l26_n592(x)
+ end
+end
+
+def fun_l25_n342(x)
+ if (x < 1)
+ fun_l26_n695(x)
+ else
+ fun_l26_n945(x)
+ end
+end
+
+def fun_l25_n343(x)
+ if (x < 1)
+ fun_l26_n483(x)
+ else
+ fun_l26_n511(x)
+ end
+end
+
+def fun_l25_n344(x)
+ if (x < 1)
+ fun_l26_n958(x)
+ else
+ fun_l26_n316(x)
+ end
+end
+
+def fun_l25_n345(x)
+ if (x < 1)
+ fun_l26_n481(x)
+ else
+ fun_l26_n473(x)
+ end
+end
+
+def fun_l25_n346(x)
+ if (x < 1)
+ fun_l26_n340(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n347(x)
+ if (x < 1)
+ fun_l26_n222(x)
+ else
+ fun_l26_n232(x)
+ end
+end
+
+def fun_l25_n348(x)
+ if (x < 1)
+ fun_l26_n162(x)
+ else
+ fun_l26_n846(x)
+ end
+end
+
+def fun_l25_n349(x)
+ if (x < 1)
+ fun_l26_n56(x)
+ else
+ fun_l26_n93(x)
+ end
+end
+
+def fun_l25_n350(x)
+ if (x < 1)
+ fun_l26_n191(x)
+ else
+ fun_l26_n245(x)
+ end
+end
+
+def fun_l25_n351(x)
+ if (x < 1)
+ fun_l26_n294(x)
+ else
+ fun_l26_n494(x)
+ end
+end
+
+def fun_l25_n352(x)
+ if (x < 1)
+ fun_l26_n591(x)
+ else
+ fun_l26_n524(x)
+ end
+end
+
+def fun_l25_n353(x)
+ if (x < 1)
+ fun_l26_n904(x)
+ else
+ fun_l26_n793(x)
+ end
+end
+
+def fun_l25_n354(x)
+ if (x < 1)
+ fun_l26_n1(x)
+ else
+ fun_l26_n432(x)
+ end
+end
+
+def fun_l25_n355(x)
+ if (x < 1)
+ fun_l26_n757(x)
+ else
+ fun_l26_n733(x)
+ end
+end
+
+def fun_l25_n356(x)
+ if (x < 1)
+ fun_l26_n987(x)
+ else
+ fun_l26_n425(x)
+ end
+end
+
+def fun_l25_n357(x)
+ if (x < 1)
+ fun_l26_n288(x)
+ else
+ fun_l26_n587(x)
+ end
+end
+
+def fun_l25_n358(x)
+ if (x < 1)
+ fun_l26_n843(x)
+ else
+ fun_l26_n731(x)
+ end
+end
+
+def fun_l25_n359(x)
+ if (x < 1)
+ fun_l26_n433(x)
+ else
+ fun_l26_n208(x)
+ end
+end
+
+def fun_l25_n360(x)
+ if (x < 1)
+ fun_l26_n473(x)
+ else
+ fun_l26_n992(x)
+ end
+end
+
+def fun_l25_n361(x)
+ if (x < 1)
+ fun_l26_n210(x)
+ else
+ fun_l26_n704(x)
+ end
+end
+
+def fun_l25_n362(x)
+ if (x < 1)
+ fun_l26_n625(x)
+ else
+ fun_l26_n365(x)
+ end
+end
+
+def fun_l25_n363(x)
+ if (x < 1)
+ fun_l26_n55(x)
+ else
+ fun_l26_n555(x)
+ end
+end
+
+def fun_l25_n364(x)
+ if (x < 1)
+ fun_l26_n763(x)
+ else
+ fun_l26_n417(x)
+ end
+end
+
+def fun_l25_n365(x)
+ if (x < 1)
+ fun_l26_n557(x)
+ else
+ fun_l26_n24(x)
+ end
+end
+
+def fun_l25_n366(x)
+ if (x < 1)
+ fun_l26_n791(x)
+ else
+ fun_l26_n753(x)
+ end
+end
+
+def fun_l25_n367(x)
+ if (x < 1)
+ fun_l26_n490(x)
+ else
+ fun_l26_n765(x)
+ end
+end
+
+def fun_l25_n368(x)
+ if (x < 1)
+ fun_l26_n875(x)
+ else
+ fun_l26_n628(x)
+ end
+end
+
+def fun_l25_n369(x)
+ if (x < 1)
+ fun_l26_n544(x)
+ else
+ fun_l26_n234(x)
+ end
+end
+
+def fun_l25_n370(x)
+ if (x < 1)
+ fun_l26_n288(x)
+ else
+ fun_l26_n524(x)
+ end
+end
+
+def fun_l25_n371(x)
+ if (x < 1)
+ fun_l26_n548(x)
+ else
+ fun_l26_n782(x)
+ end
+end
+
+def fun_l25_n372(x)
+ if (x < 1)
+ fun_l26_n112(x)
+ else
+ fun_l26_n861(x)
+ end
+end
+
+def fun_l25_n373(x)
+ if (x < 1)
+ fun_l26_n565(x)
+ else
+ fun_l26_n442(x)
+ end
+end
+
+def fun_l25_n374(x)
+ if (x < 1)
+ fun_l26_n37(x)
+ else
+ fun_l26_n810(x)
+ end
+end
+
+def fun_l25_n375(x)
+ if (x < 1)
+ fun_l26_n384(x)
+ else
+ fun_l26_n103(x)
+ end
+end
+
+def fun_l25_n376(x)
+ if (x < 1)
+ fun_l26_n371(x)
+ else
+ fun_l26_n219(x)
+ end
+end
+
+def fun_l25_n377(x)
+ if (x < 1)
+ fun_l26_n964(x)
+ else
+ fun_l26_n542(x)
+ end
+end
+
+def fun_l25_n378(x)
+ if (x < 1)
+ fun_l26_n617(x)
+ else
+ fun_l26_n616(x)
+ end
+end
+
+def fun_l25_n379(x)
+ if (x < 1)
+ fun_l26_n94(x)
+ else
+ fun_l26_n870(x)
+ end
+end
+
+def fun_l25_n380(x)
+ if (x < 1)
+ fun_l26_n538(x)
+ else
+ fun_l26_n483(x)
+ end
+end
+
+def fun_l25_n381(x)
+ if (x < 1)
+ fun_l26_n395(x)
+ else
+ fun_l26_n873(x)
+ end
+end
+
+def fun_l25_n382(x)
+ if (x < 1)
+ fun_l26_n406(x)
+ else
+ fun_l26_n843(x)
+ end
+end
+
+def fun_l25_n383(x)
+ if (x < 1)
+ fun_l26_n422(x)
+ else
+ fun_l26_n367(x)
+ end
+end
+
+def fun_l25_n384(x)
+ if (x < 1)
+ fun_l26_n472(x)
+ else
+ fun_l26_n676(x)
+ end
+end
+
+def fun_l25_n385(x)
+ if (x < 1)
+ fun_l26_n782(x)
+ else
+ fun_l26_n995(x)
+ end
+end
+
+def fun_l25_n386(x)
+ if (x < 1)
+ fun_l26_n655(x)
+ else
+ fun_l26_n758(x)
+ end
+end
+
+def fun_l25_n387(x)
+ if (x < 1)
+ fun_l26_n665(x)
+ else
+ fun_l26_n775(x)
+ end
+end
+
+def fun_l25_n388(x)
+ if (x < 1)
+ fun_l26_n168(x)
+ else
+ fun_l26_n604(x)
+ end
+end
+
+def fun_l25_n389(x)
+ if (x < 1)
+ fun_l26_n31(x)
+ else
+ fun_l26_n681(x)
+ end
+end
+
+def fun_l25_n390(x)
+ if (x < 1)
+ fun_l26_n758(x)
+ else
+ fun_l26_n596(x)
+ end
+end
+
+def fun_l25_n391(x)
+ if (x < 1)
+ fun_l26_n413(x)
+ else
+ fun_l26_n528(x)
+ end
+end
+
+def fun_l25_n392(x)
+ if (x < 1)
+ fun_l26_n136(x)
+ else
+ fun_l26_n408(x)
+ end
+end
+
+def fun_l25_n393(x)
+ if (x < 1)
+ fun_l26_n493(x)
+ else
+ fun_l26_n182(x)
+ end
+end
+
+def fun_l25_n394(x)
+ if (x < 1)
+ fun_l26_n156(x)
+ else
+ fun_l26_n775(x)
+ end
+end
+
+def fun_l25_n395(x)
+ if (x < 1)
+ fun_l26_n839(x)
+ else
+ fun_l26_n823(x)
+ end
+end
+
+def fun_l25_n396(x)
+ if (x < 1)
+ fun_l26_n248(x)
+ else
+ fun_l26_n679(x)
+ end
+end
+
+def fun_l25_n397(x)
+ if (x < 1)
+ fun_l26_n594(x)
+ else
+ fun_l26_n117(x)
+ end
+end
+
+def fun_l25_n398(x)
+ if (x < 1)
+ fun_l26_n82(x)
+ else
+ fun_l26_n595(x)
+ end
+end
+
+def fun_l25_n399(x)
+ if (x < 1)
+ fun_l26_n978(x)
+ else
+ fun_l26_n391(x)
+ end
+end
+
+def fun_l25_n400(x)
+ if (x < 1)
+ fun_l26_n731(x)
+ else
+ fun_l26_n252(x)
+ end
+end
+
+def fun_l25_n401(x)
+ if (x < 1)
+ fun_l26_n297(x)
+ else
+ fun_l26_n918(x)
+ end
+end
+
+def fun_l25_n402(x)
+ if (x < 1)
+ fun_l26_n745(x)
+ else
+ fun_l26_n972(x)
+ end
+end
+
+def fun_l25_n403(x)
+ if (x < 1)
+ fun_l26_n685(x)
+ else
+ fun_l26_n555(x)
+ end
+end
+
+def fun_l25_n404(x)
+ if (x < 1)
+ fun_l26_n667(x)
+ else
+ fun_l26_n384(x)
+ end
+end
+
+def fun_l25_n405(x)
+ if (x < 1)
+ fun_l26_n330(x)
+ else
+ fun_l26_n440(x)
+ end
+end
+
+def fun_l25_n406(x)
+ if (x < 1)
+ fun_l26_n911(x)
+ else
+ fun_l26_n580(x)
+ end
+end
+
+def fun_l25_n407(x)
+ if (x < 1)
+ fun_l26_n789(x)
+ else
+ fun_l26_n297(x)
+ end
+end
+
+def fun_l25_n408(x)
+ if (x < 1)
+ fun_l26_n879(x)
+ else
+ fun_l26_n201(x)
+ end
+end
+
+def fun_l25_n409(x)
+ if (x < 1)
+ fun_l26_n36(x)
+ else
+ fun_l26_n885(x)
+ end
+end
+
+def fun_l25_n410(x)
+ if (x < 1)
+ fun_l26_n224(x)
+ else
+ fun_l26_n571(x)
+ end
+end
+
+def fun_l25_n411(x)
+ if (x < 1)
+ fun_l26_n395(x)
+ else
+ fun_l26_n640(x)
+ end
+end
+
+def fun_l25_n412(x)
+ if (x < 1)
+ fun_l26_n754(x)
+ else
+ fun_l26_n754(x)
+ end
+end
+
+def fun_l25_n413(x)
+ if (x < 1)
+ fun_l26_n885(x)
+ else
+ fun_l26_n857(x)
+ end
+end
+
+def fun_l25_n414(x)
+ if (x < 1)
+ fun_l26_n464(x)
+ else
+ fun_l26_n44(x)
+ end
+end
+
+def fun_l25_n415(x)
+ if (x < 1)
+ fun_l26_n13(x)
+ else
+ fun_l26_n546(x)
+ end
+end
+
+def fun_l25_n416(x)
+ if (x < 1)
+ fun_l26_n318(x)
+ else
+ fun_l26_n313(x)
+ end
+end
+
+def fun_l25_n417(x)
+ if (x < 1)
+ fun_l26_n98(x)
+ else
+ fun_l26_n139(x)
+ end
+end
+
+def fun_l25_n418(x)
+ if (x < 1)
+ fun_l26_n654(x)
+ else
+ fun_l26_n602(x)
+ end
+end
+
+def fun_l25_n419(x)
+ if (x < 1)
+ fun_l26_n808(x)
+ else
+ fun_l26_n987(x)
+ end
+end
+
+def fun_l25_n420(x)
+ if (x < 1)
+ fun_l26_n878(x)
+ else
+ fun_l26_n36(x)
+ end
+end
+
+def fun_l25_n421(x)
+ if (x < 1)
+ fun_l26_n427(x)
+ else
+ fun_l26_n620(x)
+ end
+end
+
+def fun_l25_n422(x)
+ if (x < 1)
+ fun_l26_n118(x)
+ else
+ fun_l26_n145(x)
+ end
+end
+
+def fun_l25_n423(x)
+ if (x < 1)
+ fun_l26_n131(x)
+ else
+ fun_l26_n520(x)
+ end
+end
+
+def fun_l25_n424(x)
+ if (x < 1)
+ fun_l26_n295(x)
+ else
+ fun_l26_n197(x)
+ end
+end
+
+def fun_l25_n425(x)
+ if (x < 1)
+ fun_l26_n632(x)
+ else
+ fun_l26_n951(x)
+ end
+end
+
+def fun_l25_n426(x)
+ if (x < 1)
+ fun_l26_n92(x)
+ else
+ fun_l26_n96(x)
+ end
+end
+
+def fun_l25_n427(x)
+ if (x < 1)
+ fun_l26_n677(x)
+ else
+ fun_l26_n5(x)
+ end
+end
+
+def fun_l25_n428(x)
+ if (x < 1)
+ fun_l26_n425(x)
+ else
+ fun_l26_n864(x)
+ end
+end
+
+def fun_l25_n429(x)
+ if (x < 1)
+ fun_l26_n187(x)
+ else
+ fun_l26_n62(x)
+ end
+end
+
+def fun_l25_n430(x)
+ if (x < 1)
+ fun_l26_n964(x)
+ else
+ fun_l26_n704(x)
+ end
+end
+
+def fun_l25_n431(x)
+ if (x < 1)
+ fun_l26_n109(x)
+ else
+ fun_l26_n181(x)
+ end
+end
+
+def fun_l25_n432(x)
+ if (x < 1)
+ fun_l26_n620(x)
+ else
+ fun_l26_n484(x)
+ end
+end
+
+def fun_l25_n433(x)
+ if (x < 1)
+ fun_l26_n283(x)
+ else
+ fun_l26_n622(x)
+ end
+end
+
+def fun_l25_n434(x)
+ if (x < 1)
+ fun_l26_n377(x)
+ else
+ fun_l26_n357(x)
+ end
+end
+
+def fun_l25_n435(x)
+ if (x < 1)
+ fun_l26_n375(x)
+ else
+ fun_l26_n346(x)
+ end
+end
+
+def fun_l25_n436(x)
+ if (x < 1)
+ fun_l26_n50(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n437(x)
+ if (x < 1)
+ fun_l26_n348(x)
+ else
+ fun_l26_n465(x)
+ end
+end
+
+def fun_l25_n438(x)
+ if (x < 1)
+ fun_l26_n206(x)
+ else
+ fun_l26_n968(x)
+ end
+end
+
+def fun_l25_n439(x)
+ if (x < 1)
+ fun_l26_n878(x)
+ else
+ fun_l26_n248(x)
+ end
+end
+
+def fun_l25_n440(x)
+ if (x < 1)
+ fun_l26_n469(x)
+ else
+ fun_l26_n842(x)
+ end
+end
+
+def fun_l25_n441(x)
+ if (x < 1)
+ fun_l26_n476(x)
+ else
+ fun_l26_n666(x)
+ end
+end
+
+def fun_l25_n442(x)
+ if (x < 1)
+ fun_l26_n491(x)
+ else
+ fun_l26_n365(x)
+ end
+end
+
+def fun_l25_n443(x)
+ if (x < 1)
+ fun_l26_n412(x)
+ else
+ fun_l26_n308(x)
+ end
+end
+
+def fun_l25_n444(x)
+ if (x < 1)
+ fun_l26_n750(x)
+ else
+ fun_l26_n82(x)
+ end
+end
+
+def fun_l25_n445(x)
+ if (x < 1)
+ fun_l26_n434(x)
+ else
+ fun_l26_n711(x)
+ end
+end
+
+def fun_l25_n446(x)
+ if (x < 1)
+ fun_l26_n698(x)
+ else
+ fun_l26_n407(x)
+ end
+end
+
+def fun_l25_n447(x)
+ if (x < 1)
+ fun_l26_n992(x)
+ else
+ fun_l26_n404(x)
+ end
+end
+
+def fun_l25_n448(x)
+ if (x < 1)
+ fun_l26_n723(x)
+ else
+ fun_l26_n317(x)
+ end
+end
+
+def fun_l25_n449(x)
+ if (x < 1)
+ fun_l26_n582(x)
+ else
+ fun_l26_n384(x)
+ end
+end
+
+def fun_l25_n450(x)
+ if (x < 1)
+ fun_l26_n956(x)
+ else
+ fun_l26_n111(x)
+ end
+end
+
+def fun_l25_n451(x)
+ if (x < 1)
+ fun_l26_n506(x)
+ else
+ fun_l26_n775(x)
+ end
+end
+
+def fun_l25_n452(x)
+ if (x < 1)
+ fun_l26_n857(x)
+ else
+ fun_l26_n884(x)
+ end
+end
+
+def fun_l25_n453(x)
+ if (x < 1)
+ fun_l26_n889(x)
+ else
+ fun_l26_n471(x)
+ end
+end
+
+def fun_l25_n454(x)
+ if (x < 1)
+ fun_l26_n850(x)
+ else
+ fun_l26_n204(x)
+ end
+end
+
+def fun_l25_n455(x)
+ if (x < 1)
+ fun_l26_n244(x)
+ else
+ fun_l26_n507(x)
+ end
+end
+
+def fun_l25_n456(x)
+ if (x < 1)
+ fun_l26_n875(x)
+ else
+ fun_l26_n694(x)
+ end
+end
+
+def fun_l25_n457(x)
+ if (x < 1)
+ fun_l26_n517(x)
+ else
+ fun_l26_n64(x)
+ end
+end
+
+def fun_l25_n458(x)
+ if (x < 1)
+ fun_l26_n870(x)
+ else
+ fun_l26_n495(x)
+ end
+end
+
+def fun_l25_n459(x)
+ if (x < 1)
+ fun_l26_n577(x)
+ else
+ fun_l26_n42(x)
+ end
+end
+
+def fun_l25_n460(x)
+ if (x < 1)
+ fun_l26_n919(x)
+ else
+ fun_l26_n508(x)
+ end
+end
+
+def fun_l25_n461(x)
+ if (x < 1)
+ fun_l26_n334(x)
+ else
+ fun_l26_n720(x)
+ end
+end
+
+def fun_l25_n462(x)
+ if (x < 1)
+ fun_l26_n682(x)
+ else
+ fun_l26_n422(x)
+ end
+end
+
+def fun_l25_n463(x)
+ if (x < 1)
+ fun_l26_n415(x)
+ else
+ fun_l26_n505(x)
+ end
+end
+
+def fun_l25_n464(x)
+ if (x < 1)
+ fun_l26_n783(x)
+ else
+ fun_l26_n269(x)
+ end
+end
+
+def fun_l25_n465(x)
+ if (x < 1)
+ fun_l26_n797(x)
+ else
+ fun_l26_n780(x)
+ end
+end
+
+def fun_l25_n466(x)
+ if (x < 1)
+ fun_l26_n806(x)
+ else
+ fun_l26_n773(x)
+ end
+end
+
+def fun_l25_n467(x)
+ if (x < 1)
+ fun_l26_n922(x)
+ else
+ fun_l26_n45(x)
+ end
+end
+
+def fun_l25_n468(x)
+ if (x < 1)
+ fun_l26_n919(x)
+ else
+ fun_l26_n780(x)
+ end
+end
+
+def fun_l25_n469(x)
+ if (x < 1)
+ fun_l26_n354(x)
+ else
+ fun_l26_n360(x)
+ end
+end
+
+def fun_l25_n470(x)
+ if (x < 1)
+ fun_l26_n492(x)
+ else
+ fun_l26_n230(x)
+ end
+end
+
+def fun_l25_n471(x)
+ if (x < 1)
+ fun_l26_n1(x)
+ else
+ fun_l26_n845(x)
+ end
+end
+
+def fun_l25_n472(x)
+ if (x < 1)
+ fun_l26_n854(x)
+ else
+ fun_l26_n408(x)
+ end
+end
+
+def fun_l25_n473(x)
+ if (x < 1)
+ fun_l26_n17(x)
+ else
+ fun_l26_n570(x)
+ end
+end
+
+def fun_l25_n474(x)
+ if (x < 1)
+ fun_l26_n485(x)
+ else
+ fun_l26_n953(x)
+ end
+end
+
+def fun_l25_n475(x)
+ if (x < 1)
+ fun_l26_n398(x)
+ else
+ fun_l26_n712(x)
+ end
+end
+
+def fun_l25_n476(x)
+ if (x < 1)
+ fun_l26_n499(x)
+ else
+ fun_l26_n218(x)
+ end
+end
+
+def fun_l25_n477(x)
+ if (x < 1)
+ fun_l26_n107(x)
+ else
+ fun_l26_n38(x)
+ end
+end
+
+def fun_l25_n478(x)
+ if (x < 1)
+ fun_l26_n234(x)
+ else
+ fun_l26_n718(x)
+ end
+end
+
+def fun_l25_n479(x)
+ if (x < 1)
+ fun_l26_n396(x)
+ else
+ fun_l26_n247(x)
+ end
+end
+
+def fun_l25_n480(x)
+ if (x < 1)
+ fun_l26_n457(x)
+ else
+ fun_l26_n259(x)
+ end
+end
+
+def fun_l25_n481(x)
+ if (x < 1)
+ fun_l26_n581(x)
+ else
+ fun_l26_n512(x)
+ end
+end
+
+def fun_l25_n482(x)
+ if (x < 1)
+ fun_l26_n262(x)
+ else
+ fun_l26_n790(x)
+ end
+end
+
+def fun_l25_n483(x)
+ if (x < 1)
+ fun_l26_n140(x)
+ else
+ fun_l26_n821(x)
+ end
+end
+
+def fun_l25_n484(x)
+ if (x < 1)
+ fun_l26_n133(x)
+ else
+ fun_l26_n863(x)
+ end
+end
+
+def fun_l25_n485(x)
+ if (x < 1)
+ fun_l26_n440(x)
+ else
+ fun_l26_n265(x)
+ end
+end
+
+def fun_l25_n486(x)
+ if (x < 1)
+ fun_l26_n913(x)
+ else
+ fun_l26_n994(x)
+ end
+end
+
+def fun_l25_n487(x)
+ if (x < 1)
+ fun_l26_n186(x)
+ else
+ fun_l26_n433(x)
+ end
+end
+
+def fun_l25_n488(x)
+ if (x < 1)
+ fun_l26_n357(x)
+ else
+ fun_l26_n16(x)
+ end
+end
+
+def fun_l25_n489(x)
+ if (x < 1)
+ fun_l26_n165(x)
+ else
+ fun_l26_n674(x)
+ end
+end
+
+def fun_l25_n490(x)
+ if (x < 1)
+ fun_l26_n772(x)
+ else
+ fun_l26_n749(x)
+ end
+end
+
+def fun_l25_n491(x)
+ if (x < 1)
+ fun_l26_n677(x)
+ else
+ fun_l26_n36(x)
+ end
+end
+
+def fun_l25_n492(x)
+ if (x < 1)
+ fun_l26_n962(x)
+ else
+ fun_l26_n750(x)
+ end
+end
+
+def fun_l25_n493(x)
+ if (x < 1)
+ fun_l26_n22(x)
+ else
+ fun_l26_n657(x)
+ end
+end
+
+def fun_l25_n494(x)
+ if (x < 1)
+ fun_l26_n302(x)
+ else
+ fun_l26_n394(x)
+ end
+end
+
+def fun_l25_n495(x)
+ if (x < 1)
+ fun_l26_n313(x)
+ else
+ fun_l26_n552(x)
+ end
+end
+
+def fun_l25_n496(x)
+ if (x < 1)
+ fun_l26_n946(x)
+ else
+ fun_l26_n447(x)
+ end
+end
+
+def fun_l25_n497(x)
+ if (x < 1)
+ fun_l26_n565(x)
+ else
+ fun_l26_n242(x)
+ end
+end
+
+def fun_l25_n498(x)
+ if (x < 1)
+ fun_l26_n932(x)
+ else
+ fun_l26_n413(x)
+ end
+end
+
+def fun_l25_n499(x)
+ if (x < 1)
+ fun_l26_n751(x)
+ else
+ fun_l26_n921(x)
+ end
+end
+
+def fun_l25_n500(x)
+ if (x < 1)
+ fun_l26_n1(x)
+ else
+ fun_l26_n722(x)
+ end
+end
+
+def fun_l25_n501(x)
+ if (x < 1)
+ fun_l26_n63(x)
+ else
+ fun_l26_n205(x)
+ end
+end
+
+def fun_l25_n502(x)
+ if (x < 1)
+ fun_l26_n67(x)
+ else
+ fun_l26_n638(x)
+ end
+end
+
+def fun_l25_n503(x)
+ if (x < 1)
+ fun_l26_n762(x)
+ else
+ fun_l26_n688(x)
+ end
+end
+
+def fun_l25_n504(x)
+ if (x < 1)
+ fun_l26_n839(x)
+ else
+ fun_l26_n775(x)
+ end
+end
+
+def fun_l25_n505(x)
+ if (x < 1)
+ fun_l26_n773(x)
+ else
+ fun_l26_n986(x)
+ end
+end
+
+def fun_l25_n506(x)
+ if (x < 1)
+ fun_l26_n934(x)
+ else
+ fun_l26_n117(x)
+ end
+end
+
+def fun_l25_n507(x)
+ if (x < 1)
+ fun_l26_n507(x)
+ else
+ fun_l26_n217(x)
+ end
+end
+
+def fun_l25_n508(x)
+ if (x < 1)
+ fun_l26_n833(x)
+ else
+ fun_l26_n779(x)
+ end
+end
+
+def fun_l25_n509(x)
+ if (x < 1)
+ fun_l26_n244(x)
+ else
+ fun_l26_n71(x)
+ end
+end
+
+def fun_l25_n510(x)
+ if (x < 1)
+ fun_l26_n466(x)
+ else
+ fun_l26_n440(x)
+ end
+end
+
+def fun_l25_n511(x)
+ if (x < 1)
+ fun_l26_n829(x)
+ else
+ fun_l26_n459(x)
+ end
+end
+
+def fun_l25_n512(x)
+ if (x < 1)
+ fun_l26_n923(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n513(x)
+ if (x < 1)
+ fun_l26_n925(x)
+ else
+ fun_l26_n758(x)
+ end
+end
+
+def fun_l25_n514(x)
+ if (x < 1)
+ fun_l26_n782(x)
+ else
+ fun_l26_n157(x)
+ end
+end
+
+def fun_l25_n515(x)
+ if (x < 1)
+ fun_l26_n987(x)
+ else
+ fun_l26_n407(x)
+ end
+end
+
+def fun_l25_n516(x)
+ if (x < 1)
+ fun_l26_n224(x)
+ else
+ fun_l26_n531(x)
+ end
+end
+
+def fun_l25_n517(x)
+ if (x < 1)
+ fun_l26_n222(x)
+ else
+ fun_l26_n141(x)
+ end
+end
+
+def fun_l25_n518(x)
+ if (x < 1)
+ fun_l26_n723(x)
+ else
+ fun_l26_n787(x)
+ end
+end
+
+def fun_l25_n519(x)
+ if (x < 1)
+ fun_l26_n802(x)
+ else
+ fun_l26_n448(x)
+ end
+end
+
+def fun_l25_n520(x)
+ if (x < 1)
+ fun_l26_n152(x)
+ else
+ fun_l26_n666(x)
+ end
+end
+
+def fun_l25_n521(x)
+ if (x < 1)
+ fun_l26_n476(x)
+ else
+ fun_l26_n7(x)
+ end
+end
+
+def fun_l25_n522(x)
+ if (x < 1)
+ fun_l26_n523(x)
+ else
+ fun_l26_n326(x)
+ end
+end
+
+def fun_l25_n523(x)
+ if (x < 1)
+ fun_l26_n432(x)
+ else
+ fun_l26_n525(x)
+ end
+end
+
+def fun_l25_n524(x)
+ if (x < 1)
+ fun_l26_n403(x)
+ else
+ fun_l26_n983(x)
+ end
+end
+
+def fun_l25_n525(x)
+ if (x < 1)
+ fun_l26_n681(x)
+ else
+ fun_l26_n326(x)
+ end
+end
+
+def fun_l25_n526(x)
+ if (x < 1)
+ fun_l26_n352(x)
+ else
+ fun_l26_n402(x)
+ end
+end
+
+def fun_l25_n527(x)
+ if (x < 1)
+ fun_l26_n870(x)
+ else
+ fun_l26_n181(x)
+ end
+end
+
+def fun_l25_n528(x)
+ if (x < 1)
+ fun_l26_n382(x)
+ else
+ fun_l26_n880(x)
+ end
+end
+
+def fun_l25_n529(x)
+ if (x < 1)
+ fun_l26_n337(x)
+ else
+ fun_l26_n616(x)
+ end
+end
+
+def fun_l25_n530(x)
+ if (x < 1)
+ fun_l26_n959(x)
+ else
+ fun_l26_n239(x)
+ end
+end
+
+def fun_l25_n531(x)
+ if (x < 1)
+ fun_l26_n57(x)
+ else
+ fun_l26_n896(x)
+ end
+end
+
+def fun_l25_n532(x)
+ if (x < 1)
+ fun_l26_n456(x)
+ else
+ fun_l26_n365(x)
+ end
+end
+
+def fun_l25_n533(x)
+ if (x < 1)
+ fun_l26_n73(x)
+ else
+ fun_l26_n420(x)
+ end
+end
+
+def fun_l25_n534(x)
+ if (x < 1)
+ fun_l26_n295(x)
+ else
+ fun_l26_n663(x)
+ end
+end
+
+def fun_l25_n535(x)
+ if (x < 1)
+ fun_l26_n881(x)
+ else
+ fun_l26_n391(x)
+ end
+end
+
+def fun_l25_n536(x)
+ if (x < 1)
+ fun_l26_n775(x)
+ else
+ fun_l26_n19(x)
+ end
+end
+
+def fun_l25_n537(x)
+ if (x < 1)
+ fun_l26_n954(x)
+ else
+ fun_l26_n97(x)
+ end
+end
+
+def fun_l25_n538(x)
+ if (x < 1)
+ fun_l26_n764(x)
+ else
+ fun_l26_n353(x)
+ end
+end
+
+def fun_l25_n539(x)
+ if (x < 1)
+ fun_l26_n220(x)
+ else
+ fun_l26_n958(x)
+ end
+end
+
+def fun_l25_n540(x)
+ if (x < 1)
+ fun_l26_n915(x)
+ else
+ fun_l26_n792(x)
+ end
+end
+
+def fun_l25_n541(x)
+ if (x < 1)
+ fun_l26_n880(x)
+ else
+ fun_l26_n374(x)
+ end
+end
+
+def fun_l25_n542(x)
+ if (x < 1)
+ fun_l26_n655(x)
+ else
+ fun_l26_n578(x)
+ end
+end
+
+def fun_l25_n543(x)
+ if (x < 1)
+ fun_l26_n862(x)
+ else
+ fun_l26_n177(x)
+ end
+end
+
+def fun_l25_n544(x)
+ if (x < 1)
+ fun_l26_n286(x)
+ else
+ fun_l26_n670(x)
+ end
+end
+
+def fun_l25_n545(x)
+ if (x < 1)
+ fun_l26_n862(x)
+ else
+ fun_l26_n45(x)
+ end
+end
+
+def fun_l25_n546(x)
+ if (x < 1)
+ fun_l26_n743(x)
+ else
+ fun_l26_n575(x)
+ end
+end
+
+def fun_l25_n547(x)
+ if (x < 1)
+ fun_l26_n909(x)
+ else
+ fun_l26_n457(x)
+ end
+end
+
+def fun_l25_n548(x)
+ if (x < 1)
+ fun_l26_n784(x)
+ else
+ fun_l26_n482(x)
+ end
+end
+
+def fun_l25_n549(x)
+ if (x < 1)
+ fun_l26_n381(x)
+ else
+ fun_l26_n560(x)
+ end
+end
+
+def fun_l25_n550(x)
+ if (x < 1)
+ fun_l26_n62(x)
+ else
+ fun_l26_n640(x)
+ end
+end
+
+def fun_l25_n551(x)
+ if (x < 1)
+ fun_l26_n714(x)
+ else
+ fun_l26_n898(x)
+ end
+end
+
+def fun_l25_n552(x)
+ if (x < 1)
+ fun_l26_n515(x)
+ else
+ fun_l26_n221(x)
+ end
+end
+
+def fun_l25_n553(x)
+ if (x < 1)
+ fun_l26_n217(x)
+ else
+ fun_l26_n932(x)
+ end
+end
+
+def fun_l25_n554(x)
+ if (x < 1)
+ fun_l26_n583(x)
+ else
+ fun_l26_n722(x)
+ end
+end
+
+def fun_l25_n555(x)
+ if (x < 1)
+ fun_l26_n398(x)
+ else
+ fun_l26_n503(x)
+ end
+end
+
+def fun_l25_n556(x)
+ if (x < 1)
+ fun_l26_n891(x)
+ else
+ fun_l26_n72(x)
+ end
+end
+
+def fun_l25_n557(x)
+ if (x < 1)
+ fun_l26_n367(x)
+ else
+ fun_l26_n141(x)
+ end
+end
+
+def fun_l25_n558(x)
+ if (x < 1)
+ fun_l26_n477(x)
+ else
+ fun_l26_n40(x)
+ end
+end
+
+def fun_l25_n559(x)
+ if (x < 1)
+ fun_l26_n156(x)
+ else
+ fun_l26_n491(x)
+ end
+end
+
+def fun_l25_n560(x)
+ if (x < 1)
+ fun_l26_n859(x)
+ else
+ fun_l26_n423(x)
+ end
+end
+
+def fun_l25_n561(x)
+ if (x < 1)
+ fun_l26_n693(x)
+ else
+ fun_l26_n281(x)
+ end
+end
+
+def fun_l25_n562(x)
+ if (x < 1)
+ fun_l26_n460(x)
+ else
+ fun_l26_n151(x)
+ end
+end
+
+def fun_l25_n563(x)
+ if (x < 1)
+ fun_l26_n14(x)
+ else
+ fun_l26_n395(x)
+ end
+end
+
+def fun_l25_n564(x)
+ if (x < 1)
+ fun_l26_n423(x)
+ else
+ fun_l26_n198(x)
+ end
+end
+
+def fun_l25_n565(x)
+ if (x < 1)
+ fun_l26_n911(x)
+ else
+ fun_l26_n841(x)
+ end
+end
+
+def fun_l25_n566(x)
+ if (x < 1)
+ fun_l26_n273(x)
+ else
+ fun_l26_n361(x)
+ end
+end
+
+def fun_l25_n567(x)
+ if (x < 1)
+ fun_l26_n94(x)
+ else
+ fun_l26_n932(x)
+ end
+end
+
+def fun_l25_n568(x)
+ if (x < 1)
+ fun_l26_n734(x)
+ else
+ fun_l26_n191(x)
+ end
+end
+
+def fun_l25_n569(x)
+ if (x < 1)
+ fun_l26_n699(x)
+ else
+ fun_l26_n496(x)
+ end
+end
+
+def fun_l25_n570(x)
+ if (x < 1)
+ fun_l26_n90(x)
+ else
+ fun_l26_n574(x)
+ end
+end
+
+def fun_l25_n571(x)
+ if (x < 1)
+ fun_l26_n818(x)
+ else
+ fun_l26_n529(x)
+ end
+end
+
+def fun_l25_n572(x)
+ if (x < 1)
+ fun_l26_n459(x)
+ else
+ fun_l26_n770(x)
+ end
+end
+
+def fun_l25_n573(x)
+ if (x < 1)
+ fun_l26_n725(x)
+ else
+ fun_l26_n896(x)
+ end
+end
+
+def fun_l25_n574(x)
+ if (x < 1)
+ fun_l26_n773(x)
+ else
+ fun_l26_n8(x)
+ end
+end
+
+def fun_l25_n575(x)
+ if (x < 1)
+ fun_l26_n582(x)
+ else
+ fun_l26_n274(x)
+ end
+end
+
+def fun_l25_n576(x)
+ if (x < 1)
+ fun_l26_n529(x)
+ else
+ fun_l26_n434(x)
+ end
+end
+
+def fun_l25_n577(x)
+ if (x < 1)
+ fun_l26_n197(x)
+ else
+ fun_l26_n88(x)
+ end
+end
+
+def fun_l25_n578(x)
+ if (x < 1)
+ fun_l26_n938(x)
+ else
+ fun_l26_n184(x)
+ end
+end
+
+def fun_l25_n579(x)
+ if (x < 1)
+ fun_l26_n801(x)
+ else
+ fun_l26_n990(x)
+ end
+end
+
+def fun_l25_n580(x)
+ if (x < 1)
+ fun_l26_n732(x)
+ else
+ fun_l26_n955(x)
+ end
+end
+
+def fun_l25_n581(x)
+ if (x < 1)
+ fun_l26_n130(x)
+ else
+ fun_l26_n167(x)
+ end
+end
+
+def fun_l25_n582(x)
+ if (x < 1)
+ fun_l26_n942(x)
+ else
+ fun_l26_n352(x)
+ end
+end
+
+def fun_l25_n583(x)
+ if (x < 1)
+ fun_l26_n673(x)
+ else
+ fun_l26_n613(x)
+ end
+end
+
+def fun_l25_n584(x)
+ if (x < 1)
+ fun_l26_n386(x)
+ else
+ fun_l26_n840(x)
+ end
+end
+
+def fun_l25_n585(x)
+ if (x < 1)
+ fun_l26_n847(x)
+ else
+ fun_l26_n372(x)
+ end
+end
+
+def fun_l25_n586(x)
+ if (x < 1)
+ fun_l26_n0(x)
+ else
+ fun_l26_n717(x)
+ end
+end
+
+def fun_l25_n587(x)
+ if (x < 1)
+ fun_l26_n403(x)
+ else
+ fun_l26_n689(x)
+ end
+end
+
+def fun_l25_n588(x)
+ if (x < 1)
+ fun_l26_n325(x)
+ else
+ fun_l26_n75(x)
+ end
+end
+
+def fun_l25_n589(x)
+ if (x < 1)
+ fun_l26_n653(x)
+ else
+ fun_l26_n993(x)
+ end
+end
+
+def fun_l25_n590(x)
+ if (x < 1)
+ fun_l26_n413(x)
+ else
+ fun_l26_n428(x)
+ end
+end
+
+def fun_l25_n591(x)
+ if (x < 1)
+ fun_l26_n93(x)
+ else
+ fun_l26_n264(x)
+ end
+end
+
+def fun_l25_n592(x)
+ if (x < 1)
+ fun_l26_n117(x)
+ else
+ fun_l26_n466(x)
+ end
+end
+
+def fun_l25_n593(x)
+ if (x < 1)
+ fun_l26_n463(x)
+ else
+ fun_l26_n270(x)
+ end
+end
+
+def fun_l25_n594(x)
+ if (x < 1)
+ fun_l26_n348(x)
+ else
+ fun_l26_n844(x)
+ end
+end
+
+def fun_l25_n595(x)
+ if (x < 1)
+ fun_l26_n939(x)
+ else
+ fun_l26_n891(x)
+ end
+end
+
+def fun_l25_n596(x)
+ if (x < 1)
+ fun_l26_n949(x)
+ else
+ fun_l26_n743(x)
+ end
+end
+
+def fun_l25_n597(x)
+ if (x < 1)
+ fun_l26_n884(x)
+ else
+ fun_l26_n831(x)
+ end
+end
+
+def fun_l25_n598(x)
+ if (x < 1)
+ fun_l26_n910(x)
+ else
+ fun_l26_n79(x)
+ end
+end
+
+def fun_l25_n599(x)
+ if (x < 1)
+ fun_l26_n491(x)
+ else
+ fun_l26_n727(x)
+ end
+end
+
+def fun_l25_n600(x)
+ if (x < 1)
+ fun_l26_n295(x)
+ else
+ fun_l26_n929(x)
+ end
+end
+
+def fun_l25_n601(x)
+ if (x < 1)
+ fun_l26_n130(x)
+ else
+ fun_l26_n35(x)
+ end
+end
+
+def fun_l25_n602(x)
+ if (x < 1)
+ fun_l26_n673(x)
+ else
+ fun_l26_n103(x)
+ end
+end
+
+def fun_l25_n603(x)
+ if (x < 1)
+ fun_l26_n669(x)
+ else
+ fun_l26_n449(x)
+ end
+end
+
+def fun_l25_n604(x)
+ if (x < 1)
+ fun_l26_n201(x)
+ else
+ fun_l26_n616(x)
+ end
+end
+
+def fun_l25_n605(x)
+ if (x < 1)
+ fun_l26_n326(x)
+ else
+ fun_l26_n718(x)
+ end
+end
+
+def fun_l25_n606(x)
+ if (x < 1)
+ fun_l26_n857(x)
+ else
+ fun_l26_n188(x)
+ end
+end
+
+def fun_l25_n607(x)
+ if (x < 1)
+ fun_l26_n351(x)
+ else
+ fun_l26_n688(x)
+ end
+end
+
+def fun_l25_n608(x)
+ if (x < 1)
+ fun_l26_n652(x)
+ else
+ fun_l26_n280(x)
+ end
+end
+
+def fun_l25_n609(x)
+ if (x < 1)
+ fun_l26_n994(x)
+ else
+ fun_l26_n341(x)
+ end
+end
+
+def fun_l25_n610(x)
+ if (x < 1)
+ fun_l26_n876(x)
+ else
+ fun_l26_n643(x)
+ end
+end
+
+def fun_l25_n611(x)
+ if (x < 1)
+ fun_l26_n825(x)
+ else
+ fun_l26_n306(x)
+ end
+end
+
+def fun_l25_n612(x)
+ if (x < 1)
+ fun_l26_n139(x)
+ else
+ fun_l26_n452(x)
+ end
+end
+
+def fun_l25_n613(x)
+ if (x < 1)
+ fun_l26_n689(x)
+ else
+ fun_l26_n818(x)
+ end
+end
+
+def fun_l25_n614(x)
+ if (x < 1)
+ fun_l26_n171(x)
+ else
+ fun_l26_n366(x)
+ end
+end
+
+def fun_l25_n615(x)
+ if (x < 1)
+ fun_l26_n658(x)
+ else
+ fun_l26_n603(x)
+ end
+end
+
+def fun_l25_n616(x)
+ if (x < 1)
+ fun_l26_n150(x)
+ else
+ fun_l26_n603(x)
+ end
+end
+
+def fun_l25_n617(x)
+ if (x < 1)
+ fun_l26_n432(x)
+ else
+ fun_l26_n391(x)
+ end
+end
+
+def fun_l25_n618(x)
+ if (x < 1)
+ fun_l26_n79(x)
+ else
+ fun_l26_n416(x)
+ end
+end
+
+def fun_l25_n619(x)
+ if (x < 1)
+ fun_l26_n494(x)
+ else
+ fun_l26_n355(x)
+ end
+end
+
+def fun_l25_n620(x)
+ if (x < 1)
+ fun_l26_n868(x)
+ else
+ fun_l26_n461(x)
+ end
+end
+
+def fun_l25_n621(x)
+ if (x < 1)
+ fun_l26_n954(x)
+ else
+ fun_l26_n31(x)
+ end
+end
+
+def fun_l25_n622(x)
+ if (x < 1)
+ fun_l26_n620(x)
+ else
+ fun_l26_n777(x)
+ end
+end
+
+def fun_l25_n623(x)
+ if (x < 1)
+ fun_l26_n938(x)
+ else
+ fun_l26_n339(x)
+ end
+end
+
+def fun_l25_n624(x)
+ if (x < 1)
+ fun_l26_n385(x)
+ else
+ fun_l26_n462(x)
+ end
+end
+
+def fun_l25_n625(x)
+ if (x < 1)
+ fun_l26_n83(x)
+ else
+ fun_l26_n351(x)
+ end
+end
+
+def fun_l25_n626(x)
+ if (x < 1)
+ fun_l26_n317(x)
+ else
+ fun_l26_n16(x)
+ end
+end
+
+def fun_l25_n627(x)
+ if (x < 1)
+ fun_l26_n321(x)
+ else
+ fun_l26_n955(x)
+ end
+end
+
+def fun_l25_n628(x)
+ if (x < 1)
+ fun_l26_n649(x)
+ else
+ fun_l26_n195(x)
+ end
+end
+
+def fun_l25_n629(x)
+ if (x < 1)
+ fun_l26_n351(x)
+ else
+ fun_l26_n429(x)
+ end
+end
+
+def fun_l25_n630(x)
+ if (x < 1)
+ fun_l26_n338(x)
+ else
+ fun_l26_n334(x)
+ end
+end
+
+def fun_l25_n631(x)
+ if (x < 1)
+ fun_l26_n355(x)
+ else
+ fun_l26_n782(x)
+ end
+end
+
+def fun_l25_n632(x)
+ if (x < 1)
+ fun_l26_n619(x)
+ else
+ fun_l26_n189(x)
+ end
+end
+
+def fun_l25_n633(x)
+ if (x < 1)
+ fun_l26_n818(x)
+ else
+ fun_l26_n740(x)
+ end
+end
+
+def fun_l25_n634(x)
+ if (x < 1)
+ fun_l26_n725(x)
+ else
+ fun_l26_n114(x)
+ end
+end
+
+def fun_l25_n635(x)
+ if (x < 1)
+ fun_l26_n948(x)
+ else
+ fun_l26_n587(x)
+ end
+end
+
+def fun_l25_n636(x)
+ if (x < 1)
+ fun_l26_n268(x)
+ else
+ fun_l26_n871(x)
+ end
+end
+
+def fun_l25_n637(x)
+ if (x < 1)
+ fun_l26_n128(x)
+ else
+ fun_l26_n5(x)
+ end
+end
+
+def fun_l25_n638(x)
+ if (x < 1)
+ fun_l26_n981(x)
+ else
+ fun_l26_n209(x)
+ end
+end
+
+def fun_l25_n639(x)
+ if (x < 1)
+ fun_l26_n729(x)
+ else
+ fun_l26_n786(x)
+ end
+end
+
+def fun_l25_n640(x)
+ if (x < 1)
+ fun_l26_n86(x)
+ else
+ fun_l26_n320(x)
+ end
+end
+
+def fun_l25_n641(x)
+ if (x < 1)
+ fun_l26_n59(x)
+ else
+ fun_l26_n457(x)
+ end
+end
+
+def fun_l25_n642(x)
+ if (x < 1)
+ fun_l26_n517(x)
+ else
+ fun_l26_n249(x)
+ end
+end
+
+def fun_l25_n643(x)
+ if (x < 1)
+ fun_l26_n528(x)
+ else
+ fun_l26_n754(x)
+ end
+end
+
+def fun_l25_n644(x)
+ if (x < 1)
+ fun_l26_n254(x)
+ else
+ fun_l26_n886(x)
+ end
+end
+
+def fun_l25_n645(x)
+ if (x < 1)
+ fun_l26_n244(x)
+ else
+ fun_l26_n364(x)
+ end
+end
+
+def fun_l25_n646(x)
+ if (x < 1)
+ fun_l26_n550(x)
+ else
+ fun_l26_n877(x)
+ end
+end
+
+def fun_l25_n647(x)
+ if (x < 1)
+ fun_l26_n274(x)
+ else
+ fun_l26_n712(x)
+ end
+end
+
+def fun_l25_n648(x)
+ if (x < 1)
+ fun_l26_n299(x)
+ else
+ fun_l26_n957(x)
+ end
+end
+
+def fun_l25_n649(x)
+ if (x < 1)
+ fun_l26_n996(x)
+ else
+ fun_l26_n671(x)
+ end
+end
+
+def fun_l25_n650(x)
+ if (x < 1)
+ fun_l26_n91(x)
+ else
+ fun_l26_n867(x)
+ end
+end
+
+def fun_l25_n651(x)
+ if (x < 1)
+ fun_l26_n987(x)
+ else
+ fun_l26_n643(x)
+ end
+end
+
+def fun_l25_n652(x)
+ if (x < 1)
+ fun_l26_n429(x)
+ else
+ fun_l26_n802(x)
+ end
+end
+
+def fun_l25_n653(x)
+ if (x < 1)
+ fun_l26_n967(x)
+ else
+ fun_l26_n590(x)
+ end
+end
+
+def fun_l25_n654(x)
+ if (x < 1)
+ fun_l26_n404(x)
+ else
+ fun_l26_n283(x)
+ end
+end
+
+def fun_l25_n655(x)
+ if (x < 1)
+ fun_l26_n438(x)
+ else
+ fun_l26_n232(x)
+ end
+end
+
+def fun_l25_n656(x)
+ if (x < 1)
+ fun_l26_n295(x)
+ else
+ fun_l26_n559(x)
+ end
+end
+
+def fun_l25_n657(x)
+ if (x < 1)
+ fun_l26_n892(x)
+ else
+ fun_l26_n46(x)
+ end
+end
+
+def fun_l25_n658(x)
+ if (x < 1)
+ fun_l26_n30(x)
+ else
+ fun_l26_n640(x)
+ end
+end
+
+def fun_l25_n659(x)
+ if (x < 1)
+ fun_l26_n323(x)
+ else
+ fun_l26_n583(x)
+ end
+end
+
+def fun_l25_n660(x)
+ if (x < 1)
+ fun_l26_n682(x)
+ else
+ fun_l26_n668(x)
+ end
+end
+
+def fun_l25_n661(x)
+ if (x < 1)
+ fun_l26_n78(x)
+ else
+ fun_l26_n83(x)
+ end
+end
+
+def fun_l25_n662(x)
+ if (x < 1)
+ fun_l26_n457(x)
+ else
+ fun_l26_n289(x)
+ end
+end
+
+def fun_l25_n663(x)
+ if (x < 1)
+ fun_l26_n444(x)
+ else
+ fun_l26_n159(x)
+ end
+end
+
+def fun_l25_n664(x)
+ if (x < 1)
+ fun_l26_n10(x)
+ else
+ fun_l26_n925(x)
+ end
+end
+
+def fun_l25_n665(x)
+ if (x < 1)
+ fun_l26_n870(x)
+ else
+ fun_l26_n253(x)
+ end
+end
+
+def fun_l25_n666(x)
+ if (x < 1)
+ fun_l26_n55(x)
+ else
+ fun_l26_n705(x)
+ end
+end
+
+def fun_l25_n667(x)
+ if (x < 1)
+ fun_l26_n179(x)
+ else
+ fun_l26_n607(x)
+ end
+end
+
+def fun_l25_n668(x)
+ if (x < 1)
+ fun_l26_n359(x)
+ else
+ fun_l26_n56(x)
+ end
+end
+
+def fun_l25_n669(x)
+ if (x < 1)
+ fun_l26_n908(x)
+ else
+ fun_l26_n997(x)
+ end
+end
+
+def fun_l25_n670(x)
+ if (x < 1)
+ fun_l26_n469(x)
+ else
+ fun_l26_n438(x)
+ end
+end
+
+def fun_l25_n671(x)
+ if (x < 1)
+ fun_l26_n740(x)
+ else
+ fun_l26_n847(x)
+ end
+end
+
+def fun_l25_n672(x)
+ if (x < 1)
+ fun_l26_n123(x)
+ else
+ fun_l26_n636(x)
+ end
+end
+
+def fun_l25_n673(x)
+ if (x < 1)
+ fun_l26_n654(x)
+ else
+ fun_l26_n221(x)
+ end
+end
+
+def fun_l25_n674(x)
+ if (x < 1)
+ fun_l26_n14(x)
+ else
+ fun_l26_n792(x)
+ end
+end
+
+def fun_l25_n675(x)
+ if (x < 1)
+ fun_l26_n424(x)
+ else
+ fun_l26_n999(x)
+ end
+end
+
+def fun_l25_n676(x)
+ if (x < 1)
+ fun_l26_n491(x)
+ else
+ fun_l26_n698(x)
+ end
+end
+
+def fun_l25_n677(x)
+ if (x < 1)
+ fun_l26_n859(x)
+ else
+ fun_l26_n749(x)
+ end
+end
+
+def fun_l25_n678(x)
+ if (x < 1)
+ fun_l26_n357(x)
+ else
+ fun_l26_n861(x)
+ end
+end
+
+def fun_l25_n679(x)
+ if (x < 1)
+ fun_l26_n144(x)
+ else
+ fun_l26_n347(x)
+ end
+end
+
+def fun_l25_n680(x)
+ if (x < 1)
+ fun_l26_n42(x)
+ else
+ fun_l26_n168(x)
+ end
+end
+
+def fun_l25_n681(x)
+ if (x < 1)
+ fun_l26_n808(x)
+ else
+ fun_l26_n639(x)
+ end
+end
+
+def fun_l25_n682(x)
+ if (x < 1)
+ fun_l26_n943(x)
+ else
+ fun_l26_n152(x)
+ end
+end
+
+def fun_l25_n683(x)
+ if (x < 1)
+ fun_l26_n668(x)
+ else
+ fun_l26_n186(x)
+ end
+end
+
+def fun_l25_n684(x)
+ if (x < 1)
+ fun_l26_n607(x)
+ else
+ fun_l26_n141(x)
+ end
+end
+
+def fun_l25_n685(x)
+ if (x < 1)
+ fun_l26_n221(x)
+ else
+ fun_l26_n960(x)
+ end
+end
+
+def fun_l25_n686(x)
+ if (x < 1)
+ fun_l26_n85(x)
+ else
+ fun_l26_n285(x)
+ end
+end
+
+def fun_l25_n687(x)
+ if (x < 1)
+ fun_l26_n707(x)
+ else
+ fun_l26_n638(x)
+ end
+end
+
+def fun_l25_n688(x)
+ if (x < 1)
+ fun_l26_n288(x)
+ else
+ fun_l26_n318(x)
+ end
+end
+
+def fun_l25_n689(x)
+ if (x < 1)
+ fun_l26_n505(x)
+ else
+ fun_l26_n802(x)
+ end
+end
+
+def fun_l25_n690(x)
+ if (x < 1)
+ fun_l26_n757(x)
+ else
+ fun_l26_n988(x)
+ end
+end
+
+def fun_l25_n691(x)
+ if (x < 1)
+ fun_l26_n211(x)
+ else
+ fun_l26_n868(x)
+ end
+end
+
+def fun_l25_n692(x)
+ if (x < 1)
+ fun_l26_n945(x)
+ else
+ fun_l26_n689(x)
+ end
+end
+
+def fun_l25_n693(x)
+ if (x < 1)
+ fun_l26_n65(x)
+ else
+ fun_l26_n326(x)
+ end
+end
+
+def fun_l25_n694(x)
+ if (x < 1)
+ fun_l26_n905(x)
+ else
+ fun_l26_n912(x)
+ end
+end
+
+def fun_l25_n695(x)
+ if (x < 1)
+ fun_l26_n408(x)
+ else
+ fun_l26_n834(x)
+ end
+end
+
+def fun_l25_n696(x)
+ if (x < 1)
+ fun_l26_n862(x)
+ else
+ fun_l26_n827(x)
+ end
+end
+
+def fun_l25_n697(x)
+ if (x < 1)
+ fun_l26_n356(x)
+ else
+ fun_l26_n201(x)
+ end
+end
+
+def fun_l25_n698(x)
+ if (x < 1)
+ fun_l26_n819(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n699(x)
+ if (x < 1)
+ fun_l26_n252(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n700(x)
+ if (x < 1)
+ fun_l26_n620(x)
+ else
+ fun_l26_n693(x)
+ end
+end
+
+def fun_l25_n701(x)
+ if (x < 1)
+ fun_l26_n393(x)
+ else
+ fun_l26_n246(x)
+ end
+end
+
+def fun_l25_n702(x)
+ if (x < 1)
+ fun_l26_n601(x)
+ else
+ fun_l26_n230(x)
+ end
+end
+
+def fun_l25_n703(x)
+ if (x < 1)
+ fun_l26_n583(x)
+ else
+ fun_l26_n503(x)
+ end
+end
+
+def fun_l25_n704(x)
+ if (x < 1)
+ fun_l26_n156(x)
+ else
+ fun_l26_n951(x)
+ end
+end
+
+def fun_l25_n705(x)
+ if (x < 1)
+ fun_l26_n681(x)
+ else
+ fun_l26_n692(x)
+ end
+end
+
+def fun_l25_n706(x)
+ if (x < 1)
+ fun_l26_n176(x)
+ else
+ fun_l26_n158(x)
+ end
+end
+
+def fun_l25_n707(x)
+ if (x < 1)
+ fun_l26_n607(x)
+ else
+ fun_l26_n3(x)
+ end
+end
+
+def fun_l25_n708(x)
+ if (x < 1)
+ fun_l26_n999(x)
+ else
+ fun_l26_n614(x)
+ end
+end
+
+def fun_l25_n709(x)
+ if (x < 1)
+ fun_l26_n930(x)
+ else
+ fun_l26_n888(x)
+ end
+end
+
+def fun_l25_n710(x)
+ if (x < 1)
+ fun_l26_n347(x)
+ else
+ fun_l26_n106(x)
+ end
+end
+
+def fun_l25_n711(x)
+ if (x < 1)
+ fun_l26_n425(x)
+ else
+ fun_l26_n474(x)
+ end
+end
+
+def fun_l25_n712(x)
+ if (x < 1)
+ fun_l26_n265(x)
+ else
+ fun_l26_n519(x)
+ end
+end
+
+def fun_l25_n713(x)
+ if (x < 1)
+ fun_l26_n205(x)
+ else
+ fun_l26_n76(x)
+ end
+end
+
+def fun_l25_n714(x)
+ if (x < 1)
+ fun_l26_n628(x)
+ else
+ fun_l26_n784(x)
+ end
+end
+
+def fun_l25_n715(x)
+ if (x < 1)
+ fun_l26_n217(x)
+ else
+ fun_l26_n484(x)
+ end
+end
+
+def fun_l25_n716(x)
+ if (x < 1)
+ fun_l26_n883(x)
+ else
+ fun_l26_n5(x)
+ end
+end
+
+def fun_l25_n717(x)
+ if (x < 1)
+ fun_l26_n23(x)
+ else
+ fun_l26_n457(x)
+ end
+end
+
+def fun_l25_n718(x)
+ if (x < 1)
+ fun_l26_n370(x)
+ else
+ fun_l26_n789(x)
+ end
+end
+
+def fun_l25_n719(x)
+ if (x < 1)
+ fun_l26_n636(x)
+ else
+ fun_l26_n776(x)
+ end
+end
+
+def fun_l25_n720(x)
+ if (x < 1)
+ fun_l26_n558(x)
+ else
+ fun_l26_n491(x)
+ end
+end
+
+def fun_l25_n721(x)
+ if (x < 1)
+ fun_l26_n867(x)
+ else
+ fun_l26_n49(x)
+ end
+end
+
+def fun_l25_n722(x)
+ if (x < 1)
+ fun_l26_n178(x)
+ else
+ fun_l26_n835(x)
+ end
+end
+
+def fun_l25_n723(x)
+ if (x < 1)
+ fun_l26_n967(x)
+ else
+ fun_l26_n266(x)
+ end
+end
+
+def fun_l25_n724(x)
+ if (x < 1)
+ fun_l26_n191(x)
+ else
+ fun_l26_n58(x)
+ end
+end
+
+def fun_l25_n725(x)
+ if (x < 1)
+ fun_l26_n536(x)
+ else
+ fun_l26_n78(x)
+ end
+end
+
+def fun_l25_n726(x)
+ if (x < 1)
+ fun_l26_n128(x)
+ else
+ fun_l26_n764(x)
+ end
+end
+
+def fun_l25_n727(x)
+ if (x < 1)
+ fun_l26_n243(x)
+ else
+ fun_l26_n217(x)
+ end
+end
+
+def fun_l25_n728(x)
+ if (x < 1)
+ fun_l26_n608(x)
+ else
+ fun_l26_n613(x)
+ end
+end
+
+def fun_l25_n729(x)
+ if (x < 1)
+ fun_l26_n765(x)
+ else
+ fun_l26_n822(x)
+ end
+end
+
+def fun_l25_n730(x)
+ if (x < 1)
+ fun_l26_n445(x)
+ else
+ fun_l26_n160(x)
+ end
+end
+
+def fun_l25_n731(x)
+ if (x < 1)
+ fun_l26_n209(x)
+ else
+ fun_l26_n980(x)
+ end
+end
+
+def fun_l25_n732(x)
+ if (x < 1)
+ fun_l26_n888(x)
+ else
+ fun_l26_n726(x)
+ end
+end
+
+def fun_l25_n733(x)
+ if (x < 1)
+ fun_l26_n232(x)
+ else
+ fun_l26_n47(x)
+ end
+end
+
+def fun_l25_n734(x)
+ if (x < 1)
+ fun_l26_n278(x)
+ else
+ fun_l26_n878(x)
+ end
+end
+
+def fun_l25_n735(x)
+ if (x < 1)
+ fun_l26_n894(x)
+ else
+ fun_l26_n523(x)
+ end
+end
+
+def fun_l25_n736(x)
+ if (x < 1)
+ fun_l26_n334(x)
+ else
+ fun_l26_n270(x)
+ end
+end
+
+def fun_l25_n737(x)
+ if (x < 1)
+ fun_l26_n877(x)
+ else
+ fun_l26_n105(x)
+ end
+end
+
+def fun_l25_n738(x)
+ if (x < 1)
+ fun_l26_n761(x)
+ else
+ fun_l26_n187(x)
+ end
+end
+
+def fun_l25_n739(x)
+ if (x < 1)
+ fun_l26_n668(x)
+ else
+ fun_l26_n592(x)
+ end
+end
+
+def fun_l25_n740(x)
+ if (x < 1)
+ fun_l26_n497(x)
+ else
+ fun_l26_n98(x)
+ end
+end
+
+def fun_l25_n741(x)
+ if (x < 1)
+ fun_l26_n415(x)
+ else
+ fun_l26_n85(x)
+ end
+end
+
+def fun_l25_n742(x)
+ if (x < 1)
+ fun_l26_n883(x)
+ else
+ fun_l26_n505(x)
+ end
+end
+
+def fun_l25_n743(x)
+ if (x < 1)
+ fun_l26_n12(x)
+ else
+ fun_l26_n91(x)
+ end
+end
+
+def fun_l25_n744(x)
+ if (x < 1)
+ fun_l26_n487(x)
+ else
+ fun_l26_n336(x)
+ end
+end
+
+def fun_l25_n745(x)
+ if (x < 1)
+ fun_l26_n489(x)
+ else
+ fun_l26_n186(x)
+ end
+end
+
+def fun_l25_n746(x)
+ if (x < 1)
+ fun_l26_n783(x)
+ else
+ fun_l26_n233(x)
+ end
+end
+
+def fun_l25_n747(x)
+ if (x < 1)
+ fun_l26_n171(x)
+ else
+ fun_l26_n574(x)
+ end
+end
+
+def fun_l25_n748(x)
+ if (x < 1)
+ fun_l26_n171(x)
+ else
+ fun_l26_n61(x)
+ end
+end
+
+def fun_l25_n749(x)
+ if (x < 1)
+ fun_l26_n444(x)
+ else
+ fun_l26_n89(x)
+ end
+end
+
+def fun_l25_n750(x)
+ if (x < 1)
+ fun_l26_n609(x)
+ else
+ fun_l26_n998(x)
+ end
+end
+
+def fun_l25_n751(x)
+ if (x < 1)
+ fun_l26_n914(x)
+ else
+ fun_l26_n893(x)
+ end
+end
+
+def fun_l25_n752(x)
+ if (x < 1)
+ fun_l26_n782(x)
+ else
+ fun_l26_n984(x)
+ end
+end
+
+def fun_l25_n753(x)
+ if (x < 1)
+ fun_l26_n351(x)
+ else
+ fun_l26_n370(x)
+ end
+end
+
+def fun_l25_n754(x)
+ if (x < 1)
+ fun_l26_n689(x)
+ else
+ fun_l26_n234(x)
+ end
+end
+
+def fun_l25_n755(x)
+ if (x < 1)
+ fun_l26_n131(x)
+ else
+ fun_l26_n960(x)
+ end
+end
+
+def fun_l25_n756(x)
+ if (x < 1)
+ fun_l26_n635(x)
+ else
+ fun_l26_n89(x)
+ end
+end
+
+def fun_l25_n757(x)
+ if (x < 1)
+ fun_l26_n309(x)
+ else
+ fun_l26_n74(x)
+ end
+end
+
+def fun_l25_n758(x)
+ if (x < 1)
+ fun_l26_n818(x)
+ else
+ fun_l26_n520(x)
+ end
+end
+
+def fun_l25_n759(x)
+ if (x < 1)
+ fun_l26_n873(x)
+ else
+ fun_l26_n761(x)
+ end
+end
+
+def fun_l25_n760(x)
+ if (x < 1)
+ fun_l26_n216(x)
+ else
+ fun_l26_n449(x)
+ end
+end
+
+def fun_l25_n761(x)
+ if (x < 1)
+ fun_l26_n596(x)
+ else
+ fun_l26_n617(x)
+ end
+end
+
+def fun_l25_n762(x)
+ if (x < 1)
+ fun_l26_n485(x)
+ else
+ fun_l26_n164(x)
+ end
+end
+
+def fun_l25_n763(x)
+ if (x < 1)
+ fun_l26_n434(x)
+ else
+ fun_l26_n422(x)
+ end
+end
+
+def fun_l25_n764(x)
+ if (x < 1)
+ fun_l26_n845(x)
+ else
+ fun_l26_n678(x)
+ end
+end
+
+def fun_l25_n765(x)
+ if (x < 1)
+ fun_l26_n376(x)
+ else
+ fun_l26_n128(x)
+ end
+end
+
+def fun_l25_n766(x)
+ if (x < 1)
+ fun_l26_n217(x)
+ else
+ fun_l26_n721(x)
+ end
+end
+
+def fun_l25_n767(x)
+ if (x < 1)
+ fun_l26_n929(x)
+ else
+ fun_l26_n425(x)
+ end
+end
+
+def fun_l25_n768(x)
+ if (x < 1)
+ fun_l26_n420(x)
+ else
+ fun_l26_n990(x)
+ end
+end
+
+def fun_l25_n769(x)
+ if (x < 1)
+ fun_l26_n310(x)
+ else
+ fun_l26_n901(x)
+ end
+end
+
+def fun_l25_n770(x)
+ if (x < 1)
+ fun_l26_n667(x)
+ else
+ fun_l26_n627(x)
+ end
+end
+
+def fun_l25_n771(x)
+ if (x < 1)
+ fun_l26_n265(x)
+ else
+ fun_l26_n852(x)
+ end
+end
+
+def fun_l25_n772(x)
+ if (x < 1)
+ fun_l26_n520(x)
+ else
+ fun_l26_n596(x)
+ end
+end
+
+def fun_l25_n773(x)
+ if (x < 1)
+ fun_l26_n280(x)
+ else
+ fun_l26_n0(x)
+ end
+end
+
+def fun_l25_n774(x)
+ if (x < 1)
+ fun_l26_n451(x)
+ else
+ fun_l26_n828(x)
+ end
+end
+
+def fun_l25_n775(x)
+ if (x < 1)
+ fun_l26_n814(x)
+ else
+ fun_l26_n797(x)
+ end
+end
+
+def fun_l25_n776(x)
+ if (x < 1)
+ fun_l26_n345(x)
+ else
+ fun_l26_n223(x)
+ end
+end
+
+def fun_l25_n777(x)
+ if (x < 1)
+ fun_l26_n392(x)
+ else
+ fun_l26_n847(x)
+ end
+end
+
+def fun_l25_n778(x)
+ if (x < 1)
+ fun_l26_n957(x)
+ else
+ fun_l26_n474(x)
+ end
+end
+
+def fun_l25_n779(x)
+ if (x < 1)
+ fun_l26_n950(x)
+ else
+ fun_l26_n804(x)
+ end
+end
+
+def fun_l25_n780(x)
+ if (x < 1)
+ fun_l26_n939(x)
+ else
+ fun_l26_n133(x)
+ end
+end
+
+def fun_l25_n781(x)
+ if (x < 1)
+ fun_l26_n176(x)
+ else
+ fun_l26_n237(x)
+ end
+end
+
+def fun_l25_n782(x)
+ if (x < 1)
+ fun_l26_n156(x)
+ else
+ fun_l26_n268(x)
+ end
+end
+
+def fun_l25_n783(x)
+ if (x < 1)
+ fun_l26_n750(x)
+ else
+ fun_l26_n88(x)
+ end
+end
+
+def fun_l25_n784(x)
+ if (x < 1)
+ fun_l26_n638(x)
+ else
+ fun_l26_n147(x)
+ end
+end
+
+def fun_l25_n785(x)
+ if (x < 1)
+ fun_l26_n570(x)
+ else
+ fun_l26_n698(x)
+ end
+end
+
+def fun_l25_n786(x)
+ if (x < 1)
+ fun_l26_n749(x)
+ else
+ fun_l26_n728(x)
+ end
+end
+
+def fun_l25_n787(x)
+ if (x < 1)
+ fun_l26_n183(x)
+ else
+ fun_l26_n649(x)
+ end
+end
+
+def fun_l25_n788(x)
+ if (x < 1)
+ fun_l26_n157(x)
+ else
+ fun_l26_n55(x)
+ end
+end
+
+def fun_l25_n789(x)
+ if (x < 1)
+ fun_l26_n559(x)
+ else
+ fun_l26_n228(x)
+ end
+end
+
+def fun_l25_n790(x)
+ if (x < 1)
+ fun_l26_n690(x)
+ else
+ fun_l26_n214(x)
+ end
+end
+
+def fun_l25_n791(x)
+ if (x < 1)
+ fun_l26_n621(x)
+ else
+ fun_l26_n184(x)
+ end
+end
+
+def fun_l25_n792(x)
+ if (x < 1)
+ fun_l26_n13(x)
+ else
+ fun_l26_n610(x)
+ end
+end
+
+def fun_l25_n793(x)
+ if (x < 1)
+ fun_l26_n709(x)
+ else
+ fun_l26_n40(x)
+ end
+end
+
+def fun_l25_n794(x)
+ if (x < 1)
+ fun_l26_n51(x)
+ else
+ fun_l26_n288(x)
+ end
+end
+
+def fun_l25_n795(x)
+ if (x < 1)
+ fun_l26_n526(x)
+ else
+ fun_l26_n237(x)
+ end
+end
+
+def fun_l25_n796(x)
+ if (x < 1)
+ fun_l26_n279(x)
+ else
+ fun_l26_n157(x)
+ end
+end
+
+def fun_l25_n797(x)
+ if (x < 1)
+ fun_l26_n299(x)
+ else
+ fun_l26_n999(x)
+ end
+end
+
+def fun_l25_n798(x)
+ if (x < 1)
+ fun_l26_n547(x)
+ else
+ fun_l26_n41(x)
+ end
+end
+
+def fun_l25_n799(x)
+ if (x < 1)
+ fun_l26_n522(x)
+ else
+ fun_l26_n544(x)
+ end
+end
+
+def fun_l25_n800(x)
+ if (x < 1)
+ fun_l26_n509(x)
+ else
+ fun_l26_n364(x)
+ end
+end
+
+def fun_l25_n801(x)
+ if (x < 1)
+ fun_l26_n412(x)
+ else
+ fun_l26_n719(x)
+ end
+end
+
+def fun_l25_n802(x)
+ if (x < 1)
+ fun_l26_n844(x)
+ else
+ fun_l26_n452(x)
+ end
+end
+
+def fun_l25_n803(x)
+ if (x < 1)
+ fun_l26_n681(x)
+ else
+ fun_l26_n217(x)
+ end
+end
+
+def fun_l25_n804(x)
+ if (x < 1)
+ fun_l26_n855(x)
+ else
+ fun_l26_n97(x)
+ end
+end
+
+def fun_l25_n805(x)
+ if (x < 1)
+ fun_l26_n32(x)
+ else
+ fun_l26_n512(x)
+ end
+end
+
+def fun_l25_n806(x)
+ if (x < 1)
+ fun_l26_n674(x)
+ else
+ fun_l26_n675(x)
+ end
+end
+
+def fun_l25_n807(x)
+ if (x < 1)
+ fun_l26_n684(x)
+ else
+ fun_l26_n848(x)
+ end
+end
+
+def fun_l25_n808(x)
+ if (x < 1)
+ fun_l26_n784(x)
+ else
+ fun_l26_n603(x)
+ end
+end
+
+def fun_l25_n809(x)
+ if (x < 1)
+ fun_l26_n58(x)
+ else
+ fun_l26_n20(x)
+ end
+end
+
+def fun_l25_n810(x)
+ if (x < 1)
+ fun_l26_n654(x)
+ else
+ fun_l26_n230(x)
+ end
+end
+
+def fun_l25_n811(x)
+ if (x < 1)
+ fun_l26_n627(x)
+ else
+ fun_l26_n812(x)
+ end
+end
+
+def fun_l25_n812(x)
+ if (x < 1)
+ fun_l26_n30(x)
+ else
+ fun_l26_n315(x)
+ end
+end
+
+def fun_l25_n813(x)
+ if (x < 1)
+ fun_l26_n690(x)
+ else
+ fun_l26_n755(x)
+ end
+end
+
+def fun_l25_n814(x)
+ if (x < 1)
+ fun_l26_n566(x)
+ else
+ fun_l26_n44(x)
+ end
+end
+
+def fun_l25_n815(x)
+ if (x < 1)
+ fun_l26_n884(x)
+ else
+ fun_l26_n954(x)
+ end
+end
+
+def fun_l25_n816(x)
+ if (x < 1)
+ fun_l26_n64(x)
+ else
+ fun_l26_n179(x)
+ end
+end
+
+def fun_l25_n817(x)
+ if (x < 1)
+ fun_l26_n341(x)
+ else
+ fun_l26_n440(x)
+ end
+end
+
+def fun_l25_n818(x)
+ if (x < 1)
+ fun_l26_n934(x)
+ else
+ fun_l26_n678(x)
+ end
+end
+
+def fun_l25_n819(x)
+ if (x < 1)
+ fun_l26_n225(x)
+ else
+ fun_l26_n807(x)
+ end
+end
+
+def fun_l25_n820(x)
+ if (x < 1)
+ fun_l26_n625(x)
+ else
+ fun_l26_n63(x)
+ end
+end
+
+def fun_l25_n821(x)
+ if (x < 1)
+ fun_l26_n744(x)
+ else
+ fun_l26_n68(x)
+ end
+end
+
+def fun_l25_n822(x)
+ if (x < 1)
+ fun_l26_n962(x)
+ else
+ fun_l26_n205(x)
+ end
+end
+
+def fun_l25_n823(x)
+ if (x < 1)
+ fun_l26_n715(x)
+ else
+ fun_l26_n130(x)
+ end
+end
+
+def fun_l25_n824(x)
+ if (x < 1)
+ fun_l26_n843(x)
+ else
+ fun_l26_n853(x)
+ end
+end
+
+def fun_l25_n825(x)
+ if (x < 1)
+ fun_l26_n34(x)
+ else
+ fun_l26_n665(x)
+ end
+end
+
+def fun_l25_n826(x)
+ if (x < 1)
+ fun_l26_n540(x)
+ else
+ fun_l26_n693(x)
+ end
+end
+
+def fun_l25_n827(x)
+ if (x < 1)
+ fun_l26_n482(x)
+ else
+ fun_l26_n527(x)
+ end
+end
+
+def fun_l25_n828(x)
+ if (x < 1)
+ fun_l26_n98(x)
+ else
+ fun_l26_n888(x)
+ end
+end
+
+def fun_l25_n829(x)
+ if (x < 1)
+ fun_l26_n681(x)
+ else
+ fun_l26_n176(x)
+ end
+end
+
+def fun_l25_n830(x)
+ if (x < 1)
+ fun_l26_n453(x)
+ else
+ fun_l26_n455(x)
+ end
+end
+
+def fun_l25_n831(x)
+ if (x < 1)
+ fun_l26_n587(x)
+ else
+ fun_l26_n501(x)
+ end
+end
+
+def fun_l25_n832(x)
+ if (x < 1)
+ fun_l26_n725(x)
+ else
+ fun_l26_n608(x)
+ end
+end
+
+def fun_l25_n833(x)
+ if (x < 1)
+ fun_l26_n589(x)
+ else
+ fun_l26_n945(x)
+ end
+end
+
+def fun_l25_n834(x)
+ if (x < 1)
+ fun_l26_n41(x)
+ else
+ fun_l26_n925(x)
+ end
+end
+
+def fun_l25_n835(x)
+ if (x < 1)
+ fun_l26_n858(x)
+ else
+ fun_l26_n840(x)
+ end
+end
+
+def fun_l25_n836(x)
+ if (x < 1)
+ fun_l26_n572(x)
+ else
+ fun_l26_n360(x)
+ end
+end
+
+def fun_l25_n837(x)
+ if (x < 1)
+ fun_l26_n446(x)
+ else
+ fun_l26_n912(x)
+ end
+end
+
+def fun_l25_n838(x)
+ if (x < 1)
+ fun_l26_n104(x)
+ else
+ fun_l26_n795(x)
+ end
+end
+
+def fun_l25_n839(x)
+ if (x < 1)
+ fun_l26_n607(x)
+ else
+ fun_l26_n803(x)
+ end
+end
+
+def fun_l25_n840(x)
+ if (x < 1)
+ fun_l26_n156(x)
+ else
+ fun_l26_n874(x)
+ end
+end
+
+def fun_l25_n841(x)
+ if (x < 1)
+ fun_l26_n314(x)
+ else
+ fun_l26_n28(x)
+ end
+end
+
+def fun_l25_n842(x)
+ if (x < 1)
+ fun_l26_n683(x)
+ else
+ fun_l26_n695(x)
+ end
+end
+
+def fun_l25_n843(x)
+ if (x < 1)
+ fun_l26_n881(x)
+ else
+ fun_l26_n272(x)
+ end
+end
+
+def fun_l25_n844(x)
+ if (x < 1)
+ fun_l26_n354(x)
+ else
+ fun_l26_n993(x)
+ end
+end
+
+def fun_l25_n845(x)
+ if (x < 1)
+ fun_l26_n686(x)
+ else
+ fun_l26_n594(x)
+ end
+end
+
+def fun_l25_n846(x)
+ if (x < 1)
+ fun_l26_n644(x)
+ else
+ fun_l26_n930(x)
+ end
+end
+
+def fun_l25_n847(x)
+ if (x < 1)
+ fun_l26_n417(x)
+ else
+ fun_l26_n705(x)
+ end
+end
+
+def fun_l25_n848(x)
+ if (x < 1)
+ fun_l26_n694(x)
+ else
+ fun_l26_n331(x)
+ end
+end
+
+def fun_l25_n849(x)
+ if (x < 1)
+ fun_l26_n546(x)
+ else
+ fun_l26_n848(x)
+ end
+end
+
+def fun_l25_n850(x)
+ if (x < 1)
+ fun_l26_n199(x)
+ else
+ fun_l26_n49(x)
+ end
+end
+
+def fun_l25_n851(x)
+ if (x < 1)
+ fun_l26_n439(x)
+ else
+ fun_l26_n406(x)
+ end
+end
+
+def fun_l25_n852(x)
+ if (x < 1)
+ fun_l26_n355(x)
+ else
+ fun_l26_n582(x)
+ end
+end
+
+def fun_l25_n853(x)
+ if (x < 1)
+ fun_l26_n839(x)
+ else
+ fun_l26_n485(x)
+ end
+end
+
+def fun_l25_n854(x)
+ if (x < 1)
+ fun_l26_n952(x)
+ else
+ fun_l26_n781(x)
+ end
+end
+
+def fun_l25_n855(x)
+ if (x < 1)
+ fun_l26_n616(x)
+ else
+ fun_l26_n811(x)
+ end
+end
+
+def fun_l25_n856(x)
+ if (x < 1)
+ fun_l26_n590(x)
+ else
+ fun_l26_n977(x)
+ end
+end
+
+def fun_l25_n857(x)
+ if (x < 1)
+ fun_l26_n167(x)
+ else
+ fun_l26_n329(x)
+ end
+end
+
+def fun_l25_n858(x)
+ if (x < 1)
+ fun_l26_n732(x)
+ else
+ fun_l26_n707(x)
+ end
+end
+
+def fun_l25_n859(x)
+ if (x < 1)
+ fun_l26_n956(x)
+ else
+ fun_l26_n955(x)
+ end
+end
+
+def fun_l25_n860(x)
+ if (x < 1)
+ fun_l26_n443(x)
+ else
+ fun_l26_n816(x)
+ end
+end
+
+def fun_l25_n861(x)
+ if (x < 1)
+ fun_l26_n584(x)
+ else
+ fun_l26_n671(x)
+ end
+end
+
+def fun_l25_n862(x)
+ if (x < 1)
+ fun_l26_n43(x)
+ else
+ fun_l26_n0(x)
+ end
+end
+
+def fun_l25_n863(x)
+ if (x < 1)
+ fun_l26_n697(x)
+ else
+ fun_l26_n842(x)
+ end
+end
+
+def fun_l25_n864(x)
+ if (x < 1)
+ fun_l26_n423(x)
+ else
+ fun_l26_n509(x)
+ end
+end
+
+def fun_l25_n865(x)
+ if (x < 1)
+ fun_l26_n239(x)
+ else
+ fun_l26_n257(x)
+ end
+end
+
+def fun_l25_n866(x)
+ if (x < 1)
+ fun_l26_n78(x)
+ else
+ fun_l26_n450(x)
+ end
+end
+
+def fun_l25_n867(x)
+ if (x < 1)
+ fun_l26_n121(x)
+ else
+ fun_l26_n453(x)
+ end
+end
+
+def fun_l25_n868(x)
+ if (x < 1)
+ fun_l26_n844(x)
+ else
+ fun_l26_n977(x)
+ end
+end
+
+def fun_l25_n869(x)
+ if (x < 1)
+ fun_l26_n54(x)
+ else
+ fun_l26_n869(x)
+ end
+end
+
+def fun_l25_n870(x)
+ if (x < 1)
+ fun_l26_n18(x)
+ else
+ fun_l26_n799(x)
+ end
+end
+
+def fun_l25_n871(x)
+ if (x < 1)
+ fun_l26_n990(x)
+ else
+ fun_l26_n53(x)
+ end
+end
+
+def fun_l25_n872(x)
+ if (x < 1)
+ fun_l26_n607(x)
+ else
+ fun_l26_n822(x)
+ end
+end
+
+def fun_l25_n873(x)
+ if (x < 1)
+ fun_l26_n378(x)
+ else
+ fun_l26_n158(x)
+ end
+end
+
+def fun_l25_n874(x)
+ if (x < 1)
+ fun_l26_n206(x)
+ else
+ fun_l26_n271(x)
+ end
+end
+
+def fun_l25_n875(x)
+ if (x < 1)
+ fun_l26_n536(x)
+ else
+ fun_l26_n850(x)
+ end
+end
+
+def fun_l25_n876(x)
+ if (x < 1)
+ fun_l26_n129(x)
+ else
+ fun_l26_n750(x)
+ end
+end
+
+def fun_l25_n877(x)
+ if (x < 1)
+ fun_l26_n553(x)
+ else
+ fun_l26_n815(x)
+ end
+end
+
+def fun_l25_n878(x)
+ if (x < 1)
+ fun_l26_n619(x)
+ else
+ fun_l26_n182(x)
+ end
+end
+
+def fun_l25_n879(x)
+ if (x < 1)
+ fun_l26_n529(x)
+ else
+ fun_l26_n541(x)
+ end
+end
+
+def fun_l25_n880(x)
+ if (x < 1)
+ fun_l26_n228(x)
+ else
+ fun_l26_n672(x)
+ end
+end
+
+def fun_l25_n881(x)
+ if (x < 1)
+ fun_l26_n834(x)
+ else
+ fun_l26_n830(x)
+ end
+end
+
+def fun_l25_n882(x)
+ if (x < 1)
+ fun_l26_n80(x)
+ else
+ fun_l26_n257(x)
+ end
+end
+
+def fun_l25_n883(x)
+ if (x < 1)
+ fun_l26_n805(x)
+ else
+ fun_l26_n589(x)
+ end
+end
+
+def fun_l25_n884(x)
+ if (x < 1)
+ fun_l26_n20(x)
+ else
+ fun_l26_n880(x)
+ end
+end
+
+def fun_l25_n885(x)
+ if (x < 1)
+ fun_l26_n924(x)
+ else
+ fun_l26_n832(x)
+ end
+end
+
+def fun_l25_n886(x)
+ if (x < 1)
+ fun_l26_n262(x)
+ else
+ fun_l26_n928(x)
+ end
+end
+
+def fun_l25_n887(x)
+ if (x < 1)
+ fun_l26_n461(x)
+ else
+ fun_l26_n81(x)
+ end
+end
+
+def fun_l25_n888(x)
+ if (x < 1)
+ fun_l26_n484(x)
+ else
+ fun_l26_n376(x)
+ end
+end
+
+def fun_l25_n889(x)
+ if (x < 1)
+ fun_l26_n26(x)
+ else
+ fun_l26_n28(x)
+ end
+end
+
+def fun_l25_n890(x)
+ if (x < 1)
+ fun_l26_n184(x)
+ else
+ fun_l26_n623(x)
+ end
+end
+
+def fun_l25_n891(x)
+ if (x < 1)
+ fun_l26_n326(x)
+ else
+ fun_l26_n441(x)
+ end
+end
+
+def fun_l25_n892(x)
+ if (x < 1)
+ fun_l26_n35(x)
+ else
+ fun_l26_n543(x)
+ end
+end
+
+def fun_l25_n893(x)
+ if (x < 1)
+ fun_l26_n568(x)
+ else
+ fun_l26_n229(x)
+ end
+end
+
+def fun_l25_n894(x)
+ if (x < 1)
+ fun_l26_n163(x)
+ else
+ fun_l26_n505(x)
+ end
+end
+
+def fun_l25_n895(x)
+ if (x < 1)
+ fun_l26_n675(x)
+ else
+ fun_l26_n508(x)
+ end
+end
+
+def fun_l25_n896(x)
+ if (x < 1)
+ fun_l26_n285(x)
+ else
+ fun_l26_n936(x)
+ end
+end
+
+def fun_l25_n897(x)
+ if (x < 1)
+ fun_l26_n848(x)
+ else
+ fun_l26_n169(x)
+ end
+end
+
+def fun_l25_n898(x)
+ if (x < 1)
+ fun_l26_n139(x)
+ else
+ fun_l26_n479(x)
+ end
+end
+
+def fun_l25_n899(x)
+ if (x < 1)
+ fun_l26_n355(x)
+ else
+ fun_l26_n49(x)
+ end
+end
+
+def fun_l25_n900(x)
+ if (x < 1)
+ fun_l26_n918(x)
+ else
+ fun_l26_n215(x)
+ end
+end
+
+def fun_l25_n901(x)
+ if (x < 1)
+ fun_l26_n55(x)
+ else
+ fun_l26_n550(x)
+ end
+end
+
+def fun_l25_n902(x)
+ if (x < 1)
+ fun_l26_n660(x)
+ else
+ fun_l26_n117(x)
+ end
+end
+
+def fun_l25_n903(x)
+ if (x < 1)
+ fun_l26_n968(x)
+ else
+ fun_l26_n279(x)
+ end
+end
+
+def fun_l25_n904(x)
+ if (x < 1)
+ fun_l26_n693(x)
+ else
+ fun_l26_n57(x)
+ end
+end
+
+def fun_l25_n905(x)
+ if (x < 1)
+ fun_l26_n248(x)
+ else
+ fun_l26_n154(x)
+ end
+end
+
+def fun_l25_n906(x)
+ if (x < 1)
+ fun_l26_n837(x)
+ else
+ fun_l26_n698(x)
+ end
+end
+
+def fun_l25_n907(x)
+ if (x < 1)
+ fun_l26_n630(x)
+ else
+ fun_l26_n460(x)
+ end
+end
+
+def fun_l25_n908(x)
+ if (x < 1)
+ fun_l26_n424(x)
+ else
+ fun_l26_n243(x)
+ end
+end
+
+def fun_l25_n909(x)
+ if (x < 1)
+ fun_l26_n897(x)
+ else
+ fun_l26_n736(x)
+ end
+end
+
+def fun_l25_n910(x)
+ if (x < 1)
+ fun_l26_n573(x)
+ else
+ fun_l26_n205(x)
+ end
+end
+
+def fun_l25_n911(x)
+ if (x < 1)
+ fun_l26_n535(x)
+ else
+ fun_l26_n970(x)
+ end
+end
+
+def fun_l25_n912(x)
+ if (x < 1)
+ fun_l26_n826(x)
+ else
+ fun_l26_n744(x)
+ end
+end
+
+def fun_l25_n913(x)
+ if (x < 1)
+ fun_l26_n244(x)
+ else
+ fun_l26_n216(x)
+ end
+end
+
+def fun_l25_n914(x)
+ if (x < 1)
+ fun_l26_n958(x)
+ else
+ fun_l26_n617(x)
+ end
+end
+
+def fun_l25_n915(x)
+ if (x < 1)
+ fun_l26_n911(x)
+ else
+ fun_l26_n684(x)
+ end
+end
+
+def fun_l25_n916(x)
+ if (x < 1)
+ fun_l26_n294(x)
+ else
+ fun_l26_n319(x)
+ end
+end
+
+def fun_l25_n917(x)
+ if (x < 1)
+ fun_l26_n665(x)
+ else
+ fun_l26_n867(x)
+ end
+end
+
+def fun_l25_n918(x)
+ if (x < 1)
+ fun_l26_n733(x)
+ else
+ fun_l26_n746(x)
+ end
+end
+
+def fun_l25_n919(x)
+ if (x < 1)
+ fun_l26_n243(x)
+ else
+ fun_l26_n328(x)
+ end
+end
+
+def fun_l25_n920(x)
+ if (x < 1)
+ fun_l26_n897(x)
+ else
+ fun_l26_n197(x)
+ end
+end
+
+def fun_l25_n921(x)
+ if (x < 1)
+ fun_l26_n528(x)
+ else
+ fun_l26_n229(x)
+ end
+end
+
+def fun_l25_n922(x)
+ if (x < 1)
+ fun_l26_n897(x)
+ else
+ fun_l26_n547(x)
+ end
+end
+
+def fun_l25_n923(x)
+ if (x < 1)
+ fun_l26_n234(x)
+ else
+ fun_l26_n920(x)
+ end
+end
+
+def fun_l25_n924(x)
+ if (x < 1)
+ fun_l26_n827(x)
+ else
+ fun_l26_n257(x)
+ end
+end
+
+def fun_l25_n925(x)
+ if (x < 1)
+ fun_l26_n847(x)
+ else
+ fun_l26_n469(x)
+ end
+end
+
+def fun_l25_n926(x)
+ if (x < 1)
+ fun_l26_n27(x)
+ else
+ fun_l26_n974(x)
+ end
+end
+
+def fun_l25_n927(x)
+ if (x < 1)
+ fun_l26_n872(x)
+ else
+ fun_l26_n535(x)
+ end
+end
+
+def fun_l25_n928(x)
+ if (x < 1)
+ fun_l26_n870(x)
+ else
+ fun_l26_n783(x)
+ end
+end
+
+def fun_l25_n929(x)
+ if (x < 1)
+ fun_l26_n993(x)
+ else
+ fun_l26_n168(x)
+ end
+end
+
+def fun_l25_n930(x)
+ if (x < 1)
+ fun_l26_n852(x)
+ else
+ fun_l26_n41(x)
+ end
+end
+
+def fun_l25_n931(x)
+ if (x < 1)
+ fun_l26_n290(x)
+ else
+ fun_l26_n249(x)
+ end
+end
+
+def fun_l25_n932(x)
+ if (x < 1)
+ fun_l26_n446(x)
+ else
+ fun_l26_n841(x)
+ end
+end
+
+def fun_l25_n933(x)
+ if (x < 1)
+ fun_l26_n303(x)
+ else
+ fun_l26_n779(x)
+ end
+end
+
+def fun_l25_n934(x)
+ if (x < 1)
+ fun_l26_n352(x)
+ else
+ fun_l26_n731(x)
+ end
+end
+
+def fun_l25_n935(x)
+ if (x < 1)
+ fun_l26_n377(x)
+ else
+ fun_l26_n214(x)
+ end
+end
+
+def fun_l25_n936(x)
+ if (x < 1)
+ fun_l26_n374(x)
+ else
+ fun_l26_n793(x)
+ end
+end
+
+def fun_l25_n937(x)
+ if (x < 1)
+ fun_l26_n656(x)
+ else
+ fun_l26_n575(x)
+ end
+end
+
+def fun_l25_n938(x)
+ if (x < 1)
+ fun_l26_n777(x)
+ else
+ fun_l26_n773(x)
+ end
+end
+
+def fun_l25_n939(x)
+ if (x < 1)
+ fun_l26_n5(x)
+ else
+ fun_l26_n206(x)
+ end
+end
+
+def fun_l25_n940(x)
+ if (x < 1)
+ fun_l26_n780(x)
+ else
+ fun_l26_n486(x)
+ end
+end
+
+def fun_l25_n941(x)
+ if (x < 1)
+ fun_l26_n634(x)
+ else
+ fun_l26_n727(x)
+ end
+end
+
+def fun_l25_n942(x)
+ if (x < 1)
+ fun_l26_n78(x)
+ else
+ fun_l26_n918(x)
+ end
+end
+
+def fun_l25_n943(x)
+ if (x < 1)
+ fun_l26_n616(x)
+ else
+ fun_l26_n35(x)
+ end
+end
+
+def fun_l25_n944(x)
+ if (x < 1)
+ fun_l26_n540(x)
+ else
+ fun_l26_n837(x)
+ end
+end
+
+def fun_l25_n945(x)
+ if (x < 1)
+ fun_l26_n365(x)
+ else
+ fun_l26_n561(x)
+ end
+end
+
+def fun_l25_n946(x)
+ if (x < 1)
+ fun_l26_n519(x)
+ else
+ fun_l26_n440(x)
+ end
+end
+
+def fun_l25_n947(x)
+ if (x < 1)
+ fun_l26_n144(x)
+ else
+ fun_l26_n426(x)
+ end
+end
+
+def fun_l25_n948(x)
+ if (x < 1)
+ fun_l26_n973(x)
+ else
+ fun_l26_n63(x)
+ end
+end
+
+def fun_l25_n949(x)
+ if (x < 1)
+ fun_l26_n258(x)
+ else
+ fun_l26_n690(x)
+ end
+end
+
+def fun_l25_n950(x)
+ if (x < 1)
+ fun_l26_n368(x)
+ else
+ fun_l26_n307(x)
+ end
+end
+
+def fun_l25_n951(x)
+ if (x < 1)
+ fun_l26_n133(x)
+ else
+ fun_l26_n774(x)
+ end
+end
+
+def fun_l25_n952(x)
+ if (x < 1)
+ fun_l26_n866(x)
+ else
+ fun_l26_n299(x)
+ end
+end
+
+def fun_l25_n953(x)
+ if (x < 1)
+ fun_l26_n72(x)
+ else
+ fun_l26_n421(x)
+ end
+end
+
+def fun_l25_n954(x)
+ if (x < 1)
+ fun_l26_n990(x)
+ else
+ fun_l26_n716(x)
+ end
+end
+
+def fun_l25_n955(x)
+ if (x < 1)
+ fun_l26_n138(x)
+ else
+ fun_l26_n387(x)
+ end
+end
+
+def fun_l25_n956(x)
+ if (x < 1)
+ fun_l26_n451(x)
+ else
+ fun_l26_n965(x)
+ end
+end
+
+def fun_l25_n957(x)
+ if (x < 1)
+ fun_l26_n292(x)
+ else
+ fun_l26_n741(x)
+ end
+end
+
+def fun_l25_n958(x)
+ if (x < 1)
+ fun_l26_n835(x)
+ else
+ fun_l26_n82(x)
+ end
+end
+
+def fun_l25_n959(x)
+ if (x < 1)
+ fun_l26_n73(x)
+ else
+ fun_l26_n987(x)
+ end
+end
+
+def fun_l25_n960(x)
+ if (x < 1)
+ fun_l26_n465(x)
+ else
+ fun_l26_n893(x)
+ end
+end
+
+def fun_l25_n961(x)
+ if (x < 1)
+ fun_l26_n277(x)
+ else
+ fun_l26_n846(x)
+ end
+end
+
+def fun_l25_n962(x)
+ if (x < 1)
+ fun_l26_n1(x)
+ else
+ fun_l26_n408(x)
+ end
+end
+
+def fun_l25_n963(x)
+ if (x < 1)
+ fun_l26_n139(x)
+ else
+ fun_l26_n43(x)
+ end
+end
+
+def fun_l25_n964(x)
+ if (x < 1)
+ fun_l26_n238(x)
+ else
+ fun_l26_n427(x)
+ end
+end
+
+def fun_l25_n965(x)
+ if (x < 1)
+ fun_l26_n150(x)
+ else
+ fun_l26_n60(x)
+ end
+end
+
+def fun_l25_n966(x)
+ if (x < 1)
+ fun_l26_n423(x)
+ else
+ fun_l26_n166(x)
+ end
+end
+
+def fun_l25_n967(x)
+ if (x < 1)
+ fun_l26_n102(x)
+ else
+ fun_l26_n679(x)
+ end
+end
+
+def fun_l25_n968(x)
+ if (x < 1)
+ fun_l26_n41(x)
+ else
+ fun_l26_n553(x)
+ end
+end
+
+def fun_l25_n969(x)
+ if (x < 1)
+ fun_l26_n577(x)
+ else
+ fun_l26_n589(x)
+ end
+end
+
+def fun_l25_n970(x)
+ if (x < 1)
+ fun_l26_n569(x)
+ else
+ fun_l26_n677(x)
+ end
+end
+
+def fun_l25_n971(x)
+ if (x < 1)
+ fun_l26_n845(x)
+ else
+ fun_l26_n237(x)
+ end
+end
+
+def fun_l25_n972(x)
+ if (x < 1)
+ fun_l26_n33(x)
+ else
+ fun_l26_n281(x)
+ end
+end
+
+def fun_l25_n973(x)
+ if (x < 1)
+ fun_l26_n432(x)
+ else
+ fun_l26_n800(x)
+ end
+end
+
+def fun_l25_n974(x)
+ if (x < 1)
+ fun_l26_n49(x)
+ else
+ fun_l26_n864(x)
+ end
+end
+
+def fun_l25_n975(x)
+ if (x < 1)
+ fun_l26_n379(x)
+ else
+ fun_l26_n704(x)
+ end
+end
+
+def fun_l25_n976(x)
+ if (x < 1)
+ fun_l26_n778(x)
+ else
+ fun_l26_n310(x)
+ end
+end
+
+def fun_l25_n977(x)
+ if (x < 1)
+ fun_l26_n137(x)
+ else
+ fun_l26_n261(x)
+ end
+end
+
+def fun_l25_n978(x)
+ if (x < 1)
+ fun_l26_n38(x)
+ else
+ fun_l26_n244(x)
+ end
+end
+
+def fun_l25_n979(x)
+ if (x < 1)
+ fun_l26_n665(x)
+ else
+ fun_l26_n883(x)
+ end
+end
+
+def fun_l25_n980(x)
+ if (x < 1)
+ fun_l26_n448(x)
+ else
+ fun_l26_n619(x)
+ end
+end
+
+def fun_l25_n981(x)
+ if (x < 1)
+ fun_l26_n652(x)
+ else
+ fun_l26_n804(x)
+ end
+end
+
+def fun_l25_n982(x)
+ if (x < 1)
+ fun_l26_n804(x)
+ else
+ fun_l26_n110(x)
+ end
+end
+
+def fun_l25_n983(x)
+ if (x < 1)
+ fun_l26_n151(x)
+ else
+ fun_l26_n588(x)
+ end
+end
+
+def fun_l25_n984(x)
+ if (x < 1)
+ fun_l26_n379(x)
+ else
+ fun_l26_n156(x)
+ end
+end
+
+def fun_l25_n985(x)
+ if (x < 1)
+ fun_l26_n936(x)
+ else
+ fun_l26_n31(x)
+ end
+end
+
+def fun_l25_n986(x)
+ if (x < 1)
+ fun_l26_n65(x)
+ else
+ fun_l26_n303(x)
+ end
+end
+
+def fun_l25_n987(x)
+ if (x < 1)
+ fun_l26_n273(x)
+ else
+ fun_l26_n4(x)
+ end
+end
+
+def fun_l25_n988(x)
+ if (x < 1)
+ fun_l26_n538(x)
+ else
+ fun_l26_n357(x)
+ end
+end
+
+def fun_l25_n989(x)
+ if (x < 1)
+ fun_l26_n922(x)
+ else
+ fun_l26_n457(x)
+ end
+end
+
+def fun_l25_n990(x)
+ if (x < 1)
+ fun_l26_n250(x)
+ else
+ fun_l26_n945(x)
+ end
+end
+
+def fun_l25_n991(x)
+ if (x < 1)
+ fun_l26_n878(x)
+ else
+ fun_l26_n992(x)
+ end
+end
+
+def fun_l25_n992(x)
+ if (x < 1)
+ fun_l26_n767(x)
+ else
+ fun_l26_n132(x)
+ end
+end
+
+def fun_l25_n993(x)
+ if (x < 1)
+ fun_l26_n737(x)
+ else
+ fun_l26_n323(x)
+ end
+end
+
+def fun_l25_n994(x)
+ if (x < 1)
+ fun_l26_n173(x)
+ else
+ fun_l26_n424(x)
+ end
+end
+
+def fun_l25_n995(x)
+ if (x < 1)
+ fun_l26_n860(x)
+ else
+ fun_l26_n390(x)
+ end
+end
+
+def fun_l25_n996(x)
+ if (x < 1)
+ fun_l26_n794(x)
+ else
+ fun_l26_n613(x)
+ end
+end
+
+def fun_l25_n997(x)
+ if (x < 1)
+ fun_l26_n807(x)
+ else
+ fun_l26_n277(x)
+ end
+end
+
+def fun_l25_n998(x)
+ if (x < 1)
+ fun_l26_n418(x)
+ else
+ fun_l26_n830(x)
+ end
+end
+
+def fun_l25_n999(x)
+ if (x < 1)
+ fun_l26_n212(x)
+ else
+ fun_l26_n863(x)
+ end
+end
+
+def fun_l26_n0(x)
+ if (x < 1)
+ fun_l27_n276(x)
+ else
+ fun_l27_n243(x)
+ end
+end
+
+def fun_l26_n1(x)
+ if (x < 1)
+ fun_l27_n136(x)
+ else
+ fun_l27_n625(x)
+ end
+end
+
+def fun_l26_n2(x)
+ if (x < 1)
+ fun_l27_n205(x)
+ else
+ fun_l27_n576(x)
+ end
+end
+
+def fun_l26_n3(x)
+ if (x < 1)
+ fun_l27_n97(x)
+ else
+ fun_l27_n753(x)
+ end
+end
+
+def fun_l26_n4(x)
+ if (x < 1)
+ fun_l27_n984(x)
+ else
+ fun_l27_n827(x)
+ end
+end
+
+def fun_l26_n5(x)
+ if (x < 1)
+ fun_l27_n428(x)
+ else
+ fun_l27_n559(x)
+ end
+end
+
+def fun_l26_n6(x)
+ if (x < 1)
+ fun_l27_n148(x)
+ else
+ fun_l27_n351(x)
+ end
+end
+
+def fun_l26_n7(x)
+ if (x < 1)
+ fun_l27_n90(x)
+ else
+ fun_l27_n241(x)
+ end
+end
+
+def fun_l26_n8(x)
+ if (x < 1)
+ fun_l27_n860(x)
+ else
+ fun_l27_n495(x)
+ end
+end
+
+def fun_l26_n9(x)
+ if (x < 1)
+ fun_l27_n245(x)
+ else
+ fun_l27_n429(x)
+ end
+end
+
+def fun_l26_n10(x)
+ if (x < 1)
+ fun_l27_n999(x)
+ else
+ fun_l27_n536(x)
+ end
+end
+
+def fun_l26_n11(x)
+ if (x < 1)
+ fun_l27_n777(x)
+ else
+ fun_l27_n823(x)
+ end
+end
+
+def fun_l26_n12(x)
+ if (x < 1)
+ fun_l27_n158(x)
+ else
+ fun_l27_n249(x)
+ end
+end
+
+def fun_l26_n13(x)
+ if (x < 1)
+ fun_l27_n781(x)
+ else
+ fun_l27_n710(x)
+ end
+end
+
+def fun_l26_n14(x)
+ if (x < 1)
+ fun_l27_n784(x)
+ else
+ fun_l27_n728(x)
+ end
+end
+
+def fun_l26_n15(x)
+ if (x < 1)
+ fun_l27_n225(x)
+ else
+ fun_l27_n216(x)
+ end
+end
+
+def fun_l26_n16(x)
+ if (x < 1)
+ fun_l27_n228(x)
+ else
+ fun_l27_n219(x)
+ end
+end
+
+def fun_l26_n17(x)
+ if (x < 1)
+ fun_l27_n849(x)
+ else
+ fun_l27_n348(x)
+ end
+end
+
+def fun_l26_n18(x)
+ if (x < 1)
+ fun_l27_n722(x)
+ else
+ fun_l27_n884(x)
+ end
+end
+
+def fun_l26_n19(x)
+ if (x < 1)
+ fun_l27_n756(x)
+ else
+ fun_l27_n715(x)
+ end
+end
+
+def fun_l26_n20(x)
+ if (x < 1)
+ fun_l27_n217(x)
+ else
+ fun_l27_n909(x)
+ end
+end
+
+def fun_l26_n21(x)
+ if (x < 1)
+ fun_l27_n239(x)
+ else
+ fun_l27_n370(x)
+ end
+end
+
+def fun_l26_n22(x)
+ if (x < 1)
+ fun_l27_n954(x)
+ else
+ fun_l27_n223(x)
+ end
+end
+
+def fun_l26_n23(x)
+ if (x < 1)
+ fun_l27_n781(x)
+ else
+ fun_l27_n845(x)
+ end
+end
+
+def fun_l26_n24(x)
+ if (x < 1)
+ fun_l27_n80(x)
+ else
+ fun_l27_n71(x)
+ end
+end
+
+def fun_l26_n25(x)
+ if (x < 1)
+ fun_l27_n850(x)
+ else
+ fun_l27_n715(x)
+ end
+end
+
+def fun_l26_n26(x)
+ if (x < 1)
+ fun_l27_n632(x)
+ else
+ fun_l27_n624(x)
+ end
+end
+
+def fun_l26_n27(x)
+ if (x < 1)
+ fun_l27_n342(x)
+ else
+ fun_l27_n999(x)
+ end
+end
+
+def fun_l26_n28(x)
+ if (x < 1)
+ fun_l27_n105(x)
+ else
+ fun_l27_n390(x)
+ end
+end
+
+def fun_l26_n29(x)
+ if (x < 1)
+ fun_l27_n972(x)
+ else
+ fun_l27_n451(x)
+ end
+end
+
+def fun_l26_n30(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n392(x)
+ end
+end
+
+def fun_l26_n31(x)
+ if (x < 1)
+ fun_l27_n892(x)
+ else
+ fun_l27_n874(x)
+ end
+end
+
+def fun_l26_n32(x)
+ if (x < 1)
+ fun_l27_n783(x)
+ else
+ fun_l27_n456(x)
+ end
+end
+
+def fun_l26_n33(x)
+ if (x < 1)
+ fun_l27_n491(x)
+ else
+ fun_l27_n479(x)
+ end
+end
+
+def fun_l26_n34(x)
+ if (x < 1)
+ fun_l27_n799(x)
+ else
+ fun_l27_n438(x)
+ end
+end
+
+def fun_l26_n35(x)
+ if (x < 1)
+ fun_l27_n335(x)
+ else
+ fun_l27_n263(x)
+ end
+end
+
+def fun_l26_n36(x)
+ if (x < 1)
+ fun_l27_n935(x)
+ else
+ fun_l27_n715(x)
+ end
+end
+
+def fun_l26_n37(x)
+ if (x < 1)
+ fun_l27_n2(x)
+ else
+ fun_l27_n13(x)
+ end
+end
+
+def fun_l26_n38(x)
+ if (x < 1)
+ fun_l27_n567(x)
+ else
+ fun_l27_n878(x)
+ end
+end
+
+def fun_l26_n39(x)
+ if (x < 1)
+ fun_l27_n144(x)
+ else
+ fun_l27_n349(x)
+ end
+end
+
+def fun_l26_n40(x)
+ if (x < 1)
+ fun_l27_n957(x)
+ else
+ fun_l27_n990(x)
+ end
+end
+
+def fun_l26_n41(x)
+ if (x < 1)
+ fun_l27_n501(x)
+ else
+ fun_l27_n752(x)
+ end
+end
+
+def fun_l26_n42(x)
+ if (x < 1)
+ fun_l27_n23(x)
+ else
+ fun_l27_n200(x)
+ end
+end
+
+def fun_l26_n43(x)
+ if (x < 1)
+ fun_l27_n61(x)
+ else
+ fun_l27_n306(x)
+ end
+end
+
+def fun_l26_n44(x)
+ if (x < 1)
+ fun_l27_n336(x)
+ else
+ fun_l27_n468(x)
+ end
+end
+
+def fun_l26_n45(x)
+ if (x < 1)
+ fun_l27_n350(x)
+ else
+ fun_l27_n359(x)
+ end
+end
+
+def fun_l26_n46(x)
+ if (x < 1)
+ fun_l27_n574(x)
+ else
+ fun_l27_n791(x)
+ end
+end
+
+def fun_l26_n47(x)
+ if (x < 1)
+ fun_l27_n859(x)
+ else
+ fun_l27_n524(x)
+ end
+end
+
+def fun_l26_n48(x)
+ if (x < 1)
+ fun_l27_n530(x)
+ else
+ fun_l27_n387(x)
+ end
+end
+
+def fun_l26_n49(x)
+ if (x < 1)
+ fun_l27_n174(x)
+ else
+ fun_l27_n673(x)
+ end
+end
+
+def fun_l26_n50(x)
+ if (x < 1)
+ fun_l27_n457(x)
+ else
+ fun_l27_n996(x)
+ end
+end
+
+def fun_l26_n51(x)
+ if (x < 1)
+ fun_l27_n757(x)
+ else
+ fun_l27_n84(x)
+ end
+end
+
+def fun_l26_n52(x)
+ if (x < 1)
+ fun_l27_n315(x)
+ else
+ fun_l27_n790(x)
+ end
+end
+
+def fun_l26_n53(x)
+ if (x < 1)
+ fun_l27_n452(x)
+ else
+ fun_l27_n201(x)
+ end
+end
+
+def fun_l26_n54(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n143(x)
+ end
+end
+
+def fun_l26_n55(x)
+ if (x < 1)
+ fun_l27_n476(x)
+ else
+ fun_l27_n149(x)
+ end
+end
+
+def fun_l26_n56(x)
+ if (x < 1)
+ fun_l27_n737(x)
+ else
+ fun_l27_n628(x)
+ end
+end
+
+def fun_l26_n57(x)
+ if (x < 1)
+ fun_l27_n780(x)
+ else
+ fun_l27_n906(x)
+ end
+end
+
+def fun_l26_n58(x)
+ if (x < 1)
+ fun_l27_n914(x)
+ else
+ fun_l27_n197(x)
+ end
+end
+
+def fun_l26_n59(x)
+ if (x < 1)
+ fun_l27_n816(x)
+ else
+ fun_l27_n16(x)
+ end
+end
+
+def fun_l26_n60(x)
+ if (x < 1)
+ fun_l27_n643(x)
+ else
+ fun_l27_n90(x)
+ end
+end
+
+def fun_l26_n61(x)
+ if (x < 1)
+ fun_l27_n514(x)
+ else
+ fun_l27_n156(x)
+ end
+end
+
+def fun_l26_n62(x)
+ if (x < 1)
+ fun_l27_n261(x)
+ else
+ fun_l27_n410(x)
+ end
+end
+
+def fun_l26_n63(x)
+ if (x < 1)
+ fun_l27_n82(x)
+ else
+ fun_l27_n817(x)
+ end
+end
+
+def fun_l26_n64(x)
+ if (x < 1)
+ fun_l27_n755(x)
+ else
+ fun_l27_n438(x)
+ end
+end
+
+def fun_l26_n65(x)
+ if (x < 1)
+ fun_l27_n960(x)
+ else
+ fun_l27_n600(x)
+ end
+end
+
+def fun_l26_n66(x)
+ if (x < 1)
+ fun_l27_n100(x)
+ else
+ fun_l27_n699(x)
+ end
+end
+
+def fun_l26_n67(x)
+ if (x < 1)
+ fun_l27_n367(x)
+ else
+ fun_l27_n783(x)
+ end
+end
+
+def fun_l26_n68(x)
+ if (x < 1)
+ fun_l27_n691(x)
+ else
+ fun_l27_n996(x)
+ end
+end
+
+def fun_l26_n69(x)
+ if (x < 1)
+ fun_l27_n989(x)
+ else
+ fun_l27_n628(x)
+ end
+end
+
+def fun_l26_n70(x)
+ if (x < 1)
+ fun_l27_n139(x)
+ else
+ fun_l27_n4(x)
+ end
+end
+
+def fun_l26_n71(x)
+ if (x < 1)
+ fun_l27_n890(x)
+ else
+ fun_l27_n88(x)
+ end
+end
+
+def fun_l26_n72(x)
+ if (x < 1)
+ fun_l27_n35(x)
+ else
+ fun_l27_n991(x)
+ end
+end
+
+def fun_l26_n73(x)
+ if (x < 1)
+ fun_l27_n613(x)
+ else
+ fun_l27_n836(x)
+ end
+end
+
+def fun_l26_n74(x)
+ if (x < 1)
+ fun_l27_n739(x)
+ else
+ fun_l27_n455(x)
+ end
+end
+
+def fun_l26_n75(x)
+ if (x < 1)
+ fun_l27_n382(x)
+ else
+ fun_l27_n909(x)
+ end
+end
+
+def fun_l26_n76(x)
+ if (x < 1)
+ fun_l27_n480(x)
+ else
+ fun_l27_n178(x)
+ end
+end
+
+def fun_l26_n77(x)
+ if (x < 1)
+ fun_l27_n180(x)
+ else
+ fun_l27_n577(x)
+ end
+end
+
+def fun_l26_n78(x)
+ if (x < 1)
+ fun_l27_n910(x)
+ else
+ fun_l27_n659(x)
+ end
+end
+
+def fun_l26_n79(x)
+ if (x < 1)
+ fun_l27_n710(x)
+ else
+ fun_l27_n159(x)
+ end
+end
+
+def fun_l26_n80(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n367(x)
+ end
+end
+
+def fun_l26_n81(x)
+ if (x < 1)
+ fun_l27_n935(x)
+ else
+ fun_l27_n389(x)
+ end
+end
+
+def fun_l26_n82(x)
+ if (x < 1)
+ fun_l27_n782(x)
+ else
+ fun_l27_n333(x)
+ end
+end
+
+def fun_l26_n83(x)
+ if (x < 1)
+ fun_l27_n85(x)
+ else
+ fun_l27_n122(x)
+ end
+end
+
+def fun_l26_n84(x)
+ if (x < 1)
+ fun_l27_n722(x)
+ else
+ fun_l27_n937(x)
+ end
+end
+
+def fun_l26_n85(x)
+ if (x < 1)
+ fun_l27_n403(x)
+ else
+ fun_l27_n270(x)
+ end
+end
+
+def fun_l26_n86(x)
+ if (x < 1)
+ fun_l27_n987(x)
+ else
+ fun_l27_n622(x)
+ end
+end
+
+def fun_l26_n87(x)
+ if (x < 1)
+ fun_l27_n316(x)
+ else
+ fun_l27_n519(x)
+ end
+end
+
+def fun_l26_n88(x)
+ if (x < 1)
+ fun_l27_n503(x)
+ else
+ fun_l27_n320(x)
+ end
+end
+
+def fun_l26_n89(x)
+ if (x < 1)
+ fun_l27_n936(x)
+ else
+ fun_l27_n77(x)
+ end
+end
+
+def fun_l26_n90(x)
+ if (x < 1)
+ fun_l27_n875(x)
+ else
+ fun_l27_n857(x)
+ end
+end
+
+def fun_l26_n91(x)
+ if (x < 1)
+ fun_l27_n277(x)
+ else
+ fun_l27_n231(x)
+ end
+end
+
+def fun_l26_n92(x)
+ if (x < 1)
+ fun_l27_n743(x)
+ else
+ fun_l27_n468(x)
+ end
+end
+
+def fun_l26_n93(x)
+ if (x < 1)
+ fun_l27_n997(x)
+ else
+ fun_l27_n49(x)
+ end
+end
+
+def fun_l26_n94(x)
+ if (x < 1)
+ fun_l27_n410(x)
+ else
+ fun_l27_n123(x)
+ end
+end
+
+def fun_l26_n95(x)
+ if (x < 1)
+ fun_l27_n696(x)
+ else
+ fun_l27_n799(x)
+ end
+end
+
+def fun_l26_n96(x)
+ if (x < 1)
+ fun_l27_n47(x)
+ else
+ fun_l27_n195(x)
+ end
+end
+
+def fun_l26_n97(x)
+ if (x < 1)
+ fun_l27_n559(x)
+ else
+ fun_l27_n242(x)
+ end
+end
+
+def fun_l26_n98(x)
+ if (x < 1)
+ fun_l27_n407(x)
+ else
+ fun_l27_n797(x)
+ end
+end
+
+def fun_l26_n99(x)
+ if (x < 1)
+ fun_l27_n886(x)
+ else
+ fun_l27_n253(x)
+ end
+end
+
+def fun_l26_n100(x)
+ if (x < 1)
+ fun_l27_n753(x)
+ else
+ fun_l27_n103(x)
+ end
+end
+
+def fun_l26_n101(x)
+ if (x < 1)
+ fun_l27_n717(x)
+ else
+ fun_l27_n596(x)
+ end
+end
+
+def fun_l26_n102(x)
+ if (x < 1)
+ fun_l27_n88(x)
+ else
+ fun_l27_n916(x)
+ end
+end
+
+def fun_l26_n103(x)
+ if (x < 1)
+ fun_l27_n504(x)
+ else
+ fun_l27_n91(x)
+ end
+end
+
+def fun_l26_n104(x)
+ if (x < 1)
+ fun_l27_n418(x)
+ else
+ fun_l27_n810(x)
+ end
+end
+
+def fun_l26_n105(x)
+ if (x < 1)
+ fun_l27_n736(x)
+ else
+ fun_l27_n515(x)
+ end
+end
+
+def fun_l26_n106(x)
+ if (x < 1)
+ fun_l27_n450(x)
+ else
+ fun_l27_n778(x)
+ end
+end
+
+def fun_l26_n107(x)
+ if (x < 1)
+ fun_l27_n670(x)
+ else
+ fun_l27_n483(x)
+ end
+end
+
+def fun_l26_n108(x)
+ if (x < 1)
+ fun_l27_n592(x)
+ else
+ fun_l27_n638(x)
+ end
+end
+
+def fun_l26_n109(x)
+ if (x < 1)
+ fun_l27_n803(x)
+ else
+ fun_l27_n865(x)
+ end
+end
+
+def fun_l26_n110(x)
+ if (x < 1)
+ fun_l27_n555(x)
+ else
+ fun_l27_n123(x)
+ end
+end
+
+def fun_l26_n111(x)
+ if (x < 1)
+ fun_l27_n5(x)
+ else
+ fun_l27_n768(x)
+ end
+end
+
+def fun_l26_n112(x)
+ if (x < 1)
+ fun_l27_n452(x)
+ else
+ fun_l27_n356(x)
+ end
+end
+
+def fun_l26_n113(x)
+ if (x < 1)
+ fun_l27_n353(x)
+ else
+ fun_l27_n513(x)
+ end
+end
+
+def fun_l26_n114(x)
+ if (x < 1)
+ fun_l27_n859(x)
+ else
+ fun_l27_n851(x)
+ end
+end
+
+def fun_l26_n115(x)
+ if (x < 1)
+ fun_l27_n47(x)
+ else
+ fun_l27_n206(x)
+ end
+end
+
+def fun_l26_n116(x)
+ if (x < 1)
+ fun_l27_n260(x)
+ else
+ fun_l27_n746(x)
+ end
+end
+
+def fun_l26_n117(x)
+ if (x < 1)
+ fun_l27_n733(x)
+ else
+ fun_l27_n906(x)
+ end
+end
+
+def fun_l26_n118(x)
+ if (x < 1)
+ fun_l27_n40(x)
+ else
+ fun_l27_n467(x)
+ end
+end
+
+def fun_l26_n119(x)
+ if (x < 1)
+ fun_l27_n764(x)
+ else
+ fun_l27_n69(x)
+ end
+end
+
+def fun_l26_n120(x)
+ if (x < 1)
+ fun_l27_n851(x)
+ else
+ fun_l27_n905(x)
+ end
+end
+
+def fun_l26_n121(x)
+ if (x < 1)
+ fun_l27_n793(x)
+ else
+ fun_l27_n169(x)
+ end
+end
+
+def fun_l26_n122(x)
+ if (x < 1)
+ fun_l27_n126(x)
+ else
+ fun_l27_n440(x)
+ end
+end
+
+def fun_l26_n123(x)
+ if (x < 1)
+ fun_l27_n147(x)
+ else
+ fun_l27_n720(x)
+ end
+end
+
+def fun_l26_n124(x)
+ if (x < 1)
+ fun_l27_n843(x)
+ else
+ fun_l27_n789(x)
+ end
+end
+
+def fun_l26_n125(x)
+ if (x < 1)
+ fun_l27_n927(x)
+ else
+ fun_l27_n364(x)
+ end
+end
+
+def fun_l26_n126(x)
+ if (x < 1)
+ fun_l27_n203(x)
+ else
+ fun_l27_n344(x)
+ end
+end
+
+def fun_l26_n127(x)
+ if (x < 1)
+ fun_l27_n398(x)
+ else
+ fun_l27_n202(x)
+ end
+end
+
+def fun_l26_n128(x)
+ if (x < 1)
+ fun_l27_n216(x)
+ else
+ fun_l27_n344(x)
+ end
+end
+
+def fun_l26_n129(x)
+ if (x < 1)
+ fun_l27_n496(x)
+ else
+ fun_l27_n40(x)
+ end
+end
+
+def fun_l26_n130(x)
+ if (x < 1)
+ fun_l27_n615(x)
+ else
+ fun_l27_n762(x)
+ end
+end
+
+def fun_l26_n131(x)
+ if (x < 1)
+ fun_l27_n642(x)
+ else
+ fun_l27_n329(x)
+ end
+end
+
+def fun_l26_n132(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n436(x)
+ end
+end
+
+def fun_l26_n133(x)
+ if (x < 1)
+ fun_l27_n502(x)
+ else
+ fun_l27_n176(x)
+ end
+end
+
+def fun_l26_n134(x)
+ if (x < 1)
+ fun_l27_n591(x)
+ else
+ fun_l27_n119(x)
+ end
+end
+
+def fun_l26_n135(x)
+ if (x < 1)
+ fun_l27_n946(x)
+ else
+ fun_l27_n963(x)
+ end
+end
+
+def fun_l26_n136(x)
+ if (x < 1)
+ fun_l27_n688(x)
+ else
+ fun_l27_n44(x)
+ end
+end
+
+def fun_l26_n137(x)
+ if (x < 1)
+ fun_l27_n786(x)
+ else
+ fun_l27_n965(x)
+ end
+end
+
+def fun_l26_n138(x)
+ if (x < 1)
+ fun_l27_n259(x)
+ else
+ fun_l27_n63(x)
+ end
+end
+
+def fun_l26_n139(x)
+ if (x < 1)
+ fun_l27_n568(x)
+ else
+ fun_l27_n129(x)
+ end
+end
+
+def fun_l26_n140(x)
+ if (x < 1)
+ fun_l27_n255(x)
+ else
+ fun_l27_n873(x)
+ end
+end
+
+def fun_l26_n141(x)
+ if (x < 1)
+ fun_l27_n777(x)
+ else
+ fun_l27_n86(x)
+ end
+end
+
+def fun_l26_n142(x)
+ if (x < 1)
+ fun_l27_n134(x)
+ else
+ fun_l27_n569(x)
+ end
+end
+
+def fun_l26_n143(x)
+ if (x < 1)
+ fun_l27_n147(x)
+ else
+ fun_l27_n388(x)
+ end
+end
+
+def fun_l26_n144(x)
+ if (x < 1)
+ fun_l27_n633(x)
+ else
+ fun_l27_n256(x)
+ end
+end
+
+def fun_l26_n145(x)
+ if (x < 1)
+ fun_l27_n38(x)
+ else
+ fun_l27_n94(x)
+ end
+end
+
+def fun_l26_n146(x)
+ if (x < 1)
+ fun_l27_n710(x)
+ else
+ fun_l27_n489(x)
+ end
+end
+
+def fun_l26_n147(x)
+ if (x < 1)
+ fun_l27_n187(x)
+ else
+ fun_l27_n252(x)
+ end
+end
+
+def fun_l26_n148(x)
+ if (x < 1)
+ fun_l27_n978(x)
+ else
+ fun_l27_n835(x)
+ end
+end
+
+def fun_l26_n149(x)
+ if (x < 1)
+ fun_l27_n759(x)
+ else
+ fun_l27_n742(x)
+ end
+end
+
+def fun_l26_n150(x)
+ if (x < 1)
+ fun_l27_n438(x)
+ else
+ fun_l27_n808(x)
+ end
+end
+
+def fun_l26_n151(x)
+ if (x < 1)
+ fun_l27_n424(x)
+ else
+ fun_l27_n54(x)
+ end
+end
+
+def fun_l26_n152(x)
+ if (x < 1)
+ fun_l27_n455(x)
+ else
+ fun_l27_n953(x)
+ end
+end
+
+def fun_l26_n153(x)
+ if (x < 1)
+ fun_l27_n13(x)
+ else
+ fun_l27_n330(x)
+ end
+end
+
+def fun_l26_n154(x)
+ if (x < 1)
+ fun_l27_n399(x)
+ else
+ fun_l27_n81(x)
+ end
+end
+
+def fun_l26_n155(x)
+ if (x < 1)
+ fun_l27_n356(x)
+ else
+ fun_l27_n237(x)
+ end
+end
+
+def fun_l26_n156(x)
+ if (x < 1)
+ fun_l27_n636(x)
+ else
+ fun_l27_n446(x)
+ end
+end
+
+def fun_l26_n157(x)
+ if (x < 1)
+ fun_l27_n715(x)
+ else
+ fun_l27_n800(x)
+ end
+end
+
+def fun_l26_n158(x)
+ if (x < 1)
+ fun_l27_n284(x)
+ else
+ fun_l27_n280(x)
+ end
+end
+
+def fun_l26_n159(x)
+ if (x < 1)
+ fun_l27_n41(x)
+ else
+ fun_l27_n65(x)
+ end
+end
+
+def fun_l26_n160(x)
+ if (x < 1)
+ fun_l27_n691(x)
+ else
+ fun_l27_n76(x)
+ end
+end
+
+def fun_l26_n161(x)
+ if (x < 1)
+ fun_l27_n863(x)
+ else
+ fun_l27_n878(x)
+ end
+end
+
+def fun_l26_n162(x)
+ if (x < 1)
+ fun_l27_n694(x)
+ else
+ fun_l27_n5(x)
+ end
+end
+
+def fun_l26_n163(x)
+ if (x < 1)
+ fun_l27_n16(x)
+ else
+ fun_l27_n644(x)
+ end
+end
+
+def fun_l26_n164(x)
+ if (x < 1)
+ fun_l27_n760(x)
+ else
+ fun_l27_n167(x)
+ end
+end
+
+def fun_l26_n165(x)
+ if (x < 1)
+ fun_l27_n884(x)
+ else
+ fun_l27_n297(x)
+ end
+end
+
+def fun_l26_n166(x)
+ if (x < 1)
+ fun_l27_n707(x)
+ else
+ fun_l27_n456(x)
+ end
+end
+
+def fun_l26_n167(x)
+ if (x < 1)
+ fun_l27_n140(x)
+ else
+ fun_l27_n143(x)
+ end
+end
+
+def fun_l26_n168(x)
+ if (x < 1)
+ fun_l27_n581(x)
+ else
+ fun_l27_n369(x)
+ end
+end
+
+def fun_l26_n169(x)
+ if (x < 1)
+ fun_l27_n538(x)
+ else
+ fun_l27_n276(x)
+ end
+end
+
+def fun_l26_n170(x)
+ if (x < 1)
+ fun_l27_n984(x)
+ else
+ fun_l27_n729(x)
+ end
+end
+
+def fun_l26_n171(x)
+ if (x < 1)
+ fun_l27_n274(x)
+ else
+ fun_l27_n519(x)
+ end
+end
+
+def fun_l26_n172(x)
+ if (x < 1)
+ fun_l27_n597(x)
+ else
+ fun_l27_n632(x)
+ end
+end
+
+def fun_l26_n173(x)
+ if (x < 1)
+ fun_l27_n485(x)
+ else
+ fun_l27_n130(x)
+ end
+end
+
+def fun_l26_n174(x)
+ if (x < 1)
+ fun_l27_n460(x)
+ else
+ fun_l27_n133(x)
+ end
+end
+
+def fun_l26_n175(x)
+ if (x < 1)
+ fun_l27_n512(x)
+ else
+ fun_l27_n252(x)
+ end
+end
+
+def fun_l26_n176(x)
+ if (x < 1)
+ fun_l27_n429(x)
+ else
+ fun_l27_n297(x)
+ end
+end
+
+def fun_l26_n177(x)
+ if (x < 1)
+ fun_l27_n497(x)
+ else
+ fun_l27_n845(x)
+ end
+end
+
+def fun_l26_n178(x)
+ if (x < 1)
+ fun_l27_n930(x)
+ else
+ fun_l27_n923(x)
+ end
+end
+
+def fun_l26_n179(x)
+ if (x < 1)
+ fun_l27_n218(x)
+ else
+ fun_l27_n921(x)
+ end
+end
+
+def fun_l26_n180(x)
+ if (x < 1)
+ fun_l27_n793(x)
+ else
+ fun_l27_n278(x)
+ end
+end
+
+def fun_l26_n181(x)
+ if (x < 1)
+ fun_l27_n606(x)
+ else
+ fun_l27_n9(x)
+ end
+end
+
+def fun_l26_n182(x)
+ if (x < 1)
+ fun_l27_n297(x)
+ else
+ fun_l27_n62(x)
+ end
+end
+
+def fun_l26_n183(x)
+ if (x < 1)
+ fun_l27_n174(x)
+ else
+ fun_l27_n698(x)
+ end
+end
+
+def fun_l26_n184(x)
+ if (x < 1)
+ fun_l27_n773(x)
+ else
+ fun_l27_n312(x)
+ end
+end
+
+def fun_l26_n185(x)
+ if (x < 1)
+ fun_l27_n75(x)
+ else
+ fun_l27_n65(x)
+ end
+end
+
+def fun_l26_n186(x)
+ if (x < 1)
+ fun_l27_n389(x)
+ else
+ fun_l27_n27(x)
+ end
+end
+
+def fun_l26_n187(x)
+ if (x < 1)
+ fun_l27_n674(x)
+ else
+ fun_l27_n70(x)
+ end
+end
+
+def fun_l26_n188(x)
+ if (x < 1)
+ fun_l27_n157(x)
+ else
+ fun_l27_n160(x)
+ end
+end
+
+def fun_l26_n189(x)
+ if (x < 1)
+ fun_l27_n401(x)
+ else
+ fun_l27_n340(x)
+ end
+end
+
+def fun_l26_n190(x)
+ if (x < 1)
+ fun_l27_n550(x)
+ else
+ fun_l27_n551(x)
+ end
+end
+
+def fun_l26_n191(x)
+ if (x < 1)
+ fun_l27_n971(x)
+ else
+ fun_l27_n925(x)
+ end
+end
+
+def fun_l26_n192(x)
+ if (x < 1)
+ fun_l27_n370(x)
+ else
+ fun_l27_n697(x)
+ end
+end
+
+def fun_l26_n193(x)
+ if (x < 1)
+ fun_l27_n188(x)
+ else
+ fun_l27_n989(x)
+ end
+end
+
+def fun_l26_n194(x)
+ if (x < 1)
+ fun_l27_n848(x)
+ else
+ fun_l27_n288(x)
+ end
+end
+
+def fun_l26_n195(x)
+ if (x < 1)
+ fun_l27_n886(x)
+ else
+ fun_l27_n554(x)
+ end
+end
+
+def fun_l26_n196(x)
+ if (x < 1)
+ fun_l27_n989(x)
+ else
+ fun_l27_n577(x)
+ end
+end
+
+def fun_l26_n197(x)
+ if (x < 1)
+ fun_l27_n55(x)
+ else
+ fun_l27_n951(x)
+ end
+end
+
+def fun_l26_n198(x)
+ if (x < 1)
+ fun_l27_n750(x)
+ else
+ fun_l27_n941(x)
+ end
+end
+
+def fun_l26_n199(x)
+ if (x < 1)
+ fun_l27_n468(x)
+ else
+ fun_l27_n64(x)
+ end
+end
+
+def fun_l26_n200(x)
+ if (x < 1)
+ fun_l27_n617(x)
+ else
+ fun_l27_n156(x)
+ end
+end
+
+def fun_l26_n201(x)
+ if (x < 1)
+ fun_l27_n119(x)
+ else
+ fun_l27_n63(x)
+ end
+end
+
+def fun_l26_n202(x)
+ if (x < 1)
+ fun_l27_n524(x)
+ else
+ fun_l27_n455(x)
+ end
+end
+
+def fun_l26_n203(x)
+ if (x < 1)
+ fun_l27_n489(x)
+ else
+ fun_l27_n328(x)
+ end
+end
+
+def fun_l26_n204(x)
+ if (x < 1)
+ fun_l27_n854(x)
+ else
+ fun_l27_n605(x)
+ end
+end
+
+def fun_l26_n205(x)
+ if (x < 1)
+ fun_l27_n591(x)
+ else
+ fun_l27_n787(x)
+ end
+end
+
+def fun_l26_n206(x)
+ if (x < 1)
+ fun_l27_n122(x)
+ else
+ fun_l27_n977(x)
+ end
+end
+
+def fun_l26_n207(x)
+ if (x < 1)
+ fun_l27_n204(x)
+ else
+ fun_l27_n652(x)
+ end
+end
+
+def fun_l26_n208(x)
+ if (x < 1)
+ fun_l27_n213(x)
+ else
+ fun_l27_n699(x)
+ end
+end
+
+def fun_l26_n209(x)
+ if (x < 1)
+ fun_l27_n731(x)
+ else
+ fun_l27_n910(x)
+ end
+end
+
+def fun_l26_n210(x)
+ if (x < 1)
+ fun_l27_n398(x)
+ else
+ fun_l27_n2(x)
+ end
+end
+
+def fun_l26_n211(x)
+ if (x < 1)
+ fun_l27_n132(x)
+ else
+ fun_l27_n574(x)
+ end
+end
+
+def fun_l26_n212(x)
+ if (x < 1)
+ fun_l27_n701(x)
+ else
+ fun_l27_n617(x)
+ end
+end
+
+def fun_l26_n213(x)
+ if (x < 1)
+ fun_l27_n486(x)
+ else
+ fun_l27_n861(x)
+ end
+end
+
+def fun_l26_n214(x)
+ if (x < 1)
+ fun_l27_n305(x)
+ else
+ fun_l27_n20(x)
+ end
+end
+
+def fun_l26_n215(x)
+ if (x < 1)
+ fun_l27_n598(x)
+ else
+ fun_l27_n842(x)
+ end
+end
+
+def fun_l26_n216(x)
+ if (x < 1)
+ fun_l27_n948(x)
+ else
+ fun_l27_n669(x)
+ end
+end
+
+def fun_l26_n217(x)
+ if (x < 1)
+ fun_l27_n344(x)
+ else
+ fun_l27_n101(x)
+ end
+end
+
+def fun_l26_n218(x)
+ if (x < 1)
+ fun_l27_n527(x)
+ else
+ fun_l27_n930(x)
+ end
+end
+
+def fun_l26_n219(x)
+ if (x < 1)
+ fun_l27_n889(x)
+ else
+ fun_l27_n380(x)
+ end
+end
+
+def fun_l26_n220(x)
+ if (x < 1)
+ fun_l27_n873(x)
+ else
+ fun_l27_n925(x)
+ end
+end
+
+def fun_l26_n221(x)
+ if (x < 1)
+ fun_l27_n403(x)
+ else
+ fun_l27_n280(x)
+ end
+end
+
+def fun_l26_n222(x)
+ if (x < 1)
+ fun_l27_n614(x)
+ else
+ fun_l27_n370(x)
+ end
+end
+
+def fun_l26_n223(x)
+ if (x < 1)
+ fun_l27_n543(x)
+ else
+ fun_l27_n543(x)
+ end
+end
+
+def fun_l26_n224(x)
+ if (x < 1)
+ fun_l27_n873(x)
+ else
+ fun_l27_n895(x)
+ end
+end
+
+def fun_l26_n225(x)
+ if (x < 1)
+ fun_l27_n665(x)
+ else
+ fun_l27_n259(x)
+ end
+end
+
+def fun_l26_n226(x)
+ if (x < 1)
+ fun_l27_n663(x)
+ else
+ fun_l27_n271(x)
+ end
+end
+
+def fun_l26_n227(x)
+ if (x < 1)
+ fun_l27_n816(x)
+ else
+ fun_l27_n353(x)
+ end
+end
+
+def fun_l26_n228(x)
+ if (x < 1)
+ fun_l27_n941(x)
+ else
+ fun_l27_n484(x)
+ end
+end
+
+def fun_l26_n229(x)
+ if (x < 1)
+ fun_l27_n455(x)
+ else
+ fun_l27_n385(x)
+ end
+end
+
+def fun_l26_n230(x)
+ if (x < 1)
+ fun_l27_n398(x)
+ else
+ fun_l27_n888(x)
+ end
+end
+
+def fun_l26_n231(x)
+ if (x < 1)
+ fun_l27_n93(x)
+ else
+ fun_l27_n297(x)
+ end
+end
+
+def fun_l26_n232(x)
+ if (x < 1)
+ fun_l27_n197(x)
+ else
+ fun_l27_n779(x)
+ end
+end
+
+def fun_l26_n233(x)
+ if (x < 1)
+ fun_l27_n826(x)
+ else
+ fun_l27_n835(x)
+ end
+end
+
+def fun_l26_n234(x)
+ if (x < 1)
+ fun_l27_n32(x)
+ else
+ fun_l27_n430(x)
+ end
+end
+
+def fun_l26_n235(x)
+ if (x < 1)
+ fun_l27_n133(x)
+ else
+ fun_l27_n743(x)
+ end
+end
+
+def fun_l26_n236(x)
+ if (x < 1)
+ fun_l27_n763(x)
+ else
+ fun_l27_n683(x)
+ end
+end
+
+def fun_l26_n237(x)
+ if (x < 1)
+ fun_l27_n211(x)
+ else
+ fun_l27_n726(x)
+ end
+end
+
+def fun_l26_n238(x)
+ if (x < 1)
+ fun_l27_n19(x)
+ else
+ fun_l27_n404(x)
+ end
+end
+
+def fun_l26_n239(x)
+ if (x < 1)
+ fun_l27_n635(x)
+ else
+ fun_l27_n427(x)
+ end
+end
+
+def fun_l26_n240(x)
+ if (x < 1)
+ fun_l27_n102(x)
+ else
+ fun_l27_n875(x)
+ end
+end
+
+def fun_l26_n241(x)
+ if (x < 1)
+ fun_l27_n930(x)
+ else
+ fun_l27_n189(x)
+ end
+end
+
+def fun_l26_n242(x)
+ if (x < 1)
+ fun_l27_n860(x)
+ else
+ fun_l27_n347(x)
+ end
+end
+
+def fun_l26_n243(x)
+ if (x < 1)
+ fun_l27_n826(x)
+ else
+ fun_l27_n848(x)
+ end
+end
+
+def fun_l26_n244(x)
+ if (x < 1)
+ fun_l27_n491(x)
+ else
+ fun_l27_n797(x)
+ end
+end
+
+def fun_l26_n245(x)
+ if (x < 1)
+ fun_l27_n361(x)
+ else
+ fun_l27_n382(x)
+ end
+end
+
+def fun_l26_n246(x)
+ if (x < 1)
+ fun_l27_n391(x)
+ else
+ fun_l27_n907(x)
+ end
+end
+
+def fun_l26_n247(x)
+ if (x < 1)
+ fun_l27_n352(x)
+ else
+ fun_l27_n501(x)
+ end
+end
+
+def fun_l26_n248(x)
+ if (x < 1)
+ fun_l27_n235(x)
+ else
+ fun_l27_n610(x)
+ end
+end
+
+def fun_l26_n249(x)
+ if (x < 1)
+ fun_l27_n970(x)
+ else
+ fun_l27_n561(x)
+ end
+end
+
+def fun_l26_n250(x)
+ if (x < 1)
+ fun_l27_n625(x)
+ else
+ fun_l27_n526(x)
+ end
+end
+
+def fun_l26_n251(x)
+ if (x < 1)
+ fun_l27_n185(x)
+ else
+ fun_l27_n911(x)
+ end
+end
+
+def fun_l26_n252(x)
+ if (x < 1)
+ fun_l27_n426(x)
+ else
+ fun_l27_n247(x)
+ end
+end
+
+def fun_l26_n253(x)
+ if (x < 1)
+ fun_l27_n874(x)
+ else
+ fun_l27_n28(x)
+ end
+end
+
+def fun_l26_n254(x)
+ if (x < 1)
+ fun_l27_n178(x)
+ else
+ fun_l27_n290(x)
+ end
+end
+
+def fun_l26_n255(x)
+ if (x < 1)
+ fun_l27_n218(x)
+ else
+ fun_l27_n816(x)
+ end
+end
+
+def fun_l26_n256(x)
+ if (x < 1)
+ fun_l27_n27(x)
+ else
+ fun_l27_n896(x)
+ end
+end
+
+def fun_l26_n257(x)
+ if (x < 1)
+ fun_l27_n690(x)
+ else
+ fun_l27_n27(x)
+ end
+end
+
+def fun_l26_n258(x)
+ if (x < 1)
+ fun_l27_n549(x)
+ else
+ fun_l27_n481(x)
+ end
+end
+
+def fun_l26_n259(x)
+ if (x < 1)
+ fun_l27_n357(x)
+ else
+ fun_l27_n604(x)
+ end
+end
+
+def fun_l26_n260(x)
+ if (x < 1)
+ fun_l27_n731(x)
+ else
+ fun_l27_n111(x)
+ end
+end
+
+def fun_l26_n261(x)
+ if (x < 1)
+ fun_l27_n849(x)
+ else
+ fun_l27_n91(x)
+ end
+end
+
+def fun_l26_n262(x)
+ if (x < 1)
+ fun_l27_n686(x)
+ else
+ fun_l27_n969(x)
+ end
+end
+
+def fun_l26_n263(x)
+ if (x < 1)
+ fun_l27_n17(x)
+ else
+ fun_l27_n424(x)
+ end
+end
+
+def fun_l26_n264(x)
+ if (x < 1)
+ fun_l27_n25(x)
+ else
+ fun_l27_n487(x)
+ end
+end
+
+def fun_l26_n265(x)
+ if (x < 1)
+ fun_l27_n715(x)
+ else
+ fun_l27_n210(x)
+ end
+end
+
+def fun_l26_n266(x)
+ if (x < 1)
+ fun_l27_n997(x)
+ else
+ fun_l27_n563(x)
+ end
+end
+
+def fun_l26_n267(x)
+ if (x < 1)
+ fun_l27_n489(x)
+ else
+ fun_l27_n666(x)
+ end
+end
+
+def fun_l26_n268(x)
+ if (x < 1)
+ fun_l27_n85(x)
+ else
+ fun_l27_n780(x)
+ end
+end
+
+def fun_l26_n269(x)
+ if (x < 1)
+ fun_l27_n420(x)
+ else
+ fun_l27_n897(x)
+ end
+end
+
+def fun_l26_n270(x)
+ if (x < 1)
+ fun_l27_n152(x)
+ else
+ fun_l27_n841(x)
+ end
+end
+
+def fun_l26_n271(x)
+ if (x < 1)
+ fun_l27_n60(x)
+ else
+ fun_l27_n808(x)
+ end
+end
+
+def fun_l26_n272(x)
+ if (x < 1)
+ fun_l27_n27(x)
+ else
+ fun_l27_n69(x)
+ end
+end
+
+def fun_l26_n273(x)
+ if (x < 1)
+ fun_l27_n992(x)
+ else
+ fun_l27_n306(x)
+ end
+end
+
+def fun_l26_n274(x)
+ if (x < 1)
+ fun_l27_n893(x)
+ else
+ fun_l27_n837(x)
+ end
+end
+
+def fun_l26_n275(x)
+ if (x < 1)
+ fun_l27_n617(x)
+ else
+ fun_l27_n628(x)
+ end
+end
+
+def fun_l26_n276(x)
+ if (x < 1)
+ fun_l27_n402(x)
+ else
+ fun_l27_n766(x)
+ end
+end
+
+def fun_l26_n277(x)
+ if (x < 1)
+ fun_l27_n692(x)
+ else
+ fun_l27_n999(x)
+ end
+end
+
+def fun_l26_n278(x)
+ if (x < 1)
+ fun_l27_n896(x)
+ else
+ fun_l27_n941(x)
+ end
+end
+
+def fun_l26_n279(x)
+ if (x < 1)
+ fun_l27_n440(x)
+ else
+ fun_l27_n888(x)
+ end
+end
+
+def fun_l26_n280(x)
+ if (x < 1)
+ fun_l27_n350(x)
+ else
+ fun_l27_n19(x)
+ end
+end
+
+def fun_l26_n281(x)
+ if (x < 1)
+ fun_l27_n324(x)
+ else
+ fun_l27_n63(x)
+ end
+end
+
+def fun_l26_n282(x)
+ if (x < 1)
+ fun_l27_n422(x)
+ else
+ fun_l27_n369(x)
+ end
+end
+
+def fun_l26_n283(x)
+ if (x < 1)
+ fun_l27_n629(x)
+ else
+ fun_l27_n200(x)
+ end
+end
+
+def fun_l26_n284(x)
+ if (x < 1)
+ fun_l27_n466(x)
+ else
+ fun_l27_n392(x)
+ end
+end
+
+def fun_l26_n285(x)
+ if (x < 1)
+ fun_l27_n995(x)
+ else
+ fun_l27_n374(x)
+ end
+end
+
+def fun_l26_n286(x)
+ if (x < 1)
+ fun_l27_n808(x)
+ else
+ fun_l27_n529(x)
+ end
+end
+
+def fun_l26_n287(x)
+ if (x < 1)
+ fun_l27_n764(x)
+ else
+ fun_l27_n155(x)
+ end
+end
+
+def fun_l26_n288(x)
+ if (x < 1)
+ fun_l27_n282(x)
+ else
+ fun_l27_n676(x)
+ end
+end
+
+def fun_l26_n289(x)
+ if (x < 1)
+ fun_l27_n797(x)
+ else
+ fun_l27_n462(x)
+ end
+end
+
+def fun_l26_n290(x)
+ if (x < 1)
+ fun_l27_n572(x)
+ else
+ fun_l27_n909(x)
+ end
+end
+
+def fun_l26_n291(x)
+ if (x < 1)
+ fun_l27_n401(x)
+ else
+ fun_l27_n906(x)
+ end
+end
+
+def fun_l26_n292(x)
+ if (x < 1)
+ fun_l27_n680(x)
+ else
+ fun_l27_n922(x)
+ end
+end
+
+def fun_l26_n293(x)
+ if (x < 1)
+ fun_l27_n876(x)
+ else
+ fun_l27_n882(x)
+ end
+end
+
+def fun_l26_n294(x)
+ if (x < 1)
+ fun_l27_n40(x)
+ else
+ fun_l27_n752(x)
+ end
+end
+
+def fun_l26_n295(x)
+ if (x < 1)
+ fun_l27_n164(x)
+ else
+ fun_l27_n479(x)
+ end
+end
+
+def fun_l26_n296(x)
+ if (x < 1)
+ fun_l27_n836(x)
+ else
+ fun_l27_n956(x)
+ end
+end
+
+def fun_l26_n297(x)
+ if (x < 1)
+ fun_l27_n197(x)
+ else
+ fun_l27_n135(x)
+ end
+end
+
+def fun_l26_n298(x)
+ if (x < 1)
+ fun_l27_n289(x)
+ else
+ fun_l27_n314(x)
+ end
+end
+
+def fun_l26_n299(x)
+ if (x < 1)
+ fun_l27_n942(x)
+ else
+ fun_l27_n747(x)
+ end
+end
+
+def fun_l26_n300(x)
+ if (x < 1)
+ fun_l27_n4(x)
+ else
+ fun_l27_n355(x)
+ end
+end
+
+def fun_l26_n301(x)
+ if (x < 1)
+ fun_l27_n616(x)
+ else
+ fun_l27_n681(x)
+ end
+end
+
+def fun_l26_n302(x)
+ if (x < 1)
+ fun_l27_n175(x)
+ else
+ fun_l27_n859(x)
+ end
+end
+
+def fun_l26_n303(x)
+ if (x < 1)
+ fun_l27_n323(x)
+ else
+ fun_l27_n491(x)
+ end
+end
+
+def fun_l26_n304(x)
+ if (x < 1)
+ fun_l27_n630(x)
+ else
+ fun_l27_n821(x)
+ end
+end
+
+def fun_l26_n305(x)
+ if (x < 1)
+ fun_l27_n416(x)
+ else
+ fun_l27_n927(x)
+ end
+end
+
+def fun_l26_n306(x)
+ if (x < 1)
+ fun_l27_n80(x)
+ else
+ fun_l27_n69(x)
+ end
+end
+
+def fun_l26_n307(x)
+ if (x < 1)
+ fun_l27_n209(x)
+ else
+ fun_l27_n476(x)
+ end
+end
+
+def fun_l26_n308(x)
+ if (x < 1)
+ fun_l27_n201(x)
+ else
+ fun_l27_n18(x)
+ end
+end
+
+def fun_l26_n309(x)
+ if (x < 1)
+ fun_l27_n712(x)
+ else
+ fun_l27_n697(x)
+ end
+end
+
+def fun_l26_n310(x)
+ if (x < 1)
+ fun_l27_n815(x)
+ else
+ fun_l27_n626(x)
+ end
+end
+
+def fun_l26_n311(x)
+ if (x < 1)
+ fun_l27_n159(x)
+ else
+ fun_l27_n483(x)
+ end
+end
+
+def fun_l26_n312(x)
+ if (x < 1)
+ fun_l27_n304(x)
+ else
+ fun_l27_n260(x)
+ end
+end
+
+def fun_l26_n313(x)
+ if (x < 1)
+ fun_l27_n15(x)
+ else
+ fun_l27_n50(x)
+ end
+end
+
+def fun_l26_n314(x)
+ if (x < 1)
+ fun_l27_n748(x)
+ else
+ fun_l27_n71(x)
+ end
+end
+
+def fun_l26_n315(x)
+ if (x < 1)
+ fun_l27_n957(x)
+ else
+ fun_l27_n90(x)
+ end
+end
+
+def fun_l26_n316(x)
+ if (x < 1)
+ fun_l27_n189(x)
+ else
+ fun_l27_n276(x)
+ end
+end
+
+def fun_l26_n317(x)
+ if (x < 1)
+ fun_l27_n926(x)
+ else
+ fun_l27_n916(x)
+ end
+end
+
+def fun_l26_n318(x)
+ if (x < 1)
+ fun_l27_n74(x)
+ else
+ fun_l27_n395(x)
+ end
+end
+
+def fun_l26_n319(x)
+ if (x < 1)
+ fun_l27_n424(x)
+ else
+ fun_l27_n826(x)
+ end
+end
+
+def fun_l26_n320(x)
+ if (x < 1)
+ fun_l27_n321(x)
+ else
+ fun_l27_n553(x)
+ end
+end
+
+def fun_l26_n321(x)
+ if (x < 1)
+ fun_l27_n906(x)
+ else
+ fun_l27_n344(x)
+ end
+end
+
+def fun_l26_n322(x)
+ if (x < 1)
+ fun_l27_n706(x)
+ else
+ fun_l27_n189(x)
+ end
+end
+
+def fun_l26_n323(x)
+ if (x < 1)
+ fun_l27_n303(x)
+ else
+ fun_l27_n135(x)
+ end
+end
+
+def fun_l26_n324(x)
+ if (x < 1)
+ fun_l27_n103(x)
+ else
+ fun_l27_n579(x)
+ end
+end
+
+def fun_l26_n325(x)
+ if (x < 1)
+ fun_l27_n655(x)
+ else
+ fun_l27_n619(x)
+ end
+end
+
+def fun_l26_n326(x)
+ if (x < 1)
+ fun_l27_n119(x)
+ else
+ fun_l27_n950(x)
+ end
+end
+
+def fun_l26_n327(x)
+ if (x < 1)
+ fun_l27_n402(x)
+ else
+ fun_l27_n490(x)
+ end
+end
+
+def fun_l26_n328(x)
+ if (x < 1)
+ fun_l27_n6(x)
+ else
+ fun_l27_n844(x)
+ end
+end
+
+def fun_l26_n329(x)
+ if (x < 1)
+ fun_l27_n297(x)
+ else
+ fun_l27_n879(x)
+ end
+end
+
+def fun_l26_n330(x)
+ if (x < 1)
+ fun_l27_n747(x)
+ else
+ fun_l27_n701(x)
+ end
+end
+
+def fun_l26_n331(x)
+ if (x < 1)
+ fun_l27_n714(x)
+ else
+ fun_l27_n770(x)
+ end
+end
+
+def fun_l26_n332(x)
+ if (x < 1)
+ fun_l27_n377(x)
+ else
+ fun_l27_n434(x)
+ end
+end
+
+def fun_l26_n333(x)
+ if (x < 1)
+ fun_l27_n530(x)
+ else
+ fun_l27_n678(x)
+ end
+end
+
+def fun_l26_n334(x)
+ if (x < 1)
+ fun_l27_n28(x)
+ else
+ fun_l27_n154(x)
+ end
+end
+
+def fun_l26_n335(x)
+ if (x < 1)
+ fun_l27_n905(x)
+ else
+ fun_l27_n207(x)
+ end
+end
+
+def fun_l26_n336(x)
+ if (x < 1)
+ fun_l27_n537(x)
+ else
+ fun_l27_n426(x)
+ end
+end
+
+def fun_l26_n337(x)
+ if (x < 1)
+ fun_l27_n284(x)
+ else
+ fun_l27_n118(x)
+ end
+end
+
+def fun_l26_n338(x)
+ if (x < 1)
+ fun_l27_n40(x)
+ else
+ fun_l27_n123(x)
+ end
+end
+
+def fun_l26_n339(x)
+ if (x < 1)
+ fun_l27_n620(x)
+ else
+ fun_l27_n370(x)
+ end
+end
+
+def fun_l26_n340(x)
+ if (x < 1)
+ fun_l27_n946(x)
+ else
+ fun_l27_n994(x)
+ end
+end
+
+def fun_l26_n341(x)
+ if (x < 1)
+ fun_l27_n685(x)
+ else
+ fun_l27_n911(x)
+ end
+end
+
+def fun_l26_n342(x)
+ if (x < 1)
+ fun_l27_n641(x)
+ else
+ fun_l27_n339(x)
+ end
+end
+
+def fun_l26_n343(x)
+ if (x < 1)
+ fun_l27_n936(x)
+ else
+ fun_l27_n344(x)
+ end
+end
+
+def fun_l26_n344(x)
+ if (x < 1)
+ fun_l27_n822(x)
+ else
+ fun_l27_n939(x)
+ end
+end
+
+def fun_l26_n345(x)
+ if (x < 1)
+ fun_l27_n608(x)
+ else
+ fun_l27_n870(x)
+ end
+end
+
+def fun_l26_n346(x)
+ if (x < 1)
+ fun_l27_n211(x)
+ else
+ fun_l27_n124(x)
+ end
+end
+
+def fun_l26_n347(x)
+ if (x < 1)
+ fun_l27_n71(x)
+ else
+ fun_l27_n9(x)
+ end
+end
+
+def fun_l26_n348(x)
+ if (x < 1)
+ fun_l27_n68(x)
+ else
+ fun_l27_n51(x)
+ end
+end
+
+def fun_l26_n349(x)
+ if (x < 1)
+ fun_l27_n641(x)
+ else
+ fun_l27_n665(x)
+ end
+end
+
+def fun_l26_n350(x)
+ if (x < 1)
+ fun_l27_n516(x)
+ else
+ fun_l27_n364(x)
+ end
+end
+
+def fun_l26_n351(x)
+ if (x < 1)
+ fun_l27_n104(x)
+ else
+ fun_l27_n569(x)
+ end
+end
+
+def fun_l26_n352(x)
+ if (x < 1)
+ fun_l27_n90(x)
+ else
+ fun_l27_n565(x)
+ end
+end
+
+def fun_l26_n353(x)
+ if (x < 1)
+ fun_l27_n647(x)
+ else
+ fun_l27_n124(x)
+ end
+end
+
+def fun_l26_n354(x)
+ if (x < 1)
+ fun_l27_n332(x)
+ else
+ fun_l27_n368(x)
+ end
+end
+
+def fun_l26_n355(x)
+ if (x < 1)
+ fun_l27_n547(x)
+ else
+ fun_l27_n797(x)
+ end
+end
+
+def fun_l26_n356(x)
+ if (x < 1)
+ fun_l27_n462(x)
+ else
+ fun_l27_n503(x)
+ end
+end
+
+def fun_l26_n357(x)
+ if (x < 1)
+ fun_l27_n25(x)
+ else
+ fun_l27_n920(x)
+ end
+end
+
+def fun_l26_n358(x)
+ if (x < 1)
+ fun_l27_n891(x)
+ else
+ fun_l27_n136(x)
+ end
+end
+
+def fun_l26_n359(x)
+ if (x < 1)
+ fun_l27_n785(x)
+ else
+ fun_l27_n600(x)
+ end
+end
+
+def fun_l26_n360(x)
+ if (x < 1)
+ fun_l27_n945(x)
+ else
+ fun_l27_n617(x)
+ end
+end
+
+def fun_l26_n361(x)
+ if (x < 1)
+ fun_l27_n995(x)
+ else
+ fun_l27_n781(x)
+ end
+end
+
+def fun_l26_n362(x)
+ if (x < 1)
+ fun_l27_n553(x)
+ else
+ fun_l27_n650(x)
+ end
+end
+
+def fun_l26_n363(x)
+ if (x < 1)
+ fun_l27_n937(x)
+ else
+ fun_l27_n382(x)
+ end
+end
+
+def fun_l26_n364(x)
+ if (x < 1)
+ fun_l27_n946(x)
+ else
+ fun_l27_n980(x)
+ end
+end
+
+def fun_l26_n365(x)
+ if (x < 1)
+ fun_l27_n293(x)
+ else
+ fun_l27_n225(x)
+ end
+end
+
+def fun_l26_n366(x)
+ if (x < 1)
+ fun_l27_n872(x)
+ else
+ fun_l27_n535(x)
+ end
+end
+
+def fun_l26_n367(x)
+ if (x < 1)
+ fun_l27_n427(x)
+ else
+ fun_l27_n175(x)
+ end
+end
+
+def fun_l26_n368(x)
+ if (x < 1)
+ fun_l27_n111(x)
+ else
+ fun_l27_n379(x)
+ end
+end
+
+def fun_l26_n369(x)
+ if (x < 1)
+ fun_l27_n735(x)
+ else
+ fun_l27_n921(x)
+ end
+end
+
+def fun_l26_n370(x)
+ if (x < 1)
+ fun_l27_n818(x)
+ else
+ fun_l27_n189(x)
+ end
+end
+
+def fun_l26_n371(x)
+ if (x < 1)
+ fun_l27_n932(x)
+ else
+ fun_l27_n884(x)
+ end
+end
+
+def fun_l26_n372(x)
+ if (x < 1)
+ fun_l27_n40(x)
+ else
+ fun_l27_n732(x)
+ end
+end
+
+def fun_l26_n373(x)
+ if (x < 1)
+ fun_l27_n54(x)
+ else
+ fun_l27_n365(x)
+ end
+end
+
+def fun_l26_n374(x)
+ if (x < 1)
+ fun_l27_n742(x)
+ else
+ fun_l27_n319(x)
+ end
+end
+
+def fun_l26_n375(x)
+ if (x < 1)
+ fun_l27_n149(x)
+ else
+ fun_l27_n504(x)
+ end
+end
+
+def fun_l26_n376(x)
+ if (x < 1)
+ fun_l27_n185(x)
+ else
+ fun_l27_n458(x)
+ end
+end
+
+def fun_l26_n377(x)
+ if (x < 1)
+ fun_l27_n107(x)
+ else
+ fun_l27_n201(x)
+ end
+end
+
+def fun_l26_n378(x)
+ if (x < 1)
+ fun_l27_n94(x)
+ else
+ fun_l27_n173(x)
+ end
+end
+
+def fun_l26_n379(x)
+ if (x < 1)
+ fun_l27_n198(x)
+ else
+ fun_l27_n885(x)
+ end
+end
+
+def fun_l26_n380(x)
+ if (x < 1)
+ fun_l27_n164(x)
+ else
+ fun_l27_n23(x)
+ end
+end
+
+def fun_l26_n381(x)
+ if (x < 1)
+ fun_l27_n170(x)
+ else
+ fun_l27_n431(x)
+ end
+end
+
+def fun_l26_n382(x)
+ if (x < 1)
+ fun_l27_n679(x)
+ else
+ fun_l27_n613(x)
+ end
+end
+
+def fun_l26_n383(x)
+ if (x < 1)
+ fun_l27_n981(x)
+ else
+ fun_l27_n69(x)
+ end
+end
+
+def fun_l26_n384(x)
+ if (x < 1)
+ fun_l27_n600(x)
+ else
+ fun_l27_n544(x)
+ end
+end
+
+def fun_l26_n385(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n332(x)
+ end
+end
+
+def fun_l26_n386(x)
+ if (x < 1)
+ fun_l27_n63(x)
+ else
+ fun_l27_n597(x)
+ end
+end
+
+def fun_l26_n387(x)
+ if (x < 1)
+ fun_l27_n259(x)
+ else
+ fun_l27_n33(x)
+ end
+end
+
+def fun_l26_n388(x)
+ if (x < 1)
+ fun_l27_n363(x)
+ else
+ fun_l27_n765(x)
+ end
+end
+
+def fun_l26_n389(x)
+ if (x < 1)
+ fun_l27_n495(x)
+ else
+ fun_l27_n133(x)
+ end
+end
+
+def fun_l26_n390(x)
+ if (x < 1)
+ fun_l27_n62(x)
+ else
+ fun_l27_n462(x)
+ end
+end
+
+def fun_l26_n391(x)
+ if (x < 1)
+ fun_l27_n811(x)
+ else
+ fun_l27_n30(x)
+ end
+end
+
+def fun_l26_n392(x)
+ if (x < 1)
+ fun_l27_n222(x)
+ else
+ fun_l27_n451(x)
+ end
+end
+
+def fun_l26_n393(x)
+ if (x < 1)
+ fun_l27_n286(x)
+ else
+ fun_l27_n664(x)
+ end
+end
+
+def fun_l26_n394(x)
+ if (x < 1)
+ fun_l27_n935(x)
+ else
+ fun_l27_n392(x)
+ end
+end
+
+def fun_l26_n395(x)
+ if (x < 1)
+ fun_l27_n621(x)
+ else
+ fun_l27_n434(x)
+ end
+end
+
+def fun_l26_n396(x)
+ if (x < 1)
+ fun_l27_n318(x)
+ else
+ fun_l27_n410(x)
+ end
+end
+
+def fun_l26_n397(x)
+ if (x < 1)
+ fun_l27_n847(x)
+ else
+ fun_l27_n727(x)
+ end
+end
+
+def fun_l26_n398(x)
+ if (x < 1)
+ fun_l27_n705(x)
+ else
+ fun_l27_n453(x)
+ end
+end
+
+def fun_l26_n399(x)
+ if (x < 1)
+ fun_l27_n787(x)
+ else
+ fun_l27_n442(x)
+ end
+end
+
+def fun_l26_n400(x)
+ if (x < 1)
+ fun_l27_n854(x)
+ else
+ fun_l27_n885(x)
+ end
+end
+
+def fun_l26_n401(x)
+ if (x < 1)
+ fun_l27_n825(x)
+ else
+ fun_l27_n399(x)
+ end
+end
+
+def fun_l26_n402(x)
+ if (x < 1)
+ fun_l27_n420(x)
+ else
+ fun_l27_n747(x)
+ end
+end
+
+def fun_l26_n403(x)
+ if (x < 1)
+ fun_l27_n985(x)
+ else
+ fun_l27_n875(x)
+ end
+end
+
+def fun_l26_n404(x)
+ if (x < 1)
+ fun_l27_n193(x)
+ else
+ fun_l27_n448(x)
+ end
+end
+
+def fun_l26_n405(x)
+ if (x < 1)
+ fun_l27_n594(x)
+ else
+ fun_l27_n769(x)
+ end
+end
+
+def fun_l26_n406(x)
+ if (x < 1)
+ fun_l27_n774(x)
+ else
+ fun_l27_n44(x)
+ end
+end
+
+def fun_l26_n407(x)
+ if (x < 1)
+ fun_l27_n563(x)
+ else
+ fun_l27_n979(x)
+ end
+end
+
+def fun_l26_n408(x)
+ if (x < 1)
+ fun_l27_n369(x)
+ else
+ fun_l27_n825(x)
+ end
+end
+
+def fun_l26_n409(x)
+ if (x < 1)
+ fun_l27_n70(x)
+ else
+ fun_l27_n894(x)
+ end
+end
+
+def fun_l26_n410(x)
+ if (x < 1)
+ fun_l27_n651(x)
+ else
+ fun_l27_n224(x)
+ end
+end
+
+def fun_l26_n411(x)
+ if (x < 1)
+ fun_l27_n219(x)
+ else
+ fun_l27_n193(x)
+ end
+end
+
+def fun_l26_n412(x)
+ if (x < 1)
+ fun_l27_n16(x)
+ else
+ fun_l27_n113(x)
+ end
+end
+
+def fun_l26_n413(x)
+ if (x < 1)
+ fun_l27_n653(x)
+ else
+ fun_l27_n754(x)
+ end
+end
+
+def fun_l26_n414(x)
+ if (x < 1)
+ fun_l27_n682(x)
+ else
+ fun_l27_n378(x)
+ end
+end
+
+def fun_l26_n415(x)
+ if (x < 1)
+ fun_l27_n326(x)
+ else
+ fun_l27_n534(x)
+ end
+end
+
+def fun_l26_n416(x)
+ if (x < 1)
+ fun_l27_n552(x)
+ else
+ fun_l27_n627(x)
+ end
+end
+
+def fun_l26_n417(x)
+ if (x < 1)
+ fun_l27_n486(x)
+ else
+ fun_l27_n729(x)
+ end
+end
+
+def fun_l26_n418(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n220(x)
+ end
+end
+
+def fun_l26_n419(x)
+ if (x < 1)
+ fun_l27_n636(x)
+ else
+ fun_l27_n492(x)
+ end
+end
+
+def fun_l26_n420(x)
+ if (x < 1)
+ fun_l27_n692(x)
+ else
+ fun_l27_n7(x)
+ end
+end
+
+def fun_l26_n421(x)
+ if (x < 1)
+ fun_l27_n303(x)
+ else
+ fun_l27_n396(x)
+ end
+end
+
+def fun_l26_n422(x)
+ if (x < 1)
+ fun_l27_n937(x)
+ else
+ fun_l27_n940(x)
+ end
+end
+
+def fun_l26_n423(x)
+ if (x < 1)
+ fun_l27_n581(x)
+ else
+ fun_l27_n355(x)
+ end
+end
+
+def fun_l26_n424(x)
+ if (x < 1)
+ fun_l27_n743(x)
+ else
+ fun_l27_n636(x)
+ end
+end
+
+def fun_l26_n425(x)
+ if (x < 1)
+ fun_l27_n385(x)
+ else
+ fun_l27_n573(x)
+ end
+end
+
+def fun_l26_n426(x)
+ if (x < 1)
+ fun_l27_n595(x)
+ else
+ fun_l27_n873(x)
+ end
+end
+
+def fun_l26_n427(x)
+ if (x < 1)
+ fun_l27_n700(x)
+ else
+ fun_l27_n541(x)
+ end
+end
+
+def fun_l26_n428(x)
+ if (x < 1)
+ fun_l27_n445(x)
+ else
+ fun_l27_n239(x)
+ end
+end
+
+def fun_l26_n429(x)
+ if (x < 1)
+ fun_l27_n500(x)
+ else
+ fun_l27_n7(x)
+ end
+end
+
+def fun_l26_n430(x)
+ if (x < 1)
+ fun_l27_n615(x)
+ else
+ fun_l27_n383(x)
+ end
+end
+
+def fun_l26_n431(x)
+ if (x < 1)
+ fun_l27_n962(x)
+ else
+ fun_l27_n424(x)
+ end
+end
+
+def fun_l26_n432(x)
+ if (x < 1)
+ fun_l27_n289(x)
+ else
+ fun_l27_n142(x)
+ end
+end
+
+def fun_l26_n433(x)
+ if (x < 1)
+ fun_l27_n527(x)
+ else
+ fun_l27_n112(x)
+ end
+end
+
+def fun_l26_n434(x)
+ if (x < 1)
+ fun_l27_n884(x)
+ else
+ fun_l27_n509(x)
+ end
+end
+
+def fun_l26_n435(x)
+ if (x < 1)
+ fun_l27_n65(x)
+ else
+ fun_l27_n431(x)
+ end
+end
+
+def fun_l26_n436(x)
+ if (x < 1)
+ fun_l27_n324(x)
+ else
+ fun_l27_n885(x)
+ end
+end
+
+def fun_l26_n437(x)
+ if (x < 1)
+ fun_l27_n826(x)
+ else
+ fun_l27_n372(x)
+ end
+end
+
+def fun_l26_n438(x)
+ if (x < 1)
+ fun_l27_n291(x)
+ else
+ fun_l27_n793(x)
+ end
+end
+
+def fun_l26_n439(x)
+ if (x < 1)
+ fun_l27_n677(x)
+ else
+ fun_l27_n31(x)
+ end
+end
+
+def fun_l26_n440(x)
+ if (x < 1)
+ fun_l27_n948(x)
+ else
+ fun_l27_n320(x)
+ end
+end
+
+def fun_l26_n441(x)
+ if (x < 1)
+ fun_l27_n951(x)
+ else
+ fun_l27_n504(x)
+ end
+end
+
+def fun_l26_n442(x)
+ if (x < 1)
+ fun_l27_n388(x)
+ else
+ fun_l27_n1(x)
+ end
+end
+
+def fun_l26_n443(x)
+ if (x < 1)
+ fun_l27_n92(x)
+ else
+ fun_l27_n570(x)
+ end
+end
+
+def fun_l26_n444(x)
+ if (x < 1)
+ fun_l27_n956(x)
+ else
+ fun_l27_n120(x)
+ end
+end
+
+def fun_l26_n445(x)
+ if (x < 1)
+ fun_l27_n985(x)
+ else
+ fun_l27_n233(x)
+ end
+end
+
+def fun_l26_n446(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n590(x)
+ end
+end
+
+def fun_l26_n447(x)
+ if (x < 1)
+ fun_l27_n793(x)
+ else
+ fun_l27_n675(x)
+ end
+end
+
+def fun_l26_n448(x)
+ if (x < 1)
+ fun_l27_n351(x)
+ else
+ fun_l27_n781(x)
+ end
+end
+
+def fun_l26_n449(x)
+ if (x < 1)
+ fun_l27_n137(x)
+ else
+ fun_l27_n147(x)
+ end
+end
+
+def fun_l26_n450(x)
+ if (x < 1)
+ fun_l27_n138(x)
+ else
+ fun_l27_n636(x)
+ end
+end
+
+def fun_l26_n451(x)
+ if (x < 1)
+ fun_l27_n154(x)
+ else
+ fun_l27_n755(x)
+ end
+end
+
+def fun_l26_n452(x)
+ if (x < 1)
+ fun_l27_n665(x)
+ else
+ fun_l27_n65(x)
+ end
+end
+
+def fun_l26_n453(x)
+ if (x < 1)
+ fun_l27_n769(x)
+ else
+ fun_l27_n847(x)
+ end
+end
+
+def fun_l26_n454(x)
+ if (x < 1)
+ fun_l27_n959(x)
+ else
+ fun_l27_n731(x)
+ end
+end
+
+def fun_l26_n455(x)
+ if (x < 1)
+ fun_l27_n565(x)
+ else
+ fun_l27_n916(x)
+ end
+end
+
+def fun_l26_n456(x)
+ if (x < 1)
+ fun_l27_n421(x)
+ else
+ fun_l27_n57(x)
+ end
+end
+
+def fun_l26_n457(x)
+ if (x < 1)
+ fun_l27_n595(x)
+ else
+ fun_l27_n920(x)
+ end
+end
+
+def fun_l26_n458(x)
+ if (x < 1)
+ fun_l27_n660(x)
+ else
+ fun_l27_n835(x)
+ end
+end
+
+def fun_l26_n459(x)
+ if (x < 1)
+ fun_l27_n114(x)
+ else
+ fun_l27_n418(x)
+ end
+end
+
+def fun_l26_n460(x)
+ if (x < 1)
+ fun_l27_n744(x)
+ else
+ fun_l27_n674(x)
+ end
+end
+
+def fun_l26_n461(x)
+ if (x < 1)
+ fun_l27_n436(x)
+ else
+ fun_l27_n448(x)
+ end
+end
+
+def fun_l26_n462(x)
+ if (x < 1)
+ fun_l27_n796(x)
+ else
+ fun_l27_n960(x)
+ end
+end
+
+def fun_l26_n463(x)
+ if (x < 1)
+ fun_l27_n871(x)
+ else
+ fun_l27_n300(x)
+ end
+end
+
+def fun_l26_n464(x)
+ if (x < 1)
+ fun_l27_n942(x)
+ else
+ fun_l27_n625(x)
+ end
+end
+
+def fun_l26_n465(x)
+ if (x < 1)
+ fun_l27_n219(x)
+ else
+ fun_l27_n383(x)
+ end
+end
+
+def fun_l26_n466(x)
+ if (x < 1)
+ fun_l27_n440(x)
+ else
+ fun_l27_n177(x)
+ end
+end
+
+def fun_l26_n467(x)
+ if (x < 1)
+ fun_l27_n958(x)
+ else
+ fun_l27_n441(x)
+ end
+end
+
+def fun_l26_n468(x)
+ if (x < 1)
+ fun_l27_n899(x)
+ else
+ fun_l27_n613(x)
+ end
+end
+
+def fun_l26_n469(x)
+ if (x < 1)
+ fun_l27_n535(x)
+ else
+ fun_l27_n439(x)
+ end
+end
+
+def fun_l26_n470(x)
+ if (x < 1)
+ fun_l27_n18(x)
+ else
+ fun_l27_n716(x)
+ end
+end
+
+def fun_l26_n471(x)
+ if (x < 1)
+ fun_l27_n768(x)
+ else
+ fun_l27_n374(x)
+ end
+end
+
+def fun_l26_n472(x)
+ if (x < 1)
+ fun_l27_n537(x)
+ else
+ fun_l27_n434(x)
+ end
+end
+
+def fun_l26_n473(x)
+ if (x < 1)
+ fun_l27_n632(x)
+ else
+ fun_l27_n733(x)
+ end
+end
+
+def fun_l26_n474(x)
+ if (x < 1)
+ fun_l27_n347(x)
+ else
+ fun_l27_n562(x)
+ end
+end
+
+def fun_l26_n475(x)
+ if (x < 1)
+ fun_l27_n741(x)
+ else
+ fun_l27_n684(x)
+ end
+end
+
+def fun_l26_n476(x)
+ if (x < 1)
+ fun_l27_n222(x)
+ else
+ fun_l27_n41(x)
+ end
+end
+
+def fun_l26_n477(x)
+ if (x < 1)
+ fun_l27_n23(x)
+ else
+ fun_l27_n541(x)
+ end
+end
+
+def fun_l26_n478(x)
+ if (x < 1)
+ fun_l27_n588(x)
+ else
+ fun_l27_n394(x)
+ end
+end
+
+def fun_l26_n479(x)
+ if (x < 1)
+ fun_l27_n526(x)
+ else
+ fun_l27_n974(x)
+ end
+end
+
+def fun_l26_n480(x)
+ if (x < 1)
+ fun_l27_n845(x)
+ else
+ fun_l27_n528(x)
+ end
+end
+
+def fun_l26_n481(x)
+ if (x < 1)
+ fun_l27_n505(x)
+ else
+ fun_l27_n913(x)
+ end
+end
+
+def fun_l26_n482(x)
+ if (x < 1)
+ fun_l27_n100(x)
+ else
+ fun_l27_n233(x)
+ end
+end
+
+def fun_l26_n483(x)
+ if (x < 1)
+ fun_l27_n87(x)
+ else
+ fun_l27_n339(x)
+ end
+end
+
+def fun_l26_n484(x)
+ if (x < 1)
+ fun_l27_n744(x)
+ else
+ fun_l27_n404(x)
+ end
+end
+
+def fun_l26_n485(x)
+ if (x < 1)
+ fun_l27_n965(x)
+ else
+ fun_l27_n86(x)
+ end
+end
+
+def fun_l26_n486(x)
+ if (x < 1)
+ fun_l27_n826(x)
+ else
+ fun_l27_n25(x)
+ end
+end
+
+def fun_l26_n487(x)
+ if (x < 1)
+ fun_l27_n950(x)
+ else
+ fun_l27_n876(x)
+ end
+end
+
+def fun_l26_n488(x)
+ if (x < 1)
+ fun_l27_n964(x)
+ else
+ fun_l27_n60(x)
+ end
+end
+
+def fun_l26_n489(x)
+ if (x < 1)
+ fun_l27_n171(x)
+ else
+ fun_l27_n768(x)
+ end
+end
+
+def fun_l26_n490(x)
+ if (x < 1)
+ fun_l27_n391(x)
+ else
+ fun_l27_n308(x)
+ end
+end
+
+def fun_l26_n491(x)
+ if (x < 1)
+ fun_l27_n440(x)
+ else
+ fun_l27_n51(x)
+ end
+end
+
+def fun_l26_n492(x)
+ if (x < 1)
+ fun_l27_n403(x)
+ else
+ fun_l27_n956(x)
+ end
+end
+
+def fun_l26_n493(x)
+ if (x < 1)
+ fun_l27_n802(x)
+ else
+ fun_l27_n931(x)
+ end
+end
+
+def fun_l26_n494(x)
+ if (x < 1)
+ fun_l27_n7(x)
+ else
+ fun_l27_n291(x)
+ end
+end
+
+def fun_l26_n495(x)
+ if (x < 1)
+ fun_l27_n149(x)
+ else
+ fun_l27_n173(x)
+ end
+end
+
+def fun_l26_n496(x)
+ if (x < 1)
+ fun_l27_n864(x)
+ else
+ fun_l27_n488(x)
+ end
+end
+
+def fun_l26_n497(x)
+ if (x < 1)
+ fun_l27_n290(x)
+ else
+ fun_l27_n431(x)
+ end
+end
+
+def fun_l26_n498(x)
+ if (x < 1)
+ fun_l27_n269(x)
+ else
+ fun_l27_n622(x)
+ end
+end
+
+def fun_l26_n499(x)
+ if (x < 1)
+ fun_l27_n168(x)
+ else
+ fun_l27_n225(x)
+ end
+end
+
+def fun_l26_n500(x)
+ if (x < 1)
+ fun_l27_n512(x)
+ else
+ fun_l27_n363(x)
+ end
+end
+
+def fun_l26_n501(x)
+ if (x < 1)
+ fun_l27_n844(x)
+ else
+ fun_l27_n15(x)
+ end
+end
+
+def fun_l26_n502(x)
+ if (x < 1)
+ fun_l27_n242(x)
+ else
+ fun_l27_n479(x)
+ end
+end
+
+def fun_l26_n503(x)
+ if (x < 1)
+ fun_l27_n285(x)
+ else
+ fun_l27_n202(x)
+ end
+end
+
+def fun_l26_n504(x)
+ if (x < 1)
+ fun_l27_n64(x)
+ else
+ fun_l27_n223(x)
+ end
+end
+
+def fun_l26_n505(x)
+ if (x < 1)
+ fun_l27_n85(x)
+ else
+ fun_l27_n477(x)
+ end
+end
+
+def fun_l26_n506(x)
+ if (x < 1)
+ fun_l27_n360(x)
+ else
+ fun_l27_n406(x)
+ end
+end
+
+def fun_l26_n507(x)
+ if (x < 1)
+ fun_l27_n515(x)
+ else
+ fun_l27_n599(x)
+ end
+end
+
+def fun_l26_n508(x)
+ if (x < 1)
+ fun_l27_n848(x)
+ else
+ fun_l27_n832(x)
+ end
+end
+
+def fun_l26_n509(x)
+ if (x < 1)
+ fun_l27_n831(x)
+ else
+ fun_l27_n334(x)
+ end
+end
+
+def fun_l26_n510(x)
+ if (x < 1)
+ fun_l27_n53(x)
+ else
+ fun_l27_n937(x)
+ end
+end
+
+def fun_l26_n511(x)
+ if (x < 1)
+ fun_l27_n583(x)
+ else
+ fun_l27_n901(x)
+ end
+end
+
+def fun_l26_n512(x)
+ if (x < 1)
+ fun_l27_n394(x)
+ else
+ fun_l27_n135(x)
+ end
+end
+
+def fun_l26_n513(x)
+ if (x < 1)
+ fun_l27_n175(x)
+ else
+ fun_l27_n339(x)
+ end
+end
+
+def fun_l26_n514(x)
+ if (x < 1)
+ fun_l27_n200(x)
+ else
+ fun_l27_n124(x)
+ end
+end
+
+def fun_l26_n515(x)
+ if (x < 1)
+ fun_l27_n145(x)
+ else
+ fun_l27_n426(x)
+ end
+end
+
+def fun_l26_n516(x)
+ if (x < 1)
+ fun_l27_n803(x)
+ else
+ fun_l27_n466(x)
+ end
+end
+
+def fun_l26_n517(x)
+ if (x < 1)
+ fun_l27_n773(x)
+ else
+ fun_l27_n296(x)
+ end
+end
+
+def fun_l26_n518(x)
+ if (x < 1)
+ fun_l27_n957(x)
+ else
+ fun_l27_n373(x)
+ end
+end
+
+def fun_l26_n519(x)
+ if (x < 1)
+ fun_l27_n887(x)
+ else
+ fun_l27_n498(x)
+ end
+end
+
+def fun_l26_n520(x)
+ if (x < 1)
+ fun_l27_n629(x)
+ else
+ fun_l27_n477(x)
+ end
+end
+
+def fun_l26_n521(x)
+ if (x < 1)
+ fun_l27_n634(x)
+ else
+ fun_l27_n138(x)
+ end
+end
+
+def fun_l26_n522(x)
+ if (x < 1)
+ fun_l27_n942(x)
+ else
+ fun_l27_n853(x)
+ end
+end
+
+def fun_l26_n523(x)
+ if (x < 1)
+ fun_l27_n453(x)
+ else
+ fun_l27_n520(x)
+ end
+end
+
+def fun_l26_n524(x)
+ if (x < 1)
+ fun_l27_n125(x)
+ else
+ fun_l27_n922(x)
+ end
+end
+
+def fun_l26_n525(x)
+ if (x < 1)
+ fun_l27_n629(x)
+ else
+ fun_l27_n711(x)
+ end
+end
+
+def fun_l26_n526(x)
+ if (x < 1)
+ fun_l27_n243(x)
+ else
+ fun_l27_n374(x)
+ end
+end
+
+def fun_l26_n527(x)
+ if (x < 1)
+ fun_l27_n476(x)
+ else
+ fun_l27_n348(x)
+ end
+end
+
+def fun_l26_n528(x)
+ if (x < 1)
+ fun_l27_n532(x)
+ else
+ fun_l27_n156(x)
+ end
+end
+
+def fun_l26_n529(x)
+ if (x < 1)
+ fun_l27_n139(x)
+ else
+ fun_l27_n976(x)
+ end
+end
+
+def fun_l26_n530(x)
+ if (x < 1)
+ fun_l27_n323(x)
+ else
+ fun_l27_n48(x)
+ end
+end
+
+def fun_l26_n531(x)
+ if (x < 1)
+ fun_l27_n626(x)
+ else
+ fun_l27_n913(x)
+ end
+end
+
+def fun_l26_n532(x)
+ if (x < 1)
+ fun_l27_n98(x)
+ else
+ fun_l27_n369(x)
+ end
+end
+
+def fun_l26_n533(x)
+ if (x < 1)
+ fun_l27_n50(x)
+ else
+ fun_l27_n41(x)
+ end
+end
+
+def fun_l26_n534(x)
+ if (x < 1)
+ fun_l27_n163(x)
+ else
+ fun_l27_n722(x)
+ end
+end
+
+def fun_l26_n535(x)
+ if (x < 1)
+ fun_l27_n640(x)
+ else
+ fun_l27_n622(x)
+ end
+end
+
+def fun_l26_n536(x)
+ if (x < 1)
+ fun_l27_n98(x)
+ else
+ fun_l27_n970(x)
+ end
+end
+
+def fun_l26_n537(x)
+ if (x < 1)
+ fun_l27_n828(x)
+ else
+ fun_l27_n240(x)
+ end
+end
+
+def fun_l26_n538(x)
+ if (x < 1)
+ fun_l27_n303(x)
+ else
+ fun_l27_n116(x)
+ end
+end
+
+def fun_l26_n539(x)
+ if (x < 1)
+ fun_l27_n341(x)
+ else
+ fun_l27_n545(x)
+ end
+end
+
+def fun_l26_n540(x)
+ if (x < 1)
+ fun_l27_n476(x)
+ else
+ fun_l27_n943(x)
+ end
+end
+
+def fun_l26_n541(x)
+ if (x < 1)
+ fun_l27_n380(x)
+ else
+ fun_l27_n894(x)
+ end
+end
+
+def fun_l26_n542(x)
+ if (x < 1)
+ fun_l27_n330(x)
+ else
+ fun_l27_n96(x)
+ end
+end
+
+def fun_l26_n543(x)
+ if (x < 1)
+ fun_l27_n676(x)
+ else
+ fun_l27_n876(x)
+ end
+end
+
+def fun_l26_n544(x)
+ if (x < 1)
+ fun_l27_n396(x)
+ else
+ fun_l27_n116(x)
+ end
+end
+
+def fun_l26_n545(x)
+ if (x < 1)
+ fun_l27_n691(x)
+ else
+ fun_l27_n178(x)
+ end
+end
+
+def fun_l26_n546(x)
+ if (x < 1)
+ fun_l27_n118(x)
+ else
+ fun_l27_n956(x)
+ end
+end
+
+def fun_l26_n547(x)
+ if (x < 1)
+ fun_l27_n20(x)
+ else
+ fun_l27_n777(x)
+ end
+end
+
+def fun_l26_n548(x)
+ if (x < 1)
+ fun_l27_n522(x)
+ else
+ fun_l27_n808(x)
+ end
+end
+
+def fun_l26_n549(x)
+ if (x < 1)
+ fun_l27_n624(x)
+ else
+ fun_l27_n54(x)
+ end
+end
+
+def fun_l26_n550(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n243(x)
+ end
+end
+
+def fun_l26_n551(x)
+ if (x < 1)
+ fun_l27_n283(x)
+ else
+ fun_l27_n913(x)
+ end
+end
+
+def fun_l26_n552(x)
+ if (x < 1)
+ fun_l27_n101(x)
+ else
+ fun_l27_n136(x)
+ end
+end
+
+def fun_l26_n553(x)
+ if (x < 1)
+ fun_l27_n965(x)
+ else
+ fun_l27_n453(x)
+ end
+end
+
+def fun_l26_n554(x)
+ if (x < 1)
+ fun_l27_n807(x)
+ else
+ fun_l27_n442(x)
+ end
+end
+
+def fun_l26_n555(x)
+ if (x < 1)
+ fun_l27_n987(x)
+ else
+ fun_l27_n883(x)
+ end
+end
+
+def fun_l26_n556(x)
+ if (x < 1)
+ fun_l27_n475(x)
+ else
+ fun_l27_n439(x)
+ end
+end
+
+def fun_l26_n557(x)
+ if (x < 1)
+ fun_l27_n580(x)
+ else
+ fun_l27_n301(x)
+ end
+end
+
+def fun_l26_n558(x)
+ if (x < 1)
+ fun_l27_n91(x)
+ else
+ fun_l27_n514(x)
+ end
+end
+
+def fun_l26_n559(x)
+ if (x < 1)
+ fun_l27_n395(x)
+ else
+ fun_l27_n583(x)
+ end
+end
+
+def fun_l26_n560(x)
+ if (x < 1)
+ fun_l27_n81(x)
+ else
+ fun_l27_n817(x)
+ end
+end
+
+def fun_l26_n561(x)
+ if (x < 1)
+ fun_l27_n816(x)
+ else
+ fun_l27_n423(x)
+ end
+end
+
+def fun_l26_n562(x)
+ if (x < 1)
+ fun_l27_n513(x)
+ else
+ fun_l27_n577(x)
+ end
+end
+
+def fun_l26_n563(x)
+ if (x < 1)
+ fun_l27_n864(x)
+ else
+ fun_l27_n249(x)
+ end
+end
+
+def fun_l26_n564(x)
+ if (x < 1)
+ fun_l27_n408(x)
+ else
+ fun_l27_n281(x)
+ end
+end
+
+def fun_l26_n565(x)
+ if (x < 1)
+ fun_l27_n963(x)
+ else
+ fun_l27_n736(x)
+ end
+end
+
+def fun_l26_n566(x)
+ if (x < 1)
+ fun_l27_n366(x)
+ else
+ fun_l27_n774(x)
+ end
+end
+
+def fun_l26_n567(x)
+ if (x < 1)
+ fun_l27_n239(x)
+ else
+ fun_l27_n473(x)
+ end
+end
+
+def fun_l26_n568(x)
+ if (x < 1)
+ fun_l27_n272(x)
+ else
+ fun_l27_n790(x)
+ end
+end
+
+def fun_l26_n569(x)
+ if (x < 1)
+ fun_l27_n225(x)
+ else
+ fun_l27_n970(x)
+ end
+end
+
+def fun_l26_n570(x)
+ if (x < 1)
+ fun_l27_n631(x)
+ else
+ fun_l27_n988(x)
+ end
+end
+
+def fun_l26_n571(x)
+ if (x < 1)
+ fun_l27_n224(x)
+ else
+ fun_l27_n286(x)
+ end
+end
+
+def fun_l26_n572(x)
+ if (x < 1)
+ fun_l27_n141(x)
+ else
+ fun_l27_n573(x)
+ end
+end
+
+def fun_l26_n573(x)
+ if (x < 1)
+ fun_l27_n493(x)
+ else
+ fun_l27_n288(x)
+ end
+end
+
+def fun_l26_n574(x)
+ if (x < 1)
+ fun_l27_n573(x)
+ else
+ fun_l27_n88(x)
+ end
+end
+
+def fun_l26_n575(x)
+ if (x < 1)
+ fun_l27_n174(x)
+ else
+ fun_l27_n635(x)
+ end
+end
+
+def fun_l26_n576(x)
+ if (x < 1)
+ fun_l27_n146(x)
+ else
+ fun_l27_n48(x)
+ end
+end
+
+def fun_l26_n577(x)
+ if (x < 1)
+ fun_l27_n344(x)
+ else
+ fun_l27_n668(x)
+ end
+end
+
+def fun_l26_n578(x)
+ if (x < 1)
+ fun_l27_n624(x)
+ else
+ fun_l27_n516(x)
+ end
+end
+
+def fun_l26_n579(x)
+ if (x < 1)
+ fun_l27_n349(x)
+ else
+ fun_l27_n510(x)
+ end
+end
+
+def fun_l26_n580(x)
+ if (x < 1)
+ fun_l27_n625(x)
+ else
+ fun_l27_n474(x)
+ end
+end
+
+def fun_l26_n581(x)
+ if (x < 1)
+ fun_l27_n473(x)
+ else
+ fun_l27_n785(x)
+ end
+end
+
+def fun_l26_n582(x)
+ if (x < 1)
+ fun_l27_n246(x)
+ else
+ fun_l27_n803(x)
+ end
+end
+
+def fun_l26_n583(x)
+ if (x < 1)
+ fun_l27_n232(x)
+ else
+ fun_l27_n981(x)
+ end
+end
+
+def fun_l26_n584(x)
+ if (x < 1)
+ fun_l27_n825(x)
+ else
+ fun_l27_n65(x)
+ end
+end
+
+def fun_l26_n585(x)
+ if (x < 1)
+ fun_l27_n258(x)
+ else
+ fun_l27_n700(x)
+ end
+end
+
+def fun_l26_n586(x)
+ if (x < 1)
+ fun_l27_n404(x)
+ else
+ fun_l27_n124(x)
+ end
+end
+
+def fun_l26_n587(x)
+ if (x < 1)
+ fun_l27_n390(x)
+ else
+ fun_l27_n812(x)
+ end
+end
+
+def fun_l26_n588(x)
+ if (x < 1)
+ fun_l27_n874(x)
+ else
+ fun_l27_n249(x)
+ end
+end
+
+def fun_l26_n589(x)
+ if (x < 1)
+ fun_l27_n837(x)
+ else
+ fun_l27_n480(x)
+ end
+end
+
+def fun_l26_n590(x)
+ if (x < 1)
+ fun_l27_n126(x)
+ else
+ fun_l27_n446(x)
+ end
+end
+
+def fun_l26_n591(x)
+ if (x < 1)
+ fun_l27_n838(x)
+ else
+ fun_l27_n285(x)
+ end
+end
+
+def fun_l26_n592(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n821(x)
+ end
+end
+
+def fun_l26_n593(x)
+ if (x < 1)
+ fun_l27_n781(x)
+ else
+ fun_l27_n310(x)
+ end
+end
+
+def fun_l26_n594(x)
+ if (x < 1)
+ fun_l27_n343(x)
+ else
+ fun_l27_n853(x)
+ end
+end
+
+def fun_l26_n595(x)
+ if (x < 1)
+ fun_l27_n216(x)
+ else
+ fun_l27_n334(x)
+ end
+end
+
+def fun_l26_n596(x)
+ if (x < 1)
+ fun_l27_n866(x)
+ else
+ fun_l27_n981(x)
+ end
+end
+
+def fun_l26_n597(x)
+ if (x < 1)
+ fun_l27_n551(x)
+ else
+ fun_l27_n184(x)
+ end
+end
+
+def fun_l26_n598(x)
+ if (x < 1)
+ fun_l27_n538(x)
+ else
+ fun_l27_n878(x)
+ end
+end
+
+def fun_l26_n599(x)
+ if (x < 1)
+ fun_l27_n909(x)
+ else
+ fun_l27_n435(x)
+ end
+end
+
+def fun_l26_n600(x)
+ if (x < 1)
+ fun_l27_n695(x)
+ else
+ fun_l27_n886(x)
+ end
+end
+
+def fun_l26_n601(x)
+ if (x < 1)
+ fun_l27_n927(x)
+ else
+ fun_l27_n303(x)
+ end
+end
+
+def fun_l26_n602(x)
+ if (x < 1)
+ fun_l27_n323(x)
+ else
+ fun_l27_n534(x)
+ end
+end
+
+def fun_l26_n603(x)
+ if (x < 1)
+ fun_l27_n803(x)
+ else
+ fun_l27_n34(x)
+ end
+end
+
+def fun_l26_n604(x)
+ if (x < 1)
+ fun_l27_n266(x)
+ else
+ fun_l27_n800(x)
+ end
+end
+
+def fun_l26_n605(x)
+ if (x < 1)
+ fun_l27_n831(x)
+ else
+ fun_l27_n338(x)
+ end
+end
+
+def fun_l26_n606(x)
+ if (x < 1)
+ fun_l27_n97(x)
+ else
+ fun_l27_n772(x)
+ end
+end
+
+def fun_l26_n607(x)
+ if (x < 1)
+ fun_l27_n291(x)
+ else
+ fun_l27_n756(x)
+ end
+end
+
+def fun_l26_n608(x)
+ if (x < 1)
+ fun_l27_n906(x)
+ else
+ fun_l27_n861(x)
+ end
+end
+
+def fun_l26_n609(x)
+ if (x < 1)
+ fun_l27_n793(x)
+ else
+ fun_l27_n845(x)
+ end
+end
+
+def fun_l26_n610(x)
+ if (x < 1)
+ fun_l27_n83(x)
+ else
+ fun_l27_n359(x)
+ end
+end
+
+def fun_l26_n611(x)
+ if (x < 1)
+ fun_l27_n911(x)
+ else
+ fun_l27_n526(x)
+ end
+end
+
+def fun_l26_n612(x)
+ if (x < 1)
+ fun_l27_n377(x)
+ else
+ fun_l27_n387(x)
+ end
+end
+
+def fun_l26_n613(x)
+ if (x < 1)
+ fun_l27_n809(x)
+ else
+ fun_l27_n802(x)
+ end
+end
+
+def fun_l26_n614(x)
+ if (x < 1)
+ fun_l27_n984(x)
+ else
+ fun_l27_n683(x)
+ end
+end
+
+def fun_l26_n615(x)
+ if (x < 1)
+ fun_l27_n330(x)
+ else
+ fun_l27_n439(x)
+ end
+end
+
+def fun_l26_n616(x)
+ if (x < 1)
+ fun_l27_n16(x)
+ else
+ fun_l27_n831(x)
+ end
+end
+
+def fun_l26_n617(x)
+ if (x < 1)
+ fun_l27_n149(x)
+ else
+ fun_l27_n934(x)
+ end
+end
+
+def fun_l26_n618(x)
+ if (x < 1)
+ fun_l27_n383(x)
+ else
+ fun_l27_n439(x)
+ end
+end
+
+def fun_l26_n619(x)
+ if (x < 1)
+ fun_l27_n599(x)
+ else
+ fun_l27_n855(x)
+ end
+end
+
+def fun_l26_n620(x)
+ if (x < 1)
+ fun_l27_n202(x)
+ else
+ fun_l27_n902(x)
+ end
+end
+
+def fun_l26_n621(x)
+ if (x < 1)
+ fun_l27_n219(x)
+ else
+ fun_l27_n13(x)
+ end
+end
+
+def fun_l26_n622(x)
+ if (x < 1)
+ fun_l27_n473(x)
+ else
+ fun_l27_n12(x)
+ end
+end
+
+def fun_l26_n623(x)
+ if (x < 1)
+ fun_l27_n918(x)
+ else
+ fun_l27_n50(x)
+ end
+end
+
+def fun_l26_n624(x)
+ if (x < 1)
+ fun_l27_n585(x)
+ else
+ fun_l27_n902(x)
+ end
+end
+
+def fun_l26_n625(x)
+ if (x < 1)
+ fun_l27_n676(x)
+ else
+ fun_l27_n533(x)
+ end
+end
+
+def fun_l26_n626(x)
+ if (x < 1)
+ fun_l27_n122(x)
+ else
+ fun_l27_n823(x)
+ end
+end
+
+def fun_l26_n627(x)
+ if (x < 1)
+ fun_l27_n214(x)
+ else
+ fun_l27_n485(x)
+ end
+end
+
+def fun_l26_n628(x)
+ if (x < 1)
+ fun_l27_n453(x)
+ else
+ fun_l27_n312(x)
+ end
+end
+
+def fun_l26_n629(x)
+ if (x < 1)
+ fun_l27_n929(x)
+ else
+ fun_l27_n272(x)
+ end
+end
+
+def fun_l26_n630(x)
+ if (x < 1)
+ fun_l27_n546(x)
+ else
+ fun_l27_n950(x)
+ end
+end
+
+def fun_l26_n631(x)
+ if (x < 1)
+ fun_l27_n222(x)
+ else
+ fun_l27_n780(x)
+ end
+end
+
+def fun_l26_n632(x)
+ if (x < 1)
+ fun_l27_n878(x)
+ else
+ fun_l27_n721(x)
+ end
+end
+
+def fun_l26_n633(x)
+ if (x < 1)
+ fun_l27_n611(x)
+ else
+ fun_l27_n15(x)
+ end
+end
+
+def fun_l26_n634(x)
+ if (x < 1)
+ fun_l27_n728(x)
+ else
+ fun_l27_n848(x)
+ end
+end
+
+def fun_l26_n635(x)
+ if (x < 1)
+ fun_l27_n489(x)
+ else
+ fun_l27_n3(x)
+ end
+end
+
+def fun_l26_n636(x)
+ if (x < 1)
+ fun_l27_n138(x)
+ else
+ fun_l27_n231(x)
+ end
+end
+
+def fun_l26_n637(x)
+ if (x < 1)
+ fun_l27_n861(x)
+ else
+ fun_l27_n115(x)
+ end
+end
+
+def fun_l26_n638(x)
+ if (x < 1)
+ fun_l27_n7(x)
+ else
+ fun_l27_n894(x)
+ end
+end
+
+def fun_l26_n639(x)
+ if (x < 1)
+ fun_l27_n683(x)
+ else
+ fun_l27_n964(x)
+ end
+end
+
+def fun_l26_n640(x)
+ if (x < 1)
+ fun_l27_n100(x)
+ else
+ fun_l27_n40(x)
+ end
+end
+
+def fun_l26_n641(x)
+ if (x < 1)
+ fun_l27_n744(x)
+ else
+ fun_l27_n855(x)
+ end
+end
+
+def fun_l26_n642(x)
+ if (x < 1)
+ fun_l27_n923(x)
+ else
+ fun_l27_n664(x)
+ end
+end
+
+def fun_l26_n643(x)
+ if (x < 1)
+ fun_l27_n150(x)
+ else
+ fun_l27_n713(x)
+ end
+end
+
+def fun_l26_n644(x)
+ if (x < 1)
+ fun_l27_n95(x)
+ else
+ fun_l27_n566(x)
+ end
+end
+
+def fun_l26_n645(x)
+ if (x < 1)
+ fun_l27_n886(x)
+ else
+ fun_l27_n811(x)
+ end
+end
+
+def fun_l26_n646(x)
+ if (x < 1)
+ fun_l27_n547(x)
+ else
+ fun_l27_n412(x)
+ end
+end
+
+def fun_l26_n647(x)
+ if (x < 1)
+ fun_l27_n570(x)
+ else
+ fun_l27_n606(x)
+ end
+end
+
+def fun_l26_n648(x)
+ if (x < 1)
+ fun_l27_n181(x)
+ else
+ fun_l27_n216(x)
+ end
+end
+
+def fun_l26_n649(x)
+ if (x < 1)
+ fun_l27_n198(x)
+ else
+ fun_l27_n988(x)
+ end
+end
+
+def fun_l26_n650(x)
+ if (x < 1)
+ fun_l27_n503(x)
+ else
+ fun_l27_n257(x)
+ end
+end
+
+def fun_l26_n651(x)
+ if (x < 1)
+ fun_l27_n799(x)
+ else
+ fun_l27_n175(x)
+ end
+end
+
+def fun_l26_n652(x)
+ if (x < 1)
+ fun_l27_n338(x)
+ else
+ fun_l27_n560(x)
+ end
+end
+
+def fun_l26_n653(x)
+ if (x < 1)
+ fun_l27_n597(x)
+ else
+ fun_l27_n988(x)
+ end
+end
+
+def fun_l26_n654(x)
+ if (x < 1)
+ fun_l27_n319(x)
+ else
+ fun_l27_n299(x)
+ end
+end
+
+def fun_l26_n655(x)
+ if (x < 1)
+ fun_l27_n510(x)
+ else
+ fun_l27_n375(x)
+ end
+end
+
+def fun_l26_n656(x)
+ if (x < 1)
+ fun_l27_n808(x)
+ else
+ fun_l27_n289(x)
+ end
+end
+
+def fun_l26_n657(x)
+ if (x < 1)
+ fun_l27_n170(x)
+ else
+ fun_l27_n64(x)
+ end
+end
+
+def fun_l26_n658(x)
+ if (x < 1)
+ fun_l27_n966(x)
+ else
+ fun_l27_n487(x)
+ end
+end
+
+def fun_l26_n659(x)
+ if (x < 1)
+ fun_l27_n238(x)
+ else
+ fun_l27_n638(x)
+ end
+end
+
+def fun_l26_n660(x)
+ if (x < 1)
+ fun_l27_n814(x)
+ else
+ fun_l27_n203(x)
+ end
+end
+
+def fun_l26_n661(x)
+ if (x < 1)
+ fun_l27_n840(x)
+ else
+ fun_l27_n867(x)
+ end
+end
+
+def fun_l26_n662(x)
+ if (x < 1)
+ fun_l27_n753(x)
+ else
+ fun_l27_n543(x)
+ end
+end
+
+def fun_l26_n663(x)
+ if (x < 1)
+ fun_l27_n850(x)
+ else
+ fun_l27_n539(x)
+ end
+end
+
+def fun_l26_n664(x)
+ if (x < 1)
+ fun_l27_n878(x)
+ else
+ fun_l27_n648(x)
+ end
+end
+
+def fun_l26_n665(x)
+ if (x < 1)
+ fun_l27_n256(x)
+ else
+ fun_l27_n243(x)
+ end
+end
+
+def fun_l26_n666(x)
+ if (x < 1)
+ fun_l27_n833(x)
+ else
+ fun_l27_n251(x)
+ end
+end
+
+def fun_l26_n667(x)
+ if (x < 1)
+ fun_l27_n26(x)
+ else
+ fun_l27_n206(x)
+ end
+end
+
+def fun_l26_n668(x)
+ if (x < 1)
+ fun_l27_n860(x)
+ else
+ fun_l27_n736(x)
+ end
+end
+
+def fun_l26_n669(x)
+ if (x < 1)
+ fun_l27_n794(x)
+ else
+ fun_l27_n185(x)
+ end
+end
+
+def fun_l26_n670(x)
+ if (x < 1)
+ fun_l27_n849(x)
+ else
+ fun_l27_n218(x)
+ end
+end
+
+def fun_l26_n671(x)
+ if (x < 1)
+ fun_l27_n423(x)
+ else
+ fun_l27_n163(x)
+ end
+end
+
+def fun_l26_n672(x)
+ if (x < 1)
+ fun_l27_n94(x)
+ else
+ fun_l27_n341(x)
+ end
+end
+
+def fun_l26_n673(x)
+ if (x < 1)
+ fun_l27_n927(x)
+ else
+ fun_l27_n721(x)
+ end
+end
+
+def fun_l26_n674(x)
+ if (x < 1)
+ fun_l27_n390(x)
+ else
+ fun_l27_n807(x)
+ end
+end
+
+def fun_l26_n675(x)
+ if (x < 1)
+ fun_l27_n818(x)
+ else
+ fun_l27_n532(x)
+ end
+end
+
+def fun_l26_n676(x)
+ if (x < 1)
+ fun_l27_n513(x)
+ else
+ fun_l27_n414(x)
+ end
+end
+
+def fun_l26_n677(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n940(x)
+ end
+end
+
+def fun_l26_n678(x)
+ if (x < 1)
+ fun_l27_n178(x)
+ else
+ fun_l27_n857(x)
+ end
+end
+
+def fun_l26_n679(x)
+ if (x < 1)
+ fun_l27_n806(x)
+ else
+ fun_l27_n838(x)
+ end
+end
+
+def fun_l26_n680(x)
+ if (x < 1)
+ fun_l27_n216(x)
+ else
+ fun_l27_n774(x)
+ end
+end
+
+def fun_l26_n681(x)
+ if (x < 1)
+ fun_l27_n969(x)
+ else
+ fun_l27_n247(x)
+ end
+end
+
+def fun_l26_n682(x)
+ if (x < 1)
+ fun_l27_n175(x)
+ else
+ fun_l27_n588(x)
+ end
+end
+
+def fun_l26_n683(x)
+ if (x < 1)
+ fun_l27_n310(x)
+ else
+ fun_l27_n48(x)
+ end
+end
+
+def fun_l26_n684(x)
+ if (x < 1)
+ fun_l27_n669(x)
+ else
+ fun_l27_n428(x)
+ end
+end
+
+def fun_l26_n685(x)
+ if (x < 1)
+ fun_l27_n592(x)
+ else
+ fun_l27_n535(x)
+ end
+end
+
+def fun_l26_n686(x)
+ if (x < 1)
+ fun_l27_n81(x)
+ else
+ fun_l27_n259(x)
+ end
+end
+
+def fun_l26_n687(x)
+ if (x < 1)
+ fun_l27_n498(x)
+ else
+ fun_l27_n859(x)
+ end
+end
+
+def fun_l26_n688(x)
+ if (x < 1)
+ fun_l27_n695(x)
+ else
+ fun_l27_n67(x)
+ end
+end
+
+def fun_l26_n689(x)
+ if (x < 1)
+ fun_l27_n97(x)
+ else
+ fun_l27_n11(x)
+ end
+end
+
+def fun_l26_n690(x)
+ if (x < 1)
+ fun_l27_n901(x)
+ else
+ fun_l27_n525(x)
+ end
+end
+
+def fun_l26_n691(x)
+ if (x < 1)
+ fun_l27_n545(x)
+ else
+ fun_l27_n649(x)
+ end
+end
+
+def fun_l26_n692(x)
+ if (x < 1)
+ fun_l27_n866(x)
+ else
+ fun_l27_n379(x)
+ end
+end
+
+def fun_l26_n693(x)
+ if (x < 1)
+ fun_l27_n475(x)
+ else
+ fun_l27_n504(x)
+ end
+end
+
+def fun_l26_n694(x)
+ if (x < 1)
+ fun_l27_n527(x)
+ else
+ fun_l27_n701(x)
+ end
+end
+
+def fun_l26_n695(x)
+ if (x < 1)
+ fun_l27_n159(x)
+ else
+ fun_l27_n946(x)
+ end
+end
+
+def fun_l26_n696(x)
+ if (x < 1)
+ fun_l27_n850(x)
+ else
+ fun_l27_n200(x)
+ end
+end
+
+def fun_l26_n697(x)
+ if (x < 1)
+ fun_l27_n318(x)
+ else
+ fun_l27_n55(x)
+ end
+end
+
+def fun_l26_n698(x)
+ if (x < 1)
+ fun_l27_n563(x)
+ else
+ fun_l27_n413(x)
+ end
+end
+
+def fun_l26_n699(x)
+ if (x < 1)
+ fun_l27_n976(x)
+ else
+ fun_l27_n42(x)
+ end
+end
+
+def fun_l26_n700(x)
+ if (x < 1)
+ fun_l27_n112(x)
+ else
+ fun_l27_n764(x)
+ end
+end
+
+def fun_l26_n701(x)
+ if (x < 1)
+ fun_l27_n519(x)
+ else
+ fun_l27_n800(x)
+ end
+end
+
+def fun_l26_n702(x)
+ if (x < 1)
+ fun_l27_n701(x)
+ else
+ fun_l27_n102(x)
+ end
+end
+
+def fun_l26_n703(x)
+ if (x < 1)
+ fun_l27_n200(x)
+ else
+ fun_l27_n685(x)
+ end
+end
+
+def fun_l26_n704(x)
+ if (x < 1)
+ fun_l27_n770(x)
+ else
+ fun_l27_n47(x)
+ end
+end
+
+def fun_l26_n705(x)
+ if (x < 1)
+ fun_l27_n479(x)
+ else
+ fun_l27_n875(x)
+ end
+end
+
+def fun_l26_n706(x)
+ if (x < 1)
+ fun_l27_n369(x)
+ else
+ fun_l27_n53(x)
+ end
+end
+
+def fun_l26_n707(x)
+ if (x < 1)
+ fun_l27_n16(x)
+ else
+ fun_l27_n612(x)
+ end
+end
+
+def fun_l26_n708(x)
+ if (x < 1)
+ fun_l27_n235(x)
+ else
+ fun_l27_n211(x)
+ end
+end
+
+def fun_l26_n709(x)
+ if (x < 1)
+ fun_l27_n636(x)
+ else
+ fun_l27_n890(x)
+ end
+end
+
+def fun_l26_n710(x)
+ if (x < 1)
+ fun_l27_n877(x)
+ else
+ fun_l27_n301(x)
+ end
+end
+
+def fun_l26_n711(x)
+ if (x < 1)
+ fun_l27_n783(x)
+ else
+ fun_l27_n409(x)
+ end
+end
+
+def fun_l26_n712(x)
+ if (x < 1)
+ fun_l27_n595(x)
+ else
+ fun_l27_n968(x)
+ end
+end
+
+def fun_l26_n713(x)
+ if (x < 1)
+ fun_l27_n858(x)
+ else
+ fun_l27_n879(x)
+ end
+end
+
+def fun_l26_n714(x)
+ if (x < 1)
+ fun_l27_n66(x)
+ else
+ fun_l27_n107(x)
+ end
+end
+
+def fun_l26_n715(x)
+ if (x < 1)
+ fun_l27_n636(x)
+ else
+ fun_l27_n912(x)
+ end
+end
+
+def fun_l26_n716(x)
+ if (x < 1)
+ fun_l27_n605(x)
+ else
+ fun_l27_n935(x)
+ end
+end
+
+def fun_l26_n717(x)
+ if (x < 1)
+ fun_l27_n186(x)
+ else
+ fun_l27_n664(x)
+ end
+end
+
+def fun_l26_n718(x)
+ if (x < 1)
+ fun_l27_n865(x)
+ else
+ fun_l27_n462(x)
+ end
+end
+
+def fun_l26_n719(x)
+ if (x < 1)
+ fun_l27_n783(x)
+ else
+ fun_l27_n668(x)
+ end
+end
+
+def fun_l26_n720(x)
+ if (x < 1)
+ fun_l27_n697(x)
+ else
+ fun_l27_n850(x)
+ end
+end
+
+def fun_l26_n721(x)
+ if (x < 1)
+ fun_l27_n668(x)
+ else
+ fun_l27_n493(x)
+ end
+end
+
+def fun_l26_n722(x)
+ if (x < 1)
+ fun_l27_n25(x)
+ else
+ fun_l27_n473(x)
+ end
+end
+
+def fun_l26_n723(x)
+ if (x < 1)
+ fun_l27_n311(x)
+ else
+ fun_l27_n380(x)
+ end
+end
+
+def fun_l26_n724(x)
+ if (x < 1)
+ fun_l27_n766(x)
+ else
+ fun_l27_n303(x)
+ end
+end
+
+def fun_l26_n725(x)
+ if (x < 1)
+ fun_l27_n97(x)
+ else
+ fun_l27_n306(x)
+ end
+end
+
+def fun_l26_n726(x)
+ if (x < 1)
+ fun_l27_n333(x)
+ else
+ fun_l27_n590(x)
+ end
+end
+
+def fun_l26_n727(x)
+ if (x < 1)
+ fun_l27_n596(x)
+ else
+ fun_l27_n509(x)
+ end
+end
+
+def fun_l26_n728(x)
+ if (x < 1)
+ fun_l27_n234(x)
+ else
+ fun_l27_n583(x)
+ end
+end
+
+def fun_l26_n729(x)
+ if (x < 1)
+ fun_l27_n692(x)
+ else
+ fun_l27_n890(x)
+ end
+end
+
+def fun_l26_n730(x)
+ if (x < 1)
+ fun_l27_n864(x)
+ else
+ fun_l27_n433(x)
+ end
+end
+
+def fun_l26_n731(x)
+ if (x < 1)
+ fun_l27_n866(x)
+ else
+ fun_l27_n350(x)
+ end
+end
+
+def fun_l26_n732(x)
+ if (x < 1)
+ fun_l27_n913(x)
+ else
+ fun_l27_n651(x)
+ end
+end
+
+def fun_l26_n733(x)
+ if (x < 1)
+ fun_l27_n919(x)
+ else
+ fun_l27_n902(x)
+ end
+end
+
+def fun_l26_n734(x)
+ if (x < 1)
+ fun_l27_n731(x)
+ else
+ fun_l27_n768(x)
+ end
+end
+
+def fun_l26_n735(x)
+ if (x < 1)
+ fun_l27_n613(x)
+ else
+ fun_l27_n550(x)
+ end
+end
+
+def fun_l26_n736(x)
+ if (x < 1)
+ fun_l27_n795(x)
+ else
+ fun_l27_n152(x)
+ end
+end
+
+def fun_l26_n737(x)
+ if (x < 1)
+ fun_l27_n214(x)
+ else
+ fun_l27_n990(x)
+ end
+end
+
+def fun_l26_n738(x)
+ if (x < 1)
+ fun_l27_n521(x)
+ else
+ fun_l27_n773(x)
+ end
+end
+
+def fun_l26_n739(x)
+ if (x < 1)
+ fun_l27_n44(x)
+ else
+ fun_l27_n580(x)
+ end
+end
+
+def fun_l26_n740(x)
+ if (x < 1)
+ fun_l27_n800(x)
+ else
+ fun_l27_n385(x)
+ end
+end
+
+def fun_l26_n741(x)
+ if (x < 1)
+ fun_l27_n412(x)
+ else
+ fun_l27_n979(x)
+ end
+end
+
+def fun_l26_n742(x)
+ if (x < 1)
+ fun_l27_n392(x)
+ else
+ fun_l27_n627(x)
+ end
+end
+
+def fun_l26_n743(x)
+ if (x < 1)
+ fun_l27_n348(x)
+ else
+ fun_l27_n141(x)
+ end
+end
+
+def fun_l26_n744(x)
+ if (x < 1)
+ fun_l27_n199(x)
+ else
+ fun_l27_n327(x)
+ end
+end
+
+def fun_l26_n745(x)
+ if (x < 1)
+ fun_l27_n302(x)
+ else
+ fun_l27_n708(x)
+ end
+end
+
+def fun_l26_n746(x)
+ if (x < 1)
+ fun_l27_n431(x)
+ else
+ fun_l27_n362(x)
+ end
+end
+
+def fun_l26_n747(x)
+ if (x < 1)
+ fun_l27_n409(x)
+ else
+ fun_l27_n102(x)
+ end
+end
+
+def fun_l26_n748(x)
+ if (x < 1)
+ fun_l27_n631(x)
+ else
+ fun_l27_n415(x)
+ end
+end
+
+def fun_l26_n749(x)
+ if (x < 1)
+ fun_l27_n196(x)
+ else
+ fun_l27_n835(x)
+ end
+end
+
+def fun_l26_n750(x)
+ if (x < 1)
+ fun_l27_n731(x)
+ else
+ fun_l27_n400(x)
+ end
+end
+
+def fun_l26_n751(x)
+ if (x < 1)
+ fun_l27_n561(x)
+ else
+ fun_l27_n444(x)
+ end
+end
+
+def fun_l26_n752(x)
+ if (x < 1)
+ fun_l27_n444(x)
+ else
+ fun_l27_n245(x)
+ end
+end
+
+def fun_l26_n753(x)
+ if (x < 1)
+ fun_l27_n784(x)
+ else
+ fun_l27_n640(x)
+ end
+end
+
+def fun_l26_n754(x)
+ if (x < 1)
+ fun_l27_n988(x)
+ else
+ fun_l27_n335(x)
+ end
+end
+
+def fun_l26_n755(x)
+ if (x < 1)
+ fun_l27_n188(x)
+ else
+ fun_l27_n584(x)
+ end
+end
+
+def fun_l26_n756(x)
+ if (x < 1)
+ fun_l27_n356(x)
+ else
+ fun_l27_n989(x)
+ end
+end
+
+def fun_l26_n757(x)
+ if (x < 1)
+ fun_l27_n687(x)
+ else
+ fun_l27_n409(x)
+ end
+end
+
+def fun_l26_n758(x)
+ if (x < 1)
+ fun_l27_n383(x)
+ else
+ fun_l27_n502(x)
+ end
+end
+
+def fun_l26_n759(x)
+ if (x < 1)
+ fun_l27_n507(x)
+ else
+ fun_l27_n868(x)
+ end
+end
+
+def fun_l26_n760(x)
+ if (x < 1)
+ fun_l27_n109(x)
+ else
+ fun_l27_n641(x)
+ end
+end
+
+def fun_l26_n761(x)
+ if (x < 1)
+ fun_l27_n831(x)
+ else
+ fun_l27_n248(x)
+ end
+end
+
+def fun_l26_n762(x)
+ if (x < 1)
+ fun_l27_n150(x)
+ else
+ fun_l27_n116(x)
+ end
+end
+
+def fun_l26_n763(x)
+ if (x < 1)
+ fun_l27_n811(x)
+ else
+ fun_l27_n680(x)
+ end
+end
+
+def fun_l26_n764(x)
+ if (x < 1)
+ fun_l27_n593(x)
+ else
+ fun_l27_n756(x)
+ end
+end
+
+def fun_l26_n765(x)
+ if (x < 1)
+ fun_l27_n468(x)
+ else
+ fun_l27_n888(x)
+ end
+end
+
+def fun_l26_n766(x)
+ if (x < 1)
+ fun_l27_n154(x)
+ else
+ fun_l27_n65(x)
+ end
+end
+
+def fun_l26_n767(x)
+ if (x < 1)
+ fun_l27_n709(x)
+ else
+ fun_l27_n878(x)
+ end
+end
+
+def fun_l26_n768(x)
+ if (x < 1)
+ fun_l27_n270(x)
+ else
+ fun_l27_n393(x)
+ end
+end
+
+def fun_l26_n769(x)
+ if (x < 1)
+ fun_l27_n315(x)
+ else
+ fun_l27_n46(x)
+ end
+end
+
+def fun_l26_n770(x)
+ if (x < 1)
+ fun_l27_n448(x)
+ else
+ fun_l27_n364(x)
+ end
+end
+
+def fun_l26_n771(x)
+ if (x < 1)
+ fun_l27_n865(x)
+ else
+ fun_l27_n842(x)
+ end
+end
+
+def fun_l26_n772(x)
+ if (x < 1)
+ fun_l27_n231(x)
+ else
+ fun_l27_n731(x)
+ end
+end
+
+def fun_l26_n773(x)
+ if (x < 1)
+ fun_l27_n303(x)
+ else
+ fun_l27_n769(x)
+ end
+end
+
+def fun_l26_n774(x)
+ if (x < 1)
+ fun_l27_n257(x)
+ else
+ fun_l27_n513(x)
+ end
+end
+
+def fun_l26_n775(x)
+ if (x < 1)
+ fun_l27_n805(x)
+ else
+ fun_l27_n947(x)
+ end
+end
+
+def fun_l26_n776(x)
+ if (x < 1)
+ fun_l27_n199(x)
+ else
+ fun_l27_n413(x)
+ end
+end
+
+def fun_l26_n777(x)
+ if (x < 1)
+ fun_l27_n631(x)
+ else
+ fun_l27_n734(x)
+ end
+end
+
+def fun_l26_n778(x)
+ if (x < 1)
+ fun_l27_n978(x)
+ else
+ fun_l27_n638(x)
+ end
+end
+
+def fun_l26_n779(x)
+ if (x < 1)
+ fun_l27_n441(x)
+ else
+ fun_l27_n936(x)
+ end
+end
+
+def fun_l26_n780(x)
+ if (x < 1)
+ fun_l27_n120(x)
+ else
+ fun_l27_n37(x)
+ end
+end
+
+def fun_l26_n781(x)
+ if (x < 1)
+ fun_l27_n44(x)
+ else
+ fun_l27_n240(x)
+ end
+end
+
+def fun_l26_n782(x)
+ if (x < 1)
+ fun_l27_n920(x)
+ else
+ fun_l27_n54(x)
+ end
+end
+
+def fun_l26_n783(x)
+ if (x < 1)
+ fun_l27_n488(x)
+ else
+ fun_l27_n965(x)
+ end
+end
+
+def fun_l26_n784(x)
+ if (x < 1)
+ fun_l27_n226(x)
+ else
+ fun_l27_n449(x)
+ end
+end
+
+def fun_l26_n785(x)
+ if (x < 1)
+ fun_l27_n794(x)
+ else
+ fun_l27_n469(x)
+ end
+end
+
+def fun_l26_n786(x)
+ if (x < 1)
+ fun_l27_n287(x)
+ else
+ fun_l27_n863(x)
+ end
+end
+
+def fun_l26_n787(x)
+ if (x < 1)
+ fun_l27_n714(x)
+ else
+ fun_l27_n606(x)
+ end
+end
+
+def fun_l26_n788(x)
+ if (x < 1)
+ fun_l27_n649(x)
+ else
+ fun_l27_n347(x)
+ end
+end
+
+def fun_l26_n789(x)
+ if (x < 1)
+ fun_l27_n176(x)
+ else
+ fun_l27_n410(x)
+ end
+end
+
+def fun_l26_n790(x)
+ if (x < 1)
+ fun_l27_n688(x)
+ else
+ fun_l27_n248(x)
+ end
+end
+
+def fun_l26_n791(x)
+ if (x < 1)
+ fun_l27_n157(x)
+ else
+ fun_l27_n119(x)
+ end
+end
+
+def fun_l26_n792(x)
+ if (x < 1)
+ fun_l27_n470(x)
+ else
+ fun_l27_n657(x)
+ end
+end
+
+def fun_l26_n793(x)
+ if (x < 1)
+ fun_l27_n246(x)
+ else
+ fun_l27_n262(x)
+ end
+end
+
+def fun_l26_n794(x)
+ if (x < 1)
+ fun_l27_n142(x)
+ else
+ fun_l27_n524(x)
+ end
+end
+
+def fun_l26_n795(x)
+ if (x < 1)
+ fun_l27_n695(x)
+ else
+ fun_l27_n88(x)
+ end
+end
+
+def fun_l26_n796(x)
+ if (x < 1)
+ fun_l27_n599(x)
+ else
+ fun_l27_n776(x)
+ end
+end
+
+def fun_l26_n797(x)
+ if (x < 1)
+ fun_l27_n364(x)
+ else
+ fun_l27_n616(x)
+ end
+end
+
+def fun_l26_n798(x)
+ if (x < 1)
+ fun_l27_n793(x)
+ else
+ fun_l27_n416(x)
+ end
+end
+
+def fun_l26_n799(x)
+ if (x < 1)
+ fun_l27_n552(x)
+ else
+ fun_l27_n490(x)
+ end
+end
+
+def fun_l26_n800(x)
+ if (x < 1)
+ fun_l27_n691(x)
+ else
+ fun_l27_n743(x)
+ end
+end
+
+def fun_l26_n801(x)
+ if (x < 1)
+ fun_l27_n257(x)
+ else
+ fun_l27_n687(x)
+ end
+end
+
+def fun_l26_n802(x)
+ if (x < 1)
+ fun_l27_n877(x)
+ else
+ fun_l27_n273(x)
+ end
+end
+
+def fun_l26_n803(x)
+ if (x < 1)
+ fun_l27_n398(x)
+ else
+ fun_l27_n874(x)
+ end
+end
+
+def fun_l26_n804(x)
+ if (x < 1)
+ fun_l27_n114(x)
+ else
+ fun_l27_n96(x)
+ end
+end
+
+def fun_l26_n805(x)
+ if (x < 1)
+ fun_l27_n489(x)
+ else
+ fun_l27_n537(x)
+ end
+end
+
+def fun_l26_n806(x)
+ if (x < 1)
+ fun_l27_n619(x)
+ else
+ fun_l27_n813(x)
+ end
+end
+
+def fun_l26_n807(x)
+ if (x < 1)
+ fun_l27_n335(x)
+ else
+ fun_l27_n467(x)
+ end
+end
+
+def fun_l26_n808(x)
+ if (x < 1)
+ fun_l27_n17(x)
+ else
+ fun_l27_n133(x)
+ end
+end
+
+def fun_l26_n809(x)
+ if (x < 1)
+ fun_l27_n266(x)
+ else
+ fun_l27_n383(x)
+ end
+end
+
+def fun_l26_n810(x)
+ if (x < 1)
+ fun_l27_n391(x)
+ else
+ fun_l27_n326(x)
+ end
+end
+
+def fun_l26_n811(x)
+ if (x < 1)
+ fun_l27_n292(x)
+ else
+ fun_l27_n444(x)
+ end
+end
+
+def fun_l26_n812(x)
+ if (x < 1)
+ fun_l27_n920(x)
+ else
+ fun_l27_n909(x)
+ end
+end
+
+def fun_l26_n813(x)
+ if (x < 1)
+ fun_l27_n575(x)
+ else
+ fun_l27_n221(x)
+ end
+end
+
+def fun_l26_n814(x)
+ if (x < 1)
+ fun_l27_n66(x)
+ else
+ fun_l27_n241(x)
+ end
+end
+
+def fun_l26_n815(x)
+ if (x < 1)
+ fun_l27_n552(x)
+ else
+ fun_l27_n906(x)
+ end
+end
+
+def fun_l26_n816(x)
+ if (x < 1)
+ fun_l27_n301(x)
+ else
+ fun_l27_n656(x)
+ end
+end
+
+def fun_l26_n817(x)
+ if (x < 1)
+ fun_l27_n472(x)
+ else
+ fun_l27_n688(x)
+ end
+end
+
+def fun_l26_n818(x)
+ if (x < 1)
+ fun_l27_n712(x)
+ else
+ fun_l27_n830(x)
+ end
+end
+
+def fun_l26_n819(x)
+ if (x < 1)
+ fun_l27_n102(x)
+ else
+ fun_l27_n146(x)
+ end
+end
+
+def fun_l26_n820(x)
+ if (x < 1)
+ fun_l27_n448(x)
+ else
+ fun_l27_n207(x)
+ end
+end
+
+def fun_l26_n821(x)
+ if (x < 1)
+ fun_l27_n732(x)
+ else
+ fun_l27_n285(x)
+ end
+end
+
+def fun_l26_n822(x)
+ if (x < 1)
+ fun_l27_n973(x)
+ else
+ fun_l27_n395(x)
+ end
+end
+
+def fun_l26_n823(x)
+ if (x < 1)
+ fun_l27_n329(x)
+ else
+ fun_l27_n748(x)
+ end
+end
+
+def fun_l26_n824(x)
+ if (x < 1)
+ fun_l27_n280(x)
+ else
+ fun_l27_n676(x)
+ end
+end
+
+def fun_l26_n825(x)
+ if (x < 1)
+ fun_l27_n867(x)
+ else
+ fun_l27_n285(x)
+ end
+end
+
+def fun_l26_n826(x)
+ if (x < 1)
+ fun_l27_n380(x)
+ else
+ fun_l27_n720(x)
+ end
+end
+
+def fun_l26_n827(x)
+ if (x < 1)
+ fun_l27_n595(x)
+ else
+ fun_l27_n740(x)
+ end
+end
+
+def fun_l26_n828(x)
+ if (x < 1)
+ fun_l27_n356(x)
+ else
+ fun_l27_n878(x)
+ end
+end
+
+def fun_l26_n829(x)
+ if (x < 1)
+ fun_l27_n453(x)
+ else
+ fun_l27_n234(x)
+ end
+end
+
+def fun_l26_n830(x)
+ if (x < 1)
+ fun_l27_n775(x)
+ else
+ fun_l27_n13(x)
+ end
+end
+
+def fun_l26_n831(x)
+ if (x < 1)
+ fun_l27_n242(x)
+ else
+ fun_l27_n144(x)
+ end
+end
+
+def fun_l26_n832(x)
+ if (x < 1)
+ fun_l27_n734(x)
+ else
+ fun_l27_n432(x)
+ end
+end
+
+def fun_l26_n833(x)
+ if (x < 1)
+ fun_l27_n996(x)
+ else
+ fun_l27_n396(x)
+ end
+end
+
+def fun_l26_n834(x)
+ if (x < 1)
+ fun_l27_n367(x)
+ else
+ fun_l27_n991(x)
+ end
+end
+
+def fun_l26_n835(x)
+ if (x < 1)
+ fun_l27_n285(x)
+ else
+ fun_l27_n526(x)
+ end
+end
+
+def fun_l26_n836(x)
+ if (x < 1)
+ fun_l27_n945(x)
+ else
+ fun_l27_n418(x)
+ end
+end
+
+def fun_l26_n837(x)
+ if (x < 1)
+ fun_l27_n622(x)
+ else
+ fun_l27_n922(x)
+ end
+end
+
+def fun_l26_n838(x)
+ if (x < 1)
+ fun_l27_n997(x)
+ else
+ fun_l27_n786(x)
+ end
+end
+
+def fun_l26_n839(x)
+ if (x < 1)
+ fun_l27_n478(x)
+ else
+ fun_l27_n991(x)
+ end
+end
+
+def fun_l26_n840(x)
+ if (x < 1)
+ fun_l27_n473(x)
+ else
+ fun_l27_n801(x)
+ end
+end
+
+def fun_l26_n841(x)
+ if (x < 1)
+ fun_l27_n675(x)
+ else
+ fun_l27_n486(x)
+ end
+end
+
+def fun_l26_n842(x)
+ if (x < 1)
+ fun_l27_n170(x)
+ else
+ fun_l27_n27(x)
+ end
+end
+
+def fun_l26_n843(x)
+ if (x < 1)
+ fun_l27_n699(x)
+ else
+ fun_l27_n536(x)
+ end
+end
+
+def fun_l26_n844(x)
+ if (x < 1)
+ fun_l27_n388(x)
+ else
+ fun_l27_n431(x)
+ end
+end
+
+def fun_l26_n845(x)
+ if (x < 1)
+ fun_l27_n248(x)
+ else
+ fun_l27_n64(x)
+ end
+end
+
+def fun_l26_n846(x)
+ if (x < 1)
+ fun_l27_n64(x)
+ else
+ fun_l27_n829(x)
+ end
+end
+
+def fun_l26_n847(x)
+ if (x < 1)
+ fun_l27_n850(x)
+ else
+ fun_l27_n626(x)
+ end
+end
+
+def fun_l26_n848(x)
+ if (x < 1)
+ fun_l27_n889(x)
+ else
+ fun_l27_n504(x)
+ end
+end
+
+def fun_l26_n849(x)
+ if (x < 1)
+ fun_l27_n121(x)
+ else
+ fun_l27_n864(x)
+ end
+end
+
+def fun_l26_n850(x)
+ if (x < 1)
+ fun_l27_n985(x)
+ else
+ fun_l27_n447(x)
+ end
+end
+
+def fun_l26_n851(x)
+ if (x < 1)
+ fun_l27_n952(x)
+ else
+ fun_l27_n30(x)
+ end
+end
+
+def fun_l26_n852(x)
+ if (x < 1)
+ fun_l27_n444(x)
+ else
+ fun_l27_n780(x)
+ end
+end
+
+def fun_l26_n853(x)
+ if (x < 1)
+ fun_l27_n969(x)
+ else
+ fun_l27_n400(x)
+ end
+end
+
+def fun_l26_n854(x)
+ if (x < 1)
+ fun_l27_n711(x)
+ else
+ fun_l27_n165(x)
+ end
+end
+
+def fun_l26_n855(x)
+ if (x < 1)
+ fun_l27_n514(x)
+ else
+ fun_l27_n464(x)
+ end
+end
+
+def fun_l26_n856(x)
+ if (x < 1)
+ fun_l27_n531(x)
+ else
+ fun_l27_n548(x)
+ end
+end
+
+def fun_l26_n857(x)
+ if (x < 1)
+ fun_l27_n996(x)
+ else
+ fun_l27_n63(x)
+ end
+end
+
+def fun_l26_n858(x)
+ if (x < 1)
+ fun_l27_n516(x)
+ else
+ fun_l27_n905(x)
+ end
+end
+
+def fun_l26_n859(x)
+ if (x < 1)
+ fun_l27_n42(x)
+ else
+ fun_l27_n327(x)
+ end
+end
+
+def fun_l26_n860(x)
+ if (x < 1)
+ fun_l27_n300(x)
+ else
+ fun_l27_n276(x)
+ end
+end
+
+def fun_l26_n861(x)
+ if (x < 1)
+ fun_l27_n734(x)
+ else
+ fun_l27_n859(x)
+ end
+end
+
+def fun_l26_n862(x)
+ if (x < 1)
+ fun_l27_n135(x)
+ else
+ fun_l27_n821(x)
+ end
+end
+
+def fun_l26_n863(x)
+ if (x < 1)
+ fun_l27_n645(x)
+ else
+ fun_l27_n287(x)
+ end
+end
+
+def fun_l26_n864(x)
+ if (x < 1)
+ fun_l27_n243(x)
+ else
+ fun_l27_n844(x)
+ end
+end
+
+def fun_l26_n865(x)
+ if (x < 1)
+ fun_l27_n909(x)
+ else
+ fun_l27_n291(x)
+ end
+end
+
+def fun_l26_n866(x)
+ if (x < 1)
+ fun_l27_n925(x)
+ else
+ fun_l27_n484(x)
+ end
+end
+
+def fun_l26_n867(x)
+ if (x < 1)
+ fun_l27_n678(x)
+ else
+ fun_l27_n205(x)
+ end
+end
+
+def fun_l26_n868(x)
+ if (x < 1)
+ fun_l27_n612(x)
+ else
+ fun_l27_n339(x)
+ end
+end
+
+def fun_l26_n869(x)
+ if (x < 1)
+ fun_l27_n622(x)
+ else
+ fun_l27_n246(x)
+ end
+end
+
+def fun_l26_n870(x)
+ if (x < 1)
+ fun_l27_n431(x)
+ else
+ fun_l27_n635(x)
+ end
+end
+
+def fun_l26_n871(x)
+ if (x < 1)
+ fun_l27_n89(x)
+ else
+ fun_l27_n969(x)
+ end
+end
+
+def fun_l26_n872(x)
+ if (x < 1)
+ fun_l27_n839(x)
+ else
+ fun_l27_n398(x)
+ end
+end
+
+def fun_l26_n873(x)
+ if (x < 1)
+ fun_l27_n230(x)
+ else
+ fun_l27_n885(x)
+ end
+end
+
+def fun_l26_n874(x)
+ if (x < 1)
+ fun_l27_n202(x)
+ else
+ fun_l27_n530(x)
+ end
+end
+
+def fun_l26_n875(x)
+ if (x < 1)
+ fun_l27_n153(x)
+ else
+ fun_l27_n959(x)
+ end
+end
+
+def fun_l26_n876(x)
+ if (x < 1)
+ fun_l27_n891(x)
+ else
+ fun_l27_n307(x)
+ end
+end
+
+def fun_l26_n877(x)
+ if (x < 1)
+ fun_l27_n648(x)
+ else
+ fun_l27_n767(x)
+ end
+end
+
+def fun_l26_n878(x)
+ if (x < 1)
+ fun_l27_n120(x)
+ else
+ fun_l27_n614(x)
+ end
+end
+
+def fun_l26_n879(x)
+ if (x < 1)
+ fun_l27_n46(x)
+ else
+ fun_l27_n766(x)
+ end
+end
+
+def fun_l26_n880(x)
+ if (x < 1)
+ fun_l27_n882(x)
+ else
+ fun_l27_n745(x)
+ end
+end
+
+def fun_l26_n881(x)
+ if (x < 1)
+ fun_l27_n966(x)
+ else
+ fun_l27_n699(x)
+ end
+end
+
+def fun_l26_n882(x)
+ if (x < 1)
+ fun_l27_n354(x)
+ else
+ fun_l27_n698(x)
+ end
+end
+
+def fun_l26_n883(x)
+ if (x < 1)
+ fun_l27_n723(x)
+ else
+ fun_l27_n507(x)
+ end
+end
+
+def fun_l26_n884(x)
+ if (x < 1)
+ fun_l27_n705(x)
+ else
+ fun_l27_n865(x)
+ end
+end
+
+def fun_l26_n885(x)
+ if (x < 1)
+ fun_l27_n609(x)
+ else
+ fun_l27_n830(x)
+ end
+end
+
+def fun_l26_n886(x)
+ if (x < 1)
+ fun_l27_n679(x)
+ else
+ fun_l27_n359(x)
+ end
+end
+
+def fun_l26_n887(x)
+ if (x < 1)
+ fun_l27_n830(x)
+ else
+ fun_l27_n59(x)
+ end
+end
+
+def fun_l26_n888(x)
+ if (x < 1)
+ fun_l27_n160(x)
+ else
+ fun_l27_n559(x)
+ end
+end
+
+def fun_l26_n889(x)
+ if (x < 1)
+ fun_l27_n233(x)
+ else
+ fun_l27_n148(x)
+ end
+end
+
+def fun_l26_n890(x)
+ if (x < 1)
+ fun_l27_n520(x)
+ else
+ fun_l27_n104(x)
+ end
+end
+
+def fun_l26_n891(x)
+ if (x < 1)
+ fun_l27_n826(x)
+ else
+ fun_l27_n884(x)
+ end
+end
+
+def fun_l26_n892(x)
+ if (x < 1)
+ fun_l27_n546(x)
+ else
+ fun_l27_n651(x)
+ end
+end
+
+def fun_l26_n893(x)
+ if (x < 1)
+ fun_l27_n181(x)
+ else
+ fun_l27_n430(x)
+ end
+end
+
+def fun_l26_n894(x)
+ if (x < 1)
+ fun_l27_n540(x)
+ else
+ fun_l27_n424(x)
+ end
+end
+
+def fun_l26_n895(x)
+ if (x < 1)
+ fun_l27_n321(x)
+ else
+ fun_l27_n72(x)
+ end
+end
+
+def fun_l26_n896(x)
+ if (x < 1)
+ fun_l27_n532(x)
+ else
+ fun_l27_n535(x)
+ end
+end
+
+def fun_l26_n897(x)
+ if (x < 1)
+ fun_l27_n171(x)
+ else
+ fun_l27_n575(x)
+ end
+end
+
+def fun_l26_n898(x)
+ if (x < 1)
+ fun_l27_n150(x)
+ else
+ fun_l27_n539(x)
+ end
+end
+
+def fun_l26_n899(x)
+ if (x < 1)
+ fun_l27_n27(x)
+ else
+ fun_l27_n487(x)
+ end
+end
+
+def fun_l26_n900(x)
+ if (x < 1)
+ fun_l27_n484(x)
+ else
+ fun_l27_n366(x)
+ end
+end
+
+def fun_l26_n901(x)
+ if (x < 1)
+ fun_l27_n708(x)
+ else
+ fun_l27_n624(x)
+ end
+end
+
+def fun_l26_n902(x)
+ if (x < 1)
+ fun_l27_n811(x)
+ else
+ fun_l27_n905(x)
+ end
+end
+
+def fun_l26_n903(x)
+ if (x < 1)
+ fun_l27_n474(x)
+ else
+ fun_l27_n252(x)
+ end
+end
+
+def fun_l26_n904(x)
+ if (x < 1)
+ fun_l27_n765(x)
+ else
+ fun_l27_n86(x)
+ end
+end
+
+def fun_l26_n905(x)
+ if (x < 1)
+ fun_l27_n120(x)
+ else
+ fun_l27_n868(x)
+ end
+end
+
+def fun_l26_n906(x)
+ if (x < 1)
+ fun_l27_n824(x)
+ else
+ fun_l27_n167(x)
+ end
+end
+
+def fun_l26_n907(x)
+ if (x < 1)
+ fun_l27_n874(x)
+ else
+ fun_l27_n428(x)
+ end
+end
+
+def fun_l26_n908(x)
+ if (x < 1)
+ fun_l27_n270(x)
+ else
+ fun_l27_n539(x)
+ end
+end
+
+def fun_l26_n909(x)
+ if (x < 1)
+ fun_l27_n451(x)
+ else
+ fun_l27_n64(x)
+ end
+end
+
+def fun_l26_n910(x)
+ if (x < 1)
+ fun_l27_n680(x)
+ else
+ fun_l27_n556(x)
+ end
+end
+
+def fun_l26_n911(x)
+ if (x < 1)
+ fun_l27_n480(x)
+ else
+ fun_l27_n599(x)
+ end
+end
+
+def fun_l26_n912(x)
+ if (x < 1)
+ fun_l27_n861(x)
+ else
+ fun_l27_n768(x)
+ end
+end
+
+def fun_l26_n913(x)
+ if (x < 1)
+ fun_l27_n679(x)
+ else
+ fun_l27_n541(x)
+ end
+end
+
+def fun_l26_n914(x)
+ if (x < 1)
+ fun_l27_n69(x)
+ else
+ fun_l27_n904(x)
+ end
+end
+
+def fun_l26_n915(x)
+ if (x < 1)
+ fun_l27_n658(x)
+ else
+ fun_l27_n580(x)
+ end
+end
+
+def fun_l26_n916(x)
+ if (x < 1)
+ fun_l27_n595(x)
+ else
+ fun_l27_n194(x)
+ end
+end
+
+def fun_l26_n917(x)
+ if (x < 1)
+ fun_l27_n518(x)
+ else
+ fun_l27_n613(x)
+ end
+end
+
+def fun_l26_n918(x)
+ if (x < 1)
+ fun_l27_n46(x)
+ else
+ fun_l27_n910(x)
+ end
+end
+
+def fun_l26_n919(x)
+ if (x < 1)
+ fun_l27_n471(x)
+ else
+ fun_l27_n562(x)
+ end
+end
+
+def fun_l26_n920(x)
+ if (x < 1)
+ fun_l27_n637(x)
+ else
+ fun_l27_n638(x)
+ end
+end
+
+def fun_l26_n921(x)
+ if (x < 1)
+ fun_l27_n77(x)
+ else
+ fun_l27_n100(x)
+ end
+end
+
+def fun_l26_n922(x)
+ if (x < 1)
+ fun_l27_n382(x)
+ else
+ fun_l27_n235(x)
+ end
+end
+
+def fun_l26_n923(x)
+ if (x < 1)
+ fun_l27_n576(x)
+ else
+ fun_l27_n404(x)
+ end
+end
+
+def fun_l26_n924(x)
+ if (x < 1)
+ fun_l27_n338(x)
+ else
+ fun_l27_n919(x)
+ end
+end
+
+def fun_l26_n925(x)
+ if (x < 1)
+ fun_l27_n758(x)
+ else
+ fun_l27_n141(x)
+ end
+end
+
+def fun_l26_n926(x)
+ if (x < 1)
+ fun_l27_n904(x)
+ else
+ fun_l27_n965(x)
+ end
+end
+
+def fun_l26_n927(x)
+ if (x < 1)
+ fun_l27_n149(x)
+ else
+ fun_l27_n707(x)
+ end
+end
+
+def fun_l26_n928(x)
+ if (x < 1)
+ fun_l27_n337(x)
+ else
+ fun_l27_n601(x)
+ end
+end
+
+def fun_l26_n929(x)
+ if (x < 1)
+ fun_l27_n34(x)
+ else
+ fun_l27_n383(x)
+ end
+end
+
+def fun_l26_n930(x)
+ if (x < 1)
+ fun_l27_n937(x)
+ else
+ fun_l27_n656(x)
+ end
+end
+
+def fun_l26_n931(x)
+ if (x < 1)
+ fun_l27_n786(x)
+ else
+ fun_l27_n73(x)
+ end
+end
+
+def fun_l26_n932(x)
+ if (x < 1)
+ fun_l27_n568(x)
+ else
+ fun_l27_n465(x)
+ end
+end
+
+def fun_l26_n933(x)
+ if (x < 1)
+ fun_l27_n552(x)
+ else
+ fun_l27_n557(x)
+ end
+end
+
+def fun_l26_n934(x)
+ if (x < 1)
+ fun_l27_n261(x)
+ else
+ fun_l27_n612(x)
+ end
+end
+
+def fun_l26_n935(x)
+ if (x < 1)
+ fun_l27_n707(x)
+ else
+ fun_l27_n955(x)
+ end
+end
+
+def fun_l26_n936(x)
+ if (x < 1)
+ fun_l27_n948(x)
+ else
+ fun_l27_n78(x)
+ end
+end
+
+def fun_l26_n937(x)
+ if (x < 1)
+ fun_l27_n963(x)
+ else
+ fun_l27_n203(x)
+ end
+end
+
+def fun_l26_n938(x)
+ if (x < 1)
+ fun_l27_n779(x)
+ else
+ fun_l27_n393(x)
+ end
+end
+
+def fun_l26_n939(x)
+ if (x < 1)
+ fun_l27_n403(x)
+ else
+ fun_l27_n303(x)
+ end
+end
+
+def fun_l26_n940(x)
+ if (x < 1)
+ fun_l27_n779(x)
+ else
+ fun_l27_n934(x)
+ end
+end
+
+def fun_l26_n941(x)
+ if (x < 1)
+ fun_l27_n191(x)
+ else
+ fun_l27_n414(x)
+ end
+end
+
+def fun_l26_n942(x)
+ if (x < 1)
+ fun_l27_n22(x)
+ else
+ fun_l27_n101(x)
+ end
+end
+
+def fun_l26_n943(x)
+ if (x < 1)
+ fun_l27_n501(x)
+ else
+ fun_l27_n43(x)
+ end
+end
+
+def fun_l26_n944(x)
+ if (x < 1)
+ fun_l27_n154(x)
+ else
+ fun_l27_n659(x)
+ end
+end
+
+def fun_l26_n945(x)
+ if (x < 1)
+ fun_l27_n346(x)
+ else
+ fun_l27_n380(x)
+ end
+end
+
+def fun_l26_n946(x)
+ if (x < 1)
+ fun_l27_n653(x)
+ else
+ fun_l27_n762(x)
+ end
+end
+
+def fun_l26_n947(x)
+ if (x < 1)
+ fun_l27_n191(x)
+ else
+ fun_l27_n649(x)
+ end
+end
+
+def fun_l26_n948(x)
+ if (x < 1)
+ fun_l27_n645(x)
+ else
+ fun_l27_n199(x)
+ end
+end
+
+def fun_l26_n949(x)
+ if (x < 1)
+ fun_l27_n251(x)
+ else
+ fun_l27_n461(x)
+ end
+end
+
+def fun_l26_n950(x)
+ if (x < 1)
+ fun_l27_n720(x)
+ else
+ fun_l27_n645(x)
+ end
+end
+
+def fun_l26_n951(x)
+ if (x < 1)
+ fun_l27_n200(x)
+ else
+ fun_l27_n73(x)
+ end
+end
+
+def fun_l26_n952(x)
+ if (x < 1)
+ fun_l27_n86(x)
+ else
+ fun_l27_n526(x)
+ end
+end
+
+def fun_l26_n953(x)
+ if (x < 1)
+ fun_l27_n448(x)
+ else
+ fun_l27_n108(x)
+ end
+end
+
+def fun_l26_n954(x)
+ if (x < 1)
+ fun_l27_n931(x)
+ else
+ fun_l27_n540(x)
+ end
+end
+
+def fun_l26_n955(x)
+ if (x < 1)
+ fun_l27_n298(x)
+ else
+ fun_l27_n836(x)
+ end
+end
+
+def fun_l26_n956(x)
+ if (x < 1)
+ fun_l27_n232(x)
+ else
+ fun_l27_n200(x)
+ end
+end
+
+def fun_l26_n957(x)
+ if (x < 1)
+ fun_l27_n342(x)
+ else
+ fun_l27_n885(x)
+ end
+end
+
+def fun_l26_n958(x)
+ if (x < 1)
+ fun_l27_n254(x)
+ else
+ fun_l27_n764(x)
+ end
+end
+
+def fun_l26_n959(x)
+ if (x < 1)
+ fun_l27_n765(x)
+ else
+ fun_l27_n264(x)
+ end
+end
+
+def fun_l26_n960(x)
+ if (x < 1)
+ fun_l27_n45(x)
+ else
+ fun_l27_n993(x)
+ end
+end
+
+def fun_l26_n961(x)
+ if (x < 1)
+ fun_l27_n105(x)
+ else
+ fun_l27_n100(x)
+ end
+end
+
+def fun_l26_n962(x)
+ if (x < 1)
+ fun_l27_n979(x)
+ else
+ fun_l27_n87(x)
+ end
+end
+
+def fun_l26_n963(x)
+ if (x < 1)
+ fun_l27_n103(x)
+ else
+ fun_l27_n927(x)
+ end
+end
+
+def fun_l26_n964(x)
+ if (x < 1)
+ fun_l27_n635(x)
+ else
+ fun_l27_n489(x)
+ end
+end
+
+def fun_l26_n965(x)
+ if (x < 1)
+ fun_l27_n565(x)
+ else
+ fun_l27_n70(x)
+ end
+end
+
+def fun_l26_n966(x)
+ if (x < 1)
+ fun_l27_n370(x)
+ else
+ fun_l27_n975(x)
+ end
+end
+
+def fun_l26_n967(x)
+ if (x < 1)
+ fun_l27_n997(x)
+ else
+ fun_l27_n132(x)
+ end
+end
+
+def fun_l26_n968(x)
+ if (x < 1)
+ fun_l27_n964(x)
+ else
+ fun_l27_n201(x)
+ end
+end
+
+def fun_l26_n969(x)
+ if (x < 1)
+ fun_l27_n710(x)
+ else
+ fun_l27_n875(x)
+ end
+end
+
+def fun_l26_n970(x)
+ if (x < 1)
+ fun_l27_n736(x)
+ else
+ fun_l27_n338(x)
+ end
+end
+
+def fun_l26_n971(x)
+ if (x < 1)
+ fun_l27_n429(x)
+ else
+ fun_l27_n64(x)
+ end
+end
+
+def fun_l26_n972(x)
+ if (x < 1)
+ fun_l27_n986(x)
+ else
+ fun_l27_n27(x)
+ end
+end
+
+def fun_l26_n973(x)
+ if (x < 1)
+ fun_l27_n419(x)
+ else
+ fun_l27_n579(x)
+ end
+end
+
+def fun_l26_n974(x)
+ if (x < 1)
+ fun_l27_n479(x)
+ else
+ fun_l27_n709(x)
+ end
+end
+
+def fun_l26_n975(x)
+ if (x < 1)
+ fun_l27_n524(x)
+ else
+ fun_l27_n550(x)
+ end
+end
+
+def fun_l26_n976(x)
+ if (x < 1)
+ fun_l27_n679(x)
+ else
+ fun_l27_n822(x)
+ end
+end
+
+def fun_l26_n977(x)
+ if (x < 1)
+ fun_l27_n535(x)
+ else
+ fun_l27_n198(x)
+ end
+end
+
+def fun_l26_n978(x)
+ if (x < 1)
+ fun_l27_n226(x)
+ else
+ fun_l27_n610(x)
+ end
+end
+
+def fun_l26_n979(x)
+ if (x < 1)
+ fun_l27_n460(x)
+ else
+ fun_l27_n562(x)
+ end
+end
+
+def fun_l26_n980(x)
+ if (x < 1)
+ fun_l27_n109(x)
+ else
+ fun_l27_n632(x)
+ end
+end
+
+def fun_l26_n981(x)
+ if (x < 1)
+ fun_l27_n936(x)
+ else
+ fun_l27_n288(x)
+ end
+end
+
+def fun_l26_n982(x)
+ if (x < 1)
+ fun_l27_n668(x)
+ else
+ fun_l27_n5(x)
+ end
+end
+
+def fun_l26_n983(x)
+ if (x < 1)
+ fun_l27_n458(x)
+ else
+ fun_l27_n861(x)
+ end
+end
+
+def fun_l26_n984(x)
+ if (x < 1)
+ fun_l27_n722(x)
+ else
+ fun_l27_n838(x)
+ end
+end
+
+def fun_l26_n985(x)
+ if (x < 1)
+ fun_l27_n883(x)
+ else
+ fun_l27_n124(x)
+ end
+end
+
+def fun_l26_n986(x)
+ if (x < 1)
+ fun_l27_n873(x)
+ else
+ fun_l27_n399(x)
+ end
+end
+
+def fun_l26_n987(x)
+ if (x < 1)
+ fun_l27_n449(x)
+ else
+ fun_l27_n34(x)
+ end
+end
+
+def fun_l26_n988(x)
+ if (x < 1)
+ fun_l27_n549(x)
+ else
+ fun_l27_n304(x)
+ end
+end
+
+def fun_l26_n989(x)
+ if (x < 1)
+ fun_l27_n287(x)
+ else
+ fun_l27_n270(x)
+ end
+end
+
+def fun_l26_n990(x)
+ if (x < 1)
+ fun_l27_n950(x)
+ else
+ fun_l27_n203(x)
+ end
+end
+
+def fun_l26_n991(x)
+ if (x < 1)
+ fun_l27_n39(x)
+ else
+ fun_l27_n284(x)
+ end
+end
+
+def fun_l26_n992(x)
+ if (x < 1)
+ fun_l27_n944(x)
+ else
+ fun_l27_n420(x)
+ end
+end
+
+def fun_l26_n993(x)
+ if (x < 1)
+ fun_l27_n254(x)
+ else
+ fun_l27_n960(x)
+ end
+end
+
+def fun_l26_n994(x)
+ if (x < 1)
+ fun_l27_n374(x)
+ else
+ fun_l27_n354(x)
+ end
+end
+
+def fun_l26_n995(x)
+ if (x < 1)
+ fun_l27_n766(x)
+ else
+ fun_l27_n937(x)
+ end
+end
+
+def fun_l26_n996(x)
+ if (x < 1)
+ fun_l27_n299(x)
+ else
+ fun_l27_n565(x)
+ end
+end
+
+def fun_l26_n997(x)
+ if (x < 1)
+ fun_l27_n390(x)
+ else
+ fun_l27_n924(x)
+ end
+end
+
+def fun_l26_n998(x)
+ if (x < 1)
+ fun_l27_n452(x)
+ else
+ fun_l27_n653(x)
+ end
+end
+
+def fun_l26_n999(x)
+ if (x < 1)
+ fun_l27_n110(x)
+ else
+ fun_l27_n781(x)
+ end
+end
+
+def fun_l27_n0(x)
+ if (x < 1)
+ fun_l28_n77(x)
+ else
+ fun_l28_n170(x)
+ end
+end
+
+def fun_l27_n1(x)
+ if (x < 1)
+ fun_l28_n420(x)
+ else
+ fun_l28_n414(x)
+ end
+end
+
+def fun_l27_n2(x)
+ if (x < 1)
+ fun_l28_n802(x)
+ else
+ fun_l28_n702(x)
+ end
+end
+
+def fun_l27_n3(x)
+ if (x < 1)
+ fun_l28_n742(x)
+ else
+ fun_l28_n819(x)
+ end
+end
+
+def fun_l27_n4(x)
+ if (x < 1)
+ fun_l28_n75(x)
+ else
+ fun_l28_n675(x)
+ end
+end
+
+def fun_l27_n5(x)
+ if (x < 1)
+ fun_l28_n276(x)
+ else
+ fun_l28_n554(x)
+ end
+end
+
+def fun_l27_n6(x)
+ if (x < 1)
+ fun_l28_n505(x)
+ else
+ fun_l28_n462(x)
+ end
+end
+
+def fun_l27_n7(x)
+ if (x < 1)
+ fun_l28_n401(x)
+ else
+ fun_l28_n437(x)
+ end
+end
+
+def fun_l27_n8(x)
+ if (x < 1)
+ fun_l28_n987(x)
+ else
+ fun_l28_n911(x)
+ end
+end
+
+def fun_l27_n9(x)
+ if (x < 1)
+ fun_l28_n196(x)
+ else
+ fun_l28_n507(x)
+ end
+end
+
+def fun_l27_n10(x)
+ if (x < 1)
+ fun_l28_n676(x)
+ else
+ fun_l28_n612(x)
+ end
+end
+
+def fun_l27_n11(x)
+ if (x < 1)
+ fun_l28_n630(x)
+ else
+ fun_l28_n897(x)
+ end
+end
+
+def fun_l27_n12(x)
+ if (x < 1)
+ fun_l28_n655(x)
+ else
+ fun_l28_n58(x)
+ end
+end
+
+def fun_l27_n13(x)
+ if (x < 1)
+ fun_l28_n777(x)
+ else
+ fun_l28_n138(x)
+ end
+end
+
+def fun_l27_n14(x)
+ if (x < 1)
+ fun_l28_n233(x)
+ else
+ fun_l28_n296(x)
+ end
+end
+
+def fun_l27_n15(x)
+ if (x < 1)
+ fun_l28_n580(x)
+ else
+ fun_l28_n538(x)
+ end
+end
+
+def fun_l27_n16(x)
+ if (x < 1)
+ fun_l28_n124(x)
+ else
+ fun_l28_n285(x)
+ end
+end
+
+def fun_l27_n17(x)
+ if (x < 1)
+ fun_l28_n250(x)
+ else
+ fun_l28_n255(x)
+ end
+end
+
+def fun_l27_n18(x)
+ if (x < 1)
+ fun_l28_n872(x)
+ else
+ fun_l28_n242(x)
+ end
+end
+
+def fun_l27_n19(x)
+ if (x < 1)
+ fun_l28_n548(x)
+ else
+ fun_l28_n30(x)
+ end
+end
+
+def fun_l27_n20(x)
+ if (x < 1)
+ fun_l28_n411(x)
+ else
+ fun_l28_n997(x)
+ end
+end
+
+def fun_l27_n21(x)
+ if (x < 1)
+ fun_l28_n860(x)
+ else
+ fun_l28_n22(x)
+ end
+end
+
+def fun_l27_n22(x)
+ if (x < 1)
+ fun_l28_n147(x)
+ else
+ fun_l28_n210(x)
+ end
+end
+
+def fun_l27_n23(x)
+ if (x < 1)
+ fun_l28_n763(x)
+ else
+ fun_l28_n652(x)
+ end
+end
+
+def fun_l27_n24(x)
+ if (x < 1)
+ fun_l28_n678(x)
+ else
+ fun_l28_n637(x)
+ end
+end
+
+def fun_l27_n25(x)
+ if (x < 1)
+ fun_l28_n748(x)
+ else
+ fun_l28_n445(x)
+ end
+end
+
+def fun_l27_n26(x)
+ if (x < 1)
+ fun_l28_n796(x)
+ else
+ fun_l28_n780(x)
+ end
+end
+
+def fun_l27_n27(x)
+ if (x < 1)
+ fun_l28_n26(x)
+ else
+ fun_l28_n737(x)
+ end
+end
+
+def fun_l27_n28(x)
+ if (x < 1)
+ fun_l28_n779(x)
+ else
+ fun_l28_n206(x)
+ end
+end
+
+def fun_l27_n29(x)
+ if (x < 1)
+ fun_l28_n236(x)
+ else
+ fun_l28_n864(x)
+ end
+end
+
+def fun_l27_n30(x)
+ if (x < 1)
+ fun_l28_n937(x)
+ else
+ fun_l28_n524(x)
+ end
+end
+
+def fun_l27_n31(x)
+ if (x < 1)
+ fun_l28_n61(x)
+ else
+ fun_l28_n791(x)
+ end
+end
+
+def fun_l27_n32(x)
+ if (x < 1)
+ fun_l28_n891(x)
+ else
+ fun_l28_n424(x)
+ end
+end
+
+def fun_l27_n33(x)
+ if (x < 1)
+ fun_l28_n856(x)
+ else
+ fun_l28_n544(x)
+ end
+end
+
+def fun_l27_n34(x)
+ if (x < 1)
+ fun_l28_n575(x)
+ else
+ fun_l28_n608(x)
+ end
+end
+
+def fun_l27_n35(x)
+ if (x < 1)
+ fun_l28_n546(x)
+ else
+ fun_l28_n164(x)
+ end
+end
+
+def fun_l27_n36(x)
+ if (x < 1)
+ fun_l28_n482(x)
+ else
+ fun_l28_n854(x)
+ end
+end
+
+def fun_l27_n37(x)
+ if (x < 1)
+ fun_l28_n667(x)
+ else
+ fun_l28_n568(x)
+ end
+end
+
+def fun_l27_n38(x)
+ if (x < 1)
+ fun_l28_n8(x)
+ else
+ fun_l28_n794(x)
+ end
+end
+
+def fun_l27_n39(x)
+ if (x < 1)
+ fun_l28_n504(x)
+ else
+ fun_l28_n199(x)
+ end
+end
+
+def fun_l27_n40(x)
+ if (x < 1)
+ fun_l28_n360(x)
+ else
+ fun_l28_n714(x)
+ end
+end
+
+def fun_l27_n41(x)
+ if (x < 1)
+ fun_l28_n758(x)
+ else
+ fun_l28_n499(x)
+ end
+end
+
+def fun_l27_n42(x)
+ if (x < 1)
+ fun_l28_n617(x)
+ else
+ fun_l28_n239(x)
+ end
+end
+
+def fun_l27_n43(x)
+ if (x < 1)
+ fun_l28_n357(x)
+ else
+ fun_l28_n950(x)
+ end
+end
+
+def fun_l27_n44(x)
+ if (x < 1)
+ fun_l28_n308(x)
+ else
+ fun_l28_n248(x)
+ end
+end
+
+def fun_l27_n45(x)
+ if (x < 1)
+ fun_l28_n887(x)
+ else
+ fun_l28_n541(x)
+ end
+end
+
+def fun_l27_n46(x)
+ if (x < 1)
+ fun_l28_n922(x)
+ else
+ fun_l28_n21(x)
+ end
+end
+
+def fun_l27_n47(x)
+ if (x < 1)
+ fun_l28_n398(x)
+ else
+ fun_l28_n781(x)
+ end
+end
+
+def fun_l27_n48(x)
+ if (x < 1)
+ fun_l28_n573(x)
+ else
+ fun_l28_n22(x)
+ end
+end
+
+def fun_l27_n49(x)
+ if (x < 1)
+ fun_l28_n324(x)
+ else
+ fun_l28_n764(x)
+ end
+end
+
+def fun_l27_n50(x)
+ if (x < 1)
+ fun_l28_n428(x)
+ else
+ fun_l28_n3(x)
+ end
+end
+
+def fun_l27_n51(x)
+ if (x < 1)
+ fun_l28_n637(x)
+ else
+ fun_l28_n871(x)
+ end
+end
+
+def fun_l27_n52(x)
+ if (x < 1)
+ fun_l28_n547(x)
+ else
+ fun_l28_n370(x)
+ end
+end
+
+def fun_l27_n53(x)
+ if (x < 1)
+ fun_l28_n864(x)
+ else
+ fun_l28_n360(x)
+ end
+end
+
+def fun_l27_n54(x)
+ if (x < 1)
+ fun_l28_n960(x)
+ else
+ fun_l28_n80(x)
+ end
+end
+
+def fun_l27_n55(x)
+ if (x < 1)
+ fun_l28_n339(x)
+ else
+ fun_l28_n828(x)
+ end
+end
+
+def fun_l27_n56(x)
+ if (x < 1)
+ fun_l28_n613(x)
+ else
+ fun_l28_n109(x)
+ end
+end
+
+def fun_l27_n57(x)
+ if (x < 1)
+ fun_l28_n458(x)
+ else
+ fun_l28_n339(x)
+ end
+end
+
+def fun_l27_n58(x)
+ if (x < 1)
+ fun_l28_n313(x)
+ else
+ fun_l28_n20(x)
+ end
+end
+
+def fun_l27_n59(x)
+ if (x < 1)
+ fun_l28_n642(x)
+ else
+ fun_l28_n582(x)
+ end
+end
+
+def fun_l27_n60(x)
+ if (x < 1)
+ fun_l28_n407(x)
+ else
+ fun_l28_n182(x)
+ end
+end
+
+def fun_l27_n61(x)
+ if (x < 1)
+ fun_l28_n475(x)
+ else
+ fun_l28_n865(x)
+ end
+end
+
+def fun_l27_n62(x)
+ if (x < 1)
+ fun_l28_n867(x)
+ else
+ fun_l28_n935(x)
+ end
+end
+
+def fun_l27_n63(x)
+ if (x < 1)
+ fun_l28_n361(x)
+ else
+ fun_l28_n675(x)
+ end
+end
+
+def fun_l27_n64(x)
+ if (x < 1)
+ fun_l28_n583(x)
+ else
+ fun_l28_n990(x)
+ end
+end
+
+def fun_l27_n65(x)
+ if (x < 1)
+ fun_l28_n305(x)
+ else
+ fun_l28_n918(x)
+ end
+end
+
+def fun_l27_n66(x)
+ if (x < 1)
+ fun_l28_n449(x)
+ else
+ fun_l28_n172(x)
+ end
+end
+
+def fun_l27_n67(x)
+ if (x < 1)
+ fun_l28_n384(x)
+ else
+ fun_l28_n102(x)
+ end
+end
+
+def fun_l27_n68(x)
+ if (x < 1)
+ fun_l28_n27(x)
+ else
+ fun_l28_n638(x)
+ end
+end
+
+def fun_l27_n69(x)
+ if (x < 1)
+ fun_l28_n370(x)
+ else
+ fun_l28_n305(x)
+ end
+end
+
+def fun_l27_n70(x)
+ if (x < 1)
+ fun_l28_n91(x)
+ else
+ fun_l28_n516(x)
+ end
+end
+
+def fun_l27_n71(x)
+ if (x < 1)
+ fun_l28_n835(x)
+ else
+ fun_l28_n422(x)
+ end
+end
+
+def fun_l27_n72(x)
+ if (x < 1)
+ fun_l28_n528(x)
+ else
+ fun_l28_n924(x)
+ end
+end
+
+def fun_l27_n73(x)
+ if (x < 1)
+ fun_l28_n910(x)
+ else
+ fun_l28_n177(x)
+ end
+end
+
+def fun_l27_n74(x)
+ if (x < 1)
+ fun_l28_n424(x)
+ else
+ fun_l28_n133(x)
+ end
+end
+
+def fun_l27_n75(x)
+ if (x < 1)
+ fun_l28_n207(x)
+ else
+ fun_l28_n206(x)
+ end
+end
+
+def fun_l27_n76(x)
+ if (x < 1)
+ fun_l28_n285(x)
+ else
+ fun_l28_n513(x)
+ end
+end
+
+def fun_l27_n77(x)
+ if (x < 1)
+ fun_l28_n446(x)
+ else
+ fun_l28_n985(x)
+ end
+end
+
+def fun_l27_n78(x)
+ if (x < 1)
+ fun_l28_n814(x)
+ else
+ fun_l28_n43(x)
+ end
+end
+
+def fun_l27_n79(x)
+ if (x < 1)
+ fun_l28_n155(x)
+ else
+ fun_l28_n944(x)
+ end
+end
+
+def fun_l27_n80(x)
+ if (x < 1)
+ fun_l28_n22(x)
+ else
+ fun_l28_n815(x)
+ end
+end
+
+def fun_l27_n81(x)
+ if (x < 1)
+ fun_l28_n465(x)
+ else
+ fun_l28_n132(x)
+ end
+end
+
+def fun_l27_n82(x)
+ if (x < 1)
+ fun_l28_n540(x)
+ else
+ fun_l28_n199(x)
+ end
+end
+
+def fun_l27_n83(x)
+ if (x < 1)
+ fun_l28_n28(x)
+ else
+ fun_l28_n64(x)
+ end
+end
+
+def fun_l27_n84(x)
+ if (x < 1)
+ fun_l28_n4(x)
+ else
+ fun_l28_n782(x)
+ end
+end
+
+def fun_l27_n85(x)
+ if (x < 1)
+ fun_l28_n685(x)
+ else
+ fun_l28_n57(x)
+ end
+end
+
+def fun_l27_n86(x)
+ if (x < 1)
+ fun_l28_n755(x)
+ else
+ fun_l28_n317(x)
+ end
+end
+
+def fun_l27_n87(x)
+ if (x < 1)
+ fun_l28_n298(x)
+ else
+ fun_l28_n645(x)
+ end
+end
+
+def fun_l27_n88(x)
+ if (x < 1)
+ fun_l28_n489(x)
+ else
+ fun_l28_n357(x)
+ end
+end
+
+def fun_l27_n89(x)
+ if (x < 1)
+ fun_l28_n225(x)
+ else
+ fun_l28_n465(x)
+ end
+end
+
+def fun_l27_n90(x)
+ if (x < 1)
+ fun_l28_n729(x)
+ else
+ fun_l28_n688(x)
+ end
+end
+
+def fun_l27_n91(x)
+ if (x < 1)
+ fun_l28_n936(x)
+ else
+ fun_l28_n62(x)
+ end
+end
+
+def fun_l27_n92(x)
+ if (x < 1)
+ fun_l28_n564(x)
+ else
+ fun_l28_n497(x)
+ end
+end
+
+def fun_l27_n93(x)
+ if (x < 1)
+ fun_l28_n78(x)
+ else
+ fun_l28_n167(x)
+ end
+end
+
+def fun_l27_n94(x)
+ if (x < 1)
+ fun_l28_n24(x)
+ else
+ fun_l28_n543(x)
+ end
+end
+
+def fun_l27_n95(x)
+ if (x < 1)
+ fun_l28_n56(x)
+ else
+ fun_l28_n796(x)
+ end
+end
+
+def fun_l27_n96(x)
+ if (x < 1)
+ fun_l28_n768(x)
+ else
+ fun_l28_n909(x)
+ end
+end
+
+def fun_l27_n97(x)
+ if (x < 1)
+ fun_l28_n72(x)
+ else
+ fun_l28_n604(x)
+ end
+end
+
+def fun_l27_n98(x)
+ if (x < 1)
+ fun_l28_n903(x)
+ else
+ fun_l28_n998(x)
+ end
+end
+
+def fun_l27_n99(x)
+ if (x < 1)
+ fun_l28_n525(x)
+ else
+ fun_l28_n158(x)
+ end
+end
+
+def fun_l27_n100(x)
+ if (x < 1)
+ fun_l28_n54(x)
+ else
+ fun_l28_n667(x)
+ end
+end
+
+def fun_l27_n101(x)
+ if (x < 1)
+ fun_l28_n894(x)
+ else
+ fun_l28_n807(x)
+ end
+end
+
+def fun_l27_n102(x)
+ if (x < 1)
+ fun_l28_n334(x)
+ else
+ fun_l28_n479(x)
+ end
+end
+
+def fun_l27_n103(x)
+ if (x < 1)
+ fun_l28_n211(x)
+ else
+ fun_l28_n383(x)
+ end
+end
+
+def fun_l27_n104(x)
+ if (x < 1)
+ fun_l28_n598(x)
+ else
+ fun_l28_n793(x)
+ end
+end
+
+def fun_l27_n105(x)
+ if (x < 1)
+ fun_l28_n812(x)
+ else
+ fun_l28_n806(x)
+ end
+end
+
+def fun_l27_n106(x)
+ if (x < 1)
+ fun_l28_n726(x)
+ else
+ fun_l28_n769(x)
+ end
+end
+
+def fun_l27_n107(x)
+ if (x < 1)
+ fun_l28_n593(x)
+ else
+ fun_l28_n173(x)
+ end
+end
+
+def fun_l27_n108(x)
+ if (x < 1)
+ fun_l28_n490(x)
+ else
+ fun_l28_n681(x)
+ end
+end
+
+def fun_l27_n109(x)
+ if (x < 1)
+ fun_l28_n691(x)
+ else
+ fun_l28_n323(x)
+ end
+end
+
+def fun_l27_n110(x)
+ if (x < 1)
+ fun_l28_n710(x)
+ else
+ fun_l28_n624(x)
+ end
+end
+
+def fun_l27_n111(x)
+ if (x < 1)
+ fun_l28_n563(x)
+ else
+ fun_l28_n335(x)
+ end
+end
+
+def fun_l27_n112(x)
+ if (x < 1)
+ fun_l28_n510(x)
+ else
+ fun_l28_n879(x)
+ end
+end
+
+def fun_l27_n113(x)
+ if (x < 1)
+ fun_l28_n900(x)
+ else
+ fun_l28_n119(x)
+ end
+end
+
+def fun_l27_n114(x)
+ if (x < 1)
+ fun_l28_n17(x)
+ else
+ fun_l28_n8(x)
+ end
+end
+
+def fun_l27_n115(x)
+ if (x < 1)
+ fun_l28_n813(x)
+ else
+ fun_l28_n948(x)
+ end
+end
+
+def fun_l27_n116(x)
+ if (x < 1)
+ fun_l28_n644(x)
+ else
+ fun_l28_n177(x)
+ end
+end
+
+def fun_l27_n117(x)
+ if (x < 1)
+ fun_l28_n635(x)
+ else
+ fun_l28_n489(x)
+ end
+end
+
+def fun_l27_n118(x)
+ if (x < 1)
+ fun_l28_n520(x)
+ else
+ fun_l28_n127(x)
+ end
+end
+
+def fun_l27_n119(x)
+ if (x < 1)
+ fun_l28_n859(x)
+ else
+ fun_l28_n264(x)
+ end
+end
+
+def fun_l27_n120(x)
+ if (x < 1)
+ fun_l28_n29(x)
+ else
+ fun_l28_n984(x)
+ end
+end
+
+def fun_l27_n121(x)
+ if (x < 1)
+ fun_l28_n2(x)
+ else
+ fun_l28_n858(x)
+ end
+end
+
+def fun_l27_n122(x)
+ if (x < 1)
+ fun_l28_n907(x)
+ else
+ fun_l28_n34(x)
+ end
+end
+
+def fun_l27_n123(x)
+ if (x < 1)
+ fun_l28_n495(x)
+ else
+ fun_l28_n144(x)
+ end
+end
+
+def fun_l27_n124(x)
+ if (x < 1)
+ fun_l28_n160(x)
+ else
+ fun_l28_n987(x)
+ end
+end
+
+def fun_l27_n125(x)
+ if (x < 1)
+ fun_l28_n60(x)
+ else
+ fun_l28_n415(x)
+ end
+end
+
+def fun_l27_n126(x)
+ if (x < 1)
+ fun_l28_n473(x)
+ else
+ fun_l28_n461(x)
+ end
+end
+
+def fun_l27_n127(x)
+ if (x < 1)
+ fun_l28_n664(x)
+ else
+ fun_l28_n764(x)
+ end
+end
+
+def fun_l27_n128(x)
+ if (x < 1)
+ fun_l28_n815(x)
+ else
+ fun_l28_n677(x)
+ end
+end
+
+def fun_l27_n129(x)
+ if (x < 1)
+ fun_l28_n828(x)
+ else
+ fun_l28_n575(x)
+ end
+end
+
+def fun_l27_n130(x)
+ if (x < 1)
+ fun_l28_n100(x)
+ else
+ fun_l28_n811(x)
+ end
+end
+
+def fun_l27_n131(x)
+ if (x < 1)
+ fun_l28_n789(x)
+ else
+ fun_l28_n246(x)
+ end
+end
+
+def fun_l27_n132(x)
+ if (x < 1)
+ fun_l28_n506(x)
+ else
+ fun_l28_n555(x)
+ end
+end
+
+def fun_l27_n133(x)
+ if (x < 1)
+ fun_l28_n272(x)
+ else
+ fun_l28_n115(x)
+ end
+end
+
+def fun_l27_n134(x)
+ if (x < 1)
+ fun_l28_n925(x)
+ else
+ fun_l28_n34(x)
+ end
+end
+
+def fun_l27_n135(x)
+ if (x < 1)
+ fun_l28_n844(x)
+ else
+ fun_l28_n725(x)
+ end
+end
+
+def fun_l27_n136(x)
+ if (x < 1)
+ fun_l28_n825(x)
+ else
+ fun_l28_n38(x)
+ end
+end
+
+def fun_l27_n137(x)
+ if (x < 1)
+ fun_l28_n607(x)
+ else
+ fun_l28_n343(x)
+ end
+end
+
+def fun_l27_n138(x)
+ if (x < 1)
+ fun_l28_n874(x)
+ else
+ fun_l28_n449(x)
+ end
+end
+
+def fun_l27_n139(x)
+ if (x < 1)
+ fun_l28_n632(x)
+ else
+ fun_l28_n454(x)
+ end
+end
+
+def fun_l27_n140(x)
+ if (x < 1)
+ fun_l28_n902(x)
+ else
+ fun_l28_n301(x)
+ end
+end
+
+def fun_l27_n141(x)
+ if (x < 1)
+ fun_l28_n395(x)
+ else
+ fun_l28_n890(x)
+ end
+end
+
+def fun_l27_n142(x)
+ if (x < 1)
+ fun_l28_n625(x)
+ else
+ fun_l28_n246(x)
+ end
+end
+
+def fun_l27_n143(x)
+ if (x < 1)
+ fun_l28_n312(x)
+ else
+ fun_l28_n975(x)
+ end
+end
+
+def fun_l27_n144(x)
+ if (x < 1)
+ fun_l28_n974(x)
+ else
+ fun_l28_n451(x)
+ end
+end
+
+def fun_l27_n145(x)
+ if (x < 1)
+ fun_l28_n541(x)
+ else
+ fun_l28_n566(x)
+ end
+end
+
+def fun_l27_n146(x)
+ if (x < 1)
+ fun_l28_n285(x)
+ else
+ fun_l28_n443(x)
+ end
+end
+
+def fun_l27_n147(x)
+ if (x < 1)
+ fun_l28_n71(x)
+ else
+ fun_l28_n200(x)
+ end
+end
+
+def fun_l27_n148(x)
+ if (x < 1)
+ fun_l28_n681(x)
+ else
+ fun_l28_n561(x)
+ end
+end
+
+def fun_l27_n149(x)
+ if (x < 1)
+ fun_l28_n470(x)
+ else
+ fun_l28_n529(x)
+ end
+end
+
+def fun_l27_n150(x)
+ if (x < 1)
+ fun_l28_n83(x)
+ else
+ fun_l28_n755(x)
+ end
+end
+
+def fun_l27_n151(x)
+ if (x < 1)
+ fun_l28_n142(x)
+ else
+ fun_l28_n631(x)
+ end
+end
+
+def fun_l27_n152(x)
+ if (x < 1)
+ fun_l28_n49(x)
+ else
+ fun_l28_n531(x)
+ end
+end
+
+def fun_l27_n153(x)
+ if (x < 1)
+ fun_l28_n237(x)
+ else
+ fun_l28_n241(x)
+ end
+end
+
+def fun_l27_n154(x)
+ if (x < 1)
+ fun_l28_n36(x)
+ else
+ fun_l28_n862(x)
+ end
+end
+
+def fun_l27_n155(x)
+ if (x < 1)
+ fun_l28_n310(x)
+ else
+ fun_l28_n387(x)
+ end
+end
+
+def fun_l27_n156(x)
+ if (x < 1)
+ fun_l28_n1(x)
+ else
+ fun_l28_n131(x)
+ end
+end
+
+def fun_l27_n157(x)
+ if (x < 1)
+ fun_l28_n232(x)
+ else
+ fun_l28_n503(x)
+ end
+end
+
+def fun_l27_n158(x)
+ if (x < 1)
+ fun_l28_n48(x)
+ else
+ fun_l28_n68(x)
+ end
+end
+
+def fun_l27_n159(x)
+ if (x < 1)
+ fun_l28_n98(x)
+ else
+ fun_l28_n82(x)
+ end
+end
+
+def fun_l27_n160(x)
+ if (x < 1)
+ fun_l28_n175(x)
+ else
+ fun_l28_n466(x)
+ end
+end
+
+def fun_l27_n161(x)
+ if (x < 1)
+ fun_l28_n105(x)
+ else
+ fun_l28_n159(x)
+ end
+end
+
+def fun_l27_n162(x)
+ if (x < 1)
+ fun_l28_n336(x)
+ else
+ fun_l28_n314(x)
+ end
+end
+
+def fun_l27_n163(x)
+ if (x < 1)
+ fun_l28_n458(x)
+ else
+ fun_l28_n901(x)
+ end
+end
+
+def fun_l27_n164(x)
+ if (x < 1)
+ fun_l28_n621(x)
+ else
+ fun_l28_n876(x)
+ end
+end
+
+def fun_l27_n165(x)
+ if (x < 1)
+ fun_l28_n830(x)
+ else
+ fun_l28_n468(x)
+ end
+end
+
+def fun_l27_n166(x)
+ if (x < 1)
+ fun_l28_n606(x)
+ else
+ fun_l28_n253(x)
+ end
+end
+
+def fun_l27_n167(x)
+ if (x < 1)
+ fun_l28_n905(x)
+ else
+ fun_l28_n582(x)
+ end
+end
+
+def fun_l27_n168(x)
+ if (x < 1)
+ fun_l28_n882(x)
+ else
+ fun_l28_n280(x)
+ end
+end
+
+def fun_l27_n169(x)
+ if (x < 1)
+ fun_l28_n824(x)
+ else
+ fun_l28_n672(x)
+ end
+end
+
+def fun_l27_n170(x)
+ if (x < 1)
+ fun_l28_n455(x)
+ else
+ fun_l28_n621(x)
+ end
+end
+
+def fun_l27_n171(x)
+ if (x < 1)
+ fun_l28_n594(x)
+ else
+ fun_l28_n143(x)
+ end
+end
+
+def fun_l27_n172(x)
+ if (x < 1)
+ fun_l28_n414(x)
+ else
+ fun_l28_n371(x)
+ end
+end
+
+def fun_l27_n173(x)
+ if (x < 1)
+ fun_l28_n2(x)
+ else
+ fun_l28_n883(x)
+ end
+end
+
+def fun_l27_n174(x)
+ if (x < 1)
+ fun_l28_n710(x)
+ else
+ fun_l28_n322(x)
+ end
+end
+
+def fun_l27_n175(x)
+ if (x < 1)
+ fun_l28_n271(x)
+ else
+ fun_l28_n110(x)
+ end
+end
+
+def fun_l27_n176(x)
+ if (x < 1)
+ fun_l28_n100(x)
+ else
+ fun_l28_n870(x)
+ end
+end
+
+def fun_l27_n177(x)
+ if (x < 1)
+ fun_l28_n446(x)
+ else
+ fun_l28_n742(x)
+ end
+end
+
+def fun_l27_n178(x)
+ if (x < 1)
+ fun_l28_n175(x)
+ else
+ fun_l28_n170(x)
+ end
+end
+
+def fun_l27_n179(x)
+ if (x < 1)
+ fun_l28_n724(x)
+ else
+ fun_l28_n364(x)
+ end
+end
+
+def fun_l27_n180(x)
+ if (x < 1)
+ fun_l28_n167(x)
+ else
+ fun_l28_n826(x)
+ end
+end
+
+def fun_l27_n181(x)
+ if (x < 1)
+ fun_l28_n65(x)
+ else
+ fun_l28_n375(x)
+ end
+end
+
+def fun_l27_n182(x)
+ if (x < 1)
+ fun_l28_n709(x)
+ else
+ fun_l28_n62(x)
+ end
+end
+
+def fun_l27_n183(x)
+ if (x < 1)
+ fun_l28_n584(x)
+ else
+ fun_l28_n611(x)
+ end
+end
+
+def fun_l27_n184(x)
+ if (x < 1)
+ fun_l28_n442(x)
+ else
+ fun_l28_n174(x)
+ end
+end
+
+def fun_l27_n185(x)
+ if (x < 1)
+ fun_l28_n684(x)
+ else
+ fun_l28_n768(x)
+ end
+end
+
+def fun_l27_n186(x)
+ if (x < 1)
+ fun_l28_n424(x)
+ else
+ fun_l28_n207(x)
+ end
+end
+
+def fun_l27_n187(x)
+ if (x < 1)
+ fun_l28_n670(x)
+ else
+ fun_l28_n970(x)
+ end
+end
+
+def fun_l27_n188(x)
+ if (x < 1)
+ fun_l28_n470(x)
+ else
+ fun_l28_n774(x)
+ end
+end
+
+def fun_l27_n189(x)
+ if (x < 1)
+ fun_l28_n58(x)
+ else
+ fun_l28_n578(x)
+ end
+end
+
+def fun_l27_n190(x)
+ if (x < 1)
+ fun_l28_n697(x)
+ else
+ fun_l28_n310(x)
+ end
+end
+
+def fun_l27_n191(x)
+ if (x < 1)
+ fun_l28_n493(x)
+ else
+ fun_l28_n56(x)
+ end
+end
+
+def fun_l27_n192(x)
+ if (x < 1)
+ fun_l28_n12(x)
+ else
+ fun_l28_n471(x)
+ end
+end
+
+def fun_l27_n193(x)
+ if (x < 1)
+ fun_l28_n306(x)
+ else
+ fun_l28_n10(x)
+ end
+end
+
+def fun_l27_n194(x)
+ if (x < 1)
+ fun_l28_n87(x)
+ else
+ fun_l28_n59(x)
+ end
+end
+
+def fun_l27_n195(x)
+ if (x < 1)
+ fun_l28_n207(x)
+ else
+ fun_l28_n555(x)
+ end
+end
+
+def fun_l27_n196(x)
+ if (x < 1)
+ fun_l28_n563(x)
+ else
+ fun_l28_n256(x)
+ end
+end
+
+def fun_l27_n197(x)
+ if (x < 1)
+ fun_l28_n14(x)
+ else
+ fun_l28_n895(x)
+ end
+end
+
+def fun_l27_n198(x)
+ if (x < 1)
+ fun_l28_n986(x)
+ else
+ fun_l28_n287(x)
+ end
+end
+
+def fun_l27_n199(x)
+ if (x < 1)
+ fun_l28_n810(x)
+ else
+ fun_l28_n66(x)
+ end
+end
+
+def fun_l27_n200(x)
+ if (x < 1)
+ fun_l28_n457(x)
+ else
+ fun_l28_n186(x)
+ end
+end
+
+def fun_l27_n201(x)
+ if (x < 1)
+ fun_l28_n580(x)
+ else
+ fun_l28_n248(x)
+ end
+end
+
+def fun_l27_n202(x)
+ if (x < 1)
+ fun_l28_n9(x)
+ else
+ fun_l28_n66(x)
+ end
+end
+
+def fun_l27_n203(x)
+ if (x < 1)
+ fun_l28_n659(x)
+ else
+ fun_l28_n403(x)
+ end
+end
+
+def fun_l27_n204(x)
+ if (x < 1)
+ fun_l28_n66(x)
+ else
+ fun_l28_n524(x)
+ end
+end
+
+def fun_l27_n205(x)
+ if (x < 1)
+ fun_l28_n754(x)
+ else
+ fun_l28_n46(x)
+ end
+end
+
+def fun_l27_n206(x)
+ if (x < 1)
+ fun_l28_n32(x)
+ else
+ fun_l28_n655(x)
+ end
+end
+
+def fun_l27_n207(x)
+ if (x < 1)
+ fun_l28_n559(x)
+ else
+ fun_l28_n619(x)
+ end
+end
+
+def fun_l27_n208(x)
+ if (x < 1)
+ fun_l28_n251(x)
+ else
+ fun_l28_n410(x)
+ end
+end
+
+def fun_l27_n209(x)
+ if (x < 1)
+ fun_l28_n339(x)
+ else
+ fun_l28_n726(x)
+ end
+end
+
+def fun_l27_n210(x)
+ if (x < 1)
+ fun_l28_n104(x)
+ else
+ fun_l28_n733(x)
+ end
+end
+
+def fun_l27_n211(x)
+ if (x < 1)
+ fun_l28_n500(x)
+ else
+ fun_l28_n654(x)
+ end
+end
+
+def fun_l27_n212(x)
+ if (x < 1)
+ fun_l28_n244(x)
+ else
+ fun_l28_n471(x)
+ end
+end
+
+def fun_l27_n213(x)
+ if (x < 1)
+ fun_l28_n692(x)
+ else
+ fun_l28_n56(x)
+ end
+end
+
+def fun_l27_n214(x)
+ if (x < 1)
+ fun_l28_n54(x)
+ else
+ fun_l28_n753(x)
+ end
+end
+
+def fun_l27_n215(x)
+ if (x < 1)
+ fun_l28_n770(x)
+ else
+ fun_l28_n756(x)
+ end
+end
+
+def fun_l27_n216(x)
+ if (x < 1)
+ fun_l28_n771(x)
+ else
+ fun_l28_n407(x)
+ end
+end
+
+def fun_l27_n217(x)
+ if (x < 1)
+ fun_l28_n728(x)
+ else
+ fun_l28_n361(x)
+ end
+end
+
+def fun_l27_n218(x)
+ if (x < 1)
+ fun_l28_n983(x)
+ else
+ fun_l28_n440(x)
+ end
+end
+
+def fun_l27_n219(x)
+ if (x < 1)
+ fun_l28_n105(x)
+ else
+ fun_l28_n906(x)
+ end
+end
+
+def fun_l27_n220(x)
+ if (x < 1)
+ fun_l28_n694(x)
+ else
+ fun_l28_n792(x)
+ end
+end
+
+def fun_l27_n221(x)
+ if (x < 1)
+ fun_l28_n325(x)
+ else
+ fun_l28_n98(x)
+ end
+end
+
+def fun_l27_n222(x)
+ if (x < 1)
+ fun_l28_n354(x)
+ else
+ fun_l28_n683(x)
+ end
+end
+
+def fun_l27_n223(x)
+ if (x < 1)
+ fun_l28_n236(x)
+ else
+ fun_l28_n999(x)
+ end
+end
+
+def fun_l27_n224(x)
+ if (x < 1)
+ fun_l28_n671(x)
+ else
+ fun_l28_n621(x)
+ end
+end
+
+def fun_l27_n225(x)
+ if (x < 1)
+ fun_l28_n113(x)
+ else
+ fun_l28_n532(x)
+ end
+end
+
+def fun_l27_n226(x)
+ if (x < 1)
+ fun_l28_n43(x)
+ else
+ fun_l28_n449(x)
+ end
+end
+
+def fun_l27_n227(x)
+ if (x < 1)
+ fun_l28_n402(x)
+ else
+ fun_l28_n298(x)
+ end
+end
+
+def fun_l27_n228(x)
+ if (x < 1)
+ fun_l28_n858(x)
+ else
+ fun_l28_n626(x)
+ end
+end
+
+def fun_l27_n229(x)
+ if (x < 1)
+ fun_l28_n596(x)
+ else
+ fun_l28_n21(x)
+ end
+end
+
+def fun_l27_n230(x)
+ if (x < 1)
+ fun_l28_n713(x)
+ else
+ fun_l28_n755(x)
+ end
+end
+
+def fun_l27_n231(x)
+ if (x < 1)
+ fun_l28_n59(x)
+ else
+ fun_l28_n695(x)
+ end
+end
+
+def fun_l27_n232(x)
+ if (x < 1)
+ fun_l28_n715(x)
+ else
+ fun_l28_n614(x)
+ end
+end
+
+def fun_l27_n233(x)
+ if (x < 1)
+ fun_l28_n124(x)
+ else
+ fun_l28_n877(x)
+ end
+end
+
+def fun_l27_n234(x)
+ if (x < 1)
+ fun_l28_n563(x)
+ else
+ fun_l28_n273(x)
+ end
+end
+
+def fun_l27_n235(x)
+ if (x < 1)
+ fun_l28_n331(x)
+ else
+ fun_l28_n866(x)
+ end
+end
+
+def fun_l27_n236(x)
+ if (x < 1)
+ fun_l28_n950(x)
+ else
+ fun_l28_n765(x)
+ end
+end
+
+def fun_l27_n237(x)
+ if (x < 1)
+ fun_l28_n550(x)
+ else
+ fun_l28_n133(x)
+ end
+end
+
+def fun_l27_n238(x)
+ if (x < 1)
+ fun_l28_n0(x)
+ else
+ fun_l28_n749(x)
+ end
+end
+
+def fun_l27_n239(x)
+ if (x < 1)
+ fun_l28_n578(x)
+ else
+ fun_l28_n692(x)
+ end
+end
+
+def fun_l27_n240(x)
+ if (x < 1)
+ fun_l28_n111(x)
+ else
+ fun_l28_n301(x)
+ end
+end
+
+def fun_l27_n241(x)
+ if (x < 1)
+ fun_l28_n191(x)
+ else
+ fun_l28_n272(x)
+ end
+end
+
+def fun_l27_n242(x)
+ if (x < 1)
+ fun_l28_n547(x)
+ else
+ fun_l28_n425(x)
+ end
+end
+
+def fun_l27_n243(x)
+ if (x < 1)
+ fun_l28_n173(x)
+ else
+ fun_l28_n101(x)
+ end
+end
+
+def fun_l27_n244(x)
+ if (x < 1)
+ fun_l28_n511(x)
+ else
+ fun_l28_n758(x)
+ end
+end
+
+def fun_l27_n245(x)
+ if (x < 1)
+ fun_l28_n272(x)
+ else
+ fun_l28_n497(x)
+ end
+end
+
+def fun_l27_n246(x)
+ if (x < 1)
+ fun_l28_n59(x)
+ else
+ fun_l28_n348(x)
+ end
+end
+
+def fun_l27_n247(x)
+ if (x < 1)
+ fun_l28_n583(x)
+ else
+ fun_l28_n730(x)
+ end
+end
+
+def fun_l27_n248(x)
+ if (x < 1)
+ fun_l28_n635(x)
+ else
+ fun_l28_n714(x)
+ end
+end
+
+def fun_l27_n249(x)
+ if (x < 1)
+ fun_l28_n815(x)
+ else
+ fun_l28_n844(x)
+ end
+end
+
+def fun_l27_n250(x)
+ if (x < 1)
+ fun_l28_n694(x)
+ else
+ fun_l28_n869(x)
+ end
+end
+
+def fun_l27_n251(x)
+ if (x < 1)
+ fun_l28_n681(x)
+ else
+ fun_l28_n894(x)
+ end
+end
+
+def fun_l27_n252(x)
+ if (x < 1)
+ fun_l28_n756(x)
+ else
+ fun_l28_n657(x)
+ end
+end
+
+def fun_l27_n253(x)
+ if (x < 1)
+ fun_l28_n392(x)
+ else
+ fun_l28_n706(x)
+ end
+end
+
+def fun_l27_n254(x)
+ if (x < 1)
+ fun_l28_n267(x)
+ else
+ fun_l28_n238(x)
+ end
+end
+
+def fun_l27_n255(x)
+ if (x < 1)
+ fun_l28_n914(x)
+ else
+ fun_l28_n574(x)
+ end
+end
+
+def fun_l27_n256(x)
+ if (x < 1)
+ fun_l28_n872(x)
+ else
+ fun_l28_n269(x)
+ end
+end
+
+def fun_l27_n257(x)
+ if (x < 1)
+ fun_l28_n454(x)
+ else
+ fun_l28_n485(x)
+ end
+end
+
+def fun_l27_n258(x)
+ if (x < 1)
+ fun_l28_n994(x)
+ else
+ fun_l28_n83(x)
+ end
+end
+
+def fun_l27_n259(x)
+ if (x < 1)
+ fun_l28_n41(x)
+ else
+ fun_l28_n495(x)
+ end
+end
+
+def fun_l27_n260(x)
+ if (x < 1)
+ fun_l28_n75(x)
+ else
+ fun_l28_n508(x)
+ end
+end
+
+def fun_l27_n261(x)
+ if (x < 1)
+ fun_l28_n684(x)
+ else
+ fun_l28_n524(x)
+ end
+end
+
+def fun_l27_n262(x)
+ if (x < 1)
+ fun_l28_n78(x)
+ else
+ fun_l28_n563(x)
+ end
+end
+
+def fun_l27_n263(x)
+ if (x < 1)
+ fun_l28_n227(x)
+ else
+ fun_l28_n359(x)
+ end
+end
+
+def fun_l27_n264(x)
+ if (x < 1)
+ fun_l28_n679(x)
+ else
+ fun_l28_n711(x)
+ end
+end
+
+def fun_l27_n265(x)
+ if (x < 1)
+ fun_l28_n0(x)
+ else
+ fun_l28_n720(x)
+ end
+end
+
+def fun_l27_n266(x)
+ if (x < 1)
+ fun_l28_n384(x)
+ else
+ fun_l28_n915(x)
+ end
+end
+
+def fun_l27_n267(x)
+ if (x < 1)
+ fun_l28_n912(x)
+ else
+ fun_l28_n24(x)
+ end
+end
+
+def fun_l27_n268(x)
+ if (x < 1)
+ fun_l28_n337(x)
+ else
+ fun_l28_n880(x)
+ end
+end
+
+def fun_l27_n269(x)
+ if (x < 1)
+ fun_l28_n84(x)
+ else
+ fun_l28_n387(x)
+ end
+end
+
+def fun_l27_n270(x)
+ if (x < 1)
+ fun_l28_n155(x)
+ else
+ fun_l28_n705(x)
+ end
+end
+
+def fun_l27_n271(x)
+ if (x < 1)
+ fun_l28_n159(x)
+ else
+ fun_l28_n815(x)
+ end
+end
+
+def fun_l27_n272(x)
+ if (x < 1)
+ fun_l28_n182(x)
+ else
+ fun_l28_n210(x)
+ end
+end
+
+def fun_l27_n273(x)
+ if (x < 1)
+ fun_l28_n446(x)
+ else
+ fun_l28_n524(x)
+ end
+end
+
+def fun_l27_n274(x)
+ if (x < 1)
+ fun_l28_n828(x)
+ else
+ fun_l28_n14(x)
+ end
+end
+
+def fun_l27_n275(x)
+ if (x < 1)
+ fun_l28_n176(x)
+ else
+ fun_l28_n857(x)
+ end
+end
+
+def fun_l27_n276(x)
+ if (x < 1)
+ fun_l28_n39(x)
+ else
+ fun_l28_n973(x)
+ end
+end
+
+def fun_l27_n277(x)
+ if (x < 1)
+ fun_l28_n310(x)
+ else
+ fun_l28_n900(x)
+ end
+end
+
+def fun_l27_n278(x)
+ if (x < 1)
+ fun_l28_n729(x)
+ else
+ fun_l28_n544(x)
+ end
+end
+
+def fun_l27_n279(x)
+ if (x < 1)
+ fun_l28_n111(x)
+ else
+ fun_l28_n939(x)
+ end
+end
+
+def fun_l27_n280(x)
+ if (x < 1)
+ fun_l28_n102(x)
+ else
+ fun_l28_n658(x)
+ end
+end
+
+def fun_l27_n281(x)
+ if (x < 1)
+ fun_l28_n186(x)
+ else
+ fun_l28_n939(x)
+ end
+end
+
+def fun_l27_n282(x)
+ if (x < 1)
+ fun_l28_n276(x)
+ else
+ fun_l28_n428(x)
+ end
+end
+
+def fun_l27_n283(x)
+ if (x < 1)
+ fun_l28_n137(x)
+ else
+ fun_l28_n876(x)
+ end
+end
+
+def fun_l27_n284(x)
+ if (x < 1)
+ fun_l28_n31(x)
+ else
+ fun_l28_n351(x)
+ end
+end
+
+def fun_l27_n285(x)
+ if (x < 1)
+ fun_l28_n143(x)
+ else
+ fun_l28_n192(x)
+ end
+end
+
+def fun_l27_n286(x)
+ if (x < 1)
+ fun_l28_n63(x)
+ else
+ fun_l28_n764(x)
+ end
+end
+
+def fun_l27_n287(x)
+ if (x < 1)
+ fun_l28_n361(x)
+ else
+ fun_l28_n512(x)
+ end
+end
+
+def fun_l27_n288(x)
+ if (x < 1)
+ fun_l28_n817(x)
+ else
+ fun_l28_n997(x)
+ end
+end
+
+def fun_l27_n289(x)
+ if (x < 1)
+ fun_l28_n837(x)
+ else
+ fun_l28_n834(x)
+ end
+end
+
+def fun_l27_n290(x)
+ if (x < 1)
+ fun_l28_n436(x)
+ else
+ fun_l28_n873(x)
+ end
+end
+
+def fun_l27_n291(x)
+ if (x < 1)
+ fun_l28_n412(x)
+ else
+ fun_l28_n494(x)
+ end
+end
+
+def fun_l27_n292(x)
+ if (x < 1)
+ fun_l28_n794(x)
+ else
+ fun_l28_n972(x)
+ end
+end
+
+def fun_l27_n293(x)
+ if (x < 1)
+ fun_l28_n486(x)
+ else
+ fun_l28_n401(x)
+ end
+end
+
+def fun_l27_n294(x)
+ if (x < 1)
+ fun_l28_n171(x)
+ else
+ fun_l28_n334(x)
+ end
+end
+
+def fun_l27_n295(x)
+ if (x < 1)
+ fun_l28_n681(x)
+ else
+ fun_l28_n753(x)
+ end
+end
+
+def fun_l27_n296(x)
+ if (x < 1)
+ fun_l28_n541(x)
+ else
+ fun_l28_n855(x)
+ end
+end
+
+def fun_l27_n297(x)
+ if (x < 1)
+ fun_l28_n270(x)
+ else
+ fun_l28_n257(x)
+ end
+end
+
+def fun_l27_n298(x)
+ if (x < 1)
+ fun_l28_n923(x)
+ else
+ fun_l28_n997(x)
+ end
+end
+
+def fun_l27_n299(x)
+ if (x < 1)
+ fun_l28_n508(x)
+ else
+ fun_l28_n649(x)
+ end
+end
+
+def fun_l27_n300(x)
+ if (x < 1)
+ fun_l28_n351(x)
+ else
+ fun_l28_n966(x)
+ end
+end
+
+def fun_l27_n301(x)
+ if (x < 1)
+ fun_l28_n622(x)
+ else
+ fun_l28_n436(x)
+ end
+end
+
+def fun_l27_n302(x)
+ if (x < 1)
+ fun_l28_n723(x)
+ else
+ fun_l28_n261(x)
+ end
+end
+
+def fun_l27_n303(x)
+ if (x < 1)
+ fun_l28_n269(x)
+ else
+ fun_l28_n483(x)
+ end
+end
+
+def fun_l27_n304(x)
+ if (x < 1)
+ fun_l28_n449(x)
+ else
+ fun_l28_n5(x)
+ end
+end
+
+def fun_l27_n305(x)
+ if (x < 1)
+ fun_l28_n967(x)
+ else
+ fun_l28_n967(x)
+ end
+end
+
+def fun_l27_n306(x)
+ if (x < 1)
+ fun_l28_n866(x)
+ else
+ fun_l28_n590(x)
+ end
+end
+
+def fun_l27_n307(x)
+ if (x < 1)
+ fun_l28_n145(x)
+ else
+ fun_l28_n75(x)
+ end
+end
+
+def fun_l27_n308(x)
+ if (x < 1)
+ fun_l28_n329(x)
+ else
+ fun_l28_n834(x)
+ end
+end
+
+def fun_l27_n309(x)
+ if (x < 1)
+ fun_l28_n668(x)
+ else
+ fun_l28_n909(x)
+ end
+end
+
+def fun_l27_n310(x)
+ if (x < 1)
+ fun_l28_n70(x)
+ else
+ fun_l28_n311(x)
+ end
+end
+
+def fun_l27_n311(x)
+ if (x < 1)
+ fun_l28_n669(x)
+ else
+ fun_l28_n90(x)
+ end
+end
+
+def fun_l27_n312(x)
+ if (x < 1)
+ fun_l28_n805(x)
+ else
+ fun_l28_n558(x)
+ end
+end
+
+def fun_l27_n313(x)
+ if (x < 1)
+ fun_l28_n493(x)
+ else
+ fun_l28_n642(x)
+ end
+end
+
+def fun_l27_n314(x)
+ if (x < 1)
+ fun_l28_n285(x)
+ else
+ fun_l28_n968(x)
+ end
+end
+
+def fun_l27_n315(x)
+ if (x < 1)
+ fun_l28_n806(x)
+ else
+ fun_l28_n731(x)
+ end
+end
+
+def fun_l27_n316(x)
+ if (x < 1)
+ fun_l28_n284(x)
+ else
+ fun_l28_n441(x)
+ end
+end
+
+def fun_l27_n317(x)
+ if (x < 1)
+ fun_l28_n644(x)
+ else
+ fun_l28_n16(x)
+ end
+end
+
+def fun_l27_n318(x)
+ if (x < 1)
+ fun_l28_n411(x)
+ else
+ fun_l28_n739(x)
+ end
+end
+
+def fun_l27_n319(x)
+ if (x < 1)
+ fun_l28_n462(x)
+ else
+ fun_l28_n680(x)
+ end
+end
+
+def fun_l27_n320(x)
+ if (x < 1)
+ fun_l28_n126(x)
+ else
+ fun_l28_n558(x)
+ end
+end
+
+def fun_l27_n321(x)
+ if (x < 1)
+ fun_l28_n869(x)
+ else
+ fun_l28_n581(x)
+ end
+end
+
+def fun_l27_n322(x)
+ if (x < 1)
+ fun_l28_n25(x)
+ else
+ fun_l28_n352(x)
+ end
+end
+
+def fun_l27_n323(x)
+ if (x < 1)
+ fun_l28_n203(x)
+ else
+ fun_l28_n776(x)
+ end
+end
+
+def fun_l27_n324(x)
+ if (x < 1)
+ fun_l28_n6(x)
+ else
+ fun_l28_n833(x)
+ end
+end
+
+def fun_l27_n325(x)
+ if (x < 1)
+ fun_l28_n817(x)
+ else
+ fun_l28_n258(x)
+ end
+end
+
+def fun_l27_n326(x)
+ if (x < 1)
+ fun_l28_n607(x)
+ else
+ fun_l28_n813(x)
+ end
+end
+
+def fun_l27_n327(x)
+ if (x < 1)
+ fun_l28_n761(x)
+ else
+ fun_l28_n893(x)
+ end
+end
+
+def fun_l27_n328(x)
+ if (x < 1)
+ fun_l28_n861(x)
+ else
+ fun_l28_n879(x)
+ end
+end
+
+def fun_l27_n329(x)
+ if (x < 1)
+ fun_l28_n682(x)
+ else
+ fun_l28_n680(x)
+ end
+end
+
+def fun_l27_n330(x)
+ if (x < 1)
+ fun_l28_n61(x)
+ else
+ fun_l28_n481(x)
+ end
+end
+
+def fun_l27_n331(x)
+ if (x < 1)
+ fun_l28_n738(x)
+ else
+ fun_l28_n230(x)
+ end
+end
+
+def fun_l27_n332(x)
+ if (x < 1)
+ fun_l28_n45(x)
+ else
+ fun_l28_n279(x)
+ end
+end
+
+def fun_l27_n333(x)
+ if (x < 1)
+ fun_l28_n24(x)
+ else
+ fun_l28_n561(x)
+ end
+end
+
+def fun_l27_n334(x)
+ if (x < 1)
+ fun_l28_n459(x)
+ else
+ fun_l28_n594(x)
+ end
+end
+
+def fun_l27_n335(x)
+ if (x < 1)
+ fun_l28_n695(x)
+ else
+ fun_l28_n513(x)
+ end
+end
+
+def fun_l27_n336(x)
+ if (x < 1)
+ fun_l28_n729(x)
+ else
+ fun_l28_n89(x)
+ end
+end
+
+def fun_l27_n337(x)
+ if (x < 1)
+ fun_l28_n509(x)
+ else
+ fun_l28_n574(x)
+ end
+end
+
+def fun_l27_n338(x)
+ if (x < 1)
+ fun_l28_n80(x)
+ else
+ fun_l28_n448(x)
+ end
+end
+
+def fun_l27_n339(x)
+ if (x < 1)
+ fun_l28_n279(x)
+ else
+ fun_l28_n177(x)
+ end
+end
+
+def fun_l27_n340(x)
+ if (x < 1)
+ fun_l28_n508(x)
+ else
+ fun_l28_n706(x)
+ end
+end
+
+def fun_l27_n341(x)
+ if (x < 1)
+ fun_l28_n790(x)
+ else
+ fun_l28_n774(x)
+ end
+end
+
+def fun_l27_n342(x)
+ if (x < 1)
+ fun_l28_n606(x)
+ else
+ fun_l28_n642(x)
+ end
+end
+
+def fun_l27_n343(x)
+ if (x < 1)
+ fun_l28_n108(x)
+ else
+ fun_l28_n539(x)
+ end
+end
+
+def fun_l27_n344(x)
+ if (x < 1)
+ fun_l28_n418(x)
+ else
+ fun_l28_n687(x)
+ end
+end
+
+def fun_l27_n345(x)
+ if (x < 1)
+ fun_l28_n386(x)
+ else
+ fun_l28_n170(x)
+ end
+end
+
+def fun_l27_n346(x)
+ if (x < 1)
+ fun_l28_n648(x)
+ else
+ fun_l28_n340(x)
+ end
+end
+
+def fun_l27_n347(x)
+ if (x < 1)
+ fun_l28_n516(x)
+ else
+ fun_l28_n586(x)
+ end
+end
+
+def fun_l27_n348(x)
+ if (x < 1)
+ fun_l28_n646(x)
+ else
+ fun_l28_n448(x)
+ end
+end
+
+def fun_l27_n349(x)
+ if (x < 1)
+ fun_l28_n378(x)
+ else
+ fun_l28_n413(x)
+ end
+end
+
+def fun_l27_n350(x)
+ if (x < 1)
+ fun_l28_n885(x)
+ else
+ fun_l28_n932(x)
+ end
+end
+
+def fun_l27_n351(x)
+ if (x < 1)
+ fun_l28_n9(x)
+ else
+ fun_l28_n843(x)
+ end
+end
+
+def fun_l27_n352(x)
+ if (x < 1)
+ fun_l28_n502(x)
+ else
+ fun_l28_n229(x)
+ end
+end
+
+def fun_l27_n353(x)
+ if (x < 1)
+ fun_l28_n752(x)
+ else
+ fun_l28_n677(x)
+ end
+end
+
+def fun_l27_n354(x)
+ if (x < 1)
+ fun_l28_n246(x)
+ else
+ fun_l28_n32(x)
+ end
+end
+
+def fun_l27_n355(x)
+ if (x < 1)
+ fun_l28_n969(x)
+ else
+ fun_l28_n933(x)
+ end
+end
+
+def fun_l27_n356(x)
+ if (x < 1)
+ fun_l28_n44(x)
+ else
+ fun_l28_n704(x)
+ end
+end
+
+def fun_l27_n357(x)
+ if (x < 1)
+ fun_l28_n863(x)
+ else
+ fun_l28_n324(x)
+ end
+end
+
+def fun_l27_n358(x)
+ if (x < 1)
+ fun_l28_n467(x)
+ else
+ fun_l28_n418(x)
+ end
+end
+
+def fun_l27_n359(x)
+ if (x < 1)
+ fun_l28_n222(x)
+ else
+ fun_l28_n138(x)
+ end
+end
+
+def fun_l27_n360(x)
+ if (x < 1)
+ fun_l28_n261(x)
+ else
+ fun_l28_n605(x)
+ end
+end
+
+def fun_l27_n361(x)
+ if (x < 1)
+ fun_l28_n470(x)
+ else
+ fun_l28_n519(x)
+ end
+end
+
+def fun_l27_n362(x)
+ if (x < 1)
+ fun_l28_n717(x)
+ else
+ fun_l28_n817(x)
+ end
+end
+
+def fun_l27_n363(x)
+ if (x < 1)
+ fun_l28_n591(x)
+ else
+ fun_l28_n537(x)
+ end
+end
+
+def fun_l27_n364(x)
+ if (x < 1)
+ fun_l28_n733(x)
+ else
+ fun_l28_n222(x)
+ end
+end
+
+def fun_l27_n365(x)
+ if (x < 1)
+ fun_l28_n137(x)
+ else
+ fun_l28_n225(x)
+ end
+end
+
+def fun_l27_n366(x)
+ if (x < 1)
+ fun_l28_n610(x)
+ else
+ fun_l28_n870(x)
+ end
+end
+
+def fun_l27_n367(x)
+ if (x < 1)
+ fun_l28_n697(x)
+ else
+ fun_l28_n866(x)
+ end
+end
+
+def fun_l27_n368(x)
+ if (x < 1)
+ fun_l28_n902(x)
+ else
+ fun_l28_n827(x)
+ end
+end
+
+def fun_l27_n369(x)
+ if (x < 1)
+ fun_l28_n769(x)
+ else
+ fun_l28_n238(x)
+ end
+end
+
+def fun_l27_n370(x)
+ if (x < 1)
+ fun_l28_n66(x)
+ else
+ fun_l28_n958(x)
+ end
+end
+
+def fun_l27_n371(x)
+ if (x < 1)
+ fun_l28_n847(x)
+ else
+ fun_l28_n177(x)
+ end
+end
+
+def fun_l27_n372(x)
+ if (x < 1)
+ fun_l28_n64(x)
+ else
+ fun_l28_n198(x)
+ end
+end
+
+def fun_l27_n373(x)
+ if (x < 1)
+ fun_l28_n36(x)
+ else
+ fun_l28_n282(x)
+ end
+end
+
+def fun_l27_n374(x)
+ if (x < 1)
+ fun_l28_n647(x)
+ else
+ fun_l28_n228(x)
+ end
+end
+
+def fun_l27_n375(x)
+ if (x < 1)
+ fun_l28_n737(x)
+ else
+ fun_l28_n689(x)
+ end
+end
+
+def fun_l27_n376(x)
+ if (x < 1)
+ fun_l28_n336(x)
+ else
+ fun_l28_n20(x)
+ end
+end
+
+def fun_l27_n377(x)
+ if (x < 1)
+ fun_l28_n859(x)
+ else
+ fun_l28_n661(x)
+ end
+end
+
+def fun_l27_n378(x)
+ if (x < 1)
+ fun_l28_n148(x)
+ else
+ fun_l28_n197(x)
+ end
+end
+
+def fun_l27_n379(x)
+ if (x < 1)
+ fun_l28_n986(x)
+ else
+ fun_l28_n441(x)
+ end
+end
+
+def fun_l27_n380(x)
+ if (x < 1)
+ fun_l28_n966(x)
+ else
+ fun_l28_n994(x)
+ end
+end
+
+def fun_l27_n381(x)
+ if (x < 1)
+ fun_l28_n546(x)
+ else
+ fun_l28_n687(x)
+ end
+end
+
+def fun_l27_n382(x)
+ if (x < 1)
+ fun_l28_n63(x)
+ else
+ fun_l28_n366(x)
+ end
+end
+
+def fun_l27_n383(x)
+ if (x < 1)
+ fun_l28_n146(x)
+ else
+ fun_l28_n96(x)
+ end
+end
+
+def fun_l27_n384(x)
+ if (x < 1)
+ fun_l28_n747(x)
+ else
+ fun_l28_n168(x)
+ end
+end
+
+def fun_l27_n385(x)
+ if (x < 1)
+ fun_l28_n556(x)
+ else
+ fun_l28_n194(x)
+ end
+end
+
+def fun_l27_n386(x)
+ if (x < 1)
+ fun_l28_n180(x)
+ else
+ fun_l28_n648(x)
+ end
+end
+
+def fun_l27_n387(x)
+ if (x < 1)
+ fun_l28_n898(x)
+ else
+ fun_l28_n499(x)
+ end
+end
+
+def fun_l27_n388(x)
+ if (x < 1)
+ fun_l28_n720(x)
+ else
+ fun_l28_n996(x)
+ end
+end
+
+def fun_l27_n389(x)
+ if (x < 1)
+ fun_l28_n743(x)
+ else
+ fun_l28_n781(x)
+ end
+end
+
+def fun_l27_n390(x)
+ if (x < 1)
+ fun_l28_n372(x)
+ else
+ fun_l28_n907(x)
+ end
+end
+
+def fun_l27_n391(x)
+ if (x < 1)
+ fun_l28_n893(x)
+ else
+ fun_l28_n911(x)
+ end
+end
+
+def fun_l27_n392(x)
+ if (x < 1)
+ fun_l28_n304(x)
+ else
+ fun_l28_n164(x)
+ end
+end
+
+def fun_l27_n393(x)
+ if (x < 1)
+ fun_l28_n212(x)
+ else
+ fun_l28_n575(x)
+ end
+end
+
+def fun_l27_n394(x)
+ if (x < 1)
+ fun_l28_n279(x)
+ else
+ fun_l28_n306(x)
+ end
+end
+
+def fun_l27_n395(x)
+ if (x < 1)
+ fun_l28_n662(x)
+ else
+ fun_l28_n838(x)
+ end
+end
+
+def fun_l27_n396(x)
+ if (x < 1)
+ fun_l28_n882(x)
+ else
+ fun_l28_n321(x)
+ end
+end
+
+def fun_l27_n397(x)
+ if (x < 1)
+ fun_l28_n996(x)
+ else
+ fun_l28_n170(x)
+ end
+end
+
+def fun_l27_n398(x)
+ if (x < 1)
+ fun_l28_n309(x)
+ else
+ fun_l28_n805(x)
+ end
+end
+
+def fun_l27_n399(x)
+ if (x < 1)
+ fun_l28_n584(x)
+ else
+ fun_l28_n304(x)
+ end
+end
+
+def fun_l27_n400(x)
+ if (x < 1)
+ fun_l28_n575(x)
+ else
+ fun_l28_n405(x)
+ end
+end
+
+def fun_l27_n401(x)
+ if (x < 1)
+ fun_l28_n507(x)
+ else
+ fun_l28_n773(x)
+ end
+end
+
+def fun_l27_n402(x)
+ if (x < 1)
+ fun_l28_n759(x)
+ else
+ fun_l28_n583(x)
+ end
+end
+
+def fun_l27_n403(x)
+ if (x < 1)
+ fun_l28_n689(x)
+ else
+ fun_l28_n511(x)
+ end
+end
+
+def fun_l27_n404(x)
+ if (x < 1)
+ fun_l28_n706(x)
+ else
+ fun_l28_n258(x)
+ end
+end
+
+def fun_l27_n405(x)
+ if (x < 1)
+ fun_l28_n736(x)
+ else
+ fun_l28_n482(x)
+ end
+end
+
+def fun_l27_n406(x)
+ if (x < 1)
+ fun_l28_n851(x)
+ else
+ fun_l28_n898(x)
+ end
+end
+
+def fun_l27_n407(x)
+ if (x < 1)
+ fun_l28_n86(x)
+ else
+ fun_l28_n913(x)
+ end
+end
+
+def fun_l27_n408(x)
+ if (x < 1)
+ fun_l28_n277(x)
+ else
+ fun_l28_n960(x)
+ end
+end
+
+def fun_l27_n409(x)
+ if (x < 1)
+ fun_l28_n137(x)
+ else
+ fun_l28_n789(x)
+ end
+end
+
+def fun_l27_n410(x)
+ if (x < 1)
+ fun_l28_n23(x)
+ else
+ fun_l28_n633(x)
+ end
+end
+
+def fun_l27_n411(x)
+ if (x < 1)
+ fun_l28_n246(x)
+ else
+ fun_l28_n560(x)
+ end
+end
+
+def fun_l27_n412(x)
+ if (x < 1)
+ fun_l28_n218(x)
+ else
+ fun_l28_n66(x)
+ end
+end
+
+def fun_l27_n413(x)
+ if (x < 1)
+ fun_l28_n680(x)
+ else
+ fun_l28_n9(x)
+ end
+end
+
+def fun_l27_n414(x)
+ if (x < 1)
+ fun_l28_n693(x)
+ else
+ fun_l28_n625(x)
+ end
+end
+
+def fun_l27_n415(x)
+ if (x < 1)
+ fun_l28_n560(x)
+ else
+ fun_l28_n739(x)
+ end
+end
+
+def fun_l27_n416(x)
+ if (x < 1)
+ fun_l28_n467(x)
+ else
+ fun_l28_n542(x)
+ end
+end
+
+def fun_l27_n417(x)
+ if (x < 1)
+ fun_l28_n364(x)
+ else
+ fun_l28_n468(x)
+ end
+end
+
+def fun_l27_n418(x)
+ if (x < 1)
+ fun_l28_n123(x)
+ else
+ fun_l28_n775(x)
+ end
+end
+
+def fun_l27_n419(x)
+ if (x < 1)
+ fun_l28_n17(x)
+ else
+ fun_l28_n875(x)
+ end
+end
+
+def fun_l27_n420(x)
+ if (x < 1)
+ fun_l28_n596(x)
+ else
+ fun_l28_n163(x)
+ end
+end
+
+def fun_l27_n421(x)
+ if (x < 1)
+ fun_l28_n638(x)
+ else
+ fun_l28_n426(x)
+ end
+end
+
+def fun_l27_n422(x)
+ if (x < 1)
+ fun_l28_n637(x)
+ else
+ fun_l28_n696(x)
+ end
+end
+
+def fun_l27_n423(x)
+ if (x < 1)
+ fun_l28_n299(x)
+ else
+ fun_l28_n218(x)
+ end
+end
+
+def fun_l27_n424(x)
+ if (x < 1)
+ fun_l28_n683(x)
+ else
+ fun_l28_n248(x)
+ end
+end
+
+def fun_l27_n425(x)
+ if (x < 1)
+ fun_l28_n272(x)
+ else
+ fun_l28_n359(x)
+ end
+end
+
+def fun_l27_n426(x)
+ if (x < 1)
+ fun_l28_n327(x)
+ else
+ fun_l28_n984(x)
+ end
+end
+
+def fun_l27_n427(x)
+ if (x < 1)
+ fun_l28_n912(x)
+ else
+ fun_l28_n393(x)
+ end
+end
+
+def fun_l27_n428(x)
+ if (x < 1)
+ fun_l28_n842(x)
+ else
+ fun_l28_n919(x)
+ end
+end
+
+def fun_l27_n429(x)
+ if (x < 1)
+ fun_l28_n721(x)
+ else
+ fun_l28_n36(x)
+ end
+end
+
+def fun_l27_n430(x)
+ if (x < 1)
+ fun_l28_n16(x)
+ else
+ fun_l28_n418(x)
+ end
+end
+
+def fun_l27_n431(x)
+ if (x < 1)
+ fun_l28_n747(x)
+ else
+ fun_l28_n132(x)
+ end
+end
+
+def fun_l27_n432(x)
+ if (x < 1)
+ fun_l28_n906(x)
+ else
+ fun_l28_n718(x)
+ end
+end
+
+def fun_l27_n433(x)
+ if (x < 1)
+ fun_l28_n508(x)
+ else
+ fun_l28_n862(x)
+ end
+end
+
+def fun_l27_n434(x)
+ if (x < 1)
+ fun_l28_n478(x)
+ else
+ fun_l28_n542(x)
+ end
+end
+
+def fun_l27_n435(x)
+ if (x < 1)
+ fun_l28_n186(x)
+ else
+ fun_l28_n976(x)
+ end
+end
+
+def fun_l27_n436(x)
+ if (x < 1)
+ fun_l28_n637(x)
+ else
+ fun_l28_n49(x)
+ end
+end
+
+def fun_l27_n437(x)
+ if (x < 1)
+ fun_l28_n242(x)
+ else
+ fun_l28_n774(x)
+ end
+end
+
+def fun_l27_n438(x)
+ if (x < 1)
+ fun_l28_n303(x)
+ else
+ fun_l28_n175(x)
+ end
+end
+
+def fun_l27_n439(x)
+ if (x < 1)
+ fun_l28_n851(x)
+ else
+ fun_l28_n908(x)
+ end
+end
+
+def fun_l27_n440(x)
+ if (x < 1)
+ fun_l28_n139(x)
+ else
+ fun_l28_n473(x)
+ end
+end
+
+def fun_l27_n441(x)
+ if (x < 1)
+ fun_l28_n70(x)
+ else
+ fun_l28_n406(x)
+ end
+end
+
+def fun_l27_n442(x)
+ if (x < 1)
+ fun_l28_n368(x)
+ else
+ fun_l28_n624(x)
+ end
+end
+
+def fun_l27_n443(x)
+ if (x < 1)
+ fun_l28_n900(x)
+ else
+ fun_l28_n173(x)
+ end
+end
+
+def fun_l27_n444(x)
+ if (x < 1)
+ fun_l28_n646(x)
+ else
+ fun_l28_n733(x)
+ end
+end
+
+def fun_l27_n445(x)
+ if (x < 1)
+ fun_l28_n859(x)
+ else
+ fun_l28_n100(x)
+ end
+end
+
+def fun_l27_n446(x)
+ if (x < 1)
+ fun_l28_n418(x)
+ else
+ fun_l28_n765(x)
+ end
+end
+
+def fun_l27_n447(x)
+ if (x < 1)
+ fun_l28_n204(x)
+ else
+ fun_l28_n541(x)
+ end
+end
+
+def fun_l27_n448(x)
+ if (x < 1)
+ fun_l28_n192(x)
+ else
+ fun_l28_n414(x)
+ end
+end
+
+def fun_l27_n449(x)
+ if (x < 1)
+ fun_l28_n904(x)
+ else
+ fun_l28_n247(x)
+ end
+end
+
+def fun_l27_n450(x)
+ if (x < 1)
+ fun_l28_n528(x)
+ else
+ fun_l28_n24(x)
+ end
+end
+
+def fun_l27_n451(x)
+ if (x < 1)
+ fun_l28_n312(x)
+ else
+ fun_l28_n48(x)
+ end
+end
+
+def fun_l27_n452(x)
+ if (x < 1)
+ fun_l28_n169(x)
+ else
+ fun_l28_n37(x)
+ end
+end
+
+def fun_l27_n453(x)
+ if (x < 1)
+ fun_l28_n713(x)
+ else
+ fun_l28_n168(x)
+ end
+end
+
+def fun_l27_n454(x)
+ if (x < 1)
+ fun_l28_n748(x)
+ else
+ fun_l28_n213(x)
+ end
+end
+
+def fun_l27_n455(x)
+ if (x < 1)
+ fun_l28_n157(x)
+ else
+ fun_l28_n444(x)
+ end
+end
+
+def fun_l27_n456(x)
+ if (x < 1)
+ fun_l28_n32(x)
+ else
+ fun_l28_n475(x)
+ end
+end
+
+def fun_l27_n457(x)
+ if (x < 1)
+ fun_l28_n252(x)
+ else
+ fun_l28_n730(x)
+ end
+end
+
+def fun_l27_n458(x)
+ if (x < 1)
+ fun_l28_n261(x)
+ else
+ fun_l28_n576(x)
+ end
+end
+
+def fun_l27_n459(x)
+ if (x < 1)
+ fun_l28_n859(x)
+ else
+ fun_l28_n401(x)
+ end
+end
+
+def fun_l27_n460(x)
+ if (x < 1)
+ fun_l28_n394(x)
+ else
+ fun_l28_n10(x)
+ end
+end
+
+def fun_l27_n461(x)
+ if (x < 1)
+ fun_l28_n89(x)
+ else
+ fun_l28_n402(x)
+ end
+end
+
+def fun_l27_n462(x)
+ if (x < 1)
+ fun_l28_n100(x)
+ else
+ fun_l28_n207(x)
+ end
+end
+
+def fun_l27_n463(x)
+ if (x < 1)
+ fun_l28_n907(x)
+ else
+ fun_l28_n354(x)
+ end
+end
+
+def fun_l27_n464(x)
+ if (x < 1)
+ fun_l28_n612(x)
+ else
+ fun_l28_n31(x)
+ end
+end
+
+def fun_l27_n465(x)
+ if (x < 1)
+ fun_l28_n622(x)
+ else
+ fun_l28_n342(x)
+ end
+end
+
+def fun_l27_n466(x)
+ if (x < 1)
+ fun_l28_n373(x)
+ else
+ fun_l28_n831(x)
+ end
+end
+
+def fun_l27_n467(x)
+ if (x < 1)
+ fun_l28_n858(x)
+ else
+ fun_l28_n233(x)
+ end
+end
+
+def fun_l27_n468(x)
+ if (x < 1)
+ fun_l28_n104(x)
+ else
+ fun_l28_n918(x)
+ end
+end
+
+def fun_l27_n469(x)
+ if (x < 1)
+ fun_l28_n778(x)
+ else
+ fun_l28_n758(x)
+ end
+end
+
+def fun_l27_n470(x)
+ if (x < 1)
+ fun_l28_n695(x)
+ else
+ fun_l28_n217(x)
+ end
+end
+
+def fun_l27_n471(x)
+ if (x < 1)
+ fun_l28_n781(x)
+ else
+ fun_l28_n584(x)
+ end
+end
+
+def fun_l27_n472(x)
+ if (x < 1)
+ fun_l28_n883(x)
+ else
+ fun_l28_n152(x)
+ end
+end
+
+def fun_l27_n473(x)
+ if (x < 1)
+ fun_l28_n525(x)
+ else
+ fun_l28_n369(x)
+ end
+end
+
+def fun_l27_n474(x)
+ if (x < 1)
+ fun_l28_n42(x)
+ else
+ fun_l28_n299(x)
+ end
+end
+
+def fun_l27_n475(x)
+ if (x < 1)
+ fun_l28_n174(x)
+ else
+ fun_l28_n664(x)
+ end
+end
+
+def fun_l27_n476(x)
+ if (x < 1)
+ fun_l28_n489(x)
+ else
+ fun_l28_n296(x)
+ end
+end
+
+def fun_l27_n477(x)
+ if (x < 1)
+ fun_l28_n725(x)
+ else
+ fun_l28_n384(x)
+ end
+end
+
+def fun_l27_n478(x)
+ if (x < 1)
+ fun_l28_n138(x)
+ else
+ fun_l28_n812(x)
+ end
+end
+
+def fun_l27_n479(x)
+ if (x < 1)
+ fun_l28_n161(x)
+ else
+ fun_l28_n786(x)
+ end
+end
+
+def fun_l27_n480(x)
+ if (x < 1)
+ fun_l28_n751(x)
+ else
+ fun_l28_n91(x)
+ end
+end
+
+def fun_l27_n481(x)
+ if (x < 1)
+ fun_l28_n434(x)
+ else
+ fun_l28_n507(x)
+ end
+end
+
+def fun_l27_n482(x)
+ if (x < 1)
+ fun_l28_n101(x)
+ else
+ fun_l28_n809(x)
+ end
+end
+
+def fun_l27_n483(x)
+ if (x < 1)
+ fun_l28_n79(x)
+ else
+ fun_l28_n565(x)
+ end
+end
+
+def fun_l27_n484(x)
+ if (x < 1)
+ fun_l28_n681(x)
+ else
+ fun_l28_n390(x)
+ end
+end
+
+def fun_l27_n485(x)
+ if (x < 1)
+ fun_l28_n950(x)
+ else
+ fun_l28_n262(x)
+ end
+end
+
+def fun_l27_n486(x)
+ if (x < 1)
+ fun_l28_n188(x)
+ else
+ fun_l28_n731(x)
+ end
+end
+
+def fun_l27_n487(x)
+ if (x < 1)
+ fun_l28_n724(x)
+ else
+ fun_l28_n806(x)
+ end
+end
+
+def fun_l27_n488(x)
+ if (x < 1)
+ fun_l28_n680(x)
+ else
+ fun_l28_n475(x)
+ end
+end
+
+def fun_l27_n489(x)
+ if (x < 1)
+ fun_l28_n662(x)
+ else
+ fun_l28_n242(x)
+ end
+end
+
+def fun_l27_n490(x)
+ if (x < 1)
+ fun_l28_n578(x)
+ else
+ fun_l28_n534(x)
+ end
+end
+
+def fun_l27_n491(x)
+ if (x < 1)
+ fun_l28_n173(x)
+ else
+ fun_l28_n239(x)
+ end
+end
+
+def fun_l27_n492(x)
+ if (x < 1)
+ fun_l28_n724(x)
+ else
+ fun_l28_n579(x)
+ end
+end
+
+def fun_l27_n493(x)
+ if (x < 1)
+ fun_l28_n449(x)
+ else
+ fun_l28_n44(x)
+ end
+end
+
+def fun_l27_n494(x)
+ if (x < 1)
+ fun_l28_n180(x)
+ else
+ fun_l28_n836(x)
+ end
+end
+
+def fun_l27_n495(x)
+ if (x < 1)
+ fun_l28_n232(x)
+ else
+ fun_l28_n371(x)
+ end
+end
+
+def fun_l27_n496(x)
+ if (x < 1)
+ fun_l28_n558(x)
+ else
+ fun_l28_n904(x)
+ end
+end
+
+def fun_l27_n497(x)
+ if (x < 1)
+ fun_l28_n324(x)
+ else
+ fun_l28_n85(x)
+ end
+end
+
+def fun_l27_n498(x)
+ if (x < 1)
+ fun_l28_n272(x)
+ else
+ fun_l28_n469(x)
+ end
+end
+
+def fun_l27_n499(x)
+ if (x < 1)
+ fun_l28_n232(x)
+ else
+ fun_l28_n899(x)
+ end
+end
+
+def fun_l27_n500(x)
+ if (x < 1)
+ fun_l28_n654(x)
+ else
+ fun_l28_n390(x)
+ end
+end
+
+def fun_l27_n501(x)
+ if (x < 1)
+ fun_l28_n84(x)
+ else
+ fun_l28_n74(x)
+ end
+end
+
+def fun_l27_n502(x)
+ if (x < 1)
+ fun_l28_n799(x)
+ else
+ fun_l28_n224(x)
+ end
+end
+
+def fun_l27_n503(x)
+ if (x < 1)
+ fun_l28_n635(x)
+ else
+ fun_l28_n770(x)
+ end
+end
+
+def fun_l27_n504(x)
+ if (x < 1)
+ fun_l28_n734(x)
+ else
+ fun_l28_n451(x)
+ end
+end
+
+def fun_l27_n505(x)
+ if (x < 1)
+ fun_l28_n340(x)
+ else
+ fun_l28_n318(x)
+ end
+end
+
+def fun_l27_n506(x)
+ if (x < 1)
+ fun_l28_n521(x)
+ else
+ fun_l28_n590(x)
+ end
+end
+
+def fun_l27_n507(x)
+ if (x < 1)
+ fun_l28_n727(x)
+ else
+ fun_l28_n825(x)
+ end
+end
+
+def fun_l27_n508(x)
+ if (x < 1)
+ fun_l28_n923(x)
+ else
+ fun_l28_n413(x)
+ end
+end
+
+def fun_l27_n509(x)
+ if (x < 1)
+ fun_l28_n825(x)
+ else
+ fun_l28_n235(x)
+ end
+end
+
+def fun_l27_n510(x)
+ if (x < 1)
+ fun_l28_n212(x)
+ else
+ fun_l28_n509(x)
+ end
+end
+
+def fun_l27_n511(x)
+ if (x < 1)
+ fun_l28_n6(x)
+ else
+ fun_l28_n16(x)
+ end
+end
+
+def fun_l27_n512(x)
+ if (x < 1)
+ fun_l28_n409(x)
+ else
+ fun_l28_n473(x)
+ end
+end
+
+def fun_l27_n513(x)
+ if (x < 1)
+ fun_l28_n220(x)
+ else
+ fun_l28_n383(x)
+ end
+end
+
+def fun_l27_n514(x)
+ if (x < 1)
+ fun_l28_n338(x)
+ else
+ fun_l28_n32(x)
+ end
+end
+
+def fun_l27_n515(x)
+ if (x < 1)
+ fun_l28_n218(x)
+ else
+ fun_l28_n307(x)
+ end
+end
+
+def fun_l27_n516(x)
+ if (x < 1)
+ fun_l28_n591(x)
+ else
+ fun_l28_n545(x)
+ end
+end
+
+def fun_l27_n517(x)
+ if (x < 1)
+ fun_l28_n405(x)
+ else
+ fun_l28_n241(x)
+ end
+end
+
+def fun_l27_n518(x)
+ if (x < 1)
+ fun_l28_n545(x)
+ else
+ fun_l28_n215(x)
+ end
+end
+
+def fun_l27_n519(x)
+ if (x < 1)
+ fun_l28_n989(x)
+ else
+ fun_l28_n480(x)
+ end
+end
+
+def fun_l27_n520(x)
+ if (x < 1)
+ fun_l28_n479(x)
+ else
+ fun_l28_n869(x)
+ end
+end
+
+def fun_l27_n521(x)
+ if (x < 1)
+ fun_l28_n376(x)
+ else
+ fun_l28_n216(x)
+ end
+end
+
+def fun_l27_n522(x)
+ if (x < 1)
+ fun_l28_n74(x)
+ else
+ fun_l28_n370(x)
+ end
+end
+
+def fun_l27_n523(x)
+ if (x < 1)
+ fun_l28_n665(x)
+ else
+ fun_l28_n982(x)
+ end
+end
+
+def fun_l27_n524(x)
+ if (x < 1)
+ fun_l28_n412(x)
+ else
+ fun_l28_n515(x)
+ end
+end
+
+def fun_l27_n525(x)
+ if (x < 1)
+ fun_l28_n421(x)
+ else
+ fun_l28_n718(x)
+ end
+end
+
+def fun_l27_n526(x)
+ if (x < 1)
+ fun_l28_n914(x)
+ else
+ fun_l28_n297(x)
+ end
+end
+
+def fun_l27_n527(x)
+ if (x < 1)
+ fun_l28_n134(x)
+ else
+ fun_l28_n602(x)
+ end
+end
+
+def fun_l27_n528(x)
+ if (x < 1)
+ fun_l28_n0(x)
+ else
+ fun_l28_n23(x)
+ end
+end
+
+def fun_l27_n529(x)
+ if (x < 1)
+ fun_l28_n610(x)
+ else
+ fun_l28_n736(x)
+ end
+end
+
+def fun_l27_n530(x)
+ if (x < 1)
+ fun_l28_n350(x)
+ else
+ fun_l28_n51(x)
+ end
+end
+
+def fun_l27_n531(x)
+ if (x < 1)
+ fun_l28_n648(x)
+ else
+ fun_l28_n382(x)
+ end
+end
+
+def fun_l27_n532(x)
+ if (x < 1)
+ fun_l28_n432(x)
+ else
+ fun_l28_n872(x)
+ end
+end
+
+def fun_l27_n533(x)
+ if (x < 1)
+ fun_l28_n747(x)
+ else
+ fun_l28_n588(x)
+ end
+end
+
+def fun_l27_n534(x)
+ if (x < 1)
+ fun_l28_n763(x)
+ else
+ fun_l28_n846(x)
+ end
+end
+
+def fun_l27_n535(x)
+ if (x < 1)
+ fun_l28_n300(x)
+ else
+ fun_l28_n26(x)
+ end
+end
+
+def fun_l27_n536(x)
+ if (x < 1)
+ fun_l28_n851(x)
+ else
+ fun_l28_n907(x)
+ end
+end
+
+def fun_l27_n537(x)
+ if (x < 1)
+ fun_l28_n759(x)
+ else
+ fun_l28_n927(x)
+ end
+end
+
+def fun_l27_n538(x)
+ if (x < 1)
+ fun_l28_n188(x)
+ else
+ fun_l28_n199(x)
+ end
+end
+
+def fun_l27_n539(x)
+ if (x < 1)
+ fun_l28_n496(x)
+ else
+ fun_l28_n664(x)
+ end
+end
+
+def fun_l27_n540(x)
+ if (x < 1)
+ fun_l28_n595(x)
+ else
+ fun_l28_n651(x)
+ end
+end
+
+def fun_l27_n541(x)
+ if (x < 1)
+ fun_l28_n678(x)
+ else
+ fun_l28_n172(x)
+ end
+end
+
+def fun_l27_n542(x)
+ if (x < 1)
+ fun_l28_n37(x)
+ else
+ fun_l28_n255(x)
+ end
+end
+
+def fun_l27_n543(x)
+ if (x < 1)
+ fun_l28_n58(x)
+ else
+ fun_l28_n367(x)
+ end
+end
+
+def fun_l27_n544(x)
+ if (x < 1)
+ fun_l28_n275(x)
+ else
+ fun_l28_n925(x)
+ end
+end
+
+def fun_l27_n545(x)
+ if (x < 1)
+ fun_l28_n469(x)
+ else
+ fun_l28_n774(x)
+ end
+end
+
+def fun_l27_n546(x)
+ if (x < 1)
+ fun_l28_n508(x)
+ else
+ fun_l28_n267(x)
+ end
+end
+
+def fun_l27_n547(x)
+ if (x < 1)
+ fun_l28_n288(x)
+ else
+ fun_l28_n64(x)
+ end
+end
+
+def fun_l27_n548(x)
+ if (x < 1)
+ fun_l28_n941(x)
+ else
+ fun_l28_n632(x)
+ end
+end
+
+def fun_l27_n549(x)
+ if (x < 1)
+ fun_l28_n816(x)
+ else
+ fun_l28_n551(x)
+ end
+end
+
+def fun_l27_n550(x)
+ if (x < 1)
+ fun_l28_n848(x)
+ else
+ fun_l28_n778(x)
+ end
+end
+
+def fun_l27_n551(x)
+ if (x < 1)
+ fun_l28_n273(x)
+ else
+ fun_l28_n846(x)
+ end
+end
+
+def fun_l27_n552(x)
+ if (x < 1)
+ fun_l28_n18(x)
+ else
+ fun_l28_n530(x)
+ end
+end
+
+def fun_l27_n553(x)
+ if (x < 1)
+ fun_l28_n673(x)
+ else
+ fun_l28_n824(x)
+ end
+end
+
+def fun_l27_n554(x)
+ if (x < 1)
+ fun_l28_n376(x)
+ else
+ fun_l28_n32(x)
+ end
+end
+
+def fun_l27_n555(x)
+ if (x < 1)
+ fun_l28_n500(x)
+ else
+ fun_l28_n389(x)
+ end
+end
+
+def fun_l27_n556(x)
+ if (x < 1)
+ fun_l28_n712(x)
+ else
+ fun_l28_n729(x)
+ end
+end
+
+def fun_l27_n557(x)
+ if (x < 1)
+ fun_l28_n951(x)
+ else
+ fun_l28_n846(x)
+ end
+end
+
+def fun_l27_n558(x)
+ if (x < 1)
+ fun_l28_n269(x)
+ else
+ fun_l28_n538(x)
+ end
+end
+
+def fun_l27_n559(x)
+ if (x < 1)
+ fun_l28_n72(x)
+ else
+ fun_l28_n711(x)
+ end
+end
+
+def fun_l27_n560(x)
+ if (x < 1)
+ fun_l28_n510(x)
+ else
+ fun_l28_n718(x)
+ end
+end
+
+def fun_l27_n561(x)
+ if (x < 1)
+ fun_l28_n123(x)
+ else
+ fun_l28_n983(x)
+ end
+end
+
+def fun_l27_n562(x)
+ if (x < 1)
+ fun_l28_n486(x)
+ else
+ fun_l28_n796(x)
+ end
+end
+
+def fun_l27_n563(x)
+ if (x < 1)
+ fun_l28_n925(x)
+ else
+ fun_l28_n499(x)
+ end
+end
+
+def fun_l27_n564(x)
+ if (x < 1)
+ fun_l28_n811(x)
+ else
+ fun_l28_n604(x)
+ end
+end
+
+def fun_l27_n565(x)
+ if (x < 1)
+ fun_l28_n685(x)
+ else
+ fun_l28_n721(x)
+ end
+end
+
+def fun_l27_n566(x)
+ if (x < 1)
+ fun_l28_n946(x)
+ else
+ fun_l28_n890(x)
+ end
+end
+
+def fun_l27_n567(x)
+ if (x < 1)
+ fun_l28_n646(x)
+ else
+ fun_l28_n2(x)
+ end
+end
+
+def fun_l27_n568(x)
+ if (x < 1)
+ fun_l28_n570(x)
+ else
+ fun_l28_n427(x)
+ end
+end
+
+def fun_l27_n569(x)
+ if (x < 1)
+ fun_l28_n435(x)
+ else
+ fun_l28_n877(x)
+ end
+end
+
+def fun_l27_n570(x)
+ if (x < 1)
+ fun_l28_n67(x)
+ else
+ fun_l28_n879(x)
+ end
+end
+
+def fun_l27_n571(x)
+ if (x < 1)
+ fun_l28_n278(x)
+ else
+ fun_l28_n90(x)
+ end
+end
+
+def fun_l27_n572(x)
+ if (x < 1)
+ fun_l28_n748(x)
+ else
+ fun_l28_n202(x)
+ end
+end
+
+def fun_l27_n573(x)
+ if (x < 1)
+ fun_l28_n795(x)
+ else
+ fun_l28_n862(x)
+ end
+end
+
+def fun_l27_n574(x)
+ if (x < 1)
+ fun_l28_n208(x)
+ else
+ fun_l28_n979(x)
+ end
+end
+
+def fun_l27_n575(x)
+ if (x < 1)
+ fun_l28_n134(x)
+ else
+ fun_l28_n208(x)
+ end
+end
+
+def fun_l27_n576(x)
+ if (x < 1)
+ fun_l28_n591(x)
+ else
+ fun_l28_n400(x)
+ end
+end
+
+def fun_l27_n577(x)
+ if (x < 1)
+ fun_l28_n579(x)
+ else
+ fun_l28_n675(x)
+ end
+end
+
+def fun_l27_n578(x)
+ if (x < 1)
+ fun_l28_n186(x)
+ else
+ fun_l28_n643(x)
+ end
+end
+
+def fun_l27_n579(x)
+ if (x < 1)
+ fun_l28_n974(x)
+ else
+ fun_l28_n716(x)
+ end
+end
+
+def fun_l27_n580(x)
+ if (x < 1)
+ fun_l28_n168(x)
+ else
+ fun_l28_n10(x)
+ end
+end
+
+def fun_l27_n581(x)
+ if (x < 1)
+ fun_l28_n124(x)
+ else
+ fun_l28_n657(x)
+ end
+end
+
+def fun_l27_n582(x)
+ if (x < 1)
+ fun_l28_n240(x)
+ else
+ fun_l28_n335(x)
+ end
+end
+
+def fun_l27_n583(x)
+ if (x < 1)
+ fun_l28_n346(x)
+ else
+ fun_l28_n170(x)
+ end
+end
+
+def fun_l27_n584(x)
+ if (x < 1)
+ fun_l28_n854(x)
+ else
+ fun_l28_n681(x)
+ end
+end
+
+def fun_l27_n585(x)
+ if (x < 1)
+ fun_l28_n515(x)
+ else
+ fun_l28_n884(x)
+ end
+end
+
+def fun_l27_n586(x)
+ if (x < 1)
+ fun_l28_n901(x)
+ else
+ fun_l28_n12(x)
+ end
+end
+
+def fun_l27_n587(x)
+ if (x < 1)
+ fun_l28_n300(x)
+ else
+ fun_l28_n205(x)
+ end
+end
+
+def fun_l27_n588(x)
+ if (x < 1)
+ fun_l28_n52(x)
+ else
+ fun_l28_n823(x)
+ end
+end
+
+def fun_l27_n589(x)
+ if (x < 1)
+ fun_l28_n170(x)
+ else
+ fun_l28_n588(x)
+ end
+end
+
+def fun_l27_n590(x)
+ if (x < 1)
+ fun_l28_n777(x)
+ else
+ fun_l28_n232(x)
+ end
+end
+
+def fun_l27_n591(x)
+ if (x < 1)
+ fun_l28_n234(x)
+ else
+ fun_l28_n552(x)
+ end
+end
+
+def fun_l27_n592(x)
+ if (x < 1)
+ fun_l28_n83(x)
+ else
+ fun_l28_n736(x)
+ end
+end
+
+def fun_l27_n593(x)
+ if (x < 1)
+ fun_l28_n623(x)
+ else
+ fun_l28_n663(x)
+ end
+end
+
+def fun_l27_n594(x)
+ if (x < 1)
+ fun_l28_n137(x)
+ else
+ fun_l28_n858(x)
+ end
+end
+
+def fun_l27_n595(x)
+ if (x < 1)
+ fun_l28_n238(x)
+ else
+ fun_l28_n11(x)
+ end
+end
+
+def fun_l27_n596(x)
+ if (x < 1)
+ fun_l28_n692(x)
+ else
+ fun_l28_n815(x)
+ end
+end
+
+def fun_l27_n597(x)
+ if (x < 1)
+ fun_l28_n259(x)
+ else
+ fun_l28_n535(x)
+ end
+end
+
+def fun_l27_n598(x)
+ if (x < 1)
+ fun_l28_n135(x)
+ else
+ fun_l28_n567(x)
+ end
+end
+
+def fun_l27_n599(x)
+ if (x < 1)
+ fun_l28_n725(x)
+ else
+ fun_l28_n393(x)
+ end
+end
+
+def fun_l27_n600(x)
+ if (x < 1)
+ fun_l28_n790(x)
+ else
+ fun_l28_n478(x)
+ end
+end
+
+def fun_l27_n601(x)
+ if (x < 1)
+ fun_l28_n248(x)
+ else
+ fun_l28_n62(x)
+ end
+end
+
+def fun_l27_n602(x)
+ if (x < 1)
+ fun_l28_n790(x)
+ else
+ fun_l28_n854(x)
+ end
+end
+
+def fun_l27_n603(x)
+ if (x < 1)
+ fun_l28_n345(x)
+ else
+ fun_l28_n795(x)
+ end
+end
+
+def fun_l27_n604(x)
+ if (x < 1)
+ fun_l28_n689(x)
+ else
+ fun_l28_n357(x)
+ end
+end
+
+def fun_l27_n605(x)
+ if (x < 1)
+ fun_l28_n314(x)
+ else
+ fun_l28_n886(x)
+ end
+end
+
+def fun_l27_n606(x)
+ if (x < 1)
+ fun_l28_n401(x)
+ else
+ fun_l28_n688(x)
+ end
+end
+
+def fun_l27_n607(x)
+ if (x < 1)
+ fun_l28_n386(x)
+ else
+ fun_l28_n126(x)
+ end
+end
+
+def fun_l27_n608(x)
+ if (x < 1)
+ fun_l28_n232(x)
+ else
+ fun_l28_n387(x)
+ end
+end
+
+def fun_l27_n609(x)
+ if (x < 1)
+ fun_l28_n938(x)
+ else
+ fun_l28_n657(x)
+ end
+end
+
+def fun_l27_n610(x)
+ if (x < 1)
+ fun_l28_n40(x)
+ else
+ fun_l28_n141(x)
+ end
+end
+
+def fun_l27_n611(x)
+ if (x < 1)
+ fun_l28_n909(x)
+ else
+ fun_l28_n265(x)
+ end
+end
+
+def fun_l27_n612(x)
+ if (x < 1)
+ fun_l28_n486(x)
+ else
+ fun_l28_n470(x)
+ end
+end
+
+def fun_l27_n613(x)
+ if (x < 1)
+ fun_l28_n959(x)
+ else
+ fun_l28_n793(x)
+ end
+end
+
+def fun_l27_n614(x)
+ if (x < 1)
+ fun_l28_n422(x)
+ else
+ fun_l28_n246(x)
+ end
+end
+
+def fun_l27_n615(x)
+ if (x < 1)
+ fun_l28_n860(x)
+ else
+ fun_l28_n315(x)
+ end
+end
+
+def fun_l27_n616(x)
+ if (x < 1)
+ fun_l28_n529(x)
+ else
+ fun_l28_n647(x)
+ end
+end
+
+def fun_l27_n617(x)
+ if (x < 1)
+ fun_l28_n860(x)
+ else
+ fun_l28_n860(x)
+ end
+end
+
+def fun_l27_n618(x)
+ if (x < 1)
+ fun_l28_n147(x)
+ else
+ fun_l28_n814(x)
+ end
+end
+
+def fun_l27_n619(x)
+ if (x < 1)
+ fun_l28_n828(x)
+ else
+ fun_l28_n854(x)
+ end
+end
+
+def fun_l27_n620(x)
+ if (x < 1)
+ fun_l28_n464(x)
+ else
+ fun_l28_n838(x)
+ end
+end
+
+def fun_l27_n621(x)
+ if (x < 1)
+ fun_l28_n89(x)
+ else
+ fun_l28_n884(x)
+ end
+end
+
+def fun_l27_n622(x)
+ if (x < 1)
+ fun_l28_n933(x)
+ else
+ fun_l28_n889(x)
+ end
+end
+
+def fun_l27_n623(x)
+ if (x < 1)
+ fun_l28_n638(x)
+ else
+ fun_l28_n246(x)
+ end
+end
+
+def fun_l27_n624(x)
+ if (x < 1)
+ fun_l28_n724(x)
+ else
+ fun_l28_n305(x)
+ end
+end
+
+def fun_l27_n625(x)
+ if (x < 1)
+ fun_l28_n927(x)
+ else
+ fun_l28_n772(x)
+ end
+end
+
+def fun_l27_n626(x)
+ if (x < 1)
+ fun_l28_n612(x)
+ else
+ fun_l28_n953(x)
+ end
+end
+
+def fun_l27_n627(x)
+ if (x < 1)
+ fun_l28_n694(x)
+ else
+ fun_l28_n529(x)
+ end
+end
+
+def fun_l27_n628(x)
+ if (x < 1)
+ fun_l28_n136(x)
+ else
+ fun_l28_n977(x)
+ end
+end
+
+def fun_l27_n629(x)
+ if (x < 1)
+ fun_l28_n108(x)
+ else
+ fun_l28_n940(x)
+ end
+end
+
+def fun_l27_n630(x)
+ if (x < 1)
+ fun_l28_n773(x)
+ else
+ fun_l28_n62(x)
+ end
+end
+
+def fun_l27_n631(x)
+ if (x < 1)
+ fun_l28_n531(x)
+ else
+ fun_l28_n68(x)
+ end
+end
+
+def fun_l27_n632(x)
+ if (x < 1)
+ fun_l28_n910(x)
+ else
+ fun_l28_n638(x)
+ end
+end
+
+def fun_l27_n633(x)
+ if (x < 1)
+ fun_l28_n943(x)
+ else
+ fun_l28_n530(x)
+ end
+end
+
+def fun_l27_n634(x)
+ if (x < 1)
+ fun_l28_n161(x)
+ else
+ fun_l28_n842(x)
+ end
+end
+
+def fun_l27_n635(x)
+ if (x < 1)
+ fun_l28_n252(x)
+ else
+ fun_l28_n659(x)
+ end
+end
+
+def fun_l27_n636(x)
+ if (x < 1)
+ fun_l28_n739(x)
+ else
+ fun_l28_n116(x)
+ end
+end
+
+def fun_l27_n637(x)
+ if (x < 1)
+ fun_l28_n528(x)
+ else
+ fun_l28_n451(x)
+ end
+end
+
+def fun_l27_n638(x)
+ if (x < 1)
+ fun_l28_n772(x)
+ else
+ fun_l28_n163(x)
+ end
+end
+
+def fun_l27_n639(x)
+ if (x < 1)
+ fun_l28_n300(x)
+ else
+ fun_l28_n174(x)
+ end
+end
+
+def fun_l27_n640(x)
+ if (x < 1)
+ fun_l28_n967(x)
+ else
+ fun_l28_n437(x)
+ end
+end
+
+def fun_l27_n641(x)
+ if (x < 1)
+ fun_l28_n716(x)
+ else
+ fun_l28_n855(x)
+ end
+end
+
+def fun_l27_n642(x)
+ if (x < 1)
+ fun_l28_n510(x)
+ else
+ fun_l28_n958(x)
+ end
+end
+
+def fun_l27_n643(x)
+ if (x < 1)
+ fun_l28_n57(x)
+ else
+ fun_l28_n347(x)
+ end
+end
+
+def fun_l27_n644(x)
+ if (x < 1)
+ fun_l28_n145(x)
+ else
+ fun_l28_n652(x)
+ end
+end
+
+def fun_l27_n645(x)
+ if (x < 1)
+ fun_l28_n730(x)
+ else
+ fun_l28_n388(x)
+ end
+end
+
+def fun_l27_n646(x)
+ if (x < 1)
+ fun_l28_n409(x)
+ else
+ fun_l28_n394(x)
+ end
+end
+
+def fun_l27_n647(x)
+ if (x < 1)
+ fun_l28_n484(x)
+ else
+ fun_l28_n754(x)
+ end
+end
+
+def fun_l27_n648(x)
+ if (x < 1)
+ fun_l28_n888(x)
+ else
+ fun_l28_n229(x)
+ end
+end
+
+def fun_l27_n649(x)
+ if (x < 1)
+ fun_l28_n1(x)
+ else
+ fun_l28_n995(x)
+ end
+end
+
+def fun_l27_n650(x)
+ if (x < 1)
+ fun_l28_n992(x)
+ else
+ fun_l28_n522(x)
+ end
+end
+
+def fun_l27_n651(x)
+ if (x < 1)
+ fun_l28_n69(x)
+ else
+ fun_l28_n696(x)
+ end
+end
+
+def fun_l27_n652(x)
+ if (x < 1)
+ fun_l28_n496(x)
+ else
+ fun_l28_n47(x)
+ end
+end
+
+def fun_l27_n653(x)
+ if (x < 1)
+ fun_l28_n176(x)
+ else
+ fun_l28_n830(x)
+ end
+end
+
+def fun_l27_n654(x)
+ if (x < 1)
+ fun_l28_n277(x)
+ else
+ fun_l28_n311(x)
+ end
+end
+
+def fun_l27_n655(x)
+ if (x < 1)
+ fun_l28_n994(x)
+ else
+ fun_l28_n518(x)
+ end
+end
+
+def fun_l27_n656(x)
+ if (x < 1)
+ fun_l28_n238(x)
+ else
+ fun_l28_n99(x)
+ end
+end
+
+def fun_l27_n657(x)
+ if (x < 1)
+ fun_l28_n636(x)
+ else
+ fun_l28_n734(x)
+ end
+end
+
+def fun_l27_n658(x)
+ if (x < 1)
+ fun_l28_n796(x)
+ else
+ fun_l28_n109(x)
+ end
+end
+
+def fun_l27_n659(x)
+ if (x < 1)
+ fun_l28_n271(x)
+ else
+ fun_l28_n348(x)
+ end
+end
+
+def fun_l27_n660(x)
+ if (x < 1)
+ fun_l28_n847(x)
+ else
+ fun_l28_n926(x)
+ end
+end
+
+def fun_l27_n661(x)
+ if (x < 1)
+ fun_l28_n559(x)
+ else
+ fun_l28_n636(x)
+ end
+end
+
+def fun_l27_n662(x)
+ if (x < 1)
+ fun_l28_n528(x)
+ else
+ fun_l28_n0(x)
+ end
+end
+
+def fun_l27_n663(x)
+ if (x < 1)
+ fun_l28_n835(x)
+ else
+ fun_l28_n41(x)
+ end
+end
+
+def fun_l27_n664(x)
+ if (x < 1)
+ fun_l28_n135(x)
+ else
+ fun_l28_n356(x)
+ end
+end
+
+def fun_l27_n665(x)
+ if (x < 1)
+ fun_l28_n825(x)
+ else
+ fun_l28_n55(x)
+ end
+end
+
+def fun_l27_n666(x)
+ if (x < 1)
+ fun_l28_n659(x)
+ else
+ fun_l28_n384(x)
+ end
+end
+
+def fun_l27_n667(x)
+ if (x < 1)
+ fun_l28_n604(x)
+ else
+ fun_l28_n870(x)
+ end
+end
+
+def fun_l27_n668(x)
+ if (x < 1)
+ fun_l28_n136(x)
+ else
+ fun_l28_n343(x)
+ end
+end
+
+def fun_l27_n669(x)
+ if (x < 1)
+ fun_l28_n206(x)
+ else
+ fun_l28_n341(x)
+ end
+end
+
+def fun_l27_n670(x)
+ if (x < 1)
+ fun_l28_n947(x)
+ else
+ fun_l28_n926(x)
+ end
+end
+
+def fun_l27_n671(x)
+ if (x < 1)
+ fun_l28_n303(x)
+ else
+ fun_l28_n79(x)
+ end
+end
+
+def fun_l27_n672(x)
+ if (x < 1)
+ fun_l28_n181(x)
+ else
+ fun_l28_n937(x)
+ end
+end
+
+def fun_l27_n673(x)
+ if (x < 1)
+ fun_l28_n301(x)
+ else
+ fun_l28_n687(x)
+ end
+end
+
+def fun_l27_n674(x)
+ if (x < 1)
+ fun_l28_n992(x)
+ else
+ fun_l28_n814(x)
+ end
+end
+
+def fun_l27_n675(x)
+ if (x < 1)
+ fun_l28_n239(x)
+ else
+ fun_l28_n248(x)
+ end
+end
+
+def fun_l27_n676(x)
+ if (x < 1)
+ fun_l28_n728(x)
+ else
+ fun_l28_n368(x)
+ end
+end
+
+def fun_l27_n677(x)
+ if (x < 1)
+ fun_l28_n411(x)
+ else
+ fun_l28_n773(x)
+ end
+end
+
+def fun_l27_n678(x)
+ if (x < 1)
+ fun_l28_n522(x)
+ else
+ fun_l28_n754(x)
+ end
+end
+
+def fun_l27_n679(x)
+ if (x < 1)
+ fun_l28_n538(x)
+ else
+ fun_l28_n976(x)
+ end
+end
+
+def fun_l27_n680(x)
+ if (x < 1)
+ fun_l28_n744(x)
+ else
+ fun_l28_n752(x)
+ end
+end
+
+def fun_l27_n681(x)
+ if (x < 1)
+ fun_l28_n658(x)
+ else
+ fun_l28_n19(x)
+ end
+end
+
+def fun_l27_n682(x)
+ if (x < 1)
+ fun_l28_n843(x)
+ else
+ fun_l28_n657(x)
+ end
+end
+
+def fun_l27_n683(x)
+ if (x < 1)
+ fun_l28_n256(x)
+ else
+ fun_l28_n744(x)
+ end
+end
+
+def fun_l27_n684(x)
+ if (x < 1)
+ fun_l28_n380(x)
+ else
+ fun_l28_n223(x)
+ end
+end
+
+def fun_l27_n685(x)
+ if (x < 1)
+ fun_l28_n762(x)
+ else
+ fun_l28_n122(x)
+ end
+end
+
+def fun_l27_n686(x)
+ if (x < 1)
+ fun_l28_n860(x)
+ else
+ fun_l28_n51(x)
+ end
+end
+
+def fun_l27_n687(x)
+ if (x < 1)
+ fun_l28_n210(x)
+ else
+ fun_l28_n658(x)
+ end
+end
+
+def fun_l27_n688(x)
+ if (x < 1)
+ fun_l28_n250(x)
+ else
+ fun_l28_n165(x)
+ end
+end
+
+def fun_l27_n689(x)
+ if (x < 1)
+ fun_l28_n955(x)
+ else
+ fun_l28_n862(x)
+ end
+end
+
+def fun_l27_n690(x)
+ if (x < 1)
+ fun_l28_n592(x)
+ else
+ fun_l28_n54(x)
+ end
+end
+
+def fun_l27_n691(x)
+ if (x < 1)
+ fun_l28_n558(x)
+ else
+ fun_l28_n750(x)
+ end
+end
+
+def fun_l27_n692(x)
+ if (x < 1)
+ fun_l28_n307(x)
+ else
+ fun_l28_n143(x)
+ end
+end
+
+def fun_l27_n693(x)
+ if (x < 1)
+ fun_l28_n625(x)
+ else
+ fun_l28_n743(x)
+ end
+end
+
+def fun_l27_n694(x)
+ if (x < 1)
+ fun_l28_n883(x)
+ else
+ fun_l28_n567(x)
+ end
+end
+
+def fun_l27_n695(x)
+ if (x < 1)
+ fun_l28_n889(x)
+ else
+ fun_l28_n805(x)
+ end
+end
+
+def fun_l27_n696(x)
+ if (x < 1)
+ fun_l28_n366(x)
+ else
+ fun_l28_n112(x)
+ end
+end
+
+def fun_l27_n697(x)
+ if (x < 1)
+ fun_l28_n746(x)
+ else
+ fun_l28_n924(x)
+ end
+end
+
+def fun_l27_n698(x)
+ if (x < 1)
+ fun_l28_n694(x)
+ else
+ fun_l28_n703(x)
+ end
+end
+
+def fun_l27_n699(x)
+ if (x < 1)
+ fun_l28_n304(x)
+ else
+ fun_l28_n200(x)
+ end
+end
+
+def fun_l27_n700(x)
+ if (x < 1)
+ fun_l28_n477(x)
+ else
+ fun_l28_n851(x)
+ end
+end
+
+def fun_l27_n701(x)
+ if (x < 1)
+ fun_l28_n940(x)
+ else
+ fun_l28_n8(x)
+ end
+end
+
+def fun_l27_n702(x)
+ if (x < 1)
+ fun_l28_n675(x)
+ else
+ fun_l28_n631(x)
+ end
+end
+
+def fun_l27_n703(x)
+ if (x < 1)
+ fun_l28_n683(x)
+ else
+ fun_l28_n191(x)
+ end
+end
+
+def fun_l27_n704(x)
+ if (x < 1)
+ fun_l28_n431(x)
+ else
+ fun_l28_n573(x)
+ end
+end
+
+def fun_l27_n705(x)
+ if (x < 1)
+ fun_l28_n86(x)
+ else
+ fun_l28_n89(x)
+ end
+end
+
+def fun_l27_n706(x)
+ if (x < 1)
+ fun_l28_n315(x)
+ else
+ fun_l28_n388(x)
+ end
+end
+
+def fun_l27_n707(x)
+ if (x < 1)
+ fun_l28_n94(x)
+ else
+ fun_l28_n176(x)
+ end
+end
+
+def fun_l27_n708(x)
+ if (x < 1)
+ fun_l28_n391(x)
+ else
+ fun_l28_n187(x)
+ end
+end
+
+def fun_l27_n709(x)
+ if (x < 1)
+ fun_l28_n845(x)
+ else
+ fun_l28_n497(x)
+ end
+end
+
+def fun_l27_n710(x)
+ if (x < 1)
+ fun_l28_n195(x)
+ else
+ fun_l28_n242(x)
+ end
+end
+
+def fun_l27_n711(x)
+ if (x < 1)
+ fun_l28_n276(x)
+ else
+ fun_l28_n856(x)
+ end
+end
+
+def fun_l27_n712(x)
+ if (x < 1)
+ fun_l28_n42(x)
+ else
+ fun_l28_n184(x)
+ end
+end
+
+def fun_l27_n713(x)
+ if (x < 1)
+ fun_l28_n270(x)
+ else
+ fun_l28_n813(x)
+ end
+end
+
+def fun_l27_n714(x)
+ if (x < 1)
+ fun_l28_n281(x)
+ else
+ fun_l28_n54(x)
+ end
+end
+
+def fun_l27_n715(x)
+ if (x < 1)
+ fun_l28_n226(x)
+ else
+ fun_l28_n202(x)
+ end
+end
+
+def fun_l27_n716(x)
+ if (x < 1)
+ fun_l28_n391(x)
+ else
+ fun_l28_n143(x)
+ end
+end
+
+def fun_l27_n717(x)
+ if (x < 1)
+ fun_l28_n449(x)
+ else
+ fun_l28_n530(x)
+ end
+end
+
+def fun_l27_n718(x)
+ if (x < 1)
+ fun_l28_n198(x)
+ else
+ fun_l28_n342(x)
+ end
+end
+
+def fun_l27_n719(x)
+ if (x < 1)
+ fun_l28_n741(x)
+ else
+ fun_l28_n703(x)
+ end
+end
+
+def fun_l27_n720(x)
+ if (x < 1)
+ fun_l28_n779(x)
+ else
+ fun_l28_n706(x)
+ end
+end
+
+def fun_l27_n721(x)
+ if (x < 1)
+ fun_l28_n184(x)
+ else
+ fun_l28_n472(x)
+ end
+end
+
+def fun_l27_n722(x)
+ if (x < 1)
+ fun_l28_n752(x)
+ else
+ fun_l28_n230(x)
+ end
+end
+
+def fun_l27_n723(x)
+ if (x < 1)
+ fun_l28_n137(x)
+ else
+ fun_l28_n228(x)
+ end
+end
+
+def fun_l27_n724(x)
+ if (x < 1)
+ fun_l28_n360(x)
+ else
+ fun_l28_n186(x)
+ end
+end
+
+def fun_l27_n725(x)
+ if (x < 1)
+ fun_l28_n791(x)
+ else
+ fun_l28_n752(x)
+ end
+end
+
+def fun_l27_n726(x)
+ if (x < 1)
+ fun_l28_n162(x)
+ else
+ fun_l28_n492(x)
+ end
+end
+
+def fun_l27_n727(x)
+ if (x < 1)
+ fun_l28_n329(x)
+ else
+ fun_l28_n286(x)
+ end
+end
+
+def fun_l27_n728(x)
+ if (x < 1)
+ fun_l28_n262(x)
+ else
+ fun_l28_n775(x)
+ end
+end
+
+def fun_l27_n729(x)
+ if (x < 1)
+ fun_l28_n773(x)
+ else
+ fun_l28_n424(x)
+ end
+end
+
+def fun_l27_n730(x)
+ if (x < 1)
+ fun_l28_n202(x)
+ else
+ fun_l28_n379(x)
+ end
+end
+
+def fun_l27_n731(x)
+ if (x < 1)
+ fun_l28_n761(x)
+ else
+ fun_l28_n759(x)
+ end
+end
+
+def fun_l27_n732(x)
+ if (x < 1)
+ fun_l28_n544(x)
+ else
+ fun_l28_n980(x)
+ end
+end
+
+def fun_l27_n733(x)
+ if (x < 1)
+ fun_l28_n75(x)
+ else
+ fun_l28_n786(x)
+ end
+end
+
+def fun_l27_n734(x)
+ if (x < 1)
+ fun_l28_n708(x)
+ else
+ fun_l28_n92(x)
+ end
+end
+
+def fun_l27_n735(x)
+ if (x < 1)
+ fun_l28_n213(x)
+ else
+ fun_l28_n966(x)
+ end
+end
+
+def fun_l27_n736(x)
+ if (x < 1)
+ fun_l28_n298(x)
+ else
+ fun_l28_n517(x)
+ end
+end
+
+def fun_l27_n737(x)
+ if (x < 1)
+ fun_l28_n665(x)
+ else
+ fun_l28_n960(x)
+ end
+end
+
+def fun_l27_n738(x)
+ if (x < 1)
+ fun_l28_n51(x)
+ else
+ fun_l28_n605(x)
+ end
+end
+
+def fun_l27_n739(x)
+ if (x < 1)
+ fun_l28_n931(x)
+ else
+ fun_l28_n697(x)
+ end
+end
+
+def fun_l27_n740(x)
+ if (x < 1)
+ fun_l28_n341(x)
+ else
+ fun_l28_n57(x)
+ end
+end
+
+def fun_l27_n741(x)
+ if (x < 1)
+ fun_l28_n614(x)
+ else
+ fun_l28_n623(x)
+ end
+end
+
+def fun_l27_n742(x)
+ if (x < 1)
+ fun_l28_n466(x)
+ else
+ fun_l28_n260(x)
+ end
+end
+
+def fun_l27_n743(x)
+ if (x < 1)
+ fun_l28_n741(x)
+ else
+ fun_l28_n337(x)
+ end
+end
+
+def fun_l27_n744(x)
+ if (x < 1)
+ fun_l28_n414(x)
+ else
+ fun_l28_n277(x)
+ end
+end
+
+def fun_l27_n745(x)
+ if (x < 1)
+ fun_l28_n377(x)
+ else
+ fun_l28_n245(x)
+ end
+end
+
+def fun_l27_n746(x)
+ if (x < 1)
+ fun_l28_n441(x)
+ else
+ fun_l28_n347(x)
+ end
+end
+
+def fun_l27_n747(x)
+ if (x < 1)
+ fun_l28_n473(x)
+ else
+ fun_l28_n54(x)
+ end
+end
+
+def fun_l27_n748(x)
+ if (x < 1)
+ fun_l28_n140(x)
+ else
+ fun_l28_n680(x)
+ end
+end
+
+def fun_l27_n749(x)
+ if (x < 1)
+ fun_l28_n491(x)
+ else
+ fun_l28_n830(x)
+ end
+end
+
+def fun_l27_n750(x)
+ if (x < 1)
+ fun_l28_n803(x)
+ else
+ fun_l28_n917(x)
+ end
+end
+
+def fun_l27_n751(x)
+ if (x < 1)
+ fun_l28_n97(x)
+ else
+ fun_l28_n702(x)
+ end
+end
+
+def fun_l27_n752(x)
+ if (x < 1)
+ fun_l28_n113(x)
+ else
+ fun_l28_n447(x)
+ end
+end
+
+def fun_l27_n753(x)
+ if (x < 1)
+ fun_l28_n589(x)
+ else
+ fun_l28_n933(x)
+ end
+end
+
+def fun_l27_n754(x)
+ if (x < 1)
+ fun_l28_n610(x)
+ else
+ fun_l28_n365(x)
+ end
+end
+
+def fun_l27_n755(x)
+ if (x < 1)
+ fun_l28_n813(x)
+ else
+ fun_l28_n930(x)
+ end
+end
+
+def fun_l27_n756(x)
+ if (x < 1)
+ fun_l28_n997(x)
+ else
+ fun_l28_n112(x)
+ end
+end
+
+def fun_l27_n757(x)
+ if (x < 1)
+ fun_l28_n635(x)
+ else
+ fun_l28_n852(x)
+ end
+end
+
+def fun_l27_n758(x)
+ if (x < 1)
+ fun_l28_n735(x)
+ else
+ fun_l28_n3(x)
+ end
+end
+
+def fun_l27_n759(x)
+ if (x < 1)
+ fun_l28_n473(x)
+ else
+ fun_l28_n276(x)
+ end
+end
+
+def fun_l27_n760(x)
+ if (x < 1)
+ fun_l28_n708(x)
+ else
+ fun_l28_n602(x)
+ end
+end
+
+def fun_l27_n761(x)
+ if (x < 1)
+ fun_l28_n178(x)
+ else
+ fun_l28_n766(x)
+ end
+end
+
+def fun_l27_n762(x)
+ if (x < 1)
+ fun_l28_n968(x)
+ else
+ fun_l28_n935(x)
+ end
+end
+
+def fun_l27_n763(x)
+ if (x < 1)
+ fun_l28_n17(x)
+ else
+ fun_l28_n680(x)
+ end
+end
+
+def fun_l27_n764(x)
+ if (x < 1)
+ fun_l28_n465(x)
+ else
+ fun_l28_n484(x)
+ end
+end
+
+def fun_l27_n765(x)
+ if (x < 1)
+ fun_l28_n157(x)
+ else
+ fun_l28_n33(x)
+ end
+end
+
+def fun_l27_n766(x)
+ if (x < 1)
+ fun_l28_n306(x)
+ else
+ fun_l28_n588(x)
+ end
+end
+
+def fun_l27_n767(x)
+ if (x < 1)
+ fun_l28_n73(x)
+ else
+ fun_l28_n144(x)
+ end
+end
+
+def fun_l27_n768(x)
+ if (x < 1)
+ fun_l28_n838(x)
+ else
+ fun_l28_n984(x)
+ end
+end
+
+def fun_l27_n769(x)
+ if (x < 1)
+ fun_l28_n541(x)
+ else
+ fun_l28_n687(x)
+ end
+end
+
+def fun_l27_n770(x)
+ if (x < 1)
+ fun_l28_n129(x)
+ else
+ fun_l28_n256(x)
+ end
+end
+
+def fun_l27_n771(x)
+ if (x < 1)
+ fun_l28_n78(x)
+ else
+ fun_l28_n617(x)
+ end
+end
+
+def fun_l27_n772(x)
+ if (x < 1)
+ fun_l28_n590(x)
+ else
+ fun_l28_n78(x)
+ end
+end
+
+def fun_l27_n773(x)
+ if (x < 1)
+ fun_l28_n609(x)
+ else
+ fun_l28_n942(x)
+ end
+end
+
+def fun_l27_n774(x)
+ if (x < 1)
+ fun_l28_n794(x)
+ else
+ fun_l28_n361(x)
+ end
+end
+
+def fun_l27_n775(x)
+ if (x < 1)
+ fun_l28_n632(x)
+ else
+ fun_l28_n722(x)
+ end
+end
+
+def fun_l27_n776(x)
+ if (x < 1)
+ fun_l28_n655(x)
+ else
+ fun_l28_n944(x)
+ end
+end
+
+def fun_l27_n777(x)
+ if (x < 1)
+ fun_l28_n117(x)
+ else
+ fun_l28_n725(x)
+ end
+end
+
+def fun_l27_n778(x)
+ if (x < 1)
+ fun_l28_n511(x)
+ else
+ fun_l28_n934(x)
+ end
+end
+
+def fun_l27_n779(x)
+ if (x < 1)
+ fun_l28_n11(x)
+ else
+ fun_l28_n421(x)
+ end
+end
+
+def fun_l27_n780(x)
+ if (x < 1)
+ fun_l28_n957(x)
+ else
+ fun_l28_n941(x)
+ end
+end
+
+def fun_l27_n781(x)
+ if (x < 1)
+ fun_l28_n899(x)
+ else
+ fun_l28_n122(x)
+ end
+end
+
+def fun_l27_n782(x)
+ if (x < 1)
+ fun_l28_n42(x)
+ else
+ fun_l28_n885(x)
+ end
+end
+
+def fun_l27_n783(x)
+ if (x < 1)
+ fun_l28_n696(x)
+ else
+ fun_l28_n25(x)
+ end
+end
+
+def fun_l27_n784(x)
+ if (x < 1)
+ fun_l28_n683(x)
+ else
+ fun_l28_n201(x)
+ end
+end
+
+def fun_l27_n785(x)
+ if (x < 1)
+ fun_l28_n337(x)
+ else
+ fun_l28_n977(x)
+ end
+end
+
+def fun_l27_n786(x)
+ if (x < 1)
+ fun_l28_n113(x)
+ else
+ fun_l28_n946(x)
+ end
+end
+
+def fun_l27_n787(x)
+ if (x < 1)
+ fun_l28_n311(x)
+ else
+ fun_l28_n396(x)
+ end
+end
+
+def fun_l27_n788(x)
+ if (x < 1)
+ fun_l28_n963(x)
+ else
+ fun_l28_n592(x)
+ end
+end
+
+def fun_l27_n789(x)
+ if (x < 1)
+ fun_l28_n647(x)
+ else
+ fun_l28_n614(x)
+ end
+end
+
+def fun_l27_n790(x)
+ if (x < 1)
+ fun_l28_n15(x)
+ else
+ fun_l28_n602(x)
+ end
+end
+
+def fun_l27_n791(x)
+ if (x < 1)
+ fun_l28_n648(x)
+ else
+ fun_l28_n921(x)
+ end
+end
+
+def fun_l27_n792(x)
+ if (x < 1)
+ fun_l28_n272(x)
+ else
+ fun_l28_n585(x)
+ end
+end
+
+def fun_l27_n793(x)
+ if (x < 1)
+ fun_l28_n74(x)
+ else
+ fun_l28_n412(x)
+ end
+end
+
+def fun_l27_n794(x)
+ if (x < 1)
+ fun_l28_n610(x)
+ else
+ fun_l28_n121(x)
+ end
+end
+
+def fun_l27_n795(x)
+ if (x < 1)
+ fun_l28_n905(x)
+ else
+ fun_l28_n620(x)
+ end
+end
+
+def fun_l27_n796(x)
+ if (x < 1)
+ fun_l28_n691(x)
+ else
+ fun_l28_n833(x)
+ end
+end
+
+def fun_l27_n797(x)
+ if (x < 1)
+ fun_l28_n148(x)
+ else
+ fun_l28_n223(x)
+ end
+end
+
+def fun_l27_n798(x)
+ if (x < 1)
+ fun_l28_n835(x)
+ else
+ fun_l28_n59(x)
+ end
+end
+
+def fun_l27_n799(x)
+ if (x < 1)
+ fun_l28_n317(x)
+ else
+ fun_l28_n39(x)
+ end
+end
+
+def fun_l27_n800(x)
+ if (x < 1)
+ fun_l28_n694(x)
+ else
+ fun_l28_n833(x)
+ end
+end
+
+def fun_l27_n801(x)
+ if (x < 1)
+ fun_l28_n280(x)
+ else
+ fun_l28_n322(x)
+ end
+end
+
+def fun_l27_n802(x)
+ if (x < 1)
+ fun_l28_n612(x)
+ else
+ fun_l28_n866(x)
+ end
+end
+
+def fun_l27_n803(x)
+ if (x < 1)
+ fun_l28_n114(x)
+ else
+ fun_l28_n901(x)
+ end
+end
+
+def fun_l27_n804(x)
+ if (x < 1)
+ fun_l28_n983(x)
+ else
+ fun_l28_n837(x)
+ end
+end
+
+def fun_l27_n805(x)
+ if (x < 1)
+ fun_l28_n225(x)
+ else
+ fun_l28_n345(x)
+ end
+end
+
+def fun_l27_n806(x)
+ if (x < 1)
+ fun_l28_n879(x)
+ else
+ fun_l28_n929(x)
+ end
+end
+
+def fun_l27_n807(x)
+ if (x < 1)
+ fun_l28_n41(x)
+ else
+ fun_l28_n670(x)
+ end
+end
+
+def fun_l27_n808(x)
+ if (x < 1)
+ fun_l28_n407(x)
+ else
+ fun_l28_n46(x)
+ end
+end
+
+def fun_l27_n809(x)
+ if (x < 1)
+ fun_l28_n377(x)
+ else
+ fun_l28_n646(x)
+ end
+end
+
+def fun_l27_n810(x)
+ if (x < 1)
+ fun_l28_n293(x)
+ else
+ fun_l28_n40(x)
+ end
+end
+
+def fun_l27_n811(x)
+ if (x < 1)
+ fun_l28_n150(x)
+ else
+ fun_l28_n743(x)
+ end
+end
+
+def fun_l27_n812(x)
+ if (x < 1)
+ fun_l28_n285(x)
+ else
+ fun_l28_n124(x)
+ end
+end
+
+def fun_l27_n813(x)
+ if (x < 1)
+ fun_l28_n861(x)
+ else
+ fun_l28_n641(x)
+ end
+end
+
+def fun_l27_n814(x)
+ if (x < 1)
+ fun_l28_n917(x)
+ else
+ fun_l28_n51(x)
+ end
+end
+
+def fun_l27_n815(x)
+ if (x < 1)
+ fun_l28_n573(x)
+ else
+ fun_l28_n551(x)
+ end
+end
+
+def fun_l27_n816(x)
+ if (x < 1)
+ fun_l28_n420(x)
+ else
+ fun_l28_n155(x)
+ end
+end
+
+def fun_l27_n817(x)
+ if (x < 1)
+ fun_l28_n283(x)
+ else
+ fun_l28_n797(x)
+ end
+end
+
+def fun_l27_n818(x)
+ if (x < 1)
+ fun_l28_n744(x)
+ else
+ fun_l28_n22(x)
+ end
+end
+
+def fun_l27_n819(x)
+ if (x < 1)
+ fun_l28_n370(x)
+ else
+ fun_l28_n287(x)
+ end
+end
+
+def fun_l27_n820(x)
+ if (x < 1)
+ fun_l28_n435(x)
+ else
+ fun_l28_n23(x)
+ end
+end
+
+def fun_l27_n821(x)
+ if (x < 1)
+ fun_l28_n947(x)
+ else
+ fun_l28_n200(x)
+ end
+end
+
+def fun_l27_n822(x)
+ if (x < 1)
+ fun_l28_n259(x)
+ else
+ fun_l28_n444(x)
+ end
+end
+
+def fun_l27_n823(x)
+ if (x < 1)
+ fun_l28_n663(x)
+ else
+ fun_l28_n755(x)
+ end
+end
+
+def fun_l27_n824(x)
+ if (x < 1)
+ fun_l28_n564(x)
+ else
+ fun_l28_n572(x)
+ end
+end
+
+def fun_l27_n825(x)
+ if (x < 1)
+ fun_l28_n679(x)
+ else
+ fun_l28_n351(x)
+ end
+end
+
+def fun_l27_n826(x)
+ if (x < 1)
+ fun_l28_n654(x)
+ else
+ fun_l28_n393(x)
+ end
+end
+
+def fun_l27_n827(x)
+ if (x < 1)
+ fun_l28_n454(x)
+ else
+ fun_l28_n698(x)
+ end
+end
+
+def fun_l27_n828(x)
+ if (x < 1)
+ fun_l28_n389(x)
+ else
+ fun_l28_n118(x)
+ end
+end
+
+def fun_l27_n829(x)
+ if (x < 1)
+ fun_l28_n918(x)
+ else
+ fun_l28_n176(x)
+ end
+end
+
+def fun_l27_n830(x)
+ if (x < 1)
+ fun_l28_n158(x)
+ else
+ fun_l28_n309(x)
+ end
+end
+
+def fun_l27_n831(x)
+ if (x < 1)
+ fun_l28_n86(x)
+ else
+ fun_l28_n250(x)
+ end
+end
+
+def fun_l27_n832(x)
+ if (x < 1)
+ fun_l28_n21(x)
+ else
+ fun_l28_n688(x)
+ end
+end
+
+def fun_l27_n833(x)
+ if (x < 1)
+ fun_l28_n587(x)
+ else
+ fun_l28_n484(x)
+ end
+end
+
+def fun_l27_n834(x)
+ if (x < 1)
+ fun_l28_n886(x)
+ else
+ fun_l28_n579(x)
+ end
+end
+
+def fun_l27_n835(x)
+ if (x < 1)
+ fun_l28_n923(x)
+ else
+ fun_l28_n140(x)
+ end
+end
+
+def fun_l27_n836(x)
+ if (x < 1)
+ fun_l28_n120(x)
+ else
+ fun_l28_n704(x)
+ end
+end
+
+def fun_l27_n837(x)
+ if (x < 1)
+ fun_l28_n905(x)
+ else
+ fun_l28_n918(x)
+ end
+end
+
+def fun_l27_n838(x)
+ if (x < 1)
+ fun_l28_n679(x)
+ else
+ fun_l28_n588(x)
+ end
+end
+
+def fun_l27_n839(x)
+ if (x < 1)
+ fun_l28_n445(x)
+ else
+ fun_l28_n187(x)
+ end
+end
+
+def fun_l27_n840(x)
+ if (x < 1)
+ fun_l28_n695(x)
+ else
+ fun_l28_n86(x)
+ end
+end
+
+def fun_l27_n841(x)
+ if (x < 1)
+ fun_l28_n784(x)
+ else
+ fun_l28_n802(x)
+ end
+end
+
+def fun_l27_n842(x)
+ if (x < 1)
+ fun_l28_n854(x)
+ else
+ fun_l28_n617(x)
+ end
+end
+
+def fun_l27_n843(x)
+ if (x < 1)
+ fun_l28_n466(x)
+ else
+ fun_l28_n261(x)
+ end
+end
+
+def fun_l27_n844(x)
+ if (x < 1)
+ fun_l28_n326(x)
+ else
+ fun_l28_n517(x)
+ end
+end
+
+def fun_l27_n845(x)
+ if (x < 1)
+ fun_l28_n686(x)
+ else
+ fun_l28_n81(x)
+ end
+end
+
+def fun_l27_n846(x)
+ if (x < 1)
+ fun_l28_n71(x)
+ else
+ fun_l28_n685(x)
+ end
+end
+
+def fun_l27_n847(x)
+ if (x < 1)
+ fun_l28_n622(x)
+ else
+ fun_l28_n469(x)
+ end
+end
+
+def fun_l27_n848(x)
+ if (x < 1)
+ fun_l28_n125(x)
+ else
+ fun_l28_n252(x)
+ end
+end
+
+def fun_l27_n849(x)
+ if (x < 1)
+ fun_l28_n820(x)
+ else
+ fun_l28_n752(x)
+ end
+end
+
+def fun_l27_n850(x)
+ if (x < 1)
+ fun_l28_n278(x)
+ else
+ fun_l28_n198(x)
+ end
+end
+
+def fun_l27_n851(x)
+ if (x < 1)
+ fun_l28_n631(x)
+ else
+ fun_l28_n241(x)
+ end
+end
+
+def fun_l27_n852(x)
+ if (x < 1)
+ fun_l28_n917(x)
+ else
+ fun_l28_n95(x)
+ end
+end
+
+def fun_l27_n853(x)
+ if (x < 1)
+ fun_l28_n271(x)
+ else
+ fun_l28_n493(x)
+ end
+end
+
+def fun_l27_n854(x)
+ if (x < 1)
+ fun_l28_n578(x)
+ else
+ fun_l28_n31(x)
+ end
+end
+
+def fun_l27_n855(x)
+ if (x < 1)
+ fun_l28_n407(x)
+ else
+ fun_l28_n694(x)
+ end
+end
+
+def fun_l27_n856(x)
+ if (x < 1)
+ fun_l28_n541(x)
+ else
+ fun_l28_n81(x)
+ end
+end
+
+def fun_l27_n857(x)
+ if (x < 1)
+ fun_l28_n144(x)
+ else
+ fun_l28_n965(x)
+ end
+end
+
+def fun_l27_n858(x)
+ if (x < 1)
+ fun_l28_n476(x)
+ else
+ fun_l28_n44(x)
+ end
+end
+
+def fun_l27_n859(x)
+ if (x < 1)
+ fun_l28_n647(x)
+ else
+ fun_l28_n973(x)
+ end
+end
+
+def fun_l27_n860(x)
+ if (x < 1)
+ fun_l28_n641(x)
+ else
+ fun_l28_n331(x)
+ end
+end
+
+def fun_l27_n861(x)
+ if (x < 1)
+ fun_l28_n75(x)
+ else
+ fun_l28_n10(x)
+ end
+end
+
+def fun_l27_n862(x)
+ if (x < 1)
+ fun_l28_n435(x)
+ else
+ fun_l28_n182(x)
+ end
+end
+
+def fun_l27_n863(x)
+ if (x < 1)
+ fun_l28_n244(x)
+ else
+ fun_l28_n135(x)
+ end
+end
+
+def fun_l27_n864(x)
+ if (x < 1)
+ fun_l28_n598(x)
+ else
+ fun_l28_n495(x)
+ end
+end
+
+def fun_l27_n865(x)
+ if (x < 1)
+ fun_l28_n456(x)
+ else
+ fun_l28_n16(x)
+ end
+end
+
+def fun_l27_n866(x)
+ if (x < 1)
+ fun_l28_n43(x)
+ else
+ fun_l28_n279(x)
+ end
+end
+
+def fun_l27_n867(x)
+ if (x < 1)
+ fun_l28_n853(x)
+ else
+ fun_l28_n906(x)
+ end
+end
+
+def fun_l27_n868(x)
+ if (x < 1)
+ fun_l28_n641(x)
+ else
+ fun_l28_n479(x)
+ end
+end
+
+def fun_l27_n869(x)
+ if (x < 1)
+ fun_l28_n78(x)
+ else
+ fun_l28_n727(x)
+ end
+end
+
+def fun_l27_n870(x)
+ if (x < 1)
+ fun_l28_n815(x)
+ else
+ fun_l28_n803(x)
+ end
+end
+
+def fun_l27_n871(x)
+ if (x < 1)
+ fun_l28_n343(x)
+ else
+ fun_l28_n665(x)
+ end
+end
+
+def fun_l27_n872(x)
+ if (x < 1)
+ fun_l28_n907(x)
+ else
+ fun_l28_n410(x)
+ end
+end
+
+def fun_l27_n873(x)
+ if (x < 1)
+ fun_l28_n797(x)
+ else
+ fun_l28_n626(x)
+ end
+end
+
+def fun_l27_n874(x)
+ if (x < 1)
+ fun_l28_n784(x)
+ else
+ fun_l28_n679(x)
+ end
+end
+
+def fun_l27_n875(x)
+ if (x < 1)
+ fun_l28_n247(x)
+ else
+ fun_l28_n89(x)
+ end
+end
+
+def fun_l27_n876(x)
+ if (x < 1)
+ fun_l28_n911(x)
+ else
+ fun_l28_n503(x)
+ end
+end
+
+def fun_l27_n877(x)
+ if (x < 1)
+ fun_l28_n233(x)
+ else
+ fun_l28_n437(x)
+ end
+end
+
+def fun_l27_n878(x)
+ if (x < 1)
+ fun_l28_n913(x)
+ else
+ fun_l28_n984(x)
+ end
+end
+
+def fun_l27_n879(x)
+ if (x < 1)
+ fun_l28_n690(x)
+ else
+ fun_l28_n642(x)
+ end
+end
+
+def fun_l27_n880(x)
+ if (x < 1)
+ fun_l28_n222(x)
+ else
+ fun_l28_n400(x)
+ end
+end
+
+def fun_l27_n881(x)
+ if (x < 1)
+ fun_l28_n611(x)
+ else
+ fun_l28_n446(x)
+ end
+end
+
+def fun_l27_n882(x)
+ if (x < 1)
+ fun_l28_n821(x)
+ else
+ fun_l28_n784(x)
+ end
+end
+
+def fun_l27_n883(x)
+ if (x < 1)
+ fun_l28_n849(x)
+ else
+ fun_l28_n83(x)
+ end
+end
+
+def fun_l27_n884(x)
+ if (x < 1)
+ fun_l28_n366(x)
+ else
+ fun_l28_n822(x)
+ end
+end
+
+def fun_l27_n885(x)
+ if (x < 1)
+ fun_l28_n40(x)
+ else
+ fun_l28_n626(x)
+ end
+end
+
+def fun_l27_n886(x)
+ if (x < 1)
+ fun_l28_n280(x)
+ else
+ fun_l28_n957(x)
+ end
+end
+
+def fun_l27_n887(x)
+ if (x < 1)
+ fun_l28_n466(x)
+ else
+ fun_l28_n377(x)
+ end
+end
+
+def fun_l27_n888(x)
+ if (x < 1)
+ fun_l28_n258(x)
+ else
+ fun_l28_n816(x)
+ end
+end
+
+def fun_l27_n889(x)
+ if (x < 1)
+ fun_l28_n893(x)
+ else
+ fun_l28_n263(x)
+ end
+end
+
+def fun_l27_n890(x)
+ if (x < 1)
+ fun_l28_n366(x)
+ else
+ fun_l28_n890(x)
+ end
+end
+
+def fun_l27_n891(x)
+ if (x < 1)
+ fun_l28_n692(x)
+ else
+ fun_l28_n781(x)
+ end
+end
+
+def fun_l27_n892(x)
+ if (x < 1)
+ fun_l28_n301(x)
+ else
+ fun_l28_n142(x)
+ end
+end
+
+def fun_l27_n893(x)
+ if (x < 1)
+ fun_l28_n275(x)
+ else
+ fun_l28_n302(x)
+ end
+end
+
+def fun_l27_n894(x)
+ if (x < 1)
+ fun_l28_n726(x)
+ else
+ fun_l28_n445(x)
+ end
+end
+
+def fun_l27_n895(x)
+ if (x < 1)
+ fun_l28_n859(x)
+ else
+ fun_l28_n839(x)
+ end
+end
+
+def fun_l27_n896(x)
+ if (x < 1)
+ fun_l28_n252(x)
+ else
+ fun_l28_n844(x)
+ end
+end
+
+def fun_l27_n897(x)
+ if (x < 1)
+ fun_l28_n245(x)
+ else
+ fun_l28_n133(x)
+ end
+end
+
+def fun_l27_n898(x)
+ if (x < 1)
+ fun_l28_n233(x)
+ else
+ fun_l28_n417(x)
+ end
+end
+
+def fun_l27_n899(x)
+ if (x < 1)
+ fun_l28_n171(x)
+ else
+ fun_l28_n479(x)
+ end
+end
+
+def fun_l27_n900(x)
+ if (x < 1)
+ fun_l28_n528(x)
+ else
+ fun_l28_n196(x)
+ end
+end
+
+def fun_l27_n901(x)
+ if (x < 1)
+ fun_l28_n243(x)
+ else
+ fun_l28_n270(x)
+ end
+end
+
+def fun_l27_n902(x)
+ if (x < 1)
+ fun_l28_n319(x)
+ else
+ fun_l28_n885(x)
+ end
+end
+
+def fun_l27_n903(x)
+ if (x < 1)
+ fun_l28_n570(x)
+ else
+ fun_l28_n321(x)
+ end
+end
+
+def fun_l27_n904(x)
+ if (x < 1)
+ fun_l28_n522(x)
+ else
+ fun_l28_n720(x)
+ end
+end
+
+def fun_l27_n905(x)
+ if (x < 1)
+ fun_l28_n820(x)
+ else
+ fun_l28_n789(x)
+ end
+end
+
+def fun_l27_n906(x)
+ if (x < 1)
+ fun_l28_n592(x)
+ else
+ fun_l28_n113(x)
+ end
+end
+
+def fun_l27_n907(x)
+ if (x < 1)
+ fun_l28_n432(x)
+ else
+ fun_l28_n591(x)
+ end
+end
+
+def fun_l27_n908(x)
+ if (x < 1)
+ fun_l28_n538(x)
+ else
+ fun_l28_n701(x)
+ end
+end
+
+def fun_l27_n909(x)
+ if (x < 1)
+ fun_l28_n963(x)
+ else
+ fun_l28_n756(x)
+ end
+end
+
+def fun_l27_n910(x)
+ if (x < 1)
+ fun_l28_n871(x)
+ else
+ fun_l28_n387(x)
+ end
+end
+
+def fun_l27_n911(x)
+ if (x < 1)
+ fun_l28_n779(x)
+ else
+ fun_l28_n862(x)
+ end
+end
+
+def fun_l27_n912(x)
+ if (x < 1)
+ fun_l28_n0(x)
+ else
+ fun_l28_n208(x)
+ end
+end
+
+def fun_l27_n913(x)
+ if (x < 1)
+ fun_l28_n994(x)
+ else
+ fun_l28_n756(x)
+ end
+end
+
+def fun_l27_n914(x)
+ if (x < 1)
+ fun_l28_n950(x)
+ else
+ fun_l28_n770(x)
+ end
+end
+
+def fun_l27_n915(x)
+ if (x < 1)
+ fun_l28_n922(x)
+ else
+ fun_l28_n372(x)
+ end
+end
+
+def fun_l27_n916(x)
+ if (x < 1)
+ fun_l28_n786(x)
+ else
+ fun_l28_n786(x)
+ end
+end
+
+def fun_l27_n917(x)
+ if (x < 1)
+ fun_l28_n745(x)
+ else
+ fun_l28_n822(x)
+ end
+end
+
+def fun_l27_n918(x)
+ if (x < 1)
+ fun_l28_n69(x)
+ else
+ fun_l28_n669(x)
+ end
+end
+
+def fun_l27_n919(x)
+ if (x < 1)
+ fun_l28_n714(x)
+ else
+ fun_l28_n777(x)
+ end
+end
+
+def fun_l27_n920(x)
+ if (x < 1)
+ fun_l28_n934(x)
+ else
+ fun_l28_n392(x)
+ end
+end
+
+def fun_l27_n921(x)
+ if (x < 1)
+ fun_l28_n746(x)
+ else
+ fun_l28_n355(x)
+ end
+end
+
+def fun_l27_n922(x)
+ if (x < 1)
+ fun_l28_n645(x)
+ else
+ fun_l28_n351(x)
+ end
+end
+
+def fun_l27_n923(x)
+ if (x < 1)
+ fun_l28_n48(x)
+ else
+ fun_l28_n826(x)
+ end
+end
+
+def fun_l27_n924(x)
+ if (x < 1)
+ fun_l28_n531(x)
+ else
+ fun_l28_n577(x)
+ end
+end
+
+def fun_l27_n925(x)
+ if (x < 1)
+ fun_l28_n907(x)
+ else
+ fun_l28_n136(x)
+ end
+end
+
+def fun_l27_n926(x)
+ if (x < 1)
+ fun_l28_n256(x)
+ else
+ fun_l28_n527(x)
+ end
+end
+
+def fun_l27_n927(x)
+ if (x < 1)
+ fun_l28_n870(x)
+ else
+ fun_l28_n475(x)
+ end
+end
+
+def fun_l27_n928(x)
+ if (x < 1)
+ fun_l28_n184(x)
+ else
+ fun_l28_n397(x)
+ end
+end
+
+def fun_l27_n929(x)
+ if (x < 1)
+ fun_l28_n99(x)
+ else
+ fun_l28_n363(x)
+ end
+end
+
+def fun_l27_n930(x)
+ if (x < 1)
+ fun_l28_n217(x)
+ else
+ fun_l28_n978(x)
+ end
+end
+
+def fun_l27_n931(x)
+ if (x < 1)
+ fun_l28_n372(x)
+ else
+ fun_l28_n542(x)
+ end
+end
+
+def fun_l27_n932(x)
+ if (x < 1)
+ fun_l28_n337(x)
+ else
+ fun_l28_n150(x)
+ end
+end
+
+def fun_l27_n933(x)
+ if (x < 1)
+ fun_l28_n81(x)
+ else
+ fun_l28_n206(x)
+ end
+end
+
+def fun_l27_n934(x)
+ if (x < 1)
+ fun_l28_n984(x)
+ else
+ fun_l28_n748(x)
+ end
+end
+
+def fun_l27_n935(x)
+ if (x < 1)
+ fun_l28_n746(x)
+ else
+ fun_l28_n824(x)
+ end
+end
+
+def fun_l27_n936(x)
+ if (x < 1)
+ fun_l28_n737(x)
+ else
+ fun_l28_n353(x)
+ end
+end
+
+def fun_l27_n937(x)
+ if (x < 1)
+ fun_l28_n681(x)
+ else
+ fun_l28_n518(x)
+ end
+end
+
+def fun_l27_n938(x)
+ if (x < 1)
+ fun_l28_n401(x)
+ else
+ fun_l28_n99(x)
+ end
+end
+
+def fun_l27_n939(x)
+ if (x < 1)
+ fun_l28_n821(x)
+ else
+ fun_l28_n456(x)
+ end
+end
+
+def fun_l27_n940(x)
+ if (x < 1)
+ fun_l28_n411(x)
+ else
+ fun_l28_n578(x)
+ end
+end
+
+def fun_l27_n941(x)
+ if (x < 1)
+ fun_l28_n318(x)
+ else
+ fun_l28_n479(x)
+ end
+end
+
+def fun_l27_n942(x)
+ if (x < 1)
+ fun_l28_n229(x)
+ else
+ fun_l28_n338(x)
+ end
+end
+
+def fun_l27_n943(x)
+ if (x < 1)
+ fun_l28_n195(x)
+ else
+ fun_l28_n667(x)
+ end
+end
+
+def fun_l27_n944(x)
+ if (x < 1)
+ fun_l28_n256(x)
+ else
+ fun_l28_n309(x)
+ end
+end
+
+def fun_l27_n945(x)
+ if (x < 1)
+ fun_l28_n939(x)
+ else
+ fun_l28_n284(x)
+ end
+end
+
+def fun_l27_n946(x)
+ if (x < 1)
+ fun_l28_n70(x)
+ else
+ fun_l28_n408(x)
+ end
+end
+
+def fun_l27_n947(x)
+ if (x < 1)
+ fun_l28_n586(x)
+ else
+ fun_l28_n931(x)
+ end
+end
+
+def fun_l27_n948(x)
+ if (x < 1)
+ fun_l28_n878(x)
+ else
+ fun_l28_n95(x)
+ end
+end
+
+def fun_l27_n949(x)
+ if (x < 1)
+ fun_l28_n749(x)
+ else
+ fun_l28_n414(x)
+ end
+end
+
+def fun_l27_n950(x)
+ if (x < 1)
+ fun_l28_n913(x)
+ else
+ fun_l28_n933(x)
+ end
+end
+
+def fun_l27_n951(x)
+ if (x < 1)
+ fun_l28_n394(x)
+ else
+ fun_l28_n121(x)
+ end
+end
+
+def fun_l27_n952(x)
+ if (x < 1)
+ fun_l28_n381(x)
+ else
+ fun_l28_n279(x)
+ end
+end
+
+def fun_l27_n953(x)
+ if (x < 1)
+ fun_l28_n302(x)
+ else
+ fun_l28_n710(x)
+ end
+end
+
+def fun_l27_n954(x)
+ if (x < 1)
+ fun_l28_n765(x)
+ else
+ fun_l28_n254(x)
+ end
+end
+
+def fun_l27_n955(x)
+ if (x < 1)
+ fun_l28_n736(x)
+ else
+ fun_l28_n67(x)
+ end
+end
+
+def fun_l27_n956(x)
+ if (x < 1)
+ fun_l28_n61(x)
+ else
+ fun_l28_n873(x)
+ end
+end
+
+def fun_l27_n957(x)
+ if (x < 1)
+ fun_l28_n920(x)
+ else
+ fun_l28_n261(x)
+ end
+end
+
+def fun_l27_n958(x)
+ if (x < 1)
+ fun_l28_n350(x)
+ else
+ fun_l28_n545(x)
+ end
+end
+
+def fun_l27_n959(x)
+ if (x < 1)
+ fun_l28_n538(x)
+ else
+ fun_l28_n829(x)
+ end
+end
+
+def fun_l27_n960(x)
+ if (x < 1)
+ fun_l28_n920(x)
+ else
+ fun_l28_n534(x)
+ end
+end
+
+def fun_l27_n961(x)
+ if (x < 1)
+ fun_l28_n730(x)
+ else
+ fun_l28_n19(x)
+ end
+end
+
+def fun_l27_n962(x)
+ if (x < 1)
+ fun_l28_n293(x)
+ else
+ fun_l28_n187(x)
+ end
+end
+
+def fun_l27_n963(x)
+ if (x < 1)
+ fun_l28_n169(x)
+ else
+ fun_l28_n751(x)
+ end
+end
+
+def fun_l27_n964(x)
+ if (x < 1)
+ fun_l28_n195(x)
+ else
+ fun_l28_n112(x)
+ end
+end
+
+def fun_l27_n965(x)
+ if (x < 1)
+ fun_l28_n756(x)
+ else
+ fun_l28_n700(x)
+ end
+end
+
+def fun_l27_n966(x)
+ if (x < 1)
+ fun_l28_n739(x)
+ else
+ fun_l28_n320(x)
+ end
+end
+
+def fun_l27_n967(x)
+ if (x < 1)
+ fun_l28_n693(x)
+ else
+ fun_l28_n101(x)
+ end
+end
+
+def fun_l27_n968(x)
+ if (x < 1)
+ fun_l28_n94(x)
+ else
+ fun_l28_n131(x)
+ end
+end
+
+def fun_l27_n969(x)
+ if (x < 1)
+ fun_l28_n142(x)
+ else
+ fun_l28_n839(x)
+ end
+end
+
+def fun_l27_n970(x)
+ if (x < 1)
+ fun_l28_n792(x)
+ else
+ fun_l28_n243(x)
+ end
+end
+
+def fun_l27_n971(x)
+ if (x < 1)
+ fun_l28_n268(x)
+ else
+ fun_l28_n525(x)
+ end
+end
+
+def fun_l27_n972(x)
+ if (x < 1)
+ fun_l28_n776(x)
+ else
+ fun_l28_n117(x)
+ end
+end
+
+def fun_l27_n973(x)
+ if (x < 1)
+ fun_l28_n401(x)
+ else
+ fun_l28_n571(x)
+ end
+end
+
+def fun_l27_n974(x)
+ if (x < 1)
+ fun_l28_n515(x)
+ else
+ fun_l28_n5(x)
+ end
+end
+
+def fun_l27_n975(x)
+ if (x < 1)
+ fun_l28_n225(x)
+ else
+ fun_l28_n956(x)
+ end
+end
+
+def fun_l27_n976(x)
+ if (x < 1)
+ fun_l28_n536(x)
+ else
+ fun_l28_n379(x)
+ end
+end
+
+def fun_l27_n977(x)
+ if (x < 1)
+ fun_l28_n942(x)
+ else
+ fun_l28_n665(x)
+ end
+end
+
+def fun_l27_n978(x)
+ if (x < 1)
+ fun_l28_n753(x)
+ else
+ fun_l28_n807(x)
+ end
+end
+
+def fun_l27_n979(x)
+ if (x < 1)
+ fun_l28_n206(x)
+ else
+ fun_l28_n548(x)
+ end
+end
+
+def fun_l27_n980(x)
+ if (x < 1)
+ fun_l28_n149(x)
+ else
+ fun_l28_n126(x)
+ end
+end
+
+def fun_l27_n981(x)
+ if (x < 1)
+ fun_l28_n829(x)
+ else
+ fun_l28_n384(x)
+ end
+end
+
+def fun_l27_n982(x)
+ if (x < 1)
+ fun_l28_n764(x)
+ else
+ fun_l28_n554(x)
+ end
+end
+
+def fun_l27_n983(x)
+ if (x < 1)
+ fun_l28_n868(x)
+ else
+ fun_l28_n933(x)
+ end
+end
+
+def fun_l27_n984(x)
+ if (x < 1)
+ fun_l28_n627(x)
+ else
+ fun_l28_n791(x)
+ end
+end
+
+def fun_l27_n985(x)
+ if (x < 1)
+ fun_l28_n796(x)
+ else
+ fun_l28_n352(x)
+ end
+end
+
+def fun_l27_n986(x)
+ if (x < 1)
+ fun_l28_n213(x)
+ else
+ fun_l28_n282(x)
+ end
+end
+
+def fun_l27_n987(x)
+ if (x < 1)
+ fun_l28_n403(x)
+ else
+ fun_l28_n504(x)
+ end
+end
+
+def fun_l27_n988(x)
+ if (x < 1)
+ fun_l28_n78(x)
+ else
+ fun_l28_n283(x)
+ end
+end
+
+def fun_l27_n989(x)
+ if (x < 1)
+ fun_l28_n364(x)
+ else
+ fun_l28_n802(x)
+ end
+end
+
+def fun_l27_n990(x)
+ if (x < 1)
+ fun_l28_n508(x)
+ else
+ fun_l28_n561(x)
+ end
+end
+
+def fun_l27_n991(x)
+ if (x < 1)
+ fun_l28_n922(x)
+ else
+ fun_l28_n901(x)
+ end
+end
+
+def fun_l27_n992(x)
+ if (x < 1)
+ fun_l28_n103(x)
+ else
+ fun_l28_n275(x)
+ end
+end
+
+def fun_l27_n993(x)
+ if (x < 1)
+ fun_l28_n566(x)
+ else
+ fun_l28_n88(x)
+ end
+end
+
+def fun_l27_n994(x)
+ if (x < 1)
+ fun_l28_n174(x)
+ else
+ fun_l28_n741(x)
+ end
+end
+
+def fun_l27_n995(x)
+ if (x < 1)
+ fun_l28_n40(x)
+ else
+ fun_l28_n426(x)
+ end
+end
+
+def fun_l27_n996(x)
+ if (x < 1)
+ fun_l28_n941(x)
+ else
+ fun_l28_n941(x)
+ end
+end
+
+def fun_l27_n997(x)
+ if (x < 1)
+ fun_l28_n651(x)
+ else
+ fun_l28_n301(x)
+ end
+end
+
+def fun_l27_n998(x)
+ if (x < 1)
+ fun_l28_n789(x)
+ else
+ fun_l28_n720(x)
+ end
+end
+
+def fun_l27_n999(x)
+ if (x < 1)
+ fun_l28_n536(x)
+ else
+ fun_l28_n903(x)
+ end
+end
+
+def fun_l28_n0(x)
+ if (x < 1)
+ fun_l29_n585(x)
+ else
+ fun_l29_n979(x)
+ end
+end
+
+def fun_l28_n1(x)
+ if (x < 1)
+ fun_l29_n182(x)
+ else
+ fun_l29_n513(x)
+ end
+end
+
+def fun_l28_n2(x)
+ if (x < 1)
+ fun_l29_n975(x)
+ else
+ fun_l29_n445(x)
+ end
+end
+
+def fun_l28_n3(x)
+ if (x < 1)
+ fun_l29_n7(x)
+ else
+ fun_l29_n958(x)
+ end
+end
+
+def fun_l28_n4(x)
+ if (x < 1)
+ fun_l29_n751(x)
+ else
+ fun_l29_n426(x)
+ end
+end
+
+def fun_l28_n5(x)
+ if (x < 1)
+ fun_l29_n29(x)
+ else
+ fun_l29_n840(x)
+ end
+end
+
+def fun_l28_n6(x)
+ if (x < 1)
+ fun_l29_n571(x)
+ else
+ fun_l29_n971(x)
+ end
+end
+
+def fun_l28_n7(x)
+ if (x < 1)
+ fun_l29_n384(x)
+ else
+ fun_l29_n495(x)
+ end
+end
+
+def fun_l28_n8(x)
+ if (x < 1)
+ fun_l29_n185(x)
+ else
+ fun_l29_n507(x)
+ end
+end
+
+def fun_l28_n9(x)
+ if (x < 1)
+ fun_l29_n496(x)
+ else
+ fun_l29_n241(x)
+ end
+end
+
+def fun_l28_n10(x)
+ if (x < 1)
+ fun_l29_n494(x)
+ else
+ fun_l29_n473(x)
+ end
+end
+
+def fun_l28_n11(x)
+ if (x < 1)
+ fun_l29_n851(x)
+ else
+ fun_l29_n809(x)
+ end
+end
+
+def fun_l28_n12(x)
+ if (x < 1)
+ fun_l29_n875(x)
+ else
+ fun_l29_n135(x)
+ end
+end
+
+def fun_l28_n13(x)
+ if (x < 1)
+ fun_l29_n957(x)
+ else
+ fun_l29_n337(x)
+ end
+end
+
+def fun_l28_n14(x)
+ if (x < 1)
+ fun_l29_n82(x)
+ else
+ fun_l29_n901(x)
+ end
+end
+
+def fun_l28_n15(x)
+ if (x < 1)
+ fun_l29_n608(x)
+ else
+ fun_l29_n334(x)
+ end
+end
+
+def fun_l28_n16(x)
+ if (x < 1)
+ fun_l29_n772(x)
+ else
+ fun_l29_n912(x)
+ end
+end
+
+def fun_l28_n17(x)
+ if (x < 1)
+ fun_l29_n971(x)
+ else
+ fun_l29_n127(x)
+ end
+end
+
+def fun_l28_n18(x)
+ if (x < 1)
+ fun_l29_n667(x)
+ else
+ fun_l29_n347(x)
+ end
+end
+
+def fun_l28_n19(x)
+ if (x < 1)
+ fun_l29_n453(x)
+ else
+ fun_l29_n39(x)
+ end
+end
+
+def fun_l28_n20(x)
+ if (x < 1)
+ fun_l29_n853(x)
+ else
+ fun_l29_n747(x)
+ end
+end
+
+def fun_l28_n21(x)
+ if (x < 1)
+ fun_l29_n433(x)
+ else
+ fun_l29_n298(x)
+ end
+end
+
+def fun_l28_n22(x)
+ if (x < 1)
+ fun_l29_n94(x)
+ else
+ fun_l29_n307(x)
+ end
+end
+
+def fun_l28_n23(x)
+ if (x < 1)
+ fun_l29_n424(x)
+ else
+ fun_l29_n599(x)
+ end
+end
+
+def fun_l28_n24(x)
+ if (x < 1)
+ fun_l29_n986(x)
+ else
+ fun_l29_n232(x)
+ end
+end
+
+def fun_l28_n25(x)
+ if (x < 1)
+ fun_l29_n658(x)
+ else
+ fun_l29_n744(x)
+ end
+end
+
+def fun_l28_n26(x)
+ if (x < 1)
+ fun_l29_n151(x)
+ else
+ fun_l29_n855(x)
+ end
+end
+
+def fun_l28_n27(x)
+ if (x < 1)
+ fun_l29_n416(x)
+ else
+ fun_l29_n763(x)
+ end
+end
+
+def fun_l28_n28(x)
+ if (x < 1)
+ fun_l29_n489(x)
+ else
+ fun_l29_n55(x)
+ end
+end
+
+def fun_l28_n29(x)
+ if (x < 1)
+ fun_l29_n714(x)
+ else
+ fun_l29_n489(x)
+ end
+end
+
+def fun_l28_n30(x)
+ if (x < 1)
+ fun_l29_n328(x)
+ else
+ fun_l29_n476(x)
+ end
+end
+
+def fun_l28_n31(x)
+ if (x < 1)
+ fun_l29_n317(x)
+ else
+ fun_l29_n836(x)
+ end
+end
+
+def fun_l28_n32(x)
+ if (x < 1)
+ fun_l29_n970(x)
+ else
+ fun_l29_n48(x)
+ end
+end
+
+def fun_l28_n33(x)
+ if (x < 1)
+ fun_l29_n159(x)
+ else
+ fun_l29_n449(x)
+ end
+end
+
+def fun_l28_n34(x)
+ if (x < 1)
+ fun_l29_n80(x)
+ else
+ fun_l29_n994(x)
+ end
+end
+
+def fun_l28_n35(x)
+ if (x < 1)
+ fun_l29_n413(x)
+ else
+ fun_l29_n718(x)
+ end
+end
+
+def fun_l28_n36(x)
+ if (x < 1)
+ fun_l29_n196(x)
+ else
+ fun_l29_n713(x)
+ end
+end
+
+def fun_l28_n37(x)
+ if (x < 1)
+ fun_l29_n815(x)
+ else
+ fun_l29_n595(x)
+ end
+end
+
+def fun_l28_n38(x)
+ if (x < 1)
+ fun_l29_n862(x)
+ else
+ fun_l29_n546(x)
+ end
+end
+
+def fun_l28_n39(x)
+ if (x < 1)
+ fun_l29_n875(x)
+ else
+ fun_l29_n456(x)
+ end
+end
+
+def fun_l28_n40(x)
+ if (x < 1)
+ fun_l29_n424(x)
+ else
+ fun_l29_n445(x)
+ end
+end
+
+def fun_l28_n41(x)
+ if (x < 1)
+ fun_l29_n743(x)
+ else
+ fun_l29_n498(x)
+ end
+end
+
+def fun_l28_n42(x)
+ if (x < 1)
+ fun_l29_n950(x)
+ else
+ fun_l29_n497(x)
+ end
+end
+
+def fun_l28_n43(x)
+ if (x < 1)
+ fun_l29_n792(x)
+ else
+ fun_l29_n487(x)
+ end
+end
+
+def fun_l28_n44(x)
+ if (x < 1)
+ fun_l29_n421(x)
+ else
+ fun_l29_n484(x)
+ end
+end
+
+def fun_l28_n45(x)
+ if (x < 1)
+ fun_l29_n862(x)
+ else
+ fun_l29_n824(x)
+ end
+end
+
+def fun_l28_n46(x)
+ if (x < 1)
+ fun_l29_n163(x)
+ else
+ fun_l29_n184(x)
+ end
+end
+
+def fun_l28_n47(x)
+ if (x < 1)
+ fun_l29_n374(x)
+ else
+ fun_l29_n954(x)
+ end
+end
+
+def fun_l28_n48(x)
+ if (x < 1)
+ fun_l29_n422(x)
+ else
+ fun_l29_n223(x)
+ end
+end
+
+def fun_l28_n49(x)
+ if (x < 1)
+ fun_l29_n885(x)
+ else
+ fun_l29_n527(x)
+ end
+end
+
+def fun_l28_n50(x)
+ if (x < 1)
+ fun_l29_n694(x)
+ else
+ fun_l29_n702(x)
+ end
+end
+
+def fun_l28_n51(x)
+ if (x < 1)
+ fun_l29_n273(x)
+ else
+ fun_l29_n504(x)
+ end
+end
+
+def fun_l28_n52(x)
+ if (x < 1)
+ fun_l29_n330(x)
+ else
+ fun_l29_n267(x)
+ end
+end
+
+def fun_l28_n53(x)
+ if (x < 1)
+ fun_l29_n103(x)
+ else
+ fun_l29_n407(x)
+ end
+end
+
+def fun_l28_n54(x)
+ if (x < 1)
+ fun_l29_n210(x)
+ else
+ fun_l29_n645(x)
+ end
+end
+
+def fun_l28_n55(x)
+ if (x < 1)
+ fun_l29_n871(x)
+ else
+ fun_l29_n641(x)
+ end
+end
+
+def fun_l28_n56(x)
+ if (x < 1)
+ fun_l29_n233(x)
+ else
+ fun_l29_n715(x)
+ end
+end
+
+def fun_l28_n57(x)
+ if (x < 1)
+ fun_l29_n742(x)
+ else
+ fun_l29_n104(x)
+ end
+end
+
+def fun_l28_n58(x)
+ if (x < 1)
+ fun_l29_n713(x)
+ else
+ fun_l29_n919(x)
+ end
+end
+
+def fun_l28_n59(x)
+ if (x < 1)
+ fun_l29_n192(x)
+ else
+ fun_l29_n988(x)
+ end
+end
+
+def fun_l28_n60(x)
+ if (x < 1)
+ fun_l29_n533(x)
+ else
+ fun_l29_n972(x)
+ end
+end
+
+def fun_l28_n61(x)
+ if (x < 1)
+ fun_l29_n286(x)
+ else
+ fun_l29_n129(x)
+ end
+end
+
+def fun_l28_n62(x)
+ if (x < 1)
+ fun_l29_n208(x)
+ else
+ fun_l29_n715(x)
+ end
+end
+
+def fun_l28_n63(x)
+ if (x < 1)
+ fun_l29_n588(x)
+ else
+ fun_l29_n975(x)
+ end
+end
+
+def fun_l28_n64(x)
+ if (x < 1)
+ fun_l29_n202(x)
+ else
+ fun_l29_n784(x)
+ end
+end
+
+def fun_l28_n65(x)
+ if (x < 1)
+ fun_l29_n531(x)
+ else
+ fun_l29_n758(x)
+ end
+end
+
+def fun_l28_n66(x)
+ if (x < 1)
+ fun_l29_n102(x)
+ else
+ fun_l29_n23(x)
+ end
+end
+
+def fun_l28_n67(x)
+ if (x < 1)
+ fun_l29_n546(x)
+ else
+ fun_l29_n964(x)
+ end
+end
+
+def fun_l28_n68(x)
+ if (x < 1)
+ fun_l29_n31(x)
+ else
+ fun_l29_n223(x)
+ end
+end
+
+def fun_l28_n69(x)
+ if (x < 1)
+ fun_l29_n344(x)
+ else
+ fun_l29_n250(x)
+ end
+end
+
+def fun_l28_n70(x)
+ if (x < 1)
+ fun_l29_n910(x)
+ else
+ fun_l29_n880(x)
+ end
+end
+
+def fun_l28_n71(x)
+ if (x < 1)
+ fun_l29_n181(x)
+ else
+ fun_l29_n950(x)
+ end
+end
+
+def fun_l28_n72(x)
+ if (x < 1)
+ fun_l29_n405(x)
+ else
+ fun_l29_n105(x)
+ end
+end
+
+def fun_l28_n73(x)
+ if (x < 1)
+ fun_l29_n419(x)
+ else
+ fun_l29_n120(x)
+ end
+end
+
+def fun_l28_n74(x)
+ if (x < 1)
+ fun_l29_n485(x)
+ else
+ fun_l29_n616(x)
+ end
+end
+
+def fun_l28_n75(x)
+ if (x < 1)
+ fun_l29_n690(x)
+ else
+ fun_l29_n581(x)
+ end
+end
+
+def fun_l28_n76(x)
+ if (x < 1)
+ fun_l29_n68(x)
+ else
+ fun_l29_n47(x)
+ end
+end
+
+def fun_l28_n77(x)
+ if (x < 1)
+ fun_l29_n324(x)
+ else
+ fun_l29_n102(x)
+ end
+end
+
+def fun_l28_n78(x)
+ if (x < 1)
+ fun_l29_n416(x)
+ else
+ fun_l29_n965(x)
+ end
+end
+
+def fun_l28_n79(x)
+ if (x < 1)
+ fun_l29_n584(x)
+ else
+ fun_l29_n901(x)
+ end
+end
+
+def fun_l28_n80(x)
+ if (x < 1)
+ fun_l29_n914(x)
+ else
+ fun_l29_n890(x)
+ end
+end
+
+def fun_l28_n81(x)
+ if (x < 1)
+ fun_l29_n85(x)
+ else
+ fun_l29_n822(x)
+ end
+end
+
+def fun_l28_n82(x)
+ if (x < 1)
+ fun_l29_n311(x)
+ else
+ fun_l29_n621(x)
+ end
+end
+
+def fun_l28_n83(x)
+ if (x < 1)
+ fun_l29_n361(x)
+ else
+ fun_l29_n336(x)
+ end
+end
+
+def fun_l28_n84(x)
+ if (x < 1)
+ fun_l29_n642(x)
+ else
+ fun_l29_n495(x)
+ end
+end
+
+def fun_l28_n85(x)
+ if (x < 1)
+ fun_l29_n688(x)
+ else
+ fun_l29_n20(x)
+ end
+end
+
+def fun_l28_n86(x)
+ if (x < 1)
+ fun_l29_n805(x)
+ else
+ fun_l29_n363(x)
+ end
+end
+
+def fun_l28_n87(x)
+ if (x < 1)
+ fun_l29_n215(x)
+ else
+ fun_l29_n530(x)
+ end
+end
+
+def fun_l28_n88(x)
+ if (x < 1)
+ fun_l29_n355(x)
+ else
+ fun_l29_n820(x)
+ end
+end
+
+def fun_l28_n89(x)
+ if (x < 1)
+ fun_l29_n593(x)
+ else
+ fun_l29_n443(x)
+ end
+end
+
+def fun_l28_n90(x)
+ if (x < 1)
+ fun_l29_n917(x)
+ else
+ fun_l29_n920(x)
+ end
+end
+
+def fun_l28_n91(x)
+ if (x < 1)
+ fun_l29_n571(x)
+ else
+ fun_l29_n545(x)
+ end
+end
+
+def fun_l28_n92(x)
+ if (x < 1)
+ fun_l29_n871(x)
+ else
+ fun_l29_n497(x)
+ end
+end
+
+def fun_l28_n93(x)
+ if (x < 1)
+ fun_l29_n433(x)
+ else
+ fun_l29_n899(x)
+ end
+end
+
+def fun_l28_n94(x)
+ if (x < 1)
+ fun_l29_n139(x)
+ else
+ fun_l29_n836(x)
+ end
+end
+
+def fun_l28_n95(x)
+ if (x < 1)
+ fun_l29_n265(x)
+ else
+ fun_l29_n297(x)
+ end
+end
+
+def fun_l28_n96(x)
+ if (x < 1)
+ fun_l29_n554(x)
+ else
+ fun_l29_n345(x)
+ end
+end
+
+def fun_l28_n97(x)
+ if (x < 1)
+ fun_l29_n674(x)
+ else
+ fun_l29_n632(x)
+ end
+end
+
+def fun_l28_n98(x)
+ if (x < 1)
+ fun_l29_n287(x)
+ else
+ fun_l29_n606(x)
+ end
+end
+
+def fun_l28_n99(x)
+ if (x < 1)
+ fun_l29_n288(x)
+ else
+ fun_l29_n751(x)
+ end
+end
+
+def fun_l28_n100(x)
+ if (x < 1)
+ fun_l29_n673(x)
+ else
+ fun_l29_n461(x)
+ end
+end
+
+def fun_l28_n101(x)
+ if (x < 1)
+ fun_l29_n633(x)
+ else
+ fun_l29_n688(x)
+ end
+end
+
+def fun_l28_n102(x)
+ if (x < 1)
+ fun_l29_n487(x)
+ else
+ fun_l29_n879(x)
+ end
+end
+
+def fun_l28_n103(x)
+ if (x < 1)
+ fun_l29_n12(x)
+ else
+ fun_l29_n808(x)
+ end
+end
+
+def fun_l28_n104(x)
+ if (x < 1)
+ fun_l29_n560(x)
+ else
+ fun_l29_n174(x)
+ end
+end
+
+def fun_l28_n105(x)
+ if (x < 1)
+ fun_l29_n379(x)
+ else
+ fun_l29_n509(x)
+ end
+end
+
+def fun_l28_n106(x)
+ if (x < 1)
+ fun_l29_n848(x)
+ else
+ fun_l29_n783(x)
+ end
+end
+
+def fun_l28_n107(x)
+ if (x < 1)
+ fun_l29_n564(x)
+ else
+ fun_l29_n584(x)
+ end
+end
+
+def fun_l28_n108(x)
+ if (x < 1)
+ fun_l29_n251(x)
+ else
+ fun_l29_n77(x)
+ end
+end
+
+def fun_l28_n109(x)
+ if (x < 1)
+ fun_l29_n588(x)
+ else
+ fun_l29_n351(x)
+ end
+end
+
+def fun_l28_n110(x)
+ if (x < 1)
+ fun_l29_n43(x)
+ else
+ fun_l29_n102(x)
+ end
+end
+
+def fun_l28_n111(x)
+ if (x < 1)
+ fun_l29_n33(x)
+ else
+ fun_l29_n168(x)
+ end
+end
+
+def fun_l28_n112(x)
+ if (x < 1)
+ fun_l29_n977(x)
+ else
+ fun_l29_n832(x)
+ end
+end
+
+def fun_l28_n113(x)
+ if (x < 1)
+ fun_l29_n189(x)
+ else
+ fun_l29_n657(x)
+ end
+end
+
+def fun_l28_n114(x)
+ if (x < 1)
+ fun_l29_n833(x)
+ else
+ fun_l29_n237(x)
+ end
+end
+
+def fun_l28_n115(x)
+ if (x < 1)
+ fun_l29_n621(x)
+ else
+ fun_l29_n675(x)
+ end
+end
+
+def fun_l28_n116(x)
+ if (x < 1)
+ fun_l29_n944(x)
+ else
+ fun_l29_n469(x)
+ end
+end
+
+def fun_l28_n117(x)
+ if (x < 1)
+ fun_l29_n2(x)
+ else
+ fun_l29_n959(x)
+ end
+end
+
+def fun_l28_n118(x)
+ if (x < 1)
+ fun_l29_n260(x)
+ else
+ fun_l29_n580(x)
+ end
+end
+
+def fun_l28_n119(x)
+ if (x < 1)
+ fun_l29_n464(x)
+ else
+ fun_l29_n411(x)
+ end
+end
+
+def fun_l28_n120(x)
+ if (x < 1)
+ fun_l29_n973(x)
+ else
+ fun_l29_n837(x)
+ end
+end
+
+def fun_l28_n121(x)
+ if (x < 1)
+ fun_l29_n511(x)
+ else
+ fun_l29_n896(x)
+ end
+end
+
+def fun_l28_n122(x)
+ if (x < 1)
+ fun_l29_n621(x)
+ else
+ fun_l29_n952(x)
+ end
+end
+
+def fun_l28_n123(x)
+ if (x < 1)
+ fun_l29_n250(x)
+ else
+ fun_l29_n551(x)
+ end
+end
+
+def fun_l28_n124(x)
+ if (x < 1)
+ fun_l29_n761(x)
+ else
+ fun_l29_n659(x)
+ end
+end
+
+def fun_l28_n125(x)
+ if (x < 1)
+ fun_l29_n43(x)
+ else
+ fun_l29_n265(x)
+ end
+end
+
+def fun_l28_n126(x)
+ if (x < 1)
+ fun_l29_n794(x)
+ else
+ fun_l29_n953(x)
+ end
+end
+
+def fun_l28_n127(x)
+ if (x < 1)
+ fun_l29_n858(x)
+ else
+ fun_l29_n582(x)
+ end
+end
+
+def fun_l28_n128(x)
+ if (x < 1)
+ fun_l29_n762(x)
+ else
+ fun_l29_n710(x)
+ end
+end
+
+def fun_l28_n129(x)
+ if (x < 1)
+ fun_l29_n541(x)
+ else
+ fun_l29_n182(x)
+ end
+end
+
+def fun_l28_n130(x)
+ if (x < 1)
+ fun_l29_n325(x)
+ else
+ fun_l29_n318(x)
+ end
+end
+
+def fun_l28_n131(x)
+ if (x < 1)
+ fun_l29_n751(x)
+ else
+ fun_l29_n499(x)
+ end
+end
+
+def fun_l28_n132(x)
+ if (x < 1)
+ fun_l29_n185(x)
+ else
+ fun_l29_n547(x)
+ end
+end
+
+def fun_l28_n133(x)
+ if (x < 1)
+ fun_l29_n155(x)
+ else
+ fun_l29_n691(x)
+ end
+end
+
+def fun_l28_n134(x)
+ if (x < 1)
+ fun_l29_n326(x)
+ else
+ fun_l29_n950(x)
+ end
+end
+
+def fun_l28_n135(x)
+ if (x < 1)
+ fun_l29_n782(x)
+ else
+ fun_l29_n968(x)
+ end
+end
+
+def fun_l28_n136(x)
+ if (x < 1)
+ fun_l29_n349(x)
+ else
+ fun_l29_n668(x)
+ end
+end
+
+def fun_l28_n137(x)
+ if (x < 1)
+ fun_l29_n897(x)
+ else
+ fun_l29_n243(x)
+ end
+end
+
+def fun_l28_n138(x)
+ if (x < 1)
+ fun_l29_n994(x)
+ else
+ fun_l29_n84(x)
+ end
+end
+
+def fun_l28_n139(x)
+ if (x < 1)
+ fun_l29_n95(x)
+ else
+ fun_l29_n705(x)
+ end
+end
+
+def fun_l28_n140(x)
+ if (x < 1)
+ fun_l29_n864(x)
+ else
+ fun_l29_n636(x)
+ end
+end
+
+def fun_l28_n141(x)
+ if (x < 1)
+ fun_l29_n587(x)
+ else
+ fun_l29_n908(x)
+ end
+end
+
+def fun_l28_n142(x)
+ if (x < 1)
+ fun_l29_n255(x)
+ else
+ fun_l29_n633(x)
+ end
+end
+
+def fun_l28_n143(x)
+ if (x < 1)
+ fun_l29_n142(x)
+ else
+ fun_l29_n305(x)
+ end
+end
+
+def fun_l28_n144(x)
+ if (x < 1)
+ fun_l29_n735(x)
+ else
+ fun_l29_n637(x)
+ end
+end
+
+def fun_l28_n145(x)
+ if (x < 1)
+ fun_l29_n637(x)
+ else
+ fun_l29_n975(x)
+ end
+end
+
+def fun_l28_n146(x)
+ if (x < 1)
+ fun_l29_n560(x)
+ else
+ fun_l29_n534(x)
+ end
+end
+
+def fun_l28_n147(x)
+ if (x < 1)
+ fun_l29_n829(x)
+ else
+ fun_l29_n344(x)
+ end
+end
+
+def fun_l28_n148(x)
+ if (x < 1)
+ fun_l29_n38(x)
+ else
+ fun_l29_n339(x)
+ end
+end
+
+def fun_l28_n149(x)
+ if (x < 1)
+ fun_l29_n178(x)
+ else
+ fun_l29_n178(x)
+ end
+end
+
+def fun_l28_n150(x)
+ if (x < 1)
+ fun_l29_n434(x)
+ else
+ fun_l29_n677(x)
+ end
+end
+
+def fun_l28_n151(x)
+ if (x < 1)
+ fun_l29_n910(x)
+ else
+ fun_l29_n230(x)
+ end
+end
+
+def fun_l28_n152(x)
+ if (x < 1)
+ fun_l29_n750(x)
+ else
+ fun_l29_n534(x)
+ end
+end
+
+def fun_l28_n153(x)
+ if (x < 1)
+ fun_l29_n550(x)
+ else
+ fun_l29_n757(x)
+ end
+end
+
+def fun_l28_n154(x)
+ if (x < 1)
+ fun_l29_n832(x)
+ else
+ fun_l29_n177(x)
+ end
+end
+
+def fun_l28_n155(x)
+ if (x < 1)
+ fun_l29_n724(x)
+ else
+ fun_l29_n669(x)
+ end
+end
+
+def fun_l28_n156(x)
+ if (x < 1)
+ fun_l29_n362(x)
+ else
+ fun_l29_n882(x)
+ end
+end
+
+def fun_l28_n157(x)
+ if (x < 1)
+ fun_l29_n164(x)
+ else
+ fun_l29_n919(x)
+ end
+end
+
+def fun_l28_n158(x)
+ if (x < 1)
+ fun_l29_n300(x)
+ else
+ fun_l29_n343(x)
+ end
+end
+
+def fun_l28_n159(x)
+ if (x < 1)
+ fun_l29_n395(x)
+ else
+ fun_l29_n535(x)
+ end
+end
+
+def fun_l28_n160(x)
+ if (x < 1)
+ fun_l29_n127(x)
+ else
+ fun_l29_n666(x)
+ end
+end
+
+def fun_l28_n161(x)
+ if (x < 1)
+ fun_l29_n207(x)
+ else
+ fun_l29_n935(x)
+ end
+end
+
+def fun_l28_n162(x)
+ if (x < 1)
+ fun_l29_n865(x)
+ else
+ fun_l29_n692(x)
+ end
+end
+
+def fun_l28_n163(x)
+ if (x < 1)
+ fun_l29_n429(x)
+ else
+ fun_l29_n329(x)
+ end
+end
+
+def fun_l28_n164(x)
+ if (x < 1)
+ fun_l29_n874(x)
+ else
+ fun_l29_n650(x)
+ end
+end
+
+def fun_l28_n165(x)
+ if (x < 1)
+ fun_l29_n985(x)
+ else
+ fun_l29_n488(x)
+ end
+end
+
+def fun_l28_n166(x)
+ if (x < 1)
+ fun_l29_n425(x)
+ else
+ fun_l29_n297(x)
+ end
+end
+
+def fun_l28_n167(x)
+ if (x < 1)
+ fun_l29_n468(x)
+ else
+ fun_l29_n331(x)
+ end
+end
+
+def fun_l28_n168(x)
+ if (x < 1)
+ fun_l29_n991(x)
+ else
+ fun_l29_n399(x)
+ end
+end
+
+def fun_l28_n169(x)
+ if (x < 1)
+ fun_l29_n402(x)
+ else
+ fun_l29_n931(x)
+ end
+end
+
+def fun_l28_n170(x)
+ if (x < 1)
+ fun_l29_n984(x)
+ else
+ fun_l29_n586(x)
+ end
+end
+
+def fun_l28_n171(x)
+ if (x < 1)
+ fun_l29_n305(x)
+ else
+ fun_l29_n638(x)
+ end
+end
+
+def fun_l28_n172(x)
+ if (x < 1)
+ fun_l29_n251(x)
+ else
+ fun_l29_n94(x)
+ end
+end
+
+def fun_l28_n173(x)
+ if (x < 1)
+ fun_l29_n225(x)
+ else
+ fun_l29_n466(x)
+ end
+end
+
+def fun_l28_n174(x)
+ if (x < 1)
+ fun_l29_n643(x)
+ else
+ fun_l29_n974(x)
+ end
+end
+
+def fun_l28_n175(x)
+ if (x < 1)
+ fun_l29_n634(x)
+ else
+ fun_l29_n321(x)
+ end
+end
+
+def fun_l28_n176(x)
+ if (x < 1)
+ fun_l29_n269(x)
+ else
+ fun_l29_n237(x)
+ end
+end
+
+def fun_l28_n177(x)
+ if (x < 1)
+ fun_l29_n649(x)
+ else
+ fun_l29_n661(x)
+ end
+end
+
+def fun_l28_n178(x)
+ if (x < 1)
+ fun_l29_n919(x)
+ else
+ fun_l29_n997(x)
+ end
+end
+
+def fun_l28_n179(x)
+ if (x < 1)
+ fun_l29_n634(x)
+ else
+ fun_l29_n967(x)
+ end
+end
+
+def fun_l28_n180(x)
+ if (x < 1)
+ fun_l29_n798(x)
+ else
+ fun_l29_n733(x)
+ end
+end
+
+def fun_l28_n181(x)
+ if (x < 1)
+ fun_l29_n975(x)
+ else
+ fun_l29_n28(x)
+ end
+end
+
+def fun_l28_n182(x)
+ if (x < 1)
+ fun_l29_n973(x)
+ else
+ fun_l29_n616(x)
+ end
+end
+
+def fun_l28_n183(x)
+ if (x < 1)
+ fun_l29_n360(x)
+ else
+ fun_l29_n18(x)
+ end
+end
+
+def fun_l28_n184(x)
+ if (x < 1)
+ fun_l29_n281(x)
+ else
+ fun_l29_n271(x)
+ end
+end
+
+def fun_l28_n185(x)
+ if (x < 1)
+ fun_l29_n216(x)
+ else
+ fun_l29_n193(x)
+ end
+end
+
+def fun_l28_n186(x)
+ if (x < 1)
+ fun_l29_n262(x)
+ else
+ fun_l29_n509(x)
+ end
+end
+
+def fun_l28_n187(x)
+ if (x < 1)
+ fun_l29_n160(x)
+ else
+ fun_l29_n770(x)
+ end
+end
+
+def fun_l28_n188(x)
+ if (x < 1)
+ fun_l29_n411(x)
+ else
+ fun_l29_n605(x)
+ end
+end
+
+def fun_l28_n189(x)
+ if (x < 1)
+ fun_l29_n397(x)
+ else
+ fun_l29_n205(x)
+ end
+end
+
+def fun_l28_n190(x)
+ if (x < 1)
+ fun_l29_n529(x)
+ else
+ fun_l29_n545(x)
+ end
+end
+
+def fun_l28_n191(x)
+ if (x < 1)
+ fun_l29_n528(x)
+ else
+ fun_l29_n472(x)
+ end
+end
+
+def fun_l28_n192(x)
+ if (x < 1)
+ fun_l29_n843(x)
+ else
+ fun_l29_n88(x)
+ end
+end
+
+def fun_l28_n193(x)
+ if (x < 1)
+ fun_l29_n827(x)
+ else
+ fun_l29_n6(x)
+ end
+end
+
+def fun_l28_n194(x)
+ if (x < 1)
+ fun_l29_n567(x)
+ else
+ fun_l29_n622(x)
+ end
+end
+
+def fun_l28_n195(x)
+ if (x < 1)
+ fun_l29_n799(x)
+ else
+ fun_l29_n605(x)
+ end
+end
+
+def fun_l28_n196(x)
+ if (x < 1)
+ fun_l29_n930(x)
+ else
+ fun_l29_n643(x)
+ end
+end
+
+def fun_l28_n197(x)
+ if (x < 1)
+ fun_l29_n445(x)
+ else
+ fun_l29_n226(x)
+ end
+end
+
+def fun_l28_n198(x)
+ if (x < 1)
+ fun_l29_n453(x)
+ else
+ fun_l29_n941(x)
+ end
+end
+
+def fun_l28_n199(x)
+ if (x < 1)
+ fun_l29_n40(x)
+ else
+ fun_l29_n602(x)
+ end
+end
+
+def fun_l28_n200(x)
+ if (x < 1)
+ fun_l29_n804(x)
+ else
+ fun_l29_n355(x)
+ end
+end
+
+def fun_l28_n201(x)
+ if (x < 1)
+ fun_l29_n894(x)
+ else
+ fun_l29_n749(x)
+ end
+end
+
+def fun_l28_n202(x)
+ if (x < 1)
+ fun_l29_n105(x)
+ else
+ fun_l29_n182(x)
+ end
+end
+
+def fun_l28_n203(x)
+ if (x < 1)
+ fun_l29_n106(x)
+ else
+ fun_l29_n670(x)
+ end
+end
+
+def fun_l28_n204(x)
+ if (x < 1)
+ fun_l29_n897(x)
+ else
+ fun_l29_n337(x)
+ end
+end
+
+def fun_l28_n205(x)
+ if (x < 1)
+ fun_l29_n149(x)
+ else
+ fun_l29_n822(x)
+ end
+end
+
+def fun_l28_n206(x)
+ if (x < 1)
+ fun_l29_n2(x)
+ else
+ fun_l29_n370(x)
+ end
+end
+
+def fun_l28_n207(x)
+ if (x < 1)
+ fun_l29_n430(x)
+ else
+ fun_l29_n262(x)
+ end
+end
+
+def fun_l28_n208(x)
+ if (x < 1)
+ fun_l29_n275(x)
+ else
+ fun_l29_n156(x)
+ end
+end
+
+def fun_l28_n209(x)
+ if (x < 1)
+ fun_l29_n677(x)
+ else
+ fun_l29_n620(x)
+ end
+end
+
+def fun_l28_n210(x)
+ if (x < 1)
+ fun_l29_n732(x)
+ else
+ fun_l29_n533(x)
+ end
+end
+
+def fun_l28_n211(x)
+ if (x < 1)
+ fun_l29_n934(x)
+ else
+ fun_l29_n334(x)
+ end
+end
+
+def fun_l28_n212(x)
+ if (x < 1)
+ fun_l29_n656(x)
+ else
+ fun_l29_n889(x)
+ end
+end
+
+def fun_l28_n213(x)
+ if (x < 1)
+ fun_l29_n210(x)
+ else
+ fun_l29_n225(x)
+ end
+end
+
+def fun_l28_n214(x)
+ if (x < 1)
+ fun_l29_n496(x)
+ else
+ fun_l29_n901(x)
+ end
+end
+
+def fun_l28_n215(x)
+ if (x < 1)
+ fun_l29_n190(x)
+ else
+ fun_l29_n254(x)
+ end
+end
+
+def fun_l28_n216(x)
+ if (x < 1)
+ fun_l29_n708(x)
+ else
+ fun_l29_n680(x)
+ end
+end
+
+def fun_l28_n217(x)
+ if (x < 1)
+ fun_l29_n616(x)
+ else
+ fun_l29_n942(x)
+ end
+end
+
+def fun_l28_n218(x)
+ if (x < 1)
+ fun_l29_n515(x)
+ else
+ fun_l29_n269(x)
+ end
+end
+
+def fun_l28_n219(x)
+ if (x < 1)
+ fun_l29_n422(x)
+ else
+ fun_l29_n644(x)
+ end
+end
+
+def fun_l28_n220(x)
+ if (x < 1)
+ fun_l29_n114(x)
+ else
+ fun_l29_n566(x)
+ end
+end
+
+def fun_l28_n221(x)
+ if (x < 1)
+ fun_l29_n750(x)
+ else
+ fun_l29_n799(x)
+ end
+end
+
+def fun_l28_n222(x)
+ if (x < 1)
+ fun_l29_n121(x)
+ else
+ fun_l29_n556(x)
+ end
+end
+
+def fun_l28_n223(x)
+ if (x < 1)
+ fun_l29_n161(x)
+ else
+ fun_l29_n422(x)
+ end
+end
+
+def fun_l28_n224(x)
+ if (x < 1)
+ fun_l29_n779(x)
+ else
+ fun_l29_n214(x)
+ end
+end
+
+def fun_l28_n225(x)
+ if (x < 1)
+ fun_l29_n355(x)
+ else
+ fun_l29_n10(x)
+ end
+end
+
+def fun_l28_n226(x)
+ if (x < 1)
+ fun_l29_n923(x)
+ else
+ fun_l29_n672(x)
+ end
+end
+
+def fun_l28_n227(x)
+ if (x < 1)
+ fun_l29_n578(x)
+ else
+ fun_l29_n809(x)
+ end
+end
+
+def fun_l28_n228(x)
+ if (x < 1)
+ fun_l29_n277(x)
+ else
+ fun_l29_n979(x)
+ end
+end
+
+def fun_l28_n229(x)
+ if (x < 1)
+ fun_l29_n248(x)
+ else
+ fun_l29_n731(x)
+ end
+end
+
+def fun_l28_n230(x)
+ if (x < 1)
+ fun_l29_n374(x)
+ else
+ fun_l29_n675(x)
+ end
+end
+
+def fun_l28_n231(x)
+ if (x < 1)
+ fun_l29_n339(x)
+ else
+ fun_l29_n62(x)
+ end
+end
+
+def fun_l28_n232(x)
+ if (x < 1)
+ fun_l29_n350(x)
+ else
+ fun_l29_n51(x)
+ end
+end
+
+def fun_l28_n233(x)
+ if (x < 1)
+ fun_l29_n606(x)
+ else
+ fun_l29_n460(x)
+ end
+end
+
+def fun_l28_n234(x)
+ if (x < 1)
+ fun_l29_n266(x)
+ else
+ fun_l29_n843(x)
+ end
+end
+
+def fun_l28_n235(x)
+ if (x < 1)
+ fun_l29_n762(x)
+ else
+ fun_l29_n1(x)
+ end
+end
+
+def fun_l28_n236(x)
+ if (x < 1)
+ fun_l29_n405(x)
+ else
+ fun_l29_n867(x)
+ end
+end
+
+def fun_l28_n237(x)
+ if (x < 1)
+ fun_l29_n62(x)
+ else
+ fun_l29_n288(x)
+ end
+end
+
+def fun_l28_n238(x)
+ if (x < 1)
+ fun_l29_n120(x)
+ else
+ fun_l29_n346(x)
+ end
+end
+
+def fun_l28_n239(x)
+ if (x < 1)
+ fun_l29_n789(x)
+ else
+ fun_l29_n633(x)
+ end
+end
+
+def fun_l28_n240(x)
+ if (x < 1)
+ fun_l29_n467(x)
+ else
+ fun_l29_n150(x)
+ end
+end
+
+def fun_l28_n241(x)
+ if (x < 1)
+ fun_l29_n487(x)
+ else
+ fun_l29_n671(x)
+ end
+end
+
+def fun_l28_n242(x)
+ if (x < 1)
+ fun_l29_n147(x)
+ else
+ fun_l29_n636(x)
+ end
+end
+
+def fun_l28_n243(x)
+ if (x < 1)
+ fun_l29_n710(x)
+ else
+ fun_l29_n196(x)
+ end
+end
+
+def fun_l28_n244(x)
+ if (x < 1)
+ fun_l29_n943(x)
+ else
+ fun_l29_n768(x)
+ end
+end
+
+def fun_l28_n245(x)
+ if (x < 1)
+ fun_l29_n670(x)
+ else
+ fun_l29_n522(x)
+ end
+end
+
+def fun_l28_n246(x)
+ if (x < 1)
+ fun_l29_n12(x)
+ else
+ fun_l29_n459(x)
+ end
+end
+
+def fun_l28_n247(x)
+ if (x < 1)
+ fun_l29_n901(x)
+ else
+ fun_l29_n726(x)
+ end
+end
+
+def fun_l28_n248(x)
+ if (x < 1)
+ fun_l29_n824(x)
+ else
+ fun_l29_n327(x)
+ end
+end
+
+def fun_l28_n249(x)
+ if (x < 1)
+ fun_l29_n327(x)
+ else
+ fun_l29_n343(x)
+ end
+end
+
+def fun_l28_n250(x)
+ if (x < 1)
+ fun_l29_n242(x)
+ else
+ fun_l29_n764(x)
+ end
+end
+
+def fun_l28_n251(x)
+ if (x < 1)
+ fun_l29_n780(x)
+ else
+ fun_l29_n117(x)
+ end
+end
+
+def fun_l28_n252(x)
+ if (x < 1)
+ fun_l29_n309(x)
+ else
+ fun_l29_n821(x)
+ end
+end
+
+def fun_l28_n253(x)
+ if (x < 1)
+ fun_l29_n250(x)
+ else
+ fun_l29_n933(x)
+ end
+end
+
+def fun_l28_n254(x)
+ if (x < 1)
+ fun_l29_n470(x)
+ else
+ fun_l29_n808(x)
+ end
+end
+
+def fun_l28_n255(x)
+ if (x < 1)
+ fun_l29_n425(x)
+ else
+ fun_l29_n800(x)
+ end
+end
+
+def fun_l28_n256(x)
+ if (x < 1)
+ fun_l29_n913(x)
+ else
+ fun_l29_n199(x)
+ end
+end
+
+def fun_l28_n257(x)
+ if (x < 1)
+ fun_l29_n25(x)
+ else
+ fun_l29_n412(x)
+ end
+end
+
+def fun_l28_n258(x)
+ if (x < 1)
+ fun_l29_n194(x)
+ else
+ fun_l29_n606(x)
+ end
+end
+
+def fun_l28_n259(x)
+ if (x < 1)
+ fun_l29_n653(x)
+ else
+ fun_l29_n72(x)
+ end
+end
+
+def fun_l28_n260(x)
+ if (x < 1)
+ fun_l29_n198(x)
+ else
+ fun_l29_n742(x)
+ end
+end
+
+def fun_l28_n261(x)
+ if (x < 1)
+ fun_l29_n452(x)
+ else
+ fun_l29_n522(x)
+ end
+end
+
+def fun_l28_n262(x)
+ if (x < 1)
+ fun_l29_n214(x)
+ else
+ fun_l29_n131(x)
+ end
+end
+
+def fun_l28_n263(x)
+ if (x < 1)
+ fun_l29_n481(x)
+ else
+ fun_l29_n848(x)
+ end
+end
+
+def fun_l28_n264(x)
+ if (x < 1)
+ fun_l29_n147(x)
+ else
+ fun_l29_n187(x)
+ end
+end
+
+def fun_l28_n265(x)
+ if (x < 1)
+ fun_l29_n476(x)
+ else
+ fun_l29_n859(x)
+ end
+end
+
+def fun_l28_n266(x)
+ if (x < 1)
+ fun_l29_n130(x)
+ else
+ fun_l29_n356(x)
+ end
+end
+
+def fun_l28_n267(x)
+ if (x < 1)
+ fun_l29_n427(x)
+ else
+ fun_l29_n578(x)
+ end
+end
+
+def fun_l28_n268(x)
+ if (x < 1)
+ fun_l29_n810(x)
+ else
+ fun_l29_n483(x)
+ end
+end
+
+def fun_l28_n269(x)
+ if (x < 1)
+ fun_l29_n496(x)
+ else
+ fun_l29_n548(x)
+ end
+end
+
+def fun_l28_n270(x)
+ if (x < 1)
+ fun_l29_n159(x)
+ else
+ fun_l29_n184(x)
+ end
+end
+
+def fun_l28_n271(x)
+ if (x < 1)
+ fun_l29_n407(x)
+ else
+ fun_l29_n855(x)
+ end
+end
+
+def fun_l28_n272(x)
+ if (x < 1)
+ fun_l29_n41(x)
+ else
+ fun_l29_n493(x)
+ end
+end
+
+def fun_l28_n273(x)
+ if (x < 1)
+ fun_l29_n853(x)
+ else
+ fun_l29_n711(x)
+ end
+end
+
+def fun_l28_n274(x)
+ if (x < 1)
+ fun_l29_n397(x)
+ else
+ fun_l29_n68(x)
+ end
+end
+
+def fun_l28_n275(x)
+ if (x < 1)
+ fun_l29_n744(x)
+ else
+ fun_l29_n944(x)
+ end
+end
+
+def fun_l28_n276(x)
+ if (x < 1)
+ fun_l29_n641(x)
+ else
+ fun_l29_n766(x)
+ end
+end
+
+def fun_l28_n277(x)
+ if (x < 1)
+ fun_l29_n983(x)
+ else
+ fun_l29_n587(x)
+ end
+end
+
+def fun_l28_n278(x)
+ if (x < 1)
+ fun_l29_n683(x)
+ else
+ fun_l29_n192(x)
+ end
+end
+
+def fun_l28_n279(x)
+ if (x < 1)
+ fun_l29_n252(x)
+ else
+ fun_l29_n30(x)
+ end
+end
+
+def fun_l28_n280(x)
+ if (x < 1)
+ fun_l29_n129(x)
+ else
+ fun_l29_n561(x)
+ end
+end
+
+def fun_l28_n281(x)
+ if (x < 1)
+ fun_l29_n828(x)
+ else
+ fun_l29_n697(x)
+ end
+end
+
+def fun_l28_n282(x)
+ if (x < 1)
+ fun_l29_n492(x)
+ else
+ fun_l29_n243(x)
+ end
+end
+
+def fun_l28_n283(x)
+ if (x < 1)
+ fun_l29_n642(x)
+ else
+ fun_l29_n736(x)
+ end
+end
+
+def fun_l28_n284(x)
+ if (x < 1)
+ fun_l29_n448(x)
+ else
+ fun_l29_n838(x)
+ end
+end
+
+def fun_l28_n285(x)
+ if (x < 1)
+ fun_l29_n133(x)
+ else
+ fun_l29_n372(x)
+ end
+end
+
+def fun_l28_n286(x)
+ if (x < 1)
+ fun_l29_n318(x)
+ else
+ fun_l29_n739(x)
+ end
+end
+
+def fun_l28_n287(x)
+ if (x < 1)
+ fun_l29_n449(x)
+ else
+ fun_l29_n743(x)
+ end
+end
+
+def fun_l28_n288(x)
+ if (x < 1)
+ fun_l29_n769(x)
+ else
+ fun_l29_n496(x)
+ end
+end
+
+def fun_l28_n289(x)
+ if (x < 1)
+ fun_l29_n455(x)
+ else
+ fun_l29_n893(x)
+ end
+end
+
+def fun_l28_n290(x)
+ if (x < 1)
+ fun_l29_n651(x)
+ else
+ fun_l29_n865(x)
+ end
+end
+
+def fun_l28_n291(x)
+ if (x < 1)
+ fun_l29_n194(x)
+ else
+ fun_l29_n491(x)
+ end
+end
+
+def fun_l28_n292(x)
+ if (x < 1)
+ fun_l29_n178(x)
+ else
+ fun_l29_n96(x)
+ end
+end
+
+def fun_l28_n293(x)
+ if (x < 1)
+ fun_l29_n32(x)
+ else
+ fun_l29_n262(x)
+ end
+end
+
+def fun_l28_n294(x)
+ if (x < 1)
+ fun_l29_n706(x)
+ else
+ fun_l29_n864(x)
+ end
+end
+
+def fun_l28_n295(x)
+ if (x < 1)
+ fun_l29_n209(x)
+ else
+ fun_l29_n220(x)
+ end
+end
+
+def fun_l28_n296(x)
+ if (x < 1)
+ fun_l29_n970(x)
+ else
+ fun_l29_n194(x)
+ end
+end
+
+def fun_l28_n297(x)
+ if (x < 1)
+ fun_l29_n959(x)
+ else
+ fun_l29_n472(x)
+ end
+end
+
+def fun_l28_n298(x)
+ if (x < 1)
+ fun_l29_n778(x)
+ else
+ fun_l29_n66(x)
+ end
+end
+
+def fun_l28_n299(x)
+ if (x < 1)
+ fun_l29_n942(x)
+ else
+ fun_l29_n461(x)
+ end
+end
+
+def fun_l28_n300(x)
+ if (x < 1)
+ fun_l29_n563(x)
+ else
+ fun_l29_n426(x)
+ end
+end
+
+def fun_l28_n301(x)
+ if (x < 1)
+ fun_l29_n603(x)
+ else
+ fun_l29_n968(x)
+ end
+end
+
+def fun_l28_n302(x)
+ if (x < 1)
+ fun_l29_n908(x)
+ else
+ fun_l29_n767(x)
+ end
+end
+
+def fun_l28_n303(x)
+ if (x < 1)
+ fun_l29_n387(x)
+ else
+ fun_l29_n484(x)
+ end
+end
+
+def fun_l28_n304(x)
+ if (x < 1)
+ fun_l29_n744(x)
+ else
+ fun_l29_n463(x)
+ end
+end
+
+def fun_l28_n305(x)
+ if (x < 1)
+ fun_l29_n964(x)
+ else
+ fun_l29_n43(x)
+ end
+end
+
+def fun_l28_n306(x)
+ if (x < 1)
+ fun_l29_n65(x)
+ else
+ fun_l29_n910(x)
+ end
+end
+
+def fun_l28_n307(x)
+ if (x < 1)
+ fun_l29_n318(x)
+ else
+ fun_l29_n375(x)
+ end
+end
+
+def fun_l28_n308(x)
+ if (x < 1)
+ fun_l29_n775(x)
+ else
+ fun_l29_n588(x)
+ end
+end
+
+def fun_l28_n309(x)
+ if (x < 1)
+ fun_l29_n977(x)
+ else
+ fun_l29_n299(x)
+ end
+end
+
+def fun_l28_n310(x)
+ if (x < 1)
+ fun_l29_n497(x)
+ else
+ fun_l29_n792(x)
+ end
+end
+
+def fun_l28_n311(x)
+ if (x < 1)
+ fun_l29_n909(x)
+ else
+ fun_l29_n740(x)
+ end
+end
+
+def fun_l28_n312(x)
+ if (x < 1)
+ fun_l29_n967(x)
+ else
+ fun_l29_n4(x)
+ end
+end
+
+def fun_l28_n313(x)
+ if (x < 1)
+ fun_l29_n455(x)
+ else
+ fun_l29_n11(x)
+ end
+end
+
+def fun_l28_n314(x)
+ if (x < 1)
+ fun_l29_n996(x)
+ else
+ fun_l29_n851(x)
+ end
+end
+
+def fun_l28_n315(x)
+ if (x < 1)
+ fun_l29_n110(x)
+ else
+ fun_l29_n517(x)
+ end
+end
+
+def fun_l28_n316(x)
+ if (x < 1)
+ fun_l29_n648(x)
+ else
+ fun_l29_n279(x)
+ end
+end
+
+def fun_l28_n317(x)
+ if (x < 1)
+ fun_l29_n820(x)
+ else
+ fun_l29_n157(x)
+ end
+end
+
+def fun_l28_n318(x)
+ if (x < 1)
+ fun_l29_n957(x)
+ else
+ fun_l29_n93(x)
+ end
+end
+
+def fun_l28_n319(x)
+ if (x < 1)
+ fun_l29_n681(x)
+ else
+ fun_l29_n508(x)
+ end
+end
+
+def fun_l28_n320(x)
+ if (x < 1)
+ fun_l29_n613(x)
+ else
+ fun_l29_n274(x)
+ end
+end
+
+def fun_l28_n321(x)
+ if (x < 1)
+ fun_l29_n239(x)
+ else
+ fun_l29_n862(x)
+ end
+end
+
+def fun_l28_n322(x)
+ if (x < 1)
+ fun_l29_n101(x)
+ else
+ fun_l29_n81(x)
+ end
+end
+
+def fun_l28_n323(x)
+ if (x < 1)
+ fun_l29_n96(x)
+ else
+ fun_l29_n908(x)
+ end
+end
+
+def fun_l28_n324(x)
+ if (x < 1)
+ fun_l29_n443(x)
+ else
+ fun_l29_n78(x)
+ end
+end
+
+def fun_l28_n325(x)
+ if (x < 1)
+ fun_l29_n857(x)
+ else
+ fun_l29_n210(x)
+ end
+end
+
+def fun_l28_n326(x)
+ if (x < 1)
+ fun_l29_n51(x)
+ else
+ fun_l29_n524(x)
+ end
+end
+
+def fun_l28_n327(x)
+ if (x < 1)
+ fun_l29_n381(x)
+ else
+ fun_l29_n309(x)
+ end
+end
+
+def fun_l28_n328(x)
+ if (x < 1)
+ fun_l29_n787(x)
+ else
+ fun_l29_n176(x)
+ end
+end
+
+def fun_l28_n329(x)
+ if (x < 1)
+ fun_l29_n568(x)
+ else
+ fun_l29_n652(x)
+ end
+end
+
+def fun_l28_n330(x)
+ if (x < 1)
+ fun_l29_n1(x)
+ else
+ fun_l29_n634(x)
+ end
+end
+
+def fun_l28_n331(x)
+ if (x < 1)
+ fun_l29_n491(x)
+ else
+ fun_l29_n365(x)
+ end
+end
+
+def fun_l28_n332(x)
+ if (x < 1)
+ fun_l29_n604(x)
+ else
+ fun_l29_n586(x)
+ end
+end
+
+def fun_l28_n333(x)
+ if (x < 1)
+ fun_l29_n811(x)
+ else
+ fun_l29_n981(x)
+ end
+end
+
+def fun_l28_n334(x)
+ if (x < 1)
+ fun_l29_n485(x)
+ else
+ fun_l29_n843(x)
+ end
+end
+
+def fun_l28_n335(x)
+ if (x < 1)
+ fun_l29_n188(x)
+ else
+ fun_l29_n805(x)
+ end
+end
+
+def fun_l28_n336(x)
+ if (x < 1)
+ fun_l29_n818(x)
+ else
+ fun_l29_n650(x)
+ end
+end
+
+def fun_l28_n337(x)
+ if (x < 1)
+ fun_l29_n829(x)
+ else
+ fun_l29_n13(x)
+ end
+end
+
+def fun_l28_n338(x)
+ if (x < 1)
+ fun_l29_n665(x)
+ else
+ fun_l29_n7(x)
+ end
+end
+
+def fun_l28_n339(x)
+ if (x < 1)
+ fun_l29_n347(x)
+ else
+ fun_l29_n914(x)
+ end
+end
+
+def fun_l28_n340(x)
+ if (x < 1)
+ fun_l29_n819(x)
+ else
+ fun_l29_n7(x)
+ end
+end
+
+def fun_l28_n341(x)
+ if (x < 1)
+ fun_l29_n108(x)
+ else
+ fun_l29_n838(x)
+ end
+end
+
+def fun_l28_n342(x)
+ if (x < 1)
+ fun_l29_n292(x)
+ else
+ fun_l29_n831(x)
+ end
+end
+
+def fun_l28_n343(x)
+ if (x < 1)
+ fun_l29_n892(x)
+ else
+ fun_l29_n717(x)
+ end
+end
+
+def fun_l28_n344(x)
+ if (x < 1)
+ fun_l29_n664(x)
+ else
+ fun_l29_n422(x)
+ end
+end
+
+def fun_l28_n345(x)
+ if (x < 1)
+ fun_l29_n59(x)
+ else
+ fun_l29_n858(x)
+ end
+end
+
+def fun_l28_n346(x)
+ if (x < 1)
+ fun_l29_n88(x)
+ else
+ fun_l29_n97(x)
+ end
+end
+
+def fun_l28_n347(x)
+ if (x < 1)
+ fun_l29_n852(x)
+ else
+ fun_l29_n37(x)
+ end
+end
+
+def fun_l28_n348(x)
+ if (x < 1)
+ fun_l29_n201(x)
+ else
+ fun_l29_n663(x)
+ end
+end
+
+def fun_l28_n349(x)
+ if (x < 1)
+ fun_l29_n928(x)
+ else
+ fun_l29_n743(x)
+ end
+end
+
+def fun_l28_n350(x)
+ if (x < 1)
+ fun_l29_n206(x)
+ else
+ fun_l29_n609(x)
+ end
+end
+
+def fun_l28_n351(x)
+ if (x < 1)
+ fun_l29_n98(x)
+ else
+ fun_l29_n659(x)
+ end
+end
+
+def fun_l28_n352(x)
+ if (x < 1)
+ fun_l29_n350(x)
+ else
+ fun_l29_n604(x)
+ end
+end
+
+def fun_l28_n353(x)
+ if (x < 1)
+ fun_l29_n273(x)
+ else
+ fun_l29_n831(x)
+ end
+end
+
+def fun_l28_n354(x)
+ if (x < 1)
+ fun_l29_n377(x)
+ else
+ fun_l29_n926(x)
+ end
+end
+
+def fun_l28_n355(x)
+ if (x < 1)
+ fun_l29_n783(x)
+ else
+ fun_l29_n646(x)
+ end
+end
+
+def fun_l28_n356(x)
+ if (x < 1)
+ fun_l29_n968(x)
+ else
+ fun_l29_n587(x)
+ end
+end
+
+def fun_l28_n357(x)
+ if (x < 1)
+ fun_l29_n813(x)
+ else
+ fun_l29_n791(x)
+ end
+end
+
+def fun_l28_n358(x)
+ if (x < 1)
+ fun_l29_n130(x)
+ else
+ fun_l29_n851(x)
+ end
+end
+
+def fun_l28_n359(x)
+ if (x < 1)
+ fun_l29_n858(x)
+ else
+ fun_l29_n112(x)
+ end
+end
+
+def fun_l28_n360(x)
+ if (x < 1)
+ fun_l29_n349(x)
+ else
+ fun_l29_n612(x)
+ end
+end
+
+def fun_l28_n361(x)
+ if (x < 1)
+ fun_l29_n282(x)
+ else
+ fun_l29_n357(x)
+ end
+end
+
+def fun_l28_n362(x)
+ if (x < 1)
+ fun_l29_n144(x)
+ else
+ fun_l29_n426(x)
+ end
+end
+
+def fun_l28_n363(x)
+ if (x < 1)
+ fun_l29_n438(x)
+ else
+ fun_l29_n539(x)
+ end
+end
+
+def fun_l28_n364(x)
+ if (x < 1)
+ fun_l29_n321(x)
+ else
+ fun_l29_n874(x)
+ end
+end
+
+def fun_l28_n365(x)
+ if (x < 1)
+ fun_l29_n443(x)
+ else
+ fun_l29_n985(x)
+ end
+end
+
+def fun_l28_n366(x)
+ if (x < 1)
+ fun_l29_n436(x)
+ else
+ fun_l29_n787(x)
+ end
+end
+
+def fun_l28_n367(x)
+ if (x < 1)
+ fun_l29_n354(x)
+ else
+ fun_l29_n75(x)
+ end
+end
+
+def fun_l28_n368(x)
+ if (x < 1)
+ fun_l29_n515(x)
+ else
+ fun_l29_n57(x)
+ end
+end
+
+def fun_l28_n369(x)
+ if (x < 1)
+ fun_l29_n222(x)
+ else
+ fun_l29_n954(x)
+ end
+end
+
+def fun_l28_n370(x)
+ if (x < 1)
+ fun_l29_n37(x)
+ else
+ fun_l29_n683(x)
+ end
+end
+
+def fun_l28_n371(x)
+ if (x < 1)
+ fun_l29_n104(x)
+ else
+ fun_l29_n721(x)
+ end
+end
+
+def fun_l28_n372(x)
+ if (x < 1)
+ fun_l29_n763(x)
+ else
+ fun_l29_n173(x)
+ end
+end
+
+def fun_l28_n373(x)
+ if (x < 1)
+ fun_l29_n693(x)
+ else
+ fun_l29_n132(x)
+ end
+end
+
+def fun_l28_n374(x)
+ if (x < 1)
+ fun_l29_n586(x)
+ else
+ fun_l29_n992(x)
+ end
+end
+
+def fun_l28_n375(x)
+ if (x < 1)
+ fun_l29_n815(x)
+ else
+ fun_l29_n721(x)
+ end
+end
+
+def fun_l28_n376(x)
+ if (x < 1)
+ fun_l29_n653(x)
+ else
+ fun_l29_n67(x)
+ end
+end
+
+def fun_l28_n377(x)
+ if (x < 1)
+ fun_l29_n710(x)
+ else
+ fun_l29_n787(x)
+ end
+end
+
+def fun_l28_n378(x)
+ if (x < 1)
+ fun_l29_n448(x)
+ else
+ fun_l29_n170(x)
+ end
+end
+
+def fun_l28_n379(x)
+ if (x < 1)
+ fun_l29_n433(x)
+ else
+ fun_l29_n970(x)
+ end
+end
+
+def fun_l28_n380(x)
+ if (x < 1)
+ fun_l29_n933(x)
+ else
+ fun_l29_n995(x)
+ end
+end
+
+def fun_l28_n381(x)
+ if (x < 1)
+ fun_l29_n78(x)
+ else
+ fun_l29_n791(x)
+ end
+end
+
+def fun_l28_n382(x)
+ if (x < 1)
+ fun_l29_n101(x)
+ else
+ fun_l29_n592(x)
+ end
+end
+
+def fun_l28_n383(x)
+ if (x < 1)
+ fun_l29_n470(x)
+ else
+ fun_l29_n988(x)
+ end
+end
+
+def fun_l28_n384(x)
+ if (x < 1)
+ fun_l29_n260(x)
+ else
+ fun_l29_n359(x)
+ end
+end
+
+def fun_l28_n385(x)
+ if (x < 1)
+ fun_l29_n743(x)
+ else
+ fun_l29_n373(x)
+ end
+end
+
+def fun_l28_n386(x)
+ if (x < 1)
+ fun_l29_n49(x)
+ else
+ fun_l29_n591(x)
+ end
+end
+
+def fun_l28_n387(x)
+ if (x < 1)
+ fun_l29_n271(x)
+ else
+ fun_l29_n924(x)
+ end
+end
+
+def fun_l28_n388(x)
+ if (x < 1)
+ fun_l29_n876(x)
+ else
+ fun_l29_n219(x)
+ end
+end
+
+def fun_l28_n389(x)
+ if (x < 1)
+ fun_l29_n262(x)
+ else
+ fun_l29_n857(x)
+ end
+end
+
+def fun_l28_n390(x)
+ if (x < 1)
+ fun_l29_n217(x)
+ else
+ fun_l29_n198(x)
+ end
+end
+
+def fun_l28_n391(x)
+ if (x < 1)
+ fun_l29_n603(x)
+ else
+ fun_l29_n87(x)
+ end
+end
+
+def fun_l28_n392(x)
+ if (x < 1)
+ fun_l29_n498(x)
+ else
+ fun_l29_n913(x)
+ end
+end
+
+def fun_l28_n393(x)
+ if (x < 1)
+ fun_l29_n795(x)
+ else
+ fun_l29_n87(x)
+ end
+end
+
+def fun_l28_n394(x)
+ if (x < 1)
+ fun_l29_n528(x)
+ else
+ fun_l29_n217(x)
+ end
+end
+
+def fun_l28_n395(x)
+ if (x < 1)
+ fun_l29_n300(x)
+ else
+ fun_l29_n725(x)
+ end
+end
+
+def fun_l28_n396(x)
+ if (x < 1)
+ fun_l29_n538(x)
+ else
+ fun_l29_n812(x)
+ end
+end
+
+def fun_l28_n397(x)
+ if (x < 1)
+ fun_l29_n179(x)
+ else
+ fun_l29_n765(x)
+ end
+end
+
+def fun_l28_n398(x)
+ if (x < 1)
+ fun_l29_n28(x)
+ else
+ fun_l29_n475(x)
+ end
+end
+
+def fun_l28_n399(x)
+ if (x < 1)
+ fun_l29_n471(x)
+ else
+ fun_l29_n368(x)
+ end
+end
+
+def fun_l28_n400(x)
+ if (x < 1)
+ fun_l29_n241(x)
+ else
+ fun_l29_n461(x)
+ end
+end
+
+def fun_l28_n401(x)
+ if (x < 1)
+ fun_l29_n707(x)
+ else
+ fun_l29_n502(x)
+ end
+end
+
+def fun_l28_n402(x)
+ if (x < 1)
+ fun_l29_n129(x)
+ else
+ fun_l29_n176(x)
+ end
+end
+
+def fun_l28_n403(x)
+ if (x < 1)
+ fun_l29_n410(x)
+ else
+ fun_l29_n954(x)
+ end
+end
+
+def fun_l28_n404(x)
+ if (x < 1)
+ fun_l29_n203(x)
+ else
+ fun_l29_n455(x)
+ end
+end
+
+def fun_l28_n405(x)
+ if (x < 1)
+ fun_l29_n238(x)
+ else
+ fun_l29_n865(x)
+ end
+end
+
+def fun_l28_n406(x)
+ if (x < 1)
+ fun_l29_n836(x)
+ else
+ fun_l29_n778(x)
+ end
+end
+
+def fun_l28_n407(x)
+ if (x < 1)
+ fun_l29_n620(x)
+ else
+ fun_l29_n879(x)
+ end
+end
+
+def fun_l28_n408(x)
+ if (x < 1)
+ fun_l29_n656(x)
+ else
+ fun_l29_n594(x)
+ end
+end
+
+def fun_l28_n409(x)
+ if (x < 1)
+ fun_l29_n382(x)
+ else
+ fun_l29_n51(x)
+ end
+end
+
+def fun_l28_n410(x)
+ if (x < 1)
+ fun_l29_n357(x)
+ else
+ fun_l29_n660(x)
+ end
+end
+
+def fun_l28_n411(x)
+ if (x < 1)
+ fun_l29_n900(x)
+ else
+ fun_l29_n902(x)
+ end
+end
+
+def fun_l28_n412(x)
+ if (x < 1)
+ fun_l29_n645(x)
+ else
+ fun_l29_n0(x)
+ end
+end
+
+def fun_l28_n413(x)
+ if (x < 1)
+ fun_l29_n250(x)
+ else
+ fun_l29_n499(x)
+ end
+end
+
+def fun_l28_n414(x)
+ if (x < 1)
+ fun_l29_n700(x)
+ else
+ fun_l29_n301(x)
+ end
+end
+
+def fun_l28_n415(x)
+ if (x < 1)
+ fun_l29_n711(x)
+ else
+ fun_l29_n83(x)
+ end
+end
+
+def fun_l28_n416(x)
+ if (x < 1)
+ fun_l29_n332(x)
+ else
+ fun_l29_n237(x)
+ end
+end
+
+def fun_l28_n417(x)
+ if (x < 1)
+ fun_l29_n573(x)
+ else
+ fun_l29_n822(x)
+ end
+end
+
+def fun_l28_n418(x)
+ if (x < 1)
+ fun_l29_n766(x)
+ else
+ fun_l29_n131(x)
+ end
+end
+
+def fun_l28_n419(x)
+ if (x < 1)
+ fun_l29_n696(x)
+ else
+ fun_l29_n772(x)
+ end
+end
+
+def fun_l28_n420(x)
+ if (x < 1)
+ fun_l29_n361(x)
+ else
+ fun_l29_n598(x)
+ end
+end
+
+def fun_l28_n421(x)
+ if (x < 1)
+ fun_l29_n941(x)
+ else
+ fun_l29_n403(x)
+ end
+end
+
+def fun_l28_n422(x)
+ if (x < 1)
+ fun_l29_n471(x)
+ else
+ fun_l29_n636(x)
+ end
+end
+
+def fun_l28_n423(x)
+ if (x < 1)
+ fun_l29_n650(x)
+ else
+ fun_l29_n787(x)
+ end
+end
+
+def fun_l28_n424(x)
+ if (x < 1)
+ fun_l29_n982(x)
+ else
+ fun_l29_n51(x)
+ end
+end
+
+def fun_l28_n425(x)
+ if (x < 1)
+ fun_l29_n140(x)
+ else
+ fun_l29_n255(x)
+ end
+end
+
+def fun_l28_n426(x)
+ if (x < 1)
+ fun_l29_n694(x)
+ else
+ fun_l29_n777(x)
+ end
+end
+
+def fun_l28_n427(x)
+ if (x < 1)
+ fun_l29_n984(x)
+ else
+ fun_l29_n118(x)
+ end
+end
+
+def fun_l28_n428(x)
+ if (x < 1)
+ fun_l29_n641(x)
+ else
+ fun_l29_n904(x)
+ end
+end
+
+def fun_l28_n429(x)
+ if (x < 1)
+ fun_l29_n537(x)
+ else
+ fun_l29_n950(x)
+ end
+end
+
+def fun_l28_n430(x)
+ if (x < 1)
+ fun_l29_n844(x)
+ else
+ fun_l29_n350(x)
+ end
+end
+
+def fun_l28_n431(x)
+ if (x < 1)
+ fun_l29_n223(x)
+ else
+ fun_l29_n711(x)
+ end
+end
+
+def fun_l28_n432(x)
+ if (x < 1)
+ fun_l29_n287(x)
+ else
+ fun_l29_n424(x)
+ end
+end
+
+def fun_l28_n433(x)
+ if (x < 1)
+ fun_l29_n447(x)
+ else
+ fun_l29_n253(x)
+ end
+end
+
+def fun_l28_n434(x)
+ if (x < 1)
+ fun_l29_n484(x)
+ else
+ fun_l29_n377(x)
+ end
+end
+
+def fun_l28_n435(x)
+ if (x < 1)
+ fun_l29_n899(x)
+ else
+ fun_l29_n385(x)
+ end
+end
+
+def fun_l28_n436(x)
+ if (x < 1)
+ fun_l29_n13(x)
+ else
+ fun_l29_n910(x)
+ end
+end
+
+def fun_l28_n437(x)
+ if (x < 1)
+ fun_l29_n431(x)
+ else
+ fun_l29_n505(x)
+ end
+end
+
+def fun_l28_n438(x)
+ if (x < 1)
+ fun_l29_n974(x)
+ else
+ fun_l29_n162(x)
+ end
+end
+
+def fun_l28_n439(x)
+ if (x < 1)
+ fun_l29_n833(x)
+ else
+ fun_l29_n26(x)
+ end
+end
+
+def fun_l28_n440(x)
+ if (x < 1)
+ fun_l29_n576(x)
+ else
+ fun_l29_n783(x)
+ end
+end
+
+def fun_l28_n441(x)
+ if (x < 1)
+ fun_l29_n580(x)
+ else
+ fun_l29_n476(x)
+ end
+end
+
+def fun_l28_n442(x)
+ if (x < 1)
+ fun_l29_n415(x)
+ else
+ fun_l29_n695(x)
+ end
+end
+
+def fun_l28_n443(x)
+ if (x < 1)
+ fun_l29_n279(x)
+ else
+ fun_l29_n442(x)
+ end
+end
+
+def fun_l28_n444(x)
+ if (x < 1)
+ fun_l29_n784(x)
+ else
+ fun_l29_n25(x)
+ end
+end
+
+def fun_l28_n445(x)
+ if (x < 1)
+ fun_l29_n682(x)
+ else
+ fun_l29_n632(x)
+ end
+end
+
+def fun_l28_n446(x)
+ if (x < 1)
+ fun_l29_n793(x)
+ else
+ fun_l29_n199(x)
+ end
+end
+
+def fun_l28_n447(x)
+ if (x < 1)
+ fun_l29_n885(x)
+ else
+ fun_l29_n590(x)
+ end
+end
+
+def fun_l28_n448(x)
+ if (x < 1)
+ fun_l29_n457(x)
+ else
+ fun_l29_n664(x)
+ end
+end
+
+def fun_l28_n449(x)
+ if (x < 1)
+ fun_l29_n272(x)
+ else
+ fun_l29_n207(x)
+ end
+end
+
+def fun_l28_n450(x)
+ if (x < 1)
+ fun_l29_n73(x)
+ else
+ fun_l29_n598(x)
+ end
+end
+
+def fun_l28_n451(x)
+ if (x < 1)
+ fun_l29_n674(x)
+ else
+ fun_l29_n305(x)
+ end
+end
+
+def fun_l28_n452(x)
+ if (x < 1)
+ fun_l29_n97(x)
+ else
+ fun_l29_n472(x)
+ end
+end
+
+def fun_l28_n453(x)
+ if (x < 1)
+ fun_l29_n995(x)
+ else
+ fun_l29_n156(x)
+ end
+end
+
+def fun_l28_n454(x)
+ if (x < 1)
+ fun_l29_n890(x)
+ else
+ fun_l29_n885(x)
+ end
+end
+
+def fun_l28_n455(x)
+ if (x < 1)
+ fun_l29_n481(x)
+ else
+ fun_l29_n712(x)
+ end
+end
+
+def fun_l28_n456(x)
+ if (x < 1)
+ fun_l29_n34(x)
+ else
+ fun_l29_n186(x)
+ end
+end
+
+def fun_l28_n457(x)
+ if (x < 1)
+ fun_l29_n767(x)
+ else
+ fun_l29_n769(x)
+ end
+end
+
+def fun_l28_n458(x)
+ if (x < 1)
+ fun_l29_n185(x)
+ else
+ fun_l29_n55(x)
+ end
+end
+
+def fun_l28_n459(x)
+ if (x < 1)
+ fun_l29_n826(x)
+ else
+ fun_l29_n954(x)
+ end
+end
+
+def fun_l28_n460(x)
+ if (x < 1)
+ fun_l29_n111(x)
+ else
+ fun_l29_n374(x)
+ end
+end
+
+def fun_l28_n461(x)
+ if (x < 1)
+ fun_l29_n988(x)
+ else
+ fun_l29_n719(x)
+ end
+end
+
+def fun_l28_n462(x)
+ if (x < 1)
+ fun_l29_n355(x)
+ else
+ fun_l29_n772(x)
+ end
+end
+
+def fun_l28_n463(x)
+ if (x < 1)
+ fun_l29_n348(x)
+ else
+ fun_l29_n973(x)
+ end
+end
+
+def fun_l28_n464(x)
+ if (x < 1)
+ fun_l29_n466(x)
+ else
+ fun_l29_n661(x)
+ end
+end
+
+def fun_l28_n465(x)
+ if (x < 1)
+ fun_l29_n95(x)
+ else
+ fun_l29_n300(x)
+ end
+end
+
+def fun_l28_n466(x)
+ if (x < 1)
+ fun_l29_n373(x)
+ else
+ fun_l29_n425(x)
+ end
+end
+
+def fun_l28_n467(x)
+ if (x < 1)
+ fun_l29_n669(x)
+ else
+ fun_l29_n990(x)
+ end
+end
+
+def fun_l28_n468(x)
+ if (x < 1)
+ fun_l29_n908(x)
+ else
+ fun_l29_n416(x)
+ end
+end
+
+def fun_l28_n469(x)
+ if (x < 1)
+ fun_l29_n795(x)
+ else
+ fun_l29_n7(x)
+ end
+end
+
+def fun_l28_n470(x)
+ if (x < 1)
+ fun_l29_n660(x)
+ else
+ fun_l29_n938(x)
+ end
+end
+
+def fun_l28_n471(x)
+ if (x < 1)
+ fun_l29_n816(x)
+ else
+ fun_l29_n857(x)
+ end
+end
+
+def fun_l28_n472(x)
+ if (x < 1)
+ fun_l29_n685(x)
+ else
+ fun_l29_n631(x)
+ end
+end
+
+def fun_l28_n473(x)
+ if (x < 1)
+ fun_l29_n521(x)
+ else
+ fun_l29_n21(x)
+ end
+end
+
+def fun_l28_n474(x)
+ if (x < 1)
+ fun_l29_n994(x)
+ else
+ fun_l29_n888(x)
+ end
+end
+
+def fun_l28_n475(x)
+ if (x < 1)
+ fun_l29_n819(x)
+ else
+ fun_l29_n735(x)
+ end
+end
+
+def fun_l28_n476(x)
+ if (x < 1)
+ fun_l29_n809(x)
+ else
+ fun_l29_n265(x)
+ end
+end
+
+def fun_l28_n477(x)
+ if (x < 1)
+ fun_l29_n99(x)
+ else
+ fun_l29_n484(x)
+ end
+end
+
+def fun_l28_n478(x)
+ if (x < 1)
+ fun_l29_n985(x)
+ else
+ fun_l29_n922(x)
+ end
+end
+
+def fun_l28_n479(x)
+ if (x < 1)
+ fun_l29_n502(x)
+ else
+ fun_l29_n475(x)
+ end
+end
+
+def fun_l28_n480(x)
+ if (x < 1)
+ fun_l29_n104(x)
+ else
+ fun_l29_n168(x)
+ end
+end
+
+def fun_l28_n481(x)
+ if (x < 1)
+ fun_l29_n176(x)
+ else
+ fun_l29_n736(x)
+ end
+end
+
+def fun_l28_n482(x)
+ if (x < 1)
+ fun_l29_n817(x)
+ else
+ fun_l29_n155(x)
+ end
+end
+
+def fun_l28_n483(x)
+ if (x < 1)
+ fun_l29_n162(x)
+ else
+ fun_l29_n45(x)
+ end
+end
+
+def fun_l28_n484(x)
+ if (x < 1)
+ fun_l29_n733(x)
+ else
+ fun_l29_n438(x)
+ end
+end
+
+def fun_l28_n485(x)
+ if (x < 1)
+ fun_l29_n323(x)
+ else
+ fun_l29_n410(x)
+ end
+end
+
+def fun_l28_n486(x)
+ if (x < 1)
+ fun_l29_n141(x)
+ else
+ fun_l29_n327(x)
+ end
+end
+
+def fun_l28_n487(x)
+ if (x < 1)
+ fun_l29_n122(x)
+ else
+ fun_l29_n280(x)
+ end
+end
+
+def fun_l28_n488(x)
+ if (x < 1)
+ fun_l29_n966(x)
+ else
+ fun_l29_n407(x)
+ end
+end
+
+def fun_l28_n489(x)
+ if (x < 1)
+ fun_l29_n826(x)
+ else
+ fun_l29_n852(x)
+ end
+end
+
+def fun_l28_n490(x)
+ if (x < 1)
+ fun_l29_n823(x)
+ else
+ fun_l29_n724(x)
+ end
+end
+
+def fun_l28_n491(x)
+ if (x < 1)
+ fun_l29_n291(x)
+ else
+ fun_l29_n151(x)
+ end
+end
+
+def fun_l28_n492(x)
+ if (x < 1)
+ fun_l29_n944(x)
+ else
+ fun_l29_n663(x)
+ end
+end
+
+def fun_l28_n493(x)
+ if (x < 1)
+ fun_l29_n552(x)
+ else
+ fun_l29_n954(x)
+ end
+end
+
+def fun_l28_n494(x)
+ if (x < 1)
+ fun_l29_n622(x)
+ else
+ fun_l29_n378(x)
+ end
+end
+
+def fun_l28_n495(x)
+ if (x < 1)
+ fun_l29_n824(x)
+ else
+ fun_l29_n377(x)
+ end
+end
+
+def fun_l28_n496(x)
+ if (x < 1)
+ fun_l29_n939(x)
+ else
+ fun_l29_n927(x)
+ end
+end
+
+def fun_l28_n497(x)
+ if (x < 1)
+ fun_l29_n760(x)
+ else
+ fun_l29_n215(x)
+ end
+end
+
+def fun_l28_n498(x)
+ if (x < 1)
+ fun_l29_n208(x)
+ else
+ fun_l29_n256(x)
+ end
+end
+
+def fun_l28_n499(x)
+ if (x < 1)
+ fun_l29_n19(x)
+ else
+ fun_l29_n956(x)
+ end
+end
+
+def fun_l28_n500(x)
+ if (x < 1)
+ fun_l29_n963(x)
+ else
+ fun_l29_n322(x)
+ end
+end
+
+def fun_l28_n501(x)
+ if (x < 1)
+ fun_l29_n564(x)
+ else
+ fun_l29_n261(x)
+ end
+end
+
+def fun_l28_n502(x)
+ if (x < 1)
+ fun_l29_n105(x)
+ else
+ fun_l29_n82(x)
+ end
+end
+
+def fun_l28_n503(x)
+ if (x < 1)
+ fun_l29_n165(x)
+ else
+ fun_l29_n101(x)
+ end
+end
+
+def fun_l28_n504(x)
+ if (x < 1)
+ fun_l29_n619(x)
+ else
+ fun_l29_n453(x)
+ end
+end
+
+def fun_l28_n505(x)
+ if (x < 1)
+ fun_l29_n20(x)
+ else
+ fun_l29_n329(x)
+ end
+end
+
+def fun_l28_n506(x)
+ if (x < 1)
+ fun_l29_n889(x)
+ else
+ fun_l29_n392(x)
+ end
+end
+
+def fun_l28_n507(x)
+ if (x < 1)
+ fun_l29_n824(x)
+ else
+ fun_l29_n709(x)
+ end
+end
+
+def fun_l28_n508(x)
+ if (x < 1)
+ fun_l29_n838(x)
+ else
+ fun_l29_n384(x)
+ end
+end
+
+def fun_l28_n509(x)
+ if (x < 1)
+ fun_l29_n364(x)
+ else
+ fun_l29_n789(x)
+ end
+end
+
+def fun_l28_n510(x)
+ if (x < 1)
+ fun_l29_n824(x)
+ else
+ fun_l29_n4(x)
+ end
+end
+
+def fun_l28_n511(x)
+ if (x < 1)
+ fun_l29_n481(x)
+ else
+ fun_l29_n883(x)
+ end
+end
+
+def fun_l28_n512(x)
+ if (x < 1)
+ fun_l29_n842(x)
+ else
+ fun_l29_n959(x)
+ end
+end
+
+def fun_l28_n513(x)
+ if (x < 1)
+ fun_l29_n989(x)
+ else
+ fun_l29_n400(x)
+ end
+end
+
+def fun_l28_n514(x)
+ if (x < 1)
+ fun_l29_n952(x)
+ else
+ fun_l29_n245(x)
+ end
+end
+
+def fun_l28_n515(x)
+ if (x < 1)
+ fun_l29_n966(x)
+ else
+ fun_l29_n91(x)
+ end
+end
+
+def fun_l28_n516(x)
+ if (x < 1)
+ fun_l29_n489(x)
+ else
+ fun_l29_n280(x)
+ end
+end
+
+def fun_l28_n517(x)
+ if (x < 1)
+ fun_l29_n128(x)
+ else
+ fun_l29_n722(x)
+ end
+end
+
+def fun_l28_n518(x)
+ if (x < 1)
+ fun_l29_n429(x)
+ else
+ fun_l29_n412(x)
+ end
+end
+
+def fun_l28_n519(x)
+ if (x < 1)
+ fun_l29_n884(x)
+ else
+ fun_l29_n993(x)
+ end
+end
+
+def fun_l28_n520(x)
+ if (x < 1)
+ fun_l29_n470(x)
+ else
+ fun_l29_n308(x)
+ end
+end
+
+def fun_l28_n521(x)
+ if (x < 1)
+ fun_l29_n583(x)
+ else
+ fun_l29_n683(x)
+ end
+end
+
+def fun_l28_n522(x)
+ if (x < 1)
+ fun_l29_n400(x)
+ else
+ fun_l29_n643(x)
+ end
+end
+
+def fun_l28_n523(x)
+ if (x < 1)
+ fun_l29_n750(x)
+ else
+ fun_l29_n388(x)
+ end
+end
+
+def fun_l28_n524(x)
+ if (x < 1)
+ fun_l29_n252(x)
+ else
+ fun_l29_n426(x)
+ end
+end
+
+def fun_l28_n525(x)
+ if (x < 1)
+ fun_l29_n51(x)
+ else
+ fun_l29_n720(x)
+ end
+end
+
+def fun_l28_n526(x)
+ if (x < 1)
+ fun_l29_n633(x)
+ else
+ fun_l29_n160(x)
+ end
+end
+
+def fun_l28_n527(x)
+ if (x < 1)
+ fun_l29_n507(x)
+ else
+ fun_l29_n630(x)
+ end
+end
+
+def fun_l28_n528(x)
+ if (x < 1)
+ fun_l29_n53(x)
+ else
+ fun_l29_n189(x)
+ end
+end
+
+def fun_l28_n529(x)
+ if (x < 1)
+ fun_l29_n191(x)
+ else
+ fun_l29_n767(x)
+ end
+end
+
+def fun_l28_n530(x)
+ if (x < 1)
+ fun_l29_n265(x)
+ else
+ fun_l29_n130(x)
+ end
+end
+
+def fun_l28_n531(x)
+ if (x < 1)
+ fun_l29_n936(x)
+ else
+ fun_l29_n270(x)
+ end
+end
+
+def fun_l28_n532(x)
+ if (x < 1)
+ fun_l29_n910(x)
+ else
+ fun_l29_n144(x)
+ end
+end
+
+def fun_l28_n533(x)
+ if (x < 1)
+ fun_l29_n155(x)
+ else
+ fun_l29_n947(x)
+ end
+end
+
+def fun_l28_n534(x)
+ if (x < 1)
+ fun_l29_n977(x)
+ else
+ fun_l29_n372(x)
+ end
+end
+
+def fun_l28_n535(x)
+ if (x < 1)
+ fun_l29_n728(x)
+ else
+ fun_l29_n657(x)
+ end
+end
+
+def fun_l28_n536(x)
+ if (x < 1)
+ fun_l29_n360(x)
+ else
+ fun_l29_n154(x)
+ end
+end
+
+def fun_l28_n537(x)
+ if (x < 1)
+ fun_l29_n934(x)
+ else
+ fun_l29_n93(x)
+ end
+end
+
+def fun_l28_n538(x)
+ if (x < 1)
+ fun_l29_n254(x)
+ else
+ fun_l29_n201(x)
+ end
+end
+
+def fun_l28_n539(x)
+ if (x < 1)
+ fun_l29_n310(x)
+ else
+ fun_l29_n104(x)
+ end
+end
+
+def fun_l28_n540(x)
+ if (x < 1)
+ fun_l29_n197(x)
+ else
+ fun_l29_n332(x)
+ end
+end
+
+def fun_l28_n541(x)
+ if (x < 1)
+ fun_l29_n144(x)
+ else
+ fun_l29_n519(x)
+ end
+end
+
+def fun_l28_n542(x)
+ if (x < 1)
+ fun_l29_n582(x)
+ else
+ fun_l29_n257(x)
+ end
+end
+
+def fun_l28_n543(x)
+ if (x < 1)
+ fun_l29_n984(x)
+ else
+ fun_l29_n375(x)
+ end
+end
+
+def fun_l28_n544(x)
+ if (x < 1)
+ fun_l29_n201(x)
+ else
+ fun_l29_n746(x)
+ end
+end
+
+def fun_l28_n545(x)
+ if (x < 1)
+ fun_l29_n530(x)
+ else
+ fun_l29_n209(x)
+ end
+end
+
+def fun_l28_n546(x)
+ if (x < 1)
+ fun_l29_n764(x)
+ else
+ fun_l29_n858(x)
+ end
+end
+
+def fun_l28_n547(x)
+ if (x < 1)
+ fun_l29_n830(x)
+ else
+ fun_l29_n58(x)
+ end
+end
+
+def fun_l28_n548(x)
+ if (x < 1)
+ fun_l29_n746(x)
+ else
+ fun_l29_n374(x)
+ end
+end
+
+def fun_l28_n549(x)
+ if (x < 1)
+ fun_l29_n923(x)
+ else
+ fun_l29_n489(x)
+ end
+end
+
+def fun_l28_n550(x)
+ if (x < 1)
+ fun_l29_n188(x)
+ else
+ fun_l29_n866(x)
+ end
+end
+
+def fun_l28_n551(x)
+ if (x < 1)
+ fun_l29_n959(x)
+ else
+ fun_l29_n493(x)
+ end
+end
+
+def fun_l28_n552(x)
+ if (x < 1)
+ fun_l29_n568(x)
+ else
+ fun_l29_n747(x)
+ end
+end
+
+def fun_l28_n553(x)
+ if (x < 1)
+ fun_l29_n972(x)
+ else
+ fun_l29_n507(x)
+ end
+end
+
+def fun_l28_n554(x)
+ if (x < 1)
+ fun_l29_n557(x)
+ else
+ fun_l29_n765(x)
+ end
+end
+
+def fun_l28_n555(x)
+ if (x < 1)
+ fun_l29_n430(x)
+ else
+ fun_l29_n941(x)
+ end
+end
+
+def fun_l28_n556(x)
+ if (x < 1)
+ fun_l29_n631(x)
+ else
+ fun_l29_n384(x)
+ end
+end
+
+def fun_l28_n557(x)
+ if (x < 1)
+ fun_l29_n681(x)
+ else
+ fun_l29_n976(x)
+ end
+end
+
+def fun_l28_n558(x)
+ if (x < 1)
+ fun_l29_n326(x)
+ else
+ fun_l29_n481(x)
+ end
+end
+
+def fun_l28_n559(x)
+ if (x < 1)
+ fun_l29_n882(x)
+ else
+ fun_l29_n129(x)
+ end
+end
+
+def fun_l28_n560(x)
+ if (x < 1)
+ fun_l29_n471(x)
+ else
+ fun_l29_n156(x)
+ end
+end
+
+def fun_l28_n561(x)
+ if (x < 1)
+ fun_l29_n692(x)
+ else
+ fun_l29_n968(x)
+ end
+end
+
+def fun_l28_n562(x)
+ if (x < 1)
+ fun_l29_n207(x)
+ else
+ fun_l29_n251(x)
+ end
+end
+
+def fun_l28_n563(x)
+ if (x < 1)
+ fun_l29_n519(x)
+ else
+ fun_l29_n749(x)
+ end
+end
+
+def fun_l28_n564(x)
+ if (x < 1)
+ fun_l29_n609(x)
+ else
+ fun_l29_n657(x)
+ end
+end
+
+def fun_l28_n565(x)
+ if (x < 1)
+ fun_l29_n100(x)
+ else
+ fun_l29_n932(x)
+ end
+end
+
+def fun_l28_n566(x)
+ if (x < 1)
+ fun_l29_n499(x)
+ else
+ fun_l29_n455(x)
+ end
+end
+
+def fun_l28_n567(x)
+ if (x < 1)
+ fun_l29_n486(x)
+ else
+ fun_l29_n13(x)
+ end
+end
+
+def fun_l28_n568(x)
+ if (x < 1)
+ fun_l29_n855(x)
+ else
+ fun_l29_n809(x)
+ end
+end
+
+def fun_l28_n569(x)
+ if (x < 1)
+ fun_l29_n295(x)
+ else
+ fun_l29_n576(x)
+ end
+end
+
+def fun_l28_n570(x)
+ if (x < 1)
+ fun_l29_n354(x)
+ else
+ fun_l29_n430(x)
+ end
+end
+
+def fun_l28_n571(x)
+ if (x < 1)
+ fun_l29_n307(x)
+ else
+ fun_l29_n560(x)
+ end
+end
+
+def fun_l28_n572(x)
+ if (x < 1)
+ fun_l29_n528(x)
+ else
+ fun_l29_n642(x)
+ end
+end
+
+def fun_l28_n573(x)
+ if (x < 1)
+ fun_l29_n552(x)
+ else
+ fun_l29_n421(x)
+ end
+end
+
+def fun_l28_n574(x)
+ if (x < 1)
+ fun_l29_n238(x)
+ else
+ fun_l29_n471(x)
+ end
+end
+
+def fun_l28_n575(x)
+ if (x < 1)
+ fun_l29_n748(x)
+ else
+ fun_l29_n381(x)
+ end
+end
+
+def fun_l28_n576(x)
+ if (x < 1)
+ fun_l29_n75(x)
+ else
+ fun_l29_n994(x)
+ end
+end
+
+def fun_l28_n577(x)
+ if (x < 1)
+ fun_l29_n159(x)
+ else
+ fun_l29_n923(x)
+ end
+end
+
+def fun_l28_n578(x)
+ if (x < 1)
+ fun_l29_n657(x)
+ else
+ fun_l29_n984(x)
+ end
+end
+
+def fun_l28_n579(x)
+ if (x < 1)
+ fun_l29_n150(x)
+ else
+ fun_l29_n887(x)
+ end
+end
+
+def fun_l28_n580(x)
+ if (x < 1)
+ fun_l29_n362(x)
+ else
+ fun_l29_n574(x)
+ end
+end
+
+def fun_l28_n581(x)
+ if (x < 1)
+ fun_l29_n95(x)
+ else
+ fun_l29_n258(x)
+ end
+end
+
+def fun_l28_n582(x)
+ if (x < 1)
+ fun_l29_n123(x)
+ else
+ fun_l29_n501(x)
+ end
+end
+
+def fun_l28_n583(x)
+ if (x < 1)
+ fun_l29_n934(x)
+ else
+ fun_l29_n94(x)
+ end
+end
+
+def fun_l28_n584(x)
+ if (x < 1)
+ fun_l29_n764(x)
+ else
+ fun_l29_n350(x)
+ end
+end
+
+def fun_l28_n585(x)
+ if (x < 1)
+ fun_l29_n328(x)
+ else
+ fun_l29_n483(x)
+ end
+end
+
+def fun_l28_n586(x)
+ if (x < 1)
+ fun_l29_n533(x)
+ else
+ fun_l29_n956(x)
+ end
+end
+
+def fun_l28_n587(x)
+ if (x < 1)
+ fun_l29_n632(x)
+ else
+ fun_l29_n243(x)
+ end
+end
+
+def fun_l28_n588(x)
+ if (x < 1)
+ fun_l29_n897(x)
+ else
+ fun_l29_n894(x)
+ end
+end
+
+def fun_l28_n589(x)
+ if (x < 1)
+ fun_l29_n867(x)
+ else
+ fun_l29_n68(x)
+ end
+end
+
+def fun_l28_n590(x)
+ if (x < 1)
+ fun_l29_n266(x)
+ else
+ fun_l29_n763(x)
+ end
+end
+
+def fun_l28_n591(x)
+ if (x < 1)
+ fun_l29_n104(x)
+ else
+ fun_l29_n940(x)
+ end
+end
+
+def fun_l28_n592(x)
+ if (x < 1)
+ fun_l29_n409(x)
+ else
+ fun_l29_n561(x)
+ end
+end
+
+def fun_l28_n593(x)
+ if (x < 1)
+ fun_l29_n485(x)
+ else
+ fun_l29_n780(x)
+ end
+end
+
+def fun_l28_n594(x)
+ if (x < 1)
+ fun_l29_n925(x)
+ else
+ fun_l29_n581(x)
+ end
+end
+
+def fun_l28_n595(x)
+ if (x < 1)
+ fun_l29_n566(x)
+ else
+ fun_l29_n288(x)
+ end
+end
+
+def fun_l28_n596(x)
+ if (x < 1)
+ fun_l29_n166(x)
+ else
+ fun_l29_n702(x)
+ end
+end
+
+def fun_l28_n597(x)
+ if (x < 1)
+ fun_l29_n82(x)
+ else
+ fun_l29_n815(x)
+ end
+end
+
+def fun_l28_n598(x)
+ if (x < 1)
+ fun_l29_n913(x)
+ else
+ fun_l29_n623(x)
+ end
+end
+
+def fun_l28_n599(x)
+ if (x < 1)
+ fun_l29_n431(x)
+ else
+ fun_l29_n216(x)
+ end
+end
+
+def fun_l28_n600(x)
+ if (x < 1)
+ fun_l29_n260(x)
+ else
+ fun_l29_n907(x)
+ end
+end
+
+def fun_l28_n601(x)
+ if (x < 1)
+ fun_l29_n232(x)
+ else
+ fun_l29_n504(x)
+ end
+end
+
+def fun_l28_n602(x)
+ if (x < 1)
+ fun_l29_n25(x)
+ else
+ fun_l29_n844(x)
+ end
+end
+
+def fun_l28_n603(x)
+ if (x < 1)
+ fun_l29_n997(x)
+ else
+ fun_l29_n821(x)
+ end
+end
+
+def fun_l28_n604(x)
+ if (x < 1)
+ fun_l29_n732(x)
+ else
+ fun_l29_n301(x)
+ end
+end
+
+def fun_l28_n605(x)
+ if (x < 1)
+ fun_l29_n971(x)
+ else
+ fun_l29_n522(x)
+ end
+end
+
+def fun_l28_n606(x)
+ if (x < 1)
+ fun_l29_n518(x)
+ else
+ fun_l29_n874(x)
+ end
+end
+
+def fun_l28_n607(x)
+ if (x < 1)
+ fun_l29_n104(x)
+ else
+ fun_l29_n529(x)
+ end
+end
+
+def fun_l28_n608(x)
+ if (x < 1)
+ fun_l29_n662(x)
+ else
+ fun_l29_n830(x)
+ end
+end
+
+def fun_l28_n609(x)
+ if (x < 1)
+ fun_l29_n521(x)
+ else
+ fun_l29_n944(x)
+ end
+end
+
+def fun_l28_n610(x)
+ if (x < 1)
+ fun_l29_n231(x)
+ else
+ fun_l29_n92(x)
+ end
+end
+
+def fun_l28_n611(x)
+ if (x < 1)
+ fun_l29_n290(x)
+ else
+ fun_l29_n261(x)
+ end
+end
+
+def fun_l28_n612(x)
+ if (x < 1)
+ fun_l29_n490(x)
+ else
+ fun_l29_n621(x)
+ end
+end
+
+def fun_l28_n613(x)
+ if (x < 1)
+ fun_l29_n131(x)
+ else
+ fun_l29_n946(x)
+ end
+end
+
+def fun_l28_n614(x)
+ if (x < 1)
+ fun_l29_n34(x)
+ else
+ fun_l29_n159(x)
+ end
+end
+
+def fun_l28_n615(x)
+ if (x < 1)
+ fun_l29_n811(x)
+ else
+ fun_l29_n895(x)
+ end
+end
+
+def fun_l28_n616(x)
+ if (x < 1)
+ fun_l29_n713(x)
+ else
+ fun_l29_n686(x)
+ end
+end
+
+def fun_l28_n617(x)
+ if (x < 1)
+ fun_l29_n650(x)
+ else
+ fun_l29_n256(x)
+ end
+end
+
+def fun_l28_n618(x)
+ if (x < 1)
+ fun_l29_n815(x)
+ else
+ fun_l29_n537(x)
+ end
+end
+
+def fun_l28_n619(x)
+ if (x < 1)
+ fun_l29_n739(x)
+ else
+ fun_l29_n735(x)
+ end
+end
+
+def fun_l28_n620(x)
+ if (x < 1)
+ fun_l29_n857(x)
+ else
+ fun_l29_n863(x)
+ end
+end
+
+def fun_l28_n621(x)
+ if (x < 1)
+ fun_l29_n81(x)
+ else
+ fun_l29_n755(x)
+ end
+end
+
+def fun_l28_n622(x)
+ if (x < 1)
+ fun_l29_n841(x)
+ else
+ fun_l29_n597(x)
+ end
+end
+
+def fun_l28_n623(x)
+ if (x < 1)
+ fun_l29_n87(x)
+ else
+ fun_l29_n676(x)
+ end
+end
+
+def fun_l28_n624(x)
+ if (x < 1)
+ fun_l29_n67(x)
+ else
+ fun_l29_n883(x)
+ end
+end
+
+def fun_l28_n625(x)
+ if (x < 1)
+ fun_l29_n223(x)
+ else
+ fun_l29_n139(x)
+ end
+end
+
+def fun_l28_n626(x)
+ if (x < 1)
+ fun_l29_n351(x)
+ else
+ fun_l29_n11(x)
+ end
+end
+
+def fun_l28_n627(x)
+ if (x < 1)
+ fun_l29_n281(x)
+ else
+ fun_l29_n138(x)
+ end
+end
+
+def fun_l28_n628(x)
+ if (x < 1)
+ fun_l29_n118(x)
+ else
+ fun_l29_n44(x)
+ end
+end
+
+def fun_l28_n629(x)
+ if (x < 1)
+ fun_l29_n55(x)
+ else
+ fun_l29_n249(x)
+ end
+end
+
+def fun_l28_n630(x)
+ if (x < 1)
+ fun_l29_n636(x)
+ else
+ fun_l29_n717(x)
+ end
+end
+
+def fun_l28_n631(x)
+ if (x < 1)
+ fun_l29_n88(x)
+ else
+ fun_l29_n670(x)
+ end
+end
+
+def fun_l28_n632(x)
+ if (x < 1)
+ fun_l29_n311(x)
+ else
+ fun_l29_n337(x)
+ end
+end
+
+def fun_l28_n633(x)
+ if (x < 1)
+ fun_l29_n67(x)
+ else
+ fun_l29_n12(x)
+ end
+end
+
+def fun_l28_n634(x)
+ if (x < 1)
+ fun_l29_n581(x)
+ else
+ fun_l29_n618(x)
+ end
+end
+
+def fun_l28_n635(x)
+ if (x < 1)
+ fun_l29_n709(x)
+ else
+ fun_l29_n120(x)
+ end
+end
+
+def fun_l28_n636(x)
+ if (x < 1)
+ fun_l29_n904(x)
+ else
+ fun_l29_n987(x)
+ end
+end
+
+def fun_l28_n637(x)
+ if (x < 1)
+ fun_l29_n274(x)
+ else
+ fun_l29_n219(x)
+ end
+end
+
+def fun_l28_n638(x)
+ if (x < 1)
+ fun_l29_n444(x)
+ else
+ fun_l29_n609(x)
+ end
+end
+
+def fun_l28_n639(x)
+ if (x < 1)
+ fun_l29_n473(x)
+ else
+ fun_l29_n433(x)
+ end
+end
+
+def fun_l28_n640(x)
+ if (x < 1)
+ fun_l29_n344(x)
+ else
+ fun_l29_n59(x)
+ end
+end
+
+def fun_l28_n641(x)
+ if (x < 1)
+ fun_l29_n973(x)
+ else
+ fun_l29_n506(x)
+ end
+end
+
+def fun_l28_n642(x)
+ if (x < 1)
+ fun_l29_n387(x)
+ else
+ fun_l29_n347(x)
+ end
+end
+
+def fun_l28_n643(x)
+ if (x < 1)
+ fun_l29_n138(x)
+ else
+ fun_l29_n597(x)
+ end
+end
+
+def fun_l28_n644(x)
+ if (x < 1)
+ fun_l29_n622(x)
+ else
+ fun_l29_n276(x)
+ end
+end
+
+def fun_l28_n645(x)
+ if (x < 1)
+ fun_l29_n454(x)
+ else
+ fun_l29_n930(x)
+ end
+end
+
+def fun_l28_n646(x)
+ if (x < 1)
+ fun_l29_n586(x)
+ else
+ fun_l29_n3(x)
+ end
+end
+
+def fun_l28_n647(x)
+ if (x < 1)
+ fun_l29_n508(x)
+ else
+ fun_l29_n489(x)
+ end
+end
+
+def fun_l28_n648(x)
+ if (x < 1)
+ fun_l29_n549(x)
+ else
+ fun_l29_n57(x)
+ end
+end
+
+def fun_l28_n649(x)
+ if (x < 1)
+ fun_l29_n32(x)
+ else
+ fun_l29_n487(x)
+ end
+end
+
+def fun_l28_n650(x)
+ if (x < 1)
+ fun_l29_n567(x)
+ else
+ fun_l29_n733(x)
+ end
+end
+
+def fun_l28_n651(x)
+ if (x < 1)
+ fun_l29_n401(x)
+ else
+ fun_l29_n234(x)
+ end
+end
+
+def fun_l28_n652(x)
+ if (x < 1)
+ fun_l29_n124(x)
+ else
+ fun_l29_n387(x)
+ end
+end
+
+def fun_l28_n653(x)
+ if (x < 1)
+ fun_l29_n517(x)
+ else
+ fun_l29_n150(x)
+ end
+end
+
+def fun_l28_n654(x)
+ if (x < 1)
+ fun_l29_n502(x)
+ else
+ fun_l29_n139(x)
+ end
+end
+
+def fun_l28_n655(x)
+ if (x < 1)
+ fun_l29_n304(x)
+ else
+ fun_l29_n871(x)
+ end
+end
+
+def fun_l28_n656(x)
+ if (x < 1)
+ fun_l29_n413(x)
+ else
+ fun_l29_n759(x)
+ end
+end
+
+def fun_l28_n657(x)
+ if (x < 1)
+ fun_l29_n810(x)
+ else
+ fun_l29_n274(x)
+ end
+end
+
+def fun_l28_n658(x)
+ if (x < 1)
+ fun_l29_n706(x)
+ else
+ fun_l29_n564(x)
+ end
+end
+
+def fun_l28_n659(x)
+ if (x < 1)
+ fun_l29_n205(x)
+ else
+ fun_l29_n857(x)
+ end
+end
+
+def fun_l28_n660(x)
+ if (x < 1)
+ fun_l29_n534(x)
+ else
+ fun_l29_n853(x)
+ end
+end
+
+def fun_l28_n661(x)
+ if (x < 1)
+ fun_l29_n436(x)
+ else
+ fun_l29_n227(x)
+ end
+end
+
+def fun_l28_n662(x)
+ if (x < 1)
+ fun_l29_n784(x)
+ else
+ fun_l29_n352(x)
+ end
+end
+
+def fun_l28_n663(x)
+ if (x < 1)
+ fun_l29_n889(x)
+ else
+ fun_l29_n186(x)
+ end
+end
+
+def fun_l28_n664(x)
+ if (x < 1)
+ fun_l29_n872(x)
+ else
+ fun_l29_n217(x)
+ end
+end
+
+def fun_l28_n665(x)
+ if (x < 1)
+ fun_l29_n111(x)
+ else
+ fun_l29_n355(x)
+ end
+end
+
+def fun_l28_n666(x)
+ if (x < 1)
+ fun_l29_n175(x)
+ else
+ fun_l29_n971(x)
+ end
+end
+
+def fun_l28_n667(x)
+ if (x < 1)
+ fun_l29_n823(x)
+ else
+ fun_l29_n123(x)
+ end
+end
+
+def fun_l28_n668(x)
+ if (x < 1)
+ fun_l29_n239(x)
+ else
+ fun_l29_n58(x)
+ end
+end
+
+def fun_l28_n669(x)
+ if (x < 1)
+ fun_l29_n127(x)
+ else
+ fun_l29_n628(x)
+ end
+end
+
+def fun_l28_n670(x)
+ if (x < 1)
+ fun_l29_n967(x)
+ else
+ fun_l29_n575(x)
+ end
+end
+
+def fun_l28_n671(x)
+ if (x < 1)
+ fun_l29_n994(x)
+ else
+ fun_l29_n352(x)
+ end
+end
+
+def fun_l28_n672(x)
+ if (x < 1)
+ fun_l29_n598(x)
+ else
+ fun_l29_n620(x)
+ end
+end
+
+def fun_l28_n673(x)
+ if (x < 1)
+ fun_l29_n407(x)
+ else
+ fun_l29_n132(x)
+ end
+end
+
+def fun_l28_n674(x)
+ if (x < 1)
+ fun_l29_n553(x)
+ else
+ fun_l29_n807(x)
+ end
+end
+
+def fun_l28_n675(x)
+ if (x < 1)
+ fun_l29_n918(x)
+ else
+ fun_l29_n462(x)
+ end
+end
+
+def fun_l28_n676(x)
+ if (x < 1)
+ fun_l29_n340(x)
+ else
+ fun_l29_n905(x)
+ end
+end
+
+def fun_l28_n677(x)
+ if (x < 1)
+ fun_l29_n322(x)
+ else
+ fun_l29_n657(x)
+ end
+end
+
+def fun_l28_n678(x)
+ if (x < 1)
+ fun_l29_n249(x)
+ else
+ fun_l29_n691(x)
+ end
+end
+
+def fun_l28_n679(x)
+ if (x < 1)
+ fun_l29_n227(x)
+ else
+ fun_l29_n559(x)
+ end
+end
+
+def fun_l28_n680(x)
+ if (x < 1)
+ fun_l29_n151(x)
+ else
+ fun_l29_n191(x)
+ end
+end
+
+def fun_l28_n681(x)
+ if (x < 1)
+ fun_l29_n211(x)
+ else
+ fun_l29_n400(x)
+ end
+end
+
+def fun_l28_n682(x)
+ if (x < 1)
+ fun_l29_n124(x)
+ else
+ fun_l29_n334(x)
+ end
+end
+
+def fun_l28_n683(x)
+ if (x < 1)
+ fun_l29_n876(x)
+ else
+ fun_l29_n839(x)
+ end
+end
+
+def fun_l28_n684(x)
+ if (x < 1)
+ fun_l29_n764(x)
+ else
+ fun_l29_n449(x)
+ end
+end
+
+def fun_l28_n685(x)
+ if (x < 1)
+ fun_l29_n316(x)
+ else
+ fun_l29_n730(x)
+ end
+end
+
+def fun_l28_n686(x)
+ if (x < 1)
+ fun_l29_n557(x)
+ else
+ fun_l29_n851(x)
+ end
+end
+
+def fun_l28_n687(x)
+ if (x < 1)
+ fun_l29_n315(x)
+ else
+ fun_l29_n280(x)
+ end
+end
+
+def fun_l28_n688(x)
+ if (x < 1)
+ fun_l29_n467(x)
+ else
+ fun_l29_n593(x)
+ end
+end
+
+def fun_l28_n689(x)
+ if (x < 1)
+ fun_l29_n537(x)
+ else
+ fun_l29_n37(x)
+ end
+end
+
+def fun_l28_n690(x)
+ if (x < 1)
+ fun_l29_n582(x)
+ else
+ fun_l29_n205(x)
+ end
+end
+
+def fun_l28_n691(x)
+ if (x < 1)
+ fun_l29_n672(x)
+ else
+ fun_l29_n656(x)
+ end
+end
+
+def fun_l28_n692(x)
+ if (x < 1)
+ fun_l29_n280(x)
+ else
+ fun_l29_n404(x)
+ end
+end
+
+def fun_l28_n693(x)
+ if (x < 1)
+ fun_l29_n609(x)
+ else
+ fun_l29_n914(x)
+ end
+end
+
+def fun_l28_n694(x)
+ if (x < 1)
+ fun_l29_n563(x)
+ else
+ fun_l29_n215(x)
+ end
+end
+
+def fun_l28_n695(x)
+ if (x < 1)
+ fun_l29_n207(x)
+ else
+ fun_l29_n548(x)
+ end
+end
+
+def fun_l28_n696(x)
+ if (x < 1)
+ fun_l29_n981(x)
+ else
+ fun_l29_n79(x)
+ end
+end
+
+def fun_l28_n697(x)
+ if (x < 1)
+ fun_l29_n747(x)
+ else
+ fun_l29_n687(x)
+ end
+end
+
+def fun_l28_n698(x)
+ if (x < 1)
+ fun_l29_n30(x)
+ else
+ fun_l29_n104(x)
+ end
+end
+
+def fun_l28_n699(x)
+ if (x < 1)
+ fun_l29_n587(x)
+ else
+ fun_l29_n414(x)
+ end
+end
+
+def fun_l28_n700(x)
+ if (x < 1)
+ fun_l29_n956(x)
+ else
+ fun_l29_n601(x)
+ end
+end
+
+def fun_l28_n701(x)
+ if (x < 1)
+ fun_l29_n276(x)
+ else
+ fun_l29_n815(x)
+ end
+end
+
+def fun_l28_n702(x)
+ if (x < 1)
+ fun_l29_n294(x)
+ else
+ fun_l29_n94(x)
+ end
+end
+
+def fun_l28_n703(x)
+ if (x < 1)
+ fun_l29_n161(x)
+ else
+ fun_l29_n133(x)
+ end
+end
+
+def fun_l28_n704(x)
+ if (x < 1)
+ fun_l29_n898(x)
+ else
+ fun_l29_n483(x)
+ end
+end
+
+def fun_l28_n705(x)
+ if (x < 1)
+ fun_l29_n651(x)
+ else
+ fun_l29_n577(x)
+ end
+end
+
+def fun_l28_n706(x)
+ if (x < 1)
+ fun_l29_n389(x)
+ else
+ fun_l29_n595(x)
+ end
+end
+
+def fun_l28_n707(x)
+ if (x < 1)
+ fun_l29_n856(x)
+ else
+ fun_l29_n65(x)
+ end
+end
+
+def fun_l28_n708(x)
+ if (x < 1)
+ fun_l29_n77(x)
+ else
+ fun_l29_n687(x)
+ end
+end
+
+def fun_l28_n709(x)
+ if (x < 1)
+ fun_l29_n962(x)
+ else
+ fun_l29_n517(x)
+ end
+end
+
+def fun_l28_n710(x)
+ if (x < 1)
+ fun_l29_n934(x)
+ else
+ fun_l29_n804(x)
+ end
+end
+
+def fun_l28_n711(x)
+ if (x < 1)
+ fun_l29_n267(x)
+ else
+ fun_l29_n557(x)
+ end
+end
+
+def fun_l28_n712(x)
+ if (x < 1)
+ fun_l29_n691(x)
+ else
+ fun_l29_n558(x)
+ end
+end
+
+def fun_l28_n713(x)
+ if (x < 1)
+ fun_l29_n420(x)
+ else
+ fun_l29_n150(x)
+ end
+end
+
+def fun_l28_n714(x)
+ if (x < 1)
+ fun_l29_n289(x)
+ else
+ fun_l29_n814(x)
+ end
+end
+
+def fun_l28_n715(x)
+ if (x < 1)
+ fun_l29_n579(x)
+ else
+ fun_l29_n730(x)
+ end
+end
+
+def fun_l28_n716(x)
+ if (x < 1)
+ fun_l29_n331(x)
+ else
+ fun_l29_n178(x)
+ end
+end
+
+def fun_l28_n717(x)
+ if (x < 1)
+ fun_l29_n914(x)
+ else
+ fun_l29_n176(x)
+ end
+end
+
+def fun_l28_n718(x)
+ if (x < 1)
+ fun_l29_n261(x)
+ else
+ fun_l29_n203(x)
+ end
+end
+
+def fun_l28_n719(x)
+ if (x < 1)
+ fun_l29_n621(x)
+ else
+ fun_l29_n236(x)
+ end
+end
+
+def fun_l28_n720(x)
+ if (x < 1)
+ fun_l29_n453(x)
+ else
+ fun_l29_n420(x)
+ end
+end
+
+def fun_l28_n721(x)
+ if (x < 1)
+ fun_l29_n39(x)
+ else
+ fun_l29_n499(x)
+ end
+end
+
+def fun_l28_n722(x)
+ if (x < 1)
+ fun_l29_n629(x)
+ else
+ fun_l29_n23(x)
+ end
+end
+
+def fun_l28_n723(x)
+ if (x < 1)
+ fun_l29_n55(x)
+ else
+ fun_l29_n497(x)
+ end
+end
+
+def fun_l28_n724(x)
+ if (x < 1)
+ fun_l29_n934(x)
+ else
+ fun_l29_n891(x)
+ end
+end
+
+def fun_l28_n725(x)
+ if (x < 1)
+ fun_l29_n532(x)
+ else
+ fun_l29_n959(x)
+ end
+end
+
+def fun_l28_n726(x)
+ if (x < 1)
+ fun_l29_n510(x)
+ else
+ fun_l29_n171(x)
+ end
+end
+
+def fun_l28_n727(x)
+ if (x < 1)
+ fun_l29_n42(x)
+ else
+ fun_l29_n680(x)
+ end
+end
+
+def fun_l28_n728(x)
+ if (x < 1)
+ fun_l29_n488(x)
+ else
+ fun_l29_n994(x)
+ end
+end
+
+def fun_l28_n729(x)
+ if (x < 1)
+ fun_l29_n347(x)
+ else
+ fun_l29_n135(x)
+ end
+end
+
+def fun_l28_n730(x)
+ if (x < 1)
+ fun_l29_n97(x)
+ else
+ fun_l29_n176(x)
+ end
+end
+
+def fun_l28_n731(x)
+ if (x < 1)
+ fun_l29_n4(x)
+ else
+ fun_l29_n330(x)
+ end
+end
+
+def fun_l28_n732(x)
+ if (x < 1)
+ fun_l29_n808(x)
+ else
+ fun_l29_n491(x)
+ end
+end
+
+def fun_l28_n733(x)
+ if (x < 1)
+ fun_l29_n147(x)
+ else
+ fun_l29_n520(x)
+ end
+end
+
+def fun_l28_n734(x)
+ if (x < 1)
+ fun_l29_n510(x)
+ else
+ fun_l29_n980(x)
+ end
+end
+
+def fun_l28_n735(x)
+ if (x < 1)
+ fun_l29_n656(x)
+ else
+ fun_l29_n861(x)
+ end
+end
+
+def fun_l28_n736(x)
+ if (x < 1)
+ fun_l29_n445(x)
+ else
+ fun_l29_n625(x)
+ end
+end
+
+def fun_l28_n737(x)
+ if (x < 1)
+ fun_l29_n101(x)
+ else
+ fun_l29_n874(x)
+ end
+end
+
+def fun_l28_n738(x)
+ if (x < 1)
+ fun_l29_n337(x)
+ else
+ fun_l29_n231(x)
+ end
+end
+
+def fun_l28_n739(x)
+ if (x < 1)
+ fun_l29_n518(x)
+ else
+ fun_l29_n575(x)
+ end
+end
+
+def fun_l28_n740(x)
+ if (x < 1)
+ fun_l29_n472(x)
+ else
+ fun_l29_n401(x)
+ end
+end
+
+def fun_l28_n741(x)
+ if (x < 1)
+ fun_l29_n47(x)
+ else
+ fun_l29_n435(x)
+ end
+end
+
+def fun_l28_n742(x)
+ if (x < 1)
+ fun_l29_n113(x)
+ else
+ fun_l29_n56(x)
+ end
+end
+
+def fun_l28_n743(x)
+ if (x < 1)
+ fun_l29_n435(x)
+ else
+ fun_l29_n972(x)
+ end
+end
+
+def fun_l28_n744(x)
+ if (x < 1)
+ fun_l29_n692(x)
+ else
+ fun_l29_n328(x)
+ end
+end
+
+def fun_l28_n745(x)
+ if (x < 1)
+ fun_l29_n830(x)
+ else
+ fun_l29_n92(x)
+ end
+end
+
+def fun_l28_n746(x)
+ if (x < 1)
+ fun_l29_n921(x)
+ else
+ fun_l29_n340(x)
+ end
+end
+
+def fun_l28_n747(x)
+ if (x < 1)
+ fun_l29_n346(x)
+ else
+ fun_l29_n654(x)
+ end
+end
+
+def fun_l28_n748(x)
+ if (x < 1)
+ fun_l29_n850(x)
+ else
+ fun_l29_n40(x)
+ end
+end
+
+def fun_l28_n749(x)
+ if (x < 1)
+ fun_l29_n432(x)
+ else
+ fun_l29_n445(x)
+ end
+end
+
+def fun_l28_n750(x)
+ if (x < 1)
+ fun_l29_n28(x)
+ else
+ fun_l29_n537(x)
+ end
+end
+
+def fun_l28_n751(x)
+ if (x < 1)
+ fun_l29_n858(x)
+ else
+ fun_l29_n375(x)
+ end
+end
+
+def fun_l28_n752(x)
+ if (x < 1)
+ fun_l29_n625(x)
+ else
+ fun_l29_n581(x)
+ end
+end
+
+def fun_l28_n753(x)
+ if (x < 1)
+ fun_l29_n223(x)
+ else
+ fun_l29_n509(x)
+ end
+end
+
+def fun_l28_n754(x)
+ if (x < 1)
+ fun_l29_n655(x)
+ else
+ fun_l29_n218(x)
+ end
+end
+
+def fun_l28_n755(x)
+ if (x < 1)
+ fun_l29_n998(x)
+ else
+ fun_l29_n177(x)
+ end
+end
+
+def fun_l28_n756(x)
+ if (x < 1)
+ fun_l29_n66(x)
+ else
+ fun_l29_n763(x)
+ end
+end
+
+def fun_l28_n757(x)
+ if (x < 1)
+ fun_l29_n112(x)
+ else
+ fun_l29_n494(x)
+ end
+end
+
+def fun_l28_n758(x)
+ if (x < 1)
+ fun_l29_n144(x)
+ else
+ fun_l29_n402(x)
+ end
+end
+
+def fun_l28_n759(x)
+ if (x < 1)
+ fun_l29_n162(x)
+ else
+ fun_l29_n338(x)
+ end
+end
+
+def fun_l28_n760(x)
+ if (x < 1)
+ fun_l29_n975(x)
+ else
+ fun_l29_n431(x)
+ end
+end
+
+def fun_l28_n761(x)
+ if (x < 1)
+ fun_l29_n676(x)
+ else
+ fun_l29_n787(x)
+ end
+end
+
+def fun_l28_n762(x)
+ if (x < 1)
+ fun_l29_n90(x)
+ else
+ fun_l29_n828(x)
+ end
+end
+
+def fun_l28_n763(x)
+ if (x < 1)
+ fun_l29_n816(x)
+ else
+ fun_l29_n119(x)
+ end
+end
+
+def fun_l28_n764(x)
+ if (x < 1)
+ fun_l29_n624(x)
+ else
+ fun_l29_n885(x)
+ end
+end
+
+def fun_l28_n765(x)
+ if (x < 1)
+ fun_l29_n933(x)
+ else
+ fun_l29_n378(x)
+ end
+end
+
+def fun_l28_n766(x)
+ if (x < 1)
+ fun_l29_n967(x)
+ else
+ fun_l29_n580(x)
+ end
+end
+
+def fun_l28_n767(x)
+ if (x < 1)
+ fun_l29_n752(x)
+ else
+ fun_l29_n607(x)
+ end
+end
+
+def fun_l28_n768(x)
+ if (x < 1)
+ fun_l29_n333(x)
+ else
+ fun_l29_n339(x)
+ end
+end
+
+def fun_l28_n769(x)
+ if (x < 1)
+ fun_l29_n720(x)
+ else
+ fun_l29_n952(x)
+ end
+end
+
+def fun_l28_n770(x)
+ if (x < 1)
+ fun_l29_n323(x)
+ else
+ fun_l29_n542(x)
+ end
+end
+
+def fun_l28_n771(x)
+ if (x < 1)
+ fun_l29_n472(x)
+ else
+ fun_l29_n4(x)
+ end
+end
+
+def fun_l28_n772(x)
+ if (x < 1)
+ fun_l29_n962(x)
+ else
+ fun_l29_n345(x)
+ end
+end
+
+def fun_l28_n773(x)
+ if (x < 1)
+ fun_l29_n305(x)
+ else
+ fun_l29_n106(x)
+ end
+end
+
+def fun_l28_n774(x)
+ if (x < 1)
+ fun_l29_n880(x)
+ else
+ fun_l29_n731(x)
+ end
+end
+
+def fun_l28_n775(x)
+ if (x < 1)
+ fun_l29_n760(x)
+ else
+ fun_l29_n460(x)
+ end
+end
+
+def fun_l28_n776(x)
+ if (x < 1)
+ fun_l29_n445(x)
+ else
+ fun_l29_n725(x)
+ end
+end
+
+def fun_l28_n777(x)
+ if (x < 1)
+ fun_l29_n850(x)
+ else
+ fun_l29_n121(x)
+ end
+end
+
+def fun_l28_n778(x)
+ if (x < 1)
+ fun_l29_n270(x)
+ else
+ fun_l29_n85(x)
+ end
+end
+
+def fun_l28_n779(x)
+ if (x < 1)
+ fun_l29_n208(x)
+ else
+ fun_l29_n822(x)
+ end
+end
+
+def fun_l28_n780(x)
+ if (x < 1)
+ fun_l29_n832(x)
+ else
+ fun_l29_n712(x)
+ end
+end
+
+def fun_l28_n781(x)
+ if (x < 1)
+ fun_l29_n456(x)
+ else
+ fun_l29_n947(x)
+ end
+end
+
+def fun_l28_n782(x)
+ if (x < 1)
+ fun_l29_n973(x)
+ else
+ fun_l29_n912(x)
+ end
+end
+
+def fun_l28_n783(x)
+ if (x < 1)
+ fun_l29_n365(x)
+ else
+ fun_l29_n496(x)
+ end
+end
+
+def fun_l28_n784(x)
+ if (x < 1)
+ fun_l29_n717(x)
+ else
+ fun_l29_n157(x)
+ end
+end
+
+def fun_l28_n785(x)
+ if (x < 1)
+ fun_l29_n754(x)
+ else
+ fun_l29_n462(x)
+ end
+end
+
+def fun_l28_n786(x)
+ if (x < 1)
+ fun_l29_n470(x)
+ else
+ fun_l29_n528(x)
+ end
+end
+
+def fun_l28_n787(x)
+ if (x < 1)
+ fun_l29_n463(x)
+ else
+ fun_l29_n107(x)
+ end
+end
+
+def fun_l28_n788(x)
+ if (x < 1)
+ fun_l29_n583(x)
+ else
+ fun_l29_n387(x)
+ end
+end
+
+def fun_l28_n789(x)
+ if (x < 1)
+ fun_l29_n55(x)
+ else
+ fun_l29_n694(x)
+ end
+end
+
+def fun_l28_n790(x)
+ if (x < 1)
+ fun_l29_n834(x)
+ else
+ fun_l29_n306(x)
+ end
+end
+
+def fun_l28_n791(x)
+ if (x < 1)
+ fun_l29_n374(x)
+ else
+ fun_l29_n502(x)
+ end
+end
+
+def fun_l28_n792(x)
+ if (x < 1)
+ fun_l29_n462(x)
+ else
+ fun_l29_n221(x)
+ end
+end
+
+def fun_l28_n793(x)
+ if (x < 1)
+ fun_l29_n680(x)
+ else
+ fun_l29_n966(x)
+ end
+end
+
+def fun_l28_n794(x)
+ if (x < 1)
+ fun_l29_n936(x)
+ else
+ fun_l29_n911(x)
+ end
+end
+
+def fun_l28_n795(x)
+ if (x < 1)
+ fun_l29_n863(x)
+ else
+ fun_l29_n978(x)
+ end
+end
+
+def fun_l28_n796(x)
+ if (x < 1)
+ fun_l29_n1(x)
+ else
+ fun_l29_n399(x)
+ end
+end
+
+def fun_l28_n797(x)
+ if (x < 1)
+ fun_l29_n628(x)
+ else
+ fun_l29_n603(x)
+ end
+end
+
+def fun_l28_n798(x)
+ if (x < 1)
+ fun_l29_n799(x)
+ else
+ fun_l29_n979(x)
+ end
+end
+
+def fun_l28_n799(x)
+ if (x < 1)
+ fun_l29_n856(x)
+ else
+ fun_l29_n946(x)
+ end
+end
+
+def fun_l28_n800(x)
+ if (x < 1)
+ fun_l29_n556(x)
+ else
+ fun_l29_n816(x)
+ end
+end
+
+def fun_l28_n801(x)
+ if (x < 1)
+ fun_l29_n619(x)
+ else
+ fun_l29_n19(x)
+ end
+end
+
+def fun_l28_n802(x)
+ if (x < 1)
+ fun_l29_n143(x)
+ else
+ fun_l29_n287(x)
+ end
+end
+
+def fun_l28_n803(x)
+ if (x < 1)
+ fun_l29_n816(x)
+ else
+ fun_l29_n271(x)
+ end
+end
+
+def fun_l28_n804(x)
+ if (x < 1)
+ fun_l29_n517(x)
+ else
+ fun_l29_n931(x)
+ end
+end
+
+def fun_l28_n805(x)
+ if (x < 1)
+ fun_l29_n298(x)
+ else
+ fun_l29_n509(x)
+ end
+end
+
+def fun_l28_n806(x)
+ if (x < 1)
+ fun_l29_n493(x)
+ else
+ fun_l29_n341(x)
+ end
+end
+
+def fun_l28_n807(x)
+ if (x < 1)
+ fun_l29_n270(x)
+ else
+ fun_l29_n82(x)
+ end
+end
+
+def fun_l28_n808(x)
+ if (x < 1)
+ fun_l29_n980(x)
+ else
+ fun_l29_n771(x)
+ end
+end
+
+def fun_l28_n809(x)
+ if (x < 1)
+ fun_l29_n784(x)
+ else
+ fun_l29_n696(x)
+ end
+end
+
+def fun_l28_n810(x)
+ if (x < 1)
+ fun_l29_n966(x)
+ else
+ fun_l29_n216(x)
+ end
+end
+
+def fun_l28_n811(x)
+ if (x < 1)
+ fun_l29_n374(x)
+ else
+ fun_l29_n482(x)
+ end
+end
+
+def fun_l28_n812(x)
+ if (x < 1)
+ fun_l29_n682(x)
+ else
+ fun_l29_n42(x)
+ end
+end
+
+def fun_l28_n813(x)
+ if (x < 1)
+ fun_l29_n254(x)
+ else
+ fun_l29_n899(x)
+ end
+end
+
+def fun_l28_n814(x)
+ if (x < 1)
+ fun_l29_n115(x)
+ else
+ fun_l29_n336(x)
+ end
+end
+
+def fun_l28_n815(x)
+ if (x < 1)
+ fun_l29_n842(x)
+ else
+ fun_l29_n201(x)
+ end
+end
+
+def fun_l28_n816(x)
+ if (x < 1)
+ fun_l29_n258(x)
+ else
+ fun_l29_n675(x)
+ end
+end
+
+def fun_l28_n817(x)
+ if (x < 1)
+ fun_l29_n594(x)
+ else
+ fun_l29_n61(x)
+ end
+end
+
+def fun_l28_n818(x)
+ if (x < 1)
+ fun_l29_n691(x)
+ else
+ fun_l29_n627(x)
+ end
+end
+
+def fun_l28_n819(x)
+ if (x < 1)
+ fun_l29_n963(x)
+ else
+ fun_l29_n611(x)
+ end
+end
+
+def fun_l28_n820(x)
+ if (x < 1)
+ fun_l29_n455(x)
+ else
+ fun_l29_n829(x)
+ end
+end
+
+def fun_l28_n821(x)
+ if (x < 1)
+ fun_l29_n818(x)
+ else
+ fun_l29_n242(x)
+ end
+end
+
+def fun_l28_n822(x)
+ if (x < 1)
+ fun_l29_n242(x)
+ else
+ fun_l29_n474(x)
+ end
+end
+
+def fun_l28_n823(x)
+ if (x < 1)
+ fun_l29_n847(x)
+ else
+ fun_l29_n119(x)
+ end
+end
+
+def fun_l28_n824(x)
+ if (x < 1)
+ fun_l29_n141(x)
+ else
+ fun_l29_n371(x)
+ end
+end
+
+def fun_l28_n825(x)
+ if (x < 1)
+ fun_l29_n913(x)
+ else
+ fun_l29_n129(x)
+ end
+end
+
+def fun_l28_n826(x)
+ if (x < 1)
+ fun_l29_n440(x)
+ else
+ fun_l29_n860(x)
+ end
+end
+
+def fun_l28_n827(x)
+ if (x < 1)
+ fun_l29_n194(x)
+ else
+ fun_l29_n940(x)
+ end
+end
+
+def fun_l28_n828(x)
+ if (x < 1)
+ fun_l29_n444(x)
+ else
+ fun_l29_n332(x)
+ end
+end
+
+def fun_l28_n829(x)
+ if (x < 1)
+ fun_l29_n435(x)
+ else
+ fun_l29_n559(x)
+ end
+end
+
+def fun_l28_n830(x)
+ if (x < 1)
+ fun_l29_n898(x)
+ else
+ fun_l29_n418(x)
+ end
+end
+
+def fun_l28_n831(x)
+ if (x < 1)
+ fun_l29_n13(x)
+ else
+ fun_l29_n917(x)
+ end
+end
+
+def fun_l28_n832(x)
+ if (x < 1)
+ fun_l29_n705(x)
+ else
+ fun_l29_n738(x)
+ end
+end
+
+def fun_l28_n833(x)
+ if (x < 1)
+ fun_l29_n519(x)
+ else
+ fun_l29_n35(x)
+ end
+end
+
+def fun_l28_n834(x)
+ if (x < 1)
+ fun_l29_n205(x)
+ else
+ fun_l29_n928(x)
+ end
+end
+
+def fun_l28_n835(x)
+ if (x < 1)
+ fun_l29_n401(x)
+ else
+ fun_l29_n191(x)
+ end
+end
+
+def fun_l28_n836(x)
+ if (x < 1)
+ fun_l29_n497(x)
+ else
+ fun_l29_n789(x)
+ end
+end
+
+def fun_l28_n837(x)
+ if (x < 1)
+ fun_l29_n745(x)
+ else
+ fun_l29_n714(x)
+ end
+end
+
+def fun_l28_n838(x)
+ if (x < 1)
+ fun_l29_n885(x)
+ else
+ fun_l29_n845(x)
+ end
+end
+
+def fun_l28_n839(x)
+ if (x < 1)
+ fun_l29_n423(x)
+ else
+ fun_l29_n835(x)
+ end
+end
+
+def fun_l28_n840(x)
+ if (x < 1)
+ fun_l29_n844(x)
+ else
+ fun_l29_n296(x)
+ end
+end
+
+def fun_l28_n841(x)
+ if (x < 1)
+ fun_l29_n980(x)
+ else
+ fun_l29_n298(x)
+ end
+end
+
+def fun_l28_n842(x)
+ if (x < 1)
+ fun_l29_n169(x)
+ else
+ fun_l29_n613(x)
+ end
+end
+
+def fun_l28_n843(x)
+ if (x < 1)
+ fun_l29_n323(x)
+ else
+ fun_l29_n437(x)
+ end
+end
+
+def fun_l28_n844(x)
+ if (x < 1)
+ fun_l29_n532(x)
+ else
+ fun_l29_n841(x)
+ end
+end
+
+def fun_l28_n845(x)
+ if (x < 1)
+ fun_l29_n984(x)
+ else
+ fun_l29_n696(x)
+ end
+end
+
+def fun_l28_n846(x)
+ if (x < 1)
+ fun_l29_n474(x)
+ else
+ fun_l29_n346(x)
+ end
+end
+
+def fun_l28_n847(x)
+ if (x < 1)
+ fun_l29_n725(x)
+ else
+ fun_l29_n994(x)
+ end
+end
+
+def fun_l28_n848(x)
+ if (x < 1)
+ fun_l29_n650(x)
+ else
+ fun_l29_n920(x)
+ end
+end
+
+def fun_l28_n849(x)
+ if (x < 1)
+ fun_l29_n626(x)
+ else
+ fun_l29_n704(x)
+ end
+end
+
+def fun_l28_n850(x)
+ if (x < 1)
+ fun_l29_n506(x)
+ else
+ fun_l29_n440(x)
+ end
+end
+
+def fun_l28_n851(x)
+ if (x < 1)
+ fun_l29_n512(x)
+ else
+ fun_l29_n811(x)
+ end
+end
+
+def fun_l28_n852(x)
+ if (x < 1)
+ fun_l29_n763(x)
+ else
+ fun_l29_n986(x)
+ end
+end
+
+def fun_l28_n853(x)
+ if (x < 1)
+ fun_l29_n866(x)
+ else
+ fun_l29_n972(x)
+ end
+end
+
+def fun_l28_n854(x)
+ if (x < 1)
+ fun_l29_n71(x)
+ else
+ fun_l29_n347(x)
+ end
+end
+
+def fun_l28_n855(x)
+ if (x < 1)
+ fun_l29_n380(x)
+ else
+ fun_l29_n809(x)
+ end
+end
+
+def fun_l28_n856(x)
+ if (x < 1)
+ fun_l29_n802(x)
+ else
+ fun_l29_n13(x)
+ end
+end
+
+def fun_l28_n857(x)
+ if (x < 1)
+ fun_l29_n631(x)
+ else
+ fun_l29_n636(x)
+ end
+end
+
+def fun_l28_n858(x)
+ if (x < 1)
+ fun_l29_n542(x)
+ else
+ fun_l29_n166(x)
+ end
+end
+
+def fun_l28_n859(x)
+ if (x < 1)
+ fun_l29_n393(x)
+ else
+ fun_l29_n317(x)
+ end
+end
+
+def fun_l28_n860(x)
+ if (x < 1)
+ fun_l29_n833(x)
+ else
+ fun_l29_n424(x)
+ end
+end
+
+def fun_l28_n861(x)
+ if (x < 1)
+ fun_l29_n62(x)
+ else
+ fun_l29_n78(x)
+ end
+end
+
+def fun_l28_n862(x)
+ if (x < 1)
+ fun_l29_n145(x)
+ else
+ fun_l29_n322(x)
+ end
+end
+
+def fun_l28_n863(x)
+ if (x < 1)
+ fun_l29_n733(x)
+ else
+ fun_l29_n171(x)
+ end
+end
+
+def fun_l28_n864(x)
+ if (x < 1)
+ fun_l29_n35(x)
+ else
+ fun_l29_n626(x)
+ end
+end
+
+def fun_l28_n865(x)
+ if (x < 1)
+ fun_l29_n356(x)
+ else
+ fun_l29_n832(x)
+ end
+end
+
+def fun_l28_n866(x)
+ if (x < 1)
+ fun_l29_n823(x)
+ else
+ fun_l29_n480(x)
+ end
+end
+
+def fun_l28_n867(x)
+ if (x < 1)
+ fun_l29_n397(x)
+ else
+ fun_l29_n245(x)
+ end
+end
+
+def fun_l28_n868(x)
+ if (x < 1)
+ fun_l29_n403(x)
+ else
+ fun_l29_n682(x)
+ end
+end
+
+def fun_l28_n869(x)
+ if (x < 1)
+ fun_l29_n481(x)
+ else
+ fun_l29_n543(x)
+ end
+end
+
+def fun_l28_n870(x)
+ if (x < 1)
+ fun_l29_n759(x)
+ else
+ fun_l29_n281(x)
+ end
+end
+
+def fun_l28_n871(x)
+ if (x < 1)
+ fun_l29_n671(x)
+ else
+ fun_l29_n644(x)
+ end
+end
+
+def fun_l28_n872(x)
+ if (x < 1)
+ fun_l29_n210(x)
+ else
+ fun_l29_n76(x)
+ end
+end
+
+def fun_l28_n873(x)
+ if (x < 1)
+ fun_l29_n823(x)
+ else
+ fun_l29_n461(x)
+ end
+end
+
+def fun_l28_n874(x)
+ if (x < 1)
+ fun_l29_n269(x)
+ else
+ fun_l29_n368(x)
+ end
+end
+
+def fun_l28_n875(x)
+ if (x < 1)
+ fun_l29_n727(x)
+ else
+ fun_l29_n37(x)
+ end
+end
+
+def fun_l28_n876(x)
+ if (x < 1)
+ fun_l29_n670(x)
+ else
+ fun_l29_n389(x)
+ end
+end
+
+def fun_l28_n877(x)
+ if (x < 1)
+ fun_l29_n844(x)
+ else
+ fun_l29_n424(x)
+ end
+end
+
+def fun_l28_n878(x)
+ if (x < 1)
+ fun_l29_n612(x)
+ else
+ fun_l29_n201(x)
+ end
+end
+
+def fun_l28_n879(x)
+ if (x < 1)
+ fun_l29_n790(x)
+ else
+ fun_l29_n270(x)
+ end
+end
+
+def fun_l28_n880(x)
+ if (x < 1)
+ fun_l29_n976(x)
+ else
+ fun_l29_n362(x)
+ end
+end
+
+def fun_l28_n881(x)
+ if (x < 1)
+ fun_l29_n701(x)
+ else
+ fun_l29_n846(x)
+ end
+end
+
+def fun_l28_n882(x)
+ if (x < 1)
+ fun_l29_n354(x)
+ else
+ fun_l29_n803(x)
+ end
+end
+
+def fun_l28_n883(x)
+ if (x < 1)
+ fun_l29_n40(x)
+ else
+ fun_l29_n168(x)
+ end
+end
+
+def fun_l28_n884(x)
+ if (x < 1)
+ fun_l29_n471(x)
+ else
+ fun_l29_n15(x)
+ end
+end
+
+def fun_l28_n885(x)
+ if (x < 1)
+ fun_l29_n87(x)
+ else
+ fun_l29_n287(x)
+ end
+end
+
+def fun_l28_n886(x)
+ if (x < 1)
+ fun_l29_n659(x)
+ else
+ fun_l29_n623(x)
+ end
+end
+
+def fun_l28_n887(x)
+ if (x < 1)
+ fun_l29_n318(x)
+ else
+ fun_l29_n377(x)
+ end
+end
+
+def fun_l28_n888(x)
+ if (x < 1)
+ fun_l29_n996(x)
+ else
+ fun_l29_n393(x)
+ end
+end
+
+def fun_l28_n889(x)
+ if (x < 1)
+ fun_l29_n999(x)
+ else
+ fun_l29_n370(x)
+ end
+end
+
+def fun_l28_n890(x)
+ if (x < 1)
+ fun_l29_n900(x)
+ else
+ fun_l29_n902(x)
+ end
+end
+
+def fun_l28_n891(x)
+ if (x < 1)
+ fun_l29_n180(x)
+ else
+ fun_l29_n477(x)
+ end
+end
+
+def fun_l28_n892(x)
+ if (x < 1)
+ fun_l29_n254(x)
+ else
+ fun_l29_n762(x)
+ end
+end
+
+def fun_l28_n893(x)
+ if (x < 1)
+ fun_l29_n36(x)
+ else
+ fun_l29_n198(x)
+ end
+end
+
+def fun_l28_n894(x)
+ if (x < 1)
+ fun_l29_n811(x)
+ else
+ fun_l29_n667(x)
+ end
+end
+
+def fun_l28_n895(x)
+ if (x < 1)
+ fun_l29_n711(x)
+ else
+ fun_l29_n462(x)
+ end
+end
+
+def fun_l28_n896(x)
+ if (x < 1)
+ fun_l29_n535(x)
+ else
+ fun_l29_n759(x)
+ end
+end
+
+def fun_l28_n897(x)
+ if (x < 1)
+ fun_l29_n336(x)
+ else
+ fun_l29_n72(x)
+ end
+end
+
+def fun_l28_n898(x)
+ if (x < 1)
+ fun_l29_n556(x)
+ else
+ fun_l29_n324(x)
+ end
+end
+
+def fun_l28_n899(x)
+ if (x < 1)
+ fun_l29_n821(x)
+ else
+ fun_l29_n520(x)
+ end
+end
+
+def fun_l28_n900(x)
+ if (x < 1)
+ fun_l29_n820(x)
+ else
+ fun_l29_n581(x)
+ end
+end
+
+def fun_l28_n901(x)
+ if (x < 1)
+ fun_l29_n416(x)
+ else
+ fun_l29_n662(x)
+ end
+end
+
+def fun_l28_n902(x)
+ if (x < 1)
+ fun_l29_n574(x)
+ else
+ fun_l29_n472(x)
+ end
+end
+
+def fun_l28_n903(x)
+ if (x < 1)
+ fun_l29_n140(x)
+ else
+ fun_l29_n608(x)
+ end
+end
+
+def fun_l28_n904(x)
+ if (x < 1)
+ fun_l29_n492(x)
+ else
+ fun_l29_n50(x)
+ end
+end
+
+def fun_l28_n905(x)
+ if (x < 1)
+ fun_l29_n240(x)
+ else
+ fun_l29_n308(x)
+ end
+end
+
+def fun_l28_n906(x)
+ if (x < 1)
+ fun_l29_n400(x)
+ else
+ fun_l29_n560(x)
+ end
+end
+
+def fun_l28_n907(x)
+ if (x < 1)
+ fun_l29_n974(x)
+ else
+ fun_l29_n580(x)
+ end
+end
+
+def fun_l28_n908(x)
+ if (x < 1)
+ fun_l29_n234(x)
+ else
+ fun_l29_n921(x)
+ end
+end
+
+def fun_l28_n909(x)
+ if (x < 1)
+ fun_l29_n712(x)
+ else
+ fun_l29_n861(x)
+ end
+end
+
+def fun_l28_n910(x)
+ if (x < 1)
+ fun_l29_n716(x)
+ else
+ fun_l29_n818(x)
+ end
+end
+
+def fun_l28_n911(x)
+ if (x < 1)
+ fun_l29_n574(x)
+ else
+ fun_l29_n668(x)
+ end
+end
+
+def fun_l28_n912(x)
+ if (x < 1)
+ fun_l29_n259(x)
+ else
+ fun_l29_n573(x)
+ end
+end
+
+def fun_l28_n913(x)
+ if (x < 1)
+ fun_l29_n427(x)
+ else
+ fun_l29_n572(x)
+ end
+end
+
+def fun_l28_n914(x)
+ if (x < 1)
+ fun_l29_n449(x)
+ else
+ fun_l29_n25(x)
+ end
+end
+
+def fun_l28_n915(x)
+ if (x < 1)
+ fun_l29_n234(x)
+ else
+ fun_l29_n391(x)
+ end
+end
+
+def fun_l28_n916(x)
+ if (x < 1)
+ fun_l29_n115(x)
+ else
+ fun_l29_n918(x)
+ end
+end
+
+def fun_l28_n917(x)
+ if (x < 1)
+ fun_l29_n83(x)
+ else
+ fun_l29_n295(x)
+ end
+end
+
+def fun_l28_n918(x)
+ if (x < 1)
+ fun_l29_n917(x)
+ else
+ fun_l29_n542(x)
+ end
+end
+
+def fun_l28_n919(x)
+ if (x < 1)
+ fun_l29_n836(x)
+ else
+ fun_l29_n460(x)
+ end
+end
+
+def fun_l28_n920(x)
+ if (x < 1)
+ fun_l29_n333(x)
+ else
+ fun_l29_n622(x)
+ end
+end
+
+def fun_l28_n921(x)
+ if (x < 1)
+ fun_l29_n717(x)
+ else
+ fun_l29_n342(x)
+ end
+end
+
+def fun_l28_n922(x)
+ if (x < 1)
+ fun_l29_n670(x)
+ else
+ fun_l29_n735(x)
+ end
+end
+
+def fun_l28_n923(x)
+ if (x < 1)
+ fun_l29_n723(x)
+ else
+ fun_l29_n994(x)
+ end
+end
+
+def fun_l28_n924(x)
+ if (x < 1)
+ fun_l29_n477(x)
+ else
+ fun_l29_n234(x)
+ end
+end
+
+def fun_l28_n925(x)
+ if (x < 1)
+ fun_l29_n514(x)
+ else
+ fun_l29_n194(x)
+ end
+end
+
+def fun_l28_n926(x)
+ if (x < 1)
+ fun_l29_n33(x)
+ else
+ fun_l29_n149(x)
+ end
+end
+
+def fun_l28_n927(x)
+ if (x < 1)
+ fun_l29_n805(x)
+ else
+ fun_l29_n9(x)
+ end
+end
+
+def fun_l28_n928(x)
+ if (x < 1)
+ fun_l29_n351(x)
+ else
+ fun_l29_n250(x)
+ end
+end
+
+def fun_l28_n929(x)
+ if (x < 1)
+ fun_l29_n22(x)
+ else
+ fun_l29_n294(x)
+ end
+end
+
+def fun_l28_n930(x)
+ if (x < 1)
+ fun_l29_n456(x)
+ else
+ fun_l29_n194(x)
+ end
+end
+
+def fun_l28_n931(x)
+ if (x < 1)
+ fun_l29_n354(x)
+ else
+ fun_l29_n341(x)
+ end
+end
+
+def fun_l28_n932(x)
+ if (x < 1)
+ fun_l29_n782(x)
+ else
+ fun_l29_n159(x)
+ end
+end
+
+def fun_l28_n933(x)
+ if (x < 1)
+ fun_l29_n636(x)
+ else
+ fun_l29_n588(x)
+ end
+end
+
+def fun_l28_n934(x)
+ if (x < 1)
+ fun_l29_n473(x)
+ else
+ fun_l29_n527(x)
+ end
+end
+
+def fun_l28_n935(x)
+ if (x < 1)
+ fun_l29_n776(x)
+ else
+ fun_l29_n349(x)
+ end
+end
+
+def fun_l28_n936(x)
+ if (x < 1)
+ fun_l29_n786(x)
+ else
+ fun_l29_n95(x)
+ end
+end
+
+def fun_l28_n937(x)
+ if (x < 1)
+ fun_l29_n276(x)
+ else
+ fun_l29_n952(x)
+ end
+end
+
+def fun_l28_n938(x)
+ if (x < 1)
+ fun_l29_n826(x)
+ else
+ fun_l29_n183(x)
+ end
+end
+
+def fun_l28_n939(x)
+ if (x < 1)
+ fun_l29_n11(x)
+ else
+ fun_l29_n775(x)
+ end
+end
+
+def fun_l28_n940(x)
+ if (x < 1)
+ fun_l29_n161(x)
+ else
+ fun_l29_n255(x)
+ end
+end
+
+def fun_l28_n941(x)
+ if (x < 1)
+ fun_l29_n77(x)
+ else
+ fun_l29_n673(x)
+ end
+end
+
+def fun_l28_n942(x)
+ if (x < 1)
+ fun_l29_n659(x)
+ else
+ fun_l29_n413(x)
+ end
+end
+
+def fun_l28_n943(x)
+ if (x < 1)
+ fun_l29_n827(x)
+ else
+ fun_l29_n262(x)
+ end
+end
+
+def fun_l28_n944(x)
+ if (x < 1)
+ fun_l29_n720(x)
+ else
+ fun_l29_n476(x)
+ end
+end
+
+def fun_l28_n945(x)
+ if (x < 1)
+ fun_l29_n457(x)
+ else
+ fun_l29_n613(x)
+ end
+end
+
+def fun_l28_n946(x)
+ if (x < 1)
+ fun_l29_n137(x)
+ else
+ fun_l29_n763(x)
+ end
+end
+
+def fun_l28_n947(x)
+ if (x < 1)
+ fun_l29_n569(x)
+ else
+ fun_l29_n331(x)
+ end
+end
+
+def fun_l28_n948(x)
+ if (x < 1)
+ fun_l29_n687(x)
+ else
+ fun_l29_n684(x)
+ end
+end
+
+def fun_l28_n949(x)
+ if (x < 1)
+ fun_l29_n532(x)
+ else
+ fun_l29_n203(x)
+ end
+end
+
+def fun_l28_n950(x)
+ if (x < 1)
+ fun_l29_n211(x)
+ else
+ fun_l29_n606(x)
+ end
+end
+
+def fun_l28_n951(x)
+ if (x < 1)
+ fun_l29_n522(x)
+ else
+ fun_l29_n907(x)
+ end
+end
+
+def fun_l28_n952(x)
+ if (x < 1)
+ fun_l29_n64(x)
+ else
+ fun_l29_n742(x)
+ end
+end
+
+def fun_l28_n953(x)
+ if (x < 1)
+ fun_l29_n28(x)
+ else
+ fun_l29_n712(x)
+ end
+end
+
+def fun_l28_n954(x)
+ if (x < 1)
+ fun_l29_n177(x)
+ else
+ fun_l29_n327(x)
+ end
+end
+
+def fun_l28_n955(x)
+ if (x < 1)
+ fun_l29_n274(x)
+ else
+ fun_l29_n830(x)
+ end
+end
+
+def fun_l28_n956(x)
+ if (x < 1)
+ fun_l29_n709(x)
+ else
+ fun_l29_n115(x)
+ end
+end
+
+def fun_l28_n957(x)
+ if (x < 1)
+ fun_l29_n72(x)
+ else
+ fun_l29_n849(x)
+ end
+end
+
+def fun_l28_n958(x)
+ if (x < 1)
+ fun_l29_n347(x)
+ else
+ fun_l29_n317(x)
+ end
+end
+
+def fun_l28_n959(x)
+ if (x < 1)
+ fun_l29_n540(x)
+ else
+ fun_l29_n226(x)
+ end
+end
+
+def fun_l28_n960(x)
+ if (x < 1)
+ fun_l29_n383(x)
+ else
+ fun_l29_n634(x)
+ end
+end
+
+def fun_l28_n961(x)
+ if (x < 1)
+ fun_l29_n616(x)
+ else
+ fun_l29_n300(x)
+ end
+end
+
+def fun_l28_n962(x)
+ if (x < 1)
+ fun_l29_n955(x)
+ else
+ fun_l29_n861(x)
+ end
+end
+
+def fun_l28_n963(x)
+ if (x < 1)
+ fun_l29_n143(x)
+ else
+ fun_l29_n106(x)
+ end
+end
+
+def fun_l28_n964(x)
+ if (x < 1)
+ fun_l29_n883(x)
+ else
+ fun_l29_n997(x)
+ end
+end
+
+def fun_l28_n965(x)
+ if (x < 1)
+ fun_l29_n247(x)
+ else
+ fun_l29_n471(x)
+ end
+end
+
+def fun_l28_n966(x)
+ if (x < 1)
+ fun_l29_n237(x)
+ else
+ fun_l29_n107(x)
+ end
+end
+
+def fun_l28_n967(x)
+ if (x < 1)
+ fun_l29_n754(x)
+ else
+ fun_l29_n996(x)
+ end
+end
+
+def fun_l28_n968(x)
+ if (x < 1)
+ fun_l29_n951(x)
+ else
+ fun_l29_n216(x)
+ end
+end
+
+def fun_l28_n969(x)
+ if (x < 1)
+ fun_l29_n36(x)
+ else
+ fun_l29_n815(x)
+ end
+end
+
+def fun_l28_n970(x)
+ if (x < 1)
+ fun_l29_n362(x)
+ else
+ fun_l29_n27(x)
+ end
+end
+
+def fun_l28_n971(x)
+ if (x < 1)
+ fun_l29_n837(x)
+ else
+ fun_l29_n230(x)
+ end
+end
+
+def fun_l28_n972(x)
+ if (x < 1)
+ fun_l29_n295(x)
+ else
+ fun_l29_n772(x)
+ end
+end
+
+def fun_l28_n973(x)
+ if (x < 1)
+ fun_l29_n570(x)
+ else
+ fun_l29_n514(x)
+ end
+end
+
+def fun_l28_n974(x)
+ if (x < 1)
+ fun_l29_n151(x)
+ else
+ fun_l29_n368(x)
+ end
+end
+
+def fun_l28_n975(x)
+ if (x < 1)
+ fun_l29_n229(x)
+ else
+ fun_l29_n408(x)
+ end
+end
+
+def fun_l28_n976(x)
+ if (x < 1)
+ fun_l29_n209(x)
+ else
+ fun_l29_n513(x)
+ end
+end
+
+def fun_l28_n977(x)
+ if (x < 1)
+ fun_l29_n753(x)
+ else
+ fun_l29_n36(x)
+ end
+end
+
+def fun_l28_n978(x)
+ if (x < 1)
+ fun_l29_n887(x)
+ else
+ fun_l29_n330(x)
+ end
+end
+
+def fun_l28_n979(x)
+ if (x < 1)
+ fun_l29_n880(x)
+ else
+ fun_l29_n6(x)
+ end
+end
+
+def fun_l28_n980(x)
+ if (x < 1)
+ fun_l29_n953(x)
+ else
+ fun_l29_n573(x)
+ end
+end
+
+def fun_l28_n981(x)
+ if (x < 1)
+ fun_l29_n960(x)
+ else
+ fun_l29_n774(x)
+ end
+end
+
+def fun_l28_n982(x)
+ if (x < 1)
+ fun_l29_n769(x)
+ else
+ fun_l29_n43(x)
+ end
+end
+
+def fun_l28_n983(x)
+ if (x < 1)
+ fun_l29_n43(x)
+ else
+ fun_l29_n168(x)
+ end
+end
+
+def fun_l28_n984(x)
+ if (x < 1)
+ fun_l29_n70(x)
+ else
+ fun_l29_n695(x)
+ end
+end
+
+def fun_l28_n985(x)
+ if (x < 1)
+ fun_l29_n421(x)
+ else
+ fun_l29_n9(x)
+ end
+end
+
+def fun_l28_n986(x)
+ if (x < 1)
+ fun_l29_n588(x)
+ else
+ fun_l29_n916(x)
+ end
+end
+
+def fun_l28_n987(x)
+ if (x < 1)
+ fun_l29_n693(x)
+ else
+ fun_l29_n979(x)
+ end
+end
+
+def fun_l28_n988(x)
+ if (x < 1)
+ fun_l29_n684(x)
+ else
+ fun_l29_n342(x)
+ end
+end
+
+def fun_l28_n989(x)
+ if (x < 1)
+ fun_l29_n148(x)
+ else
+ fun_l29_n348(x)
+ end
+end
+
+def fun_l28_n990(x)
+ if (x < 1)
+ fun_l29_n740(x)
+ else
+ fun_l29_n120(x)
+ end
+end
+
+def fun_l28_n991(x)
+ if (x < 1)
+ fun_l29_n258(x)
+ else
+ fun_l29_n670(x)
+ end
+end
+
+def fun_l28_n992(x)
+ if (x < 1)
+ fun_l29_n514(x)
+ else
+ fun_l29_n198(x)
+ end
+end
+
+def fun_l28_n993(x)
+ if (x < 1)
+ fun_l29_n563(x)
+ else
+ fun_l29_n174(x)
+ end
+end
+
+def fun_l28_n994(x)
+ if (x < 1)
+ fun_l29_n391(x)
+ else
+ fun_l29_n689(x)
+ end
+end
+
+def fun_l28_n995(x)
+ if (x < 1)
+ fun_l29_n156(x)
+ else
+ fun_l29_n579(x)
+ end
+end
+
+def fun_l28_n996(x)
+ if (x < 1)
+ fun_l29_n411(x)
+ else
+ fun_l29_n212(x)
+ end
+end
+
+def fun_l28_n997(x)
+ if (x < 1)
+ fun_l29_n709(x)
+ else
+ fun_l29_n735(x)
+ end
+end
+
+def fun_l28_n998(x)
+ if (x < 1)
+ fun_l29_n960(x)
+ else
+ fun_l29_n813(x)
+ end
+end
+
+def fun_l28_n999(x)
+ if (x < 1)
+ fun_l29_n553(x)
+ else
+ fun_l29_n875(x)
+ end
+end
+
+def fun_l29_n0(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n1(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n2(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n3(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n4(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n5(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n6(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n7(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n8(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n9(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n10(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n11(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n12(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n13(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n14(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n15(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n16(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n17(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n18(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n19(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n20(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n21(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n22(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n23(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n24(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n25(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n26(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n27(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n28(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n29(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n30(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n31(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n32(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n33(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n34(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n35(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n36(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n37(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n38(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n39(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n40(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n41(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n42(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n43(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n44(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n45(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n46(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n47(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n48(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n49(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n50(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n51(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n52(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n53(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n54(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n55(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n56(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n57(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n58(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n59(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n60(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n61(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n62(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n63(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n64(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n65(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n66(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n67(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n68(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n69(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n70(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n71(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n72(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n73(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n74(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n75(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n76(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n77(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n78(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n79(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n80(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n81(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n82(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n83(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n84(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n85(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n86(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n87(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n88(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n89(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n90(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n91(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n92(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n93(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n94(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n95(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n96(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n97(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n98(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n99(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n100(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n101(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n102(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n103(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n104(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n105(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n106(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n107(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n108(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n109(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n110(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n111(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n112(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n113(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n114(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n115(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n116(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n117(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n118(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n119(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n120(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n121(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n122(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n123(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n124(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n125(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n126(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n127(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n128(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n129(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n130(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n131(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n132(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n133(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n134(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n135(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n136(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n137(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n138(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n139(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n140(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n141(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n142(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n143(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n144(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n145(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n146(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n147(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n148(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n149(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n150(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n151(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n152(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n153(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n154(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n155(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n156(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n157(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n158(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n159(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n160(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n161(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n162(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n163(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n164(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n165(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n166(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n167(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n168(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n169(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n170(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n171(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n172(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n173(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n174(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n175(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n176(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n177(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n178(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n179(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n180(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n181(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n182(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n183(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n184(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n185(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n186(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n187(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n188(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n189(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n190(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n191(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n192(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n193(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n194(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n195(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n196(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n197(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n198(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n199(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n200(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n201(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n202(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n203(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n204(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n205(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n206(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n207(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n208(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n209(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n210(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n211(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n212(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n213(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n214(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n215(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n216(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n217(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n218(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n219(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n220(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n221(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n222(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n223(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n224(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n225(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n226(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n227(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n228(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n229(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n230(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n231(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n232(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n233(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n234(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n235(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n236(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n237(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n238(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n239(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n240(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n241(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n242(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n243(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n244(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n245(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n246(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n247(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n248(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n249(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n250(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n251(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n252(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n253(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n254(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n255(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n256(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n257(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n258(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n259(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n260(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n261(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n262(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n263(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n264(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n265(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n266(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n267(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n268(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n269(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n270(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n271(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n272(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n273(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n274(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n275(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n276(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n277(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n278(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n279(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n280(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n281(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n282(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n283(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n284(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n285(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n286(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n287(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n288(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n289(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n290(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n291(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n292(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n293(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n294(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n295(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n296(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n297(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n298(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n299(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n300(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n301(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n302(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n303(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n304(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n305(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n306(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n307(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n308(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n309(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n310(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n311(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n312(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n313(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n314(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n315(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n316(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n317(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n318(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n319(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n320(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n321(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n322(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n323(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n324(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n325(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n326(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n327(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n328(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n329(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n330(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n331(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n332(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n333(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n334(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n335(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n336(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n337(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n338(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n339(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n340(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n341(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n342(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n343(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n344(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n345(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n346(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n347(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n348(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n349(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n350(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n351(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n352(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n353(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n354(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n355(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n356(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n357(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n358(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n359(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n360(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n361(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n362(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n363(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n364(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n365(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n366(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n367(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n368(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n369(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n370(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n371(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n372(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n373(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n374(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n375(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n376(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n377(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n378(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n379(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n380(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n381(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n382(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n383(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n384(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n385(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n386(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n387(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n388(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n389(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n390(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n391(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n392(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n393(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n394(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n395(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n396(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n397(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n398(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n399(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n400(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n401(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n402(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n403(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n404(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n405(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n406(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n407(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n408(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n409(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n410(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n411(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n412(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n413(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n414(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n415(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n416(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n417(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n418(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n419(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n420(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n421(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n422(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n423(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n424(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n425(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n426(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n427(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n428(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n429(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n430(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n431(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n432(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n433(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n434(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n435(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n436(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n437(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n438(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n439(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n440(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n441(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n442(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n443(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n444(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n445(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n446(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n447(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n448(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n449(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n450(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n451(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n452(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n453(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n454(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n455(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n456(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n457(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n458(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n459(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n460(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n461(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n462(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n463(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n464(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n465(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n466(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n467(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n468(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n469(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n470(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n471(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n472(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n473(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n474(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n475(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n476(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n477(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n478(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n479(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n480(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n481(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n482(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n483(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n484(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n485(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n486(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n487(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n488(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n489(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n490(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n491(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n492(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n493(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n494(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n495(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n496(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n497(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n498(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n499(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n500(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n501(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n502(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n503(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n504(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n505(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n506(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n507(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n508(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n509(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n510(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n511(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n512(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n513(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n514(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n515(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n516(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n517(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n518(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n519(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n520(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n521(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n522(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n523(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n524(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n525(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n526(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n527(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n528(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n529(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n530(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n531(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n532(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n533(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n534(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n535(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n536(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n537(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n538(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n539(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n540(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n541(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n542(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n543(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n544(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n545(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n546(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n547(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n548(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n549(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n550(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n551(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n552(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n553(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n554(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n555(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n556(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n557(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n558(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n559(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n560(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n561(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n562(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n563(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n564(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n565(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n566(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n567(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n568(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n569(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n570(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n571(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n572(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n573(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n574(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n575(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n576(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n577(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n578(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n579(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n580(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n581(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n582(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n583(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n584(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n585(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n586(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n587(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n588(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n589(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n590(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n591(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n592(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n593(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n594(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n595(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n596(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n597(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n598(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n599(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n600(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n601(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n602(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n603(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n604(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n605(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n606(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n607(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n608(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n609(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n610(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n611(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n612(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n613(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n614(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n615(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n616(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n617(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n618(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n619(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n620(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n621(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n622(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n623(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n624(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n625(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n626(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n627(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n628(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n629(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n630(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n631(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n632(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n633(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n634(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n635(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n636(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n637(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n638(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n639(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n640(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n641(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n642(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n643(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n644(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n645(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n646(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n647(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n648(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n649(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n650(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n651(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n652(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n653(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n654(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n655(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n656(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n657(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n658(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n659(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n660(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n661(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n662(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n663(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n664(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n665(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n666(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n667(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n668(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n669(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n670(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n671(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n672(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n673(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n674(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n675(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n676(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n677(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n678(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n679(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n680(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n681(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n682(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n683(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n684(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n685(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n686(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n687(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n688(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n689(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n690(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n691(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n692(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n693(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n694(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n695(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n696(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n697(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n698(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n699(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n700(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n701(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n702(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n703(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n704(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n705(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n706(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n707(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n708(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n709(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n710(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n711(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n712(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n713(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n714(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n715(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n716(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n717(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n718(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n719(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n720(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n721(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n722(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n723(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n724(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n725(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n726(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n727(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n728(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n729(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n730(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n731(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n732(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n733(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n734(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n735(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n736(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n737(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n738(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n739(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n740(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n741(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n742(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n743(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n744(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n745(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n746(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n747(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n748(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n749(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n750(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n751(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n752(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n753(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n754(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n755(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n756(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n757(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n758(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n759(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n760(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n761(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n762(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n763(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n764(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n765(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n766(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n767(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n768(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n769(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n770(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n771(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n772(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n773(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n774(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n775(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n776(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n777(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n778(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n779(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n780(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n781(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n782(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n783(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n784(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n785(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n786(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n787(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n788(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n789(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n790(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n791(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n792(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n793(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n794(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n795(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n796(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n797(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n798(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n799(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n800(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n801(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n802(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n803(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n804(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n805(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n806(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n807(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n808(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n809(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n810(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n811(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n812(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n813(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n814(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n815(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n816(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n817(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n818(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n819(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n820(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n821(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n822(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n823(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n824(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n825(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n826(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n827(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n828(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n829(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n830(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n831(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n832(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n833(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n834(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n835(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n836(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n837(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n838(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n839(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n840(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n841(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n842(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n843(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n844(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n845(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n846(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n847(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n848(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n849(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n850(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n851(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n852(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n853(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n854(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n855(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n856(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n857(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n858(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n859(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n860(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n861(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n862(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n863(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n864(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n865(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n866(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n867(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n868(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n869(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n870(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n871(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n872(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n873(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n874(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n875(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n876(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n877(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n878(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n879(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n880(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n881(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n882(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n883(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n884(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n885(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n886(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n887(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n888(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n889(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n890(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n891(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n892(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n893(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n894(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n895(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n896(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n897(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n898(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n899(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n900(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n901(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n902(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n903(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n904(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n905(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n906(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n907(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n908(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n909(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n910(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n911(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n912(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n913(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n914(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n915(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n916(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n917(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n918(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n919(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n920(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n921(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n922(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n923(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n924(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n925(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n926(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n927(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n928(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n929(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n930(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n931(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n932(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n933(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n934(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n935(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n936(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n937(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n938(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n939(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n940(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n941(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n942(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n943(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n944(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n945(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n946(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n947(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n948(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n949(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n950(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n951(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n952(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n953(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n954(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n955(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n956(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n957(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n958(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n959(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n960(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n961(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n962(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n963(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n964(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n965(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n966(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n967(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n968(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n969(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n970(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n971(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n972(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n973(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n974(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n975(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n976(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n977(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n978(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n979(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n980(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n981(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n982(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n983(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n984(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n985(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n986(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n987(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n988(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n989(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n990(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n991(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n992(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n993(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n994(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n995(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n996(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n997(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n998(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+def fun_l29_n999(x)
+ if (x < 1)
+ inc(x)
+ else
+ inc(x)
+ end
+end
+
+@a = 0
+@b = 0
+@c = 0
+@d = 0
+
+@count = 0
+def inc(x)
+ @count += 1
+end
+
+@x = 0
+
+100.times do
+ @x = (@x < 1)? 1:0
+ fun_l0_n0(@x)
+ fun_l0_n1(@x)
+ fun_l0_n2(@x)
+ fun_l0_n3(@x)
+ fun_l0_n4(@x)
+ fun_l0_n5(@x)
+ fun_l0_n6(@x)
+ fun_l0_n7(@x)
+ fun_l0_n8(@x)
+ fun_l0_n9(@x)
+ fun_l0_n10(@x)
+ fun_l0_n11(@x)
+ fun_l0_n12(@x)
+ fun_l0_n13(@x)
+ fun_l0_n14(@x)
+ fun_l0_n15(@x)
+ fun_l0_n16(@x)
+ fun_l0_n17(@x)
+ fun_l0_n18(@x)
+ fun_l0_n19(@x)
+ fun_l0_n20(@x)
+ fun_l0_n21(@x)
+ fun_l0_n22(@x)
+ fun_l0_n23(@x)
+ fun_l0_n24(@x)
+ fun_l0_n25(@x)
+ fun_l0_n26(@x)
+ fun_l0_n27(@x)
+ fun_l0_n28(@x)
+ fun_l0_n29(@x)
+ fun_l0_n30(@x)
+ fun_l0_n31(@x)
+ fun_l0_n32(@x)
+ fun_l0_n33(@x)
+ fun_l0_n34(@x)
+ fun_l0_n35(@x)
+ fun_l0_n36(@x)
+ fun_l0_n37(@x)
+ fun_l0_n38(@x)
+ fun_l0_n39(@x)
+ fun_l0_n40(@x)
+ fun_l0_n41(@x)
+ fun_l0_n42(@x)
+ fun_l0_n43(@x)
+ fun_l0_n44(@x)
+ fun_l0_n45(@x)
+ fun_l0_n46(@x)
+ fun_l0_n47(@x)
+ fun_l0_n48(@x)
+ fun_l0_n49(@x)
+ fun_l0_n50(@x)
+ fun_l0_n51(@x)
+ fun_l0_n52(@x)
+ fun_l0_n53(@x)
+ fun_l0_n54(@x)
+ fun_l0_n55(@x)
+ fun_l0_n56(@x)
+ fun_l0_n57(@x)
+ fun_l0_n58(@x)
+ fun_l0_n59(@x)
+ fun_l0_n60(@x)
+ fun_l0_n61(@x)
+ fun_l0_n62(@x)
+ fun_l0_n63(@x)
+ fun_l0_n64(@x)
+ fun_l0_n65(@x)
+ fun_l0_n66(@x)
+ fun_l0_n67(@x)
+ fun_l0_n68(@x)
+ fun_l0_n69(@x)
+ fun_l0_n70(@x)
+ fun_l0_n71(@x)
+ fun_l0_n72(@x)
+ fun_l0_n73(@x)
+ fun_l0_n74(@x)
+ fun_l0_n75(@x)
+ fun_l0_n76(@x)
+ fun_l0_n77(@x)
+ fun_l0_n78(@x)
+ fun_l0_n79(@x)
+ fun_l0_n80(@x)
+ fun_l0_n81(@x)
+ fun_l0_n82(@x)
+ fun_l0_n83(@x)
+ fun_l0_n84(@x)
+ fun_l0_n85(@x)
+ fun_l0_n86(@x)
+ fun_l0_n87(@x)
+ fun_l0_n88(@x)
+ fun_l0_n89(@x)
+ fun_l0_n90(@x)
+ fun_l0_n91(@x)
+ fun_l0_n92(@x)
+ fun_l0_n93(@x)
+ fun_l0_n94(@x)
+ fun_l0_n95(@x)
+ fun_l0_n96(@x)
+ fun_l0_n97(@x)
+ fun_l0_n98(@x)
+ fun_l0_n99(@x)
+ fun_l0_n100(@x)
+ fun_l0_n101(@x)
+ fun_l0_n102(@x)
+ fun_l0_n103(@x)
+ fun_l0_n104(@x)
+ fun_l0_n105(@x)
+ fun_l0_n106(@x)
+ fun_l0_n107(@x)
+ fun_l0_n108(@x)
+ fun_l0_n109(@x)
+ fun_l0_n110(@x)
+ fun_l0_n111(@x)
+ fun_l0_n112(@x)
+ fun_l0_n113(@x)
+ fun_l0_n114(@x)
+ fun_l0_n115(@x)
+ fun_l0_n116(@x)
+ fun_l0_n117(@x)
+ fun_l0_n118(@x)
+ fun_l0_n119(@x)
+ fun_l0_n120(@x)
+ fun_l0_n121(@x)
+ fun_l0_n122(@x)
+ fun_l0_n123(@x)
+ fun_l0_n124(@x)
+ fun_l0_n125(@x)
+ fun_l0_n126(@x)
+ fun_l0_n127(@x)
+ fun_l0_n128(@x)
+ fun_l0_n129(@x)
+ fun_l0_n130(@x)
+ fun_l0_n131(@x)
+ fun_l0_n132(@x)
+ fun_l0_n133(@x)
+ fun_l0_n134(@x)
+ fun_l0_n135(@x)
+ fun_l0_n136(@x)
+ fun_l0_n137(@x)
+ fun_l0_n138(@x)
+ fun_l0_n139(@x)
+ fun_l0_n140(@x)
+ fun_l0_n141(@x)
+ fun_l0_n142(@x)
+ fun_l0_n143(@x)
+ fun_l0_n144(@x)
+ fun_l0_n145(@x)
+ fun_l0_n146(@x)
+ fun_l0_n147(@x)
+ fun_l0_n148(@x)
+ fun_l0_n149(@x)
+ fun_l0_n150(@x)
+ fun_l0_n151(@x)
+ fun_l0_n152(@x)
+ fun_l0_n153(@x)
+ fun_l0_n154(@x)
+ fun_l0_n155(@x)
+ fun_l0_n156(@x)
+ fun_l0_n157(@x)
+ fun_l0_n158(@x)
+ fun_l0_n159(@x)
+ fun_l0_n160(@x)
+ fun_l0_n161(@x)
+ fun_l0_n162(@x)
+ fun_l0_n163(@x)
+ fun_l0_n164(@x)
+ fun_l0_n165(@x)
+ fun_l0_n166(@x)
+ fun_l0_n167(@x)
+ fun_l0_n168(@x)
+ fun_l0_n169(@x)
+ fun_l0_n170(@x)
+ fun_l0_n171(@x)
+ fun_l0_n172(@x)
+ fun_l0_n173(@x)
+ fun_l0_n174(@x)
+ fun_l0_n175(@x)
+ fun_l0_n176(@x)
+ fun_l0_n177(@x)
+ fun_l0_n178(@x)
+ fun_l0_n179(@x)
+ fun_l0_n180(@x)
+ fun_l0_n181(@x)
+ fun_l0_n182(@x)
+ fun_l0_n183(@x)
+ fun_l0_n184(@x)
+ fun_l0_n185(@x)
+ fun_l0_n186(@x)
+ fun_l0_n187(@x)
+ fun_l0_n188(@x)
+ fun_l0_n189(@x)
+ fun_l0_n190(@x)
+ fun_l0_n191(@x)
+ fun_l0_n192(@x)
+ fun_l0_n193(@x)
+ fun_l0_n194(@x)
+ fun_l0_n195(@x)
+ fun_l0_n196(@x)
+ fun_l0_n197(@x)
+ fun_l0_n198(@x)
+ fun_l0_n199(@x)
+ fun_l0_n200(@x)
+ fun_l0_n201(@x)
+ fun_l0_n202(@x)
+ fun_l0_n203(@x)
+ fun_l0_n204(@x)
+ fun_l0_n205(@x)
+ fun_l0_n206(@x)
+ fun_l0_n207(@x)
+ fun_l0_n208(@x)
+ fun_l0_n209(@x)
+ fun_l0_n210(@x)
+ fun_l0_n211(@x)
+ fun_l0_n212(@x)
+ fun_l0_n213(@x)
+ fun_l0_n214(@x)
+ fun_l0_n215(@x)
+ fun_l0_n216(@x)
+ fun_l0_n217(@x)
+ fun_l0_n218(@x)
+ fun_l0_n219(@x)
+ fun_l0_n220(@x)
+ fun_l0_n221(@x)
+ fun_l0_n222(@x)
+ fun_l0_n223(@x)
+ fun_l0_n224(@x)
+ fun_l0_n225(@x)
+ fun_l0_n226(@x)
+ fun_l0_n227(@x)
+ fun_l0_n228(@x)
+ fun_l0_n229(@x)
+ fun_l0_n230(@x)
+ fun_l0_n231(@x)
+ fun_l0_n232(@x)
+ fun_l0_n233(@x)
+ fun_l0_n234(@x)
+ fun_l0_n235(@x)
+ fun_l0_n236(@x)
+ fun_l0_n237(@x)
+ fun_l0_n238(@x)
+ fun_l0_n239(@x)
+ fun_l0_n240(@x)
+ fun_l0_n241(@x)
+ fun_l0_n242(@x)
+ fun_l0_n243(@x)
+ fun_l0_n244(@x)
+ fun_l0_n245(@x)
+ fun_l0_n246(@x)
+ fun_l0_n247(@x)
+ fun_l0_n248(@x)
+ fun_l0_n249(@x)
+ fun_l0_n250(@x)
+ fun_l0_n251(@x)
+ fun_l0_n252(@x)
+ fun_l0_n253(@x)
+ fun_l0_n254(@x)
+ fun_l0_n255(@x)
+ fun_l0_n256(@x)
+ fun_l0_n257(@x)
+ fun_l0_n258(@x)
+ fun_l0_n259(@x)
+ fun_l0_n260(@x)
+ fun_l0_n261(@x)
+ fun_l0_n262(@x)
+ fun_l0_n263(@x)
+ fun_l0_n264(@x)
+ fun_l0_n265(@x)
+ fun_l0_n266(@x)
+ fun_l0_n267(@x)
+ fun_l0_n268(@x)
+ fun_l0_n269(@x)
+ fun_l0_n270(@x)
+ fun_l0_n271(@x)
+ fun_l0_n272(@x)
+ fun_l0_n273(@x)
+ fun_l0_n274(@x)
+ fun_l0_n275(@x)
+ fun_l0_n276(@x)
+ fun_l0_n277(@x)
+ fun_l0_n278(@x)
+ fun_l0_n279(@x)
+ fun_l0_n280(@x)
+ fun_l0_n281(@x)
+ fun_l0_n282(@x)
+ fun_l0_n283(@x)
+ fun_l0_n284(@x)
+ fun_l0_n285(@x)
+ fun_l0_n286(@x)
+ fun_l0_n287(@x)
+ fun_l0_n288(@x)
+ fun_l0_n289(@x)
+ fun_l0_n290(@x)
+ fun_l0_n291(@x)
+ fun_l0_n292(@x)
+ fun_l0_n293(@x)
+ fun_l0_n294(@x)
+ fun_l0_n295(@x)
+ fun_l0_n296(@x)
+ fun_l0_n297(@x)
+ fun_l0_n298(@x)
+ fun_l0_n299(@x)
+ fun_l0_n300(@x)
+ fun_l0_n301(@x)
+ fun_l0_n302(@x)
+ fun_l0_n303(@x)
+ fun_l0_n304(@x)
+ fun_l0_n305(@x)
+ fun_l0_n306(@x)
+ fun_l0_n307(@x)
+ fun_l0_n308(@x)
+ fun_l0_n309(@x)
+ fun_l0_n310(@x)
+ fun_l0_n311(@x)
+ fun_l0_n312(@x)
+ fun_l0_n313(@x)
+ fun_l0_n314(@x)
+ fun_l0_n315(@x)
+ fun_l0_n316(@x)
+ fun_l0_n317(@x)
+ fun_l0_n318(@x)
+ fun_l0_n319(@x)
+ fun_l0_n320(@x)
+ fun_l0_n321(@x)
+ fun_l0_n322(@x)
+ fun_l0_n323(@x)
+ fun_l0_n324(@x)
+ fun_l0_n325(@x)
+ fun_l0_n326(@x)
+ fun_l0_n327(@x)
+ fun_l0_n328(@x)
+ fun_l0_n329(@x)
+ fun_l0_n330(@x)
+ fun_l0_n331(@x)
+ fun_l0_n332(@x)
+ fun_l0_n333(@x)
+ fun_l0_n334(@x)
+ fun_l0_n335(@x)
+ fun_l0_n336(@x)
+ fun_l0_n337(@x)
+ fun_l0_n338(@x)
+ fun_l0_n339(@x)
+ fun_l0_n340(@x)
+ fun_l0_n341(@x)
+ fun_l0_n342(@x)
+ fun_l0_n343(@x)
+ fun_l0_n344(@x)
+ fun_l0_n345(@x)
+ fun_l0_n346(@x)
+ fun_l0_n347(@x)
+ fun_l0_n348(@x)
+ fun_l0_n349(@x)
+ fun_l0_n350(@x)
+ fun_l0_n351(@x)
+ fun_l0_n352(@x)
+ fun_l0_n353(@x)
+ fun_l0_n354(@x)
+ fun_l0_n355(@x)
+ fun_l0_n356(@x)
+ fun_l0_n357(@x)
+ fun_l0_n358(@x)
+ fun_l0_n359(@x)
+ fun_l0_n360(@x)
+ fun_l0_n361(@x)
+ fun_l0_n362(@x)
+ fun_l0_n363(@x)
+ fun_l0_n364(@x)
+ fun_l0_n365(@x)
+ fun_l0_n366(@x)
+ fun_l0_n367(@x)
+ fun_l0_n368(@x)
+ fun_l0_n369(@x)
+ fun_l0_n370(@x)
+ fun_l0_n371(@x)
+ fun_l0_n372(@x)
+ fun_l0_n373(@x)
+ fun_l0_n374(@x)
+ fun_l0_n375(@x)
+ fun_l0_n376(@x)
+ fun_l0_n377(@x)
+ fun_l0_n378(@x)
+ fun_l0_n379(@x)
+ fun_l0_n380(@x)
+ fun_l0_n381(@x)
+ fun_l0_n382(@x)
+ fun_l0_n383(@x)
+ fun_l0_n384(@x)
+ fun_l0_n385(@x)
+ fun_l0_n386(@x)
+ fun_l0_n387(@x)
+ fun_l0_n388(@x)
+ fun_l0_n389(@x)
+ fun_l0_n390(@x)
+ fun_l0_n391(@x)
+ fun_l0_n392(@x)
+ fun_l0_n393(@x)
+ fun_l0_n394(@x)
+ fun_l0_n395(@x)
+ fun_l0_n396(@x)
+ fun_l0_n397(@x)
+ fun_l0_n398(@x)
+ fun_l0_n399(@x)
+ fun_l0_n400(@x)
+ fun_l0_n401(@x)
+ fun_l0_n402(@x)
+ fun_l0_n403(@x)
+ fun_l0_n404(@x)
+ fun_l0_n405(@x)
+ fun_l0_n406(@x)
+ fun_l0_n407(@x)
+ fun_l0_n408(@x)
+ fun_l0_n409(@x)
+ fun_l0_n410(@x)
+ fun_l0_n411(@x)
+ fun_l0_n412(@x)
+ fun_l0_n413(@x)
+ fun_l0_n414(@x)
+ fun_l0_n415(@x)
+ fun_l0_n416(@x)
+ fun_l0_n417(@x)
+ fun_l0_n418(@x)
+ fun_l0_n419(@x)
+ fun_l0_n420(@x)
+ fun_l0_n421(@x)
+ fun_l0_n422(@x)
+ fun_l0_n423(@x)
+ fun_l0_n424(@x)
+ fun_l0_n425(@x)
+ fun_l0_n426(@x)
+ fun_l0_n427(@x)
+ fun_l0_n428(@x)
+ fun_l0_n429(@x)
+ fun_l0_n430(@x)
+ fun_l0_n431(@x)
+ fun_l0_n432(@x)
+ fun_l0_n433(@x)
+ fun_l0_n434(@x)
+ fun_l0_n435(@x)
+ fun_l0_n436(@x)
+ fun_l0_n437(@x)
+ fun_l0_n438(@x)
+ fun_l0_n439(@x)
+ fun_l0_n440(@x)
+ fun_l0_n441(@x)
+ fun_l0_n442(@x)
+ fun_l0_n443(@x)
+ fun_l0_n444(@x)
+ fun_l0_n445(@x)
+ fun_l0_n446(@x)
+ fun_l0_n447(@x)
+ fun_l0_n448(@x)
+ fun_l0_n449(@x)
+ fun_l0_n450(@x)
+ fun_l0_n451(@x)
+ fun_l0_n452(@x)
+ fun_l0_n453(@x)
+ fun_l0_n454(@x)
+ fun_l0_n455(@x)
+ fun_l0_n456(@x)
+ fun_l0_n457(@x)
+ fun_l0_n458(@x)
+ fun_l0_n459(@x)
+ fun_l0_n460(@x)
+ fun_l0_n461(@x)
+ fun_l0_n462(@x)
+ fun_l0_n463(@x)
+ fun_l0_n464(@x)
+ fun_l0_n465(@x)
+ fun_l0_n466(@x)
+ fun_l0_n467(@x)
+ fun_l0_n468(@x)
+ fun_l0_n469(@x)
+ fun_l0_n470(@x)
+ fun_l0_n471(@x)
+ fun_l0_n472(@x)
+ fun_l0_n473(@x)
+ fun_l0_n474(@x)
+ fun_l0_n475(@x)
+ fun_l0_n476(@x)
+ fun_l0_n477(@x)
+ fun_l0_n478(@x)
+ fun_l0_n479(@x)
+ fun_l0_n480(@x)
+ fun_l0_n481(@x)
+ fun_l0_n482(@x)
+ fun_l0_n483(@x)
+ fun_l0_n484(@x)
+ fun_l0_n485(@x)
+ fun_l0_n486(@x)
+ fun_l0_n487(@x)
+ fun_l0_n488(@x)
+ fun_l0_n489(@x)
+ fun_l0_n490(@x)
+ fun_l0_n491(@x)
+ fun_l0_n492(@x)
+ fun_l0_n493(@x)
+ fun_l0_n494(@x)
+ fun_l0_n495(@x)
+ fun_l0_n496(@x)
+ fun_l0_n497(@x)
+ fun_l0_n498(@x)
+ fun_l0_n499(@x)
+ fun_l0_n500(@x)
+ fun_l0_n501(@x)
+ fun_l0_n502(@x)
+ fun_l0_n503(@x)
+ fun_l0_n504(@x)
+ fun_l0_n505(@x)
+ fun_l0_n506(@x)
+ fun_l0_n507(@x)
+ fun_l0_n508(@x)
+ fun_l0_n509(@x)
+ fun_l0_n510(@x)
+ fun_l0_n511(@x)
+ fun_l0_n512(@x)
+ fun_l0_n513(@x)
+ fun_l0_n514(@x)
+ fun_l0_n515(@x)
+ fun_l0_n516(@x)
+ fun_l0_n517(@x)
+ fun_l0_n518(@x)
+ fun_l0_n519(@x)
+ fun_l0_n520(@x)
+ fun_l0_n521(@x)
+ fun_l0_n522(@x)
+ fun_l0_n523(@x)
+ fun_l0_n524(@x)
+ fun_l0_n525(@x)
+ fun_l0_n526(@x)
+ fun_l0_n527(@x)
+ fun_l0_n528(@x)
+ fun_l0_n529(@x)
+ fun_l0_n530(@x)
+ fun_l0_n531(@x)
+ fun_l0_n532(@x)
+ fun_l0_n533(@x)
+ fun_l0_n534(@x)
+ fun_l0_n535(@x)
+ fun_l0_n536(@x)
+ fun_l0_n537(@x)
+ fun_l0_n538(@x)
+ fun_l0_n539(@x)
+ fun_l0_n540(@x)
+ fun_l0_n541(@x)
+ fun_l0_n542(@x)
+ fun_l0_n543(@x)
+ fun_l0_n544(@x)
+ fun_l0_n545(@x)
+ fun_l0_n546(@x)
+ fun_l0_n547(@x)
+ fun_l0_n548(@x)
+ fun_l0_n549(@x)
+ fun_l0_n550(@x)
+ fun_l0_n551(@x)
+ fun_l0_n552(@x)
+ fun_l0_n553(@x)
+ fun_l0_n554(@x)
+ fun_l0_n555(@x)
+ fun_l0_n556(@x)
+ fun_l0_n557(@x)
+ fun_l0_n558(@x)
+ fun_l0_n559(@x)
+ fun_l0_n560(@x)
+ fun_l0_n561(@x)
+ fun_l0_n562(@x)
+ fun_l0_n563(@x)
+ fun_l0_n564(@x)
+ fun_l0_n565(@x)
+ fun_l0_n566(@x)
+ fun_l0_n567(@x)
+ fun_l0_n568(@x)
+ fun_l0_n569(@x)
+ fun_l0_n570(@x)
+ fun_l0_n571(@x)
+ fun_l0_n572(@x)
+ fun_l0_n573(@x)
+ fun_l0_n574(@x)
+ fun_l0_n575(@x)
+ fun_l0_n576(@x)
+ fun_l0_n577(@x)
+ fun_l0_n578(@x)
+ fun_l0_n579(@x)
+ fun_l0_n580(@x)
+ fun_l0_n581(@x)
+ fun_l0_n582(@x)
+ fun_l0_n583(@x)
+ fun_l0_n584(@x)
+ fun_l0_n585(@x)
+ fun_l0_n586(@x)
+ fun_l0_n587(@x)
+ fun_l0_n588(@x)
+ fun_l0_n589(@x)
+ fun_l0_n590(@x)
+ fun_l0_n591(@x)
+ fun_l0_n592(@x)
+ fun_l0_n593(@x)
+ fun_l0_n594(@x)
+ fun_l0_n595(@x)
+ fun_l0_n596(@x)
+ fun_l0_n597(@x)
+ fun_l0_n598(@x)
+ fun_l0_n599(@x)
+ fun_l0_n600(@x)
+ fun_l0_n601(@x)
+ fun_l0_n602(@x)
+ fun_l0_n603(@x)
+ fun_l0_n604(@x)
+ fun_l0_n605(@x)
+ fun_l0_n606(@x)
+ fun_l0_n607(@x)
+ fun_l0_n608(@x)
+ fun_l0_n609(@x)
+ fun_l0_n610(@x)
+ fun_l0_n611(@x)
+ fun_l0_n612(@x)
+ fun_l0_n613(@x)
+ fun_l0_n614(@x)
+ fun_l0_n615(@x)
+ fun_l0_n616(@x)
+ fun_l0_n617(@x)
+ fun_l0_n618(@x)
+ fun_l0_n619(@x)
+ fun_l0_n620(@x)
+ fun_l0_n621(@x)
+ fun_l0_n622(@x)
+ fun_l0_n623(@x)
+ fun_l0_n624(@x)
+ fun_l0_n625(@x)
+ fun_l0_n626(@x)
+ fun_l0_n627(@x)
+ fun_l0_n628(@x)
+ fun_l0_n629(@x)
+ fun_l0_n630(@x)
+ fun_l0_n631(@x)
+ fun_l0_n632(@x)
+ fun_l0_n633(@x)
+ fun_l0_n634(@x)
+ fun_l0_n635(@x)
+ fun_l0_n636(@x)
+ fun_l0_n637(@x)
+ fun_l0_n638(@x)
+ fun_l0_n639(@x)
+ fun_l0_n640(@x)
+ fun_l0_n641(@x)
+ fun_l0_n642(@x)
+ fun_l0_n643(@x)
+ fun_l0_n644(@x)
+ fun_l0_n645(@x)
+ fun_l0_n646(@x)
+ fun_l0_n647(@x)
+ fun_l0_n648(@x)
+ fun_l0_n649(@x)
+ fun_l0_n650(@x)
+ fun_l0_n651(@x)
+ fun_l0_n652(@x)
+ fun_l0_n653(@x)
+ fun_l0_n654(@x)
+ fun_l0_n655(@x)
+ fun_l0_n656(@x)
+ fun_l0_n657(@x)
+ fun_l0_n658(@x)
+ fun_l0_n659(@x)
+ fun_l0_n660(@x)
+ fun_l0_n661(@x)
+ fun_l0_n662(@x)
+ fun_l0_n663(@x)
+ fun_l0_n664(@x)
+ fun_l0_n665(@x)
+ fun_l0_n666(@x)
+ fun_l0_n667(@x)
+ fun_l0_n668(@x)
+ fun_l0_n669(@x)
+ fun_l0_n670(@x)
+ fun_l0_n671(@x)
+ fun_l0_n672(@x)
+ fun_l0_n673(@x)
+ fun_l0_n674(@x)
+ fun_l0_n675(@x)
+ fun_l0_n676(@x)
+ fun_l0_n677(@x)
+ fun_l0_n678(@x)
+ fun_l0_n679(@x)
+ fun_l0_n680(@x)
+ fun_l0_n681(@x)
+ fun_l0_n682(@x)
+ fun_l0_n683(@x)
+ fun_l0_n684(@x)
+ fun_l0_n685(@x)
+ fun_l0_n686(@x)
+ fun_l0_n687(@x)
+ fun_l0_n688(@x)
+ fun_l0_n689(@x)
+ fun_l0_n690(@x)
+ fun_l0_n691(@x)
+ fun_l0_n692(@x)
+ fun_l0_n693(@x)
+ fun_l0_n694(@x)
+ fun_l0_n695(@x)
+ fun_l0_n696(@x)
+ fun_l0_n697(@x)
+ fun_l0_n698(@x)
+ fun_l0_n699(@x)
+ fun_l0_n700(@x)
+ fun_l0_n701(@x)
+ fun_l0_n702(@x)
+ fun_l0_n703(@x)
+ fun_l0_n704(@x)
+ fun_l0_n705(@x)
+ fun_l0_n706(@x)
+ fun_l0_n707(@x)
+ fun_l0_n708(@x)
+ fun_l0_n709(@x)
+ fun_l0_n710(@x)
+ fun_l0_n711(@x)
+ fun_l0_n712(@x)
+ fun_l0_n713(@x)
+ fun_l0_n714(@x)
+ fun_l0_n715(@x)
+ fun_l0_n716(@x)
+ fun_l0_n717(@x)
+ fun_l0_n718(@x)
+ fun_l0_n719(@x)
+ fun_l0_n720(@x)
+ fun_l0_n721(@x)
+ fun_l0_n722(@x)
+ fun_l0_n723(@x)
+ fun_l0_n724(@x)
+ fun_l0_n725(@x)
+ fun_l0_n726(@x)
+ fun_l0_n727(@x)
+ fun_l0_n728(@x)
+ fun_l0_n729(@x)
+ fun_l0_n730(@x)
+ fun_l0_n731(@x)
+ fun_l0_n732(@x)
+ fun_l0_n733(@x)
+ fun_l0_n734(@x)
+ fun_l0_n735(@x)
+ fun_l0_n736(@x)
+ fun_l0_n737(@x)
+ fun_l0_n738(@x)
+ fun_l0_n739(@x)
+ fun_l0_n740(@x)
+ fun_l0_n741(@x)
+ fun_l0_n742(@x)
+ fun_l0_n743(@x)
+ fun_l0_n744(@x)
+ fun_l0_n745(@x)
+ fun_l0_n746(@x)
+ fun_l0_n747(@x)
+ fun_l0_n748(@x)
+ fun_l0_n749(@x)
+ fun_l0_n750(@x)
+ fun_l0_n751(@x)
+ fun_l0_n752(@x)
+ fun_l0_n753(@x)
+ fun_l0_n754(@x)
+ fun_l0_n755(@x)
+ fun_l0_n756(@x)
+ fun_l0_n757(@x)
+ fun_l0_n758(@x)
+ fun_l0_n759(@x)
+ fun_l0_n760(@x)
+ fun_l0_n761(@x)
+ fun_l0_n762(@x)
+ fun_l0_n763(@x)
+ fun_l0_n764(@x)
+ fun_l0_n765(@x)
+ fun_l0_n766(@x)
+ fun_l0_n767(@x)
+ fun_l0_n768(@x)
+ fun_l0_n769(@x)
+ fun_l0_n770(@x)
+ fun_l0_n771(@x)
+ fun_l0_n772(@x)
+ fun_l0_n773(@x)
+ fun_l0_n774(@x)
+ fun_l0_n775(@x)
+ fun_l0_n776(@x)
+ fun_l0_n777(@x)
+ fun_l0_n778(@x)
+ fun_l0_n779(@x)
+ fun_l0_n780(@x)
+ fun_l0_n781(@x)
+ fun_l0_n782(@x)
+ fun_l0_n783(@x)
+ fun_l0_n784(@x)
+ fun_l0_n785(@x)
+ fun_l0_n786(@x)
+ fun_l0_n787(@x)
+ fun_l0_n788(@x)
+ fun_l0_n789(@x)
+ fun_l0_n790(@x)
+ fun_l0_n791(@x)
+ fun_l0_n792(@x)
+ fun_l0_n793(@x)
+ fun_l0_n794(@x)
+ fun_l0_n795(@x)
+ fun_l0_n796(@x)
+ fun_l0_n797(@x)
+ fun_l0_n798(@x)
+ fun_l0_n799(@x)
+ fun_l0_n800(@x)
+ fun_l0_n801(@x)
+ fun_l0_n802(@x)
+ fun_l0_n803(@x)
+ fun_l0_n804(@x)
+ fun_l0_n805(@x)
+ fun_l0_n806(@x)
+ fun_l0_n807(@x)
+ fun_l0_n808(@x)
+ fun_l0_n809(@x)
+ fun_l0_n810(@x)
+ fun_l0_n811(@x)
+ fun_l0_n812(@x)
+ fun_l0_n813(@x)
+ fun_l0_n814(@x)
+ fun_l0_n815(@x)
+ fun_l0_n816(@x)
+ fun_l0_n817(@x)
+ fun_l0_n818(@x)
+ fun_l0_n819(@x)
+ fun_l0_n820(@x)
+ fun_l0_n821(@x)
+ fun_l0_n822(@x)
+ fun_l0_n823(@x)
+ fun_l0_n824(@x)
+ fun_l0_n825(@x)
+ fun_l0_n826(@x)
+ fun_l0_n827(@x)
+ fun_l0_n828(@x)
+ fun_l0_n829(@x)
+ fun_l0_n830(@x)
+ fun_l0_n831(@x)
+ fun_l0_n832(@x)
+ fun_l0_n833(@x)
+ fun_l0_n834(@x)
+ fun_l0_n835(@x)
+ fun_l0_n836(@x)
+ fun_l0_n837(@x)
+ fun_l0_n838(@x)
+ fun_l0_n839(@x)
+ fun_l0_n840(@x)
+ fun_l0_n841(@x)
+ fun_l0_n842(@x)
+ fun_l0_n843(@x)
+ fun_l0_n844(@x)
+ fun_l0_n845(@x)
+ fun_l0_n846(@x)
+ fun_l0_n847(@x)
+ fun_l0_n848(@x)
+ fun_l0_n849(@x)
+ fun_l0_n850(@x)
+ fun_l0_n851(@x)
+ fun_l0_n852(@x)
+ fun_l0_n853(@x)
+ fun_l0_n854(@x)
+ fun_l0_n855(@x)
+ fun_l0_n856(@x)
+ fun_l0_n857(@x)
+ fun_l0_n858(@x)
+ fun_l0_n859(@x)
+ fun_l0_n860(@x)
+ fun_l0_n861(@x)
+ fun_l0_n862(@x)
+ fun_l0_n863(@x)
+ fun_l0_n864(@x)
+ fun_l0_n865(@x)
+ fun_l0_n866(@x)
+ fun_l0_n867(@x)
+ fun_l0_n868(@x)
+ fun_l0_n869(@x)
+ fun_l0_n870(@x)
+ fun_l0_n871(@x)
+ fun_l0_n872(@x)
+ fun_l0_n873(@x)
+ fun_l0_n874(@x)
+ fun_l0_n875(@x)
+ fun_l0_n876(@x)
+ fun_l0_n877(@x)
+ fun_l0_n878(@x)
+ fun_l0_n879(@x)
+ fun_l0_n880(@x)
+ fun_l0_n881(@x)
+ fun_l0_n882(@x)
+ fun_l0_n883(@x)
+ fun_l0_n884(@x)
+ fun_l0_n885(@x)
+ fun_l0_n886(@x)
+ fun_l0_n887(@x)
+ fun_l0_n888(@x)
+ fun_l0_n889(@x)
+ fun_l0_n890(@x)
+ fun_l0_n891(@x)
+ fun_l0_n892(@x)
+ fun_l0_n893(@x)
+ fun_l0_n894(@x)
+ fun_l0_n895(@x)
+ fun_l0_n896(@x)
+ fun_l0_n897(@x)
+ fun_l0_n898(@x)
+ fun_l0_n899(@x)
+ fun_l0_n900(@x)
+ fun_l0_n901(@x)
+ fun_l0_n902(@x)
+ fun_l0_n903(@x)
+ fun_l0_n904(@x)
+ fun_l0_n905(@x)
+ fun_l0_n906(@x)
+ fun_l0_n907(@x)
+ fun_l0_n908(@x)
+ fun_l0_n909(@x)
+ fun_l0_n910(@x)
+ fun_l0_n911(@x)
+ fun_l0_n912(@x)
+ fun_l0_n913(@x)
+ fun_l0_n914(@x)
+ fun_l0_n915(@x)
+ fun_l0_n916(@x)
+ fun_l0_n917(@x)
+ fun_l0_n918(@x)
+ fun_l0_n919(@x)
+ fun_l0_n920(@x)
+ fun_l0_n921(@x)
+ fun_l0_n922(@x)
+ fun_l0_n923(@x)
+ fun_l0_n924(@x)
+ fun_l0_n925(@x)
+ fun_l0_n926(@x)
+ fun_l0_n927(@x)
+ fun_l0_n928(@x)
+ fun_l0_n929(@x)
+ fun_l0_n930(@x)
+ fun_l0_n931(@x)
+ fun_l0_n932(@x)
+ fun_l0_n933(@x)
+ fun_l0_n934(@x)
+ fun_l0_n935(@x)
+ fun_l0_n936(@x)
+ fun_l0_n937(@x)
+ fun_l0_n938(@x)
+ fun_l0_n939(@x)
+ fun_l0_n940(@x)
+ fun_l0_n941(@x)
+ fun_l0_n942(@x)
+ fun_l0_n943(@x)
+ fun_l0_n944(@x)
+ fun_l0_n945(@x)
+ fun_l0_n946(@x)
+ fun_l0_n947(@x)
+ fun_l0_n948(@x)
+ fun_l0_n949(@x)
+ fun_l0_n950(@x)
+ fun_l0_n951(@x)
+ fun_l0_n952(@x)
+ fun_l0_n953(@x)
+ fun_l0_n954(@x)
+ fun_l0_n955(@x)
+ fun_l0_n956(@x)
+ fun_l0_n957(@x)
+ fun_l0_n958(@x)
+ fun_l0_n959(@x)
+ fun_l0_n960(@x)
+ fun_l0_n961(@x)
+ fun_l0_n962(@x)
+ fun_l0_n963(@x)
+ fun_l0_n964(@x)
+ fun_l0_n965(@x)
+ fun_l0_n966(@x)
+ fun_l0_n967(@x)
+ fun_l0_n968(@x)
+ fun_l0_n969(@x)
+ fun_l0_n970(@x)
+ fun_l0_n971(@x)
+ fun_l0_n972(@x)
+ fun_l0_n973(@x)
+ fun_l0_n974(@x)
+ fun_l0_n975(@x)
+ fun_l0_n976(@x)
+ fun_l0_n977(@x)
+ fun_l0_n978(@x)
+ fun_l0_n979(@x)
+ fun_l0_n980(@x)
+ fun_l0_n981(@x)
+ fun_l0_n982(@x)
+ fun_l0_n983(@x)
+ fun_l0_n984(@x)
+ fun_l0_n985(@x)
+ fun_l0_n986(@x)
+ fun_l0_n987(@x)
+ fun_l0_n988(@x)
+ fun_l0_n989(@x)
+ fun_l0_n990(@x)
+ fun_l0_n991(@x)
+ fun_l0_n992(@x)
+ fun_l0_n993(@x)
+ fun_l0_n994(@x)
+ fun_l0_n995(@x)
+ fun_l0_n996(@x)
+ fun_l0_n997(@x)
+ fun_l0_n998(@x)
+ fun_l0_n999(@x)
+end
+
+@count
+
+}
diff --git a/bootstraptest/test_yjit_30k_methods.rb b/bootstraptest/test_yjit_30k_methods.rb
new file mode 100644
index 0000000000..f2acea4ce5
--- /dev/null
+++ b/bootstraptest/test_yjit_30k_methods.rb
@@ -0,0 +1,121018 @@
+# This is a torture test for the JIT.
+# There are 30K tiny methods in a 30-deep call hierarchy.
+assert_equal '1000000', %q{
+
+def fun_l0_n0()
+ fun_l1_n758
+end
+
+def fun_l0_n1()
+ fun_l1_n491
+end
+
+def fun_l0_n2()
+ fun_l1_n804
+end
+
+def fun_l0_n3()
+ fun_l1_n253
+end
+
+def fun_l0_n4()
+ fun_l1_n409
+end
+
+def fun_l0_n5()
+ fun_l1_n383
+end
+
+def fun_l0_n6()
+ fun_l1_n170
+end
+
+def fun_l0_n7()
+ fun_l1_n821
+end
+
+def fun_l0_n8()
+ fun_l1_n424
+end
+
+def fun_l0_n9()
+ fun_l1_n328
+end
+
+def fun_l0_n10()
+ fun_l1_n326
+end
+
+def fun_l0_n11()
+ fun_l1_n879
+end
+
+def fun_l0_n12()
+ fun_l1_n509
+end
+
+def fun_l0_n13()
+ fun_l1_n464
+end
+
+def fun_l0_n14()
+ fun_l1_n806
+end
+
+def fun_l0_n15()
+ fun_l1_n277
+end
+
+def fun_l0_n16()
+ fun_l1_n684
+end
+
+def fun_l0_n17()
+ fun_l1_n54
+end
+
+def fun_l0_n18()
+ fun_l1_n514
+end
+
+def fun_l0_n19()
+ fun_l1_n967
+end
+
+def fun_l0_n20()
+ fun_l1_n50
+end
+
+def fun_l0_n21()
+ fun_l1_n248
+end
+
+def fun_l0_n22()
+ fun_l1_n410
+end
+
+def fun_l0_n23()
+ fun_l1_n411
+end
+
+def fun_l0_n24()
+ fun_l1_n422
+end
+
+def fun_l0_n25()
+ fun_l1_n427
+end
+
+def fun_l0_n26()
+ fun_l1_n929
+end
+
+def fun_l0_n27()
+ fun_l1_n93
+end
+
+def fun_l0_n28()
+ fun_l1_n790
+end
+
+def fun_l0_n29()
+ fun_l1_n107
+end
+
+def fun_l0_n30()
+ fun_l1_n29
+end
+
+def fun_l0_n31()
+ fun_l1_n164
+end
+
+def fun_l0_n32()
+ fun_l1_n720
+end
+
+def fun_l0_n33()
+ fun_l1_n30
+end
+
+def fun_l0_n34()
+ fun_l1_n133
+end
+
+def fun_l0_n35()
+ fun_l1_n122
+end
+
+def fun_l0_n36()
+ fun_l1_n101
+end
+
+def fun_l0_n37()
+ fun_l1_n80
+end
+
+def fun_l0_n38()
+ fun_l1_n759
+end
+
+def fun_l0_n39()
+ fun_l1_n315
+end
+
+def fun_l0_n40()
+ fun_l1_n508
+end
+
+def fun_l0_n41()
+ fun_l1_n750
+end
+
+def fun_l0_n42()
+ fun_l1_n200
+end
+
+def fun_l0_n43()
+ fun_l1_n662
+end
+
+def fun_l0_n44()
+ fun_l1_n2
+end
+
+def fun_l0_n45()
+ fun_l1_n864
+end
+
+def fun_l0_n46()
+ fun_l1_n482
+end
+
+def fun_l0_n47()
+ fun_l1_n196
+end
+
+def fun_l0_n48()
+ fun_l1_n867
+end
+
+def fun_l0_n49()
+ fun_l1_n942
+end
+
+def fun_l0_n50()
+ fun_l1_n179
+end
+
+def fun_l0_n51()
+ fun_l1_n442
+end
+
+def fun_l0_n52()
+ fun_l1_n613
+end
+
+def fun_l0_n53()
+ fun_l1_n282
+end
+
+def fun_l0_n54()
+ fun_l1_n624
+end
+
+def fun_l0_n55()
+ fun_l1_n514
+end
+
+def fun_l0_n56()
+ fun_l1_n59
+end
+
+def fun_l0_n57()
+ fun_l1_n401
+end
+
+def fun_l0_n58()
+ fun_l1_n693
+end
+
+def fun_l0_n59()
+ fun_l1_n643
+end
+
+def fun_l0_n60()
+ fun_l1_n104
+end
+
+def fun_l0_n61()
+ fun_l1_n407
+end
+
+def fun_l0_n62()
+ fun_l1_n418
+end
+
+def fun_l0_n63()
+ fun_l1_n775
+end
+
+def fun_l0_n64()
+ fun_l1_n351
+end
+
+def fun_l0_n65()
+ fun_l1_n320
+end
+
+def fun_l0_n66()
+ fun_l1_n181
+end
+
+def fun_l0_n67()
+ fun_l1_n878
+end
+
+def fun_l0_n68()
+ fun_l1_n404
+end
+
+def fun_l0_n69()
+ fun_l1_n660
+end
+
+def fun_l0_n70()
+ fun_l1_n644
+end
+
+def fun_l0_n71()
+ fun_l1_n416
+end
+
+def fun_l0_n72()
+ fun_l1_n372
+end
+
+def fun_l0_n73()
+ fun_l1_n525
+end
+
+def fun_l0_n74()
+ fun_l1_n468
+end
+
+def fun_l0_n75()
+ fun_l1_n652
+end
+
+def fun_l0_n76()
+ fun_l1_n418
+end
+
+def fun_l0_n77()
+ fun_l1_n935
+end
+
+def fun_l0_n78()
+ fun_l1_n170
+end
+
+def fun_l0_n79()
+ fun_l1_n805
+end
+
+def fun_l0_n80()
+ fun_l1_n405
+end
+
+def fun_l0_n81()
+ fun_l1_n994
+end
+
+def fun_l0_n82()
+ fun_l1_n395
+end
+
+def fun_l0_n83()
+ fun_l1_n399
+end
+
+def fun_l0_n84()
+ fun_l1_n503
+end
+
+def fun_l0_n85()
+ fun_l1_n451
+end
+
+def fun_l0_n86()
+ fun_l1_n920
+end
+
+def fun_l0_n87()
+ fun_l1_n446
+end
+
+def fun_l0_n88()
+ fun_l1_n637
+end
+
+def fun_l0_n89()
+ fun_l1_n732
+end
+
+def fun_l0_n90()
+ fun_l1_n823
+end
+
+def fun_l0_n91()
+ fun_l1_n347
+end
+
+def fun_l0_n92()
+ fun_l1_n808
+end
+
+def fun_l0_n93()
+ fun_l1_n941
+end
+
+def fun_l0_n94()
+ fun_l1_n808
+end
+
+def fun_l0_n95()
+ fun_l1_n575
+end
+
+def fun_l0_n96()
+ fun_l1_n835
+end
+
+def fun_l0_n97()
+ fun_l1_n601
+end
+
+def fun_l0_n98()
+ fun_l1_n522
+end
+
+def fun_l0_n99()
+ fun_l1_n884
+end
+
+def fun_l0_n100()
+ fun_l1_n234
+end
+
+def fun_l0_n101()
+ fun_l1_n58
+end
+
+def fun_l0_n102()
+ fun_l1_n702
+end
+
+def fun_l0_n103()
+ fun_l1_n816
+end
+
+def fun_l0_n104()
+ fun_l1_n92
+end
+
+def fun_l0_n105()
+ fun_l1_n673
+end
+
+def fun_l0_n106()
+ fun_l1_n360
+end
+
+def fun_l0_n107()
+ fun_l1_n305
+end
+
+def fun_l0_n108()
+ fun_l1_n202
+end
+
+def fun_l0_n109()
+ fun_l1_n879
+end
+
+def fun_l0_n110()
+ fun_l1_n84
+end
+
+def fun_l0_n111()
+ fun_l1_n50
+end
+
+def fun_l0_n112()
+ fun_l1_n648
+end
+
+def fun_l0_n113()
+ fun_l1_n786
+end
+
+def fun_l0_n114()
+ fun_l1_n627
+end
+
+def fun_l0_n115()
+ fun_l1_n404
+end
+
+def fun_l0_n116()
+ fun_l1_n496
+end
+
+def fun_l0_n117()
+ fun_l1_n778
+end
+
+def fun_l0_n118()
+ fun_l1_n119
+end
+
+def fun_l0_n119()
+ fun_l1_n350
+end
+
+def fun_l0_n120()
+ fun_l1_n767
+end
+
+def fun_l0_n121()
+ fun_l1_n463
+end
+
+def fun_l0_n122()
+ fun_l1_n481
+end
+
+def fun_l0_n123()
+ fun_l1_n80
+end
+
+def fun_l0_n124()
+ fun_l1_n271
+end
+
+def fun_l0_n125()
+ fun_l1_n315
+end
+
+def fun_l0_n126()
+ fun_l1_n545
+end
+
+def fun_l0_n127()
+ fun_l1_n598
+end
+
+def fun_l0_n128()
+ fun_l1_n599
+end
+
+def fun_l0_n129()
+ fun_l1_n263
+end
+
+def fun_l0_n130()
+ fun_l1_n514
+end
+
+def fun_l0_n131()
+ fun_l1_n779
+end
+
+def fun_l0_n132()
+ fun_l1_n585
+end
+
+def fun_l0_n133()
+ fun_l1_n919
+end
+
+def fun_l0_n134()
+ fun_l1_n665
+end
+
+def fun_l0_n135()
+ fun_l1_n442
+end
+
+def fun_l0_n136()
+ fun_l1_n84
+end
+
+def fun_l0_n137()
+ fun_l1_n74
+end
+
+def fun_l0_n138()
+ fun_l1_n606
+end
+
+def fun_l0_n139()
+ fun_l1_n655
+end
+
+def fun_l0_n140()
+ fun_l1_n130
+end
+
+def fun_l0_n141()
+ fun_l1_n626
+end
+
+def fun_l0_n142()
+ fun_l1_n605
+end
+
+def fun_l0_n143()
+ fun_l1_n420
+end
+
+def fun_l0_n144()
+ fun_l1_n100
+end
+
+def fun_l0_n145()
+ fun_l1_n961
+end
+
+def fun_l0_n146()
+ fun_l1_n721
+end
+
+def fun_l0_n147()
+ fun_l1_n453
+end
+
+def fun_l0_n148()
+ fun_l1_n737
+end
+
+def fun_l0_n149()
+ fun_l1_n230
+end
+
+def fun_l0_n150()
+ fun_l1_n881
+end
+
+def fun_l0_n151()
+ fun_l1_n471
+end
+
+def fun_l0_n152()
+ fun_l1_n72
+end
+
+def fun_l0_n153()
+ fun_l1_n221
+end
+
+def fun_l0_n154()
+ fun_l1_n504
+end
+
+def fun_l0_n155()
+ fun_l1_n222
+end
+
+def fun_l0_n156()
+ fun_l1_n348
+end
+
+def fun_l0_n157()
+ fun_l1_n738
+end
+
+def fun_l0_n158()
+ fun_l1_n588
+end
+
+def fun_l0_n159()
+ fun_l1_n64
+end
+
+def fun_l0_n160()
+ fun_l1_n829
+end
+
+def fun_l0_n161()
+ fun_l1_n265
+end
+
+def fun_l0_n162()
+ fun_l1_n471
+end
+
+def fun_l0_n163()
+ fun_l1_n304
+end
+
+def fun_l0_n164()
+ fun_l1_n518
+end
+
+def fun_l0_n165()
+ fun_l1_n89
+end
+
+def fun_l0_n166()
+ fun_l1_n728
+end
+
+def fun_l0_n167()
+ fun_l1_n292
+end
+
+def fun_l0_n168()
+ fun_l1_n142
+end
+
+def fun_l0_n169()
+ fun_l1_n374
+end
+
+def fun_l0_n170()
+ fun_l1_n371
+end
+
+def fun_l0_n171()
+ fun_l1_n904
+end
+
+def fun_l0_n172()
+ fun_l1_n519
+end
+
+def fun_l0_n173()
+ fun_l1_n239
+end
+
+def fun_l0_n174()
+ fun_l1_n664
+end
+
+def fun_l0_n175()
+ fun_l1_n701
+end
+
+def fun_l0_n176()
+ fun_l1_n586
+end
+
+def fun_l0_n177()
+ fun_l1_n78
+end
+
+def fun_l0_n178()
+ fun_l1_n663
+end
+
+def fun_l0_n179()
+ fun_l1_n46
+end
+
+def fun_l0_n180()
+ fun_l1_n273
+end
+
+def fun_l0_n181()
+ fun_l1_n250
+end
+
+def fun_l0_n182()
+ fun_l1_n362
+end
+
+def fun_l0_n183()
+ fun_l1_n69
+end
+
+def fun_l0_n184()
+ fun_l1_n874
+end
+
+def fun_l0_n185()
+ fun_l1_n135
+end
+
+def fun_l0_n186()
+ fun_l1_n634
+end
+
+def fun_l0_n187()
+ fun_l1_n885
+end
+
+def fun_l0_n188()
+ fun_l1_n589
+end
+
+def fun_l0_n189()
+ fun_l1_n21
+end
+
+def fun_l0_n190()
+ fun_l1_n962
+end
+
+def fun_l0_n191()
+ fun_l1_n267
+end
+
+def fun_l0_n192()
+ fun_l1_n569
+end
+
+def fun_l0_n193()
+ fun_l1_n921
+end
+
+def fun_l0_n194()
+ fun_l1_n535
+end
+
+def fun_l0_n195()
+ fun_l1_n362
+end
+
+def fun_l0_n196()
+ fun_l1_n862
+end
+
+def fun_l0_n197()
+ fun_l1_n565
+end
+
+def fun_l0_n198()
+ fun_l1_n779
+end
+
+def fun_l0_n199()
+ fun_l1_n848
+end
+
+def fun_l0_n200()
+ fun_l1_n755
+end
+
+def fun_l0_n201()
+ fun_l1_n493
+end
+
+def fun_l0_n202()
+ fun_l1_n574
+end
+
+def fun_l0_n203()
+ fun_l1_n172
+end
+
+def fun_l0_n204()
+ fun_l1_n388
+end
+
+def fun_l0_n205()
+ fun_l1_n67
+end
+
+def fun_l0_n206()
+ fun_l1_n449
+end
+
+def fun_l0_n207()
+ fun_l1_n883
+end
+
+def fun_l0_n208()
+ fun_l1_n749
+end
+
+def fun_l0_n209()
+ fun_l1_n425
+end
+
+def fun_l0_n210()
+ fun_l1_n848
+end
+
+def fun_l0_n211()
+ fun_l1_n320
+end
+
+def fun_l0_n212()
+ fun_l1_n122
+end
+
+def fun_l0_n213()
+ fun_l1_n878
+end
+
+def fun_l0_n214()
+ fun_l1_n763
+end
+
+def fun_l0_n215()
+ fun_l1_n70
+end
+
+def fun_l0_n216()
+ fun_l1_n494
+end
+
+def fun_l0_n217()
+ fun_l1_n13
+end
+
+def fun_l0_n218()
+ fun_l1_n907
+end
+
+def fun_l0_n219()
+ fun_l1_n775
+end
+
+def fun_l0_n220()
+ fun_l1_n633
+end
+
+def fun_l0_n221()
+ fun_l1_n371
+end
+
+def fun_l0_n222()
+ fun_l1_n691
+end
+
+def fun_l0_n223()
+ fun_l1_n994
+end
+
+def fun_l0_n224()
+ fun_l1_n268
+end
+
+def fun_l0_n225()
+ fun_l1_n52
+end
+
+def fun_l0_n226()
+ fun_l1_n291
+end
+
+def fun_l0_n227()
+ fun_l1_n903
+end
+
+def fun_l0_n228()
+ fun_l1_n369
+end
+
+def fun_l0_n229()
+ fun_l1_n232
+end
+
+def fun_l0_n230()
+ fun_l1_n554
+end
+
+def fun_l0_n231()
+ fun_l1_n479
+end
+
+def fun_l0_n232()
+ fun_l1_n838
+end
+
+def fun_l0_n233()
+ fun_l1_n316
+end
+
+def fun_l0_n234()
+ fun_l1_n685
+end
+
+def fun_l0_n235()
+ fun_l1_n95
+end
+
+def fun_l0_n236()
+ fun_l1_n629
+end
+
+def fun_l0_n237()
+ fun_l1_n218
+end
+
+def fun_l0_n238()
+ fun_l1_n406
+end
+
+def fun_l0_n239()
+ fun_l1_n187
+end
+
+def fun_l0_n240()
+ fun_l1_n905
+end
+
+def fun_l0_n241()
+ fun_l1_n262
+end
+
+def fun_l0_n242()
+ fun_l1_n314
+end
+
+def fun_l0_n243()
+ fun_l1_n669
+end
+
+def fun_l0_n244()
+ fun_l1_n112
+end
+
+def fun_l0_n245()
+ fun_l1_n744
+end
+
+def fun_l0_n246()
+ fun_l1_n637
+end
+
+def fun_l0_n247()
+ fun_l1_n409
+end
+
+def fun_l0_n248()
+ fun_l1_n706
+end
+
+def fun_l0_n249()
+ fun_l1_n150
+end
+
+def fun_l0_n250()
+ fun_l1_n863
+end
+
+def fun_l0_n251()
+ fun_l1_n364
+end
+
+def fun_l0_n252()
+ fun_l1_n989
+end
+
+def fun_l0_n253()
+ fun_l1_n565
+end
+
+def fun_l0_n254()
+ fun_l1_n701
+end
+
+def fun_l0_n255()
+ fun_l1_n48
+end
+
+def fun_l0_n256()
+ fun_l1_n278
+end
+
+def fun_l0_n257()
+ fun_l1_n816
+end
+
+def fun_l0_n258()
+ fun_l1_n981
+end
+
+def fun_l0_n259()
+ fun_l1_n556
+end
+
+def fun_l0_n260()
+ fun_l1_n887
+end
+
+def fun_l0_n261()
+ fun_l1_n193
+end
+
+def fun_l0_n262()
+ fun_l1_n690
+end
+
+def fun_l0_n263()
+ fun_l1_n144
+end
+
+def fun_l0_n264()
+ fun_l1_n577
+end
+
+def fun_l0_n265()
+ fun_l1_n949
+end
+
+def fun_l0_n266()
+ fun_l1_n320
+end
+
+def fun_l0_n267()
+ fun_l1_n857
+end
+
+def fun_l0_n268()
+ fun_l1_n676
+end
+
+def fun_l0_n269()
+ fun_l1_n683
+end
+
+def fun_l0_n270()
+ fun_l1_n303
+end
+
+def fun_l0_n271()
+ fun_l1_n847
+end
+
+def fun_l0_n272()
+ fun_l1_n588
+end
+
+def fun_l0_n273()
+ fun_l1_n456
+end
+
+def fun_l0_n274()
+ fun_l1_n355
+end
+
+def fun_l0_n275()
+ fun_l1_n183
+end
+
+def fun_l0_n276()
+ fun_l1_n271
+end
+
+def fun_l0_n277()
+ fun_l1_n746
+end
+
+def fun_l0_n278()
+ fun_l1_n885
+end
+
+def fun_l0_n279()
+ fun_l1_n951
+end
+
+def fun_l0_n280()
+ fun_l1_n935
+end
+
+def fun_l0_n281()
+ fun_l1_n445
+end
+
+def fun_l0_n282()
+ fun_l1_n2
+end
+
+def fun_l0_n283()
+ fun_l1_n52
+end
+
+def fun_l0_n284()
+ fun_l1_n208
+end
+
+def fun_l0_n285()
+ fun_l1_n27
+end
+
+def fun_l0_n286()
+ fun_l1_n657
+end
+
+def fun_l0_n287()
+ fun_l1_n373
+end
+
+def fun_l0_n288()
+ fun_l1_n439
+end
+
+def fun_l0_n289()
+ fun_l1_n974
+end
+
+def fun_l0_n290()
+ fun_l1_n834
+end
+
+def fun_l0_n291()
+ fun_l1_n673
+end
+
+def fun_l0_n292()
+ fun_l1_n978
+end
+
+def fun_l0_n293()
+ fun_l1_n123
+end
+
+def fun_l0_n294()
+ fun_l1_n644
+end
+
+def fun_l0_n295()
+ fun_l1_n715
+end
+
+def fun_l0_n296()
+ fun_l1_n912
+end
+
+def fun_l0_n297()
+ fun_l1_n954
+end
+
+def fun_l0_n298()
+ fun_l1_n519
+end
+
+def fun_l0_n299()
+ fun_l1_n726
+end
+
+def fun_l0_n300()
+ fun_l1_n417
+end
+
+def fun_l0_n301()
+ fun_l1_n199
+end
+
+def fun_l0_n302()
+ fun_l1_n157
+end
+
+def fun_l0_n303()
+ fun_l1_n432
+end
+
+def fun_l0_n304()
+ fun_l1_n59
+end
+
+def fun_l0_n305()
+ fun_l1_n604
+end
+
+def fun_l0_n306()
+ fun_l1_n301
+end
+
+def fun_l0_n307()
+ fun_l1_n558
+end
+
+def fun_l0_n308()
+ fun_l1_n443
+end
+
+def fun_l0_n309()
+ fun_l1_n873
+end
+
+def fun_l0_n310()
+ fun_l1_n415
+end
+
+def fun_l0_n311()
+ fun_l1_n907
+end
+
+def fun_l0_n312()
+ fun_l1_n159
+end
+
+def fun_l0_n313()
+ fun_l1_n695
+end
+
+def fun_l0_n314()
+ fun_l1_n679
+end
+
+def fun_l0_n315()
+ fun_l1_n788
+end
+
+def fun_l0_n316()
+ fun_l1_n510
+end
+
+def fun_l0_n317()
+ fun_l1_n997
+end
+
+def fun_l0_n318()
+ fun_l1_n821
+end
+
+def fun_l0_n319()
+ fun_l1_n554
+end
+
+def fun_l0_n320()
+ fun_l1_n982
+end
+
+def fun_l0_n321()
+ fun_l1_n996
+end
+
+def fun_l0_n322()
+ fun_l1_n73
+end
+
+def fun_l0_n323()
+ fun_l1_n951
+end
+
+def fun_l0_n324()
+ fun_l1_n597
+end
+
+def fun_l0_n325()
+ fun_l1_n502
+end
+
+def fun_l0_n326()
+ fun_l1_n150
+end
+
+def fun_l0_n327()
+ fun_l1_n979
+end
+
+def fun_l0_n328()
+ fun_l1_n81
+end
+
+def fun_l0_n329()
+ fun_l1_n87
+end
+
+def fun_l0_n330()
+ fun_l1_n726
+end
+
+def fun_l0_n331()
+ fun_l1_n159
+end
+
+def fun_l0_n332()
+ fun_l1_n799
+end
+
+def fun_l0_n333()
+ fun_l1_n202
+end
+
+def fun_l0_n334()
+ fun_l1_n904
+end
+
+def fun_l0_n335()
+ fun_l1_n14
+end
+
+def fun_l0_n336()
+ fun_l1_n136
+end
+
+def fun_l0_n337()
+ fun_l1_n865
+end
+
+def fun_l0_n338()
+ fun_l1_n307
+end
+
+def fun_l0_n339()
+ fun_l1_n827
+end
+
+def fun_l0_n340()
+ fun_l1_n518
+end
+
+def fun_l0_n341()
+ fun_l1_n416
+end
+
+def fun_l0_n342()
+ fun_l1_n277
+end
+
+def fun_l0_n343()
+ fun_l1_n609
+end
+
+def fun_l0_n344()
+ fun_l1_n328
+end
+
+def fun_l0_n345()
+ fun_l1_n941
+end
+
+def fun_l0_n346()
+ fun_l1_n707
+end
+
+def fun_l0_n347()
+ fun_l1_n452
+end
+
+def fun_l0_n348()
+ fun_l1_n874
+end
+
+def fun_l0_n349()
+ fun_l1_n117
+end
+
+def fun_l0_n350()
+ fun_l1_n739
+end
+
+def fun_l0_n351()
+ fun_l1_n202
+end
+
+def fun_l0_n352()
+ fun_l1_n80
+end
+
+def fun_l0_n353()
+ fun_l1_n373
+end
+
+def fun_l0_n354()
+ fun_l1_n747
+end
+
+def fun_l0_n355()
+ fun_l1_n949
+end
+
+def fun_l0_n356()
+ fun_l1_n901
+end
+
+def fun_l0_n357()
+ fun_l1_n512
+end
+
+def fun_l0_n358()
+ fun_l1_n528
+end
+
+def fun_l0_n359()
+ fun_l1_n895
+end
+
+def fun_l0_n360()
+ fun_l1_n683
+end
+
+def fun_l0_n361()
+ fun_l1_n80
+end
+
+def fun_l0_n362()
+ fun_l1_n718
+end
+
+def fun_l0_n363()
+ fun_l1_n388
+end
+
+def fun_l0_n364()
+ fun_l1_n701
+end
+
+def fun_l0_n365()
+ fun_l1_n146
+end
+
+def fun_l0_n366()
+ fun_l1_n143
+end
+
+def fun_l0_n367()
+ fun_l1_n872
+end
+
+def fun_l0_n368()
+ fun_l1_n818
+end
+
+def fun_l0_n369()
+ fun_l1_n821
+end
+
+def fun_l0_n370()
+ fun_l1_n180
+end
+
+def fun_l0_n371()
+ fun_l1_n346
+end
+
+def fun_l0_n372()
+ fun_l1_n524
+end
+
+def fun_l0_n373()
+ fun_l1_n451
+end
+
+def fun_l0_n374()
+ fun_l1_n592
+end
+
+def fun_l0_n375()
+ fun_l1_n215
+end
+
+def fun_l0_n376()
+ fun_l1_n737
+end
+
+def fun_l0_n377()
+ fun_l1_n631
+end
+
+def fun_l0_n378()
+ fun_l1_n385
+end
+
+def fun_l0_n379()
+ fun_l1_n593
+end
+
+def fun_l0_n380()
+ fun_l1_n484
+end
+
+def fun_l0_n381()
+ fun_l1_n979
+end
+
+def fun_l0_n382()
+ fun_l1_n491
+end
+
+def fun_l0_n383()
+ fun_l1_n632
+end
+
+def fun_l0_n384()
+ fun_l1_n939
+end
+
+def fun_l0_n385()
+ fun_l1_n932
+end
+
+def fun_l0_n386()
+ fun_l1_n816
+end
+
+def fun_l0_n387()
+ fun_l1_n308
+end
+
+def fun_l0_n388()
+ fun_l1_n525
+end
+
+def fun_l0_n389()
+ fun_l1_n160
+end
+
+def fun_l0_n390()
+ fun_l1_n313
+end
+
+def fun_l0_n391()
+ fun_l1_n816
+end
+
+def fun_l0_n392()
+ fun_l1_n641
+end
+
+def fun_l0_n393()
+ fun_l1_n319
+end
+
+def fun_l0_n394()
+ fun_l1_n559
+end
+
+def fun_l0_n395()
+ fun_l1_n520
+end
+
+def fun_l0_n396()
+ fun_l1_n277
+end
+
+def fun_l0_n397()
+ fun_l1_n410
+end
+
+def fun_l0_n398()
+ fun_l1_n956
+end
+
+def fun_l0_n399()
+ fun_l1_n101
+end
+
+def fun_l0_n400()
+ fun_l1_n33
+end
+
+def fun_l0_n401()
+ fun_l1_n554
+end
+
+def fun_l0_n402()
+ fun_l1_n821
+end
+
+def fun_l0_n403()
+ fun_l1_n230
+end
+
+def fun_l0_n404()
+ fun_l1_n185
+end
+
+def fun_l0_n405()
+ fun_l1_n430
+end
+
+def fun_l0_n406()
+ fun_l1_n94
+end
+
+def fun_l0_n407()
+ fun_l1_n776
+end
+
+def fun_l0_n408()
+ fun_l1_n981
+end
+
+def fun_l0_n409()
+ fun_l1_n414
+end
+
+def fun_l0_n410()
+ fun_l1_n421
+end
+
+def fun_l0_n411()
+ fun_l1_n343
+end
+
+def fun_l0_n412()
+ fun_l1_n484
+end
+
+def fun_l0_n413()
+ fun_l1_n818
+end
+
+def fun_l0_n414()
+ fun_l1_n860
+end
+
+def fun_l0_n415()
+ fun_l1_n70
+end
+
+def fun_l0_n416()
+ fun_l1_n643
+end
+
+def fun_l0_n417()
+ fun_l1_n382
+end
+
+def fun_l0_n418()
+ fun_l1_n174
+end
+
+def fun_l0_n419()
+ fun_l1_n500
+end
+
+def fun_l0_n420()
+ fun_l1_n904
+end
+
+def fun_l0_n421()
+ fun_l1_n971
+end
+
+def fun_l0_n422()
+ fun_l1_n438
+end
+
+def fun_l0_n423()
+ fun_l1_n524
+end
+
+def fun_l0_n424()
+ fun_l1_n537
+end
+
+def fun_l0_n425()
+ fun_l1_n564
+end
+
+def fun_l0_n426()
+ fun_l1_n378
+end
+
+def fun_l0_n427()
+ fun_l1_n603
+end
+
+def fun_l0_n428()
+ fun_l1_n442
+end
+
+def fun_l0_n429()
+ fun_l1_n687
+end
+
+def fun_l0_n430()
+ fun_l1_n682
+end
+
+def fun_l0_n431()
+ fun_l1_n664
+end
+
+def fun_l0_n432()
+ fun_l1_n319
+end
+
+def fun_l0_n433()
+ fun_l1_n671
+end
+
+def fun_l0_n434()
+ fun_l1_n211
+end
+
+def fun_l0_n435()
+ fun_l1_n65
+end
+
+def fun_l0_n436()
+ fun_l1_n2
+end
+
+def fun_l0_n437()
+ fun_l1_n36
+end
+
+def fun_l0_n438()
+ fun_l1_n270
+end
+
+def fun_l0_n439()
+ fun_l1_n793
+end
+
+def fun_l0_n440()
+ fun_l1_n312
+end
+
+def fun_l0_n441()
+ fun_l1_n134
+end
+
+def fun_l0_n442()
+ fun_l1_n246
+end
+
+def fun_l0_n443()
+ fun_l1_n498
+end
+
+def fun_l0_n444()
+ fun_l1_n606
+end
+
+def fun_l0_n445()
+ fun_l1_n986
+end
+
+def fun_l0_n446()
+ fun_l1_n659
+end
+
+def fun_l0_n447()
+ fun_l1_n823
+end
+
+def fun_l0_n448()
+ fun_l1_n635
+end
+
+def fun_l0_n449()
+ fun_l1_n388
+end
+
+def fun_l0_n450()
+ fun_l1_n474
+end
+
+def fun_l0_n451()
+ fun_l1_n742
+end
+
+def fun_l0_n452()
+ fun_l1_n605
+end
+
+def fun_l0_n453()
+ fun_l1_n0
+end
+
+def fun_l0_n454()
+ fun_l1_n691
+end
+
+def fun_l0_n455()
+ fun_l1_n791
+end
+
+def fun_l0_n456()
+ fun_l1_n363
+end
+
+def fun_l0_n457()
+ fun_l1_n370
+end
+
+def fun_l0_n458()
+ fun_l1_n168
+end
+
+def fun_l0_n459()
+ fun_l1_n626
+end
+
+def fun_l0_n460()
+ fun_l1_n139
+end
+
+def fun_l0_n461()
+ fun_l1_n708
+end
+
+def fun_l0_n462()
+ fun_l1_n77
+end
+
+def fun_l0_n463()
+ fun_l1_n27
+end
+
+def fun_l0_n464()
+ fun_l1_n706
+end
+
+def fun_l0_n465()
+ fun_l1_n29
+end
+
+def fun_l0_n466()
+ fun_l1_n470
+end
+
+def fun_l0_n467()
+ fun_l1_n606
+end
+
+def fun_l0_n468()
+ fun_l1_n458
+end
+
+def fun_l0_n469()
+ fun_l1_n465
+end
+
+def fun_l0_n470()
+ fun_l1_n23
+end
+
+def fun_l0_n471()
+ fun_l1_n364
+end
+
+def fun_l0_n472()
+ fun_l1_n606
+end
+
+def fun_l0_n473()
+ fun_l1_n109
+end
+
+def fun_l0_n474()
+ fun_l1_n904
+end
+
+def fun_l0_n475()
+ fun_l1_n923
+end
+
+def fun_l0_n476()
+ fun_l1_n19
+end
+
+def fun_l0_n477()
+ fun_l1_n871
+end
+
+def fun_l0_n478()
+ fun_l1_n422
+end
+
+def fun_l0_n479()
+ fun_l1_n72
+end
+
+def fun_l0_n480()
+ fun_l1_n528
+end
+
+def fun_l0_n481()
+ fun_l1_n181
+end
+
+def fun_l0_n482()
+ fun_l1_n33
+end
+
+def fun_l0_n483()
+ fun_l1_n951
+end
+
+def fun_l0_n484()
+ fun_l1_n747
+end
+
+def fun_l0_n485()
+ fun_l1_n200
+end
+
+def fun_l0_n486()
+ fun_l1_n474
+end
+
+def fun_l0_n487()
+ fun_l1_n126
+end
+
+def fun_l0_n488()
+ fun_l1_n757
+end
+
+def fun_l0_n489()
+ fun_l1_n101
+end
+
+def fun_l0_n490()
+ fun_l1_n925
+end
+
+def fun_l0_n491()
+ fun_l1_n791
+end
+
+def fun_l0_n492()
+ fun_l1_n404
+end
+
+def fun_l0_n493()
+ fun_l1_n841
+end
+
+def fun_l0_n494()
+ fun_l1_n774
+end
+
+def fun_l0_n495()
+ fun_l1_n230
+end
+
+def fun_l0_n496()
+ fun_l1_n796
+end
+
+def fun_l0_n497()
+ fun_l1_n270
+end
+
+def fun_l0_n498()
+ fun_l1_n795
+end
+
+def fun_l0_n499()
+ fun_l1_n628
+end
+
+def fun_l0_n500()
+ fun_l1_n865
+end
+
+def fun_l0_n501()
+ fun_l1_n105
+end
+
+def fun_l0_n502()
+ fun_l1_n538
+end
+
+def fun_l0_n503()
+ fun_l1_n769
+end
+
+def fun_l0_n504()
+ fun_l1_n714
+end
+
+def fun_l0_n505()
+ fun_l1_n889
+end
+
+def fun_l0_n506()
+ fun_l1_n191
+end
+
+def fun_l0_n507()
+ fun_l1_n966
+end
+
+def fun_l0_n508()
+ fun_l1_n196
+end
+
+def fun_l0_n509()
+ fun_l1_n878
+end
+
+def fun_l0_n510()
+ fun_l1_n487
+end
+
+def fun_l0_n511()
+ fun_l1_n242
+end
+
+def fun_l0_n512()
+ fun_l1_n740
+end
+
+def fun_l0_n513()
+ fun_l1_n938
+end
+
+def fun_l0_n514()
+ fun_l1_n485
+end
+
+def fun_l0_n515()
+ fun_l1_n380
+end
+
+def fun_l0_n516()
+ fun_l1_n936
+end
+
+def fun_l0_n517()
+ fun_l1_n237
+end
+
+def fun_l0_n518()
+ fun_l1_n79
+end
+
+def fun_l0_n519()
+ fun_l1_n501
+end
+
+def fun_l0_n520()
+ fun_l1_n966
+end
+
+def fun_l0_n521()
+ fun_l1_n741
+end
+
+def fun_l0_n522()
+ fun_l1_n170
+end
+
+def fun_l0_n523()
+ fun_l1_n183
+end
+
+def fun_l0_n524()
+ fun_l1_n556
+end
+
+def fun_l0_n525()
+ fun_l1_n865
+end
+
+def fun_l0_n526()
+ fun_l1_n884
+end
+
+def fun_l0_n527()
+ fun_l1_n725
+end
+
+def fun_l0_n528()
+ fun_l1_n205
+end
+
+def fun_l0_n529()
+ fun_l1_n72
+end
+
+def fun_l0_n530()
+ fun_l1_n432
+end
+
+def fun_l0_n531()
+ fun_l1_n90
+end
+
+def fun_l0_n532()
+ fun_l1_n189
+end
+
+def fun_l0_n533()
+ fun_l1_n395
+end
+
+def fun_l0_n534()
+ fun_l1_n201
+end
+
+def fun_l0_n535()
+ fun_l1_n534
+end
+
+def fun_l0_n536()
+ fun_l1_n748
+end
+
+def fun_l0_n537()
+ fun_l1_n439
+end
+
+def fun_l0_n538()
+ fun_l1_n495
+end
+
+def fun_l0_n539()
+ fun_l1_n904
+end
+
+def fun_l0_n540()
+ fun_l1_n525
+end
+
+def fun_l0_n541()
+ fun_l1_n924
+end
+
+def fun_l0_n542()
+ fun_l1_n549
+end
+
+def fun_l0_n543()
+ fun_l1_n2
+end
+
+def fun_l0_n544()
+ fun_l1_n257
+end
+
+def fun_l0_n545()
+ fun_l1_n921
+end
+
+def fun_l0_n546()
+ fun_l1_n82
+end
+
+def fun_l0_n547()
+ fun_l1_n384
+end
+
+def fun_l0_n548()
+ fun_l1_n219
+end
+
+def fun_l0_n549()
+ fun_l1_n379
+end
+
+def fun_l0_n550()
+ fun_l1_n488
+end
+
+def fun_l0_n551()
+ fun_l1_n4
+end
+
+def fun_l0_n552()
+ fun_l1_n150
+end
+
+def fun_l0_n553()
+ fun_l1_n168
+end
+
+def fun_l0_n554()
+ fun_l1_n773
+end
+
+def fun_l0_n555()
+ fun_l1_n444
+end
+
+def fun_l0_n556()
+ fun_l1_n201
+end
+
+def fun_l0_n557()
+ fun_l1_n333
+end
+
+def fun_l0_n558()
+ fun_l1_n556
+end
+
+def fun_l0_n559()
+ fun_l1_n394
+end
+
+def fun_l0_n560()
+ fun_l1_n540
+end
+
+def fun_l0_n561()
+ fun_l1_n640
+end
+
+def fun_l0_n562()
+ fun_l1_n321
+end
+
+def fun_l0_n563()
+ fun_l1_n286
+end
+
+def fun_l0_n564()
+ fun_l1_n320
+end
+
+def fun_l0_n565()
+ fun_l1_n2
+end
+
+def fun_l0_n566()
+ fun_l1_n50
+end
+
+def fun_l0_n567()
+ fun_l1_n269
+end
+
+def fun_l0_n568()
+ fun_l1_n412
+end
+
+def fun_l0_n569()
+ fun_l1_n984
+end
+
+def fun_l0_n570()
+ fun_l1_n307
+end
+
+def fun_l0_n571()
+ fun_l1_n954
+end
+
+def fun_l0_n572()
+ fun_l1_n728
+end
+
+def fun_l0_n573()
+ fun_l1_n227
+end
+
+def fun_l0_n574()
+ fun_l1_n917
+end
+
+def fun_l0_n575()
+ fun_l1_n974
+end
+
+def fun_l0_n576()
+ fun_l1_n995
+end
+
+def fun_l0_n577()
+ fun_l1_n593
+end
+
+def fun_l0_n578()
+ fun_l1_n704
+end
+
+def fun_l0_n579()
+ fun_l1_n142
+end
+
+def fun_l0_n580()
+ fun_l1_n585
+end
+
+def fun_l0_n581()
+ fun_l1_n634
+end
+
+def fun_l0_n582()
+ fun_l1_n888
+end
+
+def fun_l0_n583()
+ fun_l1_n873
+end
+
+def fun_l0_n584()
+ fun_l1_n674
+end
+
+def fun_l0_n585()
+ fun_l1_n657
+end
+
+def fun_l0_n586()
+ fun_l1_n248
+end
+
+def fun_l0_n587()
+ fun_l1_n478
+end
+
+def fun_l0_n588()
+ fun_l1_n263
+end
+
+def fun_l0_n589()
+ fun_l1_n908
+end
+
+def fun_l0_n590()
+ fun_l1_n741
+end
+
+def fun_l0_n591()
+ fun_l1_n299
+end
+
+def fun_l0_n592()
+ fun_l1_n763
+end
+
+def fun_l0_n593()
+ fun_l1_n746
+end
+
+def fun_l0_n594()
+ fun_l1_n367
+end
+
+def fun_l0_n595()
+ fun_l1_n394
+end
+
+def fun_l0_n596()
+ fun_l1_n304
+end
+
+def fun_l0_n597()
+ fun_l1_n939
+end
+
+def fun_l0_n598()
+ fun_l1_n392
+end
+
+def fun_l0_n599()
+ fun_l1_n758
+end
+
+def fun_l0_n600()
+ fun_l1_n133
+end
+
+def fun_l0_n601()
+ fun_l1_n212
+end
+
+def fun_l0_n602()
+ fun_l1_n719
+end
+
+def fun_l0_n603()
+ fun_l1_n952
+end
+
+def fun_l0_n604()
+ fun_l1_n818
+end
+
+def fun_l0_n605()
+ fun_l1_n216
+end
+
+def fun_l0_n606()
+ fun_l1_n438
+end
+
+def fun_l0_n607()
+ fun_l1_n315
+end
+
+def fun_l0_n608()
+ fun_l1_n450
+end
+
+def fun_l0_n609()
+ fun_l1_n420
+end
+
+def fun_l0_n610()
+ fun_l1_n917
+end
+
+def fun_l0_n611()
+ fun_l1_n921
+end
+
+def fun_l0_n612()
+ fun_l1_n596
+end
+
+def fun_l0_n613()
+ fun_l1_n253
+end
+
+def fun_l0_n614()
+ fun_l1_n395
+end
+
+def fun_l0_n615()
+ fun_l1_n120
+end
+
+def fun_l0_n616()
+ fun_l1_n742
+end
+
+def fun_l0_n617()
+ fun_l1_n489
+end
+
+def fun_l0_n618()
+ fun_l1_n338
+end
+
+def fun_l0_n619()
+ fun_l1_n351
+end
+
+def fun_l0_n620()
+ fun_l1_n384
+end
+
+def fun_l0_n621()
+ fun_l1_n581
+end
+
+def fun_l0_n622()
+ fun_l1_n667
+end
+
+def fun_l0_n623()
+ fun_l1_n956
+end
+
+def fun_l0_n624()
+ fun_l1_n156
+end
+
+def fun_l0_n625()
+ fun_l1_n909
+end
+
+def fun_l0_n626()
+ fun_l1_n548
+end
+
+def fun_l0_n627()
+ fun_l1_n293
+end
+
+def fun_l0_n628()
+ fun_l1_n997
+end
+
+def fun_l0_n629()
+ fun_l1_n950
+end
+
+def fun_l0_n630()
+ fun_l1_n761
+end
+
+def fun_l0_n631()
+ fun_l1_n72
+end
+
+def fun_l0_n632()
+ fun_l1_n213
+end
+
+def fun_l0_n633()
+ fun_l1_n746
+end
+
+def fun_l0_n634()
+ fun_l1_n327
+end
+
+def fun_l0_n635()
+ fun_l1_n166
+end
+
+def fun_l0_n636()
+ fun_l1_n749
+end
+
+def fun_l0_n637()
+ fun_l1_n196
+end
+
+def fun_l0_n638()
+ fun_l1_n786
+end
+
+def fun_l0_n639()
+ fun_l1_n613
+end
+
+def fun_l0_n640()
+ fun_l1_n903
+end
+
+def fun_l0_n641()
+ fun_l1_n836
+end
+
+def fun_l0_n642()
+ fun_l1_n687
+end
+
+def fun_l0_n643()
+ fun_l1_n533
+end
+
+def fun_l0_n644()
+ fun_l1_n544
+end
+
+def fun_l0_n645()
+ fun_l1_n637
+end
+
+def fun_l0_n646()
+ fun_l1_n859
+end
+
+def fun_l0_n647()
+ fun_l1_n917
+end
+
+def fun_l0_n648()
+ fun_l1_n119
+end
+
+def fun_l0_n649()
+ fun_l1_n327
+end
+
+def fun_l0_n650()
+ fun_l1_n759
+end
+
+def fun_l0_n651()
+ fun_l1_n169
+end
+
+def fun_l0_n652()
+ fun_l1_n497
+end
+
+def fun_l0_n653()
+ fun_l1_n441
+end
+
+def fun_l0_n654()
+ fun_l1_n151
+end
+
+def fun_l0_n655()
+ fun_l1_n553
+end
+
+def fun_l0_n656()
+ fun_l1_n441
+end
+
+def fun_l0_n657()
+ fun_l1_n390
+end
+
+def fun_l0_n658()
+ fun_l1_n615
+end
+
+def fun_l0_n659()
+ fun_l1_n578
+end
+
+def fun_l0_n660()
+ fun_l1_n873
+end
+
+def fun_l0_n661()
+ fun_l1_n608
+end
+
+def fun_l0_n662()
+ fun_l1_n446
+end
+
+def fun_l0_n663()
+ fun_l1_n647
+end
+
+def fun_l0_n664()
+ fun_l1_n601
+end
+
+def fun_l0_n665()
+ fun_l1_n945
+end
+
+def fun_l0_n666()
+ fun_l1_n172
+end
+
+def fun_l0_n667()
+ fun_l1_n547
+end
+
+def fun_l0_n668()
+ fun_l1_n977
+end
+
+def fun_l0_n669()
+ fun_l1_n419
+end
+
+def fun_l0_n670()
+ fun_l1_n626
+end
+
+def fun_l0_n671()
+ fun_l1_n345
+end
+
+def fun_l0_n672()
+ fun_l1_n899
+end
+
+def fun_l0_n673()
+ fun_l1_n442
+end
+
+def fun_l0_n674()
+ fun_l1_n296
+end
+
+def fun_l0_n675()
+ fun_l1_n303
+end
+
+def fun_l0_n676()
+ fun_l1_n679
+end
+
+def fun_l0_n677()
+ fun_l1_n655
+end
+
+def fun_l0_n678()
+ fun_l1_n998
+end
+
+def fun_l0_n679()
+ fun_l1_n157
+end
+
+def fun_l0_n680()
+ fun_l1_n705
+end
+
+def fun_l0_n681()
+ fun_l1_n832
+end
+
+def fun_l0_n682()
+ fun_l1_n113
+end
+
+def fun_l0_n683()
+ fun_l1_n550
+end
+
+def fun_l0_n684()
+ fun_l1_n21
+end
+
+def fun_l0_n685()
+ fun_l1_n21
+end
+
+def fun_l0_n686()
+ fun_l1_n195
+end
+
+def fun_l0_n687()
+ fun_l1_n269
+end
+
+def fun_l0_n688()
+ fun_l1_n12
+end
+
+def fun_l0_n689()
+ fun_l1_n49
+end
+
+def fun_l0_n690()
+ fun_l1_n836
+end
+
+def fun_l0_n691()
+ fun_l1_n808
+end
+
+def fun_l0_n692()
+ fun_l1_n938
+end
+
+def fun_l0_n693()
+ fun_l1_n531
+end
+
+def fun_l0_n694()
+ fun_l1_n296
+end
+
+def fun_l0_n695()
+ fun_l1_n32
+end
+
+def fun_l0_n696()
+ fun_l1_n641
+end
+
+def fun_l0_n697()
+ fun_l1_n549
+end
+
+def fun_l0_n698()
+ fun_l1_n437
+end
+
+def fun_l0_n699()
+ fun_l1_n133
+end
+
+def fun_l0_n700()
+ fun_l1_n734
+end
+
+def fun_l0_n701()
+ fun_l1_n340
+end
+
+def fun_l0_n702()
+ fun_l1_n768
+end
+
+def fun_l0_n703()
+ fun_l1_n97
+end
+
+def fun_l0_n704()
+ fun_l1_n52
+end
+
+def fun_l0_n705()
+ fun_l1_n121
+end
+
+def fun_l0_n706()
+ fun_l1_n471
+end
+
+def fun_l0_n707()
+ fun_l1_n94
+end
+
+def fun_l0_n708()
+ fun_l1_n946
+end
+
+def fun_l0_n709()
+ fun_l1_n151
+end
+
+def fun_l0_n710()
+ fun_l1_n946
+end
+
+def fun_l0_n711()
+ fun_l1_n191
+end
+
+def fun_l0_n712()
+ fun_l1_n552
+end
+
+def fun_l0_n713()
+ fun_l1_n733
+end
+
+def fun_l0_n714()
+ fun_l1_n895
+end
+
+def fun_l0_n715()
+ fun_l1_n850
+end
+
+def fun_l0_n716()
+ fun_l1_n113
+end
+
+def fun_l0_n717()
+ fun_l1_n69
+end
+
+def fun_l0_n718()
+ fun_l1_n862
+end
+
+def fun_l0_n719()
+ fun_l1_n635
+end
+
+def fun_l0_n720()
+ fun_l1_n714
+end
+
+def fun_l0_n721()
+ fun_l1_n179
+end
+
+def fun_l0_n722()
+ fun_l1_n17
+end
+
+def fun_l0_n723()
+ fun_l1_n299
+end
+
+def fun_l0_n724()
+ fun_l1_n141
+end
+
+def fun_l0_n725()
+ fun_l1_n338
+end
+
+def fun_l0_n726()
+ fun_l1_n650
+end
+
+def fun_l0_n727()
+ fun_l1_n784
+end
+
+def fun_l0_n728()
+ fun_l1_n333
+end
+
+def fun_l0_n729()
+ fun_l1_n10
+end
+
+def fun_l0_n730()
+ fun_l1_n271
+end
+
+def fun_l0_n731()
+ fun_l1_n882
+end
+
+def fun_l0_n732()
+ fun_l1_n512
+end
+
+def fun_l0_n733()
+ fun_l1_n932
+end
+
+def fun_l0_n734()
+ fun_l1_n68
+end
+
+def fun_l0_n735()
+ fun_l1_n111
+end
+
+def fun_l0_n736()
+ fun_l1_n649
+end
+
+def fun_l0_n737()
+ fun_l1_n512
+end
+
+def fun_l0_n738()
+ fun_l1_n551
+end
+
+def fun_l0_n739()
+ fun_l1_n153
+end
+
+def fun_l0_n740()
+ fun_l1_n582
+end
+
+def fun_l0_n741()
+ fun_l1_n366
+end
+
+def fun_l0_n742()
+ fun_l1_n135
+end
+
+def fun_l0_n743()
+ fun_l1_n136
+end
+
+def fun_l0_n744()
+ fun_l1_n782
+end
+
+def fun_l0_n745()
+ fun_l1_n258
+end
+
+def fun_l0_n746()
+ fun_l1_n44
+end
+
+def fun_l0_n747()
+ fun_l1_n379
+end
+
+def fun_l0_n748()
+ fun_l1_n14
+end
+
+def fun_l0_n749()
+ fun_l1_n563
+end
+
+def fun_l0_n750()
+ fun_l1_n361
+end
+
+def fun_l0_n751()
+ fun_l1_n624
+end
+
+def fun_l0_n752()
+ fun_l1_n516
+end
+
+def fun_l0_n753()
+ fun_l1_n944
+end
+
+def fun_l0_n754()
+ fun_l1_n783
+end
+
+def fun_l0_n755()
+ fun_l1_n744
+end
+
+def fun_l0_n756()
+ fun_l1_n500
+end
+
+def fun_l0_n757()
+ fun_l1_n809
+end
+
+def fun_l0_n758()
+ fun_l1_n757
+end
+
+def fun_l0_n759()
+ fun_l1_n995
+end
+
+def fun_l0_n760()
+ fun_l1_n114
+end
+
+def fun_l0_n761()
+ fun_l1_n802
+end
+
+def fun_l0_n762()
+ fun_l1_n114
+end
+
+def fun_l0_n763()
+ fun_l1_n683
+end
+
+def fun_l0_n764()
+ fun_l1_n775
+end
+
+def fun_l0_n765()
+ fun_l1_n967
+end
+
+def fun_l0_n766()
+ fun_l1_n499
+end
+
+def fun_l0_n767()
+ fun_l1_n561
+end
+
+def fun_l0_n768()
+ fun_l1_n206
+end
+
+def fun_l0_n769()
+ fun_l1_n738
+end
+
+def fun_l0_n770()
+ fun_l1_n953
+end
+
+def fun_l0_n771()
+ fun_l1_n394
+end
+
+def fun_l0_n772()
+ fun_l1_n393
+end
+
+def fun_l0_n773()
+ fun_l1_n226
+end
+
+def fun_l0_n774()
+ fun_l1_n363
+end
+
+def fun_l0_n775()
+ fun_l1_n928
+end
+
+def fun_l0_n776()
+ fun_l1_n213
+end
+
+def fun_l0_n777()
+ fun_l1_n3
+end
+
+def fun_l0_n778()
+ fun_l1_n656
+end
+
+def fun_l0_n779()
+ fun_l1_n927
+end
+
+def fun_l0_n780()
+ fun_l1_n406
+end
+
+def fun_l0_n781()
+ fun_l1_n589
+end
+
+def fun_l0_n782()
+ fun_l1_n56
+end
+
+def fun_l0_n783()
+ fun_l1_n280
+end
+
+def fun_l0_n784()
+ fun_l1_n156
+end
+
+def fun_l0_n785()
+ fun_l1_n257
+end
+
+def fun_l0_n786()
+ fun_l1_n269
+end
+
+def fun_l0_n787()
+ fun_l1_n453
+end
+
+def fun_l0_n788()
+ fun_l1_n293
+end
+
+def fun_l0_n789()
+ fun_l1_n570
+end
+
+def fun_l0_n790()
+ fun_l1_n194
+end
+
+def fun_l0_n791()
+ fun_l1_n120
+end
+
+def fun_l0_n792()
+ fun_l1_n976
+end
+
+def fun_l0_n793()
+ fun_l1_n115
+end
+
+def fun_l0_n794()
+ fun_l1_n74
+end
+
+def fun_l0_n795()
+ fun_l1_n25
+end
+
+def fun_l0_n796()
+ fun_l1_n288
+end
+
+def fun_l0_n797()
+ fun_l1_n49
+end
+
+def fun_l0_n798()
+ fun_l1_n237
+end
+
+def fun_l0_n799()
+ fun_l1_n481
+end
+
+def fun_l0_n800()
+ fun_l1_n329
+end
+
+def fun_l0_n801()
+ fun_l1_n907
+end
+
+def fun_l0_n802()
+ fun_l1_n804
+end
+
+def fun_l0_n803()
+ fun_l1_n8
+end
+
+def fun_l0_n804()
+ fun_l1_n270
+end
+
+def fun_l0_n805()
+ fun_l1_n315
+end
+
+def fun_l0_n806()
+ fun_l1_n941
+end
+
+def fun_l0_n807()
+ fun_l1_n343
+end
+
+def fun_l0_n808()
+ fun_l1_n817
+end
+
+def fun_l0_n809()
+ fun_l1_n315
+end
+
+def fun_l0_n810()
+ fun_l1_n156
+end
+
+def fun_l0_n811()
+ fun_l1_n689
+end
+
+def fun_l0_n812()
+ fun_l1_n644
+end
+
+def fun_l0_n813()
+ fun_l1_n158
+end
+
+def fun_l0_n814()
+ fun_l1_n588
+end
+
+def fun_l0_n815()
+ fun_l1_n820
+end
+
+def fun_l0_n816()
+ fun_l1_n86
+end
+
+def fun_l0_n817()
+ fun_l1_n176
+end
+
+def fun_l0_n818()
+ fun_l1_n611
+end
+
+def fun_l0_n819()
+ fun_l1_n816
+end
+
+def fun_l0_n820()
+ fun_l1_n332
+end
+
+def fun_l0_n821()
+ fun_l1_n170
+end
+
+def fun_l0_n822()
+ fun_l1_n483
+end
+
+def fun_l0_n823()
+ fun_l1_n768
+end
+
+def fun_l0_n824()
+ fun_l1_n825
+end
+
+def fun_l0_n825()
+ fun_l1_n114
+end
+
+def fun_l0_n826()
+ fun_l1_n102
+end
+
+def fun_l0_n827()
+ fun_l1_n963
+end
+
+def fun_l0_n828()
+ fun_l1_n202
+end
+
+def fun_l0_n829()
+ fun_l1_n708
+end
+
+def fun_l0_n830()
+ fun_l1_n350
+end
+
+def fun_l0_n831()
+ fun_l1_n976
+end
+
+def fun_l0_n832()
+ fun_l1_n834
+end
+
+def fun_l0_n833()
+ fun_l1_n342
+end
+
+def fun_l0_n834()
+ fun_l1_n764
+end
+
+def fun_l0_n835()
+ fun_l1_n211
+end
+
+def fun_l0_n836()
+ fun_l1_n173
+end
+
+def fun_l0_n837()
+ fun_l1_n988
+end
+
+def fun_l0_n838()
+ fun_l1_n369
+end
+
+def fun_l0_n839()
+ fun_l1_n481
+end
+
+def fun_l0_n840()
+ fun_l1_n580
+end
+
+def fun_l0_n841()
+ fun_l1_n255
+end
+
+def fun_l0_n842()
+ fun_l1_n476
+end
+
+def fun_l0_n843()
+ fun_l1_n795
+end
+
+def fun_l0_n844()
+ fun_l1_n296
+end
+
+def fun_l0_n845()
+ fun_l1_n880
+end
+
+def fun_l0_n846()
+ fun_l1_n457
+end
+
+def fun_l0_n847()
+ fun_l1_n88
+end
+
+def fun_l0_n848()
+ fun_l1_n901
+end
+
+def fun_l0_n849()
+ fun_l1_n988
+end
+
+def fun_l0_n850()
+ fun_l1_n396
+end
+
+def fun_l0_n851()
+ fun_l1_n60
+end
+
+def fun_l0_n852()
+ fun_l1_n738
+end
+
+def fun_l0_n853()
+ fun_l1_n2
+end
+
+def fun_l0_n854()
+ fun_l1_n652
+end
+
+def fun_l0_n855()
+ fun_l1_n982
+end
+
+def fun_l0_n856()
+ fun_l1_n987
+end
+
+def fun_l0_n857()
+ fun_l1_n488
+end
+
+def fun_l0_n858()
+ fun_l1_n354
+end
+
+def fun_l0_n859()
+ fun_l1_n320
+end
+
+def fun_l0_n860()
+ fun_l1_n378
+end
+
+def fun_l0_n861()
+ fun_l1_n965
+end
+
+def fun_l0_n862()
+ fun_l1_n858
+end
+
+def fun_l0_n863()
+ fun_l1_n360
+end
+
+def fun_l0_n864()
+ fun_l1_n812
+end
+
+def fun_l0_n865()
+ fun_l1_n590
+end
+
+def fun_l0_n866()
+ fun_l1_n339
+end
+
+def fun_l0_n867()
+ fun_l1_n365
+end
+
+def fun_l0_n868()
+ fun_l1_n190
+end
+
+def fun_l0_n869()
+ fun_l1_n555
+end
+
+def fun_l0_n870()
+ fun_l1_n676
+end
+
+def fun_l0_n871()
+ fun_l1_n681
+end
+
+def fun_l0_n872()
+ fun_l1_n283
+end
+
+def fun_l0_n873()
+ fun_l1_n865
+end
+
+def fun_l0_n874()
+ fun_l1_n402
+end
+
+def fun_l0_n875()
+ fun_l1_n530
+end
+
+def fun_l0_n876()
+ fun_l1_n25
+end
+
+def fun_l0_n877()
+ fun_l1_n10
+end
+
+def fun_l0_n878()
+ fun_l1_n252
+end
+
+def fun_l0_n879()
+ fun_l1_n174
+end
+
+def fun_l0_n880()
+ fun_l1_n449
+end
+
+def fun_l0_n881()
+ fun_l1_n385
+end
+
+def fun_l0_n882()
+ fun_l1_n689
+end
+
+def fun_l0_n883()
+ fun_l1_n492
+end
+
+def fun_l0_n884()
+ fun_l1_n949
+end
+
+def fun_l0_n885()
+ fun_l1_n912
+end
+
+def fun_l0_n886()
+ fun_l1_n131
+end
+
+def fun_l0_n887()
+ fun_l1_n484
+end
+
+def fun_l0_n888()
+ fun_l1_n647
+end
+
+def fun_l0_n889()
+ fun_l1_n679
+end
+
+def fun_l0_n890()
+ fun_l1_n16
+end
+
+def fun_l0_n891()
+ fun_l1_n745
+end
+
+def fun_l0_n892()
+ fun_l1_n490
+end
+
+def fun_l0_n893()
+ fun_l1_n104
+end
+
+def fun_l0_n894()
+ fun_l1_n91
+end
+
+def fun_l0_n895()
+ fun_l1_n368
+end
+
+def fun_l0_n896()
+ fun_l1_n439
+end
+
+def fun_l0_n897()
+ fun_l1_n23
+end
+
+def fun_l0_n898()
+ fun_l1_n277
+end
+
+def fun_l0_n899()
+ fun_l1_n597
+end
+
+def fun_l0_n900()
+ fun_l1_n644
+end
+
+def fun_l0_n901()
+ fun_l1_n255
+end
+
+def fun_l0_n902()
+ fun_l1_n767
+end
+
+def fun_l0_n903()
+ fun_l1_n417
+end
+
+def fun_l0_n904()
+ fun_l1_n517
+end
+
+def fun_l0_n905()
+ fun_l1_n609
+end
+
+def fun_l0_n906()
+ fun_l1_n498
+end
+
+def fun_l0_n907()
+ fun_l1_n24
+end
+
+def fun_l0_n908()
+ fun_l1_n722
+end
+
+def fun_l0_n909()
+ fun_l1_n494
+end
+
+def fun_l0_n910()
+ fun_l1_n450
+end
+
+def fun_l0_n911()
+ fun_l1_n302
+end
+
+def fun_l0_n912()
+ fun_l1_n801
+end
+
+def fun_l0_n913()
+ fun_l1_n709
+end
+
+def fun_l0_n914()
+ fun_l1_n555
+end
+
+def fun_l0_n915()
+ fun_l1_n955
+end
+
+def fun_l0_n916()
+ fun_l1_n310
+end
+
+def fun_l0_n917()
+ fun_l1_n839
+end
+
+def fun_l0_n918()
+ fun_l1_n590
+end
+
+def fun_l0_n919()
+ fun_l1_n83
+end
+
+def fun_l0_n920()
+ fun_l1_n335
+end
+
+def fun_l0_n921()
+ fun_l1_n740
+end
+
+def fun_l0_n922()
+ fun_l1_n357
+end
+
+def fun_l0_n923()
+ fun_l1_n312
+end
+
+def fun_l0_n924()
+ fun_l1_n544
+end
+
+def fun_l0_n925()
+ fun_l1_n611
+end
+
+def fun_l0_n926()
+ fun_l1_n651
+end
+
+def fun_l0_n927()
+ fun_l1_n730
+end
+
+def fun_l0_n928()
+ fun_l1_n623
+end
+
+def fun_l0_n929()
+ fun_l1_n337
+end
+
+def fun_l0_n930()
+ fun_l1_n574
+end
+
+def fun_l0_n931()
+ fun_l1_n795
+end
+
+def fun_l0_n932()
+ fun_l1_n224
+end
+
+def fun_l0_n933()
+ fun_l1_n355
+end
+
+def fun_l0_n934()
+ fun_l1_n286
+end
+
+def fun_l0_n935()
+ fun_l1_n893
+end
+
+def fun_l0_n936()
+ fun_l1_n278
+end
+
+def fun_l0_n937()
+ fun_l1_n970
+end
+
+def fun_l0_n938()
+ fun_l1_n761
+end
+
+def fun_l0_n939()
+ fun_l1_n244
+end
+
+def fun_l0_n940()
+ fun_l1_n381
+end
+
+def fun_l0_n941()
+ fun_l1_n661
+end
+
+def fun_l0_n942()
+ fun_l1_n543
+end
+
+def fun_l0_n943()
+ fun_l1_n432
+end
+
+def fun_l0_n944()
+ fun_l1_n237
+end
+
+def fun_l0_n945()
+ fun_l1_n815
+end
+
+def fun_l0_n946()
+ fun_l1_n580
+end
+
+def fun_l0_n947()
+ fun_l1_n99
+end
+
+def fun_l0_n948()
+ fun_l1_n492
+end
+
+def fun_l0_n949()
+ fun_l1_n799
+end
+
+def fun_l0_n950()
+ fun_l1_n727
+end
+
+def fun_l0_n951()
+ fun_l1_n632
+end
+
+def fun_l0_n952()
+ fun_l1_n689
+end
+
+def fun_l0_n953()
+ fun_l1_n69
+end
+
+def fun_l0_n954()
+ fun_l1_n782
+end
+
+def fun_l0_n955()
+ fun_l1_n140
+end
+
+def fun_l0_n956()
+ fun_l1_n451
+end
+
+def fun_l0_n957()
+ fun_l1_n440
+end
+
+def fun_l0_n958()
+ fun_l1_n88
+end
+
+def fun_l0_n959()
+ fun_l1_n775
+end
+
+def fun_l0_n960()
+ fun_l1_n455
+end
+
+def fun_l0_n961()
+ fun_l1_n402
+end
+
+def fun_l0_n962()
+ fun_l1_n906
+end
+
+def fun_l0_n963()
+ fun_l1_n990
+end
+
+def fun_l0_n964()
+ fun_l1_n432
+end
+
+def fun_l0_n965()
+ fun_l1_n419
+end
+
+def fun_l0_n966()
+ fun_l1_n568
+end
+
+def fun_l0_n967()
+ fun_l1_n177
+end
+
+def fun_l0_n968()
+ fun_l1_n206
+end
+
+def fun_l0_n969()
+ fun_l1_n170
+end
+
+def fun_l0_n970()
+ fun_l1_n216
+end
+
+def fun_l0_n971()
+ fun_l1_n700
+end
+
+def fun_l0_n972()
+ fun_l1_n286
+end
+
+def fun_l0_n973()
+ fun_l1_n817
+end
+
+def fun_l0_n974()
+ fun_l1_n605
+end
+
+def fun_l0_n975()
+ fun_l1_n400
+end
+
+def fun_l0_n976()
+ fun_l1_n282
+end
+
+def fun_l0_n977()
+ fun_l1_n978
+end
+
+def fun_l0_n978()
+ fun_l1_n661
+end
+
+def fun_l0_n979()
+ fun_l1_n42
+end
+
+def fun_l0_n980()
+ fun_l1_n1
+end
+
+def fun_l0_n981()
+ fun_l1_n864
+end
+
+def fun_l0_n982()
+ fun_l1_n829
+end
+
+def fun_l0_n983()
+ fun_l1_n713
+end
+
+def fun_l0_n984()
+ fun_l1_n653
+end
+
+def fun_l0_n985()
+ fun_l1_n332
+end
+
+def fun_l0_n986()
+ fun_l1_n21
+end
+
+def fun_l0_n987()
+ fun_l1_n532
+end
+
+def fun_l0_n988()
+ fun_l1_n163
+end
+
+def fun_l0_n989()
+ fun_l1_n154
+end
+
+def fun_l0_n990()
+ fun_l1_n351
+end
+
+def fun_l0_n991()
+ fun_l1_n708
+end
+
+def fun_l0_n992()
+ fun_l1_n955
+end
+
+def fun_l0_n993()
+ fun_l1_n250
+end
+
+def fun_l0_n994()
+ fun_l1_n645
+end
+
+def fun_l0_n995()
+ fun_l1_n668
+end
+
+def fun_l0_n996()
+ fun_l1_n764
+end
+
+def fun_l0_n997()
+ fun_l1_n79
+end
+
+def fun_l0_n998()
+ fun_l1_n251
+end
+
+def fun_l0_n999()
+ fun_l1_n586
+end
+
+def fun_l1_n0()
+ fun_l2_n188
+end
+
+def fun_l1_n1()
+ fun_l2_n165
+end
+
+def fun_l1_n2()
+ fun_l2_n875
+end
+
+def fun_l1_n3()
+ fun_l2_n246
+end
+
+def fun_l1_n4()
+ fun_l2_n887
+end
+
+def fun_l1_n5()
+ fun_l2_n191
+end
+
+def fun_l1_n6()
+ fun_l2_n187
+end
+
+def fun_l1_n7()
+ fun_l2_n138
+end
+
+def fun_l1_n8()
+ fun_l2_n455
+end
+
+def fun_l1_n9()
+ fun_l2_n861
+end
+
+def fun_l1_n10()
+ fun_l2_n588
+end
+
+def fun_l1_n11()
+ fun_l2_n157
+end
+
+def fun_l1_n12()
+ fun_l2_n903
+end
+
+def fun_l1_n13()
+ fun_l2_n655
+end
+
+def fun_l1_n14()
+ fun_l2_n252
+end
+
+def fun_l1_n15()
+ fun_l2_n894
+end
+
+def fun_l1_n16()
+ fun_l2_n908
+end
+
+def fun_l1_n17()
+ fun_l2_n649
+end
+
+def fun_l1_n18()
+ fun_l2_n890
+end
+
+def fun_l1_n19()
+ fun_l2_n451
+end
+
+def fun_l1_n20()
+ fun_l2_n775
+end
+
+def fun_l1_n21()
+ fun_l2_n522
+end
+
+def fun_l1_n22()
+ fun_l2_n666
+end
+
+def fun_l1_n23()
+ fun_l2_n784
+end
+
+def fun_l1_n24()
+ fun_l2_n204
+end
+
+def fun_l1_n25()
+ fun_l2_n310
+end
+
+def fun_l1_n26()
+ fun_l2_n740
+end
+
+def fun_l1_n27()
+ fun_l2_n22
+end
+
+def fun_l1_n28()
+ fun_l2_n114
+end
+
+def fun_l1_n29()
+ fun_l2_n132
+end
+
+def fun_l1_n30()
+ fun_l2_n935
+end
+
+def fun_l1_n31()
+ fun_l2_n459
+end
+
+def fun_l1_n32()
+ fun_l2_n262
+end
+
+def fun_l1_n33()
+ fun_l2_n22
+end
+
+def fun_l1_n34()
+ fun_l2_n649
+end
+
+def fun_l1_n35()
+ fun_l2_n817
+end
+
+def fun_l1_n36()
+ fun_l2_n17
+end
+
+def fun_l1_n37()
+ fun_l2_n685
+end
+
+def fun_l1_n38()
+ fun_l2_n118
+end
+
+def fun_l1_n39()
+ fun_l2_n285
+end
+
+def fun_l1_n40()
+ fun_l2_n186
+end
+
+def fun_l1_n41()
+ fun_l2_n318
+end
+
+def fun_l1_n42()
+ fun_l2_n133
+end
+
+def fun_l1_n43()
+ fun_l2_n364
+end
+
+def fun_l1_n44()
+ fun_l2_n672
+end
+
+def fun_l1_n45()
+ fun_l2_n710
+end
+
+def fun_l1_n46()
+ fun_l2_n568
+end
+
+def fun_l1_n47()
+ fun_l2_n923
+end
+
+def fun_l1_n48()
+ fun_l2_n664
+end
+
+def fun_l1_n49()
+ fun_l2_n460
+end
+
+def fun_l1_n50()
+ fun_l2_n900
+end
+
+def fun_l1_n51()
+ fun_l2_n144
+end
+
+def fun_l1_n52()
+ fun_l2_n798
+end
+
+def fun_l1_n53()
+ fun_l2_n529
+end
+
+def fun_l1_n54()
+ fun_l2_n547
+end
+
+def fun_l1_n55()
+ fun_l2_n643
+end
+
+def fun_l1_n56()
+ fun_l2_n454
+end
+
+def fun_l1_n57()
+ fun_l2_n210
+end
+
+def fun_l1_n58()
+ fun_l2_n69
+end
+
+def fun_l1_n59()
+ fun_l2_n140
+end
+
+def fun_l1_n60()
+ fun_l2_n844
+end
+
+def fun_l1_n61()
+ fun_l2_n933
+end
+
+def fun_l1_n62()
+ fun_l2_n569
+end
+
+def fun_l1_n63()
+ fun_l2_n596
+end
+
+def fun_l1_n64()
+ fun_l2_n254
+end
+
+def fun_l1_n65()
+ fun_l2_n838
+end
+
+def fun_l1_n66()
+ fun_l2_n796
+end
+
+def fun_l1_n67()
+ fun_l2_n262
+end
+
+def fun_l1_n68()
+ fun_l2_n379
+end
+
+def fun_l1_n69()
+ fun_l2_n700
+end
+
+def fun_l1_n70()
+ fun_l2_n947
+end
+
+def fun_l1_n71()
+ fun_l2_n226
+end
+
+def fun_l1_n72()
+ fun_l2_n550
+end
+
+def fun_l1_n73()
+ fun_l2_n791
+end
+
+def fun_l1_n74()
+ fun_l2_n252
+end
+
+def fun_l1_n75()
+ fun_l2_n347
+end
+
+def fun_l1_n76()
+ fun_l2_n812
+end
+
+def fun_l1_n77()
+ fun_l2_n14
+end
+
+def fun_l1_n78()
+ fun_l2_n19
+end
+
+def fun_l1_n79()
+ fun_l2_n296
+end
+
+def fun_l1_n80()
+ fun_l2_n217
+end
+
+def fun_l1_n81()
+ fun_l2_n979
+end
+
+def fun_l1_n82()
+ fun_l2_n815
+end
+
+def fun_l1_n83()
+ fun_l2_n879
+end
+
+def fun_l1_n84()
+ fun_l2_n311
+end
+
+def fun_l1_n85()
+ fun_l2_n351
+end
+
+def fun_l1_n86()
+ fun_l2_n997
+end
+
+def fun_l1_n87()
+ fun_l2_n551
+end
+
+def fun_l1_n88()
+ fun_l2_n221
+end
+
+def fun_l1_n89()
+ fun_l2_n869
+end
+
+def fun_l1_n90()
+ fun_l2_n700
+end
+
+def fun_l1_n91()
+ fun_l2_n627
+end
+
+def fun_l1_n92()
+ fun_l2_n106
+end
+
+def fun_l1_n93()
+ fun_l2_n731
+end
+
+def fun_l1_n94()
+ fun_l2_n61
+end
+
+def fun_l1_n95()
+ fun_l2_n386
+end
+
+def fun_l1_n96()
+ fun_l2_n960
+end
+
+def fun_l1_n97()
+ fun_l2_n75
+end
+
+def fun_l1_n98()
+ fun_l2_n896
+end
+
+def fun_l1_n99()
+ fun_l2_n597
+end
+
+def fun_l1_n100()
+ fun_l2_n73
+end
+
+def fun_l1_n101()
+ fun_l2_n78
+end
+
+def fun_l1_n102()
+ fun_l2_n919
+end
+
+def fun_l1_n103()
+ fun_l2_n784
+end
+
+def fun_l1_n104()
+ fun_l2_n798
+end
+
+def fun_l1_n105()
+ fun_l2_n478
+end
+
+def fun_l1_n106()
+ fun_l2_n883
+end
+
+def fun_l1_n107()
+ fun_l2_n855
+end
+
+def fun_l1_n108()
+ fun_l2_n581
+end
+
+def fun_l1_n109()
+ fun_l2_n694
+end
+
+def fun_l1_n110()
+ fun_l2_n490
+end
+
+def fun_l1_n111()
+ fun_l2_n44
+end
+
+def fun_l1_n112()
+ fun_l2_n537
+end
+
+def fun_l1_n113()
+ fun_l2_n21
+end
+
+def fun_l1_n114()
+ fun_l2_n312
+end
+
+def fun_l1_n115()
+ fun_l2_n700
+end
+
+def fun_l1_n116()
+ fun_l2_n227
+end
+
+def fun_l1_n117()
+ fun_l2_n689
+end
+
+def fun_l1_n118()
+ fun_l2_n664
+end
+
+def fun_l1_n119()
+ fun_l2_n669
+end
+
+def fun_l1_n120()
+ fun_l2_n306
+end
+
+def fun_l1_n121()
+ fun_l2_n278
+end
+
+def fun_l1_n122()
+ fun_l2_n312
+end
+
+def fun_l1_n123()
+ fun_l2_n416
+end
+
+def fun_l1_n124()
+ fun_l2_n912
+end
+
+def fun_l1_n125()
+ fun_l2_n135
+end
+
+def fun_l1_n126()
+ fun_l2_n814
+end
+
+def fun_l1_n127()
+ fun_l2_n468
+end
+
+def fun_l1_n128()
+ fun_l2_n342
+end
+
+def fun_l1_n129()
+ fun_l2_n584
+end
+
+def fun_l1_n130()
+ fun_l2_n826
+end
+
+def fun_l1_n131()
+ fun_l2_n361
+end
+
+def fun_l1_n132()
+ fun_l2_n517
+end
+
+def fun_l1_n133()
+ fun_l2_n894
+end
+
+def fun_l1_n134()
+ fun_l2_n40
+end
+
+def fun_l1_n135()
+ fun_l2_n674
+end
+
+def fun_l1_n136()
+ fun_l2_n137
+end
+
+def fun_l1_n137()
+ fun_l2_n915
+end
+
+def fun_l1_n138()
+ fun_l2_n990
+end
+
+def fun_l1_n139()
+ fun_l2_n86
+end
+
+def fun_l1_n140()
+ fun_l2_n692
+end
+
+def fun_l1_n141()
+ fun_l2_n977
+end
+
+def fun_l1_n142()
+ fun_l2_n956
+end
+
+def fun_l1_n143()
+ fun_l2_n909
+end
+
+def fun_l1_n144()
+ fun_l2_n854
+end
+
+def fun_l1_n145()
+ fun_l2_n223
+end
+
+def fun_l1_n146()
+ fun_l2_n873
+end
+
+def fun_l1_n147()
+ fun_l2_n962
+end
+
+def fun_l1_n148()
+ fun_l2_n441
+end
+
+def fun_l1_n149()
+ fun_l2_n598
+end
+
+def fun_l1_n150()
+ fun_l2_n329
+end
+
+def fun_l1_n151()
+ fun_l2_n749
+end
+
+def fun_l1_n152()
+ fun_l2_n756
+end
+
+def fun_l1_n153()
+ fun_l2_n567
+end
+
+def fun_l1_n154()
+ fun_l2_n23
+end
+
+def fun_l1_n155()
+ fun_l2_n626
+end
+
+def fun_l1_n156()
+ fun_l2_n368
+end
+
+def fun_l1_n157()
+ fun_l2_n169
+end
+
+def fun_l1_n158()
+ fun_l2_n496
+end
+
+def fun_l1_n159()
+ fun_l2_n582
+end
+
+def fun_l1_n160()
+ fun_l2_n443
+end
+
+def fun_l1_n161()
+ fun_l2_n406
+end
+
+def fun_l1_n162()
+ fun_l2_n97
+end
+
+def fun_l1_n163()
+ fun_l2_n293
+end
+
+def fun_l1_n164()
+ fun_l2_n608
+end
+
+def fun_l1_n165()
+ fun_l2_n255
+end
+
+def fun_l1_n166()
+ fun_l2_n421
+end
+
+def fun_l1_n167()
+ fun_l2_n126
+end
+
+def fun_l1_n168()
+ fun_l2_n894
+end
+
+def fun_l1_n169()
+ fun_l2_n486
+end
+
+def fun_l1_n170()
+ fun_l2_n219
+end
+
+def fun_l1_n171()
+ fun_l2_n343
+end
+
+def fun_l1_n172()
+ fun_l2_n914
+end
+
+def fun_l1_n173()
+ fun_l2_n815
+end
+
+def fun_l1_n174()
+ fun_l2_n436
+end
+
+def fun_l1_n175()
+ fun_l2_n923
+end
+
+def fun_l1_n176()
+ fun_l2_n706
+end
+
+def fun_l1_n177()
+ fun_l2_n769
+end
+
+def fun_l1_n178()
+ fun_l2_n271
+end
+
+def fun_l1_n179()
+ fun_l2_n489
+end
+
+def fun_l1_n180()
+ fun_l2_n724
+end
+
+def fun_l1_n181()
+ fun_l2_n202
+end
+
+def fun_l1_n182()
+ fun_l2_n884
+end
+
+def fun_l1_n183()
+ fun_l2_n957
+end
+
+def fun_l1_n184()
+ fun_l2_n690
+end
+
+def fun_l1_n185()
+ fun_l2_n468
+end
+
+def fun_l1_n186()
+ fun_l2_n6
+end
+
+def fun_l1_n187()
+ fun_l2_n94
+end
+
+def fun_l1_n188()
+ fun_l2_n226
+end
+
+def fun_l1_n189()
+ fun_l2_n462
+end
+
+def fun_l1_n190()
+ fun_l2_n228
+end
+
+def fun_l1_n191()
+ fun_l2_n497
+end
+
+def fun_l1_n192()
+ fun_l2_n246
+end
+
+def fun_l1_n193()
+ fun_l2_n960
+end
+
+def fun_l1_n194()
+ fun_l2_n492
+end
+
+def fun_l1_n195()
+ fun_l2_n485
+end
+
+def fun_l1_n196()
+ fun_l2_n18
+end
+
+def fun_l1_n197()
+ fun_l2_n536
+end
+
+def fun_l1_n198()
+ fun_l2_n802
+end
+
+def fun_l1_n199()
+ fun_l2_n151
+end
+
+def fun_l1_n200()
+ fun_l2_n82
+end
+
+def fun_l1_n201()
+ fun_l2_n266
+end
+
+def fun_l1_n202()
+ fun_l2_n445
+end
+
+def fun_l1_n203()
+ fun_l2_n64
+end
+
+def fun_l1_n204()
+ fun_l2_n11
+end
+
+def fun_l1_n205()
+ fun_l2_n351
+end
+
+def fun_l1_n206()
+ fun_l2_n994
+end
+
+def fun_l1_n207()
+ fun_l2_n305
+end
+
+def fun_l1_n208()
+ fun_l2_n258
+end
+
+def fun_l1_n209()
+ fun_l2_n122
+end
+
+def fun_l1_n210()
+ fun_l2_n426
+end
+
+def fun_l1_n211()
+ fun_l2_n385
+end
+
+def fun_l1_n212()
+ fun_l2_n556
+end
+
+def fun_l1_n213()
+ fun_l2_n490
+end
+
+def fun_l1_n214()
+ fun_l2_n809
+end
+
+def fun_l1_n215()
+ fun_l2_n547
+end
+
+def fun_l1_n216()
+ fun_l2_n62
+end
+
+def fun_l1_n217()
+ fun_l2_n675
+end
+
+def fun_l1_n218()
+ fun_l2_n923
+end
+
+def fun_l1_n219()
+ fun_l2_n746
+end
+
+def fun_l1_n220()
+ fun_l2_n222
+end
+
+def fun_l1_n221()
+ fun_l2_n962
+end
+
+def fun_l1_n222()
+ fun_l2_n925
+end
+
+def fun_l1_n223()
+ fun_l2_n908
+end
+
+def fun_l1_n224()
+ fun_l2_n593
+end
+
+def fun_l1_n225()
+ fun_l2_n653
+end
+
+def fun_l1_n226()
+ fun_l2_n21
+end
+
+def fun_l1_n227()
+ fun_l2_n135
+end
+
+def fun_l1_n228()
+ fun_l2_n892
+end
+
+def fun_l1_n229()
+ fun_l2_n976
+end
+
+def fun_l1_n230()
+ fun_l2_n20
+end
+
+def fun_l1_n231()
+ fun_l2_n469
+end
+
+def fun_l1_n232()
+ fun_l2_n741
+end
+
+def fun_l1_n233()
+ fun_l2_n259
+end
+
+def fun_l1_n234()
+ fun_l2_n638
+end
+
+def fun_l1_n235()
+ fun_l2_n335
+end
+
+def fun_l1_n236()
+ fun_l2_n775
+end
+
+def fun_l1_n237()
+ fun_l2_n228
+end
+
+def fun_l1_n238()
+ fun_l2_n287
+end
+
+def fun_l1_n239()
+ fun_l2_n690
+end
+
+def fun_l1_n240()
+ fun_l2_n241
+end
+
+def fun_l1_n241()
+ fun_l2_n728
+end
+
+def fun_l1_n242()
+ fun_l2_n507
+end
+
+def fun_l1_n243()
+ fun_l2_n631
+end
+
+def fun_l1_n244()
+ fun_l2_n338
+end
+
+def fun_l1_n245()
+ fun_l2_n41
+end
+
+def fun_l1_n246()
+ fun_l2_n744
+end
+
+def fun_l1_n247()
+ fun_l2_n52
+end
+
+def fun_l1_n248()
+ fun_l2_n406
+end
+
+def fun_l1_n249()
+ fun_l2_n619
+end
+
+def fun_l1_n250()
+ fun_l2_n710
+end
+
+def fun_l1_n251()
+ fun_l2_n54
+end
+
+def fun_l1_n252()
+ fun_l2_n162
+end
+
+def fun_l1_n253()
+ fun_l2_n952
+end
+
+def fun_l1_n254()
+ fun_l2_n909
+end
+
+def fun_l1_n255()
+ fun_l2_n270
+end
+
+def fun_l1_n256()
+ fun_l2_n752
+end
+
+def fun_l1_n257()
+ fun_l2_n377
+end
+
+def fun_l1_n258()
+ fun_l2_n606
+end
+
+def fun_l1_n259()
+ fun_l2_n368
+end
+
+def fun_l1_n260()
+ fun_l2_n165
+end
+
+def fun_l1_n261()
+ fun_l2_n353
+end
+
+def fun_l1_n262()
+ fun_l2_n199
+end
+
+def fun_l1_n263()
+ fun_l2_n17
+end
+
+def fun_l1_n264()
+ fun_l2_n613
+end
+
+def fun_l1_n265()
+ fun_l2_n329
+end
+
+def fun_l1_n266()
+ fun_l2_n827
+end
+
+def fun_l1_n267()
+ fun_l2_n415
+end
+
+def fun_l1_n268()
+ fun_l2_n835
+end
+
+def fun_l1_n269()
+ fun_l2_n267
+end
+
+def fun_l1_n270()
+ fun_l2_n911
+end
+
+def fun_l1_n271()
+ fun_l2_n640
+end
+
+def fun_l1_n272()
+ fun_l2_n810
+end
+
+def fun_l1_n273()
+ fun_l2_n469
+end
+
+def fun_l1_n274()
+ fun_l2_n121
+end
+
+def fun_l1_n275()
+ fun_l2_n661
+end
+
+def fun_l1_n276()
+ fun_l2_n882
+end
+
+def fun_l1_n277()
+ fun_l2_n469
+end
+
+def fun_l1_n278()
+ fun_l2_n356
+end
+
+def fun_l1_n279()
+ fun_l2_n328
+end
+
+def fun_l1_n280()
+ fun_l2_n155
+end
+
+def fun_l1_n281()
+ fun_l2_n386
+end
+
+def fun_l1_n282()
+ fun_l2_n974
+end
+
+def fun_l1_n283()
+ fun_l2_n126
+end
+
+def fun_l1_n284()
+ fun_l2_n294
+end
+
+def fun_l1_n285()
+ fun_l2_n338
+end
+
+def fun_l1_n286()
+ fun_l2_n366
+end
+
+def fun_l1_n287()
+ fun_l2_n159
+end
+
+def fun_l1_n288()
+ fun_l2_n729
+end
+
+def fun_l1_n289()
+ fun_l2_n422
+end
+
+def fun_l1_n290()
+ fun_l2_n865
+end
+
+def fun_l1_n291()
+ fun_l2_n930
+end
+
+def fun_l1_n292()
+ fun_l2_n469
+end
+
+def fun_l1_n293()
+ fun_l2_n567
+end
+
+def fun_l1_n294()
+ fun_l2_n521
+end
+
+def fun_l1_n295()
+ fun_l2_n208
+end
+
+def fun_l1_n296()
+ fun_l2_n778
+end
+
+def fun_l1_n297()
+ fun_l2_n898
+end
+
+def fun_l1_n298()
+ fun_l2_n523
+end
+
+def fun_l1_n299()
+ fun_l2_n475
+end
+
+def fun_l1_n300()
+ fun_l2_n0
+end
+
+def fun_l1_n301()
+ fun_l2_n818
+end
+
+def fun_l1_n302()
+ fun_l2_n278
+end
+
+def fun_l1_n303()
+ fun_l2_n420
+end
+
+def fun_l1_n304()
+ fun_l2_n988
+end
+
+def fun_l1_n305()
+ fun_l2_n311
+end
+
+def fun_l1_n306()
+ fun_l2_n258
+end
+
+def fun_l1_n307()
+ fun_l2_n41
+end
+
+def fun_l1_n308()
+ fun_l2_n654
+end
+
+def fun_l1_n309()
+ fun_l2_n1
+end
+
+def fun_l1_n310()
+ fun_l2_n161
+end
+
+def fun_l1_n311()
+ fun_l2_n438
+end
+
+def fun_l1_n312()
+ fun_l2_n615
+end
+
+def fun_l1_n313()
+ fun_l2_n461
+end
+
+def fun_l1_n314()
+ fun_l2_n617
+end
+
+def fun_l1_n315()
+ fun_l2_n589
+end
+
+def fun_l1_n316()
+ fun_l2_n793
+end
+
+def fun_l1_n317()
+ fun_l2_n955
+end
+
+def fun_l1_n318()
+ fun_l2_n570
+end
+
+def fun_l1_n319()
+ fun_l2_n15
+end
+
+def fun_l1_n320()
+ fun_l2_n422
+end
+
+def fun_l1_n321()
+ fun_l2_n736
+end
+
+def fun_l1_n322()
+ fun_l2_n726
+end
+
+def fun_l1_n323()
+ fun_l2_n704
+end
+
+def fun_l1_n324()
+ fun_l2_n141
+end
+
+def fun_l1_n325()
+ fun_l2_n262
+end
+
+def fun_l1_n326()
+ fun_l2_n426
+end
+
+def fun_l1_n327()
+ fun_l2_n525
+end
+
+def fun_l1_n328()
+ fun_l2_n806
+end
+
+def fun_l1_n329()
+ fun_l2_n450
+end
+
+def fun_l1_n330()
+ fun_l2_n326
+end
+
+def fun_l1_n331()
+ fun_l2_n760
+end
+
+def fun_l1_n332()
+ fun_l2_n51
+end
+
+def fun_l1_n333()
+ fun_l2_n456
+end
+
+def fun_l1_n334()
+ fun_l2_n94
+end
+
+def fun_l1_n335()
+ fun_l2_n503
+end
+
+def fun_l1_n336()
+ fun_l2_n499
+end
+
+def fun_l1_n337()
+ fun_l2_n645
+end
+
+def fun_l1_n338()
+ fun_l2_n279
+end
+
+def fun_l1_n339()
+ fun_l2_n665
+end
+
+def fun_l1_n340()
+ fun_l2_n153
+end
+
+def fun_l1_n341()
+ fun_l2_n184
+end
+
+def fun_l1_n342()
+ fun_l2_n630
+end
+
+def fun_l1_n343()
+ fun_l2_n59
+end
+
+def fun_l1_n344()
+ fun_l2_n745
+end
+
+def fun_l1_n345()
+ fun_l2_n310
+end
+
+def fun_l1_n346()
+ fun_l2_n380
+end
+
+def fun_l1_n347()
+ fun_l2_n11
+end
+
+def fun_l1_n348()
+ fun_l2_n424
+end
+
+def fun_l1_n349()
+ fun_l2_n484
+end
+
+def fun_l1_n350()
+ fun_l2_n255
+end
+
+def fun_l1_n351()
+ fun_l2_n350
+end
+
+def fun_l1_n352()
+ fun_l2_n672
+end
+
+def fun_l1_n353()
+ fun_l2_n835
+end
+
+def fun_l1_n354()
+ fun_l2_n380
+end
+
+def fun_l1_n355()
+ fun_l2_n897
+end
+
+def fun_l1_n356()
+ fun_l2_n963
+end
+
+def fun_l1_n357()
+ fun_l2_n16
+end
+
+def fun_l1_n358()
+ fun_l2_n584
+end
+
+def fun_l1_n359()
+ fun_l2_n684
+end
+
+def fun_l1_n360()
+ fun_l2_n582
+end
+
+def fun_l1_n361()
+ fun_l2_n982
+end
+
+def fun_l1_n362()
+ fun_l2_n224
+end
+
+def fun_l1_n363()
+ fun_l2_n143
+end
+
+def fun_l1_n364()
+ fun_l2_n809
+end
+
+def fun_l1_n365()
+ fun_l2_n94
+end
+
+def fun_l1_n366()
+ fun_l2_n643
+end
+
+def fun_l1_n367()
+ fun_l2_n511
+end
+
+def fun_l1_n368()
+ fun_l2_n858
+end
+
+def fun_l1_n369()
+ fun_l2_n649
+end
+
+def fun_l1_n370()
+ fun_l2_n98
+end
+
+def fun_l1_n371()
+ fun_l2_n537
+end
+
+def fun_l1_n372()
+ fun_l2_n418
+end
+
+def fun_l1_n373()
+ fun_l2_n456
+end
+
+def fun_l1_n374()
+ fun_l2_n694
+end
+
+def fun_l1_n375()
+ fun_l2_n37
+end
+
+def fun_l1_n376()
+ fun_l2_n152
+end
+
+def fun_l1_n377()
+ fun_l2_n916
+end
+
+def fun_l1_n378()
+ fun_l2_n926
+end
+
+def fun_l1_n379()
+ fun_l2_n978
+end
+
+def fun_l1_n380()
+ fun_l2_n706
+end
+
+def fun_l1_n381()
+ fun_l2_n666
+end
+
+def fun_l1_n382()
+ fun_l2_n407
+end
+
+def fun_l1_n383()
+ fun_l2_n839
+end
+
+def fun_l1_n384()
+ fun_l2_n936
+end
+
+def fun_l1_n385()
+ fun_l2_n122
+end
+
+def fun_l1_n386()
+ fun_l2_n189
+end
+
+def fun_l1_n387()
+ fun_l2_n799
+end
+
+def fun_l1_n388()
+ fun_l2_n494
+end
+
+def fun_l1_n389()
+ fun_l2_n534
+end
+
+def fun_l1_n390()
+ fun_l2_n986
+end
+
+def fun_l1_n391()
+ fun_l2_n870
+end
+
+def fun_l1_n392()
+ fun_l2_n341
+end
+
+def fun_l1_n393()
+ fun_l2_n251
+end
+
+def fun_l1_n394()
+ fun_l2_n95
+end
+
+def fun_l1_n395()
+ fun_l2_n127
+end
+
+def fun_l1_n396()
+ fun_l2_n496
+end
+
+def fun_l1_n397()
+ fun_l2_n81
+end
+
+def fun_l1_n398()
+ fun_l2_n628
+end
+
+def fun_l1_n399()
+ fun_l2_n212
+end
+
+def fun_l1_n400()
+ fun_l2_n968
+end
+
+def fun_l1_n401()
+ fun_l2_n3
+end
+
+def fun_l1_n402()
+ fun_l2_n266
+end
+
+def fun_l1_n403()
+ fun_l2_n227
+end
+
+def fun_l1_n404()
+ fun_l2_n311
+end
+
+def fun_l1_n405()
+ fun_l2_n977
+end
+
+def fun_l1_n406()
+ fun_l2_n298
+end
+
+def fun_l1_n407()
+ fun_l2_n619
+end
+
+def fun_l1_n408()
+ fun_l2_n11
+end
+
+def fun_l1_n409()
+ fun_l2_n40
+end
+
+def fun_l1_n410()
+ fun_l2_n238
+end
+
+def fun_l1_n411()
+ fun_l2_n378
+end
+
+def fun_l1_n412()
+ fun_l2_n166
+end
+
+def fun_l1_n413()
+ fun_l2_n392
+end
+
+def fun_l1_n414()
+ fun_l2_n374
+end
+
+def fun_l1_n415()
+ fun_l2_n195
+end
+
+def fun_l1_n416()
+ fun_l2_n627
+end
+
+def fun_l1_n417()
+ fun_l2_n795
+end
+
+def fun_l1_n418()
+ fun_l2_n79
+end
+
+def fun_l1_n419()
+ fun_l2_n425
+end
+
+def fun_l1_n420()
+ fun_l2_n733
+end
+
+def fun_l1_n421()
+ fun_l2_n974
+end
+
+def fun_l1_n422()
+ fun_l2_n697
+end
+
+def fun_l1_n423()
+ fun_l2_n997
+end
+
+def fun_l1_n424()
+ fun_l2_n860
+end
+
+def fun_l1_n425()
+ fun_l2_n446
+end
+
+def fun_l1_n426()
+ fun_l2_n250
+end
+
+def fun_l1_n427()
+ fun_l2_n556
+end
+
+def fun_l1_n428()
+ fun_l2_n945
+end
+
+def fun_l1_n429()
+ fun_l2_n307
+end
+
+def fun_l1_n430()
+ fun_l2_n541
+end
+
+def fun_l1_n431()
+ fun_l2_n171
+end
+
+def fun_l1_n432()
+ fun_l2_n859
+end
+
+def fun_l1_n433()
+ fun_l2_n351
+end
+
+def fun_l1_n434()
+ fun_l2_n218
+end
+
+def fun_l1_n435()
+ fun_l2_n456
+end
+
+def fun_l1_n436()
+ fun_l2_n418
+end
+
+def fun_l1_n437()
+ fun_l2_n611
+end
+
+def fun_l1_n438()
+ fun_l2_n797
+end
+
+def fun_l1_n439()
+ fun_l2_n738
+end
+
+def fun_l1_n440()
+ fun_l2_n796
+end
+
+def fun_l1_n441()
+ fun_l2_n978
+end
+
+def fun_l1_n442()
+ fun_l2_n400
+end
+
+def fun_l1_n443()
+ fun_l2_n295
+end
+
+def fun_l1_n444()
+ fun_l2_n749
+end
+
+def fun_l1_n445()
+ fun_l2_n401
+end
+
+def fun_l1_n446()
+ fun_l2_n96
+end
+
+def fun_l1_n447()
+ fun_l2_n134
+end
+
+def fun_l1_n448()
+ fun_l2_n149
+end
+
+def fun_l1_n449()
+ fun_l2_n306
+end
+
+def fun_l1_n450()
+ fun_l2_n125
+end
+
+def fun_l1_n451()
+ fun_l2_n34
+end
+
+def fun_l1_n452()
+ fun_l2_n891
+end
+
+def fun_l1_n453()
+ fun_l2_n260
+end
+
+def fun_l1_n454()
+ fun_l2_n104
+end
+
+def fun_l1_n455()
+ fun_l2_n766
+end
+
+def fun_l1_n456()
+ fun_l2_n246
+end
+
+def fun_l1_n457()
+ fun_l2_n292
+end
+
+def fun_l1_n458()
+ fun_l2_n730
+end
+
+def fun_l1_n459()
+ fun_l2_n536
+end
+
+def fun_l1_n460()
+ fun_l2_n139
+end
+
+def fun_l1_n461()
+ fun_l2_n433
+end
+
+def fun_l1_n462()
+ fun_l2_n983
+end
+
+def fun_l1_n463()
+ fun_l2_n730
+end
+
+def fun_l1_n464()
+ fun_l2_n543
+end
+
+def fun_l1_n465()
+ fun_l2_n499
+end
+
+def fun_l1_n466()
+ fun_l2_n180
+end
+
+def fun_l1_n467()
+ fun_l2_n242
+end
+
+def fun_l1_n468()
+ fun_l2_n351
+end
+
+def fun_l1_n469()
+ fun_l2_n229
+end
+
+def fun_l1_n470()
+ fun_l2_n999
+end
+
+def fun_l1_n471()
+ fun_l2_n261
+end
+
+def fun_l1_n472()
+ fun_l2_n738
+end
+
+def fun_l1_n473()
+ fun_l2_n406
+end
+
+def fun_l1_n474()
+ fun_l2_n672
+end
+
+def fun_l1_n475()
+ fun_l2_n86
+end
+
+def fun_l1_n476()
+ fun_l2_n616
+end
+
+def fun_l1_n477()
+ fun_l2_n555
+end
+
+def fun_l1_n478()
+ fun_l2_n686
+end
+
+def fun_l1_n479()
+ fun_l2_n964
+end
+
+def fun_l1_n480()
+ fun_l2_n171
+end
+
+def fun_l1_n481()
+ fun_l2_n525
+end
+
+def fun_l1_n482()
+ fun_l2_n106
+end
+
+def fun_l1_n483()
+ fun_l2_n992
+end
+
+def fun_l1_n484()
+ fun_l2_n988
+end
+
+def fun_l1_n485()
+ fun_l2_n657
+end
+
+def fun_l1_n486()
+ fun_l2_n464
+end
+
+def fun_l1_n487()
+ fun_l2_n55
+end
+
+def fun_l1_n488()
+ fun_l2_n416
+end
+
+def fun_l1_n489()
+ fun_l2_n582
+end
+
+def fun_l1_n490()
+ fun_l2_n873
+end
+
+def fun_l1_n491()
+ fun_l2_n629
+end
+
+def fun_l1_n492()
+ fun_l2_n156
+end
+
+def fun_l1_n493()
+ fun_l2_n68
+end
+
+def fun_l1_n494()
+ fun_l2_n239
+end
+
+def fun_l1_n495()
+ fun_l2_n319
+end
+
+def fun_l1_n496()
+ fun_l2_n539
+end
+
+def fun_l1_n497()
+ fun_l2_n237
+end
+
+def fun_l1_n498()
+ fun_l2_n241
+end
+
+def fun_l1_n499()
+ fun_l2_n34
+end
+
+def fun_l1_n500()
+ fun_l2_n588
+end
+
+def fun_l1_n501()
+ fun_l2_n540
+end
+
+def fun_l1_n502()
+ fun_l2_n591
+end
+
+def fun_l1_n503()
+ fun_l2_n199
+end
+
+def fun_l1_n504()
+ fun_l2_n265
+end
+
+def fun_l1_n505()
+ fun_l2_n170
+end
+
+def fun_l1_n506()
+ fun_l2_n29
+end
+
+def fun_l1_n507()
+ fun_l2_n741
+end
+
+def fun_l1_n508()
+ fun_l2_n877
+end
+
+def fun_l1_n509()
+ fun_l2_n710
+end
+
+def fun_l1_n510()
+ fun_l2_n197
+end
+
+def fun_l1_n511()
+ fun_l2_n319
+end
+
+def fun_l1_n512()
+ fun_l2_n60
+end
+
+def fun_l1_n513()
+ fun_l2_n753
+end
+
+def fun_l1_n514()
+ fun_l2_n492
+end
+
+def fun_l1_n515()
+ fun_l2_n961
+end
+
+def fun_l1_n516()
+ fun_l2_n227
+end
+
+def fun_l1_n517()
+ fun_l2_n361
+end
+
+def fun_l1_n518()
+ fun_l2_n265
+end
+
+def fun_l1_n519()
+ fun_l2_n392
+end
+
+def fun_l1_n520()
+ fun_l2_n425
+end
+
+def fun_l1_n521()
+ fun_l2_n869
+end
+
+def fun_l1_n522()
+ fun_l2_n859
+end
+
+def fun_l1_n523()
+ fun_l2_n140
+end
+
+def fun_l1_n524()
+ fun_l2_n451
+end
+
+def fun_l1_n525()
+ fun_l2_n274
+end
+
+def fun_l1_n526()
+ fun_l2_n358
+end
+
+def fun_l1_n527()
+ fun_l2_n475
+end
+
+def fun_l1_n528()
+ fun_l2_n948
+end
+
+def fun_l1_n529()
+ fun_l2_n866
+end
+
+def fun_l1_n530()
+ fun_l2_n70
+end
+
+def fun_l1_n531()
+ fun_l2_n756
+end
+
+def fun_l1_n532()
+ fun_l2_n704
+end
+
+def fun_l1_n533()
+ fun_l2_n59
+end
+
+def fun_l1_n534()
+ fun_l2_n174
+end
+
+def fun_l1_n535()
+ fun_l2_n476
+end
+
+def fun_l1_n536()
+ fun_l2_n269
+end
+
+def fun_l1_n537()
+ fun_l2_n897
+end
+
+def fun_l1_n538()
+ fun_l2_n550
+end
+
+def fun_l1_n539()
+ fun_l2_n404
+end
+
+def fun_l1_n540()
+ fun_l2_n167
+end
+
+def fun_l1_n541()
+ fun_l2_n332
+end
+
+def fun_l1_n542()
+ fun_l2_n853
+end
+
+def fun_l1_n543()
+ fun_l2_n621
+end
+
+def fun_l1_n544()
+ fun_l2_n36
+end
+
+def fun_l1_n545()
+ fun_l2_n978
+end
+
+def fun_l1_n546()
+ fun_l2_n295
+end
+
+def fun_l1_n547()
+ fun_l2_n537
+end
+
+def fun_l1_n548()
+ fun_l2_n315
+end
+
+def fun_l1_n549()
+ fun_l2_n944
+end
+
+def fun_l1_n550()
+ fun_l2_n933
+end
+
+def fun_l1_n551()
+ fun_l2_n209
+end
+
+def fun_l1_n552()
+ fun_l2_n524
+end
+
+def fun_l1_n553()
+ fun_l2_n115
+end
+
+def fun_l1_n554()
+ fun_l2_n475
+end
+
+def fun_l1_n555()
+ fun_l2_n417
+end
+
+def fun_l1_n556()
+ fun_l2_n507
+end
+
+def fun_l1_n557()
+ fun_l2_n812
+end
+
+def fun_l1_n558()
+ fun_l2_n261
+end
+
+def fun_l1_n559()
+ fun_l2_n268
+end
+
+def fun_l1_n560()
+ fun_l2_n34
+end
+
+def fun_l1_n561()
+ fun_l2_n774
+end
+
+def fun_l1_n562()
+ fun_l2_n102
+end
+
+def fun_l1_n563()
+ fun_l2_n791
+end
+
+def fun_l1_n564()
+ fun_l2_n760
+end
+
+def fun_l1_n565()
+ fun_l2_n376
+end
+
+def fun_l1_n566()
+ fun_l2_n897
+end
+
+def fun_l1_n567()
+ fun_l2_n456
+end
+
+def fun_l1_n568()
+ fun_l2_n120
+end
+
+def fun_l1_n569()
+ fun_l2_n892
+end
+
+def fun_l1_n570()
+ fun_l2_n948
+end
+
+def fun_l1_n571()
+ fun_l2_n586
+end
+
+def fun_l1_n572()
+ fun_l2_n428
+end
+
+def fun_l1_n573()
+ fun_l2_n182
+end
+
+def fun_l1_n574()
+ fun_l2_n980
+end
+
+def fun_l1_n575()
+ fun_l2_n192
+end
+
+def fun_l1_n576()
+ fun_l2_n440
+end
+
+def fun_l1_n577()
+ fun_l2_n381
+end
+
+def fun_l1_n578()
+ fun_l2_n508
+end
+
+def fun_l1_n579()
+ fun_l2_n560
+end
+
+def fun_l1_n580()
+ fun_l2_n673
+end
+
+def fun_l1_n581()
+ fun_l2_n236
+end
+
+def fun_l1_n582()
+ fun_l2_n936
+end
+
+def fun_l1_n583()
+ fun_l2_n104
+end
+
+def fun_l1_n584()
+ fun_l2_n439
+end
+
+def fun_l1_n585()
+ fun_l2_n844
+end
+
+def fun_l1_n586()
+ fun_l2_n115
+end
+
+def fun_l1_n587()
+ fun_l2_n114
+end
+
+def fun_l1_n588()
+ fun_l2_n963
+end
+
+def fun_l1_n589()
+ fun_l2_n972
+end
+
+def fun_l1_n590()
+ fun_l2_n333
+end
+
+def fun_l1_n591()
+ fun_l2_n624
+end
+
+def fun_l1_n592()
+ fun_l2_n478
+end
+
+def fun_l1_n593()
+ fun_l2_n581
+end
+
+def fun_l1_n594()
+ fun_l2_n199
+end
+
+def fun_l1_n595()
+ fun_l2_n596
+end
+
+def fun_l1_n596()
+ fun_l2_n458
+end
+
+def fun_l1_n597()
+ fun_l2_n729
+end
+
+def fun_l1_n598()
+ fun_l2_n545
+end
+
+def fun_l1_n599()
+ fun_l2_n60
+end
+
+def fun_l1_n600()
+ fun_l2_n801
+end
+
+def fun_l1_n601()
+ fun_l2_n164
+end
+
+def fun_l1_n602()
+ fun_l2_n3
+end
+
+def fun_l1_n603()
+ fun_l2_n334
+end
+
+def fun_l1_n604()
+ fun_l2_n887
+end
+
+def fun_l1_n605()
+ fun_l2_n777
+end
+
+def fun_l1_n606()
+ fun_l2_n765
+end
+
+def fun_l1_n607()
+ fun_l2_n529
+end
+
+def fun_l1_n608()
+ fun_l2_n233
+end
+
+def fun_l1_n609()
+ fun_l2_n164
+end
+
+def fun_l1_n610()
+ fun_l2_n289
+end
+
+def fun_l1_n611()
+ fun_l2_n918
+end
+
+def fun_l1_n612()
+ fun_l2_n13
+end
+
+def fun_l1_n613()
+ fun_l2_n530
+end
+
+def fun_l1_n614()
+ fun_l2_n574
+end
+
+def fun_l1_n615()
+ fun_l2_n383
+end
+
+def fun_l1_n616()
+ fun_l2_n470
+end
+
+def fun_l1_n617()
+ fun_l2_n551
+end
+
+def fun_l1_n618()
+ fun_l2_n539
+end
+
+def fun_l1_n619()
+ fun_l2_n858
+end
+
+def fun_l1_n620()
+ fun_l2_n523
+end
+
+def fun_l1_n621()
+ fun_l2_n439
+end
+
+def fun_l1_n622()
+ fun_l2_n909
+end
+
+def fun_l1_n623()
+ fun_l2_n686
+end
+
+def fun_l1_n624()
+ fun_l2_n133
+end
+
+def fun_l1_n625()
+ fun_l2_n92
+end
+
+def fun_l1_n626()
+ fun_l2_n443
+end
+
+def fun_l1_n627()
+ fun_l2_n682
+end
+
+def fun_l1_n628()
+ fun_l2_n113
+end
+
+def fun_l1_n629()
+ fun_l2_n353
+end
+
+def fun_l1_n630()
+ fun_l2_n631
+end
+
+def fun_l1_n631()
+ fun_l2_n858
+end
+
+def fun_l1_n632()
+ fun_l2_n816
+end
+
+def fun_l1_n633()
+ fun_l2_n683
+end
+
+def fun_l1_n634()
+ fun_l2_n32
+end
+
+def fun_l1_n635()
+ fun_l2_n983
+end
+
+def fun_l1_n636()
+ fun_l2_n587
+end
+
+def fun_l1_n637()
+ fun_l2_n17
+end
+
+def fun_l1_n638()
+ fun_l2_n129
+end
+
+def fun_l1_n639()
+ fun_l2_n166
+end
+
+def fun_l1_n640()
+ fun_l2_n742
+end
+
+def fun_l1_n641()
+ fun_l2_n8
+end
+
+def fun_l1_n642()
+ fun_l2_n119
+end
+
+def fun_l1_n643()
+ fun_l2_n615
+end
+
+def fun_l1_n644()
+ fun_l2_n419
+end
+
+def fun_l1_n645()
+ fun_l2_n324
+end
+
+def fun_l1_n646()
+ fun_l2_n806
+end
+
+def fun_l1_n647()
+ fun_l2_n722
+end
+
+def fun_l1_n648()
+ fun_l2_n462
+end
+
+def fun_l1_n649()
+ fun_l2_n602
+end
+
+def fun_l1_n650()
+ fun_l2_n39
+end
+
+def fun_l1_n651()
+ fun_l2_n53
+end
+
+def fun_l1_n652()
+ fun_l2_n201
+end
+
+def fun_l1_n653()
+ fun_l2_n403
+end
+
+def fun_l1_n654()
+ fun_l2_n595
+end
+
+def fun_l1_n655()
+ fun_l2_n467
+end
+
+def fun_l1_n656()
+ fun_l2_n904
+end
+
+def fun_l1_n657()
+ fun_l2_n429
+end
+
+def fun_l1_n658()
+ fun_l2_n463
+end
+
+def fun_l1_n659()
+ fun_l2_n470
+end
+
+def fun_l1_n660()
+ fun_l2_n0
+end
+
+def fun_l1_n661()
+ fun_l2_n258
+end
+
+def fun_l1_n662()
+ fun_l2_n950
+end
+
+def fun_l1_n663()
+ fun_l2_n953
+end
+
+def fun_l1_n664()
+ fun_l2_n664
+end
+
+def fun_l1_n665()
+ fun_l2_n12
+end
+
+def fun_l1_n666()
+ fun_l2_n317
+end
+
+def fun_l1_n667()
+ fun_l2_n526
+end
+
+def fun_l1_n668()
+ fun_l2_n984
+end
+
+def fun_l1_n669()
+ fun_l2_n273
+end
+
+def fun_l1_n670()
+ fun_l2_n822
+end
+
+def fun_l1_n671()
+ fun_l2_n759
+end
+
+def fun_l1_n672()
+ fun_l2_n927
+end
+
+def fun_l1_n673()
+ fun_l2_n419
+end
+
+def fun_l1_n674()
+ fun_l2_n546
+end
+
+def fun_l1_n675()
+ fun_l2_n879
+end
+
+def fun_l1_n676()
+ fun_l2_n659
+end
+
+def fun_l1_n677()
+ fun_l2_n317
+end
+
+def fun_l1_n678()
+ fun_l2_n234
+end
+
+def fun_l1_n679()
+ fun_l2_n416
+end
+
+def fun_l1_n680()
+ fun_l2_n890
+end
+
+def fun_l1_n681()
+ fun_l2_n401
+end
+
+def fun_l1_n682()
+ fun_l2_n271
+end
+
+def fun_l1_n683()
+ fun_l2_n915
+end
+
+def fun_l1_n684()
+ fun_l2_n666
+end
+
+def fun_l1_n685()
+ fun_l2_n151
+end
+
+def fun_l1_n686()
+ fun_l2_n786
+end
+
+def fun_l1_n687()
+ fun_l2_n82
+end
+
+def fun_l1_n688()
+ fun_l2_n831
+end
+
+def fun_l1_n689()
+ fun_l2_n830
+end
+
+def fun_l1_n690()
+ fun_l2_n221
+end
+
+def fun_l1_n691()
+ fun_l2_n530
+end
+
+def fun_l1_n692()
+ fun_l2_n131
+end
+
+def fun_l1_n693()
+ fun_l2_n17
+end
+
+def fun_l1_n694()
+ fun_l2_n265
+end
+
+def fun_l1_n695()
+ fun_l2_n111
+end
+
+def fun_l1_n696()
+ fun_l2_n39
+end
+
+def fun_l1_n697()
+ fun_l2_n326
+end
+
+def fun_l1_n698()
+ fun_l2_n713
+end
+
+def fun_l1_n699()
+ fun_l2_n960
+end
+
+def fun_l1_n700()
+ fun_l2_n633
+end
+
+def fun_l1_n701()
+ fun_l2_n291
+end
+
+def fun_l1_n702()
+ fun_l2_n746
+end
+
+def fun_l1_n703()
+ fun_l2_n316
+end
+
+def fun_l1_n704()
+ fun_l2_n116
+end
+
+def fun_l1_n705()
+ fun_l2_n195
+end
+
+def fun_l1_n706()
+ fun_l2_n614
+end
+
+def fun_l1_n707()
+ fun_l2_n591
+end
+
+def fun_l1_n708()
+ fun_l2_n879
+end
+
+def fun_l1_n709()
+ fun_l2_n770
+end
+
+def fun_l1_n710()
+ fun_l2_n332
+end
+
+def fun_l1_n711()
+ fun_l2_n696
+end
+
+def fun_l1_n712()
+ fun_l2_n42
+end
+
+def fun_l1_n713()
+ fun_l2_n126
+end
+
+def fun_l1_n714()
+ fun_l2_n486
+end
+
+def fun_l1_n715()
+ fun_l2_n259
+end
+
+def fun_l1_n716()
+ fun_l2_n390
+end
+
+def fun_l1_n717()
+ fun_l2_n590
+end
+
+def fun_l1_n718()
+ fun_l2_n180
+end
+
+def fun_l1_n719()
+ fun_l2_n673
+end
+
+def fun_l1_n720()
+ fun_l2_n565
+end
+
+def fun_l1_n721()
+ fun_l2_n504
+end
+
+def fun_l1_n722()
+ fun_l2_n585
+end
+
+def fun_l1_n723()
+ fun_l2_n746
+end
+
+def fun_l1_n724()
+ fun_l2_n797
+end
+
+def fun_l1_n725()
+ fun_l2_n281
+end
+
+def fun_l1_n726()
+ fun_l2_n670
+end
+
+def fun_l1_n727()
+ fun_l2_n678
+end
+
+def fun_l1_n728()
+ fun_l2_n329
+end
+
+def fun_l1_n729()
+ fun_l2_n581
+end
+
+def fun_l1_n730()
+ fun_l2_n313
+end
+
+def fun_l1_n731()
+ fun_l2_n893
+end
+
+def fun_l1_n732()
+ fun_l2_n773
+end
+
+def fun_l1_n733()
+ fun_l2_n527
+end
+
+def fun_l1_n734()
+ fun_l2_n473
+end
+
+def fun_l1_n735()
+ fun_l2_n242
+end
+
+def fun_l1_n736()
+ fun_l2_n681
+end
+
+def fun_l1_n737()
+ fun_l2_n593
+end
+
+def fun_l1_n738()
+ fun_l2_n214
+end
+
+def fun_l1_n739()
+ fun_l2_n931
+end
+
+def fun_l1_n740()
+ fun_l2_n157
+end
+
+def fun_l1_n741()
+ fun_l2_n207
+end
+
+def fun_l1_n742()
+ fun_l2_n583
+end
+
+def fun_l1_n743()
+ fun_l2_n978
+end
+
+def fun_l1_n744()
+ fun_l2_n220
+end
+
+def fun_l1_n745()
+ fun_l2_n0
+end
+
+def fun_l1_n746()
+ fun_l2_n871
+end
+
+def fun_l1_n747()
+ fun_l2_n344
+end
+
+def fun_l1_n748()
+ fun_l2_n445
+end
+
+def fun_l1_n749()
+ fun_l2_n682
+end
+
+def fun_l1_n750()
+ fun_l2_n553
+end
+
+def fun_l1_n751()
+ fun_l2_n616
+end
+
+def fun_l1_n752()
+ fun_l2_n93
+end
+
+def fun_l1_n753()
+ fun_l2_n297
+end
+
+def fun_l1_n754()
+ fun_l2_n653
+end
+
+def fun_l1_n755()
+ fun_l2_n730
+end
+
+def fun_l1_n756()
+ fun_l2_n375
+end
+
+def fun_l1_n757()
+ fun_l2_n522
+end
+
+def fun_l1_n758()
+ fun_l2_n855
+end
+
+def fun_l1_n759()
+ fun_l2_n727
+end
+
+def fun_l1_n760()
+ fun_l2_n516
+end
+
+def fun_l1_n761()
+ fun_l2_n322
+end
+
+def fun_l1_n762()
+ fun_l2_n84
+end
+
+def fun_l1_n763()
+ fun_l2_n704
+end
+
+def fun_l1_n764()
+ fun_l2_n516
+end
+
+def fun_l1_n765()
+ fun_l2_n97
+end
+
+def fun_l1_n766()
+ fun_l2_n678
+end
+
+def fun_l1_n767()
+ fun_l2_n690
+end
+
+def fun_l1_n768()
+ fun_l2_n704
+end
+
+def fun_l1_n769()
+ fun_l2_n664
+end
+
+def fun_l1_n770()
+ fun_l2_n157
+end
+
+def fun_l1_n771()
+ fun_l2_n24
+end
+
+def fun_l1_n772()
+ fun_l2_n399
+end
+
+def fun_l1_n773()
+ fun_l2_n362
+end
+
+def fun_l1_n774()
+ fun_l2_n687
+end
+
+def fun_l1_n775()
+ fun_l2_n228
+end
+
+def fun_l1_n776()
+ fun_l2_n781
+end
+
+def fun_l1_n777()
+ fun_l2_n112
+end
+
+def fun_l1_n778()
+ fun_l2_n126
+end
+
+def fun_l1_n779()
+ fun_l2_n298
+end
+
+def fun_l1_n780()
+ fun_l2_n779
+end
+
+def fun_l1_n781()
+ fun_l2_n354
+end
+
+def fun_l1_n782()
+ fun_l2_n357
+end
+
+def fun_l1_n783()
+ fun_l2_n814
+end
+
+def fun_l1_n784()
+ fun_l2_n975
+end
+
+def fun_l1_n785()
+ fun_l2_n853
+end
+
+def fun_l1_n786()
+ fun_l2_n58
+end
+
+def fun_l1_n787()
+ fun_l2_n455
+end
+
+def fun_l1_n788()
+ fun_l2_n31
+end
+
+def fun_l1_n789()
+ fun_l2_n621
+end
+
+def fun_l1_n790()
+ fun_l2_n714
+end
+
+def fun_l1_n791()
+ fun_l2_n931
+end
+
+def fun_l1_n792()
+ fun_l2_n511
+end
+
+def fun_l1_n793()
+ fun_l2_n128
+end
+
+def fun_l1_n794()
+ fun_l2_n750
+end
+
+def fun_l1_n795()
+ fun_l2_n121
+end
+
+def fun_l1_n796()
+ fun_l2_n226
+end
+
+def fun_l1_n797()
+ fun_l2_n515
+end
+
+def fun_l1_n798()
+ fun_l2_n8
+end
+
+def fun_l1_n799()
+ fun_l2_n372
+end
+
+def fun_l1_n800()
+ fun_l2_n646
+end
+
+def fun_l1_n801()
+ fun_l2_n722
+end
+
+def fun_l1_n802()
+ fun_l2_n932
+end
+
+def fun_l1_n803()
+ fun_l2_n992
+end
+
+def fun_l1_n804()
+ fun_l2_n628
+end
+
+def fun_l1_n805()
+ fun_l2_n97
+end
+
+def fun_l1_n806()
+ fun_l2_n113
+end
+
+def fun_l1_n807()
+ fun_l2_n249
+end
+
+def fun_l1_n808()
+ fun_l2_n211
+end
+
+def fun_l1_n809()
+ fun_l2_n40
+end
+
+def fun_l1_n810()
+ fun_l2_n608
+end
+
+def fun_l1_n811()
+ fun_l2_n560
+end
+
+def fun_l1_n812()
+ fun_l2_n182
+end
+
+def fun_l1_n813()
+ fun_l2_n7
+end
+
+def fun_l1_n814()
+ fun_l2_n641
+end
+
+def fun_l1_n815()
+ fun_l2_n541
+end
+
+def fun_l1_n816()
+ fun_l2_n951
+end
+
+def fun_l1_n817()
+ fun_l2_n122
+end
+
+def fun_l1_n818()
+ fun_l2_n270
+end
+
+def fun_l1_n819()
+ fun_l2_n631
+end
+
+def fun_l1_n820()
+ fun_l2_n787
+end
+
+def fun_l1_n821()
+ fun_l2_n543
+end
+
+def fun_l1_n822()
+ fun_l2_n599
+end
+
+def fun_l1_n823()
+ fun_l2_n686
+end
+
+def fun_l1_n824()
+ fun_l2_n11
+end
+
+def fun_l1_n825()
+ fun_l2_n379
+end
+
+def fun_l1_n826()
+ fun_l2_n190
+end
+
+def fun_l1_n827()
+ fun_l2_n815
+end
+
+def fun_l1_n828()
+ fun_l2_n117
+end
+
+def fun_l1_n829()
+ fun_l2_n465
+end
+
+def fun_l1_n830()
+ fun_l2_n333
+end
+
+def fun_l1_n831()
+ fun_l2_n928
+end
+
+def fun_l1_n832()
+ fun_l2_n565
+end
+
+def fun_l1_n833()
+ fun_l2_n83
+end
+
+def fun_l1_n834()
+ fun_l2_n364
+end
+
+def fun_l1_n835()
+ fun_l2_n93
+end
+
+def fun_l1_n836()
+ fun_l2_n20
+end
+
+def fun_l1_n837()
+ fun_l2_n223
+end
+
+def fun_l1_n838()
+ fun_l2_n720
+end
+
+def fun_l1_n839()
+ fun_l2_n848
+end
+
+def fun_l1_n840()
+ fun_l2_n228
+end
+
+def fun_l1_n841()
+ fun_l2_n607
+end
+
+def fun_l1_n842()
+ fun_l2_n253
+end
+
+def fun_l1_n843()
+ fun_l2_n426
+end
+
+def fun_l1_n844()
+ fun_l2_n295
+end
+
+def fun_l1_n845()
+ fun_l2_n213
+end
+
+def fun_l1_n846()
+ fun_l2_n991
+end
+
+def fun_l1_n847()
+ fun_l2_n169
+end
+
+def fun_l1_n848()
+ fun_l2_n32
+end
+
+def fun_l1_n849()
+ fun_l2_n495
+end
+
+def fun_l1_n850()
+ fun_l2_n528
+end
+
+def fun_l1_n851()
+ fun_l2_n862
+end
+
+def fun_l1_n852()
+ fun_l2_n712
+end
+
+def fun_l1_n853()
+ fun_l2_n234
+end
+
+def fun_l1_n854()
+ fun_l2_n646
+end
+
+def fun_l1_n855()
+ fun_l2_n720
+end
+
+def fun_l1_n856()
+ fun_l2_n605
+end
+
+def fun_l1_n857()
+ fun_l2_n966
+end
+
+def fun_l1_n858()
+ fun_l2_n68
+end
+
+def fun_l1_n859()
+ fun_l2_n914
+end
+
+def fun_l1_n860()
+ fun_l2_n234
+end
+
+def fun_l1_n861()
+ fun_l2_n410
+end
+
+def fun_l1_n862()
+ fun_l2_n370
+end
+
+def fun_l1_n863()
+ fun_l2_n127
+end
+
+def fun_l1_n864()
+ fun_l2_n187
+end
+
+def fun_l1_n865()
+ fun_l2_n98
+end
+
+def fun_l1_n866()
+ fun_l2_n256
+end
+
+def fun_l1_n867()
+ fun_l2_n747
+end
+
+def fun_l1_n868()
+ fun_l2_n344
+end
+
+def fun_l1_n869()
+ fun_l2_n570
+end
+
+def fun_l1_n870()
+ fun_l2_n552
+end
+
+def fun_l1_n871()
+ fun_l2_n499
+end
+
+def fun_l1_n872()
+ fun_l2_n763
+end
+
+def fun_l1_n873()
+ fun_l2_n35
+end
+
+def fun_l1_n874()
+ fun_l2_n229
+end
+
+def fun_l1_n875()
+ fun_l2_n124
+end
+
+def fun_l1_n876()
+ fun_l2_n258
+end
+
+def fun_l1_n877()
+ fun_l2_n280
+end
+
+def fun_l1_n878()
+ fun_l2_n899
+end
+
+def fun_l1_n879()
+ fun_l2_n211
+end
+
+def fun_l1_n880()
+ fun_l2_n741
+end
+
+def fun_l1_n881()
+ fun_l2_n32
+end
+
+def fun_l1_n882()
+ fun_l2_n212
+end
+
+def fun_l1_n883()
+ fun_l2_n661
+end
+
+def fun_l1_n884()
+ fun_l2_n889
+end
+
+def fun_l1_n885()
+ fun_l2_n975
+end
+
+def fun_l1_n886()
+ fun_l2_n288
+end
+
+def fun_l1_n887()
+ fun_l2_n448
+end
+
+def fun_l1_n888()
+ fun_l2_n520
+end
+
+def fun_l1_n889()
+ fun_l2_n284
+end
+
+def fun_l1_n890()
+ fun_l2_n254
+end
+
+def fun_l1_n891()
+ fun_l2_n703
+end
+
+def fun_l1_n892()
+ fun_l2_n706
+end
+
+def fun_l1_n893()
+ fun_l2_n9
+end
+
+def fun_l1_n894()
+ fun_l2_n717
+end
+
+def fun_l1_n895()
+ fun_l2_n290
+end
+
+def fun_l1_n896()
+ fun_l2_n657
+end
+
+def fun_l1_n897()
+ fun_l2_n452
+end
+
+def fun_l1_n898()
+ fun_l2_n493
+end
+
+def fun_l1_n899()
+ fun_l2_n308
+end
+
+def fun_l1_n900()
+ fun_l2_n781
+end
+
+def fun_l1_n901()
+ fun_l2_n970
+end
+
+def fun_l1_n902()
+ fun_l2_n371
+end
+
+def fun_l1_n903()
+ fun_l2_n195
+end
+
+def fun_l1_n904()
+ fun_l2_n662
+end
+
+def fun_l1_n905()
+ fun_l2_n172
+end
+
+def fun_l1_n906()
+ fun_l2_n579
+end
+
+def fun_l1_n907()
+ fun_l2_n913
+end
+
+def fun_l1_n908()
+ fun_l2_n949
+end
+
+def fun_l1_n909()
+ fun_l2_n386
+end
+
+def fun_l1_n910()
+ fun_l2_n727
+end
+
+def fun_l1_n911()
+ fun_l2_n283
+end
+
+def fun_l1_n912()
+ fun_l2_n136
+end
+
+def fun_l1_n913()
+ fun_l2_n818
+end
+
+def fun_l1_n914()
+ fun_l2_n118
+end
+
+def fun_l1_n915()
+ fun_l2_n366
+end
+
+def fun_l1_n916()
+ fun_l2_n362
+end
+
+def fun_l1_n917()
+ fun_l2_n854
+end
+
+def fun_l1_n918()
+ fun_l2_n272
+end
+
+def fun_l1_n919()
+ fun_l2_n754
+end
+
+def fun_l1_n920()
+ fun_l2_n145
+end
+
+def fun_l1_n921()
+ fun_l2_n631
+end
+
+def fun_l1_n922()
+ fun_l2_n131
+end
+
+def fun_l1_n923()
+ fun_l2_n862
+end
+
+def fun_l1_n924()
+ fun_l2_n930
+end
+
+def fun_l1_n925()
+ fun_l2_n24
+end
+
+def fun_l1_n926()
+ fun_l2_n336
+end
+
+def fun_l1_n927()
+ fun_l2_n438
+end
+
+def fun_l1_n928()
+ fun_l2_n306
+end
+
+def fun_l1_n929()
+ fun_l2_n897
+end
+
+def fun_l1_n930()
+ fun_l2_n186
+end
+
+def fun_l1_n931()
+ fun_l2_n227
+end
+
+def fun_l1_n932()
+ fun_l2_n462
+end
+
+def fun_l1_n933()
+ fun_l2_n224
+end
+
+def fun_l1_n934()
+ fun_l2_n210
+end
+
+def fun_l1_n935()
+ fun_l2_n315
+end
+
+def fun_l1_n936()
+ fun_l2_n850
+end
+
+def fun_l1_n937()
+ fun_l2_n997
+end
+
+def fun_l1_n938()
+ fun_l2_n703
+end
+
+def fun_l1_n939()
+ fun_l2_n635
+end
+
+def fun_l1_n940()
+ fun_l2_n507
+end
+
+def fun_l1_n941()
+ fun_l2_n202
+end
+
+def fun_l1_n942()
+ fun_l2_n319
+end
+
+def fun_l1_n943()
+ fun_l2_n785
+end
+
+def fun_l1_n944()
+ fun_l2_n26
+end
+
+def fun_l1_n945()
+ fun_l2_n777
+end
+
+def fun_l1_n946()
+ fun_l2_n235
+end
+
+def fun_l1_n947()
+ fun_l2_n845
+end
+
+def fun_l1_n948()
+ fun_l2_n515
+end
+
+def fun_l1_n949()
+ fun_l2_n427
+end
+
+def fun_l1_n950()
+ fun_l2_n34
+end
+
+def fun_l1_n951()
+ fun_l2_n905
+end
+
+def fun_l1_n952()
+ fun_l2_n683
+end
+
+def fun_l1_n953()
+ fun_l2_n171
+end
+
+def fun_l1_n954()
+ fun_l2_n593
+end
+
+def fun_l1_n955()
+ fun_l2_n191
+end
+
+def fun_l1_n956()
+ fun_l2_n370
+end
+
+def fun_l1_n957()
+ fun_l2_n911
+end
+
+def fun_l1_n958()
+ fun_l2_n813
+end
+
+def fun_l1_n959()
+ fun_l2_n765
+end
+
+def fun_l1_n960()
+ fun_l2_n434
+end
+
+def fun_l1_n961()
+ fun_l2_n442
+end
+
+def fun_l1_n962()
+ fun_l2_n390
+end
+
+def fun_l1_n963()
+ fun_l2_n549
+end
+
+def fun_l1_n964()
+ fun_l2_n757
+end
+
+def fun_l1_n965()
+ fun_l2_n12
+end
+
+def fun_l1_n966()
+ fun_l2_n456
+end
+
+def fun_l1_n967()
+ fun_l2_n889
+end
+
+def fun_l1_n968()
+ fun_l2_n933
+end
+
+def fun_l1_n969()
+ fun_l2_n695
+end
+
+def fun_l1_n970()
+ fun_l2_n628
+end
+
+def fun_l1_n971()
+ fun_l2_n265
+end
+
+def fun_l1_n972()
+ fun_l2_n634
+end
+
+def fun_l1_n973()
+ fun_l2_n31
+end
+
+def fun_l1_n974()
+ fun_l2_n49
+end
+
+def fun_l1_n975()
+ fun_l2_n872
+end
+
+def fun_l1_n976()
+ fun_l2_n475
+end
+
+def fun_l1_n977()
+ fun_l2_n927
+end
+
+def fun_l1_n978()
+ fun_l2_n459
+end
+
+def fun_l1_n979()
+ fun_l2_n364
+end
+
+def fun_l1_n980()
+ fun_l2_n246
+end
+
+def fun_l1_n981()
+ fun_l2_n693
+end
+
+def fun_l1_n982()
+ fun_l2_n218
+end
+
+def fun_l1_n983()
+ fun_l2_n21
+end
+
+def fun_l1_n984()
+ fun_l2_n967
+end
+
+def fun_l1_n985()
+ fun_l2_n81
+end
+
+def fun_l1_n986()
+ fun_l2_n753
+end
+
+def fun_l1_n987()
+ fun_l2_n386
+end
+
+def fun_l1_n988()
+ fun_l2_n394
+end
+
+def fun_l1_n989()
+ fun_l2_n804
+end
+
+def fun_l1_n990()
+ fun_l2_n55
+end
+
+def fun_l1_n991()
+ fun_l2_n359
+end
+
+def fun_l1_n992()
+ fun_l2_n883
+end
+
+def fun_l1_n993()
+ fun_l2_n404
+end
+
+def fun_l1_n994()
+ fun_l2_n145
+end
+
+def fun_l1_n995()
+ fun_l2_n684
+end
+
+def fun_l1_n996()
+ fun_l2_n38
+end
+
+def fun_l1_n997()
+ fun_l2_n309
+end
+
+def fun_l1_n998()
+ fun_l2_n560
+end
+
+def fun_l1_n999()
+ fun_l2_n95
+end
+
+def fun_l2_n0()
+ fun_l3_n813
+end
+
+def fun_l2_n1()
+ fun_l3_n785
+end
+
+def fun_l2_n2()
+ fun_l3_n218
+end
+
+def fun_l2_n3()
+ fun_l3_n111
+end
+
+def fun_l2_n4()
+ fun_l3_n581
+end
+
+def fun_l2_n5()
+ fun_l3_n873
+end
+
+def fun_l2_n6()
+ fun_l3_n123
+end
+
+def fun_l2_n7()
+ fun_l3_n576
+end
+
+def fun_l2_n8()
+ fun_l3_n543
+end
+
+def fun_l2_n9()
+ fun_l3_n720
+end
+
+def fun_l2_n10()
+ fun_l3_n970
+end
+
+def fun_l2_n11()
+ fun_l3_n663
+end
+
+def fun_l2_n12()
+ fun_l3_n549
+end
+
+def fun_l2_n13()
+ fun_l3_n787
+end
+
+def fun_l2_n14()
+ fun_l3_n15
+end
+
+def fun_l2_n15()
+ fun_l3_n858
+end
+
+def fun_l2_n16()
+ fun_l3_n873
+end
+
+def fun_l2_n17()
+ fun_l3_n482
+end
+
+def fun_l2_n18()
+ fun_l3_n26
+end
+
+def fun_l2_n19()
+ fun_l3_n591
+end
+
+def fun_l2_n20()
+ fun_l3_n879
+end
+
+def fun_l2_n21()
+ fun_l3_n891
+end
+
+def fun_l2_n22()
+ fun_l3_n381
+end
+
+def fun_l2_n23()
+ fun_l3_n504
+end
+
+def fun_l2_n24()
+ fun_l3_n595
+end
+
+def fun_l2_n25()
+ fun_l3_n985
+end
+
+def fun_l2_n26()
+ fun_l3_n77
+end
+
+def fun_l2_n27()
+ fun_l3_n144
+end
+
+def fun_l2_n28()
+ fun_l3_n912
+end
+
+def fun_l2_n29()
+ fun_l3_n1
+end
+
+def fun_l2_n30()
+ fun_l3_n816
+end
+
+def fun_l2_n31()
+ fun_l3_n246
+end
+
+def fun_l2_n32()
+ fun_l3_n599
+end
+
+def fun_l2_n33()
+ fun_l3_n961
+end
+
+def fun_l2_n34()
+ fun_l3_n392
+end
+
+def fun_l2_n35()
+ fun_l3_n437
+end
+
+def fun_l2_n36()
+ fun_l3_n520
+end
+
+def fun_l2_n37()
+ fun_l3_n146
+end
+
+def fun_l2_n38()
+ fun_l3_n186
+end
+
+def fun_l2_n39()
+ fun_l3_n699
+end
+
+def fun_l2_n40()
+ fun_l3_n863
+end
+
+def fun_l2_n41()
+ fun_l3_n539
+end
+
+def fun_l2_n42()
+ fun_l3_n581
+end
+
+def fun_l2_n43()
+ fun_l3_n325
+end
+
+def fun_l2_n44()
+ fun_l3_n604
+end
+
+def fun_l2_n45()
+ fun_l3_n79
+end
+
+def fun_l2_n46()
+ fun_l3_n530
+end
+
+def fun_l2_n47()
+ fun_l3_n344
+end
+
+def fun_l2_n48()
+ fun_l3_n92
+end
+
+def fun_l2_n49()
+ fun_l3_n826
+end
+
+def fun_l2_n50()
+ fun_l3_n283
+end
+
+def fun_l2_n51()
+ fun_l3_n220
+end
+
+def fun_l2_n52()
+ fun_l3_n96
+end
+
+def fun_l2_n53()
+ fun_l3_n647
+end
+
+def fun_l2_n54()
+ fun_l3_n664
+end
+
+def fun_l2_n55()
+ fun_l3_n718
+end
+
+def fun_l2_n56()
+ fun_l3_n281
+end
+
+def fun_l2_n57()
+ fun_l3_n214
+end
+
+def fun_l2_n58()
+ fun_l3_n143
+end
+
+def fun_l2_n59()
+ fun_l3_n423
+end
+
+def fun_l2_n60()
+ fun_l3_n815
+end
+
+def fun_l2_n61()
+ fun_l3_n561
+end
+
+def fun_l2_n62()
+ fun_l3_n634
+end
+
+def fun_l2_n63()
+ fun_l3_n354
+end
+
+def fun_l2_n64()
+ fun_l3_n39
+end
+
+def fun_l2_n65()
+ fun_l3_n704
+end
+
+def fun_l2_n66()
+ fun_l3_n193
+end
+
+def fun_l2_n67()
+ fun_l3_n267
+end
+
+def fun_l2_n68()
+ fun_l3_n225
+end
+
+def fun_l2_n69()
+ fun_l3_n253
+end
+
+def fun_l2_n70()
+ fun_l3_n97
+end
+
+def fun_l2_n71()
+ fun_l3_n312
+end
+
+def fun_l2_n72()
+ fun_l3_n663
+end
+
+def fun_l2_n73()
+ fun_l3_n730
+end
+
+def fun_l2_n74()
+ fun_l3_n31
+end
+
+def fun_l2_n75()
+ fun_l3_n94
+end
+
+def fun_l2_n76()
+ fun_l3_n719
+end
+
+def fun_l2_n77()
+ fun_l3_n72
+end
+
+def fun_l2_n78()
+ fun_l3_n593
+end
+
+def fun_l2_n79()
+ fun_l3_n586
+end
+
+def fun_l2_n80()
+ fun_l3_n477
+end
+
+def fun_l2_n81()
+ fun_l3_n406
+end
+
+def fun_l2_n82()
+ fun_l3_n624
+end
+
+def fun_l2_n83()
+ fun_l3_n127
+end
+
+def fun_l2_n84()
+ fun_l3_n993
+end
+
+def fun_l2_n85()
+ fun_l3_n764
+end
+
+def fun_l2_n86()
+ fun_l3_n892
+end
+
+def fun_l2_n87()
+ fun_l3_n147
+end
+
+def fun_l2_n88()
+ fun_l3_n971
+end
+
+def fun_l2_n89()
+ fun_l3_n239
+end
+
+def fun_l2_n90()
+ fun_l3_n96
+end
+
+def fun_l2_n91()
+ fun_l3_n686
+end
+
+def fun_l2_n92()
+ fun_l3_n388
+end
+
+def fun_l2_n93()
+ fun_l3_n848
+end
+
+def fun_l2_n94()
+ fun_l3_n415
+end
+
+def fun_l2_n95()
+ fun_l3_n155
+end
+
+def fun_l2_n96()
+ fun_l3_n245
+end
+
+def fun_l2_n97()
+ fun_l3_n103
+end
+
+def fun_l2_n98()
+ fun_l3_n591
+end
+
+def fun_l2_n99()
+ fun_l3_n610
+end
+
+def fun_l2_n100()
+ fun_l3_n925
+end
+
+def fun_l2_n101()
+ fun_l3_n435
+end
+
+def fun_l2_n102()
+ fun_l3_n580
+end
+
+def fun_l2_n103()
+ fun_l3_n116
+end
+
+def fun_l2_n104()
+ fun_l3_n160
+end
+
+def fun_l2_n105()
+ fun_l3_n245
+end
+
+def fun_l2_n106()
+ fun_l3_n970
+end
+
+def fun_l2_n107()
+ fun_l3_n540
+end
+
+def fun_l2_n108()
+ fun_l3_n385
+end
+
+def fun_l2_n109()
+ fun_l3_n292
+end
+
+def fun_l2_n110()
+ fun_l3_n785
+end
+
+def fun_l2_n111()
+ fun_l3_n310
+end
+
+def fun_l2_n112()
+ fun_l3_n983
+end
+
+def fun_l2_n113()
+ fun_l3_n378
+end
+
+def fun_l2_n114()
+ fun_l3_n538
+end
+
+def fun_l2_n115()
+ fun_l3_n161
+end
+
+def fun_l2_n116()
+ fun_l3_n537
+end
+
+def fun_l2_n117()
+ fun_l3_n1
+end
+
+def fun_l2_n118()
+ fun_l3_n606
+end
+
+def fun_l2_n119()
+ fun_l3_n377
+end
+
+def fun_l2_n120()
+ fun_l3_n839
+end
+
+def fun_l2_n121()
+ fun_l3_n174
+end
+
+def fun_l2_n122()
+ fun_l3_n709
+end
+
+def fun_l2_n123()
+ fun_l3_n384
+end
+
+def fun_l2_n124()
+ fun_l3_n566
+end
+
+def fun_l2_n125()
+ fun_l3_n329
+end
+
+def fun_l2_n126()
+ fun_l3_n238
+end
+
+def fun_l2_n127()
+ fun_l3_n366
+end
+
+def fun_l2_n128()
+ fun_l3_n443
+end
+
+def fun_l2_n129()
+ fun_l3_n901
+end
+
+def fun_l2_n130()
+ fun_l3_n16
+end
+
+def fun_l2_n131()
+ fun_l3_n959
+end
+
+def fun_l2_n132()
+ fun_l3_n460
+end
+
+def fun_l2_n133()
+ fun_l3_n26
+end
+
+def fun_l2_n134()
+ fun_l3_n552
+end
+
+def fun_l2_n135()
+ fun_l3_n207
+end
+
+def fun_l2_n136()
+ fun_l3_n804
+end
+
+def fun_l2_n137()
+ fun_l3_n178
+end
+
+def fun_l2_n138()
+ fun_l3_n826
+end
+
+def fun_l2_n139()
+ fun_l3_n421
+end
+
+def fun_l2_n140()
+ fun_l3_n101
+end
+
+def fun_l2_n141()
+ fun_l3_n529
+end
+
+def fun_l2_n142()
+ fun_l3_n594
+end
+
+def fun_l2_n143()
+ fun_l3_n977
+end
+
+def fun_l2_n144()
+ fun_l3_n859
+end
+
+def fun_l2_n145()
+ fun_l3_n24
+end
+
+def fun_l2_n146()
+ fun_l3_n806
+end
+
+def fun_l2_n147()
+ fun_l3_n355
+end
+
+def fun_l2_n148()
+ fun_l3_n648
+end
+
+def fun_l2_n149()
+ fun_l3_n554
+end
+
+def fun_l2_n150()
+ fun_l3_n188
+end
+
+def fun_l2_n151()
+ fun_l3_n711
+end
+
+def fun_l2_n152()
+ fun_l3_n574
+end
+
+def fun_l2_n153()
+ fun_l3_n667
+end
+
+def fun_l2_n154()
+ fun_l3_n638
+end
+
+def fun_l2_n155()
+ fun_l3_n283
+end
+
+def fun_l2_n156()
+ fun_l3_n999
+end
+
+def fun_l2_n157()
+ fun_l3_n412
+end
+
+def fun_l2_n158()
+ fun_l3_n621
+end
+
+def fun_l2_n159()
+ fun_l3_n821
+end
+
+def fun_l2_n160()
+ fun_l3_n857
+end
+
+def fun_l2_n161()
+ fun_l3_n73
+end
+
+def fun_l2_n162()
+ fun_l3_n768
+end
+
+def fun_l2_n163()
+ fun_l3_n929
+end
+
+def fun_l2_n164()
+ fun_l3_n205
+end
+
+def fun_l2_n165()
+ fun_l3_n120
+end
+
+def fun_l2_n166()
+ fun_l3_n787
+end
+
+def fun_l2_n167()
+ fun_l3_n69
+end
+
+def fun_l2_n168()
+ fun_l3_n567
+end
+
+def fun_l2_n169()
+ fun_l3_n106
+end
+
+def fun_l2_n170()
+ fun_l3_n751
+end
+
+def fun_l2_n171()
+ fun_l3_n642
+end
+
+def fun_l2_n172()
+ fun_l3_n744
+end
+
+def fun_l2_n173()
+ fun_l3_n730
+end
+
+def fun_l2_n174()
+ fun_l3_n681
+end
+
+def fun_l2_n175()
+ fun_l3_n493
+end
+
+def fun_l2_n176()
+ fun_l3_n773
+end
+
+def fun_l2_n177()
+ fun_l3_n393
+end
+
+def fun_l2_n178()
+ fun_l3_n702
+end
+
+def fun_l2_n179()
+ fun_l3_n353
+end
+
+def fun_l2_n180()
+ fun_l3_n21
+end
+
+def fun_l2_n181()
+ fun_l3_n575
+end
+
+def fun_l2_n182()
+ fun_l3_n975
+end
+
+def fun_l2_n183()
+ fun_l3_n969
+end
+
+def fun_l2_n184()
+ fun_l3_n8
+end
+
+def fun_l2_n185()
+ fun_l3_n81
+end
+
+def fun_l2_n186()
+ fun_l3_n650
+end
+
+def fun_l2_n187()
+ fun_l3_n257
+end
+
+def fun_l2_n188()
+ fun_l3_n443
+end
+
+def fun_l2_n189()
+ fun_l3_n647
+end
+
+def fun_l2_n190()
+ fun_l3_n783
+end
+
+def fun_l2_n191()
+ fun_l3_n447
+end
+
+def fun_l2_n192()
+ fun_l3_n50
+end
+
+def fun_l2_n193()
+ fun_l3_n25
+end
+
+def fun_l2_n194()
+ fun_l3_n646
+end
+
+def fun_l2_n195()
+ fun_l3_n878
+end
+
+def fun_l2_n196()
+ fun_l3_n156
+end
+
+def fun_l2_n197()
+ fun_l3_n999
+end
+
+def fun_l2_n198()
+ fun_l3_n292
+end
+
+def fun_l2_n199()
+ fun_l3_n386
+end
+
+def fun_l2_n200()
+ fun_l3_n3
+end
+
+def fun_l2_n201()
+ fun_l3_n111
+end
+
+def fun_l2_n202()
+ fun_l3_n89
+end
+
+def fun_l2_n203()
+ fun_l3_n628
+end
+
+def fun_l2_n204()
+ fun_l3_n384
+end
+
+def fun_l2_n205()
+ fun_l3_n951
+end
+
+def fun_l2_n206()
+ fun_l3_n662
+end
+
+def fun_l2_n207()
+ fun_l3_n607
+end
+
+def fun_l2_n208()
+ fun_l3_n245
+end
+
+def fun_l2_n209()
+ fun_l3_n875
+end
+
+def fun_l2_n210()
+ fun_l3_n493
+end
+
+def fun_l2_n211()
+ fun_l3_n639
+end
+
+def fun_l2_n212()
+ fun_l3_n257
+end
+
+def fun_l2_n213()
+ fun_l3_n710
+end
+
+def fun_l2_n214()
+ fun_l3_n848
+end
+
+def fun_l2_n215()
+ fun_l3_n86
+end
+
+def fun_l2_n216()
+ fun_l3_n269
+end
+
+def fun_l2_n217()
+ fun_l3_n907
+end
+
+def fun_l2_n218()
+ fun_l3_n491
+end
+
+def fun_l2_n219()
+ fun_l3_n194
+end
+
+def fun_l2_n220()
+ fun_l3_n204
+end
+
+def fun_l2_n221()
+ fun_l3_n647
+end
+
+def fun_l2_n222()
+ fun_l3_n277
+end
+
+def fun_l2_n223()
+ fun_l3_n687
+end
+
+def fun_l2_n224()
+ fun_l3_n438
+end
+
+def fun_l2_n225()
+ fun_l3_n634
+end
+
+def fun_l2_n226()
+ fun_l3_n826
+end
+
+def fun_l2_n227()
+ fun_l3_n702
+end
+
+def fun_l2_n228()
+ fun_l3_n541
+end
+
+def fun_l2_n229()
+ fun_l3_n741
+end
+
+def fun_l2_n230()
+ fun_l3_n886
+end
+
+def fun_l2_n231()
+ fun_l3_n243
+end
+
+def fun_l2_n232()
+ fun_l3_n313
+end
+
+def fun_l2_n233()
+ fun_l3_n499
+end
+
+def fun_l2_n234()
+ fun_l3_n100
+end
+
+def fun_l2_n235()
+ fun_l3_n958
+end
+
+def fun_l2_n236()
+ fun_l3_n192
+end
+
+def fun_l2_n237()
+ fun_l3_n529
+end
+
+def fun_l2_n238()
+ fun_l3_n761
+end
+
+def fun_l2_n239()
+ fun_l3_n558
+end
+
+def fun_l2_n240()
+ fun_l3_n58
+end
+
+def fun_l2_n241()
+ fun_l3_n65
+end
+
+def fun_l2_n242()
+ fun_l3_n685
+end
+
+def fun_l2_n243()
+ fun_l3_n418
+end
+
+def fun_l2_n244()
+ fun_l3_n206
+end
+
+def fun_l2_n245()
+ fun_l3_n147
+end
+
+def fun_l2_n246()
+ fun_l3_n98
+end
+
+def fun_l2_n247()
+ fun_l3_n104
+end
+
+def fun_l2_n248()
+ fun_l3_n336
+end
+
+def fun_l2_n249()
+ fun_l3_n406
+end
+
+def fun_l2_n250()
+ fun_l3_n835
+end
+
+def fun_l2_n251()
+ fun_l3_n611
+end
+
+def fun_l2_n252()
+ fun_l3_n890
+end
+
+def fun_l2_n253()
+ fun_l3_n272
+end
+
+def fun_l2_n254()
+ fun_l3_n962
+end
+
+def fun_l2_n255()
+ fun_l3_n960
+end
+
+def fun_l2_n256()
+ fun_l3_n675
+end
+
+def fun_l2_n257()
+ fun_l3_n161
+end
+
+def fun_l2_n258()
+ fun_l3_n509
+end
+
+def fun_l2_n259()
+ fun_l3_n36
+end
+
+def fun_l2_n260()
+ fun_l3_n381
+end
+
+def fun_l2_n261()
+ fun_l3_n721
+end
+
+def fun_l2_n262()
+ fun_l3_n807
+end
+
+def fun_l2_n263()
+ fun_l3_n424
+end
+
+def fun_l2_n264()
+ fun_l3_n733
+end
+
+def fun_l2_n265()
+ fun_l3_n417
+end
+
+def fun_l2_n266()
+ fun_l3_n630
+end
+
+def fun_l2_n267()
+ fun_l3_n733
+end
+
+def fun_l2_n268()
+ fun_l3_n797
+end
+
+def fun_l2_n269()
+ fun_l3_n446
+end
+
+def fun_l2_n270()
+ fun_l3_n877
+end
+
+def fun_l2_n271()
+ fun_l3_n64
+end
+
+def fun_l2_n272()
+ fun_l3_n553
+end
+
+def fun_l2_n273()
+ fun_l3_n369
+end
+
+def fun_l2_n274()
+ fun_l3_n261
+end
+
+def fun_l2_n275()
+ fun_l3_n244
+end
+
+def fun_l2_n276()
+ fun_l3_n544
+end
+
+def fun_l2_n277()
+ fun_l3_n779
+end
+
+def fun_l2_n278()
+ fun_l3_n864
+end
+
+def fun_l2_n279()
+ fun_l3_n235
+end
+
+def fun_l2_n280()
+ fun_l3_n343
+end
+
+def fun_l2_n281()
+ fun_l3_n601
+end
+
+def fun_l2_n282()
+ fun_l3_n925
+end
+
+def fun_l2_n283()
+ fun_l3_n822
+end
+
+def fun_l2_n284()
+ fun_l3_n675
+end
+
+def fun_l2_n285()
+ fun_l3_n791
+end
+
+def fun_l2_n286()
+ fun_l3_n359
+end
+
+def fun_l2_n287()
+ fun_l3_n596
+end
+
+def fun_l2_n288()
+ fun_l3_n153
+end
+
+def fun_l2_n289()
+ fun_l3_n420
+end
+
+def fun_l2_n290()
+ fun_l3_n464
+end
+
+def fun_l2_n291()
+ fun_l3_n393
+end
+
+def fun_l2_n292()
+ fun_l3_n614
+end
+
+def fun_l2_n293()
+ fun_l3_n449
+end
+
+def fun_l2_n294()
+ fun_l3_n561
+end
+
+def fun_l2_n295()
+ fun_l3_n119
+end
+
+def fun_l2_n296()
+ fun_l3_n82
+end
+
+def fun_l2_n297()
+ fun_l3_n932
+end
+
+def fun_l2_n298()
+ fun_l3_n505
+end
+
+def fun_l2_n299()
+ fun_l3_n664
+end
+
+def fun_l2_n300()
+ fun_l3_n222
+end
+
+def fun_l2_n301()
+ fun_l3_n428
+end
+
+def fun_l2_n302()
+ fun_l3_n975
+end
+
+def fun_l2_n303()
+ fun_l3_n481
+end
+
+def fun_l2_n304()
+ fun_l3_n263
+end
+
+def fun_l2_n305()
+ fun_l3_n816
+end
+
+def fun_l2_n306()
+ fun_l3_n58
+end
+
+def fun_l2_n307()
+ fun_l3_n89
+end
+
+def fun_l2_n308()
+ fun_l3_n509
+end
+
+def fun_l2_n309()
+ fun_l3_n162
+end
+
+def fun_l2_n310()
+ fun_l3_n222
+end
+
+def fun_l2_n311()
+ fun_l3_n999
+end
+
+def fun_l2_n312()
+ fun_l3_n26
+end
+
+def fun_l2_n313()
+ fun_l3_n857
+end
+
+def fun_l2_n314()
+ fun_l3_n485
+end
+
+def fun_l2_n315()
+ fun_l3_n935
+end
+
+def fun_l2_n316()
+ fun_l3_n159
+end
+
+def fun_l2_n317()
+ fun_l3_n987
+end
+
+def fun_l2_n318()
+ fun_l3_n122
+end
+
+def fun_l2_n319()
+ fun_l3_n675
+end
+
+def fun_l2_n320()
+ fun_l3_n88
+end
+
+def fun_l2_n321()
+ fun_l3_n84
+end
+
+def fun_l2_n322()
+ fun_l3_n17
+end
+
+def fun_l2_n323()
+ fun_l3_n859
+end
+
+def fun_l2_n324()
+ fun_l3_n340
+end
+
+def fun_l2_n325()
+ fun_l3_n122
+end
+
+def fun_l2_n326()
+ fun_l3_n675
+end
+
+def fun_l2_n327()
+ fun_l3_n502
+end
+
+def fun_l2_n328()
+ fun_l3_n56
+end
+
+def fun_l2_n329()
+ fun_l3_n398
+end
+
+def fun_l2_n330()
+ fun_l3_n985
+end
+
+def fun_l2_n331()
+ fun_l3_n117
+end
+
+def fun_l2_n332()
+ fun_l3_n264
+end
+
+def fun_l2_n333()
+ fun_l3_n664
+end
+
+def fun_l2_n334()
+ fun_l3_n958
+end
+
+def fun_l2_n335()
+ fun_l3_n495
+end
+
+def fun_l2_n336()
+ fun_l3_n794
+end
+
+def fun_l2_n337()
+ fun_l3_n95
+end
+
+def fun_l2_n338()
+ fun_l3_n202
+end
+
+def fun_l2_n339()
+ fun_l3_n510
+end
+
+def fun_l2_n340()
+ fun_l3_n919
+end
+
+def fun_l2_n341()
+ fun_l3_n602
+end
+
+def fun_l2_n342()
+ fun_l3_n750
+end
+
+def fun_l2_n343()
+ fun_l3_n122
+end
+
+def fun_l2_n344()
+ fun_l3_n358
+end
+
+def fun_l2_n345()
+ fun_l3_n539
+end
+
+def fun_l2_n346()
+ fun_l3_n67
+end
+
+def fun_l2_n347()
+ fun_l3_n881
+end
+
+def fun_l2_n348()
+ fun_l3_n257
+end
+
+def fun_l2_n349()
+ fun_l3_n987
+end
+
+def fun_l2_n350()
+ fun_l3_n482
+end
+
+def fun_l2_n351()
+ fun_l3_n803
+end
+
+def fun_l2_n352()
+ fun_l3_n172
+end
+
+def fun_l2_n353()
+ fun_l3_n826
+end
+
+def fun_l2_n354()
+ fun_l3_n977
+end
+
+def fun_l2_n355()
+ fun_l3_n976
+end
+
+def fun_l2_n356()
+ fun_l3_n970
+end
+
+def fun_l2_n357()
+ fun_l3_n904
+end
+
+def fun_l2_n358()
+ fun_l3_n735
+end
+
+def fun_l2_n359()
+ fun_l3_n146
+end
+
+def fun_l2_n360()
+ fun_l3_n810
+end
+
+def fun_l2_n361()
+ fun_l3_n591
+end
+
+def fun_l2_n362()
+ fun_l3_n882
+end
+
+def fun_l2_n363()
+ fun_l3_n980
+end
+
+def fun_l2_n364()
+ fun_l3_n594
+end
+
+def fun_l2_n365()
+ fun_l3_n431
+end
+
+def fun_l2_n366()
+ fun_l3_n225
+end
+
+def fun_l2_n367()
+ fun_l3_n11
+end
+
+def fun_l2_n368()
+ fun_l3_n283
+end
+
+def fun_l2_n369()
+ fun_l3_n476
+end
+
+def fun_l2_n370()
+ fun_l3_n382
+end
+
+def fun_l2_n371()
+ fun_l3_n422
+end
+
+def fun_l2_n372()
+ fun_l3_n272
+end
+
+def fun_l2_n373()
+ fun_l3_n911
+end
+
+def fun_l2_n374()
+ fun_l3_n282
+end
+
+def fun_l2_n375()
+ fun_l3_n388
+end
+
+def fun_l2_n376()
+ fun_l3_n928
+end
+
+def fun_l2_n377()
+ fun_l3_n784
+end
+
+def fun_l2_n378()
+ fun_l3_n817
+end
+
+def fun_l2_n379()
+ fun_l3_n799
+end
+
+def fun_l2_n380()
+ fun_l3_n538
+end
+
+def fun_l2_n381()
+ fun_l3_n24
+end
+
+def fun_l2_n382()
+ fun_l3_n726
+end
+
+def fun_l2_n383()
+ fun_l3_n213
+end
+
+def fun_l2_n384()
+ fun_l3_n15
+end
+
+def fun_l2_n385()
+ fun_l3_n915
+end
+
+def fun_l2_n386()
+ fun_l3_n357
+end
+
+def fun_l2_n387()
+ fun_l3_n343
+end
+
+def fun_l2_n388()
+ fun_l3_n258
+end
+
+def fun_l2_n389()
+ fun_l3_n396
+end
+
+def fun_l2_n390()
+ fun_l3_n478
+end
+
+def fun_l2_n391()
+ fun_l3_n122
+end
+
+def fun_l2_n392()
+ fun_l3_n925
+end
+
+def fun_l2_n393()
+ fun_l3_n6
+end
+
+def fun_l2_n394()
+ fun_l3_n251
+end
+
+def fun_l2_n395()
+ fun_l3_n21
+end
+
+def fun_l2_n396()
+ fun_l3_n781
+end
+
+def fun_l2_n397()
+ fun_l3_n765
+end
+
+def fun_l2_n398()
+ fun_l3_n574
+end
+
+def fun_l2_n399()
+ fun_l3_n347
+end
+
+def fun_l2_n400()
+ fun_l3_n409
+end
+
+def fun_l2_n401()
+ fun_l3_n343
+end
+
+def fun_l2_n402()
+ fun_l3_n580
+end
+
+def fun_l2_n403()
+ fun_l3_n878
+end
+
+def fun_l2_n404()
+ fun_l3_n150
+end
+
+def fun_l2_n405()
+ fun_l3_n900
+end
+
+def fun_l2_n406()
+ fun_l3_n19
+end
+
+def fun_l2_n407()
+ fun_l3_n671
+end
+
+def fun_l2_n408()
+ fun_l3_n714
+end
+
+def fun_l2_n409()
+ fun_l3_n865
+end
+
+def fun_l2_n410()
+ fun_l3_n634
+end
+
+def fun_l2_n411()
+ fun_l3_n780
+end
+
+def fun_l2_n412()
+ fun_l3_n404
+end
+
+def fun_l2_n413()
+ fun_l3_n506
+end
+
+def fun_l2_n414()
+ fun_l3_n503
+end
+
+def fun_l2_n415()
+ fun_l3_n120
+end
+
+def fun_l2_n416()
+ fun_l3_n603
+end
+
+def fun_l2_n417()
+ fun_l3_n263
+end
+
+def fun_l2_n418()
+ fun_l3_n142
+end
+
+def fun_l2_n419()
+ fun_l3_n174
+end
+
+def fun_l2_n420()
+ fun_l3_n474
+end
+
+def fun_l2_n421()
+ fun_l3_n980
+end
+
+def fun_l2_n422()
+ fun_l3_n302
+end
+
+def fun_l2_n423()
+ fun_l3_n850
+end
+
+def fun_l2_n424()
+ fun_l3_n395
+end
+
+def fun_l2_n425()
+ fun_l3_n49
+end
+
+def fun_l2_n426()
+ fun_l3_n732
+end
+
+def fun_l2_n427()
+ fun_l3_n473
+end
+
+def fun_l2_n428()
+ fun_l3_n906
+end
+
+def fun_l2_n429()
+ fun_l3_n120
+end
+
+def fun_l2_n430()
+ fun_l3_n818
+end
+
+def fun_l2_n431()
+ fun_l3_n177
+end
+
+def fun_l2_n432()
+ fun_l3_n47
+end
+
+def fun_l2_n433()
+ fun_l3_n423
+end
+
+def fun_l2_n434()
+ fun_l3_n435
+end
+
+def fun_l2_n435()
+ fun_l3_n748
+end
+
+def fun_l2_n436()
+ fun_l3_n953
+end
+
+def fun_l2_n437()
+ fun_l3_n78
+end
+
+def fun_l2_n438()
+ fun_l3_n184
+end
+
+def fun_l2_n439()
+ fun_l3_n533
+end
+
+def fun_l2_n440()
+ fun_l3_n184
+end
+
+def fun_l2_n441()
+ fun_l3_n698
+end
+
+def fun_l2_n442()
+ fun_l3_n752
+end
+
+def fun_l2_n443()
+ fun_l3_n448
+end
+
+def fun_l2_n444()
+ fun_l3_n307
+end
+
+def fun_l2_n445()
+ fun_l3_n333
+end
+
+def fun_l2_n446()
+ fun_l3_n237
+end
+
+def fun_l2_n447()
+ fun_l3_n550
+end
+
+def fun_l2_n448()
+ fun_l3_n951
+end
+
+def fun_l2_n449()
+ fun_l3_n341
+end
+
+def fun_l2_n450()
+ fun_l3_n188
+end
+
+def fun_l2_n451()
+ fun_l3_n505
+end
+
+def fun_l2_n452()
+ fun_l3_n779
+end
+
+def fun_l2_n453()
+ fun_l3_n368
+end
+
+def fun_l2_n454()
+ fun_l3_n191
+end
+
+def fun_l2_n455()
+ fun_l3_n952
+end
+
+def fun_l2_n456()
+ fun_l3_n472
+end
+
+def fun_l2_n457()
+ fun_l3_n294
+end
+
+def fun_l2_n458()
+ fun_l3_n280
+end
+
+def fun_l2_n459()
+ fun_l3_n794
+end
+
+def fun_l2_n460()
+ fun_l3_n780
+end
+
+def fun_l2_n461()
+ fun_l3_n527
+end
+
+def fun_l2_n462()
+ fun_l3_n129
+end
+
+def fun_l2_n463()
+ fun_l3_n365
+end
+
+def fun_l2_n464()
+ fun_l3_n898
+end
+
+def fun_l2_n465()
+ fun_l3_n932
+end
+
+def fun_l2_n466()
+ fun_l3_n616
+end
+
+def fun_l2_n467()
+ fun_l3_n828
+end
+
+def fun_l2_n468()
+ fun_l3_n660
+end
+
+def fun_l2_n469()
+ fun_l3_n255
+end
+
+def fun_l2_n470()
+ fun_l3_n845
+end
+
+def fun_l2_n471()
+ fun_l3_n347
+end
+
+def fun_l2_n472()
+ fun_l3_n154
+end
+
+def fun_l2_n473()
+ fun_l3_n349
+end
+
+def fun_l2_n474()
+ fun_l3_n276
+end
+
+def fun_l2_n475()
+ fun_l3_n962
+end
+
+def fun_l2_n476()
+ fun_l3_n195
+end
+
+def fun_l2_n477()
+ fun_l3_n648
+end
+
+def fun_l2_n478()
+ fun_l3_n692
+end
+
+def fun_l2_n479()
+ fun_l3_n294
+end
+
+def fun_l2_n480()
+ fun_l3_n144
+end
+
+def fun_l2_n481()
+ fun_l3_n702
+end
+
+def fun_l2_n482()
+ fun_l3_n110
+end
+
+def fun_l2_n483()
+ fun_l3_n169
+end
+
+def fun_l2_n484()
+ fun_l3_n140
+end
+
+def fun_l2_n485()
+ fun_l3_n614
+end
+
+def fun_l2_n486()
+ fun_l3_n309
+end
+
+def fun_l2_n487()
+ fun_l3_n792
+end
+
+def fun_l2_n488()
+ fun_l3_n465
+end
+
+def fun_l2_n489()
+ fun_l3_n892
+end
+
+def fun_l2_n490()
+ fun_l3_n205
+end
+
+def fun_l2_n491()
+ fun_l3_n267
+end
+
+def fun_l2_n492()
+ fun_l3_n743
+end
+
+def fun_l2_n493()
+ fun_l3_n669
+end
+
+def fun_l2_n494()
+ fun_l3_n882
+end
+
+def fun_l2_n495()
+ fun_l3_n654
+end
+
+def fun_l2_n496()
+ fun_l3_n885
+end
+
+def fun_l2_n497()
+ fun_l3_n955
+end
+
+def fun_l2_n498()
+ fun_l3_n251
+end
+
+def fun_l2_n499()
+ fun_l3_n521
+end
+
+def fun_l2_n500()
+ fun_l3_n484
+end
+
+def fun_l2_n501()
+ fun_l3_n525
+end
+
+def fun_l2_n502()
+ fun_l3_n493
+end
+
+def fun_l2_n503()
+ fun_l3_n161
+end
+
+def fun_l2_n504()
+ fun_l3_n447
+end
+
+def fun_l2_n505()
+ fun_l3_n339
+end
+
+def fun_l2_n506()
+ fun_l3_n946
+end
+
+def fun_l2_n507()
+ fun_l3_n564
+end
+
+def fun_l2_n508()
+ fun_l3_n586
+end
+
+def fun_l2_n509()
+ fun_l3_n345
+end
+
+def fun_l2_n510()
+ fun_l3_n814
+end
+
+def fun_l2_n511()
+ fun_l3_n946
+end
+
+def fun_l2_n512()
+ fun_l3_n629
+end
+
+def fun_l2_n513()
+ fun_l3_n726
+end
+
+def fun_l2_n514()
+ fun_l3_n91
+end
+
+def fun_l2_n515()
+ fun_l3_n393
+end
+
+def fun_l2_n516()
+ fun_l3_n620
+end
+
+def fun_l2_n517()
+ fun_l3_n907
+end
+
+def fun_l2_n518()
+ fun_l3_n911
+end
+
+def fun_l2_n519()
+ fun_l3_n361
+end
+
+def fun_l2_n520()
+ fun_l3_n420
+end
+
+def fun_l2_n521()
+ fun_l3_n479
+end
+
+def fun_l2_n522()
+ fun_l3_n686
+end
+
+def fun_l2_n523()
+ fun_l3_n888
+end
+
+def fun_l2_n524()
+ fun_l3_n141
+end
+
+def fun_l2_n525()
+ fun_l3_n830
+end
+
+def fun_l2_n526()
+ fun_l3_n681
+end
+
+def fun_l2_n527()
+ fun_l3_n58
+end
+
+def fun_l2_n528()
+ fun_l3_n835
+end
+
+def fun_l2_n529()
+ fun_l3_n390
+end
+
+def fun_l2_n530()
+ fun_l3_n930
+end
+
+def fun_l2_n531()
+ fun_l3_n569
+end
+
+def fun_l2_n532()
+ fun_l3_n943
+end
+
+def fun_l2_n533()
+ fun_l3_n888
+end
+
+def fun_l2_n534()
+ fun_l3_n220
+end
+
+def fun_l2_n535()
+ fun_l3_n809
+end
+
+def fun_l2_n536()
+ fun_l3_n382
+end
+
+def fun_l2_n537()
+ fun_l3_n356
+end
+
+def fun_l2_n538()
+ fun_l3_n912
+end
+
+def fun_l2_n539()
+ fun_l3_n151
+end
+
+def fun_l2_n540()
+ fun_l3_n740
+end
+
+def fun_l2_n541()
+ fun_l3_n925
+end
+
+def fun_l2_n542()
+ fun_l3_n776
+end
+
+def fun_l2_n543()
+ fun_l3_n4
+end
+
+def fun_l2_n544()
+ fun_l3_n549
+end
+
+def fun_l2_n545()
+ fun_l3_n220
+end
+
+def fun_l2_n546()
+ fun_l3_n932
+end
+
+def fun_l2_n547()
+ fun_l3_n267
+end
+
+def fun_l2_n548()
+ fun_l3_n646
+end
+
+def fun_l2_n549()
+ fun_l3_n217
+end
+
+def fun_l2_n550()
+ fun_l3_n217
+end
+
+def fun_l2_n551()
+ fun_l3_n197
+end
+
+def fun_l2_n552()
+ fun_l3_n419
+end
+
+def fun_l2_n553()
+ fun_l3_n232
+end
+
+def fun_l2_n554()
+ fun_l3_n327
+end
+
+def fun_l2_n555()
+ fun_l3_n201
+end
+
+def fun_l2_n556()
+ fun_l3_n567
+end
+
+def fun_l2_n557()
+ fun_l3_n870
+end
+
+def fun_l2_n558()
+ fun_l3_n222
+end
+
+def fun_l2_n559()
+ fun_l3_n792
+end
+
+def fun_l2_n560()
+ fun_l3_n157
+end
+
+def fun_l2_n561()
+ fun_l3_n870
+end
+
+def fun_l2_n562()
+ fun_l3_n564
+end
+
+def fun_l2_n563()
+ fun_l3_n571
+end
+
+def fun_l2_n564()
+ fun_l3_n211
+end
+
+def fun_l2_n565()
+ fun_l3_n657
+end
+
+def fun_l2_n566()
+ fun_l3_n869
+end
+
+def fun_l2_n567()
+ fun_l3_n288
+end
+
+def fun_l2_n568()
+ fun_l3_n736
+end
+
+def fun_l2_n569()
+ fun_l3_n273
+end
+
+def fun_l2_n570()
+ fun_l3_n194
+end
+
+def fun_l2_n571()
+ fun_l3_n435
+end
+
+def fun_l2_n572()
+ fun_l3_n775
+end
+
+def fun_l2_n573()
+ fun_l3_n342
+end
+
+def fun_l2_n574()
+ fun_l3_n843
+end
+
+def fun_l2_n575()
+ fun_l3_n585
+end
+
+def fun_l2_n576()
+ fun_l3_n518
+end
+
+def fun_l2_n577()
+ fun_l3_n524
+end
+
+def fun_l2_n578()
+ fun_l3_n457
+end
+
+def fun_l2_n579()
+ fun_l3_n905
+end
+
+def fun_l2_n580()
+ fun_l3_n346
+end
+
+def fun_l2_n581()
+ fun_l3_n412
+end
+
+def fun_l2_n582()
+ fun_l3_n970
+end
+
+def fun_l2_n583()
+ fun_l3_n648
+end
+
+def fun_l2_n584()
+ fun_l3_n870
+end
+
+def fun_l2_n585()
+ fun_l3_n783
+end
+
+def fun_l2_n586()
+ fun_l3_n856
+end
+
+def fun_l2_n587()
+ fun_l3_n708
+end
+
+def fun_l2_n588()
+ fun_l3_n473
+end
+
+def fun_l2_n589()
+ fun_l3_n277
+end
+
+def fun_l2_n590()
+ fun_l3_n112
+end
+
+def fun_l2_n591()
+ fun_l3_n785
+end
+
+def fun_l2_n592()
+ fun_l3_n283
+end
+
+def fun_l2_n593()
+ fun_l3_n720
+end
+
+def fun_l2_n594()
+ fun_l3_n195
+end
+
+def fun_l2_n595()
+ fun_l3_n923
+end
+
+def fun_l2_n596()
+ fun_l3_n306
+end
+
+def fun_l2_n597()
+ fun_l3_n108
+end
+
+def fun_l2_n598()
+ fun_l3_n615
+end
+
+def fun_l2_n599()
+ fun_l3_n135
+end
+
+def fun_l2_n600()
+ fun_l3_n710
+end
+
+def fun_l2_n601()
+ fun_l3_n722
+end
+
+def fun_l2_n602()
+ fun_l3_n943
+end
+
+def fun_l2_n603()
+ fun_l3_n626
+end
+
+def fun_l2_n604()
+ fun_l3_n702
+end
+
+def fun_l2_n605()
+ fun_l3_n812
+end
+
+def fun_l2_n606()
+ fun_l3_n551
+end
+
+def fun_l2_n607()
+ fun_l3_n497
+end
+
+def fun_l2_n608()
+ fun_l3_n123
+end
+
+def fun_l2_n609()
+ fun_l3_n302
+end
+
+def fun_l2_n610()
+ fun_l3_n850
+end
+
+def fun_l2_n611()
+ fun_l3_n327
+end
+
+def fun_l2_n612()
+ fun_l3_n529
+end
+
+def fun_l2_n613()
+ fun_l3_n441
+end
+
+def fun_l2_n614()
+ fun_l3_n26
+end
+
+def fun_l2_n615()
+ fun_l3_n275
+end
+
+def fun_l2_n616()
+ fun_l3_n211
+end
+
+def fun_l2_n617()
+ fun_l3_n253
+end
+
+def fun_l2_n618()
+ fun_l3_n767
+end
+
+def fun_l2_n619()
+ fun_l3_n601
+end
+
+def fun_l2_n620()
+ fun_l3_n350
+end
+
+def fun_l2_n621()
+ fun_l3_n407
+end
+
+def fun_l2_n622()
+ fun_l3_n12
+end
+
+def fun_l2_n623()
+ fun_l3_n378
+end
+
+def fun_l2_n624()
+ fun_l3_n159
+end
+
+def fun_l2_n625()
+ fun_l3_n521
+end
+
+def fun_l2_n626()
+ fun_l3_n657
+end
+
+def fun_l2_n627()
+ fun_l3_n997
+end
+
+def fun_l2_n628()
+ fun_l3_n504
+end
+
+def fun_l2_n629()
+ fun_l3_n177
+end
+
+def fun_l2_n630()
+ fun_l3_n352
+end
+
+def fun_l2_n631()
+ fun_l3_n579
+end
+
+def fun_l2_n632()
+ fun_l3_n607
+end
+
+def fun_l2_n633()
+ fun_l3_n430
+end
+
+def fun_l2_n634()
+ fun_l3_n437
+end
+
+def fun_l2_n635()
+ fun_l3_n495
+end
+
+def fun_l2_n636()
+ fun_l3_n247
+end
+
+def fun_l2_n637()
+ fun_l3_n68
+end
+
+def fun_l2_n638()
+ fun_l3_n815
+end
+
+def fun_l2_n639()
+ fun_l3_n477
+end
+
+def fun_l2_n640()
+ fun_l3_n894
+end
+
+def fun_l2_n641()
+ fun_l3_n804
+end
+
+def fun_l2_n642()
+ fun_l3_n198
+end
+
+def fun_l2_n643()
+ fun_l3_n676
+end
+
+def fun_l2_n644()
+ fun_l3_n306
+end
+
+def fun_l2_n645()
+ fun_l3_n545
+end
+
+def fun_l2_n646()
+ fun_l3_n519
+end
+
+def fun_l2_n647()
+ fun_l3_n328
+end
+
+def fun_l2_n648()
+ fun_l3_n654
+end
+
+def fun_l2_n649()
+ fun_l3_n879
+end
+
+def fun_l2_n650()
+ fun_l3_n224
+end
+
+def fun_l2_n651()
+ fun_l3_n826
+end
+
+def fun_l2_n652()
+ fun_l3_n976
+end
+
+def fun_l2_n653()
+ fun_l3_n287
+end
+
+def fun_l2_n654()
+ fun_l3_n471
+end
+
+def fun_l2_n655()
+ fun_l3_n738
+end
+
+def fun_l2_n656()
+ fun_l3_n545
+end
+
+def fun_l2_n657()
+ fun_l3_n819
+end
+
+def fun_l2_n658()
+ fun_l3_n866
+end
+
+def fun_l2_n659()
+ fun_l3_n215
+end
+
+def fun_l2_n660()
+ fun_l3_n656
+end
+
+def fun_l2_n661()
+ fun_l3_n519
+end
+
+def fun_l2_n662()
+ fun_l3_n812
+end
+
+def fun_l2_n663()
+ fun_l3_n241
+end
+
+def fun_l2_n664()
+ fun_l3_n245
+end
+
+def fun_l2_n665()
+ fun_l3_n60
+end
+
+def fun_l2_n666()
+ fun_l3_n516
+end
+
+def fun_l2_n667()
+ fun_l3_n264
+end
+
+def fun_l2_n668()
+ fun_l3_n254
+end
+
+def fun_l2_n669()
+ fun_l3_n952
+end
+
+def fun_l2_n670()
+ fun_l3_n928
+end
+
+def fun_l2_n671()
+ fun_l3_n718
+end
+
+def fun_l2_n672()
+ fun_l3_n937
+end
+
+def fun_l2_n673()
+ fun_l3_n549
+end
+
+def fun_l2_n674()
+ fun_l3_n138
+end
+
+def fun_l2_n675()
+ fun_l3_n441
+end
+
+def fun_l2_n676()
+ fun_l3_n641
+end
+
+def fun_l2_n677()
+ fun_l3_n611
+end
+
+def fun_l2_n678()
+ fun_l3_n711
+end
+
+def fun_l2_n679()
+ fun_l3_n60
+end
+
+def fun_l2_n680()
+ fun_l3_n894
+end
+
+def fun_l2_n681()
+ fun_l3_n957
+end
+
+def fun_l2_n682()
+ fun_l3_n516
+end
+
+def fun_l2_n683()
+ fun_l3_n348
+end
+
+def fun_l2_n684()
+ fun_l3_n600
+end
+
+def fun_l2_n685()
+ fun_l3_n955
+end
+
+def fun_l2_n686()
+ fun_l3_n842
+end
+
+def fun_l2_n687()
+ fun_l3_n126
+end
+
+def fun_l2_n688()
+ fun_l3_n739
+end
+
+def fun_l2_n689()
+ fun_l3_n435
+end
+
+def fun_l2_n690()
+ fun_l3_n445
+end
+
+def fun_l2_n691()
+ fun_l3_n973
+end
+
+def fun_l2_n692()
+ fun_l3_n54
+end
+
+def fun_l2_n693()
+ fun_l3_n629
+end
+
+def fun_l2_n694()
+ fun_l3_n83
+end
+
+def fun_l2_n695()
+ fun_l3_n887
+end
+
+def fun_l2_n696()
+ fun_l3_n552
+end
+
+def fun_l2_n697()
+ fun_l3_n263
+end
+
+def fun_l2_n698()
+ fun_l3_n532
+end
+
+def fun_l2_n699()
+ fun_l3_n462
+end
+
+def fun_l2_n700()
+ fun_l3_n319
+end
+
+def fun_l2_n701()
+ fun_l3_n464
+end
+
+def fun_l2_n702()
+ fun_l3_n340
+end
+
+def fun_l2_n703()
+ fun_l3_n188
+end
+
+def fun_l2_n704()
+ fun_l3_n157
+end
+
+def fun_l2_n705()
+ fun_l3_n345
+end
+
+def fun_l2_n706()
+ fun_l3_n637
+end
+
+def fun_l2_n707()
+ fun_l3_n157
+end
+
+def fun_l2_n708()
+ fun_l3_n270
+end
+
+def fun_l2_n709()
+ fun_l3_n13
+end
+
+def fun_l2_n710()
+ fun_l3_n360
+end
+
+def fun_l2_n711()
+ fun_l3_n890
+end
+
+def fun_l2_n712()
+ fun_l3_n539
+end
+
+def fun_l2_n713()
+ fun_l3_n582
+end
+
+def fun_l2_n714()
+ fun_l3_n466
+end
+
+def fun_l2_n715()
+ fun_l3_n623
+end
+
+def fun_l2_n716()
+ fun_l3_n995
+end
+
+def fun_l2_n717()
+ fun_l3_n810
+end
+
+def fun_l2_n718()
+ fun_l3_n95
+end
+
+def fun_l2_n719()
+ fun_l3_n103
+end
+
+def fun_l2_n720()
+ fun_l3_n755
+end
+
+def fun_l2_n721()
+ fun_l3_n858
+end
+
+def fun_l2_n722()
+ fun_l3_n519
+end
+
+def fun_l2_n723()
+ fun_l3_n489
+end
+
+def fun_l2_n724()
+ fun_l3_n578
+end
+
+def fun_l2_n725()
+ fun_l3_n176
+end
+
+def fun_l2_n726()
+ fun_l3_n58
+end
+
+def fun_l2_n727()
+ fun_l3_n817
+end
+
+def fun_l2_n728()
+ fun_l3_n612
+end
+
+def fun_l2_n729()
+ fun_l3_n510
+end
+
+def fun_l2_n730()
+ fun_l3_n934
+end
+
+def fun_l2_n731()
+ fun_l3_n691
+end
+
+def fun_l2_n732()
+ fun_l3_n697
+end
+
+def fun_l2_n733()
+ fun_l3_n667
+end
+
+def fun_l2_n734()
+ fun_l3_n49
+end
+
+def fun_l2_n735()
+ fun_l3_n113
+end
+
+def fun_l2_n736()
+ fun_l3_n157
+end
+
+def fun_l2_n737()
+ fun_l3_n756
+end
+
+def fun_l2_n738()
+ fun_l3_n888
+end
+
+def fun_l2_n739()
+ fun_l3_n847
+end
+
+def fun_l2_n740()
+ fun_l3_n693
+end
+
+def fun_l2_n741()
+ fun_l3_n116
+end
+
+def fun_l2_n742()
+ fun_l3_n95
+end
+
+def fun_l2_n743()
+ fun_l3_n662
+end
+
+def fun_l2_n744()
+ fun_l3_n744
+end
+
+def fun_l2_n745()
+ fun_l3_n800
+end
+
+def fun_l2_n746()
+ fun_l3_n732
+end
+
+def fun_l2_n747()
+ fun_l3_n278
+end
+
+def fun_l2_n748()
+ fun_l3_n441
+end
+
+def fun_l2_n749()
+ fun_l3_n838
+end
+
+def fun_l2_n750()
+ fun_l3_n616
+end
+
+def fun_l2_n751()
+ fun_l3_n438
+end
+
+def fun_l2_n752()
+ fun_l3_n271
+end
+
+def fun_l2_n753()
+ fun_l3_n527
+end
+
+def fun_l2_n754()
+ fun_l3_n568
+end
+
+def fun_l2_n755()
+ fun_l3_n584
+end
+
+def fun_l2_n756()
+ fun_l3_n514
+end
+
+def fun_l2_n757()
+ fun_l3_n599
+end
+
+def fun_l2_n758()
+ fun_l3_n878
+end
+
+def fun_l2_n759()
+ fun_l3_n314
+end
+
+def fun_l2_n760()
+ fun_l3_n277
+end
+
+def fun_l2_n761()
+ fun_l3_n296
+end
+
+def fun_l2_n762()
+ fun_l3_n729
+end
+
+def fun_l2_n763()
+ fun_l3_n192
+end
+
+def fun_l2_n764()
+ fun_l3_n549
+end
+
+def fun_l2_n765()
+ fun_l3_n304
+end
+
+def fun_l2_n766()
+ fun_l3_n133
+end
+
+def fun_l2_n767()
+ fun_l3_n678
+end
+
+def fun_l2_n768()
+ fun_l3_n608
+end
+
+def fun_l2_n769()
+ fun_l3_n830
+end
+
+def fun_l2_n770()
+ fun_l3_n419
+end
+
+def fun_l2_n771()
+ fun_l3_n174
+end
+
+def fun_l2_n772()
+ fun_l3_n806
+end
+
+def fun_l2_n773()
+ fun_l3_n257
+end
+
+def fun_l2_n774()
+ fun_l3_n203
+end
+
+def fun_l2_n775()
+ fun_l3_n572
+end
+
+def fun_l2_n776()
+ fun_l3_n665
+end
+
+def fun_l2_n777()
+ fun_l3_n417
+end
+
+def fun_l2_n778()
+ fun_l3_n44
+end
+
+def fun_l2_n779()
+ fun_l3_n202
+end
+
+def fun_l2_n780()
+ fun_l3_n343
+end
+
+def fun_l2_n781()
+ fun_l3_n343
+end
+
+def fun_l2_n782()
+ fun_l3_n57
+end
+
+def fun_l2_n783()
+ fun_l3_n836
+end
+
+def fun_l2_n784()
+ fun_l3_n634
+end
+
+def fun_l2_n785()
+ fun_l3_n788
+end
+
+def fun_l2_n786()
+ fun_l3_n541
+end
+
+def fun_l2_n787()
+ fun_l3_n906
+end
+
+def fun_l2_n788()
+ fun_l3_n12
+end
+
+def fun_l2_n789()
+ fun_l3_n682
+end
+
+def fun_l2_n790()
+ fun_l3_n80
+end
+
+def fun_l2_n791()
+ fun_l3_n594
+end
+
+def fun_l2_n792()
+ fun_l3_n120
+end
+
+def fun_l2_n793()
+ fun_l3_n551
+end
+
+def fun_l2_n794()
+ fun_l3_n164
+end
+
+def fun_l2_n795()
+ fun_l3_n817
+end
+
+def fun_l2_n796()
+ fun_l3_n611
+end
+
+def fun_l2_n797()
+ fun_l3_n878
+end
+
+def fun_l2_n798()
+ fun_l3_n235
+end
+
+def fun_l2_n799()
+ fun_l3_n210
+end
+
+def fun_l2_n800()
+ fun_l3_n343
+end
+
+def fun_l2_n801()
+ fun_l3_n445
+end
+
+def fun_l2_n802()
+ fun_l3_n549
+end
+
+def fun_l2_n803()
+ fun_l3_n992
+end
+
+def fun_l2_n804()
+ fun_l3_n751
+end
+
+def fun_l2_n805()
+ fun_l3_n514
+end
+
+def fun_l2_n806()
+ fun_l3_n593
+end
+
+def fun_l2_n807()
+ fun_l3_n876
+end
+
+def fun_l2_n808()
+ fun_l3_n612
+end
+
+def fun_l2_n809()
+ fun_l3_n184
+end
+
+def fun_l2_n810()
+ fun_l3_n34
+end
+
+def fun_l2_n811()
+ fun_l3_n703
+end
+
+def fun_l2_n812()
+ fun_l3_n296
+end
+
+def fun_l2_n813()
+ fun_l3_n815
+end
+
+def fun_l2_n814()
+ fun_l3_n417
+end
+
+def fun_l2_n815()
+ fun_l3_n230
+end
+
+def fun_l2_n816()
+ fun_l3_n140
+end
+
+def fun_l2_n817()
+ fun_l3_n772
+end
+
+def fun_l2_n818()
+ fun_l3_n671
+end
+
+def fun_l2_n819()
+ fun_l3_n670
+end
+
+def fun_l2_n820()
+ fun_l3_n286
+end
+
+def fun_l2_n821()
+ fun_l3_n406
+end
+
+def fun_l2_n822()
+ fun_l3_n757
+end
+
+def fun_l2_n823()
+ fun_l3_n995
+end
+
+def fun_l2_n824()
+ fun_l3_n816
+end
+
+def fun_l2_n825()
+ fun_l3_n624
+end
+
+def fun_l2_n826()
+ fun_l3_n625
+end
+
+def fun_l2_n827()
+ fun_l3_n559
+end
+
+def fun_l2_n828()
+ fun_l3_n224
+end
+
+def fun_l2_n829()
+ fun_l3_n437
+end
+
+def fun_l2_n830()
+ fun_l3_n745
+end
+
+def fun_l2_n831()
+ fun_l3_n289
+end
+
+def fun_l2_n832()
+ fun_l3_n555
+end
+
+def fun_l2_n833()
+ fun_l3_n477
+end
+
+def fun_l2_n834()
+ fun_l3_n545
+end
+
+def fun_l2_n835()
+ fun_l3_n87
+end
+
+def fun_l2_n836()
+ fun_l3_n100
+end
+
+def fun_l2_n837()
+ fun_l3_n796
+end
+
+def fun_l2_n838()
+ fun_l3_n166
+end
+
+def fun_l2_n839()
+ fun_l3_n91
+end
+
+def fun_l2_n840()
+ fun_l3_n325
+end
+
+def fun_l2_n841()
+ fun_l3_n717
+end
+
+def fun_l2_n842()
+ fun_l3_n522
+end
+
+def fun_l2_n843()
+ fun_l3_n560
+end
+
+def fun_l2_n844()
+ fun_l3_n811
+end
+
+def fun_l2_n845()
+ fun_l3_n451
+end
+
+def fun_l2_n846()
+ fun_l3_n45
+end
+
+def fun_l2_n847()
+ fun_l3_n410
+end
+
+def fun_l2_n848()
+ fun_l3_n976
+end
+
+def fun_l2_n849()
+ fun_l3_n873
+end
+
+def fun_l2_n850()
+ fun_l3_n302
+end
+
+def fun_l2_n851()
+ fun_l3_n346
+end
+
+def fun_l2_n852()
+ fun_l3_n314
+end
+
+def fun_l2_n853()
+ fun_l3_n829
+end
+
+def fun_l2_n854()
+ fun_l3_n259
+end
+
+def fun_l2_n855()
+ fun_l3_n799
+end
+
+def fun_l2_n856()
+ fun_l3_n451
+end
+
+def fun_l2_n857()
+ fun_l3_n154
+end
+
+def fun_l2_n858()
+ fun_l3_n867
+end
+
+def fun_l2_n859()
+ fun_l3_n806
+end
+
+def fun_l2_n860()
+ fun_l3_n138
+end
+
+def fun_l2_n861()
+ fun_l3_n508
+end
+
+def fun_l2_n862()
+ fun_l3_n627
+end
+
+def fun_l2_n863()
+ fun_l3_n931
+end
+
+def fun_l2_n864()
+ fun_l3_n95
+end
+
+def fun_l2_n865()
+ fun_l3_n533
+end
+
+def fun_l2_n866()
+ fun_l3_n425
+end
+
+def fun_l2_n867()
+ fun_l3_n996
+end
+
+def fun_l2_n868()
+ fun_l3_n331
+end
+
+def fun_l2_n869()
+ fun_l3_n126
+end
+
+def fun_l2_n870()
+ fun_l3_n848
+end
+
+def fun_l2_n871()
+ fun_l3_n174
+end
+
+def fun_l2_n872()
+ fun_l3_n867
+end
+
+def fun_l2_n873()
+ fun_l3_n800
+end
+
+def fun_l2_n874()
+ fun_l3_n526
+end
+
+def fun_l2_n875()
+ fun_l3_n250
+end
+
+def fun_l2_n876()
+ fun_l3_n896
+end
+
+def fun_l2_n877()
+ fun_l3_n229
+end
+
+def fun_l2_n878()
+ fun_l3_n290
+end
+
+def fun_l2_n879()
+ fun_l3_n130
+end
+
+def fun_l2_n880()
+ fun_l3_n437
+end
+
+def fun_l2_n881()
+ fun_l3_n654
+end
+
+def fun_l2_n882()
+ fun_l3_n93
+end
+
+def fun_l2_n883()
+ fun_l3_n632
+end
+
+def fun_l2_n884()
+ fun_l3_n772
+end
+
+def fun_l2_n885()
+ fun_l3_n597
+end
+
+def fun_l2_n886()
+ fun_l3_n668
+end
+
+def fun_l2_n887()
+ fun_l3_n969
+end
+
+def fun_l2_n888()
+ fun_l3_n908
+end
+
+def fun_l2_n889()
+ fun_l3_n10
+end
+
+def fun_l2_n890()
+ fun_l3_n676
+end
+
+def fun_l2_n891()
+ fun_l3_n729
+end
+
+def fun_l2_n892()
+ fun_l3_n659
+end
+
+def fun_l2_n893()
+ fun_l3_n121
+end
+
+def fun_l2_n894()
+ fun_l3_n543
+end
+
+def fun_l2_n895()
+ fun_l3_n931
+end
+
+def fun_l2_n896()
+ fun_l3_n64
+end
+
+def fun_l2_n897()
+ fun_l3_n500
+end
+
+def fun_l2_n898()
+ fun_l3_n664
+end
+
+def fun_l2_n899()
+ fun_l3_n929
+end
+
+def fun_l2_n900()
+ fun_l3_n772
+end
+
+def fun_l2_n901()
+ fun_l3_n309
+end
+
+def fun_l2_n902()
+ fun_l3_n284
+end
+
+def fun_l2_n903()
+ fun_l3_n304
+end
+
+def fun_l2_n904()
+ fun_l3_n18
+end
+
+def fun_l2_n905()
+ fun_l3_n715
+end
+
+def fun_l2_n906()
+ fun_l3_n469
+end
+
+def fun_l2_n907()
+ fun_l3_n524
+end
+
+def fun_l2_n908()
+ fun_l3_n476
+end
+
+def fun_l2_n909()
+ fun_l3_n90
+end
+
+def fun_l2_n910()
+ fun_l3_n471
+end
+
+def fun_l2_n911()
+ fun_l3_n885
+end
+
+def fun_l2_n912()
+ fun_l3_n696
+end
+
+def fun_l2_n913()
+ fun_l3_n393
+end
+
+def fun_l2_n914()
+ fun_l3_n987
+end
+
+def fun_l2_n915()
+ fun_l3_n830
+end
+
+def fun_l2_n916()
+ fun_l3_n684
+end
+
+def fun_l2_n917()
+ fun_l3_n379
+end
+
+def fun_l2_n918()
+ fun_l3_n237
+end
+
+def fun_l2_n919()
+ fun_l3_n115
+end
+
+def fun_l2_n920()
+ fun_l3_n499
+end
+
+def fun_l2_n921()
+ fun_l3_n88
+end
+
+def fun_l2_n922()
+ fun_l3_n563
+end
+
+def fun_l2_n923()
+ fun_l3_n280
+end
+
+def fun_l2_n924()
+ fun_l3_n400
+end
+
+def fun_l2_n925()
+ fun_l3_n750
+end
+
+def fun_l2_n926()
+ fun_l3_n429
+end
+
+def fun_l2_n927()
+ fun_l3_n669
+end
+
+def fun_l2_n928()
+ fun_l3_n275
+end
+
+def fun_l2_n929()
+ fun_l3_n468
+end
+
+def fun_l2_n930()
+ fun_l3_n617
+end
+
+def fun_l2_n931()
+ fun_l3_n291
+end
+
+def fun_l2_n932()
+ fun_l3_n870
+end
+
+def fun_l2_n933()
+ fun_l3_n169
+end
+
+def fun_l2_n934()
+ fun_l3_n603
+end
+
+def fun_l2_n935()
+ fun_l3_n669
+end
+
+def fun_l2_n936()
+ fun_l3_n738
+end
+
+def fun_l2_n937()
+ fun_l3_n417
+end
+
+def fun_l2_n938()
+ fun_l3_n339
+end
+
+def fun_l2_n939()
+ fun_l3_n660
+end
+
+def fun_l2_n940()
+ fun_l3_n253
+end
+
+def fun_l2_n941()
+ fun_l3_n598
+end
+
+def fun_l2_n942()
+ fun_l3_n369
+end
+
+def fun_l2_n943()
+ fun_l3_n453
+end
+
+def fun_l2_n944()
+ fun_l3_n535
+end
+
+def fun_l2_n945()
+ fun_l3_n492
+end
+
+def fun_l2_n946()
+ fun_l3_n950
+end
+
+def fun_l2_n947()
+ fun_l3_n939
+end
+
+def fun_l2_n948()
+ fun_l3_n607
+end
+
+def fun_l2_n949()
+ fun_l3_n440
+end
+
+def fun_l2_n950()
+ fun_l3_n615
+end
+
+def fun_l2_n951()
+ fun_l3_n690
+end
+
+def fun_l2_n952()
+ fun_l3_n205
+end
+
+def fun_l2_n953()
+ fun_l3_n831
+end
+
+def fun_l2_n954()
+ fun_l3_n56
+end
+
+def fun_l2_n955()
+ fun_l3_n695
+end
+
+def fun_l2_n956()
+ fun_l3_n358
+end
+
+def fun_l2_n957()
+ fun_l3_n2
+end
+
+def fun_l2_n958()
+ fun_l3_n663
+end
+
+def fun_l2_n959()
+ fun_l3_n829
+end
+
+def fun_l2_n960()
+ fun_l3_n627
+end
+
+def fun_l2_n961()
+ fun_l3_n43
+end
+
+def fun_l2_n962()
+ fun_l3_n293
+end
+
+def fun_l2_n963()
+ fun_l3_n982
+end
+
+def fun_l2_n964()
+ fun_l3_n472
+end
+
+def fun_l2_n965()
+ fun_l3_n703
+end
+
+def fun_l2_n966()
+ fun_l3_n884
+end
+
+def fun_l2_n967()
+ fun_l3_n395
+end
+
+def fun_l2_n968()
+ fun_l3_n398
+end
+
+def fun_l2_n969()
+ fun_l3_n251
+end
+
+def fun_l2_n970()
+ fun_l3_n52
+end
+
+def fun_l2_n971()
+ fun_l3_n263
+end
+
+def fun_l2_n972()
+ fun_l3_n172
+end
+
+def fun_l2_n973()
+ fun_l3_n334
+end
+
+def fun_l2_n974()
+ fun_l3_n552
+end
+
+def fun_l2_n975()
+ fun_l3_n898
+end
+
+def fun_l2_n976()
+ fun_l3_n55
+end
+
+def fun_l2_n977()
+ fun_l3_n556
+end
+
+def fun_l2_n978()
+ fun_l3_n852
+end
+
+def fun_l2_n979()
+ fun_l3_n681
+end
+
+def fun_l2_n980()
+ fun_l3_n470
+end
+
+def fun_l2_n981()
+ fun_l3_n807
+end
+
+def fun_l2_n982()
+ fun_l3_n411
+end
+
+def fun_l2_n983()
+ fun_l3_n251
+end
+
+def fun_l2_n984()
+ fun_l3_n302
+end
+
+def fun_l2_n985()
+ fun_l3_n598
+end
+
+def fun_l2_n986()
+ fun_l3_n897
+end
+
+def fun_l2_n987()
+ fun_l3_n449
+end
+
+def fun_l2_n988()
+ fun_l3_n178
+end
+
+def fun_l2_n989()
+ fun_l3_n208
+end
+
+def fun_l2_n990()
+ fun_l3_n287
+end
+
+def fun_l2_n991()
+ fun_l3_n237
+end
+
+def fun_l2_n992()
+ fun_l3_n56
+end
+
+def fun_l2_n993()
+ fun_l3_n66
+end
+
+def fun_l2_n994()
+ fun_l3_n838
+end
+
+def fun_l2_n995()
+ fun_l3_n726
+end
+
+def fun_l2_n996()
+ fun_l3_n758
+end
+
+def fun_l2_n997()
+ fun_l3_n850
+end
+
+def fun_l2_n998()
+ fun_l3_n132
+end
+
+def fun_l2_n999()
+ fun_l3_n477
+end
+
+def fun_l3_n0()
+ fun_l4_n984
+end
+
+def fun_l3_n1()
+ fun_l4_n136
+end
+
+def fun_l3_n2()
+ fun_l4_n494
+end
+
+def fun_l3_n3()
+ fun_l4_n267
+end
+
+def fun_l3_n4()
+ fun_l4_n305
+end
+
+def fun_l3_n5()
+ fun_l4_n646
+end
+
+def fun_l3_n6()
+ fun_l4_n144
+end
+
+def fun_l3_n7()
+ fun_l4_n341
+end
+
+def fun_l3_n8()
+ fun_l4_n142
+end
+
+def fun_l3_n9()
+ fun_l4_n382
+end
+
+def fun_l3_n10()
+ fun_l4_n726
+end
+
+def fun_l3_n11()
+ fun_l4_n23
+end
+
+def fun_l3_n12()
+ fun_l4_n911
+end
+
+def fun_l3_n13()
+ fun_l4_n221
+end
+
+def fun_l3_n14()
+ fun_l4_n554
+end
+
+def fun_l3_n15()
+ fun_l4_n602
+end
+
+def fun_l3_n16()
+ fun_l4_n893
+end
+
+def fun_l3_n17()
+ fun_l4_n943
+end
+
+def fun_l3_n18()
+ fun_l4_n523
+end
+
+def fun_l3_n19()
+ fun_l4_n896
+end
+
+def fun_l3_n20()
+ fun_l4_n539
+end
+
+def fun_l3_n21()
+ fun_l4_n333
+end
+
+def fun_l3_n22()
+ fun_l4_n230
+end
+
+def fun_l3_n23()
+ fun_l4_n256
+end
+
+def fun_l3_n24()
+ fun_l4_n278
+end
+
+def fun_l3_n25()
+ fun_l4_n699
+end
+
+def fun_l3_n26()
+ fun_l4_n584
+end
+
+def fun_l3_n27()
+ fun_l4_n259
+end
+
+def fun_l3_n28()
+ fun_l4_n993
+end
+
+def fun_l3_n29()
+ fun_l4_n183
+end
+
+def fun_l3_n30()
+ fun_l4_n249
+end
+
+def fun_l3_n31()
+ fun_l4_n253
+end
+
+def fun_l3_n32()
+ fun_l4_n507
+end
+
+def fun_l3_n33()
+ fun_l4_n507
+end
+
+def fun_l3_n34()
+ fun_l4_n142
+end
+
+def fun_l3_n35()
+ fun_l4_n392
+end
+
+def fun_l3_n36()
+ fun_l4_n962
+end
+
+def fun_l3_n37()
+ fun_l4_n799
+end
+
+def fun_l3_n38()
+ fun_l4_n110
+end
+
+def fun_l3_n39()
+ fun_l4_n623
+end
+
+def fun_l3_n40()
+ fun_l4_n508
+end
+
+def fun_l3_n41()
+ fun_l4_n726
+end
+
+def fun_l3_n42()
+ fun_l4_n282
+end
+
+def fun_l3_n43()
+ fun_l4_n942
+end
+
+def fun_l3_n44()
+ fun_l4_n711
+end
+
+def fun_l3_n45()
+ fun_l4_n926
+end
+
+def fun_l3_n46()
+ fun_l4_n793
+end
+
+def fun_l3_n47()
+ fun_l4_n658
+end
+
+def fun_l3_n48()
+ fun_l4_n802
+end
+
+def fun_l3_n49()
+ fun_l4_n499
+end
+
+def fun_l3_n50()
+ fun_l4_n648
+end
+
+def fun_l3_n51()
+ fun_l4_n465
+end
+
+def fun_l3_n52()
+ fun_l4_n460
+end
+
+def fun_l3_n53()
+ fun_l4_n904
+end
+
+def fun_l3_n54()
+ fun_l4_n939
+end
+
+def fun_l3_n55()
+ fun_l4_n306
+end
+
+def fun_l3_n56()
+ fun_l4_n235
+end
+
+def fun_l3_n57()
+ fun_l4_n783
+end
+
+def fun_l3_n58()
+ fun_l4_n992
+end
+
+def fun_l3_n59()
+ fun_l4_n196
+end
+
+def fun_l3_n60()
+ fun_l4_n637
+end
+
+def fun_l3_n61()
+ fun_l4_n512
+end
+
+def fun_l3_n62()
+ fun_l4_n480
+end
+
+def fun_l3_n63()
+ fun_l4_n31
+end
+
+def fun_l3_n64()
+ fun_l4_n277
+end
+
+def fun_l3_n65()
+ fun_l4_n814
+end
+
+def fun_l3_n66()
+ fun_l4_n170
+end
+
+def fun_l3_n67()
+ fun_l4_n604
+end
+
+def fun_l3_n68()
+ fun_l4_n794
+end
+
+def fun_l3_n69()
+ fun_l4_n530
+end
+
+def fun_l3_n70()
+ fun_l4_n291
+end
+
+def fun_l3_n71()
+ fun_l4_n146
+end
+
+def fun_l3_n72()
+ fun_l4_n588
+end
+
+def fun_l3_n73()
+ fun_l4_n624
+end
+
+def fun_l3_n74()
+ fun_l4_n210
+end
+
+def fun_l3_n75()
+ fun_l4_n924
+end
+
+def fun_l3_n76()
+ fun_l4_n77
+end
+
+def fun_l3_n77()
+ fun_l4_n727
+end
+
+def fun_l3_n78()
+ fun_l4_n840
+end
+
+def fun_l3_n79()
+ fun_l4_n257
+end
+
+def fun_l3_n80()
+ fun_l4_n654
+end
+
+def fun_l3_n81()
+ fun_l4_n498
+end
+
+def fun_l3_n82()
+ fun_l4_n445
+end
+
+def fun_l3_n83()
+ fun_l4_n820
+end
+
+def fun_l3_n84()
+ fun_l4_n376
+end
+
+def fun_l3_n85()
+ fun_l4_n702
+end
+
+def fun_l3_n86()
+ fun_l4_n22
+end
+
+def fun_l3_n87()
+ fun_l4_n278
+end
+
+def fun_l3_n88()
+ fun_l4_n399
+end
+
+def fun_l3_n89()
+ fun_l4_n166
+end
+
+def fun_l3_n90()
+ fun_l4_n461
+end
+
+def fun_l3_n91()
+ fun_l4_n992
+end
+
+def fun_l3_n92()
+ fun_l4_n207
+end
+
+def fun_l3_n93()
+ fun_l4_n915
+end
+
+def fun_l3_n94()
+ fun_l4_n852
+end
+
+def fun_l3_n95()
+ fun_l4_n591
+end
+
+def fun_l3_n96()
+ fun_l4_n74
+end
+
+def fun_l3_n97()
+ fun_l4_n735
+end
+
+def fun_l3_n98()
+ fun_l4_n863
+end
+
+def fun_l3_n99()
+ fun_l4_n692
+end
+
+def fun_l3_n100()
+ fun_l4_n633
+end
+
+def fun_l3_n101()
+ fun_l4_n618
+end
+
+def fun_l3_n102()
+ fun_l4_n306
+end
+
+def fun_l3_n103()
+ fun_l4_n620
+end
+
+def fun_l3_n104()
+ fun_l4_n981
+end
+
+def fun_l3_n105()
+ fun_l4_n763
+end
+
+def fun_l3_n106()
+ fun_l4_n727
+end
+
+def fun_l3_n107()
+ fun_l4_n173
+end
+
+def fun_l3_n108()
+ fun_l4_n645
+end
+
+def fun_l3_n109()
+ fun_l4_n333
+end
+
+def fun_l3_n110()
+ fun_l4_n847
+end
+
+def fun_l3_n111()
+ fun_l4_n905
+end
+
+def fun_l3_n112()
+ fun_l4_n753
+end
+
+def fun_l3_n113()
+ fun_l4_n294
+end
+
+def fun_l3_n114()
+ fun_l4_n891
+end
+
+def fun_l3_n115()
+ fun_l4_n495
+end
+
+def fun_l3_n116()
+ fun_l4_n683
+end
+
+def fun_l3_n117()
+ fun_l4_n925
+end
+
+def fun_l3_n118()
+ fun_l4_n630
+end
+
+def fun_l3_n119()
+ fun_l4_n548
+end
+
+def fun_l3_n120()
+ fun_l4_n767
+end
+
+def fun_l3_n121()
+ fun_l4_n623
+end
+
+def fun_l3_n122()
+ fun_l4_n0
+end
+
+def fun_l3_n123()
+ fun_l4_n849
+end
+
+def fun_l3_n124()
+ fun_l4_n643
+end
+
+def fun_l3_n125()
+ fun_l4_n559
+end
+
+def fun_l3_n126()
+ fun_l4_n533
+end
+
+def fun_l3_n127()
+ fun_l4_n287
+end
+
+def fun_l3_n128()
+ fun_l4_n146
+end
+
+def fun_l3_n129()
+ fun_l4_n636
+end
+
+def fun_l3_n130()
+ fun_l4_n914
+end
+
+def fun_l3_n131()
+ fun_l4_n274
+end
+
+def fun_l3_n132()
+ fun_l4_n60
+end
+
+def fun_l3_n133()
+ fun_l4_n858
+end
+
+def fun_l3_n134()
+ fun_l4_n334
+end
+
+def fun_l3_n135()
+ fun_l4_n892
+end
+
+def fun_l3_n136()
+ fun_l4_n81
+end
+
+def fun_l3_n137()
+ fun_l4_n567
+end
+
+def fun_l3_n138()
+ fun_l4_n456
+end
+
+def fun_l3_n139()
+ fun_l4_n625
+end
+
+def fun_l3_n140()
+ fun_l4_n690
+end
+
+def fun_l3_n141()
+ fun_l4_n919
+end
+
+def fun_l3_n142()
+ fun_l4_n504
+end
+
+def fun_l3_n143()
+ fun_l4_n986
+end
+
+def fun_l3_n144()
+ fun_l4_n99
+end
+
+def fun_l3_n145()
+ fun_l4_n312
+end
+
+def fun_l3_n146()
+ fun_l4_n36
+end
+
+def fun_l3_n147()
+ fun_l4_n3
+end
+
+def fun_l3_n148()
+ fun_l4_n328
+end
+
+def fun_l3_n149()
+ fun_l4_n978
+end
+
+def fun_l3_n150()
+ fun_l4_n474
+end
+
+def fun_l3_n151()
+ fun_l4_n985
+end
+
+def fun_l3_n152()
+ fun_l4_n809
+end
+
+def fun_l3_n153()
+ fun_l4_n379
+end
+
+def fun_l3_n154()
+ fun_l4_n589
+end
+
+def fun_l3_n155()
+ fun_l4_n625
+end
+
+def fun_l3_n156()
+ fun_l4_n937
+end
+
+def fun_l3_n157()
+ fun_l4_n774
+end
+
+def fun_l3_n158()
+ fun_l4_n465
+end
+
+def fun_l3_n159()
+ fun_l4_n315
+end
+
+def fun_l3_n160()
+ fun_l4_n733
+end
+
+def fun_l3_n161()
+ fun_l4_n572
+end
+
+def fun_l3_n162()
+ fun_l4_n794
+end
+
+def fun_l3_n163()
+ fun_l4_n76
+end
+
+def fun_l3_n164()
+ fun_l4_n550
+end
+
+def fun_l3_n165()
+ fun_l4_n913
+end
+
+def fun_l3_n166()
+ fun_l4_n553
+end
+
+def fun_l3_n167()
+ fun_l4_n383
+end
+
+def fun_l3_n168()
+ fun_l4_n118
+end
+
+def fun_l3_n169()
+ fun_l4_n561
+end
+
+def fun_l3_n170()
+ fun_l4_n517
+end
+
+def fun_l3_n171()
+ fun_l4_n680
+end
+
+def fun_l3_n172()
+ fun_l4_n466
+end
+
+def fun_l3_n173()
+ fun_l4_n629
+end
+
+def fun_l3_n174()
+ fun_l4_n469
+end
+
+def fun_l3_n175()
+ fun_l4_n731
+end
+
+def fun_l3_n176()
+ fun_l4_n579
+end
+
+def fun_l3_n177()
+ fun_l4_n574
+end
+
+def fun_l3_n178()
+ fun_l4_n936
+end
+
+def fun_l3_n179()
+ fun_l4_n405
+end
+
+def fun_l3_n180()
+ fun_l4_n667
+end
+
+def fun_l3_n181()
+ fun_l4_n369
+end
+
+def fun_l3_n182()
+ fun_l4_n852
+end
+
+def fun_l3_n183()
+ fun_l4_n861
+end
+
+def fun_l3_n184()
+ fun_l4_n425
+end
+
+def fun_l3_n185()
+ fun_l4_n4
+end
+
+def fun_l3_n186()
+ fun_l4_n28
+end
+
+def fun_l3_n187()
+ fun_l4_n470
+end
+
+def fun_l3_n188()
+ fun_l4_n568
+end
+
+def fun_l3_n189()
+ fun_l4_n83
+end
+
+def fun_l3_n190()
+ fun_l4_n981
+end
+
+def fun_l3_n191()
+ fun_l4_n526
+end
+
+def fun_l3_n192()
+ fun_l4_n496
+end
+
+def fun_l3_n193()
+ fun_l4_n954
+end
+
+def fun_l3_n194()
+ fun_l4_n340
+end
+
+def fun_l3_n195()
+ fun_l4_n343
+end
+
+def fun_l3_n196()
+ fun_l4_n964
+end
+
+def fun_l3_n197()
+ fun_l4_n58
+end
+
+def fun_l3_n198()
+ fun_l4_n317
+end
+
+def fun_l3_n199()
+ fun_l4_n255
+end
+
+def fun_l3_n200()
+ fun_l4_n546
+end
+
+def fun_l3_n201()
+ fun_l4_n933
+end
+
+def fun_l3_n202()
+ fun_l4_n387
+end
+
+def fun_l3_n203()
+ fun_l4_n32
+end
+
+def fun_l3_n204()
+ fun_l4_n514
+end
+
+def fun_l3_n205()
+ fun_l4_n175
+end
+
+def fun_l3_n206()
+ fun_l4_n813
+end
+
+def fun_l3_n207()
+ fun_l4_n881
+end
+
+def fun_l3_n208()
+ fun_l4_n52
+end
+
+def fun_l3_n209()
+ fun_l4_n839
+end
+
+def fun_l3_n210()
+ fun_l4_n919
+end
+
+def fun_l3_n211()
+ fun_l4_n208
+end
+
+def fun_l3_n212()
+ fun_l4_n111
+end
+
+def fun_l3_n213()
+ fun_l4_n878
+end
+
+def fun_l3_n214()
+ fun_l4_n110
+end
+
+def fun_l3_n215()
+ fun_l4_n701
+end
+
+def fun_l3_n216()
+ fun_l4_n769
+end
+
+def fun_l3_n217()
+ fun_l4_n487
+end
+
+def fun_l3_n218()
+ fun_l4_n940
+end
+
+def fun_l3_n219()
+ fun_l4_n427
+end
+
+def fun_l3_n220()
+ fun_l4_n731
+end
+
+def fun_l3_n221()
+ fun_l4_n92
+end
+
+def fun_l3_n222()
+ fun_l4_n246
+end
+
+def fun_l3_n223()
+ fun_l4_n574
+end
+
+def fun_l3_n224()
+ fun_l4_n297
+end
+
+def fun_l3_n225()
+ fun_l4_n48
+end
+
+def fun_l3_n226()
+ fun_l4_n433
+end
+
+def fun_l3_n227()
+ fun_l4_n628
+end
+
+def fun_l3_n228()
+ fun_l4_n426
+end
+
+def fun_l3_n229()
+ fun_l4_n22
+end
+
+def fun_l3_n230()
+ fun_l4_n878
+end
+
+def fun_l3_n231()
+ fun_l4_n905
+end
+
+def fun_l3_n232()
+ fun_l4_n222
+end
+
+def fun_l3_n233()
+ fun_l4_n523
+end
+
+def fun_l3_n234()
+ fun_l4_n9
+end
+
+def fun_l3_n235()
+ fun_l4_n705
+end
+
+def fun_l3_n236()
+ fun_l4_n811
+end
+
+def fun_l3_n237()
+ fun_l4_n987
+end
+
+def fun_l3_n238()
+ fun_l4_n915
+end
+
+def fun_l3_n239()
+ fun_l4_n302
+end
+
+def fun_l3_n240()
+ fun_l4_n766
+end
+
+def fun_l3_n241()
+ fun_l4_n29
+end
+
+def fun_l3_n242()
+ fun_l4_n154
+end
+
+def fun_l3_n243()
+ fun_l4_n853
+end
+
+def fun_l3_n244()
+ fun_l4_n619
+end
+
+def fun_l3_n245()
+ fun_l4_n739
+end
+
+def fun_l3_n246()
+ fun_l4_n814
+end
+
+def fun_l3_n247()
+ fun_l4_n768
+end
+
+def fun_l3_n248()
+ fun_l4_n2
+end
+
+def fun_l3_n249()
+ fun_l4_n595
+end
+
+def fun_l3_n250()
+ fun_l4_n606
+end
+
+def fun_l3_n251()
+ fun_l4_n144
+end
+
+def fun_l3_n252()
+ fun_l4_n550
+end
+
+def fun_l3_n253()
+ fun_l4_n268
+end
+
+def fun_l3_n254()
+ fun_l4_n320
+end
+
+def fun_l3_n255()
+ fun_l4_n59
+end
+
+def fun_l3_n256()
+ fun_l4_n586
+end
+
+def fun_l3_n257()
+ fun_l4_n766
+end
+
+def fun_l3_n258()
+ fun_l4_n96
+end
+
+def fun_l3_n259()
+ fun_l4_n964
+end
+
+def fun_l3_n260()
+ fun_l4_n163
+end
+
+def fun_l3_n261()
+ fun_l4_n305
+end
+
+def fun_l3_n262()
+ fun_l4_n155
+end
+
+def fun_l3_n263()
+ fun_l4_n249
+end
+
+def fun_l3_n264()
+ fun_l4_n887
+end
+
+def fun_l3_n265()
+ fun_l4_n625
+end
+
+def fun_l3_n266()
+ fun_l4_n241
+end
+
+def fun_l3_n267()
+ fun_l4_n385
+end
+
+def fun_l3_n268()
+ fun_l4_n287
+end
+
+def fun_l3_n269()
+ fun_l4_n375
+end
+
+def fun_l3_n270()
+ fun_l4_n13
+end
+
+def fun_l3_n271()
+ fun_l4_n44
+end
+
+def fun_l3_n272()
+ fun_l4_n259
+end
+
+def fun_l3_n273()
+ fun_l4_n231
+end
+
+def fun_l3_n274()
+ fun_l4_n692
+end
+
+def fun_l3_n275()
+ fun_l4_n279
+end
+
+def fun_l3_n276()
+ fun_l4_n353
+end
+
+def fun_l3_n277()
+ fun_l4_n287
+end
+
+def fun_l3_n278()
+ fun_l4_n254
+end
+
+def fun_l3_n279()
+ fun_l4_n717
+end
+
+def fun_l3_n280()
+ fun_l4_n635
+end
+
+def fun_l3_n281()
+ fun_l4_n264
+end
+
+def fun_l3_n282()
+ fun_l4_n390
+end
+
+def fun_l3_n283()
+ fun_l4_n824
+end
+
+def fun_l3_n284()
+ fun_l4_n919
+end
+
+def fun_l3_n285()
+ fun_l4_n273
+end
+
+def fun_l3_n286()
+ fun_l4_n566
+end
+
+def fun_l3_n287()
+ fun_l4_n6
+end
+
+def fun_l3_n288()
+ fun_l4_n28
+end
+
+def fun_l3_n289()
+ fun_l4_n602
+end
+
+def fun_l3_n290()
+ fun_l4_n209
+end
+
+def fun_l3_n291()
+ fun_l4_n753
+end
+
+def fun_l3_n292()
+ fun_l4_n914
+end
+
+def fun_l3_n293()
+ fun_l4_n345
+end
+
+def fun_l3_n294()
+ fun_l4_n616
+end
+
+def fun_l3_n295()
+ fun_l4_n640
+end
+
+def fun_l3_n296()
+ fun_l4_n47
+end
+
+def fun_l3_n297()
+ fun_l4_n542
+end
+
+def fun_l3_n298()
+ fun_l4_n379
+end
+
+def fun_l3_n299()
+ fun_l4_n14
+end
+
+def fun_l3_n300()
+ fun_l4_n126
+end
+
+def fun_l3_n301()
+ fun_l4_n913
+end
+
+def fun_l3_n302()
+ fun_l4_n933
+end
+
+def fun_l3_n303()
+ fun_l4_n429
+end
+
+def fun_l3_n304()
+ fun_l4_n175
+end
+
+def fun_l3_n305()
+ fun_l4_n152
+end
+
+def fun_l3_n306()
+ fun_l4_n556
+end
+
+def fun_l3_n307()
+ fun_l4_n799
+end
+
+def fun_l3_n308()
+ fun_l4_n865
+end
+
+def fun_l3_n309()
+ fun_l4_n501
+end
+
+def fun_l3_n310()
+ fun_l4_n148
+end
+
+def fun_l3_n311()
+ fun_l4_n160
+end
+
+def fun_l3_n312()
+ fun_l4_n333
+end
+
+def fun_l3_n313()
+ fun_l4_n987
+end
+
+def fun_l3_n314()
+ fun_l4_n449
+end
+
+def fun_l3_n315()
+ fun_l4_n460
+end
+
+def fun_l3_n316()
+ fun_l4_n866
+end
+
+def fun_l3_n317()
+ fun_l4_n554
+end
+
+def fun_l3_n318()
+ fun_l4_n497
+end
+
+def fun_l3_n319()
+ fun_l4_n25
+end
+
+def fun_l3_n320()
+ fun_l4_n483
+end
+
+def fun_l3_n321()
+ fun_l4_n412
+end
+
+def fun_l3_n322()
+ fun_l4_n594
+end
+
+def fun_l3_n323()
+ fun_l4_n727
+end
+
+def fun_l3_n324()
+ fun_l4_n209
+end
+
+def fun_l3_n325()
+ fun_l4_n956
+end
+
+def fun_l3_n326()
+ fun_l4_n127
+end
+
+def fun_l3_n327()
+ fun_l4_n942
+end
+
+def fun_l3_n328()
+ fun_l4_n984
+end
+
+def fun_l3_n329()
+ fun_l4_n387
+end
+
+def fun_l3_n330()
+ fun_l4_n834
+end
+
+def fun_l3_n331()
+ fun_l4_n723
+end
+
+def fun_l3_n332()
+ fun_l4_n576
+end
+
+def fun_l3_n333()
+ fun_l4_n949
+end
+
+def fun_l3_n334()
+ fun_l4_n792
+end
+
+def fun_l3_n335()
+ fun_l4_n28
+end
+
+def fun_l3_n336()
+ fun_l4_n805
+end
+
+def fun_l3_n337()
+ fun_l4_n469
+end
+
+def fun_l3_n338()
+ fun_l4_n651
+end
+
+def fun_l3_n339()
+ fun_l4_n672
+end
+
+def fun_l3_n340()
+ fun_l4_n835
+end
+
+def fun_l3_n341()
+ fun_l4_n902
+end
+
+def fun_l3_n342()
+ fun_l4_n9
+end
+
+def fun_l3_n343()
+ fun_l4_n111
+end
+
+def fun_l3_n344()
+ fun_l4_n234
+end
+
+def fun_l3_n345()
+ fun_l4_n608
+end
+
+def fun_l3_n346()
+ fun_l4_n577
+end
+
+def fun_l3_n347()
+ fun_l4_n966
+end
+
+def fun_l3_n348()
+ fun_l4_n777
+end
+
+def fun_l3_n349()
+ fun_l4_n387
+end
+
+def fun_l3_n350()
+ fun_l4_n27
+end
+
+def fun_l3_n351()
+ fun_l4_n94
+end
+
+def fun_l3_n352()
+ fun_l4_n12
+end
+
+def fun_l3_n353()
+ fun_l4_n632
+end
+
+def fun_l3_n354()
+ fun_l4_n314
+end
+
+def fun_l3_n355()
+ fun_l4_n472
+end
+
+def fun_l3_n356()
+ fun_l4_n737
+end
+
+def fun_l3_n357()
+ fun_l4_n775
+end
+
+def fun_l3_n358()
+ fun_l4_n255
+end
+
+def fun_l3_n359()
+ fun_l4_n474
+end
+
+def fun_l3_n360()
+ fun_l4_n668
+end
+
+def fun_l3_n361()
+ fun_l4_n907
+end
+
+def fun_l3_n362()
+ fun_l4_n608
+end
+
+def fun_l3_n363()
+ fun_l4_n885
+end
+
+def fun_l3_n364()
+ fun_l4_n63
+end
+
+def fun_l3_n365()
+ fun_l4_n432
+end
+
+def fun_l3_n366()
+ fun_l4_n748
+end
+
+def fun_l3_n367()
+ fun_l4_n741
+end
+
+def fun_l3_n368()
+ fun_l4_n799
+end
+
+def fun_l3_n369()
+ fun_l4_n747
+end
+
+def fun_l3_n370()
+ fun_l4_n939
+end
+
+def fun_l3_n371()
+ fun_l4_n569
+end
+
+def fun_l3_n372()
+ fun_l4_n267
+end
+
+def fun_l3_n373()
+ fun_l4_n640
+end
+
+def fun_l3_n374()
+ fun_l4_n647
+end
+
+def fun_l3_n375()
+ fun_l4_n658
+end
+
+def fun_l3_n376()
+ fun_l4_n346
+end
+
+def fun_l3_n377()
+ fun_l4_n781
+end
+
+def fun_l3_n378()
+ fun_l4_n820
+end
+
+def fun_l3_n379()
+ fun_l4_n11
+end
+
+def fun_l3_n380()
+ fun_l4_n238
+end
+
+def fun_l3_n381()
+ fun_l4_n78
+end
+
+def fun_l3_n382()
+ fun_l4_n497
+end
+
+def fun_l3_n383()
+ fun_l4_n815
+end
+
+def fun_l3_n384()
+ fun_l4_n876
+end
+
+def fun_l3_n385()
+ fun_l4_n392
+end
+
+def fun_l3_n386()
+ fun_l4_n228
+end
+
+def fun_l3_n387()
+ fun_l4_n230
+end
+
+def fun_l3_n388()
+ fun_l4_n216
+end
+
+def fun_l3_n389()
+ fun_l4_n661
+end
+
+def fun_l3_n390()
+ fun_l4_n831
+end
+
+def fun_l3_n391()
+ fun_l4_n588
+end
+
+def fun_l3_n392()
+ fun_l4_n377
+end
+
+def fun_l3_n393()
+ fun_l4_n245
+end
+
+def fun_l3_n394()
+ fun_l4_n546
+end
+
+def fun_l3_n395()
+ fun_l4_n48
+end
+
+def fun_l3_n396()
+ fun_l4_n109
+end
+
+def fun_l3_n397()
+ fun_l4_n958
+end
+
+def fun_l3_n398()
+ fun_l4_n779
+end
+
+def fun_l3_n399()
+ fun_l4_n942
+end
+
+def fun_l3_n400()
+ fun_l4_n436
+end
+
+def fun_l3_n401()
+ fun_l4_n321
+end
+
+def fun_l3_n402()
+ fun_l4_n789
+end
+
+def fun_l3_n403()
+ fun_l4_n96
+end
+
+def fun_l3_n404()
+ fun_l4_n101
+end
+
+def fun_l3_n405()
+ fun_l4_n373
+end
+
+def fun_l3_n406()
+ fun_l4_n143
+end
+
+def fun_l3_n407()
+ fun_l4_n869
+end
+
+def fun_l3_n408()
+ fun_l4_n836
+end
+
+def fun_l3_n409()
+ fun_l4_n278
+end
+
+def fun_l3_n410()
+ fun_l4_n819
+end
+
+def fun_l3_n411()
+ fun_l4_n716
+end
+
+def fun_l3_n412()
+ fun_l4_n729
+end
+
+def fun_l3_n413()
+ fun_l4_n565
+end
+
+def fun_l3_n414()
+ fun_l4_n258
+end
+
+def fun_l3_n415()
+ fun_l4_n187
+end
+
+def fun_l3_n416()
+ fun_l4_n425
+end
+
+def fun_l3_n417()
+ fun_l4_n239
+end
+
+def fun_l3_n418()
+ fun_l4_n352
+end
+
+def fun_l3_n419()
+ fun_l4_n747
+end
+
+def fun_l3_n420()
+ fun_l4_n103
+end
+
+def fun_l3_n421()
+ fun_l4_n276
+end
+
+def fun_l3_n422()
+ fun_l4_n348
+end
+
+def fun_l3_n423()
+ fun_l4_n737
+end
+
+def fun_l3_n424()
+ fun_l4_n615
+end
+
+def fun_l3_n425()
+ fun_l4_n305
+end
+
+def fun_l3_n426()
+ fun_l4_n474
+end
+
+def fun_l3_n427()
+ fun_l4_n304
+end
+
+def fun_l3_n428()
+ fun_l4_n607
+end
+
+def fun_l3_n429()
+ fun_l4_n202
+end
+
+def fun_l3_n430()
+ fun_l4_n370
+end
+
+def fun_l3_n431()
+ fun_l4_n580
+end
+
+def fun_l3_n432()
+ fun_l4_n752
+end
+
+def fun_l3_n433()
+ fun_l4_n720
+end
+
+def fun_l3_n434()
+ fun_l4_n916
+end
+
+def fun_l3_n435()
+ fun_l4_n424
+end
+
+def fun_l3_n436()
+ fun_l4_n922
+end
+
+def fun_l3_n437()
+ fun_l4_n885
+end
+
+def fun_l3_n438()
+ fun_l4_n849
+end
+
+def fun_l3_n439()
+ fun_l4_n595
+end
+
+def fun_l3_n440()
+ fun_l4_n753
+end
+
+def fun_l3_n441()
+ fun_l4_n871
+end
+
+def fun_l3_n442()
+ fun_l4_n979
+end
+
+def fun_l3_n443()
+ fun_l4_n217
+end
+
+def fun_l3_n444()
+ fun_l4_n249
+end
+
+def fun_l3_n445()
+ fun_l4_n181
+end
+
+def fun_l3_n446()
+ fun_l4_n283
+end
+
+def fun_l3_n447()
+ fun_l4_n495
+end
+
+def fun_l3_n448()
+ fun_l4_n701
+end
+
+def fun_l3_n449()
+ fun_l4_n897
+end
+
+def fun_l3_n450()
+ fun_l4_n479
+end
+
+def fun_l3_n451()
+ fun_l4_n410
+end
+
+def fun_l3_n452()
+ fun_l4_n842
+end
+
+def fun_l3_n453()
+ fun_l4_n700
+end
+
+def fun_l3_n454()
+ fun_l4_n855
+end
+
+def fun_l3_n455()
+ fun_l4_n743
+end
+
+def fun_l3_n456()
+ fun_l4_n842
+end
+
+def fun_l3_n457()
+ fun_l4_n575
+end
+
+def fun_l3_n458()
+ fun_l4_n48
+end
+
+def fun_l3_n459()
+ fun_l4_n650
+end
+
+def fun_l3_n460()
+ fun_l4_n714
+end
+
+def fun_l3_n461()
+ fun_l4_n409
+end
+
+def fun_l3_n462()
+ fun_l4_n225
+end
+
+def fun_l3_n463()
+ fun_l4_n419
+end
+
+def fun_l3_n464()
+ fun_l4_n563
+end
+
+def fun_l3_n465()
+ fun_l4_n416
+end
+
+def fun_l3_n466()
+ fun_l4_n738
+end
+
+def fun_l3_n467()
+ fun_l4_n955
+end
+
+def fun_l3_n468()
+ fun_l4_n406
+end
+
+def fun_l3_n469()
+ fun_l4_n157
+end
+
+def fun_l3_n470()
+ fun_l4_n732
+end
+
+def fun_l3_n471()
+ fun_l4_n567
+end
+
+def fun_l3_n472()
+ fun_l4_n895
+end
+
+def fun_l3_n473()
+ fun_l4_n377
+end
+
+def fun_l3_n474()
+ fun_l4_n105
+end
+
+def fun_l3_n475()
+ fun_l4_n640
+end
+
+def fun_l3_n476()
+ fun_l4_n617
+end
+
+def fun_l3_n477()
+ fun_l4_n109
+end
+
+def fun_l3_n478()
+ fun_l4_n358
+end
+
+def fun_l3_n479()
+ fun_l4_n522
+end
+
+def fun_l3_n480()
+ fun_l4_n550
+end
+
+def fun_l3_n481()
+ fun_l4_n648
+end
+
+def fun_l3_n482()
+ fun_l4_n533
+end
+
+def fun_l3_n483()
+ fun_l4_n782
+end
+
+def fun_l3_n484()
+ fun_l4_n369
+end
+
+def fun_l3_n485()
+ fun_l4_n644
+end
+
+def fun_l3_n486()
+ fun_l4_n989
+end
+
+def fun_l3_n487()
+ fun_l4_n434
+end
+
+def fun_l3_n488()
+ fun_l4_n914
+end
+
+def fun_l3_n489()
+ fun_l4_n2
+end
+
+def fun_l3_n490()
+ fun_l4_n494
+end
+
+def fun_l3_n491()
+ fun_l4_n479
+end
+
+def fun_l3_n492()
+ fun_l4_n733
+end
+
+def fun_l3_n493()
+ fun_l4_n394
+end
+
+def fun_l3_n494()
+ fun_l4_n39
+end
+
+def fun_l3_n495()
+ fun_l4_n866
+end
+
+def fun_l3_n496()
+ fun_l4_n151
+end
+
+def fun_l3_n497()
+ fun_l4_n155
+end
+
+def fun_l3_n498()
+ fun_l4_n417
+end
+
+def fun_l3_n499()
+ fun_l4_n933
+end
+
+def fun_l3_n500()
+ fun_l4_n44
+end
+
+def fun_l3_n501()
+ fun_l4_n738
+end
+
+def fun_l3_n502()
+ fun_l4_n859
+end
+
+def fun_l3_n503()
+ fun_l4_n124
+end
+
+def fun_l3_n504()
+ fun_l4_n344
+end
+
+def fun_l3_n505()
+ fun_l4_n921
+end
+
+def fun_l3_n506()
+ fun_l4_n168
+end
+
+def fun_l3_n507()
+ fun_l4_n135
+end
+
+def fun_l3_n508()
+ fun_l4_n730
+end
+
+def fun_l3_n509()
+ fun_l4_n671
+end
+
+def fun_l3_n510()
+ fun_l4_n899
+end
+
+def fun_l3_n511()
+ fun_l4_n630
+end
+
+def fun_l3_n512()
+ fun_l4_n228
+end
+
+def fun_l3_n513()
+ fun_l4_n429
+end
+
+def fun_l3_n514()
+ fun_l4_n723
+end
+
+def fun_l3_n515()
+ fun_l4_n185
+end
+
+def fun_l3_n516()
+ fun_l4_n161
+end
+
+def fun_l3_n517()
+ fun_l4_n491
+end
+
+def fun_l3_n518()
+ fun_l4_n643
+end
+
+def fun_l3_n519()
+ fun_l4_n3
+end
+
+def fun_l3_n520()
+ fun_l4_n399
+end
+
+def fun_l3_n521()
+ fun_l4_n927
+end
+
+def fun_l3_n522()
+ fun_l4_n501
+end
+
+def fun_l3_n523()
+ fun_l4_n729
+end
+
+def fun_l3_n524()
+ fun_l4_n628
+end
+
+def fun_l3_n525()
+ fun_l4_n469
+end
+
+def fun_l3_n526()
+ fun_l4_n754
+end
+
+def fun_l3_n527()
+ fun_l4_n448
+end
+
+def fun_l3_n528()
+ fun_l4_n562
+end
+
+def fun_l3_n529()
+ fun_l4_n779
+end
+
+def fun_l3_n530()
+ fun_l4_n452
+end
+
+def fun_l3_n531()
+ fun_l4_n756
+end
+
+def fun_l3_n532()
+ fun_l4_n107
+end
+
+def fun_l3_n533()
+ fun_l4_n311
+end
+
+def fun_l3_n534()
+ fun_l4_n169
+end
+
+def fun_l3_n535()
+ fun_l4_n956
+end
+
+def fun_l3_n536()
+ fun_l4_n754
+end
+
+def fun_l3_n537()
+ fun_l4_n675
+end
+
+def fun_l3_n538()
+ fun_l4_n636
+end
+
+def fun_l3_n539()
+ fun_l4_n691
+end
+
+def fun_l3_n540()
+ fun_l4_n867
+end
+
+def fun_l3_n541()
+ fun_l4_n179
+end
+
+def fun_l3_n542()
+ fun_l4_n153
+end
+
+def fun_l3_n543()
+ fun_l4_n133
+end
+
+def fun_l3_n544()
+ fun_l4_n592
+end
+
+def fun_l3_n545()
+ fun_l4_n71
+end
+
+def fun_l3_n546()
+ fun_l4_n87
+end
+
+def fun_l3_n547()
+ fun_l4_n740
+end
+
+def fun_l3_n548()
+ fun_l4_n436
+end
+
+def fun_l3_n549()
+ fun_l4_n59
+end
+
+def fun_l3_n550()
+ fun_l4_n252
+end
+
+def fun_l3_n551()
+ fun_l4_n596
+end
+
+def fun_l3_n552()
+ fun_l4_n851
+end
+
+def fun_l3_n553()
+ fun_l4_n708
+end
+
+def fun_l3_n554()
+ fun_l4_n210
+end
+
+def fun_l3_n555()
+ fun_l4_n931
+end
+
+def fun_l3_n556()
+ fun_l4_n293
+end
+
+def fun_l3_n557()
+ fun_l4_n413
+end
+
+def fun_l3_n558()
+ fun_l4_n547
+end
+
+def fun_l3_n559()
+ fun_l4_n338
+end
+
+def fun_l3_n560()
+ fun_l4_n194
+end
+
+def fun_l3_n561()
+ fun_l4_n937
+end
+
+def fun_l3_n562()
+ fun_l4_n19
+end
+
+def fun_l3_n563()
+ fun_l4_n651
+end
+
+def fun_l3_n564()
+ fun_l4_n364
+end
+
+def fun_l3_n565()
+ fun_l4_n295
+end
+
+def fun_l3_n566()
+ fun_l4_n946
+end
+
+def fun_l3_n567()
+ fun_l4_n712
+end
+
+def fun_l3_n568()
+ fun_l4_n243
+end
+
+def fun_l3_n569()
+ fun_l4_n563
+end
+
+def fun_l3_n570()
+ fun_l4_n651
+end
+
+def fun_l3_n571()
+ fun_l4_n645
+end
+
+def fun_l3_n572()
+ fun_l4_n46
+end
+
+def fun_l3_n573()
+ fun_l4_n971
+end
+
+def fun_l3_n574()
+ fun_l4_n769
+end
+
+def fun_l3_n575()
+ fun_l4_n315
+end
+
+def fun_l3_n576()
+ fun_l4_n657
+end
+
+def fun_l3_n577()
+ fun_l4_n607
+end
+
+def fun_l3_n578()
+ fun_l4_n352
+end
+
+def fun_l3_n579()
+ fun_l4_n346
+end
+
+def fun_l3_n580()
+ fun_l4_n424
+end
+
+def fun_l3_n581()
+ fun_l4_n703
+end
+
+def fun_l3_n582()
+ fun_l4_n872
+end
+
+def fun_l3_n583()
+ fun_l4_n828
+end
+
+def fun_l3_n584()
+ fun_l4_n283
+end
+
+def fun_l3_n585()
+ fun_l4_n557
+end
+
+def fun_l3_n586()
+ fun_l4_n942
+end
+
+def fun_l3_n587()
+ fun_l4_n121
+end
+
+def fun_l3_n588()
+ fun_l4_n866
+end
+
+def fun_l3_n589()
+ fun_l4_n539
+end
+
+def fun_l3_n590()
+ fun_l4_n240
+end
+
+def fun_l3_n591()
+ fun_l4_n438
+end
+
+def fun_l3_n592()
+ fun_l4_n652
+end
+
+def fun_l3_n593()
+ fun_l4_n540
+end
+
+def fun_l3_n594()
+ fun_l4_n122
+end
+
+def fun_l3_n595()
+ fun_l4_n877
+end
+
+def fun_l3_n596()
+ fun_l4_n30
+end
+
+def fun_l3_n597()
+ fun_l4_n465
+end
+
+def fun_l3_n598()
+ fun_l4_n964
+end
+
+def fun_l3_n599()
+ fun_l4_n123
+end
+
+def fun_l3_n600()
+ fun_l4_n365
+end
+
+def fun_l3_n601()
+ fun_l4_n531
+end
+
+def fun_l3_n602()
+ fun_l4_n774
+end
+
+def fun_l3_n603()
+ fun_l4_n961
+end
+
+def fun_l3_n604()
+ fun_l4_n360
+end
+
+def fun_l3_n605()
+ fun_l4_n640
+end
+
+def fun_l3_n606()
+ fun_l4_n785
+end
+
+def fun_l3_n607()
+ fun_l4_n433
+end
+
+def fun_l3_n608()
+ fun_l4_n528
+end
+
+def fun_l3_n609()
+ fun_l4_n125
+end
+
+def fun_l3_n610()
+ fun_l4_n179
+end
+
+def fun_l3_n611()
+ fun_l4_n946
+end
+
+def fun_l3_n612()
+ fun_l4_n899
+end
+
+def fun_l3_n613()
+ fun_l4_n917
+end
+
+def fun_l3_n614()
+ fun_l4_n444
+end
+
+def fun_l3_n615()
+ fun_l4_n823
+end
+
+def fun_l3_n616()
+ fun_l4_n221
+end
+
+def fun_l3_n617()
+ fun_l4_n483
+end
+
+def fun_l3_n618()
+ fun_l4_n112
+end
+
+def fun_l3_n619()
+ fun_l4_n814
+end
+
+def fun_l3_n620()
+ fun_l4_n648
+end
+
+def fun_l3_n621()
+ fun_l4_n823
+end
+
+def fun_l3_n622()
+ fun_l4_n457
+end
+
+def fun_l3_n623()
+ fun_l4_n92
+end
+
+def fun_l3_n624()
+ fun_l4_n8
+end
+
+def fun_l3_n625()
+ fun_l4_n297
+end
+
+def fun_l3_n626()
+ fun_l4_n517
+end
+
+def fun_l3_n627()
+ fun_l4_n159
+end
+
+def fun_l3_n628()
+ fun_l4_n79
+end
+
+def fun_l3_n629()
+ fun_l4_n791
+end
+
+def fun_l3_n630()
+ fun_l4_n692
+end
+
+def fun_l3_n631()
+ fun_l4_n554
+end
+
+def fun_l3_n632()
+ fun_l4_n872
+end
+
+def fun_l3_n633()
+ fun_l4_n871
+end
+
+def fun_l3_n634()
+ fun_l4_n524
+end
+
+def fun_l3_n635()
+ fun_l4_n588
+end
+
+def fun_l3_n636()
+ fun_l4_n596
+end
+
+def fun_l3_n637()
+ fun_l4_n936
+end
+
+def fun_l3_n638()
+ fun_l4_n478
+end
+
+def fun_l3_n639()
+ fun_l4_n893
+end
+
+def fun_l3_n640()
+ fun_l4_n348
+end
+
+def fun_l3_n641()
+ fun_l4_n806
+end
+
+def fun_l3_n642()
+ fun_l4_n522
+end
+
+def fun_l3_n643()
+ fun_l4_n249
+end
+
+def fun_l3_n644()
+ fun_l4_n208
+end
+
+def fun_l3_n645()
+ fun_l4_n989
+end
+
+def fun_l3_n646()
+ fun_l4_n194
+end
+
+def fun_l3_n647()
+ fun_l4_n157
+end
+
+def fun_l3_n648()
+ fun_l4_n395
+end
+
+def fun_l3_n649()
+ fun_l4_n191
+end
+
+def fun_l3_n650()
+ fun_l4_n292
+end
+
+def fun_l3_n651()
+ fun_l4_n640
+end
+
+def fun_l3_n652()
+ fun_l4_n818
+end
+
+def fun_l3_n653()
+ fun_l4_n481
+end
+
+def fun_l3_n654()
+ fun_l4_n304
+end
+
+def fun_l3_n655()
+ fun_l4_n102
+end
+
+def fun_l3_n656()
+ fun_l4_n51
+end
+
+def fun_l3_n657()
+ fun_l4_n110
+end
+
+def fun_l3_n658()
+ fun_l4_n226
+end
+
+def fun_l3_n659()
+ fun_l4_n48
+end
+
+def fun_l3_n660()
+ fun_l4_n112
+end
+
+def fun_l3_n661()
+ fun_l4_n677
+end
+
+def fun_l3_n662()
+ fun_l4_n168
+end
+
+def fun_l3_n663()
+ fun_l4_n15
+end
+
+def fun_l3_n664()
+ fun_l4_n311
+end
+
+def fun_l3_n665()
+ fun_l4_n935
+end
+
+def fun_l3_n666()
+ fun_l4_n861
+end
+
+def fun_l3_n667()
+ fun_l4_n169
+end
+
+def fun_l3_n668()
+ fun_l4_n395
+end
+
+def fun_l3_n669()
+ fun_l4_n371
+end
+
+def fun_l3_n670()
+ fun_l4_n625
+end
+
+def fun_l3_n671()
+ fun_l4_n183
+end
+
+def fun_l3_n672()
+ fun_l4_n299
+end
+
+def fun_l3_n673()
+ fun_l4_n104
+end
+
+def fun_l3_n674()
+ fun_l4_n413
+end
+
+def fun_l3_n675()
+ fun_l4_n957
+end
+
+def fun_l3_n676()
+ fun_l4_n878
+end
+
+def fun_l3_n677()
+ fun_l4_n222
+end
+
+def fun_l3_n678()
+ fun_l4_n832
+end
+
+def fun_l3_n679()
+ fun_l4_n406
+end
+
+def fun_l3_n680()
+ fun_l4_n779
+end
+
+def fun_l3_n681()
+ fun_l4_n874
+end
+
+def fun_l3_n682()
+ fun_l4_n328
+end
+
+def fun_l3_n683()
+ fun_l4_n412
+end
+
+def fun_l3_n684()
+ fun_l4_n46
+end
+
+def fun_l3_n685()
+ fun_l4_n799
+end
+
+def fun_l3_n686()
+ fun_l4_n751
+end
+
+def fun_l3_n687()
+ fun_l4_n32
+end
+
+def fun_l3_n688()
+ fun_l4_n237
+end
+
+def fun_l3_n689()
+ fun_l4_n770
+end
+
+def fun_l3_n690()
+ fun_l4_n120
+end
+
+def fun_l3_n691()
+ fun_l4_n977
+end
+
+def fun_l3_n692()
+ fun_l4_n35
+end
+
+def fun_l3_n693()
+ fun_l4_n398
+end
+
+def fun_l3_n694()
+ fun_l4_n551
+end
+
+def fun_l3_n695()
+ fun_l4_n122
+end
+
+def fun_l3_n696()
+ fun_l4_n268
+end
+
+def fun_l3_n697()
+ fun_l4_n628
+end
+
+def fun_l3_n698()
+ fun_l4_n611
+end
+
+def fun_l3_n699()
+ fun_l4_n382
+end
+
+def fun_l3_n700()
+ fun_l4_n819
+end
+
+def fun_l3_n701()
+ fun_l4_n124
+end
+
+def fun_l3_n702()
+ fun_l4_n529
+end
+
+def fun_l3_n703()
+ fun_l4_n838
+end
+
+def fun_l3_n704()
+ fun_l4_n181
+end
+
+def fun_l3_n705()
+ fun_l4_n123
+end
+
+def fun_l3_n706()
+ fun_l4_n646
+end
+
+def fun_l3_n707()
+ fun_l4_n193
+end
+
+def fun_l3_n708()
+ fun_l4_n233
+end
+
+def fun_l3_n709()
+ fun_l4_n621
+end
+
+def fun_l3_n710()
+ fun_l4_n772
+end
+
+def fun_l3_n711()
+ fun_l4_n461
+end
+
+def fun_l3_n712()
+ fun_l4_n673
+end
+
+def fun_l3_n713()
+ fun_l4_n101
+end
+
+def fun_l3_n714()
+ fun_l4_n467
+end
+
+def fun_l3_n715()
+ fun_l4_n211
+end
+
+def fun_l3_n716()
+ fun_l4_n554
+end
+
+def fun_l3_n717()
+ fun_l4_n276
+end
+
+def fun_l3_n718()
+ fun_l4_n655
+end
+
+def fun_l3_n719()
+ fun_l4_n425
+end
+
+def fun_l3_n720()
+ fun_l4_n241
+end
+
+def fun_l3_n721()
+ fun_l4_n904
+end
+
+def fun_l3_n722()
+ fun_l4_n839
+end
+
+def fun_l3_n723()
+ fun_l4_n991
+end
+
+def fun_l3_n724()
+ fun_l4_n556
+end
+
+def fun_l3_n725()
+ fun_l4_n86
+end
+
+def fun_l3_n726()
+ fun_l4_n953
+end
+
+def fun_l3_n727()
+ fun_l4_n18
+end
+
+def fun_l3_n728()
+ fun_l4_n374
+end
+
+def fun_l3_n729()
+ fun_l4_n712
+end
+
+def fun_l3_n730()
+ fun_l4_n228
+end
+
+def fun_l3_n731()
+ fun_l4_n830
+end
+
+def fun_l3_n732()
+ fun_l4_n49
+end
+
+def fun_l3_n733()
+ fun_l4_n987
+end
+
+def fun_l3_n734()
+ fun_l4_n815
+end
+
+def fun_l3_n735()
+ fun_l4_n386
+end
+
+def fun_l3_n736()
+ fun_l4_n843
+end
+
+def fun_l3_n737()
+ fun_l4_n958
+end
+
+def fun_l3_n738()
+ fun_l4_n317
+end
+
+def fun_l3_n739()
+ fun_l4_n361
+end
+
+def fun_l3_n740()
+ fun_l4_n392
+end
+
+def fun_l3_n741()
+ fun_l4_n888
+end
+
+def fun_l3_n742()
+ fun_l4_n186
+end
+
+def fun_l3_n743()
+ fun_l4_n493
+end
+
+def fun_l3_n744()
+ fun_l4_n302
+end
+
+def fun_l3_n745()
+ fun_l4_n690
+end
+
+def fun_l3_n746()
+ fun_l4_n601
+end
+
+def fun_l3_n747()
+ fun_l4_n975
+end
+
+def fun_l3_n748()
+ fun_l4_n543
+end
+
+def fun_l3_n749()
+ fun_l4_n8
+end
+
+def fun_l3_n750()
+ fun_l4_n905
+end
+
+def fun_l3_n751()
+ fun_l4_n964
+end
+
+def fun_l3_n752()
+ fun_l4_n739
+end
+
+def fun_l3_n753()
+ fun_l4_n24
+end
+
+def fun_l3_n754()
+ fun_l4_n806
+end
+
+def fun_l3_n755()
+ fun_l4_n704
+end
+
+def fun_l3_n756()
+ fun_l4_n579
+end
+
+def fun_l3_n757()
+ fun_l4_n264
+end
+
+def fun_l3_n758()
+ fun_l4_n357
+end
+
+def fun_l3_n759()
+ fun_l4_n333
+end
+
+def fun_l3_n760()
+ fun_l4_n309
+end
+
+def fun_l3_n761()
+ fun_l4_n419
+end
+
+def fun_l3_n762()
+ fun_l4_n347
+end
+
+def fun_l3_n763()
+ fun_l4_n132
+end
+
+def fun_l3_n764()
+ fun_l4_n45
+end
+
+def fun_l3_n765()
+ fun_l4_n740
+end
+
+def fun_l3_n766()
+ fun_l4_n332
+end
+
+def fun_l3_n767()
+ fun_l4_n600
+end
+
+def fun_l3_n768()
+ fun_l4_n343
+end
+
+def fun_l3_n769()
+ fun_l4_n872
+end
+
+def fun_l3_n770()
+ fun_l4_n326
+end
+
+def fun_l3_n771()
+ fun_l4_n862
+end
+
+def fun_l3_n772()
+ fun_l4_n800
+end
+
+def fun_l3_n773()
+ fun_l4_n616
+end
+
+def fun_l3_n774()
+ fun_l4_n392
+end
+
+def fun_l3_n775()
+ fun_l4_n252
+end
+
+def fun_l3_n776()
+ fun_l4_n289
+end
+
+def fun_l3_n777()
+ fun_l4_n789
+end
+
+def fun_l3_n778()
+ fun_l4_n370
+end
+
+def fun_l3_n779()
+ fun_l4_n969
+end
+
+def fun_l3_n780()
+ fun_l4_n444
+end
+
+def fun_l3_n781()
+ fun_l4_n671
+end
+
+def fun_l3_n782()
+ fun_l4_n301
+end
+
+def fun_l3_n783()
+ fun_l4_n418
+end
+
+def fun_l3_n784()
+ fun_l4_n491
+end
+
+def fun_l3_n785()
+ fun_l4_n746
+end
+
+def fun_l3_n786()
+ fun_l4_n212
+end
+
+def fun_l3_n787()
+ fun_l4_n856
+end
+
+def fun_l3_n788()
+ fun_l4_n155
+end
+
+def fun_l3_n789()
+ fun_l4_n685
+end
+
+def fun_l3_n790()
+ fun_l4_n879
+end
+
+def fun_l3_n791()
+ fun_l4_n363
+end
+
+def fun_l3_n792()
+ fun_l4_n231
+end
+
+def fun_l3_n793()
+ fun_l4_n727
+end
+
+def fun_l3_n794()
+ fun_l4_n355
+end
+
+def fun_l3_n795()
+ fun_l4_n671
+end
+
+def fun_l3_n796()
+ fun_l4_n20
+end
+
+def fun_l3_n797()
+ fun_l4_n523
+end
+
+def fun_l3_n798()
+ fun_l4_n26
+end
+
+def fun_l3_n799()
+ fun_l4_n785
+end
+
+def fun_l3_n800()
+ fun_l4_n458
+end
+
+def fun_l3_n801()
+ fun_l4_n160
+end
+
+def fun_l3_n802()
+ fun_l4_n543
+end
+
+def fun_l3_n803()
+ fun_l4_n292
+end
+
+def fun_l3_n804()
+ fun_l4_n64
+end
+
+def fun_l3_n805()
+ fun_l4_n851
+end
+
+def fun_l3_n806()
+ fun_l4_n369
+end
+
+def fun_l3_n807()
+ fun_l4_n827
+end
+
+def fun_l3_n808()
+ fun_l4_n420
+end
+
+def fun_l3_n809()
+ fun_l4_n98
+end
+
+def fun_l3_n810()
+ fun_l4_n508
+end
+
+def fun_l3_n811()
+ fun_l4_n366
+end
+
+def fun_l3_n812()
+ fun_l4_n795
+end
+
+def fun_l3_n813()
+ fun_l4_n345
+end
+
+def fun_l3_n814()
+ fun_l4_n505
+end
+
+def fun_l3_n815()
+ fun_l4_n302
+end
+
+def fun_l3_n816()
+ fun_l4_n561
+end
+
+def fun_l3_n817()
+ fun_l4_n781
+end
+
+def fun_l3_n818()
+ fun_l4_n599
+end
+
+def fun_l3_n819()
+ fun_l4_n967
+end
+
+def fun_l3_n820()
+ fun_l4_n691
+end
+
+def fun_l3_n821()
+ fun_l4_n563
+end
+
+def fun_l3_n822()
+ fun_l4_n769
+end
+
+def fun_l3_n823()
+ fun_l4_n531
+end
+
+def fun_l3_n824()
+ fun_l4_n957
+end
+
+def fun_l3_n825()
+ fun_l4_n395
+end
+
+def fun_l3_n826()
+ fun_l4_n92
+end
+
+def fun_l3_n827()
+ fun_l4_n781
+end
+
+def fun_l3_n828()
+ fun_l4_n758
+end
+
+def fun_l3_n829()
+ fun_l4_n648
+end
+
+def fun_l3_n830()
+ fun_l4_n799
+end
+
+def fun_l3_n831()
+ fun_l4_n922
+end
+
+def fun_l3_n832()
+ fun_l4_n808
+end
+
+def fun_l3_n833()
+ fun_l4_n180
+end
+
+def fun_l3_n834()
+ fun_l4_n126
+end
+
+def fun_l3_n835()
+ fun_l4_n261
+end
+
+def fun_l3_n836()
+ fun_l4_n470
+end
+
+def fun_l3_n837()
+ fun_l4_n441
+end
+
+def fun_l3_n838()
+ fun_l4_n505
+end
+
+def fun_l3_n839()
+ fun_l4_n490
+end
+
+def fun_l3_n840()
+ fun_l4_n663
+end
+
+def fun_l3_n841()
+ fun_l4_n256
+end
+
+def fun_l3_n842()
+ fun_l4_n797
+end
+
+def fun_l3_n843()
+ fun_l4_n836
+end
+
+def fun_l3_n844()
+ fun_l4_n868
+end
+
+def fun_l3_n845()
+ fun_l4_n927
+end
+
+def fun_l3_n846()
+ fun_l4_n746
+end
+
+def fun_l3_n847()
+ fun_l4_n143
+end
+
+def fun_l3_n848()
+ fun_l4_n90
+end
+
+def fun_l3_n849()
+ fun_l4_n63
+end
+
+def fun_l3_n850()
+ fun_l4_n629
+end
+
+def fun_l3_n851()
+ fun_l4_n66
+end
+
+def fun_l3_n852()
+ fun_l4_n192
+end
+
+def fun_l3_n853()
+ fun_l4_n780
+end
+
+def fun_l3_n854()
+ fun_l4_n744
+end
+
+def fun_l3_n855()
+ fun_l4_n989
+end
+
+def fun_l3_n856()
+ fun_l4_n609
+end
+
+def fun_l3_n857()
+ fun_l4_n534
+end
+
+def fun_l3_n858()
+ fun_l4_n961
+end
+
+def fun_l3_n859()
+ fun_l4_n605
+end
+
+def fun_l3_n860()
+ fun_l4_n675
+end
+
+def fun_l3_n861()
+ fun_l4_n520
+end
+
+def fun_l3_n862()
+ fun_l4_n656
+end
+
+def fun_l3_n863()
+ fun_l4_n917
+end
+
+def fun_l3_n864()
+ fun_l4_n291
+end
+
+def fun_l3_n865()
+ fun_l4_n343
+end
+
+def fun_l3_n866()
+ fun_l4_n704
+end
+
+def fun_l3_n867()
+ fun_l4_n368
+end
+
+def fun_l3_n868()
+ fun_l4_n678
+end
+
+def fun_l3_n869()
+ fun_l4_n788
+end
+
+def fun_l3_n870()
+ fun_l4_n458
+end
+
+def fun_l3_n871()
+ fun_l4_n882
+end
+
+def fun_l3_n872()
+ fun_l4_n830
+end
+
+def fun_l3_n873()
+ fun_l4_n434
+end
+
+def fun_l3_n874()
+ fun_l4_n92
+end
+
+def fun_l3_n875()
+ fun_l4_n633
+end
+
+def fun_l3_n876()
+ fun_l4_n243
+end
+
+def fun_l3_n877()
+ fun_l4_n641
+end
+
+def fun_l3_n878()
+ fun_l4_n114
+end
+
+def fun_l3_n879()
+ fun_l4_n696
+end
+
+def fun_l3_n880()
+ fun_l4_n354
+end
+
+def fun_l3_n881()
+ fun_l4_n644
+end
+
+def fun_l3_n882()
+ fun_l4_n771
+end
+
+def fun_l3_n883()
+ fun_l4_n196
+end
+
+def fun_l3_n884()
+ fun_l4_n202
+end
+
+def fun_l3_n885()
+ fun_l4_n322
+end
+
+def fun_l3_n886()
+ fun_l4_n125
+end
+
+def fun_l3_n887()
+ fun_l4_n760
+end
+
+def fun_l3_n888()
+ fun_l4_n69
+end
+
+def fun_l3_n889()
+ fun_l4_n101
+end
+
+def fun_l3_n890()
+ fun_l4_n108
+end
+
+def fun_l3_n891()
+ fun_l4_n929
+end
+
+def fun_l3_n892()
+ fun_l4_n766
+end
+
+def fun_l3_n893()
+ fun_l4_n811
+end
+
+def fun_l3_n894()
+ fun_l4_n169
+end
+
+def fun_l3_n895()
+ fun_l4_n613
+end
+
+def fun_l3_n896()
+ fun_l4_n145
+end
+
+def fun_l3_n897()
+ fun_l4_n780
+end
+
+def fun_l3_n898()
+ fun_l4_n972
+end
+
+def fun_l3_n899()
+ fun_l4_n508
+end
+
+def fun_l3_n900()
+ fun_l4_n468
+end
+
+def fun_l3_n901()
+ fun_l4_n968
+end
+
+def fun_l3_n902()
+ fun_l4_n714
+end
+
+def fun_l3_n903()
+ fun_l4_n817
+end
+
+def fun_l3_n904()
+ fun_l4_n111
+end
+
+def fun_l3_n905()
+ fun_l4_n115
+end
+
+def fun_l3_n906()
+ fun_l4_n593
+end
+
+def fun_l3_n907()
+ fun_l4_n961
+end
+
+def fun_l3_n908()
+ fun_l4_n362
+end
+
+def fun_l3_n909()
+ fun_l4_n251
+end
+
+def fun_l3_n910()
+ fun_l4_n532
+end
+
+def fun_l3_n911()
+ fun_l4_n252
+end
+
+def fun_l3_n912()
+ fun_l4_n751
+end
+
+def fun_l3_n913()
+ fun_l4_n962
+end
+
+def fun_l3_n914()
+ fun_l4_n151
+end
+
+def fun_l3_n915()
+ fun_l4_n91
+end
+
+def fun_l3_n916()
+ fun_l4_n164
+end
+
+def fun_l3_n917()
+ fun_l4_n714
+end
+
+def fun_l3_n918()
+ fun_l4_n496
+end
+
+def fun_l3_n919()
+ fun_l4_n833
+end
+
+def fun_l3_n920()
+ fun_l4_n315
+end
+
+def fun_l3_n921()
+ fun_l4_n551
+end
+
+def fun_l3_n922()
+ fun_l4_n986
+end
+
+def fun_l3_n923()
+ fun_l4_n924
+end
+
+def fun_l3_n924()
+ fun_l4_n670
+end
+
+def fun_l3_n925()
+ fun_l4_n611
+end
+
+def fun_l3_n926()
+ fun_l4_n590
+end
+
+def fun_l3_n927()
+ fun_l4_n951
+end
+
+def fun_l3_n928()
+ fun_l4_n438
+end
+
+def fun_l3_n929()
+ fun_l4_n914
+end
+
+def fun_l3_n930()
+ fun_l4_n357
+end
+
+def fun_l3_n931()
+ fun_l4_n330
+end
+
+def fun_l3_n932()
+ fun_l4_n737
+end
+
+def fun_l3_n933()
+ fun_l4_n857
+end
+
+def fun_l3_n934()
+ fun_l4_n32
+end
+
+def fun_l3_n935()
+ fun_l4_n980
+end
+
+def fun_l3_n936()
+ fun_l4_n229
+end
+
+def fun_l3_n937()
+ fun_l4_n779
+end
+
+def fun_l3_n938()
+ fun_l4_n365
+end
+
+def fun_l3_n939()
+ fun_l4_n681
+end
+
+def fun_l3_n940()
+ fun_l4_n55
+end
+
+def fun_l3_n941()
+ fun_l4_n324
+end
+
+def fun_l3_n942()
+ fun_l4_n630
+end
+
+def fun_l3_n943()
+ fun_l4_n910
+end
+
+def fun_l3_n944()
+ fun_l4_n590
+end
+
+def fun_l3_n945()
+ fun_l4_n798
+end
+
+def fun_l3_n946()
+ fun_l4_n973
+end
+
+def fun_l3_n947()
+ fun_l4_n180
+end
+
+def fun_l3_n948()
+ fun_l4_n425
+end
+
+def fun_l3_n949()
+ fun_l4_n446
+end
+
+def fun_l3_n950()
+ fun_l4_n296
+end
+
+def fun_l3_n951()
+ fun_l4_n61
+end
+
+def fun_l3_n952()
+ fun_l4_n797
+end
+
+def fun_l3_n953()
+ fun_l4_n824
+end
+
+def fun_l3_n954()
+ fun_l4_n336
+end
+
+def fun_l3_n955()
+ fun_l4_n82
+end
+
+def fun_l3_n956()
+ fun_l4_n310
+end
+
+def fun_l3_n957()
+ fun_l4_n983
+end
+
+def fun_l3_n958()
+ fun_l4_n780
+end
+
+def fun_l3_n959()
+ fun_l4_n697
+end
+
+def fun_l3_n960()
+ fun_l4_n822
+end
+
+def fun_l3_n961()
+ fun_l4_n209
+end
+
+def fun_l3_n962()
+ fun_l4_n549
+end
+
+def fun_l3_n963()
+ fun_l4_n226
+end
+
+def fun_l3_n964()
+ fun_l4_n324
+end
+
+def fun_l3_n965()
+ fun_l4_n63
+end
+
+def fun_l3_n966()
+ fun_l4_n430
+end
+
+def fun_l3_n967()
+ fun_l4_n645
+end
+
+def fun_l3_n968()
+ fun_l4_n875
+end
+
+def fun_l3_n969()
+ fun_l4_n713
+end
+
+def fun_l3_n970()
+ fun_l4_n457
+end
+
+def fun_l3_n971()
+ fun_l4_n768
+end
+
+def fun_l3_n972()
+ fun_l4_n548
+end
+
+def fun_l3_n973()
+ fun_l4_n577
+end
+
+def fun_l3_n974()
+ fun_l4_n109
+end
+
+def fun_l3_n975()
+ fun_l4_n460
+end
+
+def fun_l3_n976()
+ fun_l4_n83
+end
+
+def fun_l3_n977()
+ fun_l4_n152
+end
+
+def fun_l3_n978()
+ fun_l4_n224
+end
+
+def fun_l3_n979()
+ fun_l4_n897
+end
+
+def fun_l3_n980()
+ fun_l4_n830
+end
+
+def fun_l3_n981()
+ fun_l4_n747
+end
+
+def fun_l3_n982()
+ fun_l4_n21
+end
+
+def fun_l3_n983()
+ fun_l4_n84
+end
+
+def fun_l3_n984()
+ fun_l4_n342
+end
+
+def fun_l3_n985()
+ fun_l4_n950
+end
+
+def fun_l3_n986()
+ fun_l4_n33
+end
+
+def fun_l3_n987()
+ fun_l4_n388
+end
+
+def fun_l3_n988()
+ fun_l4_n766
+end
+
+def fun_l3_n989()
+ fun_l4_n708
+end
+
+def fun_l3_n990()
+ fun_l4_n392
+end
+
+def fun_l3_n991()
+ fun_l4_n782
+end
+
+def fun_l3_n992()
+ fun_l4_n223
+end
+
+def fun_l3_n993()
+ fun_l4_n416
+end
+
+def fun_l3_n994()
+ fun_l4_n609
+end
+
+def fun_l3_n995()
+ fun_l4_n158
+end
+
+def fun_l3_n996()
+ fun_l4_n246
+end
+
+def fun_l3_n997()
+ fun_l4_n667
+end
+
+def fun_l3_n998()
+ fun_l4_n126
+end
+
+def fun_l3_n999()
+ fun_l4_n726
+end
+
+def fun_l4_n0()
+ fun_l5_n544
+end
+
+def fun_l4_n1()
+ fun_l5_n456
+end
+
+def fun_l4_n2()
+ fun_l5_n364
+end
+
+def fun_l4_n3()
+ fun_l5_n929
+end
+
+def fun_l4_n4()
+ fun_l5_n593
+end
+
+def fun_l4_n5()
+ fun_l5_n287
+end
+
+def fun_l4_n6()
+ fun_l5_n272
+end
+
+def fun_l4_n7()
+ fun_l5_n71
+end
+
+def fun_l4_n8()
+ fun_l5_n704
+end
+
+def fun_l4_n9()
+ fun_l5_n462
+end
+
+def fun_l4_n10()
+ fun_l5_n239
+end
+
+def fun_l4_n11()
+ fun_l5_n853
+end
+
+def fun_l4_n12()
+ fun_l5_n217
+end
+
+def fun_l4_n13()
+ fun_l5_n822
+end
+
+def fun_l4_n14()
+ fun_l5_n663
+end
+
+def fun_l4_n15()
+ fun_l5_n400
+end
+
+def fun_l4_n16()
+ fun_l5_n307
+end
+
+def fun_l4_n17()
+ fun_l5_n820
+end
+
+def fun_l4_n18()
+ fun_l5_n885
+end
+
+def fun_l4_n19()
+ fun_l5_n680
+end
+
+def fun_l4_n20()
+ fun_l5_n592
+end
+
+def fun_l4_n21()
+ fun_l5_n615
+end
+
+def fun_l4_n22()
+ fun_l5_n669
+end
+
+def fun_l4_n23()
+ fun_l5_n978
+end
+
+def fun_l4_n24()
+ fun_l5_n946
+end
+
+def fun_l4_n25()
+ fun_l5_n915
+end
+
+def fun_l4_n26()
+ fun_l5_n286
+end
+
+def fun_l4_n27()
+ fun_l5_n466
+end
+
+def fun_l4_n28()
+ fun_l5_n970
+end
+
+def fun_l4_n29()
+ fun_l5_n822
+end
+
+def fun_l4_n30()
+ fun_l5_n883
+end
+
+def fun_l4_n31()
+ fun_l5_n137
+end
+
+def fun_l4_n32()
+ fun_l5_n957
+end
+
+def fun_l4_n33()
+ fun_l5_n912
+end
+
+def fun_l4_n34()
+ fun_l5_n156
+end
+
+def fun_l4_n35()
+ fun_l5_n207
+end
+
+def fun_l4_n36()
+ fun_l5_n525
+end
+
+def fun_l4_n37()
+ fun_l5_n673
+end
+
+def fun_l4_n38()
+ fun_l5_n151
+end
+
+def fun_l4_n39()
+ fun_l5_n517
+end
+
+def fun_l4_n40()
+ fun_l5_n459
+end
+
+def fun_l4_n41()
+ fun_l5_n738
+end
+
+def fun_l4_n42()
+ fun_l5_n809
+end
+
+def fun_l4_n43()
+ fun_l5_n853
+end
+
+def fun_l4_n44()
+ fun_l5_n653
+end
+
+def fun_l4_n45()
+ fun_l5_n346
+end
+
+def fun_l4_n46()
+ fun_l5_n704
+end
+
+def fun_l4_n47()
+ fun_l5_n662
+end
+
+def fun_l4_n48()
+ fun_l5_n990
+end
+
+def fun_l4_n49()
+ fun_l5_n731
+end
+
+def fun_l4_n50()
+ fun_l5_n305
+end
+
+def fun_l4_n51()
+ fun_l5_n238
+end
+
+def fun_l4_n52()
+ fun_l5_n710
+end
+
+def fun_l4_n53()
+ fun_l5_n61
+end
+
+def fun_l4_n54()
+ fun_l5_n572
+end
+
+def fun_l4_n55()
+ fun_l5_n939
+end
+
+def fun_l4_n56()
+ fun_l5_n223
+end
+
+def fun_l4_n57()
+ fun_l5_n466
+end
+
+def fun_l4_n58()
+ fun_l5_n442
+end
+
+def fun_l4_n59()
+ fun_l5_n971
+end
+
+def fun_l4_n60()
+ fun_l5_n42
+end
+
+def fun_l4_n61()
+ fun_l5_n390
+end
+
+def fun_l4_n62()
+ fun_l5_n254
+end
+
+def fun_l4_n63()
+ fun_l5_n522
+end
+
+def fun_l4_n64()
+ fun_l5_n16
+end
+
+def fun_l4_n65()
+ fun_l5_n567
+end
+
+def fun_l4_n66()
+ fun_l5_n353
+end
+
+def fun_l4_n67()
+ fun_l5_n676
+end
+
+def fun_l4_n68()
+ fun_l5_n526
+end
+
+def fun_l4_n69()
+ fun_l5_n140
+end
+
+def fun_l4_n70()
+ fun_l5_n829
+end
+
+def fun_l4_n71()
+ fun_l5_n562
+end
+
+def fun_l4_n72()
+ fun_l5_n489
+end
+
+def fun_l4_n73()
+ fun_l5_n205
+end
+
+def fun_l4_n74()
+ fun_l5_n558
+end
+
+def fun_l4_n75()
+ fun_l5_n689
+end
+
+def fun_l4_n76()
+ fun_l5_n803
+end
+
+def fun_l4_n77()
+ fun_l5_n222
+end
+
+def fun_l4_n78()
+ fun_l5_n696
+end
+
+def fun_l4_n79()
+ fun_l5_n457
+end
+
+def fun_l4_n80()
+ fun_l5_n794
+end
+
+def fun_l4_n81()
+ fun_l5_n886
+end
+
+def fun_l4_n82()
+ fun_l5_n742
+end
+
+def fun_l4_n83()
+ fun_l5_n560
+end
+
+def fun_l4_n84()
+ fun_l5_n207
+end
+
+def fun_l4_n85()
+ fun_l5_n265
+end
+
+def fun_l4_n86()
+ fun_l5_n871
+end
+
+def fun_l4_n87()
+ fun_l5_n113
+end
+
+def fun_l4_n88()
+ fun_l5_n141
+end
+
+def fun_l4_n89()
+ fun_l5_n231
+end
+
+def fun_l4_n90()
+ fun_l5_n980
+end
+
+def fun_l4_n91()
+ fun_l5_n586
+end
+
+def fun_l4_n92()
+ fun_l5_n961
+end
+
+def fun_l4_n93()
+ fun_l5_n128
+end
+
+def fun_l4_n94()
+ fun_l5_n395
+end
+
+def fun_l4_n95()
+ fun_l5_n810
+end
+
+def fun_l4_n96()
+ fun_l5_n337
+end
+
+def fun_l4_n97()
+ fun_l5_n256
+end
+
+def fun_l4_n98()
+ fun_l5_n188
+end
+
+def fun_l4_n99()
+ fun_l5_n358
+end
+
+def fun_l4_n100()
+ fun_l5_n751
+end
+
+def fun_l4_n101()
+ fun_l5_n898
+end
+
+def fun_l4_n102()
+ fun_l5_n323
+end
+
+def fun_l4_n103()
+ fun_l5_n455
+end
+
+def fun_l4_n104()
+ fun_l5_n976
+end
+
+def fun_l4_n105()
+ fun_l5_n962
+end
+
+def fun_l4_n106()
+ fun_l5_n781
+end
+
+def fun_l4_n107()
+ fun_l5_n277
+end
+
+def fun_l4_n108()
+ fun_l5_n146
+end
+
+def fun_l4_n109()
+ fun_l5_n793
+end
+
+def fun_l4_n110()
+ fun_l5_n787
+end
+
+def fun_l4_n111()
+ fun_l5_n597
+end
+
+def fun_l4_n112()
+ fun_l5_n799
+end
+
+def fun_l4_n113()
+ fun_l5_n598
+end
+
+def fun_l4_n114()
+ fun_l5_n456
+end
+
+def fun_l4_n115()
+ fun_l5_n45
+end
+
+def fun_l4_n116()
+ fun_l5_n265
+end
+
+def fun_l4_n117()
+ fun_l5_n661
+end
+
+def fun_l4_n118()
+ fun_l5_n657
+end
+
+def fun_l4_n119()
+ fun_l5_n703
+end
+
+def fun_l4_n120()
+ fun_l5_n164
+end
+
+def fun_l4_n121()
+ fun_l5_n182
+end
+
+def fun_l4_n122()
+ fun_l5_n605
+end
+
+def fun_l4_n123()
+ fun_l5_n237
+end
+
+def fun_l4_n124()
+ fun_l5_n582
+end
+
+def fun_l4_n125()
+ fun_l5_n381
+end
+
+def fun_l4_n126()
+ fun_l5_n244
+end
+
+def fun_l4_n127()
+ fun_l5_n272
+end
+
+def fun_l4_n128()
+ fun_l5_n989
+end
+
+def fun_l4_n129()
+ fun_l5_n366
+end
+
+def fun_l4_n130()
+ fun_l5_n640
+end
+
+def fun_l4_n131()
+ fun_l5_n953
+end
+
+def fun_l4_n132()
+ fun_l5_n990
+end
+
+def fun_l4_n133()
+ fun_l5_n497
+end
+
+def fun_l4_n134()
+ fun_l5_n12
+end
+
+def fun_l4_n135()
+ fun_l5_n993
+end
+
+def fun_l4_n136()
+ fun_l5_n802
+end
+
+def fun_l4_n137()
+ fun_l5_n411
+end
+
+def fun_l4_n138()
+ fun_l5_n154
+end
+
+def fun_l4_n139()
+ fun_l5_n924
+end
+
+def fun_l4_n140()
+ fun_l5_n772
+end
+
+def fun_l4_n141()
+ fun_l5_n972
+end
+
+def fun_l4_n142()
+ fun_l5_n847
+end
+
+def fun_l4_n143()
+ fun_l5_n481
+end
+
+def fun_l4_n144()
+ fun_l5_n52
+end
+
+def fun_l4_n145()
+ fun_l5_n451
+end
+
+def fun_l4_n146()
+ fun_l5_n339
+end
+
+def fun_l4_n147()
+ fun_l5_n531
+end
+
+def fun_l4_n148()
+ fun_l5_n735
+end
+
+def fun_l4_n149()
+ fun_l5_n747
+end
+
+def fun_l4_n150()
+ fun_l5_n750
+end
+
+def fun_l4_n151()
+ fun_l5_n762
+end
+
+def fun_l4_n152()
+ fun_l5_n131
+end
+
+def fun_l4_n153()
+ fun_l5_n532
+end
+
+def fun_l4_n154()
+ fun_l5_n398
+end
+
+def fun_l4_n155()
+ fun_l5_n660
+end
+
+def fun_l4_n156()
+ fun_l5_n374
+end
+
+def fun_l4_n157()
+ fun_l5_n245
+end
+
+def fun_l4_n158()
+ fun_l5_n850
+end
+
+def fun_l4_n159()
+ fun_l5_n518
+end
+
+def fun_l4_n160()
+ fun_l5_n607
+end
+
+def fun_l4_n161()
+ fun_l5_n823
+end
+
+def fun_l4_n162()
+ fun_l5_n816
+end
+
+def fun_l4_n163()
+ fun_l5_n735
+end
+
+def fun_l4_n164()
+ fun_l5_n802
+end
+
+def fun_l4_n165()
+ fun_l5_n398
+end
+
+def fun_l4_n166()
+ fun_l5_n149
+end
+
+def fun_l4_n167()
+ fun_l5_n292
+end
+
+def fun_l4_n168()
+ fun_l5_n733
+end
+
+def fun_l4_n169()
+ fun_l5_n145
+end
+
+def fun_l4_n170()
+ fun_l5_n288
+end
+
+def fun_l4_n171()
+ fun_l5_n131
+end
+
+def fun_l4_n172()
+ fun_l5_n31
+end
+
+def fun_l4_n173()
+ fun_l5_n253
+end
+
+def fun_l4_n174()
+ fun_l5_n41
+end
+
+def fun_l4_n175()
+ fun_l5_n403
+end
+
+def fun_l4_n176()
+ fun_l5_n859
+end
+
+def fun_l4_n177()
+ fun_l5_n804
+end
+
+def fun_l4_n178()
+ fun_l5_n26
+end
+
+def fun_l4_n179()
+ fun_l5_n729
+end
+
+def fun_l4_n180()
+ fun_l5_n978
+end
+
+def fun_l4_n181()
+ fun_l5_n42
+end
+
+def fun_l4_n182()
+ fun_l5_n38
+end
+
+def fun_l4_n183()
+ fun_l5_n758
+end
+
+def fun_l4_n184()
+ fun_l5_n885
+end
+
+def fun_l4_n185()
+ fun_l5_n473
+end
+
+def fun_l4_n186()
+ fun_l5_n737
+end
+
+def fun_l4_n187()
+ fun_l5_n889
+end
+
+def fun_l4_n188()
+ fun_l5_n398
+end
+
+def fun_l4_n189()
+ fun_l5_n72
+end
+
+def fun_l4_n190()
+ fun_l5_n725
+end
+
+def fun_l4_n191()
+ fun_l5_n774
+end
+
+def fun_l4_n192()
+ fun_l5_n453
+end
+
+def fun_l4_n193()
+ fun_l5_n370
+end
+
+def fun_l4_n194()
+ fun_l5_n648
+end
+
+def fun_l4_n195()
+ fun_l5_n882
+end
+
+def fun_l4_n196()
+ fun_l5_n745
+end
+
+def fun_l4_n197()
+ fun_l5_n529
+end
+
+def fun_l4_n198()
+ fun_l5_n957
+end
+
+def fun_l4_n199()
+ fun_l5_n423
+end
+
+def fun_l4_n200()
+ fun_l5_n399
+end
+
+def fun_l4_n201()
+ fun_l5_n917
+end
+
+def fun_l4_n202()
+ fun_l5_n634
+end
+
+def fun_l4_n203()
+ fun_l5_n868
+end
+
+def fun_l4_n204()
+ fun_l5_n627
+end
+
+def fun_l4_n205()
+ fun_l5_n514
+end
+
+def fun_l4_n206()
+ fun_l5_n61
+end
+
+def fun_l4_n207()
+ fun_l5_n848
+end
+
+def fun_l4_n208()
+ fun_l5_n611
+end
+
+def fun_l4_n209()
+ fun_l5_n417
+end
+
+def fun_l4_n210()
+ fun_l5_n423
+end
+
+def fun_l4_n211()
+ fun_l5_n247
+end
+
+def fun_l4_n212()
+ fun_l5_n208
+end
+
+def fun_l4_n213()
+ fun_l5_n253
+end
+
+def fun_l4_n214()
+ fun_l5_n833
+end
+
+def fun_l4_n215()
+ fun_l5_n351
+end
+
+def fun_l4_n216()
+ fun_l5_n326
+end
+
+def fun_l4_n217()
+ fun_l5_n741
+end
+
+def fun_l4_n218()
+ fun_l5_n958
+end
+
+def fun_l4_n219()
+ fun_l5_n347
+end
+
+def fun_l4_n220()
+ fun_l5_n317
+end
+
+def fun_l4_n221()
+ fun_l5_n291
+end
+
+def fun_l4_n222()
+ fun_l5_n863
+end
+
+def fun_l4_n223()
+ fun_l5_n30
+end
+
+def fun_l4_n224()
+ fun_l5_n413
+end
+
+def fun_l4_n225()
+ fun_l5_n352
+end
+
+def fun_l4_n226()
+ fun_l5_n125
+end
+
+def fun_l4_n227()
+ fun_l5_n266
+end
+
+def fun_l4_n228()
+ fun_l5_n264
+end
+
+def fun_l4_n229()
+ fun_l5_n745
+end
+
+def fun_l4_n230()
+ fun_l5_n622
+end
+
+def fun_l4_n231()
+ fun_l5_n160
+end
+
+def fun_l4_n232()
+ fun_l5_n121
+end
+
+def fun_l4_n233()
+ fun_l5_n150
+end
+
+def fun_l4_n234()
+ fun_l5_n495
+end
+
+def fun_l4_n235()
+ fun_l5_n905
+end
+
+def fun_l4_n236()
+ fun_l5_n886
+end
+
+def fun_l4_n237()
+ fun_l5_n221
+end
+
+def fun_l4_n238()
+ fun_l5_n912
+end
+
+def fun_l4_n239()
+ fun_l5_n834
+end
+
+def fun_l4_n240()
+ fun_l5_n703
+end
+
+def fun_l4_n241()
+ fun_l5_n651
+end
+
+def fun_l4_n242()
+ fun_l5_n404
+end
+
+def fun_l4_n243()
+ fun_l5_n213
+end
+
+def fun_l4_n244()
+ fun_l5_n342
+end
+
+def fun_l4_n245()
+ fun_l5_n887
+end
+
+def fun_l4_n246()
+ fun_l5_n69
+end
+
+def fun_l4_n247()
+ fun_l5_n835
+end
+
+def fun_l4_n248()
+ fun_l5_n856
+end
+
+def fun_l4_n249()
+ fun_l5_n485
+end
+
+def fun_l4_n250()
+ fun_l5_n441
+end
+
+def fun_l4_n251()
+ fun_l5_n976
+end
+
+def fun_l4_n252()
+ fun_l5_n586
+end
+
+def fun_l4_n253()
+ fun_l5_n728
+end
+
+def fun_l4_n254()
+ fun_l5_n377
+end
+
+def fun_l4_n255()
+ fun_l5_n293
+end
+
+def fun_l4_n256()
+ fun_l5_n149
+end
+
+def fun_l4_n257()
+ fun_l5_n205
+end
+
+def fun_l4_n258()
+ fun_l5_n301
+end
+
+def fun_l4_n259()
+ fun_l5_n528
+end
+
+def fun_l4_n260()
+ fun_l5_n642
+end
+
+def fun_l4_n261()
+ fun_l5_n430
+end
+
+def fun_l4_n262()
+ fun_l5_n14
+end
+
+def fun_l4_n263()
+ fun_l5_n796
+end
+
+def fun_l4_n264()
+ fun_l5_n849
+end
+
+def fun_l4_n265()
+ fun_l5_n547
+end
+
+def fun_l4_n266()
+ fun_l5_n946
+end
+
+def fun_l4_n267()
+ fun_l5_n131
+end
+
+def fun_l4_n268()
+ fun_l5_n141
+end
+
+def fun_l4_n269()
+ fun_l5_n9
+end
+
+def fun_l4_n270()
+ fun_l5_n884
+end
+
+def fun_l4_n271()
+ fun_l5_n978
+end
+
+def fun_l4_n272()
+ fun_l5_n47
+end
+
+def fun_l4_n273()
+ fun_l5_n100
+end
+
+def fun_l4_n274()
+ fun_l5_n254
+end
+
+def fun_l4_n275()
+ fun_l5_n972
+end
+
+def fun_l4_n276()
+ fun_l5_n705
+end
+
+def fun_l4_n277()
+ fun_l5_n504
+end
+
+def fun_l4_n278()
+ fun_l5_n854
+end
+
+def fun_l4_n279()
+ fun_l5_n331
+end
+
+def fun_l4_n280()
+ fun_l5_n394
+end
+
+def fun_l4_n281()
+ fun_l5_n922
+end
+
+def fun_l4_n282()
+ fun_l5_n503
+end
+
+def fun_l4_n283()
+ fun_l5_n854
+end
+
+def fun_l4_n284()
+ fun_l5_n679
+end
+
+def fun_l4_n285()
+ fun_l5_n317
+end
+
+def fun_l4_n286()
+ fun_l5_n753
+end
+
+def fun_l4_n287()
+ fun_l5_n154
+end
+
+def fun_l4_n288()
+ fun_l5_n184
+end
+
+def fun_l4_n289()
+ fun_l5_n416
+end
+
+def fun_l4_n290()
+ fun_l5_n426
+end
+
+def fun_l4_n291()
+ fun_l5_n186
+end
+
+def fun_l4_n292()
+ fun_l5_n527
+end
+
+def fun_l4_n293()
+ fun_l5_n483
+end
+
+def fun_l4_n294()
+ fun_l5_n718
+end
+
+def fun_l4_n295()
+ fun_l5_n469
+end
+
+def fun_l4_n296()
+ fun_l5_n842
+end
+
+def fun_l4_n297()
+ fun_l5_n998
+end
+
+def fun_l4_n298()
+ fun_l5_n964
+end
+
+def fun_l4_n299()
+ fun_l5_n377
+end
+
+def fun_l4_n300()
+ fun_l5_n9
+end
+
+def fun_l4_n301()
+ fun_l5_n234
+end
+
+def fun_l4_n302()
+ fun_l5_n813
+end
+
+def fun_l4_n303()
+ fun_l5_n211
+end
+
+def fun_l4_n304()
+ fun_l5_n593
+end
+
+def fun_l4_n305()
+ fun_l5_n847
+end
+
+def fun_l4_n306()
+ fun_l5_n628
+end
+
+def fun_l4_n307()
+ fun_l5_n827
+end
+
+def fun_l4_n308()
+ fun_l5_n417
+end
+
+def fun_l4_n309()
+ fun_l5_n958
+end
+
+def fun_l4_n310()
+ fun_l5_n838
+end
+
+def fun_l4_n311()
+ fun_l5_n712
+end
+
+def fun_l4_n312()
+ fun_l5_n615
+end
+
+def fun_l4_n313()
+ fun_l5_n693
+end
+
+def fun_l4_n314()
+ fun_l5_n708
+end
+
+def fun_l4_n315()
+ fun_l5_n525
+end
+
+def fun_l4_n316()
+ fun_l5_n943
+end
+
+def fun_l4_n317()
+ fun_l5_n959
+end
+
+def fun_l4_n318()
+ fun_l5_n316
+end
+
+def fun_l4_n319()
+ fun_l5_n424
+end
+
+def fun_l4_n320()
+ fun_l5_n391
+end
+
+def fun_l4_n321()
+ fun_l5_n303
+end
+
+def fun_l4_n322()
+ fun_l5_n159
+end
+
+def fun_l4_n323()
+ fun_l5_n853
+end
+
+def fun_l4_n324()
+ fun_l5_n525
+end
+
+def fun_l4_n325()
+ fun_l5_n390
+end
+
+def fun_l4_n326()
+ fun_l5_n225
+end
+
+def fun_l4_n327()
+ fun_l5_n983
+end
+
+def fun_l4_n328()
+ fun_l5_n509
+end
+
+def fun_l4_n329()
+ fun_l5_n141
+end
+
+def fun_l4_n330()
+ fun_l5_n92
+end
+
+def fun_l4_n331()
+ fun_l5_n288
+end
+
+def fun_l4_n332()
+ fun_l5_n213
+end
+
+def fun_l4_n333()
+ fun_l5_n830
+end
+
+def fun_l4_n334()
+ fun_l5_n512
+end
+
+def fun_l4_n335()
+ fun_l5_n449
+end
+
+def fun_l4_n336()
+ fun_l5_n148
+end
+
+def fun_l4_n337()
+ fun_l5_n829
+end
+
+def fun_l4_n338()
+ fun_l5_n232
+end
+
+def fun_l4_n339()
+ fun_l5_n989
+end
+
+def fun_l4_n340()
+ fun_l5_n226
+end
+
+def fun_l4_n341()
+ fun_l5_n187
+end
+
+def fun_l4_n342()
+ fun_l5_n874
+end
+
+def fun_l4_n343()
+ fun_l5_n621
+end
+
+def fun_l4_n344()
+ fun_l5_n861
+end
+
+def fun_l4_n345()
+ fun_l5_n22
+end
+
+def fun_l4_n346()
+ fun_l5_n6
+end
+
+def fun_l4_n347()
+ fun_l5_n580
+end
+
+def fun_l4_n348()
+ fun_l5_n56
+end
+
+def fun_l4_n349()
+ fun_l5_n834
+end
+
+def fun_l4_n350()
+ fun_l5_n460
+end
+
+def fun_l4_n351()
+ fun_l5_n697
+end
+
+def fun_l4_n352()
+ fun_l5_n792
+end
+
+def fun_l4_n353()
+ fun_l5_n777
+end
+
+def fun_l4_n354()
+ fun_l5_n73
+end
+
+def fun_l4_n355()
+ fun_l5_n555
+end
+
+def fun_l4_n356()
+ fun_l5_n32
+end
+
+def fun_l4_n357()
+ fun_l5_n242
+end
+
+def fun_l4_n358()
+ fun_l5_n791
+end
+
+def fun_l4_n359()
+ fun_l5_n570
+end
+
+def fun_l4_n360()
+ fun_l5_n272
+end
+
+def fun_l4_n361()
+ fun_l5_n757
+end
+
+def fun_l4_n362()
+ fun_l5_n946
+end
+
+def fun_l4_n363()
+ fun_l5_n127
+end
+
+def fun_l4_n364()
+ fun_l5_n940
+end
+
+def fun_l4_n365()
+ fun_l5_n662
+end
+
+def fun_l4_n366()
+ fun_l5_n99
+end
+
+def fun_l4_n367()
+ fun_l5_n107
+end
+
+def fun_l4_n368()
+ fun_l5_n370
+end
+
+def fun_l4_n369()
+ fun_l5_n738
+end
+
+def fun_l4_n370()
+ fun_l5_n346
+end
+
+def fun_l4_n371()
+ fun_l5_n63
+end
+
+def fun_l4_n372()
+ fun_l5_n274
+end
+
+def fun_l4_n373()
+ fun_l5_n936
+end
+
+def fun_l4_n374()
+ fun_l5_n602
+end
+
+def fun_l4_n375()
+ fun_l5_n362
+end
+
+def fun_l4_n376()
+ fun_l5_n605
+end
+
+def fun_l4_n377()
+ fun_l5_n477
+end
+
+def fun_l4_n378()
+ fun_l5_n349
+end
+
+def fun_l4_n379()
+ fun_l5_n241
+end
+
+def fun_l4_n380()
+ fun_l5_n913
+end
+
+def fun_l4_n381()
+ fun_l5_n392
+end
+
+def fun_l4_n382()
+ fun_l5_n669
+end
+
+def fun_l4_n383()
+ fun_l5_n41
+end
+
+def fun_l4_n384()
+ fun_l5_n928
+end
+
+def fun_l4_n385()
+ fun_l5_n646
+end
+
+def fun_l4_n386()
+ fun_l5_n23
+end
+
+def fun_l4_n387()
+ fun_l5_n815
+end
+
+def fun_l4_n388()
+ fun_l5_n595
+end
+
+def fun_l4_n389()
+ fun_l5_n210
+end
+
+def fun_l4_n390()
+ fun_l5_n247
+end
+
+def fun_l4_n391()
+ fun_l5_n914
+end
+
+def fun_l4_n392()
+ fun_l5_n882
+end
+
+def fun_l4_n393()
+ fun_l5_n319
+end
+
+def fun_l4_n394()
+ fun_l5_n764
+end
+
+def fun_l4_n395()
+ fun_l5_n282
+end
+
+def fun_l4_n396()
+ fun_l5_n585
+end
+
+def fun_l4_n397()
+ fun_l5_n551
+end
+
+def fun_l4_n398()
+ fun_l5_n56
+end
+
+def fun_l4_n399()
+ fun_l5_n807
+end
+
+def fun_l4_n400()
+ fun_l5_n678
+end
+
+def fun_l4_n401()
+ fun_l5_n153
+end
+
+def fun_l4_n402()
+ fun_l5_n993
+end
+
+def fun_l4_n403()
+ fun_l5_n835
+end
+
+def fun_l4_n404()
+ fun_l5_n642
+end
+
+def fun_l4_n405()
+ fun_l5_n460
+end
+
+def fun_l4_n406()
+ fun_l5_n135
+end
+
+def fun_l4_n407()
+ fun_l5_n199
+end
+
+def fun_l4_n408()
+ fun_l5_n782
+end
+
+def fun_l4_n409()
+ fun_l5_n723
+end
+
+def fun_l4_n410()
+ fun_l5_n638
+end
+
+def fun_l4_n411()
+ fun_l5_n157
+end
+
+def fun_l4_n412()
+ fun_l5_n840
+end
+
+def fun_l4_n413()
+ fun_l5_n11
+end
+
+def fun_l4_n414()
+ fun_l5_n148
+end
+
+def fun_l4_n415()
+ fun_l5_n577
+end
+
+def fun_l4_n416()
+ fun_l5_n403
+end
+
+def fun_l4_n417()
+ fun_l5_n971
+end
+
+def fun_l4_n418()
+ fun_l5_n951
+end
+
+def fun_l4_n419()
+ fun_l5_n620
+end
+
+def fun_l4_n420()
+ fun_l5_n120
+end
+
+def fun_l4_n421()
+ fun_l5_n981
+end
+
+def fun_l4_n422()
+ fun_l5_n543
+end
+
+def fun_l4_n423()
+ fun_l5_n543
+end
+
+def fun_l4_n424()
+ fun_l5_n161
+end
+
+def fun_l4_n425()
+ fun_l5_n308
+end
+
+def fun_l4_n426()
+ fun_l5_n94
+end
+
+def fun_l4_n427()
+ fun_l5_n209
+end
+
+def fun_l4_n428()
+ fun_l5_n543
+end
+
+def fun_l4_n429()
+ fun_l5_n825
+end
+
+def fun_l4_n430()
+ fun_l5_n808
+end
+
+def fun_l4_n431()
+ fun_l5_n315
+end
+
+def fun_l4_n432()
+ fun_l5_n846
+end
+
+def fun_l4_n433()
+ fun_l5_n448
+end
+
+def fun_l4_n434()
+ fun_l5_n903
+end
+
+def fun_l4_n435()
+ fun_l5_n933
+end
+
+def fun_l4_n436()
+ fun_l5_n872
+end
+
+def fun_l4_n437()
+ fun_l5_n297
+end
+
+def fun_l4_n438()
+ fun_l5_n689
+end
+
+def fun_l4_n439()
+ fun_l5_n700
+end
+
+def fun_l4_n440()
+ fun_l5_n316
+end
+
+def fun_l4_n441()
+ fun_l5_n983
+end
+
+def fun_l4_n442()
+ fun_l5_n32
+end
+
+def fun_l4_n443()
+ fun_l5_n404
+end
+
+def fun_l4_n444()
+ fun_l5_n770
+end
+
+def fun_l4_n445()
+ fun_l5_n497
+end
+
+def fun_l4_n446()
+ fun_l5_n762
+end
+
+def fun_l4_n447()
+ fun_l5_n402
+end
+
+def fun_l4_n448()
+ fun_l5_n773
+end
+
+def fun_l4_n449()
+ fun_l5_n264
+end
+
+def fun_l4_n450()
+ fun_l5_n373
+end
+
+def fun_l4_n451()
+ fun_l5_n907
+end
+
+def fun_l4_n452()
+ fun_l5_n477
+end
+
+def fun_l4_n453()
+ fun_l5_n15
+end
+
+def fun_l4_n454()
+ fun_l5_n550
+end
+
+def fun_l4_n455()
+ fun_l5_n973
+end
+
+def fun_l4_n456()
+ fun_l5_n247
+end
+
+def fun_l4_n457()
+ fun_l5_n231
+end
+
+def fun_l4_n458()
+ fun_l5_n431
+end
+
+def fun_l4_n459()
+ fun_l5_n549
+end
+
+def fun_l4_n460()
+ fun_l5_n251
+end
+
+def fun_l4_n461()
+ fun_l5_n313
+end
+
+def fun_l4_n462()
+ fun_l5_n826
+end
+
+def fun_l4_n463()
+ fun_l5_n454
+end
+
+def fun_l4_n464()
+ fun_l5_n329
+end
+
+def fun_l4_n465()
+ fun_l5_n502
+end
+
+def fun_l4_n466()
+ fun_l5_n786
+end
+
+def fun_l4_n467()
+ fun_l5_n195
+end
+
+def fun_l4_n468()
+ fun_l5_n710
+end
+
+def fun_l4_n469()
+ fun_l5_n970
+end
+
+def fun_l4_n470()
+ fun_l5_n925
+end
+
+def fun_l4_n471()
+ fun_l5_n420
+end
+
+def fun_l4_n472()
+ fun_l5_n231
+end
+
+def fun_l4_n473()
+ fun_l5_n867
+end
+
+def fun_l4_n474()
+ fun_l5_n798
+end
+
+def fun_l4_n475()
+ fun_l5_n697
+end
+
+def fun_l4_n476()
+ fun_l5_n767
+end
+
+def fun_l4_n477()
+ fun_l5_n199
+end
+
+def fun_l4_n478()
+ fun_l5_n190
+end
+
+def fun_l4_n479()
+ fun_l5_n524
+end
+
+def fun_l4_n480()
+ fun_l5_n451
+end
+
+def fun_l4_n481()
+ fun_l5_n182
+end
+
+def fun_l4_n482()
+ fun_l5_n906
+end
+
+def fun_l4_n483()
+ fun_l5_n806
+end
+
+def fun_l4_n484()
+ fun_l5_n871
+end
+
+def fun_l4_n485()
+ fun_l5_n947
+end
+
+def fun_l4_n486()
+ fun_l5_n599
+end
+
+def fun_l4_n487()
+ fun_l5_n266
+end
+
+def fun_l4_n488()
+ fun_l5_n20
+end
+
+def fun_l4_n489()
+ fun_l5_n875
+end
+
+def fun_l4_n490()
+ fun_l5_n393
+end
+
+def fun_l4_n491()
+ fun_l5_n673
+end
+
+def fun_l4_n492()
+ fun_l5_n159
+end
+
+def fun_l4_n493()
+ fun_l5_n327
+end
+
+def fun_l4_n494()
+ fun_l5_n71
+end
+
+def fun_l4_n495()
+ fun_l5_n146
+end
+
+def fun_l4_n496()
+ fun_l5_n372
+end
+
+def fun_l4_n497()
+ fun_l5_n654
+end
+
+def fun_l4_n498()
+ fun_l5_n1
+end
+
+def fun_l4_n499()
+ fun_l5_n448
+end
+
+def fun_l4_n500()
+ fun_l5_n684
+end
+
+def fun_l4_n501()
+ fun_l5_n561
+end
+
+def fun_l4_n502()
+ fun_l5_n47
+end
+
+def fun_l4_n503()
+ fun_l5_n313
+end
+
+def fun_l4_n504()
+ fun_l5_n380
+end
+
+def fun_l4_n505()
+ fun_l5_n416
+end
+
+def fun_l4_n506()
+ fun_l5_n90
+end
+
+def fun_l4_n507()
+ fun_l5_n65
+end
+
+def fun_l4_n508()
+ fun_l5_n61
+end
+
+def fun_l4_n509()
+ fun_l5_n451
+end
+
+def fun_l4_n510()
+ fun_l5_n174
+end
+
+def fun_l4_n511()
+ fun_l5_n236
+end
+
+def fun_l4_n512()
+ fun_l5_n470
+end
+
+def fun_l4_n513()
+ fun_l5_n304
+end
+
+def fun_l4_n514()
+ fun_l5_n146
+end
+
+def fun_l4_n515()
+ fun_l5_n671
+end
+
+def fun_l4_n516()
+ fun_l5_n626
+end
+
+def fun_l4_n517()
+ fun_l5_n164
+end
+
+def fun_l4_n518()
+ fun_l5_n308
+end
+
+def fun_l4_n519()
+ fun_l5_n799
+end
+
+def fun_l4_n520()
+ fun_l5_n521
+end
+
+def fun_l4_n521()
+ fun_l5_n675
+end
+
+def fun_l4_n522()
+ fun_l5_n110
+end
+
+def fun_l4_n523()
+ fun_l5_n726
+end
+
+def fun_l4_n524()
+ fun_l5_n189
+end
+
+def fun_l4_n525()
+ fun_l5_n303
+end
+
+def fun_l4_n526()
+ fun_l5_n571
+end
+
+def fun_l4_n527()
+ fun_l5_n693
+end
+
+def fun_l4_n528()
+ fun_l5_n782
+end
+
+def fun_l4_n529()
+ fun_l5_n764
+end
+
+def fun_l4_n530()
+ fun_l5_n629
+end
+
+def fun_l4_n531()
+ fun_l5_n677
+end
+
+def fun_l4_n532()
+ fun_l5_n745
+end
+
+def fun_l4_n533()
+ fun_l5_n868
+end
+
+def fun_l4_n534()
+ fun_l5_n771
+end
+
+def fun_l4_n535()
+ fun_l5_n248
+end
+
+def fun_l4_n536()
+ fun_l5_n412
+end
+
+def fun_l4_n537()
+ fun_l5_n736
+end
+
+def fun_l4_n538()
+ fun_l5_n296
+end
+
+def fun_l4_n539()
+ fun_l5_n847
+end
+
+def fun_l4_n540()
+ fun_l5_n188
+end
+
+def fun_l4_n541()
+ fun_l5_n131
+end
+
+def fun_l4_n542()
+ fun_l5_n31
+end
+
+def fun_l4_n543()
+ fun_l5_n563
+end
+
+def fun_l4_n544()
+ fun_l5_n479
+end
+
+def fun_l4_n545()
+ fun_l5_n243
+end
+
+def fun_l4_n546()
+ fun_l5_n471
+end
+
+def fun_l4_n547()
+ fun_l5_n237
+end
+
+def fun_l4_n548()
+ fun_l5_n772
+end
+
+def fun_l4_n549()
+ fun_l5_n723
+end
+
+def fun_l4_n550()
+ fun_l5_n733
+end
+
+def fun_l4_n551()
+ fun_l5_n274
+end
+
+def fun_l4_n552()
+ fun_l5_n351
+end
+
+def fun_l4_n553()
+ fun_l5_n30
+end
+
+def fun_l4_n554()
+ fun_l5_n112
+end
+
+def fun_l4_n555()
+ fun_l5_n438
+end
+
+def fun_l4_n556()
+ fun_l5_n969
+end
+
+def fun_l4_n557()
+ fun_l5_n57
+end
+
+def fun_l4_n558()
+ fun_l5_n971
+end
+
+def fun_l4_n559()
+ fun_l5_n831
+end
+
+def fun_l4_n560()
+ fun_l5_n833
+end
+
+def fun_l4_n561()
+ fun_l5_n896
+end
+
+def fun_l4_n562()
+ fun_l5_n607
+end
+
+def fun_l4_n563()
+ fun_l5_n793
+end
+
+def fun_l4_n564()
+ fun_l5_n711
+end
+
+def fun_l4_n565()
+ fun_l5_n570
+end
+
+def fun_l4_n566()
+ fun_l5_n933
+end
+
+def fun_l4_n567()
+ fun_l5_n917
+end
+
+def fun_l4_n568()
+ fun_l5_n811
+end
+
+def fun_l4_n569()
+ fun_l5_n414
+end
+
+def fun_l4_n570()
+ fun_l5_n14
+end
+
+def fun_l4_n571()
+ fun_l5_n911
+end
+
+def fun_l4_n572()
+ fun_l5_n114
+end
+
+def fun_l4_n573()
+ fun_l5_n732
+end
+
+def fun_l4_n574()
+ fun_l5_n913
+end
+
+def fun_l4_n575()
+ fun_l5_n66
+end
+
+def fun_l4_n576()
+ fun_l5_n330
+end
+
+def fun_l4_n577()
+ fun_l5_n892
+end
+
+def fun_l4_n578()
+ fun_l5_n329
+end
+
+def fun_l4_n579()
+ fun_l5_n539
+end
+
+def fun_l4_n580()
+ fun_l5_n268
+end
+
+def fun_l4_n581()
+ fun_l5_n357
+end
+
+def fun_l4_n582()
+ fun_l5_n259
+end
+
+def fun_l4_n583()
+ fun_l5_n968
+end
+
+def fun_l4_n584()
+ fun_l5_n873
+end
+
+def fun_l4_n585()
+ fun_l5_n644
+end
+
+def fun_l4_n586()
+ fun_l5_n659
+end
+
+def fun_l4_n587()
+ fun_l5_n906
+end
+
+def fun_l4_n588()
+ fun_l5_n746
+end
+
+def fun_l4_n589()
+ fun_l5_n802
+end
+
+def fun_l4_n590()
+ fun_l5_n9
+end
+
+def fun_l4_n591()
+ fun_l5_n620
+end
+
+def fun_l4_n592()
+ fun_l5_n507
+end
+
+def fun_l4_n593()
+ fun_l5_n338
+end
+
+def fun_l4_n594()
+ fun_l5_n396
+end
+
+def fun_l4_n595()
+ fun_l5_n627
+end
+
+def fun_l4_n596()
+ fun_l5_n621
+end
+
+def fun_l4_n597()
+ fun_l5_n597
+end
+
+def fun_l4_n598()
+ fun_l5_n496
+end
+
+def fun_l4_n599()
+ fun_l5_n265
+end
+
+def fun_l4_n600()
+ fun_l5_n897
+end
+
+def fun_l4_n601()
+ fun_l5_n142
+end
+
+def fun_l4_n602()
+ fun_l5_n614
+end
+
+def fun_l4_n603()
+ fun_l5_n565
+end
+
+def fun_l4_n604()
+ fun_l5_n653
+end
+
+def fun_l4_n605()
+ fun_l5_n728
+end
+
+def fun_l4_n606()
+ fun_l5_n799
+end
+
+def fun_l4_n607()
+ fun_l5_n714
+end
+
+def fun_l4_n608()
+ fun_l5_n448
+end
+
+def fun_l4_n609()
+ fun_l5_n778
+end
+
+def fun_l4_n610()
+ fun_l5_n508
+end
+
+def fun_l4_n611()
+ fun_l5_n216
+end
+
+def fun_l4_n612()
+ fun_l5_n604
+end
+
+def fun_l4_n613()
+ fun_l5_n231
+end
+
+def fun_l4_n614()
+ fun_l5_n696
+end
+
+def fun_l4_n615()
+ fun_l5_n354
+end
+
+def fun_l4_n616()
+ fun_l5_n595
+end
+
+def fun_l4_n617()
+ fun_l5_n747
+end
+
+def fun_l4_n618()
+ fun_l5_n377
+end
+
+def fun_l4_n619()
+ fun_l5_n852
+end
+
+def fun_l4_n620()
+ fun_l5_n381
+end
+
+def fun_l4_n621()
+ fun_l5_n674
+end
+
+def fun_l4_n622()
+ fun_l5_n696
+end
+
+def fun_l4_n623()
+ fun_l5_n25
+end
+
+def fun_l4_n624()
+ fun_l5_n133
+end
+
+def fun_l4_n625()
+ fun_l5_n419
+end
+
+def fun_l4_n626()
+ fun_l5_n612
+end
+
+def fun_l4_n627()
+ fun_l5_n798
+end
+
+def fun_l4_n628()
+ fun_l5_n702
+end
+
+def fun_l4_n629()
+ fun_l5_n125
+end
+
+def fun_l4_n630()
+ fun_l5_n567
+end
+
+def fun_l4_n631()
+ fun_l5_n825
+end
+
+def fun_l4_n632()
+ fun_l5_n794
+end
+
+def fun_l4_n633()
+ fun_l5_n802
+end
+
+def fun_l4_n634()
+ fun_l5_n297
+end
+
+def fun_l4_n635()
+ fun_l5_n366
+end
+
+def fun_l4_n636()
+ fun_l5_n149
+end
+
+def fun_l4_n637()
+ fun_l5_n648
+end
+
+def fun_l4_n638()
+ fun_l5_n997
+end
+
+def fun_l4_n639()
+ fun_l5_n569
+end
+
+def fun_l4_n640()
+ fun_l5_n917
+end
+
+def fun_l4_n641()
+ fun_l5_n172
+end
+
+def fun_l4_n642()
+ fun_l5_n353
+end
+
+def fun_l4_n643()
+ fun_l5_n940
+end
+
+def fun_l4_n644()
+ fun_l5_n255
+end
+
+def fun_l4_n645()
+ fun_l5_n690
+end
+
+def fun_l4_n646()
+ fun_l5_n17
+end
+
+def fun_l4_n647()
+ fun_l5_n320
+end
+
+def fun_l4_n648()
+ fun_l5_n328
+end
+
+def fun_l4_n649()
+ fun_l5_n467
+end
+
+def fun_l4_n650()
+ fun_l5_n352
+end
+
+def fun_l4_n651()
+ fun_l5_n671
+end
+
+def fun_l4_n652()
+ fun_l5_n104
+end
+
+def fun_l4_n653()
+ fun_l5_n40
+end
+
+def fun_l4_n654()
+ fun_l5_n445
+end
+
+def fun_l4_n655()
+ fun_l5_n703
+end
+
+def fun_l4_n656()
+ fun_l5_n699
+end
+
+def fun_l4_n657()
+ fun_l5_n156
+end
+
+def fun_l4_n658()
+ fun_l5_n1
+end
+
+def fun_l4_n659()
+ fun_l5_n728
+end
+
+def fun_l4_n660()
+ fun_l5_n200
+end
+
+def fun_l4_n661()
+ fun_l5_n369
+end
+
+def fun_l4_n662()
+ fun_l5_n621
+end
+
+def fun_l4_n663()
+ fun_l5_n600
+end
+
+def fun_l4_n664()
+ fun_l5_n342
+end
+
+def fun_l4_n665()
+ fun_l5_n129
+end
+
+def fun_l4_n666()
+ fun_l5_n627
+end
+
+def fun_l4_n667()
+ fun_l5_n44
+end
+
+def fun_l4_n668()
+ fun_l5_n43
+end
+
+def fun_l4_n669()
+ fun_l5_n708
+end
+
+def fun_l4_n670()
+ fun_l5_n378
+end
+
+def fun_l4_n671()
+ fun_l5_n320
+end
+
+def fun_l4_n672()
+ fun_l5_n896
+end
+
+def fun_l4_n673()
+ fun_l5_n185
+end
+
+def fun_l4_n674()
+ fun_l5_n456
+end
+
+def fun_l4_n675()
+ fun_l5_n520
+end
+
+def fun_l4_n676()
+ fun_l5_n633
+end
+
+def fun_l4_n677()
+ fun_l5_n122
+end
+
+def fun_l4_n678()
+ fun_l5_n333
+end
+
+def fun_l4_n679()
+ fun_l5_n100
+end
+
+def fun_l4_n680()
+ fun_l5_n941
+end
+
+def fun_l4_n681()
+ fun_l5_n468
+end
+
+def fun_l4_n682()
+ fun_l5_n45
+end
+
+def fun_l4_n683()
+ fun_l5_n295
+end
+
+def fun_l4_n684()
+ fun_l5_n400
+end
+
+def fun_l4_n685()
+ fun_l5_n999
+end
+
+def fun_l4_n686()
+ fun_l5_n294
+end
+
+def fun_l4_n687()
+ fun_l5_n575
+end
+
+def fun_l4_n688()
+ fun_l5_n372
+end
+
+def fun_l4_n689()
+ fun_l5_n777
+end
+
+def fun_l4_n690()
+ fun_l5_n795
+end
+
+def fun_l4_n691()
+ fun_l5_n44
+end
+
+def fun_l4_n692()
+ fun_l5_n27
+end
+
+def fun_l4_n693()
+ fun_l5_n488
+end
+
+def fun_l4_n694()
+ fun_l5_n932
+end
+
+def fun_l4_n695()
+ fun_l5_n104
+end
+
+def fun_l4_n696()
+ fun_l5_n552
+end
+
+def fun_l4_n697()
+ fun_l5_n830
+end
+
+def fun_l4_n698()
+ fun_l5_n612
+end
+
+def fun_l4_n699()
+ fun_l5_n889
+end
+
+def fun_l4_n700()
+ fun_l5_n205
+end
+
+def fun_l4_n701()
+ fun_l5_n90
+end
+
+def fun_l4_n702()
+ fun_l5_n210
+end
+
+def fun_l4_n703()
+ fun_l5_n514
+end
+
+def fun_l4_n704()
+ fun_l5_n374
+end
+
+def fun_l4_n705()
+ fun_l5_n176
+end
+
+def fun_l4_n706()
+ fun_l5_n465
+end
+
+def fun_l4_n707()
+ fun_l5_n542
+end
+
+def fun_l4_n708()
+ fun_l5_n175
+end
+
+def fun_l4_n709()
+ fun_l5_n148
+end
+
+def fun_l4_n710()
+ fun_l5_n212
+end
+
+def fun_l4_n711()
+ fun_l5_n418
+end
+
+def fun_l4_n712()
+ fun_l5_n401
+end
+
+def fun_l4_n713()
+ fun_l5_n14
+end
+
+def fun_l4_n714()
+ fun_l5_n965
+end
+
+def fun_l4_n715()
+ fun_l5_n783
+end
+
+def fun_l4_n716()
+ fun_l5_n421
+end
+
+def fun_l4_n717()
+ fun_l5_n346
+end
+
+def fun_l4_n718()
+ fun_l5_n176
+end
+
+def fun_l4_n719()
+ fun_l5_n522
+end
+
+def fun_l4_n720()
+ fun_l5_n207
+end
+
+def fun_l4_n721()
+ fun_l5_n707
+end
+
+def fun_l4_n722()
+ fun_l5_n593
+end
+
+def fun_l4_n723()
+ fun_l5_n609
+end
+
+def fun_l4_n724()
+ fun_l5_n798
+end
+
+def fun_l4_n725()
+ fun_l5_n744
+end
+
+def fun_l4_n726()
+ fun_l5_n514
+end
+
+def fun_l4_n727()
+ fun_l5_n278
+end
+
+def fun_l4_n728()
+ fun_l5_n425
+end
+
+def fun_l4_n729()
+ fun_l5_n147
+end
+
+def fun_l4_n730()
+ fun_l5_n676
+end
+
+def fun_l4_n731()
+ fun_l5_n887
+end
+
+def fun_l4_n732()
+ fun_l5_n865
+end
+
+def fun_l4_n733()
+ fun_l5_n811
+end
+
+def fun_l4_n734()
+ fun_l5_n545
+end
+
+def fun_l4_n735()
+ fun_l5_n219
+end
+
+def fun_l4_n736()
+ fun_l5_n121
+end
+
+def fun_l4_n737()
+ fun_l5_n253
+end
+
+def fun_l4_n738()
+ fun_l5_n349
+end
+
+def fun_l4_n739()
+ fun_l5_n540
+end
+
+def fun_l4_n740()
+ fun_l5_n301
+end
+
+def fun_l4_n741()
+ fun_l5_n367
+end
+
+def fun_l4_n742()
+ fun_l5_n989
+end
+
+def fun_l4_n743()
+ fun_l5_n454
+end
+
+def fun_l4_n744()
+ fun_l5_n390
+end
+
+def fun_l4_n745()
+ fun_l5_n650
+end
+
+def fun_l4_n746()
+ fun_l5_n403
+end
+
+def fun_l4_n747()
+ fun_l5_n807
+end
+
+def fun_l4_n748()
+ fun_l5_n219
+end
+
+def fun_l4_n749()
+ fun_l5_n756
+end
+
+def fun_l4_n750()
+ fun_l5_n730
+end
+
+def fun_l4_n751()
+ fun_l5_n923
+end
+
+def fun_l4_n752()
+ fun_l5_n407
+end
+
+def fun_l4_n753()
+ fun_l5_n734
+end
+
+def fun_l4_n754()
+ fun_l5_n192
+end
+
+def fun_l4_n755()
+ fun_l5_n26
+end
+
+def fun_l4_n756()
+ fun_l5_n571
+end
+
+def fun_l4_n757()
+ fun_l5_n515
+end
+
+def fun_l4_n758()
+ fun_l5_n701
+end
+
+def fun_l4_n759()
+ fun_l5_n808
+end
+
+def fun_l4_n760()
+ fun_l5_n607
+end
+
+def fun_l4_n761()
+ fun_l5_n231
+end
+
+def fun_l4_n762()
+ fun_l5_n144
+end
+
+def fun_l4_n763()
+ fun_l5_n829
+end
+
+def fun_l4_n764()
+ fun_l5_n939
+end
+
+def fun_l4_n765()
+ fun_l5_n486
+end
+
+def fun_l4_n766()
+ fun_l5_n73
+end
+
+def fun_l4_n767()
+ fun_l5_n409
+end
+
+def fun_l4_n768()
+ fun_l5_n197
+end
+
+def fun_l4_n769()
+ fun_l5_n803
+end
+
+def fun_l4_n770()
+ fun_l5_n877
+end
+
+def fun_l4_n771()
+ fun_l5_n739
+end
+
+def fun_l4_n772()
+ fun_l5_n500
+end
+
+def fun_l4_n773()
+ fun_l5_n104
+end
+
+def fun_l4_n774()
+ fun_l5_n526
+end
+
+def fun_l4_n775()
+ fun_l5_n443
+end
+
+def fun_l4_n776()
+ fun_l5_n397
+end
+
+def fun_l4_n777()
+ fun_l5_n496
+end
+
+def fun_l4_n778()
+ fun_l5_n360
+end
+
+def fun_l4_n779()
+ fun_l5_n93
+end
+
+def fun_l4_n780()
+ fun_l5_n635
+end
+
+def fun_l4_n781()
+ fun_l5_n724
+end
+
+def fun_l4_n782()
+ fun_l5_n445
+end
+
+def fun_l4_n783()
+ fun_l5_n546
+end
+
+def fun_l4_n784()
+ fun_l5_n353
+end
+
+def fun_l4_n785()
+ fun_l5_n546
+end
+
+def fun_l4_n786()
+ fun_l5_n243
+end
+
+def fun_l4_n787()
+ fun_l5_n614
+end
+
+def fun_l4_n788()
+ fun_l5_n249
+end
+
+def fun_l4_n789()
+ fun_l5_n281
+end
+
+def fun_l4_n790()
+ fun_l5_n22
+end
+
+def fun_l4_n791()
+ fun_l5_n857
+end
+
+def fun_l4_n792()
+ fun_l5_n685
+end
+
+def fun_l4_n793()
+ fun_l5_n784
+end
+
+def fun_l4_n794()
+ fun_l5_n522
+end
+
+def fun_l4_n795()
+ fun_l5_n970
+end
+
+def fun_l4_n796()
+ fun_l5_n734
+end
+
+def fun_l4_n797()
+ fun_l5_n36
+end
+
+def fun_l4_n798()
+ fun_l5_n257
+end
+
+def fun_l4_n799()
+ fun_l5_n677
+end
+
+def fun_l4_n800()
+ fun_l5_n556
+end
+
+def fun_l4_n801()
+ fun_l5_n783
+end
+
+def fun_l4_n802()
+ fun_l5_n501
+end
+
+def fun_l4_n803()
+ fun_l5_n731
+end
+
+def fun_l4_n804()
+ fun_l5_n175
+end
+
+def fun_l4_n805()
+ fun_l5_n712
+end
+
+def fun_l4_n806()
+ fun_l5_n566
+end
+
+def fun_l4_n807()
+ fun_l5_n158
+end
+
+def fun_l4_n808()
+ fun_l5_n63
+end
+
+def fun_l4_n809()
+ fun_l5_n354
+end
+
+def fun_l4_n810()
+ fun_l5_n552
+end
+
+def fun_l4_n811()
+ fun_l5_n255
+end
+
+def fun_l4_n812()
+ fun_l5_n830
+end
+
+def fun_l4_n813()
+ fun_l5_n792
+end
+
+def fun_l4_n814()
+ fun_l5_n214
+end
+
+def fun_l4_n815()
+ fun_l5_n906
+end
+
+def fun_l4_n816()
+ fun_l5_n852
+end
+
+def fun_l4_n817()
+ fun_l5_n286
+end
+
+def fun_l4_n818()
+ fun_l5_n704
+end
+
+def fun_l4_n819()
+ fun_l5_n860
+end
+
+def fun_l4_n820()
+ fun_l5_n150
+end
+
+def fun_l4_n821()
+ fun_l5_n793
+end
+
+def fun_l4_n822()
+ fun_l5_n356
+end
+
+def fun_l4_n823()
+ fun_l5_n369
+end
+
+def fun_l4_n824()
+ fun_l5_n519
+end
+
+def fun_l4_n825()
+ fun_l5_n765
+end
+
+def fun_l4_n826()
+ fun_l5_n974
+end
+
+def fun_l4_n827()
+ fun_l5_n265
+end
+
+def fun_l4_n828()
+ fun_l5_n948
+end
+
+def fun_l4_n829()
+ fun_l5_n2
+end
+
+def fun_l4_n830()
+ fun_l5_n269
+end
+
+def fun_l4_n831()
+ fun_l5_n96
+end
+
+def fun_l4_n832()
+ fun_l5_n964
+end
+
+def fun_l4_n833()
+ fun_l5_n362
+end
+
+def fun_l4_n834()
+ fun_l5_n915
+end
+
+def fun_l4_n835()
+ fun_l5_n179
+end
+
+def fun_l4_n836()
+ fun_l5_n128
+end
+
+def fun_l4_n837()
+ fun_l5_n195
+end
+
+def fun_l4_n838()
+ fun_l5_n393
+end
+
+def fun_l4_n839()
+ fun_l5_n120
+end
+
+def fun_l4_n840()
+ fun_l5_n239
+end
+
+def fun_l4_n841()
+ fun_l5_n669
+end
+
+def fun_l4_n842()
+ fun_l5_n234
+end
+
+def fun_l4_n843()
+ fun_l5_n60
+end
+
+def fun_l4_n844()
+ fun_l5_n962
+end
+
+def fun_l4_n845()
+ fun_l5_n770
+end
+
+def fun_l4_n846()
+ fun_l5_n207
+end
+
+def fun_l4_n847()
+ fun_l5_n46
+end
+
+def fun_l4_n848()
+ fun_l5_n615
+end
+
+def fun_l4_n849()
+ fun_l5_n709
+end
+
+def fun_l4_n850()
+ fun_l5_n198
+end
+
+def fun_l4_n851()
+ fun_l5_n639
+end
+
+def fun_l4_n852()
+ fun_l5_n125
+end
+
+def fun_l4_n853()
+ fun_l5_n193
+end
+
+def fun_l4_n854()
+ fun_l5_n806
+end
+
+def fun_l4_n855()
+ fun_l5_n237
+end
+
+def fun_l4_n856()
+ fun_l5_n319
+end
+
+def fun_l4_n857()
+ fun_l5_n533
+end
+
+def fun_l4_n858()
+ fun_l5_n320
+end
+
+def fun_l4_n859()
+ fun_l5_n501
+end
+
+def fun_l4_n860()
+ fun_l5_n404
+end
+
+def fun_l4_n861()
+ fun_l5_n849
+end
+
+def fun_l4_n862()
+ fun_l5_n743
+end
+
+def fun_l4_n863()
+ fun_l5_n764
+end
+
+def fun_l4_n864()
+ fun_l5_n956
+end
+
+def fun_l4_n865()
+ fun_l5_n914
+end
+
+def fun_l4_n866()
+ fun_l5_n652
+end
+
+def fun_l4_n867()
+ fun_l5_n30
+end
+
+def fun_l4_n868()
+ fun_l5_n330
+end
+
+def fun_l4_n869()
+ fun_l5_n677
+end
+
+def fun_l4_n870()
+ fun_l5_n988
+end
+
+def fun_l4_n871()
+ fun_l5_n676
+end
+
+def fun_l4_n872()
+ fun_l5_n752
+end
+
+def fun_l4_n873()
+ fun_l5_n636
+end
+
+def fun_l4_n874()
+ fun_l5_n395
+end
+
+def fun_l4_n875()
+ fun_l5_n428
+end
+
+def fun_l4_n876()
+ fun_l5_n83
+end
+
+def fun_l4_n877()
+ fun_l5_n712
+end
+
+def fun_l4_n878()
+ fun_l5_n708
+end
+
+def fun_l4_n879()
+ fun_l5_n418
+end
+
+def fun_l4_n880()
+ fun_l5_n265
+end
+
+def fun_l4_n881()
+ fun_l5_n379
+end
+
+def fun_l4_n882()
+ fun_l5_n758
+end
+
+def fun_l4_n883()
+ fun_l5_n251
+end
+
+def fun_l4_n884()
+ fun_l5_n723
+end
+
+def fun_l4_n885()
+ fun_l5_n216
+end
+
+def fun_l4_n886()
+ fun_l5_n197
+end
+
+def fun_l4_n887()
+ fun_l5_n261
+end
+
+def fun_l4_n888()
+ fun_l5_n62
+end
+
+def fun_l4_n889()
+ fun_l5_n941
+end
+
+def fun_l4_n890()
+ fun_l5_n535
+end
+
+def fun_l4_n891()
+ fun_l5_n727
+end
+
+def fun_l4_n892()
+ fun_l5_n279
+end
+
+def fun_l4_n893()
+ fun_l5_n541
+end
+
+def fun_l4_n894()
+ fun_l5_n684
+end
+
+def fun_l4_n895()
+ fun_l5_n649
+end
+
+def fun_l4_n896()
+ fun_l5_n396
+end
+
+def fun_l4_n897()
+ fun_l5_n992
+end
+
+def fun_l4_n898()
+ fun_l5_n160
+end
+
+def fun_l4_n899()
+ fun_l5_n84
+end
+
+def fun_l4_n900()
+ fun_l5_n318
+end
+
+def fun_l4_n901()
+ fun_l5_n428
+end
+
+def fun_l4_n902()
+ fun_l5_n534
+end
+
+def fun_l4_n903()
+ fun_l5_n25
+end
+
+def fun_l4_n904()
+ fun_l5_n392
+end
+
+def fun_l4_n905()
+ fun_l5_n926
+end
+
+def fun_l4_n906()
+ fun_l5_n724
+end
+
+def fun_l4_n907()
+ fun_l5_n311
+end
+
+def fun_l4_n908()
+ fun_l5_n535
+end
+
+def fun_l4_n909()
+ fun_l5_n179
+end
+
+def fun_l4_n910()
+ fun_l5_n533
+end
+
+def fun_l4_n911()
+ fun_l5_n875
+end
+
+def fun_l4_n912()
+ fun_l5_n105
+end
+
+def fun_l4_n913()
+ fun_l5_n618
+end
+
+def fun_l4_n914()
+ fun_l5_n827
+end
+
+def fun_l4_n915()
+ fun_l5_n555
+end
+
+def fun_l4_n916()
+ fun_l5_n339
+end
+
+def fun_l4_n917()
+ fun_l5_n848
+end
+
+def fun_l4_n918()
+ fun_l5_n676
+end
+
+def fun_l4_n919()
+ fun_l5_n204
+end
+
+def fun_l4_n920()
+ fun_l5_n769
+end
+
+def fun_l4_n921()
+ fun_l5_n229
+end
+
+def fun_l4_n922()
+ fun_l5_n92
+end
+
+def fun_l4_n923()
+ fun_l5_n973
+end
+
+def fun_l4_n924()
+ fun_l5_n700
+end
+
+def fun_l4_n925()
+ fun_l5_n581
+end
+
+def fun_l4_n926()
+ fun_l5_n138
+end
+
+def fun_l4_n927()
+ fun_l5_n43
+end
+
+def fun_l4_n928()
+ fun_l5_n537
+end
+
+def fun_l4_n929()
+ fun_l5_n882
+end
+
+def fun_l4_n930()
+ fun_l5_n871
+end
+
+def fun_l4_n931()
+ fun_l5_n158
+end
+
+def fun_l4_n932()
+ fun_l5_n542
+end
+
+def fun_l4_n933()
+ fun_l5_n468
+end
+
+def fun_l4_n934()
+ fun_l5_n28
+end
+
+def fun_l4_n935()
+ fun_l5_n976
+end
+
+def fun_l4_n936()
+ fun_l5_n632
+end
+
+def fun_l4_n937()
+ fun_l5_n857
+end
+
+def fun_l4_n938()
+ fun_l5_n841
+end
+
+def fun_l4_n939()
+ fun_l5_n762
+end
+
+def fun_l4_n940()
+ fun_l5_n522
+end
+
+def fun_l4_n941()
+ fun_l5_n841
+end
+
+def fun_l4_n942()
+ fun_l5_n42
+end
+
+def fun_l4_n943()
+ fun_l5_n771
+end
+
+def fun_l4_n944()
+ fun_l5_n145
+end
+
+def fun_l4_n945()
+ fun_l5_n435
+end
+
+def fun_l4_n946()
+ fun_l5_n573
+end
+
+def fun_l4_n947()
+ fun_l5_n422
+end
+
+def fun_l4_n948()
+ fun_l5_n34
+end
+
+def fun_l4_n949()
+ fun_l5_n577
+end
+
+def fun_l4_n950()
+ fun_l5_n156
+end
+
+def fun_l4_n951()
+ fun_l5_n707
+end
+
+def fun_l4_n952()
+ fun_l5_n198
+end
+
+def fun_l4_n953()
+ fun_l5_n950
+end
+
+def fun_l4_n954()
+ fun_l5_n474
+end
+
+def fun_l4_n955()
+ fun_l5_n319
+end
+
+def fun_l4_n956()
+ fun_l5_n208
+end
+
+def fun_l4_n957()
+ fun_l5_n360
+end
+
+def fun_l4_n958()
+ fun_l5_n101
+end
+
+def fun_l4_n959()
+ fun_l5_n37
+end
+
+def fun_l4_n960()
+ fun_l5_n20
+end
+
+def fun_l4_n961()
+ fun_l5_n897
+end
+
+def fun_l4_n962()
+ fun_l5_n92
+end
+
+def fun_l4_n963()
+ fun_l5_n105
+end
+
+def fun_l4_n964()
+ fun_l5_n255
+end
+
+def fun_l4_n965()
+ fun_l5_n97
+end
+
+def fun_l4_n966()
+ fun_l5_n398
+end
+
+def fun_l4_n967()
+ fun_l5_n393
+end
+
+def fun_l4_n968()
+ fun_l5_n135
+end
+
+def fun_l4_n969()
+ fun_l5_n306
+end
+
+def fun_l4_n970()
+ fun_l5_n202
+end
+
+def fun_l4_n971()
+ fun_l5_n832
+end
+
+def fun_l4_n972()
+ fun_l5_n444
+end
+
+def fun_l4_n973()
+ fun_l5_n768
+end
+
+def fun_l4_n974()
+ fun_l5_n384
+end
+
+def fun_l4_n975()
+ fun_l5_n142
+end
+
+def fun_l4_n976()
+ fun_l5_n208
+end
+
+def fun_l4_n977()
+ fun_l5_n818
+end
+
+def fun_l4_n978()
+ fun_l5_n5
+end
+
+def fun_l4_n979()
+ fun_l5_n410
+end
+
+def fun_l4_n980()
+ fun_l5_n713
+end
+
+def fun_l4_n981()
+ fun_l5_n42
+end
+
+def fun_l4_n982()
+ fun_l5_n335
+end
+
+def fun_l4_n983()
+ fun_l5_n446
+end
+
+def fun_l4_n984()
+ fun_l5_n957
+end
+
+def fun_l4_n985()
+ fun_l5_n652
+end
+
+def fun_l4_n986()
+ fun_l5_n341
+end
+
+def fun_l4_n987()
+ fun_l5_n300
+end
+
+def fun_l4_n988()
+ fun_l5_n859
+end
+
+def fun_l4_n989()
+ fun_l5_n467
+end
+
+def fun_l4_n990()
+ fun_l5_n182
+end
+
+def fun_l4_n991()
+ fun_l5_n755
+end
+
+def fun_l4_n992()
+ fun_l5_n925
+end
+
+def fun_l4_n993()
+ fun_l5_n695
+end
+
+def fun_l4_n994()
+ fun_l5_n901
+end
+
+def fun_l4_n995()
+ fun_l5_n844
+end
+
+def fun_l4_n996()
+ fun_l5_n430
+end
+
+def fun_l4_n997()
+ fun_l5_n568
+end
+
+def fun_l4_n998()
+ fun_l5_n472
+end
+
+def fun_l4_n999()
+ fun_l5_n871
+end
+
+def fun_l5_n0()
+ fun_l6_n383
+end
+
+def fun_l5_n1()
+ fun_l6_n172
+end
+
+def fun_l5_n2()
+ fun_l6_n405
+end
+
+def fun_l5_n3()
+ fun_l6_n960
+end
+
+def fun_l5_n4()
+ fun_l6_n846
+end
+
+def fun_l5_n5()
+ fun_l6_n207
+end
+
+def fun_l5_n6()
+ fun_l6_n217
+end
+
+def fun_l5_n7()
+ fun_l6_n317
+end
+
+def fun_l5_n8()
+ fun_l6_n628
+end
+
+def fun_l5_n9()
+ fun_l6_n407
+end
+
+def fun_l5_n10()
+ fun_l6_n933
+end
+
+def fun_l5_n11()
+ fun_l6_n318
+end
+
+def fun_l5_n12()
+ fun_l6_n349
+end
+
+def fun_l5_n13()
+ fun_l6_n559
+end
+
+def fun_l5_n14()
+ fun_l6_n352
+end
+
+def fun_l5_n15()
+ fun_l6_n531
+end
+
+def fun_l5_n16()
+ fun_l6_n6
+end
+
+def fun_l5_n17()
+ fun_l6_n285
+end
+
+def fun_l5_n18()
+ fun_l6_n419
+end
+
+def fun_l5_n19()
+ fun_l6_n232
+end
+
+def fun_l5_n20()
+ fun_l6_n285
+end
+
+def fun_l5_n21()
+ fun_l6_n814
+end
+
+def fun_l5_n22()
+ fun_l6_n773
+end
+
+def fun_l5_n23()
+ fun_l6_n771
+end
+
+def fun_l5_n24()
+ fun_l6_n903
+end
+
+def fun_l5_n25()
+ fun_l6_n116
+end
+
+def fun_l5_n26()
+ fun_l6_n116
+end
+
+def fun_l5_n27()
+ fun_l6_n531
+end
+
+def fun_l5_n28()
+ fun_l6_n418
+end
+
+def fun_l5_n29()
+ fun_l6_n564
+end
+
+def fun_l5_n30()
+ fun_l6_n691
+end
+
+def fun_l5_n31()
+ fun_l6_n267
+end
+
+def fun_l5_n32()
+ fun_l6_n209
+end
+
+def fun_l5_n33()
+ fun_l6_n27
+end
+
+def fun_l5_n34()
+ fun_l6_n312
+end
+
+def fun_l5_n35()
+ fun_l6_n240
+end
+
+def fun_l5_n36()
+ fun_l6_n507
+end
+
+def fun_l5_n37()
+ fun_l6_n808
+end
+
+def fun_l5_n38()
+ fun_l6_n28
+end
+
+def fun_l5_n39()
+ fun_l6_n33
+end
+
+def fun_l5_n40()
+ fun_l6_n808
+end
+
+def fun_l5_n41()
+ fun_l6_n15
+end
+
+def fun_l5_n42()
+ fun_l6_n995
+end
+
+def fun_l5_n43()
+ fun_l6_n886
+end
+
+def fun_l5_n44()
+ fun_l6_n164
+end
+
+def fun_l5_n45()
+ fun_l6_n804
+end
+
+def fun_l5_n46()
+ fun_l6_n776
+end
+
+def fun_l5_n47()
+ fun_l6_n584
+end
+
+def fun_l5_n48()
+ fun_l6_n220
+end
+
+def fun_l5_n49()
+ fun_l6_n680
+end
+
+def fun_l5_n50()
+ fun_l6_n438
+end
+
+def fun_l5_n51()
+ fun_l6_n565
+end
+
+def fun_l5_n52()
+ fun_l6_n394
+end
+
+def fun_l5_n53()
+ fun_l6_n867
+end
+
+def fun_l5_n54()
+ fun_l6_n468
+end
+
+def fun_l5_n55()
+ fun_l6_n622
+end
+
+def fun_l5_n56()
+ fun_l6_n846
+end
+
+def fun_l5_n57()
+ fun_l6_n718
+end
+
+def fun_l5_n58()
+ fun_l6_n367
+end
+
+def fun_l5_n59()
+ fun_l6_n284
+end
+
+def fun_l5_n60()
+ fun_l6_n350
+end
+
+def fun_l5_n61()
+ fun_l6_n849
+end
+
+def fun_l5_n62()
+ fun_l6_n537
+end
+
+def fun_l5_n63()
+ fun_l6_n475
+end
+
+def fun_l5_n64()
+ fun_l6_n525
+end
+
+def fun_l5_n65()
+ fun_l6_n416
+end
+
+def fun_l5_n66()
+ fun_l6_n261
+end
+
+def fun_l5_n67()
+ fun_l6_n528
+end
+
+def fun_l5_n68()
+ fun_l6_n331
+end
+
+def fun_l5_n69()
+ fun_l6_n387
+end
+
+def fun_l5_n70()
+ fun_l6_n780
+end
+
+def fun_l5_n71()
+ fun_l6_n542
+end
+
+def fun_l5_n72()
+ fun_l6_n930
+end
+
+def fun_l5_n73()
+ fun_l6_n79
+end
+
+def fun_l5_n74()
+ fun_l6_n351
+end
+
+def fun_l5_n75()
+ fun_l6_n290
+end
+
+def fun_l5_n76()
+ fun_l6_n659
+end
+
+def fun_l5_n77()
+ fun_l6_n421
+end
+
+def fun_l5_n78()
+ fun_l6_n454
+end
+
+def fun_l5_n79()
+ fun_l6_n78
+end
+
+def fun_l5_n80()
+ fun_l6_n63
+end
+
+def fun_l5_n81()
+ fun_l6_n555
+end
+
+def fun_l5_n82()
+ fun_l6_n54
+end
+
+def fun_l5_n83()
+ fun_l6_n46
+end
+
+def fun_l5_n84()
+ fun_l6_n225
+end
+
+def fun_l5_n85()
+ fun_l6_n330
+end
+
+def fun_l5_n86()
+ fun_l6_n772
+end
+
+def fun_l5_n87()
+ fun_l6_n654
+end
+
+def fun_l5_n88()
+ fun_l6_n281
+end
+
+def fun_l5_n89()
+ fun_l6_n857
+end
+
+def fun_l5_n90()
+ fun_l6_n453
+end
+
+def fun_l5_n91()
+ fun_l6_n504
+end
+
+def fun_l5_n92()
+ fun_l6_n649
+end
+
+def fun_l5_n93()
+ fun_l6_n90
+end
+
+def fun_l5_n94()
+ fun_l6_n520
+end
+
+def fun_l5_n95()
+ fun_l6_n251
+end
+
+def fun_l5_n96()
+ fun_l6_n738
+end
+
+def fun_l5_n97()
+ fun_l6_n837
+end
+
+def fun_l5_n98()
+ fun_l6_n98
+end
+
+def fun_l5_n99()
+ fun_l6_n844
+end
+
+def fun_l5_n100()
+ fun_l6_n699
+end
+
+def fun_l5_n101()
+ fun_l6_n901
+end
+
+def fun_l5_n102()
+ fun_l6_n342
+end
+
+def fun_l5_n103()
+ fun_l6_n856
+end
+
+def fun_l5_n104()
+ fun_l6_n113
+end
+
+def fun_l5_n105()
+ fun_l6_n530
+end
+
+def fun_l5_n106()
+ fun_l6_n445
+end
+
+def fun_l5_n107()
+ fun_l6_n515
+end
+
+def fun_l5_n108()
+ fun_l6_n958
+end
+
+def fun_l5_n109()
+ fun_l6_n561
+end
+
+def fun_l5_n110()
+ fun_l6_n130
+end
+
+def fun_l5_n111()
+ fun_l6_n653
+end
+
+def fun_l5_n112()
+ fun_l6_n367
+end
+
+def fun_l5_n113()
+ fun_l6_n515
+end
+
+def fun_l5_n114()
+ fun_l6_n50
+end
+
+def fun_l5_n115()
+ fun_l6_n259
+end
+
+def fun_l5_n116()
+ fun_l6_n280
+end
+
+def fun_l5_n117()
+ fun_l6_n589
+end
+
+def fun_l5_n118()
+ fun_l6_n988
+end
+
+def fun_l5_n119()
+ fun_l6_n544
+end
+
+def fun_l5_n120()
+ fun_l6_n564
+end
+
+def fun_l5_n121()
+ fun_l6_n468
+end
+
+def fun_l5_n122()
+ fun_l6_n586
+end
+
+def fun_l5_n123()
+ fun_l6_n705
+end
+
+def fun_l5_n124()
+ fun_l6_n510
+end
+
+def fun_l5_n125()
+ fun_l6_n995
+end
+
+def fun_l5_n126()
+ fun_l6_n576
+end
+
+def fun_l5_n127()
+ fun_l6_n221
+end
+
+def fun_l5_n128()
+ fun_l6_n498
+end
+
+def fun_l5_n129()
+ fun_l6_n113
+end
+
+def fun_l5_n130()
+ fun_l6_n916
+end
+
+def fun_l5_n131()
+ fun_l6_n626
+end
+
+def fun_l5_n132()
+ fun_l6_n635
+end
+
+def fun_l5_n133()
+ fun_l6_n605
+end
+
+def fun_l5_n134()
+ fun_l6_n931
+end
+
+def fun_l5_n135()
+ fun_l6_n282
+end
+
+def fun_l5_n136()
+ fun_l6_n904
+end
+
+def fun_l5_n137()
+ fun_l6_n522
+end
+
+def fun_l5_n138()
+ fun_l6_n255
+end
+
+def fun_l5_n139()
+ fun_l6_n308
+end
+
+def fun_l5_n140()
+ fun_l6_n482
+end
+
+def fun_l5_n141()
+ fun_l6_n911
+end
+
+def fun_l5_n142()
+ fun_l6_n640
+end
+
+def fun_l5_n143()
+ fun_l6_n783
+end
+
+def fun_l5_n144()
+ fun_l6_n980
+end
+
+def fun_l5_n145()
+ fun_l6_n85
+end
+
+def fun_l5_n146()
+ fun_l6_n181
+end
+
+def fun_l5_n147()
+ fun_l6_n963
+end
+
+def fun_l5_n148()
+ fun_l6_n516
+end
+
+def fun_l5_n149()
+ fun_l6_n315
+end
+
+def fun_l5_n150()
+ fun_l6_n822
+end
+
+def fun_l5_n151()
+ fun_l6_n528
+end
+
+def fun_l5_n152()
+ fun_l6_n220
+end
+
+def fun_l5_n153()
+ fun_l6_n13
+end
+
+def fun_l5_n154()
+ fun_l6_n172
+end
+
+def fun_l5_n155()
+ fun_l6_n987
+end
+
+def fun_l5_n156()
+ fun_l6_n414
+end
+
+def fun_l5_n157()
+ fun_l6_n758
+end
+
+def fun_l5_n158()
+ fun_l6_n889
+end
+
+def fun_l5_n159()
+ fun_l6_n526
+end
+
+def fun_l5_n160()
+ fun_l6_n576
+end
+
+def fun_l5_n161()
+ fun_l6_n35
+end
+
+def fun_l5_n162()
+ fun_l6_n382
+end
+
+def fun_l5_n163()
+ fun_l6_n503
+end
+
+def fun_l5_n164()
+ fun_l6_n950
+end
+
+def fun_l5_n165()
+ fun_l6_n796
+end
+
+def fun_l5_n166()
+ fun_l6_n72
+end
+
+def fun_l5_n167()
+ fun_l6_n258
+end
+
+def fun_l5_n168()
+ fun_l6_n624
+end
+
+def fun_l5_n169()
+ fun_l6_n146
+end
+
+def fun_l5_n170()
+ fun_l6_n202
+end
+
+def fun_l5_n171()
+ fun_l6_n18
+end
+
+def fun_l5_n172()
+ fun_l6_n822
+end
+
+def fun_l5_n173()
+ fun_l6_n839
+end
+
+def fun_l5_n174()
+ fun_l6_n201
+end
+
+def fun_l5_n175()
+ fun_l6_n109
+end
+
+def fun_l5_n176()
+ fun_l6_n265
+end
+
+def fun_l5_n177()
+ fun_l6_n899
+end
+
+def fun_l5_n178()
+ fun_l6_n805
+end
+
+def fun_l5_n179()
+ fun_l6_n245
+end
+
+def fun_l5_n180()
+ fun_l6_n309
+end
+
+def fun_l5_n181()
+ fun_l6_n31
+end
+
+def fun_l5_n182()
+ fun_l6_n642
+end
+
+def fun_l5_n183()
+ fun_l6_n552
+end
+
+def fun_l5_n184()
+ fun_l6_n217
+end
+
+def fun_l5_n185()
+ fun_l6_n382
+end
+
+def fun_l5_n186()
+ fun_l6_n642
+end
+
+def fun_l5_n187()
+ fun_l6_n415
+end
+
+def fun_l5_n188()
+ fun_l6_n246
+end
+
+def fun_l5_n189()
+ fun_l6_n754
+end
+
+def fun_l5_n190()
+ fun_l6_n869
+end
+
+def fun_l5_n191()
+ fun_l6_n944
+end
+
+def fun_l5_n192()
+ fun_l6_n558
+end
+
+def fun_l5_n193()
+ fun_l6_n548
+end
+
+def fun_l5_n194()
+ fun_l6_n156
+end
+
+def fun_l5_n195()
+ fun_l6_n507
+end
+
+def fun_l5_n196()
+ fun_l6_n897
+end
+
+def fun_l5_n197()
+ fun_l6_n297
+end
+
+def fun_l5_n198()
+ fun_l6_n775
+end
+
+def fun_l5_n199()
+ fun_l6_n897
+end
+
+def fun_l5_n200()
+ fun_l6_n232
+end
+
+def fun_l5_n201()
+ fun_l6_n341
+end
+
+def fun_l5_n202()
+ fun_l6_n881
+end
+
+def fun_l5_n203()
+ fun_l6_n757
+end
+
+def fun_l5_n204()
+ fun_l6_n673
+end
+
+def fun_l5_n205()
+ fun_l6_n753
+end
+
+def fun_l5_n206()
+ fun_l6_n191
+end
+
+def fun_l5_n207()
+ fun_l6_n768
+end
+
+def fun_l5_n208()
+ fun_l6_n963
+end
+
+def fun_l5_n209()
+ fun_l6_n102
+end
+
+def fun_l5_n210()
+ fun_l6_n355
+end
+
+def fun_l5_n211()
+ fun_l6_n838
+end
+
+def fun_l5_n212()
+ fun_l6_n388
+end
+
+def fun_l5_n213()
+ fun_l6_n840
+end
+
+def fun_l5_n214()
+ fun_l6_n501
+end
+
+def fun_l5_n215()
+ fun_l6_n792
+end
+
+def fun_l5_n216()
+ fun_l6_n360
+end
+
+def fun_l5_n217()
+ fun_l6_n70
+end
+
+def fun_l5_n218()
+ fun_l6_n887
+end
+
+def fun_l5_n219()
+ fun_l6_n57
+end
+
+def fun_l5_n220()
+ fun_l6_n595
+end
+
+def fun_l5_n221()
+ fun_l6_n988
+end
+
+def fun_l5_n222()
+ fun_l6_n191
+end
+
+def fun_l5_n223()
+ fun_l6_n667
+end
+
+def fun_l5_n224()
+ fun_l6_n410
+end
+
+def fun_l5_n225()
+ fun_l6_n636
+end
+
+def fun_l5_n226()
+ fun_l6_n669
+end
+
+def fun_l5_n227()
+ fun_l6_n980
+end
+
+def fun_l5_n228()
+ fun_l6_n521
+end
+
+def fun_l5_n229()
+ fun_l6_n707
+end
+
+def fun_l5_n230()
+ fun_l6_n757
+end
+
+def fun_l5_n231()
+ fun_l6_n360
+end
+
+def fun_l5_n232()
+ fun_l6_n480
+end
+
+def fun_l5_n233()
+ fun_l6_n8
+end
+
+def fun_l5_n234()
+ fun_l6_n47
+end
+
+def fun_l5_n235()
+ fun_l6_n985
+end
+
+def fun_l5_n236()
+ fun_l6_n331
+end
+
+def fun_l5_n237()
+ fun_l6_n314
+end
+
+def fun_l5_n238()
+ fun_l6_n666
+end
+
+def fun_l5_n239()
+ fun_l6_n289
+end
+
+def fun_l5_n240()
+ fun_l6_n487
+end
+
+def fun_l5_n241()
+ fun_l6_n298
+end
+
+def fun_l5_n242()
+ fun_l6_n460
+end
+
+def fun_l5_n243()
+ fun_l6_n63
+end
+
+def fun_l5_n244()
+ fun_l6_n898
+end
+
+def fun_l5_n245()
+ fun_l6_n706
+end
+
+def fun_l5_n246()
+ fun_l6_n276
+end
+
+def fun_l5_n247()
+ fun_l6_n709
+end
+
+def fun_l5_n248()
+ fun_l6_n60
+end
+
+def fun_l5_n249()
+ fun_l6_n53
+end
+
+def fun_l5_n250()
+ fun_l6_n396
+end
+
+def fun_l5_n251()
+ fun_l6_n124
+end
+
+def fun_l5_n252()
+ fun_l6_n713
+end
+
+def fun_l5_n253()
+ fun_l6_n208
+end
+
+def fun_l5_n254()
+ fun_l6_n345
+end
+
+def fun_l5_n255()
+ fun_l6_n976
+end
+
+def fun_l5_n256()
+ fun_l6_n775
+end
+
+def fun_l5_n257()
+ fun_l6_n20
+end
+
+def fun_l5_n258()
+ fun_l6_n476
+end
+
+def fun_l5_n259()
+ fun_l6_n80
+end
+
+def fun_l5_n260()
+ fun_l6_n160
+end
+
+def fun_l5_n261()
+ fun_l6_n624
+end
+
+def fun_l5_n262()
+ fun_l6_n275
+end
+
+def fun_l5_n263()
+ fun_l6_n301
+end
+
+def fun_l5_n264()
+ fun_l6_n640
+end
+
+def fun_l5_n265()
+ fun_l6_n473
+end
+
+def fun_l5_n266()
+ fun_l6_n991
+end
+
+def fun_l5_n267()
+ fun_l6_n458
+end
+
+def fun_l5_n268()
+ fun_l6_n128
+end
+
+def fun_l5_n269()
+ fun_l6_n28
+end
+
+def fun_l5_n270()
+ fun_l6_n40
+end
+
+def fun_l5_n271()
+ fun_l6_n48
+end
+
+def fun_l5_n272()
+ fun_l6_n916
+end
+
+def fun_l5_n273()
+ fun_l6_n114
+end
+
+def fun_l5_n274()
+ fun_l6_n747
+end
+
+def fun_l5_n275()
+ fun_l6_n239
+end
+
+def fun_l5_n276()
+ fun_l6_n151
+end
+
+def fun_l5_n277()
+ fun_l6_n820
+end
+
+def fun_l5_n278()
+ fun_l6_n684
+end
+
+def fun_l5_n279()
+ fun_l6_n628
+end
+
+def fun_l5_n280()
+ fun_l6_n248
+end
+
+def fun_l5_n281()
+ fun_l6_n793
+end
+
+def fun_l5_n282()
+ fun_l6_n137
+end
+
+def fun_l5_n283()
+ fun_l6_n520
+end
+
+def fun_l5_n284()
+ fun_l6_n750
+end
+
+def fun_l5_n285()
+ fun_l6_n445
+end
+
+def fun_l5_n286()
+ fun_l6_n419
+end
+
+def fun_l5_n287()
+ fun_l6_n681
+end
+
+def fun_l5_n288()
+ fun_l6_n16
+end
+
+def fun_l5_n289()
+ fun_l6_n939
+end
+
+def fun_l5_n290()
+ fun_l6_n664
+end
+
+def fun_l5_n291()
+ fun_l6_n580
+end
+
+def fun_l5_n292()
+ fun_l6_n945
+end
+
+def fun_l5_n293()
+ fun_l6_n129
+end
+
+def fun_l5_n294()
+ fun_l6_n142
+end
+
+def fun_l5_n295()
+ fun_l6_n774
+end
+
+def fun_l5_n296()
+ fun_l6_n667
+end
+
+def fun_l5_n297()
+ fun_l6_n659
+end
+
+def fun_l5_n298()
+ fun_l6_n82
+end
+
+def fun_l5_n299()
+ fun_l6_n452
+end
+
+def fun_l5_n300()
+ fun_l6_n340
+end
+
+def fun_l5_n301()
+ fun_l6_n675
+end
+
+def fun_l5_n302()
+ fun_l6_n506
+end
+
+def fun_l5_n303()
+ fun_l6_n166
+end
+
+def fun_l5_n304()
+ fun_l6_n220
+end
+
+def fun_l5_n305()
+ fun_l6_n894
+end
+
+def fun_l5_n306()
+ fun_l6_n467
+end
+
+def fun_l5_n307()
+ fun_l6_n204
+end
+
+def fun_l5_n308()
+ fun_l6_n580
+end
+
+def fun_l5_n309()
+ fun_l6_n90
+end
+
+def fun_l5_n310()
+ fun_l6_n854
+end
+
+def fun_l5_n311()
+ fun_l6_n384
+end
+
+def fun_l5_n312()
+ fun_l6_n540
+end
+
+def fun_l5_n313()
+ fun_l6_n314
+end
+
+def fun_l5_n314()
+ fun_l6_n90
+end
+
+def fun_l5_n315()
+ fun_l6_n106
+end
+
+def fun_l5_n316()
+ fun_l6_n404
+end
+
+def fun_l5_n317()
+ fun_l6_n396
+end
+
+def fun_l5_n318()
+ fun_l6_n229
+end
+
+def fun_l5_n319()
+ fun_l6_n137
+end
+
+def fun_l5_n320()
+ fun_l6_n781
+end
+
+def fun_l5_n321()
+ fun_l6_n949
+end
+
+def fun_l5_n322()
+ fun_l6_n810
+end
+
+def fun_l5_n323()
+ fun_l6_n574
+end
+
+def fun_l5_n324()
+ fun_l6_n465
+end
+
+def fun_l5_n325()
+ fun_l6_n785
+end
+
+def fun_l5_n326()
+ fun_l6_n408
+end
+
+def fun_l5_n327()
+ fun_l6_n658
+end
+
+def fun_l5_n328()
+ fun_l6_n1
+end
+
+def fun_l5_n329()
+ fun_l6_n586
+end
+
+def fun_l5_n330()
+ fun_l6_n375
+end
+
+def fun_l5_n331()
+ fun_l6_n950
+end
+
+def fun_l5_n332()
+ fun_l6_n924
+end
+
+def fun_l5_n333()
+ fun_l6_n224
+end
+
+def fun_l5_n334()
+ fun_l6_n786
+end
+
+def fun_l5_n335()
+ fun_l6_n184
+end
+
+def fun_l5_n336()
+ fun_l6_n125
+end
+
+def fun_l5_n337()
+ fun_l6_n215
+end
+
+def fun_l5_n338()
+ fun_l6_n110
+end
+
+def fun_l5_n339()
+ fun_l6_n16
+end
+
+def fun_l5_n340()
+ fun_l6_n746
+end
+
+def fun_l5_n341()
+ fun_l6_n50
+end
+
+def fun_l5_n342()
+ fun_l6_n198
+end
+
+def fun_l5_n343()
+ fun_l6_n735
+end
+
+def fun_l5_n344()
+ fun_l6_n260
+end
+
+def fun_l5_n345()
+ fun_l6_n481
+end
+
+def fun_l5_n346()
+ fun_l6_n100
+end
+
+def fun_l5_n347()
+ fun_l6_n581
+end
+
+def fun_l5_n348()
+ fun_l6_n803
+end
+
+def fun_l5_n349()
+ fun_l6_n495
+end
+
+def fun_l5_n350()
+ fun_l6_n316
+end
+
+def fun_l5_n351()
+ fun_l6_n810
+end
+
+def fun_l5_n352()
+ fun_l6_n21
+end
+
+def fun_l5_n353()
+ fun_l6_n409
+end
+
+def fun_l5_n354()
+ fun_l6_n814
+end
+
+def fun_l5_n355()
+ fun_l6_n525
+end
+
+def fun_l5_n356()
+ fun_l6_n445
+end
+
+def fun_l5_n357()
+ fun_l6_n940
+end
+
+def fun_l5_n358()
+ fun_l6_n508
+end
+
+def fun_l5_n359()
+ fun_l6_n511
+end
+
+def fun_l5_n360()
+ fun_l6_n29
+end
+
+def fun_l5_n361()
+ fun_l6_n272
+end
+
+def fun_l5_n362()
+ fun_l6_n715
+end
+
+def fun_l5_n363()
+ fun_l6_n518
+end
+
+def fun_l5_n364()
+ fun_l6_n392
+end
+
+def fun_l5_n365()
+ fun_l6_n762
+end
+
+def fun_l5_n366()
+ fun_l6_n250
+end
+
+def fun_l5_n367()
+ fun_l6_n192
+end
+
+def fun_l5_n368()
+ fun_l6_n741
+end
+
+def fun_l5_n369()
+ fun_l6_n340
+end
+
+def fun_l5_n370()
+ fun_l6_n891
+end
+
+def fun_l5_n371()
+ fun_l6_n22
+end
+
+def fun_l5_n372()
+ fun_l6_n369
+end
+
+def fun_l5_n373()
+ fun_l6_n653
+end
+
+def fun_l5_n374()
+ fun_l6_n282
+end
+
+def fun_l5_n375()
+ fun_l6_n7
+end
+
+def fun_l5_n376()
+ fun_l6_n511
+end
+
+def fun_l5_n377()
+ fun_l6_n511
+end
+
+def fun_l5_n378()
+ fun_l6_n718
+end
+
+def fun_l5_n379()
+ fun_l6_n521
+end
+
+def fun_l5_n380()
+ fun_l6_n331
+end
+
+def fun_l5_n381()
+ fun_l6_n343
+end
+
+def fun_l5_n382()
+ fun_l6_n411
+end
+
+def fun_l5_n383()
+ fun_l6_n780
+end
+
+def fun_l5_n384()
+ fun_l6_n398
+end
+
+def fun_l5_n385()
+ fun_l6_n173
+end
+
+def fun_l5_n386()
+ fun_l6_n693
+end
+
+def fun_l5_n387()
+ fun_l6_n360
+end
+
+def fun_l5_n388()
+ fun_l6_n146
+end
+
+def fun_l5_n389()
+ fun_l6_n796
+end
+
+def fun_l5_n390()
+ fun_l6_n403
+end
+
+def fun_l5_n391()
+ fun_l6_n662
+end
+
+def fun_l5_n392()
+ fun_l6_n281
+end
+
+def fun_l5_n393()
+ fun_l6_n617
+end
+
+def fun_l5_n394()
+ fun_l6_n367
+end
+
+def fun_l5_n395()
+ fun_l6_n433
+end
+
+def fun_l5_n396()
+ fun_l6_n748
+end
+
+def fun_l5_n397()
+ fun_l6_n600
+end
+
+def fun_l5_n398()
+ fun_l6_n490
+end
+
+def fun_l5_n399()
+ fun_l6_n120
+end
+
+def fun_l5_n400()
+ fun_l6_n549
+end
+
+def fun_l5_n401()
+ fun_l6_n148
+end
+
+def fun_l5_n402()
+ fun_l6_n488
+end
+
+def fun_l5_n403()
+ fun_l6_n316
+end
+
+def fun_l5_n404()
+ fun_l6_n106
+end
+
+def fun_l5_n405()
+ fun_l6_n702
+end
+
+def fun_l5_n406()
+ fun_l6_n787
+end
+
+def fun_l5_n407()
+ fun_l6_n9
+end
+
+def fun_l5_n408()
+ fun_l6_n338
+end
+
+def fun_l5_n409()
+ fun_l6_n83
+end
+
+def fun_l5_n410()
+ fun_l6_n234
+end
+
+def fun_l5_n411()
+ fun_l6_n147
+end
+
+def fun_l5_n412()
+ fun_l6_n602
+end
+
+def fun_l5_n413()
+ fun_l6_n173
+end
+
+def fun_l5_n414()
+ fun_l6_n420
+end
+
+def fun_l5_n415()
+ fun_l6_n214
+end
+
+def fun_l5_n416()
+ fun_l6_n400
+end
+
+def fun_l5_n417()
+ fun_l6_n35
+end
+
+def fun_l5_n418()
+ fun_l6_n545
+end
+
+def fun_l5_n419()
+ fun_l6_n823
+end
+
+def fun_l5_n420()
+ fun_l6_n401
+end
+
+def fun_l5_n421()
+ fun_l6_n447
+end
+
+def fun_l5_n422()
+ fun_l6_n461
+end
+
+def fun_l5_n423()
+ fun_l6_n447
+end
+
+def fun_l5_n424()
+ fun_l6_n530
+end
+
+def fun_l5_n425()
+ fun_l6_n104
+end
+
+def fun_l5_n426()
+ fun_l6_n206
+end
+
+def fun_l5_n427()
+ fun_l6_n25
+end
+
+def fun_l5_n428()
+ fun_l6_n867
+end
+
+def fun_l5_n429()
+ fun_l6_n160
+end
+
+def fun_l5_n430()
+ fun_l6_n152
+end
+
+def fun_l5_n431()
+ fun_l6_n308
+end
+
+def fun_l5_n432()
+ fun_l6_n603
+end
+
+def fun_l5_n433()
+ fun_l6_n270
+end
+
+def fun_l5_n434()
+ fun_l6_n397
+end
+
+def fun_l5_n435()
+ fun_l6_n819
+end
+
+def fun_l5_n436()
+ fun_l6_n476
+end
+
+def fun_l5_n437()
+ fun_l6_n533
+end
+
+def fun_l5_n438()
+ fun_l6_n989
+end
+
+def fun_l5_n439()
+ fun_l6_n329
+end
+
+def fun_l5_n440()
+ fun_l6_n216
+end
+
+def fun_l5_n441()
+ fun_l6_n54
+end
+
+def fun_l5_n442()
+ fun_l6_n374
+end
+
+def fun_l5_n443()
+ fun_l6_n544
+end
+
+def fun_l5_n444()
+ fun_l6_n586
+end
+
+def fun_l5_n445()
+ fun_l6_n137
+end
+
+def fun_l5_n446()
+ fun_l6_n115
+end
+
+def fun_l5_n447()
+ fun_l6_n908
+end
+
+def fun_l5_n448()
+ fun_l6_n657
+end
+
+def fun_l5_n449()
+ fun_l6_n876
+end
+
+def fun_l5_n450()
+ fun_l6_n585
+end
+
+def fun_l5_n451()
+ fun_l6_n159
+end
+
+def fun_l5_n452()
+ fun_l6_n66
+end
+
+def fun_l5_n453()
+ fun_l6_n327
+end
+
+def fun_l5_n454()
+ fun_l6_n441
+end
+
+def fun_l5_n455()
+ fun_l6_n399
+end
+
+def fun_l5_n456()
+ fun_l6_n335
+end
+
+def fun_l5_n457()
+ fun_l6_n820
+end
+
+def fun_l5_n458()
+ fun_l6_n494
+end
+
+def fun_l5_n459()
+ fun_l6_n683
+end
+
+def fun_l5_n460()
+ fun_l6_n453
+end
+
+def fun_l5_n461()
+ fun_l6_n202
+end
+
+def fun_l5_n462()
+ fun_l6_n274
+end
+
+def fun_l5_n463()
+ fun_l6_n493
+end
+
+def fun_l5_n464()
+ fun_l6_n874
+end
+
+def fun_l5_n465()
+ fun_l6_n882
+end
+
+def fun_l5_n466()
+ fun_l6_n706
+end
+
+def fun_l5_n467()
+ fun_l6_n356
+end
+
+def fun_l5_n468()
+ fun_l6_n21
+end
+
+def fun_l5_n469()
+ fun_l6_n131
+end
+
+def fun_l5_n470()
+ fun_l6_n818
+end
+
+def fun_l5_n471()
+ fun_l6_n58
+end
+
+def fun_l5_n472()
+ fun_l6_n606
+end
+
+def fun_l5_n473()
+ fun_l6_n368
+end
+
+def fun_l5_n474()
+ fun_l6_n266
+end
+
+def fun_l5_n475()
+ fun_l6_n910
+end
+
+def fun_l5_n476()
+ fun_l6_n406
+end
+
+def fun_l5_n477()
+ fun_l6_n522
+end
+
+def fun_l5_n478()
+ fun_l6_n479
+end
+
+def fun_l5_n479()
+ fun_l6_n247
+end
+
+def fun_l5_n480()
+ fun_l6_n785
+end
+
+def fun_l5_n481()
+ fun_l6_n953
+end
+
+def fun_l5_n482()
+ fun_l6_n443
+end
+
+def fun_l5_n483()
+ fun_l6_n834
+end
+
+def fun_l5_n484()
+ fun_l6_n494
+end
+
+def fun_l5_n485()
+ fun_l6_n65
+end
+
+def fun_l5_n486()
+ fun_l6_n93
+end
+
+def fun_l5_n487()
+ fun_l6_n702
+end
+
+def fun_l5_n488()
+ fun_l6_n571
+end
+
+def fun_l5_n489()
+ fun_l6_n233
+end
+
+def fun_l5_n490()
+ fun_l6_n106
+end
+
+def fun_l5_n491()
+ fun_l6_n806
+end
+
+def fun_l5_n492()
+ fun_l6_n795
+end
+
+def fun_l5_n493()
+ fun_l6_n273
+end
+
+def fun_l5_n494()
+ fun_l6_n943
+end
+
+def fun_l5_n495()
+ fun_l6_n710
+end
+
+def fun_l5_n496()
+ fun_l6_n419
+end
+
+def fun_l5_n497()
+ fun_l6_n758
+end
+
+def fun_l5_n498()
+ fun_l6_n677
+end
+
+def fun_l5_n499()
+ fun_l6_n573
+end
+
+def fun_l5_n500()
+ fun_l6_n576
+end
+
+def fun_l5_n501()
+ fun_l6_n654
+end
+
+def fun_l5_n502()
+ fun_l6_n497
+end
+
+def fun_l5_n503()
+ fun_l6_n75
+end
+
+def fun_l5_n504()
+ fun_l6_n660
+end
+
+def fun_l5_n505()
+ fun_l6_n923
+end
+
+def fun_l5_n506()
+ fun_l6_n250
+end
+
+def fun_l5_n507()
+ fun_l6_n648
+end
+
+def fun_l5_n508()
+ fun_l6_n785
+end
+
+def fun_l5_n509()
+ fun_l6_n158
+end
+
+def fun_l5_n510()
+ fun_l6_n564
+end
+
+def fun_l5_n511()
+ fun_l6_n916
+end
+
+def fun_l5_n512()
+ fun_l6_n943
+end
+
+def fun_l5_n513()
+ fun_l6_n468
+end
+
+def fun_l5_n514()
+ fun_l6_n165
+end
+
+def fun_l5_n515()
+ fun_l6_n566
+end
+
+def fun_l5_n516()
+ fun_l6_n280
+end
+
+def fun_l5_n517()
+ fun_l6_n998
+end
+
+def fun_l5_n518()
+ fun_l6_n282
+end
+
+def fun_l5_n519()
+ fun_l6_n419
+end
+
+def fun_l5_n520()
+ fun_l6_n10
+end
+
+def fun_l5_n521()
+ fun_l6_n298
+end
+
+def fun_l5_n522()
+ fun_l6_n571
+end
+
+def fun_l5_n523()
+ fun_l6_n873
+end
+
+def fun_l5_n524()
+ fun_l6_n165
+end
+
+def fun_l5_n525()
+ fun_l6_n807
+end
+
+def fun_l5_n526()
+ fun_l6_n194
+end
+
+def fun_l5_n527()
+ fun_l6_n410
+end
+
+def fun_l5_n528()
+ fun_l6_n377
+end
+
+def fun_l5_n529()
+ fun_l6_n328
+end
+
+def fun_l5_n530()
+ fun_l6_n322
+end
+
+def fun_l5_n531()
+ fun_l6_n760
+end
+
+def fun_l5_n532()
+ fun_l6_n738
+end
+
+def fun_l5_n533()
+ fun_l6_n388
+end
+
+def fun_l5_n534()
+ fun_l6_n609
+end
+
+def fun_l5_n535()
+ fun_l6_n808
+end
+
+def fun_l5_n536()
+ fun_l6_n686
+end
+
+def fun_l5_n537()
+ fun_l6_n825
+end
+
+def fun_l5_n538()
+ fun_l6_n940
+end
+
+def fun_l5_n539()
+ fun_l6_n147
+end
+
+def fun_l5_n540()
+ fun_l6_n851
+end
+
+def fun_l5_n541()
+ fun_l6_n983
+end
+
+def fun_l5_n542()
+ fun_l6_n938
+end
+
+def fun_l5_n543()
+ fun_l6_n323
+end
+
+def fun_l5_n544()
+ fun_l6_n662
+end
+
+def fun_l5_n545()
+ fun_l6_n611
+end
+
+def fun_l5_n546()
+ fun_l6_n185
+end
+
+def fun_l5_n547()
+ fun_l6_n321
+end
+
+def fun_l5_n548()
+ fun_l6_n353
+end
+
+def fun_l5_n549()
+ fun_l6_n240
+end
+
+def fun_l5_n550()
+ fun_l6_n69
+end
+
+def fun_l5_n551()
+ fun_l6_n58
+end
+
+def fun_l5_n552()
+ fun_l6_n108
+end
+
+def fun_l5_n553()
+ fun_l6_n169
+end
+
+def fun_l5_n554()
+ fun_l6_n649
+end
+
+def fun_l5_n555()
+ fun_l6_n28
+end
+
+def fun_l5_n556()
+ fun_l6_n136
+end
+
+def fun_l5_n557()
+ fun_l6_n958
+end
+
+def fun_l5_n558()
+ fun_l6_n107
+end
+
+def fun_l5_n559()
+ fun_l6_n495
+end
+
+def fun_l5_n560()
+ fun_l6_n927
+end
+
+def fun_l5_n561()
+ fun_l6_n994
+end
+
+def fun_l5_n562()
+ fun_l6_n134
+end
+
+def fun_l5_n563()
+ fun_l6_n393
+end
+
+def fun_l5_n564()
+ fun_l6_n73
+end
+
+def fun_l5_n565()
+ fun_l6_n860
+end
+
+def fun_l5_n566()
+ fun_l6_n763
+end
+
+def fun_l5_n567()
+ fun_l6_n545
+end
+
+def fun_l5_n568()
+ fun_l6_n429
+end
+
+def fun_l5_n569()
+ fun_l6_n430
+end
+
+def fun_l5_n570()
+ fun_l6_n50
+end
+
+def fun_l5_n571()
+ fun_l6_n574
+end
+
+def fun_l5_n572()
+ fun_l6_n195
+end
+
+def fun_l5_n573()
+ fun_l6_n327
+end
+
+def fun_l5_n574()
+ fun_l6_n207
+end
+
+def fun_l5_n575()
+ fun_l6_n669
+end
+
+def fun_l5_n576()
+ fun_l6_n978
+end
+
+def fun_l5_n577()
+ fun_l6_n60
+end
+
+def fun_l5_n578()
+ fun_l6_n561
+end
+
+def fun_l5_n579()
+ fun_l6_n298
+end
+
+def fun_l5_n580()
+ fun_l6_n790
+end
+
+def fun_l5_n581()
+ fun_l6_n887
+end
+
+def fun_l5_n582()
+ fun_l6_n516
+end
+
+def fun_l5_n583()
+ fun_l6_n895
+end
+
+def fun_l5_n584()
+ fun_l6_n345
+end
+
+def fun_l5_n585()
+ fun_l6_n117
+end
+
+def fun_l5_n586()
+ fun_l6_n493
+end
+
+def fun_l5_n587()
+ fun_l6_n84
+end
+
+def fun_l5_n588()
+ fun_l6_n62
+end
+
+def fun_l5_n589()
+ fun_l6_n91
+end
+
+def fun_l5_n590()
+ fun_l6_n113
+end
+
+def fun_l5_n591()
+ fun_l6_n568
+end
+
+def fun_l5_n592()
+ fun_l6_n273
+end
+
+def fun_l5_n593()
+ fun_l6_n557
+end
+
+def fun_l5_n594()
+ fun_l6_n528
+end
+
+def fun_l5_n595()
+ fun_l6_n283
+end
+
+def fun_l5_n596()
+ fun_l6_n962
+end
+
+def fun_l5_n597()
+ fun_l6_n140
+end
+
+def fun_l5_n598()
+ fun_l6_n780
+end
+
+def fun_l5_n599()
+ fun_l6_n220
+end
+
+def fun_l5_n600()
+ fun_l6_n43
+end
+
+def fun_l5_n601()
+ fun_l6_n256
+end
+
+def fun_l5_n602()
+ fun_l6_n619
+end
+
+def fun_l5_n603()
+ fun_l6_n873
+end
+
+def fun_l5_n604()
+ fun_l6_n975
+end
+
+def fun_l5_n605()
+ fun_l6_n308
+end
+
+def fun_l5_n606()
+ fun_l6_n519
+end
+
+def fun_l5_n607()
+ fun_l6_n356
+end
+
+def fun_l5_n608()
+ fun_l6_n7
+end
+
+def fun_l5_n609()
+ fun_l6_n161
+end
+
+def fun_l5_n610()
+ fun_l6_n122
+end
+
+def fun_l5_n611()
+ fun_l6_n311
+end
+
+def fun_l5_n612()
+ fun_l6_n130
+end
+
+def fun_l5_n613()
+ fun_l6_n603
+end
+
+def fun_l5_n614()
+ fun_l6_n53
+end
+
+def fun_l5_n615()
+ fun_l6_n478
+end
+
+def fun_l5_n616()
+ fun_l6_n585
+end
+
+def fun_l5_n617()
+ fun_l6_n639
+end
+
+def fun_l5_n618()
+ fun_l6_n943
+end
+
+def fun_l5_n619()
+ fun_l6_n432
+end
+
+def fun_l5_n620()
+ fun_l6_n959
+end
+
+def fun_l5_n621()
+ fun_l6_n220
+end
+
+def fun_l5_n622()
+ fun_l6_n243
+end
+
+def fun_l5_n623()
+ fun_l6_n755
+end
+
+def fun_l5_n624()
+ fun_l6_n312
+end
+
+def fun_l5_n625()
+ fun_l6_n61
+end
+
+def fun_l5_n626()
+ fun_l6_n290
+end
+
+def fun_l5_n627()
+ fun_l6_n452
+end
+
+def fun_l5_n628()
+ fun_l6_n225
+end
+
+def fun_l5_n629()
+ fun_l6_n69
+end
+
+def fun_l5_n630()
+ fun_l6_n329
+end
+
+def fun_l5_n631()
+ fun_l6_n24
+end
+
+def fun_l5_n632()
+ fun_l6_n798
+end
+
+def fun_l5_n633()
+ fun_l6_n931
+end
+
+def fun_l5_n634()
+ fun_l6_n801
+end
+
+def fun_l5_n635()
+ fun_l6_n725
+end
+
+def fun_l5_n636()
+ fun_l6_n839
+end
+
+def fun_l5_n637()
+ fun_l6_n870
+end
+
+def fun_l5_n638()
+ fun_l6_n847
+end
+
+def fun_l5_n639()
+ fun_l6_n448
+end
+
+def fun_l5_n640()
+ fun_l6_n46
+end
+
+def fun_l5_n641()
+ fun_l6_n359
+end
+
+def fun_l5_n642()
+ fun_l6_n102
+end
+
+def fun_l5_n643()
+ fun_l6_n149
+end
+
+def fun_l5_n644()
+ fun_l6_n126
+end
+
+def fun_l5_n645()
+ fun_l6_n72
+end
+
+def fun_l5_n646()
+ fun_l6_n320
+end
+
+def fun_l5_n647()
+ fun_l6_n483
+end
+
+def fun_l5_n648()
+ fun_l6_n797
+end
+
+def fun_l5_n649()
+ fun_l6_n130
+end
+
+def fun_l5_n650()
+ fun_l6_n711
+end
+
+def fun_l5_n651()
+ fun_l6_n979
+end
+
+def fun_l5_n652()
+ fun_l6_n534
+end
+
+def fun_l5_n653()
+ fun_l6_n335
+end
+
+def fun_l5_n654()
+ fun_l6_n181
+end
+
+def fun_l5_n655()
+ fun_l6_n435
+end
+
+def fun_l5_n656()
+ fun_l6_n412
+end
+
+def fun_l5_n657()
+ fun_l6_n247
+end
+
+def fun_l5_n658()
+ fun_l6_n450
+end
+
+def fun_l5_n659()
+ fun_l6_n367
+end
+
+def fun_l5_n660()
+ fun_l6_n220
+end
+
+def fun_l5_n661()
+ fun_l6_n410
+end
+
+def fun_l5_n662()
+ fun_l6_n739
+end
+
+def fun_l5_n663()
+ fun_l6_n846
+end
+
+def fun_l5_n664()
+ fun_l6_n238
+end
+
+def fun_l5_n665()
+ fun_l6_n419
+end
+
+def fun_l5_n666()
+ fun_l6_n687
+end
+
+def fun_l5_n667()
+ fun_l6_n229
+end
+
+def fun_l5_n668()
+ fun_l6_n129
+end
+
+def fun_l5_n669()
+ fun_l6_n767
+end
+
+def fun_l5_n670()
+ fun_l6_n809
+end
+
+def fun_l5_n671()
+ fun_l6_n301
+end
+
+def fun_l5_n672()
+ fun_l6_n268
+end
+
+def fun_l5_n673()
+ fun_l6_n635
+end
+
+def fun_l5_n674()
+ fun_l6_n623
+end
+
+def fun_l5_n675()
+ fun_l6_n601
+end
+
+def fun_l5_n676()
+ fun_l6_n464
+end
+
+def fun_l5_n677()
+ fun_l6_n285
+end
+
+def fun_l5_n678()
+ fun_l6_n536
+end
+
+def fun_l5_n679()
+ fun_l6_n233
+end
+
+def fun_l5_n680()
+ fun_l6_n78
+end
+
+def fun_l5_n681()
+ fun_l6_n644
+end
+
+def fun_l5_n682()
+ fun_l6_n289
+end
+
+def fun_l5_n683()
+ fun_l6_n314
+end
+
+def fun_l5_n684()
+ fun_l6_n743
+end
+
+def fun_l5_n685()
+ fun_l6_n444
+end
+
+def fun_l5_n686()
+ fun_l6_n645
+end
+
+def fun_l5_n687()
+ fun_l6_n800
+end
+
+def fun_l5_n688()
+ fun_l6_n507
+end
+
+def fun_l5_n689()
+ fun_l6_n675
+end
+
+def fun_l5_n690()
+ fun_l6_n231
+end
+
+def fun_l5_n691()
+ fun_l6_n595
+end
+
+def fun_l5_n692()
+ fun_l6_n675
+end
+
+def fun_l5_n693()
+ fun_l6_n555
+end
+
+def fun_l5_n694()
+ fun_l6_n35
+end
+
+def fun_l5_n695()
+ fun_l6_n342
+end
+
+def fun_l5_n696()
+ fun_l6_n250
+end
+
+def fun_l5_n697()
+ fun_l6_n706
+end
+
+def fun_l5_n698()
+ fun_l6_n550
+end
+
+def fun_l5_n699()
+ fun_l6_n446
+end
+
+def fun_l5_n700()
+ fun_l6_n190
+end
+
+def fun_l5_n701()
+ fun_l6_n404
+end
+
+def fun_l5_n702()
+ fun_l6_n545
+end
+
+def fun_l5_n703()
+ fun_l6_n721
+end
+
+def fun_l5_n704()
+ fun_l6_n681
+end
+
+def fun_l5_n705()
+ fun_l6_n760
+end
+
+def fun_l5_n706()
+ fun_l6_n853
+end
+
+def fun_l5_n707()
+ fun_l6_n847
+end
+
+def fun_l5_n708()
+ fun_l6_n661
+end
+
+def fun_l5_n709()
+ fun_l6_n257
+end
+
+def fun_l5_n710()
+ fun_l6_n151
+end
+
+def fun_l5_n711()
+ fun_l6_n120
+end
+
+def fun_l5_n712()
+ fun_l6_n701
+end
+
+def fun_l5_n713()
+ fun_l6_n89
+end
+
+def fun_l5_n714()
+ fun_l6_n443
+end
+
+def fun_l5_n715()
+ fun_l6_n969
+end
+
+def fun_l5_n716()
+ fun_l6_n879
+end
+
+def fun_l5_n717()
+ fun_l6_n525
+end
+
+def fun_l5_n718()
+ fun_l6_n471
+end
+
+def fun_l5_n719()
+ fun_l6_n762
+end
+
+def fun_l5_n720()
+ fun_l6_n803
+end
+
+def fun_l5_n721()
+ fun_l6_n741
+end
+
+def fun_l5_n722()
+ fun_l6_n279
+end
+
+def fun_l5_n723()
+ fun_l6_n903
+end
+
+def fun_l5_n724()
+ fun_l6_n20
+end
+
+def fun_l5_n725()
+ fun_l6_n930
+end
+
+def fun_l5_n726()
+ fun_l6_n504
+end
+
+def fun_l5_n727()
+ fun_l6_n978
+end
+
+def fun_l5_n728()
+ fun_l6_n304
+end
+
+def fun_l5_n729()
+ fun_l6_n133
+end
+
+def fun_l5_n730()
+ fun_l6_n430
+end
+
+def fun_l5_n731()
+ fun_l6_n917
+end
+
+def fun_l5_n732()
+ fun_l6_n987
+end
+
+def fun_l5_n733()
+ fun_l6_n24
+end
+
+def fun_l5_n734()
+ fun_l6_n884
+end
+
+def fun_l5_n735()
+ fun_l6_n928
+end
+
+def fun_l5_n736()
+ fun_l6_n126
+end
+
+def fun_l5_n737()
+ fun_l6_n425
+end
+
+def fun_l5_n738()
+ fun_l6_n113
+end
+
+def fun_l5_n739()
+ fun_l6_n779
+end
+
+def fun_l5_n740()
+ fun_l6_n649
+end
+
+def fun_l5_n741()
+ fun_l6_n352
+end
+
+def fun_l5_n742()
+ fun_l6_n369
+end
+
+def fun_l5_n743()
+ fun_l6_n13
+end
+
+def fun_l5_n744()
+ fun_l6_n460
+end
+
+def fun_l5_n745()
+ fun_l6_n476
+end
+
+def fun_l5_n746()
+ fun_l6_n146
+end
+
+def fun_l5_n747()
+ fun_l6_n38
+end
+
+def fun_l5_n748()
+ fun_l6_n86
+end
+
+def fun_l5_n749()
+ fun_l6_n875
+end
+
+def fun_l5_n750()
+ fun_l6_n812
+end
+
+def fun_l5_n751()
+ fun_l6_n282
+end
+
+def fun_l5_n752()
+ fun_l6_n474
+end
+
+def fun_l5_n753()
+ fun_l6_n546
+end
+
+def fun_l5_n754()
+ fun_l6_n107
+end
+
+def fun_l5_n755()
+ fun_l6_n550
+end
+
+def fun_l5_n756()
+ fun_l6_n868
+end
+
+def fun_l5_n757()
+ fun_l6_n149
+end
+
+def fun_l5_n758()
+ fun_l6_n662
+end
+
+def fun_l5_n759()
+ fun_l6_n642
+end
+
+def fun_l5_n760()
+ fun_l6_n760
+end
+
+def fun_l5_n761()
+ fun_l6_n530
+end
+
+def fun_l5_n762()
+ fun_l6_n765
+end
+
+def fun_l5_n763()
+ fun_l6_n634
+end
+
+def fun_l5_n764()
+ fun_l6_n946
+end
+
+def fun_l5_n765()
+ fun_l6_n423
+end
+
+def fun_l5_n766()
+ fun_l6_n478
+end
+
+def fun_l5_n767()
+ fun_l6_n142
+end
+
+def fun_l5_n768()
+ fun_l6_n550
+end
+
+def fun_l5_n769()
+ fun_l6_n610
+end
+
+def fun_l5_n770()
+ fun_l6_n340
+end
+
+def fun_l5_n771()
+ fun_l6_n29
+end
+
+def fun_l5_n772()
+ fun_l6_n164
+end
+
+def fun_l5_n773()
+ fun_l6_n476
+end
+
+def fun_l5_n774()
+ fun_l6_n48
+end
+
+def fun_l5_n775()
+ fun_l6_n123
+end
+
+def fun_l5_n776()
+ fun_l6_n879
+end
+
+def fun_l5_n777()
+ fun_l6_n958
+end
+
+def fun_l5_n778()
+ fun_l6_n100
+end
+
+def fun_l5_n779()
+ fun_l6_n927
+end
+
+def fun_l5_n780()
+ fun_l6_n105
+end
+
+def fun_l5_n781()
+ fun_l6_n360
+end
+
+def fun_l5_n782()
+ fun_l6_n327
+end
+
+def fun_l5_n783()
+ fun_l6_n677
+end
+
+def fun_l5_n784()
+ fun_l6_n378
+end
+
+def fun_l5_n785()
+ fun_l6_n9
+end
+
+def fun_l5_n786()
+ fun_l6_n692
+end
+
+def fun_l5_n787()
+ fun_l6_n952
+end
+
+def fun_l5_n788()
+ fun_l6_n156
+end
+
+def fun_l5_n789()
+ fun_l6_n222
+end
+
+def fun_l5_n790()
+ fun_l6_n419
+end
+
+def fun_l5_n791()
+ fun_l6_n128
+end
+
+def fun_l5_n792()
+ fun_l6_n311
+end
+
+def fun_l5_n793()
+ fun_l6_n610
+end
+
+def fun_l5_n794()
+ fun_l6_n897
+end
+
+def fun_l5_n795()
+ fun_l6_n806
+end
+
+def fun_l5_n796()
+ fun_l6_n291
+end
+
+def fun_l5_n797()
+ fun_l6_n942
+end
+
+def fun_l5_n798()
+ fun_l6_n208
+end
+
+def fun_l5_n799()
+ fun_l6_n776
+end
+
+def fun_l5_n800()
+ fun_l6_n866
+end
+
+def fun_l5_n801()
+ fun_l6_n132
+end
+
+def fun_l5_n802()
+ fun_l6_n436
+end
+
+def fun_l5_n803()
+ fun_l6_n804
+end
+
+def fun_l5_n804()
+ fun_l6_n810
+end
+
+def fun_l5_n805()
+ fun_l6_n302
+end
+
+def fun_l5_n806()
+ fun_l6_n501
+end
+
+def fun_l5_n807()
+ fun_l6_n812
+end
+
+def fun_l5_n808()
+ fun_l6_n861
+end
+
+def fun_l5_n809()
+ fun_l6_n359
+end
+
+def fun_l5_n810()
+ fun_l6_n366
+end
+
+def fun_l5_n811()
+ fun_l6_n855
+end
+
+def fun_l5_n812()
+ fun_l6_n960
+end
+
+def fun_l5_n813()
+ fun_l6_n868
+end
+
+def fun_l5_n814()
+ fun_l6_n101
+end
+
+def fun_l5_n815()
+ fun_l6_n540
+end
+
+def fun_l5_n816()
+ fun_l6_n486
+end
+
+def fun_l5_n817()
+ fun_l6_n896
+end
+
+def fun_l5_n818()
+ fun_l6_n240
+end
+
+def fun_l5_n819()
+ fun_l6_n425
+end
+
+def fun_l5_n820()
+ fun_l6_n408
+end
+
+def fun_l5_n821()
+ fun_l6_n779
+end
+
+def fun_l5_n822()
+ fun_l6_n486
+end
+
+def fun_l5_n823()
+ fun_l6_n903
+end
+
+def fun_l5_n824()
+ fun_l6_n957
+end
+
+def fun_l5_n825()
+ fun_l6_n213
+end
+
+def fun_l5_n826()
+ fun_l6_n326
+end
+
+def fun_l5_n827()
+ fun_l6_n944
+end
+
+def fun_l5_n828()
+ fun_l6_n772
+end
+
+def fun_l5_n829()
+ fun_l6_n879
+end
+
+def fun_l5_n830()
+ fun_l6_n406
+end
+
+def fun_l5_n831()
+ fun_l6_n488
+end
+
+def fun_l5_n832()
+ fun_l6_n615
+end
+
+def fun_l5_n833()
+ fun_l6_n113
+end
+
+def fun_l5_n834()
+ fun_l6_n826
+end
+
+def fun_l5_n835()
+ fun_l6_n621
+end
+
+def fun_l5_n836()
+ fun_l6_n520
+end
+
+def fun_l5_n837()
+ fun_l6_n729
+end
+
+def fun_l5_n838()
+ fun_l6_n83
+end
+
+def fun_l5_n839()
+ fun_l6_n616
+end
+
+def fun_l5_n840()
+ fun_l6_n477
+end
+
+def fun_l5_n841()
+ fun_l6_n25
+end
+
+def fun_l5_n842()
+ fun_l6_n391
+end
+
+def fun_l5_n843()
+ fun_l6_n974
+end
+
+def fun_l5_n844()
+ fun_l6_n970
+end
+
+def fun_l5_n845()
+ fun_l6_n316
+end
+
+def fun_l5_n846()
+ fun_l6_n596
+end
+
+def fun_l5_n847()
+ fun_l6_n518
+end
+
+def fun_l5_n848()
+ fun_l6_n437
+end
+
+def fun_l5_n849()
+ fun_l6_n268
+end
+
+def fun_l5_n850()
+ fun_l6_n347
+end
+
+def fun_l5_n851()
+ fun_l6_n110
+end
+
+def fun_l5_n852()
+ fun_l6_n783
+end
+
+def fun_l5_n853()
+ fun_l6_n503
+end
+
+def fun_l5_n854()
+ fun_l6_n56
+end
+
+def fun_l5_n855()
+ fun_l6_n294
+end
+
+def fun_l5_n856()
+ fun_l6_n145
+end
+
+def fun_l5_n857()
+ fun_l6_n627
+end
+
+def fun_l5_n858()
+ fun_l6_n917
+end
+
+def fun_l5_n859()
+ fun_l6_n242
+end
+
+def fun_l5_n860()
+ fun_l6_n35
+end
+
+def fun_l5_n861()
+ fun_l6_n883
+end
+
+def fun_l5_n862()
+ fun_l6_n766
+end
+
+def fun_l5_n863()
+ fun_l6_n877
+end
+
+def fun_l5_n864()
+ fun_l6_n974
+end
+
+def fun_l5_n865()
+ fun_l6_n525
+end
+
+def fun_l5_n866()
+ fun_l6_n490
+end
+
+def fun_l5_n867()
+ fun_l6_n920
+end
+
+def fun_l5_n868()
+ fun_l6_n28
+end
+
+def fun_l5_n869()
+ fun_l6_n855
+end
+
+def fun_l5_n870()
+ fun_l6_n246
+end
+
+def fun_l5_n871()
+ fun_l6_n60
+end
+
+def fun_l5_n872()
+ fun_l6_n868
+end
+
+def fun_l5_n873()
+ fun_l6_n706
+end
+
+def fun_l5_n874()
+ fun_l6_n629
+end
+
+def fun_l5_n875()
+ fun_l6_n44
+end
+
+def fun_l5_n876()
+ fun_l6_n521
+end
+
+def fun_l5_n877()
+ fun_l6_n607
+end
+
+def fun_l5_n878()
+ fun_l6_n385
+end
+
+def fun_l5_n879()
+ fun_l6_n109
+end
+
+def fun_l5_n880()
+ fun_l6_n296
+end
+
+def fun_l5_n881()
+ fun_l6_n466
+end
+
+def fun_l5_n882()
+ fun_l6_n933
+end
+
+def fun_l5_n883()
+ fun_l6_n529
+end
+
+def fun_l5_n884()
+ fun_l6_n863
+end
+
+def fun_l5_n885()
+ fun_l6_n112
+end
+
+def fun_l5_n886()
+ fun_l6_n262
+end
+
+def fun_l5_n887()
+ fun_l6_n853
+end
+
+def fun_l5_n888()
+ fun_l6_n657
+end
+
+def fun_l5_n889()
+ fun_l6_n860
+end
+
+def fun_l5_n890()
+ fun_l6_n878
+end
+
+def fun_l5_n891()
+ fun_l6_n810
+end
+
+def fun_l5_n892()
+ fun_l6_n285
+end
+
+def fun_l5_n893()
+ fun_l6_n319
+end
+
+def fun_l5_n894()
+ fun_l6_n927
+end
+
+def fun_l5_n895()
+ fun_l6_n530
+end
+
+def fun_l5_n896()
+ fun_l6_n874
+end
+
+def fun_l5_n897()
+ fun_l6_n522
+end
+
+def fun_l5_n898()
+ fun_l6_n31
+end
+
+def fun_l5_n899()
+ fun_l6_n292
+end
+
+def fun_l5_n900()
+ fun_l6_n847
+end
+
+def fun_l5_n901()
+ fun_l6_n989
+end
+
+def fun_l5_n902()
+ fun_l6_n435
+end
+
+def fun_l5_n903()
+ fun_l6_n368
+end
+
+def fun_l5_n904()
+ fun_l6_n320
+end
+
+def fun_l5_n905()
+ fun_l6_n889
+end
+
+def fun_l5_n906()
+ fun_l6_n101
+end
+
+def fun_l5_n907()
+ fun_l6_n717
+end
+
+def fun_l5_n908()
+ fun_l6_n456
+end
+
+def fun_l5_n909()
+ fun_l6_n448
+end
+
+def fun_l5_n910()
+ fun_l6_n523
+end
+
+def fun_l5_n911()
+ fun_l6_n604
+end
+
+def fun_l5_n912()
+ fun_l6_n429
+end
+
+def fun_l5_n913()
+ fun_l6_n947
+end
+
+def fun_l5_n914()
+ fun_l6_n804
+end
+
+def fun_l5_n915()
+ fun_l6_n665
+end
+
+def fun_l5_n916()
+ fun_l6_n195
+end
+
+def fun_l5_n917()
+ fun_l6_n803
+end
+
+def fun_l5_n918()
+ fun_l6_n957
+end
+
+def fun_l5_n919()
+ fun_l6_n187
+end
+
+def fun_l5_n920()
+ fun_l6_n489
+end
+
+def fun_l5_n921()
+ fun_l6_n315
+end
+
+def fun_l5_n922()
+ fun_l6_n216
+end
+
+def fun_l5_n923()
+ fun_l6_n482
+end
+
+def fun_l5_n924()
+ fun_l6_n20
+end
+
+def fun_l5_n925()
+ fun_l6_n941
+end
+
+def fun_l5_n926()
+ fun_l6_n73
+end
+
+def fun_l5_n927()
+ fun_l6_n563
+end
+
+def fun_l5_n928()
+ fun_l6_n179
+end
+
+def fun_l5_n929()
+ fun_l6_n861
+end
+
+def fun_l5_n930()
+ fun_l6_n811
+end
+
+def fun_l5_n931()
+ fun_l6_n996
+end
+
+def fun_l5_n932()
+ fun_l6_n25
+end
+
+def fun_l5_n933()
+ fun_l6_n232
+end
+
+def fun_l5_n934()
+ fun_l6_n671
+end
+
+def fun_l5_n935()
+ fun_l6_n162
+end
+
+def fun_l5_n936()
+ fun_l6_n363
+end
+
+def fun_l5_n937()
+ fun_l6_n517
+end
+
+def fun_l5_n938()
+ fun_l6_n655
+end
+
+def fun_l5_n939()
+ fun_l6_n825
+end
+
+def fun_l5_n940()
+ fun_l6_n58
+end
+
+def fun_l5_n941()
+ fun_l6_n440
+end
+
+def fun_l5_n942()
+ fun_l6_n106
+end
+
+def fun_l5_n943()
+ fun_l6_n218
+end
+
+def fun_l5_n944()
+ fun_l6_n580
+end
+
+def fun_l5_n945()
+ fun_l6_n63
+end
+
+def fun_l5_n946()
+ fun_l6_n116
+end
+
+def fun_l5_n947()
+ fun_l6_n329
+end
+
+def fun_l5_n948()
+ fun_l6_n511
+end
+
+def fun_l5_n949()
+ fun_l6_n499
+end
+
+def fun_l5_n950()
+ fun_l6_n469
+end
+
+def fun_l5_n951()
+ fun_l6_n18
+end
+
+def fun_l5_n952()
+ fun_l6_n200
+end
+
+def fun_l5_n953()
+ fun_l6_n924
+end
+
+def fun_l5_n954()
+ fun_l6_n879
+end
+
+def fun_l5_n955()
+ fun_l6_n959
+end
+
+def fun_l5_n956()
+ fun_l6_n867
+end
+
+def fun_l5_n957()
+ fun_l6_n650
+end
+
+def fun_l5_n958()
+ fun_l6_n481
+end
+
+def fun_l5_n959()
+ fun_l6_n892
+end
+
+def fun_l5_n960()
+ fun_l6_n499
+end
+
+def fun_l5_n961()
+ fun_l6_n406
+end
+
+def fun_l5_n962()
+ fun_l6_n762
+end
+
+def fun_l5_n963()
+ fun_l6_n479
+end
+
+def fun_l5_n964()
+ fun_l6_n869
+end
+
+def fun_l5_n965()
+ fun_l6_n321
+end
+
+def fun_l5_n966()
+ fun_l6_n722
+end
+
+def fun_l5_n967()
+ fun_l6_n834
+end
+
+def fun_l5_n968()
+ fun_l6_n873
+end
+
+def fun_l5_n969()
+ fun_l6_n295
+end
+
+def fun_l5_n970()
+ fun_l6_n394
+end
+
+def fun_l5_n971()
+ fun_l6_n944
+end
+
+def fun_l5_n972()
+ fun_l6_n335
+end
+
+def fun_l5_n973()
+ fun_l6_n958
+end
+
+def fun_l5_n974()
+ fun_l6_n159
+end
+
+def fun_l5_n975()
+ fun_l6_n336
+end
+
+def fun_l5_n976()
+ fun_l6_n979
+end
+
+def fun_l5_n977()
+ fun_l6_n106
+end
+
+def fun_l5_n978()
+ fun_l6_n587
+end
+
+def fun_l5_n979()
+ fun_l6_n693
+end
+
+def fun_l5_n980()
+ fun_l6_n633
+end
+
+def fun_l5_n981()
+ fun_l6_n359
+end
+
+def fun_l5_n982()
+ fun_l6_n118
+end
+
+def fun_l5_n983()
+ fun_l6_n689
+end
+
+def fun_l5_n984()
+ fun_l6_n398
+end
+
+def fun_l5_n985()
+ fun_l6_n985
+end
+
+def fun_l5_n986()
+ fun_l6_n381
+end
+
+def fun_l5_n987()
+ fun_l6_n322
+end
+
+def fun_l5_n988()
+ fun_l6_n817
+end
+
+def fun_l5_n989()
+ fun_l6_n793
+end
+
+def fun_l5_n990()
+ fun_l6_n619
+end
+
+def fun_l5_n991()
+ fun_l6_n876
+end
+
+def fun_l5_n992()
+ fun_l6_n390
+end
+
+def fun_l5_n993()
+ fun_l6_n58
+end
+
+def fun_l5_n994()
+ fun_l6_n545
+end
+
+def fun_l5_n995()
+ fun_l6_n364
+end
+
+def fun_l5_n996()
+ fun_l6_n849
+end
+
+def fun_l5_n997()
+ fun_l6_n185
+end
+
+def fun_l5_n998()
+ fun_l6_n56
+end
+
+def fun_l5_n999()
+ fun_l6_n156
+end
+
+def fun_l6_n0()
+ fun_l7_n367
+end
+
+def fun_l6_n1()
+ fun_l7_n681
+end
+
+def fun_l6_n2()
+ fun_l7_n170
+end
+
+def fun_l6_n3()
+ fun_l7_n39
+end
+
+def fun_l6_n4()
+ fun_l7_n320
+end
+
+def fun_l6_n5()
+ fun_l7_n862
+end
+
+def fun_l6_n6()
+ fun_l7_n604
+end
+
+def fun_l6_n7()
+ fun_l7_n816
+end
+
+def fun_l6_n8()
+ fun_l7_n31
+end
+
+def fun_l6_n9()
+ fun_l7_n285
+end
+
+def fun_l6_n10()
+ fun_l7_n74
+end
+
+def fun_l6_n11()
+ fun_l7_n638
+end
+
+def fun_l6_n12()
+ fun_l7_n471
+end
+
+def fun_l6_n13()
+ fun_l7_n909
+end
+
+def fun_l6_n14()
+ fun_l7_n677
+end
+
+def fun_l6_n15()
+ fun_l7_n603
+end
+
+def fun_l6_n16()
+ fun_l7_n670
+end
+
+def fun_l6_n17()
+ fun_l7_n270
+end
+
+def fun_l6_n18()
+ fun_l7_n10
+end
+
+def fun_l6_n19()
+ fun_l7_n963
+end
+
+def fun_l6_n20()
+ fun_l7_n517
+end
+
+def fun_l6_n21()
+ fun_l7_n956
+end
+
+def fun_l6_n22()
+ fun_l7_n13
+end
+
+def fun_l6_n23()
+ fun_l7_n157
+end
+
+def fun_l6_n24()
+ fun_l7_n828
+end
+
+def fun_l6_n25()
+ fun_l7_n895
+end
+
+def fun_l6_n26()
+ fun_l7_n48
+end
+
+def fun_l6_n27()
+ fun_l7_n760
+end
+
+def fun_l6_n28()
+ fun_l7_n674
+end
+
+def fun_l6_n29()
+ fun_l7_n639
+end
+
+def fun_l6_n30()
+ fun_l7_n395
+end
+
+def fun_l6_n31()
+ fun_l7_n541
+end
+
+def fun_l6_n32()
+ fun_l7_n548
+end
+
+def fun_l6_n33()
+ fun_l7_n348
+end
+
+def fun_l6_n34()
+ fun_l7_n257
+end
+
+def fun_l6_n35()
+ fun_l7_n531
+end
+
+def fun_l6_n36()
+ fun_l7_n210
+end
+
+def fun_l6_n37()
+ fun_l7_n56
+end
+
+def fun_l6_n38()
+ fun_l7_n466
+end
+
+def fun_l6_n39()
+ fun_l7_n369
+end
+
+def fun_l6_n40()
+ fun_l7_n465
+end
+
+def fun_l6_n41()
+ fun_l7_n665
+end
+
+def fun_l6_n42()
+ fun_l7_n662
+end
+
+def fun_l6_n43()
+ fun_l7_n205
+end
+
+def fun_l6_n44()
+ fun_l7_n997
+end
+
+def fun_l6_n45()
+ fun_l7_n840
+end
+
+def fun_l6_n46()
+ fun_l7_n998
+end
+
+def fun_l6_n47()
+ fun_l7_n563
+end
+
+def fun_l6_n48()
+ fun_l7_n442
+end
+
+def fun_l6_n49()
+ fun_l7_n768
+end
+
+def fun_l6_n50()
+ fun_l7_n948
+end
+
+def fun_l6_n51()
+ fun_l7_n773
+end
+
+def fun_l6_n52()
+ fun_l7_n910
+end
+
+def fun_l6_n53()
+ fun_l7_n152
+end
+
+def fun_l6_n54()
+ fun_l7_n277
+end
+
+def fun_l6_n55()
+ fun_l7_n139
+end
+
+def fun_l6_n56()
+ fun_l7_n530
+end
+
+def fun_l6_n57()
+ fun_l7_n587
+end
+
+def fun_l6_n58()
+ fun_l7_n650
+end
+
+def fun_l6_n59()
+ fun_l7_n30
+end
+
+def fun_l6_n60()
+ fun_l7_n31
+end
+
+def fun_l6_n61()
+ fun_l7_n908
+end
+
+def fun_l6_n62()
+ fun_l7_n228
+end
+
+def fun_l6_n63()
+ fun_l7_n210
+end
+
+def fun_l6_n64()
+ fun_l7_n854
+end
+
+def fun_l6_n65()
+ fun_l7_n198
+end
+
+def fun_l6_n66()
+ fun_l7_n183
+end
+
+def fun_l6_n67()
+ fun_l7_n633
+end
+
+def fun_l6_n68()
+ fun_l7_n523
+end
+
+def fun_l6_n69()
+ fun_l7_n392
+end
+
+def fun_l6_n70()
+ fun_l7_n293
+end
+
+def fun_l6_n71()
+ fun_l7_n523
+end
+
+def fun_l6_n72()
+ fun_l7_n314
+end
+
+def fun_l6_n73()
+ fun_l7_n500
+end
+
+def fun_l6_n74()
+ fun_l7_n685
+end
+
+def fun_l6_n75()
+ fun_l7_n692
+end
+
+def fun_l6_n76()
+ fun_l7_n773
+end
+
+def fun_l6_n77()
+ fun_l7_n582
+end
+
+def fun_l6_n78()
+ fun_l7_n934
+end
+
+def fun_l6_n79()
+ fun_l7_n829
+end
+
+def fun_l6_n80()
+ fun_l7_n603
+end
+
+def fun_l6_n81()
+ fun_l7_n735
+end
+
+def fun_l6_n82()
+ fun_l7_n906
+end
+
+def fun_l6_n83()
+ fun_l7_n828
+end
+
+def fun_l6_n84()
+ fun_l7_n945
+end
+
+def fun_l6_n85()
+ fun_l7_n316
+end
+
+def fun_l6_n86()
+ fun_l7_n135
+end
+
+def fun_l6_n87()
+ fun_l7_n444
+end
+
+def fun_l6_n88()
+ fun_l7_n300
+end
+
+def fun_l6_n89()
+ fun_l7_n975
+end
+
+def fun_l6_n90()
+ fun_l7_n385
+end
+
+def fun_l6_n91()
+ fun_l7_n885
+end
+
+def fun_l6_n92()
+ fun_l7_n838
+end
+
+def fun_l6_n93()
+ fun_l7_n769
+end
+
+def fun_l6_n94()
+ fun_l7_n263
+end
+
+def fun_l6_n95()
+ fun_l7_n719
+end
+
+def fun_l6_n96()
+ fun_l7_n585
+end
+
+def fun_l6_n97()
+ fun_l7_n238
+end
+
+def fun_l6_n98()
+ fun_l7_n366
+end
+
+def fun_l6_n99()
+ fun_l7_n498
+end
+
+def fun_l6_n100()
+ fun_l7_n596
+end
+
+def fun_l6_n101()
+ fun_l7_n437
+end
+
+def fun_l6_n102()
+ fun_l7_n441
+end
+
+def fun_l6_n103()
+ fun_l7_n721
+end
+
+def fun_l6_n104()
+ fun_l7_n9
+end
+
+def fun_l6_n105()
+ fun_l7_n412
+end
+
+def fun_l6_n106()
+ fun_l7_n981
+end
+
+def fun_l6_n107()
+ fun_l7_n824
+end
+
+def fun_l6_n108()
+ fun_l7_n255
+end
+
+def fun_l6_n109()
+ fun_l7_n608
+end
+
+def fun_l6_n110()
+ fun_l7_n481
+end
+
+def fun_l6_n111()
+ fun_l7_n804
+end
+
+def fun_l6_n112()
+ fun_l7_n316
+end
+
+def fun_l6_n113()
+ fun_l7_n446
+end
+
+def fun_l6_n114()
+ fun_l7_n123
+end
+
+def fun_l6_n115()
+ fun_l7_n522
+end
+
+def fun_l6_n116()
+ fun_l7_n52
+end
+
+def fun_l6_n117()
+ fun_l7_n559
+end
+
+def fun_l6_n118()
+ fun_l7_n937
+end
+
+def fun_l6_n119()
+ fun_l7_n425
+end
+
+def fun_l6_n120()
+ fun_l7_n112
+end
+
+def fun_l6_n121()
+ fun_l7_n83
+end
+
+def fun_l6_n122()
+ fun_l7_n305
+end
+
+def fun_l6_n123()
+ fun_l7_n157
+end
+
+def fun_l6_n124()
+ fun_l7_n944
+end
+
+def fun_l6_n125()
+ fun_l7_n356
+end
+
+def fun_l6_n126()
+ fun_l7_n69
+end
+
+def fun_l6_n127()
+ fun_l7_n689
+end
+
+def fun_l6_n128()
+ fun_l7_n145
+end
+
+def fun_l6_n129()
+ fun_l7_n633
+end
+
+def fun_l6_n130()
+ fun_l7_n389
+end
+
+def fun_l6_n131()
+ fun_l7_n646
+end
+
+def fun_l6_n132()
+ fun_l7_n684
+end
+
+def fun_l6_n133()
+ fun_l7_n38
+end
+
+def fun_l6_n134()
+ fun_l7_n104
+end
+
+def fun_l6_n135()
+ fun_l7_n856
+end
+
+def fun_l6_n136()
+ fun_l7_n237
+end
+
+def fun_l6_n137()
+ fun_l7_n594
+end
+
+def fun_l6_n138()
+ fun_l7_n929
+end
+
+def fun_l6_n139()
+ fun_l7_n686
+end
+
+def fun_l6_n140()
+ fun_l7_n501
+end
+
+def fun_l6_n141()
+ fun_l7_n309
+end
+
+def fun_l6_n142()
+ fun_l7_n567
+end
+
+def fun_l6_n143()
+ fun_l7_n451
+end
+
+def fun_l6_n144()
+ fun_l7_n325
+end
+
+def fun_l6_n145()
+ fun_l7_n363
+end
+
+def fun_l6_n146()
+ fun_l7_n650
+end
+
+def fun_l6_n147()
+ fun_l7_n551
+end
+
+def fun_l6_n148()
+ fun_l7_n495
+end
+
+def fun_l6_n149()
+ fun_l7_n998
+end
+
+def fun_l6_n150()
+ fun_l7_n584
+end
+
+def fun_l6_n151()
+ fun_l7_n36
+end
+
+def fun_l6_n152()
+ fun_l7_n109
+end
+
+def fun_l6_n153()
+ fun_l7_n855
+end
+
+def fun_l6_n154()
+ fun_l7_n544
+end
+
+def fun_l6_n155()
+ fun_l7_n580
+end
+
+def fun_l6_n156()
+ fun_l7_n872
+end
+
+def fun_l6_n157()
+ fun_l7_n954
+end
+
+def fun_l6_n158()
+ fun_l7_n14
+end
+
+def fun_l6_n159()
+ fun_l7_n802
+end
+
+def fun_l6_n160()
+ fun_l7_n298
+end
+
+def fun_l6_n161()
+ fun_l7_n876
+end
+
+def fun_l6_n162()
+ fun_l7_n694
+end
+
+def fun_l6_n163()
+ fun_l7_n538
+end
+
+def fun_l6_n164()
+ fun_l7_n325
+end
+
+def fun_l6_n165()
+ fun_l7_n47
+end
+
+def fun_l6_n166()
+ fun_l7_n433
+end
+
+def fun_l6_n167()
+ fun_l7_n356
+end
+
+def fun_l6_n168()
+ fun_l7_n81
+end
+
+def fun_l6_n169()
+ fun_l7_n10
+end
+
+def fun_l6_n170()
+ fun_l7_n391
+end
+
+def fun_l6_n171()
+ fun_l7_n770
+end
+
+def fun_l6_n172()
+ fun_l7_n45
+end
+
+def fun_l6_n173()
+ fun_l7_n808
+end
+
+def fun_l6_n174()
+ fun_l7_n722
+end
+
+def fun_l6_n175()
+ fun_l7_n532
+end
+
+def fun_l6_n176()
+ fun_l7_n983
+end
+
+def fun_l6_n177()
+ fun_l7_n666
+end
+
+def fun_l6_n178()
+ fun_l7_n505
+end
+
+def fun_l6_n179()
+ fun_l7_n200
+end
+
+def fun_l6_n180()
+ fun_l7_n57
+end
+
+def fun_l6_n181()
+ fun_l7_n888
+end
+
+def fun_l6_n182()
+ fun_l7_n288
+end
+
+def fun_l6_n183()
+ fun_l7_n435
+end
+
+def fun_l6_n184()
+ fun_l7_n330
+end
+
+def fun_l6_n185()
+ fun_l7_n432
+end
+
+def fun_l6_n186()
+ fun_l7_n321
+end
+
+def fun_l6_n187()
+ fun_l7_n160
+end
+
+def fun_l6_n188()
+ fun_l7_n806
+end
+
+def fun_l6_n189()
+ fun_l7_n929
+end
+
+def fun_l6_n190()
+ fun_l7_n49
+end
+
+def fun_l6_n191()
+ fun_l7_n642
+end
+
+def fun_l6_n192()
+ fun_l7_n551
+end
+
+def fun_l6_n193()
+ fun_l7_n243
+end
+
+def fun_l6_n194()
+ fun_l7_n126
+end
+
+def fun_l6_n195()
+ fun_l7_n594
+end
+
+def fun_l6_n196()
+ fun_l7_n166
+end
+
+def fun_l6_n197()
+ fun_l7_n610
+end
+
+def fun_l6_n198()
+ fun_l7_n730
+end
+
+def fun_l6_n199()
+ fun_l7_n770
+end
+
+def fun_l6_n200()
+ fun_l7_n873
+end
+
+def fun_l6_n201()
+ fun_l7_n833
+end
+
+def fun_l6_n202()
+ fun_l7_n883
+end
+
+def fun_l6_n203()
+ fun_l7_n639
+end
+
+def fun_l6_n204()
+ fun_l7_n563
+end
+
+def fun_l6_n205()
+ fun_l7_n437
+end
+
+def fun_l6_n206()
+ fun_l7_n722
+end
+
+def fun_l6_n207()
+ fun_l7_n785
+end
+
+def fun_l6_n208()
+ fun_l7_n241
+end
+
+def fun_l6_n209()
+ fun_l7_n42
+end
+
+def fun_l6_n210()
+ fun_l7_n352
+end
+
+def fun_l6_n211()
+ fun_l7_n633
+end
+
+def fun_l6_n212()
+ fun_l7_n758
+end
+
+def fun_l6_n213()
+ fun_l7_n194
+end
+
+def fun_l6_n214()
+ fun_l7_n864
+end
+
+def fun_l6_n215()
+ fun_l7_n407
+end
+
+def fun_l6_n216()
+ fun_l7_n78
+end
+
+def fun_l6_n217()
+ fun_l7_n723
+end
+
+def fun_l6_n218()
+ fun_l7_n98
+end
+
+def fun_l6_n219()
+ fun_l7_n909
+end
+
+def fun_l6_n220()
+ fun_l7_n380
+end
+
+def fun_l6_n221()
+ fun_l7_n348
+end
+
+def fun_l6_n222()
+ fun_l7_n934
+end
+
+def fun_l6_n223()
+ fun_l7_n114
+end
+
+def fun_l6_n224()
+ fun_l7_n34
+end
+
+def fun_l6_n225()
+ fun_l7_n774
+end
+
+def fun_l6_n226()
+ fun_l7_n681
+end
+
+def fun_l6_n227()
+ fun_l7_n215
+end
+
+def fun_l6_n228()
+ fun_l7_n526
+end
+
+def fun_l6_n229()
+ fun_l7_n38
+end
+
+def fun_l6_n230()
+ fun_l7_n506
+end
+
+def fun_l6_n231()
+ fun_l7_n456
+end
+
+def fun_l6_n232()
+ fun_l7_n476
+end
+
+def fun_l6_n233()
+ fun_l7_n183
+end
+
+def fun_l6_n234()
+ fun_l7_n73
+end
+
+def fun_l6_n235()
+ fun_l7_n639
+end
+
+def fun_l6_n236()
+ fun_l7_n344
+end
+
+def fun_l6_n237()
+ fun_l7_n656
+end
+
+def fun_l6_n238()
+ fun_l7_n887
+end
+
+def fun_l6_n239()
+ fun_l7_n705
+end
+
+def fun_l6_n240()
+ fun_l7_n342
+end
+
+def fun_l6_n241()
+ fun_l7_n461
+end
+
+def fun_l6_n242()
+ fun_l7_n215
+end
+
+def fun_l6_n243()
+ fun_l7_n74
+end
+
+def fun_l6_n244()
+ fun_l7_n715
+end
+
+def fun_l6_n245()
+ fun_l7_n317
+end
+
+def fun_l6_n246()
+ fun_l7_n238
+end
+
+def fun_l6_n247()
+ fun_l7_n899
+end
+
+def fun_l6_n248()
+ fun_l7_n360
+end
+
+def fun_l6_n249()
+ fun_l7_n753
+end
+
+def fun_l6_n250()
+ fun_l7_n722
+end
+
+def fun_l6_n251()
+ fun_l7_n649
+end
+
+def fun_l6_n252()
+ fun_l7_n640
+end
+
+def fun_l6_n253()
+ fun_l7_n146
+end
+
+def fun_l6_n254()
+ fun_l7_n385
+end
+
+def fun_l6_n255()
+ fun_l7_n483
+end
+
+def fun_l6_n256()
+ fun_l7_n142
+end
+
+def fun_l6_n257()
+ fun_l7_n815
+end
+
+def fun_l6_n258()
+ fun_l7_n499
+end
+
+def fun_l6_n259()
+ fun_l7_n827
+end
+
+def fun_l6_n260()
+ fun_l7_n799
+end
+
+def fun_l6_n261()
+ fun_l7_n633
+end
+
+def fun_l6_n262()
+ fun_l7_n399
+end
+
+def fun_l6_n263()
+ fun_l7_n123
+end
+
+def fun_l6_n264()
+ fun_l7_n94
+end
+
+def fun_l6_n265()
+ fun_l7_n799
+end
+
+def fun_l6_n266()
+ fun_l7_n884
+end
+
+def fun_l6_n267()
+ fun_l7_n983
+end
+
+def fun_l6_n268()
+ fun_l7_n880
+end
+
+def fun_l6_n269()
+ fun_l7_n58
+end
+
+def fun_l6_n270()
+ fun_l7_n181
+end
+
+def fun_l6_n271()
+ fun_l7_n241
+end
+
+def fun_l6_n272()
+ fun_l7_n971
+end
+
+def fun_l6_n273()
+ fun_l7_n297
+end
+
+def fun_l6_n274()
+ fun_l7_n435
+end
+
+def fun_l6_n275()
+ fun_l7_n57
+end
+
+def fun_l6_n276()
+ fun_l7_n665
+end
+
+def fun_l6_n277()
+ fun_l7_n725
+end
+
+def fun_l6_n278()
+ fun_l7_n258
+end
+
+def fun_l6_n279()
+ fun_l7_n680
+end
+
+def fun_l6_n280()
+ fun_l7_n969
+end
+
+def fun_l6_n281()
+ fun_l7_n714
+end
+
+def fun_l6_n282()
+ fun_l7_n166
+end
+
+def fun_l6_n283()
+ fun_l7_n876
+end
+
+def fun_l6_n284()
+ fun_l7_n893
+end
+
+def fun_l6_n285()
+ fun_l7_n530
+end
+
+def fun_l6_n286()
+ fun_l7_n552
+end
+
+def fun_l6_n287()
+ fun_l7_n212
+end
+
+def fun_l6_n288()
+ fun_l7_n194
+end
+
+def fun_l6_n289()
+ fun_l7_n375
+end
+
+def fun_l6_n290()
+ fun_l7_n726
+end
+
+def fun_l6_n291()
+ fun_l7_n498
+end
+
+def fun_l6_n292()
+ fun_l7_n630
+end
+
+def fun_l6_n293()
+ fun_l7_n781
+end
+
+def fun_l6_n294()
+ fun_l7_n122
+end
+
+def fun_l6_n295()
+ fun_l7_n864
+end
+
+def fun_l6_n296()
+ fun_l7_n931
+end
+
+def fun_l6_n297()
+ fun_l7_n561
+end
+
+def fun_l6_n298()
+ fun_l7_n891
+end
+
+def fun_l6_n299()
+ fun_l7_n149
+end
+
+def fun_l6_n300()
+ fun_l7_n697
+end
+
+def fun_l6_n301()
+ fun_l7_n152
+end
+
+def fun_l6_n302()
+ fun_l7_n973
+end
+
+def fun_l6_n303()
+ fun_l7_n32
+end
+
+def fun_l6_n304()
+ fun_l7_n254
+end
+
+def fun_l6_n305()
+ fun_l7_n68
+end
+
+def fun_l6_n306()
+ fun_l7_n46
+end
+
+def fun_l6_n307()
+ fun_l7_n2
+end
+
+def fun_l6_n308()
+ fun_l7_n862
+end
+
+def fun_l6_n309()
+ fun_l7_n722
+end
+
+def fun_l6_n310()
+ fun_l7_n501
+end
+
+def fun_l6_n311()
+ fun_l7_n779
+end
+
+def fun_l6_n312()
+ fun_l7_n899
+end
+
+def fun_l6_n313()
+ fun_l7_n209
+end
+
+def fun_l6_n314()
+ fun_l7_n445
+end
+
+def fun_l6_n315()
+ fun_l7_n882
+end
+
+def fun_l6_n316()
+ fun_l7_n825
+end
+
+def fun_l6_n317()
+ fun_l7_n52
+end
+
+def fun_l6_n318()
+ fun_l7_n813
+end
+
+def fun_l6_n319()
+ fun_l7_n103
+end
+
+def fun_l6_n320()
+ fun_l7_n480
+end
+
+def fun_l6_n321()
+ fun_l7_n357
+end
+
+def fun_l6_n322()
+ fun_l7_n138
+end
+
+def fun_l6_n323()
+ fun_l7_n277
+end
+
+def fun_l6_n324()
+ fun_l7_n287
+end
+
+def fun_l6_n325()
+ fun_l7_n822
+end
+
+def fun_l6_n326()
+ fun_l7_n299
+end
+
+def fun_l6_n327()
+ fun_l7_n617
+end
+
+def fun_l6_n328()
+ fun_l7_n618
+end
+
+def fun_l6_n329()
+ fun_l7_n721
+end
+
+def fun_l6_n330()
+ fun_l7_n600
+end
+
+def fun_l6_n331()
+ fun_l7_n349
+end
+
+def fun_l6_n332()
+ fun_l7_n978
+end
+
+def fun_l6_n333()
+ fun_l7_n889
+end
+
+def fun_l6_n334()
+ fun_l7_n129
+end
+
+def fun_l6_n335()
+ fun_l7_n404
+end
+
+def fun_l6_n336()
+ fun_l7_n169
+end
+
+def fun_l6_n337()
+ fun_l7_n498
+end
+
+def fun_l6_n338()
+ fun_l7_n428
+end
+
+def fun_l6_n339()
+ fun_l7_n910
+end
+
+def fun_l6_n340()
+ fun_l7_n441
+end
+
+def fun_l6_n341()
+ fun_l7_n649
+end
+
+def fun_l6_n342()
+ fun_l7_n251
+end
+
+def fun_l6_n343()
+ fun_l7_n146
+end
+
+def fun_l6_n344()
+ fun_l7_n979
+end
+
+def fun_l6_n345()
+ fun_l7_n561
+end
+
+def fun_l6_n346()
+ fun_l7_n667
+end
+
+def fun_l6_n347()
+ fun_l7_n50
+end
+
+def fun_l6_n348()
+ fun_l7_n324
+end
+
+def fun_l6_n349()
+ fun_l7_n60
+end
+
+def fun_l6_n350()
+ fun_l7_n292
+end
+
+def fun_l6_n351()
+ fun_l7_n227
+end
+
+def fun_l6_n352()
+ fun_l7_n99
+end
+
+def fun_l6_n353()
+ fun_l7_n124
+end
+
+def fun_l6_n354()
+ fun_l7_n519
+end
+
+def fun_l6_n355()
+ fun_l7_n245
+end
+
+def fun_l6_n356()
+ fun_l7_n438
+end
+
+def fun_l6_n357()
+ fun_l7_n916
+end
+
+def fun_l6_n358()
+ fun_l7_n865
+end
+
+def fun_l6_n359()
+ fun_l7_n886
+end
+
+def fun_l6_n360()
+ fun_l7_n432
+end
+
+def fun_l6_n361()
+ fun_l7_n406
+end
+
+def fun_l6_n362()
+ fun_l7_n709
+end
+
+def fun_l6_n363()
+ fun_l7_n271
+end
+
+def fun_l6_n364()
+ fun_l7_n320
+end
+
+def fun_l6_n365()
+ fun_l7_n3
+end
+
+def fun_l6_n366()
+ fun_l7_n831
+end
+
+def fun_l6_n367()
+ fun_l7_n417
+end
+
+def fun_l6_n368()
+ fun_l7_n949
+end
+
+def fun_l6_n369()
+ fun_l7_n941
+end
+
+def fun_l6_n370()
+ fun_l7_n404
+end
+
+def fun_l6_n371()
+ fun_l7_n715
+end
+
+def fun_l6_n372()
+ fun_l7_n223
+end
+
+def fun_l6_n373()
+ fun_l7_n813
+end
+
+def fun_l6_n374()
+ fun_l7_n594
+end
+
+def fun_l6_n375()
+ fun_l7_n949
+end
+
+def fun_l6_n376()
+ fun_l7_n107
+end
+
+def fun_l6_n377()
+ fun_l7_n951
+end
+
+def fun_l6_n378()
+ fun_l7_n940
+end
+
+def fun_l6_n379()
+ fun_l7_n224
+end
+
+def fun_l6_n380()
+ fun_l7_n82
+end
+
+def fun_l6_n381()
+ fun_l7_n815
+end
+
+def fun_l6_n382()
+ fun_l7_n443
+end
+
+def fun_l6_n383()
+ fun_l7_n566
+end
+
+def fun_l6_n384()
+ fun_l7_n954
+end
+
+def fun_l6_n385()
+ fun_l7_n562
+end
+
+def fun_l6_n386()
+ fun_l7_n9
+end
+
+def fun_l6_n387()
+ fun_l7_n233
+end
+
+def fun_l6_n388()
+ fun_l7_n510
+end
+
+def fun_l6_n389()
+ fun_l7_n616
+end
+
+def fun_l6_n390()
+ fun_l7_n991
+end
+
+def fun_l6_n391()
+ fun_l7_n184
+end
+
+def fun_l6_n392()
+ fun_l7_n288
+end
+
+def fun_l6_n393()
+ fun_l7_n282
+end
+
+def fun_l6_n394()
+ fun_l7_n81
+end
+
+def fun_l6_n395()
+ fun_l7_n567
+end
+
+def fun_l6_n396()
+ fun_l7_n465
+end
+
+def fun_l6_n397()
+ fun_l7_n856
+end
+
+def fun_l6_n398()
+ fun_l7_n268
+end
+
+def fun_l6_n399()
+ fun_l7_n695
+end
+
+def fun_l6_n400()
+ fun_l7_n403
+end
+
+def fun_l6_n401()
+ fun_l7_n153
+end
+
+def fun_l6_n402()
+ fun_l7_n321
+end
+
+def fun_l6_n403()
+ fun_l7_n233
+end
+
+def fun_l6_n404()
+ fun_l7_n218
+end
+
+def fun_l6_n405()
+ fun_l7_n285
+end
+
+def fun_l6_n406()
+ fun_l7_n829
+end
+
+def fun_l6_n407()
+ fun_l7_n218
+end
+
+def fun_l6_n408()
+ fun_l7_n457
+end
+
+def fun_l6_n409()
+ fun_l7_n513
+end
+
+def fun_l6_n410()
+ fun_l7_n677
+end
+
+def fun_l6_n411()
+ fun_l7_n849
+end
+
+def fun_l6_n412()
+ fun_l7_n579
+end
+
+def fun_l6_n413()
+ fun_l7_n160
+end
+
+def fun_l6_n414()
+ fun_l7_n567
+end
+
+def fun_l6_n415()
+ fun_l7_n394
+end
+
+def fun_l6_n416()
+ fun_l7_n480
+end
+
+def fun_l6_n417()
+ fun_l7_n234
+end
+
+def fun_l6_n418()
+ fun_l7_n410
+end
+
+def fun_l6_n419()
+ fun_l7_n405
+end
+
+def fun_l6_n420()
+ fun_l7_n497
+end
+
+def fun_l6_n421()
+ fun_l7_n242
+end
+
+def fun_l6_n422()
+ fun_l7_n190
+end
+
+def fun_l6_n423()
+ fun_l7_n513
+end
+
+def fun_l6_n424()
+ fun_l7_n790
+end
+
+def fun_l6_n425()
+ fun_l7_n112
+end
+
+def fun_l6_n426()
+ fun_l7_n792
+end
+
+def fun_l6_n427()
+ fun_l7_n209
+end
+
+def fun_l6_n428()
+ fun_l7_n451
+end
+
+def fun_l6_n429()
+ fun_l7_n897
+end
+
+def fun_l6_n430()
+ fun_l7_n884
+end
+
+def fun_l6_n431()
+ fun_l7_n81
+end
+
+def fun_l6_n432()
+ fun_l7_n764
+end
+
+def fun_l6_n433()
+ fun_l7_n204
+end
+
+def fun_l6_n434()
+ fun_l7_n56
+end
+
+def fun_l6_n435()
+ fun_l7_n394
+end
+
+def fun_l6_n436()
+ fun_l7_n903
+end
+
+def fun_l6_n437()
+ fun_l7_n423
+end
+
+def fun_l6_n438()
+ fun_l7_n899
+end
+
+def fun_l6_n439()
+ fun_l7_n40
+end
+
+def fun_l6_n440()
+ fun_l7_n145
+end
+
+def fun_l6_n441()
+ fun_l7_n811
+end
+
+def fun_l6_n442()
+ fun_l7_n821
+end
+
+def fun_l6_n443()
+ fun_l7_n675
+end
+
+def fun_l6_n444()
+ fun_l7_n665
+end
+
+def fun_l6_n445()
+ fun_l7_n1
+end
+
+def fun_l6_n446()
+ fun_l7_n936
+end
+
+def fun_l6_n447()
+ fun_l7_n838
+end
+
+def fun_l6_n448()
+ fun_l7_n820
+end
+
+def fun_l6_n449()
+ fun_l7_n206
+end
+
+def fun_l6_n450()
+ fun_l7_n234
+end
+
+def fun_l6_n451()
+ fun_l7_n150
+end
+
+def fun_l6_n452()
+ fun_l7_n699
+end
+
+def fun_l6_n453()
+ fun_l7_n369
+end
+
+def fun_l6_n454()
+ fun_l7_n759
+end
+
+def fun_l6_n455()
+ fun_l7_n836
+end
+
+def fun_l6_n456()
+ fun_l7_n55
+end
+
+def fun_l6_n457()
+ fun_l7_n457
+end
+
+def fun_l6_n458()
+ fun_l7_n623
+end
+
+def fun_l6_n459()
+ fun_l7_n679
+end
+
+def fun_l6_n460()
+ fun_l7_n199
+end
+
+def fun_l6_n461()
+ fun_l7_n738
+end
+
+def fun_l6_n462()
+ fun_l7_n479
+end
+
+def fun_l6_n463()
+ fun_l7_n673
+end
+
+def fun_l6_n464()
+ fun_l7_n323
+end
+
+def fun_l6_n465()
+ fun_l7_n652
+end
+
+def fun_l6_n466()
+ fun_l7_n470
+end
+
+def fun_l6_n467()
+ fun_l7_n133
+end
+
+def fun_l6_n468()
+ fun_l7_n179
+end
+
+def fun_l6_n469()
+ fun_l7_n647
+end
+
+def fun_l6_n470()
+ fun_l7_n869
+end
+
+def fun_l6_n471()
+ fun_l7_n553
+end
+
+def fun_l6_n472()
+ fun_l7_n173
+end
+
+def fun_l6_n473()
+ fun_l7_n188
+end
+
+def fun_l6_n474()
+ fun_l7_n530
+end
+
+def fun_l6_n475()
+ fun_l7_n233
+end
+
+def fun_l6_n476()
+ fun_l7_n46
+end
+
+def fun_l6_n477()
+ fun_l7_n892
+end
+
+def fun_l6_n478()
+ fun_l7_n879
+end
+
+def fun_l6_n479()
+ fun_l7_n507
+end
+
+def fun_l6_n480()
+ fun_l7_n383
+end
+
+def fun_l6_n481()
+ fun_l7_n500
+end
+
+def fun_l6_n482()
+ fun_l7_n595
+end
+
+def fun_l6_n483()
+ fun_l7_n225
+end
+
+def fun_l6_n484()
+ fun_l7_n396
+end
+
+def fun_l6_n485()
+ fun_l7_n61
+end
+
+def fun_l6_n486()
+ fun_l7_n953
+end
+
+def fun_l6_n487()
+ fun_l7_n891
+end
+
+def fun_l6_n488()
+ fun_l7_n620
+end
+
+def fun_l6_n489()
+ fun_l7_n672
+end
+
+def fun_l6_n490()
+ fun_l7_n824
+end
+
+def fun_l6_n491()
+ fun_l7_n216
+end
+
+def fun_l6_n492()
+ fun_l7_n404
+end
+
+def fun_l6_n493()
+ fun_l7_n428
+end
+
+def fun_l6_n494()
+ fun_l7_n907
+end
+
+def fun_l6_n495()
+ fun_l7_n297
+end
+
+def fun_l6_n496()
+ fun_l7_n349
+end
+
+def fun_l6_n497()
+ fun_l7_n291
+end
+
+def fun_l6_n498()
+ fun_l7_n642
+end
+
+def fun_l6_n499()
+ fun_l7_n906
+end
+
+def fun_l6_n500()
+ fun_l7_n78
+end
+
+def fun_l6_n501()
+ fun_l7_n568
+end
+
+def fun_l6_n502()
+ fun_l7_n591
+end
+
+def fun_l6_n503()
+ fun_l7_n921
+end
+
+def fun_l6_n504()
+ fun_l7_n832
+end
+
+def fun_l6_n505()
+ fun_l7_n826
+end
+
+def fun_l6_n506()
+ fun_l7_n930
+end
+
+def fun_l6_n507()
+ fun_l7_n791
+end
+
+def fun_l6_n508()
+ fun_l7_n608
+end
+
+def fun_l6_n509()
+ fun_l7_n144
+end
+
+def fun_l6_n510()
+ fun_l7_n202
+end
+
+def fun_l6_n511()
+ fun_l7_n379
+end
+
+def fun_l6_n512()
+ fun_l7_n354
+end
+
+def fun_l6_n513()
+ fun_l7_n245
+end
+
+def fun_l6_n514()
+ fun_l7_n402
+end
+
+def fun_l6_n515()
+ fun_l7_n875
+end
+
+def fun_l6_n516()
+ fun_l7_n847
+end
+
+def fun_l6_n517()
+ fun_l7_n736
+end
+
+def fun_l6_n518()
+ fun_l7_n325
+end
+
+def fun_l6_n519()
+ fun_l7_n949
+end
+
+def fun_l6_n520()
+ fun_l7_n993
+end
+
+def fun_l6_n521()
+ fun_l7_n271
+end
+
+def fun_l6_n522()
+ fun_l7_n799
+end
+
+def fun_l6_n523()
+ fun_l7_n861
+end
+
+def fun_l6_n524()
+ fun_l7_n164
+end
+
+def fun_l6_n525()
+ fun_l7_n293
+end
+
+def fun_l6_n526()
+ fun_l7_n948
+end
+
+def fun_l6_n527()
+ fun_l7_n682
+end
+
+def fun_l6_n528()
+ fun_l7_n914
+end
+
+def fun_l6_n529()
+ fun_l7_n395
+end
+
+def fun_l6_n530()
+ fun_l7_n399
+end
+
+def fun_l6_n531()
+ fun_l7_n220
+end
+
+def fun_l6_n532()
+ fun_l7_n874
+end
+
+def fun_l6_n533()
+ fun_l7_n504
+end
+
+def fun_l6_n534()
+ fun_l7_n713
+end
+
+def fun_l6_n535()
+ fun_l7_n185
+end
+
+def fun_l6_n536()
+ fun_l7_n229
+end
+
+def fun_l6_n537()
+ fun_l7_n696
+end
+
+def fun_l6_n538()
+ fun_l7_n840
+end
+
+def fun_l6_n539()
+ fun_l7_n323
+end
+
+def fun_l6_n540()
+ fun_l7_n342
+end
+
+def fun_l6_n541()
+ fun_l7_n60
+end
+
+def fun_l6_n542()
+ fun_l7_n149
+end
+
+def fun_l6_n543()
+ fun_l7_n465
+end
+
+def fun_l6_n544()
+ fun_l7_n392
+end
+
+def fun_l6_n545()
+ fun_l7_n210
+end
+
+def fun_l6_n546()
+ fun_l7_n565
+end
+
+def fun_l6_n547()
+ fun_l7_n63
+end
+
+def fun_l6_n548()
+ fun_l7_n722
+end
+
+def fun_l6_n549()
+ fun_l7_n119
+end
+
+def fun_l6_n550()
+ fun_l7_n933
+end
+
+def fun_l6_n551()
+ fun_l7_n612
+end
+
+def fun_l6_n552()
+ fun_l7_n479
+end
+
+def fun_l6_n553()
+ fun_l7_n866
+end
+
+def fun_l6_n554()
+ fun_l7_n268
+end
+
+def fun_l6_n555()
+ fun_l7_n547
+end
+
+def fun_l6_n556()
+ fun_l7_n621
+end
+
+def fun_l6_n557()
+ fun_l7_n461
+end
+
+def fun_l6_n558()
+ fun_l7_n907
+end
+
+def fun_l6_n559()
+ fun_l7_n660
+end
+
+def fun_l6_n560()
+ fun_l7_n857
+end
+
+def fun_l6_n561()
+ fun_l7_n398
+end
+
+def fun_l6_n562()
+ fun_l7_n484
+end
+
+def fun_l6_n563()
+ fun_l7_n16
+end
+
+def fun_l6_n564()
+ fun_l7_n697
+end
+
+def fun_l6_n565()
+ fun_l7_n135
+end
+
+def fun_l6_n566()
+ fun_l7_n265
+end
+
+def fun_l6_n567()
+ fun_l7_n627
+end
+
+def fun_l6_n568()
+ fun_l7_n345
+end
+
+def fun_l6_n569()
+ fun_l7_n528
+end
+
+def fun_l6_n570()
+ fun_l7_n926
+end
+
+def fun_l6_n571()
+ fun_l7_n198
+end
+
+def fun_l6_n572()
+ fun_l7_n837
+end
+
+def fun_l6_n573()
+ fun_l7_n95
+end
+
+def fun_l6_n574()
+ fun_l7_n802
+end
+
+def fun_l6_n575()
+ fun_l7_n265
+end
+
+def fun_l6_n576()
+ fun_l7_n884
+end
+
+def fun_l6_n577()
+ fun_l7_n227
+end
+
+def fun_l6_n578()
+ fun_l7_n915
+end
+
+def fun_l6_n579()
+ fun_l7_n221
+end
+
+def fun_l6_n580()
+ fun_l7_n718
+end
+
+def fun_l6_n581()
+ fun_l7_n179
+end
+
+def fun_l6_n582()
+ fun_l7_n975
+end
+
+def fun_l6_n583()
+ fun_l7_n207
+end
+
+def fun_l6_n584()
+ fun_l7_n874
+end
+
+def fun_l6_n585()
+ fun_l7_n540
+end
+
+def fun_l6_n586()
+ fun_l7_n765
+end
+
+def fun_l6_n587()
+ fun_l7_n613
+end
+
+def fun_l6_n588()
+ fun_l7_n853
+end
+
+def fun_l6_n589()
+ fun_l7_n241
+end
+
+def fun_l6_n590()
+ fun_l7_n91
+end
+
+def fun_l6_n591()
+ fun_l7_n383
+end
+
+def fun_l6_n592()
+ fun_l7_n567
+end
+
+def fun_l6_n593()
+ fun_l7_n144
+end
+
+def fun_l6_n594()
+ fun_l7_n663
+end
+
+def fun_l6_n595()
+ fun_l7_n674
+end
+
+def fun_l6_n596()
+ fun_l7_n407
+end
+
+def fun_l6_n597()
+ fun_l7_n207
+end
+
+def fun_l6_n598()
+ fun_l7_n746
+end
+
+def fun_l6_n599()
+ fun_l7_n24
+end
+
+def fun_l6_n600()
+ fun_l7_n150
+end
+
+def fun_l6_n601()
+ fun_l7_n317
+end
+
+def fun_l6_n602()
+ fun_l7_n773
+end
+
+def fun_l6_n603()
+ fun_l7_n932
+end
+
+def fun_l6_n604()
+ fun_l7_n772
+end
+
+def fun_l6_n605()
+ fun_l7_n495
+end
+
+def fun_l6_n606()
+ fun_l7_n526
+end
+
+def fun_l6_n607()
+ fun_l7_n758
+end
+
+def fun_l6_n608()
+ fun_l7_n941
+end
+
+def fun_l6_n609()
+ fun_l7_n998
+end
+
+def fun_l6_n610()
+ fun_l7_n543
+end
+
+def fun_l6_n611()
+ fun_l7_n216
+end
+
+def fun_l6_n612()
+ fun_l7_n445
+end
+
+def fun_l6_n613()
+ fun_l7_n314
+end
+
+def fun_l6_n614()
+ fun_l7_n840
+end
+
+def fun_l6_n615()
+ fun_l7_n722
+end
+
+def fun_l6_n616()
+ fun_l7_n89
+end
+
+def fun_l6_n617()
+ fun_l7_n353
+end
+
+def fun_l6_n618()
+ fun_l7_n800
+end
+
+def fun_l6_n619()
+ fun_l7_n736
+end
+
+def fun_l6_n620()
+ fun_l7_n376
+end
+
+def fun_l6_n621()
+ fun_l7_n24
+end
+
+def fun_l6_n622()
+ fun_l7_n258
+end
+
+def fun_l6_n623()
+ fun_l7_n943
+end
+
+def fun_l6_n624()
+ fun_l7_n963
+end
+
+def fun_l6_n625()
+ fun_l7_n709
+end
+
+def fun_l6_n626()
+ fun_l7_n350
+end
+
+def fun_l6_n627()
+ fun_l7_n322
+end
+
+def fun_l6_n628()
+ fun_l7_n717
+end
+
+def fun_l6_n629()
+ fun_l7_n529
+end
+
+def fun_l6_n630()
+ fun_l7_n365
+end
+
+def fun_l6_n631()
+ fun_l7_n977
+end
+
+def fun_l6_n632()
+ fun_l7_n606
+end
+
+def fun_l6_n633()
+ fun_l7_n712
+end
+
+def fun_l6_n634()
+ fun_l7_n559
+end
+
+def fun_l6_n635()
+ fun_l7_n499
+end
+
+def fun_l6_n636()
+ fun_l7_n871
+end
+
+def fun_l6_n637()
+ fun_l7_n684
+end
+
+def fun_l6_n638()
+ fun_l7_n558
+end
+
+def fun_l6_n639()
+ fun_l7_n333
+end
+
+def fun_l6_n640()
+ fun_l7_n37
+end
+
+def fun_l6_n641()
+ fun_l7_n559
+end
+
+def fun_l6_n642()
+ fun_l7_n17
+end
+
+def fun_l6_n643()
+ fun_l7_n913
+end
+
+def fun_l6_n644()
+ fun_l7_n79
+end
+
+def fun_l6_n645()
+ fun_l7_n402
+end
+
+def fun_l6_n646()
+ fun_l7_n268
+end
+
+def fun_l6_n647()
+ fun_l7_n797
+end
+
+def fun_l6_n648()
+ fun_l7_n985
+end
+
+def fun_l6_n649()
+ fun_l7_n192
+end
+
+def fun_l6_n650()
+ fun_l7_n774
+end
+
+def fun_l6_n651()
+ fun_l7_n805
+end
+
+def fun_l6_n652()
+ fun_l7_n208
+end
+
+def fun_l6_n653()
+ fun_l7_n608
+end
+
+def fun_l6_n654()
+ fun_l7_n714
+end
+
+def fun_l6_n655()
+ fun_l7_n883
+end
+
+def fun_l6_n656()
+ fun_l7_n841
+end
+
+def fun_l6_n657()
+ fun_l7_n646
+end
+
+def fun_l6_n658()
+ fun_l7_n39
+end
+
+def fun_l6_n659()
+ fun_l7_n432
+end
+
+def fun_l6_n660()
+ fun_l7_n177
+end
+
+def fun_l6_n661()
+ fun_l7_n700
+end
+
+def fun_l6_n662()
+ fun_l7_n815
+end
+
+def fun_l6_n663()
+ fun_l7_n553
+end
+
+def fun_l6_n664()
+ fun_l7_n540
+end
+
+def fun_l6_n665()
+ fun_l7_n853
+end
+
+def fun_l6_n666()
+ fun_l7_n526
+end
+
+def fun_l6_n667()
+ fun_l7_n670
+end
+
+def fun_l6_n668()
+ fun_l7_n753
+end
+
+def fun_l6_n669()
+ fun_l7_n811
+end
+
+def fun_l6_n670()
+ fun_l7_n782
+end
+
+def fun_l6_n671()
+ fun_l7_n275
+end
+
+def fun_l6_n672()
+ fun_l7_n884
+end
+
+def fun_l6_n673()
+ fun_l7_n984
+end
+
+def fun_l6_n674()
+ fun_l7_n980
+end
+
+def fun_l6_n675()
+ fun_l7_n341
+end
+
+def fun_l6_n676()
+ fun_l7_n346
+end
+
+def fun_l6_n677()
+ fun_l7_n164
+end
+
+def fun_l6_n678()
+ fun_l7_n600
+end
+
+def fun_l6_n679()
+ fun_l7_n351
+end
+
+def fun_l6_n680()
+ fun_l7_n527
+end
+
+def fun_l6_n681()
+ fun_l7_n206
+end
+
+def fun_l6_n682()
+ fun_l7_n50
+end
+
+def fun_l6_n683()
+ fun_l7_n476
+end
+
+def fun_l6_n684()
+ fun_l7_n684
+end
+
+def fun_l6_n685()
+ fun_l7_n883
+end
+
+def fun_l6_n686()
+ fun_l7_n41
+end
+
+def fun_l6_n687()
+ fun_l7_n382
+end
+
+def fun_l6_n688()
+ fun_l7_n418
+end
+
+def fun_l6_n689()
+ fun_l7_n22
+end
+
+def fun_l6_n690()
+ fun_l7_n543
+end
+
+def fun_l6_n691()
+ fun_l7_n143
+end
+
+def fun_l6_n692()
+ fun_l7_n120
+end
+
+def fun_l6_n693()
+ fun_l7_n431
+end
+
+def fun_l6_n694()
+ fun_l7_n405
+end
+
+def fun_l6_n695()
+ fun_l7_n474
+end
+
+def fun_l6_n696()
+ fun_l7_n117
+end
+
+def fun_l6_n697()
+ fun_l7_n475
+end
+
+def fun_l6_n698()
+ fun_l7_n674
+end
+
+def fun_l6_n699()
+ fun_l7_n398
+end
+
+def fun_l6_n700()
+ fun_l7_n709
+end
+
+def fun_l6_n701()
+ fun_l7_n360
+end
+
+def fun_l6_n702()
+ fun_l7_n241
+end
+
+def fun_l6_n703()
+ fun_l7_n837
+end
+
+def fun_l6_n704()
+ fun_l7_n483
+end
+
+def fun_l6_n705()
+ fun_l7_n943
+end
+
+def fun_l6_n706()
+ fun_l7_n292
+end
+
+def fun_l6_n707()
+ fun_l7_n659
+end
+
+def fun_l6_n708()
+ fun_l7_n657
+end
+
+def fun_l6_n709()
+ fun_l7_n143
+end
+
+def fun_l6_n710()
+ fun_l7_n883
+end
+
+def fun_l6_n711()
+ fun_l7_n764
+end
+
+def fun_l6_n712()
+ fun_l7_n421
+end
+
+def fun_l6_n713()
+ fun_l7_n611
+end
+
+def fun_l6_n714()
+ fun_l7_n657
+end
+
+def fun_l6_n715()
+ fun_l7_n765
+end
+
+def fun_l6_n716()
+ fun_l7_n793
+end
+
+def fun_l6_n717()
+ fun_l7_n752
+end
+
+def fun_l6_n718()
+ fun_l7_n713
+end
+
+def fun_l6_n719()
+ fun_l7_n577
+end
+
+def fun_l6_n720()
+ fun_l7_n422
+end
+
+def fun_l6_n721()
+ fun_l7_n368
+end
+
+def fun_l6_n722()
+ fun_l7_n2
+end
+
+def fun_l6_n723()
+ fun_l7_n739
+end
+
+def fun_l6_n724()
+ fun_l7_n481
+end
+
+def fun_l6_n725()
+ fun_l7_n516
+end
+
+def fun_l6_n726()
+ fun_l7_n266
+end
+
+def fun_l6_n727()
+ fun_l7_n269
+end
+
+def fun_l6_n728()
+ fun_l7_n308
+end
+
+def fun_l6_n729()
+ fun_l7_n915
+end
+
+def fun_l6_n730()
+ fun_l7_n603
+end
+
+def fun_l6_n731()
+ fun_l7_n585
+end
+
+def fun_l6_n732()
+ fun_l7_n182
+end
+
+def fun_l6_n733()
+ fun_l7_n28
+end
+
+def fun_l6_n734()
+ fun_l7_n829
+end
+
+def fun_l6_n735()
+ fun_l7_n365
+end
+
+def fun_l6_n736()
+ fun_l7_n208
+end
+
+def fun_l6_n737()
+ fun_l7_n395
+end
+
+def fun_l6_n738()
+ fun_l7_n745
+end
+
+def fun_l6_n739()
+ fun_l7_n90
+end
+
+def fun_l6_n740()
+ fun_l7_n696
+end
+
+def fun_l6_n741()
+ fun_l7_n730
+end
+
+def fun_l6_n742()
+ fun_l7_n143
+end
+
+def fun_l6_n743()
+ fun_l7_n753
+end
+
+def fun_l6_n744()
+ fun_l7_n484
+end
+
+def fun_l6_n745()
+ fun_l7_n779
+end
+
+def fun_l6_n746()
+ fun_l7_n668
+end
+
+def fun_l6_n747()
+ fun_l7_n331
+end
+
+def fun_l6_n748()
+ fun_l7_n961
+end
+
+def fun_l6_n749()
+ fun_l7_n875
+end
+
+def fun_l6_n750()
+ fun_l7_n541
+end
+
+def fun_l6_n751()
+ fun_l7_n122
+end
+
+def fun_l6_n752()
+ fun_l7_n278
+end
+
+def fun_l6_n753()
+ fun_l7_n510
+end
+
+def fun_l6_n754()
+ fun_l7_n619
+end
+
+def fun_l6_n755()
+ fun_l7_n165
+end
+
+def fun_l6_n756()
+ fun_l7_n537
+end
+
+def fun_l6_n757()
+ fun_l7_n917
+end
+
+def fun_l6_n758()
+ fun_l7_n102
+end
+
+def fun_l6_n759()
+ fun_l7_n504
+end
+
+def fun_l6_n760()
+ fun_l7_n768
+end
+
+def fun_l6_n761()
+ fun_l7_n259
+end
+
+def fun_l6_n762()
+ fun_l7_n371
+end
+
+def fun_l6_n763()
+ fun_l7_n727
+end
+
+def fun_l6_n764()
+ fun_l7_n959
+end
+
+def fun_l6_n765()
+ fun_l7_n191
+end
+
+def fun_l6_n766()
+ fun_l7_n570
+end
+
+def fun_l6_n767()
+ fun_l7_n746
+end
+
+def fun_l6_n768()
+ fun_l7_n133
+end
+
+def fun_l6_n769()
+ fun_l7_n520
+end
+
+def fun_l6_n770()
+ fun_l7_n602
+end
+
+def fun_l6_n771()
+ fun_l7_n722
+end
+
+def fun_l6_n772()
+ fun_l7_n165
+end
+
+def fun_l6_n773()
+ fun_l7_n132
+end
+
+def fun_l6_n774()
+ fun_l7_n328
+end
+
+def fun_l6_n775()
+ fun_l7_n88
+end
+
+def fun_l6_n776()
+ fun_l7_n296
+end
+
+def fun_l6_n777()
+ fun_l7_n389
+end
+
+def fun_l6_n778()
+ fun_l7_n433
+end
+
+def fun_l6_n779()
+ fun_l7_n525
+end
+
+def fun_l6_n780()
+ fun_l7_n736
+end
+
+def fun_l6_n781()
+ fun_l7_n300
+end
+
+def fun_l6_n782()
+ fun_l7_n663
+end
+
+def fun_l6_n783()
+ fun_l7_n33
+end
+
+def fun_l6_n784()
+ fun_l7_n964
+end
+
+def fun_l6_n785()
+ fun_l7_n459
+end
+
+def fun_l6_n786()
+ fun_l7_n397
+end
+
+def fun_l6_n787()
+ fun_l7_n453
+end
+
+def fun_l6_n788()
+ fun_l7_n951
+end
+
+def fun_l6_n789()
+ fun_l7_n485
+end
+
+def fun_l6_n790()
+ fun_l7_n480
+end
+
+def fun_l6_n791()
+ fun_l7_n663
+end
+
+def fun_l6_n792()
+ fun_l7_n245
+end
+
+def fun_l6_n793()
+ fun_l7_n933
+end
+
+def fun_l6_n794()
+ fun_l7_n253
+end
+
+def fun_l6_n795()
+ fun_l7_n746
+end
+
+def fun_l6_n796()
+ fun_l7_n242
+end
+
+def fun_l6_n797()
+ fun_l7_n435
+end
+
+def fun_l6_n798()
+ fun_l7_n982
+end
+
+def fun_l6_n799()
+ fun_l7_n516
+end
+
+def fun_l6_n800()
+ fun_l7_n118
+end
+
+def fun_l6_n801()
+ fun_l7_n787
+end
+
+def fun_l6_n802()
+ fun_l7_n13
+end
+
+def fun_l6_n803()
+ fun_l7_n381
+end
+
+def fun_l6_n804()
+ fun_l7_n601
+end
+
+def fun_l6_n805()
+ fun_l7_n95
+end
+
+def fun_l6_n806()
+ fun_l7_n589
+end
+
+def fun_l6_n807()
+ fun_l7_n33
+end
+
+def fun_l6_n808()
+ fun_l7_n801
+end
+
+def fun_l6_n809()
+ fun_l7_n857
+end
+
+def fun_l6_n810()
+ fun_l7_n23
+end
+
+def fun_l6_n811()
+ fun_l7_n998
+end
+
+def fun_l6_n812()
+ fun_l7_n424
+end
+
+def fun_l6_n813()
+ fun_l7_n525
+end
+
+def fun_l6_n814()
+ fun_l7_n428
+end
+
+def fun_l6_n815()
+ fun_l7_n509
+end
+
+def fun_l6_n816()
+ fun_l7_n599
+end
+
+def fun_l6_n817()
+ fun_l7_n642
+end
+
+def fun_l6_n818()
+ fun_l7_n381
+end
+
+def fun_l6_n819()
+ fun_l7_n802
+end
+
+def fun_l6_n820()
+ fun_l7_n324
+end
+
+def fun_l6_n821()
+ fun_l7_n804
+end
+
+def fun_l6_n822()
+ fun_l7_n743
+end
+
+def fun_l6_n823()
+ fun_l7_n961
+end
+
+def fun_l6_n824()
+ fun_l7_n222
+end
+
+def fun_l6_n825()
+ fun_l7_n184
+end
+
+def fun_l6_n826()
+ fun_l7_n157
+end
+
+def fun_l6_n827()
+ fun_l7_n387
+end
+
+def fun_l6_n828()
+ fun_l7_n963
+end
+
+def fun_l6_n829()
+ fun_l7_n817
+end
+
+def fun_l6_n830()
+ fun_l7_n673
+end
+
+def fun_l6_n831()
+ fun_l7_n471
+end
+
+def fun_l6_n832()
+ fun_l7_n662
+end
+
+def fun_l6_n833()
+ fun_l7_n385
+end
+
+def fun_l6_n834()
+ fun_l7_n802
+end
+
+def fun_l6_n835()
+ fun_l7_n827
+end
+
+def fun_l6_n836()
+ fun_l7_n495
+end
+
+def fun_l6_n837()
+ fun_l7_n44
+end
+
+def fun_l6_n838()
+ fun_l7_n958
+end
+
+def fun_l6_n839()
+ fun_l7_n436
+end
+
+def fun_l6_n840()
+ fun_l7_n210
+end
+
+def fun_l6_n841()
+ fun_l7_n14
+end
+
+def fun_l6_n842()
+ fun_l7_n67
+end
+
+def fun_l6_n843()
+ fun_l7_n0
+end
+
+def fun_l6_n844()
+ fun_l7_n50
+end
+
+def fun_l6_n845()
+ fun_l7_n398
+end
+
+def fun_l6_n846()
+ fun_l7_n269
+end
+
+def fun_l6_n847()
+ fun_l7_n478
+end
+
+def fun_l6_n848()
+ fun_l7_n879
+end
+
+def fun_l6_n849()
+ fun_l7_n713
+end
+
+def fun_l6_n850()
+ fun_l7_n496
+end
+
+def fun_l6_n851()
+ fun_l7_n995
+end
+
+def fun_l6_n852()
+ fun_l7_n973
+end
+
+def fun_l6_n853()
+ fun_l7_n990
+end
+
+def fun_l6_n854()
+ fun_l7_n193
+end
+
+def fun_l6_n855()
+ fun_l7_n200
+end
+
+def fun_l6_n856()
+ fun_l7_n377
+end
+
+def fun_l6_n857()
+ fun_l7_n82
+end
+
+def fun_l6_n858()
+ fun_l7_n261
+end
+
+def fun_l6_n859()
+ fun_l7_n464
+end
+
+def fun_l6_n860()
+ fun_l7_n358
+end
+
+def fun_l6_n861()
+ fun_l7_n920
+end
+
+def fun_l6_n862()
+ fun_l7_n724
+end
+
+def fun_l6_n863()
+ fun_l7_n536
+end
+
+def fun_l6_n864()
+ fun_l7_n127
+end
+
+def fun_l6_n865()
+ fun_l7_n919
+end
+
+def fun_l6_n866()
+ fun_l7_n972
+end
+
+def fun_l6_n867()
+ fun_l7_n773
+end
+
+def fun_l6_n868()
+ fun_l7_n444
+end
+
+def fun_l6_n869()
+ fun_l7_n242
+end
+
+def fun_l6_n870()
+ fun_l7_n910
+end
+
+def fun_l6_n871()
+ fun_l7_n396
+end
+
+def fun_l6_n872()
+ fun_l7_n110
+end
+
+def fun_l6_n873()
+ fun_l7_n393
+end
+
+def fun_l6_n874()
+ fun_l7_n295
+end
+
+def fun_l6_n875()
+ fun_l7_n998
+end
+
+def fun_l6_n876()
+ fun_l7_n357
+end
+
+def fun_l6_n877()
+ fun_l7_n586
+end
+
+def fun_l6_n878()
+ fun_l7_n752
+end
+
+def fun_l6_n879()
+ fun_l7_n998
+end
+
+def fun_l6_n880()
+ fun_l7_n33
+end
+
+def fun_l6_n881()
+ fun_l7_n472
+end
+
+def fun_l6_n882()
+ fun_l7_n511
+end
+
+def fun_l6_n883()
+ fun_l7_n677
+end
+
+def fun_l6_n884()
+ fun_l7_n562
+end
+
+def fun_l6_n885()
+ fun_l7_n100
+end
+
+def fun_l6_n886()
+ fun_l7_n964
+end
+
+def fun_l6_n887()
+ fun_l7_n306
+end
+
+def fun_l6_n888()
+ fun_l7_n295
+end
+
+def fun_l6_n889()
+ fun_l7_n323
+end
+
+def fun_l6_n890()
+ fun_l7_n559
+end
+
+def fun_l6_n891()
+ fun_l7_n872
+end
+
+def fun_l6_n892()
+ fun_l7_n236
+end
+
+def fun_l6_n893()
+ fun_l7_n845
+end
+
+def fun_l6_n894()
+ fun_l7_n853
+end
+
+def fun_l6_n895()
+ fun_l7_n333
+end
+
+def fun_l6_n896()
+ fun_l7_n404
+end
+
+def fun_l6_n897()
+ fun_l7_n17
+end
+
+def fun_l6_n898()
+ fun_l7_n997
+end
+
+def fun_l6_n899()
+ fun_l7_n844
+end
+
+def fun_l6_n900()
+ fun_l7_n327
+end
+
+def fun_l6_n901()
+ fun_l7_n863
+end
+
+def fun_l6_n902()
+ fun_l7_n516
+end
+
+def fun_l6_n903()
+ fun_l7_n298
+end
+
+def fun_l6_n904()
+ fun_l7_n171
+end
+
+def fun_l6_n905()
+ fun_l7_n908
+end
+
+def fun_l6_n906()
+ fun_l7_n934
+end
+
+def fun_l6_n907()
+ fun_l7_n361
+end
+
+def fun_l6_n908()
+ fun_l7_n901
+end
+
+def fun_l6_n909()
+ fun_l7_n830
+end
+
+def fun_l6_n910()
+ fun_l7_n313
+end
+
+def fun_l6_n911()
+ fun_l7_n799
+end
+
+def fun_l6_n912()
+ fun_l7_n223
+end
+
+def fun_l6_n913()
+ fun_l7_n108
+end
+
+def fun_l6_n914()
+ fun_l7_n822
+end
+
+def fun_l6_n915()
+ fun_l7_n42
+end
+
+def fun_l6_n916()
+ fun_l7_n276
+end
+
+def fun_l6_n917()
+ fun_l7_n535
+end
+
+def fun_l6_n918()
+ fun_l7_n586
+end
+
+def fun_l6_n919()
+ fun_l7_n847
+end
+
+def fun_l6_n920()
+ fun_l7_n851
+end
+
+def fun_l6_n921()
+ fun_l7_n544
+end
+
+def fun_l6_n922()
+ fun_l7_n416
+end
+
+def fun_l6_n923()
+ fun_l7_n670
+end
+
+def fun_l6_n924()
+ fun_l7_n366
+end
+
+def fun_l6_n925()
+ fun_l7_n94
+end
+
+def fun_l6_n926()
+ fun_l7_n187
+end
+
+def fun_l6_n927()
+ fun_l7_n72
+end
+
+def fun_l6_n928()
+ fun_l7_n19
+end
+
+def fun_l6_n929()
+ fun_l7_n424
+end
+
+def fun_l6_n930()
+ fun_l7_n833
+end
+
+def fun_l6_n931()
+ fun_l7_n438
+end
+
+def fun_l6_n932()
+ fun_l7_n9
+end
+
+def fun_l6_n933()
+ fun_l7_n967
+end
+
+def fun_l6_n934()
+ fun_l7_n155
+end
+
+def fun_l6_n935()
+ fun_l7_n119
+end
+
+def fun_l6_n936()
+ fun_l7_n916
+end
+
+def fun_l6_n937()
+ fun_l7_n232
+end
+
+def fun_l6_n938()
+ fun_l7_n880
+end
+
+def fun_l6_n939()
+ fun_l7_n456
+end
+
+def fun_l6_n940()
+ fun_l7_n764
+end
+
+def fun_l6_n941()
+ fun_l7_n525
+end
+
+def fun_l6_n942()
+ fun_l7_n794
+end
+
+def fun_l6_n943()
+ fun_l7_n887
+end
+
+def fun_l6_n944()
+ fun_l7_n756
+end
+
+def fun_l6_n945()
+ fun_l7_n863
+end
+
+def fun_l6_n946()
+ fun_l7_n959
+end
+
+def fun_l6_n947()
+ fun_l7_n597
+end
+
+def fun_l6_n948()
+ fun_l7_n919
+end
+
+def fun_l6_n949()
+ fun_l7_n196
+end
+
+def fun_l6_n950()
+ fun_l7_n505
+end
+
+def fun_l6_n951()
+ fun_l7_n374
+end
+
+def fun_l6_n952()
+ fun_l7_n272
+end
+
+def fun_l6_n953()
+ fun_l7_n317
+end
+
+def fun_l6_n954()
+ fun_l7_n149
+end
+
+def fun_l6_n955()
+ fun_l7_n885
+end
+
+def fun_l6_n956()
+ fun_l7_n174
+end
+
+def fun_l6_n957()
+ fun_l7_n234
+end
+
+def fun_l6_n958()
+ fun_l7_n848
+end
+
+def fun_l6_n959()
+ fun_l7_n18
+end
+
+def fun_l6_n960()
+ fun_l7_n111
+end
+
+def fun_l6_n961()
+ fun_l7_n355
+end
+
+def fun_l6_n962()
+ fun_l7_n640
+end
+
+def fun_l6_n963()
+ fun_l7_n486
+end
+
+def fun_l6_n964()
+ fun_l7_n940
+end
+
+def fun_l6_n965()
+ fun_l7_n54
+end
+
+def fun_l6_n966()
+ fun_l7_n970
+end
+
+def fun_l6_n967()
+ fun_l7_n127
+end
+
+def fun_l6_n968()
+ fun_l7_n581
+end
+
+def fun_l6_n969()
+ fun_l7_n921
+end
+
+def fun_l6_n970()
+ fun_l7_n837
+end
+
+def fun_l6_n971()
+ fun_l7_n933
+end
+
+def fun_l6_n972()
+ fun_l7_n109
+end
+
+def fun_l6_n973()
+ fun_l7_n846
+end
+
+def fun_l6_n974()
+ fun_l7_n178
+end
+
+def fun_l6_n975()
+ fun_l7_n278
+end
+
+def fun_l6_n976()
+ fun_l7_n404
+end
+
+def fun_l6_n977()
+ fun_l7_n456
+end
+
+def fun_l6_n978()
+ fun_l7_n860
+end
+
+def fun_l6_n979()
+ fun_l7_n637
+end
+
+def fun_l6_n980()
+ fun_l7_n201
+end
+
+def fun_l6_n981()
+ fun_l7_n836
+end
+
+def fun_l6_n982()
+ fun_l7_n172
+end
+
+def fun_l6_n983()
+ fun_l7_n935
+end
+
+def fun_l6_n984()
+ fun_l7_n937
+end
+
+def fun_l6_n985()
+ fun_l7_n817
+end
+
+def fun_l6_n986()
+ fun_l7_n16
+end
+
+def fun_l6_n987()
+ fun_l7_n152
+end
+
+def fun_l6_n988()
+ fun_l7_n359
+end
+
+def fun_l6_n989()
+ fun_l7_n357
+end
+
+def fun_l6_n990()
+ fun_l7_n609
+end
+
+def fun_l6_n991()
+ fun_l7_n604
+end
+
+def fun_l6_n992()
+ fun_l7_n998
+end
+
+def fun_l6_n993()
+ fun_l7_n366
+end
+
+def fun_l6_n994()
+ fun_l7_n150
+end
+
+def fun_l6_n995()
+ fun_l7_n823
+end
+
+def fun_l6_n996()
+ fun_l7_n476
+end
+
+def fun_l6_n997()
+ fun_l7_n535
+end
+
+def fun_l6_n998()
+ fun_l7_n222
+end
+
+def fun_l6_n999()
+ fun_l7_n238
+end
+
+def fun_l7_n0()
+ fun_l8_n3
+end
+
+def fun_l7_n1()
+ fun_l8_n706
+end
+
+def fun_l7_n2()
+ fun_l8_n887
+end
+
+def fun_l7_n3()
+ fun_l8_n693
+end
+
+def fun_l7_n4()
+ fun_l8_n11
+end
+
+def fun_l7_n5()
+ fun_l8_n155
+end
+
+def fun_l7_n6()
+ fun_l8_n604
+end
+
+def fun_l7_n7()
+ fun_l8_n616
+end
+
+def fun_l7_n8()
+ fun_l8_n686
+end
+
+def fun_l7_n9()
+ fun_l8_n257
+end
+
+def fun_l7_n10()
+ fun_l8_n594
+end
+
+def fun_l7_n11()
+ fun_l8_n548
+end
+
+def fun_l7_n12()
+ fun_l8_n305
+end
+
+def fun_l7_n13()
+ fun_l8_n125
+end
+
+def fun_l7_n14()
+ fun_l8_n183
+end
+
+def fun_l7_n15()
+ fun_l8_n799
+end
+
+def fun_l7_n16()
+ fun_l8_n333
+end
+
+def fun_l7_n17()
+ fun_l8_n873
+end
+
+def fun_l7_n18()
+ fun_l8_n110
+end
+
+def fun_l7_n19()
+ fun_l8_n578
+end
+
+def fun_l7_n20()
+ fun_l8_n423
+end
+
+def fun_l7_n21()
+ fun_l8_n686
+end
+
+def fun_l7_n22()
+ fun_l8_n162
+end
+
+def fun_l7_n23()
+ fun_l8_n277
+end
+
+def fun_l7_n24()
+ fun_l8_n651
+end
+
+def fun_l7_n25()
+ fun_l8_n575
+end
+
+def fun_l7_n26()
+ fun_l8_n937
+end
+
+def fun_l7_n27()
+ fun_l8_n636
+end
+
+def fun_l7_n28()
+ fun_l8_n1
+end
+
+def fun_l7_n29()
+ fun_l8_n83
+end
+
+def fun_l7_n30()
+ fun_l8_n318
+end
+
+def fun_l7_n31()
+ fun_l8_n675
+end
+
+def fun_l7_n32()
+ fun_l8_n118
+end
+
+def fun_l7_n33()
+ fun_l8_n522
+end
+
+def fun_l7_n34()
+ fun_l8_n507
+end
+
+def fun_l7_n35()
+ fun_l8_n846
+end
+
+def fun_l7_n36()
+ fun_l8_n584
+end
+
+def fun_l7_n37()
+ fun_l8_n816
+end
+
+def fun_l7_n38()
+ fun_l8_n217
+end
+
+def fun_l7_n39()
+ fun_l8_n366
+end
+
+def fun_l7_n40()
+ fun_l8_n283
+end
+
+def fun_l7_n41()
+ fun_l8_n536
+end
+
+def fun_l7_n42()
+ fun_l8_n414
+end
+
+def fun_l7_n43()
+ fun_l8_n216
+end
+
+def fun_l7_n44()
+ fun_l8_n743
+end
+
+def fun_l7_n45()
+ fun_l8_n449
+end
+
+def fun_l7_n46()
+ fun_l8_n629
+end
+
+def fun_l7_n47()
+ fun_l8_n711
+end
+
+def fun_l7_n48()
+ fun_l8_n113
+end
+
+def fun_l7_n49()
+ fun_l8_n440
+end
+
+def fun_l7_n50()
+ fun_l8_n822
+end
+
+def fun_l7_n51()
+ fun_l8_n567
+end
+
+def fun_l7_n52()
+ fun_l8_n854
+end
+
+def fun_l7_n53()
+ fun_l8_n204
+end
+
+def fun_l7_n54()
+ fun_l8_n796
+end
+
+def fun_l7_n55()
+ fun_l8_n989
+end
+
+def fun_l7_n56()
+ fun_l8_n504
+end
+
+def fun_l7_n57()
+ fun_l8_n952
+end
+
+def fun_l7_n58()
+ fun_l8_n797
+end
+
+def fun_l7_n59()
+ fun_l8_n492
+end
+
+def fun_l7_n60()
+ fun_l8_n949
+end
+
+def fun_l7_n61()
+ fun_l8_n215
+end
+
+def fun_l7_n62()
+ fun_l8_n306
+end
+
+def fun_l7_n63()
+ fun_l8_n632
+end
+
+def fun_l7_n64()
+ fun_l8_n572
+end
+
+def fun_l7_n65()
+ fun_l8_n69
+end
+
+def fun_l7_n66()
+ fun_l8_n97
+end
+
+def fun_l7_n67()
+ fun_l8_n708
+end
+
+def fun_l7_n68()
+ fun_l8_n548
+end
+
+def fun_l7_n69()
+ fun_l8_n999
+end
+
+def fun_l7_n70()
+ fun_l8_n872
+end
+
+def fun_l7_n71()
+ fun_l8_n20
+end
+
+def fun_l7_n72()
+ fun_l8_n220
+end
+
+def fun_l7_n73()
+ fun_l8_n28
+end
+
+def fun_l7_n74()
+ fun_l8_n79
+end
+
+def fun_l7_n75()
+ fun_l8_n248
+end
+
+def fun_l7_n76()
+ fun_l8_n601
+end
+
+def fun_l7_n77()
+ fun_l8_n469
+end
+
+def fun_l7_n78()
+ fun_l8_n315
+end
+
+def fun_l7_n79()
+ fun_l8_n712
+end
+
+def fun_l7_n80()
+ fun_l8_n177
+end
+
+def fun_l7_n81()
+ fun_l8_n106
+end
+
+def fun_l7_n82()
+ fun_l8_n668
+end
+
+def fun_l7_n83()
+ fun_l8_n299
+end
+
+def fun_l7_n84()
+ fun_l8_n59
+end
+
+def fun_l7_n85()
+ fun_l8_n120
+end
+
+def fun_l7_n86()
+ fun_l8_n209
+end
+
+def fun_l7_n87()
+ fun_l8_n502
+end
+
+def fun_l7_n88()
+ fun_l8_n935
+end
+
+def fun_l7_n89()
+ fun_l8_n697
+end
+
+def fun_l7_n90()
+ fun_l8_n231
+end
+
+def fun_l7_n91()
+ fun_l8_n47
+end
+
+def fun_l7_n92()
+ fun_l8_n125
+end
+
+def fun_l7_n93()
+ fun_l8_n975
+end
+
+def fun_l7_n94()
+ fun_l8_n627
+end
+
+def fun_l7_n95()
+ fun_l8_n898
+end
+
+def fun_l7_n96()
+ fun_l8_n124
+end
+
+def fun_l7_n97()
+ fun_l8_n722
+end
+
+def fun_l7_n98()
+ fun_l8_n745
+end
+
+def fun_l7_n99()
+ fun_l8_n999
+end
+
+def fun_l7_n100()
+ fun_l8_n791
+end
+
+def fun_l7_n101()
+ fun_l8_n360
+end
+
+def fun_l7_n102()
+ fun_l8_n755
+end
+
+def fun_l7_n103()
+ fun_l8_n718
+end
+
+def fun_l7_n104()
+ fun_l8_n495
+end
+
+def fun_l7_n105()
+ fun_l8_n19
+end
+
+def fun_l7_n106()
+ fun_l8_n280
+end
+
+def fun_l7_n107()
+ fun_l8_n710
+end
+
+def fun_l7_n108()
+ fun_l8_n871
+end
+
+def fun_l7_n109()
+ fun_l8_n727
+end
+
+def fun_l7_n110()
+ fun_l8_n807
+end
+
+def fun_l7_n111()
+ fun_l8_n170
+end
+
+def fun_l7_n112()
+ fun_l8_n661
+end
+
+def fun_l7_n113()
+ fun_l8_n684
+end
+
+def fun_l7_n114()
+ fun_l8_n202
+end
+
+def fun_l7_n115()
+ fun_l8_n679
+end
+
+def fun_l7_n116()
+ fun_l8_n773
+end
+
+def fun_l7_n117()
+ fun_l8_n538
+end
+
+def fun_l7_n118()
+ fun_l8_n411
+end
+
+def fun_l7_n119()
+ fun_l8_n264
+end
+
+def fun_l7_n120()
+ fun_l8_n487
+end
+
+def fun_l7_n121()
+ fun_l8_n906
+end
+
+def fun_l7_n122()
+ fun_l8_n833
+end
+
+def fun_l7_n123()
+ fun_l8_n721
+end
+
+def fun_l7_n124()
+ fun_l8_n792
+end
+
+def fun_l7_n125()
+ fun_l8_n852
+end
+
+def fun_l7_n126()
+ fun_l8_n876
+end
+
+def fun_l7_n127()
+ fun_l8_n489
+end
+
+def fun_l7_n128()
+ fun_l8_n715
+end
+
+def fun_l7_n129()
+ fun_l8_n863
+end
+
+def fun_l7_n130()
+ fun_l8_n842
+end
+
+def fun_l7_n131()
+ fun_l8_n99
+end
+
+def fun_l7_n132()
+ fun_l8_n472
+end
+
+def fun_l7_n133()
+ fun_l8_n826
+end
+
+def fun_l7_n134()
+ fun_l8_n805
+end
+
+def fun_l7_n135()
+ fun_l8_n914
+end
+
+def fun_l7_n136()
+ fun_l8_n691
+end
+
+def fun_l7_n137()
+ fun_l8_n880
+end
+
+def fun_l7_n138()
+ fun_l8_n708
+end
+
+def fun_l7_n139()
+ fun_l8_n445
+end
+
+def fun_l7_n140()
+ fun_l8_n173
+end
+
+def fun_l7_n141()
+ fun_l8_n785
+end
+
+def fun_l7_n142()
+ fun_l8_n638
+end
+
+def fun_l7_n143()
+ fun_l8_n319
+end
+
+def fun_l7_n144()
+ fun_l8_n825
+end
+
+def fun_l7_n145()
+ fun_l8_n497
+end
+
+def fun_l7_n146()
+ fun_l8_n941
+end
+
+def fun_l7_n147()
+ fun_l8_n164
+end
+
+def fun_l7_n148()
+ fun_l8_n773
+end
+
+def fun_l7_n149()
+ fun_l8_n603
+end
+
+def fun_l7_n150()
+ fun_l8_n701
+end
+
+def fun_l7_n151()
+ fun_l8_n279
+end
+
+def fun_l7_n152()
+ fun_l8_n120
+end
+
+def fun_l7_n153()
+ fun_l8_n352
+end
+
+def fun_l7_n154()
+ fun_l8_n401
+end
+
+def fun_l7_n155()
+ fun_l8_n195
+end
+
+def fun_l7_n156()
+ fun_l8_n206
+end
+
+def fun_l7_n157()
+ fun_l8_n209
+end
+
+def fun_l7_n158()
+ fun_l8_n594
+end
+
+def fun_l7_n159()
+ fun_l8_n49
+end
+
+def fun_l7_n160()
+ fun_l8_n835
+end
+
+def fun_l7_n161()
+ fun_l8_n108
+end
+
+def fun_l7_n162()
+ fun_l8_n499
+end
+
+def fun_l7_n163()
+ fun_l8_n822
+end
+
+def fun_l7_n164()
+ fun_l8_n712
+end
+
+def fun_l7_n165()
+ fun_l8_n757
+end
+
+def fun_l7_n166()
+ fun_l8_n706
+end
+
+def fun_l7_n167()
+ fun_l8_n517
+end
+
+def fun_l7_n168()
+ fun_l8_n74
+end
+
+def fun_l7_n169()
+ fun_l8_n292
+end
+
+def fun_l7_n170()
+ fun_l8_n560
+end
+
+def fun_l7_n171()
+ fun_l8_n476
+end
+
+def fun_l7_n172()
+ fun_l8_n818
+end
+
+def fun_l7_n173()
+ fun_l8_n91
+end
+
+def fun_l7_n174()
+ fun_l8_n835
+end
+
+def fun_l7_n175()
+ fun_l8_n84
+end
+
+def fun_l7_n176()
+ fun_l8_n506
+end
+
+def fun_l7_n177()
+ fun_l8_n602
+end
+
+def fun_l7_n178()
+ fun_l8_n758
+end
+
+def fun_l7_n179()
+ fun_l8_n591
+end
+
+def fun_l7_n180()
+ fun_l8_n757
+end
+
+def fun_l7_n181()
+ fun_l8_n127
+end
+
+def fun_l7_n182()
+ fun_l8_n287
+end
+
+def fun_l7_n183()
+ fun_l8_n672
+end
+
+def fun_l7_n184()
+ fun_l8_n870
+end
+
+def fun_l7_n185()
+ fun_l8_n267
+end
+
+def fun_l7_n186()
+ fun_l8_n396
+end
+
+def fun_l7_n187()
+ fun_l8_n128
+end
+
+def fun_l7_n188()
+ fun_l8_n670
+end
+
+def fun_l7_n189()
+ fun_l8_n142
+end
+
+def fun_l7_n190()
+ fun_l8_n320
+end
+
+def fun_l7_n191()
+ fun_l8_n829
+end
+
+def fun_l7_n192()
+ fun_l8_n788
+end
+
+def fun_l7_n193()
+ fun_l8_n174
+end
+
+def fun_l7_n194()
+ fun_l8_n526
+end
+
+def fun_l7_n195()
+ fun_l8_n185
+end
+
+def fun_l7_n196()
+ fun_l8_n746
+end
+
+def fun_l7_n197()
+ fun_l8_n889
+end
+
+def fun_l7_n198()
+ fun_l8_n154
+end
+
+def fun_l7_n199()
+ fun_l8_n19
+end
+
+def fun_l7_n200()
+ fun_l8_n913
+end
+
+def fun_l7_n201()
+ fun_l8_n560
+end
+
+def fun_l7_n202()
+ fun_l8_n768
+end
+
+def fun_l7_n203()
+ fun_l8_n412
+end
+
+def fun_l7_n204()
+ fun_l8_n394
+end
+
+def fun_l7_n205()
+ fun_l8_n641
+end
+
+def fun_l7_n206()
+ fun_l8_n83
+end
+
+def fun_l7_n207()
+ fun_l8_n39
+end
+
+def fun_l7_n208()
+ fun_l8_n502
+end
+
+def fun_l7_n209()
+ fun_l8_n904
+end
+
+def fun_l7_n210()
+ fun_l8_n639
+end
+
+def fun_l7_n211()
+ fun_l8_n873
+end
+
+def fun_l7_n212()
+ fun_l8_n940
+end
+
+def fun_l7_n213()
+ fun_l8_n594
+end
+
+def fun_l7_n214()
+ fun_l8_n397
+end
+
+def fun_l7_n215()
+ fun_l8_n318
+end
+
+def fun_l7_n216()
+ fun_l8_n116
+end
+
+def fun_l7_n217()
+ fun_l8_n888
+end
+
+def fun_l7_n218()
+ fun_l8_n148
+end
+
+def fun_l7_n219()
+ fun_l8_n329
+end
+
+def fun_l7_n220()
+ fun_l8_n973
+end
+
+def fun_l7_n221()
+ fun_l8_n913
+end
+
+def fun_l7_n222()
+ fun_l8_n170
+end
+
+def fun_l7_n223()
+ fun_l8_n103
+end
+
+def fun_l7_n224()
+ fun_l8_n835
+end
+
+def fun_l7_n225()
+ fun_l8_n104
+end
+
+def fun_l7_n226()
+ fun_l8_n111
+end
+
+def fun_l7_n227()
+ fun_l8_n12
+end
+
+def fun_l7_n228()
+ fun_l8_n299
+end
+
+def fun_l7_n229()
+ fun_l8_n639
+end
+
+def fun_l7_n230()
+ fun_l8_n789
+end
+
+def fun_l7_n231()
+ fun_l8_n968
+end
+
+def fun_l7_n232()
+ fun_l8_n905
+end
+
+def fun_l7_n233()
+ fun_l8_n325
+end
+
+def fun_l7_n234()
+ fun_l8_n841
+end
+
+def fun_l7_n235()
+ fun_l8_n605
+end
+
+def fun_l7_n236()
+ fun_l8_n495
+end
+
+def fun_l7_n237()
+ fun_l8_n154
+end
+
+def fun_l7_n238()
+ fun_l8_n331
+end
+
+def fun_l7_n239()
+ fun_l8_n30
+end
+
+def fun_l7_n240()
+ fun_l8_n170
+end
+
+def fun_l7_n241()
+ fun_l8_n376
+end
+
+def fun_l7_n242()
+ fun_l8_n49
+end
+
+def fun_l7_n243()
+ fun_l8_n463
+end
+
+def fun_l7_n244()
+ fun_l8_n269
+end
+
+def fun_l7_n245()
+ fun_l8_n573
+end
+
+def fun_l7_n246()
+ fun_l8_n782
+end
+
+def fun_l7_n247()
+ fun_l8_n85
+end
+
+def fun_l7_n248()
+ fun_l8_n667
+end
+
+def fun_l7_n249()
+ fun_l8_n686
+end
+
+def fun_l7_n250()
+ fun_l8_n575
+end
+
+def fun_l7_n251()
+ fun_l8_n349
+end
+
+def fun_l7_n252()
+ fun_l8_n252
+end
+
+def fun_l7_n253()
+ fun_l8_n490
+end
+
+def fun_l7_n254()
+ fun_l8_n600
+end
+
+def fun_l7_n255()
+ fun_l8_n772
+end
+
+def fun_l7_n256()
+ fun_l8_n645
+end
+
+def fun_l7_n257()
+ fun_l8_n633
+end
+
+def fun_l7_n258()
+ fun_l8_n323
+end
+
+def fun_l7_n259()
+ fun_l8_n590
+end
+
+def fun_l7_n260()
+ fun_l8_n77
+end
+
+def fun_l7_n261()
+ fun_l8_n349
+end
+
+def fun_l7_n262()
+ fun_l8_n98
+end
+
+def fun_l7_n263()
+ fun_l8_n312
+end
+
+def fun_l7_n264()
+ fun_l8_n449
+end
+
+def fun_l7_n265()
+ fun_l8_n550
+end
+
+def fun_l7_n266()
+ fun_l8_n717
+end
+
+def fun_l7_n267()
+ fun_l8_n249
+end
+
+def fun_l7_n268()
+ fun_l8_n940
+end
+
+def fun_l7_n269()
+ fun_l8_n243
+end
+
+def fun_l7_n270()
+ fun_l8_n392
+end
+
+def fun_l7_n271()
+ fun_l8_n129
+end
+
+def fun_l7_n272()
+ fun_l8_n704
+end
+
+def fun_l7_n273()
+ fun_l8_n815
+end
+
+def fun_l7_n274()
+ fun_l8_n123
+end
+
+def fun_l7_n275()
+ fun_l8_n281
+end
+
+def fun_l7_n276()
+ fun_l8_n110
+end
+
+def fun_l7_n277()
+ fun_l8_n250
+end
+
+def fun_l7_n278()
+ fun_l8_n245
+end
+
+def fun_l7_n279()
+ fun_l8_n612
+end
+
+def fun_l7_n280()
+ fun_l8_n693
+end
+
+def fun_l7_n281()
+ fun_l8_n441
+end
+
+def fun_l7_n282()
+ fun_l8_n716
+end
+
+def fun_l7_n283()
+ fun_l8_n467
+end
+
+def fun_l7_n284()
+ fun_l8_n944
+end
+
+def fun_l7_n285()
+ fun_l8_n14
+end
+
+def fun_l7_n286()
+ fun_l8_n453
+end
+
+def fun_l7_n287()
+ fun_l8_n342
+end
+
+def fun_l7_n288()
+ fun_l8_n666
+end
+
+def fun_l7_n289()
+ fun_l8_n111
+end
+
+def fun_l7_n290()
+ fun_l8_n353
+end
+
+def fun_l7_n291()
+ fun_l8_n279
+end
+
+def fun_l7_n292()
+ fun_l8_n556
+end
+
+def fun_l7_n293()
+ fun_l8_n780
+end
+
+def fun_l7_n294()
+ fun_l8_n137
+end
+
+def fun_l7_n295()
+ fun_l8_n760
+end
+
+def fun_l7_n296()
+ fun_l8_n56
+end
+
+def fun_l7_n297()
+ fun_l8_n927
+end
+
+def fun_l7_n298()
+ fun_l8_n861
+end
+
+def fun_l7_n299()
+ fun_l8_n653
+end
+
+def fun_l7_n300()
+ fun_l8_n948
+end
+
+def fun_l7_n301()
+ fun_l8_n159
+end
+
+def fun_l7_n302()
+ fun_l8_n426
+end
+
+def fun_l7_n303()
+ fun_l8_n175
+end
+
+def fun_l7_n304()
+ fun_l8_n35
+end
+
+def fun_l7_n305()
+ fun_l8_n700
+end
+
+def fun_l7_n306()
+ fun_l8_n603
+end
+
+def fun_l7_n307()
+ fun_l8_n600
+end
+
+def fun_l7_n308()
+ fun_l8_n280
+end
+
+def fun_l7_n309()
+ fun_l8_n599
+end
+
+def fun_l7_n310()
+ fun_l8_n404
+end
+
+def fun_l7_n311()
+ fun_l8_n475
+end
+
+def fun_l7_n312()
+ fun_l8_n837
+end
+
+def fun_l7_n313()
+ fun_l8_n61
+end
+
+def fun_l7_n314()
+ fun_l8_n571
+end
+
+def fun_l7_n315()
+ fun_l8_n442
+end
+
+def fun_l7_n316()
+ fun_l8_n256
+end
+
+def fun_l7_n317()
+ fun_l8_n751
+end
+
+def fun_l7_n318()
+ fun_l8_n672
+end
+
+def fun_l7_n319()
+ fun_l8_n953
+end
+
+def fun_l7_n320()
+ fun_l8_n330
+end
+
+def fun_l7_n321()
+ fun_l8_n54
+end
+
+def fun_l7_n322()
+ fun_l8_n11
+end
+
+def fun_l7_n323()
+ fun_l8_n504
+end
+
+def fun_l7_n324()
+ fun_l8_n786
+end
+
+def fun_l7_n325()
+ fun_l8_n32
+end
+
+def fun_l7_n326()
+ fun_l8_n85
+end
+
+def fun_l7_n327()
+ fun_l8_n727
+end
+
+def fun_l7_n328()
+ fun_l8_n445
+end
+
+def fun_l7_n329()
+ fun_l8_n787
+end
+
+def fun_l7_n330()
+ fun_l8_n663
+end
+
+def fun_l7_n331()
+ fun_l8_n461
+end
+
+def fun_l7_n332()
+ fun_l8_n82
+end
+
+def fun_l7_n333()
+ fun_l8_n974
+end
+
+def fun_l7_n334()
+ fun_l8_n511
+end
+
+def fun_l7_n335()
+ fun_l8_n827
+end
+
+def fun_l7_n336()
+ fun_l8_n12
+end
+
+def fun_l7_n337()
+ fun_l8_n696
+end
+
+def fun_l7_n338()
+ fun_l8_n325
+end
+
+def fun_l7_n339()
+ fun_l8_n148
+end
+
+def fun_l7_n340()
+ fun_l8_n609
+end
+
+def fun_l7_n341()
+ fun_l8_n471
+end
+
+def fun_l7_n342()
+ fun_l8_n63
+end
+
+def fun_l7_n343()
+ fun_l8_n358
+end
+
+def fun_l7_n344()
+ fun_l8_n658
+end
+
+def fun_l7_n345()
+ fun_l8_n730
+end
+
+def fun_l7_n346()
+ fun_l8_n139
+end
+
+def fun_l7_n347()
+ fun_l8_n951
+end
+
+def fun_l7_n348()
+ fun_l8_n113
+end
+
+def fun_l7_n349()
+ fun_l8_n695
+end
+
+def fun_l7_n350()
+ fun_l8_n803
+end
+
+def fun_l7_n351()
+ fun_l8_n93
+end
+
+def fun_l7_n352()
+ fun_l8_n340
+end
+
+def fun_l7_n353()
+ fun_l8_n551
+end
+
+def fun_l7_n354()
+ fun_l8_n5
+end
+
+def fun_l7_n355()
+ fun_l8_n960
+end
+
+def fun_l7_n356()
+ fun_l8_n76
+end
+
+def fun_l7_n357()
+ fun_l8_n142
+end
+
+def fun_l7_n358()
+ fun_l8_n305
+end
+
+def fun_l7_n359()
+ fun_l8_n739
+end
+
+def fun_l7_n360()
+ fun_l8_n293
+end
+
+def fun_l7_n361()
+ fun_l8_n812
+end
+
+def fun_l7_n362()
+ fun_l8_n635
+end
+
+def fun_l7_n363()
+ fun_l8_n239
+end
+
+def fun_l7_n364()
+ fun_l8_n880
+end
+
+def fun_l7_n365()
+ fun_l8_n999
+end
+
+def fun_l7_n366()
+ fun_l8_n997
+end
+
+def fun_l7_n367()
+ fun_l8_n190
+end
+
+def fun_l7_n368()
+ fun_l8_n763
+end
+
+def fun_l7_n369()
+ fun_l8_n369
+end
+
+def fun_l7_n370()
+ fun_l8_n538
+end
+
+def fun_l7_n371()
+ fun_l8_n553
+end
+
+def fun_l7_n372()
+ fun_l8_n844
+end
+
+def fun_l7_n373()
+ fun_l8_n773
+end
+
+def fun_l7_n374()
+ fun_l8_n589
+end
+
+def fun_l7_n375()
+ fun_l8_n492
+end
+
+def fun_l7_n376()
+ fun_l8_n848
+end
+
+def fun_l7_n377()
+ fun_l8_n715
+end
+
+def fun_l7_n378()
+ fun_l8_n82
+end
+
+def fun_l7_n379()
+ fun_l8_n267
+end
+
+def fun_l7_n380()
+ fun_l8_n84
+end
+
+def fun_l7_n381()
+ fun_l8_n996
+end
+
+def fun_l7_n382()
+ fun_l8_n536
+end
+
+def fun_l7_n383()
+ fun_l8_n518
+end
+
+def fun_l7_n384()
+ fun_l8_n70
+end
+
+def fun_l7_n385()
+ fun_l8_n545
+end
+
+def fun_l7_n386()
+ fun_l8_n156
+end
+
+def fun_l7_n387()
+ fun_l8_n558
+end
+
+def fun_l7_n388()
+ fun_l8_n519
+end
+
+def fun_l7_n389()
+ fun_l8_n321
+end
+
+def fun_l7_n390()
+ fun_l8_n133
+end
+
+def fun_l7_n391()
+ fun_l8_n253
+end
+
+def fun_l7_n392()
+ fun_l8_n969
+end
+
+def fun_l7_n393()
+ fun_l8_n986
+end
+
+def fun_l7_n394()
+ fun_l8_n991
+end
+
+def fun_l7_n395()
+ fun_l8_n757
+end
+
+def fun_l7_n396()
+ fun_l8_n496
+end
+
+def fun_l7_n397()
+ fun_l8_n841
+end
+
+def fun_l7_n398()
+ fun_l8_n922
+end
+
+def fun_l7_n399()
+ fun_l8_n51
+end
+
+def fun_l7_n400()
+ fun_l8_n961
+end
+
+def fun_l7_n401()
+ fun_l8_n82
+end
+
+def fun_l7_n402()
+ fun_l8_n190
+end
+
+def fun_l7_n403()
+ fun_l8_n543
+end
+
+def fun_l7_n404()
+ fun_l8_n768
+end
+
+def fun_l7_n405()
+ fun_l8_n810
+end
+
+def fun_l7_n406()
+ fun_l8_n714
+end
+
+def fun_l7_n407()
+ fun_l8_n692
+end
+
+def fun_l7_n408()
+ fun_l8_n357
+end
+
+def fun_l7_n409()
+ fun_l8_n380
+end
+
+def fun_l7_n410()
+ fun_l8_n958
+end
+
+def fun_l7_n411()
+ fun_l8_n992
+end
+
+def fun_l7_n412()
+ fun_l8_n819
+end
+
+def fun_l7_n413()
+ fun_l8_n4
+end
+
+def fun_l7_n414()
+ fun_l8_n429
+end
+
+def fun_l7_n415()
+ fun_l8_n56
+end
+
+def fun_l7_n416()
+ fun_l8_n212
+end
+
+def fun_l7_n417()
+ fun_l8_n267
+end
+
+def fun_l7_n418()
+ fun_l8_n948
+end
+
+def fun_l7_n419()
+ fun_l8_n221
+end
+
+def fun_l7_n420()
+ fun_l8_n711
+end
+
+def fun_l7_n421()
+ fun_l8_n307
+end
+
+def fun_l7_n422()
+ fun_l8_n482
+end
+
+def fun_l7_n423()
+ fun_l8_n522
+end
+
+def fun_l7_n424()
+ fun_l8_n166
+end
+
+def fun_l7_n425()
+ fun_l8_n410
+end
+
+def fun_l7_n426()
+ fun_l8_n143
+end
+
+def fun_l7_n427()
+ fun_l8_n54
+end
+
+def fun_l7_n428()
+ fun_l8_n217
+end
+
+def fun_l7_n429()
+ fun_l8_n423
+end
+
+def fun_l7_n430()
+ fun_l8_n181
+end
+
+def fun_l7_n431()
+ fun_l8_n456
+end
+
+def fun_l7_n432()
+ fun_l8_n640
+end
+
+def fun_l7_n433()
+ fun_l8_n588
+end
+
+def fun_l7_n434()
+ fun_l8_n49
+end
+
+def fun_l7_n435()
+ fun_l8_n373
+end
+
+def fun_l7_n436()
+ fun_l8_n668
+end
+
+def fun_l7_n437()
+ fun_l8_n478
+end
+
+def fun_l7_n438()
+ fun_l8_n468
+end
+
+def fun_l7_n439()
+ fun_l8_n230
+end
+
+def fun_l7_n440()
+ fun_l8_n361
+end
+
+def fun_l7_n441()
+ fun_l8_n770
+end
+
+def fun_l7_n442()
+ fun_l8_n876
+end
+
+def fun_l7_n443()
+ fun_l8_n383
+end
+
+def fun_l7_n444()
+ fun_l8_n568
+end
+
+def fun_l7_n445()
+ fun_l8_n236
+end
+
+def fun_l7_n446()
+ fun_l8_n136
+end
+
+def fun_l7_n447()
+ fun_l8_n883
+end
+
+def fun_l7_n448()
+ fun_l8_n227
+end
+
+def fun_l7_n449()
+ fun_l8_n634
+end
+
+def fun_l7_n450()
+ fun_l8_n985
+end
+
+def fun_l7_n451()
+ fun_l8_n314
+end
+
+def fun_l7_n452()
+ fun_l8_n90
+end
+
+def fun_l7_n453()
+ fun_l8_n31
+end
+
+def fun_l7_n454()
+ fun_l8_n226
+end
+
+def fun_l7_n455()
+ fun_l8_n309
+end
+
+def fun_l7_n456()
+ fun_l8_n912
+end
+
+def fun_l7_n457()
+ fun_l8_n7
+end
+
+def fun_l7_n458()
+ fun_l8_n304
+end
+
+def fun_l7_n459()
+ fun_l8_n488
+end
+
+def fun_l7_n460()
+ fun_l8_n576
+end
+
+def fun_l7_n461()
+ fun_l8_n854
+end
+
+def fun_l7_n462()
+ fun_l8_n164
+end
+
+def fun_l7_n463()
+ fun_l8_n381
+end
+
+def fun_l7_n464()
+ fun_l8_n241
+end
+
+def fun_l7_n465()
+ fun_l8_n330
+end
+
+def fun_l7_n466()
+ fun_l8_n517
+end
+
+def fun_l7_n467()
+ fun_l8_n647
+end
+
+def fun_l7_n468()
+ fun_l8_n320
+end
+
+def fun_l7_n469()
+ fun_l8_n479
+end
+
+def fun_l7_n470()
+ fun_l8_n913
+end
+
+def fun_l7_n471()
+ fun_l8_n13
+end
+
+def fun_l7_n472()
+ fun_l8_n601
+end
+
+def fun_l7_n473()
+ fun_l8_n364
+end
+
+def fun_l7_n474()
+ fun_l8_n360
+end
+
+def fun_l7_n475()
+ fun_l8_n374
+end
+
+def fun_l7_n476()
+ fun_l8_n651
+end
+
+def fun_l7_n477()
+ fun_l8_n579
+end
+
+def fun_l7_n478()
+ fun_l8_n583
+end
+
+def fun_l7_n479()
+ fun_l8_n693
+end
+
+def fun_l7_n480()
+ fun_l8_n941
+end
+
+def fun_l7_n481()
+ fun_l8_n743
+end
+
+def fun_l7_n482()
+ fun_l8_n511
+end
+
+def fun_l7_n483()
+ fun_l8_n528
+end
+
+def fun_l7_n484()
+ fun_l8_n898
+end
+
+def fun_l7_n485()
+ fun_l8_n175
+end
+
+def fun_l7_n486()
+ fun_l8_n45
+end
+
+def fun_l7_n487()
+ fun_l8_n871
+end
+
+def fun_l7_n488()
+ fun_l8_n464
+end
+
+def fun_l7_n489()
+ fun_l8_n69
+end
+
+def fun_l7_n490()
+ fun_l8_n334
+end
+
+def fun_l7_n491()
+ fun_l8_n687
+end
+
+def fun_l7_n492()
+ fun_l8_n729
+end
+
+def fun_l7_n493()
+ fun_l8_n47
+end
+
+def fun_l7_n494()
+ fun_l8_n905
+end
+
+def fun_l7_n495()
+ fun_l8_n586
+end
+
+def fun_l7_n496()
+ fun_l8_n657
+end
+
+def fun_l7_n497()
+ fun_l8_n673
+end
+
+def fun_l7_n498()
+ fun_l8_n173
+end
+
+def fun_l7_n499()
+ fun_l8_n333
+end
+
+def fun_l7_n500()
+ fun_l8_n712
+end
+
+def fun_l7_n501()
+ fun_l8_n349
+end
+
+def fun_l7_n502()
+ fun_l8_n969
+end
+
+def fun_l7_n503()
+ fun_l8_n678
+end
+
+def fun_l7_n504()
+ fun_l8_n507
+end
+
+def fun_l7_n505()
+ fun_l8_n206
+end
+
+def fun_l7_n506()
+ fun_l8_n370
+end
+
+def fun_l7_n507()
+ fun_l8_n270
+end
+
+def fun_l7_n508()
+ fun_l8_n20
+end
+
+def fun_l7_n509()
+ fun_l8_n545
+end
+
+def fun_l7_n510()
+ fun_l8_n926
+end
+
+def fun_l7_n511()
+ fun_l8_n882
+end
+
+def fun_l7_n512()
+ fun_l8_n630
+end
+
+def fun_l7_n513()
+ fun_l8_n51
+end
+
+def fun_l7_n514()
+ fun_l8_n69
+end
+
+def fun_l7_n515()
+ fun_l8_n859
+end
+
+def fun_l7_n516()
+ fun_l8_n808
+end
+
+def fun_l7_n517()
+ fun_l8_n800
+end
+
+def fun_l7_n518()
+ fun_l8_n226
+end
+
+def fun_l7_n519()
+ fun_l8_n340
+end
+
+def fun_l7_n520()
+ fun_l8_n391
+end
+
+def fun_l7_n521()
+ fun_l8_n538
+end
+
+def fun_l7_n522()
+ fun_l8_n458
+end
+
+def fun_l7_n523()
+ fun_l8_n114
+end
+
+def fun_l7_n524()
+ fun_l8_n593
+end
+
+def fun_l7_n525()
+ fun_l8_n276
+end
+
+def fun_l7_n526()
+ fun_l8_n276
+end
+
+def fun_l7_n527()
+ fun_l8_n719
+end
+
+def fun_l7_n528()
+ fun_l8_n75
+end
+
+def fun_l7_n529()
+ fun_l8_n855
+end
+
+def fun_l7_n530()
+ fun_l8_n731
+end
+
+def fun_l7_n531()
+ fun_l8_n257
+end
+
+def fun_l7_n532()
+ fun_l8_n572
+end
+
+def fun_l7_n533()
+ fun_l8_n483
+end
+
+def fun_l7_n534()
+ fun_l8_n548
+end
+
+def fun_l7_n535()
+ fun_l8_n867
+end
+
+def fun_l7_n536()
+ fun_l8_n923
+end
+
+def fun_l7_n537()
+ fun_l8_n988
+end
+
+def fun_l7_n538()
+ fun_l8_n813
+end
+
+def fun_l7_n539()
+ fun_l8_n503
+end
+
+def fun_l7_n540()
+ fun_l8_n326
+end
+
+def fun_l7_n541()
+ fun_l8_n521
+end
+
+def fun_l7_n542()
+ fun_l8_n804
+end
+
+def fun_l7_n543()
+ fun_l8_n693
+end
+
+def fun_l7_n544()
+ fun_l8_n887
+end
+
+def fun_l7_n545()
+ fun_l8_n543
+end
+
+def fun_l7_n546()
+ fun_l8_n438
+end
+
+def fun_l7_n547()
+ fun_l8_n295
+end
+
+def fun_l7_n548()
+ fun_l8_n361
+end
+
+def fun_l7_n549()
+ fun_l8_n495
+end
+
+def fun_l7_n550()
+ fun_l8_n34
+end
+
+def fun_l7_n551()
+ fun_l8_n491
+end
+
+def fun_l7_n552()
+ fun_l8_n659
+end
+
+def fun_l7_n553()
+ fun_l8_n589
+end
+
+def fun_l7_n554()
+ fun_l8_n450
+end
+
+def fun_l7_n555()
+ fun_l8_n365
+end
+
+def fun_l7_n556()
+ fun_l8_n171
+end
+
+def fun_l7_n557()
+ fun_l8_n145
+end
+
+def fun_l7_n558()
+ fun_l8_n760
+end
+
+def fun_l7_n559()
+ fun_l8_n767
+end
+
+def fun_l7_n560()
+ fun_l8_n51
+end
+
+def fun_l7_n561()
+ fun_l8_n596
+end
+
+def fun_l7_n562()
+ fun_l8_n744
+end
+
+def fun_l7_n563()
+ fun_l8_n80
+end
+
+def fun_l7_n564()
+ fun_l8_n787
+end
+
+def fun_l7_n565()
+ fun_l8_n783
+end
+
+def fun_l7_n566()
+ fun_l8_n310
+end
+
+def fun_l7_n567()
+ fun_l8_n703
+end
+
+def fun_l7_n568()
+ fun_l8_n665
+end
+
+def fun_l7_n569()
+ fun_l8_n866
+end
+
+def fun_l7_n570()
+ fun_l8_n80
+end
+
+def fun_l7_n571()
+ fun_l8_n694
+end
+
+def fun_l7_n572()
+ fun_l8_n970
+end
+
+def fun_l7_n573()
+ fun_l8_n102
+end
+
+def fun_l7_n574()
+ fun_l8_n362
+end
+
+def fun_l7_n575()
+ fun_l8_n119
+end
+
+def fun_l7_n576()
+ fun_l8_n772
+end
+
+def fun_l7_n577()
+ fun_l8_n715
+end
+
+def fun_l7_n578()
+ fun_l8_n487
+end
+
+def fun_l7_n579()
+ fun_l8_n48
+end
+
+def fun_l7_n580()
+ fun_l8_n824
+end
+
+def fun_l7_n581()
+ fun_l8_n208
+end
+
+def fun_l7_n582()
+ fun_l8_n494
+end
+
+def fun_l7_n583()
+ fun_l8_n138
+end
+
+def fun_l7_n584()
+ fun_l8_n961
+end
+
+def fun_l7_n585()
+ fun_l8_n553
+end
+
+def fun_l7_n586()
+ fun_l8_n302
+end
+
+def fun_l7_n587()
+ fun_l8_n266
+end
+
+def fun_l7_n588()
+ fun_l8_n589
+end
+
+def fun_l7_n589()
+ fun_l8_n964
+end
+
+def fun_l7_n590()
+ fun_l8_n238
+end
+
+def fun_l7_n591()
+ fun_l8_n139
+end
+
+def fun_l7_n592()
+ fun_l8_n680
+end
+
+def fun_l7_n593()
+ fun_l8_n252
+end
+
+def fun_l7_n594()
+ fun_l8_n701
+end
+
+def fun_l7_n595()
+ fun_l8_n100
+end
+
+def fun_l7_n596()
+ fun_l8_n358
+end
+
+def fun_l7_n597()
+ fun_l8_n770
+end
+
+def fun_l7_n598()
+ fun_l8_n880
+end
+
+def fun_l7_n599()
+ fun_l8_n761
+end
+
+def fun_l7_n600()
+ fun_l8_n876
+end
+
+def fun_l7_n601()
+ fun_l8_n373
+end
+
+def fun_l7_n602()
+ fun_l8_n775
+end
+
+def fun_l7_n603()
+ fun_l8_n317
+end
+
+def fun_l7_n604()
+ fun_l8_n456
+end
+
+def fun_l7_n605()
+ fun_l8_n343
+end
+
+def fun_l7_n606()
+ fun_l8_n68
+end
+
+def fun_l7_n607()
+ fun_l8_n25
+end
+
+def fun_l7_n608()
+ fun_l8_n399
+end
+
+def fun_l7_n609()
+ fun_l8_n14
+end
+
+def fun_l7_n610()
+ fun_l8_n549
+end
+
+def fun_l7_n611()
+ fun_l8_n45
+end
+
+def fun_l7_n612()
+ fun_l8_n516
+end
+
+def fun_l7_n613()
+ fun_l8_n345
+end
+
+def fun_l7_n614()
+ fun_l8_n909
+end
+
+def fun_l7_n615()
+ fun_l8_n954
+end
+
+def fun_l7_n616()
+ fun_l8_n893
+end
+
+def fun_l7_n617()
+ fun_l8_n57
+end
+
+def fun_l7_n618()
+ fun_l8_n83
+end
+
+def fun_l7_n619()
+ fun_l8_n658
+end
+
+def fun_l7_n620()
+ fun_l8_n585
+end
+
+def fun_l7_n621()
+ fun_l8_n260
+end
+
+def fun_l7_n622()
+ fun_l8_n226
+end
+
+def fun_l7_n623()
+ fun_l8_n186
+end
+
+def fun_l7_n624()
+ fun_l8_n994
+end
+
+def fun_l7_n625()
+ fun_l8_n408
+end
+
+def fun_l7_n626()
+ fun_l8_n878
+end
+
+def fun_l7_n627()
+ fun_l8_n473
+end
+
+def fun_l7_n628()
+ fun_l8_n153
+end
+
+def fun_l7_n629()
+ fun_l8_n590
+end
+
+def fun_l7_n630()
+ fun_l8_n610
+end
+
+def fun_l7_n631()
+ fun_l8_n438
+end
+
+def fun_l7_n632()
+ fun_l8_n484
+end
+
+def fun_l7_n633()
+ fun_l8_n908
+end
+
+def fun_l7_n634()
+ fun_l8_n992
+end
+
+def fun_l7_n635()
+ fun_l8_n556
+end
+
+def fun_l7_n636()
+ fun_l8_n929
+end
+
+def fun_l7_n637()
+ fun_l8_n128
+end
+
+def fun_l7_n638()
+ fun_l8_n372
+end
+
+def fun_l7_n639()
+ fun_l8_n36
+end
+
+def fun_l7_n640()
+ fun_l8_n545
+end
+
+def fun_l7_n641()
+ fun_l8_n801
+end
+
+def fun_l7_n642()
+ fun_l8_n444
+end
+
+def fun_l7_n643()
+ fun_l8_n822
+end
+
+def fun_l7_n644()
+ fun_l8_n587
+end
+
+def fun_l7_n645()
+ fun_l8_n418
+end
+
+def fun_l7_n646()
+ fun_l8_n539
+end
+
+def fun_l7_n647()
+ fun_l8_n266
+end
+
+def fun_l7_n648()
+ fun_l8_n869
+end
+
+def fun_l7_n649()
+ fun_l8_n84
+end
+
+def fun_l7_n650()
+ fun_l8_n265
+end
+
+def fun_l7_n651()
+ fun_l8_n551
+end
+
+def fun_l7_n652()
+ fun_l8_n35
+end
+
+def fun_l7_n653()
+ fun_l8_n606
+end
+
+def fun_l7_n654()
+ fun_l8_n379
+end
+
+def fun_l7_n655()
+ fun_l8_n417
+end
+
+def fun_l7_n656()
+ fun_l8_n641
+end
+
+def fun_l7_n657()
+ fun_l8_n889
+end
+
+def fun_l7_n658()
+ fun_l8_n232
+end
+
+def fun_l7_n659()
+ fun_l8_n957
+end
+
+def fun_l7_n660()
+ fun_l8_n666
+end
+
+def fun_l7_n661()
+ fun_l8_n588
+end
+
+def fun_l7_n662()
+ fun_l8_n591
+end
+
+def fun_l7_n663()
+ fun_l8_n489
+end
+
+def fun_l7_n664()
+ fun_l8_n927
+end
+
+def fun_l7_n665()
+ fun_l8_n304
+end
+
+def fun_l7_n666()
+ fun_l8_n856
+end
+
+def fun_l7_n667()
+ fun_l8_n969
+end
+
+def fun_l7_n668()
+ fun_l8_n36
+end
+
+def fun_l7_n669()
+ fun_l8_n335
+end
+
+def fun_l7_n670()
+ fun_l8_n51
+end
+
+def fun_l7_n671()
+ fun_l8_n765
+end
+
+def fun_l7_n672()
+ fun_l8_n262
+end
+
+def fun_l7_n673()
+ fun_l8_n858
+end
+
+def fun_l7_n674()
+ fun_l8_n412
+end
+
+def fun_l7_n675()
+ fun_l8_n789
+end
+
+def fun_l7_n676()
+ fun_l8_n290
+end
+
+def fun_l7_n677()
+ fun_l8_n935
+end
+
+def fun_l7_n678()
+ fun_l8_n212
+end
+
+def fun_l7_n679()
+ fun_l8_n35
+end
+
+def fun_l7_n680()
+ fun_l8_n141
+end
+
+def fun_l7_n681()
+ fun_l8_n985
+end
+
+def fun_l7_n682()
+ fun_l8_n626
+end
+
+def fun_l7_n683()
+ fun_l8_n996
+end
+
+def fun_l7_n684()
+ fun_l8_n906
+end
+
+def fun_l7_n685()
+ fun_l8_n242
+end
+
+def fun_l7_n686()
+ fun_l8_n431
+end
+
+def fun_l7_n687()
+ fun_l8_n494
+end
+
+def fun_l7_n688()
+ fun_l8_n564
+end
+
+def fun_l7_n689()
+ fun_l8_n737
+end
+
+def fun_l7_n690()
+ fun_l8_n366
+end
+
+def fun_l7_n691()
+ fun_l8_n763
+end
+
+def fun_l7_n692()
+ fun_l8_n556
+end
+
+def fun_l7_n693()
+ fun_l8_n436
+end
+
+def fun_l7_n694()
+ fun_l8_n17
+end
+
+def fun_l7_n695()
+ fun_l8_n283
+end
+
+def fun_l7_n696()
+ fun_l8_n641
+end
+
+def fun_l7_n697()
+ fun_l8_n298
+end
+
+def fun_l7_n698()
+ fun_l8_n819
+end
+
+def fun_l7_n699()
+ fun_l8_n858
+end
+
+def fun_l7_n700()
+ fun_l8_n161
+end
+
+def fun_l7_n701()
+ fun_l8_n813
+end
+
+def fun_l7_n702()
+ fun_l8_n604
+end
+
+def fun_l7_n703()
+ fun_l8_n878
+end
+
+def fun_l7_n704()
+ fun_l8_n880
+end
+
+def fun_l7_n705()
+ fun_l8_n431
+end
+
+def fun_l7_n706()
+ fun_l8_n944
+end
+
+def fun_l7_n707()
+ fun_l8_n672
+end
+
+def fun_l7_n708()
+ fun_l8_n983
+end
+
+def fun_l7_n709()
+ fun_l8_n224
+end
+
+def fun_l7_n710()
+ fun_l8_n915
+end
+
+def fun_l7_n711()
+ fun_l8_n699
+end
+
+def fun_l7_n712()
+ fun_l8_n112
+end
+
+def fun_l7_n713()
+ fun_l8_n64
+end
+
+def fun_l7_n714()
+ fun_l8_n3
+end
+
+def fun_l7_n715()
+ fun_l8_n508
+end
+
+def fun_l7_n716()
+ fun_l8_n172
+end
+
+def fun_l7_n717()
+ fun_l8_n777
+end
+
+def fun_l7_n718()
+ fun_l8_n328
+end
+
+def fun_l7_n719()
+ fun_l8_n338
+end
+
+def fun_l7_n720()
+ fun_l8_n897
+end
+
+def fun_l7_n721()
+ fun_l8_n373
+end
+
+def fun_l7_n722()
+ fun_l8_n91
+end
+
+def fun_l7_n723()
+ fun_l8_n149
+end
+
+def fun_l7_n724()
+ fun_l8_n65
+end
+
+def fun_l7_n725()
+ fun_l8_n685
+end
+
+def fun_l7_n726()
+ fun_l8_n939
+end
+
+def fun_l7_n727()
+ fun_l8_n427
+end
+
+def fun_l7_n728()
+ fun_l8_n606
+end
+
+def fun_l7_n729()
+ fun_l8_n818
+end
+
+def fun_l7_n730()
+ fun_l8_n24
+end
+
+def fun_l7_n731()
+ fun_l8_n901
+end
+
+def fun_l7_n732()
+ fun_l8_n979
+end
+
+def fun_l7_n733()
+ fun_l8_n88
+end
+
+def fun_l7_n734()
+ fun_l8_n516
+end
+
+def fun_l7_n735()
+ fun_l8_n44
+end
+
+def fun_l7_n736()
+ fun_l8_n540
+end
+
+def fun_l7_n737()
+ fun_l8_n586
+end
+
+def fun_l7_n738()
+ fun_l8_n695
+end
+
+def fun_l7_n739()
+ fun_l8_n774
+end
+
+def fun_l7_n740()
+ fun_l8_n797
+end
+
+def fun_l7_n741()
+ fun_l8_n524
+end
+
+def fun_l7_n742()
+ fun_l8_n784
+end
+
+def fun_l7_n743()
+ fun_l8_n203
+end
+
+def fun_l7_n744()
+ fun_l8_n808
+end
+
+def fun_l7_n745()
+ fun_l8_n216
+end
+
+def fun_l7_n746()
+ fun_l8_n14
+end
+
+def fun_l7_n747()
+ fun_l8_n799
+end
+
+def fun_l7_n748()
+ fun_l8_n660
+end
+
+def fun_l7_n749()
+ fun_l8_n417
+end
+
+def fun_l7_n750()
+ fun_l8_n573
+end
+
+def fun_l7_n751()
+ fun_l8_n919
+end
+
+def fun_l7_n752()
+ fun_l8_n956
+end
+
+def fun_l7_n753()
+ fun_l8_n475
+end
+
+def fun_l7_n754()
+ fun_l8_n941
+end
+
+def fun_l7_n755()
+ fun_l8_n629
+end
+
+def fun_l7_n756()
+ fun_l8_n745
+end
+
+def fun_l7_n757()
+ fun_l8_n656
+end
+
+def fun_l7_n758()
+ fun_l8_n315
+end
+
+def fun_l7_n759()
+ fun_l8_n952
+end
+
+def fun_l7_n760()
+ fun_l8_n241
+end
+
+def fun_l7_n761()
+ fun_l8_n341
+end
+
+def fun_l7_n762()
+ fun_l8_n156
+end
+
+def fun_l7_n763()
+ fun_l8_n258
+end
+
+def fun_l7_n764()
+ fun_l8_n275
+end
+
+def fun_l7_n765()
+ fun_l8_n950
+end
+
+def fun_l7_n766()
+ fun_l8_n715
+end
+
+def fun_l7_n767()
+ fun_l8_n746
+end
+
+def fun_l7_n768()
+ fun_l8_n428
+end
+
+def fun_l7_n769()
+ fun_l8_n176
+end
+
+def fun_l7_n770()
+ fun_l8_n586
+end
+
+def fun_l7_n771()
+ fun_l8_n912
+end
+
+def fun_l7_n772()
+ fun_l8_n484
+end
+
+def fun_l7_n773()
+ fun_l8_n155
+end
+
+def fun_l7_n774()
+ fun_l8_n648
+end
+
+def fun_l7_n775()
+ fun_l8_n27
+end
+
+def fun_l7_n776()
+ fun_l8_n188
+end
+
+def fun_l7_n777()
+ fun_l8_n804
+end
+
+def fun_l7_n778()
+ fun_l8_n646
+end
+
+def fun_l7_n779()
+ fun_l8_n884
+end
+
+def fun_l7_n780()
+ fun_l8_n332
+end
+
+def fun_l7_n781()
+ fun_l8_n28
+end
+
+def fun_l7_n782()
+ fun_l8_n966
+end
+
+def fun_l7_n783()
+ fun_l8_n531
+end
+
+def fun_l7_n784()
+ fun_l8_n955
+end
+
+def fun_l7_n785()
+ fun_l8_n264
+end
+
+def fun_l7_n786()
+ fun_l8_n387
+end
+
+def fun_l7_n787()
+ fun_l8_n274
+end
+
+def fun_l7_n788()
+ fun_l8_n790
+end
+
+def fun_l7_n789()
+ fun_l8_n80
+end
+
+def fun_l7_n790()
+ fun_l8_n551
+end
+
+def fun_l7_n791()
+ fun_l8_n762
+end
+
+def fun_l7_n792()
+ fun_l8_n777
+end
+
+def fun_l7_n793()
+ fun_l8_n120
+end
+
+def fun_l7_n794()
+ fun_l8_n189
+end
+
+def fun_l7_n795()
+ fun_l8_n241
+end
+
+def fun_l7_n796()
+ fun_l8_n608
+end
+
+def fun_l7_n797()
+ fun_l8_n689
+end
+
+def fun_l7_n798()
+ fun_l8_n406
+end
+
+def fun_l7_n799()
+ fun_l8_n853
+end
+
+def fun_l7_n800()
+ fun_l8_n606
+end
+
+def fun_l7_n801()
+ fun_l8_n723
+end
+
+def fun_l7_n802()
+ fun_l8_n498
+end
+
+def fun_l7_n803()
+ fun_l8_n109
+end
+
+def fun_l7_n804()
+ fun_l8_n400
+end
+
+def fun_l7_n805()
+ fun_l8_n266
+end
+
+def fun_l7_n806()
+ fun_l8_n661
+end
+
+def fun_l7_n807()
+ fun_l8_n107
+end
+
+def fun_l7_n808()
+ fun_l8_n541
+end
+
+def fun_l7_n809()
+ fun_l8_n44
+end
+
+def fun_l7_n810()
+ fun_l8_n184
+end
+
+def fun_l7_n811()
+ fun_l8_n516
+end
+
+def fun_l7_n812()
+ fun_l8_n706
+end
+
+def fun_l7_n813()
+ fun_l8_n714
+end
+
+def fun_l7_n814()
+ fun_l8_n399
+end
+
+def fun_l7_n815()
+ fun_l8_n877
+end
+
+def fun_l7_n816()
+ fun_l8_n301
+end
+
+def fun_l7_n817()
+ fun_l8_n75
+end
+
+def fun_l7_n818()
+ fun_l8_n169
+end
+
+def fun_l7_n819()
+ fun_l8_n99
+end
+
+def fun_l7_n820()
+ fun_l8_n155
+end
+
+def fun_l7_n821()
+ fun_l8_n281
+end
+
+def fun_l7_n822()
+ fun_l8_n210
+end
+
+def fun_l7_n823()
+ fun_l8_n835
+end
+
+def fun_l7_n824()
+ fun_l8_n700
+end
+
+def fun_l7_n825()
+ fun_l8_n231
+end
+
+def fun_l7_n826()
+ fun_l8_n967
+end
+
+def fun_l7_n827()
+ fun_l8_n818
+end
+
+def fun_l7_n828()
+ fun_l8_n670
+end
+
+def fun_l7_n829()
+ fun_l8_n311
+end
+
+def fun_l7_n830()
+ fun_l8_n919
+end
+
+def fun_l7_n831()
+ fun_l8_n949
+end
+
+def fun_l7_n832()
+ fun_l8_n677
+end
+
+def fun_l7_n833()
+ fun_l8_n626
+end
+
+def fun_l7_n834()
+ fun_l8_n171
+end
+
+def fun_l7_n835()
+ fun_l8_n723
+end
+
+def fun_l7_n836()
+ fun_l8_n606
+end
+
+def fun_l7_n837()
+ fun_l8_n580
+end
+
+def fun_l7_n838()
+ fun_l8_n369
+end
+
+def fun_l7_n839()
+ fun_l8_n510
+end
+
+def fun_l7_n840()
+ fun_l8_n554
+end
+
+def fun_l7_n841()
+ fun_l8_n749
+end
+
+def fun_l7_n842()
+ fun_l8_n623
+end
+
+def fun_l7_n843()
+ fun_l8_n735
+end
+
+def fun_l7_n844()
+ fun_l8_n401
+end
+
+def fun_l7_n845()
+ fun_l8_n693
+end
+
+def fun_l7_n846()
+ fun_l8_n367
+end
+
+def fun_l7_n847()
+ fun_l8_n351
+end
+
+def fun_l7_n848()
+ fun_l8_n527
+end
+
+def fun_l7_n849()
+ fun_l8_n964
+end
+
+def fun_l7_n850()
+ fun_l8_n193
+end
+
+def fun_l7_n851()
+ fun_l8_n401
+end
+
+def fun_l7_n852()
+ fun_l8_n873
+end
+
+def fun_l7_n853()
+ fun_l8_n326
+end
+
+def fun_l7_n854()
+ fun_l8_n292
+end
+
+def fun_l7_n855()
+ fun_l8_n519
+end
+
+def fun_l7_n856()
+ fun_l8_n801
+end
+
+def fun_l7_n857()
+ fun_l8_n45
+end
+
+def fun_l7_n858()
+ fun_l8_n212
+end
+
+def fun_l7_n859()
+ fun_l8_n812
+end
+
+def fun_l7_n860()
+ fun_l8_n541
+end
+
+def fun_l7_n861()
+ fun_l8_n410
+end
+
+def fun_l7_n862()
+ fun_l8_n177
+end
+
+def fun_l7_n863()
+ fun_l8_n940
+end
+
+def fun_l7_n864()
+ fun_l8_n832
+end
+
+def fun_l7_n865()
+ fun_l8_n7
+end
+
+def fun_l7_n866()
+ fun_l8_n654
+end
+
+def fun_l7_n867()
+ fun_l8_n282
+end
+
+def fun_l7_n868()
+ fun_l8_n916
+end
+
+def fun_l7_n869()
+ fun_l8_n638
+end
+
+def fun_l7_n870()
+ fun_l8_n71
+end
+
+def fun_l7_n871()
+ fun_l8_n153
+end
+
+def fun_l7_n872()
+ fun_l8_n285
+end
+
+def fun_l7_n873()
+ fun_l8_n744
+end
+
+def fun_l7_n874()
+ fun_l8_n912
+end
+
+def fun_l7_n875()
+ fun_l8_n258
+end
+
+def fun_l7_n876()
+ fun_l8_n346
+end
+
+def fun_l7_n877()
+ fun_l8_n366
+end
+
+def fun_l7_n878()
+ fun_l8_n165
+end
+
+def fun_l7_n879()
+ fun_l8_n745
+end
+
+def fun_l7_n880()
+ fun_l8_n472
+end
+
+def fun_l7_n881()
+ fun_l8_n290
+end
+
+def fun_l7_n882()
+ fun_l8_n695
+end
+
+def fun_l7_n883()
+ fun_l8_n522
+end
+
+def fun_l7_n884()
+ fun_l8_n851
+end
+
+def fun_l7_n885()
+ fun_l8_n870
+end
+
+def fun_l7_n886()
+ fun_l8_n70
+end
+
+def fun_l7_n887()
+ fun_l8_n334
+end
+
+def fun_l7_n888()
+ fun_l8_n786
+end
+
+def fun_l7_n889()
+ fun_l8_n41
+end
+
+def fun_l7_n890()
+ fun_l8_n316
+end
+
+def fun_l7_n891()
+ fun_l8_n594
+end
+
+def fun_l7_n892()
+ fun_l8_n168
+end
+
+def fun_l7_n893()
+ fun_l8_n960
+end
+
+def fun_l7_n894()
+ fun_l8_n357
+end
+
+def fun_l7_n895()
+ fun_l8_n695
+end
+
+def fun_l7_n896()
+ fun_l8_n616
+end
+
+def fun_l7_n897()
+ fun_l8_n63
+end
+
+def fun_l7_n898()
+ fun_l8_n59
+end
+
+def fun_l7_n899()
+ fun_l8_n958
+end
+
+def fun_l7_n900()
+ fun_l8_n623
+end
+
+def fun_l7_n901()
+ fun_l8_n427
+end
+
+def fun_l7_n902()
+ fun_l8_n203
+end
+
+def fun_l7_n903()
+ fun_l8_n752
+end
+
+def fun_l7_n904()
+ fun_l8_n28
+end
+
+def fun_l7_n905()
+ fun_l8_n687
+end
+
+def fun_l7_n906()
+ fun_l8_n723
+end
+
+def fun_l7_n907()
+ fun_l8_n688
+end
+
+def fun_l7_n908()
+ fun_l8_n417
+end
+
+def fun_l7_n909()
+ fun_l8_n769
+end
+
+def fun_l7_n910()
+ fun_l8_n683
+end
+
+def fun_l7_n911()
+ fun_l8_n865
+end
+
+def fun_l7_n912()
+ fun_l8_n75
+end
+
+def fun_l7_n913()
+ fun_l8_n671
+end
+
+def fun_l7_n914()
+ fun_l8_n168
+end
+
+def fun_l7_n915()
+ fun_l8_n958
+end
+
+def fun_l7_n916()
+ fun_l8_n96
+end
+
+def fun_l7_n917()
+ fun_l8_n981
+end
+
+def fun_l7_n918()
+ fun_l8_n481
+end
+
+def fun_l7_n919()
+ fun_l8_n887
+end
+
+def fun_l7_n920()
+ fun_l8_n319
+end
+
+def fun_l7_n921()
+ fun_l8_n349
+end
+
+def fun_l7_n922()
+ fun_l8_n774
+end
+
+def fun_l7_n923()
+ fun_l8_n490
+end
+
+def fun_l7_n924()
+ fun_l8_n64
+end
+
+def fun_l7_n925()
+ fun_l8_n581
+end
+
+def fun_l7_n926()
+ fun_l8_n306
+end
+
+def fun_l7_n927()
+ fun_l8_n141
+end
+
+def fun_l7_n928()
+ fun_l8_n353
+end
+
+def fun_l7_n929()
+ fun_l8_n653
+end
+
+def fun_l7_n930()
+ fun_l8_n995
+end
+
+def fun_l7_n931()
+ fun_l8_n546
+end
+
+def fun_l7_n932()
+ fun_l8_n163
+end
+
+def fun_l7_n933()
+ fun_l8_n986
+end
+
+def fun_l7_n934()
+ fun_l8_n822
+end
+
+def fun_l7_n935()
+ fun_l8_n445
+end
+
+def fun_l7_n936()
+ fun_l8_n595
+end
+
+def fun_l7_n937()
+ fun_l8_n457
+end
+
+def fun_l7_n938()
+ fun_l8_n119
+end
+
+def fun_l7_n939()
+ fun_l8_n575
+end
+
+def fun_l7_n940()
+ fun_l8_n738
+end
+
+def fun_l7_n941()
+ fun_l8_n307
+end
+
+def fun_l7_n942()
+ fun_l8_n322
+end
+
+def fun_l7_n943()
+ fun_l8_n938
+end
+
+def fun_l7_n944()
+ fun_l8_n787
+end
+
+def fun_l7_n945()
+ fun_l8_n834
+end
+
+def fun_l7_n946()
+ fun_l8_n360
+end
+
+def fun_l7_n947()
+ fun_l8_n631
+end
+
+def fun_l7_n948()
+ fun_l8_n796
+end
+
+def fun_l7_n949()
+ fun_l8_n498
+end
+
+def fun_l7_n950()
+ fun_l8_n494
+end
+
+def fun_l7_n951()
+ fun_l8_n303
+end
+
+def fun_l7_n952()
+ fun_l8_n107
+end
+
+def fun_l7_n953()
+ fun_l8_n403
+end
+
+def fun_l7_n954()
+ fun_l8_n635
+end
+
+def fun_l7_n955()
+ fun_l8_n81
+end
+
+def fun_l7_n956()
+ fun_l8_n770
+end
+
+def fun_l7_n957()
+ fun_l8_n123
+end
+
+def fun_l7_n958()
+ fun_l8_n389
+end
+
+def fun_l7_n959()
+ fun_l8_n965
+end
+
+def fun_l7_n960()
+ fun_l8_n579
+end
+
+def fun_l7_n961()
+ fun_l8_n816
+end
+
+def fun_l7_n962()
+ fun_l8_n570
+end
+
+def fun_l7_n963()
+ fun_l8_n85
+end
+
+def fun_l7_n964()
+ fun_l8_n70
+end
+
+def fun_l7_n965()
+ fun_l8_n13
+end
+
+def fun_l7_n966()
+ fun_l8_n142
+end
+
+def fun_l7_n967()
+ fun_l8_n765
+end
+
+def fun_l7_n968()
+ fun_l8_n912
+end
+
+def fun_l7_n969()
+ fun_l8_n496
+end
+
+def fun_l7_n970()
+ fun_l8_n77
+end
+
+def fun_l7_n971()
+ fun_l8_n75
+end
+
+def fun_l7_n972()
+ fun_l8_n822
+end
+
+def fun_l7_n973()
+ fun_l8_n859
+end
+
+def fun_l7_n974()
+ fun_l8_n502
+end
+
+def fun_l7_n975()
+ fun_l8_n673
+end
+
+def fun_l7_n976()
+ fun_l8_n3
+end
+
+def fun_l7_n977()
+ fun_l8_n288
+end
+
+def fun_l7_n978()
+ fun_l8_n547
+end
+
+def fun_l7_n979()
+ fun_l8_n720
+end
+
+def fun_l7_n980()
+ fun_l8_n822
+end
+
+def fun_l7_n981()
+ fun_l8_n518
+end
+
+def fun_l7_n982()
+ fun_l8_n243
+end
+
+def fun_l7_n983()
+ fun_l8_n695
+end
+
+def fun_l7_n984()
+ fun_l8_n182
+end
+
+def fun_l7_n985()
+ fun_l8_n783
+end
+
+def fun_l7_n986()
+ fun_l8_n237
+end
+
+def fun_l7_n987()
+ fun_l8_n722
+end
+
+def fun_l7_n988()
+ fun_l8_n154
+end
+
+def fun_l7_n989()
+ fun_l8_n728
+end
+
+def fun_l7_n990()
+ fun_l8_n673
+end
+
+def fun_l7_n991()
+ fun_l8_n885
+end
+
+def fun_l7_n992()
+ fun_l8_n490
+end
+
+def fun_l7_n993()
+ fun_l8_n50
+end
+
+def fun_l7_n994()
+ fun_l8_n557
+end
+
+def fun_l7_n995()
+ fun_l8_n993
+end
+
+def fun_l7_n996()
+ fun_l8_n509
+end
+
+def fun_l7_n997()
+ fun_l8_n40
+end
+
+def fun_l7_n998()
+ fun_l8_n754
+end
+
+def fun_l7_n999()
+ fun_l8_n651
+end
+
+def fun_l8_n0()
+ fun_l9_n463
+end
+
+def fun_l8_n1()
+ fun_l9_n312
+end
+
+def fun_l8_n2()
+ fun_l9_n831
+end
+
+def fun_l8_n3()
+ fun_l9_n378
+end
+
+def fun_l8_n4()
+ fun_l9_n706
+end
+
+def fun_l8_n5()
+ fun_l9_n367
+end
+
+def fun_l8_n6()
+ fun_l9_n890
+end
+
+def fun_l8_n7()
+ fun_l9_n315
+end
+
+def fun_l8_n8()
+ fun_l9_n808
+end
+
+def fun_l8_n9()
+ fun_l9_n338
+end
+
+def fun_l8_n10()
+ fun_l9_n911
+end
+
+def fun_l8_n11()
+ fun_l9_n630
+end
+
+def fun_l8_n12()
+ fun_l9_n273
+end
+
+def fun_l8_n13()
+ fun_l9_n835
+end
+
+def fun_l8_n14()
+ fun_l9_n306
+end
+
+def fun_l8_n15()
+ fun_l9_n81
+end
+
+def fun_l8_n16()
+ fun_l9_n26
+end
+
+def fun_l8_n17()
+ fun_l9_n210
+end
+
+def fun_l8_n18()
+ fun_l9_n74
+end
+
+def fun_l8_n19()
+ fun_l9_n297
+end
+
+def fun_l8_n20()
+ fun_l9_n94
+end
+
+def fun_l8_n21()
+ fun_l9_n897
+end
+
+def fun_l8_n22()
+ fun_l9_n839
+end
+
+def fun_l8_n23()
+ fun_l9_n384
+end
+
+def fun_l8_n24()
+ fun_l9_n297
+end
+
+def fun_l8_n25()
+ fun_l9_n198
+end
+
+def fun_l8_n26()
+ fun_l9_n829
+end
+
+def fun_l8_n27()
+ fun_l9_n796
+end
+
+def fun_l8_n28()
+ fun_l9_n89
+end
+
+def fun_l8_n29()
+ fun_l9_n510
+end
+
+def fun_l8_n30()
+ fun_l9_n761
+end
+
+def fun_l8_n31()
+ fun_l9_n665
+end
+
+def fun_l8_n32()
+ fun_l9_n570
+end
+
+def fun_l8_n33()
+ fun_l9_n270
+end
+
+def fun_l8_n34()
+ fun_l9_n600
+end
+
+def fun_l8_n35()
+ fun_l9_n390
+end
+
+def fun_l8_n36()
+ fun_l9_n583
+end
+
+def fun_l8_n37()
+ fun_l9_n392
+end
+
+def fun_l8_n38()
+ fun_l9_n862
+end
+
+def fun_l8_n39()
+ fun_l9_n164
+end
+
+def fun_l8_n40()
+ fun_l9_n626
+end
+
+def fun_l8_n41()
+ fun_l9_n558
+end
+
+def fun_l8_n42()
+ fun_l9_n929
+end
+
+def fun_l8_n43()
+ fun_l9_n161
+end
+
+def fun_l8_n44()
+ fun_l9_n80
+end
+
+def fun_l8_n45()
+ fun_l9_n884
+end
+
+def fun_l8_n46()
+ fun_l9_n784
+end
+
+def fun_l8_n47()
+ fun_l9_n41
+end
+
+def fun_l8_n48()
+ fun_l9_n787
+end
+
+def fun_l8_n49()
+ fun_l9_n179
+end
+
+def fun_l8_n50()
+ fun_l9_n852
+end
+
+def fun_l8_n51()
+ fun_l9_n697
+end
+
+def fun_l8_n52()
+ fun_l9_n8
+end
+
+def fun_l8_n53()
+ fun_l9_n320
+end
+
+def fun_l8_n54()
+ fun_l9_n768
+end
+
+def fun_l8_n55()
+ fun_l9_n574
+end
+
+def fun_l8_n56()
+ fun_l9_n339
+end
+
+def fun_l8_n57()
+ fun_l9_n757
+end
+
+def fun_l8_n58()
+ fun_l9_n221
+end
+
+def fun_l8_n59()
+ fun_l9_n34
+end
+
+def fun_l8_n60()
+ fun_l9_n36
+end
+
+def fun_l8_n61()
+ fun_l9_n244
+end
+
+def fun_l8_n62()
+ fun_l9_n347
+end
+
+def fun_l8_n63()
+ fun_l9_n330
+end
+
+def fun_l8_n64()
+ fun_l9_n717
+end
+
+def fun_l8_n65()
+ fun_l9_n187
+end
+
+def fun_l8_n66()
+ fun_l9_n179
+end
+
+def fun_l8_n67()
+ fun_l9_n807
+end
+
+def fun_l8_n68()
+ fun_l9_n350
+end
+
+def fun_l8_n69()
+ fun_l9_n882
+end
+
+def fun_l8_n70()
+ fun_l9_n936
+end
+
+def fun_l8_n71()
+ fun_l9_n282
+end
+
+def fun_l8_n72()
+ fun_l9_n483
+end
+
+def fun_l8_n73()
+ fun_l9_n296
+end
+
+def fun_l8_n74()
+ fun_l9_n461
+end
+
+def fun_l8_n75()
+ fun_l9_n153
+end
+
+def fun_l8_n76()
+ fun_l9_n555
+end
+
+def fun_l8_n77()
+ fun_l9_n826
+end
+
+def fun_l8_n78()
+ fun_l9_n134
+end
+
+def fun_l8_n79()
+ fun_l9_n552
+end
+
+def fun_l8_n80()
+ fun_l9_n793
+end
+
+def fun_l8_n81()
+ fun_l9_n832
+end
+
+def fun_l8_n82()
+ fun_l9_n270
+end
+
+def fun_l8_n83()
+ fun_l9_n685
+end
+
+def fun_l8_n84()
+ fun_l9_n145
+end
+
+def fun_l8_n85()
+ fun_l9_n331
+end
+
+def fun_l8_n86()
+ fun_l9_n775
+end
+
+def fun_l8_n87()
+ fun_l9_n350
+end
+
+def fun_l8_n88()
+ fun_l9_n569
+end
+
+def fun_l8_n89()
+ fun_l9_n808
+end
+
+def fun_l8_n90()
+ fun_l9_n537
+end
+
+def fun_l8_n91()
+ fun_l9_n40
+end
+
+def fun_l8_n92()
+ fun_l9_n180
+end
+
+def fun_l8_n93()
+ fun_l9_n79
+end
+
+def fun_l8_n94()
+ fun_l9_n664
+end
+
+def fun_l8_n95()
+ fun_l9_n43
+end
+
+def fun_l8_n96()
+ fun_l9_n113
+end
+
+def fun_l8_n97()
+ fun_l9_n108
+end
+
+def fun_l8_n98()
+ fun_l9_n343
+end
+
+def fun_l8_n99()
+ fun_l9_n881
+end
+
+def fun_l8_n100()
+ fun_l9_n272
+end
+
+def fun_l8_n101()
+ fun_l9_n559
+end
+
+def fun_l8_n102()
+ fun_l9_n500
+end
+
+def fun_l8_n103()
+ fun_l9_n738
+end
+
+def fun_l8_n104()
+ fun_l9_n195
+end
+
+def fun_l8_n105()
+ fun_l9_n220
+end
+
+def fun_l8_n106()
+ fun_l9_n321
+end
+
+def fun_l8_n107()
+ fun_l9_n965
+end
+
+def fun_l8_n108()
+ fun_l9_n771
+end
+
+def fun_l8_n109()
+ fun_l9_n227
+end
+
+def fun_l8_n110()
+ fun_l9_n710
+end
+
+def fun_l8_n111()
+ fun_l9_n865
+end
+
+def fun_l8_n112()
+ fun_l9_n791
+end
+
+def fun_l8_n113()
+ fun_l9_n591
+end
+
+def fun_l8_n114()
+ fun_l9_n296
+end
+
+def fun_l8_n115()
+ fun_l9_n269
+end
+
+def fun_l8_n116()
+ fun_l9_n816
+end
+
+def fun_l8_n117()
+ fun_l9_n666
+end
+
+def fun_l8_n118()
+ fun_l9_n31
+end
+
+def fun_l8_n119()
+ fun_l9_n275
+end
+
+def fun_l8_n120()
+ fun_l9_n660
+end
+
+def fun_l8_n121()
+ fun_l9_n514
+end
+
+def fun_l8_n122()
+ fun_l9_n435
+end
+
+def fun_l8_n123()
+ fun_l9_n351
+end
+
+def fun_l8_n124()
+ fun_l9_n190
+end
+
+def fun_l8_n125()
+ fun_l9_n276
+end
+
+def fun_l8_n126()
+ fun_l9_n536
+end
+
+def fun_l8_n127()
+ fun_l9_n551
+end
+
+def fun_l8_n128()
+ fun_l9_n315
+end
+
+def fun_l8_n129()
+ fun_l9_n957
+end
+
+def fun_l8_n130()
+ fun_l9_n609
+end
+
+def fun_l8_n131()
+ fun_l9_n31
+end
+
+def fun_l8_n132()
+ fun_l9_n375
+end
+
+def fun_l8_n133()
+ fun_l9_n363
+end
+
+def fun_l8_n134()
+ fun_l9_n797
+end
+
+def fun_l8_n135()
+ fun_l9_n985
+end
+
+def fun_l8_n136()
+ fun_l9_n797
+end
+
+def fun_l8_n137()
+ fun_l9_n992
+end
+
+def fun_l8_n138()
+ fun_l9_n503
+end
+
+def fun_l8_n139()
+ fun_l9_n336
+end
+
+def fun_l8_n140()
+ fun_l9_n328
+end
+
+def fun_l8_n141()
+ fun_l9_n326
+end
+
+def fun_l8_n142()
+ fun_l9_n983
+end
+
+def fun_l8_n143()
+ fun_l9_n509
+end
+
+def fun_l8_n144()
+ fun_l9_n873
+end
+
+def fun_l8_n145()
+ fun_l9_n97
+end
+
+def fun_l8_n146()
+ fun_l9_n46
+end
+
+def fun_l8_n147()
+ fun_l9_n146
+end
+
+def fun_l8_n148()
+ fun_l9_n293
+end
+
+def fun_l8_n149()
+ fun_l9_n993
+end
+
+def fun_l8_n150()
+ fun_l9_n230
+end
+
+def fun_l8_n151()
+ fun_l9_n485
+end
+
+def fun_l8_n152()
+ fun_l9_n844
+end
+
+def fun_l8_n153()
+ fun_l9_n782
+end
+
+def fun_l8_n154()
+ fun_l9_n493
+end
+
+def fun_l8_n155()
+ fun_l9_n699
+end
+
+def fun_l8_n156()
+ fun_l9_n132
+end
+
+def fun_l8_n157()
+ fun_l9_n573
+end
+
+def fun_l8_n158()
+ fun_l9_n993
+end
+
+def fun_l8_n159()
+ fun_l9_n644
+end
+
+def fun_l8_n160()
+ fun_l9_n151
+end
+
+def fun_l8_n161()
+ fun_l9_n181
+end
+
+def fun_l8_n162()
+ fun_l9_n314
+end
+
+def fun_l8_n163()
+ fun_l9_n716
+end
+
+def fun_l8_n164()
+ fun_l9_n541
+end
+
+def fun_l8_n165()
+ fun_l9_n283
+end
+
+def fun_l8_n166()
+ fun_l9_n55
+end
+
+def fun_l8_n167()
+ fun_l9_n351
+end
+
+def fun_l8_n168()
+ fun_l9_n29
+end
+
+def fun_l8_n169()
+ fun_l9_n117
+end
+
+def fun_l8_n170()
+ fun_l9_n529
+end
+
+def fun_l8_n171()
+ fun_l9_n735
+end
+
+def fun_l8_n172()
+ fun_l9_n161
+end
+
+def fun_l8_n173()
+ fun_l9_n399
+end
+
+def fun_l8_n174()
+ fun_l9_n952
+end
+
+def fun_l8_n175()
+ fun_l9_n420
+end
+
+def fun_l8_n176()
+ fun_l9_n664
+end
+
+def fun_l8_n177()
+ fun_l9_n697
+end
+
+def fun_l8_n178()
+ fun_l9_n506
+end
+
+def fun_l8_n179()
+ fun_l9_n241
+end
+
+def fun_l8_n180()
+ fun_l9_n516
+end
+
+def fun_l8_n181()
+ fun_l9_n540
+end
+
+def fun_l8_n182()
+ fun_l9_n891
+end
+
+def fun_l8_n183()
+ fun_l9_n200
+end
+
+def fun_l8_n184()
+ fun_l9_n118
+end
+
+def fun_l8_n185()
+ fun_l9_n186
+end
+
+def fun_l8_n186()
+ fun_l9_n899
+end
+
+def fun_l8_n187()
+ fun_l9_n766
+end
+
+def fun_l8_n188()
+ fun_l9_n437
+end
+
+def fun_l8_n189()
+ fun_l9_n431
+end
+
+def fun_l8_n190()
+ fun_l9_n814
+end
+
+def fun_l8_n191()
+ fun_l9_n446
+end
+
+def fun_l8_n192()
+ fun_l9_n364
+end
+
+def fun_l8_n193()
+ fun_l9_n634
+end
+
+def fun_l8_n194()
+ fun_l9_n74
+end
+
+def fun_l8_n195()
+ fun_l9_n258
+end
+
+def fun_l8_n196()
+ fun_l9_n105
+end
+
+def fun_l8_n197()
+ fun_l9_n295
+end
+
+def fun_l8_n198()
+ fun_l9_n811
+end
+
+def fun_l8_n199()
+ fun_l9_n210
+end
+
+def fun_l8_n200()
+ fun_l9_n566
+end
+
+def fun_l8_n201()
+ fun_l9_n813
+end
+
+def fun_l8_n202()
+ fun_l9_n624
+end
+
+def fun_l8_n203()
+ fun_l9_n757
+end
+
+def fun_l8_n204()
+ fun_l9_n256
+end
+
+def fun_l8_n205()
+ fun_l9_n439
+end
+
+def fun_l8_n206()
+ fun_l9_n359
+end
+
+def fun_l8_n207()
+ fun_l9_n795
+end
+
+def fun_l8_n208()
+ fun_l9_n178
+end
+
+def fun_l8_n209()
+ fun_l9_n96
+end
+
+def fun_l8_n210()
+ fun_l9_n273
+end
+
+def fun_l8_n211()
+ fun_l9_n976
+end
+
+def fun_l8_n212()
+ fun_l9_n412
+end
+
+def fun_l8_n213()
+ fun_l9_n372
+end
+
+def fun_l8_n214()
+ fun_l9_n902
+end
+
+def fun_l8_n215()
+ fun_l9_n283
+end
+
+def fun_l8_n216()
+ fun_l9_n101
+end
+
+def fun_l8_n217()
+ fun_l9_n792
+end
+
+def fun_l8_n218()
+ fun_l9_n207
+end
+
+def fun_l8_n219()
+ fun_l9_n653
+end
+
+def fun_l8_n220()
+ fun_l9_n784
+end
+
+def fun_l8_n221()
+ fun_l9_n455
+end
+
+def fun_l8_n222()
+ fun_l9_n188
+end
+
+def fun_l8_n223()
+ fun_l9_n169
+end
+
+def fun_l8_n224()
+ fun_l9_n88
+end
+
+def fun_l8_n225()
+ fun_l9_n132
+end
+
+def fun_l8_n226()
+ fun_l9_n269
+end
+
+def fun_l8_n227()
+ fun_l9_n903
+end
+
+def fun_l8_n228()
+ fun_l9_n463
+end
+
+def fun_l8_n229()
+ fun_l9_n73
+end
+
+def fun_l8_n230()
+ fun_l9_n36
+end
+
+def fun_l8_n231()
+ fun_l9_n224
+end
+
+def fun_l8_n232()
+ fun_l9_n739
+end
+
+def fun_l8_n233()
+ fun_l9_n887
+end
+
+def fun_l8_n234()
+ fun_l9_n522
+end
+
+def fun_l8_n235()
+ fun_l9_n261
+end
+
+def fun_l8_n236()
+ fun_l9_n222
+end
+
+def fun_l8_n237()
+ fun_l9_n358
+end
+
+def fun_l8_n238()
+ fun_l9_n855
+end
+
+def fun_l8_n239()
+ fun_l9_n263
+end
+
+def fun_l8_n240()
+ fun_l9_n411
+end
+
+def fun_l8_n241()
+ fun_l9_n450
+end
+
+def fun_l8_n242()
+ fun_l9_n706
+end
+
+def fun_l8_n243()
+ fun_l9_n125
+end
+
+def fun_l8_n244()
+ fun_l9_n163
+end
+
+def fun_l8_n245()
+ fun_l9_n758
+end
+
+def fun_l8_n246()
+ fun_l9_n168
+end
+
+def fun_l8_n247()
+ fun_l9_n250
+end
+
+def fun_l8_n248()
+ fun_l9_n73
+end
+
+def fun_l8_n249()
+ fun_l9_n25
+end
+
+def fun_l8_n250()
+ fun_l9_n311
+end
+
+def fun_l8_n251()
+ fun_l9_n992
+end
+
+def fun_l8_n252()
+ fun_l9_n95
+end
+
+def fun_l8_n253()
+ fun_l9_n470
+end
+
+def fun_l8_n254()
+ fun_l9_n906
+end
+
+def fun_l8_n255()
+ fun_l9_n695
+end
+
+def fun_l8_n256()
+ fun_l9_n835
+end
+
+def fun_l8_n257()
+ fun_l9_n601
+end
+
+def fun_l8_n258()
+ fun_l9_n20
+end
+
+def fun_l8_n259()
+ fun_l9_n806
+end
+
+def fun_l8_n260()
+ fun_l9_n689
+end
+
+def fun_l8_n261()
+ fun_l9_n183
+end
+
+def fun_l8_n262()
+ fun_l9_n444
+end
+
+def fun_l8_n263()
+ fun_l9_n344
+end
+
+def fun_l8_n264()
+ fun_l9_n585
+end
+
+def fun_l8_n265()
+ fun_l9_n109
+end
+
+def fun_l8_n266()
+ fun_l9_n551
+end
+
+def fun_l8_n267()
+ fun_l9_n654
+end
+
+def fun_l8_n268()
+ fun_l9_n573
+end
+
+def fun_l8_n269()
+ fun_l9_n196
+end
+
+def fun_l8_n270()
+ fun_l9_n764
+end
+
+def fun_l8_n271()
+ fun_l9_n349
+end
+
+def fun_l8_n272()
+ fun_l9_n8
+end
+
+def fun_l8_n273()
+ fun_l9_n815
+end
+
+def fun_l8_n274()
+ fun_l9_n343
+end
+
+def fun_l8_n275()
+ fun_l9_n98
+end
+
+def fun_l8_n276()
+ fun_l9_n967
+end
+
+def fun_l8_n277()
+ fun_l9_n368
+end
+
+def fun_l8_n278()
+ fun_l9_n626
+end
+
+def fun_l8_n279()
+ fun_l9_n931
+end
+
+def fun_l8_n280()
+ fun_l9_n723
+end
+
+def fun_l8_n281()
+ fun_l9_n319
+end
+
+def fun_l8_n282()
+ fun_l9_n243
+end
+
+def fun_l8_n283()
+ fun_l9_n683
+end
+
+def fun_l8_n284()
+ fun_l9_n127
+end
+
+def fun_l8_n285()
+ fun_l9_n941
+end
+
+def fun_l8_n286()
+ fun_l9_n263
+end
+
+def fun_l8_n287()
+ fun_l9_n227
+end
+
+def fun_l8_n288()
+ fun_l9_n807
+end
+
+def fun_l8_n289()
+ fun_l9_n486
+end
+
+def fun_l8_n290()
+ fun_l9_n801
+end
+
+def fun_l8_n291()
+ fun_l9_n319
+end
+
+def fun_l8_n292()
+ fun_l9_n687
+end
+
+def fun_l8_n293()
+ fun_l9_n639
+end
+
+def fun_l8_n294()
+ fun_l9_n908
+end
+
+def fun_l8_n295()
+ fun_l9_n522
+end
+
+def fun_l8_n296()
+ fun_l9_n839
+end
+
+def fun_l8_n297()
+ fun_l9_n238
+end
+
+def fun_l8_n298()
+ fun_l9_n66
+end
+
+def fun_l8_n299()
+ fun_l9_n224
+end
+
+def fun_l8_n300()
+ fun_l9_n114
+end
+
+def fun_l8_n301()
+ fun_l9_n237
+end
+
+def fun_l8_n302()
+ fun_l9_n416
+end
+
+def fun_l8_n303()
+ fun_l9_n554
+end
+
+def fun_l8_n304()
+ fun_l9_n613
+end
+
+def fun_l8_n305()
+ fun_l9_n641
+end
+
+def fun_l8_n306()
+ fun_l9_n507
+end
+
+def fun_l8_n307()
+ fun_l9_n367
+end
+
+def fun_l8_n308()
+ fun_l9_n387
+end
+
+def fun_l8_n309()
+ fun_l9_n423
+end
+
+def fun_l8_n310()
+ fun_l9_n981
+end
+
+def fun_l8_n311()
+ fun_l9_n658
+end
+
+def fun_l8_n312()
+ fun_l9_n845
+end
+
+def fun_l8_n313()
+ fun_l9_n944
+end
+
+def fun_l8_n314()
+ fun_l9_n87
+end
+
+def fun_l8_n315()
+ fun_l9_n106
+end
+
+def fun_l8_n316()
+ fun_l9_n461
+end
+
+def fun_l8_n317()
+ fun_l9_n722
+end
+
+def fun_l8_n318()
+ fun_l9_n636
+end
+
+def fun_l8_n319()
+ fun_l9_n420
+end
+
+def fun_l8_n320()
+ fun_l9_n633
+end
+
+def fun_l8_n321()
+ fun_l9_n801
+end
+
+def fun_l8_n322()
+ fun_l9_n754
+end
+
+def fun_l8_n323()
+ fun_l9_n697
+end
+
+def fun_l8_n324()
+ fun_l9_n983
+end
+
+def fun_l8_n325()
+ fun_l9_n244
+end
+
+def fun_l8_n326()
+ fun_l9_n980
+end
+
+def fun_l8_n327()
+ fun_l9_n242
+end
+
+def fun_l8_n328()
+ fun_l9_n798
+end
+
+def fun_l8_n329()
+ fun_l9_n395
+end
+
+def fun_l8_n330()
+ fun_l9_n931
+end
+
+def fun_l8_n331()
+ fun_l9_n827
+end
+
+def fun_l8_n332()
+ fun_l9_n704
+end
+
+def fun_l8_n333()
+ fun_l9_n392
+end
+
+def fun_l8_n334()
+ fun_l9_n288
+end
+
+def fun_l8_n335()
+ fun_l9_n95
+end
+
+def fun_l8_n336()
+ fun_l9_n123
+end
+
+def fun_l8_n337()
+ fun_l9_n238
+end
+
+def fun_l8_n338()
+ fun_l9_n903
+end
+
+def fun_l8_n339()
+ fun_l9_n515
+end
+
+def fun_l8_n340()
+ fun_l9_n368
+end
+
+def fun_l8_n341()
+ fun_l9_n156
+end
+
+def fun_l8_n342()
+ fun_l9_n714
+end
+
+def fun_l8_n343()
+ fun_l9_n435
+end
+
+def fun_l8_n344()
+ fun_l9_n653
+end
+
+def fun_l8_n345()
+ fun_l9_n304
+end
+
+def fun_l8_n346()
+ fun_l9_n880
+end
+
+def fun_l8_n347()
+ fun_l9_n701
+end
+
+def fun_l8_n348()
+ fun_l9_n815
+end
+
+def fun_l8_n349()
+ fun_l9_n180
+end
+
+def fun_l8_n350()
+ fun_l9_n24
+end
+
+def fun_l8_n351()
+ fun_l9_n970
+end
+
+def fun_l8_n352()
+ fun_l9_n829
+end
+
+def fun_l8_n353()
+ fun_l9_n908
+end
+
+def fun_l8_n354()
+ fun_l9_n355
+end
+
+def fun_l8_n355()
+ fun_l9_n844
+end
+
+def fun_l8_n356()
+ fun_l9_n936
+end
+
+def fun_l8_n357()
+ fun_l9_n555
+end
+
+def fun_l8_n358()
+ fun_l9_n936
+end
+
+def fun_l8_n359()
+ fun_l9_n61
+end
+
+def fun_l8_n360()
+ fun_l9_n936
+end
+
+def fun_l8_n361()
+ fun_l9_n244
+end
+
+def fun_l8_n362()
+ fun_l9_n799
+end
+
+def fun_l8_n363()
+ fun_l9_n429
+end
+
+def fun_l8_n364()
+ fun_l9_n676
+end
+
+def fun_l8_n365()
+ fun_l9_n877
+end
+
+def fun_l8_n366()
+ fun_l9_n862
+end
+
+def fun_l8_n367()
+ fun_l9_n937
+end
+
+def fun_l8_n368()
+ fun_l9_n59
+end
+
+def fun_l8_n369()
+ fun_l9_n50
+end
+
+def fun_l8_n370()
+ fun_l9_n550
+end
+
+def fun_l8_n371()
+ fun_l9_n562
+end
+
+def fun_l8_n372()
+ fun_l9_n270
+end
+
+def fun_l8_n373()
+ fun_l9_n774
+end
+
+def fun_l8_n374()
+ fun_l9_n61
+end
+
+def fun_l8_n375()
+ fun_l9_n221
+end
+
+def fun_l8_n376()
+ fun_l9_n483
+end
+
+def fun_l8_n377()
+ fun_l9_n63
+end
+
+def fun_l8_n378()
+ fun_l9_n921
+end
+
+def fun_l8_n379()
+ fun_l9_n34
+end
+
+def fun_l8_n380()
+ fun_l9_n684
+end
+
+def fun_l8_n381()
+ fun_l9_n583
+end
+
+def fun_l8_n382()
+ fun_l9_n918
+end
+
+def fun_l8_n383()
+ fun_l9_n193
+end
+
+def fun_l8_n384()
+ fun_l9_n525
+end
+
+def fun_l8_n385()
+ fun_l9_n789
+end
+
+def fun_l8_n386()
+ fun_l9_n158
+end
+
+def fun_l8_n387()
+ fun_l9_n32
+end
+
+def fun_l8_n388()
+ fun_l9_n741
+end
+
+def fun_l8_n389()
+ fun_l9_n880
+end
+
+def fun_l8_n390()
+ fun_l9_n710
+end
+
+def fun_l8_n391()
+ fun_l9_n837
+end
+
+def fun_l8_n392()
+ fun_l9_n866
+end
+
+def fun_l8_n393()
+ fun_l9_n511
+end
+
+def fun_l8_n394()
+ fun_l9_n794
+end
+
+def fun_l8_n395()
+ fun_l9_n508
+end
+
+def fun_l8_n396()
+ fun_l9_n102
+end
+
+def fun_l8_n397()
+ fun_l9_n24
+end
+
+def fun_l8_n398()
+ fun_l9_n512
+end
+
+def fun_l8_n399()
+ fun_l9_n764
+end
+
+def fun_l8_n400()
+ fun_l9_n100
+end
+
+def fun_l8_n401()
+ fun_l9_n159
+end
+
+def fun_l8_n402()
+ fun_l9_n774
+end
+
+def fun_l8_n403()
+ fun_l9_n382
+end
+
+def fun_l8_n404()
+ fun_l9_n596
+end
+
+def fun_l8_n405()
+ fun_l9_n581
+end
+
+def fun_l8_n406()
+ fun_l9_n818
+end
+
+def fun_l8_n407()
+ fun_l9_n158
+end
+
+def fun_l8_n408()
+ fun_l9_n59
+end
+
+def fun_l8_n409()
+ fun_l9_n392
+end
+
+def fun_l8_n410()
+ fun_l9_n877
+end
+
+def fun_l8_n411()
+ fun_l9_n49
+end
+
+def fun_l8_n412()
+ fun_l9_n379
+end
+
+def fun_l8_n413()
+ fun_l9_n367
+end
+
+def fun_l8_n414()
+ fun_l9_n740
+end
+
+def fun_l8_n415()
+ fun_l9_n880
+end
+
+def fun_l8_n416()
+ fun_l9_n354
+end
+
+def fun_l8_n417()
+ fun_l9_n874
+end
+
+def fun_l8_n418()
+ fun_l9_n769
+end
+
+def fun_l8_n419()
+ fun_l9_n821
+end
+
+def fun_l8_n420()
+ fun_l9_n595
+end
+
+def fun_l8_n421()
+ fun_l9_n471
+end
+
+def fun_l8_n422()
+ fun_l9_n963
+end
+
+def fun_l8_n423()
+ fun_l9_n806
+end
+
+def fun_l8_n424()
+ fun_l9_n863
+end
+
+def fun_l8_n425()
+ fun_l9_n255
+end
+
+def fun_l8_n426()
+ fun_l9_n787
+end
+
+def fun_l8_n427()
+ fun_l9_n369
+end
+
+def fun_l8_n428()
+ fun_l9_n876
+end
+
+def fun_l8_n429()
+ fun_l9_n660
+end
+
+def fun_l8_n430()
+ fun_l9_n678
+end
+
+def fun_l8_n431()
+ fun_l9_n690
+end
+
+def fun_l8_n432()
+ fun_l9_n954
+end
+
+def fun_l8_n433()
+ fun_l9_n250
+end
+
+def fun_l8_n434()
+ fun_l9_n834
+end
+
+def fun_l8_n435()
+ fun_l9_n852
+end
+
+def fun_l8_n436()
+ fun_l9_n987
+end
+
+def fun_l8_n437()
+ fun_l9_n297
+end
+
+def fun_l8_n438()
+ fun_l9_n263
+end
+
+def fun_l8_n439()
+ fun_l9_n120
+end
+
+def fun_l8_n440()
+ fun_l9_n57
+end
+
+def fun_l8_n441()
+ fun_l9_n363
+end
+
+def fun_l8_n442()
+ fun_l9_n458
+end
+
+def fun_l8_n443()
+ fun_l9_n323
+end
+
+def fun_l8_n444()
+ fun_l9_n80
+end
+
+def fun_l8_n445()
+ fun_l9_n88
+end
+
+def fun_l8_n446()
+ fun_l9_n928
+end
+
+def fun_l8_n447()
+ fun_l9_n682
+end
+
+def fun_l8_n448()
+ fun_l9_n740
+end
+
+def fun_l8_n449()
+ fun_l9_n132
+end
+
+def fun_l8_n450()
+ fun_l9_n194
+end
+
+def fun_l8_n451()
+ fun_l9_n694
+end
+
+def fun_l8_n452()
+ fun_l9_n53
+end
+
+def fun_l8_n453()
+ fun_l9_n84
+end
+
+def fun_l8_n454()
+ fun_l9_n801
+end
+
+def fun_l8_n455()
+ fun_l9_n176
+end
+
+def fun_l8_n456()
+ fun_l9_n375
+end
+
+def fun_l8_n457()
+ fun_l9_n161
+end
+
+def fun_l8_n458()
+ fun_l9_n723
+end
+
+def fun_l8_n459()
+ fun_l9_n704
+end
+
+def fun_l8_n460()
+ fun_l9_n335
+end
+
+def fun_l8_n461()
+ fun_l9_n106
+end
+
+def fun_l8_n462()
+ fun_l9_n425
+end
+
+def fun_l8_n463()
+ fun_l9_n972
+end
+
+def fun_l8_n464()
+ fun_l9_n18
+end
+
+def fun_l8_n465()
+ fun_l9_n872
+end
+
+def fun_l8_n466()
+ fun_l9_n453
+end
+
+def fun_l8_n467()
+ fun_l9_n220
+end
+
+def fun_l8_n468()
+ fun_l9_n283
+end
+
+def fun_l8_n469()
+ fun_l9_n48
+end
+
+def fun_l8_n470()
+ fun_l9_n891
+end
+
+def fun_l8_n471()
+ fun_l9_n640
+end
+
+def fun_l8_n472()
+ fun_l9_n842
+end
+
+def fun_l8_n473()
+ fun_l9_n440
+end
+
+def fun_l8_n474()
+ fun_l9_n109
+end
+
+def fun_l8_n475()
+ fun_l9_n910
+end
+
+def fun_l8_n476()
+ fun_l9_n136
+end
+
+def fun_l8_n477()
+ fun_l9_n187
+end
+
+def fun_l8_n478()
+ fun_l9_n279
+end
+
+def fun_l8_n479()
+ fun_l9_n8
+end
+
+def fun_l8_n480()
+ fun_l9_n372
+end
+
+def fun_l8_n481()
+ fun_l9_n504
+end
+
+def fun_l8_n482()
+ fun_l9_n250
+end
+
+def fun_l8_n483()
+ fun_l9_n122
+end
+
+def fun_l8_n484()
+ fun_l9_n435
+end
+
+def fun_l8_n485()
+ fun_l9_n282
+end
+
+def fun_l8_n486()
+ fun_l9_n213
+end
+
+def fun_l8_n487()
+ fun_l9_n256
+end
+
+def fun_l8_n488()
+ fun_l9_n162
+end
+
+def fun_l8_n489()
+ fun_l9_n419
+end
+
+def fun_l8_n490()
+ fun_l9_n286
+end
+
+def fun_l8_n491()
+ fun_l9_n102
+end
+
+def fun_l8_n492()
+ fun_l9_n434
+end
+
+def fun_l8_n493()
+ fun_l9_n782
+end
+
+def fun_l8_n494()
+ fun_l9_n993
+end
+
+def fun_l8_n495()
+ fun_l9_n275
+end
+
+def fun_l8_n496()
+ fun_l9_n873
+end
+
+def fun_l8_n497()
+ fun_l9_n346
+end
+
+def fun_l8_n498()
+ fun_l9_n57
+end
+
+def fun_l8_n499()
+ fun_l9_n77
+end
+
+def fun_l8_n500()
+ fun_l9_n936
+end
+
+def fun_l8_n501()
+ fun_l9_n320
+end
+
+def fun_l8_n502()
+ fun_l9_n921
+end
+
+def fun_l8_n503()
+ fun_l9_n505
+end
+
+def fun_l8_n504()
+ fun_l9_n184
+end
+
+def fun_l8_n505()
+ fun_l9_n476
+end
+
+def fun_l8_n506()
+ fun_l9_n2
+end
+
+def fun_l8_n507()
+ fun_l9_n573
+end
+
+def fun_l8_n508()
+ fun_l9_n150
+end
+
+def fun_l8_n509()
+ fun_l9_n637
+end
+
+def fun_l8_n510()
+ fun_l9_n435
+end
+
+def fun_l8_n511()
+ fun_l9_n361
+end
+
+def fun_l8_n512()
+ fun_l9_n808
+end
+
+def fun_l8_n513()
+ fun_l9_n129
+end
+
+def fun_l8_n514()
+ fun_l9_n57
+end
+
+def fun_l8_n515()
+ fun_l9_n646
+end
+
+def fun_l8_n516()
+ fun_l9_n679
+end
+
+def fun_l8_n517()
+ fun_l9_n256
+end
+
+def fun_l8_n518()
+ fun_l9_n672
+end
+
+def fun_l8_n519()
+ fun_l9_n406
+end
+
+def fun_l8_n520()
+ fun_l9_n59
+end
+
+def fun_l8_n521()
+ fun_l9_n215
+end
+
+def fun_l8_n522()
+ fun_l9_n435
+end
+
+def fun_l8_n523()
+ fun_l9_n693
+end
+
+def fun_l8_n524()
+ fun_l9_n863
+end
+
+def fun_l8_n525()
+ fun_l9_n79
+end
+
+def fun_l8_n526()
+ fun_l9_n527
+end
+
+def fun_l8_n527()
+ fun_l9_n711
+end
+
+def fun_l8_n528()
+ fun_l9_n51
+end
+
+def fun_l8_n529()
+ fun_l9_n712
+end
+
+def fun_l8_n530()
+ fun_l9_n84
+end
+
+def fun_l8_n531()
+ fun_l9_n854
+end
+
+def fun_l8_n532()
+ fun_l9_n43
+end
+
+def fun_l8_n533()
+ fun_l9_n354
+end
+
+def fun_l8_n534()
+ fun_l9_n74
+end
+
+def fun_l8_n535()
+ fun_l9_n736
+end
+
+def fun_l8_n536()
+ fun_l9_n573
+end
+
+def fun_l8_n537()
+ fun_l9_n56
+end
+
+def fun_l8_n538()
+ fun_l9_n818
+end
+
+def fun_l8_n539()
+ fun_l9_n861
+end
+
+def fun_l8_n540()
+ fun_l9_n531
+end
+
+def fun_l8_n541()
+ fun_l9_n204
+end
+
+def fun_l8_n542()
+ fun_l9_n451
+end
+
+def fun_l8_n543()
+ fun_l9_n138
+end
+
+def fun_l8_n544()
+ fun_l9_n888
+end
+
+def fun_l8_n545()
+ fun_l9_n846
+end
+
+def fun_l8_n546()
+ fun_l9_n873
+end
+
+def fun_l8_n547()
+ fun_l9_n467
+end
+
+def fun_l8_n548()
+ fun_l9_n210
+end
+
+def fun_l8_n549()
+ fun_l9_n773
+end
+
+def fun_l8_n550()
+ fun_l9_n546
+end
+
+def fun_l8_n551()
+ fun_l9_n768
+end
+
+def fun_l8_n552()
+ fun_l9_n115
+end
+
+def fun_l8_n553()
+ fun_l9_n20
+end
+
+def fun_l8_n554()
+ fun_l9_n891
+end
+
+def fun_l8_n555()
+ fun_l9_n924
+end
+
+def fun_l8_n556()
+ fun_l9_n192
+end
+
+def fun_l8_n557()
+ fun_l9_n581
+end
+
+def fun_l8_n558()
+ fun_l9_n517
+end
+
+def fun_l8_n559()
+ fun_l9_n533
+end
+
+def fun_l8_n560()
+ fun_l9_n930
+end
+
+def fun_l8_n561()
+ fun_l9_n321
+end
+
+def fun_l8_n562()
+ fun_l9_n648
+end
+
+def fun_l8_n563()
+ fun_l9_n963
+end
+
+def fun_l8_n564()
+ fun_l9_n406
+end
+
+def fun_l8_n565()
+ fun_l9_n823
+end
+
+def fun_l8_n566()
+ fun_l9_n394
+end
+
+def fun_l8_n567()
+ fun_l9_n442
+end
+
+def fun_l8_n568()
+ fun_l9_n851
+end
+
+def fun_l8_n569()
+ fun_l9_n652
+end
+
+def fun_l8_n570()
+ fun_l9_n165
+end
+
+def fun_l8_n571()
+ fun_l9_n213
+end
+
+def fun_l8_n572()
+ fun_l9_n633
+end
+
+def fun_l8_n573()
+ fun_l9_n243
+end
+
+def fun_l8_n574()
+ fun_l9_n232
+end
+
+def fun_l8_n575()
+ fun_l9_n76
+end
+
+def fun_l8_n576()
+ fun_l9_n547
+end
+
+def fun_l8_n577()
+ fun_l9_n628
+end
+
+def fun_l8_n578()
+ fun_l9_n20
+end
+
+def fun_l8_n579()
+ fun_l9_n525
+end
+
+def fun_l8_n580()
+ fun_l9_n788
+end
+
+def fun_l8_n581()
+ fun_l9_n326
+end
+
+def fun_l8_n582()
+ fun_l9_n206
+end
+
+def fun_l8_n583()
+ fun_l9_n709
+end
+
+def fun_l8_n584()
+ fun_l9_n185
+end
+
+def fun_l8_n585()
+ fun_l9_n106
+end
+
+def fun_l8_n586()
+ fun_l9_n180
+end
+
+def fun_l8_n587()
+ fun_l9_n304
+end
+
+def fun_l8_n588()
+ fun_l9_n689
+end
+
+def fun_l8_n589()
+ fun_l9_n124
+end
+
+def fun_l8_n590()
+ fun_l9_n91
+end
+
+def fun_l8_n591()
+ fun_l9_n856
+end
+
+def fun_l8_n592()
+ fun_l9_n16
+end
+
+def fun_l8_n593()
+ fun_l9_n875
+end
+
+def fun_l8_n594()
+ fun_l9_n407
+end
+
+def fun_l8_n595()
+ fun_l9_n386
+end
+
+def fun_l8_n596()
+ fun_l9_n269
+end
+
+def fun_l8_n597()
+ fun_l9_n254
+end
+
+def fun_l8_n598()
+ fun_l9_n452
+end
+
+def fun_l8_n599()
+ fun_l9_n450
+end
+
+def fun_l8_n600()
+ fun_l9_n268
+end
+
+def fun_l8_n601()
+ fun_l9_n965
+end
+
+def fun_l8_n602()
+ fun_l9_n190
+end
+
+def fun_l8_n603()
+ fun_l9_n811
+end
+
+def fun_l8_n604()
+ fun_l9_n802
+end
+
+def fun_l8_n605()
+ fun_l9_n732
+end
+
+def fun_l8_n606()
+ fun_l9_n997
+end
+
+def fun_l8_n607()
+ fun_l9_n929
+end
+
+def fun_l8_n608()
+ fun_l9_n18
+end
+
+def fun_l8_n609()
+ fun_l9_n260
+end
+
+def fun_l8_n610()
+ fun_l9_n17
+end
+
+def fun_l8_n611()
+ fun_l9_n324
+end
+
+def fun_l8_n612()
+ fun_l9_n473
+end
+
+def fun_l8_n613()
+ fun_l9_n266
+end
+
+def fun_l8_n614()
+ fun_l9_n753
+end
+
+def fun_l8_n615()
+ fun_l9_n929
+end
+
+def fun_l8_n616()
+ fun_l9_n374
+end
+
+def fun_l8_n617()
+ fun_l9_n254
+end
+
+def fun_l8_n618()
+ fun_l9_n520
+end
+
+def fun_l8_n619()
+ fun_l9_n561
+end
+
+def fun_l8_n620()
+ fun_l9_n309
+end
+
+def fun_l8_n621()
+ fun_l9_n875
+end
+
+def fun_l8_n622()
+ fun_l9_n635
+end
+
+def fun_l8_n623()
+ fun_l9_n138
+end
+
+def fun_l8_n624()
+ fun_l9_n554
+end
+
+def fun_l8_n625()
+ fun_l9_n903
+end
+
+def fun_l8_n626()
+ fun_l9_n771
+end
+
+def fun_l8_n627()
+ fun_l9_n358
+end
+
+def fun_l8_n628()
+ fun_l9_n238
+end
+
+def fun_l8_n629()
+ fun_l9_n896
+end
+
+def fun_l8_n630()
+ fun_l9_n675
+end
+
+def fun_l8_n631()
+ fun_l9_n817
+end
+
+def fun_l8_n632()
+ fun_l9_n530
+end
+
+def fun_l8_n633()
+ fun_l9_n262
+end
+
+def fun_l8_n634()
+ fun_l9_n221
+end
+
+def fun_l8_n635()
+ fun_l9_n590
+end
+
+def fun_l8_n636()
+ fun_l9_n536
+end
+
+def fun_l8_n637()
+ fun_l9_n910
+end
+
+def fun_l8_n638()
+ fun_l9_n383
+end
+
+def fun_l8_n639()
+ fun_l9_n977
+end
+
+def fun_l8_n640()
+ fun_l9_n172
+end
+
+def fun_l8_n641()
+ fun_l9_n428
+end
+
+def fun_l8_n642()
+ fun_l9_n278
+end
+
+def fun_l8_n643()
+ fun_l9_n77
+end
+
+def fun_l8_n644()
+ fun_l9_n992
+end
+
+def fun_l8_n645()
+ fun_l9_n783
+end
+
+def fun_l8_n646()
+ fun_l9_n285
+end
+
+def fun_l8_n647()
+ fun_l9_n589
+end
+
+def fun_l8_n648()
+ fun_l9_n280
+end
+
+def fun_l8_n649()
+ fun_l9_n626
+end
+
+def fun_l8_n650()
+ fun_l9_n172
+end
+
+def fun_l8_n651()
+ fun_l9_n389
+end
+
+def fun_l8_n652()
+ fun_l9_n53
+end
+
+def fun_l8_n653()
+ fun_l9_n676
+end
+
+def fun_l8_n654()
+ fun_l9_n499
+end
+
+def fun_l8_n655()
+ fun_l9_n270
+end
+
+def fun_l8_n656()
+ fun_l9_n976
+end
+
+def fun_l8_n657()
+ fun_l9_n681
+end
+
+def fun_l8_n658()
+ fun_l9_n960
+end
+
+def fun_l8_n659()
+ fun_l9_n779
+end
+
+def fun_l8_n660()
+ fun_l9_n953
+end
+
+def fun_l8_n661()
+ fun_l9_n856
+end
+
+def fun_l8_n662()
+ fun_l9_n672
+end
+
+def fun_l8_n663()
+ fun_l9_n877
+end
+
+def fun_l8_n664()
+ fun_l9_n667
+end
+
+def fun_l8_n665()
+ fun_l9_n593
+end
+
+def fun_l8_n666()
+ fun_l9_n115
+end
+
+def fun_l8_n667()
+ fun_l9_n117
+end
+
+def fun_l8_n668()
+ fun_l9_n582
+end
+
+def fun_l8_n669()
+ fun_l9_n695
+end
+
+def fun_l8_n670()
+ fun_l9_n119
+end
+
+def fun_l8_n671()
+ fun_l9_n521
+end
+
+def fun_l8_n672()
+ fun_l9_n291
+end
+
+def fun_l8_n673()
+ fun_l9_n630
+end
+
+def fun_l8_n674()
+ fun_l9_n8
+end
+
+def fun_l8_n675()
+ fun_l9_n331
+end
+
+def fun_l8_n676()
+ fun_l9_n32
+end
+
+def fun_l8_n677()
+ fun_l9_n494
+end
+
+def fun_l8_n678()
+ fun_l9_n744
+end
+
+def fun_l8_n679()
+ fun_l9_n220
+end
+
+def fun_l8_n680()
+ fun_l9_n793
+end
+
+def fun_l8_n681()
+ fun_l9_n592
+end
+
+def fun_l8_n682()
+ fun_l9_n40
+end
+
+def fun_l8_n683()
+ fun_l9_n442
+end
+
+def fun_l8_n684()
+ fun_l9_n606
+end
+
+def fun_l8_n685()
+ fun_l9_n592
+end
+
+def fun_l8_n686()
+ fun_l9_n264
+end
+
+def fun_l8_n687()
+ fun_l9_n570
+end
+
+def fun_l8_n688()
+ fun_l9_n69
+end
+
+def fun_l8_n689()
+ fun_l9_n137
+end
+
+def fun_l8_n690()
+ fun_l9_n712
+end
+
+def fun_l8_n691()
+ fun_l9_n593
+end
+
+def fun_l8_n692()
+ fun_l9_n481
+end
+
+def fun_l8_n693()
+ fun_l9_n669
+end
+
+def fun_l8_n694()
+ fun_l9_n504
+end
+
+def fun_l8_n695()
+ fun_l9_n732
+end
+
+def fun_l8_n696()
+ fun_l9_n771
+end
+
+def fun_l8_n697()
+ fun_l9_n258
+end
+
+def fun_l8_n698()
+ fun_l9_n756
+end
+
+def fun_l8_n699()
+ fun_l9_n61
+end
+
+def fun_l8_n700()
+ fun_l9_n257
+end
+
+def fun_l8_n701()
+ fun_l9_n788
+end
+
+def fun_l8_n702()
+ fun_l9_n142
+end
+
+def fun_l8_n703()
+ fun_l9_n380
+end
+
+def fun_l8_n704()
+ fun_l9_n698
+end
+
+def fun_l8_n705()
+ fun_l9_n482
+end
+
+def fun_l8_n706()
+ fun_l9_n515
+end
+
+def fun_l8_n707()
+ fun_l9_n253
+end
+
+def fun_l8_n708()
+ fun_l9_n323
+end
+
+def fun_l8_n709()
+ fun_l9_n524
+end
+
+def fun_l8_n710()
+ fun_l9_n681
+end
+
+def fun_l8_n711()
+ fun_l9_n473
+end
+
+def fun_l8_n712()
+ fun_l9_n186
+end
+
+def fun_l8_n713()
+ fun_l9_n117
+end
+
+def fun_l8_n714()
+ fun_l9_n682
+end
+
+def fun_l8_n715()
+ fun_l9_n475
+end
+
+def fun_l8_n716()
+ fun_l9_n190
+end
+
+def fun_l8_n717()
+ fun_l9_n56
+end
+
+def fun_l8_n718()
+ fun_l9_n492
+end
+
+def fun_l8_n719()
+ fun_l9_n561
+end
+
+def fun_l8_n720()
+ fun_l9_n130
+end
+
+def fun_l8_n721()
+ fun_l9_n296
+end
+
+def fun_l8_n722()
+ fun_l9_n425
+end
+
+def fun_l8_n723()
+ fun_l9_n248
+end
+
+def fun_l8_n724()
+ fun_l9_n523
+end
+
+def fun_l8_n725()
+ fun_l9_n730
+end
+
+def fun_l8_n726()
+ fun_l9_n231
+end
+
+def fun_l8_n727()
+ fun_l9_n953
+end
+
+def fun_l8_n728()
+ fun_l9_n511
+end
+
+def fun_l8_n729()
+ fun_l9_n78
+end
+
+def fun_l8_n730()
+ fun_l9_n284
+end
+
+def fun_l8_n731()
+ fun_l9_n450
+end
+
+def fun_l8_n732()
+ fun_l9_n149
+end
+
+def fun_l8_n733()
+ fun_l9_n396
+end
+
+def fun_l8_n734()
+ fun_l9_n202
+end
+
+def fun_l8_n735()
+ fun_l9_n250
+end
+
+def fun_l8_n736()
+ fun_l9_n459
+end
+
+def fun_l8_n737()
+ fun_l9_n869
+end
+
+def fun_l8_n738()
+ fun_l9_n454
+end
+
+def fun_l8_n739()
+ fun_l9_n322
+end
+
+def fun_l8_n740()
+ fun_l9_n190
+end
+
+def fun_l8_n741()
+ fun_l9_n997
+end
+
+def fun_l8_n742()
+ fun_l9_n983
+end
+
+def fun_l8_n743()
+ fun_l9_n191
+end
+
+def fun_l8_n744()
+ fun_l9_n773
+end
+
+def fun_l8_n745()
+ fun_l9_n261
+end
+
+def fun_l8_n746()
+ fun_l9_n442
+end
+
+def fun_l8_n747()
+ fun_l9_n297
+end
+
+def fun_l8_n748()
+ fun_l9_n103
+end
+
+def fun_l8_n749()
+ fun_l9_n981
+end
+
+def fun_l8_n750()
+ fun_l9_n143
+end
+
+def fun_l8_n751()
+ fun_l9_n499
+end
+
+def fun_l8_n752()
+ fun_l9_n129
+end
+
+def fun_l8_n753()
+ fun_l9_n357
+end
+
+def fun_l8_n754()
+ fun_l9_n273
+end
+
+def fun_l8_n755()
+ fun_l9_n217
+end
+
+def fun_l8_n756()
+ fun_l9_n383
+end
+
+def fun_l8_n757()
+ fun_l9_n965
+end
+
+def fun_l8_n758()
+ fun_l9_n305
+end
+
+def fun_l8_n759()
+ fun_l9_n450
+end
+
+def fun_l8_n760()
+ fun_l9_n450
+end
+
+def fun_l8_n761()
+ fun_l9_n545
+end
+
+def fun_l8_n762()
+ fun_l9_n236
+end
+
+def fun_l8_n763()
+ fun_l9_n329
+end
+
+def fun_l8_n764()
+ fun_l9_n536
+end
+
+def fun_l8_n765()
+ fun_l9_n56
+end
+
+def fun_l8_n766()
+ fun_l9_n214
+end
+
+def fun_l8_n767()
+ fun_l9_n227
+end
+
+def fun_l8_n768()
+ fun_l9_n585
+end
+
+def fun_l8_n769()
+ fun_l9_n368
+end
+
+def fun_l8_n770()
+ fun_l9_n997
+end
+
+def fun_l8_n771()
+ fun_l9_n895
+end
+
+def fun_l8_n772()
+ fun_l9_n601
+end
+
+def fun_l8_n773()
+ fun_l9_n975
+end
+
+def fun_l8_n774()
+ fun_l9_n687
+end
+
+def fun_l8_n775()
+ fun_l9_n498
+end
+
+def fun_l8_n776()
+ fun_l9_n665
+end
+
+def fun_l8_n777()
+ fun_l9_n915
+end
+
+def fun_l8_n778()
+ fun_l9_n823
+end
+
+def fun_l8_n779()
+ fun_l9_n479
+end
+
+def fun_l8_n780()
+ fun_l9_n632
+end
+
+def fun_l8_n781()
+ fun_l9_n793
+end
+
+def fun_l8_n782()
+ fun_l9_n698
+end
+
+def fun_l8_n783()
+ fun_l9_n940
+end
+
+def fun_l8_n784()
+ fun_l9_n982
+end
+
+def fun_l8_n785()
+ fun_l9_n983
+end
+
+def fun_l8_n786()
+ fun_l9_n711
+end
+
+def fun_l8_n787()
+ fun_l9_n61
+end
+
+def fun_l8_n788()
+ fun_l9_n347
+end
+
+def fun_l8_n789()
+ fun_l9_n856
+end
+
+def fun_l8_n790()
+ fun_l9_n363
+end
+
+def fun_l8_n791()
+ fun_l9_n995
+end
+
+def fun_l8_n792()
+ fun_l9_n296
+end
+
+def fun_l8_n793()
+ fun_l9_n497
+end
+
+def fun_l8_n794()
+ fun_l9_n915
+end
+
+def fun_l8_n795()
+ fun_l9_n899
+end
+
+def fun_l8_n796()
+ fun_l9_n388
+end
+
+def fun_l8_n797()
+ fun_l9_n538
+end
+
+def fun_l8_n798()
+ fun_l9_n247
+end
+
+def fun_l8_n799()
+ fun_l9_n426
+end
+
+def fun_l8_n800()
+ fun_l9_n127
+end
+
+def fun_l8_n801()
+ fun_l9_n945
+end
+
+def fun_l8_n802()
+ fun_l9_n656
+end
+
+def fun_l8_n803()
+ fun_l9_n900
+end
+
+def fun_l8_n804()
+ fun_l9_n262
+end
+
+def fun_l8_n805()
+ fun_l9_n371
+end
+
+def fun_l8_n806()
+ fun_l9_n876
+end
+
+def fun_l8_n807()
+ fun_l9_n601
+end
+
+def fun_l8_n808()
+ fun_l9_n271
+end
+
+def fun_l8_n809()
+ fun_l9_n837
+end
+
+def fun_l8_n810()
+ fun_l9_n969
+end
+
+def fun_l8_n811()
+ fun_l9_n287
+end
+
+def fun_l8_n812()
+ fun_l9_n224
+end
+
+def fun_l8_n813()
+ fun_l9_n129
+end
+
+def fun_l8_n814()
+ fun_l9_n938
+end
+
+def fun_l8_n815()
+ fun_l9_n198
+end
+
+def fun_l8_n816()
+ fun_l9_n33
+end
+
+def fun_l8_n817()
+ fun_l9_n535
+end
+
+def fun_l8_n818()
+ fun_l9_n705
+end
+
+def fun_l8_n819()
+ fun_l9_n19
+end
+
+def fun_l8_n820()
+ fun_l9_n434
+end
+
+def fun_l8_n821()
+ fun_l9_n430
+end
+
+def fun_l8_n822()
+ fun_l9_n501
+end
+
+def fun_l8_n823()
+ fun_l9_n349
+end
+
+def fun_l8_n824()
+ fun_l9_n970
+end
+
+def fun_l8_n825()
+ fun_l9_n467
+end
+
+def fun_l8_n826()
+ fun_l9_n218
+end
+
+def fun_l8_n827()
+ fun_l9_n163
+end
+
+def fun_l8_n828()
+ fun_l9_n752
+end
+
+def fun_l8_n829()
+ fun_l9_n34
+end
+
+def fun_l8_n830()
+ fun_l9_n977
+end
+
+def fun_l8_n831()
+ fun_l9_n517
+end
+
+def fun_l8_n832()
+ fun_l9_n740
+end
+
+def fun_l8_n833()
+ fun_l9_n7
+end
+
+def fun_l8_n834()
+ fun_l9_n117
+end
+
+def fun_l8_n835()
+ fun_l9_n879
+end
+
+def fun_l8_n836()
+ fun_l9_n916
+end
+
+def fun_l8_n837()
+ fun_l9_n895
+end
+
+def fun_l8_n838()
+ fun_l9_n831
+end
+
+def fun_l8_n839()
+ fun_l9_n559
+end
+
+def fun_l8_n840()
+ fun_l9_n419
+end
+
+def fun_l8_n841()
+ fun_l9_n994
+end
+
+def fun_l8_n842()
+ fun_l9_n893
+end
+
+def fun_l8_n843()
+ fun_l9_n664
+end
+
+def fun_l8_n844()
+ fun_l9_n611
+end
+
+def fun_l8_n845()
+ fun_l9_n988
+end
+
+def fun_l8_n846()
+ fun_l9_n501
+end
+
+def fun_l8_n847()
+ fun_l9_n97
+end
+
+def fun_l8_n848()
+ fun_l9_n348
+end
+
+def fun_l8_n849()
+ fun_l9_n23
+end
+
+def fun_l8_n850()
+ fun_l9_n164
+end
+
+def fun_l8_n851()
+ fun_l9_n751
+end
+
+def fun_l8_n852()
+ fun_l9_n544
+end
+
+def fun_l8_n853()
+ fun_l9_n944
+end
+
+def fun_l8_n854()
+ fun_l9_n25
+end
+
+def fun_l8_n855()
+ fun_l9_n125
+end
+
+def fun_l8_n856()
+ fun_l9_n720
+end
+
+def fun_l8_n857()
+ fun_l9_n298
+end
+
+def fun_l8_n858()
+ fun_l9_n7
+end
+
+def fun_l8_n859()
+ fun_l9_n885
+end
+
+def fun_l8_n860()
+ fun_l9_n785
+end
+
+def fun_l8_n861()
+ fun_l9_n653
+end
+
+def fun_l8_n862()
+ fun_l9_n206
+end
+
+def fun_l8_n863()
+ fun_l9_n460
+end
+
+def fun_l8_n864()
+ fun_l9_n361
+end
+
+def fun_l8_n865()
+ fun_l9_n782
+end
+
+def fun_l8_n866()
+ fun_l9_n965
+end
+
+def fun_l8_n867()
+ fun_l9_n653
+end
+
+def fun_l8_n868()
+ fun_l9_n757
+end
+
+def fun_l8_n869()
+ fun_l9_n892
+end
+
+def fun_l8_n870()
+ fun_l9_n939
+end
+
+def fun_l8_n871()
+ fun_l9_n105
+end
+
+def fun_l8_n872()
+ fun_l9_n334
+end
+
+def fun_l8_n873()
+ fun_l9_n120
+end
+
+def fun_l8_n874()
+ fun_l9_n530
+end
+
+def fun_l8_n875()
+ fun_l9_n777
+end
+
+def fun_l8_n876()
+ fun_l9_n546
+end
+
+def fun_l8_n877()
+ fun_l9_n235
+end
+
+def fun_l8_n878()
+ fun_l9_n647
+end
+
+def fun_l8_n879()
+ fun_l9_n813
+end
+
+def fun_l8_n880()
+ fun_l9_n756
+end
+
+def fun_l8_n881()
+ fun_l9_n202
+end
+
+def fun_l8_n882()
+ fun_l9_n58
+end
+
+def fun_l8_n883()
+ fun_l9_n895
+end
+
+def fun_l8_n884()
+ fun_l9_n556
+end
+
+def fun_l8_n885()
+ fun_l9_n974
+end
+
+def fun_l8_n886()
+ fun_l9_n671
+end
+
+def fun_l8_n887()
+ fun_l9_n700
+end
+
+def fun_l8_n888()
+ fun_l9_n788
+end
+
+def fun_l8_n889()
+ fun_l9_n568
+end
+
+def fun_l8_n890()
+ fun_l9_n431
+end
+
+def fun_l8_n891()
+ fun_l9_n517
+end
+
+def fun_l8_n892()
+ fun_l9_n330
+end
+
+def fun_l8_n893()
+ fun_l9_n573
+end
+
+def fun_l8_n894()
+ fun_l9_n510
+end
+
+def fun_l8_n895()
+ fun_l9_n784
+end
+
+def fun_l8_n896()
+ fun_l9_n75
+end
+
+def fun_l8_n897()
+ fun_l9_n314
+end
+
+def fun_l8_n898()
+ fun_l9_n703
+end
+
+def fun_l8_n899()
+ fun_l9_n740
+end
+
+def fun_l8_n900()
+ fun_l9_n806
+end
+
+def fun_l8_n901()
+ fun_l9_n208
+end
+
+def fun_l8_n902()
+ fun_l9_n678
+end
+
+def fun_l8_n903()
+ fun_l9_n443
+end
+
+def fun_l8_n904()
+ fun_l9_n285
+end
+
+def fun_l8_n905()
+ fun_l9_n840
+end
+
+def fun_l8_n906()
+ fun_l9_n896
+end
+
+def fun_l8_n907()
+ fun_l9_n253
+end
+
+def fun_l8_n908()
+ fun_l9_n786
+end
+
+def fun_l8_n909()
+ fun_l9_n364
+end
+
+def fun_l8_n910()
+ fun_l9_n314
+end
+
+def fun_l8_n911()
+ fun_l9_n178
+end
+
+def fun_l8_n912()
+ fun_l9_n14
+end
+
+def fun_l8_n913()
+ fun_l9_n594
+end
+
+def fun_l8_n914()
+ fun_l9_n524
+end
+
+def fun_l8_n915()
+ fun_l9_n449
+end
+
+def fun_l8_n916()
+ fun_l9_n970
+end
+
+def fun_l8_n917()
+ fun_l9_n418
+end
+
+def fun_l8_n918()
+ fun_l9_n978
+end
+
+def fun_l8_n919()
+ fun_l9_n266
+end
+
+def fun_l8_n920()
+ fun_l9_n384
+end
+
+def fun_l8_n921()
+ fun_l9_n806
+end
+
+def fun_l8_n922()
+ fun_l9_n99
+end
+
+def fun_l8_n923()
+ fun_l9_n116
+end
+
+def fun_l8_n924()
+ fun_l9_n494
+end
+
+def fun_l8_n925()
+ fun_l9_n891
+end
+
+def fun_l8_n926()
+ fun_l9_n49
+end
+
+def fun_l8_n927()
+ fun_l9_n87
+end
+
+def fun_l8_n928()
+ fun_l9_n502
+end
+
+def fun_l8_n929()
+ fun_l9_n528
+end
+
+def fun_l8_n930()
+ fun_l9_n403
+end
+
+def fun_l8_n931()
+ fun_l9_n385
+end
+
+def fun_l8_n932()
+ fun_l9_n965
+end
+
+def fun_l8_n933()
+ fun_l9_n658
+end
+
+def fun_l8_n934()
+ fun_l9_n316
+end
+
+def fun_l8_n935()
+ fun_l9_n441
+end
+
+def fun_l8_n936()
+ fun_l9_n453
+end
+
+def fun_l8_n937()
+ fun_l9_n957
+end
+
+def fun_l8_n938()
+ fun_l9_n360
+end
+
+def fun_l8_n939()
+ fun_l9_n150
+end
+
+def fun_l8_n940()
+ fun_l9_n934
+end
+
+def fun_l8_n941()
+ fun_l9_n676
+end
+
+def fun_l8_n942()
+ fun_l9_n943
+end
+
+def fun_l8_n943()
+ fun_l9_n824
+end
+
+def fun_l8_n944()
+ fun_l9_n7
+end
+
+def fun_l8_n945()
+ fun_l9_n640
+end
+
+def fun_l8_n946()
+ fun_l9_n18
+end
+
+def fun_l8_n947()
+ fun_l9_n483
+end
+
+def fun_l8_n948()
+ fun_l9_n495
+end
+
+def fun_l8_n949()
+ fun_l9_n711
+end
+
+def fun_l8_n950()
+ fun_l9_n382
+end
+
+def fun_l8_n951()
+ fun_l9_n479
+end
+
+def fun_l8_n952()
+ fun_l9_n920
+end
+
+def fun_l8_n953()
+ fun_l9_n477
+end
+
+def fun_l8_n954()
+ fun_l9_n411
+end
+
+def fun_l8_n955()
+ fun_l9_n801
+end
+
+def fun_l8_n956()
+ fun_l9_n630
+end
+
+def fun_l8_n957()
+ fun_l9_n172
+end
+
+def fun_l8_n958()
+ fun_l9_n104
+end
+
+def fun_l8_n959()
+ fun_l9_n197
+end
+
+def fun_l8_n960()
+ fun_l9_n231
+end
+
+def fun_l8_n961()
+ fun_l9_n769
+end
+
+def fun_l8_n962()
+ fun_l9_n293
+end
+
+def fun_l8_n963()
+ fun_l9_n580
+end
+
+def fun_l8_n964()
+ fun_l9_n345
+end
+
+def fun_l8_n965()
+ fun_l9_n199
+end
+
+def fun_l8_n966()
+ fun_l9_n899
+end
+
+def fun_l8_n967()
+ fun_l9_n68
+end
+
+def fun_l8_n968()
+ fun_l9_n954
+end
+
+def fun_l8_n969()
+ fun_l9_n205
+end
+
+def fun_l8_n970()
+ fun_l9_n697
+end
+
+def fun_l8_n971()
+ fun_l9_n445
+end
+
+def fun_l8_n972()
+ fun_l9_n294
+end
+
+def fun_l8_n973()
+ fun_l9_n96
+end
+
+def fun_l8_n974()
+ fun_l9_n798
+end
+
+def fun_l8_n975()
+ fun_l9_n509
+end
+
+def fun_l8_n976()
+ fun_l9_n918
+end
+
+def fun_l8_n977()
+ fun_l9_n624
+end
+
+def fun_l8_n978()
+ fun_l9_n798
+end
+
+def fun_l8_n979()
+ fun_l9_n267
+end
+
+def fun_l8_n980()
+ fun_l9_n977
+end
+
+def fun_l8_n981()
+ fun_l9_n128
+end
+
+def fun_l8_n982()
+ fun_l9_n759
+end
+
+def fun_l8_n983()
+ fun_l9_n999
+end
+
+def fun_l8_n984()
+ fun_l9_n908
+end
+
+def fun_l8_n985()
+ fun_l9_n713
+end
+
+def fun_l8_n986()
+ fun_l9_n423
+end
+
+def fun_l8_n987()
+ fun_l9_n789
+end
+
+def fun_l8_n988()
+ fun_l9_n342
+end
+
+def fun_l8_n989()
+ fun_l9_n963
+end
+
+def fun_l8_n990()
+ fun_l9_n393
+end
+
+def fun_l8_n991()
+ fun_l9_n446
+end
+
+def fun_l8_n992()
+ fun_l9_n62
+end
+
+def fun_l8_n993()
+ fun_l9_n567
+end
+
+def fun_l8_n994()
+ fun_l9_n99
+end
+
+def fun_l8_n995()
+ fun_l9_n6
+end
+
+def fun_l8_n996()
+ fun_l9_n582
+end
+
+def fun_l8_n997()
+ fun_l9_n714
+end
+
+def fun_l8_n998()
+ fun_l9_n440
+end
+
+def fun_l8_n999()
+ fun_l9_n89
+end
+
+def fun_l9_n0()
+ fun_l10_n441
+end
+
+def fun_l9_n1()
+ fun_l10_n18
+end
+
+def fun_l9_n2()
+ fun_l10_n406
+end
+
+def fun_l9_n3()
+ fun_l10_n623
+end
+
+def fun_l9_n4()
+ fun_l10_n323
+end
+
+def fun_l9_n5()
+ fun_l10_n702
+end
+
+def fun_l9_n6()
+ fun_l10_n46
+end
+
+def fun_l9_n7()
+ fun_l10_n519
+end
+
+def fun_l9_n8()
+ fun_l10_n572
+end
+
+def fun_l9_n9()
+ fun_l10_n670
+end
+
+def fun_l9_n10()
+ fun_l10_n917
+end
+
+def fun_l9_n11()
+ fun_l10_n160
+end
+
+def fun_l9_n12()
+ fun_l10_n153
+end
+
+def fun_l9_n13()
+ fun_l10_n73
+end
+
+def fun_l9_n14()
+ fun_l10_n775
+end
+
+def fun_l9_n15()
+ fun_l10_n97
+end
+
+def fun_l9_n16()
+ fun_l10_n307
+end
+
+def fun_l9_n17()
+ fun_l10_n630
+end
+
+def fun_l9_n18()
+ fun_l10_n446
+end
+
+def fun_l9_n19()
+ fun_l10_n798
+end
+
+def fun_l9_n20()
+ fun_l10_n633
+end
+
+def fun_l9_n21()
+ fun_l10_n83
+end
+
+def fun_l9_n22()
+ fun_l10_n373
+end
+
+def fun_l9_n23()
+ fun_l10_n777
+end
+
+def fun_l9_n24()
+ fun_l10_n47
+end
+
+def fun_l9_n25()
+ fun_l10_n533
+end
+
+def fun_l9_n26()
+ fun_l10_n780
+end
+
+def fun_l9_n27()
+ fun_l10_n220
+end
+
+def fun_l9_n28()
+ fun_l10_n777
+end
+
+def fun_l9_n29()
+ fun_l10_n71
+end
+
+def fun_l9_n30()
+ fun_l10_n590
+end
+
+def fun_l9_n31()
+ fun_l10_n544
+end
+
+def fun_l9_n32()
+ fun_l10_n173
+end
+
+def fun_l9_n33()
+ fun_l10_n464
+end
+
+def fun_l9_n34()
+ fun_l10_n267
+end
+
+def fun_l9_n35()
+ fun_l10_n152
+end
+
+def fun_l9_n36()
+ fun_l10_n330
+end
+
+def fun_l9_n37()
+ fun_l10_n267
+end
+
+def fun_l9_n38()
+ fun_l10_n499
+end
+
+def fun_l9_n39()
+ fun_l10_n213
+end
+
+def fun_l9_n40()
+ fun_l10_n825
+end
+
+def fun_l9_n41()
+ fun_l10_n567
+end
+
+def fun_l9_n42()
+ fun_l10_n112
+end
+
+def fun_l9_n43()
+ fun_l10_n483
+end
+
+def fun_l9_n44()
+ fun_l10_n52
+end
+
+def fun_l9_n45()
+ fun_l10_n564
+end
+
+def fun_l9_n46()
+ fun_l10_n667
+end
+
+def fun_l9_n47()
+ fun_l10_n965
+end
+
+def fun_l9_n48()
+ fun_l10_n49
+end
+
+def fun_l9_n49()
+ fun_l10_n206
+end
+
+def fun_l9_n50()
+ fun_l10_n904
+end
+
+def fun_l9_n51()
+ fun_l10_n161
+end
+
+def fun_l9_n52()
+ fun_l10_n739
+end
+
+def fun_l9_n53()
+ fun_l10_n62
+end
+
+def fun_l9_n54()
+ fun_l10_n881
+end
+
+def fun_l9_n55()
+ fun_l10_n392
+end
+
+def fun_l9_n56()
+ fun_l10_n560
+end
+
+def fun_l9_n57()
+ fun_l10_n202
+end
+
+def fun_l9_n58()
+ fun_l10_n486
+end
+
+def fun_l9_n59()
+ fun_l10_n347
+end
+
+def fun_l9_n60()
+ fun_l10_n593
+end
+
+def fun_l9_n61()
+ fun_l10_n542
+end
+
+def fun_l9_n62()
+ fun_l10_n914
+end
+
+def fun_l9_n63()
+ fun_l10_n956
+end
+
+def fun_l9_n64()
+ fun_l10_n337
+end
+
+def fun_l9_n65()
+ fun_l10_n383
+end
+
+def fun_l9_n66()
+ fun_l10_n332
+end
+
+def fun_l9_n67()
+ fun_l10_n610
+end
+
+def fun_l9_n68()
+ fun_l10_n396
+end
+
+def fun_l9_n69()
+ fun_l10_n847
+end
+
+def fun_l9_n70()
+ fun_l10_n473
+end
+
+def fun_l9_n71()
+ fun_l10_n657
+end
+
+def fun_l9_n72()
+ fun_l10_n933
+end
+
+def fun_l9_n73()
+ fun_l10_n384
+end
+
+def fun_l9_n74()
+ fun_l10_n275
+end
+
+def fun_l9_n75()
+ fun_l10_n90
+end
+
+def fun_l9_n76()
+ fun_l10_n841
+end
+
+def fun_l9_n77()
+ fun_l10_n326
+end
+
+def fun_l9_n78()
+ fun_l10_n275
+end
+
+def fun_l9_n79()
+ fun_l10_n153
+end
+
+def fun_l9_n80()
+ fun_l10_n651
+end
+
+def fun_l9_n81()
+ fun_l10_n724
+end
+
+def fun_l9_n82()
+ fun_l10_n204
+end
+
+def fun_l9_n83()
+ fun_l10_n389
+end
+
+def fun_l9_n84()
+ fun_l10_n583
+end
+
+def fun_l9_n85()
+ fun_l10_n938
+end
+
+def fun_l9_n86()
+ fun_l10_n433
+end
+
+def fun_l9_n87()
+ fun_l10_n917
+end
+
+def fun_l9_n88()
+ fun_l10_n147
+end
+
+def fun_l9_n89()
+ fun_l10_n578
+end
+
+def fun_l9_n90()
+ fun_l10_n760
+end
+
+def fun_l9_n91()
+ fun_l10_n891
+end
+
+def fun_l9_n92()
+ fun_l10_n676
+end
+
+def fun_l9_n93()
+ fun_l10_n130
+end
+
+def fun_l9_n94()
+ fun_l10_n506
+end
+
+def fun_l9_n95()
+ fun_l10_n67
+end
+
+def fun_l9_n96()
+ fun_l10_n98
+end
+
+def fun_l9_n97()
+ fun_l10_n788
+end
+
+def fun_l9_n98()
+ fun_l10_n151
+end
+
+def fun_l9_n99()
+ fun_l10_n170
+end
+
+def fun_l9_n100()
+ fun_l10_n853
+end
+
+def fun_l9_n101()
+ fun_l10_n76
+end
+
+def fun_l9_n102()
+ fun_l10_n577
+end
+
+def fun_l9_n103()
+ fun_l10_n703
+end
+
+def fun_l9_n104()
+ fun_l10_n436
+end
+
+def fun_l9_n105()
+ fun_l10_n983
+end
+
+def fun_l9_n106()
+ fun_l10_n715
+end
+
+def fun_l9_n107()
+ fun_l10_n703
+end
+
+def fun_l9_n108()
+ fun_l10_n986
+end
+
+def fun_l9_n109()
+ fun_l10_n328
+end
+
+def fun_l9_n110()
+ fun_l10_n719
+end
+
+def fun_l9_n111()
+ fun_l10_n885
+end
+
+def fun_l9_n112()
+ fun_l10_n364
+end
+
+def fun_l9_n113()
+ fun_l10_n554
+end
+
+def fun_l9_n114()
+ fun_l10_n909
+end
+
+def fun_l9_n115()
+ fun_l10_n718
+end
+
+def fun_l9_n116()
+ fun_l10_n866
+end
+
+def fun_l9_n117()
+ fun_l10_n592
+end
+
+def fun_l9_n118()
+ fun_l10_n954
+end
+
+def fun_l9_n119()
+ fun_l10_n204
+end
+
+def fun_l9_n120()
+ fun_l10_n565
+end
+
+def fun_l9_n121()
+ fun_l10_n982
+end
+
+def fun_l9_n122()
+ fun_l10_n64
+end
+
+def fun_l9_n123()
+ fun_l10_n851
+end
+
+def fun_l9_n124()
+ fun_l10_n615
+end
+
+def fun_l9_n125()
+ fun_l10_n141
+end
+
+def fun_l9_n126()
+ fun_l10_n663
+end
+
+def fun_l9_n127()
+ fun_l10_n625
+end
+
+def fun_l9_n128()
+ fun_l10_n183
+end
+
+def fun_l9_n129()
+ fun_l10_n433
+end
+
+def fun_l9_n130()
+ fun_l10_n620
+end
+
+def fun_l9_n131()
+ fun_l10_n251
+end
+
+def fun_l9_n132()
+ fun_l10_n726
+end
+
+def fun_l9_n133()
+ fun_l10_n871
+end
+
+def fun_l9_n134()
+ fun_l10_n835
+end
+
+def fun_l9_n135()
+ fun_l10_n643
+end
+
+def fun_l9_n136()
+ fun_l10_n342
+end
+
+def fun_l9_n137()
+ fun_l10_n13
+end
+
+def fun_l9_n138()
+ fun_l10_n173
+end
+
+def fun_l9_n139()
+ fun_l10_n555
+end
+
+def fun_l9_n140()
+ fun_l10_n723
+end
+
+def fun_l9_n141()
+ fun_l10_n269
+end
+
+def fun_l9_n142()
+ fun_l10_n127
+end
+
+def fun_l9_n143()
+ fun_l10_n238
+end
+
+def fun_l9_n144()
+ fun_l10_n962
+end
+
+def fun_l9_n145()
+ fun_l10_n259
+end
+
+def fun_l9_n146()
+ fun_l10_n813
+end
+
+def fun_l9_n147()
+ fun_l10_n506
+end
+
+def fun_l9_n148()
+ fun_l10_n38
+end
+
+def fun_l9_n149()
+ fun_l10_n465
+end
+
+def fun_l9_n150()
+ fun_l10_n602
+end
+
+def fun_l9_n151()
+ fun_l10_n857
+end
+
+def fun_l9_n152()
+ fun_l10_n346
+end
+
+def fun_l9_n153()
+ fun_l10_n611
+end
+
+def fun_l9_n154()
+ fun_l10_n696
+end
+
+def fun_l9_n155()
+ fun_l10_n93
+end
+
+def fun_l9_n156()
+ fun_l10_n874
+end
+
+def fun_l9_n157()
+ fun_l10_n750
+end
+
+def fun_l9_n158()
+ fun_l10_n339
+end
+
+def fun_l9_n159()
+ fun_l10_n395
+end
+
+def fun_l9_n160()
+ fun_l10_n838
+end
+
+def fun_l9_n161()
+ fun_l10_n620
+end
+
+def fun_l9_n162()
+ fun_l10_n934
+end
+
+def fun_l9_n163()
+ fun_l10_n908
+end
+
+def fun_l9_n164()
+ fun_l10_n603
+end
+
+def fun_l9_n165()
+ fun_l10_n906
+end
+
+def fun_l9_n166()
+ fun_l10_n718
+end
+
+def fun_l9_n167()
+ fun_l10_n514
+end
+
+def fun_l9_n168()
+ fun_l10_n766
+end
+
+def fun_l9_n169()
+ fun_l10_n179
+end
+
+def fun_l9_n170()
+ fun_l10_n290
+end
+
+def fun_l9_n171()
+ fun_l10_n833
+end
+
+def fun_l9_n172()
+ fun_l10_n420
+end
+
+def fun_l9_n173()
+ fun_l10_n605
+end
+
+def fun_l9_n174()
+ fun_l10_n356
+end
+
+def fun_l9_n175()
+ fun_l10_n744
+end
+
+def fun_l9_n176()
+ fun_l10_n715
+end
+
+def fun_l9_n177()
+ fun_l10_n725
+end
+
+def fun_l9_n178()
+ fun_l10_n434
+end
+
+def fun_l9_n179()
+ fun_l10_n127
+end
+
+def fun_l9_n180()
+ fun_l10_n982
+end
+
+def fun_l9_n181()
+ fun_l10_n377
+end
+
+def fun_l9_n182()
+ fun_l10_n302
+end
+
+def fun_l9_n183()
+ fun_l10_n472
+end
+
+def fun_l9_n184()
+ fun_l10_n850
+end
+
+def fun_l9_n185()
+ fun_l10_n900
+end
+
+def fun_l9_n186()
+ fun_l10_n581
+end
+
+def fun_l9_n187()
+ fun_l10_n628
+end
+
+def fun_l9_n188()
+ fun_l10_n453
+end
+
+def fun_l9_n189()
+ fun_l10_n31
+end
+
+def fun_l9_n190()
+ fun_l10_n257
+end
+
+def fun_l9_n191()
+ fun_l10_n416
+end
+
+def fun_l9_n192()
+ fun_l10_n399
+end
+
+def fun_l9_n193()
+ fun_l10_n113
+end
+
+def fun_l9_n194()
+ fun_l10_n217
+end
+
+def fun_l9_n195()
+ fun_l10_n975
+end
+
+def fun_l9_n196()
+ fun_l10_n525
+end
+
+def fun_l9_n197()
+ fun_l10_n534
+end
+
+def fun_l9_n198()
+ fun_l10_n986
+end
+
+def fun_l9_n199()
+ fun_l10_n992
+end
+
+def fun_l9_n200()
+ fun_l10_n579
+end
+
+def fun_l9_n201()
+ fun_l10_n776
+end
+
+def fun_l9_n202()
+ fun_l10_n102
+end
+
+def fun_l9_n203()
+ fun_l10_n287
+end
+
+def fun_l9_n204()
+ fun_l10_n11
+end
+
+def fun_l9_n205()
+ fun_l10_n522
+end
+
+def fun_l9_n206()
+ fun_l10_n777
+end
+
+def fun_l9_n207()
+ fun_l10_n984
+end
+
+def fun_l9_n208()
+ fun_l10_n369
+end
+
+def fun_l9_n209()
+ fun_l10_n889
+end
+
+def fun_l9_n210()
+ fun_l10_n619
+end
+
+def fun_l9_n211()
+ fun_l10_n878
+end
+
+def fun_l9_n212()
+ fun_l10_n540
+end
+
+def fun_l9_n213()
+ fun_l10_n285
+end
+
+def fun_l9_n214()
+ fun_l10_n627
+end
+
+def fun_l9_n215()
+ fun_l10_n196
+end
+
+def fun_l9_n216()
+ fun_l10_n166
+end
+
+def fun_l9_n217()
+ fun_l10_n648
+end
+
+def fun_l9_n218()
+ fun_l10_n980
+end
+
+def fun_l9_n219()
+ fun_l10_n801
+end
+
+def fun_l9_n220()
+ fun_l10_n949
+end
+
+def fun_l9_n221()
+ fun_l10_n985
+end
+
+def fun_l9_n222()
+ fun_l10_n384
+end
+
+def fun_l9_n223()
+ fun_l10_n840
+end
+
+def fun_l9_n224()
+ fun_l10_n80
+end
+
+def fun_l9_n225()
+ fun_l10_n79
+end
+
+def fun_l9_n226()
+ fun_l10_n630
+end
+
+def fun_l9_n227()
+ fun_l10_n20
+end
+
+def fun_l9_n228()
+ fun_l10_n224
+end
+
+def fun_l9_n229()
+ fun_l10_n480
+end
+
+def fun_l9_n230()
+ fun_l10_n145
+end
+
+def fun_l9_n231()
+ fun_l10_n923
+end
+
+def fun_l9_n232()
+ fun_l10_n794
+end
+
+def fun_l9_n233()
+ fun_l10_n271
+end
+
+def fun_l9_n234()
+ fun_l10_n124
+end
+
+def fun_l9_n235()
+ fun_l10_n925
+end
+
+def fun_l9_n236()
+ fun_l10_n938
+end
+
+def fun_l9_n237()
+ fun_l10_n470
+end
+
+def fun_l9_n238()
+ fun_l10_n557
+end
+
+def fun_l9_n239()
+ fun_l10_n152
+end
+
+def fun_l9_n240()
+ fun_l10_n200
+end
+
+def fun_l9_n241()
+ fun_l10_n110
+end
+
+def fun_l9_n242()
+ fun_l10_n329
+end
+
+def fun_l9_n243()
+ fun_l10_n2
+end
+
+def fun_l9_n244()
+ fun_l10_n432
+end
+
+def fun_l9_n245()
+ fun_l10_n175
+end
+
+def fun_l9_n246()
+ fun_l10_n33
+end
+
+def fun_l9_n247()
+ fun_l10_n441
+end
+
+def fun_l9_n248()
+ fun_l10_n54
+end
+
+def fun_l9_n249()
+ fun_l10_n408
+end
+
+def fun_l9_n250()
+ fun_l10_n911
+end
+
+def fun_l9_n251()
+ fun_l10_n100
+end
+
+def fun_l9_n252()
+ fun_l10_n645
+end
+
+def fun_l9_n253()
+ fun_l10_n826
+end
+
+def fun_l9_n254()
+ fun_l10_n319
+end
+
+def fun_l9_n255()
+ fun_l10_n735
+end
+
+def fun_l9_n256()
+ fun_l10_n6
+end
+
+def fun_l9_n257()
+ fun_l10_n428
+end
+
+def fun_l9_n258()
+ fun_l10_n511
+end
+
+def fun_l9_n259()
+ fun_l10_n47
+end
+
+def fun_l9_n260()
+ fun_l10_n985
+end
+
+def fun_l9_n261()
+ fun_l10_n278
+end
+
+def fun_l9_n262()
+ fun_l10_n839
+end
+
+def fun_l9_n263()
+ fun_l10_n948
+end
+
+def fun_l9_n264()
+ fun_l10_n572
+end
+
+def fun_l9_n265()
+ fun_l10_n864
+end
+
+def fun_l9_n266()
+ fun_l10_n159
+end
+
+def fun_l9_n267()
+ fun_l10_n870
+end
+
+def fun_l9_n268()
+ fun_l10_n194
+end
+
+def fun_l9_n269()
+ fun_l10_n424
+end
+
+def fun_l9_n270()
+ fun_l10_n238
+end
+
+def fun_l9_n271()
+ fun_l10_n804
+end
+
+def fun_l9_n272()
+ fun_l10_n945
+end
+
+def fun_l9_n273()
+ fun_l10_n181
+end
+
+def fun_l9_n274()
+ fun_l10_n90
+end
+
+def fun_l9_n275()
+ fun_l10_n552
+end
+
+def fun_l9_n276()
+ fun_l10_n690
+end
+
+def fun_l9_n277()
+ fun_l10_n416
+end
+
+def fun_l9_n278()
+ fun_l10_n977
+end
+
+def fun_l9_n279()
+ fun_l10_n930
+end
+
+def fun_l9_n280()
+ fun_l10_n77
+end
+
+def fun_l9_n281()
+ fun_l10_n102
+end
+
+def fun_l9_n282()
+ fun_l10_n263
+end
+
+def fun_l9_n283()
+ fun_l10_n973
+end
+
+def fun_l9_n284()
+ fun_l10_n119
+end
+
+def fun_l9_n285()
+ fun_l10_n102
+end
+
+def fun_l9_n286()
+ fun_l10_n744
+end
+
+def fun_l9_n287()
+ fun_l10_n430
+end
+
+def fun_l9_n288()
+ fun_l10_n465
+end
+
+def fun_l9_n289()
+ fun_l10_n54
+end
+
+def fun_l9_n290()
+ fun_l10_n191
+end
+
+def fun_l9_n291()
+ fun_l10_n781
+end
+
+def fun_l9_n292()
+ fun_l10_n158
+end
+
+def fun_l9_n293()
+ fun_l10_n512
+end
+
+def fun_l9_n294()
+ fun_l10_n396
+end
+
+def fun_l9_n295()
+ fun_l10_n814
+end
+
+def fun_l9_n296()
+ fun_l10_n509
+end
+
+def fun_l9_n297()
+ fun_l10_n340
+end
+
+def fun_l9_n298()
+ fun_l10_n338
+end
+
+def fun_l9_n299()
+ fun_l10_n822
+end
+
+def fun_l9_n300()
+ fun_l10_n64
+end
+
+def fun_l9_n301()
+ fun_l10_n867
+end
+
+def fun_l9_n302()
+ fun_l10_n924
+end
+
+def fun_l9_n303()
+ fun_l10_n628
+end
+
+def fun_l9_n304()
+ fun_l10_n929
+end
+
+def fun_l9_n305()
+ fun_l10_n874
+end
+
+def fun_l9_n306()
+ fun_l10_n411
+end
+
+def fun_l9_n307()
+ fun_l10_n836
+end
+
+def fun_l9_n308()
+ fun_l10_n574
+end
+
+def fun_l9_n309()
+ fun_l10_n865
+end
+
+def fun_l9_n310()
+ fun_l10_n992
+end
+
+def fun_l9_n311()
+ fun_l10_n75
+end
+
+def fun_l9_n312()
+ fun_l10_n221
+end
+
+def fun_l9_n313()
+ fun_l10_n439
+end
+
+def fun_l9_n314()
+ fun_l10_n826
+end
+
+def fun_l9_n315()
+ fun_l10_n589
+end
+
+def fun_l9_n316()
+ fun_l10_n123
+end
+
+def fun_l9_n317()
+ fun_l10_n641
+end
+
+def fun_l9_n318()
+ fun_l10_n556
+end
+
+def fun_l9_n319()
+ fun_l10_n92
+end
+
+def fun_l9_n320()
+ fun_l10_n728
+end
+
+def fun_l9_n321()
+ fun_l10_n503
+end
+
+def fun_l9_n322()
+ fun_l10_n626
+end
+
+def fun_l9_n323()
+ fun_l10_n416
+end
+
+def fun_l9_n324()
+ fun_l10_n331
+end
+
+def fun_l9_n325()
+ fun_l10_n330
+end
+
+def fun_l9_n326()
+ fun_l10_n387
+end
+
+def fun_l9_n327()
+ fun_l10_n337
+end
+
+def fun_l9_n328()
+ fun_l10_n652
+end
+
+def fun_l9_n329()
+ fun_l10_n654
+end
+
+def fun_l9_n330()
+ fun_l10_n413
+end
+
+def fun_l9_n331()
+ fun_l10_n763
+end
+
+def fun_l9_n332()
+ fun_l10_n962
+end
+
+def fun_l9_n333()
+ fun_l10_n944
+end
+
+def fun_l9_n334()
+ fun_l10_n655
+end
+
+def fun_l9_n335()
+ fun_l10_n907
+end
+
+def fun_l9_n336()
+ fun_l10_n293
+end
+
+def fun_l9_n337()
+ fun_l10_n684
+end
+
+def fun_l9_n338()
+ fun_l10_n566
+end
+
+def fun_l9_n339()
+ fun_l10_n547
+end
+
+def fun_l9_n340()
+ fun_l10_n112
+end
+
+def fun_l9_n341()
+ fun_l10_n854
+end
+
+def fun_l9_n342()
+ fun_l10_n336
+end
+
+def fun_l9_n343()
+ fun_l10_n473
+end
+
+def fun_l9_n344()
+ fun_l10_n485
+end
+
+def fun_l9_n345()
+ fun_l10_n588
+end
+
+def fun_l9_n346()
+ fun_l10_n889
+end
+
+def fun_l9_n347()
+ fun_l10_n523
+end
+
+def fun_l9_n348()
+ fun_l10_n8
+end
+
+def fun_l9_n349()
+ fun_l10_n368
+end
+
+def fun_l9_n350()
+ fun_l10_n636
+end
+
+def fun_l9_n351()
+ fun_l10_n879
+end
+
+def fun_l9_n352()
+ fun_l10_n524
+end
+
+def fun_l9_n353()
+ fun_l10_n209
+end
+
+def fun_l9_n354()
+ fun_l10_n271
+end
+
+def fun_l9_n355()
+ fun_l10_n90
+end
+
+def fun_l9_n356()
+ fun_l10_n698
+end
+
+def fun_l9_n357()
+ fun_l10_n268
+end
+
+def fun_l9_n358()
+ fun_l10_n948
+end
+
+def fun_l9_n359()
+ fun_l10_n847
+end
+
+def fun_l9_n360()
+ fun_l10_n985
+end
+
+def fun_l9_n361()
+ fun_l10_n978
+end
+
+def fun_l9_n362()
+ fun_l10_n808
+end
+
+def fun_l9_n363()
+ fun_l10_n796
+end
+
+def fun_l9_n364()
+ fun_l10_n810
+end
+
+def fun_l9_n365()
+ fun_l10_n665
+end
+
+def fun_l9_n366()
+ fun_l10_n765
+end
+
+def fun_l9_n367()
+ fun_l10_n74
+end
+
+def fun_l9_n368()
+ fun_l10_n330
+end
+
+def fun_l9_n369()
+ fun_l10_n125
+end
+
+def fun_l9_n370()
+ fun_l10_n814
+end
+
+def fun_l9_n371()
+ fun_l10_n498
+end
+
+def fun_l9_n372()
+ fun_l10_n783
+end
+
+def fun_l9_n373()
+ fun_l10_n169
+end
+
+def fun_l9_n374()
+ fun_l10_n490
+end
+
+def fun_l9_n375()
+ fun_l10_n923
+end
+
+def fun_l9_n376()
+ fun_l10_n63
+end
+
+def fun_l9_n377()
+ fun_l10_n687
+end
+
+def fun_l9_n378()
+ fun_l10_n603
+end
+
+def fun_l9_n379()
+ fun_l10_n916
+end
+
+def fun_l9_n380()
+ fun_l10_n930
+end
+
+def fun_l9_n381()
+ fun_l10_n884
+end
+
+def fun_l9_n382()
+ fun_l10_n782
+end
+
+def fun_l9_n383()
+ fun_l10_n63
+end
+
+def fun_l9_n384()
+ fun_l10_n488
+end
+
+def fun_l9_n385()
+ fun_l10_n188
+end
+
+def fun_l9_n386()
+ fun_l10_n692
+end
+
+def fun_l9_n387()
+ fun_l10_n213
+end
+
+def fun_l9_n388()
+ fun_l10_n358
+end
+
+def fun_l9_n389()
+ fun_l10_n200
+end
+
+def fun_l9_n390()
+ fun_l10_n881
+end
+
+def fun_l9_n391()
+ fun_l10_n533
+end
+
+def fun_l9_n392()
+ fun_l10_n889
+end
+
+def fun_l9_n393()
+ fun_l10_n444
+end
+
+def fun_l9_n394()
+ fun_l10_n184
+end
+
+def fun_l9_n395()
+ fun_l10_n775
+end
+
+def fun_l9_n396()
+ fun_l10_n714
+end
+
+def fun_l9_n397()
+ fun_l10_n385
+end
+
+def fun_l9_n398()
+ fun_l10_n432
+end
+
+def fun_l9_n399()
+ fun_l10_n357
+end
+
+def fun_l9_n400()
+ fun_l10_n223
+end
+
+def fun_l9_n401()
+ fun_l10_n73
+end
+
+def fun_l9_n402()
+ fun_l10_n139
+end
+
+def fun_l9_n403()
+ fun_l10_n930
+end
+
+def fun_l9_n404()
+ fun_l10_n43
+end
+
+def fun_l9_n405()
+ fun_l10_n104
+end
+
+def fun_l9_n406()
+ fun_l10_n334
+end
+
+def fun_l9_n407()
+ fun_l10_n959
+end
+
+def fun_l9_n408()
+ fun_l10_n59
+end
+
+def fun_l9_n409()
+ fun_l10_n794
+end
+
+def fun_l9_n410()
+ fun_l10_n204
+end
+
+def fun_l9_n411()
+ fun_l10_n225
+end
+
+def fun_l9_n412()
+ fun_l10_n849
+end
+
+def fun_l9_n413()
+ fun_l10_n227
+end
+
+def fun_l9_n414()
+ fun_l10_n59
+end
+
+def fun_l9_n415()
+ fun_l10_n352
+end
+
+def fun_l9_n416()
+ fun_l10_n910
+end
+
+def fun_l9_n417()
+ fun_l10_n628
+end
+
+def fun_l9_n418()
+ fun_l10_n653
+end
+
+def fun_l9_n419()
+ fun_l10_n827
+end
+
+def fun_l9_n420()
+ fun_l10_n960
+end
+
+def fun_l9_n421()
+ fun_l10_n142
+end
+
+def fun_l9_n422()
+ fun_l10_n928
+end
+
+def fun_l9_n423()
+ fun_l10_n370
+end
+
+def fun_l9_n424()
+ fun_l10_n121
+end
+
+def fun_l9_n425()
+ fun_l10_n684
+end
+
+def fun_l9_n426()
+ fun_l10_n187
+end
+
+def fun_l9_n427()
+ fun_l10_n93
+end
+
+def fun_l9_n428()
+ fun_l10_n792
+end
+
+def fun_l9_n429()
+ fun_l10_n565
+end
+
+def fun_l9_n430()
+ fun_l10_n933
+end
+
+def fun_l9_n431()
+ fun_l10_n393
+end
+
+def fun_l9_n432()
+ fun_l10_n412
+end
+
+def fun_l9_n433()
+ fun_l10_n121
+end
+
+def fun_l9_n434()
+ fun_l10_n522
+end
+
+def fun_l9_n435()
+ fun_l10_n408
+end
+
+def fun_l9_n436()
+ fun_l10_n670
+end
+
+def fun_l9_n437()
+ fun_l10_n685
+end
+
+def fun_l9_n438()
+ fun_l10_n138
+end
+
+def fun_l9_n439()
+ fun_l10_n658
+end
+
+def fun_l9_n440()
+ fun_l10_n567
+end
+
+def fun_l9_n441()
+ fun_l10_n121
+end
+
+def fun_l9_n442()
+ fun_l10_n532
+end
+
+def fun_l9_n443()
+ fun_l10_n37
+end
+
+def fun_l9_n444()
+ fun_l10_n502
+end
+
+def fun_l9_n445()
+ fun_l10_n779
+end
+
+def fun_l9_n446()
+ fun_l10_n376
+end
+
+def fun_l9_n447()
+ fun_l10_n412
+end
+
+def fun_l9_n448()
+ fun_l10_n932
+end
+
+def fun_l9_n449()
+ fun_l10_n779
+end
+
+def fun_l9_n450()
+ fun_l10_n231
+end
+
+def fun_l9_n451()
+ fun_l10_n302
+end
+
+def fun_l9_n452()
+ fun_l10_n273
+end
+
+def fun_l9_n453()
+ fun_l10_n531
+end
+
+def fun_l9_n454()
+ fun_l10_n291
+end
+
+def fun_l9_n455()
+ fun_l10_n56
+end
+
+def fun_l9_n456()
+ fun_l10_n970
+end
+
+def fun_l9_n457()
+ fun_l10_n936
+end
+
+def fun_l9_n458()
+ fun_l10_n537
+end
+
+def fun_l9_n459()
+ fun_l10_n145
+end
+
+def fun_l9_n460()
+ fun_l10_n756
+end
+
+def fun_l9_n461()
+ fun_l10_n0
+end
+
+def fun_l9_n462()
+ fun_l10_n691
+end
+
+def fun_l9_n463()
+ fun_l10_n635
+end
+
+def fun_l9_n464()
+ fun_l10_n485
+end
+
+def fun_l9_n465()
+ fun_l10_n407
+end
+
+def fun_l9_n466()
+ fun_l10_n393
+end
+
+def fun_l9_n467()
+ fun_l10_n336
+end
+
+def fun_l9_n468()
+ fun_l10_n169
+end
+
+def fun_l9_n469()
+ fun_l10_n43
+end
+
+def fun_l9_n470()
+ fun_l10_n907
+end
+
+def fun_l9_n471()
+ fun_l10_n215
+end
+
+def fun_l9_n472()
+ fun_l10_n118
+end
+
+def fun_l9_n473()
+ fun_l10_n735
+end
+
+def fun_l9_n474()
+ fun_l10_n319
+end
+
+def fun_l9_n475()
+ fun_l10_n631
+end
+
+def fun_l9_n476()
+ fun_l10_n150
+end
+
+def fun_l9_n477()
+ fun_l10_n899
+end
+
+def fun_l9_n478()
+ fun_l10_n407
+end
+
+def fun_l9_n479()
+ fun_l10_n830
+end
+
+def fun_l9_n480()
+ fun_l10_n931
+end
+
+def fun_l9_n481()
+ fun_l10_n392
+end
+
+def fun_l9_n482()
+ fun_l10_n100
+end
+
+def fun_l9_n483()
+ fun_l10_n210
+end
+
+def fun_l9_n484()
+ fun_l10_n506
+end
+
+def fun_l9_n485()
+ fun_l10_n160
+end
+
+def fun_l9_n486()
+ fun_l10_n998
+end
+
+def fun_l9_n487()
+ fun_l10_n170
+end
+
+def fun_l9_n488()
+ fun_l10_n722
+end
+
+def fun_l9_n489()
+ fun_l10_n196
+end
+
+def fun_l9_n490()
+ fun_l10_n518
+end
+
+def fun_l9_n491()
+ fun_l10_n350
+end
+
+def fun_l9_n492()
+ fun_l10_n89
+end
+
+def fun_l9_n493()
+ fun_l10_n49
+end
+
+def fun_l9_n494()
+ fun_l10_n366
+end
+
+def fun_l9_n495()
+ fun_l10_n850
+end
+
+def fun_l9_n496()
+ fun_l10_n430
+end
+
+def fun_l9_n497()
+ fun_l10_n485
+end
+
+def fun_l9_n498()
+ fun_l10_n584
+end
+
+def fun_l9_n499()
+ fun_l10_n36
+end
+
+def fun_l9_n500()
+ fun_l10_n58
+end
+
+def fun_l9_n501()
+ fun_l10_n81
+end
+
+def fun_l9_n502()
+ fun_l10_n161
+end
+
+def fun_l9_n503()
+ fun_l10_n983
+end
+
+def fun_l9_n504()
+ fun_l10_n994
+end
+
+def fun_l9_n505()
+ fun_l10_n26
+end
+
+def fun_l9_n506()
+ fun_l10_n286
+end
+
+def fun_l9_n507()
+ fun_l10_n118
+end
+
+def fun_l9_n508()
+ fun_l10_n509
+end
+
+def fun_l9_n509()
+ fun_l10_n630
+end
+
+def fun_l9_n510()
+ fun_l10_n302
+end
+
+def fun_l9_n511()
+ fun_l10_n307
+end
+
+def fun_l9_n512()
+ fun_l10_n810
+end
+
+def fun_l9_n513()
+ fun_l10_n21
+end
+
+def fun_l9_n514()
+ fun_l10_n76
+end
+
+def fun_l9_n515()
+ fun_l10_n769
+end
+
+def fun_l9_n516()
+ fun_l10_n58
+end
+
+def fun_l9_n517()
+ fun_l10_n368
+end
+
+def fun_l9_n518()
+ fun_l10_n8
+end
+
+def fun_l9_n519()
+ fun_l10_n559
+end
+
+def fun_l9_n520()
+ fun_l10_n949
+end
+
+def fun_l9_n521()
+ fun_l10_n781
+end
+
+def fun_l9_n522()
+ fun_l10_n453
+end
+
+def fun_l9_n523()
+ fun_l10_n227
+end
+
+def fun_l9_n524()
+ fun_l10_n389
+end
+
+def fun_l9_n525()
+ fun_l10_n641
+end
+
+def fun_l9_n526()
+ fun_l10_n221
+end
+
+def fun_l9_n527()
+ fun_l10_n322
+end
+
+def fun_l9_n528()
+ fun_l10_n918
+end
+
+def fun_l9_n529()
+ fun_l10_n246
+end
+
+def fun_l9_n530()
+ fun_l10_n431
+end
+
+def fun_l9_n531()
+ fun_l10_n445
+end
+
+def fun_l9_n532()
+ fun_l10_n781
+end
+
+def fun_l9_n533()
+ fun_l10_n626
+end
+
+def fun_l9_n534()
+ fun_l10_n51
+end
+
+def fun_l9_n535()
+ fun_l10_n441
+end
+
+def fun_l9_n536()
+ fun_l10_n806
+end
+
+def fun_l9_n537()
+ fun_l10_n58
+end
+
+def fun_l9_n538()
+ fun_l10_n710
+end
+
+def fun_l9_n539()
+ fun_l10_n782
+end
+
+def fun_l9_n540()
+ fun_l10_n991
+end
+
+def fun_l9_n541()
+ fun_l10_n792
+end
+
+def fun_l9_n542()
+ fun_l10_n376
+end
+
+def fun_l9_n543()
+ fun_l10_n716
+end
+
+def fun_l9_n544()
+ fun_l10_n500
+end
+
+def fun_l9_n545()
+ fun_l10_n251
+end
+
+def fun_l9_n546()
+ fun_l10_n951
+end
+
+def fun_l9_n547()
+ fun_l10_n584
+end
+
+def fun_l9_n548()
+ fun_l10_n150
+end
+
+def fun_l9_n549()
+ fun_l10_n380
+end
+
+def fun_l9_n550()
+ fun_l10_n432
+end
+
+def fun_l9_n551()
+ fun_l10_n787
+end
+
+def fun_l9_n552()
+ fun_l10_n749
+end
+
+def fun_l9_n553()
+ fun_l10_n646
+end
+
+def fun_l9_n554()
+ fun_l10_n405
+end
+
+def fun_l9_n555()
+ fun_l10_n345
+end
+
+def fun_l9_n556()
+ fun_l10_n855
+end
+
+def fun_l9_n557()
+ fun_l10_n575
+end
+
+def fun_l9_n558()
+ fun_l10_n368
+end
+
+def fun_l9_n559()
+ fun_l10_n511
+end
+
+def fun_l9_n560()
+ fun_l10_n158
+end
+
+def fun_l9_n561()
+ fun_l10_n243
+end
+
+def fun_l9_n562()
+ fun_l10_n536
+end
+
+def fun_l9_n563()
+ fun_l10_n107
+end
+
+def fun_l9_n564()
+ fun_l10_n270
+end
+
+def fun_l9_n565()
+ fun_l10_n783
+end
+
+def fun_l9_n566()
+ fun_l10_n289
+end
+
+def fun_l9_n567()
+ fun_l10_n360
+end
+
+def fun_l9_n568()
+ fun_l10_n190
+end
+
+def fun_l9_n569()
+ fun_l10_n245
+end
+
+def fun_l9_n570()
+ fun_l10_n565
+end
+
+def fun_l9_n571()
+ fun_l10_n310
+end
+
+def fun_l9_n572()
+ fun_l10_n939
+end
+
+def fun_l9_n573()
+ fun_l10_n955
+end
+
+def fun_l9_n574()
+ fun_l10_n521
+end
+
+def fun_l9_n575()
+ fun_l10_n597
+end
+
+def fun_l9_n576()
+ fun_l10_n122
+end
+
+def fun_l9_n577()
+ fun_l10_n987
+end
+
+def fun_l9_n578()
+ fun_l10_n267
+end
+
+def fun_l9_n579()
+ fun_l10_n798
+end
+
+def fun_l9_n580()
+ fun_l10_n468
+end
+
+def fun_l9_n581()
+ fun_l10_n807
+end
+
+def fun_l9_n582()
+ fun_l10_n749
+end
+
+def fun_l9_n583()
+ fun_l10_n578
+end
+
+def fun_l9_n584()
+ fun_l10_n878
+end
+
+def fun_l9_n585()
+ fun_l10_n404
+end
+
+def fun_l9_n586()
+ fun_l10_n501
+end
+
+def fun_l9_n587()
+ fun_l10_n165
+end
+
+def fun_l9_n588()
+ fun_l10_n270
+end
+
+def fun_l9_n589()
+ fun_l10_n197
+end
+
+def fun_l9_n590()
+ fun_l10_n940
+end
+
+def fun_l9_n591()
+ fun_l10_n667
+end
+
+def fun_l9_n592()
+ fun_l10_n67
+end
+
+def fun_l9_n593()
+ fun_l10_n652
+end
+
+def fun_l9_n594()
+ fun_l10_n728
+end
+
+def fun_l9_n595()
+ fun_l10_n829
+end
+
+def fun_l9_n596()
+ fun_l10_n528
+end
+
+def fun_l9_n597()
+ fun_l10_n765
+end
+
+def fun_l9_n598()
+ fun_l10_n841
+end
+
+def fun_l9_n599()
+ fun_l10_n605
+end
+
+def fun_l9_n600()
+ fun_l10_n316
+end
+
+def fun_l9_n601()
+ fun_l10_n676
+end
+
+def fun_l9_n602()
+ fun_l10_n673
+end
+
+def fun_l9_n603()
+ fun_l10_n400
+end
+
+def fun_l9_n604()
+ fun_l10_n774
+end
+
+def fun_l9_n605()
+ fun_l10_n717
+end
+
+def fun_l9_n606()
+ fun_l10_n853
+end
+
+def fun_l9_n607()
+ fun_l10_n336
+end
+
+def fun_l9_n608()
+ fun_l10_n169
+end
+
+def fun_l9_n609()
+ fun_l10_n7
+end
+
+def fun_l9_n610()
+ fun_l10_n846
+end
+
+def fun_l9_n611()
+ fun_l10_n87
+end
+
+def fun_l9_n612()
+ fun_l10_n805
+end
+
+def fun_l9_n613()
+ fun_l10_n591
+end
+
+def fun_l9_n614()
+ fun_l10_n674
+end
+
+def fun_l9_n615()
+ fun_l10_n796
+end
+
+def fun_l9_n616()
+ fun_l10_n390
+end
+
+def fun_l9_n617()
+ fun_l10_n107
+end
+
+def fun_l9_n618()
+ fun_l10_n302
+end
+
+def fun_l9_n619()
+ fun_l10_n848
+end
+
+def fun_l9_n620()
+ fun_l10_n263
+end
+
+def fun_l9_n621()
+ fun_l10_n380
+end
+
+def fun_l9_n622()
+ fun_l10_n778
+end
+
+def fun_l9_n623()
+ fun_l10_n593
+end
+
+def fun_l9_n624()
+ fun_l10_n147
+end
+
+def fun_l9_n625()
+ fun_l10_n683
+end
+
+def fun_l9_n626()
+ fun_l10_n850
+end
+
+def fun_l9_n627()
+ fun_l10_n545
+end
+
+def fun_l9_n628()
+ fun_l10_n549
+end
+
+def fun_l9_n629()
+ fun_l10_n692
+end
+
+def fun_l9_n630()
+ fun_l10_n688
+end
+
+def fun_l9_n631()
+ fun_l10_n656
+end
+
+def fun_l9_n632()
+ fun_l10_n201
+end
+
+def fun_l9_n633()
+ fun_l10_n216
+end
+
+def fun_l9_n634()
+ fun_l10_n661
+end
+
+def fun_l9_n635()
+ fun_l10_n670
+end
+
+def fun_l9_n636()
+ fun_l10_n436
+end
+
+def fun_l9_n637()
+ fun_l10_n591
+end
+
+def fun_l9_n638()
+ fun_l10_n419
+end
+
+def fun_l9_n639()
+ fun_l10_n133
+end
+
+def fun_l9_n640()
+ fun_l10_n998
+end
+
+def fun_l9_n641()
+ fun_l10_n20
+end
+
+def fun_l9_n642()
+ fun_l10_n484
+end
+
+def fun_l9_n643()
+ fun_l10_n349
+end
+
+def fun_l9_n644()
+ fun_l10_n548
+end
+
+def fun_l9_n645()
+ fun_l10_n67
+end
+
+def fun_l9_n646()
+ fun_l10_n99
+end
+
+def fun_l9_n647()
+ fun_l10_n758
+end
+
+def fun_l9_n648()
+ fun_l10_n559
+end
+
+def fun_l9_n649()
+ fun_l10_n518
+end
+
+def fun_l9_n650()
+ fun_l10_n698
+end
+
+def fun_l9_n651()
+ fun_l10_n807
+end
+
+def fun_l9_n652()
+ fun_l10_n557
+end
+
+def fun_l9_n653()
+ fun_l10_n53
+end
+
+def fun_l9_n654()
+ fun_l10_n783
+end
+
+def fun_l9_n655()
+ fun_l10_n687
+end
+
+def fun_l9_n656()
+ fun_l10_n40
+end
+
+def fun_l9_n657()
+ fun_l10_n758
+end
+
+def fun_l9_n658()
+ fun_l10_n308
+end
+
+def fun_l9_n659()
+ fun_l10_n828
+end
+
+def fun_l9_n660()
+ fun_l10_n510
+end
+
+def fun_l9_n661()
+ fun_l10_n621
+end
+
+def fun_l9_n662()
+ fun_l10_n885
+end
+
+def fun_l9_n663()
+ fun_l10_n765
+end
+
+def fun_l9_n664()
+ fun_l10_n213
+end
+
+def fun_l9_n665()
+ fun_l10_n530
+end
+
+def fun_l9_n666()
+ fun_l10_n178
+end
+
+def fun_l9_n667()
+ fun_l10_n550
+end
+
+def fun_l9_n668()
+ fun_l10_n650
+end
+
+def fun_l9_n669()
+ fun_l10_n695
+end
+
+def fun_l9_n670()
+ fun_l10_n295
+end
+
+def fun_l9_n671()
+ fun_l10_n672
+end
+
+def fun_l9_n672()
+ fun_l10_n603
+end
+
+def fun_l9_n673()
+ fun_l10_n394
+end
+
+def fun_l9_n674()
+ fun_l10_n470
+end
+
+def fun_l9_n675()
+ fun_l10_n869
+end
+
+def fun_l9_n676()
+ fun_l10_n270
+end
+
+def fun_l9_n677()
+ fun_l10_n933
+end
+
+def fun_l9_n678()
+ fun_l10_n268
+end
+
+def fun_l9_n679()
+ fun_l10_n862
+end
+
+def fun_l9_n680()
+ fun_l10_n84
+end
+
+def fun_l9_n681()
+ fun_l10_n370
+end
+
+def fun_l9_n682()
+ fun_l10_n538
+end
+
+def fun_l9_n683()
+ fun_l10_n752
+end
+
+def fun_l9_n684()
+ fun_l10_n868
+end
+
+def fun_l9_n685()
+ fun_l10_n278
+end
+
+def fun_l9_n686()
+ fun_l10_n65
+end
+
+def fun_l9_n687()
+ fun_l10_n713
+end
+
+def fun_l9_n688()
+ fun_l10_n577
+end
+
+def fun_l9_n689()
+ fun_l10_n508
+end
+
+def fun_l9_n690()
+ fun_l10_n400
+end
+
+def fun_l9_n691()
+ fun_l10_n830
+end
+
+def fun_l9_n692()
+ fun_l10_n366
+end
+
+def fun_l9_n693()
+ fun_l10_n545
+end
+
+def fun_l9_n694()
+ fun_l10_n479
+end
+
+def fun_l9_n695()
+ fun_l10_n978
+end
+
+def fun_l9_n696()
+ fun_l10_n935
+end
+
+def fun_l9_n697()
+ fun_l10_n235
+end
+
+def fun_l9_n698()
+ fun_l10_n196
+end
+
+def fun_l9_n699()
+ fun_l10_n508
+end
+
+def fun_l9_n700()
+ fun_l10_n879
+end
+
+def fun_l9_n701()
+ fun_l10_n81
+end
+
+def fun_l9_n702()
+ fun_l10_n676
+end
+
+def fun_l9_n703()
+ fun_l10_n276
+end
+
+def fun_l9_n704()
+ fun_l10_n565
+end
+
+def fun_l9_n705()
+ fun_l10_n98
+end
+
+def fun_l9_n706()
+ fun_l10_n66
+end
+
+def fun_l9_n707()
+ fun_l10_n894
+end
+
+def fun_l9_n708()
+ fun_l10_n258
+end
+
+def fun_l9_n709()
+ fun_l10_n465
+end
+
+def fun_l9_n710()
+ fun_l10_n677
+end
+
+def fun_l9_n711()
+ fun_l10_n644
+end
+
+def fun_l9_n712()
+ fun_l10_n729
+end
+
+def fun_l9_n713()
+ fun_l10_n222
+end
+
+def fun_l9_n714()
+ fun_l10_n186
+end
+
+def fun_l9_n715()
+ fun_l10_n387
+end
+
+def fun_l9_n716()
+ fun_l10_n933
+end
+
+def fun_l9_n717()
+ fun_l10_n280
+end
+
+def fun_l9_n718()
+ fun_l10_n939
+end
+
+def fun_l9_n719()
+ fun_l10_n993
+end
+
+def fun_l9_n720()
+ fun_l10_n529
+end
+
+def fun_l9_n721()
+ fun_l10_n189
+end
+
+def fun_l9_n722()
+ fun_l10_n544
+end
+
+def fun_l9_n723()
+ fun_l10_n655
+end
+
+def fun_l9_n724()
+ fun_l10_n88
+end
+
+def fun_l9_n725()
+ fun_l10_n448
+end
+
+def fun_l9_n726()
+ fun_l10_n656
+end
+
+def fun_l9_n727()
+ fun_l10_n106
+end
+
+def fun_l9_n728()
+ fun_l10_n711
+end
+
+def fun_l9_n729()
+ fun_l10_n400
+end
+
+def fun_l9_n730()
+ fun_l10_n138
+end
+
+def fun_l9_n731()
+ fun_l10_n90
+end
+
+def fun_l9_n732()
+ fun_l10_n290
+end
+
+def fun_l9_n733()
+ fun_l10_n563
+end
+
+def fun_l9_n734()
+ fun_l10_n103
+end
+
+def fun_l9_n735()
+ fun_l10_n115
+end
+
+def fun_l9_n736()
+ fun_l10_n771
+end
+
+def fun_l9_n737()
+ fun_l10_n291
+end
+
+def fun_l9_n738()
+ fun_l10_n46
+end
+
+def fun_l9_n739()
+ fun_l10_n872
+end
+
+def fun_l9_n740()
+ fun_l10_n871
+end
+
+def fun_l9_n741()
+ fun_l10_n190
+end
+
+def fun_l9_n742()
+ fun_l10_n641
+end
+
+def fun_l9_n743()
+ fun_l10_n951
+end
+
+def fun_l9_n744()
+ fun_l10_n248
+end
+
+def fun_l9_n745()
+ fun_l10_n275
+end
+
+def fun_l9_n746()
+ fun_l10_n943
+end
+
+def fun_l9_n747()
+ fun_l10_n995
+end
+
+def fun_l9_n748()
+ fun_l10_n194
+end
+
+def fun_l9_n749()
+ fun_l10_n121
+end
+
+def fun_l9_n750()
+ fun_l10_n707
+end
+
+def fun_l9_n751()
+ fun_l10_n591
+end
+
+def fun_l9_n752()
+ fun_l10_n616
+end
+
+def fun_l9_n753()
+ fun_l10_n155
+end
+
+def fun_l9_n754()
+ fun_l10_n779
+end
+
+def fun_l9_n755()
+ fun_l10_n449
+end
+
+def fun_l9_n756()
+ fun_l10_n937
+end
+
+def fun_l9_n757()
+ fun_l10_n571
+end
+
+def fun_l9_n758()
+ fun_l10_n892
+end
+
+def fun_l9_n759()
+ fun_l10_n441
+end
+
+def fun_l9_n760()
+ fun_l10_n686
+end
+
+def fun_l9_n761()
+ fun_l10_n55
+end
+
+def fun_l9_n762()
+ fun_l10_n852
+end
+
+def fun_l9_n763()
+ fun_l10_n102
+end
+
+def fun_l9_n764()
+ fun_l10_n207
+end
+
+def fun_l9_n765()
+ fun_l10_n269
+end
+
+def fun_l9_n766()
+ fun_l10_n422
+end
+
+def fun_l9_n767()
+ fun_l10_n589
+end
+
+def fun_l9_n768()
+ fun_l10_n406
+end
+
+def fun_l9_n769()
+ fun_l10_n88
+end
+
+def fun_l9_n770()
+ fun_l10_n441
+end
+
+def fun_l9_n771()
+ fun_l10_n506
+end
+
+def fun_l9_n772()
+ fun_l10_n797
+end
+
+def fun_l9_n773()
+ fun_l10_n639
+end
+
+def fun_l9_n774()
+ fun_l10_n390
+end
+
+def fun_l9_n775()
+ fun_l10_n511
+end
+
+def fun_l9_n776()
+ fun_l10_n353
+end
+
+def fun_l9_n777()
+ fun_l10_n137
+end
+
+def fun_l9_n778()
+ fun_l10_n692
+end
+
+def fun_l9_n779()
+ fun_l10_n522
+end
+
+def fun_l9_n780()
+ fun_l10_n532
+end
+
+def fun_l9_n781()
+ fun_l10_n4
+end
+
+def fun_l9_n782()
+ fun_l10_n548
+end
+
+def fun_l9_n783()
+ fun_l10_n386
+end
+
+def fun_l9_n784()
+ fun_l10_n932
+end
+
+def fun_l9_n785()
+ fun_l10_n552
+end
+
+def fun_l9_n786()
+ fun_l10_n215
+end
+
+def fun_l9_n787()
+ fun_l10_n981
+end
+
+def fun_l9_n788()
+ fun_l10_n379
+end
+
+def fun_l9_n789()
+ fun_l10_n208
+end
+
+def fun_l9_n790()
+ fun_l10_n252
+end
+
+def fun_l9_n791()
+ fun_l10_n471
+end
+
+def fun_l9_n792()
+ fun_l10_n300
+end
+
+def fun_l9_n793()
+ fun_l10_n877
+end
+
+def fun_l9_n794()
+ fun_l10_n92
+end
+
+def fun_l9_n795()
+ fun_l10_n75
+end
+
+def fun_l9_n796()
+ fun_l10_n837
+end
+
+def fun_l9_n797()
+ fun_l10_n328
+end
+
+def fun_l9_n798()
+ fun_l10_n454
+end
+
+def fun_l9_n799()
+ fun_l10_n392
+end
+
+def fun_l9_n800()
+ fun_l10_n115
+end
+
+def fun_l9_n801()
+ fun_l10_n966
+end
+
+def fun_l9_n802()
+ fun_l10_n565
+end
+
+def fun_l9_n803()
+ fun_l10_n268
+end
+
+def fun_l9_n804()
+ fun_l10_n13
+end
+
+def fun_l9_n805()
+ fun_l10_n484
+end
+
+def fun_l9_n806()
+ fun_l10_n893
+end
+
+def fun_l9_n807()
+ fun_l10_n59
+end
+
+def fun_l9_n808()
+ fun_l10_n87
+end
+
+def fun_l9_n809()
+ fun_l10_n455
+end
+
+def fun_l9_n810()
+ fun_l10_n972
+end
+
+def fun_l9_n811()
+ fun_l10_n804
+end
+
+def fun_l9_n812()
+ fun_l10_n20
+end
+
+def fun_l9_n813()
+ fun_l10_n148
+end
+
+def fun_l9_n814()
+ fun_l10_n284
+end
+
+def fun_l9_n815()
+ fun_l10_n704
+end
+
+def fun_l9_n816()
+ fun_l10_n346
+end
+
+def fun_l9_n817()
+ fun_l10_n101
+end
+
+def fun_l9_n818()
+ fun_l10_n543
+end
+
+def fun_l9_n819()
+ fun_l10_n207
+end
+
+def fun_l9_n820()
+ fun_l10_n256
+end
+
+def fun_l9_n821()
+ fun_l10_n300
+end
+
+def fun_l9_n822()
+ fun_l10_n69
+end
+
+def fun_l9_n823()
+ fun_l10_n139
+end
+
+def fun_l9_n824()
+ fun_l10_n566
+end
+
+def fun_l9_n825()
+ fun_l10_n277
+end
+
+def fun_l9_n826()
+ fun_l10_n75
+end
+
+def fun_l9_n827()
+ fun_l10_n585
+end
+
+def fun_l9_n828()
+ fun_l10_n2
+end
+
+def fun_l9_n829()
+ fun_l10_n959
+end
+
+def fun_l9_n830()
+ fun_l10_n982
+end
+
+def fun_l9_n831()
+ fun_l10_n621
+end
+
+def fun_l9_n832()
+ fun_l10_n680
+end
+
+def fun_l9_n833()
+ fun_l10_n535
+end
+
+def fun_l9_n834()
+ fun_l10_n732
+end
+
+def fun_l9_n835()
+ fun_l10_n282
+end
+
+def fun_l9_n836()
+ fun_l10_n825
+end
+
+def fun_l9_n837()
+ fun_l10_n323
+end
+
+def fun_l9_n838()
+ fun_l10_n963
+end
+
+def fun_l9_n839()
+ fun_l10_n138
+end
+
+def fun_l9_n840()
+ fun_l10_n370
+end
+
+def fun_l9_n841()
+ fun_l10_n44
+end
+
+def fun_l9_n842()
+ fun_l10_n694
+end
+
+def fun_l9_n843()
+ fun_l10_n532
+end
+
+def fun_l9_n844()
+ fun_l10_n987
+end
+
+def fun_l9_n845()
+ fun_l10_n730
+end
+
+def fun_l9_n846()
+ fun_l10_n376
+end
+
+def fun_l9_n847()
+ fun_l10_n33
+end
+
+def fun_l9_n848()
+ fun_l10_n381
+end
+
+def fun_l9_n849()
+ fun_l10_n569
+end
+
+def fun_l9_n850()
+ fun_l10_n264
+end
+
+def fun_l9_n851()
+ fun_l10_n260
+end
+
+def fun_l9_n852()
+ fun_l10_n750
+end
+
+def fun_l9_n853()
+ fun_l10_n710
+end
+
+def fun_l9_n854()
+ fun_l10_n665
+end
+
+def fun_l9_n855()
+ fun_l10_n544
+end
+
+def fun_l9_n856()
+ fun_l10_n306
+end
+
+def fun_l9_n857()
+ fun_l10_n303
+end
+
+def fun_l9_n858()
+ fun_l10_n754
+end
+
+def fun_l9_n859()
+ fun_l10_n552
+end
+
+def fun_l9_n860()
+ fun_l10_n404
+end
+
+def fun_l9_n861()
+ fun_l10_n123
+end
+
+def fun_l9_n862()
+ fun_l10_n240
+end
+
+def fun_l9_n863()
+ fun_l10_n213
+end
+
+def fun_l9_n864()
+ fun_l10_n697
+end
+
+def fun_l9_n865()
+ fun_l10_n185
+end
+
+def fun_l9_n866()
+ fun_l10_n245
+end
+
+def fun_l9_n867()
+ fun_l10_n889
+end
+
+def fun_l9_n868()
+ fun_l10_n64
+end
+
+def fun_l9_n869()
+ fun_l10_n685
+end
+
+def fun_l9_n870()
+ fun_l10_n653
+end
+
+def fun_l9_n871()
+ fun_l10_n331
+end
+
+def fun_l9_n872()
+ fun_l10_n548
+end
+
+def fun_l9_n873()
+ fun_l10_n120
+end
+
+def fun_l9_n874()
+ fun_l10_n511
+end
+
+def fun_l9_n875()
+ fun_l10_n280
+end
+
+def fun_l9_n876()
+ fun_l10_n250
+end
+
+def fun_l9_n877()
+ fun_l10_n871
+end
+
+def fun_l9_n878()
+ fun_l10_n356
+end
+
+def fun_l9_n879()
+ fun_l10_n985
+end
+
+def fun_l9_n880()
+ fun_l10_n285
+end
+
+def fun_l9_n881()
+ fun_l10_n836
+end
+
+def fun_l9_n882()
+ fun_l10_n906
+end
+
+def fun_l9_n883()
+ fun_l10_n497
+end
+
+def fun_l9_n884()
+ fun_l10_n320
+end
+
+def fun_l9_n885()
+ fun_l10_n932
+end
+
+def fun_l9_n886()
+ fun_l10_n470
+end
+
+def fun_l9_n887()
+ fun_l10_n453
+end
+
+def fun_l9_n888()
+ fun_l10_n208
+end
+
+def fun_l9_n889()
+ fun_l10_n80
+end
+
+def fun_l9_n890()
+ fun_l10_n943
+end
+
+def fun_l9_n891()
+ fun_l10_n711
+end
+
+def fun_l9_n892()
+ fun_l10_n548
+end
+
+def fun_l9_n893()
+ fun_l10_n160
+end
+
+def fun_l9_n894()
+ fun_l10_n44
+end
+
+def fun_l9_n895()
+ fun_l10_n241
+end
+
+def fun_l9_n896()
+ fun_l10_n390
+end
+
+def fun_l9_n897()
+ fun_l10_n133
+end
+
+def fun_l9_n898()
+ fun_l10_n3
+end
+
+def fun_l9_n899()
+ fun_l10_n651
+end
+
+def fun_l9_n900()
+ fun_l10_n556
+end
+
+def fun_l9_n901()
+ fun_l10_n423
+end
+
+def fun_l9_n902()
+ fun_l10_n521
+end
+
+def fun_l9_n903()
+ fun_l10_n589
+end
+
+def fun_l9_n904()
+ fun_l10_n284
+end
+
+def fun_l9_n905()
+ fun_l10_n816
+end
+
+def fun_l9_n906()
+ fun_l10_n326
+end
+
+def fun_l9_n907()
+ fun_l10_n309
+end
+
+def fun_l9_n908()
+ fun_l10_n656
+end
+
+def fun_l9_n909()
+ fun_l10_n636
+end
+
+def fun_l9_n910()
+ fun_l10_n633
+end
+
+def fun_l9_n911()
+ fun_l10_n955
+end
+
+def fun_l9_n912()
+ fun_l10_n807
+end
+
+def fun_l9_n913()
+ fun_l10_n547
+end
+
+def fun_l9_n914()
+ fun_l10_n300
+end
+
+def fun_l9_n915()
+ fun_l10_n98
+end
+
+def fun_l9_n916()
+ fun_l10_n848
+end
+
+def fun_l9_n917()
+ fun_l10_n702
+end
+
+def fun_l9_n918()
+ fun_l10_n102
+end
+
+def fun_l9_n919()
+ fun_l10_n184
+end
+
+def fun_l9_n920()
+ fun_l10_n91
+end
+
+def fun_l9_n921()
+ fun_l10_n744
+end
+
+def fun_l9_n922()
+ fun_l10_n923
+end
+
+def fun_l9_n923()
+ fun_l10_n710
+end
+
+def fun_l9_n924()
+ fun_l10_n137
+end
+
+def fun_l9_n925()
+ fun_l10_n381
+end
+
+def fun_l9_n926()
+ fun_l10_n795
+end
+
+def fun_l9_n927()
+ fun_l10_n255
+end
+
+def fun_l9_n928()
+ fun_l10_n191
+end
+
+def fun_l9_n929()
+ fun_l10_n650
+end
+
+def fun_l9_n930()
+ fun_l10_n928
+end
+
+def fun_l9_n931()
+ fun_l10_n277
+end
+
+def fun_l9_n932()
+ fun_l10_n269
+end
+
+def fun_l9_n933()
+ fun_l10_n221
+end
+
+def fun_l9_n934()
+ fun_l10_n2
+end
+
+def fun_l9_n935()
+ fun_l10_n359
+end
+
+def fun_l9_n936()
+ fun_l10_n403
+end
+
+def fun_l9_n937()
+ fun_l10_n376
+end
+
+def fun_l9_n938()
+ fun_l10_n309
+end
+
+def fun_l9_n939()
+ fun_l10_n245
+end
+
+def fun_l9_n940()
+ fun_l10_n973
+end
+
+def fun_l9_n941()
+ fun_l10_n835
+end
+
+def fun_l9_n942()
+ fun_l10_n884
+end
+
+def fun_l9_n943()
+ fun_l10_n700
+end
+
+def fun_l9_n944()
+ fun_l10_n809
+end
+
+def fun_l9_n945()
+ fun_l10_n864
+end
+
+def fun_l9_n946()
+ fun_l10_n577
+end
+
+def fun_l9_n947()
+ fun_l10_n487
+end
+
+def fun_l9_n948()
+ fun_l10_n205
+end
+
+def fun_l9_n949()
+ fun_l10_n980
+end
+
+def fun_l9_n950()
+ fun_l10_n855
+end
+
+def fun_l9_n951()
+ fun_l10_n100
+end
+
+def fun_l9_n952()
+ fun_l10_n514
+end
+
+def fun_l9_n953()
+ fun_l10_n385
+end
+
+def fun_l9_n954()
+ fun_l10_n676
+end
+
+def fun_l9_n955()
+ fun_l10_n808
+end
+
+def fun_l9_n956()
+ fun_l10_n111
+end
+
+def fun_l9_n957()
+ fun_l10_n571
+end
+
+def fun_l9_n958()
+ fun_l10_n895
+end
+
+def fun_l9_n959()
+ fun_l10_n858
+end
+
+def fun_l9_n960()
+ fun_l10_n74
+end
+
+def fun_l9_n961()
+ fun_l10_n952
+end
+
+def fun_l9_n962()
+ fun_l10_n164
+end
+
+def fun_l9_n963()
+ fun_l10_n149
+end
+
+def fun_l9_n964()
+ fun_l10_n705
+end
+
+def fun_l9_n965()
+ fun_l10_n406
+end
+
+def fun_l9_n966()
+ fun_l10_n569
+end
+
+def fun_l9_n967()
+ fun_l10_n57
+end
+
+def fun_l9_n968()
+ fun_l10_n402
+end
+
+def fun_l9_n969()
+ fun_l10_n988
+end
+
+def fun_l9_n970()
+ fun_l10_n114
+end
+
+def fun_l9_n971()
+ fun_l10_n456
+end
+
+def fun_l9_n972()
+ fun_l10_n346
+end
+
+def fun_l9_n973()
+ fun_l10_n250
+end
+
+def fun_l9_n974()
+ fun_l10_n684
+end
+
+def fun_l9_n975()
+ fun_l10_n445
+end
+
+def fun_l9_n976()
+ fun_l10_n628
+end
+
+def fun_l9_n977()
+ fun_l10_n536
+end
+
+def fun_l9_n978()
+ fun_l10_n937
+end
+
+def fun_l9_n979()
+ fun_l10_n320
+end
+
+def fun_l9_n980()
+ fun_l10_n412
+end
+
+def fun_l9_n981()
+ fun_l10_n280
+end
+
+def fun_l9_n982()
+ fun_l10_n435
+end
+
+def fun_l9_n983()
+ fun_l10_n643
+end
+
+def fun_l9_n984()
+ fun_l10_n702
+end
+
+def fun_l9_n985()
+ fun_l10_n919
+end
+
+def fun_l9_n986()
+ fun_l10_n127
+end
+
+def fun_l9_n987()
+ fun_l10_n770
+end
+
+def fun_l9_n988()
+ fun_l10_n673
+end
+
+def fun_l9_n989()
+ fun_l10_n625
+end
+
+def fun_l9_n990()
+ fun_l10_n196
+end
+
+def fun_l9_n991()
+ fun_l10_n676
+end
+
+def fun_l9_n992()
+ fun_l10_n634
+end
+
+def fun_l9_n993()
+ fun_l10_n694
+end
+
+def fun_l9_n994()
+ fun_l10_n46
+end
+
+def fun_l9_n995()
+ fun_l10_n762
+end
+
+def fun_l9_n996()
+ fun_l10_n163
+end
+
+def fun_l9_n997()
+ fun_l10_n24
+end
+
+def fun_l9_n998()
+ fun_l10_n279
+end
+
+def fun_l9_n999()
+ fun_l10_n110
+end
+
+def fun_l10_n0()
+ fun_l11_n375
+end
+
+def fun_l10_n1()
+ fun_l11_n360
+end
+
+def fun_l10_n2()
+ fun_l11_n220
+end
+
+def fun_l10_n3()
+ fun_l11_n847
+end
+
+def fun_l10_n4()
+ fun_l11_n431
+end
+
+def fun_l10_n5()
+ fun_l11_n609
+end
+
+def fun_l10_n6()
+ fun_l11_n584
+end
+
+def fun_l10_n7()
+ fun_l11_n41
+end
+
+def fun_l10_n8()
+ fun_l11_n259
+end
+
+def fun_l10_n9()
+ fun_l11_n885
+end
+
+def fun_l10_n10()
+ fun_l11_n353
+end
+
+def fun_l10_n11()
+ fun_l11_n675
+end
+
+def fun_l10_n12()
+ fun_l11_n208
+end
+
+def fun_l10_n13()
+ fun_l11_n66
+end
+
+def fun_l10_n14()
+ fun_l11_n420
+end
+
+def fun_l10_n15()
+ fun_l11_n987
+end
+
+def fun_l10_n16()
+ fun_l11_n703
+end
+
+def fun_l10_n17()
+ fun_l11_n755
+end
+
+def fun_l10_n18()
+ fun_l11_n996
+end
+
+def fun_l10_n19()
+ fun_l11_n189
+end
+
+def fun_l10_n20()
+ fun_l11_n950
+end
+
+def fun_l10_n21()
+ fun_l11_n602
+end
+
+def fun_l10_n22()
+ fun_l11_n971
+end
+
+def fun_l10_n23()
+ fun_l11_n797
+end
+
+def fun_l10_n24()
+ fun_l11_n950
+end
+
+def fun_l10_n25()
+ fun_l11_n606
+end
+
+def fun_l10_n26()
+ fun_l11_n201
+end
+
+def fun_l10_n27()
+ fun_l11_n844
+end
+
+def fun_l10_n28()
+ fun_l11_n546
+end
+
+def fun_l10_n29()
+ fun_l11_n448
+end
+
+def fun_l10_n30()
+ fun_l11_n717
+end
+
+def fun_l10_n31()
+ fun_l11_n236
+end
+
+def fun_l10_n32()
+ fun_l11_n49
+end
+
+def fun_l10_n33()
+ fun_l11_n930
+end
+
+def fun_l10_n34()
+ fun_l11_n818
+end
+
+def fun_l10_n35()
+ fun_l11_n795
+end
+
+def fun_l10_n36()
+ fun_l11_n933
+end
+
+def fun_l10_n37()
+ fun_l11_n198
+end
+
+def fun_l10_n38()
+ fun_l11_n666
+end
+
+def fun_l10_n39()
+ fun_l11_n998
+end
+
+def fun_l10_n40()
+ fun_l11_n570
+end
+
+def fun_l10_n41()
+ fun_l11_n759
+end
+
+def fun_l10_n42()
+ fun_l11_n306
+end
+
+def fun_l10_n43()
+ fun_l11_n735
+end
+
+def fun_l10_n44()
+ fun_l11_n730
+end
+
+def fun_l10_n45()
+ fun_l11_n429
+end
+
+def fun_l10_n46()
+ fun_l11_n239
+end
+
+def fun_l10_n47()
+ fun_l11_n877
+end
+
+def fun_l10_n48()
+ fun_l11_n615
+end
+
+def fun_l10_n49()
+ fun_l11_n462
+end
+
+def fun_l10_n50()
+ fun_l11_n187
+end
+
+def fun_l10_n51()
+ fun_l11_n584
+end
+
+def fun_l10_n52()
+ fun_l11_n565
+end
+
+def fun_l10_n53()
+ fun_l11_n53
+end
+
+def fun_l10_n54()
+ fun_l11_n69
+end
+
+def fun_l10_n55()
+ fun_l11_n594
+end
+
+def fun_l10_n56()
+ fun_l11_n307
+end
+
+def fun_l10_n57()
+ fun_l11_n913
+end
+
+def fun_l10_n58()
+ fun_l11_n814
+end
+
+def fun_l10_n59()
+ fun_l11_n764
+end
+
+def fun_l10_n60()
+ fun_l11_n367
+end
+
+def fun_l10_n61()
+ fun_l11_n335
+end
+
+def fun_l10_n62()
+ fun_l11_n166
+end
+
+def fun_l10_n63()
+ fun_l11_n348
+end
+
+def fun_l10_n64()
+ fun_l11_n175
+end
+
+def fun_l10_n65()
+ fun_l11_n685
+end
+
+def fun_l10_n66()
+ fun_l11_n804
+end
+
+def fun_l10_n67()
+ fun_l11_n857
+end
+
+def fun_l10_n68()
+ fun_l11_n361
+end
+
+def fun_l10_n69()
+ fun_l11_n744
+end
+
+def fun_l10_n70()
+ fun_l11_n902
+end
+
+def fun_l10_n71()
+ fun_l11_n142
+end
+
+def fun_l10_n72()
+ fun_l11_n129
+end
+
+def fun_l10_n73()
+ fun_l11_n597
+end
+
+def fun_l10_n74()
+ fun_l11_n416
+end
+
+def fun_l10_n75()
+ fun_l11_n983
+end
+
+def fun_l10_n76()
+ fun_l11_n504
+end
+
+def fun_l10_n77()
+ fun_l11_n887
+end
+
+def fun_l10_n78()
+ fun_l11_n114
+end
+
+def fun_l10_n79()
+ fun_l11_n292
+end
+
+def fun_l10_n80()
+ fun_l11_n635
+end
+
+def fun_l10_n81()
+ fun_l11_n910
+end
+
+def fun_l10_n82()
+ fun_l11_n82
+end
+
+def fun_l10_n83()
+ fun_l11_n149
+end
+
+def fun_l10_n84()
+ fun_l11_n240
+end
+
+def fun_l10_n85()
+ fun_l11_n349
+end
+
+def fun_l10_n86()
+ fun_l11_n873
+end
+
+def fun_l10_n87()
+ fun_l11_n269
+end
+
+def fun_l10_n88()
+ fun_l11_n81
+end
+
+def fun_l10_n89()
+ fun_l11_n735
+end
+
+def fun_l10_n90()
+ fun_l11_n21
+end
+
+def fun_l10_n91()
+ fun_l11_n491
+end
+
+def fun_l10_n92()
+ fun_l11_n808
+end
+
+def fun_l10_n93()
+ fun_l11_n628
+end
+
+def fun_l10_n94()
+ fun_l11_n456
+end
+
+def fun_l10_n95()
+ fun_l11_n982
+end
+
+def fun_l10_n96()
+ fun_l11_n440
+end
+
+def fun_l10_n97()
+ fun_l11_n406
+end
+
+def fun_l10_n98()
+ fun_l11_n920
+end
+
+def fun_l10_n99()
+ fun_l11_n155
+end
+
+def fun_l10_n100()
+ fun_l11_n673
+end
+
+def fun_l10_n101()
+ fun_l11_n902
+end
+
+def fun_l10_n102()
+ fun_l11_n321
+end
+
+def fun_l10_n103()
+ fun_l11_n723
+end
+
+def fun_l10_n104()
+ fun_l11_n914
+end
+
+def fun_l10_n105()
+ fun_l11_n305
+end
+
+def fun_l10_n106()
+ fun_l11_n16
+end
+
+def fun_l10_n107()
+ fun_l11_n342
+end
+
+def fun_l10_n108()
+ fun_l11_n808
+end
+
+def fun_l10_n109()
+ fun_l11_n593
+end
+
+def fun_l10_n110()
+ fun_l11_n912
+end
+
+def fun_l10_n111()
+ fun_l11_n373
+end
+
+def fun_l10_n112()
+ fun_l11_n491
+end
+
+def fun_l10_n113()
+ fun_l11_n893
+end
+
+def fun_l10_n114()
+ fun_l11_n776
+end
+
+def fun_l10_n115()
+ fun_l11_n932
+end
+
+def fun_l10_n116()
+ fun_l11_n347
+end
+
+def fun_l10_n117()
+ fun_l11_n475
+end
+
+def fun_l10_n118()
+ fun_l11_n656
+end
+
+def fun_l10_n119()
+ fun_l11_n199
+end
+
+def fun_l10_n120()
+ fun_l11_n888
+end
+
+def fun_l10_n121()
+ fun_l11_n110
+end
+
+def fun_l10_n122()
+ fun_l11_n520
+end
+
+def fun_l10_n123()
+ fun_l11_n743
+end
+
+def fun_l10_n124()
+ fun_l11_n830
+end
+
+def fun_l10_n125()
+ fun_l11_n740
+end
+
+def fun_l10_n126()
+ fun_l11_n693
+end
+
+def fun_l10_n127()
+ fun_l11_n500
+end
+
+def fun_l10_n128()
+ fun_l11_n311
+end
+
+def fun_l10_n129()
+ fun_l11_n842
+end
+
+def fun_l10_n130()
+ fun_l11_n769
+end
+
+def fun_l10_n131()
+ fun_l11_n341
+end
+
+def fun_l10_n132()
+ fun_l11_n367
+end
+
+def fun_l10_n133()
+ fun_l11_n872
+end
+
+def fun_l10_n134()
+ fun_l11_n460
+end
+
+def fun_l10_n135()
+ fun_l11_n154
+end
+
+def fun_l10_n136()
+ fun_l11_n953
+end
+
+def fun_l10_n137()
+ fun_l11_n300
+end
+
+def fun_l10_n138()
+ fun_l11_n466
+end
+
+def fun_l10_n139()
+ fun_l11_n474
+end
+
+def fun_l10_n140()
+ fun_l11_n145
+end
+
+def fun_l10_n141()
+ fun_l11_n953
+end
+
+def fun_l10_n142()
+ fun_l11_n613
+end
+
+def fun_l10_n143()
+ fun_l11_n55
+end
+
+def fun_l10_n144()
+ fun_l11_n847
+end
+
+def fun_l10_n145()
+ fun_l11_n888
+end
+
+def fun_l10_n146()
+ fun_l11_n721
+end
+
+def fun_l10_n147()
+ fun_l11_n8
+end
+
+def fun_l10_n148()
+ fun_l11_n595
+end
+
+def fun_l10_n149()
+ fun_l11_n326
+end
+
+def fun_l10_n150()
+ fun_l11_n134
+end
+
+def fun_l10_n151()
+ fun_l11_n567
+end
+
+def fun_l10_n152()
+ fun_l11_n87
+end
+
+def fun_l10_n153()
+ fun_l11_n581
+end
+
+def fun_l10_n154()
+ fun_l11_n973
+end
+
+def fun_l10_n155()
+ fun_l11_n349
+end
+
+def fun_l10_n156()
+ fun_l11_n550
+end
+
+def fun_l10_n157()
+ fun_l11_n545
+end
+
+def fun_l10_n158()
+ fun_l11_n325
+end
+
+def fun_l10_n159()
+ fun_l11_n568
+end
+
+def fun_l10_n160()
+ fun_l11_n768
+end
+
+def fun_l10_n161()
+ fun_l11_n320
+end
+
+def fun_l10_n162()
+ fun_l11_n667
+end
+
+def fun_l10_n163()
+ fun_l11_n415
+end
+
+def fun_l10_n164()
+ fun_l11_n185
+end
+
+def fun_l10_n165()
+ fun_l11_n576
+end
+
+def fun_l10_n166()
+ fun_l11_n436
+end
+
+def fun_l10_n167()
+ fun_l11_n290
+end
+
+def fun_l10_n168()
+ fun_l11_n783
+end
+
+def fun_l10_n169()
+ fun_l11_n865
+end
+
+def fun_l10_n170()
+ fun_l11_n837
+end
+
+def fun_l10_n171()
+ fun_l11_n806
+end
+
+def fun_l10_n172()
+ fun_l11_n847
+end
+
+def fun_l10_n173()
+ fun_l11_n425
+end
+
+def fun_l10_n174()
+ fun_l11_n740
+end
+
+def fun_l10_n175()
+ fun_l11_n885
+end
+
+def fun_l10_n176()
+ fun_l11_n787
+end
+
+def fun_l10_n177()
+ fun_l11_n189
+end
+
+def fun_l10_n178()
+ fun_l11_n122
+end
+
+def fun_l10_n179()
+ fun_l11_n132
+end
+
+def fun_l10_n180()
+ fun_l11_n778
+end
+
+def fun_l10_n181()
+ fun_l11_n45
+end
+
+def fun_l10_n182()
+ fun_l11_n856
+end
+
+def fun_l10_n183()
+ fun_l11_n853
+end
+
+def fun_l10_n184()
+ fun_l11_n370
+end
+
+def fun_l10_n185()
+ fun_l11_n850
+end
+
+def fun_l10_n186()
+ fun_l11_n623
+end
+
+def fun_l10_n187()
+ fun_l11_n747
+end
+
+def fun_l10_n188()
+ fun_l11_n792
+end
+
+def fun_l10_n189()
+ fun_l11_n184
+end
+
+def fun_l10_n190()
+ fun_l11_n683
+end
+
+def fun_l10_n191()
+ fun_l11_n831
+end
+
+def fun_l10_n192()
+ fun_l11_n741
+end
+
+def fun_l10_n193()
+ fun_l11_n380
+end
+
+def fun_l10_n194()
+ fun_l11_n183
+end
+
+def fun_l10_n195()
+ fun_l11_n800
+end
+
+def fun_l10_n196()
+ fun_l11_n466
+end
+
+def fun_l10_n197()
+ fun_l11_n930
+end
+
+def fun_l10_n198()
+ fun_l11_n680
+end
+
+def fun_l10_n199()
+ fun_l11_n820
+end
+
+def fun_l10_n200()
+ fun_l11_n699
+end
+
+def fun_l10_n201()
+ fun_l11_n246
+end
+
+def fun_l10_n202()
+ fun_l11_n238
+end
+
+def fun_l10_n203()
+ fun_l11_n481
+end
+
+def fun_l10_n204()
+ fun_l11_n586
+end
+
+def fun_l10_n205()
+ fun_l11_n550
+end
+
+def fun_l10_n206()
+ fun_l11_n662
+end
+
+def fun_l10_n207()
+ fun_l11_n680
+end
+
+def fun_l10_n208()
+ fun_l11_n544
+end
+
+def fun_l10_n209()
+ fun_l11_n927
+end
+
+def fun_l10_n210()
+ fun_l11_n383
+end
+
+def fun_l10_n211()
+ fun_l11_n21
+end
+
+def fun_l10_n212()
+ fun_l11_n628
+end
+
+def fun_l10_n213()
+ fun_l11_n635
+end
+
+def fun_l10_n214()
+ fun_l11_n648
+end
+
+def fun_l10_n215()
+ fun_l11_n349
+end
+
+def fun_l10_n216()
+ fun_l11_n242
+end
+
+def fun_l10_n217()
+ fun_l11_n868
+end
+
+def fun_l10_n218()
+ fun_l11_n804
+end
+
+def fun_l10_n219()
+ fun_l11_n84
+end
+
+def fun_l10_n220()
+ fun_l11_n970
+end
+
+def fun_l10_n221()
+ fun_l11_n400
+end
+
+def fun_l10_n222()
+ fun_l11_n133
+end
+
+def fun_l10_n223()
+ fun_l11_n58
+end
+
+def fun_l10_n224()
+ fun_l11_n790
+end
+
+def fun_l10_n225()
+ fun_l11_n738
+end
+
+def fun_l10_n226()
+ fun_l11_n682
+end
+
+def fun_l10_n227()
+ fun_l11_n822
+end
+
+def fun_l10_n228()
+ fun_l11_n630
+end
+
+def fun_l10_n229()
+ fun_l11_n399
+end
+
+def fun_l10_n230()
+ fun_l11_n177
+end
+
+def fun_l10_n231()
+ fun_l11_n531
+end
+
+def fun_l10_n232()
+ fun_l11_n671
+end
+
+def fun_l10_n233()
+ fun_l11_n34
+end
+
+def fun_l10_n234()
+ fun_l11_n305
+end
+
+def fun_l10_n235()
+ fun_l11_n410
+end
+
+def fun_l10_n236()
+ fun_l11_n72
+end
+
+def fun_l10_n237()
+ fun_l11_n236
+end
+
+def fun_l10_n238()
+ fun_l11_n135
+end
+
+def fun_l10_n239()
+ fun_l11_n718
+end
+
+def fun_l10_n240()
+ fun_l11_n453
+end
+
+def fun_l10_n241()
+ fun_l11_n965
+end
+
+def fun_l10_n242()
+ fun_l11_n919
+end
+
+def fun_l10_n243()
+ fun_l11_n56
+end
+
+def fun_l10_n244()
+ fun_l11_n853
+end
+
+def fun_l10_n245()
+ fun_l11_n719
+end
+
+def fun_l10_n246()
+ fun_l11_n45
+end
+
+def fun_l10_n247()
+ fun_l11_n344
+end
+
+def fun_l10_n248()
+ fun_l11_n907
+end
+
+def fun_l10_n249()
+ fun_l11_n340
+end
+
+def fun_l10_n250()
+ fun_l11_n625
+end
+
+def fun_l10_n251()
+ fun_l11_n274
+end
+
+def fun_l10_n252()
+ fun_l11_n392
+end
+
+def fun_l10_n253()
+ fun_l11_n15
+end
+
+def fun_l10_n254()
+ fun_l11_n474
+end
+
+def fun_l10_n255()
+ fun_l11_n792
+end
+
+def fun_l10_n256()
+ fun_l11_n580
+end
+
+def fun_l10_n257()
+ fun_l11_n375
+end
+
+def fun_l10_n258()
+ fun_l11_n169
+end
+
+def fun_l10_n259()
+ fun_l11_n792
+end
+
+def fun_l10_n260()
+ fun_l11_n553
+end
+
+def fun_l10_n261()
+ fun_l11_n919
+end
+
+def fun_l10_n262()
+ fun_l11_n814
+end
+
+def fun_l10_n263()
+ fun_l11_n845
+end
+
+def fun_l10_n264()
+ fun_l11_n337
+end
+
+def fun_l10_n265()
+ fun_l11_n362
+end
+
+def fun_l10_n266()
+ fun_l11_n400
+end
+
+def fun_l10_n267()
+ fun_l11_n335
+end
+
+def fun_l10_n268()
+ fun_l11_n142
+end
+
+def fun_l10_n269()
+ fun_l11_n262
+end
+
+def fun_l10_n270()
+ fun_l11_n969
+end
+
+def fun_l10_n271()
+ fun_l11_n599
+end
+
+def fun_l10_n272()
+ fun_l11_n763
+end
+
+def fun_l10_n273()
+ fun_l11_n154
+end
+
+def fun_l10_n274()
+ fun_l11_n289
+end
+
+def fun_l10_n275()
+ fun_l11_n852
+end
+
+def fun_l10_n276()
+ fun_l11_n994
+end
+
+def fun_l10_n277()
+ fun_l11_n583
+end
+
+def fun_l10_n278()
+ fun_l11_n580
+end
+
+def fun_l10_n279()
+ fun_l11_n610
+end
+
+def fun_l10_n280()
+ fun_l11_n624
+end
+
+def fun_l10_n281()
+ fun_l11_n987
+end
+
+def fun_l10_n282()
+ fun_l11_n973
+end
+
+def fun_l10_n283()
+ fun_l11_n128
+end
+
+def fun_l10_n284()
+ fun_l11_n864
+end
+
+def fun_l10_n285()
+ fun_l11_n270
+end
+
+def fun_l10_n286()
+ fun_l11_n878
+end
+
+def fun_l10_n287()
+ fun_l11_n242
+end
+
+def fun_l10_n288()
+ fun_l11_n214
+end
+
+def fun_l10_n289()
+ fun_l11_n51
+end
+
+def fun_l10_n290()
+ fun_l11_n122
+end
+
+def fun_l10_n291()
+ fun_l11_n288
+end
+
+def fun_l10_n292()
+ fun_l11_n751
+end
+
+def fun_l10_n293()
+ fun_l11_n723
+end
+
+def fun_l10_n294()
+ fun_l11_n884
+end
+
+def fun_l10_n295()
+ fun_l11_n671
+end
+
+def fun_l10_n296()
+ fun_l11_n949
+end
+
+def fun_l10_n297()
+ fun_l11_n859
+end
+
+def fun_l10_n298()
+ fun_l11_n293
+end
+
+def fun_l10_n299()
+ fun_l11_n548
+end
+
+def fun_l10_n300()
+ fun_l11_n659
+end
+
+def fun_l10_n301()
+ fun_l11_n434
+end
+
+def fun_l10_n302()
+ fun_l11_n251
+end
+
+def fun_l10_n303()
+ fun_l11_n225
+end
+
+def fun_l10_n304()
+ fun_l11_n242
+end
+
+def fun_l10_n305()
+ fun_l11_n401
+end
+
+def fun_l10_n306()
+ fun_l11_n603
+end
+
+def fun_l10_n307()
+ fun_l11_n926
+end
+
+def fun_l10_n308()
+ fun_l11_n922
+end
+
+def fun_l10_n309()
+ fun_l11_n27
+end
+
+def fun_l10_n310()
+ fun_l11_n834
+end
+
+def fun_l10_n311()
+ fun_l11_n119
+end
+
+def fun_l10_n312()
+ fun_l11_n391
+end
+
+def fun_l10_n313()
+ fun_l11_n768
+end
+
+def fun_l10_n314()
+ fun_l11_n147
+end
+
+def fun_l10_n315()
+ fun_l11_n472
+end
+
+def fun_l10_n316()
+ fun_l11_n107
+end
+
+def fun_l10_n317()
+ fun_l11_n682
+end
+
+def fun_l10_n318()
+ fun_l11_n670
+end
+
+def fun_l10_n319()
+ fun_l11_n827
+end
+
+def fun_l10_n320()
+ fun_l11_n812
+end
+
+def fun_l10_n321()
+ fun_l11_n737
+end
+
+def fun_l10_n322()
+ fun_l11_n446
+end
+
+def fun_l10_n323()
+ fun_l11_n312
+end
+
+def fun_l10_n324()
+ fun_l11_n697
+end
+
+def fun_l10_n325()
+ fun_l11_n785
+end
+
+def fun_l10_n326()
+ fun_l11_n379
+end
+
+def fun_l10_n327()
+ fun_l11_n994
+end
+
+def fun_l10_n328()
+ fun_l11_n651
+end
+
+def fun_l10_n329()
+ fun_l11_n896
+end
+
+def fun_l10_n330()
+ fun_l11_n289
+end
+
+def fun_l10_n331()
+ fun_l11_n217
+end
+
+def fun_l10_n332()
+ fun_l11_n502
+end
+
+def fun_l10_n333()
+ fun_l11_n24
+end
+
+def fun_l10_n334()
+ fun_l11_n187
+end
+
+def fun_l10_n335()
+ fun_l11_n301
+end
+
+def fun_l10_n336()
+ fun_l11_n640
+end
+
+def fun_l10_n337()
+ fun_l11_n90
+end
+
+def fun_l10_n338()
+ fun_l11_n226
+end
+
+def fun_l10_n339()
+ fun_l11_n192
+end
+
+def fun_l10_n340()
+ fun_l11_n737
+end
+
+def fun_l10_n341()
+ fun_l11_n197
+end
+
+def fun_l10_n342()
+ fun_l11_n859
+end
+
+def fun_l10_n343()
+ fun_l11_n406
+end
+
+def fun_l10_n344()
+ fun_l11_n179
+end
+
+def fun_l10_n345()
+ fun_l11_n535
+end
+
+def fun_l10_n346()
+ fun_l11_n330
+end
+
+def fun_l10_n347()
+ fun_l11_n117
+end
+
+def fun_l10_n348()
+ fun_l11_n399
+end
+
+def fun_l10_n349()
+ fun_l11_n129
+end
+
+def fun_l10_n350()
+ fun_l11_n295
+end
+
+def fun_l10_n351()
+ fun_l11_n226
+end
+
+def fun_l10_n352()
+ fun_l11_n551
+end
+
+def fun_l10_n353()
+ fun_l11_n394
+end
+
+def fun_l10_n354()
+ fun_l11_n120
+end
+
+def fun_l10_n355()
+ fun_l11_n713
+end
+
+def fun_l10_n356()
+ fun_l11_n873
+end
+
+def fun_l10_n357()
+ fun_l11_n841
+end
+
+def fun_l10_n358()
+ fun_l11_n708
+end
+
+def fun_l10_n359()
+ fun_l11_n351
+end
+
+def fun_l10_n360()
+ fun_l11_n753
+end
+
+def fun_l10_n361()
+ fun_l11_n397
+end
+
+def fun_l10_n362()
+ fun_l11_n986
+end
+
+def fun_l10_n363()
+ fun_l11_n544
+end
+
+def fun_l10_n364()
+ fun_l11_n476
+end
+
+def fun_l10_n365()
+ fun_l11_n596
+end
+
+def fun_l10_n366()
+ fun_l11_n922
+end
+
+def fun_l10_n367()
+ fun_l11_n137
+end
+
+def fun_l10_n368()
+ fun_l11_n87
+end
+
+def fun_l10_n369()
+ fun_l11_n537
+end
+
+def fun_l10_n370()
+ fun_l11_n678
+end
+
+def fun_l10_n371()
+ fun_l11_n729
+end
+
+def fun_l10_n372()
+ fun_l11_n286
+end
+
+def fun_l10_n373()
+ fun_l11_n831
+end
+
+def fun_l10_n374()
+ fun_l11_n130
+end
+
+def fun_l10_n375()
+ fun_l11_n853
+end
+
+def fun_l10_n376()
+ fun_l11_n876
+end
+
+def fun_l10_n377()
+ fun_l11_n291
+end
+
+def fun_l10_n378()
+ fun_l11_n823
+end
+
+def fun_l10_n379()
+ fun_l11_n66
+end
+
+def fun_l10_n380()
+ fun_l11_n460
+end
+
+def fun_l10_n381()
+ fun_l11_n261
+end
+
+def fun_l10_n382()
+ fun_l11_n632
+end
+
+def fun_l10_n383()
+ fun_l11_n341
+end
+
+def fun_l10_n384()
+ fun_l11_n158
+end
+
+def fun_l10_n385()
+ fun_l11_n105
+end
+
+def fun_l10_n386()
+ fun_l11_n735
+end
+
+def fun_l10_n387()
+ fun_l11_n659
+end
+
+def fun_l10_n388()
+ fun_l11_n232
+end
+
+def fun_l10_n389()
+ fun_l11_n909
+end
+
+def fun_l10_n390()
+ fun_l11_n594
+end
+
+def fun_l10_n391()
+ fun_l11_n347
+end
+
+def fun_l10_n392()
+ fun_l11_n650
+end
+
+def fun_l10_n393()
+ fun_l11_n652
+end
+
+def fun_l10_n394()
+ fun_l11_n129
+end
+
+def fun_l10_n395()
+ fun_l11_n791
+end
+
+def fun_l10_n396()
+ fun_l11_n933
+end
+
+def fun_l10_n397()
+ fun_l11_n903
+end
+
+def fun_l10_n398()
+ fun_l11_n301
+end
+
+def fun_l10_n399()
+ fun_l11_n102
+end
+
+def fun_l10_n400()
+ fun_l11_n865
+end
+
+def fun_l10_n401()
+ fun_l11_n112
+end
+
+def fun_l10_n402()
+ fun_l11_n242
+end
+
+def fun_l10_n403()
+ fun_l11_n928
+end
+
+def fun_l10_n404()
+ fun_l11_n289
+end
+
+def fun_l10_n405()
+ fun_l11_n435
+end
+
+def fun_l10_n406()
+ fun_l11_n303
+end
+
+def fun_l10_n407()
+ fun_l11_n979
+end
+
+def fun_l10_n408()
+ fun_l11_n785
+end
+
+def fun_l10_n409()
+ fun_l11_n241
+end
+
+def fun_l10_n410()
+ fun_l11_n32
+end
+
+def fun_l10_n411()
+ fun_l11_n821
+end
+
+def fun_l10_n412()
+ fun_l11_n748
+end
+
+def fun_l10_n413()
+ fun_l11_n454
+end
+
+def fun_l10_n414()
+ fun_l11_n555
+end
+
+def fun_l10_n415()
+ fun_l11_n136
+end
+
+def fun_l10_n416()
+ fun_l11_n996
+end
+
+def fun_l10_n417()
+ fun_l11_n987
+end
+
+def fun_l10_n418()
+ fun_l11_n987
+end
+
+def fun_l10_n419()
+ fun_l11_n817
+end
+
+def fun_l10_n420()
+ fun_l11_n674
+end
+
+def fun_l10_n421()
+ fun_l11_n57
+end
+
+def fun_l10_n422()
+ fun_l11_n43
+end
+
+def fun_l10_n423()
+ fun_l11_n767
+end
+
+def fun_l10_n424()
+ fun_l11_n924
+end
+
+def fun_l10_n425()
+ fun_l11_n63
+end
+
+def fun_l10_n426()
+ fun_l11_n636
+end
+
+def fun_l10_n427()
+ fun_l11_n824
+end
+
+def fun_l10_n428()
+ fun_l11_n266
+end
+
+def fun_l10_n429()
+ fun_l11_n540
+end
+
+def fun_l10_n430()
+ fun_l11_n992
+end
+
+def fun_l10_n431()
+ fun_l11_n215
+end
+
+def fun_l10_n432()
+ fun_l11_n28
+end
+
+def fun_l10_n433()
+ fun_l11_n37
+end
+
+def fun_l10_n434()
+ fun_l11_n38
+end
+
+def fun_l10_n435()
+ fun_l11_n937
+end
+
+def fun_l10_n436()
+ fun_l11_n419
+end
+
+def fun_l10_n437()
+ fun_l11_n390
+end
+
+def fun_l10_n438()
+ fun_l11_n987
+end
+
+def fun_l10_n439()
+ fun_l11_n742
+end
+
+def fun_l10_n440()
+ fun_l11_n173
+end
+
+def fun_l10_n441()
+ fun_l11_n640
+end
+
+def fun_l10_n442()
+ fun_l11_n111
+end
+
+def fun_l10_n443()
+ fun_l11_n492
+end
+
+def fun_l10_n444()
+ fun_l11_n659
+end
+
+def fun_l10_n445()
+ fun_l11_n863
+end
+
+def fun_l10_n446()
+ fun_l11_n938
+end
+
+def fun_l10_n447()
+ fun_l11_n54
+end
+
+def fun_l10_n448()
+ fun_l11_n224
+end
+
+def fun_l10_n449()
+ fun_l11_n863
+end
+
+def fun_l10_n450()
+ fun_l11_n80
+end
+
+def fun_l10_n451()
+ fun_l11_n791
+end
+
+def fun_l10_n452()
+ fun_l11_n93
+end
+
+def fun_l10_n453()
+ fun_l11_n416
+end
+
+def fun_l10_n454()
+ fun_l11_n610
+end
+
+def fun_l10_n455()
+ fun_l11_n455
+end
+
+def fun_l10_n456()
+ fun_l11_n834
+end
+
+def fun_l10_n457()
+ fun_l11_n462
+end
+
+def fun_l10_n458()
+ fun_l11_n69
+end
+
+def fun_l10_n459()
+ fun_l11_n174
+end
+
+def fun_l10_n460()
+ fun_l11_n657
+end
+
+def fun_l10_n461()
+ fun_l11_n608
+end
+
+def fun_l10_n462()
+ fun_l11_n248
+end
+
+def fun_l10_n463()
+ fun_l11_n492
+end
+
+def fun_l10_n464()
+ fun_l11_n125
+end
+
+def fun_l10_n465()
+ fun_l11_n737
+end
+
+def fun_l10_n466()
+ fun_l11_n354
+end
+
+def fun_l10_n467()
+ fun_l11_n890
+end
+
+def fun_l10_n468()
+ fun_l11_n753
+end
+
+def fun_l10_n469()
+ fun_l11_n380
+end
+
+def fun_l10_n470()
+ fun_l11_n428
+end
+
+def fun_l10_n471()
+ fun_l11_n243
+end
+
+def fun_l10_n472()
+ fun_l11_n532
+end
+
+def fun_l10_n473()
+ fun_l11_n328
+end
+
+def fun_l10_n474()
+ fun_l11_n922
+end
+
+def fun_l10_n475()
+ fun_l11_n115
+end
+
+def fun_l10_n476()
+ fun_l11_n705
+end
+
+def fun_l10_n477()
+ fun_l11_n457
+end
+
+def fun_l10_n478()
+ fun_l11_n201
+end
+
+def fun_l10_n479()
+ fun_l11_n801
+end
+
+def fun_l10_n480()
+ fun_l11_n492
+end
+
+def fun_l10_n481()
+ fun_l11_n148
+end
+
+def fun_l10_n482()
+ fun_l11_n802
+end
+
+def fun_l10_n483()
+ fun_l11_n725
+end
+
+def fun_l10_n484()
+ fun_l11_n835
+end
+
+def fun_l10_n485()
+ fun_l11_n564
+end
+
+def fun_l10_n486()
+ fun_l11_n803
+end
+
+def fun_l10_n487()
+ fun_l11_n696
+end
+
+def fun_l10_n488()
+ fun_l11_n171
+end
+
+def fun_l10_n489()
+ fun_l11_n759
+end
+
+def fun_l10_n490()
+ fun_l11_n728
+end
+
+def fun_l10_n491()
+ fun_l11_n64
+end
+
+def fun_l10_n492()
+ fun_l11_n717
+end
+
+def fun_l10_n493()
+ fun_l11_n97
+end
+
+def fun_l10_n494()
+ fun_l11_n157
+end
+
+def fun_l10_n495()
+ fun_l11_n589
+end
+
+def fun_l10_n496()
+ fun_l11_n642
+end
+
+def fun_l10_n497()
+ fun_l11_n994
+end
+
+def fun_l10_n498()
+ fun_l11_n566
+end
+
+def fun_l10_n499()
+ fun_l11_n325
+end
+
+def fun_l10_n500()
+ fun_l11_n905
+end
+
+def fun_l10_n501()
+ fun_l11_n242
+end
+
+def fun_l10_n502()
+ fun_l11_n135
+end
+
+def fun_l10_n503()
+ fun_l11_n476
+end
+
+def fun_l10_n504()
+ fun_l11_n63
+end
+
+def fun_l10_n505()
+ fun_l11_n908
+end
+
+def fun_l10_n506()
+ fun_l11_n51
+end
+
+def fun_l10_n507()
+ fun_l11_n261
+end
+
+def fun_l10_n508()
+ fun_l11_n680
+end
+
+def fun_l10_n509()
+ fun_l11_n346
+end
+
+def fun_l10_n510()
+ fun_l11_n490
+end
+
+def fun_l10_n511()
+ fun_l11_n896
+end
+
+def fun_l10_n512()
+ fun_l11_n788
+end
+
+def fun_l10_n513()
+ fun_l11_n672
+end
+
+def fun_l10_n514()
+ fun_l11_n17
+end
+
+def fun_l10_n515()
+ fun_l11_n744
+end
+
+def fun_l10_n516()
+ fun_l11_n90
+end
+
+def fun_l10_n517()
+ fun_l11_n451
+end
+
+def fun_l10_n518()
+ fun_l11_n942
+end
+
+def fun_l10_n519()
+ fun_l11_n275
+end
+
+def fun_l10_n520()
+ fun_l11_n422
+end
+
+def fun_l10_n521()
+ fun_l11_n463
+end
+
+def fun_l10_n522()
+ fun_l11_n198
+end
+
+def fun_l10_n523()
+ fun_l11_n703
+end
+
+def fun_l10_n524()
+ fun_l11_n745
+end
+
+def fun_l10_n525()
+ fun_l11_n476
+end
+
+def fun_l10_n526()
+ fun_l11_n122
+end
+
+def fun_l10_n527()
+ fun_l11_n111
+end
+
+def fun_l10_n528()
+ fun_l11_n354
+end
+
+def fun_l10_n529()
+ fun_l11_n63
+end
+
+def fun_l10_n530()
+ fun_l11_n652
+end
+
+def fun_l10_n531()
+ fun_l11_n535
+end
+
+def fun_l10_n532()
+ fun_l11_n990
+end
+
+def fun_l10_n533()
+ fun_l11_n506
+end
+
+def fun_l10_n534()
+ fun_l11_n741
+end
+
+def fun_l10_n535()
+ fun_l11_n12
+end
+
+def fun_l10_n536()
+ fun_l11_n138
+end
+
+def fun_l10_n537()
+ fun_l11_n247
+end
+
+def fun_l10_n538()
+ fun_l11_n469
+end
+
+def fun_l10_n539()
+ fun_l11_n574
+end
+
+def fun_l10_n540()
+ fun_l11_n474
+end
+
+def fun_l10_n541()
+ fun_l11_n639
+end
+
+def fun_l10_n542()
+ fun_l11_n932
+end
+
+def fun_l10_n543()
+ fun_l11_n587
+end
+
+def fun_l10_n544()
+ fun_l11_n502
+end
+
+def fun_l10_n545()
+ fun_l11_n134
+end
+
+def fun_l10_n546()
+ fun_l11_n470
+end
+
+def fun_l10_n547()
+ fun_l11_n118
+end
+
+def fun_l10_n548()
+ fun_l11_n253
+end
+
+def fun_l10_n549()
+ fun_l11_n331
+end
+
+def fun_l10_n550()
+ fun_l11_n461
+end
+
+def fun_l10_n551()
+ fun_l11_n807
+end
+
+def fun_l10_n552()
+ fun_l11_n266
+end
+
+def fun_l10_n553()
+ fun_l11_n537
+end
+
+def fun_l10_n554()
+ fun_l11_n649
+end
+
+def fun_l10_n555()
+ fun_l11_n620
+end
+
+def fun_l10_n556()
+ fun_l11_n646
+end
+
+def fun_l10_n557()
+ fun_l11_n972
+end
+
+def fun_l10_n558()
+ fun_l11_n311
+end
+
+def fun_l10_n559()
+ fun_l11_n555
+end
+
+def fun_l10_n560()
+ fun_l11_n930
+end
+
+def fun_l10_n561()
+ fun_l11_n249
+end
+
+def fun_l10_n562()
+ fun_l11_n270
+end
+
+def fun_l10_n563()
+ fun_l11_n769
+end
+
+def fun_l10_n564()
+ fun_l11_n281
+end
+
+def fun_l10_n565()
+ fun_l11_n213
+end
+
+def fun_l10_n566()
+ fun_l11_n849
+end
+
+def fun_l10_n567()
+ fun_l11_n665
+end
+
+def fun_l10_n568()
+ fun_l11_n339
+end
+
+def fun_l10_n569()
+ fun_l11_n476
+end
+
+def fun_l10_n570()
+ fun_l11_n732
+end
+
+def fun_l10_n571()
+ fun_l11_n266
+end
+
+def fun_l10_n572()
+ fun_l11_n85
+end
+
+def fun_l10_n573()
+ fun_l11_n260
+end
+
+def fun_l10_n574()
+ fun_l11_n275
+end
+
+def fun_l10_n575()
+ fun_l11_n673
+end
+
+def fun_l10_n576()
+ fun_l11_n252
+end
+
+def fun_l10_n577()
+ fun_l11_n376
+end
+
+def fun_l10_n578()
+ fun_l11_n407
+end
+
+def fun_l10_n579()
+ fun_l11_n134
+end
+
+def fun_l10_n580()
+ fun_l11_n825
+end
+
+def fun_l10_n581()
+ fun_l11_n266
+end
+
+def fun_l10_n582()
+ fun_l11_n40
+end
+
+def fun_l10_n583()
+ fun_l11_n346
+end
+
+def fun_l10_n584()
+ fun_l11_n503
+end
+
+def fun_l10_n585()
+ fun_l11_n743
+end
+
+def fun_l10_n586()
+ fun_l11_n199
+end
+
+def fun_l10_n587()
+ fun_l11_n268
+end
+
+def fun_l10_n588()
+ fun_l11_n6
+end
+
+def fun_l10_n589()
+ fun_l11_n859
+end
+
+def fun_l10_n590()
+ fun_l11_n499
+end
+
+def fun_l10_n591()
+ fun_l11_n397
+end
+
+def fun_l10_n592()
+ fun_l11_n580
+end
+
+def fun_l10_n593()
+ fun_l11_n299
+end
+
+def fun_l10_n594()
+ fun_l11_n691
+end
+
+def fun_l10_n595()
+ fun_l11_n973
+end
+
+def fun_l10_n596()
+ fun_l11_n987
+end
+
+def fun_l10_n597()
+ fun_l11_n342
+end
+
+def fun_l10_n598()
+ fun_l11_n556
+end
+
+def fun_l10_n599()
+ fun_l11_n754
+end
+
+def fun_l10_n600()
+ fun_l11_n54
+end
+
+def fun_l10_n601()
+ fun_l11_n334
+end
+
+def fun_l10_n602()
+ fun_l11_n6
+end
+
+def fun_l10_n603()
+ fun_l11_n574
+end
+
+def fun_l10_n604()
+ fun_l11_n615
+end
+
+def fun_l10_n605()
+ fun_l11_n314
+end
+
+def fun_l10_n606()
+ fun_l11_n659
+end
+
+def fun_l10_n607()
+ fun_l11_n41
+end
+
+def fun_l10_n608()
+ fun_l11_n119
+end
+
+def fun_l10_n609()
+ fun_l11_n204
+end
+
+def fun_l10_n610()
+ fun_l11_n952
+end
+
+def fun_l10_n611()
+ fun_l11_n587
+end
+
+def fun_l10_n612()
+ fun_l11_n87
+end
+
+def fun_l10_n613()
+ fun_l11_n840
+end
+
+def fun_l10_n614()
+ fun_l11_n520
+end
+
+def fun_l10_n615()
+ fun_l11_n814
+end
+
+def fun_l10_n616()
+ fun_l11_n595
+end
+
+def fun_l10_n617()
+ fun_l11_n765
+end
+
+def fun_l10_n618()
+ fun_l11_n383
+end
+
+def fun_l10_n619()
+ fun_l11_n277
+end
+
+def fun_l10_n620()
+ fun_l11_n897
+end
+
+def fun_l10_n621()
+ fun_l11_n131
+end
+
+def fun_l10_n622()
+ fun_l11_n674
+end
+
+def fun_l10_n623()
+ fun_l11_n971
+end
+
+def fun_l10_n624()
+ fun_l11_n503
+end
+
+def fun_l10_n625()
+ fun_l11_n471
+end
+
+def fun_l10_n626()
+ fun_l11_n805
+end
+
+def fun_l10_n627()
+ fun_l11_n58
+end
+
+def fun_l10_n628()
+ fun_l11_n784
+end
+
+def fun_l10_n629()
+ fun_l11_n222
+end
+
+def fun_l10_n630()
+ fun_l11_n382
+end
+
+def fun_l10_n631()
+ fun_l11_n239
+end
+
+def fun_l10_n632()
+ fun_l11_n53
+end
+
+def fun_l10_n633()
+ fun_l11_n730
+end
+
+def fun_l10_n634()
+ fun_l11_n522
+end
+
+def fun_l10_n635()
+ fun_l11_n182
+end
+
+def fun_l10_n636()
+ fun_l11_n837
+end
+
+def fun_l10_n637()
+ fun_l11_n815
+end
+
+def fun_l10_n638()
+ fun_l11_n754
+end
+
+def fun_l10_n639()
+ fun_l11_n74
+end
+
+def fun_l10_n640()
+ fun_l11_n695
+end
+
+def fun_l10_n641()
+ fun_l11_n454
+end
+
+def fun_l10_n642()
+ fun_l11_n250
+end
+
+def fun_l10_n643()
+ fun_l11_n385
+end
+
+def fun_l10_n644()
+ fun_l11_n115
+end
+
+def fun_l10_n645()
+ fun_l11_n624
+end
+
+def fun_l10_n646()
+ fun_l11_n697
+end
+
+def fun_l10_n647()
+ fun_l11_n184
+end
+
+def fun_l10_n648()
+ fun_l11_n921
+end
+
+def fun_l10_n649()
+ fun_l11_n699
+end
+
+def fun_l10_n650()
+ fun_l11_n952
+end
+
+def fun_l10_n651()
+ fun_l11_n879
+end
+
+def fun_l10_n652()
+ fun_l11_n569
+end
+
+def fun_l10_n653()
+ fun_l11_n85
+end
+
+def fun_l10_n654()
+ fun_l11_n316
+end
+
+def fun_l10_n655()
+ fun_l11_n203
+end
+
+def fun_l10_n656()
+ fun_l11_n424
+end
+
+def fun_l10_n657()
+ fun_l11_n731
+end
+
+def fun_l10_n658()
+ fun_l11_n65
+end
+
+def fun_l10_n659()
+ fun_l11_n232
+end
+
+def fun_l10_n660()
+ fun_l11_n306
+end
+
+def fun_l10_n661()
+ fun_l11_n71
+end
+
+def fun_l10_n662()
+ fun_l11_n577
+end
+
+def fun_l10_n663()
+ fun_l11_n670
+end
+
+def fun_l10_n664()
+ fun_l11_n905
+end
+
+def fun_l10_n665()
+ fun_l11_n717
+end
+
+def fun_l10_n666()
+ fun_l11_n198
+end
+
+def fun_l10_n667()
+ fun_l11_n982
+end
+
+def fun_l10_n668()
+ fun_l11_n933
+end
+
+def fun_l10_n669()
+ fun_l11_n446
+end
+
+def fun_l10_n670()
+ fun_l11_n913
+end
+
+def fun_l10_n671()
+ fun_l11_n794
+end
+
+def fun_l10_n672()
+ fun_l11_n604
+end
+
+def fun_l10_n673()
+ fun_l11_n408
+end
+
+def fun_l10_n674()
+ fun_l11_n297
+end
+
+def fun_l10_n675()
+ fun_l11_n113
+end
+
+def fun_l10_n676()
+ fun_l11_n197
+end
+
+def fun_l10_n677()
+ fun_l11_n606
+end
+
+def fun_l10_n678()
+ fun_l11_n333
+end
+
+def fun_l10_n679()
+ fun_l11_n130
+end
+
+def fun_l10_n680()
+ fun_l11_n893
+end
+
+def fun_l10_n681()
+ fun_l11_n997
+end
+
+def fun_l10_n682()
+ fun_l11_n826
+end
+
+def fun_l10_n683()
+ fun_l11_n889
+end
+
+def fun_l10_n684()
+ fun_l11_n887
+end
+
+def fun_l10_n685()
+ fun_l11_n913
+end
+
+def fun_l10_n686()
+ fun_l11_n563
+end
+
+def fun_l10_n687()
+ fun_l11_n112
+end
+
+def fun_l10_n688()
+ fun_l11_n527
+end
+
+def fun_l10_n689()
+ fun_l11_n423
+end
+
+def fun_l10_n690()
+ fun_l11_n906
+end
+
+def fun_l10_n691()
+ fun_l11_n134
+end
+
+def fun_l10_n692()
+ fun_l11_n549
+end
+
+def fun_l10_n693()
+ fun_l11_n864
+end
+
+def fun_l10_n694()
+ fun_l11_n750
+end
+
+def fun_l10_n695()
+ fun_l11_n357
+end
+
+def fun_l10_n696()
+ fun_l11_n79
+end
+
+def fun_l10_n697()
+ fun_l11_n99
+end
+
+def fun_l10_n698()
+ fun_l11_n638
+end
+
+def fun_l10_n699()
+ fun_l11_n946
+end
+
+def fun_l10_n700()
+ fun_l11_n498
+end
+
+def fun_l10_n701()
+ fun_l11_n490
+end
+
+def fun_l10_n702()
+ fun_l11_n860
+end
+
+def fun_l10_n703()
+ fun_l11_n194
+end
+
+def fun_l10_n704()
+ fun_l11_n130
+end
+
+def fun_l10_n705()
+ fun_l11_n647
+end
+
+def fun_l10_n706()
+ fun_l11_n162
+end
+
+def fun_l10_n707()
+ fun_l11_n41
+end
+
+def fun_l10_n708()
+ fun_l11_n583
+end
+
+def fun_l10_n709()
+ fun_l11_n687
+end
+
+def fun_l10_n710()
+ fun_l11_n83
+end
+
+def fun_l10_n711()
+ fun_l11_n365
+end
+
+def fun_l10_n712()
+ fun_l11_n797
+end
+
+def fun_l10_n713()
+ fun_l11_n730
+end
+
+def fun_l10_n714()
+ fun_l11_n844
+end
+
+def fun_l10_n715()
+ fun_l11_n514
+end
+
+def fun_l10_n716()
+ fun_l11_n212
+end
+
+def fun_l10_n717()
+ fun_l11_n600
+end
+
+def fun_l10_n718()
+ fun_l11_n823
+end
+
+def fun_l10_n719()
+ fun_l11_n439
+end
+
+def fun_l10_n720()
+ fun_l11_n361
+end
+
+def fun_l10_n721()
+ fun_l11_n390
+end
+
+def fun_l10_n722()
+ fun_l11_n10
+end
+
+def fun_l10_n723()
+ fun_l11_n984
+end
+
+def fun_l10_n724()
+ fun_l11_n193
+end
+
+def fun_l10_n725()
+ fun_l11_n584
+end
+
+def fun_l10_n726()
+ fun_l11_n552
+end
+
+def fun_l10_n727()
+ fun_l11_n795
+end
+
+def fun_l10_n728()
+ fun_l11_n958
+end
+
+def fun_l10_n729()
+ fun_l11_n408
+end
+
+def fun_l10_n730()
+ fun_l11_n584
+end
+
+def fun_l10_n731()
+ fun_l11_n707
+end
+
+def fun_l10_n732()
+ fun_l11_n291
+end
+
+def fun_l10_n733()
+ fun_l11_n777
+end
+
+def fun_l10_n734()
+ fun_l11_n634
+end
+
+def fun_l10_n735()
+ fun_l11_n716
+end
+
+def fun_l10_n736()
+ fun_l11_n167
+end
+
+def fun_l10_n737()
+ fun_l11_n119
+end
+
+def fun_l10_n738()
+ fun_l11_n835
+end
+
+def fun_l10_n739()
+ fun_l11_n53
+end
+
+def fun_l10_n740()
+ fun_l11_n743
+end
+
+def fun_l10_n741()
+ fun_l11_n564
+end
+
+def fun_l10_n742()
+ fun_l11_n917
+end
+
+def fun_l10_n743()
+ fun_l11_n848
+end
+
+def fun_l10_n744()
+ fun_l11_n135
+end
+
+def fun_l10_n745()
+ fun_l11_n159
+end
+
+def fun_l10_n746()
+ fun_l11_n374
+end
+
+def fun_l10_n747()
+ fun_l11_n885
+end
+
+def fun_l10_n748()
+ fun_l11_n0
+end
+
+def fun_l10_n749()
+ fun_l11_n735
+end
+
+def fun_l10_n750()
+ fun_l11_n995
+end
+
+def fun_l10_n751()
+ fun_l11_n522
+end
+
+def fun_l10_n752()
+ fun_l11_n166
+end
+
+def fun_l10_n753()
+ fun_l11_n191
+end
+
+def fun_l10_n754()
+ fun_l11_n820
+end
+
+def fun_l10_n755()
+ fun_l11_n180
+end
+
+def fun_l10_n756()
+ fun_l11_n480
+end
+
+def fun_l10_n757()
+ fun_l11_n107
+end
+
+def fun_l10_n758()
+ fun_l11_n263
+end
+
+def fun_l10_n759()
+ fun_l11_n534
+end
+
+def fun_l10_n760()
+ fun_l11_n442
+end
+
+def fun_l10_n761()
+ fun_l11_n719
+end
+
+def fun_l10_n762()
+ fun_l11_n778
+end
+
+def fun_l10_n763()
+ fun_l11_n297
+end
+
+def fun_l10_n764()
+ fun_l11_n582
+end
+
+def fun_l10_n765()
+ fun_l11_n230
+end
+
+def fun_l10_n766()
+ fun_l11_n921
+end
+
+def fun_l10_n767()
+ fun_l11_n629
+end
+
+def fun_l10_n768()
+ fun_l11_n473
+end
+
+def fun_l10_n769()
+ fun_l11_n563
+end
+
+def fun_l10_n770()
+ fun_l11_n61
+end
+
+def fun_l10_n771()
+ fun_l11_n343
+end
+
+def fun_l10_n772()
+ fun_l11_n713
+end
+
+def fun_l10_n773()
+ fun_l11_n724
+end
+
+def fun_l10_n774()
+ fun_l11_n454
+end
+
+def fun_l10_n775()
+ fun_l11_n680
+end
+
+def fun_l10_n776()
+ fun_l11_n620
+end
+
+def fun_l10_n777()
+ fun_l11_n949
+end
+
+def fun_l10_n778()
+ fun_l11_n208
+end
+
+def fun_l10_n779()
+ fun_l11_n904
+end
+
+def fun_l10_n780()
+ fun_l11_n88
+end
+
+def fun_l10_n781()
+ fun_l11_n710
+end
+
+def fun_l10_n782()
+ fun_l11_n875
+end
+
+def fun_l10_n783()
+ fun_l11_n970
+end
+
+def fun_l10_n784()
+ fun_l11_n123
+end
+
+def fun_l10_n785()
+ fun_l11_n420
+end
+
+def fun_l10_n786()
+ fun_l11_n122
+end
+
+def fun_l10_n787()
+ fun_l11_n200
+end
+
+def fun_l10_n788()
+ fun_l11_n716
+end
+
+def fun_l10_n789()
+ fun_l11_n592
+end
+
+def fun_l10_n790()
+ fun_l11_n159
+end
+
+def fun_l10_n791()
+ fun_l11_n852
+end
+
+def fun_l10_n792()
+ fun_l11_n913
+end
+
+def fun_l10_n793()
+ fun_l11_n305
+end
+
+def fun_l10_n794()
+ fun_l11_n123
+end
+
+def fun_l10_n795()
+ fun_l11_n210
+end
+
+def fun_l10_n796()
+ fun_l11_n416
+end
+
+def fun_l10_n797()
+ fun_l11_n800
+end
+
+def fun_l10_n798()
+ fun_l11_n689
+end
+
+def fun_l10_n799()
+ fun_l11_n358
+end
+
+def fun_l10_n800()
+ fun_l11_n542
+end
+
+def fun_l10_n801()
+ fun_l11_n715
+end
+
+def fun_l10_n802()
+ fun_l11_n879
+end
+
+def fun_l10_n803()
+ fun_l11_n414
+end
+
+def fun_l10_n804()
+ fun_l11_n623
+end
+
+def fun_l10_n805()
+ fun_l11_n282
+end
+
+def fun_l10_n806()
+ fun_l11_n719
+end
+
+def fun_l10_n807()
+ fun_l11_n111
+end
+
+def fun_l10_n808()
+ fun_l11_n348
+end
+
+def fun_l10_n809()
+ fun_l11_n836
+end
+
+def fun_l10_n810()
+ fun_l11_n878
+end
+
+def fun_l10_n811()
+ fun_l11_n569
+end
+
+def fun_l10_n812()
+ fun_l11_n701
+end
+
+def fun_l10_n813()
+ fun_l11_n602
+end
+
+def fun_l10_n814()
+ fun_l11_n746
+end
+
+def fun_l10_n815()
+ fun_l11_n892
+end
+
+def fun_l10_n816()
+ fun_l11_n150
+end
+
+def fun_l10_n817()
+ fun_l11_n804
+end
+
+def fun_l10_n818()
+ fun_l11_n459
+end
+
+def fun_l10_n819()
+ fun_l11_n932
+end
+
+def fun_l10_n820()
+ fun_l11_n492
+end
+
+def fun_l10_n821()
+ fun_l11_n351
+end
+
+def fun_l10_n822()
+ fun_l11_n933
+end
+
+def fun_l10_n823()
+ fun_l11_n328
+end
+
+def fun_l10_n824()
+ fun_l11_n75
+end
+
+def fun_l10_n825()
+ fun_l11_n935
+end
+
+def fun_l10_n826()
+ fun_l11_n495
+end
+
+def fun_l10_n827()
+ fun_l11_n328
+end
+
+def fun_l10_n828()
+ fun_l11_n888
+end
+
+def fun_l10_n829()
+ fun_l11_n547
+end
+
+def fun_l10_n830()
+ fun_l11_n315
+end
+
+def fun_l10_n831()
+ fun_l11_n243
+end
+
+def fun_l10_n832()
+ fun_l11_n972
+end
+
+def fun_l10_n833()
+ fun_l11_n33
+end
+
+def fun_l10_n834()
+ fun_l11_n765
+end
+
+def fun_l10_n835()
+ fun_l11_n614
+end
+
+def fun_l10_n836()
+ fun_l11_n686
+end
+
+def fun_l10_n837()
+ fun_l11_n373
+end
+
+def fun_l10_n838()
+ fun_l11_n534
+end
+
+def fun_l10_n839()
+ fun_l11_n375
+end
+
+def fun_l10_n840()
+ fun_l11_n297
+end
+
+def fun_l10_n841()
+ fun_l11_n107
+end
+
+def fun_l10_n842()
+ fun_l11_n409
+end
+
+def fun_l10_n843()
+ fun_l11_n24
+end
+
+def fun_l10_n844()
+ fun_l11_n43
+end
+
+def fun_l10_n845()
+ fun_l11_n93
+end
+
+def fun_l10_n846()
+ fun_l11_n667
+end
+
+def fun_l10_n847()
+ fun_l11_n520
+end
+
+def fun_l10_n848()
+ fun_l11_n109
+end
+
+def fun_l10_n849()
+ fun_l11_n829
+end
+
+def fun_l10_n850()
+ fun_l11_n946
+end
+
+def fun_l10_n851()
+ fun_l11_n232
+end
+
+def fun_l10_n852()
+ fun_l11_n568
+end
+
+def fun_l10_n853()
+ fun_l11_n589
+end
+
+def fun_l10_n854()
+ fun_l11_n76
+end
+
+def fun_l10_n855()
+ fun_l11_n106
+end
+
+def fun_l10_n856()
+ fun_l11_n46
+end
+
+def fun_l10_n857()
+ fun_l11_n261
+end
+
+def fun_l10_n858()
+ fun_l11_n788
+end
+
+def fun_l10_n859()
+ fun_l11_n289
+end
+
+def fun_l10_n860()
+ fun_l11_n269
+end
+
+def fun_l10_n861()
+ fun_l11_n669
+end
+
+def fun_l10_n862()
+ fun_l11_n925
+end
+
+def fun_l10_n863()
+ fun_l11_n782
+end
+
+def fun_l10_n864()
+ fun_l11_n432
+end
+
+def fun_l10_n865()
+ fun_l11_n278
+end
+
+def fun_l10_n866()
+ fun_l11_n380
+end
+
+def fun_l10_n867()
+ fun_l11_n488
+end
+
+def fun_l10_n868()
+ fun_l11_n718
+end
+
+def fun_l10_n869()
+ fun_l11_n569
+end
+
+def fun_l10_n870()
+ fun_l11_n59
+end
+
+def fun_l10_n871()
+ fun_l11_n581
+end
+
+def fun_l10_n872()
+ fun_l11_n128
+end
+
+def fun_l10_n873()
+ fun_l11_n200
+end
+
+def fun_l10_n874()
+ fun_l11_n258
+end
+
+def fun_l10_n875()
+ fun_l11_n869
+end
+
+def fun_l10_n876()
+ fun_l11_n337
+end
+
+def fun_l10_n877()
+ fun_l11_n11
+end
+
+def fun_l10_n878()
+ fun_l11_n968
+end
+
+def fun_l10_n879()
+ fun_l11_n188
+end
+
+def fun_l10_n880()
+ fun_l11_n361
+end
+
+def fun_l10_n881()
+ fun_l11_n268
+end
+
+def fun_l10_n882()
+ fun_l11_n518
+end
+
+def fun_l10_n883()
+ fun_l11_n253
+end
+
+def fun_l10_n884()
+ fun_l11_n159
+end
+
+def fun_l10_n885()
+ fun_l11_n977
+end
+
+def fun_l10_n886()
+ fun_l11_n602
+end
+
+def fun_l10_n887()
+ fun_l11_n957
+end
+
+def fun_l10_n888()
+ fun_l11_n53
+end
+
+def fun_l10_n889()
+ fun_l11_n680
+end
+
+def fun_l10_n890()
+ fun_l11_n6
+end
+
+def fun_l10_n891()
+ fun_l11_n202
+end
+
+def fun_l10_n892()
+ fun_l11_n25
+end
+
+def fun_l10_n893()
+ fun_l11_n857
+end
+
+def fun_l10_n894()
+ fun_l11_n505
+end
+
+def fun_l10_n895()
+ fun_l11_n966
+end
+
+def fun_l10_n896()
+ fun_l11_n381
+end
+
+def fun_l10_n897()
+ fun_l11_n811
+end
+
+def fun_l10_n898()
+ fun_l11_n863
+end
+
+def fun_l10_n899()
+ fun_l11_n902
+end
+
+def fun_l10_n900()
+ fun_l11_n711
+end
+
+def fun_l10_n901()
+ fun_l11_n42
+end
+
+def fun_l10_n902()
+ fun_l11_n324
+end
+
+def fun_l10_n903()
+ fun_l11_n729
+end
+
+def fun_l10_n904()
+ fun_l11_n535
+end
+
+def fun_l10_n905()
+ fun_l11_n427
+end
+
+def fun_l10_n906()
+ fun_l11_n469
+end
+
+def fun_l10_n907()
+ fun_l11_n887
+end
+
+def fun_l10_n908()
+ fun_l11_n822
+end
+
+def fun_l10_n909()
+ fun_l11_n567
+end
+
+def fun_l10_n910()
+ fun_l11_n2
+end
+
+def fun_l10_n911()
+ fun_l11_n957
+end
+
+def fun_l10_n912()
+ fun_l11_n850
+end
+
+def fun_l10_n913()
+ fun_l11_n146
+end
+
+def fun_l10_n914()
+ fun_l11_n318
+end
+
+def fun_l10_n915()
+ fun_l11_n452
+end
+
+def fun_l10_n916()
+ fun_l11_n366
+end
+
+def fun_l10_n917()
+ fun_l11_n126
+end
+
+def fun_l10_n918()
+ fun_l11_n56
+end
+
+def fun_l10_n919()
+ fun_l11_n742
+end
+
+def fun_l10_n920()
+ fun_l11_n1
+end
+
+def fun_l10_n921()
+ fun_l11_n778
+end
+
+def fun_l10_n922()
+ fun_l11_n703
+end
+
+def fun_l10_n923()
+ fun_l11_n622
+end
+
+def fun_l10_n924()
+ fun_l11_n942
+end
+
+def fun_l10_n925()
+ fun_l11_n909
+end
+
+def fun_l10_n926()
+ fun_l11_n98
+end
+
+def fun_l10_n927()
+ fun_l11_n518
+end
+
+def fun_l10_n928()
+ fun_l11_n932
+end
+
+def fun_l10_n929()
+ fun_l11_n768
+end
+
+def fun_l10_n930()
+ fun_l11_n846
+end
+
+def fun_l10_n931()
+ fun_l11_n231
+end
+
+def fun_l10_n932()
+ fun_l11_n944
+end
+
+def fun_l10_n933()
+ fun_l11_n561
+end
+
+def fun_l10_n934()
+ fun_l11_n587
+end
+
+def fun_l10_n935()
+ fun_l11_n372
+end
+
+def fun_l10_n936()
+ fun_l11_n322
+end
+
+def fun_l10_n937()
+ fun_l11_n416
+end
+
+def fun_l10_n938()
+ fun_l11_n191
+end
+
+def fun_l10_n939()
+ fun_l11_n915
+end
+
+def fun_l10_n940()
+ fun_l11_n215
+end
+
+def fun_l10_n941()
+ fun_l11_n271
+end
+
+def fun_l10_n942()
+ fun_l11_n890
+end
+
+def fun_l10_n943()
+ fun_l11_n914
+end
+
+def fun_l10_n944()
+ fun_l11_n313
+end
+
+def fun_l10_n945()
+ fun_l11_n705
+end
+
+def fun_l10_n946()
+ fun_l11_n725
+end
+
+def fun_l10_n947()
+ fun_l11_n46
+end
+
+def fun_l10_n948()
+ fun_l11_n793
+end
+
+def fun_l10_n949()
+ fun_l11_n986
+end
+
+def fun_l10_n950()
+ fun_l11_n607
+end
+
+def fun_l10_n951()
+ fun_l11_n429
+end
+
+def fun_l10_n952()
+ fun_l11_n251
+end
+
+def fun_l10_n953()
+ fun_l11_n264
+end
+
+def fun_l10_n954()
+ fun_l11_n677
+end
+
+def fun_l10_n955()
+ fun_l11_n616
+end
+
+def fun_l10_n956()
+ fun_l11_n264
+end
+
+def fun_l10_n957()
+ fun_l11_n188
+end
+
+def fun_l10_n958()
+ fun_l11_n834
+end
+
+def fun_l10_n959()
+ fun_l11_n231
+end
+
+def fun_l10_n960()
+ fun_l11_n584
+end
+
+def fun_l10_n961()
+ fun_l11_n153
+end
+
+def fun_l10_n962()
+ fun_l11_n215
+end
+
+def fun_l10_n963()
+ fun_l11_n902
+end
+
+def fun_l10_n964()
+ fun_l11_n600
+end
+
+def fun_l10_n965()
+ fun_l11_n113
+end
+
+def fun_l10_n966()
+ fun_l11_n264
+end
+
+def fun_l10_n967()
+ fun_l11_n92
+end
+
+def fun_l10_n968()
+ fun_l11_n346
+end
+
+def fun_l10_n969()
+ fun_l11_n531
+end
+
+def fun_l10_n970()
+ fun_l11_n134
+end
+
+def fun_l10_n971()
+ fun_l11_n883
+end
+
+def fun_l10_n972()
+ fun_l11_n662
+end
+
+def fun_l10_n973()
+ fun_l11_n836
+end
+
+def fun_l10_n974()
+ fun_l11_n418
+end
+
+def fun_l10_n975()
+ fun_l11_n384
+end
+
+def fun_l10_n976()
+ fun_l11_n57
+end
+
+def fun_l10_n977()
+ fun_l11_n827
+end
+
+def fun_l10_n978()
+ fun_l11_n114
+end
+
+def fun_l10_n979()
+ fun_l11_n720
+end
+
+def fun_l10_n980()
+ fun_l11_n328
+end
+
+def fun_l10_n981()
+ fun_l11_n597
+end
+
+def fun_l10_n982()
+ fun_l11_n941
+end
+
+def fun_l10_n983()
+ fun_l11_n848
+end
+
+def fun_l10_n984()
+ fun_l11_n269
+end
+
+def fun_l10_n985()
+ fun_l11_n666
+end
+
+def fun_l10_n986()
+ fun_l11_n538
+end
+
+def fun_l10_n987()
+ fun_l11_n755
+end
+
+def fun_l10_n988()
+ fun_l11_n747
+end
+
+def fun_l10_n989()
+ fun_l11_n100
+end
+
+def fun_l10_n990()
+ fun_l11_n995
+end
+
+def fun_l10_n991()
+ fun_l11_n904
+end
+
+def fun_l10_n992()
+ fun_l11_n948
+end
+
+def fun_l10_n993()
+ fun_l11_n135
+end
+
+def fun_l10_n994()
+ fun_l11_n120
+end
+
+def fun_l10_n995()
+ fun_l11_n156
+end
+
+def fun_l10_n996()
+ fun_l11_n264
+end
+
+def fun_l10_n997()
+ fun_l11_n522
+end
+
+def fun_l10_n998()
+ fun_l11_n105
+end
+
+def fun_l10_n999()
+ fun_l11_n919
+end
+
+def fun_l11_n0()
+ fun_l12_n731
+end
+
+def fun_l11_n1()
+ fun_l12_n521
+end
+
+def fun_l11_n2()
+ fun_l12_n875
+end
+
+def fun_l11_n3()
+ fun_l12_n806
+end
+
+def fun_l11_n4()
+ fun_l12_n211
+end
+
+def fun_l11_n5()
+ fun_l12_n965
+end
+
+def fun_l11_n6()
+ fun_l12_n770
+end
+
+def fun_l11_n7()
+ fun_l12_n440
+end
+
+def fun_l11_n8()
+ fun_l12_n900
+end
+
+def fun_l11_n9()
+ fun_l12_n581
+end
+
+def fun_l11_n10()
+ fun_l12_n427
+end
+
+def fun_l11_n11()
+ fun_l12_n156
+end
+
+def fun_l11_n12()
+ fun_l12_n941
+end
+
+def fun_l11_n13()
+ fun_l12_n711
+end
+
+def fun_l11_n14()
+ fun_l12_n69
+end
+
+def fun_l11_n15()
+ fun_l12_n665
+end
+
+def fun_l11_n16()
+ fun_l12_n325
+end
+
+def fun_l11_n17()
+ fun_l12_n120
+end
+
+def fun_l11_n18()
+ fun_l12_n455
+end
+
+def fun_l11_n19()
+ fun_l12_n14
+end
+
+def fun_l11_n20()
+ fun_l12_n909
+end
+
+def fun_l11_n21()
+ fun_l12_n297
+end
+
+def fun_l11_n22()
+ fun_l12_n81
+end
+
+def fun_l11_n23()
+ fun_l12_n420
+end
+
+def fun_l11_n24()
+ fun_l12_n439
+end
+
+def fun_l11_n25()
+ fun_l12_n867
+end
+
+def fun_l11_n26()
+ fun_l12_n147
+end
+
+def fun_l11_n27()
+ fun_l12_n422
+end
+
+def fun_l11_n28()
+ fun_l12_n338
+end
+
+def fun_l11_n29()
+ fun_l12_n730
+end
+
+def fun_l11_n30()
+ fun_l12_n15
+end
+
+def fun_l11_n31()
+ fun_l12_n276
+end
+
+def fun_l11_n32()
+ fun_l12_n298
+end
+
+def fun_l11_n33()
+ fun_l12_n749
+end
+
+def fun_l11_n34()
+ fun_l12_n255
+end
+
+def fun_l11_n35()
+ fun_l12_n104
+end
+
+def fun_l11_n36()
+ fun_l12_n91
+end
+
+def fun_l11_n37()
+ fun_l12_n825
+end
+
+def fun_l11_n38()
+ fun_l12_n983
+end
+
+def fun_l11_n39()
+ fun_l12_n711
+end
+
+def fun_l11_n40()
+ fun_l12_n991
+end
+
+def fun_l11_n41()
+ fun_l12_n143
+end
+
+def fun_l11_n42()
+ fun_l12_n579
+end
+
+def fun_l11_n43()
+ fun_l12_n217
+end
+
+def fun_l11_n44()
+ fun_l12_n353
+end
+
+def fun_l11_n45()
+ fun_l12_n849
+end
+
+def fun_l11_n46()
+ fun_l12_n452
+end
+
+def fun_l11_n47()
+ fun_l12_n982
+end
+
+def fun_l11_n48()
+ fun_l12_n201
+end
+
+def fun_l11_n49()
+ fun_l12_n289
+end
+
+def fun_l11_n50()
+ fun_l12_n419
+end
+
+def fun_l11_n51()
+ fun_l12_n490
+end
+
+def fun_l11_n52()
+ fun_l12_n969
+end
+
+def fun_l11_n53()
+ fun_l12_n721
+end
+
+def fun_l11_n54()
+ fun_l12_n657
+end
+
+def fun_l11_n55()
+ fun_l12_n498
+end
+
+def fun_l11_n56()
+ fun_l12_n44
+end
+
+def fun_l11_n57()
+ fun_l12_n863
+end
+
+def fun_l11_n58()
+ fun_l12_n366
+end
+
+def fun_l11_n59()
+ fun_l12_n515
+end
+
+def fun_l11_n60()
+ fun_l12_n302
+end
+
+def fun_l11_n61()
+ fun_l12_n717
+end
+
+def fun_l11_n62()
+ fun_l12_n165
+end
+
+def fun_l11_n63()
+ fun_l12_n980
+end
+
+def fun_l11_n64()
+ fun_l12_n988
+end
+
+def fun_l11_n65()
+ fun_l12_n397
+end
+
+def fun_l11_n66()
+ fun_l12_n648
+end
+
+def fun_l11_n67()
+ fun_l12_n8
+end
+
+def fun_l11_n68()
+ fun_l12_n164
+end
+
+def fun_l11_n69()
+ fun_l12_n999
+end
+
+def fun_l11_n70()
+ fun_l12_n434
+end
+
+def fun_l11_n71()
+ fun_l12_n991
+end
+
+def fun_l11_n72()
+ fun_l12_n596
+end
+
+def fun_l11_n73()
+ fun_l12_n533
+end
+
+def fun_l11_n74()
+ fun_l12_n222
+end
+
+def fun_l11_n75()
+ fun_l12_n817
+end
+
+def fun_l11_n76()
+ fun_l12_n740
+end
+
+def fun_l11_n77()
+ fun_l12_n638
+end
+
+def fun_l11_n78()
+ fun_l12_n81
+end
+
+def fun_l11_n79()
+ fun_l12_n702
+end
+
+def fun_l11_n80()
+ fun_l12_n783
+end
+
+def fun_l11_n81()
+ fun_l12_n228
+end
+
+def fun_l11_n82()
+ fun_l12_n487
+end
+
+def fun_l11_n83()
+ fun_l12_n59
+end
+
+def fun_l11_n84()
+ fun_l12_n910
+end
+
+def fun_l11_n85()
+ fun_l12_n581
+end
+
+def fun_l11_n86()
+ fun_l12_n947
+end
+
+def fun_l11_n87()
+ fun_l12_n645
+end
+
+def fun_l11_n88()
+ fun_l12_n505
+end
+
+def fun_l11_n89()
+ fun_l12_n171
+end
+
+def fun_l11_n90()
+ fun_l12_n713
+end
+
+def fun_l11_n91()
+ fun_l12_n414
+end
+
+def fun_l11_n92()
+ fun_l12_n427
+end
+
+def fun_l11_n93()
+ fun_l12_n225
+end
+
+def fun_l11_n94()
+ fun_l12_n655
+end
+
+def fun_l11_n95()
+ fun_l12_n437
+end
+
+def fun_l11_n96()
+ fun_l12_n879
+end
+
+def fun_l11_n97()
+ fun_l12_n222
+end
+
+def fun_l11_n98()
+ fun_l12_n642
+end
+
+def fun_l11_n99()
+ fun_l12_n142
+end
+
+def fun_l11_n100()
+ fun_l12_n612
+end
+
+def fun_l11_n101()
+ fun_l12_n548
+end
+
+def fun_l11_n102()
+ fun_l12_n535
+end
+
+def fun_l11_n103()
+ fun_l12_n245
+end
+
+def fun_l11_n104()
+ fun_l12_n0
+end
+
+def fun_l11_n105()
+ fun_l12_n305
+end
+
+def fun_l11_n106()
+ fun_l12_n674
+end
+
+def fun_l11_n107()
+ fun_l12_n626
+end
+
+def fun_l11_n108()
+ fun_l12_n335
+end
+
+def fun_l11_n109()
+ fun_l12_n963
+end
+
+def fun_l11_n110()
+ fun_l12_n958
+end
+
+def fun_l11_n111()
+ fun_l12_n32
+end
+
+def fun_l11_n112()
+ fun_l12_n149
+end
+
+def fun_l11_n113()
+ fun_l12_n923
+end
+
+def fun_l11_n114()
+ fun_l12_n853
+end
+
+def fun_l11_n115()
+ fun_l12_n793
+end
+
+def fun_l11_n116()
+ fun_l12_n354
+end
+
+def fun_l11_n117()
+ fun_l12_n839
+end
+
+def fun_l11_n118()
+ fun_l12_n995
+end
+
+def fun_l11_n119()
+ fun_l12_n610
+end
+
+def fun_l11_n120()
+ fun_l12_n147
+end
+
+def fun_l11_n121()
+ fun_l12_n191
+end
+
+def fun_l11_n122()
+ fun_l12_n237
+end
+
+def fun_l11_n123()
+ fun_l12_n766
+end
+
+def fun_l11_n124()
+ fun_l12_n830
+end
+
+def fun_l11_n125()
+ fun_l12_n968
+end
+
+def fun_l11_n126()
+ fun_l12_n163
+end
+
+def fun_l11_n127()
+ fun_l12_n357
+end
+
+def fun_l11_n128()
+ fun_l12_n741
+end
+
+def fun_l11_n129()
+ fun_l12_n502
+end
+
+def fun_l11_n130()
+ fun_l12_n569
+end
+
+def fun_l11_n131()
+ fun_l12_n696
+end
+
+def fun_l11_n132()
+ fun_l12_n326
+end
+
+def fun_l11_n133()
+ fun_l12_n765
+end
+
+def fun_l11_n134()
+ fun_l12_n126
+end
+
+def fun_l11_n135()
+ fun_l12_n107
+end
+
+def fun_l11_n136()
+ fun_l12_n8
+end
+
+def fun_l11_n137()
+ fun_l12_n969
+end
+
+def fun_l11_n138()
+ fun_l12_n49
+end
+
+def fun_l11_n139()
+ fun_l12_n65
+end
+
+def fun_l11_n140()
+ fun_l12_n631
+end
+
+def fun_l11_n141()
+ fun_l12_n984
+end
+
+def fun_l11_n142()
+ fun_l12_n520
+end
+
+def fun_l11_n143()
+ fun_l12_n348
+end
+
+def fun_l11_n144()
+ fun_l12_n51
+end
+
+def fun_l11_n145()
+ fun_l12_n756
+end
+
+def fun_l11_n146()
+ fun_l12_n981
+end
+
+def fun_l11_n147()
+ fun_l12_n671
+end
+
+def fun_l11_n148()
+ fun_l12_n4
+end
+
+def fun_l11_n149()
+ fun_l12_n66
+end
+
+def fun_l11_n150()
+ fun_l12_n445
+end
+
+def fun_l11_n151()
+ fun_l12_n131
+end
+
+def fun_l11_n152()
+ fun_l12_n927
+end
+
+def fun_l11_n153()
+ fun_l12_n715
+end
+
+def fun_l11_n154()
+ fun_l12_n767
+end
+
+def fun_l11_n155()
+ fun_l12_n50
+end
+
+def fun_l11_n156()
+ fun_l12_n360
+end
+
+def fun_l11_n157()
+ fun_l12_n311
+end
+
+def fun_l11_n158()
+ fun_l12_n509
+end
+
+def fun_l11_n159()
+ fun_l12_n868
+end
+
+def fun_l11_n160()
+ fun_l12_n185
+end
+
+def fun_l11_n161()
+ fun_l12_n338
+end
+
+def fun_l11_n162()
+ fun_l12_n539
+end
+
+def fun_l11_n163()
+ fun_l12_n30
+end
+
+def fun_l11_n164()
+ fun_l12_n485
+end
+
+def fun_l11_n165()
+ fun_l12_n808
+end
+
+def fun_l11_n166()
+ fun_l12_n78
+end
+
+def fun_l11_n167()
+ fun_l12_n370
+end
+
+def fun_l11_n168()
+ fun_l12_n1
+end
+
+def fun_l11_n169()
+ fun_l12_n473
+end
+
+def fun_l11_n170()
+ fun_l12_n362
+end
+
+def fun_l11_n171()
+ fun_l12_n209
+end
+
+def fun_l11_n172()
+ fun_l12_n431
+end
+
+def fun_l11_n173()
+ fun_l12_n383
+end
+
+def fun_l11_n174()
+ fun_l12_n214
+end
+
+def fun_l11_n175()
+ fun_l12_n215
+end
+
+def fun_l11_n176()
+ fun_l12_n639
+end
+
+def fun_l11_n177()
+ fun_l12_n486
+end
+
+def fun_l11_n178()
+ fun_l12_n486
+end
+
+def fun_l11_n179()
+ fun_l12_n409
+end
+
+def fun_l11_n180()
+ fun_l12_n558
+end
+
+def fun_l11_n181()
+ fun_l12_n546
+end
+
+def fun_l11_n182()
+ fun_l12_n439
+end
+
+def fun_l11_n183()
+ fun_l12_n11
+end
+
+def fun_l11_n184()
+ fun_l12_n304
+end
+
+def fun_l11_n185()
+ fun_l12_n525
+end
+
+def fun_l11_n186()
+ fun_l12_n886
+end
+
+def fun_l11_n187()
+ fun_l12_n17
+end
+
+def fun_l11_n188()
+ fun_l12_n11
+end
+
+def fun_l11_n189()
+ fun_l12_n382
+end
+
+def fun_l11_n190()
+ fun_l12_n185
+end
+
+def fun_l11_n191()
+ fun_l12_n454
+end
+
+def fun_l11_n192()
+ fun_l12_n23
+end
+
+def fun_l11_n193()
+ fun_l12_n900
+end
+
+def fun_l11_n194()
+ fun_l12_n233
+end
+
+def fun_l11_n195()
+ fun_l12_n245
+end
+
+def fun_l11_n196()
+ fun_l12_n474
+end
+
+def fun_l11_n197()
+ fun_l12_n368
+end
+
+def fun_l11_n198()
+ fun_l12_n80
+end
+
+def fun_l11_n199()
+ fun_l12_n522
+end
+
+def fun_l11_n200()
+ fun_l12_n439
+end
+
+def fun_l11_n201()
+ fun_l12_n553
+end
+
+def fun_l11_n202()
+ fun_l12_n713
+end
+
+def fun_l11_n203()
+ fun_l12_n898
+end
+
+def fun_l11_n204()
+ fun_l12_n571
+end
+
+def fun_l11_n205()
+ fun_l12_n830
+end
+
+def fun_l11_n206()
+ fun_l12_n404
+end
+
+def fun_l11_n207()
+ fun_l12_n120
+end
+
+def fun_l11_n208()
+ fun_l12_n147
+end
+
+def fun_l11_n209()
+ fun_l12_n924
+end
+
+def fun_l11_n210()
+ fun_l12_n988
+end
+
+def fun_l11_n211()
+ fun_l12_n25
+end
+
+def fun_l11_n212()
+ fun_l12_n848
+end
+
+def fun_l11_n213()
+ fun_l12_n875
+end
+
+def fun_l11_n214()
+ fun_l12_n718
+end
+
+def fun_l11_n215()
+ fun_l12_n657
+end
+
+def fun_l11_n216()
+ fun_l12_n364
+end
+
+def fun_l11_n217()
+ fun_l12_n342
+end
+
+def fun_l11_n218()
+ fun_l12_n16
+end
+
+def fun_l11_n219()
+ fun_l12_n167
+end
+
+def fun_l11_n220()
+ fun_l12_n719
+end
+
+def fun_l11_n221()
+ fun_l12_n414
+end
+
+def fun_l11_n222()
+ fun_l12_n874
+end
+
+def fun_l11_n223()
+ fun_l12_n482
+end
+
+def fun_l11_n224()
+ fun_l12_n191
+end
+
+def fun_l11_n225()
+ fun_l12_n172
+end
+
+def fun_l11_n226()
+ fun_l12_n768
+end
+
+def fun_l11_n227()
+ fun_l12_n746
+end
+
+def fun_l11_n228()
+ fun_l12_n460
+end
+
+def fun_l11_n229()
+ fun_l12_n64
+end
+
+def fun_l11_n230()
+ fun_l12_n747
+end
+
+def fun_l11_n231()
+ fun_l12_n147
+end
+
+def fun_l11_n232()
+ fun_l12_n157
+end
+
+def fun_l11_n233()
+ fun_l12_n336
+end
+
+def fun_l11_n234()
+ fun_l12_n904
+end
+
+def fun_l11_n235()
+ fun_l12_n76
+end
+
+def fun_l11_n236()
+ fun_l12_n499
+end
+
+def fun_l11_n237()
+ fun_l12_n559
+end
+
+def fun_l11_n238()
+ fun_l12_n949
+end
+
+def fun_l11_n239()
+ fun_l12_n525
+end
+
+def fun_l11_n240()
+ fun_l12_n741
+end
+
+def fun_l11_n241()
+ fun_l12_n11
+end
+
+def fun_l11_n242()
+ fun_l12_n449
+end
+
+def fun_l11_n243()
+ fun_l12_n767
+end
+
+def fun_l11_n244()
+ fun_l12_n94
+end
+
+def fun_l11_n245()
+ fun_l12_n721
+end
+
+def fun_l11_n246()
+ fun_l12_n592
+end
+
+def fun_l11_n247()
+ fun_l12_n184
+end
+
+def fun_l11_n248()
+ fun_l12_n166
+end
+
+def fun_l11_n249()
+ fun_l12_n773
+end
+
+def fun_l11_n250()
+ fun_l12_n334
+end
+
+def fun_l11_n251()
+ fun_l12_n965
+end
+
+def fun_l11_n252()
+ fun_l12_n154
+end
+
+def fun_l11_n253()
+ fun_l12_n182
+end
+
+def fun_l11_n254()
+ fun_l12_n298
+end
+
+def fun_l11_n255()
+ fun_l12_n29
+end
+
+def fun_l11_n256()
+ fun_l12_n409
+end
+
+def fun_l11_n257()
+ fun_l12_n452
+end
+
+def fun_l11_n258()
+ fun_l12_n369
+end
+
+def fun_l11_n259()
+ fun_l12_n794
+end
+
+def fun_l11_n260()
+ fun_l12_n210
+end
+
+def fun_l11_n261()
+ fun_l12_n255
+end
+
+def fun_l11_n262()
+ fun_l12_n801
+end
+
+def fun_l11_n263()
+ fun_l12_n650
+end
+
+def fun_l11_n264()
+ fun_l12_n612
+end
+
+def fun_l11_n265()
+ fun_l12_n122
+end
+
+def fun_l11_n266()
+ fun_l12_n70
+end
+
+def fun_l11_n267()
+ fun_l12_n254
+end
+
+def fun_l11_n268()
+ fun_l12_n104
+end
+
+def fun_l11_n269()
+ fun_l12_n564
+end
+
+def fun_l11_n270()
+ fun_l12_n256
+end
+
+def fun_l11_n271()
+ fun_l12_n525
+end
+
+def fun_l11_n272()
+ fun_l12_n734
+end
+
+def fun_l11_n273()
+ fun_l12_n127
+end
+
+def fun_l11_n274()
+ fun_l12_n705
+end
+
+def fun_l11_n275()
+ fun_l12_n607
+end
+
+def fun_l11_n276()
+ fun_l12_n681
+end
+
+def fun_l11_n277()
+ fun_l12_n510
+end
+
+def fun_l11_n278()
+ fun_l12_n889
+end
+
+def fun_l11_n279()
+ fun_l12_n153
+end
+
+def fun_l11_n280()
+ fun_l12_n457
+end
+
+def fun_l11_n281()
+ fun_l12_n394
+end
+
+def fun_l11_n282()
+ fun_l12_n628
+end
+
+def fun_l11_n283()
+ fun_l12_n576
+end
+
+def fun_l11_n284()
+ fun_l12_n294
+end
+
+def fun_l11_n285()
+ fun_l12_n79
+end
+
+def fun_l11_n286()
+ fun_l12_n505
+end
+
+def fun_l11_n287()
+ fun_l12_n726
+end
+
+def fun_l11_n288()
+ fun_l12_n171
+end
+
+def fun_l11_n289()
+ fun_l12_n317
+end
+
+def fun_l11_n290()
+ fun_l12_n350
+end
+
+def fun_l11_n291()
+ fun_l12_n134
+end
+
+def fun_l11_n292()
+ fun_l12_n595
+end
+
+def fun_l11_n293()
+ fun_l12_n924
+end
+
+def fun_l11_n294()
+ fun_l12_n713
+end
+
+def fun_l11_n295()
+ fun_l12_n630
+end
+
+def fun_l11_n296()
+ fun_l12_n444
+end
+
+def fun_l11_n297()
+ fun_l12_n751
+end
+
+def fun_l11_n298()
+ fun_l12_n324
+end
+
+def fun_l11_n299()
+ fun_l12_n851
+end
+
+def fun_l11_n300()
+ fun_l12_n883
+end
+
+def fun_l11_n301()
+ fun_l12_n289
+end
+
+def fun_l11_n302()
+ fun_l12_n427
+end
+
+def fun_l11_n303()
+ fun_l12_n593
+end
+
+def fun_l11_n304()
+ fun_l12_n380
+end
+
+def fun_l11_n305()
+ fun_l12_n630
+end
+
+def fun_l11_n306()
+ fun_l12_n245
+end
+
+def fun_l11_n307()
+ fun_l12_n369
+end
+
+def fun_l11_n308()
+ fun_l12_n641
+end
+
+def fun_l11_n309()
+ fun_l12_n271
+end
+
+def fun_l11_n310()
+ fun_l12_n67
+end
+
+def fun_l11_n311()
+ fun_l12_n109
+end
+
+def fun_l11_n312()
+ fun_l12_n559
+end
+
+def fun_l11_n313()
+ fun_l12_n211
+end
+
+def fun_l11_n314()
+ fun_l12_n396
+end
+
+def fun_l11_n315()
+ fun_l12_n390
+end
+
+def fun_l11_n316()
+ fun_l12_n72
+end
+
+def fun_l11_n317()
+ fun_l12_n13
+end
+
+def fun_l11_n318()
+ fun_l12_n690
+end
+
+def fun_l11_n319()
+ fun_l12_n104
+end
+
+def fun_l11_n320()
+ fun_l12_n671
+end
+
+def fun_l11_n321()
+ fun_l12_n506
+end
+
+def fun_l11_n322()
+ fun_l12_n679
+end
+
+def fun_l11_n323()
+ fun_l12_n809
+end
+
+def fun_l11_n324()
+ fun_l12_n750
+end
+
+def fun_l11_n325()
+ fun_l12_n754
+end
+
+def fun_l11_n326()
+ fun_l12_n6
+end
+
+def fun_l11_n327()
+ fun_l12_n522
+end
+
+def fun_l11_n328()
+ fun_l12_n414
+end
+
+def fun_l11_n329()
+ fun_l12_n934
+end
+
+def fun_l11_n330()
+ fun_l12_n653
+end
+
+def fun_l11_n331()
+ fun_l12_n290
+end
+
+def fun_l11_n332()
+ fun_l12_n262
+end
+
+def fun_l11_n333()
+ fun_l12_n933
+end
+
+def fun_l11_n334()
+ fun_l12_n332
+end
+
+def fun_l11_n335()
+ fun_l12_n882
+end
+
+def fun_l11_n336()
+ fun_l12_n448
+end
+
+def fun_l11_n337()
+ fun_l12_n5
+end
+
+def fun_l11_n338()
+ fun_l12_n993
+end
+
+def fun_l11_n339()
+ fun_l12_n354
+end
+
+def fun_l11_n340()
+ fun_l12_n643
+end
+
+def fun_l11_n341()
+ fun_l12_n85
+end
+
+def fun_l11_n342()
+ fun_l12_n957
+end
+
+def fun_l11_n343()
+ fun_l12_n581
+end
+
+def fun_l11_n344()
+ fun_l12_n837
+end
+
+def fun_l11_n345()
+ fun_l12_n210
+end
+
+def fun_l11_n346()
+ fun_l12_n45
+end
+
+def fun_l11_n347()
+ fun_l12_n672
+end
+
+def fun_l11_n348()
+ fun_l12_n559
+end
+
+def fun_l11_n349()
+ fun_l12_n76
+end
+
+def fun_l11_n350()
+ fun_l12_n500
+end
+
+def fun_l11_n351()
+ fun_l12_n23
+end
+
+def fun_l11_n352()
+ fun_l12_n364
+end
+
+def fun_l11_n353()
+ fun_l12_n72
+end
+
+def fun_l11_n354()
+ fun_l12_n953
+end
+
+def fun_l11_n355()
+ fun_l12_n104
+end
+
+def fun_l11_n356()
+ fun_l12_n446
+end
+
+def fun_l11_n357()
+ fun_l12_n231
+end
+
+def fun_l11_n358()
+ fun_l12_n923
+end
+
+def fun_l11_n359()
+ fun_l12_n396
+end
+
+def fun_l11_n360()
+ fun_l12_n748
+end
+
+def fun_l11_n361()
+ fun_l12_n168
+end
+
+def fun_l11_n362()
+ fun_l12_n329
+end
+
+def fun_l11_n363()
+ fun_l12_n843
+end
+
+def fun_l11_n364()
+ fun_l12_n864
+end
+
+def fun_l11_n365()
+ fun_l12_n163
+end
+
+def fun_l11_n366()
+ fun_l12_n811
+end
+
+def fun_l11_n367()
+ fun_l12_n7
+end
+
+def fun_l11_n368()
+ fun_l12_n105
+end
+
+def fun_l11_n369()
+ fun_l12_n367
+end
+
+def fun_l11_n370()
+ fun_l12_n650
+end
+
+def fun_l11_n371()
+ fun_l12_n966
+end
+
+def fun_l11_n372()
+ fun_l12_n248
+end
+
+def fun_l11_n373()
+ fun_l12_n431
+end
+
+def fun_l11_n374()
+ fun_l12_n329
+end
+
+def fun_l11_n375()
+ fun_l12_n788
+end
+
+def fun_l11_n376()
+ fun_l12_n407
+end
+
+def fun_l11_n377()
+ fun_l12_n551
+end
+
+def fun_l11_n378()
+ fun_l12_n703
+end
+
+def fun_l11_n379()
+ fun_l12_n414
+end
+
+def fun_l11_n380()
+ fun_l12_n23
+end
+
+def fun_l11_n381()
+ fun_l12_n747
+end
+
+def fun_l11_n382()
+ fun_l12_n10
+end
+
+def fun_l11_n383()
+ fun_l12_n943
+end
+
+def fun_l11_n384()
+ fun_l12_n26
+end
+
+def fun_l11_n385()
+ fun_l12_n459
+end
+
+def fun_l11_n386()
+ fun_l12_n256
+end
+
+def fun_l11_n387()
+ fun_l12_n606
+end
+
+def fun_l11_n388()
+ fun_l12_n138
+end
+
+def fun_l11_n389()
+ fun_l12_n371
+end
+
+def fun_l11_n390()
+ fun_l12_n304
+end
+
+def fun_l11_n391()
+ fun_l12_n459
+end
+
+def fun_l11_n392()
+ fun_l12_n968
+end
+
+def fun_l11_n393()
+ fun_l12_n153
+end
+
+def fun_l11_n394()
+ fun_l12_n742
+end
+
+def fun_l11_n395()
+ fun_l12_n617
+end
+
+def fun_l11_n396()
+ fun_l12_n562
+end
+
+def fun_l11_n397()
+ fun_l12_n474
+end
+
+def fun_l11_n398()
+ fun_l12_n633
+end
+
+def fun_l11_n399()
+ fun_l12_n950
+end
+
+def fun_l11_n400()
+ fun_l12_n370
+end
+
+def fun_l11_n401()
+ fun_l12_n301
+end
+
+def fun_l11_n402()
+ fun_l12_n74
+end
+
+def fun_l11_n403()
+ fun_l12_n759
+end
+
+def fun_l11_n404()
+ fun_l12_n634
+end
+
+def fun_l11_n405()
+ fun_l12_n678
+end
+
+def fun_l11_n406()
+ fun_l12_n761
+end
+
+def fun_l11_n407()
+ fun_l12_n669
+end
+
+def fun_l11_n408()
+ fun_l12_n737
+end
+
+def fun_l11_n409()
+ fun_l12_n666
+end
+
+def fun_l11_n410()
+ fun_l12_n43
+end
+
+def fun_l11_n411()
+ fun_l12_n64
+end
+
+def fun_l11_n412()
+ fun_l12_n956
+end
+
+def fun_l11_n413()
+ fun_l12_n749
+end
+
+def fun_l11_n414()
+ fun_l12_n22
+end
+
+def fun_l11_n415()
+ fun_l12_n170
+end
+
+def fun_l11_n416()
+ fun_l12_n113
+end
+
+def fun_l11_n417()
+ fun_l12_n780
+end
+
+def fun_l11_n418()
+ fun_l12_n855
+end
+
+def fun_l11_n419()
+ fun_l12_n551
+end
+
+def fun_l11_n420()
+ fun_l12_n101
+end
+
+def fun_l11_n421()
+ fun_l12_n543
+end
+
+def fun_l11_n422()
+ fun_l12_n773
+end
+
+def fun_l11_n423()
+ fun_l12_n13
+end
+
+def fun_l11_n424()
+ fun_l12_n997
+end
+
+def fun_l11_n425()
+ fun_l12_n199
+end
+
+def fun_l11_n426()
+ fun_l12_n281
+end
+
+def fun_l11_n427()
+ fun_l12_n685
+end
+
+def fun_l11_n428()
+ fun_l12_n588
+end
+
+def fun_l11_n429()
+ fun_l12_n693
+end
+
+def fun_l11_n430()
+ fun_l12_n595
+end
+
+def fun_l11_n431()
+ fun_l12_n632
+end
+
+def fun_l11_n432()
+ fun_l12_n923
+end
+
+def fun_l11_n433()
+ fun_l12_n388
+end
+
+def fun_l11_n434()
+ fun_l12_n307
+end
+
+def fun_l11_n435()
+ fun_l12_n169
+end
+
+def fun_l11_n436()
+ fun_l12_n13
+end
+
+def fun_l11_n437()
+ fun_l12_n207
+end
+
+def fun_l11_n438()
+ fun_l12_n711
+end
+
+def fun_l11_n439()
+ fun_l12_n649
+end
+
+def fun_l11_n440()
+ fun_l12_n817
+end
+
+def fun_l11_n441()
+ fun_l12_n280
+end
+
+def fun_l11_n442()
+ fun_l12_n833
+end
+
+def fun_l11_n443()
+ fun_l12_n962
+end
+
+def fun_l11_n444()
+ fun_l12_n431
+end
+
+def fun_l11_n445()
+ fun_l12_n564
+end
+
+def fun_l11_n446()
+ fun_l12_n107
+end
+
+def fun_l11_n447()
+ fun_l12_n504
+end
+
+def fun_l11_n448()
+ fun_l12_n680
+end
+
+def fun_l11_n449()
+ fun_l12_n653
+end
+
+def fun_l11_n450()
+ fun_l12_n549
+end
+
+def fun_l11_n451()
+ fun_l12_n34
+end
+
+def fun_l11_n452()
+ fun_l12_n607
+end
+
+def fun_l11_n453()
+ fun_l12_n831
+end
+
+def fun_l11_n454()
+ fun_l12_n974
+end
+
+def fun_l11_n455()
+ fun_l12_n815
+end
+
+def fun_l11_n456()
+ fun_l12_n700
+end
+
+def fun_l11_n457()
+ fun_l12_n583
+end
+
+def fun_l11_n458()
+ fun_l12_n479
+end
+
+def fun_l11_n459()
+ fun_l12_n815
+end
+
+def fun_l11_n460()
+ fun_l12_n45
+end
+
+def fun_l11_n461()
+ fun_l12_n740
+end
+
+def fun_l11_n462()
+ fun_l12_n637
+end
+
+def fun_l11_n463()
+ fun_l12_n568
+end
+
+def fun_l11_n464()
+ fun_l12_n340
+end
+
+def fun_l11_n465()
+ fun_l12_n532
+end
+
+def fun_l11_n466()
+ fun_l12_n13
+end
+
+def fun_l11_n467()
+ fun_l12_n479
+end
+
+def fun_l11_n468()
+ fun_l12_n263
+end
+
+def fun_l11_n469()
+ fun_l12_n109
+end
+
+def fun_l11_n470()
+ fun_l12_n290
+end
+
+def fun_l11_n471()
+ fun_l12_n85
+end
+
+def fun_l11_n472()
+ fun_l12_n360
+end
+
+def fun_l11_n473()
+ fun_l12_n33
+end
+
+def fun_l11_n474()
+ fun_l12_n603
+end
+
+def fun_l11_n475()
+ fun_l12_n82
+end
+
+def fun_l11_n476()
+ fun_l12_n250
+end
+
+def fun_l11_n477()
+ fun_l12_n233
+end
+
+def fun_l11_n478()
+ fun_l12_n530
+end
+
+def fun_l11_n479()
+ fun_l12_n619
+end
+
+def fun_l11_n480()
+ fun_l12_n756
+end
+
+def fun_l11_n481()
+ fun_l12_n681
+end
+
+def fun_l11_n482()
+ fun_l12_n981
+end
+
+def fun_l11_n483()
+ fun_l12_n308
+end
+
+def fun_l11_n484()
+ fun_l12_n955
+end
+
+def fun_l11_n485()
+ fun_l12_n197
+end
+
+def fun_l11_n486()
+ fun_l12_n620
+end
+
+def fun_l11_n487()
+ fun_l12_n485
+end
+
+def fun_l11_n488()
+ fun_l12_n866
+end
+
+def fun_l11_n489()
+ fun_l12_n502
+end
+
+def fun_l11_n490()
+ fun_l12_n16
+end
+
+def fun_l11_n491()
+ fun_l12_n727
+end
+
+def fun_l11_n492()
+ fun_l12_n13
+end
+
+def fun_l11_n493()
+ fun_l12_n268
+end
+
+def fun_l11_n494()
+ fun_l12_n501
+end
+
+def fun_l11_n495()
+ fun_l12_n303
+end
+
+def fun_l11_n496()
+ fun_l12_n223
+end
+
+def fun_l11_n497()
+ fun_l12_n623
+end
+
+def fun_l11_n498()
+ fun_l12_n479
+end
+
+def fun_l11_n499()
+ fun_l12_n310
+end
+
+def fun_l11_n500()
+ fun_l12_n337
+end
+
+def fun_l11_n501()
+ fun_l12_n406
+end
+
+def fun_l11_n502()
+ fun_l12_n727
+end
+
+def fun_l11_n503()
+ fun_l12_n329
+end
+
+def fun_l11_n504()
+ fun_l12_n675
+end
+
+def fun_l11_n505()
+ fun_l12_n41
+end
+
+def fun_l11_n506()
+ fun_l12_n176
+end
+
+def fun_l11_n507()
+ fun_l12_n277
+end
+
+def fun_l11_n508()
+ fun_l12_n767
+end
+
+def fun_l11_n509()
+ fun_l12_n863
+end
+
+def fun_l11_n510()
+ fun_l12_n459
+end
+
+def fun_l11_n511()
+ fun_l12_n360
+end
+
+def fun_l11_n512()
+ fun_l12_n870
+end
+
+def fun_l11_n513()
+ fun_l12_n939
+end
+
+def fun_l11_n514()
+ fun_l12_n697
+end
+
+def fun_l11_n515()
+ fun_l12_n91
+end
+
+def fun_l11_n516()
+ fun_l12_n382
+end
+
+def fun_l11_n517()
+ fun_l12_n649
+end
+
+def fun_l11_n518()
+ fun_l12_n455
+end
+
+def fun_l11_n519()
+ fun_l12_n52
+end
+
+def fun_l11_n520()
+ fun_l12_n857
+end
+
+def fun_l11_n521()
+ fun_l12_n110
+end
+
+def fun_l11_n522()
+ fun_l12_n21
+end
+
+def fun_l11_n523()
+ fun_l12_n786
+end
+
+def fun_l11_n524()
+ fun_l12_n56
+end
+
+def fun_l11_n525()
+ fun_l12_n558
+end
+
+def fun_l11_n526()
+ fun_l12_n923
+end
+
+def fun_l11_n527()
+ fun_l12_n716
+end
+
+def fun_l11_n528()
+ fun_l12_n20
+end
+
+def fun_l11_n529()
+ fun_l12_n503
+end
+
+def fun_l11_n530()
+ fun_l12_n221
+end
+
+def fun_l11_n531()
+ fun_l12_n364
+end
+
+def fun_l11_n532()
+ fun_l12_n412
+end
+
+def fun_l11_n533()
+ fun_l12_n925
+end
+
+def fun_l11_n534()
+ fun_l12_n638
+end
+
+def fun_l11_n535()
+ fun_l12_n413
+end
+
+def fun_l11_n536()
+ fun_l12_n873
+end
+
+def fun_l11_n537()
+ fun_l12_n499
+end
+
+def fun_l11_n538()
+ fun_l12_n231
+end
+
+def fun_l11_n539()
+ fun_l12_n450
+end
+
+def fun_l11_n540()
+ fun_l12_n137
+end
+
+def fun_l11_n541()
+ fun_l12_n516
+end
+
+def fun_l11_n542()
+ fun_l12_n479
+end
+
+def fun_l11_n543()
+ fun_l12_n541
+end
+
+def fun_l11_n544()
+ fun_l12_n42
+end
+
+def fun_l11_n545()
+ fun_l12_n207
+end
+
+def fun_l11_n546()
+ fun_l12_n340
+end
+
+def fun_l11_n547()
+ fun_l12_n888
+end
+
+def fun_l11_n548()
+ fun_l12_n443
+end
+
+def fun_l11_n549()
+ fun_l12_n375
+end
+
+def fun_l11_n550()
+ fun_l12_n972
+end
+
+def fun_l11_n551()
+ fun_l12_n622
+end
+
+def fun_l11_n552()
+ fun_l12_n958
+end
+
+def fun_l11_n553()
+ fun_l12_n279
+end
+
+def fun_l11_n554()
+ fun_l12_n498
+end
+
+def fun_l11_n555()
+ fun_l12_n498
+end
+
+def fun_l11_n556()
+ fun_l12_n502
+end
+
+def fun_l11_n557()
+ fun_l12_n113
+end
+
+def fun_l11_n558()
+ fun_l12_n636
+end
+
+def fun_l11_n559()
+ fun_l12_n525
+end
+
+def fun_l11_n560()
+ fun_l12_n541
+end
+
+def fun_l11_n561()
+ fun_l12_n336
+end
+
+def fun_l11_n562()
+ fun_l12_n787
+end
+
+def fun_l11_n563()
+ fun_l12_n858
+end
+
+def fun_l11_n564()
+ fun_l12_n772
+end
+
+def fun_l11_n565()
+ fun_l12_n831
+end
+
+def fun_l11_n566()
+ fun_l12_n95
+end
+
+def fun_l11_n567()
+ fun_l12_n927
+end
+
+def fun_l11_n568()
+ fun_l12_n888
+end
+
+def fun_l11_n569()
+ fun_l12_n444
+end
+
+def fun_l11_n570()
+ fun_l12_n23
+end
+
+def fun_l11_n571()
+ fun_l12_n995
+end
+
+def fun_l11_n572()
+ fun_l12_n372
+end
+
+def fun_l11_n573()
+ fun_l12_n432
+end
+
+def fun_l11_n574()
+ fun_l12_n156
+end
+
+def fun_l11_n575()
+ fun_l12_n981
+end
+
+def fun_l11_n576()
+ fun_l12_n328
+end
+
+def fun_l11_n577()
+ fun_l12_n411
+end
+
+def fun_l11_n578()
+ fun_l12_n734
+end
+
+def fun_l11_n579()
+ fun_l12_n646
+end
+
+def fun_l11_n580()
+ fun_l12_n214
+end
+
+def fun_l11_n581()
+ fun_l12_n334
+end
+
+def fun_l11_n582()
+ fun_l12_n800
+end
+
+def fun_l11_n583()
+ fun_l12_n344
+end
+
+def fun_l11_n584()
+ fun_l12_n672
+end
+
+def fun_l11_n585()
+ fun_l12_n403
+end
+
+def fun_l11_n586()
+ fun_l12_n351
+end
+
+def fun_l11_n587()
+ fun_l12_n506
+end
+
+def fun_l11_n588()
+ fun_l12_n878
+end
+
+def fun_l11_n589()
+ fun_l12_n986
+end
+
+def fun_l11_n590()
+ fun_l12_n524
+end
+
+def fun_l11_n591()
+ fun_l12_n552
+end
+
+def fun_l11_n592()
+ fun_l12_n735
+end
+
+def fun_l11_n593()
+ fun_l12_n953
+end
+
+def fun_l11_n594()
+ fun_l12_n138
+end
+
+def fun_l11_n595()
+ fun_l12_n185
+end
+
+def fun_l11_n596()
+ fun_l12_n865
+end
+
+def fun_l11_n597()
+ fun_l12_n143
+end
+
+def fun_l11_n598()
+ fun_l12_n879
+end
+
+def fun_l11_n599()
+ fun_l12_n751
+end
+
+def fun_l11_n600()
+ fun_l12_n750
+end
+
+def fun_l11_n601()
+ fun_l12_n574
+end
+
+def fun_l11_n602()
+ fun_l12_n91
+end
+
+def fun_l11_n603()
+ fun_l12_n116
+end
+
+def fun_l11_n604()
+ fun_l12_n398
+end
+
+def fun_l11_n605()
+ fun_l12_n782
+end
+
+def fun_l11_n606()
+ fun_l12_n770
+end
+
+def fun_l11_n607()
+ fun_l12_n240
+end
+
+def fun_l11_n608()
+ fun_l12_n385
+end
+
+def fun_l11_n609()
+ fun_l12_n106
+end
+
+def fun_l11_n610()
+ fun_l12_n959
+end
+
+def fun_l11_n611()
+ fun_l12_n84
+end
+
+def fun_l11_n612()
+ fun_l12_n235
+end
+
+def fun_l11_n613()
+ fun_l12_n429
+end
+
+def fun_l11_n614()
+ fun_l12_n402
+end
+
+def fun_l11_n615()
+ fun_l12_n32
+end
+
+def fun_l11_n616()
+ fun_l12_n517
+end
+
+def fun_l11_n617()
+ fun_l12_n304
+end
+
+def fun_l11_n618()
+ fun_l12_n374
+end
+
+def fun_l11_n619()
+ fun_l12_n884
+end
+
+def fun_l11_n620()
+ fun_l12_n399
+end
+
+def fun_l11_n621()
+ fun_l12_n721
+end
+
+def fun_l11_n622()
+ fun_l12_n58
+end
+
+def fun_l11_n623()
+ fun_l12_n237
+end
+
+def fun_l11_n624()
+ fun_l12_n659
+end
+
+def fun_l11_n625()
+ fun_l12_n454
+end
+
+def fun_l11_n626()
+ fun_l12_n942
+end
+
+def fun_l11_n627()
+ fun_l12_n975
+end
+
+def fun_l11_n628()
+ fun_l12_n192
+end
+
+def fun_l11_n629()
+ fun_l12_n590
+end
+
+def fun_l11_n630()
+ fun_l12_n340
+end
+
+def fun_l11_n631()
+ fun_l12_n229
+end
+
+def fun_l11_n632()
+ fun_l12_n478
+end
+
+def fun_l11_n633()
+ fun_l12_n84
+end
+
+def fun_l11_n634()
+ fun_l12_n280
+end
+
+def fun_l11_n635()
+ fun_l12_n896
+end
+
+def fun_l11_n636()
+ fun_l12_n872
+end
+
+def fun_l11_n637()
+ fun_l12_n924
+end
+
+def fun_l11_n638()
+ fun_l12_n957
+end
+
+def fun_l11_n639()
+ fun_l12_n252
+end
+
+def fun_l11_n640()
+ fun_l12_n308
+end
+
+def fun_l11_n641()
+ fun_l12_n217
+end
+
+def fun_l11_n642()
+ fun_l12_n477
+end
+
+def fun_l11_n643()
+ fun_l12_n754
+end
+
+def fun_l11_n644()
+ fun_l12_n561
+end
+
+def fun_l11_n645()
+ fun_l12_n597
+end
+
+def fun_l11_n646()
+ fun_l12_n194
+end
+
+def fun_l11_n647()
+ fun_l12_n708
+end
+
+def fun_l11_n648()
+ fun_l12_n892
+end
+
+def fun_l11_n649()
+ fun_l12_n771
+end
+
+def fun_l11_n650()
+ fun_l12_n549
+end
+
+def fun_l11_n651()
+ fun_l12_n84
+end
+
+def fun_l11_n652()
+ fun_l12_n256
+end
+
+def fun_l11_n653()
+ fun_l12_n454
+end
+
+def fun_l11_n654()
+ fun_l12_n773
+end
+
+def fun_l11_n655()
+ fun_l12_n674
+end
+
+def fun_l11_n656()
+ fun_l12_n364
+end
+
+def fun_l11_n657()
+ fun_l12_n548
+end
+
+def fun_l11_n658()
+ fun_l12_n287
+end
+
+def fun_l11_n659()
+ fun_l12_n211
+end
+
+def fun_l11_n660()
+ fun_l12_n213
+end
+
+def fun_l11_n661()
+ fun_l12_n975
+end
+
+def fun_l11_n662()
+ fun_l12_n221
+end
+
+def fun_l11_n663()
+ fun_l12_n524
+end
+
+def fun_l11_n664()
+ fun_l12_n167
+end
+
+def fun_l11_n665()
+ fun_l12_n361
+end
+
+def fun_l11_n666()
+ fun_l12_n435
+end
+
+def fun_l11_n667()
+ fun_l12_n881
+end
+
+def fun_l11_n668()
+ fun_l12_n977
+end
+
+def fun_l11_n669()
+ fun_l12_n87
+end
+
+def fun_l11_n670()
+ fun_l12_n281
+end
+
+def fun_l11_n671()
+ fun_l12_n44
+end
+
+def fun_l11_n672()
+ fun_l12_n584
+end
+
+def fun_l11_n673()
+ fun_l12_n645
+end
+
+def fun_l11_n674()
+ fun_l12_n268
+end
+
+def fun_l11_n675()
+ fun_l12_n98
+end
+
+def fun_l11_n676()
+ fun_l12_n861
+end
+
+def fun_l11_n677()
+ fun_l12_n9
+end
+
+def fun_l11_n678()
+ fun_l12_n91
+end
+
+def fun_l11_n679()
+ fun_l12_n976
+end
+
+def fun_l11_n680()
+ fun_l12_n373
+end
+
+def fun_l11_n681()
+ fun_l12_n673
+end
+
+def fun_l11_n682()
+ fun_l12_n206
+end
+
+def fun_l11_n683()
+ fun_l12_n838
+end
+
+def fun_l11_n684()
+ fun_l12_n972
+end
+
+def fun_l11_n685()
+ fun_l12_n607
+end
+
+def fun_l11_n686()
+ fun_l12_n55
+end
+
+def fun_l11_n687()
+ fun_l12_n294
+end
+
+def fun_l11_n688()
+ fun_l12_n871
+end
+
+def fun_l11_n689()
+ fun_l12_n518
+end
+
+def fun_l11_n690()
+ fun_l12_n552
+end
+
+def fun_l11_n691()
+ fun_l12_n622
+end
+
+def fun_l11_n692()
+ fun_l12_n505
+end
+
+def fun_l11_n693()
+ fun_l12_n33
+end
+
+def fun_l11_n694()
+ fun_l12_n522
+end
+
+def fun_l11_n695()
+ fun_l12_n729
+end
+
+def fun_l11_n696()
+ fun_l12_n477
+end
+
+def fun_l11_n697()
+ fun_l12_n424
+end
+
+def fun_l11_n698()
+ fun_l12_n258
+end
+
+def fun_l11_n699()
+ fun_l12_n328
+end
+
+def fun_l11_n700()
+ fun_l12_n501
+end
+
+def fun_l11_n701()
+ fun_l12_n841
+end
+
+def fun_l11_n702()
+ fun_l12_n684
+end
+
+def fun_l11_n703()
+ fun_l12_n864
+end
+
+def fun_l11_n704()
+ fun_l12_n527
+end
+
+def fun_l11_n705()
+ fun_l12_n808
+end
+
+def fun_l11_n706()
+ fun_l12_n213
+end
+
+def fun_l11_n707()
+ fun_l12_n711
+end
+
+def fun_l11_n708()
+ fun_l12_n727
+end
+
+def fun_l11_n709()
+ fun_l12_n82
+end
+
+def fun_l11_n710()
+ fun_l12_n926
+end
+
+def fun_l11_n711()
+ fun_l12_n719
+end
+
+def fun_l11_n712()
+ fun_l12_n180
+end
+
+def fun_l11_n713()
+ fun_l12_n568
+end
+
+def fun_l11_n714()
+ fun_l12_n11
+end
+
+def fun_l11_n715()
+ fun_l12_n624
+end
+
+def fun_l11_n716()
+ fun_l12_n954
+end
+
+def fun_l11_n717()
+ fun_l12_n584
+end
+
+def fun_l11_n718()
+ fun_l12_n222
+end
+
+def fun_l11_n719()
+ fun_l12_n460
+end
+
+def fun_l11_n720()
+ fun_l12_n253
+end
+
+def fun_l11_n721()
+ fun_l12_n938
+end
+
+def fun_l11_n722()
+ fun_l12_n552
+end
+
+def fun_l11_n723()
+ fun_l12_n491
+end
+
+def fun_l11_n724()
+ fun_l12_n146
+end
+
+def fun_l11_n725()
+ fun_l12_n833
+end
+
+def fun_l11_n726()
+ fun_l12_n43
+end
+
+def fun_l11_n727()
+ fun_l12_n700
+end
+
+def fun_l11_n728()
+ fun_l12_n730
+end
+
+def fun_l11_n729()
+ fun_l12_n84
+end
+
+def fun_l11_n730()
+ fun_l12_n468
+end
+
+def fun_l11_n731()
+ fun_l12_n253
+end
+
+def fun_l11_n732()
+ fun_l12_n473
+end
+
+def fun_l11_n733()
+ fun_l12_n997
+end
+
+def fun_l11_n734()
+ fun_l12_n584
+end
+
+def fun_l11_n735()
+ fun_l12_n815
+end
+
+def fun_l11_n736()
+ fun_l12_n577
+end
+
+def fun_l11_n737()
+ fun_l12_n890
+end
+
+def fun_l11_n738()
+ fun_l12_n282
+end
+
+def fun_l11_n739()
+ fun_l12_n794
+end
+
+def fun_l11_n740()
+ fun_l12_n615
+end
+
+def fun_l11_n741()
+ fun_l12_n254
+end
+
+def fun_l11_n742()
+ fun_l12_n250
+end
+
+def fun_l11_n743()
+ fun_l12_n45
+end
+
+def fun_l11_n744()
+ fun_l12_n513
+end
+
+def fun_l11_n745()
+ fun_l12_n786
+end
+
+def fun_l11_n746()
+ fun_l12_n764
+end
+
+def fun_l11_n747()
+ fun_l12_n73
+end
+
+def fun_l11_n748()
+ fun_l12_n944
+end
+
+def fun_l11_n749()
+ fun_l12_n49
+end
+
+def fun_l11_n750()
+ fun_l12_n513
+end
+
+def fun_l11_n751()
+ fun_l12_n367
+end
+
+def fun_l11_n752()
+ fun_l12_n61
+end
+
+def fun_l11_n753()
+ fun_l12_n279
+end
+
+def fun_l11_n754()
+ fun_l12_n991
+end
+
+def fun_l11_n755()
+ fun_l12_n747
+end
+
+def fun_l11_n756()
+ fun_l12_n422
+end
+
+def fun_l11_n757()
+ fun_l12_n414
+end
+
+def fun_l11_n758()
+ fun_l12_n61
+end
+
+def fun_l11_n759()
+ fun_l12_n471
+end
+
+def fun_l11_n760()
+ fun_l12_n436
+end
+
+def fun_l11_n761()
+ fun_l12_n183
+end
+
+def fun_l11_n762()
+ fun_l12_n173
+end
+
+def fun_l11_n763()
+ fun_l12_n362
+end
+
+def fun_l11_n764()
+ fun_l12_n174
+end
+
+def fun_l11_n765()
+ fun_l12_n710
+end
+
+def fun_l11_n766()
+ fun_l12_n212
+end
+
+def fun_l11_n767()
+ fun_l12_n649
+end
+
+def fun_l11_n768()
+ fun_l12_n409
+end
+
+def fun_l11_n769()
+ fun_l12_n375
+end
+
+def fun_l11_n770()
+ fun_l12_n608
+end
+
+def fun_l11_n771()
+ fun_l12_n447
+end
+
+def fun_l11_n772()
+ fun_l12_n530
+end
+
+def fun_l11_n773()
+ fun_l12_n359
+end
+
+def fun_l11_n774()
+ fun_l12_n317
+end
+
+def fun_l11_n775()
+ fun_l12_n105
+end
+
+def fun_l11_n776()
+ fun_l12_n65
+end
+
+def fun_l11_n777()
+ fun_l12_n243
+end
+
+def fun_l11_n778()
+ fun_l12_n274
+end
+
+def fun_l11_n779()
+ fun_l12_n560
+end
+
+def fun_l11_n780()
+ fun_l12_n155
+end
+
+def fun_l11_n781()
+ fun_l12_n277
+end
+
+def fun_l11_n782()
+ fun_l12_n255
+end
+
+def fun_l11_n783()
+ fun_l12_n184
+end
+
+def fun_l11_n784()
+ fun_l12_n495
+end
+
+def fun_l11_n785()
+ fun_l12_n910
+end
+
+def fun_l11_n786()
+ fun_l12_n245
+end
+
+def fun_l11_n787()
+ fun_l12_n761
+end
+
+def fun_l11_n788()
+ fun_l12_n501
+end
+
+def fun_l11_n789()
+ fun_l12_n11
+end
+
+def fun_l11_n790()
+ fun_l12_n87
+end
+
+def fun_l11_n791()
+ fun_l12_n233
+end
+
+def fun_l11_n792()
+ fun_l12_n201
+end
+
+def fun_l11_n793()
+ fun_l12_n471
+end
+
+def fun_l11_n794()
+ fun_l12_n6
+end
+
+def fun_l11_n795()
+ fun_l12_n257
+end
+
+def fun_l11_n796()
+ fun_l12_n104
+end
+
+def fun_l11_n797()
+ fun_l12_n712
+end
+
+def fun_l11_n798()
+ fun_l12_n408
+end
+
+def fun_l11_n799()
+ fun_l12_n713
+end
+
+def fun_l11_n800()
+ fun_l12_n622
+end
+
+def fun_l11_n801()
+ fun_l12_n498
+end
+
+def fun_l11_n802()
+ fun_l12_n904
+end
+
+def fun_l11_n803()
+ fun_l12_n413
+end
+
+def fun_l11_n804()
+ fun_l12_n424
+end
+
+def fun_l11_n805()
+ fun_l12_n209
+end
+
+def fun_l11_n806()
+ fun_l12_n171
+end
+
+def fun_l11_n807()
+ fun_l12_n835
+end
+
+def fun_l11_n808()
+ fun_l12_n872
+end
+
+def fun_l11_n809()
+ fun_l12_n456
+end
+
+def fun_l11_n810()
+ fun_l12_n586
+end
+
+def fun_l11_n811()
+ fun_l12_n422
+end
+
+def fun_l11_n812()
+ fun_l12_n125
+end
+
+def fun_l11_n813()
+ fun_l12_n482
+end
+
+def fun_l11_n814()
+ fun_l12_n17
+end
+
+def fun_l11_n815()
+ fun_l12_n966
+end
+
+def fun_l11_n816()
+ fun_l12_n408
+end
+
+def fun_l11_n817()
+ fun_l12_n874
+end
+
+def fun_l11_n818()
+ fun_l12_n454
+end
+
+def fun_l11_n819()
+ fun_l12_n818
+end
+
+def fun_l11_n820()
+ fun_l12_n469
+end
+
+def fun_l11_n821()
+ fun_l12_n104
+end
+
+def fun_l11_n822()
+ fun_l12_n765
+end
+
+def fun_l11_n823()
+ fun_l12_n472
+end
+
+def fun_l11_n824()
+ fun_l12_n794
+end
+
+def fun_l11_n825()
+ fun_l12_n609
+end
+
+def fun_l11_n826()
+ fun_l12_n609
+end
+
+def fun_l11_n827()
+ fun_l12_n99
+end
+
+def fun_l11_n828()
+ fun_l12_n844
+end
+
+def fun_l11_n829()
+ fun_l12_n423
+end
+
+def fun_l11_n830()
+ fun_l12_n560
+end
+
+def fun_l11_n831()
+ fun_l12_n60
+end
+
+def fun_l11_n832()
+ fun_l12_n670
+end
+
+def fun_l11_n833()
+ fun_l12_n591
+end
+
+def fun_l11_n834()
+ fun_l12_n572
+end
+
+def fun_l11_n835()
+ fun_l12_n96
+end
+
+def fun_l11_n836()
+ fun_l12_n567
+end
+
+def fun_l11_n837()
+ fun_l12_n239
+end
+
+def fun_l11_n838()
+ fun_l12_n937
+end
+
+def fun_l11_n839()
+ fun_l12_n853
+end
+
+def fun_l11_n840()
+ fun_l12_n440
+end
+
+def fun_l11_n841()
+ fun_l12_n930
+end
+
+def fun_l11_n842()
+ fun_l12_n448
+end
+
+def fun_l11_n843()
+ fun_l12_n185
+end
+
+def fun_l11_n844()
+ fun_l12_n904
+end
+
+def fun_l11_n845()
+ fun_l12_n399
+end
+
+def fun_l11_n846()
+ fun_l12_n184
+end
+
+def fun_l11_n847()
+ fun_l12_n985
+end
+
+def fun_l11_n848()
+ fun_l12_n966
+end
+
+def fun_l11_n849()
+ fun_l12_n183
+end
+
+def fun_l11_n850()
+ fun_l12_n418
+end
+
+def fun_l11_n851()
+ fun_l12_n546
+end
+
+def fun_l11_n852()
+ fun_l12_n96
+end
+
+def fun_l11_n853()
+ fun_l12_n172
+end
+
+def fun_l11_n854()
+ fun_l12_n546
+end
+
+def fun_l11_n855()
+ fun_l12_n86
+end
+
+def fun_l11_n856()
+ fun_l12_n815
+end
+
+def fun_l11_n857()
+ fun_l12_n552
+end
+
+def fun_l11_n858()
+ fun_l12_n657
+end
+
+def fun_l11_n859()
+ fun_l12_n567
+end
+
+def fun_l11_n860()
+ fun_l12_n561
+end
+
+def fun_l11_n861()
+ fun_l12_n590
+end
+
+def fun_l11_n862()
+ fun_l12_n28
+end
+
+def fun_l11_n863()
+ fun_l12_n935
+end
+
+def fun_l11_n864()
+ fun_l12_n950
+end
+
+def fun_l11_n865()
+ fun_l12_n946
+end
+
+def fun_l11_n866()
+ fun_l12_n77
+end
+
+def fun_l11_n867()
+ fun_l12_n454
+end
+
+def fun_l11_n868()
+ fun_l12_n813
+end
+
+def fun_l11_n869()
+ fun_l12_n562
+end
+
+def fun_l11_n870()
+ fun_l12_n598
+end
+
+def fun_l11_n871()
+ fun_l12_n331
+end
+
+def fun_l11_n872()
+ fun_l12_n156
+end
+
+def fun_l11_n873()
+ fun_l12_n807
+end
+
+def fun_l11_n874()
+ fun_l12_n442
+end
+
+def fun_l11_n875()
+ fun_l12_n322
+end
+
+def fun_l11_n876()
+ fun_l12_n472
+end
+
+def fun_l11_n877()
+ fun_l12_n581
+end
+
+def fun_l11_n878()
+ fun_l12_n94
+end
+
+def fun_l11_n879()
+ fun_l12_n270
+end
+
+def fun_l11_n880()
+ fun_l12_n63
+end
+
+def fun_l11_n881()
+ fun_l12_n290
+end
+
+def fun_l11_n882()
+ fun_l12_n148
+end
+
+def fun_l11_n883()
+ fun_l12_n862
+end
+
+def fun_l11_n884()
+ fun_l12_n527
+end
+
+def fun_l11_n885()
+ fun_l12_n166
+end
+
+def fun_l11_n886()
+ fun_l12_n422
+end
+
+def fun_l11_n887()
+ fun_l12_n195
+end
+
+def fun_l11_n888()
+ fun_l12_n592
+end
+
+def fun_l11_n889()
+ fun_l12_n116
+end
+
+def fun_l11_n890()
+ fun_l12_n923
+end
+
+def fun_l11_n891()
+ fun_l12_n422
+end
+
+def fun_l11_n892()
+ fun_l12_n945
+end
+
+def fun_l11_n893()
+ fun_l12_n850
+end
+
+def fun_l11_n894()
+ fun_l12_n598
+end
+
+def fun_l11_n895()
+ fun_l12_n448
+end
+
+def fun_l11_n896()
+ fun_l12_n955
+end
+
+def fun_l11_n897()
+ fun_l12_n259
+end
+
+def fun_l11_n898()
+ fun_l12_n145
+end
+
+def fun_l11_n899()
+ fun_l12_n321
+end
+
+def fun_l11_n900()
+ fun_l12_n680
+end
+
+def fun_l11_n901()
+ fun_l12_n856
+end
+
+def fun_l11_n902()
+ fun_l12_n776
+end
+
+def fun_l11_n903()
+ fun_l12_n108
+end
+
+def fun_l11_n904()
+ fun_l12_n340
+end
+
+def fun_l11_n905()
+ fun_l12_n78
+end
+
+def fun_l11_n906()
+ fun_l12_n218
+end
+
+def fun_l11_n907()
+ fun_l12_n288
+end
+
+def fun_l11_n908()
+ fun_l12_n197
+end
+
+def fun_l11_n909()
+ fun_l12_n890
+end
+
+def fun_l11_n910()
+ fun_l12_n850
+end
+
+def fun_l11_n911()
+ fun_l12_n964
+end
+
+def fun_l11_n912()
+ fun_l12_n47
+end
+
+def fun_l11_n913()
+ fun_l12_n462
+end
+
+def fun_l11_n914()
+ fun_l12_n461
+end
+
+def fun_l11_n915()
+ fun_l12_n57
+end
+
+def fun_l11_n916()
+ fun_l12_n938
+end
+
+def fun_l11_n917()
+ fun_l12_n841
+end
+
+def fun_l11_n918()
+ fun_l12_n462
+end
+
+def fun_l11_n919()
+ fun_l12_n425
+end
+
+def fun_l11_n920()
+ fun_l12_n775
+end
+
+def fun_l11_n921()
+ fun_l12_n302
+end
+
+def fun_l11_n922()
+ fun_l12_n921
+end
+
+def fun_l11_n923()
+ fun_l12_n322
+end
+
+def fun_l11_n924()
+ fun_l12_n414
+end
+
+def fun_l11_n925()
+ fun_l12_n461
+end
+
+def fun_l11_n926()
+ fun_l12_n476
+end
+
+def fun_l11_n927()
+ fun_l12_n537
+end
+
+def fun_l11_n928()
+ fun_l12_n359
+end
+
+def fun_l11_n929()
+ fun_l12_n297
+end
+
+def fun_l11_n930()
+ fun_l12_n134
+end
+
+def fun_l11_n931()
+ fun_l12_n875
+end
+
+def fun_l11_n932()
+ fun_l12_n763
+end
+
+def fun_l11_n933()
+ fun_l12_n180
+end
+
+def fun_l11_n934()
+ fun_l12_n522
+end
+
+def fun_l11_n935()
+ fun_l12_n701
+end
+
+def fun_l11_n936()
+ fun_l12_n793
+end
+
+def fun_l11_n937()
+ fun_l12_n853
+end
+
+def fun_l11_n938()
+ fun_l12_n208
+end
+
+def fun_l11_n939()
+ fun_l12_n307
+end
+
+def fun_l11_n940()
+ fun_l12_n695
+end
+
+def fun_l11_n941()
+ fun_l12_n171
+end
+
+def fun_l11_n942()
+ fun_l12_n181
+end
+
+def fun_l11_n943()
+ fun_l12_n58
+end
+
+def fun_l11_n944()
+ fun_l12_n733
+end
+
+def fun_l11_n945()
+ fun_l12_n7
+end
+
+def fun_l11_n946()
+ fun_l12_n332
+end
+
+def fun_l11_n947()
+ fun_l12_n323
+end
+
+def fun_l11_n948()
+ fun_l12_n240
+end
+
+def fun_l11_n949()
+ fun_l12_n21
+end
+
+def fun_l11_n950()
+ fun_l12_n814
+end
+
+def fun_l11_n951()
+ fun_l12_n943
+end
+
+def fun_l11_n952()
+ fun_l12_n4
+end
+
+def fun_l11_n953()
+ fun_l12_n747
+end
+
+def fun_l11_n954()
+ fun_l12_n500
+end
+
+def fun_l11_n955()
+ fun_l12_n361
+end
+
+def fun_l11_n956()
+ fun_l12_n898
+end
+
+def fun_l11_n957()
+ fun_l12_n216
+end
+
+def fun_l11_n958()
+ fun_l12_n58
+end
+
+def fun_l11_n959()
+ fun_l12_n327
+end
+
+def fun_l11_n960()
+ fun_l12_n405
+end
+
+def fun_l11_n961()
+ fun_l12_n665
+end
+
+def fun_l11_n962()
+ fun_l12_n456
+end
+
+def fun_l11_n963()
+ fun_l12_n399
+end
+
+def fun_l11_n964()
+ fun_l12_n836
+end
+
+def fun_l11_n965()
+ fun_l12_n18
+end
+
+def fun_l11_n966()
+ fun_l12_n236
+end
+
+def fun_l11_n967()
+ fun_l12_n594
+end
+
+def fun_l11_n968()
+ fun_l12_n147
+end
+
+def fun_l11_n969()
+ fun_l12_n758
+end
+
+def fun_l11_n970()
+ fun_l12_n271
+end
+
+def fun_l11_n971()
+ fun_l12_n551
+end
+
+def fun_l11_n972()
+ fun_l12_n332
+end
+
+def fun_l11_n973()
+ fun_l12_n348
+end
+
+def fun_l11_n974()
+ fun_l12_n158
+end
+
+def fun_l11_n975()
+ fun_l12_n990
+end
+
+def fun_l11_n976()
+ fun_l12_n330
+end
+
+def fun_l11_n977()
+ fun_l12_n764
+end
+
+def fun_l11_n978()
+ fun_l12_n844
+end
+
+def fun_l11_n979()
+ fun_l12_n452
+end
+
+def fun_l11_n980()
+ fun_l12_n593
+end
+
+def fun_l11_n981()
+ fun_l12_n762
+end
+
+def fun_l11_n982()
+ fun_l12_n736
+end
+
+def fun_l11_n983()
+ fun_l12_n957
+end
+
+def fun_l11_n984()
+ fun_l12_n174
+end
+
+def fun_l11_n985()
+ fun_l12_n454
+end
+
+def fun_l11_n986()
+ fun_l12_n492
+end
+
+def fun_l11_n987()
+ fun_l12_n986
+end
+
+def fun_l11_n988()
+ fun_l12_n868
+end
+
+def fun_l11_n989()
+ fun_l12_n445
+end
+
+def fun_l11_n990()
+ fun_l12_n422
+end
+
+def fun_l11_n991()
+ fun_l12_n877
+end
+
+def fun_l11_n992()
+ fun_l12_n150
+end
+
+def fun_l11_n993()
+ fun_l12_n163
+end
+
+def fun_l11_n994()
+ fun_l12_n183
+end
+
+def fun_l11_n995()
+ fun_l12_n100
+end
+
+def fun_l11_n996()
+ fun_l12_n297
+end
+
+def fun_l11_n997()
+ fun_l12_n43
+end
+
+def fun_l11_n998()
+ fun_l12_n324
+end
+
+def fun_l11_n999()
+ fun_l12_n732
+end
+
+def fun_l12_n0()
+ fun_l13_n595
+end
+
+def fun_l12_n1()
+ fun_l13_n185
+end
+
+def fun_l12_n2()
+ fun_l13_n257
+end
+
+def fun_l12_n3()
+ fun_l13_n865
+end
+
+def fun_l12_n4()
+ fun_l13_n857
+end
+
+def fun_l12_n5()
+ fun_l13_n9
+end
+
+def fun_l12_n6()
+ fun_l13_n41
+end
+
+def fun_l12_n7()
+ fun_l13_n430
+end
+
+def fun_l12_n8()
+ fun_l13_n394
+end
+
+def fun_l12_n9()
+ fun_l13_n20
+end
+
+def fun_l12_n10()
+ fun_l13_n527
+end
+
+def fun_l12_n11()
+ fun_l13_n158
+end
+
+def fun_l12_n12()
+ fun_l13_n229
+end
+
+def fun_l12_n13()
+ fun_l13_n205
+end
+
+def fun_l12_n14()
+ fun_l13_n88
+end
+
+def fun_l12_n15()
+ fun_l13_n359
+end
+
+def fun_l12_n16()
+ fun_l13_n204
+end
+
+def fun_l12_n17()
+ fun_l13_n297
+end
+
+def fun_l12_n18()
+ fun_l13_n531
+end
+
+def fun_l12_n19()
+ fun_l13_n244
+end
+
+def fun_l12_n20()
+ fun_l13_n587
+end
+
+def fun_l12_n21()
+ fun_l13_n731
+end
+
+def fun_l12_n22()
+ fun_l13_n839
+end
+
+def fun_l12_n23()
+ fun_l13_n560
+end
+
+def fun_l12_n24()
+ fun_l13_n22
+end
+
+def fun_l12_n25()
+ fun_l13_n383
+end
+
+def fun_l12_n26()
+ fun_l13_n321
+end
+
+def fun_l12_n27()
+ fun_l13_n286
+end
+
+def fun_l12_n28()
+ fun_l13_n951
+end
+
+def fun_l12_n29()
+ fun_l13_n172
+end
+
+def fun_l12_n30()
+ fun_l13_n804
+end
+
+def fun_l12_n31()
+ fun_l13_n619
+end
+
+def fun_l12_n32()
+ fun_l13_n464
+end
+
+def fun_l12_n33()
+ fun_l13_n87
+end
+
+def fun_l12_n34()
+ fun_l13_n544
+end
+
+def fun_l12_n35()
+ fun_l13_n37
+end
+
+def fun_l12_n36()
+ fun_l13_n614
+end
+
+def fun_l12_n37()
+ fun_l13_n426
+end
+
+def fun_l12_n38()
+ fun_l13_n335
+end
+
+def fun_l12_n39()
+ fun_l13_n689
+end
+
+def fun_l12_n40()
+ fun_l13_n220
+end
+
+def fun_l12_n41()
+ fun_l13_n77
+end
+
+def fun_l12_n42()
+ fun_l13_n791
+end
+
+def fun_l12_n43()
+ fun_l13_n514
+end
+
+def fun_l12_n44()
+ fun_l13_n802
+end
+
+def fun_l12_n45()
+ fun_l13_n860
+end
+
+def fun_l12_n46()
+ fun_l13_n562
+end
+
+def fun_l12_n47()
+ fun_l13_n208
+end
+
+def fun_l12_n48()
+ fun_l13_n167
+end
+
+def fun_l12_n49()
+ fun_l13_n772
+end
+
+def fun_l12_n50()
+ fun_l13_n303
+end
+
+def fun_l12_n51()
+ fun_l13_n757
+end
+
+def fun_l12_n52()
+ fun_l13_n558
+end
+
+def fun_l12_n53()
+ fun_l13_n45
+end
+
+def fun_l12_n54()
+ fun_l13_n292
+end
+
+def fun_l12_n55()
+ fun_l13_n558
+end
+
+def fun_l12_n56()
+ fun_l13_n361
+end
+
+def fun_l12_n57()
+ fun_l13_n605
+end
+
+def fun_l12_n58()
+ fun_l13_n16
+end
+
+def fun_l12_n59()
+ fun_l13_n73
+end
+
+def fun_l12_n60()
+ fun_l13_n292
+end
+
+def fun_l12_n61()
+ fun_l13_n747
+end
+
+def fun_l12_n62()
+ fun_l13_n798
+end
+
+def fun_l12_n63()
+ fun_l13_n130
+end
+
+def fun_l12_n64()
+ fun_l13_n261
+end
+
+def fun_l12_n65()
+ fun_l13_n122
+end
+
+def fun_l12_n66()
+ fun_l13_n346
+end
+
+def fun_l12_n67()
+ fun_l13_n308
+end
+
+def fun_l12_n68()
+ fun_l13_n27
+end
+
+def fun_l12_n69()
+ fun_l13_n433
+end
+
+def fun_l12_n70()
+ fun_l13_n509
+end
+
+def fun_l12_n71()
+ fun_l13_n643
+end
+
+def fun_l12_n72()
+ fun_l13_n462
+end
+
+def fun_l12_n73()
+ fun_l13_n976
+end
+
+def fun_l12_n74()
+ fun_l13_n157
+end
+
+def fun_l12_n75()
+ fun_l13_n733
+end
+
+def fun_l12_n76()
+ fun_l13_n976
+end
+
+def fun_l12_n77()
+ fun_l13_n369
+end
+
+def fun_l12_n78()
+ fun_l13_n308
+end
+
+def fun_l12_n79()
+ fun_l13_n958
+end
+
+def fun_l12_n80()
+ fun_l13_n95
+end
+
+def fun_l12_n81()
+ fun_l13_n653
+end
+
+def fun_l12_n82()
+ fun_l13_n624
+end
+
+def fun_l12_n83()
+ fun_l13_n712
+end
+
+def fun_l12_n84()
+ fun_l13_n950
+end
+
+def fun_l12_n85()
+ fun_l13_n836
+end
+
+def fun_l12_n86()
+ fun_l13_n496
+end
+
+def fun_l12_n87()
+ fun_l13_n727
+end
+
+def fun_l12_n88()
+ fun_l13_n368
+end
+
+def fun_l12_n89()
+ fun_l13_n727
+end
+
+def fun_l12_n90()
+ fun_l13_n682
+end
+
+def fun_l12_n91()
+ fun_l13_n758
+end
+
+def fun_l12_n92()
+ fun_l13_n910
+end
+
+def fun_l12_n93()
+ fun_l13_n490
+end
+
+def fun_l12_n94()
+ fun_l13_n405
+end
+
+def fun_l12_n95()
+ fun_l13_n171
+end
+
+def fun_l12_n96()
+ fun_l13_n69
+end
+
+def fun_l12_n97()
+ fun_l13_n519
+end
+
+def fun_l12_n98()
+ fun_l13_n476
+end
+
+def fun_l12_n99()
+ fun_l13_n399
+end
+
+def fun_l12_n100()
+ fun_l13_n93
+end
+
+def fun_l12_n101()
+ fun_l13_n220
+end
+
+def fun_l12_n102()
+ fun_l13_n483
+end
+
+def fun_l12_n103()
+ fun_l13_n176
+end
+
+def fun_l12_n104()
+ fun_l13_n210
+end
+
+def fun_l12_n105()
+ fun_l13_n111
+end
+
+def fun_l12_n106()
+ fun_l13_n436
+end
+
+def fun_l12_n107()
+ fun_l13_n887
+end
+
+def fun_l12_n108()
+ fun_l13_n118
+end
+
+def fun_l12_n109()
+ fun_l13_n630
+end
+
+def fun_l12_n110()
+ fun_l13_n262
+end
+
+def fun_l12_n111()
+ fun_l13_n975
+end
+
+def fun_l12_n112()
+ fun_l13_n280
+end
+
+def fun_l12_n113()
+ fun_l13_n341
+end
+
+def fun_l12_n114()
+ fun_l13_n452
+end
+
+def fun_l12_n115()
+ fun_l13_n762
+end
+
+def fun_l12_n116()
+ fun_l13_n230
+end
+
+def fun_l12_n117()
+ fun_l13_n470
+end
+
+def fun_l12_n118()
+ fun_l13_n257
+end
+
+def fun_l12_n119()
+ fun_l13_n920
+end
+
+def fun_l12_n120()
+ fun_l13_n600
+end
+
+def fun_l12_n121()
+ fun_l13_n947
+end
+
+def fun_l12_n122()
+ fun_l13_n643
+end
+
+def fun_l12_n123()
+ fun_l13_n18
+end
+
+def fun_l12_n124()
+ fun_l13_n680
+end
+
+def fun_l12_n125()
+ fun_l13_n926
+end
+
+def fun_l12_n126()
+ fun_l13_n841
+end
+
+def fun_l12_n127()
+ fun_l13_n391
+end
+
+def fun_l12_n128()
+ fun_l13_n617
+end
+
+def fun_l12_n129()
+ fun_l13_n484
+end
+
+def fun_l12_n130()
+ fun_l13_n211
+end
+
+def fun_l12_n131()
+ fun_l13_n206
+end
+
+def fun_l12_n132()
+ fun_l13_n789
+end
+
+def fun_l12_n133()
+ fun_l13_n660
+end
+
+def fun_l12_n134()
+ fun_l13_n386
+end
+
+def fun_l12_n135()
+ fun_l13_n414
+end
+
+def fun_l12_n136()
+ fun_l13_n271
+end
+
+def fun_l12_n137()
+ fun_l13_n444
+end
+
+def fun_l12_n138()
+ fun_l13_n661
+end
+
+def fun_l12_n139()
+ fun_l13_n784
+end
+
+def fun_l12_n140()
+ fun_l13_n919
+end
+
+def fun_l12_n141()
+ fun_l13_n29
+end
+
+def fun_l12_n142()
+ fun_l13_n92
+end
+
+def fun_l12_n143()
+ fun_l13_n380
+end
+
+def fun_l12_n144()
+ fun_l13_n826
+end
+
+def fun_l12_n145()
+ fun_l13_n222
+end
+
+def fun_l12_n146()
+ fun_l13_n891
+end
+
+def fun_l12_n147()
+ fun_l13_n162
+end
+
+def fun_l12_n148()
+ fun_l13_n737
+end
+
+def fun_l12_n149()
+ fun_l13_n342
+end
+
+def fun_l12_n150()
+ fun_l13_n371
+end
+
+def fun_l12_n151()
+ fun_l13_n903
+end
+
+def fun_l12_n152()
+ fun_l13_n556
+end
+
+def fun_l12_n153()
+ fun_l13_n333
+end
+
+def fun_l12_n154()
+ fun_l13_n193
+end
+
+def fun_l12_n155()
+ fun_l13_n518
+end
+
+def fun_l12_n156()
+ fun_l13_n411
+end
+
+def fun_l12_n157()
+ fun_l13_n249
+end
+
+def fun_l12_n158()
+ fun_l13_n53
+end
+
+def fun_l12_n159()
+ fun_l13_n467
+end
+
+def fun_l12_n160()
+ fun_l13_n433
+end
+
+def fun_l12_n161()
+ fun_l13_n773
+end
+
+def fun_l12_n162()
+ fun_l13_n178
+end
+
+def fun_l12_n163()
+ fun_l13_n641
+end
+
+def fun_l12_n164()
+ fun_l13_n308
+end
+
+def fun_l12_n165()
+ fun_l13_n787
+end
+
+def fun_l12_n166()
+ fun_l13_n829
+end
+
+def fun_l12_n167()
+ fun_l13_n929
+end
+
+def fun_l12_n168()
+ fun_l13_n788
+end
+
+def fun_l12_n169()
+ fun_l13_n948
+end
+
+def fun_l12_n170()
+ fun_l13_n444
+end
+
+def fun_l12_n171()
+ fun_l13_n946
+end
+
+def fun_l12_n172()
+ fun_l13_n303
+end
+
+def fun_l12_n173()
+ fun_l13_n196
+end
+
+def fun_l12_n174()
+ fun_l13_n521
+end
+
+def fun_l12_n175()
+ fun_l13_n372
+end
+
+def fun_l12_n176()
+ fun_l13_n411
+end
+
+def fun_l12_n177()
+ fun_l13_n434
+end
+
+def fun_l12_n178()
+ fun_l13_n599
+end
+
+def fun_l12_n179()
+ fun_l13_n507
+end
+
+def fun_l12_n180()
+ fun_l13_n781
+end
+
+def fun_l12_n181()
+ fun_l13_n186
+end
+
+def fun_l12_n182()
+ fun_l13_n737
+end
+
+def fun_l12_n183()
+ fun_l13_n993
+end
+
+def fun_l12_n184()
+ fun_l13_n806
+end
+
+def fun_l12_n185()
+ fun_l13_n45
+end
+
+def fun_l12_n186()
+ fun_l13_n30
+end
+
+def fun_l12_n187()
+ fun_l13_n774
+end
+
+def fun_l12_n188()
+ fun_l13_n715
+end
+
+def fun_l12_n189()
+ fun_l13_n351
+end
+
+def fun_l12_n190()
+ fun_l13_n173
+end
+
+def fun_l12_n191()
+ fun_l13_n574
+end
+
+def fun_l12_n192()
+ fun_l13_n768
+end
+
+def fun_l12_n193()
+ fun_l13_n514
+end
+
+def fun_l12_n194()
+ fun_l13_n505
+end
+
+def fun_l12_n195()
+ fun_l13_n460
+end
+
+def fun_l12_n196()
+ fun_l13_n377
+end
+
+def fun_l12_n197()
+ fun_l13_n275
+end
+
+def fun_l12_n198()
+ fun_l13_n642
+end
+
+def fun_l12_n199()
+ fun_l13_n746
+end
+
+def fun_l12_n200()
+ fun_l13_n507
+end
+
+def fun_l12_n201()
+ fun_l13_n576
+end
+
+def fun_l12_n202()
+ fun_l13_n899
+end
+
+def fun_l12_n203()
+ fun_l13_n88
+end
+
+def fun_l12_n204()
+ fun_l13_n735
+end
+
+def fun_l12_n205()
+ fun_l13_n270
+end
+
+def fun_l12_n206()
+ fun_l13_n398
+end
+
+def fun_l12_n207()
+ fun_l13_n98
+end
+
+def fun_l12_n208()
+ fun_l13_n272
+end
+
+def fun_l12_n209()
+ fun_l13_n493
+end
+
+def fun_l12_n210()
+ fun_l13_n893
+end
+
+def fun_l12_n211()
+ fun_l13_n550
+end
+
+def fun_l12_n212()
+ fun_l13_n428
+end
+
+def fun_l12_n213()
+ fun_l13_n20
+end
+
+def fun_l12_n214()
+ fun_l13_n437
+end
+
+def fun_l12_n215()
+ fun_l13_n964
+end
+
+def fun_l12_n216()
+ fun_l13_n880
+end
+
+def fun_l12_n217()
+ fun_l13_n119
+end
+
+def fun_l12_n218()
+ fun_l13_n125
+end
+
+def fun_l12_n219()
+ fun_l13_n48
+end
+
+def fun_l12_n220()
+ fun_l13_n749
+end
+
+def fun_l12_n221()
+ fun_l13_n65
+end
+
+def fun_l12_n222()
+ fun_l13_n535
+end
+
+def fun_l12_n223()
+ fun_l13_n770
+end
+
+def fun_l12_n224()
+ fun_l13_n118
+end
+
+def fun_l12_n225()
+ fun_l13_n859
+end
+
+def fun_l12_n226()
+ fun_l13_n768
+end
+
+def fun_l12_n227()
+ fun_l13_n981
+end
+
+def fun_l12_n228()
+ fun_l13_n518
+end
+
+def fun_l12_n229()
+ fun_l13_n361
+end
+
+def fun_l12_n230()
+ fun_l13_n255
+end
+
+def fun_l12_n231()
+ fun_l13_n922
+end
+
+def fun_l12_n232()
+ fun_l13_n375
+end
+
+def fun_l12_n233()
+ fun_l13_n265
+end
+
+def fun_l12_n234()
+ fun_l13_n832
+end
+
+def fun_l12_n235()
+ fun_l13_n147
+end
+
+def fun_l12_n236()
+ fun_l13_n162
+end
+
+def fun_l12_n237()
+ fun_l13_n832
+end
+
+def fun_l12_n238()
+ fun_l13_n930
+end
+
+def fun_l12_n239()
+ fun_l13_n429
+end
+
+def fun_l12_n240()
+ fun_l13_n429
+end
+
+def fun_l12_n241()
+ fun_l13_n152
+end
+
+def fun_l12_n242()
+ fun_l13_n287
+end
+
+def fun_l12_n243()
+ fun_l13_n140
+end
+
+def fun_l12_n244()
+ fun_l13_n994
+end
+
+def fun_l12_n245()
+ fun_l13_n815
+end
+
+def fun_l12_n246()
+ fun_l13_n865
+end
+
+def fun_l12_n247()
+ fun_l13_n613
+end
+
+def fun_l12_n248()
+ fun_l13_n347
+end
+
+def fun_l12_n249()
+ fun_l13_n959
+end
+
+def fun_l12_n250()
+ fun_l13_n870
+end
+
+def fun_l12_n251()
+ fun_l13_n167
+end
+
+def fun_l12_n252()
+ fun_l13_n860
+end
+
+def fun_l12_n253()
+ fun_l13_n897
+end
+
+def fun_l12_n254()
+ fun_l13_n605
+end
+
+def fun_l12_n255()
+ fun_l13_n136
+end
+
+def fun_l12_n256()
+ fun_l13_n636
+end
+
+def fun_l12_n257()
+ fun_l13_n60
+end
+
+def fun_l12_n258()
+ fun_l13_n925
+end
+
+def fun_l12_n259()
+ fun_l13_n472
+end
+
+def fun_l12_n260()
+ fun_l13_n423
+end
+
+def fun_l12_n261()
+ fun_l13_n798
+end
+
+def fun_l12_n262()
+ fun_l13_n381
+end
+
+def fun_l12_n263()
+ fun_l13_n922
+end
+
+def fun_l12_n264()
+ fun_l13_n923
+end
+
+def fun_l12_n265()
+ fun_l13_n644
+end
+
+def fun_l12_n266()
+ fun_l13_n334
+end
+
+def fun_l12_n267()
+ fun_l13_n201
+end
+
+def fun_l12_n268()
+ fun_l13_n690
+end
+
+def fun_l12_n269()
+ fun_l13_n699
+end
+
+def fun_l12_n270()
+ fun_l13_n269
+end
+
+def fun_l12_n271()
+ fun_l13_n582
+end
+
+def fun_l12_n272()
+ fun_l13_n513
+end
+
+def fun_l12_n273()
+ fun_l13_n723
+end
+
+def fun_l12_n274()
+ fun_l13_n757
+end
+
+def fun_l12_n275()
+ fun_l13_n390
+end
+
+def fun_l12_n276()
+ fun_l13_n459
+end
+
+def fun_l12_n277()
+ fun_l13_n973
+end
+
+def fun_l12_n278()
+ fun_l13_n762
+end
+
+def fun_l12_n279()
+ fun_l13_n829
+end
+
+def fun_l12_n280()
+ fun_l13_n706
+end
+
+def fun_l12_n281()
+ fun_l13_n769
+end
+
+def fun_l12_n282()
+ fun_l13_n736
+end
+
+def fun_l12_n283()
+ fun_l13_n931
+end
+
+def fun_l12_n284()
+ fun_l13_n226
+end
+
+def fun_l12_n285()
+ fun_l13_n688
+end
+
+def fun_l12_n286()
+ fun_l13_n74
+end
+
+def fun_l12_n287()
+ fun_l13_n470
+end
+
+def fun_l12_n288()
+ fun_l13_n932
+end
+
+def fun_l12_n289()
+ fun_l13_n923
+end
+
+def fun_l12_n290()
+ fun_l13_n53
+end
+
+def fun_l12_n291()
+ fun_l13_n113
+end
+
+def fun_l12_n292()
+ fun_l13_n115
+end
+
+def fun_l12_n293()
+ fun_l13_n864
+end
+
+def fun_l12_n294()
+ fun_l13_n503
+end
+
+def fun_l12_n295()
+ fun_l13_n998
+end
+
+def fun_l12_n296()
+ fun_l13_n637
+end
+
+def fun_l12_n297()
+ fun_l13_n655
+end
+
+def fun_l12_n298()
+ fun_l13_n50
+end
+
+def fun_l12_n299()
+ fun_l13_n564
+end
+
+def fun_l12_n300()
+ fun_l13_n39
+end
+
+def fun_l12_n301()
+ fun_l13_n836
+end
+
+def fun_l12_n302()
+ fun_l13_n85
+end
+
+def fun_l12_n303()
+ fun_l13_n992
+end
+
+def fun_l12_n304()
+ fun_l13_n956
+end
+
+def fun_l12_n305()
+ fun_l13_n746
+end
+
+def fun_l12_n306()
+ fun_l13_n281
+end
+
+def fun_l12_n307()
+ fun_l13_n790
+end
+
+def fun_l12_n308()
+ fun_l13_n69
+end
+
+def fun_l12_n309()
+ fun_l13_n296
+end
+
+def fun_l12_n310()
+ fun_l13_n239
+end
+
+def fun_l12_n311()
+ fun_l13_n451
+end
+
+def fun_l12_n312()
+ fun_l13_n756
+end
+
+def fun_l12_n313()
+ fun_l13_n339
+end
+
+def fun_l12_n314()
+ fun_l13_n438
+end
+
+def fun_l12_n315()
+ fun_l13_n840
+end
+
+def fun_l12_n316()
+ fun_l13_n903
+end
+
+def fun_l12_n317()
+ fun_l13_n506
+end
+
+def fun_l12_n318()
+ fun_l13_n529
+end
+
+def fun_l12_n319()
+ fun_l13_n242
+end
+
+def fun_l12_n320()
+ fun_l13_n658
+end
+
+def fun_l12_n321()
+ fun_l13_n34
+end
+
+def fun_l12_n322()
+ fun_l13_n89
+end
+
+def fun_l12_n323()
+ fun_l13_n29
+end
+
+def fun_l12_n324()
+ fun_l13_n981
+end
+
+def fun_l12_n325()
+ fun_l13_n463
+end
+
+def fun_l12_n326()
+ fun_l13_n889
+end
+
+def fun_l12_n327()
+ fun_l13_n583
+end
+
+def fun_l12_n328()
+ fun_l13_n291
+end
+
+def fun_l12_n329()
+ fun_l13_n618
+end
+
+def fun_l12_n330()
+ fun_l13_n660
+end
+
+def fun_l12_n331()
+ fun_l13_n545
+end
+
+def fun_l12_n332()
+ fun_l13_n817
+end
+
+def fun_l12_n333()
+ fun_l13_n399
+end
+
+def fun_l12_n334()
+ fun_l13_n579
+end
+
+def fun_l12_n335()
+ fun_l13_n508
+end
+
+def fun_l12_n336()
+ fun_l13_n979
+end
+
+def fun_l12_n337()
+ fun_l13_n826
+end
+
+def fun_l12_n338()
+ fun_l13_n18
+end
+
+def fun_l12_n339()
+ fun_l13_n218
+end
+
+def fun_l12_n340()
+ fun_l13_n344
+end
+
+def fun_l12_n341()
+ fun_l13_n280
+end
+
+def fun_l12_n342()
+ fun_l13_n244
+end
+
+def fun_l12_n343()
+ fun_l13_n857
+end
+
+def fun_l12_n344()
+ fun_l13_n301
+end
+
+def fun_l12_n345()
+ fun_l13_n428
+end
+
+def fun_l12_n346()
+ fun_l13_n192
+end
+
+def fun_l12_n347()
+ fun_l13_n155
+end
+
+def fun_l12_n348()
+ fun_l13_n414
+end
+
+def fun_l12_n349()
+ fun_l13_n196
+end
+
+def fun_l12_n350()
+ fun_l13_n824
+end
+
+def fun_l12_n351()
+ fun_l13_n901
+end
+
+def fun_l12_n352()
+ fun_l13_n705
+end
+
+def fun_l12_n353()
+ fun_l13_n872
+end
+
+def fun_l12_n354()
+ fun_l13_n82
+end
+
+def fun_l12_n355()
+ fun_l13_n664
+end
+
+def fun_l12_n356()
+ fun_l13_n948
+end
+
+def fun_l12_n357()
+ fun_l13_n430
+end
+
+def fun_l12_n358()
+ fun_l13_n716
+end
+
+def fun_l12_n359()
+ fun_l13_n319
+end
+
+def fun_l12_n360()
+ fun_l13_n680
+end
+
+def fun_l12_n361()
+ fun_l13_n961
+end
+
+def fun_l12_n362()
+ fun_l13_n347
+end
+
+def fun_l12_n363()
+ fun_l13_n164
+end
+
+def fun_l12_n364()
+ fun_l13_n849
+end
+
+def fun_l12_n365()
+ fun_l13_n448
+end
+
+def fun_l12_n366()
+ fun_l13_n622
+end
+
+def fun_l12_n367()
+ fun_l13_n191
+end
+
+def fun_l12_n368()
+ fun_l13_n818
+end
+
+def fun_l12_n369()
+ fun_l13_n525
+end
+
+def fun_l12_n370()
+ fun_l13_n343
+end
+
+def fun_l12_n371()
+ fun_l13_n789
+end
+
+def fun_l12_n372()
+ fun_l13_n811
+end
+
+def fun_l12_n373()
+ fun_l13_n503
+end
+
+def fun_l12_n374()
+ fun_l13_n529
+end
+
+def fun_l12_n375()
+ fun_l13_n471
+end
+
+def fun_l12_n376()
+ fun_l13_n654
+end
+
+def fun_l12_n377()
+ fun_l13_n155
+end
+
+def fun_l12_n378()
+ fun_l13_n79
+end
+
+def fun_l12_n379()
+ fun_l13_n545
+end
+
+def fun_l12_n380()
+ fun_l13_n315
+end
+
+def fun_l12_n381()
+ fun_l13_n655
+end
+
+def fun_l12_n382()
+ fun_l13_n450
+end
+
+def fun_l12_n383()
+ fun_l13_n353
+end
+
+def fun_l12_n384()
+ fun_l13_n700
+end
+
+def fun_l12_n385()
+ fun_l13_n524
+end
+
+def fun_l12_n386()
+ fun_l13_n158
+end
+
+def fun_l12_n387()
+ fun_l13_n880
+end
+
+def fun_l12_n388()
+ fun_l13_n366
+end
+
+def fun_l12_n389()
+ fun_l13_n848
+end
+
+def fun_l12_n390()
+ fun_l13_n45
+end
+
+def fun_l12_n391()
+ fun_l13_n318
+end
+
+def fun_l12_n392()
+ fun_l13_n331
+end
+
+def fun_l12_n393()
+ fun_l13_n528
+end
+
+def fun_l12_n394()
+ fun_l13_n789
+end
+
+def fun_l12_n395()
+ fun_l13_n71
+end
+
+def fun_l12_n396()
+ fun_l13_n317
+end
+
+def fun_l12_n397()
+ fun_l13_n671
+end
+
+def fun_l12_n398()
+ fun_l13_n788
+end
+
+def fun_l12_n399()
+ fun_l13_n276
+end
+
+def fun_l12_n400()
+ fun_l13_n34
+end
+
+def fun_l12_n401()
+ fun_l13_n321
+end
+
+def fun_l12_n402()
+ fun_l13_n737
+end
+
+def fun_l12_n403()
+ fun_l13_n900
+end
+
+def fun_l12_n404()
+ fun_l13_n491
+end
+
+def fun_l12_n405()
+ fun_l13_n826
+end
+
+def fun_l12_n406()
+ fun_l13_n124
+end
+
+def fun_l12_n407()
+ fun_l13_n658
+end
+
+def fun_l12_n408()
+ fun_l13_n159
+end
+
+def fun_l12_n409()
+ fun_l13_n481
+end
+
+def fun_l12_n410()
+ fun_l13_n900
+end
+
+def fun_l12_n411()
+ fun_l13_n481
+end
+
+def fun_l12_n412()
+ fun_l13_n252
+end
+
+def fun_l12_n413()
+ fun_l13_n732
+end
+
+def fun_l12_n414()
+ fun_l13_n94
+end
+
+def fun_l12_n415()
+ fun_l13_n699
+end
+
+def fun_l12_n416()
+ fun_l13_n638
+end
+
+def fun_l12_n417()
+ fun_l13_n108
+end
+
+def fun_l12_n418()
+ fun_l13_n731
+end
+
+def fun_l12_n419()
+ fun_l13_n965
+end
+
+def fun_l12_n420()
+ fun_l13_n704
+end
+
+def fun_l12_n421()
+ fun_l13_n710
+end
+
+def fun_l12_n422()
+ fun_l13_n888
+end
+
+def fun_l12_n423()
+ fun_l13_n331
+end
+
+def fun_l12_n424()
+ fun_l13_n586
+end
+
+def fun_l12_n425()
+ fun_l13_n302
+end
+
+def fun_l12_n426()
+ fun_l13_n514
+end
+
+def fun_l12_n427()
+ fun_l13_n533
+end
+
+def fun_l12_n428()
+ fun_l13_n759
+end
+
+def fun_l12_n429()
+ fun_l13_n652
+end
+
+def fun_l12_n430()
+ fun_l13_n600
+end
+
+def fun_l12_n431()
+ fun_l13_n808
+end
+
+def fun_l12_n432()
+ fun_l13_n345
+end
+
+def fun_l12_n433()
+ fun_l13_n257
+end
+
+def fun_l12_n434()
+ fun_l13_n91
+end
+
+def fun_l12_n435()
+ fun_l13_n627
+end
+
+def fun_l12_n436()
+ fun_l13_n293
+end
+
+def fun_l12_n437()
+ fun_l13_n618
+end
+
+def fun_l12_n438()
+ fun_l13_n462
+end
+
+def fun_l12_n439()
+ fun_l13_n0
+end
+
+def fun_l12_n440()
+ fun_l13_n32
+end
+
+def fun_l12_n441()
+ fun_l13_n4
+end
+
+def fun_l12_n442()
+ fun_l13_n257
+end
+
+def fun_l12_n443()
+ fun_l13_n548
+end
+
+def fun_l12_n444()
+ fun_l13_n300
+end
+
+def fun_l12_n445()
+ fun_l13_n253
+end
+
+def fun_l12_n446()
+ fun_l13_n603
+end
+
+def fun_l12_n447()
+ fun_l13_n295
+end
+
+def fun_l12_n448()
+ fun_l13_n921
+end
+
+def fun_l12_n449()
+ fun_l13_n119
+end
+
+def fun_l12_n450()
+ fun_l13_n51
+end
+
+def fun_l12_n451()
+ fun_l13_n544
+end
+
+def fun_l12_n452()
+ fun_l13_n735
+end
+
+def fun_l12_n453()
+ fun_l13_n20
+end
+
+def fun_l12_n454()
+ fun_l13_n285
+end
+
+def fun_l12_n455()
+ fun_l13_n370
+end
+
+def fun_l12_n456()
+ fun_l13_n245
+end
+
+def fun_l12_n457()
+ fun_l13_n909
+end
+
+def fun_l12_n458()
+ fun_l13_n536
+end
+
+def fun_l12_n459()
+ fun_l13_n665
+end
+
+def fun_l12_n460()
+ fun_l13_n95
+end
+
+def fun_l12_n461()
+ fun_l13_n499
+end
+
+def fun_l12_n462()
+ fun_l13_n105
+end
+
+def fun_l12_n463()
+ fun_l13_n300
+end
+
+def fun_l12_n464()
+ fun_l13_n49
+end
+
+def fun_l12_n465()
+ fun_l13_n567
+end
+
+def fun_l12_n466()
+ fun_l13_n197
+end
+
+def fun_l12_n467()
+ fun_l13_n918
+end
+
+def fun_l12_n468()
+ fun_l13_n735
+end
+
+def fun_l12_n469()
+ fun_l13_n415
+end
+
+def fun_l12_n470()
+ fun_l13_n580
+end
+
+def fun_l12_n471()
+ fun_l13_n119
+end
+
+def fun_l12_n472()
+ fun_l13_n699
+end
+
+def fun_l12_n473()
+ fun_l13_n128
+end
+
+def fun_l12_n474()
+ fun_l13_n251
+end
+
+def fun_l12_n475()
+ fun_l13_n986
+end
+
+def fun_l12_n476()
+ fun_l13_n55
+end
+
+def fun_l12_n477()
+ fun_l13_n394
+end
+
+def fun_l12_n478()
+ fun_l13_n564
+end
+
+def fun_l12_n479()
+ fun_l13_n927
+end
+
+def fun_l12_n480()
+ fun_l13_n614
+end
+
+def fun_l12_n481()
+ fun_l13_n425
+end
+
+def fun_l12_n482()
+ fun_l13_n55
+end
+
+def fun_l12_n483()
+ fun_l13_n212
+end
+
+def fun_l12_n484()
+ fun_l13_n712
+end
+
+def fun_l12_n485()
+ fun_l13_n393
+end
+
+def fun_l12_n486()
+ fun_l13_n891
+end
+
+def fun_l12_n487()
+ fun_l13_n54
+end
+
+def fun_l12_n488()
+ fun_l13_n508
+end
+
+def fun_l12_n489()
+ fun_l13_n266
+end
+
+def fun_l12_n490()
+ fun_l13_n637
+end
+
+def fun_l12_n491()
+ fun_l13_n683
+end
+
+def fun_l12_n492()
+ fun_l13_n499
+end
+
+def fun_l12_n493()
+ fun_l13_n770
+end
+
+def fun_l12_n494()
+ fun_l13_n254
+end
+
+def fun_l12_n495()
+ fun_l13_n801
+end
+
+def fun_l12_n496()
+ fun_l13_n75
+end
+
+def fun_l12_n497()
+ fun_l13_n652
+end
+
+def fun_l12_n498()
+ fun_l13_n638
+end
+
+def fun_l12_n499()
+ fun_l13_n515
+end
+
+def fun_l12_n500()
+ fun_l13_n580
+end
+
+def fun_l12_n501()
+ fun_l13_n198
+end
+
+def fun_l12_n502()
+ fun_l13_n723
+end
+
+def fun_l12_n503()
+ fun_l13_n855
+end
+
+def fun_l12_n504()
+ fun_l13_n969
+end
+
+def fun_l12_n505()
+ fun_l13_n16
+end
+
+def fun_l12_n506()
+ fun_l13_n477
+end
+
+def fun_l12_n507()
+ fun_l13_n873
+end
+
+def fun_l12_n508()
+ fun_l13_n456
+end
+
+def fun_l12_n509()
+ fun_l13_n711
+end
+
+def fun_l12_n510()
+ fun_l13_n979
+end
+
+def fun_l12_n511()
+ fun_l13_n830
+end
+
+def fun_l12_n512()
+ fun_l13_n336
+end
+
+def fun_l12_n513()
+ fun_l13_n579
+end
+
+def fun_l12_n514()
+ fun_l13_n128
+end
+
+def fun_l12_n515()
+ fun_l13_n977
+end
+
+def fun_l12_n516()
+ fun_l13_n870
+end
+
+def fun_l12_n517()
+ fun_l13_n133
+end
+
+def fun_l12_n518()
+ fun_l13_n315
+end
+
+def fun_l12_n519()
+ fun_l13_n324
+end
+
+def fun_l12_n520()
+ fun_l13_n721
+end
+
+def fun_l12_n521()
+ fun_l13_n392
+end
+
+def fun_l12_n522()
+ fun_l13_n945
+end
+
+def fun_l12_n523()
+ fun_l13_n497
+end
+
+def fun_l12_n524()
+ fun_l13_n999
+end
+
+def fun_l12_n525()
+ fun_l13_n152
+end
+
+def fun_l12_n526()
+ fun_l13_n535
+end
+
+def fun_l12_n527()
+ fun_l13_n938
+end
+
+def fun_l12_n528()
+ fun_l13_n813
+end
+
+def fun_l12_n529()
+ fun_l13_n497
+end
+
+def fun_l12_n530()
+ fun_l13_n700
+end
+
+def fun_l12_n531()
+ fun_l13_n493
+end
+
+def fun_l12_n532()
+ fun_l13_n549
+end
+
+def fun_l12_n533()
+ fun_l13_n406
+end
+
+def fun_l12_n534()
+ fun_l13_n918
+end
+
+def fun_l12_n535()
+ fun_l13_n891
+end
+
+def fun_l12_n536()
+ fun_l13_n924
+end
+
+def fun_l12_n537()
+ fun_l13_n753
+end
+
+def fun_l12_n538()
+ fun_l13_n582
+end
+
+def fun_l12_n539()
+ fun_l13_n769
+end
+
+def fun_l12_n540()
+ fun_l13_n297
+end
+
+def fun_l12_n541()
+ fun_l13_n261
+end
+
+def fun_l12_n542()
+ fun_l13_n581
+end
+
+def fun_l12_n543()
+ fun_l13_n667
+end
+
+def fun_l12_n544()
+ fun_l13_n955
+end
+
+def fun_l12_n545()
+ fun_l13_n296
+end
+
+def fun_l12_n546()
+ fun_l13_n762
+end
+
+def fun_l12_n547()
+ fun_l13_n755
+end
+
+def fun_l12_n548()
+ fun_l13_n369
+end
+
+def fun_l12_n549()
+ fun_l13_n685
+end
+
+def fun_l12_n550()
+ fun_l13_n675
+end
+
+def fun_l12_n551()
+ fun_l13_n430
+end
+
+def fun_l12_n552()
+ fun_l13_n530
+end
+
+def fun_l12_n553()
+ fun_l13_n17
+end
+
+def fun_l12_n554()
+ fun_l13_n406
+end
+
+def fun_l12_n555()
+ fun_l13_n687
+end
+
+def fun_l12_n556()
+ fun_l13_n972
+end
+
+def fun_l12_n557()
+ fun_l13_n561
+end
+
+def fun_l12_n558()
+ fun_l13_n202
+end
+
+def fun_l12_n559()
+ fun_l13_n788
+end
+
+def fun_l12_n560()
+ fun_l13_n705
+end
+
+def fun_l12_n561()
+ fun_l13_n434
+end
+
+def fun_l12_n562()
+ fun_l13_n965
+end
+
+def fun_l12_n563()
+ fun_l13_n525
+end
+
+def fun_l12_n564()
+ fun_l13_n938
+end
+
+def fun_l12_n565()
+ fun_l13_n346
+end
+
+def fun_l12_n566()
+ fun_l13_n95
+end
+
+def fun_l12_n567()
+ fun_l13_n458
+end
+
+def fun_l12_n568()
+ fun_l13_n769
+end
+
+def fun_l12_n569()
+ fun_l13_n858
+end
+
+def fun_l12_n570()
+ fun_l13_n230
+end
+
+def fun_l12_n571()
+ fun_l13_n977
+end
+
+def fun_l12_n572()
+ fun_l13_n304
+end
+
+def fun_l12_n573()
+ fun_l13_n271
+end
+
+def fun_l12_n574()
+ fun_l13_n106
+end
+
+def fun_l12_n575()
+ fun_l13_n733
+end
+
+def fun_l12_n576()
+ fun_l13_n197
+end
+
+def fun_l12_n577()
+ fun_l13_n624
+end
+
+def fun_l12_n578()
+ fun_l13_n844
+end
+
+def fun_l12_n579()
+ fun_l13_n268
+end
+
+def fun_l12_n580()
+ fun_l13_n394
+end
+
+def fun_l12_n581()
+ fun_l13_n573
+end
+
+def fun_l12_n582()
+ fun_l13_n950
+end
+
+def fun_l12_n583()
+ fun_l13_n163
+end
+
+def fun_l12_n584()
+ fun_l13_n458
+end
+
+def fun_l12_n585()
+ fun_l13_n569
+end
+
+def fun_l12_n586()
+ fun_l13_n808
+end
+
+def fun_l12_n587()
+ fun_l13_n830
+end
+
+def fun_l12_n588()
+ fun_l13_n328
+end
+
+def fun_l12_n589()
+ fun_l13_n235
+end
+
+def fun_l12_n590()
+ fun_l13_n695
+end
+
+def fun_l12_n591()
+ fun_l13_n543
+end
+
+def fun_l12_n592()
+ fun_l13_n635
+end
+
+def fun_l12_n593()
+ fun_l13_n783
+end
+
+def fun_l12_n594()
+ fun_l13_n349
+end
+
+def fun_l12_n595()
+ fun_l13_n108
+end
+
+def fun_l12_n596()
+ fun_l13_n856
+end
+
+def fun_l12_n597()
+ fun_l13_n743
+end
+
+def fun_l12_n598()
+ fun_l13_n640
+end
+
+def fun_l12_n599()
+ fun_l13_n768
+end
+
+def fun_l12_n600()
+ fun_l13_n798
+end
+
+def fun_l12_n601()
+ fun_l13_n941
+end
+
+def fun_l12_n602()
+ fun_l13_n389
+end
+
+def fun_l12_n603()
+ fun_l13_n624
+end
+
+def fun_l12_n604()
+ fun_l13_n209
+end
+
+def fun_l12_n605()
+ fun_l13_n636
+end
+
+def fun_l12_n606()
+ fun_l13_n741
+end
+
+def fun_l12_n607()
+ fun_l13_n461
+end
+
+def fun_l12_n608()
+ fun_l13_n570
+end
+
+def fun_l12_n609()
+ fun_l13_n358
+end
+
+def fun_l12_n610()
+ fun_l13_n408
+end
+
+def fun_l12_n611()
+ fun_l13_n693
+end
+
+def fun_l12_n612()
+ fun_l13_n760
+end
+
+def fun_l12_n613()
+ fun_l13_n402
+end
+
+def fun_l12_n614()
+ fun_l13_n20
+end
+
+def fun_l12_n615()
+ fun_l13_n15
+end
+
+def fun_l12_n616()
+ fun_l13_n931
+end
+
+def fun_l12_n617()
+ fun_l13_n58
+end
+
+def fun_l12_n618()
+ fun_l13_n627
+end
+
+def fun_l12_n619()
+ fun_l13_n149
+end
+
+def fun_l12_n620()
+ fun_l13_n200
+end
+
+def fun_l12_n621()
+ fun_l13_n832
+end
+
+def fun_l12_n622()
+ fun_l13_n605
+end
+
+def fun_l12_n623()
+ fun_l13_n868
+end
+
+def fun_l12_n624()
+ fun_l13_n480
+end
+
+def fun_l12_n625()
+ fun_l13_n991
+end
+
+def fun_l12_n626()
+ fun_l13_n493
+end
+
+def fun_l12_n627()
+ fun_l13_n2
+end
+
+def fun_l12_n628()
+ fun_l13_n851
+end
+
+def fun_l12_n629()
+ fun_l13_n864
+end
+
+def fun_l12_n630()
+ fun_l13_n293
+end
+
+def fun_l12_n631()
+ fun_l13_n909
+end
+
+def fun_l12_n632()
+ fun_l13_n955
+end
+
+def fun_l12_n633()
+ fun_l13_n276
+end
+
+def fun_l12_n634()
+ fun_l13_n345
+end
+
+def fun_l12_n635()
+ fun_l13_n606
+end
+
+def fun_l12_n636()
+ fun_l13_n685
+end
+
+def fun_l12_n637()
+ fun_l13_n989
+end
+
+def fun_l12_n638()
+ fun_l13_n920
+end
+
+def fun_l12_n639()
+ fun_l13_n702
+end
+
+def fun_l12_n640()
+ fun_l13_n6
+end
+
+def fun_l12_n641()
+ fun_l13_n216
+end
+
+def fun_l12_n642()
+ fun_l13_n501
+end
+
+def fun_l12_n643()
+ fun_l13_n500
+end
+
+def fun_l12_n644()
+ fun_l13_n845
+end
+
+def fun_l12_n645()
+ fun_l13_n758
+end
+
+def fun_l12_n646()
+ fun_l13_n999
+end
+
+def fun_l12_n647()
+ fun_l13_n30
+end
+
+def fun_l12_n648()
+ fun_l13_n670
+end
+
+def fun_l12_n649()
+ fun_l13_n551
+end
+
+def fun_l12_n650()
+ fun_l13_n668
+end
+
+def fun_l12_n651()
+ fun_l13_n51
+end
+
+def fun_l12_n652()
+ fun_l13_n35
+end
+
+def fun_l12_n653()
+ fun_l13_n523
+end
+
+def fun_l12_n654()
+ fun_l13_n118
+end
+
+def fun_l12_n655()
+ fun_l13_n49
+end
+
+def fun_l12_n656()
+ fun_l13_n457
+end
+
+def fun_l12_n657()
+ fun_l13_n669
+end
+
+def fun_l12_n658()
+ fun_l13_n93
+end
+
+def fun_l12_n659()
+ fun_l13_n809
+end
+
+def fun_l12_n660()
+ fun_l13_n759
+end
+
+def fun_l12_n661()
+ fun_l13_n224
+end
+
+def fun_l12_n662()
+ fun_l13_n876
+end
+
+def fun_l12_n663()
+ fun_l13_n784
+end
+
+def fun_l12_n664()
+ fun_l13_n39
+end
+
+def fun_l12_n665()
+ fun_l13_n930
+end
+
+def fun_l12_n666()
+ fun_l13_n250
+end
+
+def fun_l12_n667()
+ fun_l13_n247
+end
+
+def fun_l12_n668()
+ fun_l13_n907
+end
+
+def fun_l12_n669()
+ fun_l13_n333
+end
+
+def fun_l12_n670()
+ fun_l13_n97
+end
+
+def fun_l12_n671()
+ fun_l13_n475
+end
+
+def fun_l12_n672()
+ fun_l13_n480
+end
+
+def fun_l12_n673()
+ fun_l13_n943
+end
+
+def fun_l12_n674()
+ fun_l13_n263
+end
+
+def fun_l12_n675()
+ fun_l13_n879
+end
+
+def fun_l12_n676()
+ fun_l13_n537
+end
+
+def fun_l12_n677()
+ fun_l13_n475
+end
+
+def fun_l12_n678()
+ fun_l13_n626
+end
+
+def fun_l12_n679()
+ fun_l13_n397
+end
+
+def fun_l12_n680()
+ fun_l13_n194
+end
+
+def fun_l12_n681()
+ fun_l13_n468
+end
+
+def fun_l12_n682()
+ fun_l13_n566
+end
+
+def fun_l12_n683()
+ fun_l13_n573
+end
+
+def fun_l12_n684()
+ fun_l13_n354
+end
+
+def fun_l12_n685()
+ fun_l13_n251
+end
+
+def fun_l12_n686()
+ fun_l13_n626
+end
+
+def fun_l12_n687()
+ fun_l13_n954
+end
+
+def fun_l12_n688()
+ fun_l13_n732
+end
+
+def fun_l12_n689()
+ fun_l13_n543
+end
+
+def fun_l12_n690()
+ fun_l13_n878
+end
+
+def fun_l12_n691()
+ fun_l13_n520
+end
+
+def fun_l12_n692()
+ fun_l13_n262
+end
+
+def fun_l12_n693()
+ fun_l13_n179
+end
+
+def fun_l12_n694()
+ fun_l13_n851
+end
+
+def fun_l12_n695()
+ fun_l13_n821
+end
+
+def fun_l12_n696()
+ fun_l13_n951
+end
+
+def fun_l12_n697()
+ fun_l13_n707
+end
+
+def fun_l12_n698()
+ fun_l13_n388
+end
+
+def fun_l12_n699()
+ fun_l13_n660
+end
+
+def fun_l12_n700()
+ fun_l13_n658
+end
+
+def fun_l12_n701()
+ fun_l13_n463
+end
+
+def fun_l12_n702()
+ fun_l13_n547
+end
+
+def fun_l12_n703()
+ fun_l13_n319
+end
+
+def fun_l12_n704()
+ fun_l13_n405
+end
+
+def fun_l12_n705()
+ fun_l13_n645
+end
+
+def fun_l12_n706()
+ fun_l13_n147
+end
+
+def fun_l12_n707()
+ fun_l13_n582
+end
+
+def fun_l12_n708()
+ fun_l13_n618
+end
+
+def fun_l12_n709()
+ fun_l13_n156
+end
+
+def fun_l12_n710()
+ fun_l13_n606
+end
+
+def fun_l12_n711()
+ fun_l13_n525
+end
+
+def fun_l12_n712()
+ fun_l13_n513
+end
+
+def fun_l12_n713()
+ fun_l13_n827
+end
+
+def fun_l12_n714()
+ fun_l13_n438
+end
+
+def fun_l12_n715()
+ fun_l13_n72
+end
+
+def fun_l12_n716()
+ fun_l13_n364
+end
+
+def fun_l12_n717()
+ fun_l13_n380
+end
+
+def fun_l12_n718()
+ fun_l13_n898
+end
+
+def fun_l12_n719()
+ fun_l13_n998
+end
+
+def fun_l12_n720()
+ fun_l13_n679
+end
+
+def fun_l12_n721()
+ fun_l13_n738
+end
+
+def fun_l12_n722()
+ fun_l13_n887
+end
+
+def fun_l12_n723()
+ fun_l13_n73
+end
+
+def fun_l12_n724()
+ fun_l13_n309
+end
+
+def fun_l12_n725()
+ fun_l13_n791
+end
+
+def fun_l12_n726()
+ fun_l13_n939
+end
+
+def fun_l12_n727()
+ fun_l13_n27
+end
+
+def fun_l12_n728()
+ fun_l13_n269
+end
+
+def fun_l12_n729()
+ fun_l13_n418
+end
+
+def fun_l12_n730()
+ fun_l13_n659
+end
+
+def fun_l12_n731()
+ fun_l13_n257
+end
+
+def fun_l12_n732()
+ fun_l13_n519
+end
+
+def fun_l12_n733()
+ fun_l13_n305
+end
+
+def fun_l12_n734()
+ fun_l13_n994
+end
+
+def fun_l12_n735()
+ fun_l13_n159
+end
+
+def fun_l12_n736()
+ fun_l13_n704
+end
+
+def fun_l12_n737()
+ fun_l13_n826
+end
+
+def fun_l12_n738()
+ fun_l13_n204
+end
+
+def fun_l12_n739()
+ fun_l13_n886
+end
+
+def fun_l12_n740()
+ fun_l13_n403
+end
+
+def fun_l12_n741()
+ fun_l13_n567
+end
+
+def fun_l12_n742()
+ fun_l13_n425
+end
+
+def fun_l12_n743()
+ fun_l13_n174
+end
+
+def fun_l12_n744()
+ fun_l13_n530
+end
+
+def fun_l12_n745()
+ fun_l13_n143
+end
+
+def fun_l12_n746()
+ fun_l13_n950
+end
+
+def fun_l12_n747()
+ fun_l13_n982
+end
+
+def fun_l12_n748()
+ fun_l13_n340
+end
+
+def fun_l12_n749()
+ fun_l13_n964
+end
+
+def fun_l12_n750()
+ fun_l13_n747
+end
+
+def fun_l12_n751()
+ fun_l13_n886
+end
+
+def fun_l12_n752()
+ fun_l13_n148
+end
+
+def fun_l12_n753()
+ fun_l13_n675
+end
+
+def fun_l12_n754()
+ fun_l13_n69
+end
+
+def fun_l12_n755()
+ fun_l13_n992
+end
+
+def fun_l12_n756()
+ fun_l13_n126
+end
+
+def fun_l12_n757()
+ fun_l13_n919
+end
+
+def fun_l12_n758()
+ fun_l13_n286
+end
+
+def fun_l12_n759()
+ fun_l13_n472
+end
+
+def fun_l12_n760()
+ fun_l13_n35
+end
+
+def fun_l12_n761()
+ fun_l13_n130
+end
+
+def fun_l12_n762()
+ fun_l13_n394
+end
+
+def fun_l12_n763()
+ fun_l13_n372
+end
+
+def fun_l12_n764()
+ fun_l13_n630
+end
+
+def fun_l12_n765()
+ fun_l13_n439
+end
+
+def fun_l12_n766()
+ fun_l13_n973
+end
+
+def fun_l12_n767()
+ fun_l13_n859
+end
+
+def fun_l12_n768()
+ fun_l13_n903
+end
+
+def fun_l12_n769()
+ fun_l13_n441
+end
+
+def fun_l12_n770()
+ fun_l13_n530
+end
+
+def fun_l12_n771()
+ fun_l13_n584
+end
+
+def fun_l12_n772()
+ fun_l13_n676
+end
+
+def fun_l12_n773()
+ fun_l13_n595
+end
+
+def fun_l12_n774()
+ fun_l13_n523
+end
+
+def fun_l12_n775()
+ fun_l13_n619
+end
+
+def fun_l12_n776()
+ fun_l13_n727
+end
+
+def fun_l12_n777()
+ fun_l13_n793
+end
+
+def fun_l12_n778()
+ fun_l13_n55
+end
+
+def fun_l12_n779()
+ fun_l13_n675
+end
+
+def fun_l12_n780()
+ fun_l13_n779
+end
+
+def fun_l12_n781()
+ fun_l13_n413
+end
+
+def fun_l12_n782()
+ fun_l13_n148
+end
+
+def fun_l12_n783()
+ fun_l13_n149
+end
+
+def fun_l12_n784()
+ fun_l13_n242
+end
+
+def fun_l12_n785()
+ fun_l13_n619
+end
+
+def fun_l12_n786()
+ fun_l13_n171
+end
+
+def fun_l12_n787()
+ fun_l13_n646
+end
+
+def fun_l12_n788()
+ fun_l13_n470
+end
+
+def fun_l12_n789()
+ fun_l13_n812
+end
+
+def fun_l12_n790()
+ fun_l13_n891
+end
+
+def fun_l12_n791()
+ fun_l13_n958
+end
+
+def fun_l12_n792()
+ fun_l13_n451
+end
+
+def fun_l12_n793()
+ fun_l13_n651
+end
+
+def fun_l12_n794()
+ fun_l13_n904
+end
+
+def fun_l12_n795()
+ fun_l13_n400
+end
+
+def fun_l12_n796()
+ fun_l13_n286
+end
+
+def fun_l12_n797()
+ fun_l13_n17
+end
+
+def fun_l12_n798()
+ fun_l13_n280
+end
+
+def fun_l12_n799()
+ fun_l13_n19
+end
+
+def fun_l12_n800()
+ fun_l13_n909
+end
+
+def fun_l12_n801()
+ fun_l13_n434
+end
+
+def fun_l12_n802()
+ fun_l13_n920
+end
+
+def fun_l12_n803()
+ fun_l13_n196
+end
+
+def fun_l12_n804()
+ fun_l13_n374
+end
+
+def fun_l12_n805()
+ fun_l13_n393
+end
+
+def fun_l12_n806()
+ fun_l13_n623
+end
+
+def fun_l12_n807()
+ fun_l13_n846
+end
+
+def fun_l12_n808()
+ fun_l13_n354
+end
+
+def fun_l12_n809()
+ fun_l13_n16
+end
+
+def fun_l12_n810()
+ fun_l13_n371
+end
+
+def fun_l12_n811()
+ fun_l13_n139
+end
+
+def fun_l12_n812()
+ fun_l13_n156
+end
+
+def fun_l12_n813()
+ fun_l13_n799
+end
+
+def fun_l12_n814()
+ fun_l13_n817
+end
+
+def fun_l12_n815()
+ fun_l13_n475
+end
+
+def fun_l12_n816()
+ fun_l13_n799
+end
+
+def fun_l12_n817()
+ fun_l13_n838
+end
+
+def fun_l12_n818()
+ fun_l13_n297
+end
+
+def fun_l12_n819()
+ fun_l13_n834
+end
+
+def fun_l12_n820()
+ fun_l13_n788
+end
+
+def fun_l12_n821()
+ fun_l13_n649
+end
+
+def fun_l12_n822()
+ fun_l13_n908
+end
+
+def fun_l12_n823()
+ fun_l13_n264
+end
+
+def fun_l12_n824()
+ fun_l13_n66
+end
+
+def fun_l12_n825()
+ fun_l13_n367
+end
+
+def fun_l12_n826()
+ fun_l13_n569
+end
+
+def fun_l12_n827()
+ fun_l13_n735
+end
+
+def fun_l12_n828()
+ fun_l13_n704
+end
+
+def fun_l12_n829()
+ fun_l13_n440
+end
+
+def fun_l12_n830()
+ fun_l13_n126
+end
+
+def fun_l12_n831()
+ fun_l13_n590
+end
+
+def fun_l12_n832()
+ fun_l13_n485
+end
+
+def fun_l12_n833()
+ fun_l13_n869
+end
+
+def fun_l12_n834()
+ fun_l13_n691
+end
+
+def fun_l12_n835()
+ fun_l13_n912
+end
+
+def fun_l12_n836()
+ fun_l13_n618
+end
+
+def fun_l12_n837()
+ fun_l13_n64
+end
+
+def fun_l12_n838()
+ fun_l13_n927
+end
+
+def fun_l12_n839()
+ fun_l13_n500
+end
+
+def fun_l12_n840()
+ fun_l13_n280
+end
+
+def fun_l12_n841()
+ fun_l13_n272
+end
+
+def fun_l12_n842()
+ fun_l13_n66
+end
+
+def fun_l12_n843()
+ fun_l13_n169
+end
+
+def fun_l12_n844()
+ fun_l13_n568
+end
+
+def fun_l12_n845()
+ fun_l13_n678
+end
+
+def fun_l12_n846()
+ fun_l13_n269
+end
+
+def fun_l12_n847()
+ fun_l13_n936
+end
+
+def fun_l12_n848()
+ fun_l13_n34
+end
+
+def fun_l12_n849()
+ fun_l13_n475
+end
+
+def fun_l12_n850()
+ fun_l13_n558
+end
+
+def fun_l12_n851()
+ fun_l13_n779
+end
+
+def fun_l12_n852()
+ fun_l13_n421
+end
+
+def fun_l12_n853()
+ fun_l13_n339
+end
+
+def fun_l12_n854()
+ fun_l13_n266
+end
+
+def fun_l12_n855()
+ fun_l13_n346
+end
+
+def fun_l12_n856()
+ fun_l13_n247
+end
+
+def fun_l12_n857()
+ fun_l13_n608
+end
+
+def fun_l12_n858()
+ fun_l13_n878
+end
+
+def fun_l12_n859()
+ fun_l13_n89
+end
+
+def fun_l12_n860()
+ fun_l13_n380
+end
+
+def fun_l12_n861()
+ fun_l13_n859
+end
+
+def fun_l12_n862()
+ fun_l13_n955
+end
+
+def fun_l12_n863()
+ fun_l13_n392
+end
+
+def fun_l12_n864()
+ fun_l13_n43
+end
+
+def fun_l12_n865()
+ fun_l13_n506
+end
+
+def fun_l12_n866()
+ fun_l13_n45
+end
+
+def fun_l12_n867()
+ fun_l13_n898
+end
+
+def fun_l12_n868()
+ fun_l13_n1
+end
+
+def fun_l12_n869()
+ fun_l13_n159
+end
+
+def fun_l12_n870()
+ fun_l13_n265
+end
+
+def fun_l12_n871()
+ fun_l13_n540
+end
+
+def fun_l12_n872()
+ fun_l13_n563
+end
+
+def fun_l12_n873()
+ fun_l13_n845
+end
+
+def fun_l12_n874()
+ fun_l13_n753
+end
+
+def fun_l12_n875()
+ fun_l13_n815
+end
+
+def fun_l12_n876()
+ fun_l13_n483
+end
+
+def fun_l12_n877()
+ fun_l13_n868
+end
+
+def fun_l12_n878()
+ fun_l13_n961
+end
+
+def fun_l12_n879()
+ fun_l13_n688
+end
+
+def fun_l12_n880()
+ fun_l13_n357
+end
+
+def fun_l12_n881()
+ fun_l13_n543
+end
+
+def fun_l12_n882()
+ fun_l13_n965
+end
+
+def fun_l12_n883()
+ fun_l13_n977
+end
+
+def fun_l12_n884()
+ fun_l13_n185
+end
+
+def fun_l12_n885()
+ fun_l13_n734
+end
+
+def fun_l12_n886()
+ fun_l13_n343
+end
+
+def fun_l12_n887()
+ fun_l13_n43
+end
+
+def fun_l12_n888()
+ fun_l13_n248
+end
+
+def fun_l12_n889()
+ fun_l13_n943
+end
+
+def fun_l12_n890()
+ fun_l13_n504
+end
+
+def fun_l12_n891()
+ fun_l13_n330
+end
+
+def fun_l12_n892()
+ fun_l13_n898
+end
+
+def fun_l12_n893()
+ fun_l13_n495
+end
+
+def fun_l12_n894()
+ fun_l13_n180
+end
+
+def fun_l12_n895()
+ fun_l13_n134
+end
+
+def fun_l12_n896()
+ fun_l13_n883
+end
+
+def fun_l12_n897()
+ fun_l13_n881
+end
+
+def fun_l12_n898()
+ fun_l13_n376
+end
+
+def fun_l12_n899()
+ fun_l13_n840
+end
+
+def fun_l12_n900()
+ fun_l13_n784
+end
+
+def fun_l12_n901()
+ fun_l13_n694
+end
+
+def fun_l12_n902()
+ fun_l13_n431
+end
+
+def fun_l12_n903()
+ fun_l13_n16
+end
+
+def fun_l12_n904()
+ fun_l13_n192
+end
+
+def fun_l12_n905()
+ fun_l13_n932
+end
+
+def fun_l12_n906()
+ fun_l13_n160
+end
+
+def fun_l12_n907()
+ fun_l13_n426
+end
+
+def fun_l12_n908()
+ fun_l13_n283
+end
+
+def fun_l12_n909()
+ fun_l13_n569
+end
+
+def fun_l12_n910()
+ fun_l13_n206
+end
+
+def fun_l12_n911()
+ fun_l13_n741
+end
+
+def fun_l12_n912()
+ fun_l13_n173
+end
+
+def fun_l12_n913()
+ fun_l13_n272
+end
+
+def fun_l12_n914()
+ fun_l13_n172
+end
+
+def fun_l12_n915()
+ fun_l13_n63
+end
+
+def fun_l12_n916()
+ fun_l13_n749
+end
+
+def fun_l12_n917()
+ fun_l13_n450
+end
+
+def fun_l12_n918()
+ fun_l13_n53
+end
+
+def fun_l12_n919()
+ fun_l13_n331
+end
+
+def fun_l12_n920()
+ fun_l13_n186
+end
+
+def fun_l12_n921()
+ fun_l13_n454
+end
+
+def fun_l12_n922()
+ fun_l13_n763
+end
+
+def fun_l12_n923()
+ fun_l13_n124
+end
+
+def fun_l12_n924()
+ fun_l13_n134
+end
+
+def fun_l12_n925()
+ fun_l13_n38
+end
+
+def fun_l12_n926()
+ fun_l13_n645
+end
+
+def fun_l12_n927()
+ fun_l13_n683
+end
+
+def fun_l12_n928()
+ fun_l13_n859
+end
+
+def fun_l12_n929()
+ fun_l13_n406
+end
+
+def fun_l12_n930()
+ fun_l13_n534
+end
+
+def fun_l12_n931()
+ fun_l13_n72
+end
+
+def fun_l12_n932()
+ fun_l13_n288
+end
+
+def fun_l12_n933()
+ fun_l13_n3
+end
+
+def fun_l12_n934()
+ fun_l13_n852
+end
+
+def fun_l12_n935()
+ fun_l13_n290
+end
+
+def fun_l12_n936()
+ fun_l13_n237
+end
+
+def fun_l12_n937()
+ fun_l13_n674
+end
+
+def fun_l12_n938()
+ fun_l13_n278
+end
+
+def fun_l12_n939()
+ fun_l13_n579
+end
+
+def fun_l12_n940()
+ fun_l13_n736
+end
+
+def fun_l12_n941()
+ fun_l13_n684
+end
+
+def fun_l12_n942()
+ fun_l13_n744
+end
+
+def fun_l12_n943()
+ fun_l13_n726
+end
+
+def fun_l12_n944()
+ fun_l13_n767
+end
+
+def fun_l12_n945()
+ fun_l13_n466
+end
+
+def fun_l12_n946()
+ fun_l13_n679
+end
+
+def fun_l12_n947()
+ fun_l13_n774
+end
+
+def fun_l12_n948()
+ fun_l13_n104
+end
+
+def fun_l12_n949()
+ fun_l13_n744
+end
+
+def fun_l12_n950()
+ fun_l13_n339
+end
+
+def fun_l12_n951()
+ fun_l13_n848
+end
+
+def fun_l12_n952()
+ fun_l13_n194
+end
+
+def fun_l12_n953()
+ fun_l13_n733
+end
+
+def fun_l12_n954()
+ fun_l13_n430
+end
+
+def fun_l12_n955()
+ fun_l13_n95
+end
+
+def fun_l12_n956()
+ fun_l13_n68
+end
+
+def fun_l12_n957()
+ fun_l13_n951
+end
+
+def fun_l12_n958()
+ fun_l13_n671
+end
+
+def fun_l12_n959()
+ fun_l13_n464
+end
+
+def fun_l12_n960()
+ fun_l13_n700
+end
+
+def fun_l12_n961()
+ fun_l13_n662
+end
+
+def fun_l12_n962()
+ fun_l13_n765
+end
+
+def fun_l12_n963()
+ fun_l13_n662
+end
+
+def fun_l12_n964()
+ fun_l13_n750
+end
+
+def fun_l12_n965()
+ fun_l13_n935
+end
+
+def fun_l12_n966()
+ fun_l13_n585
+end
+
+def fun_l12_n967()
+ fun_l13_n430
+end
+
+def fun_l12_n968()
+ fun_l13_n219
+end
+
+def fun_l12_n969()
+ fun_l13_n895
+end
+
+def fun_l12_n970()
+ fun_l13_n47
+end
+
+def fun_l12_n971()
+ fun_l13_n755
+end
+
+def fun_l12_n972()
+ fun_l13_n56
+end
+
+def fun_l12_n973()
+ fun_l13_n341
+end
+
+def fun_l12_n974()
+ fun_l13_n192
+end
+
+def fun_l12_n975()
+ fun_l13_n434
+end
+
+def fun_l12_n976()
+ fun_l13_n215
+end
+
+def fun_l12_n977()
+ fun_l13_n747
+end
+
+def fun_l12_n978()
+ fun_l13_n463
+end
+
+def fun_l12_n979()
+ fun_l13_n408
+end
+
+def fun_l12_n980()
+ fun_l13_n993
+end
+
+def fun_l12_n981()
+ fun_l13_n583
+end
+
+def fun_l12_n982()
+ fun_l13_n752
+end
+
+def fun_l12_n983()
+ fun_l13_n583
+end
+
+def fun_l12_n984()
+ fun_l13_n601
+end
+
+def fun_l12_n985()
+ fun_l13_n490
+end
+
+def fun_l12_n986()
+ fun_l13_n61
+end
+
+def fun_l12_n987()
+ fun_l13_n89
+end
+
+def fun_l12_n988()
+ fun_l13_n533
+end
+
+def fun_l12_n989()
+ fun_l13_n628
+end
+
+def fun_l12_n990()
+ fun_l13_n301
+end
+
+def fun_l12_n991()
+ fun_l13_n553
+end
+
+def fun_l12_n992()
+ fun_l13_n105
+end
+
+def fun_l12_n993()
+ fun_l13_n595
+end
+
+def fun_l12_n994()
+ fun_l13_n384
+end
+
+def fun_l12_n995()
+ fun_l13_n704
+end
+
+def fun_l12_n996()
+ fun_l13_n657
+end
+
+def fun_l12_n997()
+ fun_l13_n468
+end
+
+def fun_l12_n998()
+ fun_l13_n582
+end
+
+def fun_l12_n999()
+ fun_l13_n335
+end
+
+def fun_l13_n0()
+ fun_l14_n123
+end
+
+def fun_l13_n1()
+ fun_l14_n796
+end
+
+def fun_l13_n2()
+ fun_l14_n217
+end
+
+def fun_l13_n3()
+ fun_l14_n810
+end
+
+def fun_l13_n4()
+ fun_l14_n297
+end
+
+def fun_l13_n5()
+ fun_l14_n682
+end
+
+def fun_l13_n6()
+ fun_l14_n397
+end
+
+def fun_l13_n7()
+ fun_l14_n372
+end
+
+def fun_l13_n8()
+ fun_l14_n688
+end
+
+def fun_l13_n9()
+ fun_l14_n250
+end
+
+def fun_l13_n10()
+ fun_l14_n248
+end
+
+def fun_l13_n11()
+ fun_l14_n335
+end
+
+def fun_l13_n12()
+ fun_l14_n404
+end
+
+def fun_l13_n13()
+ fun_l14_n223
+end
+
+def fun_l13_n14()
+ fun_l14_n894
+end
+
+def fun_l13_n15()
+ fun_l14_n537
+end
+
+def fun_l13_n16()
+ fun_l14_n641
+end
+
+def fun_l13_n17()
+ fun_l14_n509
+end
+
+def fun_l13_n18()
+ fun_l14_n624
+end
+
+def fun_l13_n19()
+ fun_l14_n224
+end
+
+def fun_l13_n20()
+ fun_l14_n283
+end
+
+def fun_l13_n21()
+ fun_l14_n624
+end
+
+def fun_l13_n22()
+ fun_l14_n972
+end
+
+def fun_l13_n23()
+ fun_l14_n698
+end
+
+def fun_l13_n24()
+ fun_l14_n313
+end
+
+def fun_l13_n25()
+ fun_l14_n344
+end
+
+def fun_l13_n26()
+ fun_l14_n823
+end
+
+def fun_l13_n27()
+ fun_l14_n699
+end
+
+def fun_l13_n28()
+ fun_l14_n943
+end
+
+def fun_l13_n29()
+ fun_l14_n69
+end
+
+def fun_l13_n30()
+ fun_l14_n839
+end
+
+def fun_l13_n31()
+ fun_l14_n834
+end
+
+def fun_l13_n32()
+ fun_l14_n143
+end
+
+def fun_l13_n33()
+ fun_l14_n500
+end
+
+def fun_l13_n34()
+ fun_l14_n266
+end
+
+def fun_l13_n35()
+ fun_l14_n576
+end
+
+def fun_l13_n36()
+ fun_l14_n247
+end
+
+def fun_l13_n37()
+ fun_l14_n847
+end
+
+def fun_l13_n38()
+ fun_l14_n474
+end
+
+def fun_l13_n39()
+ fun_l14_n293
+end
+
+def fun_l13_n40()
+ fun_l14_n475
+end
+
+def fun_l13_n41()
+ fun_l14_n641
+end
+
+def fun_l13_n42()
+ fun_l14_n583
+end
+
+def fun_l13_n43()
+ fun_l14_n857
+end
+
+def fun_l13_n44()
+ fun_l14_n97
+end
+
+def fun_l13_n45()
+ fun_l14_n196
+end
+
+def fun_l13_n46()
+ fun_l14_n201
+end
+
+def fun_l13_n47()
+ fun_l14_n877
+end
+
+def fun_l13_n48()
+ fun_l14_n464
+end
+
+def fun_l13_n49()
+ fun_l14_n706
+end
+
+def fun_l13_n50()
+ fun_l14_n274
+end
+
+def fun_l13_n51()
+ fun_l14_n844
+end
+
+def fun_l13_n52()
+ fun_l14_n883
+end
+
+def fun_l13_n53()
+ fun_l14_n77
+end
+
+def fun_l13_n54()
+ fun_l14_n981
+end
+
+def fun_l13_n55()
+ fun_l14_n189
+end
+
+def fun_l13_n56()
+ fun_l14_n597
+end
+
+def fun_l13_n57()
+ fun_l14_n333
+end
+
+def fun_l13_n58()
+ fun_l14_n566
+end
+
+def fun_l13_n59()
+ fun_l14_n231
+end
+
+def fun_l13_n60()
+ fun_l14_n207
+end
+
+def fun_l13_n61()
+ fun_l14_n555
+end
+
+def fun_l13_n62()
+ fun_l14_n46
+end
+
+def fun_l13_n63()
+ fun_l14_n879
+end
+
+def fun_l13_n64()
+ fun_l14_n672
+end
+
+def fun_l13_n65()
+ fun_l14_n266
+end
+
+def fun_l13_n66()
+ fun_l14_n898
+end
+
+def fun_l13_n67()
+ fun_l14_n966
+end
+
+def fun_l13_n68()
+ fun_l14_n63
+end
+
+def fun_l13_n69()
+ fun_l14_n531
+end
+
+def fun_l13_n70()
+ fun_l14_n80
+end
+
+def fun_l13_n71()
+ fun_l14_n206
+end
+
+def fun_l13_n72()
+ fun_l14_n594
+end
+
+def fun_l13_n73()
+ fun_l14_n852
+end
+
+def fun_l13_n74()
+ fun_l14_n443
+end
+
+def fun_l13_n75()
+ fun_l14_n987
+end
+
+def fun_l13_n76()
+ fun_l14_n119
+end
+
+def fun_l13_n77()
+ fun_l14_n113
+end
+
+def fun_l13_n78()
+ fun_l14_n904
+end
+
+def fun_l13_n79()
+ fun_l14_n88
+end
+
+def fun_l13_n80()
+ fun_l14_n209
+end
+
+def fun_l13_n81()
+ fun_l14_n190
+end
+
+def fun_l13_n82()
+ fun_l14_n594
+end
+
+def fun_l13_n83()
+ fun_l14_n87
+end
+
+def fun_l13_n84()
+ fun_l14_n206
+end
+
+def fun_l13_n85()
+ fun_l14_n974
+end
+
+def fun_l13_n86()
+ fun_l14_n646
+end
+
+def fun_l13_n87()
+ fun_l14_n450
+end
+
+def fun_l13_n88()
+ fun_l14_n981
+end
+
+def fun_l13_n89()
+ fun_l14_n277
+end
+
+def fun_l13_n90()
+ fun_l14_n309
+end
+
+def fun_l13_n91()
+ fun_l14_n648
+end
+
+def fun_l13_n92()
+ fun_l14_n353
+end
+
+def fun_l13_n93()
+ fun_l14_n43
+end
+
+def fun_l13_n94()
+ fun_l14_n217
+end
+
+def fun_l13_n95()
+ fun_l14_n945
+end
+
+def fun_l13_n96()
+ fun_l14_n172
+end
+
+def fun_l13_n97()
+ fun_l14_n604
+end
+
+def fun_l13_n98()
+ fun_l14_n252
+end
+
+def fun_l13_n99()
+ fun_l14_n478
+end
+
+def fun_l13_n100()
+ fun_l14_n564
+end
+
+def fun_l13_n101()
+ fun_l14_n937
+end
+
+def fun_l13_n102()
+ fun_l14_n940
+end
+
+def fun_l13_n103()
+ fun_l14_n110
+end
+
+def fun_l13_n104()
+ fun_l14_n175
+end
+
+def fun_l13_n105()
+ fun_l14_n708
+end
+
+def fun_l13_n106()
+ fun_l14_n161
+end
+
+def fun_l13_n107()
+ fun_l14_n129
+end
+
+def fun_l13_n108()
+ fun_l14_n186
+end
+
+def fun_l13_n109()
+ fun_l14_n449
+end
+
+def fun_l13_n110()
+ fun_l14_n358
+end
+
+def fun_l13_n111()
+ fun_l14_n278
+end
+
+def fun_l13_n112()
+ fun_l14_n598
+end
+
+def fun_l13_n113()
+ fun_l14_n896
+end
+
+def fun_l13_n114()
+ fun_l14_n964
+end
+
+def fun_l13_n115()
+ fun_l14_n986
+end
+
+def fun_l13_n116()
+ fun_l14_n268
+end
+
+def fun_l13_n117()
+ fun_l14_n521
+end
+
+def fun_l13_n118()
+ fun_l14_n968
+end
+
+def fun_l13_n119()
+ fun_l14_n380
+end
+
+def fun_l13_n120()
+ fun_l14_n549
+end
+
+def fun_l13_n121()
+ fun_l14_n300
+end
+
+def fun_l13_n122()
+ fun_l14_n246
+end
+
+def fun_l13_n123()
+ fun_l14_n329
+end
+
+def fun_l13_n124()
+ fun_l14_n134
+end
+
+def fun_l13_n125()
+ fun_l14_n740
+end
+
+def fun_l13_n126()
+ fun_l14_n965
+end
+
+def fun_l13_n127()
+ fun_l14_n284
+end
+
+def fun_l13_n128()
+ fun_l14_n409
+end
+
+def fun_l13_n129()
+ fun_l14_n597
+end
+
+def fun_l13_n130()
+ fun_l14_n285
+end
+
+def fun_l13_n131()
+ fun_l14_n270
+end
+
+def fun_l13_n132()
+ fun_l14_n66
+end
+
+def fun_l13_n133()
+ fun_l14_n588
+end
+
+def fun_l13_n134()
+ fun_l14_n534
+end
+
+def fun_l13_n135()
+ fun_l14_n673
+end
+
+def fun_l13_n136()
+ fun_l14_n867
+end
+
+def fun_l13_n137()
+ fun_l14_n157
+end
+
+def fun_l13_n138()
+ fun_l14_n755
+end
+
+def fun_l13_n139()
+ fun_l14_n68
+end
+
+def fun_l13_n140()
+ fun_l14_n859
+end
+
+def fun_l13_n141()
+ fun_l14_n804
+end
+
+def fun_l13_n142()
+ fun_l14_n300
+end
+
+def fun_l13_n143()
+ fun_l14_n157
+end
+
+def fun_l13_n144()
+ fun_l14_n376
+end
+
+def fun_l13_n145()
+ fun_l14_n62
+end
+
+def fun_l13_n146()
+ fun_l14_n755
+end
+
+def fun_l13_n147()
+ fun_l14_n547
+end
+
+def fun_l13_n148()
+ fun_l14_n223
+end
+
+def fun_l13_n149()
+ fun_l14_n277
+end
+
+def fun_l13_n150()
+ fun_l14_n57
+end
+
+def fun_l13_n151()
+ fun_l14_n552
+end
+
+def fun_l13_n152()
+ fun_l14_n390
+end
+
+def fun_l13_n153()
+ fun_l14_n691
+end
+
+def fun_l13_n154()
+ fun_l14_n871
+end
+
+def fun_l13_n155()
+ fun_l14_n14
+end
+
+def fun_l13_n156()
+ fun_l14_n68
+end
+
+def fun_l13_n157()
+ fun_l14_n589
+end
+
+def fun_l13_n158()
+ fun_l14_n504
+end
+
+def fun_l13_n159()
+ fun_l14_n966
+end
+
+def fun_l13_n160()
+ fun_l14_n62
+end
+
+def fun_l13_n161()
+ fun_l14_n880
+end
+
+def fun_l13_n162()
+ fun_l14_n897
+end
+
+def fun_l13_n163()
+ fun_l14_n630
+end
+
+def fun_l13_n164()
+ fun_l14_n129
+end
+
+def fun_l13_n165()
+ fun_l14_n461
+end
+
+def fun_l13_n166()
+ fun_l14_n193
+end
+
+def fun_l13_n167()
+ fun_l14_n588
+end
+
+def fun_l13_n168()
+ fun_l14_n49
+end
+
+def fun_l13_n169()
+ fun_l14_n872
+end
+
+def fun_l13_n170()
+ fun_l14_n199
+end
+
+def fun_l13_n171()
+ fun_l14_n887
+end
+
+def fun_l13_n172()
+ fun_l14_n932
+end
+
+def fun_l13_n173()
+ fun_l14_n616
+end
+
+def fun_l13_n174()
+ fun_l14_n62
+end
+
+def fun_l13_n175()
+ fun_l14_n162
+end
+
+def fun_l13_n176()
+ fun_l14_n979
+end
+
+def fun_l13_n177()
+ fun_l14_n813
+end
+
+def fun_l13_n178()
+ fun_l14_n529
+end
+
+def fun_l13_n179()
+ fun_l14_n202
+end
+
+def fun_l13_n180()
+ fun_l14_n916
+end
+
+def fun_l13_n181()
+ fun_l14_n719
+end
+
+def fun_l13_n182()
+ fun_l14_n256
+end
+
+def fun_l13_n183()
+ fun_l14_n137
+end
+
+def fun_l13_n184()
+ fun_l14_n562
+end
+
+def fun_l13_n185()
+ fun_l14_n614
+end
+
+def fun_l13_n186()
+ fun_l14_n918
+end
+
+def fun_l13_n187()
+ fun_l14_n435
+end
+
+def fun_l13_n188()
+ fun_l14_n429
+end
+
+def fun_l13_n189()
+ fun_l14_n561
+end
+
+def fun_l13_n190()
+ fun_l14_n422
+end
+
+def fun_l13_n191()
+ fun_l14_n396
+end
+
+def fun_l13_n192()
+ fun_l14_n971
+end
+
+def fun_l13_n193()
+ fun_l14_n419
+end
+
+def fun_l13_n194()
+ fun_l14_n319
+end
+
+def fun_l13_n195()
+ fun_l14_n8
+end
+
+def fun_l13_n196()
+ fun_l14_n378
+end
+
+def fun_l13_n197()
+ fun_l14_n709
+end
+
+def fun_l13_n198()
+ fun_l14_n308
+end
+
+def fun_l13_n199()
+ fun_l14_n916
+end
+
+def fun_l13_n200()
+ fun_l14_n822
+end
+
+def fun_l13_n201()
+ fun_l14_n736
+end
+
+def fun_l13_n202()
+ fun_l14_n259
+end
+
+def fun_l13_n203()
+ fun_l14_n965
+end
+
+def fun_l13_n204()
+ fun_l14_n52
+end
+
+def fun_l13_n205()
+ fun_l14_n237
+end
+
+def fun_l13_n206()
+ fun_l14_n850
+end
+
+def fun_l13_n207()
+ fun_l14_n961
+end
+
+def fun_l13_n208()
+ fun_l14_n289
+end
+
+def fun_l13_n209()
+ fun_l14_n465
+end
+
+def fun_l13_n210()
+ fun_l14_n635
+end
+
+def fun_l13_n211()
+ fun_l14_n222
+end
+
+def fun_l13_n212()
+ fun_l14_n796
+end
+
+def fun_l13_n213()
+ fun_l14_n20
+end
+
+def fun_l13_n214()
+ fun_l14_n576
+end
+
+def fun_l13_n215()
+ fun_l14_n947
+end
+
+def fun_l13_n216()
+ fun_l14_n482
+end
+
+def fun_l13_n217()
+ fun_l14_n236
+end
+
+def fun_l13_n218()
+ fun_l14_n405
+end
+
+def fun_l13_n219()
+ fun_l14_n874
+end
+
+def fun_l13_n220()
+ fun_l14_n827
+end
+
+def fun_l13_n221()
+ fun_l14_n975
+end
+
+def fun_l13_n222()
+ fun_l14_n741
+end
+
+def fun_l13_n223()
+ fun_l14_n60
+end
+
+def fun_l13_n224()
+ fun_l14_n587
+end
+
+def fun_l13_n225()
+ fun_l14_n557
+end
+
+def fun_l13_n226()
+ fun_l14_n621
+end
+
+def fun_l13_n227()
+ fun_l14_n426
+end
+
+def fun_l13_n228()
+ fun_l14_n848
+end
+
+def fun_l13_n229()
+ fun_l14_n164
+end
+
+def fun_l13_n230()
+ fun_l14_n427
+end
+
+def fun_l13_n231()
+ fun_l14_n815
+end
+
+def fun_l13_n232()
+ fun_l14_n465
+end
+
+def fun_l13_n233()
+ fun_l14_n474
+end
+
+def fun_l13_n234()
+ fun_l14_n577
+end
+
+def fun_l13_n235()
+ fun_l14_n427
+end
+
+def fun_l13_n236()
+ fun_l14_n580
+end
+
+def fun_l13_n237()
+ fun_l14_n275
+end
+
+def fun_l13_n238()
+ fun_l14_n559
+end
+
+def fun_l13_n239()
+ fun_l14_n834
+end
+
+def fun_l13_n240()
+ fun_l14_n656
+end
+
+def fun_l13_n241()
+ fun_l14_n411
+end
+
+def fun_l13_n242()
+ fun_l14_n54
+end
+
+def fun_l13_n243()
+ fun_l14_n223
+end
+
+def fun_l13_n244()
+ fun_l14_n623
+end
+
+def fun_l13_n245()
+ fun_l14_n251
+end
+
+def fun_l13_n246()
+ fun_l14_n948
+end
+
+def fun_l13_n247()
+ fun_l14_n857
+end
+
+def fun_l13_n248()
+ fun_l14_n528
+end
+
+def fun_l13_n249()
+ fun_l14_n396
+end
+
+def fun_l13_n250()
+ fun_l14_n832
+end
+
+def fun_l13_n251()
+ fun_l14_n191
+end
+
+def fun_l13_n252()
+ fun_l14_n729
+end
+
+def fun_l13_n253()
+ fun_l14_n22
+end
+
+def fun_l13_n254()
+ fun_l14_n10
+end
+
+def fun_l13_n255()
+ fun_l14_n871
+end
+
+def fun_l13_n256()
+ fun_l14_n664
+end
+
+def fun_l13_n257()
+ fun_l14_n877
+end
+
+def fun_l13_n258()
+ fun_l14_n477
+end
+
+def fun_l13_n259()
+ fun_l14_n861
+end
+
+def fun_l13_n260()
+ fun_l14_n160
+end
+
+def fun_l13_n261()
+ fun_l14_n127
+end
+
+def fun_l13_n262()
+ fun_l14_n744
+end
+
+def fun_l13_n263()
+ fun_l14_n305
+end
+
+def fun_l13_n264()
+ fun_l14_n473
+end
+
+def fun_l13_n265()
+ fun_l14_n445
+end
+
+def fun_l13_n266()
+ fun_l14_n31
+end
+
+def fun_l13_n267()
+ fun_l14_n58
+end
+
+def fun_l13_n268()
+ fun_l14_n739
+end
+
+def fun_l13_n269()
+ fun_l14_n840
+end
+
+def fun_l13_n270()
+ fun_l14_n275
+end
+
+def fun_l13_n271()
+ fun_l14_n264
+end
+
+def fun_l13_n272()
+ fun_l14_n503
+end
+
+def fun_l13_n273()
+ fun_l14_n559
+end
+
+def fun_l13_n274()
+ fun_l14_n693
+end
+
+def fun_l13_n275()
+ fun_l14_n723
+end
+
+def fun_l13_n276()
+ fun_l14_n716
+end
+
+def fun_l13_n277()
+ fun_l14_n181
+end
+
+def fun_l13_n278()
+ fun_l14_n904
+end
+
+def fun_l13_n279()
+ fun_l14_n75
+end
+
+def fun_l13_n280()
+ fun_l14_n992
+end
+
+def fun_l13_n281()
+ fun_l14_n904
+end
+
+def fun_l13_n282()
+ fun_l14_n856
+end
+
+def fun_l13_n283()
+ fun_l14_n218
+end
+
+def fun_l13_n284()
+ fun_l14_n896
+end
+
+def fun_l13_n285()
+ fun_l14_n456
+end
+
+def fun_l13_n286()
+ fun_l14_n591
+end
+
+def fun_l13_n287()
+ fun_l14_n960
+end
+
+def fun_l13_n288()
+ fun_l14_n949
+end
+
+def fun_l13_n289()
+ fun_l14_n92
+end
+
+def fun_l13_n290()
+ fun_l14_n945
+end
+
+def fun_l13_n291()
+ fun_l14_n684
+end
+
+def fun_l13_n292()
+ fun_l14_n8
+end
+
+def fun_l13_n293()
+ fun_l14_n147
+end
+
+def fun_l13_n294()
+ fun_l14_n129
+end
+
+def fun_l13_n295()
+ fun_l14_n308
+end
+
+def fun_l13_n296()
+ fun_l14_n112
+end
+
+def fun_l13_n297()
+ fun_l14_n657
+end
+
+def fun_l13_n298()
+ fun_l14_n910
+end
+
+def fun_l13_n299()
+ fun_l14_n804
+end
+
+def fun_l13_n300()
+ fun_l14_n580
+end
+
+def fun_l13_n301()
+ fun_l14_n373
+end
+
+def fun_l13_n302()
+ fun_l14_n749
+end
+
+def fun_l13_n303()
+ fun_l14_n353
+end
+
+def fun_l13_n304()
+ fun_l14_n58
+end
+
+def fun_l13_n305()
+ fun_l14_n207
+end
+
+def fun_l13_n306()
+ fun_l14_n977
+end
+
+def fun_l13_n307()
+ fun_l14_n95
+end
+
+def fun_l13_n308()
+ fun_l14_n836
+end
+
+def fun_l13_n309()
+ fun_l14_n244
+end
+
+def fun_l13_n310()
+ fun_l14_n676
+end
+
+def fun_l13_n311()
+ fun_l14_n617
+end
+
+def fun_l13_n312()
+ fun_l14_n633
+end
+
+def fun_l13_n313()
+ fun_l14_n550
+end
+
+def fun_l13_n314()
+ fun_l14_n564
+end
+
+def fun_l13_n315()
+ fun_l14_n261
+end
+
+def fun_l13_n316()
+ fun_l14_n968
+end
+
+def fun_l13_n317()
+ fun_l14_n16
+end
+
+def fun_l13_n318()
+ fun_l14_n894
+end
+
+def fun_l13_n319()
+ fun_l14_n717
+end
+
+def fun_l13_n320()
+ fun_l14_n802
+end
+
+def fun_l13_n321()
+ fun_l14_n628
+end
+
+def fun_l13_n322()
+ fun_l14_n306
+end
+
+def fun_l13_n323()
+ fun_l14_n121
+end
+
+def fun_l13_n324()
+ fun_l14_n468
+end
+
+def fun_l13_n325()
+ fun_l14_n863
+end
+
+def fun_l13_n326()
+ fun_l14_n970
+end
+
+def fun_l13_n327()
+ fun_l14_n637
+end
+
+def fun_l13_n328()
+ fun_l14_n12
+end
+
+def fun_l13_n329()
+ fun_l14_n244
+end
+
+def fun_l13_n330()
+ fun_l14_n847
+end
+
+def fun_l13_n331()
+ fun_l14_n122
+end
+
+def fun_l13_n332()
+ fun_l14_n546
+end
+
+def fun_l13_n333()
+ fun_l14_n640
+end
+
+def fun_l13_n334()
+ fun_l14_n224
+end
+
+def fun_l13_n335()
+ fun_l14_n73
+end
+
+def fun_l13_n336()
+ fun_l14_n25
+end
+
+def fun_l13_n337()
+ fun_l14_n226
+end
+
+def fun_l13_n338()
+ fun_l14_n63
+end
+
+def fun_l13_n339()
+ fun_l14_n591
+end
+
+def fun_l13_n340()
+ fun_l14_n32
+end
+
+def fun_l13_n341()
+ fun_l14_n646
+end
+
+def fun_l13_n342()
+ fun_l14_n954
+end
+
+def fun_l13_n343()
+ fun_l14_n915
+end
+
+def fun_l13_n344()
+ fun_l14_n359
+end
+
+def fun_l13_n345()
+ fun_l14_n967
+end
+
+def fun_l13_n346()
+ fun_l14_n980
+end
+
+def fun_l13_n347()
+ fun_l14_n324
+end
+
+def fun_l13_n348()
+ fun_l14_n263
+end
+
+def fun_l13_n349()
+ fun_l14_n644
+end
+
+def fun_l13_n350()
+ fun_l14_n575
+end
+
+def fun_l13_n351()
+ fun_l14_n820
+end
+
+def fun_l13_n352()
+ fun_l14_n767
+end
+
+def fun_l13_n353()
+ fun_l14_n175
+end
+
+def fun_l13_n354()
+ fun_l14_n990
+end
+
+def fun_l13_n355()
+ fun_l14_n631
+end
+
+def fun_l13_n356()
+ fun_l14_n503
+end
+
+def fun_l13_n357()
+ fun_l14_n785
+end
+
+def fun_l13_n358()
+ fun_l14_n239
+end
+
+def fun_l13_n359()
+ fun_l14_n678
+end
+
+def fun_l13_n360()
+ fun_l14_n11
+end
+
+def fun_l13_n361()
+ fun_l14_n829
+end
+
+def fun_l13_n362()
+ fun_l14_n205
+end
+
+def fun_l13_n363()
+ fun_l14_n146
+end
+
+def fun_l13_n364()
+ fun_l14_n972
+end
+
+def fun_l13_n365()
+ fun_l14_n68
+end
+
+def fun_l13_n366()
+ fun_l14_n830
+end
+
+def fun_l13_n367()
+ fun_l14_n60
+end
+
+def fun_l13_n368()
+ fun_l14_n521
+end
+
+def fun_l13_n369()
+ fun_l14_n287
+end
+
+def fun_l13_n370()
+ fun_l14_n932
+end
+
+def fun_l13_n371()
+ fun_l14_n268
+end
+
+def fun_l13_n372()
+ fun_l14_n285
+end
+
+def fun_l13_n373()
+ fun_l14_n101
+end
+
+def fun_l13_n374()
+ fun_l14_n811
+end
+
+def fun_l13_n375()
+ fun_l14_n966
+end
+
+def fun_l13_n376()
+ fun_l14_n201
+end
+
+def fun_l13_n377()
+ fun_l14_n176
+end
+
+def fun_l13_n378()
+ fun_l14_n850
+end
+
+def fun_l13_n379()
+ fun_l14_n436
+end
+
+def fun_l13_n380()
+ fun_l14_n83
+end
+
+def fun_l13_n381()
+ fun_l14_n393
+end
+
+def fun_l13_n382()
+ fun_l14_n812
+end
+
+def fun_l13_n383()
+ fun_l14_n276
+end
+
+def fun_l13_n384()
+ fun_l14_n997
+end
+
+def fun_l13_n385()
+ fun_l14_n942
+end
+
+def fun_l13_n386()
+ fun_l14_n851
+end
+
+def fun_l13_n387()
+ fun_l14_n747
+end
+
+def fun_l13_n388()
+ fun_l14_n573
+end
+
+def fun_l13_n389()
+ fun_l14_n949
+end
+
+def fun_l13_n390()
+ fun_l14_n857
+end
+
+def fun_l13_n391()
+ fun_l14_n495
+end
+
+def fun_l13_n392()
+ fun_l14_n399
+end
+
+def fun_l13_n393()
+ fun_l14_n603
+end
+
+def fun_l13_n394()
+ fun_l14_n208
+end
+
+def fun_l13_n395()
+ fun_l14_n736
+end
+
+def fun_l13_n396()
+ fun_l14_n339
+end
+
+def fun_l13_n397()
+ fun_l14_n759
+end
+
+def fun_l13_n398()
+ fun_l14_n912
+end
+
+def fun_l13_n399()
+ fun_l14_n899
+end
+
+def fun_l13_n400()
+ fun_l14_n954
+end
+
+def fun_l13_n401()
+ fun_l14_n143
+end
+
+def fun_l13_n402()
+ fun_l14_n866
+end
+
+def fun_l13_n403()
+ fun_l14_n657
+end
+
+def fun_l13_n404()
+ fun_l14_n854
+end
+
+def fun_l13_n405()
+ fun_l14_n365
+end
+
+def fun_l13_n406()
+ fun_l14_n79
+end
+
+def fun_l13_n407()
+ fun_l14_n724
+end
+
+def fun_l13_n408()
+ fun_l14_n544
+end
+
+def fun_l13_n409()
+ fun_l14_n562
+end
+
+def fun_l13_n410()
+ fun_l14_n946
+end
+
+def fun_l13_n411()
+ fun_l14_n761
+end
+
+def fun_l13_n412()
+ fun_l14_n251
+end
+
+def fun_l13_n413()
+ fun_l14_n689
+end
+
+def fun_l13_n414()
+ fun_l14_n94
+end
+
+def fun_l13_n415()
+ fun_l14_n466
+end
+
+def fun_l13_n416()
+ fun_l14_n186
+end
+
+def fun_l13_n417()
+ fun_l14_n367
+end
+
+def fun_l13_n418()
+ fun_l14_n477
+end
+
+def fun_l13_n419()
+ fun_l14_n356
+end
+
+def fun_l13_n420()
+ fun_l14_n279
+end
+
+def fun_l13_n421()
+ fun_l14_n76
+end
+
+def fun_l13_n422()
+ fun_l14_n677
+end
+
+def fun_l13_n423()
+ fun_l14_n334
+end
+
+def fun_l13_n424()
+ fun_l14_n777
+end
+
+def fun_l13_n425()
+ fun_l14_n632
+end
+
+def fun_l13_n426()
+ fun_l14_n380
+end
+
+def fun_l13_n427()
+ fun_l14_n833
+end
+
+def fun_l13_n428()
+ fun_l14_n395
+end
+
+def fun_l13_n429()
+ fun_l14_n324
+end
+
+def fun_l13_n430()
+ fun_l14_n608
+end
+
+def fun_l13_n431()
+ fun_l14_n916
+end
+
+def fun_l13_n432()
+ fun_l14_n89
+end
+
+def fun_l13_n433()
+ fun_l14_n239
+end
+
+def fun_l13_n434()
+ fun_l14_n712
+end
+
+def fun_l13_n435()
+ fun_l14_n911
+end
+
+def fun_l13_n436()
+ fun_l14_n810
+end
+
+def fun_l13_n437()
+ fun_l14_n670
+end
+
+def fun_l13_n438()
+ fun_l14_n125
+end
+
+def fun_l13_n439()
+ fun_l14_n903
+end
+
+def fun_l13_n440()
+ fun_l14_n277
+end
+
+def fun_l13_n441()
+ fun_l14_n581
+end
+
+def fun_l13_n442()
+ fun_l14_n726
+end
+
+def fun_l13_n443()
+ fun_l14_n360
+end
+
+def fun_l13_n444()
+ fun_l14_n439
+end
+
+def fun_l13_n445()
+ fun_l14_n441
+end
+
+def fun_l13_n446()
+ fun_l14_n464
+end
+
+def fun_l13_n447()
+ fun_l14_n550
+end
+
+def fun_l13_n448()
+ fun_l14_n94
+end
+
+def fun_l13_n449()
+ fun_l14_n844
+end
+
+def fun_l13_n450()
+ fun_l14_n571
+end
+
+def fun_l13_n451()
+ fun_l14_n161
+end
+
+def fun_l13_n452()
+ fun_l14_n863
+end
+
+def fun_l13_n453()
+ fun_l14_n173
+end
+
+def fun_l13_n454()
+ fun_l14_n330
+end
+
+def fun_l13_n455()
+ fun_l14_n175
+end
+
+def fun_l13_n456()
+ fun_l14_n40
+end
+
+def fun_l13_n457()
+ fun_l14_n335
+end
+
+def fun_l13_n458()
+ fun_l14_n46
+end
+
+def fun_l13_n459()
+ fun_l14_n57
+end
+
+def fun_l13_n460()
+ fun_l14_n428
+end
+
+def fun_l13_n461()
+ fun_l14_n773
+end
+
+def fun_l13_n462()
+ fun_l14_n712
+end
+
+def fun_l13_n463()
+ fun_l14_n624
+end
+
+def fun_l13_n464()
+ fun_l14_n103
+end
+
+def fun_l13_n465()
+ fun_l14_n962
+end
+
+def fun_l13_n466()
+ fun_l14_n424
+end
+
+def fun_l13_n467()
+ fun_l14_n780
+end
+
+def fun_l13_n468()
+ fun_l14_n852
+end
+
+def fun_l13_n469()
+ fun_l14_n175
+end
+
+def fun_l13_n470()
+ fun_l14_n900
+end
+
+def fun_l13_n471()
+ fun_l14_n866
+end
+
+def fun_l13_n472()
+ fun_l14_n541
+end
+
+def fun_l13_n473()
+ fun_l14_n966
+end
+
+def fun_l13_n474()
+ fun_l14_n107
+end
+
+def fun_l13_n475()
+ fun_l14_n917
+end
+
+def fun_l13_n476()
+ fun_l14_n683
+end
+
+def fun_l13_n477()
+ fun_l14_n625
+end
+
+def fun_l13_n478()
+ fun_l14_n439
+end
+
+def fun_l13_n479()
+ fun_l14_n69
+end
+
+def fun_l13_n480()
+ fun_l14_n252
+end
+
+def fun_l13_n481()
+ fun_l14_n753
+end
+
+def fun_l13_n482()
+ fun_l14_n50
+end
+
+def fun_l13_n483()
+ fun_l14_n634
+end
+
+def fun_l13_n484()
+ fun_l14_n908
+end
+
+def fun_l13_n485()
+ fun_l14_n733
+end
+
+def fun_l13_n486()
+ fun_l14_n450
+end
+
+def fun_l13_n487()
+ fun_l14_n373
+end
+
+def fun_l13_n488()
+ fun_l14_n226
+end
+
+def fun_l13_n489()
+ fun_l14_n320
+end
+
+def fun_l13_n490()
+ fun_l14_n498
+end
+
+def fun_l13_n491()
+ fun_l14_n49
+end
+
+def fun_l13_n492()
+ fun_l14_n46
+end
+
+def fun_l13_n493()
+ fun_l14_n993
+end
+
+def fun_l13_n494()
+ fun_l14_n123
+end
+
+def fun_l13_n495()
+ fun_l14_n393
+end
+
+def fun_l13_n496()
+ fun_l14_n500
+end
+
+def fun_l13_n497()
+ fun_l14_n328
+end
+
+def fun_l13_n498()
+ fun_l14_n711
+end
+
+def fun_l13_n499()
+ fun_l14_n734
+end
+
+def fun_l13_n500()
+ fun_l14_n354
+end
+
+def fun_l13_n501()
+ fun_l14_n565
+end
+
+def fun_l13_n502()
+ fun_l14_n699
+end
+
+def fun_l13_n503()
+ fun_l14_n157
+end
+
+def fun_l13_n504()
+ fun_l14_n634
+end
+
+def fun_l13_n505()
+ fun_l14_n282
+end
+
+def fun_l13_n506()
+ fun_l14_n484
+end
+
+def fun_l13_n507()
+ fun_l14_n972
+end
+
+def fun_l13_n508()
+ fun_l14_n763
+end
+
+def fun_l13_n509()
+ fun_l14_n530
+end
+
+def fun_l13_n510()
+ fun_l14_n88
+end
+
+def fun_l13_n511()
+ fun_l14_n718
+end
+
+def fun_l13_n512()
+ fun_l14_n988
+end
+
+def fun_l13_n513()
+ fun_l14_n266
+end
+
+def fun_l13_n514()
+ fun_l14_n489
+end
+
+def fun_l13_n515()
+ fun_l14_n662
+end
+
+def fun_l13_n516()
+ fun_l14_n821
+end
+
+def fun_l13_n517()
+ fun_l14_n697
+end
+
+def fun_l13_n518()
+ fun_l14_n984
+end
+
+def fun_l13_n519()
+ fun_l14_n847
+end
+
+def fun_l13_n520()
+ fun_l14_n916
+end
+
+def fun_l13_n521()
+ fun_l14_n304
+end
+
+def fun_l13_n522()
+ fun_l14_n778
+end
+
+def fun_l13_n523()
+ fun_l14_n105
+end
+
+def fun_l13_n524()
+ fun_l14_n272
+end
+
+def fun_l13_n525()
+ fun_l14_n814
+end
+
+def fun_l13_n526()
+ fun_l14_n689
+end
+
+def fun_l13_n527()
+ fun_l14_n314
+end
+
+def fun_l13_n528()
+ fun_l14_n483
+end
+
+def fun_l13_n529()
+ fun_l14_n571
+end
+
+def fun_l13_n530()
+ fun_l14_n162
+end
+
+def fun_l13_n531()
+ fun_l14_n737
+end
+
+def fun_l13_n532()
+ fun_l14_n886
+end
+
+def fun_l13_n533()
+ fun_l14_n638
+end
+
+def fun_l13_n534()
+ fun_l14_n765
+end
+
+def fun_l13_n535()
+ fun_l14_n452
+end
+
+def fun_l13_n536()
+ fun_l14_n367
+end
+
+def fun_l13_n537()
+ fun_l14_n245
+end
+
+def fun_l13_n538()
+ fun_l14_n590
+end
+
+def fun_l13_n539()
+ fun_l14_n383
+end
+
+def fun_l13_n540()
+ fun_l14_n210
+end
+
+def fun_l13_n541()
+ fun_l14_n25
+end
+
+def fun_l13_n542()
+ fun_l14_n612
+end
+
+def fun_l13_n543()
+ fun_l14_n639
+end
+
+def fun_l13_n544()
+ fun_l14_n540
+end
+
+def fun_l13_n545()
+ fun_l14_n538
+end
+
+def fun_l13_n546()
+ fun_l14_n323
+end
+
+def fun_l13_n547()
+ fun_l14_n556
+end
+
+def fun_l13_n548()
+ fun_l14_n219
+end
+
+def fun_l13_n549()
+ fun_l14_n583
+end
+
+def fun_l13_n550()
+ fun_l14_n818
+end
+
+def fun_l13_n551()
+ fun_l14_n167
+end
+
+def fun_l13_n552()
+ fun_l14_n310
+end
+
+def fun_l13_n553()
+ fun_l14_n528
+end
+
+def fun_l13_n554()
+ fun_l14_n604
+end
+
+def fun_l13_n555()
+ fun_l14_n426
+end
+
+def fun_l13_n556()
+ fun_l14_n398
+end
+
+def fun_l13_n557()
+ fun_l14_n885
+end
+
+def fun_l13_n558()
+ fun_l14_n905
+end
+
+def fun_l13_n559()
+ fun_l14_n882
+end
+
+def fun_l13_n560()
+ fun_l14_n536
+end
+
+def fun_l13_n561()
+ fun_l14_n392
+end
+
+def fun_l13_n562()
+ fun_l14_n948
+end
+
+def fun_l13_n563()
+ fun_l14_n522
+end
+
+def fun_l13_n564()
+ fun_l14_n704
+end
+
+def fun_l13_n565()
+ fun_l14_n365
+end
+
+def fun_l13_n566()
+ fun_l14_n925
+end
+
+def fun_l13_n567()
+ fun_l14_n353
+end
+
+def fun_l13_n568()
+ fun_l14_n215
+end
+
+def fun_l13_n569()
+ fun_l14_n932
+end
+
+def fun_l13_n570()
+ fun_l14_n458
+end
+
+def fun_l13_n571()
+ fun_l14_n793
+end
+
+def fun_l13_n572()
+ fun_l14_n650
+end
+
+def fun_l13_n573()
+ fun_l14_n888
+end
+
+def fun_l13_n574()
+ fun_l14_n986
+end
+
+def fun_l13_n575()
+ fun_l14_n834
+end
+
+def fun_l13_n576()
+ fun_l14_n253
+end
+
+def fun_l13_n577()
+ fun_l14_n382
+end
+
+def fun_l13_n578()
+ fun_l14_n300
+end
+
+def fun_l13_n579()
+ fun_l14_n457
+end
+
+def fun_l13_n580()
+ fun_l14_n398
+end
+
+def fun_l13_n581()
+ fun_l14_n93
+end
+
+def fun_l13_n582()
+ fun_l14_n226
+end
+
+def fun_l13_n583()
+ fun_l14_n665
+end
+
+def fun_l13_n584()
+ fun_l14_n354
+end
+
+def fun_l13_n585()
+ fun_l14_n460
+end
+
+def fun_l13_n586()
+ fun_l14_n185
+end
+
+def fun_l13_n587()
+ fun_l14_n577
+end
+
+def fun_l13_n588()
+ fun_l14_n180
+end
+
+def fun_l13_n589()
+ fun_l14_n769
+end
+
+def fun_l13_n590()
+ fun_l14_n78
+end
+
+def fun_l13_n591()
+ fun_l14_n455
+end
+
+def fun_l13_n592()
+ fun_l14_n862
+end
+
+def fun_l13_n593()
+ fun_l14_n471
+end
+
+def fun_l13_n594()
+ fun_l14_n931
+end
+
+def fun_l13_n595()
+ fun_l14_n255
+end
+
+def fun_l13_n596()
+ fun_l14_n261
+end
+
+def fun_l13_n597()
+ fun_l14_n586
+end
+
+def fun_l13_n598()
+ fun_l14_n45
+end
+
+def fun_l13_n599()
+ fun_l14_n892
+end
+
+def fun_l13_n600()
+ fun_l14_n615
+end
+
+def fun_l13_n601()
+ fun_l14_n910
+end
+
+def fun_l13_n602()
+ fun_l14_n888
+end
+
+def fun_l13_n603()
+ fun_l14_n827
+end
+
+def fun_l13_n604()
+ fun_l14_n765
+end
+
+def fun_l13_n605()
+ fun_l14_n118
+end
+
+def fun_l13_n606()
+ fun_l14_n895
+end
+
+def fun_l13_n607()
+ fun_l14_n183
+end
+
+def fun_l13_n608()
+ fun_l14_n200
+end
+
+def fun_l13_n609()
+ fun_l14_n873
+end
+
+def fun_l13_n610()
+ fun_l14_n402
+end
+
+def fun_l13_n611()
+ fun_l14_n414
+end
+
+def fun_l13_n612()
+ fun_l14_n492
+end
+
+def fun_l13_n613()
+ fun_l14_n811
+end
+
+def fun_l13_n614()
+ fun_l14_n814
+end
+
+def fun_l13_n615()
+ fun_l14_n95
+end
+
+def fun_l13_n616()
+ fun_l14_n782
+end
+
+def fun_l13_n617()
+ fun_l14_n329
+end
+
+def fun_l13_n618()
+ fun_l14_n180
+end
+
+def fun_l13_n619()
+ fun_l14_n104
+end
+
+def fun_l13_n620()
+ fun_l14_n341
+end
+
+def fun_l13_n621()
+ fun_l14_n132
+end
+
+def fun_l13_n622()
+ fun_l14_n815
+end
+
+def fun_l13_n623()
+ fun_l14_n785
+end
+
+def fun_l13_n624()
+ fun_l14_n934
+end
+
+def fun_l13_n625()
+ fun_l14_n760
+end
+
+def fun_l13_n626()
+ fun_l14_n307
+end
+
+def fun_l13_n627()
+ fun_l14_n433
+end
+
+def fun_l13_n628()
+ fun_l14_n156
+end
+
+def fun_l13_n629()
+ fun_l14_n95
+end
+
+def fun_l13_n630()
+ fun_l14_n44
+end
+
+def fun_l13_n631()
+ fun_l14_n643
+end
+
+def fun_l13_n632()
+ fun_l14_n876
+end
+
+def fun_l13_n633()
+ fun_l14_n477
+end
+
+def fun_l13_n634()
+ fun_l14_n549
+end
+
+def fun_l13_n635()
+ fun_l14_n795
+end
+
+def fun_l13_n636()
+ fun_l14_n814
+end
+
+def fun_l13_n637()
+ fun_l14_n52
+end
+
+def fun_l13_n638()
+ fun_l14_n542
+end
+
+def fun_l13_n639()
+ fun_l14_n204
+end
+
+def fun_l13_n640()
+ fun_l14_n256
+end
+
+def fun_l13_n641()
+ fun_l14_n198
+end
+
+def fun_l13_n642()
+ fun_l14_n221
+end
+
+def fun_l13_n643()
+ fun_l14_n855
+end
+
+def fun_l13_n644()
+ fun_l14_n978
+end
+
+def fun_l13_n645()
+ fun_l14_n954
+end
+
+def fun_l13_n646()
+ fun_l14_n148
+end
+
+def fun_l13_n647()
+ fun_l14_n528
+end
+
+def fun_l13_n648()
+ fun_l14_n807
+end
+
+def fun_l13_n649()
+ fun_l14_n735
+end
+
+def fun_l13_n650()
+ fun_l14_n518
+end
+
+def fun_l13_n651()
+ fun_l14_n255
+end
+
+def fun_l13_n652()
+ fun_l14_n251
+end
+
+def fun_l13_n653()
+ fun_l14_n311
+end
+
+def fun_l13_n654()
+ fun_l14_n134
+end
+
+def fun_l13_n655()
+ fun_l14_n474
+end
+
+def fun_l13_n656()
+ fun_l14_n857
+end
+
+def fun_l13_n657()
+ fun_l14_n758
+end
+
+def fun_l13_n658()
+ fun_l14_n310
+end
+
+def fun_l13_n659()
+ fun_l14_n846
+end
+
+def fun_l13_n660()
+ fun_l14_n220
+end
+
+def fun_l13_n661()
+ fun_l14_n81
+end
+
+def fun_l13_n662()
+ fun_l14_n958
+end
+
+def fun_l13_n663()
+ fun_l14_n221
+end
+
+def fun_l13_n664()
+ fun_l14_n107
+end
+
+def fun_l13_n665()
+ fun_l14_n131
+end
+
+def fun_l13_n666()
+ fun_l14_n750
+end
+
+def fun_l13_n667()
+ fun_l14_n455
+end
+
+def fun_l13_n668()
+ fun_l14_n354
+end
+
+def fun_l13_n669()
+ fun_l14_n76
+end
+
+def fun_l13_n670()
+ fun_l14_n111
+end
+
+def fun_l13_n671()
+ fun_l14_n411
+end
+
+def fun_l13_n672()
+ fun_l14_n400
+end
+
+def fun_l13_n673()
+ fun_l14_n407
+end
+
+def fun_l13_n674()
+ fun_l14_n851
+end
+
+def fun_l13_n675()
+ fun_l14_n521
+end
+
+def fun_l13_n676()
+ fun_l14_n448
+end
+
+def fun_l13_n677()
+ fun_l14_n615
+end
+
+def fun_l13_n678()
+ fun_l14_n574
+end
+
+def fun_l13_n679()
+ fun_l14_n300
+end
+
+def fun_l13_n680()
+ fun_l14_n783
+end
+
+def fun_l13_n681()
+ fun_l14_n172
+end
+
+def fun_l13_n682()
+ fun_l14_n725
+end
+
+def fun_l13_n683()
+ fun_l14_n657
+end
+
+def fun_l13_n684()
+ fun_l14_n550
+end
+
+def fun_l13_n685()
+ fun_l14_n976
+end
+
+def fun_l13_n686()
+ fun_l14_n77
+end
+
+def fun_l13_n687()
+ fun_l14_n472
+end
+
+def fun_l13_n688()
+ fun_l14_n300
+end
+
+def fun_l13_n689()
+ fun_l14_n139
+end
+
+def fun_l13_n690()
+ fun_l14_n623
+end
+
+def fun_l13_n691()
+ fun_l14_n336
+end
+
+def fun_l13_n692()
+ fun_l14_n502
+end
+
+def fun_l13_n693()
+ fun_l14_n184
+end
+
+def fun_l13_n694()
+ fun_l14_n745
+end
+
+def fun_l13_n695()
+ fun_l14_n27
+end
+
+def fun_l13_n696()
+ fun_l14_n299
+end
+
+def fun_l13_n697()
+ fun_l14_n7
+end
+
+def fun_l13_n698()
+ fun_l14_n842
+end
+
+def fun_l13_n699()
+ fun_l14_n592
+end
+
+def fun_l13_n700()
+ fun_l14_n993
+end
+
+def fun_l13_n701()
+ fun_l14_n113
+end
+
+def fun_l13_n702()
+ fun_l14_n997
+end
+
+def fun_l13_n703()
+ fun_l14_n740
+end
+
+def fun_l13_n704()
+ fun_l14_n261
+end
+
+def fun_l13_n705()
+ fun_l14_n737
+end
+
+def fun_l13_n706()
+ fun_l14_n216
+end
+
+def fun_l13_n707()
+ fun_l14_n607
+end
+
+def fun_l13_n708()
+ fun_l14_n520
+end
+
+def fun_l13_n709()
+ fun_l14_n133
+end
+
+def fun_l13_n710()
+ fun_l14_n615
+end
+
+def fun_l13_n711()
+ fun_l14_n476
+end
+
+def fun_l13_n712()
+ fun_l14_n154
+end
+
+def fun_l13_n713()
+ fun_l14_n947
+end
+
+def fun_l13_n714()
+ fun_l14_n893
+end
+
+def fun_l13_n715()
+ fun_l14_n296
+end
+
+def fun_l13_n716()
+ fun_l14_n275
+end
+
+def fun_l13_n717()
+ fun_l14_n622
+end
+
+def fun_l13_n718()
+ fun_l14_n561
+end
+
+def fun_l13_n719()
+ fun_l14_n216
+end
+
+def fun_l13_n720()
+ fun_l14_n459
+end
+
+def fun_l13_n721()
+ fun_l14_n329
+end
+
+def fun_l13_n722()
+ fun_l14_n901
+end
+
+def fun_l13_n723()
+ fun_l14_n824
+end
+
+def fun_l13_n724()
+ fun_l14_n359
+end
+
+def fun_l13_n725()
+ fun_l14_n399
+end
+
+def fun_l13_n726()
+ fun_l14_n998
+end
+
+def fun_l13_n727()
+ fun_l14_n327
+end
+
+def fun_l13_n728()
+ fun_l14_n659
+end
+
+def fun_l13_n729()
+ fun_l14_n564
+end
+
+def fun_l13_n730()
+ fun_l14_n718
+end
+
+def fun_l13_n731()
+ fun_l14_n751
+end
+
+def fun_l13_n732()
+ fun_l14_n172
+end
+
+def fun_l13_n733()
+ fun_l14_n289
+end
+
+def fun_l13_n734()
+ fun_l14_n956
+end
+
+def fun_l13_n735()
+ fun_l14_n375
+end
+
+def fun_l13_n736()
+ fun_l14_n459
+end
+
+def fun_l13_n737()
+ fun_l14_n471
+end
+
+def fun_l13_n738()
+ fun_l14_n957
+end
+
+def fun_l13_n739()
+ fun_l14_n670
+end
+
+def fun_l13_n740()
+ fun_l14_n396
+end
+
+def fun_l13_n741()
+ fun_l14_n909
+end
+
+def fun_l13_n742()
+ fun_l14_n226
+end
+
+def fun_l13_n743()
+ fun_l14_n458
+end
+
+def fun_l13_n744()
+ fun_l14_n923
+end
+
+def fun_l13_n745()
+ fun_l14_n255
+end
+
+def fun_l13_n746()
+ fun_l14_n2
+end
+
+def fun_l13_n747()
+ fun_l14_n805
+end
+
+def fun_l13_n748()
+ fun_l14_n157
+end
+
+def fun_l13_n749()
+ fun_l14_n952
+end
+
+def fun_l13_n750()
+ fun_l14_n902
+end
+
+def fun_l13_n751()
+ fun_l14_n723
+end
+
+def fun_l13_n752()
+ fun_l14_n204
+end
+
+def fun_l13_n753()
+ fun_l14_n53
+end
+
+def fun_l13_n754()
+ fun_l14_n240
+end
+
+def fun_l13_n755()
+ fun_l14_n161
+end
+
+def fun_l13_n756()
+ fun_l14_n735
+end
+
+def fun_l13_n757()
+ fun_l14_n298
+end
+
+def fun_l13_n758()
+ fun_l14_n743
+end
+
+def fun_l13_n759()
+ fun_l14_n886
+end
+
+def fun_l13_n760()
+ fun_l14_n559
+end
+
+def fun_l13_n761()
+ fun_l14_n42
+end
+
+def fun_l13_n762()
+ fun_l14_n86
+end
+
+def fun_l13_n763()
+ fun_l14_n138
+end
+
+def fun_l13_n764()
+ fun_l14_n477
+end
+
+def fun_l13_n765()
+ fun_l14_n763
+end
+
+def fun_l13_n766()
+ fun_l14_n360
+end
+
+def fun_l13_n767()
+ fun_l14_n486
+end
+
+def fun_l13_n768()
+ fun_l14_n734
+end
+
+def fun_l13_n769()
+ fun_l14_n442
+end
+
+def fun_l13_n770()
+ fun_l14_n512
+end
+
+def fun_l13_n771()
+ fun_l14_n399
+end
+
+def fun_l13_n772()
+ fun_l14_n88
+end
+
+def fun_l13_n773()
+ fun_l14_n55
+end
+
+def fun_l13_n774()
+ fun_l14_n138
+end
+
+def fun_l13_n775()
+ fun_l14_n104
+end
+
+def fun_l13_n776()
+ fun_l14_n901
+end
+
+def fun_l13_n777()
+ fun_l14_n7
+end
+
+def fun_l13_n778()
+ fun_l14_n72
+end
+
+def fun_l13_n779()
+ fun_l14_n588
+end
+
+def fun_l13_n780()
+ fun_l14_n266
+end
+
+def fun_l13_n781()
+ fun_l14_n428
+end
+
+def fun_l13_n782()
+ fun_l14_n802
+end
+
+def fun_l13_n783()
+ fun_l14_n59
+end
+
+def fun_l13_n784()
+ fun_l14_n734
+end
+
+def fun_l13_n785()
+ fun_l14_n674
+end
+
+def fun_l13_n786()
+ fun_l14_n126
+end
+
+def fun_l13_n787()
+ fun_l14_n199
+end
+
+def fun_l13_n788()
+ fun_l14_n695
+end
+
+def fun_l13_n789()
+ fun_l14_n332
+end
+
+def fun_l13_n790()
+ fun_l14_n734
+end
+
+def fun_l13_n791()
+ fun_l14_n856
+end
+
+def fun_l13_n792()
+ fun_l14_n447
+end
+
+def fun_l13_n793()
+ fun_l14_n931
+end
+
+def fun_l13_n794()
+ fun_l14_n608
+end
+
+def fun_l13_n795()
+ fun_l14_n131
+end
+
+def fun_l13_n796()
+ fun_l14_n961
+end
+
+def fun_l13_n797()
+ fun_l14_n109
+end
+
+def fun_l13_n798()
+ fun_l14_n766
+end
+
+def fun_l13_n799()
+ fun_l14_n149
+end
+
+def fun_l13_n800()
+ fun_l14_n44
+end
+
+def fun_l13_n801()
+ fun_l14_n893
+end
+
+def fun_l13_n802()
+ fun_l14_n826
+end
+
+def fun_l13_n803()
+ fun_l14_n372
+end
+
+def fun_l13_n804()
+ fun_l14_n7
+end
+
+def fun_l13_n805()
+ fun_l14_n655
+end
+
+def fun_l13_n806()
+ fun_l14_n418
+end
+
+def fun_l13_n807()
+ fun_l14_n746
+end
+
+def fun_l13_n808()
+ fun_l14_n810
+end
+
+def fun_l13_n809()
+ fun_l14_n838
+end
+
+def fun_l13_n810()
+ fun_l14_n522
+end
+
+def fun_l13_n811()
+ fun_l14_n723
+end
+
+def fun_l13_n812()
+ fun_l14_n476
+end
+
+def fun_l13_n813()
+ fun_l14_n760
+end
+
+def fun_l13_n814()
+ fun_l14_n728
+end
+
+def fun_l13_n815()
+ fun_l14_n926
+end
+
+def fun_l13_n816()
+ fun_l14_n16
+end
+
+def fun_l13_n817()
+ fun_l14_n888
+end
+
+def fun_l13_n818()
+ fun_l14_n812
+end
+
+def fun_l13_n819()
+ fun_l14_n430
+end
+
+def fun_l13_n820()
+ fun_l14_n211
+end
+
+def fun_l13_n821()
+ fun_l14_n204
+end
+
+def fun_l13_n822()
+ fun_l14_n868
+end
+
+def fun_l13_n823()
+ fun_l14_n460
+end
+
+def fun_l13_n824()
+ fun_l14_n597
+end
+
+def fun_l13_n825()
+ fun_l14_n217
+end
+
+def fun_l13_n826()
+ fun_l14_n425
+end
+
+def fun_l13_n827()
+ fun_l14_n216
+end
+
+def fun_l13_n828()
+ fun_l14_n931
+end
+
+def fun_l13_n829()
+ fun_l14_n3
+end
+
+def fun_l13_n830()
+ fun_l14_n55
+end
+
+def fun_l13_n831()
+ fun_l14_n362
+end
+
+def fun_l13_n832()
+ fun_l14_n591
+end
+
+def fun_l13_n833()
+ fun_l14_n339
+end
+
+def fun_l13_n834()
+ fun_l14_n641
+end
+
+def fun_l13_n835()
+ fun_l14_n389
+end
+
+def fun_l13_n836()
+ fun_l14_n668
+end
+
+def fun_l13_n837()
+ fun_l14_n845
+end
+
+def fun_l13_n838()
+ fun_l14_n202
+end
+
+def fun_l13_n839()
+ fun_l14_n575
+end
+
+def fun_l13_n840()
+ fun_l14_n357
+end
+
+def fun_l13_n841()
+ fun_l14_n271
+end
+
+def fun_l13_n842()
+ fun_l14_n876
+end
+
+def fun_l13_n843()
+ fun_l14_n983
+end
+
+def fun_l13_n844()
+ fun_l14_n512
+end
+
+def fun_l13_n845()
+ fun_l14_n205
+end
+
+def fun_l13_n846()
+ fun_l14_n463
+end
+
+def fun_l13_n847()
+ fun_l14_n422
+end
+
+def fun_l13_n848()
+ fun_l14_n54
+end
+
+def fun_l13_n849()
+ fun_l14_n575
+end
+
+def fun_l13_n850()
+ fun_l14_n187
+end
+
+def fun_l13_n851()
+ fun_l14_n151
+end
+
+def fun_l13_n852()
+ fun_l14_n176
+end
+
+def fun_l13_n853()
+ fun_l14_n501
+end
+
+def fun_l13_n854()
+ fun_l14_n390
+end
+
+def fun_l13_n855()
+ fun_l14_n902
+end
+
+def fun_l13_n856()
+ fun_l14_n354
+end
+
+def fun_l13_n857()
+ fun_l14_n245
+end
+
+def fun_l13_n858()
+ fun_l14_n299
+end
+
+def fun_l13_n859()
+ fun_l14_n532
+end
+
+def fun_l13_n860()
+ fun_l14_n263
+end
+
+def fun_l13_n861()
+ fun_l14_n811
+end
+
+def fun_l13_n862()
+ fun_l14_n298
+end
+
+def fun_l13_n863()
+ fun_l14_n635
+end
+
+def fun_l13_n864()
+ fun_l14_n913
+end
+
+def fun_l13_n865()
+ fun_l14_n901
+end
+
+def fun_l13_n866()
+ fun_l14_n380
+end
+
+def fun_l13_n867()
+ fun_l14_n9
+end
+
+def fun_l13_n868()
+ fun_l14_n982
+end
+
+def fun_l13_n869()
+ fun_l14_n703
+end
+
+def fun_l13_n870()
+ fun_l14_n272
+end
+
+def fun_l13_n871()
+ fun_l14_n209
+end
+
+def fun_l13_n872()
+ fun_l14_n429
+end
+
+def fun_l13_n873()
+ fun_l14_n108
+end
+
+def fun_l13_n874()
+ fun_l14_n116
+end
+
+def fun_l13_n875()
+ fun_l14_n169
+end
+
+def fun_l13_n876()
+ fun_l14_n642
+end
+
+def fun_l13_n877()
+ fun_l14_n265
+end
+
+def fun_l13_n878()
+ fun_l14_n227
+end
+
+def fun_l13_n879()
+ fun_l14_n202
+end
+
+def fun_l13_n880()
+ fun_l14_n336
+end
+
+def fun_l13_n881()
+ fun_l14_n856
+end
+
+def fun_l13_n882()
+ fun_l14_n821
+end
+
+def fun_l13_n883()
+ fun_l14_n275
+end
+
+def fun_l13_n884()
+ fun_l14_n903
+end
+
+def fun_l13_n885()
+ fun_l14_n407
+end
+
+def fun_l13_n886()
+ fun_l14_n129
+end
+
+def fun_l13_n887()
+ fun_l14_n68
+end
+
+def fun_l13_n888()
+ fun_l14_n124
+end
+
+def fun_l13_n889()
+ fun_l14_n936
+end
+
+def fun_l13_n890()
+ fun_l14_n401
+end
+
+def fun_l13_n891()
+ fun_l14_n574
+end
+
+def fun_l13_n892()
+ fun_l14_n593
+end
+
+def fun_l13_n893()
+ fun_l14_n262
+end
+
+def fun_l13_n894()
+ fun_l14_n215
+end
+
+def fun_l13_n895()
+ fun_l14_n49
+end
+
+def fun_l13_n896()
+ fun_l14_n767
+end
+
+def fun_l13_n897()
+ fun_l14_n280
+end
+
+def fun_l13_n898()
+ fun_l14_n112
+end
+
+def fun_l13_n899()
+ fun_l14_n202
+end
+
+def fun_l13_n900()
+ fun_l14_n73
+end
+
+def fun_l13_n901()
+ fun_l14_n798
+end
+
+def fun_l13_n902()
+ fun_l14_n827
+end
+
+def fun_l13_n903()
+ fun_l14_n824
+end
+
+def fun_l13_n904()
+ fun_l14_n414
+end
+
+def fun_l13_n905()
+ fun_l14_n502
+end
+
+def fun_l13_n906()
+ fun_l14_n323
+end
+
+def fun_l13_n907()
+ fun_l14_n216
+end
+
+def fun_l13_n908()
+ fun_l14_n173
+end
+
+def fun_l13_n909()
+ fun_l14_n26
+end
+
+def fun_l13_n910()
+ fun_l14_n40
+end
+
+def fun_l13_n911()
+ fun_l14_n883
+end
+
+def fun_l13_n912()
+ fun_l14_n523
+end
+
+def fun_l13_n913()
+ fun_l14_n979
+end
+
+def fun_l13_n914()
+ fun_l14_n921
+end
+
+def fun_l13_n915()
+ fun_l14_n842
+end
+
+def fun_l13_n916()
+ fun_l14_n943
+end
+
+def fun_l13_n917()
+ fun_l14_n97
+end
+
+def fun_l13_n918()
+ fun_l14_n515
+end
+
+def fun_l13_n919()
+ fun_l14_n145
+end
+
+def fun_l13_n920()
+ fun_l14_n497
+end
+
+def fun_l13_n921()
+ fun_l14_n264
+end
+
+def fun_l13_n922()
+ fun_l14_n901
+end
+
+def fun_l13_n923()
+ fun_l14_n436
+end
+
+def fun_l13_n924()
+ fun_l14_n315
+end
+
+def fun_l13_n925()
+ fun_l14_n512
+end
+
+def fun_l13_n926()
+ fun_l14_n611
+end
+
+def fun_l13_n927()
+ fun_l14_n103
+end
+
+def fun_l13_n928()
+ fun_l14_n149
+end
+
+def fun_l13_n929()
+ fun_l14_n407
+end
+
+def fun_l13_n930()
+ fun_l14_n380
+end
+
+def fun_l13_n931()
+ fun_l14_n429
+end
+
+def fun_l13_n932()
+ fun_l14_n870
+end
+
+def fun_l13_n933()
+ fun_l14_n274
+end
+
+def fun_l13_n934()
+ fun_l14_n57
+end
+
+def fun_l13_n935()
+ fun_l14_n718
+end
+
+def fun_l13_n936()
+ fun_l14_n571
+end
+
+def fun_l13_n937()
+ fun_l14_n447
+end
+
+def fun_l13_n938()
+ fun_l14_n742
+end
+
+def fun_l13_n939()
+ fun_l14_n811
+end
+
+def fun_l13_n940()
+ fun_l14_n148
+end
+
+def fun_l13_n941()
+ fun_l14_n795
+end
+
+def fun_l13_n942()
+ fun_l14_n807
+end
+
+def fun_l13_n943()
+ fun_l14_n279
+end
+
+def fun_l13_n944()
+ fun_l14_n939
+end
+
+def fun_l13_n945()
+ fun_l14_n435
+end
+
+def fun_l13_n946()
+ fun_l14_n937
+end
+
+def fun_l13_n947()
+ fun_l14_n543
+end
+
+def fun_l13_n948()
+ fun_l14_n374
+end
+
+def fun_l13_n949()
+ fun_l14_n707
+end
+
+def fun_l13_n950()
+ fun_l14_n866
+end
+
+def fun_l13_n951()
+ fun_l14_n67
+end
+
+def fun_l13_n952()
+ fun_l14_n752
+end
+
+def fun_l13_n953()
+ fun_l14_n113
+end
+
+def fun_l13_n954()
+ fun_l14_n358
+end
+
+def fun_l13_n955()
+ fun_l14_n432
+end
+
+def fun_l13_n956()
+ fun_l14_n132
+end
+
+def fun_l13_n957()
+ fun_l14_n807
+end
+
+def fun_l13_n958()
+ fun_l14_n293
+end
+
+def fun_l13_n959()
+ fun_l14_n681
+end
+
+def fun_l13_n960()
+ fun_l14_n335
+end
+
+def fun_l13_n961()
+ fun_l14_n285
+end
+
+def fun_l13_n962()
+ fun_l14_n366
+end
+
+def fun_l13_n963()
+ fun_l14_n674
+end
+
+def fun_l13_n964()
+ fun_l14_n914
+end
+
+def fun_l13_n965()
+ fun_l14_n776
+end
+
+def fun_l13_n966()
+ fun_l14_n297
+end
+
+def fun_l13_n967()
+ fun_l14_n623
+end
+
+def fun_l13_n968()
+ fun_l14_n357
+end
+
+def fun_l13_n969()
+ fun_l14_n430
+end
+
+def fun_l13_n970()
+ fun_l14_n201
+end
+
+def fun_l13_n971()
+ fun_l14_n482
+end
+
+def fun_l13_n972()
+ fun_l14_n363
+end
+
+def fun_l13_n973()
+ fun_l14_n530
+end
+
+def fun_l13_n974()
+ fun_l14_n892
+end
+
+def fun_l13_n975()
+ fun_l14_n548
+end
+
+def fun_l13_n976()
+ fun_l14_n257
+end
+
+def fun_l13_n977()
+ fun_l14_n449
+end
+
+def fun_l13_n978()
+ fun_l14_n346
+end
+
+def fun_l13_n979()
+ fun_l14_n448
+end
+
+def fun_l13_n980()
+ fun_l14_n912
+end
+
+def fun_l13_n981()
+ fun_l14_n358
+end
+
+def fun_l13_n982()
+ fun_l14_n55
+end
+
+def fun_l13_n983()
+ fun_l14_n712
+end
+
+def fun_l13_n984()
+ fun_l14_n179
+end
+
+def fun_l13_n985()
+ fun_l14_n749
+end
+
+def fun_l13_n986()
+ fun_l14_n469
+end
+
+def fun_l13_n987()
+ fun_l14_n557
+end
+
+def fun_l13_n988()
+ fun_l14_n383
+end
+
+def fun_l13_n989()
+ fun_l14_n929
+end
+
+def fun_l13_n990()
+ fun_l14_n659
+end
+
+def fun_l13_n991()
+ fun_l14_n285
+end
+
+def fun_l13_n992()
+ fun_l14_n779
+end
+
+def fun_l13_n993()
+ fun_l14_n235
+end
+
+def fun_l13_n994()
+ fun_l14_n756
+end
+
+def fun_l13_n995()
+ fun_l14_n249
+end
+
+def fun_l13_n996()
+ fun_l14_n8
+end
+
+def fun_l13_n997()
+ fun_l14_n785
+end
+
+def fun_l13_n998()
+ fun_l14_n945
+end
+
+def fun_l13_n999()
+ fun_l14_n410
+end
+
+def fun_l14_n0()
+ fun_l15_n85
+end
+
+def fun_l14_n1()
+ fun_l15_n932
+end
+
+def fun_l14_n2()
+ fun_l15_n422
+end
+
+def fun_l14_n3()
+ fun_l15_n439
+end
+
+def fun_l14_n4()
+ fun_l15_n186
+end
+
+def fun_l14_n5()
+ fun_l15_n914
+end
+
+def fun_l14_n6()
+ fun_l15_n830
+end
+
+def fun_l14_n7()
+ fun_l15_n384
+end
+
+def fun_l14_n8()
+ fun_l15_n200
+end
+
+def fun_l14_n9()
+ fun_l15_n72
+end
+
+def fun_l14_n10()
+ fun_l15_n498
+end
+
+def fun_l14_n11()
+ fun_l15_n247
+end
+
+def fun_l14_n12()
+ fun_l15_n432
+end
+
+def fun_l14_n13()
+ fun_l15_n718
+end
+
+def fun_l14_n14()
+ fun_l15_n568
+end
+
+def fun_l14_n15()
+ fun_l15_n971
+end
+
+def fun_l14_n16()
+ fun_l15_n545
+end
+
+def fun_l14_n17()
+ fun_l15_n441
+end
+
+def fun_l14_n18()
+ fun_l15_n532
+end
+
+def fun_l14_n19()
+ fun_l15_n484
+end
+
+def fun_l14_n20()
+ fun_l15_n659
+end
+
+def fun_l14_n21()
+ fun_l15_n494
+end
+
+def fun_l14_n22()
+ fun_l15_n379
+end
+
+def fun_l14_n23()
+ fun_l15_n180
+end
+
+def fun_l14_n24()
+ fun_l15_n955
+end
+
+def fun_l14_n25()
+ fun_l15_n536
+end
+
+def fun_l14_n26()
+ fun_l15_n940
+end
+
+def fun_l14_n27()
+ fun_l15_n3
+end
+
+def fun_l14_n28()
+ fun_l15_n520
+end
+
+def fun_l14_n29()
+ fun_l15_n478
+end
+
+def fun_l14_n30()
+ fun_l15_n865
+end
+
+def fun_l14_n31()
+ fun_l15_n330
+end
+
+def fun_l14_n32()
+ fun_l15_n217
+end
+
+def fun_l14_n33()
+ fun_l15_n381
+end
+
+def fun_l14_n34()
+ fun_l15_n88
+end
+
+def fun_l14_n35()
+ fun_l15_n111
+end
+
+def fun_l14_n36()
+ fun_l15_n181
+end
+
+def fun_l14_n37()
+ fun_l15_n978
+end
+
+def fun_l14_n38()
+ fun_l15_n596
+end
+
+def fun_l14_n39()
+ fun_l15_n764
+end
+
+def fun_l14_n40()
+ fun_l15_n779
+end
+
+def fun_l14_n41()
+ fun_l15_n994
+end
+
+def fun_l14_n42()
+ fun_l15_n90
+end
+
+def fun_l14_n43()
+ fun_l15_n329
+end
+
+def fun_l14_n44()
+ fun_l15_n684
+end
+
+def fun_l14_n45()
+ fun_l15_n191
+end
+
+def fun_l14_n46()
+ fun_l15_n282
+end
+
+def fun_l14_n47()
+ fun_l15_n915
+end
+
+def fun_l14_n48()
+ fun_l15_n330
+end
+
+def fun_l14_n49()
+ fun_l15_n136
+end
+
+def fun_l14_n50()
+ fun_l15_n167
+end
+
+def fun_l14_n51()
+ fun_l15_n418
+end
+
+def fun_l14_n52()
+ fun_l15_n822
+end
+
+def fun_l14_n53()
+ fun_l15_n557
+end
+
+def fun_l14_n54()
+ fun_l15_n155
+end
+
+def fun_l14_n55()
+ fun_l15_n629
+end
+
+def fun_l14_n56()
+ fun_l15_n694
+end
+
+def fun_l14_n57()
+ fun_l15_n577
+end
+
+def fun_l14_n58()
+ fun_l15_n412
+end
+
+def fun_l14_n59()
+ fun_l15_n618
+end
+
+def fun_l14_n60()
+ fun_l15_n873
+end
+
+def fun_l14_n61()
+ fun_l15_n758
+end
+
+def fun_l14_n62()
+ fun_l15_n820
+end
+
+def fun_l14_n63()
+ fun_l15_n89
+end
+
+def fun_l14_n64()
+ fun_l15_n788
+end
+
+def fun_l14_n65()
+ fun_l15_n390
+end
+
+def fun_l14_n66()
+ fun_l15_n177
+end
+
+def fun_l14_n67()
+ fun_l15_n972
+end
+
+def fun_l14_n68()
+ fun_l15_n124
+end
+
+def fun_l14_n69()
+ fun_l15_n426
+end
+
+def fun_l14_n70()
+ fun_l15_n490
+end
+
+def fun_l14_n71()
+ fun_l15_n963
+end
+
+def fun_l14_n72()
+ fun_l15_n960
+end
+
+def fun_l14_n73()
+ fun_l15_n111
+end
+
+def fun_l14_n74()
+ fun_l15_n535
+end
+
+def fun_l14_n75()
+ fun_l15_n936
+end
+
+def fun_l14_n76()
+ fun_l15_n17
+end
+
+def fun_l14_n77()
+ fun_l15_n732
+end
+
+def fun_l14_n78()
+ fun_l15_n905
+end
+
+def fun_l14_n79()
+ fun_l15_n658
+end
+
+def fun_l14_n80()
+ fun_l15_n869
+end
+
+def fun_l14_n81()
+ fun_l15_n966
+end
+
+def fun_l14_n82()
+ fun_l15_n413
+end
+
+def fun_l14_n83()
+ fun_l15_n360
+end
+
+def fun_l14_n84()
+ fun_l15_n955
+end
+
+def fun_l14_n85()
+ fun_l15_n612
+end
+
+def fun_l14_n86()
+ fun_l15_n665
+end
+
+def fun_l14_n87()
+ fun_l15_n570
+end
+
+def fun_l14_n88()
+ fun_l15_n381
+end
+
+def fun_l14_n89()
+ fun_l15_n169
+end
+
+def fun_l14_n90()
+ fun_l15_n33
+end
+
+def fun_l14_n91()
+ fun_l15_n574
+end
+
+def fun_l14_n92()
+ fun_l15_n826
+end
+
+def fun_l14_n93()
+ fun_l15_n183
+end
+
+def fun_l14_n94()
+ fun_l15_n878
+end
+
+def fun_l14_n95()
+ fun_l15_n898
+end
+
+def fun_l14_n96()
+ fun_l15_n296
+end
+
+def fun_l14_n97()
+ fun_l15_n769
+end
+
+def fun_l14_n98()
+ fun_l15_n41
+end
+
+def fun_l14_n99()
+ fun_l15_n644
+end
+
+def fun_l14_n100()
+ fun_l15_n218
+end
+
+def fun_l14_n101()
+ fun_l15_n267
+end
+
+def fun_l14_n102()
+ fun_l15_n846
+end
+
+def fun_l14_n103()
+ fun_l15_n409
+end
+
+def fun_l14_n104()
+ fun_l15_n776
+end
+
+def fun_l14_n105()
+ fun_l15_n224
+end
+
+def fun_l14_n106()
+ fun_l15_n401
+end
+
+def fun_l14_n107()
+ fun_l15_n726
+end
+
+def fun_l14_n108()
+ fun_l15_n624
+end
+
+def fun_l14_n109()
+ fun_l15_n319
+end
+
+def fun_l14_n110()
+ fun_l15_n180
+end
+
+def fun_l14_n111()
+ fun_l15_n370
+end
+
+def fun_l14_n112()
+ fun_l15_n834
+end
+
+def fun_l14_n113()
+ fun_l15_n397
+end
+
+def fun_l14_n114()
+ fun_l15_n685
+end
+
+def fun_l14_n115()
+ fun_l15_n286
+end
+
+def fun_l14_n116()
+ fun_l15_n740
+end
+
+def fun_l14_n117()
+ fun_l15_n122
+end
+
+def fun_l14_n118()
+ fun_l15_n112
+end
+
+def fun_l14_n119()
+ fun_l15_n658
+end
+
+def fun_l14_n120()
+ fun_l15_n844
+end
+
+def fun_l14_n121()
+ fun_l15_n715
+end
+
+def fun_l14_n122()
+ fun_l15_n14
+end
+
+def fun_l14_n123()
+ fun_l15_n677
+end
+
+def fun_l14_n124()
+ fun_l15_n742
+end
+
+def fun_l14_n125()
+ fun_l15_n311
+end
+
+def fun_l14_n126()
+ fun_l15_n234
+end
+
+def fun_l14_n127()
+ fun_l15_n746
+end
+
+def fun_l14_n128()
+ fun_l15_n616
+end
+
+def fun_l14_n129()
+ fun_l15_n529
+end
+
+def fun_l14_n130()
+ fun_l15_n330
+end
+
+def fun_l14_n131()
+ fun_l15_n182
+end
+
+def fun_l14_n132()
+ fun_l15_n588
+end
+
+def fun_l14_n133()
+ fun_l15_n477
+end
+
+def fun_l14_n134()
+ fun_l15_n267
+end
+
+def fun_l14_n135()
+ fun_l15_n667
+end
+
+def fun_l14_n136()
+ fun_l15_n233
+end
+
+def fun_l14_n137()
+ fun_l15_n630
+end
+
+def fun_l14_n138()
+ fun_l15_n993
+end
+
+def fun_l14_n139()
+ fun_l15_n79
+end
+
+def fun_l14_n140()
+ fun_l15_n2
+end
+
+def fun_l14_n141()
+ fun_l15_n774
+end
+
+def fun_l14_n142()
+ fun_l15_n762
+end
+
+def fun_l14_n143()
+ fun_l15_n832
+end
+
+def fun_l14_n144()
+ fun_l15_n359
+end
+
+def fun_l14_n145()
+ fun_l15_n344
+end
+
+def fun_l14_n146()
+ fun_l15_n521
+end
+
+def fun_l14_n147()
+ fun_l15_n867
+end
+
+def fun_l14_n148()
+ fun_l15_n132
+end
+
+def fun_l14_n149()
+ fun_l15_n19
+end
+
+def fun_l14_n150()
+ fun_l15_n513
+end
+
+def fun_l14_n151()
+ fun_l15_n732
+end
+
+def fun_l14_n152()
+ fun_l15_n709
+end
+
+def fun_l14_n153()
+ fun_l15_n876
+end
+
+def fun_l14_n154()
+ fun_l15_n400
+end
+
+def fun_l14_n155()
+ fun_l15_n539
+end
+
+def fun_l14_n156()
+ fun_l15_n895
+end
+
+def fun_l14_n157()
+ fun_l15_n208
+end
+
+def fun_l14_n158()
+ fun_l15_n268
+end
+
+def fun_l14_n159()
+ fun_l15_n286
+end
+
+def fun_l14_n160()
+ fun_l15_n457
+end
+
+def fun_l14_n161()
+ fun_l15_n985
+end
+
+def fun_l14_n162()
+ fun_l15_n48
+end
+
+def fun_l14_n163()
+ fun_l15_n495
+end
+
+def fun_l14_n164()
+ fun_l15_n10
+end
+
+def fun_l14_n165()
+ fun_l15_n368
+end
+
+def fun_l14_n166()
+ fun_l15_n266
+end
+
+def fun_l14_n167()
+ fun_l15_n587
+end
+
+def fun_l14_n168()
+ fun_l15_n210
+end
+
+def fun_l14_n169()
+ fun_l15_n5
+end
+
+def fun_l14_n170()
+ fun_l15_n635
+end
+
+def fun_l14_n171()
+ fun_l15_n47
+end
+
+def fun_l14_n172()
+ fun_l15_n88
+end
+
+def fun_l14_n173()
+ fun_l15_n79
+end
+
+def fun_l14_n174()
+ fun_l15_n791
+end
+
+def fun_l14_n175()
+ fun_l15_n812
+end
+
+def fun_l14_n176()
+ fun_l15_n112
+end
+
+def fun_l14_n177()
+ fun_l15_n590
+end
+
+def fun_l14_n178()
+ fun_l15_n59
+end
+
+def fun_l14_n179()
+ fun_l15_n275
+end
+
+def fun_l14_n180()
+ fun_l15_n206
+end
+
+def fun_l14_n181()
+ fun_l15_n385
+end
+
+def fun_l14_n182()
+ fun_l15_n809
+end
+
+def fun_l14_n183()
+ fun_l15_n704
+end
+
+def fun_l14_n184()
+ fun_l15_n331
+end
+
+def fun_l14_n185()
+ fun_l15_n819
+end
+
+def fun_l14_n186()
+ fun_l15_n165
+end
+
+def fun_l14_n187()
+ fun_l15_n623
+end
+
+def fun_l14_n188()
+ fun_l15_n528
+end
+
+def fun_l14_n189()
+ fun_l15_n393
+end
+
+def fun_l14_n190()
+ fun_l15_n712
+end
+
+def fun_l14_n191()
+ fun_l15_n951
+end
+
+def fun_l14_n192()
+ fun_l15_n584
+end
+
+def fun_l14_n193()
+ fun_l15_n984
+end
+
+def fun_l14_n194()
+ fun_l15_n283
+end
+
+def fun_l14_n195()
+ fun_l15_n821
+end
+
+def fun_l14_n196()
+ fun_l15_n105
+end
+
+def fun_l14_n197()
+ fun_l15_n49
+end
+
+def fun_l14_n198()
+ fun_l15_n191
+end
+
+def fun_l14_n199()
+ fun_l15_n751
+end
+
+def fun_l14_n200()
+ fun_l15_n108
+end
+
+def fun_l14_n201()
+ fun_l15_n121
+end
+
+def fun_l14_n202()
+ fun_l15_n751
+end
+
+def fun_l14_n203()
+ fun_l15_n837
+end
+
+def fun_l14_n204()
+ fun_l15_n747
+end
+
+def fun_l14_n205()
+ fun_l15_n682
+end
+
+def fun_l14_n206()
+ fun_l15_n689
+end
+
+def fun_l14_n207()
+ fun_l15_n562
+end
+
+def fun_l14_n208()
+ fun_l15_n580
+end
+
+def fun_l14_n209()
+ fun_l15_n556
+end
+
+def fun_l14_n210()
+ fun_l15_n155
+end
+
+def fun_l14_n211()
+ fun_l15_n661
+end
+
+def fun_l14_n212()
+ fun_l15_n571
+end
+
+def fun_l14_n213()
+ fun_l15_n341
+end
+
+def fun_l14_n214()
+ fun_l15_n200
+end
+
+def fun_l14_n215()
+ fun_l15_n78
+end
+
+def fun_l14_n216()
+ fun_l15_n922
+end
+
+def fun_l14_n217()
+ fun_l15_n437
+end
+
+def fun_l14_n218()
+ fun_l15_n263
+end
+
+def fun_l14_n219()
+ fun_l15_n971
+end
+
+def fun_l14_n220()
+ fun_l15_n65
+end
+
+def fun_l14_n221()
+ fun_l15_n951
+end
+
+def fun_l14_n222()
+ fun_l15_n163
+end
+
+def fun_l14_n223()
+ fun_l15_n732
+end
+
+def fun_l14_n224()
+ fun_l15_n424
+end
+
+def fun_l14_n225()
+ fun_l15_n91
+end
+
+def fun_l14_n226()
+ fun_l15_n711
+end
+
+def fun_l14_n227()
+ fun_l15_n224
+end
+
+def fun_l14_n228()
+ fun_l15_n885
+end
+
+def fun_l14_n229()
+ fun_l15_n489
+end
+
+def fun_l14_n230()
+ fun_l15_n733
+end
+
+def fun_l14_n231()
+ fun_l15_n355
+end
+
+def fun_l14_n232()
+ fun_l15_n819
+end
+
+def fun_l14_n233()
+ fun_l15_n934
+end
+
+def fun_l14_n234()
+ fun_l15_n643
+end
+
+def fun_l14_n235()
+ fun_l15_n555
+end
+
+def fun_l14_n236()
+ fun_l15_n508
+end
+
+def fun_l14_n237()
+ fun_l15_n181
+end
+
+def fun_l14_n238()
+ fun_l15_n171
+end
+
+def fun_l14_n239()
+ fun_l15_n834
+end
+
+def fun_l14_n240()
+ fun_l15_n599
+end
+
+def fun_l14_n241()
+ fun_l15_n492
+end
+
+def fun_l14_n242()
+ fun_l15_n131
+end
+
+def fun_l14_n243()
+ fun_l15_n838
+end
+
+def fun_l14_n244()
+ fun_l15_n745
+end
+
+def fun_l14_n245()
+ fun_l15_n653
+end
+
+def fun_l14_n246()
+ fun_l15_n905
+end
+
+def fun_l14_n247()
+ fun_l15_n962
+end
+
+def fun_l14_n248()
+ fun_l15_n269
+end
+
+def fun_l14_n249()
+ fun_l15_n920
+end
+
+def fun_l14_n250()
+ fun_l15_n428
+end
+
+def fun_l14_n251()
+ fun_l15_n305
+end
+
+def fun_l14_n252()
+ fun_l15_n630
+end
+
+def fun_l14_n253()
+ fun_l15_n458
+end
+
+def fun_l14_n254()
+ fun_l15_n933
+end
+
+def fun_l14_n255()
+ fun_l15_n852
+end
+
+def fun_l14_n256()
+ fun_l15_n855
+end
+
+def fun_l14_n257()
+ fun_l15_n207
+end
+
+def fun_l14_n258()
+ fun_l15_n865
+end
+
+def fun_l14_n259()
+ fun_l15_n958
+end
+
+def fun_l14_n260()
+ fun_l15_n230
+end
+
+def fun_l14_n261()
+ fun_l15_n872
+end
+
+def fun_l14_n262()
+ fun_l15_n963
+end
+
+def fun_l14_n263()
+ fun_l15_n945
+end
+
+def fun_l14_n264()
+ fun_l15_n410
+end
+
+def fun_l14_n265()
+ fun_l15_n735
+end
+
+def fun_l14_n266()
+ fun_l15_n496
+end
+
+def fun_l14_n267()
+ fun_l15_n110
+end
+
+def fun_l14_n268()
+ fun_l15_n267
+end
+
+def fun_l14_n269()
+ fun_l15_n699
+end
+
+def fun_l14_n270()
+ fun_l15_n812
+end
+
+def fun_l14_n271()
+ fun_l15_n273
+end
+
+def fun_l14_n272()
+ fun_l15_n499
+end
+
+def fun_l14_n273()
+ fun_l15_n341
+end
+
+def fun_l14_n274()
+ fun_l15_n512
+end
+
+def fun_l14_n275()
+ fun_l15_n110
+end
+
+def fun_l14_n276()
+ fun_l15_n62
+end
+
+def fun_l14_n277()
+ fun_l15_n541
+end
+
+def fun_l14_n278()
+ fun_l15_n622
+end
+
+def fun_l14_n279()
+ fun_l15_n456
+end
+
+def fun_l14_n280()
+ fun_l15_n527
+end
+
+def fun_l14_n281()
+ fun_l15_n141
+end
+
+def fun_l14_n282()
+ fun_l15_n266
+end
+
+def fun_l14_n283()
+ fun_l15_n817
+end
+
+def fun_l14_n284()
+ fun_l15_n448
+end
+
+def fun_l14_n285()
+ fun_l15_n208
+end
+
+def fun_l14_n286()
+ fun_l15_n368
+end
+
+def fun_l14_n287()
+ fun_l15_n947
+end
+
+def fun_l14_n288()
+ fun_l15_n192
+end
+
+def fun_l14_n289()
+ fun_l15_n68
+end
+
+def fun_l14_n290()
+ fun_l15_n704
+end
+
+def fun_l14_n291()
+ fun_l15_n278
+end
+
+def fun_l14_n292()
+ fun_l15_n352
+end
+
+def fun_l14_n293()
+ fun_l15_n629
+end
+
+def fun_l14_n294()
+ fun_l15_n404
+end
+
+def fun_l14_n295()
+ fun_l15_n89
+end
+
+def fun_l14_n296()
+ fun_l15_n920
+end
+
+def fun_l14_n297()
+ fun_l15_n984
+end
+
+def fun_l14_n298()
+ fun_l15_n198
+end
+
+def fun_l14_n299()
+ fun_l15_n524
+end
+
+def fun_l14_n300()
+ fun_l15_n891
+end
+
+def fun_l14_n301()
+ fun_l15_n921
+end
+
+def fun_l14_n302()
+ fun_l15_n785
+end
+
+def fun_l14_n303()
+ fun_l15_n618
+end
+
+def fun_l14_n304()
+ fun_l15_n387
+end
+
+def fun_l14_n305()
+ fun_l15_n361
+end
+
+def fun_l14_n306()
+ fun_l15_n535
+end
+
+def fun_l14_n307()
+ fun_l15_n137
+end
+
+def fun_l14_n308()
+ fun_l15_n77
+end
+
+def fun_l14_n309()
+ fun_l15_n877
+end
+
+def fun_l14_n310()
+ fun_l15_n178
+end
+
+def fun_l14_n311()
+ fun_l15_n67
+end
+
+def fun_l14_n312()
+ fun_l15_n539
+end
+
+def fun_l14_n313()
+ fun_l15_n971
+end
+
+def fun_l14_n314()
+ fun_l15_n743
+end
+
+def fun_l14_n315()
+ fun_l15_n787
+end
+
+def fun_l14_n316()
+ fun_l15_n451
+end
+
+def fun_l14_n317()
+ fun_l15_n12
+end
+
+def fun_l14_n318()
+ fun_l15_n303
+end
+
+def fun_l14_n319()
+ fun_l15_n210
+end
+
+def fun_l14_n320()
+ fun_l15_n853
+end
+
+def fun_l14_n321()
+ fun_l15_n154
+end
+
+def fun_l14_n322()
+ fun_l15_n71
+end
+
+def fun_l14_n323()
+ fun_l15_n448
+end
+
+def fun_l14_n324()
+ fun_l15_n178
+end
+
+def fun_l14_n325()
+ fun_l15_n312
+end
+
+def fun_l14_n326()
+ fun_l15_n671
+end
+
+def fun_l14_n327()
+ fun_l15_n282
+end
+
+def fun_l14_n328()
+ fun_l15_n315
+end
+
+def fun_l14_n329()
+ fun_l15_n449
+end
+
+def fun_l14_n330()
+ fun_l15_n338
+end
+
+def fun_l14_n331()
+ fun_l15_n260
+end
+
+def fun_l14_n332()
+ fun_l15_n664
+end
+
+def fun_l14_n333()
+ fun_l15_n312
+end
+
+def fun_l14_n334()
+ fun_l15_n202
+end
+
+def fun_l14_n335()
+ fun_l15_n969
+end
+
+def fun_l14_n336()
+ fun_l15_n698
+end
+
+def fun_l14_n337()
+ fun_l15_n802
+end
+
+def fun_l14_n338()
+ fun_l15_n175
+end
+
+def fun_l14_n339()
+ fun_l15_n646
+end
+
+def fun_l14_n340()
+ fun_l15_n145
+end
+
+def fun_l14_n341()
+ fun_l15_n19
+end
+
+def fun_l14_n342()
+ fun_l15_n764
+end
+
+def fun_l14_n343()
+ fun_l15_n970
+end
+
+def fun_l14_n344()
+ fun_l15_n519
+end
+
+def fun_l14_n345()
+ fun_l15_n121
+end
+
+def fun_l14_n346()
+ fun_l15_n299
+end
+
+def fun_l14_n347()
+ fun_l15_n553
+end
+
+def fun_l14_n348()
+ fun_l15_n618
+end
+
+def fun_l14_n349()
+ fun_l15_n725
+end
+
+def fun_l14_n350()
+ fun_l15_n635
+end
+
+def fun_l14_n351()
+ fun_l15_n382
+end
+
+def fun_l14_n352()
+ fun_l15_n529
+end
+
+def fun_l14_n353()
+ fun_l15_n168
+end
+
+def fun_l14_n354()
+ fun_l15_n948
+end
+
+def fun_l14_n355()
+ fun_l15_n192
+end
+
+def fun_l14_n356()
+ fun_l15_n27
+end
+
+def fun_l14_n357()
+ fun_l15_n254
+end
+
+def fun_l14_n358()
+ fun_l15_n384
+end
+
+def fun_l14_n359()
+ fun_l15_n559
+end
+
+def fun_l14_n360()
+ fun_l15_n560
+end
+
+def fun_l14_n361()
+ fun_l15_n781
+end
+
+def fun_l14_n362()
+ fun_l15_n494
+end
+
+def fun_l14_n363()
+ fun_l15_n997
+end
+
+def fun_l14_n364()
+ fun_l15_n203
+end
+
+def fun_l14_n365()
+ fun_l15_n61
+end
+
+def fun_l14_n366()
+ fun_l15_n190
+end
+
+def fun_l14_n367()
+ fun_l15_n755
+end
+
+def fun_l14_n368()
+ fun_l15_n876
+end
+
+def fun_l14_n369()
+ fun_l15_n761
+end
+
+def fun_l14_n370()
+ fun_l15_n641
+end
+
+def fun_l14_n371()
+ fun_l15_n307
+end
+
+def fun_l14_n372()
+ fun_l15_n351
+end
+
+def fun_l14_n373()
+ fun_l15_n929
+end
+
+def fun_l14_n374()
+ fun_l15_n455
+end
+
+def fun_l14_n375()
+ fun_l15_n740
+end
+
+def fun_l14_n376()
+ fun_l15_n803
+end
+
+def fun_l14_n377()
+ fun_l15_n544
+end
+
+def fun_l14_n378()
+ fun_l15_n666
+end
+
+def fun_l14_n379()
+ fun_l15_n274
+end
+
+def fun_l14_n380()
+ fun_l15_n374
+end
+
+def fun_l14_n381()
+ fun_l15_n108
+end
+
+def fun_l14_n382()
+ fun_l15_n632
+end
+
+def fun_l14_n383()
+ fun_l15_n782
+end
+
+def fun_l14_n384()
+ fun_l15_n16
+end
+
+def fun_l14_n385()
+ fun_l15_n323
+end
+
+def fun_l14_n386()
+ fun_l15_n923
+end
+
+def fun_l14_n387()
+ fun_l15_n929
+end
+
+def fun_l14_n388()
+ fun_l15_n318
+end
+
+def fun_l14_n389()
+ fun_l15_n929
+end
+
+def fun_l14_n390()
+ fun_l15_n633
+end
+
+def fun_l14_n391()
+ fun_l15_n159
+end
+
+def fun_l14_n392()
+ fun_l15_n18
+end
+
+def fun_l14_n393()
+ fun_l15_n997
+end
+
+def fun_l14_n394()
+ fun_l15_n585
+end
+
+def fun_l14_n395()
+ fun_l15_n216
+end
+
+def fun_l14_n396()
+ fun_l15_n665
+end
+
+def fun_l14_n397()
+ fun_l15_n51
+end
+
+def fun_l14_n398()
+ fun_l15_n681
+end
+
+def fun_l14_n399()
+ fun_l15_n921
+end
+
+def fun_l14_n400()
+ fun_l15_n937
+end
+
+def fun_l14_n401()
+ fun_l15_n251
+end
+
+def fun_l14_n402()
+ fun_l15_n359
+end
+
+def fun_l14_n403()
+ fun_l15_n262
+end
+
+def fun_l14_n404()
+ fun_l15_n631
+end
+
+def fun_l14_n405()
+ fun_l15_n218
+end
+
+def fun_l14_n406()
+ fun_l15_n138
+end
+
+def fun_l14_n407()
+ fun_l15_n695
+end
+
+def fun_l14_n408()
+ fun_l15_n95
+end
+
+def fun_l14_n409()
+ fun_l15_n166
+end
+
+def fun_l14_n410()
+ fun_l15_n566
+end
+
+def fun_l14_n411()
+ fun_l15_n322
+end
+
+def fun_l14_n412()
+ fun_l15_n278
+end
+
+def fun_l14_n413()
+ fun_l15_n144
+end
+
+def fun_l14_n414()
+ fun_l15_n949
+end
+
+def fun_l14_n415()
+ fun_l15_n351
+end
+
+def fun_l14_n416()
+ fun_l15_n887
+end
+
+def fun_l14_n417()
+ fun_l15_n501
+end
+
+def fun_l14_n418()
+ fun_l15_n997
+end
+
+def fun_l14_n419()
+ fun_l15_n212
+end
+
+def fun_l14_n420()
+ fun_l15_n725
+end
+
+def fun_l14_n421()
+ fun_l15_n728
+end
+
+def fun_l14_n422()
+ fun_l15_n923
+end
+
+def fun_l14_n423()
+ fun_l15_n694
+end
+
+def fun_l14_n424()
+ fun_l15_n472
+end
+
+def fun_l14_n425()
+ fun_l15_n967
+end
+
+def fun_l14_n426()
+ fun_l15_n908
+end
+
+def fun_l14_n427()
+ fun_l15_n199
+end
+
+def fun_l14_n428()
+ fun_l15_n384
+end
+
+def fun_l14_n429()
+ fun_l15_n485
+end
+
+def fun_l14_n430()
+ fun_l15_n767
+end
+
+def fun_l14_n431()
+ fun_l15_n337
+end
+
+def fun_l14_n432()
+ fun_l15_n664
+end
+
+def fun_l14_n433()
+ fun_l15_n735
+end
+
+def fun_l14_n434()
+ fun_l15_n76
+end
+
+def fun_l14_n435()
+ fun_l15_n879
+end
+
+def fun_l14_n436()
+ fun_l15_n815
+end
+
+def fun_l14_n437()
+ fun_l15_n290
+end
+
+def fun_l14_n438()
+ fun_l15_n836
+end
+
+def fun_l14_n439()
+ fun_l15_n56
+end
+
+def fun_l14_n440()
+ fun_l15_n671
+end
+
+def fun_l14_n441()
+ fun_l15_n90
+end
+
+def fun_l14_n442()
+ fun_l15_n930
+end
+
+def fun_l14_n443()
+ fun_l15_n754
+end
+
+def fun_l14_n444()
+ fun_l15_n241
+end
+
+def fun_l14_n445()
+ fun_l15_n362
+end
+
+def fun_l14_n446()
+ fun_l15_n260
+end
+
+def fun_l14_n447()
+ fun_l15_n846
+end
+
+def fun_l14_n448()
+ fun_l15_n754
+end
+
+def fun_l14_n449()
+ fun_l15_n571
+end
+
+def fun_l14_n450()
+ fun_l15_n602
+end
+
+def fun_l14_n451()
+ fun_l15_n243
+end
+
+def fun_l14_n452()
+ fun_l15_n59
+end
+
+def fun_l14_n453()
+ fun_l15_n660
+end
+
+def fun_l14_n454()
+ fun_l15_n338
+end
+
+def fun_l14_n455()
+ fun_l15_n461
+end
+
+def fun_l14_n456()
+ fun_l15_n702
+end
+
+def fun_l14_n457()
+ fun_l15_n878
+end
+
+def fun_l14_n458()
+ fun_l15_n625
+end
+
+def fun_l14_n459()
+ fun_l15_n762
+end
+
+def fun_l14_n460()
+ fun_l15_n36
+end
+
+def fun_l14_n461()
+ fun_l15_n432
+end
+
+def fun_l14_n462()
+ fun_l15_n685
+end
+
+def fun_l14_n463()
+ fun_l15_n398
+end
+
+def fun_l14_n464()
+ fun_l15_n828
+end
+
+def fun_l14_n465()
+ fun_l15_n306
+end
+
+def fun_l14_n466()
+ fun_l15_n717
+end
+
+def fun_l14_n467()
+ fun_l15_n271
+end
+
+def fun_l14_n468()
+ fun_l15_n444
+end
+
+def fun_l14_n469()
+ fun_l15_n82
+end
+
+def fun_l14_n470()
+ fun_l15_n363
+end
+
+def fun_l14_n471()
+ fun_l15_n648
+end
+
+def fun_l14_n472()
+ fun_l15_n33
+end
+
+def fun_l14_n473()
+ fun_l15_n968
+end
+
+def fun_l14_n474()
+ fun_l15_n331
+end
+
+def fun_l14_n475()
+ fun_l15_n228
+end
+
+def fun_l14_n476()
+ fun_l15_n944
+end
+
+def fun_l14_n477()
+ fun_l15_n771
+end
+
+def fun_l14_n478()
+ fun_l15_n228
+end
+
+def fun_l14_n479()
+ fun_l15_n442
+end
+
+def fun_l14_n480()
+ fun_l15_n75
+end
+
+def fun_l14_n481()
+ fun_l15_n911
+end
+
+def fun_l14_n482()
+ fun_l15_n591
+end
+
+def fun_l14_n483()
+ fun_l15_n929
+end
+
+def fun_l14_n484()
+ fun_l15_n504
+end
+
+def fun_l14_n485()
+ fun_l15_n48
+end
+
+def fun_l14_n486()
+ fun_l15_n592
+end
+
+def fun_l14_n487()
+ fun_l15_n399
+end
+
+def fun_l14_n488()
+ fun_l15_n467
+end
+
+def fun_l14_n489()
+ fun_l15_n192
+end
+
+def fun_l14_n490()
+ fun_l15_n347
+end
+
+def fun_l14_n491()
+ fun_l15_n517
+end
+
+def fun_l14_n492()
+ fun_l15_n436
+end
+
+def fun_l14_n493()
+ fun_l15_n50
+end
+
+def fun_l14_n494()
+ fun_l15_n237
+end
+
+def fun_l14_n495()
+ fun_l15_n878
+end
+
+def fun_l14_n496()
+ fun_l15_n46
+end
+
+def fun_l14_n497()
+ fun_l15_n499
+end
+
+def fun_l14_n498()
+ fun_l15_n779
+end
+
+def fun_l14_n499()
+ fun_l15_n763
+end
+
+def fun_l14_n500()
+ fun_l15_n195
+end
+
+def fun_l14_n501()
+ fun_l15_n868
+end
+
+def fun_l14_n502()
+ fun_l15_n83
+end
+
+def fun_l14_n503()
+ fun_l15_n386
+end
+
+def fun_l14_n504()
+ fun_l15_n907
+end
+
+def fun_l14_n505()
+ fun_l15_n889
+end
+
+def fun_l14_n506()
+ fun_l15_n314
+end
+
+def fun_l14_n507()
+ fun_l15_n24
+end
+
+def fun_l14_n508()
+ fun_l15_n122
+end
+
+def fun_l14_n509()
+ fun_l15_n772
+end
+
+def fun_l14_n510()
+ fun_l15_n204
+end
+
+def fun_l14_n511()
+ fun_l15_n646
+end
+
+def fun_l14_n512()
+ fun_l15_n105
+end
+
+def fun_l14_n513()
+ fun_l15_n393
+end
+
+def fun_l14_n514()
+ fun_l15_n533
+end
+
+def fun_l14_n515()
+ fun_l15_n572
+end
+
+def fun_l14_n516()
+ fun_l15_n360
+end
+
+def fun_l14_n517()
+ fun_l15_n241
+end
+
+def fun_l14_n518()
+ fun_l15_n962
+end
+
+def fun_l14_n519()
+ fun_l15_n771
+end
+
+def fun_l14_n520()
+ fun_l15_n379
+end
+
+def fun_l14_n521()
+ fun_l15_n749
+end
+
+def fun_l14_n522()
+ fun_l15_n601
+end
+
+def fun_l14_n523()
+ fun_l15_n0
+end
+
+def fun_l14_n524()
+ fun_l15_n345
+end
+
+def fun_l14_n525()
+ fun_l15_n896
+end
+
+def fun_l14_n526()
+ fun_l15_n612
+end
+
+def fun_l14_n527()
+ fun_l15_n897
+end
+
+def fun_l14_n528()
+ fun_l15_n760
+end
+
+def fun_l14_n529()
+ fun_l15_n283
+end
+
+def fun_l14_n530()
+ fun_l15_n269
+end
+
+def fun_l14_n531()
+ fun_l15_n967
+end
+
+def fun_l14_n532()
+ fun_l15_n399
+end
+
+def fun_l14_n533()
+ fun_l15_n343
+end
+
+def fun_l14_n534()
+ fun_l15_n590
+end
+
+def fun_l14_n535()
+ fun_l15_n37
+end
+
+def fun_l14_n536()
+ fun_l15_n882
+end
+
+def fun_l14_n537()
+ fun_l15_n275
+end
+
+def fun_l14_n538()
+ fun_l15_n169
+end
+
+def fun_l14_n539()
+ fun_l15_n474
+end
+
+def fun_l14_n540()
+ fun_l15_n993
+end
+
+def fun_l14_n541()
+ fun_l15_n872
+end
+
+def fun_l14_n542()
+ fun_l15_n650
+end
+
+def fun_l14_n543()
+ fun_l15_n238
+end
+
+def fun_l14_n544()
+ fun_l15_n80
+end
+
+def fun_l14_n545()
+ fun_l15_n585
+end
+
+def fun_l14_n546()
+ fun_l15_n961
+end
+
+def fun_l14_n547()
+ fun_l15_n574
+end
+
+def fun_l14_n548()
+ fun_l15_n447
+end
+
+def fun_l14_n549()
+ fun_l15_n405
+end
+
+def fun_l14_n550()
+ fun_l15_n347
+end
+
+def fun_l14_n551()
+ fun_l15_n326
+end
+
+def fun_l14_n552()
+ fun_l15_n679
+end
+
+def fun_l14_n553()
+ fun_l15_n848
+end
+
+def fun_l14_n554()
+ fun_l15_n391
+end
+
+def fun_l14_n555()
+ fun_l15_n293
+end
+
+def fun_l14_n556()
+ fun_l15_n997
+end
+
+def fun_l14_n557()
+ fun_l15_n247
+end
+
+def fun_l14_n558()
+ fun_l15_n138
+end
+
+def fun_l14_n559()
+ fun_l15_n737
+end
+
+def fun_l14_n560()
+ fun_l15_n764
+end
+
+def fun_l14_n561()
+ fun_l15_n541
+end
+
+def fun_l14_n562()
+ fun_l15_n373
+end
+
+def fun_l14_n563()
+ fun_l15_n562
+end
+
+def fun_l14_n564()
+ fun_l15_n626
+end
+
+def fun_l14_n565()
+ fun_l15_n601
+end
+
+def fun_l14_n566()
+ fun_l15_n547
+end
+
+def fun_l14_n567()
+ fun_l15_n226
+end
+
+def fun_l14_n568()
+ fun_l15_n182
+end
+
+def fun_l14_n569()
+ fun_l15_n647
+end
+
+def fun_l14_n570()
+ fun_l15_n912
+end
+
+def fun_l14_n571()
+ fun_l15_n33
+end
+
+def fun_l14_n572()
+ fun_l15_n397
+end
+
+def fun_l14_n573()
+ fun_l15_n413
+end
+
+def fun_l14_n574()
+ fun_l15_n714
+end
+
+def fun_l14_n575()
+ fun_l15_n930
+end
+
+def fun_l14_n576()
+ fun_l15_n35
+end
+
+def fun_l14_n577()
+ fun_l15_n868
+end
+
+def fun_l14_n578()
+ fun_l15_n606
+end
+
+def fun_l14_n579()
+ fun_l15_n516
+end
+
+def fun_l14_n580()
+ fun_l15_n127
+end
+
+def fun_l14_n581()
+ fun_l15_n689
+end
+
+def fun_l14_n582()
+ fun_l15_n346
+end
+
+def fun_l14_n583()
+ fun_l15_n352
+end
+
+def fun_l14_n584()
+ fun_l15_n810
+end
+
+def fun_l14_n585()
+ fun_l15_n38
+end
+
+def fun_l14_n586()
+ fun_l15_n751
+end
+
+def fun_l14_n587()
+ fun_l15_n888
+end
+
+def fun_l14_n588()
+ fun_l15_n938
+end
+
+def fun_l14_n589()
+ fun_l15_n941
+end
+
+def fun_l14_n590()
+ fun_l15_n768
+end
+
+def fun_l14_n591()
+ fun_l15_n544
+end
+
+def fun_l14_n592()
+ fun_l15_n393
+end
+
+def fun_l14_n593()
+ fun_l15_n74
+end
+
+def fun_l14_n594()
+ fun_l15_n812
+end
+
+def fun_l14_n595()
+ fun_l15_n94
+end
+
+def fun_l14_n596()
+ fun_l15_n122
+end
+
+def fun_l14_n597()
+ fun_l15_n552
+end
+
+def fun_l14_n598()
+ fun_l15_n586
+end
+
+def fun_l14_n599()
+ fun_l15_n100
+end
+
+def fun_l14_n600()
+ fun_l15_n338
+end
+
+def fun_l14_n601()
+ fun_l15_n627
+end
+
+def fun_l14_n602()
+ fun_l15_n445
+end
+
+def fun_l14_n603()
+ fun_l15_n734
+end
+
+def fun_l14_n604()
+ fun_l15_n852
+end
+
+def fun_l14_n605()
+ fun_l15_n908
+end
+
+def fun_l14_n606()
+ fun_l15_n736
+end
+
+def fun_l14_n607()
+ fun_l15_n590
+end
+
+def fun_l14_n608()
+ fun_l15_n988
+end
+
+def fun_l14_n609()
+ fun_l15_n241
+end
+
+def fun_l14_n610()
+ fun_l15_n375
+end
+
+def fun_l14_n611()
+ fun_l15_n25
+end
+
+def fun_l14_n612()
+ fun_l15_n176
+end
+
+def fun_l14_n613()
+ fun_l15_n375
+end
+
+def fun_l14_n614()
+ fun_l15_n248
+end
+
+def fun_l14_n615()
+ fun_l15_n393
+end
+
+def fun_l14_n616()
+ fun_l15_n2
+end
+
+def fun_l14_n617()
+ fun_l15_n964
+end
+
+def fun_l14_n618()
+ fun_l15_n581
+end
+
+def fun_l14_n619()
+ fun_l15_n190
+end
+
+def fun_l14_n620()
+ fun_l15_n847
+end
+
+def fun_l14_n621()
+ fun_l15_n748
+end
+
+def fun_l14_n622()
+ fun_l15_n27
+end
+
+def fun_l14_n623()
+ fun_l15_n984
+end
+
+def fun_l14_n624()
+ fun_l15_n728
+end
+
+def fun_l14_n625()
+ fun_l15_n740
+end
+
+def fun_l14_n626()
+ fun_l15_n480
+end
+
+def fun_l14_n627()
+ fun_l15_n175
+end
+
+def fun_l14_n628()
+ fun_l15_n152
+end
+
+def fun_l14_n629()
+ fun_l15_n880
+end
+
+def fun_l14_n630()
+ fun_l15_n337
+end
+
+def fun_l14_n631()
+ fun_l15_n862
+end
+
+def fun_l14_n632()
+ fun_l15_n367
+end
+
+def fun_l14_n633()
+ fun_l15_n768
+end
+
+def fun_l14_n634()
+ fun_l15_n178
+end
+
+def fun_l14_n635()
+ fun_l15_n693
+end
+
+def fun_l14_n636()
+ fun_l15_n176
+end
+
+def fun_l14_n637()
+ fun_l15_n348
+end
+
+def fun_l14_n638()
+ fun_l15_n31
+end
+
+def fun_l14_n639()
+ fun_l15_n601
+end
+
+def fun_l14_n640()
+ fun_l15_n824
+end
+
+def fun_l14_n641()
+ fun_l15_n920
+end
+
+def fun_l14_n642()
+ fun_l15_n464
+end
+
+def fun_l14_n643()
+ fun_l15_n747
+end
+
+def fun_l14_n644()
+ fun_l15_n378
+end
+
+def fun_l14_n645()
+ fun_l15_n88
+end
+
+def fun_l14_n646()
+ fun_l15_n267
+end
+
+def fun_l14_n647()
+ fun_l15_n805
+end
+
+def fun_l14_n648()
+ fun_l15_n793
+end
+
+def fun_l14_n649()
+ fun_l15_n135
+end
+
+def fun_l14_n650()
+ fun_l15_n51
+end
+
+def fun_l14_n651()
+ fun_l15_n500
+end
+
+def fun_l14_n652()
+ fun_l15_n726
+end
+
+def fun_l14_n653()
+ fun_l15_n736
+end
+
+def fun_l14_n654()
+ fun_l15_n691
+end
+
+def fun_l14_n655()
+ fun_l15_n718
+end
+
+def fun_l14_n656()
+ fun_l15_n456
+end
+
+def fun_l14_n657()
+ fun_l15_n868
+end
+
+def fun_l14_n658()
+ fun_l15_n818
+end
+
+def fun_l14_n659()
+ fun_l15_n693
+end
+
+def fun_l14_n660()
+ fun_l15_n117
+end
+
+def fun_l14_n661()
+ fun_l15_n872
+end
+
+def fun_l14_n662()
+ fun_l15_n312
+end
+
+def fun_l14_n663()
+ fun_l15_n538
+end
+
+def fun_l14_n664()
+ fun_l15_n449
+end
+
+def fun_l14_n665()
+ fun_l15_n954
+end
+
+def fun_l14_n666()
+ fun_l15_n163
+end
+
+def fun_l14_n667()
+ fun_l15_n291
+end
+
+def fun_l14_n668()
+ fun_l15_n17
+end
+
+def fun_l14_n669()
+ fun_l15_n189
+end
+
+def fun_l14_n670()
+ fun_l15_n25
+end
+
+def fun_l14_n671()
+ fun_l15_n381
+end
+
+def fun_l14_n672()
+ fun_l15_n66
+end
+
+def fun_l14_n673()
+ fun_l15_n28
+end
+
+def fun_l14_n674()
+ fun_l15_n79
+end
+
+def fun_l14_n675()
+ fun_l15_n237
+end
+
+def fun_l14_n676()
+ fun_l15_n301
+end
+
+def fun_l14_n677()
+ fun_l15_n876
+end
+
+def fun_l14_n678()
+ fun_l15_n573
+end
+
+def fun_l14_n679()
+ fun_l15_n758
+end
+
+def fun_l14_n680()
+ fun_l15_n152
+end
+
+def fun_l14_n681()
+ fun_l15_n597
+end
+
+def fun_l14_n682()
+ fun_l15_n872
+end
+
+def fun_l14_n683()
+ fun_l15_n329
+end
+
+def fun_l14_n684()
+ fun_l15_n537
+end
+
+def fun_l14_n685()
+ fun_l15_n379
+end
+
+def fun_l14_n686()
+ fun_l15_n748
+end
+
+def fun_l14_n687()
+ fun_l15_n407
+end
+
+def fun_l14_n688()
+ fun_l15_n762
+end
+
+def fun_l14_n689()
+ fun_l15_n792
+end
+
+def fun_l14_n690()
+ fun_l15_n179
+end
+
+def fun_l14_n691()
+ fun_l15_n855
+end
+
+def fun_l14_n692()
+ fun_l15_n635
+end
+
+def fun_l14_n693()
+ fun_l15_n807
+end
+
+def fun_l14_n694()
+ fun_l15_n957
+end
+
+def fun_l14_n695()
+ fun_l15_n130
+end
+
+def fun_l14_n696()
+ fun_l15_n183
+end
+
+def fun_l14_n697()
+ fun_l15_n881
+end
+
+def fun_l14_n698()
+ fun_l15_n744
+end
+
+def fun_l14_n699()
+ fun_l15_n360
+end
+
+def fun_l14_n700()
+ fun_l15_n661
+end
+
+def fun_l14_n701()
+ fun_l15_n136
+end
+
+def fun_l14_n702()
+ fun_l15_n868
+end
+
+def fun_l14_n703()
+ fun_l15_n718
+end
+
+def fun_l14_n704()
+ fun_l15_n253
+end
+
+def fun_l14_n705()
+ fun_l15_n272
+end
+
+def fun_l14_n706()
+ fun_l15_n474
+end
+
+def fun_l14_n707()
+ fun_l15_n457
+end
+
+def fun_l14_n708()
+ fun_l15_n836
+end
+
+def fun_l14_n709()
+ fun_l15_n141
+end
+
+def fun_l14_n710()
+ fun_l15_n80
+end
+
+def fun_l14_n711()
+ fun_l15_n538
+end
+
+def fun_l14_n712()
+ fun_l15_n68
+end
+
+def fun_l14_n713()
+ fun_l15_n603
+end
+
+def fun_l14_n714()
+ fun_l15_n604
+end
+
+def fun_l14_n715()
+ fun_l15_n415
+end
+
+def fun_l14_n716()
+ fun_l15_n269
+end
+
+def fun_l14_n717()
+ fun_l15_n836
+end
+
+def fun_l14_n718()
+ fun_l15_n599
+end
+
+def fun_l14_n719()
+ fun_l15_n373
+end
+
+def fun_l14_n720()
+ fun_l15_n256
+end
+
+def fun_l14_n721()
+ fun_l15_n18
+end
+
+def fun_l14_n722()
+ fun_l15_n719
+end
+
+def fun_l14_n723()
+ fun_l15_n994
+end
+
+def fun_l14_n724()
+ fun_l15_n361
+end
+
+def fun_l14_n725()
+ fun_l15_n789
+end
+
+def fun_l14_n726()
+ fun_l15_n453
+end
+
+def fun_l14_n727()
+ fun_l15_n950
+end
+
+def fun_l14_n728()
+ fun_l15_n410
+end
+
+def fun_l14_n729()
+ fun_l15_n678
+end
+
+def fun_l14_n730()
+ fun_l15_n948
+end
+
+def fun_l14_n731()
+ fun_l15_n964
+end
+
+def fun_l14_n732()
+ fun_l15_n199
+end
+
+def fun_l14_n733()
+ fun_l15_n812
+end
+
+def fun_l14_n734()
+ fun_l15_n983
+end
+
+def fun_l14_n735()
+ fun_l15_n550
+end
+
+def fun_l14_n736()
+ fun_l15_n776
+end
+
+def fun_l14_n737()
+ fun_l15_n510
+end
+
+def fun_l14_n738()
+ fun_l15_n959
+end
+
+def fun_l14_n739()
+ fun_l15_n537
+end
+
+def fun_l14_n740()
+ fun_l15_n717
+end
+
+def fun_l14_n741()
+ fun_l15_n437
+end
+
+def fun_l14_n742()
+ fun_l15_n364
+end
+
+def fun_l14_n743()
+ fun_l15_n785
+end
+
+def fun_l14_n744()
+ fun_l15_n658
+end
+
+def fun_l14_n745()
+ fun_l15_n462
+end
+
+def fun_l14_n746()
+ fun_l15_n263
+end
+
+def fun_l14_n747()
+ fun_l15_n657
+end
+
+def fun_l14_n748()
+ fun_l15_n395
+end
+
+def fun_l14_n749()
+ fun_l15_n852
+end
+
+def fun_l14_n750()
+ fun_l15_n809
+end
+
+def fun_l14_n751()
+ fun_l15_n959
+end
+
+def fun_l14_n752()
+ fun_l15_n547
+end
+
+def fun_l14_n753()
+ fun_l15_n719
+end
+
+def fun_l14_n754()
+ fun_l15_n118
+end
+
+def fun_l14_n755()
+ fun_l15_n503
+end
+
+def fun_l14_n756()
+ fun_l15_n112
+end
+
+def fun_l14_n757()
+ fun_l15_n39
+end
+
+def fun_l14_n758()
+ fun_l15_n12
+end
+
+def fun_l14_n759()
+ fun_l15_n692
+end
+
+def fun_l14_n760()
+ fun_l15_n276
+end
+
+def fun_l14_n761()
+ fun_l15_n771
+end
+
+def fun_l14_n762()
+ fun_l15_n643
+end
+
+def fun_l14_n763()
+ fun_l15_n820
+end
+
+def fun_l14_n764()
+ fun_l15_n956
+end
+
+def fun_l14_n765()
+ fun_l15_n169
+end
+
+def fun_l14_n766()
+ fun_l15_n558
+end
+
+def fun_l14_n767()
+ fun_l15_n106
+end
+
+def fun_l14_n768()
+ fun_l15_n813
+end
+
+def fun_l14_n769()
+ fun_l15_n65
+end
+
+def fun_l14_n770()
+ fun_l15_n214
+end
+
+def fun_l14_n771()
+ fun_l15_n264
+end
+
+def fun_l14_n772()
+ fun_l15_n687
+end
+
+def fun_l14_n773()
+ fun_l15_n8
+end
+
+def fun_l14_n774()
+ fun_l15_n703
+end
+
+def fun_l14_n775()
+ fun_l15_n971
+end
+
+def fun_l14_n776()
+ fun_l15_n144
+end
+
+def fun_l14_n777()
+ fun_l15_n542
+end
+
+def fun_l14_n778()
+ fun_l15_n57
+end
+
+def fun_l14_n779()
+ fun_l15_n772
+end
+
+def fun_l14_n780()
+ fun_l15_n347
+end
+
+def fun_l14_n781()
+ fun_l15_n895
+end
+
+def fun_l14_n782()
+ fun_l15_n547
+end
+
+def fun_l14_n783()
+ fun_l15_n254
+end
+
+def fun_l14_n784()
+ fun_l15_n358
+end
+
+def fun_l14_n785()
+ fun_l15_n861
+end
+
+def fun_l14_n786()
+ fun_l15_n169
+end
+
+def fun_l14_n787()
+ fun_l15_n607
+end
+
+def fun_l14_n788()
+ fun_l15_n909
+end
+
+def fun_l14_n789()
+ fun_l15_n796
+end
+
+def fun_l14_n790()
+ fun_l15_n414
+end
+
+def fun_l14_n791()
+ fun_l15_n575
+end
+
+def fun_l14_n792()
+ fun_l15_n115
+end
+
+def fun_l14_n793()
+ fun_l15_n289
+end
+
+def fun_l14_n794()
+ fun_l15_n285
+end
+
+def fun_l14_n795()
+ fun_l15_n563
+end
+
+def fun_l14_n796()
+ fun_l15_n78
+end
+
+def fun_l14_n797()
+ fun_l15_n913
+end
+
+def fun_l14_n798()
+ fun_l15_n852
+end
+
+def fun_l14_n799()
+ fun_l15_n779
+end
+
+def fun_l14_n800()
+ fun_l15_n301
+end
+
+def fun_l14_n801()
+ fun_l15_n180
+end
+
+def fun_l14_n802()
+ fun_l15_n618
+end
+
+def fun_l14_n803()
+ fun_l15_n48
+end
+
+def fun_l14_n804()
+ fun_l15_n839
+end
+
+def fun_l14_n805()
+ fun_l15_n608
+end
+
+def fun_l14_n806()
+ fun_l15_n408
+end
+
+def fun_l14_n807()
+ fun_l15_n23
+end
+
+def fun_l14_n808()
+ fun_l15_n723
+end
+
+def fun_l14_n809()
+ fun_l15_n849
+end
+
+def fun_l14_n810()
+ fun_l15_n112
+end
+
+def fun_l14_n811()
+ fun_l15_n801
+end
+
+def fun_l14_n812()
+ fun_l15_n905
+end
+
+def fun_l14_n813()
+ fun_l15_n40
+end
+
+def fun_l14_n814()
+ fun_l15_n628
+end
+
+def fun_l14_n815()
+ fun_l15_n761
+end
+
+def fun_l14_n816()
+ fun_l15_n631
+end
+
+def fun_l14_n817()
+ fun_l15_n565
+end
+
+def fun_l14_n818()
+ fun_l15_n985
+end
+
+def fun_l14_n819()
+ fun_l15_n408
+end
+
+def fun_l14_n820()
+ fun_l15_n173
+end
+
+def fun_l14_n821()
+ fun_l15_n508
+end
+
+def fun_l14_n822()
+ fun_l15_n641
+end
+
+def fun_l14_n823()
+ fun_l15_n348
+end
+
+def fun_l14_n824()
+ fun_l15_n988
+end
+
+def fun_l14_n825()
+ fun_l15_n790
+end
+
+def fun_l14_n826()
+ fun_l15_n915
+end
+
+def fun_l14_n827()
+ fun_l15_n727
+end
+
+def fun_l14_n828()
+ fun_l15_n613
+end
+
+def fun_l14_n829()
+ fun_l15_n21
+end
+
+def fun_l14_n830()
+ fun_l15_n533
+end
+
+def fun_l14_n831()
+ fun_l15_n904
+end
+
+def fun_l14_n832()
+ fun_l15_n586
+end
+
+def fun_l14_n833()
+ fun_l15_n794
+end
+
+def fun_l14_n834()
+ fun_l15_n475
+end
+
+def fun_l14_n835()
+ fun_l15_n14
+end
+
+def fun_l14_n836()
+ fun_l15_n69
+end
+
+def fun_l14_n837()
+ fun_l15_n850
+end
+
+def fun_l14_n838()
+ fun_l15_n426
+end
+
+def fun_l14_n839()
+ fun_l15_n552
+end
+
+def fun_l14_n840()
+ fun_l15_n968
+end
+
+def fun_l14_n841()
+ fun_l15_n305
+end
+
+def fun_l14_n842()
+ fun_l15_n865
+end
+
+def fun_l14_n843()
+ fun_l15_n190
+end
+
+def fun_l14_n844()
+ fun_l15_n610
+end
+
+def fun_l14_n845()
+ fun_l15_n478
+end
+
+def fun_l14_n846()
+ fun_l15_n640
+end
+
+def fun_l14_n847()
+ fun_l15_n294
+end
+
+def fun_l14_n848()
+ fun_l15_n493
+end
+
+def fun_l14_n849()
+ fun_l15_n580
+end
+
+def fun_l14_n850()
+ fun_l15_n173
+end
+
+def fun_l14_n851()
+ fun_l15_n134
+end
+
+def fun_l14_n852()
+ fun_l15_n352
+end
+
+def fun_l14_n853()
+ fun_l15_n738
+end
+
+def fun_l14_n854()
+ fun_l15_n289
+end
+
+def fun_l14_n855()
+ fun_l15_n44
+end
+
+def fun_l14_n856()
+ fun_l15_n200
+end
+
+def fun_l14_n857()
+ fun_l15_n584
+end
+
+def fun_l14_n858()
+ fun_l15_n787
+end
+
+def fun_l14_n859()
+ fun_l15_n901
+end
+
+def fun_l14_n860()
+ fun_l15_n103
+end
+
+def fun_l14_n861()
+ fun_l15_n628
+end
+
+def fun_l14_n862()
+ fun_l15_n521
+end
+
+def fun_l14_n863()
+ fun_l15_n465
+end
+
+def fun_l14_n864()
+ fun_l15_n649
+end
+
+def fun_l14_n865()
+ fun_l15_n60
+end
+
+def fun_l14_n866()
+ fun_l15_n567
+end
+
+def fun_l14_n867()
+ fun_l15_n775
+end
+
+def fun_l14_n868()
+ fun_l15_n333
+end
+
+def fun_l14_n869()
+ fun_l15_n791
+end
+
+def fun_l14_n870()
+ fun_l15_n401
+end
+
+def fun_l14_n871()
+ fun_l15_n289
+end
+
+def fun_l14_n872()
+ fun_l15_n376
+end
+
+def fun_l14_n873()
+ fun_l15_n825
+end
+
+def fun_l14_n874()
+ fun_l15_n233
+end
+
+def fun_l14_n875()
+ fun_l15_n742
+end
+
+def fun_l14_n876()
+ fun_l15_n308
+end
+
+def fun_l14_n877()
+ fun_l15_n793
+end
+
+def fun_l14_n878()
+ fun_l15_n937
+end
+
+def fun_l14_n879()
+ fun_l15_n469
+end
+
+def fun_l14_n880()
+ fun_l15_n129
+end
+
+def fun_l14_n881()
+ fun_l15_n221
+end
+
+def fun_l14_n882()
+ fun_l15_n900
+end
+
+def fun_l14_n883()
+ fun_l15_n548
+end
+
+def fun_l14_n884()
+ fun_l15_n782
+end
+
+def fun_l14_n885()
+ fun_l15_n99
+end
+
+def fun_l14_n886()
+ fun_l15_n33
+end
+
+def fun_l14_n887()
+ fun_l15_n139
+end
+
+def fun_l14_n888()
+ fun_l15_n832
+end
+
+def fun_l14_n889()
+ fun_l15_n24
+end
+
+def fun_l14_n890()
+ fun_l15_n342
+end
+
+def fun_l14_n891()
+ fun_l15_n329
+end
+
+def fun_l14_n892()
+ fun_l15_n706
+end
+
+def fun_l14_n893()
+ fun_l15_n873
+end
+
+def fun_l14_n894()
+ fun_l15_n776
+end
+
+def fun_l14_n895()
+ fun_l15_n799
+end
+
+def fun_l14_n896()
+ fun_l15_n560
+end
+
+def fun_l14_n897()
+ fun_l15_n372
+end
+
+def fun_l14_n898()
+ fun_l15_n370
+end
+
+def fun_l14_n899()
+ fun_l15_n385
+end
+
+def fun_l14_n900()
+ fun_l15_n648
+end
+
+def fun_l14_n901()
+ fun_l15_n376
+end
+
+def fun_l14_n902()
+ fun_l15_n527
+end
+
+def fun_l14_n903()
+ fun_l15_n190
+end
+
+def fun_l14_n904()
+ fun_l15_n633
+end
+
+def fun_l14_n905()
+ fun_l15_n684
+end
+
+def fun_l14_n906()
+ fun_l15_n8
+end
+
+def fun_l14_n907()
+ fun_l15_n814
+end
+
+def fun_l14_n908()
+ fun_l15_n50
+end
+
+def fun_l14_n909()
+ fun_l15_n646
+end
+
+def fun_l14_n910()
+ fun_l15_n442
+end
+
+def fun_l14_n911()
+ fun_l15_n514
+end
+
+def fun_l14_n912()
+ fun_l15_n137
+end
+
+def fun_l14_n913()
+ fun_l15_n126
+end
+
+def fun_l14_n914()
+ fun_l15_n266
+end
+
+def fun_l14_n915()
+ fun_l15_n479
+end
+
+def fun_l14_n916()
+ fun_l15_n985
+end
+
+def fun_l14_n917()
+ fun_l15_n88
+end
+
+def fun_l14_n918()
+ fun_l15_n438
+end
+
+def fun_l14_n919()
+ fun_l15_n347
+end
+
+def fun_l14_n920()
+ fun_l15_n215
+end
+
+def fun_l14_n921()
+ fun_l15_n220
+end
+
+def fun_l14_n922()
+ fun_l15_n507
+end
+
+def fun_l14_n923()
+ fun_l15_n501
+end
+
+def fun_l14_n924()
+ fun_l15_n955
+end
+
+def fun_l14_n925()
+ fun_l15_n59
+end
+
+def fun_l14_n926()
+ fun_l15_n850
+end
+
+def fun_l14_n927()
+ fun_l15_n447
+end
+
+def fun_l14_n928()
+ fun_l15_n298
+end
+
+def fun_l14_n929()
+ fun_l15_n173
+end
+
+def fun_l14_n930()
+ fun_l15_n216
+end
+
+def fun_l14_n931()
+ fun_l15_n594
+end
+
+def fun_l14_n932()
+ fun_l15_n662
+end
+
+def fun_l14_n933()
+ fun_l15_n818
+end
+
+def fun_l14_n934()
+ fun_l15_n783
+end
+
+def fun_l14_n935()
+ fun_l15_n776
+end
+
+def fun_l14_n936()
+ fun_l15_n570
+end
+
+def fun_l14_n937()
+ fun_l15_n495
+end
+
+def fun_l14_n938()
+ fun_l15_n139
+end
+
+def fun_l14_n939()
+ fun_l15_n657
+end
+
+def fun_l14_n940()
+ fun_l15_n773
+end
+
+def fun_l14_n941()
+ fun_l15_n228
+end
+
+def fun_l14_n942()
+ fun_l15_n912
+end
+
+def fun_l14_n943()
+ fun_l15_n837
+end
+
+def fun_l14_n944()
+ fun_l15_n925
+end
+
+def fun_l14_n945()
+ fun_l15_n247
+end
+
+def fun_l14_n946()
+ fun_l15_n890
+end
+
+def fun_l14_n947()
+ fun_l15_n12
+end
+
+def fun_l14_n948()
+ fun_l15_n196
+end
+
+def fun_l14_n949()
+ fun_l15_n887
+end
+
+def fun_l14_n950()
+ fun_l15_n0
+end
+
+def fun_l14_n951()
+ fun_l15_n475
+end
+
+def fun_l14_n952()
+ fun_l15_n548
+end
+
+def fun_l14_n953()
+ fun_l15_n184
+end
+
+def fun_l14_n954()
+ fun_l15_n89
+end
+
+def fun_l14_n955()
+ fun_l15_n604
+end
+
+def fun_l14_n956()
+ fun_l15_n375
+end
+
+def fun_l14_n957()
+ fun_l15_n222
+end
+
+def fun_l14_n958()
+ fun_l15_n629
+end
+
+def fun_l14_n959()
+ fun_l15_n371
+end
+
+def fun_l14_n960()
+ fun_l15_n233
+end
+
+def fun_l14_n961()
+ fun_l15_n268
+end
+
+def fun_l14_n962()
+ fun_l15_n43
+end
+
+def fun_l14_n963()
+ fun_l15_n824
+end
+
+def fun_l14_n964()
+ fun_l15_n574
+end
+
+def fun_l14_n965()
+ fun_l15_n617
+end
+
+def fun_l14_n966()
+ fun_l15_n959
+end
+
+def fun_l14_n967()
+ fun_l15_n757
+end
+
+def fun_l14_n968()
+ fun_l15_n76
+end
+
+def fun_l14_n969()
+ fun_l15_n312
+end
+
+def fun_l14_n970()
+ fun_l15_n895
+end
+
+def fun_l14_n971()
+ fun_l15_n356
+end
+
+def fun_l14_n972()
+ fun_l15_n938
+end
+
+def fun_l14_n973()
+ fun_l15_n233
+end
+
+def fun_l14_n974()
+ fun_l15_n723
+end
+
+def fun_l14_n975()
+ fun_l15_n102
+end
+
+def fun_l14_n976()
+ fun_l15_n8
+end
+
+def fun_l14_n977()
+ fun_l15_n840
+end
+
+def fun_l14_n978()
+ fun_l15_n539
+end
+
+def fun_l14_n979()
+ fun_l15_n936
+end
+
+def fun_l14_n980()
+ fun_l15_n7
+end
+
+def fun_l14_n981()
+ fun_l15_n259
+end
+
+def fun_l14_n982()
+ fun_l15_n680
+end
+
+def fun_l14_n983()
+ fun_l15_n16
+end
+
+def fun_l14_n984()
+ fun_l15_n278
+end
+
+def fun_l14_n985()
+ fun_l15_n951
+end
+
+def fun_l14_n986()
+ fun_l15_n940
+end
+
+def fun_l14_n987()
+ fun_l15_n463
+end
+
+def fun_l14_n988()
+ fun_l15_n54
+end
+
+def fun_l14_n989()
+ fun_l15_n117
+end
+
+def fun_l14_n990()
+ fun_l15_n342
+end
+
+def fun_l14_n991()
+ fun_l15_n345
+end
+
+def fun_l14_n992()
+ fun_l15_n135
+end
+
+def fun_l14_n993()
+ fun_l15_n397
+end
+
+def fun_l14_n994()
+ fun_l15_n406
+end
+
+def fun_l14_n995()
+ fun_l15_n687
+end
+
+def fun_l14_n996()
+ fun_l15_n506
+end
+
+def fun_l14_n997()
+ fun_l15_n406
+end
+
+def fun_l14_n998()
+ fun_l15_n305
+end
+
+def fun_l14_n999()
+ fun_l15_n619
+end
+
+def fun_l15_n0()
+ fun_l16_n214
+end
+
+def fun_l15_n1()
+ fun_l16_n640
+end
+
+def fun_l15_n2()
+ fun_l16_n129
+end
+
+def fun_l15_n3()
+ fun_l16_n883
+end
+
+def fun_l15_n4()
+ fun_l16_n253
+end
+
+def fun_l15_n5()
+ fun_l16_n426
+end
+
+def fun_l15_n6()
+ fun_l16_n969
+end
+
+def fun_l15_n7()
+ fun_l16_n728
+end
+
+def fun_l15_n8()
+ fun_l16_n30
+end
+
+def fun_l15_n9()
+ fun_l16_n337
+end
+
+def fun_l15_n10()
+ fun_l16_n601
+end
+
+def fun_l15_n11()
+ fun_l16_n736
+end
+
+def fun_l15_n12()
+ fun_l16_n905
+end
+
+def fun_l15_n13()
+ fun_l16_n303
+end
+
+def fun_l15_n14()
+ fun_l16_n778
+end
+
+def fun_l15_n15()
+ fun_l16_n92
+end
+
+def fun_l15_n16()
+ fun_l16_n184
+end
+
+def fun_l15_n17()
+ fun_l16_n196
+end
+
+def fun_l15_n18()
+ fun_l16_n68
+end
+
+def fun_l15_n19()
+ fun_l16_n941
+end
+
+def fun_l15_n20()
+ fun_l16_n374
+end
+
+def fun_l15_n21()
+ fun_l16_n680
+end
+
+def fun_l15_n22()
+ fun_l16_n424
+end
+
+def fun_l15_n23()
+ fun_l16_n701
+end
+
+def fun_l15_n24()
+ fun_l16_n211
+end
+
+def fun_l15_n25()
+ fun_l16_n944
+end
+
+def fun_l15_n26()
+ fun_l16_n112
+end
+
+def fun_l15_n27()
+ fun_l16_n219
+end
+
+def fun_l15_n28()
+ fun_l16_n917
+end
+
+def fun_l15_n29()
+ fun_l16_n1
+end
+
+def fun_l15_n30()
+ fun_l16_n178
+end
+
+def fun_l15_n31()
+ fun_l16_n978
+end
+
+def fun_l15_n32()
+ fun_l16_n852
+end
+
+def fun_l15_n33()
+ fun_l16_n633
+end
+
+def fun_l15_n34()
+ fun_l16_n373
+end
+
+def fun_l15_n35()
+ fun_l16_n766
+end
+
+def fun_l15_n36()
+ fun_l16_n324
+end
+
+def fun_l15_n37()
+ fun_l16_n600
+end
+
+def fun_l15_n38()
+ fun_l16_n835
+end
+
+def fun_l15_n39()
+ fun_l16_n518
+end
+
+def fun_l15_n40()
+ fun_l16_n916
+end
+
+def fun_l15_n41()
+ fun_l16_n557
+end
+
+def fun_l15_n42()
+ fun_l16_n401
+end
+
+def fun_l15_n43()
+ fun_l16_n162
+end
+
+def fun_l15_n44()
+ fun_l16_n593
+end
+
+def fun_l15_n45()
+ fun_l16_n615
+end
+
+def fun_l15_n46()
+ fun_l16_n174
+end
+
+def fun_l15_n47()
+ fun_l16_n651
+end
+
+def fun_l15_n48()
+ fun_l16_n168
+end
+
+def fun_l15_n49()
+ fun_l16_n139
+end
+
+def fun_l15_n50()
+ fun_l16_n791
+end
+
+def fun_l15_n51()
+ fun_l16_n1
+end
+
+def fun_l15_n52()
+ fun_l16_n220
+end
+
+def fun_l15_n53()
+ fun_l16_n375
+end
+
+def fun_l15_n54()
+ fun_l16_n530
+end
+
+def fun_l15_n55()
+ fun_l16_n27
+end
+
+def fun_l15_n56()
+ fun_l16_n400
+end
+
+def fun_l15_n57()
+ fun_l16_n489
+end
+
+def fun_l15_n58()
+ fun_l16_n716
+end
+
+def fun_l15_n59()
+ fun_l16_n956
+end
+
+def fun_l15_n60()
+ fun_l16_n147
+end
+
+def fun_l15_n61()
+ fun_l16_n901
+end
+
+def fun_l15_n62()
+ fun_l16_n430
+end
+
+def fun_l15_n63()
+ fun_l16_n161
+end
+
+def fun_l15_n64()
+ fun_l16_n823
+end
+
+def fun_l15_n65()
+ fun_l16_n20
+end
+
+def fun_l15_n66()
+ fun_l16_n767
+end
+
+def fun_l15_n67()
+ fun_l16_n643
+end
+
+def fun_l15_n68()
+ fun_l16_n152
+end
+
+def fun_l15_n69()
+ fun_l16_n54
+end
+
+def fun_l15_n70()
+ fun_l16_n691
+end
+
+def fun_l15_n71()
+ fun_l16_n349
+end
+
+def fun_l15_n72()
+ fun_l16_n9
+end
+
+def fun_l15_n73()
+ fun_l16_n410
+end
+
+def fun_l15_n74()
+ fun_l16_n173
+end
+
+def fun_l15_n75()
+ fun_l16_n187
+end
+
+def fun_l15_n76()
+ fun_l16_n224
+end
+
+def fun_l15_n77()
+ fun_l16_n482
+end
+
+def fun_l15_n78()
+ fun_l16_n230
+end
+
+def fun_l15_n79()
+ fun_l16_n599
+end
+
+def fun_l15_n80()
+ fun_l16_n76
+end
+
+def fun_l15_n81()
+ fun_l16_n343
+end
+
+def fun_l15_n82()
+ fun_l16_n734
+end
+
+def fun_l15_n83()
+ fun_l16_n41
+end
+
+def fun_l15_n84()
+ fun_l16_n338
+end
+
+def fun_l15_n85()
+ fun_l16_n593
+end
+
+def fun_l15_n86()
+ fun_l16_n596
+end
+
+def fun_l15_n87()
+ fun_l16_n610
+end
+
+def fun_l15_n88()
+ fun_l16_n760
+end
+
+def fun_l15_n89()
+ fun_l16_n766
+end
+
+def fun_l15_n90()
+ fun_l16_n946
+end
+
+def fun_l15_n91()
+ fun_l16_n205
+end
+
+def fun_l15_n92()
+ fun_l16_n434
+end
+
+def fun_l15_n93()
+ fun_l16_n507
+end
+
+def fun_l15_n94()
+ fun_l16_n995
+end
+
+def fun_l15_n95()
+ fun_l16_n744
+end
+
+def fun_l15_n96()
+ fun_l16_n706
+end
+
+def fun_l15_n97()
+ fun_l16_n270
+end
+
+def fun_l15_n98()
+ fun_l16_n874
+end
+
+def fun_l15_n99()
+ fun_l16_n18
+end
+
+def fun_l15_n100()
+ fun_l16_n685
+end
+
+def fun_l15_n101()
+ fun_l16_n344
+end
+
+def fun_l15_n102()
+ fun_l16_n265
+end
+
+def fun_l15_n103()
+ fun_l16_n44
+end
+
+def fun_l15_n104()
+ fun_l16_n730
+end
+
+def fun_l15_n105()
+ fun_l16_n314
+end
+
+def fun_l15_n106()
+ fun_l16_n878
+end
+
+def fun_l15_n107()
+ fun_l16_n877
+end
+
+def fun_l15_n108()
+ fun_l16_n237
+end
+
+def fun_l15_n109()
+ fun_l16_n666
+end
+
+def fun_l15_n110()
+ fun_l16_n469
+end
+
+def fun_l15_n111()
+ fun_l16_n925
+end
+
+def fun_l15_n112()
+ fun_l16_n630
+end
+
+def fun_l15_n113()
+ fun_l16_n517
+end
+
+def fun_l15_n114()
+ fun_l16_n550
+end
+
+def fun_l15_n115()
+ fun_l16_n384
+end
+
+def fun_l15_n116()
+ fun_l16_n976
+end
+
+def fun_l15_n117()
+ fun_l16_n702
+end
+
+def fun_l15_n118()
+ fun_l16_n677
+end
+
+def fun_l15_n119()
+ fun_l16_n737
+end
+
+def fun_l15_n120()
+ fun_l16_n380
+end
+
+def fun_l15_n121()
+ fun_l16_n635
+end
+
+def fun_l15_n122()
+ fun_l16_n112
+end
+
+def fun_l15_n123()
+ fun_l16_n779
+end
+
+def fun_l15_n124()
+ fun_l16_n853
+end
+
+def fun_l15_n125()
+ fun_l16_n697
+end
+
+def fun_l15_n126()
+ fun_l16_n289
+end
+
+def fun_l15_n127()
+ fun_l16_n701
+end
+
+def fun_l15_n128()
+ fun_l16_n867
+end
+
+def fun_l15_n129()
+ fun_l16_n537
+end
+
+def fun_l15_n130()
+ fun_l16_n735
+end
+
+def fun_l15_n131()
+ fun_l16_n285
+end
+
+def fun_l15_n132()
+ fun_l16_n196
+end
+
+def fun_l15_n133()
+ fun_l16_n137
+end
+
+def fun_l15_n134()
+ fun_l16_n937
+end
+
+def fun_l15_n135()
+ fun_l16_n285
+end
+
+def fun_l15_n136()
+ fun_l16_n566
+end
+
+def fun_l15_n137()
+ fun_l16_n163
+end
+
+def fun_l15_n138()
+ fun_l16_n223
+end
+
+def fun_l15_n139()
+ fun_l16_n373
+end
+
+def fun_l15_n140()
+ fun_l16_n16
+end
+
+def fun_l15_n141()
+ fun_l16_n539
+end
+
+def fun_l15_n142()
+ fun_l16_n696
+end
+
+def fun_l15_n143()
+ fun_l16_n735
+end
+
+def fun_l15_n144()
+ fun_l16_n81
+end
+
+def fun_l15_n145()
+ fun_l16_n102
+end
+
+def fun_l15_n146()
+ fun_l16_n658
+end
+
+def fun_l15_n147()
+ fun_l16_n858
+end
+
+def fun_l15_n148()
+ fun_l16_n398
+end
+
+def fun_l15_n149()
+ fun_l16_n122
+end
+
+def fun_l15_n150()
+ fun_l16_n712
+end
+
+def fun_l15_n151()
+ fun_l16_n888
+end
+
+def fun_l15_n152()
+ fun_l16_n537
+end
+
+def fun_l15_n153()
+ fun_l16_n190
+end
+
+def fun_l15_n154()
+ fun_l16_n164
+end
+
+def fun_l15_n155()
+ fun_l16_n351
+end
+
+def fun_l15_n156()
+ fun_l16_n641
+end
+
+def fun_l15_n157()
+ fun_l16_n300
+end
+
+def fun_l15_n158()
+ fun_l16_n177
+end
+
+def fun_l15_n159()
+ fun_l16_n634
+end
+
+def fun_l15_n160()
+ fun_l16_n475
+end
+
+def fun_l15_n161()
+ fun_l16_n843
+end
+
+def fun_l15_n162()
+ fun_l16_n262
+end
+
+def fun_l15_n163()
+ fun_l16_n471
+end
+
+def fun_l15_n164()
+ fun_l16_n229
+end
+
+def fun_l15_n165()
+ fun_l16_n374
+end
+
+def fun_l15_n166()
+ fun_l16_n920
+end
+
+def fun_l15_n167()
+ fun_l16_n194
+end
+
+def fun_l15_n168()
+ fun_l16_n369
+end
+
+def fun_l15_n169()
+ fun_l16_n41
+end
+
+def fun_l15_n170()
+ fun_l16_n339
+end
+
+def fun_l15_n171()
+ fun_l16_n152
+end
+
+def fun_l15_n172()
+ fun_l16_n337
+end
+
+def fun_l15_n173()
+ fun_l16_n906
+end
+
+def fun_l15_n174()
+ fun_l16_n13
+end
+
+def fun_l15_n175()
+ fun_l16_n343
+end
+
+def fun_l15_n176()
+ fun_l16_n116
+end
+
+def fun_l15_n177()
+ fun_l16_n722
+end
+
+def fun_l15_n178()
+ fun_l16_n62
+end
+
+def fun_l15_n179()
+ fun_l16_n12
+end
+
+def fun_l15_n180()
+ fun_l16_n177
+end
+
+def fun_l15_n181()
+ fun_l16_n632
+end
+
+def fun_l15_n182()
+ fun_l16_n990
+end
+
+def fun_l15_n183()
+ fun_l16_n749
+end
+
+def fun_l15_n184()
+ fun_l16_n368
+end
+
+def fun_l15_n185()
+ fun_l16_n881
+end
+
+def fun_l15_n186()
+ fun_l16_n760
+end
+
+def fun_l15_n187()
+ fun_l16_n740
+end
+
+def fun_l15_n188()
+ fun_l16_n379
+end
+
+def fun_l15_n189()
+ fun_l16_n194
+end
+
+def fun_l15_n190()
+ fun_l16_n282
+end
+
+def fun_l15_n191()
+ fun_l16_n520
+end
+
+def fun_l15_n192()
+ fun_l16_n113
+end
+
+def fun_l15_n193()
+ fun_l16_n470
+end
+
+def fun_l15_n194()
+ fun_l16_n303
+end
+
+def fun_l15_n195()
+ fun_l16_n712
+end
+
+def fun_l15_n196()
+ fun_l16_n215
+end
+
+def fun_l15_n197()
+ fun_l16_n121
+end
+
+def fun_l15_n198()
+ fun_l16_n281
+end
+
+def fun_l15_n199()
+ fun_l16_n702
+end
+
+def fun_l15_n200()
+ fun_l16_n727
+end
+
+def fun_l15_n201()
+ fun_l16_n856
+end
+
+def fun_l15_n202()
+ fun_l16_n368
+end
+
+def fun_l15_n203()
+ fun_l16_n252
+end
+
+def fun_l15_n204()
+ fun_l16_n86
+end
+
+def fun_l15_n205()
+ fun_l16_n323
+end
+
+def fun_l15_n206()
+ fun_l16_n749
+end
+
+def fun_l15_n207()
+ fun_l16_n728
+end
+
+def fun_l15_n208()
+ fun_l16_n195
+end
+
+def fun_l15_n209()
+ fun_l16_n141
+end
+
+def fun_l15_n210()
+ fun_l16_n685
+end
+
+def fun_l15_n211()
+ fun_l16_n855
+end
+
+def fun_l15_n212()
+ fun_l16_n401
+end
+
+def fun_l15_n213()
+ fun_l16_n415
+end
+
+def fun_l15_n214()
+ fun_l16_n349
+end
+
+def fun_l15_n215()
+ fun_l16_n45
+end
+
+def fun_l15_n216()
+ fun_l16_n534
+end
+
+def fun_l15_n217()
+ fun_l16_n705
+end
+
+def fun_l15_n218()
+ fun_l16_n97
+end
+
+def fun_l15_n219()
+ fun_l16_n828
+end
+
+def fun_l15_n220()
+ fun_l16_n698
+end
+
+def fun_l15_n221()
+ fun_l16_n505
+end
+
+def fun_l15_n222()
+ fun_l16_n100
+end
+
+def fun_l15_n223()
+ fun_l16_n710
+end
+
+def fun_l15_n224()
+ fun_l16_n883
+end
+
+def fun_l15_n225()
+ fun_l16_n503
+end
+
+def fun_l15_n226()
+ fun_l16_n583
+end
+
+def fun_l15_n227()
+ fun_l16_n269
+end
+
+def fun_l15_n228()
+ fun_l16_n570
+end
+
+def fun_l15_n229()
+ fun_l16_n877
+end
+
+def fun_l15_n230()
+ fun_l16_n906
+end
+
+def fun_l15_n231()
+ fun_l16_n123
+end
+
+def fun_l15_n232()
+ fun_l16_n626
+end
+
+def fun_l15_n233()
+ fun_l16_n911
+end
+
+def fun_l15_n234()
+ fun_l16_n741
+end
+
+def fun_l15_n235()
+ fun_l16_n255
+end
+
+def fun_l15_n236()
+ fun_l16_n499
+end
+
+def fun_l15_n237()
+ fun_l16_n998
+end
+
+def fun_l15_n238()
+ fun_l16_n156
+end
+
+def fun_l15_n239()
+ fun_l16_n677
+end
+
+def fun_l15_n240()
+ fun_l16_n551
+end
+
+def fun_l15_n241()
+ fun_l16_n906
+end
+
+def fun_l15_n242()
+ fun_l16_n146
+end
+
+def fun_l15_n243()
+ fun_l16_n372
+end
+
+def fun_l15_n244()
+ fun_l16_n867
+end
+
+def fun_l15_n245()
+ fun_l16_n232
+end
+
+def fun_l15_n246()
+ fun_l16_n952
+end
+
+def fun_l15_n247()
+ fun_l16_n256
+end
+
+def fun_l15_n248()
+ fun_l16_n263
+end
+
+def fun_l15_n249()
+ fun_l16_n642
+end
+
+def fun_l15_n250()
+ fun_l16_n165
+end
+
+def fun_l15_n251()
+ fun_l16_n147
+end
+
+def fun_l15_n252()
+ fun_l16_n182
+end
+
+def fun_l15_n253()
+ fun_l16_n346
+end
+
+def fun_l15_n254()
+ fun_l16_n263
+end
+
+def fun_l15_n255()
+ fun_l16_n512
+end
+
+def fun_l15_n256()
+ fun_l16_n504
+end
+
+def fun_l15_n257()
+ fun_l16_n671
+end
+
+def fun_l15_n258()
+ fun_l16_n219
+end
+
+def fun_l15_n259()
+ fun_l16_n878
+end
+
+def fun_l15_n260()
+ fun_l16_n754
+end
+
+def fun_l15_n261()
+ fun_l16_n976
+end
+
+def fun_l15_n262()
+ fun_l16_n756
+end
+
+def fun_l15_n263()
+ fun_l16_n840
+end
+
+def fun_l15_n264()
+ fun_l16_n320
+end
+
+def fun_l15_n265()
+ fun_l16_n447
+end
+
+def fun_l15_n266()
+ fun_l16_n179
+end
+
+def fun_l15_n267()
+ fun_l16_n669
+end
+
+def fun_l15_n268()
+ fun_l16_n279
+end
+
+def fun_l15_n269()
+ fun_l16_n919
+end
+
+def fun_l15_n270()
+ fun_l16_n55
+end
+
+def fun_l15_n271()
+ fun_l16_n713
+end
+
+def fun_l15_n272()
+ fun_l16_n140
+end
+
+def fun_l15_n273()
+ fun_l16_n738
+end
+
+def fun_l15_n274()
+ fun_l16_n534
+end
+
+def fun_l15_n275()
+ fun_l16_n739
+end
+
+def fun_l15_n276()
+ fun_l16_n733
+end
+
+def fun_l15_n277()
+ fun_l16_n792
+end
+
+def fun_l15_n278()
+ fun_l16_n719
+end
+
+def fun_l15_n279()
+ fun_l16_n946
+end
+
+def fun_l15_n280()
+ fun_l16_n942
+end
+
+def fun_l15_n281()
+ fun_l16_n547
+end
+
+def fun_l15_n282()
+ fun_l16_n961
+end
+
+def fun_l15_n283()
+ fun_l16_n382
+end
+
+def fun_l15_n284()
+ fun_l16_n642
+end
+
+def fun_l15_n285()
+ fun_l16_n761
+end
+
+def fun_l15_n286()
+ fun_l16_n999
+end
+
+def fun_l15_n287()
+ fun_l16_n827
+end
+
+def fun_l15_n288()
+ fun_l16_n364
+end
+
+def fun_l15_n289()
+ fun_l16_n588
+end
+
+def fun_l15_n290()
+ fun_l16_n3
+end
+
+def fun_l15_n291()
+ fun_l16_n741
+end
+
+def fun_l15_n292()
+ fun_l16_n839
+end
+
+def fun_l15_n293()
+ fun_l16_n889
+end
+
+def fun_l15_n294()
+ fun_l16_n106
+end
+
+def fun_l15_n295()
+ fun_l16_n616
+end
+
+def fun_l15_n296()
+ fun_l16_n124
+end
+
+def fun_l15_n297()
+ fun_l16_n691
+end
+
+def fun_l15_n298()
+ fun_l16_n135
+end
+
+def fun_l15_n299()
+ fun_l16_n654
+end
+
+def fun_l15_n300()
+ fun_l16_n706
+end
+
+def fun_l15_n301()
+ fun_l16_n957
+end
+
+def fun_l15_n302()
+ fun_l16_n213
+end
+
+def fun_l15_n303()
+ fun_l16_n340
+end
+
+def fun_l15_n304()
+ fun_l16_n126
+end
+
+def fun_l15_n305()
+ fun_l16_n807
+end
+
+def fun_l15_n306()
+ fun_l16_n901
+end
+
+def fun_l15_n307()
+ fun_l16_n371
+end
+
+def fun_l15_n308()
+ fun_l16_n904
+end
+
+def fun_l15_n309()
+ fun_l16_n475
+end
+
+def fun_l15_n310()
+ fun_l16_n863
+end
+
+def fun_l15_n311()
+ fun_l16_n37
+end
+
+def fun_l15_n312()
+ fun_l16_n315
+end
+
+def fun_l15_n313()
+ fun_l16_n527
+end
+
+def fun_l15_n314()
+ fun_l16_n549
+end
+
+def fun_l15_n315()
+ fun_l16_n351
+end
+
+def fun_l15_n316()
+ fun_l16_n193
+end
+
+def fun_l15_n317()
+ fun_l16_n395
+end
+
+def fun_l15_n318()
+ fun_l16_n373
+end
+
+def fun_l15_n319()
+ fun_l16_n142
+end
+
+def fun_l15_n320()
+ fun_l16_n250
+end
+
+def fun_l15_n321()
+ fun_l16_n544
+end
+
+def fun_l15_n322()
+ fun_l16_n446
+end
+
+def fun_l15_n323()
+ fun_l16_n375
+end
+
+def fun_l15_n324()
+ fun_l16_n832
+end
+
+def fun_l15_n325()
+ fun_l16_n987
+end
+
+def fun_l15_n326()
+ fun_l16_n539
+end
+
+def fun_l15_n327()
+ fun_l16_n293
+end
+
+def fun_l15_n328()
+ fun_l16_n128
+end
+
+def fun_l15_n329()
+ fun_l16_n228
+end
+
+def fun_l15_n330()
+ fun_l16_n952
+end
+
+def fun_l15_n331()
+ fun_l16_n116
+end
+
+def fun_l15_n332()
+ fun_l16_n823
+end
+
+def fun_l15_n333()
+ fun_l16_n933
+end
+
+def fun_l15_n334()
+ fun_l16_n252
+end
+
+def fun_l15_n335()
+ fun_l16_n140
+end
+
+def fun_l15_n336()
+ fun_l16_n245
+end
+
+def fun_l15_n337()
+ fun_l16_n822
+end
+
+def fun_l15_n338()
+ fun_l16_n389
+end
+
+def fun_l15_n339()
+ fun_l16_n824
+end
+
+def fun_l15_n340()
+ fun_l16_n507
+end
+
+def fun_l15_n341()
+ fun_l16_n153
+end
+
+def fun_l15_n342()
+ fun_l16_n661
+end
+
+def fun_l15_n343()
+ fun_l16_n633
+end
+
+def fun_l15_n344()
+ fun_l16_n478
+end
+
+def fun_l15_n345()
+ fun_l16_n423
+end
+
+def fun_l15_n346()
+ fun_l16_n425
+end
+
+def fun_l15_n347()
+ fun_l16_n168
+end
+
+def fun_l15_n348()
+ fun_l16_n426
+end
+
+def fun_l15_n349()
+ fun_l16_n85
+end
+
+def fun_l15_n350()
+ fun_l16_n35
+end
+
+def fun_l15_n351()
+ fun_l16_n796
+end
+
+def fun_l15_n352()
+ fun_l16_n295
+end
+
+def fun_l15_n353()
+ fun_l16_n564
+end
+
+def fun_l15_n354()
+ fun_l16_n273
+end
+
+def fun_l15_n355()
+ fun_l16_n821
+end
+
+def fun_l15_n356()
+ fun_l16_n504
+end
+
+def fun_l15_n357()
+ fun_l16_n911
+end
+
+def fun_l15_n358()
+ fun_l16_n277
+end
+
+def fun_l15_n359()
+ fun_l16_n749
+end
+
+def fun_l15_n360()
+ fun_l16_n886
+end
+
+def fun_l15_n361()
+ fun_l16_n165
+end
+
+def fun_l15_n362()
+ fun_l16_n353
+end
+
+def fun_l15_n363()
+ fun_l16_n309
+end
+
+def fun_l15_n364()
+ fun_l16_n853
+end
+
+def fun_l15_n365()
+ fun_l16_n981
+end
+
+def fun_l15_n366()
+ fun_l16_n429
+end
+
+def fun_l15_n367()
+ fun_l16_n114
+end
+
+def fun_l15_n368()
+ fun_l16_n649
+end
+
+def fun_l15_n369()
+ fun_l16_n966
+end
+
+def fun_l15_n370()
+ fun_l16_n356
+end
+
+def fun_l15_n371()
+ fun_l16_n364
+end
+
+def fun_l15_n372()
+ fun_l16_n12
+end
+
+def fun_l15_n373()
+ fun_l16_n969
+end
+
+def fun_l15_n374()
+ fun_l16_n705
+end
+
+def fun_l15_n375()
+ fun_l16_n194
+end
+
+def fun_l15_n376()
+ fun_l16_n487
+end
+
+def fun_l15_n377()
+ fun_l16_n148
+end
+
+def fun_l15_n378()
+ fun_l16_n419
+end
+
+def fun_l15_n379()
+ fun_l16_n686
+end
+
+def fun_l15_n380()
+ fun_l16_n552
+end
+
+def fun_l15_n381()
+ fun_l16_n630
+end
+
+def fun_l15_n382()
+ fun_l16_n509
+end
+
+def fun_l15_n383()
+ fun_l16_n251
+end
+
+def fun_l15_n384()
+ fun_l16_n506
+end
+
+def fun_l15_n385()
+ fun_l16_n317
+end
+
+def fun_l15_n386()
+ fun_l16_n881
+end
+
+def fun_l15_n387()
+ fun_l16_n12
+end
+
+def fun_l15_n388()
+ fun_l16_n686
+end
+
+def fun_l15_n389()
+ fun_l16_n277
+end
+
+def fun_l15_n390()
+ fun_l16_n174
+end
+
+def fun_l15_n391()
+ fun_l16_n799
+end
+
+def fun_l15_n392()
+ fun_l16_n682
+end
+
+def fun_l15_n393()
+ fun_l16_n102
+end
+
+def fun_l15_n394()
+ fun_l16_n127
+end
+
+def fun_l15_n395()
+ fun_l16_n110
+end
+
+def fun_l15_n396()
+ fun_l16_n331
+end
+
+def fun_l15_n397()
+ fun_l16_n165
+end
+
+def fun_l15_n398()
+ fun_l16_n360
+end
+
+def fun_l15_n399()
+ fun_l16_n622
+end
+
+def fun_l15_n400()
+ fun_l16_n928
+end
+
+def fun_l15_n401()
+ fun_l16_n324
+end
+
+def fun_l15_n402()
+ fun_l16_n712
+end
+
+def fun_l15_n403()
+ fun_l16_n250
+end
+
+def fun_l15_n404()
+ fun_l16_n289
+end
+
+def fun_l15_n405()
+ fun_l16_n520
+end
+
+def fun_l15_n406()
+ fun_l16_n445
+end
+
+def fun_l15_n407()
+ fun_l16_n328
+end
+
+def fun_l15_n408()
+ fun_l16_n496
+end
+
+def fun_l15_n409()
+ fun_l16_n614
+end
+
+def fun_l15_n410()
+ fun_l16_n428
+end
+
+def fun_l15_n411()
+ fun_l16_n226
+end
+
+def fun_l15_n412()
+ fun_l16_n450
+end
+
+def fun_l15_n413()
+ fun_l16_n410
+end
+
+def fun_l15_n414()
+ fun_l16_n926
+end
+
+def fun_l15_n415()
+ fun_l16_n353
+end
+
+def fun_l15_n416()
+ fun_l16_n822
+end
+
+def fun_l15_n417()
+ fun_l16_n800
+end
+
+def fun_l15_n418()
+ fun_l16_n577
+end
+
+def fun_l15_n419()
+ fun_l16_n483
+end
+
+def fun_l15_n420()
+ fun_l16_n744
+end
+
+def fun_l15_n421()
+ fun_l16_n314
+end
+
+def fun_l15_n422()
+ fun_l16_n206
+end
+
+def fun_l15_n423()
+ fun_l16_n359
+end
+
+def fun_l15_n424()
+ fun_l16_n371
+end
+
+def fun_l15_n425()
+ fun_l16_n817
+end
+
+def fun_l15_n426()
+ fun_l16_n471
+end
+
+def fun_l15_n427()
+ fun_l16_n681
+end
+
+def fun_l15_n428()
+ fun_l16_n598
+end
+
+def fun_l15_n429()
+ fun_l16_n532
+end
+
+def fun_l15_n430()
+ fun_l16_n173
+end
+
+def fun_l15_n431()
+ fun_l16_n670
+end
+
+def fun_l15_n432()
+ fun_l16_n310
+end
+
+def fun_l15_n433()
+ fun_l16_n376
+end
+
+def fun_l15_n434()
+ fun_l16_n142
+end
+
+def fun_l15_n435()
+ fun_l16_n591
+end
+
+def fun_l15_n436()
+ fun_l16_n313
+end
+
+def fun_l15_n437()
+ fun_l16_n724
+end
+
+def fun_l15_n438()
+ fun_l16_n313
+end
+
+def fun_l15_n439()
+ fun_l16_n238
+end
+
+def fun_l15_n440()
+ fun_l16_n840
+end
+
+def fun_l15_n441()
+ fun_l16_n235
+end
+
+def fun_l15_n442()
+ fun_l16_n720
+end
+
+def fun_l15_n443()
+ fun_l16_n427
+end
+
+def fun_l15_n444()
+ fun_l16_n269
+end
+
+def fun_l15_n445()
+ fun_l16_n557
+end
+
+def fun_l15_n446()
+ fun_l16_n97
+end
+
+def fun_l15_n447()
+ fun_l16_n655
+end
+
+def fun_l15_n448()
+ fun_l16_n723
+end
+
+def fun_l15_n449()
+ fun_l16_n634
+end
+
+def fun_l15_n450()
+ fun_l16_n208
+end
+
+def fun_l15_n451()
+ fun_l16_n130
+end
+
+def fun_l15_n452()
+ fun_l16_n472
+end
+
+def fun_l15_n453()
+ fun_l16_n172
+end
+
+def fun_l15_n454()
+ fun_l16_n323
+end
+
+def fun_l15_n455()
+ fun_l16_n643
+end
+
+def fun_l15_n456()
+ fun_l16_n20
+end
+
+def fun_l15_n457()
+ fun_l16_n721
+end
+
+def fun_l15_n458()
+ fun_l16_n928
+end
+
+def fun_l15_n459()
+ fun_l16_n312
+end
+
+def fun_l15_n460()
+ fun_l16_n767
+end
+
+def fun_l15_n461()
+ fun_l16_n191
+end
+
+def fun_l15_n462()
+ fun_l16_n88
+end
+
+def fun_l15_n463()
+ fun_l16_n782
+end
+
+def fun_l15_n464()
+ fun_l16_n448
+end
+
+def fun_l15_n465()
+ fun_l16_n595
+end
+
+def fun_l15_n466()
+ fun_l16_n545
+end
+
+def fun_l15_n467()
+ fun_l16_n98
+end
+
+def fun_l15_n468()
+ fun_l16_n523
+end
+
+def fun_l15_n469()
+ fun_l16_n548
+end
+
+def fun_l15_n470()
+ fun_l16_n799
+end
+
+def fun_l15_n471()
+ fun_l16_n727
+end
+
+def fun_l15_n472()
+ fun_l16_n342
+end
+
+def fun_l15_n473()
+ fun_l16_n30
+end
+
+def fun_l15_n474()
+ fun_l16_n461
+end
+
+def fun_l15_n475()
+ fun_l16_n249
+end
+
+def fun_l15_n476()
+ fun_l16_n466
+end
+
+def fun_l15_n477()
+ fun_l16_n28
+end
+
+def fun_l15_n478()
+ fun_l16_n845
+end
+
+def fun_l15_n479()
+ fun_l16_n53
+end
+
+def fun_l15_n480()
+ fun_l16_n122
+end
+
+def fun_l15_n481()
+ fun_l16_n264
+end
+
+def fun_l15_n482()
+ fun_l16_n802
+end
+
+def fun_l15_n483()
+ fun_l16_n688
+end
+
+def fun_l15_n484()
+ fun_l16_n656
+end
+
+def fun_l15_n485()
+ fun_l16_n17
+end
+
+def fun_l15_n486()
+ fun_l16_n956
+end
+
+def fun_l15_n487()
+ fun_l16_n649
+end
+
+def fun_l15_n488()
+ fun_l16_n948
+end
+
+def fun_l15_n489()
+ fun_l16_n85
+end
+
+def fun_l15_n490()
+ fun_l16_n411
+end
+
+def fun_l15_n491()
+ fun_l16_n572
+end
+
+def fun_l15_n492()
+ fun_l16_n698
+end
+
+def fun_l15_n493()
+ fun_l16_n767
+end
+
+def fun_l15_n494()
+ fun_l16_n513
+end
+
+def fun_l15_n495()
+ fun_l16_n983
+end
+
+def fun_l15_n496()
+ fun_l16_n763
+end
+
+def fun_l15_n497()
+ fun_l16_n207
+end
+
+def fun_l15_n498()
+ fun_l16_n154
+end
+
+def fun_l15_n499()
+ fun_l16_n152
+end
+
+def fun_l15_n500()
+ fun_l16_n929
+end
+
+def fun_l15_n501()
+ fun_l16_n573
+end
+
+def fun_l15_n502()
+ fun_l16_n97
+end
+
+def fun_l15_n503()
+ fun_l16_n696
+end
+
+def fun_l15_n504()
+ fun_l16_n877
+end
+
+def fun_l15_n505()
+ fun_l16_n401
+end
+
+def fun_l15_n506()
+ fun_l16_n509
+end
+
+def fun_l15_n507()
+ fun_l16_n933
+end
+
+def fun_l15_n508()
+ fun_l16_n946
+end
+
+def fun_l15_n509()
+ fun_l16_n290
+end
+
+def fun_l15_n510()
+ fun_l16_n630
+end
+
+def fun_l15_n511()
+ fun_l16_n279
+end
+
+def fun_l15_n512()
+ fun_l16_n833
+end
+
+def fun_l15_n513()
+ fun_l16_n984
+end
+
+def fun_l15_n514()
+ fun_l16_n82
+end
+
+def fun_l15_n515()
+ fun_l16_n372
+end
+
+def fun_l15_n516()
+ fun_l16_n407
+end
+
+def fun_l15_n517()
+ fun_l16_n801
+end
+
+def fun_l15_n518()
+ fun_l16_n530
+end
+
+def fun_l15_n519()
+ fun_l16_n349
+end
+
+def fun_l15_n520()
+ fun_l16_n633
+end
+
+def fun_l15_n521()
+ fun_l16_n189
+end
+
+def fun_l15_n522()
+ fun_l16_n613
+end
+
+def fun_l15_n523()
+ fun_l16_n335
+end
+
+def fun_l15_n524()
+ fun_l16_n163
+end
+
+def fun_l15_n525()
+ fun_l16_n542
+end
+
+def fun_l15_n526()
+ fun_l16_n454
+end
+
+def fun_l15_n527()
+ fun_l16_n428
+end
+
+def fun_l15_n528()
+ fun_l16_n985
+end
+
+def fun_l15_n529()
+ fun_l16_n414
+end
+
+def fun_l15_n530()
+ fun_l16_n294
+end
+
+def fun_l15_n531()
+ fun_l16_n493
+end
+
+def fun_l15_n532()
+ fun_l16_n467
+end
+
+def fun_l15_n533()
+ fun_l16_n398
+end
+
+def fun_l15_n534()
+ fun_l16_n861
+end
+
+def fun_l15_n535()
+ fun_l16_n219
+end
+
+def fun_l15_n536()
+ fun_l16_n178
+end
+
+def fun_l15_n537()
+ fun_l16_n436
+end
+
+def fun_l15_n538()
+ fun_l16_n821
+end
+
+def fun_l15_n539()
+ fun_l16_n732
+end
+
+def fun_l15_n540()
+ fun_l16_n432
+end
+
+def fun_l15_n541()
+ fun_l16_n32
+end
+
+def fun_l15_n542()
+ fun_l16_n128
+end
+
+def fun_l15_n543()
+ fun_l16_n2
+end
+
+def fun_l15_n544()
+ fun_l16_n117
+end
+
+def fun_l15_n545()
+ fun_l16_n861
+end
+
+def fun_l15_n546()
+ fun_l16_n817
+end
+
+def fun_l15_n547()
+ fun_l16_n833
+end
+
+def fun_l15_n548()
+ fun_l16_n180
+end
+
+def fun_l15_n549()
+ fun_l16_n176
+end
+
+def fun_l15_n550()
+ fun_l16_n772
+end
+
+def fun_l15_n551()
+ fun_l16_n469
+end
+
+def fun_l15_n552()
+ fun_l16_n209
+end
+
+def fun_l15_n553()
+ fun_l16_n200
+end
+
+def fun_l15_n554()
+ fun_l16_n434
+end
+
+def fun_l15_n555()
+ fun_l16_n529
+end
+
+def fun_l15_n556()
+ fun_l16_n847
+end
+
+def fun_l15_n557()
+ fun_l16_n134
+end
+
+def fun_l15_n558()
+ fun_l16_n748
+end
+
+def fun_l15_n559()
+ fun_l16_n153
+end
+
+def fun_l15_n560()
+ fun_l16_n903
+end
+
+def fun_l15_n561()
+ fun_l16_n449
+end
+
+def fun_l15_n562()
+ fun_l16_n267
+end
+
+def fun_l15_n563()
+ fun_l16_n47
+end
+
+def fun_l15_n564()
+ fun_l16_n762
+end
+
+def fun_l15_n565()
+ fun_l16_n932
+end
+
+def fun_l15_n566()
+ fun_l16_n782
+end
+
+def fun_l15_n567()
+ fun_l16_n580
+end
+
+def fun_l15_n568()
+ fun_l16_n172
+end
+
+def fun_l15_n569()
+ fun_l16_n379
+end
+
+def fun_l15_n570()
+ fun_l16_n890
+end
+
+def fun_l15_n571()
+ fun_l16_n257
+end
+
+def fun_l15_n572()
+ fun_l16_n964
+end
+
+def fun_l15_n573()
+ fun_l16_n164
+end
+
+def fun_l15_n574()
+ fun_l16_n606
+end
+
+def fun_l15_n575()
+ fun_l16_n475
+end
+
+def fun_l15_n576()
+ fun_l16_n500
+end
+
+def fun_l15_n577()
+ fun_l16_n65
+end
+
+def fun_l15_n578()
+ fun_l16_n81
+end
+
+def fun_l15_n579()
+ fun_l16_n952
+end
+
+def fun_l15_n580()
+ fun_l16_n524
+end
+
+def fun_l15_n581()
+ fun_l16_n573
+end
+
+def fun_l15_n582()
+ fun_l16_n812
+end
+
+def fun_l15_n583()
+ fun_l16_n498
+end
+
+def fun_l15_n584()
+ fun_l16_n106
+end
+
+def fun_l15_n585()
+ fun_l16_n807
+end
+
+def fun_l15_n586()
+ fun_l16_n70
+end
+
+def fun_l15_n587()
+ fun_l16_n41
+end
+
+def fun_l15_n588()
+ fun_l16_n78
+end
+
+def fun_l15_n589()
+ fun_l16_n235
+end
+
+def fun_l15_n590()
+ fun_l16_n974
+end
+
+def fun_l15_n591()
+ fun_l16_n450
+end
+
+def fun_l15_n592()
+ fun_l16_n191
+end
+
+def fun_l15_n593()
+ fun_l16_n988
+end
+
+def fun_l15_n594()
+ fun_l16_n516
+end
+
+def fun_l15_n595()
+ fun_l16_n7
+end
+
+def fun_l15_n596()
+ fun_l16_n186
+end
+
+def fun_l15_n597()
+ fun_l16_n249
+end
+
+def fun_l15_n598()
+ fun_l16_n832
+end
+
+def fun_l15_n599()
+ fun_l16_n502
+end
+
+def fun_l15_n600()
+ fun_l16_n967
+end
+
+def fun_l15_n601()
+ fun_l16_n930
+end
+
+def fun_l15_n602()
+ fun_l16_n497
+end
+
+def fun_l15_n603()
+ fun_l16_n467
+end
+
+def fun_l15_n604()
+ fun_l16_n742
+end
+
+def fun_l15_n605()
+ fun_l16_n52
+end
+
+def fun_l15_n606()
+ fun_l16_n494
+end
+
+def fun_l15_n607()
+ fun_l16_n604
+end
+
+def fun_l15_n608()
+ fun_l16_n372
+end
+
+def fun_l15_n609()
+ fun_l16_n503
+end
+
+def fun_l15_n610()
+ fun_l16_n853
+end
+
+def fun_l15_n611()
+ fun_l16_n146
+end
+
+def fun_l15_n612()
+ fun_l16_n812
+end
+
+def fun_l15_n613()
+ fun_l16_n235
+end
+
+def fun_l15_n614()
+ fun_l16_n924
+end
+
+def fun_l15_n615()
+ fun_l16_n212
+end
+
+def fun_l15_n616()
+ fun_l16_n332
+end
+
+def fun_l15_n617()
+ fun_l16_n179
+end
+
+def fun_l15_n618()
+ fun_l16_n767
+end
+
+def fun_l15_n619()
+ fun_l16_n46
+end
+
+def fun_l15_n620()
+ fun_l16_n275
+end
+
+def fun_l15_n621()
+ fun_l16_n348
+end
+
+def fun_l15_n622()
+ fun_l16_n136
+end
+
+def fun_l15_n623()
+ fun_l16_n814
+end
+
+def fun_l15_n624()
+ fun_l16_n782
+end
+
+def fun_l15_n625()
+ fun_l16_n692
+end
+
+def fun_l15_n626()
+ fun_l16_n331
+end
+
+def fun_l15_n627()
+ fun_l16_n228
+end
+
+def fun_l15_n628()
+ fun_l16_n249
+end
+
+def fun_l15_n629()
+ fun_l16_n387
+end
+
+def fun_l15_n630()
+ fun_l16_n994
+end
+
+def fun_l15_n631()
+ fun_l16_n219
+end
+
+def fun_l15_n632()
+ fun_l16_n743
+end
+
+def fun_l15_n633()
+ fun_l16_n674
+end
+
+def fun_l15_n634()
+ fun_l16_n411
+end
+
+def fun_l15_n635()
+ fun_l16_n757
+end
+
+def fun_l15_n636()
+ fun_l16_n568
+end
+
+def fun_l15_n637()
+ fun_l16_n323
+end
+
+def fun_l15_n638()
+ fun_l16_n910
+end
+
+def fun_l15_n639()
+ fun_l16_n823
+end
+
+def fun_l15_n640()
+ fun_l16_n942
+end
+
+def fun_l15_n641()
+ fun_l16_n796
+end
+
+def fun_l15_n642()
+ fun_l16_n507
+end
+
+def fun_l15_n643()
+ fun_l16_n72
+end
+
+def fun_l15_n644()
+ fun_l16_n285
+end
+
+def fun_l15_n645()
+ fun_l16_n654
+end
+
+def fun_l15_n646()
+ fun_l16_n361
+end
+
+def fun_l15_n647()
+ fun_l16_n766
+end
+
+def fun_l15_n648()
+ fun_l16_n587
+end
+
+def fun_l15_n649()
+ fun_l16_n99
+end
+
+def fun_l15_n650()
+ fun_l16_n558
+end
+
+def fun_l15_n651()
+ fun_l16_n623
+end
+
+def fun_l15_n652()
+ fun_l16_n428
+end
+
+def fun_l15_n653()
+ fun_l16_n695
+end
+
+def fun_l15_n654()
+ fun_l16_n514
+end
+
+def fun_l15_n655()
+ fun_l16_n159
+end
+
+def fun_l15_n656()
+ fun_l16_n41
+end
+
+def fun_l15_n657()
+ fun_l16_n510
+end
+
+def fun_l15_n658()
+ fun_l16_n26
+end
+
+def fun_l15_n659()
+ fun_l16_n947
+end
+
+def fun_l15_n660()
+ fun_l16_n766
+end
+
+def fun_l15_n661()
+ fun_l16_n470
+end
+
+def fun_l15_n662()
+ fun_l16_n46
+end
+
+def fun_l15_n663()
+ fun_l16_n499
+end
+
+def fun_l15_n664()
+ fun_l16_n593
+end
+
+def fun_l15_n665()
+ fun_l16_n803
+end
+
+def fun_l15_n666()
+ fun_l16_n321
+end
+
+def fun_l15_n667()
+ fun_l16_n165
+end
+
+def fun_l15_n668()
+ fun_l16_n762
+end
+
+def fun_l15_n669()
+ fun_l16_n800
+end
+
+def fun_l15_n670()
+ fun_l16_n530
+end
+
+def fun_l15_n671()
+ fun_l16_n198
+end
+
+def fun_l15_n672()
+ fun_l16_n365
+end
+
+def fun_l15_n673()
+ fun_l16_n204
+end
+
+def fun_l15_n674()
+ fun_l16_n782
+end
+
+def fun_l15_n675()
+ fun_l16_n465
+end
+
+def fun_l15_n676()
+ fun_l16_n733
+end
+
+def fun_l15_n677()
+ fun_l16_n101
+end
+
+def fun_l15_n678()
+ fun_l16_n38
+end
+
+def fun_l15_n679()
+ fun_l16_n800
+end
+
+def fun_l15_n680()
+ fun_l16_n45
+end
+
+def fun_l15_n681()
+ fun_l16_n996
+end
+
+def fun_l15_n682()
+ fun_l16_n156
+end
+
+def fun_l15_n683()
+ fun_l16_n868
+end
+
+def fun_l15_n684()
+ fun_l16_n537
+end
+
+def fun_l15_n685()
+ fun_l16_n450
+end
+
+def fun_l15_n686()
+ fun_l16_n932
+end
+
+def fun_l15_n687()
+ fun_l16_n733
+end
+
+def fun_l15_n688()
+ fun_l16_n150
+end
+
+def fun_l15_n689()
+ fun_l16_n770
+end
+
+def fun_l15_n690()
+ fun_l16_n522
+end
+
+def fun_l15_n691()
+ fun_l16_n867
+end
+
+def fun_l15_n692()
+ fun_l16_n318
+end
+
+def fun_l15_n693()
+ fun_l16_n23
+end
+
+def fun_l15_n694()
+ fun_l16_n402
+end
+
+def fun_l15_n695()
+ fun_l16_n261
+end
+
+def fun_l15_n696()
+ fun_l16_n726
+end
+
+def fun_l15_n697()
+ fun_l16_n406
+end
+
+def fun_l15_n698()
+ fun_l16_n308
+end
+
+def fun_l15_n699()
+ fun_l16_n428
+end
+
+def fun_l15_n700()
+ fun_l16_n141
+end
+
+def fun_l15_n701()
+ fun_l16_n987
+end
+
+def fun_l15_n702()
+ fun_l16_n371
+end
+
+def fun_l15_n703()
+ fun_l16_n578
+end
+
+def fun_l15_n704()
+ fun_l16_n780
+end
+
+def fun_l15_n705()
+ fun_l16_n914
+end
+
+def fun_l15_n706()
+ fun_l16_n976
+end
+
+def fun_l15_n707()
+ fun_l16_n268
+end
+
+def fun_l15_n708()
+ fun_l16_n431
+end
+
+def fun_l15_n709()
+ fun_l16_n188
+end
+
+def fun_l15_n710()
+ fun_l16_n190
+end
+
+def fun_l15_n711()
+ fun_l16_n742
+end
+
+def fun_l15_n712()
+ fun_l16_n223
+end
+
+def fun_l15_n713()
+ fun_l16_n993
+end
+
+def fun_l15_n714()
+ fun_l16_n482
+end
+
+def fun_l15_n715()
+ fun_l16_n890
+end
+
+def fun_l15_n716()
+ fun_l16_n929
+end
+
+def fun_l15_n717()
+ fun_l16_n644
+end
+
+def fun_l15_n718()
+ fun_l16_n646
+end
+
+def fun_l15_n719()
+ fun_l16_n121
+end
+
+def fun_l15_n720()
+ fun_l16_n417
+end
+
+def fun_l15_n721()
+ fun_l16_n203
+end
+
+def fun_l15_n722()
+ fun_l16_n145
+end
+
+def fun_l15_n723()
+ fun_l16_n401
+end
+
+def fun_l15_n724()
+ fun_l16_n823
+end
+
+def fun_l15_n725()
+ fun_l16_n554
+end
+
+def fun_l15_n726()
+ fun_l16_n641
+end
+
+def fun_l15_n727()
+ fun_l16_n232
+end
+
+def fun_l15_n728()
+ fun_l16_n313
+end
+
+def fun_l15_n729()
+ fun_l16_n943
+end
+
+def fun_l15_n730()
+ fun_l16_n964
+end
+
+def fun_l15_n731()
+ fun_l16_n409
+end
+
+def fun_l15_n732()
+ fun_l16_n375
+end
+
+def fun_l15_n733()
+ fun_l16_n147
+end
+
+def fun_l15_n734()
+ fun_l16_n779
+end
+
+def fun_l15_n735()
+ fun_l16_n690
+end
+
+def fun_l15_n736()
+ fun_l16_n91
+end
+
+def fun_l15_n737()
+ fun_l16_n819
+end
+
+def fun_l15_n738()
+ fun_l16_n68
+end
+
+def fun_l15_n739()
+ fun_l16_n810
+end
+
+def fun_l15_n740()
+ fun_l16_n787
+end
+
+def fun_l15_n741()
+ fun_l16_n90
+end
+
+def fun_l15_n742()
+ fun_l16_n800
+end
+
+def fun_l15_n743()
+ fun_l16_n491
+end
+
+def fun_l15_n744()
+ fun_l16_n729
+end
+
+def fun_l15_n745()
+ fun_l16_n917
+end
+
+def fun_l15_n746()
+ fun_l16_n360
+end
+
+def fun_l15_n747()
+ fun_l16_n489
+end
+
+def fun_l15_n748()
+ fun_l16_n755
+end
+
+def fun_l15_n749()
+ fun_l16_n999
+end
+
+def fun_l15_n750()
+ fun_l16_n268
+end
+
+def fun_l15_n751()
+ fun_l16_n213
+end
+
+def fun_l15_n752()
+ fun_l16_n923
+end
+
+def fun_l15_n753()
+ fun_l16_n456
+end
+
+def fun_l15_n754()
+ fun_l16_n653
+end
+
+def fun_l15_n755()
+ fun_l16_n855
+end
+
+def fun_l15_n756()
+ fun_l16_n833
+end
+
+def fun_l15_n757()
+ fun_l16_n269
+end
+
+def fun_l15_n758()
+ fun_l16_n152
+end
+
+def fun_l15_n759()
+ fun_l16_n391
+end
+
+def fun_l15_n760()
+ fun_l16_n850
+end
+
+def fun_l15_n761()
+ fun_l16_n70
+end
+
+def fun_l15_n762()
+ fun_l16_n774
+end
+
+def fun_l15_n763()
+ fun_l16_n379
+end
+
+def fun_l15_n764()
+ fun_l16_n271
+end
+
+def fun_l15_n765()
+ fun_l16_n667
+end
+
+def fun_l15_n766()
+ fun_l16_n149
+end
+
+def fun_l15_n767()
+ fun_l16_n715
+end
+
+def fun_l15_n768()
+ fun_l16_n645
+end
+
+def fun_l15_n769()
+ fun_l16_n741
+end
+
+def fun_l15_n770()
+ fun_l16_n147
+end
+
+def fun_l15_n771()
+ fun_l16_n23
+end
+
+def fun_l15_n772()
+ fun_l16_n653
+end
+
+def fun_l15_n773()
+ fun_l16_n109
+end
+
+def fun_l15_n774()
+ fun_l16_n402
+end
+
+def fun_l15_n775()
+ fun_l16_n995
+end
+
+def fun_l15_n776()
+ fun_l16_n112
+end
+
+def fun_l15_n777()
+ fun_l16_n416
+end
+
+def fun_l15_n778()
+ fun_l16_n641
+end
+
+def fun_l15_n779()
+ fun_l16_n412
+end
+
+def fun_l15_n780()
+ fun_l16_n548
+end
+
+def fun_l15_n781()
+ fun_l16_n329
+end
+
+def fun_l15_n782()
+ fun_l16_n804
+end
+
+def fun_l15_n783()
+ fun_l16_n377
+end
+
+def fun_l15_n784()
+ fun_l16_n107
+end
+
+def fun_l15_n785()
+ fun_l16_n364
+end
+
+def fun_l15_n786()
+ fun_l16_n950
+end
+
+def fun_l15_n787()
+ fun_l16_n769
+end
+
+def fun_l15_n788()
+ fun_l16_n322
+end
+
+def fun_l15_n789()
+ fun_l16_n604
+end
+
+def fun_l15_n790()
+ fun_l16_n425
+end
+
+def fun_l15_n791()
+ fun_l16_n318
+end
+
+def fun_l15_n792()
+ fun_l16_n236
+end
+
+def fun_l15_n793()
+ fun_l16_n794
+end
+
+def fun_l15_n794()
+ fun_l16_n948
+end
+
+def fun_l15_n795()
+ fun_l16_n421
+end
+
+def fun_l15_n796()
+ fun_l16_n565
+end
+
+def fun_l15_n797()
+ fun_l16_n363
+end
+
+def fun_l15_n798()
+ fun_l16_n274
+end
+
+def fun_l15_n799()
+ fun_l16_n391
+end
+
+def fun_l15_n800()
+ fun_l16_n303
+end
+
+def fun_l15_n801()
+ fun_l16_n31
+end
+
+def fun_l15_n802()
+ fun_l16_n585
+end
+
+def fun_l15_n803()
+ fun_l16_n769
+end
+
+def fun_l15_n804()
+ fun_l16_n749
+end
+
+def fun_l15_n805()
+ fun_l16_n405
+end
+
+def fun_l15_n806()
+ fun_l16_n53
+end
+
+def fun_l15_n807()
+ fun_l16_n951
+end
+
+def fun_l15_n808()
+ fun_l16_n817
+end
+
+def fun_l15_n809()
+ fun_l16_n217
+end
+
+def fun_l15_n810()
+ fun_l16_n210
+end
+
+def fun_l15_n811()
+ fun_l16_n830
+end
+
+def fun_l15_n812()
+ fun_l16_n743
+end
+
+def fun_l15_n813()
+ fun_l16_n908
+end
+
+def fun_l15_n814()
+ fun_l16_n343
+end
+
+def fun_l15_n815()
+ fun_l16_n135
+end
+
+def fun_l15_n816()
+ fun_l16_n346
+end
+
+def fun_l15_n817()
+ fun_l16_n947
+end
+
+def fun_l15_n818()
+ fun_l16_n969
+end
+
+def fun_l15_n819()
+ fun_l16_n313
+end
+
+def fun_l15_n820()
+ fun_l16_n668
+end
+
+def fun_l15_n821()
+ fun_l16_n923
+end
+
+def fun_l15_n822()
+ fun_l16_n650
+end
+
+def fun_l15_n823()
+ fun_l16_n601
+end
+
+def fun_l15_n824()
+ fun_l16_n775
+end
+
+def fun_l15_n825()
+ fun_l16_n748
+end
+
+def fun_l15_n826()
+ fun_l16_n353
+end
+
+def fun_l15_n827()
+ fun_l16_n164
+end
+
+def fun_l15_n828()
+ fun_l16_n458
+end
+
+def fun_l15_n829()
+ fun_l16_n257
+end
+
+def fun_l15_n830()
+ fun_l16_n968
+end
+
+def fun_l15_n831()
+ fun_l16_n932
+end
+
+def fun_l15_n832()
+ fun_l16_n749
+end
+
+def fun_l15_n833()
+ fun_l16_n873
+end
+
+def fun_l15_n834()
+ fun_l16_n940
+end
+
+def fun_l15_n835()
+ fun_l16_n404
+end
+
+def fun_l15_n836()
+ fun_l16_n235
+end
+
+def fun_l15_n837()
+ fun_l16_n584
+end
+
+def fun_l15_n838()
+ fun_l16_n12
+end
+
+def fun_l15_n839()
+ fun_l16_n378
+end
+
+def fun_l15_n840()
+ fun_l16_n463
+end
+
+def fun_l15_n841()
+ fun_l16_n310
+end
+
+def fun_l15_n842()
+ fun_l16_n832
+end
+
+def fun_l15_n843()
+ fun_l16_n641
+end
+
+def fun_l15_n844()
+ fun_l16_n484
+end
+
+def fun_l15_n845()
+ fun_l16_n589
+end
+
+def fun_l15_n846()
+ fun_l16_n315
+end
+
+def fun_l15_n847()
+ fun_l16_n977
+end
+
+def fun_l15_n848()
+ fun_l16_n946
+end
+
+def fun_l15_n849()
+ fun_l16_n848
+end
+
+def fun_l15_n850()
+ fun_l16_n956
+end
+
+def fun_l15_n851()
+ fun_l16_n608
+end
+
+def fun_l15_n852()
+ fun_l16_n787
+end
+
+def fun_l15_n853()
+ fun_l16_n527
+end
+
+def fun_l15_n854()
+ fun_l16_n426
+end
+
+def fun_l15_n855()
+ fun_l16_n330
+end
+
+def fun_l15_n856()
+ fun_l16_n687
+end
+
+def fun_l15_n857()
+ fun_l16_n672
+end
+
+def fun_l15_n858()
+ fun_l16_n133
+end
+
+def fun_l15_n859()
+ fun_l16_n515
+end
+
+def fun_l15_n860()
+ fun_l16_n20
+end
+
+def fun_l15_n861()
+ fun_l16_n419
+end
+
+def fun_l15_n862()
+ fun_l16_n239
+end
+
+def fun_l15_n863()
+ fun_l16_n379
+end
+
+def fun_l15_n864()
+ fun_l16_n241
+end
+
+def fun_l15_n865()
+ fun_l16_n713
+end
+
+def fun_l15_n866()
+ fun_l16_n705
+end
+
+def fun_l15_n867()
+ fun_l16_n487
+end
+
+def fun_l15_n868()
+ fun_l16_n959
+end
+
+def fun_l15_n869()
+ fun_l16_n914
+end
+
+def fun_l15_n870()
+ fun_l16_n325
+end
+
+def fun_l15_n871()
+ fun_l16_n983
+end
+
+def fun_l15_n872()
+ fun_l16_n363
+end
+
+def fun_l15_n873()
+ fun_l16_n617
+end
+
+def fun_l15_n874()
+ fun_l16_n420
+end
+
+def fun_l15_n875()
+ fun_l16_n732
+end
+
+def fun_l15_n876()
+ fun_l16_n560
+end
+
+def fun_l15_n877()
+ fun_l16_n318
+end
+
+def fun_l15_n878()
+ fun_l16_n97
+end
+
+def fun_l15_n879()
+ fun_l16_n242
+end
+
+def fun_l15_n880()
+ fun_l16_n801
+end
+
+def fun_l15_n881()
+ fun_l16_n56
+end
+
+def fun_l15_n882()
+ fun_l16_n68
+end
+
+def fun_l15_n883()
+ fun_l16_n625
+end
+
+def fun_l15_n884()
+ fun_l16_n400
+end
+
+def fun_l15_n885()
+ fun_l16_n405
+end
+
+def fun_l15_n886()
+ fun_l16_n778
+end
+
+def fun_l15_n887()
+ fun_l16_n865
+end
+
+def fun_l15_n888()
+ fun_l16_n737
+end
+
+def fun_l15_n889()
+ fun_l16_n233
+end
+
+def fun_l15_n890()
+ fun_l16_n594
+end
+
+def fun_l15_n891()
+ fun_l16_n240
+end
+
+def fun_l15_n892()
+ fun_l16_n511
+end
+
+def fun_l15_n893()
+ fun_l16_n711
+end
+
+def fun_l15_n894()
+ fun_l16_n238
+end
+
+def fun_l15_n895()
+ fun_l16_n903
+end
+
+def fun_l15_n896()
+ fun_l16_n506
+end
+
+def fun_l15_n897()
+ fun_l16_n794
+end
+
+def fun_l15_n898()
+ fun_l16_n812
+end
+
+def fun_l15_n899()
+ fun_l16_n829
+end
+
+def fun_l15_n900()
+ fun_l16_n686
+end
+
+def fun_l15_n901()
+ fun_l16_n302
+end
+
+def fun_l15_n902()
+ fun_l16_n947
+end
+
+def fun_l15_n903()
+ fun_l16_n107
+end
+
+def fun_l15_n904()
+ fun_l16_n79
+end
+
+def fun_l15_n905()
+ fun_l16_n570
+end
+
+def fun_l15_n906()
+ fun_l16_n567
+end
+
+def fun_l15_n907()
+ fun_l16_n853
+end
+
+def fun_l15_n908()
+ fun_l16_n49
+end
+
+def fun_l15_n909()
+ fun_l16_n721
+end
+
+def fun_l15_n910()
+ fun_l16_n376
+end
+
+def fun_l15_n911()
+ fun_l16_n513
+end
+
+def fun_l15_n912()
+ fun_l16_n863
+end
+
+def fun_l15_n913()
+ fun_l16_n692
+end
+
+def fun_l15_n914()
+ fun_l16_n391
+end
+
+def fun_l15_n915()
+ fun_l16_n263
+end
+
+def fun_l15_n916()
+ fun_l16_n159
+end
+
+def fun_l15_n917()
+ fun_l16_n291
+end
+
+def fun_l15_n918()
+ fun_l16_n290
+end
+
+def fun_l15_n919()
+ fun_l16_n328
+end
+
+def fun_l15_n920()
+ fun_l16_n838
+end
+
+def fun_l15_n921()
+ fun_l16_n66
+end
+
+def fun_l15_n922()
+ fun_l16_n821
+end
+
+def fun_l15_n923()
+ fun_l16_n549
+end
+
+def fun_l15_n924()
+ fun_l16_n235
+end
+
+def fun_l15_n925()
+ fun_l16_n800
+end
+
+def fun_l15_n926()
+ fun_l16_n486
+end
+
+def fun_l15_n927()
+ fun_l16_n824
+end
+
+def fun_l15_n928()
+ fun_l16_n881
+end
+
+def fun_l15_n929()
+ fun_l16_n772
+end
+
+def fun_l15_n930()
+ fun_l16_n563
+end
+
+def fun_l15_n931()
+ fun_l16_n99
+end
+
+def fun_l15_n932()
+ fun_l16_n691
+end
+
+def fun_l15_n933()
+ fun_l16_n983
+end
+
+def fun_l15_n934()
+ fun_l16_n593
+end
+
+def fun_l15_n935()
+ fun_l16_n611
+end
+
+def fun_l15_n936()
+ fun_l16_n600
+end
+
+def fun_l15_n937()
+ fun_l16_n892
+end
+
+def fun_l15_n938()
+ fun_l16_n653
+end
+
+def fun_l15_n939()
+ fun_l16_n78
+end
+
+def fun_l15_n940()
+ fun_l16_n139
+end
+
+def fun_l15_n941()
+ fun_l16_n995
+end
+
+def fun_l15_n942()
+ fun_l16_n63
+end
+
+def fun_l15_n943()
+ fun_l16_n466
+end
+
+def fun_l15_n944()
+ fun_l16_n740
+end
+
+def fun_l15_n945()
+ fun_l16_n870
+end
+
+def fun_l15_n946()
+ fun_l16_n373
+end
+
+def fun_l15_n947()
+ fun_l16_n375
+end
+
+def fun_l15_n948()
+ fun_l16_n360
+end
+
+def fun_l15_n949()
+ fun_l16_n526
+end
+
+def fun_l15_n950()
+ fun_l16_n100
+end
+
+def fun_l15_n951()
+ fun_l16_n644
+end
+
+def fun_l15_n952()
+ fun_l16_n773
+end
+
+def fun_l15_n953()
+ fun_l16_n311
+end
+
+def fun_l15_n954()
+ fun_l16_n152
+end
+
+def fun_l15_n955()
+ fun_l16_n754
+end
+
+def fun_l15_n956()
+ fun_l16_n31
+end
+
+def fun_l15_n957()
+ fun_l16_n501
+end
+
+def fun_l15_n958()
+ fun_l16_n333
+end
+
+def fun_l15_n959()
+ fun_l16_n952
+end
+
+def fun_l15_n960()
+ fun_l16_n753
+end
+
+def fun_l15_n961()
+ fun_l16_n694
+end
+
+def fun_l15_n962()
+ fun_l16_n82
+end
+
+def fun_l15_n963()
+ fun_l16_n204
+end
+
+def fun_l15_n964()
+ fun_l16_n910
+end
+
+def fun_l15_n965()
+ fun_l16_n127
+end
+
+def fun_l15_n966()
+ fun_l16_n203
+end
+
+def fun_l15_n967()
+ fun_l16_n760
+end
+
+def fun_l15_n968()
+ fun_l16_n718
+end
+
+def fun_l15_n969()
+ fun_l16_n446
+end
+
+def fun_l15_n970()
+ fun_l16_n595
+end
+
+def fun_l15_n971()
+ fun_l16_n165
+end
+
+def fun_l15_n972()
+ fun_l16_n393
+end
+
+def fun_l15_n973()
+ fun_l16_n766
+end
+
+def fun_l15_n974()
+ fun_l16_n276
+end
+
+def fun_l15_n975()
+ fun_l16_n97
+end
+
+def fun_l15_n976()
+ fun_l16_n319
+end
+
+def fun_l15_n977()
+ fun_l16_n333
+end
+
+def fun_l15_n978()
+ fun_l16_n635
+end
+
+def fun_l15_n979()
+ fun_l16_n466
+end
+
+def fun_l15_n980()
+ fun_l16_n841
+end
+
+def fun_l15_n981()
+ fun_l16_n415
+end
+
+def fun_l15_n982()
+ fun_l16_n630
+end
+
+def fun_l15_n983()
+ fun_l16_n19
+end
+
+def fun_l15_n984()
+ fun_l16_n901
+end
+
+def fun_l15_n985()
+ fun_l16_n933
+end
+
+def fun_l15_n986()
+ fun_l16_n558
+end
+
+def fun_l15_n987()
+ fun_l16_n357
+end
+
+def fun_l15_n988()
+ fun_l16_n929
+end
+
+def fun_l15_n989()
+ fun_l16_n871
+end
+
+def fun_l15_n990()
+ fun_l16_n967
+end
+
+def fun_l15_n991()
+ fun_l16_n803
+end
+
+def fun_l15_n992()
+ fun_l16_n484
+end
+
+def fun_l15_n993()
+ fun_l16_n270
+end
+
+def fun_l15_n994()
+ fun_l16_n670
+end
+
+def fun_l15_n995()
+ fun_l16_n77
+end
+
+def fun_l15_n996()
+ fun_l16_n480
+end
+
+def fun_l15_n997()
+ fun_l16_n279
+end
+
+def fun_l15_n998()
+ fun_l16_n109
+end
+
+def fun_l15_n999()
+ fun_l16_n333
+end
+
+def fun_l16_n0()
+ fun_l17_n358
+end
+
+def fun_l16_n1()
+ fun_l17_n388
+end
+
+def fun_l16_n2()
+ fun_l17_n450
+end
+
+def fun_l16_n3()
+ fun_l17_n274
+end
+
+def fun_l16_n4()
+ fun_l17_n83
+end
+
+def fun_l16_n5()
+ fun_l17_n148
+end
+
+def fun_l16_n6()
+ fun_l17_n370
+end
+
+def fun_l16_n7()
+ fun_l17_n956
+end
+
+def fun_l16_n8()
+ fun_l17_n137
+end
+
+def fun_l16_n9()
+ fun_l17_n702
+end
+
+def fun_l16_n10()
+ fun_l17_n296
+end
+
+def fun_l16_n11()
+ fun_l17_n44
+end
+
+def fun_l16_n12()
+ fun_l17_n937
+end
+
+def fun_l16_n13()
+ fun_l17_n100
+end
+
+def fun_l16_n14()
+ fun_l17_n599
+end
+
+def fun_l16_n15()
+ fun_l17_n757
+end
+
+def fun_l16_n16()
+ fun_l17_n831
+end
+
+def fun_l16_n17()
+ fun_l17_n753
+end
+
+def fun_l16_n18()
+ fun_l17_n726
+end
+
+def fun_l16_n19()
+ fun_l17_n126
+end
+
+def fun_l16_n20()
+ fun_l17_n106
+end
+
+def fun_l16_n21()
+ fun_l17_n46
+end
+
+def fun_l16_n22()
+ fun_l17_n56
+end
+
+def fun_l16_n23()
+ fun_l17_n16
+end
+
+def fun_l16_n24()
+ fun_l17_n298
+end
+
+def fun_l16_n25()
+ fun_l17_n173
+end
+
+def fun_l16_n26()
+ fun_l17_n479
+end
+
+def fun_l16_n27()
+ fun_l17_n304
+end
+
+def fun_l16_n28()
+ fun_l17_n426
+end
+
+def fun_l16_n29()
+ fun_l17_n214
+end
+
+def fun_l16_n30()
+ fun_l17_n818
+end
+
+def fun_l16_n31()
+ fun_l17_n362
+end
+
+def fun_l16_n32()
+ fun_l17_n392
+end
+
+def fun_l16_n33()
+ fun_l17_n751
+end
+
+def fun_l16_n34()
+ fun_l17_n719
+end
+
+def fun_l16_n35()
+ fun_l17_n258
+end
+
+def fun_l16_n36()
+ fun_l17_n128
+end
+
+def fun_l16_n37()
+ fun_l17_n95
+end
+
+def fun_l16_n38()
+ fun_l17_n30
+end
+
+def fun_l16_n39()
+ fun_l17_n539
+end
+
+def fun_l16_n40()
+ fun_l17_n139
+end
+
+def fun_l16_n41()
+ fun_l17_n309
+end
+
+def fun_l16_n42()
+ fun_l17_n943
+end
+
+def fun_l16_n43()
+ fun_l17_n242
+end
+
+def fun_l16_n44()
+ fun_l17_n402
+end
+
+def fun_l16_n45()
+ fun_l17_n173
+end
+
+def fun_l16_n46()
+ fun_l17_n328
+end
+
+def fun_l16_n47()
+ fun_l17_n883
+end
+
+def fun_l16_n48()
+ fun_l17_n992
+end
+
+def fun_l16_n49()
+ fun_l17_n921
+end
+
+def fun_l16_n50()
+ fun_l17_n130
+end
+
+def fun_l16_n51()
+ fun_l17_n374
+end
+
+def fun_l16_n52()
+ fun_l17_n555
+end
+
+def fun_l16_n53()
+ fun_l17_n965
+end
+
+def fun_l16_n54()
+ fun_l17_n353
+end
+
+def fun_l16_n55()
+ fun_l17_n525
+end
+
+def fun_l16_n56()
+ fun_l17_n569
+end
+
+def fun_l16_n57()
+ fun_l17_n156
+end
+
+def fun_l16_n58()
+ fun_l17_n695
+end
+
+def fun_l16_n59()
+ fun_l17_n864
+end
+
+def fun_l16_n60()
+ fun_l17_n415
+end
+
+def fun_l16_n61()
+ fun_l17_n605
+end
+
+def fun_l16_n62()
+ fun_l17_n995
+end
+
+def fun_l16_n63()
+ fun_l17_n794
+end
+
+def fun_l16_n64()
+ fun_l17_n813
+end
+
+def fun_l16_n65()
+ fun_l17_n839
+end
+
+def fun_l16_n66()
+ fun_l17_n273
+end
+
+def fun_l16_n67()
+ fun_l17_n223
+end
+
+def fun_l16_n68()
+ fun_l17_n168
+end
+
+def fun_l16_n69()
+ fun_l17_n798
+end
+
+def fun_l16_n70()
+ fun_l17_n892
+end
+
+def fun_l16_n71()
+ fun_l17_n966
+end
+
+def fun_l16_n72()
+ fun_l17_n102
+end
+
+def fun_l16_n73()
+ fun_l17_n209
+end
+
+def fun_l16_n74()
+ fun_l17_n618
+end
+
+def fun_l16_n75()
+ fun_l17_n432
+end
+
+def fun_l16_n76()
+ fun_l17_n254
+end
+
+def fun_l16_n77()
+ fun_l17_n413
+end
+
+def fun_l16_n78()
+ fun_l17_n908
+end
+
+def fun_l16_n79()
+ fun_l17_n519
+end
+
+def fun_l16_n80()
+ fun_l17_n67
+end
+
+def fun_l16_n81()
+ fun_l17_n914
+end
+
+def fun_l16_n82()
+ fun_l17_n356
+end
+
+def fun_l16_n83()
+ fun_l17_n138
+end
+
+def fun_l16_n84()
+ fun_l17_n714
+end
+
+def fun_l16_n85()
+ fun_l17_n803
+end
+
+def fun_l16_n86()
+ fun_l17_n770
+end
+
+def fun_l16_n87()
+ fun_l17_n813
+end
+
+def fun_l16_n88()
+ fun_l17_n752
+end
+
+def fun_l16_n89()
+ fun_l17_n580
+end
+
+def fun_l16_n90()
+ fun_l17_n368
+end
+
+def fun_l16_n91()
+ fun_l17_n169
+end
+
+def fun_l16_n92()
+ fun_l17_n565
+end
+
+def fun_l16_n93()
+ fun_l17_n111
+end
+
+def fun_l16_n94()
+ fun_l17_n911
+end
+
+def fun_l16_n95()
+ fun_l17_n448
+end
+
+def fun_l16_n96()
+ fun_l17_n455
+end
+
+def fun_l16_n97()
+ fun_l17_n76
+end
+
+def fun_l16_n98()
+ fun_l17_n27
+end
+
+def fun_l16_n99()
+ fun_l17_n884
+end
+
+def fun_l16_n100()
+ fun_l17_n144
+end
+
+def fun_l16_n101()
+ fun_l17_n344
+end
+
+def fun_l16_n102()
+ fun_l17_n293
+end
+
+def fun_l16_n103()
+ fun_l17_n91
+end
+
+def fun_l16_n104()
+ fun_l17_n398
+end
+
+def fun_l16_n105()
+ fun_l17_n398
+end
+
+def fun_l16_n106()
+ fun_l17_n216
+end
+
+def fun_l16_n107()
+ fun_l17_n22
+end
+
+def fun_l16_n108()
+ fun_l17_n901
+end
+
+def fun_l16_n109()
+ fun_l17_n817
+end
+
+def fun_l16_n110()
+ fun_l17_n574
+end
+
+def fun_l16_n111()
+ fun_l17_n546
+end
+
+def fun_l16_n112()
+ fun_l17_n704
+end
+
+def fun_l16_n113()
+ fun_l17_n184
+end
+
+def fun_l16_n114()
+ fun_l17_n993
+end
+
+def fun_l16_n115()
+ fun_l17_n582
+end
+
+def fun_l16_n116()
+ fun_l17_n943
+end
+
+def fun_l16_n117()
+ fun_l17_n692
+end
+
+def fun_l16_n118()
+ fun_l17_n203
+end
+
+def fun_l16_n119()
+ fun_l17_n283
+end
+
+def fun_l16_n120()
+ fun_l17_n600
+end
+
+def fun_l16_n121()
+ fun_l17_n953
+end
+
+def fun_l16_n122()
+ fun_l17_n810
+end
+
+def fun_l16_n123()
+ fun_l17_n861
+end
+
+def fun_l16_n124()
+ fun_l17_n680
+end
+
+def fun_l16_n125()
+ fun_l17_n401
+end
+
+def fun_l16_n126()
+ fun_l17_n905
+end
+
+def fun_l16_n127()
+ fun_l17_n376
+end
+
+def fun_l16_n128()
+ fun_l17_n231
+end
+
+def fun_l16_n129()
+ fun_l17_n693
+end
+
+def fun_l16_n130()
+ fun_l17_n219
+end
+
+def fun_l16_n131()
+ fun_l17_n560
+end
+
+def fun_l16_n132()
+ fun_l17_n17
+end
+
+def fun_l16_n133()
+ fun_l17_n706
+end
+
+def fun_l16_n134()
+ fun_l17_n355
+end
+
+def fun_l16_n135()
+ fun_l17_n309
+end
+
+def fun_l16_n136()
+ fun_l17_n514
+end
+
+def fun_l16_n137()
+ fun_l17_n428
+end
+
+def fun_l16_n138()
+ fun_l17_n80
+end
+
+def fun_l16_n139()
+ fun_l17_n548
+end
+
+def fun_l16_n140()
+ fun_l17_n514
+end
+
+def fun_l16_n141()
+ fun_l17_n316
+end
+
+def fun_l16_n142()
+ fun_l17_n791
+end
+
+def fun_l16_n143()
+ fun_l17_n70
+end
+
+def fun_l16_n144()
+ fun_l17_n953
+end
+
+def fun_l16_n145()
+ fun_l17_n416
+end
+
+def fun_l16_n146()
+ fun_l17_n989
+end
+
+def fun_l16_n147()
+ fun_l17_n604
+end
+
+def fun_l16_n148()
+ fun_l17_n845
+end
+
+def fun_l16_n149()
+ fun_l17_n576
+end
+
+def fun_l16_n150()
+ fun_l17_n831
+end
+
+def fun_l16_n151()
+ fun_l17_n727
+end
+
+def fun_l16_n152()
+ fun_l17_n231
+end
+
+def fun_l16_n153()
+ fun_l17_n405
+end
+
+def fun_l16_n154()
+ fun_l17_n643
+end
+
+def fun_l16_n155()
+ fun_l17_n117
+end
+
+def fun_l16_n156()
+ fun_l17_n842
+end
+
+def fun_l16_n157()
+ fun_l17_n522
+end
+
+def fun_l16_n158()
+ fun_l17_n415
+end
+
+def fun_l16_n159()
+ fun_l17_n239
+end
+
+def fun_l16_n160()
+ fun_l17_n512
+end
+
+def fun_l16_n161()
+ fun_l17_n247
+end
+
+def fun_l16_n162()
+ fun_l17_n798
+end
+
+def fun_l16_n163()
+ fun_l17_n771
+end
+
+def fun_l16_n164()
+ fun_l17_n47
+end
+
+def fun_l16_n165()
+ fun_l17_n803
+end
+
+def fun_l16_n166()
+ fun_l17_n500
+end
+
+def fun_l16_n167()
+ fun_l17_n797
+end
+
+def fun_l16_n168()
+ fun_l17_n467
+end
+
+def fun_l16_n169()
+ fun_l17_n893
+end
+
+def fun_l16_n170()
+ fun_l17_n900
+end
+
+def fun_l16_n171()
+ fun_l17_n539
+end
+
+def fun_l16_n172()
+ fun_l17_n631
+end
+
+def fun_l16_n173()
+ fun_l17_n113
+end
+
+def fun_l16_n174()
+ fun_l17_n674
+end
+
+def fun_l16_n175()
+ fun_l17_n827
+end
+
+def fun_l16_n176()
+ fun_l17_n751
+end
+
+def fun_l16_n177()
+ fun_l17_n600
+end
+
+def fun_l16_n178()
+ fun_l17_n290
+end
+
+def fun_l16_n179()
+ fun_l17_n947
+end
+
+def fun_l16_n180()
+ fun_l17_n718
+end
+
+def fun_l16_n181()
+ fun_l17_n531
+end
+
+def fun_l16_n182()
+ fun_l17_n849
+end
+
+def fun_l16_n183()
+ fun_l17_n310
+end
+
+def fun_l16_n184()
+ fun_l17_n795
+end
+
+def fun_l16_n185()
+ fun_l17_n65
+end
+
+def fun_l16_n186()
+ fun_l17_n242
+end
+
+def fun_l16_n187()
+ fun_l17_n832
+end
+
+def fun_l16_n188()
+ fun_l17_n749
+end
+
+def fun_l16_n189()
+ fun_l17_n826
+end
+
+def fun_l16_n190()
+ fun_l17_n244
+end
+
+def fun_l16_n191()
+ fun_l17_n279
+end
+
+def fun_l16_n192()
+ fun_l17_n746
+end
+
+def fun_l16_n193()
+ fun_l17_n199
+end
+
+def fun_l16_n194()
+ fun_l17_n458
+end
+
+def fun_l16_n195()
+ fun_l17_n161
+end
+
+def fun_l16_n196()
+ fun_l17_n584
+end
+
+def fun_l16_n197()
+ fun_l17_n400
+end
+
+def fun_l16_n198()
+ fun_l17_n598
+end
+
+def fun_l16_n199()
+ fun_l17_n685
+end
+
+def fun_l16_n200()
+ fun_l17_n939
+end
+
+def fun_l16_n201()
+ fun_l17_n374
+end
+
+def fun_l16_n202()
+ fun_l17_n463
+end
+
+def fun_l16_n203()
+ fun_l17_n677
+end
+
+def fun_l16_n204()
+ fun_l17_n857
+end
+
+def fun_l16_n205()
+ fun_l17_n39
+end
+
+def fun_l16_n206()
+ fun_l17_n899
+end
+
+def fun_l16_n207()
+ fun_l17_n733
+end
+
+def fun_l16_n208()
+ fun_l17_n137
+end
+
+def fun_l16_n209()
+ fun_l17_n988
+end
+
+def fun_l16_n210()
+ fun_l17_n792
+end
+
+def fun_l16_n211()
+ fun_l17_n861
+end
+
+def fun_l16_n212()
+ fun_l17_n889
+end
+
+def fun_l16_n213()
+ fun_l17_n933
+end
+
+def fun_l16_n214()
+ fun_l17_n898
+end
+
+def fun_l16_n215()
+ fun_l17_n723
+end
+
+def fun_l16_n216()
+ fun_l17_n116
+end
+
+def fun_l16_n217()
+ fun_l17_n251
+end
+
+def fun_l16_n218()
+ fun_l17_n586
+end
+
+def fun_l16_n219()
+ fun_l17_n428
+end
+
+def fun_l16_n220()
+ fun_l17_n53
+end
+
+def fun_l16_n221()
+ fun_l17_n611
+end
+
+def fun_l16_n222()
+ fun_l17_n480
+end
+
+def fun_l16_n223()
+ fun_l17_n2
+end
+
+def fun_l16_n224()
+ fun_l17_n623
+end
+
+def fun_l16_n225()
+ fun_l17_n178
+end
+
+def fun_l16_n226()
+ fun_l17_n938
+end
+
+def fun_l16_n227()
+ fun_l17_n284
+end
+
+def fun_l16_n228()
+ fun_l17_n925
+end
+
+def fun_l16_n229()
+ fun_l17_n899
+end
+
+def fun_l16_n230()
+ fun_l17_n314
+end
+
+def fun_l16_n231()
+ fun_l17_n931
+end
+
+def fun_l16_n232()
+ fun_l17_n103
+end
+
+def fun_l16_n233()
+ fun_l17_n201
+end
+
+def fun_l16_n234()
+ fun_l17_n139
+end
+
+def fun_l16_n235()
+ fun_l17_n509
+end
+
+def fun_l16_n236()
+ fun_l17_n168
+end
+
+def fun_l16_n237()
+ fun_l17_n667
+end
+
+def fun_l16_n238()
+ fun_l17_n998
+end
+
+def fun_l16_n239()
+ fun_l17_n931
+end
+
+def fun_l16_n240()
+ fun_l17_n159
+end
+
+def fun_l16_n241()
+ fun_l17_n402
+end
+
+def fun_l16_n242()
+ fun_l17_n488
+end
+
+def fun_l16_n243()
+ fun_l17_n319
+end
+
+def fun_l16_n244()
+ fun_l17_n209
+end
+
+def fun_l16_n245()
+ fun_l17_n409
+end
+
+def fun_l16_n246()
+ fun_l17_n712
+end
+
+def fun_l16_n247()
+ fun_l17_n680
+end
+
+def fun_l16_n248()
+ fun_l17_n57
+end
+
+def fun_l16_n249()
+ fun_l17_n68
+end
+
+def fun_l16_n250()
+ fun_l17_n676
+end
+
+def fun_l16_n251()
+ fun_l17_n870
+end
+
+def fun_l16_n252()
+ fun_l17_n718
+end
+
+def fun_l16_n253()
+ fun_l17_n753
+end
+
+def fun_l16_n254()
+ fun_l17_n317
+end
+
+def fun_l16_n255()
+ fun_l17_n905
+end
+
+def fun_l16_n256()
+ fun_l17_n524
+end
+
+def fun_l16_n257()
+ fun_l17_n496
+end
+
+def fun_l16_n258()
+ fun_l17_n253
+end
+
+def fun_l16_n259()
+ fun_l17_n32
+end
+
+def fun_l16_n260()
+ fun_l17_n299
+end
+
+def fun_l16_n261()
+ fun_l17_n291
+end
+
+def fun_l16_n262()
+ fun_l17_n516
+end
+
+def fun_l16_n263()
+ fun_l17_n542
+end
+
+def fun_l16_n264()
+ fun_l17_n550
+end
+
+def fun_l16_n265()
+ fun_l17_n886
+end
+
+def fun_l16_n266()
+ fun_l17_n428
+end
+
+def fun_l16_n267()
+ fun_l17_n741
+end
+
+def fun_l16_n268()
+ fun_l17_n711
+end
+
+def fun_l16_n269()
+ fun_l17_n709
+end
+
+def fun_l16_n270()
+ fun_l17_n71
+end
+
+def fun_l16_n271()
+ fun_l17_n256
+end
+
+def fun_l16_n272()
+ fun_l17_n585
+end
+
+def fun_l16_n273()
+ fun_l17_n478
+end
+
+def fun_l16_n274()
+ fun_l17_n314
+end
+
+def fun_l16_n275()
+ fun_l17_n223
+end
+
+def fun_l16_n276()
+ fun_l17_n691
+end
+
+def fun_l16_n277()
+ fun_l17_n637
+end
+
+def fun_l16_n278()
+ fun_l17_n218
+end
+
+def fun_l16_n279()
+ fun_l17_n675
+end
+
+def fun_l16_n280()
+ fun_l17_n705
+end
+
+def fun_l16_n281()
+ fun_l17_n492
+end
+
+def fun_l16_n282()
+ fun_l17_n426
+end
+
+def fun_l16_n283()
+ fun_l17_n366
+end
+
+def fun_l16_n284()
+ fun_l17_n533
+end
+
+def fun_l16_n285()
+ fun_l17_n980
+end
+
+def fun_l16_n286()
+ fun_l17_n660
+end
+
+def fun_l16_n287()
+ fun_l17_n550
+end
+
+def fun_l16_n288()
+ fun_l17_n37
+end
+
+def fun_l16_n289()
+ fun_l17_n453
+end
+
+def fun_l16_n290()
+ fun_l17_n687
+end
+
+def fun_l16_n291()
+ fun_l17_n82
+end
+
+def fun_l16_n292()
+ fun_l17_n327
+end
+
+def fun_l16_n293()
+ fun_l17_n842
+end
+
+def fun_l16_n294()
+ fun_l17_n201
+end
+
+def fun_l16_n295()
+ fun_l17_n26
+end
+
+def fun_l16_n296()
+ fun_l17_n153
+end
+
+def fun_l16_n297()
+ fun_l17_n684
+end
+
+def fun_l16_n298()
+ fun_l17_n752
+end
+
+def fun_l16_n299()
+ fun_l17_n763
+end
+
+def fun_l16_n300()
+ fun_l17_n651
+end
+
+def fun_l16_n301()
+ fun_l17_n605
+end
+
+def fun_l16_n302()
+ fun_l17_n48
+end
+
+def fun_l16_n303()
+ fun_l17_n71
+end
+
+def fun_l16_n304()
+ fun_l17_n57
+end
+
+def fun_l16_n305()
+ fun_l17_n72
+end
+
+def fun_l16_n306()
+ fun_l17_n561
+end
+
+def fun_l16_n307()
+ fun_l17_n10
+end
+
+def fun_l16_n308()
+ fun_l17_n543
+end
+
+def fun_l16_n309()
+ fun_l17_n17
+end
+
+def fun_l16_n310()
+ fun_l17_n340
+end
+
+def fun_l16_n311()
+ fun_l17_n184
+end
+
+def fun_l16_n312()
+ fun_l17_n208
+end
+
+def fun_l16_n313()
+ fun_l17_n46
+end
+
+def fun_l16_n314()
+ fun_l17_n386
+end
+
+def fun_l16_n315()
+ fun_l17_n258
+end
+
+def fun_l16_n316()
+ fun_l17_n594
+end
+
+def fun_l16_n317()
+ fun_l17_n968
+end
+
+def fun_l16_n318()
+ fun_l17_n403
+end
+
+def fun_l16_n319()
+ fun_l17_n256
+end
+
+def fun_l16_n320()
+ fun_l17_n212
+end
+
+def fun_l16_n321()
+ fun_l17_n567
+end
+
+def fun_l16_n322()
+ fun_l17_n61
+end
+
+def fun_l16_n323()
+ fun_l17_n925
+end
+
+def fun_l16_n324()
+ fun_l17_n679
+end
+
+def fun_l16_n325()
+ fun_l17_n136
+end
+
+def fun_l16_n326()
+ fun_l17_n403
+end
+
+def fun_l16_n327()
+ fun_l17_n35
+end
+
+def fun_l16_n328()
+ fun_l17_n833
+end
+
+def fun_l16_n329()
+ fun_l17_n925
+end
+
+def fun_l16_n330()
+ fun_l17_n193
+end
+
+def fun_l16_n331()
+ fun_l17_n474
+end
+
+def fun_l16_n332()
+ fun_l17_n271
+end
+
+def fun_l16_n333()
+ fun_l17_n604
+end
+
+def fun_l16_n334()
+ fun_l17_n570
+end
+
+def fun_l16_n335()
+ fun_l17_n110
+end
+
+def fun_l16_n336()
+ fun_l17_n920
+end
+
+def fun_l16_n337()
+ fun_l17_n388
+end
+
+def fun_l16_n338()
+ fun_l17_n207
+end
+
+def fun_l16_n339()
+ fun_l17_n899
+end
+
+def fun_l16_n340()
+ fun_l17_n337
+end
+
+def fun_l16_n341()
+ fun_l17_n611
+end
+
+def fun_l16_n342()
+ fun_l17_n474
+end
+
+def fun_l16_n343()
+ fun_l17_n71
+end
+
+def fun_l16_n344()
+ fun_l17_n347
+end
+
+def fun_l16_n345()
+ fun_l17_n911
+end
+
+def fun_l16_n346()
+ fun_l17_n625
+end
+
+def fun_l16_n347()
+ fun_l17_n683
+end
+
+def fun_l16_n348()
+ fun_l17_n628
+end
+
+def fun_l16_n349()
+ fun_l17_n73
+end
+
+def fun_l16_n350()
+ fun_l17_n710
+end
+
+def fun_l16_n351()
+ fun_l17_n550
+end
+
+def fun_l16_n352()
+ fun_l17_n96
+end
+
+def fun_l16_n353()
+ fun_l17_n815
+end
+
+def fun_l16_n354()
+ fun_l17_n494
+end
+
+def fun_l16_n355()
+ fun_l17_n831
+end
+
+def fun_l16_n356()
+ fun_l17_n174
+end
+
+def fun_l16_n357()
+ fun_l17_n196
+end
+
+def fun_l16_n358()
+ fun_l17_n191
+end
+
+def fun_l16_n359()
+ fun_l17_n278
+end
+
+def fun_l16_n360()
+ fun_l17_n433
+end
+
+def fun_l16_n361()
+ fun_l17_n673
+end
+
+def fun_l16_n362()
+ fun_l17_n313
+end
+
+def fun_l16_n363()
+ fun_l17_n517
+end
+
+def fun_l16_n364()
+ fun_l17_n392
+end
+
+def fun_l16_n365()
+ fun_l17_n574
+end
+
+def fun_l16_n366()
+ fun_l17_n531
+end
+
+def fun_l16_n367()
+ fun_l17_n222
+end
+
+def fun_l16_n368()
+ fun_l17_n226
+end
+
+def fun_l16_n369()
+ fun_l17_n309
+end
+
+def fun_l16_n370()
+ fun_l17_n125
+end
+
+def fun_l16_n371()
+ fun_l17_n523
+end
+
+def fun_l16_n372()
+ fun_l17_n261
+end
+
+def fun_l16_n373()
+ fun_l17_n830
+end
+
+def fun_l16_n374()
+ fun_l17_n851
+end
+
+def fun_l16_n375()
+ fun_l17_n845
+end
+
+def fun_l16_n376()
+ fun_l17_n76
+end
+
+def fun_l16_n377()
+ fun_l17_n405
+end
+
+def fun_l16_n378()
+ fun_l17_n972
+end
+
+def fun_l16_n379()
+ fun_l17_n769
+end
+
+def fun_l16_n380()
+ fun_l17_n246
+end
+
+def fun_l16_n381()
+ fun_l17_n95
+end
+
+def fun_l16_n382()
+ fun_l17_n768
+end
+
+def fun_l16_n383()
+ fun_l17_n12
+end
+
+def fun_l16_n384()
+ fun_l17_n164
+end
+
+def fun_l16_n385()
+ fun_l17_n579
+end
+
+def fun_l16_n386()
+ fun_l17_n241
+end
+
+def fun_l16_n387()
+ fun_l17_n913
+end
+
+def fun_l16_n388()
+ fun_l17_n518
+end
+
+def fun_l16_n389()
+ fun_l17_n376
+end
+
+def fun_l16_n390()
+ fun_l17_n256
+end
+
+def fun_l16_n391()
+ fun_l17_n25
+end
+
+def fun_l16_n392()
+ fun_l17_n699
+end
+
+def fun_l16_n393()
+ fun_l17_n808
+end
+
+def fun_l16_n394()
+ fun_l17_n234
+end
+
+def fun_l16_n395()
+ fun_l17_n517
+end
+
+def fun_l16_n396()
+ fun_l17_n172
+end
+
+def fun_l16_n397()
+ fun_l17_n811
+end
+
+def fun_l16_n398()
+ fun_l17_n513
+end
+
+def fun_l16_n399()
+ fun_l17_n144
+end
+
+def fun_l16_n400()
+ fun_l17_n92
+end
+
+def fun_l16_n401()
+ fun_l17_n599
+end
+
+def fun_l16_n402()
+ fun_l17_n394
+end
+
+def fun_l16_n403()
+ fun_l17_n17
+end
+
+def fun_l16_n404()
+ fun_l17_n450
+end
+
+def fun_l16_n405()
+ fun_l17_n46
+end
+
+def fun_l16_n406()
+ fun_l17_n819
+end
+
+def fun_l16_n407()
+ fun_l17_n955
+end
+
+def fun_l16_n408()
+ fun_l17_n261
+end
+
+def fun_l16_n409()
+ fun_l17_n695
+end
+
+def fun_l16_n410()
+ fun_l17_n90
+end
+
+def fun_l16_n411()
+ fun_l17_n93
+end
+
+def fun_l16_n412()
+ fun_l17_n529
+end
+
+def fun_l16_n413()
+ fun_l17_n831
+end
+
+def fun_l16_n414()
+ fun_l17_n107
+end
+
+def fun_l16_n415()
+ fun_l17_n977
+end
+
+def fun_l16_n416()
+ fun_l17_n891
+end
+
+def fun_l16_n417()
+ fun_l17_n256
+end
+
+def fun_l16_n418()
+ fun_l17_n45
+end
+
+def fun_l16_n419()
+ fun_l17_n862
+end
+
+def fun_l16_n420()
+ fun_l17_n294
+end
+
+def fun_l16_n421()
+ fun_l17_n421
+end
+
+def fun_l16_n422()
+ fun_l17_n749
+end
+
+def fun_l16_n423()
+ fun_l17_n689
+end
+
+def fun_l16_n424()
+ fun_l17_n524
+end
+
+def fun_l16_n425()
+ fun_l17_n946
+end
+
+def fun_l16_n426()
+ fun_l17_n222
+end
+
+def fun_l16_n427()
+ fun_l17_n146
+end
+
+def fun_l16_n428()
+ fun_l17_n219
+end
+
+def fun_l16_n429()
+ fun_l17_n380
+end
+
+def fun_l16_n430()
+ fun_l17_n371
+end
+
+def fun_l16_n431()
+ fun_l17_n813
+end
+
+def fun_l16_n432()
+ fun_l17_n546
+end
+
+def fun_l16_n433()
+ fun_l17_n429
+end
+
+def fun_l16_n434()
+ fun_l17_n672
+end
+
+def fun_l16_n435()
+ fun_l17_n374
+end
+
+def fun_l16_n436()
+ fun_l17_n695
+end
+
+def fun_l16_n437()
+ fun_l17_n682
+end
+
+def fun_l16_n438()
+ fun_l17_n894
+end
+
+def fun_l16_n439()
+ fun_l17_n268
+end
+
+def fun_l16_n440()
+ fun_l17_n393
+end
+
+def fun_l16_n441()
+ fun_l17_n852
+end
+
+def fun_l16_n442()
+ fun_l17_n481
+end
+
+def fun_l16_n443()
+ fun_l17_n598
+end
+
+def fun_l16_n444()
+ fun_l17_n851
+end
+
+def fun_l16_n445()
+ fun_l17_n132
+end
+
+def fun_l16_n446()
+ fun_l17_n357
+end
+
+def fun_l16_n447()
+ fun_l17_n132
+end
+
+def fun_l16_n448()
+ fun_l17_n829
+end
+
+def fun_l16_n449()
+ fun_l17_n591
+end
+
+def fun_l16_n450()
+ fun_l17_n437
+end
+
+def fun_l16_n451()
+ fun_l17_n108
+end
+
+def fun_l16_n452()
+ fun_l17_n898
+end
+
+def fun_l16_n453()
+ fun_l17_n263
+end
+
+def fun_l16_n454()
+ fun_l17_n942
+end
+
+def fun_l16_n455()
+ fun_l17_n470
+end
+
+def fun_l16_n456()
+ fun_l17_n427
+end
+
+def fun_l16_n457()
+ fun_l17_n884
+end
+
+def fun_l16_n458()
+ fun_l17_n413
+end
+
+def fun_l16_n459()
+ fun_l17_n105
+end
+
+def fun_l16_n460()
+ fun_l17_n75
+end
+
+def fun_l16_n461()
+ fun_l17_n149
+end
+
+def fun_l16_n462()
+ fun_l17_n133
+end
+
+def fun_l16_n463()
+ fun_l17_n173
+end
+
+def fun_l16_n464()
+ fun_l17_n232
+end
+
+def fun_l16_n465()
+ fun_l17_n909
+end
+
+def fun_l16_n466()
+ fun_l17_n400
+end
+
+def fun_l16_n467()
+ fun_l17_n500
+end
+
+def fun_l16_n468()
+ fun_l17_n446
+end
+
+def fun_l16_n469()
+ fun_l17_n288
+end
+
+def fun_l16_n470()
+ fun_l17_n228
+end
+
+def fun_l16_n471()
+ fun_l17_n169
+end
+
+def fun_l16_n472()
+ fun_l17_n10
+end
+
+def fun_l16_n473()
+ fun_l17_n538
+end
+
+def fun_l16_n474()
+ fun_l17_n722
+end
+
+def fun_l16_n475()
+ fun_l17_n430
+end
+
+def fun_l16_n476()
+ fun_l17_n687
+end
+
+def fun_l16_n477()
+ fun_l17_n932
+end
+
+def fun_l16_n478()
+ fun_l17_n658
+end
+
+def fun_l16_n479()
+ fun_l17_n104
+end
+
+def fun_l16_n480()
+ fun_l17_n723
+end
+
+def fun_l16_n481()
+ fun_l17_n121
+end
+
+def fun_l16_n482()
+ fun_l17_n836
+end
+
+def fun_l16_n483()
+ fun_l17_n860
+end
+
+def fun_l16_n484()
+ fun_l17_n583
+end
+
+def fun_l16_n485()
+ fun_l17_n582
+end
+
+def fun_l16_n486()
+ fun_l17_n470
+end
+
+def fun_l16_n487()
+ fun_l17_n103
+end
+
+def fun_l16_n488()
+ fun_l17_n69
+end
+
+def fun_l16_n489()
+ fun_l17_n164
+end
+
+def fun_l16_n490()
+ fun_l17_n218
+end
+
+def fun_l16_n491()
+ fun_l17_n458
+end
+
+def fun_l16_n492()
+ fun_l17_n653
+end
+
+def fun_l16_n493()
+ fun_l17_n367
+end
+
+def fun_l16_n494()
+ fun_l17_n40
+end
+
+def fun_l16_n495()
+ fun_l17_n533
+end
+
+def fun_l16_n496()
+ fun_l17_n614
+end
+
+def fun_l16_n497()
+ fun_l17_n228
+end
+
+def fun_l16_n498()
+ fun_l17_n172
+end
+
+def fun_l16_n499()
+ fun_l17_n101
+end
+
+def fun_l16_n500()
+ fun_l17_n843
+end
+
+def fun_l16_n501()
+ fun_l17_n710
+end
+
+def fun_l16_n502()
+ fun_l17_n109
+end
+
+def fun_l16_n503()
+ fun_l17_n858
+end
+
+def fun_l16_n504()
+ fun_l17_n81
+end
+
+def fun_l16_n505()
+ fun_l17_n951
+end
+
+def fun_l16_n506()
+ fun_l17_n303
+end
+
+def fun_l16_n507()
+ fun_l17_n591
+end
+
+def fun_l16_n508()
+ fun_l17_n956
+end
+
+def fun_l16_n509()
+ fun_l17_n207
+end
+
+def fun_l16_n510()
+ fun_l17_n113
+end
+
+def fun_l16_n511()
+ fun_l17_n875
+end
+
+def fun_l16_n512()
+ fun_l17_n514
+end
+
+def fun_l16_n513()
+ fun_l17_n990
+end
+
+def fun_l16_n514()
+ fun_l17_n418
+end
+
+def fun_l16_n515()
+ fun_l17_n849
+end
+
+def fun_l16_n516()
+ fun_l17_n491
+end
+
+def fun_l16_n517()
+ fun_l17_n740
+end
+
+def fun_l16_n518()
+ fun_l17_n46
+end
+
+def fun_l16_n519()
+ fun_l17_n923
+end
+
+def fun_l16_n520()
+ fun_l17_n632
+end
+
+def fun_l16_n521()
+ fun_l17_n198
+end
+
+def fun_l16_n522()
+ fun_l17_n441
+end
+
+def fun_l16_n523()
+ fun_l17_n291
+end
+
+def fun_l16_n524()
+ fun_l17_n32
+end
+
+def fun_l16_n525()
+ fun_l17_n600
+end
+
+def fun_l16_n526()
+ fun_l17_n536
+end
+
+def fun_l16_n527()
+ fun_l17_n702
+end
+
+def fun_l16_n528()
+ fun_l17_n193
+end
+
+def fun_l16_n529()
+ fun_l17_n155
+end
+
+def fun_l16_n530()
+ fun_l17_n957
+end
+
+def fun_l16_n531()
+ fun_l17_n543
+end
+
+def fun_l16_n532()
+ fun_l17_n932
+end
+
+def fun_l16_n533()
+ fun_l17_n685
+end
+
+def fun_l16_n534()
+ fun_l17_n56
+end
+
+def fun_l16_n535()
+ fun_l17_n488
+end
+
+def fun_l16_n536()
+ fun_l17_n894
+end
+
+def fun_l16_n537()
+ fun_l17_n753
+end
+
+def fun_l16_n538()
+ fun_l17_n577
+end
+
+def fun_l16_n539()
+ fun_l17_n827
+end
+
+def fun_l16_n540()
+ fun_l17_n619
+end
+
+def fun_l16_n541()
+ fun_l17_n144
+end
+
+def fun_l16_n542()
+ fun_l17_n756
+end
+
+def fun_l16_n543()
+ fun_l17_n32
+end
+
+def fun_l16_n544()
+ fun_l17_n774
+end
+
+def fun_l16_n545()
+ fun_l17_n143
+end
+
+def fun_l16_n546()
+ fun_l17_n605
+end
+
+def fun_l16_n547()
+ fun_l17_n573
+end
+
+def fun_l16_n548()
+ fun_l17_n242
+end
+
+def fun_l16_n549()
+ fun_l17_n522
+end
+
+def fun_l16_n550()
+ fun_l17_n208
+end
+
+def fun_l16_n551()
+ fun_l17_n740
+end
+
+def fun_l16_n552()
+ fun_l17_n972
+end
+
+def fun_l16_n553()
+ fun_l17_n390
+end
+
+def fun_l16_n554()
+ fun_l17_n889
+end
+
+def fun_l16_n555()
+ fun_l17_n60
+end
+
+def fun_l16_n556()
+ fun_l17_n682
+end
+
+def fun_l16_n557()
+ fun_l17_n592
+end
+
+def fun_l16_n558()
+ fun_l17_n480
+end
+
+def fun_l16_n559()
+ fun_l17_n963
+end
+
+def fun_l16_n560()
+ fun_l17_n128
+end
+
+def fun_l16_n561()
+ fun_l17_n167
+end
+
+def fun_l16_n562()
+ fun_l17_n415
+end
+
+def fun_l16_n563()
+ fun_l17_n199
+end
+
+def fun_l16_n564()
+ fun_l17_n926
+end
+
+def fun_l16_n565()
+ fun_l17_n165
+end
+
+def fun_l16_n566()
+ fun_l17_n226
+end
+
+def fun_l16_n567()
+ fun_l17_n346
+end
+
+def fun_l16_n568()
+ fun_l17_n351
+end
+
+def fun_l16_n569()
+ fun_l17_n934
+end
+
+def fun_l16_n570()
+ fun_l17_n658
+end
+
+def fun_l16_n571()
+ fun_l17_n941
+end
+
+def fun_l16_n572()
+ fun_l17_n20
+end
+
+def fun_l16_n573()
+ fun_l17_n769
+end
+
+def fun_l16_n574()
+ fun_l17_n419
+end
+
+def fun_l16_n575()
+ fun_l17_n51
+end
+
+def fun_l16_n576()
+ fun_l17_n809
+end
+
+def fun_l16_n577()
+ fun_l17_n315
+end
+
+def fun_l16_n578()
+ fun_l17_n479
+end
+
+def fun_l16_n579()
+ fun_l17_n99
+end
+
+def fun_l16_n580()
+ fun_l17_n675
+end
+
+def fun_l16_n581()
+ fun_l17_n381
+end
+
+def fun_l16_n582()
+ fun_l17_n340
+end
+
+def fun_l16_n583()
+ fun_l17_n569
+end
+
+def fun_l16_n584()
+ fun_l17_n697
+end
+
+def fun_l16_n585()
+ fun_l17_n376
+end
+
+def fun_l16_n586()
+ fun_l17_n179
+end
+
+def fun_l16_n587()
+ fun_l17_n266
+end
+
+def fun_l16_n588()
+ fun_l17_n638
+end
+
+def fun_l16_n589()
+ fun_l17_n236
+end
+
+def fun_l16_n590()
+ fun_l17_n293
+end
+
+def fun_l16_n591()
+ fun_l17_n310
+end
+
+def fun_l16_n592()
+ fun_l17_n213
+end
+
+def fun_l16_n593()
+ fun_l17_n716
+end
+
+def fun_l16_n594()
+ fun_l17_n563
+end
+
+def fun_l16_n595()
+ fun_l17_n781
+end
+
+def fun_l16_n596()
+ fun_l17_n961
+end
+
+def fun_l16_n597()
+ fun_l17_n445
+end
+
+def fun_l16_n598()
+ fun_l17_n68
+end
+
+def fun_l16_n599()
+ fun_l17_n946
+end
+
+def fun_l16_n600()
+ fun_l17_n246
+end
+
+def fun_l16_n601()
+ fun_l17_n842
+end
+
+def fun_l16_n602()
+ fun_l17_n43
+end
+
+def fun_l16_n603()
+ fun_l17_n274
+end
+
+def fun_l16_n604()
+ fun_l17_n10
+end
+
+def fun_l16_n605()
+ fun_l17_n319
+end
+
+def fun_l16_n606()
+ fun_l17_n834
+end
+
+def fun_l16_n607()
+ fun_l17_n483
+end
+
+def fun_l16_n608()
+ fun_l17_n846
+end
+
+def fun_l16_n609()
+ fun_l17_n779
+end
+
+def fun_l16_n610()
+ fun_l17_n539
+end
+
+def fun_l16_n611()
+ fun_l17_n579
+end
+
+def fun_l16_n612()
+ fun_l17_n841
+end
+
+def fun_l16_n613()
+ fun_l17_n27
+end
+
+def fun_l16_n614()
+ fun_l17_n283
+end
+
+def fun_l16_n615()
+ fun_l17_n782
+end
+
+def fun_l16_n616()
+ fun_l17_n815
+end
+
+def fun_l16_n617()
+ fun_l17_n961
+end
+
+def fun_l16_n618()
+ fun_l17_n626
+end
+
+def fun_l16_n619()
+ fun_l17_n79
+end
+
+def fun_l16_n620()
+ fun_l17_n814
+end
+
+def fun_l16_n621()
+ fun_l17_n674
+end
+
+def fun_l16_n622()
+ fun_l17_n788
+end
+
+def fun_l16_n623()
+ fun_l17_n714
+end
+
+def fun_l16_n624()
+ fun_l17_n257
+end
+
+def fun_l16_n625()
+ fun_l17_n424
+end
+
+def fun_l16_n626()
+ fun_l17_n393
+end
+
+def fun_l16_n627()
+ fun_l17_n187
+end
+
+def fun_l16_n628()
+ fun_l17_n778
+end
+
+def fun_l16_n629()
+ fun_l17_n466
+end
+
+def fun_l16_n630()
+ fun_l17_n63
+end
+
+def fun_l16_n631()
+ fun_l17_n375
+end
+
+def fun_l16_n632()
+ fun_l17_n584
+end
+
+def fun_l16_n633()
+ fun_l17_n148
+end
+
+def fun_l16_n634()
+ fun_l17_n466
+end
+
+def fun_l16_n635()
+ fun_l17_n889
+end
+
+def fun_l16_n636()
+ fun_l17_n360
+end
+
+def fun_l16_n637()
+ fun_l17_n578
+end
+
+def fun_l16_n638()
+ fun_l17_n345
+end
+
+def fun_l16_n639()
+ fun_l17_n224
+end
+
+def fun_l16_n640()
+ fun_l17_n574
+end
+
+def fun_l16_n641()
+ fun_l17_n175
+end
+
+def fun_l16_n642()
+ fun_l17_n141
+end
+
+def fun_l16_n643()
+ fun_l17_n405
+end
+
+def fun_l16_n644()
+ fun_l17_n992
+end
+
+def fun_l16_n645()
+ fun_l17_n503
+end
+
+def fun_l16_n646()
+ fun_l17_n553
+end
+
+def fun_l16_n647()
+ fun_l17_n615
+end
+
+def fun_l16_n648()
+ fun_l17_n925
+end
+
+def fun_l16_n649()
+ fun_l17_n174
+end
+
+def fun_l16_n650()
+ fun_l17_n552
+end
+
+def fun_l16_n651()
+ fun_l17_n243
+end
+
+def fun_l16_n652()
+ fun_l17_n364
+end
+
+def fun_l16_n653()
+ fun_l17_n76
+end
+
+def fun_l16_n654()
+ fun_l17_n68
+end
+
+def fun_l16_n655()
+ fun_l17_n623
+end
+
+def fun_l16_n656()
+ fun_l17_n539
+end
+
+def fun_l16_n657()
+ fun_l17_n875
+end
+
+def fun_l16_n658()
+ fun_l17_n593
+end
+
+def fun_l16_n659()
+ fun_l17_n740
+end
+
+def fun_l16_n660()
+ fun_l17_n241
+end
+
+def fun_l16_n661()
+ fun_l17_n338
+end
+
+def fun_l16_n662()
+ fun_l17_n430
+end
+
+def fun_l16_n663()
+ fun_l17_n49
+end
+
+def fun_l16_n664()
+ fun_l17_n42
+end
+
+def fun_l16_n665()
+ fun_l17_n254
+end
+
+def fun_l16_n666()
+ fun_l17_n538
+end
+
+def fun_l16_n667()
+ fun_l17_n192
+end
+
+def fun_l16_n668()
+ fun_l17_n803
+end
+
+def fun_l16_n669()
+ fun_l17_n898
+end
+
+def fun_l16_n670()
+ fun_l17_n825
+end
+
+def fun_l16_n671()
+ fun_l17_n968
+end
+
+def fun_l16_n672()
+ fun_l17_n417
+end
+
+def fun_l16_n673()
+ fun_l17_n255
+end
+
+def fun_l16_n674()
+ fun_l17_n311
+end
+
+def fun_l16_n675()
+ fun_l17_n296
+end
+
+def fun_l16_n676()
+ fun_l17_n209
+end
+
+def fun_l16_n677()
+ fun_l17_n560
+end
+
+def fun_l16_n678()
+ fun_l17_n909
+end
+
+def fun_l16_n679()
+ fun_l17_n927
+end
+
+def fun_l16_n680()
+ fun_l17_n844
+end
+
+def fun_l16_n681()
+ fun_l17_n411
+end
+
+def fun_l16_n682()
+ fun_l17_n757
+end
+
+def fun_l16_n683()
+ fun_l17_n723
+end
+
+def fun_l16_n684()
+ fun_l17_n119
+end
+
+def fun_l16_n685()
+ fun_l17_n906
+end
+
+def fun_l16_n686()
+ fun_l17_n674
+end
+
+def fun_l16_n687()
+ fun_l17_n42
+end
+
+def fun_l16_n688()
+ fun_l17_n350
+end
+
+def fun_l16_n689()
+ fun_l17_n574
+end
+
+def fun_l16_n690()
+ fun_l17_n363
+end
+
+def fun_l16_n691()
+ fun_l17_n342
+end
+
+def fun_l16_n692()
+ fun_l17_n79
+end
+
+def fun_l16_n693()
+ fun_l17_n253
+end
+
+def fun_l16_n694()
+ fun_l17_n66
+end
+
+def fun_l16_n695()
+ fun_l17_n503
+end
+
+def fun_l16_n696()
+ fun_l17_n846
+end
+
+def fun_l16_n697()
+ fun_l17_n100
+end
+
+def fun_l16_n698()
+ fun_l17_n844
+end
+
+def fun_l16_n699()
+ fun_l17_n317
+end
+
+def fun_l16_n700()
+ fun_l17_n690
+end
+
+def fun_l16_n701()
+ fun_l17_n484
+end
+
+def fun_l16_n702()
+ fun_l17_n451
+end
+
+def fun_l16_n703()
+ fun_l17_n101
+end
+
+def fun_l16_n704()
+ fun_l17_n962
+end
+
+def fun_l16_n705()
+ fun_l17_n459
+end
+
+def fun_l16_n706()
+ fun_l17_n842
+end
+
+def fun_l16_n707()
+ fun_l17_n705
+end
+
+def fun_l16_n708()
+ fun_l17_n827
+end
+
+def fun_l16_n709()
+ fun_l17_n250
+end
+
+def fun_l16_n710()
+ fun_l17_n561
+end
+
+def fun_l16_n711()
+ fun_l17_n568
+end
+
+def fun_l16_n712()
+ fun_l17_n216
+end
+
+def fun_l16_n713()
+ fun_l17_n292
+end
+
+def fun_l16_n714()
+ fun_l17_n221
+end
+
+def fun_l16_n715()
+ fun_l17_n952
+end
+
+def fun_l16_n716()
+ fun_l17_n486
+end
+
+def fun_l16_n717()
+ fun_l17_n266
+end
+
+def fun_l16_n718()
+ fun_l17_n858
+end
+
+def fun_l16_n719()
+ fun_l17_n464
+end
+
+def fun_l16_n720()
+ fun_l17_n555
+end
+
+def fun_l16_n721()
+ fun_l17_n732
+end
+
+def fun_l16_n722()
+ fun_l17_n281
+end
+
+def fun_l16_n723()
+ fun_l17_n210
+end
+
+def fun_l16_n724()
+ fun_l17_n211
+end
+
+def fun_l16_n725()
+ fun_l17_n971
+end
+
+def fun_l16_n726()
+ fun_l17_n94
+end
+
+def fun_l16_n727()
+ fun_l17_n103
+end
+
+def fun_l16_n728()
+ fun_l17_n655
+end
+
+def fun_l16_n729()
+ fun_l17_n272
+end
+
+def fun_l16_n730()
+ fun_l17_n908
+end
+
+def fun_l16_n731()
+ fun_l17_n126
+end
+
+def fun_l16_n732()
+ fun_l17_n417
+end
+
+def fun_l16_n733()
+ fun_l17_n573
+end
+
+def fun_l16_n734()
+ fun_l17_n733
+end
+
+def fun_l16_n735()
+ fun_l17_n483
+end
+
+def fun_l16_n736()
+ fun_l17_n330
+end
+
+def fun_l16_n737()
+ fun_l17_n159
+end
+
+def fun_l16_n738()
+ fun_l17_n548
+end
+
+def fun_l16_n739()
+ fun_l17_n770
+end
+
+def fun_l16_n740()
+ fun_l17_n320
+end
+
+def fun_l16_n741()
+ fun_l17_n706
+end
+
+def fun_l16_n742()
+ fun_l17_n383
+end
+
+def fun_l16_n743()
+ fun_l17_n737
+end
+
+def fun_l16_n744()
+ fun_l17_n470
+end
+
+def fun_l16_n745()
+ fun_l17_n956
+end
+
+def fun_l16_n746()
+ fun_l17_n582
+end
+
+def fun_l16_n747()
+ fun_l17_n0
+end
+
+def fun_l16_n748()
+ fun_l17_n744
+end
+
+def fun_l16_n749()
+ fun_l17_n810
+end
+
+def fun_l16_n750()
+ fun_l17_n130
+end
+
+def fun_l16_n751()
+ fun_l17_n17
+end
+
+def fun_l16_n752()
+ fun_l17_n191
+end
+
+def fun_l16_n753()
+ fun_l17_n557
+end
+
+def fun_l16_n754()
+ fun_l17_n675
+end
+
+def fun_l16_n755()
+ fun_l17_n43
+end
+
+def fun_l16_n756()
+ fun_l17_n907
+end
+
+def fun_l16_n757()
+ fun_l17_n203
+end
+
+def fun_l16_n758()
+ fun_l17_n388
+end
+
+def fun_l16_n759()
+ fun_l17_n101
+end
+
+def fun_l16_n760()
+ fun_l17_n110
+end
+
+def fun_l16_n761()
+ fun_l17_n765
+end
+
+def fun_l16_n762()
+ fun_l17_n406
+end
+
+def fun_l16_n763()
+ fun_l17_n120
+end
+
+def fun_l16_n764()
+ fun_l17_n266
+end
+
+def fun_l16_n765()
+ fun_l17_n35
+end
+
+def fun_l16_n766()
+ fun_l17_n478
+end
+
+def fun_l16_n767()
+ fun_l17_n135
+end
+
+def fun_l16_n768()
+ fun_l17_n934
+end
+
+def fun_l16_n769()
+ fun_l17_n442
+end
+
+def fun_l16_n770()
+ fun_l17_n233
+end
+
+def fun_l16_n771()
+ fun_l17_n336
+end
+
+def fun_l16_n772()
+ fun_l17_n832
+end
+
+def fun_l16_n773()
+ fun_l17_n207
+end
+
+def fun_l16_n774()
+ fun_l17_n752
+end
+
+def fun_l16_n775()
+ fun_l17_n928
+end
+
+def fun_l16_n776()
+ fun_l17_n217
+end
+
+def fun_l16_n777()
+ fun_l17_n925
+end
+
+def fun_l16_n778()
+ fun_l17_n833
+end
+
+def fun_l16_n779()
+ fun_l17_n421
+end
+
+def fun_l16_n780()
+ fun_l17_n878
+end
+
+def fun_l16_n781()
+ fun_l17_n117
+end
+
+def fun_l16_n782()
+ fun_l17_n55
+end
+
+def fun_l16_n783()
+ fun_l17_n46
+end
+
+def fun_l16_n784()
+ fun_l17_n260
+end
+
+def fun_l16_n785()
+ fun_l17_n270
+end
+
+def fun_l16_n786()
+ fun_l17_n68
+end
+
+def fun_l16_n787()
+ fun_l17_n768
+end
+
+def fun_l16_n788()
+ fun_l17_n671
+end
+
+def fun_l16_n789()
+ fun_l17_n338
+end
+
+def fun_l16_n790()
+ fun_l17_n442
+end
+
+def fun_l16_n791()
+ fun_l17_n677
+end
+
+def fun_l16_n792()
+ fun_l17_n141
+end
+
+def fun_l16_n793()
+ fun_l17_n427
+end
+
+def fun_l16_n794()
+ fun_l17_n493
+end
+
+def fun_l16_n795()
+ fun_l17_n461
+end
+
+def fun_l16_n796()
+ fun_l17_n615
+end
+
+def fun_l16_n797()
+ fun_l17_n895
+end
+
+def fun_l16_n798()
+ fun_l17_n883
+end
+
+def fun_l16_n799()
+ fun_l17_n992
+end
+
+def fun_l16_n800()
+ fun_l17_n754
+end
+
+def fun_l16_n801()
+ fun_l17_n668
+end
+
+def fun_l16_n802()
+ fun_l17_n362
+end
+
+def fun_l16_n803()
+ fun_l17_n179
+end
+
+def fun_l16_n804()
+ fun_l17_n35
+end
+
+def fun_l16_n805()
+ fun_l17_n999
+end
+
+def fun_l16_n806()
+ fun_l17_n211
+end
+
+def fun_l16_n807()
+ fun_l17_n859
+end
+
+def fun_l16_n808()
+ fun_l17_n126
+end
+
+def fun_l16_n809()
+ fun_l17_n935
+end
+
+def fun_l16_n810()
+ fun_l17_n682
+end
+
+def fun_l16_n811()
+ fun_l17_n788
+end
+
+def fun_l16_n812()
+ fun_l17_n939
+end
+
+def fun_l16_n813()
+ fun_l17_n687
+end
+
+def fun_l16_n814()
+ fun_l17_n274
+end
+
+def fun_l16_n815()
+ fun_l17_n699
+end
+
+def fun_l16_n816()
+ fun_l17_n129
+end
+
+def fun_l16_n817()
+ fun_l17_n201
+end
+
+def fun_l16_n818()
+ fun_l17_n448
+end
+
+def fun_l16_n819()
+ fun_l17_n482
+end
+
+def fun_l16_n820()
+ fun_l17_n199
+end
+
+def fun_l16_n821()
+ fun_l17_n283
+end
+
+def fun_l16_n822()
+ fun_l17_n413
+end
+
+def fun_l16_n823()
+ fun_l17_n373
+end
+
+def fun_l16_n824()
+ fun_l17_n368
+end
+
+def fun_l16_n825()
+ fun_l17_n892
+end
+
+def fun_l16_n826()
+ fun_l17_n40
+end
+
+def fun_l16_n827()
+ fun_l17_n258
+end
+
+def fun_l16_n828()
+ fun_l17_n218
+end
+
+def fun_l16_n829()
+ fun_l17_n647
+end
+
+def fun_l16_n830()
+ fun_l17_n429
+end
+
+def fun_l16_n831()
+ fun_l17_n524
+end
+
+def fun_l16_n832()
+ fun_l17_n424
+end
+
+def fun_l16_n833()
+ fun_l17_n755
+end
+
+def fun_l16_n834()
+ fun_l17_n82
+end
+
+def fun_l16_n835()
+ fun_l17_n109
+end
+
+def fun_l16_n836()
+ fun_l17_n399
+end
+
+def fun_l16_n837()
+ fun_l17_n829
+end
+
+def fun_l16_n838()
+ fun_l17_n26
+end
+
+def fun_l16_n839()
+ fun_l17_n537
+end
+
+def fun_l16_n840()
+ fun_l17_n969
+end
+
+def fun_l16_n841()
+ fun_l17_n248
+end
+
+def fun_l16_n842()
+ fun_l17_n178
+end
+
+def fun_l16_n843()
+ fun_l17_n816
+end
+
+def fun_l16_n844()
+ fun_l17_n925
+end
+
+def fun_l16_n845()
+ fun_l17_n388
+end
+
+def fun_l16_n846()
+ fun_l17_n923
+end
+
+def fun_l16_n847()
+ fun_l17_n386
+end
+
+def fun_l16_n848()
+ fun_l17_n940
+end
+
+def fun_l16_n849()
+ fun_l17_n831
+end
+
+def fun_l16_n850()
+ fun_l17_n771
+end
+
+def fun_l16_n851()
+ fun_l17_n45
+end
+
+def fun_l16_n852()
+ fun_l17_n18
+end
+
+def fun_l16_n853()
+ fun_l17_n435
+end
+
+def fun_l16_n854()
+ fun_l17_n397
+end
+
+def fun_l16_n855()
+ fun_l17_n656
+end
+
+def fun_l16_n856()
+ fun_l17_n72
+end
+
+def fun_l16_n857()
+ fun_l17_n531
+end
+
+def fun_l16_n858()
+ fun_l17_n790
+end
+
+def fun_l16_n859()
+ fun_l17_n25
+end
+
+def fun_l16_n860()
+ fun_l17_n926
+end
+
+def fun_l16_n861()
+ fun_l17_n474
+end
+
+def fun_l16_n862()
+ fun_l17_n888
+end
+
+def fun_l16_n863()
+ fun_l17_n110
+end
+
+def fun_l16_n864()
+ fun_l17_n561
+end
+
+def fun_l16_n865()
+ fun_l17_n59
+end
+
+def fun_l16_n866()
+ fun_l17_n611
+end
+
+def fun_l16_n867()
+ fun_l17_n436
+end
+
+def fun_l16_n868()
+ fun_l17_n851
+end
+
+def fun_l16_n869()
+ fun_l17_n714
+end
+
+def fun_l16_n870()
+ fun_l17_n423
+end
+
+def fun_l16_n871()
+ fun_l17_n884
+end
+
+def fun_l16_n872()
+ fun_l17_n230
+end
+
+def fun_l16_n873()
+ fun_l17_n988
+end
+
+def fun_l16_n874()
+ fun_l17_n763
+end
+
+def fun_l16_n875()
+ fun_l17_n929
+end
+
+def fun_l16_n876()
+ fun_l17_n521
+end
+
+def fun_l16_n877()
+ fun_l17_n262
+end
+
+def fun_l16_n878()
+ fun_l17_n774
+end
+
+def fun_l16_n879()
+ fun_l17_n358
+end
+
+def fun_l16_n880()
+ fun_l17_n861
+end
+
+def fun_l16_n881()
+ fun_l17_n984
+end
+
+def fun_l16_n882()
+ fun_l17_n272
+end
+
+def fun_l16_n883()
+ fun_l17_n293
+end
+
+def fun_l16_n884()
+ fun_l17_n525
+end
+
+def fun_l16_n885()
+ fun_l17_n226
+end
+
+def fun_l16_n886()
+ fun_l17_n941
+end
+
+def fun_l16_n887()
+ fun_l17_n671
+end
+
+def fun_l16_n888()
+ fun_l17_n960
+end
+
+def fun_l16_n889()
+ fun_l17_n218
+end
+
+def fun_l16_n890()
+ fun_l17_n475
+end
+
+def fun_l16_n891()
+ fun_l17_n300
+end
+
+def fun_l16_n892()
+ fun_l17_n908
+end
+
+def fun_l16_n893()
+ fun_l17_n739
+end
+
+def fun_l16_n894()
+ fun_l17_n878
+end
+
+def fun_l16_n895()
+ fun_l17_n906
+end
+
+def fun_l16_n896()
+ fun_l17_n944
+end
+
+def fun_l16_n897()
+ fun_l17_n302
+end
+
+def fun_l16_n898()
+ fun_l17_n486
+end
+
+def fun_l16_n899()
+ fun_l17_n135
+end
+
+def fun_l16_n900()
+ fun_l17_n470
+end
+
+def fun_l16_n901()
+ fun_l17_n895
+end
+
+def fun_l16_n902()
+ fun_l17_n333
+end
+
+def fun_l16_n903()
+ fun_l17_n310
+end
+
+def fun_l16_n904()
+ fun_l17_n229
+end
+
+def fun_l16_n905()
+ fun_l17_n315
+end
+
+def fun_l16_n906()
+ fun_l17_n333
+end
+
+def fun_l16_n907()
+ fun_l17_n563
+end
+
+def fun_l16_n908()
+ fun_l17_n558
+end
+
+def fun_l16_n909()
+ fun_l17_n580
+end
+
+def fun_l16_n910()
+ fun_l17_n916
+end
+
+def fun_l16_n911()
+ fun_l17_n378
+end
+
+def fun_l16_n912()
+ fun_l17_n882
+end
+
+def fun_l16_n913()
+ fun_l17_n28
+end
+
+def fun_l16_n914()
+ fun_l17_n767
+end
+
+def fun_l16_n915()
+ fun_l17_n105
+end
+
+def fun_l16_n916()
+ fun_l17_n463
+end
+
+def fun_l16_n917()
+ fun_l17_n92
+end
+
+def fun_l16_n918()
+ fun_l17_n722
+end
+
+def fun_l16_n919()
+ fun_l17_n403
+end
+
+def fun_l16_n920()
+ fun_l17_n771
+end
+
+def fun_l16_n921()
+ fun_l17_n818
+end
+
+def fun_l16_n922()
+ fun_l17_n214
+end
+
+def fun_l16_n923()
+ fun_l17_n167
+end
+
+def fun_l16_n924()
+ fun_l17_n189
+end
+
+def fun_l16_n925()
+ fun_l17_n401
+end
+
+def fun_l16_n926()
+ fun_l17_n377
+end
+
+def fun_l16_n927()
+ fun_l17_n980
+end
+
+def fun_l16_n928()
+ fun_l17_n476
+end
+
+def fun_l16_n929()
+ fun_l17_n321
+end
+
+def fun_l16_n930()
+ fun_l17_n485
+end
+
+def fun_l16_n931()
+ fun_l17_n902
+end
+
+def fun_l16_n932()
+ fun_l17_n269
+end
+
+def fun_l16_n933()
+ fun_l17_n806
+end
+
+def fun_l16_n934()
+ fun_l17_n952
+end
+
+def fun_l16_n935()
+ fun_l17_n401
+end
+
+def fun_l16_n936()
+ fun_l17_n416
+end
+
+def fun_l16_n937()
+ fun_l17_n739
+end
+
+def fun_l16_n938()
+ fun_l17_n47
+end
+
+def fun_l16_n939()
+ fun_l17_n556
+end
+
+def fun_l16_n940()
+ fun_l17_n426
+end
+
+def fun_l16_n941()
+ fun_l17_n474
+end
+
+def fun_l16_n942()
+ fun_l17_n393
+end
+
+def fun_l16_n943()
+ fun_l17_n492
+end
+
+def fun_l16_n944()
+ fun_l17_n528
+end
+
+def fun_l16_n945()
+ fun_l17_n66
+end
+
+def fun_l16_n946()
+ fun_l17_n587
+end
+
+def fun_l16_n947()
+ fun_l17_n116
+end
+
+def fun_l16_n948()
+ fun_l17_n205
+end
+
+def fun_l16_n949()
+ fun_l17_n958
+end
+
+def fun_l16_n950()
+ fun_l17_n264
+end
+
+def fun_l16_n951()
+ fun_l17_n78
+end
+
+def fun_l16_n952()
+ fun_l17_n990
+end
+
+def fun_l16_n953()
+ fun_l17_n154
+end
+
+def fun_l16_n954()
+ fun_l17_n213
+end
+
+def fun_l16_n955()
+ fun_l17_n979
+end
+
+def fun_l16_n956()
+ fun_l17_n632
+end
+
+def fun_l16_n957()
+ fun_l17_n292
+end
+
+def fun_l16_n958()
+ fun_l17_n719
+end
+
+def fun_l16_n959()
+ fun_l17_n320
+end
+
+def fun_l16_n960()
+ fun_l17_n448
+end
+
+def fun_l16_n961()
+ fun_l17_n532
+end
+
+def fun_l16_n962()
+ fun_l17_n662
+end
+
+def fun_l16_n963()
+ fun_l17_n423
+end
+
+def fun_l16_n964()
+ fun_l17_n193
+end
+
+def fun_l16_n965()
+ fun_l17_n475
+end
+
+def fun_l16_n966()
+ fun_l17_n168
+end
+
+def fun_l16_n967()
+ fun_l17_n92
+end
+
+def fun_l16_n968()
+ fun_l17_n925
+end
+
+def fun_l16_n969()
+ fun_l17_n138
+end
+
+def fun_l16_n970()
+ fun_l17_n673
+end
+
+def fun_l16_n971()
+ fun_l17_n697
+end
+
+def fun_l16_n972()
+ fun_l17_n438
+end
+
+def fun_l16_n973()
+ fun_l17_n114
+end
+
+def fun_l16_n974()
+ fun_l17_n40
+end
+
+def fun_l16_n975()
+ fun_l17_n344
+end
+
+def fun_l16_n976()
+ fun_l17_n568
+end
+
+def fun_l16_n977()
+ fun_l17_n350
+end
+
+def fun_l16_n978()
+ fun_l17_n873
+end
+
+def fun_l16_n979()
+ fun_l17_n719
+end
+
+def fun_l16_n980()
+ fun_l17_n631
+end
+
+def fun_l16_n981()
+ fun_l17_n848
+end
+
+def fun_l16_n982()
+ fun_l17_n912
+end
+
+def fun_l16_n983()
+ fun_l17_n872
+end
+
+def fun_l16_n984()
+ fun_l17_n290
+end
+
+def fun_l16_n985()
+ fun_l17_n416
+end
+
+def fun_l16_n986()
+ fun_l17_n552
+end
+
+def fun_l16_n987()
+ fun_l17_n458
+end
+
+def fun_l16_n988()
+ fun_l17_n808
+end
+
+def fun_l16_n989()
+ fun_l17_n953
+end
+
+def fun_l16_n990()
+ fun_l17_n136
+end
+
+def fun_l16_n991()
+ fun_l17_n798
+end
+
+def fun_l16_n992()
+ fun_l17_n419
+end
+
+def fun_l16_n993()
+ fun_l17_n293
+end
+
+def fun_l16_n994()
+ fun_l17_n663
+end
+
+def fun_l16_n995()
+ fun_l17_n533
+end
+
+def fun_l16_n996()
+ fun_l17_n625
+end
+
+def fun_l16_n997()
+ fun_l17_n215
+end
+
+def fun_l16_n998()
+ fun_l17_n954
+end
+
+def fun_l16_n999()
+ fun_l17_n797
+end
+
+def fun_l17_n0()
+ fun_l18_n287
+end
+
+def fun_l17_n1()
+ fun_l18_n242
+end
+
+def fun_l17_n2()
+ fun_l18_n595
+end
+
+def fun_l17_n3()
+ fun_l18_n801
+end
+
+def fun_l17_n4()
+ fun_l18_n367
+end
+
+def fun_l17_n5()
+ fun_l18_n21
+end
+
+def fun_l17_n6()
+ fun_l18_n439
+end
+
+def fun_l17_n7()
+ fun_l18_n96
+end
+
+def fun_l17_n8()
+ fun_l18_n500
+end
+
+def fun_l17_n9()
+ fun_l18_n332
+end
+
+def fun_l17_n10()
+ fun_l18_n374
+end
+
+def fun_l17_n11()
+ fun_l18_n338
+end
+
+def fun_l17_n12()
+ fun_l18_n737
+end
+
+def fun_l17_n13()
+ fun_l18_n437
+end
+
+def fun_l17_n14()
+ fun_l18_n442
+end
+
+def fun_l17_n15()
+ fun_l18_n309
+end
+
+def fun_l17_n16()
+ fun_l18_n173
+end
+
+def fun_l17_n17()
+ fun_l18_n615
+end
+
+def fun_l17_n18()
+ fun_l18_n881
+end
+
+def fun_l17_n19()
+ fun_l18_n629
+end
+
+def fun_l17_n20()
+ fun_l18_n304
+end
+
+def fun_l17_n21()
+ fun_l18_n788
+end
+
+def fun_l17_n22()
+ fun_l18_n425
+end
+
+def fun_l17_n23()
+ fun_l18_n376
+end
+
+def fun_l17_n24()
+ fun_l18_n353
+end
+
+def fun_l17_n25()
+ fun_l18_n273
+end
+
+def fun_l17_n26()
+ fun_l18_n337
+end
+
+def fun_l17_n27()
+ fun_l18_n588
+end
+
+def fun_l17_n28()
+ fun_l18_n64
+end
+
+def fun_l17_n29()
+ fun_l18_n651
+end
+
+def fun_l17_n30()
+ fun_l18_n91
+end
+
+def fun_l17_n31()
+ fun_l18_n392
+end
+
+def fun_l17_n32()
+ fun_l18_n65
+end
+
+def fun_l17_n33()
+ fun_l18_n166
+end
+
+def fun_l17_n34()
+ fun_l18_n917
+end
+
+def fun_l17_n35()
+ fun_l18_n217
+end
+
+def fun_l17_n36()
+ fun_l18_n416
+end
+
+def fun_l17_n37()
+ fun_l18_n977
+end
+
+def fun_l17_n38()
+ fun_l18_n76
+end
+
+def fun_l17_n39()
+ fun_l18_n322
+end
+
+def fun_l17_n40()
+ fun_l18_n253
+end
+
+def fun_l17_n41()
+ fun_l18_n192
+end
+
+def fun_l17_n42()
+ fun_l18_n883
+end
+
+def fun_l17_n43()
+ fun_l18_n132
+end
+
+def fun_l17_n44()
+ fun_l18_n480
+end
+
+def fun_l17_n45()
+ fun_l18_n36
+end
+
+def fun_l17_n46()
+ fun_l18_n142
+end
+
+def fun_l17_n47()
+ fun_l18_n172
+end
+
+def fun_l17_n48()
+ fun_l18_n339
+end
+
+def fun_l17_n49()
+ fun_l18_n664
+end
+
+def fun_l17_n50()
+ fun_l18_n482
+end
+
+def fun_l17_n51()
+ fun_l18_n809
+end
+
+def fun_l17_n52()
+ fun_l18_n525
+end
+
+def fun_l17_n53()
+ fun_l18_n50
+end
+
+def fun_l17_n54()
+ fun_l18_n977
+end
+
+def fun_l17_n55()
+ fun_l18_n730
+end
+
+def fun_l17_n56()
+ fun_l18_n565
+end
+
+def fun_l17_n57()
+ fun_l18_n997
+end
+
+def fun_l17_n58()
+ fun_l18_n811
+end
+
+def fun_l17_n59()
+ fun_l18_n898
+end
+
+def fun_l17_n60()
+ fun_l18_n627
+end
+
+def fun_l17_n61()
+ fun_l18_n539
+end
+
+def fun_l17_n62()
+ fun_l18_n877
+end
+
+def fun_l17_n63()
+ fun_l18_n428
+end
+
+def fun_l17_n64()
+ fun_l18_n779
+end
+
+def fun_l17_n65()
+ fun_l18_n14
+end
+
+def fun_l17_n66()
+ fun_l18_n202
+end
+
+def fun_l17_n67()
+ fun_l18_n23
+end
+
+def fun_l17_n68()
+ fun_l18_n861
+end
+
+def fun_l17_n69()
+ fun_l18_n356
+end
+
+def fun_l17_n70()
+ fun_l18_n997
+end
+
+def fun_l17_n71()
+ fun_l18_n130
+end
+
+def fun_l17_n72()
+ fun_l18_n462
+end
+
+def fun_l17_n73()
+ fun_l18_n590
+end
+
+def fun_l17_n74()
+ fun_l18_n544
+end
+
+def fun_l17_n75()
+ fun_l18_n571
+end
+
+def fun_l17_n76()
+ fun_l18_n336
+end
+
+def fun_l17_n77()
+ fun_l18_n154
+end
+
+def fun_l17_n78()
+ fun_l18_n18
+end
+
+def fun_l17_n79()
+ fun_l18_n911
+end
+
+def fun_l17_n80()
+ fun_l18_n980
+end
+
+def fun_l17_n81()
+ fun_l18_n156
+end
+
+def fun_l17_n82()
+ fun_l18_n487
+end
+
+def fun_l17_n83()
+ fun_l18_n292
+end
+
+def fun_l17_n84()
+ fun_l18_n709
+end
+
+def fun_l17_n85()
+ fun_l18_n557
+end
+
+def fun_l17_n86()
+ fun_l18_n910
+end
+
+def fun_l17_n87()
+ fun_l18_n121
+end
+
+def fun_l17_n88()
+ fun_l18_n706
+end
+
+def fun_l17_n89()
+ fun_l18_n949
+end
+
+def fun_l17_n90()
+ fun_l18_n529
+end
+
+def fun_l17_n91()
+ fun_l18_n778
+end
+
+def fun_l17_n92()
+ fun_l18_n682
+end
+
+def fun_l17_n93()
+ fun_l18_n743
+end
+
+def fun_l17_n94()
+ fun_l18_n714
+end
+
+def fun_l17_n95()
+ fun_l18_n749
+end
+
+def fun_l17_n96()
+ fun_l18_n453
+end
+
+def fun_l17_n97()
+ fun_l18_n248
+end
+
+def fun_l17_n98()
+ fun_l18_n315
+end
+
+def fun_l17_n99()
+ fun_l18_n534
+end
+
+def fun_l17_n100()
+ fun_l18_n391
+end
+
+def fun_l17_n101()
+ fun_l18_n515
+end
+
+def fun_l17_n102()
+ fun_l18_n495
+end
+
+def fun_l17_n103()
+ fun_l18_n776
+end
+
+def fun_l17_n104()
+ fun_l18_n957
+end
+
+def fun_l17_n105()
+ fun_l18_n982
+end
+
+def fun_l17_n106()
+ fun_l18_n401
+end
+
+def fun_l17_n107()
+ fun_l18_n230
+end
+
+def fun_l17_n108()
+ fun_l18_n13
+end
+
+def fun_l17_n109()
+ fun_l18_n318
+end
+
+def fun_l17_n110()
+ fun_l18_n275
+end
+
+def fun_l17_n111()
+ fun_l18_n155
+end
+
+def fun_l17_n112()
+ fun_l18_n86
+end
+
+def fun_l17_n113()
+ fun_l18_n573
+end
+
+def fun_l17_n114()
+ fun_l18_n124
+end
+
+def fun_l17_n115()
+ fun_l18_n694
+end
+
+def fun_l17_n116()
+ fun_l18_n929
+end
+
+def fun_l17_n117()
+ fun_l18_n177
+end
+
+def fun_l17_n118()
+ fun_l18_n510
+end
+
+def fun_l17_n119()
+ fun_l18_n143
+end
+
+def fun_l17_n120()
+ fun_l18_n358
+end
+
+def fun_l17_n121()
+ fun_l18_n739
+end
+
+def fun_l17_n122()
+ fun_l18_n463
+end
+
+def fun_l17_n123()
+ fun_l18_n343
+end
+
+def fun_l17_n124()
+ fun_l18_n714
+end
+
+def fun_l17_n125()
+ fun_l18_n53
+end
+
+def fun_l17_n126()
+ fun_l18_n375
+end
+
+def fun_l17_n127()
+ fun_l18_n870
+end
+
+def fun_l17_n128()
+ fun_l18_n555
+end
+
+def fun_l17_n129()
+ fun_l18_n773
+end
+
+def fun_l17_n130()
+ fun_l18_n309
+end
+
+def fun_l17_n131()
+ fun_l18_n50
+end
+
+def fun_l17_n132()
+ fun_l18_n408
+end
+
+def fun_l17_n133()
+ fun_l18_n339
+end
+
+def fun_l17_n134()
+ fun_l18_n952
+end
+
+def fun_l17_n135()
+ fun_l18_n599
+end
+
+def fun_l17_n136()
+ fun_l18_n280
+end
+
+def fun_l17_n137()
+ fun_l18_n922
+end
+
+def fun_l17_n138()
+ fun_l18_n132
+end
+
+def fun_l17_n139()
+ fun_l18_n224
+end
+
+def fun_l17_n140()
+ fun_l18_n841
+end
+
+def fun_l17_n141()
+ fun_l18_n84
+end
+
+def fun_l17_n142()
+ fun_l18_n697
+end
+
+def fun_l17_n143()
+ fun_l18_n60
+end
+
+def fun_l17_n144()
+ fun_l18_n479
+end
+
+def fun_l17_n145()
+ fun_l18_n671
+end
+
+def fun_l17_n146()
+ fun_l18_n422
+end
+
+def fun_l17_n147()
+ fun_l18_n255
+end
+
+def fun_l17_n148()
+ fun_l18_n615
+end
+
+def fun_l17_n149()
+ fun_l18_n878
+end
+
+def fun_l17_n150()
+ fun_l18_n402
+end
+
+def fun_l17_n151()
+ fun_l18_n134
+end
+
+def fun_l17_n152()
+ fun_l18_n493
+end
+
+def fun_l17_n153()
+ fun_l18_n347
+end
+
+def fun_l17_n154()
+ fun_l18_n679
+end
+
+def fun_l17_n155()
+ fun_l18_n477
+end
+
+def fun_l17_n156()
+ fun_l18_n56
+end
+
+def fun_l17_n157()
+ fun_l18_n43
+end
+
+def fun_l17_n158()
+ fun_l18_n928
+end
+
+def fun_l17_n159()
+ fun_l18_n190
+end
+
+def fun_l17_n160()
+ fun_l18_n402
+end
+
+def fun_l17_n161()
+ fun_l18_n894
+end
+
+def fun_l17_n162()
+ fun_l18_n869
+end
+
+def fun_l17_n163()
+ fun_l18_n36
+end
+
+def fun_l17_n164()
+ fun_l18_n635
+end
+
+def fun_l17_n165()
+ fun_l18_n414
+end
+
+def fun_l17_n166()
+ fun_l18_n744
+end
+
+def fun_l17_n167()
+ fun_l18_n87
+end
+
+def fun_l17_n168()
+ fun_l18_n531
+end
+
+def fun_l17_n169()
+ fun_l18_n923
+end
+
+def fun_l17_n170()
+ fun_l18_n815
+end
+
+def fun_l17_n171()
+ fun_l18_n27
+end
+
+def fun_l17_n172()
+ fun_l18_n194
+end
+
+def fun_l17_n173()
+ fun_l18_n456
+end
+
+def fun_l17_n174()
+ fun_l18_n275
+end
+
+def fun_l17_n175()
+ fun_l18_n48
+end
+
+def fun_l17_n176()
+ fun_l18_n230
+end
+
+def fun_l17_n177()
+ fun_l18_n806
+end
+
+def fun_l17_n178()
+ fun_l18_n851
+end
+
+def fun_l17_n179()
+ fun_l18_n76
+end
+
+def fun_l17_n180()
+ fun_l18_n925
+end
+
+def fun_l17_n181()
+ fun_l18_n680
+end
+
+def fun_l17_n182()
+ fun_l18_n547
+end
+
+def fun_l17_n183()
+ fun_l18_n439
+end
+
+def fun_l17_n184()
+ fun_l18_n642
+end
+
+def fun_l17_n185()
+ fun_l18_n249
+end
+
+def fun_l17_n186()
+ fun_l18_n92
+end
+
+def fun_l17_n187()
+ fun_l18_n727
+end
+
+def fun_l17_n188()
+ fun_l18_n358
+end
+
+def fun_l17_n189()
+ fun_l18_n874
+end
+
+def fun_l17_n190()
+ fun_l18_n357
+end
+
+def fun_l17_n191()
+ fun_l18_n773
+end
+
+def fun_l17_n192()
+ fun_l18_n487
+end
+
+def fun_l17_n193()
+ fun_l18_n985
+end
+
+def fun_l17_n194()
+ fun_l18_n771
+end
+
+def fun_l17_n195()
+ fun_l18_n918
+end
+
+def fun_l17_n196()
+ fun_l18_n768
+end
+
+def fun_l17_n197()
+ fun_l18_n275
+end
+
+def fun_l17_n198()
+ fun_l18_n72
+end
+
+def fun_l17_n199()
+ fun_l18_n288
+end
+
+def fun_l17_n200()
+ fun_l18_n187
+end
+
+def fun_l17_n201()
+ fun_l18_n905
+end
+
+def fun_l17_n202()
+ fun_l18_n61
+end
+
+def fun_l17_n203()
+ fun_l18_n845
+end
+
+def fun_l17_n204()
+ fun_l18_n390
+end
+
+def fun_l17_n205()
+ fun_l18_n501
+end
+
+def fun_l17_n206()
+ fun_l18_n820
+end
+
+def fun_l17_n207()
+ fun_l18_n889
+end
+
+def fun_l17_n208()
+ fun_l18_n746
+end
+
+def fun_l17_n209()
+ fun_l18_n640
+end
+
+def fun_l17_n210()
+ fun_l18_n974
+end
+
+def fun_l17_n211()
+ fun_l18_n128
+end
+
+def fun_l17_n212()
+ fun_l18_n227
+end
+
+def fun_l17_n213()
+ fun_l18_n646
+end
+
+def fun_l17_n214()
+ fun_l18_n55
+end
+
+def fun_l17_n215()
+ fun_l18_n989
+end
+
+def fun_l17_n216()
+ fun_l18_n417
+end
+
+def fun_l17_n217()
+ fun_l18_n85
+end
+
+def fun_l17_n218()
+ fun_l18_n477
+end
+
+def fun_l17_n219()
+ fun_l18_n442
+end
+
+def fun_l17_n220()
+ fun_l18_n804
+end
+
+def fun_l17_n221()
+ fun_l18_n135
+end
+
+def fun_l17_n222()
+ fun_l18_n347
+end
+
+def fun_l17_n223()
+ fun_l18_n34
+end
+
+def fun_l17_n224()
+ fun_l18_n534
+end
+
+def fun_l17_n225()
+ fun_l18_n789
+end
+
+def fun_l17_n226()
+ fun_l18_n938
+end
+
+def fun_l17_n227()
+ fun_l18_n777
+end
+
+def fun_l17_n228()
+ fun_l18_n247
+end
+
+def fun_l17_n229()
+ fun_l18_n935
+end
+
+def fun_l17_n230()
+ fun_l18_n406
+end
+
+def fun_l17_n231()
+ fun_l18_n0
+end
+
+def fun_l17_n232()
+ fun_l18_n530
+end
+
+def fun_l17_n233()
+ fun_l18_n994
+end
+
+def fun_l17_n234()
+ fun_l18_n818
+end
+
+def fun_l17_n235()
+ fun_l18_n941
+end
+
+def fun_l17_n236()
+ fun_l18_n687
+end
+
+def fun_l17_n237()
+ fun_l18_n372
+end
+
+def fun_l17_n238()
+ fun_l18_n344
+end
+
+def fun_l17_n239()
+ fun_l18_n336
+end
+
+def fun_l17_n240()
+ fun_l18_n870
+end
+
+def fun_l17_n241()
+ fun_l18_n694
+end
+
+def fun_l17_n242()
+ fun_l18_n233
+end
+
+def fun_l17_n243()
+ fun_l18_n301
+end
+
+def fun_l17_n244()
+ fun_l18_n425
+end
+
+def fun_l17_n245()
+ fun_l18_n334
+end
+
+def fun_l17_n246()
+ fun_l18_n848
+end
+
+def fun_l17_n247()
+ fun_l18_n27
+end
+
+def fun_l17_n248()
+ fun_l18_n964
+end
+
+def fun_l17_n249()
+ fun_l18_n953
+end
+
+def fun_l17_n250()
+ fun_l18_n4
+end
+
+def fun_l17_n251()
+ fun_l18_n504
+end
+
+def fun_l17_n252()
+ fun_l18_n165
+end
+
+def fun_l17_n253()
+ fun_l18_n401
+end
+
+def fun_l17_n254()
+ fun_l18_n267
+end
+
+def fun_l17_n255()
+ fun_l18_n966
+end
+
+def fun_l17_n256()
+ fun_l18_n854
+end
+
+def fun_l17_n257()
+ fun_l18_n927
+end
+
+def fun_l17_n258()
+ fun_l18_n476
+end
+
+def fun_l17_n259()
+ fun_l18_n274
+end
+
+def fun_l17_n260()
+ fun_l18_n711
+end
+
+def fun_l17_n261()
+ fun_l18_n96
+end
+
+def fun_l17_n262()
+ fun_l18_n901
+end
+
+def fun_l17_n263()
+ fun_l18_n601
+end
+
+def fun_l17_n264()
+ fun_l18_n495
+end
+
+def fun_l17_n265()
+ fun_l18_n672
+end
+
+def fun_l17_n266()
+ fun_l18_n946
+end
+
+def fun_l17_n267()
+ fun_l18_n91
+end
+
+def fun_l17_n268()
+ fun_l18_n547
+end
+
+def fun_l17_n269()
+ fun_l18_n977
+end
+
+def fun_l17_n270()
+ fun_l18_n113
+end
+
+def fun_l17_n271()
+ fun_l18_n818
+end
+
+def fun_l17_n272()
+ fun_l18_n370
+end
+
+def fun_l17_n273()
+ fun_l18_n940
+end
+
+def fun_l17_n274()
+ fun_l18_n892
+end
+
+def fun_l17_n275()
+ fun_l18_n501
+end
+
+def fun_l17_n276()
+ fun_l18_n252
+end
+
+def fun_l17_n277()
+ fun_l18_n720
+end
+
+def fun_l17_n278()
+ fun_l18_n12
+end
+
+def fun_l17_n279()
+ fun_l18_n318
+end
+
+def fun_l17_n280()
+ fun_l18_n536
+end
+
+def fun_l17_n281()
+ fun_l18_n344
+end
+
+def fun_l17_n282()
+ fun_l18_n613
+end
+
+def fun_l17_n283()
+ fun_l18_n198
+end
+
+def fun_l17_n284()
+ fun_l18_n153
+end
+
+def fun_l17_n285()
+ fun_l18_n118
+end
+
+def fun_l17_n286()
+ fun_l18_n694
+end
+
+def fun_l17_n287()
+ fun_l18_n402
+end
+
+def fun_l17_n288()
+ fun_l18_n609
+end
+
+def fun_l17_n289()
+ fun_l18_n334
+end
+
+def fun_l17_n290()
+ fun_l18_n266
+end
+
+def fun_l17_n291()
+ fun_l18_n235
+end
+
+def fun_l17_n292()
+ fun_l18_n942
+end
+
+def fun_l17_n293()
+ fun_l18_n165
+end
+
+def fun_l17_n294()
+ fun_l18_n443
+end
+
+def fun_l17_n295()
+ fun_l18_n837
+end
+
+def fun_l17_n296()
+ fun_l18_n329
+end
+
+def fun_l17_n297()
+ fun_l18_n64
+end
+
+def fun_l17_n298()
+ fun_l18_n469
+end
+
+def fun_l17_n299()
+ fun_l18_n557
+end
+
+def fun_l17_n300()
+ fun_l18_n158
+end
+
+def fun_l17_n301()
+ fun_l18_n250
+end
+
+def fun_l17_n302()
+ fun_l18_n733
+end
+
+def fun_l17_n303()
+ fun_l18_n491
+end
+
+def fun_l17_n304()
+ fun_l18_n966
+end
+
+def fun_l17_n305()
+ fun_l18_n210
+end
+
+def fun_l17_n306()
+ fun_l18_n118
+end
+
+def fun_l17_n307()
+ fun_l18_n394
+end
+
+def fun_l17_n308()
+ fun_l18_n421
+end
+
+def fun_l17_n309()
+ fun_l18_n559
+end
+
+def fun_l17_n310()
+ fun_l18_n386
+end
+
+def fun_l17_n311()
+ fun_l18_n350
+end
+
+def fun_l17_n312()
+ fun_l18_n527
+end
+
+def fun_l17_n313()
+ fun_l18_n539
+end
+
+def fun_l17_n314()
+ fun_l18_n468
+end
+
+def fun_l17_n315()
+ fun_l18_n533
+end
+
+def fun_l17_n316()
+ fun_l18_n607
+end
+
+def fun_l17_n317()
+ fun_l18_n410
+end
+
+def fun_l17_n318()
+ fun_l18_n391
+end
+
+def fun_l17_n319()
+ fun_l18_n709
+end
+
+def fun_l17_n320()
+ fun_l18_n131
+end
+
+def fun_l17_n321()
+ fun_l18_n401
+end
+
+def fun_l17_n322()
+ fun_l18_n249
+end
+
+def fun_l17_n323()
+ fun_l18_n459
+end
+
+def fun_l17_n324()
+ fun_l18_n111
+end
+
+def fun_l17_n325()
+ fun_l18_n539
+end
+
+def fun_l17_n326()
+ fun_l18_n493
+end
+
+def fun_l17_n327()
+ fun_l18_n415
+end
+
+def fun_l17_n328()
+ fun_l18_n334
+end
+
+def fun_l17_n329()
+ fun_l18_n784
+end
+
+def fun_l17_n330()
+ fun_l18_n45
+end
+
+def fun_l17_n331()
+ fun_l18_n820
+end
+
+def fun_l17_n332()
+ fun_l18_n892
+end
+
+def fun_l17_n333()
+ fun_l18_n598
+end
+
+def fun_l17_n334()
+ fun_l18_n800
+end
+
+def fun_l17_n335()
+ fun_l18_n384
+end
+
+def fun_l17_n336()
+ fun_l18_n364
+end
+
+def fun_l17_n337()
+ fun_l18_n857
+end
+
+def fun_l17_n338()
+ fun_l18_n617
+end
+
+def fun_l17_n339()
+ fun_l18_n669
+end
+
+def fun_l17_n340()
+ fun_l18_n332
+end
+
+def fun_l17_n341()
+ fun_l18_n104
+end
+
+def fun_l17_n342()
+ fun_l18_n716
+end
+
+def fun_l17_n343()
+ fun_l18_n836
+end
+
+def fun_l17_n344()
+ fun_l18_n31
+end
+
+def fun_l17_n345()
+ fun_l18_n345
+end
+
+def fun_l17_n346()
+ fun_l18_n988
+end
+
+def fun_l17_n347()
+ fun_l18_n63
+end
+
+def fun_l17_n348()
+ fun_l18_n637
+end
+
+def fun_l17_n349()
+ fun_l18_n767
+end
+
+def fun_l17_n350()
+ fun_l18_n45
+end
+
+def fun_l17_n351()
+ fun_l18_n332
+end
+
+def fun_l17_n352()
+ fun_l18_n622
+end
+
+def fun_l17_n353()
+ fun_l18_n879
+end
+
+def fun_l17_n354()
+ fun_l18_n499
+end
+
+def fun_l17_n355()
+ fun_l18_n446
+end
+
+def fun_l17_n356()
+ fun_l18_n355
+end
+
+def fun_l17_n357()
+ fun_l18_n40
+end
+
+def fun_l17_n358()
+ fun_l18_n602
+end
+
+def fun_l17_n359()
+ fun_l18_n162
+end
+
+def fun_l17_n360()
+ fun_l18_n415
+end
+
+def fun_l17_n361()
+ fun_l18_n966
+end
+
+def fun_l17_n362()
+ fun_l18_n801
+end
+
+def fun_l17_n363()
+ fun_l18_n242
+end
+
+def fun_l17_n364()
+ fun_l18_n563
+end
+
+def fun_l17_n365()
+ fun_l18_n150
+end
+
+def fun_l17_n366()
+ fun_l18_n667
+end
+
+def fun_l17_n367()
+ fun_l18_n997
+end
+
+def fun_l17_n368()
+ fun_l18_n550
+end
+
+def fun_l17_n369()
+ fun_l18_n313
+end
+
+def fun_l17_n370()
+ fun_l18_n434
+end
+
+def fun_l17_n371()
+ fun_l18_n254
+end
+
+def fun_l17_n372()
+ fun_l18_n138
+end
+
+def fun_l17_n373()
+ fun_l18_n371
+end
+
+def fun_l17_n374()
+ fun_l18_n135
+end
+
+def fun_l17_n375()
+ fun_l18_n405
+end
+
+def fun_l17_n376()
+ fun_l18_n501
+end
+
+def fun_l17_n377()
+ fun_l18_n565
+end
+
+def fun_l17_n378()
+ fun_l18_n769
+end
+
+def fun_l17_n379()
+ fun_l18_n20
+end
+
+def fun_l17_n380()
+ fun_l18_n917
+end
+
+def fun_l17_n381()
+ fun_l18_n983
+end
+
+def fun_l17_n382()
+ fun_l18_n783
+end
+
+def fun_l17_n383()
+ fun_l18_n849
+end
+
+def fun_l17_n384()
+ fun_l18_n21
+end
+
+def fun_l17_n385()
+ fun_l18_n806
+end
+
+def fun_l17_n386()
+ fun_l18_n440
+end
+
+def fun_l17_n387()
+ fun_l18_n810
+end
+
+def fun_l17_n388()
+ fun_l18_n744
+end
+
+def fun_l17_n389()
+ fun_l18_n184
+end
+
+def fun_l17_n390()
+ fun_l18_n775
+end
+
+def fun_l17_n391()
+ fun_l18_n704
+end
+
+def fun_l17_n392()
+ fun_l18_n413
+end
+
+def fun_l17_n393()
+ fun_l18_n329
+end
+
+def fun_l17_n394()
+ fun_l18_n874
+end
+
+def fun_l17_n395()
+ fun_l18_n756
+end
+
+def fun_l17_n396()
+ fun_l18_n502
+end
+
+def fun_l17_n397()
+ fun_l18_n675
+end
+
+def fun_l17_n398()
+ fun_l18_n504
+end
+
+def fun_l17_n399()
+ fun_l18_n117
+end
+
+def fun_l17_n400()
+ fun_l18_n203
+end
+
+def fun_l17_n401()
+ fun_l18_n672
+end
+
+def fun_l17_n402()
+ fun_l18_n971
+end
+
+def fun_l17_n403()
+ fun_l18_n742
+end
+
+def fun_l17_n404()
+ fun_l18_n817
+end
+
+def fun_l17_n405()
+ fun_l18_n981
+end
+
+def fun_l17_n406()
+ fun_l18_n791
+end
+
+def fun_l17_n407()
+ fun_l18_n660
+end
+
+def fun_l17_n408()
+ fun_l18_n988
+end
+
+def fun_l17_n409()
+ fun_l18_n875
+end
+
+def fun_l17_n410()
+ fun_l18_n469
+end
+
+def fun_l17_n411()
+ fun_l18_n890
+end
+
+def fun_l17_n412()
+ fun_l18_n739
+end
+
+def fun_l17_n413()
+ fun_l18_n880
+end
+
+def fun_l17_n414()
+ fun_l18_n47
+end
+
+def fun_l17_n415()
+ fun_l18_n474
+end
+
+def fun_l17_n416()
+ fun_l18_n923
+end
+
+def fun_l17_n417()
+ fun_l18_n959
+end
+
+def fun_l17_n418()
+ fun_l18_n748
+end
+
+def fun_l17_n419()
+ fun_l18_n555
+end
+
+def fun_l17_n420()
+ fun_l18_n785
+end
+
+def fun_l17_n421()
+ fun_l18_n49
+end
+
+def fun_l17_n422()
+ fun_l18_n509
+end
+
+def fun_l17_n423()
+ fun_l18_n0
+end
+
+def fun_l17_n424()
+ fun_l18_n388
+end
+
+def fun_l17_n425()
+ fun_l18_n394
+end
+
+def fun_l17_n426()
+ fun_l18_n199
+end
+
+def fun_l17_n427()
+ fun_l18_n554
+end
+
+def fun_l17_n428()
+ fun_l18_n963
+end
+
+def fun_l17_n429()
+ fun_l18_n464
+end
+
+def fun_l17_n430()
+ fun_l18_n941
+end
+
+def fun_l17_n431()
+ fun_l18_n116
+end
+
+def fun_l17_n432()
+ fun_l18_n370
+end
+
+def fun_l17_n433()
+ fun_l18_n848
+end
+
+def fun_l17_n434()
+ fun_l18_n123
+end
+
+def fun_l17_n435()
+ fun_l18_n32
+end
+
+def fun_l17_n436()
+ fun_l18_n285
+end
+
+def fun_l17_n437()
+ fun_l18_n823
+end
+
+def fun_l17_n438()
+ fun_l18_n517
+end
+
+def fun_l17_n439()
+ fun_l18_n292
+end
+
+def fun_l17_n440()
+ fun_l18_n29
+end
+
+def fun_l17_n441()
+ fun_l18_n166
+end
+
+def fun_l17_n442()
+ fun_l18_n282
+end
+
+def fun_l17_n443()
+ fun_l18_n300
+end
+
+def fun_l17_n444()
+ fun_l18_n8
+end
+
+def fun_l17_n445()
+ fun_l18_n458
+end
+
+def fun_l17_n446()
+ fun_l18_n797
+end
+
+def fun_l17_n447()
+ fun_l18_n835
+end
+
+def fun_l17_n448()
+ fun_l18_n535
+end
+
+def fun_l17_n449()
+ fun_l18_n909
+end
+
+def fun_l17_n450()
+ fun_l18_n890
+end
+
+def fun_l17_n451()
+ fun_l18_n706
+end
+
+def fun_l17_n452()
+ fun_l18_n636
+end
+
+def fun_l17_n453()
+ fun_l18_n541
+end
+
+def fun_l17_n454()
+ fun_l18_n332
+end
+
+def fun_l17_n455()
+ fun_l18_n241
+end
+
+def fun_l17_n456()
+ fun_l18_n334
+end
+
+def fun_l17_n457()
+ fun_l18_n212
+end
+
+def fun_l17_n458()
+ fun_l18_n414
+end
+
+def fun_l17_n459()
+ fun_l18_n600
+end
+
+def fun_l17_n460()
+ fun_l18_n237
+end
+
+def fun_l17_n461()
+ fun_l18_n881
+end
+
+def fun_l17_n462()
+ fun_l18_n539
+end
+
+def fun_l17_n463()
+ fun_l18_n262
+end
+
+def fun_l17_n464()
+ fun_l18_n437
+end
+
+def fun_l17_n465()
+ fun_l18_n874
+end
+
+def fun_l17_n466()
+ fun_l18_n418
+end
+
+def fun_l17_n467()
+ fun_l18_n963
+end
+
+def fun_l17_n468()
+ fun_l18_n340
+end
+
+def fun_l17_n469()
+ fun_l18_n708
+end
+
+def fun_l17_n470()
+ fun_l18_n725
+end
+
+def fun_l17_n471()
+ fun_l18_n59
+end
+
+def fun_l17_n472()
+ fun_l18_n309
+end
+
+def fun_l17_n473()
+ fun_l18_n490
+end
+
+def fun_l17_n474()
+ fun_l18_n588
+end
+
+def fun_l17_n475()
+ fun_l18_n623
+end
+
+def fun_l17_n476()
+ fun_l18_n127
+end
+
+def fun_l17_n477()
+ fun_l18_n385
+end
+
+def fun_l17_n478()
+ fun_l18_n381
+end
+
+def fun_l17_n479()
+ fun_l18_n603
+end
+
+def fun_l17_n480()
+ fun_l18_n524
+end
+
+def fun_l17_n481()
+ fun_l18_n829
+end
+
+def fun_l17_n482()
+ fun_l18_n675
+end
+
+def fun_l17_n483()
+ fun_l18_n792
+end
+
+def fun_l17_n484()
+ fun_l18_n438
+end
+
+def fun_l17_n485()
+ fun_l18_n101
+end
+
+def fun_l17_n486()
+ fun_l18_n513
+end
+
+def fun_l17_n487()
+ fun_l18_n44
+end
+
+def fun_l17_n488()
+ fun_l18_n975
+end
+
+def fun_l17_n489()
+ fun_l18_n891
+end
+
+def fun_l17_n490()
+ fun_l18_n650
+end
+
+def fun_l17_n491()
+ fun_l18_n840
+end
+
+def fun_l17_n492()
+ fun_l18_n954
+end
+
+def fun_l17_n493()
+ fun_l18_n326
+end
+
+def fun_l17_n494()
+ fun_l18_n93
+end
+
+def fun_l17_n495()
+ fun_l18_n537
+end
+
+def fun_l17_n496()
+ fun_l18_n871
+end
+
+def fun_l17_n497()
+ fun_l18_n786
+end
+
+def fun_l17_n498()
+ fun_l18_n311
+end
+
+def fun_l17_n499()
+ fun_l18_n494
+end
+
+def fun_l17_n500()
+ fun_l18_n787
+end
+
+def fun_l17_n501()
+ fun_l18_n511
+end
+
+def fun_l17_n502()
+ fun_l18_n342
+end
+
+def fun_l17_n503()
+ fun_l18_n218
+end
+
+def fun_l17_n504()
+ fun_l18_n432
+end
+
+def fun_l17_n505()
+ fun_l18_n637
+end
+
+def fun_l17_n506()
+ fun_l18_n877
+end
+
+def fun_l17_n507()
+ fun_l18_n767
+end
+
+def fun_l17_n508()
+ fun_l18_n854
+end
+
+def fun_l17_n509()
+ fun_l18_n614
+end
+
+def fun_l17_n510()
+ fun_l18_n720
+end
+
+def fun_l17_n511()
+ fun_l18_n556
+end
+
+def fun_l17_n512()
+ fun_l18_n950
+end
+
+def fun_l17_n513()
+ fun_l18_n502
+end
+
+def fun_l17_n514()
+ fun_l18_n841
+end
+
+def fun_l17_n515()
+ fun_l18_n24
+end
+
+def fun_l17_n516()
+ fun_l18_n392
+end
+
+def fun_l17_n517()
+ fun_l18_n99
+end
+
+def fun_l17_n518()
+ fun_l18_n370
+end
+
+def fun_l17_n519()
+ fun_l18_n798
+end
+
+def fun_l17_n520()
+ fun_l18_n405
+end
+
+def fun_l17_n521()
+ fun_l18_n736
+end
+
+def fun_l17_n522()
+ fun_l18_n616
+end
+
+def fun_l17_n523()
+ fun_l18_n701
+end
+
+def fun_l17_n524()
+ fun_l18_n914
+end
+
+def fun_l17_n525()
+ fun_l18_n832
+end
+
+def fun_l17_n526()
+ fun_l18_n234
+end
+
+def fun_l17_n527()
+ fun_l18_n65
+end
+
+def fun_l17_n528()
+ fun_l18_n61
+end
+
+def fun_l17_n529()
+ fun_l18_n639
+end
+
+def fun_l17_n530()
+ fun_l18_n162
+end
+
+def fun_l17_n531()
+ fun_l18_n250
+end
+
+def fun_l17_n532()
+ fun_l18_n567
+end
+
+def fun_l17_n533()
+ fun_l18_n183
+end
+
+def fun_l17_n534()
+ fun_l18_n170
+end
+
+def fun_l17_n535()
+ fun_l18_n663
+end
+
+def fun_l17_n536()
+ fun_l18_n654
+end
+
+def fun_l17_n537()
+ fun_l18_n616
+end
+
+def fun_l17_n538()
+ fun_l18_n836
+end
+
+def fun_l17_n539()
+ fun_l18_n679
+end
+
+def fun_l17_n540()
+ fun_l18_n286
+end
+
+def fun_l17_n541()
+ fun_l18_n35
+end
+
+def fun_l17_n542()
+ fun_l18_n622
+end
+
+def fun_l17_n543()
+ fun_l18_n305
+end
+
+def fun_l17_n544()
+ fun_l18_n665
+end
+
+def fun_l17_n545()
+ fun_l18_n376
+end
+
+def fun_l17_n546()
+ fun_l18_n831
+end
+
+def fun_l17_n547()
+ fun_l18_n917
+end
+
+def fun_l17_n548()
+ fun_l18_n72
+end
+
+def fun_l17_n549()
+ fun_l18_n934
+end
+
+def fun_l17_n550()
+ fun_l18_n450
+end
+
+def fun_l17_n551()
+ fun_l18_n683
+end
+
+def fun_l17_n552()
+ fun_l18_n775
+end
+
+def fun_l17_n553()
+ fun_l18_n418
+end
+
+def fun_l17_n554()
+ fun_l18_n95
+end
+
+def fun_l17_n555()
+ fun_l18_n395
+end
+
+def fun_l17_n556()
+ fun_l18_n398
+end
+
+def fun_l17_n557()
+ fun_l18_n192
+end
+
+def fun_l17_n558()
+ fun_l18_n773
+end
+
+def fun_l17_n559()
+ fun_l18_n924
+end
+
+def fun_l17_n560()
+ fun_l18_n338
+end
+
+def fun_l17_n561()
+ fun_l18_n926
+end
+
+def fun_l17_n562()
+ fun_l18_n153
+end
+
+def fun_l17_n563()
+ fun_l18_n76
+end
+
+def fun_l17_n564()
+ fun_l18_n192
+end
+
+def fun_l17_n565()
+ fun_l18_n605
+end
+
+def fun_l17_n566()
+ fun_l18_n219
+end
+
+def fun_l17_n567()
+ fun_l18_n58
+end
+
+def fun_l17_n568()
+ fun_l18_n245
+end
+
+def fun_l17_n569()
+ fun_l18_n810
+end
+
+def fun_l17_n570()
+ fun_l18_n541
+end
+
+def fun_l17_n571()
+ fun_l18_n37
+end
+
+def fun_l17_n572()
+ fun_l18_n329
+end
+
+def fun_l17_n573()
+ fun_l18_n159
+end
+
+def fun_l17_n574()
+ fun_l18_n926
+end
+
+def fun_l17_n575()
+ fun_l18_n940
+end
+
+def fun_l17_n576()
+ fun_l18_n547
+end
+
+def fun_l17_n577()
+ fun_l18_n694
+end
+
+def fun_l17_n578()
+ fun_l18_n513
+end
+
+def fun_l17_n579()
+ fun_l18_n197
+end
+
+def fun_l17_n580()
+ fun_l18_n97
+end
+
+def fun_l17_n581()
+ fun_l18_n504
+end
+
+def fun_l17_n582()
+ fun_l18_n30
+end
+
+def fun_l17_n583()
+ fun_l18_n972
+end
+
+def fun_l17_n584()
+ fun_l18_n684
+end
+
+def fun_l17_n585()
+ fun_l18_n720
+end
+
+def fun_l17_n586()
+ fun_l18_n999
+end
+
+def fun_l17_n587()
+ fun_l18_n241
+end
+
+def fun_l17_n588()
+ fun_l18_n289
+end
+
+def fun_l17_n589()
+ fun_l18_n168
+end
+
+def fun_l17_n590()
+ fun_l18_n890
+end
+
+def fun_l17_n591()
+ fun_l18_n566
+end
+
+def fun_l17_n592()
+ fun_l18_n722
+end
+
+def fun_l17_n593()
+ fun_l18_n65
+end
+
+def fun_l17_n594()
+ fun_l18_n975
+end
+
+def fun_l17_n595()
+ fun_l18_n68
+end
+
+def fun_l17_n596()
+ fun_l18_n930
+end
+
+def fun_l17_n597()
+ fun_l18_n386
+end
+
+def fun_l17_n598()
+ fun_l18_n755
+end
+
+def fun_l17_n599()
+ fun_l18_n571
+end
+
+def fun_l17_n600()
+ fun_l18_n633
+end
+
+def fun_l17_n601()
+ fun_l18_n823
+end
+
+def fun_l17_n602()
+ fun_l18_n618
+end
+
+def fun_l17_n603()
+ fun_l18_n587
+end
+
+def fun_l17_n604()
+ fun_l18_n730
+end
+
+def fun_l17_n605()
+ fun_l18_n829
+end
+
+def fun_l17_n606()
+ fun_l18_n591
+end
+
+def fun_l17_n607()
+ fun_l18_n971
+end
+
+def fun_l17_n608()
+ fun_l18_n79
+end
+
+def fun_l17_n609()
+ fun_l18_n971
+end
+
+def fun_l17_n610()
+ fun_l18_n571
+end
+
+def fun_l17_n611()
+ fun_l18_n768
+end
+
+def fun_l17_n612()
+ fun_l18_n894
+end
+
+def fun_l17_n613()
+ fun_l18_n424
+end
+
+def fun_l17_n614()
+ fun_l18_n452
+end
+
+def fun_l17_n615()
+ fun_l18_n928
+end
+
+def fun_l17_n616()
+ fun_l18_n273
+end
+
+def fun_l17_n617()
+ fun_l18_n344
+end
+
+def fun_l17_n618()
+ fun_l18_n673
+end
+
+def fun_l17_n619()
+ fun_l18_n849
+end
+
+def fun_l17_n620()
+ fun_l18_n462
+end
+
+def fun_l17_n621()
+ fun_l18_n691
+end
+
+def fun_l17_n622()
+ fun_l18_n111
+end
+
+def fun_l17_n623()
+ fun_l18_n140
+end
+
+def fun_l17_n624()
+ fun_l18_n949
+end
+
+def fun_l17_n625()
+ fun_l18_n743
+end
+
+def fun_l17_n626()
+ fun_l18_n985
+end
+
+def fun_l17_n627()
+ fun_l18_n123
+end
+
+def fun_l17_n628()
+ fun_l18_n59
+end
+
+def fun_l17_n629()
+ fun_l18_n355
+end
+
+def fun_l17_n630()
+ fun_l18_n828
+end
+
+def fun_l17_n631()
+ fun_l18_n602
+end
+
+def fun_l17_n632()
+ fun_l18_n597
+end
+
+def fun_l17_n633()
+ fun_l18_n156
+end
+
+def fun_l17_n634()
+ fun_l18_n249
+end
+
+def fun_l17_n635()
+ fun_l18_n166
+end
+
+def fun_l17_n636()
+ fun_l18_n913
+end
+
+def fun_l17_n637()
+ fun_l18_n667
+end
+
+def fun_l17_n638()
+ fun_l18_n641
+end
+
+def fun_l17_n639()
+ fun_l18_n31
+end
+
+def fun_l17_n640()
+ fun_l18_n481
+end
+
+def fun_l17_n641()
+ fun_l18_n670
+end
+
+def fun_l17_n642()
+ fun_l18_n104
+end
+
+def fun_l17_n643()
+ fun_l18_n490
+end
+
+def fun_l17_n644()
+ fun_l18_n653
+end
+
+def fun_l17_n645()
+ fun_l18_n582
+end
+
+def fun_l17_n646()
+ fun_l18_n805
+end
+
+def fun_l17_n647()
+ fun_l18_n89
+end
+
+def fun_l17_n648()
+ fun_l18_n226
+end
+
+def fun_l17_n649()
+ fun_l18_n657
+end
+
+def fun_l17_n650()
+ fun_l18_n711
+end
+
+def fun_l17_n651()
+ fun_l18_n991
+end
+
+def fun_l17_n652()
+ fun_l18_n955
+end
+
+def fun_l17_n653()
+ fun_l18_n357
+end
+
+def fun_l17_n654()
+ fun_l18_n816
+end
+
+def fun_l17_n655()
+ fun_l18_n3
+end
+
+def fun_l17_n656()
+ fun_l18_n796
+end
+
+def fun_l17_n657()
+ fun_l18_n864
+end
+
+def fun_l17_n658()
+ fun_l18_n484
+end
+
+def fun_l17_n659()
+ fun_l18_n59
+end
+
+def fun_l17_n660()
+ fun_l18_n465
+end
+
+def fun_l17_n661()
+ fun_l18_n175
+end
+
+def fun_l17_n662()
+ fun_l18_n721
+end
+
+def fun_l17_n663()
+ fun_l18_n203
+end
+
+def fun_l17_n664()
+ fun_l18_n77
+end
+
+def fun_l17_n665()
+ fun_l18_n428
+end
+
+def fun_l17_n666()
+ fun_l18_n651
+end
+
+def fun_l17_n667()
+ fun_l18_n652
+end
+
+def fun_l17_n668()
+ fun_l18_n199
+end
+
+def fun_l17_n669()
+ fun_l18_n851
+end
+
+def fun_l17_n670()
+ fun_l18_n27
+end
+
+def fun_l17_n671()
+ fun_l18_n399
+end
+
+def fun_l17_n672()
+ fun_l18_n233
+end
+
+def fun_l17_n673()
+ fun_l18_n213
+end
+
+def fun_l17_n674()
+ fun_l18_n112
+end
+
+def fun_l17_n675()
+ fun_l18_n56
+end
+
+def fun_l17_n676()
+ fun_l18_n813
+end
+
+def fun_l17_n677()
+ fun_l18_n344
+end
+
+def fun_l17_n678()
+ fun_l18_n705
+end
+
+def fun_l17_n679()
+ fun_l18_n117
+end
+
+def fun_l17_n680()
+ fun_l18_n644
+end
+
+def fun_l17_n681()
+ fun_l18_n544
+end
+
+def fun_l17_n682()
+ fun_l18_n910
+end
+
+def fun_l17_n683()
+ fun_l18_n604
+end
+
+def fun_l17_n684()
+ fun_l18_n916
+end
+
+def fun_l17_n685()
+ fun_l18_n795
+end
+
+def fun_l17_n686()
+ fun_l18_n983
+end
+
+def fun_l17_n687()
+ fun_l18_n200
+end
+
+def fun_l17_n688()
+ fun_l18_n699
+end
+
+def fun_l17_n689()
+ fun_l18_n736
+end
+
+def fun_l17_n690()
+ fun_l18_n465
+end
+
+def fun_l17_n691()
+ fun_l18_n496
+end
+
+def fun_l17_n692()
+ fun_l18_n505
+end
+
+def fun_l17_n693()
+ fun_l18_n753
+end
+
+def fun_l17_n694()
+ fun_l18_n473
+end
+
+def fun_l17_n695()
+ fun_l18_n320
+end
+
+def fun_l17_n696()
+ fun_l18_n319
+end
+
+def fun_l17_n697()
+ fun_l18_n789
+end
+
+def fun_l17_n698()
+ fun_l18_n474
+end
+
+def fun_l17_n699()
+ fun_l18_n561
+end
+
+def fun_l17_n700()
+ fun_l18_n455
+end
+
+def fun_l17_n701()
+ fun_l18_n863
+end
+
+def fun_l17_n702()
+ fun_l18_n22
+end
+
+def fun_l17_n703()
+ fun_l18_n850
+end
+
+def fun_l17_n704()
+ fun_l18_n200
+end
+
+def fun_l17_n705()
+ fun_l18_n411
+end
+
+def fun_l17_n706()
+ fun_l18_n655
+end
+
+def fun_l17_n707()
+ fun_l18_n101
+end
+
+def fun_l17_n708()
+ fun_l18_n911
+end
+
+def fun_l17_n709()
+ fun_l18_n974
+end
+
+def fun_l17_n710()
+ fun_l18_n354
+end
+
+def fun_l17_n711()
+ fun_l18_n265
+end
+
+def fun_l17_n712()
+ fun_l18_n995
+end
+
+def fun_l17_n713()
+ fun_l18_n21
+end
+
+def fun_l17_n714()
+ fun_l18_n783
+end
+
+def fun_l17_n715()
+ fun_l18_n974
+end
+
+def fun_l17_n716()
+ fun_l18_n814
+end
+
+def fun_l17_n717()
+ fun_l18_n833
+end
+
+def fun_l17_n718()
+ fun_l18_n919
+end
+
+def fun_l17_n719()
+ fun_l18_n379
+end
+
+def fun_l17_n720()
+ fun_l18_n995
+end
+
+def fun_l17_n721()
+ fun_l18_n473
+end
+
+def fun_l17_n722()
+ fun_l18_n345
+end
+
+def fun_l17_n723()
+ fun_l18_n982
+end
+
+def fun_l17_n724()
+ fun_l18_n857
+end
+
+def fun_l17_n725()
+ fun_l18_n238
+end
+
+def fun_l17_n726()
+ fun_l18_n428
+end
+
+def fun_l17_n727()
+ fun_l18_n387
+end
+
+def fun_l17_n728()
+ fun_l18_n690
+end
+
+def fun_l17_n729()
+ fun_l18_n581
+end
+
+def fun_l17_n730()
+ fun_l18_n110
+end
+
+def fun_l17_n731()
+ fun_l18_n788
+end
+
+def fun_l17_n732()
+ fun_l18_n190
+end
+
+def fun_l17_n733()
+ fun_l18_n856
+end
+
+def fun_l17_n734()
+ fun_l18_n724
+end
+
+def fun_l17_n735()
+ fun_l18_n174
+end
+
+def fun_l17_n736()
+ fun_l18_n527
+end
+
+def fun_l17_n737()
+ fun_l18_n816
+end
+
+def fun_l17_n738()
+ fun_l18_n425
+end
+
+def fun_l17_n739()
+ fun_l18_n476
+end
+
+def fun_l17_n740()
+ fun_l18_n685
+end
+
+def fun_l17_n741()
+ fun_l18_n211
+end
+
+def fun_l17_n742()
+ fun_l18_n354
+end
+
+def fun_l17_n743()
+ fun_l18_n849
+end
+
+def fun_l17_n744()
+ fun_l18_n673
+end
+
+def fun_l17_n745()
+ fun_l18_n274
+end
+
+def fun_l17_n746()
+ fun_l18_n147
+end
+
+def fun_l17_n747()
+ fun_l18_n103
+end
+
+def fun_l17_n748()
+ fun_l18_n185
+end
+
+def fun_l17_n749()
+ fun_l18_n781
+end
+
+def fun_l17_n750()
+ fun_l18_n980
+end
+
+def fun_l17_n751()
+ fun_l18_n961
+end
+
+def fun_l17_n752()
+ fun_l18_n447
+end
+
+def fun_l17_n753()
+ fun_l18_n124
+end
+
+def fun_l17_n754()
+ fun_l18_n605
+end
+
+def fun_l17_n755()
+ fun_l18_n7
+end
+
+def fun_l17_n756()
+ fun_l18_n731
+end
+
+def fun_l17_n757()
+ fun_l18_n479
+end
+
+def fun_l17_n758()
+ fun_l18_n931
+end
+
+def fun_l17_n759()
+ fun_l18_n535
+end
+
+def fun_l17_n760()
+ fun_l18_n772
+end
+
+def fun_l17_n761()
+ fun_l18_n827
+end
+
+def fun_l17_n762()
+ fun_l18_n265
+end
+
+def fun_l17_n763()
+ fun_l18_n81
+end
+
+def fun_l17_n764()
+ fun_l18_n377
+end
+
+def fun_l17_n765()
+ fun_l18_n565
+end
+
+def fun_l17_n766()
+ fun_l18_n520
+end
+
+def fun_l17_n767()
+ fun_l18_n556
+end
+
+def fun_l17_n768()
+ fun_l18_n711
+end
+
+def fun_l17_n769()
+ fun_l18_n460
+end
+
+def fun_l17_n770()
+ fun_l18_n902
+end
+
+def fun_l17_n771()
+ fun_l18_n874
+end
+
+def fun_l17_n772()
+ fun_l18_n742
+end
+
+def fun_l17_n773()
+ fun_l18_n578
+end
+
+def fun_l17_n774()
+ fun_l18_n198
+end
+
+def fun_l17_n775()
+ fun_l18_n965
+end
+
+def fun_l17_n776()
+ fun_l18_n342
+end
+
+def fun_l17_n777()
+ fun_l18_n50
+end
+
+def fun_l17_n778()
+ fun_l18_n299
+end
+
+def fun_l17_n779()
+ fun_l18_n289
+end
+
+def fun_l17_n780()
+ fun_l18_n830
+end
+
+def fun_l17_n781()
+ fun_l18_n157
+end
+
+def fun_l17_n782()
+ fun_l18_n628
+end
+
+def fun_l17_n783()
+ fun_l18_n875
+end
+
+def fun_l17_n784()
+ fun_l18_n810
+end
+
+def fun_l17_n785()
+ fun_l18_n642
+end
+
+def fun_l17_n786()
+ fun_l18_n422
+end
+
+def fun_l17_n787()
+ fun_l18_n816
+end
+
+def fun_l17_n788()
+ fun_l18_n184
+end
+
+def fun_l17_n789()
+ fun_l18_n391
+end
+
+def fun_l17_n790()
+ fun_l18_n804
+end
+
+def fun_l17_n791()
+ fun_l18_n534
+end
+
+def fun_l17_n792()
+ fun_l18_n353
+end
+
+def fun_l17_n793()
+ fun_l18_n329
+end
+
+def fun_l17_n794()
+ fun_l18_n75
+end
+
+def fun_l17_n795()
+ fun_l18_n854
+end
+
+def fun_l17_n796()
+ fun_l18_n478
+end
+
+def fun_l17_n797()
+ fun_l18_n403
+end
+
+def fun_l17_n798()
+ fun_l18_n842
+end
+
+def fun_l17_n799()
+ fun_l18_n569
+end
+
+def fun_l17_n800()
+ fun_l18_n596
+end
+
+def fun_l17_n801()
+ fun_l18_n548
+end
+
+def fun_l17_n802()
+ fun_l18_n393
+end
+
+def fun_l17_n803()
+ fun_l18_n253
+end
+
+def fun_l17_n804()
+ fun_l18_n987
+end
+
+def fun_l17_n805()
+ fun_l18_n560
+end
+
+def fun_l17_n806()
+ fun_l18_n582
+end
+
+def fun_l17_n807()
+ fun_l18_n356
+end
+
+def fun_l17_n808()
+ fun_l18_n458
+end
+
+def fun_l17_n809()
+ fun_l18_n215
+end
+
+def fun_l17_n810()
+ fun_l18_n16
+end
+
+def fun_l17_n811()
+ fun_l18_n586
+end
+
+def fun_l17_n812()
+ fun_l18_n312
+end
+
+def fun_l17_n813()
+ fun_l18_n861
+end
+
+def fun_l17_n814()
+ fun_l18_n455
+end
+
+def fun_l17_n815()
+ fun_l18_n530
+end
+
+def fun_l17_n816()
+ fun_l18_n583
+end
+
+def fun_l17_n817()
+ fun_l18_n511
+end
+
+def fun_l17_n818()
+ fun_l18_n568
+end
+
+def fun_l17_n819()
+ fun_l18_n411
+end
+
+def fun_l17_n820()
+ fun_l18_n404
+end
+
+def fun_l17_n821()
+ fun_l18_n199
+end
+
+def fun_l17_n822()
+ fun_l18_n393
+end
+
+def fun_l17_n823()
+ fun_l18_n856
+end
+
+def fun_l17_n824()
+ fun_l18_n638
+end
+
+def fun_l17_n825()
+ fun_l18_n853
+end
+
+def fun_l17_n826()
+ fun_l18_n896
+end
+
+def fun_l17_n827()
+ fun_l18_n267
+end
+
+def fun_l17_n828()
+ fun_l18_n419
+end
+
+def fun_l17_n829()
+ fun_l18_n47
+end
+
+def fun_l17_n830()
+ fun_l18_n436
+end
+
+def fun_l17_n831()
+ fun_l18_n714
+end
+
+def fun_l17_n832()
+ fun_l18_n156
+end
+
+def fun_l17_n833()
+ fun_l18_n32
+end
+
+def fun_l17_n834()
+ fun_l18_n467
+end
+
+def fun_l17_n835()
+ fun_l18_n905
+end
+
+def fun_l17_n836()
+ fun_l18_n824
+end
+
+def fun_l17_n837()
+ fun_l18_n503
+end
+
+def fun_l17_n838()
+ fun_l18_n454
+end
+
+def fun_l17_n839()
+ fun_l18_n295
+end
+
+def fun_l17_n840()
+ fun_l18_n669
+end
+
+def fun_l17_n841()
+ fun_l18_n618
+end
+
+def fun_l17_n842()
+ fun_l18_n984
+end
+
+def fun_l17_n843()
+ fun_l18_n485
+end
+
+def fun_l17_n844()
+ fun_l18_n952
+end
+
+def fun_l17_n845()
+ fun_l18_n374
+end
+
+def fun_l17_n846()
+ fun_l18_n933
+end
+
+def fun_l17_n847()
+ fun_l18_n246
+end
+
+def fun_l17_n848()
+ fun_l18_n672
+end
+
+def fun_l17_n849()
+ fun_l18_n23
+end
+
+def fun_l17_n850()
+ fun_l18_n641
+end
+
+def fun_l17_n851()
+ fun_l18_n439
+end
+
+def fun_l17_n852()
+ fun_l18_n423
+end
+
+def fun_l17_n853()
+ fun_l18_n565
+end
+
+def fun_l17_n854()
+ fun_l18_n189
+end
+
+def fun_l17_n855()
+ fun_l18_n265
+end
+
+def fun_l17_n856()
+ fun_l18_n101
+end
+
+def fun_l17_n857()
+ fun_l18_n799
+end
+
+def fun_l17_n858()
+ fun_l18_n831
+end
+
+def fun_l17_n859()
+ fun_l18_n222
+end
+
+def fun_l17_n860()
+ fun_l18_n398
+end
+
+def fun_l17_n861()
+ fun_l18_n946
+end
+
+def fun_l17_n862()
+ fun_l18_n693
+end
+
+def fun_l17_n863()
+ fun_l18_n947
+end
+
+def fun_l17_n864()
+ fun_l18_n22
+end
+
+def fun_l17_n865()
+ fun_l18_n386
+end
+
+def fun_l17_n866()
+ fun_l18_n771
+end
+
+def fun_l17_n867()
+ fun_l18_n38
+end
+
+def fun_l17_n868()
+ fun_l18_n290
+end
+
+def fun_l17_n869()
+ fun_l18_n204
+end
+
+def fun_l17_n870()
+ fun_l18_n780
+end
+
+def fun_l17_n871()
+ fun_l18_n275
+end
+
+def fun_l17_n872()
+ fun_l18_n810
+end
+
+def fun_l17_n873()
+ fun_l18_n104
+end
+
+def fun_l17_n874()
+ fun_l18_n433
+end
+
+def fun_l17_n875()
+ fun_l18_n55
+end
+
+def fun_l17_n876()
+ fun_l18_n508
+end
+
+def fun_l17_n877()
+ fun_l18_n997
+end
+
+def fun_l17_n878()
+ fun_l18_n115
+end
+
+def fun_l17_n879()
+ fun_l18_n568
+end
+
+def fun_l17_n880()
+ fun_l18_n385
+end
+
+def fun_l17_n881()
+ fun_l18_n912
+end
+
+def fun_l17_n882()
+ fun_l18_n234
+end
+
+def fun_l17_n883()
+ fun_l18_n85
+end
+
+def fun_l17_n884()
+ fun_l18_n935
+end
+
+def fun_l17_n885()
+ fun_l18_n389
+end
+
+def fun_l17_n886()
+ fun_l18_n925
+end
+
+def fun_l17_n887()
+ fun_l18_n629
+end
+
+def fun_l17_n888()
+ fun_l18_n310
+end
+
+def fun_l17_n889()
+ fun_l18_n538
+end
+
+def fun_l17_n890()
+ fun_l18_n172
+end
+
+def fun_l17_n891()
+ fun_l18_n161
+end
+
+def fun_l17_n892()
+ fun_l18_n11
+end
+
+def fun_l17_n893()
+ fun_l18_n216
+end
+
+def fun_l17_n894()
+ fun_l18_n802
+end
+
+def fun_l17_n895()
+ fun_l18_n982
+end
+
+def fun_l17_n896()
+ fun_l18_n220
+end
+
+def fun_l17_n897()
+ fun_l18_n169
+end
+
+def fun_l17_n898()
+ fun_l18_n64
+end
+
+def fun_l17_n899()
+ fun_l18_n282
+end
+
+def fun_l17_n900()
+ fun_l18_n134
+end
+
+def fun_l17_n901()
+ fun_l18_n424
+end
+
+def fun_l17_n902()
+ fun_l18_n766
+end
+
+def fun_l17_n903()
+ fun_l18_n808
+end
+
+def fun_l17_n904()
+ fun_l18_n766
+end
+
+def fun_l17_n905()
+ fun_l18_n836
+end
+
+def fun_l17_n906()
+ fun_l18_n5
+end
+
+def fun_l17_n907()
+ fun_l18_n47
+end
+
+def fun_l17_n908()
+ fun_l18_n414
+end
+
+def fun_l17_n909()
+ fun_l18_n11
+end
+
+def fun_l17_n910()
+ fun_l18_n446
+end
+
+def fun_l17_n911()
+ fun_l18_n161
+end
+
+def fun_l17_n912()
+ fun_l18_n291
+end
+
+def fun_l17_n913()
+ fun_l18_n728
+end
+
+def fun_l17_n914()
+ fun_l18_n806
+end
+
+def fun_l17_n915()
+ fun_l18_n355
+end
+
+def fun_l17_n916()
+ fun_l18_n157
+end
+
+def fun_l17_n917()
+ fun_l18_n912
+end
+
+def fun_l17_n918()
+ fun_l18_n354
+end
+
+def fun_l17_n919()
+ fun_l18_n84
+end
+
+def fun_l17_n920()
+ fun_l18_n291
+end
+
+def fun_l17_n921()
+ fun_l18_n258
+end
+
+def fun_l17_n922()
+ fun_l18_n935
+end
+
+def fun_l17_n923()
+ fun_l18_n622
+end
+
+def fun_l17_n924()
+ fun_l18_n760
+end
+
+def fun_l17_n925()
+ fun_l18_n153
+end
+
+def fun_l17_n926()
+ fun_l18_n673
+end
+
+def fun_l17_n927()
+ fun_l18_n105
+end
+
+def fun_l17_n928()
+ fun_l18_n432
+end
+
+def fun_l17_n929()
+ fun_l18_n403
+end
+
+def fun_l17_n930()
+ fun_l18_n312
+end
+
+def fun_l17_n931()
+ fun_l18_n874
+end
+
+def fun_l17_n932()
+ fun_l18_n642
+end
+
+def fun_l17_n933()
+ fun_l18_n694
+end
+
+def fun_l17_n934()
+ fun_l18_n247
+end
+
+def fun_l17_n935()
+ fun_l18_n483
+end
+
+def fun_l17_n936()
+ fun_l18_n849
+end
+
+def fun_l17_n937()
+ fun_l18_n784
+end
+
+def fun_l17_n938()
+ fun_l18_n948
+end
+
+def fun_l17_n939()
+ fun_l18_n26
+end
+
+def fun_l17_n940()
+ fun_l18_n36
+end
+
+def fun_l17_n941()
+ fun_l18_n933
+end
+
+def fun_l17_n942()
+ fun_l18_n734
+end
+
+def fun_l17_n943()
+ fun_l18_n33
+end
+
+def fun_l17_n944()
+ fun_l18_n78
+end
+
+def fun_l17_n945()
+ fun_l18_n592
+end
+
+def fun_l17_n946()
+ fun_l18_n504
+end
+
+def fun_l17_n947()
+ fun_l18_n255
+end
+
+def fun_l17_n948()
+ fun_l18_n389
+end
+
+def fun_l17_n949()
+ fun_l18_n71
+end
+
+def fun_l17_n950()
+ fun_l18_n938
+end
+
+def fun_l17_n951()
+ fun_l18_n125
+end
+
+def fun_l17_n952()
+ fun_l18_n310
+end
+
+def fun_l17_n953()
+ fun_l18_n422
+end
+
+def fun_l17_n954()
+ fun_l18_n268
+end
+
+def fun_l17_n955()
+ fun_l18_n655
+end
+
+def fun_l17_n956()
+ fun_l18_n106
+end
+
+def fun_l17_n957()
+ fun_l18_n226
+end
+
+def fun_l17_n958()
+ fun_l18_n247
+end
+
+def fun_l17_n959()
+ fun_l18_n282
+end
+
+def fun_l17_n960()
+ fun_l18_n495
+end
+
+def fun_l17_n961()
+ fun_l18_n333
+end
+
+def fun_l17_n962()
+ fun_l18_n796
+end
+
+def fun_l17_n963()
+ fun_l18_n939
+end
+
+def fun_l17_n964()
+ fun_l18_n529
+end
+
+def fun_l17_n965()
+ fun_l18_n835
+end
+
+def fun_l17_n966()
+ fun_l18_n947
+end
+
+def fun_l17_n967()
+ fun_l18_n925
+end
+
+def fun_l17_n968()
+ fun_l18_n445
+end
+
+def fun_l17_n969()
+ fun_l18_n815
+end
+
+def fun_l17_n970()
+ fun_l18_n476
+end
+
+def fun_l17_n971()
+ fun_l18_n39
+end
+
+def fun_l17_n972()
+ fun_l18_n374
+end
+
+def fun_l17_n973()
+ fun_l18_n332
+end
+
+def fun_l17_n974()
+ fun_l18_n231
+end
+
+def fun_l17_n975()
+ fun_l18_n155
+end
+
+def fun_l17_n976()
+ fun_l18_n892
+end
+
+def fun_l17_n977()
+ fun_l18_n890
+end
+
+def fun_l17_n978()
+ fun_l18_n304
+end
+
+def fun_l17_n979()
+ fun_l18_n67
+end
+
+def fun_l17_n980()
+ fun_l18_n793
+end
+
+def fun_l17_n981()
+ fun_l18_n902
+end
+
+def fun_l17_n982()
+ fun_l18_n990
+end
+
+def fun_l17_n983()
+ fun_l18_n506
+end
+
+def fun_l17_n984()
+ fun_l18_n411
+end
+
+def fun_l17_n985()
+ fun_l18_n360
+end
+
+def fun_l17_n986()
+ fun_l18_n958
+end
+
+def fun_l17_n987()
+ fun_l18_n941
+end
+
+def fun_l17_n988()
+ fun_l18_n896
+end
+
+def fun_l17_n989()
+ fun_l18_n17
+end
+
+def fun_l17_n990()
+ fun_l18_n971
+end
+
+def fun_l17_n991()
+ fun_l18_n71
+end
+
+def fun_l17_n992()
+ fun_l18_n880
+end
+
+def fun_l17_n993()
+ fun_l18_n473
+end
+
+def fun_l17_n994()
+ fun_l18_n602
+end
+
+def fun_l17_n995()
+ fun_l18_n112
+end
+
+def fun_l17_n996()
+ fun_l18_n748
+end
+
+def fun_l17_n997()
+ fun_l18_n156
+end
+
+def fun_l17_n998()
+ fun_l18_n979
+end
+
+def fun_l17_n999()
+ fun_l18_n950
+end
+
+def fun_l18_n0()
+ fun_l19_n673
+end
+
+def fun_l18_n1()
+ fun_l19_n72
+end
+
+def fun_l18_n2()
+ fun_l19_n941
+end
+
+def fun_l18_n3()
+ fun_l19_n32
+end
+
+def fun_l18_n4()
+ fun_l19_n386
+end
+
+def fun_l18_n5()
+ fun_l19_n834
+end
+
+def fun_l18_n6()
+ fun_l19_n337
+end
+
+def fun_l18_n7()
+ fun_l19_n669
+end
+
+def fun_l18_n8()
+ fun_l19_n953
+end
+
+def fun_l18_n9()
+ fun_l19_n823
+end
+
+def fun_l18_n10()
+ fun_l19_n709
+end
+
+def fun_l18_n11()
+ fun_l19_n70
+end
+
+def fun_l18_n12()
+ fun_l19_n54
+end
+
+def fun_l18_n13()
+ fun_l19_n601
+end
+
+def fun_l18_n14()
+ fun_l19_n638
+end
+
+def fun_l18_n15()
+ fun_l19_n497
+end
+
+def fun_l18_n16()
+ fun_l19_n7
+end
+
+def fun_l18_n17()
+ fun_l19_n955
+end
+
+def fun_l18_n18()
+ fun_l19_n229
+end
+
+def fun_l18_n19()
+ fun_l19_n158
+end
+
+def fun_l18_n20()
+ fun_l19_n905
+end
+
+def fun_l18_n21()
+ fun_l19_n34
+end
+
+def fun_l18_n22()
+ fun_l19_n462
+end
+
+def fun_l18_n23()
+ fun_l19_n496
+end
+
+def fun_l18_n24()
+ fun_l19_n560
+end
+
+def fun_l18_n25()
+ fun_l19_n877
+end
+
+def fun_l18_n26()
+ fun_l19_n555
+end
+
+def fun_l18_n27()
+ fun_l19_n973
+end
+
+def fun_l18_n28()
+ fun_l19_n680
+end
+
+def fun_l18_n29()
+ fun_l19_n525
+end
+
+def fun_l18_n30()
+ fun_l19_n26
+end
+
+def fun_l18_n31()
+ fun_l19_n51
+end
+
+def fun_l18_n32()
+ fun_l19_n859
+end
+
+def fun_l18_n33()
+ fun_l19_n345
+end
+
+def fun_l18_n34()
+ fun_l19_n376
+end
+
+def fun_l18_n35()
+ fun_l19_n411
+end
+
+def fun_l18_n36()
+ fun_l19_n717
+end
+
+def fun_l18_n37()
+ fun_l19_n750
+end
+
+def fun_l18_n38()
+ fun_l19_n927
+end
+
+def fun_l18_n39()
+ fun_l19_n129
+end
+
+def fun_l18_n40()
+ fun_l19_n121
+end
+
+def fun_l18_n41()
+ fun_l19_n670
+end
+
+def fun_l18_n42()
+ fun_l19_n926
+end
+
+def fun_l18_n43()
+ fun_l19_n80
+end
+
+def fun_l18_n44()
+ fun_l19_n355
+end
+
+def fun_l18_n45()
+ fun_l19_n107
+end
+
+def fun_l18_n46()
+ fun_l19_n437
+end
+
+def fun_l18_n47()
+ fun_l19_n821
+end
+
+def fun_l18_n48()
+ fun_l19_n215
+end
+
+def fun_l18_n49()
+ fun_l19_n783
+end
+
+def fun_l18_n50()
+ fun_l19_n941
+end
+
+def fun_l18_n51()
+ fun_l19_n156
+end
+
+def fun_l18_n52()
+ fun_l19_n797
+end
+
+def fun_l18_n53()
+ fun_l19_n522
+end
+
+def fun_l18_n54()
+ fun_l19_n294
+end
+
+def fun_l18_n55()
+ fun_l19_n985
+end
+
+def fun_l18_n56()
+ fun_l19_n709
+end
+
+def fun_l18_n57()
+ fun_l19_n492
+end
+
+def fun_l18_n58()
+ fun_l19_n460
+end
+
+def fun_l18_n59()
+ fun_l19_n186
+end
+
+def fun_l18_n60()
+ fun_l19_n764
+end
+
+def fun_l18_n61()
+ fun_l19_n439
+end
+
+def fun_l18_n62()
+ fun_l19_n568
+end
+
+def fun_l18_n63()
+ fun_l19_n797
+end
+
+def fun_l18_n64()
+ fun_l19_n542
+end
+
+def fun_l18_n65()
+ fun_l19_n985
+end
+
+def fun_l18_n66()
+ fun_l19_n787
+end
+
+def fun_l18_n67()
+ fun_l19_n447
+end
+
+def fun_l18_n68()
+ fun_l19_n567
+end
+
+def fun_l18_n69()
+ fun_l19_n406
+end
+
+def fun_l18_n70()
+ fun_l19_n984
+end
+
+def fun_l18_n71()
+ fun_l19_n58
+end
+
+def fun_l18_n72()
+ fun_l19_n820
+end
+
+def fun_l18_n73()
+ fun_l19_n831
+end
+
+def fun_l18_n74()
+ fun_l19_n533
+end
+
+def fun_l18_n75()
+ fun_l19_n277
+end
+
+def fun_l18_n76()
+ fun_l19_n92
+end
+
+def fun_l18_n77()
+ fun_l19_n965
+end
+
+def fun_l18_n78()
+ fun_l19_n127
+end
+
+def fun_l18_n79()
+ fun_l19_n728
+end
+
+def fun_l18_n80()
+ fun_l19_n672
+end
+
+def fun_l18_n81()
+ fun_l19_n748
+end
+
+def fun_l18_n82()
+ fun_l19_n485
+end
+
+def fun_l18_n83()
+ fun_l19_n815
+end
+
+def fun_l18_n84()
+ fun_l19_n957
+end
+
+def fun_l18_n85()
+ fun_l19_n884
+end
+
+def fun_l18_n86()
+ fun_l19_n107
+end
+
+def fun_l18_n87()
+ fun_l19_n255
+end
+
+def fun_l18_n88()
+ fun_l19_n498
+end
+
+def fun_l18_n89()
+ fun_l19_n589
+end
+
+def fun_l18_n90()
+ fun_l19_n726
+end
+
+def fun_l18_n91()
+ fun_l19_n755
+end
+
+def fun_l18_n92()
+ fun_l19_n855
+end
+
+def fun_l18_n93()
+ fun_l19_n490
+end
+
+def fun_l18_n94()
+ fun_l19_n463
+end
+
+def fun_l18_n95()
+ fun_l19_n213
+end
+
+def fun_l18_n96()
+ fun_l19_n946
+end
+
+def fun_l18_n97()
+ fun_l19_n319
+end
+
+def fun_l18_n98()
+ fun_l19_n565
+end
+
+def fun_l18_n99()
+ fun_l19_n805
+end
+
+def fun_l18_n100()
+ fun_l19_n21
+end
+
+def fun_l18_n101()
+ fun_l19_n168
+end
+
+def fun_l18_n102()
+ fun_l19_n462
+end
+
+def fun_l18_n103()
+ fun_l19_n15
+end
+
+def fun_l18_n104()
+ fun_l19_n408
+end
+
+def fun_l18_n105()
+ fun_l19_n736
+end
+
+def fun_l18_n106()
+ fun_l19_n313
+end
+
+def fun_l18_n107()
+ fun_l19_n736
+end
+
+def fun_l18_n108()
+ fun_l19_n703
+end
+
+def fun_l18_n109()
+ fun_l19_n456
+end
+
+def fun_l18_n110()
+ fun_l19_n467
+end
+
+def fun_l18_n111()
+ fun_l19_n287
+end
+
+def fun_l18_n112()
+ fun_l19_n630
+end
+
+def fun_l18_n113()
+ fun_l19_n499
+end
+
+def fun_l18_n114()
+ fun_l19_n308
+end
+
+def fun_l18_n115()
+ fun_l19_n902
+end
+
+def fun_l18_n116()
+ fun_l19_n894
+end
+
+def fun_l18_n117()
+ fun_l19_n545
+end
+
+def fun_l18_n118()
+ fun_l19_n467
+end
+
+def fun_l18_n119()
+ fun_l19_n791
+end
+
+def fun_l18_n120()
+ fun_l19_n845
+end
+
+def fun_l18_n121()
+ fun_l19_n376
+end
+
+def fun_l18_n122()
+ fun_l19_n898
+end
+
+def fun_l18_n123()
+ fun_l19_n200
+end
+
+def fun_l18_n124()
+ fun_l19_n415
+end
+
+def fun_l18_n125()
+ fun_l19_n80
+end
+
+def fun_l18_n126()
+ fun_l19_n6
+end
+
+def fun_l18_n127()
+ fun_l19_n150
+end
+
+def fun_l18_n128()
+ fun_l19_n223
+end
+
+def fun_l18_n129()
+ fun_l19_n179
+end
+
+def fun_l18_n130()
+ fun_l19_n687
+end
+
+def fun_l18_n131()
+ fun_l19_n625
+end
+
+def fun_l18_n132()
+ fun_l19_n332
+end
+
+def fun_l18_n133()
+ fun_l19_n87
+end
+
+def fun_l18_n134()
+ fun_l19_n469
+end
+
+def fun_l18_n135()
+ fun_l19_n4
+end
+
+def fun_l18_n136()
+ fun_l19_n142
+end
+
+def fun_l18_n137()
+ fun_l19_n506
+end
+
+def fun_l18_n138()
+ fun_l19_n227
+end
+
+def fun_l18_n139()
+ fun_l19_n332
+end
+
+def fun_l18_n140()
+ fun_l19_n18
+end
+
+def fun_l18_n141()
+ fun_l19_n773
+end
+
+def fun_l18_n142()
+ fun_l19_n306
+end
+
+def fun_l18_n143()
+ fun_l19_n376
+end
+
+def fun_l18_n144()
+ fun_l19_n524
+end
+
+def fun_l18_n145()
+ fun_l19_n61
+end
+
+def fun_l18_n146()
+ fun_l19_n635
+end
+
+def fun_l18_n147()
+ fun_l19_n816
+end
+
+def fun_l18_n148()
+ fun_l19_n398
+end
+
+def fun_l18_n149()
+ fun_l19_n408
+end
+
+def fun_l18_n150()
+ fun_l19_n889
+end
+
+def fun_l18_n151()
+ fun_l19_n167
+end
+
+def fun_l18_n152()
+ fun_l19_n436
+end
+
+def fun_l18_n153()
+ fun_l19_n738
+end
+
+def fun_l18_n154()
+ fun_l19_n382
+end
+
+def fun_l18_n155()
+ fun_l19_n260
+end
+
+def fun_l18_n156()
+ fun_l19_n227
+end
+
+def fun_l18_n157()
+ fun_l19_n191
+end
+
+def fun_l18_n158()
+ fun_l19_n269
+end
+
+def fun_l18_n159()
+ fun_l19_n599
+end
+
+def fun_l18_n160()
+ fun_l19_n992
+end
+
+def fun_l18_n161()
+ fun_l19_n754
+end
+
+def fun_l18_n162()
+ fun_l19_n578
+end
+
+def fun_l18_n163()
+ fun_l19_n162
+end
+
+def fun_l18_n164()
+ fun_l19_n88
+end
+
+def fun_l18_n165()
+ fun_l19_n592
+end
+
+def fun_l18_n166()
+ fun_l19_n621
+end
+
+def fun_l18_n167()
+ fun_l19_n398
+end
+
+def fun_l18_n168()
+ fun_l19_n585
+end
+
+def fun_l18_n169()
+ fun_l19_n51
+end
+
+def fun_l18_n170()
+ fun_l19_n715
+end
+
+def fun_l18_n171()
+ fun_l19_n841
+end
+
+def fun_l18_n172()
+ fun_l19_n882
+end
+
+def fun_l18_n173()
+ fun_l19_n676
+end
+
+def fun_l18_n174()
+ fun_l19_n93
+end
+
+def fun_l18_n175()
+ fun_l19_n41
+end
+
+def fun_l18_n176()
+ fun_l19_n565
+end
+
+def fun_l18_n177()
+ fun_l19_n895
+end
+
+def fun_l18_n178()
+ fun_l19_n743
+end
+
+def fun_l18_n179()
+ fun_l19_n679
+end
+
+def fun_l18_n180()
+ fun_l19_n77
+end
+
+def fun_l18_n181()
+ fun_l19_n539
+end
+
+def fun_l18_n182()
+ fun_l19_n439
+end
+
+def fun_l18_n183()
+ fun_l19_n758
+end
+
+def fun_l18_n184()
+ fun_l19_n327
+end
+
+def fun_l18_n185()
+ fun_l19_n257
+end
+
+def fun_l18_n186()
+ fun_l19_n544
+end
+
+def fun_l18_n187()
+ fun_l19_n632
+end
+
+def fun_l18_n188()
+ fun_l19_n83
+end
+
+def fun_l18_n189()
+ fun_l19_n88
+end
+
+def fun_l18_n190()
+ fun_l19_n244
+end
+
+def fun_l18_n191()
+ fun_l19_n403
+end
+
+def fun_l18_n192()
+ fun_l19_n644
+end
+
+def fun_l18_n193()
+ fun_l19_n953
+end
+
+def fun_l18_n194()
+ fun_l19_n690
+end
+
+def fun_l18_n195()
+ fun_l19_n534
+end
+
+def fun_l18_n196()
+ fun_l19_n352
+end
+
+def fun_l18_n197()
+ fun_l19_n502
+end
+
+def fun_l18_n198()
+ fun_l19_n924
+end
+
+def fun_l18_n199()
+ fun_l19_n815
+end
+
+def fun_l18_n200()
+ fun_l19_n910
+end
+
+def fun_l18_n201()
+ fun_l19_n391
+end
+
+def fun_l18_n202()
+ fun_l19_n144
+end
+
+def fun_l18_n203()
+ fun_l19_n823
+end
+
+def fun_l18_n204()
+ fun_l19_n732
+end
+
+def fun_l18_n205()
+ fun_l19_n109
+end
+
+def fun_l18_n206()
+ fun_l19_n677
+end
+
+def fun_l18_n207()
+ fun_l19_n736
+end
+
+def fun_l18_n208()
+ fun_l19_n141
+end
+
+def fun_l18_n209()
+ fun_l19_n45
+end
+
+def fun_l18_n210()
+ fun_l19_n11
+end
+
+def fun_l18_n211()
+ fun_l19_n924
+end
+
+def fun_l18_n212()
+ fun_l19_n940
+end
+
+def fun_l18_n213()
+ fun_l19_n683
+end
+
+def fun_l18_n214()
+ fun_l19_n383
+end
+
+def fun_l18_n215()
+ fun_l19_n798
+end
+
+def fun_l18_n216()
+ fun_l19_n99
+end
+
+def fun_l18_n217()
+ fun_l19_n814
+end
+
+def fun_l18_n218()
+ fun_l19_n827
+end
+
+def fun_l18_n219()
+ fun_l19_n629
+end
+
+def fun_l18_n220()
+ fun_l19_n814
+end
+
+def fun_l18_n221()
+ fun_l19_n452
+end
+
+def fun_l18_n222()
+ fun_l19_n388
+end
+
+def fun_l18_n223()
+ fun_l19_n324
+end
+
+def fun_l18_n224()
+ fun_l19_n233
+end
+
+def fun_l18_n225()
+ fun_l19_n596
+end
+
+def fun_l18_n226()
+ fun_l19_n396
+end
+
+def fun_l18_n227()
+ fun_l19_n529
+end
+
+def fun_l18_n228()
+ fun_l19_n603
+end
+
+def fun_l18_n229()
+ fun_l19_n76
+end
+
+def fun_l18_n230()
+ fun_l19_n799
+end
+
+def fun_l18_n231()
+ fun_l19_n576
+end
+
+def fun_l18_n232()
+ fun_l19_n35
+end
+
+def fun_l18_n233()
+ fun_l19_n883
+end
+
+def fun_l18_n234()
+ fun_l19_n776
+end
+
+def fun_l18_n235()
+ fun_l19_n478
+end
+
+def fun_l18_n236()
+ fun_l19_n922
+end
+
+def fun_l18_n237()
+ fun_l19_n636
+end
+
+def fun_l18_n238()
+ fun_l19_n680
+end
+
+def fun_l18_n239()
+ fun_l19_n735
+end
+
+def fun_l18_n240()
+ fun_l19_n893
+end
+
+def fun_l18_n241()
+ fun_l19_n785
+end
+
+def fun_l18_n242()
+ fun_l19_n325
+end
+
+def fun_l18_n243()
+ fun_l19_n25
+end
+
+def fun_l18_n244()
+ fun_l19_n930
+end
+
+def fun_l18_n245()
+ fun_l19_n747
+end
+
+def fun_l18_n246()
+ fun_l19_n808
+end
+
+def fun_l18_n247()
+ fun_l19_n356
+end
+
+def fun_l18_n248()
+ fun_l19_n16
+end
+
+def fun_l18_n249()
+ fun_l19_n191
+end
+
+def fun_l18_n250()
+ fun_l19_n772
+end
+
+def fun_l18_n251()
+ fun_l19_n247
+end
+
+def fun_l18_n252()
+ fun_l19_n112
+end
+
+def fun_l18_n253()
+ fun_l19_n22
+end
+
+def fun_l18_n254()
+ fun_l19_n15
+end
+
+def fun_l18_n255()
+ fun_l19_n444
+end
+
+def fun_l18_n256()
+ fun_l19_n498
+end
+
+def fun_l18_n257()
+ fun_l19_n403
+end
+
+def fun_l18_n258()
+ fun_l19_n572
+end
+
+def fun_l18_n259()
+ fun_l19_n451
+end
+
+def fun_l18_n260()
+ fun_l19_n224
+end
+
+def fun_l18_n261()
+ fun_l19_n197
+end
+
+def fun_l18_n262()
+ fun_l19_n891
+end
+
+def fun_l18_n263()
+ fun_l19_n612
+end
+
+def fun_l18_n264()
+ fun_l19_n107
+end
+
+def fun_l18_n265()
+ fun_l19_n267
+end
+
+def fun_l18_n266()
+ fun_l19_n746
+end
+
+def fun_l18_n267()
+ fun_l19_n547
+end
+
+def fun_l18_n268()
+ fun_l19_n608
+end
+
+def fun_l18_n269()
+ fun_l19_n474
+end
+
+def fun_l18_n270()
+ fun_l19_n285
+end
+
+def fun_l18_n271()
+ fun_l19_n970
+end
+
+def fun_l18_n272()
+ fun_l19_n227
+end
+
+def fun_l18_n273()
+ fun_l19_n440
+end
+
+def fun_l18_n274()
+ fun_l19_n816
+end
+
+def fun_l18_n275()
+ fun_l19_n320
+end
+
+def fun_l18_n276()
+ fun_l19_n237
+end
+
+def fun_l18_n277()
+ fun_l19_n37
+end
+
+def fun_l18_n278()
+ fun_l19_n408
+end
+
+def fun_l18_n279()
+ fun_l19_n229
+end
+
+def fun_l18_n280()
+ fun_l19_n576
+end
+
+def fun_l18_n281()
+ fun_l19_n422
+end
+
+def fun_l18_n282()
+ fun_l19_n725
+end
+
+def fun_l18_n283()
+ fun_l19_n498
+end
+
+def fun_l18_n284()
+ fun_l19_n28
+end
+
+def fun_l18_n285()
+ fun_l19_n711
+end
+
+def fun_l18_n286()
+ fun_l19_n222
+end
+
+def fun_l18_n287()
+ fun_l19_n688
+end
+
+def fun_l18_n288()
+ fun_l19_n885
+end
+
+def fun_l18_n289()
+ fun_l19_n522
+end
+
+def fun_l18_n290()
+ fun_l19_n776
+end
+
+def fun_l18_n291()
+ fun_l19_n862
+end
+
+def fun_l18_n292()
+ fun_l19_n415
+end
+
+def fun_l18_n293()
+ fun_l19_n194
+end
+
+def fun_l18_n294()
+ fun_l19_n652
+end
+
+def fun_l18_n295()
+ fun_l19_n929
+end
+
+def fun_l18_n296()
+ fun_l19_n923
+end
+
+def fun_l18_n297()
+ fun_l19_n104
+end
+
+def fun_l18_n298()
+ fun_l19_n191
+end
+
+def fun_l18_n299()
+ fun_l19_n996
+end
+
+def fun_l18_n300()
+ fun_l19_n426
+end
+
+def fun_l18_n301()
+ fun_l19_n698
+end
+
+def fun_l18_n302()
+ fun_l19_n397
+end
+
+def fun_l18_n303()
+ fun_l19_n287
+end
+
+def fun_l18_n304()
+ fun_l19_n731
+end
+
+def fun_l18_n305()
+ fun_l19_n162
+end
+
+def fun_l18_n306()
+ fun_l19_n794
+end
+
+def fun_l18_n307()
+ fun_l19_n234
+end
+
+def fun_l18_n308()
+ fun_l19_n184
+end
+
+def fun_l18_n309()
+ fun_l19_n314
+end
+
+def fun_l18_n310()
+ fun_l19_n259
+end
+
+def fun_l18_n311()
+ fun_l19_n687
+end
+
+def fun_l18_n312()
+ fun_l19_n653
+end
+
+def fun_l18_n313()
+ fun_l19_n834
+end
+
+def fun_l18_n314()
+ fun_l19_n519
+end
+
+def fun_l18_n315()
+ fun_l19_n706
+end
+
+def fun_l18_n316()
+ fun_l19_n860
+end
+
+def fun_l18_n317()
+ fun_l19_n99
+end
+
+def fun_l18_n318()
+ fun_l19_n757
+end
+
+def fun_l18_n319()
+ fun_l19_n860
+end
+
+def fun_l18_n320()
+ fun_l19_n266
+end
+
+def fun_l18_n321()
+ fun_l19_n802
+end
+
+def fun_l18_n322()
+ fun_l19_n349
+end
+
+def fun_l18_n323()
+ fun_l19_n408
+end
+
+def fun_l18_n324()
+ fun_l19_n539
+end
+
+def fun_l18_n325()
+ fun_l19_n696
+end
+
+def fun_l18_n326()
+ fun_l19_n233
+end
+
+def fun_l18_n327()
+ fun_l19_n476
+end
+
+def fun_l18_n328()
+ fun_l19_n101
+end
+
+def fun_l18_n329()
+ fun_l19_n881
+end
+
+def fun_l18_n330()
+ fun_l19_n699
+end
+
+def fun_l18_n331()
+ fun_l19_n559
+end
+
+def fun_l18_n332()
+ fun_l19_n990
+end
+
+def fun_l18_n333()
+ fun_l19_n382
+end
+
+def fun_l18_n334()
+ fun_l19_n941
+end
+
+def fun_l18_n335()
+ fun_l19_n363
+end
+
+def fun_l18_n336()
+ fun_l19_n870
+end
+
+def fun_l18_n337()
+ fun_l19_n250
+end
+
+def fun_l18_n338()
+ fun_l19_n209
+end
+
+def fun_l18_n339()
+ fun_l19_n156
+end
+
+def fun_l18_n340()
+ fun_l19_n320
+end
+
+def fun_l18_n341()
+ fun_l19_n320
+end
+
+def fun_l18_n342()
+ fun_l19_n68
+end
+
+def fun_l18_n343()
+ fun_l19_n823
+end
+
+def fun_l18_n344()
+ fun_l19_n713
+end
+
+def fun_l18_n345()
+ fun_l19_n893
+end
+
+def fun_l18_n346()
+ fun_l19_n628
+end
+
+def fun_l18_n347()
+ fun_l19_n429
+end
+
+def fun_l18_n348()
+ fun_l19_n766
+end
+
+def fun_l18_n349()
+ fun_l19_n937
+end
+
+def fun_l18_n350()
+ fun_l19_n983
+end
+
+def fun_l18_n351()
+ fun_l19_n131
+end
+
+def fun_l18_n352()
+ fun_l19_n76
+end
+
+def fun_l18_n353()
+ fun_l19_n225
+end
+
+def fun_l18_n354()
+ fun_l19_n979
+end
+
+def fun_l18_n355()
+ fun_l19_n279
+end
+
+def fun_l18_n356()
+ fun_l19_n434
+end
+
+def fun_l18_n357()
+ fun_l19_n723
+end
+
+def fun_l18_n358()
+ fun_l19_n44
+end
+
+def fun_l18_n359()
+ fun_l19_n895
+end
+
+def fun_l18_n360()
+ fun_l19_n602
+end
+
+def fun_l18_n361()
+ fun_l19_n420
+end
+
+def fun_l18_n362()
+ fun_l19_n318
+end
+
+def fun_l18_n363()
+ fun_l19_n990
+end
+
+def fun_l18_n364()
+ fun_l19_n318
+end
+
+def fun_l18_n365()
+ fun_l19_n640
+end
+
+def fun_l18_n366()
+ fun_l19_n679
+end
+
+def fun_l18_n367()
+ fun_l19_n572
+end
+
+def fun_l18_n368()
+ fun_l19_n411
+end
+
+def fun_l18_n369()
+ fun_l19_n703
+end
+
+def fun_l18_n370()
+ fun_l19_n39
+end
+
+def fun_l18_n371()
+ fun_l19_n656
+end
+
+def fun_l18_n372()
+ fun_l19_n960
+end
+
+def fun_l18_n373()
+ fun_l19_n491
+end
+
+def fun_l18_n374()
+ fun_l19_n916
+end
+
+def fun_l18_n375()
+ fun_l19_n413
+end
+
+def fun_l18_n376()
+ fun_l19_n90
+end
+
+def fun_l18_n377()
+ fun_l19_n790
+end
+
+def fun_l18_n378()
+ fun_l19_n424
+end
+
+def fun_l18_n379()
+ fun_l19_n578
+end
+
+def fun_l18_n380()
+ fun_l19_n555
+end
+
+def fun_l18_n381()
+ fun_l19_n405
+end
+
+def fun_l18_n382()
+ fun_l19_n378
+end
+
+def fun_l18_n383()
+ fun_l19_n594
+end
+
+def fun_l18_n384()
+ fun_l19_n593
+end
+
+def fun_l18_n385()
+ fun_l19_n115
+end
+
+def fun_l18_n386()
+ fun_l19_n67
+end
+
+def fun_l18_n387()
+ fun_l19_n531
+end
+
+def fun_l18_n388()
+ fun_l19_n7
+end
+
+def fun_l18_n389()
+ fun_l19_n535
+end
+
+def fun_l18_n390()
+ fun_l19_n35
+end
+
+def fun_l18_n391()
+ fun_l19_n410
+end
+
+def fun_l18_n392()
+ fun_l19_n811
+end
+
+def fun_l18_n393()
+ fun_l19_n719
+end
+
+def fun_l18_n394()
+ fun_l19_n859
+end
+
+def fun_l18_n395()
+ fun_l19_n491
+end
+
+def fun_l18_n396()
+ fun_l19_n131
+end
+
+def fun_l18_n397()
+ fun_l19_n501
+end
+
+def fun_l18_n398()
+ fun_l19_n917
+end
+
+def fun_l18_n399()
+ fun_l19_n467
+end
+
+def fun_l18_n400()
+ fun_l19_n189
+end
+
+def fun_l18_n401()
+ fun_l19_n135
+end
+
+def fun_l18_n402()
+ fun_l19_n105
+end
+
+def fun_l18_n403()
+ fun_l19_n120
+end
+
+def fun_l18_n404()
+ fun_l19_n611
+end
+
+def fun_l18_n405()
+ fun_l19_n386
+end
+
+def fun_l18_n406()
+ fun_l19_n239
+end
+
+def fun_l18_n407()
+ fun_l19_n717
+end
+
+def fun_l18_n408()
+ fun_l19_n425
+end
+
+def fun_l18_n409()
+ fun_l19_n500
+end
+
+def fun_l18_n410()
+ fun_l19_n424
+end
+
+def fun_l18_n411()
+ fun_l19_n654
+end
+
+def fun_l18_n412()
+ fun_l19_n243
+end
+
+def fun_l18_n413()
+ fun_l19_n920
+end
+
+def fun_l18_n414()
+ fun_l19_n556
+end
+
+def fun_l18_n415()
+ fun_l19_n693
+end
+
+def fun_l18_n416()
+ fun_l19_n656
+end
+
+def fun_l18_n417()
+ fun_l19_n596
+end
+
+def fun_l18_n418()
+ fun_l19_n573
+end
+
+def fun_l18_n419()
+ fun_l19_n504
+end
+
+def fun_l18_n420()
+ fun_l19_n5
+end
+
+def fun_l18_n421()
+ fun_l19_n554
+end
+
+def fun_l18_n422()
+ fun_l19_n852
+end
+
+def fun_l18_n423()
+ fun_l19_n725
+end
+
+def fun_l18_n424()
+ fun_l19_n121
+end
+
+def fun_l18_n425()
+ fun_l19_n184
+end
+
+def fun_l18_n426()
+ fun_l19_n752
+end
+
+def fun_l18_n427()
+ fun_l19_n636
+end
+
+def fun_l18_n428()
+ fun_l19_n858
+end
+
+def fun_l18_n429()
+ fun_l19_n249
+end
+
+def fun_l18_n430()
+ fun_l19_n696
+end
+
+def fun_l18_n431()
+ fun_l19_n560
+end
+
+def fun_l18_n432()
+ fun_l19_n978
+end
+
+def fun_l18_n433()
+ fun_l19_n776
+end
+
+def fun_l18_n434()
+ fun_l19_n954
+end
+
+def fun_l18_n435()
+ fun_l19_n552
+end
+
+def fun_l18_n436()
+ fun_l19_n238
+end
+
+def fun_l18_n437()
+ fun_l19_n496
+end
+
+def fun_l18_n438()
+ fun_l19_n444
+end
+
+def fun_l18_n439()
+ fun_l19_n632
+end
+
+def fun_l18_n440()
+ fun_l19_n243
+end
+
+def fun_l18_n441()
+ fun_l19_n41
+end
+
+def fun_l18_n442()
+ fun_l19_n267
+end
+
+def fun_l18_n443()
+ fun_l19_n449
+end
+
+def fun_l18_n444()
+ fun_l19_n718
+end
+
+def fun_l18_n445()
+ fun_l19_n458
+end
+
+def fun_l18_n446()
+ fun_l19_n23
+end
+
+def fun_l18_n447()
+ fun_l19_n642
+end
+
+def fun_l18_n448()
+ fun_l19_n46
+end
+
+def fun_l18_n449()
+ fun_l19_n812
+end
+
+def fun_l18_n450()
+ fun_l19_n659
+end
+
+def fun_l18_n451()
+ fun_l19_n499
+end
+
+def fun_l18_n452()
+ fun_l19_n691
+end
+
+def fun_l18_n453()
+ fun_l19_n453
+end
+
+def fun_l18_n454()
+ fun_l19_n348
+end
+
+def fun_l18_n455()
+ fun_l19_n115
+end
+
+def fun_l18_n456()
+ fun_l19_n429
+end
+
+def fun_l18_n457()
+ fun_l19_n751
+end
+
+def fun_l18_n458()
+ fun_l19_n669
+end
+
+def fun_l18_n459()
+ fun_l19_n692
+end
+
+def fun_l18_n460()
+ fun_l19_n510
+end
+
+def fun_l18_n461()
+ fun_l19_n276
+end
+
+def fun_l18_n462()
+ fun_l19_n967
+end
+
+def fun_l18_n463()
+ fun_l19_n464
+end
+
+def fun_l18_n464()
+ fun_l19_n742
+end
+
+def fun_l18_n465()
+ fun_l19_n512
+end
+
+def fun_l18_n466()
+ fun_l19_n864
+end
+
+def fun_l18_n467()
+ fun_l19_n956
+end
+
+def fun_l18_n468()
+ fun_l19_n547
+end
+
+def fun_l18_n469()
+ fun_l19_n875
+end
+
+def fun_l18_n470()
+ fun_l19_n840
+end
+
+def fun_l18_n471()
+ fun_l19_n37
+end
+
+def fun_l18_n472()
+ fun_l19_n499
+end
+
+def fun_l18_n473()
+ fun_l19_n112
+end
+
+def fun_l18_n474()
+ fun_l19_n293
+end
+
+def fun_l18_n475()
+ fun_l19_n320
+end
+
+def fun_l18_n476()
+ fun_l19_n502
+end
+
+def fun_l18_n477()
+ fun_l19_n224
+end
+
+def fun_l18_n478()
+ fun_l19_n145
+end
+
+def fun_l18_n479()
+ fun_l19_n71
+end
+
+def fun_l18_n480()
+ fun_l19_n349
+end
+
+def fun_l18_n481()
+ fun_l19_n302
+end
+
+def fun_l18_n482()
+ fun_l19_n205
+end
+
+def fun_l18_n483()
+ fun_l19_n951
+end
+
+def fun_l18_n484()
+ fun_l19_n630
+end
+
+def fun_l18_n485()
+ fun_l19_n288
+end
+
+def fun_l18_n486()
+ fun_l19_n542
+end
+
+def fun_l18_n487()
+ fun_l19_n146
+end
+
+def fun_l18_n488()
+ fun_l19_n530
+end
+
+def fun_l18_n489()
+ fun_l19_n762
+end
+
+def fun_l18_n490()
+ fun_l19_n207
+end
+
+def fun_l18_n491()
+ fun_l19_n915
+end
+
+def fun_l18_n492()
+ fun_l19_n424
+end
+
+def fun_l18_n493()
+ fun_l19_n959
+end
+
+def fun_l18_n494()
+ fun_l19_n4
+end
+
+def fun_l18_n495()
+ fun_l19_n349
+end
+
+def fun_l18_n496()
+ fun_l19_n533
+end
+
+def fun_l18_n497()
+ fun_l19_n727
+end
+
+def fun_l18_n498()
+ fun_l19_n42
+end
+
+def fun_l18_n499()
+ fun_l19_n321
+end
+
+def fun_l18_n500()
+ fun_l19_n440
+end
+
+def fun_l18_n501()
+ fun_l19_n401
+end
+
+def fun_l18_n502()
+ fun_l19_n857
+end
+
+def fun_l18_n503()
+ fun_l19_n750
+end
+
+def fun_l18_n504()
+ fun_l19_n494
+end
+
+def fun_l18_n505()
+ fun_l19_n848
+end
+
+def fun_l18_n506()
+ fun_l19_n676
+end
+
+def fun_l18_n507()
+ fun_l19_n390
+end
+
+def fun_l18_n508()
+ fun_l19_n135
+end
+
+def fun_l18_n509()
+ fun_l19_n241
+end
+
+def fun_l18_n510()
+ fun_l19_n290
+end
+
+def fun_l18_n511()
+ fun_l19_n912
+end
+
+def fun_l18_n512()
+ fun_l19_n410
+end
+
+def fun_l18_n513()
+ fun_l19_n911
+end
+
+def fun_l18_n514()
+ fun_l19_n173
+end
+
+def fun_l18_n515()
+ fun_l19_n383
+end
+
+def fun_l18_n516()
+ fun_l19_n540
+end
+
+def fun_l18_n517()
+ fun_l19_n434
+end
+
+def fun_l18_n518()
+ fun_l19_n997
+end
+
+def fun_l18_n519()
+ fun_l19_n355
+end
+
+def fun_l18_n520()
+ fun_l19_n825
+end
+
+def fun_l18_n521()
+ fun_l19_n711
+end
+
+def fun_l18_n522()
+ fun_l19_n937
+end
+
+def fun_l18_n523()
+ fun_l19_n191
+end
+
+def fun_l18_n524()
+ fun_l19_n284
+end
+
+def fun_l18_n525()
+ fun_l19_n483
+end
+
+def fun_l18_n526()
+ fun_l19_n163
+end
+
+def fun_l18_n527()
+ fun_l19_n514
+end
+
+def fun_l18_n528()
+ fun_l19_n111
+end
+
+def fun_l18_n529()
+ fun_l19_n339
+end
+
+def fun_l18_n530()
+ fun_l19_n322
+end
+
+def fun_l18_n531()
+ fun_l19_n208
+end
+
+def fun_l18_n532()
+ fun_l19_n34
+end
+
+def fun_l18_n533()
+ fun_l19_n106
+end
+
+def fun_l18_n534()
+ fun_l19_n532
+end
+
+def fun_l18_n535()
+ fun_l19_n277
+end
+
+def fun_l18_n536()
+ fun_l19_n936
+end
+
+def fun_l18_n537()
+ fun_l19_n955
+end
+
+def fun_l18_n538()
+ fun_l19_n75
+end
+
+def fun_l18_n539()
+ fun_l19_n349
+end
+
+def fun_l18_n540()
+ fun_l19_n430
+end
+
+def fun_l18_n541()
+ fun_l19_n598
+end
+
+def fun_l18_n542()
+ fun_l19_n336
+end
+
+def fun_l18_n543()
+ fun_l19_n763
+end
+
+def fun_l18_n544()
+ fun_l19_n150
+end
+
+def fun_l18_n545()
+ fun_l19_n301
+end
+
+def fun_l18_n546()
+ fun_l19_n600
+end
+
+def fun_l18_n547()
+ fun_l19_n576
+end
+
+def fun_l18_n548()
+ fun_l19_n119
+end
+
+def fun_l18_n549()
+ fun_l19_n681
+end
+
+def fun_l18_n550()
+ fun_l19_n303
+end
+
+def fun_l18_n551()
+ fun_l19_n498
+end
+
+def fun_l18_n552()
+ fun_l19_n75
+end
+
+def fun_l18_n553()
+ fun_l19_n690
+end
+
+def fun_l18_n554()
+ fun_l19_n496
+end
+
+def fun_l18_n555()
+ fun_l19_n542
+end
+
+def fun_l18_n556()
+ fun_l19_n684
+end
+
+def fun_l18_n557()
+ fun_l19_n315
+end
+
+def fun_l18_n558()
+ fun_l19_n470
+end
+
+def fun_l18_n559()
+ fun_l19_n357
+end
+
+def fun_l18_n560()
+ fun_l19_n805
+end
+
+def fun_l18_n561()
+ fun_l19_n306
+end
+
+def fun_l18_n562()
+ fun_l19_n460
+end
+
+def fun_l18_n563()
+ fun_l19_n173
+end
+
+def fun_l18_n564()
+ fun_l19_n327
+end
+
+def fun_l18_n565()
+ fun_l19_n871
+end
+
+def fun_l18_n566()
+ fun_l19_n792
+end
+
+def fun_l18_n567()
+ fun_l19_n251
+end
+
+def fun_l18_n568()
+ fun_l19_n113
+end
+
+def fun_l18_n569()
+ fun_l19_n877
+end
+
+def fun_l18_n570()
+ fun_l19_n921
+end
+
+def fun_l18_n571()
+ fun_l19_n610
+end
+
+def fun_l18_n572()
+ fun_l19_n895
+end
+
+def fun_l18_n573()
+ fun_l19_n215
+end
+
+def fun_l18_n574()
+ fun_l19_n751
+end
+
+def fun_l18_n575()
+ fun_l19_n2
+end
+
+def fun_l18_n576()
+ fun_l19_n32
+end
+
+def fun_l18_n577()
+ fun_l19_n447
+end
+
+def fun_l18_n578()
+ fun_l19_n652
+end
+
+def fun_l18_n579()
+ fun_l19_n74
+end
+
+def fun_l18_n580()
+ fun_l19_n487
+end
+
+def fun_l18_n581()
+ fun_l19_n522
+end
+
+def fun_l18_n582()
+ fun_l19_n422
+end
+
+def fun_l18_n583()
+ fun_l19_n951
+end
+
+def fun_l18_n584()
+ fun_l19_n216
+end
+
+def fun_l18_n585()
+ fun_l19_n897
+end
+
+def fun_l18_n586()
+ fun_l19_n469
+end
+
+def fun_l18_n587()
+ fun_l19_n315
+end
+
+def fun_l18_n588()
+ fun_l19_n937
+end
+
+def fun_l18_n589()
+ fun_l19_n685
+end
+
+def fun_l18_n590()
+ fun_l19_n322
+end
+
+def fun_l18_n591()
+ fun_l19_n234
+end
+
+def fun_l18_n592()
+ fun_l19_n693
+end
+
+def fun_l18_n593()
+ fun_l19_n941
+end
+
+def fun_l18_n594()
+ fun_l19_n626
+end
+
+def fun_l18_n595()
+ fun_l19_n729
+end
+
+def fun_l18_n596()
+ fun_l19_n65
+end
+
+def fun_l18_n597()
+ fun_l19_n359
+end
+
+def fun_l18_n598()
+ fun_l19_n826
+end
+
+def fun_l18_n599()
+ fun_l19_n631
+end
+
+def fun_l18_n600()
+ fun_l19_n156
+end
+
+def fun_l18_n601()
+ fun_l19_n132
+end
+
+def fun_l18_n602()
+ fun_l19_n23
+end
+
+def fun_l18_n603()
+ fun_l19_n867
+end
+
+def fun_l18_n604()
+ fun_l19_n327
+end
+
+def fun_l18_n605()
+ fun_l19_n9
+end
+
+def fun_l18_n606()
+ fun_l19_n99
+end
+
+def fun_l18_n607()
+ fun_l19_n597
+end
+
+def fun_l18_n608()
+ fun_l19_n969
+end
+
+def fun_l18_n609()
+ fun_l19_n106
+end
+
+def fun_l18_n610()
+ fun_l19_n183
+end
+
+def fun_l18_n611()
+ fun_l19_n956
+end
+
+def fun_l18_n612()
+ fun_l19_n661
+end
+
+def fun_l18_n613()
+ fun_l19_n562
+end
+
+def fun_l18_n614()
+ fun_l19_n49
+end
+
+def fun_l18_n615()
+ fun_l19_n769
+end
+
+def fun_l18_n616()
+ fun_l19_n215
+end
+
+def fun_l18_n617()
+ fun_l19_n89
+end
+
+def fun_l18_n618()
+ fun_l19_n928
+end
+
+def fun_l18_n619()
+ fun_l19_n213
+end
+
+def fun_l18_n620()
+ fun_l19_n215
+end
+
+def fun_l18_n621()
+ fun_l19_n472
+end
+
+def fun_l18_n622()
+ fun_l19_n363
+end
+
+def fun_l18_n623()
+ fun_l19_n251
+end
+
+def fun_l18_n624()
+ fun_l19_n780
+end
+
+def fun_l18_n625()
+ fun_l19_n414
+end
+
+def fun_l18_n626()
+ fun_l19_n348
+end
+
+def fun_l18_n627()
+ fun_l19_n268
+end
+
+def fun_l18_n628()
+ fun_l19_n772
+end
+
+def fun_l18_n629()
+ fun_l19_n232
+end
+
+def fun_l18_n630()
+ fun_l19_n775
+end
+
+def fun_l18_n631()
+ fun_l19_n181
+end
+
+def fun_l18_n632()
+ fun_l19_n953
+end
+
+def fun_l18_n633()
+ fun_l19_n927
+end
+
+def fun_l18_n634()
+ fun_l19_n241
+end
+
+def fun_l18_n635()
+ fun_l19_n426
+end
+
+def fun_l18_n636()
+ fun_l19_n337
+end
+
+def fun_l18_n637()
+ fun_l19_n948
+end
+
+def fun_l18_n638()
+ fun_l19_n703
+end
+
+def fun_l18_n639()
+ fun_l19_n938
+end
+
+def fun_l18_n640()
+ fun_l19_n432
+end
+
+def fun_l18_n641()
+ fun_l19_n117
+end
+
+def fun_l18_n642()
+ fun_l19_n362
+end
+
+def fun_l18_n643()
+ fun_l19_n956
+end
+
+def fun_l18_n644()
+ fun_l19_n947
+end
+
+def fun_l18_n645()
+ fun_l19_n954
+end
+
+def fun_l18_n646()
+ fun_l19_n159
+end
+
+def fun_l18_n647()
+ fun_l19_n838
+end
+
+def fun_l18_n648()
+ fun_l19_n614
+end
+
+def fun_l18_n649()
+ fun_l19_n589
+end
+
+def fun_l18_n650()
+ fun_l19_n16
+end
+
+def fun_l18_n651()
+ fun_l19_n721
+end
+
+def fun_l18_n652()
+ fun_l19_n608
+end
+
+def fun_l18_n653()
+ fun_l19_n462
+end
+
+def fun_l18_n654()
+ fun_l19_n66
+end
+
+def fun_l18_n655()
+ fun_l19_n219
+end
+
+def fun_l18_n656()
+ fun_l19_n660
+end
+
+def fun_l18_n657()
+ fun_l19_n466
+end
+
+def fun_l18_n658()
+ fun_l19_n441
+end
+
+def fun_l18_n659()
+ fun_l19_n140
+end
+
+def fun_l18_n660()
+ fun_l19_n538
+end
+
+def fun_l18_n661()
+ fun_l19_n602
+end
+
+def fun_l18_n662()
+ fun_l19_n94
+end
+
+def fun_l18_n663()
+ fun_l19_n435
+end
+
+def fun_l18_n664()
+ fun_l19_n632
+end
+
+def fun_l18_n665()
+ fun_l19_n404
+end
+
+def fun_l18_n666()
+ fun_l19_n894
+end
+
+def fun_l18_n667()
+ fun_l19_n668
+end
+
+def fun_l18_n668()
+ fun_l19_n802
+end
+
+def fun_l18_n669()
+ fun_l19_n785
+end
+
+def fun_l18_n670()
+ fun_l19_n16
+end
+
+def fun_l18_n671()
+ fun_l19_n124
+end
+
+def fun_l18_n672()
+ fun_l19_n587
+end
+
+def fun_l18_n673()
+ fun_l19_n605
+end
+
+def fun_l18_n674()
+ fun_l19_n903
+end
+
+def fun_l18_n675()
+ fun_l19_n980
+end
+
+def fun_l18_n676()
+ fun_l19_n463
+end
+
+def fun_l18_n677()
+ fun_l19_n716
+end
+
+def fun_l18_n678()
+ fun_l19_n815
+end
+
+def fun_l18_n679()
+ fun_l19_n909
+end
+
+def fun_l18_n680()
+ fun_l19_n924
+end
+
+def fun_l18_n681()
+ fun_l19_n383
+end
+
+def fun_l18_n682()
+ fun_l19_n761
+end
+
+def fun_l18_n683()
+ fun_l19_n663
+end
+
+def fun_l18_n684()
+ fun_l19_n176
+end
+
+def fun_l18_n685()
+ fun_l19_n87
+end
+
+def fun_l18_n686()
+ fun_l19_n1
+end
+
+def fun_l18_n687()
+ fun_l19_n953
+end
+
+def fun_l18_n688()
+ fun_l19_n737
+end
+
+def fun_l18_n689()
+ fun_l19_n792
+end
+
+def fun_l18_n690()
+ fun_l19_n165
+end
+
+def fun_l18_n691()
+ fun_l19_n266
+end
+
+def fun_l18_n692()
+ fun_l19_n357
+end
+
+def fun_l18_n693()
+ fun_l19_n780
+end
+
+def fun_l18_n694()
+ fun_l19_n893
+end
+
+def fun_l18_n695()
+ fun_l19_n280
+end
+
+def fun_l18_n696()
+ fun_l19_n117
+end
+
+def fun_l18_n697()
+ fun_l19_n985
+end
+
+def fun_l18_n698()
+ fun_l19_n306
+end
+
+def fun_l18_n699()
+ fun_l19_n421
+end
+
+def fun_l18_n700()
+ fun_l19_n62
+end
+
+def fun_l18_n701()
+ fun_l19_n384
+end
+
+def fun_l18_n702()
+ fun_l19_n394
+end
+
+def fun_l18_n703()
+ fun_l19_n707
+end
+
+def fun_l18_n704()
+ fun_l19_n599
+end
+
+def fun_l18_n705()
+ fun_l19_n590
+end
+
+def fun_l18_n706()
+ fun_l19_n49
+end
+
+def fun_l18_n707()
+ fun_l19_n529
+end
+
+def fun_l18_n708()
+ fun_l19_n824
+end
+
+def fun_l18_n709()
+ fun_l19_n481
+end
+
+def fun_l18_n710()
+ fun_l19_n221
+end
+
+def fun_l18_n711()
+ fun_l19_n305
+end
+
+def fun_l18_n712()
+ fun_l19_n612
+end
+
+def fun_l18_n713()
+ fun_l19_n809
+end
+
+def fun_l18_n714()
+ fun_l19_n41
+end
+
+def fun_l18_n715()
+ fun_l19_n477
+end
+
+def fun_l18_n716()
+ fun_l19_n717
+end
+
+def fun_l18_n717()
+ fun_l19_n447
+end
+
+def fun_l18_n718()
+ fun_l19_n501
+end
+
+def fun_l18_n719()
+ fun_l19_n86
+end
+
+def fun_l18_n720()
+ fun_l19_n250
+end
+
+def fun_l18_n721()
+ fun_l19_n504
+end
+
+def fun_l18_n722()
+ fun_l19_n274
+end
+
+def fun_l18_n723()
+ fun_l19_n167
+end
+
+def fun_l18_n724()
+ fun_l19_n824
+end
+
+def fun_l18_n725()
+ fun_l19_n188
+end
+
+def fun_l18_n726()
+ fun_l19_n953
+end
+
+def fun_l18_n727()
+ fun_l19_n61
+end
+
+def fun_l18_n728()
+ fun_l19_n242
+end
+
+def fun_l18_n729()
+ fun_l19_n167
+end
+
+def fun_l18_n730()
+ fun_l19_n936
+end
+
+def fun_l18_n731()
+ fun_l19_n293
+end
+
+def fun_l18_n732()
+ fun_l19_n951
+end
+
+def fun_l18_n733()
+ fun_l19_n235
+end
+
+def fun_l18_n734()
+ fun_l19_n718
+end
+
+def fun_l18_n735()
+ fun_l19_n930
+end
+
+def fun_l18_n736()
+ fun_l19_n842
+end
+
+def fun_l18_n737()
+ fun_l19_n697
+end
+
+def fun_l18_n738()
+ fun_l19_n503
+end
+
+def fun_l18_n739()
+ fun_l19_n789
+end
+
+def fun_l18_n740()
+ fun_l19_n87
+end
+
+def fun_l18_n741()
+ fun_l19_n919
+end
+
+def fun_l18_n742()
+ fun_l19_n26
+end
+
+def fun_l18_n743()
+ fun_l19_n873
+end
+
+def fun_l18_n744()
+ fun_l19_n334
+end
+
+def fun_l18_n745()
+ fun_l19_n112
+end
+
+def fun_l18_n746()
+ fun_l19_n648
+end
+
+def fun_l18_n747()
+ fun_l19_n261
+end
+
+def fun_l18_n748()
+ fun_l19_n617
+end
+
+def fun_l18_n749()
+ fun_l19_n922
+end
+
+def fun_l18_n750()
+ fun_l19_n434
+end
+
+def fun_l18_n751()
+ fun_l19_n842
+end
+
+def fun_l18_n752()
+ fun_l19_n498
+end
+
+def fun_l18_n753()
+ fun_l19_n367
+end
+
+def fun_l18_n754()
+ fun_l19_n799
+end
+
+def fun_l18_n755()
+ fun_l19_n780
+end
+
+def fun_l18_n756()
+ fun_l19_n119
+end
+
+def fun_l18_n757()
+ fun_l19_n871
+end
+
+def fun_l18_n758()
+ fun_l19_n293
+end
+
+def fun_l18_n759()
+ fun_l19_n645
+end
+
+def fun_l18_n760()
+ fun_l19_n226
+end
+
+def fun_l18_n761()
+ fun_l19_n518
+end
+
+def fun_l18_n762()
+ fun_l19_n223
+end
+
+def fun_l18_n763()
+ fun_l19_n859
+end
+
+def fun_l18_n764()
+ fun_l19_n545
+end
+
+def fun_l18_n765()
+ fun_l19_n452
+end
+
+def fun_l18_n766()
+ fun_l19_n538
+end
+
+def fun_l18_n767()
+ fun_l19_n574
+end
+
+def fun_l18_n768()
+ fun_l19_n605
+end
+
+def fun_l18_n769()
+ fun_l19_n794
+end
+
+def fun_l18_n770()
+ fun_l19_n35
+end
+
+def fun_l18_n771()
+ fun_l19_n990
+end
+
+def fun_l18_n772()
+ fun_l19_n276
+end
+
+def fun_l18_n773()
+ fun_l19_n806
+end
+
+def fun_l18_n774()
+ fun_l19_n321
+end
+
+def fun_l18_n775()
+ fun_l19_n874
+end
+
+def fun_l18_n776()
+ fun_l19_n349
+end
+
+def fun_l18_n777()
+ fun_l19_n595
+end
+
+def fun_l18_n778()
+ fun_l19_n944
+end
+
+def fun_l18_n779()
+ fun_l19_n617
+end
+
+def fun_l18_n780()
+ fun_l19_n982
+end
+
+def fun_l18_n781()
+ fun_l19_n395
+end
+
+def fun_l18_n782()
+ fun_l19_n362
+end
+
+def fun_l18_n783()
+ fun_l19_n533
+end
+
+def fun_l18_n784()
+ fun_l19_n646
+end
+
+def fun_l18_n785()
+ fun_l19_n160
+end
+
+def fun_l18_n786()
+ fun_l19_n288
+end
+
+def fun_l18_n787()
+ fun_l19_n381
+end
+
+def fun_l18_n788()
+ fun_l19_n299
+end
+
+def fun_l18_n789()
+ fun_l19_n546
+end
+
+def fun_l18_n790()
+ fun_l19_n906
+end
+
+def fun_l18_n791()
+ fun_l19_n788
+end
+
+def fun_l18_n792()
+ fun_l19_n389
+end
+
+def fun_l18_n793()
+ fun_l19_n593
+end
+
+def fun_l18_n794()
+ fun_l19_n224
+end
+
+def fun_l18_n795()
+ fun_l19_n815
+end
+
+def fun_l18_n796()
+ fun_l19_n533
+end
+
+def fun_l18_n797()
+ fun_l19_n47
+end
+
+def fun_l18_n798()
+ fun_l19_n457
+end
+
+def fun_l18_n799()
+ fun_l19_n951
+end
+
+def fun_l18_n800()
+ fun_l19_n680
+end
+
+def fun_l18_n801()
+ fun_l19_n362
+end
+
+def fun_l18_n802()
+ fun_l19_n667
+end
+
+def fun_l18_n803()
+ fun_l19_n906
+end
+
+def fun_l18_n804()
+ fun_l19_n444
+end
+
+def fun_l18_n805()
+ fun_l19_n562
+end
+
+def fun_l18_n806()
+ fun_l19_n472
+end
+
+def fun_l18_n807()
+ fun_l19_n706
+end
+
+def fun_l18_n808()
+ fun_l19_n611
+end
+
+def fun_l18_n809()
+ fun_l19_n514
+end
+
+def fun_l18_n810()
+ fun_l19_n742
+end
+
+def fun_l18_n811()
+ fun_l19_n144
+end
+
+def fun_l18_n812()
+ fun_l19_n938
+end
+
+def fun_l18_n813()
+ fun_l19_n835
+end
+
+def fun_l18_n814()
+ fun_l19_n127
+end
+
+def fun_l18_n815()
+ fun_l19_n188
+end
+
+def fun_l18_n816()
+ fun_l19_n511
+end
+
+def fun_l18_n817()
+ fun_l19_n919
+end
+
+def fun_l18_n818()
+ fun_l19_n46
+end
+
+def fun_l18_n819()
+ fun_l19_n927
+end
+
+def fun_l18_n820()
+ fun_l19_n655
+end
+
+def fun_l18_n821()
+ fun_l19_n713
+end
+
+def fun_l18_n822()
+ fun_l19_n803
+end
+
+def fun_l18_n823()
+ fun_l19_n116
+end
+
+def fun_l18_n824()
+ fun_l19_n139
+end
+
+def fun_l18_n825()
+ fun_l19_n263
+end
+
+def fun_l18_n826()
+ fun_l19_n728
+end
+
+def fun_l18_n827()
+ fun_l19_n77
+end
+
+def fun_l18_n828()
+ fun_l19_n958
+end
+
+def fun_l18_n829()
+ fun_l19_n827
+end
+
+def fun_l18_n830()
+ fun_l19_n738
+end
+
+def fun_l18_n831()
+ fun_l19_n430
+end
+
+def fun_l18_n832()
+ fun_l19_n16
+end
+
+def fun_l18_n833()
+ fun_l19_n335
+end
+
+def fun_l18_n834()
+ fun_l19_n674
+end
+
+def fun_l18_n835()
+ fun_l19_n938
+end
+
+def fun_l18_n836()
+ fun_l19_n460
+end
+
+def fun_l18_n837()
+ fun_l19_n268
+end
+
+def fun_l18_n838()
+ fun_l19_n250
+end
+
+def fun_l18_n839()
+ fun_l19_n460
+end
+
+def fun_l18_n840()
+ fun_l19_n966
+end
+
+def fun_l18_n841()
+ fun_l19_n228
+end
+
+def fun_l18_n842()
+ fun_l19_n90
+end
+
+def fun_l18_n843()
+ fun_l19_n227
+end
+
+def fun_l18_n844()
+ fun_l19_n494
+end
+
+def fun_l18_n845()
+ fun_l19_n85
+end
+
+def fun_l18_n846()
+ fun_l19_n497
+end
+
+def fun_l18_n847()
+ fun_l19_n395
+end
+
+def fun_l18_n848()
+ fun_l19_n874
+end
+
+def fun_l18_n849()
+ fun_l19_n826
+end
+
+def fun_l18_n850()
+ fun_l19_n467
+end
+
+def fun_l18_n851()
+ fun_l19_n330
+end
+
+def fun_l18_n852()
+ fun_l19_n229
+end
+
+def fun_l18_n853()
+ fun_l19_n172
+end
+
+def fun_l18_n854()
+ fun_l19_n604
+end
+
+def fun_l18_n855()
+ fun_l19_n314
+end
+
+def fun_l18_n856()
+ fun_l19_n553
+end
+
+def fun_l18_n857()
+ fun_l19_n946
+end
+
+def fun_l18_n858()
+ fun_l19_n347
+end
+
+def fun_l18_n859()
+ fun_l19_n566
+end
+
+def fun_l18_n860()
+ fun_l19_n144
+end
+
+def fun_l18_n861()
+ fun_l19_n812
+end
+
+def fun_l18_n862()
+ fun_l19_n615
+end
+
+def fun_l18_n863()
+ fun_l19_n411
+end
+
+def fun_l18_n864()
+ fun_l19_n67
+end
+
+def fun_l18_n865()
+ fun_l19_n830
+end
+
+def fun_l18_n866()
+ fun_l19_n849
+end
+
+def fun_l18_n867()
+ fun_l19_n933
+end
+
+def fun_l18_n868()
+ fun_l19_n892
+end
+
+def fun_l18_n869()
+ fun_l19_n644
+end
+
+def fun_l18_n870()
+ fun_l19_n567
+end
+
+def fun_l18_n871()
+ fun_l19_n558
+end
+
+def fun_l18_n872()
+ fun_l19_n766
+end
+
+def fun_l18_n873()
+ fun_l19_n715
+end
+
+def fun_l18_n874()
+ fun_l19_n641
+end
+
+def fun_l18_n875()
+ fun_l19_n81
+end
+
+def fun_l18_n876()
+ fun_l19_n472
+end
+
+def fun_l18_n877()
+ fun_l19_n907
+end
+
+def fun_l18_n878()
+ fun_l19_n426
+end
+
+def fun_l18_n879()
+ fun_l19_n329
+end
+
+def fun_l18_n880()
+ fun_l19_n935
+end
+
+def fun_l18_n881()
+ fun_l19_n100
+end
+
+def fun_l18_n882()
+ fun_l19_n540
+end
+
+def fun_l18_n883()
+ fun_l19_n905
+end
+
+def fun_l18_n884()
+ fun_l19_n991
+end
+
+def fun_l18_n885()
+ fun_l19_n700
+end
+
+def fun_l18_n886()
+ fun_l19_n698
+end
+
+def fun_l18_n887()
+ fun_l19_n805
+end
+
+def fun_l18_n888()
+ fun_l19_n736
+end
+
+def fun_l18_n889()
+ fun_l19_n386
+end
+
+def fun_l18_n890()
+ fun_l19_n895
+end
+
+def fun_l18_n891()
+ fun_l19_n542
+end
+
+def fun_l18_n892()
+ fun_l19_n261
+end
+
+def fun_l18_n893()
+ fun_l19_n600
+end
+
+def fun_l18_n894()
+ fun_l19_n153
+end
+
+def fun_l18_n895()
+ fun_l19_n767
+end
+
+def fun_l18_n896()
+ fun_l19_n201
+end
+
+def fun_l18_n897()
+ fun_l19_n98
+end
+
+def fun_l18_n898()
+ fun_l19_n423
+end
+
+def fun_l18_n899()
+ fun_l19_n247
+end
+
+def fun_l18_n900()
+ fun_l19_n720
+end
+
+def fun_l18_n901()
+ fun_l19_n1
+end
+
+def fun_l18_n902()
+ fun_l19_n21
+end
+
+def fun_l18_n903()
+ fun_l19_n591
+end
+
+def fun_l18_n904()
+ fun_l19_n36
+end
+
+def fun_l18_n905()
+ fun_l19_n654
+end
+
+def fun_l18_n906()
+ fun_l19_n378
+end
+
+def fun_l18_n907()
+ fun_l19_n841
+end
+
+def fun_l18_n908()
+ fun_l19_n685
+end
+
+def fun_l18_n909()
+ fun_l19_n933
+end
+
+def fun_l18_n910()
+ fun_l19_n71
+end
+
+def fun_l18_n911()
+ fun_l19_n963
+end
+
+def fun_l18_n912()
+ fun_l19_n590
+end
+
+def fun_l18_n913()
+ fun_l19_n24
+end
+
+def fun_l18_n914()
+ fun_l19_n213
+end
+
+def fun_l18_n915()
+ fun_l19_n862
+end
+
+def fun_l18_n916()
+ fun_l19_n2
+end
+
+def fun_l18_n917()
+ fun_l19_n728
+end
+
+def fun_l18_n918()
+ fun_l19_n23
+end
+
+def fun_l18_n919()
+ fun_l19_n345
+end
+
+def fun_l18_n920()
+ fun_l19_n515
+end
+
+def fun_l18_n921()
+ fun_l19_n803
+end
+
+def fun_l18_n922()
+ fun_l19_n378
+end
+
+def fun_l18_n923()
+ fun_l19_n260
+end
+
+def fun_l18_n924()
+ fun_l19_n824
+end
+
+def fun_l18_n925()
+ fun_l19_n698
+end
+
+def fun_l18_n926()
+ fun_l19_n719
+end
+
+def fun_l18_n927()
+ fun_l19_n126
+end
+
+def fun_l18_n928()
+ fun_l19_n647
+end
+
+def fun_l18_n929()
+ fun_l19_n412
+end
+
+def fun_l18_n930()
+ fun_l19_n617
+end
+
+def fun_l18_n931()
+ fun_l19_n295
+end
+
+def fun_l18_n932()
+ fun_l19_n231
+end
+
+def fun_l18_n933()
+ fun_l19_n301
+end
+
+def fun_l18_n934()
+ fun_l19_n25
+end
+
+def fun_l18_n935()
+ fun_l19_n341
+end
+
+def fun_l18_n936()
+ fun_l19_n845
+end
+
+def fun_l18_n937()
+ fun_l19_n97
+end
+
+def fun_l18_n938()
+ fun_l19_n787
+end
+
+def fun_l18_n939()
+ fun_l19_n828
+end
+
+def fun_l18_n940()
+ fun_l19_n298
+end
+
+def fun_l18_n941()
+ fun_l19_n234
+end
+
+def fun_l18_n942()
+ fun_l19_n74
+end
+
+def fun_l18_n943()
+ fun_l19_n928
+end
+
+def fun_l18_n944()
+ fun_l19_n276
+end
+
+def fun_l18_n945()
+ fun_l19_n699
+end
+
+def fun_l18_n946()
+ fun_l19_n507
+end
+
+def fun_l18_n947()
+ fun_l19_n385
+end
+
+def fun_l18_n948()
+ fun_l19_n651
+end
+
+def fun_l18_n949()
+ fun_l19_n315
+end
+
+def fun_l18_n950()
+ fun_l19_n289
+end
+
+def fun_l18_n951()
+ fun_l19_n879
+end
+
+def fun_l18_n952()
+ fun_l19_n549
+end
+
+def fun_l18_n953()
+ fun_l19_n205
+end
+
+def fun_l18_n954()
+ fun_l19_n468
+end
+
+def fun_l18_n955()
+ fun_l19_n11
+end
+
+def fun_l18_n956()
+ fun_l19_n644
+end
+
+def fun_l18_n957()
+ fun_l19_n492
+end
+
+def fun_l18_n958()
+ fun_l19_n94
+end
+
+def fun_l18_n959()
+ fun_l19_n331
+end
+
+def fun_l18_n960()
+ fun_l19_n708
+end
+
+def fun_l18_n961()
+ fun_l19_n646
+end
+
+def fun_l18_n962()
+ fun_l19_n206
+end
+
+def fun_l18_n963()
+ fun_l19_n793
+end
+
+def fun_l18_n964()
+ fun_l19_n426
+end
+
+def fun_l18_n965()
+ fun_l19_n181
+end
+
+def fun_l18_n966()
+ fun_l19_n773
+end
+
+def fun_l18_n967()
+ fun_l19_n324
+end
+
+def fun_l18_n968()
+ fun_l19_n451
+end
+
+def fun_l18_n969()
+ fun_l19_n155
+end
+
+def fun_l18_n970()
+ fun_l19_n812
+end
+
+def fun_l18_n971()
+ fun_l19_n906
+end
+
+def fun_l18_n972()
+ fun_l19_n367
+end
+
+def fun_l18_n973()
+ fun_l19_n260
+end
+
+def fun_l18_n974()
+ fun_l19_n226
+end
+
+def fun_l18_n975()
+ fun_l19_n189
+end
+
+def fun_l18_n976()
+ fun_l19_n32
+end
+
+def fun_l18_n977()
+ fun_l19_n43
+end
+
+def fun_l18_n978()
+ fun_l19_n285
+end
+
+def fun_l18_n979()
+ fun_l19_n511
+end
+
+def fun_l18_n980()
+ fun_l19_n714
+end
+
+def fun_l18_n981()
+ fun_l19_n587
+end
+
+def fun_l18_n982()
+ fun_l19_n247
+end
+
+def fun_l18_n983()
+ fun_l19_n258
+end
+
+def fun_l18_n984()
+ fun_l19_n115
+end
+
+def fun_l18_n985()
+ fun_l19_n873
+end
+
+def fun_l18_n986()
+ fun_l19_n452
+end
+
+def fun_l18_n987()
+ fun_l19_n994
+end
+
+def fun_l18_n988()
+ fun_l19_n912
+end
+
+def fun_l18_n989()
+ fun_l19_n534
+end
+
+def fun_l18_n990()
+ fun_l19_n186
+end
+
+def fun_l18_n991()
+ fun_l19_n49
+end
+
+def fun_l18_n992()
+ fun_l19_n676
+end
+
+def fun_l18_n993()
+ fun_l19_n466
+end
+
+def fun_l18_n994()
+ fun_l19_n571
+end
+
+def fun_l18_n995()
+ fun_l19_n573
+end
+
+def fun_l18_n996()
+ fun_l19_n47
+end
+
+def fun_l18_n997()
+ fun_l19_n657
+end
+
+def fun_l18_n998()
+ fun_l19_n11
+end
+
+def fun_l18_n999()
+ fun_l19_n342
+end
+
+def fun_l19_n0()
+ fun_l20_n278
+end
+
+def fun_l19_n1()
+ fun_l20_n159
+end
+
+def fun_l19_n2()
+ fun_l20_n289
+end
+
+def fun_l19_n3()
+ fun_l20_n766
+end
+
+def fun_l19_n4()
+ fun_l20_n45
+end
+
+def fun_l19_n5()
+ fun_l20_n453
+end
+
+def fun_l19_n6()
+ fun_l20_n581
+end
+
+def fun_l19_n7()
+ fun_l20_n607
+end
+
+def fun_l19_n8()
+ fun_l20_n427
+end
+
+def fun_l19_n9()
+ fun_l20_n287
+end
+
+def fun_l19_n10()
+ fun_l20_n28
+end
+
+def fun_l19_n11()
+ fun_l20_n456
+end
+
+def fun_l19_n12()
+ fun_l20_n283
+end
+
+def fun_l19_n13()
+ fun_l20_n451
+end
+
+def fun_l19_n14()
+ fun_l20_n220
+end
+
+def fun_l19_n15()
+ fun_l20_n497
+end
+
+def fun_l19_n16()
+ fun_l20_n295
+end
+
+def fun_l19_n17()
+ fun_l20_n66
+end
+
+def fun_l19_n18()
+ fun_l20_n863
+end
+
+def fun_l19_n19()
+ fun_l20_n919
+end
+
+def fun_l19_n20()
+ fun_l20_n712
+end
+
+def fun_l19_n21()
+ fun_l20_n323
+end
+
+def fun_l19_n22()
+ fun_l20_n666
+end
+
+def fun_l19_n23()
+ fun_l20_n947
+end
+
+def fun_l19_n24()
+ fun_l20_n422
+end
+
+def fun_l19_n25()
+ fun_l20_n728
+end
+
+def fun_l19_n26()
+ fun_l20_n886
+end
+
+def fun_l19_n27()
+ fun_l20_n585
+end
+
+def fun_l19_n28()
+ fun_l20_n835
+end
+
+def fun_l19_n29()
+ fun_l20_n812
+end
+
+def fun_l19_n30()
+ fun_l20_n425
+end
+
+def fun_l19_n31()
+ fun_l20_n378
+end
+
+def fun_l19_n32()
+ fun_l20_n128
+end
+
+def fun_l19_n33()
+ fun_l20_n714
+end
+
+def fun_l19_n34()
+ fun_l20_n502
+end
+
+def fun_l19_n35()
+ fun_l20_n447
+end
+
+def fun_l19_n36()
+ fun_l20_n512
+end
+
+def fun_l19_n37()
+ fun_l20_n642
+end
+
+def fun_l19_n38()
+ fun_l20_n839
+end
+
+def fun_l19_n39()
+ fun_l20_n539
+end
+
+def fun_l19_n40()
+ fun_l20_n204
+end
+
+def fun_l19_n41()
+ fun_l20_n294
+end
+
+def fun_l19_n42()
+ fun_l20_n360
+end
+
+def fun_l19_n43()
+ fun_l20_n132
+end
+
+def fun_l19_n44()
+ fun_l20_n529
+end
+
+def fun_l19_n45()
+ fun_l20_n783
+end
+
+def fun_l19_n46()
+ fun_l20_n694
+end
+
+def fun_l19_n47()
+ fun_l20_n939
+end
+
+def fun_l19_n48()
+ fun_l20_n972
+end
+
+def fun_l19_n49()
+ fun_l20_n187
+end
+
+def fun_l19_n50()
+ fun_l20_n236
+end
+
+def fun_l19_n51()
+ fun_l20_n218
+end
+
+def fun_l19_n52()
+ fun_l20_n278
+end
+
+def fun_l19_n53()
+ fun_l20_n895
+end
+
+def fun_l19_n54()
+ fun_l20_n967
+end
+
+def fun_l19_n55()
+ fun_l20_n110
+end
+
+def fun_l19_n56()
+ fun_l20_n918
+end
+
+def fun_l19_n57()
+ fun_l20_n458
+end
+
+def fun_l19_n58()
+ fun_l20_n262
+end
+
+def fun_l19_n59()
+ fun_l20_n978
+end
+
+def fun_l19_n60()
+ fun_l20_n434
+end
+
+def fun_l19_n61()
+ fun_l20_n86
+end
+
+def fun_l19_n62()
+ fun_l20_n364
+end
+
+def fun_l19_n63()
+ fun_l20_n92
+end
+
+def fun_l19_n64()
+ fun_l20_n173
+end
+
+def fun_l19_n65()
+ fun_l20_n530
+end
+
+def fun_l19_n66()
+ fun_l20_n291
+end
+
+def fun_l19_n67()
+ fun_l20_n758
+end
+
+def fun_l19_n68()
+ fun_l20_n311
+end
+
+def fun_l19_n69()
+ fun_l20_n984
+end
+
+def fun_l19_n70()
+ fun_l20_n976
+end
+
+def fun_l19_n71()
+ fun_l20_n622
+end
+
+def fun_l19_n72()
+ fun_l20_n467
+end
+
+def fun_l19_n73()
+ fun_l20_n369
+end
+
+def fun_l19_n74()
+ fun_l20_n81
+end
+
+def fun_l19_n75()
+ fun_l20_n6
+end
+
+def fun_l19_n76()
+ fun_l20_n23
+end
+
+def fun_l19_n77()
+ fun_l20_n631
+end
+
+def fun_l19_n78()
+ fun_l20_n535
+end
+
+def fun_l19_n79()
+ fun_l20_n572
+end
+
+def fun_l19_n80()
+ fun_l20_n905
+end
+
+def fun_l19_n81()
+ fun_l20_n709
+end
+
+def fun_l19_n82()
+ fun_l20_n362
+end
+
+def fun_l19_n83()
+ fun_l20_n505
+end
+
+def fun_l19_n84()
+ fun_l20_n247
+end
+
+def fun_l19_n85()
+ fun_l20_n88
+end
+
+def fun_l19_n86()
+ fun_l20_n214
+end
+
+def fun_l19_n87()
+ fun_l20_n607
+end
+
+def fun_l19_n88()
+ fun_l20_n161
+end
+
+def fun_l19_n89()
+ fun_l20_n419
+end
+
+def fun_l19_n90()
+ fun_l20_n514
+end
+
+def fun_l19_n91()
+ fun_l20_n879
+end
+
+def fun_l19_n92()
+ fun_l20_n11
+end
+
+def fun_l19_n93()
+ fun_l20_n269
+end
+
+def fun_l19_n94()
+ fun_l20_n685
+end
+
+def fun_l19_n95()
+ fun_l20_n435
+end
+
+def fun_l19_n96()
+ fun_l20_n183
+end
+
+def fun_l19_n97()
+ fun_l20_n548
+end
+
+def fun_l19_n98()
+ fun_l20_n460
+end
+
+def fun_l19_n99()
+ fun_l20_n636
+end
+
+def fun_l19_n100()
+ fun_l20_n829
+end
+
+def fun_l19_n101()
+ fun_l20_n224
+end
+
+def fun_l19_n102()
+ fun_l20_n291
+end
+
+def fun_l19_n103()
+ fun_l20_n498
+end
+
+def fun_l19_n104()
+ fun_l20_n403
+end
+
+def fun_l19_n105()
+ fun_l20_n699
+end
+
+def fun_l19_n106()
+ fun_l20_n851
+end
+
+def fun_l19_n107()
+ fun_l20_n400
+end
+
+def fun_l19_n108()
+ fun_l20_n834
+end
+
+def fun_l19_n109()
+ fun_l20_n635
+end
+
+def fun_l19_n110()
+ fun_l20_n651
+end
+
+def fun_l19_n111()
+ fun_l20_n930
+end
+
+def fun_l19_n112()
+ fun_l20_n547
+end
+
+def fun_l19_n113()
+ fun_l20_n237
+end
+
+def fun_l19_n114()
+ fun_l20_n298
+end
+
+def fun_l19_n115()
+ fun_l20_n979
+end
+
+def fun_l19_n116()
+ fun_l20_n409
+end
+
+def fun_l19_n117()
+ fun_l20_n942
+end
+
+def fun_l19_n118()
+ fun_l20_n224
+end
+
+def fun_l19_n119()
+ fun_l20_n288
+end
+
+def fun_l19_n120()
+ fun_l20_n42
+end
+
+def fun_l19_n121()
+ fun_l20_n718
+end
+
+def fun_l19_n122()
+ fun_l20_n392
+end
+
+def fun_l19_n123()
+ fun_l20_n375
+end
+
+def fun_l19_n124()
+ fun_l20_n499
+end
+
+def fun_l19_n125()
+ fun_l20_n499
+end
+
+def fun_l19_n126()
+ fun_l20_n998
+end
+
+def fun_l19_n127()
+ fun_l20_n659
+end
+
+def fun_l19_n128()
+ fun_l20_n782
+end
+
+def fun_l19_n129()
+ fun_l20_n607
+end
+
+def fun_l19_n130()
+ fun_l20_n802
+end
+
+def fun_l19_n131()
+ fun_l20_n773
+end
+
+def fun_l19_n132()
+ fun_l20_n861
+end
+
+def fun_l19_n133()
+ fun_l20_n38
+end
+
+def fun_l19_n134()
+ fun_l20_n614
+end
+
+def fun_l19_n135()
+ fun_l20_n546
+end
+
+def fun_l19_n136()
+ fun_l20_n890
+end
+
+def fun_l19_n137()
+ fun_l20_n987
+end
+
+def fun_l19_n138()
+ fun_l20_n518
+end
+
+def fun_l19_n139()
+ fun_l20_n708
+end
+
+def fun_l19_n140()
+ fun_l20_n838
+end
+
+def fun_l19_n141()
+ fun_l20_n642
+end
+
+def fun_l19_n142()
+ fun_l20_n275
+end
+
+def fun_l19_n143()
+ fun_l20_n274
+end
+
+def fun_l19_n144()
+ fun_l20_n479
+end
+
+def fun_l19_n145()
+ fun_l20_n215
+end
+
+def fun_l19_n146()
+ fun_l20_n794
+end
+
+def fun_l19_n147()
+ fun_l20_n329
+end
+
+def fun_l19_n148()
+ fun_l20_n146
+end
+
+def fun_l19_n149()
+ fun_l20_n561
+end
+
+def fun_l19_n150()
+ fun_l20_n782
+end
+
+def fun_l19_n151()
+ fun_l20_n903
+end
+
+def fun_l19_n152()
+ fun_l20_n97
+end
+
+def fun_l19_n153()
+ fun_l20_n962
+end
+
+def fun_l19_n154()
+ fun_l20_n758
+end
+
+def fun_l19_n155()
+ fun_l20_n58
+end
+
+def fun_l19_n156()
+ fun_l20_n683
+end
+
+def fun_l19_n157()
+ fun_l20_n48
+end
+
+def fun_l19_n158()
+ fun_l20_n476
+end
+
+def fun_l19_n159()
+ fun_l20_n19
+end
+
+def fun_l19_n160()
+ fun_l20_n938
+end
+
+def fun_l19_n161()
+ fun_l20_n40
+end
+
+def fun_l19_n162()
+ fun_l20_n817
+end
+
+def fun_l19_n163()
+ fun_l20_n745
+end
+
+def fun_l19_n164()
+ fun_l20_n10
+end
+
+def fun_l19_n165()
+ fun_l20_n486
+end
+
+def fun_l19_n166()
+ fun_l20_n321
+end
+
+def fun_l19_n167()
+ fun_l20_n255
+end
+
+def fun_l19_n168()
+ fun_l20_n286
+end
+
+def fun_l19_n169()
+ fun_l20_n777
+end
+
+def fun_l19_n170()
+ fun_l20_n985
+end
+
+def fun_l19_n171()
+ fun_l20_n827
+end
+
+def fun_l19_n172()
+ fun_l20_n422
+end
+
+def fun_l19_n173()
+ fun_l20_n194
+end
+
+def fun_l19_n174()
+ fun_l20_n399
+end
+
+def fun_l19_n175()
+ fun_l20_n562
+end
+
+def fun_l19_n176()
+ fun_l20_n808
+end
+
+def fun_l19_n177()
+ fun_l20_n646
+end
+
+def fun_l19_n178()
+ fun_l20_n806
+end
+
+def fun_l19_n179()
+ fun_l20_n203
+end
+
+def fun_l19_n180()
+ fun_l20_n426
+end
+
+def fun_l19_n181()
+ fun_l20_n361
+end
+
+def fun_l19_n182()
+ fun_l20_n738
+end
+
+def fun_l19_n183()
+ fun_l20_n446
+end
+
+def fun_l19_n184()
+ fun_l20_n781
+end
+
+def fun_l19_n185()
+ fun_l20_n521
+end
+
+def fun_l19_n186()
+ fun_l20_n599
+end
+
+def fun_l19_n187()
+ fun_l20_n178
+end
+
+def fun_l19_n188()
+ fun_l20_n15
+end
+
+def fun_l19_n189()
+ fun_l20_n846
+end
+
+def fun_l19_n190()
+ fun_l20_n888
+end
+
+def fun_l19_n191()
+ fun_l20_n53
+end
+
+def fun_l19_n192()
+ fun_l20_n943
+end
+
+def fun_l19_n193()
+ fun_l20_n73
+end
+
+def fun_l19_n194()
+ fun_l20_n918
+end
+
+def fun_l19_n195()
+ fun_l20_n924
+end
+
+def fun_l19_n196()
+ fun_l20_n37
+end
+
+def fun_l19_n197()
+ fun_l20_n674
+end
+
+def fun_l19_n198()
+ fun_l20_n167
+end
+
+def fun_l19_n199()
+ fun_l20_n167
+end
+
+def fun_l19_n200()
+ fun_l20_n201
+end
+
+def fun_l19_n201()
+ fun_l20_n785
+end
+
+def fun_l19_n202()
+ fun_l20_n980
+end
+
+def fun_l19_n203()
+ fun_l20_n295
+end
+
+def fun_l19_n204()
+ fun_l20_n586
+end
+
+def fun_l19_n205()
+ fun_l20_n541
+end
+
+def fun_l19_n206()
+ fun_l20_n220
+end
+
+def fun_l19_n207()
+ fun_l20_n956
+end
+
+def fun_l19_n208()
+ fun_l20_n195
+end
+
+def fun_l19_n209()
+ fun_l20_n232
+end
+
+def fun_l19_n210()
+ fun_l20_n91
+end
+
+def fun_l19_n211()
+ fun_l20_n525
+end
+
+def fun_l19_n212()
+ fun_l20_n50
+end
+
+def fun_l19_n213()
+ fun_l20_n635
+end
+
+def fun_l19_n214()
+ fun_l20_n24
+end
+
+def fun_l19_n215()
+ fun_l20_n795
+end
+
+def fun_l19_n216()
+ fun_l20_n743
+end
+
+def fun_l19_n217()
+ fun_l20_n418
+end
+
+def fun_l19_n218()
+ fun_l20_n63
+end
+
+def fun_l19_n219()
+ fun_l20_n866
+end
+
+def fun_l19_n220()
+ fun_l20_n195
+end
+
+def fun_l19_n221()
+ fun_l20_n178
+end
+
+def fun_l19_n222()
+ fun_l20_n147
+end
+
+def fun_l19_n223()
+ fun_l20_n891
+end
+
+def fun_l19_n224()
+ fun_l20_n804
+end
+
+def fun_l19_n225()
+ fun_l20_n379
+end
+
+def fun_l19_n226()
+ fun_l20_n894
+end
+
+def fun_l19_n227()
+ fun_l20_n767
+end
+
+def fun_l19_n228()
+ fun_l20_n532
+end
+
+def fun_l19_n229()
+ fun_l20_n69
+end
+
+def fun_l19_n230()
+ fun_l20_n602
+end
+
+def fun_l19_n231()
+ fun_l20_n933
+end
+
+def fun_l19_n232()
+ fun_l20_n940
+end
+
+def fun_l19_n233()
+ fun_l20_n935
+end
+
+def fun_l19_n234()
+ fun_l20_n234
+end
+
+def fun_l19_n235()
+ fun_l20_n984
+end
+
+def fun_l19_n236()
+ fun_l20_n962
+end
+
+def fun_l19_n237()
+ fun_l20_n334
+end
+
+def fun_l19_n238()
+ fun_l20_n945
+end
+
+def fun_l19_n239()
+ fun_l20_n778
+end
+
+def fun_l19_n240()
+ fun_l20_n946
+end
+
+def fun_l19_n241()
+ fun_l20_n27
+end
+
+def fun_l19_n242()
+ fun_l20_n535
+end
+
+def fun_l19_n243()
+ fun_l20_n940
+end
+
+def fun_l19_n244()
+ fun_l20_n991
+end
+
+def fun_l19_n245()
+ fun_l20_n926
+end
+
+def fun_l19_n246()
+ fun_l20_n945
+end
+
+def fun_l19_n247()
+ fun_l20_n56
+end
+
+def fun_l19_n248()
+ fun_l20_n529
+end
+
+def fun_l19_n249()
+ fun_l20_n497
+end
+
+def fun_l19_n250()
+ fun_l20_n823
+end
+
+def fun_l19_n251()
+ fun_l20_n296
+end
+
+def fun_l19_n252()
+ fun_l20_n342
+end
+
+def fun_l19_n253()
+ fun_l20_n843
+end
+
+def fun_l19_n254()
+ fun_l20_n95
+end
+
+def fun_l19_n255()
+ fun_l20_n0
+end
+
+def fun_l19_n256()
+ fun_l20_n289
+end
+
+def fun_l19_n257()
+ fun_l20_n816
+end
+
+def fun_l19_n258()
+ fun_l20_n318
+end
+
+def fun_l19_n259()
+ fun_l20_n401
+end
+
+def fun_l19_n260()
+ fun_l20_n495
+end
+
+def fun_l19_n261()
+ fun_l20_n331
+end
+
+def fun_l19_n262()
+ fun_l20_n457
+end
+
+def fun_l19_n263()
+ fun_l20_n169
+end
+
+def fun_l19_n264()
+ fun_l20_n736
+end
+
+def fun_l19_n265()
+ fun_l20_n12
+end
+
+def fun_l19_n266()
+ fun_l20_n552
+end
+
+def fun_l19_n267()
+ fun_l20_n350
+end
+
+def fun_l19_n268()
+ fun_l20_n417
+end
+
+def fun_l19_n269()
+ fun_l20_n960
+end
+
+def fun_l19_n270()
+ fun_l20_n251
+end
+
+def fun_l19_n271()
+ fun_l20_n218
+end
+
+def fun_l19_n272()
+ fun_l20_n496
+end
+
+def fun_l19_n273()
+ fun_l20_n262
+end
+
+def fun_l19_n274()
+ fun_l20_n617
+end
+
+def fun_l19_n275()
+ fun_l20_n225
+end
+
+def fun_l19_n276()
+ fun_l20_n878
+end
+
+def fun_l19_n277()
+ fun_l20_n538
+end
+
+def fun_l19_n278()
+ fun_l20_n99
+end
+
+def fun_l19_n279()
+ fun_l20_n654
+end
+
+def fun_l19_n280()
+ fun_l20_n460
+end
+
+def fun_l19_n281()
+ fun_l20_n108
+end
+
+def fun_l19_n282()
+ fun_l20_n62
+end
+
+def fun_l19_n283()
+ fun_l20_n855
+end
+
+def fun_l19_n284()
+ fun_l20_n790
+end
+
+def fun_l19_n285()
+ fun_l20_n838
+end
+
+def fun_l19_n286()
+ fun_l20_n570
+end
+
+def fun_l19_n287()
+ fun_l20_n376
+end
+
+def fun_l19_n288()
+ fun_l20_n219
+end
+
+def fun_l19_n289()
+ fun_l20_n793
+end
+
+def fun_l19_n290()
+ fun_l20_n17
+end
+
+def fun_l19_n291()
+ fun_l20_n408
+end
+
+def fun_l19_n292()
+ fun_l20_n224
+end
+
+def fun_l19_n293()
+ fun_l20_n953
+end
+
+def fun_l19_n294()
+ fun_l20_n0
+end
+
+def fun_l19_n295()
+ fun_l20_n15
+end
+
+def fun_l19_n296()
+ fun_l20_n304
+end
+
+def fun_l19_n297()
+ fun_l20_n917
+end
+
+def fun_l19_n298()
+ fun_l20_n903
+end
+
+def fun_l19_n299()
+ fun_l20_n151
+end
+
+def fun_l19_n300()
+ fun_l20_n704
+end
+
+def fun_l19_n301()
+ fun_l20_n559
+end
+
+def fun_l19_n302()
+ fun_l20_n957
+end
+
+def fun_l19_n303()
+ fun_l20_n607
+end
+
+def fun_l19_n304()
+ fun_l20_n776
+end
+
+def fun_l19_n305()
+ fun_l20_n661
+end
+
+def fun_l19_n306()
+ fun_l20_n545
+end
+
+def fun_l19_n307()
+ fun_l20_n735
+end
+
+def fun_l19_n308()
+ fun_l20_n427
+end
+
+def fun_l19_n309()
+ fun_l20_n427
+end
+
+def fun_l19_n310()
+ fun_l20_n11
+end
+
+def fun_l19_n311()
+ fun_l20_n109
+end
+
+def fun_l19_n312()
+ fun_l20_n84
+end
+
+def fun_l19_n313()
+ fun_l20_n106
+end
+
+def fun_l19_n314()
+ fun_l20_n758
+end
+
+def fun_l19_n315()
+ fun_l20_n343
+end
+
+def fun_l19_n316()
+ fun_l20_n998
+end
+
+def fun_l19_n317()
+ fun_l20_n174
+end
+
+def fun_l19_n318()
+ fun_l20_n12
+end
+
+def fun_l19_n319()
+ fun_l20_n116
+end
+
+def fun_l19_n320()
+ fun_l20_n517
+end
+
+def fun_l19_n321()
+ fun_l20_n15
+end
+
+def fun_l19_n322()
+ fun_l20_n441
+end
+
+def fun_l19_n323()
+ fun_l20_n25
+end
+
+def fun_l19_n324()
+ fun_l20_n101
+end
+
+def fun_l19_n325()
+ fun_l20_n160
+end
+
+def fun_l19_n326()
+ fun_l20_n784
+end
+
+def fun_l19_n327()
+ fun_l20_n940
+end
+
+def fun_l19_n328()
+ fun_l20_n969
+end
+
+def fun_l19_n329()
+ fun_l20_n306
+end
+
+def fun_l19_n330()
+ fun_l20_n337
+end
+
+def fun_l19_n331()
+ fun_l20_n199
+end
+
+def fun_l19_n332()
+ fun_l20_n341
+end
+
+def fun_l19_n333()
+ fun_l20_n2
+end
+
+def fun_l19_n334()
+ fun_l20_n954
+end
+
+def fun_l19_n335()
+ fun_l20_n463
+end
+
+def fun_l19_n336()
+ fun_l20_n16
+end
+
+def fun_l19_n337()
+ fun_l20_n566
+end
+
+def fun_l19_n338()
+ fun_l20_n807
+end
+
+def fun_l19_n339()
+ fun_l20_n785
+end
+
+def fun_l19_n340()
+ fun_l20_n577
+end
+
+def fun_l19_n341()
+ fun_l20_n744
+end
+
+def fun_l19_n342()
+ fun_l20_n769
+end
+
+def fun_l19_n343()
+ fun_l20_n120
+end
+
+def fun_l19_n344()
+ fun_l20_n846
+end
+
+def fun_l19_n345()
+ fun_l20_n7
+end
+
+def fun_l19_n346()
+ fun_l20_n517
+end
+
+def fun_l19_n347()
+ fun_l20_n138
+end
+
+def fun_l19_n348()
+ fun_l20_n551
+end
+
+def fun_l19_n349()
+ fun_l20_n667
+end
+
+def fun_l19_n350()
+ fun_l20_n983
+end
+
+def fun_l19_n351()
+ fun_l20_n941
+end
+
+def fun_l19_n352()
+ fun_l20_n278
+end
+
+def fun_l19_n353()
+ fun_l20_n360
+end
+
+def fun_l19_n354()
+ fun_l20_n327
+end
+
+def fun_l19_n355()
+ fun_l20_n414
+end
+
+def fun_l19_n356()
+ fun_l20_n200
+end
+
+def fun_l19_n357()
+ fun_l20_n298
+end
+
+def fun_l19_n358()
+ fun_l20_n337
+end
+
+def fun_l19_n359()
+ fun_l20_n602
+end
+
+def fun_l19_n360()
+ fun_l20_n631
+end
+
+def fun_l19_n361()
+ fun_l20_n100
+end
+
+def fun_l19_n362()
+ fun_l20_n179
+end
+
+def fun_l19_n363()
+ fun_l20_n710
+end
+
+def fun_l19_n364()
+ fun_l20_n1
+end
+
+def fun_l19_n365()
+ fun_l20_n88
+end
+
+def fun_l19_n366()
+ fun_l20_n98
+end
+
+def fun_l19_n367()
+ fun_l20_n499
+end
+
+def fun_l19_n368()
+ fun_l20_n610
+end
+
+def fun_l19_n369()
+ fun_l20_n243
+end
+
+def fun_l19_n370()
+ fun_l20_n954
+end
+
+def fun_l19_n371()
+ fun_l20_n204
+end
+
+def fun_l19_n372()
+ fun_l20_n618
+end
+
+def fun_l19_n373()
+ fun_l20_n513
+end
+
+def fun_l19_n374()
+ fun_l20_n341
+end
+
+def fun_l19_n375()
+ fun_l20_n31
+end
+
+def fun_l19_n376()
+ fun_l20_n627
+end
+
+def fun_l19_n377()
+ fun_l20_n817
+end
+
+def fun_l19_n378()
+ fun_l20_n545
+end
+
+def fun_l19_n379()
+ fun_l20_n236
+end
+
+def fun_l19_n380()
+ fun_l20_n926
+end
+
+def fun_l19_n381()
+ fun_l20_n167
+end
+
+def fun_l19_n382()
+ fun_l20_n287
+end
+
+def fun_l19_n383()
+ fun_l20_n264
+end
+
+def fun_l19_n384()
+ fun_l20_n16
+end
+
+def fun_l19_n385()
+ fun_l20_n197
+end
+
+def fun_l19_n386()
+ fun_l20_n791
+end
+
+def fun_l19_n387()
+ fun_l20_n124
+end
+
+def fun_l19_n388()
+ fun_l20_n351
+end
+
+def fun_l19_n389()
+ fun_l20_n893
+end
+
+def fun_l19_n390()
+ fun_l20_n191
+end
+
+def fun_l19_n391()
+ fun_l20_n441
+end
+
+def fun_l19_n392()
+ fun_l20_n781
+end
+
+def fun_l19_n393()
+ fun_l20_n614
+end
+
+def fun_l19_n394()
+ fun_l20_n301
+end
+
+def fun_l19_n395()
+ fun_l20_n749
+end
+
+def fun_l19_n396()
+ fun_l20_n815
+end
+
+def fun_l19_n397()
+ fun_l20_n380
+end
+
+def fun_l19_n398()
+ fun_l20_n594
+end
+
+def fun_l19_n399()
+ fun_l20_n279
+end
+
+def fun_l19_n400()
+ fun_l20_n313
+end
+
+def fun_l19_n401()
+ fun_l20_n151
+end
+
+def fun_l19_n402()
+ fun_l20_n101
+end
+
+def fun_l19_n403()
+ fun_l20_n573
+end
+
+def fun_l19_n404()
+ fun_l20_n386
+end
+
+def fun_l19_n405()
+ fun_l20_n40
+end
+
+def fun_l19_n406()
+ fun_l20_n383
+end
+
+def fun_l19_n407()
+ fun_l20_n612
+end
+
+def fun_l19_n408()
+ fun_l20_n555
+end
+
+def fun_l19_n409()
+ fun_l20_n507
+end
+
+def fun_l19_n410()
+ fun_l20_n519
+end
+
+def fun_l19_n411()
+ fun_l20_n842
+end
+
+def fun_l19_n412()
+ fun_l20_n867
+end
+
+def fun_l19_n413()
+ fun_l20_n84
+end
+
+def fun_l19_n414()
+ fun_l20_n84
+end
+
+def fun_l19_n415()
+ fun_l20_n304
+end
+
+def fun_l19_n416()
+ fun_l20_n776
+end
+
+def fun_l19_n417()
+ fun_l20_n712
+end
+
+def fun_l19_n418()
+ fun_l20_n447
+end
+
+def fun_l19_n419()
+ fun_l20_n428
+end
+
+def fun_l19_n420()
+ fun_l20_n350
+end
+
+def fun_l19_n421()
+ fun_l20_n989
+end
+
+def fun_l19_n422()
+ fun_l20_n444
+end
+
+def fun_l19_n423()
+ fun_l20_n771
+end
+
+def fun_l19_n424()
+ fun_l20_n228
+end
+
+def fun_l19_n425()
+ fun_l20_n870
+end
+
+def fun_l19_n426()
+ fun_l20_n553
+end
+
+def fun_l19_n427()
+ fun_l20_n529
+end
+
+def fun_l19_n428()
+ fun_l20_n118
+end
+
+def fun_l19_n429()
+ fun_l20_n886
+end
+
+def fun_l19_n430()
+ fun_l20_n731
+end
+
+def fun_l19_n431()
+ fun_l20_n585
+end
+
+def fun_l19_n432()
+ fun_l20_n997
+end
+
+def fun_l19_n433()
+ fun_l20_n927
+end
+
+def fun_l19_n434()
+ fun_l20_n739
+end
+
+def fun_l19_n435()
+ fun_l20_n691
+end
+
+def fun_l19_n436()
+ fun_l20_n446
+end
+
+def fun_l19_n437()
+ fun_l20_n932
+end
+
+def fun_l19_n438()
+ fun_l20_n297
+end
+
+def fun_l19_n439()
+ fun_l20_n118
+end
+
+def fun_l19_n440()
+ fun_l20_n464
+end
+
+def fun_l19_n441()
+ fun_l20_n367
+end
+
+def fun_l19_n442()
+ fun_l20_n450
+end
+
+def fun_l19_n443()
+ fun_l20_n690
+end
+
+def fun_l19_n444()
+ fun_l20_n996
+end
+
+def fun_l19_n445()
+ fun_l20_n328
+end
+
+def fun_l19_n446()
+ fun_l20_n873
+end
+
+def fun_l19_n447()
+ fun_l20_n843
+end
+
+def fun_l19_n448()
+ fun_l20_n89
+end
+
+def fun_l19_n449()
+ fun_l20_n485
+end
+
+def fun_l19_n450()
+ fun_l20_n343
+end
+
+def fun_l19_n451()
+ fun_l20_n852
+end
+
+def fun_l19_n452()
+ fun_l20_n545
+end
+
+def fun_l19_n453()
+ fun_l20_n41
+end
+
+def fun_l19_n454()
+ fun_l20_n376
+end
+
+def fun_l19_n455()
+ fun_l20_n625
+end
+
+def fun_l19_n456()
+ fun_l20_n495
+end
+
+def fun_l19_n457()
+ fun_l20_n82
+end
+
+def fun_l19_n458()
+ fun_l20_n238
+end
+
+def fun_l19_n459()
+ fun_l20_n355
+end
+
+def fun_l19_n460()
+ fun_l20_n530
+end
+
+def fun_l19_n461()
+ fun_l20_n926
+end
+
+def fun_l19_n462()
+ fun_l20_n721
+end
+
+def fun_l19_n463()
+ fun_l20_n724
+end
+
+def fun_l19_n464()
+ fun_l20_n280
+end
+
+def fun_l19_n465()
+ fun_l20_n656
+end
+
+def fun_l19_n466()
+ fun_l20_n78
+end
+
+def fun_l19_n467()
+ fun_l20_n353
+end
+
+def fun_l19_n468()
+ fun_l20_n712
+end
+
+def fun_l19_n469()
+ fun_l20_n849
+end
+
+def fun_l19_n470()
+ fun_l20_n682
+end
+
+def fun_l19_n471()
+ fun_l20_n964
+end
+
+def fun_l19_n472()
+ fun_l20_n483
+end
+
+def fun_l19_n473()
+ fun_l20_n6
+end
+
+def fun_l19_n474()
+ fun_l20_n19
+end
+
+def fun_l19_n475()
+ fun_l20_n206
+end
+
+def fun_l19_n476()
+ fun_l20_n165
+end
+
+def fun_l19_n477()
+ fun_l20_n514
+end
+
+def fun_l19_n478()
+ fun_l20_n380
+end
+
+def fun_l19_n479()
+ fun_l20_n381
+end
+
+def fun_l19_n480()
+ fun_l20_n210
+end
+
+def fun_l19_n481()
+ fun_l20_n972
+end
+
+def fun_l19_n482()
+ fun_l20_n211
+end
+
+def fun_l19_n483()
+ fun_l20_n795
+end
+
+def fun_l19_n484()
+ fun_l20_n441
+end
+
+def fun_l19_n485()
+ fun_l20_n539
+end
+
+def fun_l19_n486()
+ fun_l20_n217
+end
+
+def fun_l19_n487()
+ fun_l20_n644
+end
+
+def fun_l19_n488()
+ fun_l20_n641
+end
+
+def fun_l19_n489()
+ fun_l20_n179
+end
+
+def fun_l19_n490()
+ fun_l20_n643
+end
+
+def fun_l19_n491()
+ fun_l20_n797
+end
+
+def fun_l19_n492()
+ fun_l20_n863
+end
+
+def fun_l19_n493()
+ fun_l20_n915
+end
+
+def fun_l19_n494()
+ fun_l20_n13
+end
+
+def fun_l19_n495()
+ fun_l20_n427
+end
+
+def fun_l19_n496()
+ fun_l20_n40
+end
+
+def fun_l19_n497()
+ fun_l20_n724
+end
+
+def fun_l19_n498()
+ fun_l20_n666
+end
+
+def fun_l19_n499()
+ fun_l20_n876
+end
+
+def fun_l19_n500()
+ fun_l20_n980
+end
+
+def fun_l19_n501()
+ fun_l20_n817
+end
+
+def fun_l19_n502()
+ fun_l20_n158
+end
+
+def fun_l19_n503()
+ fun_l20_n738
+end
+
+def fun_l19_n504()
+ fun_l20_n347
+end
+
+def fun_l19_n505()
+ fun_l20_n941
+end
+
+def fun_l19_n506()
+ fun_l20_n330
+end
+
+def fun_l19_n507()
+ fun_l20_n196
+end
+
+def fun_l19_n508()
+ fun_l20_n961
+end
+
+def fun_l19_n509()
+ fun_l20_n909
+end
+
+def fun_l19_n510()
+ fun_l20_n489
+end
+
+def fun_l19_n511()
+ fun_l20_n341
+end
+
+def fun_l19_n512()
+ fun_l20_n437
+end
+
+def fun_l19_n513()
+ fun_l20_n293
+end
+
+def fun_l19_n514()
+ fun_l20_n388
+end
+
+def fun_l19_n515()
+ fun_l20_n85
+end
+
+def fun_l19_n516()
+ fun_l20_n769
+end
+
+def fun_l19_n517()
+ fun_l20_n875
+end
+
+def fun_l19_n518()
+ fun_l20_n247
+end
+
+def fun_l19_n519()
+ fun_l20_n607
+end
+
+def fun_l19_n520()
+ fun_l20_n119
+end
+
+def fun_l19_n521()
+ fun_l20_n44
+end
+
+def fun_l19_n522()
+ fun_l20_n870
+end
+
+def fun_l19_n523()
+ fun_l20_n815
+end
+
+def fun_l19_n524()
+ fun_l20_n393
+end
+
+def fun_l19_n525()
+ fun_l20_n158
+end
+
+def fun_l19_n526()
+ fun_l20_n139
+end
+
+def fun_l19_n527()
+ fun_l20_n808
+end
+
+def fun_l19_n528()
+ fun_l20_n549
+end
+
+def fun_l19_n529()
+ fun_l20_n725
+end
+
+def fun_l19_n530()
+ fun_l20_n758
+end
+
+def fun_l19_n531()
+ fun_l20_n650
+end
+
+def fun_l19_n532()
+ fun_l20_n739
+end
+
+def fun_l19_n533()
+ fun_l20_n912
+end
+
+def fun_l19_n534()
+ fun_l20_n632
+end
+
+def fun_l19_n535()
+ fun_l20_n889
+end
+
+def fun_l19_n536()
+ fun_l20_n609
+end
+
+def fun_l19_n537()
+ fun_l20_n997
+end
+
+def fun_l19_n538()
+ fun_l20_n773
+end
+
+def fun_l19_n539()
+ fun_l20_n48
+end
+
+def fun_l19_n540()
+ fun_l20_n102
+end
+
+def fun_l19_n541()
+ fun_l20_n392
+end
+
+def fun_l19_n542()
+ fun_l20_n570
+end
+
+def fun_l19_n543()
+ fun_l20_n36
+end
+
+def fun_l19_n544()
+ fun_l20_n400
+end
+
+def fun_l19_n545()
+ fun_l20_n545
+end
+
+def fun_l19_n546()
+ fun_l20_n27
+end
+
+def fun_l19_n547()
+ fun_l20_n746
+end
+
+def fun_l19_n548()
+ fun_l20_n796
+end
+
+def fun_l19_n549()
+ fun_l20_n651
+end
+
+def fun_l19_n550()
+ fun_l20_n719
+end
+
+def fun_l19_n551()
+ fun_l20_n941
+end
+
+def fun_l19_n552()
+ fun_l20_n799
+end
+
+def fun_l19_n553()
+ fun_l20_n900
+end
+
+def fun_l19_n554()
+ fun_l20_n288
+end
+
+def fun_l19_n555()
+ fun_l20_n52
+end
+
+def fun_l19_n556()
+ fun_l20_n497
+end
+
+def fun_l19_n557()
+ fun_l20_n781
+end
+
+def fun_l19_n558()
+ fun_l20_n209
+end
+
+def fun_l19_n559()
+ fun_l20_n157
+end
+
+def fun_l19_n560()
+ fun_l20_n102
+end
+
+def fun_l19_n561()
+ fun_l20_n248
+end
+
+def fun_l19_n562()
+ fun_l20_n760
+end
+
+def fun_l19_n563()
+ fun_l20_n640
+end
+
+def fun_l19_n564()
+ fun_l20_n30
+end
+
+def fun_l19_n565()
+ fun_l20_n375
+end
+
+def fun_l19_n566()
+ fun_l20_n472
+end
+
+def fun_l19_n567()
+ fun_l20_n223
+end
+
+def fun_l19_n568()
+ fun_l20_n834
+end
+
+def fun_l19_n569()
+ fun_l20_n804
+end
+
+def fun_l19_n570()
+ fun_l20_n620
+end
+
+def fun_l19_n571()
+ fun_l20_n942
+end
+
+def fun_l19_n572()
+ fun_l20_n58
+end
+
+def fun_l19_n573()
+ fun_l20_n113
+end
+
+def fun_l19_n574()
+ fun_l20_n884
+end
+
+def fun_l19_n575()
+ fun_l20_n965
+end
+
+def fun_l19_n576()
+ fun_l20_n975
+end
+
+def fun_l19_n577()
+ fun_l20_n840
+end
+
+def fun_l19_n578()
+ fun_l20_n422
+end
+
+def fun_l19_n579()
+ fun_l20_n213
+end
+
+def fun_l19_n580()
+ fun_l20_n338
+end
+
+def fun_l19_n581()
+ fun_l20_n823
+end
+
+def fun_l19_n582()
+ fun_l20_n284
+end
+
+def fun_l19_n583()
+ fun_l20_n706
+end
+
+def fun_l19_n584()
+ fun_l20_n148
+end
+
+def fun_l19_n585()
+ fun_l20_n750
+end
+
+def fun_l19_n586()
+ fun_l20_n556
+end
+
+def fun_l19_n587()
+ fun_l20_n939
+end
+
+def fun_l19_n588()
+ fun_l20_n885
+end
+
+def fun_l19_n589()
+ fun_l20_n36
+end
+
+def fun_l19_n590()
+ fun_l20_n771
+end
+
+def fun_l19_n591()
+ fun_l20_n958
+end
+
+def fun_l19_n592()
+ fun_l20_n829
+end
+
+def fun_l19_n593()
+ fun_l20_n334
+end
+
+def fun_l19_n594()
+ fun_l20_n546
+end
+
+def fun_l19_n595()
+ fun_l20_n269
+end
+
+def fun_l19_n596()
+ fun_l20_n528
+end
+
+def fun_l19_n597()
+ fun_l20_n63
+end
+
+def fun_l19_n598()
+ fun_l20_n10
+end
+
+def fun_l19_n599()
+ fun_l20_n160
+end
+
+def fun_l19_n600()
+ fun_l20_n750
+end
+
+def fun_l19_n601()
+ fun_l20_n307
+end
+
+def fun_l19_n602()
+ fun_l20_n700
+end
+
+def fun_l19_n603()
+ fun_l20_n720
+end
+
+def fun_l19_n604()
+ fun_l20_n60
+end
+
+def fun_l19_n605()
+ fun_l20_n179
+end
+
+def fun_l19_n606()
+ fun_l20_n425
+end
+
+def fun_l19_n607()
+ fun_l20_n489
+end
+
+def fun_l19_n608()
+ fun_l20_n804
+end
+
+def fun_l19_n609()
+ fun_l20_n276
+end
+
+def fun_l19_n610()
+ fun_l20_n888
+end
+
+def fun_l19_n611()
+ fun_l20_n412
+end
+
+def fun_l19_n612()
+ fun_l20_n715
+end
+
+def fun_l19_n613()
+ fun_l20_n737
+end
+
+def fun_l19_n614()
+ fun_l20_n332
+end
+
+def fun_l19_n615()
+ fun_l20_n4
+end
+
+def fun_l19_n616()
+ fun_l20_n114
+end
+
+def fun_l19_n617()
+ fun_l20_n502
+end
+
+def fun_l19_n618()
+ fun_l20_n825
+end
+
+def fun_l19_n619()
+ fun_l20_n606
+end
+
+def fun_l19_n620()
+ fun_l20_n396
+end
+
+def fun_l19_n621()
+ fun_l20_n810
+end
+
+def fun_l19_n622()
+ fun_l20_n158
+end
+
+def fun_l19_n623()
+ fun_l20_n246
+end
+
+def fun_l19_n624()
+ fun_l20_n973
+end
+
+def fun_l19_n625()
+ fun_l20_n603
+end
+
+def fun_l19_n626()
+ fun_l20_n192
+end
+
+def fun_l19_n627()
+ fun_l20_n744
+end
+
+def fun_l19_n628()
+ fun_l20_n82
+end
+
+def fun_l19_n629()
+ fun_l20_n491
+end
+
+def fun_l19_n630()
+ fun_l20_n576
+end
+
+def fun_l19_n631()
+ fun_l20_n824
+end
+
+def fun_l19_n632()
+ fun_l20_n711
+end
+
+def fun_l19_n633()
+ fun_l20_n989
+end
+
+def fun_l19_n634()
+ fun_l20_n392
+end
+
+def fun_l19_n635()
+ fun_l20_n39
+end
+
+def fun_l19_n636()
+ fun_l20_n755
+end
+
+def fun_l19_n637()
+ fun_l20_n181
+end
+
+def fun_l19_n638()
+ fun_l20_n538
+end
+
+def fun_l19_n639()
+ fun_l20_n801
+end
+
+def fun_l19_n640()
+ fun_l20_n837
+end
+
+def fun_l19_n641()
+ fun_l20_n587
+end
+
+def fun_l19_n642()
+ fun_l20_n680
+end
+
+def fun_l19_n643()
+ fun_l20_n157
+end
+
+def fun_l19_n644()
+ fun_l20_n885
+end
+
+def fun_l19_n645()
+ fun_l20_n421
+end
+
+def fun_l19_n646()
+ fun_l20_n928
+end
+
+def fun_l19_n647()
+ fun_l20_n819
+end
+
+def fun_l19_n648()
+ fun_l20_n206
+end
+
+def fun_l19_n649()
+ fun_l20_n496
+end
+
+def fun_l19_n650()
+ fun_l20_n706
+end
+
+def fun_l19_n651()
+ fun_l20_n976
+end
+
+def fun_l19_n652()
+ fun_l20_n54
+end
+
+def fun_l19_n653()
+ fun_l20_n530
+end
+
+def fun_l19_n654()
+ fun_l20_n893
+end
+
+def fun_l19_n655()
+ fun_l20_n148
+end
+
+def fun_l19_n656()
+ fun_l20_n461
+end
+
+def fun_l19_n657()
+ fun_l20_n286
+end
+
+def fun_l19_n658()
+ fun_l20_n214
+end
+
+def fun_l19_n659()
+ fun_l20_n818
+end
+
+def fun_l19_n660()
+ fun_l20_n685
+end
+
+def fun_l19_n661()
+ fun_l20_n497
+end
+
+def fun_l19_n662()
+ fun_l20_n251
+end
+
+def fun_l19_n663()
+ fun_l20_n385
+end
+
+def fun_l19_n664()
+ fun_l20_n93
+end
+
+def fun_l19_n665()
+ fun_l20_n853
+end
+
+def fun_l19_n666()
+ fun_l20_n298
+end
+
+def fun_l19_n667()
+ fun_l20_n300
+end
+
+def fun_l19_n668()
+ fun_l20_n702
+end
+
+def fun_l19_n669()
+ fun_l20_n430
+end
+
+def fun_l19_n670()
+ fun_l20_n688
+end
+
+def fun_l19_n671()
+ fun_l20_n272
+end
+
+def fun_l19_n672()
+ fun_l20_n351
+end
+
+def fun_l19_n673()
+ fun_l20_n290
+end
+
+def fun_l19_n674()
+ fun_l20_n45
+end
+
+def fun_l19_n675()
+ fun_l20_n530
+end
+
+def fun_l19_n676()
+ fun_l20_n477
+end
+
+def fun_l19_n677()
+ fun_l20_n770
+end
+
+def fun_l19_n678()
+ fun_l20_n49
+end
+
+def fun_l19_n679()
+ fun_l20_n404
+end
+
+def fun_l19_n680()
+ fun_l20_n344
+end
+
+def fun_l19_n681()
+ fun_l20_n707
+end
+
+def fun_l19_n682()
+ fun_l20_n18
+end
+
+def fun_l19_n683()
+ fun_l20_n590
+end
+
+def fun_l19_n684()
+ fun_l20_n281
+end
+
+def fun_l19_n685()
+ fun_l20_n913
+end
+
+def fun_l19_n686()
+ fun_l20_n884
+end
+
+def fun_l19_n687()
+ fun_l20_n696
+end
+
+def fun_l19_n688()
+ fun_l20_n727
+end
+
+def fun_l19_n689()
+ fun_l20_n168
+end
+
+def fun_l19_n690()
+ fun_l20_n178
+end
+
+def fun_l19_n691()
+ fun_l20_n414
+end
+
+def fun_l19_n692()
+ fun_l20_n331
+end
+
+def fun_l19_n693()
+ fun_l20_n701
+end
+
+def fun_l19_n694()
+ fun_l20_n795
+end
+
+def fun_l19_n695()
+ fun_l20_n413
+end
+
+def fun_l19_n696()
+ fun_l20_n613
+end
+
+def fun_l19_n697()
+ fun_l20_n129
+end
+
+def fun_l19_n698()
+ fun_l20_n162
+end
+
+def fun_l19_n699()
+ fun_l20_n24
+end
+
+def fun_l19_n700()
+ fun_l20_n497
+end
+
+def fun_l19_n701()
+ fun_l20_n850
+end
+
+def fun_l19_n702()
+ fun_l20_n28
+end
+
+def fun_l19_n703()
+ fun_l20_n571
+end
+
+def fun_l19_n704()
+ fun_l20_n77
+end
+
+def fun_l19_n705()
+ fun_l20_n705
+end
+
+def fun_l19_n706()
+ fun_l20_n473
+end
+
+def fun_l19_n707()
+ fun_l20_n993
+end
+
+def fun_l19_n708()
+ fun_l20_n51
+end
+
+def fun_l19_n709()
+ fun_l20_n921
+end
+
+def fun_l19_n710()
+ fun_l20_n773
+end
+
+def fun_l19_n711()
+ fun_l20_n137
+end
+
+def fun_l19_n712()
+ fun_l20_n127
+end
+
+def fun_l19_n713()
+ fun_l20_n714
+end
+
+def fun_l19_n714()
+ fun_l20_n76
+end
+
+def fun_l19_n715()
+ fun_l20_n909
+end
+
+def fun_l19_n716()
+ fun_l20_n206
+end
+
+def fun_l19_n717()
+ fun_l20_n37
+end
+
+def fun_l19_n718()
+ fun_l20_n121
+end
+
+def fun_l19_n719()
+ fun_l20_n438
+end
+
+def fun_l19_n720()
+ fun_l20_n42
+end
+
+def fun_l19_n721()
+ fun_l20_n743
+end
+
+def fun_l19_n722()
+ fun_l20_n730
+end
+
+def fun_l19_n723()
+ fun_l20_n190
+end
+
+def fun_l19_n724()
+ fun_l20_n817
+end
+
+def fun_l19_n725()
+ fun_l20_n119
+end
+
+def fun_l19_n726()
+ fun_l20_n201
+end
+
+def fun_l19_n727()
+ fun_l20_n9
+end
+
+def fun_l19_n728()
+ fun_l20_n666
+end
+
+def fun_l19_n729()
+ fun_l20_n595
+end
+
+def fun_l19_n730()
+ fun_l20_n285
+end
+
+def fun_l19_n731()
+ fun_l20_n586
+end
+
+def fun_l19_n732()
+ fun_l20_n228
+end
+
+def fun_l19_n733()
+ fun_l20_n663
+end
+
+def fun_l19_n734()
+ fun_l20_n810
+end
+
+def fun_l19_n735()
+ fun_l20_n348
+end
+
+def fun_l19_n736()
+ fun_l20_n316
+end
+
+def fun_l19_n737()
+ fun_l20_n140
+end
+
+def fun_l19_n738()
+ fun_l20_n668
+end
+
+def fun_l19_n739()
+ fun_l20_n956
+end
+
+def fun_l19_n740()
+ fun_l20_n252
+end
+
+def fun_l19_n741()
+ fun_l20_n490
+end
+
+def fun_l19_n742()
+ fun_l20_n6
+end
+
+def fun_l19_n743()
+ fun_l20_n389
+end
+
+def fun_l19_n744()
+ fun_l20_n939
+end
+
+def fun_l19_n745()
+ fun_l20_n152
+end
+
+def fun_l19_n746()
+ fun_l20_n895
+end
+
+def fun_l19_n747()
+ fun_l20_n769
+end
+
+def fun_l19_n748()
+ fun_l20_n100
+end
+
+def fun_l19_n749()
+ fun_l20_n492
+end
+
+def fun_l19_n750()
+ fun_l20_n410
+end
+
+def fun_l19_n751()
+ fun_l20_n514
+end
+
+def fun_l19_n752()
+ fun_l20_n801
+end
+
+def fun_l19_n753()
+ fun_l20_n148
+end
+
+def fun_l19_n754()
+ fun_l20_n179
+end
+
+def fun_l19_n755()
+ fun_l20_n35
+end
+
+def fun_l19_n756()
+ fun_l20_n60
+end
+
+def fun_l19_n757()
+ fun_l20_n247
+end
+
+def fun_l19_n758()
+ fun_l20_n783
+end
+
+def fun_l19_n759()
+ fun_l20_n357
+end
+
+def fun_l19_n760()
+ fun_l20_n245
+end
+
+def fun_l19_n761()
+ fun_l20_n26
+end
+
+def fun_l19_n762()
+ fun_l20_n77
+end
+
+def fun_l19_n763()
+ fun_l20_n886
+end
+
+def fun_l19_n764()
+ fun_l20_n375
+end
+
+def fun_l19_n765()
+ fun_l20_n238
+end
+
+def fun_l19_n766()
+ fun_l20_n444
+end
+
+def fun_l19_n767()
+ fun_l20_n665
+end
+
+def fun_l19_n768()
+ fun_l20_n328
+end
+
+def fun_l19_n769()
+ fun_l20_n598
+end
+
+def fun_l19_n770()
+ fun_l20_n988
+end
+
+def fun_l19_n771()
+ fun_l20_n350
+end
+
+def fun_l19_n772()
+ fun_l20_n474
+end
+
+def fun_l19_n773()
+ fun_l20_n460
+end
+
+def fun_l19_n774()
+ fun_l20_n535
+end
+
+def fun_l19_n775()
+ fun_l20_n451
+end
+
+def fun_l19_n776()
+ fun_l20_n945
+end
+
+def fun_l19_n777()
+ fun_l20_n902
+end
+
+def fun_l19_n778()
+ fun_l20_n714
+end
+
+def fun_l19_n779()
+ fun_l20_n5
+end
+
+def fun_l19_n780()
+ fun_l20_n32
+end
+
+def fun_l19_n781()
+ fun_l20_n99
+end
+
+def fun_l19_n782()
+ fun_l20_n931
+end
+
+def fun_l19_n783()
+ fun_l20_n664
+end
+
+def fun_l19_n784()
+ fun_l20_n676
+end
+
+def fun_l19_n785()
+ fun_l20_n671
+end
+
+def fun_l19_n786()
+ fun_l20_n982
+end
+
+def fun_l19_n787()
+ fun_l20_n754
+end
+
+def fun_l19_n788()
+ fun_l20_n945
+end
+
+def fun_l19_n789()
+ fun_l20_n130
+end
+
+def fun_l19_n790()
+ fun_l20_n390
+end
+
+def fun_l19_n791()
+ fun_l20_n999
+end
+
+def fun_l19_n792()
+ fun_l20_n138
+end
+
+def fun_l19_n793()
+ fun_l20_n180
+end
+
+def fun_l19_n794()
+ fun_l20_n897
+end
+
+def fun_l19_n795()
+ fun_l20_n85
+end
+
+def fun_l19_n796()
+ fun_l20_n295
+end
+
+def fun_l19_n797()
+ fun_l20_n577
+end
+
+def fun_l19_n798()
+ fun_l20_n131
+end
+
+def fun_l19_n799()
+ fun_l20_n847
+end
+
+def fun_l19_n800()
+ fun_l20_n703
+end
+
+def fun_l19_n801()
+ fun_l20_n82
+end
+
+def fun_l19_n802()
+ fun_l20_n758
+end
+
+def fun_l19_n803()
+ fun_l20_n789
+end
+
+def fun_l19_n804()
+ fun_l20_n353
+end
+
+def fun_l19_n805()
+ fun_l20_n957
+end
+
+def fun_l19_n806()
+ fun_l20_n135
+end
+
+def fun_l19_n807()
+ fun_l20_n87
+end
+
+def fun_l19_n808()
+ fun_l20_n428
+end
+
+def fun_l19_n809()
+ fun_l20_n660
+end
+
+def fun_l19_n810()
+ fun_l20_n844
+end
+
+def fun_l19_n811()
+ fun_l20_n816
+end
+
+def fun_l19_n812()
+ fun_l20_n478
+end
+
+def fun_l19_n813()
+ fun_l20_n823
+end
+
+def fun_l19_n814()
+ fun_l20_n28
+end
+
+def fun_l19_n815()
+ fun_l20_n965
+end
+
+def fun_l19_n816()
+ fun_l20_n469
+end
+
+def fun_l19_n817()
+ fun_l20_n31
+end
+
+def fun_l19_n818()
+ fun_l20_n639
+end
+
+def fun_l19_n819()
+ fun_l20_n831
+end
+
+def fun_l19_n820()
+ fun_l20_n337
+end
+
+def fun_l19_n821()
+ fun_l20_n330
+end
+
+def fun_l19_n822()
+ fun_l20_n366
+end
+
+def fun_l19_n823()
+ fun_l20_n992
+end
+
+def fun_l19_n824()
+ fun_l20_n349
+end
+
+def fun_l19_n825()
+ fun_l20_n291
+end
+
+def fun_l19_n826()
+ fun_l20_n110
+end
+
+def fun_l19_n827()
+ fun_l20_n204
+end
+
+def fun_l19_n828()
+ fun_l20_n122
+end
+
+def fun_l19_n829()
+ fun_l20_n683
+end
+
+def fun_l19_n830()
+ fun_l20_n759
+end
+
+def fun_l19_n831()
+ fun_l20_n619
+end
+
+def fun_l19_n832()
+ fun_l20_n102
+end
+
+def fun_l19_n833()
+ fun_l20_n532
+end
+
+def fun_l19_n834()
+ fun_l20_n620
+end
+
+def fun_l19_n835()
+ fun_l20_n511
+end
+
+def fun_l19_n836()
+ fun_l20_n80
+end
+
+def fun_l19_n837()
+ fun_l20_n731
+end
+
+def fun_l19_n838()
+ fun_l20_n975
+end
+
+def fun_l19_n839()
+ fun_l20_n947
+end
+
+def fun_l19_n840()
+ fun_l20_n243
+end
+
+def fun_l19_n841()
+ fun_l20_n168
+end
+
+def fun_l19_n842()
+ fun_l20_n31
+end
+
+def fun_l19_n843()
+ fun_l20_n979
+end
+
+def fun_l19_n844()
+ fun_l20_n232
+end
+
+def fun_l19_n845()
+ fun_l20_n596
+end
+
+def fun_l19_n846()
+ fun_l20_n415
+end
+
+def fun_l19_n847()
+ fun_l20_n380
+end
+
+def fun_l19_n848()
+ fun_l20_n904
+end
+
+def fun_l19_n849()
+ fun_l20_n858
+end
+
+def fun_l19_n850()
+ fun_l20_n70
+end
+
+def fun_l19_n851()
+ fun_l20_n204
+end
+
+def fun_l19_n852()
+ fun_l20_n501
+end
+
+def fun_l19_n853()
+ fun_l20_n901
+end
+
+def fun_l19_n854()
+ fun_l20_n107
+end
+
+def fun_l19_n855()
+ fun_l20_n391
+end
+
+def fun_l19_n856()
+ fun_l20_n225
+end
+
+def fun_l19_n857()
+ fun_l20_n173
+end
+
+def fun_l19_n858()
+ fun_l20_n143
+end
+
+def fun_l19_n859()
+ fun_l20_n482
+end
+
+def fun_l19_n860()
+ fun_l20_n614
+end
+
+def fun_l19_n861()
+ fun_l20_n819
+end
+
+def fun_l19_n862()
+ fun_l20_n536
+end
+
+def fun_l19_n863()
+ fun_l20_n370
+end
+
+def fun_l19_n864()
+ fun_l20_n139
+end
+
+def fun_l19_n865()
+ fun_l20_n434
+end
+
+def fun_l19_n866()
+ fun_l20_n529
+end
+
+def fun_l19_n867()
+ fun_l20_n770
+end
+
+def fun_l19_n868()
+ fun_l20_n507
+end
+
+def fun_l19_n869()
+ fun_l20_n453
+end
+
+def fun_l19_n870()
+ fun_l20_n417
+end
+
+def fun_l19_n871()
+ fun_l20_n305
+end
+
+def fun_l19_n872()
+ fun_l20_n537
+end
+
+def fun_l19_n873()
+ fun_l20_n613
+end
+
+def fun_l19_n874()
+ fun_l20_n920
+end
+
+def fun_l19_n875()
+ fun_l20_n623
+end
+
+def fun_l19_n876()
+ fun_l20_n212
+end
+
+def fun_l19_n877()
+ fun_l20_n980
+end
+
+def fun_l19_n878()
+ fun_l20_n580
+end
+
+def fun_l19_n879()
+ fun_l20_n112
+end
+
+def fun_l19_n880()
+ fun_l20_n460
+end
+
+def fun_l19_n881()
+ fun_l20_n364
+end
+
+def fun_l19_n882()
+ fun_l20_n685
+end
+
+def fun_l19_n883()
+ fun_l20_n429
+end
+
+def fun_l19_n884()
+ fun_l20_n90
+end
+
+def fun_l19_n885()
+ fun_l20_n448
+end
+
+def fun_l19_n886()
+ fun_l20_n898
+end
+
+def fun_l19_n887()
+ fun_l20_n10
+end
+
+def fun_l19_n888()
+ fun_l20_n618
+end
+
+def fun_l19_n889()
+ fun_l20_n447
+end
+
+def fun_l19_n890()
+ fun_l20_n414
+end
+
+def fun_l19_n891()
+ fun_l20_n570
+end
+
+def fun_l19_n892()
+ fun_l20_n828
+end
+
+def fun_l19_n893()
+ fun_l20_n367
+end
+
+def fun_l19_n894()
+ fun_l20_n897
+end
+
+def fun_l19_n895()
+ fun_l20_n978
+end
+
+def fun_l19_n896()
+ fun_l20_n57
+end
+
+def fun_l19_n897()
+ fun_l20_n61
+end
+
+def fun_l19_n898()
+ fun_l20_n483
+end
+
+def fun_l19_n899()
+ fun_l20_n407
+end
+
+def fun_l19_n900()
+ fun_l20_n369
+end
+
+def fun_l19_n901()
+ fun_l20_n635
+end
+
+def fun_l19_n902()
+ fun_l20_n800
+end
+
+def fun_l19_n903()
+ fun_l20_n748
+end
+
+def fun_l19_n904()
+ fun_l20_n436
+end
+
+def fun_l19_n905()
+ fun_l20_n990
+end
+
+def fun_l19_n906()
+ fun_l20_n484
+end
+
+def fun_l19_n907()
+ fun_l20_n530
+end
+
+def fun_l19_n908()
+ fun_l20_n692
+end
+
+def fun_l19_n909()
+ fun_l20_n356
+end
+
+def fun_l19_n910()
+ fun_l20_n786
+end
+
+def fun_l19_n911()
+ fun_l20_n894
+end
+
+def fun_l19_n912()
+ fun_l20_n217
+end
+
+def fun_l19_n913()
+ fun_l20_n495
+end
+
+def fun_l19_n914()
+ fun_l20_n878
+end
+
+def fun_l19_n915()
+ fun_l20_n166
+end
+
+def fun_l19_n916()
+ fun_l20_n558
+end
+
+def fun_l19_n917()
+ fun_l20_n704
+end
+
+def fun_l19_n918()
+ fun_l20_n996
+end
+
+def fun_l19_n919()
+ fun_l20_n302
+end
+
+def fun_l19_n920()
+ fun_l20_n44
+end
+
+def fun_l19_n921()
+ fun_l20_n694
+end
+
+def fun_l19_n922()
+ fun_l20_n221
+end
+
+def fun_l19_n923()
+ fun_l20_n419
+end
+
+def fun_l19_n924()
+ fun_l20_n400
+end
+
+def fun_l19_n925()
+ fun_l20_n306
+end
+
+def fun_l19_n926()
+ fun_l20_n785
+end
+
+def fun_l19_n927()
+ fun_l20_n851
+end
+
+def fun_l19_n928()
+ fun_l20_n769
+end
+
+def fun_l19_n929()
+ fun_l20_n547
+end
+
+def fun_l19_n930()
+ fun_l20_n887
+end
+
+def fun_l19_n931()
+ fun_l20_n413
+end
+
+def fun_l19_n932()
+ fun_l20_n253
+end
+
+def fun_l19_n933()
+ fun_l20_n37
+end
+
+def fun_l19_n934()
+ fun_l20_n405
+end
+
+def fun_l19_n935()
+ fun_l20_n926
+end
+
+def fun_l19_n936()
+ fun_l20_n864
+end
+
+def fun_l19_n937()
+ fun_l20_n231
+end
+
+def fun_l19_n938()
+ fun_l20_n688
+end
+
+def fun_l19_n939()
+ fun_l20_n144
+end
+
+def fun_l19_n940()
+ fun_l20_n606
+end
+
+def fun_l19_n941()
+ fun_l20_n180
+end
+
+def fun_l19_n942()
+ fun_l20_n103
+end
+
+def fun_l19_n943()
+ fun_l20_n314
+end
+
+def fun_l19_n944()
+ fun_l20_n966
+end
+
+def fun_l19_n945()
+ fun_l20_n15
+end
+
+def fun_l19_n946()
+ fun_l20_n343
+end
+
+def fun_l19_n947()
+ fun_l20_n388
+end
+
+def fun_l19_n948()
+ fun_l20_n868
+end
+
+def fun_l19_n949()
+ fun_l20_n939
+end
+
+def fun_l19_n950()
+ fun_l20_n364
+end
+
+def fun_l19_n951()
+ fun_l20_n739
+end
+
+def fun_l19_n952()
+ fun_l20_n725
+end
+
+def fun_l19_n953()
+ fun_l20_n463
+end
+
+def fun_l19_n954()
+ fun_l20_n737
+end
+
+def fun_l19_n955()
+ fun_l20_n83
+end
+
+def fun_l19_n956()
+ fun_l20_n807
+end
+
+def fun_l19_n957()
+ fun_l20_n710
+end
+
+def fun_l19_n958()
+ fun_l20_n48
+end
+
+def fun_l19_n959()
+ fun_l20_n82
+end
+
+def fun_l19_n960()
+ fun_l20_n330
+end
+
+def fun_l19_n961()
+ fun_l20_n378
+end
+
+def fun_l19_n962()
+ fun_l20_n35
+end
+
+def fun_l19_n963()
+ fun_l20_n191
+end
+
+def fun_l19_n964()
+ fun_l20_n282
+end
+
+def fun_l19_n965()
+ fun_l20_n222
+end
+
+def fun_l19_n966()
+ fun_l20_n416
+end
+
+def fun_l19_n967()
+ fun_l20_n304
+end
+
+def fun_l19_n968()
+ fun_l20_n325
+end
+
+def fun_l19_n969()
+ fun_l20_n374
+end
+
+def fun_l19_n970()
+ fun_l20_n25
+end
+
+def fun_l19_n971()
+ fun_l20_n815
+end
+
+def fun_l19_n972()
+ fun_l20_n272
+end
+
+def fun_l19_n973()
+ fun_l20_n57
+end
+
+def fun_l19_n974()
+ fun_l20_n567
+end
+
+def fun_l19_n975()
+ fun_l20_n995
+end
+
+def fun_l19_n976()
+ fun_l20_n390
+end
+
+def fun_l19_n977()
+ fun_l20_n706
+end
+
+def fun_l19_n978()
+ fun_l20_n496
+end
+
+def fun_l19_n979()
+ fun_l20_n685
+end
+
+def fun_l19_n980()
+ fun_l20_n277
+end
+
+def fun_l19_n981()
+ fun_l20_n933
+end
+
+def fun_l19_n982()
+ fun_l20_n958
+end
+
+def fun_l19_n983()
+ fun_l20_n9
+end
+
+def fun_l19_n984()
+ fun_l20_n455
+end
+
+def fun_l19_n985()
+ fun_l20_n824
+end
+
+def fun_l19_n986()
+ fun_l20_n855
+end
+
+def fun_l19_n987()
+ fun_l20_n561
+end
+
+def fun_l19_n988()
+ fun_l20_n66
+end
+
+def fun_l19_n989()
+ fun_l20_n836
+end
+
+def fun_l19_n990()
+ fun_l20_n466
+end
+
+def fun_l19_n991()
+ fun_l20_n902
+end
+
+def fun_l19_n992()
+ fun_l20_n196
+end
+
+def fun_l19_n993()
+ fun_l20_n488
+end
+
+def fun_l19_n994()
+ fun_l20_n490
+end
+
+def fun_l19_n995()
+ fun_l20_n463
+end
+
+def fun_l19_n996()
+ fun_l20_n222
+end
+
+def fun_l19_n997()
+ fun_l20_n935
+end
+
+def fun_l19_n998()
+ fun_l20_n664
+end
+
+def fun_l19_n999()
+ fun_l20_n44
+end
+
+def fun_l20_n0()
+ fun_l21_n583
+end
+
+def fun_l20_n1()
+ fun_l21_n600
+end
+
+def fun_l20_n2()
+ fun_l21_n308
+end
+
+def fun_l20_n3()
+ fun_l21_n395
+end
+
+def fun_l20_n4()
+ fun_l21_n468
+end
+
+def fun_l20_n5()
+ fun_l21_n340
+end
+
+def fun_l20_n6()
+ fun_l21_n647
+end
+
+def fun_l20_n7()
+ fun_l21_n53
+end
+
+def fun_l20_n8()
+ fun_l21_n231
+end
+
+def fun_l20_n9()
+ fun_l21_n965
+end
+
+def fun_l20_n10()
+ fun_l21_n82
+end
+
+def fun_l20_n11()
+ fun_l21_n464
+end
+
+def fun_l20_n12()
+ fun_l21_n694
+end
+
+def fun_l20_n13()
+ fun_l21_n398
+end
+
+def fun_l20_n14()
+ fun_l21_n197
+end
+
+def fun_l20_n15()
+ fun_l21_n447
+end
+
+def fun_l20_n16()
+ fun_l21_n976
+end
+
+def fun_l20_n17()
+ fun_l21_n421
+end
+
+def fun_l20_n18()
+ fun_l21_n163
+end
+
+def fun_l20_n19()
+ fun_l21_n467
+end
+
+def fun_l20_n20()
+ fun_l21_n210
+end
+
+def fun_l20_n21()
+ fun_l21_n837
+end
+
+def fun_l20_n22()
+ fun_l21_n257
+end
+
+def fun_l20_n23()
+ fun_l21_n818
+end
+
+def fun_l20_n24()
+ fun_l21_n585
+end
+
+def fun_l20_n25()
+ fun_l21_n125
+end
+
+def fun_l20_n26()
+ fun_l21_n740
+end
+
+def fun_l20_n27()
+ fun_l21_n771
+end
+
+def fun_l20_n28()
+ fun_l21_n559
+end
+
+def fun_l20_n29()
+ fun_l21_n591
+end
+
+def fun_l20_n30()
+ fun_l21_n37
+end
+
+def fun_l20_n31()
+ fun_l21_n796
+end
+
+def fun_l20_n32()
+ fun_l21_n762
+end
+
+def fun_l20_n33()
+ fun_l21_n26
+end
+
+def fun_l20_n34()
+ fun_l21_n70
+end
+
+def fun_l20_n35()
+ fun_l21_n789
+end
+
+def fun_l20_n36()
+ fun_l21_n389
+end
+
+def fun_l20_n37()
+ fun_l21_n769
+end
+
+def fun_l20_n38()
+ fun_l21_n296
+end
+
+def fun_l20_n39()
+ fun_l21_n131
+end
+
+def fun_l20_n40()
+ fun_l21_n405
+end
+
+def fun_l20_n41()
+ fun_l21_n546
+end
+
+def fun_l20_n42()
+ fun_l21_n232
+end
+
+def fun_l20_n43()
+ fun_l21_n538
+end
+
+def fun_l20_n44()
+ fun_l21_n55
+end
+
+def fun_l20_n45()
+ fun_l21_n962
+end
+
+def fun_l20_n46()
+ fun_l21_n664
+end
+
+def fun_l20_n47()
+ fun_l21_n443
+end
+
+def fun_l20_n48()
+ fun_l21_n854
+end
+
+def fun_l20_n49()
+ fun_l21_n392
+end
+
+def fun_l20_n50()
+ fun_l21_n699
+end
+
+def fun_l20_n51()
+ fun_l21_n748
+end
+
+def fun_l20_n52()
+ fun_l21_n891
+end
+
+def fun_l20_n53()
+ fun_l21_n411
+end
+
+def fun_l20_n54()
+ fun_l21_n798
+end
+
+def fun_l20_n55()
+ fun_l21_n99
+end
+
+def fun_l20_n56()
+ fun_l21_n538
+end
+
+def fun_l20_n57()
+ fun_l21_n473
+end
+
+def fun_l20_n58()
+ fun_l21_n498
+end
+
+def fun_l20_n59()
+ fun_l21_n769
+end
+
+def fun_l20_n60()
+ fun_l21_n117
+end
+
+def fun_l20_n61()
+ fun_l21_n487
+end
+
+def fun_l20_n62()
+ fun_l21_n538
+end
+
+def fun_l20_n63()
+ fun_l21_n312
+end
+
+def fun_l20_n64()
+ fun_l21_n642
+end
+
+def fun_l20_n65()
+ fun_l21_n877
+end
+
+def fun_l20_n66()
+ fun_l21_n481
+end
+
+def fun_l20_n67()
+ fun_l21_n252
+end
+
+def fun_l20_n68()
+ fun_l21_n367
+end
+
+def fun_l20_n69()
+ fun_l21_n438
+end
+
+def fun_l20_n70()
+ fun_l21_n811
+end
+
+def fun_l20_n71()
+ fun_l21_n807
+end
+
+def fun_l20_n72()
+ fun_l21_n410
+end
+
+def fun_l20_n73()
+ fun_l21_n590
+end
+
+def fun_l20_n74()
+ fun_l21_n963
+end
+
+def fun_l20_n75()
+ fun_l21_n103
+end
+
+def fun_l20_n76()
+ fun_l21_n786
+end
+
+def fun_l20_n77()
+ fun_l21_n256
+end
+
+def fun_l20_n78()
+ fun_l21_n306
+end
+
+def fun_l20_n79()
+ fun_l21_n248
+end
+
+def fun_l20_n80()
+ fun_l21_n931
+end
+
+def fun_l20_n81()
+ fun_l21_n926
+end
+
+def fun_l20_n82()
+ fun_l21_n702
+end
+
+def fun_l20_n83()
+ fun_l21_n611
+end
+
+def fun_l20_n84()
+ fun_l21_n279
+end
+
+def fun_l20_n85()
+ fun_l21_n977
+end
+
+def fun_l20_n86()
+ fun_l21_n239
+end
+
+def fun_l20_n87()
+ fun_l21_n370
+end
+
+def fun_l20_n88()
+ fun_l21_n652
+end
+
+def fun_l20_n89()
+ fun_l21_n956
+end
+
+def fun_l20_n90()
+ fun_l21_n998
+end
+
+def fun_l20_n91()
+ fun_l21_n523
+end
+
+def fun_l20_n92()
+ fun_l21_n376
+end
+
+def fun_l20_n93()
+ fun_l21_n604
+end
+
+def fun_l20_n94()
+ fun_l21_n908
+end
+
+def fun_l20_n95()
+ fun_l21_n716
+end
+
+def fun_l20_n96()
+ fun_l21_n9
+end
+
+def fun_l20_n97()
+ fun_l21_n571
+end
+
+def fun_l20_n98()
+ fun_l21_n787
+end
+
+def fun_l20_n99()
+ fun_l21_n453
+end
+
+def fun_l20_n100()
+ fun_l21_n899
+end
+
+def fun_l20_n101()
+ fun_l21_n491
+end
+
+def fun_l20_n102()
+ fun_l21_n47
+end
+
+def fun_l20_n103()
+ fun_l21_n892
+end
+
+def fun_l20_n104()
+ fun_l21_n974
+end
+
+def fun_l20_n105()
+ fun_l21_n993
+end
+
+def fun_l20_n106()
+ fun_l21_n625
+end
+
+def fun_l20_n107()
+ fun_l21_n743
+end
+
+def fun_l20_n108()
+ fun_l21_n266
+end
+
+def fun_l20_n109()
+ fun_l21_n650
+end
+
+def fun_l20_n110()
+ fun_l21_n642
+end
+
+def fun_l20_n111()
+ fun_l21_n905
+end
+
+def fun_l20_n112()
+ fun_l21_n225
+end
+
+def fun_l20_n113()
+ fun_l21_n857
+end
+
+def fun_l20_n114()
+ fun_l21_n82
+end
+
+def fun_l20_n115()
+ fun_l21_n166
+end
+
+def fun_l20_n116()
+ fun_l21_n844
+end
+
+def fun_l20_n117()
+ fun_l21_n619
+end
+
+def fun_l20_n118()
+ fun_l21_n743
+end
+
+def fun_l20_n119()
+ fun_l21_n69
+end
+
+def fun_l20_n120()
+ fun_l21_n410
+end
+
+def fun_l20_n121()
+ fun_l21_n364
+end
+
+def fun_l20_n122()
+ fun_l21_n186
+end
+
+def fun_l20_n123()
+ fun_l21_n750
+end
+
+def fun_l20_n124()
+ fun_l21_n683
+end
+
+def fun_l20_n125()
+ fun_l21_n576
+end
+
+def fun_l20_n126()
+ fun_l21_n287
+end
+
+def fun_l20_n127()
+ fun_l21_n483
+end
+
+def fun_l20_n128()
+ fun_l21_n738
+end
+
+def fun_l20_n129()
+ fun_l21_n779
+end
+
+def fun_l20_n130()
+ fun_l21_n209
+end
+
+def fun_l20_n131()
+ fun_l21_n652
+end
+
+def fun_l20_n132()
+ fun_l21_n583
+end
+
+def fun_l20_n133()
+ fun_l21_n389
+end
+
+def fun_l20_n134()
+ fun_l21_n289
+end
+
+def fun_l20_n135()
+ fun_l21_n993
+end
+
+def fun_l20_n136()
+ fun_l21_n216
+end
+
+def fun_l20_n137()
+ fun_l21_n118
+end
+
+def fun_l20_n138()
+ fun_l21_n484
+end
+
+def fun_l20_n139()
+ fun_l21_n602
+end
+
+def fun_l20_n140()
+ fun_l21_n714
+end
+
+def fun_l20_n141()
+ fun_l21_n247
+end
+
+def fun_l20_n142()
+ fun_l21_n27
+end
+
+def fun_l20_n143()
+ fun_l21_n939
+end
+
+def fun_l20_n144()
+ fun_l21_n565
+end
+
+def fun_l20_n145()
+ fun_l21_n869
+end
+
+def fun_l20_n146()
+ fun_l21_n569
+end
+
+def fun_l20_n147()
+ fun_l21_n876
+end
+
+def fun_l20_n148()
+ fun_l21_n796
+end
+
+def fun_l20_n149()
+ fun_l21_n754
+end
+
+def fun_l20_n150()
+ fun_l21_n664
+end
+
+def fun_l20_n151()
+ fun_l21_n836
+end
+
+def fun_l20_n152()
+ fun_l21_n389
+end
+
+def fun_l20_n153()
+ fun_l21_n111
+end
+
+def fun_l20_n154()
+ fun_l21_n361
+end
+
+def fun_l20_n155()
+ fun_l21_n733
+end
+
+def fun_l20_n156()
+ fun_l21_n215
+end
+
+def fun_l20_n157()
+ fun_l21_n509
+end
+
+def fun_l20_n158()
+ fun_l21_n12
+end
+
+def fun_l20_n159()
+ fun_l21_n351
+end
+
+def fun_l20_n160()
+ fun_l21_n872
+end
+
+def fun_l20_n161()
+ fun_l21_n888
+end
+
+def fun_l20_n162()
+ fun_l21_n126
+end
+
+def fun_l20_n163()
+ fun_l21_n681
+end
+
+def fun_l20_n164()
+ fun_l21_n160
+end
+
+def fun_l20_n165()
+ fun_l21_n917
+end
+
+def fun_l20_n166()
+ fun_l21_n255
+end
+
+def fun_l20_n167()
+ fun_l21_n37
+end
+
+def fun_l20_n168()
+ fun_l21_n949
+end
+
+def fun_l20_n169()
+ fun_l21_n925
+end
+
+def fun_l20_n170()
+ fun_l21_n921
+end
+
+def fun_l20_n171()
+ fun_l21_n123
+end
+
+def fun_l20_n172()
+ fun_l21_n783
+end
+
+def fun_l20_n173()
+ fun_l21_n45
+end
+
+def fun_l20_n174()
+ fun_l21_n994
+end
+
+def fun_l20_n175()
+ fun_l21_n745
+end
+
+def fun_l20_n176()
+ fun_l21_n122
+end
+
+def fun_l20_n177()
+ fun_l21_n25
+end
+
+def fun_l20_n178()
+ fun_l21_n594
+end
+
+def fun_l20_n179()
+ fun_l21_n115
+end
+
+def fun_l20_n180()
+ fun_l21_n274
+end
+
+def fun_l20_n181()
+ fun_l21_n423
+end
+
+def fun_l20_n182()
+ fun_l21_n68
+end
+
+def fun_l20_n183()
+ fun_l21_n598
+end
+
+def fun_l20_n184()
+ fun_l21_n640
+end
+
+def fun_l20_n185()
+ fun_l21_n810
+end
+
+def fun_l20_n186()
+ fun_l21_n150
+end
+
+def fun_l20_n187()
+ fun_l21_n4
+end
+
+def fun_l20_n188()
+ fun_l21_n487
+end
+
+def fun_l20_n189()
+ fun_l21_n327
+end
+
+def fun_l20_n190()
+ fun_l21_n652
+end
+
+def fun_l20_n191()
+ fun_l21_n913
+end
+
+def fun_l20_n192()
+ fun_l21_n323
+end
+
+def fun_l20_n193()
+ fun_l21_n193
+end
+
+def fun_l20_n194()
+ fun_l21_n527
+end
+
+def fun_l20_n195()
+ fun_l21_n123
+end
+
+def fun_l20_n196()
+ fun_l21_n568
+end
+
+def fun_l20_n197()
+ fun_l21_n629
+end
+
+def fun_l20_n198()
+ fun_l21_n727
+end
+
+def fun_l20_n199()
+ fun_l21_n470
+end
+
+def fun_l20_n200()
+ fun_l21_n608
+end
+
+def fun_l20_n201()
+ fun_l21_n941
+end
+
+def fun_l20_n202()
+ fun_l21_n256
+end
+
+def fun_l20_n203()
+ fun_l21_n624
+end
+
+def fun_l20_n204()
+ fun_l21_n714
+end
+
+def fun_l20_n205()
+ fun_l21_n754
+end
+
+def fun_l20_n206()
+ fun_l21_n513
+end
+
+def fun_l20_n207()
+ fun_l21_n730
+end
+
+def fun_l20_n208()
+ fun_l21_n132
+end
+
+def fun_l20_n209()
+ fun_l21_n205
+end
+
+def fun_l20_n210()
+ fun_l21_n549
+end
+
+def fun_l20_n211()
+ fun_l21_n713
+end
+
+def fun_l20_n212()
+ fun_l21_n51
+end
+
+def fun_l20_n213()
+ fun_l21_n712
+end
+
+def fun_l20_n214()
+ fun_l21_n439
+end
+
+def fun_l20_n215()
+ fun_l21_n969
+end
+
+def fun_l20_n216()
+ fun_l21_n338
+end
+
+def fun_l20_n217()
+ fun_l21_n852
+end
+
+def fun_l20_n218()
+ fun_l21_n935
+end
+
+def fun_l20_n219()
+ fun_l21_n935
+end
+
+def fun_l20_n220()
+ fun_l21_n967
+end
+
+def fun_l20_n221()
+ fun_l21_n195
+end
+
+def fun_l20_n222()
+ fun_l21_n556
+end
+
+def fun_l20_n223()
+ fun_l21_n669
+end
+
+def fun_l20_n224()
+ fun_l21_n874
+end
+
+def fun_l20_n225()
+ fun_l21_n985
+end
+
+def fun_l20_n226()
+ fun_l21_n769
+end
+
+def fun_l20_n227()
+ fun_l21_n482
+end
+
+def fun_l20_n228()
+ fun_l21_n268
+end
+
+def fun_l20_n229()
+ fun_l21_n161
+end
+
+def fun_l20_n230()
+ fun_l21_n383
+end
+
+def fun_l20_n231()
+ fun_l21_n100
+end
+
+def fun_l20_n232()
+ fun_l21_n285
+end
+
+def fun_l20_n233()
+ fun_l21_n255
+end
+
+def fun_l20_n234()
+ fun_l21_n214
+end
+
+def fun_l20_n235()
+ fun_l21_n206
+end
+
+def fun_l20_n236()
+ fun_l21_n990
+end
+
+def fun_l20_n237()
+ fun_l21_n24
+end
+
+def fun_l20_n238()
+ fun_l21_n531
+end
+
+def fun_l20_n239()
+ fun_l21_n171
+end
+
+def fun_l20_n240()
+ fun_l21_n859
+end
+
+def fun_l20_n241()
+ fun_l21_n342
+end
+
+def fun_l20_n242()
+ fun_l21_n724
+end
+
+def fun_l20_n243()
+ fun_l21_n55
+end
+
+def fun_l20_n244()
+ fun_l21_n404
+end
+
+def fun_l20_n245()
+ fun_l21_n615
+end
+
+def fun_l20_n246()
+ fun_l21_n692
+end
+
+def fun_l20_n247()
+ fun_l21_n851
+end
+
+def fun_l20_n248()
+ fun_l21_n715
+end
+
+def fun_l20_n249()
+ fun_l21_n723
+end
+
+def fun_l20_n250()
+ fun_l21_n929
+end
+
+def fun_l20_n251()
+ fun_l21_n26
+end
+
+def fun_l20_n252()
+ fun_l21_n314
+end
+
+def fun_l20_n253()
+ fun_l21_n182
+end
+
+def fun_l20_n254()
+ fun_l21_n889
+end
+
+def fun_l20_n255()
+ fun_l21_n725
+end
+
+def fun_l20_n256()
+ fun_l21_n538
+end
+
+def fun_l20_n257()
+ fun_l21_n303
+end
+
+def fun_l20_n258()
+ fun_l21_n843
+end
+
+def fun_l20_n259()
+ fun_l21_n977
+end
+
+def fun_l20_n260()
+ fun_l21_n438
+end
+
+def fun_l20_n261()
+ fun_l21_n772
+end
+
+def fun_l20_n262()
+ fun_l21_n432
+end
+
+def fun_l20_n263()
+ fun_l21_n204
+end
+
+def fun_l20_n264()
+ fun_l21_n853
+end
+
+def fun_l20_n265()
+ fun_l21_n7
+end
+
+def fun_l20_n266()
+ fun_l21_n171
+end
+
+def fun_l20_n267()
+ fun_l21_n907
+end
+
+def fun_l20_n268()
+ fun_l21_n450
+end
+
+def fun_l20_n269()
+ fun_l21_n836
+end
+
+def fun_l20_n270()
+ fun_l21_n118
+end
+
+def fun_l20_n271()
+ fun_l21_n782
+end
+
+def fun_l20_n272()
+ fun_l21_n160
+end
+
+def fun_l20_n273()
+ fun_l21_n73
+end
+
+def fun_l20_n274()
+ fun_l21_n339
+end
+
+def fun_l20_n275()
+ fun_l21_n257
+end
+
+def fun_l20_n276()
+ fun_l21_n860
+end
+
+def fun_l20_n277()
+ fun_l21_n837
+end
+
+def fun_l20_n278()
+ fun_l21_n936
+end
+
+def fun_l20_n279()
+ fun_l21_n627
+end
+
+def fun_l20_n280()
+ fun_l21_n45
+end
+
+def fun_l20_n281()
+ fun_l21_n934
+end
+
+def fun_l20_n282()
+ fun_l21_n213
+end
+
+def fun_l20_n283()
+ fun_l21_n629
+end
+
+def fun_l20_n284()
+ fun_l21_n944
+end
+
+def fun_l20_n285()
+ fun_l21_n44
+end
+
+def fun_l20_n286()
+ fun_l21_n306
+end
+
+def fun_l20_n287()
+ fun_l21_n259
+end
+
+def fun_l20_n288()
+ fun_l21_n805
+end
+
+def fun_l20_n289()
+ fun_l21_n118
+end
+
+def fun_l20_n290()
+ fun_l21_n456
+end
+
+def fun_l20_n291()
+ fun_l21_n11
+end
+
+def fun_l20_n292()
+ fun_l21_n138
+end
+
+def fun_l20_n293()
+ fun_l21_n110
+end
+
+def fun_l20_n294()
+ fun_l21_n165
+end
+
+def fun_l20_n295()
+ fun_l21_n129
+end
+
+def fun_l20_n296()
+ fun_l21_n731
+end
+
+def fun_l20_n297()
+ fun_l21_n219
+end
+
+def fun_l20_n298()
+ fun_l21_n175
+end
+
+def fun_l20_n299()
+ fun_l21_n497
+end
+
+def fun_l20_n300()
+ fun_l21_n154
+end
+
+def fun_l20_n301()
+ fun_l21_n446
+end
+
+def fun_l20_n302()
+ fun_l21_n890
+end
+
+def fun_l20_n303()
+ fun_l21_n325
+end
+
+def fun_l20_n304()
+ fun_l21_n616
+end
+
+def fun_l20_n305()
+ fun_l21_n743
+end
+
+def fun_l20_n306()
+ fun_l21_n327
+end
+
+def fun_l20_n307()
+ fun_l21_n890
+end
+
+def fun_l20_n308()
+ fun_l21_n289
+end
+
+def fun_l20_n309()
+ fun_l21_n150
+end
+
+def fun_l20_n310()
+ fun_l21_n22
+end
+
+def fun_l20_n311()
+ fun_l21_n290
+end
+
+def fun_l20_n312()
+ fun_l21_n780
+end
+
+def fun_l20_n313()
+ fun_l21_n204
+end
+
+def fun_l20_n314()
+ fun_l21_n204
+end
+
+def fun_l20_n315()
+ fun_l21_n841
+end
+
+def fun_l20_n316()
+ fun_l21_n990
+end
+
+def fun_l20_n317()
+ fun_l21_n574
+end
+
+def fun_l20_n318()
+ fun_l21_n543
+end
+
+def fun_l20_n319()
+ fun_l21_n388
+end
+
+def fun_l20_n320()
+ fun_l21_n44
+end
+
+def fun_l20_n321()
+ fun_l21_n65
+end
+
+def fun_l20_n322()
+ fun_l21_n952
+end
+
+def fun_l20_n323()
+ fun_l21_n633
+end
+
+def fun_l20_n324()
+ fun_l21_n729
+end
+
+def fun_l20_n325()
+ fun_l21_n356
+end
+
+def fun_l20_n326()
+ fun_l21_n968
+end
+
+def fun_l20_n327()
+ fun_l21_n92
+end
+
+def fun_l20_n328()
+ fun_l21_n285
+end
+
+def fun_l20_n329()
+ fun_l21_n341
+end
+
+def fun_l20_n330()
+ fun_l21_n818
+end
+
+def fun_l20_n331()
+ fun_l21_n373
+end
+
+def fun_l20_n332()
+ fun_l21_n166
+end
+
+def fun_l20_n333()
+ fun_l21_n618
+end
+
+def fun_l20_n334()
+ fun_l21_n160
+end
+
+def fun_l20_n335()
+ fun_l21_n965
+end
+
+def fun_l20_n336()
+ fun_l21_n436
+end
+
+def fun_l20_n337()
+ fun_l21_n244
+end
+
+def fun_l20_n338()
+ fun_l21_n425
+end
+
+def fun_l20_n339()
+ fun_l21_n576
+end
+
+def fun_l20_n340()
+ fun_l21_n789
+end
+
+def fun_l20_n341()
+ fun_l21_n559
+end
+
+def fun_l20_n342()
+ fun_l21_n766
+end
+
+def fun_l20_n343()
+ fun_l21_n131
+end
+
+def fun_l20_n344()
+ fun_l21_n806
+end
+
+def fun_l20_n345()
+ fun_l21_n624
+end
+
+def fun_l20_n346()
+ fun_l21_n342
+end
+
+def fun_l20_n347()
+ fun_l21_n567
+end
+
+def fun_l20_n348()
+ fun_l21_n569
+end
+
+def fun_l20_n349()
+ fun_l21_n623
+end
+
+def fun_l20_n350()
+ fun_l21_n984
+end
+
+def fun_l20_n351()
+ fun_l21_n931
+end
+
+def fun_l20_n352()
+ fun_l21_n48
+end
+
+def fun_l20_n353()
+ fun_l21_n962
+end
+
+def fun_l20_n354()
+ fun_l21_n757
+end
+
+def fun_l20_n355()
+ fun_l21_n844
+end
+
+def fun_l20_n356()
+ fun_l21_n217
+end
+
+def fun_l20_n357()
+ fun_l21_n933
+end
+
+def fun_l20_n358()
+ fun_l21_n579
+end
+
+def fun_l20_n359()
+ fun_l21_n342
+end
+
+def fun_l20_n360()
+ fun_l21_n975
+end
+
+def fun_l20_n361()
+ fun_l21_n177
+end
+
+def fun_l20_n362()
+ fun_l21_n491
+end
+
+def fun_l20_n363()
+ fun_l21_n637
+end
+
+def fun_l20_n364()
+ fun_l21_n505
+end
+
+def fun_l20_n365()
+ fun_l21_n784
+end
+
+def fun_l20_n366()
+ fun_l21_n62
+end
+
+def fun_l20_n367()
+ fun_l21_n478
+end
+
+def fun_l20_n368()
+ fun_l21_n369
+end
+
+def fun_l20_n369()
+ fun_l21_n105
+end
+
+def fun_l20_n370()
+ fun_l21_n352
+end
+
+def fun_l20_n371()
+ fun_l21_n537
+end
+
+def fun_l20_n372()
+ fun_l21_n180
+end
+
+def fun_l20_n373()
+ fun_l21_n216
+end
+
+def fun_l20_n374()
+ fun_l21_n938
+end
+
+def fun_l20_n375()
+ fun_l21_n441
+end
+
+def fun_l20_n376()
+ fun_l21_n308
+end
+
+def fun_l20_n377()
+ fun_l21_n544
+end
+
+def fun_l20_n378()
+ fun_l21_n505
+end
+
+def fun_l20_n379()
+ fun_l21_n681
+end
+
+def fun_l20_n380()
+ fun_l21_n844
+end
+
+def fun_l20_n381()
+ fun_l21_n269
+end
+
+def fun_l20_n382()
+ fun_l21_n195
+end
+
+def fun_l20_n383()
+ fun_l21_n214
+end
+
+def fun_l20_n384()
+ fun_l21_n206
+end
+
+def fun_l20_n385()
+ fun_l21_n807
+end
+
+def fun_l20_n386()
+ fun_l21_n932
+end
+
+def fun_l20_n387()
+ fun_l21_n245
+end
+
+def fun_l20_n388()
+ fun_l21_n942
+end
+
+def fun_l20_n389()
+ fun_l21_n618
+end
+
+def fun_l20_n390()
+ fun_l21_n684
+end
+
+def fun_l20_n391()
+ fun_l21_n536
+end
+
+def fun_l20_n392()
+ fun_l21_n899
+end
+
+def fun_l20_n393()
+ fun_l21_n775
+end
+
+def fun_l20_n394()
+ fun_l21_n634
+end
+
+def fun_l20_n395()
+ fun_l21_n870
+end
+
+def fun_l20_n396()
+ fun_l21_n882
+end
+
+def fun_l20_n397()
+ fun_l21_n317
+end
+
+def fun_l20_n398()
+ fun_l21_n162
+end
+
+def fun_l20_n399()
+ fun_l21_n446
+end
+
+def fun_l20_n400()
+ fun_l21_n716
+end
+
+def fun_l20_n401()
+ fun_l21_n869
+end
+
+def fun_l20_n402()
+ fun_l21_n965
+end
+
+def fun_l20_n403()
+ fun_l21_n616
+end
+
+def fun_l20_n404()
+ fun_l21_n385
+end
+
+def fun_l20_n405()
+ fun_l21_n964
+end
+
+def fun_l20_n406()
+ fun_l21_n360
+end
+
+def fun_l20_n407()
+ fun_l21_n432
+end
+
+def fun_l20_n408()
+ fun_l21_n40
+end
+
+def fun_l20_n409()
+ fun_l21_n734
+end
+
+def fun_l20_n410()
+ fun_l21_n978
+end
+
+def fun_l20_n411()
+ fun_l21_n721
+end
+
+def fun_l20_n412()
+ fun_l21_n941
+end
+
+def fun_l20_n413()
+ fun_l21_n315
+end
+
+def fun_l20_n414()
+ fun_l21_n242
+end
+
+def fun_l20_n415()
+ fun_l21_n153
+end
+
+def fun_l20_n416()
+ fun_l21_n999
+end
+
+def fun_l20_n417()
+ fun_l21_n219
+end
+
+def fun_l20_n418()
+ fun_l21_n809
+end
+
+def fun_l20_n419()
+ fun_l21_n139
+end
+
+def fun_l20_n420()
+ fun_l21_n311
+end
+
+def fun_l20_n421()
+ fun_l21_n460
+end
+
+def fun_l20_n422()
+ fun_l21_n0
+end
+
+def fun_l20_n423()
+ fun_l21_n863
+end
+
+def fun_l20_n424()
+ fun_l21_n216
+end
+
+def fun_l20_n425()
+ fun_l21_n1
+end
+
+def fun_l20_n426()
+ fun_l21_n829
+end
+
+def fun_l20_n427()
+ fun_l21_n844
+end
+
+def fun_l20_n428()
+ fun_l21_n941
+end
+
+def fun_l20_n429()
+ fun_l21_n344
+end
+
+def fun_l20_n430()
+ fun_l21_n443
+end
+
+def fun_l20_n431()
+ fun_l21_n549
+end
+
+def fun_l20_n432()
+ fun_l21_n654
+end
+
+def fun_l20_n433()
+ fun_l21_n167
+end
+
+def fun_l20_n434()
+ fun_l21_n392
+end
+
+def fun_l20_n435()
+ fun_l21_n570
+end
+
+def fun_l20_n436()
+ fun_l21_n370
+end
+
+def fun_l20_n437()
+ fun_l21_n65
+end
+
+def fun_l20_n438()
+ fun_l21_n78
+end
+
+def fun_l20_n439()
+ fun_l21_n271
+end
+
+def fun_l20_n440()
+ fun_l21_n606
+end
+
+def fun_l20_n441()
+ fun_l21_n25
+end
+
+def fun_l20_n442()
+ fun_l21_n629
+end
+
+def fun_l20_n443()
+ fun_l21_n294
+end
+
+def fun_l20_n444()
+ fun_l21_n928
+end
+
+def fun_l20_n445()
+ fun_l21_n596
+end
+
+def fun_l20_n446()
+ fun_l21_n630
+end
+
+def fun_l20_n447()
+ fun_l21_n849
+end
+
+def fun_l20_n448()
+ fun_l21_n239
+end
+
+def fun_l20_n449()
+ fun_l21_n641
+end
+
+def fun_l20_n450()
+ fun_l21_n333
+end
+
+def fun_l20_n451()
+ fun_l21_n86
+end
+
+def fun_l20_n452()
+ fun_l21_n68
+end
+
+def fun_l20_n453()
+ fun_l21_n28
+end
+
+def fun_l20_n454()
+ fun_l21_n644
+end
+
+def fun_l20_n455()
+ fun_l21_n282
+end
+
+def fun_l20_n456()
+ fun_l21_n3
+end
+
+def fun_l20_n457()
+ fun_l21_n594
+end
+
+def fun_l20_n458()
+ fun_l21_n173
+end
+
+def fun_l20_n459()
+ fun_l21_n986
+end
+
+def fun_l20_n460()
+ fun_l21_n597
+end
+
+def fun_l20_n461()
+ fun_l21_n488
+end
+
+def fun_l20_n462()
+ fun_l21_n288
+end
+
+def fun_l20_n463()
+ fun_l21_n729
+end
+
+def fun_l20_n464()
+ fun_l21_n985
+end
+
+def fun_l20_n465()
+ fun_l21_n794
+end
+
+def fun_l20_n466()
+ fun_l21_n405
+end
+
+def fun_l20_n467()
+ fun_l21_n985
+end
+
+def fun_l20_n468()
+ fun_l21_n596
+end
+
+def fun_l20_n469()
+ fun_l21_n331
+end
+
+def fun_l20_n470()
+ fun_l21_n480
+end
+
+def fun_l20_n471()
+ fun_l21_n160
+end
+
+def fun_l20_n472()
+ fun_l21_n529
+end
+
+def fun_l20_n473()
+ fun_l21_n185
+end
+
+def fun_l20_n474()
+ fun_l21_n300
+end
+
+def fun_l20_n475()
+ fun_l21_n131
+end
+
+def fun_l20_n476()
+ fun_l21_n561
+end
+
+def fun_l20_n477()
+ fun_l21_n634
+end
+
+def fun_l20_n478()
+ fun_l21_n92
+end
+
+def fun_l20_n479()
+ fun_l21_n105
+end
+
+def fun_l20_n480()
+ fun_l21_n887
+end
+
+def fun_l20_n481()
+ fun_l21_n841
+end
+
+def fun_l20_n482()
+ fun_l21_n404
+end
+
+def fun_l20_n483()
+ fun_l21_n813
+end
+
+def fun_l20_n484()
+ fun_l21_n90
+end
+
+def fun_l20_n485()
+ fun_l21_n978
+end
+
+def fun_l20_n486()
+ fun_l21_n342
+end
+
+def fun_l20_n487()
+ fun_l21_n263
+end
+
+def fun_l20_n488()
+ fun_l21_n587
+end
+
+def fun_l20_n489()
+ fun_l21_n950
+end
+
+def fun_l20_n490()
+ fun_l21_n121
+end
+
+def fun_l20_n491()
+ fun_l21_n85
+end
+
+def fun_l20_n492()
+ fun_l21_n53
+end
+
+def fun_l20_n493()
+ fun_l21_n706
+end
+
+def fun_l20_n494()
+ fun_l21_n612
+end
+
+def fun_l20_n495()
+ fun_l21_n322
+end
+
+def fun_l20_n496()
+ fun_l21_n610
+end
+
+def fun_l20_n497()
+ fun_l21_n465
+end
+
+def fun_l20_n498()
+ fun_l21_n998
+end
+
+def fun_l20_n499()
+ fun_l21_n79
+end
+
+def fun_l20_n500()
+ fun_l21_n203
+end
+
+def fun_l20_n501()
+ fun_l21_n99
+end
+
+def fun_l20_n502()
+ fun_l21_n958
+end
+
+def fun_l20_n503()
+ fun_l21_n528
+end
+
+def fun_l20_n504()
+ fun_l21_n210
+end
+
+def fun_l20_n505()
+ fun_l21_n546
+end
+
+def fun_l20_n506()
+ fun_l21_n343
+end
+
+def fun_l20_n507()
+ fun_l21_n9
+end
+
+def fun_l20_n508()
+ fun_l21_n486
+end
+
+def fun_l20_n509()
+ fun_l21_n252
+end
+
+def fun_l20_n510()
+ fun_l21_n489
+end
+
+def fun_l20_n511()
+ fun_l21_n851
+end
+
+def fun_l20_n512()
+ fun_l21_n150
+end
+
+def fun_l20_n513()
+ fun_l21_n691
+end
+
+def fun_l20_n514()
+ fun_l21_n718
+end
+
+def fun_l20_n515()
+ fun_l21_n681
+end
+
+def fun_l20_n516()
+ fun_l21_n636
+end
+
+def fun_l20_n517()
+ fun_l21_n828
+end
+
+def fun_l20_n518()
+ fun_l21_n15
+end
+
+def fun_l20_n519()
+ fun_l21_n186
+end
+
+def fun_l20_n520()
+ fun_l21_n260
+end
+
+def fun_l20_n521()
+ fun_l21_n646
+end
+
+def fun_l20_n522()
+ fun_l21_n768
+end
+
+def fun_l20_n523()
+ fun_l21_n387
+end
+
+def fun_l20_n524()
+ fun_l21_n597
+end
+
+def fun_l20_n525()
+ fun_l21_n980
+end
+
+def fun_l20_n526()
+ fun_l21_n996
+end
+
+def fun_l20_n527()
+ fun_l21_n945
+end
+
+def fun_l20_n528()
+ fun_l21_n234
+end
+
+def fun_l20_n529()
+ fun_l21_n673
+end
+
+def fun_l20_n530()
+ fun_l21_n766
+end
+
+def fun_l20_n531()
+ fun_l21_n498
+end
+
+def fun_l20_n532()
+ fun_l21_n210
+end
+
+def fun_l20_n533()
+ fun_l21_n537
+end
+
+def fun_l20_n534()
+ fun_l21_n376
+end
+
+def fun_l20_n535()
+ fun_l21_n13
+end
+
+def fun_l20_n536()
+ fun_l21_n994
+end
+
+def fun_l20_n537()
+ fun_l21_n954
+end
+
+def fun_l20_n538()
+ fun_l21_n171
+end
+
+def fun_l20_n539()
+ fun_l21_n778
+end
+
+def fun_l20_n540()
+ fun_l21_n940
+end
+
+def fun_l20_n541()
+ fun_l21_n114
+end
+
+def fun_l20_n542()
+ fun_l21_n987
+end
+
+def fun_l20_n543()
+ fun_l21_n553
+end
+
+def fun_l20_n544()
+ fun_l21_n473
+end
+
+def fun_l20_n545()
+ fun_l21_n503
+end
+
+def fun_l20_n546()
+ fun_l21_n436
+end
+
+def fun_l20_n547()
+ fun_l21_n901
+end
+
+def fun_l20_n548()
+ fun_l21_n98
+end
+
+def fun_l20_n549()
+ fun_l21_n389
+end
+
+def fun_l20_n550()
+ fun_l21_n852
+end
+
+def fun_l20_n551()
+ fun_l21_n193
+end
+
+def fun_l20_n552()
+ fun_l21_n783
+end
+
+def fun_l20_n553()
+ fun_l21_n46
+end
+
+def fun_l20_n554()
+ fun_l21_n38
+end
+
+def fun_l20_n555()
+ fun_l21_n300
+end
+
+def fun_l20_n556()
+ fun_l21_n221
+end
+
+def fun_l20_n557()
+ fun_l21_n816
+end
+
+def fun_l20_n558()
+ fun_l21_n534
+end
+
+def fun_l20_n559()
+ fun_l21_n932
+end
+
+def fun_l20_n560()
+ fun_l21_n880
+end
+
+def fun_l20_n561()
+ fun_l21_n796
+end
+
+def fun_l20_n562()
+ fun_l21_n927
+end
+
+def fun_l20_n563()
+ fun_l21_n10
+end
+
+def fun_l20_n564()
+ fun_l21_n843
+end
+
+def fun_l20_n565()
+ fun_l21_n625
+end
+
+def fun_l20_n566()
+ fun_l21_n429
+end
+
+def fun_l20_n567()
+ fun_l21_n475
+end
+
+def fun_l20_n568()
+ fun_l21_n931
+end
+
+def fun_l20_n569()
+ fun_l21_n460
+end
+
+def fun_l20_n570()
+ fun_l21_n857
+end
+
+def fun_l20_n571()
+ fun_l21_n607
+end
+
+def fun_l20_n572()
+ fun_l21_n727
+end
+
+def fun_l20_n573()
+ fun_l21_n922
+end
+
+def fun_l20_n574()
+ fun_l21_n393
+end
+
+def fun_l20_n575()
+ fun_l21_n232
+end
+
+def fun_l20_n576()
+ fun_l21_n665
+end
+
+def fun_l20_n577()
+ fun_l21_n796
+end
+
+def fun_l20_n578()
+ fun_l21_n80
+end
+
+def fun_l20_n579()
+ fun_l21_n769
+end
+
+def fun_l20_n580()
+ fun_l21_n558
+end
+
+def fun_l20_n581()
+ fun_l21_n630
+end
+
+def fun_l20_n582()
+ fun_l21_n911
+end
+
+def fun_l20_n583()
+ fun_l21_n457
+end
+
+def fun_l20_n584()
+ fun_l21_n61
+end
+
+def fun_l20_n585()
+ fun_l21_n671
+end
+
+def fun_l20_n586()
+ fun_l21_n493
+end
+
+def fun_l20_n587()
+ fun_l21_n780
+end
+
+def fun_l20_n588()
+ fun_l21_n373
+end
+
+def fun_l20_n589()
+ fun_l21_n138
+end
+
+def fun_l20_n590()
+ fun_l21_n377
+end
+
+def fun_l20_n591()
+ fun_l21_n793
+end
+
+def fun_l20_n592()
+ fun_l21_n995
+end
+
+def fun_l20_n593()
+ fun_l21_n46
+end
+
+def fun_l20_n594()
+ fun_l21_n171
+end
+
+def fun_l20_n595()
+ fun_l21_n907
+end
+
+def fun_l20_n596()
+ fun_l21_n182
+end
+
+def fun_l20_n597()
+ fun_l21_n203
+end
+
+def fun_l20_n598()
+ fun_l21_n475
+end
+
+def fun_l20_n599()
+ fun_l21_n198
+end
+
+def fun_l20_n600()
+ fun_l21_n654
+end
+
+def fun_l20_n601()
+ fun_l21_n236
+end
+
+def fun_l20_n602()
+ fun_l21_n854
+end
+
+def fun_l20_n603()
+ fun_l21_n344
+end
+
+def fun_l20_n604()
+ fun_l21_n575
+end
+
+def fun_l20_n605()
+ fun_l21_n214
+end
+
+def fun_l20_n606()
+ fun_l21_n105
+end
+
+def fun_l20_n607()
+ fun_l21_n624
+end
+
+def fun_l20_n608()
+ fun_l21_n505
+end
+
+def fun_l20_n609()
+ fun_l21_n468
+end
+
+def fun_l20_n610()
+ fun_l21_n946
+end
+
+def fun_l20_n611()
+ fun_l21_n197
+end
+
+def fun_l20_n612()
+ fun_l21_n749
+end
+
+def fun_l20_n613()
+ fun_l21_n280
+end
+
+def fun_l20_n614()
+ fun_l21_n587
+end
+
+def fun_l20_n615()
+ fun_l21_n463
+end
+
+def fun_l20_n616()
+ fun_l21_n47
+end
+
+def fun_l20_n617()
+ fun_l21_n467
+end
+
+def fun_l20_n618()
+ fun_l21_n934
+end
+
+def fun_l20_n619()
+ fun_l21_n648
+end
+
+def fun_l20_n620()
+ fun_l21_n572
+end
+
+def fun_l20_n621()
+ fun_l21_n524
+end
+
+def fun_l20_n622()
+ fun_l21_n623
+end
+
+def fun_l20_n623()
+ fun_l21_n142
+end
+
+def fun_l20_n624()
+ fun_l21_n370
+end
+
+def fun_l20_n625()
+ fun_l21_n427
+end
+
+def fun_l20_n626()
+ fun_l21_n23
+end
+
+def fun_l20_n627()
+ fun_l21_n710
+end
+
+def fun_l20_n628()
+ fun_l21_n714
+end
+
+def fun_l20_n629()
+ fun_l21_n929
+end
+
+def fun_l20_n630()
+ fun_l21_n882
+end
+
+def fun_l20_n631()
+ fun_l21_n971
+end
+
+def fun_l20_n632()
+ fun_l21_n484
+end
+
+def fun_l20_n633()
+ fun_l21_n757
+end
+
+def fun_l20_n634()
+ fun_l21_n543
+end
+
+def fun_l20_n635()
+ fun_l21_n96
+end
+
+def fun_l20_n636()
+ fun_l21_n780
+end
+
+def fun_l20_n637()
+ fun_l21_n912
+end
+
+def fun_l20_n638()
+ fun_l21_n288
+end
+
+def fun_l20_n639()
+ fun_l21_n580
+end
+
+def fun_l20_n640()
+ fun_l21_n831
+end
+
+def fun_l20_n641()
+ fun_l21_n660
+end
+
+def fun_l20_n642()
+ fun_l21_n216
+end
+
+def fun_l20_n643()
+ fun_l21_n341
+end
+
+def fun_l20_n644()
+ fun_l21_n747
+end
+
+def fun_l20_n645()
+ fun_l21_n633
+end
+
+def fun_l20_n646()
+ fun_l21_n422
+end
+
+def fun_l20_n647()
+ fun_l21_n122
+end
+
+def fun_l20_n648()
+ fun_l21_n721
+end
+
+def fun_l20_n649()
+ fun_l21_n439
+end
+
+def fun_l20_n650()
+ fun_l21_n663
+end
+
+def fun_l20_n651()
+ fun_l21_n409
+end
+
+def fun_l20_n652()
+ fun_l21_n475
+end
+
+def fun_l20_n653()
+ fun_l21_n812
+end
+
+def fun_l20_n654()
+ fun_l21_n849
+end
+
+def fun_l20_n655()
+ fun_l21_n500
+end
+
+def fun_l20_n656()
+ fun_l21_n120
+end
+
+def fun_l20_n657()
+ fun_l21_n971
+end
+
+def fun_l20_n658()
+ fun_l21_n935
+end
+
+def fun_l20_n659()
+ fun_l21_n952
+end
+
+def fun_l20_n660()
+ fun_l21_n84
+end
+
+def fun_l20_n661()
+ fun_l21_n393
+end
+
+def fun_l20_n662()
+ fun_l21_n454
+end
+
+def fun_l20_n663()
+ fun_l21_n440
+end
+
+def fun_l20_n664()
+ fun_l21_n5
+end
+
+def fun_l20_n665()
+ fun_l21_n475
+end
+
+def fun_l20_n666()
+ fun_l21_n929
+end
+
+def fun_l20_n667()
+ fun_l21_n164
+end
+
+def fun_l20_n668()
+ fun_l21_n23
+end
+
+def fun_l20_n669()
+ fun_l21_n66
+end
+
+def fun_l20_n670()
+ fun_l21_n463
+end
+
+def fun_l20_n671()
+ fun_l21_n425
+end
+
+def fun_l20_n672()
+ fun_l21_n414
+end
+
+def fun_l20_n673()
+ fun_l21_n990
+end
+
+def fun_l20_n674()
+ fun_l21_n504
+end
+
+def fun_l20_n675()
+ fun_l21_n974
+end
+
+def fun_l20_n676()
+ fun_l21_n620
+end
+
+def fun_l20_n677()
+ fun_l21_n798
+end
+
+def fun_l20_n678()
+ fun_l21_n432
+end
+
+def fun_l20_n679()
+ fun_l21_n487
+end
+
+def fun_l20_n680()
+ fun_l21_n570
+end
+
+def fun_l20_n681()
+ fun_l21_n746
+end
+
+def fun_l20_n682()
+ fun_l21_n358
+end
+
+def fun_l20_n683()
+ fun_l21_n207
+end
+
+def fun_l20_n684()
+ fun_l21_n408
+end
+
+def fun_l20_n685()
+ fun_l21_n679
+end
+
+def fun_l20_n686()
+ fun_l21_n38
+end
+
+def fun_l20_n687()
+ fun_l21_n58
+end
+
+def fun_l20_n688()
+ fun_l21_n460
+end
+
+def fun_l20_n689()
+ fun_l21_n855
+end
+
+def fun_l20_n690()
+ fun_l21_n641
+end
+
+def fun_l20_n691()
+ fun_l21_n146
+end
+
+def fun_l20_n692()
+ fun_l21_n709
+end
+
+def fun_l20_n693()
+ fun_l21_n801
+end
+
+def fun_l20_n694()
+ fun_l21_n375
+end
+
+def fun_l20_n695()
+ fun_l21_n778
+end
+
+def fun_l20_n696()
+ fun_l21_n620
+end
+
+def fun_l20_n697()
+ fun_l21_n630
+end
+
+def fun_l20_n698()
+ fun_l21_n582
+end
+
+def fun_l20_n699()
+ fun_l21_n198
+end
+
+def fun_l20_n700()
+ fun_l21_n830
+end
+
+def fun_l20_n701()
+ fun_l21_n101
+end
+
+def fun_l20_n702()
+ fun_l21_n824
+end
+
+def fun_l20_n703()
+ fun_l21_n97
+end
+
+def fun_l20_n704()
+ fun_l21_n628
+end
+
+def fun_l20_n705()
+ fun_l21_n688
+end
+
+def fun_l20_n706()
+ fun_l21_n120
+end
+
+def fun_l20_n707()
+ fun_l21_n343
+end
+
+def fun_l20_n708()
+ fun_l21_n175
+end
+
+def fun_l20_n709()
+ fun_l21_n122
+end
+
+def fun_l20_n710()
+ fun_l21_n272
+end
+
+def fun_l20_n711()
+ fun_l21_n343
+end
+
+def fun_l20_n712()
+ fun_l21_n317
+end
+
+def fun_l20_n713()
+ fun_l21_n982
+end
+
+def fun_l20_n714()
+ fun_l21_n458
+end
+
+def fun_l20_n715()
+ fun_l21_n906
+end
+
+def fun_l20_n716()
+ fun_l21_n565
+end
+
+def fun_l20_n717()
+ fun_l21_n174
+end
+
+def fun_l20_n718()
+ fun_l21_n34
+end
+
+def fun_l20_n719()
+ fun_l21_n832
+end
+
+def fun_l20_n720()
+ fun_l21_n111
+end
+
+def fun_l20_n721()
+ fun_l21_n701
+end
+
+def fun_l20_n722()
+ fun_l21_n201
+end
+
+def fun_l20_n723()
+ fun_l21_n285
+end
+
+def fun_l20_n724()
+ fun_l21_n269
+end
+
+def fun_l20_n725()
+ fun_l21_n144
+end
+
+def fun_l20_n726()
+ fun_l21_n246
+end
+
+def fun_l20_n727()
+ fun_l21_n221
+end
+
+def fun_l20_n728()
+ fun_l21_n599
+end
+
+def fun_l20_n729()
+ fun_l21_n909
+end
+
+def fun_l20_n730()
+ fun_l21_n693
+end
+
+def fun_l20_n731()
+ fun_l21_n879
+end
+
+def fun_l20_n732()
+ fun_l21_n452
+end
+
+def fun_l20_n733()
+ fun_l21_n772
+end
+
+def fun_l20_n734()
+ fun_l21_n116
+end
+
+def fun_l20_n735()
+ fun_l21_n895
+end
+
+def fun_l20_n736()
+ fun_l21_n937
+end
+
+def fun_l20_n737()
+ fun_l21_n50
+end
+
+def fun_l20_n738()
+ fun_l21_n947
+end
+
+def fun_l20_n739()
+ fun_l21_n500
+end
+
+def fun_l20_n740()
+ fun_l21_n753
+end
+
+def fun_l20_n741()
+ fun_l21_n497
+end
+
+def fun_l20_n742()
+ fun_l21_n524
+end
+
+def fun_l20_n743()
+ fun_l21_n389
+end
+
+def fun_l20_n744()
+ fun_l21_n539
+end
+
+def fun_l20_n745()
+ fun_l21_n70
+end
+
+def fun_l20_n746()
+ fun_l21_n736
+end
+
+def fun_l20_n747()
+ fun_l21_n94
+end
+
+def fun_l20_n748()
+ fun_l21_n686
+end
+
+def fun_l20_n749()
+ fun_l21_n269
+end
+
+def fun_l20_n750()
+ fun_l21_n809
+end
+
+def fun_l20_n751()
+ fun_l21_n570
+end
+
+def fun_l20_n752()
+ fun_l21_n522
+end
+
+def fun_l20_n753()
+ fun_l21_n167
+end
+
+def fun_l20_n754()
+ fun_l21_n610
+end
+
+def fun_l20_n755()
+ fun_l21_n72
+end
+
+def fun_l20_n756()
+ fun_l21_n146
+end
+
+def fun_l20_n757()
+ fun_l21_n916
+end
+
+def fun_l20_n758()
+ fun_l21_n163
+end
+
+def fun_l20_n759()
+ fun_l21_n279
+end
+
+def fun_l20_n760()
+ fun_l21_n677
+end
+
+def fun_l20_n761()
+ fun_l21_n876
+end
+
+def fun_l20_n762()
+ fun_l21_n333
+end
+
+def fun_l20_n763()
+ fun_l21_n36
+end
+
+def fun_l20_n764()
+ fun_l21_n166
+end
+
+def fun_l20_n765()
+ fun_l21_n824
+end
+
+def fun_l20_n766()
+ fun_l21_n416
+end
+
+def fun_l20_n767()
+ fun_l21_n655
+end
+
+def fun_l20_n768()
+ fun_l21_n267
+end
+
+def fun_l20_n769()
+ fun_l21_n257
+end
+
+def fun_l20_n770()
+ fun_l21_n839
+end
+
+def fun_l20_n771()
+ fun_l21_n504
+end
+
+def fun_l20_n772()
+ fun_l21_n717
+end
+
+def fun_l20_n773()
+ fun_l21_n332
+end
+
+def fun_l20_n774()
+ fun_l21_n949
+end
+
+def fun_l20_n775()
+ fun_l21_n226
+end
+
+def fun_l20_n776()
+ fun_l21_n145
+end
+
+def fun_l20_n777()
+ fun_l21_n548
+end
+
+def fun_l20_n778()
+ fun_l21_n912
+end
+
+def fun_l20_n779()
+ fun_l21_n984
+end
+
+def fun_l20_n780()
+ fun_l21_n907
+end
+
+def fun_l20_n781()
+ fun_l21_n433
+end
+
+def fun_l20_n782()
+ fun_l21_n542
+end
+
+def fun_l20_n783()
+ fun_l21_n88
+end
+
+def fun_l20_n784()
+ fun_l21_n104
+end
+
+def fun_l20_n785()
+ fun_l21_n383
+end
+
+def fun_l20_n786()
+ fun_l21_n998
+end
+
+def fun_l20_n787()
+ fun_l21_n525
+end
+
+def fun_l20_n788()
+ fun_l21_n276
+end
+
+def fun_l20_n789()
+ fun_l21_n162
+end
+
+def fun_l20_n790()
+ fun_l21_n420
+end
+
+def fun_l20_n791()
+ fun_l21_n793
+end
+
+def fun_l20_n792()
+ fun_l21_n121
+end
+
+def fun_l20_n793()
+ fun_l21_n164
+end
+
+def fun_l20_n794()
+ fun_l21_n110
+end
+
+def fun_l20_n795()
+ fun_l21_n68
+end
+
+def fun_l20_n796()
+ fun_l21_n417
+end
+
+def fun_l20_n797()
+ fun_l21_n878
+end
+
+def fun_l20_n798()
+ fun_l21_n987
+end
+
+def fun_l20_n799()
+ fun_l21_n197
+end
+
+def fun_l20_n800()
+ fun_l21_n729
+end
+
+def fun_l20_n801()
+ fun_l21_n956
+end
+
+def fun_l20_n802()
+ fun_l21_n33
+end
+
+def fun_l20_n803()
+ fun_l21_n73
+end
+
+def fun_l20_n804()
+ fun_l21_n759
+end
+
+def fun_l20_n805()
+ fun_l21_n784
+end
+
+def fun_l20_n806()
+ fun_l21_n102
+end
+
+def fun_l20_n807()
+ fun_l21_n624
+end
+
+def fun_l20_n808()
+ fun_l21_n580
+end
+
+def fun_l20_n809()
+ fun_l21_n347
+end
+
+def fun_l20_n810()
+ fun_l21_n163
+end
+
+def fun_l20_n811()
+ fun_l21_n220
+end
+
+def fun_l20_n812()
+ fun_l21_n324
+end
+
+def fun_l20_n813()
+ fun_l21_n299
+end
+
+def fun_l20_n814()
+ fun_l21_n958
+end
+
+def fun_l20_n815()
+ fun_l21_n252
+end
+
+def fun_l20_n816()
+ fun_l21_n479
+end
+
+def fun_l20_n817()
+ fun_l21_n536
+end
+
+def fun_l20_n818()
+ fun_l21_n624
+end
+
+def fun_l20_n819()
+ fun_l21_n347
+end
+
+def fun_l20_n820()
+ fun_l21_n308
+end
+
+def fun_l20_n821()
+ fun_l21_n4
+end
+
+def fun_l20_n822()
+ fun_l21_n88
+end
+
+def fun_l20_n823()
+ fun_l21_n787
+end
+
+def fun_l20_n824()
+ fun_l21_n450
+end
+
+def fun_l20_n825()
+ fun_l21_n384
+end
+
+def fun_l20_n826()
+ fun_l21_n416
+end
+
+def fun_l20_n827()
+ fun_l21_n73
+end
+
+def fun_l20_n828()
+ fun_l21_n884
+end
+
+def fun_l20_n829()
+ fun_l21_n51
+end
+
+def fun_l20_n830()
+ fun_l21_n37
+end
+
+def fun_l20_n831()
+ fun_l21_n326
+end
+
+def fun_l20_n832()
+ fun_l21_n120
+end
+
+def fun_l20_n833()
+ fun_l21_n957
+end
+
+def fun_l20_n834()
+ fun_l21_n973
+end
+
+def fun_l20_n835()
+ fun_l21_n966
+end
+
+def fun_l20_n836()
+ fun_l21_n110
+end
+
+def fun_l20_n837()
+ fun_l21_n57
+end
+
+def fun_l20_n838()
+ fun_l21_n836
+end
+
+def fun_l20_n839()
+ fun_l21_n701
+end
+
+def fun_l20_n840()
+ fun_l21_n607
+end
+
+def fun_l20_n841()
+ fun_l21_n92
+end
+
+def fun_l20_n842()
+ fun_l21_n304
+end
+
+def fun_l20_n843()
+ fun_l21_n443
+end
+
+def fun_l20_n844()
+ fun_l21_n282
+end
+
+def fun_l20_n845()
+ fun_l21_n301
+end
+
+def fun_l20_n846()
+ fun_l21_n360
+end
+
+def fun_l20_n847()
+ fun_l21_n848
+end
+
+def fun_l20_n848()
+ fun_l21_n796
+end
+
+def fun_l20_n849()
+ fun_l21_n81
+end
+
+def fun_l20_n850()
+ fun_l21_n126
+end
+
+def fun_l20_n851()
+ fun_l21_n951
+end
+
+def fun_l20_n852()
+ fun_l21_n187
+end
+
+def fun_l20_n853()
+ fun_l21_n498
+end
+
+def fun_l20_n854()
+ fun_l21_n885
+end
+
+def fun_l20_n855()
+ fun_l21_n391
+end
+
+def fun_l20_n856()
+ fun_l21_n823
+end
+
+def fun_l20_n857()
+ fun_l21_n516
+end
+
+def fun_l20_n858()
+ fun_l21_n266
+end
+
+def fun_l20_n859()
+ fun_l21_n617
+end
+
+def fun_l20_n860()
+ fun_l21_n440
+end
+
+def fun_l20_n861()
+ fun_l21_n694
+end
+
+def fun_l20_n862()
+ fun_l21_n128
+end
+
+def fun_l20_n863()
+ fun_l21_n340
+end
+
+def fun_l20_n864()
+ fun_l21_n234
+end
+
+def fun_l20_n865()
+ fun_l21_n324
+end
+
+def fun_l20_n866()
+ fun_l21_n233
+end
+
+def fun_l20_n867()
+ fun_l21_n26
+end
+
+def fun_l20_n868()
+ fun_l21_n548
+end
+
+def fun_l20_n869()
+ fun_l21_n563
+end
+
+def fun_l20_n870()
+ fun_l21_n452
+end
+
+def fun_l20_n871()
+ fun_l21_n223
+end
+
+def fun_l20_n872()
+ fun_l21_n147
+end
+
+def fun_l20_n873()
+ fun_l21_n147
+end
+
+def fun_l20_n874()
+ fun_l21_n266
+end
+
+def fun_l20_n875()
+ fun_l21_n335
+end
+
+def fun_l20_n876()
+ fun_l21_n253
+end
+
+def fun_l20_n877()
+ fun_l21_n479
+end
+
+def fun_l20_n878()
+ fun_l21_n34
+end
+
+def fun_l20_n879()
+ fun_l21_n798
+end
+
+def fun_l20_n880()
+ fun_l21_n223
+end
+
+def fun_l20_n881()
+ fun_l21_n343
+end
+
+def fun_l20_n882()
+ fun_l21_n728
+end
+
+def fun_l20_n883()
+ fun_l21_n351
+end
+
+def fun_l20_n884()
+ fun_l21_n997
+end
+
+def fun_l20_n885()
+ fun_l21_n49
+end
+
+def fun_l20_n886()
+ fun_l21_n773
+end
+
+def fun_l20_n887()
+ fun_l21_n93
+end
+
+def fun_l20_n888()
+ fun_l21_n124
+end
+
+def fun_l20_n889()
+ fun_l21_n897
+end
+
+def fun_l20_n890()
+ fun_l21_n692
+end
+
+def fun_l20_n891()
+ fun_l21_n158
+end
+
+def fun_l20_n892()
+ fun_l21_n456
+end
+
+def fun_l20_n893()
+ fun_l21_n49
+end
+
+def fun_l20_n894()
+ fun_l21_n751
+end
+
+def fun_l20_n895()
+ fun_l21_n672
+end
+
+def fun_l20_n896()
+ fun_l21_n726
+end
+
+def fun_l20_n897()
+ fun_l21_n95
+end
+
+def fun_l20_n898()
+ fun_l21_n420
+end
+
+def fun_l20_n899()
+ fun_l21_n77
+end
+
+def fun_l20_n900()
+ fun_l21_n770
+end
+
+def fun_l20_n901()
+ fun_l21_n127
+end
+
+def fun_l20_n902()
+ fun_l21_n566
+end
+
+def fun_l20_n903()
+ fun_l21_n398
+end
+
+def fun_l20_n904()
+ fun_l21_n720
+end
+
+def fun_l20_n905()
+ fun_l21_n350
+end
+
+def fun_l20_n906()
+ fun_l21_n935
+end
+
+def fun_l20_n907()
+ fun_l21_n172
+end
+
+def fun_l20_n908()
+ fun_l21_n988
+end
+
+def fun_l20_n909()
+ fun_l21_n627
+end
+
+def fun_l20_n910()
+ fun_l21_n776
+end
+
+def fun_l20_n911()
+ fun_l21_n34
+end
+
+def fun_l20_n912()
+ fun_l21_n361
+end
+
+def fun_l20_n913()
+ fun_l21_n408
+end
+
+def fun_l20_n914()
+ fun_l21_n941
+end
+
+def fun_l20_n915()
+ fun_l21_n275
+end
+
+def fun_l20_n916()
+ fun_l21_n864
+end
+
+def fun_l20_n917()
+ fun_l21_n839
+end
+
+def fun_l20_n918()
+ fun_l21_n837
+end
+
+def fun_l20_n919()
+ fun_l21_n837
+end
+
+def fun_l20_n920()
+ fun_l21_n627
+end
+
+def fun_l20_n921()
+ fun_l21_n321
+end
+
+def fun_l20_n922()
+ fun_l21_n308
+end
+
+def fun_l20_n923()
+ fun_l21_n475
+end
+
+def fun_l20_n924()
+ fun_l21_n115
+end
+
+def fun_l20_n925()
+ fun_l21_n794
+end
+
+def fun_l20_n926()
+ fun_l21_n376
+end
+
+def fun_l20_n927()
+ fun_l21_n951
+end
+
+def fun_l20_n928()
+ fun_l21_n744
+end
+
+def fun_l20_n929()
+ fun_l21_n621
+end
+
+def fun_l20_n930()
+ fun_l21_n630
+end
+
+def fun_l20_n931()
+ fun_l21_n459
+end
+
+def fun_l20_n932()
+ fun_l21_n41
+end
+
+def fun_l20_n933()
+ fun_l21_n313
+end
+
+def fun_l20_n934()
+ fun_l21_n130
+end
+
+def fun_l20_n935()
+ fun_l21_n605
+end
+
+def fun_l20_n936()
+ fun_l21_n261
+end
+
+def fun_l20_n937()
+ fun_l21_n54
+end
+
+def fun_l20_n938()
+ fun_l21_n319
+end
+
+def fun_l20_n939()
+ fun_l21_n541
+end
+
+def fun_l20_n940()
+ fun_l21_n104
+end
+
+def fun_l20_n941()
+ fun_l21_n339
+end
+
+def fun_l20_n942()
+ fun_l21_n220
+end
+
+def fun_l20_n943()
+ fun_l21_n560
+end
+
+def fun_l20_n944()
+ fun_l21_n931
+end
+
+def fun_l20_n945()
+ fun_l21_n642
+end
+
+def fun_l20_n946()
+ fun_l21_n584
+end
+
+def fun_l20_n947()
+ fun_l21_n324
+end
+
+def fun_l20_n948()
+ fun_l21_n10
+end
+
+def fun_l20_n949()
+ fun_l21_n976
+end
+
+def fun_l20_n950()
+ fun_l21_n65
+end
+
+def fun_l20_n951()
+ fun_l21_n392
+end
+
+def fun_l20_n952()
+ fun_l21_n263
+end
+
+def fun_l20_n953()
+ fun_l21_n228
+end
+
+def fun_l20_n954()
+ fun_l21_n177
+end
+
+def fun_l20_n955()
+ fun_l21_n81
+end
+
+def fun_l20_n956()
+ fun_l21_n141
+end
+
+def fun_l20_n957()
+ fun_l21_n540
+end
+
+def fun_l20_n958()
+ fun_l21_n802
+end
+
+def fun_l20_n959()
+ fun_l21_n28
+end
+
+def fun_l20_n960()
+ fun_l21_n438
+end
+
+def fun_l20_n961()
+ fun_l21_n722
+end
+
+def fun_l20_n962()
+ fun_l21_n707
+end
+
+def fun_l20_n963()
+ fun_l21_n598
+end
+
+def fun_l20_n964()
+ fun_l21_n687
+end
+
+def fun_l20_n965()
+ fun_l21_n258
+end
+
+def fun_l20_n966()
+ fun_l21_n786
+end
+
+def fun_l20_n967()
+ fun_l21_n362
+end
+
+def fun_l20_n968()
+ fun_l21_n41
+end
+
+def fun_l20_n969()
+ fun_l21_n933
+end
+
+def fun_l20_n970()
+ fun_l21_n250
+end
+
+def fun_l20_n971()
+ fun_l21_n760
+end
+
+def fun_l20_n972()
+ fun_l21_n993
+end
+
+def fun_l20_n973()
+ fun_l21_n278
+end
+
+def fun_l20_n974()
+ fun_l21_n477
+end
+
+def fun_l20_n975()
+ fun_l21_n901
+end
+
+def fun_l20_n976()
+ fun_l21_n820
+end
+
+def fun_l20_n977()
+ fun_l21_n739
+end
+
+def fun_l20_n978()
+ fun_l21_n722
+end
+
+def fun_l20_n979()
+ fun_l21_n418
+end
+
+def fun_l20_n980()
+ fun_l21_n207
+end
+
+def fun_l20_n981()
+ fun_l21_n213
+end
+
+def fun_l20_n982()
+ fun_l21_n30
+end
+
+def fun_l20_n983()
+ fun_l21_n667
+end
+
+def fun_l20_n984()
+ fun_l21_n582
+end
+
+def fun_l20_n985()
+ fun_l21_n398
+end
+
+def fun_l20_n986()
+ fun_l21_n376
+end
+
+def fun_l20_n987()
+ fun_l21_n84
+end
+
+def fun_l20_n988()
+ fun_l21_n701
+end
+
+def fun_l20_n989()
+ fun_l21_n100
+end
+
+def fun_l20_n990()
+ fun_l21_n247
+end
+
+def fun_l20_n991()
+ fun_l21_n992
+end
+
+def fun_l20_n992()
+ fun_l21_n635
+end
+
+def fun_l20_n993()
+ fun_l21_n493
+end
+
+def fun_l20_n994()
+ fun_l21_n184
+end
+
+def fun_l20_n995()
+ fun_l21_n31
+end
+
+def fun_l20_n996()
+ fun_l21_n555
+end
+
+def fun_l20_n997()
+ fun_l21_n258
+end
+
+def fun_l20_n998()
+ fun_l21_n32
+end
+
+def fun_l20_n999()
+ fun_l21_n6
+end
+
+def fun_l21_n0()
+ fun_l22_n98
+end
+
+def fun_l21_n1()
+ fun_l22_n194
+end
+
+def fun_l21_n2()
+ fun_l22_n510
+end
+
+def fun_l21_n3()
+ fun_l22_n707
+end
+
+def fun_l21_n4()
+ fun_l22_n878
+end
+
+def fun_l21_n5()
+ fun_l22_n615
+end
+
+def fun_l21_n6()
+ fun_l22_n891
+end
+
+def fun_l21_n7()
+ fun_l22_n458
+end
+
+def fun_l21_n8()
+ fun_l22_n478
+end
+
+def fun_l21_n9()
+ fun_l22_n30
+end
+
+def fun_l21_n10()
+ fun_l22_n345
+end
+
+def fun_l21_n11()
+ fun_l22_n202
+end
+
+def fun_l21_n12()
+ fun_l22_n354
+end
+
+def fun_l21_n13()
+ fun_l22_n673
+end
+
+def fun_l21_n14()
+ fun_l22_n662
+end
+
+def fun_l21_n15()
+ fun_l22_n593
+end
+
+def fun_l21_n16()
+ fun_l22_n127
+end
+
+def fun_l21_n17()
+ fun_l22_n876
+end
+
+def fun_l21_n18()
+ fun_l22_n862
+end
+
+def fun_l21_n19()
+ fun_l22_n337
+end
+
+def fun_l21_n20()
+ fun_l22_n365
+end
+
+def fun_l21_n21()
+ fun_l22_n323
+end
+
+def fun_l21_n22()
+ fun_l22_n767
+end
+
+def fun_l21_n23()
+ fun_l22_n364
+end
+
+def fun_l21_n24()
+ fun_l22_n562
+end
+
+def fun_l21_n25()
+ fun_l22_n420
+end
+
+def fun_l21_n26()
+ fun_l22_n754
+end
+
+def fun_l21_n27()
+ fun_l22_n381
+end
+
+def fun_l21_n28()
+ fun_l22_n393
+end
+
+def fun_l21_n29()
+ fun_l22_n25
+end
+
+def fun_l21_n30()
+ fun_l22_n951
+end
+
+def fun_l21_n31()
+ fun_l22_n271
+end
+
+def fun_l21_n32()
+ fun_l22_n127
+end
+
+def fun_l21_n33()
+ fun_l22_n962
+end
+
+def fun_l21_n34()
+ fun_l22_n611
+end
+
+def fun_l21_n35()
+ fun_l22_n936
+end
+
+def fun_l21_n36()
+ fun_l22_n340
+end
+
+def fun_l21_n37()
+ fun_l22_n349
+end
+
+def fun_l21_n38()
+ fun_l22_n692
+end
+
+def fun_l21_n39()
+ fun_l22_n184
+end
+
+def fun_l21_n40()
+ fun_l22_n490
+end
+
+def fun_l21_n41()
+ fun_l22_n316
+end
+
+def fun_l21_n42()
+ fun_l22_n545
+end
+
+def fun_l21_n43()
+ fun_l22_n344
+end
+
+def fun_l21_n44()
+ fun_l22_n938
+end
+
+def fun_l21_n45()
+ fun_l22_n820
+end
+
+def fun_l21_n46()
+ fun_l22_n60
+end
+
+def fun_l21_n47()
+ fun_l22_n649
+end
+
+def fun_l21_n48()
+ fun_l22_n41
+end
+
+def fun_l21_n49()
+ fun_l22_n305
+end
+
+def fun_l21_n50()
+ fun_l22_n677
+end
+
+def fun_l21_n51()
+ fun_l22_n880
+end
+
+def fun_l21_n52()
+ fun_l22_n535
+end
+
+def fun_l21_n53()
+ fun_l22_n686
+end
+
+def fun_l21_n54()
+ fun_l22_n194
+end
+
+def fun_l21_n55()
+ fun_l22_n313
+end
+
+def fun_l21_n56()
+ fun_l22_n639
+end
+
+def fun_l21_n57()
+ fun_l22_n182
+end
+
+def fun_l21_n58()
+ fun_l22_n588
+end
+
+def fun_l21_n59()
+ fun_l22_n979
+end
+
+def fun_l21_n60()
+ fun_l22_n230
+end
+
+def fun_l21_n61()
+ fun_l22_n139
+end
+
+def fun_l21_n62()
+ fun_l22_n899
+end
+
+def fun_l21_n63()
+ fun_l22_n532
+end
+
+def fun_l21_n64()
+ fun_l22_n479
+end
+
+def fun_l21_n65()
+ fun_l22_n735
+end
+
+def fun_l21_n66()
+ fun_l22_n425
+end
+
+def fun_l21_n67()
+ fun_l22_n878
+end
+
+def fun_l21_n68()
+ fun_l22_n706
+end
+
+def fun_l21_n69()
+ fun_l22_n826
+end
+
+def fun_l21_n70()
+ fun_l22_n44
+end
+
+def fun_l21_n71()
+ fun_l22_n107
+end
+
+def fun_l21_n72()
+ fun_l22_n737
+end
+
+def fun_l21_n73()
+ fun_l22_n659
+end
+
+def fun_l21_n74()
+ fun_l22_n707
+end
+
+def fun_l21_n75()
+ fun_l22_n658
+end
+
+def fun_l21_n76()
+ fun_l22_n937
+end
+
+def fun_l21_n77()
+ fun_l22_n86
+end
+
+def fun_l21_n78()
+ fun_l22_n606
+end
+
+def fun_l21_n79()
+ fun_l22_n61
+end
+
+def fun_l21_n80()
+ fun_l22_n780
+end
+
+def fun_l21_n81()
+ fun_l22_n560
+end
+
+def fun_l21_n82()
+ fun_l22_n949
+end
+
+def fun_l21_n83()
+ fun_l22_n790
+end
+
+def fun_l21_n84()
+ fun_l22_n851
+end
+
+def fun_l21_n85()
+ fun_l22_n148
+end
+
+def fun_l21_n86()
+ fun_l22_n406
+end
+
+def fun_l21_n87()
+ fun_l22_n38
+end
+
+def fun_l21_n88()
+ fun_l22_n468
+end
+
+def fun_l21_n89()
+ fun_l22_n783
+end
+
+def fun_l21_n90()
+ fun_l22_n853
+end
+
+def fun_l21_n91()
+ fun_l22_n758
+end
+
+def fun_l21_n92()
+ fun_l22_n34
+end
+
+def fun_l21_n93()
+ fun_l22_n387
+end
+
+def fun_l21_n94()
+ fun_l22_n181
+end
+
+def fun_l21_n95()
+ fun_l22_n514
+end
+
+def fun_l21_n96()
+ fun_l22_n139
+end
+
+def fun_l21_n97()
+ fun_l22_n543
+end
+
+def fun_l21_n98()
+ fun_l22_n462
+end
+
+def fun_l21_n99()
+ fun_l22_n570
+end
+
+def fun_l21_n100()
+ fun_l22_n634
+end
+
+def fun_l21_n101()
+ fun_l22_n69
+end
+
+def fun_l21_n102()
+ fun_l22_n142
+end
+
+def fun_l21_n103()
+ fun_l22_n964
+end
+
+def fun_l21_n104()
+ fun_l22_n851
+end
+
+def fun_l21_n105()
+ fun_l22_n410
+end
+
+def fun_l21_n106()
+ fun_l22_n563
+end
+
+def fun_l21_n107()
+ fun_l22_n914
+end
+
+def fun_l21_n108()
+ fun_l22_n163
+end
+
+def fun_l21_n109()
+ fun_l22_n248
+end
+
+def fun_l21_n110()
+ fun_l22_n309
+end
+
+def fun_l21_n111()
+ fun_l22_n894
+end
+
+def fun_l21_n112()
+ fun_l22_n916
+end
+
+def fun_l21_n113()
+ fun_l22_n818
+end
+
+def fun_l21_n114()
+ fun_l22_n824
+end
+
+def fun_l21_n115()
+ fun_l22_n34
+end
+
+def fun_l21_n116()
+ fun_l22_n538
+end
+
+def fun_l21_n117()
+ fun_l22_n841
+end
+
+def fun_l21_n118()
+ fun_l22_n934
+end
+
+def fun_l21_n119()
+ fun_l22_n217
+end
+
+def fun_l21_n120()
+ fun_l22_n479
+end
+
+def fun_l21_n121()
+ fun_l22_n693
+end
+
+def fun_l21_n122()
+ fun_l22_n182
+end
+
+def fun_l21_n123()
+ fun_l22_n269
+end
+
+def fun_l21_n124()
+ fun_l22_n324
+end
+
+def fun_l21_n125()
+ fun_l22_n688
+end
+
+def fun_l21_n126()
+ fun_l22_n725
+end
+
+def fun_l21_n127()
+ fun_l22_n48
+end
+
+def fun_l21_n128()
+ fun_l22_n884
+end
+
+def fun_l21_n129()
+ fun_l22_n295
+end
+
+def fun_l21_n130()
+ fun_l22_n192
+end
+
+def fun_l21_n131()
+ fun_l22_n777
+end
+
+def fun_l21_n132()
+ fun_l22_n87
+end
+
+def fun_l21_n133()
+ fun_l22_n724
+end
+
+def fun_l21_n134()
+ fun_l22_n235
+end
+
+def fun_l21_n135()
+ fun_l22_n239
+end
+
+def fun_l21_n136()
+ fun_l22_n820
+end
+
+def fun_l21_n137()
+ fun_l22_n552
+end
+
+def fun_l21_n138()
+ fun_l22_n227
+end
+
+def fun_l21_n139()
+ fun_l22_n806
+end
+
+def fun_l21_n140()
+ fun_l22_n350
+end
+
+def fun_l21_n141()
+ fun_l22_n226
+end
+
+def fun_l21_n142()
+ fun_l22_n166
+end
+
+def fun_l21_n143()
+ fun_l22_n480
+end
+
+def fun_l21_n144()
+ fun_l22_n28
+end
+
+def fun_l21_n145()
+ fun_l22_n661
+end
+
+def fun_l21_n146()
+ fun_l22_n464
+end
+
+def fun_l21_n147()
+ fun_l22_n573
+end
+
+def fun_l21_n148()
+ fun_l22_n589
+end
+
+def fun_l21_n149()
+ fun_l22_n856
+end
+
+def fun_l21_n150()
+ fun_l22_n181
+end
+
+def fun_l21_n151()
+ fun_l22_n252
+end
+
+def fun_l21_n152()
+ fun_l22_n80
+end
+
+def fun_l21_n153()
+ fun_l22_n417
+end
+
+def fun_l21_n154()
+ fun_l22_n442
+end
+
+def fun_l21_n155()
+ fun_l22_n928
+end
+
+def fun_l21_n156()
+ fun_l22_n38
+end
+
+def fun_l21_n157()
+ fun_l22_n515
+end
+
+def fun_l21_n158()
+ fun_l22_n986
+end
+
+def fun_l21_n159()
+ fun_l22_n173
+end
+
+def fun_l21_n160()
+ fun_l22_n592
+end
+
+def fun_l21_n161()
+ fun_l22_n50
+end
+
+def fun_l21_n162()
+ fun_l22_n625
+end
+
+def fun_l21_n163()
+ fun_l22_n651
+end
+
+def fun_l21_n164()
+ fun_l22_n183
+end
+
+def fun_l21_n165()
+ fun_l22_n976
+end
+
+def fun_l21_n166()
+ fun_l22_n533
+end
+
+def fun_l21_n167()
+ fun_l22_n313
+end
+
+def fun_l21_n168()
+ fun_l22_n948
+end
+
+def fun_l21_n169()
+ fun_l22_n860
+end
+
+def fun_l21_n170()
+ fun_l22_n393
+end
+
+def fun_l21_n171()
+ fun_l22_n986
+end
+
+def fun_l21_n172()
+ fun_l22_n206
+end
+
+def fun_l21_n173()
+ fun_l22_n189
+end
+
+def fun_l21_n174()
+ fun_l22_n209
+end
+
+def fun_l21_n175()
+ fun_l22_n822
+end
+
+def fun_l21_n176()
+ fun_l22_n960
+end
+
+def fun_l21_n177()
+ fun_l22_n646
+end
+
+def fun_l21_n178()
+ fun_l22_n523
+end
+
+def fun_l21_n179()
+ fun_l22_n520
+end
+
+def fun_l21_n180()
+ fun_l22_n146
+end
+
+def fun_l21_n181()
+ fun_l22_n336
+end
+
+def fun_l21_n182()
+ fun_l22_n129
+end
+
+def fun_l21_n183()
+ fun_l22_n382
+end
+
+def fun_l21_n184()
+ fun_l22_n833
+end
+
+def fun_l21_n185()
+ fun_l22_n398
+end
+
+def fun_l21_n186()
+ fun_l22_n919
+end
+
+def fun_l21_n187()
+ fun_l22_n463
+end
+
+def fun_l21_n188()
+ fun_l22_n442
+end
+
+def fun_l21_n189()
+ fun_l22_n395
+end
+
+def fun_l21_n190()
+ fun_l22_n934
+end
+
+def fun_l21_n191()
+ fun_l22_n117
+end
+
+def fun_l21_n192()
+ fun_l22_n436
+end
+
+def fun_l21_n193()
+ fun_l22_n316
+end
+
+def fun_l21_n194()
+ fun_l22_n512
+end
+
+def fun_l21_n195()
+ fun_l22_n565
+end
+
+def fun_l21_n196()
+ fun_l22_n494
+end
+
+def fun_l21_n197()
+ fun_l22_n586
+end
+
+def fun_l21_n198()
+ fun_l22_n456
+end
+
+def fun_l21_n199()
+ fun_l22_n465
+end
+
+def fun_l21_n200()
+ fun_l22_n622
+end
+
+def fun_l21_n201()
+ fun_l22_n747
+end
+
+def fun_l21_n202()
+ fun_l22_n216
+end
+
+def fun_l21_n203()
+ fun_l22_n568
+end
+
+def fun_l21_n204()
+ fun_l22_n94
+end
+
+def fun_l21_n205()
+ fun_l22_n839
+end
+
+def fun_l21_n206()
+ fun_l22_n357
+end
+
+def fun_l21_n207()
+ fun_l22_n485
+end
+
+def fun_l21_n208()
+ fun_l22_n818
+end
+
+def fun_l21_n209()
+ fun_l22_n852
+end
+
+def fun_l21_n210()
+ fun_l22_n264
+end
+
+def fun_l21_n211()
+ fun_l22_n519
+end
+
+def fun_l21_n212()
+ fun_l22_n362
+end
+
+def fun_l21_n213()
+ fun_l22_n955
+end
+
+def fun_l21_n214()
+ fun_l22_n756
+end
+
+def fun_l21_n215()
+ fun_l22_n271
+end
+
+def fun_l21_n216()
+ fun_l22_n169
+end
+
+def fun_l21_n217()
+ fun_l22_n456
+end
+
+def fun_l21_n218()
+ fun_l22_n227
+end
+
+def fun_l21_n219()
+ fun_l22_n75
+end
+
+def fun_l21_n220()
+ fun_l22_n21
+end
+
+def fun_l21_n221()
+ fun_l22_n35
+end
+
+def fun_l21_n222()
+ fun_l22_n386
+end
+
+def fun_l21_n223()
+ fun_l22_n678
+end
+
+def fun_l21_n224()
+ fun_l22_n463
+end
+
+def fun_l21_n225()
+ fun_l22_n200
+end
+
+def fun_l21_n226()
+ fun_l22_n502
+end
+
+def fun_l21_n227()
+ fun_l22_n690
+end
+
+def fun_l21_n228()
+ fun_l22_n153
+end
+
+def fun_l21_n229()
+ fun_l22_n218
+end
+
+def fun_l21_n230()
+ fun_l22_n20
+end
+
+def fun_l21_n231()
+ fun_l22_n48
+end
+
+def fun_l21_n232()
+ fun_l22_n549
+end
+
+def fun_l21_n233()
+ fun_l22_n994
+end
+
+def fun_l21_n234()
+ fun_l22_n242
+end
+
+def fun_l21_n235()
+ fun_l22_n153
+end
+
+def fun_l21_n236()
+ fun_l22_n830
+end
+
+def fun_l21_n237()
+ fun_l22_n663
+end
+
+def fun_l21_n238()
+ fun_l22_n387
+end
+
+def fun_l21_n239()
+ fun_l22_n87
+end
+
+def fun_l21_n240()
+ fun_l22_n341
+end
+
+def fun_l21_n241()
+ fun_l22_n499
+end
+
+def fun_l21_n242()
+ fun_l22_n231
+end
+
+def fun_l21_n243()
+ fun_l22_n644
+end
+
+def fun_l21_n244()
+ fun_l22_n212
+end
+
+def fun_l21_n245()
+ fun_l22_n197
+end
+
+def fun_l21_n246()
+ fun_l22_n831
+end
+
+def fun_l21_n247()
+ fun_l22_n62
+end
+
+def fun_l21_n248()
+ fun_l22_n689
+end
+
+def fun_l21_n249()
+ fun_l22_n884
+end
+
+def fun_l21_n250()
+ fun_l22_n767
+end
+
+def fun_l21_n251()
+ fun_l22_n278
+end
+
+def fun_l21_n252()
+ fun_l22_n881
+end
+
+def fun_l21_n253()
+ fun_l22_n585
+end
+
+def fun_l21_n254()
+ fun_l22_n967
+end
+
+def fun_l21_n255()
+ fun_l22_n381
+end
+
+def fun_l21_n256()
+ fun_l22_n579
+end
+
+def fun_l21_n257()
+ fun_l22_n447
+end
+
+def fun_l21_n258()
+ fun_l22_n156
+end
+
+def fun_l21_n259()
+ fun_l22_n722
+end
+
+def fun_l21_n260()
+ fun_l22_n431
+end
+
+def fun_l21_n261()
+ fun_l22_n83
+end
+
+def fun_l21_n262()
+ fun_l22_n41
+end
+
+def fun_l21_n263()
+ fun_l22_n18
+end
+
+def fun_l21_n264()
+ fun_l22_n686
+end
+
+def fun_l21_n265()
+ fun_l22_n668
+end
+
+def fun_l21_n266()
+ fun_l22_n652
+end
+
+def fun_l21_n267()
+ fun_l22_n121
+end
+
+def fun_l21_n268()
+ fun_l22_n279
+end
+
+def fun_l21_n269()
+ fun_l22_n540
+end
+
+def fun_l21_n270()
+ fun_l22_n360
+end
+
+def fun_l21_n271()
+ fun_l22_n106
+end
+
+def fun_l21_n272()
+ fun_l22_n454
+end
+
+def fun_l21_n273()
+ fun_l22_n882
+end
+
+def fun_l21_n274()
+ fun_l22_n523
+end
+
+def fun_l21_n275()
+ fun_l22_n938
+end
+
+def fun_l21_n276()
+ fun_l22_n932
+end
+
+def fun_l21_n277()
+ fun_l22_n923
+end
+
+def fun_l21_n278()
+ fun_l22_n728
+end
+
+def fun_l21_n279()
+ fun_l22_n587
+end
+
+def fun_l21_n280()
+ fun_l22_n608
+end
+
+def fun_l21_n281()
+ fun_l22_n366
+end
+
+def fun_l21_n282()
+ fun_l22_n486
+end
+
+def fun_l21_n283()
+ fun_l22_n864
+end
+
+def fun_l21_n284()
+ fun_l22_n34
+end
+
+def fun_l21_n285()
+ fun_l22_n658
+end
+
+def fun_l21_n286()
+ fun_l22_n488
+end
+
+def fun_l21_n287()
+ fun_l22_n266
+end
+
+def fun_l21_n288()
+ fun_l22_n810
+end
+
+def fun_l21_n289()
+ fun_l22_n965
+end
+
+def fun_l21_n290()
+ fun_l22_n513
+end
+
+def fun_l21_n291()
+ fun_l22_n608
+end
+
+def fun_l21_n292()
+ fun_l22_n499
+end
+
+def fun_l21_n293()
+ fun_l22_n360
+end
+
+def fun_l21_n294()
+ fun_l22_n511
+end
+
+def fun_l21_n295()
+ fun_l22_n940
+end
+
+def fun_l21_n296()
+ fun_l22_n99
+end
+
+def fun_l21_n297()
+ fun_l22_n496
+end
+
+def fun_l21_n298()
+ fun_l22_n273
+end
+
+def fun_l21_n299()
+ fun_l22_n232
+end
+
+def fun_l21_n300()
+ fun_l22_n165
+end
+
+def fun_l21_n301()
+ fun_l22_n531
+end
+
+def fun_l21_n302()
+ fun_l22_n773
+end
+
+def fun_l21_n303()
+ fun_l22_n610
+end
+
+def fun_l21_n304()
+ fun_l22_n564
+end
+
+def fun_l21_n305()
+ fun_l22_n16
+end
+
+def fun_l21_n306()
+ fun_l22_n176
+end
+
+def fun_l21_n307()
+ fun_l22_n846
+end
+
+def fun_l21_n308()
+ fun_l22_n680
+end
+
+def fun_l21_n309()
+ fun_l22_n858
+end
+
+def fun_l21_n310()
+ fun_l22_n220
+end
+
+def fun_l21_n311()
+ fun_l22_n125
+end
+
+def fun_l21_n312()
+ fun_l22_n441
+end
+
+def fun_l21_n313()
+ fun_l22_n751
+end
+
+def fun_l21_n314()
+ fun_l22_n863
+end
+
+def fun_l21_n315()
+ fun_l22_n284
+end
+
+def fun_l21_n316()
+ fun_l22_n648
+end
+
+def fun_l21_n317()
+ fun_l22_n363
+end
+
+def fun_l21_n318()
+ fun_l22_n427
+end
+
+def fun_l21_n319()
+ fun_l22_n557
+end
+
+def fun_l21_n320()
+ fun_l22_n531
+end
+
+def fun_l21_n321()
+ fun_l22_n252
+end
+
+def fun_l21_n322()
+ fun_l22_n393
+end
+
+def fun_l21_n323()
+ fun_l22_n108
+end
+
+def fun_l21_n324()
+ fun_l22_n138
+end
+
+def fun_l21_n325()
+ fun_l22_n68
+end
+
+def fun_l21_n326()
+ fun_l22_n909
+end
+
+def fun_l21_n327()
+ fun_l22_n672
+end
+
+def fun_l21_n328()
+ fun_l22_n746
+end
+
+def fun_l21_n329()
+ fun_l22_n479
+end
+
+def fun_l21_n330()
+ fun_l22_n892
+end
+
+def fun_l21_n331()
+ fun_l22_n30
+end
+
+def fun_l21_n332()
+ fun_l22_n184
+end
+
+def fun_l21_n333()
+ fun_l22_n956
+end
+
+def fun_l21_n334()
+ fun_l22_n712
+end
+
+def fun_l21_n335()
+ fun_l22_n929
+end
+
+def fun_l21_n336()
+ fun_l22_n914
+end
+
+def fun_l21_n337()
+ fun_l22_n14
+end
+
+def fun_l21_n338()
+ fun_l22_n471
+end
+
+def fun_l21_n339()
+ fun_l22_n488
+end
+
+def fun_l21_n340()
+ fun_l22_n40
+end
+
+def fun_l21_n341()
+ fun_l22_n406
+end
+
+def fun_l21_n342()
+ fun_l22_n11
+end
+
+def fun_l21_n343()
+ fun_l22_n779
+end
+
+def fun_l21_n344()
+ fun_l22_n999
+end
+
+def fun_l21_n345()
+ fun_l22_n833
+end
+
+def fun_l21_n346()
+ fun_l22_n897
+end
+
+def fun_l21_n347()
+ fun_l22_n365
+end
+
+def fun_l21_n348()
+ fun_l22_n583
+end
+
+def fun_l21_n349()
+ fun_l22_n326
+end
+
+def fun_l21_n350()
+ fun_l22_n556
+end
+
+def fun_l21_n351()
+ fun_l22_n249
+end
+
+def fun_l21_n352()
+ fun_l22_n146
+end
+
+def fun_l21_n353()
+ fun_l22_n865
+end
+
+def fun_l21_n354()
+ fun_l22_n303
+end
+
+def fun_l21_n355()
+ fun_l22_n64
+end
+
+def fun_l21_n356()
+ fun_l22_n785
+end
+
+def fun_l21_n357()
+ fun_l22_n176
+end
+
+def fun_l21_n358()
+ fun_l22_n891
+end
+
+def fun_l21_n359()
+ fun_l22_n129
+end
+
+def fun_l21_n360()
+ fun_l22_n19
+end
+
+def fun_l21_n361()
+ fun_l22_n372
+end
+
+def fun_l21_n362()
+ fun_l22_n999
+end
+
+def fun_l21_n363()
+ fun_l22_n450
+end
+
+def fun_l21_n364()
+ fun_l22_n455
+end
+
+def fun_l21_n365()
+ fun_l22_n174
+end
+
+def fun_l21_n366()
+ fun_l22_n719
+end
+
+def fun_l21_n367()
+ fun_l22_n997
+end
+
+def fun_l21_n368()
+ fun_l22_n256
+end
+
+def fun_l21_n369()
+ fun_l22_n206
+end
+
+def fun_l21_n370()
+ fun_l22_n988
+end
+
+def fun_l21_n371()
+ fun_l22_n147
+end
+
+def fun_l21_n372()
+ fun_l22_n750
+end
+
+def fun_l21_n373()
+ fun_l22_n585
+end
+
+def fun_l21_n374()
+ fun_l22_n213
+end
+
+def fun_l21_n375()
+ fun_l22_n583
+end
+
+def fun_l21_n376()
+ fun_l22_n564
+end
+
+def fun_l21_n377()
+ fun_l22_n689
+end
+
+def fun_l21_n378()
+ fun_l22_n955
+end
+
+def fun_l21_n379()
+ fun_l22_n560
+end
+
+def fun_l21_n380()
+ fun_l22_n237
+end
+
+def fun_l21_n381()
+ fun_l22_n272
+end
+
+def fun_l21_n382()
+ fun_l22_n455
+end
+
+def fun_l21_n383()
+ fun_l22_n233
+end
+
+def fun_l21_n384()
+ fun_l22_n658
+end
+
+def fun_l21_n385()
+ fun_l22_n319
+end
+
+def fun_l21_n386()
+ fun_l22_n852
+end
+
+def fun_l21_n387()
+ fun_l22_n343
+end
+
+def fun_l21_n388()
+ fun_l22_n645
+end
+
+def fun_l21_n389()
+ fun_l22_n433
+end
+
+def fun_l21_n390()
+ fun_l22_n430
+end
+
+def fun_l21_n391()
+ fun_l22_n636
+end
+
+def fun_l21_n392()
+ fun_l22_n682
+end
+
+def fun_l21_n393()
+ fun_l22_n859
+end
+
+def fun_l21_n394()
+ fun_l22_n315
+end
+
+def fun_l21_n395()
+ fun_l22_n91
+end
+
+def fun_l21_n396()
+ fun_l22_n817
+end
+
+def fun_l21_n397()
+ fun_l22_n268
+end
+
+def fun_l21_n398()
+ fun_l22_n476
+end
+
+def fun_l21_n399()
+ fun_l22_n612
+end
+
+def fun_l21_n400()
+ fun_l22_n392
+end
+
+def fun_l21_n401()
+ fun_l22_n728
+end
+
+def fun_l21_n402()
+ fun_l22_n652
+end
+
+def fun_l21_n403()
+ fun_l22_n547
+end
+
+def fun_l21_n404()
+ fun_l22_n101
+end
+
+def fun_l21_n405()
+ fun_l22_n666
+end
+
+def fun_l21_n406()
+ fun_l22_n521
+end
+
+def fun_l21_n407()
+ fun_l22_n860
+end
+
+def fun_l21_n408()
+ fun_l22_n577
+end
+
+def fun_l21_n409()
+ fun_l22_n258
+end
+
+def fun_l21_n410()
+ fun_l22_n260
+end
+
+def fun_l21_n411()
+ fun_l22_n927
+end
+
+def fun_l21_n412()
+ fun_l22_n13
+end
+
+def fun_l21_n413()
+ fun_l22_n308
+end
+
+def fun_l21_n414()
+ fun_l22_n189
+end
+
+def fun_l21_n415()
+ fun_l22_n183
+end
+
+def fun_l21_n416()
+ fun_l22_n370
+end
+
+def fun_l21_n417()
+ fun_l22_n407
+end
+
+def fun_l21_n418()
+ fun_l22_n959
+end
+
+def fun_l21_n419()
+ fun_l22_n908
+end
+
+def fun_l21_n420()
+ fun_l22_n84
+end
+
+def fun_l21_n421()
+ fun_l22_n951
+end
+
+def fun_l21_n422()
+ fun_l22_n286
+end
+
+def fun_l21_n423()
+ fun_l22_n54
+end
+
+def fun_l21_n424()
+ fun_l22_n410
+end
+
+def fun_l21_n425()
+ fun_l22_n387
+end
+
+def fun_l21_n426()
+ fun_l22_n751
+end
+
+def fun_l21_n427()
+ fun_l22_n971
+end
+
+def fun_l21_n428()
+ fun_l22_n162
+end
+
+def fun_l21_n429()
+ fun_l22_n15
+end
+
+def fun_l21_n430()
+ fun_l22_n35
+end
+
+def fun_l21_n431()
+ fun_l22_n354
+end
+
+def fun_l21_n432()
+ fun_l22_n979
+end
+
+def fun_l21_n433()
+ fun_l22_n999
+end
+
+def fun_l21_n434()
+ fun_l22_n622
+end
+
+def fun_l21_n435()
+ fun_l22_n970
+end
+
+def fun_l21_n436()
+ fun_l22_n758
+end
+
+def fun_l21_n437()
+ fun_l22_n950
+end
+
+def fun_l21_n438()
+ fun_l22_n865
+end
+
+def fun_l21_n439()
+ fun_l22_n31
+end
+
+def fun_l21_n440()
+ fun_l22_n620
+end
+
+def fun_l21_n441()
+ fun_l22_n170
+end
+
+def fun_l21_n442()
+ fun_l22_n816
+end
+
+def fun_l21_n443()
+ fun_l22_n364
+end
+
+def fun_l21_n444()
+ fun_l22_n289
+end
+
+def fun_l21_n445()
+ fun_l22_n949
+end
+
+def fun_l21_n446()
+ fun_l22_n876
+end
+
+def fun_l21_n447()
+ fun_l22_n971
+end
+
+def fun_l21_n448()
+ fun_l22_n343
+end
+
+def fun_l21_n449()
+ fun_l22_n14
+end
+
+def fun_l21_n450()
+ fun_l22_n925
+end
+
+def fun_l21_n451()
+ fun_l22_n234
+end
+
+def fun_l21_n452()
+ fun_l22_n242
+end
+
+def fun_l21_n453()
+ fun_l22_n184
+end
+
+def fun_l21_n454()
+ fun_l22_n158
+end
+
+def fun_l21_n455()
+ fun_l22_n645
+end
+
+def fun_l21_n456()
+ fun_l22_n173
+end
+
+def fun_l21_n457()
+ fun_l22_n363
+end
+
+def fun_l21_n458()
+ fun_l22_n787
+end
+
+def fun_l21_n459()
+ fun_l22_n102
+end
+
+def fun_l21_n460()
+ fun_l22_n886
+end
+
+def fun_l21_n461()
+ fun_l22_n279
+end
+
+def fun_l21_n462()
+ fun_l22_n909
+end
+
+def fun_l21_n463()
+ fun_l22_n767
+end
+
+def fun_l21_n464()
+ fun_l22_n82
+end
+
+def fun_l21_n465()
+ fun_l22_n249
+end
+
+def fun_l21_n466()
+ fun_l22_n670
+end
+
+def fun_l21_n467()
+ fun_l22_n944
+end
+
+def fun_l21_n468()
+ fun_l22_n191
+end
+
+def fun_l21_n469()
+ fun_l22_n897
+end
+
+def fun_l21_n470()
+ fun_l22_n591
+end
+
+def fun_l21_n471()
+ fun_l22_n164
+end
+
+def fun_l21_n472()
+ fun_l22_n984
+end
+
+def fun_l21_n473()
+ fun_l22_n26
+end
+
+def fun_l21_n474()
+ fun_l22_n398
+end
+
+def fun_l21_n475()
+ fun_l22_n668
+end
+
+def fun_l21_n476()
+ fun_l22_n190
+end
+
+def fun_l21_n477()
+ fun_l22_n249
+end
+
+def fun_l21_n478()
+ fun_l22_n736
+end
+
+def fun_l21_n479()
+ fun_l22_n714
+end
+
+def fun_l21_n480()
+ fun_l22_n929
+end
+
+def fun_l21_n481()
+ fun_l22_n448
+end
+
+def fun_l21_n482()
+ fun_l22_n922
+end
+
+def fun_l21_n483()
+ fun_l22_n992
+end
+
+def fun_l21_n484()
+ fun_l22_n306
+end
+
+def fun_l21_n485()
+ fun_l22_n420
+end
+
+def fun_l21_n486()
+ fun_l22_n630
+end
+
+def fun_l21_n487()
+ fun_l22_n263
+end
+
+def fun_l21_n488()
+ fun_l22_n754
+end
+
+def fun_l21_n489()
+ fun_l22_n96
+end
+
+def fun_l21_n490()
+ fun_l22_n338
+end
+
+def fun_l21_n491()
+ fun_l22_n615
+end
+
+def fun_l21_n492()
+ fun_l22_n704
+end
+
+def fun_l21_n493()
+ fun_l22_n581
+end
+
+def fun_l21_n494()
+ fun_l22_n801
+end
+
+def fun_l21_n495()
+ fun_l22_n204
+end
+
+def fun_l21_n496()
+ fun_l22_n835
+end
+
+def fun_l21_n497()
+ fun_l22_n479
+end
+
+def fun_l21_n498()
+ fun_l22_n379
+end
+
+def fun_l21_n499()
+ fun_l22_n937
+end
+
+def fun_l21_n500()
+ fun_l22_n830
+end
+
+def fun_l21_n501()
+ fun_l22_n458
+end
+
+def fun_l21_n502()
+ fun_l22_n806
+end
+
+def fun_l21_n503()
+ fun_l22_n158
+end
+
+def fun_l21_n504()
+ fun_l22_n151
+end
+
+def fun_l21_n505()
+ fun_l22_n685
+end
+
+def fun_l21_n506()
+ fun_l22_n806
+end
+
+def fun_l21_n507()
+ fun_l22_n584
+end
+
+def fun_l21_n508()
+ fun_l22_n644
+end
+
+def fun_l21_n509()
+ fun_l22_n237
+end
+
+def fun_l21_n510()
+ fun_l22_n542
+end
+
+def fun_l21_n511()
+ fun_l22_n450
+end
+
+def fun_l21_n512()
+ fun_l22_n385
+end
+
+def fun_l21_n513()
+ fun_l22_n321
+end
+
+def fun_l21_n514()
+ fun_l22_n548
+end
+
+def fun_l21_n515()
+ fun_l22_n519
+end
+
+def fun_l21_n516()
+ fun_l22_n309
+end
+
+def fun_l21_n517()
+ fun_l22_n4
+end
+
+def fun_l21_n518()
+ fun_l22_n930
+end
+
+def fun_l21_n519()
+ fun_l22_n245
+end
+
+def fun_l21_n520()
+ fun_l22_n568
+end
+
+def fun_l21_n521()
+ fun_l22_n527
+end
+
+def fun_l21_n522()
+ fun_l22_n650
+end
+
+def fun_l21_n523()
+ fun_l22_n391
+end
+
+def fun_l21_n524()
+ fun_l22_n749
+end
+
+def fun_l21_n525()
+ fun_l22_n810
+end
+
+def fun_l21_n526()
+ fun_l22_n615
+end
+
+def fun_l21_n527()
+ fun_l22_n702
+end
+
+def fun_l21_n528()
+ fun_l22_n62
+end
+
+def fun_l21_n529()
+ fun_l22_n316
+end
+
+def fun_l21_n530()
+ fun_l22_n201
+end
+
+def fun_l21_n531()
+ fun_l22_n447
+end
+
+def fun_l21_n532()
+ fun_l22_n506
+end
+
+def fun_l21_n533()
+ fun_l22_n900
+end
+
+def fun_l21_n534()
+ fun_l22_n652
+end
+
+def fun_l21_n535()
+ fun_l22_n493
+end
+
+def fun_l21_n536()
+ fun_l22_n803
+end
+
+def fun_l21_n537()
+ fun_l22_n263
+end
+
+def fun_l21_n538()
+ fun_l22_n303
+end
+
+def fun_l21_n539()
+ fun_l22_n17
+end
+
+def fun_l21_n540()
+ fun_l22_n900
+end
+
+def fun_l21_n541()
+ fun_l22_n917
+end
+
+def fun_l21_n542()
+ fun_l22_n789
+end
+
+def fun_l21_n543()
+ fun_l22_n668
+end
+
+def fun_l21_n544()
+ fun_l22_n335
+end
+
+def fun_l21_n545()
+ fun_l22_n560
+end
+
+def fun_l21_n546()
+ fun_l22_n705
+end
+
+def fun_l21_n547()
+ fun_l22_n159
+end
+
+def fun_l21_n548()
+ fun_l22_n874
+end
+
+def fun_l21_n549()
+ fun_l22_n809
+end
+
+def fun_l21_n550()
+ fun_l22_n726
+end
+
+def fun_l21_n551()
+ fun_l22_n27
+end
+
+def fun_l21_n552()
+ fun_l22_n63
+end
+
+def fun_l21_n553()
+ fun_l22_n642
+end
+
+def fun_l21_n554()
+ fun_l22_n694
+end
+
+def fun_l21_n555()
+ fun_l22_n432
+end
+
+def fun_l21_n556()
+ fun_l22_n439
+end
+
+def fun_l21_n557()
+ fun_l22_n876
+end
+
+def fun_l21_n558()
+ fun_l22_n998
+end
+
+def fun_l21_n559()
+ fun_l22_n703
+end
+
+def fun_l21_n560()
+ fun_l22_n785
+end
+
+def fun_l21_n561()
+ fun_l22_n543
+end
+
+def fun_l21_n562()
+ fun_l22_n286
+end
+
+def fun_l21_n563()
+ fun_l22_n771
+end
+
+def fun_l21_n564()
+ fun_l22_n447
+end
+
+def fun_l21_n565()
+ fun_l22_n955
+end
+
+def fun_l21_n566()
+ fun_l22_n603
+end
+
+def fun_l21_n567()
+ fun_l22_n258
+end
+
+def fun_l21_n568()
+ fun_l22_n936
+end
+
+def fun_l21_n569()
+ fun_l22_n524
+end
+
+def fun_l21_n570()
+ fun_l22_n205
+end
+
+def fun_l21_n571()
+ fun_l22_n41
+end
+
+def fun_l21_n572()
+ fun_l22_n589
+end
+
+def fun_l21_n573()
+ fun_l22_n519
+end
+
+def fun_l21_n574()
+ fun_l22_n500
+end
+
+def fun_l21_n575()
+ fun_l22_n307
+end
+
+def fun_l21_n576()
+ fun_l22_n598
+end
+
+def fun_l21_n577()
+ fun_l22_n698
+end
+
+def fun_l21_n578()
+ fun_l22_n200
+end
+
+def fun_l21_n579()
+ fun_l22_n657
+end
+
+def fun_l21_n580()
+ fun_l22_n353
+end
+
+def fun_l21_n581()
+ fun_l22_n553
+end
+
+def fun_l21_n582()
+ fun_l22_n490
+end
+
+def fun_l21_n583()
+ fun_l22_n112
+end
+
+def fun_l21_n584()
+ fun_l22_n626
+end
+
+def fun_l21_n585()
+ fun_l22_n815
+end
+
+def fun_l21_n586()
+ fun_l22_n792
+end
+
+def fun_l21_n587()
+ fun_l22_n295
+end
+
+def fun_l21_n588()
+ fun_l22_n201
+end
+
+def fun_l21_n589()
+ fun_l22_n248
+end
+
+def fun_l21_n590()
+ fun_l22_n295
+end
+
+def fun_l21_n591()
+ fun_l22_n708
+end
+
+def fun_l21_n592()
+ fun_l22_n507
+end
+
+def fun_l21_n593()
+ fun_l22_n177
+end
+
+def fun_l21_n594()
+ fun_l22_n467
+end
+
+def fun_l21_n595()
+ fun_l22_n113
+end
+
+def fun_l21_n596()
+ fun_l22_n390
+end
+
+def fun_l21_n597()
+ fun_l22_n348
+end
+
+def fun_l21_n598()
+ fun_l22_n545
+end
+
+def fun_l21_n599()
+ fun_l22_n695
+end
+
+def fun_l21_n600()
+ fun_l22_n170
+end
+
+def fun_l21_n601()
+ fun_l22_n978
+end
+
+def fun_l21_n602()
+ fun_l22_n70
+end
+
+def fun_l21_n603()
+ fun_l22_n161
+end
+
+def fun_l21_n604()
+ fun_l22_n33
+end
+
+def fun_l21_n605()
+ fun_l22_n275
+end
+
+def fun_l21_n606()
+ fun_l22_n738
+end
+
+def fun_l21_n607()
+ fun_l22_n152
+end
+
+def fun_l21_n608()
+ fun_l22_n380
+end
+
+def fun_l21_n609()
+ fun_l22_n903
+end
+
+def fun_l21_n610()
+ fun_l22_n274
+end
+
+def fun_l21_n611()
+ fun_l22_n100
+end
+
+def fun_l21_n612()
+ fun_l22_n206
+end
+
+def fun_l21_n613()
+ fun_l22_n225
+end
+
+def fun_l21_n614()
+ fun_l22_n627
+end
+
+def fun_l21_n615()
+ fun_l22_n332
+end
+
+def fun_l21_n616()
+ fun_l22_n312
+end
+
+def fun_l21_n617()
+ fun_l22_n379
+end
+
+def fun_l21_n618()
+ fun_l22_n889
+end
+
+def fun_l21_n619()
+ fun_l22_n399
+end
+
+def fun_l21_n620()
+ fun_l22_n212
+end
+
+def fun_l21_n621()
+ fun_l22_n289
+end
+
+def fun_l21_n622()
+ fun_l22_n161
+end
+
+def fun_l21_n623()
+ fun_l22_n764
+end
+
+def fun_l21_n624()
+ fun_l22_n165
+end
+
+def fun_l21_n625()
+ fun_l22_n768
+end
+
+def fun_l21_n626()
+ fun_l22_n596
+end
+
+def fun_l21_n627()
+ fun_l22_n506
+end
+
+def fun_l21_n628()
+ fun_l22_n523
+end
+
+def fun_l21_n629()
+ fun_l22_n261
+end
+
+def fun_l21_n630()
+ fun_l22_n683
+end
+
+def fun_l21_n631()
+ fun_l22_n518
+end
+
+def fun_l21_n632()
+ fun_l22_n813
+end
+
+def fun_l21_n633()
+ fun_l22_n949
+end
+
+def fun_l21_n634()
+ fun_l22_n856
+end
+
+def fun_l21_n635()
+ fun_l22_n250
+end
+
+def fun_l21_n636()
+ fun_l22_n840
+end
+
+def fun_l21_n637()
+ fun_l22_n763
+end
+
+def fun_l21_n638()
+ fun_l22_n40
+end
+
+def fun_l21_n639()
+ fun_l22_n13
+end
+
+def fun_l21_n640()
+ fun_l22_n789
+end
+
+def fun_l21_n641()
+ fun_l22_n517
+end
+
+def fun_l21_n642()
+ fun_l22_n366
+end
+
+def fun_l21_n643()
+ fun_l22_n155
+end
+
+def fun_l21_n644()
+ fun_l22_n370
+end
+
+def fun_l21_n645()
+ fun_l22_n633
+end
+
+def fun_l21_n646()
+ fun_l22_n996
+end
+
+def fun_l21_n647()
+ fun_l22_n943
+end
+
+def fun_l21_n648()
+ fun_l22_n81
+end
+
+def fun_l21_n649()
+ fun_l22_n161
+end
+
+def fun_l21_n650()
+ fun_l22_n346
+end
+
+def fun_l21_n651()
+ fun_l22_n338
+end
+
+def fun_l21_n652()
+ fun_l22_n989
+end
+
+def fun_l21_n653()
+ fun_l22_n727
+end
+
+def fun_l21_n654()
+ fun_l22_n261
+end
+
+def fun_l21_n655()
+ fun_l22_n975
+end
+
+def fun_l21_n656()
+ fun_l22_n635
+end
+
+def fun_l21_n657()
+ fun_l22_n622
+end
+
+def fun_l21_n658()
+ fun_l22_n519
+end
+
+def fun_l21_n659()
+ fun_l22_n619
+end
+
+def fun_l21_n660()
+ fun_l22_n489
+end
+
+def fun_l21_n661()
+ fun_l22_n876
+end
+
+def fun_l21_n662()
+ fun_l22_n261
+end
+
+def fun_l21_n663()
+ fun_l22_n96
+end
+
+def fun_l21_n664()
+ fun_l22_n984
+end
+
+def fun_l21_n665()
+ fun_l22_n367
+end
+
+def fun_l21_n666()
+ fun_l22_n100
+end
+
+def fun_l21_n667()
+ fun_l22_n555
+end
+
+def fun_l21_n668()
+ fun_l22_n438
+end
+
+def fun_l21_n669()
+ fun_l22_n141
+end
+
+def fun_l21_n670()
+ fun_l22_n240
+end
+
+def fun_l21_n671()
+ fun_l22_n185
+end
+
+def fun_l21_n672()
+ fun_l22_n199
+end
+
+def fun_l21_n673()
+ fun_l22_n166
+end
+
+def fun_l21_n674()
+ fun_l22_n322
+end
+
+def fun_l21_n675()
+ fun_l22_n811
+end
+
+def fun_l21_n676()
+ fun_l22_n18
+end
+
+def fun_l21_n677()
+ fun_l22_n800
+end
+
+def fun_l21_n678()
+ fun_l22_n729
+end
+
+def fun_l21_n679()
+ fun_l22_n862
+end
+
+def fun_l21_n680()
+ fun_l22_n911
+end
+
+def fun_l21_n681()
+ fun_l22_n342
+end
+
+def fun_l21_n682()
+ fun_l22_n635
+end
+
+def fun_l21_n683()
+ fun_l22_n814
+end
+
+def fun_l21_n684()
+ fun_l22_n786
+end
+
+def fun_l21_n685()
+ fun_l22_n598
+end
+
+def fun_l21_n686()
+ fun_l22_n622
+end
+
+def fun_l21_n687()
+ fun_l22_n847
+end
+
+def fun_l21_n688()
+ fun_l22_n94
+end
+
+def fun_l21_n689()
+ fun_l22_n683
+end
+
+def fun_l21_n690()
+ fun_l22_n260
+end
+
+def fun_l21_n691()
+ fun_l22_n684
+end
+
+def fun_l21_n692()
+ fun_l22_n923
+end
+
+def fun_l21_n693()
+ fun_l22_n124
+end
+
+def fun_l21_n694()
+ fun_l22_n641
+end
+
+def fun_l21_n695()
+ fun_l22_n62
+end
+
+def fun_l21_n696()
+ fun_l22_n394
+end
+
+def fun_l21_n697()
+ fun_l22_n336
+end
+
+def fun_l21_n698()
+ fun_l22_n896
+end
+
+def fun_l21_n699()
+ fun_l22_n451
+end
+
+def fun_l21_n700()
+ fun_l22_n519
+end
+
+def fun_l21_n701()
+ fun_l22_n207
+end
+
+def fun_l21_n702()
+ fun_l22_n690
+end
+
+def fun_l21_n703()
+ fun_l22_n901
+end
+
+def fun_l21_n704()
+ fun_l22_n722
+end
+
+def fun_l21_n705()
+ fun_l22_n446
+end
+
+def fun_l21_n706()
+ fun_l22_n292
+end
+
+def fun_l21_n707()
+ fun_l22_n678
+end
+
+def fun_l21_n708()
+ fun_l22_n77
+end
+
+def fun_l21_n709()
+ fun_l22_n564
+end
+
+def fun_l21_n710()
+ fun_l22_n253
+end
+
+def fun_l21_n711()
+ fun_l22_n342
+end
+
+def fun_l21_n712()
+ fun_l22_n841
+end
+
+def fun_l21_n713()
+ fun_l22_n981
+end
+
+def fun_l21_n714()
+ fun_l22_n130
+end
+
+def fun_l21_n715()
+ fun_l22_n11
+end
+
+def fun_l21_n716()
+ fun_l22_n320
+end
+
+def fun_l21_n717()
+ fun_l22_n653
+end
+
+def fun_l21_n718()
+ fun_l22_n46
+end
+
+def fun_l21_n719()
+ fun_l22_n500
+end
+
+def fun_l21_n720()
+ fun_l22_n694
+end
+
+def fun_l21_n721()
+ fun_l22_n422
+end
+
+def fun_l21_n722()
+ fun_l22_n354
+end
+
+def fun_l21_n723()
+ fun_l22_n951
+end
+
+def fun_l21_n724()
+ fun_l22_n835
+end
+
+def fun_l21_n725()
+ fun_l22_n138
+end
+
+def fun_l21_n726()
+ fun_l22_n416
+end
+
+def fun_l21_n727()
+ fun_l22_n798
+end
+
+def fun_l21_n728()
+ fun_l22_n941
+end
+
+def fun_l21_n729()
+ fun_l22_n522
+end
+
+def fun_l21_n730()
+ fun_l22_n183
+end
+
+def fun_l21_n731()
+ fun_l22_n538
+end
+
+def fun_l21_n732()
+ fun_l22_n422
+end
+
+def fun_l21_n733()
+ fun_l22_n692
+end
+
+def fun_l21_n734()
+ fun_l22_n272
+end
+
+def fun_l21_n735()
+ fun_l22_n434
+end
+
+def fun_l21_n736()
+ fun_l22_n876
+end
+
+def fun_l21_n737()
+ fun_l22_n685
+end
+
+def fun_l21_n738()
+ fun_l22_n338
+end
+
+def fun_l21_n739()
+ fun_l22_n835
+end
+
+def fun_l21_n740()
+ fun_l22_n307
+end
+
+def fun_l21_n741()
+ fun_l22_n270
+end
+
+def fun_l21_n742()
+ fun_l22_n626
+end
+
+def fun_l21_n743()
+ fun_l22_n92
+end
+
+def fun_l21_n744()
+ fun_l22_n532
+end
+
+def fun_l21_n745()
+ fun_l22_n508
+end
+
+def fun_l21_n746()
+ fun_l22_n866
+end
+
+def fun_l21_n747()
+ fun_l22_n474
+end
+
+def fun_l21_n748()
+ fun_l22_n697
+end
+
+def fun_l21_n749()
+ fun_l22_n952
+end
+
+def fun_l21_n750()
+ fun_l22_n835
+end
+
+def fun_l21_n751()
+ fun_l22_n21
+end
+
+def fun_l21_n752()
+ fun_l22_n386
+end
+
+def fun_l21_n753()
+ fun_l22_n55
+end
+
+def fun_l21_n754()
+ fun_l22_n727
+end
+
+def fun_l21_n755()
+ fun_l22_n944
+end
+
+def fun_l21_n756()
+ fun_l22_n850
+end
+
+def fun_l21_n757()
+ fun_l22_n305
+end
+
+def fun_l21_n758()
+ fun_l22_n502
+end
+
+def fun_l21_n759()
+ fun_l22_n544
+end
+
+def fun_l21_n760()
+ fun_l22_n308
+end
+
+def fun_l21_n761()
+ fun_l22_n3
+end
+
+def fun_l21_n762()
+ fun_l22_n724
+end
+
+def fun_l21_n763()
+ fun_l22_n87
+end
+
+def fun_l21_n764()
+ fun_l22_n683
+end
+
+def fun_l21_n765()
+ fun_l22_n597
+end
+
+def fun_l21_n766()
+ fun_l22_n641
+end
+
+def fun_l21_n767()
+ fun_l22_n614
+end
+
+def fun_l21_n768()
+ fun_l22_n668
+end
+
+def fun_l21_n769()
+ fun_l22_n320
+end
+
+def fun_l21_n770()
+ fun_l22_n923
+end
+
+def fun_l21_n771()
+ fun_l22_n762
+end
+
+def fun_l21_n772()
+ fun_l22_n545
+end
+
+def fun_l21_n773()
+ fun_l22_n692
+end
+
+def fun_l21_n774()
+ fun_l22_n237
+end
+
+def fun_l21_n775()
+ fun_l22_n373
+end
+
+def fun_l21_n776()
+ fun_l22_n44
+end
+
+def fun_l21_n777()
+ fun_l22_n78
+end
+
+def fun_l21_n778()
+ fun_l22_n42
+end
+
+def fun_l21_n779()
+ fun_l22_n133
+end
+
+def fun_l21_n780()
+ fun_l22_n428
+end
+
+def fun_l21_n781()
+ fun_l22_n689
+end
+
+def fun_l21_n782()
+ fun_l22_n903
+end
+
+def fun_l21_n783()
+ fun_l22_n758
+end
+
+def fun_l21_n784()
+ fun_l22_n762
+end
+
+def fun_l21_n785()
+ fun_l22_n516
+end
+
+def fun_l21_n786()
+ fun_l22_n466
+end
+
+def fun_l21_n787()
+ fun_l22_n373
+end
+
+def fun_l21_n788()
+ fun_l22_n390
+end
+
+def fun_l21_n789()
+ fun_l22_n109
+end
+
+def fun_l21_n790()
+ fun_l22_n865
+end
+
+def fun_l21_n791()
+ fun_l22_n112
+end
+
+def fun_l21_n792()
+ fun_l22_n865
+end
+
+def fun_l21_n793()
+ fun_l22_n645
+end
+
+def fun_l21_n794()
+ fun_l22_n621
+end
+
+def fun_l21_n795()
+ fun_l22_n758
+end
+
+def fun_l21_n796()
+ fun_l22_n519
+end
+
+def fun_l21_n797()
+ fun_l22_n104
+end
+
+def fun_l21_n798()
+ fun_l22_n79
+end
+
+def fun_l21_n799()
+ fun_l22_n840
+end
+
+def fun_l21_n800()
+ fun_l22_n613
+end
+
+def fun_l21_n801()
+ fun_l22_n982
+end
+
+def fun_l21_n802()
+ fun_l22_n484
+end
+
+def fun_l21_n803()
+ fun_l22_n321
+end
+
+def fun_l21_n804()
+ fun_l22_n445
+end
+
+def fun_l21_n805()
+ fun_l22_n857
+end
+
+def fun_l21_n806()
+ fun_l22_n811
+end
+
+def fun_l21_n807()
+ fun_l22_n763
+end
+
+def fun_l21_n808()
+ fun_l22_n40
+end
+
+def fun_l21_n809()
+ fun_l22_n376
+end
+
+def fun_l21_n810()
+ fun_l22_n111
+end
+
+def fun_l21_n811()
+ fun_l22_n318
+end
+
+def fun_l21_n812()
+ fun_l22_n455
+end
+
+def fun_l21_n813()
+ fun_l22_n860
+end
+
+def fun_l21_n814()
+ fun_l22_n185
+end
+
+def fun_l21_n815()
+ fun_l22_n932
+end
+
+def fun_l21_n816()
+ fun_l22_n673
+end
+
+def fun_l21_n817()
+ fun_l22_n413
+end
+
+def fun_l21_n818()
+ fun_l22_n927
+end
+
+def fun_l21_n819()
+ fun_l22_n827
+end
+
+def fun_l21_n820()
+ fun_l22_n572
+end
+
+def fun_l21_n821()
+ fun_l22_n682
+end
+
+def fun_l21_n822()
+ fun_l22_n810
+end
+
+def fun_l21_n823()
+ fun_l22_n492
+end
+
+def fun_l21_n824()
+ fun_l22_n677
+end
+
+def fun_l21_n825()
+ fun_l22_n658
+end
+
+def fun_l21_n826()
+ fun_l22_n584
+end
+
+def fun_l21_n827()
+ fun_l22_n360
+end
+
+def fun_l21_n828()
+ fun_l22_n677
+end
+
+def fun_l21_n829()
+ fun_l22_n669
+end
+
+def fun_l21_n830()
+ fun_l22_n209
+end
+
+def fun_l21_n831()
+ fun_l22_n526
+end
+
+def fun_l21_n832()
+ fun_l22_n820
+end
+
+def fun_l21_n833()
+ fun_l22_n81
+end
+
+def fun_l21_n834()
+ fun_l22_n140
+end
+
+def fun_l21_n835()
+ fun_l22_n407
+end
+
+def fun_l21_n836()
+ fun_l22_n705
+end
+
+def fun_l21_n837()
+ fun_l22_n785
+end
+
+def fun_l21_n838()
+ fun_l22_n13
+end
+
+def fun_l21_n839()
+ fun_l22_n490
+end
+
+def fun_l21_n840()
+ fun_l22_n835
+end
+
+def fun_l21_n841()
+ fun_l22_n410
+end
+
+def fun_l21_n842()
+ fun_l22_n411
+end
+
+def fun_l21_n843()
+ fun_l22_n315
+end
+
+def fun_l21_n844()
+ fun_l22_n830
+end
+
+def fun_l21_n845()
+ fun_l22_n417
+end
+
+def fun_l21_n846()
+ fun_l22_n66
+end
+
+def fun_l21_n847()
+ fun_l22_n484
+end
+
+def fun_l21_n848()
+ fun_l22_n398
+end
+
+def fun_l21_n849()
+ fun_l22_n191
+end
+
+def fun_l21_n850()
+ fun_l22_n939
+end
+
+def fun_l21_n851()
+ fun_l22_n233
+end
+
+def fun_l21_n852()
+ fun_l22_n554
+end
+
+def fun_l21_n853()
+ fun_l22_n205
+end
+
+def fun_l21_n854()
+ fun_l22_n86
+end
+
+def fun_l21_n855()
+ fun_l22_n396
+end
+
+def fun_l21_n856()
+ fun_l22_n815
+end
+
+def fun_l21_n857()
+ fun_l22_n286
+end
+
+def fun_l21_n858()
+ fun_l22_n874
+end
+
+def fun_l21_n859()
+ fun_l22_n274
+end
+
+def fun_l21_n860()
+ fun_l22_n517
+end
+
+def fun_l21_n861()
+ fun_l22_n295
+end
+
+def fun_l21_n862()
+ fun_l22_n576
+end
+
+def fun_l21_n863()
+ fun_l22_n745
+end
+
+def fun_l21_n864()
+ fun_l22_n842
+end
+
+def fun_l21_n865()
+ fun_l22_n180
+end
+
+def fun_l21_n866()
+ fun_l22_n817
+end
+
+def fun_l21_n867()
+ fun_l22_n663
+end
+
+def fun_l21_n868()
+ fun_l22_n298
+end
+
+def fun_l21_n869()
+ fun_l22_n328
+end
+
+def fun_l21_n870()
+ fun_l22_n863
+end
+
+def fun_l21_n871()
+ fun_l22_n669
+end
+
+def fun_l21_n872()
+ fun_l22_n494
+end
+
+def fun_l21_n873()
+ fun_l22_n483
+end
+
+def fun_l21_n874()
+ fun_l22_n977
+end
+
+def fun_l21_n875()
+ fun_l22_n797
+end
+
+def fun_l21_n876()
+ fun_l22_n258
+end
+
+def fun_l21_n877()
+ fun_l22_n701
+end
+
+def fun_l21_n878()
+ fun_l22_n791
+end
+
+def fun_l21_n879()
+ fun_l22_n201
+end
+
+def fun_l21_n880()
+ fun_l22_n994
+end
+
+def fun_l21_n881()
+ fun_l22_n678
+end
+
+def fun_l21_n882()
+ fun_l22_n653
+end
+
+def fun_l21_n883()
+ fun_l22_n339
+end
+
+def fun_l21_n884()
+ fun_l22_n701
+end
+
+def fun_l21_n885()
+ fun_l22_n188
+end
+
+def fun_l21_n886()
+ fun_l22_n607
+end
+
+def fun_l21_n887()
+ fun_l22_n108
+end
+
+def fun_l21_n888()
+ fun_l22_n190
+end
+
+def fun_l21_n889()
+ fun_l22_n581
+end
+
+def fun_l21_n890()
+ fun_l22_n283
+end
+
+def fun_l21_n891()
+ fun_l22_n743
+end
+
+def fun_l21_n892()
+ fun_l22_n861
+end
+
+def fun_l21_n893()
+ fun_l22_n998
+end
+
+def fun_l21_n894()
+ fun_l22_n752
+end
+
+def fun_l21_n895()
+ fun_l22_n762
+end
+
+def fun_l21_n896()
+ fun_l22_n41
+end
+
+def fun_l21_n897()
+ fun_l22_n820
+end
+
+def fun_l21_n898()
+ fun_l22_n510
+end
+
+def fun_l21_n899()
+ fun_l22_n974
+end
+
+def fun_l21_n900()
+ fun_l22_n524
+end
+
+def fun_l21_n901()
+ fun_l22_n771
+end
+
+def fun_l21_n902()
+ fun_l22_n376
+end
+
+def fun_l21_n903()
+ fun_l22_n684
+end
+
+def fun_l21_n904()
+ fun_l22_n595
+end
+
+def fun_l21_n905()
+ fun_l22_n934
+end
+
+def fun_l21_n906()
+ fun_l22_n228
+end
+
+def fun_l21_n907()
+ fun_l22_n685
+end
+
+def fun_l21_n908()
+ fun_l22_n549
+end
+
+def fun_l21_n909()
+ fun_l22_n374
+end
+
+def fun_l21_n910()
+ fun_l22_n934
+end
+
+def fun_l21_n911()
+ fun_l22_n660
+end
+
+def fun_l21_n912()
+ fun_l22_n756
+end
+
+def fun_l21_n913()
+ fun_l22_n32
+end
+
+def fun_l21_n914()
+ fun_l22_n660
+end
+
+def fun_l21_n915()
+ fun_l22_n52
+end
+
+def fun_l21_n916()
+ fun_l22_n750
+end
+
+def fun_l21_n917()
+ fun_l22_n239
+end
+
+def fun_l21_n918()
+ fun_l22_n290
+end
+
+def fun_l21_n919()
+ fun_l22_n914
+end
+
+def fun_l21_n920()
+ fun_l22_n257
+end
+
+def fun_l21_n921()
+ fun_l22_n307
+end
+
+def fun_l21_n922()
+ fun_l22_n949
+end
+
+def fun_l21_n923()
+ fun_l22_n344
+end
+
+def fun_l21_n924()
+ fun_l22_n479
+end
+
+def fun_l21_n925()
+ fun_l22_n306
+end
+
+def fun_l21_n926()
+ fun_l22_n361
+end
+
+def fun_l21_n927()
+ fun_l22_n429
+end
+
+def fun_l21_n928()
+ fun_l22_n145
+end
+
+def fun_l21_n929()
+ fun_l22_n874
+end
+
+def fun_l21_n930()
+ fun_l22_n127
+end
+
+def fun_l21_n931()
+ fun_l22_n909
+end
+
+def fun_l21_n932()
+ fun_l22_n784
+end
+
+def fun_l21_n933()
+ fun_l22_n966
+end
+
+def fun_l21_n934()
+ fun_l22_n789
+end
+
+def fun_l21_n935()
+ fun_l22_n787
+end
+
+def fun_l21_n936()
+ fun_l22_n325
+end
+
+def fun_l21_n937()
+ fun_l22_n666
+end
+
+def fun_l21_n938()
+ fun_l22_n630
+end
+
+def fun_l21_n939()
+ fun_l22_n321
+end
+
+def fun_l21_n940()
+ fun_l22_n634
+end
+
+def fun_l21_n941()
+ fun_l22_n991
+end
+
+def fun_l21_n942()
+ fun_l22_n978
+end
+
+def fun_l21_n943()
+ fun_l22_n583
+end
+
+def fun_l21_n944()
+ fun_l22_n835
+end
+
+def fun_l21_n945()
+ fun_l22_n968
+end
+
+def fun_l21_n946()
+ fun_l22_n88
+end
+
+def fun_l21_n947()
+ fun_l22_n484
+end
+
+def fun_l21_n948()
+ fun_l22_n82
+end
+
+def fun_l21_n949()
+ fun_l22_n343
+end
+
+def fun_l21_n950()
+ fun_l22_n369
+end
+
+def fun_l21_n951()
+ fun_l22_n565
+end
+
+def fun_l21_n952()
+ fun_l22_n307
+end
+
+def fun_l21_n953()
+ fun_l22_n573
+end
+
+def fun_l21_n954()
+ fun_l22_n363
+end
+
+def fun_l21_n955()
+ fun_l22_n853
+end
+
+def fun_l21_n956()
+ fun_l22_n132
+end
+
+def fun_l21_n957()
+ fun_l22_n13
+end
+
+def fun_l21_n958()
+ fun_l22_n819
+end
+
+def fun_l21_n959()
+ fun_l22_n124
+end
+
+def fun_l21_n960()
+ fun_l22_n898
+end
+
+def fun_l21_n961()
+ fun_l22_n942
+end
+
+def fun_l21_n962()
+ fun_l22_n917
+end
+
+def fun_l21_n963()
+ fun_l22_n199
+end
+
+def fun_l21_n964()
+ fun_l22_n651
+end
+
+def fun_l21_n965()
+ fun_l22_n80
+end
+
+def fun_l21_n966()
+ fun_l22_n415
+end
+
+def fun_l21_n967()
+ fun_l22_n230
+end
+
+def fun_l21_n968()
+ fun_l22_n929
+end
+
+def fun_l21_n969()
+ fun_l22_n889
+end
+
+def fun_l21_n970()
+ fun_l22_n620
+end
+
+def fun_l21_n971()
+ fun_l22_n588
+end
+
+def fun_l21_n972()
+ fun_l22_n284
+end
+
+def fun_l21_n973()
+ fun_l22_n767
+end
+
+def fun_l21_n974()
+ fun_l22_n568
+end
+
+def fun_l21_n975()
+ fun_l22_n687
+end
+
+def fun_l21_n976()
+ fun_l22_n640
+end
+
+def fun_l21_n977()
+ fun_l22_n739
+end
+
+def fun_l21_n978()
+ fun_l22_n81
+end
+
+def fun_l21_n979()
+ fun_l22_n216
+end
+
+def fun_l21_n980()
+ fun_l22_n347
+end
+
+def fun_l21_n981()
+ fun_l22_n228
+end
+
+def fun_l21_n982()
+ fun_l22_n947
+end
+
+def fun_l21_n983()
+ fun_l22_n563
+end
+
+def fun_l21_n984()
+ fun_l22_n839
+end
+
+def fun_l21_n985()
+ fun_l22_n759
+end
+
+def fun_l21_n986()
+ fun_l22_n138
+end
+
+def fun_l21_n987()
+ fun_l22_n269
+end
+
+def fun_l21_n988()
+ fun_l22_n239
+end
+
+def fun_l21_n989()
+ fun_l22_n254
+end
+
+def fun_l21_n990()
+ fun_l22_n802
+end
+
+def fun_l21_n991()
+ fun_l22_n368
+end
+
+def fun_l21_n992()
+ fun_l22_n854
+end
+
+def fun_l21_n993()
+ fun_l22_n463
+end
+
+def fun_l21_n994()
+ fun_l22_n722
+end
+
+def fun_l21_n995()
+ fun_l22_n770
+end
+
+def fun_l21_n996()
+ fun_l22_n635
+end
+
+def fun_l21_n997()
+ fun_l22_n207
+end
+
+def fun_l21_n998()
+ fun_l22_n271
+end
+
+def fun_l21_n999()
+ fun_l22_n815
+end
+
+def fun_l22_n0()
+ fun_l23_n781
+end
+
+def fun_l22_n1()
+ fun_l23_n330
+end
+
+def fun_l22_n2()
+ fun_l23_n493
+end
+
+def fun_l22_n3()
+ fun_l23_n513
+end
+
+def fun_l22_n4()
+ fun_l23_n515
+end
+
+def fun_l22_n5()
+ fun_l23_n746
+end
+
+def fun_l22_n6()
+ fun_l23_n739
+end
+
+def fun_l22_n7()
+ fun_l23_n270
+end
+
+def fun_l22_n8()
+ fun_l23_n918
+end
+
+def fun_l22_n9()
+ fun_l23_n425
+end
+
+def fun_l22_n10()
+ fun_l23_n361
+end
+
+def fun_l22_n11()
+ fun_l23_n696
+end
+
+def fun_l22_n12()
+ fun_l23_n344
+end
+
+def fun_l22_n13()
+ fun_l23_n446
+end
+
+def fun_l22_n14()
+ fun_l23_n487
+end
+
+def fun_l22_n15()
+ fun_l23_n94
+end
+
+def fun_l22_n16()
+ fun_l23_n206
+end
+
+def fun_l22_n17()
+ fun_l23_n10
+end
+
+def fun_l22_n18()
+ fun_l23_n221
+end
+
+def fun_l22_n19()
+ fun_l23_n185
+end
+
+def fun_l22_n20()
+ fun_l23_n869
+end
+
+def fun_l22_n21()
+ fun_l23_n788
+end
+
+def fun_l22_n22()
+ fun_l23_n173
+end
+
+def fun_l22_n23()
+ fun_l23_n73
+end
+
+def fun_l22_n24()
+ fun_l23_n486
+end
+
+def fun_l22_n25()
+ fun_l23_n631
+end
+
+def fun_l22_n26()
+ fun_l23_n849
+end
+
+def fun_l22_n27()
+ fun_l23_n429
+end
+
+def fun_l22_n28()
+ fun_l23_n365
+end
+
+def fun_l22_n29()
+ fun_l23_n429
+end
+
+def fun_l22_n30()
+ fun_l23_n411
+end
+
+def fun_l22_n31()
+ fun_l23_n229
+end
+
+def fun_l22_n32()
+ fun_l23_n921
+end
+
+def fun_l22_n33()
+ fun_l23_n705
+end
+
+def fun_l22_n34()
+ fun_l23_n660
+end
+
+def fun_l22_n35()
+ fun_l23_n264
+end
+
+def fun_l22_n36()
+ fun_l23_n395
+end
+
+def fun_l22_n37()
+ fun_l23_n722
+end
+
+def fun_l22_n38()
+ fun_l23_n402
+end
+
+def fun_l22_n39()
+ fun_l23_n686
+end
+
+def fun_l22_n40()
+ fun_l23_n833
+end
+
+def fun_l22_n41()
+ fun_l23_n573
+end
+
+def fun_l22_n42()
+ fun_l23_n299
+end
+
+def fun_l22_n43()
+ fun_l23_n397
+end
+
+def fun_l22_n44()
+ fun_l23_n387
+end
+
+def fun_l22_n45()
+ fun_l23_n385
+end
+
+def fun_l22_n46()
+ fun_l23_n341
+end
+
+def fun_l22_n47()
+ fun_l23_n862
+end
+
+def fun_l22_n48()
+ fun_l23_n109
+end
+
+def fun_l22_n49()
+ fun_l23_n583
+end
+
+def fun_l22_n50()
+ fun_l23_n126
+end
+
+def fun_l22_n51()
+ fun_l23_n563
+end
+
+def fun_l22_n52()
+ fun_l23_n947
+end
+
+def fun_l22_n53()
+ fun_l23_n329
+end
+
+def fun_l22_n54()
+ fun_l23_n903
+end
+
+def fun_l22_n55()
+ fun_l23_n11
+end
+
+def fun_l22_n56()
+ fun_l23_n520
+end
+
+def fun_l22_n57()
+ fun_l23_n815
+end
+
+def fun_l22_n58()
+ fun_l23_n224
+end
+
+def fun_l22_n59()
+ fun_l23_n144
+end
+
+def fun_l22_n60()
+ fun_l23_n513
+end
+
+def fun_l22_n61()
+ fun_l23_n572
+end
+
+def fun_l22_n62()
+ fun_l23_n33
+end
+
+def fun_l22_n63()
+ fun_l23_n39
+end
+
+def fun_l22_n64()
+ fun_l23_n360
+end
+
+def fun_l22_n65()
+ fun_l23_n6
+end
+
+def fun_l22_n66()
+ fun_l23_n244
+end
+
+def fun_l22_n67()
+ fun_l23_n425
+end
+
+def fun_l22_n68()
+ fun_l23_n472
+end
+
+def fun_l22_n69()
+ fun_l23_n88
+end
+
+def fun_l22_n70()
+ fun_l23_n888
+end
+
+def fun_l22_n71()
+ fun_l23_n215
+end
+
+def fun_l22_n72()
+ fun_l23_n408
+end
+
+def fun_l22_n73()
+ fun_l23_n753
+end
+
+def fun_l22_n74()
+ fun_l23_n4
+end
+
+def fun_l22_n75()
+ fun_l23_n623
+end
+
+def fun_l22_n76()
+ fun_l23_n602
+end
+
+def fun_l22_n77()
+ fun_l23_n430
+end
+
+def fun_l22_n78()
+ fun_l23_n223
+end
+
+def fun_l22_n79()
+ fun_l23_n631
+end
+
+def fun_l22_n80()
+ fun_l23_n931
+end
+
+def fun_l22_n81()
+ fun_l23_n84
+end
+
+def fun_l22_n82()
+ fun_l23_n541
+end
+
+def fun_l22_n83()
+ fun_l23_n329
+end
+
+def fun_l22_n84()
+ fun_l23_n174
+end
+
+def fun_l22_n85()
+ fun_l23_n649
+end
+
+def fun_l22_n86()
+ fun_l23_n503
+end
+
+def fun_l22_n87()
+ fun_l23_n336
+end
+
+def fun_l22_n88()
+ fun_l23_n126
+end
+
+def fun_l22_n89()
+ fun_l23_n556
+end
+
+def fun_l22_n90()
+ fun_l23_n793
+end
+
+def fun_l22_n91()
+ fun_l23_n276
+end
+
+def fun_l22_n92()
+ fun_l23_n374
+end
+
+def fun_l22_n93()
+ fun_l23_n638
+end
+
+def fun_l22_n94()
+ fun_l23_n614
+end
+
+def fun_l22_n95()
+ fun_l23_n851
+end
+
+def fun_l22_n96()
+ fun_l23_n422
+end
+
+def fun_l22_n97()
+ fun_l23_n716
+end
+
+def fun_l22_n98()
+ fun_l23_n521
+end
+
+def fun_l22_n99()
+ fun_l23_n484
+end
+
+def fun_l22_n100()
+ fun_l23_n155
+end
+
+def fun_l22_n101()
+ fun_l23_n863
+end
+
+def fun_l22_n102()
+ fun_l23_n5
+end
+
+def fun_l22_n103()
+ fun_l23_n667
+end
+
+def fun_l22_n104()
+ fun_l23_n633
+end
+
+def fun_l22_n105()
+ fun_l23_n392
+end
+
+def fun_l22_n106()
+ fun_l23_n859
+end
+
+def fun_l22_n107()
+ fun_l23_n930
+end
+
+def fun_l22_n108()
+ fun_l23_n858
+end
+
+def fun_l22_n109()
+ fun_l23_n266
+end
+
+def fun_l22_n110()
+ fun_l23_n567
+end
+
+def fun_l22_n111()
+ fun_l23_n116
+end
+
+def fun_l22_n112()
+ fun_l23_n221
+end
+
+def fun_l22_n113()
+ fun_l23_n650
+end
+
+def fun_l22_n114()
+ fun_l23_n309
+end
+
+def fun_l22_n115()
+ fun_l23_n290
+end
+
+def fun_l22_n116()
+ fun_l23_n305
+end
+
+def fun_l22_n117()
+ fun_l23_n655
+end
+
+def fun_l22_n118()
+ fun_l23_n390
+end
+
+def fun_l22_n119()
+ fun_l23_n561
+end
+
+def fun_l22_n120()
+ fun_l23_n977
+end
+
+def fun_l22_n121()
+ fun_l23_n920
+end
+
+def fun_l22_n122()
+ fun_l23_n662
+end
+
+def fun_l22_n123()
+ fun_l23_n453
+end
+
+def fun_l22_n124()
+ fun_l23_n331
+end
+
+def fun_l22_n125()
+ fun_l23_n135
+end
+
+def fun_l22_n126()
+ fun_l23_n822
+end
+
+def fun_l22_n127()
+ fun_l23_n726
+end
+
+def fun_l22_n128()
+ fun_l23_n93
+end
+
+def fun_l22_n129()
+ fun_l23_n309
+end
+
+def fun_l22_n130()
+ fun_l23_n303
+end
+
+def fun_l22_n131()
+ fun_l23_n907
+end
+
+def fun_l22_n132()
+ fun_l23_n616
+end
+
+def fun_l22_n133()
+ fun_l23_n266
+end
+
+def fun_l22_n134()
+ fun_l23_n920
+end
+
+def fun_l22_n135()
+ fun_l23_n972
+end
+
+def fun_l22_n136()
+ fun_l23_n510
+end
+
+def fun_l22_n137()
+ fun_l23_n40
+end
+
+def fun_l22_n138()
+ fun_l23_n598
+end
+
+def fun_l22_n139()
+ fun_l23_n491
+end
+
+def fun_l22_n140()
+ fun_l23_n590
+end
+
+def fun_l22_n141()
+ fun_l23_n400
+end
+
+def fun_l22_n142()
+ fun_l23_n47
+end
+
+def fun_l22_n143()
+ fun_l23_n669
+end
+
+def fun_l22_n144()
+ fun_l23_n471
+end
+
+def fun_l22_n145()
+ fun_l23_n749
+end
+
+def fun_l22_n146()
+ fun_l23_n5
+end
+
+def fun_l22_n147()
+ fun_l23_n895
+end
+
+def fun_l22_n148()
+ fun_l23_n92
+end
+
+def fun_l22_n149()
+ fun_l23_n940
+end
+
+def fun_l22_n150()
+ fun_l23_n254
+end
+
+def fun_l22_n151()
+ fun_l23_n521
+end
+
+def fun_l22_n152()
+ fun_l23_n482
+end
+
+def fun_l22_n153()
+ fun_l23_n576
+end
+
+def fun_l22_n154()
+ fun_l23_n657
+end
+
+def fun_l22_n155()
+ fun_l23_n897
+end
+
+def fun_l22_n156()
+ fun_l23_n679
+end
+
+def fun_l22_n157()
+ fun_l23_n894
+end
+
+def fun_l22_n158()
+ fun_l23_n496
+end
+
+def fun_l22_n159()
+ fun_l23_n575
+end
+
+def fun_l22_n160()
+ fun_l23_n751
+end
+
+def fun_l22_n161()
+ fun_l23_n357
+end
+
+def fun_l22_n162()
+ fun_l23_n665
+end
+
+def fun_l22_n163()
+ fun_l23_n653
+end
+
+def fun_l22_n164()
+ fun_l23_n904
+end
+
+def fun_l22_n165()
+ fun_l23_n127
+end
+
+def fun_l22_n166()
+ fun_l23_n737
+end
+
+def fun_l22_n167()
+ fun_l23_n710
+end
+
+def fun_l22_n168()
+ fun_l23_n285
+end
+
+def fun_l22_n169()
+ fun_l23_n804
+end
+
+def fun_l22_n170()
+ fun_l23_n766
+end
+
+def fun_l22_n171()
+ fun_l23_n442
+end
+
+def fun_l22_n172()
+ fun_l23_n392
+end
+
+def fun_l22_n173()
+ fun_l23_n512
+end
+
+def fun_l22_n174()
+ fun_l23_n752
+end
+
+def fun_l22_n175()
+ fun_l23_n856
+end
+
+def fun_l22_n176()
+ fun_l23_n840
+end
+
+def fun_l22_n177()
+ fun_l23_n445
+end
+
+def fun_l22_n178()
+ fun_l23_n483
+end
+
+def fun_l22_n179()
+ fun_l23_n676
+end
+
+def fun_l22_n180()
+ fun_l23_n619
+end
+
+def fun_l22_n181()
+ fun_l23_n132
+end
+
+def fun_l22_n182()
+ fun_l23_n600
+end
+
+def fun_l22_n183()
+ fun_l23_n399
+end
+
+def fun_l22_n184()
+ fun_l23_n199
+end
+
+def fun_l22_n185()
+ fun_l23_n152
+end
+
+def fun_l22_n186()
+ fun_l23_n848
+end
+
+def fun_l22_n187()
+ fun_l23_n50
+end
+
+def fun_l22_n188()
+ fun_l23_n524
+end
+
+def fun_l22_n189()
+ fun_l23_n472
+end
+
+def fun_l22_n190()
+ fun_l23_n146
+end
+
+def fun_l22_n191()
+ fun_l23_n115
+end
+
+def fun_l22_n192()
+ fun_l23_n701
+end
+
+def fun_l22_n193()
+ fun_l23_n916
+end
+
+def fun_l22_n194()
+ fun_l23_n362
+end
+
+def fun_l22_n195()
+ fun_l23_n546
+end
+
+def fun_l22_n196()
+ fun_l23_n983
+end
+
+def fun_l22_n197()
+ fun_l23_n898
+end
+
+def fun_l22_n198()
+ fun_l23_n93
+end
+
+def fun_l22_n199()
+ fun_l23_n587
+end
+
+def fun_l22_n200()
+ fun_l23_n84
+end
+
+def fun_l22_n201()
+ fun_l23_n919
+end
+
+def fun_l22_n202()
+ fun_l23_n813
+end
+
+def fun_l22_n203()
+ fun_l23_n481
+end
+
+def fun_l22_n204()
+ fun_l23_n806
+end
+
+def fun_l22_n205()
+ fun_l23_n329
+end
+
+def fun_l22_n206()
+ fun_l23_n873
+end
+
+def fun_l22_n207()
+ fun_l23_n922
+end
+
+def fun_l22_n208()
+ fun_l23_n125
+end
+
+def fun_l22_n209()
+ fun_l23_n861
+end
+
+def fun_l22_n210()
+ fun_l23_n50
+end
+
+def fun_l22_n211()
+ fun_l23_n737
+end
+
+def fun_l22_n212()
+ fun_l23_n55
+end
+
+def fun_l22_n213()
+ fun_l23_n594
+end
+
+def fun_l22_n214()
+ fun_l23_n786
+end
+
+def fun_l22_n215()
+ fun_l23_n33
+end
+
+def fun_l22_n216()
+ fun_l23_n332
+end
+
+def fun_l22_n217()
+ fun_l23_n72
+end
+
+def fun_l22_n218()
+ fun_l23_n619
+end
+
+def fun_l22_n219()
+ fun_l23_n994
+end
+
+def fun_l22_n220()
+ fun_l23_n94
+end
+
+def fun_l22_n221()
+ fun_l23_n562
+end
+
+def fun_l22_n222()
+ fun_l23_n742
+end
+
+def fun_l22_n223()
+ fun_l23_n397
+end
+
+def fun_l22_n224()
+ fun_l23_n641
+end
+
+def fun_l22_n225()
+ fun_l23_n233
+end
+
+def fun_l22_n226()
+ fun_l23_n876
+end
+
+def fun_l22_n227()
+ fun_l23_n13
+end
+
+def fun_l22_n228()
+ fun_l23_n524
+end
+
+def fun_l22_n229()
+ fun_l23_n738
+end
+
+def fun_l22_n230()
+ fun_l23_n34
+end
+
+def fun_l22_n231()
+ fun_l23_n391
+end
+
+def fun_l22_n232()
+ fun_l23_n930
+end
+
+def fun_l22_n233()
+ fun_l23_n714
+end
+
+def fun_l22_n234()
+ fun_l23_n755
+end
+
+def fun_l22_n235()
+ fun_l23_n826
+end
+
+def fun_l22_n236()
+ fun_l23_n797
+end
+
+def fun_l22_n237()
+ fun_l23_n890
+end
+
+def fun_l22_n238()
+ fun_l23_n586
+end
+
+def fun_l22_n239()
+ fun_l23_n924
+end
+
+def fun_l22_n240()
+ fun_l23_n704
+end
+
+def fun_l22_n241()
+ fun_l23_n547
+end
+
+def fun_l22_n242()
+ fun_l23_n581
+end
+
+def fun_l22_n243()
+ fun_l23_n402
+end
+
+def fun_l22_n244()
+ fun_l23_n719
+end
+
+def fun_l22_n245()
+ fun_l23_n471
+end
+
+def fun_l22_n246()
+ fun_l23_n750
+end
+
+def fun_l22_n247()
+ fun_l23_n33
+end
+
+def fun_l22_n248()
+ fun_l23_n304
+end
+
+def fun_l22_n249()
+ fun_l23_n847
+end
+
+def fun_l22_n250()
+ fun_l23_n814
+end
+
+def fun_l22_n251()
+ fun_l23_n724
+end
+
+def fun_l22_n252()
+ fun_l23_n105
+end
+
+def fun_l22_n253()
+ fun_l23_n863
+end
+
+def fun_l22_n254()
+ fun_l23_n282
+end
+
+def fun_l22_n255()
+ fun_l23_n586
+end
+
+def fun_l22_n256()
+ fun_l23_n524
+end
+
+def fun_l22_n257()
+ fun_l23_n772
+end
+
+def fun_l22_n258()
+ fun_l23_n641
+end
+
+def fun_l22_n259()
+ fun_l23_n962
+end
+
+def fun_l22_n260()
+ fun_l23_n737
+end
+
+def fun_l22_n261()
+ fun_l23_n941
+end
+
+def fun_l22_n262()
+ fun_l23_n432
+end
+
+def fun_l22_n263()
+ fun_l23_n400
+end
+
+def fun_l22_n264()
+ fun_l23_n19
+end
+
+def fun_l22_n265()
+ fun_l23_n485
+end
+
+def fun_l22_n266()
+ fun_l23_n210
+end
+
+def fun_l22_n267()
+ fun_l23_n961
+end
+
+def fun_l22_n268()
+ fun_l23_n953
+end
+
+def fun_l22_n269()
+ fun_l23_n987
+end
+
+def fun_l22_n270()
+ fun_l23_n855
+end
+
+def fun_l22_n271()
+ fun_l23_n789
+end
+
+def fun_l22_n272()
+ fun_l23_n708
+end
+
+def fun_l22_n273()
+ fun_l23_n645
+end
+
+def fun_l22_n274()
+ fun_l23_n924
+end
+
+def fun_l22_n275()
+ fun_l23_n496
+end
+
+def fun_l22_n276()
+ fun_l23_n763
+end
+
+def fun_l22_n277()
+ fun_l23_n937
+end
+
+def fun_l22_n278()
+ fun_l23_n679
+end
+
+def fun_l22_n279()
+ fun_l23_n678
+end
+
+def fun_l22_n280()
+ fun_l23_n756
+end
+
+def fun_l22_n281()
+ fun_l23_n198
+end
+
+def fun_l22_n282()
+ fun_l23_n377
+end
+
+def fun_l22_n283()
+ fun_l23_n352
+end
+
+def fun_l22_n284()
+ fun_l23_n211
+end
+
+def fun_l22_n285()
+ fun_l23_n137
+end
+
+def fun_l22_n286()
+ fun_l23_n257
+end
+
+def fun_l22_n287()
+ fun_l23_n878
+end
+
+def fun_l22_n288()
+ fun_l23_n182
+end
+
+def fun_l22_n289()
+ fun_l23_n969
+end
+
+def fun_l22_n290()
+ fun_l23_n622
+end
+
+def fun_l22_n291()
+ fun_l23_n473
+end
+
+def fun_l22_n292()
+ fun_l23_n767
+end
+
+def fun_l22_n293()
+ fun_l23_n496
+end
+
+def fun_l22_n294()
+ fun_l23_n463
+end
+
+def fun_l22_n295()
+ fun_l23_n600
+end
+
+def fun_l22_n296()
+ fun_l23_n262
+end
+
+def fun_l22_n297()
+ fun_l23_n353
+end
+
+def fun_l22_n298()
+ fun_l23_n235
+end
+
+def fun_l22_n299()
+ fun_l23_n680
+end
+
+def fun_l22_n300()
+ fun_l23_n169
+end
+
+def fun_l22_n301()
+ fun_l23_n764
+end
+
+def fun_l22_n302()
+ fun_l23_n105
+end
+
+def fun_l22_n303()
+ fun_l23_n616
+end
+
+def fun_l22_n304()
+ fun_l23_n143
+end
+
+def fun_l22_n305()
+ fun_l23_n612
+end
+
+def fun_l22_n306()
+ fun_l23_n30
+end
+
+def fun_l22_n307()
+ fun_l23_n946
+end
+
+def fun_l22_n308()
+ fun_l23_n590
+end
+
+def fun_l22_n309()
+ fun_l23_n374
+end
+
+def fun_l22_n310()
+ fun_l23_n640
+end
+
+def fun_l22_n311()
+ fun_l23_n156
+end
+
+def fun_l22_n312()
+ fun_l23_n689
+end
+
+def fun_l22_n313()
+ fun_l23_n684
+end
+
+def fun_l22_n314()
+ fun_l23_n915
+end
+
+def fun_l22_n315()
+ fun_l23_n536
+end
+
+def fun_l22_n316()
+ fun_l23_n408
+end
+
+def fun_l22_n317()
+ fun_l23_n644
+end
+
+def fun_l22_n318()
+ fun_l23_n401
+end
+
+def fun_l22_n319()
+ fun_l23_n312
+end
+
+def fun_l22_n320()
+ fun_l23_n280
+end
+
+def fun_l22_n321()
+ fun_l23_n901
+end
+
+def fun_l22_n322()
+ fun_l23_n411
+end
+
+def fun_l22_n323()
+ fun_l23_n709
+end
+
+def fun_l22_n324()
+ fun_l23_n829
+end
+
+def fun_l22_n325()
+ fun_l23_n353
+end
+
+def fun_l22_n326()
+ fun_l23_n408
+end
+
+def fun_l22_n327()
+ fun_l23_n786
+end
+
+def fun_l22_n328()
+ fun_l23_n980
+end
+
+def fun_l22_n329()
+ fun_l23_n60
+end
+
+def fun_l22_n330()
+ fun_l23_n367
+end
+
+def fun_l22_n331()
+ fun_l23_n617
+end
+
+def fun_l22_n332()
+ fun_l23_n155
+end
+
+def fun_l22_n333()
+ fun_l23_n537
+end
+
+def fun_l22_n334()
+ fun_l23_n759
+end
+
+def fun_l22_n335()
+ fun_l23_n998
+end
+
+def fun_l22_n336()
+ fun_l23_n361
+end
+
+def fun_l22_n337()
+ fun_l23_n64
+end
+
+def fun_l22_n338()
+ fun_l23_n992
+end
+
+def fun_l22_n339()
+ fun_l23_n312
+end
+
+def fun_l22_n340()
+ fun_l23_n91
+end
+
+def fun_l22_n341()
+ fun_l23_n73
+end
+
+def fun_l22_n342()
+ fun_l23_n443
+end
+
+def fun_l22_n343()
+ fun_l23_n453
+end
+
+def fun_l22_n344()
+ fun_l23_n723
+end
+
+def fun_l22_n345()
+ fun_l23_n429
+end
+
+def fun_l22_n346()
+ fun_l23_n437
+end
+
+def fun_l22_n347()
+ fun_l23_n406
+end
+
+def fun_l22_n348()
+ fun_l23_n110
+end
+
+def fun_l22_n349()
+ fun_l23_n862
+end
+
+def fun_l22_n350()
+ fun_l23_n247
+end
+
+def fun_l22_n351()
+ fun_l23_n367
+end
+
+def fun_l22_n352()
+ fun_l23_n401
+end
+
+def fun_l22_n353()
+ fun_l23_n245
+end
+
+def fun_l22_n354()
+ fun_l23_n777
+end
+
+def fun_l22_n355()
+ fun_l23_n362
+end
+
+def fun_l22_n356()
+ fun_l23_n703
+end
+
+def fun_l22_n357()
+ fun_l23_n627
+end
+
+def fun_l22_n358()
+ fun_l23_n542
+end
+
+def fun_l22_n359()
+ fun_l23_n830
+end
+
+def fun_l22_n360()
+ fun_l23_n508
+end
+
+def fun_l22_n361()
+ fun_l23_n814
+end
+
+def fun_l22_n362()
+ fun_l23_n147
+end
+
+def fun_l22_n363()
+ fun_l23_n581
+end
+
+def fun_l22_n364()
+ fun_l23_n394
+end
+
+def fun_l22_n365()
+ fun_l23_n366
+end
+
+def fun_l22_n366()
+ fun_l23_n723
+end
+
+def fun_l22_n367()
+ fun_l23_n544
+end
+
+def fun_l22_n368()
+ fun_l23_n231
+end
+
+def fun_l22_n369()
+ fun_l23_n727
+end
+
+def fun_l22_n370()
+ fun_l23_n459
+end
+
+def fun_l22_n371()
+ fun_l23_n290
+end
+
+def fun_l22_n372()
+ fun_l23_n901
+end
+
+def fun_l22_n373()
+ fun_l23_n738
+end
+
+def fun_l22_n374()
+ fun_l23_n733
+end
+
+def fun_l22_n375()
+ fun_l23_n85
+end
+
+def fun_l22_n376()
+ fun_l23_n469
+end
+
+def fun_l22_n377()
+ fun_l23_n599
+end
+
+def fun_l22_n378()
+ fun_l23_n78
+end
+
+def fun_l22_n379()
+ fun_l23_n499
+end
+
+def fun_l22_n380()
+ fun_l23_n527
+end
+
+def fun_l22_n381()
+ fun_l23_n185
+end
+
+def fun_l22_n382()
+ fun_l23_n93
+end
+
+def fun_l22_n383()
+ fun_l23_n233
+end
+
+def fun_l22_n384()
+ fun_l23_n292
+end
+
+def fun_l22_n385()
+ fun_l23_n716
+end
+
+def fun_l22_n386()
+ fun_l23_n81
+end
+
+def fun_l22_n387()
+ fun_l23_n740
+end
+
+def fun_l22_n388()
+ fun_l23_n351
+end
+
+def fun_l22_n389()
+ fun_l23_n488
+end
+
+def fun_l22_n390()
+ fun_l23_n631
+end
+
+def fun_l22_n391()
+ fun_l23_n477
+end
+
+def fun_l22_n392()
+ fun_l23_n541
+end
+
+def fun_l22_n393()
+ fun_l23_n816
+end
+
+def fun_l22_n394()
+ fun_l23_n737
+end
+
+def fun_l22_n395()
+ fun_l23_n839
+end
+
+def fun_l22_n396()
+ fun_l23_n249
+end
+
+def fun_l22_n397()
+ fun_l23_n472
+end
+
+def fun_l22_n398()
+ fun_l23_n150
+end
+
+def fun_l22_n399()
+ fun_l23_n13
+end
+
+def fun_l22_n400()
+ fun_l23_n476
+end
+
+def fun_l22_n401()
+ fun_l23_n373
+end
+
+def fun_l22_n402()
+ fun_l23_n879
+end
+
+def fun_l22_n403()
+ fun_l23_n140
+end
+
+def fun_l22_n404()
+ fun_l23_n662
+end
+
+def fun_l22_n405()
+ fun_l23_n935
+end
+
+def fun_l22_n406()
+ fun_l23_n113
+end
+
+def fun_l22_n407()
+ fun_l23_n731
+end
+
+def fun_l22_n408()
+ fun_l23_n488
+end
+
+def fun_l22_n409()
+ fun_l23_n35
+end
+
+def fun_l22_n410()
+ fun_l23_n872
+end
+
+def fun_l22_n411()
+ fun_l23_n651
+end
+
+def fun_l22_n412()
+ fun_l23_n53
+end
+
+def fun_l22_n413()
+ fun_l23_n329
+end
+
+def fun_l22_n414()
+ fun_l23_n215
+end
+
+def fun_l22_n415()
+ fun_l23_n125
+end
+
+def fun_l22_n416()
+ fun_l23_n722
+end
+
+def fun_l22_n417()
+ fun_l23_n102
+end
+
+def fun_l22_n418()
+ fun_l23_n648
+end
+
+def fun_l22_n419()
+ fun_l23_n122
+end
+
+def fun_l22_n420()
+ fun_l23_n998
+end
+
+def fun_l22_n421()
+ fun_l23_n730
+end
+
+def fun_l22_n422()
+ fun_l23_n148
+end
+
+def fun_l22_n423()
+ fun_l23_n773
+end
+
+def fun_l22_n424()
+ fun_l23_n737
+end
+
+def fun_l22_n425()
+ fun_l23_n383
+end
+
+def fun_l22_n426()
+ fun_l23_n423
+end
+
+def fun_l22_n427()
+ fun_l23_n655
+end
+
+def fun_l22_n428()
+ fun_l23_n573
+end
+
+def fun_l22_n429()
+ fun_l23_n717
+end
+
+def fun_l22_n430()
+ fun_l23_n617
+end
+
+def fun_l22_n431()
+ fun_l23_n575
+end
+
+def fun_l22_n432()
+ fun_l23_n62
+end
+
+def fun_l22_n433()
+ fun_l23_n31
+end
+
+def fun_l22_n434()
+ fun_l23_n812
+end
+
+def fun_l22_n435()
+ fun_l23_n332
+end
+
+def fun_l22_n436()
+ fun_l23_n380
+end
+
+def fun_l22_n437()
+ fun_l23_n5
+end
+
+def fun_l22_n438()
+ fun_l23_n668
+end
+
+def fun_l22_n439()
+ fun_l23_n439
+end
+
+def fun_l22_n440()
+ fun_l23_n878
+end
+
+def fun_l22_n441()
+ fun_l23_n974
+end
+
+def fun_l22_n442()
+ fun_l23_n919
+end
+
+def fun_l22_n443()
+ fun_l23_n597
+end
+
+def fun_l22_n444()
+ fun_l23_n894
+end
+
+def fun_l22_n445()
+ fun_l23_n791
+end
+
+def fun_l22_n446()
+ fun_l23_n999
+end
+
+def fun_l22_n447()
+ fun_l23_n427
+end
+
+def fun_l22_n448()
+ fun_l23_n109
+end
+
+def fun_l22_n449()
+ fun_l23_n151
+end
+
+def fun_l22_n450()
+ fun_l23_n870
+end
+
+def fun_l22_n451()
+ fun_l23_n624
+end
+
+def fun_l22_n452()
+ fun_l23_n336
+end
+
+def fun_l22_n453()
+ fun_l23_n891
+end
+
+def fun_l22_n454()
+ fun_l23_n433
+end
+
+def fun_l22_n455()
+ fun_l23_n392
+end
+
+def fun_l22_n456()
+ fun_l23_n593
+end
+
+def fun_l22_n457()
+ fun_l23_n852
+end
+
+def fun_l22_n458()
+ fun_l23_n675
+end
+
+def fun_l22_n459()
+ fun_l23_n589
+end
+
+def fun_l22_n460()
+ fun_l23_n348
+end
+
+def fun_l22_n461()
+ fun_l23_n137
+end
+
+def fun_l22_n462()
+ fun_l23_n551
+end
+
+def fun_l22_n463()
+ fun_l23_n236
+end
+
+def fun_l22_n464()
+ fun_l23_n266
+end
+
+def fun_l22_n465()
+ fun_l23_n622
+end
+
+def fun_l22_n466()
+ fun_l23_n174
+end
+
+def fun_l22_n467()
+ fun_l23_n79
+end
+
+def fun_l22_n468()
+ fun_l23_n189
+end
+
+def fun_l22_n469()
+ fun_l23_n746
+end
+
+def fun_l22_n470()
+ fun_l23_n917
+end
+
+def fun_l22_n471()
+ fun_l23_n344
+end
+
+def fun_l22_n472()
+ fun_l23_n410
+end
+
+def fun_l22_n473()
+ fun_l23_n844
+end
+
+def fun_l22_n474()
+ fun_l23_n998
+end
+
+def fun_l22_n475()
+ fun_l23_n969
+end
+
+def fun_l22_n476()
+ fun_l23_n853
+end
+
+def fun_l22_n477()
+ fun_l23_n691
+end
+
+def fun_l22_n478()
+ fun_l23_n147
+end
+
+def fun_l22_n479()
+ fun_l23_n983
+end
+
+def fun_l22_n480()
+ fun_l23_n384
+end
+
+def fun_l22_n481()
+ fun_l23_n624
+end
+
+def fun_l22_n482()
+ fun_l23_n852
+end
+
+def fun_l22_n483()
+ fun_l23_n403
+end
+
+def fun_l22_n484()
+ fun_l23_n878
+end
+
+def fun_l22_n485()
+ fun_l23_n998
+end
+
+def fun_l22_n486()
+ fun_l23_n435
+end
+
+def fun_l22_n487()
+ fun_l23_n637
+end
+
+def fun_l22_n488()
+ fun_l23_n283
+end
+
+def fun_l22_n489()
+ fun_l23_n444
+end
+
+def fun_l22_n490()
+ fun_l23_n121
+end
+
+def fun_l22_n491()
+ fun_l23_n478
+end
+
+def fun_l22_n492()
+ fun_l23_n856
+end
+
+def fun_l22_n493()
+ fun_l23_n209
+end
+
+def fun_l22_n494()
+ fun_l23_n752
+end
+
+def fun_l22_n495()
+ fun_l23_n146
+end
+
+def fun_l22_n496()
+ fun_l23_n986
+end
+
+def fun_l22_n497()
+ fun_l23_n912
+end
+
+def fun_l22_n498()
+ fun_l23_n302
+end
+
+def fun_l22_n499()
+ fun_l23_n813
+end
+
+def fun_l22_n500()
+ fun_l23_n140
+end
+
+def fun_l22_n501()
+ fun_l23_n968
+end
+
+def fun_l22_n502()
+ fun_l23_n125
+end
+
+def fun_l22_n503()
+ fun_l23_n595
+end
+
+def fun_l22_n504()
+ fun_l23_n95
+end
+
+def fun_l22_n505()
+ fun_l23_n571
+end
+
+def fun_l22_n506()
+ fun_l23_n639
+end
+
+def fun_l22_n507()
+ fun_l23_n481
+end
+
+def fun_l22_n508()
+ fun_l23_n538
+end
+
+def fun_l22_n509()
+ fun_l23_n469
+end
+
+def fun_l22_n510()
+ fun_l23_n563
+end
+
+def fun_l22_n511()
+ fun_l23_n839
+end
+
+def fun_l22_n512()
+ fun_l23_n764
+end
+
+def fun_l22_n513()
+ fun_l23_n960
+end
+
+def fun_l22_n514()
+ fun_l23_n125
+end
+
+def fun_l22_n515()
+ fun_l23_n776
+end
+
+def fun_l22_n516()
+ fun_l23_n78
+end
+
+def fun_l22_n517()
+ fun_l23_n681
+end
+
+def fun_l22_n518()
+ fun_l23_n959
+end
+
+def fun_l22_n519()
+ fun_l23_n565
+end
+
+def fun_l22_n520()
+ fun_l23_n889
+end
+
+def fun_l22_n521()
+ fun_l23_n377
+end
+
+def fun_l22_n522()
+ fun_l23_n744
+end
+
+def fun_l22_n523()
+ fun_l23_n848
+end
+
+def fun_l22_n524()
+ fun_l23_n223
+end
+
+def fun_l22_n525()
+ fun_l23_n81
+end
+
+def fun_l22_n526()
+ fun_l23_n764
+end
+
+def fun_l22_n527()
+ fun_l23_n667
+end
+
+def fun_l22_n528()
+ fun_l23_n657
+end
+
+def fun_l22_n529()
+ fun_l23_n343
+end
+
+def fun_l22_n530()
+ fun_l23_n526
+end
+
+def fun_l22_n531()
+ fun_l23_n570
+end
+
+def fun_l22_n532()
+ fun_l23_n3
+end
+
+def fun_l22_n533()
+ fun_l23_n501
+end
+
+def fun_l22_n534()
+ fun_l23_n571
+end
+
+def fun_l22_n535()
+ fun_l23_n245
+end
+
+def fun_l22_n536()
+ fun_l23_n834
+end
+
+def fun_l22_n537()
+ fun_l23_n454
+end
+
+def fun_l22_n538()
+ fun_l23_n163
+end
+
+def fun_l22_n539()
+ fun_l23_n598
+end
+
+def fun_l22_n540()
+ fun_l23_n277
+end
+
+def fun_l22_n541()
+ fun_l23_n482
+end
+
+def fun_l22_n542()
+ fun_l23_n202
+end
+
+def fun_l22_n543()
+ fun_l23_n525
+end
+
+def fun_l22_n544()
+ fun_l23_n971
+end
+
+def fun_l22_n545()
+ fun_l23_n258
+end
+
+def fun_l22_n546()
+ fun_l23_n220
+end
+
+def fun_l22_n547()
+ fun_l23_n762
+end
+
+def fun_l22_n548()
+ fun_l23_n431
+end
+
+def fun_l22_n549()
+ fun_l23_n171
+end
+
+def fun_l22_n550()
+ fun_l23_n633
+end
+
+def fun_l22_n551()
+ fun_l23_n275
+end
+
+def fun_l22_n552()
+ fun_l23_n665
+end
+
+def fun_l22_n553()
+ fun_l23_n266
+end
+
+def fun_l22_n554()
+ fun_l23_n440
+end
+
+def fun_l22_n555()
+ fun_l23_n463
+end
+
+def fun_l22_n556()
+ fun_l23_n2
+end
+
+def fun_l22_n557()
+ fun_l23_n536
+end
+
+def fun_l22_n558()
+ fun_l23_n323
+end
+
+def fun_l22_n559()
+ fun_l23_n838
+end
+
+def fun_l22_n560()
+ fun_l23_n431
+end
+
+def fun_l22_n561()
+ fun_l23_n920
+end
+
+def fun_l22_n562()
+ fun_l23_n250
+end
+
+def fun_l22_n563()
+ fun_l23_n871
+end
+
+def fun_l22_n564()
+ fun_l23_n324
+end
+
+def fun_l22_n565()
+ fun_l23_n454
+end
+
+def fun_l22_n566()
+ fun_l23_n308
+end
+
+def fun_l22_n567()
+ fun_l23_n629
+end
+
+def fun_l22_n568()
+ fun_l23_n791
+end
+
+def fun_l22_n569()
+ fun_l23_n55
+end
+
+def fun_l22_n570()
+ fun_l23_n791
+end
+
+def fun_l22_n571()
+ fun_l23_n674
+end
+
+def fun_l22_n572()
+ fun_l23_n749
+end
+
+def fun_l22_n573()
+ fun_l23_n106
+end
+
+def fun_l22_n574()
+ fun_l23_n931
+end
+
+def fun_l22_n575()
+ fun_l23_n165
+end
+
+def fun_l22_n576()
+ fun_l23_n649
+end
+
+def fun_l22_n577()
+ fun_l23_n99
+end
+
+def fun_l22_n578()
+ fun_l23_n609
+end
+
+def fun_l22_n579()
+ fun_l23_n165
+end
+
+def fun_l22_n580()
+ fun_l23_n530
+end
+
+def fun_l22_n581()
+ fun_l23_n545
+end
+
+def fun_l22_n582()
+ fun_l23_n453
+end
+
+def fun_l22_n583()
+ fun_l23_n128
+end
+
+def fun_l22_n584()
+ fun_l23_n200
+end
+
+def fun_l22_n585()
+ fun_l23_n712
+end
+
+def fun_l22_n586()
+ fun_l23_n668
+end
+
+def fun_l22_n587()
+ fun_l23_n903
+end
+
+def fun_l22_n588()
+ fun_l23_n704
+end
+
+def fun_l22_n589()
+ fun_l23_n864
+end
+
+def fun_l22_n590()
+ fun_l23_n98
+end
+
+def fun_l22_n591()
+ fun_l23_n674
+end
+
+def fun_l22_n592()
+ fun_l23_n577
+end
+
+def fun_l22_n593()
+ fun_l23_n969
+end
+
+def fun_l22_n594()
+ fun_l23_n634
+end
+
+def fun_l22_n595()
+ fun_l23_n111
+end
+
+def fun_l22_n596()
+ fun_l23_n866
+end
+
+def fun_l22_n597()
+ fun_l23_n353
+end
+
+def fun_l22_n598()
+ fun_l23_n223
+end
+
+def fun_l22_n599()
+ fun_l23_n229
+end
+
+def fun_l22_n600()
+ fun_l23_n958
+end
+
+def fun_l22_n601()
+ fun_l23_n802
+end
+
+def fun_l22_n602()
+ fun_l23_n124
+end
+
+def fun_l22_n603()
+ fun_l23_n945
+end
+
+def fun_l22_n604()
+ fun_l23_n911
+end
+
+def fun_l22_n605()
+ fun_l23_n410
+end
+
+def fun_l22_n606()
+ fun_l23_n754
+end
+
+def fun_l22_n607()
+ fun_l23_n429
+end
+
+def fun_l22_n608()
+ fun_l23_n529
+end
+
+def fun_l22_n609()
+ fun_l23_n15
+end
+
+def fun_l22_n610()
+ fun_l23_n634
+end
+
+def fun_l22_n611()
+ fun_l23_n608
+end
+
+def fun_l22_n612()
+ fun_l23_n509
+end
+
+def fun_l22_n613()
+ fun_l23_n352
+end
+
+def fun_l22_n614()
+ fun_l23_n706
+end
+
+def fun_l22_n615()
+ fun_l23_n172
+end
+
+def fun_l22_n616()
+ fun_l23_n268
+end
+
+def fun_l22_n617()
+ fun_l23_n275
+end
+
+def fun_l22_n618()
+ fun_l23_n265
+end
+
+def fun_l22_n619()
+ fun_l23_n101
+end
+
+def fun_l22_n620()
+ fun_l23_n402
+end
+
+def fun_l22_n621()
+ fun_l23_n953
+end
+
+def fun_l22_n622()
+ fun_l23_n682
+end
+
+def fun_l22_n623()
+ fun_l23_n745
+end
+
+def fun_l22_n624()
+ fun_l23_n343
+end
+
+def fun_l22_n625()
+ fun_l23_n147
+end
+
+def fun_l22_n626()
+ fun_l23_n39
+end
+
+def fun_l22_n627()
+ fun_l23_n483
+end
+
+def fun_l22_n628()
+ fun_l23_n787
+end
+
+def fun_l22_n629()
+ fun_l23_n643
+end
+
+def fun_l22_n630()
+ fun_l23_n40
+end
+
+def fun_l22_n631()
+ fun_l23_n834
+end
+
+def fun_l22_n632()
+ fun_l23_n220
+end
+
+def fun_l22_n633()
+ fun_l23_n293
+end
+
+def fun_l22_n634()
+ fun_l23_n144
+end
+
+def fun_l22_n635()
+ fun_l23_n602
+end
+
+def fun_l22_n636()
+ fun_l23_n248
+end
+
+def fun_l22_n637()
+ fun_l23_n524
+end
+
+def fun_l22_n638()
+ fun_l23_n639
+end
+
+def fun_l22_n639()
+ fun_l23_n217
+end
+
+def fun_l22_n640()
+ fun_l23_n193
+end
+
+def fun_l22_n641()
+ fun_l23_n158
+end
+
+def fun_l22_n642()
+ fun_l23_n894
+end
+
+def fun_l22_n643()
+ fun_l23_n189
+end
+
+def fun_l22_n644()
+ fun_l23_n877
+end
+
+def fun_l22_n645()
+ fun_l23_n299
+end
+
+def fun_l22_n646()
+ fun_l23_n71
+end
+
+def fun_l22_n647()
+ fun_l23_n290
+end
+
+def fun_l22_n648()
+ fun_l23_n557
+end
+
+def fun_l22_n649()
+ fun_l23_n151
+end
+
+def fun_l22_n650()
+ fun_l23_n297
+end
+
+def fun_l22_n651()
+ fun_l23_n991
+end
+
+def fun_l22_n652()
+ fun_l23_n11
+end
+
+def fun_l22_n653()
+ fun_l23_n465
+end
+
+def fun_l22_n654()
+ fun_l23_n802
+end
+
+def fun_l22_n655()
+ fun_l23_n778
+end
+
+def fun_l22_n656()
+ fun_l23_n877
+end
+
+def fun_l22_n657()
+ fun_l23_n773
+end
+
+def fun_l22_n658()
+ fun_l23_n385
+end
+
+def fun_l22_n659()
+ fun_l23_n151
+end
+
+def fun_l22_n660()
+ fun_l23_n553
+end
+
+def fun_l22_n661()
+ fun_l23_n626
+end
+
+def fun_l22_n662()
+ fun_l23_n715
+end
+
+def fun_l22_n663()
+ fun_l23_n675
+end
+
+def fun_l22_n664()
+ fun_l23_n884
+end
+
+def fun_l22_n665()
+ fun_l23_n875
+end
+
+def fun_l22_n666()
+ fun_l23_n510
+end
+
+def fun_l22_n667()
+ fun_l23_n727
+end
+
+def fun_l22_n668()
+ fun_l23_n530
+end
+
+def fun_l22_n669()
+ fun_l23_n869
+end
+
+def fun_l22_n670()
+ fun_l23_n385
+end
+
+def fun_l22_n671()
+ fun_l23_n66
+end
+
+def fun_l22_n672()
+ fun_l23_n335
+end
+
+def fun_l22_n673()
+ fun_l23_n287
+end
+
+def fun_l22_n674()
+ fun_l23_n426
+end
+
+def fun_l22_n675()
+ fun_l23_n657
+end
+
+def fun_l22_n676()
+ fun_l23_n411
+end
+
+def fun_l22_n677()
+ fun_l23_n982
+end
+
+def fun_l22_n678()
+ fun_l23_n747
+end
+
+def fun_l22_n679()
+ fun_l23_n305
+end
+
+def fun_l22_n680()
+ fun_l23_n767
+end
+
+def fun_l22_n681()
+ fun_l23_n177
+end
+
+def fun_l22_n682()
+ fun_l23_n115
+end
+
+def fun_l22_n683()
+ fun_l23_n625
+end
+
+def fun_l22_n684()
+ fun_l23_n154
+end
+
+def fun_l22_n685()
+ fun_l23_n871
+end
+
+def fun_l22_n686()
+ fun_l23_n921
+end
+
+def fun_l22_n687()
+ fun_l23_n194
+end
+
+def fun_l22_n688()
+ fun_l23_n12
+end
+
+def fun_l22_n689()
+ fun_l23_n464
+end
+
+def fun_l22_n690()
+ fun_l23_n44
+end
+
+def fun_l22_n691()
+ fun_l23_n265
+end
+
+def fun_l22_n692()
+ fun_l23_n256
+end
+
+def fun_l22_n693()
+ fun_l23_n937
+end
+
+def fun_l22_n694()
+ fun_l23_n656
+end
+
+def fun_l22_n695()
+ fun_l23_n986
+end
+
+def fun_l22_n696()
+ fun_l23_n774
+end
+
+def fun_l22_n697()
+ fun_l23_n907
+end
+
+def fun_l22_n698()
+ fun_l23_n763
+end
+
+def fun_l22_n699()
+ fun_l23_n290
+end
+
+def fun_l22_n700()
+ fun_l23_n121
+end
+
+def fun_l22_n701()
+ fun_l23_n605
+end
+
+def fun_l22_n702()
+ fun_l23_n415
+end
+
+def fun_l22_n703()
+ fun_l23_n431
+end
+
+def fun_l22_n704()
+ fun_l23_n65
+end
+
+def fun_l22_n705()
+ fun_l23_n997
+end
+
+def fun_l22_n706()
+ fun_l23_n859
+end
+
+def fun_l22_n707()
+ fun_l23_n768
+end
+
+def fun_l22_n708()
+ fun_l23_n570
+end
+
+def fun_l22_n709()
+ fun_l23_n458
+end
+
+def fun_l22_n710()
+ fun_l23_n964
+end
+
+def fun_l22_n711()
+ fun_l23_n484
+end
+
+def fun_l22_n712()
+ fun_l23_n440
+end
+
+def fun_l22_n713()
+ fun_l23_n133
+end
+
+def fun_l22_n714()
+ fun_l23_n789
+end
+
+def fun_l22_n715()
+ fun_l23_n176
+end
+
+def fun_l22_n716()
+ fun_l23_n380
+end
+
+def fun_l22_n717()
+ fun_l23_n115
+end
+
+def fun_l22_n718()
+ fun_l23_n652
+end
+
+def fun_l22_n719()
+ fun_l23_n210
+end
+
+def fun_l22_n720()
+ fun_l23_n347
+end
+
+def fun_l22_n721()
+ fun_l23_n72
+end
+
+def fun_l22_n722()
+ fun_l23_n426
+end
+
+def fun_l22_n723()
+ fun_l23_n123
+end
+
+def fun_l22_n724()
+ fun_l23_n321
+end
+
+def fun_l22_n725()
+ fun_l23_n582
+end
+
+def fun_l22_n726()
+ fun_l23_n434
+end
+
+def fun_l22_n727()
+ fun_l23_n543
+end
+
+def fun_l22_n728()
+ fun_l23_n794
+end
+
+def fun_l22_n729()
+ fun_l23_n474
+end
+
+def fun_l22_n730()
+ fun_l23_n412
+end
+
+def fun_l22_n731()
+ fun_l23_n898
+end
+
+def fun_l22_n732()
+ fun_l23_n833
+end
+
+def fun_l22_n733()
+ fun_l23_n77
+end
+
+def fun_l22_n734()
+ fun_l23_n728
+end
+
+def fun_l22_n735()
+ fun_l23_n397
+end
+
+def fun_l22_n736()
+ fun_l23_n40
+end
+
+def fun_l22_n737()
+ fun_l23_n501
+end
+
+def fun_l22_n738()
+ fun_l23_n817
+end
+
+def fun_l22_n739()
+ fun_l23_n792
+end
+
+def fun_l22_n740()
+ fun_l23_n435
+end
+
+def fun_l22_n741()
+ fun_l23_n264
+end
+
+def fun_l22_n742()
+ fun_l23_n285
+end
+
+def fun_l22_n743()
+ fun_l23_n756
+end
+
+def fun_l22_n744()
+ fun_l23_n836
+end
+
+def fun_l22_n745()
+ fun_l23_n179
+end
+
+def fun_l22_n746()
+ fun_l23_n375
+end
+
+def fun_l22_n747()
+ fun_l23_n631
+end
+
+def fun_l22_n748()
+ fun_l23_n232
+end
+
+def fun_l22_n749()
+ fun_l23_n215
+end
+
+def fun_l22_n750()
+ fun_l23_n118
+end
+
+def fun_l22_n751()
+ fun_l23_n721
+end
+
+def fun_l22_n752()
+ fun_l23_n378
+end
+
+def fun_l22_n753()
+ fun_l23_n613
+end
+
+def fun_l22_n754()
+ fun_l23_n368
+end
+
+def fun_l22_n755()
+ fun_l23_n748
+end
+
+def fun_l22_n756()
+ fun_l23_n0
+end
+
+def fun_l22_n757()
+ fun_l23_n90
+end
+
+def fun_l22_n758()
+ fun_l23_n895
+end
+
+def fun_l22_n759()
+ fun_l23_n0
+end
+
+def fun_l22_n760()
+ fun_l23_n486
+end
+
+def fun_l22_n761()
+ fun_l23_n568
+end
+
+def fun_l22_n762()
+ fun_l23_n525
+end
+
+def fun_l22_n763()
+ fun_l23_n106
+end
+
+def fun_l22_n764()
+ fun_l23_n607
+end
+
+def fun_l22_n765()
+ fun_l23_n729
+end
+
+def fun_l22_n766()
+ fun_l23_n781
+end
+
+def fun_l22_n767()
+ fun_l23_n79
+end
+
+def fun_l22_n768()
+ fun_l23_n313
+end
+
+def fun_l22_n769()
+ fun_l23_n764
+end
+
+def fun_l22_n770()
+ fun_l23_n348
+end
+
+def fun_l22_n771()
+ fun_l23_n809
+end
+
+def fun_l22_n772()
+ fun_l23_n891
+end
+
+def fun_l22_n773()
+ fun_l23_n806
+end
+
+def fun_l22_n774()
+ fun_l23_n173
+end
+
+def fun_l22_n775()
+ fun_l23_n960
+end
+
+def fun_l22_n776()
+ fun_l23_n186
+end
+
+def fun_l22_n777()
+ fun_l23_n863
+end
+
+def fun_l22_n778()
+ fun_l23_n860
+end
+
+def fun_l22_n779()
+ fun_l23_n122
+end
+
+def fun_l22_n780()
+ fun_l23_n114
+end
+
+def fun_l22_n781()
+ fun_l23_n910
+end
+
+def fun_l22_n782()
+ fun_l23_n20
+end
+
+def fun_l22_n783()
+ fun_l23_n384
+end
+
+def fun_l22_n784()
+ fun_l23_n56
+end
+
+def fun_l22_n785()
+ fun_l23_n833
+end
+
+def fun_l22_n786()
+ fun_l23_n31
+end
+
+def fun_l22_n787()
+ fun_l23_n679
+end
+
+def fun_l22_n788()
+ fun_l23_n8
+end
+
+def fun_l22_n789()
+ fun_l23_n425
+end
+
+def fun_l22_n790()
+ fun_l23_n615
+end
+
+def fun_l22_n791()
+ fun_l23_n220
+end
+
+def fun_l22_n792()
+ fun_l23_n977
+end
+
+def fun_l22_n793()
+ fun_l23_n913
+end
+
+def fun_l22_n794()
+ fun_l23_n714
+end
+
+def fun_l22_n795()
+ fun_l23_n885
+end
+
+def fun_l22_n796()
+ fun_l23_n289
+end
+
+def fun_l22_n797()
+ fun_l23_n205
+end
+
+def fun_l22_n798()
+ fun_l23_n826
+end
+
+def fun_l22_n799()
+ fun_l23_n335
+end
+
+def fun_l22_n800()
+ fun_l23_n754
+end
+
+def fun_l22_n801()
+ fun_l23_n588
+end
+
+def fun_l22_n802()
+ fun_l23_n689
+end
+
+def fun_l22_n803()
+ fun_l23_n731
+end
+
+def fun_l22_n804()
+ fun_l23_n962
+end
+
+def fun_l22_n805()
+ fun_l23_n283
+end
+
+def fun_l22_n806()
+ fun_l23_n692
+end
+
+def fun_l22_n807()
+ fun_l23_n554
+end
+
+def fun_l22_n808()
+ fun_l23_n365
+end
+
+def fun_l22_n809()
+ fun_l23_n684
+end
+
+def fun_l22_n810()
+ fun_l23_n848
+end
+
+def fun_l22_n811()
+ fun_l23_n283
+end
+
+def fun_l22_n812()
+ fun_l23_n378
+end
+
+def fun_l22_n813()
+ fun_l23_n83
+end
+
+def fun_l22_n814()
+ fun_l23_n260
+end
+
+def fun_l22_n815()
+ fun_l23_n382
+end
+
+def fun_l22_n816()
+ fun_l23_n701
+end
+
+def fun_l22_n817()
+ fun_l23_n177
+end
+
+def fun_l22_n818()
+ fun_l23_n703
+end
+
+def fun_l22_n819()
+ fun_l23_n105
+end
+
+def fun_l22_n820()
+ fun_l23_n874
+end
+
+def fun_l22_n821()
+ fun_l23_n952
+end
+
+def fun_l22_n822()
+ fun_l23_n37
+end
+
+def fun_l22_n823()
+ fun_l23_n478
+end
+
+def fun_l22_n824()
+ fun_l23_n164
+end
+
+def fun_l22_n825()
+ fun_l23_n505
+end
+
+def fun_l22_n826()
+ fun_l23_n353
+end
+
+def fun_l22_n827()
+ fun_l23_n799
+end
+
+def fun_l22_n828()
+ fun_l23_n330
+end
+
+def fun_l22_n829()
+ fun_l23_n979
+end
+
+def fun_l22_n830()
+ fun_l23_n842
+end
+
+def fun_l22_n831()
+ fun_l23_n912
+end
+
+def fun_l22_n832()
+ fun_l23_n579
+end
+
+def fun_l22_n833()
+ fun_l23_n123
+end
+
+def fun_l22_n834()
+ fun_l23_n864
+end
+
+def fun_l22_n835()
+ fun_l23_n369
+end
+
+def fun_l22_n836()
+ fun_l23_n145
+end
+
+def fun_l22_n837()
+ fun_l23_n414
+end
+
+def fun_l22_n838()
+ fun_l23_n261
+end
+
+def fun_l22_n839()
+ fun_l23_n88
+end
+
+def fun_l22_n840()
+ fun_l23_n427
+end
+
+def fun_l22_n841()
+ fun_l23_n847
+end
+
+def fun_l22_n842()
+ fun_l23_n734
+end
+
+def fun_l22_n843()
+ fun_l23_n895
+end
+
+def fun_l22_n844()
+ fun_l23_n765
+end
+
+def fun_l22_n845()
+ fun_l23_n647
+end
+
+def fun_l22_n846()
+ fun_l23_n862
+end
+
+def fun_l22_n847()
+ fun_l23_n360
+end
+
+def fun_l22_n848()
+ fun_l23_n922
+end
+
+def fun_l22_n849()
+ fun_l23_n914
+end
+
+def fun_l22_n850()
+ fun_l23_n408
+end
+
+def fun_l22_n851()
+ fun_l23_n248
+end
+
+def fun_l22_n852()
+ fun_l23_n812
+end
+
+def fun_l22_n853()
+ fun_l23_n288
+end
+
+def fun_l22_n854()
+ fun_l23_n885
+end
+
+def fun_l22_n855()
+ fun_l23_n164
+end
+
+def fun_l22_n856()
+ fun_l23_n231
+end
+
+def fun_l22_n857()
+ fun_l23_n428
+end
+
+def fun_l22_n858()
+ fun_l23_n527
+end
+
+def fun_l22_n859()
+ fun_l23_n419
+end
+
+def fun_l22_n860()
+ fun_l23_n348
+end
+
+def fun_l22_n861()
+ fun_l23_n580
+end
+
+def fun_l22_n862()
+ fun_l23_n437
+end
+
+def fun_l22_n863()
+ fun_l23_n486
+end
+
+def fun_l22_n864()
+ fun_l23_n2
+end
+
+def fun_l22_n865()
+ fun_l23_n733
+end
+
+def fun_l22_n866()
+ fun_l23_n50
+end
+
+def fun_l22_n867()
+ fun_l23_n391
+end
+
+def fun_l22_n868()
+ fun_l23_n451
+end
+
+def fun_l22_n869()
+ fun_l23_n86
+end
+
+def fun_l22_n870()
+ fun_l23_n426
+end
+
+def fun_l22_n871()
+ fun_l23_n279
+end
+
+def fun_l22_n872()
+ fun_l23_n41
+end
+
+def fun_l22_n873()
+ fun_l23_n241
+end
+
+def fun_l22_n874()
+ fun_l23_n601
+end
+
+def fun_l22_n875()
+ fun_l23_n187
+end
+
+def fun_l22_n876()
+ fun_l23_n98
+end
+
+def fun_l22_n877()
+ fun_l23_n145
+end
+
+def fun_l22_n878()
+ fun_l23_n327
+end
+
+def fun_l22_n879()
+ fun_l23_n928
+end
+
+def fun_l22_n880()
+ fun_l23_n666
+end
+
+def fun_l22_n881()
+ fun_l23_n152
+end
+
+def fun_l22_n882()
+ fun_l23_n930
+end
+
+def fun_l22_n883()
+ fun_l23_n842
+end
+
+def fun_l22_n884()
+ fun_l23_n865
+end
+
+def fun_l22_n885()
+ fun_l23_n16
+end
+
+def fun_l22_n886()
+ fun_l23_n402
+end
+
+def fun_l22_n887()
+ fun_l23_n711
+end
+
+def fun_l22_n888()
+ fun_l23_n206
+end
+
+def fun_l22_n889()
+ fun_l23_n991
+end
+
+def fun_l22_n890()
+ fun_l23_n852
+end
+
+def fun_l22_n891()
+ fun_l23_n602
+end
+
+def fun_l22_n892()
+ fun_l23_n998
+end
+
+def fun_l22_n893()
+ fun_l23_n740
+end
+
+def fun_l22_n894()
+ fun_l23_n643
+end
+
+def fun_l22_n895()
+ fun_l23_n872
+end
+
+def fun_l22_n896()
+ fun_l23_n689
+end
+
+def fun_l22_n897()
+ fun_l23_n119
+end
+
+def fun_l22_n898()
+ fun_l23_n230
+end
+
+def fun_l22_n899()
+ fun_l23_n345
+end
+
+def fun_l22_n900()
+ fun_l23_n805
+end
+
+def fun_l22_n901()
+ fun_l23_n850
+end
+
+def fun_l22_n902()
+ fun_l23_n930
+end
+
+def fun_l22_n903()
+ fun_l23_n652
+end
+
+def fun_l22_n904()
+ fun_l23_n772
+end
+
+def fun_l22_n905()
+ fun_l23_n219
+end
+
+def fun_l22_n906()
+ fun_l23_n592
+end
+
+def fun_l22_n907()
+ fun_l23_n177
+end
+
+def fun_l22_n908()
+ fun_l23_n552
+end
+
+def fun_l22_n909()
+ fun_l23_n334
+end
+
+def fun_l22_n910()
+ fun_l23_n764
+end
+
+def fun_l22_n911()
+ fun_l23_n482
+end
+
+def fun_l22_n912()
+ fun_l23_n73
+end
+
+def fun_l22_n913()
+ fun_l23_n854
+end
+
+def fun_l22_n914()
+ fun_l23_n215
+end
+
+def fun_l22_n915()
+ fun_l23_n736
+end
+
+def fun_l22_n916()
+ fun_l23_n91
+end
+
+def fun_l22_n917()
+ fun_l23_n506
+end
+
+def fun_l22_n918()
+ fun_l23_n775
+end
+
+def fun_l22_n919()
+ fun_l23_n171
+end
+
+def fun_l22_n920()
+ fun_l23_n414
+end
+
+def fun_l22_n921()
+ fun_l23_n185
+end
+
+def fun_l22_n922()
+ fun_l23_n190
+end
+
+def fun_l22_n923()
+ fun_l23_n696
+end
+
+def fun_l22_n924()
+ fun_l23_n175
+end
+
+def fun_l22_n925()
+ fun_l23_n29
+end
+
+def fun_l22_n926()
+ fun_l23_n729
+end
+
+def fun_l22_n927()
+ fun_l23_n279
+end
+
+def fun_l22_n928()
+ fun_l23_n2
+end
+
+def fun_l22_n929()
+ fun_l23_n44
+end
+
+def fun_l22_n930()
+ fun_l23_n399
+end
+
+def fun_l22_n931()
+ fun_l23_n957
+end
+
+def fun_l22_n932()
+ fun_l23_n513
+end
+
+def fun_l22_n933()
+ fun_l23_n607
+end
+
+def fun_l22_n934()
+ fun_l23_n488
+end
+
+def fun_l22_n935()
+ fun_l23_n308
+end
+
+def fun_l22_n936()
+ fun_l23_n959
+end
+
+def fun_l22_n937()
+ fun_l23_n373
+end
+
+def fun_l22_n938()
+ fun_l23_n759
+end
+
+def fun_l22_n939()
+ fun_l23_n985
+end
+
+def fun_l22_n940()
+ fun_l23_n971
+end
+
+def fun_l22_n941()
+ fun_l23_n493
+end
+
+def fun_l22_n942()
+ fun_l23_n884
+end
+
+def fun_l22_n943()
+ fun_l23_n636
+end
+
+def fun_l22_n944()
+ fun_l23_n423
+end
+
+def fun_l22_n945()
+ fun_l23_n406
+end
+
+def fun_l22_n946()
+ fun_l23_n92
+end
+
+def fun_l22_n947()
+ fun_l23_n11
+end
+
+def fun_l22_n948()
+ fun_l23_n112
+end
+
+def fun_l22_n949()
+ fun_l23_n489
+end
+
+def fun_l22_n950()
+ fun_l23_n829
+end
+
+def fun_l22_n951()
+ fun_l23_n438
+end
+
+def fun_l22_n952()
+ fun_l23_n622
+end
+
+def fun_l22_n953()
+ fun_l23_n133
+end
+
+def fun_l22_n954()
+ fun_l23_n734
+end
+
+def fun_l22_n955()
+ fun_l23_n745
+end
+
+def fun_l22_n956()
+ fun_l23_n743
+end
+
+def fun_l22_n957()
+ fun_l23_n299
+end
+
+def fun_l22_n958()
+ fun_l23_n952
+end
+
+def fun_l22_n959()
+ fun_l23_n841
+end
+
+def fun_l22_n960()
+ fun_l23_n317
+end
+
+def fun_l22_n961()
+ fun_l23_n506
+end
+
+def fun_l22_n962()
+ fun_l23_n823
+end
+
+def fun_l22_n963()
+ fun_l23_n330
+end
+
+def fun_l22_n964()
+ fun_l23_n899
+end
+
+def fun_l22_n965()
+ fun_l23_n994
+end
+
+def fun_l22_n966()
+ fun_l23_n625
+end
+
+def fun_l22_n967()
+ fun_l23_n74
+end
+
+def fun_l22_n968()
+ fun_l23_n911
+end
+
+def fun_l22_n969()
+ fun_l23_n215
+end
+
+def fun_l22_n970()
+ fun_l23_n845
+end
+
+def fun_l22_n971()
+ fun_l23_n813
+end
+
+def fun_l22_n972()
+ fun_l23_n784
+end
+
+def fun_l22_n973()
+ fun_l23_n727
+end
+
+def fun_l22_n974()
+ fun_l23_n62
+end
+
+def fun_l22_n975()
+ fun_l23_n790
+end
+
+def fun_l22_n976()
+ fun_l23_n918
+end
+
+def fun_l22_n977()
+ fun_l23_n658
+end
+
+def fun_l22_n978()
+ fun_l23_n621
+end
+
+def fun_l22_n979()
+ fun_l23_n731
+end
+
+def fun_l22_n980()
+ fun_l23_n728
+end
+
+def fun_l22_n981()
+ fun_l23_n558
+end
+
+def fun_l22_n982()
+ fun_l23_n501
+end
+
+def fun_l22_n983()
+ fun_l23_n794
+end
+
+def fun_l22_n984()
+ fun_l23_n162
+end
+
+def fun_l22_n985()
+ fun_l23_n700
+end
+
+def fun_l22_n986()
+ fun_l23_n875
+end
+
+def fun_l22_n987()
+ fun_l23_n58
+end
+
+def fun_l22_n988()
+ fun_l23_n55
+end
+
+def fun_l22_n989()
+ fun_l23_n491
+end
+
+def fun_l22_n990()
+ fun_l23_n613
+end
+
+def fun_l22_n991()
+ fun_l23_n587
+end
+
+def fun_l22_n992()
+ fun_l23_n311
+end
+
+def fun_l22_n993()
+ fun_l23_n305
+end
+
+def fun_l22_n994()
+ fun_l23_n348
+end
+
+def fun_l22_n995()
+ fun_l23_n679
+end
+
+def fun_l22_n996()
+ fun_l23_n245
+end
+
+def fun_l22_n997()
+ fun_l23_n419
+end
+
+def fun_l22_n998()
+ fun_l23_n456
+end
+
+def fun_l22_n999()
+ fun_l23_n146
+end
+
+def fun_l23_n0()
+ fun_l24_n409
+end
+
+def fun_l23_n1()
+ fun_l24_n825
+end
+
+def fun_l23_n2()
+ fun_l24_n349
+end
+
+def fun_l23_n3()
+ fun_l24_n560
+end
+
+def fun_l23_n4()
+ fun_l24_n949
+end
+
+def fun_l23_n5()
+ fun_l24_n108
+end
+
+def fun_l23_n6()
+ fun_l24_n149
+end
+
+def fun_l23_n7()
+ fun_l24_n224
+end
+
+def fun_l23_n8()
+ fun_l24_n418
+end
+
+def fun_l23_n9()
+ fun_l24_n819
+end
+
+def fun_l23_n10()
+ fun_l24_n269
+end
+
+def fun_l23_n11()
+ fun_l24_n158
+end
+
+def fun_l23_n12()
+ fun_l24_n487
+end
+
+def fun_l23_n13()
+ fun_l24_n561
+end
+
+def fun_l23_n14()
+ fun_l24_n292
+end
+
+def fun_l23_n15()
+ fun_l24_n996
+end
+
+def fun_l23_n16()
+ fun_l24_n399
+end
+
+def fun_l23_n17()
+ fun_l24_n585
+end
+
+def fun_l23_n18()
+ fun_l24_n691
+end
+
+def fun_l23_n19()
+ fun_l24_n884
+end
+
+def fun_l23_n20()
+ fun_l24_n933
+end
+
+def fun_l23_n21()
+ fun_l24_n139
+end
+
+def fun_l23_n22()
+ fun_l24_n770
+end
+
+def fun_l23_n23()
+ fun_l24_n894
+end
+
+def fun_l23_n24()
+ fun_l24_n418
+end
+
+def fun_l23_n25()
+ fun_l24_n695
+end
+
+def fun_l23_n26()
+ fun_l24_n800
+end
+
+def fun_l23_n27()
+ fun_l24_n580
+end
+
+def fun_l23_n28()
+ fun_l24_n1
+end
+
+def fun_l23_n29()
+ fun_l24_n121
+end
+
+def fun_l23_n30()
+ fun_l24_n757
+end
+
+def fun_l23_n31()
+ fun_l24_n461
+end
+
+def fun_l23_n32()
+ fun_l24_n534
+end
+
+def fun_l23_n33()
+ fun_l24_n795
+end
+
+def fun_l23_n34()
+ fun_l24_n286
+end
+
+def fun_l23_n35()
+ fun_l24_n200
+end
+
+def fun_l23_n36()
+ fun_l24_n513
+end
+
+def fun_l23_n37()
+ fun_l24_n340
+end
+
+def fun_l23_n38()
+ fun_l24_n385
+end
+
+def fun_l23_n39()
+ fun_l24_n432
+end
+
+def fun_l23_n40()
+ fun_l24_n990
+end
+
+def fun_l23_n41()
+ fun_l24_n966
+end
+
+def fun_l23_n42()
+ fun_l24_n237
+end
+
+def fun_l23_n43()
+ fun_l24_n249
+end
+
+def fun_l23_n44()
+ fun_l24_n182
+end
+
+def fun_l23_n45()
+ fun_l24_n718
+end
+
+def fun_l23_n46()
+ fun_l24_n902
+end
+
+def fun_l23_n47()
+ fun_l24_n963
+end
+
+def fun_l23_n48()
+ fun_l24_n337
+end
+
+def fun_l23_n49()
+ fun_l24_n615
+end
+
+def fun_l23_n50()
+ fun_l24_n729
+end
+
+def fun_l23_n51()
+ fun_l24_n240
+end
+
+def fun_l23_n52()
+ fun_l24_n309
+end
+
+def fun_l23_n53()
+ fun_l24_n697
+end
+
+def fun_l23_n54()
+ fun_l24_n260
+end
+
+def fun_l23_n55()
+ fun_l24_n11
+end
+
+def fun_l23_n56()
+ fun_l24_n630
+end
+
+def fun_l23_n57()
+ fun_l24_n983
+end
+
+def fun_l23_n58()
+ fun_l24_n678
+end
+
+def fun_l23_n59()
+ fun_l24_n95
+end
+
+def fun_l23_n60()
+ fun_l24_n63
+end
+
+def fun_l23_n61()
+ fun_l24_n43
+end
+
+def fun_l23_n62()
+ fun_l24_n679
+end
+
+def fun_l23_n63()
+ fun_l24_n671
+end
+
+def fun_l23_n64()
+ fun_l24_n377
+end
+
+def fun_l23_n65()
+ fun_l24_n939
+end
+
+def fun_l23_n66()
+ fun_l24_n3
+end
+
+def fun_l23_n67()
+ fun_l24_n230
+end
+
+def fun_l23_n68()
+ fun_l24_n622
+end
+
+def fun_l23_n69()
+ fun_l24_n339
+end
+
+def fun_l23_n70()
+ fun_l24_n736
+end
+
+def fun_l23_n71()
+ fun_l24_n116
+end
+
+def fun_l23_n72()
+ fun_l24_n373
+end
+
+def fun_l23_n73()
+ fun_l24_n891
+end
+
+def fun_l23_n74()
+ fun_l24_n954
+end
+
+def fun_l23_n75()
+ fun_l24_n967
+end
+
+def fun_l23_n76()
+ fun_l24_n205
+end
+
+def fun_l23_n77()
+ fun_l24_n802
+end
+
+def fun_l23_n78()
+ fun_l24_n480
+end
+
+def fun_l23_n79()
+ fun_l24_n935
+end
+
+def fun_l23_n80()
+ fun_l24_n84
+end
+
+def fun_l23_n81()
+ fun_l24_n40
+end
+
+def fun_l23_n82()
+ fun_l24_n559
+end
+
+def fun_l23_n83()
+ fun_l24_n16
+end
+
+def fun_l23_n84()
+ fun_l24_n494
+end
+
+def fun_l23_n85()
+ fun_l24_n580
+end
+
+def fun_l23_n86()
+ fun_l24_n72
+end
+
+def fun_l23_n87()
+ fun_l24_n33
+end
+
+def fun_l23_n88()
+ fun_l24_n742
+end
+
+def fun_l23_n89()
+ fun_l24_n10
+end
+
+def fun_l23_n90()
+ fun_l24_n33
+end
+
+def fun_l23_n91()
+ fun_l24_n306
+end
+
+def fun_l23_n92()
+ fun_l24_n960
+end
+
+def fun_l23_n93()
+ fun_l24_n573
+end
+
+def fun_l23_n94()
+ fun_l24_n145
+end
+
+def fun_l23_n95()
+ fun_l24_n730
+end
+
+def fun_l23_n96()
+ fun_l24_n703
+end
+
+def fun_l23_n97()
+ fun_l24_n772
+end
+
+def fun_l23_n98()
+ fun_l24_n664
+end
+
+def fun_l23_n99()
+ fun_l24_n582
+end
+
+def fun_l23_n100()
+ fun_l24_n144
+end
+
+def fun_l23_n101()
+ fun_l24_n950
+end
+
+def fun_l23_n102()
+ fun_l24_n449
+end
+
+def fun_l23_n103()
+ fun_l24_n416
+end
+
+def fun_l23_n104()
+ fun_l24_n453
+end
+
+def fun_l23_n105()
+ fun_l24_n159
+end
+
+def fun_l23_n106()
+ fun_l24_n483
+end
+
+def fun_l23_n107()
+ fun_l24_n69
+end
+
+def fun_l23_n108()
+ fun_l24_n142
+end
+
+def fun_l23_n109()
+ fun_l24_n968
+end
+
+def fun_l23_n110()
+ fun_l24_n760
+end
+
+def fun_l23_n111()
+ fun_l24_n600
+end
+
+def fun_l23_n112()
+ fun_l24_n821
+end
+
+def fun_l23_n113()
+ fun_l24_n527
+end
+
+def fun_l23_n114()
+ fun_l24_n661
+end
+
+def fun_l23_n115()
+ fun_l24_n15
+end
+
+def fun_l23_n116()
+ fun_l24_n807
+end
+
+def fun_l23_n117()
+ fun_l24_n143
+end
+
+def fun_l23_n118()
+ fun_l24_n962
+end
+
+def fun_l23_n119()
+ fun_l24_n83
+end
+
+def fun_l23_n120()
+ fun_l24_n755
+end
+
+def fun_l23_n121()
+ fun_l24_n645
+end
+
+def fun_l23_n122()
+ fun_l24_n479
+end
+
+def fun_l23_n123()
+ fun_l24_n639
+end
+
+def fun_l23_n124()
+ fun_l24_n528
+end
+
+def fun_l23_n125()
+ fun_l24_n782
+end
+
+def fun_l23_n126()
+ fun_l24_n200
+end
+
+def fun_l23_n127()
+ fun_l24_n60
+end
+
+def fun_l23_n128()
+ fun_l24_n396
+end
+
+def fun_l23_n129()
+ fun_l24_n600
+end
+
+def fun_l23_n130()
+ fun_l24_n397
+end
+
+def fun_l23_n131()
+ fun_l24_n921
+end
+
+def fun_l23_n132()
+ fun_l24_n979
+end
+
+def fun_l23_n133()
+ fun_l24_n849
+end
+
+def fun_l23_n134()
+ fun_l24_n302
+end
+
+def fun_l23_n135()
+ fun_l24_n77
+end
+
+def fun_l23_n136()
+ fun_l24_n249
+end
+
+def fun_l23_n137()
+ fun_l24_n912
+end
+
+def fun_l23_n138()
+ fun_l24_n661
+end
+
+def fun_l23_n139()
+ fun_l24_n500
+end
+
+def fun_l23_n140()
+ fun_l24_n590
+end
+
+def fun_l23_n141()
+ fun_l24_n942
+end
+
+def fun_l23_n142()
+ fun_l24_n299
+end
+
+def fun_l23_n143()
+ fun_l24_n272
+end
+
+def fun_l23_n144()
+ fun_l24_n747
+end
+
+def fun_l23_n145()
+ fun_l24_n88
+end
+
+def fun_l23_n146()
+ fun_l24_n524
+end
+
+def fun_l23_n147()
+ fun_l24_n931
+end
+
+def fun_l23_n148()
+ fun_l24_n712
+end
+
+def fun_l23_n149()
+ fun_l24_n661
+end
+
+def fun_l23_n150()
+ fun_l24_n426
+end
+
+def fun_l23_n151()
+ fun_l24_n693
+end
+
+def fun_l23_n152()
+ fun_l24_n585
+end
+
+def fun_l23_n153()
+ fun_l24_n451
+end
+
+def fun_l23_n154()
+ fun_l24_n333
+end
+
+def fun_l23_n155()
+ fun_l24_n792
+end
+
+def fun_l23_n156()
+ fun_l24_n840
+end
+
+def fun_l23_n157()
+ fun_l24_n643
+end
+
+def fun_l23_n158()
+ fun_l24_n120
+end
+
+def fun_l23_n159()
+ fun_l24_n86
+end
+
+def fun_l23_n160()
+ fun_l24_n352
+end
+
+def fun_l23_n161()
+ fun_l24_n761
+end
+
+def fun_l23_n162()
+ fun_l24_n412
+end
+
+def fun_l23_n163()
+ fun_l24_n156
+end
+
+def fun_l23_n164()
+ fun_l24_n909
+end
+
+def fun_l23_n165()
+ fun_l24_n394
+end
+
+def fun_l23_n166()
+ fun_l24_n973
+end
+
+def fun_l23_n167()
+ fun_l24_n31
+end
+
+def fun_l23_n168()
+ fun_l24_n545
+end
+
+def fun_l23_n169()
+ fun_l24_n180
+end
+
+def fun_l23_n170()
+ fun_l24_n446
+end
+
+def fun_l23_n171()
+ fun_l24_n965
+end
+
+def fun_l23_n172()
+ fun_l24_n102
+end
+
+def fun_l23_n173()
+ fun_l24_n161
+end
+
+def fun_l23_n174()
+ fun_l24_n571
+end
+
+def fun_l23_n175()
+ fun_l24_n451
+end
+
+def fun_l23_n176()
+ fun_l24_n947
+end
+
+def fun_l23_n177()
+ fun_l24_n906
+end
+
+def fun_l23_n178()
+ fun_l24_n356
+end
+
+def fun_l23_n179()
+ fun_l24_n84
+end
+
+def fun_l23_n180()
+ fun_l24_n798
+end
+
+def fun_l23_n181()
+ fun_l24_n500
+end
+
+def fun_l23_n182()
+ fun_l24_n419
+end
+
+def fun_l23_n183()
+ fun_l24_n797
+end
+
+def fun_l23_n184()
+ fun_l24_n459
+end
+
+def fun_l23_n185()
+ fun_l24_n795
+end
+
+def fun_l23_n186()
+ fun_l24_n478
+end
+
+def fun_l23_n187()
+ fun_l24_n742
+end
+
+def fun_l23_n188()
+ fun_l24_n262
+end
+
+def fun_l23_n189()
+ fun_l24_n37
+end
+
+def fun_l23_n190()
+ fun_l24_n340
+end
+
+def fun_l23_n191()
+ fun_l24_n314
+end
+
+def fun_l23_n192()
+ fun_l24_n595
+end
+
+def fun_l23_n193()
+ fun_l24_n769
+end
+
+def fun_l23_n194()
+ fun_l24_n637
+end
+
+def fun_l23_n195()
+ fun_l24_n377
+end
+
+def fun_l23_n196()
+ fun_l24_n77
+end
+
+def fun_l23_n197()
+ fun_l24_n486
+end
+
+def fun_l23_n198()
+ fun_l24_n992
+end
+
+def fun_l23_n199()
+ fun_l24_n546
+end
+
+def fun_l23_n200()
+ fun_l24_n386
+end
+
+def fun_l23_n201()
+ fun_l24_n301
+end
+
+def fun_l23_n202()
+ fun_l24_n867
+end
+
+def fun_l23_n203()
+ fun_l24_n948
+end
+
+def fun_l23_n204()
+ fun_l24_n163
+end
+
+def fun_l23_n205()
+ fun_l24_n618
+end
+
+def fun_l23_n206()
+ fun_l24_n560
+end
+
+def fun_l23_n207()
+ fun_l24_n147
+end
+
+def fun_l23_n208()
+ fun_l24_n474
+end
+
+def fun_l23_n209()
+ fun_l24_n99
+end
+
+def fun_l23_n210()
+ fun_l24_n994
+end
+
+def fun_l23_n211()
+ fun_l24_n594
+end
+
+def fun_l23_n212()
+ fun_l24_n101
+end
+
+def fun_l23_n213()
+ fun_l24_n510
+end
+
+def fun_l23_n214()
+ fun_l24_n965
+end
+
+def fun_l23_n215()
+ fun_l24_n460
+end
+
+def fun_l23_n216()
+ fun_l24_n455
+end
+
+def fun_l23_n217()
+ fun_l24_n783
+end
+
+def fun_l23_n218()
+ fun_l24_n466
+end
+
+def fun_l23_n219()
+ fun_l24_n60
+end
+
+def fun_l23_n220()
+ fun_l24_n486
+end
+
+def fun_l23_n221()
+ fun_l24_n819
+end
+
+def fun_l23_n222()
+ fun_l24_n909
+end
+
+def fun_l23_n223()
+ fun_l24_n446
+end
+
+def fun_l23_n224()
+ fun_l24_n80
+end
+
+def fun_l23_n225()
+ fun_l24_n276
+end
+
+def fun_l23_n226()
+ fun_l24_n638
+end
+
+def fun_l23_n227()
+ fun_l24_n200
+end
+
+def fun_l23_n228()
+ fun_l24_n665
+end
+
+def fun_l23_n229()
+ fun_l24_n814
+end
+
+def fun_l23_n230()
+ fun_l24_n214
+end
+
+def fun_l23_n231()
+ fun_l24_n719
+end
+
+def fun_l23_n232()
+ fun_l24_n62
+end
+
+def fun_l23_n233()
+ fun_l24_n523
+end
+
+def fun_l23_n234()
+ fun_l24_n470
+end
+
+def fun_l23_n235()
+ fun_l24_n338
+end
+
+def fun_l23_n236()
+ fun_l24_n929
+end
+
+def fun_l23_n237()
+ fun_l24_n982
+end
+
+def fun_l23_n238()
+ fun_l24_n391
+end
+
+def fun_l23_n239()
+ fun_l24_n631
+end
+
+def fun_l23_n240()
+ fun_l24_n473
+end
+
+def fun_l23_n241()
+ fun_l24_n25
+end
+
+def fun_l23_n242()
+ fun_l24_n720
+end
+
+def fun_l23_n243()
+ fun_l24_n139
+end
+
+def fun_l23_n244()
+ fun_l24_n859
+end
+
+def fun_l23_n245()
+ fun_l24_n154
+end
+
+def fun_l23_n246()
+ fun_l24_n272
+end
+
+def fun_l23_n247()
+ fun_l24_n248
+end
+
+def fun_l23_n248()
+ fun_l24_n719
+end
+
+def fun_l23_n249()
+ fun_l24_n436
+end
+
+def fun_l23_n250()
+ fun_l24_n935
+end
+
+def fun_l23_n251()
+ fun_l24_n513
+end
+
+def fun_l23_n252()
+ fun_l24_n0
+end
+
+def fun_l23_n253()
+ fun_l24_n104
+end
+
+def fun_l23_n254()
+ fun_l24_n551
+end
+
+def fun_l23_n255()
+ fun_l24_n317
+end
+
+def fun_l23_n256()
+ fun_l24_n225
+end
+
+def fun_l23_n257()
+ fun_l24_n685
+end
+
+def fun_l23_n258()
+ fun_l24_n647
+end
+
+def fun_l23_n259()
+ fun_l24_n489
+end
+
+def fun_l23_n260()
+ fun_l24_n252
+end
+
+def fun_l23_n261()
+ fun_l24_n333
+end
+
+def fun_l23_n262()
+ fun_l24_n179
+end
+
+def fun_l23_n263()
+ fun_l24_n68
+end
+
+def fun_l23_n264()
+ fun_l24_n119
+end
+
+def fun_l23_n265()
+ fun_l24_n840
+end
+
+def fun_l23_n266()
+ fun_l24_n683
+end
+
+def fun_l23_n267()
+ fun_l24_n897
+end
+
+def fun_l23_n268()
+ fun_l24_n323
+end
+
+def fun_l23_n269()
+ fun_l24_n667
+end
+
+def fun_l23_n270()
+ fun_l24_n538
+end
+
+def fun_l23_n271()
+ fun_l24_n597
+end
+
+def fun_l23_n272()
+ fun_l24_n582
+end
+
+def fun_l23_n273()
+ fun_l24_n19
+end
+
+def fun_l23_n274()
+ fun_l24_n331
+end
+
+def fun_l23_n275()
+ fun_l24_n528
+end
+
+def fun_l23_n276()
+ fun_l24_n766
+end
+
+def fun_l23_n277()
+ fun_l24_n742
+end
+
+def fun_l23_n278()
+ fun_l24_n318
+end
+
+def fun_l23_n279()
+ fun_l24_n143
+end
+
+def fun_l23_n280()
+ fun_l24_n910
+end
+
+def fun_l23_n281()
+ fun_l24_n953
+end
+
+def fun_l23_n282()
+ fun_l24_n655
+end
+
+def fun_l23_n283()
+ fun_l24_n804
+end
+
+def fun_l23_n284()
+ fun_l24_n539
+end
+
+def fun_l23_n285()
+ fun_l24_n697
+end
+
+def fun_l23_n286()
+ fun_l24_n258
+end
+
+def fun_l23_n287()
+ fun_l24_n194
+end
+
+def fun_l23_n288()
+ fun_l24_n420
+end
+
+def fun_l23_n289()
+ fun_l24_n253
+end
+
+def fun_l23_n290()
+ fun_l24_n858
+end
+
+def fun_l23_n291()
+ fun_l24_n831
+end
+
+def fun_l23_n292()
+ fun_l24_n798
+end
+
+def fun_l23_n293()
+ fun_l24_n662
+end
+
+def fun_l23_n294()
+ fun_l24_n900
+end
+
+def fun_l23_n295()
+ fun_l24_n408
+end
+
+def fun_l23_n296()
+ fun_l24_n151
+end
+
+def fun_l23_n297()
+ fun_l24_n660
+end
+
+def fun_l23_n298()
+ fun_l24_n233
+end
+
+def fun_l23_n299()
+ fun_l24_n412
+end
+
+def fun_l23_n300()
+ fun_l24_n347
+end
+
+def fun_l23_n301()
+ fun_l24_n360
+end
+
+def fun_l23_n302()
+ fun_l24_n150
+end
+
+def fun_l23_n303()
+ fun_l24_n995
+end
+
+def fun_l23_n304()
+ fun_l24_n623
+end
+
+def fun_l23_n305()
+ fun_l24_n404
+end
+
+def fun_l23_n306()
+ fun_l24_n898
+end
+
+def fun_l23_n307()
+ fun_l24_n736
+end
+
+def fun_l23_n308()
+ fun_l24_n301
+end
+
+def fun_l23_n309()
+ fun_l24_n929
+end
+
+def fun_l23_n310()
+ fun_l24_n795
+end
+
+def fun_l23_n311()
+ fun_l24_n434
+end
+
+def fun_l23_n312()
+ fun_l24_n796
+end
+
+def fun_l23_n313()
+ fun_l24_n71
+end
+
+def fun_l23_n314()
+ fun_l24_n294
+end
+
+def fun_l23_n315()
+ fun_l24_n540
+end
+
+def fun_l23_n316()
+ fun_l24_n137
+end
+
+def fun_l23_n317()
+ fun_l24_n523
+end
+
+def fun_l23_n318()
+ fun_l24_n472
+end
+
+def fun_l23_n319()
+ fun_l24_n141
+end
+
+def fun_l23_n320()
+ fun_l24_n552
+end
+
+def fun_l23_n321()
+ fun_l24_n587
+end
+
+def fun_l23_n322()
+ fun_l24_n308
+end
+
+def fun_l23_n323()
+ fun_l24_n929
+end
+
+def fun_l23_n324()
+ fun_l24_n944
+end
+
+def fun_l23_n325()
+ fun_l24_n472
+end
+
+def fun_l23_n326()
+ fun_l24_n450
+end
+
+def fun_l23_n327()
+ fun_l24_n376
+end
+
+def fun_l23_n328()
+ fun_l24_n70
+end
+
+def fun_l23_n329()
+ fun_l24_n486
+end
+
+def fun_l23_n330()
+ fun_l24_n391
+end
+
+def fun_l23_n331()
+ fun_l24_n133
+end
+
+def fun_l23_n332()
+ fun_l24_n31
+end
+
+def fun_l23_n333()
+ fun_l24_n462
+end
+
+def fun_l23_n334()
+ fun_l24_n521
+end
+
+def fun_l23_n335()
+ fun_l24_n706
+end
+
+def fun_l23_n336()
+ fun_l24_n511
+end
+
+def fun_l23_n337()
+ fun_l24_n932
+end
+
+def fun_l23_n338()
+ fun_l24_n133
+end
+
+def fun_l23_n339()
+ fun_l24_n296
+end
+
+def fun_l23_n340()
+ fun_l24_n591
+end
+
+def fun_l23_n341()
+ fun_l24_n581
+end
+
+def fun_l23_n342()
+ fun_l24_n41
+end
+
+def fun_l23_n343()
+ fun_l24_n256
+end
+
+def fun_l23_n344()
+ fun_l24_n772
+end
+
+def fun_l23_n345()
+ fun_l24_n642
+end
+
+def fun_l23_n346()
+ fun_l24_n110
+end
+
+def fun_l23_n347()
+ fun_l24_n987
+end
+
+def fun_l23_n348()
+ fun_l24_n33
+end
+
+def fun_l23_n349()
+ fun_l24_n913
+end
+
+def fun_l23_n350()
+ fun_l24_n581
+end
+
+def fun_l23_n351()
+ fun_l24_n594
+end
+
+def fun_l23_n352()
+ fun_l24_n484
+end
+
+def fun_l23_n353()
+ fun_l24_n969
+end
+
+def fun_l23_n354()
+ fun_l24_n966
+end
+
+def fun_l23_n355()
+ fun_l24_n122
+end
+
+def fun_l23_n356()
+ fun_l24_n907
+end
+
+def fun_l23_n357()
+ fun_l24_n980
+end
+
+def fun_l23_n358()
+ fun_l24_n557
+end
+
+def fun_l23_n359()
+ fun_l24_n216
+end
+
+def fun_l23_n360()
+ fun_l24_n936
+end
+
+def fun_l23_n361()
+ fun_l24_n476
+end
+
+def fun_l23_n362()
+ fun_l24_n154
+end
+
+def fun_l23_n363()
+ fun_l24_n785
+end
+
+def fun_l23_n364()
+ fun_l24_n967
+end
+
+def fun_l23_n365()
+ fun_l24_n697
+end
+
+def fun_l23_n366()
+ fun_l24_n610
+end
+
+def fun_l23_n367()
+ fun_l24_n415
+end
+
+def fun_l23_n368()
+ fun_l24_n432
+end
+
+def fun_l23_n369()
+ fun_l24_n505
+end
+
+def fun_l23_n370()
+ fun_l24_n581
+end
+
+def fun_l23_n371()
+ fun_l24_n350
+end
+
+def fun_l23_n372()
+ fun_l24_n202
+end
+
+def fun_l23_n373()
+ fun_l24_n757
+end
+
+def fun_l23_n374()
+ fun_l24_n336
+end
+
+def fun_l23_n375()
+ fun_l24_n323
+end
+
+def fun_l23_n376()
+ fun_l24_n670
+end
+
+def fun_l23_n377()
+ fun_l24_n535
+end
+
+def fun_l23_n378()
+ fun_l24_n901
+end
+
+def fun_l23_n379()
+ fun_l24_n218
+end
+
+def fun_l23_n380()
+ fun_l24_n733
+end
+
+def fun_l23_n381()
+ fun_l24_n820
+end
+
+def fun_l23_n382()
+ fun_l24_n229
+end
+
+def fun_l23_n383()
+ fun_l24_n49
+end
+
+def fun_l23_n384()
+ fun_l24_n469
+end
+
+def fun_l23_n385()
+ fun_l24_n904
+end
+
+def fun_l23_n386()
+ fun_l24_n652
+end
+
+def fun_l23_n387()
+ fun_l24_n863
+end
+
+def fun_l23_n388()
+ fun_l24_n356
+end
+
+def fun_l23_n389()
+ fun_l24_n558
+end
+
+def fun_l23_n390()
+ fun_l24_n263
+end
+
+def fun_l23_n391()
+ fun_l24_n593
+end
+
+def fun_l23_n392()
+ fun_l24_n882
+end
+
+def fun_l23_n393()
+ fun_l24_n128
+end
+
+def fun_l23_n394()
+ fun_l24_n855
+end
+
+def fun_l23_n395()
+ fun_l24_n269
+end
+
+def fun_l23_n396()
+ fun_l24_n858
+end
+
+def fun_l23_n397()
+ fun_l24_n34
+end
+
+def fun_l23_n398()
+ fun_l24_n447
+end
+
+def fun_l23_n399()
+ fun_l24_n323
+end
+
+def fun_l23_n400()
+ fun_l24_n624
+end
+
+def fun_l23_n401()
+ fun_l24_n397
+end
+
+def fun_l23_n402()
+ fun_l24_n755
+end
+
+def fun_l23_n403()
+ fun_l24_n477
+end
+
+def fun_l23_n404()
+ fun_l24_n396
+end
+
+def fun_l23_n405()
+ fun_l24_n177
+end
+
+def fun_l23_n406()
+ fun_l24_n964
+end
+
+def fun_l23_n407()
+ fun_l24_n640
+end
+
+def fun_l23_n408()
+ fun_l24_n82
+end
+
+def fun_l23_n409()
+ fun_l24_n224
+end
+
+def fun_l23_n410()
+ fun_l24_n750
+end
+
+def fun_l23_n411()
+ fun_l24_n301
+end
+
+def fun_l23_n412()
+ fun_l24_n32
+end
+
+def fun_l23_n413()
+ fun_l24_n839
+end
+
+def fun_l23_n414()
+ fun_l24_n724
+end
+
+def fun_l23_n415()
+ fun_l24_n663
+end
+
+def fun_l23_n416()
+ fun_l24_n682
+end
+
+def fun_l23_n417()
+ fun_l24_n409
+end
+
+def fun_l23_n418()
+ fun_l24_n769
+end
+
+def fun_l23_n419()
+ fun_l24_n538
+end
+
+def fun_l23_n420()
+ fun_l24_n558
+end
+
+def fun_l23_n421()
+ fun_l24_n524
+end
+
+def fun_l23_n422()
+ fun_l24_n464
+end
+
+def fun_l23_n423()
+ fun_l24_n889
+end
+
+def fun_l23_n424()
+ fun_l24_n656
+end
+
+def fun_l23_n425()
+ fun_l24_n805
+end
+
+def fun_l23_n426()
+ fun_l24_n428
+end
+
+def fun_l23_n427()
+ fun_l24_n793
+end
+
+def fun_l23_n428()
+ fun_l24_n192
+end
+
+def fun_l23_n429()
+ fun_l24_n443
+end
+
+def fun_l23_n430()
+ fun_l24_n481
+end
+
+def fun_l23_n431()
+ fun_l24_n203
+end
+
+def fun_l23_n432()
+ fun_l24_n607
+end
+
+def fun_l23_n433()
+ fun_l24_n871
+end
+
+def fun_l23_n434()
+ fun_l24_n436
+end
+
+def fun_l23_n435()
+ fun_l24_n376
+end
+
+def fun_l23_n436()
+ fun_l24_n936
+end
+
+def fun_l23_n437()
+ fun_l24_n153
+end
+
+def fun_l23_n438()
+ fun_l24_n994
+end
+
+def fun_l23_n439()
+ fun_l24_n777
+end
+
+def fun_l23_n440()
+ fun_l24_n341
+end
+
+def fun_l23_n441()
+ fun_l24_n50
+end
+
+def fun_l23_n442()
+ fun_l24_n1
+end
+
+def fun_l23_n443()
+ fun_l24_n320
+end
+
+def fun_l23_n444()
+ fun_l24_n116
+end
+
+def fun_l23_n445()
+ fun_l24_n202
+end
+
+def fun_l23_n446()
+ fun_l24_n433
+end
+
+def fun_l23_n447()
+ fun_l24_n151
+end
+
+def fun_l23_n448()
+ fun_l24_n581
+end
+
+def fun_l23_n449()
+ fun_l24_n498
+end
+
+def fun_l23_n450()
+ fun_l24_n575
+end
+
+def fun_l23_n451()
+ fun_l24_n161
+end
+
+def fun_l23_n452()
+ fun_l24_n78
+end
+
+def fun_l23_n453()
+ fun_l24_n863
+end
+
+def fun_l23_n454()
+ fun_l24_n269
+end
+
+def fun_l23_n455()
+ fun_l24_n956
+end
+
+def fun_l23_n456()
+ fun_l24_n485
+end
+
+def fun_l23_n457()
+ fun_l24_n106
+end
+
+def fun_l23_n458()
+ fun_l24_n641
+end
+
+def fun_l23_n459()
+ fun_l24_n434
+end
+
+def fun_l23_n460()
+ fun_l24_n308
+end
+
+def fun_l23_n461()
+ fun_l24_n192
+end
+
+def fun_l23_n462()
+ fun_l24_n401
+end
+
+def fun_l23_n463()
+ fun_l24_n62
+end
+
+def fun_l23_n464()
+ fun_l24_n38
+end
+
+def fun_l23_n465()
+ fun_l24_n732
+end
+
+def fun_l23_n466()
+ fun_l24_n143
+end
+
+def fun_l23_n467()
+ fun_l24_n799
+end
+
+def fun_l23_n468()
+ fun_l24_n486
+end
+
+def fun_l23_n469()
+ fun_l24_n161
+end
+
+def fun_l23_n470()
+ fun_l24_n838
+end
+
+def fun_l23_n471()
+ fun_l24_n526
+end
+
+def fun_l23_n472()
+ fun_l24_n421
+end
+
+def fun_l23_n473()
+ fun_l24_n967
+end
+
+def fun_l23_n474()
+ fun_l24_n822
+end
+
+def fun_l23_n475()
+ fun_l24_n939
+end
+
+def fun_l23_n476()
+ fun_l24_n36
+end
+
+def fun_l23_n477()
+ fun_l24_n539
+end
+
+def fun_l23_n478()
+ fun_l24_n759
+end
+
+def fun_l23_n479()
+ fun_l24_n979
+end
+
+def fun_l23_n480()
+ fun_l24_n685
+end
+
+def fun_l23_n481()
+ fun_l24_n548
+end
+
+def fun_l23_n482()
+ fun_l24_n348
+end
+
+def fun_l23_n483()
+ fun_l24_n922
+end
+
+def fun_l23_n484()
+ fun_l24_n185
+end
+
+def fun_l23_n485()
+ fun_l24_n138
+end
+
+def fun_l23_n486()
+ fun_l24_n678
+end
+
+def fun_l23_n487()
+ fun_l24_n44
+end
+
+def fun_l23_n488()
+ fun_l24_n820
+end
+
+def fun_l23_n489()
+ fun_l24_n447
+end
+
+def fun_l23_n490()
+ fun_l24_n455
+end
+
+def fun_l23_n491()
+ fun_l24_n145
+end
+
+def fun_l23_n492()
+ fun_l24_n441
+end
+
+def fun_l23_n493()
+ fun_l24_n354
+end
+
+def fun_l23_n494()
+ fun_l24_n324
+end
+
+def fun_l23_n495()
+ fun_l24_n231
+end
+
+def fun_l23_n496()
+ fun_l24_n775
+end
+
+def fun_l23_n497()
+ fun_l24_n815
+end
+
+def fun_l23_n498()
+ fun_l24_n491
+end
+
+def fun_l23_n499()
+ fun_l24_n437
+end
+
+def fun_l23_n500()
+ fun_l24_n112
+end
+
+def fun_l23_n501()
+ fun_l24_n174
+end
+
+def fun_l23_n502()
+ fun_l24_n683
+end
+
+def fun_l23_n503()
+ fun_l24_n243
+end
+
+def fun_l23_n504()
+ fun_l24_n236
+end
+
+def fun_l23_n505()
+ fun_l24_n106
+end
+
+def fun_l23_n506()
+ fun_l24_n781
+end
+
+def fun_l23_n507()
+ fun_l24_n427
+end
+
+def fun_l23_n508()
+ fun_l24_n410
+end
+
+def fun_l23_n509()
+ fun_l24_n903
+end
+
+def fun_l23_n510()
+ fun_l24_n40
+end
+
+def fun_l23_n511()
+ fun_l24_n559
+end
+
+def fun_l23_n512()
+ fun_l24_n152
+end
+
+def fun_l23_n513()
+ fun_l24_n175
+end
+
+def fun_l23_n514()
+ fun_l24_n305
+end
+
+def fun_l23_n515()
+ fun_l24_n814
+end
+
+def fun_l23_n516()
+ fun_l24_n676
+end
+
+def fun_l23_n517()
+ fun_l24_n448
+end
+
+def fun_l23_n518()
+ fun_l24_n573
+end
+
+def fun_l23_n519()
+ fun_l24_n66
+end
+
+def fun_l23_n520()
+ fun_l24_n893
+end
+
+def fun_l23_n521()
+ fun_l24_n460
+end
+
+def fun_l23_n522()
+ fun_l24_n238
+end
+
+def fun_l23_n523()
+ fun_l24_n200
+end
+
+def fun_l23_n524()
+ fun_l24_n61
+end
+
+def fun_l23_n525()
+ fun_l24_n365
+end
+
+def fun_l23_n526()
+ fun_l24_n360
+end
+
+def fun_l23_n527()
+ fun_l24_n17
+end
+
+def fun_l23_n528()
+ fun_l24_n594
+end
+
+def fun_l23_n529()
+ fun_l24_n494
+end
+
+def fun_l23_n530()
+ fun_l24_n188
+end
+
+def fun_l23_n531()
+ fun_l24_n288
+end
+
+def fun_l23_n532()
+ fun_l24_n348
+end
+
+def fun_l23_n533()
+ fun_l24_n254
+end
+
+def fun_l23_n534()
+ fun_l24_n457
+end
+
+def fun_l23_n535()
+ fun_l24_n742
+end
+
+def fun_l23_n536()
+ fun_l24_n28
+end
+
+def fun_l23_n537()
+ fun_l24_n856
+end
+
+def fun_l23_n538()
+ fun_l24_n345
+end
+
+def fun_l23_n539()
+ fun_l24_n455
+end
+
+def fun_l23_n540()
+ fun_l24_n39
+end
+
+def fun_l23_n541()
+ fun_l24_n667
+end
+
+def fun_l23_n542()
+ fun_l24_n555
+end
+
+def fun_l23_n543()
+ fun_l24_n983
+end
+
+def fun_l23_n544()
+ fun_l24_n71
+end
+
+def fun_l23_n545()
+ fun_l24_n733
+end
+
+def fun_l23_n546()
+ fun_l24_n889
+end
+
+def fun_l23_n547()
+ fun_l24_n152
+end
+
+def fun_l23_n548()
+ fun_l24_n998
+end
+
+def fun_l23_n549()
+ fun_l24_n519
+end
+
+def fun_l23_n550()
+ fun_l24_n723
+end
+
+def fun_l23_n551()
+ fun_l24_n931
+end
+
+def fun_l23_n552()
+ fun_l24_n866
+end
+
+def fun_l23_n553()
+ fun_l24_n598
+end
+
+def fun_l23_n554()
+ fun_l24_n522
+end
+
+def fun_l23_n555()
+ fun_l24_n317
+end
+
+def fun_l23_n556()
+ fun_l24_n712
+end
+
+def fun_l23_n557()
+ fun_l24_n381
+end
+
+def fun_l23_n558()
+ fun_l24_n167
+end
+
+def fun_l23_n559()
+ fun_l24_n136
+end
+
+def fun_l23_n560()
+ fun_l24_n136
+end
+
+def fun_l23_n561()
+ fun_l24_n422
+end
+
+def fun_l23_n562()
+ fun_l24_n75
+end
+
+def fun_l23_n563()
+ fun_l24_n609
+end
+
+def fun_l23_n564()
+ fun_l24_n324
+end
+
+def fun_l23_n565()
+ fun_l24_n49
+end
+
+def fun_l23_n566()
+ fun_l24_n312
+end
+
+def fun_l23_n567()
+ fun_l24_n514
+end
+
+def fun_l23_n568()
+ fun_l24_n773
+end
+
+def fun_l23_n569()
+ fun_l24_n386
+end
+
+def fun_l23_n570()
+ fun_l24_n688
+end
+
+def fun_l23_n571()
+ fun_l24_n857
+end
+
+def fun_l23_n572()
+ fun_l24_n821
+end
+
+def fun_l23_n573()
+ fun_l24_n986
+end
+
+def fun_l23_n574()
+ fun_l24_n785
+end
+
+def fun_l23_n575()
+ fun_l24_n226
+end
+
+def fun_l23_n576()
+ fun_l24_n527
+end
+
+def fun_l23_n577()
+ fun_l24_n703
+end
+
+def fun_l23_n578()
+ fun_l24_n908
+end
+
+def fun_l23_n579()
+ fun_l24_n794
+end
+
+def fun_l23_n580()
+ fun_l24_n521
+end
+
+def fun_l23_n581()
+ fun_l24_n519
+end
+
+def fun_l23_n582()
+ fun_l24_n474
+end
+
+def fun_l23_n583()
+ fun_l24_n980
+end
+
+def fun_l23_n584()
+ fun_l24_n564
+end
+
+def fun_l23_n585()
+ fun_l24_n599
+end
+
+def fun_l23_n586()
+ fun_l24_n730
+end
+
+def fun_l23_n587()
+ fun_l24_n132
+end
+
+def fun_l23_n588()
+ fun_l24_n54
+end
+
+def fun_l23_n589()
+ fun_l24_n725
+end
+
+def fun_l23_n590()
+ fun_l24_n24
+end
+
+def fun_l23_n591()
+ fun_l24_n879
+end
+
+def fun_l23_n592()
+ fun_l24_n857
+end
+
+def fun_l23_n593()
+ fun_l24_n468
+end
+
+def fun_l23_n594()
+ fun_l24_n299
+end
+
+def fun_l23_n595()
+ fun_l24_n62
+end
+
+def fun_l23_n596()
+ fun_l24_n415
+end
+
+def fun_l23_n597()
+ fun_l24_n440
+end
+
+def fun_l23_n598()
+ fun_l24_n550
+end
+
+def fun_l23_n599()
+ fun_l24_n636
+end
+
+def fun_l23_n600()
+ fun_l24_n905
+end
+
+def fun_l23_n601()
+ fun_l24_n147
+end
+
+def fun_l23_n602()
+ fun_l24_n882
+end
+
+def fun_l23_n603()
+ fun_l24_n410
+end
+
+def fun_l23_n604()
+ fun_l24_n963
+end
+
+def fun_l23_n605()
+ fun_l24_n749
+end
+
+def fun_l23_n606()
+ fun_l24_n318
+end
+
+def fun_l23_n607()
+ fun_l24_n177
+end
+
+def fun_l23_n608()
+ fun_l24_n138
+end
+
+def fun_l23_n609()
+ fun_l24_n142
+end
+
+def fun_l23_n610()
+ fun_l24_n671
+end
+
+def fun_l23_n611()
+ fun_l24_n702
+end
+
+def fun_l23_n612()
+ fun_l24_n715
+end
+
+def fun_l23_n613()
+ fun_l24_n356
+end
+
+def fun_l23_n614()
+ fun_l24_n719
+end
+
+def fun_l23_n615()
+ fun_l24_n496
+end
+
+def fun_l23_n616()
+ fun_l24_n131
+end
+
+def fun_l23_n617()
+ fun_l24_n614
+end
+
+def fun_l23_n618()
+ fun_l24_n508
+end
+
+def fun_l23_n619()
+ fun_l24_n848
+end
+
+def fun_l23_n620()
+ fun_l24_n119
+end
+
+def fun_l23_n621()
+ fun_l24_n372
+end
+
+def fun_l23_n622()
+ fun_l24_n672
+end
+
+def fun_l23_n623()
+ fun_l24_n248
+end
+
+def fun_l23_n624()
+ fun_l24_n425
+end
+
+def fun_l23_n625()
+ fun_l24_n875
+end
+
+def fun_l23_n626()
+ fun_l24_n371
+end
+
+def fun_l23_n627()
+ fun_l24_n362
+end
+
+def fun_l23_n628()
+ fun_l24_n139
+end
+
+def fun_l23_n629()
+ fun_l24_n540
+end
+
+def fun_l23_n630()
+ fun_l24_n979
+end
+
+def fun_l23_n631()
+ fun_l24_n243
+end
+
+def fun_l23_n632()
+ fun_l24_n799
+end
+
+def fun_l23_n633()
+ fun_l24_n711
+end
+
+def fun_l23_n634()
+ fun_l24_n834
+end
+
+def fun_l23_n635()
+ fun_l24_n173
+end
+
+def fun_l23_n636()
+ fun_l24_n465
+end
+
+def fun_l23_n637()
+ fun_l24_n986
+end
+
+def fun_l23_n638()
+ fun_l24_n24
+end
+
+def fun_l23_n639()
+ fun_l24_n925
+end
+
+def fun_l23_n640()
+ fun_l24_n829
+end
+
+def fun_l23_n641()
+ fun_l24_n361
+end
+
+def fun_l23_n642()
+ fun_l24_n884
+end
+
+def fun_l23_n643()
+ fun_l24_n132
+end
+
+def fun_l23_n644()
+ fun_l24_n277
+end
+
+def fun_l23_n645()
+ fun_l24_n616
+end
+
+def fun_l23_n646()
+ fun_l24_n122
+end
+
+def fun_l23_n647()
+ fun_l24_n194
+end
+
+def fun_l23_n648()
+ fun_l24_n678
+end
+
+def fun_l23_n649()
+ fun_l24_n119
+end
+
+def fun_l23_n650()
+ fun_l24_n430
+end
+
+def fun_l23_n651()
+ fun_l24_n46
+end
+
+def fun_l23_n652()
+ fun_l24_n653
+end
+
+def fun_l23_n653()
+ fun_l24_n279
+end
+
+def fun_l23_n654()
+ fun_l24_n943
+end
+
+def fun_l23_n655()
+ fun_l24_n480
+end
+
+def fun_l23_n656()
+ fun_l24_n81
+end
+
+def fun_l23_n657()
+ fun_l24_n782
+end
+
+def fun_l23_n658()
+ fun_l24_n986
+end
+
+def fun_l23_n659()
+ fun_l24_n951
+end
+
+def fun_l23_n660()
+ fun_l24_n918
+end
+
+def fun_l23_n661()
+ fun_l24_n524
+end
+
+def fun_l23_n662()
+ fun_l24_n949
+end
+
+def fun_l23_n663()
+ fun_l24_n688
+end
+
+def fun_l23_n664()
+ fun_l24_n606
+end
+
+def fun_l23_n665()
+ fun_l24_n358
+end
+
+def fun_l23_n666()
+ fun_l24_n948
+end
+
+def fun_l23_n667()
+ fun_l24_n254
+end
+
+def fun_l23_n668()
+ fun_l24_n410
+end
+
+def fun_l23_n669()
+ fun_l24_n612
+end
+
+def fun_l23_n670()
+ fun_l24_n693
+end
+
+def fun_l23_n671()
+ fun_l24_n454
+end
+
+def fun_l23_n672()
+ fun_l24_n182
+end
+
+def fun_l23_n673()
+ fun_l24_n556
+end
+
+def fun_l23_n674()
+ fun_l24_n994
+end
+
+def fun_l23_n675()
+ fun_l24_n927
+end
+
+def fun_l23_n676()
+ fun_l24_n624
+end
+
+def fun_l23_n677()
+ fun_l24_n149
+end
+
+def fun_l23_n678()
+ fun_l24_n561
+end
+
+def fun_l23_n679()
+ fun_l24_n250
+end
+
+def fun_l23_n680()
+ fun_l24_n69
+end
+
+def fun_l23_n681()
+ fun_l24_n599
+end
+
+def fun_l23_n682()
+ fun_l24_n145
+end
+
+def fun_l23_n683()
+ fun_l24_n785
+end
+
+def fun_l23_n684()
+ fun_l24_n181
+end
+
+def fun_l23_n685()
+ fun_l24_n646
+end
+
+def fun_l23_n686()
+ fun_l24_n109
+end
+
+def fun_l23_n687()
+ fun_l24_n316
+end
+
+def fun_l23_n688()
+ fun_l24_n816
+end
+
+def fun_l23_n689()
+ fun_l24_n302
+end
+
+def fun_l23_n690()
+ fun_l24_n976
+end
+
+def fun_l23_n691()
+ fun_l24_n508
+end
+
+def fun_l23_n692()
+ fun_l24_n158
+end
+
+def fun_l23_n693()
+ fun_l24_n110
+end
+
+def fun_l23_n694()
+ fun_l24_n581
+end
+
+def fun_l23_n695()
+ fun_l24_n375
+end
+
+def fun_l23_n696()
+ fun_l24_n121
+end
+
+def fun_l23_n697()
+ fun_l24_n920
+end
+
+def fun_l23_n698()
+ fun_l24_n827
+end
+
+def fun_l23_n699()
+ fun_l24_n757
+end
+
+def fun_l23_n700()
+ fun_l24_n932
+end
+
+def fun_l23_n701()
+ fun_l24_n249
+end
+
+def fun_l23_n702()
+ fun_l24_n375
+end
+
+def fun_l23_n703()
+ fun_l24_n976
+end
+
+def fun_l23_n704()
+ fun_l24_n903
+end
+
+def fun_l23_n705()
+ fun_l24_n326
+end
+
+def fun_l23_n706()
+ fun_l24_n732
+end
+
+def fun_l23_n707()
+ fun_l24_n150
+end
+
+def fun_l23_n708()
+ fun_l24_n849
+end
+
+def fun_l23_n709()
+ fun_l24_n341
+end
+
+def fun_l23_n710()
+ fun_l24_n194
+end
+
+def fun_l23_n711()
+ fun_l24_n773
+end
+
+def fun_l23_n712()
+ fun_l24_n665
+end
+
+def fun_l23_n713()
+ fun_l24_n467
+end
+
+def fun_l23_n714()
+ fun_l24_n554
+end
+
+def fun_l23_n715()
+ fun_l24_n160
+end
+
+def fun_l23_n716()
+ fun_l24_n65
+end
+
+def fun_l23_n717()
+ fun_l24_n155
+end
+
+def fun_l23_n718()
+ fun_l24_n930
+end
+
+def fun_l23_n719()
+ fun_l24_n13
+end
+
+def fun_l23_n720()
+ fun_l24_n756
+end
+
+def fun_l23_n721()
+ fun_l24_n174
+end
+
+def fun_l23_n722()
+ fun_l24_n675
+end
+
+def fun_l23_n723()
+ fun_l24_n847
+end
+
+def fun_l23_n724()
+ fun_l24_n277
+end
+
+def fun_l23_n725()
+ fun_l24_n580
+end
+
+def fun_l23_n726()
+ fun_l24_n65
+end
+
+def fun_l23_n727()
+ fun_l24_n507
+end
+
+def fun_l23_n728()
+ fun_l24_n325
+end
+
+def fun_l23_n729()
+ fun_l24_n642
+end
+
+def fun_l23_n730()
+ fun_l24_n607
+end
+
+def fun_l23_n731()
+ fun_l24_n683
+end
+
+def fun_l23_n732()
+ fun_l24_n139
+end
+
+def fun_l23_n733()
+ fun_l24_n719
+end
+
+def fun_l23_n734()
+ fun_l24_n768
+end
+
+def fun_l23_n735()
+ fun_l24_n927
+end
+
+def fun_l23_n736()
+ fun_l24_n346
+end
+
+def fun_l23_n737()
+ fun_l24_n457
+end
+
+def fun_l23_n738()
+ fun_l24_n347
+end
+
+def fun_l23_n739()
+ fun_l24_n26
+end
+
+def fun_l23_n740()
+ fun_l24_n696
+end
+
+def fun_l23_n741()
+ fun_l24_n177
+end
+
+def fun_l23_n742()
+ fun_l24_n414
+end
+
+def fun_l23_n743()
+ fun_l24_n937
+end
+
+def fun_l23_n744()
+ fun_l24_n576
+end
+
+def fun_l23_n745()
+ fun_l24_n560
+end
+
+def fun_l23_n746()
+ fun_l24_n398
+end
+
+def fun_l23_n747()
+ fun_l24_n476
+end
+
+def fun_l23_n748()
+ fun_l24_n758
+end
+
+def fun_l23_n749()
+ fun_l24_n955
+end
+
+def fun_l23_n750()
+ fun_l24_n130
+end
+
+def fun_l23_n751()
+ fun_l24_n673
+end
+
+def fun_l23_n752()
+ fun_l24_n269
+end
+
+def fun_l23_n753()
+ fun_l24_n917
+end
+
+def fun_l23_n754()
+ fun_l24_n738
+end
+
+def fun_l23_n755()
+ fun_l24_n238
+end
+
+def fun_l23_n756()
+ fun_l24_n910
+end
+
+def fun_l23_n757()
+ fun_l24_n912
+end
+
+def fun_l23_n758()
+ fun_l24_n288
+end
+
+def fun_l23_n759()
+ fun_l24_n206
+end
+
+def fun_l23_n760()
+ fun_l24_n519
+end
+
+def fun_l23_n761()
+ fun_l24_n365
+end
+
+def fun_l23_n762()
+ fun_l24_n493
+end
+
+def fun_l23_n763()
+ fun_l24_n222
+end
+
+def fun_l23_n764()
+ fun_l24_n933
+end
+
+def fun_l23_n765()
+ fun_l24_n164
+end
+
+def fun_l23_n766()
+ fun_l24_n606
+end
+
+def fun_l23_n767()
+ fun_l24_n494
+end
+
+def fun_l23_n768()
+ fun_l24_n869
+end
+
+def fun_l23_n769()
+ fun_l24_n339
+end
+
+def fun_l23_n770()
+ fun_l24_n55
+end
+
+def fun_l23_n771()
+ fun_l24_n149
+end
+
+def fun_l23_n772()
+ fun_l24_n926
+end
+
+def fun_l23_n773()
+ fun_l24_n884
+end
+
+def fun_l23_n774()
+ fun_l24_n599
+end
+
+def fun_l23_n775()
+ fun_l24_n74
+end
+
+def fun_l23_n776()
+ fun_l24_n633
+end
+
+def fun_l23_n777()
+ fun_l24_n859
+end
+
+def fun_l23_n778()
+ fun_l24_n895
+end
+
+def fun_l23_n779()
+ fun_l24_n559
+end
+
+def fun_l23_n780()
+ fun_l24_n712
+end
+
+def fun_l23_n781()
+ fun_l24_n275
+end
+
+def fun_l23_n782()
+ fun_l24_n485
+end
+
+def fun_l23_n783()
+ fun_l24_n958
+end
+
+def fun_l23_n784()
+ fun_l24_n905
+end
+
+def fun_l23_n785()
+ fun_l24_n761
+end
+
+def fun_l23_n786()
+ fun_l24_n869
+end
+
+def fun_l23_n787()
+ fun_l24_n542
+end
+
+def fun_l23_n788()
+ fun_l24_n676
+end
+
+def fun_l23_n789()
+ fun_l24_n708
+end
+
+def fun_l23_n790()
+ fun_l24_n298
+end
+
+def fun_l23_n791()
+ fun_l24_n362
+end
+
+def fun_l23_n792()
+ fun_l24_n938
+end
+
+def fun_l23_n793()
+ fun_l24_n414
+end
+
+def fun_l23_n794()
+ fun_l24_n376
+end
+
+def fun_l23_n795()
+ fun_l24_n530
+end
+
+def fun_l23_n796()
+ fun_l24_n1
+end
+
+def fun_l23_n797()
+ fun_l24_n333
+end
+
+def fun_l23_n798()
+ fun_l24_n750
+end
+
+def fun_l23_n799()
+ fun_l24_n254
+end
+
+def fun_l23_n800()
+ fun_l24_n278
+end
+
+def fun_l23_n801()
+ fun_l24_n314
+end
+
+def fun_l23_n802()
+ fun_l24_n275
+end
+
+def fun_l23_n803()
+ fun_l24_n848
+end
+
+def fun_l23_n804()
+ fun_l24_n883
+end
+
+def fun_l23_n805()
+ fun_l24_n483
+end
+
+def fun_l23_n806()
+ fun_l24_n706
+end
+
+def fun_l23_n807()
+ fun_l24_n622
+end
+
+def fun_l23_n808()
+ fun_l24_n551
+end
+
+def fun_l23_n809()
+ fun_l24_n680
+end
+
+def fun_l23_n810()
+ fun_l24_n426
+end
+
+def fun_l23_n811()
+ fun_l24_n418
+end
+
+def fun_l23_n812()
+ fun_l24_n163
+end
+
+def fun_l23_n813()
+ fun_l24_n309
+end
+
+def fun_l23_n814()
+ fun_l24_n308
+end
+
+def fun_l23_n815()
+ fun_l24_n992
+end
+
+def fun_l23_n816()
+ fun_l24_n863
+end
+
+def fun_l23_n817()
+ fun_l24_n58
+end
+
+def fun_l23_n818()
+ fun_l24_n995
+end
+
+def fun_l23_n819()
+ fun_l24_n158
+end
+
+def fun_l23_n820()
+ fun_l24_n568
+end
+
+def fun_l23_n821()
+ fun_l24_n595
+end
+
+def fun_l23_n822()
+ fun_l24_n121
+end
+
+def fun_l23_n823()
+ fun_l24_n395
+end
+
+def fun_l23_n824()
+ fun_l24_n322
+end
+
+def fun_l23_n825()
+ fun_l24_n178
+end
+
+def fun_l23_n826()
+ fun_l24_n470
+end
+
+def fun_l23_n827()
+ fun_l24_n243
+end
+
+def fun_l23_n828()
+ fun_l24_n970
+end
+
+def fun_l23_n829()
+ fun_l24_n41
+end
+
+def fun_l23_n830()
+ fun_l24_n468
+end
+
+def fun_l23_n831()
+ fun_l24_n457
+end
+
+def fun_l23_n832()
+ fun_l24_n104
+end
+
+def fun_l23_n833()
+ fun_l24_n735
+end
+
+def fun_l23_n834()
+ fun_l24_n935
+end
+
+def fun_l23_n835()
+ fun_l24_n693
+end
+
+def fun_l23_n836()
+ fun_l24_n937
+end
+
+def fun_l23_n837()
+ fun_l24_n720
+end
+
+def fun_l23_n838()
+ fun_l24_n969
+end
+
+def fun_l23_n839()
+ fun_l24_n251
+end
+
+def fun_l23_n840()
+ fun_l24_n120
+end
+
+def fun_l23_n841()
+ fun_l24_n24
+end
+
+def fun_l23_n842()
+ fun_l24_n692
+end
+
+def fun_l23_n843()
+ fun_l24_n663
+end
+
+def fun_l23_n844()
+ fun_l24_n84
+end
+
+def fun_l23_n845()
+ fun_l24_n612
+end
+
+def fun_l23_n846()
+ fun_l24_n169
+end
+
+def fun_l23_n847()
+ fun_l24_n708
+end
+
+def fun_l23_n848()
+ fun_l24_n825
+end
+
+def fun_l23_n849()
+ fun_l24_n821
+end
+
+def fun_l23_n850()
+ fun_l24_n593
+end
+
+def fun_l23_n851()
+ fun_l24_n788
+end
+
+def fun_l23_n852()
+ fun_l24_n757
+end
+
+def fun_l23_n853()
+ fun_l24_n104
+end
+
+def fun_l23_n854()
+ fun_l24_n370
+end
+
+def fun_l23_n855()
+ fun_l24_n925
+end
+
+def fun_l23_n856()
+ fun_l24_n312
+end
+
+def fun_l23_n857()
+ fun_l24_n262
+end
+
+def fun_l23_n858()
+ fun_l24_n459
+end
+
+def fun_l23_n859()
+ fun_l24_n296
+end
+
+def fun_l23_n860()
+ fun_l24_n37
+end
+
+def fun_l23_n861()
+ fun_l24_n865
+end
+
+def fun_l23_n862()
+ fun_l24_n435
+end
+
+def fun_l23_n863()
+ fun_l24_n6
+end
+
+def fun_l23_n864()
+ fun_l24_n589
+end
+
+def fun_l23_n865()
+ fun_l24_n247
+end
+
+def fun_l23_n866()
+ fun_l24_n889
+end
+
+def fun_l23_n867()
+ fun_l24_n461
+end
+
+def fun_l23_n868()
+ fun_l24_n949
+end
+
+def fun_l23_n869()
+ fun_l24_n951
+end
+
+def fun_l23_n870()
+ fun_l24_n214
+end
+
+def fun_l23_n871()
+ fun_l24_n44
+end
+
+def fun_l23_n872()
+ fun_l24_n241
+end
+
+def fun_l23_n873()
+ fun_l24_n643
+end
+
+def fun_l23_n874()
+ fun_l24_n918
+end
+
+def fun_l23_n875()
+ fun_l24_n940
+end
+
+def fun_l23_n876()
+ fun_l24_n642
+end
+
+def fun_l23_n877()
+ fun_l24_n859
+end
+
+def fun_l23_n878()
+ fun_l24_n535
+end
+
+def fun_l23_n879()
+ fun_l24_n956
+end
+
+def fun_l23_n880()
+ fun_l24_n212
+end
+
+def fun_l23_n881()
+ fun_l24_n691
+end
+
+def fun_l23_n882()
+ fun_l24_n306
+end
+
+def fun_l23_n883()
+ fun_l24_n769
+end
+
+def fun_l23_n884()
+ fun_l24_n194
+end
+
+def fun_l23_n885()
+ fun_l24_n46
+end
+
+def fun_l23_n886()
+ fun_l24_n409
+end
+
+def fun_l23_n887()
+ fun_l24_n799
+end
+
+def fun_l23_n888()
+ fun_l24_n367
+end
+
+def fun_l23_n889()
+ fun_l24_n454
+end
+
+def fun_l23_n890()
+ fun_l24_n405
+end
+
+def fun_l23_n891()
+ fun_l24_n547
+end
+
+def fun_l23_n892()
+ fun_l24_n998
+end
+
+def fun_l23_n893()
+ fun_l24_n942
+end
+
+def fun_l23_n894()
+ fun_l24_n937
+end
+
+def fun_l23_n895()
+ fun_l24_n33
+end
+
+def fun_l23_n896()
+ fun_l24_n354
+end
+
+def fun_l23_n897()
+ fun_l24_n1
+end
+
+def fun_l23_n898()
+ fun_l24_n142
+end
+
+def fun_l23_n899()
+ fun_l24_n514
+end
+
+def fun_l23_n900()
+ fun_l24_n869
+end
+
+def fun_l23_n901()
+ fun_l24_n126
+end
+
+def fun_l23_n902()
+ fun_l24_n713
+end
+
+def fun_l23_n903()
+ fun_l24_n568
+end
+
+def fun_l23_n904()
+ fun_l24_n433
+end
+
+def fun_l23_n905()
+ fun_l24_n864
+end
+
+def fun_l23_n906()
+ fun_l24_n129
+end
+
+def fun_l23_n907()
+ fun_l24_n255
+end
+
+def fun_l23_n908()
+ fun_l24_n896
+end
+
+def fun_l23_n909()
+ fun_l24_n997
+end
+
+def fun_l23_n910()
+ fun_l24_n849
+end
+
+def fun_l23_n911()
+ fun_l24_n120
+end
+
+def fun_l23_n912()
+ fun_l24_n165
+end
+
+def fun_l23_n913()
+ fun_l24_n637
+end
+
+def fun_l23_n914()
+ fun_l24_n624
+end
+
+def fun_l23_n915()
+ fun_l24_n120
+end
+
+def fun_l23_n916()
+ fun_l24_n637
+end
+
+def fun_l23_n917()
+ fun_l24_n863
+end
+
+def fun_l23_n918()
+ fun_l24_n202
+end
+
+def fun_l23_n919()
+ fun_l24_n844
+end
+
+def fun_l23_n920()
+ fun_l24_n226
+end
+
+def fun_l23_n921()
+ fun_l24_n726
+end
+
+def fun_l23_n922()
+ fun_l24_n277
+end
+
+def fun_l23_n923()
+ fun_l24_n375
+end
+
+def fun_l23_n924()
+ fun_l24_n601
+end
+
+def fun_l23_n925()
+ fun_l24_n118
+end
+
+def fun_l23_n926()
+ fun_l24_n661
+end
+
+def fun_l23_n927()
+ fun_l24_n360
+end
+
+def fun_l23_n928()
+ fun_l24_n627
+end
+
+def fun_l23_n929()
+ fun_l24_n238
+end
+
+def fun_l23_n930()
+ fun_l24_n372
+end
+
+def fun_l23_n931()
+ fun_l24_n768
+end
+
+def fun_l23_n932()
+ fun_l24_n848
+end
+
+def fun_l23_n933()
+ fun_l24_n540
+end
+
+def fun_l23_n934()
+ fun_l24_n848
+end
+
+def fun_l23_n935()
+ fun_l24_n688
+end
+
+def fun_l23_n936()
+ fun_l24_n9
+end
+
+def fun_l23_n937()
+ fun_l24_n362
+end
+
+def fun_l23_n938()
+ fun_l24_n151
+end
+
+def fun_l23_n939()
+ fun_l24_n79
+end
+
+def fun_l23_n940()
+ fun_l24_n673
+end
+
+def fun_l23_n941()
+ fun_l24_n575
+end
+
+def fun_l23_n942()
+ fun_l24_n368
+end
+
+def fun_l23_n943()
+ fun_l24_n264
+end
+
+def fun_l23_n944()
+ fun_l24_n502
+end
+
+def fun_l23_n945()
+ fun_l24_n483
+end
+
+def fun_l23_n946()
+ fun_l24_n623
+end
+
+def fun_l23_n947()
+ fun_l24_n445
+end
+
+def fun_l23_n948()
+ fun_l24_n560
+end
+
+def fun_l23_n949()
+ fun_l24_n152
+end
+
+def fun_l23_n950()
+ fun_l24_n211
+end
+
+def fun_l23_n951()
+ fun_l24_n777
+end
+
+def fun_l23_n952()
+ fun_l24_n623
+end
+
+def fun_l23_n953()
+ fun_l24_n410
+end
+
+def fun_l23_n954()
+ fun_l24_n456
+end
+
+def fun_l23_n955()
+ fun_l24_n35
+end
+
+def fun_l23_n956()
+ fun_l24_n134
+end
+
+def fun_l23_n957()
+ fun_l24_n768
+end
+
+def fun_l23_n958()
+ fun_l24_n827
+end
+
+def fun_l23_n959()
+ fun_l24_n8
+end
+
+def fun_l23_n960()
+ fun_l24_n339
+end
+
+def fun_l23_n961()
+ fun_l24_n580
+end
+
+def fun_l23_n962()
+ fun_l24_n570
+end
+
+def fun_l23_n963()
+ fun_l24_n308
+end
+
+def fun_l23_n964()
+ fun_l24_n531
+end
+
+def fun_l23_n965()
+ fun_l24_n378
+end
+
+def fun_l23_n966()
+ fun_l24_n632
+end
+
+def fun_l23_n967()
+ fun_l24_n465
+end
+
+def fun_l23_n968()
+ fun_l24_n318
+end
+
+def fun_l23_n969()
+ fun_l24_n36
+end
+
+def fun_l23_n970()
+ fun_l24_n408
+end
+
+def fun_l23_n971()
+ fun_l24_n225
+end
+
+def fun_l23_n972()
+ fun_l24_n105
+end
+
+def fun_l23_n973()
+ fun_l24_n736
+end
+
+def fun_l23_n974()
+ fun_l24_n735
+end
+
+def fun_l23_n975()
+ fun_l24_n811
+end
+
+def fun_l23_n976()
+ fun_l24_n495
+end
+
+def fun_l23_n977()
+ fun_l24_n563
+end
+
+def fun_l23_n978()
+ fun_l24_n511
+end
+
+def fun_l23_n979()
+ fun_l24_n158
+end
+
+def fun_l23_n980()
+ fun_l24_n222
+end
+
+def fun_l23_n981()
+ fun_l24_n568
+end
+
+def fun_l23_n982()
+ fun_l24_n936
+end
+
+def fun_l23_n983()
+ fun_l24_n932
+end
+
+def fun_l23_n984()
+ fun_l24_n872
+end
+
+def fun_l23_n985()
+ fun_l24_n70
+end
+
+def fun_l23_n986()
+ fun_l24_n602
+end
+
+def fun_l23_n987()
+ fun_l24_n364
+end
+
+def fun_l23_n988()
+ fun_l24_n904
+end
+
+def fun_l23_n989()
+ fun_l24_n98
+end
+
+def fun_l23_n990()
+ fun_l24_n907
+end
+
+def fun_l23_n991()
+ fun_l24_n435
+end
+
+def fun_l23_n992()
+ fun_l24_n24
+end
+
+def fun_l23_n993()
+ fun_l24_n790
+end
+
+def fun_l23_n994()
+ fun_l24_n249
+end
+
+def fun_l23_n995()
+ fun_l24_n12
+end
+
+def fun_l23_n996()
+ fun_l24_n956
+end
+
+def fun_l23_n997()
+ fun_l24_n539
+end
+
+def fun_l23_n998()
+ fun_l24_n935
+end
+
+def fun_l23_n999()
+ fun_l24_n964
+end
+
+def fun_l24_n0()
+ fun_l25_n193
+end
+
+def fun_l24_n1()
+ fun_l25_n802
+end
+
+def fun_l24_n2()
+ fun_l25_n936
+end
+
+def fun_l24_n3()
+ fun_l25_n672
+end
+
+def fun_l24_n4()
+ fun_l25_n506
+end
+
+def fun_l24_n5()
+ fun_l25_n598
+end
+
+def fun_l24_n6()
+ fun_l25_n368
+end
+
+def fun_l24_n7()
+ fun_l25_n4
+end
+
+def fun_l24_n8()
+ fun_l25_n396
+end
+
+def fun_l24_n9()
+ fun_l25_n772
+end
+
+def fun_l24_n10()
+ fun_l25_n986
+end
+
+def fun_l24_n11()
+ fun_l25_n182
+end
+
+def fun_l24_n12()
+ fun_l25_n663
+end
+
+def fun_l24_n13()
+ fun_l25_n460
+end
+
+def fun_l24_n14()
+ fun_l25_n78
+end
+
+def fun_l24_n15()
+ fun_l25_n590
+end
+
+def fun_l24_n16()
+ fun_l25_n205
+end
+
+def fun_l24_n17()
+ fun_l25_n848
+end
+
+def fun_l24_n18()
+ fun_l25_n270
+end
+
+def fun_l24_n19()
+ fun_l25_n491
+end
+
+def fun_l24_n20()
+ fun_l25_n740
+end
+
+def fun_l24_n21()
+ fun_l25_n800
+end
+
+def fun_l24_n22()
+ fun_l25_n859
+end
+
+def fun_l24_n23()
+ fun_l25_n300
+end
+
+def fun_l24_n24()
+ fun_l25_n705
+end
+
+def fun_l24_n25()
+ fun_l25_n917
+end
+
+def fun_l24_n26()
+ fun_l25_n890
+end
+
+def fun_l24_n27()
+ fun_l25_n700
+end
+
+def fun_l24_n28()
+ fun_l25_n448
+end
+
+def fun_l24_n29()
+ fun_l25_n774
+end
+
+def fun_l24_n30()
+ fun_l25_n13
+end
+
+def fun_l24_n31()
+ fun_l25_n427
+end
+
+def fun_l24_n32()
+ fun_l25_n159
+end
+
+def fun_l24_n33()
+ fun_l25_n180
+end
+
+def fun_l24_n34()
+ fun_l25_n721
+end
+
+def fun_l24_n35()
+ fun_l25_n539
+end
+
+def fun_l24_n36()
+ fun_l25_n808
+end
+
+def fun_l24_n37()
+ fun_l25_n123
+end
+
+def fun_l24_n38()
+ fun_l25_n428
+end
+
+def fun_l24_n39()
+ fun_l25_n678
+end
+
+def fun_l24_n40()
+ fun_l25_n821
+end
+
+def fun_l24_n41()
+ fun_l25_n170
+end
+
+def fun_l24_n42()
+ fun_l25_n115
+end
+
+def fun_l24_n43()
+ fun_l25_n72
+end
+
+def fun_l24_n44()
+ fun_l25_n280
+end
+
+def fun_l24_n45()
+ fun_l25_n950
+end
+
+def fun_l24_n46()
+ fun_l25_n572
+end
+
+def fun_l24_n47()
+ fun_l25_n125
+end
+
+def fun_l24_n48()
+ fun_l25_n607
+end
+
+def fun_l24_n49()
+ fun_l25_n704
+end
+
+def fun_l24_n50()
+ fun_l25_n125
+end
+
+def fun_l24_n51()
+ fun_l25_n179
+end
+
+def fun_l24_n52()
+ fun_l25_n77
+end
+
+def fun_l24_n53()
+ fun_l25_n247
+end
+
+def fun_l24_n54()
+ fun_l25_n828
+end
+
+def fun_l24_n55()
+ fun_l25_n461
+end
+
+def fun_l24_n56()
+ fun_l25_n686
+end
+
+def fun_l24_n57()
+ fun_l25_n222
+end
+
+def fun_l24_n58()
+ fun_l25_n394
+end
+
+def fun_l24_n59()
+ fun_l25_n535
+end
+
+def fun_l24_n60()
+ fun_l25_n199
+end
+
+def fun_l24_n61()
+ fun_l25_n543
+end
+
+def fun_l24_n62()
+ fun_l25_n304
+end
+
+def fun_l24_n63()
+ fun_l25_n520
+end
+
+def fun_l24_n64()
+ fun_l25_n167
+end
+
+def fun_l24_n65()
+ fun_l25_n604
+end
+
+def fun_l24_n66()
+ fun_l25_n685
+end
+
+def fun_l24_n67()
+ fun_l25_n134
+end
+
+def fun_l24_n68()
+ fun_l25_n913
+end
+
+def fun_l24_n69()
+ fun_l25_n899
+end
+
+def fun_l24_n70()
+ fun_l25_n872
+end
+
+def fun_l24_n71()
+ fun_l25_n466
+end
+
+def fun_l24_n72()
+ fun_l25_n352
+end
+
+def fun_l24_n73()
+ fun_l25_n624
+end
+
+def fun_l24_n74()
+ fun_l25_n464
+end
+
+def fun_l24_n75()
+ fun_l25_n513
+end
+
+def fun_l24_n76()
+ fun_l25_n310
+end
+
+def fun_l24_n77()
+ fun_l25_n129
+end
+
+def fun_l24_n78()
+ fun_l25_n770
+end
+
+def fun_l24_n79()
+ fun_l25_n96
+end
+
+def fun_l24_n80()
+ fun_l25_n519
+end
+
+def fun_l24_n81()
+ fun_l25_n495
+end
+
+def fun_l24_n82()
+ fun_l25_n789
+end
+
+def fun_l24_n83()
+ fun_l25_n676
+end
+
+def fun_l24_n84()
+ fun_l25_n877
+end
+
+def fun_l24_n85()
+ fun_l25_n17
+end
+
+def fun_l24_n86()
+ fun_l25_n428
+end
+
+def fun_l24_n87()
+ fun_l25_n282
+end
+
+def fun_l24_n88()
+ fun_l25_n313
+end
+
+def fun_l24_n89()
+ fun_l25_n638
+end
+
+def fun_l24_n90()
+ fun_l25_n543
+end
+
+def fun_l24_n91()
+ fun_l25_n63
+end
+
+def fun_l24_n92()
+ fun_l25_n398
+end
+
+def fun_l24_n93()
+ fun_l25_n726
+end
+
+def fun_l24_n94()
+ fun_l25_n645
+end
+
+def fun_l24_n95()
+ fun_l25_n163
+end
+
+def fun_l24_n96()
+ fun_l25_n228
+end
+
+def fun_l24_n97()
+ fun_l25_n346
+end
+
+def fun_l24_n98()
+ fun_l25_n56
+end
+
+def fun_l24_n99()
+ fun_l25_n258
+end
+
+def fun_l24_n100()
+ fun_l25_n730
+end
+
+def fun_l24_n101()
+ fun_l25_n216
+end
+
+def fun_l24_n102()
+ fun_l25_n370
+end
+
+def fun_l24_n103()
+ fun_l25_n17
+end
+
+def fun_l24_n104()
+ fun_l25_n892
+end
+
+def fun_l24_n105()
+ fun_l25_n977
+end
+
+def fun_l24_n106()
+ fun_l25_n285
+end
+
+def fun_l24_n107()
+ fun_l25_n922
+end
+
+def fun_l24_n108()
+ fun_l25_n62
+end
+
+def fun_l24_n109()
+ fun_l25_n103
+end
+
+def fun_l24_n110()
+ fun_l25_n644
+end
+
+def fun_l24_n111()
+ fun_l25_n467
+end
+
+def fun_l24_n112()
+ fun_l25_n543
+end
+
+def fun_l24_n113()
+ fun_l25_n180
+end
+
+def fun_l24_n114()
+ fun_l25_n186
+end
+
+def fun_l24_n115()
+ fun_l25_n685
+end
+
+def fun_l24_n116()
+ fun_l25_n754
+end
+
+def fun_l24_n117()
+ fun_l25_n842
+end
+
+def fun_l24_n118()
+ fun_l25_n759
+end
+
+def fun_l24_n119()
+ fun_l25_n372
+end
+
+def fun_l24_n120()
+ fun_l25_n874
+end
+
+def fun_l24_n121()
+ fun_l25_n332
+end
+
+def fun_l24_n122()
+ fun_l25_n91
+end
+
+def fun_l24_n123()
+ fun_l25_n229
+end
+
+def fun_l24_n124()
+ fun_l25_n485
+end
+
+def fun_l24_n125()
+ fun_l25_n322
+end
+
+def fun_l24_n126()
+ fun_l25_n750
+end
+
+def fun_l24_n127()
+ fun_l25_n466
+end
+
+def fun_l24_n128()
+ fun_l25_n936
+end
+
+def fun_l24_n129()
+ fun_l25_n172
+end
+
+def fun_l24_n130()
+ fun_l25_n389
+end
+
+def fun_l24_n131()
+ fun_l25_n789
+end
+
+def fun_l24_n132()
+ fun_l25_n165
+end
+
+def fun_l24_n133()
+ fun_l25_n756
+end
+
+def fun_l24_n134()
+ fun_l25_n1
+end
+
+def fun_l24_n135()
+ fun_l25_n362
+end
+
+def fun_l24_n136()
+ fun_l25_n323
+end
+
+def fun_l24_n137()
+ fun_l25_n656
+end
+
+def fun_l24_n138()
+ fun_l25_n463
+end
+
+def fun_l24_n139()
+ fun_l25_n392
+end
+
+def fun_l24_n140()
+ fun_l25_n43
+end
+
+def fun_l24_n141()
+ fun_l25_n788
+end
+
+def fun_l24_n142()
+ fun_l25_n212
+end
+
+def fun_l24_n143()
+ fun_l25_n597
+end
+
+def fun_l24_n144()
+ fun_l25_n885
+end
+
+def fun_l24_n145()
+ fun_l25_n470
+end
+
+def fun_l24_n146()
+ fun_l25_n945
+end
+
+def fun_l24_n147()
+ fun_l25_n884
+end
+
+def fun_l24_n148()
+ fun_l25_n492
+end
+
+def fun_l24_n149()
+ fun_l25_n466
+end
+
+def fun_l24_n150()
+ fun_l25_n548
+end
+
+def fun_l24_n151()
+ fun_l25_n574
+end
+
+def fun_l24_n152()
+ fun_l25_n920
+end
+
+def fun_l24_n153()
+ fun_l25_n530
+end
+
+def fun_l24_n154()
+ fun_l25_n90
+end
+
+def fun_l24_n155()
+ fun_l25_n531
+end
+
+def fun_l24_n156()
+ fun_l25_n848
+end
+
+def fun_l24_n157()
+ fun_l25_n116
+end
+
+def fun_l24_n158()
+ fun_l25_n25
+end
+
+def fun_l24_n159()
+ fun_l25_n432
+end
+
+def fun_l24_n160()
+ fun_l25_n978
+end
+
+def fun_l24_n161()
+ fun_l25_n383
+end
+
+def fun_l24_n162()
+ fun_l25_n678
+end
+
+def fun_l24_n163()
+ fun_l25_n785
+end
+
+def fun_l24_n164()
+ fun_l25_n504
+end
+
+def fun_l24_n165()
+ fun_l25_n682
+end
+
+def fun_l24_n166()
+ fun_l25_n649
+end
+
+def fun_l24_n167()
+ fun_l25_n498
+end
+
+def fun_l24_n168()
+ fun_l25_n805
+end
+
+def fun_l24_n169()
+ fun_l25_n215
+end
+
+def fun_l24_n170()
+ fun_l25_n444
+end
+
+def fun_l24_n171()
+ fun_l25_n585
+end
+
+def fun_l24_n172()
+ fun_l25_n22
+end
+
+def fun_l24_n173()
+ fun_l25_n214
+end
+
+def fun_l24_n174()
+ fun_l25_n942
+end
+
+def fun_l24_n175()
+ fun_l25_n763
+end
+
+def fun_l24_n176()
+ fun_l25_n852
+end
+
+def fun_l24_n177()
+ fun_l25_n591
+end
+
+def fun_l24_n178()
+ fun_l25_n498
+end
+
+def fun_l24_n179()
+ fun_l25_n111
+end
+
+def fun_l24_n180()
+ fun_l25_n286
+end
+
+def fun_l24_n181()
+ fun_l25_n808
+end
+
+def fun_l24_n182()
+ fun_l25_n402
+end
+
+def fun_l24_n183()
+ fun_l25_n222
+end
+
+def fun_l24_n184()
+ fun_l25_n646
+end
+
+def fun_l24_n185()
+ fun_l25_n550
+end
+
+def fun_l24_n186()
+ fun_l25_n284
+end
+
+def fun_l24_n187()
+ fun_l25_n832
+end
+
+def fun_l24_n188()
+ fun_l25_n554
+end
+
+def fun_l24_n189()
+ fun_l25_n982
+end
+
+def fun_l24_n190()
+ fun_l25_n10
+end
+
+def fun_l24_n191()
+ fun_l25_n843
+end
+
+def fun_l24_n192()
+ fun_l25_n126
+end
+
+def fun_l24_n193()
+ fun_l25_n332
+end
+
+def fun_l24_n194()
+ fun_l25_n145
+end
+
+def fun_l24_n195()
+ fun_l25_n657
+end
+
+def fun_l24_n196()
+ fun_l25_n636
+end
+
+def fun_l24_n197()
+ fun_l25_n875
+end
+
+def fun_l24_n198()
+ fun_l25_n160
+end
+
+def fun_l24_n199()
+ fun_l25_n682
+end
+
+def fun_l24_n200()
+ fun_l25_n556
+end
+
+def fun_l24_n201()
+ fun_l25_n154
+end
+
+def fun_l24_n202()
+ fun_l25_n105
+end
+
+def fun_l24_n203()
+ fun_l25_n958
+end
+
+def fun_l24_n204()
+ fun_l25_n998
+end
+
+def fun_l24_n205()
+ fun_l25_n356
+end
+
+def fun_l24_n206()
+ fun_l25_n531
+end
+
+def fun_l24_n207()
+ fun_l25_n62
+end
+
+def fun_l24_n208()
+ fun_l25_n320
+end
+
+def fun_l24_n209()
+ fun_l25_n725
+end
+
+def fun_l24_n210()
+ fun_l25_n790
+end
+
+def fun_l24_n211()
+ fun_l25_n740
+end
+
+def fun_l24_n212()
+ fun_l25_n73
+end
+
+def fun_l24_n213()
+ fun_l25_n949
+end
+
+def fun_l24_n214()
+ fun_l25_n526
+end
+
+def fun_l24_n215()
+ fun_l25_n881
+end
+
+def fun_l24_n216()
+ fun_l25_n43
+end
+
+def fun_l24_n217()
+ fun_l25_n284
+end
+
+def fun_l24_n218()
+ fun_l25_n252
+end
+
+def fun_l24_n219()
+ fun_l25_n973
+end
+
+def fun_l24_n220()
+ fun_l25_n264
+end
+
+def fun_l24_n221()
+ fun_l25_n55
+end
+
+def fun_l24_n222()
+ fun_l25_n731
+end
+
+def fun_l24_n223()
+ fun_l25_n274
+end
+
+def fun_l24_n224()
+ fun_l25_n748
+end
+
+def fun_l24_n225()
+ fun_l25_n990
+end
+
+def fun_l24_n226()
+ fun_l25_n243
+end
+
+def fun_l24_n227()
+ fun_l25_n607
+end
+
+def fun_l24_n228()
+ fun_l25_n352
+end
+
+def fun_l24_n229()
+ fun_l25_n238
+end
+
+def fun_l24_n230()
+ fun_l25_n252
+end
+
+def fun_l24_n231()
+ fun_l25_n534
+end
+
+def fun_l24_n232()
+ fun_l25_n330
+end
+
+def fun_l24_n233()
+ fun_l25_n915
+end
+
+def fun_l24_n234()
+ fun_l25_n106
+end
+
+def fun_l24_n235()
+ fun_l25_n59
+end
+
+def fun_l24_n236()
+ fun_l25_n829
+end
+
+def fun_l24_n237()
+ fun_l25_n563
+end
+
+def fun_l24_n238()
+ fun_l25_n334
+end
+
+def fun_l24_n239()
+ fun_l25_n828
+end
+
+def fun_l24_n240()
+ fun_l25_n530
+end
+
+def fun_l24_n241()
+ fun_l25_n831
+end
+
+def fun_l24_n242()
+ fun_l25_n922
+end
+
+def fun_l24_n243()
+ fun_l25_n822
+end
+
+def fun_l24_n244()
+ fun_l25_n369
+end
+
+def fun_l24_n245()
+ fun_l25_n977
+end
+
+def fun_l24_n246()
+ fun_l25_n797
+end
+
+def fun_l24_n247()
+ fun_l25_n883
+end
+
+def fun_l24_n248()
+ fun_l25_n964
+end
+
+def fun_l24_n249()
+ fun_l25_n490
+end
+
+def fun_l24_n250()
+ fun_l25_n903
+end
+
+def fun_l24_n251()
+ fun_l25_n154
+end
+
+def fun_l24_n252()
+ fun_l25_n74
+end
+
+def fun_l24_n253()
+ fun_l25_n955
+end
+
+def fun_l24_n254()
+ fun_l25_n709
+end
+
+def fun_l24_n255()
+ fun_l25_n154
+end
+
+def fun_l24_n256()
+ fun_l25_n940
+end
+
+def fun_l24_n257()
+ fun_l25_n33
+end
+
+def fun_l24_n258()
+ fun_l25_n450
+end
+
+def fun_l24_n259()
+ fun_l25_n592
+end
+
+def fun_l24_n260()
+ fun_l25_n430
+end
+
+def fun_l24_n261()
+ fun_l25_n650
+end
+
+def fun_l24_n262()
+ fun_l25_n891
+end
+
+def fun_l24_n263()
+ fun_l25_n803
+end
+
+def fun_l24_n264()
+ fun_l25_n622
+end
+
+def fun_l24_n265()
+ fun_l25_n401
+end
+
+def fun_l24_n266()
+ fun_l25_n493
+end
+
+def fun_l24_n267()
+ fun_l25_n240
+end
+
+def fun_l24_n268()
+ fun_l25_n654
+end
+
+def fun_l24_n269()
+ fun_l25_n839
+end
+
+def fun_l24_n270()
+ fun_l25_n889
+end
+
+def fun_l24_n271()
+ fun_l25_n770
+end
+
+def fun_l24_n272()
+ fun_l25_n860
+end
+
+def fun_l24_n273()
+ fun_l25_n634
+end
+
+def fun_l24_n274()
+ fun_l25_n365
+end
+
+def fun_l24_n275()
+ fun_l25_n321
+end
+
+def fun_l24_n276()
+ fun_l25_n628
+end
+
+def fun_l24_n277()
+ fun_l25_n669
+end
+
+def fun_l24_n278()
+ fun_l25_n815
+end
+
+def fun_l24_n279()
+ fun_l25_n647
+end
+
+def fun_l24_n280()
+ fun_l25_n920
+end
+
+def fun_l24_n281()
+ fun_l25_n620
+end
+
+def fun_l24_n282()
+ fun_l25_n609
+end
+
+def fun_l24_n283()
+ fun_l25_n45
+end
+
+def fun_l24_n284()
+ fun_l25_n632
+end
+
+def fun_l24_n285()
+ fun_l25_n961
+end
+
+def fun_l24_n286()
+ fun_l25_n261
+end
+
+def fun_l24_n287()
+ fun_l25_n348
+end
+
+def fun_l24_n288()
+ fun_l25_n687
+end
+
+def fun_l24_n289()
+ fun_l25_n359
+end
+
+def fun_l24_n290()
+ fun_l25_n306
+end
+
+def fun_l24_n291()
+ fun_l25_n487
+end
+
+def fun_l24_n292()
+ fun_l25_n59
+end
+
+def fun_l24_n293()
+ fun_l25_n353
+end
+
+def fun_l24_n294()
+ fun_l25_n553
+end
+
+def fun_l24_n295()
+ fun_l25_n704
+end
+
+def fun_l24_n296()
+ fun_l25_n691
+end
+
+def fun_l24_n297()
+ fun_l25_n332
+end
+
+def fun_l24_n298()
+ fun_l25_n665
+end
+
+def fun_l24_n299()
+ fun_l25_n407
+end
+
+def fun_l24_n300()
+ fun_l25_n182
+end
+
+def fun_l24_n301()
+ fun_l25_n716
+end
+
+def fun_l24_n302()
+ fun_l25_n55
+end
+
+def fun_l24_n303()
+ fun_l25_n946
+end
+
+def fun_l24_n304()
+ fun_l25_n448
+end
+
+def fun_l24_n305()
+ fun_l25_n959
+end
+
+def fun_l24_n306()
+ fun_l25_n23
+end
+
+def fun_l24_n307()
+ fun_l25_n327
+end
+
+def fun_l24_n308()
+ fun_l25_n317
+end
+
+def fun_l24_n309()
+ fun_l25_n2
+end
+
+def fun_l24_n310()
+ fun_l25_n168
+end
+
+def fun_l24_n311()
+ fun_l25_n171
+end
+
+def fun_l24_n312()
+ fun_l25_n138
+end
+
+def fun_l24_n313()
+ fun_l25_n974
+end
+
+def fun_l24_n314()
+ fun_l25_n981
+end
+
+def fun_l24_n315()
+ fun_l25_n382
+end
+
+def fun_l24_n316()
+ fun_l25_n590
+end
+
+def fun_l24_n317()
+ fun_l25_n613
+end
+
+def fun_l24_n318()
+ fun_l25_n119
+end
+
+def fun_l24_n319()
+ fun_l25_n431
+end
+
+def fun_l24_n320()
+ fun_l25_n595
+end
+
+def fun_l24_n321()
+ fun_l25_n406
+end
+
+def fun_l24_n322()
+ fun_l25_n771
+end
+
+def fun_l24_n323()
+ fun_l25_n693
+end
+
+def fun_l24_n324()
+ fun_l25_n442
+end
+
+def fun_l24_n325()
+ fun_l25_n164
+end
+
+def fun_l24_n326()
+ fun_l25_n630
+end
+
+def fun_l24_n327()
+ fun_l25_n31
+end
+
+def fun_l24_n328()
+ fun_l25_n422
+end
+
+def fun_l24_n329()
+ fun_l25_n204
+end
+
+def fun_l24_n330()
+ fun_l25_n304
+end
+
+def fun_l24_n331()
+ fun_l25_n398
+end
+
+def fun_l24_n332()
+ fun_l25_n903
+end
+
+def fun_l24_n333()
+ fun_l25_n841
+end
+
+def fun_l24_n334()
+ fun_l25_n662
+end
+
+def fun_l24_n335()
+ fun_l25_n247
+end
+
+def fun_l24_n336()
+ fun_l25_n348
+end
+
+def fun_l24_n337()
+ fun_l25_n378
+end
+
+def fun_l24_n338()
+ fun_l25_n197
+end
+
+def fun_l24_n339()
+ fun_l25_n897
+end
+
+def fun_l24_n340()
+ fun_l25_n792
+end
+
+def fun_l24_n341()
+ fun_l25_n655
+end
+
+def fun_l24_n342()
+ fun_l25_n352
+end
+
+def fun_l24_n343()
+ fun_l25_n853
+end
+
+def fun_l24_n344()
+ fun_l25_n202
+end
+
+def fun_l24_n345()
+ fun_l25_n420
+end
+
+def fun_l24_n346()
+ fun_l25_n146
+end
+
+def fun_l24_n347()
+ fun_l25_n766
+end
+
+def fun_l24_n348()
+ fun_l25_n245
+end
+
+def fun_l24_n349()
+ fun_l25_n772
+end
+
+def fun_l24_n350()
+ fun_l25_n789
+end
+
+def fun_l24_n351()
+ fun_l25_n180
+end
+
+def fun_l24_n352()
+ fun_l25_n982
+end
+
+def fun_l24_n353()
+ fun_l25_n837
+end
+
+def fun_l24_n354()
+ fun_l25_n515
+end
+
+def fun_l24_n355()
+ fun_l25_n688
+end
+
+def fun_l24_n356()
+ fun_l25_n85
+end
+
+def fun_l24_n357()
+ fun_l25_n918
+end
+
+def fun_l24_n358()
+ fun_l25_n104
+end
+
+def fun_l24_n359()
+ fun_l25_n797
+end
+
+def fun_l24_n360()
+ fun_l25_n488
+end
+
+def fun_l24_n361()
+ fun_l25_n970
+end
+
+def fun_l24_n362()
+ fun_l25_n82
+end
+
+def fun_l24_n363()
+ fun_l25_n815
+end
+
+def fun_l24_n364()
+ fun_l25_n81
+end
+
+def fun_l24_n365()
+ fun_l25_n70
+end
+
+def fun_l24_n366()
+ fun_l25_n686
+end
+
+def fun_l24_n367()
+ fun_l25_n8
+end
+
+def fun_l24_n368()
+ fun_l25_n835
+end
+
+def fun_l24_n369()
+ fun_l25_n473
+end
+
+def fun_l24_n370()
+ fun_l25_n637
+end
+
+def fun_l24_n371()
+ fun_l25_n314
+end
+
+def fun_l24_n372()
+ fun_l25_n857
+end
+
+def fun_l24_n373()
+ fun_l25_n496
+end
+
+def fun_l24_n374()
+ fun_l25_n182
+end
+
+def fun_l24_n375()
+ fun_l25_n730
+end
+
+def fun_l24_n376()
+ fun_l25_n370
+end
+
+def fun_l24_n377()
+ fun_l25_n289
+end
+
+def fun_l24_n378()
+ fun_l25_n12
+end
+
+def fun_l24_n379()
+ fun_l25_n73
+end
+
+def fun_l24_n380()
+ fun_l25_n514
+end
+
+def fun_l24_n381()
+ fun_l25_n947
+end
+
+def fun_l24_n382()
+ fun_l25_n368
+end
+
+def fun_l24_n383()
+ fun_l25_n997
+end
+
+def fun_l24_n384()
+ fun_l25_n542
+end
+
+def fun_l24_n385()
+ fun_l25_n564
+end
+
+def fun_l24_n386()
+ fun_l25_n213
+end
+
+def fun_l24_n387()
+ fun_l25_n748
+end
+
+def fun_l24_n388()
+ fun_l25_n147
+end
+
+def fun_l24_n389()
+ fun_l25_n437
+end
+
+def fun_l24_n390()
+ fun_l25_n844
+end
+
+def fun_l24_n391()
+ fun_l25_n747
+end
+
+def fun_l24_n392()
+ fun_l25_n68
+end
+
+def fun_l24_n393()
+ fun_l25_n746
+end
+
+def fun_l24_n394()
+ fun_l25_n816
+end
+
+def fun_l24_n395()
+ fun_l25_n865
+end
+
+def fun_l24_n396()
+ fun_l25_n235
+end
+
+def fun_l24_n397()
+ fun_l25_n961
+end
+
+def fun_l24_n398()
+ fun_l25_n8
+end
+
+def fun_l24_n399()
+ fun_l25_n741
+end
+
+def fun_l24_n400()
+ fun_l25_n639
+end
+
+def fun_l24_n401()
+ fun_l25_n419
+end
+
+def fun_l24_n402()
+ fun_l25_n381
+end
+
+def fun_l24_n403()
+ fun_l25_n674
+end
+
+def fun_l24_n404()
+ fun_l25_n238
+end
+
+def fun_l24_n405()
+ fun_l25_n75
+end
+
+def fun_l24_n406()
+ fun_l25_n10
+end
+
+def fun_l24_n407()
+ fun_l25_n672
+end
+
+def fun_l24_n408()
+ fun_l25_n154
+end
+
+def fun_l24_n409()
+ fun_l25_n844
+end
+
+def fun_l24_n410()
+ fun_l25_n578
+end
+
+def fun_l24_n411()
+ fun_l25_n535
+end
+
+def fun_l24_n412()
+ fun_l25_n742
+end
+
+def fun_l24_n413()
+ fun_l25_n587
+end
+
+def fun_l24_n414()
+ fun_l25_n967
+end
+
+def fun_l24_n415()
+ fun_l25_n290
+end
+
+def fun_l24_n416()
+ fun_l25_n958
+end
+
+def fun_l24_n417()
+ fun_l25_n19
+end
+
+def fun_l24_n418()
+ fun_l25_n983
+end
+
+def fun_l24_n419()
+ fun_l25_n206
+end
+
+def fun_l24_n420()
+ fun_l25_n317
+end
+
+def fun_l24_n421()
+ fun_l25_n847
+end
+
+def fun_l24_n422()
+ fun_l25_n409
+end
+
+def fun_l24_n423()
+ fun_l25_n584
+end
+
+def fun_l24_n424()
+ fun_l25_n667
+end
+
+def fun_l24_n425()
+ fun_l25_n559
+end
+
+def fun_l24_n426()
+ fun_l25_n503
+end
+
+def fun_l24_n427()
+ fun_l25_n775
+end
+
+def fun_l24_n428()
+ fun_l25_n828
+end
+
+def fun_l24_n429()
+ fun_l25_n375
+end
+
+def fun_l24_n430()
+ fun_l25_n342
+end
+
+def fun_l24_n431()
+ fun_l25_n382
+end
+
+def fun_l24_n432()
+ fun_l25_n978
+end
+
+def fun_l24_n433()
+ fun_l25_n290
+end
+
+def fun_l24_n434()
+ fun_l25_n367
+end
+
+def fun_l24_n435()
+ fun_l25_n485
+end
+
+def fun_l24_n436()
+ fun_l25_n299
+end
+
+def fun_l24_n437()
+ fun_l25_n343
+end
+
+def fun_l24_n438()
+ fun_l25_n620
+end
+
+def fun_l24_n439()
+ fun_l25_n627
+end
+
+def fun_l24_n440()
+ fun_l25_n955
+end
+
+def fun_l24_n441()
+ fun_l25_n330
+end
+
+def fun_l24_n442()
+ fun_l25_n37
+end
+
+def fun_l24_n443()
+ fun_l25_n437
+end
+
+def fun_l24_n444()
+ fun_l25_n879
+end
+
+def fun_l24_n445()
+ fun_l25_n532
+end
+
+def fun_l24_n446()
+ fun_l25_n701
+end
+
+def fun_l24_n447()
+ fun_l25_n936
+end
+
+def fun_l24_n448()
+ fun_l25_n503
+end
+
+def fun_l24_n449()
+ fun_l25_n275
+end
+
+def fun_l24_n450()
+ fun_l25_n77
+end
+
+def fun_l24_n451()
+ fun_l25_n265
+end
+
+def fun_l24_n452()
+ fun_l25_n727
+end
+
+def fun_l24_n453()
+ fun_l25_n547
+end
+
+def fun_l24_n454()
+ fun_l25_n796
+end
+
+def fun_l24_n455()
+ fun_l25_n18
+end
+
+def fun_l24_n456()
+ fun_l25_n328
+end
+
+def fun_l24_n457()
+ fun_l25_n672
+end
+
+def fun_l24_n458()
+ fun_l25_n803
+end
+
+def fun_l24_n459()
+ fun_l25_n590
+end
+
+def fun_l24_n460()
+ fun_l25_n798
+end
+
+def fun_l24_n461()
+ fun_l25_n823
+end
+
+def fun_l24_n462()
+ fun_l25_n258
+end
+
+def fun_l24_n463()
+ fun_l25_n569
+end
+
+def fun_l24_n464()
+ fun_l25_n541
+end
+
+def fun_l24_n465()
+ fun_l25_n313
+end
+
+def fun_l24_n466()
+ fun_l25_n994
+end
+
+def fun_l24_n467()
+ fun_l25_n925
+end
+
+def fun_l24_n468()
+ fun_l25_n277
+end
+
+def fun_l24_n469()
+ fun_l25_n862
+end
+
+def fun_l24_n470()
+ fun_l25_n241
+end
+
+def fun_l24_n471()
+ fun_l25_n203
+end
+
+def fun_l24_n472()
+ fun_l25_n950
+end
+
+def fun_l24_n473()
+ fun_l25_n774
+end
+
+def fun_l24_n474()
+ fun_l25_n699
+end
+
+def fun_l24_n475()
+ fun_l25_n415
+end
+
+def fun_l24_n476()
+ fun_l25_n100
+end
+
+def fun_l24_n477()
+ fun_l25_n97
+end
+
+def fun_l24_n478()
+ fun_l25_n439
+end
+
+def fun_l24_n479()
+ fun_l25_n276
+end
+
+def fun_l24_n480()
+ fun_l25_n761
+end
+
+def fun_l24_n481()
+ fun_l25_n980
+end
+
+def fun_l24_n482()
+ fun_l25_n927
+end
+
+def fun_l24_n483()
+ fun_l25_n276
+end
+
+def fun_l24_n484()
+ fun_l25_n402
+end
+
+def fun_l24_n485()
+ fun_l25_n169
+end
+
+def fun_l24_n486()
+ fun_l25_n928
+end
+
+def fun_l24_n487()
+ fun_l25_n931
+end
+
+def fun_l24_n488()
+ fun_l25_n807
+end
+
+def fun_l24_n489()
+ fun_l25_n258
+end
+
+def fun_l24_n490()
+ fun_l25_n385
+end
+
+def fun_l24_n491()
+ fun_l25_n846
+end
+
+def fun_l24_n492()
+ fun_l25_n872
+end
+
+def fun_l24_n493()
+ fun_l25_n169
+end
+
+def fun_l24_n494()
+ fun_l25_n77
+end
+
+def fun_l24_n495()
+ fun_l25_n775
+end
+
+def fun_l24_n496()
+ fun_l25_n744
+end
+
+def fun_l24_n497()
+ fun_l25_n666
+end
+
+def fun_l24_n498()
+ fun_l25_n607
+end
+
+def fun_l24_n499()
+ fun_l25_n603
+end
+
+def fun_l24_n500()
+ fun_l25_n821
+end
+
+def fun_l24_n501()
+ fun_l25_n83
+end
+
+def fun_l24_n502()
+ fun_l25_n331
+end
+
+def fun_l24_n503()
+ fun_l25_n20
+end
+
+def fun_l24_n504()
+ fun_l25_n115
+end
+
+def fun_l24_n505()
+ fun_l25_n437
+end
+
+def fun_l24_n506()
+ fun_l25_n679
+end
+
+def fun_l24_n507()
+ fun_l25_n424
+end
+
+def fun_l24_n508()
+ fun_l25_n745
+end
+
+def fun_l24_n509()
+ fun_l25_n389
+end
+
+def fun_l24_n510()
+ fun_l25_n762
+end
+
+def fun_l24_n511()
+ fun_l25_n289
+end
+
+def fun_l24_n512()
+ fun_l25_n944
+end
+
+def fun_l24_n513()
+ fun_l25_n601
+end
+
+def fun_l24_n514()
+ fun_l25_n660
+end
+
+def fun_l24_n515()
+ fun_l25_n975
+end
+
+def fun_l24_n516()
+ fun_l25_n815
+end
+
+def fun_l24_n517()
+ fun_l25_n208
+end
+
+def fun_l24_n518()
+ fun_l25_n736
+end
+
+def fun_l24_n519()
+ fun_l25_n189
+end
+
+def fun_l24_n520()
+ fun_l25_n490
+end
+
+def fun_l24_n521()
+ fun_l25_n452
+end
+
+def fun_l24_n522()
+ fun_l25_n96
+end
+
+def fun_l24_n523()
+ fun_l25_n772
+end
+
+def fun_l24_n524()
+ fun_l25_n930
+end
+
+def fun_l24_n525()
+ fun_l25_n322
+end
+
+def fun_l24_n526()
+ fun_l25_n419
+end
+
+def fun_l24_n527()
+ fun_l25_n997
+end
+
+def fun_l24_n528()
+ fun_l25_n475
+end
+
+def fun_l24_n529()
+ fun_l25_n511
+end
+
+def fun_l24_n530()
+ fun_l25_n909
+end
+
+def fun_l24_n531()
+ fun_l25_n33
+end
+
+def fun_l24_n532()
+ fun_l25_n923
+end
+
+def fun_l24_n533()
+ fun_l25_n201
+end
+
+def fun_l24_n534()
+ fun_l25_n444
+end
+
+def fun_l24_n535()
+ fun_l25_n327
+end
+
+def fun_l24_n536()
+ fun_l25_n982
+end
+
+def fun_l24_n537()
+ fun_l25_n969
+end
+
+def fun_l24_n538()
+ fun_l25_n514
+end
+
+def fun_l24_n539()
+ fun_l25_n707
+end
+
+def fun_l24_n540()
+ fun_l25_n571
+end
+
+def fun_l24_n541()
+ fun_l25_n407
+end
+
+def fun_l24_n542()
+ fun_l25_n848
+end
+
+def fun_l24_n543()
+ fun_l25_n457
+end
+
+def fun_l24_n544()
+ fun_l25_n374
+end
+
+def fun_l24_n545()
+ fun_l25_n875
+end
+
+def fun_l24_n546()
+ fun_l25_n166
+end
+
+def fun_l24_n547()
+ fun_l25_n951
+end
+
+def fun_l24_n548()
+ fun_l25_n213
+end
+
+def fun_l24_n549()
+ fun_l25_n148
+end
+
+def fun_l24_n550()
+ fun_l25_n479
+end
+
+def fun_l24_n551()
+ fun_l25_n130
+end
+
+def fun_l24_n552()
+ fun_l25_n823
+end
+
+def fun_l24_n553()
+ fun_l25_n507
+end
+
+def fun_l24_n554()
+ fun_l25_n227
+end
+
+def fun_l24_n555()
+ fun_l25_n811
+end
+
+def fun_l24_n556()
+ fun_l25_n203
+end
+
+def fun_l24_n557()
+ fun_l25_n626
+end
+
+def fun_l24_n558()
+ fun_l25_n965
+end
+
+def fun_l24_n559()
+ fun_l25_n871
+end
+
+def fun_l24_n560()
+ fun_l25_n752
+end
+
+def fun_l24_n561()
+ fun_l25_n89
+end
+
+def fun_l24_n562()
+ fun_l25_n970
+end
+
+def fun_l24_n563()
+ fun_l25_n956
+end
+
+def fun_l24_n564()
+ fun_l25_n871
+end
+
+def fun_l24_n565()
+ fun_l25_n610
+end
+
+def fun_l24_n566()
+ fun_l25_n43
+end
+
+def fun_l24_n567()
+ fun_l25_n176
+end
+
+def fun_l24_n568()
+ fun_l25_n10
+end
+
+def fun_l24_n569()
+ fun_l25_n798
+end
+
+def fun_l24_n570()
+ fun_l25_n141
+end
+
+def fun_l24_n571()
+ fun_l25_n205
+end
+
+def fun_l24_n572()
+ fun_l25_n870
+end
+
+def fun_l24_n573()
+ fun_l25_n324
+end
+
+def fun_l24_n574()
+ fun_l25_n765
+end
+
+def fun_l24_n575()
+ fun_l25_n775
+end
+
+def fun_l24_n576()
+ fun_l25_n232
+end
+
+def fun_l24_n577()
+ fun_l25_n36
+end
+
+def fun_l24_n578()
+ fun_l25_n260
+end
+
+def fun_l24_n579()
+ fun_l25_n84
+end
+
+def fun_l24_n580()
+ fun_l25_n279
+end
+
+def fun_l24_n581()
+ fun_l25_n292
+end
+
+def fun_l24_n582()
+ fun_l25_n472
+end
+
+def fun_l24_n583()
+ fun_l25_n630
+end
+
+def fun_l24_n584()
+ fun_l25_n695
+end
+
+def fun_l24_n585()
+ fun_l25_n974
+end
+
+def fun_l24_n586()
+ fun_l25_n263
+end
+
+def fun_l24_n587()
+ fun_l25_n959
+end
+
+def fun_l24_n588()
+ fun_l25_n76
+end
+
+def fun_l24_n589()
+ fun_l25_n897
+end
+
+def fun_l24_n590()
+ fun_l25_n416
+end
+
+def fun_l24_n591()
+ fun_l25_n225
+end
+
+def fun_l24_n592()
+ fun_l25_n194
+end
+
+def fun_l24_n593()
+ fun_l25_n338
+end
+
+def fun_l24_n594()
+ fun_l25_n565
+end
+
+def fun_l24_n595()
+ fun_l25_n301
+end
+
+def fun_l24_n596()
+ fun_l25_n101
+end
+
+def fun_l24_n597()
+ fun_l25_n876
+end
+
+def fun_l24_n598()
+ fun_l25_n127
+end
+
+def fun_l24_n599()
+ fun_l25_n608
+end
+
+def fun_l24_n600()
+ fun_l25_n45
+end
+
+def fun_l24_n601()
+ fun_l25_n833
+end
+
+def fun_l24_n602()
+ fun_l25_n43
+end
+
+def fun_l24_n603()
+ fun_l25_n136
+end
+
+def fun_l24_n604()
+ fun_l25_n916
+end
+
+def fun_l24_n605()
+ fun_l25_n686
+end
+
+def fun_l24_n606()
+ fun_l25_n574
+end
+
+def fun_l24_n607()
+ fun_l25_n164
+end
+
+def fun_l24_n608()
+ fun_l25_n983
+end
+
+def fun_l24_n609()
+ fun_l25_n883
+end
+
+def fun_l24_n610()
+ fun_l25_n957
+end
+
+def fun_l24_n611()
+ fun_l25_n592
+end
+
+def fun_l24_n612()
+ fun_l25_n684
+end
+
+def fun_l24_n613()
+ fun_l25_n333
+end
+
+def fun_l24_n614()
+ fun_l25_n465
+end
+
+def fun_l24_n615()
+ fun_l25_n297
+end
+
+def fun_l24_n616()
+ fun_l25_n738
+end
+
+def fun_l24_n617()
+ fun_l25_n953
+end
+
+def fun_l24_n618()
+ fun_l25_n27
+end
+
+def fun_l24_n619()
+ fun_l25_n577
+end
+
+def fun_l24_n620()
+ fun_l25_n595
+end
+
+def fun_l24_n621()
+ fun_l25_n408
+end
+
+def fun_l24_n622()
+ fun_l25_n161
+end
+
+def fun_l24_n623()
+ fun_l25_n263
+end
+
+def fun_l24_n624()
+ fun_l25_n557
+end
+
+def fun_l24_n625()
+ fun_l25_n708
+end
+
+def fun_l24_n626()
+ fun_l25_n879
+end
+
+def fun_l24_n627()
+ fun_l25_n235
+end
+
+def fun_l24_n628()
+ fun_l25_n551
+end
+
+def fun_l24_n629()
+ fun_l25_n46
+end
+
+def fun_l24_n630()
+ fun_l25_n718
+end
+
+def fun_l24_n631()
+ fun_l25_n419
+end
+
+def fun_l24_n632()
+ fun_l25_n370
+end
+
+def fun_l24_n633()
+ fun_l25_n322
+end
+
+def fun_l24_n634()
+ fun_l25_n912
+end
+
+def fun_l24_n635()
+ fun_l25_n445
+end
+
+def fun_l24_n636()
+ fun_l25_n850
+end
+
+def fun_l24_n637()
+ fun_l25_n233
+end
+
+def fun_l24_n638()
+ fun_l25_n230
+end
+
+def fun_l24_n639()
+ fun_l25_n188
+end
+
+def fun_l24_n640()
+ fun_l25_n267
+end
+
+def fun_l24_n641()
+ fun_l25_n840
+end
+
+def fun_l24_n642()
+ fun_l25_n786
+end
+
+def fun_l24_n643()
+ fun_l25_n737
+end
+
+def fun_l24_n644()
+ fun_l25_n725
+end
+
+def fun_l24_n645()
+ fun_l25_n200
+end
+
+def fun_l24_n646()
+ fun_l25_n173
+end
+
+def fun_l24_n647()
+ fun_l25_n50
+end
+
+def fun_l24_n648()
+ fun_l25_n460
+end
+
+def fun_l24_n649()
+ fun_l25_n959
+end
+
+def fun_l24_n650()
+ fun_l25_n397
+end
+
+def fun_l24_n651()
+ fun_l25_n108
+end
+
+def fun_l24_n652()
+ fun_l25_n426
+end
+
+def fun_l24_n653()
+ fun_l25_n208
+end
+
+def fun_l24_n654()
+ fun_l25_n989
+end
+
+def fun_l24_n655()
+ fun_l25_n73
+end
+
+def fun_l24_n656()
+ fun_l25_n710
+end
+
+def fun_l24_n657()
+ fun_l25_n707
+end
+
+def fun_l24_n658()
+ fun_l25_n276
+end
+
+def fun_l24_n659()
+ fun_l25_n920
+end
+
+def fun_l24_n660()
+ fun_l25_n735
+end
+
+def fun_l24_n661()
+ fun_l25_n937
+end
+
+def fun_l24_n662()
+ fun_l25_n544
+end
+
+def fun_l24_n663()
+ fun_l25_n663
+end
+
+def fun_l24_n664()
+ fun_l25_n571
+end
+
+def fun_l24_n665()
+ fun_l25_n682
+end
+
+def fun_l24_n666()
+ fun_l25_n79
+end
+
+def fun_l24_n667()
+ fun_l25_n759
+end
+
+def fun_l24_n668()
+ fun_l25_n128
+end
+
+def fun_l24_n669()
+ fun_l25_n895
+end
+
+def fun_l24_n670()
+ fun_l25_n258
+end
+
+def fun_l24_n671()
+ fun_l25_n12
+end
+
+def fun_l24_n672()
+ fun_l25_n397
+end
+
+def fun_l24_n673()
+ fun_l25_n967
+end
+
+def fun_l24_n674()
+ fun_l25_n960
+end
+
+def fun_l24_n675()
+ fun_l25_n867
+end
+
+def fun_l24_n676()
+ fun_l25_n438
+end
+
+def fun_l24_n677()
+ fun_l25_n692
+end
+
+def fun_l24_n678()
+ fun_l25_n161
+end
+
+def fun_l24_n679()
+ fun_l25_n122
+end
+
+def fun_l24_n680()
+ fun_l25_n344
+end
+
+def fun_l24_n681()
+ fun_l25_n285
+end
+
+def fun_l24_n682()
+ fun_l25_n838
+end
+
+def fun_l24_n683()
+ fun_l25_n80
+end
+
+def fun_l24_n684()
+ fun_l25_n81
+end
+
+def fun_l24_n685()
+ fun_l25_n811
+end
+
+def fun_l24_n686()
+ fun_l25_n998
+end
+
+def fun_l24_n687()
+ fun_l25_n739
+end
+
+def fun_l24_n688()
+ fun_l25_n660
+end
+
+def fun_l24_n689()
+ fun_l25_n965
+end
+
+def fun_l24_n690()
+ fun_l25_n124
+end
+
+def fun_l24_n691()
+ fun_l25_n879
+end
+
+def fun_l24_n692()
+ fun_l25_n669
+end
+
+def fun_l24_n693()
+ fun_l25_n428
+end
+
+def fun_l24_n694()
+ fun_l25_n143
+end
+
+def fun_l24_n695()
+ fun_l25_n103
+end
+
+def fun_l24_n696()
+ fun_l25_n738
+end
+
+def fun_l24_n697()
+ fun_l25_n188
+end
+
+def fun_l24_n698()
+ fun_l25_n657
+end
+
+def fun_l24_n699()
+ fun_l25_n258
+end
+
+def fun_l24_n700()
+ fun_l25_n878
+end
+
+def fun_l24_n701()
+ fun_l25_n927
+end
+
+def fun_l24_n702()
+ fun_l25_n9
+end
+
+def fun_l24_n703()
+ fun_l25_n41
+end
+
+def fun_l24_n704()
+ fun_l25_n925
+end
+
+def fun_l24_n705()
+ fun_l25_n473
+end
+
+def fun_l24_n706()
+ fun_l25_n321
+end
+
+def fun_l24_n707()
+ fun_l25_n778
+end
+
+def fun_l24_n708()
+ fun_l25_n951
+end
+
+def fun_l24_n709()
+ fun_l25_n91
+end
+
+def fun_l24_n710()
+ fun_l25_n297
+end
+
+def fun_l24_n711()
+ fun_l25_n185
+end
+
+def fun_l24_n712()
+ fun_l25_n822
+end
+
+def fun_l24_n713()
+ fun_l25_n817
+end
+
+def fun_l24_n714()
+ fun_l25_n558
+end
+
+def fun_l24_n715()
+ fun_l25_n15
+end
+
+def fun_l24_n716()
+ fun_l25_n106
+end
+
+def fun_l24_n717()
+ fun_l25_n173
+end
+
+def fun_l24_n718()
+ fun_l25_n565
+end
+
+def fun_l24_n719()
+ fun_l25_n832
+end
+
+def fun_l24_n720()
+ fun_l25_n798
+end
+
+def fun_l24_n721()
+ fun_l25_n333
+end
+
+def fun_l24_n722()
+ fun_l25_n631
+end
+
+def fun_l24_n723()
+ fun_l25_n135
+end
+
+def fun_l24_n724()
+ fun_l25_n826
+end
+
+def fun_l24_n725()
+ fun_l25_n878
+end
+
+def fun_l24_n726()
+ fun_l25_n612
+end
+
+def fun_l24_n727()
+ fun_l25_n302
+end
+
+def fun_l24_n728()
+ fun_l25_n636
+end
+
+def fun_l24_n729()
+ fun_l25_n308
+end
+
+def fun_l24_n730()
+ fun_l25_n633
+end
+
+def fun_l24_n731()
+ fun_l25_n596
+end
+
+def fun_l24_n732()
+ fun_l25_n948
+end
+
+def fun_l24_n733()
+ fun_l25_n93
+end
+
+def fun_l24_n734()
+ fun_l25_n175
+end
+
+def fun_l24_n735()
+ fun_l25_n590
+end
+
+def fun_l24_n736()
+ fun_l25_n168
+end
+
+def fun_l24_n737()
+ fun_l25_n861
+end
+
+def fun_l24_n738()
+ fun_l25_n890
+end
+
+def fun_l24_n739()
+ fun_l25_n355
+end
+
+def fun_l24_n740()
+ fun_l25_n166
+end
+
+def fun_l24_n741()
+ fun_l25_n397
+end
+
+def fun_l24_n742()
+ fun_l25_n665
+end
+
+def fun_l24_n743()
+ fun_l25_n436
+end
+
+def fun_l24_n744()
+ fun_l25_n274
+end
+
+def fun_l24_n745()
+ fun_l25_n44
+end
+
+def fun_l24_n746()
+ fun_l25_n765
+end
+
+def fun_l24_n747()
+ fun_l25_n916
+end
+
+def fun_l24_n748()
+ fun_l25_n735
+end
+
+def fun_l24_n749()
+ fun_l25_n745
+end
+
+def fun_l24_n750()
+ fun_l25_n813
+end
+
+def fun_l24_n751()
+ fun_l25_n26
+end
+
+def fun_l24_n752()
+ fun_l25_n223
+end
+
+def fun_l24_n753()
+ fun_l25_n256
+end
+
+def fun_l24_n754()
+ fun_l25_n852
+end
+
+def fun_l24_n755()
+ fun_l25_n400
+end
+
+def fun_l24_n756()
+ fun_l25_n973
+end
+
+def fun_l24_n757()
+ fun_l25_n900
+end
+
+def fun_l24_n758()
+ fun_l25_n884
+end
+
+def fun_l24_n759()
+ fun_l25_n171
+end
+
+def fun_l24_n760()
+ fun_l25_n155
+end
+
+def fun_l24_n761()
+ fun_l25_n310
+end
+
+def fun_l24_n762()
+ fun_l25_n706
+end
+
+def fun_l24_n763()
+ fun_l25_n324
+end
+
+def fun_l24_n764()
+ fun_l25_n260
+end
+
+def fun_l24_n765()
+ fun_l25_n247
+end
+
+def fun_l24_n766()
+ fun_l25_n750
+end
+
+def fun_l24_n767()
+ fun_l25_n236
+end
+
+def fun_l24_n768()
+ fun_l25_n956
+end
+
+def fun_l24_n769()
+ fun_l25_n736
+end
+
+def fun_l24_n770()
+ fun_l25_n510
+end
+
+def fun_l24_n771()
+ fun_l25_n101
+end
+
+def fun_l24_n772()
+ fun_l25_n189
+end
+
+def fun_l24_n773()
+ fun_l25_n391
+end
+
+def fun_l24_n774()
+ fun_l25_n212
+end
+
+def fun_l24_n775()
+ fun_l25_n500
+end
+
+def fun_l24_n776()
+ fun_l25_n95
+end
+
+def fun_l24_n777()
+ fun_l25_n30
+end
+
+def fun_l24_n778()
+ fun_l25_n99
+end
+
+def fun_l24_n779()
+ fun_l25_n427
+end
+
+def fun_l24_n780()
+ fun_l25_n659
+end
+
+def fun_l24_n781()
+ fun_l25_n665
+end
+
+def fun_l24_n782()
+ fun_l25_n992
+end
+
+def fun_l24_n783()
+ fun_l25_n180
+end
+
+def fun_l24_n784()
+ fun_l25_n546
+end
+
+def fun_l24_n785()
+ fun_l25_n618
+end
+
+def fun_l24_n786()
+ fun_l25_n615
+end
+
+def fun_l24_n787()
+ fun_l25_n126
+end
+
+def fun_l24_n788()
+ fun_l25_n383
+end
+
+def fun_l24_n789()
+ fun_l25_n429
+end
+
+def fun_l24_n790()
+ fun_l25_n95
+end
+
+def fun_l24_n791()
+ fun_l25_n47
+end
+
+def fun_l24_n792()
+ fun_l25_n582
+end
+
+def fun_l24_n793()
+ fun_l25_n209
+end
+
+def fun_l24_n794()
+ fun_l25_n925
+end
+
+def fun_l24_n795()
+ fun_l25_n746
+end
+
+def fun_l24_n796()
+ fun_l25_n330
+end
+
+def fun_l24_n797()
+ fun_l25_n964
+end
+
+def fun_l24_n798()
+ fun_l25_n241
+end
+
+def fun_l24_n799()
+ fun_l25_n136
+end
+
+def fun_l24_n800()
+ fun_l25_n10
+end
+
+def fun_l24_n801()
+ fun_l25_n255
+end
+
+def fun_l24_n802()
+ fun_l25_n481
+end
+
+def fun_l24_n803()
+ fun_l25_n697
+end
+
+def fun_l24_n804()
+ fun_l25_n275
+end
+
+def fun_l24_n805()
+ fun_l25_n389
+end
+
+def fun_l24_n806()
+ fun_l25_n540
+end
+
+def fun_l24_n807()
+ fun_l25_n182
+end
+
+def fun_l24_n808()
+ fun_l25_n894
+end
+
+def fun_l24_n809()
+ fun_l25_n339
+end
+
+def fun_l24_n810()
+ fun_l25_n409
+end
+
+def fun_l24_n811()
+ fun_l25_n106
+end
+
+def fun_l24_n812()
+ fun_l25_n297
+end
+
+def fun_l24_n813()
+ fun_l25_n477
+end
+
+def fun_l24_n814()
+ fun_l25_n431
+end
+
+def fun_l24_n815()
+ fun_l25_n507
+end
+
+def fun_l24_n816()
+ fun_l25_n311
+end
+
+def fun_l24_n817()
+ fun_l25_n350
+end
+
+def fun_l24_n818()
+ fun_l25_n486
+end
+
+def fun_l24_n819()
+ fun_l25_n872
+end
+
+def fun_l24_n820()
+ fun_l25_n21
+end
+
+def fun_l24_n821()
+ fun_l25_n108
+end
+
+def fun_l24_n822()
+ fun_l25_n383
+end
+
+def fun_l24_n823()
+ fun_l25_n389
+end
+
+def fun_l24_n824()
+ fun_l25_n901
+end
+
+def fun_l24_n825()
+ fun_l25_n94
+end
+
+def fun_l24_n826()
+ fun_l25_n122
+end
+
+def fun_l24_n827()
+ fun_l25_n399
+end
+
+def fun_l24_n828()
+ fun_l25_n424
+end
+
+def fun_l24_n829()
+ fun_l25_n59
+end
+
+def fun_l24_n830()
+ fun_l25_n477
+end
+
+def fun_l24_n831()
+ fun_l25_n766
+end
+
+def fun_l24_n832()
+ fun_l25_n340
+end
+
+def fun_l24_n833()
+ fun_l25_n925
+end
+
+def fun_l24_n834()
+ fun_l25_n993
+end
+
+def fun_l24_n835()
+ fun_l25_n444
+end
+
+def fun_l24_n836()
+ fun_l25_n580
+end
+
+def fun_l24_n837()
+ fun_l25_n997
+end
+
+def fun_l24_n838()
+ fun_l25_n651
+end
+
+def fun_l24_n839()
+ fun_l25_n991
+end
+
+def fun_l24_n840()
+ fun_l25_n850
+end
+
+def fun_l24_n841()
+ fun_l25_n563
+end
+
+def fun_l24_n842()
+ fun_l25_n175
+end
+
+def fun_l24_n843()
+ fun_l25_n77
+end
+
+def fun_l24_n844()
+ fun_l25_n300
+end
+
+def fun_l24_n845()
+ fun_l25_n510
+end
+
+def fun_l24_n846()
+ fun_l25_n871
+end
+
+def fun_l24_n847()
+ fun_l25_n437
+end
+
+def fun_l24_n848()
+ fun_l25_n609
+end
+
+def fun_l24_n849()
+ fun_l25_n505
+end
+
+def fun_l24_n850()
+ fun_l25_n989
+end
+
+def fun_l24_n851()
+ fun_l25_n595
+end
+
+def fun_l24_n852()
+ fun_l25_n917
+end
+
+def fun_l24_n853()
+ fun_l25_n39
+end
+
+def fun_l24_n854()
+ fun_l25_n795
+end
+
+def fun_l24_n855()
+ fun_l25_n242
+end
+
+def fun_l24_n856()
+ fun_l25_n220
+end
+
+def fun_l24_n857()
+ fun_l25_n537
+end
+
+def fun_l24_n858()
+ fun_l25_n790
+end
+
+def fun_l24_n859()
+ fun_l25_n160
+end
+
+def fun_l24_n860()
+ fun_l25_n685
+end
+
+def fun_l24_n861()
+ fun_l25_n665
+end
+
+def fun_l24_n862()
+ fun_l25_n448
+end
+
+def fun_l24_n863()
+ fun_l25_n75
+end
+
+def fun_l24_n864()
+ fun_l25_n293
+end
+
+def fun_l24_n865()
+ fun_l25_n721
+end
+
+def fun_l24_n866()
+ fun_l25_n113
+end
+
+def fun_l24_n867()
+ fun_l25_n565
+end
+
+def fun_l24_n868()
+ fun_l25_n95
+end
+
+def fun_l24_n869()
+ fun_l25_n373
+end
+
+def fun_l24_n870()
+ fun_l25_n351
+end
+
+def fun_l24_n871()
+ fun_l25_n151
+end
+
+def fun_l24_n872()
+ fun_l25_n489
+end
+
+def fun_l24_n873()
+ fun_l25_n882
+end
+
+def fun_l24_n874()
+ fun_l25_n415
+end
+
+def fun_l24_n875()
+ fun_l25_n237
+end
+
+def fun_l24_n876()
+ fun_l25_n59
+end
+
+def fun_l24_n877()
+ fun_l25_n747
+end
+
+def fun_l24_n878()
+ fun_l25_n897
+end
+
+def fun_l24_n879()
+ fun_l25_n746
+end
+
+def fun_l24_n880()
+ fun_l25_n695
+end
+
+def fun_l24_n881()
+ fun_l25_n924
+end
+
+def fun_l24_n882()
+ fun_l25_n933
+end
+
+def fun_l24_n883()
+ fun_l25_n702
+end
+
+def fun_l24_n884()
+ fun_l25_n107
+end
+
+def fun_l24_n885()
+ fun_l25_n333
+end
+
+def fun_l24_n886()
+ fun_l25_n536
+end
+
+def fun_l24_n887()
+ fun_l25_n908
+end
+
+def fun_l24_n888()
+ fun_l25_n84
+end
+
+def fun_l24_n889()
+ fun_l25_n622
+end
+
+def fun_l24_n890()
+ fun_l25_n466
+end
+
+def fun_l24_n891()
+ fun_l25_n344
+end
+
+def fun_l24_n892()
+ fun_l25_n271
+end
+
+def fun_l24_n893()
+ fun_l25_n461
+end
+
+def fun_l24_n894()
+ fun_l25_n297
+end
+
+def fun_l24_n895()
+ fun_l25_n415
+end
+
+def fun_l24_n896()
+ fun_l25_n419
+end
+
+def fun_l24_n897()
+ fun_l25_n374
+end
+
+def fun_l24_n898()
+ fun_l25_n976
+end
+
+def fun_l24_n899()
+ fun_l25_n888
+end
+
+def fun_l24_n900()
+ fun_l25_n540
+end
+
+def fun_l24_n901()
+ fun_l25_n491
+end
+
+def fun_l24_n902()
+ fun_l25_n178
+end
+
+def fun_l24_n903()
+ fun_l25_n197
+end
+
+def fun_l24_n904()
+ fun_l25_n474
+end
+
+def fun_l24_n905()
+ fun_l25_n371
+end
+
+def fun_l24_n906()
+ fun_l25_n960
+end
+
+def fun_l24_n907()
+ fun_l25_n808
+end
+
+def fun_l24_n908()
+ fun_l25_n89
+end
+
+def fun_l24_n909()
+ fun_l25_n892
+end
+
+def fun_l24_n910()
+ fun_l25_n457
+end
+
+def fun_l24_n911()
+ fun_l25_n105
+end
+
+def fun_l24_n912()
+ fun_l25_n787
+end
+
+def fun_l24_n913()
+ fun_l25_n554
+end
+
+def fun_l24_n914()
+ fun_l25_n615
+end
+
+def fun_l24_n915()
+ fun_l25_n61
+end
+
+def fun_l24_n916()
+ fun_l25_n162
+end
+
+def fun_l24_n917()
+ fun_l25_n354
+end
+
+def fun_l24_n918()
+ fun_l25_n388
+end
+
+def fun_l24_n919()
+ fun_l25_n660
+end
+
+def fun_l24_n920()
+ fun_l25_n705
+end
+
+def fun_l24_n921()
+ fun_l25_n990
+end
+
+def fun_l24_n922()
+ fun_l25_n725
+end
+
+def fun_l24_n923()
+ fun_l25_n800
+end
+
+def fun_l24_n924()
+ fun_l25_n368
+end
+
+def fun_l24_n925()
+ fun_l25_n986
+end
+
+def fun_l24_n926()
+ fun_l25_n509
+end
+
+def fun_l24_n927()
+ fun_l25_n706
+end
+
+def fun_l24_n928()
+ fun_l25_n777
+end
+
+def fun_l24_n929()
+ fun_l25_n223
+end
+
+def fun_l24_n930()
+ fun_l25_n972
+end
+
+def fun_l24_n931()
+ fun_l25_n868
+end
+
+def fun_l24_n932()
+ fun_l25_n170
+end
+
+def fun_l24_n933()
+ fun_l25_n176
+end
+
+def fun_l24_n934()
+ fun_l25_n667
+end
+
+def fun_l24_n935()
+ fun_l25_n312
+end
+
+def fun_l24_n936()
+ fun_l25_n680
+end
+
+def fun_l24_n937()
+ fun_l25_n183
+end
+
+def fun_l24_n938()
+ fun_l25_n880
+end
+
+def fun_l24_n939()
+ fun_l25_n634
+end
+
+def fun_l24_n940()
+ fun_l25_n716
+end
+
+def fun_l24_n941()
+ fun_l25_n16
+end
+
+def fun_l24_n942()
+ fun_l25_n227
+end
+
+def fun_l24_n943()
+ fun_l25_n423
+end
+
+def fun_l24_n944()
+ fun_l25_n268
+end
+
+def fun_l24_n945()
+ fun_l25_n947
+end
+
+def fun_l24_n946()
+ fun_l25_n675
+end
+
+def fun_l24_n947()
+ fun_l25_n575
+end
+
+def fun_l24_n948()
+ fun_l25_n280
+end
+
+def fun_l24_n949()
+ fun_l25_n698
+end
+
+def fun_l24_n950()
+ fun_l25_n769
+end
+
+def fun_l24_n951()
+ fun_l25_n225
+end
+
+def fun_l24_n952()
+ fun_l25_n171
+end
+
+def fun_l24_n953()
+ fun_l25_n464
+end
+
+def fun_l24_n954()
+ fun_l25_n662
+end
+
+def fun_l24_n955()
+ fun_l25_n621
+end
+
+def fun_l24_n956()
+ fun_l25_n391
+end
+
+def fun_l24_n957()
+ fun_l25_n340
+end
+
+def fun_l24_n958()
+ fun_l25_n634
+end
+
+def fun_l24_n959()
+ fun_l25_n31
+end
+
+def fun_l24_n960()
+ fun_l25_n132
+end
+
+def fun_l24_n961()
+ fun_l25_n867
+end
+
+def fun_l24_n962()
+ fun_l25_n946
+end
+
+def fun_l24_n963()
+ fun_l25_n339
+end
+
+def fun_l24_n964()
+ fun_l25_n497
+end
+
+def fun_l24_n965()
+ fun_l25_n289
+end
+
+def fun_l24_n966()
+ fun_l25_n842
+end
+
+def fun_l24_n967()
+ fun_l25_n583
+end
+
+def fun_l24_n968()
+ fun_l25_n52
+end
+
+def fun_l24_n969()
+ fun_l25_n177
+end
+
+def fun_l24_n970()
+ fun_l25_n935
+end
+
+def fun_l24_n971()
+ fun_l25_n963
+end
+
+def fun_l24_n972()
+ fun_l25_n779
+end
+
+def fun_l24_n973()
+ fun_l25_n457
+end
+
+def fun_l24_n974()
+ fun_l25_n480
+end
+
+def fun_l24_n975()
+ fun_l25_n333
+end
+
+def fun_l24_n976()
+ fun_l25_n191
+end
+
+def fun_l24_n977()
+ fun_l25_n670
+end
+
+def fun_l24_n978()
+ fun_l25_n822
+end
+
+def fun_l24_n979()
+ fun_l25_n302
+end
+
+def fun_l24_n980()
+ fun_l25_n272
+end
+
+def fun_l24_n981()
+ fun_l25_n467
+end
+
+def fun_l24_n982()
+ fun_l25_n209
+end
+
+def fun_l24_n983()
+ fun_l25_n603
+end
+
+def fun_l24_n984()
+ fun_l25_n134
+end
+
+def fun_l24_n985()
+ fun_l25_n639
+end
+
+def fun_l24_n986()
+ fun_l25_n843
+end
+
+def fun_l24_n987()
+ fun_l25_n576
+end
+
+def fun_l24_n988()
+ fun_l25_n7
+end
+
+def fun_l24_n989()
+ fun_l25_n93
+end
+
+def fun_l24_n990()
+ fun_l25_n351
+end
+
+def fun_l24_n991()
+ fun_l25_n932
+end
+
+def fun_l24_n992()
+ fun_l25_n987
+end
+
+def fun_l24_n993()
+ fun_l25_n796
+end
+
+def fun_l24_n994()
+ fun_l25_n202
+end
+
+def fun_l24_n995()
+ fun_l25_n125
+end
+
+def fun_l24_n996()
+ fun_l25_n404
+end
+
+def fun_l24_n997()
+ fun_l25_n750
+end
+
+def fun_l24_n998()
+ fun_l25_n50
+end
+
+def fun_l24_n999()
+ fun_l25_n71
+end
+
+def fun_l25_n0()
+ fun_l26_n73
+end
+
+def fun_l25_n1()
+ fun_l26_n572
+end
+
+def fun_l25_n2()
+ fun_l26_n639
+end
+
+def fun_l25_n3()
+ fun_l26_n292
+end
+
+def fun_l25_n4()
+ fun_l26_n865
+end
+
+def fun_l25_n5()
+ fun_l26_n618
+end
+
+def fun_l25_n6()
+ fun_l26_n84
+end
+
+def fun_l25_n7()
+ fun_l26_n351
+end
+
+def fun_l25_n8()
+ fun_l26_n534
+end
+
+def fun_l25_n9()
+ fun_l26_n483
+end
+
+def fun_l25_n10()
+ fun_l26_n589
+end
+
+def fun_l25_n11()
+ fun_l26_n450
+end
+
+def fun_l25_n12()
+ fun_l26_n948
+end
+
+def fun_l25_n13()
+ fun_l26_n819
+end
+
+def fun_l25_n14()
+ fun_l26_n845
+end
+
+def fun_l25_n15()
+ fun_l26_n544
+end
+
+def fun_l25_n16()
+ fun_l26_n254
+end
+
+def fun_l25_n17()
+ fun_l26_n71
+end
+
+def fun_l25_n18()
+ fun_l26_n640
+end
+
+def fun_l25_n19()
+ fun_l26_n885
+end
+
+def fun_l25_n20()
+ fun_l26_n725
+end
+
+def fun_l25_n21()
+ fun_l26_n798
+end
+
+def fun_l25_n22()
+ fun_l26_n838
+end
+
+def fun_l25_n23()
+ fun_l26_n835
+end
+
+def fun_l25_n24()
+ fun_l26_n170
+end
+
+def fun_l25_n25()
+ fun_l26_n3
+end
+
+def fun_l25_n26()
+ fun_l26_n910
+end
+
+def fun_l25_n27()
+ fun_l26_n575
+end
+
+def fun_l25_n28()
+ fun_l26_n834
+end
+
+def fun_l25_n29()
+ fun_l26_n767
+end
+
+def fun_l25_n30()
+ fun_l26_n375
+end
+
+def fun_l25_n31()
+ fun_l26_n781
+end
+
+def fun_l25_n32()
+ fun_l26_n173
+end
+
+def fun_l25_n33()
+ fun_l26_n382
+end
+
+def fun_l25_n34()
+ fun_l26_n974
+end
+
+def fun_l25_n35()
+ fun_l26_n14
+end
+
+def fun_l25_n36()
+ fun_l26_n730
+end
+
+def fun_l25_n37()
+ fun_l26_n253
+end
+
+def fun_l25_n38()
+ fun_l26_n405
+end
+
+def fun_l25_n39()
+ fun_l26_n903
+end
+
+def fun_l25_n40()
+ fun_l26_n621
+end
+
+def fun_l25_n41()
+ fun_l26_n309
+end
+
+def fun_l25_n42()
+ fun_l26_n572
+end
+
+def fun_l25_n43()
+ fun_l26_n857
+end
+
+def fun_l25_n44()
+ fun_l26_n769
+end
+
+def fun_l25_n45()
+ fun_l26_n371
+end
+
+def fun_l25_n46()
+ fun_l26_n866
+end
+
+def fun_l25_n47()
+ fun_l26_n279
+end
+
+def fun_l25_n48()
+ fun_l26_n360
+end
+
+def fun_l25_n49()
+ fun_l26_n80
+end
+
+def fun_l25_n50()
+ fun_l26_n101
+end
+
+def fun_l25_n51()
+ fun_l26_n32
+end
+
+def fun_l25_n52()
+ fun_l26_n815
+end
+
+def fun_l25_n53()
+ fun_l26_n599
+end
+
+def fun_l25_n54()
+ fun_l26_n999
+end
+
+def fun_l25_n55()
+ fun_l26_n264
+end
+
+def fun_l25_n56()
+ fun_l26_n941
+end
+
+def fun_l25_n57()
+ fun_l26_n735
+end
+
+def fun_l25_n58()
+ fun_l26_n563
+end
+
+def fun_l25_n59()
+ fun_l26_n439
+end
+
+def fun_l25_n60()
+ fun_l26_n326
+end
+
+def fun_l25_n61()
+ fun_l26_n577
+end
+
+def fun_l25_n62()
+ fun_l26_n174
+end
+
+def fun_l25_n63()
+ fun_l26_n839
+end
+
+def fun_l25_n64()
+ fun_l26_n238
+end
+
+def fun_l25_n65()
+ fun_l26_n953
+end
+
+def fun_l25_n66()
+ fun_l26_n940
+end
+
+def fun_l25_n67()
+ fun_l26_n349
+end
+
+def fun_l25_n68()
+ fun_l26_n675
+end
+
+def fun_l25_n69()
+ fun_l26_n376
+end
+
+def fun_l25_n70()
+ fun_l26_n653
+end
+
+def fun_l25_n71()
+ fun_l26_n377
+end
+
+def fun_l25_n72()
+ fun_l26_n977
+end
+
+def fun_l25_n73()
+ fun_l26_n487
+end
+
+def fun_l25_n74()
+ fun_l26_n722
+end
+
+def fun_l25_n75()
+ fun_l26_n18
+end
+
+def fun_l25_n76()
+ fun_l26_n539
+end
+
+def fun_l25_n77()
+ fun_l26_n825
+end
+
+def fun_l25_n78()
+ fun_l26_n990
+end
+
+def fun_l25_n79()
+ fun_l26_n554
+end
+
+def fun_l25_n80()
+ fun_l26_n715
+end
+
+def fun_l25_n81()
+ fun_l26_n67
+end
+
+def fun_l25_n82()
+ fun_l26_n143
+end
+
+def fun_l25_n83()
+ fun_l26_n99
+end
+
+def fun_l25_n84()
+ fun_l26_n703
+end
+
+def fun_l25_n85()
+ fun_l26_n277
+end
+
+def fun_l25_n86()
+ fun_l26_n283
+end
+
+def fun_l25_n87()
+ fun_l26_n74
+end
+
+def fun_l25_n88()
+ fun_l26_n680
+end
+
+def fun_l25_n89()
+ fun_l26_n269
+end
+
+def fun_l25_n90()
+ fun_l26_n255
+end
+
+def fun_l25_n91()
+ fun_l26_n974
+end
+
+def fun_l25_n92()
+ fun_l26_n109
+end
+
+def fun_l25_n93()
+ fun_l26_n672
+end
+
+def fun_l25_n94()
+ fun_l26_n418
+end
+
+def fun_l25_n95()
+ fun_l26_n75
+end
+
+def fun_l25_n96()
+ fun_l26_n500
+end
+
+def fun_l25_n97()
+ fun_l26_n286
+end
+
+def fun_l25_n98()
+ fun_l26_n890
+end
+
+def fun_l25_n99()
+ fun_l26_n161
+end
+
+def fun_l25_n100()
+ fun_l26_n16
+end
+
+def fun_l25_n101()
+ fun_l26_n742
+end
+
+def fun_l25_n102()
+ fun_l26_n592
+end
+
+def fun_l25_n103()
+ fun_l26_n600
+end
+
+def fun_l25_n104()
+ fun_l26_n665
+end
+
+def fun_l25_n105()
+ fun_l26_n721
+end
+
+def fun_l25_n106()
+ fun_l26_n461
+end
+
+def fun_l25_n107()
+ fun_l26_n818
+end
+
+def fun_l25_n108()
+ fun_l26_n132
+end
+
+def fun_l25_n109()
+ fun_l26_n245
+end
+
+def fun_l25_n110()
+ fun_l26_n511
+end
+
+def fun_l25_n111()
+ fun_l26_n386
+end
+
+def fun_l25_n112()
+ fun_l26_n77
+end
+
+def fun_l25_n113()
+ fun_l26_n329
+end
+
+def fun_l25_n114()
+ fun_l26_n157
+end
+
+def fun_l25_n115()
+ fun_l26_n220
+end
+
+def fun_l25_n116()
+ fun_l26_n880
+end
+
+def fun_l25_n117()
+ fun_l26_n799
+end
+
+def fun_l25_n118()
+ fun_l26_n879
+end
+
+def fun_l25_n119()
+ fun_l26_n639
+end
+
+def fun_l25_n120()
+ fun_l26_n257
+end
+
+def fun_l25_n121()
+ fun_l26_n921
+end
+
+def fun_l25_n122()
+ fun_l26_n115
+end
+
+def fun_l25_n123()
+ fun_l26_n569
+end
+
+def fun_l25_n124()
+ fun_l26_n504
+end
+
+def fun_l25_n125()
+ fun_l26_n962
+end
+
+def fun_l25_n126()
+ fun_l26_n854
+end
+
+def fun_l25_n127()
+ fun_l26_n619
+end
+
+def fun_l25_n128()
+ fun_l26_n657
+end
+
+def fun_l25_n129()
+ fun_l26_n389
+end
+
+def fun_l25_n130()
+ fun_l26_n515
+end
+
+def fun_l25_n131()
+ fun_l26_n253
+end
+
+def fun_l25_n132()
+ fun_l26_n311
+end
+
+def fun_l25_n133()
+ fun_l26_n587
+end
+
+def fun_l25_n134()
+ fun_l26_n802
+end
+
+def fun_l25_n135()
+ fun_l26_n29
+end
+
+def fun_l25_n136()
+ fun_l26_n324
+end
+
+def fun_l25_n137()
+ fun_l26_n892
+end
+
+def fun_l25_n138()
+ fun_l26_n871
+end
+
+def fun_l25_n139()
+ fun_l26_n748
+end
+
+def fun_l25_n140()
+ fun_l26_n7
+end
+
+def fun_l25_n141()
+ fun_l26_n77
+end
+
+def fun_l25_n142()
+ fun_l26_n948
+end
+
+def fun_l25_n143()
+ fun_l26_n624
+end
+
+def fun_l25_n144()
+ fun_l26_n908
+end
+
+def fun_l25_n145()
+ fun_l26_n362
+end
+
+def fun_l25_n146()
+ fun_l26_n653
+end
+
+def fun_l25_n147()
+ fun_l26_n806
+end
+
+def fun_l25_n148()
+ fun_l26_n959
+end
+
+def fun_l25_n149()
+ fun_l26_n677
+end
+
+def fun_l25_n150()
+ fun_l26_n697
+end
+
+def fun_l25_n151()
+ fun_l26_n12
+end
+
+def fun_l25_n152()
+ fun_l26_n67
+end
+
+def fun_l25_n153()
+ fun_l26_n451
+end
+
+def fun_l25_n154()
+ fun_l26_n887
+end
+
+def fun_l25_n155()
+ fun_l26_n908
+end
+
+def fun_l25_n156()
+ fun_l26_n382
+end
+
+def fun_l25_n157()
+ fun_l26_n977
+end
+
+def fun_l25_n158()
+ fun_l26_n62
+end
+
+def fun_l25_n159()
+ fun_l26_n307
+end
+
+def fun_l25_n160()
+ fun_l26_n583
+end
+
+def fun_l25_n161()
+ fun_l26_n291
+end
+
+def fun_l25_n162()
+ fun_l26_n736
+end
+
+def fun_l25_n163()
+ fun_l26_n954
+end
+
+def fun_l25_n164()
+ fun_l26_n414
+end
+
+def fun_l25_n165()
+ fun_l26_n945
+end
+
+def fun_l25_n166()
+ fun_l26_n947
+end
+
+def fun_l25_n167()
+ fun_l26_n639
+end
+
+def fun_l25_n168()
+ fun_l26_n875
+end
+
+def fun_l25_n169()
+ fun_l26_n994
+end
+
+def fun_l25_n170()
+ fun_l26_n855
+end
+
+def fun_l25_n171()
+ fun_l26_n539
+end
+
+def fun_l25_n172()
+ fun_l26_n108
+end
+
+def fun_l25_n173()
+ fun_l26_n806
+end
+
+def fun_l25_n174()
+ fun_l26_n838
+end
+
+def fun_l25_n175()
+ fun_l26_n688
+end
+
+def fun_l25_n176()
+ fun_l26_n696
+end
+
+def fun_l25_n177()
+ fun_l26_n979
+end
+
+def fun_l25_n178()
+ fun_l26_n261
+end
+
+def fun_l25_n179()
+ fun_l26_n266
+end
+
+def fun_l25_n180()
+ fun_l26_n907
+end
+
+def fun_l25_n181()
+ fun_l26_n622
+end
+
+def fun_l25_n182()
+ fun_l26_n42
+end
+
+def fun_l25_n183()
+ fun_l26_n840
+end
+
+def fun_l25_n184()
+ fun_l26_n125
+end
+
+def fun_l25_n185()
+ fun_l26_n402
+end
+
+def fun_l25_n186()
+ fun_l26_n401
+end
+
+def fun_l25_n187()
+ fun_l26_n410
+end
+
+def fun_l25_n188()
+ fun_l26_n552
+end
+
+def fun_l25_n189()
+ fun_l26_n528
+end
+
+def fun_l25_n190()
+ fun_l26_n171
+end
+
+def fun_l25_n191()
+ fun_l26_n787
+end
+
+def fun_l25_n192()
+ fun_l26_n453
+end
+
+def fun_l25_n193()
+ fun_l26_n107
+end
+
+def fun_l25_n194()
+ fun_l26_n171
+end
+
+def fun_l25_n195()
+ fun_l26_n159
+end
+
+def fun_l25_n196()
+ fun_l26_n801
+end
+
+def fun_l25_n197()
+ fun_l26_n569
+end
+
+def fun_l25_n198()
+ fun_l26_n899
+end
+
+def fun_l25_n199()
+ fun_l26_n434
+end
+
+def fun_l25_n200()
+ fun_l26_n943
+end
+
+def fun_l25_n201()
+ fun_l26_n455
+end
+
+def fun_l25_n202()
+ fun_l26_n239
+end
+
+def fun_l25_n203()
+ fun_l26_n892
+end
+
+def fun_l25_n204()
+ fun_l26_n332
+end
+
+def fun_l25_n205()
+ fun_l26_n95
+end
+
+def fun_l25_n206()
+ fun_l26_n735
+end
+
+def fun_l25_n207()
+ fun_l26_n517
+end
+
+def fun_l25_n208()
+ fun_l26_n41
+end
+
+def fun_l25_n209()
+ fun_l26_n827
+end
+
+def fun_l25_n210()
+ fun_l26_n557
+end
+
+def fun_l25_n211()
+ fun_l26_n184
+end
+
+def fun_l25_n212()
+ fun_l26_n123
+end
+
+def fun_l25_n213()
+ fun_l26_n476
+end
+
+def fun_l25_n214()
+ fun_l26_n346
+end
+
+def fun_l25_n215()
+ fun_l26_n720
+end
+
+def fun_l25_n216()
+ fun_l26_n905
+end
+
+def fun_l25_n217()
+ fun_l26_n911
+end
+
+def fun_l25_n218()
+ fun_l26_n317
+end
+
+def fun_l25_n219()
+ fun_l26_n930
+end
+
+def fun_l25_n220()
+ fun_l26_n539
+end
+
+def fun_l25_n221()
+ fun_l26_n173
+end
+
+def fun_l25_n222()
+ fun_l26_n441
+end
+
+def fun_l25_n223()
+ fun_l26_n345
+end
+
+def fun_l25_n224()
+ fun_l26_n463
+end
+
+def fun_l25_n225()
+ fun_l26_n568
+end
+
+def fun_l25_n226()
+ fun_l26_n783
+end
+
+def fun_l25_n227()
+ fun_l26_n359
+end
+
+def fun_l25_n228()
+ fun_l26_n523
+end
+
+def fun_l25_n229()
+ fun_l26_n895
+end
+
+def fun_l25_n230()
+ fun_l26_n159
+end
+
+def fun_l25_n231()
+ fun_l26_n259
+end
+
+def fun_l25_n232()
+ fun_l26_n373
+end
+
+def fun_l25_n233()
+ fun_l26_n471
+end
+
+def fun_l25_n234()
+ fun_l26_n448
+end
+
+def fun_l25_n235()
+ fun_l26_n139
+end
+
+def fun_l25_n236()
+ fun_l26_n795
+end
+
+def fun_l25_n237()
+ fun_l26_n492
+end
+
+def fun_l25_n238()
+ fun_l26_n292
+end
+
+def fun_l25_n239()
+ fun_l26_n253
+end
+
+def fun_l25_n240()
+ fun_l26_n870
+end
+
+def fun_l25_n241()
+ fun_l26_n504
+end
+
+def fun_l25_n242()
+ fun_l26_n315
+end
+
+def fun_l25_n243()
+ fun_l26_n542
+end
+
+def fun_l25_n244()
+ fun_l26_n368
+end
+
+def fun_l25_n245()
+ fun_l26_n954
+end
+
+def fun_l25_n246()
+ fun_l26_n589
+end
+
+def fun_l25_n247()
+ fun_l26_n102
+end
+
+def fun_l25_n248()
+ fun_l26_n839
+end
+
+def fun_l25_n249()
+ fun_l26_n493
+end
+
+def fun_l25_n250()
+ fun_l26_n90
+end
+
+def fun_l25_n251()
+ fun_l26_n974
+end
+
+def fun_l25_n252()
+ fun_l26_n878
+end
+
+def fun_l25_n253()
+ fun_l26_n205
+end
+
+def fun_l25_n254()
+ fun_l26_n485
+end
+
+def fun_l25_n255()
+ fun_l26_n976
+end
+
+def fun_l25_n256()
+ fun_l26_n397
+end
+
+def fun_l25_n257()
+ fun_l26_n593
+end
+
+def fun_l25_n258()
+ fun_l26_n925
+end
+
+def fun_l25_n259()
+ fun_l26_n223
+end
+
+def fun_l25_n260()
+ fun_l26_n491
+end
+
+def fun_l25_n261()
+ fun_l26_n441
+end
+
+def fun_l25_n262()
+ fun_l26_n472
+end
+
+def fun_l25_n263()
+ fun_l26_n357
+end
+
+def fun_l25_n264()
+ fun_l26_n90
+end
+
+def fun_l25_n265()
+ fun_l26_n124
+end
+
+def fun_l25_n266()
+ fun_l26_n607
+end
+
+def fun_l25_n267()
+ fun_l26_n484
+end
+
+def fun_l25_n268()
+ fun_l26_n448
+end
+
+def fun_l25_n269()
+ fun_l26_n456
+end
+
+def fun_l25_n270()
+ fun_l26_n108
+end
+
+def fun_l25_n271()
+ fun_l26_n268
+end
+
+def fun_l25_n272()
+ fun_l26_n250
+end
+
+def fun_l25_n273()
+ fun_l26_n354
+end
+
+def fun_l25_n274()
+ fun_l26_n234
+end
+
+def fun_l25_n275()
+ fun_l26_n833
+end
+
+def fun_l25_n276()
+ fun_l26_n404
+end
+
+def fun_l25_n277()
+ fun_l26_n296
+end
+
+def fun_l25_n278()
+ fun_l26_n640
+end
+
+def fun_l25_n279()
+ fun_l26_n633
+end
+
+def fun_l25_n280()
+ fun_l26_n119
+end
+
+def fun_l25_n281()
+ fun_l26_n272
+end
+
+def fun_l25_n282()
+ fun_l26_n4
+end
+
+def fun_l25_n283()
+ fun_l26_n217
+end
+
+def fun_l25_n284()
+ fun_l26_n923
+end
+
+def fun_l25_n285()
+ fun_l26_n911
+end
+
+def fun_l25_n286()
+ fun_l26_n332
+end
+
+def fun_l25_n287()
+ fun_l26_n83
+end
+
+def fun_l25_n288()
+ fun_l26_n396
+end
+
+def fun_l25_n289()
+ fun_l26_n423
+end
+
+def fun_l25_n290()
+ fun_l26_n182
+end
+
+def fun_l25_n291()
+ fun_l26_n69
+end
+
+def fun_l25_n292()
+ fun_l26_n348
+end
+
+def fun_l25_n293()
+ fun_l26_n85
+end
+
+def fun_l25_n294()
+ fun_l26_n727
+end
+
+def fun_l25_n295()
+ fun_l26_n488
+end
+
+def fun_l25_n296()
+ fun_l26_n629
+end
+
+def fun_l25_n297()
+ fun_l26_n92
+end
+
+def fun_l25_n298()
+ fun_l26_n737
+end
+
+def fun_l25_n299()
+ fun_l26_n68
+end
+
+def fun_l25_n300()
+ fun_l26_n148
+end
+
+def fun_l25_n301()
+ fun_l26_n292
+end
+
+def fun_l25_n302()
+ fun_l26_n836
+end
+
+def fun_l25_n303()
+ fun_l26_n992
+end
+
+def fun_l25_n304()
+ fun_l26_n894
+end
+
+def fun_l25_n305()
+ fun_l26_n850
+end
+
+def fun_l25_n306()
+ fun_l26_n63
+end
+
+def fun_l25_n307()
+ fun_l26_n321
+end
+
+def fun_l25_n308()
+ fun_l26_n497
+end
+
+def fun_l25_n309()
+ fun_l26_n757
+end
+
+def fun_l25_n310()
+ fun_l26_n331
+end
+
+def fun_l25_n311()
+ fun_l26_n522
+end
+
+def fun_l25_n312()
+ fun_l26_n815
+end
+
+def fun_l25_n313()
+ fun_l26_n545
+end
+
+def fun_l25_n314()
+ fun_l26_n78
+end
+
+def fun_l25_n315()
+ fun_l26_n474
+end
+
+def fun_l25_n316()
+ fun_l26_n329
+end
+
+def fun_l25_n317()
+ fun_l26_n19
+end
+
+def fun_l25_n318()
+ fun_l26_n85
+end
+
+def fun_l25_n319()
+ fun_l26_n548
+end
+
+def fun_l25_n320()
+ fun_l26_n435
+end
+
+def fun_l25_n321()
+ fun_l26_n607
+end
+
+def fun_l25_n322()
+ fun_l26_n610
+end
+
+def fun_l25_n323()
+ fun_l26_n218
+end
+
+def fun_l25_n324()
+ fun_l26_n664
+end
+
+def fun_l25_n325()
+ fun_l26_n869
+end
+
+def fun_l25_n326()
+ fun_l26_n110
+end
+
+def fun_l25_n327()
+ fun_l26_n811
+end
+
+def fun_l25_n328()
+ fun_l26_n70
+end
+
+def fun_l25_n329()
+ fun_l26_n852
+end
+
+def fun_l25_n330()
+ fun_l26_n772
+end
+
+def fun_l25_n331()
+ fun_l26_n367
+end
+
+def fun_l25_n332()
+ fun_l26_n34
+end
+
+def fun_l25_n333()
+ fun_l26_n470
+end
+
+def fun_l25_n334()
+ fun_l26_n962
+end
+
+def fun_l25_n335()
+ fun_l26_n957
+end
+
+def fun_l25_n336()
+ fun_l26_n608
+end
+
+def fun_l25_n337()
+ fun_l26_n632
+end
+
+def fun_l25_n338()
+ fun_l26_n960
+end
+
+def fun_l25_n339()
+ fun_l26_n584
+end
+
+def fun_l25_n340()
+ fun_l26_n500
+end
+
+def fun_l25_n341()
+ fun_l26_n317
+end
+
+def fun_l25_n342()
+ fun_l26_n772
+end
+
+def fun_l25_n343()
+ fun_l26_n741
+end
+
+def fun_l25_n344()
+ fun_l26_n584
+end
+
+def fun_l25_n345()
+ fun_l26_n221
+end
+
+def fun_l25_n346()
+ fun_l26_n809
+end
+
+def fun_l25_n347()
+ fun_l26_n28
+end
+
+def fun_l25_n348()
+ fun_l26_n111
+end
+
+def fun_l25_n349()
+ fun_l26_n499
+end
+
+def fun_l25_n350()
+ fun_l26_n35
+end
+
+def fun_l25_n351()
+ fun_l26_n885
+end
+
+def fun_l25_n352()
+ fun_l26_n516
+end
+
+def fun_l25_n353()
+ fun_l26_n394
+end
+
+def fun_l25_n354()
+ fun_l26_n792
+end
+
+def fun_l25_n355()
+ fun_l26_n741
+end
+
+def fun_l25_n356()
+ fun_l26_n851
+end
+
+def fun_l25_n357()
+ fun_l26_n483
+end
+
+def fun_l25_n358()
+ fun_l26_n464
+end
+
+def fun_l25_n359()
+ fun_l26_n886
+end
+
+def fun_l25_n360()
+ fun_l26_n479
+end
+
+def fun_l25_n361()
+ fun_l26_n31
+end
+
+def fun_l25_n362()
+ fun_l26_n154
+end
+
+def fun_l25_n363()
+ fun_l26_n178
+end
+
+def fun_l25_n364()
+ fun_l26_n390
+end
+
+def fun_l25_n365()
+ fun_l26_n597
+end
+
+def fun_l25_n366()
+ fun_l26_n85
+end
+
+def fun_l25_n367()
+ fun_l26_n614
+end
+
+def fun_l25_n368()
+ fun_l26_n796
+end
+
+def fun_l25_n369()
+ fun_l26_n627
+end
+
+def fun_l25_n370()
+ fun_l26_n581
+end
+
+def fun_l25_n371()
+ fun_l26_n63
+end
+
+def fun_l25_n372()
+ fun_l26_n708
+end
+
+def fun_l25_n373()
+ fun_l26_n858
+end
+
+def fun_l25_n374()
+ fun_l26_n143
+end
+
+def fun_l25_n375()
+ fun_l26_n742
+end
+
+def fun_l25_n376()
+ fun_l26_n54
+end
+
+def fun_l25_n377()
+ fun_l26_n299
+end
+
+def fun_l25_n378()
+ fun_l26_n465
+end
+
+def fun_l25_n379()
+ fun_l26_n207
+end
+
+def fun_l25_n380()
+ fun_l26_n3
+end
+
+def fun_l25_n381()
+ fun_l26_n648
+end
+
+def fun_l25_n382()
+ fun_l26_n7
+end
+
+def fun_l25_n383()
+ fun_l26_n586
+end
+
+def fun_l25_n384()
+ fun_l26_n884
+end
+
+def fun_l25_n385()
+ fun_l26_n731
+end
+
+def fun_l25_n386()
+ fun_l26_n60
+end
+
+def fun_l25_n387()
+ fun_l26_n600
+end
+
+def fun_l25_n388()
+ fun_l26_n162
+end
+
+def fun_l25_n389()
+ fun_l26_n229
+end
+
+def fun_l25_n390()
+ fun_l26_n60
+end
+
+def fun_l25_n391()
+ fun_l26_n617
+end
+
+def fun_l25_n392()
+ fun_l26_n823
+end
+
+def fun_l25_n393()
+ fun_l26_n546
+end
+
+def fun_l25_n394()
+ fun_l26_n783
+end
+
+def fun_l25_n395()
+ fun_l26_n616
+end
+
+def fun_l25_n396()
+ fun_l26_n131
+end
+
+def fun_l25_n397()
+ fun_l26_n744
+end
+
+def fun_l25_n398()
+ fun_l26_n344
+end
+
+def fun_l25_n399()
+ fun_l26_n529
+end
+
+def fun_l25_n400()
+ fun_l26_n314
+end
+
+def fun_l25_n401()
+ fun_l26_n571
+end
+
+def fun_l25_n402()
+ fun_l26_n329
+end
+
+def fun_l25_n403()
+ fun_l26_n334
+end
+
+def fun_l25_n404()
+ fun_l26_n232
+end
+
+def fun_l25_n405()
+ fun_l26_n864
+end
+
+def fun_l25_n406()
+ fun_l26_n882
+end
+
+def fun_l25_n407()
+ fun_l26_n153
+end
+
+def fun_l25_n408()
+ fun_l26_n770
+end
+
+def fun_l25_n409()
+ fun_l26_n199
+end
+
+def fun_l25_n410()
+ fun_l26_n799
+end
+
+def fun_l25_n411()
+ fun_l26_n306
+end
+
+def fun_l25_n412()
+ fun_l26_n957
+end
+
+def fun_l25_n413()
+ fun_l26_n519
+end
+
+def fun_l25_n414()
+ fun_l26_n445
+end
+
+def fun_l25_n415()
+ fun_l26_n272
+end
+
+def fun_l25_n416()
+ fun_l26_n119
+end
+
+def fun_l25_n417()
+ fun_l26_n143
+end
+
+def fun_l25_n418()
+ fun_l26_n964
+end
+
+def fun_l25_n419()
+ fun_l26_n574
+end
+
+def fun_l25_n420()
+ fun_l26_n215
+end
+
+def fun_l25_n421()
+ fun_l26_n144
+end
+
+def fun_l25_n422()
+ fun_l26_n345
+end
+
+def fun_l25_n423()
+ fun_l26_n121
+end
+
+def fun_l25_n424()
+ fun_l26_n77
+end
+
+def fun_l25_n425()
+ fun_l26_n112
+end
+
+def fun_l25_n426()
+ fun_l26_n992
+end
+
+def fun_l25_n427()
+ fun_l26_n320
+end
+
+def fun_l25_n428()
+ fun_l26_n980
+end
+
+def fun_l25_n429()
+ fun_l26_n442
+end
+
+def fun_l25_n430()
+ fun_l26_n422
+end
+
+def fun_l25_n431()
+ fun_l26_n164
+end
+
+def fun_l25_n432()
+ fun_l26_n778
+end
+
+def fun_l25_n433()
+ fun_l26_n330
+end
+
+def fun_l25_n434()
+ fun_l26_n535
+end
+
+def fun_l25_n435()
+ fun_l26_n149
+end
+
+def fun_l25_n436()
+ fun_l26_n411
+end
+
+def fun_l25_n437()
+ fun_l26_n465
+end
+
+def fun_l25_n438()
+ fun_l26_n231
+end
+
+def fun_l25_n439()
+ fun_l26_n542
+end
+
+def fun_l25_n440()
+ fun_l26_n720
+end
+
+def fun_l25_n441()
+ fun_l26_n883
+end
+
+def fun_l25_n442()
+ fun_l26_n258
+end
+
+def fun_l25_n443()
+ fun_l26_n633
+end
+
+def fun_l25_n444()
+ fun_l26_n715
+end
+
+def fun_l25_n445()
+ fun_l26_n844
+end
+
+def fun_l25_n446()
+ fun_l26_n837
+end
+
+def fun_l25_n447()
+ fun_l26_n161
+end
+
+def fun_l25_n448()
+ fun_l26_n389
+end
+
+def fun_l25_n449()
+ fun_l26_n246
+end
+
+def fun_l25_n450()
+ fun_l26_n570
+end
+
+def fun_l25_n451()
+ fun_l26_n678
+end
+
+def fun_l25_n452()
+ fun_l26_n243
+end
+
+def fun_l25_n453()
+ fun_l26_n430
+end
+
+def fun_l25_n454()
+ fun_l26_n193
+end
+
+def fun_l25_n455()
+ fun_l26_n666
+end
+
+def fun_l25_n456()
+ fun_l26_n881
+end
+
+def fun_l25_n457()
+ fun_l26_n989
+end
+
+def fun_l25_n458()
+ fun_l26_n450
+end
+
+def fun_l25_n459()
+ fun_l26_n675
+end
+
+def fun_l25_n460()
+ fun_l26_n315
+end
+
+def fun_l25_n461()
+ fun_l26_n40
+end
+
+def fun_l25_n462()
+ fun_l26_n639
+end
+
+def fun_l25_n463()
+ fun_l26_n380
+end
+
+def fun_l25_n464()
+ fun_l26_n680
+end
+
+def fun_l25_n465()
+ fun_l26_n54
+end
+
+def fun_l25_n466()
+ fun_l26_n37
+end
+
+def fun_l25_n467()
+ fun_l26_n910
+end
+
+def fun_l25_n468()
+ fun_l26_n50
+end
+
+def fun_l25_n469()
+ fun_l26_n925
+end
+
+def fun_l25_n470()
+ fun_l26_n385
+end
+
+def fun_l25_n471()
+ fun_l26_n860
+end
+
+def fun_l25_n472()
+ fun_l26_n547
+end
+
+def fun_l25_n473()
+ fun_l26_n31
+end
+
+def fun_l25_n474()
+ fun_l26_n338
+end
+
+def fun_l25_n475()
+ fun_l26_n706
+end
+
+def fun_l25_n476()
+ fun_l26_n81
+end
+
+def fun_l25_n477()
+ fun_l26_n532
+end
+
+def fun_l25_n478()
+ fun_l26_n781
+end
+
+def fun_l25_n479()
+ fun_l26_n588
+end
+
+def fun_l25_n480()
+ fun_l26_n658
+end
+
+def fun_l25_n481()
+ fun_l26_n344
+end
+
+def fun_l25_n482()
+ fun_l26_n914
+end
+
+def fun_l25_n483()
+ fun_l26_n319
+end
+
+def fun_l25_n484()
+ fun_l26_n138
+end
+
+def fun_l25_n485()
+ fun_l26_n927
+end
+
+def fun_l25_n486()
+ fun_l26_n409
+end
+
+def fun_l25_n487()
+ fun_l26_n721
+end
+
+def fun_l25_n488()
+ fun_l26_n197
+end
+
+def fun_l25_n489()
+ fun_l26_n654
+end
+
+def fun_l25_n490()
+ fun_l26_n298
+end
+
+def fun_l25_n491()
+ fun_l26_n763
+end
+
+def fun_l25_n492()
+ fun_l26_n729
+end
+
+def fun_l25_n493()
+ fun_l26_n532
+end
+
+def fun_l25_n494()
+ fun_l26_n508
+end
+
+def fun_l25_n495()
+ fun_l26_n725
+end
+
+def fun_l25_n496()
+ fun_l26_n665
+end
+
+def fun_l25_n497()
+ fun_l26_n21
+end
+
+def fun_l25_n498()
+ fun_l26_n314
+end
+
+def fun_l25_n499()
+ fun_l26_n823
+end
+
+def fun_l25_n500()
+ fun_l26_n983
+end
+
+def fun_l25_n501()
+ fun_l26_n477
+end
+
+def fun_l25_n502()
+ fun_l26_n502
+end
+
+def fun_l25_n503()
+ fun_l26_n731
+end
+
+def fun_l25_n504()
+ fun_l26_n427
+end
+
+def fun_l25_n505()
+ fun_l26_n949
+end
+
+def fun_l25_n506()
+ fun_l26_n566
+end
+
+def fun_l25_n507()
+ fun_l26_n407
+end
+
+def fun_l25_n508()
+ fun_l26_n427
+end
+
+def fun_l25_n509()
+ fun_l26_n423
+end
+
+def fun_l25_n510()
+ fun_l26_n394
+end
+
+def fun_l25_n511()
+ fun_l26_n584
+end
+
+def fun_l25_n512()
+ fun_l26_n35
+end
+
+def fun_l25_n513()
+ fun_l26_n89
+end
+
+def fun_l25_n514()
+ fun_l26_n369
+end
+
+def fun_l25_n515()
+ fun_l26_n483
+end
+
+def fun_l25_n516()
+ fun_l26_n897
+end
+
+def fun_l25_n517()
+ fun_l26_n39
+end
+
+def fun_l25_n518()
+ fun_l26_n904
+end
+
+def fun_l25_n519()
+ fun_l26_n264
+end
+
+def fun_l25_n520()
+ fun_l26_n806
+end
+
+def fun_l25_n521()
+ fun_l26_n206
+end
+
+def fun_l25_n522()
+ fun_l26_n417
+end
+
+def fun_l25_n523()
+ fun_l26_n235
+end
+
+def fun_l25_n524()
+ fun_l26_n192
+end
+
+def fun_l25_n525()
+ fun_l26_n62
+end
+
+def fun_l25_n526()
+ fun_l26_n295
+end
+
+def fun_l25_n527()
+ fun_l26_n998
+end
+
+def fun_l25_n528()
+ fun_l26_n898
+end
+
+def fun_l25_n529()
+ fun_l26_n705
+end
+
+def fun_l25_n530()
+ fun_l26_n571
+end
+
+def fun_l25_n531()
+ fun_l26_n883
+end
+
+def fun_l25_n532()
+ fun_l26_n198
+end
+
+def fun_l25_n533()
+ fun_l26_n893
+end
+
+def fun_l25_n534()
+ fun_l26_n849
+end
+
+def fun_l25_n535()
+ fun_l26_n540
+end
+
+def fun_l25_n536()
+ fun_l26_n509
+end
+
+def fun_l25_n537()
+ fun_l26_n889
+end
+
+def fun_l25_n538()
+ fun_l26_n981
+end
+
+def fun_l25_n539()
+ fun_l26_n477
+end
+
+def fun_l25_n540()
+ fun_l26_n908
+end
+
+def fun_l25_n541()
+ fun_l26_n455
+end
+
+def fun_l25_n542()
+ fun_l26_n547
+end
+
+def fun_l25_n543()
+ fun_l26_n487
+end
+
+def fun_l25_n544()
+ fun_l26_n365
+end
+
+def fun_l25_n545()
+ fun_l26_n853
+end
+
+def fun_l25_n546()
+ fun_l26_n591
+end
+
+def fun_l25_n547()
+ fun_l26_n298
+end
+
+def fun_l25_n548()
+ fun_l26_n529
+end
+
+def fun_l25_n549()
+ fun_l26_n191
+end
+
+def fun_l25_n550()
+ fun_l26_n118
+end
+
+def fun_l25_n551()
+ fun_l26_n82
+end
+
+def fun_l25_n552()
+ fun_l26_n874
+end
+
+def fun_l25_n553()
+ fun_l26_n924
+end
+
+def fun_l25_n554()
+ fun_l26_n683
+end
+
+def fun_l25_n555()
+ fun_l26_n163
+end
+
+def fun_l25_n556()
+ fun_l26_n935
+end
+
+def fun_l25_n557()
+ fun_l26_n657
+end
+
+def fun_l25_n558()
+ fun_l26_n17
+end
+
+def fun_l25_n559()
+ fun_l26_n578
+end
+
+def fun_l25_n560()
+ fun_l26_n105
+end
+
+def fun_l25_n561()
+ fun_l26_n280
+end
+
+def fun_l25_n562()
+ fun_l26_n130
+end
+
+def fun_l25_n563()
+ fun_l26_n824
+end
+
+def fun_l25_n564()
+ fun_l26_n376
+end
+
+def fun_l25_n565()
+ fun_l26_n942
+end
+
+def fun_l25_n566()
+ fun_l26_n771
+end
+
+def fun_l25_n567()
+ fun_l26_n245
+end
+
+def fun_l25_n568()
+ fun_l26_n361
+end
+
+def fun_l25_n569()
+ fun_l26_n328
+end
+
+def fun_l25_n570()
+ fun_l26_n718
+end
+
+def fun_l25_n571()
+ fun_l26_n918
+end
+
+def fun_l25_n572()
+ fun_l26_n592
+end
+
+def fun_l25_n573()
+ fun_l26_n690
+end
+
+def fun_l25_n574()
+ fun_l26_n689
+end
+
+def fun_l25_n575()
+ fun_l26_n571
+end
+
+def fun_l25_n576()
+ fun_l26_n106
+end
+
+def fun_l25_n577()
+ fun_l26_n917
+end
+
+def fun_l25_n578()
+ fun_l26_n954
+end
+
+def fun_l25_n579()
+ fun_l26_n842
+end
+
+def fun_l25_n580()
+ fun_l26_n277
+end
+
+def fun_l25_n581()
+ fun_l26_n511
+end
+
+def fun_l25_n582()
+ fun_l26_n834
+end
+
+def fun_l25_n583()
+ fun_l26_n992
+end
+
+def fun_l25_n584()
+ fun_l26_n711
+end
+
+def fun_l25_n585()
+ fun_l26_n366
+end
+
+def fun_l25_n586()
+ fun_l26_n960
+end
+
+def fun_l25_n587()
+ fun_l26_n229
+end
+
+def fun_l25_n588()
+ fun_l26_n208
+end
+
+def fun_l25_n589()
+ fun_l26_n758
+end
+
+def fun_l25_n590()
+ fun_l26_n98
+end
+
+def fun_l25_n591()
+ fun_l26_n452
+end
+
+def fun_l25_n592()
+ fun_l26_n526
+end
+
+def fun_l25_n593()
+ fun_l26_n92
+end
+
+def fun_l25_n594()
+ fun_l26_n108
+end
+
+def fun_l25_n595()
+ fun_l26_n250
+end
+
+def fun_l25_n596()
+ fun_l26_n186
+end
+
+def fun_l25_n597()
+ fun_l26_n603
+end
+
+def fun_l25_n598()
+ fun_l26_n828
+end
+
+def fun_l25_n599()
+ fun_l26_n610
+end
+
+def fun_l25_n600()
+ fun_l26_n280
+end
+
+def fun_l25_n601()
+ fun_l26_n158
+end
+
+def fun_l25_n602()
+ fun_l26_n386
+end
+
+def fun_l25_n603()
+ fun_l26_n869
+end
+
+def fun_l25_n604()
+ fun_l26_n483
+end
+
+def fun_l25_n605()
+ fun_l26_n682
+end
+
+def fun_l25_n606()
+ fun_l26_n175
+end
+
+def fun_l25_n607()
+ fun_l26_n991
+end
+
+def fun_l25_n608()
+ fun_l26_n165
+end
+
+def fun_l25_n609()
+ fun_l26_n303
+end
+
+def fun_l25_n610()
+ fun_l26_n812
+end
+
+def fun_l25_n611()
+ fun_l26_n563
+end
+
+def fun_l25_n612()
+ fun_l26_n635
+end
+
+def fun_l25_n613()
+ fun_l26_n256
+end
+
+def fun_l25_n614()
+ fun_l26_n96
+end
+
+def fun_l25_n615()
+ fun_l26_n8
+end
+
+def fun_l25_n616()
+ fun_l26_n963
+end
+
+def fun_l25_n617()
+ fun_l26_n860
+end
+
+def fun_l25_n618()
+ fun_l26_n316
+end
+
+def fun_l25_n619()
+ fun_l26_n388
+end
+
+def fun_l25_n620()
+ fun_l26_n427
+end
+
+def fun_l25_n621()
+ fun_l26_n519
+end
+
+def fun_l25_n622()
+ fun_l26_n780
+end
+
+def fun_l25_n623()
+ fun_l26_n142
+end
+
+def fun_l25_n624()
+ fun_l26_n271
+end
+
+def fun_l25_n625()
+ fun_l26_n617
+end
+
+def fun_l25_n626()
+ fun_l26_n968
+end
+
+def fun_l25_n627()
+ fun_l26_n880
+end
+
+def fun_l25_n628()
+ fun_l26_n831
+end
+
+def fun_l25_n629()
+ fun_l26_n616
+end
+
+def fun_l25_n630()
+ fun_l26_n213
+end
+
+def fun_l25_n631()
+ fun_l26_n91
+end
+
+def fun_l25_n632()
+ fun_l26_n295
+end
+
+def fun_l25_n633()
+ fun_l26_n314
+end
+
+def fun_l25_n634()
+ fun_l26_n174
+end
+
+def fun_l25_n635()
+ fun_l26_n668
+end
+
+def fun_l25_n636()
+ fun_l26_n962
+end
+
+def fun_l25_n637()
+ fun_l26_n1
+end
+
+def fun_l25_n638()
+ fun_l26_n361
+end
+
+def fun_l25_n639()
+ fun_l26_n947
+end
+
+def fun_l25_n640()
+ fun_l26_n381
+end
+
+def fun_l25_n641()
+ fun_l26_n388
+end
+
+def fun_l25_n642()
+ fun_l26_n5
+end
+
+def fun_l25_n643()
+ fun_l26_n759
+end
+
+def fun_l25_n644()
+ fun_l26_n454
+end
+
+def fun_l25_n645()
+ fun_l26_n596
+end
+
+def fun_l25_n646()
+ fun_l26_n639
+end
+
+def fun_l25_n647()
+ fun_l26_n156
+end
+
+def fun_l25_n648()
+ fun_l26_n395
+end
+
+def fun_l25_n649()
+ fun_l26_n424
+end
+
+def fun_l25_n650()
+ fun_l26_n21
+end
+
+def fun_l25_n651()
+ fun_l26_n285
+end
+
+def fun_l25_n652()
+ fun_l26_n72
+end
+
+def fun_l25_n653()
+ fun_l26_n25
+end
+
+def fun_l25_n654()
+ fun_l26_n381
+end
+
+def fun_l25_n655()
+ fun_l26_n166
+end
+
+def fun_l25_n656()
+ fun_l26_n850
+end
+
+def fun_l25_n657()
+ fun_l26_n794
+end
+
+def fun_l25_n658()
+ fun_l26_n674
+end
+
+def fun_l25_n659()
+ fun_l26_n934
+end
+
+def fun_l25_n660()
+ fun_l26_n164
+end
+
+def fun_l25_n661()
+ fun_l26_n325
+end
+
+def fun_l25_n662()
+ fun_l26_n514
+end
+
+def fun_l25_n663()
+ fun_l26_n489
+end
+
+def fun_l25_n664()
+ fun_l26_n268
+end
+
+def fun_l25_n665()
+ fun_l26_n4
+end
+
+def fun_l25_n666()
+ fun_l26_n330
+end
+
+def fun_l25_n667()
+ fun_l26_n749
+end
+
+def fun_l25_n668()
+ fun_l26_n324
+end
+
+def fun_l25_n669()
+ fun_l26_n228
+end
+
+def fun_l25_n670()
+ fun_l26_n740
+end
+
+def fun_l25_n671()
+ fun_l26_n240
+end
+
+def fun_l25_n672()
+ fun_l26_n145
+end
+
+def fun_l25_n673()
+ fun_l26_n170
+end
+
+def fun_l25_n674()
+ fun_l26_n222
+end
+
+def fun_l25_n675()
+ fun_l26_n680
+end
+
+def fun_l25_n676()
+ fun_l26_n115
+end
+
+def fun_l25_n677()
+ fun_l26_n359
+end
+
+def fun_l25_n678()
+ fun_l26_n482
+end
+
+def fun_l25_n679()
+ fun_l26_n251
+end
+
+def fun_l25_n680()
+ fun_l26_n95
+end
+
+def fun_l25_n681()
+ fun_l26_n587
+end
+
+def fun_l25_n682()
+ fun_l26_n689
+end
+
+def fun_l25_n683()
+ fun_l26_n317
+end
+
+def fun_l25_n684()
+ fun_l26_n913
+end
+
+def fun_l25_n685()
+ fun_l26_n943
+end
+
+def fun_l25_n686()
+ fun_l26_n770
+end
+
+def fun_l25_n687()
+ fun_l26_n204
+end
+
+def fun_l25_n688()
+ fun_l26_n690
+end
+
+def fun_l25_n689()
+ fun_l26_n745
+end
+
+def fun_l25_n690()
+ fun_l26_n640
+end
+
+def fun_l25_n691()
+ fun_l26_n34
+end
+
+def fun_l25_n692()
+ fun_l26_n296
+end
+
+def fun_l25_n693()
+ fun_l26_n900
+end
+
+def fun_l25_n694()
+ fun_l26_n619
+end
+
+def fun_l25_n695()
+ fun_l26_n81
+end
+
+def fun_l25_n696()
+ fun_l26_n748
+end
+
+def fun_l25_n697()
+ fun_l26_n395
+end
+
+def fun_l25_n698()
+ fun_l26_n518
+end
+
+def fun_l25_n699()
+ fun_l26_n338
+end
+
+def fun_l25_n700()
+ fun_l26_n238
+end
+
+def fun_l25_n701()
+ fun_l26_n445
+end
+
+def fun_l25_n702()
+ fun_l26_n732
+end
+
+def fun_l25_n703()
+ fun_l26_n378
+end
+
+def fun_l25_n704()
+ fun_l26_n858
+end
+
+def fun_l25_n705()
+ fun_l26_n944
+end
+
+def fun_l25_n706()
+ fun_l26_n543
+end
+
+def fun_l25_n707()
+ fun_l26_n750
+end
+
+def fun_l25_n708()
+ fun_l26_n191
+end
+
+def fun_l25_n709()
+ fun_l26_n483
+end
+
+def fun_l25_n710()
+ fun_l26_n614
+end
+
+def fun_l25_n711()
+ fun_l26_n944
+end
+
+def fun_l25_n712()
+ fun_l26_n375
+end
+
+def fun_l25_n713()
+ fun_l26_n464
+end
+
+def fun_l25_n714()
+ fun_l26_n429
+end
+
+def fun_l25_n715()
+ fun_l26_n251
+end
+
+def fun_l25_n716()
+ fun_l26_n401
+end
+
+def fun_l25_n717()
+ fun_l26_n230
+end
+
+def fun_l25_n718()
+ fun_l26_n855
+end
+
+def fun_l25_n719()
+ fun_l26_n63
+end
+
+def fun_l25_n720()
+ fun_l26_n453
+end
+
+def fun_l25_n721()
+ fun_l26_n698
+end
+
+def fun_l25_n722()
+ fun_l26_n691
+end
+
+def fun_l25_n723()
+ fun_l26_n949
+end
+
+def fun_l25_n724()
+ fun_l26_n838
+end
+
+def fun_l25_n725()
+ fun_l26_n962
+end
+
+def fun_l25_n726()
+ fun_l26_n159
+end
+
+def fun_l25_n727()
+ fun_l26_n958
+end
+
+def fun_l25_n728()
+ fun_l26_n915
+end
+
+def fun_l25_n729()
+ fun_l26_n925
+end
+
+def fun_l25_n730()
+ fun_l26_n841
+end
+
+def fun_l25_n731()
+ fun_l26_n710
+end
+
+def fun_l25_n732()
+ fun_l26_n606
+end
+
+def fun_l25_n733()
+ fun_l26_n502
+end
+
+def fun_l25_n734()
+ fun_l26_n275
+end
+
+def fun_l25_n735()
+ fun_l26_n2
+end
+
+def fun_l25_n736()
+ fun_l26_n912
+end
+
+def fun_l25_n737()
+ fun_l26_n908
+end
+
+def fun_l25_n738()
+ fun_l26_n599
+end
+
+def fun_l25_n739()
+ fun_l26_n586
+end
+
+def fun_l25_n740()
+ fun_l26_n675
+end
+
+def fun_l25_n741()
+ fun_l26_n33
+end
+
+def fun_l25_n742()
+ fun_l26_n94
+end
+
+def fun_l25_n743()
+ fun_l26_n512
+end
+
+def fun_l25_n744()
+ fun_l26_n38
+end
+
+def fun_l25_n745()
+ fun_l26_n479
+end
+
+def fun_l25_n746()
+ fun_l26_n191
+end
+
+def fun_l25_n747()
+ fun_l26_n520
+end
+
+def fun_l25_n748()
+ fun_l26_n800
+end
+
+def fun_l25_n749()
+ fun_l26_n401
+end
+
+def fun_l25_n750()
+ fun_l26_n355
+end
+
+def fun_l25_n751()
+ fun_l26_n622
+end
+
+def fun_l25_n752()
+ fun_l26_n48
+end
+
+def fun_l25_n753()
+ fun_l26_n620
+end
+
+def fun_l25_n754()
+ fun_l26_n932
+end
+
+def fun_l25_n755()
+ fun_l26_n204
+end
+
+def fun_l25_n756()
+ fun_l26_n875
+end
+
+def fun_l25_n757()
+ fun_l26_n458
+end
+
+def fun_l25_n758()
+ fun_l26_n364
+end
+
+def fun_l25_n759()
+ fun_l26_n621
+end
+
+def fun_l25_n760()
+ fun_l26_n800
+end
+
+def fun_l25_n761()
+ fun_l26_n297
+end
+
+def fun_l25_n762()
+ fun_l26_n262
+end
+
+def fun_l25_n763()
+ fun_l26_n810
+end
+
+def fun_l25_n764()
+ fun_l26_n518
+end
+
+def fun_l25_n765()
+ fun_l26_n192
+end
+
+def fun_l25_n766()
+ fun_l26_n733
+end
+
+def fun_l25_n767()
+ fun_l26_n410
+end
+
+def fun_l25_n768()
+ fun_l26_n161
+end
+
+def fun_l25_n769()
+ fun_l26_n546
+end
+
+def fun_l25_n770()
+ fun_l26_n863
+end
+
+def fun_l25_n771()
+ fun_l26_n442
+end
+
+def fun_l25_n772()
+ fun_l26_n733
+end
+
+def fun_l25_n773()
+ fun_l26_n340
+end
+
+def fun_l25_n774()
+ fun_l26_n371
+end
+
+def fun_l25_n775()
+ fun_l26_n253
+end
+
+def fun_l25_n776()
+ fun_l26_n607
+end
+
+def fun_l25_n777()
+ fun_l26_n859
+end
+
+def fun_l25_n778()
+ fun_l26_n142
+end
+
+def fun_l25_n779()
+ fun_l26_n504
+end
+
+def fun_l25_n780()
+ fun_l26_n145
+end
+
+def fun_l25_n781()
+ fun_l26_n561
+end
+
+def fun_l25_n782()
+ fun_l26_n442
+end
+
+def fun_l25_n783()
+ fun_l26_n70
+end
+
+def fun_l25_n784()
+ fun_l26_n233
+end
+
+def fun_l25_n785()
+ fun_l26_n680
+end
+
+def fun_l25_n786()
+ fun_l26_n195
+end
+
+def fun_l25_n787()
+ fun_l26_n760
+end
+
+def fun_l25_n788()
+ fun_l26_n951
+end
+
+def fun_l25_n789()
+ fun_l26_n247
+end
+
+def fun_l25_n790()
+ fun_l26_n58
+end
+
+def fun_l25_n791()
+ fun_l26_n926
+end
+
+def fun_l25_n792()
+ fun_l26_n424
+end
+
+def fun_l25_n793()
+ fun_l26_n404
+end
+
+def fun_l25_n794()
+ fun_l26_n98
+end
+
+def fun_l25_n795()
+ fun_l26_n568
+end
+
+def fun_l25_n796()
+ fun_l26_n665
+end
+
+def fun_l25_n797()
+ fun_l26_n138
+end
+
+def fun_l25_n798()
+ fun_l26_n362
+end
+
+def fun_l25_n799()
+ fun_l26_n366
+end
+
+def fun_l25_n800()
+ fun_l26_n667
+end
+
+def fun_l25_n801()
+ fun_l26_n171
+end
+
+def fun_l25_n802()
+ fun_l26_n620
+end
+
+def fun_l25_n803()
+ fun_l26_n88
+end
+
+def fun_l25_n804()
+ fun_l26_n60
+end
+
+def fun_l25_n805()
+ fun_l26_n411
+end
+
+def fun_l25_n806()
+ fun_l26_n994
+end
+
+def fun_l25_n807()
+ fun_l26_n341
+end
+
+def fun_l25_n808()
+ fun_l26_n364
+end
+
+def fun_l25_n809()
+ fun_l26_n253
+end
+
+def fun_l25_n810()
+ fun_l26_n689
+end
+
+def fun_l25_n811()
+ fun_l26_n325
+end
+
+def fun_l25_n812()
+ fun_l26_n573
+end
+
+def fun_l25_n813()
+ fun_l26_n122
+end
+
+def fun_l25_n814()
+ fun_l26_n487
+end
+
+def fun_l25_n815()
+ fun_l26_n461
+end
+
+def fun_l25_n816()
+ fun_l26_n851
+end
+
+def fun_l25_n817()
+ fun_l26_n322
+end
+
+def fun_l25_n818()
+ fun_l26_n472
+end
+
+def fun_l25_n819()
+ fun_l26_n773
+end
+
+def fun_l25_n820()
+ fun_l26_n801
+end
+
+def fun_l25_n821()
+ fun_l26_n454
+end
+
+def fun_l25_n822()
+ fun_l26_n179
+end
+
+def fun_l25_n823()
+ fun_l26_n207
+end
+
+def fun_l25_n824()
+ fun_l26_n464
+end
+
+def fun_l25_n825()
+ fun_l26_n188
+end
+
+def fun_l25_n826()
+ fun_l26_n831
+end
+
+def fun_l25_n827()
+ fun_l26_n918
+end
+
+def fun_l25_n828()
+ fun_l26_n336
+end
+
+def fun_l25_n829()
+ fun_l26_n960
+end
+
+def fun_l25_n830()
+ fun_l26_n767
+end
+
+def fun_l25_n831()
+ fun_l26_n149
+end
+
+def fun_l25_n832()
+ fun_l26_n454
+end
+
+def fun_l25_n833()
+ fun_l26_n756
+end
+
+def fun_l25_n834()
+ fun_l26_n937
+end
+
+def fun_l25_n835()
+ fun_l26_n841
+end
+
+def fun_l25_n836()
+ fun_l26_n210
+end
+
+def fun_l25_n837()
+ fun_l26_n633
+end
+
+def fun_l25_n838()
+ fun_l26_n665
+end
+
+def fun_l25_n839()
+ fun_l26_n502
+end
+
+def fun_l25_n840()
+ fun_l26_n38
+end
+
+def fun_l25_n841()
+ fun_l26_n487
+end
+
+def fun_l25_n842()
+ fun_l26_n101
+end
+
+def fun_l25_n843()
+ fun_l26_n522
+end
+
+def fun_l25_n844()
+ fun_l26_n501
+end
+
+def fun_l25_n845()
+ fun_l26_n759
+end
+
+def fun_l25_n846()
+ fun_l26_n161
+end
+
+def fun_l25_n847()
+ fun_l26_n823
+end
+
+def fun_l25_n848()
+ fun_l26_n687
+end
+
+def fun_l25_n849()
+ fun_l26_n41
+end
+
+def fun_l25_n850()
+ fun_l26_n580
+end
+
+def fun_l25_n851()
+ fun_l26_n728
+end
+
+def fun_l25_n852()
+ fun_l26_n464
+end
+
+def fun_l25_n853()
+ fun_l26_n846
+end
+
+def fun_l25_n854()
+ fun_l26_n708
+end
+
+def fun_l25_n855()
+ fun_l26_n847
+end
+
+def fun_l25_n856()
+ fun_l26_n295
+end
+
+def fun_l25_n857()
+ fun_l26_n569
+end
+
+def fun_l25_n858()
+ fun_l26_n367
+end
+
+def fun_l25_n859()
+ fun_l26_n937
+end
+
+def fun_l25_n860()
+ fun_l26_n116
+end
+
+def fun_l25_n861()
+ fun_l26_n889
+end
+
+def fun_l25_n862()
+ fun_l26_n392
+end
+
+def fun_l25_n863()
+ fun_l26_n70
+end
+
+def fun_l25_n864()
+ fun_l26_n82
+end
+
+def fun_l25_n865()
+ fun_l26_n4
+end
+
+def fun_l25_n866()
+ fun_l26_n286
+end
+
+def fun_l25_n867()
+ fun_l26_n594
+end
+
+def fun_l25_n868()
+ fun_l26_n917
+end
+
+def fun_l25_n869()
+ fun_l26_n385
+end
+
+def fun_l25_n870()
+ fun_l26_n149
+end
+
+def fun_l25_n871()
+ fun_l26_n893
+end
+
+def fun_l25_n872()
+ fun_l26_n832
+end
+
+def fun_l25_n873()
+ fun_l26_n962
+end
+
+def fun_l25_n874()
+ fun_l26_n196
+end
+
+def fun_l25_n875()
+ fun_l26_n841
+end
+
+def fun_l25_n876()
+ fun_l26_n334
+end
+
+def fun_l25_n877()
+ fun_l26_n680
+end
+
+def fun_l25_n878()
+ fun_l26_n858
+end
+
+def fun_l25_n879()
+ fun_l26_n530
+end
+
+def fun_l25_n880()
+ fun_l26_n331
+end
+
+def fun_l25_n881()
+ fun_l26_n287
+end
+
+def fun_l25_n882()
+ fun_l26_n995
+end
+
+def fun_l25_n883()
+ fun_l26_n663
+end
+
+def fun_l25_n884()
+ fun_l26_n352
+end
+
+def fun_l25_n885()
+ fun_l26_n787
+end
+
+def fun_l25_n886()
+ fun_l26_n176
+end
+
+def fun_l25_n887()
+ fun_l26_n303
+end
+
+def fun_l25_n888()
+ fun_l26_n610
+end
+
+def fun_l25_n889()
+ fun_l26_n860
+end
+
+def fun_l25_n890()
+ fun_l26_n35
+end
+
+def fun_l25_n891()
+ fun_l26_n599
+end
+
+def fun_l25_n892()
+ fun_l26_n334
+end
+
+def fun_l25_n893()
+ fun_l26_n904
+end
+
+def fun_l25_n894()
+ fun_l26_n999
+end
+
+def fun_l25_n895()
+ fun_l26_n394
+end
+
+def fun_l25_n896()
+ fun_l26_n901
+end
+
+def fun_l25_n897()
+ fun_l26_n348
+end
+
+def fun_l25_n898()
+ fun_l26_n59
+end
+
+def fun_l25_n899()
+ fun_l26_n67
+end
+
+def fun_l25_n900()
+ fun_l26_n887
+end
+
+def fun_l25_n901()
+ fun_l26_n27
+end
+
+def fun_l25_n902()
+ fun_l26_n635
+end
+
+def fun_l25_n903()
+ fun_l26_n627
+end
+
+def fun_l25_n904()
+ fun_l26_n47
+end
+
+def fun_l25_n905()
+ fun_l26_n256
+end
+
+def fun_l25_n906()
+ fun_l26_n498
+end
+
+def fun_l25_n907()
+ fun_l26_n831
+end
+
+def fun_l25_n908()
+ fun_l26_n723
+end
+
+def fun_l25_n909()
+ fun_l26_n29
+end
+
+def fun_l25_n910()
+ fun_l26_n842
+end
+
+def fun_l25_n911()
+ fun_l26_n762
+end
+
+def fun_l25_n912()
+ fun_l26_n706
+end
+
+def fun_l25_n913()
+ fun_l26_n472
+end
+
+def fun_l25_n914()
+ fun_l26_n825
+end
+
+def fun_l25_n915()
+ fun_l26_n210
+end
+
+def fun_l25_n916()
+ fun_l26_n682
+end
+
+def fun_l25_n917()
+ fun_l26_n793
+end
+
+def fun_l25_n918()
+ fun_l26_n768
+end
+
+def fun_l25_n919()
+ fun_l26_n631
+end
+
+def fun_l25_n920()
+ fun_l26_n188
+end
+
+def fun_l25_n921()
+ fun_l26_n115
+end
+
+def fun_l25_n922()
+ fun_l26_n587
+end
+
+def fun_l25_n923()
+ fun_l26_n998
+end
+
+def fun_l25_n924()
+ fun_l26_n439
+end
+
+def fun_l25_n925()
+ fun_l26_n306
+end
+
+def fun_l25_n926()
+ fun_l26_n810
+end
+
+def fun_l25_n927()
+ fun_l26_n183
+end
+
+def fun_l25_n928()
+ fun_l26_n868
+end
+
+def fun_l25_n929()
+ fun_l26_n733
+end
+
+def fun_l25_n930()
+ fun_l26_n931
+end
+
+def fun_l25_n931()
+ fun_l26_n747
+end
+
+def fun_l25_n932()
+ fun_l26_n126
+end
+
+def fun_l25_n933()
+ fun_l26_n299
+end
+
+def fun_l25_n934()
+ fun_l26_n994
+end
+
+def fun_l25_n935()
+ fun_l26_n76
+end
+
+def fun_l25_n936()
+ fun_l26_n606
+end
+
+def fun_l25_n937()
+ fun_l26_n874
+end
+
+def fun_l25_n938()
+ fun_l26_n333
+end
+
+def fun_l25_n939()
+ fun_l26_n601
+end
+
+def fun_l25_n940()
+ fun_l26_n503
+end
+
+def fun_l25_n941()
+ fun_l26_n819
+end
+
+def fun_l25_n942()
+ fun_l26_n414
+end
+
+def fun_l25_n943()
+ fun_l26_n839
+end
+
+def fun_l25_n944()
+ fun_l26_n655
+end
+
+def fun_l25_n945()
+ fun_l26_n61
+end
+
+def fun_l25_n946()
+ fun_l26_n368
+end
+
+def fun_l25_n947()
+ fun_l26_n481
+end
+
+def fun_l25_n948()
+ fun_l26_n674
+end
+
+def fun_l25_n949()
+ fun_l26_n755
+end
+
+def fun_l25_n950()
+ fun_l26_n940
+end
+
+def fun_l25_n951()
+ fun_l26_n918
+end
+
+def fun_l25_n952()
+ fun_l26_n833
+end
+
+def fun_l25_n953()
+ fun_l26_n81
+end
+
+def fun_l25_n954()
+ fun_l26_n12
+end
+
+def fun_l25_n955()
+ fun_l26_n598
+end
+
+def fun_l25_n956()
+ fun_l26_n10
+end
+
+def fun_l25_n957()
+ fun_l26_n552
+end
+
+def fun_l25_n958()
+ fun_l26_n536
+end
+
+def fun_l25_n959()
+ fun_l26_n291
+end
+
+def fun_l25_n960()
+ fun_l26_n535
+end
+
+def fun_l25_n961()
+ fun_l26_n593
+end
+
+def fun_l25_n962()
+ fun_l26_n834
+end
+
+def fun_l25_n963()
+ fun_l26_n527
+end
+
+def fun_l25_n964()
+ fun_l26_n403
+end
+
+def fun_l25_n965()
+ fun_l26_n246
+end
+
+def fun_l25_n966()
+ fun_l26_n278
+end
+
+def fun_l25_n967()
+ fun_l26_n948
+end
+
+def fun_l25_n968()
+ fun_l26_n989
+end
+
+def fun_l25_n969()
+ fun_l26_n312
+end
+
+def fun_l25_n970()
+ fun_l26_n674
+end
+
+def fun_l25_n971()
+ fun_l26_n592
+end
+
+def fun_l25_n972()
+ fun_l26_n413
+end
+
+def fun_l25_n973()
+ fun_l26_n774
+end
+
+def fun_l25_n974()
+ fun_l26_n148
+end
+
+def fun_l25_n975()
+ fun_l26_n437
+end
+
+def fun_l25_n976()
+ fun_l26_n749
+end
+
+def fun_l25_n977()
+ fun_l26_n938
+end
+
+def fun_l25_n978()
+ fun_l26_n662
+end
+
+def fun_l25_n979()
+ fun_l26_n327
+end
+
+def fun_l25_n980()
+ fun_l26_n665
+end
+
+def fun_l25_n981()
+ fun_l26_n516
+end
+
+def fun_l25_n982()
+ fun_l26_n27
+end
+
+def fun_l25_n983()
+ fun_l26_n624
+end
+
+def fun_l25_n984()
+ fun_l26_n451
+end
+
+def fun_l25_n985()
+ fun_l26_n120
+end
+
+def fun_l25_n986()
+ fun_l26_n220
+end
+
+def fun_l25_n987()
+ fun_l26_n201
+end
+
+def fun_l25_n988()
+ fun_l26_n67
+end
+
+def fun_l25_n989()
+ fun_l26_n484
+end
+
+def fun_l25_n990()
+ fun_l26_n98
+end
+
+def fun_l25_n991()
+ fun_l26_n133
+end
+
+def fun_l25_n992()
+ fun_l26_n642
+end
+
+def fun_l25_n993()
+ fun_l26_n933
+end
+
+def fun_l25_n994()
+ fun_l26_n410
+end
+
+def fun_l25_n995()
+ fun_l26_n415
+end
+
+def fun_l25_n996()
+ fun_l26_n513
+end
+
+def fun_l25_n997()
+ fun_l26_n41
+end
+
+def fun_l25_n998()
+ fun_l26_n517
+end
+
+def fun_l25_n999()
+ fun_l26_n485
+end
+
+def fun_l26_n0()
+ fun_l27_n229
+end
+
+def fun_l26_n1()
+ fun_l27_n178
+end
+
+def fun_l26_n2()
+ fun_l27_n76
+end
+
+def fun_l26_n3()
+ fun_l27_n247
+end
+
+def fun_l26_n4()
+ fun_l27_n564
+end
+
+def fun_l26_n5()
+ fun_l27_n204
+end
+
+def fun_l26_n6()
+ fun_l27_n196
+end
+
+def fun_l26_n7()
+ fun_l27_n57
+end
+
+def fun_l26_n8()
+ fun_l27_n836
+end
+
+def fun_l26_n9()
+ fun_l27_n195
+end
+
+def fun_l26_n10()
+ fun_l27_n149
+end
+
+def fun_l26_n11()
+ fun_l27_n784
+end
+
+def fun_l26_n12()
+ fun_l27_n242
+end
+
+def fun_l26_n13()
+ fun_l27_n771
+end
+
+def fun_l26_n14()
+ fun_l27_n263
+end
+
+def fun_l26_n15()
+ fun_l27_n486
+end
+
+def fun_l26_n16()
+ fun_l27_n351
+end
+
+def fun_l26_n17()
+ fun_l27_n612
+end
+
+def fun_l26_n18()
+ fun_l27_n61
+end
+
+def fun_l26_n19()
+ fun_l27_n119
+end
+
+def fun_l26_n20()
+ fun_l27_n419
+end
+
+def fun_l26_n21()
+ fun_l27_n265
+end
+
+def fun_l26_n22()
+ fun_l27_n70
+end
+
+def fun_l26_n23()
+ fun_l27_n868
+end
+
+def fun_l26_n24()
+ fun_l27_n969
+end
+
+def fun_l26_n25()
+ fun_l27_n355
+end
+
+def fun_l26_n26()
+ fun_l27_n558
+end
+
+def fun_l26_n27()
+ fun_l27_n522
+end
+
+def fun_l26_n28()
+ fun_l27_n704
+end
+
+def fun_l26_n29()
+ fun_l27_n196
+end
+
+def fun_l26_n30()
+ fun_l27_n834
+end
+
+def fun_l26_n31()
+ fun_l27_n187
+end
+
+def fun_l26_n32()
+ fun_l27_n324
+end
+
+def fun_l26_n33()
+ fun_l27_n233
+end
+
+def fun_l26_n34()
+ fun_l27_n559
+end
+
+def fun_l26_n35()
+ fun_l27_n331
+end
+
+def fun_l26_n36()
+ fun_l27_n71
+end
+
+def fun_l26_n37()
+ fun_l27_n572
+end
+
+def fun_l26_n38()
+ fun_l27_n918
+end
+
+def fun_l26_n39()
+ fun_l27_n866
+end
+
+def fun_l26_n40()
+ fun_l27_n909
+end
+
+def fun_l26_n41()
+ fun_l27_n861
+end
+
+def fun_l26_n42()
+ fun_l27_n440
+end
+
+def fun_l26_n43()
+ fun_l27_n213
+end
+
+def fun_l26_n44()
+ fun_l27_n675
+end
+
+def fun_l26_n45()
+ fun_l27_n490
+end
+
+def fun_l26_n46()
+ fun_l27_n579
+end
+
+def fun_l26_n47()
+ fun_l27_n25
+end
+
+def fun_l26_n48()
+ fun_l27_n180
+end
+
+def fun_l26_n49()
+ fun_l27_n346
+end
+
+def fun_l26_n50()
+ fun_l27_n761
+end
+
+def fun_l26_n51()
+ fun_l27_n336
+end
+
+def fun_l26_n52()
+ fun_l27_n124
+end
+
+def fun_l26_n53()
+ fun_l27_n485
+end
+
+def fun_l26_n54()
+ fun_l27_n24
+end
+
+def fun_l26_n55()
+ fun_l27_n666
+end
+
+def fun_l26_n56()
+ fun_l27_n957
+end
+
+def fun_l26_n57()
+ fun_l27_n790
+end
+
+def fun_l26_n58()
+ fun_l27_n475
+end
+
+def fun_l26_n59()
+ fun_l27_n915
+end
+
+def fun_l26_n60()
+ fun_l27_n313
+end
+
+def fun_l26_n61()
+ fun_l27_n148
+end
+
+def fun_l26_n62()
+ fun_l27_n185
+end
+
+def fun_l26_n63()
+ fun_l27_n468
+end
+
+def fun_l26_n64()
+ fun_l27_n549
+end
+
+def fun_l26_n65()
+ fun_l27_n29
+end
+
+def fun_l26_n66()
+ fun_l27_n601
+end
+
+def fun_l26_n67()
+ fun_l27_n3
+end
+
+def fun_l26_n68()
+ fun_l27_n363
+end
+
+def fun_l26_n69()
+ fun_l27_n721
+end
+
+def fun_l26_n70()
+ fun_l27_n76
+end
+
+def fun_l26_n71()
+ fun_l27_n265
+end
+
+def fun_l26_n72()
+ fun_l27_n771
+end
+
+def fun_l26_n73()
+ fun_l27_n660
+end
+
+def fun_l26_n74()
+ fun_l27_n714
+end
+
+def fun_l26_n75()
+ fun_l27_n495
+end
+
+def fun_l26_n76()
+ fun_l27_n133
+end
+
+def fun_l26_n77()
+ fun_l27_n753
+end
+
+def fun_l26_n78()
+ fun_l27_n999
+end
+
+def fun_l26_n79()
+ fun_l27_n527
+end
+
+def fun_l26_n80()
+ fun_l27_n767
+end
+
+def fun_l26_n81()
+ fun_l27_n444
+end
+
+def fun_l26_n82()
+ fun_l27_n160
+end
+
+def fun_l26_n83()
+ fun_l27_n799
+end
+
+def fun_l26_n84()
+ fun_l27_n631
+end
+
+def fun_l26_n85()
+ fun_l27_n480
+end
+
+def fun_l26_n86()
+ fun_l27_n800
+end
+
+def fun_l26_n87()
+ fun_l27_n168
+end
+
+def fun_l26_n88()
+ fun_l27_n191
+end
+
+def fun_l26_n89()
+ fun_l27_n832
+end
+
+def fun_l26_n90()
+ fun_l27_n522
+end
+
+def fun_l26_n91()
+ fun_l27_n747
+end
+
+def fun_l26_n92()
+ fun_l27_n50
+end
+
+def fun_l26_n93()
+ fun_l27_n472
+end
+
+def fun_l26_n94()
+ fun_l27_n778
+end
+
+def fun_l26_n95()
+ fun_l27_n130
+end
+
+def fun_l26_n96()
+ fun_l27_n735
+end
+
+def fun_l26_n97()
+ fun_l27_n130
+end
+
+def fun_l26_n98()
+ fun_l27_n95
+end
+
+def fun_l26_n99()
+ fun_l27_n171
+end
+
+def fun_l26_n100()
+ fun_l27_n121
+end
+
+def fun_l26_n101()
+ fun_l27_n789
+end
+
+def fun_l26_n102()
+ fun_l27_n124
+end
+
+def fun_l26_n103()
+ fun_l27_n836
+end
+
+def fun_l26_n104()
+ fun_l27_n785
+end
+
+def fun_l26_n105()
+ fun_l27_n586
+end
+
+def fun_l26_n106()
+ fun_l27_n220
+end
+
+def fun_l26_n107()
+ fun_l27_n783
+end
+
+def fun_l26_n108()
+ fun_l27_n239
+end
+
+def fun_l26_n109()
+ fun_l27_n838
+end
+
+def fun_l26_n110()
+ fun_l27_n563
+end
+
+def fun_l26_n111()
+ fun_l27_n955
+end
+
+def fun_l26_n112()
+ fun_l27_n889
+end
+
+def fun_l26_n113()
+ fun_l27_n967
+end
+
+def fun_l26_n114()
+ fun_l27_n19
+end
+
+def fun_l26_n115()
+ fun_l27_n637
+end
+
+def fun_l26_n116()
+ fun_l27_n914
+end
+
+def fun_l26_n117()
+ fun_l27_n684
+end
+
+def fun_l26_n118()
+ fun_l27_n352
+end
+
+def fun_l26_n119()
+ fun_l27_n698
+end
+
+def fun_l26_n120()
+ fun_l27_n669
+end
+
+def fun_l26_n121()
+ fun_l27_n52
+end
+
+def fun_l26_n122()
+ fun_l27_n485
+end
+
+def fun_l26_n123()
+ fun_l27_n468
+end
+
+def fun_l26_n124()
+ fun_l27_n340
+end
+
+def fun_l26_n125()
+ fun_l27_n414
+end
+
+def fun_l26_n126()
+ fun_l27_n994
+end
+
+def fun_l26_n127()
+ fun_l27_n601
+end
+
+def fun_l26_n128()
+ fun_l27_n679
+end
+
+def fun_l26_n129()
+ fun_l27_n720
+end
+
+def fun_l26_n130()
+ fun_l27_n66
+end
+
+def fun_l26_n131()
+ fun_l27_n921
+end
+
+def fun_l26_n132()
+ fun_l27_n385
+end
+
+def fun_l26_n133()
+ fun_l27_n88
+end
+
+def fun_l26_n134()
+ fun_l27_n164
+end
+
+def fun_l26_n135()
+ fun_l27_n269
+end
+
+def fun_l26_n136()
+ fun_l27_n371
+end
+
+def fun_l26_n137()
+ fun_l27_n786
+end
+
+def fun_l26_n138()
+ fun_l27_n464
+end
+
+def fun_l26_n139()
+ fun_l27_n96
+end
+
+def fun_l26_n140()
+ fun_l27_n494
+end
+
+def fun_l26_n141()
+ fun_l27_n341
+end
+
+def fun_l26_n142()
+ fun_l27_n646
+end
+
+def fun_l26_n143()
+ fun_l27_n959
+end
+
+def fun_l26_n144()
+ fun_l27_n645
+end
+
+def fun_l26_n145()
+ fun_l27_n825
+end
+
+def fun_l26_n146()
+ fun_l27_n416
+end
+
+def fun_l26_n147()
+ fun_l27_n994
+end
+
+def fun_l26_n148()
+ fun_l27_n875
+end
+
+def fun_l26_n149()
+ fun_l27_n406
+end
+
+def fun_l26_n150()
+ fun_l27_n857
+end
+
+def fun_l26_n151()
+ fun_l27_n348
+end
+
+def fun_l26_n152()
+ fun_l27_n611
+end
+
+def fun_l26_n153()
+ fun_l27_n831
+end
+
+def fun_l26_n154()
+ fun_l27_n412
+end
+
+def fun_l26_n155()
+ fun_l27_n530
+end
+
+def fun_l26_n156()
+ fun_l27_n892
+end
+
+def fun_l26_n157()
+ fun_l27_n70
+end
+
+def fun_l26_n158()
+ fun_l27_n756
+end
+
+def fun_l26_n159()
+ fun_l27_n587
+end
+
+def fun_l26_n160()
+ fun_l27_n796
+end
+
+def fun_l26_n161()
+ fun_l27_n470
+end
+
+def fun_l26_n162()
+ fun_l27_n290
+end
+
+def fun_l26_n163()
+ fun_l27_n723
+end
+
+def fun_l26_n164()
+ fun_l27_n660
+end
+
+def fun_l26_n165()
+ fun_l27_n0
+end
+
+def fun_l26_n166()
+ fun_l27_n223
+end
+
+def fun_l26_n167()
+ fun_l27_n341
+end
+
+def fun_l26_n168()
+ fun_l27_n128
+end
+
+def fun_l26_n169()
+ fun_l27_n367
+end
+
+def fun_l26_n170()
+ fun_l27_n487
+end
+
+def fun_l26_n171()
+ fun_l27_n574
+end
+
+def fun_l26_n172()
+ fun_l27_n437
+end
+
+def fun_l26_n173()
+ fun_l27_n182
+end
+
+def fun_l26_n174()
+ fun_l27_n607
+end
+
+def fun_l26_n175()
+ fun_l27_n252
+end
+
+def fun_l26_n176()
+ fun_l27_n996
+end
+
+def fun_l26_n177()
+ fun_l27_n904
+end
+
+def fun_l26_n178()
+ fun_l27_n505
+end
+
+def fun_l26_n179()
+ fun_l27_n425
+end
+
+def fun_l26_n180()
+ fun_l27_n610
+end
+
+def fun_l26_n181()
+ fun_l27_n734
+end
+
+def fun_l26_n182()
+ fun_l27_n427
+end
+
+def fun_l26_n183()
+ fun_l27_n918
+end
+
+def fun_l26_n184()
+ fun_l27_n376
+end
+
+def fun_l26_n185()
+ fun_l27_n445
+end
+
+def fun_l26_n186()
+ fun_l27_n227
+end
+
+def fun_l26_n187()
+ fun_l27_n129
+end
+
+def fun_l26_n188()
+ fun_l27_n139
+end
+
+def fun_l26_n189()
+ fun_l27_n142
+end
+
+def fun_l26_n190()
+ fun_l27_n388
+end
+
+def fun_l26_n191()
+ fun_l27_n24
+end
+
+def fun_l26_n192()
+ fun_l27_n369
+end
+
+def fun_l26_n193()
+ fun_l27_n984
+end
+
+def fun_l26_n194()
+ fun_l27_n342
+end
+
+def fun_l26_n195()
+ fun_l27_n722
+end
+
+def fun_l26_n196()
+ fun_l27_n846
+end
+
+def fun_l26_n197()
+ fun_l27_n59
+end
+
+def fun_l26_n198()
+ fun_l27_n471
+end
+
+def fun_l26_n199()
+ fun_l27_n626
+end
+
+def fun_l26_n200()
+ fun_l27_n973
+end
+
+def fun_l26_n201()
+ fun_l27_n525
+end
+
+def fun_l26_n202()
+ fun_l27_n412
+end
+
+def fun_l26_n203()
+ fun_l27_n284
+end
+
+def fun_l26_n204()
+ fun_l27_n383
+end
+
+def fun_l26_n205()
+ fun_l27_n414
+end
+
+def fun_l26_n206()
+ fun_l27_n448
+end
+
+def fun_l26_n207()
+ fun_l27_n795
+end
+
+def fun_l26_n208()
+ fun_l27_n708
+end
+
+def fun_l26_n209()
+ fun_l27_n318
+end
+
+def fun_l26_n210()
+ fun_l27_n284
+end
+
+def fun_l26_n211()
+ fun_l27_n100
+end
+
+def fun_l26_n212()
+ fun_l27_n702
+end
+
+def fun_l26_n213()
+ fun_l27_n611
+end
+
+def fun_l26_n214()
+ fun_l27_n106
+end
+
+def fun_l26_n215()
+ fun_l27_n667
+end
+
+def fun_l26_n216()
+ fun_l27_n822
+end
+
+def fun_l26_n217()
+ fun_l27_n502
+end
+
+def fun_l26_n218()
+ fun_l27_n284
+end
+
+def fun_l26_n219()
+ fun_l27_n472
+end
+
+def fun_l26_n220()
+ fun_l27_n907
+end
+
+def fun_l26_n221()
+ fun_l27_n115
+end
+
+def fun_l26_n222()
+ fun_l27_n6
+end
+
+def fun_l26_n223()
+ fun_l27_n872
+end
+
+def fun_l26_n224()
+ fun_l27_n145
+end
+
+def fun_l26_n225()
+ fun_l27_n63
+end
+
+def fun_l26_n226()
+ fun_l27_n295
+end
+
+def fun_l26_n227()
+ fun_l27_n160
+end
+
+def fun_l26_n228()
+ fun_l27_n72
+end
+
+def fun_l26_n229()
+ fun_l27_n750
+end
+
+def fun_l26_n230()
+ fun_l27_n386
+end
+
+def fun_l26_n231()
+ fun_l27_n110
+end
+
+def fun_l26_n232()
+ fun_l27_n497
+end
+
+def fun_l26_n233()
+ fun_l27_n586
+end
+
+def fun_l26_n234()
+ fun_l27_n435
+end
+
+def fun_l26_n235()
+ fun_l27_n849
+end
+
+def fun_l26_n236()
+ fun_l27_n47
+end
+
+def fun_l26_n237()
+ fun_l27_n673
+end
+
+def fun_l26_n238()
+ fun_l27_n435
+end
+
+def fun_l26_n239()
+ fun_l27_n295
+end
+
+def fun_l26_n240()
+ fun_l27_n466
+end
+
+def fun_l26_n241()
+ fun_l27_n76
+end
+
+def fun_l26_n242()
+ fun_l27_n679
+end
+
+def fun_l26_n243()
+ fun_l27_n772
+end
+
+def fun_l26_n244()
+ fun_l27_n137
+end
+
+def fun_l26_n245()
+ fun_l27_n582
+end
+
+def fun_l26_n246()
+ fun_l27_n344
+end
+
+def fun_l26_n247()
+ fun_l27_n944
+end
+
+def fun_l26_n248()
+ fun_l27_n657
+end
+
+def fun_l26_n249()
+ fun_l27_n354
+end
+
+def fun_l26_n250()
+ fun_l27_n467
+end
+
+def fun_l26_n251()
+ fun_l27_n436
+end
+
+def fun_l26_n252()
+ fun_l27_n923
+end
+
+def fun_l26_n253()
+ fun_l27_n252
+end
+
+def fun_l26_n254()
+ fun_l27_n404
+end
+
+def fun_l26_n255()
+ fun_l27_n421
+end
+
+def fun_l26_n256()
+ fun_l27_n422
+end
+
+def fun_l26_n257()
+ fun_l27_n787
+end
+
+def fun_l26_n258()
+ fun_l27_n173
+end
+
+def fun_l26_n259()
+ fun_l27_n930
+end
+
+def fun_l26_n260()
+ fun_l27_n625
+end
+
+def fun_l26_n261()
+ fun_l27_n18
+end
+
+def fun_l26_n262()
+ fun_l27_n763
+end
+
+def fun_l26_n263()
+ fun_l27_n641
+end
+
+def fun_l26_n264()
+ fun_l27_n114
+end
+
+def fun_l26_n265()
+ fun_l27_n556
+end
+
+def fun_l26_n266()
+ fun_l27_n127
+end
+
+def fun_l26_n267()
+ fun_l27_n229
+end
+
+def fun_l26_n268()
+ fun_l27_n901
+end
+
+def fun_l26_n269()
+ fun_l27_n234
+end
+
+def fun_l26_n270()
+ fun_l27_n444
+end
+
+def fun_l26_n271()
+ fun_l27_n156
+end
+
+def fun_l26_n272()
+ fun_l27_n35
+end
+
+def fun_l26_n273()
+ fun_l27_n725
+end
+
+def fun_l26_n274()
+ fun_l27_n983
+end
+
+def fun_l26_n275()
+ fun_l27_n845
+end
+
+def fun_l26_n276()
+ fun_l27_n324
+end
+
+def fun_l26_n277()
+ fun_l27_n813
+end
+
+def fun_l26_n278()
+ fun_l27_n331
+end
+
+def fun_l26_n279()
+ fun_l27_n66
+end
+
+def fun_l26_n280()
+ fun_l27_n471
+end
+
+def fun_l26_n281()
+ fun_l27_n635
+end
+
+def fun_l26_n282()
+ fun_l27_n180
+end
+
+def fun_l26_n283()
+ fun_l27_n563
+end
+
+def fun_l26_n284()
+ fun_l27_n199
+end
+
+def fun_l26_n285()
+ fun_l27_n238
+end
+
+def fun_l26_n286()
+ fun_l27_n789
+end
+
+def fun_l26_n287()
+ fun_l27_n413
+end
+
+def fun_l26_n288()
+ fun_l27_n358
+end
+
+def fun_l26_n289()
+ fun_l27_n923
+end
+
+def fun_l26_n290()
+ fun_l27_n443
+end
+
+def fun_l26_n291()
+ fun_l27_n706
+end
+
+def fun_l26_n292()
+ fun_l27_n752
+end
+
+def fun_l26_n293()
+ fun_l27_n231
+end
+
+def fun_l26_n294()
+ fun_l27_n185
+end
+
+def fun_l26_n295()
+ fun_l27_n604
+end
+
+def fun_l26_n296()
+ fun_l27_n10
+end
+
+def fun_l26_n297()
+ fun_l27_n758
+end
+
+def fun_l26_n298()
+ fun_l27_n417
+end
+
+def fun_l26_n299()
+ fun_l27_n303
+end
+
+def fun_l26_n300()
+ fun_l27_n524
+end
+
+def fun_l26_n301()
+ fun_l27_n198
+end
+
+def fun_l26_n302()
+ fun_l27_n127
+end
+
+def fun_l26_n303()
+ fun_l27_n971
+end
+
+def fun_l26_n304()
+ fun_l27_n4
+end
+
+def fun_l26_n305()
+ fun_l27_n333
+end
+
+def fun_l26_n306()
+ fun_l27_n782
+end
+
+def fun_l26_n307()
+ fun_l27_n158
+end
+
+def fun_l26_n308()
+ fun_l27_n414
+end
+
+def fun_l26_n309()
+ fun_l27_n730
+end
+
+def fun_l26_n310()
+ fun_l27_n912
+end
+
+def fun_l26_n311()
+ fun_l27_n343
+end
+
+def fun_l26_n312()
+ fun_l27_n885
+end
+
+def fun_l26_n313()
+ fun_l27_n682
+end
+
+def fun_l26_n314()
+ fun_l27_n126
+end
+
+def fun_l26_n315()
+ fun_l27_n680
+end
+
+def fun_l26_n316()
+ fun_l27_n884
+end
+
+def fun_l26_n317()
+ fun_l27_n483
+end
+
+def fun_l26_n318()
+ fun_l27_n601
+end
+
+def fun_l26_n319()
+ fun_l27_n265
+end
+
+def fun_l26_n320()
+ fun_l27_n109
+end
+
+def fun_l26_n321()
+ fun_l27_n436
+end
+
+def fun_l26_n322()
+ fun_l27_n209
+end
+
+def fun_l26_n323()
+ fun_l27_n669
+end
+
+def fun_l26_n324()
+ fun_l27_n680
+end
+
+def fun_l26_n325()
+ fun_l27_n844
+end
+
+def fun_l26_n326()
+ fun_l27_n729
+end
+
+def fun_l26_n327()
+ fun_l27_n882
+end
+
+def fun_l26_n328()
+ fun_l27_n99
+end
+
+def fun_l26_n329()
+ fun_l27_n586
+end
+
+def fun_l26_n330()
+ fun_l27_n328
+end
+
+def fun_l26_n331()
+ fun_l27_n694
+end
+
+def fun_l26_n332()
+ fun_l27_n259
+end
+
+def fun_l26_n333()
+ fun_l27_n364
+end
+
+def fun_l26_n334()
+ fun_l27_n944
+end
+
+def fun_l26_n335()
+ fun_l27_n483
+end
+
+def fun_l26_n336()
+ fun_l27_n570
+end
+
+def fun_l26_n337()
+ fun_l27_n348
+end
+
+def fun_l26_n338()
+ fun_l27_n565
+end
+
+def fun_l26_n339()
+ fun_l27_n402
+end
+
+def fun_l26_n340()
+ fun_l27_n890
+end
+
+def fun_l26_n341()
+ fun_l27_n486
+end
+
+def fun_l26_n342()
+ fun_l27_n387
+end
+
+def fun_l26_n343()
+ fun_l27_n239
+end
+
+def fun_l26_n344()
+ fun_l27_n433
+end
+
+def fun_l26_n345()
+ fun_l27_n918
+end
+
+def fun_l26_n346()
+ fun_l27_n524
+end
+
+def fun_l26_n347()
+ fun_l27_n475
+end
+
+def fun_l26_n348()
+ fun_l27_n749
+end
+
+def fun_l26_n349()
+ fun_l27_n61
+end
+
+def fun_l26_n350()
+ fun_l27_n735
+end
+
+def fun_l26_n351()
+ fun_l27_n582
+end
+
+def fun_l26_n352()
+ fun_l27_n519
+end
+
+def fun_l26_n353()
+ fun_l27_n234
+end
+
+def fun_l26_n354()
+ fun_l27_n868
+end
+
+def fun_l26_n355()
+ fun_l27_n109
+end
+
+def fun_l26_n356()
+ fun_l27_n898
+end
+
+def fun_l26_n357()
+ fun_l27_n541
+end
+
+def fun_l26_n358()
+ fun_l27_n328
+end
+
+def fun_l26_n359()
+ fun_l27_n954
+end
+
+def fun_l26_n360()
+ fun_l27_n219
+end
+
+def fun_l26_n361()
+ fun_l27_n776
+end
+
+def fun_l26_n362()
+ fun_l27_n402
+end
+
+def fun_l26_n363()
+ fun_l27_n169
+end
+
+def fun_l26_n364()
+ fun_l27_n395
+end
+
+def fun_l26_n365()
+ fun_l27_n852
+end
+
+def fun_l26_n366()
+ fun_l27_n668
+end
+
+def fun_l26_n367()
+ fun_l27_n0
+end
+
+def fun_l26_n368()
+ fun_l27_n660
+end
+
+def fun_l26_n369()
+ fun_l27_n703
+end
+
+def fun_l26_n370()
+ fun_l27_n946
+end
+
+def fun_l26_n371()
+ fun_l27_n522
+end
+
+def fun_l26_n372()
+ fun_l27_n57
+end
+
+def fun_l26_n373()
+ fun_l27_n228
+end
+
+def fun_l26_n374()
+ fun_l27_n25
+end
+
+def fun_l26_n375()
+ fun_l27_n433
+end
+
+def fun_l26_n376()
+ fun_l27_n557
+end
+
+def fun_l26_n377()
+ fun_l27_n542
+end
+
+def fun_l26_n378()
+ fun_l27_n341
+end
+
+def fun_l26_n379()
+ fun_l27_n28
+end
+
+def fun_l26_n380()
+ fun_l27_n591
+end
+
+def fun_l26_n381()
+ fun_l27_n139
+end
+
+def fun_l26_n382()
+ fun_l27_n303
+end
+
+def fun_l26_n383()
+ fun_l27_n369
+end
+
+def fun_l26_n384()
+ fun_l27_n124
+end
+
+def fun_l26_n385()
+ fun_l27_n459
+end
+
+def fun_l26_n386()
+ fun_l27_n338
+end
+
+def fun_l26_n387()
+ fun_l27_n246
+end
+
+def fun_l26_n388()
+ fun_l27_n248
+end
+
+def fun_l26_n389()
+ fun_l27_n182
+end
+
+def fun_l26_n390()
+ fun_l27_n176
+end
+
+def fun_l26_n391()
+ fun_l27_n307
+end
+
+def fun_l26_n392()
+ fun_l27_n782
+end
+
+def fun_l26_n393()
+ fun_l27_n576
+end
+
+def fun_l26_n394()
+ fun_l27_n777
+end
+
+def fun_l26_n395()
+ fun_l27_n962
+end
+
+def fun_l26_n396()
+ fun_l27_n993
+end
+
+def fun_l26_n397()
+ fun_l27_n592
+end
+
+def fun_l26_n398()
+ fun_l27_n710
+end
+
+def fun_l26_n399()
+ fun_l27_n644
+end
+
+def fun_l26_n400()
+ fun_l27_n11
+end
+
+def fun_l26_n401()
+ fun_l27_n774
+end
+
+def fun_l26_n402()
+ fun_l27_n190
+end
+
+def fun_l26_n403()
+ fun_l27_n15
+end
+
+def fun_l26_n404()
+ fun_l27_n47
+end
+
+def fun_l26_n405()
+ fun_l27_n802
+end
+
+def fun_l26_n406()
+ fun_l27_n659
+end
+
+def fun_l26_n407()
+ fun_l27_n295
+end
+
+def fun_l26_n408()
+ fun_l27_n120
+end
+
+def fun_l26_n409()
+ fun_l27_n438
+end
+
+def fun_l26_n410()
+ fun_l27_n443
+end
+
+def fun_l26_n411()
+ fun_l27_n860
+end
+
+def fun_l26_n412()
+ fun_l27_n285
+end
+
+def fun_l26_n413()
+ fun_l27_n457
+end
+
+def fun_l26_n414()
+ fun_l27_n942
+end
+
+def fun_l26_n415()
+ fun_l27_n425
+end
+
+def fun_l26_n416()
+ fun_l27_n54
+end
+
+def fun_l26_n417()
+ fun_l27_n675
+end
+
+def fun_l26_n418()
+ fun_l27_n739
+end
+
+def fun_l26_n419()
+ fun_l27_n709
+end
+
+def fun_l26_n420()
+ fun_l27_n643
+end
+
+def fun_l26_n421()
+ fun_l27_n473
+end
+
+def fun_l26_n422()
+ fun_l27_n452
+end
+
+def fun_l26_n423()
+ fun_l27_n942
+end
+
+def fun_l26_n424()
+ fun_l27_n270
+end
+
+def fun_l26_n425()
+ fun_l27_n711
+end
+
+def fun_l26_n426()
+ fun_l27_n27
+end
+
+def fun_l26_n427()
+ fun_l27_n120
+end
+
+def fun_l26_n428()
+ fun_l27_n565
+end
+
+def fun_l26_n429()
+ fun_l27_n182
+end
+
+def fun_l26_n430()
+ fun_l27_n641
+end
+
+def fun_l26_n431()
+ fun_l27_n227
+end
+
+def fun_l26_n432()
+ fun_l27_n59
+end
+
+def fun_l26_n433()
+ fun_l27_n599
+end
+
+def fun_l26_n434()
+ fun_l27_n448
+end
+
+def fun_l26_n435()
+ fun_l27_n562
+end
+
+def fun_l26_n436()
+ fun_l27_n201
+end
+
+def fun_l26_n437()
+ fun_l27_n929
+end
+
+def fun_l26_n438()
+ fun_l27_n275
+end
+
+def fun_l26_n439()
+ fun_l27_n339
+end
+
+def fun_l26_n440()
+ fun_l27_n519
+end
+
+def fun_l26_n441()
+ fun_l27_n98
+end
+
+def fun_l26_n442()
+ fun_l27_n581
+end
+
+def fun_l26_n443()
+ fun_l27_n840
+end
+
+def fun_l26_n444()
+ fun_l27_n904
+end
+
+def fun_l26_n445()
+ fun_l27_n468
+end
+
+def fun_l26_n446()
+ fun_l27_n6
+end
+
+def fun_l26_n447()
+ fun_l27_n877
+end
+
+def fun_l26_n448()
+ fun_l27_n609
+end
+
+def fun_l26_n449()
+ fun_l27_n218
+end
+
+def fun_l26_n450()
+ fun_l27_n869
+end
+
+def fun_l26_n451()
+ fun_l27_n184
+end
+
+def fun_l26_n452()
+ fun_l27_n7
+end
+
+def fun_l26_n453()
+ fun_l27_n647
+end
+
+def fun_l26_n454()
+ fun_l27_n470
+end
+
+def fun_l26_n455()
+ fun_l27_n547
+end
+
+def fun_l26_n456()
+ fun_l27_n277
+end
+
+def fun_l26_n457()
+ fun_l27_n302
+end
+
+def fun_l26_n458()
+ fun_l27_n355
+end
+
+def fun_l26_n459()
+ fun_l27_n805
+end
+
+def fun_l26_n460()
+ fun_l27_n201
+end
+
+def fun_l26_n461()
+ fun_l27_n16
+end
+
+def fun_l26_n462()
+ fun_l27_n156
+end
+
+def fun_l26_n463()
+ fun_l27_n219
+end
+
+def fun_l26_n464()
+ fun_l27_n507
+end
+
+def fun_l26_n465()
+ fun_l27_n527
+end
+
+def fun_l26_n466()
+ fun_l27_n307
+end
+
+def fun_l26_n467()
+ fun_l27_n654
+end
+
+def fun_l26_n468()
+ fun_l27_n699
+end
+
+def fun_l26_n469()
+ fun_l27_n772
+end
+
+def fun_l26_n470()
+ fun_l27_n761
+end
+
+def fun_l26_n471()
+ fun_l27_n736
+end
+
+def fun_l26_n472()
+ fun_l27_n104
+end
+
+def fun_l26_n473()
+ fun_l27_n720
+end
+
+def fun_l26_n474()
+ fun_l27_n418
+end
+
+def fun_l26_n475()
+ fun_l27_n403
+end
+
+def fun_l26_n476()
+ fun_l27_n625
+end
+
+def fun_l26_n477()
+ fun_l27_n541
+end
+
+def fun_l26_n478()
+ fun_l27_n441
+end
+
+def fun_l26_n479()
+ fun_l27_n287
+end
+
+def fun_l26_n480()
+ fun_l27_n746
+end
+
+def fun_l26_n481()
+ fun_l27_n205
+end
+
+def fun_l26_n482()
+ fun_l27_n771
+end
+
+def fun_l26_n483()
+ fun_l27_n778
+end
+
+def fun_l26_n484()
+ fun_l27_n284
+end
+
+def fun_l26_n485()
+ fun_l27_n475
+end
+
+def fun_l26_n486()
+ fun_l27_n449
+end
+
+def fun_l26_n487()
+ fun_l27_n485
+end
+
+def fun_l26_n488()
+ fun_l27_n124
+end
+
+def fun_l26_n489()
+ fun_l27_n4
+end
+
+def fun_l26_n490()
+ fun_l27_n270
+end
+
+def fun_l26_n491()
+ fun_l27_n596
+end
+
+def fun_l26_n492()
+ fun_l27_n279
+end
+
+def fun_l26_n493()
+ fun_l27_n226
+end
+
+def fun_l26_n494()
+ fun_l27_n718
+end
+
+def fun_l26_n495()
+ fun_l27_n324
+end
+
+def fun_l26_n496()
+ fun_l27_n430
+end
+
+def fun_l26_n497()
+ fun_l27_n196
+end
+
+def fun_l26_n498()
+ fun_l27_n509
+end
+
+def fun_l26_n499()
+ fun_l27_n282
+end
+
+def fun_l26_n500()
+ fun_l27_n61
+end
+
+def fun_l26_n501()
+ fun_l27_n995
+end
+
+def fun_l26_n502()
+ fun_l27_n75
+end
+
+def fun_l26_n503()
+ fun_l27_n158
+end
+
+def fun_l26_n504()
+ fun_l27_n551
+end
+
+def fun_l26_n505()
+ fun_l27_n936
+end
+
+def fun_l26_n506()
+ fun_l27_n23
+end
+
+def fun_l26_n507()
+ fun_l27_n799
+end
+
+def fun_l26_n508()
+ fun_l27_n25
+end
+
+def fun_l26_n509()
+ fun_l27_n533
+end
+
+def fun_l26_n510()
+ fun_l27_n325
+end
+
+def fun_l26_n511()
+ fun_l27_n375
+end
+
+def fun_l26_n512()
+ fun_l27_n18
+end
+
+def fun_l26_n513()
+ fun_l27_n497
+end
+
+def fun_l26_n514()
+ fun_l27_n51
+end
+
+def fun_l26_n515()
+ fun_l27_n680
+end
+
+def fun_l26_n516()
+ fun_l27_n152
+end
+
+def fun_l26_n517()
+ fun_l27_n495
+end
+
+def fun_l26_n518()
+ fun_l27_n956
+end
+
+def fun_l26_n519()
+ fun_l27_n187
+end
+
+def fun_l26_n520()
+ fun_l27_n292
+end
+
+def fun_l26_n521()
+ fun_l27_n663
+end
+
+def fun_l26_n522()
+ fun_l27_n178
+end
+
+def fun_l26_n523()
+ fun_l27_n323
+end
+
+def fun_l26_n524()
+ fun_l27_n222
+end
+
+def fun_l26_n525()
+ fun_l27_n652
+end
+
+def fun_l26_n526()
+ fun_l27_n519
+end
+
+def fun_l26_n527()
+ fun_l27_n102
+end
+
+def fun_l26_n528()
+ fun_l27_n361
+end
+
+def fun_l26_n529()
+ fun_l27_n201
+end
+
+def fun_l26_n530()
+ fun_l27_n129
+end
+
+def fun_l26_n531()
+ fun_l27_n438
+end
+
+def fun_l26_n532()
+ fun_l27_n387
+end
+
+def fun_l26_n533()
+ fun_l27_n641
+end
+
+def fun_l26_n534()
+ fun_l27_n111
+end
+
+def fun_l26_n535()
+ fun_l27_n548
+end
+
+def fun_l26_n536()
+ fun_l27_n446
+end
+
+def fun_l26_n537()
+ fun_l27_n302
+end
+
+def fun_l26_n538()
+ fun_l27_n438
+end
+
+def fun_l26_n539()
+ fun_l27_n816
+end
+
+def fun_l26_n540()
+ fun_l27_n759
+end
+
+def fun_l26_n541()
+ fun_l27_n318
+end
+
+def fun_l26_n542()
+ fun_l27_n895
+end
+
+def fun_l26_n543()
+ fun_l27_n309
+end
+
+def fun_l26_n544()
+ fun_l27_n35
+end
+
+def fun_l26_n545()
+ fun_l27_n785
+end
+
+def fun_l26_n546()
+ fun_l27_n846
+end
+
+def fun_l26_n547()
+ fun_l27_n191
+end
+
+def fun_l26_n548()
+ fun_l27_n414
+end
+
+def fun_l26_n549()
+ fun_l27_n251
+end
+
+def fun_l26_n550()
+ fun_l27_n982
+end
+
+def fun_l26_n551()
+ fun_l27_n516
+end
+
+def fun_l26_n552()
+ fun_l27_n724
+end
+
+def fun_l26_n553()
+ fun_l27_n473
+end
+
+def fun_l26_n554()
+ fun_l27_n808
+end
+
+def fun_l26_n555()
+ fun_l27_n617
+end
+
+def fun_l26_n556()
+ fun_l27_n306
+end
+
+def fun_l26_n557()
+ fun_l27_n701
+end
+
+def fun_l26_n558()
+ fun_l27_n941
+end
+
+def fun_l26_n559()
+ fun_l27_n60
+end
+
+def fun_l26_n560()
+ fun_l27_n132
+end
+
+def fun_l26_n561()
+ fun_l27_n685
+end
+
+def fun_l26_n562()
+ fun_l27_n619
+end
+
+def fun_l26_n563()
+ fun_l27_n407
+end
+
+def fun_l26_n564()
+ fun_l27_n29
+end
+
+def fun_l26_n565()
+ fun_l27_n53
+end
+
+def fun_l26_n566()
+ fun_l27_n267
+end
+
+def fun_l26_n567()
+ fun_l27_n79
+end
+
+def fun_l26_n568()
+ fun_l27_n170
+end
+
+def fun_l26_n569()
+ fun_l27_n469
+end
+
+def fun_l26_n570()
+ fun_l27_n67
+end
+
+def fun_l26_n571()
+ fun_l27_n794
+end
+
+def fun_l26_n572()
+ fun_l27_n641
+end
+
+def fun_l26_n573()
+ fun_l27_n224
+end
+
+def fun_l26_n574()
+ fun_l27_n415
+end
+
+def fun_l26_n575()
+ fun_l27_n235
+end
+
+def fun_l26_n576()
+ fun_l27_n425
+end
+
+def fun_l26_n577()
+ fun_l27_n335
+end
+
+def fun_l26_n578()
+ fun_l27_n251
+end
+
+def fun_l26_n579()
+ fun_l27_n421
+end
+
+def fun_l26_n580()
+ fun_l27_n20
+end
+
+def fun_l26_n581()
+ fun_l27_n795
+end
+
+def fun_l26_n582()
+ fun_l27_n831
+end
+
+def fun_l26_n583()
+ fun_l27_n666
+end
+
+def fun_l26_n584()
+ fun_l27_n664
+end
+
+def fun_l26_n585()
+ fun_l27_n383
+end
+
+def fun_l26_n586()
+ fun_l27_n587
+end
+
+def fun_l26_n587()
+ fun_l27_n515
+end
+
+def fun_l26_n588()
+ fun_l27_n410
+end
+
+def fun_l26_n589()
+ fun_l27_n379
+end
+
+def fun_l26_n590()
+ fun_l27_n467
+end
+
+def fun_l26_n591()
+ fun_l27_n557
+end
+
+def fun_l26_n592()
+ fun_l27_n444
+end
+
+def fun_l26_n593()
+ fun_l27_n629
+end
+
+def fun_l26_n594()
+ fun_l27_n55
+end
+
+def fun_l26_n595()
+ fun_l27_n581
+end
+
+def fun_l26_n596()
+ fun_l27_n106
+end
+
+def fun_l26_n597()
+ fun_l27_n896
+end
+
+def fun_l26_n598()
+ fun_l27_n180
+end
+
+def fun_l26_n599()
+ fun_l27_n471
+end
+
+def fun_l26_n600()
+ fun_l27_n28
+end
+
+def fun_l26_n601()
+ fun_l27_n195
+end
+
+def fun_l26_n602()
+ fun_l27_n562
+end
+
+def fun_l26_n603()
+ fun_l27_n367
+end
+
+def fun_l26_n604()
+ fun_l27_n609
+end
+
+def fun_l26_n605()
+ fun_l27_n699
+end
+
+def fun_l26_n606()
+ fun_l27_n300
+end
+
+def fun_l26_n607()
+ fun_l27_n28
+end
+
+def fun_l26_n608()
+ fun_l27_n362
+end
+
+def fun_l26_n609()
+ fun_l27_n188
+end
+
+def fun_l26_n610()
+ fun_l27_n320
+end
+
+def fun_l26_n611()
+ fun_l27_n974
+end
+
+def fun_l26_n612()
+ fun_l27_n226
+end
+
+def fun_l26_n613()
+ fun_l27_n723
+end
+
+def fun_l26_n614()
+ fun_l27_n406
+end
+
+def fun_l26_n615()
+ fun_l27_n60
+end
+
+def fun_l26_n616()
+ fun_l27_n921
+end
+
+def fun_l26_n617()
+ fun_l27_n141
+end
+
+def fun_l26_n618()
+ fun_l27_n781
+end
+
+def fun_l26_n619()
+ fun_l27_n279
+end
+
+def fun_l26_n620()
+ fun_l27_n159
+end
+
+def fun_l26_n621()
+ fun_l27_n396
+end
+
+def fun_l26_n622()
+ fun_l27_n365
+end
+
+def fun_l26_n623()
+ fun_l27_n128
+end
+
+def fun_l26_n624()
+ fun_l27_n143
+end
+
+def fun_l26_n625()
+ fun_l27_n553
+end
+
+def fun_l26_n626()
+ fun_l27_n695
+end
+
+def fun_l26_n627()
+ fun_l27_n526
+end
+
+def fun_l26_n628()
+ fun_l27_n623
+end
+
+def fun_l26_n629()
+ fun_l27_n589
+end
+
+def fun_l26_n630()
+ fun_l27_n328
+end
+
+def fun_l26_n631()
+ fun_l27_n959
+end
+
+def fun_l26_n632()
+ fun_l27_n586
+end
+
+def fun_l26_n633()
+ fun_l27_n163
+end
+
+def fun_l26_n634()
+ fun_l27_n821
+end
+
+def fun_l26_n635()
+ fun_l27_n981
+end
+
+def fun_l26_n636()
+ fun_l27_n221
+end
+
+def fun_l26_n637()
+ fun_l27_n752
+end
+
+def fun_l26_n638()
+ fun_l27_n252
+end
+
+def fun_l26_n639()
+ fun_l27_n74
+end
+
+def fun_l26_n640()
+ fun_l27_n694
+end
+
+def fun_l26_n641()
+ fun_l27_n761
+end
+
+def fun_l26_n642()
+ fun_l27_n877
+end
+
+def fun_l26_n643()
+ fun_l27_n480
+end
+
+def fun_l26_n644()
+ fun_l27_n627
+end
+
+def fun_l26_n645()
+ fun_l27_n586
+end
+
+def fun_l26_n646()
+ fun_l27_n820
+end
+
+def fun_l26_n647()
+ fun_l27_n485
+end
+
+def fun_l26_n648()
+ fun_l27_n230
+end
+
+def fun_l26_n649()
+ fun_l27_n698
+end
+
+def fun_l26_n650()
+ fun_l27_n700
+end
+
+def fun_l26_n651()
+ fun_l27_n536
+end
+
+def fun_l26_n652()
+ fun_l27_n343
+end
+
+def fun_l26_n653()
+ fun_l27_n453
+end
+
+def fun_l26_n654()
+ fun_l27_n780
+end
+
+def fun_l26_n655()
+ fun_l27_n402
+end
+
+def fun_l26_n656()
+ fun_l27_n749
+end
+
+def fun_l26_n657()
+ fun_l27_n248
+end
+
+def fun_l26_n658()
+ fun_l27_n326
+end
+
+def fun_l26_n659()
+ fun_l27_n819
+end
+
+def fun_l26_n660()
+ fun_l27_n968
+end
+
+def fun_l26_n661()
+ fun_l27_n123
+end
+
+def fun_l26_n662()
+ fun_l27_n467
+end
+
+def fun_l26_n663()
+ fun_l27_n855
+end
+
+def fun_l26_n664()
+ fun_l27_n861
+end
+
+def fun_l26_n665()
+ fun_l27_n335
+end
+
+def fun_l26_n666()
+ fun_l27_n805
+end
+
+def fun_l26_n667()
+ fun_l27_n284
+end
+
+def fun_l26_n668()
+ fun_l27_n283
+end
+
+def fun_l26_n669()
+ fun_l27_n471
+end
+
+def fun_l26_n670()
+ fun_l27_n479
+end
+
+def fun_l26_n671()
+ fun_l27_n938
+end
+
+def fun_l26_n672()
+ fun_l27_n288
+end
+
+def fun_l26_n673()
+ fun_l27_n0
+end
+
+def fun_l26_n674()
+ fun_l27_n856
+end
+
+def fun_l26_n675()
+ fun_l27_n490
+end
+
+def fun_l26_n676()
+ fun_l27_n88
+end
+
+def fun_l26_n677()
+ fun_l27_n584
+end
+
+def fun_l26_n678()
+ fun_l27_n138
+end
+
+def fun_l26_n679()
+ fun_l27_n998
+end
+
+def fun_l26_n680()
+ fun_l27_n259
+end
+
+def fun_l26_n681()
+ fun_l27_n913
+end
+
+def fun_l26_n682()
+ fun_l27_n697
+end
+
+def fun_l26_n683()
+ fun_l27_n102
+end
+
+def fun_l26_n684()
+ fun_l27_n726
+end
+
+def fun_l26_n685()
+ fun_l27_n655
+end
+
+def fun_l26_n686()
+ fun_l27_n264
+end
+
+def fun_l26_n687()
+ fun_l27_n603
+end
+
+def fun_l26_n688()
+ fun_l27_n331
+end
+
+def fun_l26_n689()
+ fun_l27_n760
+end
+
+def fun_l26_n690()
+ fun_l27_n105
+end
+
+def fun_l26_n691()
+ fun_l27_n554
+end
+
+def fun_l26_n692()
+ fun_l27_n287
+end
+
+def fun_l26_n693()
+ fun_l27_n592
+end
+
+def fun_l26_n694()
+ fun_l27_n22
+end
+
+def fun_l26_n695()
+ fun_l27_n794
+end
+
+def fun_l26_n696()
+ fun_l27_n196
+end
+
+def fun_l26_n697()
+ fun_l27_n848
+end
+
+def fun_l26_n698()
+ fun_l27_n589
+end
+
+def fun_l26_n699()
+ fun_l27_n267
+end
+
+def fun_l26_n700()
+ fun_l27_n562
+end
+
+def fun_l26_n701()
+ fun_l27_n563
+end
+
+def fun_l26_n702()
+ fun_l27_n909
+end
+
+def fun_l26_n703()
+ fun_l27_n92
+end
+
+def fun_l26_n704()
+ fun_l27_n140
+end
+
+def fun_l26_n705()
+ fun_l27_n330
+end
+
+def fun_l26_n706()
+ fun_l27_n734
+end
+
+def fun_l26_n707()
+ fun_l27_n994
+end
+
+def fun_l26_n708()
+ fun_l27_n414
+end
+
+def fun_l26_n709()
+ fun_l27_n931
+end
+
+def fun_l26_n710()
+ fun_l27_n82
+end
+
+def fun_l26_n711()
+ fun_l27_n341
+end
+
+def fun_l26_n712()
+ fun_l27_n9
+end
+
+def fun_l26_n713()
+ fun_l27_n868
+end
+
+def fun_l26_n714()
+ fun_l27_n249
+end
+
+def fun_l26_n715()
+ fun_l27_n393
+end
+
+def fun_l26_n716()
+ fun_l27_n835
+end
+
+def fun_l26_n717()
+ fun_l27_n975
+end
+
+def fun_l26_n718()
+ fun_l27_n110
+end
+
+def fun_l26_n719()
+ fun_l27_n700
+end
+
+def fun_l26_n720()
+ fun_l27_n396
+end
+
+def fun_l26_n721()
+ fun_l27_n973
+end
+
+def fun_l26_n722()
+ fun_l27_n898
+end
+
+def fun_l26_n723()
+ fun_l27_n418
+end
+
+def fun_l26_n724()
+ fun_l27_n342
+end
+
+def fun_l26_n725()
+ fun_l27_n783
+end
+
+def fun_l26_n726()
+ fun_l27_n86
+end
+
+def fun_l26_n727()
+ fun_l27_n556
+end
+
+def fun_l26_n728()
+ fun_l27_n777
+end
+
+def fun_l26_n729()
+ fun_l27_n729
+end
+
+def fun_l26_n730()
+ fun_l27_n156
+end
+
+def fun_l26_n731()
+ fun_l27_n458
+end
+
+def fun_l26_n732()
+ fun_l27_n580
+end
+
+def fun_l26_n733()
+ fun_l27_n764
+end
+
+def fun_l26_n734()
+ fun_l27_n295
+end
+
+def fun_l26_n735()
+ fun_l27_n850
+end
+
+def fun_l26_n736()
+ fun_l27_n881
+end
+
+def fun_l26_n737()
+ fun_l27_n416
+end
+
+def fun_l26_n738()
+ fun_l27_n996
+end
+
+def fun_l26_n739()
+ fun_l27_n347
+end
+
+def fun_l26_n740()
+ fun_l27_n607
+end
+
+def fun_l26_n741()
+ fun_l27_n749
+end
+
+def fun_l26_n742()
+ fun_l27_n564
+end
+
+def fun_l26_n743()
+ fun_l27_n217
+end
+
+def fun_l26_n744()
+ fun_l27_n375
+end
+
+def fun_l26_n745()
+ fun_l27_n487
+end
+
+def fun_l26_n746()
+ fun_l27_n86
+end
+
+def fun_l26_n747()
+ fun_l27_n765
+end
+
+def fun_l26_n748()
+ fun_l27_n569
+end
+
+def fun_l26_n749()
+ fun_l27_n461
+end
+
+def fun_l26_n750()
+ fun_l27_n633
+end
+
+def fun_l26_n751()
+ fun_l27_n89
+end
+
+def fun_l26_n752()
+ fun_l27_n841
+end
+
+def fun_l26_n753()
+ fun_l27_n499
+end
+
+def fun_l26_n754()
+ fun_l27_n947
+end
+
+def fun_l26_n755()
+ fun_l27_n690
+end
+
+def fun_l26_n756()
+ fun_l27_n531
+end
+
+def fun_l26_n757()
+ fun_l27_n766
+end
+
+def fun_l26_n758()
+ fun_l27_n853
+end
+
+def fun_l26_n759()
+ fun_l27_n65
+end
+
+def fun_l26_n760()
+ fun_l27_n884
+end
+
+def fun_l26_n761()
+ fun_l27_n235
+end
+
+def fun_l26_n762()
+ fun_l27_n39
+end
+
+def fun_l26_n763()
+ fun_l27_n868
+end
+
+def fun_l26_n764()
+ fun_l27_n202
+end
+
+def fun_l26_n765()
+ fun_l27_n360
+end
+
+def fun_l26_n766()
+ fun_l27_n450
+end
+
+def fun_l26_n767()
+ fun_l27_n590
+end
+
+def fun_l26_n768()
+ fun_l27_n635
+end
+
+def fun_l26_n769()
+ fun_l27_n314
+end
+
+def fun_l26_n770()
+ fun_l27_n68
+end
+
+def fun_l26_n771()
+ fun_l27_n858
+end
+
+def fun_l26_n772()
+ fun_l27_n51
+end
+
+def fun_l26_n773()
+ fun_l27_n524
+end
+
+def fun_l26_n774()
+ fun_l27_n13
+end
+
+def fun_l26_n775()
+ fun_l27_n451
+end
+
+def fun_l26_n776()
+ fun_l27_n682
+end
+
+def fun_l26_n777()
+ fun_l27_n736
+end
+
+def fun_l26_n778()
+ fun_l27_n250
+end
+
+def fun_l26_n779()
+ fun_l27_n810
+end
+
+def fun_l26_n780()
+ fun_l27_n979
+end
+
+def fun_l26_n781()
+ fun_l27_n102
+end
+
+def fun_l26_n782()
+ fun_l27_n955
+end
+
+def fun_l26_n783()
+ fun_l27_n610
+end
+
+def fun_l26_n784()
+ fun_l27_n301
+end
+
+def fun_l26_n785()
+ fun_l27_n389
+end
+
+def fun_l26_n786()
+ fun_l27_n754
+end
+
+def fun_l26_n787()
+ fun_l27_n717
+end
+
+def fun_l26_n788()
+ fun_l27_n77
+end
+
+def fun_l26_n789()
+ fun_l27_n401
+end
+
+def fun_l26_n790()
+ fun_l27_n430
+end
+
+def fun_l26_n791()
+ fun_l27_n310
+end
+
+def fun_l26_n792()
+ fun_l27_n839
+end
+
+def fun_l26_n793()
+ fun_l27_n682
+end
+
+def fun_l26_n794()
+ fun_l27_n648
+end
+
+def fun_l26_n795()
+ fun_l27_n281
+end
+
+def fun_l26_n796()
+ fun_l27_n749
+end
+
+def fun_l26_n797()
+ fun_l27_n502
+end
+
+def fun_l26_n798()
+ fun_l27_n201
+end
+
+def fun_l26_n799()
+ fun_l27_n851
+end
+
+def fun_l26_n800()
+ fun_l27_n249
+end
+
+def fun_l26_n801()
+ fun_l27_n119
+end
+
+def fun_l26_n802()
+ fun_l27_n519
+end
+
+def fun_l26_n803()
+ fun_l27_n157
+end
+
+def fun_l26_n804()
+ fun_l27_n53
+end
+
+def fun_l26_n805()
+ fun_l27_n765
+end
+
+def fun_l26_n806()
+ fun_l27_n48
+end
+
+def fun_l26_n807()
+ fun_l27_n127
+end
+
+def fun_l26_n808()
+ fun_l27_n418
+end
+
+def fun_l26_n809()
+ fun_l27_n650
+end
+
+def fun_l26_n810()
+ fun_l27_n918
+end
+
+def fun_l26_n811()
+ fun_l27_n878
+end
+
+def fun_l26_n812()
+ fun_l27_n244
+end
+
+def fun_l26_n813()
+ fun_l27_n611
+end
+
+def fun_l26_n814()
+ fun_l27_n82
+end
+
+def fun_l26_n815()
+ fun_l27_n6
+end
+
+def fun_l26_n816()
+ fun_l27_n486
+end
+
+def fun_l26_n817()
+ fun_l27_n711
+end
+
+def fun_l26_n818()
+ fun_l27_n792
+end
+
+def fun_l26_n819()
+ fun_l27_n974
+end
+
+def fun_l26_n820()
+ fun_l27_n480
+end
+
+def fun_l26_n821()
+ fun_l27_n460
+end
+
+def fun_l26_n822()
+ fun_l27_n520
+end
+
+def fun_l26_n823()
+ fun_l27_n803
+end
+
+def fun_l26_n824()
+ fun_l27_n734
+end
+
+def fun_l26_n825()
+ fun_l27_n336
+end
+
+def fun_l26_n826()
+ fun_l27_n657
+end
+
+def fun_l26_n827()
+ fun_l27_n20
+end
+
+def fun_l26_n828()
+ fun_l27_n83
+end
+
+def fun_l26_n829()
+ fun_l27_n452
+end
+
+def fun_l26_n830()
+ fun_l27_n973
+end
+
+def fun_l26_n831()
+ fun_l27_n79
+end
+
+def fun_l26_n832()
+ fun_l27_n327
+end
+
+def fun_l26_n833()
+ fun_l27_n36
+end
+
+def fun_l26_n834()
+ fun_l27_n186
+end
+
+def fun_l26_n835()
+ fun_l27_n946
+end
+
+def fun_l26_n836()
+ fun_l27_n776
+end
+
+def fun_l26_n837()
+ fun_l27_n33
+end
+
+def fun_l26_n838()
+ fun_l27_n966
+end
+
+def fun_l26_n839()
+ fun_l27_n961
+end
+
+def fun_l26_n840()
+ fun_l27_n181
+end
+
+def fun_l26_n841()
+ fun_l27_n103
+end
+
+def fun_l26_n842()
+ fun_l27_n500
+end
+
+def fun_l26_n843()
+ fun_l27_n359
+end
+
+def fun_l26_n844()
+ fun_l27_n316
+end
+
+def fun_l26_n845()
+ fun_l27_n921
+end
+
+def fun_l26_n846()
+ fun_l27_n745
+end
+
+def fun_l26_n847()
+ fun_l27_n555
+end
+
+def fun_l26_n848()
+ fun_l27_n306
+end
+
+def fun_l26_n849()
+ fun_l27_n462
+end
+
+def fun_l26_n850()
+ fun_l27_n369
+end
+
+def fun_l26_n851()
+ fun_l27_n489
+end
+
+def fun_l26_n852()
+ fun_l27_n276
+end
+
+def fun_l26_n853()
+ fun_l27_n509
+end
+
+def fun_l26_n854()
+ fun_l27_n524
+end
+
+def fun_l26_n855()
+ fun_l27_n421
+end
+
+def fun_l26_n856()
+ fun_l27_n845
+end
+
+def fun_l26_n857()
+ fun_l27_n600
+end
+
+def fun_l26_n858()
+ fun_l27_n961
+end
+
+def fun_l26_n859()
+ fun_l27_n506
+end
+
+def fun_l26_n860()
+ fun_l27_n106
+end
+
+def fun_l26_n861()
+ fun_l27_n525
+end
+
+def fun_l26_n862()
+ fun_l27_n515
+end
+
+def fun_l26_n863()
+ fun_l27_n506
+end
+
+def fun_l26_n864()
+ fun_l27_n283
+end
+
+def fun_l26_n865()
+ fun_l27_n189
+end
+
+def fun_l26_n866()
+ fun_l27_n181
+end
+
+def fun_l26_n867()
+ fun_l27_n338
+end
+
+def fun_l26_n868()
+ fun_l27_n965
+end
+
+def fun_l26_n869()
+ fun_l27_n219
+end
+
+def fun_l26_n870()
+ fun_l27_n604
+end
+
+def fun_l26_n871()
+ fun_l27_n211
+end
+
+def fun_l26_n872()
+ fun_l27_n225
+end
+
+def fun_l26_n873()
+ fun_l27_n776
+end
+
+def fun_l26_n874()
+ fun_l27_n723
+end
+
+def fun_l26_n875()
+ fun_l27_n653
+end
+
+def fun_l26_n876()
+ fun_l27_n157
+end
+
+def fun_l26_n877()
+ fun_l27_n321
+end
+
+def fun_l26_n878()
+ fun_l27_n684
+end
+
+def fun_l26_n879()
+ fun_l27_n270
+end
+
+def fun_l26_n880()
+ fun_l27_n575
+end
+
+def fun_l26_n881()
+ fun_l27_n201
+end
+
+def fun_l26_n882()
+ fun_l27_n772
+end
+
+def fun_l26_n883()
+ fun_l27_n610
+end
+
+def fun_l26_n884()
+ fun_l27_n117
+end
+
+def fun_l26_n885()
+ fun_l27_n706
+end
+
+def fun_l26_n886()
+ fun_l27_n245
+end
+
+def fun_l26_n887()
+ fun_l27_n173
+end
+
+def fun_l26_n888()
+ fun_l27_n679
+end
+
+def fun_l26_n889()
+ fun_l27_n725
+end
+
+def fun_l26_n890()
+ fun_l27_n481
+end
+
+def fun_l26_n891()
+ fun_l27_n632
+end
+
+def fun_l26_n892()
+ fun_l27_n20
+end
+
+def fun_l26_n893()
+ fun_l27_n649
+end
+
+def fun_l26_n894()
+ fun_l27_n560
+end
+
+def fun_l26_n895()
+ fun_l27_n861
+end
+
+def fun_l26_n896()
+ fun_l27_n565
+end
+
+def fun_l26_n897()
+ fun_l27_n864
+end
+
+def fun_l26_n898()
+ fun_l27_n590
+end
+
+def fun_l26_n899()
+ fun_l27_n413
+end
+
+def fun_l26_n900()
+ fun_l27_n833
+end
+
+def fun_l26_n901()
+ fun_l27_n948
+end
+
+def fun_l26_n902()
+ fun_l27_n946
+end
+
+def fun_l26_n903()
+ fun_l27_n211
+end
+
+def fun_l26_n904()
+ fun_l27_n367
+end
+
+def fun_l26_n905()
+ fun_l27_n893
+end
+
+def fun_l26_n906()
+ fun_l27_n710
+end
+
+def fun_l26_n907()
+ fun_l27_n655
+end
+
+def fun_l26_n908()
+ fun_l27_n830
+end
+
+def fun_l26_n909()
+ fun_l27_n649
+end
+
+def fun_l26_n910()
+ fun_l27_n195
+end
+
+def fun_l26_n911()
+ fun_l27_n474
+end
+
+def fun_l26_n912()
+ fun_l27_n362
+end
+
+def fun_l26_n913()
+ fun_l27_n199
+end
+
+def fun_l26_n914()
+ fun_l27_n426
+end
+
+def fun_l26_n915()
+ fun_l27_n123
+end
+
+def fun_l26_n916()
+ fun_l27_n734
+end
+
+def fun_l26_n917()
+ fun_l27_n646
+end
+
+def fun_l26_n918()
+ fun_l27_n603
+end
+
+def fun_l26_n919()
+ fun_l27_n907
+end
+
+def fun_l26_n920()
+ fun_l27_n500
+end
+
+def fun_l26_n921()
+ fun_l27_n30
+end
+
+def fun_l26_n922()
+ fun_l27_n393
+end
+
+def fun_l26_n923()
+ fun_l27_n981
+end
+
+def fun_l26_n924()
+ fun_l27_n318
+end
+
+def fun_l26_n925()
+ fun_l27_n979
+end
+
+def fun_l26_n926()
+ fun_l27_n439
+end
+
+def fun_l26_n927()
+ fun_l27_n398
+end
+
+def fun_l26_n928()
+ fun_l27_n301
+end
+
+def fun_l26_n929()
+ fun_l27_n778
+end
+
+def fun_l26_n930()
+ fun_l27_n318
+end
+
+def fun_l26_n931()
+ fun_l27_n835
+end
+
+def fun_l26_n932()
+ fun_l27_n90
+end
+
+def fun_l26_n933()
+ fun_l27_n321
+end
+
+def fun_l26_n934()
+ fun_l27_n600
+end
+
+def fun_l26_n935()
+ fun_l27_n731
+end
+
+def fun_l26_n936()
+ fun_l27_n318
+end
+
+def fun_l26_n937()
+ fun_l27_n229
+end
+
+def fun_l26_n938()
+ fun_l27_n997
+end
+
+def fun_l26_n939()
+ fun_l27_n105
+end
+
+def fun_l26_n940()
+ fun_l27_n122
+end
+
+def fun_l26_n941()
+ fun_l27_n680
+end
+
+def fun_l26_n942()
+ fun_l27_n814
+end
+
+def fun_l26_n943()
+ fun_l27_n350
+end
+
+def fun_l26_n944()
+ fun_l27_n363
+end
+
+def fun_l26_n945()
+ fun_l27_n82
+end
+
+def fun_l26_n946()
+ fun_l27_n82
+end
+
+def fun_l26_n947()
+ fun_l27_n638
+end
+
+def fun_l26_n948()
+ fun_l27_n677
+end
+
+def fun_l26_n949()
+ fun_l27_n931
+end
+
+def fun_l26_n950()
+ fun_l27_n151
+end
+
+def fun_l26_n951()
+ fun_l27_n862
+end
+
+def fun_l26_n952()
+ fun_l27_n984
+end
+
+def fun_l26_n953()
+ fun_l27_n471
+end
+
+def fun_l26_n954()
+ fun_l27_n859
+end
+
+def fun_l26_n955()
+ fun_l27_n127
+end
+
+def fun_l26_n956()
+ fun_l27_n963
+end
+
+def fun_l26_n957()
+ fun_l27_n859
+end
+
+def fun_l26_n958()
+ fun_l27_n900
+end
+
+def fun_l26_n959()
+ fun_l27_n957
+end
+
+def fun_l26_n960()
+ fun_l27_n443
+end
+
+def fun_l26_n961()
+ fun_l27_n826
+end
+
+def fun_l26_n962()
+ fun_l27_n303
+end
+
+def fun_l26_n963()
+ fun_l27_n766
+end
+
+def fun_l26_n964()
+ fun_l27_n420
+end
+
+def fun_l26_n965()
+ fun_l27_n873
+end
+
+def fun_l26_n966()
+ fun_l27_n285
+end
+
+def fun_l26_n967()
+ fun_l27_n490
+end
+
+def fun_l26_n968()
+ fun_l27_n46
+end
+
+def fun_l26_n969()
+ fun_l27_n451
+end
+
+def fun_l26_n970()
+ fun_l27_n157
+end
+
+def fun_l26_n971()
+ fun_l27_n981
+end
+
+def fun_l26_n972()
+ fun_l27_n969
+end
+
+def fun_l26_n973()
+ fun_l27_n644
+end
+
+def fun_l26_n974()
+ fun_l27_n753
+end
+
+def fun_l26_n975()
+ fun_l27_n306
+end
+
+def fun_l26_n976()
+ fun_l27_n617
+end
+
+def fun_l26_n977()
+ fun_l27_n258
+end
+
+def fun_l26_n978()
+ fun_l27_n511
+end
+
+def fun_l26_n979()
+ fun_l27_n267
+end
+
+def fun_l26_n980()
+ fun_l27_n42
+end
+
+def fun_l26_n981()
+ fun_l27_n153
+end
+
+def fun_l26_n982()
+ fun_l27_n77
+end
+
+def fun_l26_n983()
+ fun_l27_n658
+end
+
+def fun_l26_n984()
+ fun_l27_n605
+end
+
+def fun_l26_n985()
+ fun_l27_n40
+end
+
+def fun_l26_n986()
+ fun_l27_n375
+end
+
+def fun_l26_n987()
+ fun_l27_n273
+end
+
+def fun_l26_n988()
+ fun_l27_n290
+end
+
+def fun_l26_n989()
+ fun_l27_n507
+end
+
+def fun_l26_n990()
+ fun_l27_n537
+end
+
+def fun_l26_n991()
+ fun_l27_n373
+end
+
+def fun_l26_n992()
+ fun_l27_n39
+end
+
+def fun_l26_n993()
+ fun_l27_n356
+end
+
+def fun_l26_n994()
+ fun_l27_n875
+end
+
+def fun_l26_n995()
+ fun_l27_n112
+end
+
+def fun_l26_n996()
+ fun_l27_n209
+end
+
+def fun_l26_n997()
+ fun_l27_n690
+end
+
+def fun_l26_n998()
+ fun_l27_n19
+end
+
+def fun_l26_n999()
+ fun_l27_n962
+end
+
+def fun_l27_n0()
+ fun_l28_n602
+end
+
+def fun_l27_n1()
+ fun_l28_n911
+end
+
+def fun_l27_n2()
+ fun_l28_n797
+end
+
+def fun_l27_n3()
+ fun_l28_n261
+end
+
+def fun_l27_n4()
+ fun_l28_n172
+end
+
+def fun_l27_n5()
+ fun_l28_n430
+end
+
+def fun_l27_n6()
+ fun_l28_n397
+end
+
+def fun_l27_n7()
+ fun_l28_n388
+end
+
+def fun_l27_n8()
+ fun_l28_n218
+end
+
+def fun_l27_n9()
+ fun_l28_n71
+end
+
+def fun_l27_n10()
+ fun_l28_n424
+end
+
+def fun_l27_n11()
+ fun_l28_n454
+end
+
+def fun_l27_n12()
+ fun_l28_n388
+end
+
+def fun_l27_n13()
+ fun_l28_n909
+end
+
+def fun_l27_n14()
+ fun_l28_n655
+end
+
+def fun_l27_n15()
+ fun_l28_n355
+end
+
+def fun_l27_n16()
+ fun_l28_n319
+end
+
+def fun_l27_n17()
+ fun_l28_n137
+end
+
+def fun_l27_n18()
+ fun_l28_n929
+end
+
+def fun_l27_n19()
+ fun_l28_n887
+end
+
+def fun_l27_n20()
+ fun_l28_n571
+end
+
+def fun_l27_n21()
+ fun_l28_n480
+end
+
+def fun_l27_n22()
+ fun_l28_n431
+end
+
+def fun_l27_n23()
+ fun_l28_n918
+end
+
+def fun_l27_n24()
+ fun_l28_n673
+end
+
+def fun_l27_n25()
+ fun_l28_n550
+end
+
+def fun_l27_n26()
+ fun_l28_n256
+end
+
+def fun_l27_n27()
+ fun_l28_n624
+end
+
+def fun_l27_n28()
+ fun_l28_n245
+end
+
+def fun_l27_n29()
+ fun_l28_n303
+end
+
+def fun_l27_n30()
+ fun_l28_n260
+end
+
+def fun_l27_n31()
+ fun_l28_n174
+end
+
+def fun_l27_n32()
+ fun_l28_n147
+end
+
+def fun_l27_n33()
+ fun_l28_n590
+end
+
+def fun_l27_n34()
+ fun_l28_n691
+end
+
+def fun_l27_n35()
+ fun_l28_n739
+end
+
+def fun_l27_n36()
+ fun_l28_n530
+end
+
+def fun_l27_n37()
+ fun_l28_n20
+end
+
+def fun_l27_n38()
+ fun_l28_n147
+end
+
+def fun_l27_n39()
+ fun_l28_n362
+end
+
+def fun_l27_n40()
+ fun_l28_n250
+end
+
+def fun_l27_n41()
+ fun_l28_n579
+end
+
+def fun_l27_n42()
+ fun_l28_n557
+end
+
+def fun_l27_n43()
+ fun_l28_n639
+end
+
+def fun_l27_n44()
+ fun_l28_n309
+end
+
+def fun_l27_n45()
+ fun_l28_n213
+end
+
+def fun_l27_n46()
+ fun_l28_n178
+end
+
+def fun_l27_n47()
+ fun_l28_n974
+end
+
+def fun_l27_n48()
+ fun_l28_n500
+end
+
+def fun_l27_n49()
+ fun_l28_n814
+end
+
+def fun_l27_n50()
+ fun_l28_n930
+end
+
+def fun_l27_n51()
+ fun_l28_n329
+end
+
+def fun_l27_n52()
+ fun_l28_n385
+end
+
+def fun_l27_n53()
+ fun_l28_n214
+end
+
+def fun_l27_n54()
+ fun_l28_n934
+end
+
+def fun_l27_n55()
+ fun_l28_n645
+end
+
+def fun_l27_n56()
+ fun_l28_n311
+end
+
+def fun_l27_n57()
+ fun_l28_n15
+end
+
+def fun_l27_n58()
+ fun_l28_n499
+end
+
+def fun_l27_n59()
+ fun_l28_n919
+end
+
+def fun_l27_n60()
+ fun_l28_n659
+end
+
+def fun_l27_n61()
+ fun_l28_n921
+end
+
+def fun_l27_n62()
+ fun_l28_n306
+end
+
+def fun_l27_n63()
+ fun_l28_n128
+end
+
+def fun_l27_n64()
+ fun_l28_n871
+end
+
+def fun_l27_n65()
+ fun_l28_n434
+end
+
+def fun_l27_n66()
+ fun_l28_n775
+end
+
+def fun_l27_n67()
+ fun_l28_n311
+end
+
+def fun_l27_n68()
+ fun_l28_n959
+end
+
+def fun_l27_n69()
+ fun_l28_n648
+end
+
+def fun_l27_n70()
+ fun_l28_n893
+end
+
+def fun_l27_n71()
+ fun_l28_n669
+end
+
+def fun_l27_n72()
+ fun_l28_n121
+end
+
+def fun_l27_n73()
+ fun_l28_n102
+end
+
+def fun_l27_n74()
+ fun_l28_n887
+end
+
+def fun_l27_n75()
+ fun_l28_n326
+end
+
+def fun_l27_n76()
+ fun_l28_n48
+end
+
+def fun_l27_n77()
+ fun_l28_n636
+end
+
+def fun_l27_n78()
+ fun_l28_n804
+end
+
+def fun_l27_n79()
+ fun_l28_n838
+end
+
+def fun_l27_n80()
+ fun_l28_n859
+end
+
+def fun_l27_n81()
+ fun_l28_n683
+end
+
+def fun_l27_n82()
+ fun_l28_n752
+end
+
+def fun_l27_n83()
+ fun_l28_n244
+end
+
+def fun_l27_n84()
+ fun_l28_n727
+end
+
+def fun_l27_n85()
+ fun_l28_n818
+end
+
+def fun_l27_n86()
+ fun_l28_n451
+end
+
+def fun_l27_n87()
+ fun_l28_n9
+end
+
+def fun_l27_n88()
+ fun_l28_n738
+end
+
+def fun_l27_n89()
+ fun_l28_n589
+end
+
+def fun_l27_n90()
+ fun_l28_n140
+end
+
+def fun_l27_n91()
+ fun_l28_n615
+end
+
+def fun_l27_n92()
+ fun_l28_n973
+end
+
+def fun_l27_n93()
+ fun_l28_n668
+end
+
+def fun_l27_n94()
+ fun_l28_n299
+end
+
+def fun_l27_n95()
+ fun_l28_n358
+end
+
+def fun_l27_n96()
+ fun_l28_n319
+end
+
+def fun_l27_n97()
+ fun_l28_n165
+end
+
+def fun_l27_n98()
+ fun_l28_n67
+end
+
+def fun_l27_n99()
+ fun_l28_n494
+end
+
+def fun_l27_n100()
+ fun_l28_n107
+end
+
+def fun_l27_n101()
+ fun_l28_n985
+end
+
+def fun_l27_n102()
+ fun_l28_n239
+end
+
+def fun_l27_n103()
+ fun_l28_n64
+end
+
+def fun_l27_n104()
+ fun_l28_n676
+end
+
+def fun_l27_n105()
+ fun_l28_n852
+end
+
+def fun_l27_n106()
+ fun_l28_n668
+end
+
+def fun_l27_n107()
+ fun_l28_n523
+end
+
+def fun_l27_n108()
+ fun_l28_n15
+end
+
+def fun_l27_n109()
+ fun_l28_n619
+end
+
+def fun_l27_n110()
+ fun_l28_n440
+end
+
+def fun_l27_n111()
+ fun_l28_n792
+end
+
+def fun_l27_n112()
+ fun_l28_n771
+end
+
+def fun_l27_n113()
+ fun_l28_n263
+end
+
+def fun_l27_n114()
+ fun_l28_n180
+end
+
+def fun_l27_n115()
+ fun_l28_n615
+end
+
+def fun_l27_n116()
+ fun_l28_n319
+end
+
+def fun_l27_n117()
+ fun_l28_n970
+end
+
+def fun_l27_n118()
+ fun_l28_n946
+end
+
+def fun_l27_n119()
+ fun_l28_n121
+end
+
+def fun_l27_n120()
+ fun_l28_n655
+end
+
+def fun_l27_n121()
+ fun_l28_n68
+end
+
+def fun_l27_n122()
+ fun_l28_n406
+end
+
+def fun_l27_n123()
+ fun_l28_n535
+end
+
+def fun_l27_n124()
+ fun_l28_n951
+end
+
+def fun_l27_n125()
+ fun_l28_n366
+end
+
+def fun_l27_n126()
+ fun_l28_n192
+end
+
+def fun_l27_n127()
+ fun_l28_n106
+end
+
+def fun_l27_n128()
+ fun_l28_n21
+end
+
+def fun_l27_n129()
+ fun_l28_n339
+end
+
+def fun_l27_n130()
+ fun_l28_n824
+end
+
+def fun_l27_n131()
+ fun_l28_n921
+end
+
+def fun_l27_n132()
+ fun_l28_n678
+end
+
+def fun_l27_n133()
+ fun_l28_n925
+end
+
+def fun_l27_n134()
+ fun_l28_n55
+end
+
+def fun_l27_n135()
+ fun_l28_n726
+end
+
+def fun_l27_n136()
+ fun_l28_n110
+end
+
+def fun_l27_n137()
+ fun_l28_n559
+end
+
+def fun_l27_n138()
+ fun_l28_n879
+end
+
+def fun_l27_n139()
+ fun_l28_n332
+end
+
+def fun_l27_n140()
+ fun_l28_n167
+end
+
+def fun_l27_n141()
+ fun_l28_n123
+end
+
+def fun_l27_n142()
+ fun_l28_n707
+end
+
+def fun_l27_n143()
+ fun_l28_n423
+end
+
+def fun_l27_n144()
+ fun_l28_n659
+end
+
+def fun_l27_n145()
+ fun_l28_n322
+end
+
+def fun_l27_n146()
+ fun_l28_n227
+end
+
+def fun_l27_n147()
+ fun_l28_n679
+end
+
+def fun_l27_n148()
+ fun_l28_n376
+end
+
+def fun_l27_n149()
+ fun_l28_n327
+end
+
+def fun_l27_n150()
+ fun_l28_n328
+end
+
+def fun_l27_n151()
+ fun_l28_n408
+end
+
+def fun_l27_n152()
+ fun_l28_n141
+end
+
+def fun_l27_n153()
+ fun_l28_n728
+end
+
+def fun_l27_n154()
+ fun_l28_n207
+end
+
+def fun_l27_n155()
+ fun_l28_n836
+end
+
+def fun_l27_n156()
+ fun_l28_n71
+end
+
+def fun_l27_n157()
+ fun_l28_n390
+end
+
+def fun_l27_n158()
+ fun_l28_n277
+end
+
+def fun_l27_n159()
+ fun_l28_n960
+end
+
+def fun_l27_n160()
+ fun_l28_n705
+end
+
+def fun_l27_n161()
+ fun_l28_n445
+end
+
+def fun_l27_n162()
+ fun_l28_n570
+end
+
+def fun_l27_n163()
+ fun_l28_n878
+end
+
+def fun_l27_n164()
+ fun_l28_n714
+end
+
+def fun_l27_n165()
+ fun_l28_n933
+end
+
+def fun_l27_n166()
+ fun_l28_n480
+end
+
+def fun_l27_n167()
+ fun_l28_n308
+end
+
+def fun_l27_n168()
+ fun_l28_n604
+end
+
+def fun_l27_n169()
+ fun_l28_n892
+end
+
+def fun_l27_n170()
+ fun_l28_n901
+end
+
+def fun_l27_n171()
+ fun_l28_n524
+end
+
+def fun_l27_n172()
+ fun_l28_n533
+end
+
+def fun_l27_n173()
+ fun_l28_n761
+end
+
+def fun_l27_n174()
+ fun_l28_n97
+end
+
+def fun_l27_n175()
+ fun_l28_n944
+end
+
+def fun_l27_n176()
+ fun_l28_n627
+end
+
+def fun_l27_n177()
+ fun_l28_n720
+end
+
+def fun_l27_n178()
+ fun_l28_n366
+end
+
+def fun_l27_n179()
+ fun_l28_n353
+end
+
+def fun_l27_n180()
+ fun_l28_n441
+end
+
+def fun_l27_n181()
+ fun_l28_n682
+end
+
+def fun_l27_n182()
+ fun_l28_n581
+end
+
+def fun_l27_n183()
+ fun_l28_n974
+end
+
+def fun_l27_n184()
+ fun_l28_n522
+end
+
+def fun_l27_n185()
+ fun_l28_n702
+end
+
+def fun_l27_n186()
+ fun_l28_n941
+end
+
+def fun_l27_n187()
+ fun_l28_n665
+end
+
+def fun_l27_n188()
+ fun_l28_n148
+end
+
+def fun_l27_n189()
+ fun_l28_n91
+end
+
+def fun_l27_n190()
+ fun_l28_n679
+end
+
+def fun_l27_n191()
+ fun_l28_n929
+end
+
+def fun_l27_n192()
+ fun_l28_n828
+end
+
+def fun_l27_n193()
+ fun_l28_n872
+end
+
+def fun_l27_n194()
+ fun_l28_n152
+end
+
+def fun_l27_n195()
+ fun_l28_n593
+end
+
+def fun_l27_n196()
+ fun_l28_n438
+end
+
+def fun_l27_n197()
+ fun_l28_n390
+end
+
+def fun_l27_n198()
+ fun_l28_n354
+end
+
+def fun_l27_n199()
+ fun_l28_n547
+end
+
+def fun_l27_n200()
+ fun_l28_n249
+end
+
+def fun_l27_n201()
+ fun_l28_n562
+end
+
+def fun_l27_n202()
+ fun_l28_n571
+end
+
+def fun_l27_n203()
+ fun_l28_n763
+end
+
+def fun_l27_n204()
+ fun_l28_n961
+end
+
+def fun_l27_n205()
+ fun_l28_n368
+end
+
+def fun_l27_n206()
+ fun_l28_n219
+end
+
+def fun_l27_n207()
+ fun_l28_n414
+end
+
+def fun_l27_n208()
+ fun_l28_n130
+end
+
+def fun_l27_n209()
+ fun_l28_n911
+end
+
+def fun_l27_n210()
+ fun_l28_n94
+end
+
+def fun_l27_n211()
+ fun_l28_n966
+end
+
+def fun_l27_n212()
+ fun_l28_n271
+end
+
+def fun_l27_n213()
+ fun_l28_n372
+end
+
+def fun_l27_n214()
+ fun_l28_n845
+end
+
+def fun_l27_n215()
+ fun_l28_n924
+end
+
+def fun_l27_n216()
+ fun_l28_n220
+end
+
+def fun_l27_n217()
+ fun_l28_n653
+end
+
+def fun_l27_n218()
+ fun_l28_n960
+end
+
+def fun_l27_n219()
+ fun_l28_n343
+end
+
+def fun_l27_n220()
+ fun_l28_n255
+end
+
+def fun_l27_n221()
+ fun_l28_n206
+end
+
+def fun_l27_n222()
+ fun_l28_n190
+end
+
+def fun_l27_n223()
+ fun_l28_n753
+end
+
+def fun_l27_n224()
+ fun_l28_n530
+end
+
+def fun_l27_n225()
+ fun_l28_n198
+end
+
+def fun_l27_n226()
+ fun_l28_n604
+end
+
+def fun_l27_n227()
+ fun_l28_n685
+end
+
+def fun_l27_n228()
+ fun_l28_n268
+end
+
+def fun_l27_n229()
+ fun_l28_n344
+end
+
+def fun_l27_n230()
+ fun_l28_n850
+end
+
+def fun_l27_n231()
+ fun_l28_n612
+end
+
+def fun_l27_n232()
+ fun_l28_n598
+end
+
+def fun_l27_n233()
+ fun_l28_n766
+end
+
+def fun_l27_n234()
+ fun_l28_n994
+end
+
+def fun_l27_n235()
+ fun_l28_n566
+end
+
+def fun_l27_n236()
+ fun_l28_n306
+end
+
+def fun_l27_n237()
+ fun_l28_n592
+end
+
+def fun_l27_n238()
+ fun_l28_n814
+end
+
+def fun_l27_n239()
+ fun_l28_n319
+end
+
+def fun_l27_n240()
+ fun_l28_n619
+end
+
+def fun_l27_n241()
+ fun_l28_n631
+end
+
+def fun_l27_n242()
+ fun_l28_n240
+end
+
+def fun_l27_n243()
+ fun_l28_n714
+end
+
+def fun_l27_n244()
+ fun_l28_n651
+end
+
+def fun_l27_n245()
+ fun_l28_n760
+end
+
+def fun_l27_n246()
+ fun_l28_n925
+end
+
+def fun_l27_n247()
+ fun_l28_n537
+end
+
+def fun_l27_n248()
+ fun_l28_n541
+end
+
+def fun_l27_n249()
+ fun_l28_n963
+end
+
+def fun_l27_n250()
+ fun_l28_n630
+end
+
+def fun_l27_n251()
+ fun_l28_n124
+end
+
+def fun_l27_n252()
+ fun_l28_n894
+end
+
+def fun_l27_n253()
+ fun_l28_n307
+end
+
+def fun_l27_n254()
+ fun_l28_n485
+end
+
+def fun_l27_n255()
+ fun_l28_n272
+end
+
+def fun_l27_n256()
+ fun_l28_n994
+end
+
+def fun_l27_n257()
+ fun_l28_n48
+end
+
+def fun_l27_n258()
+ fun_l28_n374
+end
+
+def fun_l27_n259()
+ fun_l28_n508
+end
+
+def fun_l27_n260()
+ fun_l28_n936
+end
+
+def fun_l27_n261()
+ fun_l28_n43
+end
+
+def fun_l27_n262()
+ fun_l28_n297
+end
+
+def fun_l27_n263()
+ fun_l28_n205
+end
+
+def fun_l27_n264()
+ fun_l28_n234
+end
+
+def fun_l27_n265()
+ fun_l28_n560
+end
+
+def fun_l27_n266()
+ fun_l28_n124
+end
+
+def fun_l27_n267()
+ fun_l28_n912
+end
+
+def fun_l27_n268()
+ fun_l28_n545
+end
+
+def fun_l27_n269()
+ fun_l28_n266
+end
+
+def fun_l27_n270()
+ fun_l28_n917
+end
+
+def fun_l27_n271()
+ fun_l28_n971
+end
+
+def fun_l27_n272()
+ fun_l28_n305
+end
+
+def fun_l27_n273()
+ fun_l28_n158
+end
+
+def fun_l27_n274()
+ fun_l28_n241
+end
+
+def fun_l27_n275()
+ fun_l28_n667
+end
+
+def fun_l27_n276()
+ fun_l28_n857
+end
+
+def fun_l27_n277()
+ fun_l28_n207
+end
+
+def fun_l27_n278()
+ fun_l28_n258
+end
+
+def fun_l27_n279()
+ fun_l28_n410
+end
+
+def fun_l27_n280()
+ fun_l28_n868
+end
+
+def fun_l27_n281()
+ fun_l28_n976
+end
+
+def fun_l27_n282()
+ fun_l28_n519
+end
+
+def fun_l27_n283()
+ fun_l28_n165
+end
+
+def fun_l27_n284()
+ fun_l28_n790
+end
+
+def fun_l27_n285()
+ fun_l28_n825
+end
+
+def fun_l27_n286()
+ fun_l28_n844
+end
+
+def fun_l27_n287()
+ fun_l28_n450
+end
+
+def fun_l27_n288()
+ fun_l28_n913
+end
+
+def fun_l27_n289()
+ fun_l28_n418
+end
+
+def fun_l27_n290()
+ fun_l28_n63
+end
+
+def fun_l27_n291()
+ fun_l28_n306
+end
+
+def fun_l27_n292()
+ fun_l28_n233
+end
+
+def fun_l27_n293()
+ fun_l28_n274
+end
+
+def fun_l27_n294()
+ fun_l28_n292
+end
+
+def fun_l27_n295()
+ fun_l28_n504
+end
+
+def fun_l27_n296()
+ fun_l28_n769
+end
+
+def fun_l27_n297()
+ fun_l28_n404
+end
+
+def fun_l27_n298()
+ fun_l28_n782
+end
+
+def fun_l27_n299()
+ fun_l28_n788
+end
+
+def fun_l27_n300()
+ fun_l28_n727
+end
+
+def fun_l27_n301()
+ fun_l28_n187
+end
+
+def fun_l27_n302()
+ fun_l28_n568
+end
+
+def fun_l27_n303()
+ fun_l28_n195
+end
+
+def fun_l27_n304()
+ fun_l28_n696
+end
+
+def fun_l27_n305()
+ fun_l28_n293
+end
+
+def fun_l27_n306()
+ fun_l28_n722
+end
+
+def fun_l27_n307()
+ fun_l28_n911
+end
+
+def fun_l27_n308()
+ fun_l28_n827
+end
+
+def fun_l27_n309()
+ fun_l28_n767
+end
+
+def fun_l27_n310()
+ fun_l28_n423
+end
+
+def fun_l27_n311()
+ fun_l28_n60
+end
+
+def fun_l27_n312()
+ fun_l28_n466
+end
+
+def fun_l27_n313()
+ fun_l28_n270
+end
+
+def fun_l27_n314()
+ fun_l28_n993
+end
+
+def fun_l27_n315()
+ fun_l28_n231
+end
+
+def fun_l27_n316()
+ fun_l28_n514
+end
+
+def fun_l27_n317()
+ fun_l28_n57
+end
+
+def fun_l27_n318()
+ fun_l28_n646
+end
+
+def fun_l27_n319()
+ fun_l28_n17
+end
+
+def fun_l27_n320()
+ fun_l28_n964
+end
+
+def fun_l27_n321()
+ fun_l28_n1
+end
+
+def fun_l27_n322()
+ fun_l28_n956
+end
+
+def fun_l27_n323()
+ fun_l28_n273
+end
+
+def fun_l27_n324()
+ fun_l28_n370
+end
+
+def fun_l27_n325()
+ fun_l28_n81
+end
+
+def fun_l27_n326()
+ fun_l28_n765
+end
+
+def fun_l27_n327()
+ fun_l28_n506
+end
+
+def fun_l27_n328()
+ fun_l28_n327
+end
+
+def fun_l27_n329()
+ fun_l28_n362
+end
+
+def fun_l27_n330()
+ fun_l28_n852
+end
+
+def fun_l27_n331()
+ fun_l28_n876
+end
+
+def fun_l27_n332()
+ fun_l28_n531
+end
+
+def fun_l27_n333()
+ fun_l28_n426
+end
+
+def fun_l27_n334()
+ fun_l28_n295
+end
+
+def fun_l27_n335()
+ fun_l28_n929
+end
+
+def fun_l27_n336()
+ fun_l28_n693
+end
+
+def fun_l27_n337()
+ fun_l28_n724
+end
+
+def fun_l27_n338()
+ fun_l28_n784
+end
+
+def fun_l27_n339()
+ fun_l28_n752
+end
+
+def fun_l27_n340()
+ fun_l28_n809
+end
+
+def fun_l27_n341()
+ fun_l28_n269
+end
+
+def fun_l27_n342()
+ fun_l28_n33
+end
+
+def fun_l27_n343()
+ fun_l28_n778
+end
+
+def fun_l27_n344()
+ fun_l28_n974
+end
+
+def fun_l27_n345()
+ fun_l28_n843
+end
+
+def fun_l27_n346()
+ fun_l28_n86
+end
+
+def fun_l27_n347()
+ fun_l28_n594
+end
+
+def fun_l27_n348()
+ fun_l28_n111
+end
+
+def fun_l27_n349()
+ fun_l28_n317
+end
+
+def fun_l27_n350()
+ fun_l28_n238
+end
+
+def fun_l27_n351()
+ fun_l28_n447
+end
+
+def fun_l27_n352()
+ fun_l28_n954
+end
+
+def fun_l27_n353()
+ fun_l28_n846
+end
+
+def fun_l27_n354()
+ fun_l28_n124
+end
+
+def fun_l27_n355()
+ fun_l28_n445
+end
+
+def fun_l27_n356()
+ fun_l28_n957
+end
+
+def fun_l27_n357()
+ fun_l28_n365
+end
+
+def fun_l27_n358()
+ fun_l28_n136
+end
+
+def fun_l27_n359()
+ fun_l28_n372
+end
+
+def fun_l27_n360()
+ fun_l28_n487
+end
+
+def fun_l27_n361()
+ fun_l28_n493
+end
+
+def fun_l27_n362()
+ fun_l28_n905
+end
+
+def fun_l27_n363()
+ fun_l28_n146
+end
+
+def fun_l27_n364()
+ fun_l28_n523
+end
+
+def fun_l27_n365()
+ fun_l28_n876
+end
+
+def fun_l27_n366()
+ fun_l28_n67
+end
+
+def fun_l27_n367()
+ fun_l28_n746
+end
+
+def fun_l27_n368()
+ fun_l28_n264
+end
+
+def fun_l27_n369()
+ fun_l28_n470
+end
+
+def fun_l27_n370()
+ fun_l28_n240
+end
+
+def fun_l27_n371()
+ fun_l28_n928
+end
+
+def fun_l27_n372()
+ fun_l28_n574
+end
+
+def fun_l27_n373()
+ fun_l28_n756
+end
+
+def fun_l27_n374()
+ fun_l28_n244
+end
+
+def fun_l27_n375()
+ fun_l28_n46
+end
+
+def fun_l27_n376()
+ fun_l28_n940
+end
+
+def fun_l27_n377()
+ fun_l28_n430
+end
+
+def fun_l27_n378()
+ fun_l28_n879
+end
+
+def fun_l27_n379()
+ fun_l28_n560
+end
+
+def fun_l27_n380()
+ fun_l28_n231
+end
+
+def fun_l27_n381()
+ fun_l28_n283
+end
+
+def fun_l27_n382()
+ fun_l28_n438
+end
+
+def fun_l27_n383()
+ fun_l28_n207
+end
+
+def fun_l27_n384()
+ fun_l28_n185
+end
+
+def fun_l27_n385()
+ fun_l28_n40
+end
+
+def fun_l27_n386()
+ fun_l28_n572
+end
+
+def fun_l27_n387()
+ fun_l28_n975
+end
+
+def fun_l27_n388()
+ fun_l28_n117
+end
+
+def fun_l27_n389()
+ fun_l28_n329
+end
+
+def fun_l27_n390()
+ fun_l28_n311
+end
+
+def fun_l27_n391()
+ fun_l28_n653
+end
+
+def fun_l27_n392()
+ fun_l28_n522
+end
+
+def fun_l27_n393()
+ fun_l28_n452
+end
+
+def fun_l27_n394()
+ fun_l28_n137
+end
+
+def fun_l27_n395()
+ fun_l28_n606
+end
+
+def fun_l27_n396()
+ fun_l28_n901
+end
+
+def fun_l27_n397()
+ fun_l28_n434
+end
+
+def fun_l27_n398()
+ fun_l28_n863
+end
+
+def fun_l27_n399()
+ fun_l28_n117
+end
+
+def fun_l27_n400()
+ fun_l28_n473
+end
+
+def fun_l27_n401()
+ fun_l28_n638
+end
+
+def fun_l27_n402()
+ fun_l28_n71
+end
+
+def fun_l27_n403()
+ fun_l28_n423
+end
+
+def fun_l27_n404()
+ fun_l28_n362
+end
+
+def fun_l27_n405()
+ fun_l28_n537
+end
+
+def fun_l27_n406()
+ fun_l28_n975
+end
+
+def fun_l27_n407()
+ fun_l28_n424
+end
+
+def fun_l27_n408()
+ fun_l28_n613
+end
+
+def fun_l27_n409()
+ fun_l28_n606
+end
+
+def fun_l27_n410()
+ fun_l28_n782
+end
+
+def fun_l27_n411()
+ fun_l28_n445
+end
+
+def fun_l27_n412()
+ fun_l28_n362
+end
+
+def fun_l27_n413()
+ fun_l28_n837
+end
+
+def fun_l27_n414()
+ fun_l28_n335
+end
+
+def fun_l27_n415()
+ fun_l28_n258
+end
+
+def fun_l27_n416()
+ fun_l28_n832
+end
+
+def fun_l27_n417()
+ fun_l28_n102
+end
+
+def fun_l27_n418()
+ fun_l28_n202
+end
+
+def fun_l27_n419()
+ fun_l28_n624
+end
+
+def fun_l27_n420()
+ fun_l28_n118
+end
+
+def fun_l27_n421()
+ fun_l28_n247
+end
+
+def fun_l27_n422()
+ fun_l28_n768
+end
+
+def fun_l27_n423()
+ fun_l28_n879
+end
+
+def fun_l27_n424()
+ fun_l28_n650
+end
+
+def fun_l27_n425()
+ fun_l28_n545
+end
+
+def fun_l27_n426()
+ fun_l28_n854
+end
+
+def fun_l27_n427()
+ fun_l28_n722
+end
+
+def fun_l27_n428()
+ fun_l28_n637
+end
+
+def fun_l27_n429()
+ fun_l28_n295
+end
+
+def fun_l27_n430()
+ fun_l28_n504
+end
+
+def fun_l27_n431()
+ fun_l28_n939
+end
+
+def fun_l27_n432()
+ fun_l28_n52
+end
+
+def fun_l27_n433()
+ fun_l28_n613
+end
+
+def fun_l27_n434()
+ fun_l28_n165
+end
+
+def fun_l27_n435()
+ fun_l28_n948
+end
+
+def fun_l27_n436()
+ fun_l28_n995
+end
+
+def fun_l27_n437()
+ fun_l28_n572
+end
+
+def fun_l27_n438()
+ fun_l28_n919
+end
+
+def fun_l27_n439()
+ fun_l28_n843
+end
+
+def fun_l27_n440()
+ fun_l28_n826
+end
+
+def fun_l27_n441()
+ fun_l28_n328
+end
+
+def fun_l27_n442()
+ fun_l28_n330
+end
+
+def fun_l27_n443()
+ fun_l28_n819
+end
+
+def fun_l27_n444()
+ fun_l28_n949
+end
+
+def fun_l27_n445()
+ fun_l28_n505
+end
+
+def fun_l27_n446()
+ fun_l28_n306
+end
+
+def fun_l27_n447()
+ fun_l28_n731
+end
+
+def fun_l27_n448()
+ fun_l28_n232
+end
+
+def fun_l27_n449()
+ fun_l28_n251
+end
+
+def fun_l27_n450()
+ fun_l28_n807
+end
+
+def fun_l27_n451()
+ fun_l28_n808
+end
+
+def fun_l27_n452()
+ fun_l28_n672
+end
+
+def fun_l27_n453()
+ fun_l28_n0
+end
+
+def fun_l27_n454()
+ fun_l28_n659
+end
+
+def fun_l27_n455()
+ fun_l28_n955
+end
+
+def fun_l27_n456()
+ fun_l28_n314
+end
+
+def fun_l27_n457()
+ fun_l28_n539
+end
+
+def fun_l27_n458()
+ fun_l28_n394
+end
+
+def fun_l27_n459()
+ fun_l28_n48
+end
+
+def fun_l27_n460()
+ fun_l28_n434
+end
+
+def fun_l27_n461()
+ fun_l28_n54
+end
+
+def fun_l27_n462()
+ fun_l28_n108
+end
+
+def fun_l27_n463()
+ fun_l28_n80
+end
+
+def fun_l27_n464()
+ fun_l28_n255
+end
+
+def fun_l27_n465()
+ fun_l28_n273
+end
+
+def fun_l27_n466()
+ fun_l28_n227
+end
+
+def fun_l27_n467()
+ fun_l28_n764
+end
+
+def fun_l27_n468()
+ fun_l28_n210
+end
+
+def fun_l27_n469()
+ fun_l28_n68
+end
+
+def fun_l27_n470()
+ fun_l28_n178
+end
+
+def fun_l27_n471()
+ fun_l28_n500
+end
+
+def fun_l27_n472()
+ fun_l28_n374
+end
+
+def fun_l27_n473()
+ fun_l28_n98
+end
+
+def fun_l27_n474()
+ fun_l28_n232
+end
+
+def fun_l27_n475()
+ fun_l28_n35
+end
+
+def fun_l27_n476()
+ fun_l28_n483
+end
+
+def fun_l27_n477()
+ fun_l28_n282
+end
+
+def fun_l27_n478()
+ fun_l28_n512
+end
+
+def fun_l27_n479()
+ fun_l28_n755
+end
+
+def fun_l27_n480()
+ fun_l28_n299
+end
+
+def fun_l27_n481()
+ fun_l28_n899
+end
+
+def fun_l27_n482()
+ fun_l28_n872
+end
+
+def fun_l27_n483()
+ fun_l28_n558
+end
+
+def fun_l27_n484()
+ fun_l28_n700
+end
+
+def fun_l27_n485()
+ fun_l28_n949
+end
+
+def fun_l27_n486()
+ fun_l28_n272
+end
+
+def fun_l27_n487()
+ fun_l28_n808
+end
+
+def fun_l27_n488()
+ fun_l28_n36
+end
+
+def fun_l27_n489()
+ fun_l28_n698
+end
+
+def fun_l27_n490()
+ fun_l28_n386
+end
+
+def fun_l27_n491()
+ fun_l28_n745
+end
+
+def fun_l27_n492()
+ fun_l28_n26
+end
+
+def fun_l27_n493()
+ fun_l28_n148
+end
+
+def fun_l27_n494()
+ fun_l28_n300
+end
+
+def fun_l27_n495()
+ fun_l28_n292
+end
+
+def fun_l27_n496()
+ fun_l28_n892
+end
+
+def fun_l27_n497()
+ fun_l28_n824
+end
+
+def fun_l27_n498()
+ fun_l28_n89
+end
+
+def fun_l27_n499()
+ fun_l28_n248
+end
+
+def fun_l27_n500()
+ fun_l28_n19
+end
+
+def fun_l27_n501()
+ fun_l28_n600
+end
+
+def fun_l27_n502()
+ fun_l28_n210
+end
+
+def fun_l27_n503()
+ fun_l28_n27
+end
+
+def fun_l27_n504()
+ fun_l28_n866
+end
+
+def fun_l27_n505()
+ fun_l28_n231
+end
+
+def fun_l27_n506()
+ fun_l28_n622
+end
+
+def fun_l27_n507()
+ fun_l28_n381
+end
+
+def fun_l27_n508()
+ fun_l28_n997
+end
+
+def fun_l27_n509()
+ fun_l28_n799
+end
+
+def fun_l27_n510()
+ fun_l28_n18
+end
+
+def fun_l27_n511()
+ fun_l28_n60
+end
+
+def fun_l27_n512()
+ fun_l28_n287
+end
+
+def fun_l27_n513()
+ fun_l28_n478
+end
+
+def fun_l27_n514()
+ fun_l28_n562
+end
+
+def fun_l27_n515()
+ fun_l28_n779
+end
+
+def fun_l27_n516()
+ fun_l28_n585
+end
+
+def fun_l27_n517()
+ fun_l28_n464
+end
+
+def fun_l27_n518()
+ fun_l28_n304
+end
+
+def fun_l27_n519()
+ fun_l28_n189
+end
+
+def fun_l27_n520()
+ fun_l28_n959
+end
+
+def fun_l27_n521()
+ fun_l28_n5
+end
+
+def fun_l27_n522()
+ fun_l28_n866
+end
+
+def fun_l27_n523()
+ fun_l28_n14
+end
+
+def fun_l27_n524()
+ fun_l28_n644
+end
+
+def fun_l27_n525()
+ fun_l28_n725
+end
+
+def fun_l27_n526()
+ fun_l28_n18
+end
+
+def fun_l27_n527()
+ fun_l28_n9
+end
+
+def fun_l27_n528()
+ fun_l28_n0
+end
+
+def fun_l27_n529()
+ fun_l28_n154
+end
+
+def fun_l27_n530()
+ fun_l28_n313
+end
+
+def fun_l27_n531()
+ fun_l28_n478
+end
+
+def fun_l27_n532()
+ fun_l28_n139
+end
+
+def fun_l27_n533()
+ fun_l28_n913
+end
+
+def fun_l27_n534()
+ fun_l28_n113
+end
+
+def fun_l27_n535()
+ fun_l28_n685
+end
+
+def fun_l27_n536()
+ fun_l28_n275
+end
+
+def fun_l27_n537()
+ fun_l28_n556
+end
+
+def fun_l27_n538()
+ fun_l28_n276
+end
+
+def fun_l27_n539()
+ fun_l28_n283
+end
+
+def fun_l27_n540()
+ fun_l28_n694
+end
+
+def fun_l27_n541()
+ fun_l28_n396
+end
+
+def fun_l27_n542()
+ fun_l28_n181
+end
+
+def fun_l27_n543()
+ fun_l28_n231
+end
+
+def fun_l27_n544()
+ fun_l28_n228
+end
+
+def fun_l27_n545()
+ fun_l28_n958
+end
+
+def fun_l27_n546()
+ fun_l28_n91
+end
+
+def fun_l27_n547()
+ fun_l28_n878
+end
+
+def fun_l27_n548()
+ fun_l28_n180
+end
+
+def fun_l27_n549()
+ fun_l28_n13
+end
+
+def fun_l27_n550()
+ fun_l28_n161
+end
+
+def fun_l27_n551()
+ fun_l28_n603
+end
+
+def fun_l27_n552()
+ fun_l28_n101
+end
+
+def fun_l27_n553()
+ fun_l28_n825
+end
+
+def fun_l27_n554()
+ fun_l28_n370
+end
+
+def fun_l27_n555()
+ fun_l28_n983
+end
+
+def fun_l27_n556()
+ fun_l28_n888
+end
+
+def fun_l27_n557()
+ fun_l28_n610
+end
+
+def fun_l27_n558()
+ fun_l28_n630
+end
+
+def fun_l27_n559()
+ fun_l28_n345
+end
+
+def fun_l27_n560()
+ fun_l28_n376
+end
+
+def fun_l27_n561()
+ fun_l28_n409
+end
+
+def fun_l27_n562()
+ fun_l28_n717
+end
+
+def fun_l27_n563()
+ fun_l28_n66
+end
+
+def fun_l27_n564()
+ fun_l28_n228
+end
+
+def fun_l27_n565()
+ fun_l28_n485
+end
+
+def fun_l27_n566()
+ fun_l28_n252
+end
+
+def fun_l27_n567()
+ fun_l28_n444
+end
+
+def fun_l27_n568()
+ fun_l28_n253
+end
+
+def fun_l27_n569()
+ fun_l28_n839
+end
+
+def fun_l27_n570()
+ fun_l28_n216
+end
+
+def fun_l27_n571()
+ fun_l28_n797
+end
+
+def fun_l27_n572()
+ fun_l28_n127
+end
+
+def fun_l27_n573()
+ fun_l28_n335
+end
+
+def fun_l27_n574()
+ fun_l28_n141
+end
+
+def fun_l27_n575()
+ fun_l28_n536
+end
+
+def fun_l27_n576()
+ fun_l28_n463
+end
+
+def fun_l27_n577()
+ fun_l28_n925
+end
+
+def fun_l27_n578()
+ fun_l28_n707
+end
+
+def fun_l27_n579()
+ fun_l28_n530
+end
+
+def fun_l27_n580()
+ fun_l28_n678
+end
+
+def fun_l27_n581()
+ fun_l28_n234
+end
+
+def fun_l27_n582()
+ fun_l28_n803
+end
+
+def fun_l27_n583()
+ fun_l28_n530
+end
+
+def fun_l27_n584()
+ fun_l28_n131
+end
+
+def fun_l27_n585()
+ fun_l28_n512
+end
+
+def fun_l27_n586()
+ fun_l28_n550
+end
+
+def fun_l27_n587()
+ fun_l28_n528
+end
+
+def fun_l27_n588()
+ fun_l28_n214
+end
+
+def fun_l27_n589()
+ fun_l28_n801
+end
+
+def fun_l27_n590()
+ fun_l28_n69
+end
+
+def fun_l27_n591()
+ fun_l28_n519
+end
+
+def fun_l27_n592()
+ fun_l28_n909
+end
+
+def fun_l27_n593()
+ fun_l28_n981
+end
+
+def fun_l27_n594()
+ fun_l28_n108
+end
+
+def fun_l27_n595()
+ fun_l28_n762
+end
+
+def fun_l27_n596()
+ fun_l28_n838
+end
+
+def fun_l27_n597()
+ fun_l28_n311
+end
+
+def fun_l27_n598()
+ fun_l28_n428
+end
+
+def fun_l27_n599()
+ fun_l28_n111
+end
+
+def fun_l27_n600()
+ fun_l28_n600
+end
+
+def fun_l27_n601()
+ fun_l28_n996
+end
+
+def fun_l27_n602()
+ fun_l28_n439
+end
+
+def fun_l27_n603()
+ fun_l28_n379
+end
+
+def fun_l27_n604()
+ fun_l28_n959
+end
+
+def fun_l27_n605()
+ fun_l28_n287
+end
+
+def fun_l27_n606()
+ fun_l28_n893
+end
+
+def fun_l27_n607()
+ fun_l28_n384
+end
+
+def fun_l27_n608()
+ fun_l28_n815
+end
+
+def fun_l27_n609()
+ fun_l28_n733
+end
+
+def fun_l27_n610()
+ fun_l28_n875
+end
+
+def fun_l27_n611()
+ fun_l28_n343
+end
+
+def fun_l27_n612()
+ fun_l28_n605
+end
+
+def fun_l27_n613()
+ fun_l28_n968
+end
+
+def fun_l27_n614()
+ fun_l28_n703
+end
+
+def fun_l27_n615()
+ fun_l28_n50
+end
+
+def fun_l27_n616()
+ fun_l28_n807
+end
+
+def fun_l27_n617()
+ fun_l28_n261
+end
+
+def fun_l27_n618()
+ fun_l28_n887
+end
+
+def fun_l27_n619()
+ fun_l28_n165
+end
+
+def fun_l27_n620()
+ fun_l28_n62
+end
+
+def fun_l27_n621()
+ fun_l28_n437
+end
+
+def fun_l27_n622()
+ fun_l28_n267
+end
+
+def fun_l27_n623()
+ fun_l28_n739
+end
+
+def fun_l27_n624()
+ fun_l28_n624
+end
+
+def fun_l27_n625()
+ fun_l28_n845
+end
+
+def fun_l27_n626()
+ fun_l28_n844
+end
+
+def fun_l27_n627()
+ fun_l28_n541
+end
+
+def fun_l27_n628()
+ fun_l28_n175
+end
+
+def fun_l27_n629()
+ fun_l28_n295
+end
+
+def fun_l27_n630()
+ fun_l28_n600
+end
+
+def fun_l27_n631()
+ fun_l28_n250
+end
+
+def fun_l27_n632()
+ fun_l28_n167
+end
+
+def fun_l27_n633()
+ fun_l28_n7
+end
+
+def fun_l27_n634()
+ fun_l28_n75
+end
+
+def fun_l27_n635()
+ fun_l28_n208
+end
+
+def fun_l27_n636()
+ fun_l28_n53
+end
+
+def fun_l27_n637()
+ fun_l28_n132
+end
+
+def fun_l27_n638()
+ fun_l28_n859
+end
+
+def fun_l27_n639()
+ fun_l28_n925
+end
+
+def fun_l27_n640()
+ fun_l28_n34
+end
+
+def fun_l27_n641()
+ fun_l28_n226
+end
+
+def fun_l27_n642()
+ fun_l28_n916
+end
+
+def fun_l27_n643()
+ fun_l28_n893
+end
+
+def fun_l27_n644()
+ fun_l28_n100
+end
+
+def fun_l27_n645()
+ fun_l28_n526
+end
+
+def fun_l27_n646()
+ fun_l28_n113
+end
+
+def fun_l27_n647()
+ fun_l28_n786
+end
+
+def fun_l27_n648()
+ fun_l28_n995
+end
+
+def fun_l27_n649()
+ fun_l28_n968
+end
+
+def fun_l27_n650()
+ fun_l28_n705
+end
+
+def fun_l27_n651()
+ fun_l28_n581
+end
+
+def fun_l27_n652()
+ fun_l28_n112
+end
+
+def fun_l27_n653()
+ fun_l28_n475
+end
+
+def fun_l27_n654()
+ fun_l28_n264
+end
+
+def fun_l27_n655()
+ fun_l28_n44
+end
+
+def fun_l27_n656()
+ fun_l28_n302
+end
+
+def fun_l27_n657()
+ fun_l28_n830
+end
+
+def fun_l27_n658()
+ fun_l28_n551
+end
+
+def fun_l27_n659()
+ fun_l28_n811
+end
+
+def fun_l27_n660()
+ fun_l28_n476
+end
+
+def fun_l27_n661()
+ fun_l28_n547
+end
+
+def fun_l27_n662()
+ fun_l28_n709
+end
+
+def fun_l27_n663()
+ fun_l28_n435
+end
+
+def fun_l27_n664()
+ fun_l28_n727
+end
+
+def fun_l27_n665()
+ fun_l28_n630
+end
+
+def fun_l27_n666()
+ fun_l28_n514
+end
+
+def fun_l27_n667()
+ fun_l28_n939
+end
+
+def fun_l27_n668()
+ fun_l28_n198
+end
+
+def fun_l27_n669()
+ fun_l28_n165
+end
+
+def fun_l27_n670()
+ fun_l28_n415
+end
+
+def fun_l27_n671()
+ fun_l28_n316
+end
+
+def fun_l27_n672()
+ fun_l28_n602
+end
+
+def fun_l27_n673()
+ fun_l28_n776
+end
+
+def fun_l27_n674()
+ fun_l28_n681
+end
+
+def fun_l27_n675()
+ fun_l28_n131
+end
+
+def fun_l27_n676()
+ fun_l28_n812
+end
+
+def fun_l27_n677()
+ fun_l28_n666
+end
+
+def fun_l27_n678()
+ fun_l28_n209
+end
+
+def fun_l27_n679()
+ fun_l28_n953
+end
+
+def fun_l27_n680()
+ fun_l28_n797
+end
+
+def fun_l27_n681()
+ fun_l28_n317
+end
+
+def fun_l27_n682()
+ fun_l28_n43
+end
+
+def fun_l27_n683()
+ fun_l28_n673
+end
+
+def fun_l27_n684()
+ fun_l28_n701
+end
+
+def fun_l27_n685()
+ fun_l28_n961
+end
+
+def fun_l27_n686()
+ fun_l28_n684
+end
+
+def fun_l27_n687()
+ fun_l28_n677
+end
+
+def fun_l27_n688()
+ fun_l28_n213
+end
+
+def fun_l27_n689()
+ fun_l28_n22
+end
+
+def fun_l27_n690()
+ fun_l28_n296
+end
+
+def fun_l27_n691()
+ fun_l28_n235
+end
+
+def fun_l27_n692()
+ fun_l28_n148
+end
+
+def fun_l27_n693()
+ fun_l28_n756
+end
+
+def fun_l27_n694()
+ fun_l28_n989
+end
+
+def fun_l27_n695()
+ fun_l28_n993
+end
+
+def fun_l27_n696()
+ fun_l28_n646
+end
+
+def fun_l27_n697()
+ fun_l28_n860
+end
+
+def fun_l27_n698()
+ fun_l28_n872
+end
+
+def fun_l27_n699()
+ fun_l28_n122
+end
+
+def fun_l27_n700()
+ fun_l28_n678
+end
+
+def fun_l27_n701()
+ fun_l28_n480
+end
+
+def fun_l27_n702()
+ fun_l28_n888
+end
+
+def fun_l27_n703()
+ fun_l28_n60
+end
+
+def fun_l27_n704()
+ fun_l28_n15
+end
+
+def fun_l27_n705()
+ fun_l28_n529
+end
+
+def fun_l27_n706()
+ fun_l28_n137
+end
+
+def fun_l27_n707()
+ fun_l28_n643
+end
+
+def fun_l27_n708()
+ fun_l28_n432
+end
+
+def fun_l27_n709()
+ fun_l28_n446
+end
+
+def fun_l27_n710()
+ fun_l28_n170
+end
+
+def fun_l27_n711()
+ fun_l28_n507
+end
+
+def fun_l27_n712()
+ fun_l28_n650
+end
+
+def fun_l27_n713()
+ fun_l28_n952
+end
+
+def fun_l27_n714()
+ fun_l28_n629
+end
+
+def fun_l27_n715()
+ fun_l28_n578
+end
+
+def fun_l27_n716()
+ fun_l28_n754
+end
+
+def fun_l27_n717()
+ fun_l28_n431
+end
+
+def fun_l27_n718()
+ fun_l28_n340
+end
+
+def fun_l27_n719()
+ fun_l28_n580
+end
+
+def fun_l27_n720()
+ fun_l28_n976
+end
+
+def fun_l27_n721()
+ fun_l28_n830
+end
+
+def fun_l27_n722()
+ fun_l28_n746
+end
+
+def fun_l27_n723()
+ fun_l28_n139
+end
+
+def fun_l27_n724()
+ fun_l28_n152
+end
+
+def fun_l27_n725()
+ fun_l28_n956
+end
+
+def fun_l27_n726()
+ fun_l28_n152
+end
+
+def fun_l27_n727()
+ fun_l28_n252
+end
+
+def fun_l27_n728()
+ fun_l28_n856
+end
+
+def fun_l27_n729()
+ fun_l28_n862
+end
+
+def fun_l27_n730()
+ fun_l28_n261
+end
+
+def fun_l27_n731()
+ fun_l28_n28
+end
+
+def fun_l27_n732()
+ fun_l28_n873
+end
+
+def fun_l27_n733()
+ fun_l28_n989
+end
+
+def fun_l27_n734()
+ fun_l28_n657
+end
+
+def fun_l27_n735()
+ fun_l28_n259
+end
+
+def fun_l27_n736()
+ fun_l28_n1
+end
+
+def fun_l27_n737()
+ fun_l28_n964
+end
+
+def fun_l27_n738()
+ fun_l28_n215
+end
+
+def fun_l27_n739()
+ fun_l28_n939
+end
+
+def fun_l27_n740()
+ fun_l28_n644
+end
+
+def fun_l27_n741()
+ fun_l28_n335
+end
+
+def fun_l27_n742()
+ fun_l28_n844
+end
+
+def fun_l27_n743()
+ fun_l28_n493
+end
+
+def fun_l27_n744()
+ fun_l28_n25
+end
+
+def fun_l27_n745()
+ fun_l28_n690
+end
+
+def fun_l27_n746()
+ fun_l28_n561
+end
+
+def fun_l27_n747()
+ fun_l28_n682
+end
+
+def fun_l27_n748()
+ fun_l28_n476
+end
+
+def fun_l27_n749()
+ fun_l28_n626
+end
+
+def fun_l27_n750()
+ fun_l28_n607
+end
+
+def fun_l27_n751()
+ fun_l28_n655
+end
+
+def fun_l27_n752()
+ fun_l28_n481
+end
+
+def fun_l27_n753()
+ fun_l28_n634
+end
+
+def fun_l27_n754()
+ fun_l28_n971
+end
+
+def fun_l27_n755()
+ fun_l28_n372
+end
+
+def fun_l27_n756()
+ fun_l28_n701
+end
+
+def fun_l27_n757()
+ fun_l28_n383
+end
+
+def fun_l27_n758()
+ fun_l28_n295
+end
+
+def fun_l27_n759()
+ fun_l28_n58
+end
+
+def fun_l27_n760()
+ fun_l28_n870
+end
+
+def fun_l27_n761()
+ fun_l28_n902
+end
+
+def fun_l27_n762()
+ fun_l28_n352
+end
+
+def fun_l27_n763()
+ fun_l28_n421
+end
+
+def fun_l27_n764()
+ fun_l28_n870
+end
+
+def fun_l27_n765()
+ fun_l28_n604
+end
+
+def fun_l27_n766()
+ fun_l28_n615
+end
+
+def fun_l27_n767()
+ fun_l28_n644
+end
+
+def fun_l27_n768()
+ fun_l28_n304
+end
+
+def fun_l27_n769()
+ fun_l28_n87
+end
+
+def fun_l27_n770()
+ fun_l28_n40
+end
+
+def fun_l27_n771()
+ fun_l28_n80
+end
+
+def fun_l27_n772()
+ fun_l28_n62
+end
+
+def fun_l27_n773()
+ fun_l28_n912
+end
+
+def fun_l27_n774()
+ fun_l28_n808
+end
+
+def fun_l27_n775()
+ fun_l28_n978
+end
+
+def fun_l27_n776()
+ fun_l28_n499
+end
+
+def fun_l27_n777()
+ fun_l28_n299
+end
+
+def fun_l27_n778()
+ fun_l28_n852
+end
+
+def fun_l27_n779()
+ fun_l28_n126
+end
+
+def fun_l27_n780()
+ fun_l28_n578
+end
+
+def fun_l27_n781()
+ fun_l28_n177
+end
+
+def fun_l27_n782()
+ fun_l28_n621
+end
+
+def fun_l27_n783()
+ fun_l28_n833
+end
+
+def fun_l27_n784()
+ fun_l28_n991
+end
+
+def fun_l27_n785()
+ fun_l28_n419
+end
+
+def fun_l27_n786()
+ fun_l28_n723
+end
+
+def fun_l27_n787()
+ fun_l28_n915
+end
+
+def fun_l27_n788()
+ fun_l28_n73
+end
+
+def fun_l27_n789()
+ fun_l28_n725
+end
+
+def fun_l27_n790()
+ fun_l28_n883
+end
+
+def fun_l27_n791()
+ fun_l28_n469
+end
+
+def fun_l27_n792()
+ fun_l28_n524
+end
+
+def fun_l27_n793()
+ fun_l28_n813
+end
+
+def fun_l27_n794()
+ fun_l28_n8
+end
+
+def fun_l27_n795()
+ fun_l28_n776
+end
+
+def fun_l27_n796()
+ fun_l28_n328
+end
+
+def fun_l27_n797()
+ fun_l28_n324
+end
+
+def fun_l27_n798()
+ fun_l28_n428
+end
+
+def fun_l27_n799()
+ fun_l28_n806
+end
+
+def fun_l27_n800()
+ fun_l28_n397
+end
+
+def fun_l27_n801()
+ fun_l28_n680
+end
+
+def fun_l27_n802()
+ fun_l28_n18
+end
+
+def fun_l27_n803()
+ fun_l28_n955
+end
+
+def fun_l27_n804()
+ fun_l28_n566
+end
+
+def fun_l27_n805()
+ fun_l28_n824
+end
+
+def fun_l27_n806()
+ fun_l28_n860
+end
+
+def fun_l27_n807()
+ fun_l28_n411
+end
+
+def fun_l27_n808()
+ fun_l28_n925
+end
+
+def fun_l27_n809()
+ fun_l28_n394
+end
+
+def fun_l27_n810()
+ fun_l28_n70
+end
+
+def fun_l27_n811()
+ fun_l28_n672
+end
+
+def fun_l27_n812()
+ fun_l28_n53
+end
+
+def fun_l27_n813()
+ fun_l28_n574
+end
+
+def fun_l27_n814()
+ fun_l28_n407
+end
+
+def fun_l27_n815()
+ fun_l28_n86
+end
+
+def fun_l27_n816()
+ fun_l28_n611
+end
+
+def fun_l27_n817()
+ fun_l28_n950
+end
+
+def fun_l27_n818()
+ fun_l28_n595
+end
+
+def fun_l27_n819()
+ fun_l28_n411
+end
+
+def fun_l27_n820()
+ fun_l28_n286
+end
+
+def fun_l27_n821()
+ fun_l28_n683
+end
+
+def fun_l27_n822()
+ fun_l28_n706
+end
+
+def fun_l27_n823()
+ fun_l28_n587
+end
+
+def fun_l27_n824()
+ fun_l28_n908
+end
+
+def fun_l27_n825()
+ fun_l28_n641
+end
+
+def fun_l27_n826()
+ fun_l28_n792
+end
+
+def fun_l27_n827()
+ fun_l28_n714
+end
+
+def fun_l27_n828()
+ fun_l28_n594
+end
+
+def fun_l27_n829()
+ fun_l28_n154
+end
+
+def fun_l27_n830()
+ fun_l28_n102
+end
+
+def fun_l27_n831()
+ fun_l28_n819
+end
+
+def fun_l27_n832()
+ fun_l28_n285
+end
+
+def fun_l27_n833()
+ fun_l28_n665
+end
+
+def fun_l27_n834()
+ fun_l28_n896
+end
+
+def fun_l27_n835()
+ fun_l28_n495
+end
+
+def fun_l27_n836()
+ fun_l28_n284
+end
+
+def fun_l27_n837()
+ fun_l28_n747
+end
+
+def fun_l27_n838()
+ fun_l28_n388
+end
+
+def fun_l27_n839()
+ fun_l28_n274
+end
+
+def fun_l27_n840()
+ fun_l28_n236
+end
+
+def fun_l27_n841()
+ fun_l28_n336
+end
+
+def fun_l27_n842()
+ fun_l28_n805
+end
+
+def fun_l27_n843()
+ fun_l28_n196
+end
+
+def fun_l27_n844()
+ fun_l28_n772
+end
+
+def fun_l27_n845()
+ fun_l28_n679
+end
+
+def fun_l27_n846()
+ fun_l28_n703
+end
+
+def fun_l27_n847()
+ fun_l28_n743
+end
+
+def fun_l27_n848()
+ fun_l28_n941
+end
+
+def fun_l27_n849()
+ fun_l28_n903
+end
+
+def fun_l27_n850()
+ fun_l28_n149
+end
+
+def fun_l27_n851()
+ fun_l28_n924
+end
+
+def fun_l27_n852()
+ fun_l28_n638
+end
+
+def fun_l27_n853()
+ fun_l28_n480
+end
+
+def fun_l27_n854()
+ fun_l28_n580
+end
+
+def fun_l27_n855()
+ fun_l28_n184
+end
+
+def fun_l27_n856()
+ fun_l28_n757
+end
+
+def fun_l27_n857()
+ fun_l28_n233
+end
+
+def fun_l27_n858()
+ fun_l28_n315
+end
+
+def fun_l27_n859()
+ fun_l28_n182
+end
+
+def fun_l27_n860()
+ fun_l28_n696
+end
+
+def fun_l27_n861()
+ fun_l28_n155
+end
+
+def fun_l27_n862()
+ fun_l28_n648
+end
+
+def fun_l27_n863()
+ fun_l28_n148
+end
+
+def fun_l27_n864()
+ fun_l28_n40
+end
+
+def fun_l27_n865()
+ fun_l28_n665
+end
+
+def fun_l27_n866()
+ fun_l28_n646
+end
+
+def fun_l27_n867()
+ fun_l28_n158
+end
+
+def fun_l27_n868()
+ fun_l28_n159
+end
+
+def fun_l27_n869()
+ fun_l28_n617
+end
+
+def fun_l27_n870()
+ fun_l28_n637
+end
+
+def fun_l27_n871()
+ fun_l28_n234
+end
+
+def fun_l27_n872()
+ fun_l28_n591
+end
+
+def fun_l27_n873()
+ fun_l28_n207
+end
+
+def fun_l27_n874()
+ fun_l28_n136
+end
+
+def fun_l27_n875()
+ fun_l28_n565
+end
+
+def fun_l27_n876()
+ fun_l28_n152
+end
+
+def fun_l27_n877()
+ fun_l28_n309
+end
+
+def fun_l27_n878()
+ fun_l28_n275
+end
+
+def fun_l27_n879()
+ fun_l28_n355
+end
+
+def fun_l27_n880()
+ fun_l28_n441
+end
+
+def fun_l27_n881()
+ fun_l28_n427
+end
+
+def fun_l27_n882()
+ fun_l28_n249
+end
+
+def fun_l27_n883()
+ fun_l28_n764
+end
+
+def fun_l27_n884()
+ fun_l28_n183
+end
+
+def fun_l27_n885()
+ fun_l28_n302
+end
+
+def fun_l27_n886()
+ fun_l28_n857
+end
+
+def fun_l27_n887()
+ fun_l28_n73
+end
+
+def fun_l27_n888()
+ fun_l28_n702
+end
+
+def fun_l27_n889()
+ fun_l28_n430
+end
+
+def fun_l27_n890()
+ fun_l28_n57
+end
+
+def fun_l27_n891()
+ fun_l28_n994
+end
+
+def fun_l27_n892()
+ fun_l28_n951
+end
+
+def fun_l27_n893()
+ fun_l28_n268
+end
+
+def fun_l27_n894()
+ fun_l28_n629
+end
+
+def fun_l27_n895()
+ fun_l28_n505
+end
+
+def fun_l27_n896()
+ fun_l28_n790
+end
+
+def fun_l27_n897()
+ fun_l28_n213
+end
+
+def fun_l27_n898()
+ fun_l28_n133
+end
+
+def fun_l27_n899()
+ fun_l28_n472
+end
+
+def fun_l27_n900()
+ fun_l28_n212
+end
+
+def fun_l27_n901()
+ fun_l28_n386
+end
+
+def fun_l27_n902()
+ fun_l28_n405
+end
+
+def fun_l27_n903()
+ fun_l28_n807
+end
+
+def fun_l27_n904()
+ fun_l28_n76
+end
+
+def fun_l27_n905()
+ fun_l28_n295
+end
+
+def fun_l27_n906()
+ fun_l28_n860
+end
+
+def fun_l27_n907()
+ fun_l28_n185
+end
+
+def fun_l27_n908()
+ fun_l28_n762
+end
+
+def fun_l27_n909()
+ fun_l28_n493
+end
+
+def fun_l27_n910()
+ fun_l28_n309
+end
+
+def fun_l27_n911()
+ fun_l28_n920
+end
+
+def fun_l27_n912()
+ fun_l28_n284
+end
+
+def fun_l27_n913()
+ fun_l28_n355
+end
+
+def fun_l27_n914()
+ fun_l28_n177
+end
+
+def fun_l27_n915()
+ fun_l28_n901
+end
+
+def fun_l27_n916()
+ fun_l28_n858
+end
+
+def fun_l27_n917()
+ fun_l28_n337
+end
+
+def fun_l27_n918()
+ fun_l28_n872
+end
+
+def fun_l27_n919()
+ fun_l28_n550
+end
+
+def fun_l27_n920()
+ fun_l28_n458
+end
+
+def fun_l27_n921()
+ fun_l28_n739
+end
+
+def fun_l27_n922()
+ fun_l28_n394
+end
+
+def fun_l27_n923()
+ fun_l28_n695
+end
+
+def fun_l27_n924()
+ fun_l28_n455
+end
+
+def fun_l27_n925()
+ fun_l28_n958
+end
+
+def fun_l27_n926()
+ fun_l28_n395
+end
+
+def fun_l27_n927()
+ fun_l28_n645
+end
+
+def fun_l27_n928()
+ fun_l28_n668
+end
+
+def fun_l27_n929()
+ fun_l28_n880
+end
+
+def fun_l27_n930()
+ fun_l28_n743
+end
+
+def fun_l27_n931()
+ fun_l28_n411
+end
+
+def fun_l27_n932()
+ fun_l28_n457
+end
+
+def fun_l27_n933()
+ fun_l28_n852
+end
+
+def fun_l27_n934()
+ fun_l28_n3
+end
+
+def fun_l27_n935()
+ fun_l28_n637
+end
+
+def fun_l27_n936()
+ fun_l28_n35
+end
+
+def fun_l27_n937()
+ fun_l28_n671
+end
+
+def fun_l27_n938()
+ fun_l28_n996
+end
+
+def fun_l27_n939()
+ fun_l28_n545
+end
+
+def fun_l27_n940()
+ fun_l28_n714
+end
+
+def fun_l27_n941()
+ fun_l28_n527
+end
+
+def fun_l27_n942()
+ fun_l28_n272
+end
+
+def fun_l27_n943()
+ fun_l28_n62
+end
+
+def fun_l27_n944()
+ fun_l28_n206
+end
+
+def fun_l27_n945()
+ fun_l28_n115
+end
+
+def fun_l27_n946()
+ fun_l28_n654
+end
+
+def fun_l27_n947()
+ fun_l28_n218
+end
+
+def fun_l27_n948()
+ fun_l28_n315
+end
+
+def fun_l27_n949()
+ fun_l28_n656
+end
+
+def fun_l27_n950()
+ fun_l28_n901
+end
+
+def fun_l27_n951()
+ fun_l28_n60
+end
+
+def fun_l27_n952()
+ fun_l28_n886
+end
+
+def fun_l27_n953()
+ fun_l28_n888
+end
+
+def fun_l27_n954()
+ fun_l28_n640
+end
+
+def fun_l27_n955()
+ fun_l28_n766
+end
+
+def fun_l27_n956()
+ fun_l28_n506
+end
+
+def fun_l27_n957()
+ fun_l28_n757
+end
+
+def fun_l27_n958()
+ fun_l28_n204
+end
+
+def fun_l27_n959()
+ fun_l28_n531
+end
+
+def fun_l27_n960()
+ fun_l28_n982
+end
+
+def fun_l27_n961()
+ fun_l28_n762
+end
+
+def fun_l27_n962()
+ fun_l28_n701
+end
+
+def fun_l27_n963()
+ fun_l28_n866
+end
+
+def fun_l27_n964()
+ fun_l28_n488
+end
+
+def fun_l27_n965()
+ fun_l28_n793
+end
+
+def fun_l27_n966()
+ fun_l28_n969
+end
+
+def fun_l27_n967()
+ fun_l28_n35
+end
+
+def fun_l27_n968()
+ fun_l28_n54
+end
+
+def fun_l27_n969()
+ fun_l28_n746
+end
+
+def fun_l27_n970()
+ fun_l28_n437
+end
+
+def fun_l27_n971()
+ fun_l28_n601
+end
+
+def fun_l27_n972()
+ fun_l28_n477
+end
+
+def fun_l27_n973()
+ fun_l28_n854
+end
+
+def fun_l27_n974()
+ fun_l28_n76
+end
+
+def fun_l27_n975()
+ fun_l28_n145
+end
+
+def fun_l27_n976()
+ fun_l28_n156
+end
+
+def fun_l27_n977()
+ fun_l28_n719
+end
+
+def fun_l27_n978()
+ fun_l28_n389
+end
+
+def fun_l27_n979()
+ fun_l28_n482
+end
+
+def fun_l27_n980()
+ fun_l28_n369
+end
+
+def fun_l27_n981()
+ fun_l28_n42
+end
+
+def fun_l27_n982()
+ fun_l28_n975
+end
+
+def fun_l27_n983()
+ fun_l28_n995
+end
+
+def fun_l27_n984()
+ fun_l28_n880
+end
+
+def fun_l27_n985()
+ fun_l28_n688
+end
+
+def fun_l27_n986()
+ fun_l28_n796
+end
+
+def fun_l27_n987()
+ fun_l28_n291
+end
+
+def fun_l27_n988()
+ fun_l28_n158
+end
+
+def fun_l27_n989()
+ fun_l28_n389
+end
+
+def fun_l27_n990()
+ fun_l28_n582
+end
+
+def fun_l27_n991()
+ fun_l28_n108
+end
+
+def fun_l27_n992()
+ fun_l28_n280
+end
+
+def fun_l27_n993()
+ fun_l28_n842
+end
+
+def fun_l27_n994()
+ fun_l28_n637
+end
+
+def fun_l27_n995()
+ fun_l28_n934
+end
+
+def fun_l27_n996()
+ fun_l28_n451
+end
+
+def fun_l27_n997()
+ fun_l28_n22
+end
+
+def fun_l27_n998()
+ fun_l28_n733
+end
+
+def fun_l27_n999()
+ fun_l28_n984
+end
+
+def fun_l28_n0()
+ fun_l29_n189
+end
+
+def fun_l28_n1()
+ fun_l29_n12
+end
+
+def fun_l28_n2()
+ fun_l29_n850
+end
+
+def fun_l28_n3()
+ fun_l29_n360
+end
+
+def fun_l28_n4()
+ fun_l29_n510
+end
+
+def fun_l28_n5()
+ fun_l29_n541
+end
+
+def fun_l28_n6()
+ fun_l29_n913
+end
+
+def fun_l28_n7()
+ fun_l29_n652
+end
+
+def fun_l28_n8()
+ fun_l29_n378
+end
+
+def fun_l28_n9()
+ fun_l29_n476
+end
+
+def fun_l28_n10()
+ fun_l29_n644
+end
+
+def fun_l28_n11()
+ fun_l29_n484
+end
+
+def fun_l28_n12()
+ fun_l29_n52
+end
+
+def fun_l28_n13()
+ fun_l29_n294
+end
+
+def fun_l28_n14()
+ fun_l29_n387
+end
+
+def fun_l28_n15()
+ fun_l29_n331
+end
+
+def fun_l28_n16()
+ fun_l29_n578
+end
+
+def fun_l28_n17()
+ fun_l29_n783
+end
+
+def fun_l28_n18()
+ fun_l29_n838
+end
+
+def fun_l28_n19()
+ fun_l29_n5
+end
+
+def fun_l28_n20()
+ fun_l29_n909
+end
+
+def fun_l28_n21()
+ fun_l29_n671
+end
+
+def fun_l28_n22()
+ fun_l29_n626
+end
+
+def fun_l28_n23()
+ fun_l29_n685
+end
+
+def fun_l28_n24()
+ fun_l29_n22
+end
+
+def fun_l28_n25()
+ fun_l29_n925
+end
+
+def fun_l28_n26()
+ fun_l29_n816
+end
+
+def fun_l28_n27()
+ fun_l29_n714
+end
+
+def fun_l28_n28()
+ fun_l29_n863
+end
+
+def fun_l28_n29()
+ fun_l29_n475
+end
+
+def fun_l28_n30()
+ fun_l29_n83
+end
+
+def fun_l28_n31()
+ fun_l29_n854
+end
+
+def fun_l28_n32()
+ fun_l29_n616
+end
+
+def fun_l28_n33()
+ fun_l29_n574
+end
+
+def fun_l28_n34()
+ fun_l29_n745
+end
+
+def fun_l28_n35()
+ fun_l29_n921
+end
+
+def fun_l28_n36()
+ fun_l29_n639
+end
+
+def fun_l28_n37()
+ fun_l29_n695
+end
+
+def fun_l28_n38()
+ fun_l29_n527
+end
+
+def fun_l28_n39()
+ fun_l29_n691
+end
+
+def fun_l28_n40()
+ fun_l29_n409
+end
+
+def fun_l28_n41()
+ fun_l29_n788
+end
+
+def fun_l28_n42()
+ fun_l29_n671
+end
+
+def fun_l28_n43()
+ fun_l29_n855
+end
+
+def fun_l28_n44()
+ fun_l29_n364
+end
+
+def fun_l28_n45()
+ fun_l29_n231
+end
+
+def fun_l28_n46()
+ fun_l29_n852
+end
+
+def fun_l28_n47()
+ fun_l29_n596
+end
+
+def fun_l28_n48()
+ fun_l29_n804
+end
+
+def fun_l28_n49()
+ fun_l29_n513
+end
+
+def fun_l28_n50()
+ fun_l29_n498
+end
+
+def fun_l28_n51()
+ fun_l29_n548
+end
+
+def fun_l28_n52()
+ fun_l29_n641
+end
+
+def fun_l28_n53()
+ fun_l29_n784
+end
+
+def fun_l28_n54()
+ fun_l29_n803
+end
+
+def fun_l28_n55()
+ fun_l29_n384
+end
+
+def fun_l28_n56()
+ fun_l29_n304
+end
+
+def fun_l28_n57()
+ fun_l29_n894
+end
+
+def fun_l28_n58()
+ fun_l29_n233
+end
+
+def fun_l28_n59()
+ fun_l29_n344
+end
+
+def fun_l28_n60()
+ fun_l29_n652
+end
+
+def fun_l28_n61()
+ fun_l29_n912
+end
+
+def fun_l28_n62()
+ fun_l29_n266
+end
+
+def fun_l28_n63()
+ fun_l29_n228
+end
+
+def fun_l28_n64()
+ fun_l29_n31
+end
+
+def fun_l28_n65()
+ fun_l29_n679
+end
+
+def fun_l28_n66()
+ fun_l29_n902
+end
+
+def fun_l28_n67()
+ fun_l29_n907
+end
+
+def fun_l28_n68()
+ fun_l29_n830
+end
+
+def fun_l28_n69()
+ fun_l29_n849
+end
+
+def fun_l28_n70()
+ fun_l29_n551
+end
+
+def fun_l28_n71()
+ fun_l29_n586
+end
+
+def fun_l28_n72()
+ fun_l29_n126
+end
+
+def fun_l28_n73()
+ fun_l29_n75
+end
+
+def fun_l28_n74()
+ fun_l29_n706
+end
+
+def fun_l28_n75()
+ fun_l29_n82
+end
+
+def fun_l28_n76()
+ fun_l29_n194
+end
+
+def fun_l28_n77()
+ fun_l29_n761
+end
+
+def fun_l28_n78()
+ fun_l29_n439
+end
+
+def fun_l28_n79()
+ fun_l29_n53
+end
+
+def fun_l28_n80()
+ fun_l29_n889
+end
+
+def fun_l28_n81()
+ fun_l29_n743
+end
+
+def fun_l28_n82()
+ fun_l29_n545
+end
+
+def fun_l28_n83()
+ fun_l29_n88
+end
+
+def fun_l28_n84()
+ fun_l29_n697
+end
+
+def fun_l28_n85()
+ fun_l29_n160
+end
+
+def fun_l28_n86()
+ fun_l29_n895
+end
+
+def fun_l28_n87()
+ fun_l29_n475
+end
+
+def fun_l28_n88()
+ fun_l29_n330
+end
+
+def fun_l28_n89()
+ fun_l29_n464
+end
+
+def fun_l28_n90()
+ fun_l29_n772
+end
+
+def fun_l28_n91()
+ fun_l29_n241
+end
+
+def fun_l28_n92()
+ fun_l29_n838
+end
+
+def fun_l28_n93()
+ fun_l29_n322
+end
+
+def fun_l28_n94()
+ fun_l29_n328
+end
+
+def fun_l28_n95()
+ fun_l29_n475
+end
+
+def fun_l28_n96()
+ fun_l29_n523
+end
+
+def fun_l28_n97()
+ fun_l29_n621
+end
+
+def fun_l28_n98()
+ fun_l29_n646
+end
+
+def fun_l28_n99()
+ fun_l29_n803
+end
+
+def fun_l28_n100()
+ fun_l29_n121
+end
+
+def fun_l28_n101()
+ fun_l29_n432
+end
+
+def fun_l28_n102()
+ fun_l29_n14
+end
+
+def fun_l28_n103()
+ fun_l29_n358
+end
+
+def fun_l28_n104()
+ fun_l29_n257
+end
+
+def fun_l28_n105()
+ fun_l29_n985
+end
+
+def fun_l28_n106()
+ fun_l29_n392
+end
+
+def fun_l28_n107()
+ fun_l29_n11
+end
+
+def fun_l28_n108()
+ fun_l29_n254
+end
+
+def fun_l28_n109()
+ fun_l29_n17
+end
+
+def fun_l28_n110()
+ fun_l29_n146
+end
+
+def fun_l28_n111()
+ fun_l29_n20
+end
+
+def fun_l28_n112()
+ fun_l29_n189
+end
+
+def fun_l28_n113()
+ fun_l29_n838
+end
+
+def fun_l28_n114()
+ fun_l29_n251
+end
+
+def fun_l28_n115()
+ fun_l29_n331
+end
+
+def fun_l28_n116()
+ fun_l29_n816
+end
+
+def fun_l28_n117()
+ fun_l29_n338
+end
+
+def fun_l28_n118()
+ fun_l29_n745
+end
+
+def fun_l28_n119()
+ fun_l29_n301
+end
+
+def fun_l28_n120()
+ fun_l29_n647
+end
+
+def fun_l28_n121()
+ fun_l29_n71
+end
+
+def fun_l28_n122()
+ fun_l29_n371
+end
+
+def fun_l28_n123()
+ fun_l29_n586
+end
+
+def fun_l28_n124()
+ fun_l29_n868
+end
+
+def fun_l28_n125()
+ fun_l29_n519
+end
+
+def fun_l28_n126()
+ fun_l29_n877
+end
+
+def fun_l28_n127()
+ fun_l29_n716
+end
+
+def fun_l28_n128()
+ fun_l29_n184
+end
+
+def fun_l28_n129()
+ fun_l29_n797
+end
+
+def fun_l28_n130()
+ fun_l29_n801
+end
+
+def fun_l28_n131()
+ fun_l29_n278
+end
+
+def fun_l28_n132()
+ fun_l29_n562
+end
+
+def fun_l28_n133()
+ fun_l29_n999
+end
+
+def fun_l28_n134()
+ fun_l29_n128
+end
+
+def fun_l28_n135()
+ fun_l29_n134
+end
+
+def fun_l28_n136()
+ fun_l29_n62
+end
+
+def fun_l28_n137()
+ fun_l29_n923
+end
+
+def fun_l28_n138()
+ fun_l29_n870
+end
+
+def fun_l28_n139()
+ fun_l29_n279
+end
+
+def fun_l28_n140()
+ fun_l29_n971
+end
+
+def fun_l28_n141()
+ fun_l29_n843
+end
+
+def fun_l28_n142()
+ fun_l29_n537
+end
+
+def fun_l28_n143()
+ fun_l29_n584
+end
+
+def fun_l28_n144()
+ fun_l29_n961
+end
+
+def fun_l28_n145()
+ fun_l29_n383
+end
+
+def fun_l28_n146()
+ fun_l29_n44
+end
+
+def fun_l28_n147()
+ fun_l29_n291
+end
+
+def fun_l28_n148()
+ fun_l29_n639
+end
+
+def fun_l28_n149()
+ fun_l29_n751
+end
+
+def fun_l28_n150()
+ fun_l29_n504
+end
+
+def fun_l28_n151()
+ fun_l29_n884
+end
+
+def fun_l28_n152()
+ fun_l29_n505
+end
+
+def fun_l28_n153()
+ fun_l29_n932
+end
+
+def fun_l28_n154()
+ fun_l29_n414
+end
+
+def fun_l28_n155()
+ fun_l29_n121
+end
+
+def fun_l28_n156()
+ fun_l29_n313
+end
+
+def fun_l28_n157()
+ fun_l29_n620
+end
+
+def fun_l28_n158()
+ fun_l29_n412
+end
+
+def fun_l28_n159()
+ fun_l29_n119
+end
+
+def fun_l28_n160()
+ fun_l29_n431
+end
+
+def fun_l28_n161()
+ fun_l29_n943
+end
+
+def fun_l28_n162()
+ fun_l29_n499
+end
+
+def fun_l28_n163()
+ fun_l29_n494
+end
+
+def fun_l28_n164()
+ fun_l29_n716
+end
+
+def fun_l28_n165()
+ fun_l29_n558
+end
+
+def fun_l28_n166()
+ fun_l29_n864
+end
+
+def fun_l28_n167()
+ fun_l29_n13
+end
+
+def fun_l28_n168()
+ fun_l29_n165
+end
+
+def fun_l28_n169()
+ fun_l29_n129
+end
+
+def fun_l28_n170()
+ fun_l29_n478
+end
+
+def fun_l28_n171()
+ fun_l29_n124
+end
+
+def fun_l28_n172()
+ fun_l29_n945
+end
+
+def fun_l28_n173()
+ fun_l29_n574
+end
+
+def fun_l28_n174()
+ fun_l29_n916
+end
+
+def fun_l28_n175()
+ fun_l29_n213
+end
+
+def fun_l28_n176()
+ fun_l29_n68
+end
+
+def fun_l28_n177()
+ fun_l29_n66
+end
+
+def fun_l28_n178()
+ fun_l29_n979
+end
+
+def fun_l28_n179()
+ fun_l29_n909
+end
+
+def fun_l28_n180()
+ fun_l29_n509
+end
+
+def fun_l28_n181()
+ fun_l29_n663
+end
+
+def fun_l28_n182()
+ fun_l29_n407
+end
+
+def fun_l28_n183()
+ fun_l29_n692
+end
+
+def fun_l28_n184()
+ fun_l29_n569
+end
+
+def fun_l28_n185()
+ fun_l29_n950
+end
+
+def fun_l28_n186()
+ fun_l29_n266
+end
+
+def fun_l28_n187()
+ fun_l29_n48
+end
+
+def fun_l28_n188()
+ fun_l29_n244
+end
+
+def fun_l28_n189()
+ fun_l29_n428
+end
+
+def fun_l28_n190()
+ fun_l29_n893
+end
+
+def fun_l28_n191()
+ fun_l29_n581
+end
+
+def fun_l28_n192()
+ fun_l29_n210
+end
+
+def fun_l28_n193()
+ fun_l29_n81
+end
+
+def fun_l28_n194()
+ fun_l29_n295
+end
+
+def fun_l28_n195()
+ fun_l29_n471
+end
+
+def fun_l28_n196()
+ fun_l29_n967
+end
+
+def fun_l28_n197()
+ fun_l29_n318
+end
+
+def fun_l28_n198()
+ fun_l29_n15
+end
+
+def fun_l28_n199()
+ fun_l29_n696
+end
+
+def fun_l28_n200()
+ fun_l29_n702
+end
+
+def fun_l28_n201()
+ fun_l29_n737
+end
+
+def fun_l28_n202()
+ fun_l29_n776
+end
+
+def fun_l28_n203()
+ fun_l29_n623
+end
+
+def fun_l28_n204()
+ fun_l29_n537
+end
+
+def fun_l28_n205()
+ fun_l29_n353
+end
+
+def fun_l28_n206()
+ fun_l29_n156
+end
+
+def fun_l28_n207()
+ fun_l29_n690
+end
+
+def fun_l28_n208()
+ fun_l29_n408
+end
+
+def fun_l28_n209()
+ fun_l29_n388
+end
+
+def fun_l28_n210()
+ fun_l29_n721
+end
+
+def fun_l28_n211()
+ fun_l29_n46
+end
+
+def fun_l28_n212()
+ fun_l29_n238
+end
+
+def fun_l28_n213()
+ fun_l29_n722
+end
+
+def fun_l28_n214()
+ fun_l29_n827
+end
+
+def fun_l28_n215()
+ fun_l29_n496
+end
+
+def fun_l28_n216()
+ fun_l29_n10
+end
+
+def fun_l28_n217()
+ fun_l29_n689
+end
+
+def fun_l28_n218()
+ fun_l29_n962
+end
+
+def fun_l28_n219()
+ fun_l29_n364
+end
+
+def fun_l28_n220()
+ fun_l29_n92
+end
+
+def fun_l28_n221()
+ fun_l29_n246
+end
+
+def fun_l28_n222()
+ fun_l29_n624
+end
+
+def fun_l28_n223()
+ fun_l29_n482
+end
+
+def fun_l28_n224()
+ fun_l29_n992
+end
+
+def fun_l28_n225()
+ fun_l29_n746
+end
+
+def fun_l28_n226()
+ fun_l29_n44
+end
+
+def fun_l28_n227()
+ fun_l29_n389
+end
+
+def fun_l28_n228()
+ fun_l29_n278
+end
+
+def fun_l28_n229()
+ fun_l29_n336
+end
+
+def fun_l28_n230()
+ fun_l29_n415
+end
+
+def fun_l28_n231()
+ fun_l29_n670
+end
+
+def fun_l28_n232()
+ fun_l29_n132
+end
+
+def fun_l28_n233()
+ fun_l29_n669
+end
+
+def fun_l28_n234()
+ fun_l29_n815
+end
+
+def fun_l28_n235()
+ fun_l29_n642
+end
+
+def fun_l28_n236()
+ fun_l29_n59
+end
+
+def fun_l28_n237()
+ fun_l29_n175
+end
+
+def fun_l28_n238()
+ fun_l29_n862
+end
+
+def fun_l28_n239()
+ fun_l29_n570
+end
+
+def fun_l28_n240()
+ fun_l29_n65
+end
+
+def fun_l28_n241()
+ fun_l29_n286
+end
+
+def fun_l28_n242()
+ fun_l29_n467
+end
+
+def fun_l28_n243()
+ fun_l29_n580
+end
+
+def fun_l28_n244()
+ fun_l29_n195
+end
+
+def fun_l28_n245()
+ fun_l29_n571
+end
+
+def fun_l28_n246()
+ fun_l29_n987
+end
+
+def fun_l28_n247()
+ fun_l29_n87
+end
+
+def fun_l28_n248()
+ fun_l29_n331
+end
+
+def fun_l28_n249()
+ fun_l29_n405
+end
+
+def fun_l28_n250()
+ fun_l29_n142
+end
+
+def fun_l28_n251()
+ fun_l29_n652
+end
+
+def fun_l28_n252()
+ fun_l29_n788
+end
+
+def fun_l28_n253()
+ fun_l29_n591
+end
+
+def fun_l28_n254()
+ fun_l29_n613
+end
+
+def fun_l28_n255()
+ fun_l29_n171
+end
+
+def fun_l28_n256()
+ fun_l29_n836
+end
+
+def fun_l28_n257()
+ fun_l29_n420
+end
+
+def fun_l28_n258()
+ fun_l29_n326
+end
+
+def fun_l28_n259()
+ fun_l29_n790
+end
+
+def fun_l28_n260()
+ fun_l29_n515
+end
+
+def fun_l28_n261()
+ fun_l29_n650
+end
+
+def fun_l28_n262()
+ fun_l29_n388
+end
+
+def fun_l28_n263()
+ fun_l29_n56
+end
+
+def fun_l28_n264()
+ fun_l29_n288
+end
+
+def fun_l28_n265()
+ fun_l29_n187
+end
+
+def fun_l28_n266()
+ fun_l29_n461
+end
+
+def fun_l28_n267()
+ fun_l29_n194
+end
+
+def fun_l28_n268()
+ fun_l29_n870
+end
+
+def fun_l28_n269()
+ fun_l29_n425
+end
+
+def fun_l28_n270()
+ fun_l29_n731
+end
+
+def fun_l28_n271()
+ fun_l29_n763
+end
+
+def fun_l28_n272()
+ fun_l29_n128
+end
+
+def fun_l28_n273()
+ fun_l29_n693
+end
+
+def fun_l28_n274()
+ fun_l29_n775
+end
+
+def fun_l28_n275()
+ fun_l29_n769
+end
+
+def fun_l28_n276()
+ fun_l29_n491
+end
+
+def fun_l28_n277()
+ fun_l29_n799
+end
+
+def fun_l28_n278()
+ fun_l29_n506
+end
+
+def fun_l28_n279()
+ fun_l29_n607
+end
+
+def fun_l28_n280()
+ fun_l29_n988
+end
+
+def fun_l28_n281()
+ fun_l29_n290
+end
+
+def fun_l28_n282()
+ fun_l29_n389
+end
+
+def fun_l28_n283()
+ fun_l29_n133
+end
+
+def fun_l28_n284()
+ fun_l29_n631
+end
+
+def fun_l28_n285()
+ fun_l29_n285
+end
+
+def fun_l28_n286()
+ fun_l29_n537
+end
+
+def fun_l28_n287()
+ fun_l29_n911
+end
+
+def fun_l28_n288()
+ fun_l29_n297
+end
+
+def fun_l28_n289()
+ fun_l29_n585
+end
+
+def fun_l28_n290()
+ fun_l29_n535
+end
+
+def fun_l28_n291()
+ fun_l29_n570
+end
+
+def fun_l28_n292()
+ fun_l29_n19
+end
+
+def fun_l28_n293()
+ fun_l29_n444
+end
+
+def fun_l28_n294()
+ fun_l29_n44
+end
+
+def fun_l28_n295()
+ fun_l29_n252
+end
+
+def fun_l28_n296()
+ fun_l29_n623
+end
+
+def fun_l28_n297()
+ fun_l29_n398
+end
+
+def fun_l28_n298()
+ fun_l29_n716
+end
+
+def fun_l28_n299()
+ fun_l29_n607
+end
+
+def fun_l28_n300()
+ fun_l29_n105
+end
+
+def fun_l28_n301()
+ fun_l29_n438
+end
+
+def fun_l28_n302()
+ fun_l29_n308
+end
+
+def fun_l28_n303()
+ fun_l29_n301
+end
+
+def fun_l28_n304()
+ fun_l29_n577
+end
+
+def fun_l28_n305()
+ fun_l29_n537
+end
+
+def fun_l28_n306()
+ fun_l29_n375
+end
+
+def fun_l28_n307()
+ fun_l29_n211
+end
+
+def fun_l28_n308()
+ fun_l29_n227
+end
+
+def fun_l28_n309()
+ fun_l29_n275
+end
+
+def fun_l28_n310()
+ fun_l29_n122
+end
+
+def fun_l28_n311()
+ fun_l29_n983
+end
+
+def fun_l28_n312()
+ fun_l29_n844
+end
+
+def fun_l28_n313()
+ fun_l29_n865
+end
+
+def fun_l28_n314()
+ fun_l29_n27
+end
+
+def fun_l28_n315()
+ fun_l29_n933
+end
+
+def fun_l28_n316()
+ fun_l29_n89
+end
+
+def fun_l28_n317()
+ fun_l29_n11
+end
+
+def fun_l28_n318()
+ fun_l29_n107
+end
+
+def fun_l28_n319()
+ fun_l29_n604
+end
+
+def fun_l28_n320()
+ fun_l29_n768
+end
+
+def fun_l28_n321()
+ fun_l29_n638
+end
+
+def fun_l28_n322()
+ fun_l29_n513
+end
+
+def fun_l28_n323()
+ fun_l29_n61
+end
+
+def fun_l28_n324()
+ fun_l29_n776
+end
+
+def fun_l28_n325()
+ fun_l29_n377
+end
+
+def fun_l28_n326()
+ fun_l29_n768
+end
+
+def fun_l28_n327()
+ fun_l29_n573
+end
+
+def fun_l28_n328()
+ fun_l29_n719
+end
+
+def fun_l28_n329()
+ fun_l29_n878
+end
+
+def fun_l28_n330()
+ fun_l29_n995
+end
+
+def fun_l28_n331()
+ fun_l29_n32
+end
+
+def fun_l28_n332()
+ fun_l29_n647
+end
+
+def fun_l28_n333()
+ fun_l29_n570
+end
+
+def fun_l28_n334()
+ fun_l29_n194
+end
+
+def fun_l28_n335()
+ fun_l29_n182
+end
+
+def fun_l28_n336()
+ fun_l29_n463
+end
+
+def fun_l28_n337()
+ fun_l29_n677
+end
+
+def fun_l28_n338()
+ fun_l29_n524
+end
+
+def fun_l28_n339()
+ fun_l29_n221
+end
+
+def fun_l28_n340()
+ fun_l29_n120
+end
+
+def fun_l28_n341()
+ fun_l29_n633
+end
+
+def fun_l28_n342()
+ fun_l29_n428
+end
+
+def fun_l28_n343()
+ fun_l29_n510
+end
+
+def fun_l28_n344()
+ fun_l29_n576
+end
+
+def fun_l28_n345()
+ fun_l29_n423
+end
+
+def fun_l28_n346()
+ fun_l29_n412
+end
+
+def fun_l28_n347()
+ fun_l29_n315
+end
+
+def fun_l28_n348()
+ fun_l29_n809
+end
+
+def fun_l28_n349()
+ fun_l29_n195
+end
+
+def fun_l28_n350()
+ fun_l29_n724
+end
+
+def fun_l28_n351()
+ fun_l29_n438
+end
+
+def fun_l28_n352()
+ fun_l29_n229
+end
+
+def fun_l28_n353()
+ fun_l29_n113
+end
+
+def fun_l28_n354()
+ fun_l29_n58
+end
+
+def fun_l28_n355()
+ fun_l29_n105
+end
+
+def fun_l28_n356()
+ fun_l29_n371
+end
+
+def fun_l28_n357()
+ fun_l29_n397
+end
+
+def fun_l28_n358()
+ fun_l29_n441
+end
+
+def fun_l28_n359()
+ fun_l29_n765
+end
+
+def fun_l28_n360()
+ fun_l29_n752
+end
+
+def fun_l28_n361()
+ fun_l29_n255
+end
+
+def fun_l28_n362()
+ fun_l29_n981
+end
+
+def fun_l28_n363()
+ fun_l29_n612
+end
+
+def fun_l28_n364()
+ fun_l29_n268
+end
+
+def fun_l28_n365()
+ fun_l29_n573
+end
+
+def fun_l28_n366()
+ fun_l29_n202
+end
+
+def fun_l28_n367()
+ fun_l29_n477
+end
+
+def fun_l28_n368()
+ fun_l29_n353
+end
+
+def fun_l28_n369()
+ fun_l29_n244
+end
+
+def fun_l28_n370()
+ fun_l29_n348
+end
+
+def fun_l28_n371()
+ fun_l29_n96
+end
+
+def fun_l28_n372()
+ fun_l29_n421
+end
+
+def fun_l28_n373()
+ fun_l29_n685
+end
+
+def fun_l28_n374()
+ fun_l29_n408
+end
+
+def fun_l28_n375()
+ fun_l29_n971
+end
+
+def fun_l28_n376()
+ fun_l29_n372
+end
+
+def fun_l28_n377()
+ fun_l29_n852
+end
+
+def fun_l28_n378()
+ fun_l29_n872
+end
+
+def fun_l28_n379()
+ fun_l29_n981
+end
+
+def fun_l28_n380()
+ fun_l29_n939
+end
+
+def fun_l28_n381()
+ fun_l29_n13
+end
+
+def fun_l28_n382()
+ fun_l29_n381
+end
+
+def fun_l28_n383()
+ fun_l29_n291
+end
+
+def fun_l28_n384()
+ fun_l29_n465
+end
+
+def fun_l28_n385()
+ fun_l29_n309
+end
+
+def fun_l28_n386()
+ fun_l29_n53
+end
+
+def fun_l28_n387()
+ fun_l29_n525
+end
+
+def fun_l28_n388()
+ fun_l29_n756
+end
+
+def fun_l28_n389()
+ fun_l29_n347
+end
+
+def fun_l28_n390()
+ fun_l29_n517
+end
+
+def fun_l28_n391()
+ fun_l29_n275
+end
+
+def fun_l28_n392()
+ fun_l29_n973
+end
+
+def fun_l28_n393()
+ fun_l29_n538
+end
+
+def fun_l28_n394()
+ fun_l29_n429
+end
+
+def fun_l28_n395()
+ fun_l29_n219
+end
+
+def fun_l28_n396()
+ fun_l29_n823
+end
+
+def fun_l28_n397()
+ fun_l29_n676
+end
+
+def fun_l28_n398()
+ fun_l29_n319
+end
+
+def fun_l28_n399()
+ fun_l29_n784
+end
+
+def fun_l28_n400()
+ fun_l29_n741
+end
+
+def fun_l28_n401()
+ fun_l29_n876
+end
+
+def fun_l28_n402()
+ fun_l29_n648
+end
+
+def fun_l28_n403()
+ fun_l29_n231
+end
+
+def fun_l28_n404()
+ fun_l29_n459
+end
+
+def fun_l28_n405()
+ fun_l29_n350
+end
+
+def fun_l28_n406()
+ fun_l29_n398
+end
+
+def fun_l28_n407()
+ fun_l29_n692
+end
+
+def fun_l28_n408()
+ fun_l29_n91
+end
+
+def fun_l28_n409()
+ fun_l29_n120
+end
+
+def fun_l28_n410()
+ fun_l29_n337
+end
+
+def fun_l28_n411()
+ fun_l29_n963
+end
+
+def fun_l28_n412()
+ fun_l29_n16
+end
+
+def fun_l28_n413()
+ fun_l29_n956
+end
+
+def fun_l28_n414()
+ fun_l29_n255
+end
+
+def fun_l28_n415()
+ fun_l29_n309
+end
+
+def fun_l28_n416()
+ fun_l29_n430
+end
+
+def fun_l28_n417()
+ fun_l29_n374
+end
+
+def fun_l28_n418()
+ fun_l29_n559
+end
+
+def fun_l28_n419()
+ fun_l29_n393
+end
+
+def fun_l28_n420()
+ fun_l29_n547
+end
+
+def fun_l28_n421()
+ fun_l29_n500
+end
+
+def fun_l28_n422()
+ fun_l29_n771
+end
+
+def fun_l28_n423()
+ fun_l29_n429
+end
+
+def fun_l28_n424()
+ fun_l29_n839
+end
+
+def fun_l28_n425()
+ fun_l29_n871
+end
+
+def fun_l28_n426()
+ fun_l29_n333
+end
+
+def fun_l28_n427()
+ fun_l29_n652
+end
+
+def fun_l28_n428()
+ fun_l29_n87
+end
+
+def fun_l28_n429()
+ fun_l29_n472
+end
+
+def fun_l28_n430()
+ fun_l29_n911
+end
+
+def fun_l28_n431()
+ fun_l29_n305
+end
+
+def fun_l28_n432()
+ fun_l29_n569
+end
+
+def fun_l28_n433()
+ fun_l29_n869
+end
+
+def fun_l28_n434()
+ fun_l29_n203
+end
+
+def fun_l28_n435()
+ fun_l29_n804
+end
+
+def fun_l28_n436()
+ fun_l29_n878
+end
+
+def fun_l28_n437()
+ fun_l29_n984
+end
+
+def fun_l28_n438()
+ fun_l29_n990
+end
+
+def fun_l28_n439()
+ fun_l29_n860
+end
+
+def fun_l28_n440()
+ fun_l29_n866
+end
+
+def fun_l28_n441()
+ fun_l29_n625
+end
+
+def fun_l28_n442()
+ fun_l29_n534
+end
+
+def fun_l28_n443()
+ fun_l29_n232
+end
+
+def fun_l28_n444()
+ fun_l29_n447
+end
+
+def fun_l28_n445()
+ fun_l29_n958
+end
+
+def fun_l28_n446()
+ fun_l29_n343
+end
+
+def fun_l28_n447()
+ fun_l29_n128
+end
+
+def fun_l28_n448()
+ fun_l29_n760
+end
+
+def fun_l28_n449()
+ fun_l29_n204
+end
+
+def fun_l28_n450()
+ fun_l29_n912
+end
+
+def fun_l28_n451()
+ fun_l29_n395
+end
+
+def fun_l28_n452()
+ fun_l29_n721
+end
+
+def fun_l28_n453()
+ fun_l29_n699
+end
+
+def fun_l28_n454()
+ fun_l29_n950
+end
+
+def fun_l28_n455()
+ fun_l29_n436
+end
+
+def fun_l28_n456()
+ fun_l29_n431
+end
+
+def fun_l28_n457()
+ fun_l29_n644
+end
+
+def fun_l28_n458()
+ fun_l29_n638
+end
+
+def fun_l28_n459()
+ fun_l29_n967
+end
+
+def fun_l28_n460()
+ fun_l29_n83
+end
+
+def fun_l28_n461()
+ fun_l29_n141
+end
+
+def fun_l28_n462()
+ fun_l29_n37
+end
+
+def fun_l28_n463()
+ fun_l29_n485
+end
+
+def fun_l28_n464()
+ fun_l29_n826
+end
+
+def fun_l28_n465()
+ fun_l29_n774
+end
+
+def fun_l28_n466()
+ fun_l29_n561
+end
+
+def fun_l28_n467()
+ fun_l29_n809
+end
+
+def fun_l28_n468()
+ fun_l29_n298
+end
+
+def fun_l28_n469()
+ fun_l29_n367
+end
+
+def fun_l28_n470()
+ fun_l29_n517
+end
+
+def fun_l28_n471()
+ fun_l29_n30
+end
+
+def fun_l28_n472()
+ fun_l29_n970
+end
+
+def fun_l28_n473()
+ fun_l29_n686
+end
+
+def fun_l28_n474()
+ fun_l29_n183
+end
+
+def fun_l28_n475()
+ fun_l29_n176
+end
+
+def fun_l28_n476()
+ fun_l29_n87
+end
+
+def fun_l28_n477()
+ fun_l29_n81
+end
+
+def fun_l28_n478()
+ fun_l29_n836
+end
+
+def fun_l28_n479()
+ fun_l29_n898
+end
+
+def fun_l28_n480()
+ fun_l29_n49
+end
+
+def fun_l28_n481()
+ fun_l29_n468
+end
+
+def fun_l28_n482()
+ fun_l29_n314
+end
+
+def fun_l28_n483()
+ fun_l29_n242
+end
+
+def fun_l28_n484()
+ fun_l29_n647
+end
+
+def fun_l28_n485()
+ fun_l29_n167
+end
+
+def fun_l28_n486()
+ fun_l29_n245
+end
+
+def fun_l28_n487()
+ fun_l29_n723
+end
+
+def fun_l28_n488()
+ fun_l29_n576
+end
+
+def fun_l28_n489()
+ fun_l29_n481
+end
+
+def fun_l28_n490()
+ fun_l29_n154
+end
+
+def fun_l28_n491()
+ fun_l29_n271
+end
+
+def fun_l28_n492()
+ fun_l29_n671
+end
+
+def fun_l28_n493()
+ fun_l29_n70
+end
+
+def fun_l28_n494()
+ fun_l29_n14
+end
+
+def fun_l28_n495()
+ fun_l29_n108
+end
+
+def fun_l28_n496()
+ fun_l29_n464
+end
+
+def fun_l28_n497()
+ fun_l29_n7
+end
+
+def fun_l28_n498()
+ fun_l29_n372
+end
+
+def fun_l28_n499()
+ fun_l29_n202
+end
+
+def fun_l28_n500()
+ fun_l29_n208
+end
+
+def fun_l28_n501()
+ fun_l29_n640
+end
+
+def fun_l28_n502()
+ fun_l29_n977
+end
+
+def fun_l28_n503()
+ fun_l29_n287
+end
+
+def fun_l28_n504()
+ fun_l29_n905
+end
+
+def fun_l28_n505()
+ fun_l29_n847
+end
+
+def fun_l28_n506()
+ fun_l29_n18
+end
+
+def fun_l28_n507()
+ fun_l29_n889
+end
+
+def fun_l28_n508()
+ fun_l29_n527
+end
+
+def fun_l28_n509()
+ fun_l29_n137
+end
+
+def fun_l28_n510()
+ fun_l29_n256
+end
+
+def fun_l28_n511()
+ fun_l29_n449
+end
+
+def fun_l28_n512()
+ fun_l29_n252
+end
+
+def fun_l28_n513()
+ fun_l29_n42
+end
+
+def fun_l28_n514()
+ fun_l29_n398
+end
+
+def fun_l28_n515()
+ fun_l29_n655
+end
+
+def fun_l28_n516()
+ fun_l29_n208
+end
+
+def fun_l28_n517()
+ fun_l29_n883
+end
+
+def fun_l28_n518()
+ fun_l29_n401
+end
+
+def fun_l28_n519()
+ fun_l29_n825
+end
+
+def fun_l28_n520()
+ fun_l29_n380
+end
+
+def fun_l28_n521()
+ fun_l29_n277
+end
+
+def fun_l28_n522()
+ fun_l29_n165
+end
+
+def fun_l28_n523()
+ fun_l29_n373
+end
+
+def fun_l28_n524()
+ fun_l29_n378
+end
+
+def fun_l28_n525()
+ fun_l29_n70
+end
+
+def fun_l28_n526()
+ fun_l29_n975
+end
+
+def fun_l28_n527()
+ fun_l29_n34
+end
+
+def fun_l28_n528()
+ fun_l29_n346
+end
+
+def fun_l28_n529()
+ fun_l29_n322
+end
+
+def fun_l28_n530()
+ fun_l29_n429
+end
+
+def fun_l28_n531()
+ fun_l29_n20
+end
+
+def fun_l28_n532()
+ fun_l29_n155
+end
+
+def fun_l28_n533()
+ fun_l29_n896
+end
+
+def fun_l28_n534()
+ fun_l29_n860
+end
+
+def fun_l28_n535()
+ fun_l29_n602
+end
+
+def fun_l28_n536()
+ fun_l29_n573
+end
+
+def fun_l28_n537()
+ fun_l29_n448
+end
+
+def fun_l28_n538()
+ fun_l29_n637
+end
+
+def fun_l28_n539()
+ fun_l29_n890
+end
+
+def fun_l28_n540()
+ fun_l29_n200
+end
+
+def fun_l28_n541()
+ fun_l29_n405
+end
+
+def fun_l28_n542()
+ fun_l29_n656
+end
+
+def fun_l28_n543()
+ fun_l29_n974
+end
+
+def fun_l28_n544()
+ fun_l29_n711
+end
+
+def fun_l28_n545()
+ fun_l29_n206
+end
+
+def fun_l28_n546()
+ fun_l29_n677
+end
+
+def fun_l28_n547()
+ fun_l29_n125
+end
+
+def fun_l28_n548()
+ fun_l29_n576
+end
+
+def fun_l28_n549()
+ fun_l29_n923
+end
+
+def fun_l28_n550()
+ fun_l29_n86
+end
+
+def fun_l28_n551()
+ fun_l29_n827
+end
+
+def fun_l28_n552()
+ fun_l29_n76
+end
+
+def fun_l28_n553()
+ fun_l29_n143
+end
+
+def fun_l28_n554()
+ fun_l29_n435
+end
+
+def fun_l28_n555()
+ fun_l29_n75
+end
+
+def fun_l28_n556()
+ fun_l29_n23
+end
+
+def fun_l28_n557()
+ fun_l29_n658
+end
+
+def fun_l28_n558()
+ fun_l29_n814
+end
+
+def fun_l28_n559()
+ fun_l29_n833
+end
+
+def fun_l28_n560()
+ fun_l29_n101
+end
+
+def fun_l28_n561()
+ fun_l29_n513
+end
+
+def fun_l28_n562()
+ fun_l29_n43
+end
+
+def fun_l28_n563()
+ fun_l29_n576
+end
+
+def fun_l28_n564()
+ fun_l29_n131
+end
+
+def fun_l28_n565()
+ fun_l29_n920
+end
+
+def fun_l28_n566()
+ fun_l29_n299
+end
+
+def fun_l28_n567()
+ fun_l29_n216
+end
+
+def fun_l28_n568()
+ fun_l29_n547
+end
+
+def fun_l28_n569()
+ fun_l29_n728
+end
+
+def fun_l28_n570()
+ fun_l29_n349
+end
+
+def fun_l28_n571()
+ fun_l29_n927
+end
+
+def fun_l28_n572()
+ fun_l29_n328
+end
+
+def fun_l28_n573()
+ fun_l29_n790
+end
+
+def fun_l28_n574()
+ fun_l29_n397
+end
+
+def fun_l28_n575()
+ fun_l29_n423
+end
+
+def fun_l28_n576()
+ fun_l29_n867
+end
+
+def fun_l28_n577()
+ fun_l29_n529
+end
+
+def fun_l28_n578()
+ fun_l29_n825
+end
+
+def fun_l28_n579()
+ fun_l29_n51
+end
+
+def fun_l28_n580()
+ fun_l29_n482
+end
+
+def fun_l28_n581()
+ fun_l29_n395
+end
+
+def fun_l28_n582()
+ fun_l29_n771
+end
+
+def fun_l28_n583()
+ fun_l29_n118
+end
+
+def fun_l28_n584()
+ fun_l29_n348
+end
+
+def fun_l28_n585()
+ fun_l29_n895
+end
+
+def fun_l28_n586()
+ fun_l29_n956
+end
+
+def fun_l28_n587()
+ fun_l29_n251
+end
+
+def fun_l28_n588()
+ fun_l29_n216
+end
+
+def fun_l28_n589()
+ fun_l29_n837
+end
+
+def fun_l28_n590()
+ fun_l29_n956
+end
+
+def fun_l28_n591()
+ fun_l29_n309
+end
+
+def fun_l28_n592()
+ fun_l29_n706
+end
+
+def fun_l28_n593()
+ fun_l29_n58
+end
+
+def fun_l28_n594()
+ fun_l29_n244
+end
+
+def fun_l28_n595()
+ fun_l29_n281
+end
+
+def fun_l28_n596()
+ fun_l29_n748
+end
+
+def fun_l28_n597()
+ fun_l29_n109
+end
+
+def fun_l28_n598()
+ fun_l29_n730
+end
+
+def fun_l28_n599()
+ fun_l29_n590
+end
+
+def fun_l28_n600()
+ fun_l29_n331
+end
+
+def fun_l28_n601()
+ fun_l29_n700
+end
+
+def fun_l28_n602()
+ fun_l29_n606
+end
+
+def fun_l28_n603()
+ fun_l29_n331
+end
+
+def fun_l28_n604()
+ fun_l29_n695
+end
+
+def fun_l28_n605()
+ fun_l29_n355
+end
+
+def fun_l28_n606()
+ fun_l29_n449
+end
+
+def fun_l28_n607()
+ fun_l29_n728
+end
+
+def fun_l28_n608()
+ fun_l29_n248
+end
+
+def fun_l28_n609()
+ fun_l29_n949
+end
+
+def fun_l28_n610()
+ fun_l29_n473
+end
+
+def fun_l28_n611()
+ fun_l29_n244
+end
+
+def fun_l28_n612()
+ fun_l29_n790
+end
+
+def fun_l28_n613()
+ fun_l29_n983
+end
+
+def fun_l28_n614()
+ fun_l29_n76
+end
+
+def fun_l28_n615()
+ fun_l29_n792
+end
+
+def fun_l28_n616()
+ fun_l29_n195
+end
+
+def fun_l28_n617()
+ fun_l29_n559
+end
+
+def fun_l28_n618()
+ fun_l29_n269
+end
+
+def fun_l28_n619()
+ fun_l29_n152
+end
+
+def fun_l28_n620()
+ fun_l29_n507
+end
+
+def fun_l28_n621()
+ fun_l29_n165
+end
+
+def fun_l28_n622()
+ fun_l29_n779
+end
+
+def fun_l28_n623()
+ fun_l29_n182
+end
+
+def fun_l28_n624()
+ fun_l29_n76
+end
+
+def fun_l28_n625()
+ fun_l29_n585
+end
+
+def fun_l28_n626()
+ fun_l29_n943
+end
+
+def fun_l28_n627()
+ fun_l29_n25
+end
+
+def fun_l28_n628()
+ fun_l29_n200
+end
+
+def fun_l28_n629()
+ fun_l29_n590
+end
+
+def fun_l28_n630()
+ fun_l29_n631
+end
+
+def fun_l28_n631()
+ fun_l29_n610
+end
+
+def fun_l28_n632()
+ fun_l29_n197
+end
+
+def fun_l28_n633()
+ fun_l29_n608
+end
+
+def fun_l28_n634()
+ fun_l29_n585
+end
+
+def fun_l28_n635()
+ fun_l29_n987
+end
+
+def fun_l28_n636()
+ fun_l29_n440
+end
+
+def fun_l28_n637()
+ fun_l29_n808
+end
+
+def fun_l28_n638()
+ fun_l29_n208
+end
+
+def fun_l28_n639()
+ fun_l29_n382
+end
+
+def fun_l28_n640()
+ fun_l29_n631
+end
+
+def fun_l28_n641()
+ fun_l29_n107
+end
+
+def fun_l28_n642()
+ fun_l29_n682
+end
+
+def fun_l28_n643()
+ fun_l29_n57
+end
+
+def fun_l28_n644()
+ fun_l29_n375
+end
+
+def fun_l28_n645()
+ fun_l29_n855
+end
+
+def fun_l28_n646()
+ fun_l29_n200
+end
+
+def fun_l28_n647()
+ fun_l29_n820
+end
+
+def fun_l28_n648()
+ fun_l29_n363
+end
+
+def fun_l28_n649()
+ fun_l29_n991
+end
+
+def fun_l28_n650()
+ fun_l29_n342
+end
+
+def fun_l28_n651()
+ fun_l29_n740
+end
+
+def fun_l28_n652()
+ fun_l29_n646
+end
+
+def fun_l28_n653()
+ fun_l29_n743
+end
+
+def fun_l28_n654()
+ fun_l29_n438
+end
+
+def fun_l28_n655()
+ fun_l29_n198
+end
+
+def fun_l28_n656()
+ fun_l29_n45
+end
+
+def fun_l28_n657()
+ fun_l29_n54
+end
+
+def fun_l28_n658()
+ fun_l29_n5
+end
+
+def fun_l28_n659()
+ fun_l29_n30
+end
+
+def fun_l28_n660()
+ fun_l29_n77
+end
+
+def fun_l28_n661()
+ fun_l29_n231
+end
+
+def fun_l28_n662()
+ fun_l29_n515
+end
+
+def fun_l28_n663()
+ fun_l29_n327
+end
+
+def fun_l28_n664()
+ fun_l29_n188
+end
+
+def fun_l28_n665()
+ fun_l29_n976
+end
+
+def fun_l28_n666()
+ fun_l29_n482
+end
+
+def fun_l28_n667()
+ fun_l29_n106
+end
+
+def fun_l28_n668()
+ fun_l29_n339
+end
+
+def fun_l28_n669()
+ fun_l29_n445
+end
+
+def fun_l28_n670()
+ fun_l29_n708
+end
+
+def fun_l28_n671()
+ fun_l29_n846
+end
+
+def fun_l28_n672()
+ fun_l29_n142
+end
+
+def fun_l28_n673()
+ fun_l29_n567
+end
+
+def fun_l28_n674()
+ fun_l29_n875
+end
+
+def fun_l28_n675()
+ fun_l29_n107
+end
+
+def fun_l28_n676()
+ fun_l29_n243
+end
+
+def fun_l28_n677()
+ fun_l29_n580
+end
+
+def fun_l28_n678()
+ fun_l29_n75
+end
+
+def fun_l28_n679()
+ fun_l29_n230
+end
+
+def fun_l28_n680()
+ fun_l29_n72
+end
+
+def fun_l28_n681()
+ fun_l29_n429
+end
+
+def fun_l28_n682()
+ fun_l29_n816
+end
+
+def fun_l28_n683()
+ fun_l29_n896
+end
+
+def fun_l28_n684()
+ fun_l29_n933
+end
+
+def fun_l28_n685()
+ fun_l29_n432
+end
+
+def fun_l28_n686()
+ fun_l29_n547
+end
+
+def fun_l28_n687()
+ fun_l29_n670
+end
+
+def fun_l28_n688()
+ fun_l29_n952
+end
+
+def fun_l28_n689()
+ fun_l29_n137
+end
+
+def fun_l28_n690()
+ fun_l29_n532
+end
+
+def fun_l28_n691()
+ fun_l29_n608
+end
+
+def fun_l28_n692()
+ fun_l29_n264
+end
+
+def fun_l28_n693()
+ fun_l29_n220
+end
+
+def fun_l28_n694()
+ fun_l29_n499
+end
+
+def fun_l28_n695()
+ fun_l29_n244
+end
+
+def fun_l28_n696()
+ fun_l29_n952
+end
+
+def fun_l28_n697()
+ fun_l29_n700
+end
+
+def fun_l28_n698()
+ fun_l29_n415
+end
+
+def fun_l28_n699()
+ fun_l29_n712
+end
+
+def fun_l28_n700()
+ fun_l29_n209
+end
+
+def fun_l28_n701()
+ fun_l29_n759
+end
+
+def fun_l28_n702()
+ fun_l29_n786
+end
+
+def fun_l28_n703()
+ fun_l29_n858
+end
+
+def fun_l28_n704()
+ fun_l29_n328
+end
+
+def fun_l28_n705()
+ fun_l29_n201
+end
+
+def fun_l28_n706()
+ fun_l29_n317
+end
+
+def fun_l28_n707()
+ fun_l29_n335
+end
+
+def fun_l28_n708()
+ fun_l29_n483
+end
+
+def fun_l28_n709()
+ fun_l29_n1
+end
+
+def fun_l28_n710()
+ fun_l29_n962
+end
+
+def fun_l28_n711()
+ fun_l29_n158
+end
+
+def fun_l28_n712()
+ fun_l29_n591
+end
+
+def fun_l28_n713()
+ fun_l29_n849
+end
+
+def fun_l28_n714()
+ fun_l29_n149
+end
+
+def fun_l28_n715()
+ fun_l29_n653
+end
+
+def fun_l28_n716()
+ fun_l29_n173
+end
+
+def fun_l28_n717()
+ fun_l29_n21
+end
+
+def fun_l28_n718()
+ fun_l29_n384
+end
+
+def fun_l28_n719()
+ fun_l29_n601
+end
+
+def fun_l28_n720()
+ fun_l29_n388
+end
+
+def fun_l28_n721()
+ fun_l29_n866
+end
+
+def fun_l28_n722()
+ fun_l29_n261
+end
+
+def fun_l28_n723()
+ fun_l29_n412
+end
+
+def fun_l28_n724()
+ fun_l29_n77
+end
+
+def fun_l28_n725()
+ fun_l29_n395
+end
+
+def fun_l28_n726()
+ fun_l29_n863
+end
+
+def fun_l28_n727()
+ fun_l29_n780
+end
+
+def fun_l28_n728()
+ fun_l29_n400
+end
+
+def fun_l28_n729()
+ fun_l29_n495
+end
+
+def fun_l28_n730()
+ fun_l29_n813
+end
+
+def fun_l28_n731()
+ fun_l29_n330
+end
+
+def fun_l28_n732()
+ fun_l29_n479
+end
+
+def fun_l28_n733()
+ fun_l29_n446
+end
+
+def fun_l28_n734()
+ fun_l29_n354
+end
+
+def fun_l28_n735()
+ fun_l29_n88
+end
+
+def fun_l28_n736()
+ fun_l29_n296
+end
+
+def fun_l28_n737()
+ fun_l29_n457
+end
+
+def fun_l28_n738()
+ fun_l29_n611
+end
+
+def fun_l28_n739()
+ fun_l29_n412
+end
+
+def fun_l28_n740()
+ fun_l29_n290
+end
+
+def fun_l28_n741()
+ fun_l29_n935
+end
+
+def fun_l28_n742()
+ fun_l29_n833
+end
+
+def fun_l28_n743()
+ fun_l29_n296
+end
+
+def fun_l28_n744()
+ fun_l29_n249
+end
+
+def fun_l28_n745()
+ fun_l29_n567
+end
+
+def fun_l28_n746()
+ fun_l29_n707
+end
+
+def fun_l28_n747()
+ fun_l29_n633
+end
+
+def fun_l28_n748()
+ fun_l29_n303
+end
+
+def fun_l28_n749()
+ fun_l29_n971
+end
+
+def fun_l28_n750()
+ fun_l29_n784
+end
+
+def fun_l28_n751()
+ fun_l29_n88
+end
+
+def fun_l28_n752()
+ fun_l29_n782
+end
+
+def fun_l28_n753()
+ fun_l29_n322
+end
+
+def fun_l28_n754()
+ fun_l29_n362
+end
+
+def fun_l28_n755()
+ fun_l29_n894
+end
+
+def fun_l28_n756()
+ fun_l29_n848
+end
+
+def fun_l28_n757()
+ fun_l29_n617
+end
+
+def fun_l28_n758()
+ fun_l29_n103
+end
+
+def fun_l28_n759()
+ fun_l29_n625
+end
+
+def fun_l28_n760()
+ fun_l29_n592
+end
+
+def fun_l28_n761()
+ fun_l29_n597
+end
+
+def fun_l28_n762()
+ fun_l29_n118
+end
+
+def fun_l28_n763()
+ fun_l29_n366
+end
+
+def fun_l28_n764()
+ fun_l29_n609
+end
+
+def fun_l28_n765()
+ fun_l29_n710
+end
+
+def fun_l28_n766()
+ fun_l29_n563
+end
+
+def fun_l28_n767()
+ fun_l29_n324
+end
+
+def fun_l28_n768()
+ fun_l29_n783
+end
+
+def fun_l28_n769()
+ fun_l29_n512
+end
+
+def fun_l28_n770()
+ fun_l29_n0
+end
+
+def fun_l28_n771()
+ fun_l29_n60
+end
+
+def fun_l28_n772()
+ fun_l29_n18
+end
+
+def fun_l28_n773()
+ fun_l29_n741
+end
+
+def fun_l28_n774()
+ fun_l29_n862
+end
+
+def fun_l28_n775()
+ fun_l29_n183
+end
+
+def fun_l28_n776()
+ fun_l29_n148
+end
+
+def fun_l28_n777()
+ fun_l29_n703
+end
+
+def fun_l28_n778()
+ fun_l29_n251
+end
+
+def fun_l28_n779()
+ fun_l29_n84
+end
+
+def fun_l28_n780()
+ fun_l29_n85
+end
+
+def fun_l28_n781()
+ fun_l29_n632
+end
+
+def fun_l28_n782()
+ fun_l29_n28
+end
+
+def fun_l28_n783()
+ fun_l29_n123
+end
+
+def fun_l28_n784()
+ fun_l29_n66
+end
+
+def fun_l28_n785()
+ fun_l29_n266
+end
+
+def fun_l28_n786()
+ fun_l29_n860
+end
+
+def fun_l28_n787()
+ fun_l29_n769
+end
+
+def fun_l28_n788()
+ fun_l29_n921
+end
+
+def fun_l28_n789()
+ fun_l29_n513
+end
+
+def fun_l28_n790()
+ fun_l29_n455
+end
+
+def fun_l28_n791()
+ fun_l29_n589
+end
+
+def fun_l28_n792()
+ fun_l29_n557
+end
+
+def fun_l28_n793()
+ fun_l29_n827
+end
+
+def fun_l28_n794()
+ fun_l29_n561
+end
+
+def fun_l28_n795()
+ fun_l29_n891
+end
+
+def fun_l28_n796()
+ fun_l29_n938
+end
+
+def fun_l28_n797()
+ fun_l29_n157
+end
+
+def fun_l28_n798()
+ fun_l29_n691
+end
+
+def fun_l28_n799()
+ fun_l29_n20
+end
+
+def fun_l28_n800()
+ fun_l29_n737
+end
+
+def fun_l28_n801()
+ fun_l29_n675
+end
+
+def fun_l28_n802()
+ fun_l29_n385
+end
+
+def fun_l28_n803()
+ fun_l29_n206
+end
+
+def fun_l28_n804()
+ fun_l29_n366
+end
+
+def fun_l28_n805()
+ fun_l29_n107
+end
+
+def fun_l28_n806()
+ fun_l29_n425
+end
+
+def fun_l28_n807()
+ fun_l29_n371
+end
+
+def fun_l28_n808()
+ fun_l29_n241
+end
+
+def fun_l28_n809()
+ fun_l29_n168
+end
+
+def fun_l28_n810()
+ fun_l29_n201
+end
+
+def fun_l28_n811()
+ fun_l29_n600
+end
+
+def fun_l28_n812()
+ fun_l29_n251
+end
+
+def fun_l28_n813()
+ fun_l29_n10
+end
+
+def fun_l28_n814()
+ fun_l29_n428
+end
+
+def fun_l28_n815()
+ fun_l29_n850
+end
+
+def fun_l28_n816()
+ fun_l29_n276
+end
+
+def fun_l28_n817()
+ fun_l29_n196
+end
+
+def fun_l28_n818()
+ fun_l29_n623
+end
+
+def fun_l28_n819()
+ fun_l29_n441
+end
+
+def fun_l28_n820()
+ fun_l29_n724
+end
+
+def fun_l28_n821()
+ fun_l29_n958
+end
+
+def fun_l28_n822()
+ fun_l29_n449
+end
+
+def fun_l28_n823()
+ fun_l29_n408
+end
+
+def fun_l28_n824()
+ fun_l29_n74
+end
+
+def fun_l28_n825()
+ fun_l29_n124
+end
+
+def fun_l28_n826()
+ fun_l29_n991
+end
+
+def fun_l28_n827()
+ fun_l29_n576
+end
+
+def fun_l28_n828()
+ fun_l29_n743
+end
+
+def fun_l28_n829()
+ fun_l29_n343
+end
+
+def fun_l28_n830()
+ fun_l29_n376
+end
+
+def fun_l28_n831()
+ fun_l29_n216
+end
+
+def fun_l28_n832()
+ fun_l29_n358
+end
+
+def fun_l28_n833()
+ fun_l29_n567
+end
+
+def fun_l28_n834()
+ fun_l29_n415
+end
+
+def fun_l28_n835()
+ fun_l29_n984
+end
+
+def fun_l28_n836()
+ fun_l29_n367
+end
+
+def fun_l28_n837()
+ fun_l29_n299
+end
+
+def fun_l28_n838()
+ fun_l29_n718
+end
+
+def fun_l28_n839()
+ fun_l29_n241
+end
+
+def fun_l28_n840()
+ fun_l29_n736
+end
+
+def fun_l28_n841()
+ fun_l29_n582
+end
+
+def fun_l28_n842()
+ fun_l29_n994
+end
+
+def fun_l28_n843()
+ fun_l29_n301
+end
+
+def fun_l28_n844()
+ fun_l29_n597
+end
+
+def fun_l28_n845()
+ fun_l29_n141
+end
+
+def fun_l28_n846()
+ fun_l29_n37
+end
+
+def fun_l28_n847()
+ fun_l29_n216
+end
+
+def fun_l28_n848()
+ fun_l29_n286
+end
+
+def fun_l28_n849()
+ fun_l29_n607
+end
+
+def fun_l28_n850()
+ fun_l29_n503
+end
+
+def fun_l28_n851()
+ fun_l29_n321
+end
+
+def fun_l28_n852()
+ fun_l29_n179
+end
+
+def fun_l28_n853()
+ fun_l29_n802
+end
+
+def fun_l28_n854()
+ fun_l29_n742
+end
+
+def fun_l28_n855()
+ fun_l29_n300
+end
+
+def fun_l28_n856()
+ fun_l29_n453
+end
+
+def fun_l28_n857()
+ fun_l29_n520
+end
+
+def fun_l28_n858()
+ fun_l29_n911
+end
+
+def fun_l28_n859()
+ fun_l29_n209
+end
+
+def fun_l28_n860()
+ fun_l29_n921
+end
+
+def fun_l28_n861()
+ fun_l29_n653
+end
+
+def fun_l28_n862()
+ fun_l29_n347
+end
+
+def fun_l28_n863()
+ fun_l29_n733
+end
+
+def fun_l28_n864()
+ fun_l29_n824
+end
+
+def fun_l28_n865()
+ fun_l29_n497
+end
+
+def fun_l28_n866()
+ fun_l29_n256
+end
+
+def fun_l28_n867()
+ fun_l29_n884
+end
+
+def fun_l28_n868()
+ fun_l29_n937
+end
+
+def fun_l28_n869()
+ fun_l29_n894
+end
+
+def fun_l28_n870()
+ fun_l29_n258
+end
+
+def fun_l28_n871()
+ fun_l29_n45
+end
+
+def fun_l28_n872()
+ fun_l29_n640
+end
+
+def fun_l28_n873()
+ fun_l29_n909
+end
+
+def fun_l28_n874()
+ fun_l29_n586
+end
+
+def fun_l28_n875()
+ fun_l29_n600
+end
+
+def fun_l28_n876()
+ fun_l29_n636
+end
+
+def fun_l28_n877()
+ fun_l29_n972
+end
+
+def fun_l28_n878()
+ fun_l29_n627
+end
+
+def fun_l28_n879()
+ fun_l29_n381
+end
+
+def fun_l28_n880()
+ fun_l29_n664
+end
+
+def fun_l28_n881()
+ fun_l29_n350
+end
+
+def fun_l28_n882()
+ fun_l29_n611
+end
+
+def fun_l28_n883()
+ fun_l29_n355
+end
+
+def fun_l28_n884()
+ fun_l29_n945
+end
+
+def fun_l28_n885()
+ fun_l29_n462
+end
+
+def fun_l28_n886()
+ fun_l29_n723
+end
+
+def fun_l28_n887()
+ fun_l29_n500
+end
+
+def fun_l28_n888()
+ fun_l29_n166
+end
+
+def fun_l28_n889()
+ fun_l29_n779
+end
+
+def fun_l28_n890()
+ fun_l29_n151
+end
+
+def fun_l28_n891()
+ fun_l29_n757
+end
+
+def fun_l28_n892()
+ fun_l29_n782
+end
+
+def fun_l28_n893()
+ fun_l29_n108
+end
+
+def fun_l28_n894()
+ fun_l29_n122
+end
+
+def fun_l28_n895()
+ fun_l29_n815
+end
+
+def fun_l28_n896()
+ fun_l29_n742
+end
+
+def fun_l28_n897()
+ fun_l29_n861
+end
+
+def fun_l28_n898()
+ fun_l29_n738
+end
+
+def fun_l28_n899()
+ fun_l29_n765
+end
+
+def fun_l28_n900()
+ fun_l29_n648
+end
+
+def fun_l28_n901()
+ fun_l29_n923
+end
+
+def fun_l28_n902()
+ fun_l29_n269
+end
+
+def fun_l28_n903()
+ fun_l29_n626
+end
+
+def fun_l28_n904()
+ fun_l29_n100
+end
+
+def fun_l28_n905()
+ fun_l29_n587
+end
+
+def fun_l28_n906()
+ fun_l29_n841
+end
+
+def fun_l28_n907()
+ fun_l29_n239
+end
+
+def fun_l28_n908()
+ fun_l29_n87
+end
+
+def fun_l28_n909()
+ fun_l29_n765
+end
+
+def fun_l28_n910()
+ fun_l29_n216
+end
+
+def fun_l28_n911()
+ fun_l29_n110
+end
+
+def fun_l28_n912()
+ fun_l29_n96
+end
+
+def fun_l28_n913()
+ fun_l29_n946
+end
+
+def fun_l28_n914()
+ fun_l29_n762
+end
+
+def fun_l28_n915()
+ fun_l29_n697
+end
+
+def fun_l28_n916()
+ fun_l29_n44
+end
+
+def fun_l28_n917()
+ fun_l29_n257
+end
+
+def fun_l28_n918()
+ fun_l29_n195
+end
+
+def fun_l28_n919()
+ fun_l29_n886
+end
+
+def fun_l28_n920()
+ fun_l29_n432
+end
+
+def fun_l28_n921()
+ fun_l29_n746
+end
+
+def fun_l28_n922()
+ fun_l29_n756
+end
+
+def fun_l28_n923()
+ fun_l29_n33
+end
+
+def fun_l28_n924()
+ fun_l29_n720
+end
+
+def fun_l28_n925()
+ fun_l29_n629
+end
+
+def fun_l28_n926()
+ fun_l29_n144
+end
+
+def fun_l28_n927()
+ fun_l29_n225
+end
+
+def fun_l28_n928()
+ fun_l29_n556
+end
+
+def fun_l28_n929()
+ fun_l29_n436
+end
+
+def fun_l28_n930()
+ fun_l29_n380
+end
+
+def fun_l28_n931()
+ fun_l29_n478
+end
+
+def fun_l28_n932()
+ fun_l29_n949
+end
+
+def fun_l28_n933()
+ fun_l29_n811
+end
+
+def fun_l28_n934()
+ fun_l29_n589
+end
+
+def fun_l28_n935()
+ fun_l29_n961
+end
+
+def fun_l28_n936()
+ fun_l29_n413
+end
+
+def fun_l28_n937()
+ fun_l29_n941
+end
+
+def fun_l28_n938()
+ fun_l29_n507
+end
+
+def fun_l28_n939()
+ fun_l29_n364
+end
+
+def fun_l28_n940()
+ fun_l29_n100
+end
+
+def fun_l28_n941()
+ fun_l29_n254
+end
+
+def fun_l28_n942()
+ fun_l29_n272
+end
+
+def fun_l28_n943()
+ fun_l29_n420
+end
+
+def fun_l28_n944()
+ fun_l29_n132
+end
+
+def fun_l28_n945()
+ fun_l29_n907
+end
+
+def fun_l28_n946()
+ fun_l29_n784
+end
+
+def fun_l28_n947()
+ fun_l29_n938
+end
+
+def fun_l28_n948()
+ fun_l29_n780
+end
+
+def fun_l28_n949()
+ fun_l29_n584
+end
+
+def fun_l28_n950()
+ fun_l29_n258
+end
+
+def fun_l28_n951()
+ fun_l29_n754
+end
+
+def fun_l28_n952()
+ fun_l29_n582
+end
+
+def fun_l28_n953()
+ fun_l29_n278
+end
+
+def fun_l28_n954()
+ fun_l29_n870
+end
+
+def fun_l28_n955()
+ fun_l29_n664
+end
+
+def fun_l28_n956()
+ fun_l29_n375
+end
+
+def fun_l28_n957()
+ fun_l29_n613
+end
+
+def fun_l28_n958()
+ fun_l29_n530
+end
+
+def fun_l28_n959()
+ fun_l29_n933
+end
+
+def fun_l28_n960()
+ fun_l29_n298
+end
+
+def fun_l28_n961()
+ fun_l29_n507
+end
+
+def fun_l28_n962()
+ fun_l29_n526
+end
+
+def fun_l28_n963()
+ fun_l29_n508
+end
+
+def fun_l28_n964()
+ fun_l29_n227
+end
+
+def fun_l28_n965()
+ fun_l29_n999
+end
+
+def fun_l28_n966()
+ fun_l29_n489
+end
+
+def fun_l28_n967()
+ fun_l29_n789
+end
+
+def fun_l28_n968()
+ fun_l29_n304
+end
+
+def fun_l28_n969()
+ fun_l29_n343
+end
+
+def fun_l28_n970()
+ fun_l29_n560
+end
+
+def fun_l28_n971()
+ fun_l29_n610
+end
+
+def fun_l28_n972()
+ fun_l29_n606
+end
+
+def fun_l28_n973()
+ fun_l29_n592
+end
+
+def fun_l28_n974()
+ fun_l29_n135
+end
+
+def fun_l28_n975()
+ fun_l29_n513
+end
+
+def fun_l28_n976()
+ fun_l29_n522
+end
+
+def fun_l28_n977()
+ fun_l29_n323
+end
+
+def fun_l28_n978()
+ fun_l29_n26
+end
+
+def fun_l28_n979()
+ fun_l29_n737
+end
+
+def fun_l28_n980()
+ fun_l29_n705
+end
+
+def fun_l28_n981()
+ fun_l29_n405
+end
+
+def fun_l28_n982()
+ fun_l29_n891
+end
+
+def fun_l28_n983()
+ fun_l29_n155
+end
+
+def fun_l28_n984()
+ fun_l29_n814
+end
+
+def fun_l28_n985()
+ fun_l29_n70
+end
+
+def fun_l28_n986()
+ fun_l29_n940
+end
+
+def fun_l28_n987()
+ fun_l29_n427
+end
+
+def fun_l28_n988()
+ fun_l29_n478
+end
+
+def fun_l28_n989()
+ fun_l29_n432
+end
+
+def fun_l28_n990()
+ fun_l29_n320
+end
+
+def fun_l28_n991()
+ fun_l29_n422
+end
+
+def fun_l28_n992()
+ fun_l29_n917
+end
+
+def fun_l28_n993()
+ fun_l29_n391
+end
+
+def fun_l28_n994()
+ fun_l29_n950
+end
+
+def fun_l28_n995()
+ fun_l29_n635
+end
+
+def fun_l28_n996()
+ fun_l29_n392
+end
+
+def fun_l28_n997()
+ fun_l29_n311
+end
+
+def fun_l28_n998()
+ fun_l29_n320
+end
+
+def fun_l28_n999()
+ fun_l29_n916
+end
+
+def fun_l29_n0()
+ inc
+end
+
+def fun_l29_n1()
+ inc
+end
+
+def fun_l29_n2()
+ inc
+end
+
+def fun_l29_n3()
+ inc
+end
+
+def fun_l29_n4()
+ inc
+end
+
+def fun_l29_n5()
+ inc
+end
+
+def fun_l29_n6()
+ inc
+end
+
+def fun_l29_n7()
+ inc
+end
+
+def fun_l29_n8()
+ inc
+end
+
+def fun_l29_n9()
+ inc
+end
+
+def fun_l29_n10()
+ inc
+end
+
+def fun_l29_n11()
+ inc
+end
+
+def fun_l29_n12()
+ inc
+end
+
+def fun_l29_n13()
+ inc
+end
+
+def fun_l29_n14()
+ inc
+end
+
+def fun_l29_n15()
+ inc
+end
+
+def fun_l29_n16()
+ inc
+end
+
+def fun_l29_n17()
+ inc
+end
+
+def fun_l29_n18()
+ inc
+end
+
+def fun_l29_n19()
+ inc
+end
+
+def fun_l29_n20()
+ inc
+end
+
+def fun_l29_n21()
+ inc
+end
+
+def fun_l29_n22()
+ inc
+end
+
+def fun_l29_n23()
+ inc
+end
+
+def fun_l29_n24()
+ inc
+end
+
+def fun_l29_n25()
+ inc
+end
+
+def fun_l29_n26()
+ inc
+end
+
+def fun_l29_n27()
+ inc
+end
+
+def fun_l29_n28()
+ inc
+end
+
+def fun_l29_n29()
+ inc
+end
+
+def fun_l29_n30()
+ inc
+end
+
+def fun_l29_n31()
+ inc
+end
+
+def fun_l29_n32()
+ inc
+end
+
+def fun_l29_n33()
+ inc
+end
+
+def fun_l29_n34()
+ inc
+end
+
+def fun_l29_n35()
+ inc
+end
+
+def fun_l29_n36()
+ inc
+end
+
+def fun_l29_n37()
+ inc
+end
+
+def fun_l29_n38()
+ inc
+end
+
+def fun_l29_n39()
+ inc
+end
+
+def fun_l29_n40()
+ inc
+end
+
+def fun_l29_n41()
+ inc
+end
+
+def fun_l29_n42()
+ inc
+end
+
+def fun_l29_n43()
+ inc
+end
+
+def fun_l29_n44()
+ inc
+end
+
+def fun_l29_n45()
+ inc
+end
+
+def fun_l29_n46()
+ inc
+end
+
+def fun_l29_n47()
+ inc
+end
+
+def fun_l29_n48()
+ inc
+end
+
+def fun_l29_n49()
+ inc
+end
+
+def fun_l29_n50()
+ inc
+end
+
+def fun_l29_n51()
+ inc
+end
+
+def fun_l29_n52()
+ inc
+end
+
+def fun_l29_n53()
+ inc
+end
+
+def fun_l29_n54()
+ inc
+end
+
+def fun_l29_n55()
+ inc
+end
+
+def fun_l29_n56()
+ inc
+end
+
+def fun_l29_n57()
+ inc
+end
+
+def fun_l29_n58()
+ inc
+end
+
+def fun_l29_n59()
+ inc
+end
+
+def fun_l29_n60()
+ inc
+end
+
+def fun_l29_n61()
+ inc
+end
+
+def fun_l29_n62()
+ inc
+end
+
+def fun_l29_n63()
+ inc
+end
+
+def fun_l29_n64()
+ inc
+end
+
+def fun_l29_n65()
+ inc
+end
+
+def fun_l29_n66()
+ inc
+end
+
+def fun_l29_n67()
+ inc
+end
+
+def fun_l29_n68()
+ inc
+end
+
+def fun_l29_n69()
+ inc
+end
+
+def fun_l29_n70()
+ inc
+end
+
+def fun_l29_n71()
+ inc
+end
+
+def fun_l29_n72()
+ inc
+end
+
+def fun_l29_n73()
+ inc
+end
+
+def fun_l29_n74()
+ inc
+end
+
+def fun_l29_n75()
+ inc
+end
+
+def fun_l29_n76()
+ inc
+end
+
+def fun_l29_n77()
+ inc
+end
+
+def fun_l29_n78()
+ inc
+end
+
+def fun_l29_n79()
+ inc
+end
+
+def fun_l29_n80()
+ inc
+end
+
+def fun_l29_n81()
+ inc
+end
+
+def fun_l29_n82()
+ inc
+end
+
+def fun_l29_n83()
+ inc
+end
+
+def fun_l29_n84()
+ inc
+end
+
+def fun_l29_n85()
+ inc
+end
+
+def fun_l29_n86()
+ inc
+end
+
+def fun_l29_n87()
+ inc
+end
+
+def fun_l29_n88()
+ inc
+end
+
+def fun_l29_n89()
+ inc
+end
+
+def fun_l29_n90()
+ inc
+end
+
+def fun_l29_n91()
+ inc
+end
+
+def fun_l29_n92()
+ inc
+end
+
+def fun_l29_n93()
+ inc
+end
+
+def fun_l29_n94()
+ inc
+end
+
+def fun_l29_n95()
+ inc
+end
+
+def fun_l29_n96()
+ inc
+end
+
+def fun_l29_n97()
+ inc
+end
+
+def fun_l29_n98()
+ inc
+end
+
+def fun_l29_n99()
+ inc
+end
+
+def fun_l29_n100()
+ inc
+end
+
+def fun_l29_n101()
+ inc
+end
+
+def fun_l29_n102()
+ inc
+end
+
+def fun_l29_n103()
+ inc
+end
+
+def fun_l29_n104()
+ inc
+end
+
+def fun_l29_n105()
+ inc
+end
+
+def fun_l29_n106()
+ inc
+end
+
+def fun_l29_n107()
+ inc
+end
+
+def fun_l29_n108()
+ inc
+end
+
+def fun_l29_n109()
+ inc
+end
+
+def fun_l29_n110()
+ inc
+end
+
+def fun_l29_n111()
+ inc
+end
+
+def fun_l29_n112()
+ inc
+end
+
+def fun_l29_n113()
+ inc
+end
+
+def fun_l29_n114()
+ inc
+end
+
+def fun_l29_n115()
+ inc
+end
+
+def fun_l29_n116()
+ inc
+end
+
+def fun_l29_n117()
+ inc
+end
+
+def fun_l29_n118()
+ inc
+end
+
+def fun_l29_n119()
+ inc
+end
+
+def fun_l29_n120()
+ inc
+end
+
+def fun_l29_n121()
+ inc
+end
+
+def fun_l29_n122()
+ inc
+end
+
+def fun_l29_n123()
+ inc
+end
+
+def fun_l29_n124()
+ inc
+end
+
+def fun_l29_n125()
+ inc
+end
+
+def fun_l29_n126()
+ inc
+end
+
+def fun_l29_n127()
+ inc
+end
+
+def fun_l29_n128()
+ inc
+end
+
+def fun_l29_n129()
+ inc
+end
+
+def fun_l29_n130()
+ inc
+end
+
+def fun_l29_n131()
+ inc
+end
+
+def fun_l29_n132()
+ inc
+end
+
+def fun_l29_n133()
+ inc
+end
+
+def fun_l29_n134()
+ inc
+end
+
+def fun_l29_n135()
+ inc
+end
+
+def fun_l29_n136()
+ inc
+end
+
+def fun_l29_n137()
+ inc
+end
+
+def fun_l29_n138()
+ inc
+end
+
+def fun_l29_n139()
+ inc
+end
+
+def fun_l29_n140()
+ inc
+end
+
+def fun_l29_n141()
+ inc
+end
+
+def fun_l29_n142()
+ inc
+end
+
+def fun_l29_n143()
+ inc
+end
+
+def fun_l29_n144()
+ inc
+end
+
+def fun_l29_n145()
+ inc
+end
+
+def fun_l29_n146()
+ inc
+end
+
+def fun_l29_n147()
+ inc
+end
+
+def fun_l29_n148()
+ inc
+end
+
+def fun_l29_n149()
+ inc
+end
+
+def fun_l29_n150()
+ inc
+end
+
+def fun_l29_n151()
+ inc
+end
+
+def fun_l29_n152()
+ inc
+end
+
+def fun_l29_n153()
+ inc
+end
+
+def fun_l29_n154()
+ inc
+end
+
+def fun_l29_n155()
+ inc
+end
+
+def fun_l29_n156()
+ inc
+end
+
+def fun_l29_n157()
+ inc
+end
+
+def fun_l29_n158()
+ inc
+end
+
+def fun_l29_n159()
+ inc
+end
+
+def fun_l29_n160()
+ inc
+end
+
+def fun_l29_n161()
+ inc
+end
+
+def fun_l29_n162()
+ inc
+end
+
+def fun_l29_n163()
+ inc
+end
+
+def fun_l29_n164()
+ inc
+end
+
+def fun_l29_n165()
+ inc
+end
+
+def fun_l29_n166()
+ inc
+end
+
+def fun_l29_n167()
+ inc
+end
+
+def fun_l29_n168()
+ inc
+end
+
+def fun_l29_n169()
+ inc
+end
+
+def fun_l29_n170()
+ inc
+end
+
+def fun_l29_n171()
+ inc
+end
+
+def fun_l29_n172()
+ inc
+end
+
+def fun_l29_n173()
+ inc
+end
+
+def fun_l29_n174()
+ inc
+end
+
+def fun_l29_n175()
+ inc
+end
+
+def fun_l29_n176()
+ inc
+end
+
+def fun_l29_n177()
+ inc
+end
+
+def fun_l29_n178()
+ inc
+end
+
+def fun_l29_n179()
+ inc
+end
+
+def fun_l29_n180()
+ inc
+end
+
+def fun_l29_n181()
+ inc
+end
+
+def fun_l29_n182()
+ inc
+end
+
+def fun_l29_n183()
+ inc
+end
+
+def fun_l29_n184()
+ inc
+end
+
+def fun_l29_n185()
+ inc
+end
+
+def fun_l29_n186()
+ inc
+end
+
+def fun_l29_n187()
+ inc
+end
+
+def fun_l29_n188()
+ inc
+end
+
+def fun_l29_n189()
+ inc
+end
+
+def fun_l29_n190()
+ inc
+end
+
+def fun_l29_n191()
+ inc
+end
+
+def fun_l29_n192()
+ inc
+end
+
+def fun_l29_n193()
+ inc
+end
+
+def fun_l29_n194()
+ inc
+end
+
+def fun_l29_n195()
+ inc
+end
+
+def fun_l29_n196()
+ inc
+end
+
+def fun_l29_n197()
+ inc
+end
+
+def fun_l29_n198()
+ inc
+end
+
+def fun_l29_n199()
+ inc
+end
+
+def fun_l29_n200()
+ inc
+end
+
+def fun_l29_n201()
+ inc
+end
+
+def fun_l29_n202()
+ inc
+end
+
+def fun_l29_n203()
+ inc
+end
+
+def fun_l29_n204()
+ inc
+end
+
+def fun_l29_n205()
+ inc
+end
+
+def fun_l29_n206()
+ inc
+end
+
+def fun_l29_n207()
+ inc
+end
+
+def fun_l29_n208()
+ inc
+end
+
+def fun_l29_n209()
+ inc
+end
+
+def fun_l29_n210()
+ inc
+end
+
+def fun_l29_n211()
+ inc
+end
+
+def fun_l29_n212()
+ inc
+end
+
+def fun_l29_n213()
+ inc
+end
+
+def fun_l29_n214()
+ inc
+end
+
+def fun_l29_n215()
+ inc
+end
+
+def fun_l29_n216()
+ inc
+end
+
+def fun_l29_n217()
+ inc
+end
+
+def fun_l29_n218()
+ inc
+end
+
+def fun_l29_n219()
+ inc
+end
+
+def fun_l29_n220()
+ inc
+end
+
+def fun_l29_n221()
+ inc
+end
+
+def fun_l29_n222()
+ inc
+end
+
+def fun_l29_n223()
+ inc
+end
+
+def fun_l29_n224()
+ inc
+end
+
+def fun_l29_n225()
+ inc
+end
+
+def fun_l29_n226()
+ inc
+end
+
+def fun_l29_n227()
+ inc
+end
+
+def fun_l29_n228()
+ inc
+end
+
+def fun_l29_n229()
+ inc
+end
+
+def fun_l29_n230()
+ inc
+end
+
+def fun_l29_n231()
+ inc
+end
+
+def fun_l29_n232()
+ inc
+end
+
+def fun_l29_n233()
+ inc
+end
+
+def fun_l29_n234()
+ inc
+end
+
+def fun_l29_n235()
+ inc
+end
+
+def fun_l29_n236()
+ inc
+end
+
+def fun_l29_n237()
+ inc
+end
+
+def fun_l29_n238()
+ inc
+end
+
+def fun_l29_n239()
+ inc
+end
+
+def fun_l29_n240()
+ inc
+end
+
+def fun_l29_n241()
+ inc
+end
+
+def fun_l29_n242()
+ inc
+end
+
+def fun_l29_n243()
+ inc
+end
+
+def fun_l29_n244()
+ inc
+end
+
+def fun_l29_n245()
+ inc
+end
+
+def fun_l29_n246()
+ inc
+end
+
+def fun_l29_n247()
+ inc
+end
+
+def fun_l29_n248()
+ inc
+end
+
+def fun_l29_n249()
+ inc
+end
+
+def fun_l29_n250()
+ inc
+end
+
+def fun_l29_n251()
+ inc
+end
+
+def fun_l29_n252()
+ inc
+end
+
+def fun_l29_n253()
+ inc
+end
+
+def fun_l29_n254()
+ inc
+end
+
+def fun_l29_n255()
+ inc
+end
+
+def fun_l29_n256()
+ inc
+end
+
+def fun_l29_n257()
+ inc
+end
+
+def fun_l29_n258()
+ inc
+end
+
+def fun_l29_n259()
+ inc
+end
+
+def fun_l29_n260()
+ inc
+end
+
+def fun_l29_n261()
+ inc
+end
+
+def fun_l29_n262()
+ inc
+end
+
+def fun_l29_n263()
+ inc
+end
+
+def fun_l29_n264()
+ inc
+end
+
+def fun_l29_n265()
+ inc
+end
+
+def fun_l29_n266()
+ inc
+end
+
+def fun_l29_n267()
+ inc
+end
+
+def fun_l29_n268()
+ inc
+end
+
+def fun_l29_n269()
+ inc
+end
+
+def fun_l29_n270()
+ inc
+end
+
+def fun_l29_n271()
+ inc
+end
+
+def fun_l29_n272()
+ inc
+end
+
+def fun_l29_n273()
+ inc
+end
+
+def fun_l29_n274()
+ inc
+end
+
+def fun_l29_n275()
+ inc
+end
+
+def fun_l29_n276()
+ inc
+end
+
+def fun_l29_n277()
+ inc
+end
+
+def fun_l29_n278()
+ inc
+end
+
+def fun_l29_n279()
+ inc
+end
+
+def fun_l29_n280()
+ inc
+end
+
+def fun_l29_n281()
+ inc
+end
+
+def fun_l29_n282()
+ inc
+end
+
+def fun_l29_n283()
+ inc
+end
+
+def fun_l29_n284()
+ inc
+end
+
+def fun_l29_n285()
+ inc
+end
+
+def fun_l29_n286()
+ inc
+end
+
+def fun_l29_n287()
+ inc
+end
+
+def fun_l29_n288()
+ inc
+end
+
+def fun_l29_n289()
+ inc
+end
+
+def fun_l29_n290()
+ inc
+end
+
+def fun_l29_n291()
+ inc
+end
+
+def fun_l29_n292()
+ inc
+end
+
+def fun_l29_n293()
+ inc
+end
+
+def fun_l29_n294()
+ inc
+end
+
+def fun_l29_n295()
+ inc
+end
+
+def fun_l29_n296()
+ inc
+end
+
+def fun_l29_n297()
+ inc
+end
+
+def fun_l29_n298()
+ inc
+end
+
+def fun_l29_n299()
+ inc
+end
+
+def fun_l29_n300()
+ inc
+end
+
+def fun_l29_n301()
+ inc
+end
+
+def fun_l29_n302()
+ inc
+end
+
+def fun_l29_n303()
+ inc
+end
+
+def fun_l29_n304()
+ inc
+end
+
+def fun_l29_n305()
+ inc
+end
+
+def fun_l29_n306()
+ inc
+end
+
+def fun_l29_n307()
+ inc
+end
+
+def fun_l29_n308()
+ inc
+end
+
+def fun_l29_n309()
+ inc
+end
+
+def fun_l29_n310()
+ inc
+end
+
+def fun_l29_n311()
+ inc
+end
+
+def fun_l29_n312()
+ inc
+end
+
+def fun_l29_n313()
+ inc
+end
+
+def fun_l29_n314()
+ inc
+end
+
+def fun_l29_n315()
+ inc
+end
+
+def fun_l29_n316()
+ inc
+end
+
+def fun_l29_n317()
+ inc
+end
+
+def fun_l29_n318()
+ inc
+end
+
+def fun_l29_n319()
+ inc
+end
+
+def fun_l29_n320()
+ inc
+end
+
+def fun_l29_n321()
+ inc
+end
+
+def fun_l29_n322()
+ inc
+end
+
+def fun_l29_n323()
+ inc
+end
+
+def fun_l29_n324()
+ inc
+end
+
+def fun_l29_n325()
+ inc
+end
+
+def fun_l29_n326()
+ inc
+end
+
+def fun_l29_n327()
+ inc
+end
+
+def fun_l29_n328()
+ inc
+end
+
+def fun_l29_n329()
+ inc
+end
+
+def fun_l29_n330()
+ inc
+end
+
+def fun_l29_n331()
+ inc
+end
+
+def fun_l29_n332()
+ inc
+end
+
+def fun_l29_n333()
+ inc
+end
+
+def fun_l29_n334()
+ inc
+end
+
+def fun_l29_n335()
+ inc
+end
+
+def fun_l29_n336()
+ inc
+end
+
+def fun_l29_n337()
+ inc
+end
+
+def fun_l29_n338()
+ inc
+end
+
+def fun_l29_n339()
+ inc
+end
+
+def fun_l29_n340()
+ inc
+end
+
+def fun_l29_n341()
+ inc
+end
+
+def fun_l29_n342()
+ inc
+end
+
+def fun_l29_n343()
+ inc
+end
+
+def fun_l29_n344()
+ inc
+end
+
+def fun_l29_n345()
+ inc
+end
+
+def fun_l29_n346()
+ inc
+end
+
+def fun_l29_n347()
+ inc
+end
+
+def fun_l29_n348()
+ inc
+end
+
+def fun_l29_n349()
+ inc
+end
+
+def fun_l29_n350()
+ inc
+end
+
+def fun_l29_n351()
+ inc
+end
+
+def fun_l29_n352()
+ inc
+end
+
+def fun_l29_n353()
+ inc
+end
+
+def fun_l29_n354()
+ inc
+end
+
+def fun_l29_n355()
+ inc
+end
+
+def fun_l29_n356()
+ inc
+end
+
+def fun_l29_n357()
+ inc
+end
+
+def fun_l29_n358()
+ inc
+end
+
+def fun_l29_n359()
+ inc
+end
+
+def fun_l29_n360()
+ inc
+end
+
+def fun_l29_n361()
+ inc
+end
+
+def fun_l29_n362()
+ inc
+end
+
+def fun_l29_n363()
+ inc
+end
+
+def fun_l29_n364()
+ inc
+end
+
+def fun_l29_n365()
+ inc
+end
+
+def fun_l29_n366()
+ inc
+end
+
+def fun_l29_n367()
+ inc
+end
+
+def fun_l29_n368()
+ inc
+end
+
+def fun_l29_n369()
+ inc
+end
+
+def fun_l29_n370()
+ inc
+end
+
+def fun_l29_n371()
+ inc
+end
+
+def fun_l29_n372()
+ inc
+end
+
+def fun_l29_n373()
+ inc
+end
+
+def fun_l29_n374()
+ inc
+end
+
+def fun_l29_n375()
+ inc
+end
+
+def fun_l29_n376()
+ inc
+end
+
+def fun_l29_n377()
+ inc
+end
+
+def fun_l29_n378()
+ inc
+end
+
+def fun_l29_n379()
+ inc
+end
+
+def fun_l29_n380()
+ inc
+end
+
+def fun_l29_n381()
+ inc
+end
+
+def fun_l29_n382()
+ inc
+end
+
+def fun_l29_n383()
+ inc
+end
+
+def fun_l29_n384()
+ inc
+end
+
+def fun_l29_n385()
+ inc
+end
+
+def fun_l29_n386()
+ inc
+end
+
+def fun_l29_n387()
+ inc
+end
+
+def fun_l29_n388()
+ inc
+end
+
+def fun_l29_n389()
+ inc
+end
+
+def fun_l29_n390()
+ inc
+end
+
+def fun_l29_n391()
+ inc
+end
+
+def fun_l29_n392()
+ inc
+end
+
+def fun_l29_n393()
+ inc
+end
+
+def fun_l29_n394()
+ inc
+end
+
+def fun_l29_n395()
+ inc
+end
+
+def fun_l29_n396()
+ inc
+end
+
+def fun_l29_n397()
+ inc
+end
+
+def fun_l29_n398()
+ inc
+end
+
+def fun_l29_n399()
+ inc
+end
+
+def fun_l29_n400()
+ inc
+end
+
+def fun_l29_n401()
+ inc
+end
+
+def fun_l29_n402()
+ inc
+end
+
+def fun_l29_n403()
+ inc
+end
+
+def fun_l29_n404()
+ inc
+end
+
+def fun_l29_n405()
+ inc
+end
+
+def fun_l29_n406()
+ inc
+end
+
+def fun_l29_n407()
+ inc
+end
+
+def fun_l29_n408()
+ inc
+end
+
+def fun_l29_n409()
+ inc
+end
+
+def fun_l29_n410()
+ inc
+end
+
+def fun_l29_n411()
+ inc
+end
+
+def fun_l29_n412()
+ inc
+end
+
+def fun_l29_n413()
+ inc
+end
+
+def fun_l29_n414()
+ inc
+end
+
+def fun_l29_n415()
+ inc
+end
+
+def fun_l29_n416()
+ inc
+end
+
+def fun_l29_n417()
+ inc
+end
+
+def fun_l29_n418()
+ inc
+end
+
+def fun_l29_n419()
+ inc
+end
+
+def fun_l29_n420()
+ inc
+end
+
+def fun_l29_n421()
+ inc
+end
+
+def fun_l29_n422()
+ inc
+end
+
+def fun_l29_n423()
+ inc
+end
+
+def fun_l29_n424()
+ inc
+end
+
+def fun_l29_n425()
+ inc
+end
+
+def fun_l29_n426()
+ inc
+end
+
+def fun_l29_n427()
+ inc
+end
+
+def fun_l29_n428()
+ inc
+end
+
+def fun_l29_n429()
+ inc
+end
+
+def fun_l29_n430()
+ inc
+end
+
+def fun_l29_n431()
+ inc
+end
+
+def fun_l29_n432()
+ inc
+end
+
+def fun_l29_n433()
+ inc
+end
+
+def fun_l29_n434()
+ inc
+end
+
+def fun_l29_n435()
+ inc
+end
+
+def fun_l29_n436()
+ inc
+end
+
+def fun_l29_n437()
+ inc
+end
+
+def fun_l29_n438()
+ inc
+end
+
+def fun_l29_n439()
+ inc
+end
+
+def fun_l29_n440()
+ inc
+end
+
+def fun_l29_n441()
+ inc
+end
+
+def fun_l29_n442()
+ inc
+end
+
+def fun_l29_n443()
+ inc
+end
+
+def fun_l29_n444()
+ inc
+end
+
+def fun_l29_n445()
+ inc
+end
+
+def fun_l29_n446()
+ inc
+end
+
+def fun_l29_n447()
+ inc
+end
+
+def fun_l29_n448()
+ inc
+end
+
+def fun_l29_n449()
+ inc
+end
+
+def fun_l29_n450()
+ inc
+end
+
+def fun_l29_n451()
+ inc
+end
+
+def fun_l29_n452()
+ inc
+end
+
+def fun_l29_n453()
+ inc
+end
+
+def fun_l29_n454()
+ inc
+end
+
+def fun_l29_n455()
+ inc
+end
+
+def fun_l29_n456()
+ inc
+end
+
+def fun_l29_n457()
+ inc
+end
+
+def fun_l29_n458()
+ inc
+end
+
+def fun_l29_n459()
+ inc
+end
+
+def fun_l29_n460()
+ inc
+end
+
+def fun_l29_n461()
+ inc
+end
+
+def fun_l29_n462()
+ inc
+end
+
+def fun_l29_n463()
+ inc
+end
+
+def fun_l29_n464()
+ inc
+end
+
+def fun_l29_n465()
+ inc
+end
+
+def fun_l29_n466()
+ inc
+end
+
+def fun_l29_n467()
+ inc
+end
+
+def fun_l29_n468()
+ inc
+end
+
+def fun_l29_n469()
+ inc
+end
+
+def fun_l29_n470()
+ inc
+end
+
+def fun_l29_n471()
+ inc
+end
+
+def fun_l29_n472()
+ inc
+end
+
+def fun_l29_n473()
+ inc
+end
+
+def fun_l29_n474()
+ inc
+end
+
+def fun_l29_n475()
+ inc
+end
+
+def fun_l29_n476()
+ inc
+end
+
+def fun_l29_n477()
+ inc
+end
+
+def fun_l29_n478()
+ inc
+end
+
+def fun_l29_n479()
+ inc
+end
+
+def fun_l29_n480()
+ inc
+end
+
+def fun_l29_n481()
+ inc
+end
+
+def fun_l29_n482()
+ inc
+end
+
+def fun_l29_n483()
+ inc
+end
+
+def fun_l29_n484()
+ inc
+end
+
+def fun_l29_n485()
+ inc
+end
+
+def fun_l29_n486()
+ inc
+end
+
+def fun_l29_n487()
+ inc
+end
+
+def fun_l29_n488()
+ inc
+end
+
+def fun_l29_n489()
+ inc
+end
+
+def fun_l29_n490()
+ inc
+end
+
+def fun_l29_n491()
+ inc
+end
+
+def fun_l29_n492()
+ inc
+end
+
+def fun_l29_n493()
+ inc
+end
+
+def fun_l29_n494()
+ inc
+end
+
+def fun_l29_n495()
+ inc
+end
+
+def fun_l29_n496()
+ inc
+end
+
+def fun_l29_n497()
+ inc
+end
+
+def fun_l29_n498()
+ inc
+end
+
+def fun_l29_n499()
+ inc
+end
+
+def fun_l29_n500()
+ inc
+end
+
+def fun_l29_n501()
+ inc
+end
+
+def fun_l29_n502()
+ inc
+end
+
+def fun_l29_n503()
+ inc
+end
+
+def fun_l29_n504()
+ inc
+end
+
+def fun_l29_n505()
+ inc
+end
+
+def fun_l29_n506()
+ inc
+end
+
+def fun_l29_n507()
+ inc
+end
+
+def fun_l29_n508()
+ inc
+end
+
+def fun_l29_n509()
+ inc
+end
+
+def fun_l29_n510()
+ inc
+end
+
+def fun_l29_n511()
+ inc
+end
+
+def fun_l29_n512()
+ inc
+end
+
+def fun_l29_n513()
+ inc
+end
+
+def fun_l29_n514()
+ inc
+end
+
+def fun_l29_n515()
+ inc
+end
+
+def fun_l29_n516()
+ inc
+end
+
+def fun_l29_n517()
+ inc
+end
+
+def fun_l29_n518()
+ inc
+end
+
+def fun_l29_n519()
+ inc
+end
+
+def fun_l29_n520()
+ inc
+end
+
+def fun_l29_n521()
+ inc
+end
+
+def fun_l29_n522()
+ inc
+end
+
+def fun_l29_n523()
+ inc
+end
+
+def fun_l29_n524()
+ inc
+end
+
+def fun_l29_n525()
+ inc
+end
+
+def fun_l29_n526()
+ inc
+end
+
+def fun_l29_n527()
+ inc
+end
+
+def fun_l29_n528()
+ inc
+end
+
+def fun_l29_n529()
+ inc
+end
+
+def fun_l29_n530()
+ inc
+end
+
+def fun_l29_n531()
+ inc
+end
+
+def fun_l29_n532()
+ inc
+end
+
+def fun_l29_n533()
+ inc
+end
+
+def fun_l29_n534()
+ inc
+end
+
+def fun_l29_n535()
+ inc
+end
+
+def fun_l29_n536()
+ inc
+end
+
+def fun_l29_n537()
+ inc
+end
+
+def fun_l29_n538()
+ inc
+end
+
+def fun_l29_n539()
+ inc
+end
+
+def fun_l29_n540()
+ inc
+end
+
+def fun_l29_n541()
+ inc
+end
+
+def fun_l29_n542()
+ inc
+end
+
+def fun_l29_n543()
+ inc
+end
+
+def fun_l29_n544()
+ inc
+end
+
+def fun_l29_n545()
+ inc
+end
+
+def fun_l29_n546()
+ inc
+end
+
+def fun_l29_n547()
+ inc
+end
+
+def fun_l29_n548()
+ inc
+end
+
+def fun_l29_n549()
+ inc
+end
+
+def fun_l29_n550()
+ inc
+end
+
+def fun_l29_n551()
+ inc
+end
+
+def fun_l29_n552()
+ inc
+end
+
+def fun_l29_n553()
+ inc
+end
+
+def fun_l29_n554()
+ inc
+end
+
+def fun_l29_n555()
+ inc
+end
+
+def fun_l29_n556()
+ inc
+end
+
+def fun_l29_n557()
+ inc
+end
+
+def fun_l29_n558()
+ inc
+end
+
+def fun_l29_n559()
+ inc
+end
+
+def fun_l29_n560()
+ inc
+end
+
+def fun_l29_n561()
+ inc
+end
+
+def fun_l29_n562()
+ inc
+end
+
+def fun_l29_n563()
+ inc
+end
+
+def fun_l29_n564()
+ inc
+end
+
+def fun_l29_n565()
+ inc
+end
+
+def fun_l29_n566()
+ inc
+end
+
+def fun_l29_n567()
+ inc
+end
+
+def fun_l29_n568()
+ inc
+end
+
+def fun_l29_n569()
+ inc
+end
+
+def fun_l29_n570()
+ inc
+end
+
+def fun_l29_n571()
+ inc
+end
+
+def fun_l29_n572()
+ inc
+end
+
+def fun_l29_n573()
+ inc
+end
+
+def fun_l29_n574()
+ inc
+end
+
+def fun_l29_n575()
+ inc
+end
+
+def fun_l29_n576()
+ inc
+end
+
+def fun_l29_n577()
+ inc
+end
+
+def fun_l29_n578()
+ inc
+end
+
+def fun_l29_n579()
+ inc
+end
+
+def fun_l29_n580()
+ inc
+end
+
+def fun_l29_n581()
+ inc
+end
+
+def fun_l29_n582()
+ inc
+end
+
+def fun_l29_n583()
+ inc
+end
+
+def fun_l29_n584()
+ inc
+end
+
+def fun_l29_n585()
+ inc
+end
+
+def fun_l29_n586()
+ inc
+end
+
+def fun_l29_n587()
+ inc
+end
+
+def fun_l29_n588()
+ inc
+end
+
+def fun_l29_n589()
+ inc
+end
+
+def fun_l29_n590()
+ inc
+end
+
+def fun_l29_n591()
+ inc
+end
+
+def fun_l29_n592()
+ inc
+end
+
+def fun_l29_n593()
+ inc
+end
+
+def fun_l29_n594()
+ inc
+end
+
+def fun_l29_n595()
+ inc
+end
+
+def fun_l29_n596()
+ inc
+end
+
+def fun_l29_n597()
+ inc
+end
+
+def fun_l29_n598()
+ inc
+end
+
+def fun_l29_n599()
+ inc
+end
+
+def fun_l29_n600()
+ inc
+end
+
+def fun_l29_n601()
+ inc
+end
+
+def fun_l29_n602()
+ inc
+end
+
+def fun_l29_n603()
+ inc
+end
+
+def fun_l29_n604()
+ inc
+end
+
+def fun_l29_n605()
+ inc
+end
+
+def fun_l29_n606()
+ inc
+end
+
+def fun_l29_n607()
+ inc
+end
+
+def fun_l29_n608()
+ inc
+end
+
+def fun_l29_n609()
+ inc
+end
+
+def fun_l29_n610()
+ inc
+end
+
+def fun_l29_n611()
+ inc
+end
+
+def fun_l29_n612()
+ inc
+end
+
+def fun_l29_n613()
+ inc
+end
+
+def fun_l29_n614()
+ inc
+end
+
+def fun_l29_n615()
+ inc
+end
+
+def fun_l29_n616()
+ inc
+end
+
+def fun_l29_n617()
+ inc
+end
+
+def fun_l29_n618()
+ inc
+end
+
+def fun_l29_n619()
+ inc
+end
+
+def fun_l29_n620()
+ inc
+end
+
+def fun_l29_n621()
+ inc
+end
+
+def fun_l29_n622()
+ inc
+end
+
+def fun_l29_n623()
+ inc
+end
+
+def fun_l29_n624()
+ inc
+end
+
+def fun_l29_n625()
+ inc
+end
+
+def fun_l29_n626()
+ inc
+end
+
+def fun_l29_n627()
+ inc
+end
+
+def fun_l29_n628()
+ inc
+end
+
+def fun_l29_n629()
+ inc
+end
+
+def fun_l29_n630()
+ inc
+end
+
+def fun_l29_n631()
+ inc
+end
+
+def fun_l29_n632()
+ inc
+end
+
+def fun_l29_n633()
+ inc
+end
+
+def fun_l29_n634()
+ inc
+end
+
+def fun_l29_n635()
+ inc
+end
+
+def fun_l29_n636()
+ inc
+end
+
+def fun_l29_n637()
+ inc
+end
+
+def fun_l29_n638()
+ inc
+end
+
+def fun_l29_n639()
+ inc
+end
+
+def fun_l29_n640()
+ inc
+end
+
+def fun_l29_n641()
+ inc
+end
+
+def fun_l29_n642()
+ inc
+end
+
+def fun_l29_n643()
+ inc
+end
+
+def fun_l29_n644()
+ inc
+end
+
+def fun_l29_n645()
+ inc
+end
+
+def fun_l29_n646()
+ inc
+end
+
+def fun_l29_n647()
+ inc
+end
+
+def fun_l29_n648()
+ inc
+end
+
+def fun_l29_n649()
+ inc
+end
+
+def fun_l29_n650()
+ inc
+end
+
+def fun_l29_n651()
+ inc
+end
+
+def fun_l29_n652()
+ inc
+end
+
+def fun_l29_n653()
+ inc
+end
+
+def fun_l29_n654()
+ inc
+end
+
+def fun_l29_n655()
+ inc
+end
+
+def fun_l29_n656()
+ inc
+end
+
+def fun_l29_n657()
+ inc
+end
+
+def fun_l29_n658()
+ inc
+end
+
+def fun_l29_n659()
+ inc
+end
+
+def fun_l29_n660()
+ inc
+end
+
+def fun_l29_n661()
+ inc
+end
+
+def fun_l29_n662()
+ inc
+end
+
+def fun_l29_n663()
+ inc
+end
+
+def fun_l29_n664()
+ inc
+end
+
+def fun_l29_n665()
+ inc
+end
+
+def fun_l29_n666()
+ inc
+end
+
+def fun_l29_n667()
+ inc
+end
+
+def fun_l29_n668()
+ inc
+end
+
+def fun_l29_n669()
+ inc
+end
+
+def fun_l29_n670()
+ inc
+end
+
+def fun_l29_n671()
+ inc
+end
+
+def fun_l29_n672()
+ inc
+end
+
+def fun_l29_n673()
+ inc
+end
+
+def fun_l29_n674()
+ inc
+end
+
+def fun_l29_n675()
+ inc
+end
+
+def fun_l29_n676()
+ inc
+end
+
+def fun_l29_n677()
+ inc
+end
+
+def fun_l29_n678()
+ inc
+end
+
+def fun_l29_n679()
+ inc
+end
+
+def fun_l29_n680()
+ inc
+end
+
+def fun_l29_n681()
+ inc
+end
+
+def fun_l29_n682()
+ inc
+end
+
+def fun_l29_n683()
+ inc
+end
+
+def fun_l29_n684()
+ inc
+end
+
+def fun_l29_n685()
+ inc
+end
+
+def fun_l29_n686()
+ inc
+end
+
+def fun_l29_n687()
+ inc
+end
+
+def fun_l29_n688()
+ inc
+end
+
+def fun_l29_n689()
+ inc
+end
+
+def fun_l29_n690()
+ inc
+end
+
+def fun_l29_n691()
+ inc
+end
+
+def fun_l29_n692()
+ inc
+end
+
+def fun_l29_n693()
+ inc
+end
+
+def fun_l29_n694()
+ inc
+end
+
+def fun_l29_n695()
+ inc
+end
+
+def fun_l29_n696()
+ inc
+end
+
+def fun_l29_n697()
+ inc
+end
+
+def fun_l29_n698()
+ inc
+end
+
+def fun_l29_n699()
+ inc
+end
+
+def fun_l29_n700()
+ inc
+end
+
+def fun_l29_n701()
+ inc
+end
+
+def fun_l29_n702()
+ inc
+end
+
+def fun_l29_n703()
+ inc
+end
+
+def fun_l29_n704()
+ inc
+end
+
+def fun_l29_n705()
+ inc
+end
+
+def fun_l29_n706()
+ inc
+end
+
+def fun_l29_n707()
+ inc
+end
+
+def fun_l29_n708()
+ inc
+end
+
+def fun_l29_n709()
+ inc
+end
+
+def fun_l29_n710()
+ inc
+end
+
+def fun_l29_n711()
+ inc
+end
+
+def fun_l29_n712()
+ inc
+end
+
+def fun_l29_n713()
+ inc
+end
+
+def fun_l29_n714()
+ inc
+end
+
+def fun_l29_n715()
+ inc
+end
+
+def fun_l29_n716()
+ inc
+end
+
+def fun_l29_n717()
+ inc
+end
+
+def fun_l29_n718()
+ inc
+end
+
+def fun_l29_n719()
+ inc
+end
+
+def fun_l29_n720()
+ inc
+end
+
+def fun_l29_n721()
+ inc
+end
+
+def fun_l29_n722()
+ inc
+end
+
+def fun_l29_n723()
+ inc
+end
+
+def fun_l29_n724()
+ inc
+end
+
+def fun_l29_n725()
+ inc
+end
+
+def fun_l29_n726()
+ inc
+end
+
+def fun_l29_n727()
+ inc
+end
+
+def fun_l29_n728()
+ inc
+end
+
+def fun_l29_n729()
+ inc
+end
+
+def fun_l29_n730()
+ inc
+end
+
+def fun_l29_n731()
+ inc
+end
+
+def fun_l29_n732()
+ inc
+end
+
+def fun_l29_n733()
+ inc
+end
+
+def fun_l29_n734()
+ inc
+end
+
+def fun_l29_n735()
+ inc
+end
+
+def fun_l29_n736()
+ inc
+end
+
+def fun_l29_n737()
+ inc
+end
+
+def fun_l29_n738()
+ inc
+end
+
+def fun_l29_n739()
+ inc
+end
+
+def fun_l29_n740()
+ inc
+end
+
+def fun_l29_n741()
+ inc
+end
+
+def fun_l29_n742()
+ inc
+end
+
+def fun_l29_n743()
+ inc
+end
+
+def fun_l29_n744()
+ inc
+end
+
+def fun_l29_n745()
+ inc
+end
+
+def fun_l29_n746()
+ inc
+end
+
+def fun_l29_n747()
+ inc
+end
+
+def fun_l29_n748()
+ inc
+end
+
+def fun_l29_n749()
+ inc
+end
+
+def fun_l29_n750()
+ inc
+end
+
+def fun_l29_n751()
+ inc
+end
+
+def fun_l29_n752()
+ inc
+end
+
+def fun_l29_n753()
+ inc
+end
+
+def fun_l29_n754()
+ inc
+end
+
+def fun_l29_n755()
+ inc
+end
+
+def fun_l29_n756()
+ inc
+end
+
+def fun_l29_n757()
+ inc
+end
+
+def fun_l29_n758()
+ inc
+end
+
+def fun_l29_n759()
+ inc
+end
+
+def fun_l29_n760()
+ inc
+end
+
+def fun_l29_n761()
+ inc
+end
+
+def fun_l29_n762()
+ inc
+end
+
+def fun_l29_n763()
+ inc
+end
+
+def fun_l29_n764()
+ inc
+end
+
+def fun_l29_n765()
+ inc
+end
+
+def fun_l29_n766()
+ inc
+end
+
+def fun_l29_n767()
+ inc
+end
+
+def fun_l29_n768()
+ inc
+end
+
+def fun_l29_n769()
+ inc
+end
+
+def fun_l29_n770()
+ inc
+end
+
+def fun_l29_n771()
+ inc
+end
+
+def fun_l29_n772()
+ inc
+end
+
+def fun_l29_n773()
+ inc
+end
+
+def fun_l29_n774()
+ inc
+end
+
+def fun_l29_n775()
+ inc
+end
+
+def fun_l29_n776()
+ inc
+end
+
+def fun_l29_n777()
+ inc
+end
+
+def fun_l29_n778()
+ inc
+end
+
+def fun_l29_n779()
+ inc
+end
+
+def fun_l29_n780()
+ inc
+end
+
+def fun_l29_n781()
+ inc
+end
+
+def fun_l29_n782()
+ inc
+end
+
+def fun_l29_n783()
+ inc
+end
+
+def fun_l29_n784()
+ inc
+end
+
+def fun_l29_n785()
+ inc
+end
+
+def fun_l29_n786()
+ inc
+end
+
+def fun_l29_n787()
+ inc
+end
+
+def fun_l29_n788()
+ inc
+end
+
+def fun_l29_n789()
+ inc
+end
+
+def fun_l29_n790()
+ inc
+end
+
+def fun_l29_n791()
+ inc
+end
+
+def fun_l29_n792()
+ inc
+end
+
+def fun_l29_n793()
+ inc
+end
+
+def fun_l29_n794()
+ inc
+end
+
+def fun_l29_n795()
+ inc
+end
+
+def fun_l29_n796()
+ inc
+end
+
+def fun_l29_n797()
+ inc
+end
+
+def fun_l29_n798()
+ inc
+end
+
+def fun_l29_n799()
+ inc
+end
+
+def fun_l29_n800()
+ inc
+end
+
+def fun_l29_n801()
+ inc
+end
+
+def fun_l29_n802()
+ inc
+end
+
+def fun_l29_n803()
+ inc
+end
+
+def fun_l29_n804()
+ inc
+end
+
+def fun_l29_n805()
+ inc
+end
+
+def fun_l29_n806()
+ inc
+end
+
+def fun_l29_n807()
+ inc
+end
+
+def fun_l29_n808()
+ inc
+end
+
+def fun_l29_n809()
+ inc
+end
+
+def fun_l29_n810()
+ inc
+end
+
+def fun_l29_n811()
+ inc
+end
+
+def fun_l29_n812()
+ inc
+end
+
+def fun_l29_n813()
+ inc
+end
+
+def fun_l29_n814()
+ inc
+end
+
+def fun_l29_n815()
+ inc
+end
+
+def fun_l29_n816()
+ inc
+end
+
+def fun_l29_n817()
+ inc
+end
+
+def fun_l29_n818()
+ inc
+end
+
+def fun_l29_n819()
+ inc
+end
+
+def fun_l29_n820()
+ inc
+end
+
+def fun_l29_n821()
+ inc
+end
+
+def fun_l29_n822()
+ inc
+end
+
+def fun_l29_n823()
+ inc
+end
+
+def fun_l29_n824()
+ inc
+end
+
+def fun_l29_n825()
+ inc
+end
+
+def fun_l29_n826()
+ inc
+end
+
+def fun_l29_n827()
+ inc
+end
+
+def fun_l29_n828()
+ inc
+end
+
+def fun_l29_n829()
+ inc
+end
+
+def fun_l29_n830()
+ inc
+end
+
+def fun_l29_n831()
+ inc
+end
+
+def fun_l29_n832()
+ inc
+end
+
+def fun_l29_n833()
+ inc
+end
+
+def fun_l29_n834()
+ inc
+end
+
+def fun_l29_n835()
+ inc
+end
+
+def fun_l29_n836()
+ inc
+end
+
+def fun_l29_n837()
+ inc
+end
+
+def fun_l29_n838()
+ inc
+end
+
+def fun_l29_n839()
+ inc
+end
+
+def fun_l29_n840()
+ inc
+end
+
+def fun_l29_n841()
+ inc
+end
+
+def fun_l29_n842()
+ inc
+end
+
+def fun_l29_n843()
+ inc
+end
+
+def fun_l29_n844()
+ inc
+end
+
+def fun_l29_n845()
+ inc
+end
+
+def fun_l29_n846()
+ inc
+end
+
+def fun_l29_n847()
+ inc
+end
+
+def fun_l29_n848()
+ inc
+end
+
+def fun_l29_n849()
+ inc
+end
+
+def fun_l29_n850()
+ inc
+end
+
+def fun_l29_n851()
+ inc
+end
+
+def fun_l29_n852()
+ inc
+end
+
+def fun_l29_n853()
+ inc
+end
+
+def fun_l29_n854()
+ inc
+end
+
+def fun_l29_n855()
+ inc
+end
+
+def fun_l29_n856()
+ inc
+end
+
+def fun_l29_n857()
+ inc
+end
+
+def fun_l29_n858()
+ inc
+end
+
+def fun_l29_n859()
+ inc
+end
+
+def fun_l29_n860()
+ inc
+end
+
+def fun_l29_n861()
+ inc
+end
+
+def fun_l29_n862()
+ inc
+end
+
+def fun_l29_n863()
+ inc
+end
+
+def fun_l29_n864()
+ inc
+end
+
+def fun_l29_n865()
+ inc
+end
+
+def fun_l29_n866()
+ inc
+end
+
+def fun_l29_n867()
+ inc
+end
+
+def fun_l29_n868()
+ inc
+end
+
+def fun_l29_n869()
+ inc
+end
+
+def fun_l29_n870()
+ inc
+end
+
+def fun_l29_n871()
+ inc
+end
+
+def fun_l29_n872()
+ inc
+end
+
+def fun_l29_n873()
+ inc
+end
+
+def fun_l29_n874()
+ inc
+end
+
+def fun_l29_n875()
+ inc
+end
+
+def fun_l29_n876()
+ inc
+end
+
+def fun_l29_n877()
+ inc
+end
+
+def fun_l29_n878()
+ inc
+end
+
+def fun_l29_n879()
+ inc
+end
+
+def fun_l29_n880()
+ inc
+end
+
+def fun_l29_n881()
+ inc
+end
+
+def fun_l29_n882()
+ inc
+end
+
+def fun_l29_n883()
+ inc
+end
+
+def fun_l29_n884()
+ inc
+end
+
+def fun_l29_n885()
+ inc
+end
+
+def fun_l29_n886()
+ inc
+end
+
+def fun_l29_n887()
+ inc
+end
+
+def fun_l29_n888()
+ inc
+end
+
+def fun_l29_n889()
+ inc
+end
+
+def fun_l29_n890()
+ inc
+end
+
+def fun_l29_n891()
+ inc
+end
+
+def fun_l29_n892()
+ inc
+end
+
+def fun_l29_n893()
+ inc
+end
+
+def fun_l29_n894()
+ inc
+end
+
+def fun_l29_n895()
+ inc
+end
+
+def fun_l29_n896()
+ inc
+end
+
+def fun_l29_n897()
+ inc
+end
+
+def fun_l29_n898()
+ inc
+end
+
+def fun_l29_n899()
+ inc
+end
+
+def fun_l29_n900()
+ inc
+end
+
+def fun_l29_n901()
+ inc
+end
+
+def fun_l29_n902()
+ inc
+end
+
+def fun_l29_n903()
+ inc
+end
+
+def fun_l29_n904()
+ inc
+end
+
+def fun_l29_n905()
+ inc
+end
+
+def fun_l29_n906()
+ inc
+end
+
+def fun_l29_n907()
+ inc
+end
+
+def fun_l29_n908()
+ inc
+end
+
+def fun_l29_n909()
+ inc
+end
+
+def fun_l29_n910()
+ inc
+end
+
+def fun_l29_n911()
+ inc
+end
+
+def fun_l29_n912()
+ inc
+end
+
+def fun_l29_n913()
+ inc
+end
+
+def fun_l29_n914()
+ inc
+end
+
+def fun_l29_n915()
+ inc
+end
+
+def fun_l29_n916()
+ inc
+end
+
+def fun_l29_n917()
+ inc
+end
+
+def fun_l29_n918()
+ inc
+end
+
+def fun_l29_n919()
+ inc
+end
+
+def fun_l29_n920()
+ inc
+end
+
+def fun_l29_n921()
+ inc
+end
+
+def fun_l29_n922()
+ inc
+end
+
+def fun_l29_n923()
+ inc
+end
+
+def fun_l29_n924()
+ inc
+end
+
+def fun_l29_n925()
+ inc
+end
+
+def fun_l29_n926()
+ inc
+end
+
+def fun_l29_n927()
+ inc
+end
+
+def fun_l29_n928()
+ inc
+end
+
+def fun_l29_n929()
+ inc
+end
+
+def fun_l29_n930()
+ inc
+end
+
+def fun_l29_n931()
+ inc
+end
+
+def fun_l29_n932()
+ inc
+end
+
+def fun_l29_n933()
+ inc
+end
+
+def fun_l29_n934()
+ inc
+end
+
+def fun_l29_n935()
+ inc
+end
+
+def fun_l29_n936()
+ inc
+end
+
+def fun_l29_n937()
+ inc
+end
+
+def fun_l29_n938()
+ inc
+end
+
+def fun_l29_n939()
+ inc
+end
+
+def fun_l29_n940()
+ inc
+end
+
+def fun_l29_n941()
+ inc
+end
+
+def fun_l29_n942()
+ inc
+end
+
+def fun_l29_n943()
+ inc
+end
+
+def fun_l29_n944()
+ inc
+end
+
+def fun_l29_n945()
+ inc
+end
+
+def fun_l29_n946()
+ inc
+end
+
+def fun_l29_n947()
+ inc
+end
+
+def fun_l29_n948()
+ inc
+end
+
+def fun_l29_n949()
+ inc
+end
+
+def fun_l29_n950()
+ inc
+end
+
+def fun_l29_n951()
+ inc
+end
+
+def fun_l29_n952()
+ inc
+end
+
+def fun_l29_n953()
+ inc
+end
+
+def fun_l29_n954()
+ inc
+end
+
+def fun_l29_n955()
+ inc
+end
+
+def fun_l29_n956()
+ inc
+end
+
+def fun_l29_n957()
+ inc
+end
+
+def fun_l29_n958()
+ inc
+end
+
+def fun_l29_n959()
+ inc
+end
+
+def fun_l29_n960()
+ inc
+end
+
+def fun_l29_n961()
+ inc
+end
+
+def fun_l29_n962()
+ inc
+end
+
+def fun_l29_n963()
+ inc
+end
+
+def fun_l29_n964()
+ inc
+end
+
+def fun_l29_n965()
+ inc
+end
+
+def fun_l29_n966()
+ inc
+end
+
+def fun_l29_n967()
+ inc
+end
+
+def fun_l29_n968()
+ inc
+end
+
+def fun_l29_n969()
+ inc
+end
+
+def fun_l29_n970()
+ inc
+end
+
+def fun_l29_n971()
+ inc
+end
+
+def fun_l29_n972()
+ inc
+end
+
+def fun_l29_n973()
+ inc
+end
+
+def fun_l29_n974()
+ inc
+end
+
+def fun_l29_n975()
+ inc
+end
+
+def fun_l29_n976()
+ inc
+end
+
+def fun_l29_n977()
+ inc
+end
+
+def fun_l29_n978()
+ inc
+end
+
+def fun_l29_n979()
+ inc
+end
+
+def fun_l29_n980()
+ inc
+end
+
+def fun_l29_n981()
+ inc
+end
+
+def fun_l29_n982()
+ inc
+end
+
+def fun_l29_n983()
+ inc
+end
+
+def fun_l29_n984()
+ inc
+end
+
+def fun_l29_n985()
+ inc
+end
+
+def fun_l29_n986()
+ inc
+end
+
+def fun_l29_n987()
+ inc
+end
+
+def fun_l29_n988()
+ inc
+end
+
+def fun_l29_n989()
+ inc
+end
+
+def fun_l29_n990()
+ inc
+end
+
+def fun_l29_n991()
+ inc
+end
+
+def fun_l29_n992()
+ inc
+end
+
+def fun_l29_n993()
+ inc
+end
+
+def fun_l29_n994()
+ inc
+end
+
+def fun_l29_n995()
+ inc
+end
+
+def fun_l29_n996()
+ inc
+end
+
+def fun_l29_n997()
+ inc
+end
+
+def fun_l29_n998()
+ inc
+end
+
+def fun_l29_n999()
+ inc
+end
+
+@a = 0
+@b = 0
+@c = 0
+@d = 0
+@count = 0
+def inc()
+ @count += 1
+end
+1000.times do
+ fun_l0_n0
+ fun_l0_n1
+ fun_l0_n2
+ fun_l0_n3
+ fun_l0_n4
+ fun_l0_n5
+ fun_l0_n6
+ fun_l0_n7
+ fun_l0_n8
+ fun_l0_n9
+ fun_l0_n10
+ fun_l0_n11
+ fun_l0_n12
+ fun_l0_n13
+ fun_l0_n14
+ fun_l0_n15
+ fun_l0_n16
+ fun_l0_n17
+ fun_l0_n18
+ fun_l0_n19
+ fun_l0_n20
+ fun_l0_n21
+ fun_l0_n22
+ fun_l0_n23
+ fun_l0_n24
+ fun_l0_n25
+ fun_l0_n26
+ fun_l0_n27
+ fun_l0_n28
+ fun_l0_n29
+ fun_l0_n30
+ fun_l0_n31
+ fun_l0_n32
+ fun_l0_n33
+ fun_l0_n34
+ fun_l0_n35
+ fun_l0_n36
+ fun_l0_n37
+ fun_l0_n38
+ fun_l0_n39
+ fun_l0_n40
+ fun_l0_n41
+ fun_l0_n42
+ fun_l0_n43
+ fun_l0_n44
+ fun_l0_n45
+ fun_l0_n46
+ fun_l0_n47
+ fun_l0_n48
+ fun_l0_n49
+ fun_l0_n50
+ fun_l0_n51
+ fun_l0_n52
+ fun_l0_n53
+ fun_l0_n54
+ fun_l0_n55
+ fun_l0_n56
+ fun_l0_n57
+ fun_l0_n58
+ fun_l0_n59
+ fun_l0_n60
+ fun_l0_n61
+ fun_l0_n62
+ fun_l0_n63
+ fun_l0_n64
+ fun_l0_n65
+ fun_l0_n66
+ fun_l0_n67
+ fun_l0_n68
+ fun_l0_n69
+ fun_l0_n70
+ fun_l0_n71
+ fun_l0_n72
+ fun_l0_n73
+ fun_l0_n74
+ fun_l0_n75
+ fun_l0_n76
+ fun_l0_n77
+ fun_l0_n78
+ fun_l0_n79
+ fun_l0_n80
+ fun_l0_n81
+ fun_l0_n82
+ fun_l0_n83
+ fun_l0_n84
+ fun_l0_n85
+ fun_l0_n86
+ fun_l0_n87
+ fun_l0_n88
+ fun_l0_n89
+ fun_l0_n90
+ fun_l0_n91
+ fun_l0_n92
+ fun_l0_n93
+ fun_l0_n94
+ fun_l0_n95
+ fun_l0_n96
+ fun_l0_n97
+ fun_l0_n98
+ fun_l0_n99
+ fun_l0_n100
+ fun_l0_n101
+ fun_l0_n102
+ fun_l0_n103
+ fun_l0_n104
+ fun_l0_n105
+ fun_l0_n106
+ fun_l0_n107
+ fun_l0_n108
+ fun_l0_n109
+ fun_l0_n110
+ fun_l0_n111
+ fun_l0_n112
+ fun_l0_n113
+ fun_l0_n114
+ fun_l0_n115
+ fun_l0_n116
+ fun_l0_n117
+ fun_l0_n118
+ fun_l0_n119
+ fun_l0_n120
+ fun_l0_n121
+ fun_l0_n122
+ fun_l0_n123
+ fun_l0_n124
+ fun_l0_n125
+ fun_l0_n126
+ fun_l0_n127
+ fun_l0_n128
+ fun_l0_n129
+ fun_l0_n130
+ fun_l0_n131
+ fun_l0_n132
+ fun_l0_n133
+ fun_l0_n134
+ fun_l0_n135
+ fun_l0_n136
+ fun_l0_n137
+ fun_l0_n138
+ fun_l0_n139
+ fun_l0_n140
+ fun_l0_n141
+ fun_l0_n142
+ fun_l0_n143
+ fun_l0_n144
+ fun_l0_n145
+ fun_l0_n146
+ fun_l0_n147
+ fun_l0_n148
+ fun_l0_n149
+ fun_l0_n150
+ fun_l0_n151
+ fun_l0_n152
+ fun_l0_n153
+ fun_l0_n154
+ fun_l0_n155
+ fun_l0_n156
+ fun_l0_n157
+ fun_l0_n158
+ fun_l0_n159
+ fun_l0_n160
+ fun_l0_n161
+ fun_l0_n162
+ fun_l0_n163
+ fun_l0_n164
+ fun_l0_n165
+ fun_l0_n166
+ fun_l0_n167
+ fun_l0_n168
+ fun_l0_n169
+ fun_l0_n170
+ fun_l0_n171
+ fun_l0_n172
+ fun_l0_n173
+ fun_l0_n174
+ fun_l0_n175
+ fun_l0_n176
+ fun_l0_n177
+ fun_l0_n178
+ fun_l0_n179
+ fun_l0_n180
+ fun_l0_n181
+ fun_l0_n182
+ fun_l0_n183
+ fun_l0_n184
+ fun_l0_n185
+ fun_l0_n186
+ fun_l0_n187
+ fun_l0_n188
+ fun_l0_n189
+ fun_l0_n190
+ fun_l0_n191
+ fun_l0_n192
+ fun_l0_n193
+ fun_l0_n194
+ fun_l0_n195
+ fun_l0_n196
+ fun_l0_n197
+ fun_l0_n198
+ fun_l0_n199
+ fun_l0_n200
+ fun_l0_n201
+ fun_l0_n202
+ fun_l0_n203
+ fun_l0_n204
+ fun_l0_n205
+ fun_l0_n206
+ fun_l0_n207
+ fun_l0_n208
+ fun_l0_n209
+ fun_l0_n210
+ fun_l0_n211
+ fun_l0_n212
+ fun_l0_n213
+ fun_l0_n214
+ fun_l0_n215
+ fun_l0_n216
+ fun_l0_n217
+ fun_l0_n218
+ fun_l0_n219
+ fun_l0_n220
+ fun_l0_n221
+ fun_l0_n222
+ fun_l0_n223
+ fun_l0_n224
+ fun_l0_n225
+ fun_l0_n226
+ fun_l0_n227
+ fun_l0_n228
+ fun_l0_n229
+ fun_l0_n230
+ fun_l0_n231
+ fun_l0_n232
+ fun_l0_n233
+ fun_l0_n234
+ fun_l0_n235
+ fun_l0_n236
+ fun_l0_n237
+ fun_l0_n238
+ fun_l0_n239
+ fun_l0_n240
+ fun_l0_n241
+ fun_l0_n242
+ fun_l0_n243
+ fun_l0_n244
+ fun_l0_n245
+ fun_l0_n246
+ fun_l0_n247
+ fun_l0_n248
+ fun_l0_n249
+ fun_l0_n250
+ fun_l0_n251
+ fun_l0_n252
+ fun_l0_n253
+ fun_l0_n254
+ fun_l0_n255
+ fun_l0_n256
+ fun_l0_n257
+ fun_l0_n258
+ fun_l0_n259
+ fun_l0_n260
+ fun_l0_n261
+ fun_l0_n262
+ fun_l0_n263
+ fun_l0_n264
+ fun_l0_n265
+ fun_l0_n266
+ fun_l0_n267
+ fun_l0_n268
+ fun_l0_n269
+ fun_l0_n270
+ fun_l0_n271
+ fun_l0_n272
+ fun_l0_n273
+ fun_l0_n274
+ fun_l0_n275
+ fun_l0_n276
+ fun_l0_n277
+ fun_l0_n278
+ fun_l0_n279
+ fun_l0_n280
+ fun_l0_n281
+ fun_l0_n282
+ fun_l0_n283
+ fun_l0_n284
+ fun_l0_n285
+ fun_l0_n286
+ fun_l0_n287
+ fun_l0_n288
+ fun_l0_n289
+ fun_l0_n290
+ fun_l0_n291
+ fun_l0_n292
+ fun_l0_n293
+ fun_l0_n294
+ fun_l0_n295
+ fun_l0_n296
+ fun_l0_n297
+ fun_l0_n298
+ fun_l0_n299
+ fun_l0_n300
+ fun_l0_n301
+ fun_l0_n302
+ fun_l0_n303
+ fun_l0_n304
+ fun_l0_n305
+ fun_l0_n306
+ fun_l0_n307
+ fun_l0_n308
+ fun_l0_n309
+ fun_l0_n310
+ fun_l0_n311
+ fun_l0_n312
+ fun_l0_n313
+ fun_l0_n314
+ fun_l0_n315
+ fun_l0_n316
+ fun_l0_n317
+ fun_l0_n318
+ fun_l0_n319
+ fun_l0_n320
+ fun_l0_n321
+ fun_l0_n322
+ fun_l0_n323
+ fun_l0_n324
+ fun_l0_n325
+ fun_l0_n326
+ fun_l0_n327
+ fun_l0_n328
+ fun_l0_n329
+ fun_l0_n330
+ fun_l0_n331
+ fun_l0_n332
+ fun_l0_n333
+ fun_l0_n334
+ fun_l0_n335
+ fun_l0_n336
+ fun_l0_n337
+ fun_l0_n338
+ fun_l0_n339
+ fun_l0_n340
+ fun_l0_n341
+ fun_l0_n342
+ fun_l0_n343
+ fun_l0_n344
+ fun_l0_n345
+ fun_l0_n346
+ fun_l0_n347
+ fun_l0_n348
+ fun_l0_n349
+ fun_l0_n350
+ fun_l0_n351
+ fun_l0_n352
+ fun_l0_n353
+ fun_l0_n354
+ fun_l0_n355
+ fun_l0_n356
+ fun_l0_n357
+ fun_l0_n358
+ fun_l0_n359
+ fun_l0_n360
+ fun_l0_n361
+ fun_l0_n362
+ fun_l0_n363
+ fun_l0_n364
+ fun_l0_n365
+ fun_l0_n366
+ fun_l0_n367
+ fun_l0_n368
+ fun_l0_n369
+ fun_l0_n370
+ fun_l0_n371
+ fun_l0_n372
+ fun_l0_n373
+ fun_l0_n374
+ fun_l0_n375
+ fun_l0_n376
+ fun_l0_n377
+ fun_l0_n378
+ fun_l0_n379
+ fun_l0_n380
+ fun_l0_n381
+ fun_l0_n382
+ fun_l0_n383
+ fun_l0_n384
+ fun_l0_n385
+ fun_l0_n386
+ fun_l0_n387
+ fun_l0_n388
+ fun_l0_n389
+ fun_l0_n390
+ fun_l0_n391
+ fun_l0_n392
+ fun_l0_n393
+ fun_l0_n394
+ fun_l0_n395
+ fun_l0_n396
+ fun_l0_n397
+ fun_l0_n398
+ fun_l0_n399
+ fun_l0_n400
+ fun_l0_n401
+ fun_l0_n402
+ fun_l0_n403
+ fun_l0_n404
+ fun_l0_n405
+ fun_l0_n406
+ fun_l0_n407
+ fun_l0_n408
+ fun_l0_n409
+ fun_l0_n410
+ fun_l0_n411
+ fun_l0_n412
+ fun_l0_n413
+ fun_l0_n414
+ fun_l0_n415
+ fun_l0_n416
+ fun_l0_n417
+ fun_l0_n418
+ fun_l0_n419
+ fun_l0_n420
+ fun_l0_n421
+ fun_l0_n422
+ fun_l0_n423
+ fun_l0_n424
+ fun_l0_n425
+ fun_l0_n426
+ fun_l0_n427
+ fun_l0_n428
+ fun_l0_n429
+ fun_l0_n430
+ fun_l0_n431
+ fun_l0_n432
+ fun_l0_n433
+ fun_l0_n434
+ fun_l0_n435
+ fun_l0_n436
+ fun_l0_n437
+ fun_l0_n438
+ fun_l0_n439
+ fun_l0_n440
+ fun_l0_n441
+ fun_l0_n442
+ fun_l0_n443
+ fun_l0_n444
+ fun_l0_n445
+ fun_l0_n446
+ fun_l0_n447
+ fun_l0_n448
+ fun_l0_n449
+ fun_l0_n450
+ fun_l0_n451
+ fun_l0_n452
+ fun_l0_n453
+ fun_l0_n454
+ fun_l0_n455
+ fun_l0_n456
+ fun_l0_n457
+ fun_l0_n458
+ fun_l0_n459
+ fun_l0_n460
+ fun_l0_n461
+ fun_l0_n462
+ fun_l0_n463
+ fun_l0_n464
+ fun_l0_n465
+ fun_l0_n466
+ fun_l0_n467
+ fun_l0_n468
+ fun_l0_n469
+ fun_l0_n470
+ fun_l0_n471
+ fun_l0_n472
+ fun_l0_n473
+ fun_l0_n474
+ fun_l0_n475
+ fun_l0_n476
+ fun_l0_n477
+ fun_l0_n478
+ fun_l0_n479
+ fun_l0_n480
+ fun_l0_n481
+ fun_l0_n482
+ fun_l0_n483
+ fun_l0_n484
+ fun_l0_n485
+ fun_l0_n486
+ fun_l0_n487
+ fun_l0_n488
+ fun_l0_n489
+ fun_l0_n490
+ fun_l0_n491
+ fun_l0_n492
+ fun_l0_n493
+ fun_l0_n494
+ fun_l0_n495
+ fun_l0_n496
+ fun_l0_n497
+ fun_l0_n498
+ fun_l0_n499
+ fun_l0_n500
+ fun_l0_n501
+ fun_l0_n502
+ fun_l0_n503
+ fun_l0_n504
+ fun_l0_n505
+ fun_l0_n506
+ fun_l0_n507
+ fun_l0_n508
+ fun_l0_n509
+ fun_l0_n510
+ fun_l0_n511
+ fun_l0_n512
+ fun_l0_n513
+ fun_l0_n514
+ fun_l0_n515
+ fun_l0_n516
+ fun_l0_n517
+ fun_l0_n518
+ fun_l0_n519
+ fun_l0_n520
+ fun_l0_n521
+ fun_l0_n522
+ fun_l0_n523
+ fun_l0_n524
+ fun_l0_n525
+ fun_l0_n526
+ fun_l0_n527
+ fun_l0_n528
+ fun_l0_n529
+ fun_l0_n530
+ fun_l0_n531
+ fun_l0_n532
+ fun_l0_n533
+ fun_l0_n534
+ fun_l0_n535
+ fun_l0_n536
+ fun_l0_n537
+ fun_l0_n538
+ fun_l0_n539
+ fun_l0_n540
+ fun_l0_n541
+ fun_l0_n542
+ fun_l0_n543
+ fun_l0_n544
+ fun_l0_n545
+ fun_l0_n546
+ fun_l0_n547
+ fun_l0_n548
+ fun_l0_n549
+ fun_l0_n550
+ fun_l0_n551
+ fun_l0_n552
+ fun_l0_n553
+ fun_l0_n554
+ fun_l0_n555
+ fun_l0_n556
+ fun_l0_n557
+ fun_l0_n558
+ fun_l0_n559
+ fun_l0_n560
+ fun_l0_n561
+ fun_l0_n562
+ fun_l0_n563
+ fun_l0_n564
+ fun_l0_n565
+ fun_l0_n566
+ fun_l0_n567
+ fun_l0_n568
+ fun_l0_n569
+ fun_l0_n570
+ fun_l0_n571
+ fun_l0_n572
+ fun_l0_n573
+ fun_l0_n574
+ fun_l0_n575
+ fun_l0_n576
+ fun_l0_n577
+ fun_l0_n578
+ fun_l0_n579
+ fun_l0_n580
+ fun_l0_n581
+ fun_l0_n582
+ fun_l0_n583
+ fun_l0_n584
+ fun_l0_n585
+ fun_l0_n586
+ fun_l0_n587
+ fun_l0_n588
+ fun_l0_n589
+ fun_l0_n590
+ fun_l0_n591
+ fun_l0_n592
+ fun_l0_n593
+ fun_l0_n594
+ fun_l0_n595
+ fun_l0_n596
+ fun_l0_n597
+ fun_l0_n598
+ fun_l0_n599
+ fun_l0_n600
+ fun_l0_n601
+ fun_l0_n602
+ fun_l0_n603
+ fun_l0_n604
+ fun_l0_n605
+ fun_l0_n606
+ fun_l0_n607
+ fun_l0_n608
+ fun_l0_n609
+ fun_l0_n610
+ fun_l0_n611
+ fun_l0_n612
+ fun_l0_n613
+ fun_l0_n614
+ fun_l0_n615
+ fun_l0_n616
+ fun_l0_n617
+ fun_l0_n618
+ fun_l0_n619
+ fun_l0_n620
+ fun_l0_n621
+ fun_l0_n622
+ fun_l0_n623
+ fun_l0_n624
+ fun_l0_n625
+ fun_l0_n626
+ fun_l0_n627
+ fun_l0_n628
+ fun_l0_n629
+ fun_l0_n630
+ fun_l0_n631
+ fun_l0_n632
+ fun_l0_n633
+ fun_l0_n634
+ fun_l0_n635
+ fun_l0_n636
+ fun_l0_n637
+ fun_l0_n638
+ fun_l0_n639
+ fun_l0_n640
+ fun_l0_n641
+ fun_l0_n642
+ fun_l0_n643
+ fun_l0_n644
+ fun_l0_n645
+ fun_l0_n646
+ fun_l0_n647
+ fun_l0_n648
+ fun_l0_n649
+ fun_l0_n650
+ fun_l0_n651
+ fun_l0_n652
+ fun_l0_n653
+ fun_l0_n654
+ fun_l0_n655
+ fun_l0_n656
+ fun_l0_n657
+ fun_l0_n658
+ fun_l0_n659
+ fun_l0_n660
+ fun_l0_n661
+ fun_l0_n662
+ fun_l0_n663
+ fun_l0_n664
+ fun_l0_n665
+ fun_l0_n666
+ fun_l0_n667
+ fun_l0_n668
+ fun_l0_n669
+ fun_l0_n670
+ fun_l0_n671
+ fun_l0_n672
+ fun_l0_n673
+ fun_l0_n674
+ fun_l0_n675
+ fun_l0_n676
+ fun_l0_n677
+ fun_l0_n678
+ fun_l0_n679
+ fun_l0_n680
+ fun_l0_n681
+ fun_l0_n682
+ fun_l0_n683
+ fun_l0_n684
+ fun_l0_n685
+ fun_l0_n686
+ fun_l0_n687
+ fun_l0_n688
+ fun_l0_n689
+ fun_l0_n690
+ fun_l0_n691
+ fun_l0_n692
+ fun_l0_n693
+ fun_l0_n694
+ fun_l0_n695
+ fun_l0_n696
+ fun_l0_n697
+ fun_l0_n698
+ fun_l0_n699
+ fun_l0_n700
+ fun_l0_n701
+ fun_l0_n702
+ fun_l0_n703
+ fun_l0_n704
+ fun_l0_n705
+ fun_l0_n706
+ fun_l0_n707
+ fun_l0_n708
+ fun_l0_n709
+ fun_l0_n710
+ fun_l0_n711
+ fun_l0_n712
+ fun_l0_n713
+ fun_l0_n714
+ fun_l0_n715
+ fun_l0_n716
+ fun_l0_n717
+ fun_l0_n718
+ fun_l0_n719
+ fun_l0_n720
+ fun_l0_n721
+ fun_l0_n722
+ fun_l0_n723
+ fun_l0_n724
+ fun_l0_n725
+ fun_l0_n726
+ fun_l0_n727
+ fun_l0_n728
+ fun_l0_n729
+ fun_l0_n730
+ fun_l0_n731
+ fun_l0_n732
+ fun_l0_n733
+ fun_l0_n734
+ fun_l0_n735
+ fun_l0_n736
+ fun_l0_n737
+ fun_l0_n738
+ fun_l0_n739
+ fun_l0_n740
+ fun_l0_n741
+ fun_l0_n742
+ fun_l0_n743
+ fun_l0_n744
+ fun_l0_n745
+ fun_l0_n746
+ fun_l0_n747
+ fun_l0_n748
+ fun_l0_n749
+ fun_l0_n750
+ fun_l0_n751
+ fun_l0_n752
+ fun_l0_n753
+ fun_l0_n754
+ fun_l0_n755
+ fun_l0_n756
+ fun_l0_n757
+ fun_l0_n758
+ fun_l0_n759
+ fun_l0_n760
+ fun_l0_n761
+ fun_l0_n762
+ fun_l0_n763
+ fun_l0_n764
+ fun_l0_n765
+ fun_l0_n766
+ fun_l0_n767
+ fun_l0_n768
+ fun_l0_n769
+ fun_l0_n770
+ fun_l0_n771
+ fun_l0_n772
+ fun_l0_n773
+ fun_l0_n774
+ fun_l0_n775
+ fun_l0_n776
+ fun_l0_n777
+ fun_l0_n778
+ fun_l0_n779
+ fun_l0_n780
+ fun_l0_n781
+ fun_l0_n782
+ fun_l0_n783
+ fun_l0_n784
+ fun_l0_n785
+ fun_l0_n786
+ fun_l0_n787
+ fun_l0_n788
+ fun_l0_n789
+ fun_l0_n790
+ fun_l0_n791
+ fun_l0_n792
+ fun_l0_n793
+ fun_l0_n794
+ fun_l0_n795
+ fun_l0_n796
+ fun_l0_n797
+ fun_l0_n798
+ fun_l0_n799
+ fun_l0_n800
+ fun_l0_n801
+ fun_l0_n802
+ fun_l0_n803
+ fun_l0_n804
+ fun_l0_n805
+ fun_l0_n806
+ fun_l0_n807
+ fun_l0_n808
+ fun_l0_n809
+ fun_l0_n810
+ fun_l0_n811
+ fun_l0_n812
+ fun_l0_n813
+ fun_l0_n814
+ fun_l0_n815
+ fun_l0_n816
+ fun_l0_n817
+ fun_l0_n818
+ fun_l0_n819
+ fun_l0_n820
+ fun_l0_n821
+ fun_l0_n822
+ fun_l0_n823
+ fun_l0_n824
+ fun_l0_n825
+ fun_l0_n826
+ fun_l0_n827
+ fun_l0_n828
+ fun_l0_n829
+ fun_l0_n830
+ fun_l0_n831
+ fun_l0_n832
+ fun_l0_n833
+ fun_l0_n834
+ fun_l0_n835
+ fun_l0_n836
+ fun_l0_n837
+ fun_l0_n838
+ fun_l0_n839
+ fun_l0_n840
+ fun_l0_n841
+ fun_l0_n842
+ fun_l0_n843
+ fun_l0_n844
+ fun_l0_n845
+ fun_l0_n846
+ fun_l0_n847
+ fun_l0_n848
+ fun_l0_n849
+ fun_l0_n850
+ fun_l0_n851
+ fun_l0_n852
+ fun_l0_n853
+ fun_l0_n854
+ fun_l0_n855
+ fun_l0_n856
+ fun_l0_n857
+ fun_l0_n858
+ fun_l0_n859
+ fun_l0_n860
+ fun_l0_n861
+ fun_l0_n862
+ fun_l0_n863
+ fun_l0_n864
+ fun_l0_n865
+ fun_l0_n866
+ fun_l0_n867
+ fun_l0_n868
+ fun_l0_n869
+ fun_l0_n870
+ fun_l0_n871
+ fun_l0_n872
+ fun_l0_n873
+ fun_l0_n874
+ fun_l0_n875
+ fun_l0_n876
+ fun_l0_n877
+ fun_l0_n878
+ fun_l0_n879
+ fun_l0_n880
+ fun_l0_n881
+ fun_l0_n882
+ fun_l0_n883
+ fun_l0_n884
+ fun_l0_n885
+ fun_l0_n886
+ fun_l0_n887
+ fun_l0_n888
+ fun_l0_n889
+ fun_l0_n890
+ fun_l0_n891
+ fun_l0_n892
+ fun_l0_n893
+ fun_l0_n894
+ fun_l0_n895
+ fun_l0_n896
+ fun_l0_n897
+ fun_l0_n898
+ fun_l0_n899
+ fun_l0_n900
+ fun_l0_n901
+ fun_l0_n902
+ fun_l0_n903
+ fun_l0_n904
+ fun_l0_n905
+ fun_l0_n906
+ fun_l0_n907
+ fun_l0_n908
+ fun_l0_n909
+ fun_l0_n910
+ fun_l0_n911
+ fun_l0_n912
+ fun_l0_n913
+ fun_l0_n914
+ fun_l0_n915
+ fun_l0_n916
+ fun_l0_n917
+ fun_l0_n918
+ fun_l0_n919
+ fun_l0_n920
+ fun_l0_n921
+ fun_l0_n922
+ fun_l0_n923
+ fun_l0_n924
+ fun_l0_n925
+ fun_l0_n926
+ fun_l0_n927
+ fun_l0_n928
+ fun_l0_n929
+ fun_l0_n930
+ fun_l0_n931
+ fun_l0_n932
+ fun_l0_n933
+ fun_l0_n934
+ fun_l0_n935
+ fun_l0_n936
+ fun_l0_n937
+ fun_l0_n938
+ fun_l0_n939
+ fun_l0_n940
+ fun_l0_n941
+ fun_l0_n942
+ fun_l0_n943
+ fun_l0_n944
+ fun_l0_n945
+ fun_l0_n946
+ fun_l0_n947
+ fun_l0_n948
+ fun_l0_n949
+ fun_l0_n950
+ fun_l0_n951
+ fun_l0_n952
+ fun_l0_n953
+ fun_l0_n954
+ fun_l0_n955
+ fun_l0_n956
+ fun_l0_n957
+ fun_l0_n958
+ fun_l0_n959
+ fun_l0_n960
+ fun_l0_n961
+ fun_l0_n962
+ fun_l0_n963
+ fun_l0_n964
+ fun_l0_n965
+ fun_l0_n966
+ fun_l0_n967
+ fun_l0_n968
+ fun_l0_n969
+ fun_l0_n970
+ fun_l0_n971
+ fun_l0_n972
+ fun_l0_n973
+ fun_l0_n974
+ fun_l0_n975
+ fun_l0_n976
+ fun_l0_n977
+ fun_l0_n978
+ fun_l0_n979
+ fun_l0_n980
+ fun_l0_n981
+ fun_l0_n982
+ fun_l0_n983
+ fun_l0_n984
+ fun_l0_n985
+ fun_l0_n986
+ fun_l0_n987
+ fun_l0_n988
+ fun_l0_n989
+ fun_l0_n990
+ fun_l0_n991
+ fun_l0_n992
+ fun_l0_n993
+ fun_l0_n994
+ fun_l0_n995
+ fun_l0_n996
+ fun_l0_n997
+ fun_l0_n998
+ fun_l0_n999
+end
+
+@count
+
+}
diff --git a/bootstraptest/test_yjit_rust_port.rb b/bootstraptest/test_yjit_rust_port.rb
new file mode 100644
index 0000000000..e399e0e49e
--- /dev/null
+++ b/bootstraptest/test_yjit_rust_port.rb
@@ -0,0 +1,422 @@
+# Simple tests that we know we can pass
+# To keep track of what we got working during the Rust port
+# And avoid breaking/losing functionality
+#
+# Say "Thread" here to dodge WASM CI check. We use ractors here
+# which WASM doesn't support and it only greps for "Thread".
+
+# Test for opt_mod
+assert_equal '2', %q{
+ def mod(a, b)
+ a % b
+ end
+
+ mod(7, 5)
+ mod(7, 5)
+}
+
+# Test for opt_mult
+assert_equal '12', %q{
+ def mult(a, b)
+ a * b
+ end
+
+ mult(6, 2)
+ mult(6, 2)
+}
+
+# Test for opt_div
+assert_equal '3', %q{
+ def div(a, b)
+ a / b
+ end
+
+ div(6, 2)
+ div(6, 2)
+}
+
+assert_equal '5', %q{
+ def plus(a, b)
+ a + b
+ end
+
+ plus(3, 2)
+}
+
+assert_equal '1', %q{
+ def foo(a, b)
+ a - b
+ end
+
+ foo(3, 2)
+}
+
+assert_equal 'true', %q{
+ def foo(a, b)
+ a < b
+ end
+
+ foo(2, 3)
+}
+
+# Bitwise left shift
+assert_equal '4', %q{
+ def foo(a, b)
+ 1 << 2
+ end
+
+ foo(1, 2)
+}
+
+assert_equal '-7', %q{
+ def foo(a, b)
+ -7
+ end
+
+ foo(1, 2)
+}
+
+# Putstring
+assert_equal 'foo', %q{
+ def foo(a, b)
+ "foo"
+ end
+
+ foo(1, 2)
+}
+
+assert_equal '-6', %q{
+ def foo(a, b)
+ a + -7
+ end
+
+ foo(1, 2)
+}
+
+assert_equal 'true', %q{
+ def foo(a, b)
+ a == b
+ end
+
+ foo(3, 3)
+}
+
+assert_equal 'true', %q{
+ def foo(a, b)
+ a < b
+ end
+
+ foo(3, 5)
+}
+
+assert_equal '777', %q{
+ def foo(a)
+ if a
+ 777
+ else
+ 333
+ end
+ end
+
+ foo(true)
+}
+
+assert_equal '5', %q{
+ def foo(a, b)
+ while a < b
+ a += 1
+ end
+ a
+ end
+
+ foo(1, 5)
+}
+
+# opt_aref
+assert_equal '2', %q{
+ def foo(a, b)
+ a[b]
+ end
+
+ foo([0, 1, 2], 2)
+}
+
+# Simple function calls with 0, 1, 2 arguments
+assert_equal '-2', %q{
+ def bar()
+ -2
+ end
+
+ def foo(a, b)
+ bar()
+ end
+
+ foo(3, 2)
+}
+assert_equal '2', %q{
+ def bar(a)
+ a
+ end
+
+ def foo(a, b)
+ bar(b)
+ end
+
+ foo(3, 2)
+}
+assert_equal '1', %q{
+ def bar(a, b)
+ a - b
+ end
+
+ def foo(a, b)
+ bar(a, b)
+ end
+
+ foo(3, 2)
+}
+
+# Regression test for assembler bug
+assert_equal '1', %q{
+ def check_index(index)
+ if 0x40000000 < index
+ return -1
+ end
+ 1
+ end
+
+ check_index 2
+}
+
+# Setivar test
+assert_equal '2', %q{
+ class Klass
+ attr_accessor :a
+
+ def set()
+ @a = 2
+ end
+
+ def get()
+ @a
+ end
+ end
+
+ o = Klass.new
+ o.set()
+ o.a
+}
+
+# Regression for putobject bug
+assert_equal '1.5', %q{
+ def foo(x)
+ x
+ end
+
+ def bar
+ foo(1.5)
+ end
+
+ bar()
+}
+
+# Getivar with an extended ivar table
+assert_equal '3', %q{
+ class Foo
+ def initialize
+ @x1 = 1
+ @x2 = 1
+ @x3 = 1
+ @x4 = 3
+ end
+
+ def bar
+ @x4
+ end
+ end
+
+ f = Foo.new
+ f.bar
+}
+
+assert_equal 'true', %q{
+ x = [[false, true]]
+ for i, j in x
+ ;
+ end
+ j
+}
+
+# Regression for getivar
+assert_equal '[nil]', %q{
+ [TrueClass].each do |klass|
+ klass.class_eval("def foo = @foo")
+ end
+
+ [true].map do |instance|
+ instance.foo
+ end
+}
+
+# Regression for send
+assert_equal 'ok', %q{
+ def bar(baz: 2)
+ baz
+ end
+
+ def foo
+ bar(1, baz: 123)
+ end
+
+ begin
+ foo
+ foo
+ rescue ArgumentError => e
+ print "ok"
+ end
+}
+
+# Array access regression test
+assert_equal '[0, 1, 2, 3, 4, 5]', %q{
+ def expandarray_useless_splat
+ arr = [0, 1, 2, 3, 4, 5]
+ a, * = arr
+ end
+
+ expandarray_useless_splat
+}
+
+# Make sure we're correctly reading RStruct's as.ary union for embedded RStructs
+assert_equal '3,12', %q{
+ pt_struct = Struct.new(:x, :y)
+ p = pt_struct.new(3, 12)
+ def pt_inspect(pt)
+ "#{pt.x},#{pt.y}"
+ end
+
+ # Make sure pt_inspect is JITted
+ 10.times { pt_inspect(p) }
+
+ # Make sure it's returning '3,12' instead of e.g. '3,false'
+ pt_inspect(p)
+}
+
+assert_equal '2', %q{
+ def foo(s)
+ s.foo
+ end
+
+ S = Struct.new(:foo)
+ foo(S.new(1))
+ foo(S.new(2))
+}
+
+# Try to compile new method while OOM
+assert_equal 'ok', %q{
+ def foo
+ :ok
+ end
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ foo
+}
+
+# test hitting a branch stub when out of memory
+assert_equal 'ok', %q{
+ def nimai(jita)
+ if jita
+ :ng
+ else
+ :ok
+ end
+ end
+
+ nimai(true)
+ nimai(true)
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ nimai(false)
+}
+
+# Ractor.current returns a current ractor
+assert_equal 'Ractor', %q{
+ Ractor.current.class
+}
+
+# Ractor.new returns new Ractor
+assert_equal 'Ractor', %q{
+ Ractor.new{}.class
+}
+
+# Ractor.allocate is not supported
+assert_equal "[:ok, :ok]", %q{
+ rs = []
+ begin
+ Ractor.allocate
+ rescue => e
+ rs << :ok if e.message == 'allocator undefined for Ractor'
+ end
+
+ begin
+ Ractor.new{}.dup
+ rescue
+ rs << :ok if e.message == 'allocator undefined for Ractor'
+ end
+
+ rs
+}
+
+# A return value of a Ractor block will be a message from the Ractor.
+assert_equal 'ok', %q{
+ # join
+ r = Ractor.new do
+ 'ok'
+ end
+ r.take
+}
+
+# Passed arguments to Ractor.new will be a block parameter
+# The values are passed with Ractor-communication pass.
+assert_equal 'ok', %q{
+ # ping-pong with arg
+ r = Ractor.new 'ok' do |msg|
+ msg
+ end
+ r.take
+}
+
+# Pass multiple arguments to Ractor.new
+assert_equal 'ok', %q{
+ # ping-pong with two args
+ r = Ractor.new 'ping', 'pong' do |msg, msg2|
+ [msg, msg2]
+ end
+ 'ok' if r.take == ['ping', 'pong']
+}
+
+# Ractor#send passes an object with copy to a Ractor
+# and Ractor.receive in the Ractor block can receive the passed value.
+assert_equal 'ok', %q{
+ r = Ractor.new do
+ msg = Ractor.receive
+ end
+ r.send 'ok'
+ r.take
+}
+
+assert_equal '[1, 2, 3]', %q{
+ def foo(arr)
+ arr << 1
+ arr << 2
+ arr << 3
+ arr
+ end
+
+ def bar()
+ foo([])
+ end
+
+ bar()
+}
diff --git a/builtin.c b/builtin.c
index 67b43c7f5c..21fff95650 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3,7 +3,7 @@
#include "iseq.h"
#include "builtin.h"
-#if CROSS_COMPILING
+#ifdef CROSS_COMPILING
#define INCLUDED_BY_BUILTIN_C 1
#include "mini_builtin.c"
@@ -12,27 +12,24 @@
#include "builtin_binary.inc"
+static const unsigned char *
+bin4feature(const struct builtin_binary *bb, const char *feature, size_t *psize)
+{
+ *psize = bb->bin_size;
+ return strcmp(bb->feature, feature) ? NULL : bb->bin;
+}
+
static const unsigned char*
builtin_lookup(const char *feature, size_t *psize)
{
static int index = 0;
- int i = index++;
+ const unsigned char *bin = bin4feature(&builtin_binary[index++], feature, psize);
// usually, `builtin_binary` order is loading order at miniruby.
- if (LIKELY(strcmp(builtin_binary[i].feature, feature) == 0)) {
- found:
- *psize = builtin_binary[i].bin_size;
- return builtin_binary[i].bin;
+ for (const struct builtin_binary *bb = &builtin_binary[0]; bb->feature &&! bin; bb++) {
+ bin = bin4feature(bb++, feature, psize);
}
- else {
- if (0) fprintf(stderr, "builtin_lookup: cached index miss (index:%d)\n", i);
- for (i=0; i<BUILTIN_BINARY_SIZE; i++) {
- if (strcmp(builtin_binary[i].feature, feature) == 0) {
- goto found;
- }
- }
- }
- rb_bug("builtin_lookup: can not find %s\n", feature);
+ return bin;
}
void
@@ -41,6 +38,9 @@ rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin
// search binary
size_t size;
const unsigned char *bin = builtin_lookup(feature_name, &size);
+ if (! bin) {
+ rb_bug("builtin_lookup: can not find %s\n", feature_name);
+ }
// load binary
rb_vm_t *vm = GET_VM();
@@ -51,7 +51,7 @@ rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin
vm->builtin_function_table = NULL;
// exec
- rb_iseq_eval(iseq);
+ rb_iseq_eval(rb_iseq_check(iseq));
}
#endif
diff --git a/builtin.h b/builtin.h
index f4d485e08d..38ad5a1629 100644
--- a/builtin.h
+++ b/builtin.h
@@ -11,46 +11,89 @@ struct rb_builtin_function {
// for load
const int index;
const char * const name;
+
+ // for jit
+ void (*compiler)(VALUE, long, unsigned, bool);
};
-#define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity) { \
- .name = #_name, \
+#define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity, _compiler) {\
+ .name = _i < 0 ? NULL : #_name, \
.func_ptr = (void *)_fname, \
.argc = _arity, \
- .index = _i \
+ .index = _i, \
+ .compiler = _compiler, \
}
void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
-#ifndef VM_CORE_H_EC_DEFINED
+#ifndef rb_execution_context_t
typedef struct rb_execution_context_struct rb_execution_context_t;
+#define rb_execution_context_t rb_execution_context_t
#endif
/* The following code is generated by the following Ruby script:
+typedef = proc {|i, args|
+ "typedef VALUE (*rb_builtin_arity#{i}_function_type)(rb_execution_context_t *ec, VALUE self#{args});"
+}
+puts typedef[0, ""]
+(1..15).each {|i|
+ puts typedef[i, ",\n " + (0...i).map{"VALUE"}.join(", ")]
+}
16.times{|i|
- args = (i > 0 ? ', ' : '') + (0...i).map{"VALUE"}.join(', ')
- puts "static inline void rb_builtin_function_check_arity#{i}(VALUE (*f)(rb_execution_context_t *ec, VALUE self#{args})){}"
+ puts "static inline void rb_builtin_function_check_arity#{i}(rb_builtin_arity#{i}_function_type f){}"
}
*/
-static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
-static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
-static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
-
+typedef VALUE (*rb_builtin_arity0_function_type)(rb_execution_context_t *ec, VALUE self);
+typedef VALUE (*rb_builtin_arity1_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE);
+typedef VALUE (*rb_builtin_arity2_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity3_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity4_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity5_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity6_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity7_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity8_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity9_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity10_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity11_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity12_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity13_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity14_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+typedef VALUE (*rb_builtin_arity15_function_type)(rb_execution_context_t *ec, VALUE self,
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
+static inline void rb_builtin_function_check_arity0(rb_builtin_arity0_function_type f){}
+static inline void rb_builtin_function_check_arity1(rb_builtin_arity1_function_type f){}
+static inline void rb_builtin_function_check_arity2(rb_builtin_arity2_function_type f){}
+static inline void rb_builtin_function_check_arity3(rb_builtin_arity3_function_type f){}
+static inline void rb_builtin_function_check_arity4(rb_builtin_arity4_function_type f){}
+static inline void rb_builtin_function_check_arity5(rb_builtin_arity5_function_type f){}
+static inline void rb_builtin_function_check_arity6(rb_builtin_arity6_function_type f){}
+static inline void rb_builtin_function_check_arity7(rb_builtin_arity7_function_type f){}
+static inline void rb_builtin_function_check_arity8(rb_builtin_arity8_function_type f){}
+static inline void rb_builtin_function_check_arity9(rb_builtin_arity9_function_type f){}
+static inline void rb_builtin_function_check_arity10(rb_builtin_arity10_function_type f){}
+static inline void rb_builtin_function_check_arity11(rb_builtin_arity11_function_type f){}
+static inline void rb_builtin_function_check_arity12(rb_builtin_arity12_function_type f){}
+static inline void rb_builtin_function_check_arity13(rb_builtin_arity13_function_type f){}
+static inline void rb_builtin_function_check_arity14(rb_builtin_arity14_function_type f){}
+static inline void rb_builtin_function_check_arity15(rb_builtin_arity15_function_type f){}
+
+PUREFUNC(VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index));
VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
// __builtin_inline!
@@ -60,7 +103,7 @@ PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
static inline VALUE
rb_vm_lvar(rb_execution_context_t *ec, int index)
{
-#if VM_CORE_H_EC_DEFINED
+#if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
return ec->cfp->ep[index];
#else
return rb_vm_lvar_exposed(ec, index);
diff --git a/ccan/build_assert/build_assert.h b/ccan/build_assert/build_assert.h
index a04d1d4709..b846849241 100644
--- a/ccan/build_assert/build_assert.h
+++ b/ccan/build_assert/build_assert.h
@@ -3,7 +3,7 @@
#define CCAN_BUILD_ASSERT_H
/**
- * BUILD_ASSERT - assert a build-time dependency.
+ * CCAN_BUILD_ASSERT - assert a build-time dependency.
* @cond: the compile-time condition which must be true.
*
* Your compile will fail if the condition isn't true, or can't be evaluated
@@ -15,15 +15,15 @@
* static char *foo_to_char(struct foo *foo)
* {
* // This code needs string to be at start of foo.
- * BUILD_ASSERT(offsetof(struct foo, string) == 0);
+ * CCAN_BUILD_ASSERT(offsetof(struct foo, string) == 0);
* return (char *)foo;
* }
*/
-#define BUILD_ASSERT(cond) \
+#define CCAN_BUILD_ASSERT(cond) \
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
/**
- * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
+ * CCAN_BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
* @cond: the compile-time condition which must be true.
*
* Your compile will fail if the condition isn't true, or can't be evaluated
@@ -32,9 +32,9 @@
* Example:
* #define foo_to_char(foo) \
* ((char *)(foo) \
- * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
+ * + CCAN_BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
*/
-#define BUILD_ASSERT_OR_ZERO(cond) \
+#define CCAN_BUILD_ASSERT_OR_ZERO(cond) \
(sizeof(char [1 - 2*!(cond)]) - 1)
#endif /* CCAN_BUILD_ASSERT_H */
diff --git a/ccan/check_type/check_type.h b/ccan/check_type/check_type.h
index 1f77a535e4..659e1a5a83 100644
--- a/ccan/check_type/check_type.h
+++ b/ccan/check_type/check_type.h
@@ -3,7 +3,7 @@
#define CCAN_CHECK_TYPE_H
/**
- * check_type - issue a warning or build failure if type is not correct.
+ * ccan_check_type - issue a warning or build failure if type is not correct.
* @expr: the expression whose type we should check (not evaluated).
* @type: the exact type we expect the expression to be.
*
@@ -11,7 +11,7 @@
* argument is of the expected type. No type promotion of the expression is
* done: an unsigned int is not the same as an int!
*
- * check_type() always evaluates to 0.
+ * ccan_check_type() always evaluates to 0.
*
* If your compiler does not support typeof, then the best we can do is fail
* to compile if the sizes of the types are unequal (a less complete check).
@@ -19,11 +19,11 @@
* Example:
* // They should always pass a 64-bit value to _set_some_value!
* #define set_some_value(expr) \
- * _set_some_value((check_type((expr), uint64_t), (expr)))
+ * _set_some_value((ccan_check_type((expr), uint64_t), (expr)))
*/
/**
- * check_types_match - issue a warning or build failure if types are not same.
+ * ccan_check_types_match - issue a warning or build failure if types are not same.
* @expr1: the first expression (not evaluated).
* @expr2: the second expression (not evaluated).
*
@@ -31,7 +31,7 @@
* arguments are of identical types. No type promotion of the expressions is
* done: an unsigned int is not the same as an int!
*
- * check_types_match() always evaluates to 0.
+ * ccan_check_types_match() always evaluates to 0.
*
* If your compiler does not support typeof, then the best we can do is fail
* to compile if the sizes of the types are unequal (a less complete check).
@@ -39,25 +39,25 @@
* Example:
* // Do subtraction to get to enclosing type, but make sure that
* // pointer is of correct type for that member.
- * #define container_of(mbr_ptr, encl_type, mbr) \
- * (check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
+ * #define ccan_container_of(mbr_ptr, encl_type, mbr) \
+ * (ccan_check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
* ((encl_type *) \
* ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
*/
-#if HAVE_TYPEOF
-#define check_type(expr, type) \
+#if defined(HAVE_TYPEOF) && HAVE_TYPEOF
+#define ccan_check_type(expr, type) \
((typeof(expr) *)0 != (type *)0)
-#define check_types_match(expr1, expr2) \
+#define ccan_check_types_match(expr1, expr2) \
((typeof(expr1) *)0 != (typeof(expr2) *)0)
#else
#include "ccan/build_assert/build_assert.h"
/* Without typeof, we can only test the sizes. */
-#define check_type(expr, type) \
- BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
+#define ccan_check_type(expr, type) \
+ CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
-#define check_types_match(expr1, expr2) \
- BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
+#define ccan_check_types_match(expr1, expr2) \
+ CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
#endif /* HAVE_TYPEOF */
#endif /* CCAN_CHECK_TYPE_H */
diff --git a/ccan/container_of/container_of.h b/ccan/container_of/container_of.h
index ae3e1fc81f..872bb6ea6e 100644
--- a/ccan/container_of/container_of.h
+++ b/ccan/container_of/container_of.h
@@ -4,7 +4,7 @@
#include "ccan/check_type/check_type.h"
/**
- * container_of - get pointer to enclosing structure
+ * ccan_container_of - get pointer to enclosing structure
* @member_ptr: pointer to the structure member
* @containing_type: the type this member is within
* @member: the name of this member within the structure.
@@ -24,18 +24,18 @@
*
* static struct info *foo_to_info(struct foo *foo)
* {
- * return container_of(foo, struct info, my_foo);
+ * return ccan_container_of(foo, struct info, my_foo);
* }
*/
-#define container_of(member_ptr, containing_type, member) \
+#define ccan_container_of(member_ptr, containing_type, member) \
((containing_type *) \
((char *)(member_ptr) \
- - container_off(containing_type, member)) \
- + check_types_match(*(member_ptr), ((containing_type *)0)->member))
+ - ccan_container_off(containing_type, member)) \
+ + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
/**
- * container_of_or_null - get pointer to enclosing structure, or NULL
+ * ccan_container_of_or_null - get pointer to enclosing structure, or NULL
* @member_ptr: pointer to the structure member
* @containing_type: the type this member is within
* @member: the name of this member within the structure.
@@ -56,21 +56,21 @@
*
* static struct info *foo_to_info_allowing_null(struct foo *foo)
* {
- * return container_of_or_null(foo, struct info, my_foo);
+ * return ccan_container_of_or_null(foo, struct info, my_foo);
* }
*/
static inline char *container_of_or_null_(void *member_ptr, size_t offset)
{
return member_ptr ? (char *)member_ptr - offset : NULL;
}
-#define container_of_or_null(member_ptr, containing_type, member) \
+#define ccan_container_of_or_null(member_ptr, containing_type, member) \
((containing_type *) \
- container_of_or_null_(member_ptr, \
- container_off(containing_type, member)) \
- + check_types_match(*(member_ptr), ((containing_type *)0)->member))
+ ccan_container_of_or_null_(member_ptr, \
+ ccan_container_off(containing_type, member)) \
+ + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
/**
- * container_off - get offset to enclosing structure
+ * ccan_container_off - get offset to enclosing structure
* @containing_type: the type this member is within
* @member: the name of this member within the structure.
*
@@ -89,15 +89,15 @@ static inline char *container_of_or_null_(void *member_ptr, size_t offset)
*
* static struct info *foo_to_info(struct foo *foo)
* {
- * size_t off = container_off(struct info, my_foo);
+ * size_t off = ccan_container_off(struct info, my_foo);
* return (void *)((char *)foo - off);
* }
*/
-#define container_off(containing_type, member) \
+#define ccan_container_off(containing_type, member) \
offsetof(containing_type, member)
/**
- * container_of_var - get pointer to enclosing structure using a variable
+ * ccan_container_of_var - get pointer to enclosing structure using a variable
* @member_ptr: pointer to the structure member
* @container_var: a pointer of same type as this member's container
* @member: the name of this member within the structure.
@@ -108,21 +108,21 @@ static inline char *container_of_or_null_(void *member_ptr, size_t offset)
* Example:
* static struct info *foo_to_i(struct foo *foo)
* {
- * struct info *i = container_of_var(foo, i, my_foo);
+ * struct info *i = ccan_container_of_var(foo, i, my_foo);
* return i;
* }
*/
-#if HAVE_TYPEOF
-#define container_of_var(member_ptr, container_var, member) \
- container_of(member_ptr, typeof(*container_var), member)
+#if defined(HAVE_TYPEOF) && HAVE_TYPEOF
+#define ccan_container_of_var(member_ptr, container_var, member) \
+ ccan_container_of(member_ptr, typeof(*container_var), member)
#else
-#define container_of_var(member_ptr, container_var, member) \
+#define ccan_container_of_var(member_ptr, container_var, member) \
((void *)((char *)(member_ptr) - \
- container_off_var(container_var, member)))
+ ccan_container_off_var(container_var, member)))
#endif
/**
- * container_off_var - get offset of a field in enclosing structure
+ * ccan_container_off_var - get offset of a field in enclosing structure
* @container_var: a pointer to a container structure
* @member: the name of a member within the structure.
*
@@ -131,11 +131,11 @@ static inline char *container_of_or_null_(void *member_ptr, size_t offset)
* structure memory layout.
*
*/
-#if HAVE_TYPEOF
-#define container_off_var(var, member) \
- container_off(typeof(*var), member)
+#if defined(HAVE_TYPEOF) && HAVE_TYPEOF
+#define ccan_container_off_var(var, member) \
+ ccan_container_off(typeof(*var), member)
#else
-#define container_off_var(var, member) \
+#define ccan_container_off_var(var, member) \
((const char *)&(var)->member - (const char *)(var))
#endif
diff --git a/ccan/list/list.h b/ccan/list/list.h
index 7d219307bc..30b2af04e9 100644
--- a/ccan/list/list.h
+++ b/ccan/list/list.h
@@ -7,7 +7,7 @@
#include "ccan/check_type/check_type.h"
/**
- * struct list_node - an entry in a doubly-linked list
+ * struct ccan_list_node - an entry in a doubly-linked list
* @next: next entry (self if empty)
* @prev: previous entry (self if empty)
*
@@ -16,209 +16,209 @@
* struct child {
* const char *name;
* // Linked list of all us children.
- * struct list_node list;
+ * struct ccan_list_node list;
* };
*/
-struct list_node
+struct ccan_list_node
{
- struct list_node *next, *prev;
+ struct ccan_list_node *next, *prev;
};
/**
- * struct list_head - the head of a doubly-linked list
- * @h: the list_head (containing next and prev pointers)
+ * struct ccan_list_head - the head of a doubly-linked list
+ * @h: the ccan_list_head (containing next and prev pointers)
*
* This is used as the head of a linked list.
* Example:
* struct parent {
* const char *name;
- * struct list_head children;
+ * struct ccan_list_head children;
* unsigned int num_children;
* };
*/
-struct list_head
+struct ccan_list_head
{
- struct list_node n;
+ struct ccan_list_node n;
};
-#define LIST_LOC __FILE__ ":" stringify(__LINE__)
-#define list_debug(h, loc) ((void)loc, h)
-#define list_debug_node(n, loc) ((void)loc, n)
+#define CCAN_LIST_LOC __FILE__ ":" ccan_stringify(__LINE__)
+#define ccan_list_debug(h, loc) ((void)loc, h)
+#define ccan_list_debug_node(n, loc) ((void)loc, n)
/**
- * LIST_HEAD_INIT - initializer for an empty list_head
+ * CCAN_LIST_HEAD_INIT - initializer for an empty ccan_list_head
* @name: the name of the list.
*
* Explicit initializer for an empty list.
*
* See also:
- * LIST_HEAD, list_head_init()
+ * CCAN_LIST_HEAD, ccan_list_head_init()
*
* Example:
- * static struct list_head my_list = LIST_HEAD_INIT(my_list);
+ * static struct ccan_list_head my_list = CCAN_LIST_HEAD_INIT(my_list);
*/
-#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
+#define CCAN_LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
/**
- * LIST_HEAD - define and initialize an empty list_head
+ * CCAN_LIST_HEAD - define and initialize an empty ccan_list_head
* @name: the name of the list.
*
- * The LIST_HEAD macro defines a list_head and initializes it to an empty
- * list. It can be prepended by "static" to define a static list_head.
+ * The CCAN_LIST_HEAD macro defines a ccan_list_head and initializes it to an empty
+ * list. It can be prepended by "static" to define a static ccan_list_head.
*
* See also:
- * LIST_HEAD_INIT, list_head_init()
+ * CCAN_LIST_HEAD_INIT, ccan_list_head_init()
*
* Example:
- * static LIST_HEAD(my_global_list);
+ * static CCAN_LIST_HEAD(my_global_list);
*/
-#define LIST_HEAD(name) \
- struct list_head name = LIST_HEAD_INIT(name)
+#define CCAN_LIST_HEAD(name) \
+ struct ccan_list_head name = CCAN_LIST_HEAD_INIT(name)
/**
- * list_head_init - initialize a list_head
- * @h: the list_head to set to the empty list
+ * ccan_list_head_init - initialize a ccan_list_head
+ * @h: the ccan_list_head to set to the empty list
*
* Example:
* ...
* struct parent *parent = malloc(sizeof(*parent));
*
- * list_head_init(&parent->children);
+ * ccan_list_head_init(&parent->children);
* parent->num_children = 0;
*/
-static inline void list_head_init(struct list_head *h)
+static inline void ccan_list_head_init(struct ccan_list_head *h)
{
h->n.next = h->n.prev = &h->n;
}
/**
- * list_node_init - initialize a list_node
- * @n: the list_node to link to itself.
+ * ccan_list_node_init - initialize a ccan_list_node
+ * @n: the ccan_list_node to link to itself.
*
- * You don't need to use this normally! But it lets you list_del(@n)
+ * You don't need to use this normally! But it lets you ccan_list_del(@n)
* safely.
*/
-static inline void list_node_init(struct list_node *n)
+static inline void ccan_list_node_init(struct ccan_list_node *n)
{
n->next = n->prev = n;
}
/**
- * list_add_after - add an entry after an existing node in a linked list
- * @h: the list_head to add the node to (for debugging)
- * @p: the existing list_node to add the node after
- * @n: the new list_node to add to the list.
+ * ccan_list_add_after - add an entry after an existing node in a linked list
+ * @h: the ccan_list_head to add the node to (for debugging)
+ * @p: the existing ccan_list_node to add the node after
+ * @n: the new ccan_list_node to add to the list.
*
- * The existing list_node must already be a member of the list.
- * The new list_node does not need to be initialized; it will be overwritten.
+ * The existing ccan_list_node must already be a member of the list.
+ * The new ccan_list_node does not need to be initialized; it will be overwritten.
*
* Example:
* struct child c1, c2, c3;
- * LIST_HEAD(h);
+ * CCAN_LIST_HEAD(h);
*
- * list_add_tail(&h, &c1.list);
- * list_add_tail(&h, &c3.list);
- * list_add_after(&h, &c1.list, &c2.list);
+ * ccan_list_add_tail(&h, &c1.list);
+ * ccan_list_add_tail(&h, &c3.list);
+ * ccan_list_add_after(&h, &c1.list, &c2.list);
*/
-#define list_add_after(h, p, n) list_add_after_(h, p, n, LIST_LOC)
-static inline void list_add_after_(struct list_head *h,
- struct list_node *p,
- struct list_node *n,
+#define ccan_list_add_after(h, p, n) ccan_list_add_after_(h, p, n, CCAN_LIST_LOC)
+static inline void ccan_list_add_after_(struct ccan_list_head *h,
+ struct ccan_list_node *p,
+ struct ccan_list_node *n,
const char *abortstr)
{
n->next = p->next;
n->prev = p;
p->next->prev = n;
p->next = n;
- (void)list_debug(h, abortstr);
+ (void)ccan_list_debug(h, abortstr);
}
/**
- * list_add - add an entry at the start of a linked list.
- * @h: the list_head to add the node to
- * @n: the list_node to add to the list.
+ * ccan_list_add - add an entry at the start of a linked list.
+ * @h: the ccan_list_head to add the node to
+ * @n: the ccan_list_node to add to the list.
*
- * The list_node does not need to be initialized; it will be overwritten.
+ * The ccan_list_node does not need to be initialized; it will be overwritten.
* Example:
* struct child *child = malloc(sizeof(*child));
*
* child->name = "marvin";
- * list_add(&parent->children, &child->list);
+ * ccan_list_add(&parent->children, &child->list);
* parent->num_children++;
*/
-#define list_add(h, n) list_add_(h, n, LIST_LOC)
-static inline void list_add_(struct list_head *h,
- struct list_node *n,
+#define ccan_list_add(h, n) ccan_list_add_(h, n, CCAN_LIST_LOC)
+static inline void ccan_list_add_(struct ccan_list_head *h,
+ struct ccan_list_node *n,
const char *abortstr)
{
- list_add_after_(h, &h->n, n, abortstr);
+ ccan_list_add_after_(h, &h->n, n, abortstr);
}
/**
- * list_add_before - add an entry before an existing node in a linked list
- * @h: the list_head to add the node to (for debugging)
- * @p: the existing list_node to add the node before
- * @n: the new list_node to add to the list.
+ * ccan_list_add_before - add an entry before an existing node in a linked list
+ * @h: the ccan_list_head to add the node to (for debugging)
+ * @p: the existing ccan_list_node to add the node before
+ * @n: the new ccan_list_node to add to the list.
*
- * The existing list_node must already be a member of the list.
- * The new list_node does not need to be initialized; it will be overwritten.
+ * The existing ccan_list_node must already be a member of the list.
+ * The new ccan_list_node does not need to be initialized; it will be overwritten.
*
* Example:
- * list_head_init(&h);
- * list_add_tail(&h, &c1.list);
- * list_add_tail(&h, &c3.list);
- * list_add_before(&h, &c3.list, &c2.list);
- */
-#define list_add_before(h, p, n) list_add_before_(h, p, n, LIST_LOC)
-static inline void list_add_before_(struct list_head *h,
- struct list_node *p,
- struct list_node *n,
+ * ccan_list_head_init(&h);
+ * ccan_list_add_tail(&h, &c1.list);
+ * ccan_list_add_tail(&h, &c3.list);
+ * ccan_list_add_before(&h, &c3.list, &c2.list);
+ */
+#define ccan_list_add_before(h, p, n) ccan_list_add_before_(h, p, n, CCAN_LIST_LOC)
+static inline void ccan_list_add_before_(struct ccan_list_head *h,
+ struct ccan_list_node *p,
+ struct ccan_list_node *n,
const char *abortstr)
{
n->next = p;
n->prev = p->prev;
p->prev->next = n;
p->prev = n;
- (void)list_debug(h, abortstr);
+ (void)ccan_list_debug(h, abortstr);
}
/**
- * list_add_tail - add an entry at the end of a linked list.
- * @h: the list_head to add the node to
- * @n: the list_node to add to the list.
+ * ccan_list_add_tail - add an entry at the end of a linked list.
+ * @h: the ccan_list_head to add the node to
+ * @n: the ccan_list_node to add to the list.
*
- * The list_node does not need to be initialized; it will be overwritten.
+ * The ccan_list_node does not need to be initialized; it will be overwritten.
* Example:
- * list_add_tail(&parent->children, &child->list);
+ * ccan_list_add_tail(&parent->children, &child->list);
* parent->num_children++;
*/
-#define list_add_tail(h, n) list_add_tail_(h, n, LIST_LOC)
-static inline void list_add_tail_(struct list_head *h,
- struct list_node *n,
+#define ccan_list_add_tail(h, n) ccan_list_add_tail_(h, n, CCAN_LIST_LOC)
+static inline void ccan_list_add_tail_(struct ccan_list_head *h,
+ struct ccan_list_node *n,
const char *abortstr)
{
- list_add_before_(h, &h->n, n, abortstr);
+ ccan_list_add_before_(h, &h->n, n, abortstr);
}
/**
- * list_empty - is a list empty?
- * @h: the list_head
+ * ccan_list_empty - is a list empty?
+ * @h: the ccan_list_head
*
* If the list is empty, returns true.
*
* Example:
- * assert(list_empty(&parent->children) == (parent->num_children == 0));
+ * assert(ccan_list_empty(&parent->children) == (parent->num_children == 0));
*/
-#define list_empty(h) list_empty_(h, LIST_LOC)
-static inline int list_empty_(const struct list_head *h, const char* abortstr)
+#define ccan_list_empty(h) ccan_list_empty_(h, CCAN_LIST_LOC)
+static inline int ccan_list_empty_(const struct ccan_list_head *h, const char* abortstr)
{
- (void)list_debug(h, abortstr);
+ (void)ccan_list_debug(h, abortstr);
return h->n.next == &h->n;
}
/**
- * list_empty_nodebug - is a list empty (and don't perform debug checks)?
- * @h: the list_head
+ * ccan_list_empty_nodebug - is a list empty (and don't perform debug checks)?
+ * @h: the ccan_list_head
*
* If the list is empty, returns true.
* This differs from list_empty() in that if CCAN_LIST_DEBUG is set it
@@ -226,20 +226,20 @@ static inline int list_empty_(const struct list_head *h, const char* abortstr)
* know what you're doing.
*
* Example:
- * assert(list_empty_nodebug(&parent->children) == (parent->num_children == 0));
+ * assert(ccan_list_empty_nodebug(&parent->children) == (parent->num_children == 0));
*/
#ifndef CCAN_LIST_DEBUG
-#define list_empty_nodebug(h) list_empty(h)
+#define ccan_list_empty_nodebug(h) ccan_list_empty(h)
#else
-static inline int list_empty_nodebug(const struct list_head *h)
+static inline int ccan_list_empty_nodebug(const struct ccan_list_head *h)
{
return h->n.next == &h->n;
}
#endif
/**
- * list_empty_nocheck - is a list empty?
- * @h: the list_head
+ * ccan_list_empty_nocheck - is a list empty?
+ * @h: the ccan_list_head
*
* If the list is empty, returns true. This doesn't perform any
* debug check for list consistency, so it can be called without
@@ -247,29 +247,29 @@ static inline int list_empty_nodebug(const struct list_head *h)
* checks where an incorrect result is not an issue (optimized
* bail out path for example).
*/
-static inline bool list_empty_nocheck(const struct list_head *h)
+static inline bool ccan_list_empty_nocheck(const struct ccan_list_head *h)
{
return h->n.next == &h->n;
}
/**
- * list_del - delete an entry from an (unknown) linked list.
- * @n: the list_node to delete from the list.
+ * ccan_list_del - delete an entry from an (unknown) linked list.
+ * @n: the ccan_list_node to delete from the list.
*
* Note that this leaves @n in an undefined state; it can be added to
* another list, but not deleted again.
*
* See also:
- * list_del_from(), list_del_init()
+ * ccan_list_del_from(), ccan_list_del_init()
*
* Example:
- * list_del(&child->list);
+ * ccan_list_del(&child->list);
* parent->num_children--;
*/
-#define list_del(n) list_del_(n, LIST_LOC)
-static inline void list_del_(struct list_node *n, const char* abortstr)
+#define ccan_list_del(n) ccan_list_del_(n, CCAN_LIST_LOC)
+static inline void ccan_list_del_(struct ccan_list_node *n, const char* abortstr)
{
- (void)list_debug_node(n, abortstr);
+ (void)ccan_list_debug_node(n, abortstr);
n->next->prev = n->prev;
n->prev->next = n->next;
#ifdef CCAN_LIST_DEBUG
@@ -279,80 +279,80 @@ static inline void list_del_(struct list_node *n, const char* abortstr)
}
/**
- * list_del_init - delete a node, and reset it so it can be deleted again.
- * @n: the list_node to be deleted.
+ * ccan_list_del_init - delete a node, and reset it so it can be deleted again.
+ * @n: the ccan_list_node to be deleted.
*
- * list_del(@n) or list_del_init() again after this will be safe,
+ * ccan_list_del(@n) or ccan_list_del_init() again after this will be safe,
* which can be useful in some cases.
*
* See also:
- * list_del_from(), list_del()
+ * ccan_list_del_from(), ccan_list_del()
*
* Example:
- * list_del_init(&child->list);
+ * ccan_list_del_init(&child->list);
* parent->num_children--;
*/
-#define list_del_init(n) list_del_init_(n, LIST_LOC)
-static inline void list_del_init_(struct list_node *n, const char *abortstr)
+#define ccan_list_del_init(n) ccan_list_del_init_(n, CCAN_LIST_LOC)
+static inline void ccan_list_del_init_(struct ccan_list_node *n, const char *abortstr)
{
- list_del_(n, abortstr);
- list_node_init(n);
+ ccan_list_del_(n, abortstr);
+ ccan_list_node_init(n);
}
/**
- * list_del_from - delete an entry from a known linked list.
- * @h: the list_head the node is in.
- * @n: the list_node to delete from the list.
+ * ccan_list_del_from - delete an entry from a known linked list.
+ * @h: the ccan_list_head the node is in.
+ * @n: the ccan_list_node to delete from the list.
*
* This explicitly indicates which list a node is expected to be in,
* which is better documentation and can catch more bugs.
*
- * See also: list_del()
+ * See also: ccan_list_del()
*
* Example:
- * list_del_from(&parent->children, &child->list);
+ * ccan_list_del_from(&parent->children, &child->list);
* parent->num_children--;
*/
-static inline void list_del_from(struct list_head *h, struct list_node *n)
+static inline void ccan_list_del_from(struct ccan_list_head *h, struct ccan_list_node *n)
{
#ifdef CCAN_LIST_DEBUG
{
/* Thorough check: make sure it was in list! */
- struct list_node *i;
+ struct ccan_list_node *i;
for (i = h->n.next; i != n; i = i->next)
assert(i != &h->n);
}
#endif /* CCAN_LIST_DEBUG */
/* Quick test that catches a surprising number of bugs. */
- assert(!list_empty(h));
- list_del(n);
+ assert(!ccan_list_empty(h));
+ ccan_list_del(n);
}
/**
- * list_swap - swap out an entry from an (unknown) linked list for a new one.
- * @o: the list_node to replace from the list.
- * @n: the list_node to insert in place of the old one.
+ * ccan_list_swap - swap out an entry from an (unknown) linked list for a new one.
+ * @o: the ccan_list_node to replace from the list.
+ * @n: the ccan_list_node to insert in place of the old one.
*
* Note that this leaves @o in an undefined state; it can be added to
* another list, but not deleted/swapped again.
*
* See also:
- * list_del()
+ * ccan_list_del()
*
* Example:
* struct child x1, x2;
- * LIST_HEAD(xh);
+ * CCAN_LIST_HEAD(xh);
*
- * list_add(&xh, &x1.list);
- * list_swap(&x1.list, &x2.list);
+ * ccan_list_add(&xh, &x1.list);
+ * ccan_list_swap(&x1.list, &x2.list);
*/
-#define list_swap(o, n) list_swap_(o, n, LIST_LOC)
-static inline void list_swap_(struct list_node *o,
- struct list_node *n,
+#define ccan_list_swap(o, n) ccan_list_swap_(o, n, CCAN_LIST_LOC)
+static inline void ccan_list_swap_(struct ccan_list_node *o,
+ struct ccan_list_node *n,
const char* abortstr)
{
- (void)list_debug_node(o, abortstr);
+ (void)ccan_list_debug_node(o, abortstr);
*n = *o;
n->next->prev = n;
n->prev->next = n;
@@ -363,135 +363,135 @@ static inline void list_swap_(struct list_node *o,
}
/**
- * list_entry - convert a list_node back into the structure containing it.
- * @n: the list_node
+ * ccan_list_entry - convert a ccan_list_node back into the structure containing it.
+ * @n: the ccan_list_node
* @type: the type of the entry
- * @member: the list_node member of the type
+ * @member: the ccan_list_node member of the type
*
* Example:
* // First list entry is children.next; convert back to child.
- * child = list_entry(parent->children.n.next, struct child, list);
+ * child = ccan_list_entry(parent->children.n.next, struct child, list);
*
* See Also:
- * list_top(), list_for_each()
+ * ccan_list_top(), ccan_list_for_each()
*/
-#define list_entry(n, type, member) container_of(n, type, member)
+#define ccan_list_entry(n, type, member) ccan_container_of(n, type, member)
/**
- * list_top - get the first entry in a list
- * @h: the list_head
+ * ccan_list_top - get the first entry in a list
+ * @h: the ccan_list_head
* @type: the type of the entry
- * @member: the list_node member of the type
+ * @member: the ccan_list_node member of the type
*
* If the list is empty, returns NULL.
*
* Example:
* struct child *first;
- * first = list_top(&parent->children, struct child, list);
+ * first = ccan_list_top(&parent->children, struct child, list);
* if (!first)
* printf("Empty list!\n");
*/
-#define list_top(h, type, member) \
- ((type *)list_top_((h), list_off_(type, member)))
+#define ccan_list_top(h, type, member) \
+ ((type *)ccan_list_top_((h), ccan_list_off_(type, member)))
-static inline const void *list_top_(const struct list_head *h, size_t off)
+static inline const void *ccan_list_top_(const struct ccan_list_head *h, size_t off)
{
- if (list_empty(h))
+ if (ccan_list_empty(h))
return NULL;
return (const char *)h->n.next - off;
}
/**
- * list_pop - remove the first entry in a list
- * @h: the list_head
+ * ccan_list_pop - remove the first entry in a list
+ * @h: the ccan_list_head
* @type: the type of the entry
- * @member: the list_node member of the type
+ * @member: the ccan_list_node member of the type
*
* If the list is empty, returns NULL.
*
* Example:
* struct child *one;
- * one = list_pop(&parent->children, struct child, list);
+ * one = ccan_list_pop(&parent->children, struct child, list);
* if (!one)
* printf("Empty list!\n");
*/
-#define list_pop(h, type, member) \
- ((type *)list_pop_((h), list_off_(type, member)))
+#define ccan_list_pop(h, type, member) \
+ ((type *)ccan_list_pop_((h), ccan_list_off_(type, member)))
-static inline const void *list_pop_(const struct list_head *h, size_t off)
+static inline const void *ccan_list_pop_(const struct ccan_list_head *h, size_t off)
{
- struct list_node *n;
+ struct ccan_list_node *n;
- if (list_empty(h))
+ if (ccan_list_empty(h))
return NULL;
n = h->n.next;
- list_del(n);
+ ccan_list_del(n);
return (const char *)n - off;
}
/**
- * list_tail - get the last entry in a list
- * @h: the list_head
+ * ccan_list_tail - get the last entry in a list
+ * @h: the ccan_list_head
* @type: the type of the entry
- * @member: the list_node member of the type
+ * @member: the ccan_list_node member of the type
*
* If the list is empty, returns NULL.
*
* Example:
* struct child *last;
- * last = list_tail(&parent->children, struct child, list);
+ * last = ccan_list_tail(&parent->children, struct child, list);
* if (!last)
* printf("Empty list!\n");
*/
-#define list_tail(h, type, member) \
- ((type *)list_tail_((h), list_off_(type, member)))
+#define ccan_list_tail(h, type, member) \
+ ((type *)ccan_list_tail_((h), ccan_list_off_(type, member)))
-static inline const void *list_tail_(const struct list_head *h, size_t off)
+static inline const void *ccan_list_tail_(const struct ccan_list_head *h, size_t off)
{
- if (list_empty(h))
+ if (ccan_list_empty(h))
return NULL;
return (const char *)h->n.prev - off;
}
/**
- * list_for_each - iterate through a list.
- * @h: the list_head (warning: evaluated multiple times!)
- * @i: the structure containing the list_node
- * @member: the list_node member of the structure
+ * ccan_list_for_each - iterate through a list.
+ * @h: the ccan_list_head (warning: evaluated multiple times!)
+ * @i: the structure containing the ccan_list_node
+ * @member: the ccan_list_node member of the structure
*
* This is a convenient wrapper to iterate @i over the entire list. It's
* a for loop, so you can break and continue as normal.
*
* Example:
- * list_for_each(&parent->children, child, list)
+ * ccan_list_for_each(&parent->children, child, list)
* printf("Name: %s\n", child->name);
*/
-#define list_for_each(h, i, member) \
- list_for_each_off(h, i, list_off_var_(i, member))
+#define ccan_list_for_each(h, i, member) \
+ ccan_list_for_each_off(h, i, ccan_list_off_var_(i, member))
/**
- * list_for_each_rev - iterate through a list backwards.
- * @h: the list_head
- * @i: the structure containing the list_node
- * @member: the list_node member of the structure
+ * ccan_list_for_each_rev - iterate through a list backwards.
+ * @h: the ccan_list_head
+ * @i: the structure containing the ccan_list_node
+ * @member: the ccan_list_node member of the structure
*
* This is a convenient wrapper to iterate @i over the entire list. It's
* a for loop, so you can break and continue as normal.
*
* Example:
- * list_for_each_rev(&parent->children, child, list)
+ * ccan_list_for_each_rev(&parent->children, child, list)
* printf("Name: %s\n", child->name);
*/
-#define list_for_each_rev(h, i, member) \
- list_for_each_rev_off(h, i, list_off_var_(i, member))
+#define ccan_list_for_each_rev(h, i, member) \
+ ccan_list_for_each_rev_off(h, i, ccan_list_off_var_(i, member))
/**
- * list_for_each_rev_safe - iterate through a list backwards,
+ * ccan_list_for_each_rev_safe - iterate through a list backwards,
* maybe during deletion
- * @h: the list_head
- * @i: the structure containing the list_node
- * @nxt: the structure containing the list_node
- * @member: the list_node member of the structure
+ * @h: the ccan_list_head
+ * @i: the structure containing the ccan_list_node
+ * @nxt: the structure containing the ccan_list_node
+ * @member: the ccan_list_node member of the structure
*
* This is a convenient wrapper to iterate @i over the entire list backwards.
* It's a for loop, so you can break and continue as normal. The extra
@@ -500,74 +500,74 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
*
* Example:
* struct child *next;
- * list_for_each_rev_safe(&parent->children, child, next, list) {
+ * ccan_list_for_each_rev_safe(&parent->children, child, next, list) {
* printf("Name: %s\n", child->name);
* }
*/
-#define list_for_each_rev_safe(h, i, nxt, member) \
- list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
+#define ccan_list_for_each_rev_safe(h, i, nxt, member) \
+ ccan_list_for_each_rev_safe_off(h, i, nxt, ccan_list_off_var_(i, member))
/**
- * list_for_each_safe - iterate through a list, maybe during deletion
- * @h: the list_head
- * @i: the structure containing the list_node
- * @nxt: the structure containing the list_node
- * @member: the list_node member of the structure
+ * ccan_list_for_each_safe - iterate through a list, maybe during deletion
+ * @h: the ccan_list_head
+ * @i: the structure containing the ccan_list_node
+ * @nxt: the structure containing the ccan_list_node
+ * @member: the ccan_list_node member of the structure
*
* This is a convenient wrapper to iterate @i over the entire list. It's
* a for loop, so you can break and continue as normal. The extra variable
* @nxt is used to hold the next element, so you can delete @i from the list.
*
* Example:
- * list_for_each_safe(&parent->children, child, next, list) {
- * list_del(&child->list);
+ * ccan_list_for_each_safe(&parent->children, child, next, list) {
+ * ccan_list_del(&child->list);
* parent->num_children--;
* }
*/
-#define list_for_each_safe(h, i, nxt, member) \
- list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
+#define ccan_list_for_each_safe(h, i, nxt, member) \
+ ccan_list_for_each_safe_off(h, i, nxt, ccan_list_off_var_(i, member))
/**
- * list_next - get the next entry in a list
- * @h: the list_head
+ * ccan_list_next - get the next entry in a list
+ * @h: the ccan_list_head
* @i: a pointer to an entry in the list.
- * @member: the list_node member of the structure
+ * @member: the ccan_list_node member of the structure
*
* If @i was the last entry in the list, returns NULL.
*
* Example:
* struct child *second;
- * second = list_next(&parent->children, first, list);
+ * second = ccan_list_next(&parent->children, first, list);
* if (!second)
* printf("No second child!\n");
*/
-#define list_next(h, i, member) \
- ((list_typeof(i))list_entry_or_null(list_debug(h, \
- __FILE__ ":" stringify(__LINE__)), \
+#define ccan_list_next(h, i, member) \
+ ((ccan_list_typeof(i))ccan_list_entry_or_null(ccan_list_debug(h, \
+ __FILE__ ":" ccan_stringify(__LINE__)), \
(i)->member.next, \
- list_off_var_((i), member)))
+ ccan_list_off_var_((i), member)))
/**
- * list_prev - get the previous entry in a list
- * @h: the list_head
+ * ccan_list_prev - get the previous entry in a list
+ * @h: the ccan_list_head
* @i: a pointer to an entry in the list.
- * @member: the list_node member of the structure
+ * @member: the ccan_list_node member of the structure
*
* If @i was the first entry in the list, returns NULL.
*
* Example:
- * first = list_prev(&parent->children, second, list);
+ * first = ccan_list_prev(&parent->children, second, list);
* if (!first)
* printf("Can't go back to first child?!\n");
*/
-#define list_prev(h, i, member) \
- ((list_typeof(i))list_entry_or_null(list_debug(h, \
- __FILE__ ":" stringify(__LINE__)), \
+#define ccan_list_prev(h, i, member) \
+ ((ccan_list_typeof(i))ccan_list_entry_or_null(ccan_list_debug(h, \
+ __FILE__ ":" ccan_stringify(__LINE__)), \
(i)->member.prev, \
- list_off_var_((i), member)))
+ ccan_list_off_var_((i), member)))
/**
- * list_append_list - empty one list onto the end of another.
+ * ccan_list_append_list - empty one list onto the end of another.
* @to: the list to append into
* @from: the list to empty.
*
@@ -575,20 +575,20 @@ static inline const void *list_tail_(const struct list_head *h, size_t off)
* @to. After this @from will be empty.
*
* Example:
- * struct list_head adopter;
+ * struct ccan_list_head adopter;
*
- * list_append_list(&adopter, &parent->children);
- * assert(list_empty(&parent->children));
+ * ccan_list_append_list(&adopter, &parent->children);
+ * assert(ccan_list_empty(&parent->children));
* parent->num_children = 0;
*/
-#define list_append_list(t, f) list_append_list_(t, f, \
- __FILE__ ":" stringify(__LINE__))
-static inline void list_append_list_(struct list_head *to,
- struct list_head *from,
+#define ccan_list_append_list(t, f) ccan_list_append_list_(t, f, \
+ __FILE__ ":" ccan_stringify(__LINE__))
+static inline void ccan_list_append_list_(struct ccan_list_head *to,
+ struct ccan_list_head *from,
const char *abortstr)
{
- struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
- struct list_node *to_tail = list_debug(to, abortstr)->n.prev;
+ struct ccan_list_node *from_tail = ccan_list_debug(from, abortstr)->n.prev;
+ struct ccan_list_node *to_tail = ccan_list_debug(to, abortstr)->n.prev;
/* Sew in head and entire list. */
to->n.prev = from_tail;
@@ -597,12 +597,12 @@ static inline void list_append_list_(struct list_head *to,
from->n.prev = to_tail;
/* Now remove head. */
- list_del(&from->n);
- list_head_init(from);
+ ccan_list_del(&from->n);
+ ccan_list_head_init(from);
}
/**
- * list_prepend_list - empty one list into the start of another.
+ * ccan_list_prepend_list - empty one list into the start of another.
* @to: the list to prepend into
* @from: the list to empty.
*
@@ -610,17 +610,17 @@ static inline void list_append_list_(struct list_head *to,
* of @to. After this @from will be empty.
*
* Example:
- * list_prepend_list(&adopter, &parent->children);
- * assert(list_empty(&parent->children));
+ * ccan_list_prepend_list(&adopter, &parent->children);
+ * assert(ccan_list_empty(&parent->children));
* parent->num_children = 0;
*/
-#define list_prepend_list(t, f) list_prepend_list_(t, f, LIST_LOC)
-static inline void list_prepend_list_(struct list_head *to,
- struct list_head *from,
+#define ccan_list_prepend_list(t, f) ccan_list_prepend_list_(t, f, CCAN_LIST_LOC)
+static inline void ccan_list_prepend_list_(struct ccan_list_head *to,
+ struct ccan_list_head *from,
const char *abortstr)
{
- struct list_node *from_tail = list_debug(from, abortstr)->n.prev;
- struct list_node *to_head = list_debug(to, abortstr)->n.next;
+ struct ccan_list_node *from_tail = ccan_list_debug(from, abortstr)->n.prev;
+ struct ccan_list_node *to_head = ccan_list_debug(to, abortstr)->n.next;
/* Sew in head and entire list. */
to->n.next = &from->n;
@@ -629,160 +629,161 @@ static inline void list_prepend_list_(struct list_head *to,
from_tail->next = to_head;
/* Now remove head. */
- list_del(&from->n);
- list_head_init(from);
+ ccan_list_del(&from->n);
+ ccan_list_head_init(from);
}
/* internal macros, do not use directly */
-#define list_for_each_off_dir_(h, i, off, dir) \
- for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
+#define ccan_list_for_each_off_dir_(h, i, off, dir) \
+ for (i = ccan_list_node_to_off_(ccan_list_debug(h, CCAN_LIST_LOC)->n.dir, \
(off)); \
- list_node_from_off_((void *)i, (off)) != &(h)->n; \
- i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, \
+ ccan_list_node_from_off_((void *)i, (off)) != &(h)->n; \
+ i = ccan_list_node_to_off_(ccan_list_node_from_off_((void *)i, (off))->dir, \
(off)))
-#define list_for_each_safe_off_dir_(h, i, nxt, off, dir) \
- for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, \
+#define ccan_list_for_each_safe_off_dir_(h, i, nxt, off, dir) \
+ for (i = ccan_list_node_to_off_(ccan_list_debug(h, CCAN_LIST_LOC)->n.dir, \
(off)), \
- nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
+ nxt = ccan_list_node_to_off_(ccan_list_node_from_off_(i, (off))->dir, \
(off)); \
- list_node_from_off_(i, (off)) != &(h)->n; \
+ ccan_list_node_from_off_(i, (off)) != &(h)->n; \
i = nxt, \
- nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, \
+ nxt = ccan_list_node_to_off_(ccan_list_node_from_off_(i, (off))->dir, \
(off)))
/**
- * list_for_each_off - iterate through a list of memory regions.
- * @h: the list_head
+ * ccan_list_for_each_off - iterate through a list of memory regions.
+ * @h: the ccan_list_head
* @i: the pointer to a memory region which contains list node data.
* @off: offset(relative to @i) at which list node data resides.
*
* This is a low-level wrapper to iterate @i over the entire list, used to
- * implement all oher, more high-level, for-each constructs. It's a for loop,
+ * implement all other, more high-level, for-each constructs. It's a for loop,
* so you can break and continue as normal.
*
* WARNING! Being the low-level macro that it is, this wrapper doesn't know
* nor care about the type of @i. The only assumption made is that @i points
* to a chunk of memory that at some @offset, relative to @i, contains a
- * properly filled `struct list_node' which in turn contains pointers to
+ * properly filled `struct ccan_list_node' which in turn contains pointers to
* memory chunks and it's turtles all the way down. With all that in mind
* remember that given the wrong pointer/offset couple this macro will
* happily churn all you memory until SEGFAULT stops it, in other words
* caveat emptor.
*
* It is worth mentioning that one of legitimate use-cases for that wrapper
- * is operation on opaque types with known offset for `struct list_node'
+ * is operation on opaque types with known offset for `struct ccan_list_node'
* member(preferably 0), because it allows you not to disclose the type of
* @i.
*
* Example:
- * list_for_each_off(&parent->children, child,
+ * ccan_list_for_each_off(&parent->children, child,
* offsetof(struct child, list))
* printf("Name: %s\n", child->name);
*/
-#define list_for_each_off(h, i, off) \
- list_for_each_off_dir_((h),(i),(off),next)
+#define ccan_list_for_each_off(h, i, off) \
+ ccan_list_for_each_off_dir_((h),(i),(off),next)
/**
- * list_for_each_rev_off - iterate through a list of memory regions backwards
- * @h: the list_head
+ * ccan_list_for_each_rev_off - iterate through a list of memory regions backwards
+ * @h: the ccan_list_head
* @i: the pointer to a memory region which contains list node data.
* @off: offset(relative to @i) at which list node data resides.
*
- * See list_for_each_off for details
+ * See ccan_list_for_each_off for details
*/
-#define list_for_each_rev_off(h, i, off) \
- list_for_each_off_dir_((h),(i),(off),prev)
+#define ccan_list_for_each_rev_off(h, i, off) \
+ ccan_list_for_each_off_dir_((h),(i),(off),prev)
/**
- * list_for_each_safe_off - iterate through a list of memory regions, maybe
+ * ccan_list_for_each_safe_off - iterate through a list of memory regions, maybe
* during deletion
- * @h: the list_head
+ * @h: the ccan_list_head
* @i: the pointer to a memory region which contains list node data.
- * @nxt: the structure containing the list_node
+ * @nxt: the structure containing the ccan_list_node
* @off: offset(relative to @i) at which list node data resides.
*
- * For details see `list_for_each_off' and `list_for_each_safe'
+ * For details see `ccan_list_for_each_off' and `ccan_list_for_each_safe'
* descriptions.
*
* Example:
- * list_for_each_safe_off(&parent->children, child,
+ * ccan_list_for_each_safe_off(&parent->children, child,
* next, offsetof(struct child, list))
* printf("Name: %s\n", child->name);
*/
-#define list_for_each_safe_off(h, i, nxt, off) \
- list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
+#define ccan_list_for_each_safe_off(h, i, nxt, off) \
+ ccan_list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
/**
- * list_for_each_rev_safe_off - iterate backwards through a list of
+ * ccan_list_for_each_rev_safe_off - iterate backwards through a list of
* memory regions, maybe during deletion
- * @h: the list_head
+ * @h: the ccan_list_head
* @i: the pointer to a memory region which contains list node data.
- * @nxt: the structure containing the list_node
+ * @nxt: the structure containing the ccan_list_node
* @off: offset(relative to @i) at which list node data resides.
*
- * For details see `list_for_each_rev_off' and `list_for_each_rev_safe'
+ * For details see `ccan_list_for_each_rev_off' and `ccan_list_for_each_rev_safe'
* descriptions.
*
* Example:
- * list_for_each_rev_safe_off(&parent->children, child,
+ * ccan_list_for_each_rev_safe_off(&parent->children, child,
* next, offsetof(struct child, list))
* printf("Name: %s\n", child->name);
*/
-#define list_for_each_rev_safe_off(h, i, nxt, off) \
- list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
+#define ccan_list_for_each_rev_safe_off(h, i, nxt, off) \
+ ccan_list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
/* Other -off variants. */
-#define list_entry_off(n, type, off) \
- ((type *)list_node_from_off_((n), (off)))
+#define ccan_list_entry_off(n, type, off) \
+ ((type *)ccan_list_node_from_off_((n), (off)))
-#define list_head_off(h, type, off) \
- ((type *)list_head_off((h), (off)))
+#define ccan_list_head_off(h, type, off) \
+ ((type *)ccan_list_head_off((h), (off)))
-#define list_tail_off(h, type, off) \
- ((type *)list_tail_((h), (off)))
+#define ccan_list_tail_off(h, type, off) \
+ ((type *)ccan_list_tail_((h), (off)))
-#define list_add_off(h, n, off) \
- list_add((h), list_node_from_off_((n), (off)))
+#define ccan_list_add_off(h, n, off) \
+ ccan_list_add((h), ccan_list_node_from_off_((n), (off)))
-#define list_del_off(n, off) \
- list_del(list_node_from_off_((n), (off)))
+#define ccan_list_del_off(n, off) \
+ ccan_list_del(ccan_list_node_from_off_((n), (off)))
-#define list_del_from_off(h, n, off) \
- list_del_from(h, list_node_from_off_((n), (off)))
+#define ccan_list_del_from_off(h, n, off) \
+ ccan_list_del_from(h, ccan_list_node_from_off_((n), (off)))
/* Offset helper functions so we only single-evaluate. */
-static inline void *list_node_to_off_(struct list_node *node, size_t off)
+static inline void *ccan_list_node_to_off_(struct ccan_list_node *node, size_t off)
{
return (void *)((char *)node - off);
}
-static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
+static inline struct ccan_list_node *ccan_list_node_from_off_(void *ptr, size_t off)
{
- return (struct list_node *)((char *)ptr + off);
+ return (struct ccan_list_node *)((char *)ptr + off);
}
-/* Get the offset of the member, but make sure it's a list_node. */
-#define list_off_(type, member) \
- (container_off(type, member) + \
- check_type(((type *)0)->member, struct list_node))
+/* Get the offset of the member, but make sure it's a ccan_list_node. */
+#define ccan_list_off_(type, member) \
+ (ccan_container_off(type, member) + \
+ ccan_check_type(((type *)0)->member, struct ccan_list_node))
-#define list_off_var_(var, member) \
- (container_off_var(var, member) + \
- check_type(var->member, struct list_node))
+#define ccan_list_off_var_(var, member) \
+ (ccan_container_off_var(var, member) + \
+ ccan_check_type(var->member, struct ccan_list_node))
-#if HAVE_TYPEOF
-#define list_typeof(var) typeof(var)
+#if defined(HAVE_TYPEOF) && HAVE_TYPEOF
+#define ccan_list_typeof(var) typeof(var)
#else
-#define list_typeof(var) void *
+#define ccan_list_typeof(var) void *
#endif
/* Returns member, or NULL if at end of list. */
-static inline void *list_entry_or_null(const struct list_head *h,
- const struct list_node *n,
+static inline void *ccan_list_entry_or_null(const struct ccan_list_head *h,
+ const struct ccan_list_node *n,
size_t off)
{
if (n == &h->n)
return NULL;
return (char *)n - off;
}
+
#endif /* CCAN_LIST_H */
diff --git a/ccan/str/str.h b/ccan/str/str.h
index 9a9da9cd3f..6d4cf62423 100644
--- a/ccan/str/str.h
+++ b/ccan/str/str.h
@@ -2,15 +2,16 @@
#ifndef CCAN_STR_H
#define CCAN_STR_H
/**
- * stringify - Turn expression into a string literal
+ * ccan_stringify - Turn expression into a string literal
* @expr: any C expression
*
* Example:
* #define PRINT_COND_IF_FALSE(cond) \
- * ((cond) || printf("%s is false!", stringify(cond)))
+ * ((cond) || printf("%s is false!", ccan_stringify(cond)))
*/
-#define stringify(expr) stringify_1(expr)
+#define stringify(expr) ccan_stringify_1(expr)
+#define ccan_stringify(expr) ccan_stringify_1(expr)
/* Double-indirection required to stringify expansions */
-#define stringify_1(expr) #expr
+#define ccan_stringify_1(expr) #expr
#endif /* CCAN_STR_H */
diff --git a/class.c b/class.c
index c866d1d727..cf0b7b821f 100644
--- a/class.c
+++ b/class.c
@@ -10,116 +10,149 @@
**********************************************************************/
/*!
- * \defgroup class Classes and their hierarchy.
- * \par Terminology
- * - class: same as in Ruby.
- * - singleton class: class for a particular object
- * - eigenclass: = singleton class
- * - metaclass: class of a class. metaclass is a kind of singleton class.
- * - metametaclass: class of a metaclass.
- * - meta^(n)-class: class of a meta^(n-1)-class.
- * - attached object: A singleton class knows its unique instance.
- * The instance is called the attached object for the singleton class.
+ * \addtogroup class
* \{
*/
+#include "ruby/internal/config.h"
+#include <ctype.h>
+
+#include "constant.h"
+#include "debug_counter.h"
+#include "id_table.h"
#include "internal.h"
+#include "internal/class.h"
+#include "internal/eval.h"
+#include "internal/hash.h"
+#include "internal/object.h"
+#include "internal/string.h"
+#include "internal/variable.h"
#include "ruby/st.h"
-#include "constant.h"
#include "vm_core.h"
-#include "id_table.h"
-#include <ctype.h>
#define id_attached id__attached__
-void
-rb_class_subclass_add(VALUE super, VALUE klass)
+#define METACLASS_OF(k) RBASIC(k)->klass
+#define SET_METACLASS_OF(k, cls) RBASIC_SET_CLASS(k, cls)
+
+RUBY_EXTERN rb_serial_t ruby_vm_global_cvar_state;
+
+static rb_subclass_entry_t *
+push_subclass_entry_to_list(VALUE super, VALUE klass)
{
rb_subclass_entry_t *entry, *head;
- if (super && super != Qundef) {
- entry = ALLOC(rb_subclass_entry_t);
- entry->klass = klass;
- entry->next = NULL;
+ entry = ZALLOC(rb_subclass_entry_t);
+ entry->klass = klass;
- head = RCLASS_EXT(super)->subclasses;
- if (head) {
- entry->next = head;
- RCLASS_EXT(head->klass)->parent_subclasses = &entry->next;
- }
+ head = RCLASS_SUBCLASSES(super);
+ if (!head) {
+ head = ZALLOC(rb_subclass_entry_t);
+ RCLASS_SUBCLASSES(super) = head;
+ }
+ entry->next = head->next;
+ entry->prev = head;
- RCLASS_EXT(super)->subclasses = entry;
- RCLASS_EXT(klass)->parent_subclasses = &RCLASS_EXT(super)->subclasses;
+ if (head->next) {
+ head->next->prev = entry;
+ }
+ head->next = entry;
+
+ return entry;
+}
+
+void
+rb_class_subclass_add(VALUE super, VALUE klass)
+{
+ if (super && !UNDEF_P(super)) {
+ rb_subclass_entry_t *entry = push_subclass_entry_to_list(super, klass);
+ RCLASS_SUBCLASS_ENTRY(klass) = entry;
}
}
static void
rb_module_add_to_subclasses_list(VALUE module, VALUE iclass)
{
- rb_subclass_entry_t *entry, *head;
+ rb_subclass_entry_t *entry = push_subclass_entry_to_list(module, iclass);
+ RCLASS_MODULE_SUBCLASS_ENTRY(iclass) = entry;
+}
- entry = ALLOC(rb_subclass_entry_t);
- entry->klass = iclass;
- entry->next = NULL;
+void
+rb_class_remove_subclass_head(VALUE klass)
+{
+ rb_subclass_entry_t *head = RCLASS_SUBCLASSES(klass);
- head = RCLASS_EXT(module)->subclasses;
if (head) {
- entry->next = head;
- RCLASS_EXT(head->klass)->module_subclasses = &entry->next;
+ if (head->next) {
+ head->next->prev = NULL;
+ }
+ RCLASS_SUBCLASSES(klass) = NULL;
+ xfree(head);
}
-
- RCLASS_EXT(module)->subclasses = entry;
- RCLASS_EXT(iclass)->module_subclasses = &RCLASS_EXT(module)->subclasses;
}
void
rb_class_remove_from_super_subclasses(VALUE klass)
{
- rb_subclass_entry_t *entry;
+ rb_subclass_entry_t *entry = RCLASS_SUBCLASS_ENTRY(klass);
+
+ if (entry) {
+ rb_subclass_entry_t *prev = entry->prev, *next = entry->next;
- if (RCLASS_EXT(klass)->parent_subclasses) {
- entry = *RCLASS_EXT(klass)->parent_subclasses;
+ if (prev) {
+ prev->next = next;
+ }
+ if (next) {
+ next->prev = prev;
+ }
- *RCLASS_EXT(klass)->parent_subclasses = entry->next;
- if (entry->next) {
- RCLASS_EXT(entry->next->klass)->parent_subclasses = RCLASS_EXT(klass)->parent_subclasses;
- }
- xfree(entry);
+ xfree(entry);
}
- RCLASS_EXT(klass)->parent_subclasses = NULL;
+ RCLASS_SUBCLASS_ENTRY(klass) = NULL;
}
void
rb_class_remove_from_module_subclasses(VALUE klass)
{
- rb_subclass_entry_t *entry;
+ rb_subclass_entry_t *entry = RCLASS_MODULE_SUBCLASS_ENTRY(klass);
- if (RCLASS_EXT(klass)->module_subclasses) {
- entry = *RCLASS_EXT(klass)->module_subclasses;
- *RCLASS_EXT(klass)->module_subclasses = entry->next;
+ if (entry) {
+ rb_subclass_entry_t *prev = entry->prev, *next = entry->next;
- if (entry->next) {
- RCLASS_EXT(entry->next->klass)->module_subclasses = RCLASS_EXT(klass)->module_subclasses;
- }
+ if (prev) {
+ prev->next = next;
+ }
+ if (next) {
+ next->prev = prev;
+ }
- xfree(entry);
+ xfree(entry);
}
- RCLASS_EXT(klass)->module_subclasses = NULL;
+ RCLASS_MODULE_SUBCLASS_ENTRY(klass) = NULL;
}
void
rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE arg)
{
- rb_subclass_entry_t *cur = RCLASS_EXT(klass)->subclasses;
+ // RCLASS_SUBCLASSES should always point to our head element which has NULL klass
+ rb_subclass_entry_t *cur = RCLASS_SUBCLASSES(klass);
+ // if we have a subclasses list, then the head is a placeholder with no valid
+ // class. So ignore it and use the next element in the list (if one exists)
+ if (cur) {
+ RUBY_ASSERT(!cur->klass);
+ cur = cur->next;
+ }
/* do not be tempted to simplify this loop into a for loop, the order of
operations is important here if `f` modifies the linked list */
while (cur) {
- VALUE curklass = cur->klass;
- cur = cur->next;
- f(curklass, arg);
+ VALUE curklass = cur->klass;
+ cur = cur->next;
+ // do not trigger GC during f, otherwise the cur will become
+ // a dangling pointer if the subclass is collected
+ f(curklass, arg);
}
}
@@ -162,22 +195,35 @@ rb_class_detach_module_subclasses(VALUE klass)
static VALUE
class_alloc(VALUE flags, VALUE klass)
{
- NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0));
+ size_t alloc_size = sizeof(struct RClass);
+
+#if RCLASS_EXT_EMBEDDED
+ alloc_size += sizeof(rb_classext_t);
+#endif
+
+ flags &= T_MASK;
+ flags |= FL_PROMOTED1 /* start from age == 2 */;
+ if (RGENGC_WB_PROTECTED_CLASS) flags |= FL_WB_PROTECTED;
+ RVARGC_NEWOBJ_OF(obj, struct RClass, klass, flags, alloc_size);
+
+#if RCLASS_EXT_EMBEDDED
+ memset(RCLASS_EXT(obj), 0, sizeof(rb_classext_t));
+#else
obj->ptr = ZALLOC(rb_classext_t);
+#endif
+
/* ZALLOC
- RCLASS_IV_TBL(obj) = 0;
RCLASS_CONST_TBL(obj) = 0;
RCLASS_M_TBL(obj) = 0;
RCLASS_IV_INDEX_TBL(obj) = 0;
RCLASS_SET_SUPER((VALUE)obj, 0);
- RCLASS_EXT(obj)->subclasses = NULL;
- RCLASS_EXT(obj)->parent_subclasses = NULL;
- RCLASS_EXT(obj)->module_subclasses = NULL;
+ RCLASS_SUBCLASSES(obj) = NULL;
+ RCLASS_PARENT_SUBCLASSES(obj) = NULL;
+ RCLASS_MODULE_SUBCLASSES(obj) = NULL;
*/
RCLASS_SET_ORIGIN((VALUE)obj, (VALUE)obj);
- RCLASS_SERIAL(obj) = rb_next_class_serial();
RB_OBJ_WRITE(obj, &RCLASS_REFINED_CLASS(obj), Qnil);
- RCLASS_EXT(obj)->allocator = 0;
+ RCLASS_ALLOCATOR(obj) = 0;
return (VALUE)obj;
}
@@ -208,53 +254,103 @@ rb_class_boot(VALUE super)
return (VALUE)klass;
}
+static VALUE *
+class_superclasses_including_self(VALUE klass)
+{
+ if (FL_TEST_RAW(klass, RCLASS_SUPERCLASSES_INCLUDE_SELF))
+ return RCLASS_SUPERCLASSES(klass);
+
+ size_t depth = RCLASS_SUPERCLASS_DEPTH(klass);
+ VALUE *superclasses = xmalloc(sizeof(VALUE) * (depth + 1));
+ if (depth > 0)
+ memcpy(superclasses, RCLASS_SUPERCLASSES(klass), sizeof(VALUE) * depth);
+ superclasses[depth] = klass;
+
+ RCLASS_SUPERCLASSES(klass) = superclasses;
+ FL_SET_RAW(klass, RCLASS_SUPERCLASSES_INCLUDE_SELF);
+ return superclasses;
+}
+
+void
+rb_class_update_superclasses(VALUE klass)
+{
+ VALUE super = RCLASS_SUPER(klass);
+
+ if (!RB_TYPE_P(klass, T_CLASS)) return;
+ if (UNDEF_P(super)) return;
+
+ // If the superclass array is already built
+ if (RCLASS_SUPERCLASSES(klass))
+ return;
+
+ // find the proper superclass
+ while (super != Qfalse && !RB_TYPE_P(super, T_CLASS)) {
+ super = RCLASS_SUPER(super);
+ }
+
+ // For BasicObject and uninitialized classes, depth=0 and ary=NULL
+ if (super == Qfalse)
+ return;
+
+ // Sometimes superclasses are set before the full ancestry tree is built
+ // This happens during metaclass construction
+ if (super != rb_cBasicObject && !RCLASS_SUPERCLASS_DEPTH(super)) {
+ rb_class_update_superclasses(super);
+
+ // If it is still unset we need to try later
+ if (!RCLASS_SUPERCLASS_DEPTH(super))
+ return;
+ }
+
+ RCLASS_SUPERCLASSES(klass) = class_superclasses_including_self(super);
+ RCLASS_SUPERCLASS_DEPTH(klass) = RCLASS_SUPERCLASS_DEPTH(super) + 1;
+}
-/*!
- * Ensures a class can be derived from super.
- *
- * \param super a reference to an object.
- * \exception TypeError if \a super is not a Class or \a super is a singleton class.
- */
void
rb_check_inheritable(VALUE super)
{
if (!RB_TYPE_P(super, T_CLASS)) {
- rb_raise(rb_eTypeError, "superclass must be a Class (%"PRIsVALUE" given)",
- rb_obj_class(super));
+ rb_raise(rb_eTypeError, "superclass must be an instance of Class (given an instance of %"PRIsVALUE")",
+ rb_obj_class(super));
}
if (RBASIC(super)->flags & FL_SINGLETON) {
- rb_raise(rb_eTypeError, "can't make subclass of singleton class");
+ rb_raise(rb_eTypeError, "can't make subclass of singleton class");
}
if (super == rb_cClass) {
- rb_raise(rb_eTypeError, "can't make subclass of Class");
+ rb_raise(rb_eTypeError, "can't make subclass of Class");
}
}
-
-/*!
- * Creates a new class.
- * \param super a class from which the new class derives.
- * \exception TypeError \a super is not inheritable.
- * \exception TypeError \a super is the Class class.
- */
VALUE
rb_class_new(VALUE super)
{
Check_Type(super, T_CLASS);
rb_check_inheritable(super);
- return rb_class_boot(super);
+ VALUE klass = rb_class_boot(super);
+
+ if (super != rb_cObject && super != rb_cBasicObject) {
+ RCLASS_EXT(klass)->max_iv_count = RCLASS_EXT(super)->max_iv_count;
+ }
+
+ return klass;
+}
+
+VALUE
+rb_class_s_alloc(VALUE klass)
+{
+ return rb_class_boot(0);
}
static void
clone_method(VALUE old_klass, VALUE new_klass, ID mid, const rb_method_entry_t *me)
{
if (me->def->type == VM_METHOD_TYPE_ISEQ) {
- rb_cref_t *new_cref;
- rb_vm_rewrite_cref(me->def->body.iseq.cref, old_klass, new_klass, &new_cref);
- rb_add_method_iseq(new_klass, mid, me->def->body.iseq.iseqptr, new_cref, METHOD_ENTRY_VISI(me));
+ rb_cref_t *new_cref;
+ rb_vm_rewrite_cref(me->def->body.iseq.cref, old_klass, new_klass, &new_cref);
+ rb_add_method_iseq(new_klass, mid, me->def->body.iseq.iseqptr, new_cref, METHOD_ENTRY_VISI(me));
}
else {
- rb_method_entry_set(new_klass, mid, me, METHOD_ENTRY_VISI(me));
+ rb_method_entry_set(new_klass, mid, me, METHOD_ENTRY_VISI(me));
}
}
@@ -298,13 +394,102 @@ static void
class_init_copy_check(VALUE clone, VALUE orig)
{
if (orig == rb_cBasicObject) {
- rb_raise(rb_eTypeError, "can't copy the root class");
+ rb_raise(rb_eTypeError, "can't copy the root class");
}
if (RCLASS_SUPER(clone) != 0 || clone == rb_cBasicObject) {
- rb_raise(rb_eTypeError, "already initialized class");
+ rb_raise(rb_eTypeError, "already initialized class");
}
if (FL_TEST(orig, FL_SINGLETON)) {
- rb_raise(rb_eTypeError, "can't copy singleton class");
+ rb_raise(rb_eTypeError, "can't copy singleton class");
+ }
+}
+
+struct cvc_table_copy_ctx {
+ VALUE clone;
+ struct rb_id_table * new_table;
+};
+
+static enum rb_id_table_iterator_result
+cvc_table_copy(ID id, VALUE val, void *data) {
+ struct cvc_table_copy_ctx *ctx = (struct cvc_table_copy_ctx *)data;
+ struct rb_cvar_class_tbl_entry * orig_entry;
+ orig_entry = (struct rb_cvar_class_tbl_entry *)val;
+
+ struct rb_cvar_class_tbl_entry *ent;
+
+ ent = ALLOC(struct rb_cvar_class_tbl_entry);
+ ent->class_value = ctx->clone;
+ ent->cref = orig_entry->cref;
+ ent->global_cvar_state = orig_entry->global_cvar_state;
+ rb_id_table_insert(ctx->new_table, id, (VALUE)ent);
+
+ RB_OBJ_WRITTEN(ctx->clone, Qundef, ent->cref);
+
+ return ID_TABLE_CONTINUE;
+}
+
+static void
+copy_tables(VALUE clone, VALUE orig)
+{
+ if (RCLASS_CONST_TBL(clone)) {
+ rb_free_const_table(RCLASS_CONST_TBL(clone));
+ RCLASS_CONST_TBL(clone) = 0;
+ }
+ if (RCLASS_CVC_TBL(orig)) {
+ struct rb_id_table *rb_cvc_tbl = RCLASS_CVC_TBL(orig);
+ struct rb_id_table *rb_cvc_tbl_dup = rb_id_table_create(rb_id_table_size(rb_cvc_tbl));
+
+ struct cvc_table_copy_ctx ctx;
+ ctx.clone = clone;
+ ctx.new_table = rb_cvc_tbl_dup;
+ rb_id_table_foreach(rb_cvc_tbl, cvc_table_copy, &ctx);
+ RCLASS_CVC_TBL(clone) = rb_cvc_tbl_dup;
+ }
+ rb_id_table_free(RCLASS_M_TBL(clone));
+ RCLASS_M_TBL(clone) = 0;
+ if (!RB_TYPE_P(clone, T_ICLASS)) {
+ st_data_t id;
+
+ rb_iv_tbl_copy(clone, orig);
+ CONST_ID(id, "__tmp_classpath__");
+ rb_attr_delete(clone, id);
+ CONST_ID(id, "__classpath__");
+ rb_attr_delete(clone, id);
+ }
+ if (RCLASS_CONST_TBL(orig)) {
+ struct clone_const_arg arg;
+
+ arg.tbl = RCLASS_CONST_TBL(clone) = rb_id_table_create(0);
+ arg.klass = clone;
+ rb_id_table_foreach(RCLASS_CONST_TBL(orig), clone_const_i, &arg);
+ }
+}
+
+static bool ensure_origin(VALUE klass);
+
+/**
+ * If this flag is set, that module is allocated but not initialized yet.
+ */
+enum {RMODULE_ALLOCATED_BUT_NOT_INITIALIZED = RUBY_FL_USER5};
+
+static inline bool
+RMODULE_UNINITIALIZED(VALUE module)
+{
+ return FL_TEST_RAW(module, RMODULE_ALLOCATED_BUT_NOT_INITIALIZED);
+}
+
+void
+rb_module_set_initialized(VALUE mod)
+{
+ FL_UNSET_RAW(mod, RMODULE_ALLOCATED_BUT_NOT_INITIALIZED);
+ /* no more re-initialization */
+}
+
+void
+rb_module_check_initializable(VALUE mod)
+{
+ if (!RMODULE_UNINITIALIZED(mod)) {
+ rb_raise(rb_eTypeError, "already initialized module");
}
}
@@ -312,55 +497,107 @@ class_init_copy_check(VALUE clone, VALUE orig)
VALUE
rb_mod_init_copy(VALUE clone, VALUE orig)
{
+ switch (BUILTIN_TYPE(clone)) {
+ case T_CLASS:
+ case T_ICLASS:
+ class_init_copy_check(clone, orig);
+ break;
+ case T_MODULE:
+ rb_module_check_initializable(clone);
+ break;
+ default:
+ break;
+ }
+ if (!OBJ_INIT_COPY(clone, orig)) return clone;
+
/* cloned flag is refer at constant inline cache
* see vm_get_const_key_cref() in vm_insnhelper.c
*/
FL_SET(clone, RCLASS_CLONED);
FL_SET(orig , RCLASS_CLONED);
- if (RB_TYPE_P(clone, T_CLASS)) {
- class_init_copy_check(clone, orig);
- }
- if (!OBJ_INIT_COPY(clone, orig)) return clone;
if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
- RBASIC_SET_CLASS(clone, rb_singleton_class_clone(orig));
- rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
- }
- RCLASS_SET_SUPER(clone, RCLASS_SUPER(orig));
- RCLASS_EXT(clone)->allocator = RCLASS_EXT(orig)->allocator;
- if (RCLASS_IV_TBL(clone)) {
- st_free_table(RCLASS_IV_TBL(clone));
- RCLASS_IV_TBL(clone) = 0;
+ RBASIC_SET_CLASS(clone, rb_singleton_class_clone(orig));
+ rb_singleton_class_attached(METACLASS_OF(clone), (VALUE)clone);
}
- if (RCLASS_CONST_TBL(clone)) {
- rb_free_const_table(RCLASS_CONST_TBL(clone));
- RCLASS_CONST_TBL(clone) = 0;
+ RCLASS_ALLOCATOR(clone) = RCLASS_ALLOCATOR(orig);
+ copy_tables(clone, orig);
+ if (RCLASS_M_TBL(orig)) {
+ struct clone_method_arg arg;
+ arg.old_klass = orig;
+ arg.new_klass = clone;
+ RCLASS_M_TBL_INIT(clone);
+ rb_id_table_foreach(RCLASS_M_TBL(orig), clone_method_i, &arg);
}
- RCLASS_M_TBL(clone) = 0;
- if (RCLASS_IV_TBL(orig)) {
- st_data_t id;
- rb_iv_tbl_copy(clone, orig);
- CONST_ID(id, "__tmp_classpath__");
- st_delete(RCLASS_IV_TBL(clone), &id, 0);
- CONST_ID(id, "__classpath__");
- st_delete(RCLASS_IV_TBL(clone), &id, 0);
- CONST_ID(id, "__classid__");
- st_delete(RCLASS_IV_TBL(clone), &id, 0);
+ if (RCLASS_ORIGIN(orig) == orig) {
+ RCLASS_SET_SUPER(clone, RCLASS_SUPER(orig));
}
- if (RCLASS_CONST_TBL(orig)) {
- struct clone_const_arg arg;
+ else {
+ VALUE p = RCLASS_SUPER(orig);
+ VALUE orig_origin = RCLASS_ORIGIN(orig);
+ VALUE prev_clone_p = clone;
+ VALUE origin_stack = rb_ary_hidden_new(2);
+ VALUE origin[2];
+ VALUE clone_p = 0;
+ long origin_len;
+ int add_subclass;
+ VALUE clone_origin;
+
+ ensure_origin(clone);
+ clone_origin = RCLASS_ORIGIN(clone);
+
+ while (p && p != orig_origin) {
+ if (BUILTIN_TYPE(p) != T_ICLASS) {
+ rb_bug("non iclass between module/class and origin");
+ }
+ clone_p = class_alloc(RBASIC(p)->flags, METACLASS_OF(p));
+ RCLASS_SET_SUPER(prev_clone_p, clone_p);
+ prev_clone_p = clone_p;
+ RCLASS_M_TBL(clone_p) = RCLASS_M_TBL(p);
+ RCLASS_CONST_TBL(clone_p) = RCLASS_CONST_TBL(p);
+ RCLASS_ALLOCATOR(clone_p) = RCLASS_ALLOCATOR(p);
+ if (RB_TYPE_P(clone, T_CLASS)) {
+ RCLASS_SET_INCLUDER(clone_p, clone);
+ }
+ add_subclass = TRUE;
+ if (p != RCLASS_ORIGIN(p)) {
+ origin[0] = clone_p;
+ origin[1] = RCLASS_ORIGIN(p);
+ rb_ary_cat(origin_stack, origin, 2);
+ }
+ else if ((origin_len = RARRAY_LEN(origin_stack)) > 1 &&
+ RARRAY_AREF(origin_stack, origin_len - 1) == p) {
+ RCLASS_SET_ORIGIN(RARRAY_AREF(origin_stack, (origin_len -= 2)), clone_p);
+ RICLASS_SET_ORIGIN_SHARED_MTBL(clone_p);
+ rb_ary_resize(origin_stack, origin_len);
+ add_subclass = FALSE;
+ }
+ if (add_subclass) {
+ rb_module_add_to_subclasses_list(METACLASS_OF(p), clone_p);
+ }
+ p = RCLASS_SUPER(p);
+ }
- arg.tbl = RCLASS_CONST_TBL(clone) = rb_id_table_create(0);
- arg.klass = clone;
- rb_id_table_foreach(RCLASS_CONST_TBL(orig), clone_const_i, &arg);
- }
- if (RCLASS_M_TBL(orig)) {
- struct clone_method_arg arg;
- arg.old_klass = orig;
- arg.new_klass = clone;
- RCLASS_M_TBL_INIT(clone);
- rb_id_table_foreach(RCLASS_M_TBL(orig), clone_method_i, &arg);
+ if (p == orig_origin) {
+ if (clone_p) {
+ RCLASS_SET_SUPER(clone_p, clone_origin);
+ RCLASS_SET_SUPER(clone_origin, RCLASS_SUPER(orig_origin));
+ }
+ copy_tables(clone_origin, orig_origin);
+ if (RCLASS_M_TBL(orig_origin)) {
+ struct clone_method_arg arg;
+ arg.old_klass = orig;
+ arg.new_klass = clone;
+ RCLASS_M_TBL_INIT(clone_origin);
+ rb_id_table_foreach(RCLASS_M_TBL(orig_origin), clone_method_i, &arg);
+ }
+ }
+ else {
+ rb_bug("no origin for class that has origin");
+ }
+
+ rb_class_update_superclasses(clone);
}
return clone;
@@ -372,72 +609,73 @@ rb_singleton_class_clone(VALUE obj)
return rb_singleton_class_clone_and_attach(obj, Qundef);
}
+// Clone and return the singleton class of `obj` if it has been created and is attached to `obj`.
VALUE
rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
{
- const VALUE klass = RBASIC(obj)->klass;
+ const VALUE klass = METACLASS_OF(obj);
- if (!FL_TEST(klass, FL_SINGLETON))
- return klass;
+ // Note that `rb_singleton_class()` can create situations where `klass` is
+ // attached to an object other than `obj`. In which case `obj` does not have
+ // a material singleton class attached yet and there is no singleton class
+ // to clone.
+ if (!(FL_TEST(klass, FL_SINGLETON) && rb_attr_get(klass, id_attached) == obj)) {
+ // nothing to clone
+ return klass;
+ }
else {
- /* copy singleton(unnamed) class */
- VALUE clone = class_alloc(RBASIC(klass)->flags, 0);
-
- if (BUILTIN_TYPE(obj) == T_CLASS) {
- RBASIC_SET_CLASS(clone, clone);
- }
- else {
- RBASIC_SET_CLASS(clone, rb_singleton_class_clone(klass));
- }
-
- RCLASS_SET_SUPER(clone, RCLASS_SUPER(klass));
- RCLASS_EXT(clone)->allocator = RCLASS_EXT(klass)->allocator;
- if (RCLASS_IV_TBL(klass)) {
- rb_iv_tbl_copy(clone, klass);
- }
- if (RCLASS_CONST_TBL(klass)) {
- struct clone_const_arg arg;
- arg.tbl = RCLASS_CONST_TBL(clone) = rb_id_table_create(0);
- arg.klass = clone;
- rb_id_table_foreach(RCLASS_CONST_TBL(klass), clone_const_i, &arg);
- }
- if (attach != Qundef) {
- rb_singleton_class_attached(clone, attach);
- }
- RCLASS_M_TBL_INIT(clone);
- {
- struct clone_method_arg arg;
- arg.old_klass = klass;
- arg.new_klass = clone;
- rb_id_table_foreach(RCLASS_M_TBL(klass), clone_method_i, &arg);
- }
- rb_singleton_class_attached(RBASIC(clone)->klass, clone);
- FL_SET(clone, FL_SINGLETON);
-
- return clone;
+ /* copy singleton(unnamed) class */
+ bool klass_of_clone_is_new;
+ VALUE clone = class_alloc(RBASIC(klass)->flags, 0);
+
+ if (BUILTIN_TYPE(obj) == T_CLASS) {
+ klass_of_clone_is_new = true;
+ RBASIC_SET_CLASS(clone, clone);
+ }
+ else {
+ VALUE klass_metaclass_clone = rb_singleton_class_clone(klass);
+ // When `METACLASS_OF(klass) == klass_metaclass_clone`, it means the
+ // recursive call did not clone `METACLASS_OF(klass)`.
+ klass_of_clone_is_new = (METACLASS_OF(klass) != klass_metaclass_clone);
+ RBASIC_SET_CLASS(clone, klass_metaclass_clone);
+ }
+
+ RCLASS_SET_SUPER(clone, RCLASS_SUPER(klass));
+ RCLASS_ALLOCATOR(clone) = RCLASS_ALLOCATOR(klass);
+ rb_iv_tbl_copy(clone, klass);
+ if (RCLASS_CONST_TBL(klass)) {
+ struct clone_const_arg arg;
+ arg.tbl = RCLASS_CONST_TBL(clone) = rb_id_table_create(0);
+ arg.klass = clone;
+ rb_id_table_foreach(RCLASS_CONST_TBL(klass), clone_const_i, &arg);
+ }
+ if (!UNDEF_P(attach)) {
+ rb_singleton_class_attached(clone, attach);
+ }
+ RCLASS_M_TBL_INIT(clone);
+ {
+ struct clone_method_arg arg;
+ arg.old_klass = klass;
+ arg.new_klass = clone;
+ rb_id_table_foreach(RCLASS_M_TBL(klass), clone_method_i, &arg);
+ }
+ if (klass_of_clone_is_new) {
+ rb_singleton_class_attached(METACLASS_OF(clone), clone);
+ }
+ FL_SET(clone, FL_SINGLETON);
+
+ return clone;
}
}
-/*!
- * Attach a object to a singleton class.
- * @pre \a klass is the singleton class of \a obj.
- */
void
rb_singleton_class_attached(VALUE klass, VALUE obj)
{
if (FL_TEST(klass, FL_SINGLETON)) {
- if (!RCLASS_IV_TBL(klass)) {
- RCLASS_IV_TBL(klass) = st_init_numtable();
- }
- rb_class_ivar_set(klass, id_attached, obj);
+ rb_class_ivar_set(klass, id_attached, obj);
}
}
-
-
-#define METACLASS_OF(k) RBASIC(k)->klass
-#define SET_METACLASS_OF(k, cls) RBASIC_SET_CLASS(k, cls)
-
/*!
* whether k is a meta^(n)-class of Class class
* @retval 1 if \a k is a meta^(n)-class of Class class (n >= 0)
@@ -455,7 +693,7 @@ int
rb_singleton_class_internal_p(VALUE sklass)
{
return (RB_TYPE_P(rb_attr_get(sklass, id_attached), T_CLASS) &&
- !rb_singleton_class_has_metaclass_p(sklass));
+ !rb_singleton_class_has_metaclass_p(sklass));
}
/*!
@@ -497,19 +735,22 @@ make_metaclass(VALUE klass)
rb_singleton_class_attached(metaclass, klass);
if (META_CLASS_OF_CLASS_CLASS_P(klass)) {
- SET_METACLASS_OF(klass, metaclass);
- SET_METACLASS_OF(metaclass, metaclass);
+ SET_METACLASS_OF(klass, metaclass);
+ SET_METACLASS_OF(metaclass, metaclass);
}
else {
- VALUE tmp = METACLASS_OF(klass); /* for a meta^(n)-class klass, tmp is meta^(n)-class of Class class */
- SET_METACLASS_OF(klass, metaclass);
- SET_METACLASS_OF(metaclass, ENSURE_EIGENCLASS(tmp));
+ VALUE tmp = METACLASS_OF(klass); /* for a meta^(n)-class klass, tmp is meta^(n)-class of Class class */
+ SET_METACLASS_OF(klass, metaclass);
+ SET_METACLASS_OF(metaclass, ENSURE_EIGENCLASS(tmp));
}
super = RCLASS_SUPER(klass);
while (RB_TYPE_P(super, T_ICLASS)) super = RCLASS_SUPER(super);
RCLASS_SET_SUPER(metaclass, super ? ENSURE_EIGENCLASS(super) : rb_cClass);
+ // Full class ancestry may not have been filled until we reach here.
+ rb_class_update_superclasses(METACLASS_OF(metaclass));
+
return metaclass;
}
@@ -522,7 +763,7 @@ make_metaclass(VALUE klass)
static inline VALUE
make_singleton_class(VALUE obj)
{
- VALUE orig_class = RBASIC(obj)->klass;
+ VALUE orig_class = METACLASS_OF(obj);
VALUE klass = rb_class_boot(orig_class);
FL_SET(klass, FL_SINGLETON);
@@ -541,10 +782,62 @@ boot_defclass(const char *name, VALUE super)
ID id = rb_intern(name);
rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
- rb_vm_add_root_module(id, obj);
+ rb_vm_add_root_module(obj);
return obj;
}
+/***********************************************************************
+ *
+ * Document-class: Refinement
+ *
+ * Refinement is a class of the +self+ (current context) inside +refine+
+ * statement. It allows to import methods from other modules, see #import_methods.
+ */
+
+#if 0 /* for RDoc */
+/*
+ * Document-method: Refinement#import_methods
+ *
+ * call-seq:
+ * import_methods(module, ...) -> self
+ *
+ * Imports methods from modules. Unlike Module#include,
+ * Refinement#import_methods copies methods and adds them into the refinement,
+ * so the refinement is activated in the imported methods.
+ *
+ * Note that due to method copying, only methods defined in Ruby code can be imported.
+ *
+ * module StrUtils
+ * def indent(level)
+ * ' ' * level + self
+ * end
+ * end
+ *
+ * module M
+ * refine String do
+ * import_methods StrUtils
+ * end
+ * end
+ *
+ * using M
+ * "foo".indent(3)
+ * #=> " foo"
+ *
+ * module M
+ * refine String do
+ * import_methods Enumerable
+ * # Can't import method which is not defined with Ruby code: Enumerable#drop
+ * end
+ * end
+ *
+ */
+
+static VALUE
+refinement_import_methods(int argc, VALUE *argv, VALUE refinement)
+{
+}
+# endif
+
void
Init_class_hierarchy(void)
{
@@ -557,12 +850,21 @@ Init_class_hierarchy(void)
rb_cModule = boot_defclass("Module", rb_cObject);
rb_cClass = boot_defclass("Class", rb_cModule);
+ rb_cRefinement = boot_defclass("Refinement", rb_cModule);
+
+#if 0 /* for RDoc */
+ // we pretend it to be public, otherwise RDoc will ignore it
+ rb_define_method(rb_cRefinement, "import_methods", refinement_import_methods, -1);
+#endif
rb_const_set(rb_cObject, rb_intern_const("BasicObject"), rb_cBasicObject);
RBASIC_SET_CLASS(rb_cClass, rb_cClass);
RBASIC_SET_CLASS(rb_cModule, rb_cClass);
RBASIC_SET_CLASS(rb_cObject, rb_cClass);
+ RBASIC_SET_CLASS(rb_cRefinement, rb_cClass);
RBASIC_SET_CLASS(rb_cBasicObject, rb_cClass);
+
+ ENSURE_EIGENCLASS(rb_cRefinement);
}
@@ -580,24 +882,13 @@ VALUE
rb_make_metaclass(VALUE obj, VALUE unused)
{
if (BUILTIN_TYPE(obj) == T_CLASS) {
- return make_metaclass(obj);
+ return make_metaclass(obj);
}
else {
- return make_singleton_class(obj);
+ return make_singleton_class(obj);
}
}
-
-/*!
- * Defines a new class.
- * \param id ignored
- * \param super A class from which the new class will derive. NULL means \c Object class.
- * \return the created class
- * \throw TypeError if super is not a \c Class object.
- *
- * \note the returned class will not be associated with \a id.
- * You must explicitly set a class name if necessary.
- */
VALUE
rb_define_class_id(ID id, VALUE super)
{
@@ -605,7 +896,7 @@ rb_define_class_id(ID id, VALUE super)
if (!super) super = rb_cObject;
klass = rb_class_new(super);
- rb_make_metaclass(klass, RBASIC(super)->klass);
+ rb_make_metaclass(klass, METACLASS_OF(super));
return klass;
}
@@ -628,23 +919,6 @@ rb_class_inherited(VALUE super, VALUE klass)
return rb_funcall(super, inherited, 1, klass);
}
-
-
-/*!
- * Defines a top-level class.
- * \param name name of the class
- * \param super a class from which the new class will derive.
- * \return the created class
- * \throw TypeError if the constant name \a name is already taken but
- * the constant is not a \c Class.
- * \throw TypeError if the class is already defined but the class can not
- * be reopened because its superclass is not \a super.
- * \throw ArgumentError if the \a super is NULL.
- * \post top-level constant named \a name refers the returned class.
- *
- * \note if a class named \a name is already defined and its superclass is
- * \a super, the function just returns the defined class.
- */
VALUE
rb_define_class(const char *name, VALUE super)
{
@@ -653,116 +927,108 @@ rb_define_class(const char *name, VALUE super)
id = rb_intern(name);
if (rb_const_defined(rb_cObject, id)) {
- klass = rb_const_get(rb_cObject, id);
- if (!RB_TYPE_P(klass, T_CLASS)) {
- rb_raise(rb_eTypeError, "%s is not a class (%"PRIsVALUE")",
- name, rb_obj_class(klass));
- }
- if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_raise(rb_eTypeError, "superclass mismatch for class %s", name);
- }
+ klass = rb_const_get(rb_cObject, id);
+ if (!RB_TYPE_P(klass, T_CLASS)) {
+ rb_raise(rb_eTypeError, "%s is not a class (%"PRIsVALUE")",
+ name, rb_obj_class(klass));
+ }
+ if (rb_class_real(RCLASS_SUPER(klass)) != super) {
+ rb_raise(rb_eTypeError, "superclass mismatch for class %s", name);
+ }
/* Class may have been defined in Ruby and not pin-rooted */
- rb_vm_add_root_module(id, klass);
- return klass;
+ rb_vm_add_root_module(klass);
+ return klass;
}
if (!super) {
- rb_raise(rb_eArgError, "no super class for `%s'", name);
+ rb_raise(rb_eArgError, "no super class for `%s'", name);
}
klass = rb_define_class_id(id, super);
- rb_vm_add_root_module(id, klass);
+ rb_vm_add_root_module(klass);
rb_const_set(rb_cObject, id, klass);
rb_class_inherited(super, klass);
return klass;
}
-
-/*!
- * Defines a class under the namespace of \a outer.
- * \param outer a class which contains the new class.
- * \param name name of the new class
- * \param super a class from which the new class will derive.
- * NULL means \c Object class.
- * \return the created class
- * \throw TypeError if the constant name \a name is already taken but
- * the constant is not a \c Class.
- * \throw TypeError if the class is already defined but the class can not
- * be reopened because its superclass is not \a super.
- * \post top-level constant named \a name refers the returned class.
- *
- * \note if a class named \a name is already defined and its superclass is
- * \a super, the function just returns the defined class.
- */
VALUE
rb_define_class_under(VALUE outer, const char *name, VALUE super)
{
return rb_define_class_id_under(outer, rb_intern(name), super);
}
-
-/*!
- * Defines a class under the namespace of \a outer.
- * \param outer a class which contains the new class.
- * \param id name of the new class
- * \param super a class from which the new class will derive.
- * NULL means \c Object class.
- * \return the created class
- * \throw TypeError if the constant name \a name is already taken but
- * the constant is not a \c Class.
- * \throw TypeError if the class is already defined but the class can not
- * be reopened because its superclass is not \a super.
- * \post top-level constant named \a name refers the returned class.
- *
- * \note if a class named \a name is already defined and its superclass is
- * \a super, the function just returns the defined class.
- */
VALUE
-rb_define_class_id_under(VALUE outer, ID id, VALUE super)
+rb_define_class_id_under_no_pin(VALUE outer, ID id, VALUE super)
{
VALUE klass;
if (rb_const_defined_at(outer, id)) {
- klass = rb_const_get_at(outer, id);
- if (!RB_TYPE_P(klass, T_CLASS)) {
- rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a class"
- " (%"PRIsVALUE")",
- outer, rb_id2str(id), rb_obj_class(klass));
- }
- if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_raise(rb_eTypeError, "superclass mismatch for class "
- "%"PRIsVALUE"::%"PRIsVALUE""
- " (%"PRIsVALUE" is given but was %"PRIsVALUE")",
- outer, rb_id2str(id), RCLASS_SUPER(klass), super);
- }
- /* Class may have been defined in Ruby and not pin-rooted */
- rb_vm_add_root_module(id, klass);
+ klass = rb_const_get_at(outer, id);
+ if (!RB_TYPE_P(klass, T_CLASS)) {
+ rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a class"
+ " (%"PRIsVALUE")",
+ outer, rb_id2str(id), rb_obj_class(klass));
+ }
+ if (rb_class_real(RCLASS_SUPER(klass)) != super) {
+ rb_raise(rb_eTypeError, "superclass mismatch for class "
+ "%"PRIsVALUE"::%"PRIsVALUE""
+ " (%"PRIsVALUE" is given but was %"PRIsVALUE")",
+ outer, rb_id2str(id), RCLASS_SUPER(klass), super);
+ }
- return klass;
+ return klass;
}
if (!super) {
- rb_raise(rb_eArgError, "no super class for `%"PRIsVALUE"::%"PRIsVALUE"'",
- rb_class_path(outer), rb_id2str(id));
+ rb_raise(rb_eArgError, "no super class for `%"PRIsVALUE"::%"PRIsVALUE"'",
+ rb_class_path(outer), rb_id2str(id));
}
klass = rb_define_class_id(id, super);
rb_set_class_path_string(klass, outer, rb_id2str(id));
rb_const_set(outer, id, klass);
rb_class_inherited(super, klass);
- rb_vm_add_root_module(id, klass);
- rb_gc_register_mark_object(klass);
return klass;
}
VALUE
-rb_module_new(void)
+rb_define_class_id_under(VALUE outer, ID id, VALUE super)
+{
+ VALUE klass = rb_define_class_id_under_no_pin(outer, id, super);
+ rb_vm_add_root_module(klass);
+ return klass;
+}
+
+VALUE
+rb_module_s_alloc(VALUE klass)
+{
+ VALUE mod = class_alloc(T_MODULE, klass);
+ RCLASS_M_TBL_INIT(mod);
+ FL_SET(mod, RMODULE_ALLOCATED_BUT_NOT_INITIALIZED);
+ return mod;
+}
+
+static inline VALUE
+module_new(VALUE klass)
{
- VALUE mdl = class_alloc(T_MODULE, rb_cModule);
+ VALUE mdl = class_alloc(T_MODULE, klass);
RCLASS_M_TBL_INIT(mdl);
return (VALUE)mdl;
}
VALUE
+rb_module_new(void)
+{
+ return module_new(rb_cModule);
+}
+
+VALUE
+rb_refinement_new(void)
+{
+ return module_new(rb_cRefinement);
+}
+
+// Kept for compatibility. Use rb_module_new() instead.
+VALUE
rb_define_module_id(ID id)
{
return rb_module_new();
@@ -776,18 +1042,17 @@ rb_define_module(const char *name)
id = rb_intern(name);
if (rb_const_defined(rb_cObject, id)) {
- module = rb_const_get(rb_cObject, id);
- if (!RB_TYPE_P(module, T_MODULE)) {
- rb_raise(rb_eTypeError, "%s is not a module (%"PRIsVALUE")",
- name, rb_obj_class(module));
- }
+ module = rb_const_get(rb_cObject, id);
+ if (!RB_TYPE_P(module, T_MODULE)) {
+ rb_raise(rb_eTypeError, "%s is not a module (%"PRIsVALUE")",
+ name, rb_obj_class(module));
+ }
/* Module may have been defined in Ruby and not pin-rooted */
- rb_vm_add_root_module(id, module);
- return module;
+ rb_vm_add_root_module(module);
+ return module;
}
- module = rb_define_module_id(id);
- rb_vm_add_root_module(id, module);
- rb_gc_register_mark_object(module);
+ module = rb_module_new();
+ rb_vm_add_root_module(module);
rb_const_set(rb_cObject, id, module);
return module;
@@ -805,15 +1070,17 @@ rb_define_module_id_under(VALUE outer, ID id)
VALUE module;
if (rb_const_defined_at(outer, id)) {
- module = rb_const_get_at(outer, id);
- if (!RB_TYPE_P(module, T_MODULE)) {
- rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a module"
- " (%"PRIsVALUE")",
- outer, rb_id2str(id), rb_obj_class(module));
- }
- return module;
- }
- module = rb_define_module_id(id);
+ module = rb_const_get_at(outer, id);
+ if (!RB_TYPE_P(module, T_MODULE)) {
+ rb_raise(rb_eTypeError, "%"PRIsVALUE"::%"PRIsVALUE" is not a module"
+ " (%"PRIsVALUE")",
+ outer, rb_id2str(id), rb_obj_class(module));
+ }
+ /* Module may have been defined in Ruby and not pin-rooted */
+ rb_gc_register_mark_object(module);
+ return module;
+ }
+ module = rb_module_new();
rb_const_set(outer, id, module);
rb_set_class_path_string(module, outer, rb_id2str(id));
rb_gc_register_mark_object(module);
@@ -826,29 +1093,22 @@ rb_include_class_new(VALUE module, VALUE super)
{
VALUE klass = class_alloc(T_ICLASS, rb_cClass);
- RCLASS_M_TBL(OBJ_WB_UNPROTECT(klass)) =
- RCLASS_M_TBL(OBJ_WB_UNPROTECT(module)); /* TODO: unprotected? */
+ RCLASS_M_TBL(klass) = RCLASS_M_TBL(module);
- RCLASS_SET_ORIGIN(klass, module == RCLASS_ORIGIN(module) ? klass : RCLASS_ORIGIN(module));
+ RCLASS_SET_ORIGIN(klass, klass);
if (BUILTIN_TYPE(module) == T_ICLASS) {
- module = RBASIC(module)->klass;
- }
- if (!RCLASS_IV_TBL(module)) {
- RCLASS_IV_TBL(module) = st_init_numtable();
+ module = METACLASS_OF(module);
}
+ RUBY_ASSERT(!RB_TYPE_P(module, T_ICLASS));
if (!RCLASS_CONST_TBL(module)) {
- RCLASS_CONST_TBL(module) = rb_id_table_create(0);
+ RCLASS_CONST_TBL(module) = rb_id_table_create(0);
}
- RCLASS_IV_TBL(klass) = RCLASS_IV_TBL(module);
+
+ RCLASS_CVC_TBL(klass) = RCLASS_CVC_TBL(module);
RCLASS_CONST_TBL(klass) = RCLASS_CONST_TBL(module);
RCLASS_SET_SUPER(klass, super);
- if (RB_TYPE_P(module, T_ICLASS)) {
- RBASIC_SET_CLASS(klass, RBASIC(module)->klass);
- }
- else {
- RBASIC_SET_CLASS(klass, module);
- }
+ RBASIC_SET_CLASS(klass, module);
return (VALUE)klass;
}
@@ -860,8 +1120,9 @@ ensure_includable(VALUE klass, VALUE module)
{
rb_class_modify_check(klass);
Check_Type(module, T_MODULE);
+ rb_module_set_initialized(module);
if (!NIL_P(rb_refinement_module_get_refined_class(module))) {
- rb_raise(rb_eArgError, "refinement module is not allowed");
+ rb_raise(rb_eArgError, "refinement module is not allowed");
}
}
@@ -874,7 +1135,40 @@ rb_include_module(VALUE klass, VALUE module)
changed = include_modules_at(klass, RCLASS_ORIGIN(klass), module, TRUE);
if (changed < 0)
- rb_raise(rb_eArgError, "cyclic include detected");
+ rb_raise(rb_eArgError, "cyclic include detected");
+
+ if (RB_TYPE_P(klass, T_MODULE)) {
+ rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
+ // skip the placeholder subclass entry at the head of the list
+ if (iclass) {
+ RUBY_ASSERT(!iclass->klass);
+ iclass = iclass->next;
+ }
+
+ while (iclass) {
+ int do_include = 1;
+ VALUE check_class = iclass->klass;
+ /* During lazy sweeping, iclass->klass could be a dead object that
+ * has not yet been swept. */
+ if (!rb_objspace_garbage_object_p(check_class)) {
+ while (check_class) {
+ RUBY_ASSERT(!rb_objspace_garbage_object_p(check_class));
+
+ if (RB_TYPE_P(check_class, T_ICLASS) &&
+ (METACLASS_OF(check_class) == module)) {
+ do_include = 0;
+ }
+ check_class = RCLASS_SUPER(check_class);
+ }
+
+ if (do_include) {
+ include_modules_at(iclass->klass, RCLASS_ORIGIN(iclass->klass), module, TRUE);
+ }
+ }
+
+ iclass = iclass->next;
+ }
+ }
}
static enum rb_id_table_iterator_result
@@ -884,129 +1178,252 @@ add_refined_method_entry_i(ID key, VALUE value, void *data)
return ID_TABLE_CONTINUE;
}
-static void ensure_origin(VALUE klass);
+static enum rb_id_table_iterator_result
+clear_module_cache_i(ID id, VALUE val, void *data)
+{
+ VALUE klass = (VALUE)data;
+ rb_clear_method_cache(klass, id);
+ return ID_TABLE_CONTINUE;
+}
-static int
-include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super)
+static bool
+module_in_super_chain(const VALUE klass, VALUE module)
{
- VALUE p, iclass;
- int method_changed = 0, constant_changed = 0;
struct rb_id_table *const klass_m_tbl = RCLASS_M_TBL(RCLASS_ORIGIN(klass));
-
- if (FL_TEST(module, RCLASS_REFINED_BY_ANY)) {
- ensure_origin(module);
+ if (klass_m_tbl) {
+ while (module) {
+ if (klass_m_tbl == RCLASS_M_TBL(module))
+ return true;
+ module = RCLASS_SUPER(module);
+ }
}
+ return false;
+}
+
+// For each ID key in the class constant table, we're going to clear the VM's
+// inline constant caches associated with it.
+static enum rb_id_table_iterator_result
+clear_constant_cache_i(ID id, VALUE value, void *data)
+{
+ rb_clear_constant_cache_for_id(id);
+ return ID_TABLE_CONTINUE;
+}
+
+static int
+do_include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super, bool check_cyclic)
+{
+ VALUE p, iclass, origin_stack = 0;
+ int method_changed = 0;
+ long origin_len;
+ VALUE klass_origin = RCLASS_ORIGIN(klass);
+ VALUE original_klass = klass;
+
+ if (check_cyclic && module_in_super_chain(klass, module))
+ return -1;
while (module) {
- int superclass_seen = FALSE;
- struct rb_id_table *tbl;
-
- if (klass_m_tbl && klass_m_tbl == RCLASS_M_TBL(module))
- return -1;
- /* ignore if the module included already in superclasses */
- for (p = RCLASS_SUPER(klass); p; p = RCLASS_SUPER(p)) {
- int type = BUILTIN_TYPE(p);
- if (type == T_ICLASS) {
- if (RCLASS_M_TBL(p) == RCLASS_M_TBL(module)) {
- if (!superclass_seen) {
- c = p; /* move insertion point */
- }
- goto skip;
- }
- }
- else if (type == T_CLASS) {
- if (!search_super) break;
- superclass_seen = TRUE;
- }
- }
- iclass = rb_include_class_new(module, RCLASS_SUPER(c));
- c = RCLASS_SET_SUPER(c, iclass);
- RCLASS_SET_INCLUDER(iclass, klass);
+ int c_seen = FALSE;
+ int superclass_seen = FALSE;
+ struct rb_id_table *tbl;
- {
- VALUE m = module;
- if (BUILTIN_TYPE(m) == T_ICLASS) m = RBASIC(m)->klass;
- rb_module_add_to_subclasses_list(m, iclass);
- }
+ if (klass == c) {
+ c_seen = TRUE;
+ }
+ if (klass_origin != c || search_super) {
+ /* ignore if the module included already in superclasses for include,
+ * ignore if the module included before origin class for prepend
+ */
+ for (p = RCLASS_SUPER(klass); p; p = RCLASS_SUPER(p)) {
+ int type = BUILTIN_TYPE(p);
+ if (klass_origin == p && !search_super)
+ break;
+ if (c == p)
+ c_seen = TRUE;
+ if (type == T_ICLASS) {
+ if (RCLASS_M_TBL(p) == RCLASS_M_TBL(module)) {
+ if (!superclass_seen && c_seen) {
+ c = p; /* move insertion point */
+ }
+ goto skip;
+ }
+ }
+ else if (type == T_CLASS) {
+ superclass_seen = TRUE;
+ }
+ }
+ }
+
+ VALUE super_class = RCLASS_SUPER(c);
+
+ // invalidate inline method cache
+ RB_DEBUG_COUNTER_INC(cvar_include_invalidate);
+ ruby_vm_global_cvar_state++;
+ tbl = RCLASS_M_TBL(module);
+ if (tbl && rb_id_table_size(tbl)) {
+ if (search_super) { // include
+ if (super_class && !RB_TYPE_P(super_class, T_MODULE)) {
+ rb_id_table_foreach(tbl, clear_module_cache_i, (void *)super_class);
+ }
+ }
+ else { // prepend
+ if (!RB_TYPE_P(original_klass, T_MODULE)) {
+ rb_id_table_foreach(tbl, clear_module_cache_i, (void *)original_klass);
+ }
+ }
+ method_changed = 1;
+ }
- if (FL_TEST(klass, RMODULE_IS_REFINEMENT)) {
- VALUE refined_class =
- rb_refinement_module_get_refined_class(klass);
+ // setup T_ICLASS for the include/prepend module
+ iclass = rb_include_class_new(module, super_class);
+ c = RCLASS_SET_SUPER(c, iclass);
+ RCLASS_SET_INCLUDER(iclass, klass);
+ if (module != RCLASS_ORIGIN(module)) {
+ if (!origin_stack) origin_stack = rb_ary_hidden_new(2);
+ VALUE origin[2] = {iclass, RCLASS_ORIGIN(module)};
+ rb_ary_cat(origin_stack, origin, 2);
+ }
+ else if (origin_stack && (origin_len = RARRAY_LEN(origin_stack)) > 1 &&
+ RARRAY_AREF(origin_stack, origin_len - 1) == module) {
+ RCLASS_SET_ORIGIN(RARRAY_AREF(origin_stack, (origin_len -= 2)), iclass);
+ RICLASS_SET_ORIGIN_SHARED_MTBL(iclass);
+ rb_ary_resize(origin_stack, origin_len);
+ }
- rb_id_table_foreach(RMODULE_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
- FL_SET(c, RMODULE_INCLUDED_INTO_REFINEMENT);
- }
+ VALUE m = module;
+ if (BUILTIN_TYPE(m) == T_ICLASS) m = METACLASS_OF(m);
+ rb_module_add_to_subclasses_list(m, iclass);
- tbl = RMODULE_M_TBL(module);
- if (tbl && rb_id_table_size(tbl)) method_changed = 1;
+ if (BUILTIN_TYPE(klass) == T_MODULE && FL_TEST(klass, RMODULE_IS_REFINEMENT)) {
+ VALUE refined_class =
+ rb_refinement_module_get_refined_class(klass);
- tbl = RMODULE_CONST_TBL(module);
- if (tbl && rb_id_table_size(tbl)) constant_changed = 1;
+ rb_id_table_foreach(RCLASS_M_TBL(module), add_refined_method_entry_i, (void *)refined_class);
+ RUBY_ASSERT(BUILTIN_TYPE(c) == T_MODULE);
+ }
+
+ tbl = RCLASS_CONST_TBL(module);
+ if (tbl && rb_id_table_size(tbl))
+ rb_id_table_foreach(tbl, clear_constant_cache_i, NULL);
skip:
- module = RCLASS_SUPER(module);
+ module = RCLASS_SUPER(module);
}
- if (method_changed) rb_clear_method_cache_by_class(klass);
- if (constant_changed) rb_clear_constant_cache();
-
return method_changed;
}
+static int
+include_modules_at(const VALUE klass, VALUE c, VALUE module, int search_super)
+{
+ return do_include_modules_at(klass, c, module, search_super, true);
+}
+
static enum rb_id_table_iterator_result
move_refined_method(ID key, VALUE value, void *data)
{
- rb_method_entry_t *me = (rb_method_entry_t *) value;
- VALUE klass = (VALUE)data;
- struct rb_id_table *tbl = RCLASS_M_TBL(klass);
+ rb_method_entry_t *me = (rb_method_entry_t *)value;
if (me->def->type == VM_METHOD_TYPE_REFINED) {
- if (me->def->body.refined.orig_me) {
- const rb_method_entry_t *orig_me = me->def->body.refined.orig_me, *new_me;
- RB_OBJ_WRITE(me, &me->def->body.refined.orig_me, NULL);
- new_me = rb_method_entry_clone(me);
- rb_id_table_insert(tbl, key, (VALUE)new_me);
- RB_OBJ_WRITTEN(klass, Qundef, new_me);
- rb_method_entry_copy(me, orig_me);
- return ID_TABLE_CONTINUE;
- }
- else {
- rb_id_table_insert(tbl, key, (VALUE)me);
- return ID_TABLE_DELETE;
- }
+ VALUE klass = (VALUE)data;
+ struct rb_id_table *tbl = RCLASS_M_TBL(klass);
+
+ if (me->def->body.refined.orig_me) {
+ const rb_method_entry_t *orig_me = me->def->body.refined.orig_me, *new_me;
+ RB_OBJ_WRITE(me, &me->def->body.refined.orig_me, NULL);
+ new_me = rb_method_entry_clone(me);
+ rb_method_table_insert(klass, tbl, key, new_me);
+ rb_method_entry_copy(me, orig_me);
+ return ID_TABLE_CONTINUE;
+ }
+ else {
+ rb_method_table_insert(klass, tbl, key, me);
+ return ID_TABLE_DELETE;
+ }
}
else {
- return ID_TABLE_CONTINUE;
+ return ID_TABLE_CONTINUE;
}
}
-static void
+static enum rb_id_table_iterator_result
+cache_clear_refined_method(ID key, VALUE value, void *data)
+{
+ rb_method_entry_t *me = (rb_method_entry_t *) value;
+
+ if (me->def->type == VM_METHOD_TYPE_REFINED && me->def->body.refined.orig_me) {
+ VALUE klass = (VALUE)data;
+ rb_clear_method_cache(klass, me->called_id);
+ }
+ // Refined method entries without an orig_me is going to stay in the method
+ // table of klass, like before the move, so no need to clear the cache.
+
+ return ID_TABLE_CONTINUE;
+}
+
+static bool
ensure_origin(VALUE klass)
{
VALUE origin = RCLASS_ORIGIN(klass);
if (origin == klass) {
- origin = class_alloc(T_ICLASS, klass);
- OBJ_WB_UNPROTECT(origin); /* TODO: conservative shading. Need more survey. */
- RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
- RCLASS_SET_SUPER(klass, origin);
- RCLASS_SET_ORIGIN(klass, origin);
- RCLASS_M_TBL(origin) = RCLASS_M_TBL(klass);
- RCLASS_M_TBL_INIT(klass);
- rb_id_table_foreach(RCLASS_M_TBL(origin), move_refined_method, (void *)klass);
+ origin = class_alloc(T_ICLASS, klass);
+ RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
+ RCLASS_SET_SUPER(klass, origin);
+ RCLASS_SET_ORIGIN(klass, origin);
+ RCLASS_M_TBL(origin) = RCLASS_M_TBL(klass);
+ RCLASS_M_TBL_INIT(klass);
+ rb_id_table_foreach(RCLASS_M_TBL(origin), cache_clear_refined_method, (void *)klass);
+ rb_id_table_foreach(RCLASS_M_TBL(origin), move_refined_method, (void *)klass);
+ return true;
}
+ return false;
}
void
rb_prepend_module(VALUE klass, VALUE module)
{
- int changed = 0;
+ int changed;
+ bool klass_had_no_origin;
ensure_includable(klass, module);
- ensure_origin(klass);
- changed = include_modules_at(klass, klass, module, FALSE);
- if (changed < 0)
- rb_raise(rb_eArgError, "cyclic prepend detected");
+ if (module_in_super_chain(klass, module))
+ rb_raise(rb_eArgError, "cyclic prepend detected");
+
+ klass_had_no_origin = ensure_origin(klass);
+ changed = do_include_modules_at(klass, klass, module, FALSE, false);
+ RUBY_ASSERT(changed >= 0); // already checked for cyclic prepend above
if (changed) {
- rb_vm_check_redefinition_by_prepend(klass);
+ rb_vm_check_redefinition_by_prepend(klass);
+ }
+ if (RB_TYPE_P(klass, T_MODULE)) {
+ rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
+ // skip the placeholder subclass entry at the head of the list if it exists
+ if (iclass) {
+ RUBY_ASSERT(!iclass->klass);
+ iclass = iclass->next;
+ }
+
+ VALUE klass_origin = RCLASS_ORIGIN(klass);
+ struct rb_id_table *klass_m_tbl = RCLASS_M_TBL(klass);
+ struct rb_id_table *klass_origin_m_tbl = RCLASS_M_TBL(klass_origin);
+ while (iclass) {
+ /* During lazy sweeping, iclass->klass could be a dead object that
+ * has not yet been swept. */
+ if (!rb_objspace_garbage_object_p(iclass->klass)) {
+ const VALUE subclass = iclass->klass;
+ if (klass_had_no_origin && klass_origin_m_tbl == RCLASS_M_TBL(subclass)) {
+ // backfill an origin iclass to handle refinements and future prepends
+ rb_id_table_foreach(RCLASS_M_TBL(subclass), clear_module_cache_i, (void *)subclass);
+ RCLASS_M_TBL(subclass) = klass_m_tbl;
+ VALUE origin = rb_include_class_new(klass_origin, RCLASS_SUPER(subclass));
+ RCLASS_SET_SUPER(subclass, origin);
+ RCLASS_SET_INCLUDER(origin, RCLASS_INCLUDER(subclass));
+ RCLASS_SET_ORIGIN(subclass, origin);
+ RICLASS_SET_ORIGIN_SHARED_MTBL(origin);
+ }
+ include_modules_at(subclass, subclass, module, FALSE);
+ }
+
+ iclass = iclass->next;
+ }
}
}
@@ -1014,17 +1431,22 @@ rb_prepend_module(VALUE klass, VALUE module)
* call-seq:
* mod.included_modules -> array
*
- * Returns the list of modules included in <i>mod</i>.
+ * Returns the list of modules included or prepended in <i>mod</i>
+ * or one of <i>mod</i>'s ancestors.
+ *
+ * module Sub
+ * end
*
* module Mixin
+ * prepend Sub
* end
*
* module Outer
* include Mixin
* end
*
- * Mixin.included_modules #=> []
- * Outer.included_modules #=> [Mixin]
+ * Mixin.included_modules #=> [Sub]
+ * Outer.included_modules #=> [Sub, Mixin]
*/
VALUE
@@ -1035,11 +1457,11 @@ rb_mod_included_modules(VALUE mod)
VALUE origin = RCLASS_ORIGIN(mod);
for (p = RCLASS_SUPER(mod); p; p = RCLASS_SUPER(p)) {
- if (p != origin && BUILTIN_TYPE(p) == T_ICLASS) {
- VALUE m = RBASIC(p)->klass;
- if (RB_TYPE_P(m, T_MODULE))
- rb_ary_push(ary, m);
- }
+ if (p != origin && RCLASS_ORIGIN(p) == p && BUILTIN_TYPE(p) == T_ICLASS) {
+ VALUE m = METACLASS_OF(p);
+ if (RB_TYPE_P(m, T_MODULE))
+ rb_ary_push(ary, m);
+ }
}
return ary;
}
@@ -1048,8 +1470,8 @@ rb_mod_included_modules(VALUE mod)
* call-seq:
* mod.include?(module) -> true or false
*
- * Returns <code>true</code> if <i>module</i> is included in
- * <i>mod</i> or one of <i>mod</i>'s ancestors.
+ * Returns <code>true</code> if <i>module</i> is included
+ * or prepended in <i>mod</i> or one of <i>mod</i>'s ancestors.
*
* module A
* end
@@ -1070,9 +1492,9 @@ rb_mod_include_p(VALUE mod, VALUE mod2)
Check_Type(mod2, T_MODULE);
for (p = RCLASS_SUPER(mod); p; p = RCLASS_SUPER(p)) {
- if (BUILTIN_TYPE(p) == T_ICLASS) {
- if (RBASIC(p)->klass == mod2) return Qtrue;
- }
+ if (BUILTIN_TYPE(p) == T_ICLASS && !FL_TEST(p, RICLASS_IS_ORIGIN)) {
+ if (METACLASS_OF(p) == mod2) return Qtrue;
+ }
}
return Qfalse;
}
@@ -1099,19 +1521,149 @@ VALUE
rb_mod_ancestors(VALUE mod)
{
VALUE p, ary = rb_ary_new();
+ VALUE refined_class = Qnil;
+ if (BUILTIN_TYPE(mod) == T_MODULE && FL_TEST(mod, RMODULE_IS_REFINEMENT)) {
+ refined_class = rb_refinement_module_get_refined_class(mod);
+ }
for (p = mod; p; p = RCLASS_SUPER(p)) {
+ if (p == refined_class) break;
if (p != RCLASS_ORIGIN(p)) continue;
- if (BUILTIN_TYPE(p) == T_ICLASS) {
- rb_ary_push(ary, RBASIC(p)->klass);
- }
+ if (BUILTIN_TYPE(p) == T_ICLASS) {
+ rb_ary_push(ary, METACLASS_OF(p));
+ }
else {
- rb_ary_push(ary, p);
- }
+ rb_ary_push(ary, p);
+ }
}
return ary;
}
+struct subclass_traverse_data
+{
+ VALUE buffer;
+ long count;
+ long maxcount;
+ bool immediate_only;
+};
+
+static void
+class_descendants_recursive(VALUE klass, VALUE v)
+{
+ struct subclass_traverse_data *data = (struct subclass_traverse_data *) v;
+
+ if (BUILTIN_TYPE(klass) == T_CLASS && !FL_TEST(klass, FL_SINGLETON)) {
+ if (data->buffer && data->count < data->maxcount && !rb_objspace_garbage_object_p(klass)) {
+ // assumes that this does not cause GC as long as the length does not exceed the capacity
+ rb_ary_push(data->buffer, klass);
+ }
+ data->count++;
+ if (!data->immediate_only) {
+ rb_class_foreach_subclass(klass, class_descendants_recursive, v);
+ }
+ }
+ else {
+ rb_class_foreach_subclass(klass, class_descendants_recursive, v);
+ }
+}
+
+static VALUE
+class_descendants(VALUE klass, bool immediate_only)
+{
+ struct subclass_traverse_data data = { Qfalse, 0, -1, immediate_only };
+
+ // estimate the count of subclasses
+ rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
+
+ // the following allocation may cause GC which may change the number of subclasses
+ data.buffer = rb_ary_new_capa(data.count);
+ data.maxcount = data.count;
+ data.count = 0;
+
+ size_t gc_count = rb_gc_count();
+
+ // enumerate subclasses
+ rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
+
+ if (gc_count != rb_gc_count()) {
+ rb_bug("GC must not occur during the subclass iteration of Class#descendants");
+ }
+
+ return data.buffer;
+}
+
+/*
+ * call-seq:
+ * subclasses -> array
+ *
+ * Returns an array of classes where the receiver is the
+ * direct superclass of the class, excluding singleton classes.
+ * The order of the returned array is not defined.
+ *
+ * class A; end
+ * class B < A; end
+ * class C < B; end
+ * class D < A; end
+ *
+ * A.subclasses #=> [D, B]
+ * B.subclasses #=> [C]
+ * C.subclasses #=> []
+ *
+ * Anonymous subclasses (not associated with a constant) are
+ * returned, too:
+ *
+ * c = Class.new(A)
+ * A.subclasses # => [#<Class:0x00007f003c77bd78>, D, B]
+ *
+ * Note that the parent does not hold references to subclasses
+ * and doesn't prevent them from being garbage collected. This
+ * means that the subclass might disappear when all references
+ * to it are dropped:
+ *
+ * # drop the reference to subclass, it can be garbage-collected now
+ * c = nil
+ *
+ * A.subclasses
+ * # It can be
+ * # => [#<Class:0x00007f003c77bd78>, D, B]
+ * # ...or just
+ * # => [D, B]
+ * # ...depending on whether garbage collector was run
+ */
+
+VALUE
+rb_class_subclasses(VALUE klass)
+{
+ return class_descendants(klass, true);
+}
+
+/*
+ * call-seq:
+ * attached_object -> object
+ *
+ * Returns the object for which the receiver is the singleton class.
+ *
+ * Raises an TypeError if the class is not a singleton class.
+ *
+ * class Foo; end
+ *
+ * Foo.singleton_class.attached_object #=> Foo
+ * Foo.attached_object #=> TypeError: `Foo' is not a singleton class
+ * Foo.new.singleton_class.attached_object #=> #<Foo:0x000000010491a370>
+ * TrueClass.attached_object #=> TypeError: `TrueClass' is not a singleton class
+ * NilClass.attached_object #=> TypeError: `NilClass' is not a singleton class
+ */
+
+VALUE
+rb_class_attached_object(VALUE klass)
+{
+ if (!FL_TEST(klass, FL_SINGLETON)) {
+ rb_raise(rb_eTypeError, "`%"PRIsVALUE"' is not a singleton class", klass);
+ }
+
+ return rb_attr_get(klass, id_attached);
+}
+
static void
ins_methods_push(st_data_t name, st_data_t ary)
{
@@ -1124,39 +1676,45 @@ ins_methods_i(st_data_t name, st_data_t type, st_data_t ary)
switch ((rb_method_visibility_t)type) {
case METHOD_VISI_UNDEF:
case METHOD_VISI_PRIVATE:
- break;
+ break;
default: /* everything but private */
- ins_methods_push(name, ary);
- break;
+ ins_methods_push(name, ary);
+ break;
}
return ST_CONTINUE;
}
static int
-ins_methods_prot_i(st_data_t name, st_data_t type, st_data_t ary)
+ins_methods_type_i(st_data_t name, st_data_t type, st_data_t ary, rb_method_visibility_t visi)
{
- if ((rb_method_visibility_t)type == METHOD_VISI_PROTECTED) {
- ins_methods_push(name, ary);
+ if ((rb_method_visibility_t)type == visi) {
+ ins_methods_push(name, ary);
}
return ST_CONTINUE;
}
static int
+ins_methods_prot_i(st_data_t name, st_data_t type, st_data_t ary)
+{
+ return ins_methods_type_i(name, type, ary, METHOD_VISI_PROTECTED);
+}
+
+static int
ins_methods_priv_i(st_data_t name, st_data_t type, st_data_t ary)
{
- if ((rb_method_visibility_t)type == METHOD_VISI_PRIVATE) {
- ins_methods_push(name, ary);
- }
- return ST_CONTINUE;
+ return ins_methods_type_i(name, type, ary, METHOD_VISI_PRIVATE);
}
static int
ins_methods_pub_i(st_data_t name, st_data_t type, st_data_t ary)
{
- if ((rb_method_visibility_t)type == METHOD_VISI_PUBLIC) {
- ins_methods_push(name, ary);
- }
- return ST_CONTINUE;
+ return ins_methods_type_i(name, type, ary, METHOD_VISI_PUBLIC);
+}
+
+static int
+ins_methods_undef_i(st_data_t name, st_data_t type, st_data_t ary)
+{
+ return ins_methods_type_i(name, type, ary, METHOD_VISI_UNDEF);
}
struct method_entry_arg {
@@ -1172,19 +1730,20 @@ method_entry_i(ID key, VALUE value, void *data)
rb_method_visibility_t type;
if (me->def->type == VM_METHOD_TYPE_REFINED) {
- VALUE owner = me->owner;
- me = rb_resolve_refined_method(Qnil, me);
- if (!me) return ID_TABLE_CONTINUE;
- if (!arg->recur && me->owner != owner) return ID_TABLE_CONTINUE;
+ VALUE owner = me->owner;
+ me = rb_resolve_refined_method(Qnil, me);
+ if (!me) return ID_TABLE_CONTINUE;
+ if (!arg->recur && me->owner != owner) return ID_TABLE_CONTINUE;
}
if (!st_is_member(arg->list, key)) {
- if (UNDEFINED_METHOD_ENTRY_P(me)) {
- type = METHOD_VISI_UNDEF; /* none */
- }
- else {
- type = METHOD_ENTRY_VISI(me);
- }
- st_add_direct(arg->list, key, (st_data_t)type);
+ if (UNDEFINED_METHOD_ENTRY_P(me)) {
+ type = METHOD_VISI_UNDEF; /* none */
+ }
+ else {
+ type = METHOD_ENTRY_VISI(me);
+ RUBY_ASSERT(type != METHOD_VISI_UNDEF);
+ }
+ st_add_direct(arg->list, key, (st_data_t)type);
}
return ID_TABLE_CONTINUE;
}
@@ -1225,14 +1784,14 @@ class_instance_method_list(int argc, const VALUE *argv, VALUE mod, int obj, int
}
if (!recur && RCLASS_ORIGIN(mod) != mod) {
- mod = RCLASS_ORIGIN(mod);
- prepended = 1;
+ mod = RCLASS_ORIGIN(mod);
+ prepended = 1;
}
for (; mod; mod = RCLASS_SUPER(mod)) {
add_instance_method_list(mod, &me_arg);
- if (BUILTIN_TYPE(mod) == T_ICLASS && !prepended) continue;
- if (!recur) break;
+ if (BUILTIN_TYPE(mod) == T_ICLASS && !prepended) continue;
+ if (!recur) break;
}
ary = rb_ary_new2(me_arg.list->num_entries);
st_foreach(me_arg.list, func, ary);
@@ -1266,6 +1825,15 @@ class_instance_method_list(int argc, const VALUE *argv, VALUE mod, int obj, int
* B.instance_methods(true).include?(:method1) #=> true
* C.instance_methods(false) #=> [:method3]
* C.instance_methods.include?(:method2) #=> true
+ *
+ * Note that method visibility changes in the current class, as well as aliases,
+ * are considered as methods of the current class by this method:
+ *
+ * class C < B
+ * alias method4 method2
+ * protected :method2
+ * end
+ * C.instance_methods(false).sort #=> [:method2, :method3, :method4]
*/
VALUE
@@ -1329,6 +1897,21 @@ rb_class_public_instance_methods(int argc, const VALUE *argv, VALUE mod)
/*
* call-seq:
+ * mod.undefined_instance_methods -> array
+ *
+ * Returns a list of the undefined instance methods defined in <i>mod</i>.
+ * The undefined methods of any ancestors are not included.
+ */
+
+VALUE
+rb_class_undefined_instance_methods(VALUE mod)
+{
+ VALUE include_super = Qfalse;
+ return class_instance_method_list(1, &include_super, mod, 0, ins_methods_undef_i);
+}
+
+/*
+ * call-seq:
* obj.methods(regular=true) -> array
*
* Returns a list of the names of public and protected methods of
@@ -1362,7 +1945,7 @@ rb_obj_methods(int argc, const VALUE *argv, VALUE obj)
{
rb_check_arity(argc, 0, 1);
if (argc > 0 && !RTEST(argv[0])) {
- return rb_obj_singleton_methods(argc, argv, obj);
+ return rb_obj_singleton_methods(argc, argv, obj);
}
return class_instance_method_list(argc, argv, CLASS_OF(obj), 1, ins_methods_i);
}
@@ -1462,14 +2045,14 @@ rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj)
me_arg.list = st_init_numtable();
me_arg.recur = recur;
if (klass && FL_TEST(klass, FL_SINGLETON)) {
- if ((mtbl = RCLASS_M_TBL(origin)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
- klass = RCLASS_SUPER(klass);
+ if ((mtbl = RCLASS_M_TBL(origin)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
+ klass = RCLASS_SUPER(klass);
}
if (recur) {
- while (klass && (FL_TEST(klass, FL_SINGLETON) || RB_TYPE_P(klass, T_ICLASS))) {
- if (klass != origin && (mtbl = RCLASS_M_TBL(klass)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
- klass = RCLASS_SUPER(klass);
- }
+ while (klass && (FL_TEST(klass, FL_SINGLETON) || RB_TYPE_P(klass, T_ICLASS))) {
+ if (klass != origin && (mtbl = RCLASS_M_TBL(klass)) != 0) rb_id_table_foreach(mtbl, method_entry_i, &me_arg);
+ klass = RCLASS_SUPER(klass);
+ }
}
ary = rb_ary_new2(me_arg.list->num_entries);
st_foreach(me_arg.list, ins_methods_i, ary);
@@ -1482,56 +2065,7 @@ rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj)
* \}
*/
/*!
- * \defgroup defmethod Defining methods
- * There are some APIs to define a method from C.
- * These API takes a C function as a method body.
- *
- * \par Method body functions
- * Method body functions must return a VALUE and
- * can be one of the following form:
- * <dl>
- * <dt>Fixed number of parameters</dt>
- * <dd>
- * This form is a normal C function, excepting it takes
- * a receiver object as the first argument.
- *
- * \code
- * static VALUE my_method(VALUE self, VALUE x, VALUE y);
- * \endcode
- * </dd>
- * <dt>argc and argv style</dt>
- * <dd>
- * This form takes three parameters: \a argc, \a argv and \a self.
- * \a self is the receiver. \a argc is the number of arguments.
- * \a argv is a pointer to an array of the arguments.
- *
- * \code
- * static VALUE my_method(int argc, VALUE *argv, VALUE self);
- * \endcode
- * </dd>
- * <dt>Ruby array style</dt>
- * <dd>
- * This form takes two parameters: self and args.
- * \a self is the receiver. \a args is an Array object which
- * contains the arguments.
- *
- * \code
- * static VALUE my_method(VALUE self, VALUE args);
- * \endcode
- * </dd>
- *
- * \par Number of parameters
- * Method defining APIs takes the number of parameters which the
- * method will takes. This number is called \a argc.
- * \a argc can be:
- * <dl>
- * <dt>zero or positive number</dt>
- * <dd>This means the method body function takes a fixed number of parameters</dd>
- * <dt>-1</dt>
- * <dd>This means the method body function is "argc and argv" style.</dd>
- * <dt>-2</dt>
- * <dd>This means the method body function is "self and args" style.</dd>
- * </dl>
+ * \addtogroup defmethod
* \{
*/
@@ -1590,7 +2124,7 @@ rb_undef_methods_from(VALUE klass, VALUE super)
{
struct rb_id_table *mtbl = RCLASS_M_TBL(super);
if (mtbl) {
- rb_id_table_foreach(mtbl, undef_method_i, (void *)klass);
+ rb_id_table_foreach(mtbl, undef_method_i, (void *)klass);
}
}
@@ -1602,19 +2136,15 @@ rb_undef_methods_from(VALUE klass, VALUE super)
* \{
*/
-#define SPECIAL_SINGLETON(x,c) do {\
- if (obj == (x)) {\
- return (c);\
- }\
-} while (0)
-
static inline VALUE
special_singleton_class_of(VALUE obj)
{
- SPECIAL_SINGLETON(Qnil, rb_cNilClass);
- SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
- SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);
- return Qnil;
+ switch (obj) {
+ case Qnil: return rb_cNilClass;
+ case Qfalse: return rb_cFalseClass;
+ case Qtrue: return rb_cTrueClass;
+ default: return Qnil;
+ }
}
VALUE
@@ -1637,32 +2167,31 @@ singleton_class_of(VALUE obj)
{
VALUE klass;
- if (FIXNUM_P(obj) || FLONUM_P(obj) || STATIC_SYM_P(obj)) {
- no_singleton:
- rb_raise(rb_eTypeError, "can't define singleton");
- }
- if (SPECIAL_CONST_P(obj)) {
- klass = special_singleton_class_of(obj);
- if (NIL_P(klass))
- rb_bug("unknown immediate %p", (void *)obj);
- return klass;
- }
- else {
- switch (BUILTIN_TYPE(obj)) {
- case T_FLOAT: case T_BIGNUM: case T_SYMBOL:
- goto no_singleton;
- case T_STRING:
- if (FL_TEST_RAW(obj, RSTRING_FSTR)) goto no_singleton;
- break;
- }
+ switch (TYPE(obj)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_FLOAT:
+ case T_SYMBOL:
+ rb_raise(rb_eTypeError, "can't define singleton");
+
+ case T_FALSE:
+ case T_TRUE:
+ case T_NIL:
+ klass = special_singleton_class_of(obj);
+ if (NIL_P(klass))
+ rb_bug("unknown immediate %p", (void *)obj);
+ return klass;
+
+ case T_STRING:
+ if (FL_TEST_RAW(obj, RSTRING_FSTR)) {
+ rb_raise(rb_eTypeError, "can't define singleton");
+ }
}
- klass = RBASIC(obj)->klass;
+ klass = METACLASS_OF(obj);
if (!(FL_TEST(klass, FL_SINGLETON) &&
- rb_ivar_get(klass, id_attached) == obj)) {
- rb_serial_t serial = RCLASS_SERIAL(klass);
- klass = rb_make_metaclass(obj, klass);
- RCLASS_SERIAL(klass) = serial;
+ rb_attr_get(klass, id_attached) == obj)) {
+ klass = rb_make_metaclass(obj, klass);
}
RB_FL_SET_RAW(klass, RB_OBJ_FROZEN_RAW(obj));
@@ -1675,11 +2204,11 @@ rb_freeze_singleton_class(VALUE x)
{
/* should not propagate to meta-meta-class, and so on */
if (!(RBASIC(x)->flags & FL_SINGLETON)) {
- VALUE klass = RBASIC_CLASS(x);
- if (klass && (klass = RCLASS_ORIGIN(klass)) != 0 &&
- FL_TEST(klass, (FL_SINGLETON|FL_FREEZE)) == FL_SINGLETON) {
- OBJ_FREEZE_RAW(klass);
- }
+ VALUE klass = RBASIC_CLASS(x);
+ if (klass && // no class when hidden from ObjectSpace
+ FL_TEST(klass, (FL_SINGLETON|FL_FREEZE)) == FL_SINGLETON) {
+ OBJ_FREEZE_RAW(klass);
+ }
}
}
@@ -1696,31 +2225,14 @@ rb_singleton_class_get(VALUE obj)
VALUE klass;
if (SPECIAL_CONST_P(obj)) {
- return rb_special_singleton_class(obj);
+ return rb_special_singleton_class(obj);
}
- klass = RBASIC(obj)->klass;
+ klass = METACLASS_OF(obj);
if (!FL_TEST(klass, FL_SINGLETON)) return Qnil;
- if (rb_ivar_get(klass, id_attached) != obj) return Qnil;
+ if (rb_attr_get(klass, id_attached) != obj) return Qnil;
return klass;
}
-/*!
- * Returns the singleton class of \a obj. Creates it if necessary.
- *
- * \param obj an arbitrary object.
- * \throw TypeError if \a obj is a Integer or a Symbol.
- * \return the singleton class.
- *
- * \post \a obj has its own singleton class.
- * \post if \a obj is a class,
- * the returned singleton class also has its own
- * singleton class in order to keep consistency of the
- * inheritance structure of metaclasses.
- * \note a new singleton class will be created
- * if \a obj does not have it.
- * \note the singleton classes for nil, true and false are:
- * NilClass, TrueClass and FalseClass.
- */
VALUE
rb_singleton_class(VALUE obj)
{
@@ -1744,13 +2256,6 @@ rb_singleton_class(VALUE obj)
#ifdef rb_define_singleton_method
#undef rb_define_singleton_method
#endif
-/*!
- * Defines a singleton method for \a obj.
- * \param obj an arbitrary object
- * \param name name of the singleton method
- * \param func the method body
- * \param argc the number of parameters, or -1 or -2. see \ref defmethod.
- */
void
rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc)
{
@@ -1760,13 +2265,6 @@ rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS),
#ifdef rb_define_module_function
#undef rb_define_module_function
#endif
-/*!
- * Defines a module function for \a module.
- * \param module an module or a class.
- * \param name name of the function
- * \param func the method body
- * \param argc the number of parameters, or -1 or -2. see \ref defmethod.
- */
void
rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
{
@@ -1777,38 +2275,18 @@ rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS)
#ifdef rb_define_global_function
#undef rb_define_global_function
#endif
-/*!
- * Defines a global function
- * \param name name of the function
- * \param func the method body
- * \param argc the number of parameters, or -1 or -2. see \ref defmethod.
- */
void
rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc)
{
rb_define_module_function(rb_mKernel, name, func, argc);
}
-
-/*!
- * Defines an alias of a method.
- * \param klass the class which the original method belongs to
- * \param name1 a new name for the method
- * \param name2 the original name of the method
- */
void
rb_define_alias(VALUE klass, const char *name1, const char *name2)
{
rb_alias(klass, rb_intern(name1), rb_intern(name2));
}
-/*!
- * Defines (a) public accessor method(s) for an attribute.
- * \param klass the class which the attribute will belongs to
- * \param name name of the attribute
- * \param read a getter method for the attribute will be defined if \a read is non-zero.
- * \param write a setter method for the attribute will be defined if \a write is non-zero.
- */
void
rb_define_attr(VALUE klass, const char *name, int read, int write)
{
@@ -1822,13 +2300,13 @@ rb_keyword_error_new(const char *error, VALUE keys)
VALUE error_message = rb_sprintf("%s keyword%.*s", error, len > 1, "s");
if (len > 0) {
- rb_str_cat_cstr(error_message, ": ");
- while (1) {
+ rb_str_cat_cstr(error_message, ": ");
+ while (1) {
const VALUE k = RARRAY_AREF(keys, i);
- rb_str_append(error_message, rb_inspect(k));
- if (++i >= len) break;
- rb_str_cat_cstr(error_message, ", ");
- }
+ rb_str_append(error_message, rb_inspect(k));
+ if (++i >= len) break;
+ rb_str_cat_cstr(error_message, ", ");
+ }
}
return rb_exc_new_str(rb_eArgError, error_message);
@@ -1847,7 +2325,7 @@ unknown_keyword_error(VALUE hash, const ID *table, int keywords)
{
int i;
for (i = 0; i < keywords; i++) {
- st_data_t key = ID2SYM(table[i]);
+ st_data_t key = ID2SYM(table[i]);
rb_hash_stlike_delete(hash, &key, NULL);
}
rb_keyword_error("unknown", rb_hash_keys(hash));
@@ -1871,8 +2349,8 @@ rb_extract_keywords(VALUE *orighash)
VALUE hash = *orighash;
if (RHASH_EMPTY_P(hash)) {
- *orighash = 0;
- return hash;
+ *orighash = 0;
+ return hash;
}
rb_hash_foreach(hash, separate_symbol, (st_data_t)&parthash);
*orighash = parthash[1];
@@ -1898,36 +2376,36 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
if (NIL_P(keyword_hash)) keyword_hash = 0;
if (optional < 0) {
- rest = 1;
- optional = -1-optional;
+ rest = 1;
+ optional = -1-optional;
}
if (required) {
- for (; i < required; i++) {
- VALUE keyword = ID2SYM(table[i]);
- if (keyword_hash) {
+ for (; i < required; i++) {
+ VALUE keyword = ID2SYM(table[i]);
+ if (keyword_hash) {
if (extract_kwarg(keyword, values[i])) {
- continue;
- }
- }
- if (NIL_P(missing)) missing = rb_ary_tmp_new(1);
- rb_ary_push(missing, keyword);
- }
- if (!NIL_P(missing)) {
- rb_keyword_error("missing", missing);
- }
+ continue;
+ }
+ }
+ if (NIL_P(missing)) missing = rb_ary_hidden_new(1);
+ rb_ary_push(missing, keyword);
+ }
+ if (!NIL_P(missing)) {
+ rb_keyword_error("missing", missing);
+ }
}
j = i;
if (optional && keyword_hash) {
- for (i = 0; i < optional; i++) {
+ for (i = 0; i < optional; i++) {
if (extract_kwarg(ID2SYM(table[required+i]), values[required+i])) {
- j++;
- }
- }
+ j++;
+ }
+ }
}
if (!rest && keyword_hash) {
- if (RHASH_SIZE(keyword_hash) > (unsigned int)(values ? 0 : j)) {
- unknown_keyword_error(keyword_hash, table, required+optional);
- }
+ if (RHASH_SIZE(keyword_hash) > (unsigned int)(values ? 0 : j)) {
+ unknown_keyword_error(keyword_hash, table, required+optional);
+ }
}
if (values && !keyword_hash) {
for (i = 0; i < required + optional; i++) {
@@ -1939,268 +2417,183 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
}
struct rb_scan_args_t {
- int argc;
- const VALUE *argv;
- va_list vargs;
- int f_var;
- int f_hash;
- int f_block;
+ int kw_flag;
int n_lead;
int n_opt;
int n_trail;
- int n_mand;
- int argi;
- int last_idx;
- VALUE hash;
- VALUE last_hash;
- VALUE *tmp_buffer;
+ bool f_var;
+ bool f_hash;
+ bool f_block;
};
static void
-rb_scan_args_parse(int kw_flag, int argc, const VALUE *argv, const char *fmt, struct rb_scan_args_t *arg)
+rb_scan_args_parse(int kw_flag, const char *fmt, struct rb_scan_args_t *arg)
{
const char *p = fmt;
- VALUE *tmp_buffer = arg->tmp_buffer;
- int keyword_given = 0;
- int empty_keyword_given = 0;
- int last_hash_keyword = 0;
memset(arg, 0, sizeof(*arg));
- arg->last_idx = -1;
- arg->hash = Qnil;
-
- switch (kw_flag) {
- case RB_SCAN_ARGS_PASS_CALLED_KEYWORDS:
- if (!(keyword_given = rb_keyword_given_p())) {
- empty_keyword_given = rb_empty_keyword_given_p();
- }
- break;
- case RB_SCAN_ARGS_KEYWORDS:
- keyword_given = 1;
- break;
- case RB_SCAN_ARGS_EMPTY_KEYWORDS:
- empty_keyword_given = 1;
- break;
- case RB_SCAN_ARGS_LAST_HASH_KEYWORDS:
- last_hash_keyword = 1;
- break;
- }
+ arg->kw_flag = kw_flag;
if (ISDIGIT(*p)) {
arg->n_lead = *p - '0';
- p++;
- if (ISDIGIT(*p)) {
+ p++;
+ if (ISDIGIT(*p)) {
arg->n_opt = *p - '0';
- p++;
- }
+ p++;
+ }
}
if (*p == '*') {
arg->f_var = 1;
- p++;
+ p++;
}
if (ISDIGIT(*p)) {
arg->n_trail = *p - '0';
- p++;
+ p++;
}
if (*p == ':') {
arg->f_hash = 1;
- p++;
+ p++;
}
if (*p == '&') {
arg->f_block = 1;
- p++;
+ p++;
}
if (*p != '\0') {
- rb_fatal("bad scan arg format: %s", fmt);
+ rb_fatal("bad scan arg format: %s", fmt);
}
- arg->n_mand = arg->n_lead + arg->n_trail;
+}
- /* capture an option hash - phase 1: pop */
- /* Ignore final positional hash if empty keywords given */
- if (argc > 0 && !(arg->f_hash && empty_keyword_given)) {
+static int
+rb_scan_args_assign(const struct rb_scan_args_t *arg, int argc, const VALUE *const argv, va_list vargs)
+{
+ int i, argi = 0;
+ VALUE *var, hash = Qnil;
+#define rb_scan_args_next_param() va_arg(vargs, VALUE *)
+ const int kw_flag = arg->kw_flag;
+ const int n_lead = arg->n_lead;
+ const int n_opt = arg->n_opt;
+ const int n_trail = arg->n_trail;
+ const int n_mand = n_lead + n_trail;
+ const bool f_var = arg->f_var;
+ const bool f_hash = arg->f_hash;
+ const bool f_block = arg->f_block;
+
+ /* capture an option hash - phase 1: pop from the argv */
+ if (f_hash && argc > 0) {
VALUE last = argv[argc - 1];
-
- if (arg->f_hash && arg->n_mand < argc) {
- if (keyword_given) {
- if (!RB_TYPE_P(last, T_HASH)) {
- rb_warn("Keyword flag set when calling rb_scan_args, but last entry is not a hash");
- }
- else {
- arg->hash = last;
- }
- }
- else if (NIL_P(last)) {
- /* For backwards compatibility, nil is taken as an empty
- option hash only if it is not ambiguous; i.e. '*' is
- not specified and arguments are given more than sufficient.
- This will be removed in Ruby 3. */
- if (!arg->f_var && arg->n_mand + arg->n_opt < argc) {
- rb_warn("The last argument is nil, treating as empty keywords");
- argc--;
- }
- }
- else {
- arg->hash = rb_check_hash_type(last);
- }
-
- /* Ruby 3: Remove if branch, as it will not attempt to split hashes */
- if (!NIL_P(arg->hash)) {
- VALUE opts = rb_extract_keywords(&arg->hash);
-
- if (!(arg->last_hash = arg->hash)) {
- if (!keyword_given && !last_hash_keyword) {
- /* Warn if treating positional as keyword, as in Ruby 3,
- this will be an error */
- rb_warn("Using the last argument as keyword parameters is deprecated");
- }
- argc--;
- }
- else {
- /* Warn if splitting either positional hash to keywords or keywords
- to positional hash, as in Ruby 3, no splitting will be done */
- rb_warn("The last argument is split into positional and keyword parameters");
- arg->last_idx = argc - 1;
- }
- arg->hash = opts ? opts : Qnil;
- }
+ if (rb_scan_args_keyword_p(kw_flag, last)) {
+ hash = rb_hash_dup(last);
+ argc--;
}
- else if (arg->f_hash && keyword_given && arg->n_mand == argc) {
- /* Warn if treating keywords as positional, as in Ruby 3, this will be an error */
- rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
- }
- }
- if (arg->f_hash && arg->n_mand == argc+1 && empty_keyword_given) {
- VALUE *ptr = rb_alloc_tmp_buffer2(tmp_buffer, argc+1, sizeof(VALUE));
- memcpy(ptr, argv, sizeof(VALUE)*argc);
- ptr[argc] = rb_hash_new();
- argc++;
- *(&argv) = ptr;
- rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
}
- arg->argc = argc;
- arg->argv = argv;
-}
-
-static int
-rb_scan_args_assign(struct rb_scan_args_t *arg, va_list vargs)
-{
- int argi = 0;
- int i;
- VALUE *var;
-
- if (arg->argc < arg->n_mand) {
- return 1;
+ if (argc < n_mand) {
+ goto argc_error;
}
/* capture leading mandatory arguments */
- for (i = arg->n_lead; i-- > 0; ) {
- var = va_arg(vargs, VALUE *);
- if (var) *var = (argi == arg->last_idx) ? arg->last_hash : arg->argv[argi];
- argi++;
+ for (i = 0; i < n_lead; i++) {
+ var = rb_scan_args_next_param();
+ if (var) *var = argv[argi];
+ argi++;
}
/* capture optional arguments */
- for (i = arg->n_opt; i-- > 0; ) {
- var = va_arg(vargs, VALUE *);
- if (argi < arg->argc - arg->n_trail) {
- if (var) *var = (argi == arg->last_idx) ? arg->last_hash : arg->argv[argi];
- argi++;
- }
- else {
- if (var) *var = Qnil;
- }
+ for (i = 0; i < n_opt; i++) {
+ var = rb_scan_args_next_param();
+ if (argi < argc - n_trail) {
+ if (var) *var = argv[argi];
+ argi++;
+ }
+ else {
+ if (var) *var = Qnil;
+ }
}
/* capture variable length arguments */
- if (arg->f_var) {
- int n_var = arg->argc - argi - arg->n_trail;
-
- var = va_arg(vargs, VALUE *);
- if (0 < n_var) {
- if (var) {
- int f_last = (arg->last_idx + 1 == arg->argc - arg->n_trail);
- *var = rb_ary_new4(n_var - f_last, &arg->argv[argi]);
- if (f_last) rb_ary_push(*var, arg->last_hash);
- }
- argi += n_var;
- }
- else {
- if (var) *var = rb_ary_new();
- }
+ if (f_var) {
+ int n_var = argc - argi - n_trail;
+
+ var = rb_scan_args_next_param();
+ if (0 < n_var) {
+ if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]);
+ argi += n_var;
+ }
+ else {
+ if (var) *var = rb_ary_new();
+ }
}
/* capture trailing mandatory arguments */
- for (i = arg->n_trail; i-- > 0; ) {
- var = va_arg(vargs, VALUE *);
- if (var) *var = (argi == arg->last_idx) ? arg->last_hash : arg->argv[argi];
- argi++;
+ for (i = 0; i < n_trail; i++) {
+ var = rb_scan_args_next_param();
+ if (var) *var = argv[argi];
+ argi++;
}
/* capture an option hash - phase 2: assignment */
- if (arg->f_hash) {
- var = va_arg(vargs, VALUE *);
- if (var) *var = arg->hash;
+ if (f_hash) {
+ var = rb_scan_args_next_param();
+ if (var) *var = hash;
}
/* capture iterator block */
- if (arg->f_block) {
- var = va_arg(vargs, VALUE *);
- if (rb_block_given_p()) {
- *var = rb_block_proc();
- }
- else {
- *var = Qnil;
- }
+ if (f_block) {
+ var = rb_scan_args_next_param();
+ if (rb_block_given_p()) {
+ *var = rb_block_proc();
+ }
+ else {
+ *var = Qnil;
+ }
}
- if (argi < arg->argc) return 1;
+ if (argi == argc) {
+ return argc;
+ }
+
+ argc_error:
+ return -(argc + 1);
+#undef rb_scan_args_next_param
+}
+
+static int
+rb_scan_args_result(const struct rb_scan_args_t *const arg, int argc)
+{
+ const int n_lead = arg->n_lead;
+ const int n_opt = arg->n_opt;
+ const int n_trail = arg->n_trail;
+ const int n_mand = n_lead + n_trail;
+ const bool f_var = arg->f_var;
+
+ if (argc >= 0) {
+ return argc;
+ }
- return 0;
+ argc = -argc - 1;
+ rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt);
+ UNREACHABLE_RETURN(-1);
}
#undef rb_scan_args
int
rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
{
- int error;
va_list vargs;
- VALUE tmp_buffer = 0;
struct rb_scan_args_t arg;
- arg.tmp_buffer = &tmp_buffer;
- rb_scan_args_parse(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, fmt, &arg);
+ rb_scan_args_parse(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, fmt, &arg);
va_start(vargs,fmt);
- error = rb_scan_args_assign(&arg, vargs);
+ argc = rb_scan_args_assign(&arg, argc, argv, vargs);
va_end(vargs);
- if (tmp_buffer) {
- rb_free_tmp_buffer(&tmp_buffer);
- }
- if (error) {
- rb_error_arity(arg.argc, arg.n_mand, arg.f_var ? UNLIMITED_ARGUMENTS : arg.n_mand + arg.n_opt);
- }
- return arg.argc;
+ return rb_scan_args_result(&arg, argc);
}
+#undef rb_scan_args_kw
int
rb_scan_args_kw(int kw_flag, int argc, const VALUE *argv, const char *fmt, ...)
{
- int error;
va_list vargs;
- VALUE tmp_buffer = 0;
struct rb_scan_args_t arg;
- arg.tmp_buffer = &tmp_buffer;
- rb_scan_args_parse(kw_flag, argc, argv, fmt, &arg);
+ rb_scan_args_parse(kw_flag, fmt, &arg);
va_start(vargs,fmt);
- error = rb_scan_args_assign(&arg, vargs);
+ argc = rb_scan_args_assign(&arg, argc, argv, vargs);
va_end(vargs);
- if (tmp_buffer) {
- rb_free_tmp_buffer(&tmp_buffer);
- }
- if (error) {
- rb_error_arity(arg.argc, arg.n_mand, arg.f_var ? UNLIMITED_ARGUMENTS : arg.n_mand + arg.n_opt);
- }
- return arg.argc;
-}
-
-int
-rb_class_has_methods(VALUE c)
-{
- return rb_id_table_size(RCLASS_M_TBL(c)) == 0 ? FALSE : TRUE;
+ return rb_scan_args_result(&arg, argc);
}
/*!
diff --git a/common.mk b/common.mk
index b2e5b2b6d0..126053c9c8 100644
--- a/common.mk
+++ b/common.mk
@@ -8,6 +8,7 @@ dll: $(LIBRUBY_SO)
# V=0 quiet, V=1 verbose. other values don't work.
V = 0
+V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO0 = $(ECHO1:0=echo)
@@ -17,8 +18,10 @@ mflags = $(MFLAGS)
gnumake_recursive =
enable_shared = $(ENABLE_SHARED:no=)
-UNICODE_VERSION = 12.1.0
-UNICODE_EMOJI_VERSION = 12.1
+UNICODE_VERSION = 15.0.0
+UNICODE_EMOJI_VERSION_0 = $(UNICODE_VERSION)///
+UNICODE_EMOJI_VERSION_1 = $(UNICODE_EMOJI_VERSION_0:.0///=)
+UNICODE_EMOJI_VERSION = $(UNICODE_EMOJI_VERSION_1:///=)
UNICODE_BETA = NO
### set the following environment variable or uncomment the line if
@@ -38,16 +41,16 @@ RUBYLIB = $(PATH_SEPARATOR)
RUBYOPT = -
RUN_OPTS = --disable-gems
-GITPULLOPTIONS = --rebase
+# GITPULLOPTIONS = --no-tags
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(UNICODE_HDR_DIR)
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(UNICODE_HDR_DIR) $(incflags)
GEM_HOME =
GEM_PATH =
GEM_VENDOR =
BENCHMARK_DRIVER_GIT_URL = https://github.com/benchmark-driver/benchmark-driver
-BENCHMARK_DRIVER_GIT_REF = v0.15.6
+BENCHMARK_DRIVER_GIT_REF = v0.16.0
SIMPLECOV_GIT_URL = https://github.com/colszowka/simplecov.git
SIMPLECOV_GIT_REF = v0.17.0
SIMPLECOV_HTML_GIT_URL = https://github.com/colszowka/simplecov-html.git
@@ -69,7 +72,9 @@ RDOCOUT = $(EXTOUT)/rdoc
HTMLOUT = $(EXTOUT)/html
CAPIOUT = doc/capi
INSTALL_DOC_OPTS = --rdoc-output="$(RDOCOUT)" --html-output="$(HTMLOUT)"
-RDOC_GEN_OPTS = --page-dir "$(srcdir)/doc" --no-force-update
+RDOC_GEN_OPTS = --page-dir "$(srcdir)/doc" --no-force-update \
+ --title "Documentation for Ruby $(RUBY_API_VERSION)" \
+ --main README.md
INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT)
NORMALMAINOBJ = main.$(OBJEXT)
@@ -79,7 +84,7 @@ EXTSOLIBS =
MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) dmyext.$(OBJEXT)
ENC_MK = enc.mk
MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \
- RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(mflags)
+ RUBY="$(BOOTSTRAPRUBY)" MINIRUBY="$(BOOTSTRAPRUBY)" $(mflags)
COMMONOBJS = array.$(OBJEXT) \
ast.$(OBJEXT) \
@@ -103,12 +108,14 @@ COMMONOBJS = array.$(OBJEXT) \
hash.$(OBJEXT) \
inits.$(OBJEXT) \
io.$(OBJEXT) \
+ io_buffer.$(OBJEXT) \
iseq.$(OBJEXT) \
load.$(OBJEXT) \
marshal.$(OBJEXT) \
math.$(OBJEXT) \
+ memory_view.$(OBJEXT) \
mjit.$(OBJEXT) \
- mjit_compile.$(OBJEXT) \
+ mjit_c.$(OBJEXT) \
node.$(OBJEXT) \
numeric.$(OBJEXT) \
object.$(OBJEXT) \
@@ -116,6 +123,7 @@ COMMONOBJS = array.$(OBJEXT) \
parse.$(OBJEXT) \
proc.$(OBJEXT) \
process.$(OBJEXT) \
+ ractor.$(OBJEXT) \
random.$(OBJEXT) \
range.$(OBJEXT) \
rational.$(OBJEXT) \
@@ -127,7 +135,8 @@ COMMONOBJS = array.$(OBJEXT) \
regparse.$(OBJEXT) \
regsyntax.$(OBJEXT) \
ruby.$(OBJEXT) \
- safe.$(OBJEXT) \
+ scheduler.$(OBJEXT) \
+ shape.$(OBJEXT) \
signal.$(OBJEXT) \
sprintf.$(OBJEXT) \
st.$(OBJEXT) \
@@ -145,7 +154,9 @@ COMMONOBJS = array.$(OBJEXT) \
vm.$(OBJEXT) \
vm_backtrace.$(OBJEXT) \
vm_dump.$(OBJEXT) \
+ vm_sync.$(OBJEXT) \
vm_trace.$(OBJEXT) \
+ $(YJIT_OBJ) \
$(COROUTINE_OBJ) \
$(DTRACE_OBJ) \
$(BUILTIN_ENCOBJS) \
@@ -160,7 +171,7 @@ EXPORTOBJS = $(DLNOBJ) \
OBJS = $(EXPORTOBJS) builtin.$(OBJEXT)
ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
-GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
+GOLFOBJS = goruby.$(OBJEXT)
DEFAULT_PRELUDES = $(GEM_PRELUDE)
PRELUDE_SCRIPTS = $(DEFAULT_PRELUDES)
@@ -170,32 +181,36 @@ GOLFPRELUDES = {$(srcdir)}golf_prelude.c
SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
--extout="$(EXTOUT)" \
+ --ext-build-dir="./ext" \
--mflags="$(MFLAGS)" \
--make-flags="$(MAKEFLAGS)"
EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
--make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
--
-INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(srcdir)/tool/rbinstall.rb
+INSTRUBY = $(SUDO) $(INSTRUBY_ENV) $(RUNRUBY) -r./$(arch)-fake $(tooldir)/rbinstall.rb
INSTRUBY_ARGS = $(SCRIPT_ARGS) \
--data-mode=$(INSTALL_DATA_MODE) \
--prog-mode=$(INSTALL_PROG_MODE) \
--installed-list $(INSTALLED_LIST) \
- --mantype="$(MANTYPE)"
+ --mantype="$(MANTYPE)" \
+ $(INSTRUBY_OPTS)
INSTALL_PROG_MODE = 0755
INSTALL_DATA_MODE = 0644
+BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY) $(BOOTSTRAPRUBY_OPT)
TESTSDIR = $(srcdir)/test
-TOOL_TESTSDIR = $(srcdir)/tool/test
+TOOL_TESTSDIR = $(tooldir)/test
TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/
TESTWORKDIR = testwork
TESTOPTS = $(RUBY_TESTOPTS)
TESTRUN_SCRIPT = $(srcdir)/test.rb
-COMPILE_PRELUDE = $(srcdir)/tool/generic_erb.rb $(srcdir)/template/prelude.c.tmpl
+COMPILE_PRELUDE = $(tooldir)/generic_erb.rb $(srcdir)/template/prelude.c.tmpl \
+ $(tooldir)/ruby_vm/helpers/c_escape.rb
-SHOWFLAGS = showflags
+SHOWFLAGS = $(no_silence:no=showflags)
MAKE_LINK = $(MINIRUBY) -rfileutils -e "include FileUtils::Verbose" \
-e "src, dest = ARGV" \
@@ -205,12 +220,27 @@ MAKE_LINK = $(MINIRUBY) -rfileutils -e "include FileUtils::Verbose" \
-e "noraise {ln(src, dest)} or" \
-e "cp(src, dest)"
+# For release builds
+YJIT_RUSTC_ARGS = --crate-name=yjit \
+ --crate-type=staticlib \
+ --edition=2021 \
+ -g \
+ -C opt-level=3 \
+ -C overflow-checks=on \
+ '--out-dir=$(CARGO_TARGET_DIR)/release/' \
+ $(top_srcdir)/yjit/src/lib.rs
all: $(SHOWFLAGS) main docs
main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs
@$(NULLCMD)
+main: $(srcdir)/lib/ruby_vm/mjit/instruction.rb
+srcs: $(srcdir)/lib/ruby_vm/mjit/instruction.rb
+$(srcdir)/lib/ruby_vm/mjit/instruction.rb: $(tooldir)/insns2vm.rb $(tooldir)/ruby_vm/views/lib/ruby_vm/mjit/instruction.rb.erb $(srcdir)/insns.def
+ $(ECHO) generating $@
+ $(Q) $(BASERUBY) -Ku $(tooldir)/insns2vm.rb --basedir="$(srcdir)" $(INSNS2VMOPT) $@
+
mjit-headers: $(MJIT_SUPPORT)-mjit-headers
no-mjit-headers: PHONY
yes-mjit-headers: mjit_config.h PHONY
@@ -218,6 +248,9 @@ yes-mjit-headers: mjit_config.h PHONY
mjit.$(OBJEXT): mjit_config.h
mjit_config.h: Makefile
+.PHONY: mjit-bindgen
+mjit-bindgen:
+ $(Q) $(BASERUBY) -rrubygems -C $(srcdir)/tool/mjit bindgen.rb $(CURDIR)
# These rules using MJIT_HEADER_SUFFIX must be in common.mk, not
# Makefile.in, in order to override the macro in defs/universal.mk.
@@ -225,19 +258,20 @@ mjit_config.h: Makefile
# Other `-Dxxx`s preceding `-DMJIT_HEADER` will be removed in transform_mjit_header.rb.
# So `-DMJIT_HEADER` should be passed first when rb_mjit_header.h is generated.
$(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJEXT) \
- $(TIMESTAMPDIR)/$(arch)/.time
+ $(TIMESTAMPDIR)/$(arch)/.time $(tooldir)/mjit_tabs.rb $(PREP) $(RBCONFIG)
$(ECHO) building $(@F:.time=.h)
- $(Q) $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
+ $(Q)$(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \
+ $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new
$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time
$(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: \
$(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time \
- $(srcdir)/tool/transform_mjit_header.rb $(PREP) \
+ $(tooldir)/transform_mjit_header.rb $(PREP) \
$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h
$(ECHO) building $@
- $(MINIRUBY) $(srcdir)/tool/transform_mjit_header.rb "$(CC) $(ARCH_FLAG) $(CFLAGS)" $(MJIT_HEADER:.h=)$(MJIT_HEADER_ARCH).h $@
+ $(Q)$(MINIRUBY) $(tooldir)/transform_mjit_header.rb "$(CC) $(CFLAGS) -w" $(MJIT_HEADER:.h=)$(MJIT_HEADER_ARCH).h $@
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
$(Q) $(MAKE_LINK) $@ $(MJIT_HEADER_INSTALL_DIR)/$(@F)
@@ -258,6 +292,8 @@ showflags:
" LC_ALL = $(LC_ALL)" \
" LC_CTYPE = $(LC_CTYPE)" \
" MFLAGS = $(MFLAGS)" \
+ " RUSTC = $(RUSTC)" \
+ " YJIT_RUSTC_ARGS = $(YJIT_RUSTC_ARGS)" \
$(MESSAGE_END)
-@$(CC_VERSION)
@@ -278,14 +314,14 @@ $(EXTS_MK): ext/configure-ext.mk $(srcdir)/template/exts.mk.tmpl \
gnumake=$(gnumake) MINIRUBY="$(MINIRUBY)" \
EXTLDFLAGS="$(EXTLDFLAGS)" srcdir="$(srcdir)"
$(ECHO) generating makefile $@
- $(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
- $(srcdir)/template/exts.mk.tmpl --gnumake=$(gnumake)
+ $(Q)$(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ -c \
+ $(srcdir)/template/exts.mk.tmpl --gnumake=$(gnumake) --configure-exts=ext/configure-ext.mk
ext/configure-ext.mk: $(PREP) all-incs $(MKFILES) $(RBCONFIG) $(LIBRUBY) \
$(srcdir)/template/configure-ext.mk.tmpl
$(ECHO) generating makefiles $@
$(Q)$(MAKEDIRS) $(@D)
- $(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
+ $(Q)$(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ -c \
$(srcdir)/template/$(@F).tmpl --srcdir="$(srcdir)" \
--miniruby="$(MINIRUBY)" --script-args='$(SCRIPT_ARGS)'
@@ -293,18 +329,19 @@ configure-ext: $(EXTS_MK)
build-ext: $(EXTS_MK)
$(Q)$(MAKE) -f $(EXTS_MK) $(mflags) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
- EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
+ EXTENCS="$(ENCOBJS)" MINIRUBY="$(MINIRUBY)" UPDATE_LIBRARIES=no $(EXTSTATIC)
$(Q)$(MAKE) $(EXTS_NOTE)
exts-note: $(EXTS_MK)
$(Q)$(MAKE) $(EXTS_NOTE)
-ext/extinit.c: $(srcdir)/template/extinit.c.tmpl
- $(Q)$(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ -c \
+ext/extinit.c: $(srcdir)/template/extinit.c.tmpl $(PREP)
+ $(MAKEDIRS) $(@D)
+ $(Q)$(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ -c \
$(srcdir)/template/extinit.c.tmpl $(EXTINITS)
prog: program wprogram
-programs: $(PROGRAM) $(WPROGRAM)
+programs: $(PROGRAM) $(WPROGRAM) $(arch)-fake.rb
$(PREP): $(MKFILES)
@@ -319,7 +356,6 @@ $(GOLF): $(LIBRUBY) $(GOLFOBJS) PHONY
$(Q) $(MAKE) $(mflags) \
GOLF=_dummy_golf_target_to_avoid_conflict_just_in_case_ \
MAINOBJ=goruby.$(OBJEXT) \
- EXTOBJS="golf_prelude.$(OBJEXT) $(EXTOBJS)" \
PROGRAM=$(GORUBY)$(EXEEXT) \
V=$(V) \
program
@@ -331,9 +367,9 @@ $(CAPIOUT)/.timestamp: Doxyfile $(PREP)
-$(Q) $(DOXYGEN) -b
$(Q) $(MINIRUBY) -e 'File.open(ARGV[0], "w"){'"|f|"' f.puts(Time.now)}' "$@"
-Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
+Doxyfile: $(srcdir)/template/Doxyfile.tmpl $(PREP) $(tooldir)/generic_erb.rb $(RBCONFIG)
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \
+ $(Q) $(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ $(srcdir)/template/Doxyfile.tmpl \
--srcdir="$(srcdir)" --miniruby="$(MINIRUBY)"
program: $(SHOWFLAGS) $(PROGRAM)
@@ -356,7 +392,7 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
ruby.imp: $(COMMONOBJS)
$(Q){ \
$(NM) -Pgp $(COMMONOBJS) | \
- awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^$(SYMBOL_PREFIX)(Init_|InitVM_|ruby_static_id_|.*_threadptr_|rb_ec_)|^\./{print $$1}'; \
+ awk 'BEGIN{print "#!"}; $$2~/^[A-TV-Z]$$/&&$$1!~/^$(SYMBOL_PREFIX)(Init_|InitVM_|ruby_static_id_|.*_threadptr_|rb_ec_)|^\./{print $$1}'; \
($(CHDIR) $(srcdir) && \
exec sed -n '/^MJIT_FUNC_EXPORTED/!d;N;s/.*\n\(rb_[a-zA-Z_0-9]*\).*/$(SYMBOL_PREFIX)\1/p' cont.c gc.c thread*c vm*.c) \
} | \
@@ -368,17 +404,17 @@ pkgconfig-data: $(ruby_pc)
$(ruby_pc): $(srcdir)/template/ruby.pc.in config.status
install-all: docs pre-install-all do-install-all post-install-all
-pre-install-all:: all pre-install-local pre-install-ext pre-install-doc
+pre-install-all:: all pre-install-local pre-install-ext pre-install-gem pre-install-doc
do-install-all: pre-install-all
- $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) $(INSTALL_DOC_OPTS)
-post-install-all:: post-install-local post-install-ext post-install-doc
+ $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all $(INSTALL_DOC_OPTS)
+post-install-all:: post-install-local post-install-ext post-install-gem post-install-doc
@$(NULLCMD)
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
-pre-install-nodoc:: pre-install-local pre-install-ext
+pre-install-nodoc:: pre-install-local pre-install-ext pre-install-gem
do-install-nodoc: main pre-install-nodoc
- $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --exclude=doc
-post-install-nodoc:: post-install-local post-install-ext
+ $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --exclude=doc
+post-install-nodoc:: post-install-local post-install-ext post-install-gem
install-local: pre-install-local do-install-local post-install-local
pre-install-local:: pre-install-bin pre-install-lib pre-install-man
@@ -457,7 +493,7 @@ post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-
@$(NULLCMD)
uninstall: $(INSTALLED_LIST) sudo-precheck
- $(Q)$(SUDO) $(MINIRUBY) $(srcdir)/tool/rbuninstall.rb --destdir=$(DESTDIR) $(INSTALLED_LIST)
+ $(Q)$(SUDO) $(MINIRUBY) $(tooldir)/rbuninstall.rb --destdir=$(DESTDIR) $(INSTALLED_LIST)
reinstall: all uninstall install
@@ -465,7 +501,7 @@ what-where-nodoc: no-install-nodoc
no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext
dont-install-nodoc: $(PREP)
- $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS)
+ $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --exclude=doc
post-no-install-nodoc:: post-no-install-local post-no-install-ext
what-where-local: no-install-local
@@ -544,12 +580,19 @@ post-install-doc::
@$(NULLCMD)
install-gem: pre-install-gem do-install-gem post-install-gem
-pre-install-gem:: pre-install-bin pre-install-lib pre-install-man
+pre-install-gem:: prepare-gems pre-install-bin pre-install-lib pre-install-man
do-install-gem: $(PROGRAM) pre-install-gem
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=gem
post-install-gem::
@$(NULLCMD)
+install-dbg: pre-install-dbg do-install-dbg post-install-dbg
+pre-install-dbg::
+do-install-dbg: $(PROGRAM) pre-install-dbg
+ $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=dbg
+post-install-dbg::
+ @$(NULLCMD)
+
rdoc: PHONY main
@echo Generating RDoc documentation
$(Q) $(RDOC) --ri --op "$(RDOCOUT)" $(RDOC_GEN_OPTS) $(RDOCFLAGS) "$(srcdir)"
@@ -591,12 +634,13 @@ clear-installed-list: PHONY
clean: clean-ext clean-enc clean-golf clean-docs clean-extout clean-local clean-platform clean-spec
clean-local:: clean-runnable
- $(Q)$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
+ $(Q)$(RM) $(OBJS) $(MINIOBJS) $(INITOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
$(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) dmyenc.$(OBJEXT) $(ARCHFILE) .*.time
$(Q)$(RM) y.tab.c y.output encdb.h transdb.h config.log rbconfig.rb $(ruby_pc) $(COROUTINE_H:/Context.h=/.time)
- $(Q)$(RM) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT) ruby.imp
- $(Q)$(RM) GNUmakefile.old Makefile.old $(arch)-fake.rb bisect.sh $(ENC_TRANS_D)
- -$(Q) $(RMDIR) enc/jis enc/trans enc $(COROUTINE_H:/Context.h=) coroutine 2> $(NULL) || $(NULLCMD)
+ $(Q)$(RM) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT) ruby.imp ChangeLog $(STATIC_RUBY)$(EXEEXT)
+ $(Q)$(RM) GNUmakefile.old Makefile.old $(arch)-fake.rb bisect.sh $(ENC_TRANS_D) builtin_binary.inc
+ -$(Q)$(RMALL) yjit/target
+ -$(Q) $(RMDIR) enc/jis enc/trans enc $(COROUTINE_H:/Context.h=) coroutine yjit 2> $(NULL) || $(NULLCMD)
bin/clean-runnable:: PHONY
$(Q)$(CHDIR) bin 2>$(NULL) && $(RM) $(PROGRAM) $(WPROGRAM) $(GORUBY)$(EXEEXT) bin/*.$(DLEXT) 2>$(NULL) || $(NULLCMD)
@@ -612,7 +656,7 @@ clean-html: PHONY
clean-capi: PHONY
clean-platform: PHONY
clean-extout: PHONY
- -$(Q)$(RMDIR) $(EXTOUT)/$(arch) $(EXTOUT) 2> $(NULL) || $(NULLCMD)
+ -$(Q)$(RMDIR) $(EXTOUT)/$(arch) $(RUBYCOMMONDIR) $(EXTOUT) 2> $(NULL) || $(NULLCMD)
clean-docs: clean-rdoc clean-html clean-capi
clean-spec: PHONY
clean-rubyspec: clean-spec
@@ -668,18 +712,18 @@ realclean-platform: distclean-platform
realclean-spec: distclean-spec
realclean-rubyspec: realclean-spec
-clean-ext:: ext/clean gems/clean timestamp/clean
-distclean-ext:: ext/distclean gems/distclean timestamp/distclean
-realclean-ext:: ext/realclean gems/realclean timestamp/realclean
+clean-ext:: ext/clean .bundle/clean timestamp/clean
+distclean-ext:: ext/distclean .bundle/distclean timestamp/distclean
+realclean-ext:: ext/realclean .bundle/realclean timestamp/realclean
ext/clean.mk ext/distclean.mk ext/realclean.mk::
ext/clean:: ext/clean.mk
ext/distclean:: ext/distclean.mk
ext/realclean:: ext/realclean.mk
-timestamp/clean:: ext/clean gems/clean
-timestamp/distclean:: ext/distclean gems/distclean
-timestamp/realclean:: ext/realclean gems/realclean
+timestamp/clean:: ext/clean .bundle/clean
+timestamp/distclean:: ext/distclean .bundle/distclean
+timestamp/realclean:: ext/realclean .bundle/realclean
timestamp/clean timestamp/distclean timestamp/realclean::
$(Q)$(RM) $(TIMESTAMPDIR)/.*.time $(TIMESTAMPDIR)/$(arch)/.time
@@ -712,7 +756,7 @@ clean-capi distclean-capi realclean-capi:
@echo $(@:-capi=ing) capi
$(Q)$(RMALL) $(CAPIOUT)
-clean-platform:
+clean-platform distclean-platform realclean-platform:
$(Q) $(RM) $(PLATFORM_D)
-$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || $(NULLCMD)
@@ -720,11 +764,15 @@ RUBYSPEC_CAPIEXT = spec/ruby/optional/capi/ext
clean-spec: PHONY
-$(Q) $(RM) $(RUBYSPEC_CAPIEXT)/*.$(OBJEXT) $(RUBYSPEC_CAPIEXT)/*.$(DLEXT)
-$(Q) $(RMDIRS) $(RUBYSPEC_CAPIEXT) 2> $(NULL) || $(NULLCMD)
+ -$(Q) $(RMALL) rubyspec_temp
-check: main test test-tool test-all test-spec
+check: main $(DOT_WAIT) test $(DOT_WAIT) test-tool $(DOT_WAIT) test-all
$(ECHO) check succeeded
- -$(Q) if [ x"$(GIT)" != x ] && $(CHDIR) "$(srcdir)" && $(GIT) rev-parse > /dev/null 2>&1; then \
- set -x; $(GIT) --no-pager log --format=oneline -G "^ *# *include" origin/master..HEAD; \
+ -$(Q) : : "run only on sh"; \
+ if [ x"$(GIT)" != x ] && $(CHDIR) "$(srcdir)" && \
+ b=`$(GIT) symbolic-ref --short HEAD 2>&1` && \
+ u=`$(GIT) branch --list --format='%(upstream:short)' $$b`; then \
+ set -x; $(GIT) --no-pager log --format=oneline -G '^ *# *include *("|<ruby)' $$u..HEAD --; \
fi
check-ruby: test test-ruby
@@ -732,54 +780,81 @@ fake: $(CROSS_COMPILING)-fake
yes-fake: $(arch)-fake.rb $(RBCONFIG) PHONY
no-fake -fake: PHONY
-# really doesn't depend on .o, just ensure newer than headers which
-# version.o depends on.
-$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(srcdir)/tool/generic_erb.rb version.$(OBJEXT) miniruby$(EXEEXT)
+$(HAVE_BASERUBY:no=)$(arch)-fake.rb: miniruby$(EXEEXT)
+
+# actually depending on other headers more.
+$(arch:noarch=ignore)-fake.rb: $(top_srcdir)/revision.h $(top_srcdir)/version.h $(srcdir)/version.c
+$(arch:noarch=ignore)-fake.rb: {$(VPATH)}id.h {$(VPATH)}vm_opts.h
+
+$(arch:noarch=ignore)-fake.rb: $(srcdir)/template/fake.rb.in $(tooldir)/generic_erb.rb
$(ECHO) generating $@
$(Q) $(CPP) -DRUBY_EXPORT $(INCFLAGS) $(CPPFLAGS) "$(srcdir)/version.c" | \
- $(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
- i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)"
+ $(BOOTSTRAPRUBY) "$(tooldir)/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
+ i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)" \
+ LIBPATHENV="$(LIBPATHENV)" PRELOADENV="$(PRELOADENV)" LIBRUBY_SO="$(LIBRUBY_SO)"
+
+noarch-fake.rb: # prerequisite of yes-fake
+ $(Q) exit > $@
btest: $(TEST_RUNNABLE)-btest
no-btest: PHONY
-yes-btest: fake miniruby$(EXEEXT) PHONY
- $(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(BTESTS)
+yes-btest: yes-fake miniruby$(EXEEXT) PHONY
+ $(ACTIONS_GROUP)
+ $(Q)$(gnumake_recursive)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(BTESTS)
+ $(ACTIONS_ENDGROUP)
btest-ruby: $(TEST_RUNNABLE)-btest-ruby
no-btest-ruby: PHONY
yes-btest-ruby: prog PHONY
- $(Q)$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib $(RUN_OPTS)" -q $(OPTS) $(TESTOPTS) $(BTESTS)
+ $(ACTIONS_GROUP)
+ $(Q)$(gnumake_recursive)$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(BTESTS)
+ $(ACTIONS_ENDGROUP)
+
+rtest: yes-fake miniruby$(EXEEXT) PHONY
+ $(ACTIONS_GROUP)
+ $(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" --sets=ractor -v
+ $(ACTIONS_ENDGROUP)
test-basic: $(TEST_RUNNABLE)-test-basic
no-test-basic: PHONY
yes-test-basic: prog PHONY
+ $(ACTIONS_GROUP)
$(Q)$(exec) $(RUNRUBY) "$(srcdir)/basictest/runner.rb" --run-opt=$(RUN_OPTS) $(OPTS) $(TESTOPTS)
+ $(ACTIONS_ENDGROUP)
test-knownbugs: test-knownbug
test-knownbug: $(TEST_RUNNABLE)-test-knownbug
no-test-knownbug: PHONY
yes-test-knownbug: prog PHONY
+ $(ACTIONS_GROUP)
-$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(srcdir)/KNOWNBUGS.rb
+ $(ACTIONS_ENDGROUP)
test-testframework: $(TEST_RUNNABLE)-test-testframework
yes-test-testframework: prog PHONY
- $(gnumake_recursive)$(Q)$(exec) $(RUNRUBY) "$(TOOL_TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS) testunit minitest
+ $(ACTIONS_GROUP)
+ $(gnumake_recursive)$(Q)$(exec) $(RUNRUBY) "$(TOOL_TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS) testunit
+ $(ACTIONS_ENDGROUP)
no-test-testframework: PHONY
test-tool: $(TEST_RUNNABLE)-test-tool
yes-test-tool: prog PHONY
+ $(ACTIONS_GROUP)
$(gnumake_recursive)$(Q)$(exec) $(RUNRUBY) "$(TOOL_TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS)
+ $(ACTIONS_ENDGROUP)
no-test-tool: PHONY
test-sample: test-basic # backward compatibility for mswin-build
-test-short: btest-ruby test-knownbug test-basic
+test-short: btest-ruby $(DOT_WAIT) test-knownbug $(DOT_WAIT) test-basic
test: test-short
# $ make test-all TESTOPTS="--help" displays more detail
# for example, make test-all TESTOPTS="-j2 -v -n test-name -- test-file-name"
test-all: $(TEST_RUNNABLE)-test-all
yes-test-all: programs PHONY
+ $(ACTIONS_GROUP)
$(gnumake_recursive)$(Q)$(exec) $(RUNRUBY) "$(TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) $(TESTS)
+ $(ACTIONS_ENDGROUP)
TESTS_BUILD = mkmf
no-test-all: PHONY
$(gnumake_recursive)$(MINIRUBY) -I"$(srcdir)/lib" "$(TESTSDIR)/runner.rb" $(TESTOPTS) $(TESTS_BUILD)
@@ -797,13 +872,16 @@ extconf: $(PREP)
$(Q) $(MAKEDIRS) "$(EXTCONFDIR)"
$(RUNRUBY) -C "$(EXTCONFDIR)" $(EXTCONF) $(EXTCONFARGS)
-$(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h
+rbconfig.rb: $(RBCONFIG)
+
+$(HAVE_BASERUBY:no=)$(RBCONFIG)$(HAVE_BASERUBY:no=): $(PREP)
+$(RBCONFIG): $(tooldir)/mkconfig.rb config.status $(srcdir)/version.h $(srcdir)/common.mk
$(Q)$(BOOTSTRAPRUBY) -n \
-e 'BEGIN{version=ARGV.shift;mis=ARGV.dup}' \
-e 'END{abort "UNICODE version mismatch: #{mis}" unless mis.empty?}' \
-e '(mis.delete(ARGF.path); ARGF.close) if /ONIG_UNICODE_VERSION_STRING +"#{Regexp.quote(version)}"/o' \
$(UNICODE_VERSION) $(UNICODE_DATA_HEADERS)
- $(Q)$(BOOTSTRAPRUBY) $(srcdir)/tool/mkconfig.rb \
+ $(Q)$(BOOTSTRAPRUBY) $(tooldir)/mkconfig.rb \
-arch=$(arch) -version=$(RUBY_PROGRAM_VERSION) \
-install_name=$(RUBY_INSTALL_NAME) \
-so_name=$(RUBY_SO_NAME) \
@@ -815,17 +893,21 @@ $(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h
test-rubyspec: test-spec
yes-test-rubyspec: yes-test-spec
-test-spec-precheck: $(arch)-fake.rb programs
+test-spec-precheck: programs yes-fake
test-spec: $(TEST_RUNNABLE)-test-spec
yes-test-spec: test-spec-precheck
+ $(ACTIONS_GROUP)
$(gnumake_recursive)$(Q) \
$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec $(MSPECOPT) $(SPECOPTS)
+ $(ACTIONS_ENDGROUP)
no-test-spec:
+check: $(DOT_WAIT) test-spec
+
RUNNABLE = $(LIBRUBY_RELATIVE:no=un)-runnable
-runnable: $(RUNNABLE) prog $(srcdir)/tool/mkrunnable.rb PHONY
- $(Q) $(MINIRUBY) $(srcdir)/tool/mkrunnable.rb -v $(EXTOUT)
+runnable: $(RUNNABLE) prog $(tooldir)/mkrunnable.rb PHONY
+ $(Q) $(MINIRUBY) $(tooldir)/mkrunnable.rb -v $(EXTOUT)
yes-runnable: PHONY
encs: enc trans
@@ -838,11 +920,13 @@ encs enc trans libencs libenc libtrans: $(SHOWFLAGS) $(ENC_MK) $(LIBRUBY) $(PREP
libenc enc: {$(VPATH)}encdb.h
libtrans trans: {$(VPATH)}transdb.h
+ENC_HEADERS = $(srcdir)/enc/jis/props.h
# Use MINIRUBY which loads fake.rb for cross compiling
$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
- $(srcdir)/enc/encinit.c.erb $(srcdir)/lib/mkmf.rb $(RBCONFIG) fake
+ $(srcdir)/enc/encinit.c.erb $(ENC_HEADERS) $(srcdir)/lib/mkmf.rb $(RBCONFIG) $(HAVE_BASERUBY)-fake
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $(ENCS) $@
+ $(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/enc/make_encmake.rb \
+ --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $(ENCS) $@
.PRECIOUS: $(MKFILES)
@@ -859,16 +943,15 @@ $(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc
PHONY:
-{$(VPATH)}parse.c: {$(VPATH)}parse.y $(srcdir)/tool/ytab.sed {$(VPATH)}id.h
+{$(VPATH)}parse.c: {$(VPATH)}parse.y $(tooldir)/ytab.sed {$(VPATH)}id.h
{$(VPATH)}parse.h: {$(VPATH)}parse.c
{$(srcdir)}.y.c:
$(ECHO) generating $@
- $(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
- $(Q)$(BASERUBY) $(srcdir)/tool/pure_parser.rb parse.tmp.y $(YACC)
+ $(Q)$(BASERUBY) $(tooldir)/id2token.rb $(SRC_FILE) > parse.tmp.y
$(Q)$(YACC) -d $(YFLAGS) -o y.tab.c parse.tmp.y
$(Q)$(RM) parse.tmp.y
- $(Q)sed -f $(srcdir)/tool/ytab.sed -e "/^#/s|parse\.tmp\.[iy]|$(SRC_FILE)|" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
+ $(Q)sed -f $(tooldir)/ytab.sed -e "/^#/s|parse\.tmp\.[iy]|$(SRC_FILE)|" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
$(Q)$(MV) $@.new $@
$(Q)sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse.*\.y/d" y.tab.h > $(@:.c=.h)
$(Q)$(RM) y.tab.c y.tab.h
@@ -877,11 +960,11 @@ $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)
@$(NULLCMD) > $@
-exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT) {$(VPATH)}config.h
+exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time $(PREP) {$(VPATH)}config.h
$(Q) $(CC) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(COUTFLAG)ruby-runner.$(OBJEXT) -c $(CSRCFLAG)$(srcdir)/ruby-runner.c
$(Q) $(PURIFY) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTFLAG)$@ ruby-runner.$(OBJEXT) $(LIBS)
$(Q) $(POSTLINK)
- $(Q) ./miniruby$(EXEEXT) \
+ $(Q) $(BOOTSTRAPRUBY) \
-e 'prog, dest, inst = ARGV; dest += "/ruby"' \
-e 'exit unless prog==inst' \
-e 'unless prog=="ruby"' \
@@ -919,23 +1002,28 @@ RUBY_H_INCLUDES = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \
acosh.$(OBJEXT): {$(VPATH)}acosh.c
alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h
+cbrt.$(OBJEXT): {$(VPATH)}cbrt.c
+close.$(OBJEXT): {$(VPATH)}close.c
crypt.$(OBJEXT): {$(VPATH)}crypt.c {$(VPATH)}crypt.h {$(VPATH)}missing/des_tables.c
-dup2.$(OBJEXT): {$(VPATH)}dup2.c
erf.$(OBJEXT): {$(VPATH)}erf.c
explicit_bzero.$(OBJEXT): {$(VPATH)}explicit_bzero.c
-finite.$(OBJEXT): {$(VPATH)}finite.c
+ffs.$(OBJEXT): {$(VPATH)}ffs.c
flock.$(OBJEXT): {$(VPATH)}flock.c
+hypot.$(OBJEXT): {$(VPATH)}hypot.c
+langinfo.$(OBJEXT): {$(VPATH)}langinfo.c
+lgamma_r.$(OBJEXT): {$(VPATH)}lgamma_r.c
memcmp.$(OBJEXT): {$(VPATH)}memcmp.c
memmove.$(OBJEXT): {$(VPATH)}memmove.c
-mkdir.$(OBJEXT): {$(VPATH)}mkdir.c
+nan.$(OBJEXT): {$(VPATH)}nan.c
+nextafter.$(OBJEXT): {$(VPATH)}nextafter.c
+procstat_vm.$(OBJEXT): {$(VPATH)}procstat_vm.c
setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c
strchr.$(OBJEXT): {$(VPATH)}strchr.c
-strdup.$(OBJEXT): {$(VPATH)}strdup.c
strerror.$(OBJEXT): {$(VPATH)}strerror.c
strlcat.$(OBJEXT): {$(VPATH)}strlcat.c
strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c
strstr.$(OBJEXT): {$(VPATH)}strstr.c
-nt.$(OBJEXT): {$(VPATH)}nt.c
+tgamma.$(OBJEXT): {$(VPATH)}tgamma.c
.coroutine_obj $(COROUTINE_OBJ): \
{$(VPATH)}$(COROUTINE_SRC) \
@@ -960,14 +1048,14 @@ win32/win32.$(OBJEXT): {$(VPATH)}win32/win32.c {$(VPATH)}win32/file.h \
win32/file.$(OBJEXT): {$(VPATH)}win32/file.c {$(VPATH)}win32/file.h \
$(RUBY_H_INCLUDES) $(PLATFORM_D)
-$(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb
+$(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(tooldir)/transcode-tblgen.rb
$(Q) $(MAKEDIRS) $(@D)
- $(Q) $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans
+ $(Q) $(BASERUBY) "$(tooldir)/transcode-tblgen.rb" -vo $@ $(srcdir)/enc/trans/newline.trans
enc/trans/newline.$(OBJEXT): $(NEWLINE_C)
-verconf.h: $(srcdir)/template/verconf.h.tmpl $(srcdir)/tool/generic_erb.rb
+verconf.h: $(srcdir)/template/verconf.h.tmpl $(tooldir)/generic_erb.rb $(RBCONFIG)
$(ECHO) creating $@
- $(Q) $(BOOTSTRAPRUBY) "$(srcdir)/tool/generic_erb.rb" -o $@ $(srcdir)/template/verconf.h.tmpl
+ $(Q) $(BOOTSTRAPRUBY) "$(tooldir)/generic_erb.rb" -o $@ $(srcdir)/template/verconf.h.tmpl
ruby-glommed.$(OBJEXT): $(OBJS)
@@ -977,39 +1065,49 @@ INSNS2VMOPT = --srcdir="$(srcdir)"
srcs_vpath = {$(VPATH)}
-inc_common_headers = $(srcdir)/tool/ruby_vm/views/_copyright.erb $(srcdir)/tool/ruby_vm/views/_notice.erb
-$(srcs_vpath)opt_sc.inc: $(srcdir)/tool/ruby_vm/views/opt_sc.inc.erb $(inc_common_headers)
-$(srcs_vpath)optinsn.inc: $(srcdir)/tool/ruby_vm/views/optinsn.inc.erb $(inc_common_headers)
-$(srcs_vpath)optunifs.inc: $(srcdir)/tool/ruby_vm/views/optunifs.inc.erb $(inc_common_headers)
-$(srcs_vpath)insns.inc: $(srcdir)/tool/ruby_vm/views/insns.inc.erb $(inc_common_headers)
-$(srcs_vpath)insns_info.inc: $(srcdir)/tool/ruby_vm/views/insns_info.inc.erb $(inc_common_headers) \
- $(srcdir)/tool/ruby_vm/views/_insn_type_chars.erb $(srcdir)/tool/ruby_vm/views/_insn_name_info.erb \
- $(srcdir)/tool/ruby_vm/views/_insn_len_info.erb $(srcdir)/tool/ruby_vm/views/_insn_operand_info.erb \
- $(srcdir)/tool/ruby_vm/views/_attributes.erb $(srcdir)/tool/ruby_vm/views/_comptime_insn_stack_increase.erb \
- $(srcdir)/tool/ruby_vm/views/_insn_sp_pc_dependency.erb
-$(srcs_vpath)vmtc.inc: $(srcdir)/tool/ruby_vm/views/vmtc.inc.erb $(inc_common_headers)
-$(srcs_vpath)vm.inc: $(srcdir)/tool/ruby_vm/views/vm.inc.erb $(inc_common_headers) \
- $(srcdir)/tool/ruby_vm/views/_insn_entry.erb $(srcdir)/tool/ruby_vm/views/_trace_instruction.erb
-$(srcs_vpath)mjit_compile.inc: $(srcdir)/tool/ruby_vm/views/mjit_compile.inc.erb $(inc_common_headers) \
- $(srcdir)/tool/ruby_vm/views/_mjit_compile_insn.erb $(srcdir)/tool/ruby_vm/views/_mjit_compile_send.erb \
- $(srcdir)/tool/ruby_vm/views/_mjit_compile_ivar.erb \
- $(srcdir)/tool/ruby_vm/views/_mjit_compile_insn_body.erb $(srcdir)/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
+inc_common_headers = $(tooldir)/ruby_vm/views/_copyright.erb $(tooldir)/ruby_vm/views/_notice.erb
+$(srcs_vpath)opt_sc.inc: $(tooldir)/ruby_vm/views/opt_sc.inc.erb $(inc_common_headers)
+$(srcs_vpath)optinsn.inc: $(tooldir)/ruby_vm/views/optinsn.inc.erb $(inc_common_headers)
+$(srcs_vpath)optunifs.inc: $(tooldir)/ruby_vm/views/optunifs.inc.erb $(inc_common_headers)
+$(srcs_vpath)insns.inc: $(tooldir)/ruby_vm/views/insns.inc.erb $(inc_common_headers)
+$(srcs_vpath)insns_info.inc: $(tooldir)/ruby_vm/views/insns_info.inc.erb $(inc_common_headers) \
+ $(tooldir)/ruby_vm/views/_insn_type_chars.erb $(tooldir)/ruby_vm/views/_insn_name_info.erb \
+ $(tooldir)/ruby_vm/views/_insn_len_info.erb $(tooldir)/ruby_vm/views/_insn_operand_info.erb \
+ $(tooldir)/ruby_vm/views/_attributes.erb $(tooldir)/ruby_vm/views/_comptime_insn_stack_increase.erb \
+ $(tooldir)/ruby_vm/views/_insn_sp_pc_dependency.erb
+$(srcs_vpath)vmtc.inc: $(tooldir)/ruby_vm/views/vmtc.inc.erb $(inc_common_headers)
+$(srcs_vpath)vm.inc: $(tooldir)/ruby_vm/views/vm.inc.erb $(inc_common_headers) \
+ $(tooldir)/ruby_vm/views/_insn_entry.erb $(tooldir)/ruby_vm/views/_trace_instruction.erb
+$(srcs_vpath)mjit_sp_inc.inc: $(tooldir)/ruby_vm/views/mjit_sp_inc.inc.erb
BUILTIN_RB_SRCS = \
$(srcdir)/ast.rb \
+ $(srcdir)/dir.rb \
$(srcdir)/gc.rb \
+ $(srcdir)/numeric.rb \
$(srcdir)/io.rb \
+ $(srcdir)/marshal.rb \
+ $(srcdir)/mjit.rb \
+ $(srcdir)/mjit_c.rb \
$(srcdir)/pack.rb \
$(srcdir)/trace_point.rb \
$(srcdir)/warning.rb \
+ $(srcdir)/array.rb \
+ $(srcdir)/kernel.rb \
+ $(srcdir)/ractor.rb \
+ $(srcdir)/symbol.rb \
+ $(srcdir)/timev.rb \
+ $(srcdir)/thread_sync.rb \
+ $(srcdir)/nilclass.rb \
$(srcdir)/prelude.rb \
$(srcdir)/gem_prelude.rb \
+ $(srcdir)/yjit.rb \
$(empty)
BUILTIN_RB_INCS = $(BUILTIN_RB_SRCS:.rb=.rbinc)
common-srcs: $(srcs_vpath)parse.c $(srcs_vpath)lex.c $(srcs_vpath)enc/trans/newline.c $(srcs_vpath)id.c \
$(BUILTIN_RB_INCS) \
- srcs-lib srcs-ext incs
+ srcs-lib srcs-ext incs preludes
missing-srcs: $(srcdir)/missing/des_tables.c
@@ -1046,51 +1144,51 @@ all-incs: incs {$(VPATH)}encdb.h {$(VPATH)}transdb.h
incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}known_errors.inc \
{$(VPATH)}vm_call_iseq_optimized.inc $(srcdir)/revision.h \
$(REVISION_H) \
- $(UNICODE_DATA_HEADERS) $(srcdir)/enc/jis/props.h \
+ $(UNICODE_DATA_HEADERS) $(ENC_HEADERS) \
{$(VPATH)}id.h {$(VPATH)}probes.dmyh
insns: $(INSNS)
-id.h: $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl $(srcdir)/defs/id.def
+id.h: $(tooldir)/generic_erb.rb $(srcdir)/template/id.h.tmpl $(srcdir)/defs/id.def
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb --output=$@ \
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb --output=$@ \
$(srcdir)/template/id.h.tmpl
-id.c: $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.c.tmpl $(srcdir)/defs/id.def
+id.c: $(tooldir)/generic_erb.rb $(srcdir)/template/id.c.tmpl $(srcdir)/defs/id.def
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb --output=$@ \
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb --output=$@ \
$(srcdir)/template/id.c.tmpl
-node_name.inc: $(srcdir)/tool/node_name.rb $(srcdir)/node.h
+node_name.inc: $(tooldir)/node_name.rb $(srcdir)/node.h
$(ECHO) generating $@
- $(Q) $(BASERUBY) -n $(srcdir)/tool/node_name.rb < $(srcdir)/node.h > $@
+ $(Q) $(BASERUBY) -n $(tooldir)/node_name.rb < $(srcdir)/node.h > $@
-encdb.h: $(PREP) $(srcdir)/tool/generic_erb.rb $(srcdir)/template/encdb.h.tmpl
+encdb.h: $(RBCONFIG) $(tooldir)/generic_erb.rb $(srcdir)/template/encdb.h.tmpl
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/encdb.h.tmpl $(srcdir)/enc enc
+ $(Q) $(BOOTSTRAPRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/encdb.h.tmpl $(srcdir)/enc enc
-transdb.h: $(PREP) srcs-enc $(srcdir)/tool/generic_erb.rb $(srcdir)/template/transdb.h.tmpl
+transdb.h: $(RBCONFIG) srcs-enc $(tooldir)/generic_erb.rb $(srcdir)/template/transdb.h.tmpl
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/transdb.h.tmpl $(srcdir)/enc/trans enc/trans
+ $(Q) $(BOOTSTRAPRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/transdb.h.tmpl $(srcdir)/enc/trans enc/trans
enc/encinit.c: $(ENC_MK) $(srcdir)/enc/encinit.c.erb
known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
-vm_call_iseq_optimized.inc: $(srcdir)/tool/mk_call_iseq_optimized.rb
+vm_call_iseq_optimized.inc: $(srcdir)/template/call_iseq_optimized.inc.tmpl
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/mk_call_iseq_optimized.rb > $@
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/call_iseq_optimized.inc.tmpl
$(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS)
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -o $@ \
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb -I$(srcdir) -o $@ \
$(srcdir)/template/prelude.c.tmpl $(BUILTIN_RB_SRCS)
$(GOLF_PRELUDE_C): $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl golf_prelude.rb
MAINCPPFLAGS = $(ENABLE_DEBUG_ENV:yes=-DRUBY_DEBUG_ENV=1)
@@ -1099,10 +1197,10 @@ $(MAINOBJ): $(srcdir)/$(MAINSRC)
$(ECHO) compiling $(srcdir)/$(MAINSRC)
$(Q) $(CC) $(MAINCPPFLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(srcdir)/$(MAINSRC)
-{$(VPATH)}probes.dmyh: {$(srcdir)}probes.d $(srcdir)/tool/gen_dummy_probes.rb
+{$(VPATH)}probes.dmyh: {$(srcdir)}probes.d $(tooldir)/gen_dummy_probes.rb
probes.dmyh:
- $(BASERUBY) $(srcdir)/tool/gen_dummy_probes.rb $(srcdir)/probes.d > $@
+ $(BASERUBY) $(tooldir)/gen_dummy_probes.rb $(srcdir)/probes.d > $@
probes.h: {$(VPATH)}probes.$(DTRACE_EXT)
@@ -1113,32 +1211,28 @@ preludes: {$(srcdir)}golf_prelude.c
{$(srcdir)}.rb.rbinc:
$(ECHO) making $@
- $(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $<
+ $(Q) $(BASERUBY) $(tooldir)/mk_builtin_loader.rb $<
-builtin_binary.inc: $(PREP) $(BUILTIN_RB_SRCS) $(srcdir)/tool/mk_builtin_binary.rb
- $(Q) $(MINIRUBY) $(srcdir)/tool/mk_builtin_binary.rb --cross=$(CROSS_COMPILING)
+builtin_binary.inc: $(PREP) $(BUILTIN_RB_SRCS) $(srcdir)/template/builtin_binary.inc.tmpl
+ $(Q) $(MINIRUBY) $(tooldir)/generic_erb.rb -o $@ \
+ $(srcdir)/template/builtin_binary.inc.tmpl -- --cross=$(CROSS_COMPILING)
$(BUILTIN_RB_INCS): $(top_srcdir)/tool/mk_builtin_loader.rb
-$(srcdir)/revision.h:
- $(Q)$(gnumake:yes=#) $(RM) $(@F)
- $(Q)$(gnumake:yes=#) $(NULLCMD) > $@ || $(NULLCMD) > $(@F)
-
-revision.tmp::
- $(Q) $(NULLCMD) > $@
-revision.$(HAVE_BASERUBY:yes=tmp):: $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE)
- $(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h --srcdir="$(srcdir)" > $@
+$(srcdir)/revision.h$(no_baseruby:no=~disabled~): $(REVISION_H)
-$(REVISION_H): revision.tmp
- $(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp
+$(REVISION_H)$(no_baseruby:no=~disabled~):
+ $(Q) $(BASERUBY) $(tooldir)/file2lastrev.rb -q --revision.h --srcdir="$(srcdir)" --output=revision.h --timestamp=$@
+$(REVISION_H)$(yes_baseruby:yes=~disabled~):
+ $(Q) exit > $@
-$(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/parse.y id.h $(srcdir)/ext/ripper/depend
+$(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/parse.y $(srcdir)/defs/id.def $(srcdir)/ext/ripper/depend
$(ECHO) generating $@
- $(Q) VPATH=$${PWD-`pwd`} && $(CHDIR) $(@D) && \
- sed -e 's/{\$$([^(){}]*)[^{}]*}//g' -e /AUTOGENERATED/q depend | \
+ $(Q) $(CHDIR) $(@D) && \
+ $(CAT_DEPEND) depend | \
$(exec) $(MAKE) -f - $(mflags) \
- Q=$(Q) ECHO=$(ECHO) RM="$(RM)" BISON=$(YACC) top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \
- RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)"
+ Q=$(Q) ECHO=$(ECHO) RM="$(RM1)" BISON="$(YACC)" top_srcdir=../.. srcdir=. VPATH=../.. \
+ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)" LANG=C
$(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl $(srcdir)/ext/json/parser/prereq.mk
$(ECHO) generating $@
@@ -1151,52 +1245,56 @@ $(srcdir)/ext/date/zonetab.h: $(srcdir)/ext/date/zonetab.list $(srcdir)/ext/date
Q=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. BASERUBY="$(BASERUBY)"
$(srcdir)/ext/rbconfig/sizeof/sizes.c: $(srcdir)/ext/rbconfig/sizeof/depend \
- $(srcdir)/tool/generic_erb.rb $(srcdir)/template/sizes.c.tmpl $(srcdir)/configure.ac
+ $(tooldir)/generic_erb.rb $(srcdir)/template/sizes.c.tmpl $(srcdir)/configure.ac
$(ECHO) generating $@
$(Q) $(CHDIR) $(@D) && \
- sed '/AUTOGENERATED/q' depend | \
+ $(CAT_DEPEND) depend | \
$(exec) $(MAKE) -f - $(mflags) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. RUBY="$(BASERUBY)" $(@F)
$(srcdir)/ext/rbconfig/sizeof/limits.c: $(srcdir)/ext/rbconfig/sizeof/depend \
- $(srcdir)/tool/generic_erb.rb $(srcdir)/template/limits.c.tmpl
+ $(tooldir)/generic_erb.rb $(srcdir)/template/limits.c.tmpl
$(ECHO) generating $@
$(Q) $(CHDIR) $(@D) && \
- sed '/AUTOGENERATED/q' depend | \
+ $(CAT_DEPEND) depend | \
$(exec) $(MAKE) -f - $(mflags) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. RUBY="$(BASERUBY)" $(@F)
$(srcdir)/ext/socket/constdefs.c: $(srcdir)/ext/socket/depend
$(Q) $(CHDIR) $(@D) && \
- sed '/AUTOGENERATED/q' depend | \
+ $(CAT_DEPEND) depend | \
$(exec) $(MAKE) -f - $(mflags) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. RUBY="$(BASERUBY)"
$(srcdir)/ext/etc/constdefs.h: $(srcdir)/ext/etc/depend
$(Q) $(CHDIR) $(@D) && \
- sed '/AUTOGENERATED/q' depend | \
+ $(CAT_DEPEND) depend | \
$(exec) $(MAKE) -f - $(mflags) \
Q=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. RUBY="$(BASERUBY)"
##
-run: fake miniruby$(EXEEXT) PHONY
- $(BTESTRUBY) $(TESTRUN_SCRIPT) $(RUNOPT)
+run: yes-fake miniruby$(EXEEXT) PHONY
+ $(BTESTRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
runruby: $(PROGRAM) PHONY
- $(RUNRUBY) $(TESTRUN_SCRIPT)
+ RUBY_ON_BUG='gdb -x $(srcdir)/.gdbinit -p' $(RUNRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
-parse: fake miniruby$(EXEEXT) PHONY
+runirb: $(PROGRAM) PHONY
+ RUBY_ON_BUG='gdb -x $(srcdir)/.gdbinit -p' $(RUNRUBY) $(RUNOPT0) -r irb -e 'IRB.start("make runirb")' $(RUNOPT)
+
+parse: yes-fake miniruby$(EXEEXT) PHONY
$(BTESTRUBY) --dump=parsetree_with_comment,insns $(TESTRUN_SCRIPT)
bisect: PHONY
- $(srcdir)/tool/bisect.sh miniruby $(srcdir)
+ $(tooldir)/bisect.sh miniruby $(srcdir)
bisect-ruby: PHONY
- $(srcdir)/tool/bisect.sh ruby $(srcdir)
+ $(tooldir)/bisect.sh ruby $(srcdir)
COMPARE_RUBY = $(BASERUBY)
BENCH_RUBY = $(RUNRUBY)
+BENCH_OPTS = --output=markdown --output-compare -v
ITEM =
ARGS = $$(find $(srcdir)/benchmark -maxdepth 1 -name '$(ITEM)' -o -name '*$(ITEM)*.yml' -o -name '*$(ITEM)*.rb' | sort)
OPTS =
@@ -1206,10 +1304,12 @@ benchmark: miniruby$(EXEEXT) update-benchmark-driver PHONY
$(BASERUBY) -rrubygems -I$(srcdir)/benchmark/lib $(srcdir)/benchmark/benchmark-driver/exe/benchmark-driver \
--executables="compare-ruby::$(COMPARE_RUBY) -I$(EXTOUT)/common --disable-gem" \
--executables="built-ruby::$(BENCH_RUBY) --disable-gem" \
- $(ARGS) $(OPTS)
+ $(BENCH_OPTS) $(ARGS) $(OPTS)
run.gdb:
echo set breakpoint pending on > run.gdb
+ echo b rb_assert_failure >> run.gdb
+ echo b rb_bug >> run.gdb
echo b ruby_debug_breakpoint >> run.gdb
echo '# handle SIGINT nostop' >> run.gdb
echo '# handle SIGPIPE nostop' >> run.gdb
@@ -1224,40 +1324,44 @@ run.gdb:
gdb: miniruby$(EXEEXT) run.gdb PHONY
- gdb -x run.gdb --quiet --args $(MINIRUBY) $(TESTRUN_SCRIPT)
+ gdb -x run.gdb --quiet --args $(MINIRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
gdb-ruby: $(PROGRAM) run.gdb PHONY
- $(Q) $(RUNRUBY_COMMAND) $(RUNRUBY_DEBUGGER) -- $(TESTRUN_SCRIPT)
+ $(Q) $(RUNRUBY_COMMAND) $(RUNRUBY_DEBUGGER) -- $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
LLDB_INIT = command script import -r $(srcdir)/misc/lldb_cruby.py
lldb: miniruby$(EXEEXT) PHONY
- lldb -o '$(LLDB_INIT)' miniruby$(EXEEXT) -- $(TESTRUN_SCRIPT)
+ lldb -o '$(LLDB_INIT)' miniruby$(EXEEXT) -- $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
lldb-ruby: $(PROGRAM) PHONY
- lldb $(enable_shared:yes=-o 'target modules add ${LIBRUBY_SO}') -o '$(LLDB_INIT)' $(PROGRAM) -- $(TESTRUN_SCRIPT)
+ lldb $(enable_shared:yes=-o 'target modules add ${LIBRUBY_SO}') -o '$(LLDB_INIT)' $(PROGRAM) -- $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
DISTPKGS = gzip,zip,all
+PKGSDIR = tmp
dist:
- $(BASERUBY) $(srcdir)/tool/make-snapshot \
+ $(BASERUBY) $(V0:1=-v) $(tooldir)/make-snapshot \
-srcdir=$(srcdir) -packages=$(DISTPKGS) \
-unicode-version=$(UNICODE_VERSION) \
- tmp $(RELNAME)
+ $(DISTOPTS) $(PKGSDIR) $(RELNAME)
up:: update-remote
up::
- -$(Q)$(MAKE) $(mflags) Q=$(Q) REVISION_FORCE=PHONY "$(REVISION_H)"
-
-up::
- -$(Q)$(MAKE) $(mflags) Q=$(Q) after-update
+ -$(Q)$(MAKE) $(mflags) Q=$(Q) REVISION_FORCE=PHONY ALWAYS_UPDATE_UNICODE= after-update
yes::
no::
+after-update:: common-srcs
+after-update:: $(REVISION_H)
after-update:: extract-extlibs
after-update:: extract-gems
+update-src::
+ $(Q) $(RM) $(REVISION_H) revision.h "$(srcdir)/$(REVISION_H)" "$(srcdir)/revision.h"
+ $(Q) exit > "$(srcdir)/revision.h"
+
update-remote:: update-src update-download
update-download:: $(ALWAYS_UPDATE_UNICODE:yes=update-unicode)
update-download:: update-gems
@@ -1270,13 +1374,16 @@ update-config_files: PHONY
$(Q) $(BASERUBY) -C "$(srcdir)" tool/downloader.rb -d tool --cache-dir=$(CACHE_DIR) -e gnu \
config.guess config.sub
-refresh-gems: update-bundled_gems update-gems extract-gems
+refresh-gems: update-bundled_gems prepare-gems
+prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
+extract-gems: $(HAVE_BASERUBY:yes=update-gems)
-update-gems: PHONY
+update-gems$(gnumake:yes=-sequential): PHONY
$(ECHO) Downloading bundled gem files...
$(Q) $(BASERUBY) -C "$(srcdir)" \
-I./tool -rdownloader -answ \
-e 'gem, ver = *$$F' \
+ -e 'next if !ver or /^#/=~gem' \
-e 'old = Dir.glob("gems/#{gem}-*.gem")' \
-e 'gem = "#{gem}-#{ver}.gem"' \
-e 'Downloader::RubyGems.download(gem, "gems", nil) and' \
@@ -1285,33 +1392,53 @@ update-gems: PHONY
-e 'FileUtils.rm_rf(old.map{'"|n|"'n.chomp(".gem")})' \
gems/bundled_gems
-extract-gems: PHONY
+extract-gems$(gnumake:yes=-sequential): PHONY
$(ECHO) Extracting bundled gem files...
- $(Q) $(RUNRUBY) -C "$(srcdir)/gems" \
- -I../tool -rgem-unpack -answ \
- -e 'gem, ver = *$$F' \
- -e 'Gem.unpack("#{gem}-#{ver}.gem")' \
- bundled_gems
+ $(Q) $(BASERUBY) -C "$(srcdir)" \
+ -Itool/lib -rfileutils -rbundled_gem -answ \
+ -e 'BEGIN {d = ".bundle/gems"}' \
+ -e 'gem, ver, _, rev = *$$F' \
+ -e 'next if !ver or /^#/=~gem' \
+ -e 'g = "#{gem}-#{ver}"' \
+ -e 'if File.directory?("#{d}/#{g}")' \
+ -e 'elsif rev and File.exist?(gs = "gems/src/#{gem}/#{gem}.gemspec")' \
+ -e 'BundledGem.copy(gs, ".bundle")' \
+ -e 'else' \
+ -e 'BundledGem.unpack("gems/#{g}.gem", ".bundle")' \
+ -e 'end' \
+ gems/bundled_gems
+
+outdate-bundled-gems: PHONY
+ $(Q) $(BASERUBY) $(tooldir)/$@.rb --make="$(MAKE)" --mflags="$(MFLAGS)" "$(srcdir)"
update-bundled_gems: PHONY
$(Q) $(RUNRUBY) -rrubygems \
- -pla \
- -e '(gem,src), = Gem::SpecFetcher.fetcher.detect(:latest) {'"|s|" \
- -e 's.platform=="ruby"&&s.name==$$F[0]' \
- -e '}' \
- -e 'gem = src.fetch_spec(gem)' \
- -e '$$_ = [gem.name, gem.version, gem.metadata["source_code_uri"]||gem.homepage].join(" ")' \
+ $(tooldir)/update-bundled_gems.rb \
"$(srcdir)/gems/bundled_gems" | \
- "$(IFCHANGE)" "$(srcdir)/gems/bundled_gems" -
-
-test-bundled-gems-precheck: $(arch)-fake.rb programs
-
-test-bundled-gems-fetch: $(PREP)
+ $(IFCHANGE) "$(srcdir)/gems/bundled_gems" -
+ $(GIT) -C "$(srcdir)" diff --no-ext-diff --ignore-submodules --exit-code || \
+ $(GIT) -C "$(srcdir)" commit -m "Update bundled_gems" gems/bundled_gems
+
+PRECHECK_BUNDLED_GEMS = test-bundled-gems-precheck
+test-bundled-gems-precheck: $(TEST_RUNNABLE)-test-bundled-gems-precheck
+yes-test-bundled-gems-precheck: main
+no-test-bundled-gems-precheck:
+
+test-bundled-gems-fetch: yes-test-bundled-gems-fetch
+yes-test-bundled-gems-fetch:
+ $(ACTIONS_GROUP)
$(Q) $(BASERUBY) -C $(srcdir)/gems ../tool/fetch-bundled_gems.rb src bundled_gems
-
-test-bundled-gems-prepare: test-bundled-gems-precheck test-bundled-gems-fetch
+ $(ACTIONS_ENDGROUP)
+no-test-bundled-gems-fetch:
+
+test-bundled-gems-prepare: $(PRECHECK_BUNDLED_GEMS) test-bundled-gems-fetch
+test-bundled-gems-prepare: $(TEST_RUNNABLE)-test-bundled-gems-prepare
+no-test-bundled-gems-prepare: no-test-bundled-gems-precheck
+yes-test-bundled-gems-prepare: yes-test-bundled-gems-precheck
+ $(ACTIONS_GROUP)
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
- --install-dir .bundle --conservative "bundler" "minitest:~> 5" 'test-unit' 'rake' 'hoe' 'yard' 'pry' 'packnga'
+ --install-dir .bundle --conservative "bundler" "minitest:~> 5" "test-unit" "rake" "hoe" "rexml" "json-schema:5.1.0" "test-unit-rr"
+ $(ACTIONS_ENDGROUP)
PREPARE_BUNDLED_GEMS = test-bundled-gems-prepare
test-bundled-gems: $(TEST_RUNNABLE)-test-bundled-gems
@@ -1321,31 +1448,81 @@ no-test-bundled-gems:
# Override this to allow failure of specific gems on CI
# TEST_BUNDLED_GEMS_ALLOW_FAILURES =
+BUNDLED_GEMS =
test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
- $(Q) $(XRUBY) $(srcdir)/tool/test-bundled-gems.rb
+ $(gnumake_recursive)$(Q) $(XRUBY) $(tooldir)/test-bundled-gems.rb $(BUNDLED_GEMS)
-test-bundler-precheck: $(arch)-fake.rb programs
+test-syntax-suggest-precheck: $(TEST_RUNNABLE)-test-syntax-suggest-precheck
+no-test-syntax-suggest-precheck:
+yes-test-syntax-suggest-precheck: main
-yes-test-bundler-prepare: test-bundler-precheck
+test-syntax-suggest-prepare: $(TEST_RUNNABLE)-test-syntax-suggest-prepare
+no-test-syntax-suggest-prepare: no-test-syntax-suggest-precheck
+yes-test-syntax-suggest-prepare: yes-test-syntax-suggest-precheck
+ $(ACTIONS_GROUP)
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
- --install-dir .bundle --conservative "rspec:~> 3.5" "rake:~> 12.0" "parallel_tests:~> 2.29"
+ --install-dir .bundle --conservative "bundler" "rake" "rspec:~> 3" #"ruby-prof"
+ $(ACTIONS_ENDGROUP)
+
+RSPECOPTS =
+SYNTAX_SUGGEST_SPECS =
+PREPARE_SYNTAX_SUGGEST = test-syntax-suggest-prepare
+test-syntax-suggest: $(TEST_RUNNABLE)-test-syntax-suggest
+yes-test-syntax-suggest: yes-$(PREPARE_SYNTAX_SUGGEST)
+ $(XRUBY) -C $(srcdir) -Ispec/syntax_suggest .bundle/bin/rspec \
+ --require spec_helper $(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS)
+no-test-syntax-suggest:
+
+check: $(DOT_WAIT) $(TEST_RUNNABLE)-$(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest
+
+test-bundler-precheck: $(TEST_RUNNABLE)-test-bundler-precheck
+no-test-bundler-precheck:
+yes-test-bundler-precheck: main $(arch)-fake.rb
+
+no-test-bundler-prepare: no-test-bundler-precheck
+yes-test-bundler-prepare: yes-test-bundler-precheck
+ $(ACTIONS_GROUP)
+ $(XRUBY) -C $(srcdir) -Ilib \
+ -e 'ENV["GEM_HOME"] = File.expand_path(".bundle")' \
+ -e 'ENV["BUNDLE_APP_CONFIG"] = File.expand_path(".bundle")' \
+ -e 'ENV["BUNDLE_PATH__SYSTEM"] = "true"' \
+ -e 'ENV["BUNDLE_WITHOUT"] = "lint doc"' \
+ -e 'load "spec/bundler/support/bundle.rb"' -- install --gemfile=tool/bundler/dev_gems.rb
+ $(ACTIONS_ENDGROUP)
RSPECOPTS =
BUNDLER_SPECS =
test-bundler: $(TEST_RUNNABLE)-test-bundler
yes-test-bundler: yes-test-bundler-prepare
- $(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec \
+ $(gnumake_recursive)$(XRUBY) \
+ -r./$(arch)-fake \
+ -e "exec(*ARGV)" -- \
+ $(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec \
--require spec_helper $(RSPECOPTS) spec/bundler/$(BUNDLER_SPECS)
no-test-bundler:
PARALLELRSPECOPTS = --runtime-log $(srcdir)/tmp/parallel_runtime_rspec.log
test-bundler-parallel: $(TEST_RUNNABLE)-test-bundler-parallel
yes-test-bundler-parallel: yes-test-bundler-prepare
- $(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/parallel_rspec \
- -o "--require $(srcdir)/spec/bundler/spec_helper --require $(srcdir)/spec/bundler/support/parallel" \
- $(PARALLELRSPECOPTS) spec/bundler/$(BUNDLER_SPECS)
+ $(gnumake_recursive)$(XRUBY) \
+ -r./$(arch)-fake \
+ -e "ARGV[-1] = File.expand_path(ARGV[-1])" \
+ -e "exec(*ARGV)" -- \
+ $(XRUBY) -I$(srcdir)/spec/bundler \
+ -e "ENV['PARALLEL_TESTS_EXECUTABLE'] = ARGV.shift" \
+ -e "load ARGV.shift" \
+ "$(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec" \
+ $(srcdir)/.bundle/bin/parallel_rspec \
+ -o "--require spec_helper" \
+ $(PARALLELRSPECOPTS) $(srcdir)/spec/bundler/$(BUNDLER_SPECS)
no-test-bundler-parallel:
+# The annocheck supports ELF format binaries compiled for any OS and for any
+# architecture. It is designed to be independent of the host OS and the
+# architecture. The test-annocheck.sh requires docker or podman.
+test-annocheck: $(PROGRAM)
+ $(tooldir)/test-annocheck.sh $(PROGRAM)
+
GEM = up
sync-default-gems:
$(Q) $(XRUBY) -C "$(srcdir)" tool/sync_default_gems.rb $(GEM)
@@ -1372,75 +1549,97 @@ UNICODE_AUXILIARY_FILES = \
$(UNICODE_SRC_DATA_DIR)/auxiliary/GraphemeBreakTest.txt \
$(empty)
+UNICODE_UCD_EMOJI_FILES = \
+ $(UNICODE_SRC_DATA_DIR)/emoji/emoji-data.txt \
+ $(UNICODE_SRC_DATA_DIR)/emoji/emoji-variation-sequences.txt \
+ $(empty)
+
UNICODE_EMOJI_FILES = \
- $(UNICODE_SRC_EMOJI_DATA_DIR)/emoji-data.txt \
$(UNICODE_SRC_EMOJI_DATA_DIR)/emoji-sequences.txt \
$(UNICODE_SRC_EMOJI_DATA_DIR)/emoji-test.txt \
- $(UNICODE_SRC_EMOJI_DATA_DIR)/emoji-variation-sequences.txt \
$(UNICODE_SRC_EMOJI_DATA_DIR)/emoji-zwj-sequences.txt \
$(empty)
update-unicode: $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES) \
- $(UNICODE_AUXILIARY_FILES) $(UNICODE_EMOJI_FILES)
+ $(UNICODE_AUXILIARY_FILES) $(UNICODE_UCD_EMOJI_FILES) $(UNICODE_EMOJI_FILES)
CACHE_DIR = $(srcdir)/.downloaded-cache
-UNICODE_DOWNLOAD = \
- $(BASERUBY) $(srcdir)/tool/downloader.rb \
+UNICODE_DOWNLOADER_ALWAYS_UPDATE = $(ALWAYS_UPDATE_UNICODE:yes=--always)
+UNICODE_DOWNLOADER = \
+ $(BASERUBY) $(tooldir)/downloader.rb \
--cache-dir=$(CACHE_DIR) \
- --unicode-beta $(UNICODE_BETA) \
+ --exist $(UNICODE_DOWNLOADER_ALWAYS_UPDATE:no=) \
+ unicode --unicode-beta=$(UNICODE_BETA)
+UNICODE_DOWNLOAD = \
+ $(UNICODE_DOWNLOADER) \
-d $(UNICODE_SRC_DATA_DIR) \
- -p $(UNICODE_VERSION)/ucd \
- -e $(ALWAYS_UPDATE_UNICODE:yes=-a) unicode
+ -p $(UNICODE_VERSION)/ucd
UNICODE_AUXILIARY_DOWNLOAD = \
- $(BASERUBY) $(srcdir)/tool/downloader.rb \
- --cache-dir=$(CACHE_DIR) \
- --unicode-beta $(UNICODE_BETA) \
+ $(UNICODE_DOWNLOADER) \
-d $(UNICODE_SRC_DATA_DIR)/auxiliary \
- -p $(UNICODE_VERSION)/ucd/auxiliary \
- -e $(ALWAYS_UPDATE_UNICODE:yes=-a) unicode
+ -p $(UNICODE_VERSION)/ucd/auxiliary
+UNICODE_UCD_EMOJI_DOWNLOAD = \
+ $(UNICODE_DOWNLOADER) \
+ -d $(UNICODE_SRC_DATA_DIR)/emoji \
+ -p $(UNICODE_VERSION)/ucd/emoji
UNICODE_EMOJI_DOWNLOAD = \
- $(BASERUBY) $(srcdir)/tool/downloader.rb \
- --cache-dir=$(CACHE_DIR) \
- --unicode-beta $(UNICODE_BETA) \
+ $(UNICODE_DOWNLOADER) \
-d $(UNICODE_SRC_EMOJI_DATA_DIR) \
- -p emoji/$(UNICODE_EMOJI_VERSION) \
- -e $(ALWAYS_UPDATE_UNICODE:yes=-a) unicode
+ -p emoji/$(UNICODE_EMOJI_VERSION)
-$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES): update-unicode-files
-update-unicode-files:
- $(ECHO) Downloading Unicode $(UNICODE_VERSION) data and property files...
+update-unicode-files: $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
+$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES):
+ $(ECHO) Downloading Unicode $(UNICODE_VERSION) data and property files...
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)"
$(Q) $(UNICODE_DOWNLOAD) $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
-$(UNICODE_AUXILIARY_FILES): update-unicode-auxiliary-files
-update-unicode-auxiliary-files:
+update-unicode-auxiliary-files: $(UNICODE_AUXILIARY_FILES)
+$(UNICODE_AUXILIARY_FILES):
$(ECHO) Downloading Unicode $(UNICODE_VERSION) auxiliary files...
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/auxiliary"
$(Q) $(UNICODE_AUXILIARY_DOWNLOAD) $(UNICODE_AUXILIARY_FILES)
-$(UNICODE_EMOJI_FILES): update-unicode-emoji-files
-update-unicode-emoji-files:
+update-unicode-ucd-emoji-files: $(UNICODE_UCD_EMOJI_FILES)
+$(UNICODE_UCD_EMOJI_FILES):
+ $(ECHO) Downloading Unicode UCD emoji $(UNICODE_EMOJI_VERSION) files...
+ $(Q) $(MAKEDIRS) "$(UNICODE_SRC_DATA_DIR)/emoji"
+ $(Q) $(UNICODE_UCD_EMOJI_DOWNLOAD) $(UNICODE_UCD_EMOJI_FILES)
+
+update-unicode-emoji-files: $(UNICODE_EMOJI_FILES)
+$(UNICODE_EMOJI_FILES):
$(ECHO) Downloading Unicode emoji $(UNICODE_EMOJI_VERSION) files...
$(Q) $(MAKEDIRS) "$(UNICODE_SRC_EMOJI_DATA_DIR)"
$(Q) $(UNICODE_EMOJI_DOWNLOAD) $(UNICODE_EMOJI_FILES)
-$(srcdir)/lib/unicode_normalize/$(HAVE_BASERUBY:yes=tables.rb): \
- $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time
+$(srcdir)/lib/unicode_normalize/tables.rb: \
+ $(UNICODE_SRC_DATA_DIR)/$(HAVE_BASERUBY:yes=.unicode-tables.time)
$(UNICODE_SRC_DATA_DIR)/$(ALWAYS_UPDATE_UNICODE:yes=.unicode-tables.time): \
$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES) \
- $(UNICODE_AUXILIARY_FILES) $(UNICODE_EMOJI_FILES)
+ $(UNICODE_AUXILIARY_FILES) $(UNICODE_UCD_EMOJI_FILES) $(UNICODE_EMOJI_FILES)
touch-unicode-files:
$(MAKEDIRS) $(UNICODE_SRC_DATA_DIR)
- touch $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time $(UNICODE_DATA_HEADERS)
+ $(Q) $(TOUCH) $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time $(UNICODE_DATA_HEADERS)
+UNICODE_TABLES_DATA_FILES = \
+ $(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
+ $(UNICODE_SRC_DATA_DIR)/CompositionExclusions.txt \
+ $(empty)
+
+UNICODE_TABLES_DEPENDENTS_1 = none$(ALWAYS_UPDATE_UNICODE)
+UNICODE_TABLES_DEPENDENTS = $(UNICODE_TABLES_DEPENDENTS_1:noneyes=force)
UNICODE_TABLES_TIMESTAMP = yes
-$(UNICODE_SRC_DATA_DIR)/.unicode-tables.time: $(srcdir)/tool/generic_erb.rb \
+$(UNICODE_SRC_DATA_DIR)/.unicode-tables.$(UNICODE_TABLES_DEPENDENTS:none=time):
+ $(Q) $(MAKEDIRS) $(@D)
+ $(Q) exit > $(@) || $(NULLCMD)
+$(UNICODE_SRC_DATA_DIR)/.unicode-tables.$(UNICODE_TABLES_DEPENDENTS:force=time): \
+ $(tooldir)/generic_erb.rb \
$(srcdir)/template/unicode_norm_gen.tmpl \
- $(ALWAYS_UPDATE_UNICODE:yes=update-unicode)
- $(Q) $(MAKE) $(@D)
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb \
+ $(UNICODE_TABLES_DATA_FILES) \
+ $(order_only) \
+ $(UNICODE_SRC_DATA_DIR)
+ $(Q) $(BASERUBY) $(tooldir)/generic_erb.rb \
-c $(UNICODE_TABLES_TIMESTAMP:yes=-t$@) \
-o $(srcdir)/lib/unicode_normalize/tables.rb \
-I $(srcdir) \
@@ -1451,31 +1650,33 @@ $(UNICODE_SRC_DATA_DIR):
$(gnumake_recursive)$(Q) $(MAKEDIRS) $@
$(UNICODE_HDR_DIR)/$(ALWAYS_UPDATE_UNICODE:yes=name2ctype.h): \
- $(srcdir)/tool/enc-unicode.rb \
+ $(tooldir)/enc-unicode.rb \
$(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
+ $(UNICODE_AUXILIARY_FILES) \
$(UNICODE_PROPERTY_FILES) \
+ $(UNICODE_UCD_EMOJI_FILES) \
$(UNICODE_EMOJI_FILES)
$(UNICODE_HDR_DIR)/name2ctype.h:
$(MAKEDIRS) $(@D)
- $(BOOTSTRAPRUBY) $(srcdir)/tool/enc-unicode.rb --header \
+ $(BOOTSTRAPRUBY) $(tooldir)/enc-unicode.rb --header \
$(UNICODE_SRC_DATA_DIR) $(UNICODE_SRC_EMOJI_DATA_DIR) > $@.new
$(MV) $@.new $@
# the next non-comment line was:
-# $(UNICODE_HDR_DIR)/casefold.h: $(srcdir)/enc/unicode/case-folding.rb \
+# $(UNICODE_HDR_DIR)/casefold.h: $(tooldir)/enc-case-folding.rb \
# but was changed to make sure CI works on systems that don't have gperf
unicode-up: $(UNICODE_DATA_HEADERS)
$(UNICODE_HDR_DIR)/$(ALWAYS_UPDATE_UNICODE:yes=casefold.h): \
- $(srcdir)/enc/unicode/case-folding.rb \
+ $(tooldir)/enc-case-folding.rb \
$(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
$(UNICODE_SRC_DATA_DIR)/SpecialCasing.txt \
$(UNICODE_SRC_DATA_DIR)/CaseFolding.txt
$(UNICODE_HDR_DIR)/casefold.h:
$(MAKEDIRS) $(@D)
- $(Q) $(BASERUBY) $(srcdir)/enc/unicode/case-folding.rb \
+ $(Q) $(BASERUBY) $(tooldir)/enc-case-folding.rb \
--output-file=$@ \
--mapping-data-directory=$(UNICODE_SRC_DATA_DIR)
@@ -1516,11 +1717,18 @@ sudo-precheck: PHONY
@$(SUDO) echo > $(NULL)
update-man-date: PHONY
- -$(Q) $(BASERUBY) -I"$(srcdir)/tool/lib" -rvcs -i -p \
+ -$(Q) $(BASERUBY) -I"$(tooldir)/lib" -rvcs -i -p \
-e 'BEGIN{@vcs=VCS.detect(ARGV.shift)}' \
-e '$$_.sub!(/^(\.Dd ).*/){$$1+@vcs.modified(ARGF.path).strftime("%B %d, %Y")}' \
"$(srcdir)" "$(srcdir)"/man/*.1
+.PHONY: ChangeLog
+ChangeLog:
+ $(ECHO) Generating $@
+ -$(Q) $(BASERUBY) -I"$(tooldir)/lib" -rvcs \
+ -e 'VCS.detect(ARGV[0]).export_changelog("@", nil, nil, ARGV[1])' \
+ "$(srcdir)" $@
+
HELP_EXTRA_TASKS = ""
help: PHONY
@@ -1528,64 +1736,299 @@ help: PHONY
" Makefile of Ruby" \
"" \
"targets:" \
- " all (default): builds all of below" \
- " miniruby: builds only miniruby" \
- " encs: builds encodings" \
- " exts: builds extensions" \
- " main: builds encodings, extensions and ruby" \
- " docs: builds documents" \
- " install-capi: builds C API documents" \
- " run: runs test.rb by miniruby" \
- " runruby: runs test.rb by ruby you just built" \
- " gdb: runs test.rb by miniruby under gdb" \
- " gdb-ruby: runs test.rb by ruby under gdb" \
- " check: equals make test test-tool test-all test-spec" \
- " test: ruby core tests [BTESTS=<bootstraptest files>]" \
- " test-all: all ruby tests [TESTOPTS=-j4 TESTS=<test files>]" \
- " test-spec: run the Ruby spec suite [SPECOPTS=<specs, opts>]" \
- " test-bundler: run the Bundler spec" \
- " test-bundled-gems: run the test suite of bundled gems" \
- " test-tool: tests under the tool/test" \
- " update-gems: download files of the bundled gems" \
- " update-bundled_gems: update the latest version of bundled gems" \
- " sync-default-gems: sync default gems from upstream [GEM=<gem_name>]" \
- " up: update local copy and autogenerated files" \
- " benchmark: benchmark this ruby and COMPARE_RUBY." \
- " gcbench: gc benchmark [GCBENCH_ITEM=<item_name>]" \
- " install: install all ruby distributions" \
- " install-nodoc: install without rdoc" \
- " install-cross: install cross compiling stuff" \
- " clean: clean for tarball" \
- " distclean: clean for repository" \
- " golf: build goruby for golfers" \
+ " all (default): builds all of below" \
+ " miniruby: builds only miniruby" \
+ " encs: builds encodings" \
+ " exts: builds extensions" \
+ " main: builds encodings, extensions and ruby" \
+ " docs: builds documents" \
+ " install-capi: builds C API documents" \
+ " run: runs test.rb by miniruby" \
+ " runruby: runs test.rb by ruby you just built" \
+ " gdb: runs test.rb by miniruby under gdb" \
+ " gdb-ruby: runs test.rb by ruby under gdb" \
+ " check: equals make test test-tool test-all test-spec" \
+ " test: ruby core tests [BTESTS=<bootstraptest files>]" \
+ " test-all: all ruby tests [TESTOPTS=-j4 TESTS=<test files>]" \
+ " test-spec: run the Ruby spec suite [SPECOPTS=<specs, opts>]" \
+ " test-bundler: run the Bundler spec" \
+ " test-bundler-parallel: run the Bundler spec with parallel" \
+ " test-bundled-gems: run the test suite of bundled gems" \
+ " test-tool: tests under the tool/test" \
+ " update-gems: download files of the bundled gems" \
+ " update-bundled_gems: update the latest version of bundled gems" \
+ " sync-default-gems: sync default gems from upstream [GEM=<gem_name git_ref>]" \
+ " up: update local copy and autogenerated files" \
+ " benchmark: benchmark this ruby and COMPARE_RUBY." \
+ " gcbench: gc benchmark [GCBENCH_ITEM=<item_name>]" \
+ " install: install all ruby distributions" \
+ " install-nodoc: install without rdoc" \
+ " install-cross: install cross compiling stuff" \
+ " clean: clean for tarball" \
+ " distclean: clean for repository" \
+ " golf: build goruby for golfers" \
$(HELP_EXTRA_TASKS) \
"see DeveloperHowto for more detail: " \
" https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto" \
$(MESSAGE_END)
+$(CROSS_COMPILING:yes=)builtin.$(OBJEXT): {$(VPATH)}mini_builtin.c
+$(CROSS_COMPILING:yes=)builtin.$(OBJEXT): {$(VPATH)}miniprelude.c
+
# AUTOGENERATED DEPENDENCIES START
addr2line.$(OBJEXT): {$(VPATH)}addr2line.c
addr2line.$(OBJEXT): {$(VPATH)}addr2line.h
+addr2line.$(OBJEXT): {$(VPATH)}assert.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+addr2line.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
addr2line.$(OBJEXT): {$(VPATH)}config.h
addr2line.$(OBJEXT): {$(VPATH)}defines.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/assume.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/cast.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/config.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/dosish.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+addr2line.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
addr2line.$(OBJEXT): {$(VPATH)}missing.h
-array.$(OBJEXT): $(hdrdir)/ruby.h
array.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+array.$(OBJEXT): $(top_srcdir)/internal/array.h
+array.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+array.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+array.$(OBJEXT): $(top_srcdir)/internal/bits.h
+array.$(OBJEXT): $(top_srcdir)/internal/class.h
+array.$(OBJEXT): $(top_srcdir)/internal/compar.h
+array.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+array.$(OBJEXT): $(top_srcdir)/internal/enum.h
+array.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+array.$(OBJEXT): $(top_srcdir)/internal/gc.h
+array.$(OBJEXT): $(top_srcdir)/internal/hash.h
+array.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+array.$(OBJEXT): $(top_srcdir)/internal/object.h
+array.$(OBJEXT): $(top_srcdir)/internal/proc.h
+array.$(OBJEXT): $(top_srcdir)/internal/rational.h
+array.$(OBJEXT): $(top_srcdir)/internal/serial.h
+array.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+array.$(OBJEXT): $(top_srcdir)/internal/variable.h
+array.$(OBJEXT): $(top_srcdir)/internal/vm.h
+array.$(OBJEXT): $(top_srcdir)/internal/warnings.h
array.$(OBJEXT): {$(VPATH)}array.c
+array.$(OBJEXT): {$(VPATH)}array.rbinc
array.$(OBJEXT): {$(VPATH)}assert.h
+array.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+array.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+array.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+array.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+array.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+array.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+array.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+array.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+array.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+array.$(OBJEXT): {$(VPATH)}builtin.h
array.$(OBJEXT): {$(VPATH)}config.h
+array.$(OBJEXT): {$(VPATH)}constant.h
array.$(OBJEXT): {$(VPATH)}debug_counter.h
array.$(OBJEXT): {$(VPATH)}defines.h
array.$(OBJEXT): {$(VPATH)}encoding.h
array.$(OBJEXT): {$(VPATH)}id.h
+array.$(OBJEXT): {$(VPATH)}id_table.h
array.$(OBJEXT): {$(VPATH)}intern.h
array.$(OBJEXT): {$(VPATH)}internal.h
+array.$(OBJEXT): {$(VPATH)}internal/abi.h
+array.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+array.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+array.$(OBJEXT): {$(VPATH)}internal/assume.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+array.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+array.$(OBJEXT): {$(VPATH)}internal/cast.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+array.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+array.$(OBJEXT): {$(VPATH)}internal/config.h
+array.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+array.$(OBJEXT): {$(VPATH)}internal/core.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+array.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+array.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+array.$(OBJEXT): {$(VPATH)}internal/ctype.h
+array.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+array.$(OBJEXT): {$(VPATH)}internal/dosish.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+array.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+array.$(OBJEXT): {$(VPATH)}internal/error.h
+array.$(OBJEXT): {$(VPATH)}internal/eval.h
+array.$(OBJEXT): {$(VPATH)}internal/event.h
+array.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+array.$(OBJEXT): {$(VPATH)}internal/gc.h
+array.$(OBJEXT): {$(VPATH)}internal/glob.h
+array.$(OBJEXT): {$(VPATH)}internal/globals.h
+array.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+array.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+array.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+array.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+array.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+array.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+array.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+array.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+array.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+array.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+array.$(OBJEXT): {$(VPATH)}internal/iterator.h
+array.$(OBJEXT): {$(VPATH)}internal/memory.h
+array.$(OBJEXT): {$(VPATH)}internal/method.h
+array.$(OBJEXT): {$(VPATH)}internal/module.h
+array.$(OBJEXT): {$(VPATH)}internal/newobj.h
+array.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+array.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+array.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+array.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+array.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+array.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+array.$(OBJEXT): {$(VPATH)}internal/symbol.h
+array.$(OBJEXT): {$(VPATH)}internal/value.h
+array.$(OBJEXT): {$(VPATH)}internal/value_type.h
+array.$(OBJEXT): {$(VPATH)}internal/variable.h
+array.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+array.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
array.$(OBJEXT): {$(VPATH)}missing.h
array.$(OBJEXT): {$(VPATH)}onigmo.h
array.$(OBJEXT): {$(VPATH)}oniguruma.h
array.$(OBJEXT): {$(VPATH)}probes.dmyh
array.$(OBJEXT): {$(VPATH)}probes.h
array.$(OBJEXT): {$(VPATH)}ruby_assert.h
+array.$(OBJEXT): {$(VPATH)}shape.h
array.$(OBJEXT): {$(VPATH)}st.h
array.$(OBJEXT): {$(VPATH)}subst.h
array.$(OBJEXT): {$(VPATH)}transient_heap.h
@@ -1596,16 +2039,189 @@ ast.$(OBJEXT): $(CCAN_DIR)/list/list.h
ast.$(OBJEXT): $(CCAN_DIR)/str/str.h
ast.$(OBJEXT): $(hdrdir)/ruby.h
ast.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+ast.$(OBJEXT): $(top_srcdir)/internal/array.h
+ast.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+ast.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+ast.$(OBJEXT): $(top_srcdir)/internal/gc.h
+ast.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+ast.$(OBJEXT): $(top_srcdir)/internal/parse.h
+ast.$(OBJEXT): $(top_srcdir)/internal/serial.h
+ast.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+ast.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+ast.$(OBJEXT): $(top_srcdir)/internal/variable.h
+ast.$(OBJEXT): $(top_srcdir)/internal/vm.h
+ast.$(OBJEXT): $(top_srcdir)/internal/warnings.h
ast.$(OBJEXT): {$(VPATH)}assert.h
ast.$(OBJEXT): {$(VPATH)}ast.c
ast.$(OBJEXT): {$(VPATH)}ast.rbinc
+ast.$(OBJEXT): {$(VPATH)}atomic.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+ast.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
ast.$(OBJEXT): {$(VPATH)}builtin.h
ast.$(OBJEXT): {$(VPATH)}config.h
+ast.$(OBJEXT): {$(VPATH)}constant.h
ast.$(OBJEXT): {$(VPATH)}defines.h
ast.$(OBJEXT): {$(VPATH)}encoding.h
ast.$(OBJEXT): {$(VPATH)}id.h
+ast.$(OBJEXT): {$(VPATH)}id_table.h
ast.$(OBJEXT): {$(VPATH)}intern.h
ast.$(OBJEXT): {$(VPATH)}internal.h
+ast.$(OBJEXT): {$(VPATH)}internal/abi.h
+ast.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+ast.$(OBJEXT): {$(VPATH)}internal/assume.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+ast.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+ast.$(OBJEXT): {$(VPATH)}internal/cast.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+ast.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+ast.$(OBJEXT): {$(VPATH)}internal/config.h
+ast.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+ast.$(OBJEXT): {$(VPATH)}internal/core.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+ast.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+ast.$(OBJEXT): {$(VPATH)}internal/ctype.h
+ast.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+ast.$(OBJEXT): {$(VPATH)}internal/dosish.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+ast.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+ast.$(OBJEXT): {$(VPATH)}internal/error.h
+ast.$(OBJEXT): {$(VPATH)}internal/eval.h
+ast.$(OBJEXT): {$(VPATH)}internal/event.h
+ast.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+ast.$(OBJEXT): {$(VPATH)}internal/gc.h
+ast.$(OBJEXT): {$(VPATH)}internal/glob.h
+ast.$(OBJEXT): {$(VPATH)}internal/globals.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+ast.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+ast.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+ast.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+ast.$(OBJEXT): {$(VPATH)}internal/iterator.h
+ast.$(OBJEXT): {$(VPATH)}internal/memory.h
+ast.$(OBJEXT): {$(VPATH)}internal/method.h
+ast.$(OBJEXT): {$(VPATH)}internal/module.h
+ast.$(OBJEXT): {$(VPATH)}internal/newobj.h
+ast.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+ast.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+ast.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+ast.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+ast.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+ast.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+ast.$(OBJEXT): {$(VPATH)}internal/symbol.h
+ast.$(OBJEXT): {$(VPATH)}internal/value.h
+ast.$(OBJEXT): {$(VPATH)}internal/value_type.h
+ast.$(OBJEXT): {$(VPATH)}internal/variable.h
+ast.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+ast.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
ast.$(OBJEXT): {$(VPATH)}iseq.h
ast.$(OBJEXT): {$(VPATH)}method.h
ast.$(OBJEXT): {$(VPATH)}missing.h
@@ -1614,6 +2230,7 @@ ast.$(OBJEXT): {$(VPATH)}onigmo.h
ast.$(OBJEXT): {$(VPATH)}oniguruma.h
ast.$(OBJEXT): {$(VPATH)}ruby_assert.h
ast.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+ast.$(OBJEXT): {$(VPATH)}shape.h
ast.$(OBJEXT): {$(VPATH)}st.h
ast.$(OBJEXT): {$(VPATH)}subst.h
ast.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -1621,17 +2238,183 @@ ast.$(OBJEXT): {$(VPATH)}thread_native.h
ast.$(OBJEXT): {$(VPATH)}util.h
ast.$(OBJEXT): {$(VPATH)}vm_core.h
ast.$(OBJEXT): {$(VPATH)}vm_opts.h
-bignum.$(OBJEXT): $(hdrdir)/ruby.h
bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/bits.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/class.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/complex.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/gc.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/object.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/serial.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/variable.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/vm.h
+bignum.$(OBJEXT): $(top_srcdir)/internal/warnings.h
bignum.$(OBJEXT): {$(VPATH)}assert.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+bignum.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
bignum.$(OBJEXT): {$(VPATH)}bignum.c
bignum.$(OBJEXT): {$(VPATH)}config.h
+bignum.$(OBJEXT): {$(VPATH)}constant.h
bignum.$(OBJEXT): {$(VPATH)}defines.h
bignum.$(OBJEXT): {$(VPATH)}id.h
+bignum.$(OBJEXT): {$(VPATH)}id_table.h
bignum.$(OBJEXT): {$(VPATH)}intern.h
bignum.$(OBJEXT): {$(VPATH)}internal.h
+bignum.$(OBJEXT): {$(VPATH)}internal/abi.h
+bignum.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+bignum.$(OBJEXT): {$(VPATH)}internal/assume.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+bignum.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+bignum.$(OBJEXT): {$(VPATH)}internal/cast.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+bignum.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+bignum.$(OBJEXT): {$(VPATH)}internal/config.h
+bignum.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+bignum.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+bignum.$(OBJEXT): {$(VPATH)}internal/ctype.h
+bignum.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+bignum.$(OBJEXT): {$(VPATH)}internal/dosish.h
+bignum.$(OBJEXT): {$(VPATH)}internal/error.h
+bignum.$(OBJEXT): {$(VPATH)}internal/eval.h
+bignum.$(OBJEXT): {$(VPATH)}internal/event.h
+bignum.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+bignum.$(OBJEXT): {$(VPATH)}internal/gc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/glob.h
+bignum.$(OBJEXT): {$(VPATH)}internal/globals.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+bignum.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+bignum.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+bignum.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+bignum.$(OBJEXT): {$(VPATH)}internal/iterator.h
+bignum.$(OBJEXT): {$(VPATH)}internal/memory.h
+bignum.$(OBJEXT): {$(VPATH)}internal/method.h
+bignum.$(OBJEXT): {$(VPATH)}internal/module.h
+bignum.$(OBJEXT): {$(VPATH)}internal/newobj.h
+bignum.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+bignum.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+bignum.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+bignum.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+bignum.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+bignum.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+bignum.$(OBJEXT): {$(VPATH)}internal/symbol.h
+bignum.$(OBJEXT): {$(VPATH)}internal/value.h
+bignum.$(OBJEXT): {$(VPATH)}internal/value_type.h
+bignum.$(OBJEXT): {$(VPATH)}internal/variable.h
+bignum.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+bignum.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
bignum.$(OBJEXT): {$(VPATH)}missing.h
bignum.$(OBJEXT): {$(VPATH)}ruby_assert.h
+bignum.$(OBJEXT): {$(VPATH)}shape.h
bignum.$(OBJEXT): {$(VPATH)}st.h
bignum.$(OBJEXT): {$(VPATH)}subst.h
bignum.$(OBJEXT): {$(VPATH)}thread.h
@@ -1640,23 +2423,185 @@ builtin.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
builtin.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
builtin.$(OBJEXT): $(CCAN_DIR)/list/list.h
builtin.$(OBJEXT): $(CCAN_DIR)/str/str.h
-builtin.$(OBJEXT): $(hdrdir)/ruby.h
builtin.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/array.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/gc.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/serial.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/variable.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/vm.h
+builtin.$(OBJEXT): $(top_srcdir)/internal/warnings.h
builtin.$(OBJEXT): {$(VPATH)}assert.h
+builtin.$(OBJEXT): {$(VPATH)}atomic.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+builtin.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
builtin.$(OBJEXT): {$(VPATH)}builtin.c
builtin.$(OBJEXT): {$(VPATH)}builtin.h
builtin.$(OBJEXT): {$(VPATH)}builtin_binary.inc
builtin.$(OBJEXT): {$(VPATH)}config.h
+builtin.$(OBJEXT): {$(VPATH)}constant.h
builtin.$(OBJEXT): {$(VPATH)}defines.h
builtin.$(OBJEXT): {$(VPATH)}id.h
+builtin.$(OBJEXT): {$(VPATH)}id_table.h
builtin.$(OBJEXT): {$(VPATH)}intern.h
builtin.$(OBJEXT): {$(VPATH)}internal.h
+builtin.$(OBJEXT): {$(VPATH)}internal/abi.h
+builtin.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+builtin.$(OBJEXT): {$(VPATH)}internal/assume.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+builtin.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+builtin.$(OBJEXT): {$(VPATH)}internal/cast.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+builtin.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+builtin.$(OBJEXT): {$(VPATH)}internal/config.h
+builtin.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+builtin.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+builtin.$(OBJEXT): {$(VPATH)}internal/ctype.h
+builtin.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+builtin.$(OBJEXT): {$(VPATH)}internal/dosish.h
+builtin.$(OBJEXT): {$(VPATH)}internal/error.h
+builtin.$(OBJEXT): {$(VPATH)}internal/eval.h
+builtin.$(OBJEXT): {$(VPATH)}internal/event.h
+builtin.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+builtin.$(OBJEXT): {$(VPATH)}internal/gc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/glob.h
+builtin.$(OBJEXT): {$(VPATH)}internal/globals.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+builtin.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+builtin.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+builtin.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+builtin.$(OBJEXT): {$(VPATH)}internal/iterator.h
+builtin.$(OBJEXT): {$(VPATH)}internal/memory.h
+builtin.$(OBJEXT): {$(VPATH)}internal/method.h
+builtin.$(OBJEXT): {$(VPATH)}internal/module.h
+builtin.$(OBJEXT): {$(VPATH)}internal/newobj.h
+builtin.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+builtin.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+builtin.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+builtin.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+builtin.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+builtin.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+builtin.$(OBJEXT): {$(VPATH)}internal/symbol.h
+builtin.$(OBJEXT): {$(VPATH)}internal/value.h
+builtin.$(OBJEXT): {$(VPATH)}internal/value_type.h
+builtin.$(OBJEXT): {$(VPATH)}internal/variable.h
+builtin.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+builtin.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
builtin.$(OBJEXT): {$(VPATH)}iseq.h
builtin.$(OBJEXT): {$(VPATH)}method.h
builtin.$(OBJEXT): {$(VPATH)}missing.h
builtin.$(OBJEXT): {$(VPATH)}node.h
builtin.$(OBJEXT): {$(VPATH)}ruby_assert.h
builtin.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+builtin.$(OBJEXT): {$(VPATH)}shape.h
builtin.$(OBJEXT): {$(VPATH)}st.h
builtin.$(OBJEXT): {$(VPATH)}subst.h
builtin.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -1667,50 +2612,433 @@ class.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
class.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
class.$(OBJEXT): $(CCAN_DIR)/list/list.h
class.$(OBJEXT): $(CCAN_DIR)/str/str.h
-class.$(OBJEXT): $(hdrdir)/ruby.h
class.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+class.$(OBJEXT): $(top_srcdir)/internal/array.h
+class.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+class.$(OBJEXT): $(top_srcdir)/internal/class.h
+class.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+class.$(OBJEXT): $(top_srcdir)/internal/eval.h
+class.$(OBJEXT): $(top_srcdir)/internal/gc.h
+class.$(OBJEXT): $(top_srcdir)/internal/hash.h
+class.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+class.$(OBJEXT): $(top_srcdir)/internal/object.h
+class.$(OBJEXT): $(top_srcdir)/internal/serial.h
+class.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+class.$(OBJEXT): $(top_srcdir)/internal/string.h
+class.$(OBJEXT): $(top_srcdir)/internal/variable.h
+class.$(OBJEXT): $(top_srcdir)/internal/vm.h
+class.$(OBJEXT): $(top_srcdir)/internal/warnings.h
class.$(OBJEXT): {$(VPATH)}assert.h
+class.$(OBJEXT): {$(VPATH)}atomic.h
+class.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+class.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+class.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+class.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+class.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+class.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+class.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+class.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+class.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
class.$(OBJEXT): {$(VPATH)}class.c
class.$(OBJEXT): {$(VPATH)}config.h
class.$(OBJEXT): {$(VPATH)}constant.h
+class.$(OBJEXT): {$(VPATH)}debug_counter.h
class.$(OBJEXT): {$(VPATH)}defines.h
+class.$(OBJEXT): {$(VPATH)}encoding.h
class.$(OBJEXT): {$(VPATH)}id.h
class.$(OBJEXT): {$(VPATH)}id_table.h
class.$(OBJEXT): {$(VPATH)}intern.h
class.$(OBJEXT): {$(VPATH)}internal.h
+class.$(OBJEXT): {$(VPATH)}internal/abi.h
+class.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+class.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+class.$(OBJEXT): {$(VPATH)}internal/assume.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+class.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+class.$(OBJEXT): {$(VPATH)}internal/cast.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+class.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+class.$(OBJEXT): {$(VPATH)}internal/config.h
+class.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+class.$(OBJEXT): {$(VPATH)}internal/core.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+class.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+class.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+class.$(OBJEXT): {$(VPATH)}internal/ctype.h
+class.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+class.$(OBJEXT): {$(VPATH)}internal/dosish.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+class.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+class.$(OBJEXT): {$(VPATH)}internal/error.h
+class.$(OBJEXT): {$(VPATH)}internal/eval.h
+class.$(OBJEXT): {$(VPATH)}internal/event.h
+class.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+class.$(OBJEXT): {$(VPATH)}internal/gc.h
+class.$(OBJEXT): {$(VPATH)}internal/glob.h
+class.$(OBJEXT): {$(VPATH)}internal/globals.h
+class.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+class.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+class.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+class.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+class.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+class.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+class.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+class.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+class.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+class.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+class.$(OBJEXT): {$(VPATH)}internal/iterator.h
+class.$(OBJEXT): {$(VPATH)}internal/memory.h
+class.$(OBJEXT): {$(VPATH)}internal/method.h
+class.$(OBJEXT): {$(VPATH)}internal/module.h
+class.$(OBJEXT): {$(VPATH)}internal/newobj.h
+class.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+class.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+class.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+class.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+class.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+class.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+class.$(OBJEXT): {$(VPATH)}internal/symbol.h
+class.$(OBJEXT): {$(VPATH)}internal/value.h
+class.$(OBJEXT): {$(VPATH)}internal/value_type.h
+class.$(OBJEXT): {$(VPATH)}internal/variable.h
+class.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+class.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
class.$(OBJEXT): {$(VPATH)}method.h
class.$(OBJEXT): {$(VPATH)}missing.h
class.$(OBJEXT): {$(VPATH)}node.h
+class.$(OBJEXT): {$(VPATH)}onigmo.h
+class.$(OBJEXT): {$(VPATH)}oniguruma.h
class.$(OBJEXT): {$(VPATH)}ruby_assert.h
class.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+class.$(OBJEXT): {$(VPATH)}shape.h
class.$(OBJEXT): {$(VPATH)}st.h
class.$(OBJEXT): {$(VPATH)}subst.h
class.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
class.$(OBJEXT): {$(VPATH)}thread_native.h
class.$(OBJEXT): {$(VPATH)}vm_core.h
class.$(OBJEXT): {$(VPATH)}vm_opts.h
-compar.$(OBJEXT): $(hdrdir)/ruby.h
compar.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+compar.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+compar.$(OBJEXT): $(top_srcdir)/internal/compar.h
+compar.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+compar.$(OBJEXT): $(top_srcdir)/internal/error.h
+compar.$(OBJEXT): $(top_srcdir)/internal/serial.h
+compar.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+compar.$(OBJEXT): $(top_srcdir)/internal/string.h
+compar.$(OBJEXT): $(top_srcdir)/internal/vm.h
compar.$(OBJEXT): {$(VPATH)}assert.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+compar.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
compar.$(OBJEXT): {$(VPATH)}compar.c
compar.$(OBJEXT): {$(VPATH)}config.h
compar.$(OBJEXT): {$(VPATH)}defines.h
+compar.$(OBJEXT): {$(VPATH)}encoding.h
compar.$(OBJEXT): {$(VPATH)}id.h
compar.$(OBJEXT): {$(VPATH)}intern.h
compar.$(OBJEXT): {$(VPATH)}internal.h
+compar.$(OBJEXT): {$(VPATH)}internal/abi.h
+compar.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+compar.$(OBJEXT): {$(VPATH)}internal/assume.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+compar.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+compar.$(OBJEXT): {$(VPATH)}internal/cast.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+compar.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+compar.$(OBJEXT): {$(VPATH)}internal/config.h
+compar.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+compar.$(OBJEXT): {$(VPATH)}internal/core.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+compar.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+compar.$(OBJEXT): {$(VPATH)}internal/ctype.h
+compar.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+compar.$(OBJEXT): {$(VPATH)}internal/dosish.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+compar.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+compar.$(OBJEXT): {$(VPATH)}internal/error.h
+compar.$(OBJEXT): {$(VPATH)}internal/eval.h
+compar.$(OBJEXT): {$(VPATH)}internal/event.h
+compar.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+compar.$(OBJEXT): {$(VPATH)}internal/gc.h
+compar.$(OBJEXT): {$(VPATH)}internal/glob.h
+compar.$(OBJEXT): {$(VPATH)}internal/globals.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+compar.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+compar.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+compar.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+compar.$(OBJEXT): {$(VPATH)}internal/iterator.h
+compar.$(OBJEXT): {$(VPATH)}internal/memory.h
+compar.$(OBJEXT): {$(VPATH)}internal/method.h
+compar.$(OBJEXT): {$(VPATH)}internal/module.h
+compar.$(OBJEXT): {$(VPATH)}internal/newobj.h
+compar.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+compar.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+compar.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+compar.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+compar.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+compar.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+compar.$(OBJEXT): {$(VPATH)}internal/symbol.h
+compar.$(OBJEXT): {$(VPATH)}internal/value.h
+compar.$(OBJEXT): {$(VPATH)}internal/value_type.h
+compar.$(OBJEXT): {$(VPATH)}internal/variable.h
+compar.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+compar.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
compar.$(OBJEXT): {$(VPATH)}missing.h
+compar.$(OBJEXT): {$(VPATH)}onigmo.h
+compar.$(OBJEXT): {$(VPATH)}oniguruma.h
compar.$(OBJEXT): {$(VPATH)}st.h
compar.$(OBJEXT): {$(VPATH)}subst.h
compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
compile.$(OBJEXT): $(CCAN_DIR)/list/list.h
compile.$(OBJEXT): $(CCAN_DIR)/str/str.h
-compile.$(OBJEXT): $(hdrdir)/ruby.h
compile.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+compile.$(OBJEXT): $(top_srcdir)/internal/array.h
+compile.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+compile.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+compile.$(OBJEXT): $(top_srcdir)/internal/bits.h
+compile.$(OBJEXT): $(top_srcdir)/internal/class.h
+compile.$(OBJEXT): $(top_srcdir)/internal/compile.h
+compile.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+compile.$(OBJEXT): $(top_srcdir)/internal/complex.h
+compile.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+compile.$(OBJEXT): $(top_srcdir)/internal/error.h
+compile.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+compile.$(OBJEXT): $(top_srcdir)/internal/gc.h
+compile.$(OBJEXT): $(top_srcdir)/internal/hash.h
+compile.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+compile.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+compile.$(OBJEXT): $(top_srcdir)/internal/object.h
+compile.$(OBJEXT): $(top_srcdir)/internal/rational.h
+compile.$(OBJEXT): $(top_srcdir)/internal/re.h
+compile.$(OBJEXT): $(top_srcdir)/internal/serial.h
+compile.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+compile.$(OBJEXT): $(top_srcdir)/internal/string.h
+compile.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+compile.$(OBJEXT): $(top_srcdir)/internal/thread.h
+compile.$(OBJEXT): $(top_srcdir)/internal/variable.h
+compile.$(OBJEXT): $(top_srcdir)/internal/vm.h
+compile.$(OBJEXT): $(top_srcdir)/internal/warnings.h
compile.$(OBJEXT): {$(VPATH)}assert.h
+compile.$(OBJEXT): {$(VPATH)}atomic.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+compile.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
compile.$(OBJEXT): {$(VPATH)}builtin.h
compile.$(OBJEXT): {$(VPATH)}compile.c
compile.$(OBJEXT): {$(VPATH)}config.h
+compile.$(OBJEXT): {$(VPATH)}constant.h
+compile.$(OBJEXT): {$(VPATH)}debug_counter.h
compile.$(OBJEXT): {$(VPATH)}defines.h
compile.$(OBJEXT): {$(VPATH)}encindex.h
compile.$(OBJEXT): {$(VPATH)}encoding.h
@@ -1722,176 +3050,1958 @@ compile.$(OBJEXT): {$(VPATH)}insns.inc
compile.$(OBJEXT): {$(VPATH)}insns_info.inc
compile.$(OBJEXT): {$(VPATH)}intern.h
compile.$(OBJEXT): {$(VPATH)}internal.h
+compile.$(OBJEXT): {$(VPATH)}internal/abi.h
+compile.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+compile.$(OBJEXT): {$(VPATH)}internal/assume.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+compile.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+compile.$(OBJEXT): {$(VPATH)}internal/cast.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+compile.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+compile.$(OBJEXT): {$(VPATH)}internal/config.h
+compile.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+compile.$(OBJEXT): {$(VPATH)}internal/core.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rmatch.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+compile.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+compile.$(OBJEXT): {$(VPATH)}internal/ctype.h
+compile.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+compile.$(OBJEXT): {$(VPATH)}internal/dosish.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+compile.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+compile.$(OBJEXT): {$(VPATH)}internal/error.h
+compile.$(OBJEXT): {$(VPATH)}internal/eval.h
+compile.$(OBJEXT): {$(VPATH)}internal/event.h
+compile.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+compile.$(OBJEXT): {$(VPATH)}internal/gc.h
+compile.$(OBJEXT): {$(VPATH)}internal/glob.h
+compile.$(OBJEXT): {$(VPATH)}internal/globals.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+compile.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+compile.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+compile.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+compile.$(OBJEXT): {$(VPATH)}internal/iterator.h
+compile.$(OBJEXT): {$(VPATH)}internal/memory.h
+compile.$(OBJEXT): {$(VPATH)}internal/method.h
+compile.$(OBJEXT): {$(VPATH)}internal/module.h
+compile.$(OBJEXT): {$(VPATH)}internal/newobj.h
+compile.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+compile.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+compile.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+compile.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+compile.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+compile.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+compile.$(OBJEXT): {$(VPATH)}internal/symbol.h
+compile.$(OBJEXT): {$(VPATH)}internal/value.h
+compile.$(OBJEXT): {$(VPATH)}internal/value_type.h
+compile.$(OBJEXT): {$(VPATH)}internal/variable.h
+compile.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+compile.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
compile.$(OBJEXT): {$(VPATH)}iseq.h
compile.$(OBJEXT): {$(VPATH)}method.h
compile.$(OBJEXT): {$(VPATH)}missing.h
compile.$(OBJEXT): {$(VPATH)}node.h
compile.$(OBJEXT): {$(VPATH)}onigmo.h
compile.$(OBJEXT): {$(VPATH)}oniguruma.h
-compile.$(OBJEXT): {$(VPATH)}opt_sc.inc
compile.$(OBJEXT): {$(VPATH)}optinsn.inc
-compile.$(OBJEXT): {$(VPATH)}optunifs.inc
compile.$(OBJEXT): {$(VPATH)}re.h
compile.$(OBJEXT): {$(VPATH)}regex.h
compile.$(OBJEXT): {$(VPATH)}ruby_assert.h
compile.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+compile.$(OBJEXT): {$(VPATH)}shape.h
compile.$(OBJEXT): {$(VPATH)}st.h
compile.$(OBJEXT): {$(VPATH)}subst.h
compile.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
compile.$(OBJEXT): {$(VPATH)}thread_native.h
compile.$(OBJEXT): {$(VPATH)}util.h
+compile.$(OBJEXT): {$(VPATH)}vm_callinfo.h
compile.$(OBJEXT): {$(VPATH)}vm_core.h
compile.$(OBJEXT): {$(VPATH)}vm_debug.h
compile.$(OBJEXT): {$(VPATH)}vm_opts.h
-complex.$(OBJEXT): $(hdrdir)/ruby.h
+complex.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+complex.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+complex.$(OBJEXT): $(CCAN_DIR)/list/list.h
+complex.$(OBJEXT): $(CCAN_DIR)/str/str.h
complex.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+complex.$(OBJEXT): $(top_srcdir)/internal/array.h
+complex.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+complex.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+complex.$(OBJEXT): $(top_srcdir)/internal/bits.h
+complex.$(OBJEXT): $(top_srcdir)/internal/class.h
+complex.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+complex.$(OBJEXT): $(top_srcdir)/internal/complex.h
+complex.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+complex.$(OBJEXT): $(top_srcdir)/internal/gc.h
+complex.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+complex.$(OBJEXT): $(top_srcdir)/internal/math.h
+complex.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+complex.$(OBJEXT): $(top_srcdir)/internal/object.h
+complex.$(OBJEXT): $(top_srcdir)/internal/rational.h
+complex.$(OBJEXT): $(top_srcdir)/internal/serial.h
+complex.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+complex.$(OBJEXT): $(top_srcdir)/internal/variable.h
+complex.$(OBJEXT): $(top_srcdir)/internal/vm.h
+complex.$(OBJEXT): $(top_srcdir)/internal/warnings.h
complex.$(OBJEXT): {$(VPATH)}assert.h
+complex.$(OBJEXT): {$(VPATH)}atomic.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+complex.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
complex.$(OBJEXT): {$(VPATH)}complex.c
complex.$(OBJEXT): {$(VPATH)}config.h
+complex.$(OBJEXT): {$(VPATH)}constant.h
complex.$(OBJEXT): {$(VPATH)}defines.h
complex.$(OBJEXT): {$(VPATH)}id.h
+complex.$(OBJEXT): {$(VPATH)}id_table.h
complex.$(OBJEXT): {$(VPATH)}intern.h
complex.$(OBJEXT): {$(VPATH)}internal.h
+complex.$(OBJEXT): {$(VPATH)}internal/abi.h
+complex.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+complex.$(OBJEXT): {$(VPATH)}internal/assume.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+complex.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+complex.$(OBJEXT): {$(VPATH)}internal/cast.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+complex.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+complex.$(OBJEXT): {$(VPATH)}internal/config.h
+complex.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+complex.$(OBJEXT): {$(VPATH)}internal/core.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+complex.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+complex.$(OBJEXT): {$(VPATH)}internal/ctype.h
+complex.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+complex.$(OBJEXT): {$(VPATH)}internal/dosish.h
+complex.$(OBJEXT): {$(VPATH)}internal/error.h
+complex.$(OBJEXT): {$(VPATH)}internal/eval.h
+complex.$(OBJEXT): {$(VPATH)}internal/event.h
+complex.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+complex.$(OBJEXT): {$(VPATH)}internal/gc.h
+complex.$(OBJEXT): {$(VPATH)}internal/glob.h
+complex.$(OBJEXT): {$(VPATH)}internal/globals.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+complex.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+complex.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+complex.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+complex.$(OBJEXT): {$(VPATH)}internal/iterator.h
+complex.$(OBJEXT): {$(VPATH)}internal/memory.h
+complex.$(OBJEXT): {$(VPATH)}internal/method.h
+complex.$(OBJEXT): {$(VPATH)}internal/module.h
+complex.$(OBJEXT): {$(VPATH)}internal/newobj.h
+complex.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+complex.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+complex.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+complex.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+complex.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+complex.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+complex.$(OBJEXT): {$(VPATH)}internal/symbol.h
+complex.$(OBJEXT): {$(VPATH)}internal/value.h
+complex.$(OBJEXT): {$(VPATH)}internal/value_type.h
+complex.$(OBJEXT): {$(VPATH)}internal/variable.h
+complex.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+complex.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+complex.$(OBJEXT): {$(VPATH)}method.h
complex.$(OBJEXT): {$(VPATH)}missing.h
+complex.$(OBJEXT): {$(VPATH)}node.h
complex.$(OBJEXT): {$(VPATH)}ruby_assert.h
+complex.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+complex.$(OBJEXT): {$(VPATH)}shape.h
complex.$(OBJEXT): {$(VPATH)}st.h
complex.$(OBJEXT): {$(VPATH)}subst.h
+complex.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+complex.$(OBJEXT): {$(VPATH)}thread_native.h
+complex.$(OBJEXT): {$(VPATH)}vm_core.h
+complex.$(OBJEXT): {$(VPATH)}vm_opts.h
cont.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
cont.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
cont.$(OBJEXT): $(CCAN_DIR)/list/list.h
cont.$(OBJEXT): $(CCAN_DIR)/str/str.h
cont.$(OBJEXT): $(hdrdir)/ruby.h
cont.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+cont.$(OBJEXT): $(top_srcdir)/internal/array.h
+cont.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+cont.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+cont.$(OBJEXT): $(top_srcdir)/internal/cont.h
+cont.$(OBJEXT): $(top_srcdir)/internal/error.h
+cont.$(OBJEXT): $(top_srcdir)/internal/gc.h
+cont.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+cont.$(OBJEXT): $(top_srcdir)/internal/proc.h
+cont.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+cont.$(OBJEXT): $(top_srcdir)/internal/serial.h
+cont.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+cont.$(OBJEXT): $(top_srcdir)/internal/string.h
+cont.$(OBJEXT): $(top_srcdir)/internal/variable.h
+cont.$(OBJEXT): $(top_srcdir)/internal/vm.h
+cont.$(OBJEXT): $(top_srcdir)/internal/warnings.h
cont.$(OBJEXT): {$(VPATH)}$(COROUTINE_H)
cont.$(OBJEXT): {$(VPATH)}assert.h
+cont.$(OBJEXT): {$(VPATH)}atomic.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+cont.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
cont.$(OBJEXT): {$(VPATH)}config.h
+cont.$(OBJEXT): {$(VPATH)}constant.h
cont.$(OBJEXT): {$(VPATH)}cont.c
cont.$(OBJEXT): {$(VPATH)}debug_counter.h
cont.$(OBJEXT): {$(VPATH)}defines.h
+cont.$(OBJEXT): {$(VPATH)}encoding.h
cont.$(OBJEXT): {$(VPATH)}eval_intern.h
+cont.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
cont.$(OBJEXT): {$(VPATH)}gc.h
cont.$(OBJEXT): {$(VPATH)}id.h
+cont.$(OBJEXT): {$(VPATH)}id_table.h
cont.$(OBJEXT): {$(VPATH)}intern.h
cont.$(OBJEXT): {$(VPATH)}internal.h
+cont.$(OBJEXT): {$(VPATH)}internal/abi.h
+cont.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+cont.$(OBJEXT): {$(VPATH)}internal/assume.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+cont.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+cont.$(OBJEXT): {$(VPATH)}internal/cast.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+cont.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+cont.$(OBJEXT): {$(VPATH)}internal/config.h
+cont.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+cont.$(OBJEXT): {$(VPATH)}internal/core.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+cont.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+cont.$(OBJEXT): {$(VPATH)}internal/ctype.h
+cont.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+cont.$(OBJEXT): {$(VPATH)}internal/dosish.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+cont.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+cont.$(OBJEXT): {$(VPATH)}internal/error.h
+cont.$(OBJEXT): {$(VPATH)}internal/eval.h
+cont.$(OBJEXT): {$(VPATH)}internal/event.h
+cont.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+cont.$(OBJEXT): {$(VPATH)}internal/gc.h
+cont.$(OBJEXT): {$(VPATH)}internal/glob.h
+cont.$(OBJEXT): {$(VPATH)}internal/globals.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+cont.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+cont.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+cont.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+cont.$(OBJEXT): {$(VPATH)}internal/iterator.h
+cont.$(OBJEXT): {$(VPATH)}internal/memory.h
+cont.$(OBJEXT): {$(VPATH)}internal/method.h
+cont.$(OBJEXT): {$(VPATH)}internal/module.h
+cont.$(OBJEXT): {$(VPATH)}internal/newobj.h
+cont.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+cont.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+cont.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+cont.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+cont.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+cont.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+cont.$(OBJEXT): {$(VPATH)}internal/symbol.h
+cont.$(OBJEXT): {$(VPATH)}internal/value.h
+cont.$(OBJEXT): {$(VPATH)}internal/value_type.h
+cont.$(OBJEXT): {$(VPATH)}internal/variable.h
+cont.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+cont.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+cont.$(OBJEXT): {$(VPATH)}iseq.h
cont.$(OBJEXT): {$(VPATH)}method.h
cont.$(OBJEXT): {$(VPATH)}missing.h
cont.$(OBJEXT): {$(VPATH)}mjit.h
cont.$(OBJEXT): {$(VPATH)}node.h
+cont.$(OBJEXT): {$(VPATH)}onigmo.h
+cont.$(OBJEXT): {$(VPATH)}oniguruma.h
+cont.$(OBJEXT): {$(VPATH)}ractor.h
+cont.$(OBJEXT): {$(VPATH)}ractor_core.h
cont.$(OBJEXT): {$(VPATH)}ruby_assert.h
cont.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+cont.$(OBJEXT): {$(VPATH)}shape.h
cont.$(OBJEXT): {$(VPATH)}st.h
cont.$(OBJEXT): {$(VPATH)}subst.h
cont.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
cont.$(OBJEXT): {$(VPATH)}thread_native.h
cont.$(OBJEXT): {$(VPATH)}vm_core.h
+cont.$(OBJEXT): {$(VPATH)}vm_debug.h
cont.$(OBJEXT): {$(VPATH)}vm_opts.h
+cont.$(OBJEXT): {$(VPATH)}vm_sync.h
+cont.$(OBJEXT): {$(VPATH)}yjit.h
debug.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
debug.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
debug.$(OBJEXT): $(CCAN_DIR)/list/list.h
debug.$(OBJEXT): $(CCAN_DIR)/str/str.h
-debug.$(OBJEXT): $(hdrdir)/ruby.h
debug.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+debug.$(OBJEXT): $(top_srcdir)/internal/array.h
+debug.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+debug.$(OBJEXT): $(top_srcdir)/internal/class.h
+debug.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+debug.$(OBJEXT): $(top_srcdir)/internal/gc.h
+debug.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+debug.$(OBJEXT): $(top_srcdir)/internal/serial.h
+debug.$(OBJEXT): $(top_srcdir)/internal/signal.h
+debug.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+debug.$(OBJEXT): $(top_srcdir)/internal/variable.h
+debug.$(OBJEXT): $(top_srcdir)/internal/vm.h
+debug.$(OBJEXT): $(top_srcdir)/internal/warnings.h
debug.$(OBJEXT): {$(VPATH)}assert.h
+debug.$(OBJEXT): {$(VPATH)}atomic.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+debug.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
debug.$(OBJEXT): {$(VPATH)}config.h
+debug.$(OBJEXT): {$(VPATH)}constant.h
debug.$(OBJEXT): {$(VPATH)}debug.c
+debug.$(OBJEXT): {$(VPATH)}debug_counter.h
debug.$(OBJEXT): {$(VPATH)}defines.h
+debug.$(OBJEXT): {$(VPATH)}encindex.h
debug.$(OBJEXT): {$(VPATH)}encoding.h
debug.$(OBJEXT): {$(VPATH)}eval_intern.h
debug.$(OBJEXT): {$(VPATH)}gc.h
debug.$(OBJEXT): {$(VPATH)}id.h
+debug.$(OBJEXT): {$(VPATH)}id_table.h
debug.$(OBJEXT): {$(VPATH)}intern.h
debug.$(OBJEXT): {$(VPATH)}internal.h
+debug.$(OBJEXT): {$(VPATH)}internal/abi.h
+debug.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+debug.$(OBJEXT): {$(VPATH)}internal/assume.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+debug.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+debug.$(OBJEXT): {$(VPATH)}internal/cast.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+debug.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+debug.$(OBJEXT): {$(VPATH)}internal/config.h
+debug.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+debug.$(OBJEXT): {$(VPATH)}internal/core.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+debug.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+debug.$(OBJEXT): {$(VPATH)}internal/ctype.h
+debug.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+debug.$(OBJEXT): {$(VPATH)}internal/dosish.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+debug.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+debug.$(OBJEXT): {$(VPATH)}internal/error.h
+debug.$(OBJEXT): {$(VPATH)}internal/eval.h
+debug.$(OBJEXT): {$(VPATH)}internal/event.h
+debug.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+debug.$(OBJEXT): {$(VPATH)}internal/gc.h
+debug.$(OBJEXT): {$(VPATH)}internal/glob.h
+debug.$(OBJEXT): {$(VPATH)}internal/globals.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+debug.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+debug.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+debug.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+debug.$(OBJEXT): {$(VPATH)}internal/iterator.h
+debug.$(OBJEXT): {$(VPATH)}internal/memory.h
+debug.$(OBJEXT): {$(VPATH)}internal/method.h
+debug.$(OBJEXT): {$(VPATH)}internal/module.h
+debug.$(OBJEXT): {$(VPATH)}internal/newobj.h
+debug.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+debug.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+debug.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+debug.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+debug.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+debug.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+debug.$(OBJEXT): {$(VPATH)}internal/symbol.h
+debug.$(OBJEXT): {$(VPATH)}internal/value.h
+debug.$(OBJEXT): {$(VPATH)}internal/value_type.h
+debug.$(OBJEXT): {$(VPATH)}internal/variable.h
+debug.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+debug.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
debug.$(OBJEXT): {$(VPATH)}io.h
debug.$(OBJEXT): {$(VPATH)}method.h
debug.$(OBJEXT): {$(VPATH)}missing.h
debug.$(OBJEXT): {$(VPATH)}node.h
debug.$(OBJEXT): {$(VPATH)}onigmo.h
debug.$(OBJEXT): {$(VPATH)}oniguruma.h
+debug.$(OBJEXT): {$(VPATH)}ractor.h
+debug.$(OBJEXT): {$(VPATH)}ractor_core.h
debug.$(OBJEXT): {$(VPATH)}ruby_assert.h
debug.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+debug.$(OBJEXT): {$(VPATH)}shape.h
debug.$(OBJEXT): {$(VPATH)}st.h
debug.$(OBJEXT): {$(VPATH)}subst.h
debug.$(OBJEXT): {$(VPATH)}symbol.h
debug.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
debug.$(OBJEXT): {$(VPATH)}thread_native.h
debug.$(OBJEXT): {$(VPATH)}util.h
+debug.$(OBJEXT): {$(VPATH)}vm_callinfo.h
debug.$(OBJEXT): {$(VPATH)}vm_core.h
debug.$(OBJEXT): {$(VPATH)}vm_debug.h
debug.$(OBJEXT): {$(VPATH)}vm_opts.h
-debug_counter.$(OBJEXT): $(hdrdir)/ruby.h
debug_counter.$(OBJEXT): $(hdrdir)/ruby/ruby.h
debug_counter.$(OBJEXT): {$(VPATH)}assert.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+debug_counter.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
debug_counter.$(OBJEXT): {$(VPATH)}config.h
debug_counter.$(OBJEXT): {$(VPATH)}debug_counter.c
debug_counter.$(OBJEXT): {$(VPATH)}debug_counter.h
debug_counter.$(OBJEXT): {$(VPATH)}defines.h
debug_counter.$(OBJEXT): {$(VPATH)}intern.h
debug_counter.$(OBJEXT): {$(VPATH)}internal.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/abi.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/assume.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/cast.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/config.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/ctype.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/dosish.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/error.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/eval.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/event.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/gc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/glob.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/globals.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/iterator.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/memory.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/method.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/module.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/newobj.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/symbol.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/value.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/value_type.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/variable.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+debug_counter.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
debug_counter.$(OBJEXT): {$(VPATH)}missing.h
debug_counter.$(OBJEXT): {$(VPATH)}st.h
debug_counter.$(OBJEXT): {$(VPATH)}subst.h
-dir.$(OBJEXT): $(hdrdir)/ruby.h
+debug_counter.$(OBJEXT): {$(VPATH)}thread_native.h
dir.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dir.$(OBJEXT): $(top_srcdir)/internal/array.h
+dir.$(OBJEXT): $(top_srcdir)/internal/class.h
+dir.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+dir.$(OBJEXT): $(top_srcdir)/internal/dir.h
+dir.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+dir.$(OBJEXT): $(top_srcdir)/internal/error.h
+dir.$(OBJEXT): $(top_srcdir)/internal/file.h
+dir.$(OBJEXT): $(top_srcdir)/internal/gc.h
+dir.$(OBJEXT): $(top_srcdir)/internal/io.h
+dir.$(OBJEXT): $(top_srcdir)/internal/object.h
+dir.$(OBJEXT): $(top_srcdir)/internal/serial.h
+dir.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+dir.$(OBJEXT): $(top_srcdir)/internal/string.h
+dir.$(OBJEXT): $(top_srcdir)/internal/variable.h
+dir.$(OBJEXT): $(top_srcdir)/internal/vm.h
+dir.$(OBJEXT): $(top_srcdir)/internal/warnings.h
dir.$(OBJEXT): {$(VPATH)}assert.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+dir.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+dir.$(OBJEXT): {$(VPATH)}builtin.h
dir.$(OBJEXT): {$(VPATH)}config.h
+dir.$(OBJEXT): {$(VPATH)}constant.h
dir.$(OBJEXT): {$(VPATH)}defines.h
dir.$(OBJEXT): {$(VPATH)}dir.c
+dir.$(OBJEXT): {$(VPATH)}dir.rbinc
dir.$(OBJEXT): {$(VPATH)}encindex.h
dir.$(OBJEXT): {$(VPATH)}encoding.h
dir.$(OBJEXT): {$(VPATH)}id.h
+dir.$(OBJEXT): {$(VPATH)}id_table.h
dir.$(OBJEXT): {$(VPATH)}intern.h
dir.$(OBJEXT): {$(VPATH)}internal.h
+dir.$(OBJEXT): {$(VPATH)}internal/abi.h
+dir.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+dir.$(OBJEXT): {$(VPATH)}internal/assume.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+dir.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+dir.$(OBJEXT): {$(VPATH)}internal/cast.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+dir.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+dir.$(OBJEXT): {$(VPATH)}internal/config.h
+dir.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+dir.$(OBJEXT): {$(VPATH)}internal/core.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+dir.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+dir.$(OBJEXT): {$(VPATH)}internal/ctype.h
+dir.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+dir.$(OBJEXT): {$(VPATH)}internal/dosish.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+dir.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+dir.$(OBJEXT): {$(VPATH)}internal/error.h
+dir.$(OBJEXT): {$(VPATH)}internal/eval.h
+dir.$(OBJEXT): {$(VPATH)}internal/event.h
+dir.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+dir.$(OBJEXT): {$(VPATH)}internal/gc.h
+dir.$(OBJEXT): {$(VPATH)}internal/glob.h
+dir.$(OBJEXT): {$(VPATH)}internal/globals.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+dir.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+dir.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+dir.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+dir.$(OBJEXT): {$(VPATH)}internal/iterator.h
+dir.$(OBJEXT): {$(VPATH)}internal/memory.h
+dir.$(OBJEXT): {$(VPATH)}internal/method.h
+dir.$(OBJEXT): {$(VPATH)}internal/module.h
+dir.$(OBJEXT): {$(VPATH)}internal/newobj.h
+dir.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+dir.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+dir.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+dir.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+dir.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+dir.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+dir.$(OBJEXT): {$(VPATH)}internal/symbol.h
+dir.$(OBJEXT): {$(VPATH)}internal/value.h
+dir.$(OBJEXT): {$(VPATH)}internal/value_type.h
+dir.$(OBJEXT): {$(VPATH)}internal/variable.h
+dir.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+dir.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+dir.$(OBJEXT): {$(VPATH)}io.h
dir.$(OBJEXT): {$(VPATH)}missing.h
dir.$(OBJEXT): {$(VPATH)}onigmo.h
dir.$(OBJEXT): {$(VPATH)}oniguruma.h
+dir.$(OBJEXT): {$(VPATH)}shape.h
dir.$(OBJEXT): {$(VPATH)}st.h
dir.$(OBJEXT): {$(VPATH)}subst.h
dir.$(OBJEXT): {$(VPATH)}thread.h
dir.$(OBJEXT): {$(VPATH)}util.h
-dln.$(OBJEXT): $(hdrdir)/ruby.h
dln.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+dln.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+dln.$(OBJEXT): $(top_srcdir)/internal/warnings.h
dln.$(OBJEXT): {$(VPATH)}assert.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+dln.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
dln.$(OBJEXT): {$(VPATH)}config.h
dln.$(OBJEXT): {$(VPATH)}defines.h
dln.$(OBJEXT): {$(VPATH)}dln.c
dln.$(OBJEXT): {$(VPATH)}dln.h
dln.$(OBJEXT): {$(VPATH)}intern.h
dln.$(OBJEXT): {$(VPATH)}internal.h
+dln.$(OBJEXT): {$(VPATH)}internal/abi.h
+dln.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+dln.$(OBJEXT): {$(VPATH)}internal/assume.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+dln.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+dln.$(OBJEXT): {$(VPATH)}internal/cast.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+dln.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+dln.$(OBJEXT): {$(VPATH)}internal/config.h
+dln.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+dln.$(OBJEXT): {$(VPATH)}internal/core.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+dln.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+dln.$(OBJEXT): {$(VPATH)}internal/ctype.h
+dln.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+dln.$(OBJEXT): {$(VPATH)}internal/dosish.h
+dln.$(OBJEXT): {$(VPATH)}internal/error.h
+dln.$(OBJEXT): {$(VPATH)}internal/eval.h
+dln.$(OBJEXT): {$(VPATH)}internal/event.h
+dln.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+dln.$(OBJEXT): {$(VPATH)}internal/gc.h
+dln.$(OBJEXT): {$(VPATH)}internal/glob.h
+dln.$(OBJEXT): {$(VPATH)}internal/globals.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+dln.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+dln.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+dln.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+dln.$(OBJEXT): {$(VPATH)}internal/iterator.h
+dln.$(OBJEXT): {$(VPATH)}internal/memory.h
+dln.$(OBJEXT): {$(VPATH)}internal/method.h
+dln.$(OBJEXT): {$(VPATH)}internal/module.h
+dln.$(OBJEXT): {$(VPATH)}internal/newobj.h
+dln.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+dln.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+dln.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+dln.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+dln.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+dln.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+dln.$(OBJEXT): {$(VPATH)}internal/symbol.h
+dln.$(OBJEXT): {$(VPATH)}internal/value.h
+dln.$(OBJEXT): {$(VPATH)}internal/value_type.h
+dln.$(OBJEXT): {$(VPATH)}internal/variable.h
+dln.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+dln.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
dln.$(OBJEXT): {$(VPATH)}missing.h
dln.$(OBJEXT): {$(VPATH)}st.h
dln.$(OBJEXT): {$(VPATH)}subst.h
dln_find.$(OBJEXT): $(hdrdir)/ruby/ruby.h
dln_find.$(OBJEXT): {$(VPATH)}assert.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+dln_find.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
dln_find.$(OBJEXT): {$(VPATH)}config.h
dln_find.$(OBJEXT): {$(VPATH)}defines.h
dln_find.$(OBJEXT): {$(VPATH)}dln.h
dln_find.$(OBJEXT): {$(VPATH)}dln_find.c
dln_find.$(OBJEXT): {$(VPATH)}intern.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/abi.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/assume.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/cast.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/config.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/ctype.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/dosish.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/error.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/eval.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/event.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/gc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/glob.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/globals.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/iterator.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/memory.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/method.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/module.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/newobj.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/symbol.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/value.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/value_type.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/variable.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+dln_find.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
dln_find.$(OBJEXT): {$(VPATH)}missing.h
dln_find.$(OBJEXT): {$(VPATH)}st.h
dln_find.$(OBJEXT): {$(VPATH)}subst.h
dmydln.$(OBJEXT): $(hdrdir)/ruby/ruby.h
dmydln.$(OBJEXT): {$(VPATH)}assert.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+dmydln.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
dmydln.$(OBJEXT): {$(VPATH)}config.h
dmydln.$(OBJEXT): {$(VPATH)}defines.h
dmydln.$(OBJEXT): {$(VPATH)}dmydln.c
dmydln.$(OBJEXT): {$(VPATH)}intern.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/abi.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/assume.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/cast.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/config.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/ctype.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/dosish.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/error.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/eval.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/event.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/gc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/glob.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/globals.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/iterator.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/memory.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/method.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/module.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/newobj.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/symbol.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/value.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/value_type.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/variable.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+dmydln.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
dmydln.$(OBJEXT): {$(VPATH)}missing.h
dmydln.$(OBJEXT): {$(VPATH)}st.h
dmydln.$(OBJEXT): {$(VPATH)}subst.h
dmyenc.$(OBJEXT): {$(VPATH)}dmyenc.c
dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
+enc/ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/ascii.$(OBJEXT): {$(VPATH)}assert.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/ascii.$(OBJEXT): {$(VPATH)}config.h
enc/ascii.$(OBJEXT): {$(VPATH)}defines.h
enc/ascii.$(OBJEXT): {$(VPATH)}enc/ascii.c
enc/ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/ascii.$(OBJEXT): {$(VPATH)}encoding.h
+enc/ascii.$(OBJEXT): {$(VPATH)}intern.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/ascii.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}st.h
+enc/ascii.$(OBJEXT): {$(VPATH)}subst.h
enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}assert.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}config.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}defines.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}enc/trans/newline.c
enc/trans/newline.$(OBJEXT): {$(VPATH)}intern.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}missing.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}st.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}subst.h
@@ -1899,91 +5009,1305 @@ enc/trans/newline.$(OBJEXT): {$(VPATH)}transcode_data.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/casefold.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/name2ctype.h
enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/unicode.$(OBJEXT): {$(VPATH)}assert.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/unicode.$(OBJEXT): {$(VPATH)}config.h
enc/unicode.$(OBJEXT): {$(VPATH)}defines.h
enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode.c
enc/unicode.$(OBJEXT): {$(VPATH)}intern.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/unicode.$(OBJEXT): {$(VPATH)}missing.h
enc/unicode.$(OBJEXT): {$(VPATH)}onigmo.h
enc/unicode.$(OBJEXT): {$(VPATH)}regenc.h
enc/unicode.$(OBJEXT): {$(VPATH)}regint.h
enc/unicode.$(OBJEXT): {$(VPATH)}st.h
enc/unicode.$(OBJEXT): {$(VPATH)}subst.h
+enc/us_ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}assert.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}config.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}defines.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}enc/us_ascii.c
enc/us_ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}encoding.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}intern.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}st.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}subst.h
+enc/utf_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}assert.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/utf_8.$(OBJEXT): {$(VPATH)}config.h
enc/utf_8.$(OBJEXT): {$(VPATH)}defines.h
enc/utf_8.$(OBJEXT): {$(VPATH)}enc/utf_8.c
enc/utf_8.$(OBJEXT): {$(VPATH)}encindex.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}encoding.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}intern.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/utf_8.$(OBJEXT): {$(VPATH)}missing.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/utf_8.$(OBJEXT): {$(VPATH)}regenc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}st.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}subst.h
encoding.$(OBJEXT): $(hdrdir)/ruby.h
encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/class.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/enc.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/error.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/gc.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/inits.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/load.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/object.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/serial.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/string.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/variable.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/vm.h
+encoding.$(OBJEXT): $(top_srcdir)/internal/warnings.h
encoding.$(OBJEXT): {$(VPATH)}assert.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+encoding.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
encoding.$(OBJEXT): {$(VPATH)}config.h
+encoding.$(OBJEXT): {$(VPATH)}constant.h
+encoding.$(OBJEXT): {$(VPATH)}debug_counter.h
encoding.$(OBJEXT): {$(VPATH)}defines.h
encoding.$(OBJEXT): {$(VPATH)}encindex.h
encoding.$(OBJEXT): {$(VPATH)}encoding.c
encoding.$(OBJEXT): {$(VPATH)}encoding.h
+encoding.$(OBJEXT): {$(VPATH)}id_table.h
encoding.$(OBJEXT): {$(VPATH)}intern.h
encoding.$(OBJEXT): {$(VPATH)}internal.h
+encoding.$(OBJEXT): {$(VPATH)}internal/abi.h
+encoding.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+encoding.$(OBJEXT): {$(VPATH)}internal/assume.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+encoding.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+encoding.$(OBJEXT): {$(VPATH)}internal/cast.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+encoding.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+encoding.$(OBJEXT): {$(VPATH)}internal/config.h
+encoding.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+encoding.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+encoding.$(OBJEXT): {$(VPATH)}internal/ctype.h
+encoding.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+encoding.$(OBJEXT): {$(VPATH)}internal/dosish.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+encoding.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+encoding.$(OBJEXT): {$(VPATH)}internal/error.h
+encoding.$(OBJEXT): {$(VPATH)}internal/eval.h
+encoding.$(OBJEXT): {$(VPATH)}internal/event.h
+encoding.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+encoding.$(OBJEXT): {$(VPATH)}internal/gc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/glob.h
+encoding.$(OBJEXT): {$(VPATH)}internal/globals.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+encoding.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+encoding.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+encoding.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+encoding.$(OBJEXT): {$(VPATH)}internal/iterator.h
+encoding.$(OBJEXT): {$(VPATH)}internal/memory.h
+encoding.$(OBJEXT): {$(VPATH)}internal/method.h
+encoding.$(OBJEXT): {$(VPATH)}internal/module.h
+encoding.$(OBJEXT): {$(VPATH)}internal/newobj.h
+encoding.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+encoding.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+encoding.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+encoding.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+encoding.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+encoding.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+encoding.$(OBJEXT): {$(VPATH)}internal/symbol.h
+encoding.$(OBJEXT): {$(VPATH)}internal/value.h
+encoding.$(OBJEXT): {$(VPATH)}internal/value_type.h
+encoding.$(OBJEXT): {$(VPATH)}internal/variable.h
+encoding.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+encoding.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
encoding.$(OBJEXT): {$(VPATH)}missing.h
encoding.$(OBJEXT): {$(VPATH)}onigmo.h
encoding.$(OBJEXT): {$(VPATH)}oniguruma.h
encoding.$(OBJEXT): {$(VPATH)}regenc.h
encoding.$(OBJEXT): {$(VPATH)}ruby_assert.h
+encoding.$(OBJEXT): {$(VPATH)}shape.h
encoding.$(OBJEXT): {$(VPATH)}st.h
encoding.$(OBJEXT): {$(VPATH)}subst.h
encoding.$(OBJEXT): {$(VPATH)}util.h
-enum.$(OBJEXT): $(hdrdir)/ruby.h
+encoding.$(OBJEXT): {$(VPATH)}vm_debug.h
+encoding.$(OBJEXT): {$(VPATH)}vm_sync.h
enum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enum.$(OBJEXT): $(top_srcdir)/internal/array.h
+enum.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+enum.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+enum.$(OBJEXT): $(top_srcdir)/internal/bits.h
+enum.$(OBJEXT): $(top_srcdir)/internal/class.h
+enum.$(OBJEXT): $(top_srcdir)/internal/compar.h
+enum.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+enum.$(OBJEXT): $(top_srcdir)/internal/enum.h
+enum.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+enum.$(OBJEXT): $(top_srcdir)/internal/gc.h
+enum.$(OBJEXT): $(top_srcdir)/internal/hash.h
+enum.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+enum.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+enum.$(OBJEXT): $(top_srcdir)/internal/object.h
+enum.$(OBJEXT): $(top_srcdir)/internal/proc.h
+enum.$(OBJEXT): $(top_srcdir)/internal/rational.h
+enum.$(OBJEXT): $(top_srcdir)/internal/re.h
+enum.$(OBJEXT): $(top_srcdir)/internal/serial.h
+enum.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+enum.$(OBJEXT): $(top_srcdir)/internal/variable.h
+enum.$(OBJEXT): $(top_srcdir)/internal/vm.h
+enum.$(OBJEXT): $(top_srcdir)/internal/warnings.h
enum.$(OBJEXT): {$(VPATH)}assert.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enum.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enum.$(OBJEXT): {$(VPATH)}config.h
+enum.$(OBJEXT): {$(VPATH)}constant.h
enum.$(OBJEXT): {$(VPATH)}defines.h
enum.$(OBJEXT): {$(VPATH)}encoding.h
enum.$(OBJEXT): {$(VPATH)}enum.c
enum.$(OBJEXT): {$(VPATH)}id.h
+enum.$(OBJEXT): {$(VPATH)}id_table.h
enum.$(OBJEXT): {$(VPATH)}intern.h
enum.$(OBJEXT): {$(VPATH)}internal.h
+enum.$(OBJEXT): {$(VPATH)}internal/abi.h
+enum.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enum.$(OBJEXT): {$(VPATH)}internal/assume.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enum.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enum.$(OBJEXT): {$(VPATH)}internal/cast.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enum.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enum.$(OBJEXT): {$(VPATH)}internal/config.h
+enum.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enum.$(OBJEXT): {$(VPATH)}internal/core.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enum.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enum.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enum.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enum.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enum.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enum.$(OBJEXT): {$(VPATH)}internal/error.h
+enum.$(OBJEXT): {$(VPATH)}internal/eval.h
+enum.$(OBJEXT): {$(VPATH)}internal/event.h
+enum.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enum.$(OBJEXT): {$(VPATH)}internal/gc.h
+enum.$(OBJEXT): {$(VPATH)}internal/glob.h
+enum.$(OBJEXT): {$(VPATH)}internal/globals.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enum.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enum.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enum.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enum.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enum.$(OBJEXT): {$(VPATH)}internal/memory.h
+enum.$(OBJEXT): {$(VPATH)}internal/method.h
+enum.$(OBJEXT): {$(VPATH)}internal/module.h
+enum.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enum.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enum.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enum.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enum.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enum.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enum.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enum.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enum.$(OBJEXT): {$(VPATH)}internal/value.h
+enum.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enum.$(OBJEXT): {$(VPATH)}internal/variable.h
+enum.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enum.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enum.$(OBJEXT): {$(VPATH)}missing.h
enum.$(OBJEXT): {$(VPATH)}onigmo.h
enum.$(OBJEXT): {$(VPATH)}oniguruma.h
+enum.$(OBJEXT): {$(VPATH)}ruby_assert.h
+enum.$(OBJEXT): {$(VPATH)}shape.h
enum.$(OBJEXT): {$(VPATH)}st.h
enum.$(OBJEXT): {$(VPATH)}subst.h
enum.$(OBJEXT): {$(VPATH)}symbol.h
enum.$(OBJEXT): {$(VPATH)}util.h
-enumerator.$(OBJEXT): $(hdrdir)/ruby.h
+enumerator.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+enumerator.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+enumerator.$(OBJEXT): $(CCAN_DIR)/list/list.h
+enumerator.$(OBJEXT): $(CCAN_DIR)/str/str.h
enumerator.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/array.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/bits.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/class.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/enumerator.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/error.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/gc.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/hash.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/range.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/rational.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/serial.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/string.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/struct.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/vm.h
+enumerator.$(OBJEXT): $(top_srcdir)/internal/warnings.h
enumerator.$(OBJEXT): {$(VPATH)}assert.h
+enumerator.$(OBJEXT): {$(VPATH)}atomic.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enumerator.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enumerator.$(OBJEXT): {$(VPATH)}config.h
enumerator.$(OBJEXT): {$(VPATH)}defines.h
+enumerator.$(OBJEXT): {$(VPATH)}encoding.h
enumerator.$(OBJEXT): {$(VPATH)}enumerator.c
enumerator.$(OBJEXT): {$(VPATH)}id.h
+enumerator.$(OBJEXT): {$(VPATH)}id_table.h
enumerator.$(OBJEXT): {$(VPATH)}intern.h
enumerator.$(OBJEXT): {$(VPATH)}internal.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/abi.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/assume.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/cast.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/config.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/error.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/eval.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/event.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/gc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/glob.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/globals.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/memory.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/method.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/module.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/value.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/variable.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enumerator.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+enumerator.$(OBJEXT): {$(VPATH)}method.h
enumerator.$(OBJEXT): {$(VPATH)}missing.h
+enumerator.$(OBJEXT): {$(VPATH)}node.h
+enumerator.$(OBJEXT): {$(VPATH)}onigmo.h
+enumerator.$(OBJEXT): {$(VPATH)}oniguruma.h
+enumerator.$(OBJEXT): {$(VPATH)}ruby_assert.h
+enumerator.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+enumerator.$(OBJEXT): {$(VPATH)}shape.h
enumerator.$(OBJEXT): {$(VPATH)}st.h
enumerator.$(OBJEXT): {$(VPATH)}subst.h
+enumerator.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+enumerator.$(OBJEXT): {$(VPATH)}thread_native.h
+enumerator.$(OBJEXT): {$(VPATH)}vm_core.h
+enumerator.$(OBJEXT): {$(VPATH)}vm_opts.h
error.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
error.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
error.$(OBJEXT): $(CCAN_DIR)/list/list.h
error.$(OBJEXT): $(CCAN_DIR)/str/str.h
-error.$(OBJEXT): $(hdrdir)/ruby.h
error.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+error.$(OBJEXT): $(top_srcdir)/internal/array.h
+error.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+error.$(OBJEXT): $(top_srcdir)/internal/class.h
+error.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+error.$(OBJEXT): $(top_srcdir)/internal/error.h
+error.$(OBJEXT): $(top_srcdir)/internal/eval.h
+error.$(OBJEXT): $(top_srcdir)/internal/gc.h
+error.$(OBJEXT): $(top_srcdir)/internal/hash.h
+error.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+error.$(OBJEXT): $(top_srcdir)/internal/io.h
+error.$(OBJEXT): $(top_srcdir)/internal/load.h
+error.$(OBJEXT): $(top_srcdir)/internal/object.h
+error.$(OBJEXT): $(top_srcdir)/internal/serial.h
+error.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+error.$(OBJEXT): $(top_srcdir)/internal/string.h
+error.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+error.$(OBJEXT): $(top_srcdir)/internal/thread.h
+error.$(OBJEXT): $(top_srcdir)/internal/variable.h
+error.$(OBJEXT): $(top_srcdir)/internal/vm.h
+error.$(OBJEXT): $(top_srcdir)/internal/warnings.h
error.$(OBJEXT): {$(VPATH)}assert.h
+error.$(OBJEXT): {$(VPATH)}atomic.h
+error.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+error.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+error.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+error.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+error.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+error.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+error.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+error.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+error.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
error.$(OBJEXT): {$(VPATH)}builtin.h
error.$(OBJEXT): {$(VPATH)}config.h
+error.$(OBJEXT): {$(VPATH)}constant.h
error.$(OBJEXT): {$(VPATH)}defines.h
error.$(OBJEXT): {$(VPATH)}encoding.h
error.$(OBJEXT): {$(VPATH)}error.c
-error.$(OBJEXT): {$(VPATH)}eval_intern.h
error.$(OBJEXT): {$(VPATH)}id.h
+error.$(OBJEXT): {$(VPATH)}id_table.h
error.$(OBJEXT): {$(VPATH)}intern.h
error.$(OBJEXT): {$(VPATH)}internal.h
+error.$(OBJEXT): {$(VPATH)}internal/abi.h
+error.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+error.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+error.$(OBJEXT): {$(VPATH)}internal/assume.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+error.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+error.$(OBJEXT): {$(VPATH)}internal/cast.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+error.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+error.$(OBJEXT): {$(VPATH)}internal/config.h
+error.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+error.$(OBJEXT): {$(VPATH)}internal/core.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+error.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+error.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+error.$(OBJEXT): {$(VPATH)}internal/ctype.h
+error.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+error.$(OBJEXT): {$(VPATH)}internal/dosish.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+error.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+error.$(OBJEXT): {$(VPATH)}internal/error.h
+error.$(OBJEXT): {$(VPATH)}internal/eval.h
+error.$(OBJEXT): {$(VPATH)}internal/event.h
+error.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+error.$(OBJEXT): {$(VPATH)}internal/gc.h
+error.$(OBJEXT): {$(VPATH)}internal/glob.h
+error.$(OBJEXT): {$(VPATH)}internal/globals.h
+error.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+error.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+error.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+error.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+error.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+error.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+error.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+error.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+error.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+error.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+error.$(OBJEXT): {$(VPATH)}internal/iterator.h
+error.$(OBJEXT): {$(VPATH)}internal/memory.h
+error.$(OBJEXT): {$(VPATH)}internal/method.h
+error.$(OBJEXT): {$(VPATH)}internal/module.h
+error.$(OBJEXT): {$(VPATH)}internal/newobj.h
+error.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+error.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+error.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+error.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+error.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+error.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+error.$(OBJEXT): {$(VPATH)}internal/symbol.h
+error.$(OBJEXT): {$(VPATH)}internal/value.h
+error.$(OBJEXT): {$(VPATH)}internal/value_type.h
+error.$(OBJEXT): {$(VPATH)}internal/variable.h
+error.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+error.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+error.$(OBJEXT): {$(VPATH)}io.h
error.$(OBJEXT): {$(VPATH)}known_errors.inc
error.$(OBJEXT): {$(VPATH)}method.h
error.$(OBJEXT): {$(VPATH)}missing.h
@@ -1992,6 +6316,7 @@ error.$(OBJEXT): {$(VPATH)}onigmo.h
error.$(OBJEXT): {$(VPATH)}oniguruma.h
error.$(OBJEXT): {$(VPATH)}ruby_assert.h
error.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+error.$(OBJEXT): {$(VPATH)}shape.h
error.$(OBJEXT): {$(VPATH)}st.h
error.$(OBJEXT): {$(VPATH)}subst.h
error.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -2005,54 +6330,435 @@ eval.$(OBJEXT): $(CCAN_DIR)/list/list.h
eval.$(OBJEXT): $(CCAN_DIR)/str/str.h
eval.$(OBJEXT): $(hdrdir)/ruby.h
eval.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+eval.$(OBJEXT): $(top_srcdir)/internal/array.h
+eval.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+eval.$(OBJEXT): $(top_srcdir)/internal/class.h
+eval.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+eval.$(OBJEXT): $(top_srcdir)/internal/cont.h
+eval.$(OBJEXT): $(top_srcdir)/internal/error.h
+eval.$(OBJEXT): $(top_srcdir)/internal/eval.h
+eval.$(OBJEXT): $(top_srcdir)/internal/gc.h
+eval.$(OBJEXT): $(top_srcdir)/internal/hash.h
+eval.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+eval.$(OBJEXT): $(top_srcdir)/internal/inits.h
+eval.$(OBJEXT): $(top_srcdir)/internal/io.h
+eval.$(OBJEXT): $(top_srcdir)/internal/object.h
+eval.$(OBJEXT): $(top_srcdir)/internal/serial.h
+eval.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+eval.$(OBJEXT): $(top_srcdir)/internal/string.h
+eval.$(OBJEXT): $(top_srcdir)/internal/thread.h
+eval.$(OBJEXT): $(top_srcdir)/internal/variable.h
+eval.$(OBJEXT): $(top_srcdir)/internal/vm.h
+eval.$(OBJEXT): $(top_srcdir)/internal/warnings.h
eval.$(OBJEXT): {$(VPATH)}assert.h
+eval.$(OBJEXT): {$(VPATH)}atomic.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+eval.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
eval.$(OBJEXT): {$(VPATH)}config.h
+eval.$(OBJEXT): {$(VPATH)}constant.h
eval.$(OBJEXT): {$(VPATH)}debug_counter.h
eval.$(OBJEXT): {$(VPATH)}defines.h
+eval.$(OBJEXT): {$(VPATH)}encoding.h
eval.$(OBJEXT): {$(VPATH)}eval.c
eval.$(OBJEXT): {$(VPATH)}eval_error.c
eval.$(OBJEXT): {$(VPATH)}eval_intern.h
eval.$(OBJEXT): {$(VPATH)}eval_jump.c
+eval.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
eval.$(OBJEXT): {$(VPATH)}gc.h
eval.$(OBJEXT): {$(VPATH)}id.h
+eval.$(OBJEXT): {$(VPATH)}id_table.h
eval.$(OBJEXT): {$(VPATH)}intern.h
eval.$(OBJEXT): {$(VPATH)}internal.h
+eval.$(OBJEXT): {$(VPATH)}internal/abi.h
+eval.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+eval.$(OBJEXT): {$(VPATH)}internal/assume.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+eval.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+eval.$(OBJEXT): {$(VPATH)}internal/cast.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+eval.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+eval.$(OBJEXT): {$(VPATH)}internal/config.h
+eval.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+eval.$(OBJEXT): {$(VPATH)}internal/core.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+eval.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+eval.$(OBJEXT): {$(VPATH)}internal/ctype.h
+eval.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+eval.$(OBJEXT): {$(VPATH)}internal/dosish.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+eval.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+eval.$(OBJEXT): {$(VPATH)}internal/error.h
+eval.$(OBJEXT): {$(VPATH)}internal/eval.h
+eval.$(OBJEXT): {$(VPATH)}internal/event.h
+eval.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+eval.$(OBJEXT): {$(VPATH)}internal/gc.h
+eval.$(OBJEXT): {$(VPATH)}internal/glob.h
+eval.$(OBJEXT): {$(VPATH)}internal/globals.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+eval.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+eval.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+eval.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+eval.$(OBJEXT): {$(VPATH)}internal/iterator.h
+eval.$(OBJEXT): {$(VPATH)}internal/memory.h
+eval.$(OBJEXT): {$(VPATH)}internal/method.h
+eval.$(OBJEXT): {$(VPATH)}internal/module.h
+eval.$(OBJEXT): {$(VPATH)}internal/newobj.h
+eval.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+eval.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+eval.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+eval.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+eval.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+eval.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+eval.$(OBJEXT): {$(VPATH)}internal/symbol.h
+eval.$(OBJEXT): {$(VPATH)}internal/value.h
+eval.$(OBJEXT): {$(VPATH)}internal/value_type.h
+eval.$(OBJEXT): {$(VPATH)}internal/variable.h
+eval.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+eval.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+eval.$(OBJEXT): {$(VPATH)}io.h
eval.$(OBJEXT): {$(VPATH)}iseq.h
eval.$(OBJEXT): {$(VPATH)}method.h
eval.$(OBJEXT): {$(VPATH)}missing.h
eval.$(OBJEXT): {$(VPATH)}mjit.h
eval.$(OBJEXT): {$(VPATH)}node.h
+eval.$(OBJEXT): {$(VPATH)}onigmo.h
+eval.$(OBJEXT): {$(VPATH)}oniguruma.h
eval.$(OBJEXT): {$(VPATH)}probes.dmyh
eval.$(OBJEXT): {$(VPATH)}probes.h
eval.$(OBJEXT): {$(VPATH)}probes_helper.h
+eval.$(OBJEXT): {$(VPATH)}ractor.h
+eval.$(OBJEXT): {$(VPATH)}ractor_core.h
eval.$(OBJEXT): {$(VPATH)}ruby_assert.h
eval.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+eval.$(OBJEXT): {$(VPATH)}shape.h
eval.$(OBJEXT): {$(VPATH)}st.h
eval.$(OBJEXT): {$(VPATH)}subst.h
eval.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
eval.$(OBJEXT): {$(VPATH)}thread_native.h
eval.$(OBJEXT): {$(VPATH)}vm.h
eval.$(OBJEXT): {$(VPATH)}vm_core.h
+eval.$(OBJEXT): {$(VPATH)}vm_debug.h
eval.$(OBJEXT): {$(VPATH)}vm_opts.h
explicit_bzero.$(OBJEXT): {$(VPATH)}config.h
explicit_bzero.$(OBJEXT): {$(VPATH)}explicit_bzero.c
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/config.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+explicit_bzero.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
explicit_bzero.$(OBJEXT): {$(VPATH)}missing.h
-file.$(OBJEXT): $(hdrdir)/ruby.h
file.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+file.$(OBJEXT): $(top_srcdir)/internal/array.h
+file.$(OBJEXT): $(top_srcdir)/internal/class.h
+file.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+file.$(OBJEXT): $(top_srcdir)/internal/dir.h
+file.$(OBJEXT): $(top_srcdir)/internal/error.h
+file.$(OBJEXT): $(top_srcdir)/internal/file.h
+file.$(OBJEXT): $(top_srcdir)/internal/gc.h
+file.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+file.$(OBJEXT): $(top_srcdir)/internal/io.h
+file.$(OBJEXT): $(top_srcdir)/internal/load.h
+file.$(OBJEXT): $(top_srcdir)/internal/object.h
+file.$(OBJEXT): $(top_srcdir)/internal/process.h
+file.$(OBJEXT): $(top_srcdir)/internal/serial.h
+file.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+file.$(OBJEXT): $(top_srcdir)/internal/string.h
+file.$(OBJEXT): $(top_srcdir)/internal/thread.h
+file.$(OBJEXT): $(top_srcdir)/internal/variable.h
+file.$(OBJEXT): $(top_srcdir)/internal/vm.h
+file.$(OBJEXT): $(top_srcdir)/internal/warnings.h
file.$(OBJEXT): {$(VPATH)}assert.h
+file.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+file.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+file.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+file.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+file.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+file.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+file.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+file.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+file.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
file.$(OBJEXT): {$(VPATH)}config.h
+file.$(OBJEXT): {$(VPATH)}constant.h
file.$(OBJEXT): {$(VPATH)}defines.h
file.$(OBJEXT): {$(VPATH)}dln.h
file.$(OBJEXT): {$(VPATH)}encindex.h
file.$(OBJEXT): {$(VPATH)}encoding.h
file.$(OBJEXT): {$(VPATH)}file.c
file.$(OBJEXT): {$(VPATH)}id.h
+file.$(OBJEXT): {$(VPATH)}id_table.h
file.$(OBJEXT): {$(VPATH)}intern.h
file.$(OBJEXT): {$(VPATH)}internal.h
+file.$(OBJEXT): {$(VPATH)}internal/abi.h
+file.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+file.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+file.$(OBJEXT): {$(VPATH)}internal/assume.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+file.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+file.$(OBJEXT): {$(VPATH)}internal/cast.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+file.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+file.$(OBJEXT): {$(VPATH)}internal/config.h
+file.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+file.$(OBJEXT): {$(VPATH)}internal/core.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+file.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+file.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+file.$(OBJEXT): {$(VPATH)}internal/ctype.h
+file.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+file.$(OBJEXT): {$(VPATH)}internal/dosish.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+file.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+file.$(OBJEXT): {$(VPATH)}internal/error.h
+file.$(OBJEXT): {$(VPATH)}internal/eval.h
+file.$(OBJEXT): {$(VPATH)}internal/event.h
+file.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+file.$(OBJEXT): {$(VPATH)}internal/gc.h
+file.$(OBJEXT): {$(VPATH)}internal/glob.h
+file.$(OBJEXT): {$(VPATH)}internal/globals.h
+file.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+file.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+file.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+file.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+file.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+file.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+file.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+file.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+file.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+file.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+file.$(OBJEXT): {$(VPATH)}internal/iterator.h
+file.$(OBJEXT): {$(VPATH)}internal/memory.h
+file.$(OBJEXT): {$(VPATH)}internal/method.h
+file.$(OBJEXT): {$(VPATH)}internal/module.h
+file.$(OBJEXT): {$(VPATH)}internal/newobj.h
+file.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+file.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+file.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+file.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+file.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+file.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+file.$(OBJEXT): {$(VPATH)}internal/symbol.h
+file.$(OBJEXT): {$(VPATH)}internal/value.h
+file.$(OBJEXT): {$(VPATH)}internal/value_type.h
+file.$(OBJEXT): {$(VPATH)}internal/variable.h
+file.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+file.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
file.$(OBJEXT): {$(VPATH)}io.h
file.$(OBJEXT): {$(VPATH)}missing.h
file.$(OBJEXT): {$(VPATH)}onigmo.h
file.$(OBJEXT): {$(VPATH)}oniguruma.h
+file.$(OBJEXT): {$(VPATH)}shape.h
file.$(OBJEXT): {$(VPATH)}st.h
file.$(OBJEXT): {$(VPATH)}subst.h
file.$(OBJEXT): {$(VPATH)}thread.h
@@ -2063,7 +6769,46 @@ gc.$(OBJEXT): $(CCAN_DIR)/list/list.h
gc.$(OBJEXT): $(CCAN_DIR)/str/str.h
gc.$(OBJEXT): $(hdrdir)/ruby.h
gc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+gc.$(OBJEXT): $(top_srcdir)/internal/array.h
+gc.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+gc.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+gc.$(OBJEXT): $(top_srcdir)/internal/bits.h
+gc.$(OBJEXT): $(top_srcdir)/internal/class.h
+gc.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+gc.$(OBJEXT): $(top_srcdir)/internal/complex.h
+gc.$(OBJEXT): $(top_srcdir)/internal/cont.h
+gc.$(OBJEXT): $(top_srcdir)/internal/error.h
+gc.$(OBJEXT): $(top_srcdir)/internal/eval.h
+gc.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+gc.$(OBJEXT): $(top_srcdir)/internal/gc.h
+gc.$(OBJEXT): $(top_srcdir)/internal/hash.h
+gc.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+gc.$(OBJEXT): $(top_srcdir)/internal/io.h
+gc.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+gc.$(OBJEXT): $(top_srcdir)/internal/object.h
+gc.$(OBJEXT): $(top_srcdir)/internal/proc.h
+gc.$(OBJEXT): $(top_srcdir)/internal/rational.h
+gc.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+gc.$(OBJEXT): $(top_srcdir)/internal/serial.h
+gc.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+gc.$(OBJEXT): $(top_srcdir)/internal/string.h
+gc.$(OBJEXT): $(top_srcdir)/internal/struct.h
+gc.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+gc.$(OBJEXT): $(top_srcdir)/internal/thread.h
+gc.$(OBJEXT): $(top_srcdir)/internal/variable.h
+gc.$(OBJEXT): $(top_srcdir)/internal/vm.h
+gc.$(OBJEXT): $(top_srcdir)/internal/warnings.h
gc.$(OBJEXT): {$(VPATH)}assert.h
+gc.$(OBJEXT): {$(VPATH)}atomic.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+gc.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
gc.$(OBJEXT): {$(VPATH)}builtin.h
gc.$(OBJEXT): {$(VPATH)}config.h
gc.$(OBJEXT): {$(VPATH)}constant.h
@@ -2079,7 +6824,158 @@ gc.$(OBJEXT): {$(VPATH)}id.h
gc.$(OBJEXT): {$(VPATH)}id_table.h
gc.$(OBJEXT): {$(VPATH)}intern.h
gc.$(OBJEXT): {$(VPATH)}internal.h
+gc.$(OBJEXT): {$(VPATH)}internal/abi.h
+gc.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+gc.$(OBJEXT): {$(VPATH)}internal/assume.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+gc.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+gc.$(OBJEXT): {$(VPATH)}internal/cast.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+gc.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+gc.$(OBJEXT): {$(VPATH)}internal/config.h
+gc.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+gc.$(OBJEXT): {$(VPATH)}internal/core.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rmatch.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+gc.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+gc.$(OBJEXT): {$(VPATH)}internal/ctype.h
+gc.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+gc.$(OBJEXT): {$(VPATH)}internal/dosish.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+gc.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+gc.$(OBJEXT): {$(VPATH)}internal/error.h
+gc.$(OBJEXT): {$(VPATH)}internal/eval.h
+gc.$(OBJEXT): {$(VPATH)}internal/event.h
+gc.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+gc.$(OBJEXT): {$(VPATH)}internal/gc.h
+gc.$(OBJEXT): {$(VPATH)}internal/glob.h
+gc.$(OBJEXT): {$(VPATH)}internal/globals.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+gc.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+gc.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+gc.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+gc.$(OBJEXT): {$(VPATH)}internal/iterator.h
+gc.$(OBJEXT): {$(VPATH)}internal/memory.h
+gc.$(OBJEXT): {$(VPATH)}internal/method.h
+gc.$(OBJEXT): {$(VPATH)}internal/module.h
+gc.$(OBJEXT): {$(VPATH)}internal/newobj.h
+gc.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+gc.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+gc.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+gc.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+gc.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+gc.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+gc.$(OBJEXT): {$(VPATH)}internal/symbol.h
+gc.$(OBJEXT): {$(VPATH)}internal/value.h
+gc.$(OBJEXT): {$(VPATH)}internal/value_type.h
+gc.$(OBJEXT): {$(VPATH)}internal/variable.h
+gc.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+gc.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
gc.$(OBJEXT): {$(VPATH)}io.h
+gc.$(OBJEXT): {$(VPATH)}iseq.h
gc.$(OBJEXT): {$(VPATH)}method.h
gc.$(OBJEXT): {$(VPATH)}missing.h
gc.$(OBJEXT): {$(VPATH)}mjit.h
@@ -2088,12 +6984,15 @@ gc.$(OBJEXT): {$(VPATH)}onigmo.h
gc.$(OBJEXT): {$(VPATH)}oniguruma.h
gc.$(OBJEXT): {$(VPATH)}probes.dmyh
gc.$(OBJEXT): {$(VPATH)}probes.h
+gc.$(OBJEXT): {$(VPATH)}ractor.h
+gc.$(OBJEXT): {$(VPATH)}ractor_core.h
gc.$(OBJEXT): {$(VPATH)}re.h
gc.$(OBJEXT): {$(VPATH)}regenc.h
gc.$(OBJEXT): {$(VPATH)}regex.h
gc.$(OBJEXT): {$(VPATH)}regint.h
gc.$(OBJEXT): {$(VPATH)}ruby_assert.h
gc.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+gc.$(OBJEXT): {$(VPATH)}shape.h
gc.$(OBJEXT): {$(VPATH)}st.h
gc.$(OBJEXT): {$(VPATH)}subst.h
gc.$(OBJEXT): {$(VPATH)}symbol.h
@@ -2102,79 +7001,584 @@ gc.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
gc.$(OBJEXT): {$(VPATH)}thread_native.h
gc.$(OBJEXT): {$(VPATH)}transient_heap.h
gc.$(OBJEXT): {$(VPATH)}util.h
+gc.$(OBJEXT): {$(VPATH)}vm_callinfo.h
gc.$(OBJEXT): {$(VPATH)}vm_core.h
+gc.$(OBJEXT): {$(VPATH)}vm_debug.h
gc.$(OBJEXT): {$(VPATH)}vm_opts.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
-golf_prelude.$(OBJEXT): $(hdrdir)/ruby.h
-golf_prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-golf_prelude.$(OBJEXT): {$(VPATH)}assert.h
-golf_prelude.$(OBJEXT): {$(VPATH)}config.h
-golf_prelude.$(OBJEXT): {$(VPATH)}defines.h
-golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c
-golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.rb
-golf_prelude.$(OBJEXT): {$(VPATH)}id.h
-golf_prelude.$(OBJEXT): {$(VPATH)}intern.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal.h
-golf_prelude.$(OBJEXT): {$(VPATH)}iseq.h
-golf_prelude.$(OBJEXT): {$(VPATH)}method.h
-golf_prelude.$(OBJEXT): {$(VPATH)}missing.h
-golf_prelude.$(OBJEXT): {$(VPATH)}node.h
-golf_prelude.$(OBJEXT): {$(VPATH)}ruby_assert.h
-golf_prelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-golf_prelude.$(OBJEXT): {$(VPATH)}st.h
-golf_prelude.$(OBJEXT): {$(VPATH)}subst.h
-golf_prelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-golf_prelude.$(OBJEXT): {$(VPATH)}thread_native.h
-golf_prelude.$(OBJEXT): {$(VPATH)}vm_core.h
-golf_prelude.$(OBJEXT): {$(VPATH)}vm_opts.h
+gc.$(OBJEXT): {$(VPATH)}vm_sync.h
+goruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+goruby.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+goruby.$(OBJEXT): $(CCAN_DIR)/list/list.h
+goruby.$(OBJEXT): $(CCAN_DIR)/str/str.h
goruby.$(OBJEXT): $(hdrdir)/ruby.h
goruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/array.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/gc.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/serial.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/variable.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/vm.h
+goruby.$(OBJEXT): $(top_srcdir)/internal/warnings.h
goruby.$(OBJEXT): {$(VPATH)}assert.h
+goruby.$(OBJEXT): {$(VPATH)}atomic.h
goruby.$(OBJEXT): {$(VPATH)}backward.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+goruby.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
goruby.$(OBJEXT): {$(VPATH)}config.h
+goruby.$(OBJEXT): {$(VPATH)}constant.h
goruby.$(OBJEXT): {$(VPATH)}defines.h
+goruby.$(OBJEXT): {$(VPATH)}golf_prelude.c
goruby.$(OBJEXT): {$(VPATH)}goruby.c
+goruby.$(OBJEXT): {$(VPATH)}id.h
+goruby.$(OBJEXT): {$(VPATH)}id_table.h
goruby.$(OBJEXT): {$(VPATH)}intern.h
+goruby.$(OBJEXT): {$(VPATH)}internal.h
+goruby.$(OBJEXT): {$(VPATH)}internal/abi.h
+goruby.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+goruby.$(OBJEXT): {$(VPATH)}internal/assume.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+goruby.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+goruby.$(OBJEXT): {$(VPATH)}internal/cast.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+goruby.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+goruby.$(OBJEXT): {$(VPATH)}internal/config.h
+goruby.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+goruby.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+goruby.$(OBJEXT): {$(VPATH)}internal/ctype.h
+goruby.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+goruby.$(OBJEXT): {$(VPATH)}internal/dosish.h
+goruby.$(OBJEXT): {$(VPATH)}internal/error.h
+goruby.$(OBJEXT): {$(VPATH)}internal/eval.h
+goruby.$(OBJEXT): {$(VPATH)}internal/event.h
+goruby.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+goruby.$(OBJEXT): {$(VPATH)}internal/gc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/glob.h
+goruby.$(OBJEXT): {$(VPATH)}internal/globals.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+goruby.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+goruby.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+goruby.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+goruby.$(OBJEXT): {$(VPATH)}internal/iterator.h
+goruby.$(OBJEXT): {$(VPATH)}internal/memory.h
+goruby.$(OBJEXT): {$(VPATH)}internal/method.h
+goruby.$(OBJEXT): {$(VPATH)}internal/module.h
+goruby.$(OBJEXT): {$(VPATH)}internal/newobj.h
+goruby.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+goruby.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+goruby.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+goruby.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+goruby.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+goruby.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+goruby.$(OBJEXT): {$(VPATH)}internal/symbol.h
+goruby.$(OBJEXT): {$(VPATH)}internal/value.h
+goruby.$(OBJEXT): {$(VPATH)}internal/value_type.h
+goruby.$(OBJEXT): {$(VPATH)}internal/variable.h
+goruby.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+goruby.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+goruby.$(OBJEXT): {$(VPATH)}iseq.h
goruby.$(OBJEXT): {$(VPATH)}main.c
+goruby.$(OBJEXT): {$(VPATH)}method.h
goruby.$(OBJEXT): {$(VPATH)}missing.h
goruby.$(OBJEXT): {$(VPATH)}node.h
+goruby.$(OBJEXT): {$(VPATH)}ruby_assert.h
+goruby.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+goruby.$(OBJEXT): {$(VPATH)}shape.h
goruby.$(OBJEXT): {$(VPATH)}st.h
goruby.$(OBJEXT): {$(VPATH)}subst.h
+goruby.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+goruby.$(OBJEXT): {$(VPATH)}thread_native.h
+goruby.$(OBJEXT): {$(VPATH)}vm_core.h
goruby.$(OBJEXT): {$(VPATH)}vm_debug.h
-hash.$(OBJEXT): $(hdrdir)/ruby.h
+goruby.$(OBJEXT): {$(VPATH)}vm_opts.h
+hash.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+hash.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+hash.$(OBJEXT): $(CCAN_DIR)/list/list.h
+hash.$(OBJEXT): $(CCAN_DIR)/str/str.h
hash.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+hash.$(OBJEXT): $(top_srcdir)/internal/array.h
+hash.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+hash.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+hash.$(OBJEXT): $(top_srcdir)/internal/bits.h
+hash.$(OBJEXT): $(top_srcdir)/internal/class.h
+hash.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+hash.$(OBJEXT): $(top_srcdir)/internal/cont.h
+hash.$(OBJEXT): $(top_srcdir)/internal/error.h
+hash.$(OBJEXT): $(top_srcdir)/internal/gc.h
+hash.$(OBJEXT): $(top_srcdir)/internal/hash.h
+hash.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+hash.$(OBJEXT): $(top_srcdir)/internal/object.h
+hash.$(OBJEXT): $(top_srcdir)/internal/proc.h
+hash.$(OBJEXT): $(top_srcdir)/internal/serial.h
+hash.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+hash.$(OBJEXT): $(top_srcdir)/internal/string.h
+hash.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+hash.$(OBJEXT): $(top_srcdir)/internal/thread.h
+hash.$(OBJEXT): $(top_srcdir)/internal/time.h
+hash.$(OBJEXT): $(top_srcdir)/internal/variable.h
+hash.$(OBJEXT): $(top_srcdir)/internal/vm.h
+hash.$(OBJEXT): $(top_srcdir)/internal/warnings.h
hash.$(OBJEXT): {$(VPATH)}assert.h
+hash.$(OBJEXT): {$(VPATH)}atomic.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+hash.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
hash.$(OBJEXT): {$(VPATH)}config.h
+hash.$(OBJEXT): {$(VPATH)}constant.h
hash.$(OBJEXT): {$(VPATH)}debug_counter.h
hash.$(OBJEXT): {$(VPATH)}defines.h
hash.$(OBJEXT): {$(VPATH)}encoding.h
hash.$(OBJEXT): {$(VPATH)}hash.c
hash.$(OBJEXT): {$(VPATH)}id.h
+hash.$(OBJEXT): {$(VPATH)}id_table.h
hash.$(OBJEXT): {$(VPATH)}intern.h
hash.$(OBJEXT): {$(VPATH)}internal.h
+hash.$(OBJEXT): {$(VPATH)}internal/abi.h
+hash.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+hash.$(OBJEXT): {$(VPATH)}internal/assume.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+hash.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+hash.$(OBJEXT): {$(VPATH)}internal/cast.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+hash.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+hash.$(OBJEXT): {$(VPATH)}internal/config.h
+hash.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+hash.$(OBJEXT): {$(VPATH)}internal/core.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+hash.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+hash.$(OBJEXT): {$(VPATH)}internal/ctype.h
+hash.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+hash.$(OBJEXT): {$(VPATH)}internal/dosish.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+hash.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+hash.$(OBJEXT): {$(VPATH)}internal/error.h
+hash.$(OBJEXT): {$(VPATH)}internal/eval.h
+hash.$(OBJEXT): {$(VPATH)}internal/event.h
+hash.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+hash.$(OBJEXT): {$(VPATH)}internal/gc.h
+hash.$(OBJEXT): {$(VPATH)}internal/glob.h
+hash.$(OBJEXT): {$(VPATH)}internal/globals.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+hash.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+hash.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+hash.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+hash.$(OBJEXT): {$(VPATH)}internal/iterator.h
+hash.$(OBJEXT): {$(VPATH)}internal/memory.h
+hash.$(OBJEXT): {$(VPATH)}internal/method.h
+hash.$(OBJEXT): {$(VPATH)}internal/module.h
+hash.$(OBJEXT): {$(VPATH)}internal/newobj.h
+hash.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+hash.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+hash.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+hash.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+hash.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+hash.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+hash.$(OBJEXT): {$(VPATH)}internal/symbol.h
+hash.$(OBJEXT): {$(VPATH)}internal/value.h
+hash.$(OBJEXT): {$(VPATH)}internal/value_type.h
+hash.$(OBJEXT): {$(VPATH)}internal/variable.h
+hash.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+hash.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+hash.$(OBJEXT): {$(VPATH)}iseq.h
+hash.$(OBJEXT): {$(VPATH)}method.h
hash.$(OBJEXT): {$(VPATH)}missing.h
+hash.$(OBJEXT): {$(VPATH)}node.h
hash.$(OBJEXT): {$(VPATH)}onigmo.h
hash.$(OBJEXT): {$(VPATH)}oniguruma.h
hash.$(OBJEXT): {$(VPATH)}probes.dmyh
hash.$(OBJEXT): {$(VPATH)}probes.h
+hash.$(OBJEXT): {$(VPATH)}ractor.h
hash.$(OBJEXT): {$(VPATH)}ruby_assert.h
+hash.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+hash.$(OBJEXT): {$(VPATH)}shape.h
hash.$(OBJEXT): {$(VPATH)}st.h
hash.$(OBJEXT): {$(VPATH)}subst.h
hash.$(OBJEXT): {$(VPATH)}symbol.h
+hash.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+hash.$(OBJEXT): {$(VPATH)}thread_native.h
hash.$(OBJEXT): {$(VPATH)}transient_heap.h
hash.$(OBJEXT): {$(VPATH)}util.h
+hash.$(OBJEXT): {$(VPATH)}vm_core.h
+hash.$(OBJEXT): {$(VPATH)}vm_debug.h
+hash.$(OBJEXT): {$(VPATH)}vm_opts.h
+hash.$(OBJEXT): {$(VPATH)}vm_sync.h
inits.$(OBJEXT): $(hdrdir)/ruby.h
inits.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+inits.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+inits.$(OBJEXT): $(top_srcdir)/internal/inits.h
+inits.$(OBJEXT): $(top_srcdir)/internal/warnings.h
inits.$(OBJEXT): {$(VPATH)}assert.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+inits.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
inits.$(OBJEXT): {$(VPATH)}builtin.h
inits.$(OBJEXT): {$(VPATH)}config.h
inits.$(OBJEXT): {$(VPATH)}defines.h
inits.$(OBJEXT): {$(VPATH)}inits.c
inits.$(OBJEXT): {$(VPATH)}intern.h
-inits.$(OBJEXT): {$(VPATH)}internal.h
+inits.$(OBJEXT): {$(VPATH)}internal/abi.h
+inits.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+inits.$(OBJEXT): {$(VPATH)}internal/assume.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+inits.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+inits.$(OBJEXT): {$(VPATH)}internal/cast.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+inits.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+inits.$(OBJEXT): {$(VPATH)}internal/config.h
+inits.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+inits.$(OBJEXT): {$(VPATH)}internal/core.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+inits.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+inits.$(OBJEXT): {$(VPATH)}internal/ctype.h
+inits.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+inits.$(OBJEXT): {$(VPATH)}internal/dosish.h
+inits.$(OBJEXT): {$(VPATH)}internal/error.h
+inits.$(OBJEXT): {$(VPATH)}internal/eval.h
+inits.$(OBJEXT): {$(VPATH)}internal/event.h
+inits.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+inits.$(OBJEXT): {$(VPATH)}internal/gc.h
+inits.$(OBJEXT): {$(VPATH)}internal/glob.h
+inits.$(OBJEXT): {$(VPATH)}internal/globals.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+inits.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+inits.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+inits.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+inits.$(OBJEXT): {$(VPATH)}internal/iterator.h
+inits.$(OBJEXT): {$(VPATH)}internal/memory.h
+inits.$(OBJEXT): {$(VPATH)}internal/method.h
+inits.$(OBJEXT): {$(VPATH)}internal/module.h
+inits.$(OBJEXT): {$(VPATH)}internal/newobj.h
+inits.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+inits.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+inits.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+inits.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+inits.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+inits.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+inits.$(OBJEXT): {$(VPATH)}internal/symbol.h
+inits.$(OBJEXT): {$(VPATH)}internal/value.h
+inits.$(OBJEXT): {$(VPATH)}internal/value_type.h
+inits.$(OBJEXT): {$(VPATH)}internal/variable.h
+inits.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+inits.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
inits.$(OBJEXT): {$(VPATH)}missing.h
inits.$(OBJEXT): {$(VPATH)}prelude.rbinc
inits.$(OBJEXT): {$(VPATH)}st.h
@@ -2183,28 +7587,216 @@ io.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
io.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
io.$(OBJEXT): $(CCAN_DIR)/list/list.h
io.$(OBJEXT): $(CCAN_DIR)/str/str.h
-io.$(OBJEXT): $(hdrdir)/ruby.h
io.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+io.$(OBJEXT): $(top_srcdir)/internal/array.h
+io.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+io.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+io.$(OBJEXT): $(top_srcdir)/internal/bits.h
+io.$(OBJEXT): $(top_srcdir)/internal/class.h
+io.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+io.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+io.$(OBJEXT): $(top_srcdir)/internal/error.h
+io.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+io.$(OBJEXT): $(top_srcdir)/internal/gc.h
+io.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+io.$(OBJEXT): $(top_srcdir)/internal/inits.h
+io.$(OBJEXT): $(top_srcdir)/internal/io.h
+io.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+io.$(OBJEXT): $(top_srcdir)/internal/object.h
+io.$(OBJEXT): $(top_srcdir)/internal/process.h
+io.$(OBJEXT): $(top_srcdir)/internal/serial.h
+io.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+io.$(OBJEXT): $(top_srcdir)/internal/string.h
+io.$(OBJEXT): $(top_srcdir)/internal/thread.h
+io.$(OBJEXT): $(top_srcdir)/internal/transcode.h
+io.$(OBJEXT): $(top_srcdir)/internal/variable.h
+io.$(OBJEXT): $(top_srcdir)/internal/vm.h
+io.$(OBJEXT): $(top_srcdir)/internal/warnings.h
io.$(OBJEXT): {$(VPATH)}assert.h
+io.$(OBJEXT): {$(VPATH)}atomic.h
+io.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+io.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+io.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+io.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+io.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+io.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+io.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+io.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+io.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
io.$(OBJEXT): {$(VPATH)}builtin.h
io.$(OBJEXT): {$(VPATH)}config.h
+io.$(OBJEXT): {$(VPATH)}constant.h
io.$(OBJEXT): {$(VPATH)}defines.h
io.$(OBJEXT): {$(VPATH)}dln.h
io.$(OBJEXT): {$(VPATH)}encindex.h
io.$(OBJEXT): {$(VPATH)}encoding.h
+io.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
io.$(OBJEXT): {$(VPATH)}id.h
+io.$(OBJEXT): {$(VPATH)}id_table.h
io.$(OBJEXT): {$(VPATH)}intern.h
io.$(OBJEXT): {$(VPATH)}internal.h
+io.$(OBJEXT): {$(VPATH)}internal/abi.h
+io.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+io.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+io.$(OBJEXT): {$(VPATH)}internal/assume.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+io.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+io.$(OBJEXT): {$(VPATH)}internal/cast.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+io.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+io.$(OBJEXT): {$(VPATH)}internal/config.h
+io.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+io.$(OBJEXT): {$(VPATH)}internal/core.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+io.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+io.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+io.$(OBJEXT): {$(VPATH)}internal/ctype.h
+io.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+io.$(OBJEXT): {$(VPATH)}internal/dosish.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+io.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+io.$(OBJEXT): {$(VPATH)}internal/error.h
+io.$(OBJEXT): {$(VPATH)}internal/eval.h
+io.$(OBJEXT): {$(VPATH)}internal/event.h
+io.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+io.$(OBJEXT): {$(VPATH)}internal/gc.h
+io.$(OBJEXT): {$(VPATH)}internal/glob.h
+io.$(OBJEXT): {$(VPATH)}internal/globals.h
+io.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+io.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+io.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+io.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+io.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+io.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+io.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+io.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+io.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+io.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+io.$(OBJEXT): {$(VPATH)}internal/iterator.h
+io.$(OBJEXT): {$(VPATH)}internal/memory.h
+io.$(OBJEXT): {$(VPATH)}internal/method.h
+io.$(OBJEXT): {$(VPATH)}internal/module.h
+io.$(OBJEXT): {$(VPATH)}internal/newobj.h
+io.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+io.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+io.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+io.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+io.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+io.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+io.$(OBJEXT): {$(VPATH)}internal/symbol.h
+io.$(OBJEXT): {$(VPATH)}internal/value.h
+io.$(OBJEXT): {$(VPATH)}internal/value_type.h
+io.$(OBJEXT): {$(VPATH)}internal/variable.h
+io.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+io.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
io.$(OBJEXT): {$(VPATH)}io.c
io.$(OBJEXT): {$(VPATH)}io.h
io.$(OBJEXT): {$(VPATH)}io.rbinc
+io.$(OBJEXT): {$(VPATH)}io/buffer.h
io.$(OBJEXT): {$(VPATH)}method.h
io.$(OBJEXT): {$(VPATH)}missing.h
io.$(OBJEXT): {$(VPATH)}node.h
io.$(OBJEXT): {$(VPATH)}onigmo.h
io.$(OBJEXT): {$(VPATH)}oniguruma.h
+io.$(OBJEXT): {$(VPATH)}ractor.h
io.$(OBJEXT): {$(VPATH)}ruby_assert.h
io.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+io.$(OBJEXT): {$(VPATH)}shape.h
io.$(OBJEXT): {$(VPATH)}st.h
io.$(OBJEXT): {$(VPATH)}subst.h
io.$(OBJEXT): {$(VPATH)}thread.h
@@ -2213,17 +7805,236 @@ io.$(OBJEXT): {$(VPATH)}thread_native.h
io.$(OBJEXT): {$(VPATH)}util.h
io.$(OBJEXT): {$(VPATH)}vm_core.h
io.$(OBJEXT): {$(VPATH)}vm_opts.h
+io_buffer.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/array.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/bits.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/error.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/serial.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/string.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/thread.h
+io_buffer.$(OBJEXT): $(top_srcdir)/internal/vm.h
+io_buffer.$(OBJEXT): {$(VPATH)}assert.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+io_buffer.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+io_buffer.$(OBJEXT): {$(VPATH)}config.h
+io_buffer.$(OBJEXT): {$(VPATH)}defines.h
+io_buffer.$(OBJEXT): {$(VPATH)}encoding.h
+io_buffer.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
+io_buffer.$(OBJEXT): {$(VPATH)}intern.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/abi.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/assume.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/cast.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/config.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/ctype.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/dosish.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/error.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/eval.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/event.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/gc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/glob.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/globals.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/iterator.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/memory.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/method.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/module.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/newobj.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/symbol.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/value.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/value_type.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/variable.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+io_buffer.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+io_buffer.$(OBJEXT): {$(VPATH)}io.h
+io_buffer.$(OBJEXT): {$(VPATH)}io/buffer.h
+io_buffer.$(OBJEXT): {$(VPATH)}io_buffer.c
+io_buffer.$(OBJEXT): {$(VPATH)}missing.h
+io_buffer.$(OBJEXT): {$(VPATH)}onigmo.h
+io_buffer.$(OBJEXT): {$(VPATH)}oniguruma.h
+io_buffer.$(OBJEXT): {$(VPATH)}st.h
+io_buffer.$(OBJEXT): {$(VPATH)}subst.h
iseq.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
iseq.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
iseq.$(OBJEXT): $(CCAN_DIR)/list/list.h
iseq.$(OBJEXT): $(CCAN_DIR)/str/str.h
iseq.$(OBJEXT): $(hdrdir)/ruby.h
iseq.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/array.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/bits.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/class.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/compile.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/error.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/file.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/gc.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/hash.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/parse.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/serial.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/string.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/thread.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/variable.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/vm.h
+iseq.$(OBJEXT): $(top_srcdir)/internal/warnings.h
iseq.$(OBJEXT): {$(VPATH)}assert.h
+iseq.$(OBJEXT): {$(VPATH)}atomic.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+iseq.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
iseq.$(OBJEXT): {$(VPATH)}builtin.h
iseq.$(OBJEXT): {$(VPATH)}config.h
+iseq.$(OBJEXT): {$(VPATH)}constant.h
iseq.$(OBJEXT): {$(VPATH)}debug_counter.h
iseq.$(OBJEXT): {$(VPATH)}defines.h
+iseq.$(OBJEXT): {$(VPATH)}encoding.h
iseq.$(OBJEXT): {$(VPATH)}eval_intern.h
iseq.$(OBJEXT): {$(VPATH)}gc.h
iseq.$(OBJEXT): {$(VPATH)}id.h
@@ -2233,6 +8044,155 @@ iseq.$(OBJEXT): {$(VPATH)}insns.inc
iseq.$(OBJEXT): {$(VPATH)}insns_info.inc
iseq.$(OBJEXT): {$(VPATH)}intern.h
iseq.$(OBJEXT): {$(VPATH)}internal.h
+iseq.$(OBJEXT): {$(VPATH)}internal/abi.h
+iseq.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+iseq.$(OBJEXT): {$(VPATH)}internal/assume.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+iseq.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+iseq.$(OBJEXT): {$(VPATH)}internal/cast.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+iseq.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+iseq.$(OBJEXT): {$(VPATH)}internal/config.h
+iseq.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+iseq.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+iseq.$(OBJEXT): {$(VPATH)}internal/ctype.h
+iseq.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+iseq.$(OBJEXT): {$(VPATH)}internal/dosish.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+iseq.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+iseq.$(OBJEXT): {$(VPATH)}internal/error.h
+iseq.$(OBJEXT): {$(VPATH)}internal/eval.h
+iseq.$(OBJEXT): {$(VPATH)}internal/event.h
+iseq.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+iseq.$(OBJEXT): {$(VPATH)}internal/gc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/glob.h
+iseq.$(OBJEXT): {$(VPATH)}internal/globals.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+iseq.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+iseq.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+iseq.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+iseq.$(OBJEXT): {$(VPATH)}internal/iterator.h
+iseq.$(OBJEXT): {$(VPATH)}internal/memory.h
+iseq.$(OBJEXT): {$(VPATH)}internal/method.h
+iseq.$(OBJEXT): {$(VPATH)}internal/module.h
+iseq.$(OBJEXT): {$(VPATH)}internal/newobj.h
+iseq.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+iseq.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+iseq.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+iseq.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+iseq.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+iseq.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+iseq.$(OBJEXT): {$(VPATH)}internal/symbol.h
+iseq.$(OBJEXT): {$(VPATH)}internal/value.h
+iseq.$(OBJEXT): {$(VPATH)}internal/value_type.h
+iseq.$(OBJEXT): {$(VPATH)}internal/variable.h
+iseq.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+iseq.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
iseq.$(OBJEXT): {$(VPATH)}iseq.c
iseq.$(OBJEXT): {$(VPATH)}iseq.h
iseq.$(OBJEXT): {$(VPATH)}method.h
@@ -2240,30 +8200,214 @@ iseq.$(OBJEXT): {$(VPATH)}missing.h
iseq.$(OBJEXT): {$(VPATH)}mjit.h
iseq.$(OBJEXT): {$(VPATH)}node.h
iseq.$(OBJEXT): {$(VPATH)}node_name.inc
+iseq.$(OBJEXT): {$(VPATH)}onigmo.h
+iseq.$(OBJEXT): {$(VPATH)}oniguruma.h
+iseq.$(OBJEXT): {$(VPATH)}ractor.h
iseq.$(OBJEXT): {$(VPATH)}ruby_assert.h
iseq.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+iseq.$(OBJEXT): {$(VPATH)}shape.h
iseq.$(OBJEXT): {$(VPATH)}st.h
iseq.$(OBJEXT): {$(VPATH)}subst.h
iseq.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
iseq.$(OBJEXT): {$(VPATH)}thread_native.h
iseq.$(OBJEXT): {$(VPATH)}util.h
+iseq.$(OBJEXT): {$(VPATH)}vm_callinfo.h
iseq.$(OBJEXT): {$(VPATH)}vm_core.h
iseq.$(OBJEXT): {$(VPATH)}vm_opts.h
+iseq.$(OBJEXT): {$(VPATH)}yjit.h
load.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
load.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
load.$(OBJEXT): $(CCAN_DIR)/list/list.h
load.$(OBJEXT): $(CCAN_DIR)/str/str.h
-load.$(OBJEXT): $(hdrdir)/ruby.h
load.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+load.$(OBJEXT): $(top_srcdir)/internal/array.h
+load.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+load.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+load.$(OBJEXT): $(top_srcdir)/internal/dir.h
+load.$(OBJEXT): $(top_srcdir)/internal/error.h
+load.$(OBJEXT): $(top_srcdir)/internal/file.h
+load.$(OBJEXT): $(top_srcdir)/internal/gc.h
+load.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+load.$(OBJEXT): $(top_srcdir)/internal/load.h
+load.$(OBJEXT): $(top_srcdir)/internal/parse.h
+load.$(OBJEXT): $(top_srcdir)/internal/serial.h
+load.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+load.$(OBJEXT): $(top_srcdir)/internal/string.h
+load.$(OBJEXT): $(top_srcdir)/internal/thread.h
+load.$(OBJEXT): $(top_srcdir)/internal/variable.h
+load.$(OBJEXT): $(top_srcdir)/internal/vm.h
+load.$(OBJEXT): $(top_srcdir)/internal/warnings.h
load.$(OBJEXT): {$(VPATH)}assert.h
+load.$(OBJEXT): {$(VPATH)}atomic.h
+load.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+load.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+load.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+load.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+load.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+load.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+load.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+load.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+load.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
load.$(OBJEXT): {$(VPATH)}config.h
+load.$(OBJEXT): {$(VPATH)}constant.h
+load.$(OBJEXT): {$(VPATH)}darray.h
load.$(OBJEXT): {$(VPATH)}defines.h
load.$(OBJEXT): {$(VPATH)}dln.h
load.$(OBJEXT): {$(VPATH)}encoding.h
load.$(OBJEXT): {$(VPATH)}eval_intern.h
load.$(OBJEXT): {$(VPATH)}id.h
+load.$(OBJEXT): {$(VPATH)}id_table.h
load.$(OBJEXT): {$(VPATH)}intern.h
load.$(OBJEXT): {$(VPATH)}internal.h
+load.$(OBJEXT): {$(VPATH)}internal/abi.h
+load.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+load.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+load.$(OBJEXT): {$(VPATH)}internal/assume.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+load.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+load.$(OBJEXT): {$(VPATH)}internal/cast.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+load.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+load.$(OBJEXT): {$(VPATH)}internal/config.h
+load.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+load.$(OBJEXT): {$(VPATH)}internal/core.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+load.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+load.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+load.$(OBJEXT): {$(VPATH)}internal/ctype.h
+load.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+load.$(OBJEXT): {$(VPATH)}internal/dosish.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+load.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+load.$(OBJEXT): {$(VPATH)}internal/error.h
+load.$(OBJEXT): {$(VPATH)}internal/eval.h
+load.$(OBJEXT): {$(VPATH)}internal/event.h
+load.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+load.$(OBJEXT): {$(VPATH)}internal/gc.h
+load.$(OBJEXT): {$(VPATH)}internal/glob.h
+load.$(OBJEXT): {$(VPATH)}internal/globals.h
+load.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+load.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+load.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+load.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+load.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+load.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+load.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+load.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+load.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+load.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+load.$(OBJEXT): {$(VPATH)}internal/iterator.h
+load.$(OBJEXT): {$(VPATH)}internal/memory.h
+load.$(OBJEXT): {$(VPATH)}internal/method.h
+load.$(OBJEXT): {$(VPATH)}internal/module.h
+load.$(OBJEXT): {$(VPATH)}internal/newobj.h
+load.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+load.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+load.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+load.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+load.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+load.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+load.$(OBJEXT): {$(VPATH)}internal/symbol.h
+load.$(OBJEXT): {$(VPATH)}internal/value.h
+load.$(OBJEXT): {$(VPATH)}internal/value_type.h
+load.$(OBJEXT): {$(VPATH)}internal/variable.h
+load.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+load.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
load.$(OBJEXT): {$(VPATH)}iseq.h
load.$(OBJEXT): {$(VPATH)}load.c
load.$(OBJEXT): {$(VPATH)}method.h
@@ -2275,6 +8419,7 @@ load.$(OBJEXT): {$(VPATH)}probes.dmyh
load.$(OBJEXT): {$(VPATH)}probes.h
load.$(OBJEXT): {$(VPATH)}ruby_assert.h
load.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+load.$(OBJEXT): {$(VPATH)}shape.h
load.$(OBJEXT): {$(VPATH)}st.h
load.$(OBJEXT): {$(VPATH)}subst.h
load.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -2286,23 +8431,327 @@ loadpath.$(OBJEXT): $(hdrdir)/ruby/ruby.h
loadpath.$(OBJEXT): $(hdrdir)/ruby/version.h
loadpath.$(OBJEXT): $(top_srcdir)/version.h
loadpath.$(OBJEXT): {$(VPATH)}assert.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+loadpath.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
loadpath.$(OBJEXT): {$(VPATH)}config.h
loadpath.$(OBJEXT): {$(VPATH)}defines.h
loadpath.$(OBJEXT): {$(VPATH)}intern.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/abi.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/assume.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/cast.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/config.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/ctype.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/dosish.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/error.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/eval.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/event.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/gc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/glob.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/globals.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/iterator.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/memory.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/method.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/module.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/newobj.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/symbol.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/value.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/value_type.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/variable.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+loadpath.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
loadpath.$(OBJEXT): {$(VPATH)}loadpath.c
loadpath.$(OBJEXT): {$(VPATH)}missing.h
loadpath.$(OBJEXT): {$(VPATH)}st.h
loadpath.$(OBJEXT): {$(VPATH)}subst.h
loadpath.$(OBJEXT): {$(VPATH)}verconf.h
-localeinit.$(OBJEXT): $(hdrdir)/ruby.h
localeinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
localeinit.$(OBJEXT): {$(VPATH)}assert.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+localeinit.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
localeinit.$(OBJEXT): {$(VPATH)}config.h
localeinit.$(OBJEXT): {$(VPATH)}defines.h
localeinit.$(OBJEXT): {$(VPATH)}encindex.h
localeinit.$(OBJEXT): {$(VPATH)}encoding.h
localeinit.$(OBJEXT): {$(VPATH)}intern.h
localeinit.$(OBJEXT): {$(VPATH)}internal.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/abi.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/assume.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/cast.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/config.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/ctype.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/dosish.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/error.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/eval.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/event.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/gc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/glob.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/globals.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/iterator.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/memory.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/method.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/module.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/newobj.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/symbol.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/value.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/value_type.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/variable.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+localeinit.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
localeinit.$(OBJEXT): {$(VPATH)}localeinit.c
localeinit.$(OBJEXT): {$(VPATH)}missing.h
localeinit.$(OBJEXT): {$(VPATH)}onigmo.h
@@ -2313,237 +8762,2370 @@ main.$(OBJEXT): $(hdrdir)/ruby.h
main.$(OBJEXT): $(hdrdir)/ruby/ruby.h
main.$(OBJEXT): {$(VPATH)}assert.h
main.$(OBJEXT): {$(VPATH)}backward.h
+main.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+main.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+main.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+main.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+main.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+main.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+main.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+main.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
main.$(OBJEXT): {$(VPATH)}config.h
main.$(OBJEXT): {$(VPATH)}defines.h
main.$(OBJEXT): {$(VPATH)}intern.h
+main.$(OBJEXT): {$(VPATH)}internal/abi.h
+main.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+main.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+main.$(OBJEXT): {$(VPATH)}internal/assume.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+main.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+main.$(OBJEXT): {$(VPATH)}internal/cast.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+main.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+main.$(OBJEXT): {$(VPATH)}internal/config.h
+main.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+main.$(OBJEXT): {$(VPATH)}internal/core.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+main.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+main.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+main.$(OBJEXT): {$(VPATH)}internal/ctype.h
+main.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+main.$(OBJEXT): {$(VPATH)}internal/dosish.h
+main.$(OBJEXT): {$(VPATH)}internal/error.h
+main.$(OBJEXT): {$(VPATH)}internal/eval.h
+main.$(OBJEXT): {$(VPATH)}internal/event.h
+main.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+main.$(OBJEXT): {$(VPATH)}internal/gc.h
+main.$(OBJEXT): {$(VPATH)}internal/glob.h
+main.$(OBJEXT): {$(VPATH)}internal/globals.h
+main.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+main.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+main.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+main.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+main.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+main.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+main.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+main.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+main.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+main.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+main.$(OBJEXT): {$(VPATH)}internal/iterator.h
+main.$(OBJEXT): {$(VPATH)}internal/memory.h
+main.$(OBJEXT): {$(VPATH)}internal/method.h
+main.$(OBJEXT): {$(VPATH)}internal/module.h
+main.$(OBJEXT): {$(VPATH)}internal/newobj.h
+main.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+main.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+main.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+main.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+main.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+main.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+main.$(OBJEXT): {$(VPATH)}internal/symbol.h
+main.$(OBJEXT): {$(VPATH)}internal/value.h
+main.$(OBJEXT): {$(VPATH)}internal/value_type.h
+main.$(OBJEXT): {$(VPATH)}internal/variable.h
+main.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+main.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
main.$(OBJEXT): {$(VPATH)}main.c
main.$(OBJEXT): {$(VPATH)}missing.h
-main.$(OBJEXT): {$(VPATH)}node.h
main.$(OBJEXT): {$(VPATH)}st.h
main.$(OBJEXT): {$(VPATH)}subst.h
main.$(OBJEXT): {$(VPATH)}vm_debug.h
-marshal.$(OBJEXT): $(hdrdir)/ruby.h
+marshal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+marshal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+marshal.$(OBJEXT): $(CCAN_DIR)/list/list.h
+marshal.$(OBJEXT): $(CCAN_DIR)/str/str.h
marshal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/array.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/bits.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/class.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/error.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/gc.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/hash.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/object.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/serial.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/string.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/struct.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/util.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/variable.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/vm.h
+marshal.$(OBJEXT): $(top_srcdir)/internal/warnings.h
marshal.$(OBJEXT): {$(VPATH)}assert.h
+marshal.$(OBJEXT): {$(VPATH)}atomic.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+marshal.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+marshal.$(OBJEXT): {$(VPATH)}builtin.h
marshal.$(OBJEXT): {$(VPATH)}config.h
+marshal.$(OBJEXT): {$(VPATH)}constant.h
marshal.$(OBJEXT): {$(VPATH)}defines.h
marshal.$(OBJEXT): {$(VPATH)}encindex.h
marshal.$(OBJEXT): {$(VPATH)}encoding.h
+marshal.$(OBJEXT): {$(VPATH)}id.h
marshal.$(OBJEXT): {$(VPATH)}id_table.h
marshal.$(OBJEXT): {$(VPATH)}intern.h
marshal.$(OBJEXT): {$(VPATH)}internal.h
+marshal.$(OBJEXT): {$(VPATH)}internal/abi.h
+marshal.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+marshal.$(OBJEXT): {$(VPATH)}internal/assume.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+marshal.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+marshal.$(OBJEXT): {$(VPATH)}internal/cast.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+marshal.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+marshal.$(OBJEXT): {$(VPATH)}internal/config.h
+marshal.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+marshal.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+marshal.$(OBJEXT): {$(VPATH)}internal/ctype.h
+marshal.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+marshal.$(OBJEXT): {$(VPATH)}internal/dosish.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+marshal.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+marshal.$(OBJEXT): {$(VPATH)}internal/error.h
+marshal.$(OBJEXT): {$(VPATH)}internal/eval.h
+marshal.$(OBJEXT): {$(VPATH)}internal/event.h
+marshal.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+marshal.$(OBJEXT): {$(VPATH)}internal/gc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/glob.h
+marshal.$(OBJEXT): {$(VPATH)}internal/globals.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+marshal.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+marshal.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+marshal.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+marshal.$(OBJEXT): {$(VPATH)}internal/iterator.h
+marshal.$(OBJEXT): {$(VPATH)}internal/memory.h
+marshal.$(OBJEXT): {$(VPATH)}internal/method.h
+marshal.$(OBJEXT): {$(VPATH)}internal/module.h
+marshal.$(OBJEXT): {$(VPATH)}internal/newobj.h
+marshal.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+marshal.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+marshal.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+marshal.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+marshal.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+marshal.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+marshal.$(OBJEXT): {$(VPATH)}internal/symbol.h
+marshal.$(OBJEXT): {$(VPATH)}internal/value.h
+marshal.$(OBJEXT): {$(VPATH)}internal/value_type.h
+marshal.$(OBJEXT): {$(VPATH)}internal/variable.h
+marshal.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+marshal.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
marshal.$(OBJEXT): {$(VPATH)}io.h
marshal.$(OBJEXT): {$(VPATH)}marshal.c
+marshal.$(OBJEXT): {$(VPATH)}marshal.rbinc
+marshal.$(OBJEXT): {$(VPATH)}method.h
marshal.$(OBJEXT): {$(VPATH)}missing.h
+marshal.$(OBJEXT): {$(VPATH)}node.h
marshal.$(OBJEXT): {$(VPATH)}onigmo.h
marshal.$(OBJEXT): {$(VPATH)}oniguruma.h
+marshal.$(OBJEXT): {$(VPATH)}ruby_assert.h
+marshal.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+marshal.$(OBJEXT): {$(VPATH)}shape.h
marshal.$(OBJEXT): {$(VPATH)}st.h
marshal.$(OBJEXT): {$(VPATH)}subst.h
+marshal.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+marshal.$(OBJEXT): {$(VPATH)}thread_native.h
marshal.$(OBJEXT): {$(VPATH)}util.h
-math.$(OBJEXT): $(hdrdir)/ruby.h
+marshal.$(OBJEXT): {$(VPATH)}vm_core.h
+marshal.$(OBJEXT): {$(VPATH)}vm_opts.h
math.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+math.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+math.$(OBJEXT): $(top_srcdir)/internal/class.h
+math.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+math.$(OBJEXT): $(top_srcdir)/internal/complex.h
+math.$(OBJEXT): $(top_srcdir)/internal/gc.h
+math.$(OBJEXT): $(top_srcdir)/internal/math.h
+math.$(OBJEXT): $(top_srcdir)/internal/object.h
+math.$(OBJEXT): $(top_srcdir)/internal/serial.h
+math.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+math.$(OBJEXT): $(top_srcdir)/internal/variable.h
+math.$(OBJEXT): $(top_srcdir)/internal/vm.h
+math.$(OBJEXT): $(top_srcdir)/internal/warnings.h
math.$(OBJEXT): {$(VPATH)}assert.h
+math.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+math.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+math.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+math.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+math.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+math.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+math.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+math.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+math.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
math.$(OBJEXT): {$(VPATH)}config.h
+math.$(OBJEXT): {$(VPATH)}constant.h
math.$(OBJEXT): {$(VPATH)}defines.h
+math.$(OBJEXT): {$(VPATH)}id_table.h
math.$(OBJEXT): {$(VPATH)}intern.h
math.$(OBJEXT): {$(VPATH)}internal.h
+math.$(OBJEXT): {$(VPATH)}internal/abi.h
+math.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+math.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+math.$(OBJEXT): {$(VPATH)}internal/assume.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+math.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+math.$(OBJEXT): {$(VPATH)}internal/cast.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+math.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+math.$(OBJEXT): {$(VPATH)}internal/config.h
+math.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+math.$(OBJEXT): {$(VPATH)}internal/core.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+math.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+math.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+math.$(OBJEXT): {$(VPATH)}internal/ctype.h
+math.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+math.$(OBJEXT): {$(VPATH)}internal/dosish.h
+math.$(OBJEXT): {$(VPATH)}internal/error.h
+math.$(OBJEXT): {$(VPATH)}internal/eval.h
+math.$(OBJEXT): {$(VPATH)}internal/event.h
+math.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+math.$(OBJEXT): {$(VPATH)}internal/gc.h
+math.$(OBJEXT): {$(VPATH)}internal/glob.h
+math.$(OBJEXT): {$(VPATH)}internal/globals.h
+math.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+math.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+math.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+math.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+math.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+math.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+math.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+math.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+math.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+math.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+math.$(OBJEXT): {$(VPATH)}internal/iterator.h
+math.$(OBJEXT): {$(VPATH)}internal/memory.h
+math.$(OBJEXT): {$(VPATH)}internal/method.h
+math.$(OBJEXT): {$(VPATH)}internal/module.h
+math.$(OBJEXT): {$(VPATH)}internal/newobj.h
+math.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+math.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+math.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+math.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+math.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+math.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+math.$(OBJEXT): {$(VPATH)}internal/symbol.h
+math.$(OBJEXT): {$(VPATH)}internal/value.h
+math.$(OBJEXT): {$(VPATH)}internal/value_type.h
+math.$(OBJEXT): {$(VPATH)}internal/variable.h
+math.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+math.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
math.$(OBJEXT): {$(VPATH)}math.c
math.$(OBJEXT): {$(VPATH)}missing.h
+math.$(OBJEXT): {$(VPATH)}shape.h
math.$(OBJEXT): {$(VPATH)}st.h
math.$(OBJEXT): {$(VPATH)}subst.h
+memory_view.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+memory_view.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+memory_view.$(OBJEXT): $(top_srcdir)/internal/gc.h
+memory_view.$(OBJEXT): $(top_srcdir)/internal/hash.h
+memory_view.$(OBJEXT): $(top_srcdir)/internal/variable.h
+memory_view.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+memory_view.$(OBJEXT): {$(VPATH)}assert.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+memory_view.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+memory_view.$(OBJEXT): {$(VPATH)}config.h
+memory_view.$(OBJEXT): {$(VPATH)}constant.h
+memory_view.$(OBJEXT): {$(VPATH)}debug_counter.h
+memory_view.$(OBJEXT): {$(VPATH)}defines.h
+memory_view.$(OBJEXT): {$(VPATH)}id_table.h
+memory_view.$(OBJEXT): {$(VPATH)}intern.h
+memory_view.$(OBJEXT): {$(VPATH)}internal.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/abi.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/assume.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/cast.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/config.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/ctype.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/dosish.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/error.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/eval.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/event.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/gc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/glob.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/globals.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/iterator.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/memory.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/method.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/module.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/newobj.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/symbol.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/value.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/value_type.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/variable.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+memory_view.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+memory_view.$(OBJEXT): {$(VPATH)}memory_view.c
+memory_view.$(OBJEXT): {$(VPATH)}memory_view.h
+memory_view.$(OBJEXT): {$(VPATH)}missing.h
+memory_view.$(OBJEXT): {$(VPATH)}shape.h
+memory_view.$(OBJEXT): {$(VPATH)}st.h
+memory_view.$(OBJEXT): {$(VPATH)}subst.h
+memory_view.$(OBJEXT): {$(VPATH)}util.h
+memory_view.$(OBJEXT): {$(VPATH)}vm_debug.h
+memory_view.$(OBJEXT): {$(VPATH)}vm_sync.h
miniinit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
miniinit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
miniinit.$(OBJEXT): $(CCAN_DIR)/list/list.h
miniinit.$(OBJEXT): $(CCAN_DIR)/str/str.h
-miniinit.$(OBJEXT): $(hdrdir)/ruby.h
miniinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+miniinit.$(OBJEXT): $(srcdir)/mjit_c.rb
+miniinit.$(OBJEXT): $(top_srcdir)/internal/array.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/gc.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/serial.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/variable.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/vm.h
+miniinit.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+miniinit.$(OBJEXT): {$(VPATH)}array.rb
miniinit.$(OBJEXT): {$(VPATH)}assert.h
miniinit.$(OBJEXT): {$(VPATH)}ast.rb
+miniinit.$(OBJEXT): {$(VPATH)}atomic.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+miniinit.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
miniinit.$(OBJEXT): {$(VPATH)}builtin.h
miniinit.$(OBJEXT): {$(VPATH)}config.h
+miniinit.$(OBJEXT): {$(VPATH)}constant.h
miniinit.$(OBJEXT): {$(VPATH)}defines.h
+miniinit.$(OBJEXT): {$(VPATH)}dir.rb
miniinit.$(OBJEXT): {$(VPATH)}encoding.h
miniinit.$(OBJEXT): {$(VPATH)}gc.rb
miniinit.$(OBJEXT): {$(VPATH)}gem_prelude.rb
miniinit.$(OBJEXT): {$(VPATH)}id.h
+miniinit.$(OBJEXT): {$(VPATH)}id_table.h
miniinit.$(OBJEXT): {$(VPATH)}intern.h
miniinit.$(OBJEXT): {$(VPATH)}internal.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/abi.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/assume.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/cast.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/config.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/ctype.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/dosish.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/error.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/eval.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/event.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/gc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/glob.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/globals.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/iterator.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/memory.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/method.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/module.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/newobj.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/symbol.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/value.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/value_type.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/variable.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+miniinit.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
miniinit.$(OBJEXT): {$(VPATH)}io.rb
miniinit.$(OBJEXT): {$(VPATH)}iseq.h
+miniinit.$(OBJEXT): {$(VPATH)}kernel.rb
+miniinit.$(OBJEXT): {$(VPATH)}marshal.rb
miniinit.$(OBJEXT): {$(VPATH)}method.h
miniinit.$(OBJEXT): {$(VPATH)}mini_builtin.c
miniinit.$(OBJEXT): {$(VPATH)}miniinit.c
miniinit.$(OBJEXT): {$(VPATH)}miniprelude.c
miniinit.$(OBJEXT): {$(VPATH)}missing.h
+miniinit.$(OBJEXT): {$(VPATH)}mjit.rb
+miniinit.$(OBJEXT): {$(VPATH)}mjit_c.rb
+miniinit.$(OBJEXT): {$(VPATH)}nilclass.rb
miniinit.$(OBJEXT): {$(VPATH)}node.h
+miniinit.$(OBJEXT): {$(VPATH)}numeric.rb
miniinit.$(OBJEXT): {$(VPATH)}onigmo.h
miniinit.$(OBJEXT): {$(VPATH)}oniguruma.h
miniinit.$(OBJEXT): {$(VPATH)}pack.rb
miniinit.$(OBJEXT): {$(VPATH)}prelude.rb
+miniinit.$(OBJEXT): {$(VPATH)}ractor.rb
miniinit.$(OBJEXT): {$(VPATH)}ruby_assert.h
miniinit.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+miniinit.$(OBJEXT): {$(VPATH)}shape.h
miniinit.$(OBJEXT): {$(VPATH)}st.h
miniinit.$(OBJEXT): {$(VPATH)}subst.h
+miniinit.$(OBJEXT): {$(VPATH)}symbol.rb
miniinit.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
miniinit.$(OBJEXT): {$(VPATH)}thread_native.h
+miniinit.$(OBJEXT): {$(VPATH)}thread_sync.rb
+miniinit.$(OBJEXT): {$(VPATH)}timev.rb
miniinit.$(OBJEXT): {$(VPATH)}trace_point.rb
miniinit.$(OBJEXT): {$(VPATH)}vm_core.h
miniinit.$(OBJEXT): {$(VPATH)}vm_opts.h
miniinit.$(OBJEXT): {$(VPATH)}warning.rb
+miniinit.$(OBJEXT): {$(VPATH)}yjit.rb
mjit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
mjit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
mjit.$(OBJEXT): $(CCAN_DIR)/list/list.h
mjit.$(OBJEXT): $(CCAN_DIR)/str/str.h
mjit.$(OBJEXT): $(hdrdir)/ruby.h
mjit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+mjit.$(OBJEXT): $(hdrdir)/ruby/version.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/array.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/class.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/cmdlineopt.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/compile.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/cont.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/file.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/gc.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/hash.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/process.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/serial.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/variable.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/vm.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/warnings.h
mjit.$(OBJEXT): {$(VPATH)}assert.h
+mjit.$(OBJEXT): {$(VPATH)}atomic.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+mjit.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+mjit.$(OBJEXT): {$(VPATH)}builtin.h
mjit.$(OBJEXT): {$(VPATH)}config.h
mjit.$(OBJEXT): {$(VPATH)}constant.h
mjit.$(OBJEXT): {$(VPATH)}debug.h
mjit.$(OBJEXT): {$(VPATH)}debug_counter.h
mjit.$(OBJEXT): {$(VPATH)}defines.h
mjit.$(OBJEXT): {$(VPATH)}dln.h
+mjit.$(OBJEXT): {$(VPATH)}encoding.h
mjit.$(OBJEXT): {$(VPATH)}gc.h
mjit.$(OBJEXT): {$(VPATH)}id.h
mjit.$(OBJEXT): {$(VPATH)}id_table.h
+mjit.$(OBJEXT): {$(VPATH)}insns.def
+mjit.$(OBJEXT): {$(VPATH)}insns.inc
+mjit.$(OBJEXT): {$(VPATH)}insns_info.inc
mjit.$(OBJEXT): {$(VPATH)}intern.h
mjit.$(OBJEXT): {$(VPATH)}internal.h
+mjit.$(OBJEXT): {$(VPATH)}internal/abi.h
+mjit.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+mjit.$(OBJEXT): {$(VPATH)}internal/assume.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+mjit.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+mjit.$(OBJEXT): {$(VPATH)}internal/cast.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+mjit.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+mjit.$(OBJEXT): {$(VPATH)}internal/config.h
+mjit.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+mjit.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+mjit.$(OBJEXT): {$(VPATH)}internal/ctype.h
+mjit.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+mjit.$(OBJEXT): {$(VPATH)}internal/dosish.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+mjit.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+mjit.$(OBJEXT): {$(VPATH)}internal/error.h
+mjit.$(OBJEXT): {$(VPATH)}internal/eval.h
+mjit.$(OBJEXT): {$(VPATH)}internal/event.h
+mjit.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+mjit.$(OBJEXT): {$(VPATH)}internal/gc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/glob.h
+mjit.$(OBJEXT): {$(VPATH)}internal/globals.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+mjit.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+mjit.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+mjit.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+mjit.$(OBJEXT): {$(VPATH)}internal/iterator.h
+mjit.$(OBJEXT): {$(VPATH)}internal/memory.h
+mjit.$(OBJEXT): {$(VPATH)}internal/method.h
+mjit.$(OBJEXT): {$(VPATH)}internal/module.h
+mjit.$(OBJEXT): {$(VPATH)}internal/newobj.h
+mjit.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+mjit.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+mjit.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+mjit.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+mjit.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+mjit.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+mjit.$(OBJEXT): {$(VPATH)}internal/symbol.h
+mjit.$(OBJEXT): {$(VPATH)}internal/value.h
+mjit.$(OBJEXT): {$(VPATH)}internal/value_type.h
+mjit.$(OBJEXT): {$(VPATH)}internal/variable.h
+mjit.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+mjit.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+mjit.$(OBJEXT): {$(VPATH)}iseq.h
mjit.$(OBJEXT): {$(VPATH)}method.h
mjit.$(OBJEXT): {$(VPATH)}missing.h
mjit.$(OBJEXT): {$(VPATH)}mjit.c
mjit.$(OBJEXT): {$(VPATH)}mjit.h
+mjit.$(OBJEXT): {$(VPATH)}mjit.rbinc
+mjit.$(OBJEXT): {$(VPATH)}mjit_c.h
mjit.$(OBJEXT): {$(VPATH)}mjit_config.h
-mjit.$(OBJEXT): {$(VPATH)}mjit_worker.c
mjit.$(OBJEXT): {$(VPATH)}node.h
+mjit.$(OBJEXT): {$(VPATH)}onigmo.h
+mjit.$(OBJEXT): {$(VPATH)}oniguruma.h
+mjit.$(OBJEXT): {$(VPATH)}ractor.h
+mjit.$(OBJEXT): {$(VPATH)}ractor_core.h
mjit.$(OBJEXT): {$(VPATH)}ruby_assert.h
mjit.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+mjit.$(OBJEXT): {$(VPATH)}shape.h
mjit.$(OBJEXT): {$(VPATH)}st.h
mjit.$(OBJEXT): {$(VPATH)}subst.h
mjit.$(OBJEXT): {$(VPATH)}thread.h
mjit.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
mjit.$(OBJEXT): {$(VPATH)}thread_native.h
mjit.$(OBJEXT): {$(VPATH)}util.h
+mjit.$(OBJEXT): {$(VPATH)}vm_callinfo.h
mjit.$(OBJEXT): {$(VPATH)}vm_core.h
+mjit.$(OBJEXT): {$(VPATH)}vm_debug.h
mjit.$(OBJEXT): {$(VPATH)}vm_opts.h
-mjit_compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-mjit_compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-mjit_compile.$(OBJEXT): $(CCAN_DIR)/list/list.h
-mjit_compile.$(OBJEXT): $(CCAN_DIR)/str/str.h
-mjit_compile.$(OBJEXT): $(hdrdir)/ruby.h
-mjit_compile.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-mjit_compile.$(OBJEXT): {$(VPATH)}assert.h
-mjit_compile.$(OBJEXT): {$(VPATH)}builtin.h
-mjit_compile.$(OBJEXT): {$(VPATH)}config.h
-mjit_compile.$(OBJEXT): {$(VPATH)}debug_counter.h
-mjit_compile.$(OBJEXT): {$(VPATH)}defines.h
-mjit_compile.$(OBJEXT): {$(VPATH)}id.h
-mjit_compile.$(OBJEXT): {$(VPATH)}insns.def
-mjit_compile.$(OBJEXT): {$(VPATH)}insns.inc
-mjit_compile.$(OBJEXT): {$(VPATH)}insns_info.inc
-mjit_compile.$(OBJEXT): {$(VPATH)}intern.h
-mjit_compile.$(OBJEXT): {$(VPATH)}internal.h
-mjit_compile.$(OBJEXT): {$(VPATH)}iseq.h
-mjit_compile.$(OBJEXT): {$(VPATH)}method.h
-mjit_compile.$(OBJEXT): {$(VPATH)}missing.h
-mjit_compile.$(OBJEXT): {$(VPATH)}mjit.h
-mjit_compile.$(OBJEXT): {$(VPATH)}mjit_compile.c
-mjit_compile.$(OBJEXT): {$(VPATH)}mjit_compile.inc
-mjit_compile.$(OBJEXT): {$(VPATH)}node.h
-mjit_compile.$(OBJEXT): {$(VPATH)}ruby_assert.h
-mjit_compile.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-mjit_compile.$(OBJEXT): {$(VPATH)}st.h
-mjit_compile.$(OBJEXT): {$(VPATH)}subst.h
-mjit_compile.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-mjit_compile.$(OBJEXT): {$(VPATH)}thread_native.h
-mjit_compile.$(OBJEXT): {$(VPATH)}vm_core.h
-mjit_compile.$(OBJEXT): {$(VPATH)}vm_exec.h
-mjit_compile.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
-mjit_compile.$(OBJEXT): {$(VPATH)}vm_opts.h
+mjit.$(OBJEXT): {$(VPATH)}vm_sync.h
+mjit.$(OBJEXT): {$(VPATH)}yjit.h
+mjit_c.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+mjit_c.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+mjit_c.$(OBJEXT): $(CCAN_DIR)/list/list.h
+mjit_c.$(OBJEXT): $(CCAN_DIR)/str/str.h
+mjit_c.$(OBJEXT): $(hdrdir)/ruby.h
+mjit_c.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+mjit_c.$(OBJEXT): $(srcdir)/mjit_c.rb
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/array.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/class.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/compile.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/gc.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/hash.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/object.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/serial.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/variable.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/vm.h
+mjit_c.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+mjit_c.$(OBJEXT): {$(VPATH)}assert.h
+mjit_c.$(OBJEXT): {$(VPATH)}atomic.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+mjit_c.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+mjit_c.$(OBJEXT): {$(VPATH)}builtin.h
+mjit_c.$(OBJEXT): {$(VPATH)}config.h
+mjit_c.$(OBJEXT): {$(VPATH)}constant.h
+mjit_c.$(OBJEXT): {$(VPATH)}debug_counter.h
+mjit_c.$(OBJEXT): {$(VPATH)}defines.h
+mjit_c.$(OBJEXT): {$(VPATH)}id.h
+mjit_c.$(OBJEXT): {$(VPATH)}id_table.h
+mjit_c.$(OBJEXT): {$(VPATH)}insns.def
+mjit_c.$(OBJEXT): {$(VPATH)}insns.inc
+mjit_c.$(OBJEXT): {$(VPATH)}insns_info.inc
+mjit_c.$(OBJEXT): {$(VPATH)}intern.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/abi.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/assume.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/cast.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/config.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/ctype.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/dosish.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/error.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/eval.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/event.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/gc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/glob.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/globals.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/iterator.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/memory.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/method.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/module.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/newobj.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/symbol.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/value.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/value_type.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/variable.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+mjit_c.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+mjit_c.$(OBJEXT): {$(VPATH)}iseq.h
+mjit_c.$(OBJEXT): {$(VPATH)}method.h
+mjit_c.$(OBJEXT): {$(VPATH)}missing.h
+mjit_c.$(OBJEXT): {$(VPATH)}mjit.h
+mjit_c.$(OBJEXT): {$(VPATH)}mjit_c.c
+mjit_c.$(OBJEXT): {$(VPATH)}mjit_c.h
+mjit_c.$(OBJEXT): {$(VPATH)}mjit_c.rb
+mjit_c.$(OBJEXT): {$(VPATH)}mjit_c.rbinc
+mjit_c.$(OBJEXT): {$(VPATH)}mjit_sp_inc.inc
+mjit_c.$(OBJEXT): {$(VPATH)}node.h
+mjit_c.$(OBJEXT): {$(VPATH)}ruby_assert.h
+mjit_c.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+mjit_c.$(OBJEXT): {$(VPATH)}shape.h
+mjit_c.$(OBJEXT): {$(VPATH)}st.h
+mjit_c.$(OBJEXT): {$(VPATH)}subst.h
+mjit_c.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+mjit_c.$(OBJEXT): {$(VPATH)}thread_native.h
+mjit_c.$(OBJEXT): {$(VPATH)}vm_callinfo.h
+mjit_c.$(OBJEXT): {$(VPATH)}vm_core.h
+mjit_c.$(OBJEXT): {$(VPATH)}vm_exec.h
+mjit_c.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
+mjit_c.$(OBJEXT): {$(VPATH)}vm_opts.h
+mjit_c.$(OBJEXT): {$(VPATH)}yjit.h
node.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
node.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
node.$(OBJEXT): $(CCAN_DIR)/list/list.h
node.$(OBJEXT): $(CCAN_DIR)/str/str.h
-node.$(OBJEXT): $(hdrdir)/ruby.h
node.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+node.$(OBJEXT): $(top_srcdir)/internal/array.h
+node.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+node.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+node.$(OBJEXT): $(top_srcdir)/internal/gc.h
+node.$(OBJEXT): $(top_srcdir)/internal/hash.h
+node.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+node.$(OBJEXT): $(top_srcdir)/internal/serial.h
+node.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+node.$(OBJEXT): $(top_srcdir)/internal/variable.h
+node.$(OBJEXT): $(top_srcdir)/internal/vm.h
+node.$(OBJEXT): $(top_srcdir)/internal/warnings.h
node.$(OBJEXT): {$(VPATH)}assert.h
+node.$(OBJEXT): {$(VPATH)}atomic.h
+node.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+node.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+node.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+node.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+node.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+node.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+node.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+node.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+node.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
node.$(OBJEXT): {$(VPATH)}config.h
+node.$(OBJEXT): {$(VPATH)}constant.h
node.$(OBJEXT): {$(VPATH)}defines.h
node.$(OBJEXT): {$(VPATH)}id.h
+node.$(OBJEXT): {$(VPATH)}id_table.h
node.$(OBJEXT): {$(VPATH)}intern.h
node.$(OBJEXT): {$(VPATH)}internal.h
+node.$(OBJEXT): {$(VPATH)}internal/abi.h
+node.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+node.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+node.$(OBJEXT): {$(VPATH)}internal/assume.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+node.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+node.$(OBJEXT): {$(VPATH)}internal/cast.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+node.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+node.$(OBJEXT): {$(VPATH)}internal/config.h
+node.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+node.$(OBJEXT): {$(VPATH)}internal/core.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+node.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+node.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+node.$(OBJEXT): {$(VPATH)}internal/ctype.h
+node.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+node.$(OBJEXT): {$(VPATH)}internal/dosish.h
+node.$(OBJEXT): {$(VPATH)}internal/error.h
+node.$(OBJEXT): {$(VPATH)}internal/eval.h
+node.$(OBJEXT): {$(VPATH)}internal/event.h
+node.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+node.$(OBJEXT): {$(VPATH)}internal/gc.h
+node.$(OBJEXT): {$(VPATH)}internal/glob.h
+node.$(OBJEXT): {$(VPATH)}internal/globals.h
+node.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+node.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+node.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+node.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+node.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+node.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+node.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+node.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+node.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+node.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+node.$(OBJEXT): {$(VPATH)}internal/iterator.h
+node.$(OBJEXT): {$(VPATH)}internal/memory.h
+node.$(OBJEXT): {$(VPATH)}internal/method.h
+node.$(OBJEXT): {$(VPATH)}internal/module.h
+node.$(OBJEXT): {$(VPATH)}internal/newobj.h
+node.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+node.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+node.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+node.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+node.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+node.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+node.$(OBJEXT): {$(VPATH)}internal/symbol.h
+node.$(OBJEXT): {$(VPATH)}internal/value.h
+node.$(OBJEXT): {$(VPATH)}internal/value_type.h
+node.$(OBJEXT): {$(VPATH)}internal/variable.h
+node.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+node.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
node.$(OBJEXT): {$(VPATH)}method.h
node.$(OBJEXT): {$(VPATH)}missing.h
node.$(OBJEXT): {$(VPATH)}node.c
node.$(OBJEXT): {$(VPATH)}node.h
node.$(OBJEXT): {$(VPATH)}ruby_assert.h
node.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+node.$(OBJEXT): {$(VPATH)}shape.h
node.$(OBJEXT): {$(VPATH)}st.h
node.$(OBJEXT): {$(VPATH)}subst.h
node.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
node.$(OBJEXT): {$(VPATH)}thread_native.h
node.$(OBJEXT): {$(VPATH)}vm_core.h
node.$(OBJEXT): {$(VPATH)}vm_opts.h
-numeric.$(OBJEXT): $(hdrdir)/ruby.h
numeric.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/array.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/bits.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/class.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/complex.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/enumerator.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/gc.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/hash.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/object.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/rational.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/serial.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/string.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/util.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/variable.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/vm.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/warnings.h
numeric.$(OBJEXT): {$(VPATH)}assert.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+numeric.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+numeric.$(OBJEXT): {$(VPATH)}builtin.h
numeric.$(OBJEXT): {$(VPATH)}config.h
+numeric.$(OBJEXT): {$(VPATH)}constant.h
numeric.$(OBJEXT): {$(VPATH)}defines.h
numeric.$(OBJEXT): {$(VPATH)}encoding.h
numeric.$(OBJEXT): {$(VPATH)}id.h
+numeric.$(OBJEXT): {$(VPATH)}id_table.h
numeric.$(OBJEXT): {$(VPATH)}intern.h
numeric.$(OBJEXT): {$(VPATH)}internal.h
+numeric.$(OBJEXT): {$(VPATH)}internal/abi.h
+numeric.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+numeric.$(OBJEXT): {$(VPATH)}internal/assume.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+numeric.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+numeric.$(OBJEXT): {$(VPATH)}internal/cast.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+numeric.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+numeric.$(OBJEXT): {$(VPATH)}internal/config.h
+numeric.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+numeric.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+numeric.$(OBJEXT): {$(VPATH)}internal/ctype.h
+numeric.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+numeric.$(OBJEXT): {$(VPATH)}internal/dosish.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+numeric.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+numeric.$(OBJEXT): {$(VPATH)}internal/error.h
+numeric.$(OBJEXT): {$(VPATH)}internal/eval.h
+numeric.$(OBJEXT): {$(VPATH)}internal/event.h
+numeric.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+numeric.$(OBJEXT): {$(VPATH)}internal/gc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/glob.h
+numeric.$(OBJEXT): {$(VPATH)}internal/globals.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+numeric.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+numeric.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+numeric.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+numeric.$(OBJEXT): {$(VPATH)}internal/iterator.h
+numeric.$(OBJEXT): {$(VPATH)}internal/memory.h
+numeric.$(OBJEXT): {$(VPATH)}internal/method.h
+numeric.$(OBJEXT): {$(VPATH)}internal/module.h
+numeric.$(OBJEXT): {$(VPATH)}internal/newobj.h
+numeric.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+numeric.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+numeric.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+numeric.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+numeric.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+numeric.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+numeric.$(OBJEXT): {$(VPATH)}internal/symbol.h
+numeric.$(OBJEXT): {$(VPATH)}internal/value.h
+numeric.$(OBJEXT): {$(VPATH)}internal/value_type.h
+numeric.$(OBJEXT): {$(VPATH)}internal/variable.h
+numeric.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+numeric.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
numeric.$(OBJEXT): {$(VPATH)}missing.h
numeric.$(OBJEXT): {$(VPATH)}numeric.c
+numeric.$(OBJEXT): {$(VPATH)}numeric.rbinc
numeric.$(OBJEXT): {$(VPATH)}onigmo.h
numeric.$(OBJEXT): {$(VPATH)}oniguruma.h
+numeric.$(OBJEXT): {$(VPATH)}ruby_assert.h
+numeric.$(OBJEXT): {$(VPATH)}shape.h
numeric.$(OBJEXT): {$(VPATH)}st.h
numeric.$(OBJEXT): {$(VPATH)}subst.h
numeric.$(OBJEXT): {$(VPATH)}util.h
-object.$(OBJEXT): $(hdrdir)/ruby.h
+object.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+object.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+object.$(OBJEXT): $(CCAN_DIR)/list/list.h
+object.$(OBJEXT): $(CCAN_DIR)/str/str.h
object.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+object.$(OBJEXT): $(top_srcdir)/internal/array.h
+object.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+object.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+object.$(OBJEXT): $(top_srcdir)/internal/bits.h
+object.$(OBJEXT): $(top_srcdir)/internal/class.h
+object.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+object.$(OBJEXT): $(top_srcdir)/internal/error.h
+object.$(OBJEXT): $(top_srcdir)/internal/eval.h
+object.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+object.$(OBJEXT): $(top_srcdir)/internal/gc.h
+object.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+object.$(OBJEXT): $(top_srcdir)/internal/inits.h
+object.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+object.$(OBJEXT): $(top_srcdir)/internal/object.h
+object.$(OBJEXT): $(top_srcdir)/internal/serial.h
+object.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+object.$(OBJEXT): $(top_srcdir)/internal/string.h
+object.$(OBJEXT): $(top_srcdir)/internal/struct.h
+object.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+object.$(OBJEXT): $(top_srcdir)/internal/variable.h
+object.$(OBJEXT): $(top_srcdir)/internal/vm.h
+object.$(OBJEXT): $(top_srcdir)/internal/warnings.h
object.$(OBJEXT): {$(VPATH)}assert.h
+object.$(OBJEXT): {$(VPATH)}atomic.h
+object.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+object.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+object.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+object.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+object.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+object.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+object.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+object.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+object.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+object.$(OBJEXT): {$(VPATH)}builtin.h
object.$(OBJEXT): {$(VPATH)}config.h
object.$(OBJEXT): {$(VPATH)}constant.h
object.$(OBJEXT): {$(VPATH)}defines.h
object.$(OBJEXT): {$(VPATH)}encoding.h
object.$(OBJEXT): {$(VPATH)}id.h
+object.$(OBJEXT): {$(VPATH)}id_table.h
object.$(OBJEXT): {$(VPATH)}intern.h
object.$(OBJEXT): {$(VPATH)}internal.h
+object.$(OBJEXT): {$(VPATH)}internal/abi.h
+object.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+object.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+object.$(OBJEXT): {$(VPATH)}internal/assume.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+object.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+object.$(OBJEXT): {$(VPATH)}internal/cast.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+object.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+object.$(OBJEXT): {$(VPATH)}internal/config.h
+object.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+object.$(OBJEXT): {$(VPATH)}internal/core.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+object.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+object.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+object.$(OBJEXT): {$(VPATH)}internal/ctype.h
+object.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+object.$(OBJEXT): {$(VPATH)}internal/dosish.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+object.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+object.$(OBJEXT): {$(VPATH)}internal/error.h
+object.$(OBJEXT): {$(VPATH)}internal/eval.h
+object.$(OBJEXT): {$(VPATH)}internal/event.h
+object.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+object.$(OBJEXT): {$(VPATH)}internal/gc.h
+object.$(OBJEXT): {$(VPATH)}internal/glob.h
+object.$(OBJEXT): {$(VPATH)}internal/globals.h
+object.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+object.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+object.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+object.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+object.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+object.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+object.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+object.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+object.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+object.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+object.$(OBJEXT): {$(VPATH)}internal/iterator.h
+object.$(OBJEXT): {$(VPATH)}internal/memory.h
+object.$(OBJEXT): {$(VPATH)}internal/method.h
+object.$(OBJEXT): {$(VPATH)}internal/module.h
+object.$(OBJEXT): {$(VPATH)}internal/newobj.h
+object.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+object.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+object.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+object.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+object.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+object.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+object.$(OBJEXT): {$(VPATH)}internal/symbol.h
+object.$(OBJEXT): {$(VPATH)}internal/value.h
+object.$(OBJEXT): {$(VPATH)}internal/value_type.h
+object.$(OBJEXT): {$(VPATH)}internal/variable.h
+object.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+object.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+object.$(OBJEXT): {$(VPATH)}kernel.rbinc
+object.$(OBJEXT): {$(VPATH)}method.h
object.$(OBJEXT): {$(VPATH)}missing.h
+object.$(OBJEXT): {$(VPATH)}nilclass.rbinc
+object.$(OBJEXT): {$(VPATH)}node.h
object.$(OBJEXT): {$(VPATH)}object.c
object.$(OBJEXT): {$(VPATH)}onigmo.h
object.$(OBJEXT): {$(VPATH)}oniguruma.h
object.$(OBJEXT): {$(VPATH)}probes.dmyh
object.$(OBJEXT): {$(VPATH)}probes.h
+object.$(OBJEXT): {$(VPATH)}ruby_assert.h
+object.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+object.$(OBJEXT): {$(VPATH)}shape.h
object.$(OBJEXT): {$(VPATH)}st.h
object.$(OBJEXT): {$(VPATH)}subst.h
+object.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+object.$(OBJEXT): {$(VPATH)}thread_native.h
object.$(OBJEXT): {$(VPATH)}util.h
-pack.$(OBJEXT): $(hdrdir)/ruby.h
+object.$(OBJEXT): {$(VPATH)}variable.h
+object.$(OBJEXT): {$(VPATH)}vm_core.h
+object.$(OBJEXT): {$(VPATH)}vm_opts.h
pack.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+pack.$(OBJEXT): $(top_srcdir)/internal/array.h
+pack.$(OBJEXT): $(top_srcdir)/internal/bits.h
+pack.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+pack.$(OBJEXT): $(top_srcdir)/internal/gc.h
+pack.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+pack.$(OBJEXT): $(top_srcdir)/internal/string.h
+pack.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+pack.$(OBJEXT): $(top_srcdir)/internal/variable.h
+pack.$(OBJEXT): $(top_srcdir)/internal/warnings.h
pack.$(OBJEXT): {$(VPATH)}assert.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+pack.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
pack.$(OBJEXT): {$(VPATH)}builtin.h
pack.$(OBJEXT): {$(VPATH)}config.h
+pack.$(OBJEXT): {$(VPATH)}constant.h
pack.$(OBJEXT): {$(VPATH)}defines.h
pack.$(OBJEXT): {$(VPATH)}encoding.h
+pack.$(OBJEXT): {$(VPATH)}id_table.h
pack.$(OBJEXT): {$(VPATH)}intern.h
pack.$(OBJEXT): {$(VPATH)}internal.h
+pack.$(OBJEXT): {$(VPATH)}internal/abi.h
+pack.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+pack.$(OBJEXT): {$(VPATH)}internal/assume.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+pack.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+pack.$(OBJEXT): {$(VPATH)}internal/cast.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+pack.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+pack.$(OBJEXT): {$(VPATH)}internal/config.h
+pack.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+pack.$(OBJEXT): {$(VPATH)}internal/core.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+pack.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+pack.$(OBJEXT): {$(VPATH)}internal/ctype.h
+pack.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+pack.$(OBJEXT): {$(VPATH)}internal/dosish.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+pack.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+pack.$(OBJEXT): {$(VPATH)}internal/error.h
+pack.$(OBJEXT): {$(VPATH)}internal/eval.h
+pack.$(OBJEXT): {$(VPATH)}internal/event.h
+pack.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+pack.$(OBJEXT): {$(VPATH)}internal/gc.h
+pack.$(OBJEXT): {$(VPATH)}internal/glob.h
+pack.$(OBJEXT): {$(VPATH)}internal/globals.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+pack.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+pack.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+pack.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+pack.$(OBJEXT): {$(VPATH)}internal/iterator.h
+pack.$(OBJEXT): {$(VPATH)}internal/memory.h
+pack.$(OBJEXT): {$(VPATH)}internal/method.h
+pack.$(OBJEXT): {$(VPATH)}internal/module.h
+pack.$(OBJEXT): {$(VPATH)}internal/newobj.h
+pack.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+pack.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+pack.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+pack.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+pack.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+pack.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+pack.$(OBJEXT): {$(VPATH)}internal/symbol.h
+pack.$(OBJEXT): {$(VPATH)}internal/value.h
+pack.$(OBJEXT): {$(VPATH)}internal/value_type.h
+pack.$(OBJEXT): {$(VPATH)}internal/variable.h
+pack.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+pack.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
pack.$(OBJEXT): {$(VPATH)}missing.h
pack.$(OBJEXT): {$(VPATH)}onigmo.h
pack.$(OBJEXT): {$(VPATH)}oniguruma.h
pack.$(OBJEXT): {$(VPATH)}pack.c
pack.$(OBJEXT): {$(VPATH)}pack.rbinc
+pack.$(OBJEXT): {$(VPATH)}shape.h
pack.$(OBJEXT): {$(VPATH)}st.h
pack.$(OBJEXT): {$(VPATH)}subst.h
+pack.$(OBJEXT): {$(VPATH)}util.h
parse.$(OBJEXT): $(hdrdir)/ruby.h
parse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+parse.$(OBJEXT): $(top_srcdir)/internal/array.h
+parse.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+parse.$(OBJEXT): $(top_srcdir)/internal/bits.h
+parse.$(OBJEXT): $(top_srcdir)/internal/compile.h
+parse.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+parse.$(OBJEXT): $(top_srcdir)/internal/complex.h
+parse.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+parse.$(OBJEXT): $(top_srcdir)/internal/error.h
+parse.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+parse.$(OBJEXT): $(top_srcdir)/internal/gc.h
+parse.$(OBJEXT): $(top_srcdir)/internal/hash.h
+parse.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+parse.$(OBJEXT): $(top_srcdir)/internal/io.h
+parse.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+parse.$(OBJEXT): $(top_srcdir)/internal/parse.h
+parse.$(OBJEXT): $(top_srcdir)/internal/rational.h
+parse.$(OBJEXT): $(top_srcdir)/internal/re.h
+parse.$(OBJEXT): $(top_srcdir)/internal/serial.h
+parse.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+parse.$(OBJEXT): $(top_srcdir)/internal/string.h
+parse.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+parse.$(OBJEXT): $(top_srcdir)/internal/thread.h
+parse.$(OBJEXT): $(top_srcdir)/internal/variable.h
+parse.$(OBJEXT): $(top_srcdir)/internal/vm.h
+parse.$(OBJEXT): $(top_srcdir)/internal/warnings.h
parse.$(OBJEXT): {$(VPATH)}assert.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+parse.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
parse.$(OBJEXT): {$(VPATH)}config.h
+parse.$(OBJEXT): {$(VPATH)}constant.h
parse.$(OBJEXT): {$(VPATH)}defines.h
parse.$(OBJEXT): {$(VPATH)}defs/keywords
parse.$(OBJEXT): {$(VPATH)}encoding.h
parse.$(OBJEXT): {$(VPATH)}id.h
+parse.$(OBJEXT): {$(VPATH)}id_table.h
parse.$(OBJEXT): {$(VPATH)}intern.h
parse.$(OBJEXT): {$(VPATH)}internal.h
+parse.$(OBJEXT): {$(VPATH)}internal/abi.h
+parse.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+parse.$(OBJEXT): {$(VPATH)}internal/assume.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+parse.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+parse.$(OBJEXT): {$(VPATH)}internal/cast.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+parse.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+parse.$(OBJEXT): {$(VPATH)}internal/config.h
+parse.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+parse.$(OBJEXT): {$(VPATH)}internal/core.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+parse.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+parse.$(OBJEXT): {$(VPATH)}internal/ctype.h
+parse.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+parse.$(OBJEXT): {$(VPATH)}internal/dosish.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+parse.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+parse.$(OBJEXT): {$(VPATH)}internal/error.h
+parse.$(OBJEXT): {$(VPATH)}internal/eval.h
+parse.$(OBJEXT): {$(VPATH)}internal/event.h
+parse.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+parse.$(OBJEXT): {$(VPATH)}internal/gc.h
+parse.$(OBJEXT): {$(VPATH)}internal/glob.h
+parse.$(OBJEXT): {$(VPATH)}internal/globals.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+parse.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+parse.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+parse.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+parse.$(OBJEXT): {$(VPATH)}internal/iterator.h
+parse.$(OBJEXT): {$(VPATH)}internal/memory.h
+parse.$(OBJEXT): {$(VPATH)}internal/method.h
+parse.$(OBJEXT): {$(VPATH)}internal/module.h
+parse.$(OBJEXT): {$(VPATH)}internal/newobj.h
+parse.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+parse.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+parse.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+parse.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+parse.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+parse.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+parse.$(OBJEXT): {$(VPATH)}internal/symbol.h
+parse.$(OBJEXT): {$(VPATH)}internal/value.h
+parse.$(OBJEXT): {$(VPATH)}internal/value_type.h
+parse.$(OBJEXT): {$(VPATH)}internal/variable.h
+parse.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+parse.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+parse.$(OBJEXT): {$(VPATH)}io.h
parse.$(OBJEXT): {$(VPATH)}lex.c
parse.$(OBJEXT): {$(VPATH)}missing.h
parse.$(OBJEXT): {$(VPATH)}node.h
@@ -2554,8 +11136,11 @@ parse.$(OBJEXT): {$(VPATH)}parse.h
parse.$(OBJEXT): {$(VPATH)}parse.y
parse.$(OBJEXT): {$(VPATH)}probes.dmyh
parse.$(OBJEXT): {$(VPATH)}probes.h
+parse.$(OBJEXT): {$(VPATH)}ractor.h
parse.$(OBJEXT): {$(VPATH)}regenc.h
parse.$(OBJEXT): {$(VPATH)}regex.h
+parse.$(OBJEXT): {$(VPATH)}ruby_assert.h
+parse.$(OBJEXT): {$(VPATH)}shape.h
parse.$(OBJEXT): {$(VPATH)}st.h
parse.$(OBJEXT): {$(VPATH)}subst.h
parse.$(OBJEXT): {$(VPATH)}symbol.h
@@ -2564,53 +11149,426 @@ proc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
proc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
proc.$(OBJEXT): $(CCAN_DIR)/list/list.h
proc.$(OBJEXT): $(CCAN_DIR)/str/str.h
-proc.$(OBJEXT): $(hdrdir)/ruby.h
proc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+proc.$(OBJEXT): $(top_srcdir)/internal/array.h
+proc.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+proc.$(OBJEXT): $(top_srcdir)/internal/class.h
+proc.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+proc.$(OBJEXT): $(top_srcdir)/internal/error.h
+proc.$(OBJEXT): $(top_srcdir)/internal/eval.h
+proc.$(OBJEXT): $(top_srcdir)/internal/gc.h
+proc.$(OBJEXT): $(top_srcdir)/internal/hash.h
+proc.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+proc.$(OBJEXT): $(top_srcdir)/internal/object.h
+proc.$(OBJEXT): $(top_srcdir)/internal/proc.h
+proc.$(OBJEXT): $(top_srcdir)/internal/serial.h
+proc.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+proc.$(OBJEXT): $(top_srcdir)/internal/string.h
+proc.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+proc.$(OBJEXT): $(top_srcdir)/internal/variable.h
+proc.$(OBJEXT): $(top_srcdir)/internal/vm.h
+proc.$(OBJEXT): $(top_srcdir)/internal/warnings.h
proc.$(OBJEXT): {$(VPATH)}assert.h
+proc.$(OBJEXT): {$(VPATH)}atomic.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+proc.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
proc.$(OBJEXT): {$(VPATH)}config.h
+proc.$(OBJEXT): {$(VPATH)}constant.h
proc.$(OBJEXT): {$(VPATH)}defines.h
+proc.$(OBJEXT): {$(VPATH)}encoding.h
proc.$(OBJEXT): {$(VPATH)}eval_intern.h
proc.$(OBJEXT): {$(VPATH)}gc.h
proc.$(OBJEXT): {$(VPATH)}id.h
+proc.$(OBJEXT): {$(VPATH)}id_table.h
proc.$(OBJEXT): {$(VPATH)}intern.h
proc.$(OBJEXT): {$(VPATH)}internal.h
+proc.$(OBJEXT): {$(VPATH)}internal/abi.h
+proc.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+proc.$(OBJEXT): {$(VPATH)}internal/assume.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+proc.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+proc.$(OBJEXT): {$(VPATH)}internal/cast.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+proc.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+proc.$(OBJEXT): {$(VPATH)}internal/config.h
+proc.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+proc.$(OBJEXT): {$(VPATH)}internal/core.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+proc.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+proc.$(OBJEXT): {$(VPATH)}internal/ctype.h
+proc.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+proc.$(OBJEXT): {$(VPATH)}internal/dosish.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+proc.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+proc.$(OBJEXT): {$(VPATH)}internal/error.h
+proc.$(OBJEXT): {$(VPATH)}internal/eval.h
+proc.$(OBJEXT): {$(VPATH)}internal/event.h
+proc.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+proc.$(OBJEXT): {$(VPATH)}internal/gc.h
+proc.$(OBJEXT): {$(VPATH)}internal/glob.h
+proc.$(OBJEXT): {$(VPATH)}internal/globals.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+proc.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+proc.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+proc.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+proc.$(OBJEXT): {$(VPATH)}internal/iterator.h
+proc.$(OBJEXT): {$(VPATH)}internal/memory.h
+proc.$(OBJEXT): {$(VPATH)}internal/method.h
+proc.$(OBJEXT): {$(VPATH)}internal/module.h
+proc.$(OBJEXT): {$(VPATH)}internal/newobj.h
+proc.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+proc.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+proc.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+proc.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+proc.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+proc.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+proc.$(OBJEXT): {$(VPATH)}internal/symbol.h
+proc.$(OBJEXT): {$(VPATH)}internal/value.h
+proc.$(OBJEXT): {$(VPATH)}internal/value_type.h
+proc.$(OBJEXT): {$(VPATH)}internal/variable.h
+proc.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+proc.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
proc.$(OBJEXT): {$(VPATH)}iseq.h
proc.$(OBJEXT): {$(VPATH)}method.h
proc.$(OBJEXT): {$(VPATH)}missing.h
proc.$(OBJEXT): {$(VPATH)}node.h
+proc.$(OBJEXT): {$(VPATH)}onigmo.h
+proc.$(OBJEXT): {$(VPATH)}oniguruma.h
proc.$(OBJEXT): {$(VPATH)}proc.c
proc.$(OBJEXT): {$(VPATH)}ruby_assert.h
proc.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+proc.$(OBJEXT): {$(VPATH)}shape.h
proc.$(OBJEXT): {$(VPATH)}st.h
proc.$(OBJEXT): {$(VPATH)}subst.h
proc.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
proc.$(OBJEXT): {$(VPATH)}thread_native.h
proc.$(OBJEXT): {$(VPATH)}vm_core.h
proc.$(OBJEXT): {$(VPATH)}vm_opts.h
+proc.$(OBJEXT): {$(VPATH)}yjit.h
process.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
process.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
process.$(OBJEXT): $(CCAN_DIR)/list/list.h
process.$(OBJEXT): $(CCAN_DIR)/str/str.h
process.$(OBJEXT): $(hdrdir)/ruby.h
process.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+process.$(OBJEXT): $(top_srcdir)/internal/array.h
+process.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+process.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+process.$(OBJEXT): $(top_srcdir)/internal/bits.h
+process.$(OBJEXT): $(top_srcdir)/internal/class.h
+process.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+process.$(OBJEXT): $(top_srcdir)/internal/dir.h
+process.$(OBJEXT): $(top_srcdir)/internal/error.h
+process.$(OBJEXT): $(top_srcdir)/internal/eval.h
+process.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+process.$(OBJEXT): $(top_srcdir)/internal/gc.h
+process.$(OBJEXT): $(top_srcdir)/internal/hash.h
+process.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+process.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+process.$(OBJEXT): $(top_srcdir)/internal/object.h
+process.$(OBJEXT): $(top_srcdir)/internal/process.h
+process.$(OBJEXT): $(top_srcdir)/internal/serial.h
+process.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+process.$(OBJEXT): $(top_srcdir)/internal/string.h
+process.$(OBJEXT): $(top_srcdir)/internal/thread.h
+process.$(OBJEXT): $(top_srcdir)/internal/time.h
+process.$(OBJEXT): $(top_srcdir)/internal/variable.h
+process.$(OBJEXT): $(top_srcdir)/internal/vm.h
+process.$(OBJEXT): $(top_srcdir)/internal/warnings.h
process.$(OBJEXT): {$(VPATH)}assert.h
+process.$(OBJEXT): {$(VPATH)}atomic.h
+process.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+process.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+process.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+process.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+process.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+process.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+process.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+process.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+process.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
process.$(OBJEXT): {$(VPATH)}config.h
+process.$(OBJEXT): {$(VPATH)}constant.h
+process.$(OBJEXT): {$(VPATH)}debug_counter.h
process.$(OBJEXT): {$(VPATH)}defines.h
process.$(OBJEXT): {$(VPATH)}dln.h
process.$(OBJEXT): {$(VPATH)}encoding.h
+process.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
process.$(OBJEXT): {$(VPATH)}hrtime.h
process.$(OBJEXT): {$(VPATH)}id.h
+process.$(OBJEXT): {$(VPATH)}id_table.h
process.$(OBJEXT): {$(VPATH)}intern.h
process.$(OBJEXT): {$(VPATH)}internal.h
+process.$(OBJEXT): {$(VPATH)}internal/abi.h
+process.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+process.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+process.$(OBJEXT): {$(VPATH)}internal/assume.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+process.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+process.$(OBJEXT): {$(VPATH)}internal/cast.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+process.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+process.$(OBJEXT): {$(VPATH)}internal/config.h
+process.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+process.$(OBJEXT): {$(VPATH)}internal/core.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+process.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+process.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+process.$(OBJEXT): {$(VPATH)}internal/ctype.h
+process.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+process.$(OBJEXT): {$(VPATH)}internal/dosish.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+process.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+process.$(OBJEXT): {$(VPATH)}internal/error.h
+process.$(OBJEXT): {$(VPATH)}internal/eval.h
+process.$(OBJEXT): {$(VPATH)}internal/event.h
+process.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+process.$(OBJEXT): {$(VPATH)}internal/gc.h
+process.$(OBJEXT): {$(VPATH)}internal/glob.h
+process.$(OBJEXT): {$(VPATH)}internal/globals.h
+process.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+process.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+process.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+process.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+process.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+process.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+process.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+process.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+process.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+process.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+process.$(OBJEXT): {$(VPATH)}internal/iterator.h
+process.$(OBJEXT): {$(VPATH)}internal/memory.h
+process.$(OBJEXT): {$(VPATH)}internal/method.h
+process.$(OBJEXT): {$(VPATH)}internal/module.h
+process.$(OBJEXT): {$(VPATH)}internal/newobj.h
+process.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+process.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+process.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+process.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+process.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+process.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+process.$(OBJEXT): {$(VPATH)}internal/symbol.h
+process.$(OBJEXT): {$(VPATH)}internal/value.h
+process.$(OBJEXT): {$(VPATH)}internal/value_type.h
+process.$(OBJEXT): {$(VPATH)}internal/variable.h
+process.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+process.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
process.$(OBJEXT): {$(VPATH)}io.h
process.$(OBJEXT): {$(VPATH)}method.h
process.$(OBJEXT): {$(VPATH)}missing.h
+process.$(OBJEXT): {$(VPATH)}mjit.h
process.$(OBJEXT): {$(VPATH)}node.h
process.$(OBJEXT): {$(VPATH)}onigmo.h
process.$(OBJEXT): {$(VPATH)}oniguruma.h
process.$(OBJEXT): {$(VPATH)}process.c
+process.$(OBJEXT): {$(VPATH)}ractor.h
process.$(OBJEXT): {$(VPATH)}ruby_assert.h
process.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+process.$(OBJEXT): {$(VPATH)}shape.h
process.$(OBJEXT): {$(VPATH)}st.h
process.$(OBJEXT): {$(VPATH)}subst.h
process.$(OBJEXT): {$(VPATH)}thread.h
@@ -2619,55 +11577,972 @@ process.$(OBJEXT): {$(VPATH)}thread_native.h
process.$(OBJEXT): {$(VPATH)}util.h
process.$(OBJEXT): {$(VPATH)}vm_core.h
process.$(OBJEXT): {$(VPATH)}vm_opts.h
-random.$(OBJEXT): $(hdrdir)/ruby.h
+ractor.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+ractor.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+ractor.$(OBJEXT): $(CCAN_DIR)/list/list.h
+ractor.$(OBJEXT): $(CCAN_DIR)/str/str.h
+ractor.$(OBJEXT): $(hdrdir)/ruby.h
+ractor.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/array.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/bits.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/complex.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/error.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/gc.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/hash.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/rational.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/serial.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/string.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/struct.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/thread.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/variable.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/vm.h
+ractor.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+ractor.$(OBJEXT): {$(VPATH)}assert.h
+ractor.$(OBJEXT): {$(VPATH)}atomic.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+ractor.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+ractor.$(OBJEXT): {$(VPATH)}builtin.h
+ractor.$(OBJEXT): {$(VPATH)}config.h
+ractor.$(OBJEXT): {$(VPATH)}constant.h
+ractor.$(OBJEXT): {$(VPATH)}debug_counter.h
+ractor.$(OBJEXT): {$(VPATH)}defines.h
+ractor.$(OBJEXT): {$(VPATH)}encoding.h
+ractor.$(OBJEXT): {$(VPATH)}gc.h
+ractor.$(OBJEXT): {$(VPATH)}id.h
+ractor.$(OBJEXT): {$(VPATH)}id_table.h
+ractor.$(OBJEXT): {$(VPATH)}intern.h
+ractor.$(OBJEXT): {$(VPATH)}internal.h
+ractor.$(OBJEXT): {$(VPATH)}internal/abi.h
+ractor.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+ractor.$(OBJEXT): {$(VPATH)}internal/assume.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+ractor.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+ractor.$(OBJEXT): {$(VPATH)}internal/cast.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+ractor.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+ractor.$(OBJEXT): {$(VPATH)}internal/config.h
+ractor.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+ractor.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+ractor.$(OBJEXT): {$(VPATH)}internal/ctype.h
+ractor.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+ractor.$(OBJEXT): {$(VPATH)}internal/dosish.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+ractor.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+ractor.$(OBJEXT): {$(VPATH)}internal/error.h
+ractor.$(OBJEXT): {$(VPATH)}internal/eval.h
+ractor.$(OBJEXT): {$(VPATH)}internal/event.h
+ractor.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+ractor.$(OBJEXT): {$(VPATH)}internal/gc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/glob.h
+ractor.$(OBJEXT): {$(VPATH)}internal/globals.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+ractor.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+ractor.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+ractor.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+ractor.$(OBJEXT): {$(VPATH)}internal/iterator.h
+ractor.$(OBJEXT): {$(VPATH)}internal/memory.h
+ractor.$(OBJEXT): {$(VPATH)}internal/method.h
+ractor.$(OBJEXT): {$(VPATH)}internal/module.h
+ractor.$(OBJEXT): {$(VPATH)}internal/newobj.h
+ractor.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+ractor.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+ractor.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+ractor.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+ractor.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+ractor.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+ractor.$(OBJEXT): {$(VPATH)}internal/symbol.h
+ractor.$(OBJEXT): {$(VPATH)}internal/value.h
+ractor.$(OBJEXT): {$(VPATH)}internal/value_type.h
+ractor.$(OBJEXT): {$(VPATH)}internal/variable.h
+ractor.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+ractor.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+ractor.$(OBJEXT): {$(VPATH)}method.h
+ractor.$(OBJEXT): {$(VPATH)}missing.h
+ractor.$(OBJEXT): {$(VPATH)}mjit.h
+ractor.$(OBJEXT): {$(VPATH)}node.h
+ractor.$(OBJEXT): {$(VPATH)}onigmo.h
+ractor.$(OBJEXT): {$(VPATH)}oniguruma.h
+ractor.$(OBJEXT): {$(VPATH)}ractor.c
+ractor.$(OBJEXT): {$(VPATH)}ractor.h
+ractor.$(OBJEXT): {$(VPATH)}ractor.rbinc
+ractor.$(OBJEXT): {$(VPATH)}ractor_core.h
+ractor.$(OBJEXT): {$(VPATH)}ruby_assert.h
+ractor.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+ractor.$(OBJEXT): {$(VPATH)}shape.h
+ractor.$(OBJEXT): {$(VPATH)}st.h
+ractor.$(OBJEXT): {$(VPATH)}subst.h
+ractor.$(OBJEXT): {$(VPATH)}thread.h
+ractor.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+ractor.$(OBJEXT): {$(VPATH)}thread_native.h
+ractor.$(OBJEXT): {$(VPATH)}transient_heap.h
+ractor.$(OBJEXT): {$(VPATH)}variable.h
+ractor.$(OBJEXT): {$(VPATH)}vm_core.h
+ractor.$(OBJEXT): {$(VPATH)}vm_debug.h
+ractor.$(OBJEXT): {$(VPATH)}vm_opts.h
+ractor.$(OBJEXT): {$(VPATH)}vm_sync.h
+ractor.$(OBJEXT): {$(VPATH)}yjit.h
random.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+random.$(OBJEXT): $(top_srcdir)/internal/array.h
+random.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+random.$(OBJEXT): $(top_srcdir)/internal/bits.h
+random.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+random.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+random.$(OBJEXT): $(top_srcdir)/internal/gc.h
+random.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+random.$(OBJEXT): $(top_srcdir)/internal/random.h
+random.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+random.$(OBJEXT): $(top_srcdir)/internal/serial.h
+random.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+random.$(OBJEXT): $(top_srcdir)/internal/variable.h
+random.$(OBJEXT): $(top_srcdir)/internal/vm.h
+random.$(OBJEXT): $(top_srcdir)/internal/warnings.h
random.$(OBJEXT): {$(VPATH)}assert.h
+random.$(OBJEXT): {$(VPATH)}atomic.h
+random.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+random.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+random.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+random.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+random.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+random.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+random.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+random.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+random.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
random.$(OBJEXT): {$(VPATH)}config.h
+random.$(OBJEXT): {$(VPATH)}constant.h
random.$(OBJEXT): {$(VPATH)}defines.h
+random.$(OBJEXT): {$(VPATH)}id_table.h
random.$(OBJEXT): {$(VPATH)}intern.h
random.$(OBJEXT): {$(VPATH)}internal.h
+random.$(OBJEXT): {$(VPATH)}internal/abi.h
+random.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+random.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+random.$(OBJEXT): {$(VPATH)}internal/assume.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+random.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+random.$(OBJEXT): {$(VPATH)}internal/cast.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+random.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+random.$(OBJEXT): {$(VPATH)}internal/config.h
+random.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+random.$(OBJEXT): {$(VPATH)}internal/core.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+random.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+random.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+random.$(OBJEXT): {$(VPATH)}internal/ctype.h
+random.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+random.$(OBJEXT): {$(VPATH)}internal/dosish.h
+random.$(OBJEXT): {$(VPATH)}internal/error.h
+random.$(OBJEXT): {$(VPATH)}internal/eval.h
+random.$(OBJEXT): {$(VPATH)}internal/event.h
+random.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+random.$(OBJEXT): {$(VPATH)}internal/gc.h
+random.$(OBJEXT): {$(VPATH)}internal/glob.h
+random.$(OBJEXT): {$(VPATH)}internal/globals.h
+random.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+random.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+random.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+random.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+random.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+random.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+random.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+random.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+random.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+random.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+random.$(OBJEXT): {$(VPATH)}internal/iterator.h
+random.$(OBJEXT): {$(VPATH)}internal/memory.h
+random.$(OBJEXT): {$(VPATH)}internal/method.h
+random.$(OBJEXT): {$(VPATH)}internal/module.h
+random.$(OBJEXT): {$(VPATH)}internal/newobj.h
+random.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+random.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+random.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+random.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+random.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+random.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+random.$(OBJEXT): {$(VPATH)}internal/symbol.h
+random.$(OBJEXT): {$(VPATH)}internal/value.h
+random.$(OBJEXT): {$(VPATH)}internal/value_type.h
+random.$(OBJEXT): {$(VPATH)}internal/variable.h
+random.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+random.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
random.$(OBJEXT): {$(VPATH)}missing.h
random.$(OBJEXT): {$(VPATH)}mt19937.c
+random.$(OBJEXT): {$(VPATH)}ractor.h
random.$(OBJEXT): {$(VPATH)}random.c
+random.$(OBJEXT): {$(VPATH)}random.h
random.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+random.$(OBJEXT): {$(VPATH)}shape.h
random.$(OBJEXT): {$(VPATH)}siphash.c
random.$(OBJEXT): {$(VPATH)}siphash.h
random.$(OBJEXT): {$(VPATH)}st.h
random.$(OBJEXT): {$(VPATH)}subst.h
-range.$(OBJEXT): $(hdrdir)/ruby.h
range.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+range.$(OBJEXT): $(top_srcdir)/internal/array.h
+range.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+range.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+range.$(OBJEXT): $(top_srcdir)/internal/bits.h
+range.$(OBJEXT): $(top_srcdir)/internal/compar.h
+range.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+range.$(OBJEXT): $(top_srcdir)/internal/enum.h
+range.$(OBJEXT): $(top_srcdir)/internal/enumerator.h
+range.$(OBJEXT): $(top_srcdir)/internal/error.h
+range.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+range.$(OBJEXT): $(top_srcdir)/internal/gc.h
+range.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+range.$(OBJEXT): $(top_srcdir)/internal/range.h
+range.$(OBJEXT): $(top_srcdir)/internal/serial.h
+range.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+range.$(OBJEXT): $(top_srcdir)/internal/string.h
+range.$(OBJEXT): $(top_srcdir)/internal/struct.h
+range.$(OBJEXT): $(top_srcdir)/internal/vm.h
+range.$(OBJEXT): $(top_srcdir)/internal/warnings.h
range.$(OBJEXT): {$(VPATH)}assert.h
+range.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+range.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+range.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+range.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+range.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+range.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+range.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+range.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+range.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
range.$(OBJEXT): {$(VPATH)}config.h
range.$(OBJEXT): {$(VPATH)}defines.h
+range.$(OBJEXT): {$(VPATH)}encoding.h
range.$(OBJEXT): {$(VPATH)}id.h
range.$(OBJEXT): {$(VPATH)}intern.h
range.$(OBJEXT): {$(VPATH)}internal.h
+range.$(OBJEXT): {$(VPATH)}internal/abi.h
+range.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+range.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+range.$(OBJEXT): {$(VPATH)}internal/assume.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+range.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+range.$(OBJEXT): {$(VPATH)}internal/cast.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+range.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+range.$(OBJEXT): {$(VPATH)}internal/config.h
+range.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+range.$(OBJEXT): {$(VPATH)}internal/core.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+range.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+range.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+range.$(OBJEXT): {$(VPATH)}internal/ctype.h
+range.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+range.$(OBJEXT): {$(VPATH)}internal/dosish.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+range.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+range.$(OBJEXT): {$(VPATH)}internal/error.h
+range.$(OBJEXT): {$(VPATH)}internal/eval.h
+range.$(OBJEXT): {$(VPATH)}internal/event.h
+range.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+range.$(OBJEXT): {$(VPATH)}internal/gc.h
+range.$(OBJEXT): {$(VPATH)}internal/glob.h
+range.$(OBJEXT): {$(VPATH)}internal/globals.h
+range.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+range.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+range.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+range.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+range.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+range.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+range.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+range.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+range.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+range.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+range.$(OBJEXT): {$(VPATH)}internal/iterator.h
+range.$(OBJEXT): {$(VPATH)}internal/memory.h
+range.$(OBJEXT): {$(VPATH)}internal/method.h
+range.$(OBJEXT): {$(VPATH)}internal/module.h
+range.$(OBJEXT): {$(VPATH)}internal/newobj.h
+range.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+range.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+range.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+range.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+range.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+range.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+range.$(OBJEXT): {$(VPATH)}internal/symbol.h
+range.$(OBJEXT): {$(VPATH)}internal/value.h
+range.$(OBJEXT): {$(VPATH)}internal/value_type.h
+range.$(OBJEXT): {$(VPATH)}internal/variable.h
+range.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+range.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
range.$(OBJEXT): {$(VPATH)}missing.h
+range.$(OBJEXT): {$(VPATH)}onigmo.h
+range.$(OBJEXT): {$(VPATH)}oniguruma.h
range.$(OBJEXT): {$(VPATH)}range.c
+range.$(OBJEXT): {$(VPATH)}shape.h
range.$(OBJEXT): {$(VPATH)}st.h
range.$(OBJEXT): {$(VPATH)}subst.h
-rational.$(OBJEXT): $(hdrdir)/ruby.h
rational.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+rational.$(OBJEXT): $(top_srcdir)/internal/array.h
+rational.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+rational.$(OBJEXT): $(top_srcdir)/internal/bits.h
+rational.$(OBJEXT): $(top_srcdir)/internal/class.h
+rational.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+rational.$(OBJEXT): $(top_srcdir)/internal/complex.h
+rational.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+rational.$(OBJEXT): $(top_srcdir)/internal/gc.h
+rational.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+rational.$(OBJEXT): $(top_srcdir)/internal/object.h
+rational.$(OBJEXT): $(top_srcdir)/internal/rational.h
+rational.$(OBJEXT): $(top_srcdir)/internal/serial.h
+rational.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+rational.$(OBJEXT): $(top_srcdir)/internal/variable.h
+rational.$(OBJEXT): $(top_srcdir)/internal/vm.h
+rational.$(OBJEXT): $(top_srcdir)/internal/warnings.h
rational.$(OBJEXT): {$(VPATH)}assert.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+rational.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
rational.$(OBJEXT): {$(VPATH)}config.h
+rational.$(OBJEXT): {$(VPATH)}constant.h
rational.$(OBJEXT): {$(VPATH)}defines.h
rational.$(OBJEXT): {$(VPATH)}id.h
+rational.$(OBJEXT): {$(VPATH)}id_table.h
rational.$(OBJEXT): {$(VPATH)}intern.h
rational.$(OBJEXT): {$(VPATH)}internal.h
+rational.$(OBJEXT): {$(VPATH)}internal/abi.h
+rational.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+rational.$(OBJEXT): {$(VPATH)}internal/assume.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+rational.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+rational.$(OBJEXT): {$(VPATH)}internal/cast.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+rational.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+rational.$(OBJEXT): {$(VPATH)}internal/config.h
+rational.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+rational.$(OBJEXT): {$(VPATH)}internal/core.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+rational.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+rational.$(OBJEXT): {$(VPATH)}internal/ctype.h
+rational.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+rational.$(OBJEXT): {$(VPATH)}internal/dosish.h
+rational.$(OBJEXT): {$(VPATH)}internal/error.h
+rational.$(OBJEXT): {$(VPATH)}internal/eval.h
+rational.$(OBJEXT): {$(VPATH)}internal/event.h
+rational.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+rational.$(OBJEXT): {$(VPATH)}internal/gc.h
+rational.$(OBJEXT): {$(VPATH)}internal/glob.h
+rational.$(OBJEXT): {$(VPATH)}internal/globals.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+rational.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+rational.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+rational.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+rational.$(OBJEXT): {$(VPATH)}internal/iterator.h
+rational.$(OBJEXT): {$(VPATH)}internal/memory.h
+rational.$(OBJEXT): {$(VPATH)}internal/method.h
+rational.$(OBJEXT): {$(VPATH)}internal/module.h
+rational.$(OBJEXT): {$(VPATH)}internal/newobj.h
+rational.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+rational.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+rational.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+rational.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+rational.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+rational.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+rational.$(OBJEXT): {$(VPATH)}internal/symbol.h
+rational.$(OBJEXT): {$(VPATH)}internal/value.h
+rational.$(OBJEXT): {$(VPATH)}internal/value_type.h
+rational.$(OBJEXT): {$(VPATH)}internal/variable.h
+rational.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+rational.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
rational.$(OBJEXT): {$(VPATH)}missing.h
rational.$(OBJEXT): {$(VPATH)}rational.c
rational.$(OBJEXT): {$(VPATH)}ruby_assert.h
+rational.$(OBJEXT): {$(VPATH)}shape.h
rational.$(OBJEXT): {$(VPATH)}st.h
rational.$(OBJEXT): {$(VPATH)}subst.h
re.$(OBJEXT): $(hdrdir)/ruby.h
re.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+re.$(OBJEXT): $(top_srcdir)/internal/array.h
+re.$(OBJEXT): $(top_srcdir)/internal/bits.h
+re.$(OBJEXT): $(top_srcdir)/internal/class.h
+re.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+re.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+re.$(OBJEXT): $(top_srcdir)/internal/gc.h
+re.$(OBJEXT): $(top_srcdir)/internal/hash.h
+re.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+re.$(OBJEXT): $(top_srcdir)/internal/object.h
+re.$(OBJEXT): $(top_srcdir)/internal/ractor.h
+re.$(OBJEXT): $(top_srcdir)/internal/re.h
+re.$(OBJEXT): $(top_srcdir)/internal/serial.h
+re.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+re.$(OBJEXT): $(top_srcdir)/internal/string.h
+re.$(OBJEXT): $(top_srcdir)/internal/time.h
+re.$(OBJEXT): $(top_srcdir)/internal/variable.h
+re.$(OBJEXT): $(top_srcdir)/internal/warnings.h
re.$(OBJEXT): {$(VPATH)}assert.h
+re.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+re.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+re.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+re.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+re.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+re.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+re.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+re.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+re.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
re.$(OBJEXT): {$(VPATH)}config.h
+re.$(OBJEXT): {$(VPATH)}constant.h
re.$(OBJEXT): {$(VPATH)}defines.h
re.$(OBJEXT): {$(VPATH)}encindex.h
re.$(OBJEXT): {$(VPATH)}encoding.h
+re.$(OBJEXT): {$(VPATH)}hrtime.h
+re.$(OBJEXT): {$(VPATH)}id_table.h
re.$(OBJEXT): {$(VPATH)}intern.h
re.$(OBJEXT): {$(VPATH)}internal.h
+re.$(OBJEXT): {$(VPATH)}internal/abi.h
+re.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+re.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+re.$(OBJEXT): {$(VPATH)}internal/assume.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+re.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+re.$(OBJEXT): {$(VPATH)}internal/cast.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+re.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+re.$(OBJEXT): {$(VPATH)}internal/config.h
+re.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+re.$(OBJEXT): {$(VPATH)}internal/core.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rmatch.h
+re.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+re.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+re.$(OBJEXT): {$(VPATH)}internal/ctype.h
+re.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+re.$(OBJEXT): {$(VPATH)}internal/dosish.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+re.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+re.$(OBJEXT): {$(VPATH)}internal/error.h
+re.$(OBJEXT): {$(VPATH)}internal/eval.h
+re.$(OBJEXT): {$(VPATH)}internal/event.h
+re.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+re.$(OBJEXT): {$(VPATH)}internal/gc.h
+re.$(OBJEXT): {$(VPATH)}internal/glob.h
+re.$(OBJEXT): {$(VPATH)}internal/globals.h
+re.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+re.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+re.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+re.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+re.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+re.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+re.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+re.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+re.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+re.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+re.$(OBJEXT): {$(VPATH)}internal/iterator.h
+re.$(OBJEXT): {$(VPATH)}internal/memory.h
+re.$(OBJEXT): {$(VPATH)}internal/method.h
+re.$(OBJEXT): {$(VPATH)}internal/module.h
+re.$(OBJEXT): {$(VPATH)}internal/newobj.h
+re.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+re.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+re.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+re.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+re.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+re.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+re.$(OBJEXT): {$(VPATH)}internal/symbol.h
+re.$(OBJEXT): {$(VPATH)}internal/value.h
+re.$(OBJEXT): {$(VPATH)}internal/value_type.h
+re.$(OBJEXT): {$(VPATH)}internal/variable.h
+re.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+re.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
re.$(OBJEXT): {$(VPATH)}missing.h
re.$(OBJEXT): {$(VPATH)}onigmo.h
re.$(OBJEXT): {$(VPATH)}oniguruma.h
@@ -2676,14 +12551,164 @@ re.$(OBJEXT): {$(VPATH)}re.h
re.$(OBJEXT): {$(VPATH)}regenc.h
re.$(OBJEXT): {$(VPATH)}regex.h
re.$(OBJEXT): {$(VPATH)}regint.h
+re.$(OBJEXT): {$(VPATH)}shape.h
re.$(OBJEXT): {$(VPATH)}st.h
re.$(OBJEXT): {$(VPATH)}subst.h
re.$(OBJEXT): {$(VPATH)}util.h
+regcomp.$(OBJEXT): $(hdrdir)/ruby.h
regcomp.$(OBJEXT): $(hdrdir)/ruby/ruby.h
regcomp.$(OBJEXT): {$(VPATH)}assert.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regcomp.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regcomp.$(OBJEXT): {$(VPATH)}config.h
regcomp.$(OBJEXT): {$(VPATH)}defines.h
regcomp.$(OBJEXT): {$(VPATH)}intern.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/abi.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/assume.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/cast.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/config.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/error.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/eval.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/event.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/gc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/glob.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/globals.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/memory.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/method.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/module.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/value.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/variable.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regcomp.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regcomp.$(OBJEXT): {$(VPATH)}missing.h
regcomp.$(OBJEXT): {$(VPATH)}onigmo.h
regcomp.$(OBJEXT): {$(VPATH)}regcomp.c
@@ -2692,11 +12717,160 @@ regcomp.$(OBJEXT): {$(VPATH)}regint.h
regcomp.$(OBJEXT): {$(VPATH)}regparse.h
regcomp.$(OBJEXT): {$(VPATH)}st.h
regcomp.$(OBJEXT): {$(VPATH)}subst.h
+regenc.$(OBJEXT): $(hdrdir)/ruby.h
regenc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
regenc.$(OBJEXT): {$(VPATH)}assert.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regenc.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regenc.$(OBJEXT): {$(VPATH)}config.h
regenc.$(OBJEXT): {$(VPATH)}defines.h
regenc.$(OBJEXT): {$(VPATH)}intern.h
+regenc.$(OBJEXT): {$(VPATH)}internal/abi.h
+regenc.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regenc.$(OBJEXT): {$(VPATH)}internal/assume.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regenc.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regenc.$(OBJEXT): {$(VPATH)}internal/cast.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regenc.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regenc.$(OBJEXT): {$(VPATH)}internal/config.h
+regenc.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regenc.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regenc.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regenc.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regenc.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regenc.$(OBJEXT): {$(VPATH)}internal/error.h
+regenc.$(OBJEXT): {$(VPATH)}internal/eval.h
+regenc.$(OBJEXT): {$(VPATH)}internal/event.h
+regenc.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regenc.$(OBJEXT): {$(VPATH)}internal/gc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/glob.h
+regenc.$(OBJEXT): {$(VPATH)}internal/globals.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regenc.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regenc.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regenc.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regenc.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regenc.$(OBJEXT): {$(VPATH)}internal/memory.h
+regenc.$(OBJEXT): {$(VPATH)}internal/method.h
+regenc.$(OBJEXT): {$(VPATH)}internal/module.h
+regenc.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regenc.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regenc.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regenc.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regenc.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regenc.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regenc.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regenc.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regenc.$(OBJEXT): {$(VPATH)}internal/value.h
+regenc.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regenc.$(OBJEXT): {$(VPATH)}internal/variable.h
+regenc.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regenc.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regenc.$(OBJEXT): {$(VPATH)}missing.h
regenc.$(OBJEXT): {$(VPATH)}onigmo.h
regenc.$(OBJEXT): {$(VPATH)}regenc.c
@@ -2704,11 +12878,160 @@ regenc.$(OBJEXT): {$(VPATH)}regenc.h
regenc.$(OBJEXT): {$(VPATH)}regint.h
regenc.$(OBJEXT): {$(VPATH)}st.h
regenc.$(OBJEXT): {$(VPATH)}subst.h
+regerror.$(OBJEXT): $(hdrdir)/ruby.h
regerror.$(OBJEXT): $(hdrdir)/ruby/ruby.h
regerror.$(OBJEXT): {$(VPATH)}assert.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regerror.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regerror.$(OBJEXT): {$(VPATH)}config.h
regerror.$(OBJEXT): {$(VPATH)}defines.h
regerror.$(OBJEXT): {$(VPATH)}intern.h
+regerror.$(OBJEXT): {$(VPATH)}internal/abi.h
+regerror.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regerror.$(OBJEXT): {$(VPATH)}internal/assume.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regerror.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regerror.$(OBJEXT): {$(VPATH)}internal/cast.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regerror.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regerror.$(OBJEXT): {$(VPATH)}internal/config.h
+regerror.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regerror.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regerror.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regerror.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regerror.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regerror.$(OBJEXT): {$(VPATH)}internal/error.h
+regerror.$(OBJEXT): {$(VPATH)}internal/eval.h
+regerror.$(OBJEXT): {$(VPATH)}internal/event.h
+regerror.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regerror.$(OBJEXT): {$(VPATH)}internal/gc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/glob.h
+regerror.$(OBJEXT): {$(VPATH)}internal/globals.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regerror.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regerror.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regerror.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regerror.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regerror.$(OBJEXT): {$(VPATH)}internal/memory.h
+regerror.$(OBJEXT): {$(VPATH)}internal/method.h
+regerror.$(OBJEXT): {$(VPATH)}internal/module.h
+regerror.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regerror.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regerror.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regerror.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regerror.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regerror.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regerror.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regerror.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regerror.$(OBJEXT): {$(VPATH)}internal/value.h
+regerror.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regerror.$(OBJEXT): {$(VPATH)}internal/variable.h
+regerror.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regerror.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regerror.$(OBJEXT): {$(VPATH)}missing.h
regerror.$(OBJEXT): {$(VPATH)}onigmo.h
regerror.$(OBJEXT): {$(VPATH)}regenc.h
@@ -2716,11 +13039,160 @@ regerror.$(OBJEXT): {$(VPATH)}regerror.c
regerror.$(OBJEXT): {$(VPATH)}regint.h
regerror.$(OBJEXT): {$(VPATH)}st.h
regerror.$(OBJEXT): {$(VPATH)}subst.h
+regexec.$(OBJEXT): $(hdrdir)/ruby.h
regexec.$(OBJEXT): $(hdrdir)/ruby/ruby.h
regexec.$(OBJEXT): {$(VPATH)}assert.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regexec.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regexec.$(OBJEXT): {$(VPATH)}config.h
regexec.$(OBJEXT): {$(VPATH)}defines.h
regexec.$(OBJEXT): {$(VPATH)}intern.h
+regexec.$(OBJEXT): {$(VPATH)}internal/abi.h
+regexec.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regexec.$(OBJEXT): {$(VPATH)}internal/assume.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regexec.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regexec.$(OBJEXT): {$(VPATH)}internal/cast.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regexec.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regexec.$(OBJEXT): {$(VPATH)}internal/config.h
+regexec.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regexec.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regexec.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regexec.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regexec.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regexec.$(OBJEXT): {$(VPATH)}internal/error.h
+regexec.$(OBJEXT): {$(VPATH)}internal/eval.h
+regexec.$(OBJEXT): {$(VPATH)}internal/event.h
+regexec.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regexec.$(OBJEXT): {$(VPATH)}internal/gc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/glob.h
+regexec.$(OBJEXT): {$(VPATH)}internal/globals.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regexec.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regexec.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regexec.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regexec.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regexec.$(OBJEXT): {$(VPATH)}internal/memory.h
+regexec.$(OBJEXT): {$(VPATH)}internal/method.h
+regexec.$(OBJEXT): {$(VPATH)}internal/module.h
+regexec.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regexec.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regexec.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regexec.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regexec.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regexec.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regexec.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regexec.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regexec.$(OBJEXT): {$(VPATH)}internal/value.h
+regexec.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regexec.$(OBJEXT): {$(VPATH)}internal/variable.h
+regexec.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regexec.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regexec.$(OBJEXT): {$(VPATH)}missing.h
regexec.$(OBJEXT): {$(VPATH)}onigmo.h
regexec.$(OBJEXT): {$(VPATH)}regenc.h
@@ -2728,11 +13200,164 @@ regexec.$(OBJEXT): {$(VPATH)}regexec.c
regexec.$(OBJEXT): {$(VPATH)}regint.h
regexec.$(OBJEXT): {$(VPATH)}st.h
regexec.$(OBJEXT): {$(VPATH)}subst.h
+regparse.$(OBJEXT): $(hdrdir)/ruby.h
regparse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+regparse.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+regparse.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+regparse.$(OBJEXT): $(top_srcdir)/internal/warnings.h
regparse.$(OBJEXT): {$(VPATH)}assert.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regparse.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regparse.$(OBJEXT): {$(VPATH)}config.h
regparse.$(OBJEXT): {$(VPATH)}defines.h
regparse.$(OBJEXT): {$(VPATH)}intern.h
+regparse.$(OBJEXT): {$(VPATH)}internal/abi.h
+regparse.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regparse.$(OBJEXT): {$(VPATH)}internal/assume.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regparse.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regparse.$(OBJEXT): {$(VPATH)}internal/cast.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regparse.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regparse.$(OBJEXT): {$(VPATH)}internal/config.h
+regparse.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regparse.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regparse.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regparse.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regparse.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regparse.$(OBJEXT): {$(VPATH)}internal/error.h
+regparse.$(OBJEXT): {$(VPATH)}internal/eval.h
+regparse.$(OBJEXT): {$(VPATH)}internal/event.h
+regparse.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regparse.$(OBJEXT): {$(VPATH)}internal/gc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/glob.h
+regparse.$(OBJEXT): {$(VPATH)}internal/globals.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regparse.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regparse.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regparse.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regparse.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regparse.$(OBJEXT): {$(VPATH)}internal/memory.h
+regparse.$(OBJEXT): {$(VPATH)}internal/method.h
+regparse.$(OBJEXT): {$(VPATH)}internal/module.h
+regparse.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regparse.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regparse.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regparse.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regparse.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regparse.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regparse.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regparse.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regparse.$(OBJEXT): {$(VPATH)}internal/value.h
+regparse.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regparse.$(OBJEXT): {$(VPATH)}internal/variable.h
+regparse.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regparse.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regparse.$(OBJEXT): {$(VPATH)}missing.h
regparse.$(OBJEXT): {$(VPATH)}onigmo.h
regparse.$(OBJEXT): {$(VPATH)}regenc.h
@@ -2741,11 +13366,160 @@ regparse.$(OBJEXT): {$(VPATH)}regparse.c
regparse.$(OBJEXT): {$(VPATH)}regparse.h
regparse.$(OBJEXT): {$(VPATH)}st.h
regparse.$(OBJEXT): {$(VPATH)}subst.h
+regsyntax.$(OBJEXT): $(hdrdir)/ruby.h
regsyntax.$(OBJEXT): $(hdrdir)/ruby/ruby.h
regsyntax.$(OBJEXT): {$(VPATH)}assert.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+regsyntax.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
regsyntax.$(OBJEXT): {$(VPATH)}config.h
regsyntax.$(OBJEXT): {$(VPATH)}defines.h
regsyntax.$(OBJEXT): {$(VPATH)}intern.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/abi.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/assume.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/cast.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/config.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/ctype.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/dosish.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/error.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/eval.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/event.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/gc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/glob.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/globals.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/iterator.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/memory.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/method.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/module.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/newobj.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/symbol.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/value.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/value_type.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/variable.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+regsyntax.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
regsyntax.$(OBJEXT): {$(VPATH)}missing.h
regsyntax.$(OBJEXT): {$(VPATH)}onigmo.h
regsyntax.$(OBJEXT): {$(VPATH)}regenc.h
@@ -2754,6 +13528,15 @@ regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c
regsyntax.$(OBJEXT): {$(VPATH)}st.h
regsyntax.$(OBJEXT): {$(VPATH)}subst.h
ruby-runner.$(OBJEXT): {$(VPATH)}config.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+ruby-runner.$(OBJEXT): {$(VPATH)}internal/config.h
ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.c
ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.h
ruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
@@ -2763,16 +13546,203 @@ ruby.$(OBJEXT): $(CCAN_DIR)/str/str.h
ruby.$(OBJEXT): $(hdrdir)/ruby.h
ruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h
ruby.$(OBJEXT): $(hdrdir)/ruby/version.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/array.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/class.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/cmdlineopt.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/cont.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/error.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/file.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/gc.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/inits.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/io.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/load.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/loadpath.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/missing.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/object.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/parse.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/process.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/serial.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/string.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/variable.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/vm.h
+ruby.$(OBJEXT): $(top_srcdir)/internal/warnings.h
ruby.$(OBJEXT): {$(VPATH)}assert.h
+ruby.$(OBJEXT): {$(VPATH)}atomic.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+ruby.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
ruby.$(OBJEXT): {$(VPATH)}config.h
+ruby.$(OBJEXT): {$(VPATH)}constant.h
ruby.$(OBJEXT): {$(VPATH)}debug_counter.h
ruby.$(OBJEXT): {$(VPATH)}defines.h
ruby.$(OBJEXT): {$(VPATH)}dln.h
ruby.$(OBJEXT): {$(VPATH)}encoding.h
ruby.$(OBJEXT): {$(VPATH)}eval_intern.h
ruby.$(OBJEXT): {$(VPATH)}id.h
+ruby.$(OBJEXT): {$(VPATH)}id_table.h
ruby.$(OBJEXT): {$(VPATH)}intern.h
ruby.$(OBJEXT): {$(VPATH)}internal.h
+ruby.$(OBJEXT): {$(VPATH)}internal/abi.h
+ruby.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+ruby.$(OBJEXT): {$(VPATH)}internal/assume.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+ruby.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+ruby.$(OBJEXT): {$(VPATH)}internal/cast.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+ruby.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+ruby.$(OBJEXT): {$(VPATH)}internal/config.h
+ruby.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+ruby.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+ruby.$(OBJEXT): {$(VPATH)}internal/ctype.h
+ruby.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+ruby.$(OBJEXT): {$(VPATH)}internal/dosish.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+ruby.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+ruby.$(OBJEXT): {$(VPATH)}internal/error.h
+ruby.$(OBJEXT): {$(VPATH)}internal/eval.h
+ruby.$(OBJEXT): {$(VPATH)}internal/event.h
+ruby.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+ruby.$(OBJEXT): {$(VPATH)}internal/gc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/glob.h
+ruby.$(OBJEXT): {$(VPATH)}internal/globals.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+ruby.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+ruby.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+ruby.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+ruby.$(OBJEXT): {$(VPATH)}internal/iterator.h
+ruby.$(OBJEXT): {$(VPATH)}internal/memory.h
+ruby.$(OBJEXT): {$(VPATH)}internal/method.h
+ruby.$(OBJEXT): {$(VPATH)}internal/module.h
+ruby.$(OBJEXT): {$(VPATH)}internal/newobj.h
+ruby.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+ruby.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+ruby.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+ruby.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+ruby.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+ruby.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+ruby.$(OBJEXT): {$(VPATH)}internal/symbol.h
+ruby.$(OBJEXT): {$(VPATH)}internal/value.h
+ruby.$(OBJEXT): {$(VPATH)}internal/value_type.h
+ruby.$(OBJEXT): {$(VPATH)}internal/variable.h
+ruby.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+ruby.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+ruby.$(OBJEXT): {$(VPATH)}io.h
+ruby.$(OBJEXT): {$(VPATH)}iseq.h
ruby.$(OBJEXT): {$(VPATH)}method.h
ruby.$(OBJEXT): {$(VPATH)}missing.h
ruby.$(OBJEXT): {$(VPATH)}mjit.h
@@ -2782,6 +13752,7 @@ ruby.$(OBJEXT): {$(VPATH)}oniguruma.h
ruby.$(OBJEXT): {$(VPATH)}ruby.c
ruby.$(OBJEXT): {$(VPATH)}ruby_assert.h
ruby.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+ruby.$(OBJEXT): {$(VPATH)}shape.h
ruby.$(OBJEXT): {$(VPATH)}st.h
ruby.$(OBJEXT): {$(VPATH)}subst.h
ruby.$(OBJEXT): {$(VPATH)}thread.h
@@ -2790,104 +13761,1318 @@ ruby.$(OBJEXT): {$(VPATH)}thread_native.h
ruby.$(OBJEXT): {$(VPATH)}util.h
ruby.$(OBJEXT): {$(VPATH)}vm_core.h
ruby.$(OBJEXT): {$(VPATH)}vm_opts.h
-safe.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-safe.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-safe.$(OBJEXT): $(CCAN_DIR)/list/list.h
-safe.$(OBJEXT): $(CCAN_DIR)/str/str.h
-safe.$(OBJEXT): $(hdrdir)/ruby.h
-safe.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-safe.$(OBJEXT): {$(VPATH)}assert.h
-safe.$(OBJEXT): {$(VPATH)}config.h
-safe.$(OBJEXT): {$(VPATH)}defines.h
-safe.$(OBJEXT): {$(VPATH)}id.h
-safe.$(OBJEXT): {$(VPATH)}intern.h
-safe.$(OBJEXT): {$(VPATH)}internal.h
-safe.$(OBJEXT): {$(VPATH)}method.h
-safe.$(OBJEXT): {$(VPATH)}missing.h
-safe.$(OBJEXT): {$(VPATH)}node.h
-safe.$(OBJEXT): {$(VPATH)}ruby_assert.h
-safe.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-safe.$(OBJEXT): {$(VPATH)}safe.c
-safe.$(OBJEXT): {$(VPATH)}st.h
-safe.$(OBJEXT): {$(VPATH)}subst.h
-safe.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-safe.$(OBJEXT): {$(VPATH)}thread_native.h
-safe.$(OBJEXT): {$(VPATH)}vm_core.h
-safe.$(OBJEXT): {$(VPATH)}vm_opts.h
+ruby.$(OBJEXT): {$(VPATH)}yjit.h
+scheduler.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+scheduler.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+scheduler.$(OBJEXT): $(CCAN_DIR)/list/list.h
+scheduler.$(OBJEXT): $(CCAN_DIR)/str/str.h
+scheduler.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/array.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/gc.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/serial.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/thread.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/variable.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/vm.h
+scheduler.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+scheduler.$(OBJEXT): {$(VPATH)}assert.h
+scheduler.$(OBJEXT): {$(VPATH)}atomic.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+scheduler.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+scheduler.$(OBJEXT): {$(VPATH)}config.h
+scheduler.$(OBJEXT): {$(VPATH)}constant.h
+scheduler.$(OBJEXT): {$(VPATH)}defines.h
+scheduler.$(OBJEXT): {$(VPATH)}encoding.h
+scheduler.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
+scheduler.$(OBJEXT): {$(VPATH)}id.h
+scheduler.$(OBJEXT): {$(VPATH)}id_table.h
+scheduler.$(OBJEXT): {$(VPATH)}intern.h
+scheduler.$(OBJEXT): {$(VPATH)}internal.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/abi.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/assume.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/cast.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/config.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/ctype.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/dosish.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/error.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/eval.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/event.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/gc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/glob.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/globals.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/iterator.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/memory.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/method.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/module.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/newobj.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/symbol.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/value.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/value_type.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/variable.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+scheduler.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+scheduler.$(OBJEXT): {$(VPATH)}io.h
+scheduler.$(OBJEXT): {$(VPATH)}io/buffer.h
+scheduler.$(OBJEXT): {$(VPATH)}method.h
+scheduler.$(OBJEXT): {$(VPATH)}missing.h
+scheduler.$(OBJEXT): {$(VPATH)}node.h
+scheduler.$(OBJEXT): {$(VPATH)}onigmo.h
+scheduler.$(OBJEXT): {$(VPATH)}oniguruma.h
+scheduler.$(OBJEXT): {$(VPATH)}ruby_assert.h
+scheduler.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+scheduler.$(OBJEXT): {$(VPATH)}scheduler.c
+scheduler.$(OBJEXT): {$(VPATH)}shape.h
+scheduler.$(OBJEXT): {$(VPATH)}st.h
+scheduler.$(OBJEXT): {$(VPATH)}subst.h
+scheduler.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+scheduler.$(OBJEXT): {$(VPATH)}thread_native.h
+scheduler.$(OBJEXT): {$(VPATH)}vm_core.h
+scheduler.$(OBJEXT): {$(VPATH)}vm_opts.h
setproctitle.$(OBJEXT): $(hdrdir)/ruby.h
setproctitle.$(OBJEXT): $(hdrdir)/ruby/ruby.h
setproctitle.$(OBJEXT): {$(VPATH)}assert.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+setproctitle.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
setproctitle.$(OBJEXT): {$(VPATH)}config.h
setproctitle.$(OBJEXT): {$(VPATH)}defines.h
setproctitle.$(OBJEXT): {$(VPATH)}intern.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/abi.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/assume.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/cast.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/config.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/ctype.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/dosish.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/error.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/eval.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/event.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/gc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/glob.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/globals.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/iterator.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/memory.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/method.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/module.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/newobj.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/symbol.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/value.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/value_type.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/variable.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+setproctitle.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
setproctitle.$(OBJEXT): {$(VPATH)}missing.h
setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c
setproctitle.$(OBJEXT): {$(VPATH)}st.h
setproctitle.$(OBJEXT): {$(VPATH)}subst.h
setproctitle.$(OBJEXT): {$(VPATH)}util.h
+shape.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+shape.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+shape.$(OBJEXT): $(CCAN_DIR)/list/list.h
+shape.$(OBJEXT): $(CCAN_DIR)/str/str.h
+shape.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+shape.$(OBJEXT): $(top_srcdir)/internal/array.h
+shape.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+shape.$(OBJEXT): $(top_srcdir)/internal/class.h
+shape.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+shape.$(OBJEXT): $(top_srcdir)/internal/gc.h
+shape.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+shape.$(OBJEXT): $(top_srcdir)/internal/serial.h
+shape.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+shape.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+shape.$(OBJEXT): $(top_srcdir)/internal/variable.h
+shape.$(OBJEXT): $(top_srcdir)/internal/vm.h
+shape.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+shape.$(OBJEXT): {$(VPATH)}assert.h
+shape.$(OBJEXT): {$(VPATH)}atomic.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+shape.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+shape.$(OBJEXT): {$(VPATH)}config.h
+shape.$(OBJEXT): {$(VPATH)}constant.h
+shape.$(OBJEXT): {$(VPATH)}debug_counter.h
+shape.$(OBJEXT): {$(VPATH)}defines.h
+shape.$(OBJEXT): {$(VPATH)}encoding.h
+shape.$(OBJEXT): {$(VPATH)}gc.h
+shape.$(OBJEXT): {$(VPATH)}id.h
+shape.$(OBJEXT): {$(VPATH)}id_table.h
+shape.$(OBJEXT): {$(VPATH)}intern.h
+shape.$(OBJEXT): {$(VPATH)}internal.h
+shape.$(OBJEXT): {$(VPATH)}internal/abi.h
+shape.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+shape.$(OBJEXT): {$(VPATH)}internal/assume.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+shape.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+shape.$(OBJEXT): {$(VPATH)}internal/cast.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+shape.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+shape.$(OBJEXT): {$(VPATH)}internal/config.h
+shape.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+shape.$(OBJEXT): {$(VPATH)}internal/core.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+shape.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+shape.$(OBJEXT): {$(VPATH)}internal/ctype.h
+shape.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+shape.$(OBJEXT): {$(VPATH)}internal/dosish.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+shape.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+shape.$(OBJEXT): {$(VPATH)}internal/error.h
+shape.$(OBJEXT): {$(VPATH)}internal/eval.h
+shape.$(OBJEXT): {$(VPATH)}internal/event.h
+shape.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+shape.$(OBJEXT): {$(VPATH)}internal/gc.h
+shape.$(OBJEXT): {$(VPATH)}internal/glob.h
+shape.$(OBJEXT): {$(VPATH)}internal/globals.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+shape.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+shape.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+shape.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+shape.$(OBJEXT): {$(VPATH)}internal/iterator.h
+shape.$(OBJEXT): {$(VPATH)}internal/memory.h
+shape.$(OBJEXT): {$(VPATH)}internal/method.h
+shape.$(OBJEXT): {$(VPATH)}internal/module.h
+shape.$(OBJEXT): {$(VPATH)}internal/newobj.h
+shape.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+shape.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+shape.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+shape.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+shape.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+shape.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+shape.$(OBJEXT): {$(VPATH)}internal/symbol.h
+shape.$(OBJEXT): {$(VPATH)}internal/value.h
+shape.$(OBJEXT): {$(VPATH)}internal/value_type.h
+shape.$(OBJEXT): {$(VPATH)}internal/variable.h
+shape.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+shape.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+shape.$(OBJEXT): {$(VPATH)}method.h
+shape.$(OBJEXT): {$(VPATH)}missing.h
+shape.$(OBJEXT): {$(VPATH)}node.h
+shape.$(OBJEXT): {$(VPATH)}onigmo.h
+shape.$(OBJEXT): {$(VPATH)}oniguruma.h
+shape.$(OBJEXT): {$(VPATH)}ruby_assert.h
+shape.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+shape.$(OBJEXT): {$(VPATH)}shape.c
+shape.$(OBJEXT): {$(VPATH)}shape.h
+shape.$(OBJEXT): {$(VPATH)}st.h
+shape.$(OBJEXT): {$(VPATH)}subst.h
+shape.$(OBJEXT): {$(VPATH)}symbol.h
+shape.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+shape.$(OBJEXT): {$(VPATH)}thread_native.h
+shape.$(OBJEXT): {$(VPATH)}variable.h
+shape.$(OBJEXT): {$(VPATH)}vm_core.h
+shape.$(OBJEXT): {$(VPATH)}vm_debug.h
+shape.$(OBJEXT): {$(VPATH)}vm_opts.h
+shape.$(OBJEXT): {$(VPATH)}vm_sync.h
signal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
signal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
signal.$(OBJEXT): $(CCAN_DIR)/list/list.h
signal.$(OBJEXT): $(CCAN_DIR)/str/str.h
-signal.$(OBJEXT): $(hdrdir)/ruby.h
signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+signal.$(OBJEXT): $(top_srcdir)/internal/array.h
+signal.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+signal.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+signal.$(OBJEXT): $(top_srcdir)/internal/eval.h
+signal.$(OBJEXT): $(top_srcdir)/internal/gc.h
+signal.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+signal.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+signal.$(OBJEXT): $(top_srcdir)/internal/serial.h
+signal.$(OBJEXT): $(top_srcdir)/internal/signal.h
+signal.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+signal.$(OBJEXT): $(top_srcdir)/internal/string.h
+signal.$(OBJEXT): $(top_srcdir)/internal/thread.h
+signal.$(OBJEXT): $(top_srcdir)/internal/variable.h
+signal.$(OBJEXT): $(top_srcdir)/internal/vm.h
+signal.$(OBJEXT): $(top_srcdir)/internal/warnings.h
signal.$(OBJEXT): {$(VPATH)}assert.h
+signal.$(OBJEXT): {$(VPATH)}atomic.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+signal.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
signal.$(OBJEXT): {$(VPATH)}config.h
+signal.$(OBJEXT): {$(VPATH)}constant.h
signal.$(OBJEXT): {$(VPATH)}debug_counter.h
signal.$(OBJEXT): {$(VPATH)}defines.h
+signal.$(OBJEXT): {$(VPATH)}encoding.h
signal.$(OBJEXT): {$(VPATH)}eval_intern.h
signal.$(OBJEXT): {$(VPATH)}id.h
+signal.$(OBJEXT): {$(VPATH)}id_table.h
signal.$(OBJEXT): {$(VPATH)}intern.h
signal.$(OBJEXT): {$(VPATH)}internal.h
+signal.$(OBJEXT): {$(VPATH)}internal/abi.h
+signal.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+signal.$(OBJEXT): {$(VPATH)}internal/assume.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+signal.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+signal.$(OBJEXT): {$(VPATH)}internal/cast.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+signal.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+signal.$(OBJEXT): {$(VPATH)}internal/config.h
+signal.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+signal.$(OBJEXT): {$(VPATH)}internal/core.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+signal.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+signal.$(OBJEXT): {$(VPATH)}internal/ctype.h
+signal.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+signal.$(OBJEXT): {$(VPATH)}internal/dosish.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+signal.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+signal.$(OBJEXT): {$(VPATH)}internal/error.h
+signal.$(OBJEXT): {$(VPATH)}internal/eval.h
+signal.$(OBJEXT): {$(VPATH)}internal/event.h
+signal.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+signal.$(OBJEXT): {$(VPATH)}internal/gc.h
+signal.$(OBJEXT): {$(VPATH)}internal/glob.h
+signal.$(OBJEXT): {$(VPATH)}internal/globals.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+signal.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+signal.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+signal.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+signal.$(OBJEXT): {$(VPATH)}internal/iterator.h
+signal.$(OBJEXT): {$(VPATH)}internal/memory.h
+signal.$(OBJEXT): {$(VPATH)}internal/method.h
+signal.$(OBJEXT): {$(VPATH)}internal/module.h
+signal.$(OBJEXT): {$(VPATH)}internal/newobj.h
+signal.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+signal.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+signal.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+signal.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+signal.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+signal.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+signal.$(OBJEXT): {$(VPATH)}internal/symbol.h
+signal.$(OBJEXT): {$(VPATH)}internal/value.h
+signal.$(OBJEXT): {$(VPATH)}internal/value_type.h
+signal.$(OBJEXT): {$(VPATH)}internal/variable.h
+signal.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+signal.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
signal.$(OBJEXT): {$(VPATH)}method.h
signal.$(OBJEXT): {$(VPATH)}missing.h
signal.$(OBJEXT): {$(VPATH)}node.h
+signal.$(OBJEXT): {$(VPATH)}onigmo.h
+signal.$(OBJEXT): {$(VPATH)}oniguruma.h
+signal.$(OBJEXT): {$(VPATH)}ractor.h
+signal.$(OBJEXT): {$(VPATH)}ractor_core.h
signal.$(OBJEXT): {$(VPATH)}ruby_assert.h
signal.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+signal.$(OBJEXT): {$(VPATH)}shape.h
signal.$(OBJEXT): {$(VPATH)}signal.c
signal.$(OBJEXT): {$(VPATH)}st.h
signal.$(OBJEXT): {$(VPATH)}subst.h
signal.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
signal.$(OBJEXT): {$(VPATH)}thread_native.h
signal.$(OBJEXT): {$(VPATH)}vm_core.h
+signal.$(OBJEXT): {$(VPATH)}vm_debug.h
signal.$(OBJEXT): {$(VPATH)}vm_opts.h
-sprintf.$(OBJEXT): $(hdrdir)/ruby.h
sprintf.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/bits.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/class.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/error.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/gc.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/hash.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/object.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/serial.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/string.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/variable.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/vm.h
+sprintf.$(OBJEXT): $(top_srcdir)/internal/warnings.h
sprintf.$(OBJEXT): {$(VPATH)}assert.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+sprintf.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
sprintf.$(OBJEXT): {$(VPATH)}config.h
+sprintf.$(OBJEXT): {$(VPATH)}constant.h
sprintf.$(OBJEXT): {$(VPATH)}defines.h
sprintf.$(OBJEXT): {$(VPATH)}encoding.h
sprintf.$(OBJEXT): {$(VPATH)}id.h
+sprintf.$(OBJEXT): {$(VPATH)}id_table.h
sprintf.$(OBJEXT): {$(VPATH)}intern.h
sprintf.$(OBJEXT): {$(VPATH)}internal.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/abi.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/assume.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/cast.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/config.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rmatch.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/ctype.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/dosish.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/error.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/eval.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/event.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/gc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/glob.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/globals.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/iterator.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/memory.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/method.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/module.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/newobj.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/symbol.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/value.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/value_type.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/variable.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+sprintf.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
sprintf.$(OBJEXT): {$(VPATH)}missing.h
sprintf.$(OBJEXT): {$(VPATH)}onigmo.h
sprintf.$(OBJEXT): {$(VPATH)}oniguruma.h
sprintf.$(OBJEXT): {$(VPATH)}re.h
sprintf.$(OBJEXT): {$(VPATH)}regex.h
+sprintf.$(OBJEXT): {$(VPATH)}shape.h
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c
sprintf.$(OBJEXT): {$(VPATH)}st.h
sprintf.$(OBJEXT): {$(VPATH)}subst.h
+sprintf.$(OBJEXT): {$(VPATH)}util.h
sprintf.$(OBJEXT): {$(VPATH)}vsnprintf.c
-st.$(OBJEXT): $(hdrdir)/ruby.h
st.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+st.$(OBJEXT): $(top_srcdir)/internal/bits.h
+st.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+st.$(OBJEXT): $(top_srcdir)/internal/hash.h
+st.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+st.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+st.$(OBJEXT): $(top_srcdir)/internal/warnings.h
st.$(OBJEXT): {$(VPATH)}assert.h
+st.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+st.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+st.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+st.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+st.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+st.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+st.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+st.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+st.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
st.$(OBJEXT): {$(VPATH)}config.h
st.$(OBJEXT): {$(VPATH)}defines.h
st.$(OBJEXT): {$(VPATH)}intern.h
st.$(OBJEXT): {$(VPATH)}internal.h
+st.$(OBJEXT): {$(VPATH)}internal/abi.h
+st.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+st.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+st.$(OBJEXT): {$(VPATH)}internal/assume.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+st.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+st.$(OBJEXT): {$(VPATH)}internal/cast.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+st.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+st.$(OBJEXT): {$(VPATH)}internal/config.h
+st.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+st.$(OBJEXT): {$(VPATH)}internal/core.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+st.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+st.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+st.$(OBJEXT): {$(VPATH)}internal/ctype.h
+st.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+st.$(OBJEXT): {$(VPATH)}internal/dosish.h
+st.$(OBJEXT): {$(VPATH)}internal/error.h
+st.$(OBJEXT): {$(VPATH)}internal/eval.h
+st.$(OBJEXT): {$(VPATH)}internal/event.h
+st.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+st.$(OBJEXT): {$(VPATH)}internal/gc.h
+st.$(OBJEXT): {$(VPATH)}internal/glob.h
+st.$(OBJEXT): {$(VPATH)}internal/globals.h
+st.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+st.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+st.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+st.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+st.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+st.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+st.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+st.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+st.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+st.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+st.$(OBJEXT): {$(VPATH)}internal/iterator.h
+st.$(OBJEXT): {$(VPATH)}internal/memory.h
+st.$(OBJEXT): {$(VPATH)}internal/method.h
+st.$(OBJEXT): {$(VPATH)}internal/module.h
+st.$(OBJEXT): {$(VPATH)}internal/newobj.h
+st.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+st.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+st.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+st.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+st.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+st.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+st.$(OBJEXT): {$(VPATH)}internal/symbol.h
+st.$(OBJEXT): {$(VPATH)}internal/value.h
+st.$(OBJEXT): {$(VPATH)}internal/value_type.h
+st.$(OBJEXT): {$(VPATH)}internal/variable.h
+st.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+st.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
st.$(OBJEXT): {$(VPATH)}missing.h
+st.$(OBJEXT): {$(VPATH)}ruby_assert.h
st.$(OBJEXT): {$(VPATH)}st.c
st.$(OBJEXT): {$(VPATH)}st.h
st.$(OBJEXT): {$(VPATH)}subst.h
-strftime.$(OBJEXT): $(hdrdir)/ruby.h
strftime.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/serial.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/string.h
+strftime.$(OBJEXT): $(top_srcdir)/internal/vm.h
strftime.$(OBJEXT): {$(VPATH)}assert.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+strftime.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
strftime.$(OBJEXT): {$(VPATH)}config.h
strftime.$(OBJEXT): {$(VPATH)}defines.h
strftime.$(OBJEXT): {$(VPATH)}encoding.h
strftime.$(OBJEXT): {$(VPATH)}intern.h
strftime.$(OBJEXT): {$(VPATH)}internal.h
+strftime.$(OBJEXT): {$(VPATH)}internal/abi.h
+strftime.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+strftime.$(OBJEXT): {$(VPATH)}internal/assume.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+strftime.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+strftime.$(OBJEXT): {$(VPATH)}internal/cast.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+strftime.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+strftime.$(OBJEXT): {$(VPATH)}internal/config.h
+strftime.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+strftime.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+strftime.$(OBJEXT): {$(VPATH)}internal/ctype.h
+strftime.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+strftime.$(OBJEXT): {$(VPATH)}internal/dosish.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+strftime.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+strftime.$(OBJEXT): {$(VPATH)}internal/error.h
+strftime.$(OBJEXT): {$(VPATH)}internal/eval.h
+strftime.$(OBJEXT): {$(VPATH)}internal/event.h
+strftime.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+strftime.$(OBJEXT): {$(VPATH)}internal/gc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/glob.h
+strftime.$(OBJEXT): {$(VPATH)}internal/globals.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+strftime.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+strftime.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+strftime.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+strftime.$(OBJEXT): {$(VPATH)}internal/iterator.h
+strftime.$(OBJEXT): {$(VPATH)}internal/memory.h
+strftime.$(OBJEXT): {$(VPATH)}internal/method.h
+strftime.$(OBJEXT): {$(VPATH)}internal/module.h
+strftime.$(OBJEXT): {$(VPATH)}internal/newobj.h
+strftime.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+strftime.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+strftime.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+strftime.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+strftime.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+strftime.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+strftime.$(OBJEXT): {$(VPATH)}internal/symbol.h
+strftime.$(OBJEXT): {$(VPATH)}internal/value.h
+strftime.$(OBJEXT): {$(VPATH)}internal/value_type.h
+strftime.$(OBJEXT): {$(VPATH)}internal/variable.h
+strftime.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+strftime.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
strftime.$(OBJEXT): {$(VPATH)}missing.h
strftime.$(OBJEXT): {$(VPATH)}onigmo.h
strftime.$(OBJEXT): {$(VPATH)}oniguruma.h
@@ -2895,19 +15080,204 @@ strftime.$(OBJEXT): {$(VPATH)}st.h
strftime.$(OBJEXT): {$(VPATH)}strftime.c
strftime.$(OBJEXT): {$(VPATH)}subst.h
strftime.$(OBJEXT): {$(VPATH)}timev.h
-string.$(OBJEXT): $(hdrdir)/ruby.h
+strftime.$(OBJEXT): {$(VPATH)}util.h
string.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+string.$(OBJEXT): $(top_srcdir)/internal/array.h
+string.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+string.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+string.$(OBJEXT): $(top_srcdir)/internal/bits.h
+string.$(OBJEXT): $(top_srcdir)/internal/class.h
+string.$(OBJEXT): $(top_srcdir)/internal/compar.h
+string.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+string.$(OBJEXT): $(top_srcdir)/internal/encoding.h
+string.$(OBJEXT): $(top_srcdir)/internal/error.h
+string.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+string.$(OBJEXT): $(top_srcdir)/internal/gc.h
+string.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+string.$(OBJEXT): $(top_srcdir)/internal/object.h
+string.$(OBJEXT): $(top_srcdir)/internal/proc.h
+string.$(OBJEXT): $(top_srcdir)/internal/re.h
+string.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+string.$(OBJEXT): $(top_srcdir)/internal/serial.h
+string.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+string.$(OBJEXT): $(top_srcdir)/internal/string.h
+string.$(OBJEXT): $(top_srcdir)/internal/transcode.h
+string.$(OBJEXT): $(top_srcdir)/internal/variable.h
+string.$(OBJEXT): $(top_srcdir)/internal/vm.h
+string.$(OBJEXT): $(top_srcdir)/internal/warnings.h
string.$(OBJEXT): {$(VPATH)}assert.h
+string.$(OBJEXT): {$(VPATH)}atomic.h
+string.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+string.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+string.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+string.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+string.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+string.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+string.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+string.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+string.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
string.$(OBJEXT): {$(VPATH)}config.h
-string.$(OBJEXT): {$(VPATH)}crypt.h
+string.$(OBJEXT): {$(VPATH)}constant.h
string.$(OBJEXT): {$(VPATH)}debug_counter.h
string.$(OBJEXT): {$(VPATH)}defines.h
string.$(OBJEXT): {$(VPATH)}encindex.h
string.$(OBJEXT): {$(VPATH)}encoding.h
string.$(OBJEXT): {$(VPATH)}gc.h
string.$(OBJEXT): {$(VPATH)}id.h
+string.$(OBJEXT): {$(VPATH)}id_table.h
string.$(OBJEXT): {$(VPATH)}intern.h
string.$(OBJEXT): {$(VPATH)}internal.h
+string.$(OBJEXT): {$(VPATH)}internal/abi.h
+string.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+string.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+string.$(OBJEXT): {$(VPATH)}internal/assume.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+string.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+string.$(OBJEXT): {$(VPATH)}internal/cast.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+string.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+string.$(OBJEXT): {$(VPATH)}internal/config.h
+string.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+string.$(OBJEXT): {$(VPATH)}internal/core.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rmatch.h
+string.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+string.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+string.$(OBJEXT): {$(VPATH)}internal/ctype.h
+string.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+string.$(OBJEXT): {$(VPATH)}internal/dosish.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+string.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+string.$(OBJEXT): {$(VPATH)}internal/error.h
+string.$(OBJEXT): {$(VPATH)}internal/eval.h
+string.$(OBJEXT): {$(VPATH)}internal/event.h
+string.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+string.$(OBJEXT): {$(VPATH)}internal/gc.h
+string.$(OBJEXT): {$(VPATH)}internal/glob.h
+string.$(OBJEXT): {$(VPATH)}internal/globals.h
+string.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+string.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+string.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+string.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+string.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+string.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+string.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+string.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+string.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+string.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+string.$(OBJEXT): {$(VPATH)}internal/iterator.h
+string.$(OBJEXT): {$(VPATH)}internal/memory.h
+string.$(OBJEXT): {$(VPATH)}internal/method.h
+string.$(OBJEXT): {$(VPATH)}internal/module.h
+string.$(OBJEXT): {$(VPATH)}internal/newobj.h
+string.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+string.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+string.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+string.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+string.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+string.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+string.$(OBJEXT): {$(VPATH)}internal/symbol.h
+string.$(OBJEXT): {$(VPATH)}internal/value.h
+string.$(OBJEXT): {$(VPATH)}internal/value_type.h
+string.$(OBJEXT): {$(VPATH)}internal/variable.h
+string.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+string.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
string.$(OBJEXT): {$(VPATH)}missing.h
string.$(OBJEXT): {$(VPATH)}onigmo.h
string.$(OBJEXT): {$(VPATH)}oniguruma.h
@@ -2916,33 +15286,244 @@ string.$(OBJEXT): {$(VPATH)}probes.h
string.$(OBJEXT): {$(VPATH)}re.h
string.$(OBJEXT): {$(VPATH)}regex.h
string.$(OBJEXT): {$(VPATH)}ruby_assert.h
+string.$(OBJEXT): {$(VPATH)}shape.h
string.$(OBJEXT): {$(VPATH)}st.h
string.$(OBJEXT): {$(VPATH)}string.c
string.$(OBJEXT): {$(VPATH)}subst.h
+string.$(OBJEXT): {$(VPATH)}thread_native.h
string.$(OBJEXT): {$(VPATH)}util.h
+string.$(OBJEXT): {$(VPATH)}vm_debug.h
+string.$(OBJEXT): {$(VPATH)}vm_sync.h
strlcat.$(OBJEXT): {$(VPATH)}config.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/config.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+strlcat.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
strlcat.$(OBJEXT): {$(VPATH)}missing.h
strlcat.$(OBJEXT): {$(VPATH)}strlcat.c
strlcpy.$(OBJEXT): {$(VPATH)}config.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/config.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+strlcpy.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
strlcpy.$(OBJEXT): {$(VPATH)}missing.h
strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c
struct.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
struct.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
struct.$(OBJEXT): $(CCAN_DIR)/list/list.h
struct.$(OBJEXT): $(CCAN_DIR)/str/str.h
-struct.$(OBJEXT): $(hdrdir)/ruby.h
struct.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+struct.$(OBJEXT): $(top_srcdir)/internal/array.h
+struct.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+struct.$(OBJEXT): $(top_srcdir)/internal/class.h
+struct.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+struct.$(OBJEXT): $(top_srcdir)/internal/error.h
+struct.$(OBJEXT): $(top_srcdir)/internal/gc.h
+struct.$(OBJEXT): $(top_srcdir)/internal/hash.h
+struct.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+struct.$(OBJEXT): $(top_srcdir)/internal/object.h
+struct.$(OBJEXT): $(top_srcdir)/internal/proc.h
+struct.$(OBJEXT): $(top_srcdir)/internal/serial.h
+struct.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+struct.$(OBJEXT): $(top_srcdir)/internal/string.h
+struct.$(OBJEXT): $(top_srcdir)/internal/struct.h
+struct.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+struct.$(OBJEXT): $(top_srcdir)/internal/variable.h
+struct.$(OBJEXT): $(top_srcdir)/internal/vm.h
+struct.$(OBJEXT): $(top_srcdir)/internal/warnings.h
struct.$(OBJEXT): {$(VPATH)}assert.h
+struct.$(OBJEXT): {$(VPATH)}atomic.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+struct.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+struct.$(OBJEXT): {$(VPATH)}builtin.h
struct.$(OBJEXT): {$(VPATH)}config.h
+struct.$(OBJEXT): {$(VPATH)}constant.h
struct.$(OBJEXT): {$(VPATH)}defines.h
+struct.$(OBJEXT): {$(VPATH)}encoding.h
struct.$(OBJEXT): {$(VPATH)}id.h
+struct.$(OBJEXT): {$(VPATH)}id_table.h
struct.$(OBJEXT): {$(VPATH)}intern.h
struct.$(OBJEXT): {$(VPATH)}internal.h
+struct.$(OBJEXT): {$(VPATH)}internal/abi.h
+struct.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+struct.$(OBJEXT): {$(VPATH)}internal/assume.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+struct.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+struct.$(OBJEXT): {$(VPATH)}internal/cast.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+struct.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+struct.$(OBJEXT): {$(VPATH)}internal/config.h
+struct.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+struct.$(OBJEXT): {$(VPATH)}internal/core.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+struct.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+struct.$(OBJEXT): {$(VPATH)}internal/ctype.h
+struct.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+struct.$(OBJEXT): {$(VPATH)}internal/dosish.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+struct.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+struct.$(OBJEXT): {$(VPATH)}internal/error.h
+struct.$(OBJEXT): {$(VPATH)}internal/eval.h
+struct.$(OBJEXT): {$(VPATH)}internal/event.h
+struct.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+struct.$(OBJEXT): {$(VPATH)}internal/gc.h
+struct.$(OBJEXT): {$(VPATH)}internal/glob.h
+struct.$(OBJEXT): {$(VPATH)}internal/globals.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+struct.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+struct.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+struct.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+struct.$(OBJEXT): {$(VPATH)}internal/iterator.h
+struct.$(OBJEXT): {$(VPATH)}internal/memory.h
+struct.$(OBJEXT): {$(VPATH)}internal/method.h
+struct.$(OBJEXT): {$(VPATH)}internal/module.h
+struct.$(OBJEXT): {$(VPATH)}internal/newobj.h
+struct.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+struct.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+struct.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+struct.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+struct.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+struct.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+struct.$(OBJEXT): {$(VPATH)}internal/symbol.h
+struct.$(OBJEXT): {$(VPATH)}internal/value.h
+struct.$(OBJEXT): {$(VPATH)}internal/value_type.h
+struct.$(OBJEXT): {$(VPATH)}internal/variable.h
+struct.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+struct.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
struct.$(OBJEXT): {$(VPATH)}method.h
struct.$(OBJEXT): {$(VPATH)}missing.h
struct.$(OBJEXT): {$(VPATH)}node.h
+struct.$(OBJEXT): {$(VPATH)}onigmo.h
+struct.$(OBJEXT): {$(VPATH)}oniguruma.h
struct.$(OBJEXT): {$(VPATH)}ruby_assert.h
struct.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+struct.$(OBJEXT): {$(VPATH)}shape.h
struct.$(OBJEXT): {$(VPATH)}st.h
struct.$(OBJEXT): {$(VPATH)}struct.c
struct.$(OBJEXT): {$(VPATH)}subst.h
@@ -2951,10 +15532,34 @@ struct.$(OBJEXT): {$(VPATH)}thread_native.h
struct.$(OBJEXT): {$(VPATH)}transient_heap.h
struct.$(OBJEXT): {$(VPATH)}vm_core.h
struct.$(OBJEXT): {$(VPATH)}vm_opts.h
-symbol.$(OBJEXT): $(hdrdir)/ruby.h
symbol.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/class.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/error.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/gc.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/hash.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/object.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/serial.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/string.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/variable.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/vm.h
+symbol.$(OBJEXT): $(top_srcdir)/internal/warnings.h
symbol.$(OBJEXT): {$(VPATH)}assert.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+symbol.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+symbol.$(OBJEXT): {$(VPATH)}builtin.h
symbol.$(OBJEXT): {$(VPATH)}config.h
+symbol.$(OBJEXT): {$(VPATH)}constant.h
+symbol.$(OBJEXT): {$(VPATH)}debug_counter.h
symbol.$(OBJEXT): {$(VPATH)}defines.h
symbol.$(OBJEXT): {$(VPATH)}encoding.h
symbol.$(OBJEXT): {$(VPATH)}gc.h
@@ -2964,34 +15569,374 @@ symbol.$(OBJEXT): {$(VPATH)}id_table.c
symbol.$(OBJEXT): {$(VPATH)}id_table.h
symbol.$(OBJEXT): {$(VPATH)}intern.h
symbol.$(OBJEXT): {$(VPATH)}internal.h
+symbol.$(OBJEXT): {$(VPATH)}internal/abi.h
+symbol.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+symbol.$(OBJEXT): {$(VPATH)}internal/assume.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/nonstring.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+symbol.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+symbol.$(OBJEXT): {$(VPATH)}internal/cast.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+symbol.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+symbol.$(OBJEXT): {$(VPATH)}internal/config.h
+symbol.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+symbol.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+symbol.$(OBJEXT): {$(VPATH)}internal/ctype.h
+symbol.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+symbol.$(OBJEXT): {$(VPATH)}internal/dosish.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+symbol.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+symbol.$(OBJEXT): {$(VPATH)}internal/error.h
+symbol.$(OBJEXT): {$(VPATH)}internal/eval.h
+symbol.$(OBJEXT): {$(VPATH)}internal/event.h
+symbol.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+symbol.$(OBJEXT): {$(VPATH)}internal/gc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/glob.h
+symbol.$(OBJEXT): {$(VPATH)}internal/globals.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+symbol.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+symbol.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+symbol.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+symbol.$(OBJEXT): {$(VPATH)}internal/iterator.h
+symbol.$(OBJEXT): {$(VPATH)}internal/memory.h
+symbol.$(OBJEXT): {$(VPATH)}internal/method.h
+symbol.$(OBJEXT): {$(VPATH)}internal/module.h
+symbol.$(OBJEXT): {$(VPATH)}internal/newobj.h
+symbol.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+symbol.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+symbol.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+symbol.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+symbol.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+symbol.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+symbol.$(OBJEXT): {$(VPATH)}internal/symbol.h
+symbol.$(OBJEXT): {$(VPATH)}internal/value.h
+symbol.$(OBJEXT): {$(VPATH)}internal/value_type.h
+symbol.$(OBJEXT): {$(VPATH)}internal/variable.h
+symbol.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+symbol.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
symbol.$(OBJEXT): {$(VPATH)}missing.h
symbol.$(OBJEXT): {$(VPATH)}onigmo.h
symbol.$(OBJEXT): {$(VPATH)}oniguruma.h
symbol.$(OBJEXT): {$(VPATH)}probes.dmyh
symbol.$(OBJEXT): {$(VPATH)}probes.h
symbol.$(OBJEXT): {$(VPATH)}ruby_assert.h
+symbol.$(OBJEXT): {$(VPATH)}shape.h
symbol.$(OBJEXT): {$(VPATH)}st.h
symbol.$(OBJEXT): {$(VPATH)}subst.h
symbol.$(OBJEXT): {$(VPATH)}symbol.c
symbol.$(OBJEXT): {$(VPATH)}symbol.h
+symbol.$(OBJEXT): {$(VPATH)}symbol.rb
+symbol.$(OBJEXT): {$(VPATH)}symbol.rbinc
+symbol.$(OBJEXT): {$(VPATH)}vm_debug.h
+symbol.$(OBJEXT): {$(VPATH)}vm_sync.h
thread.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
thread.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
thread.$(OBJEXT): $(CCAN_DIR)/list/list.h
thread.$(OBJEXT): $(CCAN_DIR)/str/str.h
thread.$(OBJEXT): $(hdrdir)/ruby.h
thread.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+thread.$(OBJEXT): $(top_srcdir)/internal/array.h
+thread.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+thread.$(OBJEXT): $(top_srcdir)/internal/bits.h
+thread.$(OBJEXT): $(top_srcdir)/internal/class.h
+thread.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+thread.$(OBJEXT): $(top_srcdir)/internal/cont.h
+thread.$(OBJEXT): $(top_srcdir)/internal/error.h
+thread.$(OBJEXT): $(top_srcdir)/internal/gc.h
+thread.$(OBJEXT): $(top_srcdir)/internal/hash.h
+thread.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+thread.$(OBJEXT): $(top_srcdir)/internal/io.h
+thread.$(OBJEXT): $(top_srcdir)/internal/object.h
+thread.$(OBJEXT): $(top_srcdir)/internal/proc.h
+thread.$(OBJEXT): $(top_srcdir)/internal/serial.h
+thread.$(OBJEXT): $(top_srcdir)/internal/signal.h
+thread.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+thread.$(OBJEXT): $(top_srcdir)/internal/string.h
+thread.$(OBJEXT): $(top_srcdir)/internal/thread.h
+thread.$(OBJEXT): $(top_srcdir)/internal/time.h
+thread.$(OBJEXT): $(top_srcdir)/internal/variable.h
+thread.$(OBJEXT): $(top_srcdir)/internal/vm.h
+thread.$(OBJEXT): $(top_srcdir)/internal/warnings.h
thread.$(OBJEXT): {$(VPATH)}assert.h
+thread.$(OBJEXT): {$(VPATH)}atomic.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+thread.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+thread.$(OBJEXT): {$(VPATH)}builtin.h
thread.$(OBJEXT): {$(VPATH)}config.h
+thread.$(OBJEXT): {$(VPATH)}constant.h
thread.$(OBJEXT): {$(VPATH)}debug.h
thread.$(OBJEXT): {$(VPATH)}debug_counter.h
thread.$(OBJEXT): {$(VPATH)}defines.h
thread.$(OBJEXT): {$(VPATH)}encoding.h
thread.$(OBJEXT): {$(VPATH)}eval_intern.h
+thread.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
thread.$(OBJEXT): {$(VPATH)}gc.h
thread.$(OBJEXT): {$(VPATH)}hrtime.h
thread.$(OBJEXT): {$(VPATH)}id.h
+thread.$(OBJEXT): {$(VPATH)}id_table.h
thread.$(OBJEXT): {$(VPATH)}intern.h
thread.$(OBJEXT): {$(VPATH)}internal.h
+thread.$(OBJEXT): {$(VPATH)}internal/abi.h
+thread.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+thread.$(OBJEXT): {$(VPATH)}internal/assume.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+thread.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+thread.$(OBJEXT): {$(VPATH)}internal/cast.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+thread.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+thread.$(OBJEXT): {$(VPATH)}internal/config.h
+thread.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+thread.$(OBJEXT): {$(VPATH)}internal/core.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+thread.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+thread.$(OBJEXT): {$(VPATH)}internal/ctype.h
+thread.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+thread.$(OBJEXT): {$(VPATH)}internal/dosish.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+thread.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+thread.$(OBJEXT): {$(VPATH)}internal/error.h
+thread.$(OBJEXT): {$(VPATH)}internal/eval.h
+thread.$(OBJEXT): {$(VPATH)}internal/event.h
+thread.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+thread.$(OBJEXT): {$(VPATH)}internal/gc.h
+thread.$(OBJEXT): {$(VPATH)}internal/glob.h
+thread.$(OBJEXT): {$(VPATH)}internal/globals.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+thread.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+thread.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+thread.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+thread.$(OBJEXT): {$(VPATH)}internal/iterator.h
+thread.$(OBJEXT): {$(VPATH)}internal/memory.h
+thread.$(OBJEXT): {$(VPATH)}internal/method.h
+thread.$(OBJEXT): {$(VPATH)}internal/module.h
+thread.$(OBJEXT): {$(VPATH)}internal/newobj.h
+thread.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+thread.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+thread.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+thread.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+thread.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+thread.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+thread.$(OBJEXT): {$(VPATH)}internal/symbol.h
+thread.$(OBJEXT): {$(VPATH)}internal/value.h
+thread.$(OBJEXT): {$(VPATH)}internal/value_type.h
+thread.$(OBJEXT): {$(VPATH)}internal/variable.h
+thread.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+thread.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
thread.$(OBJEXT): {$(VPATH)}io.h
thread.$(OBJEXT): {$(VPATH)}iseq.h
thread.$(OBJEXT): {$(VPATH)}method.h
@@ -3000,8 +15945,11 @@ thread.$(OBJEXT): {$(VPATH)}mjit.h
thread.$(OBJEXT): {$(VPATH)}node.h
thread.$(OBJEXT): {$(VPATH)}onigmo.h
thread.$(OBJEXT): {$(VPATH)}oniguruma.h
+thread.$(OBJEXT): {$(VPATH)}ractor.h
+thread.$(OBJEXT): {$(VPATH)}ractor_core.h
thread.$(OBJEXT): {$(VPATH)}ruby_assert.h
thread.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+thread.$(OBJEXT): {$(VPATH)}shape.h
thread.$(OBJEXT): {$(VPATH)}st.h
thread.$(OBJEXT): {$(VPATH)}subst.h
thread.$(OBJEXT): {$(VPATH)}thread.c
@@ -3010,67 +15958,738 @@ thread.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).c
thread.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
thread.$(OBJEXT): {$(VPATH)}thread_native.h
thread.$(OBJEXT): {$(VPATH)}thread_sync.c
+thread.$(OBJEXT): {$(VPATH)}thread_sync.rbinc
thread.$(OBJEXT): {$(VPATH)}timev.h
thread.$(OBJEXT): {$(VPATH)}vm_core.h
+thread.$(OBJEXT): {$(VPATH)}vm_debug.h
thread.$(OBJEXT): {$(VPATH)}vm_opts.h
-time.$(OBJEXT): $(hdrdir)/ruby.h
+thread.$(OBJEXT): {$(VPATH)}vm_sync.h
time.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+time.$(OBJEXT): $(top_srcdir)/internal/array.h
+time.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+time.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+time.$(OBJEXT): $(top_srcdir)/internal/bits.h
+time.$(OBJEXT): $(top_srcdir)/internal/compar.h
+time.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+time.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+time.$(OBJEXT): $(top_srcdir)/internal/gc.h
+time.$(OBJEXT): $(top_srcdir)/internal/hash.h
+time.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+time.$(OBJEXT): $(top_srcdir)/internal/rational.h
+time.$(OBJEXT): $(top_srcdir)/internal/serial.h
+time.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+time.$(OBJEXT): $(top_srcdir)/internal/string.h
+time.$(OBJEXT): $(top_srcdir)/internal/time.h
+time.$(OBJEXT): $(top_srcdir)/internal/variable.h
+time.$(OBJEXT): $(top_srcdir)/internal/vm.h
+time.$(OBJEXT): $(top_srcdir)/internal/warnings.h
time.$(OBJEXT): {$(VPATH)}assert.h
+time.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+time.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+time.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+time.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+time.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+time.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+time.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+time.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+time.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+time.$(OBJEXT): {$(VPATH)}builtin.h
time.$(OBJEXT): {$(VPATH)}config.h
+time.$(OBJEXT): {$(VPATH)}constant.h
time.$(OBJEXT): {$(VPATH)}defines.h
time.$(OBJEXT): {$(VPATH)}encoding.h
time.$(OBJEXT): {$(VPATH)}id.h
+time.$(OBJEXT): {$(VPATH)}id_table.h
time.$(OBJEXT): {$(VPATH)}intern.h
time.$(OBJEXT): {$(VPATH)}internal.h
+time.$(OBJEXT): {$(VPATH)}internal/abi.h
+time.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+time.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+time.$(OBJEXT): {$(VPATH)}internal/assume.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+time.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+time.$(OBJEXT): {$(VPATH)}internal/cast.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+time.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+time.$(OBJEXT): {$(VPATH)}internal/config.h
+time.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+time.$(OBJEXT): {$(VPATH)}internal/core.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+time.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+time.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+time.$(OBJEXT): {$(VPATH)}internal/ctype.h
+time.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+time.$(OBJEXT): {$(VPATH)}internal/dosish.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+time.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+time.$(OBJEXT): {$(VPATH)}internal/error.h
+time.$(OBJEXT): {$(VPATH)}internal/eval.h
+time.$(OBJEXT): {$(VPATH)}internal/event.h
+time.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+time.$(OBJEXT): {$(VPATH)}internal/gc.h
+time.$(OBJEXT): {$(VPATH)}internal/glob.h
+time.$(OBJEXT): {$(VPATH)}internal/globals.h
+time.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+time.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+time.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+time.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+time.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+time.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+time.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+time.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+time.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+time.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+time.$(OBJEXT): {$(VPATH)}internal/iterator.h
+time.$(OBJEXT): {$(VPATH)}internal/memory.h
+time.$(OBJEXT): {$(VPATH)}internal/method.h
+time.$(OBJEXT): {$(VPATH)}internal/module.h
+time.$(OBJEXT): {$(VPATH)}internal/newobj.h
+time.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+time.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+time.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+time.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+time.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+time.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+time.$(OBJEXT): {$(VPATH)}internal/symbol.h
+time.$(OBJEXT): {$(VPATH)}internal/value.h
+time.$(OBJEXT): {$(VPATH)}internal/value_type.h
+time.$(OBJEXT): {$(VPATH)}internal/variable.h
+time.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+time.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
time.$(OBJEXT): {$(VPATH)}missing.h
time.$(OBJEXT): {$(VPATH)}onigmo.h
time.$(OBJEXT): {$(VPATH)}oniguruma.h
+time.$(OBJEXT): {$(VPATH)}ruby_assert.h
+time.$(OBJEXT): {$(VPATH)}shape.h
time.$(OBJEXT): {$(VPATH)}st.h
time.$(OBJEXT): {$(VPATH)}subst.h
time.$(OBJEXT): {$(VPATH)}time.c
time.$(OBJEXT): {$(VPATH)}timev.h
-transcode.$(OBJEXT): $(hdrdir)/ruby.h
+time.$(OBJEXT): {$(VPATH)}timev.rbinc
transcode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/array.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/class.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/gc.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/inits.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/object.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/serial.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/string.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/transcode.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/variable.h
+transcode.$(OBJEXT): $(top_srcdir)/internal/warnings.h
transcode.$(OBJEXT): {$(VPATH)}assert.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+transcode.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
transcode.$(OBJEXT): {$(VPATH)}config.h
+transcode.$(OBJEXT): {$(VPATH)}constant.h
transcode.$(OBJEXT): {$(VPATH)}defines.h
transcode.$(OBJEXT): {$(VPATH)}encoding.h
+transcode.$(OBJEXT): {$(VPATH)}id.h
+transcode.$(OBJEXT): {$(VPATH)}id_table.h
transcode.$(OBJEXT): {$(VPATH)}intern.h
transcode.$(OBJEXT): {$(VPATH)}internal.h
+transcode.$(OBJEXT): {$(VPATH)}internal/abi.h
+transcode.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+transcode.$(OBJEXT): {$(VPATH)}internal/assume.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+transcode.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+transcode.$(OBJEXT): {$(VPATH)}internal/cast.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+transcode.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+transcode.$(OBJEXT): {$(VPATH)}internal/config.h
+transcode.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+transcode.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+transcode.$(OBJEXT): {$(VPATH)}internal/ctype.h
+transcode.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+transcode.$(OBJEXT): {$(VPATH)}internal/dosish.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+transcode.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+transcode.$(OBJEXT): {$(VPATH)}internal/error.h
+transcode.$(OBJEXT): {$(VPATH)}internal/eval.h
+transcode.$(OBJEXT): {$(VPATH)}internal/event.h
+transcode.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+transcode.$(OBJEXT): {$(VPATH)}internal/gc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/glob.h
+transcode.$(OBJEXT): {$(VPATH)}internal/globals.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+transcode.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+transcode.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+transcode.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+transcode.$(OBJEXT): {$(VPATH)}internal/iterator.h
+transcode.$(OBJEXT): {$(VPATH)}internal/memory.h
+transcode.$(OBJEXT): {$(VPATH)}internal/method.h
+transcode.$(OBJEXT): {$(VPATH)}internal/module.h
+transcode.$(OBJEXT): {$(VPATH)}internal/newobj.h
+transcode.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+transcode.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+transcode.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+transcode.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+transcode.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+transcode.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+transcode.$(OBJEXT): {$(VPATH)}internal/symbol.h
+transcode.$(OBJEXT): {$(VPATH)}internal/value.h
+transcode.$(OBJEXT): {$(VPATH)}internal/value_type.h
+transcode.$(OBJEXT): {$(VPATH)}internal/variable.h
+transcode.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+transcode.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
transcode.$(OBJEXT): {$(VPATH)}missing.h
transcode.$(OBJEXT): {$(VPATH)}onigmo.h
transcode.$(OBJEXT): {$(VPATH)}oniguruma.h
+transcode.$(OBJEXT): {$(VPATH)}shape.h
transcode.$(OBJEXT): {$(VPATH)}st.h
transcode.$(OBJEXT): {$(VPATH)}subst.h
transcode.$(OBJEXT): {$(VPATH)}transcode.c
transcode.$(OBJEXT): {$(VPATH)}transcode_data.h
-transient_heap.$(OBJEXT): $(hdrdir)/ruby.h
transient_heap.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/array.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/gc.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/hash.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/struct.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/variable.h
+transient_heap.$(OBJEXT): $(top_srcdir)/internal/warnings.h
transient_heap.$(OBJEXT): {$(VPATH)}assert.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+transient_heap.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
transient_heap.$(OBJEXT): {$(VPATH)}config.h
+transient_heap.$(OBJEXT): {$(VPATH)}constant.h
transient_heap.$(OBJEXT): {$(VPATH)}debug.h
transient_heap.$(OBJEXT): {$(VPATH)}debug_counter.h
transient_heap.$(OBJEXT): {$(VPATH)}defines.h
transient_heap.$(OBJEXT): {$(VPATH)}gc.h
+transient_heap.$(OBJEXT): {$(VPATH)}id_table.h
transient_heap.$(OBJEXT): {$(VPATH)}intern.h
transient_heap.$(OBJEXT): {$(VPATH)}internal.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/abi.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/assume.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/cast.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/config.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/ctype.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/dosish.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/error.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/eval.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/event.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/gc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/glob.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/globals.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/iterator.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/memory.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/method.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/module.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/newobj.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/symbol.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/value.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/value_type.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/variable.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+transient_heap.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
transient_heap.$(OBJEXT): {$(VPATH)}missing.h
-transient_heap.$(OBJEXT): {$(VPATH)}node.h
transient_heap.$(OBJEXT): {$(VPATH)}ruby_assert.h
+transient_heap.$(OBJEXT): {$(VPATH)}shape.h
transient_heap.$(OBJEXT): {$(VPATH)}st.h
transient_heap.$(OBJEXT): {$(VPATH)}subst.h
transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.c
transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.h
transient_heap.$(OBJEXT): {$(VPATH)}vm_debug.h
-util.$(OBJEXT): $(hdrdir)/ruby.h
+transient_heap.$(OBJEXT): {$(VPATH)}vm_sync.h
util.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+util.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+util.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+util.$(OBJEXT): $(top_srcdir)/internal/util.h
+util.$(OBJEXT): $(top_srcdir)/internal/warnings.h
util.$(OBJEXT): {$(VPATH)}assert.h
+util.$(OBJEXT): {$(VPATH)}atomic.h
+util.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+util.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+util.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+util.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+util.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+util.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+util.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+util.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+util.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
util.$(OBJEXT): {$(VPATH)}config.h
util.$(OBJEXT): {$(VPATH)}defines.h
util.$(OBJEXT): {$(VPATH)}dtoa.c
util.$(OBJEXT): {$(VPATH)}intern.h
util.$(OBJEXT): {$(VPATH)}internal.h
+util.$(OBJEXT): {$(VPATH)}internal/abi.h
+util.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+util.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+util.$(OBJEXT): {$(VPATH)}internal/assume.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+util.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+util.$(OBJEXT): {$(VPATH)}internal/cast.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+util.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+util.$(OBJEXT): {$(VPATH)}internal/config.h
+util.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+util.$(OBJEXT): {$(VPATH)}internal/core.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+util.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+util.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+util.$(OBJEXT): {$(VPATH)}internal/ctype.h
+util.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+util.$(OBJEXT): {$(VPATH)}internal/dosish.h
+util.$(OBJEXT): {$(VPATH)}internal/error.h
+util.$(OBJEXT): {$(VPATH)}internal/eval.h
+util.$(OBJEXT): {$(VPATH)}internal/event.h
+util.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+util.$(OBJEXT): {$(VPATH)}internal/gc.h
+util.$(OBJEXT): {$(VPATH)}internal/glob.h
+util.$(OBJEXT): {$(VPATH)}internal/globals.h
+util.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+util.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+util.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+util.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+util.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+util.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+util.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+util.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+util.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+util.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+util.$(OBJEXT): {$(VPATH)}internal/iterator.h
+util.$(OBJEXT): {$(VPATH)}internal/memory.h
+util.$(OBJEXT): {$(VPATH)}internal/method.h
+util.$(OBJEXT): {$(VPATH)}internal/module.h
+util.$(OBJEXT): {$(VPATH)}internal/newobj.h
+util.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+util.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+util.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+util.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+util.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+util.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+util.$(OBJEXT): {$(VPATH)}internal/symbol.h
+util.$(OBJEXT): {$(VPATH)}internal/value.h
+util.$(OBJEXT): {$(VPATH)}internal/value_type.h
+util.$(OBJEXT): {$(VPATH)}internal/variable.h
+util.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+util.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
util.$(OBJEXT): {$(VPATH)}missing.h
+util.$(OBJEXT): {$(VPATH)}ruby_atomic.h
util.$(OBJEXT): {$(VPATH)}st.h
util.$(OBJEXT): {$(VPATH)}subst.h
util.$(OBJEXT): {$(VPATH)}util.c
@@ -3079,9 +16698,37 @@ variable.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
variable.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
variable.$(OBJEXT): $(CCAN_DIR)/list/list.h
variable.$(OBJEXT): $(CCAN_DIR)/str/str.h
-variable.$(OBJEXT): $(hdrdir)/ruby.h
variable.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+variable.$(OBJEXT): $(top_srcdir)/internal/array.h
+variable.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+variable.$(OBJEXT): $(top_srcdir)/internal/class.h
+variable.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+variable.$(OBJEXT): $(top_srcdir)/internal/error.h
+variable.$(OBJEXT): $(top_srcdir)/internal/eval.h
+variable.$(OBJEXT): $(top_srcdir)/internal/gc.h
+variable.$(OBJEXT): $(top_srcdir)/internal/hash.h
+variable.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+variable.$(OBJEXT): $(top_srcdir)/internal/object.h
+variable.$(OBJEXT): $(top_srcdir)/internal/re.h
+variable.$(OBJEXT): $(top_srcdir)/internal/serial.h
+variable.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+variable.$(OBJEXT): $(top_srcdir)/internal/string.h
+variable.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+variable.$(OBJEXT): $(top_srcdir)/internal/thread.h
+variable.$(OBJEXT): $(top_srcdir)/internal/variable.h
+variable.$(OBJEXT): $(top_srcdir)/internal/vm.h
+variable.$(OBJEXT): $(top_srcdir)/internal/warnings.h
variable.$(OBJEXT): {$(VPATH)}assert.h
+variable.$(OBJEXT): {$(VPATH)}atomic.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+variable.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
variable.$(OBJEXT): {$(VPATH)}config.h
variable.$(OBJEXT): {$(VPATH)}constant.h
variable.$(OBJEXT): {$(VPATH)}debug_counter.h
@@ -3091,13 +16738,165 @@ variable.$(OBJEXT): {$(VPATH)}id.h
variable.$(OBJEXT): {$(VPATH)}id_table.h
variable.$(OBJEXT): {$(VPATH)}intern.h
variable.$(OBJEXT): {$(VPATH)}internal.h
+variable.$(OBJEXT): {$(VPATH)}internal/abi.h
+variable.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+variable.$(OBJEXT): {$(VPATH)}internal/assume.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+variable.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+variable.$(OBJEXT): {$(VPATH)}internal/cast.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+variable.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+variable.$(OBJEXT): {$(VPATH)}internal/config.h
+variable.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+variable.$(OBJEXT): {$(VPATH)}internal/core.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+variable.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+variable.$(OBJEXT): {$(VPATH)}internal/ctype.h
+variable.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+variable.$(OBJEXT): {$(VPATH)}internal/dosish.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+variable.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+variable.$(OBJEXT): {$(VPATH)}internal/error.h
+variable.$(OBJEXT): {$(VPATH)}internal/eval.h
+variable.$(OBJEXT): {$(VPATH)}internal/event.h
+variable.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+variable.$(OBJEXT): {$(VPATH)}internal/gc.h
+variable.$(OBJEXT): {$(VPATH)}internal/glob.h
+variable.$(OBJEXT): {$(VPATH)}internal/globals.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+variable.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+variable.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+variable.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+variable.$(OBJEXT): {$(VPATH)}internal/iterator.h
+variable.$(OBJEXT): {$(VPATH)}internal/memory.h
+variable.$(OBJEXT): {$(VPATH)}internal/method.h
+variable.$(OBJEXT): {$(VPATH)}internal/module.h
+variable.$(OBJEXT): {$(VPATH)}internal/newobj.h
+variable.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+variable.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+variable.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+variable.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+variable.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+variable.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+variable.$(OBJEXT): {$(VPATH)}internal/symbol.h
+variable.$(OBJEXT): {$(VPATH)}internal/value.h
+variable.$(OBJEXT): {$(VPATH)}internal/value_type.h
+variable.$(OBJEXT): {$(VPATH)}internal/variable.h
+variable.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+variable.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
variable.$(OBJEXT): {$(VPATH)}method.h
variable.$(OBJEXT): {$(VPATH)}missing.h
variable.$(OBJEXT): {$(VPATH)}node.h
variable.$(OBJEXT): {$(VPATH)}onigmo.h
variable.$(OBJEXT): {$(VPATH)}oniguruma.h
+variable.$(OBJEXT): {$(VPATH)}ractor.h
+variable.$(OBJEXT): {$(VPATH)}ractor_core.h
variable.$(OBJEXT): {$(VPATH)}ruby_assert.h
variable.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+variable.$(OBJEXT): {$(VPATH)}shape.h
variable.$(OBJEXT): {$(VPATH)}st.h
variable.$(OBJEXT): {$(VPATH)}subst.h
variable.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3107,7 +16906,9 @@ variable.$(OBJEXT): {$(VPATH)}util.h
variable.$(OBJEXT): {$(VPATH)}variable.c
variable.$(OBJEXT): {$(VPATH)}variable.h
variable.$(OBJEXT): {$(VPATH)}vm_core.h
+variable.$(OBJEXT): {$(VPATH)}vm_debug.h
variable.$(OBJEXT): {$(VPATH)}vm_opts.h
+variable.$(OBJEXT): {$(VPATH)}vm_sync.h
version.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
version.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
version.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -3115,21 +16916,185 @@ version.$(OBJEXT): $(CCAN_DIR)/str/str.h
version.$(OBJEXT): $(hdrdir)/ruby.h
version.$(OBJEXT): $(hdrdir)/ruby/ruby.h
version.$(OBJEXT): $(hdrdir)/ruby/version.h
-version.$(OBJEXT): $(top_srcdir)/revision.h
+version.$(OBJEXT): $(top_srcdir)/internal/array.h
+version.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+version.$(OBJEXT): $(top_srcdir)/internal/cmdlineopt.h
+version.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+version.$(OBJEXT): $(top_srcdir)/internal/gc.h
+version.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+version.$(OBJEXT): $(top_srcdir)/internal/serial.h
+version.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+version.$(OBJEXT): $(top_srcdir)/internal/variable.h
+version.$(OBJEXT): $(top_srcdir)/internal/vm.h
+version.$(OBJEXT): $(top_srcdir)/internal/warnings.h
version.$(OBJEXT): $(top_srcdir)/version.h
version.$(OBJEXT): {$(VPATH)}assert.h
+version.$(OBJEXT): {$(VPATH)}atomic.h
+version.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+version.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+version.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+version.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+version.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+version.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+version.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+version.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+version.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
version.$(OBJEXT): {$(VPATH)}config.h
+version.$(OBJEXT): {$(VPATH)}constant.h
version.$(OBJEXT): {$(VPATH)}debug_counter.h
version.$(OBJEXT): {$(VPATH)}defines.h
version.$(OBJEXT): {$(VPATH)}id.h
+version.$(OBJEXT): {$(VPATH)}id_table.h
version.$(OBJEXT): {$(VPATH)}intern.h
version.$(OBJEXT): {$(VPATH)}internal.h
+version.$(OBJEXT): {$(VPATH)}internal/abi.h
+version.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+version.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+version.$(OBJEXT): {$(VPATH)}internal/assume.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+version.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+version.$(OBJEXT): {$(VPATH)}internal/cast.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+version.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+version.$(OBJEXT): {$(VPATH)}internal/config.h
+version.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+version.$(OBJEXT): {$(VPATH)}internal/core.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+version.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+version.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+version.$(OBJEXT): {$(VPATH)}internal/ctype.h
+version.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+version.$(OBJEXT): {$(VPATH)}internal/dosish.h
+version.$(OBJEXT): {$(VPATH)}internal/error.h
+version.$(OBJEXT): {$(VPATH)}internal/eval.h
+version.$(OBJEXT): {$(VPATH)}internal/event.h
+version.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+version.$(OBJEXT): {$(VPATH)}internal/gc.h
+version.$(OBJEXT): {$(VPATH)}internal/glob.h
+version.$(OBJEXT): {$(VPATH)}internal/globals.h
+version.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+version.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+version.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+version.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+version.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+version.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+version.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+version.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+version.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+version.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+version.$(OBJEXT): {$(VPATH)}internal/iterator.h
+version.$(OBJEXT): {$(VPATH)}internal/memory.h
+version.$(OBJEXT): {$(VPATH)}internal/method.h
+version.$(OBJEXT): {$(VPATH)}internal/module.h
+version.$(OBJEXT): {$(VPATH)}internal/newobj.h
+version.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+version.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+version.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+version.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+version.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+version.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+version.$(OBJEXT): {$(VPATH)}internal/symbol.h
+version.$(OBJEXT): {$(VPATH)}internal/value.h
+version.$(OBJEXT): {$(VPATH)}internal/value_type.h
+version.$(OBJEXT): {$(VPATH)}internal/variable.h
+version.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+version.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
version.$(OBJEXT): {$(VPATH)}method.h
version.$(OBJEXT): {$(VPATH)}missing.h
version.$(OBJEXT): {$(VPATH)}mjit.h
version.$(OBJEXT): {$(VPATH)}node.h
+version.$(OBJEXT): {$(VPATH)}revision.h
version.$(OBJEXT): {$(VPATH)}ruby_assert.h
version.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+version.$(OBJEXT): {$(VPATH)}shape.h
version.$(OBJEXT): {$(VPATH)}st.h
version.$(OBJEXT): {$(VPATH)}subst.h
version.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3137,19 +17102,63 @@ version.$(OBJEXT): {$(VPATH)}thread_native.h
version.$(OBJEXT): {$(VPATH)}version.c
version.$(OBJEXT): {$(VPATH)}vm_core.h
version.$(OBJEXT): {$(VPATH)}vm_opts.h
+version.$(OBJEXT): {$(VPATH)}yjit.h
vm.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm.$(OBJEXT): $(CCAN_DIR)/str/str.h
vm.$(OBJEXT): $(hdrdir)/ruby.h
vm.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm.$(OBJEXT): $(top_srcdir)/internal/array.h
+vm.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+vm.$(OBJEXT): $(top_srcdir)/internal/bignum.h
+vm.$(OBJEXT): $(top_srcdir)/internal/bits.h
+vm.$(OBJEXT): $(top_srcdir)/internal/class.h
+vm.$(OBJEXT): $(top_srcdir)/internal/compar.h
+vm.$(OBJEXT): $(top_srcdir)/internal/compile.h
+vm.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+vm.$(OBJEXT): $(top_srcdir)/internal/cont.h
+vm.$(OBJEXT): $(top_srcdir)/internal/error.h
+vm.$(OBJEXT): $(top_srcdir)/internal/eval.h
+vm.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+vm.$(OBJEXT): $(top_srcdir)/internal/gc.h
+vm.$(OBJEXT): $(top_srcdir)/internal/hash.h
+vm.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+vm.$(OBJEXT): $(top_srcdir)/internal/inits.h
+vm.$(OBJEXT): $(top_srcdir)/internal/numeric.h
+vm.$(OBJEXT): $(top_srcdir)/internal/object.h
+vm.$(OBJEXT): $(top_srcdir)/internal/parse.h
+vm.$(OBJEXT): $(top_srcdir)/internal/proc.h
+vm.$(OBJEXT): $(top_srcdir)/internal/random.h
+vm.$(OBJEXT): $(top_srcdir)/internal/re.h
+vm.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+vm.$(OBJEXT): $(top_srcdir)/internal/serial.h
+vm.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+vm.$(OBJEXT): $(top_srcdir)/internal/string.h
+vm.$(OBJEXT): $(top_srcdir)/internal/struct.h
+vm.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+vm.$(OBJEXT): $(top_srcdir)/internal/thread.h
+vm.$(OBJEXT): $(top_srcdir)/internal/variable.h
+vm.$(OBJEXT): $(top_srcdir)/internal/vm.h
+vm.$(OBJEXT): $(top_srcdir)/internal/warnings.h
vm.$(OBJEXT): {$(VPATH)}assert.h
+vm.$(OBJEXT): {$(VPATH)}atomic.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+vm.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
vm.$(OBJEXT): {$(VPATH)}builtin.h
vm.$(OBJEXT): {$(VPATH)}config.h
vm.$(OBJEXT): {$(VPATH)}constant.h
vm.$(OBJEXT): {$(VPATH)}debug_counter.h
vm.$(OBJEXT): {$(VPATH)}defines.h
vm.$(OBJEXT): {$(VPATH)}defs/opt_operand.def
+vm.$(OBJEXT): {$(VPATH)}encoding.h
vm.$(OBJEXT): {$(VPATH)}eval_intern.h
vm.$(OBJEXT): {$(VPATH)}gc.h
vm.$(OBJEXT): {$(VPATH)}id.h
@@ -3159,16 +17168,170 @@ vm.$(OBJEXT): {$(VPATH)}insns.inc
vm.$(OBJEXT): {$(VPATH)}insns_info.inc
vm.$(OBJEXT): {$(VPATH)}intern.h
vm.$(OBJEXT): {$(VPATH)}internal.h
+vm.$(OBJEXT): {$(VPATH)}internal/abi.h
+vm.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+vm.$(OBJEXT): {$(VPATH)}internal/assume.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+vm.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+vm.$(OBJEXT): {$(VPATH)}internal/cast.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+vm.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+vm.$(OBJEXT): {$(VPATH)}internal/config.h
+vm.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+vm.$(OBJEXT): {$(VPATH)}internal/core.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+vm.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+vm.$(OBJEXT): {$(VPATH)}internal/ctype.h
+vm.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+vm.$(OBJEXT): {$(VPATH)}internal/dosish.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+vm.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+vm.$(OBJEXT): {$(VPATH)}internal/error.h
+vm.$(OBJEXT): {$(VPATH)}internal/eval.h
+vm.$(OBJEXT): {$(VPATH)}internal/event.h
+vm.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+vm.$(OBJEXT): {$(VPATH)}internal/gc.h
+vm.$(OBJEXT): {$(VPATH)}internal/glob.h
+vm.$(OBJEXT): {$(VPATH)}internal/globals.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+vm.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+vm.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+vm.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+vm.$(OBJEXT): {$(VPATH)}internal/iterator.h
+vm.$(OBJEXT): {$(VPATH)}internal/memory.h
+vm.$(OBJEXT): {$(VPATH)}internal/method.h
+vm.$(OBJEXT): {$(VPATH)}internal/module.h
+vm.$(OBJEXT): {$(VPATH)}internal/newobj.h
+vm.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+vm.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+vm.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+vm.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+vm.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+vm.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+vm.$(OBJEXT): {$(VPATH)}internal/symbol.h
+vm.$(OBJEXT): {$(VPATH)}internal/value.h
+vm.$(OBJEXT): {$(VPATH)}internal/value_type.h
+vm.$(OBJEXT): {$(VPATH)}internal/variable.h
+vm.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+vm.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
vm.$(OBJEXT): {$(VPATH)}iseq.h
vm.$(OBJEXT): {$(VPATH)}method.h
vm.$(OBJEXT): {$(VPATH)}missing.h
vm.$(OBJEXT): {$(VPATH)}mjit.h
vm.$(OBJEXT): {$(VPATH)}node.h
+vm.$(OBJEXT): {$(VPATH)}onigmo.h
+vm.$(OBJEXT): {$(VPATH)}oniguruma.h
vm.$(OBJEXT): {$(VPATH)}probes.dmyh
vm.$(OBJEXT): {$(VPATH)}probes.h
vm.$(OBJEXT): {$(VPATH)}probes_helper.h
+vm.$(OBJEXT): {$(VPATH)}ractor.h
+vm.$(OBJEXT): {$(VPATH)}ractor_core.h
vm.$(OBJEXT): {$(VPATH)}ruby_assert.h
vm.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm.$(OBJEXT): {$(VPATH)}shape.h
vm.$(OBJEXT): {$(VPATH)}st.h
vm.$(OBJEXT): {$(VPATH)}subst.h
vm.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3179,6 +17342,7 @@ vm.$(OBJEXT): {$(VPATH)}vm.h
vm.$(OBJEXT): {$(VPATH)}vm.inc
vm.$(OBJEXT): {$(VPATH)}vm_args.c
vm.$(OBJEXT): {$(VPATH)}vm_call_iseq_optimized.inc
+vm.$(OBJEXT): {$(VPATH)}vm_callinfo.h
vm.$(OBJEXT): {$(VPATH)}vm_core.h
vm.$(OBJEXT): {$(VPATH)}vm_debug.h
vm.$(OBJEXT): {$(VPATH)}vm_eval.c
@@ -3188,22 +17352,196 @@ vm.$(OBJEXT): {$(VPATH)}vm_insnhelper.c
vm.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
vm.$(OBJEXT): {$(VPATH)}vm_method.c
vm.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm.$(OBJEXT): {$(VPATH)}vm_sync.h
vm.$(OBJEXT): {$(VPATH)}vmtc.inc
+vm.$(OBJEXT): {$(VPATH)}yjit.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/str/str.h
-vm_backtrace.$(OBJEXT): $(hdrdir)/ruby.h
vm_backtrace.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/array.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/error.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/gc.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/serial.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/string.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/variable.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/vm.h
+vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/warnings.h
vm_backtrace.$(OBJEXT): {$(VPATH)}assert.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}atomic.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
vm_backtrace.$(OBJEXT): {$(VPATH)}config.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}constant.h
vm_backtrace.$(OBJEXT): {$(VPATH)}debug.h
vm_backtrace.$(OBJEXT): {$(VPATH)}defines.h
vm_backtrace.$(OBJEXT): {$(VPATH)}encoding.h
vm_backtrace.$(OBJEXT): {$(VPATH)}eval_intern.h
vm_backtrace.$(OBJEXT): {$(VPATH)}id.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}id_table.h
vm_backtrace.$(OBJEXT): {$(VPATH)}intern.h
vm_backtrace.$(OBJEXT): {$(VPATH)}internal.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/abi.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/assume.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/cast.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/config.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/ctype.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/dosish.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/error.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/eval.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/event.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/gc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/glob.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/globals.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/iterator.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/memory.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/method.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/module.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/newobj.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/symbol.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/value.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/value_type.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/variable.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
vm_backtrace.$(OBJEXT): {$(VPATH)}iseq.h
vm_backtrace.$(OBJEXT): {$(VPATH)}method.h
vm_backtrace.$(OBJEXT): {$(VPATH)}missing.h
@@ -3212,6 +17550,7 @@ vm_backtrace.$(OBJEXT): {$(VPATH)}onigmo.h
vm_backtrace.$(OBJEXT): {$(VPATH)}oniguruma.h
vm_backtrace.$(OBJEXT): {$(VPATH)}ruby_assert.h
vm_backtrace.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_backtrace.$(OBJEXT): {$(VPATH)}shape.h
vm_backtrace.$(OBJEXT): {$(VPATH)}st.h
vm_backtrace.$(OBJEXT): {$(VPATH)}subst.h
vm_backtrace.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3223,53 +17562,588 @@ vm_dump.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/str/str.h
-vm_dump.$(OBJEXT): $(hdrdir)/ruby.h
vm_dump.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/array.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/gc.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/serial.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/variable.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/vm.h
+vm_dump.$(OBJEXT): $(top_srcdir)/internal/warnings.h
vm_dump.$(OBJEXT): {$(VPATH)}addr2line.h
vm_dump.$(OBJEXT): {$(VPATH)}assert.h
+vm_dump.$(OBJEXT): {$(VPATH)}atomic.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+vm_dump.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
vm_dump.$(OBJEXT): {$(VPATH)}config.h
+vm_dump.$(OBJEXT): {$(VPATH)}constant.h
vm_dump.$(OBJEXT): {$(VPATH)}defines.h
vm_dump.$(OBJEXT): {$(VPATH)}gc.h
vm_dump.$(OBJEXT): {$(VPATH)}id.h
+vm_dump.$(OBJEXT): {$(VPATH)}id_table.h
vm_dump.$(OBJEXT): {$(VPATH)}intern.h
vm_dump.$(OBJEXT): {$(VPATH)}internal.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/abi.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/assume.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/cast.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/config.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/ctype.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/dosish.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/error.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/eval.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/event.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/gc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/glob.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/globals.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/iterator.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/memory.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/method.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/module.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/newobj.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/symbol.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/value.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/value_type.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/variable.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+vm_dump.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
vm_dump.$(OBJEXT): {$(VPATH)}iseq.h
vm_dump.$(OBJEXT): {$(VPATH)}method.h
vm_dump.$(OBJEXT): {$(VPATH)}missing.h
vm_dump.$(OBJEXT): {$(VPATH)}node.h
vm_dump.$(OBJEXT): {$(VPATH)}procstat_vm.c
+vm_dump.$(OBJEXT): {$(VPATH)}ractor.h
+vm_dump.$(OBJEXT): {$(VPATH)}ractor_core.h
vm_dump.$(OBJEXT): {$(VPATH)}ruby_assert.h
vm_dump.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_dump.$(OBJEXT): {$(VPATH)}shape.h
vm_dump.$(OBJEXT): {$(VPATH)}st.h
vm_dump.$(OBJEXT): {$(VPATH)}subst.h
vm_dump.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
vm_dump.$(OBJEXT): {$(VPATH)}thread_native.h
vm_dump.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_dump.$(OBJEXT): {$(VPATH)}vm_debug.h
vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c
vm_dump.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm_sync.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+vm_sync.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+vm_sync.$(OBJEXT): $(CCAN_DIR)/list/list.h
+vm_sync.$(OBJEXT): $(CCAN_DIR)/str/str.h
+vm_sync.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/array.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/gc.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/serial.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/variable.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/vm.h
+vm_sync.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+vm_sync.$(OBJEXT): {$(VPATH)}assert.h
+vm_sync.$(OBJEXT): {$(VPATH)}atomic.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+vm_sync.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+vm_sync.$(OBJEXT): {$(VPATH)}config.h
+vm_sync.$(OBJEXT): {$(VPATH)}constant.h
+vm_sync.$(OBJEXT): {$(VPATH)}debug_counter.h
+vm_sync.$(OBJEXT): {$(VPATH)}defines.h
+vm_sync.$(OBJEXT): {$(VPATH)}gc.h
+vm_sync.$(OBJEXT): {$(VPATH)}id.h
+vm_sync.$(OBJEXT): {$(VPATH)}id_table.h
+vm_sync.$(OBJEXT): {$(VPATH)}intern.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/abi.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/assume.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/cast.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/config.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/ctype.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/dosish.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/error.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/eval.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/event.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/gc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/glob.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/globals.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/iterator.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/memory.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/method.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/module.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/newobj.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/symbol.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/value.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/value_type.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/variable.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+vm_sync.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+vm_sync.$(OBJEXT): {$(VPATH)}method.h
+vm_sync.$(OBJEXT): {$(VPATH)}missing.h
+vm_sync.$(OBJEXT): {$(VPATH)}node.h
+vm_sync.$(OBJEXT): {$(VPATH)}ractor.h
+vm_sync.$(OBJEXT): {$(VPATH)}ractor_core.h
+vm_sync.$(OBJEXT): {$(VPATH)}ruby_assert.h
+vm_sync.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_sync.$(OBJEXT): {$(VPATH)}shape.h
+vm_sync.$(OBJEXT): {$(VPATH)}st.h
+vm_sync.$(OBJEXT): {$(VPATH)}subst.h
+vm_sync.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+vm_sync.$(OBJEXT): {$(VPATH)}thread_native.h
+vm_sync.$(OBJEXT): {$(VPATH)}vm_core.h
+vm_sync.$(OBJEXT): {$(VPATH)}vm_debug.h
+vm_sync.$(OBJEXT): {$(VPATH)}vm_opts.h
+vm_sync.$(OBJEXT): {$(VPATH)}vm_sync.c
+vm_sync.$(OBJEXT): {$(VPATH)}vm_sync.h
vm_trace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_trace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_trace.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_trace.$(OBJEXT): $(CCAN_DIR)/str/str.h
vm_trace.$(OBJEXT): $(hdrdir)/ruby.h
vm_trace.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/array.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/gc.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/hash.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/serial.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/symbol.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/variable.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/vm.h
+vm_trace.$(OBJEXT): $(top_srcdir)/internal/warnings.h
vm_trace.$(OBJEXT): {$(VPATH)}assert.h
+vm_trace.$(OBJEXT): {$(VPATH)}atomic.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+vm_trace.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
vm_trace.$(OBJEXT): {$(VPATH)}builtin.h
vm_trace.$(OBJEXT): {$(VPATH)}config.h
+vm_trace.$(OBJEXT): {$(VPATH)}constant.h
vm_trace.$(OBJEXT): {$(VPATH)}debug.h
vm_trace.$(OBJEXT): {$(VPATH)}debug_counter.h
vm_trace.$(OBJEXT): {$(VPATH)}defines.h
+vm_trace.$(OBJEXT): {$(VPATH)}encoding.h
vm_trace.$(OBJEXT): {$(VPATH)}eval_intern.h
vm_trace.$(OBJEXT): {$(VPATH)}id.h
+vm_trace.$(OBJEXT): {$(VPATH)}id_table.h
vm_trace.$(OBJEXT): {$(VPATH)}intern.h
vm_trace.$(OBJEXT): {$(VPATH)}internal.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/abi.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/assume.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/cast.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/config.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/ctype.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/dosish.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/error.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/eval.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/event.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/gc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/glob.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/globals.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/iterator.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/memory.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/method.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/module.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/newobj.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/symbol.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/value.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/value_type.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/variable.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+vm_trace.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
vm_trace.$(OBJEXT): {$(VPATH)}iseq.h
vm_trace.$(OBJEXT): {$(VPATH)}method.h
vm_trace.$(OBJEXT): {$(VPATH)}missing.h
vm_trace.$(OBJEXT): {$(VPATH)}mjit.h
vm_trace.$(OBJEXT): {$(VPATH)}node.h
+vm_trace.$(OBJEXT): {$(VPATH)}onigmo.h
+vm_trace.$(OBJEXT): {$(VPATH)}oniguruma.h
+vm_trace.$(OBJEXT): {$(VPATH)}ractor.h
vm_trace.$(OBJEXT): {$(VPATH)}ruby_assert.h
vm_trace.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+vm_trace.$(OBJEXT): {$(VPATH)}shape.h
vm_trace.$(OBJEXT): {$(VPATH)}st.h
vm_trace.$(OBJEXT): {$(VPATH)}subst.h
vm_trace.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3278,4 +18152,227 @@ vm_trace.$(OBJEXT): {$(VPATH)}trace_point.rbinc
vm_trace.$(OBJEXT): {$(VPATH)}vm_core.h
vm_trace.$(OBJEXT): {$(VPATH)}vm_opts.h
vm_trace.$(OBJEXT): {$(VPATH)}vm_trace.c
+vm_trace.$(OBJEXT): {$(VPATH)}yjit.h
+yjit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
+yjit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
+yjit.$(OBJEXT): $(CCAN_DIR)/list/list.h
+yjit.$(OBJEXT): $(CCAN_DIR)/str/str.h
+yjit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/array.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/basic_operators.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/class.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/compile.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/cont.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/gc.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/hash.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/serial.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/string.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/variable.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/vm.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/warnings.h
+yjit.$(OBJEXT): {$(VPATH)}assert.h
+yjit.$(OBJEXT): {$(VPATH)}atomic.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+yjit.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
+yjit.$(OBJEXT): {$(VPATH)}builtin.h
+yjit.$(OBJEXT): {$(VPATH)}config.h
+yjit.$(OBJEXT): {$(VPATH)}constant.h
+yjit.$(OBJEXT): {$(VPATH)}debug.h
+yjit.$(OBJEXT): {$(VPATH)}debug_counter.h
+yjit.$(OBJEXT): {$(VPATH)}defines.h
+yjit.$(OBJEXT): {$(VPATH)}encoding.h
+yjit.$(OBJEXT): {$(VPATH)}gc.h
+yjit.$(OBJEXT): {$(VPATH)}id.h
+yjit.$(OBJEXT): {$(VPATH)}id_table.h
+yjit.$(OBJEXT): {$(VPATH)}insns.def
+yjit.$(OBJEXT): {$(VPATH)}insns.inc
+yjit.$(OBJEXT): {$(VPATH)}insns_info.inc
+yjit.$(OBJEXT): {$(VPATH)}intern.h
+yjit.$(OBJEXT): {$(VPATH)}internal.h
+yjit.$(OBJEXT): {$(VPATH)}internal/abi.h
+yjit.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+yjit.$(OBJEXT): {$(VPATH)}internal/assume.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+yjit.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+yjit.$(OBJEXT): {$(VPATH)}internal/cast.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+yjit.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+yjit.$(OBJEXT): {$(VPATH)}internal/config.h
+yjit.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+yjit.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+yjit.$(OBJEXT): {$(VPATH)}internal/ctype.h
+yjit.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+yjit.$(OBJEXT): {$(VPATH)}internal/dosish.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+yjit.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+yjit.$(OBJEXT): {$(VPATH)}internal/error.h
+yjit.$(OBJEXT): {$(VPATH)}internal/eval.h
+yjit.$(OBJEXT): {$(VPATH)}internal/event.h
+yjit.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+yjit.$(OBJEXT): {$(VPATH)}internal/gc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/glob.h
+yjit.$(OBJEXT): {$(VPATH)}internal/globals.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+yjit.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+yjit.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+yjit.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+yjit.$(OBJEXT): {$(VPATH)}internal/iterator.h
+yjit.$(OBJEXT): {$(VPATH)}internal/memory.h
+yjit.$(OBJEXT): {$(VPATH)}internal/method.h
+yjit.$(OBJEXT): {$(VPATH)}internal/module.h
+yjit.$(OBJEXT): {$(VPATH)}internal/newobj.h
+yjit.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+yjit.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+yjit.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+yjit.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+yjit.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+yjit.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+yjit.$(OBJEXT): {$(VPATH)}internal/symbol.h
+yjit.$(OBJEXT): {$(VPATH)}internal/value.h
+yjit.$(OBJEXT): {$(VPATH)}internal/value_type.h
+yjit.$(OBJEXT): {$(VPATH)}internal/variable.h
+yjit.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+yjit.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
+yjit.$(OBJEXT): {$(VPATH)}iseq.h
+yjit.$(OBJEXT): {$(VPATH)}method.h
+yjit.$(OBJEXT): {$(VPATH)}missing.h
+yjit.$(OBJEXT): {$(VPATH)}node.h
+yjit.$(OBJEXT): {$(VPATH)}onigmo.h
+yjit.$(OBJEXT): {$(VPATH)}oniguruma.h
+yjit.$(OBJEXT): {$(VPATH)}probes.dmyh
+yjit.$(OBJEXT): {$(VPATH)}probes.h
+yjit.$(OBJEXT): {$(VPATH)}probes_helper.h
+yjit.$(OBJEXT): {$(VPATH)}ruby_assert.h
+yjit.$(OBJEXT): {$(VPATH)}ruby_atomic.h
+yjit.$(OBJEXT): {$(VPATH)}shape.h
+yjit.$(OBJEXT): {$(VPATH)}st.h
+yjit.$(OBJEXT): {$(VPATH)}subst.h
+yjit.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
+yjit.$(OBJEXT): {$(VPATH)}thread_native.h
+yjit.$(OBJEXT): {$(VPATH)}vm_callinfo.h
+yjit.$(OBJEXT): {$(VPATH)}vm_core.h
+yjit.$(OBJEXT): {$(VPATH)}vm_debug.h
+yjit.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
+yjit.$(OBJEXT): {$(VPATH)}vm_opts.h
+yjit.$(OBJEXT): {$(VPATH)}vm_sync.h
+yjit.$(OBJEXT): {$(VPATH)}yjit.c
+yjit.$(OBJEXT): {$(VPATH)}yjit.h
+yjit.$(OBJEXT): {$(VPATH)}yjit.rbinc
# AUTOGENERATED DEPENDENCIES END
diff --git a/compar.c b/compar.c
index 94072c9fc1..040f77975e 100644
--- a/compar.c
+++ b/compar.c
@@ -9,9 +9,12 @@
**********************************************************************/
-#include "ruby/ruby.h"
#include "id.h"
#include "internal.h"
+#include "internal/compar.h"
+#include "internal/error.h"
+#include "internal/vm.h"
+#include "ruby/ruby.h"
VALUE rb_mComparable;
@@ -27,13 +30,13 @@ rb_cmperr(VALUE x, VALUE y)
VALUE classname;
if (SPECIAL_CONST_P(y) || BUILTIN_TYPE(y) == T_FLOAT) {
- classname = rb_inspect(y);
+ classname = rb_inspect(y);
}
else {
- classname = rb_obj_class(y);
+ classname = rb_obj_class(y);
}
rb_raise(rb_eArgError, "comparison of %"PRIsVALUE" with %"PRIsVALUE" failed",
- rb_obj_class(x), classname);
+ rb_obj_class(x), classname);
}
static VALUE
@@ -47,12 +50,12 @@ VALUE
rb_invcmp(VALUE x, VALUE y)
{
VALUE invcmp = rb_exec_recursive(invcmp_recursive, x, y);
- if (invcmp == Qundef || NIL_P(invcmp)) {
- return Qnil;
+ if (NIL_OR_UNDEF_P(invcmp)) {
+ return Qnil;
}
else {
- int result = -rb_cmpint(invcmp, x, y);
- return INT2FIX(result);
+ int result = -rb_cmpint(invcmp, x, y);
+ return INT2FIX(result);
}
}
@@ -81,8 +84,7 @@ cmp_equal(VALUE x, VALUE y)
c = rb_exec_recursive_paired_outer(cmp_eq_recursive, x, y, y);
if (NIL_P(c)) return Qfalse;
- if (rb_cmpint(c, x, y) == 0) return Qtrue;
- return Qfalse;
+ return RBOOL(rb_cmpint(c, x, y) == 0);
}
static int
@@ -102,8 +104,7 @@ cmpint(VALUE x, VALUE y)
static VALUE
cmp_gt(VALUE x, VALUE y)
{
- if (cmpint(x, y) > 0) return Qtrue;
- return Qfalse;
+ return RBOOL(cmpint(x, y) > 0);
}
/*
@@ -117,8 +118,7 @@ cmp_gt(VALUE x, VALUE y)
static VALUE
cmp_ge(VALUE x, VALUE y)
{
- if (cmpint(x, y) >= 0) return Qtrue;
- return Qfalse;
+ return RBOOL(cmpint(x, y) >= 0);
}
/*
@@ -132,8 +132,7 @@ cmp_ge(VALUE x, VALUE y)
static VALUE
cmp_lt(VALUE x, VALUE y)
{
- if (cmpint(x, y) < 0) return Qtrue;
- return Qfalse;
+ return RBOOL(cmpint(x, y) < 0);
}
/*
@@ -147,8 +146,7 @@ cmp_lt(VALUE x, VALUE y)
static VALUE
cmp_le(VALUE x, VALUE y)
{
- if (cmpint(x, y) <= 0) return Qtrue;
- return Qfalse;
+ return RBOOL(cmpint(x, y) <= 0);
}
/*
@@ -169,9 +167,7 @@ cmp_le(VALUE x, VALUE y)
static VALUE
cmp_between(VALUE x, VALUE min, VALUE max)
{
- if (cmpint(x, min) < 0) return Qfalse;
- if (cmpint(x, max) > 0) return Qfalse;
- return Qtrue;
+ return RBOOL((cmpint(x, min) >= 0 && cmpint(x, max) <= 0));
}
/*
@@ -230,12 +226,10 @@ cmp_clamp(int argc, VALUE *argv, VALUE x)
}
if (!NIL_P(max)) {
if (excl) rb_raise(rb_eArgError, "cannot clamp with an exclusive range");
- if (!NIL_P(min) && cmpint(min, max) > 0) goto arg_error;
}
}
- else if (cmpint(min, max) > 0) {
- arg_error:
- rb_raise(rb_eArgError, "min argument must be smaller than max argument");
+ if (!NIL_P(min) && !NIL_P(max) && cmpint(min, max) > 0) {
+ rb_raise(rb_eArgError, "min argument must be smaller than max argument");
}
if (!NIL_P(min)) {
@@ -288,14 +282,27 @@ cmp_clamp(int argc, VALUE *argv, VALUE x)
* s4.between?(s3, s5) #=> true
* [ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV]
*
+ * == What's Here
+ *
+ * \Module \Comparable provides these methods, all of which use method <tt><=></tt>:
+ *
+ * - #<: Returns whether +self+ is less than the given object.
+ * - #<=: Returns whether +self+ is less than or equal to the given object.
+ * - #==: Returns whether +self+ is equal to the given object.
+ * - #>: Returns whether +self+ is greater than or equal to the given object.
+ * - #>=: Returns whether +self+ is greater than the given object.
+ * - #between?: Returns +true+ if +self+ is between two given objects.
+ * - #clamp: For given objects +min+ and +max+, or range <tt>(min..max)</tt>, returns:
+ *
+ * - +min+ if <tt>(self <=> min) < 0</tt>.
+ * - +max+ if <tt>(self <=> max) > 0</tt>.
+ * - +self+ otherwise.
+ *
*/
void
Init_Comparable(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
rb_mComparable = rb_define_module("Comparable");
rb_define_method(rb_mComparable, "==", cmp_equal, 1);
rb_define_method(rb_mComparable, ">", cmp_gt, 1);
diff --git a/compile.c b/compile.c
index 56b91bfb46..0452305923 100644
--- a/compile.c
+++ b/compile.c
@@ -9,25 +9,40 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "ruby/re.h"
-#include "ruby/util.h"
-#include "internal.h"
-#include "encindex.h"
+#include "ruby/internal/config.h"
#include <math.h>
+#ifdef HAVE_DLADDR
+# include <dlfcn.h>
+#endif
+
+#include "encindex.h"
+#include "gc.h"
+#include "id_table.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/compile.h"
+#include "internal/complex.h"
+#include "internal/encoding.h"
+#include "internal/error.h"
+#include "internal/hash.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/rational.h"
+#include "internal/re.h"
+#include "internal/symbol.h"
+#include "internal/thread.h"
+#include "internal/variable.h"
+#include "iseq.h"
+#include "ruby/re.h"
+#include "ruby/util.h"
#include "vm_core.h"
+#include "vm_callinfo.h"
#include "vm_debug.h"
+
#include "builtin.h"
-#include "iseq.h"
#include "insns.inc"
#include "insns_info.inc"
-#include "id_table.h"
-#include "gc.h"
-
-#ifdef HAVE_DLADDR
-# include <dlfcn.h>
-#endif
#undef RUBY_UNTYPED_DATA_WARNING
#define RUBY_UNTYPED_DATA_WARNING 0
@@ -37,10 +52,10 @@
typedef struct iseq_link_element {
enum {
- ISEQ_ELEMENT_ANCHOR,
- ISEQ_ELEMENT_LABEL,
- ISEQ_ELEMENT_INSN,
- ISEQ_ELEMENT_ADJUST,
+ ISEQ_ELEMENT_ANCHOR,
+ ISEQ_ELEMENT_LABEL,
+ ISEQ_ELEMENT_INSN,
+ ISEQ_ELEMENT_ADJUST,
ISEQ_ELEMENT_TRACE,
} type;
struct iseq_link_element *next;
@@ -78,8 +93,9 @@ typedef struct iseq_insn_data {
int sc_state;
VALUE *operands;
struct {
- int line_no;
- rb_event_flag_t events;
+ int line_no;
+ int node_id;
+ rb_event_flag_t events;
} insn_info;
} INSN;
@@ -176,6 +192,7 @@ const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO};
#endif
#if CPDEBUG > 1 || CPDEBUG < 0
+#undef printf
#define printf ruby_debug_printf
#define debugs if (compile_debug_print_indent(1)) ruby_debug_printf
#define debug_compile(msg, v) ((void)(compile_debug_print_indent(1) && fputs((msg), stderr)), (v))
@@ -201,112 +218,77 @@ const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO};
APPEND_LIST((seq1), (seq2))
/* add an instruction */
-#define ADD_INSN(seq, line, insn) \
- ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
+#define ADD_INSN(seq, line_node, insn) \
+ ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line_node), BIN(insn), 0))
/* insert an instruction before next */
-#define INSERT_BEFORE_INSN(next, line, insn) \
- ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
+#define INSERT_BEFORE_INSN(next, line_node, insn) \
+ ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line_node), BIN(insn), 0))
/* insert an instruction after prev */
-#define INSERT_AFTER_INSN(prev, line, insn) \
- ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
+#define INSERT_AFTER_INSN(prev, line_node, insn) \
+ ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line_node), BIN(insn), 0))
/* add an instruction with some operands (1, 2, 3, 5) */
-#define ADD_INSN1(seq, line, insn, op1) \
+#define ADD_INSN1(seq, line_node, insn, op1) \
ADD_ELEM((seq), (LINK_ELEMENT *) \
- new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
+ new_insn_body(iseq, (line_node), BIN(insn), 1, (VALUE)(op1)))
/* insert an instruction with some operands (1, 2, 3, 5) before next */
-#define INSERT_BEFORE_INSN1(next, line, insn, op1) \
+#define INSERT_BEFORE_INSN1(next, line_node, insn, op1) \
ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) \
- new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
+ new_insn_body(iseq, (line_node), BIN(insn), 1, (VALUE)(op1)))
/* insert an instruction with some operands (1, 2, 3, 5) after prev */
-#define INSERT_AFTER_INSN1(prev, line, insn, op1) \
+#define INSERT_AFTER_INSN1(prev, line_node, insn, op1) \
ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) \
- new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
+ new_insn_body(iseq, (line_node), BIN(insn), 1, (VALUE)(op1)))
#define LABEL_REF(label) ((label)->refcnt++)
/* add an instruction with label operand (alias of ADD_INSN1) */
-#define ADD_INSNL(seq, line, insn, label) (ADD_INSN1(seq, line, insn, label), LABEL_REF(label))
+#define ADD_INSNL(seq, line_node, insn, label) (ADD_INSN1(seq, line_node, insn, label), LABEL_REF(label))
-#define ADD_INSN2(seq, line, insn, op1, op2) \
+#define ADD_INSN2(seq, line_node, insn, op1, op2) \
ADD_ELEM((seq), (LINK_ELEMENT *) \
- new_insn_body(iseq, (line), BIN(insn), 2, (VALUE)(op1), (VALUE)(op2)))
+ new_insn_body(iseq, (line_node), BIN(insn), 2, (VALUE)(op1), (VALUE)(op2)))
-#define ADD_INSN3(seq, line, insn, op1, op2, op3) \
+#define ADD_INSN3(seq, line_node, insn, op1, op2, op3) \
ADD_ELEM((seq), (LINK_ELEMENT *) \
- new_insn_body(iseq, (line), BIN(insn), 3, (VALUE)(op1), (VALUE)(op2), (VALUE)(op3)))
+ new_insn_body(iseq, (line_node), BIN(insn), 3, (VALUE)(op1), (VALUE)(op2), (VALUE)(op3)))
/* Specific Insn factory */
-#define ADD_SEND(seq, line, id, argc) \
- ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL)
+#define ADD_SEND(seq, line_node, id, argc) \
+ ADD_SEND_R((seq), (line_node), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL)
-#define ADD_SEND_WITH_FLAG(seq, line, id, argc, flag) \
- ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)(flag), NULL)
+#define ADD_SEND_WITH_FLAG(seq, line_node, id, argc, flag) \
+ ADD_SEND_R((seq), (line_node), (id), (argc), NULL, (VALUE)(flag), NULL)
-#define ADD_SEND_WITH_BLOCK(seq, line, id, argc, block) \
- ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(0), NULL)
+#define ADD_SEND_WITH_BLOCK(seq, line_node, id, argc, block) \
+ ADD_SEND_R((seq), (line_node), (id), (argc), (block), (VALUE)INT2FIX(0), NULL)
-#define ADD_CALL_RECEIVER(seq, line) \
- ADD_INSN((seq), (line), putself)
+#define ADD_CALL_RECEIVER(seq, line_node) \
+ ADD_INSN((seq), (line_node), putself)
-#define ADD_CALL(seq, line, id, argc) \
- ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
+#define ADD_CALL(seq, line_node, id, argc) \
+ ADD_SEND_R((seq), (line_node), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
-#define ADD_CALL_WITH_BLOCK(seq, line, id, argc, block) \
- ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
+#define ADD_CALL_WITH_BLOCK(seq, line_node, id, argc, block) \
+ ADD_SEND_R((seq), (line_node), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
-#define ADD_SEND_R(seq, line, id, argc, block, flag, keywords) \
- ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_send(iseq, (line), (id), (VALUE)(argc), (block), (VALUE)(flag), (keywords)))
+#define ADD_SEND_R(seq, line_node, id, argc, block, flag, keywords) \
+ ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_send(iseq, (line_node), (id), (VALUE)(argc), (block), (VALUE)(flag), (keywords)))
#define ADD_TRACE(seq, event) \
ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), 0))
#define ADD_TRACE_WITH_DATA(seq, event, data) \
ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), (data)))
+static void iseq_add_getlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *const line_node, int idx, int level);
+static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *const line_node, int idx, int level);
-#define DECL_BRANCH_BASE(branches, first_line, first_column, last_line, last_column, type) \
- do { \
- if (ISEQ_COVERAGE(iseq) && \
- ISEQ_BRANCH_COVERAGE(iseq) && \
- (first_line) > 0) { \
- VALUE structure = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 0); \
- branches = rb_ary_tmp_new(5); \
- rb_ary_push(structure, branches); \
- rb_ary_push(branches, ID2SYM(rb_intern(type))); \
- rb_ary_push(branches, INT2FIX(first_line)); \
- rb_ary_push(branches, INT2FIX(first_column)); \
- rb_ary_push(branches, INT2FIX(last_line)); \
- rb_ary_push(branches, INT2FIX(last_column)); \
- } \
- } while (0)
-#define ADD_TRACE_BRANCH_COVERAGE(seq, first_line, first_column, last_line, last_column, type, branches) \
- do { \
- if (ISEQ_COVERAGE(iseq) && \
- ISEQ_BRANCH_COVERAGE(iseq) && \
- (first_line) > 0) { \
- VALUE counters = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 1); \
- long counter_idx = RARRAY_LEN(counters); \
- rb_ary_push(counters, INT2FIX(0)); \
- rb_ary_push(branches, ID2SYM(rb_intern(type))); \
- rb_ary_push(branches, INT2FIX(first_line)); \
- rb_ary_push(branches, INT2FIX(first_column)); \
- rb_ary_push(branches, INT2FIX(last_line)); \
- rb_ary_push(branches, INT2FIX(last_column)); \
- rb_ary_push(branches, INT2FIX(counter_idx)); \
- ADD_TRACE_WITH_DATA(seq, RUBY_EVENT_COVERAGE_BRANCH, counter_idx); \
- ADD_INSN(seq, last_line, nop); \
- } \
- } while (0)
-
-static void iseq_add_getlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line, int idx, int level);
-static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line, int idx, int level);
-
-#define ADD_GETLOCAL(seq, line, idx, level) iseq_add_getlocal(iseq, (seq), (line), (idx), (level))
-#define ADD_SETLOCAL(seq, line, idx, level) iseq_add_setlocal(iseq, (seq), (line), (idx), (level))
+#define ADD_GETLOCAL(seq, line_node, idx, level) iseq_add_getlocal(iseq, (seq), (line_node), (idx), (level))
+#define ADD_SETLOCAL(seq, line_node, idx, level) iseq_add_setlocal(iseq, (seq), (line_node), (idx), (level))
/* add label */
#define ADD_LABEL(seq, label) \
@@ -315,8 +297,8 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line,
#define APPEND_LABEL(seq, before, label) \
APPEND_ELEM((seq), (before), (LINK_ELEMENT *) (label))
-#define ADD_ADJUST(seq, line, label) \
- ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), (line)))
+#define ADD_ADJUST(seq, line_node, label) \
+ ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), nd_line(line_node)))
#define ADD_ADJUST_RESTORE(seq, label) \
ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), -1))
@@ -325,13 +307,13 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line,
((label) ? (LABEL_REF(label), (label)->unremovable=1) : 0)
#define ADD_CATCH_ENTRY(type, ls, le, iseqv, lc) do { \
VALUE _e = rb_ary_new3(5, (type), \
- (VALUE)(ls) | 1, (VALUE)(le) | 1, \
- (VALUE)(iseqv), (VALUE)(lc) | 1); \
+ (VALUE)(ls) | 1, (VALUE)(le) | 1, \
+ (VALUE)(iseqv), (VALUE)(lc) | 1); \
LABEL_UNREMOVABLE(ls); \
LABEL_REF(le); \
LABEL_REF(lc); \
if (NIL_P(ISEQ_COMPILE_DATA(iseq)->catch_table_ary)) \
- RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, rb_ary_tmp_new(3)); \
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, rb_ary_hidden_new(3)); \
rb_ary_push(ISEQ_COMPILE_DATA(iseq)->catch_table_ary, freeze_hide_obj(_e)); \
} while (0)
@@ -352,7 +334,7 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line,
#define COMPILE_RECV(anchor, desc, node) \
(private_recv_p(node) ? \
- (ADD_INSN(anchor, nd_line(node), putself), VM_CALL_FCALL) : \
+ (ADD_INSN(anchor, node, putself), VM_CALL_FCALL) : \
COMPILE(anchor, desc, node->nd_recv) ? 0 : -1)
#define OPERAND_AT(insn, idx) \
@@ -371,9 +353,9 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line,
/* error */
#if CPDEBUG > 0
-NORETURN(static void append_compile_error(const rb_iseq_t *iseq, int line, const char *fmt, ...));
+RBIMPL_ATTR_NORETURN()
#endif
-
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
static void
append_compile_error(const rb_iseq_t *iseq, int line, const char *fmt, ...)
{
@@ -386,11 +368,11 @@ append_compile_error(const rb_iseq_t *iseq, int line, const char *fmt, ...)
err = rb_syntax_error_append(err, file, line, -1, NULL, fmt, args);
va_end(args);
if (NIL_P(err_info)) {
- RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err);
- rb_set_errinfo(err);
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err);
+ rb_set_errinfo(err);
}
else if (!err_info) {
- RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, Qtrue);
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, Qtrue);
}
if (compile_debug) {
if (SPECIAL_CONST_P(err)) err = rb_eSyntaxError;
@@ -420,17 +402,17 @@ do { \
const NODE *error_node = (node); \
enum node_type error_type = nd_type(error_node); \
if (error_type != (ndtype)) { \
- COMPILE_ERROR(ERROR_ARGS_AT(error_node) \
- prefix ": " #ndtype " is expected, but %s", \
- ruby_node_name(error_type)); \
- return errval; \
+ COMPILE_ERROR(ERROR_ARGS_AT(error_node) \
+ prefix ": " #ndtype " is expected, but %s", \
+ ruby_node_name(error_type)); \
+ return errval; \
} \
} while (0)
#define EXPECT_NODE_NONULL(prefix, parent, ndtype, errval) \
do { \
COMPILE_ERROR(ERROR_ARGS_AT(parent) \
- prefix ": must be " #ndtype ", but 0"); \
+ prefix ": must be " #ndtype ", but 0"); \
return errval; \
} while (0)
@@ -438,7 +420,7 @@ do { \
do { \
const NODE *error_node = (node); \
COMPILE_ERROR(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \
- ruby_node_name(nd_type(error_node))); \
+ ruby_node_name(nd_type(error_node))); \
return errval; \
} while (0)
@@ -488,7 +470,7 @@ static void dump_disasm_list(const LINK_ELEMENT *elem);
static int insn_data_length(INSN *iobj);
static int calc_sp_depth(int depth, INSN *iobj);
-static INSN *new_insn_body(rb_iseq_t *iseq, int line_no, enum ruby_vminsn_type insn_id, int argc, ...);
+static INSN *new_insn_body(rb_iseq_t *iseq, const NODE *const line_node, enum ruby_vminsn_type insn_id, int argc, ...);
static LABEL *new_label_body(rb_iseq_t *iseq, long line);
static ADJUST *new_adjust_body(rb_iseq_t *iseq, LABEL *label, int line);
static TRACE *new_trace_body(rb_iseq_t *iseq, rb_event_flag_t event, long data);
@@ -500,7 +482,7 @@ static int iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
-static int iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl);
+static int iseq_set_local_table(rb_iseq_t *iseq, const rb_ast_id_table_t *tbl);
static int iseq_set_exception_local_table(rb_iseq_t *iseq);
static int iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const anchor, const NODE *const node);
@@ -510,6 +492,7 @@ static int iseq_set_exception_table(rb_iseq_t *iseq);
static int iseq_set_optargs_table(rb_iseq_t *iseq);
static int compile_defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE needstr);
+static int compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int method_call_keywords, int popped);
/*
* To make Array to LinkedList, use link_anchor
@@ -527,19 +510,19 @@ verify_list(ISEQ_ARG_DECLARE const char *info, LINK_ANCHOR *const anchor)
list = anchor->anchor.next;
plist = &anchor->anchor;
while (list) {
- if (plist != list->prev) {
- flag += 1;
- }
- plist = list;
- list = list->next;
+ if (plist != list->prev) {
+ flag += 1;
+ }
+ plist = list;
+ list = list->next;
}
if (anchor->last != plist && anchor->last != 0) {
- flag |= 0x70000;
+ flag |= 0x70000;
}
if (flag != 0) {
- rb_bug("list verify error: %08x (%s)", flag, info);
+ rb_bug("list verify error: %08x (%s)", flag, info);
}
#endif
}
@@ -553,22 +536,33 @@ verify_call_cache(rb_iseq_t *iseq)
#if CPDEBUG
VALUE *original = rb_iseq_original_iseq(iseq);
size_t i = 0;
- while (i < iseq->body->iseq_size) {
+ while (i < ISEQ_BODY(iseq)->iseq_size) {
VALUE insn = original[i];
const char *types = insn_op_types(insn);
for (int j=0; types[j]; j++) {
if (types[j] == TS_CALLDATA) {
- struct rb_call_cache cc;
struct rb_call_data *cd = (struct rb_call_data *)original[i+j+1];
- MEMZERO(&cc, cc, 1);
- if (memcmp(&cc, &cd->cc, sizeof(cc))) {
- rb_bug("call cache not zero for fresh iseq");
+ const struct rb_callinfo *ci = cd->ci;
+ const struct rb_callcache *cc = cd->cc;
+ if (cc != vm_cc_empty()) {
+ vm_ci_dump(ci);
+ rb_bug("call cache is not initialized by vm_cc_empty()");
}
}
}
i += insn_len(insn);
}
+
+ for (unsigned int i=0; i<ISEQ_BODY(iseq)->ci_size; i++) {
+ struct rb_call_data *cd = &ISEQ_BODY(iseq)->call_data[i];
+ const struct rb_callinfo *ci = cd->ci;
+ const struct rb_callcache *cc = cd->cc;
+ if (cc != NULL && cc != vm_cc_empty()) {
+ vm_ci_dump(ci);
+ rb_bug("call cache is not initialized by vm_cc_empty()");
+ }
+ }
#endif
}
@@ -602,6 +596,107 @@ APPEND_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor, LINK_ELEMENT *before, LI
#define APPEND_ELEM(anchor, before, elem) APPEND_ELEM(iseq, (anchor), (before), (elem))
#endif
+static int
+branch_coverage_valid_p(rb_iseq_t *iseq, int first_line)
+{
+ if (!ISEQ_COVERAGE(iseq)) return 0;
+ if (!ISEQ_BRANCH_COVERAGE(iseq)) return 0;
+ if (first_line <= 0) return 0;
+ return 1;
+}
+
+static VALUE
+decl_branch_base(rb_iseq_t *iseq, const NODE *node, const char *type)
+{
+ const int first_lineno = nd_first_lineno(node), first_column = nd_first_column(node);
+ const int last_lineno = nd_last_lineno(node), last_column = nd_last_column(node);
+
+ if (!branch_coverage_valid_p(iseq, first_lineno)) return Qundef;
+
+ /*
+ * if !structure[node]
+ * structure[node] = [type, first_lineno, first_column, last_lineno, last_column, branches = {}]
+ * else
+ * branches = structure[node][5]
+ * end
+ */
+
+ VALUE structure = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 0);
+ VALUE key = (VALUE)node | 1; // FIXNUM for hash key
+ VALUE branch_base = rb_hash_aref(structure, key);
+ VALUE branches;
+
+ if (NIL_P(branch_base)) {
+ branch_base = rb_ary_hidden_new(6);
+ rb_hash_aset(structure, key, branch_base);
+ rb_ary_push(branch_base, ID2SYM(rb_intern(type)));
+ rb_ary_push(branch_base, INT2FIX(first_lineno));
+ rb_ary_push(branch_base, INT2FIX(first_column));
+ rb_ary_push(branch_base, INT2FIX(last_lineno));
+ rb_ary_push(branch_base, INT2FIX(last_column));
+ branches = rb_hash_new();
+ rb_obj_hide(branches);
+ rb_ary_push(branch_base, branches);
+ }
+ else {
+ branches = RARRAY_AREF(branch_base, 5);
+ }
+
+ return branches;
+}
+
+static NODE
+generate_dummy_line_node(int lineno, int node_id)
+{
+ NODE dummy = { 0 };
+ nd_set_line(&dummy, lineno);
+ nd_set_node_id(&dummy, node_id);
+ return dummy;
+}
+
+static void
+add_trace_branch_coverage(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *node, int branch_id, const char *type, VALUE branches)
+{
+ const int first_lineno = nd_first_lineno(node), first_column = nd_first_column(node);
+ const int last_lineno = nd_last_lineno(node), last_column = nd_last_column(node);
+
+ if (!branch_coverage_valid_p(iseq, first_lineno)) return;
+
+ /*
+ * if !branches[branch_id]
+ * branches[branch_id] = [type, first_lineno, first_column, last_lineno, last_column, counter_idx]
+ * else
+ * counter_idx= branches[branch_id][5]
+ * end
+ */
+
+ VALUE key = INT2FIX(branch_id);
+ VALUE branch = rb_hash_aref(branches, key);
+ long counter_idx;
+
+ if (NIL_P(branch)) {
+ branch = rb_ary_hidden_new(6);
+ rb_hash_aset(branches, key, branch);
+ rb_ary_push(branch, ID2SYM(rb_intern(type)));
+ rb_ary_push(branch, INT2FIX(first_lineno));
+ rb_ary_push(branch, INT2FIX(first_column));
+ rb_ary_push(branch, INT2FIX(last_lineno));
+ rb_ary_push(branch, INT2FIX(last_column));
+ VALUE counters = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 1);
+ counter_idx = RARRAY_LEN(counters);
+ rb_ary_push(branch, LONG2FIX(counter_idx));
+ rb_ary_push(counters, INT2FIX(0));
+ }
+ else {
+ counter_idx = FIX2LONG(RARRAY_AREF(branch, 5));
+ }
+
+ ADD_TRACE_WITH_DATA(seq, RUBY_EVENT_COVERAGE_BRANCH, counter_idx);
+
+ NODE dummy_line_node = generate_dummy_line_node(last_lineno, nd_node_id(node));
+ ADD_INSN(seq, &dummy_line_node, nop);
+}
+
#define ISEQ_LAST_LINE(iseq) (ISEQ_COMPILE_DATA(iseq)->last_line)
static int
@@ -610,11 +705,11 @@ validate_label(st_data_t name, st_data_t label, st_data_t arg)
rb_iseq_t *iseq = (rb_iseq_t *)arg;
LABEL *lobj = (LABEL *)label;
if (!lobj->link.next) {
- do {
- COMPILE_ERROR(iseq, lobj->position,
- "%"PRIsVALUE": undefined label",
- rb_sym2str((VALUE)name));
- } while (0);
+ do {
+ COMPILE_ERROR(iseq, lobj->position,
+ "%"PRIsVALUE": undefined label",
+ rb_sym2str((VALUE)name));
+ } while (0);
}
return ST_CONTINUE;
}
@@ -634,7 +729,8 @@ rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback
(*ifunc->func)(iseq, ret, ifunc->data);
- ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave);
+ NODE dummy_line_node = generate_dummy_line_node(ISEQ_COMPILE_DATA(iseq)->last_line, -1);
+ ADD_INSN(ret, &dummy_line_node, leave);
CHECK(iseq_setup_insn(iseq, ret));
return iseq_setup(iseq, ret);
@@ -646,109 +742,114 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
DECL_ANCHOR(ret);
INIT_ANCHOR(ret);
- if (imemo_type_p((VALUE)node, imemo_ifunc)) {
+ if (IMEMO_TYPE_P(node, imemo_ifunc)) {
rb_raise(rb_eArgError, "unexpected imemo_ifunc");
}
if (node == 0) {
NO_CHECK(COMPILE(ret, "nil", node));
- iseq_set_local_table(iseq, 0);
+ iseq_set_local_table(iseq, 0);
}
/* assume node is T_NODE */
- else if (nd_type(node) == NODE_SCOPE) {
- /* iseq type of top, method, class, block */
- iseq_set_local_table(iseq, node->nd_tbl);
- iseq_set_arguments(iseq, ret, node->nd_args);
-
- switch (iseq->body->type) {
- case ISEQ_TYPE_BLOCK:
- {
- LABEL *start = ISEQ_COMPILE_DATA(iseq)->start_label = NEW_LABEL(0);
- LABEL *end = ISEQ_COMPILE_DATA(iseq)->end_label = NEW_LABEL(0);
-
- start->rescued = LABEL_RESCUE_BEG;
- end->rescued = LABEL_RESCUE_END;
-
- ADD_TRACE(ret, RUBY_EVENT_B_CALL);
- ADD_INSN (ret, FIX2INT(iseq->body->location.first_lineno), nop);
- ADD_LABEL(ret, start);
- CHECK(COMPILE(ret, "block body", node->nd_body));
- ADD_LABEL(ret, end);
- ADD_TRACE(ret, RUBY_EVENT_B_RETURN);
- ISEQ_COMPILE_DATA(iseq)->last_line = iseq->body->location.code_location.end_pos.lineno;
-
- /* wide range catch handler must put at last */
- ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, NULL, start);
- ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, start, end, NULL, end);
- break;
- }
- case ISEQ_TYPE_CLASS:
- {
- ADD_TRACE(ret, RUBY_EVENT_CLASS);
- CHECK(COMPILE(ret, "scoped node", node->nd_body));
- ADD_TRACE(ret, RUBY_EVENT_END);
- ISEQ_COMPILE_DATA(iseq)->last_line = nd_line(node);
- break;
- }
- case ISEQ_TYPE_METHOD:
- {
- ADD_TRACE(ret, RUBY_EVENT_CALL);
- CHECK(COMPILE(ret, "scoped node", node->nd_body));
- ADD_TRACE(ret, RUBY_EVENT_RETURN);
- ISEQ_COMPILE_DATA(iseq)->last_line = nd_line(node);
- break;
- }
- default: {
- CHECK(COMPILE(ret, "scoped node", node->nd_body));
- break;
- }
- }
+ else if (nd_type_p(node, NODE_SCOPE)) {
+ /* iseq type of top, method, class, block */
+ iseq_set_local_table(iseq, node->nd_tbl);
+ iseq_set_arguments(iseq, ret, node->nd_args);
+
+ switch (ISEQ_BODY(iseq)->type) {
+ case ISEQ_TYPE_BLOCK:
+ {
+ LABEL *start = ISEQ_COMPILE_DATA(iseq)->start_label = NEW_LABEL(0);
+ LABEL *end = ISEQ_COMPILE_DATA(iseq)->end_label = NEW_LABEL(0);
+
+ start->rescued = LABEL_RESCUE_BEG;
+ end->rescued = LABEL_RESCUE_END;
+
+ ADD_TRACE(ret, RUBY_EVENT_B_CALL);
+ NODE dummy_line_node = generate_dummy_line_node(ISEQ_BODY(iseq)->location.first_lineno, -1);
+ ADD_INSN (ret, &dummy_line_node, nop);
+ ADD_LABEL(ret, start);
+ CHECK(COMPILE(ret, "block body", node->nd_body));
+ ADD_LABEL(ret, end);
+ ADD_TRACE(ret, RUBY_EVENT_B_RETURN);
+ ISEQ_COMPILE_DATA(iseq)->last_line = ISEQ_BODY(iseq)->location.code_location.end_pos.lineno;
+
+ /* wide range catch handler must put at last */
+ ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, NULL, start);
+ ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, start, end, NULL, end);
+ break;
+ }
+ case ISEQ_TYPE_CLASS:
+ {
+ ADD_TRACE(ret, RUBY_EVENT_CLASS);
+ CHECK(COMPILE(ret, "scoped node", node->nd_body));
+ ADD_TRACE(ret, RUBY_EVENT_END);
+ ISEQ_COMPILE_DATA(iseq)->last_line = nd_line(node);
+ break;
+ }
+ case ISEQ_TYPE_METHOD:
+ {
+ ISEQ_COMPILE_DATA(iseq)->root_node = node->nd_body;
+ ADD_TRACE(ret, RUBY_EVENT_CALL);
+ CHECK(COMPILE(ret, "scoped node", node->nd_body));
+ ISEQ_COMPILE_DATA(iseq)->root_node = node->nd_body;
+ ADD_TRACE(ret, RUBY_EVENT_RETURN);
+ ISEQ_COMPILE_DATA(iseq)->last_line = nd_line(node);
+ break;
+ }
+ default: {
+ CHECK(COMPILE(ret, "scoped node", node->nd_body));
+ break;
+ }
+ }
}
else {
- const char *m;
+ const char *m;
#define INVALID_ISEQ_TYPE(type) \
- ISEQ_TYPE_##type: m = #type; goto invalid_iseq_type
- switch (iseq->body->type) {
- case INVALID_ISEQ_TYPE(METHOD);
- case INVALID_ISEQ_TYPE(CLASS);
- case INVALID_ISEQ_TYPE(BLOCK);
- case INVALID_ISEQ_TYPE(EVAL);
- case INVALID_ISEQ_TYPE(MAIN);
- case INVALID_ISEQ_TYPE(TOP);
+ ISEQ_TYPE_##type: m = #type; goto invalid_iseq_type
+ switch (ISEQ_BODY(iseq)->type) {
+ case INVALID_ISEQ_TYPE(METHOD);
+ case INVALID_ISEQ_TYPE(CLASS);
+ case INVALID_ISEQ_TYPE(BLOCK);
+ case INVALID_ISEQ_TYPE(EVAL);
+ case INVALID_ISEQ_TYPE(MAIN);
+ case INVALID_ISEQ_TYPE(TOP);
#undef INVALID_ISEQ_TYPE /* invalid iseq types end */
- case ISEQ_TYPE_RESCUE:
- iseq_set_exception_local_table(iseq);
- CHECK(COMPILE(ret, "rescue", node));
- break;
- case ISEQ_TYPE_ENSURE:
- iseq_set_exception_local_table(iseq);
- CHECK(COMPILE_POPPED(ret, "ensure", node));
- break;
- case ISEQ_TYPE_PLAIN:
- CHECK(COMPILE(ret, "ensure", node));
- break;
- default:
- COMPILE_ERROR(ERROR_ARGS "unknown scope: %d", iseq->body->type);
- return COMPILE_NG;
- invalid_iseq_type:
- COMPILE_ERROR(ERROR_ARGS "compile/ISEQ_TYPE_%s should not be reached", m);
- return COMPILE_NG;
- }
- }
-
- if (iseq->body->type == ISEQ_TYPE_RESCUE || iseq->body->type == ISEQ_TYPE_ENSURE) {
- ADD_GETLOCAL(ret, 0, LVAR_ERRINFO, 0);
- ADD_INSN1(ret, 0, throw, INT2FIX(0) /* continue throw */ );
+ case ISEQ_TYPE_RESCUE:
+ iseq_set_exception_local_table(iseq);
+ CHECK(COMPILE(ret, "rescue", node));
+ break;
+ case ISEQ_TYPE_ENSURE:
+ iseq_set_exception_local_table(iseq);
+ CHECK(COMPILE_POPPED(ret, "ensure", node));
+ break;
+ case ISEQ_TYPE_PLAIN:
+ CHECK(COMPILE(ret, "ensure", node));
+ break;
+ default:
+ COMPILE_ERROR(ERROR_ARGS "unknown scope: %d", ISEQ_BODY(iseq)->type);
+ return COMPILE_NG;
+ invalid_iseq_type:
+ COMPILE_ERROR(ERROR_ARGS "compile/ISEQ_TYPE_%s should not be reached", m);
+ return COMPILE_NG;
+ }
+ }
+
+ if (ISEQ_BODY(iseq)->type == ISEQ_TYPE_RESCUE || ISEQ_BODY(iseq)->type == ISEQ_TYPE_ENSURE) {
+ NODE dummy_line_node = generate_dummy_line_node(0, -1);
+ ADD_GETLOCAL(ret, &dummy_line_node, LVAR_ERRINFO, 0);
+ ADD_INSN1(ret, &dummy_line_node, throw, INT2FIX(0) /* continue throw */ );
}
else {
- ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave);
+ NODE dummy_line_node = generate_dummy_line_node(ISEQ_COMPILE_DATA(iseq)->last_line, -1);
+ ADD_INSN(ret, &dummy_line_node, leave);
}
#if OPT_SUPPORT_JOKE
if (ISEQ_COMPILE_DATA(iseq)->labels_table) {
- st_table *labels_table = ISEQ_COMPILE_DATA(iseq)->labels_table;
- ISEQ_COMPILE_DATA(iseq)->labels_table = 0;
- validate_labels(iseq, labels_table);
+ st_table *labels_table = ISEQ_COMPILE_DATA(iseq)->labels_table;
+ ISEQ_COMPILE_DATA(iseq)->labels_table = 0;
+ validate_labels(iseq, labels_table);
}
#endif
CHECK(iseq_setup_insn(iseq, ret));
@@ -761,15 +862,15 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
const void * const *table = rb_vm_get_insns_address_table();
unsigned int i;
- VALUE *encoded = (VALUE *)iseq->body->iseq_encoded;
+ VALUE *encoded = (VALUE *)ISEQ_BODY(iseq)->iseq_encoded;
- for (i = 0; i < iseq->body->iseq_size; /* */ ) {
- int insn = (int)iseq->body->iseq_encoded[i];
- int len = insn_len(insn);
- encoded[i] = (VALUE)table[insn];
- i += len;
+ for (i = 0; i < ISEQ_BODY(iseq)->iseq_size; /* */ ) {
+ int insn = (int)ISEQ_BODY(iseq)->iseq_encoded[i];
+ int len = insn_len(insn);
+ encoded[i] = (VALUE)table[insn];
+ i += len;
}
- FL_SET(iseq, ISEQ_TRANSLATED);
+ FL_SET((VALUE)iseq, ISEQ_TRANSLATED);
#endif
return COMPILE_OK;
}
@@ -780,20 +881,20 @@ rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */
VALUE *original_code;
if (ISEQ_ORIGINAL_ISEQ(iseq)) return ISEQ_ORIGINAL_ISEQ(iseq);
- original_code = ISEQ_ORIGINAL_ISEQ_ALLOC(iseq, iseq->body->iseq_size);
- MEMCPY(original_code, iseq->body->iseq_encoded, VALUE, iseq->body->iseq_size);
+ original_code = ISEQ_ORIGINAL_ISEQ_ALLOC(iseq, ISEQ_BODY(iseq)->iseq_size);
+ MEMCPY(original_code, ISEQ_BODY(iseq)->iseq_encoded, VALUE, ISEQ_BODY(iseq)->iseq_size);
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
{
- unsigned int i;
+ unsigned int i;
- for (i = 0; i < iseq->body->iseq_size; /* */ ) {
- const void *addr = (const void *)original_code[i];
- const int insn = rb_vm_insn_addr2insn(addr);
+ for (i = 0; i < ISEQ_BODY(iseq)->iseq_size; /* */ ) {
+ const void *addr = (const void *)original_code[i];
+ const int insn = rb_vm_insn_addr2insn(addr);
- original_code[i] = insn;
- i += insn_len(insn);
- }
+ original_code[i] = insn;
+ i += insn_len(insn);
+ }
}
#endif
return original_code;
@@ -813,6 +914,16 @@ rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */
#define STRICT_ALIGNMENT
#endif
+/*
+ * Some OpenBSD platforms (including sparc64) require strict alignment.
+ */
+#if defined(__OpenBSD__)
+ #include <sys/endian.h>
+ #ifdef __STRICT_ALIGNMENT
+ #define STRICT_ALIGNMENT
+ #endif
+#endif
+
#ifdef STRICT_ALIGNMENT
#if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE
#define ALIGNMENT_SIZE SIZEOF_LONG_LONG
@@ -865,18 +976,18 @@ compile_data_alloc_with_arena(struct iseq_compile_data_storage **arena, size_t s
if (size >= INT_MAX - padding) rb_memerror();
if (storage->pos + size + padding > storage->size) {
- unsigned int alloc_size = storage->size;
-
- while (alloc_size < size + PADDING_SIZE_MAX) {
- if (alloc_size >= INT_MAX / 2) rb_memerror();
- alloc_size *= 2;
- }
- storage->next = (void *)ALLOC_N(char, alloc_size +
- offsetof(struct iseq_compile_data_storage, buff));
- storage = *arena = storage->next;
- storage->next = 0;
- storage->pos = 0;
- storage->size = alloc_size;
+ unsigned int alloc_size = storage->size;
+
+ while (alloc_size < size + PADDING_SIZE_MAX) {
+ if (alloc_size >= INT_MAX / 2) rb_memerror();
+ alloc_size *= 2;
+ }
+ storage->next = (void *)ALLOC_N(char, alloc_size +
+ offsetof(struct iseq_compile_data_storage, buff));
+ storage = *arena = storage->next;
+ storage->next = 0;
+ storage->pos = 0;
+ storage->size = alloc_size;
#ifdef STRICT_ALIGNMENT
padding = calc_padding((void *)&storage->buff[storage->pos], size);
#endif /* STRICT_ALIGNMENT */
@@ -905,6 +1016,15 @@ compile_data_alloc2(rb_iseq_t *iseq, size_t x, size_t y)
return compile_data_alloc(iseq, size);
}
+static inline void *
+compile_data_calloc2(rb_iseq_t *iseq, size_t x, size_t y)
+{
+ size_t size = rb_size_mul_or_raise(x, y, rb_eRuntimeError);
+ void *p = compile_data_alloc(iseq, size);
+ memset(p, 0, size);
+ return p;
+}
+
static INSN *
compile_data_alloc_insn(rb_iseq_t *iseq)
{
@@ -940,7 +1060,7 @@ ELEM_INSERT_NEXT(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
elem2->prev = elem1;
elem1->next = elem2;
if (elem2->next) {
- elem2->next->prev = elem2;
+ elem2->next->prev = elem2;
}
}
@@ -954,7 +1074,7 @@ ELEM_INSERT_PREV(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
elem2->next = elem1;
elem1->prev = elem2;
if (elem2->prev) {
- elem2->prev->next = elem2;
+ elem2->prev->next = elem2;
}
}
@@ -967,10 +1087,10 @@ ELEM_REPLACE(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2)
elem2->prev = elem1->prev;
elem2->next = elem1->next;
if (elem1->prev) {
- elem1->prev->next = elem2;
+ elem1->prev->next = elem2;
}
if (elem1->next) {
- elem1->next->prev = elem2;
+ elem1->next->prev = elem2;
}
}
@@ -979,7 +1099,7 @@ ELEM_REMOVE(LINK_ELEMENT *elem)
{
elem->prev->next = elem->next;
if (elem->next) {
- elem->next->prev = elem->prev;
+ elem->next->prev = elem->prev;
}
}
@@ -996,29 +1116,16 @@ LAST_ELEMENT(LINK_ANCHOR *const anchor)
}
static LINK_ELEMENT *
-POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor)
-{
- LINK_ELEMENT *elem = anchor->last;
- anchor->last = anchor->last->prev;
- anchor->last->next = 0;
- verify_list("pop", anchor);
- return elem;
-}
-#if CPDEBUG < 0
-#define POP_ELEMENT(anchor) POP_ELEMENT(iseq, (anchor))
-#endif
-
-static LINK_ELEMENT *
ELEM_FIRST_INSN(LINK_ELEMENT *elem)
{
while (elem) {
- switch (elem->type) {
- case ISEQ_ELEMENT_INSN:
- case ISEQ_ELEMENT_ADJUST:
- return elem;
- default:
- elem = elem->next;
- }
+ switch (elem->type) {
+ case ISEQ_ELEMENT_INSN:
+ case ISEQ_ELEMENT_ADJUST:
+ return elem;
+ default:
+ elem = elem->next;
+ }
}
return NULL;
}
@@ -1028,11 +1135,11 @@ LIST_INSN_SIZE_ONE(const LINK_ANCHOR *const anchor)
{
LINK_ELEMENT *first_insn = ELEM_FIRST_INSN(FIRST_ELEMENT(anchor));
if (first_insn != NULL &&
- ELEM_FIRST_INSN(first_insn->next) == NULL) {
- return TRUE;
+ ELEM_FIRST_INSN(first_insn->next) == NULL) {
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -1040,10 +1147,10 @@ static int
LIST_INSN_SIZE_ZERO(const LINK_ANCHOR *const anchor)
{
if (ELEM_FIRST_INSN(FIRST_ELEMENT(anchor)) == NULL) {
- return TRUE;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -1058,9 +1165,9 @@ static void
APPEND_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *const anc1, LINK_ANCHOR *const anc2)
{
if (anc2->anchor.next) {
- anc1->last->next = anc2->anchor.next;
- anc2->anchor.next->prev = anc1->last;
- anc1->last = anc2->last;
+ anc1->last->next = anc2->anchor.next;
+ anc2->anchor.next->prev = anc1->last;
+ anc1->last = anc2->last;
}
verify_list("append", anc1);
}
@@ -1070,27 +1177,27 @@ APPEND_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *const anc1, LINK_ANCHOR *const anc2)
#if CPDEBUG && 0
static void
-debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor)
+debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor, LINK_ELEMENT *cur)
{
LINK_ELEMENT *list = FIRST_ELEMENT(anchor);
printf("----\n");
- printf("anch: %p, frst: %p, last: %p\n", &anchor->anchor,
- anchor->anchor.next, anchor->last);
+ printf("anch: %p, frst: %p, last: %p\n", (void *)&anchor->anchor,
+ (void *)anchor->anchor.next, (void *)anchor->last);
while (list) {
- printf("curr: %p, next: %p, prev: %p, type: %d\n", list, list->next,
- list->prev, FIX2INT(list->type));
- list = list->next;
+ printf("curr: %p, next: %p, prev: %p, type: %d\n", (void *)list, (void *)list->next,
+ (void *)list->prev, (int)list->type);
+ list = list->next;
}
printf("----\n");
- dump_disasm_list(anchor->anchor.next);
+ dump_disasm_list_with_cursor(anchor->anchor.next, cur, 0);
verify_list("debug list", anchor);
}
#if CPDEBUG < 0
-#define debug_list(anc) debug_list(iseq, (anc))
+#define debug_list(anc, cur) debug_list(iseq, (anc), (cur))
#endif
#else
-#define debug_list(anc) ((void)0)
+#define debug_list(anc, cur) ((void)0)
#endif
static TRACE *
@@ -1136,109 +1243,142 @@ new_adjust_body(rb_iseq_t *iseq, LABEL *label, int line)
return adjust;
}
+static void
+iseq_insn_each_markable_object(INSN *insn, void (*func)(VALUE *, VALUE), VALUE data)
+{
+ const char *types = insn_op_types(insn->insn_id);
+ for (int j = 0; types[j]; j++) {
+ char type = types[j];
+ switch (type) {
+ case TS_CDHASH:
+ case TS_ISEQ:
+ case TS_VALUE:
+ case TS_IC: // constant path array
+ case TS_CALLDATA: // ci is stored.
+ func(&OPERAND_AT(insn, j), data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void
+iseq_insn_each_object_write_barrier(VALUE *obj_ptr, VALUE iseq)
+{
+ RB_OBJ_WRITTEN(iseq, Qundef, *obj_ptr);
+}
+
static INSN *
-new_insn_core(rb_iseq_t *iseq, int line_no,
- int insn_id, int argc, VALUE *argv)
+new_insn_core(rb_iseq_t *iseq, const NODE *line_node,
+ int insn_id, int argc, VALUE *argv)
{
INSN *iobj = compile_data_alloc_insn(iseq);
- /* printf("insn_id: %d, line: %d\n", insn_id, line_no); */
+ /* printf("insn_id: %d, line: %d\n", insn_id, nd_line(line_node)); */
iobj->link.type = ISEQ_ELEMENT_INSN;
iobj->link.next = 0;
iobj->insn_id = insn_id;
- iobj->insn_info.line_no = line_no;
+ iobj->insn_info.line_no = nd_line(line_node);
+ iobj->insn_info.node_id = nd_node_id(line_node);
iobj->insn_info.events = 0;
iobj->operands = argv;
iobj->operand_size = argc;
iobj->sc_state = 0;
+
+ iseq_insn_each_markable_object(iobj, iseq_insn_each_object_write_barrier, (VALUE)iseq);
+
return iobj;
}
static INSN *
-new_insn_body(rb_iseq_t *iseq, int line_no, enum ruby_vminsn_type insn_id, int argc, ...)
+new_insn_body(rb_iseq_t *iseq, const NODE *const line_node, enum ruby_vminsn_type insn_id, int argc, ...)
{
VALUE *operands = 0;
va_list argv;
if (argc > 0) {
- int i;
- va_init_list(argv, argc);
+ int i;
+ va_start(argv, argc);
operands = compile_data_alloc2(iseq, sizeof(VALUE), argc);
- for (i = 0; i < argc; i++) {
- VALUE v = va_arg(argv, VALUE);
- operands[i] = v;
- }
- va_end(argv);
+ for (i = 0; i < argc; i++) {
+ VALUE v = va_arg(argv, VALUE);
+ operands[i] = v;
+ }
+ va_end(argv);
}
- return new_insn_core(iseq, line_no, insn_id, argc, operands);
+ return new_insn_core(iseq, line_node, insn_id, argc, operands);
}
-static struct rb_call_info *
-new_callinfo(rb_iseq_t *iseq, ID mid, int argc, unsigned int flag, struct rb_call_info_kw_arg *kw_arg, int has_blockiseq)
+static const struct rb_callinfo *
+new_callinfo(rb_iseq_t *iseq, ID mid, int argc, unsigned int flag, struct rb_callinfo_kwarg *kw_arg, int has_blockiseq)
{
- size_t size = kw_arg != NULL ? sizeof(struct rb_call_info_with_kwarg) : sizeof(struct rb_call_info);
- struct rb_call_info *ci = (struct rb_call_info *)compile_data_alloc(iseq, size);
- struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
+ VM_ASSERT(argc >= 0);
- ci->mid = mid;
- ci->flag = flag;
- ci->orig_argc = argc;
+ if (!(flag & (VM_CALL_ARGS_SPLAT | VM_CALL_ARGS_BLOCKARG | VM_CALL_KW_SPLAT)) &&
+ kw_arg == NULL && !has_blockiseq) {
+ flag |= VM_CALL_ARGS_SIMPLE;
+ }
if (kw_arg) {
- ci->flag |= VM_CALL_KWARG;
- ci_kw->kw_arg = kw_arg;
- ci->orig_argc += kw_arg->keyword_len;
- iseq->body->ci_kw_size++;
- }
- else {
- iseq->body->ci_size++;
+ flag |= VM_CALL_KWARG;
+ argc += kw_arg->keyword_len;
}
- if (!(ci->flag & (VM_CALL_ARGS_SPLAT | VM_CALL_ARGS_BLOCKARG | VM_CALL_KW_SPLAT)) &&
- kw_arg == NULL && !has_blockiseq) {
- ci->flag |= VM_CALL_ARGS_SIMPLE;
- }
+ ISEQ_BODY(iseq)->ci_size++;
+ const struct rb_callinfo *ci = vm_ci_new(mid, flag, argc, kw_arg);
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
return ci;
}
static INSN *
-new_insn_send(rb_iseq_t *iseq, int line_no, ID id, VALUE argc, const rb_iseq_t *blockiseq, VALUE flag, struct rb_call_info_kw_arg *keywords)
+new_insn_send(rb_iseq_t *iseq, const NODE *const line_node, ID id, VALUE argc, const rb_iseq_t *blockiseq, VALUE flag, struct rb_callinfo_kwarg *keywords)
{
- VALUE *operands = compile_data_alloc2(iseq, sizeof(VALUE), 2);
- operands[0] = (VALUE)new_callinfo(iseq, id, FIX2INT(argc), FIX2INT(flag), keywords, blockiseq != NULL);
+ VALUE *operands = compile_data_calloc2(iseq, sizeof(VALUE), 2);
+ VALUE ci = (VALUE)new_callinfo(iseq, id, FIX2INT(argc), FIX2INT(flag), keywords, blockiseq != NULL);
+ operands[0] = ci;
operands[1] = (VALUE)blockiseq;
- return new_insn_core(iseq, line_no, BIN(send), 2, operands);
+ if (blockiseq) {
+ RB_OBJ_WRITTEN(iseq, Qundef, blockiseq);
+ }
+ INSN *insn = new_insn_core(iseq, line_node, BIN(send), 2, operands);
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
+ RB_GC_GUARD(ci);
+ return insn;
}
static rb_iseq_t *
new_child_iseq(rb_iseq_t *iseq, const NODE *const node,
- VALUE name, const rb_iseq_t *parent, enum iseq_type type, int line_no)
+ VALUE name, const rb_iseq_t *parent, enum rb_iseq_type type, int line_no)
{
rb_iseq_t *ret_iseq;
rb_ast_body_t ast;
ast.root = node;
ast.compile_option = 0;
- ast.line_count = -1;
+ ast.script_lines = ISEQ_BODY(iseq)->variable.script_lines;
debugs("[new_child_iseq]> ---------------------------------------\n");
+ int isolated_depth = ISEQ_COMPILE_DATA(iseq)->isolated_depth;
ret_iseq = rb_iseq_new_with_opt(&ast, name,
- rb_iseq_path(iseq), rb_iseq_realpath(iseq),
- INT2FIX(line_no), parent, type, ISEQ_COMPILE_DATA(iseq)->option);
+ rb_iseq_path(iseq), rb_iseq_realpath(iseq),
+ line_no, parent,
+ isolated_depth ? isolated_depth + 1 : 0,
+ type, ISEQ_COMPILE_DATA(iseq)->option);
debugs("[new_child_iseq]< ---------------------------------------\n");
return ret_iseq;
}
static rb_iseq_t *
new_child_iseq_with_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func *ifunc,
- VALUE name, const rb_iseq_t *parent, enum iseq_type type, int line_no)
+ VALUE name, const rb_iseq_t *parent, enum rb_iseq_type type, int line_no)
{
rb_iseq_t *ret_iseq;
debugs("[new_child_iseq_with_callback]> ---------------------------------------\n");
ret_iseq = rb_iseq_new_with_callback(ifunc, name,
- rb_iseq_path(iseq), rb_iseq_realpath(iseq),
- INT2FIX(line_no), parent, type, ISEQ_COMPILE_DATA(iseq)->option);
+ rb_iseq_path(iseq), rb_iseq_realpath(iseq),
+ line_no, parent, type, ISEQ_COMPILE_DATA(iseq)->option);
debugs("[new_child_iseq_with_callback]< ---------------------------------------\n");
return ret_iseq;
}
@@ -1246,18 +1386,18 @@ new_child_iseq_with_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_call
static void
set_catch_except_p(struct rb_iseq_constant_body *body)
{
- body->catch_except_p = TRUE;
+ body->catch_except_p = true;
if (body->parent_iseq != NULL) {
- set_catch_except_p(body->parent_iseq->body);
+ set_catch_except_p(ISEQ_BODY(body->parent_iseq));
}
}
-/* Set body->catch_except_p to TRUE if the ISeq may catch an exception. If it is FALSE,
- JIT-ed code may be optimized. If we are extremely conservative, we should set TRUE
+/* Set body->catch_except_p to true if the ISeq may catch an exception. If it is false,
+ JIT-ed code may be optimized. If we are extremely conservative, we should set true
if catch table exists. But we want to optimize while loop, which always has catch
table entries for break/next/redo.
- So this function sets TRUE for limited ISeqs with break/next/redo catch table entries
+ So this function sets true for limited ISeqs with break/next/redo catch table entries
whose child ISeq would really raise an exception. */
static void
update_catch_except_flags(struct rb_iseq_constant_body *body)
@@ -1271,11 +1411,7 @@ update_catch_except_flags(struct rb_iseq_constant_body *body)
BREAK/NEXT/REDO catch table entries are used only when `throw` insn is used in the block. */
pos = 0;
while (pos < body->iseq_size) {
-#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
- insn = rb_vm_insn_addr2insn((void *)body->iseq_encoded[pos]);
-#else
- insn = (int)body->iseq_encoded[pos];
-#endif
+ insn = rb_vm_insn_decode(body->iseq_encoded[pos]);
if (insn == BIN(throw)) {
set_catch_except_p(body);
break;
@@ -1292,7 +1428,7 @@ update_catch_except_flags(struct rb_iseq_constant_body *body)
if (entry->type != CATCH_TYPE_BREAK
&& entry->type != CATCH_TYPE_NEXT
&& entry->type != CATCH_TYPE_REDO) {
- body->catch_except_p = TRUE;
+ body->catch_except_p = true;
break;
}
}
@@ -1310,11 +1446,20 @@ iseq_insert_nop_between_end_and_cont(rb_iseq_t *iseq)
LINK_ELEMENT *end = (LINK_ELEMENT *)(ptr[2] & ~1);
LINK_ELEMENT *cont = (LINK_ELEMENT *)(ptr[4] & ~1);
LINK_ELEMENT *e;
- for (e = end; e && (IS_LABEL(e) || IS_TRACE(e)); e = e->next) {
- if (e == cont) {
- INSN *nop = new_insn_core(iseq, 0, BIN(nop), 0, 0);
- ELEM_INSERT_NEXT(end, &nop->link);
- break;
+
+ enum rb_catch_type ct = (enum rb_catch_type)(ptr[0] & 0xffff);
+
+ if (ct != CATCH_TYPE_BREAK
+ && ct != CATCH_TYPE_NEXT
+ && ct != CATCH_TYPE_REDO) {
+
+ for (e = end; e && (IS_LABEL(e) || IS_TRACE(e)); e = e->next) {
+ if (e == cont) {
+ NODE dummy_line_node = generate_dummy_line_node(0, -1);
+ INSN *nop = new_insn_core(iseq, &dummy_line_node, BIN(nop), 0, 0);
+ ELEM_INSERT_NEXT(end, &nop->link);
+ break;
+ }
}
}
}
@@ -1324,35 +1469,37 @@ static int
iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
{
if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
- return COMPILE_NG;
+ return COMPILE_NG;
/* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */
if (compile_debug > 5)
- dump_disasm_list(FIRST_ELEMENT(anchor));
+ dump_disasm_list(FIRST_ELEMENT(anchor));
debugs("[compile step 3.1 (iseq_optimize)]\n");
iseq_optimize(iseq, anchor);
if (compile_debug > 5)
- dump_disasm_list(FIRST_ELEMENT(anchor));
+ dump_disasm_list(FIRST_ELEMENT(anchor));
if (ISEQ_COMPILE_DATA(iseq)->option->instructions_unification) {
- debugs("[compile step 3.2 (iseq_insns_unification)]\n");
- iseq_insns_unification(iseq, anchor);
- if (compile_debug > 5)
- dump_disasm_list(FIRST_ELEMENT(anchor));
+ debugs("[compile step 3.2 (iseq_insns_unification)]\n");
+ iseq_insns_unification(iseq, anchor);
+ if (compile_debug > 5)
+ dump_disasm_list(FIRST_ELEMENT(anchor));
}
if (ISEQ_COMPILE_DATA(iseq)->option->stack_caching) {
- debugs("[compile step 3.3 (iseq_set_sequence_stackcaching)]\n");
- iseq_set_sequence_stackcaching(iseq, anchor);
- if (compile_debug > 5)
- dump_disasm_list(FIRST_ELEMENT(anchor));
+ debugs("[compile step 3.3 (iseq_set_sequence_stackcaching)]\n");
+ iseq_set_sequence_stackcaching(iseq, anchor);
+ if (compile_debug > 5)
+ dump_disasm_list(FIRST_ELEMENT(anchor));
}
debugs("[compile step 3.4 (iseq_insert_nop_between_end_and_cont)]\n");
iseq_insert_nop_between_end_and_cont(iseq);
+ if (compile_debug > 5)
+ dump_disasm_list(FIRST_ELEMENT(anchor));
return COMPILE_OK;
}
@@ -1366,7 +1513,7 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
debugs("[compile step 4.1 (iseq_set_sequence)]\n");
if (!iseq_set_sequence(iseq, anchor)) return COMPILE_NG;
if (compile_debug > 5)
- dump_disasm_list(FIRST_ELEMENT(anchor));
+ dump_disasm_list(FIRST_ELEMENT(anchor));
debugs("[compile step 4.2 (iseq_set_exception_table)]\n");
if (!iseq_set_exception_table(iseq)) return COMPILE_NG;
@@ -1377,11 +1524,25 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
debugs("[compile step 5 (iseq_translate_threaded_code)] \n");
if (!rb_iseq_translate_threaded_code(iseq)) return COMPILE_NG;
- update_catch_except_flags(iseq->body);
+ debugs("[compile step 6 (update_catch_except_flags)] \n");
+ update_catch_except_flags(ISEQ_BODY(iseq));
+
+ debugs("[compile step 6.1 (remove unused catch tables)] \n");
+ if (!ISEQ_BODY(iseq)->catch_except_p && ISEQ_BODY(iseq)->catch_table) {
+ xfree(ISEQ_BODY(iseq)->catch_table);
+ ISEQ_BODY(iseq)->catch_table = NULL;
+ }
+
+#if VM_INSN_INFO_TABLE_IMPL == 2
+ if (ISEQ_BODY(iseq)->insns_info.succ_index_table == NULL) {
+ debugs("[compile step 7 (rb_iseq_insns_info_encode_positions)] \n");
+ rb_iseq_insns_info_encode_positions(iseq);
+ }
+#endif
if (compile_debug > 1) {
- VALUE str = rb_iseq_disasm(iseq);
- printf("%s\n", StringValueCStr(str));
+ VALUE str = rb_iseq_disasm(iseq);
+ printf("%s\n", StringValueCStr(str));
}
verify_call_cache(iseq);
debugs("[compile step: finish]\n");
@@ -1392,8 +1553,8 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
static int
iseq_set_exception_local_table(rb_iseq_t *iseq)
{
- iseq->body->local_table_size = numberof(rb_iseq_shared_exc_local_tbl);
- iseq->body->local_table = rb_iseq_shared_exc_local_tbl;
+ ISEQ_BODY(iseq)->local_table_size = numberof(rb_iseq_shared_exc_local_tbl);
+ ISEQ_BODY(iseq)->local_table = rb_iseq_shared_exc_local_tbl;
return COMPILE_OK;
}
@@ -1401,9 +1562,9 @@ static int
get_lvar_level(const rb_iseq_t *iseq)
{
int lev = 0;
- while (iseq != iseq->body->local_iseq) {
- lev++;
- iseq = iseq->body->parent_iseq;
+ while (iseq != ISEQ_BODY(iseq)->local_iseq) {
+ lev++;
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
}
return lev;
}
@@ -1413,10 +1574,10 @@ get_dyna_var_idx_at_raw(const rb_iseq_t *iseq, ID id)
{
unsigned int i;
- for (i = 0; i < iseq->body->local_table_size; i++) {
- if (iseq->body->local_table[i] == id) {
- return (int)i;
- }
+ for (i = 0; i < ISEQ_BODY(iseq)->local_table_size; i++) {
+ if (ISEQ_BODY(iseq)->local_table[i] == id) {
+ return (int)i;
+ }
}
return -1;
}
@@ -1424,7 +1585,7 @@ get_dyna_var_idx_at_raw(const rb_iseq_t *iseq, ID id)
static int
get_local_var_idx(const rb_iseq_t *iseq, ID id)
{
- int idx = get_dyna_var_idx_at_raw(iseq->body->local_iseq, id);
+ int idx = get_dyna_var_idx_at_raw(ISEQ_BODY(iseq)->local_iseq, id);
if (idx < 0) {
COMPILE_ERROR(iseq, ISEQ_LAST_LINE(iseq),
@@ -1441,12 +1602,12 @@ get_dyna_var_idx(const rb_iseq_t *iseq, ID id, int *level, int *ls)
const rb_iseq_t *const topmost_iseq = iseq;
while (iseq) {
- idx = get_dyna_var_idx_at_raw(iseq, id);
- if (idx >= 0) {
- break;
- }
- iseq = iseq->body->parent_iseq;
- lv++;
+ idx = get_dyna_var_idx_at_raw(iseq, id);
+ if (idx >= 0) {
+ break;
+ }
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
+ lv++;
}
if (idx < 0) {
@@ -1455,7 +1616,7 @@ get_dyna_var_idx(const rb_iseq_t *iseq, ID id, int *level, int *ls)
}
*level = lv;
- *ls = iseq->body->local_table_size;
+ *ls = ISEQ_BODY(iseq)->local_table_size;
return idx;
}
@@ -1464,17 +1625,17 @@ iseq_local_block_param_p(const rb_iseq_t *iseq, unsigned int idx, unsigned int l
{
const struct rb_iseq_constant_body *body;
while (level > 0) {
- iseq = iseq->body->parent_iseq;
- level--;
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
+ level--;
}
- body = iseq->body;
+ body = ISEQ_BODY(iseq);
if (body->local_iseq == iseq && /* local variables */
- body->param.flags.has_block &&
- body->local_table_size - body->param.block_start == idx) {
- return TRUE;
+ body->param.flags.has_block &&
+ body->local_table_size - body->param.block_start == idx) {
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -1484,35 +1645,84 @@ iseq_block_param_id_p(const rb_iseq_t *iseq, ID id, int *pidx, int *plevel)
int level, ls;
int idx = get_dyna_var_idx(iseq, id, &level, &ls);
if (iseq_local_block_param_p(iseq, ls - idx, level)) {
- *pidx = ls - idx;
- *plevel = level;
- return TRUE;
+ *pidx = ls - idx;
+ *plevel = level;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
+ }
+}
+
+static void
+access_outer_variables(const rb_iseq_t *iseq, int level, ID id, bool write)
+{
+ int isolated_depth = ISEQ_COMPILE_DATA(iseq)->isolated_depth;
+
+ if (isolated_depth && level >= isolated_depth) {
+ if (id == rb_intern("yield")) {
+ COMPILE_ERROR(iseq, ISEQ_LAST_LINE(iseq), "can not yield from isolated Proc");
+ }
+ else {
+ COMPILE_ERROR(iseq, ISEQ_LAST_LINE(iseq), "can not access variable `%s' from isolated Proc", rb_id2name(id));
+ }
+ }
+
+ for (int i=0; i<level; i++) {
+ VALUE val;
+ struct rb_id_table *ovs = ISEQ_BODY(iseq)->outer_variables;
+
+ if (!ovs) {
+ ovs = ISEQ_BODY(iseq)->outer_variables = rb_id_table_create(8);
+ }
+
+ if (rb_id_table_lookup(ISEQ_BODY(iseq)->outer_variables, id, &val)) {
+ if (write && !val) {
+ rb_id_table_insert(ISEQ_BODY(iseq)->outer_variables, id, Qtrue);
+ }
+ }
+ else {
+ rb_id_table_insert(ISEQ_BODY(iseq)->outer_variables, id, RBOOL(write));
+ }
+
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
+ }
+}
+
+static ID
+iseq_lvar_id(const rb_iseq_t *iseq, int idx, int level)
+{
+ for (int i=0; i<level; i++) {
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
}
+
+ ID id = ISEQ_BODY(iseq)->local_table[ISEQ_BODY(iseq)->local_table_size - idx];
+ // fprintf(stderr, "idx:%d level:%d ID:%s\n", idx, level, rb_id2name(id));
+ return id;
}
static void
-iseq_add_getlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line, int idx, int level)
+iseq_add_getlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *const line_node, int idx, int level)
{
if (iseq_local_block_param_p(iseq, idx, level)) {
- ADD_INSN2(seq, line, getblockparam, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ ADD_INSN2(seq, line_node, getblockparam, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
}
else {
- ADD_INSN2(seq, line, getlocal, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ ADD_INSN2(seq, line_node, getlocal, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
}
+ if (level > 0) access_outer_variables(iseq, level, iseq_lvar_id(iseq, idx, level), Qfalse);
}
static void
-iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line, int idx, int level)
+iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *const line_node, int idx, int level)
{
if (iseq_local_block_param_p(iseq, idx, level)) {
- ADD_INSN2(seq, line, setblockparam, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ ADD_INSN2(seq, line_node, setblockparam, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
}
else {
- ADD_INSN2(seq, line, setlocal, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ ADD_INSN2(seq, line_node, setlocal, INT2FIX((idx) + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
}
+ if (level > 0) access_outer_variables(iseq, level, iseq_lvar_id(iseq, idx, level), Qtrue);
}
@@ -1520,49 +1730,49 @@ iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line, int idx, in
static void
iseq_calc_param_size(rb_iseq_t *iseq)
{
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
if (body->param.flags.has_opt ||
- body->param.flags.has_post ||
- body->param.flags.has_rest ||
- body->param.flags.has_block ||
- body->param.flags.has_kw ||
- body->param.flags.has_kwrest) {
-
- if (body->param.flags.has_block) {
- body->param.size = body->param.block_start + 1;
- }
- else if (body->param.flags.has_kwrest) {
- body->param.size = body->param.keyword->rest_start + 1;
- }
- else if (body->param.flags.has_kw) {
- body->param.size = body->param.keyword->bits_start + 1;
- }
- else if (body->param.flags.has_post) {
- body->param.size = body->param.post_start + body->param.post_num;
- }
- else if (body->param.flags.has_rest) {
- body->param.size = body->param.rest_start + 1;
- }
- else if (body->param.flags.has_opt) {
- body->param.size = body->param.lead_num + body->param.opt_num;
- }
- else {
+ body->param.flags.has_post ||
+ body->param.flags.has_rest ||
+ body->param.flags.has_block ||
+ body->param.flags.has_kw ||
+ body->param.flags.has_kwrest) {
+
+ if (body->param.flags.has_block) {
+ body->param.size = body->param.block_start + 1;
+ }
+ else if (body->param.flags.has_kwrest) {
+ body->param.size = body->param.keyword->rest_start + 1;
+ }
+ else if (body->param.flags.has_kw) {
+ body->param.size = body->param.keyword->bits_start + 1;
+ }
+ else if (body->param.flags.has_post) {
+ body->param.size = body->param.post_start + body->param.post_num;
+ }
+ else if (body->param.flags.has_rest) {
+ body->param.size = body->param.rest_start + 1;
+ }
+ else if (body->param.flags.has_opt) {
+ body->param.size = body->param.lead_num + body->param.opt_num;
+ }
+ else {
UNREACHABLE;
- }
+ }
}
else {
- body->param.size = body->param.lead_num;
+ body->param.size = body->param.lead_num;
}
}
static int
iseq_set_arguments_keywords(rb_iseq_t *iseq, LINK_ANCHOR *const optargs,
- const struct rb_args_info *args, int arg_size)
+ const struct rb_args_info *args, int arg_size)
{
const NODE *node = args->kw_args;
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
struct rb_iseq_param_keyword *keyword;
- const VALUE default_values = rb_ary_tmp_new(1);
+ const VALUE default_values = rb_ary_hidden_new(1);
const VALUE complex_mark = rb_str_tmp_new(0);
int kw = 0, rkw = 0, di = 0, i;
@@ -1570,68 +1780,68 @@ iseq_set_arguments_keywords(rb_iseq_t *iseq, LINK_ANCHOR *const optargs,
body->param.keyword = keyword = ZALLOC_N(struct rb_iseq_param_keyword, 1);
while (node) {
- kw++;
- node = node->nd_next;
+ kw++;
+ node = node->nd_next;
}
arg_size += kw;
keyword->bits_start = arg_size++;
node = args->kw_args;
while (node) {
- const NODE *val_node = node->nd_body->nd_value;
- VALUE dv;
+ const NODE *val_node = node->nd_body->nd_value;
+ VALUE dv;
if (val_node == NODE_SPECIAL_REQUIRED_KEYWORD) {
- ++rkw;
- }
- else {
- switch (nd_type(val_node)) {
- case NODE_LIT:
- dv = val_node->nd_lit;
- break;
- case NODE_NIL:
- dv = Qnil;
- break;
- case NODE_TRUE:
- dv = Qtrue;
- break;
- case NODE_FALSE:
- dv = Qfalse;
- break;
- default:
- NO_CHECK(COMPILE_POPPED(optargs, "kwarg", node)); /* nd_type(node) == NODE_KW_ARG */
- dv = complex_mark;
- }
-
- keyword->num = ++di;
- rb_ary_push(default_values, dv);
- }
-
- node = node->nd_next;
+ ++rkw;
+ }
+ else {
+ switch (nd_type(val_node)) {
+ case NODE_LIT:
+ dv = val_node->nd_lit;
+ break;
+ case NODE_NIL:
+ dv = Qnil;
+ break;
+ case NODE_TRUE:
+ dv = Qtrue;
+ break;
+ case NODE_FALSE:
+ dv = Qfalse;
+ break;
+ default:
+ NO_CHECK(COMPILE_POPPED(optargs, "kwarg", node)); /* nd_type_p(node, NODE_KW_ARG) */
+ dv = complex_mark;
+ }
+
+ keyword->num = ++di;
+ rb_ary_push(default_values, dv);
+ }
+
+ node = node->nd_next;
}
keyword->num = kw;
if (args->kw_rest_arg->nd_vid != 0) {
- keyword->rest_start = arg_size++;
- body->param.flags.has_kwrest = TRUE;
+ keyword->rest_start = arg_size++;
+ body->param.flags.has_kwrest = TRUE;
}
keyword->required_num = rkw;
keyword->table = &body->local_table[keyword->bits_start - keyword->num];
{
- VALUE *dvs = ALLOC_N(VALUE, RARRAY_LEN(default_values));
+ VALUE *dvs = ALLOC_N(VALUE, RARRAY_LEN(default_values));
- for (i = 0; i < RARRAY_LEN(default_values); i++) {
- VALUE dv = RARRAY_AREF(default_values, i);
- if (dv == complex_mark) dv = Qundef;
- if (!SPECIAL_CONST_P(dv)) {
- RB_OBJ_WRITTEN(iseq, Qundef, dv);
- }
- dvs[i] = dv;
- }
+ for (i = 0; i < RARRAY_LEN(default_values); i++) {
+ VALUE dv = RARRAY_AREF(default_values, i);
+ if (dv == complex_mark) dv = Qundef;
+ if (!SPECIAL_CONST_P(dv)) {
+ RB_OBJ_WRITTEN(iseq, Qundef, dv);
+ }
+ dvs[i] = dv;
+ }
- keyword->default_values = dvs;
+ keyword->default_values = dvs;
}
return arg_size;
}
@@ -1642,151 +1852,143 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons
debugs("iseq_set_arguments: %s\n", node_args ? "" : "0");
if (node_args) {
- struct rb_iseq_constant_body *const body = iseq->body;
- struct rb_args_info *args = node_args->nd_ainfo;
- ID rest_id = 0;
- int last_comma = 0;
- ID block_id = 0;
- int arg_size;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
+ struct rb_args_info *args = node_args->nd_ainfo;
+ ID rest_id = 0;
+ int last_comma = 0;
+ ID block_id = 0;
+ int arg_size;
- EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS, COMPILE_NG);
+ EXPECT_NODE("iseq_set_arguments", node_args, NODE_ARGS, COMPILE_NG);
body->param.flags.ruby2_keywords = args->ruby2_keywords;
- body->param.lead_num = arg_size = (int)args->pre_args_num;
- if (body->param.lead_num > 0) body->param.flags.has_lead = TRUE;
- debugs(" - argc: %d\n", body->param.lead_num);
+ body->param.lead_num = arg_size = (int)args->pre_args_num;
+ if (body->param.lead_num > 0) body->param.flags.has_lead = TRUE;
+ debugs(" - argc: %d\n", body->param.lead_num);
- rest_id = args->rest_arg;
+ rest_id = args->rest_arg;
if (rest_id == NODE_SPECIAL_EXCESSIVE_COMMA) {
- last_comma = 1;
- rest_id = 0;
- }
- block_id = args->block_arg;
-
- if (args->opt_args) {
- const NODE *node = args->opt_args;
- LABEL *label;
- VALUE labels = rb_ary_tmp_new(1);
- VALUE *opt_table;
- int i = 0, j;
-
- while (node) {
- label = NEW_LABEL(nd_line(node));
- rb_ary_push(labels, (VALUE)label | 1);
- ADD_LABEL(optargs, label);
+ last_comma = 1;
+ rest_id = 0;
+ }
+ block_id = args->block_arg;
+
+ if (args->opt_args) {
+ const NODE *node = args->opt_args;
+ LABEL *label;
+ VALUE labels = rb_ary_hidden_new(1);
+ VALUE *opt_table;
+ int i = 0, j;
+
+ while (node) {
+ label = NEW_LABEL(nd_line(node));
+ rb_ary_push(labels, (VALUE)label | 1);
+ ADD_LABEL(optargs, label);
NO_CHECK(COMPILE_POPPED(optargs, "optarg", node->nd_body));
- node = node->nd_next;
- i += 1;
- }
+ node = node->nd_next;
+ i += 1;
+ }
- /* last label */
- label = NEW_LABEL(nd_line(node_args));
- rb_ary_push(labels, (VALUE)label | 1);
- ADD_LABEL(optargs, label);
+ /* last label */
+ label = NEW_LABEL(nd_line(node_args));
+ rb_ary_push(labels, (VALUE)label | 1);
+ ADD_LABEL(optargs, label);
- opt_table = ALLOC_N(VALUE, i+1);
+ opt_table = ALLOC_N(VALUE, i+1);
MEMCPY(opt_table, RARRAY_CONST_PTR_TRANSIENT(labels), VALUE, i+1);
- for (j = 0; j < i+1; j++) {
- opt_table[j] &= ~1;
- }
- rb_ary_clear(labels);
-
- body->param.flags.has_opt = TRUE;
- body->param.opt_num = i;
- body->param.opt_table = opt_table;
- arg_size += i;
- }
-
- if (rest_id) {
- body->param.rest_start = arg_size++;
- body->param.flags.has_rest = TRUE;
- assert(body->param.rest_start != -1);
- }
-
- if (args->first_post_arg) {
- body->param.post_start = arg_size;
- body->param.post_num = args->post_args_num;
- body->param.flags.has_post = TRUE;
- arg_size += args->post_args_num;
-
- if (body->param.flags.has_rest) { /* TODO: why that? */
- body->param.post_start = body->param.rest_start + 1;
- }
- }
-
- if (args->kw_args) {
- arg_size = iseq_set_arguments_keywords(iseq, optargs, args, arg_size);
- }
- else if (args->kw_rest_arg) {
- struct rb_iseq_param_keyword *keyword = ZALLOC_N(struct rb_iseq_param_keyword, 1);
- keyword->rest_start = arg_size++;
- body->param.keyword = keyword;
- body->param.flags.has_kwrest = TRUE;
- }
- else if (args->no_kwarg) {
- body->param.flags.accepts_no_kwarg = TRUE;
- }
-
- if (block_id) {
- body->param.block_start = arg_size++;
- body->param.flags.has_block = TRUE;
- }
-
- iseq_calc_param_size(iseq);
- body->param.size = arg_size;
-
- if (args->pre_init) { /* m_init */
+ for (j = 0; j < i+1; j++) {
+ opt_table[j] &= ~1;
+ }
+ rb_ary_clear(labels);
+
+ body->param.flags.has_opt = TRUE;
+ body->param.opt_num = i;
+ body->param.opt_table = opt_table;
+ arg_size += i;
+ }
+
+ if (rest_id) {
+ body->param.rest_start = arg_size++;
+ body->param.flags.has_rest = TRUE;
+ assert(body->param.rest_start != -1);
+ }
+
+ if (args->first_post_arg) {
+ body->param.post_start = arg_size;
+ body->param.post_num = args->post_args_num;
+ body->param.flags.has_post = TRUE;
+ arg_size += args->post_args_num;
+
+ if (body->param.flags.has_rest) { /* TODO: why that? */
+ body->param.post_start = body->param.rest_start + 1;
+ }
+ }
+
+ if (args->kw_args) {
+ arg_size = iseq_set_arguments_keywords(iseq, optargs, args, arg_size);
+ }
+ else if (args->kw_rest_arg) {
+ struct rb_iseq_param_keyword *keyword = ZALLOC_N(struct rb_iseq_param_keyword, 1);
+ keyword->rest_start = arg_size++;
+ body->param.keyword = keyword;
+ body->param.flags.has_kwrest = TRUE;
+ }
+ else if (args->no_kwarg) {
+ body->param.flags.accepts_no_kwarg = TRUE;
+ }
+
+ if (block_id) {
+ body->param.block_start = arg_size++;
+ body->param.flags.has_block = TRUE;
+ }
+
+ iseq_calc_param_size(iseq);
+ body->param.size = arg_size;
+
+ if (args->pre_init) { /* m_init */
NO_CHECK(COMPILE_POPPED(optargs, "init arguments (m)", args->pre_init));
- }
- if (args->post_init) { /* p_init */
+ }
+ if (args->post_init) { /* p_init */
NO_CHECK(COMPILE_POPPED(optargs, "init arguments (p)", args->post_init));
- }
+ }
- if (body->type == ISEQ_TYPE_BLOCK) {
- if (body->param.flags.has_opt == FALSE &&
- body->param.flags.has_post == FALSE &&
- body->param.flags.has_rest == FALSE &&
- body->param.flags.has_kw == FALSE &&
- body->param.flags.has_kwrest == FALSE) {
+ if (body->type == ISEQ_TYPE_BLOCK) {
+ if (body->param.flags.has_opt == FALSE &&
+ body->param.flags.has_post == FALSE &&
+ body->param.flags.has_rest == FALSE &&
+ body->param.flags.has_kw == FALSE &&
+ body->param.flags.has_kwrest == FALSE) {
- if (body->param.lead_num == 1 && last_comma == 0) {
- /* {|a|} */
- body->param.flags.ambiguous_param0 = TRUE;
- }
- }
- }
+ if (body->param.lead_num == 1 && last_comma == 0) {
+ /* {|a|} */
+ body->param.flags.ambiguous_param0 = TRUE;
+ }
+ }
+ }
}
return COMPILE_OK;
}
static int
-iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl)
+iseq_set_local_table(rb_iseq_t *iseq, const rb_ast_id_table_t *tbl)
{
- unsigned int size;
-
- if (tbl) {
- size = (unsigned int)*tbl;
- tbl++;
- }
- else {
- size = 0;
- }
+ unsigned int size = tbl ? tbl->size : 0;
if (size > 0) {
- ID *ids = (ID *)ALLOC_N(ID, size);
- MEMCPY(ids, tbl, ID, size);
- iseq->body->local_table = ids;
+ ID *ids = (ID *)ALLOC_N(ID, size);
+ MEMCPY(ids, tbl->ids, ID, size);
+ ISEQ_BODY(iseq)->local_table = ids;
}
- iseq->body->local_table_size = size;
+ ISEQ_BODY(iseq)->local_table_size = size;
- debugs("iseq_set_local_table: %u\n", iseq->body->local_table_size);
+ debugs("iseq_set_local_table: %u\n", ISEQ_BODY(iseq)->local_table_size);
return COMPILE_OK;
}
-static int
-cdhash_cmp(VALUE val, VALUE lit)
+int
+rb_iseq_cdhash_cmp(VALUE val, VALUE lit)
{
int tval, tlit;
@@ -1819,13 +2021,26 @@ cdhash_cmp(VALUE val, VALUE lit)
else if (tlit == T_FLOAT) {
return rb_float_cmp(lit, val);
}
+ else if (tlit == T_RATIONAL) {
+ const struct RRational *rat1 = RRATIONAL(val);
+ const struct RRational *rat2 = RRATIONAL(lit);
+ return rb_iseq_cdhash_cmp(rat1->num, rat2->num) || rb_iseq_cdhash_cmp(rat1->den, rat2->den);
+ }
+ else if (tlit == T_COMPLEX) {
+ const struct RComplex *comp1 = RCOMPLEX(val);
+ const struct RComplex *comp2 = RCOMPLEX(lit);
+ return rb_iseq_cdhash_cmp(comp1->real, comp2->real) || rb_iseq_cdhash_cmp(comp1->imag, comp2->imag);
+ }
+ else if (tlit == T_REGEXP) {
+ return rb_reg_equal(val, lit) ? 0 : -1;
+ }
else {
UNREACHABLE_RETURN(-1);
}
}
-static st_index_t
-cdhash_hash(VALUE a)
+st_index_t
+rb_iseq_cdhash_hash(VALUE a)
{
switch (OBJ_BUILTIN_TYPE(a)) {
case -1:
@@ -1837,14 +2052,20 @@ cdhash_hash(VALUE a)
return FIX2LONG(rb_big_hash(a));
case T_FLOAT:
return rb_dbl_long_hash(RFLOAT_VALUE(a));
+ case T_RATIONAL:
+ return rb_rational_hash(a);
+ case T_COMPLEX:
+ return rb_complex_hash(a);
+ case T_REGEXP:
+ return NUM2LONG(rb_reg_hash(a));
default:
UNREACHABLE_RETURN(0);
}
}
static const struct st_hash_type cdhash_type = {
- cdhash_cmp,
- cdhash_hash,
+ rb_iseq_cdhash_cmp,
+ rb_iseq_cdhash_hash,
};
struct cdhash_set_label_struct {
@@ -1866,18 +2087,24 @@ cdhash_set_label_i(VALUE key, VALUE val, VALUE ptr)
static inline VALUE
get_ivar_ic_value(rb_iseq_t *iseq,ID id)
{
+ return INT2FIX(ISEQ_BODY(iseq)->ivc_size++);
+}
+
+static inline VALUE
+get_cvar_ic_value(rb_iseq_t *iseq,ID id)
+{
VALUE val;
struct rb_id_table *tbl = ISEQ_COMPILE_DATA(iseq)->ivar_cache_table;
if (tbl) {
- if (rb_id_table_lookup(tbl,id,&val)) {
- return val;
- }
+ if (rb_id_table_lookup(tbl,id,&val)) {
+ return val;
+ }
}
else {
- tbl = rb_id_table_create(1);
- ISEQ_COMPILE_DATA(iseq)->ivar_cache_table = tbl;
+ tbl = rb_id_table_create(1);
+ ISEQ_COMPILE_DATA(iseq)->ivar_cache_table = tbl;
}
- val = INT2FIX(iseq->body->is_size++);
+ val = INT2FIX(ISEQ_BODY(iseq)->icvarc_size++);
rb_id_table_insert(tbl,id,val);
return val;
}
@@ -1898,103 +2125,113 @@ fix_sp_depth(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
LINK_ELEMENT *list;
for (list = FIRST_ELEMENT(anchor); list; list = list->next) {
- if (list->type == ISEQ_ELEMENT_LABEL) {
- LABEL *lobj = (LABEL *)list;
- lobj->set = TRUE;
- }
+ if (IS_LABEL(list)) {
+ LABEL *lobj = (LABEL *)list;
+ lobj->set = TRUE;
+ }
}
for (list = FIRST_ELEMENT(anchor); list; list = list->next) {
- switch (list->type) {
- case ISEQ_ELEMENT_INSN:
- {
- int j, len, insn;
- const char *types;
- VALUE *operands;
- INSN *iobj = (INSN *)list;
-
- /* update sp */
- sp = calc_sp_depth(sp, iobj);
- if (sp < 0) {
- BADINSN_DUMP(anchor, list, NULL);
- COMPILE_ERROR(iseq, iobj->insn_info.line_no,
- "argument stack underflow (%d)", sp);
- return -1;
- }
- if (sp > stack_max) {
- stack_max = sp;
- }
-
- line = iobj->insn_info.line_no;
- /* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */
- operands = iobj->operands;
- insn = iobj->insn_id;
- types = insn_op_types(insn);
- len = insn_len(insn);
-
- /* operand check */
- if (iobj->operand_size != len - 1) {
- /* printf("operand size miss! (%d, %d)\n", iobj->operand_size, len); */
- BADINSN_DUMP(anchor, list, NULL);
- COMPILE_ERROR(iseq, iobj->insn_info.line_no,
- "operand size miss! (%d for %d)",
- iobj->operand_size, len - 1);
- return -1;
- }
-
- for (j = 0; types[j]; j++) {
- if (types[j] == TS_OFFSET) {
- /* label(destination position) */
- LABEL *lobj = (LABEL *)operands[j];
- if (!lobj->set) {
- BADINSN_DUMP(anchor, list, NULL);
- COMPILE_ERROR(iseq, iobj->insn_info.line_no,
- "unknown label: "LABEL_FORMAT, lobj->label_no);
- return -1;
- }
- if (lobj->sp == -1) {
- lobj->sp = sp;
- }
- }
- }
- break;
- }
- case ISEQ_ELEMENT_LABEL:
- {
- LABEL *lobj = (LABEL *)list;
- if (lobj->sp == -1) {
- lobj->sp = sp;
- }
- else {
- sp = lobj->sp;
- }
- break;
- }
- case ISEQ_ELEMENT_TRACE:
- {
- /* ignore */
- break;
- }
- case ISEQ_ELEMENT_ADJUST:
- {
- ADJUST *adjust = (ADJUST *)list;
- int orig_sp = sp;
-
- sp = adjust->label ? adjust->label->sp : 0;
- if (adjust->line_no != -1 && orig_sp - sp < 0) {
- BADINSN_DUMP(anchor, list, NULL);
- COMPILE_ERROR(iseq, adjust->line_no,
- "iseq_set_sequence: adjust bug %d < %d",
- orig_sp, sp);
- return -1;
- }
- break;
- }
- default:
- BADINSN_DUMP(anchor, list, NULL);
- COMPILE_ERROR(iseq, line, "unknown list type: %d", list->type);
- return -1;
- }
+ switch (list->type) {
+ case ISEQ_ELEMENT_INSN:
+ {
+ int j, len, insn;
+ const char *types;
+ VALUE *operands;
+ INSN *iobj = (INSN *)list;
+
+ /* update sp */
+ sp = calc_sp_depth(sp, iobj);
+ if (sp < 0) {
+ BADINSN_DUMP(anchor, list, NULL);
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "argument stack underflow (%d)", sp);
+ return -1;
+ }
+ if (sp > stack_max) {
+ stack_max = sp;
+ }
+
+ line = iobj->insn_info.line_no;
+ /* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */
+ operands = iobj->operands;
+ insn = iobj->insn_id;
+ types = insn_op_types(insn);
+ len = insn_len(insn);
+
+ /* operand check */
+ if (iobj->operand_size != len - 1) {
+ /* printf("operand size miss! (%d, %d)\n", iobj->operand_size, len); */
+ BADINSN_DUMP(anchor, list, NULL);
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "operand size miss! (%d for %d)",
+ iobj->operand_size, len - 1);
+ return -1;
+ }
+
+ for (j = 0; types[j]; j++) {
+ if (types[j] == TS_OFFSET) {
+ /* label(destination position) */
+ LABEL *lobj = (LABEL *)operands[j];
+ if (!lobj->set) {
+ BADINSN_DUMP(anchor, list, NULL);
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "unknown label: "LABEL_FORMAT, lobj->label_no);
+ return -1;
+ }
+ if (lobj->sp == -1) {
+ lobj->sp = sp;
+ }
+ else if (lobj->sp != sp) {
+ debugs("%s:%d: sp inconsistency found but ignored (" LABEL_FORMAT " sp: %d, calculated sp: %d)\n",
+ RSTRING_PTR(rb_iseq_path(iseq)), line,
+ lobj->label_no, lobj->sp, sp);
+ }
+ }
+ }
+ break;
+ }
+ case ISEQ_ELEMENT_LABEL:
+ {
+ LABEL *lobj = (LABEL *)list;
+ if (lobj->sp == -1) {
+ lobj->sp = sp;
+ }
+ else {
+ if (lobj->sp != sp) {
+ debugs("%s:%d: sp inconsistency found but ignored (" LABEL_FORMAT " sp: %d, calculated sp: %d)\n",
+ RSTRING_PTR(rb_iseq_path(iseq)), line,
+ lobj->label_no, lobj->sp, sp);
+ }
+ sp = lobj->sp;
+ }
+ break;
+ }
+ case ISEQ_ELEMENT_TRACE:
+ {
+ /* ignore */
+ break;
+ }
+ case ISEQ_ELEMENT_ADJUST:
+ {
+ ADJUST *adjust = (ADJUST *)list;
+ int orig_sp = sp;
+
+ sp = adjust->label ? adjust->label->sp : 0;
+ if (adjust->line_no != -1 && orig_sp - sp < 0) {
+ BADINSN_DUMP(anchor, list, NULL);
+ COMPILE_ERROR(iseq, adjust->line_no,
+ "iseq_set_sequence: adjust bug %d < %d",
+ orig_sp, sp);
+ return -1;
+ }
+ break;
+ }
+ default:
+ BADINSN_DUMP(anchor, list, NULL);
+ COMPILE_ERROR(iseq, line, "unknown list type: %d", list->type);
+ return -1;
+ }
}
return stack_max;
}
@@ -2005,8 +2242,14 @@ add_insn_info(struct iseq_insn_info_entry *insns_info, unsigned int *positions,
{
if (insns_info_index == 0 ||
insns_info[insns_info_index-1].line_no != iobj->insn_info.line_no ||
+#ifdef USE_ISEQ_NODE_ID
+ insns_info[insns_info_index-1].node_id != iobj->insn_info.node_id ||
+#endif
insns_info[insns_info_index-1].events != iobj->insn_info.events) {
insns_info[insns_info_index].line_no = iobj->insn_info.line_no;
+#ifdef USE_ISEQ_NODE_ID
+ insns_info[insns_info_index].node_id = iobj->insn_info.node_id;
+#endif
insns_info[insns_info_index].events = iobj->insn_info.events;
positions[insns_info_index] = code_index;
return TRUE;
@@ -2018,14 +2261,34 @@ static int
add_adjust_info(struct iseq_insn_info_entry *insns_info, unsigned int *positions,
int insns_info_index, int code_index, const ADJUST *adjust)
{
- if (insns_info_index > 0 ||
- insns_info[insns_info_index-1].line_no != adjust->line_no) {
- insns_info[insns_info_index].line_no = adjust->line_no;
- insns_info[insns_info_index].events = 0;
- positions[insns_info_index] = code_index;
- return TRUE;
+ insns_info[insns_info_index].line_no = adjust->line_no;
+ insns_info[insns_info_index].events = 0;
+ positions[insns_info_index] = code_index;
+ return TRUE;
+}
+
+static ID *
+array_to_idlist(VALUE arr)
+{
+ RUBY_ASSERT(RB_TYPE_P(arr, T_ARRAY));
+ long size = RARRAY_LEN(arr);
+ ID *ids = (ID *)ALLOC_N(ID, size + 1);
+ for (int i = 0; i < size; i++) {
+ VALUE sym = RARRAY_AREF(arr, i);
+ ids[i] = SYM2ID(sym);
}
- return FALSE;
+ ids[size] = 0;
+ return ids;
+}
+
+static VALUE
+idlist_to_array(const ID *ids)
+{
+ VALUE arr = rb_ary_new();
+ while (*ids) {
+ rb_ary_push(arr, ID2SYM(*ids++));
+ }
+ return arr;
}
/**
@@ -2035,7 +2298,7 @@ static int
iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
{
struct iseq_insn_info_entry *insns_info;
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
unsigned int *positions;
LINK_ELEMENT *list;
VALUE *generated_iseq;
@@ -2050,20 +2313,20 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
/* fix label position */
insn_num = code_index = 0;
for (list = FIRST_ELEMENT(anchor); list; list = list->next) {
- switch (list->type) {
- case ISEQ_ELEMENT_INSN:
- {
- INSN *iobj = (INSN *)list;
- /* update sp */
- sp = calc_sp_depth(sp, iobj);
- insn_num++;
+ switch (list->type) {
+ case ISEQ_ELEMENT_INSN:
+ {
+ INSN *iobj = (INSN *)list;
+ /* update sp */
+ sp = calc_sp_depth(sp, iobj);
+ insn_num++;
events = iobj->insn_info.events |= events;
if (ISEQ_COVERAGE(iseq)) {
if (ISEQ_LINE_COVERAGE(iseq) && (events & RUBY_EVENT_COVERAGE_LINE) &&
!(rb_get_coverage_mode() & COVERAGE_TARGET_ONESHOT_LINES)) {
- int line = iobj->insn_info.line_no;
- if (line >= 1) {
- RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line - 1, INT2FIX(0));
+ int line = iobj->insn_info.line_no - 1;
+ if (line >= 0 && line < RARRAY_LEN(ISEQ_LINE_COVERAGE(iseq))) {
+ RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line, INT2FIX(0));
}
}
if (ISEQ_BRANCH_COVERAGE(iseq) && (events & RUBY_EVENT_COVERAGE_BRANCH)) {
@@ -2072,239 +2335,298 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
}
RARRAY_ASET(ISEQ_PC2BRANCHINDEX(iseq), code_index, INT2FIX(data));
}
- }
+ }
code_index += insn_data_length(iobj);
- events = 0;
+ events = 0;
data = 0;
- break;
- }
- case ISEQ_ELEMENT_LABEL:
- {
- LABEL *lobj = (LABEL *)list;
- lobj->position = code_index;
- sp = lobj->sp;
- break;
- }
- case ISEQ_ELEMENT_TRACE:
- {
- TRACE *trace = (TRACE *)list;
- events |= trace->event;
+ break;
+ }
+ case ISEQ_ELEMENT_LABEL:
+ {
+ LABEL *lobj = (LABEL *)list;
+ lobj->position = code_index;
+ if (lobj->sp != sp) {
+ debugs("%s: sp inconsistency found but ignored (" LABEL_FORMAT " sp: %d, calculated sp: %d)\n",
+ RSTRING_PTR(rb_iseq_path(iseq)),
+ lobj->label_no, lobj->sp, sp);
+ }
+ sp = lobj->sp;
+ break;
+ }
+ case ISEQ_ELEMENT_TRACE:
+ {
+ TRACE *trace = (TRACE *)list;
+ events |= trace->event;
if (trace->event & RUBY_EVENT_COVERAGE_BRANCH) data = trace->data;
- break;
- }
- case ISEQ_ELEMENT_ADJUST:
- {
- ADJUST *adjust = (ADJUST *)list;
- if (adjust->line_no != -1) {
- int orig_sp = sp;
- sp = adjust->label ? adjust->label->sp : 0;
- if (orig_sp - sp > 0) {
- if (orig_sp - sp > 1) code_index++; /* 1 operand */
- code_index++; /* insn */
- insn_num++;
- }
- }
- break;
- }
- default: break;
- }
+ break;
+ }
+ case ISEQ_ELEMENT_ADJUST:
+ {
+ ADJUST *adjust = (ADJUST *)list;
+ if (adjust->line_no != -1) {
+ int orig_sp = sp;
+ sp = adjust->label ? adjust->label->sp : 0;
+ if (orig_sp - sp > 0) {
+ if (orig_sp - sp > 1) code_index++; /* 1 operand */
+ code_index++; /* insn */
+ insn_num++;
+ }
+ }
+ break;
+ }
+ default: break;
+ }
}
/* make instruction sequence */
generated_iseq = ALLOC_N(VALUE, code_index);
insns_info = ALLOC_N(struct iseq_insn_info_entry, insn_num);
positions = ALLOC_N(unsigned int, insn_num);
- body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, body->is_size);
- body->call_data =
- rb_xcalloc_mul_add_mul(
- sizeof(struct rb_call_data), body->ci_size,
- sizeof(struct rb_kwarg_call_data), body->ci_kw_size);
- ISEQ_COMPILE_DATA(iseq)->ci_index = ISEQ_COMPILE_DATA(iseq)->ci_kw_index = 0;
+ body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, ISEQ_IS_SIZE(body));
+ body->call_data = ZALLOC_N(struct rb_call_data, body->ci_size);
+ ISEQ_COMPILE_DATA(iseq)->ci_index = 0;
+
+ // Calculate the bitmask buffer size.
+ // Round the generated_iseq size up to the nearest multiple
+ // of the number of bits in an unsigned long.
+
+ // Allocate enough room for the bitmask list
+ iseq_bits_t * mark_offset_bits;
+ int code_size = code_index;
+
+ iseq_bits_t tmp[1] = {0};
+ bool needs_bitmap = false;
+
+ if (ISEQ_MBITS_BUFLEN(code_index) == 1) {
+ mark_offset_bits = tmp;
+ }
+ else {
+ mark_offset_bits = ZALLOC_N(iseq_bits_t, ISEQ_MBITS_BUFLEN(code_index));
+ }
list = FIRST_ELEMENT(anchor);
insns_info_index = code_index = sp = 0;
while (list) {
- switch (list->type) {
- case ISEQ_ELEMENT_INSN:
- {
- int j, len, insn;
- const char *types;
- VALUE *operands;
- INSN *iobj = (INSN *)list;
-
- /* update sp */
- sp = calc_sp_depth(sp, iobj);
- /* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */
- operands = iobj->operands;
- insn = iobj->insn_id;
- generated_iseq[code_index] = insn;
- types = insn_op_types(insn);
- len = insn_len(insn);
-
- for (j = 0; types[j]; j++) {
- char type = types[j];
- /* printf("--> [%c - (%d-%d)]\n", type, k, j); */
- switch (type) {
- case TS_OFFSET:
- {
- /* label(destination position) */
- LABEL *lobj = (LABEL *)operands[j];
- generated_iseq[code_index + 1 + j] = lobj->position - (code_index + len);
- break;
- }
- case TS_CDHASH:
- {
- VALUE map = operands[j];
- struct cdhash_set_label_struct data;
+ switch (list->type) {
+ case ISEQ_ELEMENT_INSN:
+ {
+ int j, len, insn;
+ const char *types;
+ VALUE *operands;
+ INSN *iobj = (INSN *)list;
+
+ /* update sp */
+ sp = calc_sp_depth(sp, iobj);
+ /* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */
+ operands = iobj->operands;
+ insn = iobj->insn_id;
+ generated_iseq[code_index] = insn;
+ types = insn_op_types(insn);
+ len = insn_len(insn);
+
+ for (j = 0; types[j]; j++) {
+ char type = types[j];
+
+ /* printf("--> [%c - (%d-%d)]\n", type, k, j); */
+ switch (type) {
+ case TS_OFFSET:
+ {
+ /* label(destination position) */
+ LABEL *lobj = (LABEL *)operands[j];
+ generated_iseq[code_index + 1 + j] = lobj->position - (code_index + len);
+ break;
+ }
+ case TS_CDHASH:
+ {
+ VALUE map = operands[j];
+ struct cdhash_set_label_struct data;
data.hash = map;
data.pos = code_index;
data.len = len;
- rb_hash_foreach(map, cdhash_set_label_i, (VALUE)&data);
-
- rb_hash_rehash(map);
- freeze_hide_obj(map);
- generated_iseq[code_index + 1 + j] = map;
- RB_OBJ_WRITTEN(iseq, Qundef, map);
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
- break;
- }
- case TS_LINDEX:
- case TS_NUM: /* ulong */
- generated_iseq[code_index + 1 + j] = FIX2INT(operands[j]);
- break;
- case TS_VALUE: /* VALUE */
- case TS_ISEQ: /* iseq */
- {
- VALUE v = operands[j];
- generated_iseq[code_index + 1 + j] = v;
- /* to mark ruby object */
- if (!SPECIAL_CONST_P(v)) {
- RB_OBJ_WRITTEN(iseq, Qundef, v);
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
- }
- break;
- }
- case TS_ISE: /* inline storage entry */
- /* Treated as an IC, but may contain a markable VALUE */
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
- /* fall through */
- case TS_IC: /* inline cache */
- case TS_IVC: /* inline ivar cache */
- {
- unsigned int ic_index = FIX2UINT(operands[j]);
- IC ic = (IC)&body->is_entries[ic_index];
- if (UNLIKELY(ic_index >= body->is_size)) {
+ rb_hash_foreach(map, cdhash_set_label_i, (VALUE)&data);
+
+ rb_hash_rehash(map);
+ freeze_hide_obj(map);
+ generated_iseq[code_index + 1 + j] = map;
+ ISEQ_MBITS_SET(mark_offset_bits, code_index + 1 + j);
+ RB_OBJ_WRITTEN(iseq, Qundef, map);
+ needs_bitmap = true;
+ break;
+ }
+ case TS_LINDEX:
+ case TS_NUM: /* ulong */
+ generated_iseq[code_index + 1 + j] = FIX2INT(operands[j]);
+ break;
+ case TS_ISEQ: /* iseq */
+ case TS_VALUE: /* VALUE */
+ {
+ VALUE v = operands[j];
+ generated_iseq[code_index + 1 + j] = v;
+ /* to mark ruby object */
+ if (!SPECIAL_CONST_P(v)) {
+ RB_OBJ_WRITTEN(iseq, Qundef, v);
+ ISEQ_MBITS_SET(mark_offset_bits, code_index + 1 + j);
+ needs_bitmap = true;
+ }
+ break;
+ }
+ /* [ TS_IVC | TS_ICVARC | TS_ISE | TS_IC ] */
+ case TS_IC: /* inline cache: constants */
+ {
+ unsigned int ic_index = ISEQ_COMPILE_DATA(iseq)->ic_index++;
+ IC ic = &ISEQ_IS_ENTRY_START(body, type)[ic_index].ic_cache;
+ if (UNLIKELY(ic_index >= body->ic_size)) {
BADINSN_DUMP(anchor, &iobj->link, 0);
COMPILE_ERROR(iseq, iobj->insn_info.line_no,
"iseq_set_sequence: ic_index overflow: index: %d, size: %d",
- ic_index, body->is_size);
- }
- generated_iseq[code_index + 1 + j] = (VALUE)ic;
- break;
- }
- case TS_CALLDATA:
+ ic_index, ISEQ_IS_SIZE(body));
+ }
+
+ ic->segments = array_to_idlist(operands[j]);
+
+ generated_iseq[code_index + 1 + j] = (VALUE)ic;
+ }
+ break;
+ case TS_IVC: /* inline ivar cache */
{
- struct rb_call_info *source_ci = (struct rb_call_info *)operands[j];
- struct rb_call_data *cd;
-
- if (source_ci->flag & VM_CALL_KWARG) {
- struct rb_kwarg_call_data *kw_calls = (struct rb_kwarg_call_data *)&body->call_data[body->ci_size];
- struct rb_kwarg_call_data *cd_kw = &kw_calls[ISEQ_COMPILE_DATA(iseq)->ci_kw_index++];
- cd_kw->ci_kw = *((struct rb_call_info_with_kwarg *)source_ci);
- cd = (struct rb_call_data *)cd_kw;
- assert(ISEQ_COMPILE_DATA(iseq)->ci_kw_index <= body->ci_kw_size);
+ unsigned int ic_index = FIX2UINT(operands[j]);
+
+ IVC cache = ((IVC)&body->is_entries[ic_index]);
+
+ if (insn == BIN(setinstancevariable)) {
+ cache->iv_set_name = SYM2ID(operands[j - 1]);
}
else {
- cd = &body->call_data[ISEQ_COMPILE_DATA(iseq)->ci_index++];
- cd->ci = *source_ci;
- assert(ISEQ_COMPILE_DATA(iseq)->ci_index <= body->ci_size);
+ cache->iv_set_name = 0;
+ }
+
+ vm_ic_attr_index_initialize(cache, INVALID_SHAPE_ID);
+ }
+ case TS_ISE: /* inline storage entry: `once` insn */
+ case TS_ICVARC: /* inline cvar cache */
+ {
+ unsigned int ic_index = FIX2UINT(operands[j]);
+ IC ic = &ISEQ_IS_ENTRY_START(body, type)[ic_index].ic_cache;
+ if (UNLIKELY(ic_index >= ISEQ_IS_SIZE(body))) {
+ BADINSN_DUMP(anchor, &iobj->link, 0);
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "iseq_set_sequence: ic_index overflow: index: %d, size: %d",
+ ic_index, ISEQ_IS_SIZE(body));
}
+ generated_iseq[code_index + 1 + j] = (VALUE)ic;
+ break;
+ }
+ case TS_CALLDATA:
+ {
+ const struct rb_callinfo *source_ci = (const struct rb_callinfo *)operands[j];
+ struct rb_call_data *cd = &body->call_data[ISEQ_COMPILE_DATA(iseq)->ci_index++];
+ assert(ISEQ_COMPILE_DATA(iseq)->ci_index <= body->ci_size);
+ cd->ci = source_ci;
+ cd->cc = vm_cc_empty();
generated_iseq[code_index + 1 + j] = (VALUE)cd;
break;
}
- case TS_ID: /* ID */
- generated_iseq[code_index + 1 + j] = SYM2ID(operands[j]);
- break;
- case TS_GENTRY:
- {
- struct rb_global_entry *entry =
- (struct rb_global_entry *)(operands[j] & (~1));
- generated_iseq[code_index + 1 + j] = (VALUE)entry;
- }
- break;
- case TS_FUNCPTR:
- generated_iseq[code_index + 1 + j] = operands[j];
- break;
+ case TS_ID: /* ID */
+ generated_iseq[code_index + 1 + j] = SYM2ID(operands[j]);
+ break;
+ case TS_FUNCPTR:
+ generated_iseq[code_index + 1 + j] = operands[j];
+ break;
case TS_BUILTIN:
generated_iseq[code_index + 1 + j] = operands[j];
break;
- default:
- BADINSN_ERROR(iseq, iobj->insn_info.line_no,
- "unknown operand type: %c", type);
- return COMPILE_NG;
- }
- }
- if (add_insn_info(insns_info, positions, insns_info_index, code_index, iobj)) insns_info_index++;
- code_index += len;
- break;
- }
- case ISEQ_ELEMENT_LABEL:
- {
- LABEL *lobj = (LABEL *)list;
- sp = lobj->sp;
- break;
- }
- case ISEQ_ELEMENT_ADJUST:
- {
- ADJUST *adjust = (ADJUST *)list;
- int orig_sp = sp;
-
- if (adjust->label) {
- sp = adjust->label->sp;
- }
- else {
- sp = 0;
- }
-
- if (adjust->line_no != -1) {
- const int diff = orig_sp - sp;
- if (diff > 0) {
- if (add_adjust_info(insns_info, positions, insns_info_index, code_index, adjust)) insns_info_index++;
- }
- if (diff > 1) {
- generated_iseq[code_index++] = BIN(adjuststack);
- generated_iseq[code_index++] = orig_sp - sp;
- }
- else if (diff == 1) {
- generated_iseq[code_index++] = BIN(pop);
- }
- else if (diff < 0) {
- int label_no = adjust->label ? adjust->label->label_no : -1;
- xfree(generated_iseq);
- xfree(insns_info);
- xfree(positions);
- debug_list(anchor);
- COMPILE_ERROR(iseq, adjust->line_no,
- "iseq_set_sequence: adjust bug to %d %d < %d",
- label_no, orig_sp, sp);
- return COMPILE_NG;
- }
- }
- break;
- }
- default:
- /* ignore */
- break;
- }
- list = list->next;
+ default:
+ BADINSN_ERROR(iseq, iobj->insn_info.line_no,
+ "unknown operand type: %c", type);
+ return COMPILE_NG;
+ }
+ }
+ if (add_insn_info(insns_info, positions, insns_info_index, code_index, iobj)) insns_info_index++;
+ code_index += len;
+ break;
+ }
+ case ISEQ_ELEMENT_LABEL:
+ {
+ LABEL *lobj = (LABEL *)list;
+ if (lobj->sp != sp) {
+ debugs("%s: sp inconsistency found but ignored (" LABEL_FORMAT " sp: %d, calculated sp: %d)\n",
+ RSTRING_PTR(rb_iseq_path(iseq)),
+ lobj->label_no, lobj->sp, sp);
+ }
+ sp = lobj->sp;
+ break;
+ }
+ case ISEQ_ELEMENT_ADJUST:
+ {
+ ADJUST *adjust = (ADJUST *)list;
+ int orig_sp = sp;
+
+ if (adjust->label) {
+ sp = adjust->label->sp;
+ }
+ else {
+ sp = 0;
+ }
+
+ if (adjust->line_no != -1) {
+ const int diff = orig_sp - sp;
+ if (diff > 0) {
+ if (insns_info_index == 0) {
+ COMPILE_ERROR(iseq, adjust->line_no,
+ "iseq_set_sequence: adjust bug (ISEQ_ELEMENT_ADJUST must not be the first in iseq)");
+ }
+ if (add_adjust_info(insns_info, positions, insns_info_index, code_index, adjust)) insns_info_index++;
+ }
+ if (diff > 1) {
+ generated_iseq[code_index++] = BIN(adjuststack);
+ generated_iseq[code_index++] = orig_sp - sp;
+ }
+ else if (diff == 1) {
+ generated_iseq[code_index++] = BIN(pop);
+ }
+ else if (diff < 0) {
+ int label_no = adjust->label ? adjust->label->label_no : -1;
+ xfree(generated_iseq);
+ xfree(insns_info);
+ xfree(positions);
+ if (ISEQ_MBITS_BUFLEN(code_size) > 1) {
+ xfree(mark_offset_bits);
+ }
+ debug_list(anchor, list);
+ COMPILE_ERROR(iseq, adjust->line_no,
+ "iseq_set_sequence: adjust bug to %d %d < %d",
+ label_no, orig_sp, sp);
+ return COMPILE_NG;
+ }
+ }
+ break;
+ }
+ default:
+ /* ignore */
+ break;
+ }
+ list = list->next;
}
body->iseq_encoded = (void *)generated_iseq;
body->iseq_size = code_index;
body->stack_max = stack_max;
+ if (ISEQ_MBITS_BUFLEN(body->iseq_size) == 1) {
+ body->mark_bits.single = mark_offset_bits[0];
+ }
+ else {
+ if (needs_bitmap) {
+ body->mark_bits.list = mark_offset_bits;
+ }
+ else {
+ body->mark_bits.list = 0;
+ ruby_xfree(mark_offset_bits);
+ }
+ }
+
/* get rid of memory leak when REALLOC failed */
body->insns_info.body = insns_info;
body->insns_info.positions = positions;
@@ -2337,48 +2659,49 @@ iseq_set_exception_table(rb_iseq_t *iseq)
unsigned int tlen, i;
struct iseq_catch_table_entry *entry;
- if (NIL_P(ISEQ_COMPILE_DATA(iseq)->catch_table_ary)) goto no_catch_table;
- tlen = (int)RARRAY_LEN(ISEQ_COMPILE_DATA(iseq)->catch_table_ary);
- tptr = RARRAY_CONST_PTR_TRANSIENT(ISEQ_COMPILE_DATA(iseq)->catch_table_ary);
+ ISEQ_BODY(iseq)->catch_table = NULL;
+
+ VALUE catch_table_ary = ISEQ_COMPILE_DATA(iseq)->catch_table_ary;
+ if (NIL_P(catch_table_ary)) return COMPILE_OK;
+ tlen = (int)RARRAY_LEN(catch_table_ary);
+ tptr = RARRAY_CONST_PTR_TRANSIENT(catch_table_ary);
if (tlen > 0) {
- struct iseq_catch_table *table = xmalloc(iseq_catch_table_bytes(tlen));
- table->size = tlen;
+ struct iseq_catch_table *table = xmalloc(iseq_catch_table_bytes(tlen));
+ table->size = tlen;
- for (i = 0; i < table->size; i++) {
+ for (i = 0; i < table->size; i++) {
ptr = RARRAY_CONST_PTR_TRANSIENT(tptr[i]);
- entry = UNALIGNED_MEMBER_PTR(table, entries[i]);
- entry->type = (enum catch_type)(ptr[0] & 0xffff);
- entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
- entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
- entry->iseq = (rb_iseq_t *)ptr[3];
- RB_OBJ_WRITTEN(iseq, Qundef, entry->iseq);
-
- /* stack depth */
- if (ptr[4]) {
- LABEL *lobj = (LABEL *)(ptr[4] & ~1);
- entry->cont = label_get_position(lobj);
- entry->sp = label_get_sp(lobj);
-
- /* TODO: Dirty Hack! Fix me */
- if (entry->type == CATCH_TYPE_RESCUE ||
- entry->type == CATCH_TYPE_BREAK ||
- entry->type == CATCH_TYPE_NEXT) {
- entry->sp--;
- }
- }
- else {
- entry->cont = 0;
- }
- }
- iseq->body->catch_table = table;
- RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, 0); /* free */
- }
- else {
- no_catch_table:
- iseq->body->catch_table = NULL;
+ entry = UNALIGNED_MEMBER_PTR(table, entries[i]);
+ entry->type = (enum rb_catch_type)(ptr[0] & 0xffff);
+ entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
+ entry->end = label_get_position((LABEL *)(ptr[2] & ~1));
+ entry->iseq = (rb_iseq_t *)ptr[3];
+ RB_OBJ_WRITTEN(iseq, Qundef, entry->iseq);
+
+ /* stack depth */
+ if (ptr[4]) {
+ LABEL *lobj = (LABEL *)(ptr[4] & ~1);
+ entry->cont = label_get_position(lobj);
+ entry->sp = label_get_sp(lobj);
+
+ /* TODO: Dirty Hack! Fix me */
+ if (entry->type == CATCH_TYPE_RESCUE ||
+ entry->type == CATCH_TYPE_BREAK ||
+ entry->type == CATCH_TYPE_NEXT) {
+ entry->sp--;
+ }
+ }
+ else {
+ entry->cont = 0;
+ }
+ }
+ ISEQ_BODY(iseq)->catch_table = table;
+ RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, 0); /* free */
}
+ RB_GC_GUARD(catch_table_ary);
+
return COMPILE_OK;
}
@@ -2395,12 +2718,12 @@ static int
iseq_set_optargs_table(rb_iseq_t *iseq)
{
int i;
- VALUE *opt_table = (VALUE *)iseq->body->param.opt_table;
+ VALUE *opt_table = (VALUE *)ISEQ_BODY(iseq)->param.opt_table;
- if (iseq->body->param.flags.has_opt) {
- for (i = 0; i < iseq->body->param.opt_num + 1; i++) {
- opt_table[i] = label_get_position((LABEL *)opt_table[i]);
- }
+ if (ISEQ_BODY(iseq)->param.flags.has_opt) {
+ for (i = 0; i < ISEQ_BODY(iseq)->param.opt_num + 1; i++) {
+ opt_table[i] = label_get_position((LABEL *)opt_table[i]);
+ }
}
return COMPILE_OK;
}
@@ -2414,27 +2737,27 @@ get_destination_insn(INSN *iobj)
list = lobj->link.next;
while (list) {
- switch (list->type) {
- case ISEQ_ELEMENT_INSN:
- case ISEQ_ELEMENT_ADJUST:
- goto found;
- case ISEQ_ELEMENT_LABEL:
- /* ignore */
- break;
- case ISEQ_ELEMENT_TRACE:
- {
- TRACE *trace = (TRACE *)list;
- events |= trace->event;
- }
- break;
- default: break;
- }
- list = list->next;
+ switch (list->type) {
+ case ISEQ_ELEMENT_INSN:
+ case ISEQ_ELEMENT_ADJUST:
+ goto found;
+ case ISEQ_ELEMENT_LABEL:
+ /* ignore */
+ break;
+ case ISEQ_ELEMENT_TRACE:
+ {
+ TRACE *trace = (TRACE *)list;
+ events |= trace->event;
+ }
+ break;
+ default: break;
+ }
+ list = list->next;
}
found:
if (list && IS_INSN(list)) {
- INSN *iobj = (INSN *)list;
- iobj->insn_info.events |= events;
+ INSN *iobj = (INSN *)list;
+ iobj->insn_info.events |= events;
}
return list;
}
@@ -2445,10 +2768,10 @@ get_next_insn(INSN *iobj)
LINK_ELEMENT *list = iobj->link.next;
while (list) {
- if (IS_INSN(list) || IS_ADJUST(list)) {
- return list;
- }
- list = list->next;
+ if (IS_INSN(list) || IS_ADJUST(list)) {
+ return list;
+ }
+ list = list->next;
}
return 0;
}
@@ -2459,10 +2782,10 @@ get_prev_insn(INSN *iobj)
LINK_ELEMENT *list = iobj->link.prev;
while (list) {
- if (IS_INSN(list) || IS_ADJUST(list)) {
- return list;
- }
- list = list->prev;
+ if (IS_INSN(list) || IS_ADJUST(list)) {
+ return list;
+ }
+ list = list->prev;
}
return 0;
}
@@ -2492,9 +2815,9 @@ find_destination(INSN *i)
{
int pos, len = insn_len(i->insn_id);
for (pos = 0; pos < len; ++pos) {
- if (insn_op_types(i->insn_id)[pos] == TS_OFFSET) {
- return (LABEL *)OPERAND_AT(i, pos);
- }
+ if (insn_op_types(i->insn_id)[pos] == TS_OFFSET) {
+ return (LABEL *)OPERAND_AT(i, pos);
+ }
}
return 0;
}
@@ -2510,56 +2833,51 @@ remove_unreachable_chunk(rb_iseq_t *iseq, LINK_ELEMENT *i)
MEMZERO(unref_counts, int, nlabels);
end = i;
do {
- LABEL *lab;
- if (IS_INSN(i)) {
- if (IS_INSN_ID(i, leave)) {
- end = i;
- break;
- }
- else if ((lab = find_destination((INSN *)i)) != 0) {
- if (lab->unremovable) break;
- unref_counts[lab->label_no]++;
- }
- }
- else if (IS_LABEL(i)) {
- lab = (LABEL *)i;
- if (lab->unremovable) return 0;
- if (lab->refcnt > unref_counts[lab->label_no]) {
- if (i == first) return 0;
- break;
- }
- continue;
- }
- else if (IS_TRACE(i)) {
- /* do nothing */
- }
- else if (IS_ADJUST(i)) {
- LABEL *dest = ((ADJUST *)i)->label;
- if (dest && dest->unremovable) return 0;
- }
- end = i;
+ LABEL *lab;
+ if (IS_INSN(i)) {
+ if (IS_INSN_ID(i, leave)) {
+ end = i;
+ break;
+ }
+ else if ((lab = find_destination((INSN *)i)) != 0) {
+ unref_counts[lab->label_no]++;
+ }
+ }
+ else if (IS_LABEL(i)) {
+ lab = (LABEL *)i;
+ if (lab->unremovable) return 0;
+ if (lab->refcnt > unref_counts[lab->label_no]) {
+ if (i == first) return 0;
+ break;
+ }
+ continue;
+ }
+ else if (IS_TRACE(i)) {
+ /* do nothing */
+ }
+ else if (IS_ADJUST(i)) {
+ return 0;
+ }
+ end = i;
} while ((i = i->next) != 0);
i = first;
do {
- if (IS_INSN(i)) {
- struct rb_iseq_constant_body *body = iseq->body;
- VALUE insn = INSN_OF(i);
- int pos, len = insn_len(insn);
- for (pos = 0; pos < len; ++pos) {
- switch (insn_op_types(insn)[pos]) {
- case TS_OFFSET:
- unref_destination((INSN *)i, pos);
- break;
+ if (IS_INSN(i)) {
+ struct rb_iseq_constant_body *body = ISEQ_BODY(iseq);
+ VALUE insn = INSN_OF(i);
+ int pos, len = insn_len(insn);
+ for (pos = 0; pos < len; ++pos) {
+ switch (insn_op_types(insn)[pos]) {
+ case TS_OFFSET:
+ unref_destination((INSN *)i, pos);
+ break;
case TS_CALLDATA:
- if (((struct rb_call_info *)OPERAND_AT(i, pos))->flag & VM_CALL_KWARG)
- --(body->ci_kw_size);
- else
- --(body->ci_size);
- break;
- }
- }
- }
- ELEM_REMOVE(i);
+ --(body->ci_size);
+ break;
+ }
+ }
+ }
+ ELEM_REMOVE(i);
} while ((i != end) && (i = i->next) != 0);
return 1;
}
@@ -2569,33 +2887,18 @@ iseq_pop_newarray(rb_iseq_t *iseq, INSN *iobj)
{
switch (OPERAND_AT(iobj, 0)) {
case INT2FIX(0): /* empty array */
- ELEM_REMOVE(&iobj->link);
- return TRUE;
+ ELEM_REMOVE(&iobj->link);
+ return TRUE;
case INT2FIX(1): /* single element array */
- ELEM_REMOVE(&iobj->link);
- return FALSE;
+ ELEM_REMOVE(&iobj->link);
+ return FALSE;
default:
- iobj->insn_id = BIN(adjuststack);
- return TRUE;
+ iobj->insn_id = BIN(adjuststack);
+ return TRUE;
}
}
static int
-same_debug_pos_p(LINK_ELEMENT *iobj1, LINK_ELEMENT *iobj2)
-{
- VALUE debug1 = OPERAND_AT(iobj1, 0);
- VALUE debug2 = OPERAND_AT(iobj2, 0);
- if (debug1 == debug2) return TRUE;
- if (!RB_TYPE_P(debug1, T_ARRAY)) return FALSE;
- if (!RB_TYPE_P(debug2, T_ARRAY)) return FALSE;
- if (RARRAY_LEN(debug1) != 2) return FALSE;
- if (RARRAY_LEN(debug2) != 2) return FALSE;
- if (RARRAY_AREF(debug1, 0) != RARRAY_AREF(debug2, 0)) return FALSE;
- if (RARRAY_AREF(debug1, 1) != RARRAY_AREF(debug2, 1)) return FALSE;
- return TRUE;
-}
-
-static int
is_frozen_putstring(INSN *insn, VALUE *op)
{
if (IS_INSN_ID(insn, putstring)) {
@@ -2633,68 +2936,91 @@ optimize_checktype(rb_iseq_t *iseq, INSN *iobj)
* jump L2
* L2:
*/
- int line;
+ int line, node_id;
INSN *niobj, *ciobj, *dup = 0;
LABEL *dest = 0;
VALUE type;
switch (INSN_OF(iobj)) {
case BIN(putstring):
- type = INT2FIX(T_STRING);
- break;
+ type = INT2FIX(T_STRING);
+ break;
case BIN(putnil):
- type = INT2FIX(T_NIL);
- break;
+ type = INT2FIX(T_NIL);
+ break;
case BIN(putobject):
- type = INT2FIX(TYPE(OPERAND_AT(iobj, 0)));
- break;
+ type = INT2FIX(TYPE(OPERAND_AT(iobj, 0)));
+ break;
default: return FALSE;
}
ciobj = (INSN *)get_next_insn(iobj);
if (IS_INSN_ID(ciobj, jump)) {
- ciobj = (INSN *)get_next_insn((INSN*)OPERAND_AT(ciobj, 0));
+ ciobj = (INSN *)get_next_insn((INSN*)OPERAND_AT(ciobj, 0));
}
if (IS_INSN_ID(ciobj, dup)) {
- ciobj = (INSN *)get_next_insn(dup = ciobj);
+ ciobj = (INSN *)get_next_insn(dup = ciobj);
}
if (!ciobj || !IS_INSN_ID(ciobj, checktype)) return FALSE;
niobj = (INSN *)get_next_insn(ciobj);
if (!niobj) {
- no_branch:
- /* TODO: putobject true/false */
- return FALSE;
+ /* TODO: putobject true/false */
+ return FALSE;
}
switch (INSN_OF(niobj)) {
case BIN(branchif):
- if (OPERAND_AT(ciobj, 0) == type) {
- dest = (LABEL *)OPERAND_AT(niobj, 0);
- }
- break;
+ if (OPERAND_AT(ciobj, 0) == type) {
+ dest = (LABEL *)OPERAND_AT(niobj, 0);
+ }
+ break;
case BIN(branchunless):
- if (OPERAND_AT(ciobj, 0) != type) {
- dest = (LABEL *)OPERAND_AT(niobj, 0);
- }
- break;
+ if (OPERAND_AT(ciobj, 0) != type) {
+ dest = (LABEL *)OPERAND_AT(niobj, 0);
+ }
+ break;
default:
- goto no_branch;
+ return FALSE;
}
line = ciobj->insn_info.line_no;
+ node_id = ciobj->insn_info.node_id;
+ NODE dummy_line_node = generate_dummy_line_node(line, node_id);
if (!dest) {
- if (niobj->link.next && IS_LABEL(niobj->link.next)) {
- dest = (LABEL *)niobj->link.next; /* reuse label */
- }
- else {
- dest = NEW_LABEL(line);
- ELEM_INSERT_NEXT(&niobj->link, &dest->link);
- }
- }
- INSERT_AFTER_INSN1(iobj, line, jump, dest);
+ if (niobj->link.next && IS_LABEL(niobj->link.next)) {
+ dest = (LABEL *)niobj->link.next; /* reuse label */
+ }
+ else {
+ dest = NEW_LABEL(line);
+ ELEM_INSERT_NEXT(&niobj->link, &dest->link);
+ }
+ }
+ INSERT_AFTER_INSN1(iobj, &dummy_line_node, jump, dest);
LABEL_REF(dest);
- if (!dup) INSERT_AFTER_INSN(iobj, line, pop);
+ if (!dup) INSERT_AFTER_INSN(iobj, &dummy_line_node, pop);
return TRUE;
}
+static const struct rb_callinfo *
+ci_flag_set(const rb_iseq_t *iseq, const struct rb_callinfo *ci, unsigned int add)
+{
+ const struct rb_callinfo *nci = vm_ci_new(vm_ci_mid(ci),
+ vm_ci_flag(ci) | add,
+ vm_ci_argc(ci),
+ vm_ci_kwarg(ci));
+ RB_OBJ_WRITTEN(iseq, ci, nci);
+ return nci;
+}
+
+static const struct rb_callinfo *
+ci_argc_set(const rb_iseq_t *iseq, const struct rb_callinfo *ci, int argc)
+{
+ const struct rb_callinfo *nci = vm_ci_new(vm_ci_mid(ci),
+ vm_ci_flag(ci),
+ argc,
+ vm_ci_kwarg(ci));
+ RB_OBJ_WRITTEN(iseq, ci, nci);
+ return nci;
+}
+
static int
iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcallopt)
{
@@ -2705,115 +3031,112 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
if (IS_INSN_ID(iobj, jump)) {
INSN *niobj, *diobj, *piobj;
- diobj = (INSN *)get_destination_insn(iobj);
- niobj = (INSN *)get_next_insn(iobj);
-
- if (diobj == niobj) {
- /*
- * jump LABEL
- * LABEL:
- * =>
- * LABEL:
- */
- unref_destination(iobj, 0);
- ELEM_REMOVE(&iobj->link);
- return COMPILE_OK;
- }
- else if (iobj != diobj && IS_INSN_ID(diobj, jump) &&
- OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) {
- /*
- * useless jump elimination:
- * jump LABEL1
- * ...
- * LABEL1:
- * jump LABEL2
- *
- * => in this case, first jump instruction should jump to
- * LABEL2 directly
- */
- replace_destination(iobj, diobj);
- remove_unreachable_chunk(iseq, iobj->link.next);
- goto again;
- }
+ diobj = (INSN *)get_destination_insn(iobj);
+ niobj = (INSN *)get_next_insn(iobj);
+
+ if (diobj == niobj) {
+ /*
+ * jump LABEL
+ * LABEL:
+ * =>
+ * LABEL:
+ */
+ unref_destination(iobj, 0);
+ ELEM_REMOVE(&iobj->link);
+ return COMPILE_OK;
+ }
+ else if (iobj != diobj && IS_INSN(&diobj->link) &&
+ IS_INSN_ID(diobj, jump) &&
+ OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0) &&
+ diobj->insn_info.events == 0) {
+ /*
+ * useless jump elimination:
+ * jump LABEL1
+ * ...
+ * LABEL1:
+ * jump LABEL2
+ *
+ * => in this case, first jump instruction should jump to
+ * LABEL2 directly
+ */
+ replace_destination(iobj, diobj);
+ remove_unreachable_chunk(iseq, iobj->link.next);
+ goto again;
+ }
else if (IS_INSN_ID(diobj, leave)) {
- INSN *pop;
- /*
- * jump LABEL
- * ...
- * LABEL:
- * leave
- * =>
- * leave
- * pop
- * ...
- * LABEL:
- * leave
- */
- /* replace */
- unref_destination(iobj, 0);
+ /*
+ * jump LABEL
+ * ...
+ * LABEL:
+ * leave
+ * =>
+ * leave
+ * ...
+ * LABEL:
+ * leave
+ */
+ /* replace */
+ unref_destination(iobj, 0);
iobj->insn_id = BIN(leave);
- iobj->operand_size = 0;
- iobj->insn_info = diobj->insn_info;
- /* adjust stack depth */
- pop = new_insn_body(iseq, diobj->insn_info.line_no, BIN(pop), 0);
- ELEM_INSERT_NEXT(&iobj->link, &pop->link);
- goto again;
- }
- else if (IS_INSN(iobj->link.prev) &&
+ iobj->operand_size = 0;
+ iobj->insn_info = diobj->insn_info;
+ goto again;
+ }
+ else if (IS_INSN(iobj->link.prev) &&
(piobj = (INSN *)iobj->link.prev) &&
- (IS_INSN_ID(piobj, branchif) ||
- IS_INSN_ID(piobj, branchunless))) {
- INSN *pdiobj = (INSN *)get_destination_insn(piobj);
- if (niobj == pdiobj) {
- int refcnt = IS_LABEL(piobj->link.next) ?
- ((LABEL *)piobj->link.next)->refcnt : 0;
- /*
- * useless jump elimination (if/unless destination):
- * if L1
- * jump L2
- * L1:
- * ...
- * L2:
- *
- * ==>
- * unless L2
- * L1:
- * ...
- * L2:
- */
- piobj->insn_id = (IS_INSN_ID(piobj, branchif))
- ? BIN(branchunless) : BIN(branchif);
- replace_destination(piobj, iobj);
- if (refcnt <= 1) {
- ELEM_REMOVE(&iobj->link);
- }
- else {
- /* TODO: replace other branch destinations too */
- }
- return COMPILE_OK;
- }
- else if (diobj == pdiobj) {
- /*
- * useless jump elimination (if/unless before jump):
- * L1:
- * ...
- * if L1
- * jump L1
- *
- * ==>
- * L1:
- * ...
- * pop
- * jump L1
- */
- INSN *popiobj = new_insn_core(iseq, iobj->insn_info.line_no,
- BIN(pop), 0, 0);
- ELEM_REPLACE(&piobj->link, &popiobj->link);
- }
- }
- if (remove_unreachable_chunk(iseq, iobj->link.next)) {
- goto again;
- }
+ (IS_INSN_ID(piobj, branchif) ||
+ IS_INSN_ID(piobj, branchunless))) {
+ INSN *pdiobj = (INSN *)get_destination_insn(piobj);
+ if (niobj == pdiobj) {
+ int refcnt = IS_LABEL(piobj->link.next) ?
+ ((LABEL *)piobj->link.next)->refcnt : 0;
+ /*
+ * useless jump elimination (if/unless destination):
+ * if L1
+ * jump L2
+ * L1:
+ * ...
+ * L2:
+ *
+ * ==>
+ * unless L2
+ * L1:
+ * ...
+ * L2:
+ */
+ piobj->insn_id = (IS_INSN_ID(piobj, branchif))
+ ? BIN(branchunless) : BIN(branchif);
+ replace_destination(piobj, iobj);
+ if (refcnt <= 1) {
+ ELEM_REMOVE(&iobj->link);
+ }
+ else {
+ /* TODO: replace other branch destinations too */
+ }
+ return COMPILE_OK;
+ }
+ else if (diobj == pdiobj) {
+ /*
+ * useless jump elimination (if/unless before jump):
+ * L1:
+ * ...
+ * if L1
+ * jump L1
+ *
+ * ==>
+ * L1:
+ * ...
+ * pop
+ * jump L1
+ */
+ NODE dummy_line_node = generate_dummy_line_node(iobj->insn_info.line_no, iobj->insn_info.node_id);
+ INSN *popiobj = new_insn_core(iseq, &dummy_line_node, BIN(pop), 0, 0);
+ ELEM_REPLACE(&piobj->link, &popiobj->link);
+ }
+ }
+ if (remove_unreachable_chunk(iseq, iobj->link.next)) {
+ goto again;
+ }
}
/*
@@ -2825,43 +3148,58 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
*
* putobject "beg".."end"
*/
- if (IS_INSN_ID(iobj, checkmatch)) {
- INSN *range = (INSN *)get_prev_insn(iobj);
+ if (IS_INSN_ID(iobj, newrange)) {
+ INSN *const range = iobj;
INSN *beg, *end;
VALUE str_beg, str_end;
- if (range && IS_INSN_ID(range, newrange) &&
- (end = (INSN *)get_prev_insn(range)) != 0 &&
+ if ((end = (INSN *)get_prev_insn(range)) != 0 &&
is_frozen_putstring(end, &str_end) &&
(beg = (INSN *)get_prev_insn(end)) != 0 &&
is_frozen_putstring(beg, &str_beg)) {
- int excl = FIX2INT(OPERAND_AT(range, 0));
- VALUE lit_range = rb_range_new(str_beg, str_end, excl);
-
- ELEM_REMOVE(&beg->link);
- ELEM_REMOVE(&end->link);
- range->insn_id = BIN(putobject);
- OPERAND_AT(range, 0) = lit_range;
- RB_OBJ_WRITTEN(iseq, Qundef, lit_range);
- }
+ int excl = FIX2INT(OPERAND_AT(range, 0));
+ VALUE lit_range = rb_range_new(str_beg, str_end, excl);
+
+ ELEM_REMOVE(&beg->link);
+ ELEM_REMOVE(&end->link);
+ range->insn_id = BIN(putobject);
+ OPERAND_AT(range, 0) = lit_range;
+ RB_OBJ_WRITTEN(iseq, Qundef, lit_range);
+ }
}
if (IS_INSN_ID(iobj, leave)) {
- remove_unreachable_chunk(iseq, iobj->link.next);
+ remove_unreachable_chunk(iseq, iobj->link.next);
+ }
+
+ /*
+ * ...
+ * duparray [...]
+ * concatarray
+ * =>
+ * ...
+ * putobject [...]
+ * concatarray
+ */
+ if (IS_INSN_ID(iobj, duparray)) {
+ LINK_ELEMENT *next = iobj->link.next;
+ if (IS_INSN(next) && IS_INSN_ID(next, concatarray)) {
+ iobj->insn_id = BIN(putobject);
+ }
}
if (IS_INSN_ID(iobj, branchif) ||
- IS_INSN_ID(iobj, branchnil) ||
- IS_INSN_ID(iobj, branchunless)) {
- /*
- * if L1
- * ...
- * L1:
- * jump L2
- * =>
- * if L2
- */
- INSN *nobj = (INSN *)get_destination_insn(iobj);
+ IS_INSN_ID(iobj, branchnil) ||
+ IS_INSN_ID(iobj, branchunless)) {
+ /*
+ * if L1
+ * ...
+ * L1:
+ * jump L2
+ * =>
+ * if L2
+ */
+ INSN *nobj = (INSN *)get_destination_insn(iobj);
/* This is super nasty hack!!!
*
@@ -2884,9 +3222,10 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* This should be fixed in future.
*/
int stop_optimization =
- ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq) &&
+ ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq) &&
+ nobj->link.type == ISEQ_ELEMENT_INSN &&
nobj->insn_info.events;
- if (!stop_optimization) {
+ if (!stop_optimization) {
INSN *pobj = (INSN *)iobj->link.prev;
int prev_dup = 0;
if (pobj) {
@@ -2897,7 +3236,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
}
for (;;) {
- if (IS_INSN_ID(nobj, jump)) {
+ if (IS_INSN(&nobj->link) && IS_INSN_ID(nobj, jump)) {
replace_destination(iobj, nobj);
}
else if (prev_dup && IS_INSN_ID(nobj, dup) &&
@@ -2970,12 +3309,14 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
ELEM_REMOVE(iobj->link.prev);
}
else if (!iseq_pop_newarray(iseq, pobj)) {
- pobj = new_insn_core(iseq, pobj->insn_info.line_no, BIN(pop), 0, NULL);
+ NODE dummy_line_node = generate_dummy_line_node(pobj->insn_info.line_no, pobj->insn_info.node_id);
+ pobj = new_insn_core(iseq, &dummy_line_node, BIN(pop), 0, NULL);
ELEM_INSERT_PREV(&iobj->link, &pobj->link);
}
if (cond) {
if (prev_dup) {
- pobj = new_insn_core(iseq, pobj->insn_info.line_no, BIN(putnil), 0, NULL);
+ NODE dummy_line_node = generate_dummy_line_node(pobj->insn_info.line_no, pobj->insn_info.node_id);
+ pobj = new_insn_core(iseq, &dummy_line_node, BIN(putnil), 0, NULL);
ELEM_INSERT_NEXT(&iobj->link, &pobj->link);
}
iobj->insn_id = BIN(jump);
@@ -2994,255 +3335,344 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
}
if (IS_INSN_ID(iobj, pop)) {
- /*
- * putself / putnil / putobject obj / putstring "..."
- * pop
- * =>
- * # do nothing
- */
- LINK_ELEMENT *prev = iobj->link.prev;
- if (IS_INSN(prev)) {
- enum ruby_vminsn_type previ = ((INSN *)prev)->insn_id;
- if (previ == BIN(putobject) || previ == BIN(putnil) ||
- previ == BIN(putself) || previ == BIN(putstring) ||
- previ == BIN(dup) ||
- previ == BIN(getlocal) ||
- previ == BIN(getblockparam) ||
- previ == BIN(getblockparamproxy) ||
- /* getinstancevariable may issue a warning */
- previ == BIN(duparray)) {
- /* just push operand or static value and pop soon, no
- * side effects */
- ELEM_REMOVE(prev);
- ELEM_REMOVE(&iobj->link);
- }
- else if (previ == BIN(newarray) && iseq_pop_newarray(iseq, (INSN*)prev)) {
- ELEM_REMOVE(&iobj->link);
- }
- else if (previ == BIN(concatarray)) {
- INSN *piobj = (INSN *)prev;
- INSERT_BEFORE_INSN1(piobj, piobj->insn_info.line_no, splatarray, Qfalse);
- INSN_OF(piobj) = BIN(pop);
- }
- else if (previ == BIN(concatstrings)) {
- if (OPERAND_AT(prev, 0) == INT2FIX(1)) {
- ELEM_REMOVE(prev);
- }
- else {
- ELEM_REMOVE(&iobj->link);
- INSN_OF(prev) = BIN(adjuststack);
- }
- }
- }
+ /*
+ * putself / putnil / putobject obj / putstring "..."
+ * pop
+ * =>
+ * # do nothing
+ */
+ LINK_ELEMENT *prev = iobj->link.prev;
+ if (IS_INSN(prev)) {
+ enum ruby_vminsn_type previ = ((INSN *)prev)->insn_id;
+ if (previ == BIN(putobject) || previ == BIN(putnil) ||
+ previ == BIN(putself) || previ == BIN(putstring) ||
+ previ == BIN(dup) ||
+ previ == BIN(getlocal) ||
+ previ == BIN(getblockparam) ||
+ previ == BIN(getblockparamproxy) ||
+ /* getinstancevariable may issue a warning */
+ previ == BIN(duparray)) {
+ /* just push operand or static value and pop soon, no
+ * side effects */
+ ELEM_REMOVE(prev);
+ ELEM_REMOVE(&iobj->link);
+ }
+ else if (previ == BIN(newarray) && iseq_pop_newarray(iseq, (INSN*)prev)) {
+ ELEM_REMOVE(&iobj->link);
+ }
+ else if (previ == BIN(concatarray)) {
+ INSN *piobj = (INSN *)prev;
+ NODE dummy_line_node = generate_dummy_line_node(piobj->insn_info.line_no, piobj->insn_info.node_id);
+ INSERT_BEFORE_INSN1(piobj, &dummy_line_node, splatarray, Qfalse);
+ INSN_OF(piobj) = BIN(pop);
+ }
+ else if (previ == BIN(concatstrings)) {
+ if (OPERAND_AT(prev, 0) == INT2FIX(1)) {
+ ELEM_REMOVE(prev);
+ }
+ else {
+ ELEM_REMOVE(&iobj->link);
+ INSN_OF(prev) = BIN(adjuststack);
+ }
+ }
+ }
}
if (IS_INSN_ID(iobj, newarray) ||
- IS_INSN_ID(iobj, duparray) ||
- IS_INSN_ID(iobj, expandarray) ||
- IS_INSN_ID(iobj, concatarray) ||
- IS_INSN_ID(iobj, splatarray) ||
- 0) {
- /*
- * newarray N
- * splatarray
- * =>
- * newarray N
- * newarray always puts an array
- */
- LINK_ELEMENT *next = iobj->link.next;
- if (IS_INSN(next) && IS_INSN_ID(next, splatarray)) {
- /* remove splatarray following always-array insn */
- ELEM_REMOVE(next);
- }
- }
-
- if (IS_INSN_ID(iobj, tostring)) {
- LINK_ELEMENT *next = iobj->link.next;
- /*
- * tostring
- * concatstrings 1
- * =>
- * tostring
- */
- if (IS_INSN(next) && IS_INSN_ID(next, concatstrings) &&
- OPERAND_AT(next, 0) == INT2FIX(1)) {
- ELEM_REMOVE(next);
- }
+ IS_INSN_ID(iobj, duparray) ||
+ IS_INSN_ID(iobj, expandarray) ||
+ IS_INSN_ID(iobj, concatarray) ||
+ IS_INSN_ID(iobj, splatarray) ||
+ 0) {
+ /*
+ * newarray N
+ * splatarray
+ * =>
+ * newarray N
+ * newarray always puts an array
+ */
+ LINK_ELEMENT *next = iobj->link.next;
+ if (IS_INSN(next) && IS_INSN_ID(next, splatarray)) {
+ /* remove splatarray following always-array insn */
+ ELEM_REMOVE(next);
+ }
+ }
+
+ if (IS_INSN_ID(iobj, newarray)) {
+ LINK_ELEMENT *next = iobj->link.next;
+ if (IS_INSN(next) && IS_INSN_ID(next, expandarray) &&
+ OPERAND_AT(next, 1) == INT2FIX(0)) {
+ VALUE op1, op2;
+ op1 = OPERAND_AT(iobj, 0);
+ op2 = OPERAND_AT(next, 0);
+ ELEM_REMOVE(next);
+
+ if (op1 == op2) {
+ /*
+ * newarray 2
+ * expandarray 2, 0
+ * =>
+ * swap
+ */
+ if (op1 == INT2FIX(2)) {
+ INSN_OF(iobj) = BIN(swap);
+ iobj->operand_size = 0;
+ }
+ /*
+ * newarray X
+ * expandarray X, 0
+ * =>
+ * opt_reverse X
+ */
+ else {
+ INSN_OF(iobj) = BIN(opt_reverse);
+ }
+ }
+ else {
+ NODE dummy_line_node = generate_dummy_line_node(iobj->insn_info.line_no, iobj->insn_info.node_id);
+ long diff = FIX2LONG(op1) - FIX2LONG(op2);
+ INSN_OF(iobj) = BIN(opt_reverse);
+ OPERAND_AT(iobj, 0) = OPERAND_AT(next, 0);
+
+ if (op1 > op2) {
+ /* X > Y
+ * newarray X
+ * expandarray Y, 0
+ * =>
+ * pop * (Y-X)
+ * opt_reverse Y
+ */
+ for (; diff > 0; diff--) {
+ INSERT_BEFORE_INSN(iobj, &dummy_line_node, pop);
+ }
+ }
+ else { /* (op1 < op2) */
+ /* X < Y
+ * newarray X
+ * expandarray Y, 0
+ * =>
+ * putnil * (Y-X)
+ * opt_reverse Y
+ */
+ for (; diff < 0; diff++) {
+ INSERT_BEFORE_INSN(iobj, &dummy_line_node, putnil);
+ }
+ }
+ }
+ }
+ }
+
+ if (IS_INSN_ID(iobj, duparray)) {
+ LINK_ELEMENT *next = iobj->link.next;
+ /*
+ * duparray obj
+ * expandarray X, 0
+ * =>
+ * putobject obj
+ * expandarray X, 0
+ */
+ if (IS_INSN(next) && IS_INSN_ID(next, expandarray)) {
+ INSN_OF(iobj) = BIN(putobject);
+ }
+ }
+
+ if (IS_INSN_ID(iobj, anytostring)) {
+ LINK_ELEMENT *next = iobj->link.next;
+ /*
+ * anytostring
+ * concatstrings 1
+ * =>
+ * anytostring
+ */
+ if (IS_INSN(next) && IS_INSN_ID(next, concatstrings) &&
+ OPERAND_AT(next, 0) == INT2FIX(1)) {
+ ELEM_REMOVE(next);
+ }
}
if (IS_INSN_ID(iobj, putstring) ||
- (IS_INSN_ID(iobj, putobject) && RB_TYPE_P(OPERAND_AT(iobj, 0), T_STRING))) {
- /*
- * putstring ""
- * concatstrings N
- * =>
- * concatstrings N-1
- */
- if (IS_NEXT_INSN_ID(&iobj->link, concatstrings) &&
- RSTRING_LEN(OPERAND_AT(iobj, 0)) == 0) {
- INSN *next = (INSN *)iobj->link.next;
- if ((OPERAND_AT(next, 0) = FIXNUM_INC(OPERAND_AT(next, 0), -1)) == INT2FIX(1)) {
- ELEM_REMOVE(&next->link);
- }
- ELEM_REMOVE(&iobj->link);
- }
+ (IS_INSN_ID(iobj, putobject) && RB_TYPE_P(OPERAND_AT(iobj, 0), T_STRING))) {
+ /*
+ * putstring ""
+ * concatstrings N
+ * =>
+ * concatstrings N-1
+ */
+ if (IS_NEXT_INSN_ID(&iobj->link, concatstrings) &&
+ RSTRING_LEN(OPERAND_AT(iobj, 0)) == 0) {
+ INSN *next = (INSN *)iobj->link.next;
+ if ((OPERAND_AT(next, 0) = FIXNUM_INC(OPERAND_AT(next, 0), -1)) == INT2FIX(1)) {
+ ELEM_REMOVE(&next->link);
+ }
+ ELEM_REMOVE(&iobj->link);
+ }
}
if (IS_INSN_ID(iobj, concatstrings)) {
- /*
- * concatstrings N
- * concatstrings M
- * =>
- * concatstrings N+M-1
- */
- LINK_ELEMENT *next = iobj->link.next, *freeze = 0;
- INSN *jump = 0;
- if (IS_INSN(next) && IS_INSN_ID(next, freezestring))
- next = (freeze = next)->next;
- if (IS_INSN(next) && IS_INSN_ID(next, jump))
- next = get_destination_insn(jump = (INSN *)next);
- if (IS_INSN(next) && IS_INSN_ID(next, concatstrings)) {
- int n = FIX2INT(OPERAND_AT(iobj, 0)) + FIX2INT(OPERAND_AT(next, 0)) - 1;
- OPERAND_AT(iobj, 0) = INT2FIX(n);
- if (jump) {
- LABEL *label = ((LABEL *)OPERAND_AT(jump, 0));
- if (!--label->refcnt) {
- ELEM_REMOVE(&label->link);
- }
- else {
- label = NEW_LABEL(0);
- OPERAND_AT(jump, 0) = (VALUE)label;
- }
- label->refcnt++;
- if (freeze && IS_NEXT_INSN_ID(next, freezestring)) {
- if (same_debug_pos_p(freeze, next->next)) {
- ELEM_REMOVE(freeze);
- }
- else {
- next = next->next;
- }
- }
- ELEM_INSERT_NEXT(next, &label->link);
- CHECK(iseq_peephole_optimize(iseq, get_next_insn(jump), do_tailcallopt));
- }
- else {
- if (freeze) ELEM_REMOVE(freeze);
- ELEM_REMOVE(next);
- }
- }
- }
-
- if (IS_INSN_ID(iobj, freezestring) &&
- NIL_P(OPERAND_AT(iobj, 0)) &&
- IS_NEXT_INSN_ID(&iobj->link, send)) {
- INSN *niobj = (INSN *)iobj->link.next;
- struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(niobj, 0);
- /*
- * freezestring nil # no debug_info
- * send <:+@, 0, ARG_SIMPLE> # :-@, too
- * =>
- * send <:+@, 0, ARG_SIMPLE> # :-@, too
- */
- if ((ci->mid == idUPlus || ci->mid == idUMinus) &&
- (ci->flag & VM_CALL_ARGS_SIMPLE) &&
- ci->orig_argc == 0) {
- ELEM_REMOVE(list);
- return COMPILE_OK;
- }
+ /*
+ * concatstrings N
+ * concatstrings M
+ * =>
+ * concatstrings N+M-1
+ */
+ LINK_ELEMENT *next = iobj->link.next;
+ INSN *jump = 0;
+ if (IS_INSN(next) && IS_INSN_ID(next, jump))
+ next = get_destination_insn(jump = (INSN *)next);
+ if (IS_INSN(next) && IS_INSN_ID(next, concatstrings)) {
+ int n = FIX2INT(OPERAND_AT(iobj, 0)) + FIX2INT(OPERAND_AT(next, 0)) - 1;
+ OPERAND_AT(iobj, 0) = INT2FIX(n);
+ if (jump) {
+ LABEL *label = ((LABEL *)OPERAND_AT(jump, 0));
+ if (!--label->refcnt) {
+ ELEM_REMOVE(&label->link);
+ }
+ else {
+ label = NEW_LABEL(0);
+ OPERAND_AT(jump, 0) = (VALUE)label;
+ }
+ label->refcnt++;
+ ELEM_INSERT_NEXT(next, &label->link);
+ CHECK(iseq_peephole_optimize(iseq, get_next_insn(jump), do_tailcallopt));
+ }
+ else {
+ ELEM_REMOVE(next);
+ }
+ }
}
if (do_tailcallopt &&
- (IS_INSN_ID(iobj, send) ||
- IS_INSN_ID(iobj, opt_aref_with) ||
- IS_INSN_ID(iobj, opt_aset_with) ||
- IS_INSN_ID(iobj, invokesuper))) {
- /*
- * send ...
- * leave
- * =>
- * send ..., ... | VM_CALL_TAILCALL, ...
- * leave # unreachable
- */
- INSN *piobj = NULL;
- if (iobj->link.next) {
- LINK_ELEMENT *next = iobj->link.next;
- do {
- if (!IS_INSN(next)) {
- next = next->next;
- continue;
- }
- switch (INSN_OF(next)) {
- case BIN(nop):
- next = next->next;
- break;
- case BIN(jump):
- /* if cond
- * return tailcall
- * end
- */
- next = get_destination_insn((INSN *)next);
- break;
- case BIN(leave):
- piobj = iobj;
+ (IS_INSN_ID(iobj, send) ||
+ IS_INSN_ID(iobj, opt_aref_with) ||
+ IS_INSN_ID(iobj, opt_aset_with) ||
+ IS_INSN_ID(iobj, invokesuper))) {
+ /*
+ * send ...
+ * leave
+ * =>
+ * send ..., ... | VM_CALL_TAILCALL, ...
+ * leave # unreachable
+ */
+ INSN *piobj = NULL;
+ if (iobj->link.next) {
+ LINK_ELEMENT *next = iobj->link.next;
+ do {
+ if (!IS_INSN(next)) {
+ next = next->next;
+ continue;
+ }
+ switch (INSN_OF(next)) {
+ case BIN(nop):
+ next = next->next;
+ break;
+ case BIN(jump):
+ /* if cond
+ * return tailcall
+ * end
+ */
+ next = get_destination_insn((INSN *)next);
+ break;
+ case BIN(leave):
+ piobj = iobj;
/* fall through */
- default:
- next = NULL;
- break;
- }
- } while (next);
- }
-
- if (piobj) {
- struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(piobj, 0);
- if (IS_INSN_ID(piobj, send) || IS_INSN_ID(piobj, invokesuper)) {
+ default:
+ next = NULL;
+ break;
+ }
+ } while (next);
+ }
+
+ if (piobj) {
+ const struct rb_callinfo *ci = (struct rb_callinfo *)OPERAND_AT(piobj, 0);
+ if (IS_INSN_ID(piobj, send) ||
+ IS_INSN_ID(piobj, invokesuper)) {
if (OPERAND_AT(piobj, 1) == 0) { /* no blockiseq */
- ci->flag |= VM_CALL_TAILCALL;
- }
- }
- else {
- ci->flag |= VM_CALL_TAILCALL;
- }
- }
+ ci = ci_flag_set(iseq, ci, VM_CALL_TAILCALL);
+ OPERAND_AT(piobj, 0) = (VALUE)ci;
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
+ }
+ }
+ else {
+ ci = ci_flag_set(iseq, ci, VM_CALL_TAILCALL);
+ OPERAND_AT(piobj, 0) = (VALUE)ci;
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
+ }
+ }
}
if (IS_INSN_ID(iobj, dup)) {
- if (IS_NEXT_INSN_ID(&iobj->link, setlocal)) {
- LINK_ELEMENT *set1 = iobj->link.next, *set2 = NULL;
- if (IS_NEXT_INSN_ID(set1, setlocal)) {
- set2 = set1->next;
- if (OPERAND_AT(set1, 0) == OPERAND_AT(set2, 0) &&
- OPERAND_AT(set1, 1) == OPERAND_AT(set2, 1)) {
- ELEM_REMOVE(set1);
- ELEM_REMOVE(&iobj->link);
- }
- }
- else if (IS_NEXT_INSN_ID(set1, dup) &&
- IS_NEXT_INSN_ID(set1->next, setlocal)) {
- set2 = set1->next->next;
- if (OPERAND_AT(set1, 0) == OPERAND_AT(set2, 0) &&
- OPERAND_AT(set1, 1) == OPERAND_AT(set2, 1)) {
- ELEM_REMOVE(set1->next);
- ELEM_REMOVE(set2);
- }
- }
- }
+ if (IS_NEXT_INSN_ID(&iobj->link, setlocal)) {
+ LINK_ELEMENT *set1 = iobj->link.next, *set2 = NULL;
+
+ /*
+ * dup
+ * setlocal x, y
+ * setlocal x, y
+ * =>
+ * dup
+ * setlocal x, y
+ */
+ if (IS_NEXT_INSN_ID(set1, setlocal)) {
+ set2 = set1->next;
+ if (OPERAND_AT(set1, 0) == OPERAND_AT(set2, 0) &&
+ OPERAND_AT(set1, 1) == OPERAND_AT(set2, 1)) {
+ ELEM_REMOVE(set1);
+ ELEM_REMOVE(&iobj->link);
+ }
+ }
+
+ /*
+ * dup
+ * setlocal x, y
+ * dup
+ * setlocal x, y
+ * =>
+ * dup
+ * setlocal x, y
+ */
+ else if (IS_NEXT_INSN_ID(set1, dup) &&
+ IS_NEXT_INSN_ID(set1->next, setlocal)) {
+ set2 = set1->next->next;
+ if (OPERAND_AT(set1, 0) == OPERAND_AT(set2, 0) &&
+ OPERAND_AT(set1, 1) == OPERAND_AT(set2, 1)) {
+ ELEM_REMOVE(set1->next);
+ ELEM_REMOVE(set2);
+ }
+ }
+ }
}
+ /*
+ * getlocal x, y
+ * dup
+ * setlocal x, y
+ * =>
+ * dup
+ */
if (IS_INSN_ID(iobj, getlocal)) {
- LINK_ELEMENT *niobj = &iobj->link;
- if (IS_NEXT_INSN_ID(niobj, dup)) {
- niobj = niobj->next;
- }
- if (IS_NEXT_INSN_ID(niobj, setlocal)) {
- LINK_ELEMENT *set1 = niobj->next;
- if (OPERAND_AT(iobj, 0) == OPERAND_AT(set1, 0) &&
- OPERAND_AT(iobj, 1) == OPERAND_AT(set1, 1)) {
- ELEM_REMOVE(set1);
- ELEM_REMOVE(niobj);
- }
- }
+ LINK_ELEMENT *niobj = &iobj->link;
+ if (IS_NEXT_INSN_ID(niobj, dup)) {
+ niobj = niobj->next;
+ }
+ if (IS_NEXT_INSN_ID(niobj, setlocal)) {
+ LINK_ELEMENT *set1 = niobj->next;
+ if (OPERAND_AT(iobj, 0) == OPERAND_AT(set1, 0) &&
+ OPERAND_AT(iobj, 1) == OPERAND_AT(set1, 1)) {
+ ELEM_REMOVE(set1);
+ ELEM_REMOVE(niobj);
+ }
+ }
}
+ /*
+ * opt_invokebuiltin_delegate
+ * trace
+ * leave
+ * =>
+ * opt_invokebuiltin_delegate_leave
+ * trace
+ * leave
+ */
if (IS_INSN_ID(iobj, opt_invokebuiltin_delegate)) {
if (IS_TRACE(iobj->link.next)) {
if (IS_NEXT_INSN_ID(iobj->link.next, leave)) {
@@ -3251,6 +3681,19 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
}
}
+ /*
+ * getblockparam
+ * branchif / branchunless
+ * =>
+ * getblockparamproxy
+ * branchif / branchunless
+ */
+ if (IS_INSN_ID(iobj, getblockparam)) {
+ if (IS_NEXT_INSN_ID(&iobj->link, branchif) || IS_NEXT_INSN_ID(&iobj->link, branchunless)) {
+ iobj->insn_id = BIN(getblockparamproxy);
+ }
+ }
+
return COMPILE_OK;
}
@@ -3259,13 +3702,14 @@ insn_set_specialized_instruction(rb_iseq_t *iseq, INSN *iobj, int insn_id)
{
iobj->insn_id = insn_id;
iobj->operand_size = insn_len(insn_id) - 1;
+ iobj->insn_info.events |= RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN;
if (insn_id == BIN(opt_neq)) {
- VALUE *old_operands = iobj->operands;
+ VALUE original_ci = iobj->operands[0];
iobj->operand_size = 2;
- iobj->operands = compile_data_alloc2(iseq, iobj->operand_size, sizeof(VALUE));
+ iobj->operands = compile_data_calloc2(iseq, iobj->operand_size, sizeof(VALUE));
iobj->operands[0] = (VALUE)new_callinfo(iseq, idEq, 1, 0, NULL, FALSE);
- iobj->operands[1] = old_operands[0];
+ iobj->operands[1] = original_ci;
}
return COMPILE_OK;
@@ -3275,77 +3719,77 @@ static int
iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
{
if (IS_INSN_ID(iobj, newarray) && iobj->link.next &&
- IS_INSN(iobj->link.next)) {
- /*
- * [a, b, ...].max/min -> a, b, c, opt_newarray_max/min
- */
- INSN *niobj = (INSN *)iobj->link.next;
- if (IS_INSN_ID(niobj, send)) {
- struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(niobj, 0);
- if ((ci->flag & VM_CALL_ARGS_SIMPLE) && ci->orig_argc == 0) {
- switch (ci->mid) {
- case idMax:
- iobj->insn_id = BIN(opt_newarray_max);
- ELEM_REMOVE(&niobj->link);
- return COMPILE_OK;
- case idMin:
- iobj->insn_id = BIN(opt_newarray_min);
- ELEM_REMOVE(&niobj->link);
- return COMPILE_OK;
- }
- }
- }
+ IS_INSN(iobj->link.next)) {
+ /*
+ * [a, b, ...].max/min -> a, b, c, opt_newarray_max/min
+ */
+ INSN *niobj = (INSN *)iobj->link.next;
+ if (IS_INSN_ID(niobj, send)) {
+ const struct rb_callinfo *ci = (struct rb_callinfo *)OPERAND_AT(niobj, 0);
+ if ((vm_ci_flag(ci) & VM_CALL_ARGS_SIMPLE) && vm_ci_argc(ci) == 0) {
+ switch (vm_ci_mid(ci)) {
+ case idMax:
+ iobj->insn_id = BIN(opt_newarray_max);
+ ELEM_REMOVE(&niobj->link);
+ return COMPILE_OK;
+ case idMin:
+ iobj->insn_id = BIN(opt_newarray_min);
+ ELEM_REMOVE(&niobj->link);
+ return COMPILE_OK;
+ }
+ }
+ }
}
if (IS_INSN_ID(iobj, send)) {
- struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(iobj, 0);
+ const struct rb_callinfo *ci = (struct rb_callinfo *)OPERAND_AT(iobj, 0);
const rb_iseq_t *blockiseq = (rb_iseq_t *)OPERAND_AT(iobj, 1);
#define SP_INSN(opt) insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt))
- if (ci->flag & VM_CALL_ARGS_SIMPLE) {
- switch (ci->orig_argc) {
- case 0:
- switch (ci->mid) {
- case idLength: SP_INSN(length); return COMPILE_OK;
- case idSize: SP_INSN(size); return COMPILE_OK;
- case idEmptyP: SP_INSN(empty_p);return COMPILE_OK;
+ if (vm_ci_flag(ci) & VM_CALL_ARGS_SIMPLE) {
+ switch (vm_ci_argc(ci)) {
+ case 0:
+ switch (vm_ci_mid(ci)) {
+ case idLength: SP_INSN(length); return COMPILE_OK;
+ case idSize: SP_INSN(size); return COMPILE_OK;
+ case idEmptyP: SP_INSN(empty_p);return COMPILE_OK;
case idNilP: SP_INSN(nil_p); return COMPILE_OK;
- case idSucc: SP_INSN(succ); return COMPILE_OK;
- case idNot: SP_INSN(not); return COMPILE_OK;
- }
- break;
- case 1:
- switch (ci->mid) {
- case idPLUS: SP_INSN(plus); return COMPILE_OK;
- case idMINUS: SP_INSN(minus); return COMPILE_OK;
- case idMULT: SP_INSN(mult); return COMPILE_OK;
- case idDIV: SP_INSN(div); return COMPILE_OK;
- case idMOD: SP_INSN(mod); return COMPILE_OK;
- case idEq: SP_INSN(eq); return COMPILE_OK;
- case idNeq: SP_INSN(neq); return COMPILE_OK;
- case idEqTilde:SP_INSN(regexpmatch2);return COMPILE_OK;
- case idLT: SP_INSN(lt); return COMPILE_OK;
- case idLE: SP_INSN(le); return COMPILE_OK;
- case idGT: SP_INSN(gt); return COMPILE_OK;
- case idGE: SP_INSN(ge); return COMPILE_OK;
- case idLTLT: SP_INSN(ltlt); return COMPILE_OK;
- case idAREF: SP_INSN(aref); return COMPILE_OK;
+ case idSucc: SP_INSN(succ); return COMPILE_OK;
+ case idNot: SP_INSN(not); return COMPILE_OK;
+ }
+ break;
+ case 1:
+ switch (vm_ci_mid(ci)) {
+ case idPLUS: SP_INSN(plus); return COMPILE_OK;
+ case idMINUS: SP_INSN(minus); return COMPILE_OK;
+ case idMULT: SP_INSN(mult); return COMPILE_OK;
+ case idDIV: SP_INSN(div); return COMPILE_OK;
+ case idMOD: SP_INSN(mod); return COMPILE_OK;
+ case idEq: SP_INSN(eq); return COMPILE_OK;
+ case idNeq: SP_INSN(neq); return COMPILE_OK;
+ case idEqTilde:SP_INSN(regexpmatch2);return COMPILE_OK;
+ case idLT: SP_INSN(lt); return COMPILE_OK;
+ case idLE: SP_INSN(le); return COMPILE_OK;
+ case idGT: SP_INSN(gt); return COMPILE_OK;
+ case idGE: SP_INSN(ge); return COMPILE_OK;
+ case idLTLT: SP_INSN(ltlt); return COMPILE_OK;
+ case idAREF: SP_INSN(aref); return COMPILE_OK;
case idAnd: SP_INSN(and); return COMPILE_OK;
case idOr: SP_INSN(or); return COMPILE_OK;
- }
- break;
- case 2:
- switch (ci->mid) {
- case idASET: SP_INSN(aset); return COMPILE_OK;
- }
- break;
- }
- }
-
- if ((ci->flag & VM_CALL_ARGS_BLOCKARG) == 0 && blockiseq == NULL) {
- iobj->insn_id = BIN(opt_send_without_block);
- iobj->operand_size = insn_len(iobj->insn_id) - 1;
- }
+ }
+ break;
+ case 2:
+ switch (vm_ci_mid(ci)) {
+ case idASET: SP_INSN(aset); return COMPILE_OK;
+ }
+ break;
+ }
+ }
+
+ if ((vm_ci_flag(ci) & VM_CALL_ARGS_BLOCKARG) == 0 && blockiseq == NULL) {
+ iobj->insn_id = BIN(opt_send_without_block);
+ iobj->operand_size = insn_len(iobj->insn_id) - 1;
+ }
}
#undef SP_INSN
@@ -3355,17 +3799,17 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
static inline int
tailcallable_p(rb_iseq_t *iseq)
{
- switch (iseq->body->type) {
+ switch (ISEQ_BODY(iseq)->type) {
case ISEQ_TYPE_TOP:
case ISEQ_TYPE_EVAL:
case ISEQ_TYPE_MAIN:
- /* not tail callable because cfp will be over popped */
+ /* not tail callable because cfp will be over popped */
case ISEQ_TYPE_RESCUE:
case ISEQ_TYPE_ENSURE:
- /* rescue block can't tail call because of errinfo */
- return FALSE;
+ /* rescue block can't tail call because of errinfo */
+ return FALSE;
default:
- return TRUE;
+ return TRUE;
}
}
@@ -3375,7 +3819,7 @@ iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
LINK_ELEMENT *list;
const int do_peepholeopt = ISEQ_COMPILE_DATA(iseq)->option->peephole_optimization;
const int do_tailcallopt = tailcallable_p(iseq) &&
- ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization;
+ ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization;
const int do_si = ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction;
const int do_ou = ISEQ_COMPILE_DATA(iseq)->option->operands_unification;
int rescue_level = 0;
@@ -3383,30 +3827,50 @@ iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
list = FIRST_ELEMENT(anchor);
+ int do_block_optimization = 0;
+
+ if (ISEQ_BODY(iseq)->type == ISEQ_TYPE_BLOCK && !ISEQ_BODY(iseq)->catch_except_p) {
+ do_block_optimization = 1;
+ }
+
while (list) {
- if (IS_INSN(list)) {
- if (do_peepholeopt) {
- iseq_peephole_optimize(iseq, list, tailcallopt);
- }
- if (do_si) {
- iseq_specialized_instruction(iseq, (INSN *)list);
- }
- if (do_ou) {
- insn_operands_unification((INSN *)list);
- }
- }
- if (IS_LABEL(list)) {
- switch (((LABEL *)list)->rescued) {
- case LABEL_RESCUE_BEG:
- rescue_level++;
- tailcallopt = FALSE;
- break;
- case LABEL_RESCUE_END:
- if (!--rescue_level) tailcallopt = do_tailcallopt;
- break;
- }
- }
- list = list->next;
+ if (IS_INSN(list)) {
+ if (do_peepholeopt) {
+ iseq_peephole_optimize(iseq, list, tailcallopt);
+ }
+ if (do_si) {
+ iseq_specialized_instruction(iseq, (INSN *)list);
+ }
+ if (do_ou) {
+ insn_operands_unification((INSN *)list);
+ }
+
+ if (do_block_optimization) {
+ INSN * item = (INSN *)list;
+ if (IS_INSN_ID(item, jump)) {
+ do_block_optimization = 0;
+ }
+ }
+ }
+ if (IS_LABEL(list)) {
+ switch (((LABEL *)list)->rescued) {
+ case LABEL_RESCUE_BEG:
+ rescue_level++;
+ tailcallopt = FALSE;
+ break;
+ case LABEL_RESCUE_END:
+ if (!--rescue_level) tailcallopt = do_tailcallopt;
+ break;
+ }
+ }
+ list = list->next;
+ }
+
+ if (do_block_optimization) {
+ LINK_ELEMENT * le = FIRST_ELEMENT(anchor)->next;
+ if (IS_INSN(le) && IS_INSN_ID((INSN *)le, nop)) {
+ ELEM_REMOVE(le);
+ }
}
return COMPILE_OK;
}
@@ -3414,7 +3878,7 @@ iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
#if OPT_INSTRUCTIONS_UNIFICATION
static INSN *
new_unified_insn(rb_iseq_t *iseq,
- int insn_id, int size, LINK_ELEMENT *seq_list)
+ int insn_id, int size, LINK_ELEMENT *seq_list)
{
INSN *iobj = 0;
LINK_ELEMENT *list = seq_list;
@@ -3424,26 +3888,26 @@ new_unified_insn(rb_iseq_t *iseq,
/* count argc */
for (i = 0; i < size; i++) {
- iobj = (INSN *)list;
- argc += iobj->operand_size;
- list = list->next;
+ iobj = (INSN *)list;
+ argc += iobj->operand_size;
+ list = list->next;
}
if (argc > 0) {
- ptr = operands =
- compile_data_alloc2(iseq, sizeof(VALUE), argc);
+ ptr = operands = compile_data_alloc2(iseq, sizeof(VALUE), argc);
}
/* copy operands */
list = seq_list;
for (i = 0; i < size; i++) {
- iobj = (INSN *)list;
- MEMCPY(ptr, iobj->operands, VALUE, iobj->operand_size);
- ptr += iobj->operand_size;
- list = list->next;
+ iobj = (INSN *)list;
+ MEMCPY(ptr, iobj->operands, VALUE, iobj->operand_size);
+ ptr += iobj->operand_size;
+ list = list->next;
}
- return new_insn_core(iseq, iobj->insn_info.line_no, insn_id, argc, operands);
+ NODE dummy_line_node = generate_dummy_line_node(iobj->insn_info.line_no, iobj->insn_info.node_id);
+ return new_insn_core(iseq, &dummy_line_node, insn_id, argc, operands);
}
#endif
@@ -3463,41 +3927,41 @@ iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
list = FIRST_ELEMENT(anchor);
while (list) {
- if (IS_INSN(list)) {
- iobj = (INSN *)list;
- id = iobj->insn_id;
- if (unified_insns_data[id] != 0) {
- const int *const *entry = unified_insns_data[id];
- for (j = 1; j < (intptr_t)entry[0]; j++) {
- const int *unified = entry[j];
- LINK_ELEMENT *li = list->next;
- for (k = 2; k < unified[1]; k++) {
- if (!IS_INSN(li) ||
- ((INSN *)li)->insn_id != unified[k]) {
- goto miss;
- }
- li = li->next;
- }
- /* matched */
- niobj =
- new_unified_insn(iseq, unified[0], unified[1] - 1,
- list);
-
- /* insert to list */
- niobj->link.prev = (LINK_ELEMENT *)iobj->link.prev;
- niobj->link.next = li;
- if (li) {
- li->prev = (LINK_ELEMENT *)niobj;
- }
-
- list->prev->next = (LINK_ELEMENT *)niobj;
- list = (LINK_ELEMENT *)niobj;
- break;
- miss:;
- }
- }
- }
- list = list->next;
+ if (IS_INSN(list)) {
+ iobj = (INSN *)list;
+ id = iobj->insn_id;
+ if (unified_insns_data[id] != 0) {
+ const int *const *entry = unified_insns_data[id];
+ for (j = 1; j < (intptr_t)entry[0]; j++) {
+ const int *unified = entry[j];
+ LINK_ELEMENT *li = list->next;
+ for (k = 2; k < unified[1]; k++) {
+ if (!IS_INSN(li) ||
+ ((INSN *)li)->insn_id != unified[k]) {
+ goto miss;
+ }
+ li = li->next;
+ }
+ /* matched */
+ niobj =
+ new_unified_insn(iseq, unified[0], unified[1] - 1,
+ list);
+
+ /* insert to list */
+ niobj->link.prev = (LINK_ELEMENT *)iobj->link.prev;
+ niobj->link.next = li;
+ if (li) {
+ li->prev = (LINK_ELEMENT *)niobj;
+ }
+
+ list->prev->next = (LINK_ELEMENT *)niobj;
+ list = (LINK_ELEMENT *)niobj;
+ break;
+ miss:;
+ }
+ }
+ }
+ list = list->next;
}
#endif
return COMPILE_OK;
@@ -3521,28 +3985,28 @@ insn_set_sc_state(rb_iseq_t *iseq, const LINK_ELEMENT *anchor, INSN *iobj, int s
nstate = SC_NEXT(iobj->insn_id);
if (insn_id == BIN(jump) ||
- insn_id == BIN(branchif) || insn_id == BIN(branchunless)) {
- LABEL *lobj = (LABEL *)OPERAND_AT(iobj, 0);
-
- if (lobj->sc_state != 0) {
- if (lobj->sc_state != nstate) {
- BADINSN_DUMP(anchor, iobj, lobj);
- COMPILE_ERROR(iseq, iobj->insn_info.line_no,
- "insn_set_sc_state error: %d at "LABEL_FORMAT
- ", %d expected\n",
- lobj->sc_state, lobj->label_no, nstate);
- return COMPILE_NG;
- }
- }
- else {
- lobj->sc_state = nstate;
- }
- if (insn_id == BIN(jump)) {
- nstate = SCS_XX;
- }
+ insn_id == BIN(branchif) || insn_id == BIN(branchunless)) {
+ LABEL *lobj = (LABEL *)OPERAND_AT(iobj, 0);
+
+ if (lobj->sc_state != 0) {
+ if (lobj->sc_state != nstate) {
+ BADINSN_DUMP(anchor, iobj, lobj);
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "insn_set_sc_state error: %d at "LABEL_FORMAT
+ ", %d expected\n",
+ lobj->sc_state, lobj->label_no, nstate);
+ return COMPILE_NG;
+ }
+ }
+ else {
+ lobj->sc_state = nstate;
+ }
+ if (insn_id == BIN(jump)) {
+ nstate = SCS_XX;
+ }
}
else if (insn_id == BIN(leave)) {
- nstate = SCS_XX;
+ nstate = SCS_XX;
}
return nstate;
@@ -3552,12 +4016,12 @@ static int
label_set_sc_state(LABEL *lobj, int state)
{
if (lobj->sc_state != 0) {
- if (lobj->sc_state != state) {
- state = lobj->sc_state;
- }
+ if (lobj->sc_state != state) {
+ state = lobj->sc_state;
+ }
}
else {
- lobj->sc_state = state;
+ lobj->sc_state = state;
}
return state;
@@ -3581,83 +4045,84 @@ iseq_set_sequence_stackcaching(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
/* for each list element */
while (list) {
redo_point:
- switch (list->type) {
- case ISEQ_ELEMENT_INSN:
- {
- INSN *iobj = (INSN *)list;
- insn_id = iobj->insn_id;
-
- /* dump_disasm_list(list); */
-
- switch (insn_id) {
- case BIN(nop):
- {
- /* exception merge point */
- if (state != SCS_AX) {
- INSN *rpobj =
- new_insn_body(iseq, 0, BIN(reput), 0);
-
- /* replace this insn */
- ELEM_REPLACE(list, (LINK_ELEMENT *)rpobj);
- list = (LINK_ELEMENT *)rpobj;
- goto redo_point;
- }
- break;
- }
- case BIN(swap):
- {
- if (state == SCS_AB || state == SCS_BA) {
- state = (state == SCS_AB ? SCS_BA : SCS_AB);
-
- ELEM_REMOVE(list);
- list = list->next;
- goto redo_point;
- }
- break;
- }
- case BIN(pop):
- {
- switch (state) {
- case SCS_AX:
- case SCS_BX:
- state = SCS_XX;
- break;
- case SCS_AB:
- state = SCS_AX;
- break;
- case SCS_BA:
- state = SCS_BX;
- break;
- case SCS_XX:
- goto normal_insn;
- default:
- COMPILE_ERROR(iseq, iobj->insn_info.line_no,
- "unreachable");
- return COMPILE_NG;
- }
- /* remove useless pop */
- ELEM_REMOVE(list);
- list = list->next;
- goto redo_point;
- }
- default:;
- /* none */
- } /* end of switch */
- normal_insn:
- state = insn_set_sc_state(iseq, anchor, iobj, state);
- break;
- }
- case ISEQ_ELEMENT_LABEL:
- {
- LABEL *lobj;
- lobj = (LABEL *)list;
-
- state = label_set_sc_state(lobj, state);
- }
- default:
- break;
- }
- list = list->next;
+ switch (list->type) {
+ case ISEQ_ELEMENT_INSN:
+ {
+ INSN *iobj = (INSN *)list;
+ insn_id = iobj->insn_id;
+
+ /* dump_disasm_list(list); */
+
+ switch (insn_id) {
+ case BIN(nop):
+ {
+ /* exception merge point */
+ if (state != SCS_AX) {
+ NODE dummy_line_node = generate_dummy_line_node(0, -1);
+ INSN *rpobj =
+ new_insn_body(iseq, &dummy_line_node, BIN(reput), 0);
+
+ /* replace this insn */
+ ELEM_REPLACE(list, (LINK_ELEMENT *)rpobj);
+ list = (LINK_ELEMENT *)rpobj;
+ goto redo_point;
+ }
+ break;
+ }
+ case BIN(swap):
+ {
+ if (state == SCS_AB || state == SCS_BA) {
+ state = (state == SCS_AB ? SCS_BA : SCS_AB);
+
+ ELEM_REMOVE(list);
+ list = list->next;
+ goto redo_point;
+ }
+ break;
+ }
+ case BIN(pop):
+ {
+ switch (state) {
+ case SCS_AX:
+ case SCS_BX:
+ state = SCS_XX;
+ break;
+ case SCS_AB:
+ state = SCS_AX;
+ break;
+ case SCS_BA:
+ state = SCS_BX;
+ break;
+ case SCS_XX:
+ goto normal_insn;
+ default:
+ COMPILE_ERROR(iseq, iobj->insn_info.line_no,
+ "unreachable");
+ return COMPILE_NG;
+ }
+ /* remove useless pop */
+ ELEM_REMOVE(list);
+ list = list->next;
+ goto redo_point;
+ }
+ default:;
+ /* none */
+ } /* end of switch */
+ normal_insn:
+ state = insn_set_sc_state(iseq, anchor, iobj, state);
+ break;
+ }
+ case ISEQ_ELEMENT_LABEL:
+ {
+ LABEL *lobj;
+ lobj = (LABEL *)list;
+
+ state = label_set_sc_state(lobj, state);
+ }
+ default:
+ break;
+ }
+ list = list->next;
}
#endif
return COMPILE_OK;
@@ -3669,20 +4134,20 @@ all_string_result_p(const NODE *node)
if (!node) return FALSE;
switch (nd_type(node)) {
case NODE_STR: case NODE_DSTR:
- return TRUE;
+ return TRUE;
case NODE_IF: case NODE_UNLESS:
- if (!node->nd_body || !node->nd_else) return FALSE;
- if (all_string_result_p(node->nd_body))
- return all_string_result_p(node->nd_else);
- return FALSE;
+ if (!node->nd_body || !node->nd_else) return FALSE;
+ if (all_string_result_p(node->nd_body))
+ return all_string_result_p(node->nd_else);
+ return FALSE;
case NODE_AND: case NODE_OR:
- if (!node->nd_2nd)
- return all_string_result_p(node->nd_1st);
- if (!all_string_result_p(node->nd_1st))
- return FALSE;
- return all_string_result_p(node->nd_2nd);
+ if (!node->nd_2nd)
+ return all_string_result_p(node->nd_1st);
+ if (!all_string_result_p(node->nd_1st))
+ return FALSE;
+ return all_string_result_p(node->nd_2nd);
default:
- return FALSE;
+ return FALSE;
}
}
@@ -3696,35 +4161,35 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *cons
debugp_param("nd_lit", lit);
if (!NIL_P(lit)) {
- cnt++;
- if (!RB_TYPE_P(lit, T_STRING)) {
- COMPILE_ERROR(ERROR_ARGS "dstr: must be string: %s",
- rb_builtin_type_name(TYPE(lit)));
- return COMPILE_NG;
- }
- lit = rb_fstring(lit);
- ADD_INSN1(ret, nd_line(node), putobject, lit);
+ cnt++;
+ if (!RB_TYPE_P(lit, T_STRING)) {
+ COMPILE_ERROR(ERROR_ARGS "dstr: must be string: %s",
+ rb_builtin_type_name(TYPE(lit)));
+ return COMPILE_NG;
+ }
+ lit = rb_fstring(lit);
+ ADD_INSN1(ret, node, putobject, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
- if (RSTRING_LEN(lit) == 0) first_lit = LAST_ELEMENT(ret);
+ if (RSTRING_LEN(lit) == 0) first_lit = LAST_ELEMENT(ret);
}
while (list) {
- const NODE *const head = list->nd_head;
- if (nd_type(head) == NODE_STR) {
- lit = rb_fstring(head->nd_lit);
- ADD_INSN1(ret, nd_line(head), putobject, lit);
+ const NODE *const head = list->nd_head;
+ if (nd_type_p(head, NODE_STR)) {
+ lit = rb_fstring(head->nd_lit);
+ ADD_INSN1(ret, head, putobject, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
- lit = Qnil;
- }
- else {
- CHECK(COMPILE(ret, "each string", head));
- }
- cnt++;
- list = list->nd_next;
+ lit = Qnil;
+ }
+ else {
+ CHECK(COMPILE(ret, "each string", head));
+ }
+ cnt++;
+ list = list->nd_next;
}
if (NIL_P(lit) && first_lit) {
- ELEM_REMOVE(first_lit);
- --cnt;
+ ELEM_REMOVE(first_lit);
+ --cnt;
}
*cntp = cnt;
@@ -3732,11 +4197,32 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *cons
}
static int
+compile_block(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped)
+{
+ while (node && nd_type_p(node, NODE_BLOCK)) {
+ CHECK(COMPILE_(ret, "BLOCK body", node->nd_head,
+ (node->nd_next ? 1 : popped)));
+ node = node->nd_next;
+ }
+ if (node) {
+ CHECK(COMPILE_(ret, "BLOCK next", node->nd_next, popped));
+ }
+ return COMPILE_OK;
+}
+
+static int
compile_dstr(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node)
{
int cnt;
- CHECK(compile_dstr_fragments(iseq, ret, node, &cnt));
- ADD_INSN1(ret, nd_line(node), concatstrings, INT2FIX(cnt));
+ if (!node->nd_next) {
+ VALUE lit = rb_fstring(node->nd_lit);
+ ADD_INSN1(ret, node, putstring, lit);
+ RB_OBJ_WRITTEN(iseq, Qundef, lit);
+ }
+ else {
+ CHECK(compile_dstr_fragments(iseq, ret, node, &cnt));
+ ADD_INSN1(ret, node, concatstrings, INT2FIX(cnt));
+ }
return COMPILE_OK;
}
@@ -3745,172 +4231,187 @@ compile_dregx(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node)
{
int cnt;
CHECK(compile_dstr_fragments(iseq, ret, node, &cnt));
- ADD_INSN2(ret, nd_line(node), toregexp, INT2FIX(node->nd_cflag), INT2FIX(cnt));
+ ADD_INSN2(ret, node, toregexp, INT2FIX(node->nd_cflag), INT2FIX(cnt));
return COMPILE_OK;
}
static int
compile_flip_flop(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int again,
- LABEL *then_label, LABEL *else_label)
+ LABEL *then_label, LABEL *else_label)
{
const int line = nd_line(node);
LABEL *lend = NEW_LABEL(line);
- rb_num_t cnt = ISEQ_FLIP_CNT_INCREMENT(iseq->body->local_iseq)
- + VM_SVAR_FLIPFLOP_START;
+ rb_num_t cnt = ISEQ_FLIP_CNT_INCREMENT(ISEQ_BODY(iseq)->local_iseq)
+ + VM_SVAR_FLIPFLOP_START;
VALUE key = INT2FIX(cnt);
- ADD_INSN2(ret, line, getspecial, key, INT2FIX(0));
- ADD_INSNL(ret, line, branchif, lend);
+ ADD_INSN2(ret, node, getspecial, key, INT2FIX(0));
+ ADD_INSNL(ret, node, branchif, lend);
/* *flip == 0 */
CHECK(COMPILE(ret, "flip2 beg", node->nd_beg));
- ADD_INSNL(ret, line, branchunless, else_label);
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSN1(ret, line, setspecial, key);
+ ADD_INSNL(ret, node, branchunless, else_label);
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ ADD_INSN1(ret, node, setspecial, key);
if (!again) {
- ADD_INSNL(ret, line, jump, then_label);
+ ADD_INSNL(ret, node, jump, then_label);
}
/* *flip == 1 */
ADD_LABEL(ret, lend);
CHECK(COMPILE(ret, "flip2 end", node->nd_end));
- ADD_INSNL(ret, line, branchunless, then_label);
- ADD_INSN1(ret, line, putobject, Qfalse);
- ADD_INSN1(ret, line, setspecial, key);
- ADD_INSNL(ret, line, jump, then_label);
+ ADD_INSNL(ret, node, branchunless, then_label);
+ ADD_INSN1(ret, node, putobject, Qfalse);
+ ADD_INSN1(ret, node, setspecial, key);
+ ADD_INSNL(ret, node, jump, then_label);
return COMPILE_OK;
}
static int
compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *cond,
- LABEL *then_label, LABEL *else_label)
+ LABEL *then_label, LABEL *else_label)
{
again:
switch (nd_type(cond)) {
case NODE_AND:
- {
- LABEL *label = NEW_LABEL(nd_line(cond));
- CHECK(compile_branch_condition(iseq, ret, cond->nd_1st, label,
- else_label));
- if (!label->refcnt) break;
- ADD_LABEL(ret, label);
- cond = cond->nd_2nd;
- goto again;
- }
+ {
+ LABEL *label = NEW_LABEL(nd_line(cond));
+ CHECK(compile_branch_condition(iseq, ret, cond->nd_1st, label,
+ else_label));
+ if (!label->refcnt) {
+ ADD_INSN(ret, cond, putnil);
+ break;
+ }
+ ADD_LABEL(ret, label);
+ cond = cond->nd_2nd;
+ goto again;
+ }
case NODE_OR:
- {
- LABEL *label = NEW_LABEL(nd_line(cond));
- CHECK(compile_branch_condition(iseq, ret, cond->nd_1st, then_label,
- label));
- if (!label->refcnt) break;
- ADD_LABEL(ret, label);
- cond = cond->nd_2nd;
- goto again;
- }
+ {
+ LABEL *label = NEW_LABEL(nd_line(cond));
+ CHECK(compile_branch_condition(iseq, ret, cond->nd_1st, then_label,
+ label));
+ if (!label->refcnt) {
+ ADD_INSN(ret, cond, putnil);
+ break;
+ }
+ ADD_LABEL(ret, label);
+ cond = cond->nd_2nd;
+ goto again;
+ }
case NODE_LIT: /* NODE_LIT is always true */
case NODE_TRUE:
case NODE_STR:
case NODE_ZLIST:
case NODE_LAMBDA:
- /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
- ADD_INSNL(ret, nd_line(cond), jump, then_label);
- break;
+ /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
+ ADD_INSNL(ret, cond, jump, then_label);
+ return COMPILE_OK;
case NODE_FALSE:
case NODE_NIL:
- /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
- ADD_INSNL(ret, nd_line(cond), jump, else_label);
- break;
+ /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */
+ ADD_INSNL(ret, cond, jump, else_label);
+ return COMPILE_OK;
case NODE_LIST:
case NODE_ARGSCAT:
case NODE_DREGX:
case NODE_DSTR:
- CHECK(COMPILE_POPPED(ret, "branch condition", cond));
- ADD_INSNL(ret, nd_line(cond), jump, then_label);
- break;
+ CHECK(COMPILE_POPPED(ret, "branch condition", cond));
+ ADD_INSNL(ret, cond, jump, then_label);
+ return COMPILE_OK;
case NODE_FLIP2:
- CHECK(compile_flip_flop(iseq, ret, cond, TRUE, then_label, else_label));
- break;
+ CHECK(compile_flip_flop(iseq, ret, cond, TRUE, then_label, else_label));
+ return COMPILE_OK;
case NODE_FLIP3:
- CHECK(compile_flip_flop(iseq, ret, cond, FALSE, then_label, else_label));
- break;
+ CHECK(compile_flip_flop(iseq, ret, cond, FALSE, then_label, else_label));
+ return COMPILE_OK;
case NODE_DEFINED:
- CHECK(compile_defined_expr(iseq, ret, cond, Qfalse));
- goto branch;
+ CHECK(compile_defined_expr(iseq, ret, cond, Qfalse));
+ break;
default:
- CHECK(COMPILE(ret, "branch condition", cond));
- branch:
- ADD_INSNL(ret, nd_line(cond), branchunless, else_label);
- ADD_INSNL(ret, nd_line(cond), jump, then_label);
- break;
+ CHECK(COMPILE(ret, "branch condition", cond));
+ break;
}
+
+ ADD_INSNL(ret, cond, branchunless, else_label);
+ ADD_INSNL(ret, cond, jump, then_label);
return COMPILE_OK;
}
+#define HASH_BRACE 1
+
static int
keyword_node_p(const NODE *const node)
{
- return nd_type(node) == NODE_HASH && node->nd_brace == FALSE;
+ return nd_type_p(node, NODE_HASH) && (node->nd_brace & HASH_BRACE) != HASH_BRACE;
}
static int
compile_keyword_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
- const NODE *const root_node,
- struct rb_call_info_kw_arg **const kw_arg_ptr,
- unsigned int *flag)
+ const NODE *const root_node,
+ struct rb_callinfo_kwarg **const kw_arg_ptr,
+ unsigned int *flag)
{
if (kw_arg_ptr == NULL) return FALSE;
- if (keyword_node_p(root_node) && root_node->nd_head && nd_type(root_node->nd_head) == NODE_LIST) {
- const NODE *node = root_node->nd_head;
-
- while (node) {
- const NODE *key_node = node->nd_head;
-
- assert(nd_type(node) == NODE_LIST);
- if (!key_node) {
- if (flag) *flag |= VM_CALL_KW_SPLAT;
- return FALSE;
- }
- else if (nd_type(key_node) == NODE_LIT && RB_TYPE_P(key_node->nd_lit, T_SYMBOL)) {
- /* can be keywords */
- }
- else {
- if (flag) *flag |= VM_CALL_KW_SPLAT;
- return FALSE;
- }
- node = node->nd_next; /* skip value node */
- node = node->nd_next;
- }
-
- /* may be keywords */
- node = root_node->nd_head;
- {
- int len = (int)node->nd_alen / 2;
- struct rb_call_info_kw_arg *kw_arg =
- rb_xmalloc_mul_add(len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg));
- VALUE *keywords = kw_arg->keywords;
- int i = 0;
- kw_arg->keyword_len = len;
-
- *kw_arg_ptr = kw_arg;
-
- for (i=0; node != NULL; i++, node = node->nd_next->nd_next) {
- const NODE *key_node = node->nd_head;
- const NODE *val_node = node->nd_next->nd_head;
- keywords[i] = key_node->nd_lit;
+ if (root_node->nd_head && nd_type_p(root_node->nd_head, NODE_LIST)) {
+ const NODE *node = root_node->nd_head;
+ int seen_nodes = 0;
+
+ while (node) {
+ const NODE *key_node = node->nd_head;
+ seen_nodes++;
+
+ assert(nd_type_p(node, NODE_LIST));
+ if (key_node && nd_type_p(key_node, NODE_LIT) && SYMBOL_P(key_node->nd_lit)) {
+ /* can be keywords */
+ }
+ else {
+ if (flag) {
+ *flag |= VM_CALL_KW_SPLAT;
+ if (seen_nodes > 1 || node->nd_next->nd_next) {
+ /* A new hash will be created for the keyword arguments
+ * in this case, so mark the method as passing mutable
+ * keyword splat.
+ */
+ *flag |= VM_CALL_KW_SPLAT_MUT;
+ }
+ }
+ return FALSE;
+ }
+ node = node->nd_next; /* skip value node */
+ node = node->nd_next;
+ }
+
+ /* may be keywords */
+ node = root_node->nd_head;
+ {
+ int len = (int)node->nd_alen / 2;
+ struct rb_callinfo_kwarg *kw_arg =
+ rb_xmalloc_mul_add(len, sizeof(VALUE), sizeof(struct rb_callinfo_kwarg));
+ VALUE *keywords = kw_arg->keywords;
+ int i = 0;
+ kw_arg->keyword_len = len;
+
+ *kw_arg_ptr = kw_arg;
+
+ for (i=0; node != NULL; i++, node = node->nd_next->nd_next) {
+ const NODE *key_node = node->nd_head;
+ const NODE *val_node = node->nd_next->nd_head;
+ keywords[i] = key_node->nd_lit;
NO_CHECK(COMPILE(ret, "keyword values", val_node));
- }
- assert(i == len);
- return TRUE;
- }
+ }
+ assert(i == len);
+ return TRUE;
+ }
}
return FALSE;
}
static int
compile_args(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node,
- struct rb_call_info_kw_arg **keywords_ptr, unsigned int *flag)
+ struct rb_callinfo_kwarg **keywords_ptr, unsigned int *flag)
{
int len = 0;
@@ -3919,9 +4420,13 @@ compile_args(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node,
EXPECT_NODE("compile_args", node, NODE_LIST, -1);
}
- if (node->nd_next == NULL /* last node */ &&
- compile_keyword_arg(iseq, ret, node->nd_head, keywords_ptr, flag)) {
- len--;
+ if (node->nd_next == NULL && keyword_node_p(node->nd_head)) { /* last node */
+ if (compile_keyword_arg(iseq, ret, node->nd_head, keywords_ptr, flag)) {
+ len--;
+ }
+ else {
+ compile_hash(iseq, ret, node->nd_head, TRUE, FALSE);
+ }
}
else {
NO_CHECK(COMPILE_(ret, "array element", node->nd_head, FALSE));
@@ -3934,31 +4439,29 @@ compile_args(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node,
static inline int
static_literal_node_p(const NODE *node, const rb_iseq_t *iseq)
{
- node = node->nd_head;
switch (nd_type(node)) {
case NODE_LIT:
case NODE_NIL:
case NODE_TRUE:
case NODE_FALSE:
- return TRUE;
+ return TRUE;
case NODE_STR:
return ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal;
default:
- return FALSE;
+ return FALSE;
}
}
static inline VALUE
static_literal_value(const NODE *node, rb_iseq_t *iseq)
{
- node = node->nd_head;
switch (nd_type(node)) {
case NODE_NIL:
- return Qnil;
+ return Qnil;
case NODE_TRUE:
- return Qtrue;
+ return Qtrue;
case NODE_FALSE:
- return Qfalse;
+ return Qfalse;
case NODE_STR:
if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
VALUE lit;
@@ -3971,19 +4474,19 @@ static_literal_value(const NODE *node, rb_iseq_t *iseq)
return rb_fstring(node->nd_lit);
}
default:
- return node->nd_lit;
+ return node->nd_lit;
}
}
static int
compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped)
{
- int line = (int)nd_line(node);
+ const NODE *line_node = node;
- if (nd_type(node) == NODE_ZLIST) {
- if (!popped) {
- ADD_INSN1(ret, line, newarray, INT2FIX(0));
- }
+ if (nd_type_p(node, NODE_ZLIST)) {
+ if (!popped) {
+ ADD_INSN1(ret, line_node, newarray, INT2FIX(0));
+ }
return 0;
}
@@ -4041,8 +4544,8 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
/* Convert pushed elements to an array, and concatarray if needed */
#define FLUSH_CHUNK(newarrayinsn) \
if (stack_len) { \
- ADD_INSN1(ret, line, newarrayinsn, INT2FIX(stack_len)); \
- if (!first_chunk) ADD_INSN(ret, line, concatarray); \
+ ADD_INSN1(ret, line_node, newarrayinsn, INT2FIX(stack_len)); \
+ if (!first_chunk) ADD_INSN(ret, line_node, concatarray); \
first_chunk = stack_len = 0; \
}
@@ -4050,30 +4553,30 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
int count = 1;
/* pre-allocation check (this branch can be omittable) */
- if (static_literal_node_p(node, iseq)) {
+ if (static_literal_node_p(node->nd_head, iseq)) {
/* count the elements that are optimizable */
const NODE *node_tmp = node->nd_next;
- for (; node_tmp && static_literal_node_p(node_tmp, iseq); node_tmp = node_tmp->nd_next)
+ for (; node_tmp && static_literal_node_p(node_tmp->nd_head, iseq); node_tmp = node_tmp->nd_next)
count++;
if ((first_chunk && stack_len == 0 && !node_tmp) || count >= min_tmp_ary_len) {
/* The literal contains only optimizable elements, or the subarray is long enough */
- VALUE ary = rb_ary_tmp_new(count);
+ VALUE ary = rb_ary_hidden_new(count);
/* Create a hidden array */
for (; count; count--, node = node->nd_next)
- rb_ary_push(ary, static_literal_value(node, iseq));
+ rb_ary_push(ary, static_literal_value(node->nd_head, iseq));
OBJ_FREEZE(ary);
/* Emit optimized code */
FLUSH_CHUNK(newarray);
if (first_chunk) {
- ADD_INSN1(ret, line, duparray, ary);
+ ADD_INSN1(ret, line_node, duparray, ary);
first_chunk = 0;
}
else {
- ADD_INSN1(ret, line, putobject, ary);
- ADD_INSN(ret, line, concatarray);
+ ADD_INSN1(ret, line_node, putobject, ary);
+ ADD_INSN(ret, line_node, concatarray);
}
RB_OBJ_WRITTEN(iseq, Qundef, ary);
}
@@ -4104,23 +4607,47 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
return 1;
}
+/* Compile an array containing the single element represented by node */
+static int
+compile_array_1(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node)
+{
+ if (static_literal_node_p(node, iseq)) {
+ VALUE ary = rb_ary_hidden_new(1);
+ rb_ary_push(ary, static_literal_value(node, iseq));
+ OBJ_FREEZE(ary);
+
+ ADD_INSN1(ret, node, duparray, ary);
+ }
+ else {
+ CHECK(COMPILE_(ret, "array element", node, FALSE));
+ if (keyword_node_p(node)) {
+ ADD_INSN1(ret, node, newarraykwsplat, INT2FIX(1));
+ }
+ else {
+ ADD_INSN1(ret, node, newarray, INT2FIX(1));
+ }
+ }
+
+ return 1;
+}
+
static inline int
static_literal_node_pair_p(const NODE *node, const rb_iseq_t *iseq)
{
- return node->nd_head && static_literal_node_p(node, iseq) && static_literal_node_p(node->nd_next, iseq);
+ return node->nd_head && static_literal_node_p(node->nd_head, iseq) && static_literal_node_p(node->nd_next->nd_head, iseq);
}
static int
-compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped)
+compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int method_call_keywords, int popped)
{
- int line = (int)nd_line(node);
+ const NODE *line_node = node;
node = node->nd_head;
- if (!node || nd_type(node) == NODE_ZLIST) {
- if (!popped) {
- ADD_INSN1(ret, line, newhash, INT2FIX(0));
- }
+ if (!node || nd_type_p(node, NODE_ZLIST)) {
+ if (!popped) {
+ ADD_INSN1(ret, line_node, newhash, INT2FIX(0));
+ }
return 0;
}
@@ -4163,13 +4690,13 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popp
if (stack_len) { \
if (first_chunk) { \
APPEND_LIST(ret, anchor); \
- ADD_INSN1(ret, line, newhash, INT2FIX(stack_len)); \
+ ADD_INSN1(ret, line_node, newhash, INT2FIX(stack_len)); \
} \
else { \
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); \
- ADD_INSN(ret, line, swap); \
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); \
+ ADD_INSN(ret, line_node, swap); \
APPEND_LIST(ret, anchor); \
- ADD_SEND(ret, line, id_core_hash_merge_ptr, INT2FIX(stack_len + 1)); \
+ ADD_SEND(ret, line_node, id_core_hash_merge_ptr, INT2FIX(stack_len + 1)); \
} \
INIT_ANCHOR(anchor); \
first_chunk = stack_len = 0; \
@@ -4187,13 +4714,13 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popp
if ((first_chunk && stack_len == 0 && !node_tmp) || count >= min_tmp_hash_len) {
/* The literal contains only optimizable elements, or the subsequence is long enough */
- VALUE ary = rb_ary_tmp_new(count);
+ VALUE ary = rb_ary_hidden_new(count);
/* Create a hidden hash */
for (; count; count--, node = node->nd_next->nd_next) {
VALUE elem[2];
- elem[0] = static_literal_value(node, iseq);
- elem[1] = static_literal_value(node->nd_next, iseq);
+ elem[0] = static_literal_value(node->nd_head, iseq);
+ elem[1] = static_literal_value(node->nd_next->nd_head, iseq);
rb_ary_cat(ary, elem, 2);
}
VALUE hash = rb_hash_new_with_size(RARRAY_LEN(ary) / 2);
@@ -4204,16 +4731,16 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popp
/* Emit optimized code */
FLUSH_CHUNK();
if (first_chunk) {
- ADD_INSN1(ret, line, duphash, hash);
+ ADD_INSN1(ret, line_node, duphash, hash);
first_chunk = 0;
}
else {
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN(ret, line, swap);
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN(ret, line_node, swap);
- ADD_INSN1(ret, line, putobject, hash);
+ ADD_INSN1(ret, line_node, putobject, hash);
- ADD_SEND(ret, line, id_core_hash_merge_kwd, INT2FIX(2));
+ ADD_SEND(ret, line_node, id_core_hash_merge_kwd, INT2FIX(2));
}
RB_OBJ_WRITTEN(iseq, Qundef, hash);
}
@@ -4240,38 +4767,54 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popp
FLUSH_CHUNK();
const NODE *kw = node->nd_next->nd_head;
- int empty_kw = nd_type(kw) == NODE_LIT; /* foo( ..., **{}, ...) */
+ int empty_kw = nd_type_p(kw, NODE_LIT) && RB_TYPE_P(kw->nd_lit, T_HASH); /* foo( ..., **{}, ...) */
int first_kw = first_chunk && stack_len == 0; /* foo(1,2,3, **kw, ...) */
int last_kw = !node->nd_next->nd_next; /* foo( ..., **kw) */
int only_kw = last_kw && first_kw; /* foo(1,2,3, **kw) */
if (empty_kw) {
- if (only_kw) {
- /* **{} appears at the last, so it won't be modified.
+ if (only_kw && method_call_keywords) {
+ /* **{} appears at the only keyword argument in method call,
+ * so it won't be modified.
* kw is a special NODE_LIT that contains a special empty hash,
- * so this emits: putobject {}
+ * so this emits: putobject {}.
+ * This is only done for method calls and not for literal hashes,
+ * because literal hashes should always result in a new hash.
*/
NO_CHECK(COMPILE(ret, "keyword splat", kw));
}
else if (first_kw) {
- /* **{} appears at the first, so it may be modified.
+ /* **{} appears as the first keyword argument, so it may be modified.
* We need to create a fresh hash object.
*/
- ADD_INSN1(ret, line, newhash, INT2FIX(0));
+ ADD_INSN1(ret, line_node, newhash, INT2FIX(0));
}
+ /* Any empty keyword splats that are not the first can be ignored.
+ * since merging an empty hash into the existing hash is the same
+ * as not merging it. */
}
else {
- /* This is not empty hash: **{k:1}.
- * We need to clone the hash (if first), or merge the hash to
- * the accumulated hash (if not first).
- */
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- if (first_kw) ADD_INSN1(ret, line, newhash, INT2FIX(0));
- else ADD_INSN(ret, line, swap);
+ if (only_kw && method_call_keywords) {
+ /* **kw is only keyword argument in method call.
+ * Use directly. This will be not be flagged as mutable.
+ * This is only done for method calls and not for literal hashes,
+ * because literal hashes should always result in a new hash.
+ */
+ NO_CHECK(COMPILE(ret, "keyword splat", kw));
+ }
+ else {
+ /* There is more than one keyword argument, or this is not a method
+ * call. In that case, we need to add an empty hash (if first keyword),
+ * or merge the hash to the accumulated hash (if not the first keyword).
+ */
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ if (first_kw) ADD_INSN1(ret, line_node, newhash, INT2FIX(0));
+ else ADD_INSN(ret, line_node, swap);
- NO_CHECK(COMPILE(ret, "keyword splat", kw));
+ NO_CHECK(COMPILE(ret, "keyword splat", kw));
- ADD_SEND(ret, line, id_core_hash_merge_kwd, INT2FIX(2));
+ ADD_SEND(ret, line_node, id_core_hash_merge_kwd, INT2FIX(2));
+ }
}
first_chunk = 0;
@@ -4289,59 +4832,62 @@ rb_node_case_when_optimizable_literal(const NODE *const node)
{
switch (nd_type(node)) {
case NODE_LIT: {
- VALUE v = node->nd_lit;
- double ival;
- if (RB_TYPE_P(v, T_FLOAT) &&
- modf(RFLOAT_VALUE(v), &ival) == 0.0) {
- return FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
- }
- if (SYMBOL_P(v) || rb_obj_is_kind_of(v, rb_cNumeric)) {
- return v;
- }
- break;
+ VALUE v = node->nd_lit;
+ double ival;
+ if (RB_FLOAT_TYPE_P(v) &&
+ modf(RFLOAT_VALUE(v), &ival) == 0.0) {
+ return FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
+ }
+ if (RB_TYPE_P(v, T_RATIONAL) || RB_TYPE_P(v, T_COMPLEX)) {
+ return Qundef;
+ }
+ if (SYMBOL_P(v) || rb_obj_is_kind_of(v, rb_cNumeric)) {
+ return v;
+ }
+ break;
}
case NODE_NIL:
- return Qnil;
+ return Qnil;
case NODE_TRUE:
- return Qtrue;
+ return Qtrue;
case NODE_FALSE:
- return Qfalse;
+ return Qfalse;
case NODE_STR:
- return rb_fstring(node->nd_lit);
+ return rb_fstring(node->nd_lit);
}
return Qundef;
}
static int
when_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
- LABEL *l1, int only_special_literals, VALUE literals)
+ LABEL *l1, int only_special_literals, VALUE literals)
{
while (vals) {
- const NODE *val = vals->nd_head;
+ const NODE *val = vals->nd_head;
VALUE lit = rb_node_case_when_optimizable_literal(val);
- if (lit == Qundef) {
- only_special_literals = 0;
- }
+ if (UNDEF_P(lit)) {
+ only_special_literals = 0;
+ }
else if (NIL_P(rb_hash_lookup(literals, lit))) {
rb_hash_aset(literals, lit, (VALUE)(l1) | 1);
- }
-
- ADD_INSN(cond_seq, nd_line(val), dup); /* dup target */
+ }
- if (nd_type(val) == NODE_STR) {
- debugp_param("nd_lit", val->nd_lit);
- lit = rb_fstring(val->nd_lit);
- ADD_INSN1(cond_seq, nd_line(val), putobject, lit);
+ if (nd_type_p(val, NODE_STR)) {
+ debugp_param("nd_lit", val->nd_lit);
+ lit = rb_fstring(val->nd_lit);
+ ADD_INSN1(cond_seq, val, putobject, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
- }
- else {
- if (!COMPILE(cond_seq, "when cond", val)) return -1;
- }
+ }
+ else {
+ if (!COMPILE(cond_seq, "when cond", val)) return -1;
+ }
- ADD_INSN1(cond_seq, nd_line(vals), checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
- ADD_INSNL(cond_seq, nd_line(val), branchif, l1);
- vals = vals->nd_next;
+ // Emit patern === target
+ ADD_INSN1(cond_seq, vals, topn, INT2FIX(1));
+ ADD_CALL(cond_seq, vals, idEqq, INT2FIX(1));
+ ADD_INSNL(cond_seq, val, branchif, l1);
+ vals = vals->nd_next;
}
return only_special_literals;
}
@@ -4350,7 +4896,7 @@ static int
when_splat_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
LABEL *l1, int only_special_literals, VALUE literals)
{
- const int line = nd_line(vals);
+ const NODE *line_node = vals;
switch (nd_type(vals)) {
case NODE_LIST:
@@ -4358,11 +4904,11 @@ when_splat_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
return COMPILE_NG;
break;
case NODE_SPLAT:
- ADD_INSN (cond_seq, line, dup);
+ ADD_INSN (cond_seq, line_node, dup);
CHECK(COMPILE(cond_seq, "when splat", vals->nd_head));
- ADD_INSN1(cond_seq, line, splatarray, Qfalse);
- ADD_INSN1(cond_seq, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE | VM_CHECKMATCH_ARRAY));
- ADD_INSNL(cond_seq, line, branchif, l1);
+ ADD_INSN1(cond_seq, line_node, splatarray, Qfalse);
+ ADD_INSN1(cond_seq, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE | VM_CHECKMATCH_ARRAY));
+ ADD_INSNL(cond_seq, line_node, branchif, l1);
break;
case NODE_ARGSCAT:
CHECK(when_splat_vals(iseq, cond_seq, vals->nd_head, l1, only_special_literals, literals));
@@ -4370,63 +4916,264 @@ when_splat_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
break;
case NODE_ARGSPUSH:
CHECK(when_splat_vals(iseq, cond_seq, vals->nd_head, l1, only_special_literals, literals));
- ADD_INSN (cond_seq, line, dup);
+ ADD_INSN (cond_seq, line_node, dup);
CHECK(COMPILE(cond_seq, "when argspush body", vals->nd_body));
- ADD_INSN1(cond_seq, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
- ADD_INSNL(cond_seq, line, branchif, l1);
+ ADD_INSN1(cond_seq, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
+ ADD_INSNL(cond_seq, line_node, branchif, l1);
break;
default:
- ADD_INSN (cond_seq, line, dup);
+ ADD_INSN (cond_seq, line_node, dup);
CHECK(COMPILE(cond_seq, "when val", vals));
- ADD_INSN1(cond_seq, line, splatarray, Qfalse);
- ADD_INSN1(cond_seq, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE | VM_CHECKMATCH_ARRAY));
- ADD_INSNL(cond_seq, line, branchif, l1);
+ ADD_INSN1(cond_seq, line_node, splatarray, Qfalse);
+ ADD_INSN1(cond_seq, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE | VM_CHECKMATCH_ARRAY));
+ ADD_INSNL(cond_seq, line_node, branchif, l1);
break;
}
return COMPILE_OK;
}
+/* Multiple Assignment Handling
+ *
+ * In order to handle evaluation of multiple assignment such that the left hand side
+ * is evaluated before the right hand side, we need to process the left hand side
+ * and see if there are any attributes that need to be assigned, or constants set
+ * on explicit objects. If so, we add instructions to evaluate the receiver of
+ * any assigned attributes or constants before we process the right hand side.
+ *
+ * For a multiple assignment such as:
+ *
+ * l1.m1, l2[0] = r3, r4
+ *
+ * We start off evaluating l1 and l2, then we evaluate r3 and r4, then we
+ * assign the result of r3 to l1.m1, and then the result of r4 to l2.m2.
+ * On the VM stack, this looks like:
+ *
+ * self # putself
+ * l1 # send
+ * l1, self # putself
+ * l1, l2 # send
+ * l1, l2, 0 # putobject 0
+ * l1, l2, 0, [r3, r4] # after evaluation of RHS
+ * l1, l2, 0, [r3, r4], r4, r3 # expandarray
+ * l1, l2, 0, [r3, r4], r4, r3, l1 # topn 5
+ * l1, l2, 0, [r3, r4], r4, l1, r3 # swap
+ * l1, l2, 0, [r3, r4], r4, m1= # send
+ * l1, l2, 0, [r3, r4], r4 # pop
+ * l1, l2, 0, [r3, r4], r4, l2 # topn 3
+ * l1, l2, 0, [r3, r4], r4, l2, 0 # topn 3
+ * l1, l2, 0, [r3, r4], r4, l2, 0, r4 # topn 2
+ * l1, l2, 0, [r3, r4], r4, []= # send
+ * l1, l2, 0, [r3, r4], r4 # pop
+ * l1, l2, 0, [r3, r4] # pop
+ * [r3, r4], l2, 0, [r3, r4] # setn 3
+ * [r3, r4], l2, 0 # pop
+ * [r3, r4], l2 # pop
+ * [r3, r4] # pop
+ *
+ * This is made more complex when you have to handle splats, post args,
+ * and arbitrary levels of nesting. You need to keep track of the total
+ * number of attributes to set, and for each attribute, how many entries
+ * are on the stack before the final attribute, in order to correctly
+ * calculate the topn value to use to get the receiver of the attribute
+ * setter method.
+ *
+ * A brief description of the VM stack for simple multiple assignment
+ * with no splat (rhs_array will not be present if the return value of
+ * the multiple assignment is not needed):
+ *
+ * lhs_attr1, lhs_attr2, ..., rhs_array, ..., rhs_arg2, rhs_arg1
+ *
+ * For multiple assignment with splats, while processing the part before
+ * the splat (splat+post here is an array of the splat and the post arguments):
+ *
+ * lhs_attr1, lhs_attr2, ..., rhs_array, splat+post, ..., rhs_arg2, rhs_arg1
+ *
+ * When processing the splat and post arguments:
+ *
+ * lhs_attr1, lhs_attr2, ..., rhs_array, ..., post_arg2, post_arg1, splat
+ *
+ * When processing nested multiple assignment, existing values on the stack
+ * are kept. So for:
+ *
+ * (l1.m1, l2.m2), l3.m3, l4* = [r1, r2], r3, r4
+ *
+ * The stack layout would be the following before processing the nested
+ * multiple assignment:
+ *
+ * l1, l2, [[r1, r2], r3, r4], [r4], r3, [r1, r2]
+ *
+ * In order to handle this correctly, we need to keep track of the nesting
+ * level for each attribute assignment, as well as the attribute number
+ * (left hand side attributes are processed left to right) and number of
+ * arguments to pass to the setter method. struct masgn_lhs_node tracks
+ * this information.
+ *
+ * We also need to track information for the entire multiple assignment, such
+ * as the total number of arguments, and the current nesting level, to
+ * handle both nested multiple assignment as well as cases where the
+ * rhs is not needed. We also need to keep track of all attribute
+ * assignments in this, which we do using a linked listed. struct masgn_state
+ * tracks this information.
+ */
+
+struct masgn_lhs_node {
+ INSN *before_insn;
+ struct masgn_lhs_node *next;
+ const NODE *line_node;
+ int argn;
+ int num_args;
+ int lhs_pos;
+};
+
+struct masgn_state {
+ struct masgn_lhs_node *first_memo;
+ struct masgn_lhs_node *last_memo;
+ int lhs_level;
+ int num_args;
+ bool nested;
+};
static int
-compile_massign_lhs(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node)
+add_masgn_lhs_node(struct masgn_state *state, int lhs_pos, const NODE *line_node, int argc, INSN *before_insn)
+{
+ if (!state) {
+ rb_bug("no masgn_state");
+ }
+
+ struct masgn_lhs_node *memo;
+ memo = malloc(sizeof(struct masgn_lhs_node));
+ if (!memo) {
+ return COMPILE_NG;
+ }
+
+ memo->before_insn = before_insn;
+ memo->line_node = line_node;
+ memo->argn = state->num_args + 1;
+ memo->num_args = argc;
+ state->num_args += argc;
+ memo->lhs_pos = lhs_pos;
+ memo->next = NULL;
+ if (!state->first_memo) {
+ state->first_memo = memo;
+ }
+ else {
+ state->last_memo->next = memo;
+ }
+ state->last_memo = memo;
+
+ return COMPILE_OK;
+}
+
+static int compile_massign0(rb_iseq_t *iseq, LINK_ANCHOR *const pre, LINK_ANCHOR *const rhs, LINK_ANCHOR *const lhs, LINK_ANCHOR *const post, const NODE *const node, struct masgn_state *state, int popped);
+
+static int
+compile_massign_lhs(rb_iseq_t *iseq, LINK_ANCHOR *const pre, LINK_ANCHOR *const rhs, LINK_ANCHOR *const lhs, LINK_ANCHOR *const post, const NODE *const node, struct masgn_state *state, int lhs_pos)
{
switch (nd_type(node)) {
case NODE_ATTRASGN: {
- INSN *iobj;
- struct rb_call_info *ci;
- VALUE dupidx;
- int line = nd_line(node);
-
- CHECK(COMPILE_POPPED(ret, "masgn lhs (NODE_ATTRASGN)", node));
-
- iobj = (INSN *)get_prev_insn((INSN *)LAST_ELEMENT(ret)); /* send insn */
- ci = (struct rb_call_info *)OPERAND_AT(iobj, 0);
- ci->orig_argc += 1;
- dupidx = INT2FIX(ci->orig_argc);
-
- INSERT_BEFORE_INSN1(iobj, line, topn, dupidx);
- if (ci->flag & VM_CALL_ARGS_SPLAT) {
- --ci->orig_argc;
- INSERT_BEFORE_INSN1(iobj, line, newarray, INT2FIX(1));
- INSERT_BEFORE_INSN(iobj, line, concatarray);
- }
- ADD_INSN(ret, line, pop); /* result */
- break;
+ INSN *iobj;
+ const NODE *line_node = node;
+
+ CHECK(COMPILE_POPPED(pre, "masgn lhs (NODE_ATTRASGN)", node));
+
+ bool safenav_call = false;
+ LINK_ELEMENT *insn_element = LAST_ELEMENT(pre);
+ iobj = (INSN *)get_prev_insn((INSN *)insn_element); /* send insn */
+ ASSUME(iobj);
+ ELEM_REMOVE(insn_element);
+ if (!IS_INSN_ID(iobj, send)) {
+ safenav_call = true;
+ iobj = (INSN *)get_prev_insn(iobj);
+ ELEM_INSERT_NEXT(&iobj->link, insn_element);
+ }
+ (pre->last = iobj->link.prev)->next = 0;
+
+ const struct rb_callinfo *ci = (struct rb_callinfo *)OPERAND_AT(iobj, 0);
+ int argc = vm_ci_argc(ci) + 1;
+ ci = ci_argc_set(iseq, ci, argc);
+ OPERAND_AT(iobj, 0) = (VALUE)ci;
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
+
+ if (argc == 1) {
+ ADD_INSN(lhs, line_node, swap);
+ }
+ else {
+ ADD_INSN1(lhs, line_node, topn, INT2FIX(argc));
+ }
+
+ if (!add_masgn_lhs_node(state, lhs_pos, line_node, argc, (INSN *)LAST_ELEMENT(lhs))) {
+ return COMPILE_NG;
+ }
+
+ iobj->link.prev = lhs->last;
+ lhs->last->next = &iobj->link;
+ for (lhs->last = &iobj->link; lhs->last->next; lhs->last = lhs->last->next);
+ if (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT) {
+ int argc = vm_ci_argc(ci);
+ ci = ci_argc_set(iseq, ci, argc - 1);
+ OPERAND_AT(iobj, 0) = (VALUE)ci;
+ RB_OBJ_WRITTEN(iseq, Qundef, iobj);
+ INSERT_BEFORE_INSN1(iobj, line_node, newarray, INT2FIX(1));
+ INSERT_BEFORE_INSN(iobj, line_node, concatarray);
+ }
+ if (!safenav_call) {
+ ADD_INSN(lhs, line_node, pop);
+ if (argc != 1) {
+ ADD_INSN(lhs, line_node, pop);
+ }
+ }
+ for (int i=0; i < argc; i++) {
+ ADD_INSN(post, line_node, pop);
+ }
+ break;
}
case NODE_MASGN: {
- DECL_ANCHOR(anchor);
- INIT_ANCHOR(anchor);
- CHECK(COMPILE_POPPED(anchor, "nest masgn lhs", node));
- ELEM_REMOVE(FIRST_ELEMENT(anchor));
- ADD_SEQ(ret, anchor);
- break;
+ DECL_ANCHOR(nest_rhs);
+ INIT_ANCHOR(nest_rhs);
+ DECL_ANCHOR(nest_lhs);
+ INIT_ANCHOR(nest_lhs);
+
+ int prev_level = state->lhs_level;
+ bool prev_nested = state->nested;
+ state->nested = 1;
+ state->lhs_level = lhs_pos - 1;
+ CHECK(compile_massign0(iseq, pre, nest_rhs, nest_lhs, post, node, state, 1));
+ state->lhs_level = prev_level;
+ state->nested = prev_nested;
+
+ ADD_SEQ(lhs, nest_rhs);
+ ADD_SEQ(lhs, nest_lhs);
+ break;
}
+ case NODE_CDECL:
+ if (!node->nd_vid) {
+ /* Special handling only needed for expr::C, not for C */
+ INSN *iobj;
+
+ CHECK(COMPILE_POPPED(pre, "masgn lhs (NODE_CDECL)", node));
+
+ LINK_ELEMENT *insn_element = LAST_ELEMENT(pre);
+ iobj = (INSN *)insn_element; /* setconstant insn */
+ ELEM_REMOVE((LINK_ELEMENT *)get_prev_insn((INSN *)get_prev_insn(iobj)));
+ ELEM_REMOVE((LINK_ELEMENT *)get_prev_insn(iobj));
+ ELEM_REMOVE(insn_element);
+ pre->last = iobj->link.prev;
+ ADD_ELEM(lhs, (LINK_ELEMENT *)iobj);
+
+ if (!add_masgn_lhs_node(state, lhs_pos, node, 1, (INSN *)LAST_ELEMENT(lhs))) {
+ return COMPILE_NG;
+ }
+
+ ADD_INSN(post, node, pop);
+ break;
+ }
+ /* Fallthrough */
default: {
- DECL_ANCHOR(anchor);
- INIT_ANCHOR(anchor);
- CHECK(COMPILE_POPPED(anchor, "masgn lhs", node));
- ELEM_REMOVE(FIRST_ELEMENT(anchor));
- ADD_SEQ(ret, anchor);
+ DECL_ANCHOR(anchor);
+ INIT_ANCHOR(anchor);
+ CHECK(COMPILE_POPPED(anchor, "masgn lhs", node));
+ ELEM_REMOVE(FIRST_ELEMENT(anchor));
+ ADD_SEQ(lhs, anchor);
}
}
@@ -4437,15 +5184,15 @@ static int
compile_massign_opt_lhs(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *lhsn)
{
if (lhsn) {
- CHECK(compile_massign_opt_lhs(iseq, ret, lhsn->nd_next));
- CHECK(compile_massign_lhs(iseq, ret, lhsn->nd_head));
+ CHECK(compile_massign_opt_lhs(iseq, ret, lhsn->nd_next));
+ CHECK(compile_massign_lhs(iseq, ret, ret, ret, ret, lhsn->nd_head, NULL, 0));
}
return COMPILE_OK;
}
static int
compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
- const NODE *rhsn, const NODE *orig_lhsn)
+ const NODE *rhsn, const NODE *orig_lhsn)
{
VALUE mem[64];
const int memsize = numberof(mem);
@@ -4458,177 +5205,211 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
int i; \
if (memindex == memsize) return 0; \
for (i=0; i<memindex; i++) { \
- if (mem[i] == (v)) return 0; \
+ if (mem[i] == (v)) return 0; \
} \
mem[memindex++] = (v); \
}
- if (rhsn == 0 || nd_type(rhsn) != NODE_LIST) {
- return 0;
+ if (rhsn == 0 || !nd_type_p(rhsn, NODE_LIST)) {
+ return 0;
}
while (lhsn) {
- const NODE *ln = lhsn->nd_head;
- switch (nd_type(ln)) {
- case NODE_LASGN:
- MEMORY(ln->nd_vid);
- break;
- case NODE_DASGN:
- case NODE_DASGN_CURR:
- case NODE_IASGN:
- case NODE_CVASGN:
- MEMORY(ln->nd_vid);
- break;
- default:
- return 0;
- }
- lhsn = lhsn->nd_next;
- llen++;
+ const NODE *ln = lhsn->nd_head;
+ switch (nd_type(ln)) {
+ case NODE_LASGN:
+ MEMORY(ln->nd_vid);
+ break;
+ case NODE_DASGN:
+ case NODE_IASGN:
+ case NODE_CVASGN:
+ MEMORY(ln->nd_vid);
+ break;
+ default:
+ return 0;
+ }
+ lhsn = lhsn->nd_next;
+ llen++;
}
while (rhsn) {
- if (llen <= rlen) {
+ if (llen <= rlen) {
NO_CHECK(COMPILE_POPPED(ret, "masgn val (popped)", rhsn->nd_head));
- }
- else {
+ }
+ else {
NO_CHECK(COMPILE(ret, "masgn val", rhsn->nd_head));
- }
- rhsn = rhsn->nd_next;
- rlen++;
+ }
+ rhsn = rhsn->nd_next;
+ rlen++;
}
if (llen > rlen) {
- for (i=0; i<llen-rlen; i++) {
- ADD_INSN(ret, nd_line(orig_lhsn), putnil);
- }
+ for (i=0; i<llen-rlen; i++) {
+ ADD_INSN(ret, orig_lhsn, putnil);
+ }
}
compile_massign_opt_lhs(iseq, ret, orig_lhsn);
return 1;
}
-static void
-adjust_stack(rb_iseq_t *iseq, LINK_ANCHOR *const ret, int line, int rlen, int llen)
+static int
+compile_massign0(rb_iseq_t *iseq, LINK_ANCHOR *const pre, LINK_ANCHOR *const rhs, LINK_ANCHOR *const lhs, LINK_ANCHOR *const post, const NODE *const node, struct masgn_state *state, int popped)
{
- if (rlen < llen) {
- do {ADD_INSN(ret, line, putnil);} while (++rlen < llen);
+ const NODE *rhsn = node->nd_value;
+ const NODE *splatn = node->nd_args;
+ const NODE *lhsn = node->nd_head;
+ const NODE *lhsn_count = lhsn;
+ int lhs_splat = (splatn && NODE_NAMED_REST_P(splatn)) ? 1 : 0;
+
+ int llen = 0;
+ int lpos = 0;
+ int expand = 1;
+
+ while (lhsn_count) {
+ llen++;
+ lhsn_count = lhsn_count->nd_next;
}
- else if (rlen > llen) {
- do {ADD_INSN(ret, line, pop);} while (--rlen > llen);
+ while (lhsn) {
+ CHECK(compile_massign_lhs(iseq, pre, rhs, lhs, post, lhsn->nd_head, state, (llen - lpos) + lhs_splat + state->lhs_level));
+ lpos++;
+ lhsn = lhsn->nd_next;
}
+
+ if (lhs_splat) {
+ if (nd_type_p(splatn, NODE_POSTARG)) {
+ /*a, b, *r, p1, p2 */
+ const NODE *postn = splatn->nd_2nd;
+ const NODE *restn = splatn->nd_1st;
+ int plen = (int)postn->nd_alen;
+ int ppos = 0;
+ int flag = 0x02 | (NODE_NAMED_REST_P(restn) ? 0x01 : 0x00);
+
+ ADD_INSN2(lhs, splatn, expandarray, INT2FIX(plen), INT2FIX(flag));
+
+ if (NODE_NAMED_REST_P(restn)) {
+ CHECK(compile_massign_lhs(iseq, pre, rhs, lhs, post, restn, state, 1 + plen + state->lhs_level));
+ }
+ while (postn) {
+ CHECK(compile_massign_lhs(iseq, pre, rhs, lhs, post, postn->nd_head, state, (plen - ppos) + state->lhs_level));
+ ppos++;
+ postn = postn->nd_next;
+ }
+ }
+ else {
+ /* a, b, *r */
+ CHECK(compile_massign_lhs(iseq, pre, rhs, lhs, post, splatn, state, 1 + state->lhs_level));
+ }
+ }
+
+
+ if (!state->nested) {
+ NO_CHECK(COMPILE(rhs, "normal masgn rhs", rhsn));
+ }
+
+ if (!popped) {
+ ADD_INSN(rhs, node, dup);
+ }
+ if (expand) {
+ ADD_INSN2(rhs, node, expandarray, INT2FIX(llen), INT2FIX(lhs_splat));
+ }
+ return COMPILE_OK;
}
static int
compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const NODE *rhsn = node->nd_value;
- const NODE *splatn = node->nd_args;
- const NODE *lhsn = node->nd_head;
- int lhs_splat = (splatn && NODE_NAMED_REST_P(splatn)) ? 1 : 0;
-
- if (!popped || splatn || !compile_massign_opt(iseq, ret, rhsn, lhsn)) {
- int llen = 0;
- int expand = 1;
- DECL_ANCHOR(lhsseq);
-
- INIT_ANCHOR(lhsseq);
-
- while (lhsn) {
- CHECK(compile_massign_lhs(iseq, lhsseq, lhsn->nd_head));
- llen += 1;
- lhsn = lhsn->nd_next;
- }
-
- NO_CHECK(COMPILE(ret, "normal masgn rhs", rhsn));
-
- if (!popped) {
- ADD_INSN(ret, nd_line(node), dup);
- }
- else if (!lhs_splat) {
- INSN *last = (INSN*)ret->last;
- if (IS_INSN(&last->link) &&
- IS_INSN_ID(last, newarray) &&
- last->operand_size == 1) {
- int rlen = FIX2INT(OPERAND_AT(last, 0));
- /* special case: assign to aset or attrset */
- if (llen == 2) {
- POP_ELEMENT(ret);
- adjust_stack(iseq, ret, nd_line(node), rlen, llen);
- ADD_INSN(ret, nd_line(node), swap);
- expand = 0;
- }
- else if (llen > 2 && llen != rlen) {
- POP_ELEMENT(ret);
- adjust_stack(iseq, ret, nd_line(node), rlen, llen);
- ADD_INSN1(ret, nd_line(node), reverse, INT2FIX(llen));
- expand = 0;
- }
- else if (llen > 2) {
- last->insn_id = BIN(reverse);
- expand = 0;
- }
- }
- }
- if (expand) {
- ADD_INSN2(ret, nd_line(node), expandarray,
- INT2FIX(llen), INT2FIX(lhs_splat));
- }
- ADD_SEQ(ret, lhsseq);
-
- if (lhs_splat) {
- if (nd_type(splatn) == NODE_POSTARG) {
- /*a, b, *r, p1, p2 */
- const NODE *postn = splatn->nd_2nd;
- const NODE *restn = splatn->nd_1st;
- int num = (int)postn->nd_alen;
- int flag = 0x02 | (NODE_NAMED_REST_P(restn) ? 0x01 : 0x00);
-
- ADD_INSN2(ret, nd_line(splatn), expandarray,
- INT2FIX(num), INT2FIX(flag));
-
- if (NODE_NAMED_REST_P(restn)) {
- CHECK(compile_massign_lhs(iseq, ret, restn));
- }
- while (postn) {
- CHECK(compile_massign_lhs(iseq, ret, postn->nd_head));
- postn = postn->nd_next;
- }
- }
- else {
- /* a, b, *r */
- CHECK(compile_massign_lhs(iseq, ret, splatn));
- }
- }
+ if (!popped || node->nd_args || !compile_massign_opt(iseq, ret, node->nd_value, node->nd_head)) {
+ struct masgn_state state;
+ state.lhs_level = popped ? 0 : 1;
+ state.nested = 0;
+ state.num_args = 0;
+ state.first_memo = NULL;
+ state.last_memo = NULL;
+
+ DECL_ANCHOR(pre);
+ INIT_ANCHOR(pre);
+ DECL_ANCHOR(rhs);
+ INIT_ANCHOR(rhs);
+ DECL_ANCHOR(lhs);
+ INIT_ANCHOR(lhs);
+ DECL_ANCHOR(post);
+ INIT_ANCHOR(post);
+ int ok = compile_massign0(iseq, pre, rhs, lhs, post, node, &state, popped);
+
+ struct masgn_lhs_node *memo = state.first_memo, *tmp_memo;
+ while (memo) {
+ VALUE topn_arg = INT2FIX((state.num_args - memo->argn) + memo->lhs_pos);
+ for (int i = 0; i < memo->num_args; i++) {
+ INSERT_BEFORE_INSN1(memo->before_insn, memo->line_node, topn, topn_arg);
+ }
+ tmp_memo = memo->next;
+ free(memo);
+ memo = tmp_memo;
+ }
+ CHECK(ok);
+
+ ADD_SEQ(ret, pre);
+ ADD_SEQ(ret, rhs);
+ ADD_SEQ(ret, lhs);
+ if (!popped && state.num_args >= 1) {
+ /* make sure rhs array is returned before popping */
+ ADD_INSN1(ret, node, setn, INT2FIX(state.num_args));
+ }
+ ADD_SEQ(ret, post);
}
return COMPILE_OK;
}
+static VALUE
+collect_const_segments(rb_iseq_t *iseq, const NODE *node)
+{
+ VALUE arr = rb_ary_new();
+ for (;;) {
+ switch (nd_type(node)) {
+ case NODE_CONST:
+ rb_ary_unshift(arr, ID2SYM(node->nd_vid));
+ return arr;
+ case NODE_COLON3:
+ rb_ary_unshift(arr, ID2SYM(node->nd_mid));
+ rb_ary_unshift(arr, ID2SYM(idNULL));
+ return arr;
+ case NODE_COLON2:
+ rb_ary_unshift(arr, ID2SYM(node->nd_mid));
+ node = node->nd_head;
+ break;
+ default:
+ return Qfalse;
+ }
+ }
+}
+
static int
compile_const_prefix(rb_iseq_t *iseq, const NODE *const node,
- LINK_ANCHOR *const pref, LINK_ANCHOR *const body)
+ LINK_ANCHOR *const pref, LINK_ANCHOR *const body)
{
switch (nd_type(node)) {
case NODE_CONST:
- debugi("compile_const_prefix - colon", node->nd_vid);
- ADD_INSN1(body, nd_line(node), putobject, Qtrue);
- ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_vid));
- break;
+ debugi("compile_const_prefix - colon", node->nd_vid);
+ ADD_INSN1(body, node, putobject, Qtrue);
+ ADD_INSN1(body, node, getconstant, ID2SYM(node->nd_vid));
+ break;
case NODE_COLON3:
- debugi("compile_const_prefix - colon3", node->nd_mid);
- ADD_INSN(body, nd_line(node), pop);
- ADD_INSN1(body, nd_line(node), putobject, rb_cObject);
- ADD_INSN1(body, nd_line(node), putobject, Qtrue);
- ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_mid));
- break;
+ debugi("compile_const_prefix - colon3", node->nd_mid);
+ ADD_INSN(body, node, pop);
+ ADD_INSN1(body, node, putobject, rb_cObject);
+ ADD_INSN1(body, node, putobject, Qtrue);
+ ADD_INSN1(body, node, getconstant, ID2SYM(node->nd_mid));
+ break;
case NODE_COLON2:
- CHECK(compile_const_prefix(iseq, node->nd_head, pref, body));
- debugi("compile_const_prefix - colon2", node->nd_mid);
- ADD_INSN1(body, nd_line(node), putobject, Qfalse);
- ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_mid));
- break;
+ CHECK(compile_const_prefix(iseq, node->nd_head, pref, body));
+ debugi("compile_const_prefix - colon2", node->nd_mid);
+ ADD_INSN1(body, node, putobject, Qfalse);
+ ADD_INSN1(body, node, getconstant, ID2SYM(node->nd_mid));
+ break;
default:
- CHECK(COMPILE(pref, "const colon2 prefix", node));
- break;
+ CHECK(COMPILE(pref, "const colon2 prefix", node));
+ break;
}
return COMPILE_OK;
}
@@ -4636,28 +5417,28 @@ compile_const_prefix(rb_iseq_t *iseq, const NODE *const node,
static int
compile_cpath(LINK_ANCHOR *const ret, rb_iseq_t *iseq, const NODE *cpath)
{
- if (nd_type(cpath) == NODE_COLON3) {
- /* toplevel class ::Foo */
- ADD_INSN1(ret, nd_line(cpath), putobject, rb_cObject);
- return VM_DEFINECLASS_FLAG_SCOPED;
+ if (nd_type_p(cpath, NODE_COLON3)) {
+ /* toplevel class ::Foo */
+ ADD_INSN1(ret, cpath, putobject, rb_cObject);
+ return VM_DEFINECLASS_FLAG_SCOPED;
}
else if (cpath->nd_head) {
- /* Bar::Foo */
+ /* Bar::Foo */
NO_CHECK(COMPILE(ret, "nd_else->nd_head", cpath->nd_head));
- return VM_DEFINECLASS_FLAG_SCOPED;
+ return VM_DEFINECLASS_FLAG_SCOPED;
}
else {
- /* class at cbase Foo */
- ADD_INSN1(ret, nd_line(cpath), putspecialobject,
- INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
- return 0;
+ /* class at cbase Foo */
+ ADD_INSN1(ret, cpath, putspecialobject,
+ INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
+ return 0;
}
}
static inline int
private_recv_p(const NODE *node)
{
- if (nd_type(node->nd_recv) == NODE_SELF) {
+ if (nd_type_p(node->nd_recv, NODE_SELF)) {
NODE *self = node->nd_recv;
return self->nd_state != 0;
}
@@ -4666,43 +5447,48 @@ private_recv_p(const NODE *node)
static void
defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
- const NODE *const node, LABEL **lfinish, VALUE needstr);
+ const NODE *const node, LABEL **lfinish, VALUE needstr);
+
+static int
+compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const enum node_type type, const NODE *const line_node, int popped, bool assume_receiver);
static void
defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
- const NODE *const node, LABEL **lfinish, VALUE needstr)
+ const NODE *const node, LABEL **lfinish, VALUE needstr,
+ bool keep_result)
{
enum defined_type expr_type = DEFINED_NOT_DEFINED;
enum node_type type;
const int line = nd_line(node);
+ const NODE *line_node = node;
switch (type = nd_type(node)) {
- /* easy literals */
+ /* easy literals */
case NODE_NIL:
- expr_type = DEFINED_NIL;
- break;
+ expr_type = DEFINED_NIL;
+ break;
case NODE_SELF:
- expr_type = DEFINED_SELF;
- break;
+ expr_type = DEFINED_SELF;
+ break;
case NODE_TRUE:
- expr_type = DEFINED_TRUE;
- break;
+ expr_type = DEFINED_TRUE;
+ break;
case NODE_FALSE:
- expr_type = DEFINED_FALSE;
- break;
+ expr_type = DEFINED_FALSE;
+ break;
case NODE_LIST:{
- const NODE *vals = node;
+ const NODE *vals = node;
- do {
- defined_expr0(iseq, ret, vals->nd_head, lfinish, Qfalse);
+ do {
+ defined_expr0(iseq, ret, vals->nd_head, lfinish, Qfalse, false);
- if (!lfinish[1]) {
+ if (!lfinish[1]) {
lfinish[1] = NEW_LABEL(line);
- }
- ADD_INSNL(ret, line, branchunless, lfinish[1]);
- } while ((vals = vals->nd_next) != NULL);
+ }
+ ADD_INSNL(ret, line_node, branchunless, lfinish[1]);
+ } while ((vals = vals->nd_next) != NULL);
}
/* fall through */
case NODE_STR:
@@ -4711,110 +5497,139 @@ defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
case NODE_AND:
case NODE_OR:
default:
- expr_type = DEFINED_EXPR;
- break;
+ expr_type = DEFINED_EXPR;
+ break;
- /* variables */
+ /* variables */
case NODE_LVAR:
case NODE_DVAR:
- expr_type = DEFINED_LVAR;
- break;
+ expr_type = DEFINED_LVAR;
+ break;
+#define PUSH_VAL(type) (needstr == Qfalse ? Qtrue : rb_iseq_defined_string(type))
case NODE_IVAR:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_IVAR),
- ID2SYM(node->nd_vid), needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_IVAR),
+ ID2SYM(node->nd_vid), PUSH_VAL(DEFINED_IVAR));
return;
case NODE_GVAR:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_GVAR),
- ID2SYM(node->nd_entry->id), needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_GVAR),
+ ID2SYM(node->nd_entry), PUSH_VAL(DEFINED_GVAR));
return;
case NODE_CVAR:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_CVAR),
- ID2SYM(node->nd_vid), needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_CVAR),
+ ID2SYM(node->nd_vid), PUSH_VAL(DEFINED_CVAR));
return;
case NODE_CONST:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_CONST),
- ID2SYM(node->nd_vid), needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_CONST),
+ ID2SYM(node->nd_vid), PUSH_VAL(DEFINED_CONST));
return;
case NODE_COLON2:
- if (!lfinish[1]) {
+ if (!lfinish[1]) {
lfinish[1] = NEW_LABEL(line);
- }
- defined_expr0(iseq, ret, node->nd_head, lfinish, Qfalse);
- ADD_INSNL(ret, line, branchunless, lfinish[1]);
+ }
+ defined_expr0(iseq, ret, node->nd_head, lfinish, Qfalse, false);
+ ADD_INSNL(ret, line_node, branchunless, lfinish[1]);
NO_CHECK(COMPILE(ret, "defined/colon2#nd_head", node->nd_head));
- ADD_INSN3(ret, line, defined,
- (rb_is_const_id(node->nd_mid) ?
- INT2FIX(DEFINED_CONST_FROM) : INT2FIX(DEFINED_METHOD)),
- ID2SYM(node->nd_mid), needstr);
+ if (rb_is_const_id(node->nd_mid)) {
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_CONST_FROM),
+ ID2SYM(node->nd_mid), PUSH_VAL(DEFINED_CONST));
+ }
+ else {
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_METHOD),
+ ID2SYM(node->nd_mid), PUSH_VAL(DEFINED_METHOD));
+ }
return;
case NODE_COLON3:
- ADD_INSN1(ret, line, putobject, rb_cObject);
- ADD_INSN3(ret, line, defined,
- INT2FIX(DEFINED_CONST_FROM), ID2SYM(node->nd_mid), needstr);
+ ADD_INSN1(ret, line_node, putobject, rb_cObject);
+ ADD_INSN3(ret, line_node, defined,
+ INT2FIX(DEFINED_CONST_FROM), ID2SYM(node->nd_mid), PUSH_VAL(DEFINED_CONST));
return;
- /* method dispatch */
+ /* method dispatch */
case NODE_CALL:
case NODE_OPCALL:
case NODE_VCALL:
case NODE_FCALL:
case NODE_ATTRASGN:{
- const int explicit_receiver =
- (type == NODE_CALL || type == NODE_OPCALL ||
- (type == NODE_ATTRASGN && !private_recv_p(node)));
+ const int explicit_receiver =
+ (type == NODE_CALL || type == NODE_OPCALL ||
+ (type == NODE_ATTRASGN && !private_recv_p(node)));
- if (!lfinish[1] && (node->nd_args || explicit_receiver)) {
- lfinish[1] = NEW_LABEL(line);
- }
- if (node->nd_args) {
- defined_expr0(iseq, ret, node->nd_args, lfinish, Qfalse);
- ADD_INSNL(ret, line, branchunless, lfinish[1]);
- }
- if (explicit_receiver) {
- defined_expr0(iseq, ret, node->nd_recv, lfinish, Qfalse);
- ADD_INSNL(ret, line, branchunless, lfinish[1]);
- NO_CHECK(COMPILE(ret, "defined/recv", node->nd_recv));
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_METHOD),
- ID2SYM(node->nd_mid), needstr);
- }
- else {
- ADD_INSN(ret, line, putself);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_FUNC),
- ID2SYM(node->nd_mid), needstr);
- }
+ if (node->nd_args || explicit_receiver) {
+ if (!lfinish[1]) {
+ lfinish[1] = NEW_LABEL(line);
+ }
+ if (!lfinish[2]) {
+ lfinish[2] = NEW_LABEL(line);
+ }
+ }
+ if (node->nd_args) {
+ defined_expr0(iseq, ret, node->nd_args, lfinish, Qfalse, false);
+ ADD_INSNL(ret, line_node, branchunless, lfinish[1]);
+ }
+ if (explicit_receiver) {
+ defined_expr0(iseq, ret, node->nd_recv, lfinish, Qfalse, true);
+ switch (nd_type(node->nd_recv)) {
+ case NODE_CALL:
+ case NODE_OPCALL:
+ case NODE_VCALL:
+ case NODE_FCALL:
+ case NODE_ATTRASGN:
+ ADD_INSNL(ret, line_node, branchunless, lfinish[2]);
+ compile_call(iseq, ret, node->nd_recv, nd_type(node->nd_recv), line_node, 0, true);
+ break;
+ default:
+ ADD_INSNL(ret, line_node, branchunless, lfinish[1]);
+ NO_CHECK(COMPILE(ret, "defined/recv", node->nd_recv));
+ break;
+ }
+ if (keep_result) {
+ ADD_INSN(ret, line_node, dup);
+ }
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_METHOD),
+ ID2SYM(node->nd_mid), PUSH_VAL(DEFINED_METHOD));
+ }
+ else {
+ ADD_INSN(ret, line_node, putself);
+ if (keep_result) {
+ ADD_INSN(ret, line_node, dup);
+ }
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_FUNC),
+ ID2SYM(node->nd_mid), PUSH_VAL(DEFINED_METHOD));
+ }
return;
}
case NODE_YIELD:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_YIELD), 0,
- needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_YIELD), 0,
+ PUSH_VAL(DEFINED_YIELD));
return;
case NODE_BACK_REF:
case NODE_NTH_REF:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_REF),
- INT2FIX((node->nd_nth << 1) | (type == NODE_BACK_REF)),
- needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_REF),
+ INT2FIX((node->nd_nth << 1) | (type == NODE_BACK_REF)),
+ PUSH_VAL(DEFINED_GVAR));
return;
case NODE_SUPER:
case NODE_ZSUPER:
- ADD_INSN(ret, line, putnil);
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_ZSUPER), 0,
- needstr);
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_ZSUPER), 0,
+ PUSH_VAL(DEFINED_ZSUPER));
return;
+#undef PUSH_VAL
case NODE_OP_ASGN1:
case NODE_OP_ASGN2:
case NODE_OP_ASGN_OR:
@@ -4822,55 +5637,55 @@ defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
case NODE_MASGN:
case NODE_LASGN:
case NODE_DASGN:
- case NODE_DASGN_CURR:
case NODE_GASGN:
case NODE_IASGN:
case NODE_CDECL:
case NODE_CVASGN:
- expr_type = DEFINED_ASGN;
- break;
+ expr_type = DEFINED_ASGN;
+ break;
}
assert(expr_type != DEFINED_NOT_DEFINED);
if (needstr != Qfalse) {
VALUE str = rb_iseq_defined_string(expr_type);
- ADD_INSN1(ret, line, putobject, str);
+ ADD_INSN1(ret, line_node, putobject, str);
}
else {
- ADD_INSN1(ret, line, putobject, Qtrue);
+ ADD_INSN1(ret, line_node, putobject, Qtrue);
}
}
static void
build_defined_rescue_iseq(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const void *unused)
{
- ADD_INSN(ret, 0, putnil);
+ NODE dummy_line_node = generate_dummy_line_node(0, -1);
+ ADD_INSN(ret, &dummy_line_node, putnil);
iseq_set_exception_local_table(iseq);
}
static void
defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
- const NODE *const node, LABEL **lfinish, VALUE needstr)
+ const NODE *const node, LABEL **lfinish, VALUE needstr)
{
LINK_ELEMENT *lcur = ret->last;
- defined_expr0(iseq, ret, node, lfinish, needstr);
+ defined_expr0(iseq, ret, node, lfinish, needstr, false);
if (lfinish[1]) {
- int line = nd_line(node);
- LABEL *lstart = NEW_LABEL(line);
- LABEL *lend = NEW_LABEL(line);
- const rb_iseq_t *rescue;
+ int line = nd_line(node);
+ LABEL *lstart = NEW_LABEL(line);
+ LABEL *lend = NEW_LABEL(line);
+ const rb_iseq_t *rescue;
struct rb_iseq_new_with_callback_callback_func *ifunc =
rb_iseq_new_with_callback_new_callback(build_defined_rescue_iseq, NULL);
rescue = new_child_iseq_with_callback(iseq, ifunc,
- rb_str_concat(rb_str_new2("defined guard in "),
- iseq->body->location.label),
- iseq, ISEQ_TYPE_RESCUE, 0);
- lstart->rescued = LABEL_RESCUE_BEG;
- lend->rescued = LABEL_RESCUE_END;
- APPEND_LABEL(ret, lcur, lstart);
- ADD_LABEL(ret, lend);
- ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lfinish[1]);
+ rb_str_concat(rb_str_new2("defined guard in "),
+ ISEQ_BODY(iseq)->location.label),
+ iseq, ISEQ_TYPE_RESCUE, 0);
+ lstart->rescued = LABEL_RESCUE_BEG;
+ lend->rescued = LABEL_RESCUE_END;
+ APPEND_LABEL(ret, lcur, lstart);
+ ADD_LABEL(ret, lend);
+ ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lfinish[1]);
}
}
@@ -4878,23 +5693,28 @@ static int
compile_defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE needstr)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
if (!node->nd_head) {
- VALUE str = rb_iseq_defined_string(DEFINED_NIL);
- ADD_INSN1(ret, line, putobject, str);
+ VALUE str = rb_iseq_defined_string(DEFINED_NIL);
+ ADD_INSN1(ret, line_node, putobject, str);
}
else {
- LABEL *lfinish[2];
- LINK_ELEMENT *last = ret->last;
- lfinish[0] = NEW_LABEL(line);
- lfinish[1] = 0;
- defined_expr(iseq, ret, node->nd_head, lfinish, needstr);
- if (lfinish[1]) {
- ELEM_INSERT_NEXT(last, &new_insn_body(iseq, line, BIN(putnil), 0)->link);
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
- ADD_LABEL(ret, lfinish[1]);
- }
- ADD_LABEL(ret, lfinish[0]);
+ LABEL *lfinish[3];
+ LINK_ELEMENT *last = ret->last;
+ lfinish[0] = NEW_LABEL(line);
+ lfinish[1] = 0;
+ lfinish[2] = 0;
+ defined_expr(iseq, ret, node->nd_head, lfinish, needstr);
+ if (lfinish[1]) {
+ ELEM_INSERT_NEXT(last, &new_insn_body(iseq, line_node, BIN(putnil), 0)->link);
+ ADD_INSN(ret, line_node, swap);
+ if (lfinish[2]) {
+ ADD_LABEL(ret, lfinish[2]);
+ }
+ ADD_INSN(ret, line_node, pop);
+ ADD_LABEL(ret, lfinish[1]);
+ }
+ ADD_LABEL(ret, lfinish[0]);
}
return COMPILE_OK;
}
@@ -4905,27 +5725,27 @@ make_name_for_block(const rb_iseq_t *orig_iseq)
int level = 1;
const rb_iseq_t *iseq = orig_iseq;
- if (orig_iseq->body->parent_iseq != 0) {
- while (orig_iseq->body->local_iseq != iseq) {
- if (iseq->body->type == ISEQ_TYPE_BLOCK) {
- level++;
- }
- iseq = iseq->body->parent_iseq;
- }
+ if (ISEQ_BODY(orig_iseq)->parent_iseq != 0) {
+ while (ISEQ_BODY(orig_iseq)->local_iseq != iseq) {
+ if (ISEQ_BODY(iseq)->type == ISEQ_TYPE_BLOCK) {
+ level++;
+ }
+ iseq = ISEQ_BODY(iseq)->parent_iseq;
+ }
}
if (level == 1) {
- return rb_sprintf("block in %"PRIsVALUE, iseq->body->location.label);
+ return rb_sprintf("block in %"PRIsVALUE, ISEQ_BODY(iseq)->location.label);
}
else {
- return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, iseq->body->location.label);
+ return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, ISEQ_BODY(iseq)->location.label);
}
}
static void
push_ensure_entry(rb_iseq_t *iseq,
- struct iseq_compile_data_ensure_node_stack *enl,
- struct ensure_range *er, const NODE *const node)
+ struct iseq_compile_data_ensure_node_stack *enl,
+ struct ensure_range *er, const NODE *const node)
{
enl->ensure_node = node;
enl->prev = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack; /* prev */
@@ -4935,13 +5755,13 @@ push_ensure_entry(rb_iseq_t *iseq,
static void
add_ensure_range(rb_iseq_t *iseq, struct ensure_range *erange,
- LABEL *lstart, LABEL *lend)
+ LABEL *lstart, LABEL *lend)
{
struct ensure_range *ne =
- compile_data_alloc(iseq, sizeof(struct ensure_range));
+ compile_data_alloc(iseq, sizeof(struct ensure_range));
while (erange->next != 0) {
- erange = erange->next;
+ erange = erange->next;
}
ne->next = 0;
ne->begin = lend;
@@ -4951,36 +5771,51 @@ add_ensure_range(rb_iseq_t *iseq, struct ensure_range *erange,
erange->next = ne;
}
+static bool
+can_add_ensure_iseq(const rb_iseq_t *iseq)
+{
+ struct iseq_compile_data_ensure_node_stack *e;
+ if (ISEQ_COMPILE_DATA(iseq)->in_rescue && (e = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack) != NULL) {
+ while (e) {
+ if (e->ensure_node) return false;
+ e = e->prev;
+ }
+ }
+ return true;
+}
+
static void
add_ensure_iseq(LINK_ANCHOR *const ret, rb_iseq_t *iseq, int is_return)
{
+ assert(can_add_ensure_iseq(iseq));
+
struct iseq_compile_data_ensure_node_stack *enlp =
- ISEQ_COMPILE_DATA(iseq)->ensure_node_stack;
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack;
struct iseq_compile_data_ensure_node_stack *prev_enlp = enlp;
DECL_ANCHOR(ensure);
INIT_ANCHOR(ensure);
while (enlp) {
- if (enlp->erange != NULL) {
- DECL_ANCHOR(ensure_part);
- LABEL *lstart = NEW_LABEL(0);
- LABEL *lend = NEW_LABEL(0);
- INIT_ANCHOR(ensure_part);
+ if (enlp->erange != NULL) {
+ DECL_ANCHOR(ensure_part);
+ LABEL *lstart = NEW_LABEL(0);
+ LABEL *lend = NEW_LABEL(0);
+ INIT_ANCHOR(ensure_part);
- add_ensure_range(iseq, enlp->erange, lstart, lend);
+ add_ensure_range(iseq, enlp->erange, lstart, lend);
- ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enlp->prev;
- ADD_LABEL(ensure_part, lstart);
+ ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enlp->prev;
+ ADD_LABEL(ensure_part, lstart);
NO_CHECK(COMPILE_POPPED(ensure_part, "ensure part", enlp->ensure_node));
- ADD_LABEL(ensure_part, lend);
- ADD_SEQ(ensure, ensure_part);
- }
- else {
- if (!is_return) {
- break;
- }
- }
- enlp = enlp->prev;
+ ADD_LABEL(ensure_part, lend);
+ ADD_SEQ(ensure, ensure_part);
+ }
+ else {
+ if (!is_return) {
+ break;
+ }
+ }
+ enlp = enlp->prev;
}
ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = prev_enlp;
ADD_SEQ(ret, ensure);
@@ -4991,7 +5826,7 @@ check_keyword(const NODE *node)
{
/* This check is essentially a code clone of compile_keyword_arg. */
- if (nd_type(node) == NODE_LIST) {
+ if (nd_type_p(node, NODE_LIST)) {
while (node->nd_next) {
node = node->nd_next;
}
@@ -5003,24 +5838,24 @@ check_keyword(const NODE *node)
static VALUE
setup_args_core(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
- int dup_rest, unsigned int *flag, struct rb_call_info_kw_arg **keywords)
+ int dup_rest, unsigned int *flag, struct rb_callinfo_kwarg **keywords)
{
if (argn) {
switch (nd_type(argn)) {
case NODE_SPLAT: {
NO_CHECK(COMPILE(args, "args (splat)", argn->nd_head));
- ADD_INSN1(args, nd_line(argn), splatarray, dup_rest ? Qtrue : Qfalse);
+ ADD_INSN1(args, argn, splatarray, RBOOL(dup_rest));
if (flag) *flag |= VM_CALL_ARGS_SPLAT;
return INT2FIX(1);
}
case NODE_ARGSCAT:
case NODE_ARGSPUSH: {
- int next_is_list = (nd_type(argn->nd_head) == NODE_LIST);
+ int next_is_list = (nd_type_p(argn->nd_head, NODE_LIST));
VALUE argc = setup_args_core(iseq, args, argn->nd_head, 1, NULL, NULL);
- if (nd_type(argn->nd_body) == NODE_LIST) {
+ if (nd_type_p(argn->nd_body, NODE_LIST)) {
/* This branch is needed to avoid "newarraykwsplat" [Bug #16442] */
int rest_len = compile_args(iseq, args, argn->nd_body, NULL, NULL);
- ADD_INSN1(args, nd_line(argn), newarray, INT2FIX(rest_len));
+ ADD_INSN1(args, argn, newarray, INT2FIX(rest_len));
}
else {
NO_CHECK(COMPILE(args, "args (cat: splat)", argn->nd_body));
@@ -5032,20 +5867,20 @@ setup_args_core(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
if (check_keyword(argn->nd_body))
*flag |= VM_CALL_KW_SPLAT;
}
- if (nd_type(argn) == NODE_ARGSCAT) {
+ if (nd_type_p(argn, NODE_ARGSCAT)) {
if (next_is_list) {
- ADD_INSN1(args, nd_line(argn), splatarray, Qtrue);
+ ADD_INSN1(args, argn, splatarray, Qtrue);
return INT2FIX(FIX2INT(argc) + 1);
}
else {
- ADD_INSN1(args, nd_line(argn), splatarray, Qfalse);
- ADD_INSN(args, nd_line(argn), concatarray);
+ ADD_INSN1(args, argn, splatarray, Qfalse);
+ ADD_INSN(args, argn, concatarray);
return argc;
}
}
else {
- ADD_INSN1(args, nd_line(argn), newarray, INT2FIX(1));
- ADD_INSN(args, nd_line(argn), concatarray);
+ ADD_INSN1(args, argn, newarray, INT2FIX(1));
+ ADD_INSN(args, argn, concatarray);
return argc;
}
}
@@ -5063,26 +5898,28 @@ setup_args_core(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
static VALUE
setup_args(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
- unsigned int *flag, struct rb_call_info_kw_arg **keywords)
+ unsigned int *flag, struct rb_callinfo_kwarg **keywords)
{
VALUE ret;
- if (argn && nd_type(argn) == NODE_BLOCK_PASS) {
+ if (argn && nd_type_p(argn, NODE_BLOCK_PASS)) {
+ unsigned int dup_rest = 1;
DECL_ANCHOR(arg_block);
INIT_ANCHOR(arg_block);
NO_CHECK(COMPILE(arg_block, "block", argn->nd_body));
*flag |= VM_CALL_ARGS_BLOCKARG;
- ret = setup_args_core(iseq, args, argn->nd_head, 0, flag, keywords);
if (LIST_INSN_SIZE_ONE(arg_block)) {
LINK_ELEMENT *elem = FIRST_ELEMENT(arg_block);
- if (elem->type == ISEQ_ELEMENT_INSN) {
+ if (IS_INSN(elem)) {
INSN *iobj = (INSN *)elem;
if (iobj->insn_id == BIN(getblockparam)) {
iobj->insn_id = BIN(getblockparamproxy);
}
+ dup_rest = 0;
}
}
+ ret = setup_args_core(iseq, args, argn->nd_head, dup_rest, flag, keywords);
ADD_SEQ(args, arg_block);
}
else {
@@ -5097,10 +5934,10 @@ build_postexe_iseq(rb_iseq_t *iseq, LINK_ANCHOR *ret, const void *ptr)
const NODE *body = ptr;
int line = nd_line(body);
VALUE argc = INT2FIX(0);
- const rb_iseq_t *block = NEW_CHILD_ISEQ(body, make_name_for_block(iseq->body->parent_iseq), ISEQ_TYPE_BLOCK, line);
+ const rb_iseq_t *block = NEW_CHILD_ISEQ(body, make_name_for_block(ISEQ_BODY(iseq)->parent_iseq), ISEQ_TYPE_BLOCK, line);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_CALL_WITH_BLOCK(ret, line, id_core_set_postexe, argc, block);
+ ADD_INSN1(ret, body, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_CALL_WITH_BLOCK(ret, body, id_core_set_postexe, argc, block);
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)block);
iseq_set_local_table(iseq, 0);
}
@@ -5111,83 +5948,89 @@ compile_named_capture_assign(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE
const NODE *vars;
LINK_ELEMENT *last;
int line = nd_line(node);
+ const NODE *line_node = node;
LABEL *fail_label = NEW_LABEL(line), *end_label = NEW_LABEL(line);
#if !(defined(NAMED_CAPTURE_BY_SVAR) && NAMED_CAPTURE_BY_SVAR-0)
- ADD_INSN1(ret, line, getglobal, ((VALUE)rb_global_entry(idBACKREF) | 1));
+ ADD_INSN1(ret, line_node, getglobal, ID2SYM(idBACKREF));
#else
- ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */, INT2FIX(0));
+ ADD_INSN2(ret, line_node, getspecial, INT2FIX(1) /* '~' */, INT2FIX(0));
#endif
- ADD_INSN(ret, line, dup);
- ADD_INSNL(ret, line, branchunless, fail_label);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchunless, fail_label);
for (vars = node; vars; vars = vars->nd_next) {
- INSN *cap;
- if (vars->nd_next) {
- ADD_INSN(ret, line, dup);
- }
- last = ret->last;
+ INSN *cap;
+ if (vars->nd_next) {
+ ADD_INSN(ret, line_node, dup);
+ }
+ last = ret->last;
NO_CHECK(COMPILE_POPPED(ret, "capture", vars->nd_head));
- last = last->next; /* putobject :var */
- cap = new_insn_send(iseq, line, idAREF, INT2FIX(1),
- NULL, INT2FIX(0), NULL);
- ELEM_INSERT_PREV(last->next, (LINK_ELEMENT *)cap);
+ last = last->next; /* putobject :var */
+ cap = new_insn_send(iseq, line_node, idAREF, INT2FIX(1),
+ NULL, INT2FIX(0), NULL);
+ ELEM_INSERT_PREV(last->next, (LINK_ELEMENT *)cap);
#if !defined(NAMED_CAPTURE_SINGLE_OPT) || NAMED_CAPTURE_SINGLE_OPT-0
- if (!vars->nd_next && vars == node) {
- /* only one name */
- DECL_ANCHOR(nom);
+ if (!vars->nd_next && vars == node) {
+ /* only one name */
+ DECL_ANCHOR(nom);
- INIT_ANCHOR(nom);
- ADD_INSNL(nom, line, jump, end_label);
- ADD_LABEL(nom, fail_label);
+ INIT_ANCHOR(nom);
+ ADD_INSNL(nom, line_node, jump, end_label);
+ ADD_LABEL(nom, fail_label);
# if 0 /* $~ must be MatchData or nil */
- ADD_INSN(nom, line, pop);
- ADD_INSN(nom, line, putnil);
+ ADD_INSN(nom, line_node, pop);
+ ADD_INSN(nom, line_node, putnil);
# endif
- ADD_LABEL(nom, end_label);
- (nom->last->next = cap->link.next)->prev = nom->last;
- (cap->link.next = nom->anchor.next)->prev = &cap->link;
- return;
- }
+ ADD_LABEL(nom, end_label);
+ (nom->last->next = cap->link.next)->prev = nom->last;
+ (cap->link.next = nom->anchor.next)->prev = &cap->link;
+ return;
+ }
#endif
}
- ADD_INSNL(ret, line, jump, end_label);
+ ADD_INSNL(ret, line_node, jump, end_label);
ADD_LABEL(ret, fail_label);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
for (vars = node; vars; vars = vars->nd_next) {
- last = ret->last;
+ last = ret->last;
NO_CHECK(COMPILE_POPPED(ret, "capture", vars->nd_head));
- last = last->next; /* putobject :var */
- ((INSN*)last)->insn_id = BIN(putnil);
- ((INSN*)last)->operand_size = 0;
+ last = last->next; /* putobject :var */
+ ((INSN*)last)->insn_id = BIN(putnil);
+ ((INSN*)last)->operand_size = 0;
}
ADD_LABEL(ret, end_label);
}
static int
-number_literal_p(const NODE *n)
+optimizable_range_item_p(const NODE *n)
{
- return (n && nd_type(n) == NODE_LIT && RB_INTEGER_TYPE_P(n->nd_lit));
+ if (!n) return FALSE;
+ switch (nd_type(n)) {
+ case NODE_LIT:
+ return RB_INTEGER_TYPE_P(n->nd_lit);
+ case NODE_NIL:
+ return TRUE;
+ default:
+ return FALSE;
+ }
}
static int
compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const enum node_type type)
{
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const NODE *const node_body = type == NODE_IF ? node->nd_body : node->nd_else;
const NODE *const node_else = type == NODE_IF ? node->nd_else : node->nd_body;
const int line = nd_line(node);
- const int lineno = nd_first_lineno(node);
- const int column = nd_first_column(node);
- const int last_lineno = nd_last_lineno(node);
- const int last_column = nd_last_column(node);
+ const NODE *line_node = node;
DECL_ANCHOR(cond_seq);
DECL_ANCHOR(then_seq);
DECL_ANCHOR(else_seq);
LABEL *then_label, *else_label, *end_label;
VALUE branches = Qfalse;
- int ci_size, ci_kw_size;
+ int ci_size;
VALUE catch_table = ISEQ_COMPILE_DATA(iseq)->catch_table_ary;
long catch_table_size = NIL_P(catch_table) ? 0 : RARRAY_LEN(catch_table);
@@ -5199,15 +6042,13 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
end_label = 0;
compile_branch_condition(iseq, cond_seq, node->nd_cond,
- then_label, else_label);
+ then_label, else_label);
ci_size = body->ci_size;
- ci_kw_size = body->ci_kw_size;
CHECK(COMPILE_(then_seq, "then", node_body, popped));
catch_table = ISEQ_COMPILE_DATA(iseq)->catch_table_ary;
if (!then_label->refcnt) {
body->ci_size = ci_size;
- body->ci_kw_size = ci_kw_size;
if (!NIL_P(catch_table)) rb_ary_set_len(catch_table, catch_table_size);
}
else {
@@ -5215,12 +6056,10 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
}
ci_size = body->ci_size;
- ci_kw_size = body->ci_kw_size;
CHECK(COMPILE_(else_seq, "else", node_else, popped));
catch_table = ISEQ_COMPILE_DATA(iseq)->catch_table_ary;
if (!else_label->refcnt) {
body->ci_size = ci_size;
- body->ci_kw_size = ci_kw_size;
if (!NIL_P(catch_table)) rb_ary_set_len(catch_table, catch_table_size);
}
else {
@@ -5230,43 +6069,44 @@ compile_if(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int
ADD_SEQ(ret, cond_seq);
if (then_label->refcnt && else_label->refcnt) {
- DECL_BRANCH_BASE(branches, lineno, column, last_lineno, last_column, type == NODE_IF ? "if" : "unless");
+ branches = decl_branch_base(iseq, node, type == NODE_IF ? "if" : "unless");
}
if (then_label->refcnt) {
- ADD_LABEL(ret, then_label);
- if (else_label->refcnt) {
- ADD_TRACE_BRANCH_COVERAGE(
- ret,
- node_body ? nd_first_lineno(node_body) : lineno,
- node_body ? nd_first_column(node_body) : column,
- node_body ? nd_last_lineno(node_body) : last_lineno,
- node_body ? nd_last_column(node_body) : last_column,
- type == NODE_IF ? "then" : "else",
- branches);
- end_label = NEW_LABEL(line);
- ADD_INSNL(then_seq, line, jump, end_label);
- }
- ADD_SEQ(ret, then_seq);
+ ADD_LABEL(ret, then_label);
+ if (else_label->refcnt) {
+ add_trace_branch_coverage(
+ iseq,
+ ret,
+ node_body ? node_body : node,
+ 0,
+ type == NODE_IF ? "then" : "else",
+ branches);
+ end_label = NEW_LABEL(line);
+ ADD_INSNL(then_seq, line_node, jump, end_label);
+ if (!popped) {
+ ADD_INSN(then_seq, line_node, pop);
+ }
+ }
+ ADD_SEQ(ret, then_seq);
}
if (else_label->refcnt) {
- ADD_LABEL(ret, else_label);
- if (then_label->refcnt) {
- ADD_TRACE_BRANCH_COVERAGE(
- ret,
- node_else ? nd_first_lineno(node_else) : lineno,
- node_else ? nd_first_column(node_else) : column,
- node_else ? nd_last_lineno(node_else) : last_lineno,
- node_else ? nd_last_column(node_else) : last_column,
- type == NODE_IF ? "else" : "then",
- branches);
- }
- ADD_SEQ(ret, else_seq);
+ ADD_LABEL(ret, else_label);
+ if (then_label->refcnt) {
+ add_trace_branch_coverage(
+ iseq,
+ ret,
+ node_else ? node_else : node,
+ 1,
+ type == NODE_IF ? "else" : "then",
+ branches);
+ }
+ ADD_SEQ(ret, else_seq);
}
if (end_label) {
- ADD_LABEL(ret, end_label);
+ ADD_LABEL(ret, end_label);
}
return COMPILE_OK;
@@ -5283,9 +6123,11 @@ compile_case(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_nod
DECL_ANCHOR(cond_seq);
int only_special_literals = 1;
VALUE literals = rb_hash_new();
- int line, lineno, column, last_lineno, last_column;
+ int line;
enum node_type type;
+ const NODE *line_node;
VALUE branches = Qfalse;
+ int branch_id = 0;
INIT_ANCHOR(head);
INIT_ANCHOR(body_seq);
@@ -5295,16 +6137,13 @@ compile_case(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_nod
CHECK(COMPILE(head, "case base", node->nd_head));
- DECL_BRANCH_BASE(branches, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "case");
+ branches = decl_branch_base(iseq, node, "case");
node = node->nd_body;
EXPECT_NODE("NODE_CASE", node, NODE_WHEN, COMPILE_NG);
type = nd_type(node);
line = nd_line(node);
- lineno = nd_first_lineno(node);
- column = nd_first_column(node);
- last_lineno = nd_last_lineno(node);
- last_column = nd_last_column(node);
+ line_node = node;
endlabel = NEW_LABEL(line);
elselabel = NEW_LABEL(line);
@@ -5312,78 +6151,74 @@ compile_case(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_nod
ADD_SEQ(ret, head); /* case VAL */
while (type == NODE_WHEN) {
- LABEL *l1;
-
- l1 = NEW_LABEL(line);
- ADD_LABEL(body_seq, l1);
- ADD_INSN(body_seq, line, pop);
- ADD_TRACE_BRANCH_COVERAGE(
- body_seq,
- node->nd_body ? nd_first_lineno(node->nd_body) : lineno,
- node->nd_body ? nd_first_column(node->nd_body) : column,
- node->nd_body ? nd_last_lineno(node->nd_body) : last_lineno,
- node->nd_body ? nd_last_column(node->nd_body) : last_column,
- "when",
- branches);
- CHECK(COMPILE_(body_seq, "when body", node->nd_body, popped));
- ADD_INSNL(body_seq, line, jump, endlabel);
-
- vals = node->nd_head;
- if (vals) {
- switch (nd_type(vals)) {
- case NODE_LIST:
- only_special_literals = when_vals(iseq, cond_seq, vals, l1, only_special_literals, literals);
- if (only_special_literals < 0) return COMPILE_NG;
- break;
- case NODE_SPLAT:
- case NODE_ARGSCAT:
- case NODE_ARGSPUSH:
- only_special_literals = 0;
- CHECK(when_splat_vals(iseq, cond_seq, vals, l1, only_special_literals, literals));
- break;
- default:
- UNKNOWN_NODE("NODE_CASE", vals, COMPILE_NG);
- }
- }
- else {
- EXPECT_NODE_NONULL("NODE_CASE", node, NODE_LIST, COMPILE_NG);
- }
-
- node = node->nd_next;
- if (!node) {
- break;
- }
- type = nd_type(node);
- line = nd_line(node);
- lineno = nd_first_lineno(node);
- column = nd_first_column(node);
- last_lineno = nd_last_lineno(node);
- last_column = nd_last_column(node);
+ LABEL *l1;
+
+ l1 = NEW_LABEL(line);
+ ADD_LABEL(body_seq, l1);
+ ADD_INSN(body_seq, line_node, pop);
+ add_trace_branch_coverage(
+ iseq,
+ body_seq,
+ node->nd_body ? node->nd_body : node,
+ branch_id++,
+ "when",
+ branches);
+ CHECK(COMPILE_(body_seq, "when body", node->nd_body, popped));
+ ADD_INSNL(body_seq, line_node, jump, endlabel);
+
+ vals = node->nd_head;
+ if (vals) {
+ switch (nd_type(vals)) {
+ case NODE_LIST:
+ only_special_literals = when_vals(iseq, cond_seq, vals, l1, only_special_literals, literals);
+ if (only_special_literals < 0) return COMPILE_NG;
+ break;
+ case NODE_SPLAT:
+ case NODE_ARGSCAT:
+ case NODE_ARGSPUSH:
+ only_special_literals = 0;
+ CHECK(when_splat_vals(iseq, cond_seq, vals, l1, only_special_literals, literals));
+ break;
+ default:
+ UNKNOWN_NODE("NODE_CASE", vals, COMPILE_NG);
+ }
+ }
+ else {
+ EXPECT_NODE_NONULL("NODE_CASE", node, NODE_LIST, COMPILE_NG);
+ }
+
+ node = node->nd_next;
+ if (!node) {
+ break;
+ }
+ type = nd_type(node);
+ line = nd_line(node);
+ line_node = node;
}
/* else */
if (node) {
- ADD_LABEL(cond_seq, elselabel);
- ADD_INSN(cond_seq, line, pop);
- ADD_TRACE_BRANCH_COVERAGE(cond_seq, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "else", branches);
- CHECK(COMPILE_(cond_seq, "else", node, popped));
- ADD_INSNL(cond_seq, line, jump, endlabel);
+ ADD_LABEL(cond_seq, elselabel);
+ ADD_INSN(cond_seq, line_node, pop);
+ add_trace_branch_coverage(iseq, cond_seq, node, branch_id, "else", branches);
+ CHECK(COMPILE_(cond_seq, "else", node, popped));
+ ADD_INSNL(cond_seq, line_node, jump, endlabel);
}
else {
- debugs("== else (implicit)\n");
- ADD_LABEL(cond_seq, elselabel);
- ADD_INSN(cond_seq, nd_line(orig_node), pop);
- ADD_TRACE_BRANCH_COVERAGE(cond_seq, nd_first_lineno(orig_node), nd_first_column(orig_node), nd_last_lineno(orig_node), nd_last_column(orig_node), "else", branches);
- if (!popped) {
- ADD_INSN(cond_seq, nd_line(orig_node), putnil);
- }
- ADD_INSNL(cond_seq, nd_line(orig_node), jump, endlabel);
+ debugs("== else (implicit)\n");
+ ADD_LABEL(cond_seq, elselabel);
+ ADD_INSN(cond_seq, orig_node, pop);
+ add_trace_branch_coverage(iseq, cond_seq, orig_node, branch_id, "else", branches);
+ if (!popped) {
+ ADD_INSN(cond_seq, orig_node, putnil);
+ }
+ ADD_INSNL(cond_seq, orig_node, jump, endlabel);
}
if (only_special_literals && ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
- ADD_INSN(ret, nd_line(orig_node), dup);
- ADD_INSN2(ret, nd_line(orig_node), opt_case_dispatch, literals, elselabel);
+ ADD_INSN(ret, orig_node, dup);
+ ADD_INSN2(ret, orig_node, opt_case_dispatch, literals, elselabel);
RB_OBJ_WRITTEN(iseq, Qundef, literals);
- LABEL_REF(elselabel);
+ LABEL_REF(elselabel);
}
ADD_SEQ(ret, cond_seq);
@@ -5401,81 +6236,91 @@ compile_case2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no
LABEL *endlabel;
DECL_ANCHOR(body_seq);
VALUE branches = Qfalse;
+ int branch_id = 0;
- DECL_BRANCH_BASE(branches, nd_first_lineno(orig_node), nd_first_column(orig_node), nd_last_lineno(orig_node), nd_last_column(orig_node), "case");
+ branches = decl_branch_base(iseq, orig_node, "case");
INIT_ANCHOR(body_seq);
endlabel = NEW_LABEL(nd_line(node));
- while (node && nd_type(node) == NODE_WHEN) {
- const int line = nd_line(node);
- const int lineno = nd_first_lineno(node);
- const int column = nd_first_column(node);
- const int last_lineno = nd_last_lineno(node);
- const int last_column = nd_last_column(node);
- LABEL *l1 = NEW_LABEL(line);
- ADD_LABEL(body_seq, l1);
- ADD_TRACE_BRANCH_COVERAGE(
- body_seq,
- node->nd_body ? nd_first_lineno(node->nd_body) : lineno,
- node->nd_body ? nd_first_column(node->nd_body) : column,
- node->nd_body ? nd_last_lineno(node->nd_body) : last_lineno,
- node->nd_body ? nd_last_column(node->nd_body) : last_column,
- "when",
- branches);
- CHECK(COMPILE_(body_seq, "when", node->nd_body, popped));
- ADD_INSNL(body_seq, line, jump, endlabel);
-
- vals = node->nd_head;
- if (!vals) {
+ while (node && nd_type_p(node, NODE_WHEN)) {
+ const int line = nd_line(node);
+ LABEL *l1 = NEW_LABEL(line);
+ ADD_LABEL(body_seq, l1);
+ add_trace_branch_coverage(
+ iseq,
+ body_seq,
+ node->nd_body ? node->nd_body : node,
+ branch_id++,
+ "when",
+ branches);
+ CHECK(COMPILE_(body_seq, "when", node->nd_body, popped));
+ ADD_INSNL(body_seq, node, jump, endlabel);
+
+ vals = node->nd_head;
+ if (!vals) {
EXPECT_NODE_NONULL("NODE_WHEN", node, NODE_LIST, COMPILE_NG);
- }
- switch (nd_type(vals)) {
- case NODE_LIST:
- while (vals) {
- LABEL *lnext;
- val = vals->nd_head;
- lnext = NEW_LABEL(nd_line(val));
- debug_compile("== when2\n", (void)0);
- CHECK(compile_branch_condition(iseq, ret, val, l1, lnext));
- ADD_LABEL(ret, lnext);
- vals = vals->nd_next;
- }
- break;
- case NODE_SPLAT:
- case NODE_ARGSCAT:
- case NODE_ARGSPUSH:
- ADD_INSN(ret, nd_line(vals), putnil);
- CHECK(COMPILE(ret, "when2/cond splat", vals));
- ADD_INSN1(ret, nd_line(vals), checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_WHEN | VM_CHECKMATCH_ARRAY));
- ADD_INSNL(ret, nd_line(vals), branchif, l1);
- break;
- default:
- UNKNOWN_NODE("NODE_WHEN", vals, COMPILE_NG);
- }
- node = node->nd_next;
+ }
+ switch (nd_type(vals)) {
+ case NODE_LIST:
+ while (vals) {
+ LABEL *lnext;
+ val = vals->nd_head;
+ lnext = NEW_LABEL(nd_line(val));
+ debug_compile("== when2\n", (void)0);
+ CHECK(compile_branch_condition(iseq, ret, val, l1, lnext));
+ ADD_LABEL(ret, lnext);
+ vals = vals->nd_next;
+ }
+ break;
+ case NODE_SPLAT:
+ case NODE_ARGSCAT:
+ case NODE_ARGSPUSH:
+ ADD_INSN(ret, vals, putnil);
+ CHECK(COMPILE(ret, "when2/cond splat", vals));
+ ADD_INSN1(ret, vals, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_WHEN | VM_CHECKMATCH_ARRAY));
+ ADD_INSNL(ret, vals, branchif, l1);
+ break;
+ default:
+ UNKNOWN_NODE("NODE_WHEN", vals, COMPILE_NG);
+ }
+ node = node->nd_next;
}
/* else */
- ADD_TRACE_BRANCH_COVERAGE(
- ret,
- node ? nd_first_lineno(node) : nd_first_lineno(orig_node),
- node ? nd_first_column(node) : nd_first_column(orig_node),
- node ? nd_last_lineno(node) : nd_last_lineno(orig_node),
- node ? nd_last_column(node) : nd_last_column(orig_node),
- "else",
- branches);
+ add_trace_branch_coverage(
+ iseq,
+ ret,
+ node ? node : orig_node,
+ branch_id,
+ "else",
+ branches);
CHECK(COMPILE_(ret, "else", node, popped));
- ADD_INSNL(ret, nd_line(orig_node), jump, endlabel);
+ ADD_INSNL(ret, orig_node, jump, endlabel);
ADD_SEQ(ret, body_seq);
ADD_LABEL(ret, endlabel);
return COMPILE_OK;
}
+static int iseq_compile_pattern_match(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *unmatched, bool in_single_pattern, bool in_alt_pattern, int base_index, bool use_deconstructed_cache);
+
+static int iseq_compile_pattern_constant(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *match_failed, bool in_single_pattern, int base_index);
+static int iseq_compile_array_deconstruct(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *deconstruct, LABEL *deconstructed, LABEL *match_failed, LABEL *type_error, bool in_single_pattern, int base_index, bool use_deconstructed_cache);
+static int iseq_compile_pattern_set_general_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE errmsg, int base_index);
+static int iseq_compile_pattern_set_length_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE errmsg, VALUE pattern_length, int base_index);
+static int iseq_compile_pattern_set_eqq_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int base_index);
+
+#define CASE3_BI_OFFSET_DECONSTRUCTED_CACHE 0
+#define CASE3_BI_OFFSET_ERROR_STRING 1
+#define CASE3_BI_OFFSET_KEY_ERROR_P 2
+#define CASE3_BI_OFFSET_KEY_ERROR_MATCHEE 3
+#define CASE3_BI_OFFSET_KEY_ERROR_KEY 4
+
static int
-iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int in_alt_pattern)
+iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *matched, LABEL *unmatched, bool in_single_pattern, bool in_alt_pattern, int base_index, bool use_deconstructed_cache)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
switch (nd_type(node)) {
case NODE_ARYPTN: {
@@ -5525,13 +6370,11 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
* goto match_failed
* end
* end
- * true
- * goto fin
+ * goto matched
* type_error:
* FrozenCore.raise TypeError
* match_failed:
- * false
- * fin:
+ * goto unmatched
*/
struct rb_ary_pattern_info *apinfo = node->nd_apinfo;
const NODE *args = apinfo->pre_args;
@@ -5542,110 +6385,276 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
const int use_rest_num = apinfo->rest_arg && (NODE_NAMED_REST_P(apinfo->rest_arg) ||
(!NODE_NAMED_REST_P(apinfo->rest_arg) && post_args_num > 0));
- LABEL *match_failed, *type_error, *fin;
+ LABEL *match_failed, *type_error, *deconstruct, *deconstructed;
int i;
match_failed = NEW_LABEL(line);
type_error = NEW_LABEL(line);
- fin = NEW_LABEL(line);
+ deconstruct = NEW_LABEL(line);
+ deconstructed = NEW_LABEL(line);
if (use_rest_num) {
- ADD_INSN1(ret, line, putobject, INT2FIX(0)); /* allocate stack for rest_num */
- ADD_INSN(ret, line, swap);
- }
-
- if (node->nd_pconst) {
- ADD_INSN(ret, line, dup);
- CHECK(COMPILE(ret, "constant", node->nd_pconst));
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(0)); /* allocate stack for rest_num */
+ ADD_INSN(ret, line_node, swap);
+ if (base_index) {
+ base_index++;
+ }
}
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, ID2SYM(rb_intern("deconstruct")));
- ADD_SEND(ret, line, idRespond_to, INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ CHECK(iseq_compile_pattern_constant(iseq, ret, node, match_failed, in_single_pattern, base_index));
- ADD_SEND(ret, line, rb_intern("deconstruct"), INT2FIX(0));
+ CHECK(iseq_compile_array_deconstruct(iseq, ret, node, deconstruct, deconstructed, match_failed, type_error, in_single_pattern, base_index, use_deconstructed_cache));
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, checktype, INT2FIX(T_ARRAY));
- ADD_INSNL(ret, line, branchunless, type_error);
-
- ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, idLength, INT2FIX(0));
- ADD_INSN1(ret, line, putobject, INT2FIX(min_argc));
- ADD_SEND(ret, line, apinfo->rest_arg ? idGE : idEq, INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(min_argc));
+ ADD_SEND(ret, line_node, apinfo->rest_arg ? idGE : idEq, INT2FIX(1)); // (1)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_length_errmsg(iseq, ret, node,
+ apinfo->rest_arg ? rb_fstring_lit("%p length mismatch (given %p, expected %p+)") :
+ rb_fstring_lit("%p length mismatch (given %p, expected %p)"),
+ INT2FIX(min_argc), base_index + 1 /* (1) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
for (i = 0; i < pre_args_num; i++) {
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, INT2FIX(i));
- ADD_SEND(ret, line, idAREF, INT2FIX(1));
- iseq_compile_pattern_each(iseq, ret, args->nd_head, in_alt_pattern);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(i));
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(1)); // (2)
+ CHECK(iseq_compile_pattern_match(iseq, ret, args->nd_head, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (2) */, false));
args = args->nd_next;
- ADD_INSNL(ret, line, branchunless, match_failed);
}
if (apinfo->rest_arg) {
if (NODE_NAMED_REST_P(apinfo->rest_arg)) {
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, INT2FIX(pre_args_num));
- ADD_INSN1(ret, line, topn, INT2FIX(1));
- ADD_SEND(ret, line, idLength, INT2FIX(0));
- ADD_INSN1(ret, line, putobject, INT2FIX(min_argc));
- ADD_SEND(ret, line, idMINUS, INT2FIX(1));
- ADD_INSN1(ret, line, setn, INT2FIX(4));
- ADD_SEND(ret, line, idAREF, INT2FIX(2));
-
- iseq_compile_pattern_each(iseq, ret, apinfo->rest_arg, in_alt_pattern);
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(pre_args_num));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(1));
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(min_argc));
+ ADD_SEND(ret, line_node, idMINUS, INT2FIX(1));
+ ADD_INSN1(ret, line_node, setn, INT2FIX(4));
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(2)); // (3)
+
+ CHECK(iseq_compile_pattern_match(iseq, ret, apinfo->rest_arg, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (3) */, false));
}
else {
if (post_args_num > 0) {
- ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, idLength, INT2FIX(0));
- ADD_INSN1(ret, line, putobject, INT2FIX(min_argc));
- ADD_SEND(ret, line, idMINUS, INT2FIX(1));
- ADD_INSN1(ret, line, setn, INT2FIX(2));
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(min_argc));
+ ADD_SEND(ret, line_node, idMINUS, INT2FIX(1));
+ ADD_INSN1(ret, line_node, setn, INT2FIX(2));
+ ADD_INSN(ret, line_node, pop);
}
}
}
args = apinfo->post_args;
for (i = 0; i < post_args_num; i++) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, line_node, dup);
- ADD_INSN1(ret, line, putobject, INT2FIX(pre_args_num + i));
- ADD_INSN1(ret, line, topn, INT2FIX(3));
- ADD_SEND(ret, line, idPLUS, INT2FIX(1));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(pre_args_num + i));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_SEND(ret, line_node, idPLUS, INT2FIX(1));
- ADD_SEND(ret, line, idAREF, INT2FIX(1));
- iseq_compile_pattern_each(iseq, ret, args->nd_head, in_alt_pattern);
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(1)); // (4)
+ CHECK(iseq_compile_pattern_match(iseq, ret, args->nd_head, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (4) */, false));
args = args->nd_next;
- ADD_INSNL(ret, line, branchunless, match_failed);
}
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
+ if (use_rest_num) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ ADD_INSNL(ret, line_node, jump, matched);
+ ADD_INSN(ret, line_node, putnil);
if (use_rest_num) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, putnil);
}
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSNL(ret, line, jump, fin);
ADD_LABEL(ret, type_error);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putobject, rb_eTypeError);
- ADD_INSN1(ret, line, putobject, rb_fstring_lit("deconstruct must return Array"));
- ADD_SEND(ret, line, id_core_raise, INT2FIX(2));
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, rb_eTypeError);
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("deconstruct must return Array"));
+ ADD_SEND(ret, line_node, id_core_raise, INT2FIX(2));
+ ADD_INSN(ret, line_node, pop);
ADD_LABEL(ret, match_failed);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
if (use_rest_num) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
- ADD_INSN1(ret, line, putobject, Qfalse);
- ADD_LABEL(ret, fin);
+ ADD_INSNL(ret, line_node, jump, unmatched);
+
+ break;
+ }
+ case NODE_FNDPTN: {
+ /*
+ * if pattern.has_constant_node?
+ * unless pattern.constant === obj
+ * goto match_failed
+ * end
+ * end
+ * unless obj.respond_to?(:deconstruct)
+ * goto match_failed
+ * end
+ * d = obj.deconstruct
+ * unless Array === d
+ * goto type_error
+ * end
+ * unless d.length >= pattern.args_num
+ * goto match_failed
+ * end
+ *
+ * begin
+ * len = d.length
+ * limit = d.length - pattern.args_num
+ * i = 0
+ * while i <= limit
+ * if pattern.args_num.times.all? {|j| pattern.args[j].match?(d[i+j]) }
+ * if pattern.has_pre_rest_arg_id
+ * unless pattern.pre_rest_arg.match?(d[0, i])
+ * goto find_failed
+ * end
+ * end
+ * if pattern.has_post_rest_arg_id
+ * unless pattern.post_rest_arg.match?(d[i+pattern.args_num, len])
+ * goto find_failed
+ * end
+ * end
+ * goto find_succeeded
+ * end
+ * i+=1
+ * end
+ * find_failed:
+ * goto match_failed
+ * find_succeeded:
+ * end
+ *
+ * goto matched
+ * type_error:
+ * FrozenCore.raise TypeError
+ * match_failed:
+ * goto unmatched
+ */
+ struct rb_fnd_pattern_info *fpinfo = node->nd_fpinfo;
+ const NODE *args = fpinfo->args;
+ const int args_num = fpinfo->args ? rb_long2int(fpinfo->args->nd_alen) : 0;
+
+ LABEL *match_failed, *type_error, *deconstruct, *deconstructed;
+ match_failed = NEW_LABEL(line);
+ type_error = NEW_LABEL(line);
+ deconstruct = NEW_LABEL(line);
+ deconstructed = NEW_LABEL(line);
+
+ CHECK(iseq_compile_pattern_constant(iseq, ret, node, match_failed, in_single_pattern, base_index));
+
+ CHECK(iseq_compile_array_deconstruct(iseq, ret, node, deconstruct, deconstructed, match_failed, type_error, in_single_pattern, base_index, use_deconstructed_cache));
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(args_num));
+ ADD_SEND(ret, line_node, idGE, INT2FIX(1)); // (1)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_length_errmsg(iseq, ret, node, rb_fstring_lit("%p length mismatch (given %p, expected %p+)"), INT2FIX(args_num), base_index + 1 /* (1) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
+
+ {
+ LABEL *while_begin = NEW_LABEL(nd_line(node));
+ LABEL *next_loop = NEW_LABEL(nd_line(node));
+ LABEL *find_succeeded = NEW_LABEL(line);
+ LABEL *find_failed = NEW_LABEL(nd_line(node));
+ int j;
+
+ ADD_INSN(ret, line_node, dup); /* allocate stack for len */
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0)); // (2)
+
+ ADD_INSN(ret, line_node, dup); /* allocate stack for limit */
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(args_num));
+ ADD_SEND(ret, line_node, idMINUS, INT2FIX(1)); // (3)
+
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(0)); /* allocate stack for i */ // (4)
+
+ ADD_LABEL(ret, while_begin);
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, topn, INT2FIX(2));
+ ADD_SEND(ret, line_node, idLE, INT2FIX(1));
+ ADD_INSNL(ret, line_node, branchunless, find_failed);
+
+ for (j = 0; j < args_num; j++) {
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(1));
+ if (j != 0) {
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(j));
+ ADD_SEND(ret, line_node, idPLUS, INT2FIX(1));
+ }
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(1)); // (5)
+
+ CHECK(iseq_compile_pattern_match(iseq, ret, args->nd_head, next_loop, in_single_pattern, in_alt_pattern, base_index + 4 /* (2), (3), (4), (5) */, false));
+ args = args->nd_next;
+ }
+
+ if (NODE_NAMED_REST_P(fpinfo->pre_rest_arg)) {
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(0));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(2));
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(2)); // (6)
+ CHECK(iseq_compile_pattern_match(iseq, ret, fpinfo->pre_rest_arg, find_failed, in_single_pattern, in_alt_pattern, base_index + 4 /* (2), (3), (4), (6) */, false));
+ }
+ if (NODE_NAMED_REST_P(fpinfo->post_rest_arg)) {
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(1));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(args_num));
+ ADD_SEND(ret, line_node, idPLUS, INT2FIX(1));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_SEND(ret, line_node, idAREF, INT2FIX(2)); // (7)
+ CHECK(iseq_compile_pattern_match(iseq, ret, fpinfo->post_rest_arg, find_failed, in_single_pattern, in_alt_pattern, base_index + 4 /* (2), (3),(4), (7) */, false));
+ }
+ ADD_INSNL(ret, line_node, jump, find_succeeded);
+
+ ADD_LABEL(ret, next_loop);
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(1));
+ ADD_SEND(ret, line_node, idPLUS, INT2FIX(1));
+ ADD_INSNL(ret, line_node, jump, while_begin);
+
+ ADD_LABEL(ret, find_failed);
+ ADD_INSN1(ret, line_node, adjuststack, INT2FIX(3));
+ if (in_single_pattern) {
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("%p does not match to find pattern"));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(2));
+ ADD_SEND(ret, line_node, id_core_sprintf, INT2FIX(2)); // (8)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 1 /* (8) */)); // (9)
+
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 2 /* (8), (9) */));
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+ }
+ ADD_INSNL(ret, line_node, jump, match_failed);
+ ADD_INSN1(ret, line_node, dupn, INT2FIX(3));
+
+ ADD_LABEL(ret, find_succeeded);
+ ADD_INSN1(ret, line_node, adjuststack, INT2FIX(3));
+ }
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, matched);
+ ADD_INSN(ret, line_node, putnil);
+
+ ADD_LABEL(ret, type_error);
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, rb_eTypeError);
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("deconstruct must return Array"));
+ ADD_SEND(ret, line_node, id_core_raise, INT2FIX(2));
+ ADD_INSN(ret, line_node, pop);
+
+ ADD_LABEL(ret, match_failed);
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, unmatched);
break;
}
@@ -5703,20 +6712,17 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
* end
* end
* end
- * true
- * goto fin
+ * goto matched
* type_error:
* FrozenCore.raise TypeError
* match_failed:
- * false
- * fin:
+ * goto unmatched
*/
- LABEL *match_failed, *type_error, *fin;
+ LABEL *match_failed, *type_error;
VALUE keys = Qnil;
match_failed = NEW_LABEL(line);
type_error = NEW_LABEL(line);
- fin = NEW_LABEL(line);
if (node->nd_pkwargs && !node->nd_pkwrestarg) {
const NODE *kw_args = node->nd_pkwargs->nd_head;
@@ -5727,33 +6733,31 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
}
}
- if (node->nd_pconst) {
- ADD_INSN(ret, line, dup);
- CHECK(COMPILE(ret, "constant", node->nd_pconst));
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
- ADD_INSNL(ret, line, branchunless, match_failed);
- }
+ CHECK(iseq_compile_pattern_constant(iseq, ret, node, match_failed, in_single_pattern, base_index));
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, ID2SYM(rb_intern("deconstruct_keys")));
- ADD_SEND(ret, line, idRespond_to, INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, ID2SYM(rb_intern("deconstruct_keys")));
+ ADD_SEND(ret, line_node, idRespond_to, INT2FIX(1)); // (1)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_general_errmsg(iseq, ret, node, rb_fstring_lit("%p does not respond to #deconstruct_keys"), base_index + 1 /* (1) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
if (NIL_P(keys)) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, line_node, putnil);
}
else {
- ADD_INSN1(ret, line, duparray, keys);
+ ADD_INSN1(ret, line_node, duparray, keys);
RB_OBJ_WRITTEN(iseq, Qundef, rb_obj_hide(keys));
}
- ADD_SEND(ret, line, rb_intern("deconstruct_keys"), INT2FIX(1));
+ ADD_SEND(ret, line_node, rb_intern("deconstruct_keys"), INT2FIX(1)); // (2)
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, checktype, INT2FIX(T_HASH));
- ADD_INSNL(ret, line, branchunless, type_error);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, checktype, INT2FIX(T_HASH));
+ ADD_INSNL(ret, line_node, branchunless, type_error);
if (node->nd_pkwrestarg) {
- ADD_SEND(ret, line, rb_intern("dup"), INT2FIX(0));
+ ADD_SEND(ret, line_node, rb_intern("dup"), INT2FIX(0));
}
if (node->nd_pkwargs) {
@@ -5770,60 +6774,83 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
NODE *value_node = args->nd_next->nd_head;
VALUE key;
- if (nd_type(key_node) != NODE_LIT) {
+ if (!nd_type_p(key_node, NODE_LIT)) {
UNKNOWN_NODE("NODE_IN", key_node, COMPILE_NG);
}
key = key_node->nd_lit;
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, key);
- ADD_SEND(ret, line, rb_intern("key?"), INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, key);
+ ADD_SEND(ret, line_node, rb_intern("key?"), INT2FIX(1)); // (3)
+ if (in_single_pattern) {
+ LABEL *match_succeeded;
+ match_succeeded = NEW_LABEL(line);
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchif, match_succeeded);
+
+ ADD_INSN1(ret, line_node, putobject, rb_str_freeze(rb_sprintf("key not found: %+"PRIsVALUE, key))); // (4)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 2 /* (3), (4) */));
+ ADD_INSN1(ret, line_node, putobject, Qtrue); // (5)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 3 /* (3), (4), (5) */));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3)); // (6)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_MATCHEE + 4 /* (3), (4), (5), (6) */));
+ ADD_INSN1(ret, line_node, putobject, key); // (7)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_KEY + 5 /* (3), (4), (5), (6), (7) */));
+
+ ADD_INSN1(ret, line_node, adjuststack, INT2FIX(4));
+
+ ADD_LABEL(ret, match_succeeded);
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
- ADD_INSN(match_values, line, dup);
- ADD_INSN1(match_values, line, putobject, key);
- ADD_SEND(match_values, line, node->nd_pkwrestarg ? rb_intern("delete") : idAREF, INT2FIX(1));
- iseq_compile_pattern_each(iseq, match_values, value_node, in_alt_pattern);
- ADD_INSNL(match_values, line, branchunless, match_failed);
+ ADD_INSN(match_values, line_node, dup);
+ ADD_INSN1(match_values, line_node, putobject, key);
+ ADD_SEND(match_values, line_node, node->nd_pkwrestarg ? rb_intern("delete") : idAREF, INT2FIX(1)); // (8)
+ CHECK(iseq_compile_pattern_match(iseq, match_values, value_node, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (8) */, false));
args = args->nd_next->nd_next;
}
ADD_SEQ(ret, match_values);
}
}
else {
- ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, idEmptyP, INT2FIX(0));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idEmptyP, INT2FIX(0)); // (9)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_general_errmsg(iseq, ret, node, rb_fstring_lit("%p is not empty"), base_index + 1 /* (9) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
}
if (node->nd_pkwrestarg) {
if (node->nd_pkwrestarg == NODE_SPECIAL_NO_REST_KEYWORD) {
- ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, idEmptyP, INT2FIX(0));
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idEmptyP, INT2FIX(0)); // (10)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_general_errmsg(iseq, ret, node, rb_fstring_lit("rest of %p is not empty"), base_index + 1 /* (10) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
}
else {
- ADD_INSN(ret, line, dup);
- iseq_compile_pattern_each(iseq, ret, node->nd_pkwrestarg, in_alt_pattern);
- ADD_INSNL(ret, line, branchunless, match_failed);
+ ADD_INSN(ret, line_node, dup); // (11)
+ CHECK(iseq_compile_pattern_match(iseq, ret, node->nd_pkwrestarg, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (11) */, false));
}
}
- ADD_INSN(ret, line, pop);
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSNL(ret, line, jump, fin);
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, matched);
+ ADD_INSN(ret, line_node, putnil);
ADD_LABEL(ret, type_error);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putobject, rb_eTypeError);
- ADD_INSN1(ret, line, putobject, rb_fstring_lit("deconstruct_keys must return Hash"));
- ADD_SEND(ret, line, id_core_raise, INT2FIX(2));
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, rb_eTypeError);
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("deconstruct_keys must return Hash"));
+ ADD_SEND(ret, line_node, id_core_raise, INT2FIX(2));
+ ADD_INSN(ret, line_node, pop);
ADD_LABEL(ret, match_failed);
- ADD_INSN(ret, line, pop);
- ADD_INSN1(ret, line, putobject, Qfalse);
-
- ADD_LABEL(ret, fin);
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, unmatched);
break;
}
case NODE_LIT:
@@ -5840,19 +6867,31 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
case NODE_CONST:
case NODE_LVAR:
case NODE_DVAR:
+ case NODE_IVAR:
+ case NODE_CVAR:
+ case NODE_GVAR:
case NODE_TRUE:
case NODE_FALSE:
case NODE_SELF:
case NODE_NIL:
case NODE_COLON2:
case NODE_COLON3:
- CHECK(COMPILE(ret, "case in literal", node));
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE));
+ case NODE_BEGIN:
+ CHECK(COMPILE(ret, "case in literal", node)); // (1)
+ if (in_single_pattern) {
+ ADD_INSN1(ret, line_node, dupn, INT2FIX(2));
+ }
+ ADD_INSN1(ret, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE)); // (2)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_eqq_errmsg(iseq, ret, node, base_index + 2 /* (1), (2) */));
+ }
+ ADD_INSNL(ret, line_node, branchif, matched);
+ ADD_INSNL(ret, line_node, jump, unmatched);
break;
case NODE_LASGN: {
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
ID id = node->nd_vid;
- int idx = body->local_iseq->body->local_table_size - get_local_var_idx(iseq, id);
+ int idx = ISEQ_BODY(body->local_iseq)->local_table_size - get_local_var_idx(iseq, id);
if (in_alt_pattern) {
const char *name = rb_id2name(id);
@@ -5863,12 +6902,11 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
}
}
- ADD_SETLOCAL(ret, line, idx, get_lvar_level(iseq));
- ADD_INSN1(ret, line, putobject, Qtrue);
+ ADD_SETLOCAL(ret, line_node, idx, get_lvar_level(iseq));
+ ADD_INSNL(ret, line_node, jump, matched);
break;
}
- case NODE_DASGN:
- case NODE_DASGN_CURR: {
+ case NODE_DASGN: {
int idx, lv, ls;
ID id = node->nd_vid;
@@ -5884,60 +6922,70 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
}
if (idx < 0) {
- COMPILE_ERROR(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")",
+ COMPILE_ERROR(ERROR_ARGS "NODE_DASGN: unknown id (%"PRIsVALUE")",
rb_id2str(id));
return COMPILE_NG;
}
- ADD_SETLOCAL(ret, line, ls - idx, lv);
- ADD_INSN1(ret, line, putobject, Qtrue);
+ ADD_SETLOCAL(ret, line_node, ls - idx, lv);
+ ADD_INSNL(ret, line_node, jump, matched);
break;
}
case NODE_IF:
case NODE_UNLESS: {
- LABEL *match_failed, *fin;
- match_failed = NEW_LABEL(line);
- fin = NEW_LABEL(line);
- iseq_compile_pattern_each(iseq, ret, node->nd_body, in_alt_pattern);
- ADD_INSNL(ret, line, branchunless, match_failed);
+ LABEL *match_failed;
+ match_failed = unmatched;
+ CHECK(iseq_compile_pattern_match(iseq, ret, node->nd_body, unmatched, in_single_pattern, in_alt_pattern, base_index, use_deconstructed_cache));
CHECK(COMPILE(ret, "case in if", node->nd_cond));
- if (nd_type(node) == NODE_IF) {
- ADD_INSNL(ret, line, branchunless, match_failed);
+ if (in_single_pattern) {
+ LABEL *match_succeeded;
+ match_succeeded = NEW_LABEL(line);
+
+ ADD_INSN(ret, line_node, dup);
+ if (nd_type_p(node, NODE_IF)) {
+ ADD_INSNL(ret, line_node, branchif, match_succeeded);
+ }
+ else {
+ ADD_INSNL(ret, line_node, branchunless, match_succeeded);
+ }
+
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("guard clause does not return true")); // (1)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 1 /* (1) */)); // (2)
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 2 /* (1), (2) */));
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+
+ ADD_LABEL(ret, match_succeeded);
+ }
+ if (nd_type_p(node, NODE_IF)) {
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
}
else {
- ADD_INSNL(ret, line, branchif, match_failed);
+ ADD_INSNL(ret, line_node, branchif, match_failed);
}
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSNL(ret, line, jump, fin);
-
- ADD_LABEL(ret, match_failed);
- ADD_INSN1(ret, line, putobject, Qfalse);
-
- ADD_LABEL(ret, fin);
+ ADD_INSNL(ret, line_node, jump, matched);
break;
}
case NODE_HASH: {
NODE *n;
- LABEL *match_failed, *fin;
+ LABEL *match_failed;
match_failed = NEW_LABEL(line);
- fin = NEW_LABEL(line);
n = node->nd_head;
- if (! (nd_type(n) == NODE_LIST && n->nd_alen == 2)) {
+ if (! (nd_type_p(n, NODE_LIST) && n->nd_alen == 2)) {
COMPILE_ERROR(ERROR_ARGS "unexpected node");
return COMPILE_NG;
}
- ADD_INSN(ret, line, dup);
- iseq_compile_pattern_each(iseq, ret, n->nd_head, in_alt_pattern);
- ADD_INSNL(ret, line, branchunless, match_failed);
- iseq_compile_pattern_each(iseq, ret, n->nd_next->nd_head, in_alt_pattern);
- ADD_INSNL(ret, line, jump, fin);
+ ADD_INSN(ret, line_node, dup); // (1)
+ CHECK(iseq_compile_pattern_match(iseq, ret, n->nd_head, match_failed, in_single_pattern, in_alt_pattern, base_index + 1 /* (1) */, use_deconstructed_cache));
+ CHECK(iseq_compile_pattern_each(iseq, ret, n->nd_next->nd_head, matched, match_failed, in_single_pattern, in_alt_pattern, base_index, false));
+ ADD_INSN(ret, line_node, putnil);
ADD_LABEL(ret, match_failed);
- ADD_INSN(ret, line, pop);
- ADD_INSN1(ret, line, putobject, Qfalse);
-
- ADD_LABEL(ret, fin);
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, unmatched);
break;
}
case NODE_OR: {
@@ -5945,17 +6993,14 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
match_succeeded = NEW_LABEL(line);
fin = NEW_LABEL(line);
- ADD_INSN(ret, line, dup);
- iseq_compile_pattern_each(iseq, ret, node->nd_1st, TRUE);
- ADD_INSNL(ret, line, branchif, match_succeeded);
- iseq_compile_pattern_each(iseq, ret, node->nd_2nd, TRUE);
- ADD_INSNL(ret, line, jump, fin);
-
+ ADD_INSN(ret, line_node, dup); // (1)
+ CHECK(iseq_compile_pattern_each(iseq, ret, node->nd_1st, match_succeeded, fin, in_single_pattern, true, base_index + 1 /* (1) */, use_deconstructed_cache));
ADD_LABEL(ret, match_succeeded);
- ADD_INSN(ret, line, pop);
- ADD_INSN1(ret, line, putobject, Qtrue);
-
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, matched);
+ ADD_INSN(ret, line_node, putnil);
ADD_LABEL(ret, fin);
+ CHECK(iseq_compile_pattern_each(iseq, ret, node->nd_2nd, matched, unmatched, in_single_pattern, true, base_index, use_deconstructed_cache));
break;
}
default:
@@ -5965,6 +7010,203 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
}
static int
+iseq_compile_pattern_match(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *unmatched, bool in_single_pattern, bool in_alt_pattern, int base_index, bool use_deconstructed_cache)
+{
+ LABEL *fin = NEW_LABEL(nd_line(node));
+ CHECK(iseq_compile_pattern_each(iseq, ret, node, fin, unmatched, in_single_pattern, in_alt_pattern, base_index, use_deconstructed_cache));
+ ADD_LABEL(ret, fin);
+ return COMPILE_OK;
+}
+
+static int
+iseq_compile_pattern_constant(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *match_failed, bool in_single_pattern, int base_index)
+{
+ const NODE *line_node = node;
+
+ if (node->nd_pconst) {
+ ADD_INSN(ret, line_node, dup); // (1)
+ CHECK(COMPILE(ret, "constant", node->nd_pconst)); // (2)
+ if (in_single_pattern) {
+ ADD_INSN1(ret, line_node, dupn, INT2FIX(2));
+ }
+ ADD_INSN1(ret, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE)); // (3)
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_eqq_errmsg(iseq, ret, node, base_index + 3 /* (1), (2), (3) */));
+ }
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
+ }
+ return COMPILE_OK;
+}
+
+
+static int
+iseq_compile_array_deconstruct(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, LABEL *deconstruct, LABEL *deconstructed, LABEL *match_failed, LABEL *type_error, bool in_single_pattern, int base_index, bool use_deconstructed_cache)
+{
+ const NODE *line_node = node;
+
+ // NOTE: this optimization allows us to re-use the #deconstruct value
+ // (or its absence).
+ if (use_deconstructed_cache) {
+ // If value is nil then we haven't tried to deconstruct
+ ADD_INSN1(ret, line_node, topn, INT2FIX(base_index + CASE3_BI_OFFSET_DECONSTRUCTED_CACHE));
+ ADD_INSNL(ret, line_node, branchnil, deconstruct);
+
+ // If false then the value is not deconstructable
+ ADD_INSN1(ret, line_node, topn, INT2FIX(base_index + CASE3_BI_OFFSET_DECONSTRUCTED_CACHE));
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
+
+ // Drop value, add deconstructed to the stack and jump
+ ADD_INSN(ret, line_node, pop); // (1)
+ ADD_INSN1(ret, line_node, topn, INT2FIX(base_index + CASE3_BI_OFFSET_DECONSTRUCTED_CACHE - 1 /* (1) */));
+ ADD_INSNL(ret, line_node, jump, deconstructed);
+ }
+ else {
+ ADD_INSNL(ret, line_node, jump, deconstruct);
+ }
+
+ ADD_LABEL(ret, deconstruct);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, ID2SYM(rb_intern("deconstruct")));
+ ADD_SEND(ret, line_node, idRespond_to, INT2FIX(1)); // (2)
+
+ // Cache the result of respond_to? (in case it's false is stays there, if true - it's overwritten after #deconstruct)
+ if (use_deconstructed_cache) {
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_DECONSTRUCTED_CACHE + 1 /* (2) */));
+ }
+
+ if (in_single_pattern) {
+ CHECK(iseq_compile_pattern_set_general_errmsg(iseq, ret, node, rb_fstring_lit("%p does not respond to #deconstruct"), base_index + 1 /* (2) */));
+ }
+
+ ADD_INSNL(ret, line_node, branchunless, match_failed);
+
+ ADD_SEND(ret, line_node, rb_intern("deconstruct"), INT2FIX(0));
+
+ // Cache the result (if it's cacheable - currently, only top-level array patterns)
+ if (use_deconstructed_cache) {
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_DECONSTRUCTED_CACHE));
+ }
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, checktype, INT2FIX(T_ARRAY));
+ ADD_INSNL(ret, line_node, branchunless, type_error);
+
+ ADD_LABEL(ret, deconstructed);
+
+ return COMPILE_OK;
+}
+
+static int
+iseq_compile_pattern_set_general_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE errmsg, int base_index)
+{
+ /*
+ * if match_succeeded?
+ * goto match_succeeded
+ * end
+ * error_string = FrozenCore.sprintf(errmsg, matchee)
+ * key_error_p = false
+ * match_succeeded:
+ */
+ const int line = nd_line(node);
+ const NODE *line_node = node;
+ LABEL *match_succeeded = NEW_LABEL(line);
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchif, match_succeeded);
+
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, errmsg);
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_SEND(ret, line_node, id_core_sprintf, INT2FIX(2)); // (1)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 1 /* (1) */)); // (2)
+
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 2 /* (1), (2) */));
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+ ADD_LABEL(ret, match_succeeded);
+
+ return COMPILE_OK;
+}
+
+static int
+iseq_compile_pattern_set_length_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, VALUE errmsg, VALUE pattern_length, int base_index)
+{
+ /*
+ * if match_succeeded?
+ * goto match_succeeded
+ * end
+ * error_string = FrozenCore.sprintf(errmsg, matchee, matchee.length, pat.length)
+ * key_error_p = false
+ * match_succeeded:
+ */
+ const int line = nd_line(node);
+ const NODE *line_node = node;
+ LABEL *match_succeeded = NEW_LABEL(line);
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchif, match_succeeded);
+
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, errmsg);
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_INSN(ret, line_node, dup);
+ ADD_SEND(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, pattern_length);
+ ADD_SEND(ret, line_node, id_core_sprintf, INT2FIX(4)); // (1)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 1 /* (1) */)); // (2)
+
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 2/* (1), (2) */));
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+ ADD_LABEL(ret, match_succeeded);
+
+ return COMPILE_OK;
+}
+
+static int
+iseq_compile_pattern_set_eqq_errmsg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int base_index)
+{
+ /*
+ * if match_succeeded?
+ * goto match_succeeded
+ * end
+ * error_string = FrozenCore.sprintf("%p === %p does not return true", pat, matchee)
+ * key_error_p = false
+ * match_succeeded:
+ */
+ const int line = nd_line(node);
+ const NODE *line_node = node;
+ LABEL *match_succeeded = NEW_LABEL(line);
+
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchif, match_succeeded);
+
+ ADD_INSN1(ret, line_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, line_node, putobject, rb_fstring_lit("%p === %p does not return true"));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(3));
+ ADD_INSN1(ret, line_node, topn, INT2FIX(5));
+ ADD_SEND(ret, line_node, id_core_sprintf, INT2FIX(3)); // (1)
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_ERROR_STRING + 1 /* (1) */)); // (2)
+
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(base_index + CASE3_BI_OFFSET_KEY_ERROR_P + 2 /* (1), (2) */));
+
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+
+ ADD_LABEL(ret, match_succeeded);
+ ADD_INSN1(ret, line_node, setn, INT2FIX(2));
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSN(ret, line_node, pop);
+
+ return COMPILE_OK;
+}
+
+static int
compile_case3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_node, int popped)
{
const NODE *pattern;
@@ -5973,54 +7215,70 @@ compile_case3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no
DECL_ANCHOR(head);
DECL_ANCHOR(body_seq);
DECL_ANCHOR(cond_seq);
- int line, lineno, column, last_lineno, last_column;
+ int line;
enum node_type type;
+ const NODE *line_node;
VALUE branches = 0;
+ int branch_id = 0;
+ bool single_pattern;
INIT_ANCHOR(head);
INIT_ANCHOR(body_seq);
INIT_ANCHOR(cond_seq);
- CHECK(COMPILE(head, "case base", node->nd_head));
-
- DECL_BRANCH_BASE(branches, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "case");
+ branches = decl_branch_base(iseq, node, "case");
node = node->nd_body;
EXPECT_NODE("NODE_CASE3", node, NODE_IN, COMPILE_NG);
type = nd_type(node);
line = nd_line(node);
- lineno = nd_first_lineno(node);
- column = nd_first_column(node);
- last_lineno = nd_last_lineno(node);
- last_column = nd_last_column(node);
+ line_node = node;
+ single_pattern = !node->nd_next;
endlabel = NEW_LABEL(line);
elselabel = NEW_LABEL(line);
+ if (single_pattern) {
+ /* allocate stack for ... */
+ ADD_INSN(head, line_node, putnil); /* key_error_key */
+ ADD_INSN(head, line_node, putnil); /* key_error_matchee */
+ ADD_INSN1(head, line_node, putobject, Qfalse); /* key_error_p */
+ ADD_INSN(head, line_node, putnil); /* error_string */
+ }
+ ADD_INSN(head, line_node, putnil); /* allocate stack for cached #deconstruct value */
+
+ CHECK(COMPILE(head, "case base", orig_node->nd_head));
+
ADD_SEQ(ret, head); /* case VAL */
while (type == NODE_IN) {
LABEL *l1;
+ if (branch_id) {
+ ADD_INSN(body_seq, line_node, putnil);
+ }
l1 = NEW_LABEL(line);
ADD_LABEL(body_seq, l1);
- ADD_INSN(body_seq, line, pop);
- ADD_TRACE_BRANCH_COVERAGE(
+ ADD_INSN1(body_seq, line_node, adjuststack, INT2FIX(single_pattern ? 6 : 2));
+ add_trace_branch_coverage(
+ iseq,
body_seq,
- node->nd_body ? nd_first_lineno(node->nd_body) : lineno,
- node->nd_body ? nd_first_column(node->nd_body) : column,
- node->nd_body ? nd_last_lineno(node->nd_body) : last_lineno,
- node->nd_body ? nd_last_column(node->nd_body) : last_column,
+ node->nd_body ? node->nd_body : node,
+ branch_id++,
"in",
branches);
CHECK(COMPILE_(body_seq, "in body", node->nd_body, popped));
- ADD_INSNL(body_seq, line, jump, endlabel);
+ ADD_INSNL(body_seq, line_node, jump, endlabel);
pattern = node->nd_head;
if (pattern) {
- ADD_INSN (cond_seq, nd_line(pattern), dup);
- iseq_compile_pattern_each(iseq, cond_seq, pattern, FALSE);
- ADD_INSNL(cond_seq, nd_line(pattern), branchif, l1);
+ int pat_line = nd_line(pattern);
+ LABEL *next_pat = NEW_LABEL(pat_line);
+ ADD_INSN (cond_seq, pattern, dup); /* dup case VAL */
+ // NOTE: set base_index (it's "under" the matchee value, so it's position is 2)
+ CHECK(iseq_compile_pattern_each(iseq, cond_seq, pattern, l1, next_pat, single_pattern, false, 2, true));
+ ADD_LABEL(cond_seq, next_pat);
+ LABEL_UNREMOVABLE(next_pat);
}
else {
COMPILE_ERROR(ERROR_ARGS "unexpected node");
@@ -6033,33 +7291,85 @@ compile_case3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no
}
type = nd_type(node);
line = nd_line(node);
- lineno = nd_first_lineno(node);
- column = nd_first_column(node);
- last_lineno = nd_last_lineno(node);
- last_column = nd_last_column(node);
+ line_node = node;
}
/* else */
if (node) {
ADD_LABEL(cond_seq, elselabel);
- ADD_INSN(cond_seq, line, pop);
- ADD_TRACE_BRANCH_COVERAGE(cond_seq, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node), "else", branches);
+ ADD_INSN(cond_seq, line_node, pop);
+ ADD_INSN(cond_seq, line_node, pop); /* discard cached #deconstruct value */
+ add_trace_branch_coverage(iseq, cond_seq, node, branch_id, "else", branches);
CHECK(COMPILE_(cond_seq, "else", node, popped));
- ADD_INSNL(cond_seq, line, jump, endlabel);
+ ADD_INSNL(cond_seq, line_node, jump, endlabel);
+ ADD_INSN(cond_seq, line_node, putnil);
+ if (popped) {
+ ADD_INSN(cond_seq, line_node, putnil);
+ }
}
else {
debugs("== else (implicit)\n");
ADD_LABEL(cond_seq, elselabel);
- ADD_TRACE_BRANCH_COVERAGE(cond_seq, nd_first_lineno(orig_node), nd_first_column(orig_node), nd_last_lineno(orig_node), nd_last_column(orig_node), "else", branches);
- ADD_INSN1(cond_seq, nd_line(orig_node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(cond_seq, nd_line(orig_node), putobject, rb_eNoMatchingPatternError);
- ADD_INSN1(cond_seq, nd_line(orig_node), topn, INT2FIX(2));
- ADD_SEND(cond_seq, nd_line(orig_node), id_core_raise, INT2FIX(2));
- ADD_INSN(cond_seq, nd_line(orig_node), pop);
- ADD_INSN(cond_seq, nd_line(orig_node), pop);
+ add_trace_branch_coverage(iseq, cond_seq, orig_node, branch_id, "else", branches);
+ ADD_INSN1(cond_seq, orig_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+
+ if (single_pattern) {
+ /*
+ * if key_error_p
+ * FrozenCore.raise NoMatchingPatternKeyError.new(FrozenCore.sprintf("%p: %s", case_val, error_string), matchee: key_error_matchee, key: key_error_key)
+ * else
+ * FrozenCore.raise NoMatchingPatternError, FrozenCore.sprintf("%p: %s", case_val, error_string)
+ * end
+ */
+ LABEL *key_error, *fin;
+ struct rb_callinfo_kwarg *kw_arg;
+
+ key_error = NEW_LABEL(line);
+ fin = NEW_LABEL(line);
+
+ kw_arg = rb_xmalloc_mul_add(2, sizeof(VALUE), sizeof(struct rb_callinfo_kwarg));
+ kw_arg->keyword_len = 2;
+ kw_arg->keywords[0] = ID2SYM(rb_intern("matchee"));
+ kw_arg->keywords[1] = ID2SYM(rb_intern("key"));
+
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(CASE3_BI_OFFSET_KEY_ERROR_P + 2));
+ ADD_INSNL(cond_seq, orig_node, branchif, key_error);
+ ADD_INSN1(cond_seq, orig_node, putobject, rb_eNoMatchingPatternError);
+ ADD_INSN1(cond_seq, orig_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(cond_seq, orig_node, putobject, rb_fstring_lit("%p: %s"));
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(4)); /* case VAL */
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(CASE3_BI_OFFSET_ERROR_STRING + 6));
+ ADD_SEND(cond_seq, orig_node, id_core_sprintf, INT2FIX(3));
+ ADD_SEND(cond_seq, orig_node, id_core_raise, INT2FIX(2));
+ ADD_INSNL(cond_seq, orig_node, jump, fin);
+
+ ADD_LABEL(cond_seq, key_error);
+ ADD_INSN1(cond_seq, orig_node, putobject, rb_eNoMatchingPatternKeyError);
+ ADD_INSN1(cond_seq, orig_node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(cond_seq, orig_node, putobject, rb_fstring_lit("%p: %s"));
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(4)); /* case VAL */
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(CASE3_BI_OFFSET_ERROR_STRING + 6));
+ ADD_SEND(cond_seq, orig_node, id_core_sprintf, INT2FIX(3));
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(CASE3_BI_OFFSET_KEY_ERROR_MATCHEE + 4));
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(CASE3_BI_OFFSET_KEY_ERROR_KEY + 5));
+ ADD_SEND_R(cond_seq, orig_node, rb_intern("new"), INT2FIX(1), NULL, INT2FIX(VM_CALL_KWARG), kw_arg);
+ ADD_SEND(cond_seq, orig_node, id_core_raise, INT2FIX(1));
+
+ ADD_LABEL(cond_seq, fin);
+ }
+ else {
+ ADD_INSN1(cond_seq, orig_node, putobject, rb_eNoMatchingPatternError);
+ ADD_INSN1(cond_seq, orig_node, topn, INT2FIX(2));
+ ADD_SEND(cond_seq, orig_node, id_core_raise, INT2FIX(2));
+ }
+ ADD_INSN1(cond_seq, orig_node, adjuststack, INT2FIX(single_pattern ? 7 : 3));
if (!popped) {
- ADD_INSN(cond_seq, nd_line(orig_node), putnil);
+ ADD_INSN(cond_seq, orig_node, putnil);
+ }
+ ADD_INSNL(cond_seq, orig_node, jump, endlabel);
+ ADD_INSN1(cond_seq, orig_node, dupn, INT2FIX(single_pattern ? 5 : 1));
+ if (popped) {
+ ADD_INSN(cond_seq, line_node, putnil);
}
- ADD_INSNL(cond_seq, nd_line(orig_node), jump, endlabel);
}
ADD_SEQ(ret, cond_seq);
@@ -6068,14 +7378,18 @@ compile_case3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no
return COMPILE_OK;
}
+#undef CASE3_BI_OFFSET_DECONSTRUCTED_CACHE
+#undef CASE3_BI_OFFSET_ERROR_STRING
+#undef CASE3_BI_OFFSET_KEY_ERROR_P
+#undef CASE3_BI_OFFSET_KEY_ERROR_MATCHEE
+#undef CASE3_BI_OFFSET_KEY_ERROR_KEY
+
static int
compile_loop(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const enum node_type type)
{
const int line = (int)nd_line(node);
- const int lineno = nd_first_lineno(node);
- const int column = nd_first_column(node);
- const int last_lineno = nd_last_lineno(node);
- const int last_column = nd_last_column(node);
+ const NODE *line_node = node;
+
LABEL *prev_start_label = ISEQ_COMPILE_DATA(iseq)->start_label;
LABEL *prev_end_label = ISEQ_COMPILE_DATA(iseq)->end_label;
LABEL *prev_redo_label = ISEQ_COMPILE_DATA(iseq)->redo_label;
@@ -6097,66 +7411,65 @@ compile_loop(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
push_ensure_entry(iseq, &enl, NULL, NULL);
if (node->nd_state == 1) {
- ADD_INSNL(ret, line, jump, next_label);
+ ADD_INSNL(ret, line_node, jump, next_label);
}
else {
- tmp_label = NEW_LABEL(line);
- ADD_INSNL(ret, line, jump, tmp_label);
+ tmp_label = NEW_LABEL(line);
+ ADD_INSNL(ret, line_node, jump, tmp_label);
}
ADD_LABEL(ret, adjust_label);
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, line_node, putnil);
ADD_LABEL(ret, next_catch_label);
- ADD_INSN(ret, line, pop);
- ADD_INSNL(ret, line, jump, next_label);
+ ADD_INSN(ret, line_node, pop);
+ ADD_INSNL(ret, line_node, jump, next_label);
if (tmp_label) ADD_LABEL(ret, tmp_label);
ADD_LABEL(ret, redo_label);
- DECL_BRANCH_BASE(branches, lineno, column, last_lineno, last_column, type == NODE_WHILE ? "while" : "until");
- ADD_TRACE_BRANCH_COVERAGE(
- ret,
- node->nd_body ? nd_first_lineno(node->nd_body) : lineno,
- node->nd_body ? nd_first_column(node->nd_body) : column,
- node->nd_body ? nd_last_lineno(node->nd_body) : last_lineno,
- node->nd_body ? nd_last_column(node->nd_body) : last_column,
- "body",
- branches);
+ branches = decl_branch_base(iseq, node, type == NODE_WHILE ? "while" : "until");
+ add_trace_branch_coverage(
+ iseq,
+ ret,
+ node->nd_body ? node->nd_body : node,
+ 0,
+ "body",
+ branches);
CHECK(COMPILE_POPPED(ret, "while body", node->nd_body));
ADD_LABEL(ret, next_label); /* next */
if (type == NODE_WHILE) {
- compile_branch_condition(iseq, ret, node->nd_cond,
- redo_label, end_label);
+ compile_branch_condition(iseq, ret, node->nd_cond,
+ redo_label, end_label);
}
else {
- /* until */
- compile_branch_condition(iseq, ret, node->nd_cond,
- end_label, redo_label);
+ /* until */
+ compile_branch_condition(iseq, ret, node->nd_cond,
+ end_label, redo_label);
}
ADD_LABEL(ret, end_label);
ADD_ADJUST_RESTORE(ret, adjust_label);
- if (node->nd_state == Qundef) {
- /* ADD_INSN(ret, line, putundef); */
- COMPILE_ERROR(ERROR_ARGS "unsupported: putundef");
- return COMPILE_NG;
+ if (UNDEF_P(node->nd_state)) {
+ /* ADD_INSN(ret, line_node, putundef); */
+ COMPILE_ERROR(ERROR_ARGS "unsupported: putundef");
+ return COMPILE_NG;
}
else {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, line_node, putnil);
}
ADD_LABEL(ret, break_label); /* break */
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, redo_label, break_label, NULL,
- break_label);
+ break_label);
ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, redo_label, break_label, NULL,
- next_catch_label);
+ next_catch_label);
ADD_CATCH_ENTRY(CATCH_TYPE_REDO, redo_label, break_label, NULL,
- ISEQ_COMPILE_DATA(iseq)->redo_label);
+ ISEQ_COMPILE_DATA(iseq)->redo_label);
ISEQ_COMPILE_DATA(iseq)->start_label = prev_start_label;
ISEQ_COMPILE_DATA(iseq)->end_label = prev_end_label;
@@ -6170,30 +7483,54 @@ static int
compile_iter(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
const rb_iseq_t *prevblock = ISEQ_COMPILE_DATA(iseq)->current_block;
LABEL *retry_label = NEW_LABEL(line);
LABEL *retry_end_l = NEW_LABEL(line);
const rb_iseq_t *child_iseq;
ADD_LABEL(ret, retry_label);
- if (nd_type(node) == NODE_FOR) {
- CHECK(COMPILE(ret, "iter caller (for)", node->nd_iter));
+ if (nd_type_p(node, NODE_FOR)) {
+ CHECK(COMPILE(ret, "iter caller (for)", node->nd_iter));
- ISEQ_COMPILE_DATA(iseq)->current_block = child_iseq =
- NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
- ADD_SEND_WITH_BLOCK(ret, line, idEach, INT2FIX(0), child_iseq);
+ ISEQ_COMPILE_DATA(iseq)->current_block = child_iseq =
+ NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
+ ISEQ_TYPE_BLOCK, line);
+ ADD_SEND_WITH_BLOCK(ret, line_node, idEach, INT2FIX(0), child_iseq);
}
else {
- ISEQ_COMPILE_DATA(iseq)->current_block = child_iseq =
- NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
- CHECK(COMPILE(ret, "iter caller", node->nd_iter));
+ ISEQ_COMPILE_DATA(iseq)->current_block = child_iseq =
+ NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq),
+ ISEQ_TYPE_BLOCK, line);
+ CHECK(COMPILE(ret, "iter caller", node->nd_iter));
+ }
+
+ {
+ // We need to put the label "retry_end_l" immediately after the last "send" instruction.
+ // This because vm_throw checks if the break cont is equal to the index of next insn of the "send".
+ // (Otherwise, it is considered "break from proc-closure". See "TAG_BREAK" handling in "vm_throw_start".)
+ //
+ // Normally, "send" instruction is at the last.
+ // However, qcall under branch coverage measurement adds some instructions after the "send".
+ //
+ // Note that "invokesuper" appears instead of "send".
+ INSN *iobj;
+ LINK_ELEMENT *last_elem = LAST_ELEMENT(ret);
+ iobj = IS_INSN(last_elem) ? (INSN*) last_elem : (INSN*) get_prev_insn((INSN*) last_elem);
+ while (INSN_OF(iobj) != BIN(send) && INSN_OF(iobj) != BIN(invokesuper)) {
+ iobj = (INSN*) get_prev_insn(iobj);
+ }
+ ELEM_INSERT_NEXT(&iobj->link, (LINK_ELEMENT*) retry_end_l);
+
+ // LINK_ANCHOR has a pointer to the last element, but ELEM_INSERT_NEXT does not update it
+ // even if we add an insn to the last of LINK_ANCHOR. So this updates it manually.
+ if (&iobj->link == LAST_ELEMENT(ret)) {
+ ret->last = (LINK_ELEMENT*) retry_end_l;
+ }
}
- ADD_LABEL(ret, retry_end_l);
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
ISEQ_COMPILE_DATA(iseq)->current_block = prevblock;
@@ -6208,27 +7545,27 @@ compile_for_masgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const nod
/* massign to var in "for"
* (args.length == 1 && Array.try_convert(args[0])) || args
*/
- const int line = nd_line(node);
+ const NODE *line_node = node;
const NODE *var = node->nd_var;
LABEL *not_single = NEW_LABEL(nd_line(var));
LABEL *not_ary = NEW_LABEL(nd_line(var));
CHECK(COMPILE(ret, "for var", var));
- ADD_INSN(ret, line, dup);
- ADD_CALL(ret, line, idLength, INT2FIX(0));
- ADD_INSN1(ret, line, putobject, INT2FIX(1));
- ADD_CALL(ret, line, idEq, INT2FIX(1));
- ADD_INSNL(ret, line, branchunless, not_single);
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, INT2FIX(0));
- ADD_CALL(ret, line, idAREF, INT2FIX(1));
- ADD_INSN1(ret, line, putobject, rb_cArray);
- ADD_INSN(ret, line, swap);
- ADD_CALL(ret, line, rb_intern("try_convert"), INT2FIX(1));
- ADD_INSN(ret, line, dup);
- ADD_INSNL(ret, line, branchunless, not_ary);
- ADD_INSN(ret, line, swap);
+ ADD_INSN(ret, line_node, dup);
+ ADD_CALL(ret, line_node, idLength, INT2FIX(0));
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(1));
+ ADD_CALL(ret, line_node, idEq, INT2FIX(1));
+ ADD_INSNL(ret, line_node, branchunless, not_single);
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, putobject, INT2FIX(0));
+ ADD_CALL(ret, line_node, idAREF, INT2FIX(1));
+ ADD_INSN1(ret, line_node, putobject, rb_cArray);
+ ADD_INSN(ret, line_node, swap);
+ ADD_CALL(ret, line_node, rb_intern("try_convert"), INT2FIX(1));
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSNL(ret, line_node, branchunless, not_ary);
+ ADD_INSN(ret, line_node, swap);
ADD_LABEL(ret, not_ary);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
ADD_LABEL(ret, not_single);
return COMPILE_OK;
}
@@ -6236,62 +7573,58 @@ compile_for_masgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const nod
static int
compile_break(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const int line = nd_line(node);
+ const NODE *line_node = node;
unsigned long throw_flag = 0;
- if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0) {
- /* while/until */
- LABEL *splabel = NEW_LABEL(0);
- ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
- CHECK(COMPILE_(ret, "break val (while/until)", node->nd_stts,
- ISEQ_COMPILE_DATA(iseq)->loopval_popped));
- add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
- ADD_ADJUST_RESTORE(ret, splabel);
-
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- }
- else if (iseq->body->type == ISEQ_TYPE_BLOCK) {
- break_by_insn:
- /* escape from block */
- CHECK(COMPILE(ret, "break val (block)", node->nd_stts));
- ADD_INSN1(ret, line, throw, INT2FIX(throw_flag | TAG_BREAK));
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- }
- else if (iseq->body->type == ISEQ_TYPE_EVAL) {
- break_in_eval:
- COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with break");
- return COMPILE_NG;
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0 && can_add_ensure_iseq(iseq)) {
+ /* while/until */
+ LABEL *splabel = NEW_LABEL(0);
+ ADD_LABEL(ret, splabel);
+ ADD_ADJUST(ret, line_node, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ CHECK(COMPILE_(ret, "break val (while/until)", node->nd_stts,
+ ISEQ_COMPILE_DATA(iseq)->loopval_popped));
+ add_ensure_iseq(ret, iseq, 0);
+ ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
+ ADD_ADJUST_RESTORE(ret, splabel);
+
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
}
else {
- const rb_iseq_t *ip = iseq->body->parent_iseq;
+ const rb_iseq_t *ip = iseq;
- while (ip) {
- if (!ISEQ_COMPILE_DATA(ip)) {
- ip = 0;
- break;
- }
+ while (ip) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
+ ip = 0;
+ break;
+ }
- if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
throw_flag = VM_THROW_NO_ESCAPE_FLAG;
- goto break_by_insn;
- }
- else if (ip->body->type == ISEQ_TYPE_BLOCK) {
- goto break_by_insn;
- }
- else if (ip->body->type == ISEQ_TYPE_EVAL) {
- goto break_in_eval;
- }
-
- ip = ip->body->parent_iseq;
- }
- COMPILE_ERROR(ERROR_ARGS "Invalid break");
- return COMPILE_NG;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_BLOCK) {
+ throw_flag = 0;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_EVAL) {
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with break");
+ return COMPILE_NG;
+ }
+ else {
+ ip = ISEQ_BODY(ip)->parent_iseq;
+ continue;
+ }
+
+ /* escape from block */
+ CHECK(COMPILE(ret, "break val (block)", node->nd_stts));
+ ADD_INSN1(ret, line_node, throw, INT2FIX(throw_flag | TAG_BREAK));
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ return COMPILE_OK;
+ }
+ COMPILE_ERROR(ERROR_ARGS "Invalid break");
+ return COMPILE_NG;
}
return COMPILE_OK;
}
@@ -6299,77 +7632,72 @@ compile_break(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
static int
compile_next(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const int line = nd_line(node);
+ const NODE *line_node = node;
unsigned long throw_flag = 0;
- if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0) {
- LABEL *splabel = NEW_LABEL(0);
- debugs("next in while loop\n");
- ADD_LABEL(ret, splabel);
- CHECK(COMPILE(ret, "next val/valid syntax?", node->nd_stts));
- add_ensure_iseq(ret, iseq, 0);
- ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
- ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
- ADD_ADJUST_RESTORE(ret, splabel);
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- }
- else if (ISEQ_COMPILE_DATA(iseq)->end_label) {
- LABEL *splabel = NEW_LABEL(0);
- debugs("next in block\n");
- ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->start_label);
- CHECK(COMPILE(ret, "next val", node->nd_stts));
- add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
- ADD_ADJUST_RESTORE(ret, splabel);
- splabel->unremovable = FALSE;
-
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- }
- else if (iseq->body->type == ISEQ_TYPE_EVAL) {
- next_in_eval:
- COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with next");
- return COMPILE_NG;
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label != 0 && can_add_ensure_iseq(iseq)) {
+ LABEL *splabel = NEW_LABEL(0);
+ debugs("next in while loop\n");
+ ADD_LABEL(ret, splabel);
+ CHECK(COMPILE(ret, "next val/valid syntax?", node->nd_stts));
+ add_ensure_iseq(ret, iseq, 0);
+ ADD_ADJUST(ret, line_node, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
+ ADD_ADJUST_RESTORE(ret, splabel);
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
+ }
+ else if (ISEQ_COMPILE_DATA(iseq)->end_label && can_add_ensure_iseq(iseq)) {
+ LABEL *splabel = NEW_LABEL(0);
+ debugs("next in block\n");
+ ADD_LABEL(ret, splabel);
+ ADD_ADJUST(ret, line_node, ISEQ_COMPILE_DATA(iseq)->start_label);
+ CHECK(COMPILE(ret, "next val", node->nd_stts));
+ add_ensure_iseq(ret, iseq, 0);
+ ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->end_label);
+ ADD_ADJUST_RESTORE(ret, splabel);
+
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
}
else {
- const rb_iseq_t *ip = iseq;
+ const rb_iseq_t *ip = iseq;
- while (ip) {
- if (!ISEQ_COMPILE_DATA(ip)) {
- ip = 0;
- break;
- }
+ while (ip) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
+ ip = 0;
+ break;
+ }
throw_flag = VM_THROW_NO_ESCAPE_FLAG;
- if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
- /* while loop */
- break;
- }
- else if (ip->body->type == ISEQ_TYPE_BLOCK) {
- break;
- }
- else if (ip->body->type == ISEQ_TYPE_EVAL) {
- goto next_in_eval;
- }
-
- ip = ip->body->parent_iseq;
- }
- if (ip != 0) {
- CHECK(COMPILE(ret, "next val", node->nd_stts));
- ADD_INSN1(ret, line, throw, INT2FIX(throw_flag | TAG_NEXT));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- }
- else {
- COMPILE_ERROR(ERROR_ARGS "Invalid next");
- return COMPILE_NG;
- }
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
+ /* while loop */
+ break;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_BLOCK) {
+ break;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_EVAL) {
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with next");
+ return COMPILE_NG;
+ }
+
+ ip = ISEQ_BODY(ip)->parent_iseq;
+ }
+ if (ip != 0) {
+ CHECK(COMPILE(ret, "next val", node->nd_stts));
+ ADD_INSN1(ret, line_node, throw, INT2FIX(throw_flag | TAG_NEXT));
+
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ }
+ else {
+ COMPILE_ERROR(ERROR_ARGS "Invalid next");
+ return COMPILE_NG;
+ }
}
return COMPILE_OK;
}
@@ -6377,72 +7705,68 @@ compile_next(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
static int
compile_redo(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const int line = nd_line(node);
+ const NODE *line_node = node;
- if (ISEQ_COMPILE_DATA(iseq)->redo_label) {
- LABEL *splabel = NEW_LABEL(0);
- debugs("redo in while");
- ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->redo_label);
- add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->redo_label);
- ADD_ADJUST_RESTORE(ret, splabel);
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- }
- else if (iseq->body->type == ISEQ_TYPE_EVAL) {
- redo_in_eval:
- COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with redo");
- return COMPILE_NG;
- }
- else if (ISEQ_COMPILE_DATA(iseq)->start_label) {
- LABEL *splabel = NEW_LABEL(0);
-
- debugs("redo in block");
- ADD_LABEL(ret, splabel);
- add_ensure_iseq(ret, iseq, 0);
- ADD_ADJUST(ret, line, ISEQ_COMPILE_DATA(iseq)->start_label);
- ADD_INSNL(ret, line, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
- ADD_ADJUST_RESTORE(ret, splabel);
-
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
+ if (ISEQ_COMPILE_DATA(iseq)->redo_label && can_add_ensure_iseq(iseq)) {
+ LABEL *splabel = NEW_LABEL(0);
+ debugs("redo in while");
+ ADD_LABEL(ret, splabel);
+ ADD_ADJUST(ret, line_node, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ add_ensure_iseq(ret, iseq, 0);
+ ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->redo_label);
+ ADD_ADJUST_RESTORE(ret, splabel);
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
+ }
+ else if (ISEQ_BODY(iseq)->type != ISEQ_TYPE_EVAL && ISEQ_COMPILE_DATA(iseq)->start_label && can_add_ensure_iseq(iseq)) {
+ LABEL *splabel = NEW_LABEL(0);
+
+ debugs("redo in block");
+ ADD_LABEL(ret, splabel);
+ add_ensure_iseq(ret, iseq, 0);
+ ADD_ADJUST(ret, line_node, ISEQ_COMPILE_DATA(iseq)->start_label);
+ ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->start_label);
+ ADD_ADJUST_RESTORE(ret, splabel);
+
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
}
else {
- const rb_iseq_t *ip = iseq;
-
- while (ip) {
- if (!ISEQ_COMPILE_DATA(ip)) {
- ip = 0;
- break;
- }
-
- if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
- break;
- }
- else if (ip->body->type == ISEQ_TYPE_BLOCK) {
- break;
- }
- else if (ip->body->type == ISEQ_TYPE_EVAL) {
- goto redo_in_eval;
- }
-
- ip = ip->body->parent_iseq;
- }
- if (ip != 0) {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(VM_THROW_NO_ESCAPE_FLAG | TAG_REDO));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- }
- else {
- COMPILE_ERROR(ERROR_ARGS "Invalid redo");
- return COMPILE_NG;
- }
+ const rb_iseq_t *ip = iseq;
+
+ while (ip) {
+ if (!ISEQ_COMPILE_DATA(ip)) {
+ ip = 0;
+ break;
+ }
+
+ if (ISEQ_COMPILE_DATA(ip)->redo_label != 0) {
+ break;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_BLOCK) {
+ break;
+ }
+ else if (ISEQ_BODY(ip)->type == ISEQ_TYPE_EVAL) {
+ COMPILE_ERROR(ERROR_ARGS "Can't escape from eval with redo");
+ return COMPILE_NG;
+ }
+
+ ip = ISEQ_BODY(ip)->parent_iseq;
+ }
+ if (ip != 0) {
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN1(ret, line_node, throw, INT2FIX(VM_THROW_NO_ESCAPE_FLAG | TAG_REDO));
+
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ }
+ else {
+ COMPILE_ERROR(ERROR_ARGS "Invalid redo");
+ return COMPILE_NG;
+ }
}
return COMPILE_OK;
}
@@ -6450,19 +7774,19 @@ compile_redo(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
static int
compile_retry(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const int line = nd_line(node);
+ const NODE *line_node = node;
- if (iseq->body->type == ISEQ_TYPE_RESCUE) {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETRY));
+ if (ISEQ_BODY(iseq)->type == ISEQ_TYPE_RESCUE) {
+ ADD_INSN(ret, line_node, putnil);
+ ADD_INSN1(ret, line_node, throw, INT2FIX(TAG_RETRY));
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
}
else {
- COMPILE_ERROR(ERROR_ARGS "Invalid retry");
- return COMPILE_NG;
+ COMPILE_ERROR(ERROR_ARGS "Invalid retry");
+ return COMPILE_NG;
}
return COMPILE_OK;
}
@@ -6471,27 +7795,36 @@ static int
compile_rescue(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
LABEL *lstart = NEW_LABEL(line);
LABEL *lend = NEW_LABEL(line);
LABEL *lcont = NEW_LABEL(line);
const rb_iseq_t *rescue = NEW_CHILD_ISEQ(node->nd_resq,
- rb_str_concat(rb_str_new2("rescue in "), iseq->body->location.label),
- ISEQ_TYPE_RESCUE, line);
+ rb_str_concat(rb_str_new2("rescue in "),
+ ISEQ_BODY(iseq)->location.label),
+ ISEQ_TYPE_RESCUE, line);
lstart->rescued = LABEL_RESCUE_BEG;
lend->rescued = LABEL_RESCUE_END;
ADD_LABEL(ret, lstart);
- CHECK(COMPILE(ret, "rescue head", node->nd_head));
+
+ bool prev_in_rescue = ISEQ_COMPILE_DATA(iseq)->in_rescue;
+ ISEQ_COMPILE_DATA(iseq)->in_rescue = true;
+ {
+ CHECK(COMPILE(ret, "rescue head", node->nd_head));
+ }
+ ISEQ_COMPILE_DATA(iseq)->in_rescue = prev_in_rescue;
+
ADD_LABEL(ret, lend);
if (node->nd_else) {
- ADD_INSN(ret, line, pop);
- CHECK(COMPILE(ret, "rescue else", node->nd_else));
+ ADD_INSN(ret, line_node, pop);
+ CHECK(COMPILE(ret, "rescue else", node->nd_else));
}
- ADD_INSN(ret, line, nop);
+ ADD_INSN(ret, line_node, nop);
ADD_LABEL(ret, lcont);
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
/* register catch entry */
@@ -6504,53 +7837,54 @@ static int
compile_resbody(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
const NODE *resq = node;
const NODE *narg;
LABEL *label_miss, *label_hit;
while (resq) {
- label_miss = NEW_LABEL(line);
- label_hit = NEW_LABEL(line);
-
- narg = resq->nd_args;
- if (narg) {
- switch (nd_type(narg)) {
- case NODE_LIST:
- while (narg) {
- ADD_GETLOCAL(ret, line, LVAR_ERRINFO, 0);
- CHECK(COMPILE(ret, "rescue arg", narg->nd_head));
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
- ADD_INSNL(ret, line, branchif, label_hit);
- narg = narg->nd_next;
- }
- break;
- case NODE_SPLAT:
- case NODE_ARGSCAT:
- case NODE_ARGSPUSH:
- ADD_GETLOCAL(ret, line, LVAR_ERRINFO, 0);
- CHECK(COMPILE(ret, "rescue/cond splat", narg));
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE | VM_CHECKMATCH_ARRAY));
- ADD_INSNL(ret, line, branchif, label_hit);
- break;
- default:
- UNKNOWN_NODE("NODE_RESBODY", narg, COMPILE_NG);
- }
- }
- else {
- ADD_GETLOCAL(ret, line, LVAR_ERRINFO, 0);
- ADD_INSN1(ret, line, putobject, rb_eStandardError);
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
- ADD_INSNL(ret, line, branchif, label_hit);
- }
- ADD_INSNL(ret, line, jump, label_miss);
- ADD_LABEL(ret, label_hit);
- CHECK(COMPILE(ret, "resbody body", resq->nd_body));
- if (ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization) {
- ADD_INSN(ret, line, nop);
- }
- ADD_INSN(ret, line, leave);
- ADD_LABEL(ret, label_miss);
- resq = resq->nd_head;
+ label_miss = NEW_LABEL(line);
+ label_hit = NEW_LABEL(line);
+
+ narg = resq->nd_args;
+ if (narg) {
+ switch (nd_type(narg)) {
+ case NODE_LIST:
+ while (narg) {
+ ADD_GETLOCAL(ret, line_node, LVAR_ERRINFO, 0);
+ CHECK(COMPILE(ret, "rescue arg", narg->nd_head));
+ ADD_INSN1(ret, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
+ ADD_INSNL(ret, line_node, branchif, label_hit);
+ narg = narg->nd_next;
+ }
+ break;
+ case NODE_SPLAT:
+ case NODE_ARGSCAT:
+ case NODE_ARGSPUSH:
+ ADD_GETLOCAL(ret, line_node, LVAR_ERRINFO, 0);
+ CHECK(COMPILE(ret, "rescue/cond splat", narg));
+ ADD_INSN1(ret, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE | VM_CHECKMATCH_ARRAY));
+ ADD_INSNL(ret, line_node, branchif, label_hit);
+ break;
+ default:
+ UNKNOWN_NODE("NODE_RESBODY", narg, COMPILE_NG);
+ }
+ }
+ else {
+ ADD_GETLOCAL(ret, line_node, LVAR_ERRINFO, 0);
+ ADD_INSN1(ret, line_node, putobject, rb_eStandardError);
+ ADD_INSN1(ret, line_node, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
+ ADD_INSNL(ret, line_node, branchif, label_hit);
+ }
+ ADD_INSNL(ret, line_node, jump, label_miss);
+ ADD_LABEL(ret, label_hit);
+ CHECK(COMPILE(ret, "resbody body", resq->nd_body));
+ if (ISEQ_COMPILE_DATA(iseq)->option->tailcall_optimization) {
+ ADD_INSN(ret, line_node, nop);
+ }
+ ADD_INSN(ret, line_node, leave);
+ ADD_LABEL(ret, label_miss);
+ resq = resq->nd_head;
}
return COMPILE_OK;
}
@@ -6559,10 +7893,11 @@ static int
compile_ensure(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
const int line = nd_line(node);
+ const NODE *line_node = node;
DECL_ANCHOR(ensr);
const rb_iseq_t *ensure = NEW_CHILD_ISEQ(node->nd_ensr,
- rb_str_concat(rb_str_new2 ("ensure in "), iseq->body->location.label),
- ISEQ_TYPE_ENSURE, line);
+ rb_str_concat(rb_str_new2 ("ensure in "), ISEQ_BODY(iseq)->location.label),
+ ISEQ_TYPE_ENSURE, line);
LABEL *lstart = NEW_LABEL(line);
LABEL *lend = NEW_LABEL(line);
LABEL *lcont = NEW_LABEL(line);
@@ -6586,17 +7921,17 @@ compile_ensure(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
CHECK(COMPILE_(ret, "ensure head", node->nd_head, (popped | last_leave)));
ADD_LABEL(ret, lend);
ADD_SEQ(ret, ensr);
- if (!popped && last_leave) ADD_INSN(ret, line, putnil);
+ if (!popped && last_leave) ADD_INSN(ret, line_node, putnil);
ADD_LABEL(ret, lcont);
- if (last_leave) ADD_INSN(ret, line, pop);
+ if (last_leave) ADD_INSN(ret, line_node, pop);
erange = ISEQ_COMPILE_DATA(iseq)->ensure_node_stack->erange;
if (lstart->link.next != &lend->link) {
- while (erange) {
- ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, erange->begin, erange->end,
- ensure, lcont);
- erange = erange->next;
- }
+ while (erange) {
+ ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, erange->begin, erange->end,
+ ensure, lcont);
+ erange = erange->next;
+ }
}
ISEQ_COMPILE_DATA(iseq)->ensure_node_stack = enl.prev;
@@ -6606,58 +7941,58 @@ compile_ensure(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
static int
compile_return(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
- const int line = nd_line(node);
+ const NODE *line_node = node;
if (iseq) {
- enum iseq_type type = iseq->body->type;
- const rb_iseq_t *is = iseq;
- enum iseq_type t = type;
- const NODE *retval = node->nd_stts;
- LABEL *splabel = 0;
-
- while (t == ISEQ_TYPE_RESCUE || t == ISEQ_TYPE_ENSURE) {
- if (!(is = is->body->parent_iseq)) break;
- t = is->body->type;
- }
- switch (t) {
- case ISEQ_TYPE_TOP:
- case ISEQ_TYPE_MAIN:
+ enum rb_iseq_type type = ISEQ_BODY(iseq)->type;
+ const rb_iseq_t *is = iseq;
+ enum rb_iseq_type t = type;
+ const NODE *retval = node->nd_stts;
+ LABEL *splabel = 0;
+
+ while (t == ISEQ_TYPE_RESCUE || t == ISEQ_TYPE_ENSURE) {
+ if (!(is = ISEQ_BODY(is)->parent_iseq)) break;
+ t = ISEQ_BODY(is)->type;
+ }
+ switch (t) {
+ case ISEQ_TYPE_TOP:
+ case ISEQ_TYPE_MAIN:
if (retval) {
rb_warn("argument of top-level return is ignored");
}
- if (is == iseq) {
- /* plain top-level, leave directly */
- type = ISEQ_TYPE_METHOD;
- }
- break;
- default:
- break;
- }
-
- if (type == ISEQ_TYPE_METHOD) {
- splabel = NEW_LABEL(0);
- ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, 0);
- }
-
- CHECK(COMPILE(ret, "return nd_stts (return val)", retval));
-
- if (type == ISEQ_TYPE_METHOD) {
- add_ensure_iseq(ret, iseq, 1);
- ADD_TRACE(ret, RUBY_EVENT_RETURN);
- ADD_INSN(ret, line, leave);
- ADD_ADJUST_RESTORE(ret, splabel);
-
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- }
- else {
- ADD_INSN1(ret, line, throw, INT2FIX(TAG_RETURN));
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- }
+ if (is == iseq) {
+ /* plain top-level, leave directly */
+ type = ISEQ_TYPE_METHOD;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (type == ISEQ_TYPE_METHOD) {
+ splabel = NEW_LABEL(0);
+ ADD_LABEL(ret, splabel);
+ ADD_ADJUST(ret, line_node, 0);
+ }
+
+ CHECK(COMPILE(ret, "return nd_stts (return val)", retval));
+
+ if (type == ISEQ_TYPE_METHOD && can_add_ensure_iseq(iseq)) {
+ add_ensure_iseq(ret, iseq, 1);
+ ADD_TRACE(ret, RUBY_EVENT_RETURN);
+ ADD_INSN(ret, line_node, leave);
+ ADD_ADJUST_RESTORE(ret, splabel);
+
+ if (!popped) {
+ ADD_INSN(ret, line_node, putnil);
+ }
+ }
+ else {
+ ADD_INSN1(ret, line_node, throw, INT2FIX(TAG_RETURN));
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ }
}
return COMPILE_OK;
}
@@ -6668,72 +8003,76 @@ compile_evstr(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
CHECK(COMPILE_(ret, "nd_body", node, popped));
if (!popped && !all_string_result_p(node)) {
- const int line = nd_line(node);
- const unsigned int flag = VM_CALL_FCALL;
- LABEL *isstr = NEW_LABEL(line);
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, checktype, INT2FIX(T_STRING));
- ADD_INSNL(ret, line, branchif, isstr);
- ADD_INSN(ret, line, dup);
- ADD_SEND_R(ret, line, idTo_s, INT2FIX(0), NULL, INT2FIX(flag), NULL);
- ADD_INSN(ret, line, tostring);
- ADD_LABEL(ret, isstr);
+ const NODE *line_node = node;
+ const unsigned int flag = VM_CALL_FCALL;
+
+ // Note, this dup could be removed if we are willing to change anytostring. It pops
+ // two VALUEs off the stack when it could work by replacing the top most VALUE.
+ ADD_INSN(ret, line_node, dup);
+ ADD_INSN1(ret, line_node, objtostring, new_callinfo(iseq, idTo_s, 0, flag, NULL, FALSE));
+ ADD_INSN(ret, line_node, anytostring);
}
return COMPILE_OK;
}
+static void
+compile_lvar(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *line_node, ID id)
+{
+ int idx = ISEQ_BODY(ISEQ_BODY(iseq)->local_iseq)->local_table_size - get_local_var_idx(iseq, id);
+
+ debugs("id: %s idx: %d\n", rb_id2name(id), idx);
+ ADD_GETLOCAL(ret, line_node, idx, get_lvar_level(iseq));
+}
+
static LABEL *
-qcall_branch_start(rb_iseq_t *iseq, LINK_ANCHOR *const recv, VALUE *branches, const NODE *node, int line)
+qcall_branch_start(rb_iseq_t *iseq, LINK_ANCHOR *const recv, VALUE *branches, const NODE *node, const NODE *line_node)
{
- LABEL *else_label = NEW_LABEL(line);
- const int first_lineno = nd_first_lineno(node), first_column = nd_first_column(node);
- const int last_lineno = nd_last_lineno(node), last_column = nd_last_column(node);
+ LABEL *else_label = NEW_LABEL(nd_line(line_node));
VALUE br = 0;
- DECL_BRANCH_BASE(br, first_lineno, first_column, last_lineno, last_column, "&.");
+ br = decl_branch_base(iseq, node, "&.");
*branches = br;
- ADD_INSN(recv, line, dup);
- ADD_INSNL(recv, line, branchnil, else_label);
- ADD_TRACE_BRANCH_COVERAGE(recv, first_lineno, first_column, last_lineno, last_column, "then", br);
+ ADD_INSN(recv, line_node, dup);
+ ADD_INSNL(recv, line_node, branchnil, else_label);
+ add_trace_branch_coverage(iseq, recv, node, 0, "then", br);
return else_label;
}
static void
-qcall_branch_end(rb_iseq_t *iseq, LINK_ANCHOR *const ret, LABEL *else_label, VALUE branches, const NODE *node, int line)
+qcall_branch_end(rb_iseq_t *iseq, LINK_ANCHOR *const ret, LABEL *else_label, VALUE branches, const NODE *node, const NODE *line_node)
{
LABEL *end_label;
if (!else_label) return;
- end_label = NEW_LABEL(line);
- ADD_INSNL(ret, line, jump, end_label);
+ end_label = NEW_LABEL(nd_line(line_node));
+ ADD_INSNL(ret, line_node, jump, end_label);
ADD_LABEL(ret, else_label);
- ADD_TRACE_BRANCH_COVERAGE(ret, nd_first_lineno(node), nd_first_column(node), nd_last_lineno(node), nd_last_column(node),
- "else", branches);
+ add_trace_branch_coverage(iseq, ret, node, 1, "else", branches);
ADD_LABEL(ret, end_label);
}
static int
-compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int line, int popped)
+compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const NODE *line_node, int popped)
{
/* optimization shortcut
* "literal".freeze -> opt_str_freeze("literal")
*/
- if (node->nd_recv && nd_type(node->nd_recv) == NODE_STR &&
+ if (node->nd_recv && nd_type_p(node->nd_recv, NODE_STR) &&
(node->nd_mid == idFreeze || node->nd_mid == idUMinus) &&
node->nd_args == NULL &&
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
VALUE str = rb_fstring(node->nd_recv->nd_lit);
if (node->nd_mid == idUMinus) {
- ADD_INSN2(ret, line, opt_str_uminus, str,
+ ADD_INSN2(ret, line_node, opt_str_uminus, str,
new_callinfo(iseq, idUMinus, 0, 0, NULL, FALSE));
}
else {
- ADD_INSN2(ret, line, opt_str_freeze, str,
+ ADD_INSN2(ret, line_node, opt_str_freeze, str,
new_callinfo(iseq, idFreeze, 0, 0, NULL, FALSE));
}
RB_OBJ_WRITTEN(iseq, Qundef, str);
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
return TRUE;
}
@@ -6741,18 +8080,18 @@ compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE
* obj["literal"] -> opt_aref_with(obj, "literal")
*/
if (node->nd_mid == idAREF && !private_recv_p(node) && node->nd_args &&
- nd_type(node->nd_args) == NODE_LIST && node->nd_args->nd_alen == 1 &&
- nd_type(node->nd_args->nd_head) == NODE_STR &&
+ nd_type_p(node->nd_args, NODE_LIST) && node->nd_args->nd_alen == 1 &&
+ nd_type_p(node->nd_args->nd_head, NODE_STR) &&
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
CHECK(COMPILE(ret, "recv", node->nd_recv));
- ADD_INSN2(ret, line, opt_aref_with, str,
+ ADD_INSN2(ret, line_node, opt_aref_with, str,
new_callinfo(iseq, idAREF, 1, 0, NULL, FALSE));
RB_OBJ_WRITTEN(iseq, Qundef, str);
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, line_node, pop);
}
return TRUE;
}
@@ -6779,18 +8118,39 @@ iseq_builtin_function_lookup(const rb_iseq_t *iseq, const char *name)
}
static const char *
-iseq_builtin_function_name(ID mid)
+iseq_builtin_function_name(const enum node_type type, const NODE *recv, ID mid)
{
const char *name = rb_id2name(mid);
static const char prefix[] = "__builtin_";
const size_t prefix_len = sizeof(prefix) - 1;
- if (UNLIKELY(strncmp(prefix, name, prefix_len) == 0)) {
- return &name[prefix_len];
- }
- else {
- return NULL;
+ switch (type) {
+ case NODE_CALL:
+ if (recv) {
+ switch (nd_type(recv)) {
+ case NODE_VCALL:
+ if (recv->nd_mid == rb_intern("__builtin")) {
+ return name;
+ }
+ break;
+ case NODE_CONST:
+ if (recv->nd_vid == rb_intern("Primitive")) {
+ return name;
+ }
+ break;
+ default: break;
+ }
+ }
+ break;
+ case NODE_VCALL:
+ case NODE_FCALL:
+ if (UNLIKELY(strncmp(prefix, name, prefix_len) == 0)) {
+ return &name[prefix_len];
+ }
+ break;
+ default: break;
}
+ return NULL;
}
static int
@@ -6801,29 +8161,29 @@ delegate_call_p(const rb_iseq_t *iseq, unsigned int argc, const LINK_ANCHOR *arg
*pstart_index = 0;
return TRUE;
}
- else if (argc <= iseq->body->local_table_size) {
+ else if (argc <= ISEQ_BODY(iseq)->local_table_size) {
unsigned int start=0;
// local_table: [p1, p2, p3, l1, l2, l3]
// arguments: [p3, l1, l2] -> 2
for (start = 0;
- argc + start <= iseq->body->local_table_size;
+ argc + start <= ISEQ_BODY(iseq)->local_table_size;
start++) {
const LINK_ELEMENT *elem = FIRST_ELEMENT(args);
for (unsigned int i=start; i-start<argc; i++) {
- if (elem->type == ISEQ_ELEMENT_INSN &&
+ if (IS_INSN(elem) &&
INSN_OF(elem) == BIN(getlocal)) {
int local_index = FIX2INT(OPERAND_AT(elem, 0));
int local_level = FIX2INT(OPERAND_AT(elem, 1));
if (local_level == 0) {
- unsigned int index = iseq->body->local_table_size - (local_index - VM_ENV_DATA_SIZE + 1);
+ unsigned int index = ISEQ_BODY(iseq)->local_table_size - (local_index - VM_ENV_DATA_SIZE + 1);
if (0) { // for debug
fprintf(stderr, "lvar:%s (%d), id:%s (%d) local_index:%d, local_size:%d\n",
- rb_id2name(iseq->body->local_table[i]), i,
- rb_id2name(iseq->body->local_table[index]), index,
- local_index, (int)iseq->body->local_table_size);
+ rb_id2name(ISEQ_BODY(iseq)->local_table[i]), i,
+ rb_id2name(ISEQ_BODY(iseq)->local_table[index]), index,
+ local_index, (int)ISEQ_BODY(iseq)->local_table_size);
}
if (i == index) {
elem = elem->next;
@@ -6856,7 +8216,199 @@ delegate_call_p(const rb_iseq_t *iseq, unsigned int argc, const LINK_ANCHOR *arg
}
static int
-compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int type, int line, int popped)
+compile_builtin_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, const NODE *line_node, int popped)
+{
+ if (!node) goto no_arg;
+ if (!nd_type_p(node, NODE_LIST)) goto bad_arg;
+ if (node->nd_next) goto too_many_arg;
+ node = node->nd_head;
+ if (!node) goto no_arg;
+ if (!nd_type_p(node, NODE_LIT)) goto bad_arg;
+ VALUE name = node->nd_lit;
+ if (!SYMBOL_P(name)) goto non_symbol_arg;
+ if (!popped) {
+ compile_lvar(iseq, ret, line_node, SYM2ID(name));
+ }
+ return COMPILE_OK;
+ no_arg:
+ COMPILE_ERROR(ERROR_ARGS "arg!: no argument");
+ return COMPILE_NG;
+ too_many_arg:
+ COMPILE_ERROR(ERROR_ARGS "arg!: too many argument");
+ return COMPILE_NG;
+ non_symbol_arg:
+ COMPILE_ERROR(ERROR_ARGS "non symbol argument to arg!: %s",
+ rb_builtin_class_name(name));
+ return COMPILE_NG;
+ bad_arg:
+ UNKNOWN_NODE("arg!", node, COMPILE_NG);
+}
+
+static NODE *
+mandatory_node(const rb_iseq_t *iseq, const NODE *cond_node)
+{
+ const NODE *node = ISEQ_COMPILE_DATA(iseq)->root_node;
+ if (nd_type(node) == NODE_IF && node->nd_cond == cond_node) {
+ return node->nd_body;
+ }
+ else {
+ rb_bug("mandatory_node: can't find mandatory node");
+ }
+}
+
+static int
+compile_builtin_mandatory_only_method(rb_iseq_t *iseq, const NODE *node, const NODE *line_node)
+{
+ // arguments
+ struct rb_args_info args = {
+ .pre_args_num = ISEQ_BODY(iseq)->param.lead_num,
+ };
+ NODE args_node;
+ rb_node_init(&args_node, NODE_ARGS, 0, 0, (VALUE)&args);
+
+ // local table without non-mandatory parameters
+ const int skip_local_size = ISEQ_BODY(iseq)->param.size - ISEQ_BODY(iseq)->param.lead_num;
+ const int table_size = ISEQ_BODY(iseq)->local_table_size - skip_local_size;
+
+ VALUE idtmp = 0;
+ rb_ast_id_table_t *tbl = ALLOCV(idtmp, sizeof(rb_ast_id_table_t) + table_size * sizeof(ID));
+ tbl->size = table_size;
+
+ int i;
+
+ // lead parameters
+ for (i=0; i<ISEQ_BODY(iseq)->param.lead_num; i++) {
+ tbl->ids[i] = ISEQ_BODY(iseq)->local_table[i];
+ }
+ // local variables
+ for (; i<table_size; i++) {
+ tbl->ids[i] = ISEQ_BODY(iseq)->local_table[i + skip_local_size];
+ }
+
+ NODE scope_node;
+ rb_node_init(&scope_node, NODE_SCOPE, (VALUE)tbl, (VALUE)mandatory_node(iseq, node), (VALUE)&args_node);
+
+ rb_ast_body_t ast = {
+ .root = &scope_node,
+ .compile_option = 0,
+ .script_lines = ISEQ_BODY(iseq)->variable.script_lines,
+ };
+
+ int prev_inline_index = GET_VM()->builtin_inline_index;
+
+ ISEQ_BODY(iseq)->mandatory_only_iseq =
+ rb_iseq_new_with_opt(&ast, rb_iseq_base_label(iseq),
+ rb_iseq_path(iseq), rb_iseq_realpath(iseq),
+ nd_line(line_node), NULL, 0,
+ ISEQ_TYPE_METHOD, ISEQ_COMPILE_DATA(iseq)->option);
+
+ GET_VM()->builtin_inline_index = prev_inline_index;
+ ALLOCV_END(idtmp);
+ return COMPILE_OK;
+}
+
+static int
+compile_builtin_function_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const NODE *line_node, int popped,
+ const rb_iseq_t *parent_block, LINK_ANCHOR *args, const char *builtin_func)
+{
+ NODE *args_node = node->nd_args;
+
+ if (parent_block != NULL) {
+ COMPILE_ERROR(iseq, nd_line(line_node), "should not call builtins here.");
+ return COMPILE_NG;
+ }
+ else {
+# define BUILTIN_INLINE_PREFIX "_bi"
+ char inline_func[DECIMAL_SIZE_OF_BITS(sizeof(int) * CHAR_BIT) + sizeof(BUILTIN_INLINE_PREFIX)];
+ bool cconst = false;
+ retry:;
+ const struct rb_builtin_function *bf = iseq_builtin_function_lookup(iseq, builtin_func);
+
+ if (bf == NULL) {
+ if (strcmp("cstmt!", builtin_func) == 0 ||
+ strcmp("cexpr!", builtin_func) == 0) {
+ // ok
+ }
+ else if (strcmp("cconst!", builtin_func) == 0) {
+ cconst = true;
+ }
+ else if (strcmp("cinit!", builtin_func) == 0) {
+ // ignore
+ GET_VM()->builtin_inline_index++;
+ return COMPILE_OK;
+ }
+ else if (strcmp("attr!", builtin_func) == 0) {
+ // There's only "inline" attribute for now
+ ISEQ_BODY(iseq)->builtin_inline_p = true;
+ return COMPILE_OK;
+ }
+ else if (strcmp("arg!", builtin_func) == 0) {
+ return compile_builtin_arg(iseq, ret, args_node, line_node, popped);
+ }
+ else if (strcmp("mandatory_only?", builtin_func) == 0) {
+ if (popped) {
+ rb_bug("mandatory_only? should be in if condition");
+ }
+ else if (!LIST_INSN_SIZE_ZERO(ret)) {
+ rb_bug("mandatory_only? should be put on top");
+ }
+
+ ADD_INSN1(ret, line_node, putobject, Qfalse);
+ return compile_builtin_mandatory_only_method(iseq, node, line_node);
+ }
+ else if (1) {
+ rb_bug("can't find builtin function:%s", builtin_func);
+ }
+ else {
+ COMPILE_ERROR(ERROR_ARGS "can't find builtin function:%s", builtin_func);
+ return COMPILE_NG;
+ }
+
+ if (GET_VM()->builtin_inline_index == INT_MAX) {
+ rb_bug("builtin inline function index overflow:%s", builtin_func);
+ }
+ int inline_index = GET_VM()->builtin_inline_index++;
+ snprintf(inline_func, sizeof(inline_func), BUILTIN_INLINE_PREFIX "%d", inline_index);
+ builtin_func = inline_func;
+ args_node = NULL;
+ goto retry;
+ }
+
+ if (cconst) {
+ typedef VALUE(*builtin_func0)(void *, VALUE);
+ VALUE const_val = (*(builtin_func0)bf->func_ptr)(NULL, Qnil);
+ ADD_INSN1(ret, line_node, putobject, const_val);
+ return COMPILE_OK;
+ }
+
+ // fprintf(stderr, "func_name:%s -> %p\n", builtin_func, bf->func_ptr);
+
+ unsigned int flag = 0;
+ struct rb_callinfo_kwarg *keywords = NULL;
+ VALUE argc = setup_args(iseq, args, args_node, &flag, &keywords);
+
+ if (FIX2INT(argc) != bf->argc) {
+ COMPILE_ERROR(ERROR_ARGS "argc is not match for builtin function:%s (expect %d but %d)",
+ builtin_func, bf->argc, FIX2INT(argc));
+ return COMPILE_NG;
+ }
+
+ unsigned int start_index;
+ if (delegate_call_p(iseq, FIX2INT(argc), args, &start_index)) {
+ ADD_INSN2(ret, line_node, opt_invokebuiltin_delegate, bf, INT2FIX(start_index));
+ }
+ else {
+ ADD_SEQ(ret, args);
+ ADD_INSN1(ret, line_node, invokebuiltin, bf);
+ }
+
+ if (popped) ADD_INSN(ret, line_node, pop);
+ return COMPILE_OK;
+ }
+}
+
+static int
+compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, const enum node_type type, const NODE *const line_node, int popped, bool assume_receiver)
{
/* call: obj.method(...)
* fcall: func(...)
@@ -6867,7 +8419,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
ID mid = node->nd_mid;
VALUE argc;
unsigned int flag = 0;
- struct rb_call_info_kw_arg *keywords = NULL;
+ struct rb_callinfo_kwarg *keywords = NULL;
const rb_iseq_t *parent_block = ISEQ_COMPILE_DATA(iseq)->current_block;
LABEL *else_label = NULL;
VALUE branches = Qfalse;
@@ -6877,7 +8429,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
INIT_ANCHOR(recv);
INIT_ANCHOR(args);
#if OPT_SUPPORT_JOKE
- if (nd_type(node) == NODE_VCALL) {
+ if (nd_type_p(node, NODE_VCALL)) {
ID id_bitblt;
ID id_answer;
@@ -6885,11 +8437,11 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
CONST_ID(id_answer, "the_answer_to_life_the_universe_and_everything");
if (mid == id_bitblt) {
- ADD_INSN(ret, line, bitblt);
+ ADD_INSN(ret, line_node, bitblt);
return COMPILE_OK;
}
else if (mid == id_answer) {
- ADD_INSN(ret, line, answer);
+ ADD_INSN(ret, line_node, answer);
return COMPILE_OK;
}
}
@@ -6901,7 +8453,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
CONST_ID(goto_id, "__goto__");
CONST_ID(label_id, "__label__");
- if (nd_type(node) == NODE_FCALL &&
+ if (nd_type_p(node, NODE_FCALL) &&
(mid == goto_id || mid == label_id)) {
LABEL *label;
st_data_t data;
@@ -6912,13 +8464,13 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
labels_table = st_init_numtable();
ISEQ_COMPILE_DATA(iseq)->labels_table = labels_table;
}
- if (nd_type(node->nd_args->nd_head) == NODE_LIT &&
+ if (nd_type_p(node->nd_args->nd_head, NODE_LIT) &&
SYMBOL_P(node->nd_args->nd_head->nd_lit)) {
label_name = node->nd_args->nd_head->nd_lit;
if (!st_lookup(labels_table, (st_data_t)label_name, &data)) {
- label = NEW_LABEL(line);
- label->position = line;
+ label = NEW_LABEL(nd_line(line_node));
+ label->position = nd_line(line_node);
st_insert(labels_table, (st_data_t)label_name, (st_data_t)label);
}
else {
@@ -6931,7 +8483,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
}
if (mid == goto_id) {
- ADD_INSNL(ret, line, jump, label);
+ ADD_INSNL(ret, line_node, jump, label);
}
else {
ADD_LABEL(ret, label);
@@ -6940,142 +8492,910 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
}
}
#endif
- const char *builtin_func;
- NODE *args_node = node->nd_args;
+ const char *builtin_func;
if (UNLIKELY(iseq_has_builtin_function_table(iseq)) &&
- (builtin_func = iseq_builtin_function_name(mid)) != NULL) {
-
- if (parent_block != NULL) {
- COMPILE_ERROR(iseq, line, "should not call builtins here.");
- return COMPILE_NG;
- }
- else {
- char inline_func[0x20];
- bool cconst = false;
- retry:;
- const struct rb_builtin_function *bf = iseq_builtin_function_lookup(iseq, builtin_func);
-
- if (bf == NULL) {
- if (strcmp("cstmt!", builtin_func) == 0 ||
- strcmp("cexpr!", builtin_func) == 0) {
- inlinec:;
- int inline_index = GET_VM()->builtin_inline_index++;
- snprintf(inline_func, 0x20, "_bi%d", inline_index);
- builtin_func = inline_func;
- args_node = NULL;
- goto retry;
- }
- else if (strcmp("cconst!", builtin_func) == 0) {
- cconst = true;
- goto inlinec;
- }
- else if (strcmp("cinit!", builtin_func) == 0) {
- // ignore
- GET_VM()->builtin_inline_index++;
- return COMPILE_OK;
- }
+ (builtin_func = iseq_builtin_function_name(type, node->nd_recv, mid)) != NULL) {
+ return compile_builtin_function_call(iseq, ret, node, line_node, popped, parent_block, args, builtin_func);
+ }
- if (1) {
- rb_bug("can't find builtin function:%s", builtin_func);
- }
- else {
- COMPILE_ERROR(ERROR_ARGS "can't find builtin function:%s", builtin_func);
- }
- return COMPILE_NG;
+ /* receiver */
+ if (!assume_receiver) {
+ if (type == NODE_CALL || type == NODE_OPCALL || type == NODE_QCALL) {
+ int idx, level;
+
+ if (mid == idCall &&
+ nd_type_p(node->nd_recv, NODE_LVAR) &&
+ iseq_block_param_id_p(iseq, node->nd_recv->nd_vid, &idx, &level)) {
+ ADD_INSN2(recv, node->nd_recv, getblockparamproxy, INT2FIX(idx + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ }
+ else if (private_recv_p(node)) {
+ ADD_INSN(recv, node, putself);
+ flag |= VM_CALL_FCALL;
+ }
+ else {
+ CHECK(COMPILE(recv, "recv", node->nd_recv));
}
- if (cconst) {
- typedef VALUE(*builtin_func0)(void *, VALUE);
- VALUE const_val = (*(builtin_func0)bf->func_ptr)(NULL, Qnil);
- ADD_INSN1(ret, line, putobject, const_val);
- return COMPILE_OK;
+ if (type == NODE_QCALL) {
+ else_label = qcall_branch_start(iseq, recv, &branches, node, line_node);
}
+ }
+ else if (type == NODE_FCALL || type == NODE_VCALL) {
+ ADD_CALL_RECEIVER(recv, line_node);
+ }
+ }
- // fprintf(stderr, "func_name:%s -> %p\n", builtin_func, bf->func_ptr);
+ /* args */
+ if (type != NODE_VCALL) {
+ argc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
+ CHECK(!NIL_P(argc));
+ }
+ else {
+ argc = INT2FIX(0);
+ }
+
+ ADD_SEQ(ret, recv);
+ ADD_SEQ(ret, args);
- argc = setup_args(iseq, args, args_node, &flag, &keywords);
+ debugp_param("call args argc", argc);
+ debugp_param("call method", ID2SYM(mid));
- if (FIX2INT(argc) != bf->argc) {
- COMPILE_ERROR(ERROR_ARGS "argc is not match for builtin function:%s (expect %d but %d)",
- builtin_func, bf->argc, FIX2INT(argc));
- return COMPILE_NG;
- }
+ switch ((int)type) {
+ case NODE_VCALL:
+ flag |= VM_CALL_VCALL;
+ /* VCALL is funcall, so fall through */
+ case NODE_FCALL:
+ flag |= VM_CALL_FCALL;
+ }
+
+ ADD_SEND_R(ret, line_node, mid, argc, parent_block, INT2FIX(flag), keywords);
+
+ qcall_branch_end(iseq, ret, else_label, branches, node, line_node);
+ if (popped) {
+ ADD_INSN(ret, line_node, pop);
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_op_asgn1(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ const int line = nd_line(node);
+ VALUE argc;
+ unsigned int flag = 0;
+ int asgnflag = 0;
+ ID id = node->nd_mid;
+ int boff = 0;
+
+ /*
+ * a[x] (op)= y
+ *
+ * nil # nil
+ * eval a # nil a
+ * eval x # nil a x
+ * dupn 2 # nil a x a x
+ * send :[] # nil a x a[x]
+ * eval y # nil a x a[x] y
+ * send op # nil a x ret
+ * setn 3 # ret a x ret
+ * send []= # ret ?
+ * pop # ret
+ */
- unsigned int start_index;
- if (delegate_call_p(iseq, FIX2INT(argc), args, &start_index)) {
- ADD_INSN2(ret, line, opt_invokebuiltin_delegate, bf, INT2FIX(start_index));
+ /*
+ * nd_recv[nd_args->nd_body] (nd_mid)= nd_args->nd_head;
+ * NODE_OP_ASGN nd_recv
+ * nd_args->nd_head
+ * nd_args->nd_body
+ * nd_mid
+ */
+
+ if (!popped) {
+ ADD_INSN(ret, node, putnil);
+ }
+ asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN1 recv", node);
+ CHECK(asgnflag != -1);
+ switch (nd_type(node->nd_args->nd_head)) {
+ case NODE_ZLIST:
+ argc = INT2FIX(0);
+ break;
+ case NODE_BLOCK_PASS:
+ boff = 1;
+ /* fall through */
+ default:
+ argc = setup_args(iseq, ret, node->nd_args->nd_head, &flag, NULL);
+ CHECK(!NIL_P(argc));
+ }
+ ADD_INSN1(ret, node, dupn, FIXNUM_INC(argc, 1 + boff));
+ flag |= asgnflag;
+ ADD_SEND_WITH_FLAG(ret, node, idAREF, argc, INT2FIX(flag));
+
+ if (id == idOROP || id == idANDOP) {
+ /* a[x] ||= y or a[x] &&= y
+
+ unless/if a[x]
+ a[x]= y
+ else
+ nil
+ end
+ */
+ LABEL *label = NEW_LABEL(line);
+ LABEL *lfin = NEW_LABEL(line);
+
+ ADD_INSN(ret, node, dup);
+ if (id == idOROP) {
+ ADD_INSNL(ret, node, branchif, label);
+ }
+ else { /* idANDOP */
+ ADD_INSNL(ret, node, branchunless, label);
+ }
+ ADD_INSN(ret, node, pop);
+
+ CHECK(COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body));
+ if (!popped) {
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 2+boff));
+ }
+ if (flag & VM_CALL_ARGS_SPLAT) {
+ ADD_INSN1(ret, node, newarray, INT2FIX(1));
+ if (boff > 0) {
+ ADD_INSN1(ret, node, dupn, INT2FIX(3));
+ ADD_INSN(ret, node, swap);
+ ADD_INSN(ret, node, pop);
}
- else {
- ADD_SEQ(ret, args);
- ADD_INSN1(ret,line, invokebuiltin, bf);
+ ADD_INSN(ret, node, concatarray);
+ if (boff > 0) {
+ ADD_INSN1(ret, node, setn, INT2FIX(3));
+ ADD_INSN(ret, node, pop);
+ ADD_INSN(ret, node, pop);
}
+ ADD_SEND_WITH_FLAG(ret, node, idASET, argc, INT2FIX(flag));
+ }
+ else {
+ if (boff > 0)
+ ADD_INSN(ret, node, swap);
+ ADD_SEND_WITH_FLAG(ret, node, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
+ }
+ ADD_INSN(ret, node, pop);
+ ADD_INSNL(ret, node, jump, lfin);
+ ADD_LABEL(ret, label);
+ if (!popped) {
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 2+boff));
+ }
+ ADD_INSN1(ret, node, adjuststack, FIXNUM_INC(argc, 2+boff));
+ ADD_LABEL(ret, lfin);
+ }
+ else {
+ CHECK(COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body));
+ ADD_SEND(ret, node, id, INT2FIX(1));
+ if (!popped) {
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 2+boff));
+ }
+ if (flag & VM_CALL_ARGS_SPLAT) {
+ ADD_INSN1(ret, node, newarray, INT2FIX(1));
+ if (boff > 0) {
+ ADD_INSN1(ret, node, dupn, INT2FIX(3));
+ ADD_INSN(ret, node, swap);
+ ADD_INSN(ret, node, pop);
+ }
+ ADD_INSN(ret, node, concatarray);
+ if (boff > 0) {
+ ADD_INSN1(ret, node, setn, INT2FIX(3));
+ ADD_INSN(ret, node, pop);
+ ADD_INSN(ret, node, pop);
+ }
+ ADD_SEND_WITH_FLAG(ret, node, idASET, argc, INT2FIX(flag));
+ }
+ else {
+ if (boff > 0)
+ ADD_INSN(ret, node, swap);
+ ADD_SEND_WITH_FLAG(ret, node, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
+ }
+ ADD_INSN(ret, node, pop);
+ }
+ return COMPILE_OK;
+}
- if (popped) ADD_INSN(ret, line, pop);
- return COMPILE_OK;
+static int
+compile_op_asgn2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ const int line = nd_line(node);
+ ID atype = node->nd_next->nd_mid;
+ ID vid = node->nd_next->nd_vid, aid = rb_id_attrset(vid);
+ int asgnflag;
+ LABEL *lfin = NEW_LABEL(line);
+ LABEL *lcfin = NEW_LABEL(line);
+ LABEL *lskip = 0;
+ /*
+ class C; attr_accessor :c; end
+ r = C.new
+ r.a &&= v # asgn2
+
+ eval r # r
+ dup # r r
+ eval r.a # r o
+
+ # or
+ dup # r o o
+ if lcfin # r o
+ pop # r
+ eval v # r v
+ swap # v r
+ topn 1 # v r v
+ send a= # v ?
+ jump lfin # v ?
+
+ lcfin: # r o
+ swap # o r
+
+ lfin: # o ?
+ pop # o
+
+ # or (popped)
+ if lcfin # r
+ eval v # r v
+ send a= # ?
+ jump lfin # ?
+
+ lcfin: # r
+
+ lfin: # ?
+ pop #
+
+ # and
+ dup # r o o
+ unless lcfin
+ pop # r
+ eval v # r v
+ swap # v r
+ topn 1 # v r v
+ send a= # v ?
+ jump lfin # v ?
+
+ # others
+ eval v # r o v
+ send ?? # r w
+ send a= # w
+
+ */
+
+ asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN2#recv", node);
+ CHECK(asgnflag != -1);
+ if (node->nd_next->nd_aid) {
+ lskip = NEW_LABEL(line);
+ ADD_INSN(ret, node, dup);
+ ADD_INSNL(ret, node, branchnil, lskip);
+ }
+ ADD_INSN(ret, node, dup);
+ ADD_SEND_WITH_FLAG(ret, node, vid, INT2FIX(0), INT2FIX(asgnflag));
+
+ if (atype == idOROP || atype == idANDOP) {
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ if (atype == idOROP) {
+ ADD_INSNL(ret, node, branchif, lcfin);
+ }
+ else { /* idANDOP */
+ ADD_INSNL(ret, node, branchunless, lcfin);
+ }
+ if (!popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ CHECK(COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value));
+ if (!popped) {
+ ADD_INSN(ret, node, swap);
+ ADD_INSN1(ret, node, topn, INT2FIX(1));
+ }
+ ADD_SEND_WITH_FLAG(ret, node, aid, INT2FIX(1), INT2FIX(asgnflag));
+ ADD_INSNL(ret, node, jump, lfin);
+
+ ADD_LABEL(ret, lcfin);
+ if (!popped) {
+ ADD_INSN(ret, node, swap);
+ }
+
+ ADD_LABEL(ret, lfin);
+ }
+ else {
+ CHECK(COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value));
+ ADD_SEND(ret, node, atype, INT2FIX(1));
+ if (!popped) {
+ ADD_INSN(ret, node, swap);
+ ADD_INSN1(ret, node, topn, INT2FIX(1));
+ }
+ ADD_SEND_WITH_FLAG(ret, node, aid, INT2FIX(1), INT2FIX(asgnflag));
+ }
+ if (lskip && popped) {
+ ADD_LABEL(ret, lskip);
+ }
+ ADD_INSN(ret, node, pop);
+ if (lskip && !popped) {
+ ADD_LABEL(ret, lskip);
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_op_cdecl(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ const int line = nd_line(node);
+ LABEL *lfin = 0;
+ LABEL *lassign = 0;
+ ID mid;
+
+ switch (nd_type(node->nd_head)) {
+ case NODE_COLON3:
+ ADD_INSN1(ret, node, putobject, rb_cObject);
+ break;
+ case NODE_COLON2:
+ CHECK(COMPILE(ret, "NODE_OP_CDECL/colon2#nd_head", node->nd_head->nd_head));
+ break;
+ default:
+ COMPILE_ERROR(ERROR_ARGS "%s: invalid node in NODE_OP_CDECL",
+ ruby_node_name(nd_type(node->nd_head)));
+ return COMPILE_NG;
+ }
+ mid = node->nd_head->nd_mid;
+ /* cref */
+ if (node->nd_aid == idOROP) {
+ lassign = NEW_LABEL(line);
+ ADD_INSN(ret, node, dup); /* cref cref */
+ ADD_INSN3(ret, node, defined, INT2FIX(DEFINED_CONST_FROM),
+ ID2SYM(mid), Qtrue); /* cref bool */
+ ADD_INSNL(ret, node, branchunless, lassign); /* cref */
+ }
+ ADD_INSN(ret, node, dup); /* cref cref */
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ ADD_INSN1(ret, node, getconstant, ID2SYM(mid)); /* cref obj */
+
+ if (node->nd_aid == idOROP || node->nd_aid == idANDOP) {
+ lfin = NEW_LABEL(line);
+ if (!popped) ADD_INSN(ret, node, dup); /* cref [obj] obj */
+ if (node->nd_aid == idOROP)
+ ADD_INSNL(ret, node, branchif, lfin);
+ else /* idANDOP */
+ ADD_INSNL(ret, node, branchunless, lfin);
+ /* cref [obj] */
+ if (!popped) ADD_INSN(ret, node, pop); /* cref */
+ if (lassign) ADD_LABEL(ret, lassign);
+ CHECK(COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value));
+ /* cref value */
+ if (popped)
+ ADD_INSN1(ret, node, topn, INT2FIX(1)); /* cref value cref */
+ else {
+ ADD_INSN1(ret, node, dupn, INT2FIX(2)); /* cref value cref value */
+ ADD_INSN(ret, node, swap); /* cref value value cref */
+ }
+ ADD_INSN1(ret, node, setconstant, ID2SYM(mid)); /* cref [value] */
+ ADD_LABEL(ret, lfin); /* cref [value] */
+ if (!popped) ADD_INSN(ret, node, swap); /* [value] cref */
+ ADD_INSN(ret, node, pop); /* [value] */
+ }
+ else {
+ CHECK(COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value));
+ /* cref obj value */
+ ADD_CALL(ret, node, node->nd_aid, INT2FIX(1));
+ /* cref value */
+ ADD_INSN(ret, node, swap); /* value cref */
+ if (!popped) {
+ ADD_INSN1(ret, node, topn, INT2FIX(1)); /* value cref value */
+ ADD_INSN(ret, node, swap); /* value value cref */
}
+ ADD_INSN1(ret, node, setconstant, ID2SYM(mid));
}
+ return COMPILE_OK;
+}
+static int
+compile_op_log(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const enum node_type type)
+{
+ const int line = nd_line(node);
+ LABEL *lfin = NEW_LABEL(line);
+ LABEL *lassign;
+
+ if (type == NODE_OP_ASGN_OR && !nd_type_p(node->nd_head, NODE_IVAR)) {
+ LABEL *lfinish[2];
+ lfinish[0] = lfin;
+ lfinish[1] = 0;
+ defined_expr(iseq, ret, node->nd_head, lfinish, Qfalse);
+ lassign = lfinish[1];
+ if (!lassign) {
+ lassign = NEW_LABEL(line);
+ }
+ ADD_INSNL(ret, node, branchunless, lassign);
+ }
+ else {
+ lassign = NEW_LABEL(line);
+ }
- /* receiver */
- if (type == NODE_CALL || type == NODE_OPCALL || type == NODE_QCALL) {
- int idx, level;
+ CHECK(COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_head", node->nd_head));
- if (mid == idCall &&
- nd_type(node->nd_recv) == NODE_LVAR &&
- iseq_block_param_id_p(iseq, node->nd_recv->nd_vid, &idx, &level)) {
- ADD_INSN2(recv, nd_line(node->nd_recv), getblockparamproxy, INT2FIX(idx + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+
+ if (type == NODE_OP_ASGN_AND) {
+ ADD_INSNL(ret, node, branchunless, lfin);
+ }
+ else {
+ ADD_INSNL(ret, node, branchif, lfin);
+ }
+
+ if (!popped) {
+ ADD_INSN(ret, node, pop);
+ }
+
+ ADD_LABEL(ret, lassign);
+ CHECK(COMPILE_(ret, "NODE_OP_ASGN_AND/OR#nd_value", node->nd_value, popped));
+ ADD_LABEL(ret, lfin);
+ return COMPILE_OK;
+}
+
+static int
+compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const enum node_type type)
+{
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
+ DECL_ANCHOR(args);
+ int argc;
+ unsigned int flag = 0;
+ struct rb_callinfo_kwarg *keywords = NULL;
+ const rb_iseq_t *parent_block = ISEQ_COMPILE_DATA(iseq)->current_block;
+
+ INIT_ANCHOR(args);
+ ISEQ_COMPILE_DATA(iseq)->current_block = NULL;
+ if (type == NODE_SUPER) {
+ VALUE vargc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
+ CHECK(!NIL_P(vargc));
+ argc = FIX2INT(vargc);
+ }
+ else {
+ /* NODE_ZSUPER */
+ int i;
+ const rb_iseq_t *liseq = body->local_iseq;
+ const struct rb_iseq_constant_body *const local_body = ISEQ_BODY(liseq);
+ const struct rb_iseq_param_keyword *const local_kwd = local_body->param.keyword;
+ int lvar_level = get_lvar_level(iseq);
+
+ argc = local_body->param.lead_num;
+
+ /* normal arguments */
+ for (i = 0; i < local_body->param.lead_num; i++) {
+ int idx = local_body->local_table_size - i;
+ ADD_GETLOCAL(args, node, idx, lvar_level);
}
- else if (private_recv_p(node)) {
- ADD_INSN(recv, nd_line(node), putself);
- flag |= VM_CALL_FCALL;
+
+ if (local_body->param.flags.has_opt) {
+ /* optional arguments */
+ int j;
+ for (j = 0; j < local_body->param.opt_num; j++) {
+ int idx = local_body->local_table_size - (i + j);
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ }
+ i += j;
+ argc = i;
}
- else {
- CHECK(COMPILE(recv, "recv", node->nd_recv));
+ if (local_body->param.flags.has_rest) {
+ /* rest argument */
+ int idx = local_body->local_table_size - local_body->param.rest_start;
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ ADD_INSN1(args, node, splatarray, Qfalse);
+
+ argc = local_body->param.rest_start + 1;
+ flag |= VM_CALL_ARGS_SPLAT;
+ }
+ if (local_body->param.flags.has_post) {
+ /* post arguments */
+ int post_len = local_body->param.post_num;
+ int post_start = local_body->param.post_start;
+
+ if (local_body->param.flags.has_rest) {
+ int j;
+ for (j=0; j<post_len; j++) {
+ int idx = local_body->local_table_size - (post_start + j);
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ }
+ ADD_INSN1(args, node, newarray, INT2FIX(j));
+ ADD_INSN (args, node, concatarray);
+ /* argc is settled at above */
+ }
+ else {
+ int j;
+ for (j=0; j<post_len; j++) {
+ int idx = local_body->local_table_size - (post_start + j);
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ }
+ argc = post_len + post_start;
+ }
+ }
+
+ if (local_body->param.flags.has_kw) { /* TODO: support keywords */
+ int local_size = local_body->local_table_size;
+ argc++;
+
+ ADD_INSN1(args, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+
+ if (local_body->param.flags.has_kwrest) {
+ int idx = local_body->local_table_size - local_kwd->rest_start;
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ if (local_kwd->num > 0) {
+ ADD_SEND (args, node, rb_intern("dup"), INT2FIX(0));
+ flag |= VM_CALL_KW_SPLAT_MUT;
+ }
+ }
+ else {
+ ADD_INSN1(args, node, newhash, INT2FIX(0));
+ flag |= VM_CALL_KW_SPLAT_MUT;
+ }
+ for (i = 0; i < local_kwd->num; ++i) {
+ ID id = local_kwd->table[i];
+ int idx = local_size - get_local_var_idx(liseq, id);
+ ADD_INSN1(args, node, putobject, ID2SYM(id));
+ ADD_GETLOCAL(args, node, idx, lvar_level);
+ }
+ ADD_SEND(args, node, id_core_hash_merge_ptr, INT2FIX(i * 2 + 1));
+ if (local_body->param.flags.has_rest) {
+ ADD_INSN1(args, node, newarray, INT2FIX(1));
+ ADD_INSN (args, node, concatarray);
+ --argc;
+ }
+ flag |= VM_CALL_KW_SPLAT;
}
+ else if (local_body->param.flags.has_kwrest) {
+ int idx = local_body->local_table_size - local_kwd->rest_start;
+ ADD_GETLOCAL(args, node, idx, lvar_level);
- if (type == NODE_QCALL) {
- else_label = qcall_branch_start(iseq, recv, &branches, node, line);
+ if (local_body->param.flags.has_rest) {
+ ADD_INSN1(args, node, newarray, INT2FIX(1));
+ ADD_INSN (args, node, concatarray);
+ }
+ else {
+ argc++;
+ }
+ flag |= VM_CALL_KW_SPLAT;
}
}
- else if (type == NODE_FCALL || type == NODE_VCALL) {
- ADD_CALL_RECEIVER(recv, line);
+
+ flag |= VM_CALL_SUPER | VM_CALL_FCALL;
+ if (type == NODE_ZSUPER) flag |= VM_CALL_ZSUPER;
+ ADD_INSN(ret, node, putself);
+ ADD_SEQ(ret, args);
+ ADD_INSN2(ret, node, invokesuper,
+ new_callinfo(iseq, 0, argc, flag, keywords, parent_block != NULL),
+ parent_block);
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
}
+ return COMPILE_OK;
+}
- /* args */
- if (type != NODE_VCALL) {
- argc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
+static int
+compile_yield(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ DECL_ANCHOR(args);
+ VALUE argc;
+ unsigned int flag = 0;
+ struct rb_callinfo_kwarg *keywords = NULL;
+
+ INIT_ANCHOR(args);
+
+ switch (ISEQ_BODY(ISEQ_BODY(iseq)->local_iseq)->type) {
+ case ISEQ_TYPE_TOP:
+ case ISEQ_TYPE_MAIN:
+ case ISEQ_TYPE_CLASS:
+ COMPILE_ERROR(ERROR_ARGS "Invalid yield");
+ return COMPILE_NG;
+ default: /* valid */;
+ }
+
+ if (node->nd_head) {
+ argc = setup_args(iseq, args, node->nd_head, &flag, &keywords);
CHECK(!NIL_P(argc));
}
else {
argc = INT2FIX(0);
}
- ADD_SEQ(ret, recv);
ADD_SEQ(ret, args);
+ ADD_INSN1(ret, node, invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), flag, keywords, FALSE));
- debugp_param("call args argc", argc);
- debugp_param("call method", ID2SYM(mid));
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+
+ int level = 0;
+ const rb_iseq_t *tmp_iseq = iseq;
+ for (; tmp_iseq != ISEQ_BODY(iseq)->local_iseq; level++ ) {
+ tmp_iseq = ISEQ_BODY(tmp_iseq)->parent_iseq;
+ }
+ if (level > 0) access_outer_variables(iseq, level, rb_intern("yield"), true);
+
+ return COMPILE_OK;
+}
+static int
+compile_match(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const enum node_type type)
+{
+ DECL_ANCHOR(recv);
+ DECL_ANCHOR(val);
+
+ INIT_ANCHOR(recv);
+ INIT_ANCHOR(val);
switch ((int)type) {
- case NODE_VCALL:
- flag |= VM_CALL_VCALL;
- /* VCALL is funcall, so fall through */
- case NODE_FCALL:
- flag |= VM_CALL_FCALL;
+ case NODE_MATCH:
+ ADD_INSN1(recv, node, putobject, node->nd_lit);
+ ADD_INSN2(val, node, getspecial, INT2FIX(0),
+ INT2FIX(0));
+ break;
+ case NODE_MATCH2:
+ CHECK(COMPILE(recv, "receiver", node->nd_recv));
+ CHECK(COMPILE(val, "value", node->nd_value));
+ break;
+ case NODE_MATCH3:
+ CHECK(COMPILE(recv, "receiver", node->nd_value));
+ CHECK(COMPILE(val, "value", node->nd_recv));
+ break;
+ }
+
+ ADD_SEQ(ret, recv);
+ ADD_SEQ(ret, val);
+ ADD_SEND(ret, node, idEqTilde, INT2FIX(1));
+
+ if (node->nd_args) {
+ compile_named_capture_assign(iseq, ret, node->nd_args);
+ }
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_colon2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ if (rb_is_const_id(node->nd_mid)) {
+ /* constant */
+ VALUE segments;
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache &&
+ (segments = collect_const_segments(iseq, node))) {
+ ISEQ_BODY(iseq)->ic_size++;
+ ADD_INSN1(ret, node, opt_getconstant_path, segments);
+ RB_OBJ_WRITTEN(iseq, Qundef, segments);
+ }
+ else {
+ /* constant */
+ DECL_ANCHOR(pref);
+ DECL_ANCHOR(body);
+
+ INIT_ANCHOR(pref);
+ INIT_ANCHOR(body);
+ CHECK(compile_const_prefix(iseq, node, pref, body));
+ if (LIST_INSN_SIZE_ZERO(pref)) {
+ ADD_INSN(ret, node, putnil);
+ ADD_SEQ(ret, body);
+ }
+ else {
+ ADD_SEQ(ret, pref);
+ ADD_SEQ(ret, body);
+ }
+ }
+ }
+ else {
+ /* function call */
+ ADD_CALL_RECEIVER(ret, node);
+ CHECK(COMPILE(ret, "colon2#nd_head", node->nd_head));
+ ADD_CALL(ret, node, node->nd_mid, INT2FIX(1));
+ }
+ if (popped) {
+ ADD_INSN(ret, node, pop);
}
+ return COMPILE_OK;
+}
+
+static int
+compile_colon3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ debugi("colon3#nd_mid", node->nd_mid);
- ADD_SEND_R(ret, line, mid, argc, parent_block, INT2FIX(flag), keywords);
+ /* add cache insn */
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
+ ISEQ_BODY(iseq)->ic_size++;
+ VALUE segments = rb_ary_new_from_args(2, ID2SYM(idNULL), ID2SYM(node->nd_mid));
+ ADD_INSN1(ret, node, opt_getconstant_path, segments);
+ RB_OBJ_WRITTEN(iseq, Qundef, segments);
+ }
+ else {
+ ADD_INSN1(ret, node, putobject, rb_cObject);
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ ADD_INSN1(ret, node, getconstant, ID2SYM(node->nd_mid));
+ }
- qcall_branch_end(iseq, ret, else_label, branches, node, line);
if (popped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, node, pop);
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_dots(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped, const int excl)
+{
+ VALUE flag = INT2FIX(excl);
+ const NODE *b = node->nd_beg;
+ const NODE *e = node->nd_end;
+
+ if (optimizable_range_item_p(b) && optimizable_range_item_p(e)) {
+ if (!popped) {
+ VALUE bv = nd_type_p(b, NODE_LIT) ? b->nd_lit : Qnil;
+ VALUE ev = nd_type_p(e, NODE_LIT) ? e->nd_lit : Qnil;
+ VALUE val = rb_range_new(bv, ev, excl);
+ ADD_INSN1(ret, node, putobject, val);
+ RB_OBJ_WRITTEN(iseq, Qundef, val);
+ }
+ }
+ else {
+ CHECK(COMPILE_(ret, "min", b, popped));
+ CHECK(COMPILE_(ret, "max", e, popped));
+ if (!popped) {
+ ADD_INSN1(ret, node, newrange, flag);
+ }
}
return COMPILE_OK;
}
+static int
+compile_errinfo(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ if (!popped) {
+ if (ISEQ_BODY(iseq)->type == ISEQ_TYPE_RESCUE) {
+ ADD_GETLOCAL(ret, node, LVAR_ERRINFO, 0);
+ }
+ else {
+ const rb_iseq_t *ip = iseq;
+ int level = 0;
+ while (ip) {
+ if (ISEQ_BODY(ip)->type == ISEQ_TYPE_RESCUE) {
+ break;
+ }
+ ip = ISEQ_BODY(ip)->parent_iseq;
+ level++;
+ }
+ if (ip) {
+ ADD_GETLOCAL(ret, node, LVAR_ERRINFO, level);
+ }
+ else {
+ ADD_INSN(ret, node, putnil);
+ }
+ }
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_kw_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
+ LABEL *end_label = NEW_LABEL(nd_line(node));
+ const NODE *default_value = node->nd_body->nd_value;
+
+ if (default_value == NODE_SPECIAL_REQUIRED_KEYWORD) {
+ /* required argument. do nothing */
+ COMPILE_ERROR(ERROR_ARGS "unreachable");
+ return COMPILE_NG;
+ }
+ else if (nd_type_p(default_value, NODE_LIT) ||
+ nd_type_p(default_value, NODE_NIL) ||
+ nd_type_p(default_value, NODE_TRUE) ||
+ nd_type_p(default_value, NODE_FALSE)) {
+ COMPILE_ERROR(ERROR_ARGS "unreachable");
+ return COMPILE_NG;
+ }
+ else {
+ /* if keywordcheck(_kw_bits, nth_keyword)
+ * kw = default_value
+ * end
+ */
+ int kw_bits_idx = body->local_table_size - body->param.keyword->bits_start;
+ int keyword_idx = body->param.keyword->num;
+
+ ADD_INSN2(ret, node, checkkeyword, INT2FIX(kw_bits_idx + VM_ENV_DATA_SIZE - 1), INT2FIX(keyword_idx));
+ ADD_INSNL(ret, node, branchif, end_label);
+ CHECK(COMPILE_POPPED(ret, "keyword default argument", node->nd_body));
+ ADD_LABEL(ret, end_label);
+ }
+ return COMPILE_OK;
+}
+
+static int
+compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
+{
+ DECL_ANCHOR(recv);
+ DECL_ANCHOR(args);
+ unsigned int flag = 0;
+ ID mid = node->nd_mid;
+ VALUE argc;
+ LABEL *else_label = NULL;
+ VALUE branches = Qfalse;
+
+ /* optimization shortcut
+ * obj["literal"] = value -> opt_aset_with(obj, "literal", value)
+ */
+ if (!ISEQ_COMPILE_DATA(iseq)->in_masgn &&
+ mid == idASET && !private_recv_p(node) && node->nd_args &&
+ nd_type_p(node->nd_args, NODE_LIST) && node->nd_args->nd_alen == 2 &&
+ nd_type_p(node->nd_args->nd_head, NODE_STR) &&
+ ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
+ !ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
+ ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
+ {
+ VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
+ CHECK(COMPILE(ret, "recv", node->nd_recv));
+ CHECK(COMPILE(ret, "value", node->nd_args->nd_next->nd_head));
+ if (!popped) {
+ ADD_INSN(ret, node, swap);
+ ADD_INSN1(ret, node, topn, INT2FIX(1));
+ }
+ ADD_INSN2(ret, node, opt_aset_with, str,
+ new_callinfo(iseq, idASET, 2, 0, NULL, FALSE));
+ RB_OBJ_WRITTEN(iseq, Qundef, str);
+ ADD_INSN(ret, node, pop);
+ return COMPILE_OK;
+ }
+
+ INIT_ANCHOR(recv);
+ INIT_ANCHOR(args);
+ argc = setup_args(iseq, args, node->nd_args, &flag, NULL);
+ CHECK(!NIL_P(argc));
+
+ int asgnflag = COMPILE_RECV(recv, "recv", node);
+ CHECK(asgnflag != -1);
+ flag |= (unsigned int)asgnflag;
+
+ debugp_param("argc", argc);
+ debugp_param("nd_mid", ID2SYM(mid));
+
+ if (!rb_is_attrset_id(mid)) {
+ /* safe nav attr */
+ mid = rb_id_attrset(mid);
+ else_label = qcall_branch_start(iseq, recv, &branches, node, node);
+ }
+ if (!popped) {
+ ADD_INSN(ret, node, putnil);
+ ADD_SEQ(ret, recv);
+ ADD_SEQ(ret, args);
-static int iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped);
+ if (flag & VM_CALL_ARGS_BLOCKARG) {
+ ADD_INSN1(ret, node, topn, INT2FIX(1));
+ if (flag & VM_CALL_ARGS_SPLAT) {
+ ADD_INSN1(ret, node, putobject, INT2FIX(-1));
+ ADD_SEND_WITH_FLAG(ret, node, idAREF, INT2FIX(1), INT2FIX(asgnflag));
+ }
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 3));
+ ADD_INSN (ret, node, pop);
+ }
+ else if (flag & VM_CALL_ARGS_SPLAT) {
+ ADD_INSN(ret, node, dup);
+ ADD_INSN1(ret, node, putobject, INT2FIX(-1));
+ ADD_SEND_WITH_FLAG(ret, node, idAREF, INT2FIX(1), INT2FIX(asgnflag));
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 2));
+ ADD_INSN (ret, node, pop);
+ }
+ else {
+ ADD_INSN1(ret, node, setn, FIXNUM_INC(argc, 1));
+ }
+ }
+ else {
+ ADD_SEQ(ret, recv);
+ ADD_SEQ(ret, args);
+ }
+ ADD_SEND_WITH_FLAG(ret, node, mid, argc, INT2FIX(flag));
+ qcall_branch_end(iseq, ret, else_label, branches, node, node);
+ ADD_INSN(ret, node, pop);
+ return COMPILE_OK;
+}
+
+static int iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped);
/**
compile each node
@@ -7091,7 +9411,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, const NODE *node, int poppe
int lineno = ISEQ_COMPILE_DATA(iseq)->last_line;
if (lineno == 0) lineno = FIX2INT(rb_iseq_first_lineno(iseq));
debugs("node: NODE_NIL(implicit)\n");
- ADD_INSN(ret, lineno, putnil);
+ NODE dummy_line_node = generate_dummy_line_node(lineno, -1);
+ ADD_INSN(ret, &dummy_line_node, putnil);
}
return COMPILE_OK;
}
@@ -7099,44 +9420,24 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, const NODE *node, int poppe
}
static int
-check_yield_place(const rb_iseq_t *iseq, int line)
-{
- VALUE file;
- switch (iseq->body->local_iseq->body->type) {
- case ISEQ_TYPE_TOP:
- case ISEQ_TYPE_MAIN:
- return FALSE;
- case ISEQ_TYPE_CLASS:
- file = rb_iseq_path(iseq);
- if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) {
- rb_compile_warn(RSTRING_PTR(file), line,
- "`yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]");
- }
- return TRUE;
- default:
- return TRUE;
- }
-}
-
-static int
-iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped)
+iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
const int line = (int)nd_line(node);
const enum node_type type = nd_type(node);
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
if (ISEQ_COMPILE_DATA(iseq)->last_line == line) {
- /* ignore */
+ /* ignore */
}
else {
- if (node->flags & NODE_FL_NEWLINE) {
- int event = RUBY_EVENT_LINE;
- ISEQ_COMPILE_DATA(iseq)->last_line = line;
- if (ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq)) {
- event |= RUBY_EVENT_COVERAGE_LINE;
- }
- ADD_TRACE(ret, event);
- }
+ if (node->flags & NODE_FL_NEWLINE) {
+ int event = RUBY_EVENT_LINE;
+ ISEQ_COMPILE_DATA(iseq)->last_line = line;
+ if (ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq)) {
+ event |= RUBY_EVENT_COVERAGE_LINE;
+ }
+ ADD_TRACE(ret, event);
+ }
}
debug_node_start(node);
@@ -7144,1002 +9445,469 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
#define BEFORE_RETURN debug_node_end()
switch (type) {
- case NODE_BLOCK:{
- while (node && nd_type(node) == NODE_BLOCK) {
- CHECK(COMPILE_(ret, "BLOCK body", node->nd_head,
- (node->nd_next ? 1 : popped)));
- node = node->nd_next;
- }
- if (node) {
- CHECK(COMPILE_(ret, "BLOCK next", node->nd_next, popped));
- }
- break;
- }
+ case NODE_BLOCK:
+ CHECK(compile_block(iseq, ret, node, popped));
+ break;
case NODE_IF:
case NODE_UNLESS:
- CHECK(compile_if(iseq, ret, node, popped, type));
- break;
+ CHECK(compile_if(iseq, ret, node, popped, type));
+ break;
case NODE_CASE:
- CHECK(compile_case(iseq, ret, node, popped));
- break;
+ CHECK(compile_case(iseq, ret, node, popped));
+ break;
case NODE_CASE2:
- CHECK(compile_case2(iseq, ret, node, popped));
- break;
+ CHECK(compile_case2(iseq, ret, node, popped));
+ break;
case NODE_CASE3:
CHECK(compile_case3(iseq, ret, node, popped));
break;
case NODE_WHILE:
case NODE_UNTIL:
- CHECK(compile_loop(iseq, ret, node, popped, type));
- break;
+ CHECK(compile_loop(iseq, ret, node, popped, type));
+ break;
case NODE_FOR:
case NODE_ITER:
- CHECK(compile_iter(iseq, ret, node, popped));
- break;
+ CHECK(compile_iter(iseq, ret, node, popped));
+ break;
case NODE_FOR_MASGN:
- CHECK(compile_for_masgn(iseq, ret, node, popped));
- break;
+ CHECK(compile_for_masgn(iseq, ret, node, popped));
+ break;
case NODE_BREAK:
- CHECK(compile_break(iseq, ret, node, popped));
- break;
+ CHECK(compile_break(iseq, ret, node, popped));
+ break;
case NODE_NEXT:
- CHECK(compile_next(iseq, ret, node, popped));
- break;
+ CHECK(compile_next(iseq, ret, node, popped));
+ break;
case NODE_REDO:
- CHECK(compile_redo(iseq, ret, node, popped));
- break;
+ CHECK(compile_redo(iseq, ret, node, popped));
+ break;
case NODE_RETRY:
- CHECK(compile_retry(iseq, ret, node, popped));
- break;
+ CHECK(compile_retry(iseq, ret, node, popped));
+ break;
case NODE_BEGIN:{
- CHECK(COMPILE_(ret, "NODE_BEGIN", node->nd_body, popped));
- break;
+ CHECK(COMPILE_(ret, "NODE_BEGIN", node->nd_body, popped));
+ break;
}
case NODE_RESCUE:
- CHECK(compile_rescue(iseq, ret, node, popped));
- break;
+ CHECK(compile_rescue(iseq, ret, node, popped));
+ break;
case NODE_RESBODY:
- CHECK(compile_resbody(iseq, ret, node, popped));
- break;
+ CHECK(compile_resbody(iseq, ret, node, popped));
+ break;
case NODE_ENSURE:
- CHECK(compile_ensure(iseq, ret, node, popped));
- break;
+ CHECK(compile_ensure(iseq, ret, node, popped));
+ break;
case NODE_AND:
case NODE_OR:{
- LABEL *end_label = NEW_LABEL(line);
- CHECK(COMPILE(ret, "nd_1st", node->nd_1st));
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
- if (type == NODE_AND) {
- ADD_INSNL(ret, line, branchunless, end_label);
- }
- else {
- ADD_INSNL(ret, line, branchif, end_label);
- }
- if (!popped) {
- ADD_INSN(ret, line, pop);
- }
- CHECK(COMPILE_(ret, "nd_2nd", node->nd_2nd, popped));
- ADD_LABEL(ret, end_label);
- break;
+ LABEL *end_label = NEW_LABEL(line);
+ CHECK(COMPILE(ret, "nd_1st", node->nd_1st));
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ if (type == NODE_AND) {
+ ADD_INSNL(ret, node, branchunless, end_label);
+ }
+ else {
+ ADD_INSNL(ret, node, branchif, end_label);
+ }
+ if (!popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ CHECK(COMPILE_(ret, "nd_2nd", node->nd_2nd, popped));
+ ADD_LABEL(ret, end_label);
+ break;
}
case NODE_MASGN:{
- compile_massign(iseq, ret, node, popped);
- break;
+ bool prev_in_masgn = ISEQ_COMPILE_DATA(iseq)->in_masgn;
+ ISEQ_COMPILE_DATA(iseq)->in_masgn = true;
+ compile_massign(iseq, ret, node, popped);
+ ISEQ_COMPILE_DATA(iseq)->in_masgn = prev_in_masgn;
+ break;
}
case NODE_LASGN:{
- ID id = node->nd_vid;
- int idx = body->local_iseq->body->local_table_size - get_local_var_idx(iseq, id);
+ ID id = node->nd_vid;
+ int idx = ISEQ_BODY(body->local_iseq)->local_table_size - get_local_var_idx(iseq, id);
- debugs("lvar: %s idx: %d\n", rb_id2name(id), idx);
- CHECK(COMPILE(ret, "rvalue", node->nd_value));
+ debugs("lvar: %s idx: %d\n", rb_id2name(id), idx);
+ CHECK(COMPILE(ret, "rvalue", node->nd_value));
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
- ADD_SETLOCAL(ret, line, idx, get_lvar_level(iseq));
- break;
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ ADD_SETLOCAL(ret, node, idx, get_lvar_level(iseq));
+ break;
}
- case NODE_DASGN:
- case NODE_DASGN_CURR:{
- int idx, lv, ls;
- ID id = node->nd_vid;
- CHECK(COMPILE(ret, "dvalue", node->nd_value));
- debugi("dassn id", rb_id2str(id) ? id : '*');
-
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
-
- idx = get_dyna_var_idx(iseq, id, &lv, &ls);
-
- if (idx < 0) {
- COMPILE_ERROR(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")",
- rb_id2str(id));
- goto ng;
- }
- ADD_SETLOCAL(ret, line, ls - idx, lv);
- break;
+ case NODE_DASGN: {
+ int idx, lv, ls;
+ ID id = node->nd_vid;
+ CHECK(COMPILE(ret, "dvalue", node->nd_value));
+ debugi("dassn id", rb_id2str(id) ? id : '*');
+
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+
+ idx = get_dyna_var_idx(iseq, id, &lv, &ls);
+
+ if (idx < 0) {
+ COMPILE_ERROR(ERROR_ARGS "NODE_DASGN: unknown id (%"PRIsVALUE")",
+ rb_id2str(id));
+ goto ng;
+ }
+ ADD_SETLOCAL(ret, node, ls - idx, lv);
+ break;
}
case NODE_GASGN:{
- CHECK(COMPILE(ret, "lvalue", node->nd_value));
-
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
- ADD_INSN1(ret, line, setglobal,
- ((VALUE)node->nd_entry | 1));
- break;
+ CHECK(COMPILE(ret, "lvalue", node->nd_value));
+
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ ADD_INSN1(ret, node, setglobal, ID2SYM(node->nd_entry));
+ break;
}
case NODE_IASGN:{
- CHECK(COMPILE(ret, "lvalue", node->nd_value));
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
- ADD_INSN2(ret, line, setinstancevariable,
- ID2SYM(node->nd_vid),
- get_ivar_ic_value(iseq,node->nd_vid));
- break;
+ CHECK(COMPILE(ret, "lvalue", node->nd_value));
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ ADD_INSN2(ret, node, setinstancevariable,
+ ID2SYM(node->nd_vid),
+ get_ivar_ic_value(iseq,node->nd_vid));
+ break;
}
case NODE_CDECL:{
- CHECK(COMPILE(ret, "lvalue", node->nd_value));
+ if (node->nd_vid) {
+ CHECK(COMPILE(ret, "lvalue", node->nd_value));
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
-
- if (node->nd_vid) {
- ADD_INSN1(ret, line, putspecialobject,
- INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
- ADD_INSN1(ret, line, setconstant, ID2SYM(node->nd_vid));
- }
- else {
- compile_cpath(ret, iseq, node->nd_else);
- ADD_INSN1(ret, line, setconstant, ID2SYM(node->nd_else->nd_mid));
- }
- break;
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+
+ ADD_INSN1(ret, node, putspecialobject,
+ INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
+ ADD_INSN1(ret, node, setconstant, ID2SYM(node->nd_vid));
+ }
+ else {
+ compile_cpath(ret, iseq, node->nd_else);
+ CHECK(COMPILE(ret, "lvalue", node->nd_value));
+ ADD_INSN(ret, node, swap);
+
+ if (!popped) {
+ ADD_INSN1(ret, node, topn, INT2FIX(1));
+ ADD_INSN(ret, node, swap);
+ }
+
+ ADD_INSN1(ret, node, setconstant, ID2SYM(node->nd_else->nd_mid));
+ }
+ break;
}
case NODE_CVASGN:{
- CHECK(COMPILE(ret, "cvasgn val", node->nd_value));
- if (!popped) {
- ADD_INSN(ret, line, dup);
- }
- ADD_INSN1(ret, line, setclassvariable,
- ID2SYM(node->nd_vid));
- break;
- }
- case NODE_OP_ASGN1: {
- VALUE argc;
- unsigned int flag = 0;
- int asgnflag = 0;
- ID id = node->nd_mid;
- int boff = 0;
-
- /*
- * a[x] (op)= y
- *
- * nil # nil
- * eval a # nil a
- * eval x # nil a x
- * dupn 2 # nil a x a x
- * send :[] # nil a x a[x]
- * eval y # nil a x a[x] y
- * send op # nil a x ret
- * setn 3 # ret a x ret
- * send []= # ret ?
- * pop # ret
- */
-
- /*
- * nd_recv[nd_args->nd_body] (nd_mid)= nd_args->nd_head;
- * NODE_OP_ASGN nd_recv
- * nd_args->nd_head
- * nd_args->nd_body
- * nd_mid
- */
-
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN1 recv", node);
- CHECK(asgnflag != -1);
- switch (nd_type(node->nd_args->nd_head)) {
- case NODE_ZLIST:
- argc = INT2FIX(0);
- break;
- case NODE_BLOCK_PASS:
- boff = 1;
- /* fall through */
- default:
- argc = setup_args(iseq, ret, node->nd_args->nd_head, &flag, NULL);
- CHECK(!NIL_P(argc));
- }
- ADD_INSN1(ret, line, dupn, FIXNUM_INC(argc, 1 + boff));
- flag |= asgnflag;
- ADD_SEND_WITH_FLAG(ret, line, idAREF, argc, INT2FIX(flag));
-
- if (id == idOROP || id == idANDOP) {
- /* a[x] ||= y or a[x] &&= y
-
- unless/if a[x]
- a[x]= y
- else
- nil
- end
- */
- LABEL *label = NEW_LABEL(line);
- LABEL *lfin = NEW_LABEL(line);
-
- ADD_INSN(ret, line, dup);
- if (id == idOROP) {
- ADD_INSNL(ret, line, branchif, label);
- }
- else { /* idANDOP */
- ADD_INSNL(ret, line, branchunless, label);
- }
- ADD_INSN(ret, line, pop);
-
- CHECK(COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body));
- if (!popped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
- }
- if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
- if (boff > 0) {
- ADD_INSN1(ret, line, dupn, INT2FIX(3));
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
- }
- ADD_INSN(ret, line, concatarray);
- if (boff > 0) {
- ADD_INSN1(ret, line, setn, INT2FIX(3));
- ADD_INSN(ret, line, pop);
- ADD_INSN(ret, line, pop);
- }
- ADD_SEND_WITH_FLAG(ret, line, idASET, argc, INT2FIX(flag));
- }
- else {
- if (boff > 0)
- ADD_INSN(ret, line, swap);
- ADD_SEND_WITH_FLAG(ret, line, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
- }
- ADD_INSN(ret, line, pop);
- ADD_INSNL(ret, line, jump, lfin);
- ADD_LABEL(ret, label);
- if (!popped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
- }
- ADD_INSN1(ret, line, adjuststack, FIXNUM_INC(argc, 2+boff));
- ADD_LABEL(ret, lfin);
- }
- else {
- CHECK(COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body));
- ADD_SEND(ret, line, id, INT2FIX(1));
- if (!popped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
- }
- if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
- if (boff > 0) {
- ADD_INSN1(ret, line, dupn, INT2FIX(3));
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
- }
- ADD_INSN(ret, line, concatarray);
- if (boff > 0) {
- ADD_INSN1(ret, line, setn, INT2FIX(3));
- ADD_INSN(ret, line, pop);
- ADD_INSN(ret, line, pop);
- }
- ADD_SEND_WITH_FLAG(ret, line, idASET, argc, INT2FIX(flag));
- }
- else {
- if (boff > 0)
- ADD_INSN(ret, line, swap);
- ADD_SEND_WITH_FLAG(ret, line, idASET, FIXNUM_INC(argc, 1), INT2FIX(flag));
- }
- ADD_INSN(ret, line, pop);
- }
-
- break;
- }
- case NODE_OP_ASGN2:{
- ID atype = node->nd_next->nd_mid;
- ID vid = node->nd_next->nd_vid, aid = rb_id_attrset(vid);
- int asgnflag;
- LABEL *lfin = NEW_LABEL(line);
- LABEL *lcfin = NEW_LABEL(line);
- LABEL *lskip = 0;
- /*
- class C; attr_accessor :c; end
- r = C.new
- r.a &&= v # asgn2
-
- eval r # r
- dup # r r
- eval r.a # r o
-
- # or
- dup # r o o
- if lcfin # r o
- pop # r
- eval v # r v
- swap # v r
- topn 1 # v r v
- send a= # v ?
- jump lfin # v ?
-
- lcfin: # r o
- swap # o r
-
- lfin: # o ?
- pop # o
-
- # and
- dup # r o o
- unless lcfin
- pop # r
- eval v # r v
- swap # v r
- topn 1 # v r v
- send a= # v ?
- jump lfin # v ?
-
- # others
- eval v # r o v
- send ?? # r w
- send a= # w
-
- */
-
- asgnflag = COMPILE_RECV(ret, "NODE_OP_ASGN2#recv", node);
- CHECK(asgnflag != -1);
- if (node->nd_next->nd_aid) {
- lskip = NEW_LABEL(line);
- ADD_INSN(ret, line, dup);
- ADD_INSNL(ret, line, branchnil, lskip);
- }
- ADD_INSN(ret, line, dup);
- ADD_SEND_WITH_FLAG(ret, line, vid, INT2FIX(0), INT2FIX(asgnflag));
-
- if (atype == idOROP || atype == idANDOP) {
- ADD_INSN(ret, line, dup);
- if (atype == idOROP) {
- ADD_INSNL(ret, line, branchif, lcfin);
- }
- else { /* idANDOP */
- ADD_INSNL(ret, line, branchunless, lcfin);
- }
- ADD_INSN(ret, line, pop);
- CHECK(COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value));
- ADD_INSN(ret, line, swap);
- ADD_INSN1(ret, line, topn, INT2FIX(1));
- ADD_SEND_WITH_FLAG(ret, line, aid, INT2FIX(1), INT2FIX(asgnflag));
- ADD_INSNL(ret, line, jump, lfin);
-
- ADD_LABEL(ret, lcfin);
- ADD_INSN(ret, line, swap);
-
- ADD_LABEL(ret, lfin);
- ADD_INSN(ret, line, pop);
- if (lskip) {
- ADD_LABEL(ret, lskip);
- }
- if (popped) {
- /* we can apply more optimize */
- ADD_INSN(ret, line, pop);
- }
- }
- else {
- CHECK(COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value));
- ADD_SEND(ret, line, atype, INT2FIX(1));
- if (!popped) {
- ADD_INSN(ret, line, swap);
- ADD_INSN1(ret, line, topn, INT2FIX(1));
- }
- ADD_SEND_WITH_FLAG(ret, line, aid, INT2FIX(1), INT2FIX(asgnflag));
- if (lskip && popped) {
- ADD_LABEL(ret, lskip);
- }
- ADD_INSN(ret, line, pop);
- if (lskip && !popped) {
- ADD_LABEL(ret, lskip);
- }
- }
- break;
- }
- case NODE_OP_CDECL: {
- LABEL *lfin = 0;
- LABEL *lassign = 0;
- ID mid;
-
- switch (nd_type(node->nd_head)) {
- case NODE_COLON3:
- ADD_INSN1(ret, line, putobject, rb_cObject);
- break;
- case NODE_COLON2:
- CHECK(COMPILE(ret, "NODE_OP_CDECL/colon2#nd_head", node->nd_head->nd_head));
- break;
- default:
- COMPILE_ERROR(ERROR_ARGS "%s: invalid node in NODE_OP_CDECL",
- ruby_node_name(nd_type(node->nd_head)));
- goto ng;
- }
- mid = node->nd_head->nd_mid;
- /* cref */
- if (node->nd_aid == idOROP) {
- lassign = NEW_LABEL(line);
- ADD_INSN(ret, line, dup); /* cref cref */
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_CONST_FROM),
- ID2SYM(mid), Qfalse); /* cref bool */
- ADD_INSNL(ret, line, branchunless, lassign); /* cref */
- }
- ADD_INSN(ret, line, dup); /* cref cref */
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSN1(ret, line, getconstant, ID2SYM(mid)); /* cref obj */
-
- if (node->nd_aid == idOROP || node->nd_aid == idANDOP) {
- lfin = NEW_LABEL(line);
- if (!popped) ADD_INSN(ret, line, dup); /* cref [obj] obj */
- if (node->nd_aid == idOROP)
- ADD_INSNL(ret, line, branchif, lfin);
- else /* idANDOP */
- ADD_INSNL(ret, line, branchunless, lfin);
- /* cref [obj] */
- if (!popped) ADD_INSN(ret, line, pop); /* cref */
- if (lassign) ADD_LABEL(ret, lassign);
- CHECK(COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value));
- /* cref value */
- if (popped)
- ADD_INSN1(ret, line, topn, INT2FIX(1)); /* cref value cref */
- else {
- ADD_INSN1(ret, line, dupn, INT2FIX(2)); /* cref value cref value */
- ADD_INSN(ret, line, swap); /* cref value value cref */
- }
- ADD_INSN1(ret, line, setconstant, ID2SYM(mid)); /* cref [value] */
- ADD_LABEL(ret, lfin); /* cref [value] */
- if (!popped) ADD_INSN(ret, line, swap); /* [value] cref */
- ADD_INSN(ret, line, pop); /* [value] */
- }
- else {
- CHECK(COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value));
- /* cref obj value */
- ADD_CALL(ret, line, node->nd_aid, INT2FIX(1));
- /* cref value */
- ADD_INSN(ret, line, swap); /* value cref */
- if (!popped) {
- ADD_INSN1(ret, line, topn, INT2FIX(1)); /* value cref value */
- ADD_INSN(ret, line, swap); /* value value cref */
- }
- ADD_INSN1(ret, line, setconstant, ID2SYM(mid));
- }
- break;
+ CHECK(COMPILE(ret, "cvasgn val", node->nd_value));
+ if (!popped) {
+ ADD_INSN(ret, node, dup);
+ }
+ ADD_INSN2(ret, node, setclassvariable,
+ ID2SYM(node->nd_vid),
+ get_cvar_ic_value(iseq,node->nd_vid));
+ break;
}
+ case NODE_OP_ASGN1:
+ CHECK(compile_op_asgn1(iseq, ret, node, popped));
+ break;
+ case NODE_OP_ASGN2:
+ CHECK(compile_op_asgn2(iseq, ret, node, popped));
+ break;
+ case NODE_OP_CDECL:
+ CHECK(compile_op_cdecl(iseq, ret, node, popped));
+ break;
case NODE_OP_ASGN_AND:
- case NODE_OP_ASGN_OR:{
- LABEL *lfin = NEW_LABEL(line);
- LABEL *lassign;
-
- if (nd_type(node) == NODE_OP_ASGN_OR) {
- LABEL *lfinish[2];
- lfinish[0] = lfin;
- lfinish[1] = 0;
- defined_expr(iseq, ret, node->nd_head, lfinish, Qfalse);
- lassign = lfinish[1];
- if (!lassign) {
- lassign = NEW_LABEL(line);
- }
- ADD_INSNL(ret, line, branchunless, lassign);
- }
- else {
- lassign = NEW_LABEL(line);
- }
-
- CHECK(COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_head", node->nd_head));
- ADD_INSN(ret, line, dup);
-
- if (nd_type(node) == NODE_OP_ASGN_AND) {
- ADD_INSNL(ret, line, branchunless, lfin);
- }
- else {
- ADD_INSNL(ret, line, branchif, lfin);
- }
-
- ADD_INSN(ret, line, pop);
- ADD_LABEL(ret, lassign);
- CHECK(COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_value", node->nd_value));
- ADD_LABEL(ret, lfin);
-
- if (popped) {
- /* we can apply more optimize */
- ADD_INSN(ret, line, pop);
- }
- break;
- }
+ case NODE_OP_ASGN_OR:
+ CHECK(compile_op_log(iseq, ret, node, popped, type));
+ break;
case NODE_CALL: /* obj.foo */
case NODE_OPCALL: /* foo[] */
- if (compile_call_precheck_freeze(iseq, ret, node, line, popped) == TRUE) {
+ if (compile_call_precheck_freeze(iseq, ret, node, node, popped) == TRUE) {
break;
}
case NODE_QCALL: /* obj&.foo */
case NODE_FCALL: /* foo() */
case NODE_VCALL: /* foo (variable or call) */
- if (compile_call(iseq, ret, node, type, line, popped) == COMPILE_NG) {
+ if (compile_call(iseq, ret, node, type, node, popped, false) == COMPILE_NG) {
goto ng;
}
break;
case NODE_SUPER:
- case NODE_ZSUPER:{
- DECL_ANCHOR(args);
- int argc;
- unsigned int flag = 0;
- struct rb_call_info_kw_arg *keywords = NULL;
- const rb_iseq_t *parent_block = ISEQ_COMPILE_DATA(iseq)->current_block;
-
- INIT_ANCHOR(args);
- ISEQ_COMPILE_DATA(iseq)->current_block = NULL;
- if (type == NODE_SUPER) {
- VALUE vargc = setup_args(iseq, args, node->nd_args, &flag, &keywords);
- CHECK(!NIL_P(vargc));
- argc = FIX2INT(vargc);
- }
- else {
- /* NODE_ZSUPER */
- int i;
- const rb_iseq_t *liseq = body->local_iseq;
- const struct rb_iseq_constant_body *const local_body = liseq->body;
- const struct rb_iseq_param_keyword *const local_kwd = local_body->param.keyword;
- int lvar_level = get_lvar_level(iseq);
-
- argc = local_body->param.lead_num;
-
- /* normal arguments */
- for (i = 0; i < local_body->param.lead_num; i++) {
- int idx = local_body->local_table_size - i;
- ADD_GETLOCAL(args, line, idx, lvar_level);
- }
-
- if (local_body->param.flags.has_opt) {
- /* optional arguments */
- int j;
- for (j = 0; j < local_body->param.opt_num; j++) {
- int idx = local_body->local_table_size - (i + j);
- ADD_GETLOCAL(args, line, idx, lvar_level);
- }
- i += j;
- argc = i;
- }
- if (local_body->param.flags.has_rest) {
- /* rest argument */
- int idx = local_body->local_table_size - local_body->param.rest_start;
-
- ADD_GETLOCAL(args, line, idx, lvar_level);
- ADD_INSN1(args, line, splatarray, Qfalse);
-
- argc = local_body->param.rest_start + 1;
- flag |= VM_CALL_ARGS_SPLAT;
- }
- if (local_body->param.flags.has_post) {
- /* post arguments */
- int post_len = local_body->param.post_num;
- int post_start = local_body->param.post_start;
-
- if (local_body->param.flags.has_rest) {
- int j;
- for (j=0; j<post_len; j++) {
- int idx = local_body->local_table_size - (post_start + j);
- ADD_GETLOCAL(args, line, idx, lvar_level);
- }
- ADD_INSN1(args, line, newarray, INT2FIX(j));
- ADD_INSN (args, line, concatarray);
- /* argc is settled at above */
- }
- else {
- int j;
- for (j=0; j<post_len; j++) {
- int idx = local_body->local_table_size - (post_start + j);
- ADD_GETLOCAL(args, line, idx, lvar_level);
- }
- argc = post_len + post_start;
- }
- }
-
- if (local_body->param.flags.has_kw) { /* TODO: support keywords */
- int local_size = local_body->local_table_size;
- argc++;
-
- ADD_INSN1(args, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
-
- if (local_body->param.flags.has_kwrest) {
- int idx = local_body->local_table_size - local_kwd->rest_start;
- ADD_GETLOCAL(args, line, idx, lvar_level);
- ADD_SEND (args, line, rb_intern("dup"), INT2FIX(0));
- }
- else {
- ADD_INSN1(args, line, newhash, INT2FIX(0));
- }
- for (i = 0; i < local_kwd->num; ++i) {
- ID id = local_kwd->table[i];
- int idx = local_size - get_local_var_idx(liseq, id);
- ADD_INSN1(args, line, putobject, ID2SYM(id));
- ADD_GETLOCAL(args, line, idx, lvar_level);
- }
- ADD_SEND(args, line, id_core_hash_merge_ptr, INT2FIX(i * 2 + 1));
- if (local_body->param.flags.has_rest) {
- ADD_INSN1(args, line, newarray, INT2FIX(1));
- ADD_INSN (args, line, concatarray);
- --argc;
- }
- flag |= VM_CALL_KW_SPLAT;
- }
- else if (local_body->param.flags.has_kwrest) {
- int idx = local_body->local_table_size - local_kwd->rest_start;
- ADD_GETLOCAL(args, line, idx, lvar_level);
-
- ADD_SEND (args, line, rb_intern("dup"), INT2FIX(0));
- if (local_body->param.flags.has_rest) {
- ADD_INSN1(args, line, newarray, INT2FIX(1));
- ADD_INSN (args, line, concatarray);
- }
- else {
- argc++;
- }
- flag |= VM_CALL_KW_SPLAT;
- }
- }
-
- ADD_INSN(ret, line, putself);
- ADD_SEQ(ret, args);
- ADD_INSN2(ret, line, invokesuper,
- new_callinfo(iseq, 0, argc, flag | VM_CALL_SUPER | (type == NODE_ZSUPER ? VM_CALL_ZSUPER : 0) | VM_CALL_FCALL, keywords, parent_block != NULL),
- parent_block);
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
+ case NODE_ZSUPER:
+ CHECK(compile_super(iseq, ret, node, popped, type));
+ break;
case NODE_LIST:{
CHECK(compile_array(iseq, ret, node, popped) >= 0);
- break;
+ break;
}
case NODE_ZLIST:{
- if (!popped) {
- ADD_INSN1(ret, line, newarray, INT2FIX(0));
- }
- break;
+ if (!popped) {
+ ADD_INSN1(ret, node, newarray, INT2FIX(0));
+ }
+ break;
}
case NODE_VALUES:{
- const NODE *n = node;
- if (popped) {
- COMPILE_ERROR(ERROR_ARGS "NODE_VALUES: must not be popped");
- }
- while (n) {
- CHECK(COMPILE(ret, "values item", n->nd_head));
- n = n->nd_next;
- }
- ADD_INSN1(ret, line, newarray, INT2FIX(node->nd_alen));
- break;
+ const NODE *n = node;
+ if (popped) {
+ COMPILE_ERROR(ERROR_ARGS "NODE_VALUES: must not be popped");
+ }
+ while (n) {
+ CHECK(COMPILE(ret, "values item", n->nd_head));
+ n = n->nd_next;
+ }
+ ADD_INSN1(ret, node, newarray, INT2FIX(node->nd_alen));
+ break;
}
case NODE_HASH:
- CHECK(compile_hash(iseq, ret, node, popped) >= 0);
+ CHECK(compile_hash(iseq, ret, node, FALSE, popped) >= 0);
break;
case NODE_RETURN:
- CHECK(compile_return(iseq, ret, node, popped));
- break;
- case NODE_YIELD:{
- DECL_ANCHOR(args);
- VALUE argc;
- unsigned int flag = 0;
- struct rb_call_info_kw_arg *keywords = NULL;
-
- INIT_ANCHOR(args);
-
- if (check_yield_place(iseq, line) == FALSE) {
- COMPILE_ERROR(ERROR_ARGS "Invalid yield");
- goto ng;
- }
-
- if (node->nd_head) {
- argc = setup_args(iseq, args, node->nd_head, &flag, &keywords);
- CHECK(!NIL_P(argc));
- }
- else {
- argc = INT2FIX(0);
- }
-
- ADD_SEQ(ret, args);
- ADD_INSN1(ret, line, invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), flag, keywords, FALSE));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
+ CHECK(compile_return(iseq, ret, node, popped));
+ break;
+ case NODE_YIELD:
+ CHECK(compile_yield(iseq, ret, node, popped));
+ break;
case NODE_LVAR:{
- if (!popped) {
- ID id = node->nd_vid;
- int idx = body->local_iseq->body->local_table_size - get_local_var_idx(iseq, id);
-
- debugs("id: %s idx: %d\n", rb_id2name(id), idx);
- ADD_GETLOCAL(ret, line, idx, get_lvar_level(iseq));
- }
- break;
+ if (!popped) {
+ compile_lvar(iseq, ret, node, node->nd_vid);
+ }
+ break;
}
case NODE_DVAR:{
- int lv, idx, ls;
- debugi("nd_vid", node->nd_vid);
- if (!popped) {
- idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
- if (idx < 0) {
- COMPILE_ERROR(ERROR_ARGS "unknown dvar (%"PRIsVALUE")",
- rb_id2str(node->nd_vid));
- goto ng;
- }
- ADD_GETLOCAL(ret, line, ls - idx, lv);
- }
- break;
+ int lv, idx, ls;
+ debugi("nd_vid", node->nd_vid);
+ if (!popped) {
+ idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
+ if (idx < 0) {
+ COMPILE_ERROR(ERROR_ARGS "unknown dvar (%"PRIsVALUE")",
+ rb_id2str(node->nd_vid));
+ goto ng;
+ }
+ ADD_GETLOCAL(ret, node, ls - idx, lv);
+ }
+ break;
}
case NODE_GVAR:{
- ADD_INSN1(ret, line, getglobal,
- ((VALUE)node->nd_entry | 1));
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ ADD_INSN1(ret, node, getglobal, ID2SYM(node->nd_entry));
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_IVAR:{
- debugi("nd_vid", node->nd_vid);
- if (!popped) {
- ADD_INSN2(ret, line, getinstancevariable,
- ID2SYM(node->nd_vid),
- get_ivar_ic_value(iseq,node->nd_vid));
- }
- break;
+ debugi("nd_vid", node->nd_vid);
+ if (!popped) {
+ ADD_INSN2(ret, node, getinstancevariable,
+ ID2SYM(node->nd_vid),
+ get_ivar_ic_value(iseq,node->nd_vid));
+ }
+ break;
}
case NODE_CONST:{
- debugi("nd_vid", node->nd_vid);
-
- if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
- LABEL *lend = NEW_LABEL(line);
- int ic_index = body->is_size++;
-
- ADD_INSN2(ret, line, opt_getinlinecache, lend, INT2FIX(ic_index));
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_vid));
- ADD_INSN1(ret, line, opt_setinlinecache, INT2FIX(ic_index));
- ADD_LABEL(ret, lend);
- }
- else {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_vid));
- }
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ debugi("nd_vid", node->nd_vid);
+
+ if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
+ body->ic_size++;
+ VALUE segments = rb_ary_new_from_args(1, ID2SYM(node->nd_vid));
+ ADD_INSN1(ret, node, opt_getconstant_path, segments);
+ RB_OBJ_WRITTEN(iseq, Qundef, segments);
+ }
+ else {
+ ADD_INSN(ret, node, putnil);
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ ADD_INSN1(ret, node, getconstant, ID2SYM(node->nd_vid));
+ }
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_CVAR:{
- if (!popped) {
- ADD_INSN1(ret, line, getclassvariable,
- ID2SYM(node->nd_vid));
- }
- break;
+ if (!popped) {
+ ADD_INSN2(ret, node, getclassvariable,
+ ID2SYM(node->nd_vid),
+ get_cvar_ic_value(iseq,node->nd_vid));
+ }
+ break;
}
case NODE_NTH_REF:{
if (!popped) {
- if (!node->nd_nth) {
- ADD_INSN(ret, line, putnil);
- break;
- }
- ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */,
- INT2FIX(node->nd_nth << 1));
- }
- break;
+ if (!node->nd_nth) {
+ ADD_INSN(ret, node, putnil);
+ break;
+ }
+ ADD_INSN2(ret, node, getspecial, INT2FIX(1) /* '~' */,
+ INT2FIX(node->nd_nth << 1));
+ }
+ break;
}
case NODE_BACK_REF:{
- if (!popped) {
- ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */,
- INT2FIX(0x01 | (node->nd_nth << 1)));
- }
- break;
+ if (!popped) {
+ ADD_INSN2(ret, node, getspecial, INT2FIX(1) /* '~' */,
+ INT2FIX(0x01 | (node->nd_nth << 1)));
+ }
+ break;
}
case NODE_MATCH:
case NODE_MATCH2:
- case NODE_MATCH3:{
- DECL_ANCHOR(recv);
- DECL_ANCHOR(val);
-
- INIT_ANCHOR(recv);
- INIT_ANCHOR(val);
- switch (nd_type(node)) {
- case NODE_MATCH:
- ADD_INSN1(recv, line, putobject, node->nd_lit);
- ADD_INSN2(val, line, getspecial, INT2FIX(0),
- INT2FIX(0));
- break;
- case NODE_MATCH2:
- CHECK(COMPILE(recv, "receiver", node->nd_recv));
- CHECK(COMPILE(val, "value", node->nd_value));
- break;
- case NODE_MATCH3:
- CHECK(COMPILE(recv, "receiver", node->nd_value));
- CHECK(COMPILE(val, "value", node->nd_recv));
- break;
- }
-
- ADD_SEQ(ret, recv);
- ADD_SEQ(ret, val);
- ADD_SEND(ret, line, idEqTilde, INT2FIX(1));
-
- if (node->nd_args) {
- compile_named_capture_assign(iseq, ret, node->nd_args);
- }
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
+ case NODE_MATCH3:
+ CHECK(compile_match(iseq, ret, node, popped, type));
+ break;
case NODE_LIT:{
- debugp_param("lit", node->nd_lit);
- if (!popped) {
- ADD_INSN1(ret, line, putobject, node->nd_lit);
- }
- break;
+ debugp_param("lit", node->nd_lit);
+ if (!popped) {
+ if (UNLIKELY(node->nd_lit == rb_mRubyVMFrozenCore)) {
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); // [Bug #20569]
+ }
+ else {
+ ADD_INSN1(ret, node, putobject, node->nd_lit);
+ }
+ RB_OBJ_WRITTEN(iseq, Qundef, node->nd_lit);
+ }
+ break;
}
case NODE_STR:{
- debugp_param("nd_lit", node->nd_lit);
- if (!popped) {
- VALUE lit = node->nd_lit;
- if (!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) {
- lit = rb_fstring(lit);
- ADD_INSN1(ret, line, putstring, lit);
+ debugp_param("nd_lit", node->nd_lit);
+ if (!popped) {
+ VALUE lit = node->nd_lit;
+ if (!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) {
+ lit = rb_fstring(lit);
+ ADD_INSN1(ret, node, putstring, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
- }
- else {
- if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
- VALUE debug_info = rb_ary_new_from_args(2, rb_iseq_path(iseq), INT2FIX(line));
- lit = rb_str_dup(lit);
- rb_ivar_set(lit, id_debug_created_info, rb_obj_freeze(debug_info));
- lit = rb_str_freeze(lit);
- }
- else {
- lit = rb_fstring(lit);
- }
- ADD_INSN1(ret, line, putobject, lit);
+ }
+ else {
+ if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
+ VALUE debug_info = rb_ary_new_from_args(2, rb_iseq_path(iseq), INT2FIX(line));
+ lit = rb_str_dup(lit);
+ rb_ivar_set(lit, id_debug_created_info, rb_obj_freeze(debug_info));
+ lit = rb_str_freeze(lit);
+ }
+ else {
+ lit = rb_fstring(lit);
+ }
+ ADD_INSN1(ret, node, putobject, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
- }
- }
- break;
+ }
+ }
+ break;
}
case NODE_DSTR:{
- compile_dstr(iseq, ret, node);
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- else {
- if (ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) {
- VALUE debug_info = Qnil;
- if (ISEQ_COMPILE_DATA(iseq)->option->debug_frozen_string_literal || RTEST(ruby_debug)) {
- debug_info = rb_ary_new_from_args(2, rb_iseq_path(iseq), INT2FIX(line));
- }
- ADD_INSN1(ret, line, freezestring, debug_info);
- if (!NIL_P(debug_info)) {
- RB_OBJ_WRITTEN(iseq, Qundef, rb_obj_freeze(debug_info));
- }
- }
- }
- break;
+ compile_dstr(iseq, ret, node);
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_XSTR:{
- ADD_CALL_RECEIVER(ret, line);
+ ADD_CALL_RECEIVER(ret, node);
VALUE str = rb_fstring(node->nd_lit);
- ADD_INSN1(ret, line, putobject, str);
+ ADD_INSN1(ret, node, putobject, str);
RB_OBJ_WRITTEN(iseq, Qundef, str);
- ADD_CALL(ret, line, idBackquote, INT2FIX(1));
+ ADD_CALL(ret, node, idBackquote, INT2FIX(1));
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_DXSTR:{
- ADD_CALL_RECEIVER(ret, line);
- compile_dstr(iseq, ret, node);
- ADD_CALL(ret, line, idBackquote, INT2FIX(1));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ ADD_CALL_RECEIVER(ret, node);
+ compile_dstr(iseq, ret, node);
+ ADD_CALL(ret, node, idBackquote, INT2FIX(1));
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_EVSTR:
- CHECK(compile_evstr(iseq, ret, node->nd_body, popped));
- break;
+ CHECK(compile_evstr(iseq, ret, node->nd_body, popped));
+ break;
case NODE_DREGX:{
- compile_dregx(iseq, ret, node);
+ compile_dregx(iseq, ret, node);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_ONCE:{
- int ic_index = body->is_size++;
- const rb_iseq_t *block_iseq;
- block_iseq = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_PLAIN, line);
+ int ic_index = body->ise_size++;
+ const rb_iseq_t *block_iseq;
+ block_iseq = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_PLAIN, line);
- ADD_INSN2(ret, line, once, block_iseq, INT2FIX(ic_index));
+ ADD_INSN2(ret, node, once, block_iseq, INT2FIX(ic_index));
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)block_iseq);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_ARGSCAT:{
- if (popped) {
- CHECK(COMPILE(ret, "argscat head", node->nd_head));
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
- CHECK(COMPILE(ret, "argscat body", node->nd_body));
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
- }
- else {
- CHECK(COMPILE(ret, "argscat head", node->nd_head));
- CHECK(COMPILE(ret, "argscat body", node->nd_body));
- ADD_INSN(ret, line, concatarray);
- }
- break;
+ if (popped) {
+ CHECK(COMPILE(ret, "argscat head", node->nd_head));
+ ADD_INSN1(ret, node, splatarray, Qfalse);
+ ADD_INSN(ret, node, pop);
+ CHECK(COMPILE(ret, "argscat body", node->nd_body));
+ ADD_INSN1(ret, node, splatarray, Qfalse);
+ ADD_INSN(ret, node, pop);
+ }
+ else {
+ CHECK(COMPILE(ret, "argscat head", node->nd_head));
+ CHECK(COMPILE(ret, "argscat body", node->nd_body));
+ ADD_INSN(ret, node, concatarray);
+ }
+ break;
}
case NODE_ARGSPUSH:{
- if (popped) {
- CHECK(COMPILE(ret, "arsgpush head", node->nd_head));
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
- CHECK(COMPILE_(ret, "argspush body", node->nd_body, popped));
- }
- else {
- CHECK(COMPILE(ret, "arsgpush head", node->nd_head));
- CHECK(COMPILE_(ret, "argspush body", node->nd_body, popped));
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
- ADD_INSN(ret, line, concatarray);
- }
- break;
+ if (popped) {
+ CHECK(COMPILE(ret, "argspush head", node->nd_head));
+ ADD_INSN1(ret, node, splatarray, Qfalse);
+ ADD_INSN(ret, node, pop);
+ CHECK(COMPILE_(ret, "argspush body", node->nd_body, popped));
+ }
+ else {
+ CHECK(COMPILE(ret, "argspush head", node->nd_head));
+ CHECK(compile_array_1(iseq, ret, node->nd_body));
+ ADD_INSN(ret, node, concatarray);
+ }
+ break;
}
case NODE_SPLAT:{
- CHECK(COMPILE(ret, "splat", node->nd_head));
- ADD_INSN1(ret, line, splatarray, Qtrue);
+ CHECK(COMPILE(ret, "splat", node->nd_head));
+ ADD_INSN1(ret, node, splatarray, Qtrue);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_DEFN:{
ID mid = node->nd_mid;
- const rb_iseq_t *method_iseq = NEW_ISEQ(node->nd_defn,
+ const rb_iseq_t *method_iseq = NEW_ISEQ(node->nd_defn,
rb_id2str(mid),
- ISEQ_TYPE_METHOD, line);
+ ISEQ_TYPE_METHOD, line);
- debugp_param("defn/iseq", rb_iseqw_new(method_iseq));
- ADD_INSN2(ret, line, definemethod, ID2SYM(mid), method_iseq);
+ debugp_param("defn/iseq", rb_iseqw_new(method_iseq));
+ ADD_INSN2(ret, node, definemethod, ID2SYM(mid), method_iseq);
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)method_iseq);
if (!popped) {
- ADD_INSN1(ret, line, putobject, ID2SYM(mid));
- }
+ ADD_INSN1(ret, node, putobject, ID2SYM(mid));
+ }
- break;
+ break;
}
case NODE_DEFS:{
ID mid = node->nd_mid;
@@ -8149,425 +9917,212 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
debugp_param("defs/iseq", rb_iseqw_new(singleton_method_iseq));
CHECK(COMPILE(ret, "defs: recv", node->nd_recv));
- ADD_INSN2(ret, line, definesmethod, ID2SYM(mid), singleton_method_iseq);
+ ADD_INSN2(ret, node, definesmethod, ID2SYM(mid), singleton_method_iseq);
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)singleton_method_iseq);
if (!popped) {
- ADD_INSN1(ret, line, putobject, ID2SYM(mid));
+ ADD_INSN1(ret, node, putobject, ID2SYM(mid));
}
- break;
+ break;
}
case NODE_ALIAS:{
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
- CHECK(COMPILE(ret, "alias arg1", node->nd_1st));
- CHECK(COMPILE(ret, "alias arg2", node->nd_2nd));
- ADD_SEND(ret, line, id_core_set_method_alias, INT2FIX(3));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ CHECK(COMPILE(ret, "alias arg1", node->nd_1st));
+ CHECK(COMPILE(ret, "alias arg2", node->nd_2nd));
+ ADD_SEND(ret, node, id_core_set_method_alias, INT2FIX(3));
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_VALIAS:{
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putobject, ID2SYM(node->nd_alias));
- ADD_INSN1(ret, line, putobject, ID2SYM(node->nd_orig));
- ADD_SEND(ret, line, id_core_set_variable_alias, INT2FIX(2));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, node, putobject, ID2SYM(node->nd_alias));
+ ADD_INSN1(ret, node, putobject, ID2SYM(node->nd_orig));
+ ADD_SEND(ret, node, id_core_set_variable_alias, INT2FIX(2));
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_UNDEF:{
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
- CHECK(COMPILE(ret, "undef arg", node->nd_undef));
- ADD_SEND(ret, line, id_core_undef_method, INT2FIX(2));
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ CHECK(COMPILE(ret, "undef arg", node->nd_undef));
+ ADD_SEND(ret, node, id_core_undef_method, INT2FIX(2));
+
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_CLASS:{
- const rb_iseq_t *class_iseq = NEW_CHILD_ISEQ(node->nd_body,
- rb_sprintf("<class:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
- const int flags = VM_DEFINECLASS_TYPE_CLASS |
- (node->nd_super ? VM_DEFINECLASS_FLAG_HAS_SUPERCLASS : 0) |
- compile_cpath(ret, iseq, node->nd_cpath);
-
- CHECK(COMPILE(ret, "super", node->nd_super));
- ADD_INSN3(ret, line, defineclass, ID2SYM(node->nd_cpath->nd_mid), class_iseq, INT2FIX(flags));
+ const rb_iseq_t *class_iseq = NEW_CHILD_ISEQ(node->nd_body,
+ rb_str_freeze(rb_sprintf("<class:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid))),
+ ISEQ_TYPE_CLASS, line);
+ const int flags = VM_DEFINECLASS_TYPE_CLASS |
+ (node->nd_super ? VM_DEFINECLASS_FLAG_HAS_SUPERCLASS : 0) |
+ compile_cpath(ret, iseq, node->nd_cpath);
+
+ CHECK(COMPILE(ret, "super", node->nd_super));
+ ADD_INSN3(ret, node, defineclass, ID2SYM(node->nd_cpath->nd_mid), class_iseq, INT2FIX(flags));
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)class_iseq);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_MODULE:{
const rb_iseq_t *module_iseq = NEW_CHILD_ISEQ(node->nd_body,
- rb_sprintf("<module:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
- const int flags = VM_DEFINECLASS_TYPE_MODULE |
- compile_cpath(ret, iseq, node->nd_cpath);
+ rb_str_freeze(rb_sprintf("<module:%"PRIsVALUE">", rb_id2str(node->nd_cpath->nd_mid))),
+ ISEQ_TYPE_CLASS, line);
+ const int flags = VM_DEFINECLASS_TYPE_MODULE |
+ compile_cpath(ret, iseq, node->nd_cpath);
- ADD_INSN (ret, line, putnil); /* dummy */
- ADD_INSN3(ret, line, defineclass, ID2SYM(node->nd_cpath->nd_mid), module_iseq, INT2FIX(flags));
+ ADD_INSN (ret, node, putnil); /* dummy */
+ ADD_INSN3(ret, node, defineclass, ID2SYM(node->nd_cpath->nd_mid), module_iseq, INT2FIX(flags));
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)module_iseq);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_SCLASS:{
- ID singletonclass;
- const rb_iseq_t *singleton_class = NEW_ISEQ(node->nd_body, rb_fstring_lit("singleton class"),
- ISEQ_TYPE_CLASS, line);
-
- CHECK(COMPILE(ret, "sclass#recv", node->nd_recv));
- ADD_INSN (ret, line, putnil);
- CONST_ID(singletonclass, "singletonclass");
- ADD_INSN3(ret, line, defineclass,
- ID2SYM(singletonclass), singleton_class,
- INT2FIX(VM_DEFINECLASS_TYPE_SINGLETON_CLASS));
+ ID singletonclass;
+ const rb_iseq_t *singleton_class = NEW_ISEQ(node->nd_body, rb_fstring_lit("singleton class"),
+ ISEQ_TYPE_CLASS, line);
+
+ CHECK(COMPILE(ret, "sclass#recv", node->nd_recv));
+ ADD_INSN (ret, node, putnil);
+ CONST_ID(singletonclass, "singletonclass");
+ ADD_INSN3(ret, node, defineclass,
+ ID2SYM(singletonclass), singleton_class,
+ INT2FIX(VM_DEFINECLASS_TYPE_SINGLETON_CLASS));
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)singleton_class);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
- case NODE_COLON2:{
- if (rb_is_const_id(node->nd_mid)) {
- /* constant */
- LABEL *lend = NEW_LABEL(line);
- int ic_index = body->is_size++;
-
- DECL_ANCHOR(pref);
- DECL_ANCHOR(body);
-
- INIT_ANCHOR(pref);
- INIT_ANCHOR(body);
- CHECK(compile_const_prefix(iseq, node, pref, body));
- if (LIST_INSN_SIZE_ZERO(pref)) {
- if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
- ADD_INSN2(ret, line, opt_getinlinecache, lend, INT2FIX(ic_index));
- }
- else {
- ADD_INSN(ret, line, putnil);
- }
-
- ADD_SEQ(ret, body);
-
- if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
- ADD_INSN1(ret, line, opt_setinlinecache, INT2FIX(ic_index));
- ADD_LABEL(ret, lend);
- }
- }
- else {
- ADD_SEQ(ret, pref);
- ADD_SEQ(ret, body);
- }
- }
- else {
- /* function call */
- ADD_CALL_RECEIVER(ret, line);
- CHECK(COMPILE(ret, "colon2#nd_head", node->nd_head));
- ADD_CALL(ret, line, node->nd_mid, INT2FIX(1));
- }
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
- case NODE_COLON3:{
- LABEL *lend = NEW_LABEL(line);
- int ic_index = body->is_size++;
-
- debugi("colon3#nd_mid", node->nd_mid);
-
- /* add cache insn */
- if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
- ADD_INSN2(ret, line, opt_getinlinecache, lend, INT2FIX(ic_index));
- ADD_INSN(ret, line, pop);
- }
-
- ADD_INSN1(ret, line, putobject, rb_cObject);
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_mid));
-
- if (ISEQ_COMPILE_DATA(iseq)->option->inline_const_cache) {
- ADD_INSN1(ret, line, opt_setinlinecache, INT2FIX(ic_index));
- ADD_LABEL(ret, lend);
- }
-
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
+ case NODE_COLON2:
+ CHECK(compile_colon2(iseq, ret, node, popped));
+ break;
+ case NODE_COLON3:
+ CHECK(compile_colon3(iseq, ret, node, popped));
+ break;
case NODE_DOT2:
- case NODE_DOT3:{
- int excl = type == NODE_DOT3;
- VALUE flag = INT2FIX(excl);
- const NODE *b = node->nd_beg;
- const NODE *e = node->nd_end;
- if (number_literal_p(b) && number_literal_p(e)) {
- if (!popped) {
- VALUE val = rb_range_new(b->nd_lit, e->nd_lit, excl);
- ADD_INSN1(ret, line, putobject, val);
- RB_OBJ_WRITTEN(iseq, Qundef, val);
- }
- }
- else {
- CHECK(COMPILE_(ret, "min", b, popped));
- CHECK(COMPILE_(ret, "max", e, popped));
- if (!popped) {
- ADD_INSN1(ret, line, newrange, flag);
- }
- }
- break;
- }
+ CHECK(compile_dots(iseq, ret, node, popped, FALSE));
+ break;
+ case NODE_DOT3:
+ CHECK(compile_dots(iseq, ret, node, popped, TRUE));
+ break;
case NODE_FLIP2:
case NODE_FLIP3:{
- LABEL *lend = NEW_LABEL(line);
- LABEL *ltrue = NEW_LABEL(line);
- LABEL *lfalse = NEW_LABEL(line);
- CHECK(compile_flip_flop(iseq, ret, node, type == NODE_FLIP2,
- ltrue, lfalse));
- ADD_LABEL(ret, ltrue);
- ADD_INSN1(ret, line, putobject, Qtrue);
- ADD_INSNL(ret, line, jump, lend);
- ADD_LABEL(ret, lfalse);
- ADD_INSN1(ret, line, putobject, Qfalse);
- ADD_LABEL(ret, lend);
- break;
+ LABEL *lend = NEW_LABEL(line);
+ LABEL *ltrue = NEW_LABEL(line);
+ LABEL *lfalse = NEW_LABEL(line);
+ CHECK(compile_flip_flop(iseq, ret, node, type == NODE_FLIP2,
+ ltrue, lfalse));
+ ADD_LABEL(ret, ltrue);
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ ADD_INSNL(ret, node, jump, lend);
+ ADD_LABEL(ret, lfalse);
+ ADD_INSN1(ret, node, putobject, Qfalse);
+ ADD_LABEL(ret, lend);
+ break;
}
case NODE_SELF:{
- if (!popped) {
- ADD_INSN(ret, line, putself);
- }
- break;
+ if (!popped) {
+ ADD_INSN(ret, node, putself);
+ }
+ break;
}
case NODE_NIL:{
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- }
- break;
+ if (!popped) {
+ ADD_INSN(ret, node, putnil);
+ }
+ break;
}
case NODE_TRUE:{
- if (!popped) {
- ADD_INSN1(ret, line, putobject, Qtrue);
- }
- break;
+ if (!popped) {
+ ADD_INSN1(ret, node, putobject, Qtrue);
+ }
+ break;
}
case NODE_FALSE:{
- if (!popped) {
- ADD_INSN1(ret, line, putobject, Qfalse);
- }
- break;
- }
- case NODE_ERRINFO:{
- if (!popped) {
- if (body->type == ISEQ_TYPE_RESCUE) {
- ADD_GETLOCAL(ret, line, LVAR_ERRINFO, 0);
- }
- else {
- const rb_iseq_t *ip = iseq;
- int level = 0;
- while (ip) {
- if (ip->body->type == ISEQ_TYPE_RESCUE) {
- break;
- }
- ip = ip->body->parent_iseq;
- level++;
- }
- if (ip) {
- ADD_GETLOCAL(ret, line, LVAR_ERRINFO, level);
- }
- else {
- ADD_INSN(ret, line, putnil);
- }
- }
- }
- break;
+ if (!popped) {
+ ADD_INSN1(ret, node, putobject, Qfalse);
+ }
+ break;
}
+ case NODE_ERRINFO:
+ CHECK(compile_errinfo(iseq, ret, node, popped));
+ break;
case NODE_DEFINED:
- if (!popped) {
- CHECK(compile_defined_expr(iseq, ret, node, Qtrue));
- }
- break;
+ if (!popped) {
+ CHECK(compile_defined_expr(iseq, ret, node, Qtrue));
+ }
+ break;
case NODE_POSTEXE:{
- /* compiled to:
- * ONCE{ rb_mRubyVMFrozenCore::core#set_postexe{ ... } }
- */
- int is_index = body->is_size++;
+ /* compiled to:
+ * ONCE{ rb_mRubyVMFrozenCore::core#set_postexe{ ... } }
+ */
+ int is_index = body->ise_size++;
struct rb_iseq_new_with_callback_callback_func *ifunc =
rb_iseq_new_with_callback_new_callback(build_postexe_iseq, node->nd_body);
- const rb_iseq_t *once_iseq =
+ const rb_iseq_t *once_iseq =
new_child_iseq_with_callback(iseq, ifunc,
- rb_fstring(make_name_for_block(iseq)), iseq, ISEQ_TYPE_BLOCK, line);
+ rb_fstring(make_name_for_block(iseq)), iseq, ISEQ_TYPE_BLOCK, line);
- ADD_INSN2(ret, line, once, once_iseq, INT2FIX(is_index));
+ ADD_INSN2(ret, node, once, once_iseq, INT2FIX(is_index));
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)once_iseq);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
case NODE_KW_ARG:
- {
- LABEL *end_label = NEW_LABEL(nd_line(node));
- const NODE *default_value = node->nd_body->nd_value;
-
- if (default_value == NODE_SPECIAL_REQUIRED_KEYWORD) {
- /* required argument. do nothing */
- COMPILE_ERROR(ERROR_ARGS "unreachable");
- goto ng;
- }
- else if (nd_type(default_value) == NODE_LIT ||
- nd_type(default_value) == NODE_NIL ||
- nd_type(default_value) == NODE_TRUE ||
- nd_type(default_value) == NODE_FALSE) {
- COMPILE_ERROR(ERROR_ARGS "unreachable");
- goto ng;
- }
- else {
- /* if keywordcheck(_kw_bits, nth_keyword)
- * kw = default_value
- * end
- */
- int kw_bits_idx = body->local_table_size - body->param.keyword->bits_start;
- int keyword_idx = body->param.keyword->num;
-
- ADD_INSN2(ret, line, checkkeyword, INT2FIX(kw_bits_idx + VM_ENV_DATA_SIZE - 1), INT2FIX(keyword_idx));
- ADD_INSNL(ret, line, branchif, end_label);
- CHECK(COMPILE_POPPED(ret, "keyword default argument", node->nd_body));
- ADD_LABEL(ret, end_label);
- }
-
- break;
- }
+ CHECK(compile_kw_arg(iseq, ret, node, popped));
+ break;
case NODE_DSYM:{
- compile_dstr(iseq, ret, node);
- if (!popped) {
- ADD_INSN(ret, line, intern);
- }
- else {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
- case NODE_ATTRASGN:{
- DECL_ANCHOR(recv);
- DECL_ANCHOR(args);
- unsigned int flag = 0;
- ID mid = node->nd_mid;
- VALUE argc;
- LABEL *else_label = NULL;
- VALUE branches = Qfalse;
-
- /* optimization shortcut
- * obj["literal"] = value -> opt_aset_with(obj, "literal", value)
- */
- if (mid == idASET && !private_recv_p(node) && node->nd_args &&
- nd_type(node->nd_args) == NODE_LIST && node->nd_args->nd_alen == 2 &&
- nd_type(node->nd_args->nd_head) == NODE_STR &&
- ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
- !ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
- ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
- {
- VALUE str = rb_fstring(node->nd_args->nd_head->nd_lit);
- CHECK(COMPILE(ret, "recv", node->nd_recv));
- CHECK(COMPILE(ret, "value", node->nd_args->nd_next->nd_head));
- if (!popped) {
- ADD_INSN(ret, line, swap);
- ADD_INSN1(ret, line, topn, INT2FIX(1));
- }
- ADD_INSN2(ret, line, opt_aset_with, str,
- new_callinfo(iseq, idASET, 2, 0, NULL, FALSE));
- RB_OBJ_WRITTEN(iseq, Qundef, str);
- ADD_INSN(ret, line, pop);
- break;
- }
-
- INIT_ANCHOR(recv);
- INIT_ANCHOR(args);
- argc = setup_args(iseq, args, node->nd_args, &flag, NULL);
- CHECK(!NIL_P(argc));
-
- int asgnflag = COMPILE_RECV(recv, "recv", node);
- CHECK(asgnflag != -1);
- flag |= (unsigned int)asgnflag;
-
- debugp_param("argc", argc);
- debugp_param("nd_mid", ID2SYM(mid));
-
- if (!rb_is_attrset_id(mid)) {
- /* safe nav attr */
- mid = rb_id_attrset(mid);
- else_label = qcall_branch_start(iseq, recv, &branches, node, line);
- }
- if (!popped) {
- ADD_INSN(ret, line, putnil);
- ADD_SEQ(ret, recv);
- ADD_SEQ(ret, args);
-
- if (flag & VM_CALL_ARGS_BLOCKARG) {
- ADD_INSN1(ret, line, topn, INT2FIX(1));
- if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, line, putobject, INT2FIX(-1));
- ADD_SEND_WITH_FLAG(ret, line, idAREF, INT2FIX(1), INT2FIX(asgnflag));
- }
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 3));
- ADD_INSN (ret, line, pop);
- }
- else if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, putobject, INT2FIX(-1));
- ADD_SEND_WITH_FLAG(ret, line, idAREF, INT2FIX(1), INT2FIX(asgnflag));
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2));
- ADD_INSN (ret, line, pop);
- }
- else {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 1));
- }
- }
- else {
- ADD_SEQ(ret, recv);
- ADD_SEQ(ret, args);
- }
- ADD_SEND_WITH_FLAG(ret, line, mid, argc, INT2FIX(flag));
- qcall_branch_end(iseq, ret, else_label, branches, node, line);
- ADD_INSN(ret, line, pop);
-
- break;
+ compile_dstr(iseq, ret, node);
+ if (!popped) {
+ ADD_INSN(ret, node, intern);
+ }
+ else {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
+ case NODE_ATTRASGN:
+ CHECK(compile_attrasgn(iseq, ret, node, popped));
+ break;
case NODE_LAMBDA:{
- /* compile same as lambda{...} */
- const rb_iseq_t *block = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
- VALUE argc = INT2FIX(0);
+ /* compile same as lambda{...} */
+ const rb_iseq_t *block = NEW_CHILD_ISEQ(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
+ VALUE argc = INT2FIX(0);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_CALL_WITH_BLOCK(ret, line, idLambda, argc, block);
+ ADD_INSN1(ret, node, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_CALL_WITH_BLOCK(ret, node, idLambda, argc, block);
RB_OBJ_WRITTEN(iseq, Qundef, (VALUE)block);
- if (popped) {
- ADD_INSN(ret, line, pop);
- }
- break;
+ if (popped) {
+ ADD_INSN(ret, node, pop);
+ }
+ break;
}
default:
- UNKNOWN_NODE("iseq_compile_each", node, COMPILE_NG);
+ UNKNOWN_NODE("iseq_compile_each", node, COMPILE_NG);
ng:
- debug_node_end();
- return COMPILE_NG;
+ debug_node_end();
+ return COMPILE_NG;
}
debug_node_end();
@@ -8593,16 +10148,17 @@ calc_sp_depth(int depth, INSN *insn)
static VALUE
opobj_inspect(VALUE obj)
{
- struct RBasic *r = (struct RBasic *) obj;
- if (!SPECIAL_CONST_P(r) && r->klass == 0) {
- switch (BUILTIN_TYPE(r)) {
- case T_STRING:
- obj = rb_str_new_cstr(RSTRING_PTR(obj));
- break;
- case T_ARRAY:
- obj = rb_ary_dup(obj);
- break;
- }
+ if (!SPECIAL_CONST_P(obj) && !RBASIC_CLASS(obj)) {
+ switch (BUILTIN_TYPE(obj)) {
+ case T_STRING:
+ obj = rb_str_new_cstr(RSTRING_PTR(obj));
+ break;
+ case T_ARRAY:
+ obj = rb_ary_dup(obj);
+ break;
+ default:
+ break;
+ }
}
return rb_inspect(obj);
}
@@ -8615,88 +10171,92 @@ insn_data_to_s_detail(INSN *iobj)
VALUE str = rb_sprintf("%-20s ", insn_name(iobj->insn_id));
if (iobj->operands) {
- const char *types = insn_op_types(iobj->insn_id);
- int j;
-
- for (j = 0; types[j]; j++) {
- char type = types[j];
-
- switch (type) {
- case TS_OFFSET: /* label(destination position) */
- {
- LABEL *lobj = (LABEL *)OPERAND_AT(iobj, j);
- rb_str_catf(str, LABEL_FORMAT, lobj->label_no);
- break;
- }
- break;
- case TS_ISEQ: /* iseq */
- {
- rb_iseq_t *iseq = (rb_iseq_t *)OPERAND_AT(iobj, j);
- VALUE val = Qnil;
- if (0 && iseq) { /* TODO: invalidate now */
- val = (VALUE)iseq;
- }
- rb_str_concat(str, opobj_inspect(val));
- }
- break;
- case TS_LINDEX:
- case TS_NUM: /* ulong */
- case TS_VALUE: /* VALUE */
- {
- VALUE v = OPERAND_AT(iobj, j);
- rb_str_concat(str, opobj_inspect(v));
- break;
- }
- case TS_ID: /* ID */
- rb_str_concat(str, opobj_inspect(OPERAND_AT(iobj, j)));
- break;
- case TS_GENTRY:
- {
- struct rb_global_entry *entry = (struct rb_global_entry *)
- (OPERAND_AT(iobj, j) & (~1));
- rb_str_append(str, rb_id2str(entry->id));
- break;
- }
- case TS_IC: /* inline cache */
- case TS_IVC: /* inline ivar cache */
- case TS_ISE: /* inline storage entry */
- rb_str_catf(str, "<ic:%d>", FIX2INT(OPERAND_AT(iobj, j)));
- break;
+ const char *types = insn_op_types(iobj->insn_id);
+ int j;
+
+ for (j = 0; types[j]; j++) {
+ char type = types[j];
+
+ switch (type) {
+ case TS_OFFSET: /* label(destination position) */
+ {
+ LABEL *lobj = (LABEL *)OPERAND_AT(iobj, j);
+ rb_str_catf(str, LABEL_FORMAT, lobj->label_no);
+ break;
+ }
+ break;
+ case TS_ISEQ: /* iseq */
+ {
+ rb_iseq_t *iseq = (rb_iseq_t *)OPERAND_AT(iobj, j);
+ VALUE val = Qnil;
+ if (0 && iseq) { /* TODO: invalidate now */
+ val = (VALUE)iseq;
+ }
+ rb_str_concat(str, opobj_inspect(val));
+ }
+ break;
+ case TS_LINDEX:
+ case TS_NUM: /* ulong */
+ case TS_VALUE: /* VALUE */
+ {
+ VALUE v = OPERAND_AT(iobj, j);
+ if (!CLASS_OF(v))
+ rb_str_cat2(str, "<hidden>");
+ else {
+ rb_str_concat(str, opobj_inspect(v));
+ }
+ break;
+ }
+ case TS_ID: /* ID */
+ rb_str_concat(str, opobj_inspect(OPERAND_AT(iobj, j)));
+ break;
+ case TS_IC: /* inline cache */
+ rb_str_concat(str, opobj_inspect(OPERAND_AT(iobj, j)));
+ break;
+ case TS_IVC: /* inline ivar cache */
+ rb_str_catf(str, "<ivc:%d>", FIX2INT(OPERAND_AT(iobj, j)));
+ break;
+ case TS_ICVARC: /* inline cvar cache */
+ rb_str_catf(str, "<icvarc:%d>", FIX2INT(OPERAND_AT(iobj, j)));
+ break;
+ case TS_ISE: /* inline storage entry */
+ rb_str_catf(str, "<ise:%d>", FIX2INT(OPERAND_AT(iobj, j)));
+ break;
case TS_CALLDATA: /* we store these as call infos at compile time */
- {
- const struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(iobj, j);
+ {
+ const struct rb_callinfo *ci = (struct rb_callinfo *)OPERAND_AT(iobj, j);
rb_str_cat2(str, "<calldata:");
- if (ci->mid) rb_str_catf(str, "%"PRIsVALUE, rb_id2str(ci->mid));
- rb_str_catf(str, ", %d>", ci->orig_argc);
- break;
- }
- case TS_CDHASH: /* case/when condition cache */
- rb_str_cat2(str, "<ch>");
- break;
- case TS_FUNCPTR:
- {
- void *func = (void *)OPERAND_AT(iobj, j);
+ if (vm_ci_mid(ci)) rb_str_catf(str, "%"PRIsVALUE, rb_id2str(vm_ci_mid(ci)));
+ rb_str_catf(str, ", %d>", vm_ci_argc(ci));
+ break;
+ }
+ case TS_CDHASH: /* case/when condition cache */
+ rb_str_cat2(str, "<ch>");
+ break;
+ case TS_FUNCPTR:
+ {
+ void *func = (void *)OPERAND_AT(iobj, j);
#ifdef HAVE_DLADDR
- Dl_info info;
- if (dladdr(func, &info) && info.dli_sname) {
- rb_str_cat2(str, info.dli_sname);
- break;
- }
+ Dl_info info;
+ if (dladdr(func, &info) && info.dli_sname) {
+ rb_str_cat2(str, info.dli_sname);
+ break;
+ }
#endif
- rb_str_catf(str, "<%p>", func);
- }
- break;
+ rb_str_catf(str, "<%p>", func);
+ }
+ break;
case TS_BUILTIN:
- rb_bug("unsupported: TS_BUILTIN");
+ rb_str_cat2(str, "<TS_BUILTIN>");
break;
- default:{
- rb_raise(rb_eSyntaxError, "unknown operand type: %c", type);
- }
- }
- if (types[j + 1]) {
- rb_str_cat2(str, ", ");
- }
- }
+ default:{
+ rb_raise(rb_eSyntaxError, "unknown operand type: %c", type);
+ }
+ }
+ if (types[j + 1]) {
+ rb_str_cat2(str, ", ");
+ }
+ }
}
return str;
}
@@ -8718,40 +10278,40 @@ dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr,
printf("-- raw disasm--------\n");
while (link) {
- if (curr) printf(curr == link ? "*" : " ");
- switch (link->type) {
- case ISEQ_ELEMENT_INSN:
- {
- iobj = (INSN *)link;
- str = insn_data_to_s_detail(iobj);
- printf("%04d %-65s(%4u)\n", pos, StringValueCStr(str), iobj->insn_info.line_no);
- pos += insn_data_length(iobj);
- break;
- }
- case ISEQ_ELEMENT_LABEL:
- {
- lobj = (LABEL *)link;
- printf(LABEL_FORMAT" [sp: %d]%s\n", lobj->label_no, lobj->sp,
- dest == lobj ? " <---" : "");
- break;
- }
- case ISEQ_ELEMENT_TRACE:
- {
- TRACE *trace = (TRACE *)link;
- printf("trace: %0x\n", trace->event);
- break;
- }
- case ISEQ_ELEMENT_ADJUST:
- {
- ADJUST *adjust = (ADJUST *)link;
- printf("adjust: [label: %d]\n", adjust->label ? adjust->label->label_no : -1);
- break;
- }
- default:
- /* ignore */
- rb_raise(rb_eSyntaxError, "dump_disasm_list error: %ld\n", FIX2LONG(link->type));
- }
- link = link->next;
+ if (curr) printf(curr == link ? "*" : " ");
+ switch (link->type) {
+ case ISEQ_ELEMENT_INSN:
+ {
+ iobj = (INSN *)link;
+ str = insn_data_to_s_detail(iobj);
+ printf(" %04d %-65s(%4u)\n", pos, StringValueCStr(str), iobj->insn_info.line_no);
+ pos += insn_data_length(iobj);
+ break;
+ }
+ case ISEQ_ELEMENT_LABEL:
+ {
+ lobj = (LABEL *)link;
+ printf(LABEL_FORMAT" [sp: %d]%s\n", lobj->label_no, lobj->sp,
+ dest == lobj ? " <---" : "");
+ break;
+ }
+ case ISEQ_ELEMENT_TRACE:
+ {
+ TRACE *trace = (TRACE *)link;
+ printf(" trace: %0x\n", trace->event);
+ break;
+ }
+ case ISEQ_ELEMENT_ADJUST:
+ {
+ ADJUST *adjust = (ADJUST *)link;
+ printf(" adjust: [label: %d]\n", adjust->label ? adjust->label->label_no : -1);
+ break;
+ }
+ default:
+ /* ignore */
+ rb_raise(rb_eSyntaxError, "dump_disasm_list error: %ld\n", FIX2LONG(link->type));
+ }
+ link = link->next;
}
printf("---------------------\n");
fflush(stdout);
@@ -8769,7 +10329,7 @@ rb_insns_name_array(void)
VALUE ary = rb_ary_new_capa(VM_INSTRUCTION_SIZE);
int i;
for (i = 0; i < VM_INSTRUCTION_SIZE; i++) {
- rb_ary_push(ary, rb_fstring_cstr(insn_name(i)));
+ rb_ary_push(ary, rb_fstring_cstr(insn_name(i)));
}
return rb_obj_freeze(ary);
}
@@ -8782,11 +10342,11 @@ register_label(rb_iseq_t *iseq, struct st_table *labels_table, VALUE obj)
obj = rb_to_symbol_type(obj);
if (st_lookup(labels_table, obj, &tmp) == 0) {
- label = NEW_LABEL(0);
- st_insert(labels_table, obj, (st_data_t)label);
+ label = NEW_LABEL(0);
+ st_insert(labels_table, obj, (st_data_t)label);
}
else {
- label = (LABEL *)tmp;
+ label = (LABEL *)tmp;
}
LABEL_REF(label);
return label;
@@ -8795,18 +10355,16 @@ register_label(rb_iseq_t *iseq, struct st_table *labels_table, VALUE obj)
static VALUE
get_exception_sym2type(VALUE sym)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
static VALUE symRescue, symEnsure, symRetry;
static VALUE symBreak, symRedo, symNext;
if (symRescue == 0) {
- symRescue = ID2SYM(rb_intern("rescue"));
- symEnsure = ID2SYM(rb_intern("ensure"));
- symRetry = ID2SYM(rb_intern("retry"));
- symBreak = ID2SYM(rb_intern("break"));
- symRedo = ID2SYM(rb_intern("redo"));
- symNext = ID2SYM(rb_intern("next"));
+ symRescue = ID2SYM(rb_intern_const("rescue"));
+ symEnsure = ID2SYM(rb_intern_const("ensure"));
+ symRetry = ID2SYM(rb_intern_const("retry"));
+ symBreak = ID2SYM(rb_intern_const("break"));
+ symRedo = ID2SYM(rb_intern_const("redo"));
+ symNext = ID2SYM(rb_intern_const("next"));
}
if (sym == symRescue) return CATCH_TYPE_RESCUE;
@@ -8821,25 +10379,25 @@ get_exception_sym2type(VALUE sym)
static int
iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
- VALUE exception)
+ VALUE exception)
{
int i;
for (i=0; i<RARRAY_LEN(exception); i++) {
- const rb_iseq_t *eiseq;
- VALUE v, type;
- LABEL *lstart, *lend, *lcont;
- unsigned int sp;
-
- v = rb_to_array_type(RARRAY_AREF(exception, i));
- if (RARRAY_LEN(v) != 6) {
- rb_raise(rb_eSyntaxError, "wrong exception entry");
- }
+ const rb_iseq_t *eiseq;
+ VALUE v, type;
+ LABEL *lstart, *lend, *lcont;
+ unsigned int sp;
+
+ v = rb_to_array_type(RARRAY_AREF(exception, i));
+ if (RARRAY_LEN(v) != 6) {
+ rb_raise(rb_eSyntaxError, "wrong exception entry");
+ }
type = get_exception_sym2type(RARRAY_AREF(v, 0));
- if (RARRAY_AREF(v, 1) == Qnil) {
- eiseq = NULL;
- }
- else {
+ if (NIL_P(RARRAY_AREF(v, 1))) {
+ eiseq = NULL;
+ }
+ else {
eiseq = rb_iseqw_to_iseq(rb_iseq_load(RARRAY_AREF(v, 1), (VALUE)iseq, Qnil));
}
@@ -8848,18 +10406,18 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
lcont = register_label(iseq, labels_table, RARRAY_AREF(v, 4));
sp = NUM2UINT(RARRAY_AREF(v, 5));
- /* TODO: Dirty Hack! Fix me */
- if (type == CATCH_TYPE_RESCUE ||
- type == CATCH_TYPE_BREAK ||
- type == CATCH_TYPE_NEXT) {
- ++sp;
- }
+ /* TODO: Dirty Hack! Fix me */
+ if (type == CATCH_TYPE_RESCUE ||
+ type == CATCH_TYPE_BREAK ||
+ type == CATCH_TYPE_NEXT) {
+ ++sp;
+ }
- lcont->sp = sp;
+ lcont->sp = sp;
- ADD_CATCH_ENTRY(type, lstart, lend, eiseq, lcont);
+ ADD_CATCH_ENTRY(type, lstart, lend, eiseq, lcont);
- RB_GC_GUARD(v);
+ RB_GC_GUARD(v);
}
return COMPILE_OK;
}
@@ -8872,7 +10430,7 @@ insn_make_insn_table(void)
table = st_init_numtable_with_size(VM_INSTRUCTION_SIZE);
for (i=0; i<VM_INSTRUCTION_SIZE; i++) {
- st_insert(table, ID2SYM(rb_intern(insn_name(i))), i);
+ st_insert(table, ID2SYM(rb_intern_const(insn_name(i))), i);
}
return table;
@@ -8885,13 +10443,13 @@ iseq_build_load_iseq(const rb_iseq_t *iseq, VALUE op)
const rb_iseq_t *loaded_iseq;
if (RB_TYPE_P(op, T_ARRAY)) {
- iseqw = rb_iseq_load(op, (VALUE)iseq, Qnil);
+ iseqw = rb_iseq_load(op, (VALUE)iseq, Qnil);
}
else if (CLASS_OF(op) == rb_cISeq) {
- iseqw = op;
+ iseqw = op;
}
else {
- rb_raise(rb_eSyntaxError, "ISEQ is required");
+ rb_raise(rb_eSyntaxError, "ISEQ is required");
}
loaded_iseq = rb_iseqw_to_iseq(iseqw);
@@ -8904,60 +10462,62 @@ iseq_build_callinfo_from_hash(rb_iseq_t *iseq, VALUE op)
ID mid = 0;
int orig_argc = 0;
unsigned int flag = 0;
- struct rb_call_info_kw_arg *kw_arg = 0;
+ struct rb_callinfo_kwarg *kw_arg = 0;
if (!NIL_P(op)) {
- VALUE vmid = rb_hash_aref(op, ID2SYM(rb_intern("mid")));
- VALUE vflag = rb_hash_aref(op, ID2SYM(rb_intern("flag")));
- VALUE vorig_argc = rb_hash_aref(op, ID2SYM(rb_intern("orig_argc")));
- VALUE vkw_arg = rb_hash_aref(op, ID2SYM(rb_intern("kw_arg")));
-
- if (!NIL_P(vmid)) mid = SYM2ID(vmid);
- if (!NIL_P(vflag)) flag = NUM2UINT(vflag);
- if (!NIL_P(vorig_argc)) orig_argc = FIX2INT(vorig_argc);
+ VALUE vmid = rb_hash_aref(op, ID2SYM(rb_intern_const("mid")));
+ VALUE vflag = rb_hash_aref(op, ID2SYM(rb_intern_const("flag")));
+ VALUE vorig_argc = rb_hash_aref(op, ID2SYM(rb_intern_const("orig_argc")));
+ VALUE vkw_arg = rb_hash_aref(op, ID2SYM(rb_intern_const("kw_arg")));
- if (!NIL_P(vkw_arg)) {
- int i;
- int len = RARRAY_LENINT(vkw_arg);
- size_t n = rb_call_info_kw_arg_bytes(len);
+ if (!NIL_P(vmid)) mid = SYM2ID(vmid);
+ if (!NIL_P(vflag)) flag = NUM2UINT(vflag);
+ if (!NIL_P(vorig_argc)) orig_argc = FIX2INT(vorig_argc);
- kw_arg = xmalloc(n);
- kw_arg->keyword_len = len;
- for (i = 0; i < len; i++) {
- VALUE kw = RARRAY_AREF(vkw_arg, i);
- SYM2ID(kw); /* make immortal */
- kw_arg->keywords[i] = kw;
- }
- }
+ if (!NIL_P(vkw_arg)) {
+ int i;
+ int len = RARRAY_LENINT(vkw_arg);
+ size_t n = rb_callinfo_kwarg_bytes(len);
+
+ kw_arg = xmalloc(n);
+ kw_arg->keyword_len = len;
+ for (i = 0; i < len; i++) {
+ VALUE kw = RARRAY_AREF(vkw_arg, i);
+ SYM2ID(kw); /* make immortal */
+ kw_arg->keywords[i] = kw;
+ }
+ }
}
- return (VALUE)new_callinfo(iseq, mid, orig_argc, flag, kw_arg, (flag & VM_CALL_ARGS_SIMPLE) == 0);
+ const struct rb_callinfo *ci = new_callinfo(iseq, mid, orig_argc, flag, kw_arg, (flag & VM_CALL_ARGS_SIMPLE) == 0);
+ RB_OBJ_WRITTEN(iseq, Qundef, ci);
+ return (VALUE)ci;
}
static rb_event_flag_t
event_name_to_flag(VALUE sym)
{
-#define CHECK_EVENT(ev) if (sym == ID2SYM(rb_intern(#ev))) return ev;
- CHECK_EVENT(RUBY_EVENT_LINE);
- CHECK_EVENT(RUBY_EVENT_CLASS);
- CHECK_EVENT(RUBY_EVENT_END);
- CHECK_EVENT(RUBY_EVENT_CALL);
- CHECK_EVENT(RUBY_EVENT_RETURN);
- CHECK_EVENT(RUBY_EVENT_B_CALL);
- CHECK_EVENT(RUBY_EVENT_B_RETURN);
+#define CHECK_EVENT(ev) if (sym == ID2SYM(rb_intern_const(#ev))) return ev;
+ CHECK_EVENT(RUBY_EVENT_LINE);
+ CHECK_EVENT(RUBY_EVENT_CLASS);
+ CHECK_EVENT(RUBY_EVENT_END);
+ CHECK_EVENT(RUBY_EVENT_CALL);
+ CHECK_EVENT(RUBY_EVENT_RETURN);
+ CHECK_EVENT(RUBY_EVENT_B_CALL);
+ CHECK_EVENT(RUBY_EVENT_B_RETURN);
#undef CHECK_EVENT
return RUBY_EVENT_NONE;
}
static int
iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *const anchor,
- VALUE body, VALUE labels_wrapper)
+ VALUE body, VALUE node_ids, VALUE labels_wrapper)
{
/* TODO: body should be frozen */
long i, len = RARRAY_LEN(body);
struct st_table *labels_table = DATA_PTR(labels_wrapper);
int j;
- int line_no = 0;
+ int line_no = 0, node_id = -1, insn_idx = 0;
int ret = COMPILE_OK;
/*
@@ -8966,139 +10526,174 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *const anchor,
static struct st_table *insn_table;
if (insn_table == 0) {
- insn_table = insn_make_insn_table();
+ insn_table = insn_make_insn_table();
}
for (i=0; i<len; i++) {
VALUE obj = RARRAY_AREF(body, i);
- if (SYMBOL_P(obj)) {
- rb_event_flag_t event;
- if ((event = event_name_to_flag(obj)) != RUBY_EVENT_NONE) {
- ADD_TRACE(anchor, event);
- }
- else {
- LABEL *label = register_label(iseq, labels_table, obj);
- ADD_LABEL(anchor, label);
- }
- }
- else if (FIXNUM_P(obj)) {
- line_no = NUM2INT(obj);
- }
- else if (RB_TYPE_P(obj, T_ARRAY)) {
- VALUE *argv = 0;
- int argc = RARRAY_LENINT(obj) - 1;
- st_data_t insn_id;
- VALUE insn;
-
- insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
- if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
- /* TODO: exception */
- COMPILE_ERROR(iseq, line_no,
- "unknown instruction: %+"PRIsVALUE, insn);
- ret = COMPILE_NG;
- break;
- }
-
- if (argc != insn_len((VALUE)insn_id)-1) {
- COMPILE_ERROR(iseq, line_no,
- "operand size mismatch");
- ret = COMPILE_NG;
- break;
- }
-
- if (argc > 0) {
- argv = compile_data_alloc2(iseq, sizeof(VALUE), argc);
- for (j=0; j<argc; j++) {
- VALUE op = rb_ary_entry(obj, j+1);
- switch (insn_op_type((VALUE)insn_id, j)) {
- case TS_OFFSET: {
- LABEL *label = register_label(iseq, labels_table, op);
- argv[j] = (VALUE)label;
- break;
- }
- case TS_LINDEX:
- case TS_NUM:
- (void)NUM2INT(op);
- argv[j] = op;
- break;
- case TS_VALUE:
- argv[j] = op;
- RB_OBJ_WRITTEN(iseq, Qundef, op);
- break;
- case TS_ISEQ:
- {
- if (op != Qnil) {
- VALUE v = (VALUE)iseq_build_load_iseq(iseq, op);
- argv[j] = v;
- RB_OBJ_WRITTEN(iseq, Qundef, v);
- }
- else {
- argv[j] = 0;
- }
- }
- break;
- case TS_GENTRY:
- op = rb_to_symbol_type(op);
- argv[j] = (VALUE)rb_global_entry(SYM2ID(op));
- break;
- case TS_ISE:
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
- /* fall through */
- case TS_IC:
+ if (SYMBOL_P(obj)) {
+ rb_event_flag_t event;
+ if ((event = event_name_to_flag(obj)) != RUBY_EVENT_NONE) {
+ ADD_TRACE(anchor, event);
+ }
+ else {
+ LABEL *label = register_label(iseq, labels_table, obj);
+ ADD_LABEL(anchor, label);
+ }
+ }
+ else if (FIXNUM_P(obj)) {
+ line_no = NUM2INT(obj);
+ }
+ else if (RB_TYPE_P(obj, T_ARRAY)) {
+ VALUE *argv = 0;
+ int argc = RARRAY_LENINT(obj) - 1;
+ st_data_t insn_id;
+ VALUE insn;
+
+ if (node_ids) {
+ node_id = NUM2INT(rb_ary_entry(node_ids, insn_idx++));
+ }
+
+ insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
+ if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
+ /* TODO: exception */
+ COMPILE_ERROR(iseq, line_no,
+ "unknown instruction: %+"PRIsVALUE, insn);
+ ret = COMPILE_NG;
+ break;
+ }
+
+ if (argc != insn_len((VALUE)insn_id)-1) {
+ COMPILE_ERROR(iseq, line_no,
+ "operand size mismatch");
+ ret = COMPILE_NG;
+ break;
+ }
+
+ if (argc > 0) {
+ argv = compile_data_calloc2(iseq, sizeof(VALUE), argc);
+
+ // add element before operand setup to make GC root
+ NODE dummy_line_node = generate_dummy_line_node(line_no, node_id);
+ ADD_ELEM(anchor,
+ (LINK_ELEMENT*)new_insn_core(iseq, &dummy_line_node,
+ (enum ruby_vminsn_type)insn_id, argc, argv));
+
+ for (j=0; j<argc; j++) {
+ VALUE op = rb_ary_entry(obj, j+1);
+ switch (insn_op_type((VALUE)insn_id, j)) {
+ case TS_OFFSET: {
+ LABEL *label = register_label(iseq, labels_table, op);
+ argv[j] = (VALUE)label;
+ break;
+ }
+ case TS_LINDEX:
+ case TS_NUM:
+ (void)NUM2INT(op);
+ argv[j] = op;
+ break;
+ case TS_VALUE:
+ argv[j] = op;
+ RB_OBJ_WRITTEN(iseq, Qundef, op);
+ break;
+ case TS_ISEQ:
+ {
+ if (op != Qnil) {
+ VALUE v = (VALUE)iseq_build_load_iseq(iseq, op);
+ argv[j] = v;
+ RB_OBJ_WRITTEN(iseq, Qundef, v);
+ }
+ else {
+ argv[j] = 0;
+ }
+ }
+ break;
+ case TS_ISE:
+ argv[j] = op;
+ if (NUM2UINT(op) >= ISEQ_BODY(iseq)->ise_size) {
+ ISEQ_BODY(iseq)->ise_size = NUM2INT(op) + 1;
+ }
+ break;
+ case TS_IC:
+ {
+ VALUE segments = rb_ary_new();
+ op = rb_to_array_type(op);
+
+ for (int i = 0; i < RARRAY_LEN(op); i++) {
+ VALUE sym = RARRAY_AREF(op, i);
+ sym = rb_to_symbol_type(sym);
+ rb_ary_push(segments, sym);
+ }
+
+ RB_GC_GUARD(op);
+ argv[j] = segments;
+ RB_OBJ_WRITTEN(iseq, Qundef, segments);
+ ISEQ_BODY(iseq)->ic_size++;
+ }
+ break;
case TS_IVC: /* inline ivar cache */
- argv[j] = op;
- if (NUM2UINT(op) >= iseq->body->is_size) {
- iseq->body->is_size = NUM2INT(op) + 1;
- }
- break;
+ argv[j] = op;
+ if (NUM2UINT(op) >= ISEQ_BODY(iseq)->ivc_size) {
+ ISEQ_BODY(iseq)->ivc_size = NUM2INT(op) + 1;
+ }
+ break;
+ case TS_ICVARC: /* inline cvar cache */
+ argv[j] = op;
+ if (NUM2UINT(op) >= ISEQ_BODY(iseq)->icvarc_size) {
+ ISEQ_BODY(iseq)->icvarc_size = NUM2INT(op) + 1;
+ }
+ break;
case TS_CALLDATA:
- argv[j] = iseq_build_callinfo_from_hash(iseq, op);
- break;
- case TS_ID:
- argv[j] = rb_to_symbol_type(op);
- break;
- case TS_CDHASH:
- {
- int i;
- VALUE map = rb_hash_new_with_size(RARRAY_LEN(op)/2);
+ argv[j] = iseq_build_callinfo_from_hash(iseq, op);
+ break;
+ case TS_ID:
+ argv[j] = rb_to_symbol_type(op);
+ break;
+ case TS_CDHASH:
+ {
+ int i;
+ VALUE map = rb_hash_new_with_size(RARRAY_LEN(op)/2);
RHASH_TBL_RAW(map)->type = &cdhash_type;
- op = rb_to_array_type(op);
- for (i=0; i<RARRAY_LEN(op); i+=2) {
- VALUE key = RARRAY_AREF(op, i);
- VALUE sym = RARRAY_AREF(op, i+1);
- LABEL *label =
- register_label(iseq, labels_table, sym);
- rb_hash_aset(map, key, (VALUE)label | 1);
- }
- RB_GC_GUARD(op);
- argv[j] = map;
- RB_OBJ_WRITTEN(iseq, Qundef, map);
- }
- break;
- case TS_FUNCPTR:
- {
+ op = rb_to_array_type(op);
+ for (i=0; i<RARRAY_LEN(op); i+=2) {
+ VALUE key = RARRAY_AREF(op, i);
+ VALUE sym = RARRAY_AREF(op, i+1);
+ LABEL *label =
+ register_label(iseq, labels_table, sym);
+ rb_hash_aset(map, key, (VALUE)label | 1);
+ }
+ RB_GC_GUARD(op);
+ argv[j] = map;
+ RB_OBJ_WRITTEN(iseq, Qundef, map);
+ }
+ break;
+ case TS_FUNCPTR:
+ {
#if SIZEOF_VALUE <= SIZEOF_LONG
- long funcptr = NUM2LONG(op);
+ long funcptr = NUM2LONG(op);
#else
- LONG_LONG funcptr = NUM2LL(op);
+ LONG_LONG funcptr = NUM2LL(op);
#endif
- argv[j] = (VALUE)funcptr;
- }
- break;
- default:
- rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type((VALUE)insn_id, j));
- }
- }
- }
- ADD_ELEM(anchor,
- (LINK_ELEMENT*)new_insn_core(iseq, line_no,
- (enum ruby_vminsn_type)insn_id, argc, argv));
- }
- else {
- rb_raise(rb_eTypeError, "unexpected object for instruction");
- }
+ argv[j] = (VALUE)funcptr;
+ }
+ break;
+ default:
+ rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type((VALUE)insn_id, j));
+ }
+ }
+ }
+ else {
+ NODE dummy_line_node = generate_dummy_line_node(line_no, node_id);
+ ADD_ELEM(anchor,
+ (LINK_ELEMENT*)new_insn_core(iseq, &dummy_line_node,
+ (enum ruby_vminsn_type)insn_id, argc, NULL));
+ }
+ }
+ else {
+ rb_raise(rb_eTypeError, "unexpected object for instruction");
+ }
}
DATA_PTR(labels_wrapper) = 0;
validate_labels(iseq, labels_table);
@@ -9114,12 +10709,12 @@ int_param(int *dst, VALUE param, VALUE sym)
{
VALUE val = rb_hash_aref(param, sym);
if (FIXNUM_P(val)) {
- *dst = FIX2INT(val);
- return TRUE;
+ *dst = FIX2INT(val);
+ return TRUE;
}
else if (!NIL_P(val)) {
- rb_raise(rb_eTypeError, "invalid %+"PRIsVALUE" Fixnum: %+"PRIsVALUE,
- sym, val);
+ rb_raise(rb_eTypeError, "invalid %+"PRIsVALUE" Fixnum: %+"PRIsVALUE,
+ sym, val);
}
return FALSE;
}
@@ -9135,31 +10730,31 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
ID *ids;
struct rb_iseq_param_keyword *keyword = ZALLOC(struct rb_iseq_param_keyword);
- iseq->body->param.flags.has_kw = TRUE;
+ ISEQ_BODY(iseq)->param.flags.has_kw = TRUE;
keyword->num = len;
-#define SYM(s) ID2SYM(rb_intern(#s))
+#define SYM(s) ID2SYM(rb_intern_const(#s))
(void)int_param(&keyword->bits_start, params, SYM(kwbits));
i = keyword->bits_start - keyword->num;
- ids = (ID *)&iseq->body->local_table[i];
+ ids = (ID *)&ISEQ_BODY(iseq)->local_table[i];
#undef SYM
/* required args */
for (i = 0; i < len; i++) {
- VALUE val = RARRAY_AREF(keywords, i);
+ VALUE val = RARRAY_AREF(keywords, i);
- if (!SYMBOL_P(val)) {
- goto default_values;
- }
- ids[i] = SYM2ID(val);
- keyword->required_num++;
+ if (!SYMBOL_P(val)) {
+ goto default_values;
+ }
+ ids[i] = SYM2ID(val);
+ keyword->required_num++;
}
default_values: /* note: we intentionally preserve `i' from previous loop */
default_len = len - i;
if (default_len == 0) {
- keyword->table = ids;
- return keyword;
+ keyword->table = ids;
+ return keyword;
}
else if (default_len < 0) {
UNREACHABLE;
@@ -9168,23 +10763,23 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
dvs = ALLOC_N(VALUE, (unsigned int)default_len);
for (j = 0; i < len; i++, j++) {
- key = RARRAY_AREF(keywords, i);
- CHECK_ARRAY(key);
-
- switch (RARRAY_LEN(key)) {
- case 1:
- sym = RARRAY_AREF(key, 0);
- default_val = Qundef;
- break;
- case 2:
- sym = RARRAY_AREF(key, 0);
- default_val = RARRAY_AREF(key, 1);
- break;
- default:
- rb_raise(rb_eTypeError, "keyword default has unsupported len %+"PRIsVALUE, key);
- }
- ids[i] = SYM2ID(sym);
- dvs[j] = default_val;
+ key = RARRAY_AREF(keywords, i);
+ CHECK_ARRAY(key);
+
+ switch (RARRAY_LEN(key)) {
+ case 1:
+ sym = RARRAY_AREF(key, 0);
+ default_val = Qundef;
+ break;
+ case 2:
+ sym = RARRAY_AREF(key, 0);
+ default_val = RARRAY_AREF(key, 1);
+ break;
+ default:
+ rb_raise(rb_eTypeError, "keyword default has unsupported len %+"PRIsVALUE, key);
+ }
+ ids[i] = SYM2ID(sym);
+ dvs[j] = default_val;
}
keyword->table = ids;
@@ -9193,6 +10788,12 @@ iseq_build_kw(rb_iseq_t *iseq, VALUE params, VALUE keywords)
return keyword;
}
+static void
+iseq_insn_each_object_mark(VALUE *obj_ptr, VALUE _)
+{
+ rb_gc_mark(*obj_ptr);
+}
+
void
rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *storage)
{
@@ -9219,26 +10820,7 @@ rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *storage)
iobj = (INSN *)&storage->buff[pos];
if (iobj->operands) {
- int j;
- const char *types = insn_op_types(iobj->insn_id);
-
- for (j = 0; types[j]; j++) {
- char type = types[j];
- switch (type) {
- case TS_CDHASH:
- case TS_ISEQ:
- case TS_VALUE:
- {
- VALUE op = OPERAND_AT(iobj, j);
- if (!SPECIAL_CONST_P(op)) {
- rb_gc_mark(op);
- }
- break;
- }
- default:
- break;
- }
- }
+ iseq_insn_each_markable_object(iobj, iseq_insn_each_object_mark, (VALUE)0);
}
pos += (int)size;
}
@@ -9247,9 +10829,9 @@ rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *storage)
void
rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params,
- VALUE exception, VALUE body)
+ VALUE exception, VALUE body)
{
-#define SYM(s) ID2SYM(rb_intern(#s))
+#define SYM(s) ID2SYM(rb_intern_const(#s))
int i, len;
unsigned int arg_size, local_size, stack_max;
ID *tbl;
@@ -9257,84 +10839,92 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params,
VALUE labels_wrapper = Data_Wrap_Struct(0, rb_mark_set, st_free_table, labels_table);
VALUE arg_opt_labels = rb_hash_aref(params, SYM(opt));
VALUE keywords = rb_hash_aref(params, SYM(keyword));
- VALUE sym_arg_rest = ID2SYM(rb_intern("#arg_rest"));
+ VALUE sym_arg_rest = ID2SYM(rb_intern_const("#arg_rest"));
DECL_ANCHOR(anchor);
INIT_ANCHOR(anchor);
len = RARRAY_LENINT(locals);
- iseq->body->local_table_size = len;
- iseq->body->local_table = tbl = len > 0 ? (ID *)ALLOC_N(ID, iseq->body->local_table_size) : NULL;
+ ISEQ_BODY(iseq)->local_table_size = len;
+ ISEQ_BODY(iseq)->local_table = tbl = len > 0 ? (ID *)ALLOC_N(ID, ISEQ_BODY(iseq)->local_table_size) : NULL;
for (i = 0; i < len; i++) {
- VALUE lv = RARRAY_AREF(locals, i);
+ VALUE lv = RARRAY_AREF(locals, i);
- if (sym_arg_rest == lv) {
- tbl[i] = 0;
- }
- else {
- tbl[i] = FIXNUM_P(lv) ? (ID)FIX2LONG(lv) : SYM2ID(CHECK_SYMBOL(lv));
- }
+ if (sym_arg_rest == lv) {
+ tbl[i] = 0;
+ }
+ else {
+ tbl[i] = FIXNUM_P(lv) ? (ID)FIX2LONG(lv) : SYM2ID(CHECK_SYMBOL(lv));
+ }
}
-#define INT_PARAM(F) int_param(&iseq->body->param.F, params, SYM(F))
+#define INT_PARAM(F) int_param(&ISEQ_BODY(iseq)->param.F, params, SYM(F))
if (INT_PARAM(lead_num)) {
- iseq->body->param.flags.has_lead = TRUE;
+ ISEQ_BODY(iseq)->param.flags.has_lead = TRUE;
}
- if (INT_PARAM(post_num)) iseq->body->param.flags.has_post = TRUE;
- if (INT_PARAM(post_start)) iseq->body->param.flags.has_post = TRUE;
- if (INT_PARAM(rest_start)) iseq->body->param.flags.has_rest = TRUE;
- if (INT_PARAM(block_start)) iseq->body->param.flags.has_block = TRUE;
+ if (INT_PARAM(post_num)) ISEQ_BODY(iseq)->param.flags.has_post = TRUE;
+ if (INT_PARAM(post_start)) ISEQ_BODY(iseq)->param.flags.has_post = TRUE;
+ if (INT_PARAM(rest_start)) ISEQ_BODY(iseq)->param.flags.has_rest = TRUE;
+ if (INT_PARAM(block_start)) ISEQ_BODY(iseq)->param.flags.has_block = TRUE;
#undef INT_PARAM
{
#define INT_PARAM(F) F = (int_param(&x, misc, SYM(F)) ? (unsigned int)x : 0)
- int x;
- INT_PARAM(arg_size);
- INT_PARAM(local_size);
- INT_PARAM(stack_max);
+ int x;
+ INT_PARAM(arg_size);
+ INT_PARAM(local_size);
+ INT_PARAM(stack_max);
#undef INT_PARAM
}
+ VALUE node_ids = Qfalse;
+#ifdef USE_ISEQ_NODE_ID
+ node_ids = rb_hash_aref(misc, ID2SYM(rb_intern("node_ids")));
+ if (!RB_TYPE_P(node_ids, T_ARRAY)) {
+ rb_raise(rb_eTypeError, "node_ids is not an array");
+ }
+#endif
+
if (RB_TYPE_P(arg_opt_labels, T_ARRAY)) {
- len = RARRAY_LENINT(arg_opt_labels);
- iseq->body->param.flags.has_opt = !!(len - 1 >= 0);
+ len = RARRAY_LENINT(arg_opt_labels);
+ ISEQ_BODY(iseq)->param.flags.has_opt = !!(len - 1 >= 0);
- if (iseq->body->param.flags.has_opt) {
- VALUE *opt_table = ALLOC_N(VALUE, len);
+ if (ISEQ_BODY(iseq)->param.flags.has_opt) {
+ VALUE *opt_table = ALLOC_N(VALUE, len);
- for (i = 0; i < len; i++) {
- VALUE ent = RARRAY_AREF(arg_opt_labels, i);
- LABEL *label = register_label(iseq, labels_table, ent);
- opt_table[i] = (VALUE)label;
- }
+ for (i = 0; i < len; i++) {
+ VALUE ent = RARRAY_AREF(arg_opt_labels, i);
+ LABEL *label = register_label(iseq, labels_table, ent);
+ opt_table[i] = (VALUE)label;
+ }
- iseq->body->param.opt_num = len - 1;
- iseq->body->param.opt_table = opt_table;
- }
+ ISEQ_BODY(iseq)->param.opt_num = len - 1;
+ ISEQ_BODY(iseq)->param.opt_table = opt_table;
+ }
}
else if (!NIL_P(arg_opt_labels)) {
- rb_raise(rb_eTypeError, ":opt param is not an array: %+"PRIsVALUE,
- arg_opt_labels);
+ rb_raise(rb_eTypeError, ":opt param is not an array: %+"PRIsVALUE,
+ arg_opt_labels);
}
if (RB_TYPE_P(keywords, T_ARRAY)) {
- iseq->body->param.keyword = iseq_build_kw(iseq, params, keywords);
+ ISEQ_BODY(iseq)->param.keyword = iseq_build_kw(iseq, params, keywords);
}
else if (!NIL_P(keywords)) {
- rb_raise(rb_eTypeError, ":keywords param is not an array: %+"PRIsVALUE,
- keywords);
+ rb_raise(rb_eTypeError, ":keywords param is not an array: %+"PRIsVALUE,
+ keywords);
}
if (Qtrue == rb_hash_aref(params, SYM(ambiguous_param0))) {
- iseq->body->param.flags.ambiguous_param0 = TRUE;
+ ISEQ_BODY(iseq)->param.flags.ambiguous_param0 = TRUE;
}
if (int_param(&i, params, SYM(kwrest))) {
- struct rb_iseq_param_keyword *keyword = (struct rb_iseq_param_keyword *)iseq->body->param.keyword;
- if (keyword == NULL) {
- iseq->body->param.keyword = keyword = ZALLOC(struct rb_iseq_param_keyword);
- }
- keyword->rest_start = i;
- iseq->body->param.flags.has_kwrest = TRUE;
+ struct rb_iseq_param_keyword *keyword = (struct rb_iseq_param_keyword *)ISEQ_BODY(iseq)->param.keyword;
+ if (keyword == NULL) {
+ ISEQ_BODY(iseq)->param.keyword = keyword = ZALLOC(struct rb_iseq_param_keyword);
+ }
+ keyword->rest_start = i;
+ ISEQ_BODY(iseq)->param.flags.has_kwrest = TRUE;
}
#undef SYM
iseq_calc_param_size(iseq);
@@ -9343,11 +10933,11 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params,
iseq_build_from_ary_exception(iseq, labels_table, exception);
/* body */
- iseq_build_from_ary_body(iseq, anchor, body, labels_wrapper);
+ iseq_build_from_ary_body(iseq, anchor, body, node_ids, labels_wrapper);
- iseq->body->param.size = arg_size;
- iseq->body->local_table_size = local_size;
- iseq->body->stack_max = stack_max;
+ ISEQ_BODY(iseq)->param.size = arg_size;
+ ISEQ_BODY(iseq)->local_table_size = local_size;
+ ISEQ_BODY(iseq)->stack_max = stack_max;
}
/* for parser */
@@ -9356,23 +10946,23 @@ int
rb_dvar_defined(ID id, const rb_iseq_t *iseq)
{
if (iseq) {
- const struct rb_iseq_constant_body *body = iseq->body;
- while (body->type == ISEQ_TYPE_BLOCK ||
- body->type == ISEQ_TYPE_RESCUE ||
- body->type == ISEQ_TYPE_ENSURE ||
- body->type == ISEQ_TYPE_EVAL ||
- body->type == ISEQ_TYPE_MAIN
- ) {
- unsigned int i;
-
- for (i = 0; i < body->local_table_size; i++) {
- if (body->local_table[i] == id) {
- return 1;
- }
- }
- iseq = body->parent_iseq;
- body = iseq->body;
- }
+ const struct rb_iseq_constant_body *body = ISEQ_BODY(iseq);
+ while (body->type == ISEQ_TYPE_BLOCK ||
+ body->type == ISEQ_TYPE_RESCUE ||
+ body->type == ISEQ_TYPE_ENSURE ||
+ body->type == ISEQ_TYPE_EVAL ||
+ body->type == ISEQ_TYPE_MAIN
+ ) {
+ unsigned int i;
+
+ for (i = 0; i < body->local_table_size; i++) {
+ if (body->local_table[i] == id) {
+ return 1;
+ }
+ }
+ iseq = body->parent_iseq;
+ body = ISEQ_BODY(iseq);
+ }
}
return 0;
}
@@ -9381,112 +10971,18 @@ int
rb_local_defined(ID id, const rb_iseq_t *iseq)
{
if (iseq) {
- unsigned int i;
- const struct rb_iseq_constant_body *const body = iseq->body->local_iseq->body;
+ unsigned int i;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(ISEQ_BODY(iseq)->local_iseq);
- for (i=0; i<body->local_table_size; i++) {
- if (body->local_table[i] == id) {
- return 1;
- }
- }
+ for (i=0; i<body->local_table_size; i++) {
+ if (body->local_table[i] == id) {
+ return 1;
+ }
+ }
}
return 0;
}
-static int
-caller_location(VALUE *path, VALUE *realpath)
-{
- const rb_execution_context_t *ec = GET_EC();
- const rb_control_frame_t *const cfp =
- rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
-
- if (cfp) {
- int line = rb_vm_get_sourceline(cfp);
- *path = rb_iseq_path(cfp->iseq);
- *realpath = rb_iseq_realpath(cfp->iseq);
- return line;
- }
- else {
- *path = rb_fstring_lit("<compiled>");
- *realpath = *path;
- return 1;
- }
-}
-
-typedef struct {
- VALUE arg;
- rb_insn_func_t func;
- int line;
-} accessor_args;
-
-static const rb_iseq_t *
-method_for_self(VALUE name, VALUE arg, rb_insn_func_t func,
- void (*build)(rb_iseq_t *, LINK_ANCHOR *, const void *))
-{
- VALUE path, realpath;
- accessor_args acc;
-
- acc.arg = arg;
- acc.func = func;
- acc.line = caller_location(&path, &realpath);
- struct rb_iseq_new_with_callback_callback_func *ifunc =
- rb_iseq_new_with_callback_new_callback(build, &acc);
- return rb_iseq_new_with_callback(ifunc,
- rb_sym2str(name), path, realpath,
- INT2FIX(acc.line), 0, ISEQ_TYPE_METHOD, 0);
-}
-
-static void
-for_self_aref(rb_iseq_t *iseq, LINK_ANCHOR *ret, const void *a)
-{
- const accessor_args *const args = (void *)a;
- const int line = args->line;
- struct rb_iseq_constant_body *const body = iseq->body;
-
- iseq_set_local_table(iseq, 0);
- body->param.lead_num = 0;
- body->param.size = 0;
-
- ADD_INSN1(ret, line, putobject, args->arg);
- ADD_INSN1(ret, line, opt_call_c_function, (VALUE)args->func);
-}
-
-static void
-for_self_aset(rb_iseq_t *iseq, LINK_ANCHOR *ret, const void *a)
-{
- const accessor_args *const args = (void *)a;
- const int line = args->line;
- struct rb_iseq_constant_body *const body = iseq->body;
- static const ID vars[] = {1, idUScore};
-
- iseq_set_local_table(iseq, vars);
- body->param.lead_num = 1;
- body->param.size = 1;
-
- ADD_GETLOCAL(ret, line, numberof(vars)-1, 0);
- ADD_INSN1(ret, line, putobject, args->arg);
- ADD_INSN1(ret, line, opt_call_c_function, (VALUE)args->func);
- ADD_INSN(ret, line, pop);
-}
-
-/*
- * func (index) -> (value)
- */
-const rb_iseq_t *
-rb_method_for_self_aref(VALUE name, VALUE arg, rb_insn_func_t func)
-{
- return method_for_self(name, arg, func, for_self_aref);
-}
-
-/*
- * func (index, value) -> (index, value)
- */
-const rb_iseq_t *
-rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func)
-{
- return method_for_self(name, arg, func, for_self_aset);
-}
-
/* ISeq binary format */
#ifndef IBF_ISEQ_DEBUG
@@ -9501,8 +10997,8 @@ typedef unsigned int ibf_offset_t;
#define IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr))
#define IBF_MAJOR_VERSION ISEQ_MAJOR_VERSION
-#if RUBY_DEVEL
-#define IBF_DEVEL_VERSION 2
+#ifdef RUBY_DEVEL
+#define IBF_DEVEL_VERSION 4
#define IBF_MINOR_VERSION (ISEQ_MINOR_VERSION * 10000 + IBF_DEVEL_VERSION)
#else
#define IBF_MINOR_VERSION ISEQ_MINOR_VERSION
@@ -9523,18 +11019,15 @@ struct ibf_header {
struct ibf_dump_buffer {
VALUE str;
- VALUE obj_list; /* [objs] */
+ st_table *obj_table; /* obj -> obj number */
};
struct ibf_dump {
- VALUE iseq_list; /* [iseqs] */
st_table *iseq_table; /* iseq -> iseq number */
struct ibf_dump_buffer global_buffer;
struct ibf_dump_buffer *current_buffer;
};
-rb_iseq_t * iseq_alloc(void);
-
struct ibf_load_buffer {
const char *buff;
ibf_offset_t size;
@@ -9554,6 +11047,85 @@ struct ibf_load {
struct ibf_load_buffer *current_buffer;
};
+struct pinned_list {
+ long size;
+ VALUE * buffer;
+};
+
+static void
+pinned_list_mark(void *ptr)
+{
+ long i;
+ struct pinned_list *list = (struct pinned_list *)ptr;
+ for (i = 0; i < list->size; i++) {
+ if (list->buffer[i]) {
+ rb_gc_mark(list->buffer[i]);
+ }
+ }
+}
+
+static void
+pinned_list_free(void *ptr)
+{
+ struct pinned_list *list = (struct pinned_list *)ptr;
+ xfree(list->buffer);
+ xfree(ptr);
+}
+
+static size_t
+pinned_list_memsize(const void *ptr)
+{
+ struct pinned_list *list = (struct pinned_list *)ptr;
+ return sizeof(struct pinned_list) + (list->size * sizeof(VALUE *));
+}
+
+static const rb_data_type_t pinned_list_type = {
+ "pinned_list",
+ {pinned_list_mark, pinned_list_free, pinned_list_memsize,},
+ 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static VALUE
+pinned_list_fetch(VALUE list, long offset)
+{
+ struct pinned_list * ptr;
+
+ TypedData_Get_Struct(list, struct pinned_list, &pinned_list_type, ptr);
+
+ if (offset >= ptr->size) {
+ rb_raise(rb_eIndexError, "object index out of range: %ld", offset);
+ }
+
+ return ptr->buffer[offset];
+}
+
+static void
+pinned_list_store(VALUE list, long offset, VALUE object)
+{
+ struct pinned_list * ptr;
+
+ TypedData_Get_Struct(list, struct pinned_list, &pinned_list_type, ptr);
+
+ if (offset >= ptr->size) {
+ rb_raise(rb_eIndexError, "object index out of range: %ld", offset);
+ }
+
+ RB_OBJ_WRITE(list, &ptr->buffer[offset], object);
+}
+
+static VALUE
+pinned_list_new(long size)
+{
+ struct pinned_list * ptr;
+ VALUE obj_list =
+ TypedData_Make_Struct(0, struct pinned_list, &pinned_list_type, ptr);
+
+ ptr->buffer = xcalloc(size, sizeof(VALUE));
+ ptr->size = size;
+
+ return obj_list;
+}
+
static ibf_offset_t
ibf_dump_pos(struct ibf_dump *dump)
{
@@ -9649,7 +11221,7 @@ ibf_table_lookup(struct st_table *table, st_data_t key)
}
static int
-ibf_table_index(struct st_table *table, st_data_t key)
+ibf_table_find_or_insert(struct st_table *table, st_data_t key)
{
int index = ibf_table_lookup(table, key);
@@ -9668,26 +11240,19 @@ static void ibf_dump_object_list(struct ibf_dump *dump, ibf_offset_t *obj_list_o
static VALUE ibf_load_object(const struct ibf_load *load, VALUE object_index);
static rb_iseq_t *ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq);
-static VALUE
-ibf_dump_object_list_new(void)
+static st_table *
+ibf_dump_object_table_new(void)
{
- VALUE obj_list = rb_ary_tmp_new(1);
- rb_ary_push(obj_list, Qnil); /* 0th is nil */
+ st_table *obj_table = st_init_numtable(); /* need free */
+ st_insert(obj_table, (st_data_t)Qnil, (st_data_t)0); /* 0th is nil */
- return obj_list;
+ return obj_table;
}
static VALUE
ibf_dump_object(struct ibf_dump *dump, VALUE obj)
{
- VALUE obj_list = dump->current_buffer->obj_list;
- long index = RARRAY_LEN(obj_list);
- long i;
- for (i=0; i<index; i++) {
- if (RARRAY_AREF(obj_list, i) == obj) return (VALUE)i; /* dedup */
- }
- rb_ary_push(obj_list, obj);
- return (VALUE)index;
+ return ibf_table_find_or_insert(dump->current_buffer->obj_table, (st_data_t)obj);
}
static VALUE
@@ -9711,12 +11276,6 @@ ibf_load_id(const struct ibf_load *load, const ID id_index)
/* dump/load: code */
-static VALUE
-ibf_dump_calldata(struct ibf_dump *dump, const struct rb_call_data *cd)
-{
- return (cd->ci.flag & VM_CALL_KWARG) ? Qtrue : Qfalse;
-}
-
static ibf_offset_t ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq);
static int
@@ -9726,28 +11285,10 @@ ibf_dump_iseq(struct ibf_dump *dump, const rb_iseq_t *iseq)
return -1;
}
else {
- int iseq_index = ibf_table_lookup(dump->iseq_table, (st_data_t)iseq);
- if (iseq_index < 0) {
- iseq_index = ibf_table_index(dump->iseq_table, (st_data_t)iseq);
- rb_ary_push(dump->iseq_list, (VALUE)iseq);
- }
- return iseq_index;
+ return ibf_table_find_or_insert(dump->iseq_table, (st_data_t)iseq);
}
}
-static VALUE
-ibf_dump_gentry(struct ibf_dump *dump, const struct rb_global_entry *entry)
-{
- return (VALUE)ibf_dump_id(dump, entry->id);
-}
-
-static VALUE
-ibf_load_gentry(const struct ibf_load *load, const struct rb_global_entry *entry)
-{
- ID gid = ibf_load_id(load, (ID)(VALUE)entry);
- return (VALUE)rb_global_entry(gid);
-}
-
static unsigned char
ibf_load_byte(const struct ibf_load *load, ibf_offset_t *offset)
{
@@ -9770,6 +11311,7 @@ ibf_dump_write_small_value(struct ibf_dump *dump, VALUE x)
{
if (sizeof(VALUE) > 8 || CHAR_BIT != 8) {
ibf_dump_write(dump, &x, sizeof(VALUE));
+ return;
}
enum { max_byte_length = sizeof(VALUE) + 1 };
@@ -9848,14 +11390,13 @@ ibf_load_builtin(const struct ibf_load *load, ibf_offset_t *offset)
const char *name = (char *)ibf_load_ptr(load, offset, len);
if (0) {
- for (int i=0; i<len; i++) fprintf(stderr, "%c", name[i]);
- fprintf(stderr, "!!\n");
+ fprintf(stderr, "%.*s!!\n", len, name);
}
const struct rb_builtin_function *table = GET_VM()->builtin_function_table;
- if (table == NULL) rb_bug("%s: table is not provided.", RUBY_FUNCTION_NAME_STRING);
+ if (table == NULL) rb_raise(rb_eArgError, "builtin function table is not provided");
if (strncmp(table[i].name, name, len) != 0) {
- rb_bug("%s: index (%d) mismatch (expect %s but %s).", RUBY_FUNCTION_NAME_STRING, i, name, table[i].name);
+ rb_raise(rb_eArgError, "builtin function index (%d) mismatch (expect %s but %s)", i, name, table[i].name);
}
// fprintf(stderr, "load-builtin: name:%s(%d)\n", table[i].name, table[i].argc);
@@ -9865,7 +11406,7 @@ ibf_load_builtin(const struct ibf_load *load, ibf_offset_t *offset)
static ibf_offset_t
ibf_dump_code(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const int iseq_size = body->iseq_size;
int code_index;
const VALUE *orig_code = rb_iseq_original_iseq(iseq);
@@ -9895,31 +11436,27 @@ ibf_dump_code(struct ibf_dump *dump, const rb_iseq_t *iseq)
wv = (VALUE)ibf_dump_iseq(dump, (const rb_iseq_t *)op);
break;
case TS_IC:
- case TS_IVC:
+ {
+ IC ic = (IC)op;
+ VALUE arr = idlist_to_array(ic->segments);
+ wv = ibf_dump_object(dump, arr);
+ }
+ break;
case TS_ISE:
+ case TS_IVC:
+ case TS_ICVARC:
{
- unsigned int i;
- for (i=0; i<body->is_size; i++) {
- if (op == (VALUE)&body->is_entries[i]) {
- break;
- }
- }
- wv = (VALUE)i;
+ union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)op;
+ wv = is - ISEQ_IS_ENTRY_START(body, types[op_index]);
}
break;
case TS_CALLDATA:
{
- /* ibf_dump_calldata() always returns either Qtrue or Qfalse */
- char c = ibf_dump_calldata(dump, (const struct rb_call_data *)op) == Qtrue; // 1 or 0
- ibf_dump_write_byte(dump, c);
goto skip_wv;
}
case TS_ID:
wv = ibf_dump_id(dump, (ID)op);
break;
- case TS_GENTRY:
- wv = ibf_dump_gentry(dump, (const struct rb_global_entry *)op);
- break;
case TS_FUNCPTR:
rb_raise(rb_eRuntimeError, "TS_FUNCPTR is not supported");
goto skip_wv;
@@ -9940,75 +11477,130 @@ ibf_dump_code(struct ibf_dump *dump, const rb_iseq_t *iseq)
}
static VALUE *
-ibf_load_code(const struct ibf_load *load, const rb_iseq_t *iseq, ibf_offset_t bytecode_offset, ibf_offset_t bytecode_size, unsigned int iseq_size)
+ibf_load_code(const struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t bytecode_offset, ibf_offset_t bytecode_size, unsigned int iseq_size)
{
+ VALUE iseqv = (VALUE)iseq;
unsigned int code_index;
ibf_offset_t reading_pos = bytecode_offset;
VALUE *code = ALLOC_N(VALUE, iseq_size);
- struct rb_iseq_constant_body *load_body = iseq->body;
+ struct rb_iseq_constant_body *load_body = ISEQ_BODY(iseq);
struct rb_call_data *cd_entries = load_body->call_data;
- struct rb_kwarg_call_data *cd_kw_entries = (struct rb_kwarg_call_data *)&load_body->call_data[load_body->ci_size];
- union iseq_inline_storage_entry *is_entries = load_body->is_entries;
+ int ic_index = 0;
+
+ iseq_bits_t * mark_offset_bits;
+
+ iseq_bits_t tmp[1] = {0};
+
+ if (ISEQ_MBITS_BUFLEN(iseq_size) == 1) {
+ mark_offset_bits = tmp;
+ }
+ else {
+ mark_offset_bits = ZALLOC_N(iseq_bits_t, ISEQ_MBITS_BUFLEN(iseq_size));
+ }
+ bool needs_bitmap = false;
for (code_index=0; code_index<iseq_size;) {
/* opcode */
- const VALUE insn = code[code_index++] = ibf_load_small_value(load, &reading_pos);
+ const VALUE insn = code[code_index] = ibf_load_small_value(load, &reading_pos);
const char *types = insn_op_types(insn);
int op_index;
+ code_index++;
+
/* operands */
for (op_index=0; types[op_index]; op_index++, code_index++) {
- switch (types[op_index]) {
- case TS_CDHASH:
+ const char operand_type = types[op_index];
+ switch (operand_type) {
case TS_VALUE:
{
VALUE op = ibf_load_small_value(load, &reading_pos);
VALUE v = ibf_load_object(load, op);
code[code_index] = v;
if (!SPECIAL_CONST_P(v)) {
- RB_OBJ_WRITTEN(iseq, Qundef, v);
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
+ RB_OBJ_WRITTEN(iseqv, Qundef, v);
+ ISEQ_MBITS_SET(mark_offset_bits, code_index);
+ needs_bitmap = true;
}
break;
}
+ case TS_CDHASH:
+ {
+ VALUE op = ibf_load_small_value(load, &reading_pos);
+ VALUE v = ibf_load_object(load, op);
+ v = rb_hash_dup(v); // hash dumped as frozen
+ RHASH_TBL_RAW(v)->type = &cdhash_type;
+ rb_hash_rehash(v); // hash function changed
+ freeze_hide_obj(v);
+
+ // Overwrite the existing hash in the object list. This
+ // is to keep the object alive during load time.
+ // [Bug #17984] [ruby-core:104259]
+ pinned_list_store(load->current_buffer->obj_list, (long)op, v);
+
+ code[code_index] = v;
+ ISEQ_MBITS_SET(mark_offset_bits, code_index);
+ RB_OBJ_WRITTEN(iseqv, Qundef, v);
+ needs_bitmap = true;
+ break;
+ }
case TS_ISEQ:
{
VALUE op = (VALUE)ibf_load_small_value(load, &reading_pos);
VALUE v = (VALUE)ibf_load_iseq(load, (const rb_iseq_t *)op);
code[code_index] = v;
if (!SPECIAL_CONST_P(v)) {
- RB_OBJ_WRITTEN(iseq, Qundef, v);
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
+ RB_OBJ_WRITTEN(iseqv, Qundef, v);
+ ISEQ_MBITS_SET(mark_offset_bits, code_index);
+ needs_bitmap = true;
}
break;
}
- case TS_ISE:
- FL_SET(iseq, ISEQ_MARKABLE_ISEQ);
- /* fall through */
case TS_IC:
- case TS_IVC:
{
VALUE op = ibf_load_small_value(load, &reading_pos);
- code[code_index] = (VALUE)&is_entries[op];
+ VALUE arr = ibf_load_object(load, op);
+
+ IC ic = &ISEQ_IS_IC_ENTRY(load_body, ic_index++);
+ ic->segments = array_to_idlist(arr);
+
+ code[code_index] = (VALUE)ic;
}
break;
- case TS_CALLDATA:
+ case TS_ISE:
+ case TS_ICVARC:
+ case TS_IVC:
{
- unsigned char op = ibf_load_byte(load, &reading_pos);
- code[code_index] = op ? (VALUE)cd_kw_entries++ : (VALUE)cd_entries++; /* op is 1 (kw) or 0 (!kw) */
+ unsigned int op = (unsigned int)ibf_load_small_value(load, &reading_pos);
+
+ ISE ic = ISEQ_IS_ENTRY_START(load_body, operand_type) + op;
+ code[code_index] = (VALUE)ic;
+
+ if (operand_type == TS_IVC) {
+ IVC cache = (IVC)ic;
+
+ if (insn == BIN(setinstancevariable)) {
+ ID iv_name = (ID)code[code_index - 1];
+ cache->iv_set_name = iv_name;
+ }
+ else {
+ cache->iv_set_name = 0;
+ }
+
+ vm_ic_attr_index_initialize(cache, INVALID_SHAPE_ID);
+ }
+
}
break;
- case TS_ID:
+ case TS_CALLDATA:
{
- VALUE op = ibf_load_small_value(load, &reading_pos);
- code[code_index] = ibf_load_id(load, (ID)(VALUE)op);
+ code[code_index] = (VALUE)cd_entries++;
}
break;
- case TS_GENTRY:
+ case TS_ID:
{
VALUE op = ibf_load_small_value(load, &reading_pos);
- code[code_index] = ibf_load_gentry(load, (const struct rb_global_entry *)(VALUE)op);
+ code[code_index] = ibf_load_id(load, (ID)(VALUE)op);
}
break;
case TS_FUNCPTR:
@@ -10026,9 +11618,23 @@ ibf_load_code(const struct ibf_load *load, const rb_iseq_t *iseq, ibf_offset_t b
rb_raise(rb_eRuntimeError, "operand size mismatch");
}
}
+
load_body->iseq_encoded = code;
load_body->iseq_size = code_index;
+ if (ISEQ_MBITS_BUFLEN(load_body->iseq_size) == 1) {
+ load_body->mark_bits.single = mark_offset_bits[0];
+ }
+ else {
+ if (needs_bitmap) {
+ load_body->mark_bits.list = mark_offset_bits;
+ }
+ else {
+ load_body->mark_bits.list = 0;
+ ruby_xfree(mark_offset_bits);
+ }
+ }
+
assert(code_index == iseq_size);
assert(reading_pos == bytecode_offset + bytecode_size);
return code;
@@ -10037,11 +11643,11 @@ ibf_load_code(const struct ibf_load *load, const rb_iseq_t *iseq, ibf_offset_t b
static ibf_offset_t
ibf_dump_param_opt_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- int opt_num = iseq->body->param.opt_num;
+ int opt_num = ISEQ_BODY(iseq)->param.opt_num;
if (opt_num > 0) {
IBF_W_ALIGN(VALUE);
- return ibf_dump_write(dump, iseq->body->param.opt_table, sizeof(VALUE) * (opt_num + 1));
+ return ibf_dump_write(dump, ISEQ_BODY(iseq)->param.opt_table, sizeof(VALUE) * (opt_num + 1));
}
else {
return ibf_dump_pos(dump);
@@ -10064,7 +11670,7 @@ ibf_load_param_opt_table(const struct ibf_load *load, ibf_offset_t opt_table_off
static ibf_offset_t
ibf_dump_param_keyword(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- const struct rb_iseq_param_keyword *kw = iseq->body->param.keyword;
+ const struct rb_iseq_param_keyword *kw = ISEQ_BODY(iseq)->param.keyword;
if (kw) {
struct rb_iseq_param_keyword dump_kw = *kw;
@@ -10116,11 +11722,14 @@ static ibf_offset_t
ibf_dump_insns_info_body(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
ibf_offset_t offset = ibf_dump_pos(dump);
- const struct iseq_insn_info_entry *entries = iseq->body->insns_info.body;
+ const struct iseq_insn_info_entry *entries = ISEQ_BODY(iseq)->insns_info.body;
unsigned int i;
- for (i = 0; i < iseq->body->insns_info.size; i++) {
+ for (i = 0; i < ISEQ_BODY(iseq)->insns_info.size; i++) {
ibf_dump_write_small_value(dump, entries[i].line_no);
+#ifdef USE_ISEQ_NODE_ID
+ ibf_dump_write_small_value(dump, entries[i].node_id);
+#endif
ibf_dump_write_small_value(dump, entries[i].events);
}
@@ -10136,6 +11745,9 @@ ibf_load_insns_info_body(const struct ibf_load *load, ibf_offset_t body_offset,
unsigned int i;
for (i = 0; i < size; i++) {
entries[i].line_no = (int)ibf_load_small_value(load, &reading_pos);
+#ifdef USE_ISEQ_NODE_ID
+ entries[i].node_id = (int)ibf_load_small_value(load, &reading_pos);
+#endif
entries[i].events = (rb_event_flag_t)ibf_load_small_value(load, &reading_pos);
}
@@ -10176,7 +11788,7 @@ ibf_load_insns_info_positions(const struct ibf_load *load, ibf_offset_t position
static ibf_offset_t
ibf_dump_local_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const int size = body->local_table_size;
ID *table = ALLOCA_N(ID, size);
int i;
@@ -10209,7 +11821,7 @@ ibf_load_local_table(const struct ibf_load *load, ibf_offset_t local_table_offse
static ibf_offset_t
ibf_dump_catch_table(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- const struct iseq_catch_table *table = iseq->body->catch_table;
+ const struct iseq_catch_table *table = ISEQ_BODY(iseq)->catch_table;
if (table) {
int *iseq_indices = ALLOCA_N(int, table->size);
@@ -10248,7 +11860,7 @@ ibf_load_catch_table(const struct ibf_load *load, ibf_offset_t catch_table_offse
unsigned int i;
for (i=0; i<table->size; i++) {
int iseq_index = (int)ibf_load_small_value(load, &reading_pos);
- table->entries[i].type = (enum catch_type)ibf_load_small_value(load, &reading_pos);
+ table->entries[i].type = (enum rb_catch_type)ibf_load_small_value(load, &reading_pos);
table->entries[i].start = (unsigned int)ibf_load_small_value(load, &reading_pos);
table->entries[i].end = (unsigned int)ibf_load_small_value(load, &reading_pos);
table->entries[i].cont = (unsigned int)ibf_load_small_value(load, &reading_pos);
@@ -10266,94 +11878,135 @@ ibf_load_catch_table(const struct ibf_load *load, ibf_offset_t catch_table_offse
static ibf_offset_t
ibf_dump_ci_entries(struct ibf_dump *dump, const rb_iseq_t *iseq)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const unsigned int ci_size = body->ci_size;
- const unsigned int ci_kw_size = body->ci_kw_size;
- const struct rb_call_data *calls = body->call_data;
- const struct rb_kwarg_call_data *kw_calls = (const struct rb_kwarg_call_data *)&body->call_data[ci_size];
+ const struct rb_call_data *cds = body->call_data;
ibf_offset_t offset = ibf_dump_pos(dump);
unsigned int i;
for (i = 0; i < ci_size; i++) {
- VALUE mid = ibf_dump_id(dump, calls[i].ci.mid);
-
- ibf_dump_write_small_value(dump, mid);
- ibf_dump_write_small_value(dump, calls[i].ci.flag);
- ibf_dump_write_small_value(dump, calls[i].ci.orig_argc);
+ const struct rb_callinfo *ci = cds[i].ci;
+ if (ci != NULL) {
+ ibf_dump_write_small_value(dump, ibf_dump_id(dump, vm_ci_mid(ci)));
+ ibf_dump_write_small_value(dump, vm_ci_flag(ci));
+ ibf_dump_write_small_value(dump, vm_ci_argc(ci));
+
+ const struct rb_callinfo_kwarg *kwarg = vm_ci_kwarg(ci);
+ if (kwarg) {
+ int len = kwarg->keyword_len;
+ ibf_dump_write_small_value(dump, len);
+ for (int j=0; j<len; j++) {
+ VALUE keyword = ibf_dump_object(dump, kwarg->keywords[j]);
+ ibf_dump_write_small_value(dump, keyword);
+ }
+ }
+ else {
+ ibf_dump_write_small_value(dump, 0);
+ }
+ }
+ else {
+ // TODO: truncate NULL ci from call_data.
+ ibf_dump_write_small_value(dump, (VALUE)-1);
+ }
}
- for (i = 0; i < ci_kw_size; i++) {
- const struct rb_call_info_kw_arg *kw_arg = kw_calls[i].ci_kw.kw_arg;
+ return offset;
+}
- VALUE mid = ibf_dump_id(dump, kw_calls[i].ci_kw.ci.mid);
+static enum rb_id_table_iterator_result
+dump_outer_variable(ID id, VALUE val, void *dump)
+{
+ ibf_dump_write_small_value(dump, ibf_dump_id(dump, id));
+ ibf_dump_write_small_value(dump, val);
- ibf_dump_write_small_value(dump, mid);
- ibf_dump_write_small_value(dump, kw_calls[i].ci_kw.ci.flag);
- ibf_dump_write_small_value(dump, kw_calls[i].ci_kw.ci.orig_argc);
+ return ID_TABLE_CONTINUE;
+}
- ibf_dump_write_small_value(dump, kw_arg->keyword_len);
+static ibf_offset_t
+ibf_dump_outer_variables(struct ibf_dump *dump, const rb_iseq_t *iseq)
+{
+ struct rb_id_table * ovs = ISEQ_BODY(iseq)->outer_variables;
- int j;
- for (j = 0; j < kw_calls[i].ci_kw.kw_arg->keyword_len; j++) {
- VALUE keyword = ibf_dump_object(dump, kw_arg->keywords[j]); /* kw_arg->keywords[n] is Symbol */
+ ibf_offset_t offset = ibf_dump_pos(dump);
- ibf_dump_write_small_value(dump, keyword);
- }
+ if (ovs) {
+ ibf_dump_write_small_value(dump, (VALUE)rb_id_table_size(ovs));
+ rb_id_table_foreach(ovs, dump_outer_variable, (void *)dump);
+ }
+ else {
+ ibf_dump_write_small_value(dump, (VALUE)0);
}
return offset;
}
/* note that we dump out rb_call_info but load back rb_call_data */
-static struct rb_call_data *
+static void
ibf_load_ci_entries(const struct ibf_load *load,
ibf_offset_t ci_entries_offset,
unsigned int ci_size,
- unsigned int ci_kw_size)
+ struct rb_call_data **cd_ptr)
{
ibf_offset_t reading_pos = ci_entries_offset;
unsigned int i;
- struct rb_call_data *calls =
- rb_xcalloc_mul_add_mul(
- sizeof(struct rb_call_data), ci_size,
- sizeof(struct rb_kwarg_call_data), ci_kw_size);
- struct rb_kwarg_call_data *kw_calls = (struct rb_kwarg_call_data *)&calls[ci_size];
+ struct rb_call_data *cds = ZALLOC_N(struct rb_call_data, ci_size);
+ *cd_ptr = cds;
for (i = 0; i < ci_size; i++) {
VALUE mid_index = ibf_load_small_value(load, &reading_pos);
+ if (mid_index != (VALUE)-1) {
+ ID mid = ibf_load_id(load, mid_index);
+ unsigned int flag = (unsigned int)ibf_load_small_value(load, &reading_pos);
+ unsigned int argc = (unsigned int)ibf_load_small_value(load, &reading_pos);
+
+ struct rb_callinfo_kwarg *kwarg = NULL;
+ int kwlen = (int)ibf_load_small_value(load, &reading_pos);
+ if (kwlen > 0) {
+ kwarg = rb_xmalloc_mul_add(kwlen, sizeof(VALUE), sizeof(struct rb_callinfo_kwarg));
+ kwarg->keyword_len = kwlen;
+ for (int j=0; j<kwlen; j++) {
+ VALUE keyword = ibf_load_small_value(load, &reading_pos);
+ kwarg->keywords[j] = ibf_load_object(load, keyword);
+ }
+ }
- calls[i].ci.mid = ibf_load_id(load, mid_index);
- calls[i].ci.flag = (unsigned int)ibf_load_small_value(load, &reading_pos);
- calls[i].ci.orig_argc = (int)ibf_load_small_value(load, &reading_pos);
+ cds[i].ci = vm_ci_new(mid, flag, argc, kwarg);
+ RB_OBJ_WRITTEN(load->iseq, Qundef, cds[i].ci);
+ cds[i].cc = vm_cc_empty();
+ }
+ else {
+ // NULL ci
+ cds[i].ci = NULL;
+ cds[i].cc = NULL;
+ }
}
+}
- for (i = 0; i < ci_kw_size; i++) {
- VALUE mid_index = ibf_load_small_value(load, &reading_pos);
-
- kw_calls[i].ci_kw.ci.mid = ibf_load_id(load, mid_index);
- kw_calls[i].ci_kw.ci.flag = (unsigned int)ibf_load_small_value(load, &reading_pos);
- kw_calls[i].ci_kw.ci.orig_argc = (int)ibf_load_small_value(load, &reading_pos);
-
- int keyword_len = (int)ibf_load_small_value(load, &reading_pos);
+static struct rb_id_table *
+ibf_load_outer_variables(const struct ibf_load * load, ibf_offset_t outer_variables_offset)
+{
+ ibf_offset_t reading_pos = outer_variables_offset;
- kw_calls[i].ci_kw.kw_arg =
- rb_xmalloc_mul_add(keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg));
+ struct rb_id_table *tbl = NULL;
- kw_calls[i].ci_kw.kw_arg->keyword_len = keyword_len;
+ size_t table_size = (size_t)ibf_load_small_value(load, &reading_pos);
- int j;
- for (j = 0; j < kw_calls[i].ci_kw.kw_arg->keyword_len; j++) {
- VALUE keyword = ibf_load_small_value(load, &reading_pos);
+ if (table_size > 0) {
+ tbl = rb_id_table_create(table_size);
+ }
- kw_calls[i].ci_kw.kw_arg->keywords[j] = ibf_load_object(load, keyword);
- }
+ for (size_t i = 0; i < table_size; i++) {
+ ID key = ibf_load_id(load, (ID)ibf_load_small_value(load, &reading_pos));
+ VALUE value = ibf_load_small_value(load, &reading_pos);
+ if (!key) key = rb_make_temporary_id(i);
+ rb_id_table_insert(tbl, key, value);
}
- return calls;
+ return tbl;
}
static ibf_offset_t
@@ -10363,7 +12016,7 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
unsigned int *positions;
- const struct rb_iseq_constant_body *body = iseq->body;
+ const struct rb_iseq_constant_body *body = ISEQ_BODY(iseq);
const VALUE location_pathobj_index = ibf_dump_object(dump, body->location.pathobj); /* TODO: freeze */
const VALUE location_base_label_index = ibf_dump_object(dump, body->location.base_label);
@@ -10375,7 +12028,7 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
struct ibf_dump_buffer *saved_buffer = dump->current_buffer;
struct ibf_dump_buffer buffer;
buffer.str = rb_str_new(0, 0);
- buffer.obj_list = ibf_dump_object_list_new();
+ buffer.obj_table = ibf_dump_object_table_new();
dump->current_buffer = &buffer;
#endif
@@ -10385,16 +12038,18 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
const ibf_offset_t param_keyword_offset = ibf_dump_param_keyword(dump, iseq);
const ibf_offset_t insns_info_body_offset = ibf_dump_insns_info_body(dump, iseq);
- positions = rb_iseq_insns_info_decode_positions(iseq->body);
+ positions = rb_iseq_insns_info_decode_positions(ISEQ_BODY(iseq));
const ibf_offset_t insns_info_positions_offset = ibf_dump_insns_info_positions(dump, positions, body->insns_info.size);
ruby_xfree(positions);
const ibf_offset_t local_table_offset = ibf_dump_local_table(dump, iseq);
const unsigned int catch_table_size = body->catch_table ? body->catch_table->size : 0;
const ibf_offset_t catch_table_offset = ibf_dump_catch_table(dump, iseq);
- const int parent_iseq_index = ibf_dump_iseq(dump, iseq->body->parent_iseq);
- const int local_iseq_index = ibf_dump_iseq(dump, iseq->body->local_iseq);
+ const int parent_iseq_index = ibf_dump_iseq(dump, ISEQ_BODY(iseq)->parent_iseq);
+ const int local_iseq_index = ibf_dump_iseq(dump, ISEQ_BODY(iseq)->local_iseq);
+ const int mandatory_only_iseq_index = ibf_dump_iseq(dump, ISEQ_BODY(iseq)->mandatory_only_iseq);
const ibf_offset_t ci_entries_offset = ibf_dump_ci_entries(dump, iseq);
+ const ibf_offset_t outer_variables_offset = ibf_dump_outer_variables(dump, iseq);
#if IBF_ISEQ_ENABLE_LOCAL_BUFFER
ibf_offset_t local_obj_list_offset;
@@ -10455,14 +12110,19 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
ibf_dump_write_small_value(dump, IBF_BODY_OFFSET(catch_table_offset));
ibf_dump_write_small_value(dump, parent_iseq_index);
ibf_dump_write_small_value(dump, local_iseq_index);
+ ibf_dump_write_small_value(dump, mandatory_only_iseq_index);
ibf_dump_write_small_value(dump, IBF_BODY_OFFSET(ci_entries_offset));
+ ibf_dump_write_small_value(dump, IBF_BODY_OFFSET(outer_variables_offset));
ibf_dump_write_small_value(dump, body->variable.flip_count);
ibf_dump_write_small_value(dump, body->local_table_size);
- ibf_dump_write_small_value(dump, body->is_size);
+ ibf_dump_write_small_value(dump, body->ivc_size);
+ ibf_dump_write_small_value(dump, body->icvarc_size);
+ ibf_dump_write_small_value(dump, body->ise_size);
+ ibf_dump_write_small_value(dump, body->ic_size);
ibf_dump_write_small_value(dump, body->ci_size);
- ibf_dump_write_small_value(dump, body->ci_kw_size);
ibf_dump_write_small_value(dump, body->stack_max);
ibf_dump_write_small_value(dump, body->catch_except_p);
+ ibf_dump_write_small_value(dump, body->builtin_inline_p);
#undef IBF_BODY_OFFSET
@@ -10480,6 +12140,8 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq)
ibf_dump_write_small_value(dump, local_obj_list_offset);
ibf_dump_write_small_value(dump, local_obj_list_size);
+ st_free_table(buffer.obj_table); // TODO: this leaks in case of exception
+
return offset;
#else
return body_offset;
@@ -10499,7 +12161,7 @@ ibf_load_location_str(const struct ibf_load *load, VALUE str_index)
static void
ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
{
- struct rb_iseq_constant_body *load_body = iseq->body = rb_iseq_constant_body_alloc();
+ struct rb_iseq_constant_body *load_body = ISEQ_BODY(iseq) = rb_iseq_constant_body_alloc();
ibf_offset_t reading_pos = offset;
@@ -10507,17 +12169,16 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
struct ibf_load_buffer *saved_buffer = load->current_buffer;
load->current_buffer = &load->global_buffer;
- const ibf_offset_t iseq_start = ibf_load_small_value(load, &reading_pos);
- const ibf_offset_t iseq_length_bytes = ibf_load_small_value(load, &reading_pos);
- const ibf_offset_t body_offset = ibf_load_small_value(load, &reading_pos);
+ const ibf_offset_t iseq_start = (ibf_offset_t)ibf_load_small_value(load, &reading_pos);
+ const ibf_offset_t iseq_length_bytes = (ibf_offset_t)ibf_load_small_value(load, &reading_pos);
+ const ibf_offset_t body_offset = (ibf_offset_t)ibf_load_small_value(load, &reading_pos);
struct ibf_load_buffer buffer;
buffer.buff = load->global_buffer.buff + iseq_start;
buffer.size = iseq_length_bytes;
- buffer.obj_list_offset = ibf_load_small_value(load, &reading_pos);
- buffer.obj_list_size = ibf_load_small_value(load, &reading_pos);
- buffer.obj_list = rb_ary_tmp_new(buffer.obj_list_size);
- rb_ary_resize(buffer.obj_list, buffer.obj_list_size);
+ buffer.obj_list_offset = (ibf_offset_t)ibf_load_small_value(load, &reading_pos);
+ buffer.obj_list_size = (ibf_offset_t)ibf_load_small_value(load, &reading_pos);
+ buffer.obj_list = pinned_list_new(buffer.obj_list_size);
load->current_buffer = &buffer;
reading_pos = body_offset;
@@ -10546,7 +12207,7 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
const VALUE location_pathobj_index = ibf_load_small_value(load, &reading_pos);
const VALUE location_base_label_index = ibf_load_small_value(load, &reading_pos);
const VALUE location_label_index = ibf_load_small_value(load, &reading_pos);
- const VALUE location_first_lineno = ibf_load_small_value(load, &reading_pos);
+ const int location_first_lineno = (int)ibf_load_small_value(load, &reading_pos);
const int location_node_id = (int)ibf_load_small_value(load, &reading_pos);
const int location_code_location_beg_pos_lineno = (int)ibf_load_small_value(load, &reading_pos);
const int location_code_location_beg_pos_column = (int)ibf_load_small_value(load, &reading_pos);
@@ -10560,14 +12221,55 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
const ibf_offset_t catch_table_offset = (ibf_offset_t)IBF_BODY_OFFSET(ibf_load_small_value(load, &reading_pos));
const int parent_iseq_index = (int)ibf_load_small_value(load, &reading_pos);
const int local_iseq_index = (int)ibf_load_small_value(load, &reading_pos);
+ const int mandatory_only_iseq_index = (int)ibf_load_small_value(load, &reading_pos);
const ibf_offset_t ci_entries_offset = (ibf_offset_t)IBF_BODY_OFFSET(ibf_load_small_value(load, &reading_pos));
+ const ibf_offset_t outer_variables_offset = (ibf_offset_t)IBF_BODY_OFFSET(ibf_load_small_value(load, &reading_pos));
const rb_snum_t variable_flip_count = (rb_snum_t)ibf_load_small_value(load, &reading_pos);
const unsigned int local_table_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
- const unsigned int is_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
+
+ const unsigned int ivc_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
+ const unsigned int icvarc_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
+ const unsigned int ise_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
+ const unsigned int ic_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
+
const unsigned int ci_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
- const unsigned int ci_kw_size = (unsigned int)ibf_load_small_value(load, &reading_pos);
const unsigned int stack_max = (unsigned int)ibf_load_small_value(load, &reading_pos);
const char catch_except_p = (char)ibf_load_small_value(load, &reading_pos);
+ const bool builtin_inline_p = (bool)ibf_load_small_value(load, &reading_pos);
+
+ // setup fname and dummy frame
+ VALUE path = ibf_load_object(load, location_pathobj_index);
+ {
+ VALUE realpath = Qnil;
+
+ if (RB_TYPE_P(path, T_STRING)) {
+ realpath = path = rb_fstring(path);
+ }
+ else if (RB_TYPE_P(path, T_ARRAY)) {
+ VALUE pathobj = path;
+ if (RARRAY_LEN(pathobj) != 2) {
+ rb_raise(rb_eRuntimeError, "path object size mismatch");
+ }
+ path = rb_fstring(RARRAY_AREF(pathobj, 0));
+ realpath = RARRAY_AREF(pathobj, 1);
+ if (!NIL_P(realpath)) {
+ if (!RB_TYPE_P(realpath, T_STRING)) {
+ rb_raise(rb_eArgError, "unexpected realpath %"PRIxVALUE
+ "(%x), path=%+"PRIsVALUE,
+ realpath, TYPE(realpath), path);
+ }
+ realpath = rb_fstring(realpath);
+ }
+ }
+ else {
+ rb_raise(rb_eRuntimeError, "unexpected path object");
+ }
+ rb_iseq_pathobj_set(iseq, path, realpath);
+ }
+
+ // push dummy frame
+ rb_execution_context_t *ec = GET_EC();
+ VALUE dummy_frame = rb_vm_push_frame_fname(ec, path);
#undef IBF_BODY_OFFSET
@@ -10591,14 +12293,13 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
load_body->param.post_num = param_post_num;
load_body->param.block_start = param_block_start;
load_body->local_table_size = local_table_size;
- load_body->is_size = is_size;
load_body->ci_size = ci_size;
- load_body->ci_kw_size = ci_kw_size;
load_body->insns_info.size = insns_info_size;
ISEQ_COVERAGE_SET(iseq, Qnil);
ISEQ_ORIGINAL_ISEQ_CLEAR(iseq);
- iseq->body->variable.flip_count = variable_flip_count;
+ load_body->variable.flip_count = variable_flip_count;
+ load_body->variable.script_lines = Qnil;
load_body->location.first_lineno = location_first_lineno;
load_body->location.node_id = location_node_id;
@@ -10607,9 +12308,15 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
load_body->location.code_location.end_pos.lineno = location_code_location_end_pos_lineno;
load_body->location.code_location.end_pos.column = location_code_location_end_pos_column;
load_body->catch_except_p = catch_except_p;
-
- load_body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, is_size);
- load_body->call_data = ibf_load_ci_entries(load, ci_entries_offset, ci_size, ci_kw_size);
+ load_body->builtin_inline_p = builtin_inline_p;
+
+ load_body->ivc_size = ivc_size;
+ load_body->icvarc_size = icvarc_size;
+ load_body->ise_size = ise_size;
+ load_body->ic_size = ic_size;
+ load_body->is_entries = ZALLOC_N(union iseq_inline_storage_entry, ISEQ_IS_SIZE(load_body));
+ ibf_load_ci_entries(load, ci_entries_offset, ci_size, &load_body->call_data);
+ load_body->outer_variables = ibf_load_outer_variables(load, outer_variables_offset);
load_body->param.opt_table = ibf_load_param_opt_table(load, param_opt_table_offset, param_opt_num);
load_body->param.keyword = ibf_load_param_keyword(load, param_keyword_offset);
load_body->param.flags.has_kw = (param_flags >> 4) & 1;
@@ -10619,6 +12326,7 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
load_body->catch_table = ibf_load_catch_table(load, catch_table_offset, catch_table_size);
load_body->parent_iseq = ibf_load_iseq(load, (const rb_iseq_t *)(VALUE)parent_iseq_index);
load_body->local_iseq = ibf_load_iseq(load, (const rb_iseq_t *)(VALUE)local_iseq_index);
+ load_body->mandatory_only_iseq = ibf_load_iseq(load, (const rb_iseq_t *)(VALUE)mandatory_only_iseq_index);
ibf_load_code(load, iseq, bytecode_offset, bytecode_size, iseq_size);
#if VM_INSN_INFO_TABLE_IMPL == 2
@@ -10631,33 +12339,6 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
load->current_buffer = &load->global_buffer;
#endif
- {
- VALUE realpath = Qnil, path = ibf_load_object(load, location_pathobj_index);
- if (RB_TYPE_P(path, T_STRING)) {
- realpath = path = rb_fstring(path);
- }
- else if (RB_TYPE_P(path, T_ARRAY)) {
- VALUE pathobj = path;
- if (RARRAY_LEN(pathobj) != 2) {
- rb_raise(rb_eRuntimeError, "path object size mismatch");
- }
- path = rb_fstring(RARRAY_AREF(pathobj, 0));
- realpath = RARRAY_AREF(pathobj, 1);
- if (!NIL_P(realpath)) {
- if (!RB_TYPE_P(realpath, T_STRING)) {
- rb_raise(rb_eArgError, "unexpected realpath %"PRIxVALUE
- "(%x), path=%+"PRIsVALUE,
- realpath, TYPE(realpath), path);
- }
- realpath = rb_fstring(realpath);
- }
- }
- else {
- rb_raise(rb_eRuntimeError, "unexpected path object");
- }
- rb_iseq_pathobj_set(iseq, path, realpath);
- }
-
RB_OBJ_WRITE(iseq, &load_body->location.base_label, ibf_load_location_str(load, location_base_label_index));
RB_OBJ_WRITE(iseq, &load_body->location.label, ibf_load_location_str(load, location_label_index));
@@ -10665,24 +12346,46 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
load->current_buffer = saved_buffer;
#endif
verify_call_cache(iseq);
+
+ RB_GC_GUARD(dummy_frame);
+ rb_vm_pop_frame_no_int(ec);
+}
+
+struct ibf_dump_iseq_list_arg
+{
+ struct ibf_dump *dump;
+ VALUE offset_list;
+};
+
+static int
+ibf_dump_iseq_list_i(st_data_t key, st_data_t val, st_data_t ptr)
+{
+ const rb_iseq_t *iseq = (const rb_iseq_t *)key;
+ struct ibf_dump_iseq_list_arg *args = (struct ibf_dump_iseq_list_arg *)ptr;
+
+ ibf_offset_t offset = ibf_dump_iseq_each(args->dump, iseq);
+ rb_ary_push(args->offset_list, UINT2NUM(offset));
+
+ return ST_CONTINUE;
}
static void
ibf_dump_iseq_list(struct ibf_dump *dump, struct ibf_header *header)
{
- VALUE list = rb_ary_tmp_new(RARRAY_LEN(dump->iseq_list));
- long i;
+ VALUE offset_list = rb_ary_hidden_new(dump->iseq_table->num_entries);
- for (i = 0; i < RARRAY_LEN(dump->iseq_list); i++) {
- ibf_offset_t offset = ibf_dump_iseq_each(dump, (rb_iseq_t *)RARRAY_AREF(dump->iseq_list, i));
- rb_ary_push(list, UINT2NUM(offset));
- }
+ struct ibf_dump_iseq_list_arg args;
+ args.dump = dump;
+ args.offset_list = offset_list;
+
+ st_foreach(dump->iseq_table, ibf_dump_iseq_list_i, (st_data_t)&args);
- long size = RARRAY_LEN(dump->iseq_list);
+ st_index_t i;
+ st_index_t size = dump->iseq_table->num_entries;
ibf_offset_t *offsets = ALLOCA_N(ibf_offset_t, size);
for (i = 0; i < size; i++) {
- offsets[i] = NUM2UINT(RARRAY_AREF(list, i));
+ offsets[i] = NUM2UINT(RARRAY_AREF(offset_list, i));
}
ibf_dump_align(dump, sizeof(ibf_offset_t));
@@ -10711,6 +12414,7 @@ enum ibf_object_class_index {
IBF_OBJECT_CLASS_STANDARD_ERROR,
IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_ERROR,
IBF_OBJECT_CLASS_TYPE_ERROR,
+ IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_KEY_ERROR,
};
struct ibf_object_regexp {
@@ -10757,7 +12461,7 @@ static const void *
ibf_load_check_offset(const struct ibf_load *load, size_t offset)
{
if (offset >= load->current_buffer->size) {
- rb_raise(rb_eIndexError, "object offset out of range: %"PRIdSIZE, offset);
+ rb_raise(rb_eIndexError, "object offset out of range: %"PRIdSIZE, offset);
}
return load->current_buffer->buff + offset;
}
@@ -10772,11 +12476,13 @@ ibf_dump_object_unsupported(struct ibf_dump *dump, VALUE obj)
rb_raise(rb_eNotImpError, "ibf_dump_object_unsupported: %s", buff);
}
+NORETURN(static VALUE ibf_load_object_unsupported(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset));
+
static VALUE
ibf_load_object_unsupported(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
{
rb_raise(rb_eArgError, "unsupported");
- return Qnil;
+ UNREACHABLE_RETURN(Qnil);
}
static void
@@ -10798,6 +12504,9 @@ ibf_dump_object_class(struct ibf_dump *dump, VALUE obj)
else if (obj == rb_eTypeError) {
cindex = IBF_OBJECT_CLASS_TYPE_ERROR;
}
+ else if (obj == rb_eNoMatchingPatternKeyError) {
+ cindex = IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_KEY_ERROR;
+ }
else {
rb_obj_info_dump(obj);
rb_p(obj);
@@ -10813,15 +12522,17 @@ ibf_load_object_class(const struct ibf_load *load, const struct ibf_object_heade
switch (cindex) {
case IBF_OBJECT_CLASS_OBJECT:
- return rb_cObject;
+ return rb_cObject;
case IBF_OBJECT_CLASS_ARRAY:
- return rb_cArray;
+ return rb_cArray;
case IBF_OBJECT_CLASS_STANDARD_ERROR:
- return rb_eStandardError;
+ return rb_eStandardError;
case IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_ERROR:
return rb_eNoMatchingPatternError;
case IBF_OBJECT_CLASS_TYPE_ERROR:
return rb_eTypeError;
+ case IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_KEY_ERROR:
+ return rb_eNoMatchingPatternKeyError;
}
rb_raise(rb_eArgError, "ibf_load_object_class: unknown class (%d)", (int)cindex);
@@ -10869,17 +12580,21 @@ ibf_load_object_string(const struct ibf_load *load, const struct ibf_object_head
const long len = (long)ibf_load_small_value(load, &reading_pos);
const char *ptr = load->current_buffer->buff + reading_pos;
- VALUE str = rb_str_new(ptr, len);
-
if (encindex > RUBY_ENCINDEX_BUILTIN_MAX) {
VALUE enc_name_str = ibf_load_object(load, encindex - RUBY_ENCINDEX_BUILTIN_MAX);
encindex = rb_enc_find_index(RSTRING_PTR(enc_name_str));
}
- rb_enc_associate_index(str, encindex);
- if (header->internal) rb_obj_hide(str);
- if (header->frozen) str = rb_fstring(str);
+ VALUE str;
+ if (header->frozen && !header->internal) {
+ str = rb_enc_interned_str(ptr, len, rb_enc_from_index(encindex));
+ }
+ else {
+ str = rb_enc_str_new(ptr, len, rb_enc_from_index(encindex));
+ if (header->internal) rb_obj_hide(str);
+ if (header->frozen) str = rb_fstring(str);
+ }
return str;
}
@@ -10929,7 +12644,7 @@ ibf_load_object_array(const struct ibf_load *load, const struct ibf_object_heade
const long len = (long)ibf_load_small_value(load, &reading_pos);
- VALUE ary = rb_ary_new_capa(len);
+ VALUE ary = header->internal ? rb_ary_hidden_new(len) : rb_ary_new_capa(len);
int i;
for (i=0; i<len; i++) {
@@ -10937,8 +12652,7 @@ ibf_load_object_array(const struct ibf_load *load, const struct ibf_object_heade
rb_ary_push(ary, ibf_load_object(load, index));
}
- if (header->internal) rb_obj_hide(ary);
- if (header->frozen) rb_obj_freeze(ary);
+ if (header->frozen) rb_obj_freeze(ary);
return ary;
}
@@ -11041,7 +12755,7 @@ ibf_load_object_bignum(const struct ibf_load *load, const struct ibf_object_head
int sign = bignum->slen > 0;
ssize_t len = sign > 0 ? bignum->slen : -1 * bignum->slen;
VALUE obj = rb_integer_unpack(bignum->digits, len * 2, 2, 0,
- INTEGER_PACK_LITTLE_ENDIAN | (sign == 0 ? INTEGER_PACK_NEGATIVE : 0));
+ INTEGER_PACK_LITTLE_ENDIAN | (sign == 0 ? INTEGER_PACK_NEGATIVE : 0));
if (header->internal) rb_obj_hide(obj);
if (header->frozen) rb_obj_freeze(obj);
return obj;
@@ -11111,18 +12825,24 @@ ibf_load_object_complex_rational(const struct ibf_load *load, const struct ibf_o
static void
ibf_dump_object_symbol(struct ibf_dump *dump, VALUE obj)
{
- VALUE str = rb_sym2str(obj);
- VALUE str_index = ibf_dump_object(dump, str);
-
- ibf_dump_write_small_value(dump, str_index);
+ ibf_dump_object_string(dump, rb_sym2str(obj));
}
static VALUE
ibf_load_object_symbol(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)
{
- VALUE str_index = ibf_load_small_value(load, &offset);
- VALUE str = ibf_load_object(load, str_index);
- ID id = rb_intern_str(str);
+ ibf_offset_t reading_pos = offset;
+
+ int encindex = (int)ibf_load_small_value(load, &reading_pos);
+ const long len = (long)ibf_load_small_value(load, &reading_pos);
+ const char *ptr = load->current_buffer->buff + reading_pos;
+
+ if (encindex > RUBY_ENCINDEX_BUILTIN_MAX) {
+ VALUE enc_name_str = ibf_load_object(load, encindex - RUBY_ENCINDEX_BUILTIN_MAX);
+ encindex = rb_enc_find_index(RSTRING_PTR(enc_name_str));
+ }
+
+ ID id = rb_intern3(ptr, len, rb_enc_from_index(encindex));
return ID2SYM(id);
}
@@ -11189,7 +12909,7 @@ ibf_load_object_object_header(const struct ibf_load *load, ibf_offset_t *offset)
}
static ibf_offset_t
-ibf_dump_object_object(struct ibf_dump *dump, VALUE obj_list, VALUE obj)
+ibf_dump_object_object(struct ibf_dump *dump, VALUE obj)
{
struct ibf_object_header obj_header;
ibf_offset_t current_offset;
@@ -11199,12 +12919,9 @@ ibf_dump_object_object(struct ibf_dump *dump, VALUE obj_list, VALUE obj)
IBF_W_ALIGN(ibf_offset_t);
current_offset = ibf_dump_pos(dump);
- if (SPECIAL_CONST_P(obj)) {
- if (RB_TYPE_P(obj, T_SYMBOL) ||
- RB_TYPE_P(obj, T_FLOAT)) {
- obj_header.internal = FALSE;
- goto dump_object;
- }
+ if (SPECIAL_CONST_P(obj) &&
+ ! (SYMBOL_P(obj) ||
+ RB_FLOAT_TYPE_P(obj))) {
obj_header.special_const = TRUE;
obj_header.frozen = TRUE;
obj_header.internal = TRUE;
@@ -11212,8 +12929,7 @@ ibf_dump_object_object(struct ibf_dump *dump, VALUE obj_list, VALUE obj)
ibf_dump_write_small_value(dump, obj);
}
else {
- obj_header.internal = (RBASIC_CLASS(obj) == 0) ? TRUE : FALSE;
- dump_object:
+ obj_header.internal = SPECIAL_CONST_P(obj) ? FALSE : (RBASIC_CLASS(obj) == 0) ? TRUE : FALSE;
obj_header.special_const = FALSE;
obj_header.frozen = FL_TEST(obj, FL_FREEZE) ? TRUE : FALSE;
ibf_dump_object_object_header(dump, obj_header);
@@ -11265,12 +12981,9 @@ ibf_load_object(const struct ibf_load *load, VALUE object_index)
if (object_index == 0) {
return Qnil;
}
- else if (object_index >= (VALUE)RARRAY_LEN(load->current_buffer->obj_list)) {
- rb_raise(rb_eIndexError, "object index out of range: %"PRIdVALUE, object_index);
- }
else {
- VALUE obj = rb_ary_entry(load->current_buffer->obj_list, (long)object_index);
- if (obj == Qnil) { /* TODO: avoid multiple Qnil load */
+ VALUE obj = pinned_list_fetch(load->current_buffer->obj_list, (long)object_index);
+ if (!obj) {
ibf_offset_t *offsets = (ibf_offset_t *)(load->current_buffer->obj_list_offset + load->current_buffer->buff);
ibf_offset_t offset = offsets[object_index];
const struct ibf_object_header header = ibf_load_object_object_header(load, &offset);
@@ -11294,7 +13007,7 @@ ibf_load_object(const struct ibf_load *load, VALUE object_index)
obj = (*load_object_functions[header.type])(load, &header, offset);
}
- rb_ary_store(load->current_buffer->obj_list, (long)object_index, obj);
+ pinned_list_store(load->current_buffer->obj_list, (long)object_index, obj);
}
#if IBF_ISEQ_DEBUG
fprintf(stderr, "ibf_load_object: index=%#"PRIxVALUE" obj=%#"PRIxVALUE"\n",
@@ -11304,28 +13017,48 @@ ibf_load_object(const struct ibf_load *load, VALUE object_index)
}
}
+struct ibf_dump_object_list_arg
+{
+ struct ibf_dump *dump;
+ VALUE offset_list;
+};
+
+static int
+ibf_dump_object_list_i(st_data_t key, st_data_t val, st_data_t ptr)
+{
+ VALUE obj = (VALUE)key;
+ struct ibf_dump_object_list_arg *args = (struct ibf_dump_object_list_arg *)ptr;
+
+ ibf_offset_t offset = ibf_dump_object_object(args->dump, obj);
+ rb_ary_push(args->offset_list, UINT2NUM(offset));
+
+ return ST_CONTINUE;
+}
+
static void
ibf_dump_object_list(struct ibf_dump *dump, ibf_offset_t *obj_list_offset, unsigned int *obj_list_size)
{
- VALUE obj_list = dump->current_buffer->obj_list;
- VALUE list = rb_ary_tmp_new(RARRAY_LEN(obj_list));
- int i, size;
+ st_table *obj_table = dump->current_buffer->obj_table;
+ VALUE offset_list = rb_ary_hidden_new(obj_table->num_entries);
+
+ struct ibf_dump_object_list_arg args;
+ args.dump = dump;
+ args.offset_list = offset_list;
+
+ st_foreach(obj_table, ibf_dump_object_list_i, (st_data_t)&args);
- for (i=0; i<RARRAY_LEN(obj_list); i++) {
- VALUE obj = RARRAY_AREF(obj_list, i);
- ibf_offset_t offset = ibf_dump_object_object(dump, obj_list, obj);
- rb_ary_push(list, UINT2NUM(offset));
- }
- size = i;
IBF_W_ALIGN(ibf_offset_t);
*obj_list_offset = ibf_dump_pos(dump);
+ st_index_t size = obj_table->num_entries;
+ st_index_t i;
+
for (i=0; i<size; i++) {
- ibf_offset_t offset = NUM2UINT(RARRAY_AREF(list, i));
+ ibf_offset_t offset = NUM2UINT(RARRAY_AREF(offset_list, i));
IBF_WV(offset);
}
- *obj_list_size = size;
+ *obj_list_size = (unsigned int)size;
}
static void
@@ -11333,14 +13066,19 @@ ibf_dump_mark(void *ptr)
{
struct ibf_dump *dump = (struct ibf_dump *)ptr;
rb_gc_mark(dump->global_buffer.str);
- rb_gc_mark(dump->global_buffer.obj_list);
- rb_gc_mark(dump->iseq_list);
+
+ rb_mark_set(dump->global_buffer.obj_table);
+ rb_mark_set(dump->iseq_table);
}
static void
ibf_dump_free(void *ptr)
{
struct ibf_dump *dump = (struct ibf_dump *)ptr;
+ if (dump->global_buffer.obj_table) {
+ st_free_table(dump->global_buffer.obj_table);
+ dump->global_buffer.obj_table = 0;
+ }
if (dump->iseq_table) {
st_free_table(dump->iseq_table);
dump->iseq_table = 0;
@@ -11354,21 +13092,24 @@ ibf_dump_memsize(const void *ptr)
struct ibf_dump *dump = (struct ibf_dump *)ptr;
size_t size = sizeof(*dump);
if (dump->iseq_table) size += st_memsize(dump->iseq_table);
+ if (dump->global_buffer.obj_table) size += st_memsize(dump->global_buffer.obj_table);
return size;
}
static const rb_data_type_t ibf_dump_type = {
"ibf_dump",
{ibf_dump_mark, ibf_dump_free, ibf_dump_memsize,},
- 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
static void
ibf_dump_setup(struct ibf_dump *dump, VALUE dumper_obj)
{
- RB_OBJ_WRITE(dumper_obj, &dump->iseq_list, rb_ary_tmp_new(0));
- RB_OBJ_WRITE(dumper_obj, &dump->global_buffer.obj_list, ibf_dump_object_list_new());
+ dump->global_buffer.obj_table = NULL; // GC may run before a value is assigned
+ dump->iseq_table = NULL;
+
RB_OBJ_WRITE(dumper_obj, &dump->global_buffer.str, rb_str_new(0, 0));
+ dump->global_buffer.obj_table = ibf_dump_object_table_new();
dump->iseq_table = st_init_numtable(); /* need free */
dump->current_buffer = &dump->global_buffer;
@@ -11382,8 +13123,8 @@ rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
VALUE dump_obj;
VALUE str;
- if (iseq->body->parent_iseq != NULL ||
- iseq->body->local_iseq != iseq) {
+ if (ISEQ_BODY(iseq)->parent_iseq != NULL ||
+ ISEQ_BODY(iseq)->local_iseq != iseq) {
rb_raise(rb_eRuntimeError, "should be top of iseq");
}
if (RTEST(ISEQ_COVERAGE(iseq))) {
@@ -11441,18 +13182,18 @@ rb_ibf_load_iseq_complete(rb_iseq_t *iseq)
load->iseq = iseq;
#if IBF_ISEQ_DEBUG
fprintf(stderr, "rb_ibf_load_iseq_complete: index=%#x offset=%#x size=%#x\n",
- iseq->aux.loader.index, offset,
- load->header->size);
+ iseq->aux.loader.index, offset,
+ load->header->size);
#endif
ibf_load_iseq_each(load, iseq, offset);
ISEQ_COMPILE_DATA_CLEAR(iseq);
- FL_UNSET(iseq, ISEQ_NOT_LOADED_YET);
+ FL_UNSET((VALUE)iseq, ISEQ_NOT_LOADED_YET);
rb_iseq_init_trace(iseq);
load->iseq = prev_src_iseq;
}
#if USE_LAZY_LOAD
-const rb_iseq_t *
+MJIT_FUNC_EXPORTED const rb_iseq_t *
rb_iseq_complete(const rb_iseq_t *iseq)
{
rb_ibf_load_iseq_complete((rb_iseq_t *)iseq);
@@ -11467,47 +13208,51 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
#if IBF_ISEQ_DEBUG
fprintf(stderr, "ibf_load_iseq: index_iseq=%p iseq_list=%p\n",
- (void *)index_iseq, (void *)load->iseq_list);
+ (void *)index_iseq, (void *)load->iseq_list);
#endif
if (iseq_index == -1) {
- return NULL;
+ return NULL;
}
else {
- VALUE iseqv = rb_ary_entry(load->iseq_list, iseq_index);
+ VALUE iseqv = pinned_list_fetch(load->iseq_list, iseq_index);
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: iseqv=%p\n", (void *)iseqv);
+ fprintf(stderr, "ibf_load_iseq: iseqv=%p\n", (void *)iseqv);
#endif
- if (iseqv != Qnil) {
- return (rb_iseq_t *)iseqv;
- }
- else {
- rb_iseq_t *iseq = iseq_imemo_alloc();
+ if (iseqv) {
+ return (rb_iseq_t *)iseqv;
+ }
+ else {
+ rb_iseq_t *iseq = iseq_imemo_alloc();
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: new iseq=%p\n", (void *)iseq);
+ fprintf(stderr, "ibf_load_iseq: new iseq=%p\n", (void *)iseq);
#endif
- FL_SET(iseq, ISEQ_NOT_LOADED_YET);
- iseq->aux.loader.obj = load->loader_obj;
- iseq->aux.loader.index = iseq_index;
+ FL_SET((VALUE)iseq, ISEQ_NOT_LOADED_YET);
+ iseq->aux.loader.obj = load->loader_obj;
+ iseq->aux.loader.index = iseq_index;
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: iseq=%p loader_obj=%p index=%d\n",
- (void *)iseq, (void *)load->loader_obj, iseq_index);
+ fprintf(stderr, "ibf_load_iseq: iseq=%p loader_obj=%p index=%d\n",
+ (void *)iseq, (void *)load->loader_obj, iseq_index);
#endif
- rb_ary_store(load->iseq_list, iseq_index, (VALUE)iseq);
+ pinned_list_store(load->iseq_list, iseq_index, (VALUE)iseq);
#if !USE_LAZY_LOAD
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq);
+ fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq);
#endif
- rb_ibf_load_iseq_complete(iseq);
+ rb_ibf_load_iseq_complete(iseq);
+#else
+ if (GET_VM()->builtin_function_table) {
+ rb_ibf_load_iseq_complete(iseq);
+ }
#endif /* !USE_LAZY_LOAD */
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: iseq=%p loaded %p\n",
- (void *)iseq, (void *)load->iseq);
+ fprintf(stderr, "ibf_load_iseq: iseq=%p loaded %p\n",
+ (void *)iseq, (void *)load->iseq);
#endif
- return iseq;
- }
+ return iseq;
+ }
}
}
@@ -11520,26 +13265,25 @@ ibf_load_setup_bytes(struct ibf_load *load, VALUE loader_obj, const char *bytes,
load->global_buffer.size = load->header->size;
load->global_buffer.obj_list_offset = load->header->global_object_list_offset;
load->global_buffer.obj_list_size = load->header->global_object_list_size;
- RB_OBJ_WRITE(loader_obj, &load->iseq_list, rb_ary_tmp_new(0));
- RB_OBJ_WRITE(loader_obj, &load->global_buffer.obj_list, rb_ary_tmp_new(load->global_buffer.obj_list_size));
- rb_ary_resize(load->global_buffer.obj_list, load->global_buffer.obj_list_size);
+ RB_OBJ_WRITE(loader_obj, &load->iseq_list, pinned_list_new(load->header->iseq_list_size));
+ RB_OBJ_WRITE(loader_obj, &load->global_buffer.obj_list, pinned_list_new(load->global_buffer.obj_list_size));
load->iseq = NULL;
load->current_buffer = &load->global_buffer;
if (size < load->header->size) {
- rb_raise(rb_eRuntimeError, "broken binary format");
+ rb_raise(rb_eRuntimeError, "broken binary format");
}
if (strncmp(load->header->magic, "YARB", 4) != 0) {
- rb_raise(rb_eRuntimeError, "unknown binary format");
+ rb_raise(rb_eRuntimeError, "unknown binary format");
}
if (load->header->major_version != IBF_MAJOR_VERSION ||
- load->header->minor_version != IBF_MINOR_VERSION) {
- rb_raise(rb_eRuntimeError, "unmatched version file (%u.%u for %u.%u)",
- load->header->major_version, load->header->minor_version, IBF_MAJOR_VERSION, IBF_MINOR_VERSION);
+ load->header->minor_version != IBF_MINOR_VERSION) {
+ rb_raise(rb_eRuntimeError, "unmatched version file (%u.%u for %u.%u)",
+ load->header->major_version, load->header->minor_version, IBF_MAJOR_VERSION, IBF_MINOR_VERSION);
}
if (strcmp(load->global_buffer.buff + sizeof(struct ibf_header), RUBY_PLATFORM) != 0) {
- rb_raise(rb_eRuntimeError, "unmatched platform");
+ rb_raise(rb_eRuntimeError, "unmatched platform");
}
if (load->header->iseq_list_offset % RUBY_ALIGNOF(ibf_offset_t)) {
rb_raise(rb_eArgError, "unaligned iseq list offset: %u",
diff --git a/complex.c b/complex.c
index cdd5edc50a..a227cb0a58 100644
--- a/complex.c
+++ b/complex.c
@@ -5,16 +5,25 @@
which is written in ruby.
*/
-#include "ruby/config.h"
+#include "ruby/internal/config.h"
+
#if defined _MSC_VER
/* Microsoft Visual C does not define M_PI and others by default */
# define _USE_MATH_DEFINES 1
#endif
+
+#include <ctype.h>
#include <math.h>
-#include "internal.h"
-#include "id.h"
-#define NDEBUG
+#include "id.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/class.h"
+#include "internal/complex.h"
+#include "internal/math.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/rational.h"
#include "ruby_assert.h"
#define ZERO INT2FIX(0)
@@ -25,10 +34,6 @@
#else
static VALUE RFLOAT_0;
#endif
-#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun) && \
- !defined(signbit)
-extern int signbit(double);
-#endif
VALUE rb_cComplex;
@@ -45,8 +50,6 @@ static ID id_abs, id_arg,
#define id_quo idQuo
#define id_fdiv idFdiv
-#define f_boolcast(x) ((x) ? Qtrue : Qfalse)
-
#define fun1(n) \
inline static VALUE \
f_##n(VALUE x)\
@@ -94,7 +97,7 @@ inline static VALUE
f_div(VALUE x, VALUE y)
{
if (FIXNUM_P(y) && FIX2LONG(y) == 1)
- return x;
+ return x;
return rb_funcall(x, '/', 1, y);
}
@@ -149,7 +152,7 @@ f_sub(VALUE x, VALUE y)
{
if (FIXNUM_ZERO_P(y) &&
LIKELY(rb_method_basic_definition_p(CLASS_OF(x), idMINUS))) {
- return x;
+ return x;
}
return rb_funcall(x, '-', 1, y);
}
@@ -259,7 +262,7 @@ inline static VALUE
f_to_i(VALUE x)
{
if (RB_TYPE_P(x, T_STRING))
- return rb_str_to_inum(x, 10, 0);
+ return rb_str_to_inum(x, 10, 0);
return rb_funcall(x, id_to_i, 0);
}
@@ -267,7 +270,7 @@ inline static VALUE
f_to_f(VALUE x)
{
if (RB_TYPE_P(x, T_STRING))
- return DBL2NUM(rb_str_to_dbl(x, 0));
+ return DBL2NUM(rb_str_to_dbl(x, 0));
return rb_funcall(x, id_to_f, 0);
}
@@ -277,9 +280,9 @@ inline static int
f_eqeq_p(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y))
- return x == y;
+ return x == y;
else if (RB_FLOAT_TYPE_P(x) || RB_FLOAT_TYPE_P(y))
- return NUM2DBL(x) == NUM2DBL(y);
+ return NUM2DBL(x) == NUM2DBL(y);
return (int)rb_equal(x, y);
}
@@ -313,7 +316,7 @@ f_negative_p(VALUE x)
#define f_positive_p(x) (!f_negative_p(x))
-inline static int
+inline static bool
f_zero_p(VALUE x)
{
if (RB_FLOAT_TYPE_P(x)) {
@@ -326,41 +329,41 @@ f_zero_p(VALUE x)
const VALUE num = RRATIONAL(x)->num;
return FIXNUM_ZERO_P(num);
}
- return (int)rb_equal(x, ZERO);
+ return rb_equal(x, ZERO) != 0;
}
#define f_nonzero_p(x) (!f_zero_p(x))
-VALUE rb_flo_is_finite_p(VALUE num);
+static inline bool
+always_finite_type_p(VALUE x)
+{
+ if (FIXNUM_P(x)) return true;
+ if (FLONUM_P(x)) return true; /* Infinity can't be a flonum */
+ return (RB_INTEGER_TYPE_P(x) || RB_TYPE_P(x, T_RATIONAL));
+}
+
inline static int
f_finite_p(VALUE x)
{
- if (RB_INTEGER_TYPE_P(x)) {
+ if (always_finite_type_p(x)) {
return TRUE;
}
else if (RB_FLOAT_TYPE_P(x)) {
- return (int)rb_flo_is_finite_p(x);
- }
- else if (RB_TYPE_P(x, T_RATIONAL)) {
- return TRUE;
+ return isfinite(RFLOAT_VALUE(x));
}
return RTEST(rb_funcallv(x, id_finite_p, 0, 0));
}
-VALUE rb_flo_is_infinite_p(VALUE num);
-inline static VALUE
+inline static int
f_infinite_p(VALUE x)
{
- if (RB_INTEGER_TYPE_P(x)) {
- return Qnil;
+ if (always_finite_type_p(x)) {
+ return FALSE;
}
else if (RB_FLOAT_TYPE_P(x)) {
- return rb_flo_is_infinite_p(x);
+ return isinf(RFLOAT_VALUE(x));
}
- else if (RB_TYPE_P(x, T_RATIONAL)) {
- return Qnil;
- }
- return rb_funcallv(x, id_infinite_p, 0, 0);
+ return RTEST(rb_funcallv(x, id_infinite_p, 0, 0));
}
inline static int
@@ -392,7 +395,7 @@ nucomp_s_new_internal(VALUE klass, VALUE real, VALUE imag)
RCOMPLEX_SET_REAL(obj, real);
RCOMPLEX_SET_IMAG(obj, imag);
- OBJ_FREEZE_RAW(obj);
+ OBJ_FREEZE_RAW((VALUE)obj);
return (VALUE)obj;
}
@@ -418,62 +421,53 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y)
return nucomp_s_new_internal(klass, x, y);
}
-#ifdef CANONICALIZATION_FOR_MATHN
-static int canonicalization = 0;
-
-RUBY_FUNC_EXPORTED void
-nucomp_canonicalization(int f)
-{
- canonicalization = f;
-}
-#else
-#define canonicalization 0
-#endif
-
-inline static void
+WARN_UNUSED_RESULT(inline static VALUE nucomp_real_check(VALUE num));
+inline static VALUE
nucomp_real_check(VALUE num)
{
if (!RB_INTEGER_TYPE_P(num) &&
- !RB_FLOAT_TYPE_P(num) &&
- !RB_TYPE_P(num, T_RATIONAL)) {
- if (!k_numeric_p(num) || !f_real_p(num))
- rb_raise(rb_eTypeError, "not a real");
+ !RB_FLOAT_TYPE_P(num) &&
+ !RB_TYPE_P(num, T_RATIONAL)) {
+ if (RB_TYPE_P(num, T_COMPLEX) && nucomp_real_p(num)) {
+ VALUE real = RCOMPLEX(num)->real;
+ assert(!RB_TYPE_P(real, T_COMPLEX));
+ return real;
+ }
+ if (!k_numeric_p(num) || !f_real_p(num))
+ rb_raise(rb_eTypeError, "not a real");
}
+ return num;
}
inline static VALUE
nucomp_s_canonicalize_internal(VALUE klass, VALUE real, VALUE imag)
{
int complex_r, complex_i;
-#ifdef CANONICALIZATION_FOR_MATHN
- if (k_exact_zero_p(imag) && canonicalization)
- return real;
-#endif
complex_r = RB_TYPE_P(real, T_COMPLEX);
complex_i = RB_TYPE_P(imag, T_COMPLEX);
if (!complex_r && !complex_i) {
- return nucomp_s_new_internal(klass, real, imag);
+ return nucomp_s_new_internal(klass, real, imag);
}
else if (!complex_r) {
- get_dat1(imag);
+ get_dat1(imag);
- return nucomp_s_new_internal(klass,
- f_sub(real, dat->imag),
- f_add(ZERO, dat->real));
+ return nucomp_s_new_internal(klass,
+ f_sub(real, dat->imag),
+ f_add(ZERO, dat->real));
}
else if (!complex_i) {
- get_dat1(real);
+ get_dat1(real);
- return nucomp_s_new_internal(klass,
- dat->real,
- f_add(dat->imag, imag));
+ return nucomp_s_new_internal(klass,
+ dat->real,
+ f_add(dat->imag, imag));
}
else {
- get_dat2(real, imag);
+ get_dat2(real, imag);
- return nucomp_s_new_internal(klass,
- f_sub(adat->real, bdat->imag),
- f_add(adat->imag, bdat->real));
+ return nucomp_s_new_internal(klass,
+ f_sub(adat->real, bdat->imag),
+ f_add(adat->imag, bdat->real));
}
}
@@ -493,22 +487,26 @@ nucomp_s_new(int argc, VALUE *argv, VALUE klass)
switch (rb_scan_args(argc, argv, "11", &real, &imag)) {
case 1:
- nucomp_real_check(real);
- imag = ZERO;
- break;
+ real = nucomp_real_check(real);
+ imag = ZERO;
+ break;
default:
- nucomp_real_check(real);
- nucomp_real_check(imag);
- break;
+ real = nucomp_real_check(real);
+ imag = nucomp_real_check(imag);
+ break;
}
- return nucomp_s_canonicalize_internal(klass, real, imag);
+ return nucomp_s_new_internal(klass, real, imag);
}
inline static VALUE
f_complex_new2(VALUE klass, VALUE x, VALUE y)
{
- assert(!RB_TYPE_P(x, T_COMPLEX));
+ if (RB_TYPE_P(x, T_COMPLEX)) {
+ get_dat1(x);
+ x = dat->real;
+ y = f_add(dat->imag, y);
+ }
return nucomp_s_canonicalize_internal(klass, x, y);
}
@@ -563,7 +561,7 @@ nucomp_f_complex(int argc, VALUE *argv, VALUE klass)
if (!NIL_P(opts)) {
raise = rb_opts_exception_p(opts, raise);
}
- if (argc > 0 && CLASS_OF(a1) == rb_cComplex && a2 == Qundef) {
+ if (argc > 0 && CLASS_OF(a1) == rb_cComplex && UNDEF_P(a2)) {
return a1;
}
return nucomp_convert(rb_cComplex, a1, a2, raise);
@@ -593,14 +591,14 @@ static VALUE
m_cos(VALUE x)
{
if (!RB_TYPE_P(x, T_COMPLEX))
- return m_cos_bang(x);
+ return m_cos_bang(x);
{
- get_dat1(x);
- return f_complex_new2(rb_cComplex,
- f_mul(m_cos_bang(dat->real),
- m_cosh_bang(dat->imag)),
- f_mul(f_negate(m_sin_bang(dat->real)),
- m_sinh_bang(dat->imag)));
+ get_dat1(x);
+ return f_complex_new2(rb_cComplex,
+ f_mul(m_cos_bang(dat->real),
+ m_cosh_bang(dat->imag)),
+ f_mul(f_negate(m_sin_bang(dat->real)),
+ m_sinh_bang(dat->imag)));
}
}
@@ -608,60 +606,73 @@ static VALUE
m_sin(VALUE x)
{
if (!RB_TYPE_P(x, T_COMPLEX))
- return m_sin_bang(x);
+ return m_sin_bang(x);
{
- get_dat1(x);
- return f_complex_new2(rb_cComplex,
- f_mul(m_sin_bang(dat->real),
- m_cosh_bang(dat->imag)),
- f_mul(m_cos_bang(dat->real),
- m_sinh_bang(dat->imag)));
+ get_dat1(x);
+ return f_complex_new2(rb_cComplex,
+ f_mul(m_sin_bang(dat->real),
+ m_cosh_bang(dat->imag)),
+ f_mul(m_cos_bang(dat->real),
+ m_sinh_bang(dat->imag)));
}
}
static VALUE
-f_complex_polar(VALUE klass, VALUE x, VALUE y)
+f_complex_polar_real(VALUE klass, VALUE x, VALUE y)
{
- assert(!RB_TYPE_P(x, T_COMPLEX));
- assert(!RB_TYPE_P(y, T_COMPLEX));
if (f_zero_p(x) || f_zero_p(y)) {
- if (canonicalization) return x;
- return nucomp_s_new_internal(klass, x, RFLOAT_0);
+ return nucomp_s_new_internal(klass, x, RFLOAT_0);
}
if (RB_FLOAT_TYPE_P(y)) {
- const double arg = RFLOAT_VALUE(y);
- if (arg == M_PI) {
- x = f_negate(x);
- if (canonicalization) return x;
- y = RFLOAT_0;
- }
- else if (arg == M_PI_2) {
- y = x;
- x = RFLOAT_0;
- }
- else if (arg == M_PI_2+M_PI) {
- y = f_negate(x);
- x = RFLOAT_0;
- }
- else if (RB_FLOAT_TYPE_P(x)) {
- const double abs = RFLOAT_VALUE(x);
- const double real = abs * cos(arg), imag = abs * sin(arg);
- x = DBL2NUM(real);
- if (canonicalization && imag == 0.0) return x;
- y = DBL2NUM(imag);
- }
- else {
- y = f_mul(x, DBL2NUM(sin(arg)));
- x = f_mul(x, DBL2NUM(cos(arg)));
- if (canonicalization && f_zero_p(y)) return x;
- }
- return nucomp_s_new_internal(klass, x, y);
+ const double arg = RFLOAT_VALUE(y);
+ if (arg == M_PI) {
+ x = f_negate(x);
+ y = RFLOAT_0;
+ }
+ else if (arg == M_PI_2) {
+ y = x;
+ x = RFLOAT_0;
+ }
+ else if (arg == M_PI_2+M_PI) {
+ y = f_negate(x);
+ x = RFLOAT_0;
+ }
+ else if (RB_FLOAT_TYPE_P(x)) {
+ const double abs = RFLOAT_VALUE(x);
+ const double real = abs * cos(arg), imag = abs * sin(arg);
+ x = DBL2NUM(real);
+ y = DBL2NUM(imag);
+ }
+ else {
+ const double ax = sin(arg), ay = cos(arg);
+ y = f_mul(x, DBL2NUM(ax));
+ x = f_mul(x, DBL2NUM(ay));
+ }
+ return nucomp_s_new_internal(klass, x, y);
}
return nucomp_s_canonicalize_internal(klass,
- f_mul(x, m_cos(y)),
- f_mul(x, m_sin(y)));
+ f_mul(x, m_cos(y)),
+ f_mul(x, m_sin(y)));
}
+static VALUE
+f_complex_polar(VALUE klass, VALUE x, VALUE y)
+{
+ x = nucomp_real_check(x);
+ y = nucomp_real_check(y);
+ return f_complex_polar_real(klass, x, y);
+}
+
+#ifdef HAVE___COSPI
+# define cospi(x) __cospi(x)
+#else
+# define cospi(x) cos((x) * M_PI)
+#endif
+#ifdef HAVE___SINPI
+# define sinpi(x) __sinpi(x)
+#else
+# define sinpi(x) sin((x) * M_PI)
+#endif
/* returns a Complex or Float of ang*PI-rotated abs */
VALUE
rb_dbl_complex_new_polar_pi(double abs, double ang)
@@ -671,16 +682,16 @@ rb_dbl_complex_new_polar_pi(double abs, double ang)
int pos = fr == +0.5;
if (pos || fr == -0.5) {
- if ((modf(fi / 2.0, &fi) != fr) ^ pos) abs = -abs;
- return rb_complex_new(RFLOAT_0, DBL2NUM(abs));
+ if ((modf(fi / 2.0, &fi) != fr) ^ pos) abs = -abs;
+ return rb_complex_new(RFLOAT_0, DBL2NUM(abs));
}
else if (fr == 0.0) {
- if (modf(fi / 2.0, &fi) != 0.0) abs = -abs;
- return DBL2NUM(abs);
+ if (modf(fi / 2.0, &fi) != 0.0) abs = -abs;
+ return DBL2NUM(abs);
}
else {
- ang *= M_PI;
- return rb_complex_new(DBL2NUM(abs * cos(ang)), DBL2NUM(abs * sin(ang)));
+ const double real = abs * cospi(ang), imag = abs * sinpi(ang);
+ return rb_complex_new(DBL2NUM(real), DBL2NUM(imag));
}
}
@@ -700,17 +711,15 @@ nucomp_s_polar(int argc, VALUE *argv, VALUE klass)
{
VALUE abs, arg;
- switch (rb_scan_args(argc, argv, "11", &abs, &arg)) {
- case 1:
- nucomp_real_check(abs);
- if (canonicalization) return abs;
- return nucomp_s_new_internal(klass, abs, ZERO);
- default:
- nucomp_real_check(abs);
- nucomp_real_check(arg);
- break;
+ argc = rb_scan_args(argc, argv, "11", &abs, &arg);
+ abs = nucomp_real_check(abs);
+ if (argc == 2) {
+ arg = nucomp_real_check(arg);
+ }
+ else {
+ arg = ZERO;
}
- return f_complex_polar(klass, abs, arg);
+ return f_complex_polar_real(klass, abs, arg);
}
/*
@@ -759,7 +768,7 @@ rb_complex_uminus(VALUE self)
{
get_dat1(self);
return f_complex_new2(CLASS_OF(self),
- f_negate(dat->real), f_negate(dat->imag));
+ f_negate(dat->real), f_negate(dat->imag));
}
/*
@@ -778,20 +787,20 @@ VALUE
rb_complex_plus(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
- VALUE real, imag;
+ VALUE real, imag;
- get_dat2(self, other);
+ get_dat2(self, other);
- real = f_add(adat->real, bdat->real);
- imag = f_add(adat->imag, bdat->imag);
+ real = f_add(adat->real, bdat->real);
+ imag = f_add(adat->imag, bdat->imag);
- return f_complex_new2(CLASS_OF(self), real, imag);
+ return f_complex_new2(CLASS_OF(self), real, imag);
}
if (k_numeric_p(other) && f_real_p(other)) {
- get_dat1(self);
+ get_dat1(self);
- return f_complex_new2(CLASS_OF(self),
- f_add(dat->real, other), dat->imag);
+ return f_complex_new2(CLASS_OF(self),
+ f_add(dat->real, other), dat->imag);
}
return rb_num_coerce_bin(self, other, '+');
}
@@ -812,33 +821,33 @@ VALUE
rb_complex_minus(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
- VALUE real, imag;
+ VALUE real, imag;
- get_dat2(self, other);
+ get_dat2(self, other);
- real = f_sub(adat->real, bdat->real);
- imag = f_sub(adat->imag, bdat->imag);
+ real = f_sub(adat->real, bdat->real);
+ imag = f_sub(adat->imag, bdat->imag);
- return f_complex_new2(CLASS_OF(self), real, imag);
+ return f_complex_new2(CLASS_OF(self), real, imag);
}
if (k_numeric_p(other) && f_real_p(other)) {
- get_dat1(self);
+ get_dat1(self);
- return f_complex_new2(CLASS_OF(self),
- f_sub(dat->real, other), dat->imag);
+ return f_complex_new2(CLASS_OF(self),
+ f_sub(dat->real, other), dat->imag);
}
return rb_num_coerce_bin(self, other, '-');
}
static VALUE
-safe_mul(VALUE a, VALUE b, int az, int bz)
+safe_mul(VALUE a, VALUE b, bool az, bool bz)
{
double v;
if (!az && bz && RB_FLOAT_TYPE_P(a) && (v = RFLOAT_VALUE(a), !isnan(v))) {
- a = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
+ a = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
}
if (!bz && az && RB_FLOAT_TYPE_P(b) && (v = RFLOAT_VALUE(b), !isnan(v))) {
- b = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
+ b = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
}
return f_mul(a, b);
}
@@ -846,10 +855,10 @@ safe_mul(VALUE a, VALUE b, int az, int bz)
static void
comp_mul(VALUE areal, VALUE aimag, VALUE breal, VALUE bimag, VALUE *real, VALUE *imag)
{
- int arzero = f_zero_p(areal);
- int aizero = f_zero_p(aimag);
- int brzero = f_zero_p(breal);
- int bizero = f_zero_p(bimag);
+ bool arzero = f_zero_p(areal);
+ bool aizero = f_zero_p(aimag);
+ bool brzero = f_zero_p(breal);
+ bool bizero = f_zero_p(bimag);
*real = f_sub(safe_mul(areal, breal, arzero, brzero),
safe_mul(aimag, bimag, aizero, bizero));
*imag = f_add(safe_mul(areal, bimag, arzero, bizero),
@@ -872,47 +881,47 @@ VALUE
rb_complex_mul(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
- VALUE real, imag;
- get_dat2(self, other);
+ VALUE real, imag;
+ get_dat2(self, other);
comp_mul(adat->real, adat->imag, bdat->real, bdat->imag, &real, &imag);
- return f_complex_new2(CLASS_OF(self), real, imag);
+ return f_complex_new2(CLASS_OF(self), real, imag);
}
if (k_numeric_p(other) && f_real_p(other)) {
- get_dat1(self);
+ get_dat1(self);
- return f_complex_new2(CLASS_OF(self),
- f_mul(dat->real, other),
- f_mul(dat->imag, other));
+ return f_complex_new2(CLASS_OF(self),
+ f_mul(dat->real, other),
+ f_mul(dat->imag, other));
}
return rb_num_coerce_bin(self, other, '*');
}
inline static VALUE
f_divide(VALUE self, VALUE other,
- VALUE (*func)(VALUE, VALUE), ID id)
+ VALUE (*func)(VALUE, VALUE), ID id)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
VALUE r, n, x, y;
- int flo;
- get_dat2(self, other);
+ int flo;
+ get_dat2(self, other);
- flo = (RB_FLOAT_TYPE_P(adat->real) || RB_FLOAT_TYPE_P(adat->imag) ||
- RB_FLOAT_TYPE_P(bdat->real) || RB_FLOAT_TYPE_P(bdat->imag));
+ flo = (RB_FLOAT_TYPE_P(adat->real) || RB_FLOAT_TYPE_P(adat->imag) ||
+ RB_FLOAT_TYPE_P(bdat->real) || RB_FLOAT_TYPE_P(bdat->imag));
- if (f_gt_p(f_abs(bdat->real), f_abs(bdat->imag))) {
- r = (*func)(bdat->imag, bdat->real);
- n = f_mul(bdat->real, f_add(ONE, f_mul(r, r)));
+ if (f_gt_p(f_abs(bdat->real), f_abs(bdat->imag))) {
+ r = (*func)(bdat->imag, bdat->real);
+ n = f_mul(bdat->real, f_add(ONE, f_mul(r, r)));
x = (*func)(f_add(adat->real, f_mul(adat->imag, r)), n);
y = (*func)(f_sub(adat->imag, f_mul(adat->real, r)), n);
- }
- else {
- r = (*func)(bdat->real, bdat->imag);
- n = f_mul(bdat->imag, f_add(ONE, f_mul(r, r)));
+ }
+ else {
+ r = (*func)(bdat->real, bdat->imag);
+ n = f_mul(bdat->imag, f_add(ONE, f_mul(r, r)));
x = (*func)(f_add(f_mul(adat->real, r), adat->imag), n);
y = (*func)(f_sub(f_mul(adat->imag, r), adat->real), n);
- }
+ }
if (!flo) {
x = rb_rational_canonicalize(x);
y = rb_rational_canonicalize(y);
@@ -921,7 +930,7 @@ f_divide(VALUE self, VALUE other,
}
if (k_numeric_p(other) && f_real_p(other)) {
VALUE x, y;
- get_dat1(self);
+ get_dat1(self);
x = rb_rational_canonicalize((*func)(dat->real, other));
y = rb_rational_canonicalize((*func)(dat->imag, other));
return f_complex_new2(CLASS_OF(self), x, y);
@@ -985,31 +994,31 @@ VALUE
rb_complex_pow(VALUE self, VALUE other)
{
if (k_numeric_p(other) && k_exact_zero_p(other))
- return f_complex_new_bang1(CLASS_OF(self), ONE);
+ return f_complex_new_bang1(CLASS_OF(self), ONE);
if (RB_TYPE_P(other, T_RATIONAL) && RRATIONAL(other)->den == LONG2FIX(1))
- other = RRATIONAL(other)->num; /* c14n */
+ other = RRATIONAL(other)->num; /* c14n */
if (RB_TYPE_P(other, T_COMPLEX)) {
- get_dat1(other);
+ get_dat1(other);
- if (k_exact_zero_p(dat->imag))
- other = dat->real; /* c14n */
+ if (k_exact_zero_p(dat->imag))
+ other = dat->real; /* c14n */
}
if (RB_TYPE_P(other, T_COMPLEX)) {
- VALUE r, theta, nr, ntheta;
+ VALUE r, theta, nr, ntheta;
- get_dat1(other);
+ get_dat1(other);
- r = f_abs(self);
- theta = f_arg(self);
+ r = f_abs(self);
+ theta = f_arg(self);
- nr = m_exp_bang(f_sub(f_mul(dat->real, m_log_bang(r)),
- f_mul(dat->imag, theta)));
- ntheta = f_add(f_mul(theta, dat->real),
- f_mul(dat->imag, m_log_bang(r)));
- return f_complex_polar(CLASS_OF(self), nr, ntheta);
+ nr = m_exp_bang(f_sub(f_mul(dat->real, m_log_bang(r)),
+ f_mul(dat->imag, theta)));
+ ntheta = f_add(f_mul(theta, dat->real),
+ f_mul(dat->imag, m_log_bang(r)));
+ return f_complex_polar(CLASS_OF(self), nr, ntheta);
}
if (FIXNUM_P(other)) {
long n = FIX2LONG(other);
@@ -1050,19 +1059,19 @@ rb_complex_pow(VALUE self, VALUE other)
}
}
return nucomp_s_new_internal(CLASS_OF(self), zr, zi);
- }
+ }
}
if (k_numeric_p(other) && f_real_p(other)) {
- VALUE r, theta;
+ VALUE r, theta;
- if (RB_TYPE_P(other, T_BIGNUM))
- rb_warn("in a**b, b may be too big");
+ if (RB_BIGNUM_TYPE_P(other))
+ rb_warn("in a**b, b may be too big");
- r = f_abs(self);
- theta = f_arg(self);
+ r = f_abs(self);
+ theta = f_arg(self);
- return f_complex_polar(CLASS_OF(self), f_expt(r, other),
- f_mul(theta, other));
+ return f_complex_polar(CLASS_OF(self), f_expt(r, other),
+ f_mul(theta, other));
}
return rb_num_coerce_bin(self, other, id_expt);
}
@@ -1083,24 +1092,24 @@ static VALUE
nucomp_eqeq_p(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
- get_dat2(self, other);
+ get_dat2(self, other);
- return f_boolcast(f_eqeq_p(adat->real, bdat->real) &&
- f_eqeq_p(adat->imag, bdat->imag));
+ return RBOOL(f_eqeq_p(adat->real, bdat->real) &&
+ f_eqeq_p(adat->imag, bdat->imag));
}
if (k_numeric_p(other) && f_real_p(other)) {
- get_dat1(self);
+ get_dat1(self);
- return f_boolcast(f_eqeq_p(dat->real, other) && f_zero_p(dat->imag));
+ return RBOOL(f_eqeq_p(dat->real, other) && f_zero_p(dat->imag));
}
- return f_boolcast(f_eqeq_p(other, self));
+ return RBOOL(f_eqeq_p(other, self));
}
static bool
nucomp_real_p(VALUE self)
{
get_dat1(self);
- return(f_zero_p(dat->imag) ? true : false);
+ return f_zero_p(dat->imag);
}
/*
@@ -1120,15 +1129,26 @@ nucomp_real_p(VALUE self)
static VALUE
nucomp_cmp(VALUE self, VALUE other)
{
- if (nucomp_real_p(self) && k_numeric_p(other)) {
- if (RB_TYPE_P(other, T_COMPLEX) && nucomp_real_p(other)) {
+ if (!k_numeric_p(other)) {
+ return rb_num_coerce_cmp(self, other, idCmp);
+ }
+ if (!nucomp_real_p(self)) {
+ return Qnil;
+ }
+ if (RB_TYPE_P(other, T_COMPLEX)) {
+ if (nucomp_real_p(other)) {
get_dat2(self, other);
return rb_funcall(adat->real, idCmp, 1, bdat->real);
}
- else if (f_real_p(other)) {
- get_dat1(self);
+ }
+ else {
+ get_dat1(self);
+ if (f_real_p(other)) {
return rb_funcall(dat->real, idCmp, 1, other);
}
+ else {
+ return rb_num_coerce_cmp(dat->real, other, idCmp);
+ }
}
return Qnil;
}
@@ -1138,12 +1158,12 @@ static VALUE
nucomp_coerce(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX))
- return rb_assoc_new(other, self);
+ return rb_assoc_new(other, self);
if (k_numeric_p(other) && f_real_p(other))
return rb_assoc_new(f_complex_new_bang1(CLASS_OF(self), other), self);
rb_raise(rb_eTypeError, "%"PRIsVALUE" can't be coerced into %"PRIsVALUE,
- rb_obj_class(other), rb_obj_class(self));
+ rb_obj_class(other), rb_obj_class(self));
return Qnil;
}
@@ -1163,16 +1183,16 @@ rb_complex_abs(VALUE self)
get_dat1(self);
if (f_zero_p(dat->real)) {
- VALUE a = f_abs(dat->imag);
- if (RB_FLOAT_TYPE_P(dat->real) && !RB_FLOAT_TYPE_P(dat->imag))
- a = f_to_f(a);
- return a;
+ VALUE a = f_abs(dat->imag);
+ if (RB_FLOAT_TYPE_P(dat->real) && !RB_FLOAT_TYPE_P(dat->imag))
+ a = f_to_f(a);
+ return a;
}
if (f_zero_p(dat->imag)) {
- VALUE a = f_abs(dat->real);
- if (!RB_FLOAT_TYPE_P(dat->real) && RB_FLOAT_TYPE_P(dat->imag))
- a = f_to_f(a);
- return a;
+ VALUE a = f_abs(dat->real);
+ if (!RB_FLOAT_TYPE_P(dat->real) && RB_FLOAT_TYPE_P(dat->imag))
+ a = f_to_f(a);
+ return a;
}
return rb_math_hypot(dat->real, dat->imag);
}
@@ -1191,7 +1211,7 @@ nucomp_abs2(VALUE self)
{
get_dat1(self);
return f_add(f_mul(dat->real, dat->real),
- f_mul(dat->imag, dat->imag));
+ f_mul(dat->imag, dat->imag));
}
/*
@@ -1265,7 +1285,7 @@ rb_complex_conjugate(VALUE self)
* Returns false, even if the complex number has no imaginary part.
*/
static VALUE
-nucomp_false(VALUE self)
+nucomp_real_p_m(VALUE self)
{
return Qfalse;
}
@@ -1312,15 +1332,15 @@ nucomp_numerator(VALUE self)
cd = nucomp_denominator(self);
return f_complex_new2(CLASS_OF(self),
- f_mul(f_numerator(dat->real),
- f_div(cd, f_denominator(dat->real))),
- f_mul(f_numerator(dat->imag),
- f_div(cd, f_denominator(dat->imag))));
+ f_mul(f_numerator(dat->real),
+ f_div(cd, f_denominator(dat->real))),
+ f_mul(f_numerator(dat->imag),
+ f_div(cd, f_denominator(dat->imag))));
}
/* :nodoc: */
-static VALUE
-nucomp_hash(VALUE self)
+st_index_t
+rb_complex_hash(VALUE self)
{
st_index_t v, h[2];
VALUE n;
@@ -1331,7 +1351,13 @@ nucomp_hash(VALUE self)
n = rb_hash(dat->imag);
h[1] = NUM2LONG(n);
v = rb_memhash(h, sizeof(h));
- return ST2FIX(v);
+ return v;
+}
+
+static VALUE
+nucomp_hash(VALUE self)
+{
+ return ST2FIX(rb_complex_hash(self));
}
/* :nodoc: */
@@ -1339,11 +1365,11 @@ static VALUE
nucomp_eql_p(VALUE self, VALUE other)
{
if (RB_TYPE_P(other, T_COMPLEX)) {
- get_dat2(self, other);
+ get_dat2(self, other);
- return f_boolcast((CLASS_OF(adat->real) == CLASS_OF(bdat->real)) &&
- (CLASS_OF(adat->imag) == CLASS_OF(bdat->imag)) &&
- f_eqeq_p(self, other));
+ return RBOOL((CLASS_OF(adat->real) == CLASS_OF(bdat->real)) &&
+ (CLASS_OF(adat->imag) == CLASS_OF(bdat->imag)) &&
+ f_eqeq_p(self, other));
}
return Qfalse;
@@ -1353,8 +1379,8 @@ inline static int
f_signbit(VALUE x)
{
if (RB_FLOAT_TYPE_P(x)) {
- double f = RFLOAT_VALUE(x);
- return !isnan(f) && signbit(f);
+ double f = RFLOAT_VALUE(x);
+ return !isnan(f) && signbit(f);
}
return f_negative_p(x);
}
@@ -1380,7 +1406,7 @@ f_format(VALUE self, VALUE (*func)(VALUE))
rb_str_concat(s, (*func)(f_abs(dat->imag)));
if (!rb_isdigit(RSTRING_PTR(s)[RSTRING_LEN(s) - 1]))
- rb_str_cat2(s, "*");
+ rb_str_cat2(s, "*");
rb_str_cat2(s, "i");
return s;
@@ -1442,10 +1468,7 @@ rb_complex_finite_p(VALUE self)
{
get_dat1(self);
- if (f_finite_p(dat->real) && f_finite_p(dat->imag)) {
- return Qtrue;
- }
- return Qfalse;
+ return RBOOL(f_finite_p(dat->real) && f_finite_p(dat->imag));
}
/*
@@ -1465,8 +1488,8 @@ rb_complex_infinite_p(VALUE self)
{
get_dat1(self);
- if (NIL_P(f_infinite_p(dat->real)) && NIL_P(f_infinite_p(dat->imag))) {
- return Qnil;
+ if (!f_infinite_p(dat->real) && !f_infinite_p(dat->imag)) {
+ return Qnil;
}
return ONE;
}
@@ -1509,14 +1532,12 @@ nucomp_marshal_load(VALUE self, VALUE a)
{
Check_Type(a, T_ARRAY);
if (RARRAY_LEN(a) != 2)
- rb_raise(rb_eArgError, "marshaled complex must have an array whose length is 2 but %ld", RARRAY_LEN(a));
+ rb_raise(rb_eArgError, "marshaled complex must have an array whose length is 2 but %ld", RARRAY_LEN(a));
rb_ivar_set(self, id_i_real, RARRAY_AREF(a, 0));
rb_ivar_set(self, id_i_imag, RARRAY_AREF(a, 1));
return self;
}
-/* --- */
-
VALUE
rb_complex_raw(VALUE x, VALUE y)
{
@@ -1550,13 +1571,6 @@ rb_Complex(VALUE x, VALUE y)
return nucomp_s_convert(2, a, rb_cComplex);
}
-/*!
- * Creates a Complex object.
- *
- * \param real real part value
- * \param imag imaginary part value
- * \return a new Complex object
- */
VALUE
rb_dbl_complex_new(double real, double imag)
{
@@ -1580,8 +1594,8 @@ nucomp_to_i(VALUE self)
get_dat1(self);
if (!k_exact_zero_p(dat->imag)) {
- rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Integer",
- self);
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Integer",
+ self);
}
return f_to_i(dat->real);
}
@@ -1603,8 +1617,8 @@ nucomp_to_f(VALUE self)
get_dat1(self);
if (!k_exact_zero_p(dat->imag)) {
- rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Float",
- self);
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Float",
+ self);
}
return f_to_f(dat->real);
}
@@ -1628,8 +1642,8 @@ nucomp_to_r(VALUE self)
get_dat1(self);
if (!k_exact_zero_p(dat->imag)) {
- rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Rational",
- self);
+ rb_raise(rb_eRangeError, "can't convert %"PRIsVALUE" into Rational",
+ self);
}
return f_to_r(dat->real);
}
@@ -1700,8 +1714,6 @@ numeric_to_c(VALUE self)
return rb_complex_new1(self);
}
-#include <ctype.h>
-
inline static int
issign(int c)
{
@@ -1710,14 +1722,14 @@ issign(int c)
static int
read_sign(const char **s,
- char **b)
+ char **b)
{
int sign = '?';
if (issign(**s)) {
- sign = **b = **s;
- (*s)++;
- (*b)++;
+ sign = **b = **s;
+ (*s)++;
+ (*b)++;
}
return sign;
}
@@ -1730,32 +1742,32 @@ isdecimal(int c)
static int
read_digits(const char **s, int strict,
- char **b)
+ char **b)
{
int us = 1;
if (!isdecimal(**s))
- return 0;
+ return 0;
while (isdecimal(**s) || **s == '_') {
- if (**s == '_') {
- if (strict) {
- if (us)
- return 0;
- }
- us = 1;
- }
- else {
- **b = **s;
- (*b)++;
- us = 0;
- }
- (*s)++;
+ if (**s == '_') {
+ if (us) {
+ if (strict) return 0;
+ break;
+ }
+ us = 1;
+ }
+ else {
+ **b = **s;
+ (*b)++;
+ us = 0;
+ }
+ (*s)++;
}
if (us)
- do {
- (*s)--;
- } while (**s == '_');
+ do {
+ (*s)--;
+ } while (**s == '_');
return 1;
}
@@ -1767,70 +1779,70 @@ islettere(int c)
static int
read_num(const char **s, int strict,
- char **b)
+ char **b)
{
if (**s != '.') {
- if (!read_digits(s, strict, b))
- return 0;
+ if (!read_digits(s, strict, b))
+ return 0;
}
if (**s == '.') {
- **b = **s;
- (*s)++;
- (*b)++;
- if (!read_digits(s, strict, b)) {
- (*b)--;
- return 0;
- }
+ **b = **s;
+ (*s)++;
+ (*b)++;
+ if (!read_digits(s, strict, b)) {
+ (*b)--;
+ return 0;
+ }
}
if (islettere(**s)) {
- **b = **s;
- (*s)++;
- (*b)++;
- read_sign(s, b);
- if (!read_digits(s, strict, b)) {
- (*b)--;
- return 0;
- }
+ **b = **s;
+ (*s)++;
+ (*b)++;
+ read_sign(s, b);
+ if (!read_digits(s, strict, b)) {
+ (*b)--;
+ return 0;
+ }
}
return 1;
}
inline static int
read_den(const char **s, int strict,
- char **b)
+ char **b)
{
if (!read_digits(s, strict, b))
- return 0;
+ return 0;
return 1;
}
static int
read_rat_nos(const char **s, int strict,
- char **b)
+ char **b)
{
if (!read_num(s, strict, b))
- return 0;
+ return 0;
if (**s == '/') {
- **b = **s;
- (*s)++;
- (*b)++;
- if (!read_den(s, strict, b)) {
- (*b)--;
- return 0;
- }
+ **b = **s;
+ (*s)++;
+ (*b)++;
+ if (!read_den(s, strict, b)) {
+ (*b)--;
+ return 0;
+ }
}
return 1;
}
static int
read_rat(const char **s, int strict,
- char **b)
+ char **b)
{
read_sign(s, b);
if (!read_rat_nos(s, strict, b))
- return 0;
+ return 0;
return 1;
}
@@ -1838,22 +1850,22 @@ inline static int
isimagunit(int c)
{
return (c == 'i' || c == 'I' ||
- c == 'j' || c == 'J');
+ c == 'j' || c == 'J');
}
static VALUE
str2num(char *s)
{
if (strchr(s, '/'))
- return rb_cstr_to_rat(s, 0);
+ return rb_cstr_to_rat(s, 0);
if (strpbrk(s, ".eE"))
- return DBL2NUM(rb_cstr_to_dbl(s, 0));
+ return DBL2NUM(rb_cstr_to_dbl(s, 0));
return rb_cstr_to_inum(s, 10, 0);
}
static int
read_comp(const char **s, int strict,
- VALUE *ret, char **b)
+ VALUE *ret, char **b)
{
char *bb;
int sign;
@@ -1864,72 +1876,72 @@ read_comp(const char **s, int strict,
sign = read_sign(s, b);
if (isimagunit(**s)) {
- (*s)++;
- num = INT2FIX((sign == '-') ? -1 : + 1);
- *ret = rb_complex_new2(ZERO, num);
- return 1; /* e.g. "i" */
+ (*s)++;
+ num = INT2FIX((sign == '-') ? -1 : + 1);
+ *ret = rb_complex_new2(ZERO, num);
+ return 1; /* e.g. "i" */
}
if (!read_rat_nos(s, strict, b)) {
- **b = '\0';
- num = str2num(bb);
- *ret = rb_complex_new2(num, ZERO);
- return 0; /* e.g. "-" */
+ **b = '\0';
+ num = str2num(bb);
+ *ret = rb_complex_new2(num, ZERO);
+ return 0; /* e.g. "-" */
}
**b = '\0';
num = str2num(bb);
if (isimagunit(**s)) {
- (*s)++;
- *ret = rb_complex_new2(ZERO, num);
- return 1; /* e.g. "3i" */
+ (*s)++;
+ *ret = rb_complex_new2(ZERO, num);
+ return 1; /* e.g. "3i" */
}
if (**s == '@') {
- int st;
-
- (*s)++;
- bb = *b;
- st = read_rat(s, strict, b);
- **b = '\0';
- if (strlen(bb) < 1 ||
- !isdecimal(*(bb + strlen(bb) - 1))) {
- *ret = rb_complex_new2(num, ZERO);
- return 0; /* e.g. "1@-" */
- }
- num2 = str2num(bb);
- *ret = rb_complex_new_polar(num, num2);
- if (!st)
- return 0; /* e.g. "1@2." */
- else
- return 1; /* e.g. "1@2" */
+ int st;
+
+ (*s)++;
+ bb = *b;
+ st = read_rat(s, strict, b);
+ **b = '\0';
+ if (strlen(bb) < 1 ||
+ !isdecimal(*(bb + strlen(bb) - 1))) {
+ *ret = rb_complex_new2(num, ZERO);
+ return 0; /* e.g. "1@-" */
+ }
+ num2 = str2num(bb);
+ *ret = rb_complex_new_polar(num, num2);
+ if (!st)
+ return 0; /* e.g. "1@2." */
+ else
+ return 1; /* e.g. "1@2" */
}
if (issign(**s)) {
- bb = *b;
- sign = read_sign(s, b);
- if (isimagunit(**s))
- num2 = INT2FIX((sign == '-') ? -1 : + 1);
- else {
- if (!read_rat_nos(s, strict, b)) {
- *ret = rb_complex_new2(num, ZERO);
- return 0; /* e.g. "1+xi" */
- }
- **b = '\0';
- num2 = str2num(bb);
- }
- if (!isimagunit(**s)) {
- *ret = rb_complex_new2(num, ZERO);
- return 0; /* e.g. "1+3x" */
- }
- (*s)++;
- *ret = rb_complex_new2(num, num2);
- return 1; /* e.g. "1+2i" */
+ bb = *b;
+ sign = read_sign(s, b);
+ if (isimagunit(**s))
+ num2 = INT2FIX((sign == '-') ? -1 : + 1);
+ else {
+ if (!read_rat_nos(s, strict, b)) {
+ *ret = rb_complex_new2(num, ZERO);
+ return 0; /* e.g. "1+xi" */
+ }
+ **b = '\0';
+ num2 = str2num(bb);
+ }
+ if (!isimagunit(**s)) {
+ *ret = rb_complex_new2(num, ZERO);
+ return 0; /* e.g. "1+3x" */
+ }
+ (*s)++;
+ *ret = rb_complex_new2(num, num2);
+ return 1; /* e.g. "1+2i" */
}
/* !(@, - or +) */
{
- *ret = rb_complex_new2(num, ZERO);
- return 1; /* e.g. "3" */
+ *ret = rb_complex_new2(num, ZERO);
+ return 1; /* e.g. "3" */
}
}
@@ -1937,7 +1949,7 @@ inline static void
skip_ws(const char **s)
{
while (isspace((unsigned char)**s))
- (*s)++;
+ (*s)++;
}
static int
@@ -1978,22 +1990,22 @@ string_to_c_strict(VALUE self, int raise)
if (!s || memchr(s, '\0', RSTRING_LEN(self))) {
if (!raise) return Qnil;
- rb_raise(rb_eArgError, "string contains null byte");
+ rb_raise(rb_eArgError, "string contains null byte");
}
if (s && s[RSTRING_LEN(self)]) {
- rb_str_modify(self);
- s = RSTRING_PTR(self);
- s[RSTRING_LEN(self)] = '\0';
+ rb_str_modify(self);
+ s = RSTRING_PTR(self);
+ s[RSTRING_LEN(self)] = '\0';
}
if (!s)
- s = (char *)"";
+ s = (char *)"";
if (!parse_comp(s, 1, &num)) {
if (!raise) return Qnil;
- rb_raise(rb_eArgError, "invalid value for convert(): %+"PRIsVALUE,
- self);
+ rb_raise(rb_eArgError, "invalid value for convert(): %+"PRIsVALUE,
+ self);
}
return num;
@@ -2020,6 +2032,12 @@ string_to_c_strict(VALUE self, int raise)
* '1/2+3/4i'.to_c #=> ((1/2)+(3/4)*i)
* 'ruby'.to_c #=> (0+0i)
*
+ * Polar form:
+ * include Math
+ * "1.0@0".to_c #=> (1+0.0i)
+ * "1.0@#{PI/2}".to_c #=> (0.0+1i)
+ * "1.0@#{PI}".to_c #=> (-1+0.0i)
+ *
* See Kernel.Complex.
*/
static VALUE
@@ -2033,13 +2051,13 @@ string_to_c(VALUE self)
s = RSTRING_PTR(self);
if (s && s[RSTRING_LEN(self)]) {
- rb_str_modify(self);
- s = RSTRING_PTR(self);
- s[RSTRING_LEN(self)] = '\0';
+ rb_str_modify(self);
+ s = RSTRING_PTR(self);
+ s[RSTRING_LEN(self)] = '\0';
}
if (!s)
- s = (char *)"";
+ s = (char *)"";
(void)parse_comp(s, 0, &num);
@@ -2057,65 +2075,68 @@ nucomp_convert(VALUE klass, VALUE a1, VALUE a2, int raise)
{
if (NIL_P(a1) || NIL_P(a2)) {
if (!raise) return Qnil;
- rb_raise(rb_eTypeError, "can't convert nil into Complex");
+ rb_raise(rb_eTypeError, "can't convert nil into Complex");
}
if (RB_TYPE_P(a1, T_STRING)) {
- a1 = string_to_c_strict(a1, raise);
+ a1 = string_to_c_strict(a1, raise);
if (NIL_P(a1)) return Qnil;
}
if (RB_TYPE_P(a2, T_STRING)) {
- a2 = string_to_c_strict(a2, raise);
+ a2 = string_to_c_strict(a2, raise);
if (NIL_P(a2)) return Qnil;
}
if (RB_TYPE_P(a1, T_COMPLEX)) {
- {
- get_dat1(a1);
+ {
+ get_dat1(a1);
- if (k_exact_zero_p(dat->imag))
- a1 = dat->real;
- }
+ if (k_exact_zero_p(dat->imag))
+ a1 = dat->real;
+ }
}
if (RB_TYPE_P(a2, T_COMPLEX)) {
- {
- get_dat1(a2);
+ {
+ get_dat1(a2);
- if (k_exact_zero_p(dat->imag))
- a2 = dat->real;
- }
+ if (k_exact_zero_p(dat->imag))
+ a2 = dat->real;
+ }
}
if (RB_TYPE_P(a1, T_COMPLEX)) {
- if (a2 == Qundef || (k_exact_zero_p(a2)))
- return a1;
- }
-
- if (a2 == Qundef) {
- if (k_numeric_p(a1) && !f_real_p(a1))
- return a1;
- /* should raise exception for consistency */
- if (!k_numeric_p(a1)) {
- if (!raise)
- return rb_protect(to_complex, a1, NULL);
- return to_complex(a1);
+ if (UNDEF_P(a2) || (k_exact_zero_p(a2)))
+ return a1;
+ }
+
+ if (UNDEF_P(a2)) {
+ if (k_numeric_p(a1) && !f_real_p(a1))
+ return a1;
+ /* should raise exception for consistency */
+ if (!k_numeric_p(a1)) {
+ if (!raise) {
+ a1 = rb_protect(to_complex, a1, NULL);
+ rb_set_errinfo(Qnil);
+ return a1;
+ }
+ return to_complex(a1);
}
}
else {
- if ((k_numeric_p(a1) && k_numeric_p(a2)) &&
- (!f_real_p(a1) || !f_real_p(a2)))
- return f_add(a1,
- f_mul(a2,
- f_complex_new_bang2(rb_cComplex, ZERO, ONE)));
+ if ((k_numeric_p(a1) && k_numeric_p(a2)) &&
+ (!f_real_p(a1) || !f_real_p(a2)))
+ return f_add(a1,
+ f_mul(a2,
+ f_complex_new_bang2(rb_cComplex, ZERO, ONE)));
}
{
int argc;
- VALUE argv2[2];
- argv2[0] = a1;
- if (a2 == Qundef) {
+ VALUE argv2[2];
+ argv2[0] = a1;
+ if (UNDEF_P(a2)) {
argv2[1] = Qnil;
argc = 1;
}
@@ -2125,7 +2146,7 @@ nucomp_convert(VALUE klass, VALUE a1, VALUE a2, int raise)
argv2[1] = a2;
argc = 2;
}
- return nucomp_s_new(argc, argv2, klass);
+ return nucomp_s_new(argc, argv2, klass);
}
}
@@ -2141,33 +2162,6 @@ nucomp_s_convert(int argc, VALUE *argv, VALUE klass)
return nucomp_convert(klass, a1, a2, TRUE);
}
-/* --- */
-
-/*
- * call-seq:
- * num.real -> self
- *
- * Returns self.
- */
-static VALUE
-numeric_real(VALUE self)
-{
- return self;
-}
-
-/*
- * call-seq:
- * num.imag -> 0
- * num.imaginary -> 0
- *
- * Returns zero.
- */
-static VALUE
-numeric_imag(VALUE self)
-{
- return INT2FIX(0);
-}
-
/*
* call-seq:
* num.abs2 -> real
@@ -2209,8 +2203,6 @@ numeric_rect(VALUE self)
return rb_assoc_new(self, INT2FIX(0));
}
-static VALUE float_arg(VALUE self);
-
/*
* call-seq:
* num.polar -> array
@@ -2243,19 +2235,6 @@ numeric_polar(VALUE self)
/*
* call-seq:
- * num.conj -> self
- * num.conjugate -> self
- *
- * Returns self.
- */
-static VALUE
-numeric_conj(VALUE self)
-{
- return self;
-}
-
-/*
- * call-seq:
* flo.arg -> 0 or float
* flo.angle -> 0 or float
* flo.phase -> 0 or float
@@ -2266,9 +2245,9 @@ static VALUE
float_arg(VALUE self)
{
if (isnan(RFLOAT_VALUE(self)))
- return self;
+ return self;
if (f_tpositive_p(self))
- return INT2FIX(0);
+ return INT2FIX(0);
return rb_const_get(rb_mMath, id_PI);
}
@@ -2278,6 +2257,14 @@ float_arg(VALUE self)
* and i is imaginary unit. Real a equals complex a+0i
* mathematically.
*
+ * You can create a \Complex object explicitly with:
+ *
+ * - A {complex literal}[rdoc-ref:syntax/literals.rdoc@Complex+Literals].
+ *
+ * You can convert certain objects to \Complex objects with:
+ *
+ * - \Method #Complex.
+ *
* Complex object can be created as literal, and also by using
* Kernel#Complex, Complex::rect, Complex::polar or to_c method.
*
@@ -2309,20 +2296,17 @@ void
Init_Complex(void)
{
VALUE compat;
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
- id_abs = rb_intern("abs");
- id_arg = rb_intern("arg");
- id_denominator = rb_intern("denominator");
- id_numerator = rb_intern("numerator");
- id_real_p = rb_intern("real?");
- id_i_real = rb_intern("@real");
- id_i_imag = rb_intern("@image"); /* @image, not @imag */
- id_finite_p = rb_intern("finite?");
- id_infinite_p = rb_intern("infinite?");
- id_rationalize = rb_intern("rationalize");
- id_PI = rb_intern("PI");
+ id_abs = rb_intern_const("abs");
+ id_arg = rb_intern_const("arg");
+ id_denominator = rb_intern_const("denominator");
+ id_numerator = rb_intern_const("numerator");
+ id_real_p = rb_intern_const("real?");
+ id_i_real = rb_intern_const("@real");
+ id_i_imag = rb_intern_const("@image"); /* @image, not @imag */
+ id_finite_p = rb_intern_const("finite?");
+ id_infinite_p = rb_intern_const("infinite?");
+ id_rationalize = rb_intern_const("rationalize");
+ id_PI = rb_intern_const("PI");
rb_cComplex = rb_define_class("Complex", rb_cNumeric);
@@ -2337,7 +2321,7 @@ Init_Complex(void)
rb_define_global_function("Complex", nucomp_f_complex, -1);
- rb_undef_methods_from(rb_cComplex, rb_mComparable);
+ rb_undef_methods_from(rb_cComplex, RCLASS_ORIGIN(rb_mComparable));
rb_undef_method(rb_cComplex, "%");
rb_undef_method(rb_cComplex, "div");
rb_undef_method(rb_cComplex, "divmod");
@@ -2379,7 +2363,7 @@ Init_Complex(void)
rb_define_method(rb_cComplex, "conjugate", rb_complex_conjugate, 0);
rb_define_method(rb_cComplex, "conj", rb_complex_conjugate, 0);
- rb_define_method(rb_cComplex, "real?", nucomp_false, 0);
+ rb_define_method(rb_cComplex, "real?", nucomp_real_p_m, 0);
rb_define_method(rb_cComplex, "numerator", nucomp_numerator, 0);
rb_define_method(rb_cComplex, "denominator", nucomp_denominator, 0);
@@ -2402,8 +2386,6 @@ Init_Complex(void)
rb_define_private_method(compat, "marshal_load", nucomp_marshal_load, 1);
rb_marshal_define_compat(rb_cComplex, compat, nucomp_dumper, nucomp_loader);
- /* --- */
-
rb_define_method(rb_cComplex, "to_i", nucomp_to_i, 0);
rb_define_method(rb_cComplex, "to_f", nucomp_to_f, 0);
rb_define_method(rb_cComplex, "to_r", nucomp_to_r, 0);
@@ -2416,11 +2398,6 @@ Init_Complex(void)
rb_define_private_method(CLASS_OF(rb_cComplex), "convert", nucomp_s_convert, -1);
- /* --- */
-
- rb_define_method(rb_cNumeric, "real", numeric_real, 0);
- rb_define_method(rb_cNumeric, "imaginary", numeric_imag, 0);
- rb_define_method(rb_cNumeric, "imag", numeric_imag, 0);
rb_define_method(rb_cNumeric, "abs2", numeric_abs2, 0);
rb_define_method(rb_cNumeric, "arg", numeric_arg, 0);
rb_define_method(rb_cNumeric, "angle", numeric_arg, 0);
@@ -2428,8 +2405,6 @@ Init_Complex(void)
rb_define_method(rb_cNumeric, "rectangular", numeric_rect, 0);
rb_define_method(rb_cNumeric, "rect", numeric_rect, 0);
rb_define_method(rb_cNumeric, "polar", numeric_polar, 0);
- rb_define_method(rb_cNumeric, "conjugate", numeric_conj, 0);
- rb_define_method(rb_cNumeric, "conj", numeric_conj, 0);
rb_define_method(rb_cFloat, "arg", float_arg, 0);
rb_define_method(rb_cFloat, "angle", float_arg, 0);
@@ -2439,7 +2414,7 @@ Init_Complex(void)
* The imaginary unit.
*/
rb_define_const(rb_cComplex, "I",
- f_complex_new_bang2(rb_cComplex, ZERO, ONE));
+ f_complex_new_bang2(rb_cComplex, ZERO, ONE));
#if !USE_FLONUM
rb_gc_register_mark_object(RFLOAT_0 = DBL2NUM(0.0));
diff --git a/configure.ac b/configure.ac
index f1ed36bb96..220392d120 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,23 +1,55 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT()
+AC_INIT
{
AC_CONFIG_AUX_DIR(tool)
-AC_CONFIG_MACRO_DIRS(tool/m4)
AC_PREREQ(2.67)
-dnl override AC_CHECKING
-dnl placed here due to aclocal(1)'s
-dnl ignoring this definition in separate files
-AC_DEFUN([AC_CHECKING],[dnl
-AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
-AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])dnl
+tooldir="$srcdir/tool"
AC_DISABLE_OPTION_CHECKING
-AC_ARG_VAR([cflags], [additional CFLAGS (ignored when CFLAGS is given)])
-AC_ARG_VAR([cppflags], [additional CPPFLAGS (ignored when CPPFLAGS is given)])
-AC_ARG_VAR([cxxflags], [additional CXXFLAGS (ignored when CXXFLAGS is given)])
+m4_include([tool/m4/_colorize_result_prepare.m4])dnl
+m4_include([tool/m4/ac_msg_result.m4])dnl
+m4_include([tool/m4/colorize_result.m4])dnl
+m4_include([tool/m4/ruby_append_option.m4])dnl
+m4_include([tool/m4/ruby_append_options.m4])dnl
+m4_include([tool/m4/ruby_check_builtin_func.m4])dnl
+m4_include([tool/m4/ruby_check_builtin_setjmp.m4])dnl
+m4_include([tool/m4/ruby_check_printf_prefix.m4])dnl
+m4_include([tool/m4/ruby_check_setjmp.m4])dnl
+m4_include([tool/m4/ruby_check_signedness.m4])dnl
+m4_include([tool/m4/ruby_check_sizeof.m4])dnl
+m4_include([tool/m4/ruby_check_sysconf.m4])dnl
+m4_include([tool/m4/ruby_cppoutfile.m4])dnl
+m4_include([tool/m4/ruby_decl_attribute.m4])dnl
+m4_include([tool/m4/ruby_default_arch.m4])dnl
+m4_include([tool/m4/ruby_define_if.m4])dnl
+m4_include([tool/m4/ruby_defint.m4])dnl
+m4_include([tool/m4/ruby_dtrace_available.m4])dnl
+m4_include([tool/m4/ruby_dtrace_postprocess.m4])dnl
+m4_include([tool/m4/ruby_func_attribute.m4])dnl
+m4_include([tool/m4/ruby_mingw32.m4])dnl
+m4_include([tool/m4/ruby_prepend_option.m4])dnl
+m4_include([tool/m4/ruby_prog_gnu_ld.m4])dnl
+m4_include([tool/m4/ruby_prog_makedirs.m4])dnl
+m4_include([tool/m4/ruby_replace_funcs.m4])dnl
+m4_include([tool/m4/ruby_replace_type.m4])dnl
+m4_include([tool/m4/ruby_require_funcs.m4])dnl
+m4_include([tool/m4/ruby_rm_recursive.m4])dnl
+m4_include([tool/m4/ruby_setjmp_type.m4])dnl
+m4_include([tool/m4/ruby_stack_grow_direction.m4])dnl
+m4_include([tool/m4/ruby_thread.m4])dnl
+m4_include([tool/m4/ruby_try_cflags.m4])dnl
+m4_include([tool/m4/ruby_try_cxxflags.m4])dnl
+m4_include([tool/m4/ruby_try_ldflags.m4])dnl
+m4_include([tool/m4/ruby_universal_arch.m4])dnl
+m4_include([tool/m4/ruby_wasm_tools.m4])dnl
+m4_include([tool/m4/ruby_werror_flag.m4])dnl
+
+AC_ARG_VAR([cflags], [additional CFLAGS (ignored when CFLAGS is given)])dnl
+AC_ARG_VAR([cppflags], [additional CPPFLAGS (ignored when CPPFLAGS is given)])dnl
+AC_ARG_VAR([cxxflags], [additional CXXFLAGS (ignored when CXXFLAGS is given)])dnl
: "environment section" && {
HAVE_BASERUBY=yes
@@ -32,16 +64,22 @@ AC_ARG_WITH(baseruby,
[
AC_PATH_PROG([BASERUBY], [ruby], [false])
])
-AS_IF([test "$HAVE_BASERUBY" = yes -a "`RUBYOPT=- $BASERUBY -e 'print 42' 2>/dev/null`" = 42], [
- AS_IF([test "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42' 2>/dev/null`" = 42], [
- BASERUBY="$BASERUBY --disable=gems"
- BASERUBY_VERSION=`$BASERUBY -v`
+# BASERUBY must be >= 2.2.0. Note that `"2.2.0" > "2.2"` is true.
+AS_IF([test "$HAVE_BASERUBY" != no -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42 if RUBY_VERSION > "2.2"' 2>/dev/null`" = 42], [
+ AS_CASE(["$build_os"], [mingw*], [
+ # Can MSys shell run a command with a drive letter?
+ RUBYOPT=- `cygpath -ma "$BASERUBY"` --disable=gems -e exit 2>/dev/null || HAVE_BASERUBY=no
])
+ BASERUBY="$BASERUBY --disable=gems"
+ BASERUBY_VERSION=`$BASERUBY -v`
$BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD
], [
- BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
HAVE_BASERUBY=no
])
+AS_IF([test "$HAVE_BASERUBY" = no], [
+ AS_IF([test "$cross_compiling" = yes], [AC_MSG_ERROR([executable host ruby is required for cross-compiling])])
+ BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
+])
AC_SUBST(BASERUBY)
AC_SUBST(HAVE_BASERUBY)
@@ -58,7 +96,9 @@ AC_SUBST(GIT)
AC_SUBST(HAVE_GIT)
eval `sed -n -e ['s/^@%:@define RUBY_[A-Z_]*VERSION_\([A-Z][A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)$/\1=\2/p'] \
+ -e ['s/^@%:@define \(RUBY_ABI_VERSION\) \([0-9][0-9]*\).*/\1=\2/p'] \
-e ['s/^@%:@define \(RUBY_PATCHLEVEL\) \(.*\)/\1=\2/p'] \
+ $srcdir/include/ruby/internal/abi.h \
$srcdir/include/ruby/version.h $srcdir/version.h`
for v in MAJOR MINOR TEENY; do
AS_IF([eval "test \"\$$v\" = ''"], [
@@ -70,9 +110,38 @@ AC_SUBST(MINOR)
AC_SUBST(TEENY)
AC_SUBST(RUBY_API_VERSION, '$(MAJOR).$(MINOR)')
AC_SUBST(RUBY_PROGRAM_VERSION, '$(MAJOR).$(MINOR).$(TEENY)')
+AS_CASE([$RUBY_PATCHLEVEL], [-*], [
+ AC_DEFINE_UNQUOTED(RUBY_ABI_VERSION, [${RUBY_ABI_VERSION}])
+], [RUBY_ABI_VERSION=])
+
+AS_IF([test "$program_prefix" = NONE], [
+ program_prefix=
+])
+AS_IF([test "$prefix" -ef .], [
+ AC_MSG_ERROR(--prefix cannot be the current working directory.)
+])
+RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
+RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
+AC_SUBST(RUBY_BASE_NAME)
+AC_SUBST(RUBYW_BASE_NAME)
+AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')
dnl checks for alternative programs
AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AS_CASE(["$target_cpu-$target_os"],
+ [aarch64-darwin*], [
+ target_cpu=arm64
+ AS_CASE(["$target_vendor"], [unknown], [
+ target_vendor=apple
+ target=${target%%-unknown-*}-apple-${target@%:@*-unknown-}
+ ])
+ target="arm64-${target@%:@aarch64-}"
+ AS_IF([test -n "$target_alias"], [target_alias="arm64-${target_alias@%:@aarch64-}"])
+ ])
+
+AC_ARG_PROGRAM
RUBY_RM_RECURSIVE
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
@@ -86,21 +155,127 @@ AS_IF([test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"], [
AC_MSG_ERROR(cached CC is different -- throw away $cache_file
(it is also a good idea to do 'make clean' before compiling))
])
-test -z "$CC" || ac_cv_prog_CC="$CC"
-AS_IF([test "$program_prefix" = NONE], [
- program_prefix=
+RUBY_WASM_TOOLS
+
+AS_CASE(["${build_os}"],
+[linux*|cygwin*|msys*], [
+ # Naruse prefers GCC on Linux
+ AC_CHECK_TOOLS([CC], [gcc clang cc])
+],
+[solaris*], [
+ # Clang on Solaris is largely untested.
+ # https://bugs.ruby-lang.org/issues/17949
+ AC_CHECK_TOOLS([CC], [cc gcc])
+], [
+ # OpenBSD wants to prefer cc over gcc.
+ # See https://github.com/ruby/ruby/pull/2443
+ AC_CHECK_TOOLS([CC], [cl.exe clang cc gcc c99 /usr/ucb/cc])
+])
+
+AC_ARG_VAR([AR], [Archiver command])
+AC_ARG_VAR([AS], [Assembler command])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CXX], [C++ compiler command])
+AC_ARG_VAR([LD], [Linker command])
+AC_ARG_VAR([NM], [Symbol list command])
+AC_ARG_VAR([OBJCOPY], [Objcopy command])
+AC_ARG_VAR([OBJDUMP], [Objdump command])
+AC_ARG_VAR([RANLIB], [Ranlib command])
+AC_ARG_VAR([STRIP], [Strip command])
+
+# We don't want to bother things like `ccache gcc`, `clang -shared-libgcc`, ...
+set rb_dummy ${CC}
+rb_CC=$2
+AC_DEFUN([RUBY_CHECK_PROG_FOR_CC], [
+ rb_prog=`echo "${rb_CC}" | sed "$2"`
+ AC_CHECK_PROG([$1], [$rb_prog], [$rb_prog])
+])
+AS_CASE(["/${rb_CC} "],
+[*@<:@\ /@:>@"cc "*], [
+ # Don't try g++/clang++ when CC=cc
+ AC_CHECK_PROGS([CXX], [cl.exe CC c++])
+],
+[*icc*], [
+ # Intel C++ has interprocedural optimizations. It tends to come with its
+ # own linker etc.
+ RUBY_CHECK_PROG_FOR_CC([AR], [s/icc/xiar/])
+ RUBY_CHECK_PROG_FOR_CC([CXX], [s/icc/icpc/])
+ RUBY_CHECK_PROG_FOR_CC([LD], [s/icc/xild/])
+],
+[*gcc*], [
+ # Ditto for GCC.
+ RUBY_CHECK_PROG_FOR_CC([LD], [s/gcc/ld/])
+ RUBY_CHECK_PROG_FOR_CC([AR], [s/gcc/gcc-ar/])
+ RUBY_CHECK_PROG_FOR_CC([CXX], [s/gcc/g++/])
+ RUBY_CHECK_PROG_FOR_CC([NM], [s/gcc/gcc-nm/])
+ RUBY_CHECK_PROG_FOR_CC([RANLIB], [s/gcc/gcc-ranlib/])
+],
+[*clang*], [
+ # Ditto for LLVM. Note however that llvm-as is a LLVM-IR to LLVM bitcode
+ # assembler that does not target your machine native binary.
+
+ # Xcode has its own version tools that may be incompatible with
+ # genuine LLVM tools, use the tools in the same directory.
+
+ AS_IF([$rb_CC -E -dM -xc - < /dev/null | grep -F __apple_build_version__ > /dev/null],
+ [llvm_prefix=], [llvm_prefix=llvm-])
+ # AC_PREPROC_IFELSE cannot be used before AC_USE_SYSTEM_EXTENSIONS
+
+ RUBY_CHECK_PROG_FOR_CC([LD], [s/clang/ld/]) # ... maybe try lld ?
+ RUBY_CHECK_PROG_FOR_CC([AR], [s/clang/${llvm_prefix}ar/])
+# RUBY_CHECK_PROG_FOR_CC([AS], [s/clang/${llvm_prefix}as/])
+ RUBY_CHECK_PROG_FOR_CC([CXX], [s/clang/clang++/])
+ RUBY_CHECK_PROG_FOR_CC([NM], [s/clang/${llvm_prefix}nm/])
+ RUBY_CHECK_PROG_FOR_CC([OBJCOPY], [s/clang/${llvm_prefix}objcopy/])
+ RUBY_CHECK_PROG_FOR_CC([OBJDUMP], [s/clang/${llvm_prefix}objdump/])
+ RUBY_CHECK_PROG_FOR_CC([RANLIB], [s/clang/${llvm_prefix}ranlib/])
+ RUBY_CHECK_PROG_FOR_CC([STRIP], [s/clang/${llvm_prefix}strip/])
+])
+AS_UNSET(rb_CC)
+AS_UNSET(rb_dummy)
+
+AS_CASE(["${build_os}"],
+[solaris*], [
+ AC_PATH_TOOL([LD], [ld], [/usr/ccs/bin/ld], [/usr/ccs/bin:$PATH])
+],
+[aix*], [
+ AC_PATH_TOOL([NM], [nm], [/usr/ccs/bin/nm], [/usr/ccs/bin:$PATH])
])
-AS_IF([test "$prefix" -ef .], [
- AC_MSG_ERROR(--prefix cannot be the current working directory.)
+AS_CASE(["${target_os}"],
+[cygwin*|msys*|mingw*], [
+ ac_cv_prog_ac_ct_OBJCOPY=":"
+])
+
+rb_test_CFLAGS=${CFLAGS+yes}
+rb_test_CXXFLAGS=${CXXFLAGS+yes}
+
+# BSD's ports and MacPorts prefix GNU binutils with 'g'
+
+dnl Seems necessarily in order to add -std=gnu99 option for gcc 4.9.
+m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
+
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_RANLIB
+AC_CHECK_TOOLS([AR], [gar ar])
+AC_CHECK_TOOLS([AS], [gas as])
+AC_CHECK_TOOLS([LD], [gld ld]) # ... try gold ?
+AC_CHECK_TOOLS([NM], [gnm nm])
+AC_CHECK_TOOLS([OBJCOPY], [gobjcopy objcopy])
+AC_CHECK_TOOLS([OBJDUMP], [gobjdump objdump])
+AC_CHECK_TOOLS([STRIP], [gstrip strip], [:])
+
+AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS)
+AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS)
+
+AS_IF([test "${CXX}" = "g++" -a -z "${GXX}"], [
+ # AC_PROG_CXX sets $CXX to "g++" when it purposefully finds that there is
+ # _no_ g++. This brain-damaged design must be worked around. Thankfully,
+ # similar thing doesn't happen for AC_PROG_CC.
+ rb_there_is_in_fact_no_gplusplus_but_autoconf_is_cheating_us=true
])
-RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
-RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
-AC_SUBST(RUBY_BASE_NAME)
-AC_SUBST(RUBYW_BASE_NAME)
-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')
-AC_CANONICAL_TARGET
test x"$target_alias" = x &&
target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
ac_install_sh='' # unusable for extension libraries.
@@ -148,7 +323,8 @@ AC_ARG_ENABLE(load-relative,
AS_HELP_STRING([--enable-load-relative], [resolve load paths at run time]),
[load_relative=$enableval])
-AC_ARG_PROGRAM
+# checks for UNIX variants that set C preprocessor variables
+AC_USE_SYSTEM_EXTENSIONS
dnl Checks for programs.
@@ -172,76 +348,36 @@ dnl ])
AS_CASE(["$host_os:$build_os"],
[darwin*:darwin*], [
- AC_CHECK_TOOLS(CC, [clang gcc cc])
# Following Apple deployed clang are broken
# clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported)
# Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
# Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
- AS_IF([! $CC -E -xc - <<SRC >/dev/null], [
- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
- @%:@error premature clang
- @%:@endif
-SRC
- AC_MSG_ERROR([clang version 3.0 or later is required])
- ])],
-[openbsd*:openbsd*], [
- AC_CHECK_TOOLS(CC, [cc])
-])
-AS_IF([test x"${build}" != x"${host}"], [
- AC_CHECK_TOOL(CC, gcc)
-])
-
-AC_PROG_CC_C99
-AS_CASE([$CC],
-[gcc-*], [
- gcc_prefix=gcc- gcc_suffix=`echo "$CC" | sed 's/^gcc//'`
- AC_PROG_CXX(g++${gcc_suffix})],
-[clang-*|clang], [
- gcc_prefix=clang- gcc_suffix=`echo "$CC" | sed 's/^clang//'`
- AC_PROG_CXX(clang++${gcc_suffix})],
-[gcc_prefix= gcc_suffix=])
-
-dnl Select the appropriate C++ compiler in OS X
-AS_CASE(["$build_os:${CXX}"],
- [darwin1*.*:], [
- AC_MSG_CHECKING([CXX for $CC])
- AS_CASE(["/$CC "],
- [*@<:@\ /@:>@"gcc-4.2 "*], [pat='gcc-4\.2' CXX=g++-4.2],
- [*@<:@\ /@:>@"gcc "*], [pat=gcc CXX=g++],
- [*@<:@\ /@:>@"cc "*], [pat=cc CXX=c++],
- [*@<:@\ /@:>@"icc "*], [pat=icc CXX=icpc],
- [*@<:@\ /@:>@"clang "*], [pat=clang CXX=clang++])
- AS_IF([test "${CXX}"], [
- CXX=`echo "/$CC " | sed ["s:\([ /]\)${pat}:\1$CXX:; s:^/::; s: *$::"]`
- ])
- AC_MSG_RESULT([$CXX])],
- [openbsd*:*], [
- AC_CHECK_TOOLS(CXX, [c++])
- ])
-test -z "$CXX" || ac_cv_prog_CXX="$CXX"
+ AC_PREPROC_IFELSE(
+ [AC_LANG_PROGRAM([
+ @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
+ @%:@error premature clang
+ @%:@endif
+ ])],
+ [],
+ [AC_MSG_ERROR([clang version 3.0 or later is required])])
+])
AS_CASE(["$target_os"],
[darwin*], [
AC_MSG_CHECKING(if minimum required OS X version is supported)
- AC_TRY_CPP([@%:@include <AvailabilityMacros.h>
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <AvailabilityMacros.h>
@%:@if MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5
@%:@error pre OS X 10.5
[!<===== pre OS X 10.5 =====>]
@%:@endif
- ],
- [macosx_min_required=yes],
+ ]])],
+ [AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([Unsupported OS X version is required])])
- AC_MSG_RESULT(${macosx_min_required})
])
-AC_PROG_CXX
RUBY_MINGW32
-AC_PROG_GCC_TRADITIONAL
AC_SUBST(GCC)
-AS_CASE(["$target_os"],
-[solaris*], [AC_PATH_TOOL([LD], [ld], [/usr/ccs/bin/ld], [/usr/ccs/bin:$PATH])],
-[AC_CHECK_TOOL([LD], [ld], [ld])])
AC_SUBST(LD)
AS_IF([test "$GCC" = yes], [
linker_flag=-Wl,
@@ -253,14 +389,21 @@ AS_IF([test "$GCC" = yes], [
icc_version=`echo =__ICC | $CC -E -xc - | sed '/^=/!d;s///;/^__ICC/d'`
test -n "$icc_version" || icc_version=0
# RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
+
+ AS_IF([test "$gcc_major" -lt 4], [
+ AC_MSG_ERROR([too old GCC: $gcc_major.$gcc_minor])
+ ])
+
+ AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
+ [rb_cv_tls_supported=yes],
+ [rb_cv_tls_supported=no])])
+ AS_IF([test x"$rb_cv_tls_supported" != xyes],
+ [AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
], [
linker_flag=
])
-AS_IF([test "$GCC" = yes -a "$gcc_major" -lt 3 ], [
- AC_MSG_ERROR([too old GCC])
-])
-
RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE
@@ -274,6 +417,12 @@ AC_SUBST(CSRCFLAG)
: ${MJIT_CC=$CC}
AS_IF([test "x$cross_compiling" = xno], [
AC_PATH_PROG([MJIT_CC], ${MJIT_CC})
+
+ # if $CC is in /usr/lib/ccache/$CC, search original $CC (disable ccache)
+ AS_IF([echo $RUBY_DEBUG | grep ci > /dev/null &&
+ echo $MJIT_CC | grep ^/usr/lib/ccache > /dev/null], [
+ PATH=`echo $PATH | sed "s/\/usr\/lib\/ccache://"` MJIT_CC=`which $CC`])
+
AS_CASE([$target_os],
[*mingw*], [command -v cygpath > /dev/null && MJIT_CC=`cygpath -ma $MJIT_CC`])
shift 2
@@ -288,11 +437,20 @@ AS_CASE(["$build_os"],
echo 'int main(void) {return 0;}' > conftest.c
AS_IF([$CC -framework Foundation -o conftest conftest.c 2>&1 |
grep '^ld: warning: text-based stub file' >/dev/null], [
- CC_WRAPPER=`cd -P "$srcdir/tool" && pwd`/darwin-cc
+ CC_WRAPPER=`cd -P "${tooldir}" && pwd`/darwin-cc
CC="$CC_WRAPPER $CC"
])
rm -fr conftest*
])
+AS_CASE(["$target_os"],
+ [wasi*], [
+ # Clang linker automatically uses wasm-opt with -O if it found.
+ # https://github.com/llvm/llvm-project/blob/812828984c10857a4cd260eb638c52a4411f9143/clang/lib/Driver/ToolChains/WebAssembly.cpp#L95-L118
+ # However optimization before asyncify causes misoptimization,
+ # so wrap clang to insert our fake wasm-opt, which does nothing, in PATH.
+ CC_WRAPPER=`cd -P "${tooldir}" && pwd`/wasm-clangw
+ CC="$CC_WRAPPER $CC"
+ ])
cc_version=
for option in --version -v -V -qversion; do
@@ -309,40 +467,24 @@ AC_SUBST(CC_VERSION_MESSAGE, $cc_version_message)
: ${DLDFLAGS="$LDFLAGS"}
RUBY_UNIVERSAL_ARCH
-AS_IF([test "$target_cpu" != "$host_cpu" -a "$GCC" = yes -a "$cross_compiling" = no -a "$universal_binary" = no], [
+AS_IF([test "$target_cpu" != "$host_cpu" -a "$GCC" = yes -a "$cross_compiling" = no -a "${universal_binary:-no}" = no], [
RUBY_DEFAULT_ARCH("$target_cpu")
])
+host_os=$target_os
+host_vendor=$target_vendor
+host_cpu=$target_cpu
+host=$target
+host_alias=$target_alias
-AS_CASE(["$target_os"], [darwin*], [
-if libtool 2>&1 | grep no_warning_for_no_symbols > /dev/null; then
- ac_cv_prog_ac_ct_RANLIB=:
- ac_cv_prog_ac_ct_AR='libtool -static'
- rb_cv_arflags='-no_warning_for_no_symbols -o'
-fi
-])
-AC_CHECK_TOOLS(RANLIB, [${gcc_prefix}ranlib${gcc_suffix} ranlib], :)
-AC_CHECK_TOOLS(AR, [${gcc_prefix}ar${gcc_suffix} ar])
-AS_IF([test -z "$AR"], [
- AC_CHECK_PROGS(AR, aal, ar)
-])
AC_CACHE_CHECK([for $AR flags], [rb_cv_arflags], [
AS_IF([$AR rcD conftest.a > /dev/null 2>&1 && rm conftest.a],
[rb_cv_arflags=rcD], [rb_cv_arflags=rcu])
])
AC_SUBST(ARFLAGS, ["$rb_cv_arflags "])
-
-AC_CHECK_TOOL(AS, as)
-ASFLAGS=$ASFLAGS
AC_SUBST(ASFLAGS)
-AS_CASE(["$target_os"],[cygwin*|mingw*], [ac_cv_prog_ac_ct_OBJCOPY=":"])
-
-# BSD's ports and MacPorts prefix GNU binutils with 'g'
-AC_CHECK_TOOLS(OBJDUMP, [objdump gobjdump])
-AC_CHECK_TOOLS(OBJCOPY, [objcopy gobjcopy])
-
AS_CASE(["$target_os"],
-[cygwin*|mingw*], [
+[cygwin*|msys*|mingw*], [
AC_CHECK_TOOL(WINDRES, windres)
AC_CHECK_TOOL(DLLWRAP, dllwrap)
target=`echo $target | sed "s/^$target_cpu-/-/"`
@@ -354,38 +496,34 @@ AS_CASE(["$target_os"],
[mingw*], [
test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt
AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [
- AC_TRY_LINK([@%:@include <stdio.h>],
- [FILE* volatile f = stdin; return 0;],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]],
+ [[FILE* volatile f = stdin; return 0;]])],
[rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext |
tr A-Z a-z |
- sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`],
+ sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;};
+ /^[[ ]]*dll name: \(ucrtbase\|api-ms-win-crt-.*\)\.dll$/{s//ucrt/p;q;}'`],
[rb_cv_msvcrt=msvcrt])
test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt])
RT_VER=`echo "$rb_cv_msvcrt" | tr -cd [0-9]`
test "$RT_VER" = "" && RT_VER=60
+ test "$rb_cv_msvcrt" = "ucrt" && RT_VER=140
AC_DEFINE_UNQUOTED(RUBY_MSVCRT_VERSION, $RT_VER)
sysconfdir=
])
+ rb_cv_binary_elf=no
: ${enable_shared=yes}
],
-[aix*], [AC_CHECK_TOOL(NM, nm, /usr/ccs/bin/nm, /usr/ccs/bin:$PATH)],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
-AC_CHECK_TOOLS(NM, [${gcc_prefix}nm${gcc_suffix} nm])
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
-AC_PROG_MKDIR_P
-AS_IF([test "x$MKDIR_P" = "x -d"], [
- AS_IF([test x"$as_mkdir_p" != xfalse], [
- MKDIR_P='mkdir -p'
- echo "use 'mkdir -p' as MKDIR_P"
- ], [
- AC_MSG_ERROR([mkdir -p is required])
- ])
+
+AS_CASE(["$target_os"],[openbsd*],[
+ ac_cv_path_mkdir="mkdir"
])
-MAKEDIRS="$MKDIR_P"
-AC_SUBST(MAKEDIRS)
+
+RUBY_PROG_MAKEDIRS
AC_CHECK_PROG([DTRACE], [${ac_tool_prefix}dtrace], [${ac_tool_prefix}dtrace])
AS_IF([test "$cross_compiling:$ac_cv_prog_DTRACE" = no: -a -n "$ac_tool_prefix"], [
@@ -395,11 +533,35 @@ AS_IF([test "$cross_compiling:$ac_cv_prog_DTRACE" = no: -a -n "$ac_tool_prefix"]
AC_CHECK_PROGS(DOT, dot)
AC_CHECK_PROGS(DOXYGEN, doxygen)
-AC_CHECK_PROG(PKG_CONFIG, pkg-config, [pkg-config], [], [],
- [`"$as_dir/$ac_word$ac_exec_ext" --print-errors --version > /dev/null 2>&1 || echo "$as_dir/$ac_word$ac_exec_ext"`])
+tool_warned=$ac_tool_warned ac_tool_warned=no
+AC_CHECK_TOOL(PKG_CONFIG, pkg-config)
+ac_tool_warned=$tool_warned
+AS_IF([test -z "$PKG_CONFIG"], [],
+["$PKG_CONFIG" --print-errors --version > /dev/null 2>&1], [],
+[
+ unset ac_cv_prog_PKG_CONFIG
+ PKG_CONFIG=
+ AC_MSG_WARN([$PKG_CONFIG does not work; ignore])
+])
-# checks for UNIX variants that set C preprocessor variables
-AC_USE_SYSTEM_EXTENSIONS
+AC_MSG_CHECKING([whether it is Android])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@ifndef __ANDROID__
+ @%:@error Not android
+ @%:@endif
+]], [[]])],
+[
+ AC_MSG_RESULT(yes)
+ target_os=${target_os}-android
+ AS_IF([test "x$cross_compiling" = xno], [
+ AC_MSG_CHECKING([for Android API version])
+ # hacky workaround: https://github.com/termux/termux-packages/issues/6176
+ rb_android_api=`getprop ro.build.version.sdk`
+ AC_MSG_RESULT($rb_android_api)
+ RUBY_APPEND_OPTIONS(CPPFLAGS, -D__ANDROID_API__=$rb_android_api -Wno-macro-redefined)
+ ])
+],
+[AC_MSG_RESULT(no)])
AC_SUBST(RM, ['rm -f'])
AC_SUBST(CP, ['cp'])
@@ -436,7 +598,7 @@ AC_SUBST(CHDIR)
: "compiler section" && {
RUBY_WERROR_FLAG([
AC_MSG_CHECKING([whether CFLAGS is valid])
- AC_TRY_COMPILE([], [],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
@@ -452,7 +614,7 @@ RUBY_WERROR_FLAG([
echo '<?xml?><plist><dict><key>CFBundleIdentifier</key><string></string></dict></plist>' > Info.plist &&
:
} || AC_MSG_ERROR([failed to make temporary directory])
- AC_TRY_LINK([], [],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[AC_MSG_RESULT(yes)],
[
cd .. && rm -fr tmp.$$.try_link
@@ -463,27 +625,58 @@ RUBY_WERROR_FLAG([
cd .. && rm -fr tmp.$$.try_link
])
-: ${RPATHFLAG=''}
-rpathflag=''
-AS_IF([test x"${RPATHFLAG}" = x], [
- AS_CASE(["$target_os"],
- [hpux*], [AS_IF([test "$rb_cv_prog_gnu_ld" = no], [rpathflag='+b '])],
+: "rpath" && {
+ AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[
+ AS_CASE(["`head -1 conftest$EXEEXT | tr -dc '\177ELF' | tr '\177' .`"],
+ [.ELF*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
+ [rb_cv_binary_elf=no])])
+
+ rpathflag=''
+ AS_IF([test x"${RPATHFLAG=}" = x], [
+ AS_CASE(["$target_os"],
[aix*], [rpathflag='-blibpath:'],
- [for rpathflag in -R "-rpath "; do
+ [for rpathflag in "-rpath " -R; do
AS_CASE("$rpathflag",
[*" "], [AS_CASE(["${linker_flag}"],
[*,], [rpathflag=`echo "$rpathflag" | tr ' ' ,`])])
rpathflag="${linker_flag}${rpathflag}"
RUBY_TRY_LDFLAGS([${rpathflag}.], [], [rpathflag=])
- AS_IF([test "x${rpathflag}" != x], [])
+ AS_IF([test "x${rpathflag}" != x], [break])
done])
-], [
- rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'`
+ ], [
+ rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'`
+ ])
+
+ AC_ARG_ENABLE(rpath,
+ AS_HELP_STRING([--enable-rpath], [embed run path into extension libraries.
+ enabled by default on ELF platforms]),
+ [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
+
+ AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [
+ RPATHFLAG="${rpathflag:+ ${rpathflag}%1\$-s}"
+ ])
+ AS_CASE([${RPATHFLAG}],[*'%1$'*],[: ${LIBPATHFLAG=' -L%1$-s'}],[: ${LIBPATHFLAG=' -L%s'}])
+}
+
+RUBY_TRY_LDFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
+AS_IF([test "$fdeclspec" = yes], [
+ RUBY_APPEND_OPTIONS(CFLAGS, -fdeclspec)
+ RUBY_APPEND_OPTIONS(cflags, -fdeclspec)
+ RUBY_APPEND_OPTIONS(orig_cflags, -fdeclspec)
+])
+RUBY_TRY_CXXFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
+AS_IF([test "$fdeclspec" = yes], [
+ RUBY_APPEND_OPTIONS(CXXFLAGS, -fdeclspec)
])
-AS_CASE([$RUBY_PATCHLEVEL], [-*],
- [RUBY_DEVEL=yes], [RUBY_DEVEL=no])
-particular_werror_flags=$RUBY_DEVEL
+AC_ARG_ENABLE(devel,
+ AS_HELP_STRING([--enable-devel], [enable development build]),
+ [RUBY_DEVEL=$enableval],
+ [AS_IF([test "x${RUBY_DEVEL-no}" != xyes], [RUBY_DEVEL=])]
+)dnl
+AC_SUBST(RUBY_DEVEL)
+particular_werror_flags=${RUBY_DEVEL:-no}
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--disable-werror],
[don't make warnings into errors
@@ -494,10 +687,7 @@ AC_ARG_ENABLE(werror,
rb_cv_warnflags="$warnflags"
AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
[yes::*|yes:*:set:], [# GCC && (!warnflags || extra_warnflags)
- AS_IF([test $gcc_major -ge 4], [
- extra_warnflags="$extra_warnflags -Werror=extra-tokens"
- ])
- AS_IF([test $gcc_major -ge 5 -a $gcc_major -le 6], [
+ AS_IF([test $gcc_major -le 6], [
extra_warnflags="$extra_warnflags -Wno-maybe-uninitialized"
])
# ICC doesn't support -Werror=
@@ -505,8 +695,9 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
particular_werror_flags=no
])
for wflag in \
+ -Werror=extra-tokens \
-Werror=deprecated-declarations \
- -Werror=division-by-zero \
+ -Werror=division-by-zero -Werror=div-by-zero \
-Werror=duplicated-cond \
-Werror=implicit-function-declaration \
-Werror=implicit-int \
@@ -514,6 +705,7 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
-Werror=pointer-arith \
-Werror=shorten-64-to-32 \
-Werror=write-strings \
+ -Werror=old-style-definition \
-Wimplicit-fallthrough=0 \
-Wmissing-noreturn \
-Wno-cast-function-type \
@@ -530,7 +722,7 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
-Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wunused-variable \
- -diag-disable=175,188,2259 \
+ -diag-disable=175,188,1684,2259,2312 \
$extra_warnflags \
; do
AS_IF([test "$particular_werror_flags" != yes], [
@@ -549,6 +741,18 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
])
])
done
+ AS_IF([test "$particular_werror_flags" = "yes"], [
+ wflag=-Werror=undef
+ ], [
+ wflag=-Wundef
+ ])
+ RUBY_TRY_CFLAGS($wflag, [
+ RUBY_APPEND_OPTIONS(warnflags, $wflag)
+ ], [], [
+ @%:@if !defined(RUBY_CONFIG_TEST_NEVER_DEFINED_SYMBOL)
+ @%:@elif RUBY_CONFIG_TEST_NEVER_DEFINED_SYMBOL
+ @%:@endif
+ ])
AS_CASE([" $warnflags "],[*" -Wno-missing-field-initializers "*], [wflag="-Wall -Wextra"],
[wflag=-Wall])
RUBY_TRY_CFLAGS($wflag, [warnflags="$wflag${warnflags+ $warnflags}"])
@@ -557,6 +761,22 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
warnflags=
])
RUBY_TRY_CFLAGS(-Qunused-arguments, [RUBY_APPEND_OPTIONS(rb_cv_wsuppress_flags, -Qunused-arguments)])
+AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+@%:@if !(defined(__SUNPRO_C)||defined(__SUNPRO_CC))
+@%:@error not sunpro
+@%:@endif],[])], [
+ for e in \
+ E_STATEMENT_NOT_REACHED \
+ E_INIT_SIGN_EXTEND \
+ E_INIT_DOES_NOT_FIT \
+ E_INITIALIZATION_TYPE_MISMATCH
+ do
+ RUBY_TRY_CFLAGS([-erroff=${e}], [
+ RUBY_APPEND_OPTIONS(rb_cv_warnflags, [-erroff=${e}])
+ ])
+ done
+])
AC_ARG_WITH(compress-debug-sections,
AS_HELP_STRING([--with-compress-debug-sections=type],
@@ -580,14 +800,16 @@ AS_IF([test "$GCC" = yes], [
[disable -D_FORTIFY_SOURCE=2 option, which causes link error on mingw]),
[fortify_source=$enableval])
AS_IF([test "x$fortify_source" != xno], [
- RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
+ RUBY_TRY_CFLAGS([$optflags -D_FORTIFY_SOURCE=2],
+ [RUBY_APPEND_OPTION(XCFLAGS, -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)], [],
+ [@%:@include <stdio.h>])
])
: ${MJIT_HEADER_FLAGS='-P -dD'}
# -fstack-protector
AS_CASE(["$target_os"],
- [mingw*], [
+ [emscripten*|wasi*], [
stack_protector=no
])
AS_IF([test -z "${stack_protector+set}"], [
@@ -599,12 +821,25 @@ AS_IF([test "$GCC" = yes], [
AS_IF([test "x$stack_protector" = xyes], [stack_protector=option; break])
])
])
+ AC_MSG_CHECKING([for -fstack-protector])
+ AC_MSG_RESULT(["$stack_protector"])
AS_CASE(["$stack_protector"], [-*], [
RUBY_APPEND_OPTION(XCFLAGS, $stack_protector)
RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector)
RUBY_APPEND_OPTION(LDFLAGS, $stack_protector)
])
+ # aarch64 branch protection
+ AS_CASE(["$target_cpu"], [aarch64], [
+ AS_FOR(option, opt, [-mbranch-protection=pac-ret -msign-return-address=all], [
+ RUBY_TRY_CFLAGS(option, [branch_protection=yes], [branch_protection=no])
+ AS_IF([test "x$branch_protection" = xyes], [
+ RUBY_APPEND_OPTION(XCFLAGS, option)
+ break
+ ])
+ ])
+ ])
+
AS_CASE("${compress_debug_sections:-zlib}",
[none|no], [], [
RUBY_TRY_LDFLAGS(${linker_flag}--compress-debug-sections=${compress_debug_sections:-zlib},
@@ -634,13 +869,13 @@ AS_IF([test "$GCC" = yes], [
], [
CFLAGS="$CFLAGS -Werror -Wuninitialized"
])
- AC_TRY_COMPILE([@%:@include <math.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>
int foo(double x)
{
int exp;
frexp(x, &exp);
return exp;
- }], [if (foo(0.0)) return 1;],
+ }]], [[if (foo(0.0)) return 1;]])],
[rb_cv_mingw64_broken_frexp_modf=no],
[rb_cv_mingw64_broken_frexp_modf=yes])
CFLAGS="$save_CFLAGS"
@@ -649,35 +884,8 @@ AS_IF([test "$GCC" = yes], [
AC_DEFINE(RUBY_MINGW64_BROKEN_FREXP_MODF)
])
],
- [cygwin*|darwin*|netbsd*], [
- # need lgamma_r(), finite()
- ])
-
- # ANSI (no XCFLAGS because this is C only)
- AS_CASE(["$target_os"],
- [solaris*], [
- # Because "-std=gnu99" affects existence of functions on Solaris,
- # "-std=gnu99" will be appended to CPPFLAGS.
- for ansi_options in -std=gnu99; do
- RUBY_TRY_CFLAGS(${ansi_options}, [
- RUBY_APPEND_OPTIONS(CPPFLAGS, ${ansi_options})
- ], [ansi_options=])
- test "x${ansi_options}" = x || break
- done
- ],
- [
- # ANSI (no XCFLAGS because this is C only)
- rb_tmp_std_check=`echo $CC $CFLAGS $optflags $warnflags $debugflags | fgrep std= | tr -d '\015'`
- AS_IF([test "x$rb_tmp_std_check" = "x"],
- [
- for ansi_options in -std=gnu99; do
- RUBY_TRY_CFLAGS(${ansi_options}, [
- RUBY_APPEND_OPTIONS(warnflags, ${ansi_options})
- RUBY_APPEND_OPTIONS(strict_warnflags, ${ansi_options})
- ], [ansi_options=])
- test "x${ansi_options}" = x || break
- done
- ])
+ [cygwin*|msys*|darwin*|netbsd*], [
+ # need lgamma_r()
])
# suppress annoying -Wstrict-overflow warnings
@@ -688,15 +896,12 @@ AS_IF([test "$GCC" = yes], [
test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
])
test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
-AS_IF([test "x$RUBY_DEVEL" = xyes], [RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_DEVEL=1)])
AS_IF([test "$GCC" = ""], [
AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_warnflags -qinfo=por"])
])
AS_IF([test "$GCC" = yes], [
- AS_IF([test "$gcc_major" -ge 4], [
- RUBY_TRY_CFLAGS(-fvisibility=hidden, [visibility_option=yes], [visibility_option=no])
- ])
+ RUBY_TRY_CFLAGS(-fvisibility=hidden, [visibility_option=yes], [visibility_option=no])
AC_SUBST(WERRORFLAG, "-Werror")
AS_IF([test "$visibility_option" = yes], [
RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)
@@ -721,7 +926,7 @@ AS_IF([test "$GCC" = yes], [
# disable fast-math
for oflag in -fno-fast-math; do
- RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(CFLAGS, $oflag)])
+ RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)])
done
for oflag in -fexcess-precision=standard -fp-model\ precise; do
RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(XCFLAGS, $oflag)])
@@ -730,13 +935,13 @@ AS_IF([test "$GCC" = yes], [
AS_CASE(["$target_cpu"], [[i[3-6]86*]], [
AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
- AC_TRY_LINK([unsigned long atomic_var;],
- [__sync_val_compare_and_swap(&atomic_var, 0, 1);],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
+ [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
[rb_cv_gcc_compiler_cas=yes],
[
save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -march=i486"
- AC_TRY_LINK([unsigned long atomic_var;],
- [__sync_val_compare_and_swap(&atomic_var, 0, 1);],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned long atomic_var;]],
+ [[__sync_val_compare_and_swap(&atomic_var, 0, 1);]])],
[rb_cv_gcc_compiler_cas=i486],
[rb_cv_gcc_compiler_cas=no])
CFLAGS="$save_CFLAGS"
@@ -745,17 +950,35 @@ AS_CASE(["$target_cpu"], [[i[3-6]86*]], [
AS_IF([test "$rb_cv_gcc_compiler_cas" = i486], [ARCH_FLAG="-march=i486"])
])
+OPT_DIR=
+AC_ARG_WITH([gmp-dir],
+ AS_HELP_STRING([--with-gmp-dir=DIR],
+ [specify the prefix directory where gmp is installed]),
+ [OPT_DIR="${OPT_DIR:+$OPT_DIR$PATH_SEPARATOR}$withval"], [])
+AC_ARG_WITH([gmp],
+ [AS_HELP_STRING([--without-gmp],
+ [disable GNU GMP to accelerate Bignum operations])],
+ [], [with_gmp=yes])
+
AC_ARG_WITH(opt-dir,
AS_HELP_STRING([--with-opt-dir=DIR-LIST],
[add optional headers and libraries directories separated by $PATH_SEPARATOR]),
- [
- val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"`
- CPPFLAGS="$CPPFLAGS $val"
- val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -L\1/lib${rpathflag:+ $rpathflag\\\\1/lib}|g;s/^ //"`
- LDFLAGS="$LDFLAGS $val"
- LDFLAGS_OPTDIR="$val"
- OPT_DIR="$withval"
- ], [OPT_DIR=])
+ [OPT_DIR="${OPT_DIR:+$OPT_DIR$PATH_SEPARATOR}$withval"], [])
+
+AS_IF([test "x$OPT_DIR" != x], [
+ val=`IFS="$PATH_SEPARATOR"
+ for dir in $OPT_DIR; do
+ test -z "$dir" && continue
+ echo x ${LIBPATHFLAG} ${RPATHFLAG} |
+ sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g"
+ done | tr '\012' ' ' | sed 's/ *$//'`
+ LDFLAGS="${LDFLAGS:+$LDFLAGS }$val"
+ DLDFLAGS="${DLDFLAGS:+$DLDFLAGS }$val"
+ LDFLAGS_OPTDIR="$val"
+ INCFLAGS="${INCFLAGS:+$INCFLAGS }"`echo "$OPT_DIR" | tr "${PATH_SEPARATOR}" '\012' |
+ sed '/^$/d;s|^|-I|;s|$|/include|' | tr '\012' ' ' | sed 's/ *$//'`
+])
+AC_SUBST(incflags, "$INCFLAGS")
test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\""
test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\""
@@ -763,7 +986,7 @@ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cx
AC_CACHE_CHECK([whether compiler has statement and declarations in expressions],
rb_cv_have_stmt_and_decl_in_expr,
- [AC_TRY_COMPILE([],[ __extension__ ({ int a = 0; a; }); ],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])],
[rb_cv_have_stmt_and_decl_in_expr=yes],
[rb_cv_have_stmt_and_decl_in_expr=no])])
AS_IF([test "$rb_cv_have_stmt_and_decl_in_expr" = yes], [
@@ -780,33 +1003,22 @@ AS_CASE(["$target_os"],
RUBY_APPEND_OPTION(CPPFLAGS, -D__MINGW_USE_VC2005_COMPAT)
])
-AS_CASE(["$target_os"],
-[freebsd*], [
- AC_CACHE_CHECK([whether pthread should be enabled by default],
- rb_cv_enable_pthread_default,
- [AC_TRY_CPP([
-#include <osreldate.h>
-#if __FreeBSD_version < 502102
-#error pthread should be disabled on this platform
-#endif
- ],
- rb_cv_enable_pthread_default=yes,
- rb_cv_enable_pthread_default=no)])
- enable_pthread=$rb_cv_enable_pthread_default
- ],
-[mingw*], [
- enable_pthread=no
- ],
-[
- enable_pthread=yes
- ])
+RUBY_THREAD
dnl Checks for libraries.
AS_CASE(["$target_os"],[*bsd*|dragonfly*],[],[ac_cv_func_daemon=no])
+AS_CASE(["$target_os"], [*android*], [
+ AS_CASE(["$target_cpu"], [arm*], [
+ ac_cv_func___builtin_setjmp=no
+ ])
+])
+
AS_UNSET(ORIG_LIBS)
POSTLINK=:
AC_SUBST(POSTLINK)
+cleanlibs=
+AC_SUBST(cleanlibs)
AS_CASE(["$target_os"],
[nextstep*], [ ],
[openstep*], [ ],
@@ -817,8 +1029,8 @@ AS_CASE(["$target_os"],
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT)
AC_CACHE_CHECK([whether syscall(2) is deprecated], rb_cv_syscall_deprecated,
[RUBY_WERROR_FLAG([
- AC_TRY_COMPILE([@%:@include <unistd.h>],
- [if (syscall(0)) return 1;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <unistd.h>]],
+ [[if (syscall(0)) return 1;]])],
[rb_cv_syscall_deprecated=no],
[rb_cv_syscall_deprecated=yes])])])
AS_IF([test $rb_cv_syscall_deprecated = yes], [
@@ -829,23 +1041,16 @@ AS_CASE(["$target_os"],
])
ac_cv_func_getcontext=no
ac_cv_func_setcontext=no
- incs=`$CC -v -E -xc - < /dev/null 2>&1 | sed ['1,/^@%:@include </d;s/^ *//;s|[^./][^/]*/\.\./||g;/\/include$/!d;s||/lib|;/\/usr\/lib/d']`
- for d in `$CC -print-search-dirs | sed -e '/^libraries: */!d;s///' | tr : '\012' | fgrep -v /../ | sed -n 's|^\(/.*/lib\)/$|\1|p'`; do
- incs=`echo "$incs" | fgrep -v "$d"`
- done
- for d in $incs; do
- test -d "$d" && RUBY_APPEND_OPTIONS(LDFLAGS, "-L$d")
- done
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
ac_cv_lib_crypt_crypt=no
ac_cv_func_fdatasync=no # Mac OS X wrongly reports it has fdatasync()
ac_cv_func_vfork=no
- AS_IF([test $gcc_major -lt 4 -o \( $gcc_major -eq 4 -a $gcc_minor -lt 3 \)], [
+ AS_IF([test $gcc_major -eq 4 -a $gcc_minor -lt 3], [
ac_cv_func___builtin_setjmp=no
])
with_setjmp_type=sigsetjmp # to hijack SIGCHLD handler
AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -882,7 +1087,7 @@ main()
}
return 0;
}
-],
+]])],
rb_cv_broken_crypt=no,
rb_cv_broken_crypt=yes,
rb_cv_broken_crypt=yes)])
@@ -905,17 +1110,16 @@ main()
AC_CHECK_HEADERS(crt_externs.h, [], [], [
#include <crt_externs.h>
])
+ cleanlibs='$(TARGET_SO).dSYM'
],
-[hpux*], [ LIBS="-lm $LIBS"
- ac_cv_c_inline=no],
[solaris*], [ LIBS="-lm $LIBS"
ac_cv_func_vfork=no
AC_MSG_CHECKING(whether _XOPEN_SOURCE is already given)
- AC_TRY_COMPILE([#include <unistd.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif
- ], [],
+ ]], [[]])],
[given_xopen_source=yes], [given_xopen_source=no])
AC_MSG_RESULT($given_xopen_source)
AS_IF([test $given_xopen_source = no], [
@@ -925,13 +1129,13 @@ main()
AS_IF([test x"$define_xopen_source" != x], [
break
])
- RUBY_WERROR_FLAG([AC_TRY_COMPILE([
+ RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _XOPEN_SOURCE ${tmp_xpg}00
#include <unistd.h>
#ifndef _XPG${tmp_xpg}
#error _XPG${tmp_xpg} should be defined by _XOPEN_SOURCE=${tmp_xpg}00
#endif
- ], [],
+ ]], [[]])],
[define_xopen_source=${tmp_xpg}00], [])
])
done
@@ -941,19 +1145,33 @@ main()
AC_MSG_RESULT($define_xopen_source)
AS_IF([test x"$define_xopen_source" != xno], [
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
+ # _XOPEN_SOURCE should not be defined for C++ on Solaris.
+ RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
+ ])
+ ])
+ AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>])
+ AC_CACHE_CHECK([whether madvise declaration is needed], rb_cv_madvice_prototype_using_caddr_t,
+ [RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <sys/unistd.h>
+ @%:@include <sys/mman.h>
+ @%:@include <sys/types.h>
+ extern int madvise(caddr_t, size_t, int);
+ ]], [[]])],
+ [rb_cv_madvice_prototype_using_caddr_t=yes], [rb_cv_madvice_prototype_using_caddr_t=no])
])
])
+ AS_IF([test $rb_cv_madvice_prototype_using_caddr_t = yes], [AC_DEFINE(NEED_MADVICE_PROTOTYPE_USING_CADDR_T, 1)])
],
[haiku*], [
LIBS="$LIBS" # m lib is include in root
],
-[cygwin*], [ ac_cv_header_langinfo_h=yes
+[cygwin*|msys*], [
+ ac_cv_header_langinfo_h=yes
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_GNU_SOURCE)
AC_CHECK_FUNCS(cygwin_conv_path)
AC_LIBOBJ([langinfo])
],
-[mingw*], [ LIBS="-lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi $LIBS"
- ac_cv_header_a_out_h=no
+[mingw*], [ LIBS="-lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt $LIBS"
ac_cv_header_pwd_h=no
ac_cv_header_utime_h=no
ac_cv_header_sys_ioctl_h=no
@@ -963,6 +1181,7 @@ main()
ac_cv_header_sys_time_h=no
ac_cv_header_sys_times_h=no
ac_cv_header_sys_socket_h=no
+ ac_cv_func_execv=yes
ac_cv_func_lstat=yes
ac_cv_func_times=yes
ac_cv_func_waitpid=yes
@@ -972,30 +1191,26 @@ main()
ac_cv_func_lchown=yes
ac_cv_func_link=yes
ac_cv_func_readlink=yes
+ ac_cv_func_shutdown=yes
ac_cv_func_symlink=yes
ac_cv_lib_crypt_crypt=no
ac_cv_func_getpgrp_void=no
ac_cv_func_memcmp_working=yes
ac_cv_lib_dl_dlopen=no
- rb_cv_binary_elf=no
- rb_cv_negative_time_t=no
+ rb_cv_negative_time_t=yes
ac_cv_func_fcntl=yes
ac_cv_func_flock=yes
ac_cv_func_gmtime_r=yes
rb_cv_large_fd_select=yes
ac_cv_type_struct_timeval=yes
- ac_cv_func_clock_gettime=yes
- ac_cv_func_clock_getres=yes
ac_cv_func_malloc_usable_size=no
ac_cv_type_off_t=yes
ac_cv_sizeof_off_t=8
AS_IF([test "$target_cpu" = x64], [
ac_cv_func___builtin_setjmp=yes
ac_cv_func_round=no
- rb_cv_coroutine=yes
])
ac_cv_func_tgamma=no
- rb_cv_negative_time_t=yes
AC_CHECK_TYPE([NET_LUID], [], [],
[@%:@include <winsock2.h>
@%:@include <iphlpapi.h>])
@@ -1037,12 +1252,43 @@ main()
ac_cv_func___builtin_setjmp=no
])
],
+[emscripten*], [LIBS="-lm -lc $LIBS"
+ RUBY_APPEND_OPTIONS(LDFLAGS, "-sALLOW_MEMORY_GROWTH=1")
+ RUBY_APPEND_OPTIONS(LDFLAGS, "-sASYNCIFY")
+ RUBY_APPEND_OPTIONS(LDFLAGS, "-sFORCE_FILESYSTEM=1")
+ ac_cv_func_shutdown=no
+ ],
+[wasi*],[ LIBS="-lm -lwasi-emulated-mman -lwasi-emulated-signal -lwasi-emulated-getpid -lwasi-emulated-process-clocks $LIBS"
+ RUBY_APPEND_OPTIONS(CFLAGS, -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_GETPID -D_WASI_EMULATED_PROCESS_CLOCKS)
+ RUBY_APPEND_OPTIONS(CPPFLAGS, -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_GETPID -D_WASI_EMULATED_PROCESS_CLOCKS)
+ POSTLINK="\$(WASMOPT) --asyncify \$(wasmoptflags) --pass-arg=asyncify-ignore-imports -o \$@ \$@${POSTLINK:+; $POSTLINK}"
+ # wasi-libc's sys/socket.h is not compatible with -std=gnu99,
+ # so re-declare shutdown in include/ruby/missing.h
+ ac_cv_func_shutdown=no
+ ],
[ LIBS="-lm $LIBS"])
: ${ORIG_LIBS=$LIBS}
+AS_IF([test -n "${rb_there_is_in_fact_no_gplusplus_but_autoconf_is_cheating_us}"], [
+ AC_MSG_NOTICE([Test skipped due to lack of a C++ compiler.])
+],
+[test -n "${CXX}"], [
+ RUBY_WERROR_FLAG([
+ AC_MSG_CHECKING([whether CXXFLAGS is valid])
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <cstdio>]], [[]])],
+ [AC_MSG_RESULT(yes)],[
+ AC_MSG_RESULT(no)
+ # The message mentions CXXFLAGS, but CPPFLAGS might also affects.
+ AC_MSG_WARN([something wrong with CXXFLAGS="$CXXFLAGS"])
+ CXX=false
+ ])
+ AC_LANG_POP(C++)
+ ])
+])
+
AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
-AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris
dnl Checks for header files.
@@ -1051,7 +1297,11 @@ dnl AC_HEADER_STDC has been checked in AC_USE_SYSTEM_EXTENSIONS
AC_HEADER_STDBOOL
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(a.out.h)
+AC_CHECK_HEADERS([afunix.h], [], [],
+[#ifdef _WIN32
+# include <winsock2.h>
+#endif
+])
AC_CHECK_HEADERS(atomic.h)
AC_CHECK_HEADERS(copyfile.h)
AC_CHECK_HEADERS(direct.h)
@@ -1073,6 +1323,7 @@ AC_CHECK_HEADERS(sanitizer/asan_interface.h)
AC_CHECK_HEADERS(sanitizer/msan_interface.h)
AC_CHECK_HEADERS(setjmpex.h)
AC_CHECK_HEADERS(stdalign.h)
+AC_CHECK_HEADERS(stdio.h)
AC_CHECK_HEADERS(sys/attr.h)
AC_CHECK_HEADERS(sys/eventfd.h)
AC_CHECK_HEADERS(sys/fcntl.h)
@@ -1082,6 +1333,7 @@ AC_CHECK_HEADERS(sys/ioctl.h)
AC_CHECK_HEADERS(sys/mkdev.h)
AC_CHECK_HEADERS(sys/param.h)
AC_CHECK_HEADERS(sys/prctl.h)
+AC_CHECK_HEADERS(sys/random.h)
AC_CHECK_HEADERS(sys/resource.h)
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(sys/sendfile.h)
@@ -1096,12 +1348,13 @@ AC_CHECK_HEADERS(syscall.h)
AC_CHECK_HEADERS(time.h)
AC_CHECK_HEADERS(ucontext.h)
AC_CHECK_HEADERS(utime.h)
+AC_CHECK_HEADERS(stdatomic.h)
+
+AS_CASE("$target_cpu", [x64|x86_64|i[3-6]86*], [
+ AC_CHECK_HEADERS(x86intrin.h)
+])
+RUBY_UNIVERSAL_CHECK_HEADER([x86_64, i386], x86intrin.h)
-AC_ARG_WITH([gmp],
- [AS_HELP_STRING([--without-gmp],
- [disable GNU GMP to accelerate Bignum operations])],
- [],
- [with_gmp=yes])
AS_IF([test "x$with_gmp" != xno],
[AC_CHECK_HEADERS(gmp.h)
AS_IF([test "x$ac_cv_header_gmp_h" != xno],
@@ -1112,42 +1365,58 @@ AC_ARG_WITH([jemalloc],
[AS_HELP_STRING([--with-jemalloc],[use jemalloc allocator])],
[with_jemalloc=$withval], [with_jemalloc=no])
AS_IF([test "x$with_jemalloc" != xno],[
- AC_SEARCH_LIBS([malloc_conf], [jemalloc],
- [
- AC_DEFINE(HAVE_LIBJEMALLOC, 1)
- with_jemalloc=yes
- ],
- [test x$with_jemalloc = xyes && with_jemalloc=no])
- AC_CHECK_HEADER(jemalloc/jemalloc.h, [
- AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
- ],
- [test x$with_jemalloc = xyes && with_jemalloc=no])
- AS_IF([test "x$with_jemalloc" != xyes], [
- AC_CACHE_CHECK([for jemalloc with JEMALLOC_MANGLE], rb_cv_jemalloc_demangle,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@define JEMALLOC_MANGLE 1
- @%:@ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
- @%:@include RUBY_ALTERNATIVE_MALLOC_HEADER
- @%:@else
- @%:@include <jemalloc.h>
- @%:@endif], [return !&malloc_conf])],
- [rb_cv_jemalloc_demangle=yes],
- [rb_cv_jemalloc_demangle=no])
- ])
+ # find jemalloc header first
+ save_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${INCFLAGS} ${CPPFLAGS}"
+ malloc_header=
+ AC_CHECK_HEADER(jemalloc/jemalloc.h, [malloc_header=jemalloc/jemalloc.h], [
+ AC_CHECK_HEADER(jemalloc.h, [malloc_header=jemalloc.h])
])
- AS_IF([test "x$rb_cv_jemalloc_demangle" = xyes], [
- AC_DEFINE(JEMALLOC_MANGLE)
- with_jemalloc=yes
+ AS_IF([test "$malloc_header" != ""], [
+ AC_DEFINE_UNQUOTED(RUBY_ALTERNATIVE_MALLOC_HEADER, [<$malloc_header>])
+ ])
+ save_LIBS="$LIBS"
+ AC_CACHE_CHECK([for jemalloc library], rb_cv_jemalloc_library, [
+ rb_cv_jemalloc_library=no
+ # try [with mangle, without mangle] x [no more additional
+ # libraries, adding jemalloc] combination, using the jemalloc
+ # header found above.
+ for mangle in '' mangle; do
+ for lib in '' -ljemalloc; do
+ LIBS="${lib:+$lib }$LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([${mangle:+@%:@define JEMALLOC_MANGLE 1}
+ @%:@include <stdio.h>
+ @%:@ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
+ @%:@include RUBY_ALTERNATIVE_MALLOC_HEADER
+ @%:@else
+ extern const char *malloc_conf;
+ @%:@endif],
+ [/* access at runtime not to be optimized away */
+ if (malloc_conf) printf("malloc_conf=%s\n", malloc_conf);])],
+ [rb_cv_jemalloc_library="${lib:-none required}${mangle:+ with mangle}"])
+ LIBS="$save_LIBS"
+ test "${rb_cv_jemalloc_library}" = no || break 2
+ done
+ done
])
+ CPPFLAGS="${save_CPPFLAGS}"
+ unset save_CPPFLAGS
+ with_jemalloc=${rb_cv_jemalloc_library}
AS_CASE(["$with_jemalloc"],
- [yes],
- [
- AC_DEFINE(HAVE_MALLOC_CONF)
- ac_cv_func_malloc_usable_size=yes
- ],
- [no],
- [AC_MSG_ERROR([jemalloc requested but not found])
+ [no],
+ [AC_MSG_ERROR([jemalloc requested but not found])],
+ [-l*], [
+ set dummy $with_jemalloc
+ LIBS="$2 $LIBS"
+ DLDLIBS="$2${DLDLIBS:+ $DLDLIBS}" # probably needed also in extension libraries
])
-])
+ AS_CASE(["$with_jemalloc"],
+ [*" with mangle"], [
+ AC_DEFINE(JEMALLOC_MANGLE)
+ ])
+ AC_DEFINE(HAVE_MALLOC_CONF)
+ ac_cv_func_malloc_usable_size=yes
+]) # with_jemalloc
dnl check for large file stuff
mv confdefs.h confdefs1.h
@@ -1187,7 +1456,7 @@ AS_CASE(["$target_os"],
])
])
-AC_C_BIGENDIAN
+AC_C_BIGENDIAN([], [], [], [AC_DEFINE(AC_APPLE_UNIVERSAL_BUILD, 1)])
AC_C_CONST
AC_C_CHAR_UNSIGNED
AC_C_INLINE
@@ -1225,8 +1494,8 @@ AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct,
"__pragma(pack(push, 1)) x __pragma(pack(pop))" \
"x __attribute__((packed))" \
; do
- AC_TRY_COMPILE([@%:@define PACKED_STRUCT(x) $mac
- PACKED_STRUCT(struct { int a; });], [],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define PACKED_STRUCT(x) $mac
+ PACKED_STRUCT(struct { int a; });]], [[]])],
[rb_cv_packed_struct=$mac; break])
done])
AS_IF([test "$rb_cv_packed_struct" != no], [
@@ -1265,132 +1534,58 @@ RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID, [@%:@ifdef HAVE_TIME_H
@%:@ include <sys/time.h>
@%:@endif])
-AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
- [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
- rb_cv_have_prototypes=yes,
- rb_cv_have_prototypes=no)])
-AS_IF([test "$rb_cv_have_prototypes" = yes], [
- AC_DEFINE(HAVE_PROTOTYPES)
-])
-
-AC_CACHE_CHECK(token paste string, rb_cv_tokenpaste,
- [AC_TRY_COMPILE([@%:@define paste(a,b) a@%:@@%:@b],
- [int xy = 1; return paste(x,y);],
- rb_cv_tokenpaste=ansi,
- rb_cv_tokenpaste=knr)])
-AS_IF([test "$rb_cv_tokenpaste" = ansi], [
- AC_DEFINE(TOKEN_PASTE(x,y),[x@%:@@%:@y])
-], [
- AC_DEFINE(TOKEN_PASTE(x,y),[x/**/y])
-])
-
-AC_CACHE_CHECK(stringization, rb_cv_stringization, [
- rb_cv_stringization=no
- for string in "#expr" '"expr"'; do
- AC_COMPILE_IFELSE([
- AC_LANG_BOOL_COMPILE_TRY([
-#define STRINGIZE0(expr) $string
-#define STRINGIZE(expr) STRINGIZE0(expr)
-#undef real_test_for_stringization
-#define test_for_stringization -.real_test_for_stringization.-
-const char stringized[[]] = STRINGIZE(test_for_stringization);
-], [sizeof(stringized) == 32])],
- [rb_cv_stringization="$string"; break],
- [rb_cv_stringization=no])
- done]
-)
-AC_DEFINE(STRINGIZE(expr),STRINGIZE0(expr))
-AS_IF([test x"$rb_cv_stringization" != xno -a "$rb_cv_stringization" != "#expr"], [
- AC_DEFINE_UNQUOTED(STRINGIZE0(expr),$rb_cv_stringization)
- AC_DEFINE(OLD_FASHIONED_STRINGIZATION,1)
-])
-
-AC_CACHE_CHECK([string literal concatenation],
- rb_cv_string_literal_concatenation, [
- AC_COMPILE_IFELSE([
- AC_LANG_BOOL_COMPILE_TRY([
-const char concatenated_literal[[]] = "literals" "to"
- "be" "concatenated.";
-], [sizeof(concatenated_literal) == 26])],
- [rb_cv_string_literal_concatenation=yes],
- [rb_cv_string_literal_concatenation=no])]
-)
-AS_IF([test "$rb_cv_string_literal_concatenation" = no], [
- AC_MSG_ERROR([No string literal concatenation])
-])
-
-AC_CACHE_CHECK(for variable length prototypes and stdarg.h, rb_cv_stdarg,
- [AC_TRY_COMPILE([
-#include <stdarg.h>
-int foo(int x, ...) {
- va_list va;
- va_start(va, x);
- va_arg(va, int);
- va_arg(va, char *);
- va_arg(va, double);
- return 0;
-}
-], [return foo(10, "", 3.14);],
- rb_cv_stdarg=yes,
- rb_cv_stdarg=no)])
-AS_IF([test "$rb_cv_stdarg" = yes], [
- AC_DEFINE(HAVE_STDARG_PROTOTYPES)
-])
-
+# __VA_ARGS__ is also tested in AC_PROG_CC_C99 since autoconf 2.60a (around
+# 2006). The check below is redundant and should always success. Remain not
+# deleted for backward compat.
AC_CACHE_CHECK(for variable length macro, rb_cv_va_args_macro,
- [AC_TRY_COMPILE([
-int foo(int x, ...);
-@%:@define FOO(a, ...) foo(a, @%:@@%:@__VA_ARGS__)
-], [FOO(1);FOO(1,2);FOO(1,2,3);],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+int foo(const char*);
+@%:@define FOO(...) foo(@%:@__VA_ARGS__)
+]], [[FOO(1);FOO(1,2);FOO(1,2,3);]])],
rb_cv_va_args_macro=yes,
rb_cv_va_args_macro=no)])
AS_IF([test "$rb_cv_va_args_macro" = yes], [
AC_DEFINE(HAVE_VA_ARGS_MACRO)
])
-AC_CACHE_CHECK([for alignas() syntax], rb_cv_have_alignas, [
-rb_cv_have_alignas=no
-RUBY_WERROR_FLAG([
-for attr in \
- "_Alignas(x)" \
- "alignas(x)" \
- "@<:@@<:@alignas(x)@:>@@:>@" \
- "__declspec(aligned(x))" \
- "__attribute__((__aligned__(x)))" \
-;
-do
- # C11 _Alignas and GCC __attribute__((__aligned__)) behave
- # slightly differently. What we want is GCC's. Check that
- # here by something C11 does not allow (`struct ALIGNAS ...`)
- AC_TRY_COMPILE(
- [@%:@define ALIGNAS(x) $attr
- struct ALIGNAS(128) conftest_tag { int foo; } foo; ], [],
- [rb_cv_have_alignas="$attr"; break], [])
-done
-])])
-AS_IF([test "$rb_cv_have_alignas" != no], [
- AC_DEFINE_UNQUOTED([RUBY_ALIGNAS(x)], $rb_cv_have_alignas)
+# We want C11's `_Alignof`. GCC (and alike) have `__alignof__`, which behave
+# slightly differently than the C11's. We cannot use `__alignof__` for our
+# purpose. The problem is, however, that old gcc and old clang had both
+# implemented `_Alignof` as a synonym of `__alignof__`. They are not what we
+# want. We have to check sanity.
+#
+# See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
+# See also: https://bugs.llvm.org/show_bug.cgi?id=26547
+AC_CACHE_CHECK([if _Alignof() works], rb_cv_have__alignof,[
+ rb_cv_have__alignof=no
+ RUBY_WERROR_FLAG([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@ifdef HAVE_STDALIGN_H
+ @%:@include <stdalign.h>
+ @%:@endif
+ @%:@ifdef STDC_HEADERS
+ @%:@include <stddef.h>
+ @%:@endif
+ @%:@ifndef __GNUC__
+ @%:@define __extension__
+ @%:@endif
+ ]], [[
+ typedef struct conftest_tag {
+ char _;
+ double d;
+ } T;
+ static int conftest_ary@<:@
+ offsetof(T, d) == __extension__ _Alignof(double)
+ ? 1 : -1
+ @:>@;
+ return conftest_ary@<:@0@:>@;
+ ]])],[
+ rb_cv_have__alignof=yes
+ ],[])
+ ])
])
-
-AC_CACHE_CHECK([for alignof() syntax], rb_cv_have_alignof,[
-rb_cv_have_alignof=no
-RUBY_WERROR_FLAG([
-for expr in \
- "alignof" \
- "_Alignof" \
- "__alignof" \
- "__alignof__" \
-;
-do
- AC_TRY_COMPILE([
- @%:@ifdef HAVE_STDALIGN_H
- @%:@include <stdalign.h>
- @%:@endif],[return (int)$expr(int);],
- [rb_cv_have_alignof="$expr"; break], [])
-done
-])])
-AS_IF([test "$rb_cv_have_alignof" != no], [
- AC_DEFINE_UNQUOTED(RUBY_ALIGNOF, $rb_cv_have_alignof)
+AS_IF([test "$rb_cv_have__alignof" != no], [
+ AC_DEFINE(HAVE__ALIGNOF)
])
RUBY_FUNC_ATTRIBUTE(__const__, CONSTFUNC)
@@ -1398,7 +1593,6 @@ RUBY_FUNC_ATTRIBUTE(__pure__, PUREFUNC)
RUBY_FUNC_ATTRIBUTE(__noreturn__, NORETURN)
RUBY_FUNC_ATTRIBUTE(__deprecated__, DEPRECATED)
RUBY_FUNC_ATTRIBUTE(__deprecated__("by "@%:@n), DEPRECATED_BY(n,x), rb_cv_func_deprecated_by)
-RUBY_TYPE_ATTRIBUTE(__deprecated__ mesg, DEPRECATED_TYPE(mesg,x), rb_cv_type_deprecated)
RUBY_FUNC_ATTRIBUTE(__noinline__, NOINLINE)
RUBY_FUNC_ATTRIBUTE(__always_inline__, ALWAYS_INLINE)
RUBY_FUNC_ATTRIBUTE(__no_sanitize__(san), NO_SANITIZE(san, x), rb_cv_func_no_sanitize)
@@ -1428,6 +1622,17 @@ AS_IF([test "$rb_cv_CentOS6_CXX_workaround" != no],[
AC_DEFINE([RUBY_CXX_DEPRECATED(msg)],
[__attribute__((__deprecated__(msg)))])])
+AC_CACHE_CHECK([for std::nullptr_t], rb_cv_CXX_nullptr, [
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [@%:@include <cstddef>],
+ [static std::nullptr_t const *const conftest = nullptr;])],
+ [rb_cv_CXX_nullptr=yes],
+ [rb_cv_CXX_nullptr=no])
+ AC_LANG_POP()])
+AS_IF([test "$rb_cv_CXX_nullptr" != no],[AC_DEFINE(HAVE_NULLPTR)])
+
if_i386=${universal_binary+[defined __i386__]}
RUBY_FUNC_ATTRIBUTE(__stdcall__, FUNC_STDCALL, rb_cv_func_stdcall, ${if_i386})
RUBY_FUNC_ATTRIBUTE(__cdecl__, FUNC_CDECL, rb_cv_func_cdecl, ${if_i386})
@@ -1439,8 +1644,8 @@ AS_IF([test "$GCC" = yes], [
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
[rb_cv_gcc_function_alias=no
for a in alias weak,alias; do
- AC_TRY_LINK([void foo(void) {}
- void bar(void) __attribute__(($a("foo")));], [bar()],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[void foo(void) {}
+ void bar(void) __attribute__(($a("foo")));]], [[bar()]])],
[rb_cv_gcc_function_alias=$a; break])
done])
AS_IF([test "$rb_cv_gcc_function_alias" != no], [
@@ -1450,16 +1655,18 @@ AS_IF([test "$GCC" = yes], [
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
[RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
])
+])
+{
AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
- AC_TRY_LINK([unsigned char atomic_var;],
- [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
+ [[
__atomic_exchange_n(&atomic_var, 0, __ATOMIC_SEQ_CST);
__atomic_exchange_n(&atomic_var, 1, __ATOMIC_SEQ_CST);
__atomic_fetch_add(&atomic_var, 1, __ATOMIC_SEQ_CST);
__atomic_fetch_sub(&atomic_var, 1, __ATOMIC_SEQ_CST);
__atomic_or_fetch(&atomic_var, 1, __ATOMIC_SEQ_CST);
- ],
+ ]])],
[rb_cv_gcc_atomic_builtins=yes],
[rb_cv_gcc_atomic_builtins=no])])
AS_IF([test "$rb_cv_gcc_atomic_builtins" = yes], [
@@ -1467,15 +1674,15 @@ AS_IF([test "$GCC" = yes], [
])
AC_CACHE_CHECK([for __sync builtins], [rb_cv_gcc_sync_builtins], [
- AC_TRY_LINK([unsigned char atomic_var;],
- [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[unsigned int atomic_var;]],
+ [[
__sync_lock_test_and_set(&atomic_var, 0);
__sync_lock_test_and_set(&atomic_var, 1);
__sync_fetch_and_add(&atomic_var, 1);
__sync_fetch_and_sub(&atomic_var, 1);
__sync_or_and_fetch(&atomic_var, 1);
__sync_val_compare_and_swap(&atomic_var, 0, 1);
- ],
+ ]])],
[rb_cv_gcc_sync_builtins=yes],
[rb_cv_gcc_sync_builtins=no])])
AS_IF([test "$rb_cv_gcc_sync_builtins" = yes], [
@@ -1484,23 +1691,35 @@ AS_IF([test "$GCC" = yes], [
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
[RUBY_WERROR_FLAG(
- [AC_TRY_LINK([volatile int zero;],
- [if (zero) __builtin_unreachable();],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[volatile int zero;]],
+ [[if (zero) __builtin_unreachable();]])],
[rb_cv_func___builtin_unreachable=yes],
[rb_cv_func___builtin_unreachable=no])
])
])
AS_IF([test "$rb_cv_func___builtin_unreachable" = yes], [
- AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()])
+ AC_DEFINE(HAVE___BUILTIN_UNREACHABLE)
])
-])
+
+ AC_CACHE_CHECK(for __assume, rb_cv_func___assume,
+ [RUBY_WERROR_FLAG([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
+ [[__assume(1);]])],
+ [rb_cv_func___assume=yes],
+ [rb_cv_func___assume=no])
+ ])
+ ])
+ AS_IF([test "$rb_cv_func___assume" = yes], [
+ AC_DEFINE(HAVE___ASSUME)
+ ])
+}
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
rb_cv_func_exported=no
RUBY_WERROR_FLAG([
for mac in '__attribute__ ((__visibility__("default")))' '__declspec(dllexport)'; do
- AC_TRY_COMPILE([@%:@define RUBY_FUNC_EXPORTED $mac extern
- RUBY_FUNC_EXPORTED void conftest_attribute_check(void);], [],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@define RUBY_FUNC_EXPORTED $mac extern
+ RUBY_FUNC_EXPORTED void conftest_attribute_check(void);]], [[]])],
[rb_cv_func_exported="$mac"; break])
done
])])
@@ -1516,22 +1735,23 @@ RUBY_DECL_ATTRIBUTE([__nonnull__(n)], [RUBY_FUNC_NONNULL(n,x)], [rb_cv_func_nonn
RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT)
AC_ARG_ENABLE(mathn,
- AS_HELP_STRING([--disable-mathn], [disable canonicalization for mathn]),
- [mathn=$enableval], [mathn=yes])
-test "x$mathn" = xyes || mathn=
-AC_SUBST(MATHN, $mathn)
+ AS_HELP_STRING([--enable-mathn], [enable canonicalization for mathn]),
+ [AC_MSG_ERROR([mathn support has been dropped])])
AC_CACHE_CHECK(for function name string predefined identifier,
rb_cv_function_name_string,
- [rb_cv_function_name_string=no
- RUBY_WERROR_FLAG([
- for func in __func__ __FUNCTION__; do
- AC_TRY_LINK([@%:@include <stdio.h>],
- [puts($func);],
- [rb_cv_function_name_string=$func
- break])
- done
- ])]
+ [AS_CASE(["$target_os"],[openbsd*],[
+ rb_cv_function_name_string=__func__
+ ],[
+ rb_cv_function_name_string=no
+ RUBY_WERROR_FLAG([
+ for func in __func__ __FUNCTION__; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>]],
+ [[puts($func);]])],
+ [rb_cv_function_name_string=$func
+ break])
+ done
+ ])])]
)
AS_IF([test "$rb_cv_function_name_string" != no], [
AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
@@ -1591,16 +1811,21 @@ RUBY_CHECK_SIGNEDNESS(size_t, [AC_MSG_ERROR(size_t is signed)], [],
[@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(ptrdiff_t, size_t, [], [@%:@include <stddef.h>])
+RUBY_CHECK_SIZEOF(dev_t)
RUBY_CHECK_PRINTF_PREFIX(size_t, z)
RUBY_CHECK_PRINTF_PREFIX(ptrdiff_t, t)
-AC_STRUCT_ST_BLKSIZE
-AC_STRUCT_ST_BLOCKS
-AC_STRUCT_ST_RDEV
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct stat.st_blocks])
+AC_CHECK_MEMBERS([struct stat.st_rdev])
RUBY_CHECK_SIZEOF([struct stat.st_size], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
AS_IF([test "$ac_cv_member_struct_stat_st_blocks" = yes], [
RUBY_CHECK_SIZEOF([struct stat.st_blocks], [off_t int long "long long"], [], [@%:@include <sys/stat.h>])
])
RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include <sys/stat.h>])
+RUBY_CHECK_SIZEOF([struct stat.st_dev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
+AS_IF([test "$ac_cv_member_struct_stat_st_rdev" = yes], [
+ RUBY_CHECK_SIZEOF([struct stat.st_rdev], [dev_t int long "long long"], [], [@%:@include <sys/stat.h>])
+])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimespec])
AC_CHECK_MEMBERS([struct stat.st_atimensec])
@@ -1684,9 +1909,9 @@ AS_IF([test "x$rb_cv_type_int64_t" != xno], [
AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address,
[rb_cv_stack_end_address=no
- AC_TRY_LINK(
- [extern void *__libc_stack_end;],
- [if (!__libc_stack_end) return 1;],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[extern void *__libc_stack_end;]],
+ [[if (!__libc_stack_end) return 1;]])],
[rb_cv_stack_end_address="__libc_stack_end"])
])
AS_IF([test $rb_cv_stack_end_address != no], [
@@ -1695,9 +1920,8 @@ AS_IF([test $rb_cv_stack_end_address != no], [
dnl Checks for library functions.
AC_TYPE_GETGROUPS
-AC_TYPE_SIGNAL
AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
-[powerpc-darwin*], [
+[powerpc*-darwin*], [
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
AC_DEFINE(C_ALLOCA)
@@ -1706,8 +1930,8 @@ AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
[universal-darwin*:*ppc*], [
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
- RUBY_DEFINE_IF([defined __powerpc__], C_ALLOCA, 1)
- RUBY_DEFINE_IF([defined __powerpc__], alloca, alloca)
+ RUBY_DEFINE_IF([defined __POWERPC__], C_ALLOCA, 1) # Darwin defines __POWERPC__ for ppc and ppc64 both
+ RUBY_DEFINE_IF([defined __POWERPC__], alloca, alloca)
],
[
AC_FUNC_ALLOCA
@@ -1715,14 +1939,14 @@ AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
AS_IF([test "x$ALLOCA" = "x"], [
AC_CACHE_CHECK([for dynamic size alloca], rb_cv_dynamic_alloca, [
for chk in ok __chkstk; do
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@%:@ifdef HAVE_ALLOCA_H
@%:@include <alloca.h>
@%:@endif
void $chk() {}
int dynamic_alloca_test;
- int dynamic_alloca_result;],
- [dynamic_alloca_result = alloca(dynamic_alloca_test) != 0;],
+ int dynamic_alloca_result;]],
+ [[dynamic_alloca_result = alloca(dynamic_alloca_test) != 0;]])],
[rb_cv_dynamic_alloca=$chk; break])
done])
AS_IF([test "x$rb_cv_dynamic_alloca" = "x__chkstk"], [
@@ -1740,10 +1964,17 @@ AS_CASE(["$target_os"],[freebsd*],[
AC_REPLACE_FUNCS(close)
])
+# dup and dup2 are always available except for WASI
+AS_CASE(["$target_os"],
+ [wasi*], [],
+ [
+ RUBY_REQUIRE_FUNCS(dup dup2)
+ ]
+)
+
AC_REPLACE_FUNCS(acosh)
AC_REPLACE_FUNCS(cbrt)
AC_REPLACE_FUNCS(crypt)
-AC_REPLACE_FUNCS(dup2)
AC_REPLACE_FUNCS(erf)
AC_REPLACE_FUNCS(explicit_bzero)
AC_REPLACE_FUNCS(ffs)
@@ -1761,29 +1992,16 @@ AC_REPLACE_FUNCS(strlcpy)
AC_REPLACE_FUNCS(strstr)
AC_REPLACE_FUNCS(tgamma)
-RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
-RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
-RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
+AC_DEFINE(HAVE_ISFINITE) # C99; backward compatibility
# for missing/setproctitle.c
AS_CASE(["$target_os"],
[aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
-[hpux*], [AC_DEFINE(SPT_TYPE,SPT_PSTAT) ],
[])
AC_CHECK_HEADERS(sys/pstat.h)
-AC_CACHE_CHECK(for signbit, rb_cv_have_signbit,
- [AC_TRY_LINK([
-#include <math.h>
-], [int v = signbit(-0.0);],
- rb_cv_have_signbit=yes,
- rb_cv_have_signbit=no)])
-AS_IF([test "$rb_cv_have_signbit" = yes], [
- AC_DEFINE(HAVE_SIGNBIT)
-], [
- AC_LIBOBJ([signbit])
-])
+AC_DEFINE(HAVE_SIGNBIT) # C99; backward compatibility
AC_FUNC_FORK
@@ -1793,6 +2011,9 @@ AC_CHECK_FUNCS(_longjmp) # used for AC_ARG_WITH(setjmp-type)
test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no
AC_CHECK_FUNCS(arc4random_buf)
AC_CHECK_FUNCS(atan2l atan2f)
+AC_CHECK_DECLS(atomic_signal_fence, [], [], [#include <stdatomic.h>])
+AC_CHECK_FUNCS(chmod)
+AC_CHECK_FUNCS(chown)
AC_CHECK_FUNCS(chroot)
AC_CHECK_FUNCS(chsize)
AC_CHECK_FUNCS(clock_gettime)
@@ -1804,11 +2025,14 @@ AC_CHECK_FUNCS(dirfd)
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dlopen)
AC_CHECK_FUNCS(dladdr)
-AC_CHECK_FUNCS(dup)
AC_CHECK_FUNCS(dup3)
AC_CHECK_FUNCS(eaccess)
AC_CHECK_FUNCS(endgrent)
AC_CHECK_FUNCS(eventfd)
+AC_CHECK_FUNCS(execl)
+AC_CHECK_FUNCS(execle)
+AC_CHECK_FUNCS(execv)
+AC_CHECK_FUNCS(execve)
AC_CHECK_FUNCS(explicit_memset)
AC_CHECK_FUNCS(fcopyfile)
AC_CHECK_FUNCS(fchmod)
@@ -1824,20 +2048,31 @@ AC_CHECK_FUNCS(ftruncate)
AC_CHECK_FUNCS(ftruncate64) # used for Win32 platform
AC_CHECK_FUNCS(getattrlist)
AC_CHECK_FUNCS(getcwd)
+AC_CHECK_FUNCS(getegid)
+AC_CHECK_FUNCS(getentropy)
+AC_CHECK_FUNCS(geteuid)
+AC_CHECK_FUNCS(getgid)
AC_CHECK_FUNCS(getgidx)
AC_CHECK_FUNCS(getgrnam)
AC_CHECK_FUNCS(getgrnam_r)
AC_CHECK_FUNCS(getgroups)
+AC_CHECK_FUNCS(getlogin)
+AC_CHECK_FUNCS(getlogin_r)
AC_CHECK_FUNCS(getpgid)
AC_CHECK_FUNCS(getpgrp)
+AC_CHECK_FUNCS(getppid)
AC_CHECK_FUNCS(getpriority)
+AC_CHECK_FUNCS(getpwnam)
AC_CHECK_FUNCS(getpwnam_r)
+AC_CHECK_FUNCS(getpwuid)
+AC_CHECK_FUNCS(getpwuid_r)
AC_CHECK_FUNCS(getrandom)
AC_CHECK_FUNCS(getresgid)
AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(getsid)
AC_CHECK_FUNCS(gettimeofday) # for making ac_cv_func_gettimeofday
+AC_CHECK_FUNCS(getuid)
AC_CHECK_FUNCS(getuidx)
AC_CHECK_FUNCS(gmtime_r)
AC_CHECK_FUNCS(grantpt)
@@ -1845,6 +2080,7 @@ AC_CHECK_FUNCS(initgroups)
AC_CHECK_FUNCS(ioctl)
AC_CHECK_FUNCS(isfinite)
AC_CHECK_FUNCS(issetugid)
+AC_CHECK_FUNCS(kill)
AC_CHECK_FUNCS(killpg)
AC_CHECK_FUNCS(lchmod)
AC_CHECK_FUNCS(lchown)
@@ -1865,10 +2101,16 @@ AC_CHECK_FUNCS(memmem)
AC_CHECK_FUNCS(mkfifo)
AC_CHECK_FUNCS(mknod)
AC_CHECK_FUNCS(mktime)
+AC_CHECK_FUNCS(mmap)
+AC_CHECK_FUNCS(mremap)
AC_CHECK_FUNCS(openat)
+AC_CHECK_FUNCS(pclose)
+AC_CHECK_FUNCS(pipe)
AC_CHECK_FUNCS(pipe2)
AC_CHECK_FUNCS(poll)
+AC_CHECK_FUNCS(popen)
AC_CHECK_FUNCS(posix_fadvise)
+AC_CHECK_FUNCS(posix_madvise)
AC_CHECK_FUNCS(posix_memalign)
AC_CHECK_FUNCS(ppoll)
AC_CHECK_FUNCS(pread)
@@ -1907,17 +2149,22 @@ AC_CHECK_FUNCS(spawnv)
AC_CHECK_FUNCS(symlink)
AC_CHECK_FUNCS(syscall)
AC_CHECK_FUNCS(sysconf)
+AC_CHECK_FUNCS(system)
AC_CHECK_FUNCS(tanh)
AC_CHECK_FUNCS(telldir)
AC_CHECK_FUNCS(timegm)
AC_CHECK_FUNCS(times)
AC_CHECK_FUNCS(truncate)
AC_CHECK_FUNCS(truncate64) # used for Win32
+AC_CHECK_FUNCS(tzset)
+AC_CHECK_FUNCS(umask)
AC_CHECK_FUNCS(unsetenv)
AC_CHECK_FUNCS(utimensat)
AC_CHECK_FUNCS(utimes)
AC_CHECK_FUNCS(wait4)
AC_CHECK_FUNCS(waitpid)
+AC_CHECK_FUNCS(__cospi)
+AC_CHECK_FUNCS(__sinpi)
AS_IF([test "x$ac_cv_member_struct_statx_stx_btime" = xyes],
[AC_CHECK_FUNCS(statx)])
@@ -1927,7 +2174,7 @@ AS_CASE(["$ac_cv_func_memset_s:$ac_cv_func_qsort_s"], [*yes*],
AS_IF([test "$ac_cv_func_getcwd" = yes], [
AC_CACHE_CHECK(if getcwd allocates buffer if NULL is given, [rb_cv_getcwd_malloc],
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
@%:@include <stddef.h>
@%:@include <stdio.h>
@%:@ifdef HAVE_UNISTD_H
@@ -1946,11 +2193,11 @@ main(int argc, char **argv)
if (!getcwd(NULL, 0)) return EXIT_FAILURE;
return EXIT_SUCCESS;
}
-],
+]])],
rb_cv_getcwd_malloc=yes,
rb_cv_getcwd_malloc=no,
AS_CASE($target_os,
- [linux*|darwin*|*bsd|cygwin*|mingw*|mswin*],
+ [linux*|darwin*|*bsd|cygwin*|msys*|mingw*|mswin*],
[rb_cv_getcwd_malloc=yes],
[rb_cv_getcwd_malloc=no]))])
AS_IF([test "$rb_cv_getcwd_malloc" = no], [AC_DEFINE(NO_GETCWD_MALLOC, 1)])
@@ -1991,24 +2238,25 @@ AS_IF([test x$rb_cv_builtin___builtin_choose_expr = xyes], [
])
RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatible_p(int, int)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_trap, [__builtin_trap()])
+RUBY_CHECK_BUILTIN_FUNC(__builtin_expect, [__builtin_expect(0, 0)])
AS_IF([test "$ac_cv_func_qsort_r" != no], [
AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r,
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <stdlib.h>
void (qsort_r)(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *, void *),
void *arg);
-],[ ],
+]], [[ ]])],
[rb_cv_gnu_qsort_r=yes],
[rb_cv_gnu_qsort_r=no])
])
AC_CACHE_CHECK(whether qsort_r is BSD version, rb_cv_bsd_qsort_r,
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <stdlib.h>
void (qsort_r)(void *base, size_t nmemb, size_t size,
void *arg, int (*compar)(void *, const void *, const void *));
-],[ ],
+]], [[ ]])],
[rb_cv_bsd_qsort_r=yes],
[rb_cv_bsd_qsort_r=no])
])
@@ -2023,7 +2271,7 @@ void (qsort_r)(void *base, size_t nmemb, size_t size,
AC_CACHE_CHECK(whether atan2 handles Inf as C99, rb_cv_atan2_inf_c99, [
AS_IF([test $ac_cv_func_atan2f:$ac_cv_func_atan2l = yes:yes], [
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
@%:@include <math.h>
@%:@ifdef HAVE_UNISTD_H
@%:@include <unistd.h>
@@ -2041,7 +2289,7 @@ main(int argc, char **argv)
if (fabs(atan2(INFINITY, INFINITY) - M_PI_4) <= 0.01) return EXIT_SUCCESS;
return EXIT_FAILURE;
}
-],
+]])],
[rb_cv_atan2_inf_c99=yes],
[rb_cv_atan2_inf_c99=no],
[AS_CASE($target_os, [mingw*|mswin*], [rb_cv_atan2_inf_c99=no], [rb_cv_atan2_inf_c99=yes])]
@@ -2053,7 +2301,7 @@ AS_IF([test "x$rb_cv_atan2_inf_c99" = xyes], [AC_DEFINE(ATAN2_INF_C99)])
# Some platform need -lrt for clock_gettime, but the other don't.
AS_IF([test x"$ac_cv_func_clock_gettime" != xyes], [
# glibc 2.17 moves clock_* functions from librt to the main C library.
- # http://sourceware.org/ml/libc-announce/2012/msg00001.html
+ # https://sourceware.org/legacy-ml/libc-announce/2012/msg00001.html
AC_CHECK_LIB(rt, clock_gettime)
AS_IF([test x"$ac_cv_lib_rt_clock_gettime" = xyes], [
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
@@ -2070,9 +2318,9 @@ AS_IF([test x"$ac_cv_lib_rt_timer_settime" = xyes], [
])
AC_CACHE_CHECK(for unsetenv returns a value, rb_cv_unsetenv_return_value,
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
-], [int v = unsetenv("foo");],
+]], [[int v = unsetenv("foo");]])],
rb_cv_unsetenv_return_value=yes,
rb_cv_unsetenv_return_value=no)])
AS_IF([test "$rb_cv_unsetenv_return_value" = no], [
@@ -2090,21 +2338,21 @@ AS_IF([test "$use_setreuid" = yes], [
])
AC_STRUCT_TIMEZONE
AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff,
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@define _BSD_SOURCE
@%:@define _DEFAULT_SOURCE
@%:@include <time.h>
- ],
- [struct tm t; t.tm_gmtoff = 3600;],
+ ]],
+ [[struct tm t; t.tm_gmtoff = 3600;]])],
[rb_cv_member_struct_tm_tm_gmtoff=yes],
[rb_cv_member_struct_tm_tm_gmtoff=no])])
AS_IF([test "$rb_cv_member_struct_tm_tm_gmtoff" = yes], [
AC_DEFINE(HAVE_STRUCT_TM_TM_GMTOFF)
])
AC_CACHE_CHECK(for external int daylight, rb_cv_have_daylight,
- [AC_TRY_LINK([#include <time.h>
- int i;],
- [i = daylight;],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
+ int i;]],
+ [[i = daylight;]])],
rb_cv_have_daylight=yes,
rb_cv_have_daylight=no)])
AS_IF([test "$rb_cv_have_daylight" = yes], [
@@ -2112,7 +2360,7 @@ AS_IF([test "$rb_cv_have_daylight" = yes], [
])
AC_CACHE_CHECK(for negative time_t for gmtime(3), rb_cv_negative_time_t,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
#include <time.h>
@@ -2142,7 +2390,7 @@ main()
check(gmtime(&t), 1, 12, 13, 20, 52);
return 0;
}
-],
+]])],
rb_cv_negative_time_t=yes,
rb_cv_negative_time_t=no,
rb_cv_negative_time_t=yes)])
@@ -2151,9 +2399,9 @@ AS_IF([test "$rb_cv_negative_time_t" = yes], [
])
# [ruby-dev:40910] overflow of time on FreeBSD
-# http://www.freebsd.org/cgi/query-pr.cgi?pr=145341
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=145341
AC_CACHE_CHECK(for localtime(3) overflow correctly, rb_cv_localtime_overflow,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
#include <time.h>
@@ -2185,7 +2433,7 @@ main()
check(t);
return 0;
}
-],
+]])],
rb_cv_localtime_overflow=yes,
rb_cv_localtime_overflow=no,
rb_cv_localtime_overflow=no)])
@@ -2198,7 +2446,7 @@ AS_IF([test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = ye
], [
AC_CHECK_FUNCS(sigsetmask)
AC_CACHE_CHECK(for BSD signal semantics, rb_cv_bsd_signal,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <signal.h>
@@ -2216,7 +2464,7 @@ main()
kill(getpid(), SIGINT);
return 0;
}
-],
+]])],
rb_cv_bsd_signal=yes,
rb_cv_bsd_signal=no,
rb_cv_bsd_signal=$ac_cv_func_sigsetmask)])
@@ -2230,7 +2478,7 @@ AC_CHECK_TYPES([sig_t],[],[],[@%:@include <signal.h>])
AS_IF([test "$ac_cv_func_getpgid" = no], [
# AC_FUNC_GETPGRP fails when cross-compiling with old autoconf.
# autoconf is changed between 2.52d and 2.52f?
- # http://lists.gnu.org/archive/html/bug-gnu-utils/2001-09/msg00181.html
+ # https://lists.gnu.org/archive/html/bug-gnu-utils/2001-09/msg00181.html
# "autoconf cleanup for AC_FUNC_GETPGRP and GETPGRP_VOID"
AC_FUNC_GETPGRP
])
@@ -2259,6 +2507,45 @@ AS_IF([test "$rb_cv_rshift_sign" = yes], [
AC_DEFINE(RSHIFT(x,y), (((x)<0) ? ~((~(x))>>(int)(y)) : (x)>>(int)(y)))
])
+AS_IF([test "$ac_cv_func_copy_file_range" = no], [
+ AC_CACHE_CHECK([for copy_file_range],
+ rb_cv_use_copy_file_range,
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#ifndef O_TMPFILE
+ #define O_TMPFILE __O_TMPFILE
+#endif
+
+int
+main()
+{
+#ifdef __NR_copy_file_range
+ int ret, fd_in, fd_out;
+ fd_in = open("/tmp", O_TMPFILE|O_RDWR, S_IRUSR);
+ fd_out = open("/tmp", O_TMPFILE|O_WRONLY, S_IWUSR);
+ ret = syscall(__NR_copy_file_range, fd_in, NULL, fd_out, NULL, 0, 0);
+ close(fd_in);
+ close(fd_out);
+ if (ret == -1) { return 1; }
+ return 0;
+#else
+ return 1;
+#endif
+}
+ ]])],
+ [rb_cv_use_copy_file_range=yes],
+ [rb_cv_use_copy_file_range=no],
+ [rb_cv_use_copy_file_range=no])])
+])
+AS_CASE(["$ac_cv_func_copy_file_range:$rb_cv_use_copy_file_range"], [*yes*], [
+ AC_DEFINE(USE_COPY_FILE_RANGE)
+])
+
AS_CASE(["$ac_cv_func_gettimeofday:$ac_cv_func_clock_gettime"],
[*yes*], [],
[
@@ -2302,93 +2589,124 @@ AS_IF([test "${universal_binary-no}" = yes ], [
AC_ARG_WITH(coroutine,
AS_HELP_STRING([--with-coroutine=IMPLEMENTATION], [specify the coroutine implementation to use]),
- [rb_cv_coroutine=$withval])
-AS_CASE([$rb_cv_coroutine], [yes|''], [
- AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
+ [coroutine_type=$withval], [coroutine_type=])
+AS_CASE([$coroutine_type], [yes|''], [
+ coroutine_type=
AS_CASE(["$target_cpu-$target_os"],
+ [universal-darwin*], [
+ coroutine_type=universal
+ ],
[x*64-darwin*], [
- rb_cv_coroutine=amd64
+ coroutine_type=amd64
+ ],
+ [arm64-darwin*], [
+ coroutine_type=arm64
+ ],
+ # Correct target name is powerpc*-, but Ruby seems to prefer ppc*-.
+ # Notice that Darwin PPC ABI differs from AIX and ELF.
+ # Adding PPC targets for AIX, *BSD and *Linux will require separate implementations.
+ [powerpc-darwin*|ppc-darwin*], [
+ coroutine_type=ppc
+ ],
+ [powerpc64-darwin*|ppc64-darwin*], [
+ coroutine_type=ppc64
],
[x*64-linux*], [
AS_CASE(["$ac_cv_sizeof_voidp"],
- [8], [ rb_cv_coroutine=amd64 ],
- [4], [ rb_cv_coroutine=x86 ],
- [*], [ rb_cv_coroutine= ]
+ [8], [ coroutine_type=amd64 ],
+ [4], [ coroutine_type=x86 ],
+ dnl unknown pointer size, bail out as no Context.h soon.
)
],
[*86-linux*], [
- rb_cv_coroutine=x86
+ coroutine_type=x86
],
- [x64-mingw32], [
- rb_cv_coroutine=win64
+ [x64-mingw*], [
+ coroutine_type=win64
],
- [*86-mingw32], [
- rb_cv_coroutine=win32
+ [*86-mingw*], [
+ coroutine_type=win32
],
- [armv7*-linux*], [
- rb_cv_coroutine=ucontext
+ [arm*-linux*], [
+ coroutine_type=arm32
],
[aarch64-linux*], [
- rb_cv_coroutine=arm64
+ coroutine_type=arm64
],
[powerpc64le-linux*], [
- rb_cv_coroutine=ppc64le
+ coroutine_type=ppc64le
+ ],
+ [riscv64-linux*], [
+ coroutine_type=riscv64
+ ],
+ [x86_64-freebsd*], [
+ coroutine_type=amd64
+ ],
+ [i386-freebsd*], [
+ coroutine_type=x86
+ ],
+ [aarch64-freebsd*], [
+ coroutine_type=arm64
+ ],
+ [x86_64-netbsd*], [
+ coroutine_type=amd64
+ ],
+ [i386-netbsd*], [
+ coroutine_type=x86
+ ],
+ [aarch64-netbsd*], [
+ coroutine_type=arm64
],
[x86_64-openbsd*], [
- rb_cv_coroutine=amd64
+ coroutine_type=amd64
],
[i386-openbsd*], [
- rb_cv_coroutine=x86
+ coroutine_type=x86
],
[*-openbsd*], [
- rb_cv_coroutine=copy
+ coroutine_type=pthread
+ ],
+ [x86_64-dragonfly*], [
+ coroutine_type=amd64
+ ],
+ [*-haiku*], [
+ coroutine_type=pthread
],
- [*], [
- rb_cv_coroutine=ucontext
+ [*-emscripten*], [
+ coroutine_type=emscripten
+ ],
+ [*-wasi*], [
+ coroutine_type=asyncify
+ ],
+ [
+ AC_CHECK_FUNCS([getcontext swapcontext makecontext],
+ [coroutine_type=ucontext],
+ [coroutine_type=pthread; break]
+ )
]
)
- AC_MSG_RESULT(${rb_cv_coroutine})
-])
-COROUTINE_H=coroutine/$rb_cv_coroutine/Context.h
-AS_CASE([$rb_cv_coroutine],
- [copy|ucontext], [
- COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.c
- ],
- [*], [
- COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.'$(ASMEXT)'
- ],
-)
+ AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
+ AC_MSG_RESULT(${coroutine_type})
+])
+COROUTINE_H=coroutine/$coroutine_type/Context.h
+AS_IF([test ! -f "$srcdir/$COROUTINE_H"],
+ [AC_MSG_ERROR('$coroutine_type' is not supported as coroutine)])
+COROUTINE_SRC=coroutine/$coroutine_type/Context.c
+AS_IF([test ! -f "$srcdir/$COROUTINE_SRC"],
+ [COROUTINE_SRC=coroutine/$coroutine_type/Context.'$(ASMEXT)'])
AC_DEFINE_UNQUOTED(COROUTINE_H, ["$COROUTINE_H"])
AC_SUBST(X_COROUTINE_H, [$COROUTINE_H])
AC_SUBST(X_COROUTINE_SRC, [$COROUTINE_SRC])
-AS_IF([test x"$enable_pthread" = xyes], [
- for pthread_lib in thr pthread pthreads c c_r root; do
- AC_CHECK_LIB($pthread_lib, pthread_create,
- rb_with_pthread=yes, rb_with_pthread=no)
- AS_IF([test "$rb_with_pthread" = "yes"], [break])
- done
- AS_IF([test x"$rb_with_pthread" = xyes], [
- AC_DEFINE(_REENTRANT)
- AC_DEFINE(_THREAD_SAFE)
- AC_DEFINE(HAVE_LIBPTHREAD)
- AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include <pthread.h>])
- AS_CASE(["$pthread_lib:$target_os"],
- [c:*], [],
- [root:*], [],
- [c_r:*|*:openbsd*|*:mirbsd*], [LIBS="-pthread $LIBS"],
- [LIBS="-l$pthread_lib $LIBS"])
- ], [
- AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
- ])
+AS_IF([test "$THREAD_MODEL" = pthread], [
AC_CACHE_CHECK([whether pthread_t is scalar type], [rb_cv_scalar_pthread_t], [
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <pthread.h>
- ], [
+ ]], [[
pthread_t thread_id;
thread_id = 0;
if (!thread_id) return 0;
- ], [rb_cv_scalar_pthread_t=yes], [rb_cv_scalar_pthread_t=no])
+ ]])],[rb_cv_scalar_pthread_t=yes],[rb_cv_scalar_pthread_t=no])
])
AS_IF([test x"$rb_cv_scalar_pthread_t" = xyes], [
: # RUBY_CHECK_SIZEOF(pthread_t, [void* int long], [], [@%:@include <pthread.h>])
@@ -2400,28 +2718,29 @@ AS_IF([test x"$enable_pthread" = xyes], [
pthread_get_stackaddr_np pthread_get_stacksize_np \
thr_stksegment pthread_stackseg_np pthread_getthrds_np \
pthread_condattr_setclock \
- pthread_sigmask pthread_setname_np pthread_set_name_np)
+ pthread_setname_np pthread_set_name_np)
+ AS_CASE(["$target_os"],[emscripten*],[ac_cv_func_pthread_sigmask=no],[AC_CHECK_FUNCS(pthread_sigmask)])
AS_CASE(["$target_os"],[aix*],[ac_cv_func_pthread_getattr_np=no],[AC_CHECK_FUNCS(pthread_getattr_np)])
set_current_thread_name=
AS_IF([test "$ac_cv_func_pthread_setname_np" = yes], [
AC_CACHE_CHECK([arguments of pthread_setname_np], [rb_cv_func_pthread_setname_np_arguments],
[rb_cv_func_pthread_setname_np_arguments=
# Linux,AIX, (pthread_self(), name)
- # NetBSD (pthread_self(), name, \"%s\")
+ # NetBSD (pthread_self(), \"%s\", name)
# Darwin (name)
for mac in \
"(pthread_self(), name)" \
- "(pthread_self(), name, \"%s\")" \
+ "(pthread_self(), \"%s\", name)" \
"(name)" \
; do
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <pthread.h>
@%:@ifdef HAVE_PTHREAD_NP_H
@%:@include <pthread_np.h>
@%:@endif
@%:@define SET_THREAD_NAME(name) pthread_setname_np${mac}
- ],
- [if (SET_THREAD_NAME("conftest")) return 1;],
+ ]],
+ [[if (SET_THREAD_NAME("conftest")) return 1;]])],
[rb_cv_func_pthread_setname_np_arguments="${mac}"
break])
done
@@ -2445,8 +2764,8 @@ AS_IF([test x"$enable_pthread" = xyes], [
AS_IF([test x"$ac_cv_header_ucontext_h" = xno], [
AC_CACHE_CHECK([if signal.h defines ucontext_t], [rb_cv_ucontext_in_signal_h],
- [AC_TRY_COMPILE([@%:@include <signal.h>],
- [size_t size = sizeof(ucontext_t);],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <signal.h>]],
+ [[size_t size = sizeof(ucontext_t);]])],
[rb_cv_ucontext_in_signal_h=yes], [rb_cv_ucontext_in_signal_h=no])])
AS_IF([test x"$rb_cv_ucontext_in_signal_h" = xyes], [
AC_DEFINE_UNQUOTED(UCONTEXT_IN_SIGNAL_H, 1)
@@ -2454,28 +2773,28 @@ AS_IF([test x"$ac_cv_header_ucontext_h" = xno], [
])
AS_IF([test x"$ac_cv_header_ucontext_h" = xyes -o x"$rb_cv_ucontext_in_signal_h" = xyes], [
AC_CACHE_CHECK([if mcontext_t is a pointer], [rb_cv_mcontext_t_ptr],
- [AC_TRY_COMPILE([
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <signal.h>
@%:@ifdef HAVE_UCONTEXT_H
@%:@include <ucontext.h>
@%:@endif
mcontext_t test(mcontext_t mc) {return mc+1;}
- ],
- [test(0);],
+ ]],
+ [[test(0);]])],
[rb_cv_mcontext_t_ptr=yes], [rb_cv_mcontext_t_ptr=no])])
AS_IF([test x"$rb_cv_mcontext_t_ptr" = xyes], [
AC_DEFINE_UNQUOTED(DEFINE_MCONTEXT_PTR(mc, uc), mcontext_t mc = (uc)->uc_mcontext)
], [
AC_DEFINE_UNQUOTED(DEFINE_MCONTEXT_PTR(mc, uc), mcontext_t *mc = &(uc)->uc_mcontext)
])
- AS_IF([test x"$rb_with_pthread" = xyes], [
+ AS_IF([test x"$THREAD_MODEL" = xpthread], [
AC_CHECK_FUNCS(getcontext setcontext)
])
])
-AS_IF([test "$ac_cv_func_fork_works" = "yes" -a "$rb_with_pthread" = "yes"], [
+AS_IF([test "$ac_cv_func_fork_works" = "yes" -a x"$THREAD_MODEL" = xpthread], [
AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
@@ -2531,45 +2850,76 @@ main(int argc, char *argv[])
}
return EXIT_SUCCESS;
-}],
+}]])],
rb_cv_fork_with_pthread=yes,
rb_cv_fork_with_pthread=no,
rb_cv_fork_with_pthread=yes)])
test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD)
])
+
+AC_CHECK_HEADERS([sys/user.h])
+AS_IF([test "x$ac_cv_func_mmap" = xyes], [
+ AC_CACHE_CHECK([whether PAGE_SIZE is compile-time const], rb_cv_const_page_size,
+ [malloc_headers=`sed -n '/MALLOC_HEADERS_BEGIN/,/MALLOC_HEADERS_END/p' ${srcdir}/gc.c`
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$malloc_headers
+ typedef char conftest_page[PAGE_SIZE];
+ ]], [[]])],
+ [rb_cv_const_page_size=yes],
+ [rb_cv_const_page_size=no])])
+])
+AS_IF([test "x$rb_cv_const_page_size" = xyes],
+ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 1)],
+ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)]
+)
+
+AS_IF([test "x$ac_cv_func_ioctl" = xyes], [
+ AC_CACHE_CHECK([ioctl request type], rb_cv_ioctl_request_type,
+ [rb_cv_ioctl_request_type=no
+ dnl corresponding NUM2IOCTLREQ needs to be defined
+ for type in "unsigned long:ULONG_MAX" int:INT_MAX; do
+ max=`echo $type | sed 's/.*://'`
+ type=`echo $type | sed 's/:.*//'`
+ RUBY_WERROR_FLAG([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <limits.h>
+ @%:@include <sys/types.h>
+ @%:@if defined(HAVE_SYS_IOCTL_H) && !defined(_WIN32)
+ @%:@include <sys/ioctl.h>
+ @%:@endif
+ ]], [[
+ $type req = $max;
+ if (ioctl(0, req)) {/* do nothing*/};
+ ]])],
+ [rb_cv_ioctl_request_type="$type"])
+ ])
+ test "x$rb_cv_ioctl_request_type" = xno || break
+ done])
+ AS_CASE(["$rb_cv_ioctl_request_type"], [no|int], [],
+ ["unsigned long"], [
+ AC_DEFINE_UNQUOTED(IOCTL_REQ_TYPE, [$rb_cv_ioctl_request_type])
+ AC_DEFINE_UNQUOTED(NUM2IOCTLREQ(num), [NUM2ULONG(num)])
+ ])
+])
+
}
: "runtime section" && {
dnl wheather use dln_a_out or not
AC_ARG_WITH(dln-a-out,
- AS_HELP_STRING([--with-dln-a-out], [use dln_a_out if possible]),
+ AS_HELP_STRING([--with-dln-a-out], [dln_a_out is deprecated]),
[
AS_CASE([$withval],
[yes], [
- AS_IF([test "$enable_shared" = yes], [
- AC_MSG_ERROR(dln_a_out can not make shared library)
- ])
- with_dln_a_out=yes],
- [
- with_dln_a_out=no])], [with_dln_a_out=no])
-
-AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
-[AC_TRY_LINK([],[], [
-AS_CASE(["`head -1 conftest$EXEEXT | tr -dc '\177ELF' | tr '\177' .`"],
-[.ELF*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
-rb_cv_binary_elf=no)])
+ AC_MSG_ERROR(dln_a_out no longer supported)
+ ])
+])
AS_IF([test "$rb_cv_binary_elf" = yes], [
AC_DEFINE(USE_ELF)
- AS_IF([test "$with_dln_a_out" = yes], [
- AC_MSG_ERROR(dln_a_out does not work with ELF)
- ])
AC_CHECK_HEADERS([elf.h elf_abi.h])
AS_IF([test $ac_cv_header_elf_h = yes -o $ac_cv_header_elf_abi_h = yes], [
AC_LIBOBJ([addr2line])
- AS_IF([test "x$compress_debug_sections" = xzlib], [
- AC_CHECK_LIB([z], [uncompress])
- ])
+ AC_CHECK_LIB([z], [uncompress])
])
])
@@ -2581,20 +2931,24 @@ AS_IF([test "$ac_cv_header_mach_o_loader_h" = yes], [
AS_CASE(["$target_os"],
[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu], [
AS_IF([test "$rb_cv_binary_elf" = no], [
- with_dln_a_out=yes
+ AC_MSG_ERROR(Not ELF)
], [
LDFLAGS="$LDFLAGS -rdynamic"
])])
LIBEXT=a
+AC_ARG_WITH(mjit-tabs,
+ AS_HELP_STRING([--without-mjit-tabs], [expand tabs in mjit header]),
+ [AS_IF([test $withval = no], [MJIT_TABS=false])])
+AC_SUBST(MJIT_TABS)dnl
AC_SUBST(DLDFLAGS)dnl
AC_SUBST(ARCH_FLAG)dnl
AC_SUBST(MJIT_HEADER_FLAGS)dnl
AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl
AC_SUBST(MJIT_CC)dnl
-AS_IF([test "$GCC" = "yes"], [
- AS_CASE(["$target_os"],[aix*],[mjit_std_cflag="-std=gnu99"])
-])
+AS_CASE(["$GCC:$target_os"],
+ [yes:aix*], [mjit_std_cflag="-std=gnu99"],
+ [mjit_std_cflag=])
AC_SUBST(MJIT_CFLAGS, [${MJIT_CFLAGS-"-w ${mjit_std_cflag} ${orig_cflags}"}])dnl
AC_SUBST(MJIT_OPTFLAGS, [${MJIT_OPTFLAGS-'$(optflags)'}])dnl
AC_SUBST(MJIT_DEBUGFLAGS, [${MJIT_DEBUGFLAGS-'$(debugflags)'}])dnl
@@ -2605,13 +2959,12 @@ AC_SUBST(CCDLFLAGS)dnl
AC_SUBST(LDSHARED)dnl
AC_SUBST(LDSHAREDXX)dnl
AC_SUBST(DLEXT)dnl
-AC_SUBST(DLEXT2)dnl
AC_SUBST(LIBEXT)dnl
AC_SUBST(ASMEXT, S)dnl
STATIC=
-AS_IF([test "$with_dln_a_out" != yes], [
+: "dlopen" && {
rb_cv_dlopen=unknown
AC_MSG_CHECKING(whether OS depend dynamic link works)
AS_IF([test "$GCC" = yes], [
@@ -2625,30 +2978,37 @@ AS_IF([test "$with_dln_a_out" != yes], [
# mkmf.rb's have_header() to fail if the desired resource happens to be
# installed in the /usr/local tree.
RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common)],
- [bsdi*|cygwin*|mingw*|aix*|interix*], [ ],
+ [bsdi*|cygwin*|msys*|mingw*|aix*|interix*], [ ],
[
RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
], [
AS_CASE(["$target_os"],
- [hpux*], [CCDLFLAGS="$CCDLFLAGS +Z"],
[solaris*|irix*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
[sunos*], [CCDLFLAGS="$CCDLFLAGS -PIC"],
[esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
[: ${CCDLFLAGS=""}])
])
+}
+EXTSTATIC=
+AC_SUBST(EXTSTATIC)dnl
+AC_ARG_WITH(static-linked-ext,
+ AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
+ [AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static],[no],[],[EXTSTATIC="$withval"])])
+AS_CASE([",$EXTSTATIC,"], [,static,|*,enc,*], [
+ ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
+ EXTOBJS='ext/extinit.$(OBJEXT)'
+ AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
+ AC_SUBST(ENCSTATIC, static)
+], [
+ ENCOBJS='dmyenc.$(OBJEXT)'
+ EXTOBJS='dmyext.$(OBJEXT)'
+])
+AC_SUBST(ENCOBJS)
+AC_SUBST(EXTOBJS)
- AC_ARG_ENABLE(rpath,
- AS_HELP_STRING([--enable-rpath], [embed run path into extension libraries.
- enabled by default on ELF platforms]),
- [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
-
- AS_CASE(["$target_os"],
- [hpux*], [ DLDFLAGS="$DLDFLAGS -E"
- : ${LDSHARED='$(LD) -b'}
- XLDFLAGS="$XLDFLAGS -Wl,-E"
- : ${LIBPATHENV=SHLIB_PATH}
- rb_cv_dlopen=yes],
+: "rpath" && {
+ AS_CASE(["$target_os"],
[solaris*], [ AS_IF([test "$GCC" = yes], [
: ${LDSHARED='$(CC) -shared'}
AS_IF([test "$rb_cv_prog_gnu_ld" = yes], [
@@ -2688,7 +3048,6 @@ AS_IF([test "$with_dln_a_out" != yes], [
rb_cv_dlopen=yes],
[interix*], [ : ${LDSHARED='$(CC) -shared'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
- LIBPATHFLAG=" -L%1\$-s"
rb_cv_dlopen=yes],
[freebsd*|dragonfly*], [
: ${LDSHARED='$(CC) -shared'}
@@ -2707,8 +3066,16 @@ AS_IF([test "$with_dln_a_out" != yes], [
[darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'}
: ${DLDSHARED='$(CC) -dynamiclib'}
: ${LDFLAGS=""}
- : ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
+ : ${LIBPATHENV=DYLD_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
+ AS_IF([test x"$enable_shared" = xyes], [
+ # Resolve symbols from libruby.dylib when --enable-shared
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
+ ], [test "x$EXTSTATIC" = x], [
+ # When building exts as bundles, a mach-o bundle needs to know its loader
+ # program to bind symbols from the ruby executable
+ EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
+ ])
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -2729,7 +3096,7 @@ AS_IF([test "$with_dln_a_out" != yes], [
: ${LDSHARED='$(LD) -Bshareable -x'}
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
rb_cv_dlopen=yes],
- [cygwin*|mingw*], [
+ [cygwin*|msys*|mingw*], [
: ${LDSHARED='$(CC) -shared'}
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
@@ -2740,30 +3107,36 @@ AS_IF([test "$with_dln_a_out" != yes], [
[atheos*], [ : ${LDSHARED='$(CC) -shared'}
rb_cv_dlopen=yes],
[ : ${LDSHARED='$(LD)'}])
- AC_MSG_RESULT($rb_cv_dlopen)
+ AC_MSG_RESULT($rb_cv_dlopen)
+}
- AS_IF([test "$rb_cv_dlopen" = yes], [
+AS_IF([test "$rb_cv_dlopen" = yes], [
AS_CASE(["$target_os"],
- [darwin*], [
+ [darwin*], [
+ AC_SUBST(ADDITIONAL_DLDFLAGS, "")
for flag in \
- "-undefined dynamic_lookup" \
"-multiply_defined suppress" \
+ "-undefined dynamic_lookup" \
; do
- test "x${linker_flag}" = x || flag="${linker_flag}`echo ${flag} | tr ' ' ,`"
- RUBY_TRY_LDFLAGS([$flag], [], [flag=])
- AS_IF([test "x$flag" != x], [
- RUBY_APPEND_OPTIONS(DLDFLAGS, [$flag])
- ])
+ test "x${linker_flag}" = x || flag="${linker_flag}`echo ${flag} | tr ' ' ,`"
+ RUBY_TRY_LDFLAGS([$flag], [], [flag=])
+ AS_IF([test x"$flag" = x], [continue])
+
+ AC_MSG_CHECKING([whether $flag is accepted for bundle])
+ : > conftest.c
+ AS_IF([${LDSHARED%%'$(CC)'*}$CC${LDSHARED@%:@*'$(CC)'} -o conftest.bundle $flag conftest.c >/dev/null 2>conftest.err &&
+ test ! -s conftest.err], [
+ AC_MSG_RESULT([yes])
+ RUBY_APPEND_OPTIONS(DLDFLAGS, [$flag])
+ ], [
+ AC_MSG_RESULT([no])
+ RUBY_APPEND_OPTIONS(ADDITIONAL_DLDFLAGS, [$flag])
+ ])
+ rm -fr conftest.*
done
- ])
- ])
-
- AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [
- AS_IF([test "x$rpathflag" != x], [
- RPATHFLAG=" ${rpathflag}%1\$-s"
- ])
- ])
+ ])
])
+
AS_IF([test "${LDSHAREDXX}" = ""], [
AS_CASE(["${LDSHARED}"],
[*'$(CC)'*], [
@@ -2778,7 +3151,6 @@ AS_IF([test "${LDSHAREDXX}" = ""], [
[ld" "*], [
])
])
-AS_CASE([${RPATHFLAG}],[*'%1$'*],[: ${LIBPATHFLAG=' -L%1$-s'}],[: ${LIBPATHFLAG=' -L%s'}])
AC_SUBST(LINK_SO)
AC_SUBST(LIBPATHFLAG)
@@ -2787,23 +3159,6 @@ AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
AC_SUBST(PRELOADENV, "${PRELOADENV-LD_PRELOAD}")
AC_SUBST(TRY_LINK)
-AS_IF([test "x$OPT_DIR" != x], [
- pat=`echo "${LDFLAGS_OPTDIR}" | sed ['s/[][\\.*|]/\\\\&/']`
- LDFLAGS=`echo "${LDFLAGS}" | sed "s| ${pat}||"`
- val=`IFS="$PATH_SEPARATOR"
- for dir in $OPT_DIR; do
- echo x ${LIBPATHFLAG} ${RPATHFLAG} |
- sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g"
- done | tr '\012' ' ' | sed 's/ *$//'`
- AS_IF([test x"$val" != x], [
- test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
- LDFLAGS="$LDFLAGS$val"
- test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
- DLDFLAGS="$DLDFLAGS$val"
- ])
- LDFLAGS_OPTDIR="$val"
-])
-
AS_CASE(["$target_os"],
[freebsd*], [
AC_CHECK_LIB([procstat], [procstat_open_sysctl])
@@ -2818,6 +3173,15 @@ AS_CASE(["$target_cpu-$target_os"],
AS_IF([test "x$ac_cv_header_execinfo_h" = xyes], [
AC_CHECK_LIB([execinfo], [backtrace])
AC_CHECK_HEADERS([libunwind.h])
+
+ AC_CHECK_HEADERS([mach/task.h mach/mach_init.h mach/mach_port.h])
+ AS_IF([ test \
+ "x${ac_cv_header_mach_task_h}" = xyes -a \
+ "x${ac_cv_header_mach_mach_init_h}" = xyes -a \
+ "x${ac_cv_header_mach_mach_port_h}" = xyes \
+ ], [
+ AC_DEFINE([HAVE_MACH_TASK_EXCEPTION_PORTS], [1])
+ ])
])],
[*-freebsd*|x86_64-netbsd*], [
AC_CHECK_HEADERS([execinfo.h])
@@ -2829,7 +3193,7 @@ AC_CHECK_FUNCS(backtrace)
AS_IF([test "x$ac_cv_func_backtrace" = xyes], [
AC_CACHE_CHECK(for broken backtrace, rb_cv_broken_backtrace,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -2838,6 +3202,7 @@ AS_IF([test "x$ac_cv_func_backtrace" = xyes], [
#include <signal.h>
#include <execinfo.h>
+]`grep '^@%:@ *define *RUBY_SIGALTSTACK_SIZE' ${srcdir}/signal.c`[
#define TRACE_SIZE 256
void sigsegv(int signum, siginfo_t *info, void *ctx){
@@ -2857,12 +3222,12 @@ main(void)
stack_t ss;
struct sigaction sa;
- ss.ss_sp = malloc(SIGSTKSZ);
+ ss.ss_sp = malloc(RUBY_SIGALTSTACK_SIZE);
if (ss.ss_sp == NULL) {
fprintf(stderr, "cannot allocate memory for sigaltstack\n");
return EXIT_FAILURE;
}
- ss.ss_size = SIGSTKSZ;
+ ss.ss_size = RUBY_SIGALTSTACK_SIZE;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) == -1) {
fprintf(stderr, "sigaltstack failed\n");
@@ -2877,7 +3242,7 @@ main(void)
a[0] = 1;
return EXIT_SUCCESS;
}
-],
+]])],
rb_cv_broken_backtrace=no,
rb_cv_broken_backtrace=yes,
rb_cv_broken_backtrace=no)])
@@ -2892,49 +3257,21 @@ AC_ARG_WITH(valgrind,
AS_IF([test x$with_valgrind != xno],
[AC_CHECK_HEADERS(valgrind/memcheck.h)])
-dln_a_out_works=no
-AS_IF([test "$ac_cv_header_a_out_h" = yes], [
- AS_IF([test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown], [
- cat confdefs.h > config.h
- AC_CACHE_CHECK(whether matz's dln works, rb_cv_dln_a_out,
- [AC_TRY_COMPILE([
-#define USE_DLN_A_OUT
-#include "dln.c"
-],
- [],
- rb_cv_dln_a_out=yes,
- rb_cv_dln_a_out=no)])
- AS_IF([test "$rb_cv_dln_a_out" = yes], [
- dln_a_out_works=yes
- AC_DEFINE(USE_DLN_A_OUT)
- ])
- ])
-])
-
-AS_IF([test "$dln_a_out_works" = yes], [
- AS_IF([test "$GCC" = yes], [
- STATIC=-static
- ], [
- STATIC=-Bstatic
- ])
- DLEXT=so
- CCDLFLAGS=
-], [
+: "dlext & soext" && {
AS_CASE(["$target_os"],
- [hpux*], [
- DLEXT=sl],
[darwin*], [
SOEXT=dylib
DLEXT=bundle],
- [cygwin*|mingw*|*djgpp*], [
+ [cygwin*|msys*|mingw*|*djgpp*], [
LOAD_RELATIVE=1
SOEXT=dll
DLEXT=so],
[
DLEXT=so])
-])
: ${SOEXT="${DLEXT}"}
AC_SUBST(SOEXT)
+}
+
AS_IF([test "$rb_cv_dlopen:$load_relative" = yes:yes], [
AS_IF([test "$ac_cv_func_dladdr" = yes], [
LOAD_RELATIVE=1
@@ -2948,47 +3285,32 @@ AS_IF([test x"$LOAD_RELATIVE" = x1], [
len=2 # .rb
n=`expr "$DLEXT" : '.*'`; test "$n" -gt "$len" && len=$n
-n=`expr "$DLEXT2" : '.*'`; test "$n" -gt "$len" && len=$n
AC_DEFINE_UNQUOTED(DLEXT_MAXLEN, `expr $len + 1`)
test ".$DLEXT" = "." || AC_DEFINE_UNQUOTED(DLEXT, ".$DLEXT")
-test ".$DLEXT2" = "." || AC_DEFINE_UNQUOTED(DLEXT2, ".$DLEXT2")
AC_SUBST(DLEXT)
-AS_IF([test "$with_dln_a_out" = yes], [
- STRIP=true
-], [
- AC_CHECK_TOOL(STRIP, strip, :)dnl
-])
-
-AS_CASE(["$target_os"],
- [linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu], [
- STRIP="$STRIP -S -x"],
- [darwin*], [
- STRIP="$STRIP -A -n"])
+: "strip" && {
+ AC_MSG_CHECKING([for $STRIP flags])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM], [AS_IF(
+ ["${STRIP}" -A -n conftest$ac_exeext 2>/dev/null], [
+ AC_MSG_RESULT([-A -n])
+ STRIP="${STRIP} -A -n"
+ ],
+ ["${STRIP}" -S -x conftest$ac_exeext 2>/dev/null], [
+ AC_MSG_RESULT([-S -x])
+ STRIP="${STRIP} -S -x"
+ ], [
+ AC_MSG_RESULT([none needed])
+ ])
+ ])
+}
AC_ARG_WITH(ext,
- AC_HELP_STRING([--with-ext=EXTS],
+ AS_HELP_STRING([--with-ext=EXTS],
[pass to --with-ext option of extmk.rb]))
AC_ARG_WITH(out-ext,
- AC_HELP_STRING([--with-out-ext=EXTS],
+ AS_HELP_STRING([--with-out-ext=EXTS],
[pass to --without-ext option of extmk.rb]))
-EXTSTATIC=
-AC_SUBST(EXTSTATIC)dnl
-AC_ARG_WITH(static-linked-ext,
- AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
- [AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static],[no],[],[EXTSTATIC="$withval"])])
-AS_CASE([",$EXTSTATIC,"], [,static,|*,enc,*], [
- ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
- EXTOBJS='ext/extinit.$(OBJEXT)'
- AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
- AC_SUBST(ENCSTATIC, static)
-], [
- ENCOBJS='dmyenc.$(OBJEXT)'
- EXTOBJS='dmyext.$(OBJEXT)'
-])
-AC_SUBST(ENCOBJS)
-AC_SUBST(EXTOBJS)
-
AC_ARG_WITH(setup,
AS_HELP_STRING([--with-setup=SETUP], [use extension libraries setup]),
[setup=$withval])
@@ -3031,14 +3353,13 @@ AS_IF([test x"${exec_prefix}" != xNONE], [
RUBY_EXEC_PREFIX=$ac_default_prefix
])
pat=`echo "${RUBY_EXEC_PREFIX}" | tr -c '\012' .`'\(.*\)'
-for var in bindir libdir rubylibprefix; do
+for var in bindir includedir libdir rubylibprefix; do
eval val='"$'$var'"'
AS_CASE(["$val"], ["${RUBY_EXEC_PREFIX}"*], [val='${exec_prefix}'"`expr \"$val\" : \"$pat\"`"])
eval $var='"$val"'
done
BTESTRUBY='$(MINIRUBY)'
-BOOTSTRAPRUBY='$(BASERUBY)'
AS_IF([test x"$cross_compiling" = xyes], [
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`$CHDIR .; pwd` "-r'$(arch)-fake'
XRUBY_LIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["libdir"]']`
@@ -3048,6 +3369,10 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
+ AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
+ # darwin target requires miniruby for linking ext bundles
+ PREP="$PREP"' miniruby$(EXEEXT)'
+ ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
@@ -3058,10 +3383,9 @@ AS_IF([test x"$cross_compiling" = xyes], [
MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib -I.'
MINIRUBY="$MINIRUBY"' -I$(EXTOUT)/common'
PREP='miniruby$(EXEEXT)'
- RUNRUBY_COMMAND='$(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
+ RUNRUBY_COMMAND='$(MINIRUBY) $(tooldir)/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
RUNRUBY='$(RUNRUBY_COMMAND) --'
XRUBY='$(RUNRUBY)'
- AS_CASE(["$HAVE_BASERUBY:$build_os"], [no:*|*:mingw*], [BOOTSTRAPRUBY='$(MINIRUBY)'])
TEST_RUNNABLE=yes
CROSS_COMPILING=no
])
@@ -3073,7 +3397,6 @@ AC_SUBST(PREP)
AC_SUBST(RUNRUBY_COMMAND)
AC_SUBST(RUNRUBY)
AC_SUBST(XRUBY)
-AC_SUBST(BOOTSTRAPRUBY)
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
FIRSTMAKEFILE=""
@@ -3084,11 +3407,11 @@ LIBRUBYARG='$(LIBRUBYARG_STATIC)'
SOLIBS='$(MAINLIBS)'
AS_CASE(["$target_os"],
- [cygwin*|mingw*|haiku*|darwin*], [
+ [cygwin*|msys*|mingw*|haiku*|darwin*], [
: ${DLDLIBS=""}
],
[
- DLDLIBS="$DLDLIBS -lc"
+ DLDLIBS="${DLDLIBS:+$DLDLIBS }-lc"
])
AC_ARG_ENABLE(multiarch,
@@ -3154,6 +3477,17 @@ AS_CASE("$enable_shared", [yes], [
AC_DEFINE_UNQUOTED(LIBDIR_BASENAME, ["${libdir_basename}"])
libdir_basename="${libdir_basename}"${multiarch+'/${arch}'}
+ # Debian bullseye reportedly has its ld(1) patched, which breaks
+ # --enable-shared --with-jemalloc combination. We might have to deal with
+ # the ld(1) change sooner or later, but in the meantime let us force it
+ # the old way.
+ #
+ # See https://github.com/ruby/ruby/pull/4627
+ RUBY_TRY_LDFLAGS([${linker_flag}--no-as-needed], [no_as_needed=yes], [no_as_needed=no])
+ AS_IF([test "$no_as_needed" = yes], [
+ RUBY_APPEND_OPTIONS(LDFLAGS, [${linker_flag}--no-as-needed])
+ ])
+
AS_CASE(["$target_os"],
[freebsd*|dragonfly*], [],
[
@@ -3184,6 +3518,10 @@ AS_CASE("$enable_shared", [yes], [
AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
+ ], [test "$load_relative" = yes], [
+ libprefix="'\$\$ORIGIN/../${libdir_basename}'"
+ LIBRUBY_RPATHFLAGS="-Wl,-rpath,${libprefix}"
+ LIBRUBY_RELATIVE=yes
])
],
[netbsd*], [
@@ -3204,11 +3542,13 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)'
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-h${linker_flag:+,}"'$(@F)'])
- XLDFLAGS="$XLDFLAGS "'-R${libdir}'
- ],
- [hpux*], [
- XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)'
- LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
+ AS_IF([test "$load_relative" = yes], [
+ libprefix="'\$\$ORIGIN/../${libdir_basename}'"
+ LIBRUBY_RPATHFLAGS="-R${libprefix}"
+ LIBRUBY_RELATIVE=yes
+ ], [
+ LIBRUBY_RPATHFLAGS='-R${libdir}'
+ ])
],
[aix*], [
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"])
@@ -3236,7 +3576,7 @@ AS_CASE("$enable_shared", [yes], [
[interix*], [
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
],
- [mingw*|cygwin*|mswin*], [
+ [cygwin*|msys*|mingw*|mswin*], [
LIBRUBY_RELATIVE=yes
])
], [
@@ -3295,7 +3635,7 @@ AS_CASE("$cross_compiling:${LIBPATHENV}", [yes:* | no:], [], [
AC_MSG_CHECKING(whether wrapper for $LIBPATHENV is needed)
AS_IF([env ${LIBPATHENV}=/lib /bin/sh -c ': ${'${LIBPATHENV}'?}' 2>/dev/null],
[AC_MSG_RESULT(no)],
- [PREP="$PREP"' exe/$(PROGRAM)'
+ [AC_SUBST(XRUBY_LIBPATHENV_WRAPPER, 'exe/$(PROGRAM)')
AC_MSG_RESULT(yes)]
)
])
@@ -3313,6 +3653,9 @@ AS_CASE(["${enable_dtrace}"],
], [
rb_cv_dtrace_available=no
])
+AS_CASE(["$target_os"],[freebsd*],[
+ rb_cv_dtrace_available=no
+ ])
AS_IF([test "${enable_dtrace}" = yes], [dnl
AS_IF([test -z "$DTRACE"], [dnl
AC_MSG_ERROR([dtrace(1) is missing])
@@ -3407,29 +3750,142 @@ AS_CASE(["$RDOCTARGET:$CAPITARGET"],[nodoc:nodoc],[INSTALLDOC=nodoc],[INSTALLDOC
AC_SUBST(INSTALLDOC)
AC_ARG_ENABLE(jit-support,
- AS_HELP_STRING([--disable-jit-support], [disable JIT features]),
- [MJIT_SUPPORT=$enableval
- AS_IF([test x"$enable_jit_support" = "xyes"],
- [AC_DEFINE(USE_MJIT, 1)],
- [AC_DEFINE(USE_MJIT, 0)])],
- [MJIT_SUPPORT=yes
- AC_DEFINE(USE_MJIT, 1)])
+ AS_HELP_STRING([--disable-jit-support], [disable JIT features]),
+ [MJIT_SUPPORT=$enableval],
+ [AS_CASE(["$target_os"],
+ [wasi | mingw* | solaris*], [MJIT_SUPPORT=no],
+ [MJIT_SUPPORT=yes]
+ )])
+
+AS_IF([test x"$MJIT_SUPPORT" = "xyes"],
+ [AC_DEFINE(USE_MJIT, 1)],
+ [AC_DEFINE(USE_MJIT, 0)])
AC_SUBST(MJIT_SUPPORT)
+AC_CHECK_PROG(RUSTC, [rustc], [rustc], [no]) dnl no ac_tool_prefix
+
+dnl check if rustc is recent enough to build YJIT (rustc >= 1.58.0)
+YJIT_RUSTC_OK=no
+AS_IF([test "$RUSTC" != "no"],
+ AC_MSG_CHECKING([whether ${RUSTC} works for YJIT])
+ YJIT_TARGET_ARCH=
+ AS_CASE(["$target_cpu"],
+ [arm64|aarch64], [YJIT_TARGET_ARCH=aarch64],
+ [x86_64], [YJIT_TARGET_ARCH=x86_64],
+ )
+ dnl Fails in case rustc target doesn't match ruby target.
+ dnl Can happen on Rosetta, for example.
+ AS_IF([echo "#[cfg(target_arch = \"$YJIT_TARGET_ARCH\")] fn main() { let x = 1; format!(\"{x}\"); }" |
+ $RUSTC - --emit asm=/dev/null 2>/dev/null],
+ [YJIT_RUSTC_OK=yes]
+ )
+ AC_MSG_RESULT($YJIT_RUSTC_OK)
+)
+
+dnl check if we can build YJIT on this target platform
+dnl we can't easily cross-compile with rustc so we don't support that
+YJIT_TARGET_OK=no
+AS_IF([test "$cross_compiling" = no],
+ AS_CASE(["$target_cpu-$target_os"],
+ [*android*], [
+ YJIT_TARGET_OK=no
+ ],
+ [arm64-darwin*|aarch64-darwin*|x86_64-darwin*], [
+ YJIT_TARGET_OK=yes
+ ],
+ [arm64-*linux*|aarch64-*linux*|x86_64-*linux*], [
+ YJIT_TARGET_OK=yes
+ ],
+ [arm64-*bsd*|aarch64-*bsd*|x86_64-*bsd*], [
+ YJIT_TARGET_OK=yes
+ ]
+ )
+)
+
+dnl build YJIT in release mode if rustc >= 1.58.0 is present and we are on a supported platform
+AC_ARG_ENABLE(yjit,
+ AS_HELP_STRING([--enable-yjit],
+ [enable in-process JIT compiler that requires Rust build tools. enabled by default on supported platforms if rustc 1.58.0+ is available]),
+ [YJIT_SUPPORT=$enableval],
+ [AS_CASE(["$enable_jit_support:$YJIT_TARGET_OK:$YJIT_RUSTC_OK"],
+ [yes:yes:yes|:yes:yes], [
+ YJIT_SUPPORT=yes
+ ],
+ [YJIT_SUPPORT=no]
+ )]
+)
+
+CARGO=
+CARGO_BUILD_ARGS=
+YJIT_LIBS=
+AS_CASE(["${YJIT_SUPPORT}"],
+[yes|dev|stats|dev_nodebug], [
+ AS_IF([test x"$enable_jit_support" = "xno"],
+ AC_MSG_ERROR([--disable-jit-support but --enable-yjit. YJIT requires JIT support])
+ )
+ AS_IF([test x"$RUSTC" = "xno"],
+ AC_MSG_ERROR([rustc is required. Installation instructions available at https://www.rust-lang.org/tools/install])
+ )
+
+ AS_CASE(["${YJIT_SUPPORT}"],
+ [yes], [
+ rb_rust_target_subdir=release
+ ],
+ [dev], [
+ rb_rust_target_subdir=debug
+ CARGO_BUILD_ARGS='--features stats,disasm'
+ AC_DEFINE(RUBY_DEBUG, 1)
+ ],
+ [dev_nodebug], [
+ rb_rust_target_subdir=dev_nodebug
+ CARGO_BUILD_ARGS='--profile dev_nodebug --features stats,disasm'
+ ],
+ [stats], [
+ rb_rust_target_subdir=stats
+ CARGO_BUILD_ARGS='--profile stats --features stats'
+ AC_DEFINE(YJIT_STATS, 1)
+ ])
+
+ AS_IF([test -n "${CARGO_BUILD_ARGS}"], [
+ AC_CHECK_TOOL(CARGO, [cargo], [no])
+ AS_IF([test x"$CARGO" = "xno"],
+ AC_MSG_ERROR([cargo is required. Installation instructions available at https://www.rust-lang.org/tools/install])
+ ]))
+
+ YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a"
+ AS_CASE(["$target_os"],[openbsd*],[
+ # Link libc++abi (which requires libpthread) for _Unwind_* functions needed by yjit
+ LDFLAGS="$LDFLAGS -lpthread -lc++abi"
+ ])
+ YJIT_OBJ='yjit.$(OBJEXT)'
+ AS_IF([test x"$YJIT_SUPPORT" != "xyes" ], [
+ AC_DEFINE_UNQUOTED(YJIT_SUPPORT, [$YJIT_SUPPORT])
+ ])
+ AC_DEFINE(USE_YJIT, 1)
+], [AC_DEFINE(USE_YJIT, 0)])
+
+dnl These variables end up in ::RbConfig::CONFIG
+AC_SUBST(YJIT_SUPPORT)dnl what flavor of YJIT the Ruby build includes
+AC_SUBST(RUSTC)dnl Rust compiler command
+AC_SUBST(CARGO)dnl Cargo command for Rust builds
+AC_SUBST(CARGO_BUILD_ARGS)dnl for selecting Rust build profiles
+AC_SUBST(YJIT_LIBS)dnl for optionally building the Rust parts of YJIT
+AC_SUBST(YJIT_OBJ)dnl for optionally building the C parts of YJIT
+
AC_ARG_ENABLE(install-static-library,
AS_HELP_STRING([--disable-install-static-library], [do not install static ruby library]),
- [INSTALL_STATIC_LIBRARY=$enableval],
+ [INSTALL_STATIC_LIBRARY=$enableval
+ AS_IF([test x"$enable_shared" = xno -a x"$INSTALL_STATIC_LIBRARY" = xno],
+ [AC_MSG_ERROR([must install either static or shared library])],
+ [])],
AS_IF([test x"$enable_shared" = xyes],
[INSTALL_STATIC_LIBRARY=no],
[INSTALL_STATIC_LIBRARY=yes]))
AC_SUBST(INSTALL_STATIC_LIBRARY)
-AS_IF([test "$rb_with_pthread" = "yes"], [
- THREAD_MODEL=pthread
-])
AC_CACHE_CHECK([for prefix of external symbols], rb_cv_symbol_prefix, [
- AC_TRY_COMPILE([extern void conftest_external(void) {}], [], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern void conftest_external(void) {}]], [[]])],[
rb_cv_symbol_prefix=`$NM conftest.$ac_objext |
sed -n ['/.*T[ ]\([^ ]*\)conftest_external.*/!d;s//\1/p;q']`
],
@@ -3440,7 +3896,7 @@ SYMBOL_PREFIX="$rb_cv_symbol_prefix"
test "x$SYMBOL_PREFIX" = xNONE && SYMBOL_PREFIX=''
DLNOBJ=dln.o
AC_ARG_ENABLE(dln,
- AC_HELP_STRING([--disable-dln], [disable dynamic link feature]),
+ AS_HELP_STRING([--disable-dln], [disable dynamic link feature]),
[test "$enableval" = yes || DLNOBJ=dmydln.o])
AC_SUBST(DLNOBJ)
MINIDLNOBJ=dmydln.o
@@ -3453,16 +3909,30 @@ AS_CASE(["$target_os"],
],
[darwin*], [
RUBY_APPEND_OPTION(CFLAGS, -pipe)
+ AC_MSG_CHECKING([whether Security framework is needed])
AC_COMPILE_IFELSE([
- AC_LANG_BOOL_COMPILE_TRY([@%:@include <AvailabilityMacros.h>],
- [MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7])],
+ AC_LANG_BOOL_COMPILE_TRY([
+@%:@include <AvailabilityMacros.h>
+enum {
+ least = MAC_OS_X_VERSION_10_7, /* just fail if undefined */
+ required = MAC_OS_X_VERSION_MIN_REQUIRED,
+ upper /* bigger than MIN_REQUIRED, or */
+@%:@ifdef MAC_OS_X_VERSION_10_10
+ = MAC_OS_X_VERSION_10_10
+@%:@endif
+};],
+ [required >= least && required < upper])],
[dnl
+ AC_MSG_RESULT(yes)
RUBY_APPEND_OPTION(XLDFLAGS, [-framework Security])
RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework Security])
+ ],dnl
+ [dnl
+ AC_MSG_RESULT(no)
]dnl
)
- RUBY_APPEND_OPTION(XLDFLAGS, [-framework Foundation])
- RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework Foundation])
+ RUBY_APPEND_OPTION(XLDFLAGS, [-framework CoreFoundation])
+ RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework CoreFoundation])
],
[osf*], [
AS_IF([test "$GCC" != "yes" ], [
@@ -3479,7 +3949,7 @@ AS_CASE(["$target_os"],
CFLAGS="$CFLAGS -std"
])
],
- [cygwin*|mingw*], [
+ [cygwin*|msys*|mingw*], [
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
AS_CASE(["$target_os"],
[cygwin*], [
@@ -3494,13 +3964,12 @@ AS_CASE(["$target_os"],
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
])
EXPORT_PREFIX=' '
- DLDFLAGS="${DLDFLAGS}"' $(DEFFILE)'
+ EXTDLDFLAGS='$(DEFFILE)'
AC_LIBOBJ([win32/win32])
AC_LIBOBJ([win32/file])
COMMON_LIBS=m
# COMMON_MACROS="WIN32_LEAN_AND_MEAN="
COMMON_HEADERS="winsock2.h windows.h"
- THREAD_MODEL=win32
PLATFORM_DIR=win32
])
LIBRUBY_ALIASES=''
@@ -3513,21 +3982,20 @@ AS_CASE(["$target_os"],
LIBRUBYARG='-l$(RUBY_SO_NAME)'
])
],
- [hpux*], [
- AS_CASE(["$YACC"],[*yacc*], [
- XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300"
- YACC="$YACC -Nl40000 -Nm40000"
- ])
+ [wasi*], [
+ FIRSTMAKEFILE=GNUmakefile:wasm/GNUmakefile.in
+ AC_LIBOBJ([wasm/missing])
+ AC_LIBOBJ([wasm/runtime])
+ AC_LIBOBJ([wasm/fiber])
+ AC_LIBOBJ([wasm/machine])
+ AC_LIBOBJ([wasm/setjmp])
+ AC_LIBOBJ([wasm/machine_core])
+ AC_LIBOBJ([wasm/setjmp_core])
+ PLATFORM_DIR=wasm
])
MINIOBJS="$MINIDLNOBJ"
-AS_CASE(["$THREAD_MODEL"],
-[pthread], [AC_CHECK_HEADERS(pthread.h)],
-[win32], [],
-[""], [AC_MSG_ERROR(thread model is missing)],
- [AC_MSG_ERROR(unknown thread model $THREAD_MODEL)])
-
AC_ARG_ENABLE(debug-env,
AS_HELP_STRING([--enable-debug-env], [enable RUBY_DEBUG environment variable]),
[AC_SUBST(ENABLE_DEBUG_ENV, yes)])
@@ -3572,13 +4040,12 @@ AS_IF([test "${universal_binary-no}" = yes ], [
AC_CACHE_CHECK([for architecture macros], rb_cv_architecture_macros, [
mv confdefs.h confdefs1.h
: > confdefs.h
- AC_TRY_COMPILE([@%:@if defined __`echo ${universal_archnames} |
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@if defined __`echo ${universal_archnames} |
sed 's/=[^ ]*//g;s/ /__ || defined __/g'`__
@%:@else
@%:@error
>>>>>><<<<<<
-@%:@endif], [],
-[
+@%:@endif]], [[]])],[
rb_cv_architecture_macros=yes
mv -f confdefs1.h confdefs.h
], [
@@ -3591,16 +4058,17 @@ AS_IF([test "${universal_binary-no}" = yes ], [
CFLAGS="$new_cflags -arch $archs"
archs="__${archs}__"
AC_MSG_CHECKING([for macro ${archs} on ${cpu}])
- AC_TRY_COMPILE([@%:@ifndef ${archs}
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@ifndef ${archs}
@%:@error
-@%:@endif], [], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+@%:@endif]], [[]])],
+ [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
done
mv -f confdefs1.h confdefs.h
AC_MSG_ERROR([failed])
])])
AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available,
- AC_TRY_COMPILE([@%:@include <stdio.h>
- const char arch[[]] = __ARCHITECTURE__;], [puts(arch);],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <stdio.h>
+ const char arch[[]] = __ARCHITECTURE__;]], [[puts(arch);]])],
[rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
])
@@ -3668,6 +4136,7 @@ AC_SUBST(EXPORT_PREFIX)
AC_SUBST(SYMBOL_PREFIX)
AC_SUBST(MINIOBJS)
AC_SUBST(THREAD_MODEL)
+AC_SUBST(COROUTINE_TYPE, ${coroutine_type})
AC_SUBST(PLATFORM_DIR)
firstmf=`echo $FIRSTMAKEFILE | sed 's/:.*//'`
@@ -3686,7 +4155,7 @@ test "$program_suffix" != NONE &&
RUBY_INSTALL_NAME="${ri_prefix}"'$(RUBY_BASE_NAME)'"${ri_suffix}"
AS_CASE(["$target_os"],
- [cygwin*|mingw*], [
+ [cygwin*|msys*|mingw*], [
RUBYW_INSTALL_NAME="${ri_prefix}"'$(RUBYW_BASE_NAME)'"${ri_suffix}"
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@@ -3728,6 +4197,7 @@ AS_CASE(["$ruby_version"],
AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [
{
echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
+ echo '@%:@include "confdefs.h"'
echo '#define STRINGIZE(x) x'
test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
echo '#include "version.h"'
@@ -3813,7 +4283,11 @@ AS_IF([test "${universal_binary-no}" = yes ], [
AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-" RUBY_PLATFORM_OS)
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS)
], [
- arch="${target_cpu}-${target_os}"
+ AS_IF([test "${target_os}-${rb_cv_msvcrt}" = "mingw32-ucrt" ], [
+ arch="${target_cpu}-mingw-ucrt"
+ ], [
+ arch="${target_cpu}-${target_os}"
+ ])
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
])
@@ -3895,6 +4369,13 @@ AS_IF([test -z "$MANTYPE"], [
])
AC_SUBST(MANTYPE)
+MKMF_VERBOSE=0
+AC_ARG_ENABLE(mkmf-verbose,
+ AS_HELP_STRING([--enable-mkmf-verbose], [enable verbose in mkmf]),
+ [MKMF_VERBOSE=1],
+ [MKMF_VERBOSE=0])
+AC_SUBST(MKMF_VERBOSE)
+
AC_ARG_ENABLE(rubygems,
AS_HELP_STRING([--disable-rubygems], [disable rubygems by default]),
[enable_rubygems="$enableval"], [enable_rubygems=yes])
@@ -3917,7 +4398,7 @@ guard=INCLUDE_RUBY_CONFIG_H
} | tr -d '\015' |
(
AS_IF([test "x$CONFIGURE_TTY" = xyes], [color=--color], [color=])
- exec ${srcdir}/tool/ifchange $color "${config_h}" -
+ exec ${SHELL} ${tooldir}/ifchange $color "${config_h}" -
) >&AS_MESSAGE_FD || AC_MSG_ERROR([failed to create ${config_h}])
tr -d '\015' < largefile.h > confdefs.h
rm largefile.h
@@ -3948,14 +4429,21 @@ AS_MESSAGE([$PACKAGE library version = $ruby_version])
AS_IF([test x"$CC_WRAPPER" != x], [
CC='$(CC_WRAPPER) '"${CC@%:@$CC_WRAPPER }"
CPP='$(CC_WRAPPER) '"${CPP@%:@$CC_WRAPPER }"
- CC_WRAPPER='$(rubyarchdir)/darwin-cc'
- XCC_WRAPPER='$(top_srcdir)/tool/darwin-cc'
+ XCC_WRAPPER="$CC_WRAPPER"
])
AC_SUBST(CC_WRAPPER, '')
AC_SUBST(XCC_WRAPPER)
AS_CASE([" $CPP "], [*" $CC "*], [CPP=`echo " $CPP " | sed "s| $CC |"' $(CC) |;s/^ *//;s/ *$//'`])
+AS_IF([test ! -f "$srcdir/revision.h"], [
+ AS_IF([test "x$HAVE_BASERUBY" = xyes], [
+ ${BASERUBY} -C "$srcdir" tool/file2lastrev.rb -q --revision.h > "$srcdir/revision.h"
+ ], [
+ touch "$srcdir/revision.h"
+ ])
+])
+
AS_IF([test x"$firstmf" != x], [
AC_CONFIG_FILES($firstmf:$firsttmpl, [], [firstmf="$firstmf" firsttmpl="$firsttmpl"])
])
@@ -3970,19 +4458,26 @@ AC_CONFIG_FILES(Makefile:template/Makefile.in, [
VCS='echo cannot'
])
AS_CASE("$VCS",
- ['$(GIT)'|git], [VCSUP='$(VCS) pull $(GITPULLOPTIONS)'],
+ ['$(GIT)'|git], [VCSUP='$(VCS) pull --rebase $(GITPULLOPTIONS)'],
[VCSUP='$(VCS)'])
- sed -n \
- -e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
- -e 's//\1 = \2/' \
- -e '[s/ \([0-9]\)$/ 0\1/]' \
- -e p \
- -e '}' "$srcdir/version.h"
+ for f in "$srcdir/version.h" "$srcdir/revision.h"; do
+ test -f "$f" || continue
+ sed -n \
+ -e '[/^@%:@define \(RUBY_RELEASE_[A-Z]*\) \([0-9][0-9]*\)/]{' \
+ -e 's//\1 = \2/' \
+ -e '[s/ \([0-9]\)$/ 0\1/]' \
+ -e p \
+ -e '}' "$f"
+ done
sed '/^MISSING/s/\$U\././g;/^VCS *=/s#@VCS@#'"$VCS"'#;/^VCSUP *=/s#@VCSUP@#'"$VCSUP"'#' Makefile
echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)'
AS_IF([test "$gnumake" != yes], [
echo ['$(MKFILES): $(srcdir)/common.mk']
sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk
+ AS_IF([test "$YJIT_SUPPORT" = yes], [
+ cat ${srcdir}/yjit/not_gmake.mk
+ echo ['$(MKFILES): ${srcdir}/yjit/not_gmake.mk']
+ ])
], [
echo 'distclean-local::; @$(RM) GNUmakefile uncommon.mk'
])
@@ -4000,10 +4495,10 @@ AC_CONFIG_FILES(Makefile:template/Makefile.in, [
echo 'ruby: $(PROGRAM);' >> $tmpmk
test "$tmpmk" = "$tmpgmk" || rm -f "$tmpgmk"
]) && mv -f $tmpmk Makefile],
-[EXEEXT='$EXEEXT' gnumake='$gnumake' GIT='$GIT'])
+[EXEEXT='$EXEEXT' MAKE='${MAKE-make}' gnumake='$gnumake' GIT='$GIT' YJIT_SUPPORT='$YJIT_SUPPORT'])
AC_ARG_WITH([ruby-pc],
- AC_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
+ AS_HELP_STRING([--with-ruby-pc=FILENAME], [pc file basename]),
[ruby_pc="$withval"],
[ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"])
AC_SUBST(ruby_pc)
@@ -4014,21 +4509,6 @@ AC_ARG_WITH(destdir,
[DESTDIR="$withval"])
AC_SUBST(DESTDIR)
-AC_CONFIG_FILES($ruby_pc:template/ruby.pc.in,
- [
- AS_IF([sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g;s/@[A-Za-z_][A-Za-z0-9_]*@//'] $ruby_pc > ruby.tmp.pc &&
- {
- test -z "$PKG_CONFIG" ||
- PKG_CONFIG_PATH=. $PKG_CONFIG --print-errors ruby.tmp
- }],
- [
- mv -f ruby.tmp.pc $ruby_pc
- ], [
- exit 1
- ])
- ],
- [ruby_pc='$ruby_pc' PKG_CONFIG='$PKG_CONFIG'])
-
AC_OUTPUT
}
}
@@ -4066,8 +4546,8 @@ config_summary "site libraries path" "$rubysitearchprefix"
config_summary "vendor path" "$vendordir"
config_summary "target OS" "$target_os"
config_summary "compiler" "$CC"
-config_summary "with pthread" "$enable_pthread"
-config_summary "with coroutine" "$rb_cv_coroutine"
+config_summary "with thread" "$THREAD_MODEL"
+config_summary "with coroutine" "$coroutine_type"
config_summary "enable shared libs" "$ENABLE_SHARED"
config_summary "dynamic library ext" "$DLEXT"
config_summary "CFLAGS" "$cflags"
@@ -4079,7 +4559,8 @@ config_summary "debugflags" "$debugflags"
config_summary "warnflags" "$warnflags"
config_summary "strip command" "$STRIP"
config_summary "install doc" "$DOCTARGETS"
-config_summary "JIT support" "$MJIT_SUPPORT"
+config_summary "MJIT support" "$MJIT_SUPPORT"
+config_summary "YJIT support" "$YJIT_SUPPORT"
config_summary "man page type" "$MANTYPE"
config_summary "search path" "$search_path"
config_summary "static-linked-ext" ${EXTSTATIC:+"yes"}
diff --git a/constant.h b/constant.h
index 3f1418df17..e0d36909e1 100644
--- a/constant.h
+++ b/constant.h
@@ -1,3 +1,5 @@
+#ifndef CONSTANT_H
+#define CONSTANT_H
/**********************************************************************
constant.h -
@@ -8,8 +10,8 @@
Copyright (C) 2009 Yusuke Endoh
**********************************************************************/
-#ifndef CONSTANT_H
-#define CONSTANT_H
+#include "ruby/ruby.h"
+#include "id_table.h"
typedef enum {
CONST_DEPRECATED = 0x100,
@@ -39,12 +41,15 @@ VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
void rb_free_const_table(struct rb_id_table *tbl);
+VALUE rb_const_source_location(VALUE, ID);
+
+MJIT_SYMBOL_EXPORT_BEGIN
+int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
+rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
VALUE rb_public_const_get_at(VALUE klass, ID id);
VALUE rb_public_const_get_from(VALUE klass, ID id);
int rb_public_const_defined_from(VALUE klass, ID id);
-rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
-int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
-VALUE rb_const_source_location(VALUE, ID);
VALUE rb_const_source_location_at(VALUE, ID);
+MJIT_SYMBOL_EXPORT_END
#endif /* CONSTANT_H */
diff --git a/cont.c b/cont.c
index 793bce018b..5375d1945b 100644
--- a/cont.c
+++ b/cont.c
@@ -9,19 +9,38 @@
**********************************************************************/
-#include "internal.h"
-#include "vm_core.h"
-#include "gc.h"
-#include "eval_intern.h"
-#include "mjit.h"
-
-#include COROUTINE_H
+#include "ruby/internal/config.h"
#ifndef _WIN32
#include <unistd.h>
#include <sys/mman.h>
#endif
+// On Solaris, madvise() is NOT declared for SUS (XPG4v2) or later,
+// but MADV_* macros are defined when __EXTENSIONS__ is defined.
+#ifdef NEED_MADVICE_PROTOTYPE_USING_CADDR_T
+#include <sys/types.h>
+extern int madvise(caddr_t, size_t, int);
+#endif
+
+#include COROUTINE_H
+
+#include "eval_intern.h"
+#include "gc.h"
+#include "internal.h"
+#include "internal/cont.h"
+#include "internal/error.h"
+#include "internal/proc.h"
+#include "internal/sanitizers.h"
+#include "internal/warnings.h"
+#include "ruby/fiber/scheduler.h"
+#include "mjit.h"
+#include "yjit.h"
+#include "vm_core.h"
+#include "vm_sync.h"
+#include "id_table.h"
+#include "ractor_core.h"
+
static const int DEBUG = 0;
#define RB_PAGE_SIZE (pagesize)
@@ -47,6 +66,11 @@ static VALUE rb_cFiberPool;
#define FIBER_POOL_INITIAL_SIZE 32
#define FIBER_POOL_ALLOCATION_MAXIMUM_SIZE 1024
#endif
+#ifdef RB_EXPERIMENTAL_FIBER_POOL
+#define FIBER_POOL_ALLOCATION_FREE
+#endif
+
+#define jit_cont_enabled (mjit_enabled || rb_yjit_enabled_p())
enum context_type {
CONTINUATION_CONTEXT = 0,
@@ -176,6 +200,15 @@ struct fiber_pool {
size_t vm_stack_size;
};
+// Continuation contexts used by JITs
+struct rb_jit_cont {
+ rb_execution_context_t *ec; // continuation ec
+ struct rb_jit_cont *prev, *next; // used to form lists
+};
+
+// Doubly linked list for enumerating all on-stack ISEQs.
+static struct rb_jit_cont *first_jit_cont;
+
typedef struct rb_context_struct {
enum context_type type;
int argc;
@@ -193,8 +226,7 @@ typedef struct rb_context_struct {
rb_execution_context_t saved_ec;
rb_jmpbuf_t jmpbuf;
rb_ensure_entry_t *ensure_array;
- /* Pointer to MJIT info about the continuation. */
- struct mjit_cont *mjit_cont;
+ struct rb_jit_cont *jit_cont; // Continuation contexts for JITs
} rb_context_t;
@@ -227,12 +259,12 @@ struct rb_fiber_struct {
rb_context_t cont;
VALUE first_proc;
struct rb_fiber_struct *prev;
+ struct rb_fiber_struct *resuming_fiber;
+
BITFIELD(enum fiber_status, status, 2);
- /* If a fiber invokes by "transfer",
- * then this fiber can't be invoked by "resume" any more after that.
- * You shouldn't mix "transfer" and "resume".
- */
- unsigned int transferred : 1;
+ /* Whether the fiber is allowed to implicitly yield. */
+ unsigned int yielding : 1;
+ unsigned int blocking : 1;
struct coroutine_context context;
struct fiber_pool_stack stack;
@@ -240,10 +272,12 @@ struct rb_fiber_struct {
static struct fiber_pool shared_fiber_pool = {NULL, NULL, 0, 0, 0, 0};
+static ID fiber_initialize_keywords[3] = {0};
+
/*
* FreeBSD require a first (i.e. addr) argument of mmap(2) is not NULL
* if MAP_STACK is passed.
- * http://www.FreeBSD.org/cgi/query-pr.cgi?pr=158755
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=158755
*/
#if defined(MAP_STACK) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
#define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON | MAP_STACK)
@@ -254,7 +288,6 @@ static struct fiber_pool shared_fiber_pool = {NULL, NULL, 0, 0, 0, 0};
#define ERRNOMSG strerror(errno)
// Locates the stack vacancy details for the given stack.
-// Requires that fiber_pool_vacancy fits within one page.
inline static struct fiber_pool_vacancy *
fiber_pool_vacancy_pointer(void * base, size_t size)
{
@@ -265,6 +298,24 @@ fiber_pool_vacancy_pointer(void * base, size_t size)
);
}
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+// Compute the base pointer for a vacant stack, for the area which can be poisoned.
+inline static void *
+fiber_pool_stack_poison_base(struct fiber_pool_stack * stack)
+{
+ STACK_GROW_DIR_DETECTION;
+
+ return (char*)stack->base + STACK_DIR_UPPER(RB_PAGE_SIZE, 0);
+}
+
+// Compute the size of the vacant stack, for the area that can be poisoned.
+inline static size_t
+fiber_pool_stack_poison_size(struct fiber_pool_stack * stack)
+{
+ return stack->size - RB_PAGE_SIZE;
+}
+#endif
+
// Reset the current stack pointer and available size of the given stack.
inline static void
fiber_pool_stack_reset(struct fiber_pool_stack * stack)
@@ -324,6 +375,7 @@ fiber_pool_vacancy_push(struct fiber_pool_vacancy * vacancy, struct fiber_pool_v
#ifdef FIBER_POOL_ALLOCATION_FREE
if (head) {
head->previous = vacancy;
+ vacancy->previous = NULL;
}
#endif
@@ -422,6 +474,12 @@ fiber_pool_allocate_memory(size_t * count, size_t stride)
*count = (*count) >> 1;
}
else {
+#if defined(MADV_FREE_REUSE)
+ // On Mac MADV_FREE_REUSE is necessary for the task_info api
+ // to keep the accounting accurate as possible when a page is marked as reusable
+ // it can possibly not occurring at first call thus re-iterating if necessary.
+ while (madvise(base, (*count)*stride, MADV_FREE_REUSE) == -1 && errno == EAGAIN);
+#endif
return base;
}
#endif
@@ -544,7 +602,7 @@ fiber_pool_allocation_free(struct fiber_pool_allocation * allocation)
VM_ASSERT(allocation->used == 0);
- if (DEBUG) fprintf(stderr, "fiber_pool_allocation_free: %p base=%p count=%"PRIuSIZE"\n", allocation, allocation->base, allocation->count);
+ if (DEBUG) fprintf(stderr, "fiber_pool_allocation_free: %p base=%p count=%"PRIuSIZE"\n", (void*)allocation, allocation->base, allocation->count);
size_t i;
for (i = 0; i < allocation->count; i += 1) {
@@ -582,7 +640,8 @@ fiber_pool_allocation_free(struct fiber_pool_allocation * allocation)
// Acquire a stack from the given fiber pool. If none are available, allocate more.
static struct fiber_pool_stack
-fiber_pool_stack_acquire(struct fiber_pool * fiber_pool) {
+fiber_pool_stack_acquire(struct fiber_pool * fiber_pool)
+{
struct fiber_pool_vacancy * vacancy = fiber_pool_vacancy_pop(fiber_pool);
if (DEBUG) fprintf(stderr, "fiber_pool_stack_acquire: %p used=%"PRIuSIZE"\n", (void*)fiber_pool->vacancies, fiber_pool->used);
@@ -606,6 +665,10 @@ fiber_pool_stack_acquire(struct fiber_pool * fiber_pool) {
VM_ASSERT(vacancy);
VM_ASSERT(vacancy->stack.base);
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ __asan_unpoison_memory_region(fiber_pool_stack_poison_base(&vacancy->stack), fiber_pool_stack_poison_size(&vacancy->stack));
+#endif
+
// Take the top item from the free list:
fiber_pool->used += 1;
@@ -631,20 +694,45 @@ fiber_pool_stack_free(struct fiber_pool_stack * stack)
if (DEBUG) fprintf(stderr, "fiber_pool_stack_free: %p+%"PRIuSIZE" [base=%p, size=%"PRIuSIZE"]\n", base, size, stack->base, stack->size);
-#if VM_CHECK_MODE > 0 && defined(MADV_DONTNEED)
+ // The pages being used by the stack can be returned back to the system.
+ // That doesn't change the page mapping, but it does allow the system to
+ // reclaim the physical memory.
+ // Since we no longer care about the data itself, we don't need to page
+ // out to disk, since that is costly. Not all systems support that, so
+ // we try our best to select the most efficient implementation.
+ // In addition, it's actually slightly desirable to not do anything here,
+ // but that results in higher memory usage.
+
+#ifdef __wasi__
+ // WebAssembly doesn't support madvise, so we just don't do anything.
+#elif VM_CHECK_MODE > 0 && defined(MADV_DONTNEED)
// This immediately discards the pages and the memory is reset to zero.
madvise(base, size, MADV_DONTNEED);
#elif defined(MADV_FREE_REUSABLE)
- madvise(base, size, MADV_FREE_REUSABLE);
+ // Darwin / macOS / iOS.
+ // Acknowledge the kernel down to the task info api we make this
+ // page reusable for future use.
+ // As for MADV_FREE_REUSE below we ensure in the rare occasions the task was not
+ // completed at the time of the call to re-iterate.
+ while (madvise(base, size, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN);
#elif defined(MADV_FREE)
+ // Recent Linux.
madvise(base, size, MADV_FREE);
#elif defined(MADV_DONTNEED)
+ // Old Linux.
madvise(base, size, MADV_DONTNEED);
+#elif defined(POSIX_MADV_DONTNEED)
+ // Solaris?
+ posix_madvise(base, size, POSIX_MADV_DONTNEED);
#elif defined(_WIN32)
VirtualAlloc(base, size, MEM_RESET, PAGE_READWRITE);
// Not available in all versions of Windows.
//DiscardVirtualMemory(base, size);
#endif
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ __asan_poison_memory_region(fiber_pool_stack_poison_base(stack), fiber_pool_stack_poison_size(stack));
+#endif
}
// Release and return a stack to the vacancy list.
@@ -664,7 +752,7 @@ fiber_pool_stack_release(struct fiber_pool_stack * stack)
fiber_pool_vacancy_reset(vacancy);
// Push the vacancy into the vancancies list:
- pool->vacancies = fiber_pool_vacancy_push(vacancy, stack->pool->vacancies);
+ pool->vacancies = fiber_pool_vacancy_push(vacancy, pool->vacancies);
pool->used -= 1;
#ifdef FIBER_POOL_ALLOCATION_FREE
@@ -680,17 +768,71 @@ fiber_pool_stack_release(struct fiber_pool_stack * stack)
fiber_pool_stack_free(&vacancy->stack);
}
#else
- // This is entirely optional, but clears the dirty flag from the stack memory, so it won't get swapped to disk when there is memory pressure:
+ // This is entirely optional, but clears the dirty flag from the stack
+ // memory, so it won't get swapped to disk when there is memory pressure:
if (stack->pool->free_stacks) {
fiber_pool_stack_free(&vacancy->stack);
}
#endif
}
+static inline void
+ec_switch(rb_thread_t *th, rb_fiber_t *fiber)
+{
+ rb_execution_context_t *ec = &fiber->cont.saved_ec;
+ rb_ractor_set_current_ec(th->ractor, th->ec = ec);
+ // ruby_current_execution_context_ptr = th->ec = ec;
+
+ /*
+ * timer-thread may set trap interrupt on previous th->ec at any time;
+ * ensure we do not delay (or lose) the trap interrupt handling.
+ */
+ if (th->vm->ractor.main_thread == th &&
+ rb_signal_buff_size() > 0) {
+ RUBY_VM_SET_TRAP_INTERRUPT(ec);
+ }
+
+ VM_ASSERT(ec->fiber_ptr->cont.self == 0 || ec->vm_stack != NULL);
+}
+
+static inline void
+fiber_restore_thread(rb_thread_t *th, rb_fiber_t *fiber)
+{
+ ec_switch(th, fiber);
+ VM_ASSERT(th->ec->fiber_ptr == fiber);
+}
+
static COROUTINE
fiber_entry(struct coroutine_context * from, struct coroutine_context * to)
{
- rb_fiber_start();
+ rb_fiber_t *fiber = to->argument;
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ // Address sanitizer will copy the previous stack base and stack size into
+ // the "from" fiber. `coroutine_initialize_main` doesn't generally know the
+ // stack bounds (base + size). Therefore, the main fiber `stack_base` and
+ // `stack_size` will be NULL/0. It's specifically important in that case to
+ // get the (base+size) of the previous fiber and save it, so that later when
+ // we return to the main coroutine, we don't supply (NULL, 0) to
+ // __sanitizer_start_switch_fiber which royally messes up the internal state
+ // of ASAN and causes (sometimes) the following message:
+ // "WARNING: ASan is ignoring requested __asan_handle_no_return"
+ __sanitizer_finish_switch_fiber(to->fake_stack, (const void**)&from->stack_base, &from->stack_size);
+#endif
+
+ rb_thread_t *thread = fiber->cont.saved_ec.thread_ptr;
+
+#ifdef COROUTINE_PTHREAD_CONTEXT
+ ruby_thread_set_native(thread);
+#endif
+
+ fiber_restore_thread(thread, fiber);
+
+ rb_fiber_start(fiber);
+
+#ifndef COROUTINE_PTHREAD_CONTEXT
+ VM_UNREACHABLE(fiber_entry);
+#endif
}
// Initialize a fiber's coroutine's machine stack and vm stack.
@@ -707,27 +849,19 @@ fiber_initialize_coroutine(rb_fiber_t *fiber, size_t * vm_stack_size)
vm_stack = fiber_pool_stack_alloca(&fiber->stack, fiber_pool->vm_stack_size);
*vm_stack_size = fiber_pool->vm_stack_size;
-#ifdef COROUTINE_PRIVATE_STACK
- coroutine_initialize(&fiber->context, fiber_entry, fiber_pool_stack_base(&fiber->stack), fiber->stack.available, sec->machine.stack_start);
- // The stack for this execution context is still the main machine stack, so don't adjust it.
- // If this is not managed correctly, you will fail in `rb_ec_stack_check`.
-
- // We limit the machine stack usage to the fiber stack size.
- if (sec->machine.stack_maxsize > fiber->stack.available) {
- sec->machine.stack_maxsize = fiber->stack.available;
- }
-#else
coroutine_initialize(&fiber->context, fiber_entry, fiber_pool_stack_base(&fiber->stack), fiber->stack.available);
// The stack for this execution context is the one we allocated:
sec->machine.stack_start = fiber->stack.current;
sec->machine.stack_maxsize = fiber->stack.available;
-#endif
+
+ fiber->context.argument = (void*)fiber;
return vm_stack;
}
-// Release the stack from the fiber, it's execution context, and return it to the fiber pool.
+// Release the stack from the fiber, it's execution context, and return it to
+// the fiber pool.
static void
fiber_stack_release(rb_fiber_t * fiber)
{
@@ -791,24 +925,6 @@ fiber_status_set(rb_fiber_t *fiber, enum fiber_status s)
fiber->status = s;
}
-static inline void
-ec_switch(rb_thread_t *th, rb_fiber_t *fiber)
-{
- rb_execution_context_t *ec = &fiber->cont.saved_ec;
-
- ruby_current_execution_context_ptr = th->ec = ec;
-
- /*
- * timer-thread may set trap interrupt on previous th->ec at any time;
- * ensure we do not delay (or lose) the trap interrupt handling.
- */
- if (th->vm->main_thread == th && rb_signal_buff_size() > 0) {
- RUBY_VM_SET_TRAP_INTERRUPT(ec);
- }
-
- VM_ASSERT(ec->fiber_ptr->cont.self == 0 || ec->vm_stack != NULL);
-}
-
static rb_context_t *
cont_ptr(VALUE obj)
{
@@ -836,6 +952,12 @@ NOINLINE(static VALUE cont_capture(volatile int *volatile stat));
if (!(th)->ec->tag) rb_raise(rb_eThreadError, "not running thread"); \
} while (0)
+rb_thread_t*
+rb_fiber_threadptr(const rb_fiber_t *fiber)
+{
+ return fiber->cont.saved_ec.thread_ptr;
+}
+
static VALUE
cont_thread_value(const rb_context_t *cont)
{
@@ -898,11 +1020,15 @@ cont_mark(void *ptr)
RUBY_MARK_LEAVE("cont");
}
+#if 0
static int
fiber_is_root_p(const rb_fiber_t *fiber)
{
return fiber == fiber->cont.saved_ec.thread_ptr->root_fiber;
}
+#endif
+
+static void jit_cont_free(struct rb_jit_cont *cont);
static void
cont_free(void *ptr)
@@ -919,15 +1045,14 @@ cont_free(void *ptr)
else {
rb_fiber_t *fiber = (rb_fiber_t*)cont;
coroutine_destroy(&fiber->context);
- if (!fiber_is_root_p(fiber)) {
- fiber_stack_release(fiber);
- }
+ fiber_stack_release(fiber);
}
RUBY_FREE_UNLESS_NULL(cont->saved_vm_stack.ptr);
- if (mjit_enabled && cont->mjit_cont != NULL) {
- mjit_cont_free(cont->mjit_cont);
+ if (jit_cont_enabled) {
+ VM_ASSERT(cont->jit_cont != NULL);
+ jit_cont_free(cont->jit_cont);
}
/* free rb_cont_t or rb_fiber_t */
ruby_xfree(ptr);
@@ -1009,10 +1134,10 @@ fiber_free(void *ptr)
rb_fiber_t *fiber = ptr;
RUBY_FREE_ENTER("fiber");
- //if (DEBUG) fprintf(stderr, "fiber_free: %p[%p]\n", fiber, fiber->stack.base);
+ if (DEBUG) fprintf(stderr, "fiber_free: %p[%p]\n", (void *)fiber, fiber->stack.base);
if (fiber->cont.saved_ec.local_storage) {
- st_free_table(fiber->cont.saved_ec.local_storage);
+ rb_id_table_free(fiber->cont.saved_ec.local_storage);
}
cont_free(&fiber->cont);
@@ -1031,8 +1156,10 @@ fiber_memsize(const void *ptr)
* vm.c::thread_memsize already counts th->ec->local_storage
*/
if (saved_ec->local_storage && fiber != th->root_fiber) {
- size += st_memsize(saved_ec->local_storage);
+ size += rb_id_table_memsize(saved_ec->local_storage);
+ size += rb_obj_memsize_of(saved_ec->storage);
}
+
size += cont_memsize(&fiber->cont);
return size;
}
@@ -1040,12 +1167,7 @@ fiber_memsize(const void *ptr)
VALUE
rb_obj_is_fiber(VALUE obj)
{
- if (rb_typeddata_is_kind_of(obj, &fiber_data_type)) {
- return Qtrue;
- }
- else {
- return Qfalse;
- }
+ return RBOOL(rb_typeddata_is_kind_of(obj, &fiber_data_type));
}
static void
@@ -1072,6 +1194,7 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont)
}
FLUSH_REGISTER_WINDOWS;
+ asan_unpoison_memory_region(cont->machine.stack_src, size, false);
MEMCPY(cont->machine.stack, cont->machine.stack_src, VALUE, size);
}
@@ -1096,6 +1219,112 @@ cont_save_thread(rb_context_t *cont, rb_thread_t *th)
sec->machine.stack_end = NULL;
}
+static rb_nativethread_lock_t jit_cont_lock;
+
+// Register a new continuation with execution context `ec`. Return JIT info about
+// the continuation.
+static struct rb_jit_cont *
+jit_cont_new(rb_execution_context_t *ec)
+{
+ struct rb_jit_cont *cont;
+
+ // We need to use calloc instead of something like ZALLOC to avoid triggering GC here.
+ // When this function is called from rb_thread_alloc through rb_threadptr_root_fiber_setup,
+ // the thread is still being prepared and marking it causes SEGV.
+ cont = calloc(1, sizeof(struct rb_jit_cont));
+ if (cont == NULL)
+ rb_memerror();
+ cont->ec = ec;
+
+ rb_native_mutex_lock(&jit_cont_lock);
+ if (first_jit_cont == NULL) {
+ cont->next = cont->prev = NULL;
+ }
+ else {
+ cont->prev = NULL;
+ cont->next = first_jit_cont;
+ first_jit_cont->prev = cont;
+ }
+ first_jit_cont = cont;
+ rb_native_mutex_unlock(&jit_cont_lock);
+
+ return cont;
+}
+
+// Unregister continuation `cont`.
+static void
+jit_cont_free(struct rb_jit_cont *cont)
+{
+ if (!cont) return;
+
+ rb_native_mutex_lock(&jit_cont_lock);
+ if (cont == first_jit_cont) {
+ first_jit_cont = cont->next;
+ if (first_jit_cont != NULL)
+ first_jit_cont->prev = NULL;
+ }
+ else {
+ cont->prev->next = cont->next;
+ if (cont->next != NULL)
+ cont->next->prev = cont->prev;
+ }
+ rb_native_mutex_unlock(&jit_cont_lock);
+
+ free(cont);
+}
+
+// Call a given callback against all on-stack ISEQs.
+void
+rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data)
+{
+ struct rb_jit_cont *cont;
+ for (cont = first_jit_cont; cont != NULL; cont = cont->next) {
+ if (cont->ec->vm_stack == NULL)
+ continue;
+
+ const rb_control_frame_t *cfp;
+ for (cfp = RUBY_VM_END_CONTROL_FRAME(cont->ec) - 1; ; cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp)) {
+ const rb_iseq_t *iseq;
+ if (cfp->pc && (iseq = cfp->iseq) != NULL && imemo_type((VALUE)iseq) == imemo_iseq) {
+ callback(iseq, data);
+ }
+
+ if (cfp == cont->ec->cfp)
+ break; // reached the most recent cfp
+ }
+ }
+}
+
+// Finish working with jit_cont.
+void
+rb_jit_cont_finish(void)
+{
+ if (!jit_cont_enabled)
+ return;
+
+ struct rb_jit_cont *cont, *next;
+ for (cont = first_jit_cont; cont != NULL; cont = next) {
+ next = cont->next;
+ free(cont); // Don't use xfree because it's allocated by calloc.
+ }
+ rb_native_mutex_destroy(&jit_cont_lock);
+}
+
+static void
+cont_init_jit_cont(rb_context_t *cont)
+{
+ VM_ASSERT(cont->jit_cont == NULL);
+ if (jit_cont_enabled) {
+ cont->jit_cont = jit_cont_new(&(cont->saved_ec));
+ }
+}
+
+struct rb_execution_context_struct *
+rb_fiberptr_get_ec(struct rb_fiber_struct *fiber)
+{
+ return &fiber->cont.saved_ec;
+}
+
static void
cont_init(rb_context_t *cont, rb_thread_t *th)
{
@@ -1105,9 +1334,7 @@ cont_init(rb_context_t *cont, rb_thread_t *th)
cont->saved_ec.local_storage = NULL;
cont->saved_ec.local_storage_recursive_hash = Qnil;
cont->saved_ec.local_storage_recursive_hash_for_trace = Qnil;
- if (mjit_enabled) {
- cont->mjit_cont = mjit_cont_new(&cont->saved_ec);
- }
+ cont_init_jit_cont(cont);
}
static rb_context_t *
@@ -1124,6 +1351,29 @@ cont_new(VALUE klass)
return cont;
}
+VALUE
+rb_fiberptr_self(struct rb_fiber_struct *fiber)
+{
+ return fiber->cont.self;
+}
+
+unsigned int
+rb_fiberptr_blocking(struct rb_fiber_struct *fiber)
+{
+ return fiber->blocking;
+}
+
+// Start working with jit_cont.
+void
+rb_jit_cont_init(void)
+{
+ if (!jit_cont_enabled)
+ return;
+
+ rb_native_mutex_initialize(&jit_cont_lock);
+ cont_init_jit_cont(&GET_EC()->fiber_ptr->cont);
+}
+
#if 0
void
show_vm_stack(const rb_execution_context_t *ec)
@@ -1144,17 +1394,14 @@ show_vm_pcs(const rb_control_frame_t *cfp,
while (cfp != end_of_cfp) {
int pc = 0;
if (cfp->iseq) {
- pc = cfp->pc - cfp->iseq->body->iseq_encoded;
+ pc = cfp->pc - ISEQ_BODY(cfp->iseq)->iseq_encoded;
}
fprintf(stderr, "%2d pc: %d\n", i++, pc);
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
}
#endif
-COMPILER_WARNING_PUSH
-#ifdef __clang__
-COMPILER_WARNING_IGNORED(-Wduplicate-decl-specifier)
-#endif
+
static VALUE
cont_capture(volatile int *volatile stat)
{
@@ -1198,7 +1445,7 @@ cont_capture(volatile int *volatile stat)
entry = cont->ensure_array = ALLOC_N(rb_ensure_entry_t,size+1);
for (p=th->ec->ensure_list; p; p=p->next) {
if (!p->entry.marker)
- p->entry.marker = rb_ary_tmp_new(0); /* dummy object */
+ p->entry.marker = rb_ary_hidden_new(0); /* dummy object */
*entry++ = p->entry;
}
entry->marker = 0;
@@ -1219,14 +1466,6 @@ cont_capture(volatile int *volatile stat)
return contval;
}
}
-COMPILER_WARNING_POP
-
-static inline void
-fiber_restore_thread(rb_thread_t *th, rb_fiber_t *fiber)
-{
- ec_switch(th, fiber);
- VM_ASSERT(th->ec->fiber_ptr == fiber);
-}
static inline void
cont_restore_thread(rb_context_t *cont)
@@ -1270,7 +1509,6 @@ cont_restore_thread(rb_context_t *cont)
th->ec->cfp = sec->cfp;
th->ec->raised_flag = sec->raised_flag;
th->ec->tag = sec->tag;
- th->ec->protect_tag = sec->protect_tag;
th->ec->root_lep = sec->root_lep;
th->ec->root_svar = sec->root_svar;
th->ec->ensure_list = sec->ensure_list;
@@ -1311,16 +1549,28 @@ fiber_setcontext(rb_fiber_t *new_fiber, rb_fiber_t *old_fiber)
/* old_fiber->machine.stack_end should be NULL */
old_fiber->cont.saved_ec.machine.stack_end = NULL;
- /* restore thread context */
- fiber_restore_thread(th, new_fiber);
+ // if (DEBUG) fprintf(stderr, "fiber_setcontext: %p[%p] -> %p[%p]\n", (void*)old_fiber, old_fiber->stack.base, (void*)new_fiber, new_fiber->stack.base);
- // if (DEBUG) fprintf(stderr, "fiber_setcontext: %p[%p] -> %p[%p]\n", old_fiber, old_fiber->stack.base, new_fiber, new_fiber->stack.base);
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ __sanitizer_start_switch_fiber(FIBER_TERMINATED_P(old_fiber) ? NULL : &old_fiber->context.fake_stack, new_fiber->context.stack_base, new_fiber->context.stack_size);
+#endif
/* swap machine context */
- coroutine_transfer(&old_fiber->context, &new_fiber->context);
+ struct coroutine_context * from = coroutine_transfer(&old_fiber->context, &new_fiber->context);
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ __sanitizer_finish_switch_fiber(old_fiber->context.fake_stack, NULL, NULL);
+#endif
+
+ if (from == NULL) {
+ rb_syserr_fail(errno, "coroutine_transfer");
+ }
+
+ /* restore thread context */
+ fiber_restore_thread(th, old_fiber);
// It's possible to get here, and new_fiber is already freed.
- // if (DEBUG) fprintf(stderr, "fiber_setcontext: %p[%p] <- %p[%p]\n", old_fiber, old_fiber->stack.base, new_fiber, new_fiber->stack.base);
+ // if (DEBUG) fprintf(stderr, "fiber_setcontext: %p[%p] <- %p[%p]\n", (void*)old_fiber, old_fiber->stack.base, (void*)new_fiber, new_fiber->stack.base);
}
NOINLINE(NORETURN(static void cont_restore_1(rb_context_t *)));
@@ -1331,7 +1581,7 @@ cont_restore_1(rb_context_t *cont)
cont_restore_thread(cont);
/* restore machine stack */
-#ifdef _M_AMD64
+#if defined(_M_AMD64) && !defined(__MINGW64__)
{
/* workaround for x64 SEH */
jmp_buf buf;
@@ -1371,6 +1621,10 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame)
if (&space[0] > end) {
# ifdef HAVE_ALLOCA
volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end);
+ // We need to make sure that the stack pointer is moved,
+ // but some compilers may remove the allocation by optimization.
+ // We hope that the following read/write will prevent such an optimization.
+ *sp = Qfalse;
space[0] = *sp;
# else
cont_restore_0(cont, &space[0]);
@@ -1582,12 +1836,14 @@ rollback_ensure_stack(VALUE self,rb_ensure_list_t *current,rb_ensure_entry_t *ta
/* push ensure stack */
for (j = 0; j < i; j++) {
func = lookup_rollback_func(target[i - j - 1].e_proc);
- if ((VALUE)func != Qundef) {
+ if (!UNDEF_P((VALUE)func)) {
(*func)(target[i - j - 1].data2);
}
}
}
+NORETURN(static VALUE rb_cont_call(int argc, VALUE *argv, VALUE contval));
+
/*
* call-seq:
* cont.call(args, ...)
@@ -1612,9 +1868,6 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
if (cont_thread_value(cont) != th->self) {
rb_raise(rb_eRuntimeError, "continuation called across threads");
}
- if (cont->saved_ec.protect_tag != th->ec->protect_tag) {
- rb_raise(rb_eRuntimeError, "continuation called across stack rewinding barrier");
- }
if (cont->saved_ec.fiber_ptr) {
if (th->ec->fiber_ptr != cont->saved_ec.fiber_ptr) {
rb_raise(rb_eRuntimeError, "continuation called across fiber");
@@ -1626,7 +1879,7 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
cont->value = make_passing_arg(argc, argv);
cont_restore_0(cont, &contval);
- return Qnil; /* unreachable */
+ UNREACHABLE_RETURN(Qnil);
}
/*********/
@@ -1694,6 +1947,26 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
* 1000000
* FiberError: dead fiber called
*
+ * == Non-blocking Fibers
+ *
+ * The concept of <em>non-blocking fiber</em> was introduced in Ruby 3.0.
+ * A non-blocking fiber, when reaching a operation that would normally block
+ * the fiber (like <code>sleep</code>, or wait for another process or I/O)
+ * will yield control to other fibers and allow the <em>scheduler</em> to
+ * handle blocking and waking up (resuming) this fiber when it can proceed.
+ *
+ * For a Fiber to behave as non-blocking, it need to be created in Fiber.new with
+ * <tt>blocking: false</tt> (which is the default), and Fiber.scheduler
+ * should be set with Fiber.set_scheduler. If Fiber.scheduler is not set in
+ * the current thread, blocking and non-blocking fibers' behavior is identical.
+ *
+ * Ruby doesn't provide a scheduler class: it is expected to be implemented by
+ * the user and correspond to Fiber::Scheduler.
+ *
+ * There is also Fiber.schedule method, which is expected to immediately perform
+ * the given block in a non-blocking manner. Its actual implementation is up to
+ * the scheduler.
+ *
*/
static const rb_data_type_t fiber_data_type = {
@@ -1709,7 +1982,7 @@ fiber_alloc(VALUE klass)
}
static rb_fiber_t*
-fiber_t_alloc(VALUE fiber_value)
+fiber_t_alloc(VALUE fiber_value, unsigned int blocking)
{
rb_fiber_t *fiber;
rb_thread_t *th = GET_THREAD();
@@ -1722,6 +1995,7 @@ fiber_t_alloc(VALUE fiber_value)
fiber = ZALLOC(rb_fiber_t);
fiber->cont.self = fiber_value;
fiber->cont.type = FIBER_CONTEXT;
+ fiber->blocking = blocking;
cont_init(&fiber->cont, th);
fiber->cont.saved_ec.fiber_ptr = fiber;
@@ -1738,11 +2012,207 @@ fiber_t_alloc(VALUE fiber_value)
return fiber;
}
+static rb_fiber_t *
+root_fiber_alloc(rb_thread_t *th)
+{
+ VALUE fiber_value = fiber_alloc(rb_cFiber);
+ rb_fiber_t *fiber = th->ec->fiber_ptr;
+
+ VM_ASSERT(DATA_PTR(fiber_value) == NULL);
+ VM_ASSERT(fiber->cont.type == FIBER_CONTEXT);
+ VM_ASSERT(FIBER_RESUMED_P(fiber));
+
+ th->root_fiber = fiber;
+ DATA_PTR(fiber_value) = fiber;
+ fiber->cont.self = fiber_value;
+
+ coroutine_initialize_main(&fiber->context);
+
+ return fiber;
+}
+
+static inline rb_fiber_t*
+fiber_current(void)
+{
+ rb_execution_context_t *ec = GET_EC();
+ if (ec->fiber_ptr->cont.self == 0) {
+ root_fiber_alloc(rb_ec_thread_ptr(ec));
+ }
+ return ec->fiber_ptr;
+}
+
+static inline VALUE
+current_fiber_storage(void)
+{
+ rb_execution_context_t *ec = GET_EC();
+ return ec->storage;
+}
+
+static inline VALUE
+inherit_fiber_storage(void)
+{
+ return rb_obj_dup(current_fiber_storage());
+}
+
+static inline void
+fiber_storage_set(struct rb_fiber_struct *fiber, VALUE storage)
+{
+ fiber->cont.saved_ec.storage = storage;
+}
+
+static inline VALUE
+fiber_storage_get(rb_fiber_t *fiber)
+{
+ VALUE storage = fiber->cont.saved_ec.storage;
+ if (storage == Qnil) {
+ storage = rb_hash_new();
+ fiber_storage_set(fiber, storage);
+ }
+ return storage;
+}
+
+static void
+storage_access_must_be_from_same_fiber(VALUE self)
+{
+ rb_fiber_t *fiber = fiber_ptr(self);
+ rb_fiber_t *current = fiber_current();
+ if (fiber != current) {
+ rb_raise(rb_eArgError, "Fiber storage can only be accessed from the Fiber it belongs to");
+ }
+}
+
+/**
+ * call-seq: fiber.storage -> hash (dup)
+ *
+ * Returns a copy of the storage hash for the fiber. The method can only be called on the
+ * Fiber.current.
+ */
+static VALUE
+rb_fiber_storage_get(VALUE self)
+{
+ storage_access_must_be_from_same_fiber(self);
+ return rb_obj_dup(fiber_storage_get(fiber_ptr(self)));
+}
+
+static int
+fiber_storage_validate_each(VALUE key, VALUE value, VALUE _argument)
+{
+ Check_Type(key, T_SYMBOL);
+
+ return ST_CONTINUE;
+}
+
+static void
+fiber_storage_validate(VALUE value)
+{
+ // nil is an allowed value and will be lazily initialized.
+ if (value == Qnil) return;
+
+ if (!RB_TYPE_P(value, T_HASH)) {
+ rb_raise(rb_eTypeError, "storage must be a hash");
+ }
+
+ if (RB_OBJ_FROZEN(value)) {
+ rb_raise(rb_eFrozenError, "storage must not be frozen");
+ }
+
+ rb_hash_foreach(value, fiber_storage_validate_each, Qundef);
+}
+
+/**
+ * call-seq: fiber.storage = hash
+ *
+ * Sets the storage hash for the fiber. This feature is experimental
+ * and may change in the future. The method can only be called on the
+ * Fiber.current.
+ *
+ * You should be careful about using this method as you may inadvertently clear
+ * important fiber-storage state. You should mostly prefer to assign specific
+ * keys in the storage using Fiber::[]=.
+ *
+ * You can also use <tt>Fiber.new(storage: nil)</tt> to create a fiber with an empty
+ * storage.
+ *
+ * Example:
+ *
+ * while request = request_queue.pop
+ * # Reset the per-request state:
+ * Fiber.current.storage = nil
+ * handle_request(request)
+ * end
+ */
+static VALUE
+rb_fiber_storage_set(VALUE self, VALUE value)
+{
+ if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL)) {
+ rb_category_warn(RB_WARN_CATEGORY_EXPERIMENTAL,
+ "Fiber#storage= is experimental and may be removed in the future!");
+ }
+
+ storage_access_must_be_from_same_fiber(self);
+ fiber_storage_validate(value);
+
+ fiber_ptr(self)->cont.saved_ec.storage = rb_obj_dup(value);
+ return value;
+}
+
+/**
+ * call-seq: Fiber[key] -> value
+ *
+ * Returns the value of the fiber storage variable identified by +key+.
+ *
+ * The +key+ must be a symbol, and the value is set by Fiber#[]= or
+ * Fiber#store.
+ *
+ * See also Fiber::[]=.
+ */
+static VALUE
+rb_fiber_storage_aref(VALUE class, VALUE key)
+{
+ Check_Type(key, T_SYMBOL);
+
+ VALUE storage = fiber_storage_get(fiber_current());
+
+ if (storage == Qnil) return Qnil;
+
+ return rb_hash_aref(storage, key);
+}
+
+/**
+ * call-seq: Fiber[key] = value
+ *
+ * Assign +value+ to the fiber storage variable identified by +key+.
+ * The variable is created if it doesn't exist.
+ *
+ * +key+ must be a Symbol, otherwise a TypeError is raised.
+ *
+ * See also Fiber::[].
+ */
+static VALUE
+rb_fiber_storage_aset(VALUE class, VALUE key, VALUE value)
+{
+ Check_Type(key, T_SYMBOL);
+
+ VALUE storage = fiber_storage_get(fiber_current());
+
+ return rb_hash_aset(storage, key, value);
+}
+
static VALUE
-fiber_initialize(VALUE self, VALUE proc, struct fiber_pool * fiber_pool)
+fiber_initialize(VALUE self, VALUE proc, struct fiber_pool * fiber_pool, unsigned int blocking, VALUE storage)
{
- rb_fiber_t *fiber = fiber_t_alloc(self);
+ if (storage == Qundef || storage == Qtrue) {
+ // The default, inherit storage (dup) from the current fiber:
+ storage = inherit_fiber_storage();
+ }
+ else /* nil, hash, etc. */ {
+ fiber_storage_validate(storage);
+ storage = rb_obj_dup(storage);
+ }
+
+ rb_fiber_t *fiber = fiber_t_alloc(self, blocking);
+ fiber->cont.saved_ec.storage = storage;
fiber->first_proc = proc;
fiber->stack.base = NULL;
fiber->stack.pool = fiber_pool;
@@ -1769,41 +2239,254 @@ fiber_prepare_stack(rb_fiber_t *fiber)
sec->local_storage_recursive_hash_for_trace = Qnil;
}
+static struct fiber_pool *
+rb_fiber_pool_default(VALUE pool)
+{
+ return &shared_fiber_pool;
+}
+
+VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber)
+{
+ VALUE storage = rb_obj_dup(ec->storage);
+ fiber->cont.saved_ec.storage = storage;
+ return storage;
+}
+
/* :nodoc: */
static VALUE
+rb_fiber_initialize_kw(int argc, VALUE* argv, VALUE self, int kw_splat)
+{
+ VALUE pool = Qnil;
+ VALUE blocking = Qfalse;
+ VALUE storage = Qundef;
+
+ if (kw_splat != RB_NO_KEYWORDS) {
+ VALUE options = Qnil;
+ VALUE arguments[3] = {Qundef};
+
+ argc = rb_scan_args_kw(kw_splat, argc, argv, ":", &options);
+ rb_get_kwargs(options, fiber_initialize_keywords, 0, 3, arguments);
+
+ if (!UNDEF_P(arguments[0])) {
+ blocking = arguments[0];
+ }
+
+ if (!UNDEF_P(arguments[1])) {
+ pool = arguments[1];
+ }
+
+ storage = arguments[2];
+ }
+
+ return fiber_initialize(self, rb_block_proc(), rb_fiber_pool_default(pool), RTEST(blocking), storage);
+}
+
+/*
+ * call-seq:
+ * Fiber.new(blocking: false, storage: true) { |*args| ... } -> fiber
+ *
+ * Creates new Fiber. Initially, the fiber is not running and can be resumed
+ * with #resume. Arguments to the first #resume call will be passed to the
+ * block:
+ *
+ * f = Fiber.new do |initial|
+ * current = initial
+ * loop do
+ * puts "current: #{current.inspect}"
+ * current = Fiber.yield
+ * end
+ * end
+ * f.resume(100) # prints: current: 100
+ * f.resume(1, 2, 3) # prints: current: [1, 2, 3]
+ * f.resume # prints: current: nil
+ * # ... and so on ...
+ *
+ * If <tt>blocking: false</tt> is passed to <tt>Fiber.new</tt>, _and_ current
+ * thread has a Fiber.scheduler defined, the Fiber becomes non-blocking (see
+ * "Non-blocking Fibers" section in class docs).
+ *
+ * If the <tt>storage</tt> is unspecified, the default is to inherit a copy of
+ * the storage from the current fiber. This is the same as specifying
+ * <tt>storage: true</tt>.
+ *
+ * Fiber[:x] = 1
+ * Fiber.new do
+ * Fiber[:x] # => 1
+ * Fiber[:x] = 2
+ * end.resume
+ * Fiber[:x] # => 1
+ *
+ * If the given <tt>storage</tt> is <tt>nil</tt>, this function will lazy
+ * initialize the internal storage, which starts as an empty hash.
+ *
+ * Fiber[:x] = "Hello World"
+ * Fiber.new(storage: nil) do
+ * Fiber[:x] # nil
+ * end
+ *
+ * Otherwise, the given <tt>storage</tt> is used as the new fiber's storage,
+ * and it must be an instance of Hash.
+ *
+ * Explicitly using <tt>storage: true</tt> is currently experimental and may
+ * change in the future.
+ */
+static VALUE
rb_fiber_initialize(int argc, VALUE* argv, VALUE self)
{
- return fiber_initialize(self, rb_block_proc(), &shared_fiber_pool);
+ return rb_fiber_initialize_kw(argc, argv, self, rb_keyword_given_p());
+}
+
+VALUE
+rb_fiber_new_storage(rb_block_call_func_t func, VALUE obj, VALUE storage)
+{
+ return fiber_initialize(fiber_alloc(rb_cFiber), rb_proc_new(func, obj), rb_fiber_pool_default(Qnil), 0, storage);
}
VALUE
rb_fiber_new(rb_block_call_func_t func, VALUE obj)
{
- return fiber_initialize(fiber_alloc(rb_cFiber), rb_proc_new(func, obj), &shared_fiber_pool);
+ return rb_fiber_new_storage(func, obj, Qtrue);
+}
+
+static VALUE
+rb_fiber_s_schedule_kw(int argc, VALUE* argv, int kw_splat)
+{
+ rb_thread_t * th = GET_THREAD();
+ VALUE scheduler = th->scheduler;
+ VALUE fiber = Qnil;
+
+ if (scheduler != Qnil) {
+ fiber = rb_fiber_scheduler_fiber(scheduler, argc, argv, kw_splat);
+ }
+ else {
+ rb_raise(rb_eRuntimeError, "No scheduler is available!");
+ }
+
+ return fiber;
+}
+
+/*
+ * call-seq:
+ * Fiber.schedule { |*args| ... } -> fiber
+ *
+ * The method is <em>expected</em> to immediately run the provided block of code in a
+ * separate non-blocking fiber.
+ *
+ * puts "Go to sleep!"
+ *
+ * Fiber.set_scheduler(MyScheduler.new)
+ *
+ * Fiber.schedule do
+ * puts "Going to sleep"
+ * sleep(1)
+ * puts "I slept well"
+ * end
+ *
+ * puts "Wakey-wakey, sleepyhead"
+ *
+ * Assuming MyScheduler is properly implemented, this program will produce:
+ *
+ * Go to sleep!
+ * Going to sleep
+ * Wakey-wakey, sleepyhead
+ * ...1 sec pause here...
+ * I slept well
+ *
+ * ...e.g. on the first blocking operation inside the Fiber (<tt>sleep(1)</tt>),
+ * the control is yielded to the outside code (main fiber), and <em>at the end
+ * of that execution</em>, the scheduler takes care of properly resuming all the
+ * blocked fibers.
+ *
+ * Note that the behavior described above is how the method is <em>expected</em>
+ * to behave, actual behavior is up to the current scheduler's implementation of
+ * Fiber::Scheduler#fiber method. Ruby doesn't enforce this method to
+ * behave in any particular way.
+ *
+ * If the scheduler is not set, the method raises
+ * <tt>RuntimeError (No scheduler is available!)</tt>.
+ *
+ */
+static VALUE
+rb_fiber_s_schedule(int argc, VALUE *argv, VALUE obj)
+{
+ return rb_fiber_s_schedule_kw(argc, argv, rb_keyword_given_p());
+}
+
+/*
+ * call-seq:
+ * Fiber.scheduler -> obj or nil
+ *
+ * Returns the Fiber scheduler, that was last set for the current thread with Fiber.set_scheduler.
+ * Returns +nil+ if no scheduler is set (which is the default), and non-blocking fibers'
+ * behavior is the same as blocking.
+ * (see "Non-blocking fibers" section in class docs for details about the scheduler concept).
+ *
+ */
+static VALUE
+rb_fiber_s_scheduler(VALUE klass)
+{
+ return rb_fiber_scheduler_get();
+}
+
+/*
+ * call-seq:
+ * Fiber.current_scheduler -> obj or nil
+ *
+ * Returns the Fiber scheduler, that was last set for the current thread with Fiber.set_scheduler
+ * if and only if the current fiber is non-blocking.
+ *
+ */
+static VALUE
+rb_fiber_current_scheduler(VALUE klass)
+{
+ return rb_fiber_scheduler_current();
}
-static void rb_fiber_terminate(rb_fiber_t *fiber, int need_interrupt);
+/*
+ * call-seq:
+ * Fiber.set_scheduler(scheduler) -> scheduler
+ *
+ * Sets the Fiber scheduler for the current thread. If the scheduler is set, non-blocking
+ * fibers (created by Fiber.new with <tt>blocking: false</tt>, or by Fiber.schedule)
+ * call that scheduler's hook methods on potentially blocking operations, and the current
+ * thread will call scheduler's +close+ method on finalization (allowing the scheduler to
+ * properly manage all non-finished fibers).
+ *
+ * +scheduler+ can be an object of any class corresponding to Fiber::Scheduler. Its
+ * implementation is up to the user.
+ *
+ * See also the "Non-blocking fibers" section in class docs.
+ *
+ */
+static VALUE
+rb_fiber_set_scheduler(VALUE klass, VALUE scheduler)
+{
+ return rb_fiber_scheduler_set(scheduler);
+}
-#define PASS_KW_SPLAT (rb_empty_keyword_given_p() ? RB_PASS_EMPTY_KEYWORDS : rb_keyword_given_p())
+NORETURN(static void rb_fiber_terminate(rb_fiber_t *fiber, int need_interrupt, VALUE err));
void
-rb_fiber_start(void)
+rb_fiber_start(rb_fiber_t *fiber)
{
- rb_thread_t * volatile th = GET_THREAD();
- rb_fiber_t *fiber = th->ec->fiber_ptr;
+ rb_thread_t * volatile th = fiber->cont.saved_ec.thread_ptr;
+
rb_proc_t *proc;
enum ruby_tag_type state;
int need_interrupt = TRUE;
- VM_ASSERT(th->ec == ruby_current_execution_context_ptr);
+ VM_ASSERT(th->ec == GET_EC());
VM_ASSERT(FIBER_RESUMED_P(fiber));
+ if (fiber->blocking) {
+ th->blocking += 1;
+ }
+
EC_PUSH_TAG(th->ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
rb_context_t *cont = &VAR_FROM_MEMORY(fiber)->cont;
int argc;
const VALUE *argv, args = cont->value;
- int kw_splat = cont->kw_splat;
GetProcPtr(fiber->first_proc, proc);
argv = (argc = cont->argc) > 1 ? RARRAY_CONST_PTR(args) : &args;
cont->value = Qnil;
@@ -1812,55 +2495,31 @@ rb_fiber_start(void)
th->ec->root_svar = Qfalse;
EXEC_EVENT_HOOK(th->ec, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, 0, Qnil);
- rb_adjust_argv_kw_splat(&argc, &argv, &kw_splat);
- cont->value = rb_vm_invoke_proc(th->ec, proc, argc, argv, kw_splat, VM_BLOCK_HANDLER_NONE);
+ cont->value = rb_vm_invoke_proc(th->ec, proc, argc, argv, cont->kw_splat, VM_BLOCK_HANDLER_NONE);
}
EC_POP_TAG();
+ VALUE err = Qfalse;
if (state) {
- VALUE err = th->ec->errinfo;
+ err = th->ec->errinfo;
VM_ASSERT(FIBER_RESUMED_P(fiber));
- if (state == TAG_RAISE || state == TAG_FATAL) {
+ if (state == TAG_RAISE) {
+ // noop...
+ }
+ else if (state == TAG_FATAL) {
rb_threadptr_pending_interrupt_enque(th, err);
}
else {
err = rb_vm_make_jump_tag_but_local_jump(state, err);
- if (!NIL_P(err)) {
- rb_threadptr_pending_interrupt_enque(th, err);
- }
}
need_interrupt = TRUE;
}
- rb_fiber_terminate(fiber, need_interrupt);
- VM_UNREACHABLE(rb_fiber_start);
-}
-
-static rb_fiber_t *
-root_fiber_alloc(rb_thread_t *th)
-{
- VALUE fiber_value = fiber_alloc(rb_cFiber);
- rb_fiber_t *fiber = th->ec->fiber_ptr;
-
- VM_ASSERT(DATA_PTR(fiber_value) == NULL);
- VM_ASSERT(fiber->cont.type == FIBER_CONTEXT);
- VM_ASSERT(fiber->status == FIBER_RESUMED);
-
- th->root_fiber = fiber;
- DATA_PTR(fiber_value) = fiber;
- fiber->cont.self = fiber_value;
-
-#ifdef COROUTINE_PRIVATE_STACK
- fiber->stack = fiber_pool_stack_acquire(&shared_fiber_pool);
- coroutine_initialize_main(&fiber->context, fiber_pool_stack_base(&fiber->stack), fiber->stack.available, th->ec->machine.stack_start);
-#else
- coroutine_initialize_main(&fiber->context);
-#endif
-
- return fiber;
+ rb_fiber_terminate(fiber, need_interrupt, err);
}
+// Set up a "root fiber", which is the fiber that every Ractor has.
void
rb_threadptr_root_fiber_setup(rb_thread_t *th)
{
@@ -1872,8 +2531,14 @@ rb_threadptr_root_fiber_setup(rb_thread_t *th)
fiber->cont.type = FIBER_CONTEXT;
fiber->cont.saved_ec.fiber_ptr = fiber;
fiber->cont.saved_ec.thread_ptr = th;
+ fiber->blocking = 1;
fiber_status_set(fiber, FIBER_RESUMED); /* skip CREATED */
th->ec = &fiber->cont.saved_ec;
+ // When rb_threadptr_root_fiber_setup is called for the first time, mjit_enabled and
+ // rb_yjit_enabled_p() are still false. So this does nothing and rb_jit_cont_init() that is
+ // called later will take care of it. However, you still have to call cont_init_jit_cont()
+ // here for other Ractors, which are not initialized by rb_jit_cont_init().
+ cont_init_jit_cont(&fiber->cont);
}
void
@@ -1883,13 +2548,15 @@ rb_threadptr_root_fiber_release(rb_thread_t *th)
/* ignore. A root fiber object will free th->ec */
}
else {
+ rb_execution_context_t *ec = GET_EC();
+
VM_ASSERT(th->ec->fiber_ptr->cont.type == FIBER_CONTEXT);
VM_ASSERT(th->ec->fiber_ptr->cont.self == 0);
- fiber_free(th->ec->fiber_ptr);
- if (th->ec == ruby_current_execution_context_ptr) {
- ruby_current_execution_context_ptr = NULL;
+ if (th->ec == ec) {
+ rb_ractor_set_current_ec(th->ractor, NULL);
}
+ fiber_free(th->ec->fiber_ptr);
th->ec = NULL;
}
}
@@ -1906,35 +2573,31 @@ rb_threadptr_root_fiber_terminate(rb_thread_t *th)
}
static inline rb_fiber_t*
-fiber_current(void)
-{
- rb_execution_context_t *ec = GET_EC();
- if (ec->fiber_ptr->cont.self == 0) {
- root_fiber_alloc(rb_ec_thread_ptr(ec));
- }
- return ec->fiber_ptr;
-}
-
-static inline rb_fiber_t*
-return_fiber(void)
+return_fiber(bool terminate)
{
rb_fiber_t *fiber = fiber_current();
rb_fiber_t *prev = fiber->prev;
- if (!prev) {
+ if (prev) {
+ fiber->prev = NULL;
+ prev->resuming_fiber = NULL;
+ return prev;
+ }
+ else {
+ if (!terminate) {
+ rb_raise(rb_eFiberError, "attempt to yield on a not resumed fiber");
+ }
+
rb_thread_t *th = GET_THREAD();
rb_fiber_t *root_fiber = th->root_fiber;
VM_ASSERT(root_fiber != NULL);
- if (root_fiber == fiber) {
- rb_raise(rb_eFiberError, "can't yield from root fiber");
+ // search resuming fiber
+ for (fiber = root_fiber; fiber->resuming_fiber; fiber = fiber->resuming_fiber) {
}
- return root_fiber;
- }
- else {
- fiber->prev = NULL;
- return prev;
+
+ return fiber;
}
}
@@ -1945,7 +2608,7 @@ rb_fiber_current(void)
}
// Prepare to execute next_fiber on the given thread.
-static inline VALUE
+static inline void
fiber_store(rb_fiber_t *next_fiber, rb_thread_t *th)
{
rb_fiber_t *fiber;
@@ -1969,17 +2632,10 @@ fiber_store(rb_fiber_t *next_fiber, rb_thread_t *th)
fiber_status_set(next_fiber, FIBER_RESUMED);
fiber_setcontext(next_fiber, fiber);
-
- fiber = th->ec->fiber_ptr;
-
- /* Raise an exception if that was the result of executing the fiber */
- if (fiber->cont.argc == -1) rb_exc_raise(fiber->cont.value);
-
- return fiber->cont.value;
}
static inline VALUE
-fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int is_resume, int kw_splat)
+fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int kw_splat, rb_fiber_t *resuming_fiber, bool yielding)
{
VALUE value;
rb_context_t *cont = &fiber->cont;
@@ -1990,7 +2646,7 @@ fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int is_resume, int
if (th->ec->fiber_ptr == fiber) {
/* ignore fiber context switch
- * because destination fiber is same as current fiber
+ * because destination fiber is the same as current fiber
*/
return make_passing_arg(argc, argv);
}
@@ -1998,10 +2654,8 @@ fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int is_resume, int
if (cont_thread_value(cont) != th->self) {
rb_raise(rb_eFiberError, "fiber called across threads");
}
- else if (cont->saved_ec.protect_tag != th->ec->protect_tag) {
- rb_raise(rb_eFiberError, "fiber called across stack rewinding barrier");
- }
- else if (FIBER_TERMINATED_P(fiber)) {
+
+ if (FIBER_TERMINATED_P(fiber)) {
value = rb_exc_new2(rb_eFiberError, "dead fiber called");
if (!FIBER_TERMINATED_P(th->ec->fiber_ptr)) {
@@ -2024,33 +2678,161 @@ fiber_switch(rb_fiber_t *fiber, int argc, const VALUE *argv, int is_resume, int
}
}
- if (is_resume) {
+ VM_ASSERT(FIBER_RUNNABLE_P(fiber));
+
+ rb_fiber_t *current_fiber = fiber_current();
+
+ VM_ASSERT(!current_fiber->resuming_fiber);
+
+ if (resuming_fiber) {
+ current_fiber->resuming_fiber = resuming_fiber;
fiber->prev = fiber_current();
+ fiber->yielding = 0;
}
- VM_ASSERT(FIBER_RUNNABLE_P(fiber));
+ VM_ASSERT(!current_fiber->yielding);
+ if (yielding) {
+ current_fiber->yielding = 1;
+ }
+
+ if (current_fiber->blocking) {
+ th->blocking -= 1;
+ }
cont->argc = argc;
cont->kw_splat = kw_splat;
cont->value = make_passing_arg(argc, argv);
- value = fiber_store(fiber, th);
+ fiber_store(fiber, th);
- if (is_resume && FIBER_TERMINATED_P(fiber)) {
+ // We cannot free the stack until the pthread is joined:
+#ifndef COROUTINE_PTHREAD_CONTEXT
+ if (resuming_fiber && FIBER_TERMINATED_P(fiber)) {
fiber_stack_release(fiber);
}
+#endif
+
+ if (fiber_current()->blocking) {
+ th->blocking += 1;
+ }
RUBY_VM_CHECK_INTS(th->ec);
EXEC_EVENT_HOOK(th->ec, RUBY_EVENT_FIBER_SWITCH, th->self, 0, 0, 0, Qnil);
+ current_fiber = th->ec->fiber_ptr;
+ value = current_fiber->cont.value;
+ if (current_fiber->cont.argc == -1) rb_exc_raise(value);
return value;
}
VALUE
rb_fiber_transfer(VALUE fiber_value, int argc, const VALUE *argv)
{
- return fiber_switch(fiber_ptr(fiber_value), argc, argv, 0, RB_NO_KEYWORDS);
+ return fiber_switch(fiber_ptr(fiber_value), argc, argv, RB_NO_KEYWORDS, NULL, false);
+}
+
+/*
+ * call-seq:
+ * fiber.blocking? -> true or false
+ *
+ * Returns +true+ if +fiber+ is blocking and +false+ otherwise.
+ * Fiber is non-blocking if it was created via passing <tt>blocking: false</tt>
+ * to Fiber.new, or via Fiber.schedule.
+ *
+ * Note that, even if the method returns +false+, the fiber behaves differently
+ * only if Fiber.scheduler is set in the current thread.
+ *
+ * See the "Non-blocking fibers" section in class docs for details.
+ *
+ */
+VALUE
+rb_fiber_blocking_p(VALUE fiber)
+{
+ return RBOOL(fiber_ptr(fiber)->blocking);
+}
+
+static VALUE
+fiber_blocking_yield(VALUE fiber_value)
+{
+ rb_fiber_t *fiber = fiber_ptr(fiber_value);
+ rb_thread_t * volatile th = fiber->cont.saved_ec.thread_ptr;
+
+ // fiber->blocking is `unsigned int : 1`, so we use it as a boolean:
+ fiber->blocking = 1;
+
+ // Once the fiber is blocking, and current, we increment the thread blocking state:
+ th->blocking += 1;
+
+ return rb_yield(fiber_value);
+}
+
+static VALUE
+fiber_blocking_ensure(VALUE fiber_value)
+{
+ rb_fiber_t *fiber = fiber_ptr(fiber_value);
+ rb_thread_t * volatile th = fiber->cont.saved_ec.thread_ptr;
+
+ // We are no longer blocking:
+ fiber->blocking = 0;
+ th->blocking -= 1;
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * Fiber.blocking{|fiber| ...} -> result
+ *
+ * Forces the fiber to be blocking for the duration of the block. Returns the
+ * result of the block.
+ *
+ * See the "Non-blocking fibers" section in class docs for details.
+ *
+ */
+VALUE
+rb_fiber_blocking(VALUE class)
+{
+ VALUE fiber_value = rb_fiber_current();
+ rb_fiber_t *fiber = fiber_ptr(fiber_value);
+
+ // If we are already blocking, this is essentially a no-op:
+ if (fiber->blocking) {
+ return rb_yield(fiber_value);
+ }
+ else {
+ return rb_ensure(fiber_blocking_yield, fiber_value, fiber_blocking_ensure, fiber_value);
+ }
+}
+
+/*
+ * call-seq:
+ * Fiber.blocking? -> false or 1
+ *
+ * Returns +false+ if the current fiber is non-blocking.
+ * Fiber is non-blocking if it was created via passing <tt>blocking: false</tt>
+ * to Fiber.new, or via Fiber.schedule.
+ *
+ * If the current Fiber is blocking, the method returns 1.
+ * Future developments may allow for situations where larger integers
+ * could be returned.
+ *
+ * Note that, even if the method returns +false+, Fiber behaves differently
+ * only if Fiber.scheduler is set in the current thread.
+ *
+ * See the "Non-blocking fibers" section in class docs for details.
+ *
+ */
+static VALUE
+rb_fiber_s_blocking_p(VALUE klass)
+{
+ rb_thread_t *thread = GET_THREAD();
+ unsigned blocking = thread->blocking;
+
+ if (blocking == 0)
+ return Qfalse;
+
+ return INT2NUM(blocking);
}
void
@@ -2060,60 +2842,77 @@ rb_fiber_close(rb_fiber_t *fiber)
}
static void
-rb_fiber_terminate(rb_fiber_t *fiber, int need_interrupt)
+rb_fiber_terminate(rb_fiber_t *fiber, int need_interrupt, VALUE error)
{
VALUE value = fiber->cont.value;
- rb_fiber_t *next_fiber;
VM_ASSERT(FIBER_RESUMED_P(fiber));
rb_fiber_close(fiber);
- coroutine_destroy(&fiber->context);
-
fiber->cont.machine.stack = NULL;
fiber->cont.machine.stack_size = 0;
- next_fiber = return_fiber();
+ rb_fiber_t *next_fiber = return_fiber(true);
+
if (need_interrupt) RUBY_VM_SET_INTERRUPT(&next_fiber->cont.saved_ec);
- fiber_switch(next_fiber, 1, &value, 0, RB_NO_KEYWORDS);
+
+ if (RTEST(error))
+ fiber_switch(next_fiber, -1, &error, RB_NO_KEYWORDS, NULL, false);
+ else
+ fiber_switch(next_fiber, 1, &value, RB_NO_KEYWORDS, NULL, false);
+ ruby_stop(0);
}
-VALUE
-rb_fiber_resume_kw(VALUE fiber_value, int argc, const VALUE *argv, int kw_splat)
+static VALUE
+fiber_resume_kw(rb_fiber_t *fiber, int argc, const VALUE *argv, int kw_splat)
{
- rb_fiber_t *fiber = fiber_ptr(fiber_value);
+ rb_fiber_t *current_fiber = fiber_current();
if (argc == -1 && FIBER_CREATED_P(fiber)) {
rb_raise(rb_eFiberError, "cannot raise exception on unborn fiber");
}
-
- if (fiber->prev != 0 || fiber_is_root_p(fiber)) {
- rb_raise(rb_eFiberError, "double resume");
+ else if (FIBER_TERMINATED_P(fiber)) {
+ rb_raise(rb_eFiberError, "attempt to resume a terminated fiber");
}
-
- if (fiber->transferred != 0) {
- rb_raise(rb_eFiberError, "cannot resume transferred Fiber");
+ else if (fiber == current_fiber) {
+ rb_raise(rb_eFiberError, "attempt to resume the current fiber");
+ }
+ else if (fiber->prev != NULL) {
+ rb_raise(rb_eFiberError, "attempt to resume a resumed fiber (double resume)");
+ }
+ else if (fiber->resuming_fiber) {
+ rb_raise(rb_eFiberError, "attempt to resume a resuming fiber");
}
+ else if (fiber->prev == NULL &&
+ (!fiber->yielding && fiber->status != FIBER_CREATED)) {
+ rb_raise(rb_eFiberError, "attempt to resume a transferring fiber");
+ }
+
+ return fiber_switch(fiber, argc, argv, kw_splat, fiber, false);
+}
- return fiber_switch(fiber, argc, argv, 1, kw_splat);
+VALUE
+rb_fiber_resume_kw(VALUE self, int argc, const VALUE *argv, int kw_splat)
+{
+ return fiber_resume_kw(fiber_ptr(self), argc, argv, kw_splat);
}
VALUE
-rb_fiber_resume(VALUE fiber_value, int argc, const VALUE *argv)
+rb_fiber_resume(VALUE self, int argc, const VALUE *argv)
{
- return rb_fiber_resume_kw(fiber_value, argc, argv, RB_NO_KEYWORDS);
+ return fiber_resume_kw(fiber_ptr(self), argc, argv, RB_NO_KEYWORDS);
}
VALUE
rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
{
- return fiber_switch(return_fiber(), argc, argv, 0, kw_splat);
+ return fiber_switch(return_fiber(false), argc, argv, kw_splat, NULL, true);
}
VALUE
rb_fiber_yield(int argc, const VALUE *argv)
{
- return fiber_switch(return_fiber(), argc, argv, 0, RB_NO_KEYWORDS);
+ return fiber_switch(return_fiber(false), argc, argv, RB_NO_KEYWORDS, NULL, true);
}
void
@@ -2130,13 +2929,12 @@ rb_fiber_reset_root_local_storage(rb_thread_t *th)
*
* Returns true if the fiber can still be resumed (or transferred
* to). After finishing execution of the fiber block this method will
- * always return false. You need to <code>require 'fiber'</code>
- * before using this method.
+ * always return +false+.
*/
VALUE
rb_fiber_alive_p(VALUE fiber_value)
{
- return FIBER_TERMINATED_P(fiber_ptr(fiber_value)) ? Qfalse : Qtrue;
+ return RBOOL(!FIBER_TERMINATED_P(fiber_ptr(fiber_value)));
}
/*
@@ -2157,33 +2955,84 @@ rb_fiber_alive_p(VALUE fiber_value)
static VALUE
rb_fiber_m_resume(int argc, VALUE *argv, VALUE fiber)
{
- return rb_fiber_resume_kw(fiber, argc, argv, PASS_KW_SPLAT);
+ return rb_fiber_resume_kw(fiber, argc, argv, rb_keyword_given_p());
}
/*
* call-seq:
- * fiber.raise -> obj
- * fiber.raise(string) -> obj
- * fiber.raise(exception [, string [, array]]) -> obj
+ * fiber.backtrace -> array
+ * fiber.backtrace(start) -> array
+ * fiber.backtrace(start, count) -> array
+ * fiber.backtrace(start..end) -> array
+ *
+ * Returns the current execution stack of the fiber. +start+, +count+ and +end+ allow
+ * to select only parts of the backtrace.
+ *
+ * def level3
+ * Fiber.yield
+ * end
+ *
+ * def level2
+ * level3
+ * end
+ *
+ * def level1
+ * level2
+ * end
+ *
+ * f = Fiber.new { level1 }
+ *
+ * # It is empty before the fiber started
+ * f.backtrace
+ * #=> []
+ *
+ * f.resume
+ *
+ * f.backtrace
+ * #=> ["test.rb:2:in `yield'", "test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'", "test.rb:13:in `block in <main>'"]
+ * p f.backtrace(1) # start from the item 1
+ * #=> ["test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'", "test.rb:13:in `block in <main>'"]
+ * p f.backtrace(2, 2) # start from item 2, take 2
+ * #=> ["test.rb:6:in `level2'", "test.rb:10:in `level1'"]
+ * p f.backtrace(1..3) # take items from 1 to 3
+ * #=> ["test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'"]
+ *
+ * f.resume
+ *
+ * # It is nil after the fiber is finished
+ * f.backtrace
+ * #=> nil
+ *
+ */
+static VALUE
+rb_fiber_backtrace(int argc, VALUE *argv, VALUE fiber)
+{
+ return rb_vm_backtrace(argc, argv, &fiber_ptr(fiber)->cont.saved_ec);
+}
+
+/*
+ * call-seq:
+ * fiber.backtrace_locations -> array
+ * fiber.backtrace_locations(start) -> array
+ * fiber.backtrace_locations(start, count) -> array
+ * fiber.backtrace_locations(start..end) -> array
+ *
+ * Like #backtrace, but returns each line of the execution stack as a
+ * Thread::Backtrace::Location. Accepts the same arguments as #backtrace.
+ *
+ * f = Fiber.new { Fiber.yield }
+ * f.resume
+ * loc = f.backtrace_locations.first
+ * loc.label #=> "yield"
+ * loc.path #=> "test.rb"
+ * loc.lineno #=> 1
*
- * Raises an exception in the fiber at the point at which the last
- * Fiber.yield was called, or at the start if neither +resume+
- * nor +raise+ were called before.
*
- * With no arguments, raises a +RuntimeError+. With a single +String+
- * argument, raises a +RuntimeError+ with the string as a message. Otherwise,
- * the first parameter should be the name of an +Exception+ class (or an
- * object that returns an +Exception+ object when sent an +exception+
- * message). The optional second parameter sets the message associated with
- * the exception, and the third parameter is an array of callback information.
- * Exceptions are caught by the +rescue+ clause of <code>begin...end</code>
- * blocks.
*/
static VALUE
-rb_fiber_raise(int argc, VALUE *argv, VALUE fiber)
+rb_fiber_backtrace_locations(int argc, VALUE *argv, VALUE fiber)
{
- VALUE exc = rb_make_exception(argc, argv);
- return rb_fiber_resume_kw(fiber, -1, &exc, RB_NO_KEYWORDS);
+ return rb_vm_backtrace_locations(argc, argv, &fiber_ptr(fiber)->cont.saved_ec);
}
/*
@@ -2193,57 +3042,105 @@ rb_fiber_raise(int argc, VALUE *argv, VALUE fiber)
* Transfer control to another fiber, resuming it from where it last
* stopped or starting it if it was not resumed before. The calling
* fiber will be suspended much like in a call to
- * Fiber.yield. You need to <code>require 'fiber'</code>
- * before using this method.
+ * Fiber.yield.
*
- * The fiber which receives the transfer call is treats it much like
+ * The fiber which receives the transfer call treats it much like
* a resume call. Arguments passed to transfer are treated like those
* passed to resume.
*
- * You cannot call +resume+ on a fiber that has been transferred to.
- * If you call +transfer+ on a fiber, and later call +resume+ on the
- * the fiber, a +FiberError+ will be raised. Once you call +transfer+ on
- * a fiber, the only way to resume processing the fiber is to
- * call +transfer+ on it again.
+ * The two style of control passing to and from fiber (one is #resume and
+ * Fiber::yield, another is #transfer to and from fiber) can't be freely
+ * mixed.
+ *
+ * * If the Fiber's lifecycle had started with transfer, it will never
+ * be able to yield or be resumed control passing, only
+ * finish or transfer back. (It still can resume other fibers that
+ * are allowed to be resumed.)
+ * * If the Fiber's lifecycle had started with resume, it can yield
+ * or transfer to another Fiber, but can receive control back only
+ * the way compatible with the way it was given away: if it had
+ * transferred, it only can be transferred back, and if it had
+ * yielded, it only can be resumed back. After that, it again can
+ * transfer or yield.
+ *
+ * If those rules are broken FiberError is raised.
+ *
+ * For an individual Fiber design, yield/resume is easier to use
+ * (the Fiber just gives away control, it doesn't need to think
+ * about who the control is given to), while transfer is more flexible
+ * for complex cases, allowing to build arbitrary graphs of Fibers
+ * dependent on each other.
+ *
*
* Example:
*
- * fiber1 = Fiber.new do
- * puts "In Fiber 1"
- * Fiber.yield
- * puts "In Fiber 1 again"
- * end
+ * manager = nil # For local var to be visible inside worker block
*
- * fiber2 = Fiber.new do
- * puts "In Fiber 2"
- * fiber1.transfer
- * puts "Never see this message"
- * end
+ * # This fiber would be started with transfer
+ * # It can't yield, and can't be resumed
+ * worker = Fiber.new { |work|
+ * puts "Worker: starts"
+ * puts "Worker: Performed #{work.inspect}, transferring back"
+ * # Fiber.yield # this would raise FiberError: attempt to yield on a not resumed fiber
+ * # manager.resume # this would raise FiberError: attempt to resume a resumed fiber (double resume)
+ * manager.transfer(work.capitalize)
+ * }
*
- * fiber3 = Fiber.new do
- * puts "In Fiber 3"
- * end
+ * # This fiber would be started with resume
+ * # It can yield or transfer, and can be transferred
+ * # back or resumed
+ * manager = Fiber.new {
+ * puts "Manager: starts"
+ * puts "Manager: transferring 'something' to worker"
+ * result = worker.transfer('something')
+ * puts "Manager: worker returned #{result.inspect}"
+ * # worker.resume # this would raise FiberError: attempt to resume a transferring fiber
+ * Fiber.yield # this is OK, the fiber transferred from and to, now it can yield
+ * puts "Manager: finished"
+ * }
*
- * fiber2.resume
- * fiber3.resume
- * fiber1.resume rescue (p $!)
- * fiber1.transfer
+ * puts "Starting the manager"
+ * manager.resume
+ * puts "Resuming the manager"
+ * # manager.transfer # this would raise FiberError: attempt to transfer to a yielding fiber
+ * manager.resume
*
* <em>produces</em>
*
- * In Fiber 2
- * In Fiber 1
- * In Fiber 3
- * #<FiberError: cannot resume transferred Fiber>
- * In Fiber 1 again
+ * Starting the manager
+ * Manager: starts
+ * Manager: transferring 'something' to worker
+ * Worker: starts
+ * Worker: Performed "something", transferring back
+ * Manager: worker returned "Something"
+ * Resuming the manager
+ * Manager: finished
*
*/
static VALUE
-rb_fiber_m_transfer(int argc, VALUE *argv, VALUE fiber_value)
+rb_fiber_m_transfer(int argc, VALUE *argv, VALUE self)
{
- rb_fiber_t *fiber = fiber_ptr(fiber_value);
- fiber->transferred = 1;
- return fiber_switch(fiber, argc, argv, 0, PASS_KW_SPLAT);
+ return rb_fiber_transfer_kw(self, argc, argv, rb_keyword_given_p());
+}
+
+static VALUE
+fiber_transfer_kw(rb_fiber_t *fiber, int argc, const VALUE *argv, int kw_splat)
+{
+ if (fiber->resuming_fiber) {
+ rb_raise(rb_eFiberError, "attempt to transfer to a resuming fiber");
+ }
+
+ if (fiber->yielding) {
+ rb_raise(rb_eFiberError, "attempt to transfer to a yielding fiber");
+ }
+
+ return fiber_switch(fiber, argc, argv, kw_splat, NULL, false);
+}
+
+VALUE
+rb_fiber_transfer_kw(VALUE self, int argc, const VALUE *argv, int kw_splat)
+{
+ return fiber_transfer_kw(fiber_ptr(self), argc, argv, kw_splat);
}
/*
@@ -2259,30 +3156,70 @@ rb_fiber_m_transfer(int argc, VALUE *argv, VALUE fiber_value)
static VALUE
rb_fiber_s_yield(int argc, VALUE *argv, VALUE klass)
{
- return rb_fiber_yield_kw(argc, argv, PASS_KW_SPLAT);
+ return rb_fiber_yield_kw(argc, argv, rb_keyword_given_p());
+}
+
+static VALUE
+fiber_raise(rb_fiber_t *fiber, int argc, const VALUE *argv)
+{
+ VALUE exception = rb_make_exception(argc, argv);
+
+ if (fiber->resuming_fiber) {
+ rb_raise(rb_eFiberError, "attempt to raise a resuming fiber");
+ }
+ else if (FIBER_SUSPENDED_P(fiber) && !fiber->yielding) {
+ return fiber_transfer_kw(fiber, -1, &exception, RB_NO_KEYWORDS);
+ }
+ else {
+ return fiber_resume_kw(fiber, -1, &exception, RB_NO_KEYWORDS);
+ }
+}
+
+VALUE
+rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv)
+{
+ return fiber_raise(fiber_ptr(fiber), argc, argv);
}
/*
* call-seq:
- * Fiber.current() -> fiber
+ * fiber.raise -> obj
+ * fiber.raise(string) -> obj
+ * fiber.raise(exception [, string [, array]]) -> obj
*
- * Returns the current fiber. You need to <code>require 'fiber'</code>
- * before using this method. If you are not running in the context of
- * a fiber this method will return the root fiber.
+ * Raises an exception in the fiber at the point at which the last
+ * +Fiber.yield+ was called. If the fiber has not been started or has
+ * already run to completion, raises +FiberError+. If the fiber is
+ * yielding, it is resumed. If it is transferring, it is transferred into.
+ * But if it is resuming, raises +FiberError+.
+ *
+ * With no arguments, raises a +RuntimeError+. With a single +String+
+ * argument, raises a +RuntimeError+ with the string as a message. Otherwise,
+ * the first parameter should be the name of an +Exception+ class (or an
+ * object that returns an +Exception+ object when sent an +exception+
+ * message). The optional second parameter sets the message associated with
+ * the exception, and the third parameter is an array of callback information.
+ * Exceptions are caught by the +rescue+ clause of <code>begin...end</code>
+ * blocks.
*/
static VALUE
-rb_fiber_s_current(VALUE klass)
+rb_fiber_m_raise(int argc, VALUE *argv, VALUE self)
{
- return rb_fiber_current();
+ return rb_fiber_raise(self, argc, argv);
}
/*
- * call-seq:
- * fiber.to_s -> string
- *
- * Returns fiber information string.
+ * call-seq:
+ * Fiber.current -> fiber
*
+ * Returns the current fiber. If you are not running in the context of
+ * a fiber this method will return the root fiber.
*/
+static VALUE
+rb_fiber_s_current(VALUE klass)
+{
+ return rb_fiber_current();
+}
static VALUE
fiber_to_s(VALUE fiber_value)
@@ -2291,8 +3228,8 @@ fiber_to_s(VALUE fiber_value)
const rb_proc_t *proc;
char status_info[0x20];
- if (fiber->transferred) {
- snprintf(status_info, 0x20, " (%s, transferred)", fiber_status_name(fiber->status));
+ if (fiber->resuming_fiber) {
+ snprintf(status_info, 0x20, " (%s by resuming)", fiber_status_name(fiber->status));
}
else {
snprintf(status_info, 0x20, " (%s)", fiber_status_name(fiber->status));
@@ -2329,7 +3266,7 @@ fiber_pool_free(void *ptr)
struct fiber_pool * fiber_pool = ptr;
RUBY_FREE_ENTER("fiber_pool");
- fiber_pool_free_allocations(fiber_pool->allocations);
+ fiber_pool_allocation_free(fiber_pool->allocations);
ruby_xfree(fiber_pool);
RUBY_FREE_LEAVE("fiber_pool");
@@ -2355,9 +3292,9 @@ static const rb_data_type_t FiberPoolDataType = {
static VALUE
fiber_pool_alloc(VALUE klass)
{
- struct fiber_pool * fiber_pool = RB_ALLOC(struct fiber_pool);
+ struct fiber_pool *fiber_pool;
- return TypedData_Wrap_Struct(klass, &FiberPoolDataType, fiber_pool);
+ return TypedData_Make_Struct(klass, struct fiber_pool, &FiberPoolDataType, fiber_pool);
}
static VALUE
@@ -2371,7 +3308,7 @@ rb_fiber_pool_initialize(int argc, VALUE* argv, VALUE self)
rb_scan_args(argc, argv, "03", &size, &count, &vm_stack_size);
if (NIL_P(size)) {
- size = INT2NUM(th->vm->default_params.fiber_machine_stack_size);
+ size = SIZET2NUM(th->vm->default_params.fiber_machine_stack_size);
}
if (NIL_P(count)) {
@@ -2379,7 +3316,7 @@ rb_fiber_pool_initialize(int argc, VALUE* argv, VALUE self)
}
if (NIL_P(vm_stack_size)) {
- vm_stack_size = INT2NUM(th->vm->default_params.fiber_vm_stack_size);
+ vm_stack_size = SIZET2NUM(th->vm->default_params.fiber_vm_stack_size);
}
TypedData_Get_Struct(self, struct fiber_pool, &FiberPoolDataType, fiber_pool);
@@ -2422,7 +3359,11 @@ Init_Cont(void)
fiber_pool_initialize(&shared_fiber_pool, stack_size, FIBER_POOL_INITIAL_SIZE, vm_stack_size);
- char * fiber_shared_fiber_pool_free_stacks = getenv("RUBY_SHARED_FIBER_POOL_FREE_STACKS");
+ fiber_initialize_keywords[0] = rb_intern_const("blocking");
+ fiber_initialize_keywords[1] = rb_intern_const("pool");
+ fiber_initialize_keywords[2] = rb_intern_const("storage");
+
+ const char *fiber_shared_fiber_pool_free_stacks = getenv("RUBY_SHARED_FIBER_POOL_FREE_STACKS");
if (fiber_shared_fiber_pool_free_stacks) {
shared_fiber_pool.free_stacks = atoi(fiber_shared_fiber_pool_free_stacks);
}
@@ -2431,17 +3372,38 @@ Init_Cont(void)
rb_define_alloc_func(rb_cFiber, fiber_alloc);
rb_eFiberError = rb_define_class("FiberError", rb_eStandardError);
rb_define_singleton_method(rb_cFiber, "yield", rb_fiber_s_yield, -1);
+ rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0);
+ rb_define_singleton_method(rb_cFiber, "blocking", rb_fiber_blocking, 0);
+ rb_define_singleton_method(rb_cFiber, "[]", rb_fiber_storage_aref, 1);
+ rb_define_singleton_method(rb_cFiber, "[]=", rb_fiber_storage_aset, 2);
+
rb_define_method(rb_cFiber, "initialize", rb_fiber_initialize, -1);
+ rb_define_method(rb_cFiber, "blocking?", rb_fiber_blocking_p, 0);
+ rb_define_method(rb_cFiber, "storage", rb_fiber_storage_get, 0);
+ rb_define_method(rb_cFiber, "storage=", rb_fiber_storage_set, 1);
rb_define_method(rb_cFiber, "resume", rb_fiber_m_resume, -1);
- rb_define_method(rb_cFiber, "raise", rb_fiber_raise, -1);
+ rb_define_method(rb_cFiber, "raise", rb_fiber_m_raise, -1);
+ rb_define_method(rb_cFiber, "backtrace", rb_fiber_backtrace, -1);
+ rb_define_method(rb_cFiber, "backtrace_locations", rb_fiber_backtrace_locations, -1);
rb_define_method(rb_cFiber, "to_s", fiber_to_s, 0);
rb_define_alias(rb_cFiber, "inspect", "to_s");
+ rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1);
+ rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0);
+
+ rb_define_singleton_method(rb_cFiber, "blocking?", rb_fiber_s_blocking_p, 0);
+ rb_define_singleton_method(rb_cFiber, "scheduler", rb_fiber_s_scheduler, 0);
+ rb_define_singleton_method(rb_cFiber, "set_scheduler", rb_fiber_set_scheduler, 1);
+ rb_define_singleton_method(rb_cFiber, "current_scheduler", rb_fiber_current_scheduler, 0);
+
+ rb_define_singleton_method(rb_cFiber, "schedule", rb_fiber_s_schedule, -1);
#ifdef RB_EXPERIMENTAL_FIBER_POOL
- rb_cFiberPool = rb_define_class("Pool", rb_cFiber);
+ rb_cFiberPool = rb_define_class_under(rb_cFiber, "Pool", rb_cObject);
rb_define_alloc_func(rb_cFiberPool, fiber_pool_alloc);
rb_define_method(rb_cFiberPool, "initialize", rb_fiber_pool_initialize, -1);
#endif
+
+ rb_provide("fiber.so");
}
RUBY_SYMBOL_EXPORT_BEGIN
@@ -2457,12 +3419,4 @@ ruby_Init_Continuation_body(void)
rb_define_global_function("callcc", rb_callcc, 0);
}
-void
-ruby_Init_Fiber_as_Coroutine(void)
-{
- rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1);
- rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0);
- rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0);
-}
-
RUBY_SYMBOL_EXPORT_END
diff --git a/coroutine/amd64/Context.S b/coroutine/amd64/Context.S
index ac986b2aa5..d50732adbc 100644
--- a/coroutine/amd64/Context.S
+++ b/coroutine/amd64/Context.S
@@ -2,7 +2,7 @@
## This file is part of the "Coroutine" project and released under the MIT License.
##
## Created by Samuel Williams on 10/5/2018.
-## Copyright, 2018, by Samuel Williams. All rights reserved.
+## Copyright, 2018, by Samuel Williams.
##
#define TOKEN_PASTE(x,y) x##y
@@ -41,6 +41,6 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# We pop the return address and jump to it
ret
-#if defined(__linux__) && defined(__ELF__)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h
index 8fe323c1a1..44daa4e01a 100644
--- a/coroutine/amd64/Context.h
+++ b/coroutine/amd64/Context.h
@@ -1,22 +1,47 @@
+#ifndef COROUTINE_AMD64_CONTEXT_H
+#define COROUTINE_AMD64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 10/5/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __attribute__((noreturn)) void
enum {COROUTINE_REGISTERS = 6};
+#if defined(__SANITIZE_ADDRESS__)
+ #define COROUTINE_SANITIZE_ADDRESS
+#elif defined(__has_feature)
+ #if __has_feature(address_sanitizer)
+ #define COROUTINE_SANITIZE_ADDRESS
+ #endif
+#endif
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+#include <sanitizer/common_interface_defs.h>
+#include <sanitizer/asan_interface.h>
+#endif
+
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ void *fake_stack;
+ void *stack_base;
+ size_t stack_size;
+#endif
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -33,6 +58,12 @@ static inline void coroutine_initialize(
) {
assert(start && stack && size >= 1024);
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ context->fake_stack = NULL;
+ context->stack_base = stack;
+ context->stack_size = size;
+#endif
+
// Stack grows down. Force 16-byte alignment.
char * top = (char*)stack + size;
context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
@@ -50,3 +81,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_AMD64_CONTEXT_H */
diff --git a/coroutine/arm32/Context.S b/coroutine/arm32/Context.S
index 4308e1d1d2..1850c4c408 100644
--- a/coroutine/arm32/Context.S
+++ b/coroutine/arm32/Context.S
@@ -2,21 +2,32 @@
## This file is part of the "Coroutine" project and released under the MIT License.
##
## Created by Samuel Williams on 10/5/2018.
-## Copyright, 2018, by Samuel Williams. All rights reserved.
+## Copyright, 2018, by Samuel Williams.
##
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
+.file "Context.S"
.text
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+.align 2
+.type PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer),%function
+.syntax unified
-.globl coroutine_transfer
-coroutine_transfer:
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# Save caller state (8 registers + return address)
push {r4-r11,lr}
-
+
# Save caller stack pointer
str sp, [r0]
-
+
# Restore callee stack pointer
ldr sp, [r1]
-
+
# Restore callee state (8 registers program counter)
pop {r4-r11,pc}
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h
index e29fe1bb63..09410eb25d 100644
--- a/coroutine/arm32/Context.h
+++ b/coroutine/arm32/Context.h
@@ -1,13 +1,18 @@
+#ifndef COROUTINE_ARM32_CONTEXT_H
+#define COROUTINE_ARM32_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 10/5/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __attribute__((noreturn)) void
@@ -18,6 +23,7 @@ enum {COROUTINE_REGISTERS = 8};
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -49,3 +55,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_ARM32_CONTEXT_H */
diff --git a/coroutine/arm64/Context.S b/coroutine/arm64/Context.S
index f6e5f0a6bc..07d50d30df 100644
--- a/coroutine/arm64/Context.S
+++ b/coroutine/arm64/Context.S
@@ -2,18 +2,28 @@
## This file is part of the "Coroutine" project and released under the MIT License.
##
## Created by Samuel Williams on 10/5/2018.
-## Copyright, 2018, by Samuel Williams. All rights reserved.
+## Copyright, 2018, by Samuel Williams.
##
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
+#if defined(__APPLE__)
+#define x29 fp
+#define x30 lr
+.text
+.p2align 2
+#else
.text
.align 2
+#endif
-.global coroutine_transfer
-coroutine_transfer:
+.global PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# Make space on the stack for caller registers
sub sp, sp, 0xb0
-
+
# Save caller registers
stp d8, d9, [sp, 0x00]
stp d10, d11, [sp, 0x10]
@@ -57,3 +67,7 @@ coroutine_transfer:
# Jump to return address (in x4)
ret x4
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/coroutine/arm64/Context.h b/coroutine/arm64/Context.h
index a1ae921144..1472621f48 100644
--- a/coroutine/arm64/Context.h
+++ b/coroutine/arm64/Context.h
@@ -1,22 +1,47 @@
+#ifndef COROUTINE_ARM64_CONTEXT_H
+#define COROUTINE_ARM64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 10/5/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __attribute__((noreturn)) void
enum {COROUTINE_REGISTERS = 0xb0 / 8};
+#if defined(__SANITIZE_ADDRESS__)
+ #define COROUTINE_SANITIZE_ADDRESS
+#elif defined(__has_feature)
+ #if __has_feature(address_sanitizer)
+ #define COROUTINE_SANITIZE_ADDRESS
+ #endif
+#endif
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+#include <sanitizer/common_interface_defs.h>
+#include <sanitizer/asan_interface.h>
+#endif
+
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
+
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ void *fake_stack;
+ void *stack_base;
+ size_t stack_size;
+#endif
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -33,6 +58,12 @@ static inline void coroutine_initialize(
) {
assert(start && stack && size >= 1024);
+#if defined(COROUTINE_SANITIZE_ADDRESS)
+ context->fake_stack = NULL;
+ context->stack_base = stack;
+ context->stack_size = size;
+#endif
+
// Stack grows down. Force 16-byte alignment.
char * top = (char*)stack + size;
context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
@@ -48,3 +79,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_ARM64_CONTEXT_H */
diff --git a/coroutine/asyncify/Context.c b/coroutine/asyncify/Context.c
new file mode 100644
index 0000000000..303e5f4429
--- /dev/null
+++ b/coroutine/asyncify/Context.c
@@ -0,0 +1,10 @@
+#include "Context.h"
+
+void coroutine_trampoline(void * _start, void * _context)
+{
+ coroutine_start start = (coroutine_start)_start;
+ struct coroutine_context * context = _context;
+ rb_wasm_set_stack_pointer(context->current_sp);
+
+ start(context->from, context);
+}
diff --git a/coroutine/asyncify/Context.h b/coroutine/asyncify/Context.h
new file mode 100644
index 0000000000..71791a4004
--- /dev/null
+++ b/coroutine/asyncify/Context.h
@@ -0,0 +1,93 @@
+#ifndef COROUTINE_ASYNCIFY_CONTEXT_H
+#define COROUTINE_ASYNCIFY_CONTEXT_H
+
+/*
+ This is a coroutine implementation based on Binaryen's Asyncify transformation for WebAssembly.
+
+ This implementation is built on low-level ucontext-like API in wasm/fiber.c
+ This file is an adapter for the common coroutine interface and for stack manipulation.
+ wasm/fiber.c doesn't take care of stack to avoid duplicate management with this adapter.
+
+ * See also: wasm/fiber.c
+*/
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdint.h>
+#include "wasm/asyncify.h"
+#include "wasm/machine.h"
+#include "wasm/fiber.h"
+
+#define COROUTINE void __attribute__((__noreturn__))
+
+static const int ASYNCIFY_CORO_DEBUG = 0;
+
+struct coroutine_context
+{
+ rb_wasm_fiber_context fc;
+ void *argument;
+ struct coroutine_context *from;
+
+ void *current_sp;
+ void *stack_base;
+ size_t size;
+};
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+COROUTINE coroutine_trampoline(void * _start, void * _context);
+
+static inline void coroutine_initialize_main(struct coroutine_context * context)
+{
+ if (ASYNCIFY_CORO_DEBUG) fprintf(stderr, "[%s] entry (context = %p)\n", __func__, context);
+ // NULL fiber entry means it's the main fiber, and handled specially.
+ rb_wasm_init_context(&context->fc, NULL, NULL, NULL);
+ // mark the main fiber has already started
+ context->fc.is_started = true;
+}
+
+static inline void coroutine_initialize(struct coroutine_context *context, coroutine_start start, void *stack, size_t size)
+{
+ // Linear stack pointer must be always aligned down to 16 bytes.
+ // https://github.com/WebAssembly/tool-conventions/blob/c74267a5897c1bdc9aa60adeaf41816387d3cd12/BasicCABI.md#the-linear-stack
+ uintptr_t sp = ((uintptr_t)stack + size) & ~0xF;
+ if (ASYNCIFY_CORO_DEBUG) fprintf(stderr, "[%s] entry (context = %p, stack = %p ... %p)\n", __func__, context, stack, (char *)sp);
+ rb_wasm_init_context(&context->fc, coroutine_trampoline, start, context);
+ // record the initial stack pointer position to restore it after resumption
+ context->current_sp = (char *)sp;
+ context->stack_base = stack;
+ context->size = size;
+}
+
+static inline struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target)
+{
+ if (ASYNCIFY_CORO_DEBUG) fprintf(stderr, "[%s] entry (current = %p, target = %p)\n", __func__, current, target);
+ struct coroutine_context * previous = target->from;
+
+ target->from = current;
+ if (ASYNCIFY_CORO_DEBUG) fprintf(stderr, "[%s] current->current_sp = %p -> %p\n", __func__, current->current_sp, rb_wasm_get_stack_pointer());
+ // record the current stack pointer position to restore it after resumption
+ current->current_sp = rb_wasm_get_stack_pointer();
+
+ // suspend the current coroutine and resume another coroutine
+
+ rb_wasm_swapcontext(&current->fc, &target->fc);
+
+ // after the original coroutine resumed
+
+ rb_wasm_set_stack_pointer(current->current_sp);
+
+ target->from = previous;
+
+ return target;
+}
+
+static inline void coroutine_destroy(struct coroutine_context * context)
+{
+ if (ASYNCIFY_CORO_DEBUG) fprintf(stderr, "[%s] entry (context = %p)\n", __func__, context);
+ context->stack_base = NULL;
+ context->size = 0;
+ context->from = NULL;
+}
+
+#endif /* COROUTINE_ASYNCIFY_CONTEXT_H */
diff --git a/coroutine/copy/Context.c b/coroutine/copy/Context.c
deleted file mode 100644
index a1b8a71200..0000000000
--- a/coroutine/copy/Context.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * This file is part of the "Coroutine" project and released under the MIT License.
- *
- * Created by Samuel Williams on 24/6/2019.
- * Copyright, 2019, by Samuel Williams. All rights reserved.
-*/
-
-#include "Context.h"
-
-// http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html
-#ifndef __GNUC__
-#define __asm__ asm
-#endif
-
-#if defined(__sparc)
-__attribute__((noinline))
-// https://marc.info/?l=linux-sparc&m=131914569320660&w=2
-static void coroutine_flush_register_windows() {
- __asm__
-#ifdef __GNUC__
- __volatile__
-#endif
-#if defined(__sparcv9) || defined(__sparc_v9__) || defined(__arch64__)
-#ifdef __GNUC__
- ("flushw" : : : "%o7")
-#else
- ("flushw")
-#endif
-#else
- ("ta 0x03")
-#endif
- ;
-}
-#else
-static void coroutine_flush_register_windows() {}
-#endif
-
-int coroutine_save_stack(struct coroutine_context * context) {
- void *stack_pointer = &stack_pointer;
-
- assert(context->stack);
- assert(context->base);
-
- // At this point, you may need to ensure on architectures that use register windows, that all registers are flushed to the stack.
- coroutine_flush_register_windows();
-
- // Save stack to private area:
- if (stack_pointer < context->base) {
- size_t size = (char*)context->base - (char*)stack_pointer;
- assert(size <= context->size);
-
- memcpy(context->stack, stack_pointer, size);
- context->used = size;
- } else {
- size_t size = (char*)stack_pointer - (char*)context->base;
- assert(size <= context->size);
-
- memcpy(context->stack, context->base, size);
- context->used = size;
- }
-
- // Save registers / restore point:
- return _setjmp(context->state);
-}
-
-__attribute__((noreturn, noinline))
-static void coroutine_restore_stack_padded(struct coroutine_context *context, void * buffer) {
- void *stack_pointer = &stack_pointer;
-
- assert(context->base);
-
- // Restore stack from private area:
- if (stack_pointer < context->base) {
- void * bottom = (char*)context->base - context->used;
- assert(bottom > stack_pointer);
-
- memcpy(bottom, context->stack, context->used);
- } else {
- void * top = (char*)context->base + context->used;
- assert(top < stack_pointer);
-
- memcpy(context->base, context->stack, context->used);
- }
-
- // Restore registers:
- // The `| (int)buffer` is to force the compiler NOT to elide he buffer and `alloca`.
- _longjmp(context->state, 1 | (int)buffer);
-}
-
-static const size_t GAP = 128;
-
-// In order to swap between coroutines, we need to swap the stack and registers.
-// `setjmp` and `longjmp` are able to swap registers, but what about swapping stacks? You can use `memcpy` to copy the current stack to a private area and `memcpy` to copy the private stack of the next coroutine to the main stack.
-// But if the stack yop are copying in to the main stack is bigger than the currently executing stack, the `memcpy` will clobber the current stack frame (including the context argument). So we use `alloca` to push the current stack frame *beyond* the stack we are about to copy in. This ensures the current stack frame in `coroutine_restore_stack_padded` remains valid for calling `longjmp`.
-__attribute__((noreturn))
-void coroutine_restore_stack(struct coroutine_context *context) {
- void *stack_pointer = &stack_pointer;
- void *buffer = NULL;
- ssize_t offset = 0;
-
- // We must ensure that the next stack frame is BEYOND the stack we are restoring:
- if (stack_pointer < context->base) {
- offset = (char*)stack_pointer - ((char*)context->base - context->used) + GAP;
- if (offset > 0) buffer = alloca(offset);
- } else {
- offset = ((char*)context->base + context->used) - (char*)stack_pointer + GAP;
- if (offset > 0) buffer = alloca(offset);
- }
-
- assert(context->used > 0);
-
- coroutine_restore_stack_padded(context, buffer);
-}
-
-struct coroutine_context *coroutine_transfer(struct coroutine_context *current, struct coroutine_context *target)
-{
- struct coroutine_context *previous = target->from;
-
- // In theory, either this condition holds true, or we should assign the base address to target:
- assert(current->base == target->base);
- // If you are trying to copy the coroutine to a different thread
- // target->base = current->base
-
- target->from = current;
-
- assert(current != target);
-
- // It's possible to come here, even thought the current fiber has been terminated. We are never going to return so we don't bother saving the stack.
-
- if (current->stack) {
- if (coroutine_save_stack(current) == 0) {
- coroutine_restore_stack(target);
- }
- } else {
- coroutine_restore_stack(target);
- }
-
- target->from = previous;
-
- return target;
-}
diff --git a/coroutine/copy/Context.h b/coroutine/copy/Context.h
deleted file mode 100644
index 1319f55d16..0000000000
--- a/coroutine/copy/Context.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * This file is part of the "Coroutine" project and released under the MIT License.
- *
- * Created by Samuel Williams on 27/6/2019.
- * Copyright, 2019, by Samuel Williams. All rights reserved.
-*/
-
-#pragma once
-
-#include <assert.h>
-#include <stddef.h>
-#include <setjmp.h>
-#include <string.h>
-#include <stdlib.h>
-#include <alloca.h>
-
-#define COROUTINE __attribute__((noreturn)) void
-
-#if INTPTR_MAX <= INT32_MAX
-#define COROUTINE_LIMITED_ADDRESS_SPACE
-#endif
-
-// This stack copying implementation which uses a private stack for each coroutine, including the main one.
-#define COROUTINE_PRIVATE_STACK
-
-struct coroutine_context
-{
- // Private stack:
- void *stack;
- size_t size, used;
-
- // The top (or bottom) of the currently executing stack:
- void *base;
-
- jmp_buf state;
-
- struct coroutine_context *from;
-};
-
-typedef COROUTINE(*coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
-
-int coroutine_save_stack(struct coroutine_context * context);
-COROUTINE coroutine_restore_stack(struct coroutine_context *context);
-
-// @param stack The private stack area memory allocation (pointer to lowest address).
-// @param size The size of the private stack area.
-// @param base A stack pointer to the base of the main stack. On x86 hardware, this is the upper extent of the region that will be copied to the private stack.
-static inline void coroutine_initialize_main(struct coroutine_context *context, void *stack, size_t size, void *base) {
- assert(stack);
- assert(size >= 1024);
-
- context->stack = stack;
- context->size = size;
- context->used = 0;
-
- assert(base);
- context->base = base;
-
- context->from = NULL;
-}
-
-// @param start The start function to invoke.
-static inline void coroutine_initialize(
- struct coroutine_context *context,
- coroutine_start start,
- void *stack,
- size_t size,
- void *base
-) {
- assert(start);
-
- coroutine_initialize_main(context, stack, size, base);
-
- if (coroutine_save_stack(context)) {
- start(context->from, context);
- }
-}
-
-struct coroutine_context *coroutine_transfer(struct coroutine_context *current, register struct coroutine_context *target);
-
-static inline void coroutine_destroy(struct coroutine_context *context)
-{
- context->stack = NULL;
- context->size = 0;
- context->from = NULL;
-}
diff --git a/coroutine/emscripten/Context.c b/coroutine/emscripten/Context.c
new file mode 100644
index 0000000000..75c088daaa
--- /dev/null
+++ b/coroutine/emscripten/Context.c
@@ -0,0 +1,8 @@
+#include "Context.h"
+
+void coroutine_trampoline(void * _context)
+{
+ struct coroutine_context * context = _context;
+
+ context->entry_func(context->from, context);
+}
diff --git a/coroutine/emscripten/Context.h b/coroutine/emscripten/Context.h
new file mode 100644
index 0000000000..361e241685
--- /dev/null
+++ b/coroutine/emscripten/Context.h
@@ -0,0 +1,77 @@
+#ifndef COROUTINE_EMSCRIPTEN_CONTEXT_H
+#define COROUTINE_EMSCRIPTEN_CONTEXT_H 1
+
+/* An experimental coroutine wrapper for emscripten
+ * Contact on Yusuke Endoh if you encounter any problem about this
+ */
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <emscripten/fiber.h>
+
+#define COROUTINE __attribute__((noreturn)) void
+
+#if INTPTR_MAX <= INT32_MAX
+#define COROUTINE_LIMITED_ADDRESS_SPACE
+#endif
+
+struct coroutine_context;
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+struct coroutine_context
+{
+ emscripten_fiber_t state;
+ coroutine_start entry_func;
+ struct coroutine_context * from;
+ void *argument;
+};
+
+COROUTINE coroutine_trampoline(void * _context);
+
+#define MAIN_ASYNCIFY_STACK_SIZE 65536
+static inline void coroutine_initialize_main(struct coroutine_context * context) {
+ static char asyncify_stack[MAIN_ASYNCIFY_STACK_SIZE];
+ emscripten_fiber_init_from_current_context(&context->state, asyncify_stack, MAIN_ASYNCIFY_STACK_SIZE);
+}
+#undef MAIN_ASYNCIFY_STACK_SIZE
+
+static inline void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+) {
+ assert(start && stack && size >= 1024);
+
+ uintptr_t addr = (uintptr_t)stack;
+ size_t offset = addr & 0xF;
+ void *c_stack = (void*)((addr + 0xF) & ~0xF);
+ size -= offset;
+ size_t c_stack_size = (size / 2) & ~0xF;
+ void *asyncify_stack = (void*)((uintptr_t)c_stack + c_stack_size);
+ size_t asyncify_stack_size = size - c_stack_size;
+ context->entry_func = start;
+
+ emscripten_fiber_init(&context->state, coroutine_trampoline, context, c_stack, c_stack_size, asyncify_stack, asyncify_stack_size);
+}
+
+static inline struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target)
+{
+ struct coroutine_context * previous = target->from;
+
+ target->from = current;
+ emscripten_fiber_swap(&current->state, &target->state);
+ target->from = previous;
+
+ return target;
+}
+
+static inline void coroutine_destroy(struct coroutine_context * context)
+{
+ context->from = NULL;
+}
+
+#endif /* COROUTINE_EMSCRIPTEN_CONTEXT_H */
diff --git a/coroutine/ppc/Context.S b/coroutine/ppc/Context.S
new file mode 100644
index 0000000000..cdda93e179
--- /dev/null
+++ b/coroutine/ppc/Context.S
@@ -0,0 +1,90 @@
+; Based on the code by Samuel Williams. Created by Sergey Fedorov on 04/06/2022.
+; Credits to Samuel Williams, Rei Odaira and Iain Sandoe. Errors, if any, are mine.
+; Some relevant examples: https://github.com/gcc-mirror/gcc/blob/master/libphobos/libdruntime/config/powerpc/switchcontext.S
+; https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/rs6000/darwin-gpsave.S
+; https://www.ibm.com/docs/en/aix/7.2?topic=epilogs-saving-gprs-only
+; ppc32 version may be re-written compactly with stmw/lwm, but the code wonʼt be faster, see: https://github.com/ruby/ruby/pull/5927#issuecomment-1139730541
+
+; Notice that this code is only for Darwin (macOS). Darwin ABI differs from AIX and ELF.
+; To add support for AIX, *BSD or *Linux, please make separate implementations.
+
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
+.machine ppc7400 ; = G4, Rosetta
+.text
+
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+.align 2
+
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
+ ; Make space on the stack for caller registers
+ ; (Should we rather use red zone? See libphobos example.)
+ subi r1,r1,80
+
+ ; Get LR
+ mflr r0
+
+ ; Save caller registers
+ stw r31,0(r1)
+ stw r30,4(r1)
+ stw r29,8(r1)
+ stw r28,12(r1)
+ stw r27,16(r1)
+ stw r26,20(r1)
+ stw r25,24(r1)
+ stw r24,28(r1)
+ stw r23,32(r1)
+ stw r22,36(r1)
+ stw r21,40(r1)
+ stw r20,44(r1)
+ stw r19,48(r1)
+ stw r18,52(r1)
+ stw r17,56(r1)
+ stw r16,60(r1)
+ stw r15,64(r1)
+ stw r14,68(r1)
+ stw r13,72(r1)
+
+ ; Save return address
+ ; Possibly should rather be saved into linkage area, see libphobos and IBM docs
+ stw r0,76(r1)
+
+ ; Save stack pointer to first argument
+ stw r1,0(r3)
+
+ ; Load stack pointer from second argument
+ lwz r1,0(r4)
+
+ ; Load return address
+ lwz r0,76(r1)
+
+ ; Restore caller registers
+ lwz r13,72(r1)
+ lwz r14,68(r1)
+ lwz r15,64(r1)
+ lwz r16,60(r1)
+ lwz r17,56(r1)
+ lwz r18,52(r1)
+ lwz r19,48(r1)
+ lwz r20,44(r1)
+ lwz r21,40(r1)
+ lwz r22,36(r1)
+ lwz r23,32(r1)
+ lwz r24,28(r1)
+ lwz r25,24(r1)
+ lwz r26,20(r1)
+ lwz r27,16(r1)
+ lwz r28,12(r1)
+ lwz r29,8(r1)
+ lwz r30,4(r1)
+ lwz r31,0(r1)
+
+ ; Set LR
+ mtlr r0
+
+ ; Pop stack frame
+ addi r1,r1,80
+
+ ; Jump to return address
+ blr
diff --git a/coroutine/ppc/Context.h b/coroutine/ppc/Context.h
new file mode 100644
index 0000000000..1fce112579
--- /dev/null
+++ b/coroutine/ppc/Context.h
@@ -0,0 +1,58 @@
+#ifndef COROUTINE_PPC_CONTEXT_H
+#define COROUTINE_PPC_CONTEXT_H 1
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#define COROUTINE __attribute__((noreturn)) void
+#define COROUTINE_LIMITED_ADDRESS_SPACE
+
+enum {
+ COROUTINE_REGISTERS =
+ 20 /* 19 general purpose registers (r13–r31) and 1 return address */
+ + 4 /* space for fiber_entry() to store the link register */
+};
+
+struct coroutine_context
+{
+ void **stack_pointer;
+ void *argument;
+};
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+static inline void coroutine_initialize_main(struct coroutine_context * context) {
+ context->stack_pointer = NULL;
+}
+
+static inline void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+) {
+ assert(start && stack && size >= 1024);
+
+ // Stack grows down. Force 16-byte alignment.
+ char * top = (char*)stack + size;
+ context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
+
+ context->stack_pointer -= COROUTINE_REGISTERS;
+ memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS);
+
+ /* Skip a global prologue that sets the TOC register */
+ context->stack_pointer[19] = ((char*)start) + 8;
+}
+
+struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target);
+
+static inline void coroutine_destroy(struct coroutine_context * context)
+{
+ context->stack_pointer = NULL;
+}
+
+#endif /* COROUTINE_PPC_CONTEXT_H */
diff --git a/coroutine/ppc64/Context.S b/coroutine/ppc64/Context.S
new file mode 100644
index 0000000000..f8561e0e7d
--- /dev/null
+++ b/coroutine/ppc64/Context.S
@@ -0,0 +1,89 @@
+; Based on the code by Samuel Williams. Created by Sergey Fedorov on 04/06/2022.
+; Credits to Samuel Williams, Rei Odaira and Iain Sandoe. Errors, if any, are mine.
+; Some relevant examples: https://github.com/gcc-mirror/gcc/blob/master/libphobos/libdruntime/config/powerpc/switchcontext.S
+; https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/rs6000/darwin-gpsave.S
+; https://www.ibm.com/docs/en/aix/7.2?topic=epilogs-saving-gprs-only
+
+; Notice that this code is only for Darwin (macOS). Darwin ABI differs from AIX and ELF.
+; To add support for AIX, *BSD or *Linux, please make separate implementations.
+
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
+.machine ppc64 ; = G5
+.text
+
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+.align 2
+
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
+ ; Make space on the stack for caller registers
+ ; (Should we rather use red zone? See libphobos example.)
+ subi r1,r1,160
+
+ ; Get LR
+ mflr r0
+
+ ; Save caller registers
+ std r31,0(r1)
+ std r30,8(r1)
+ std r29,16(r1)
+ std r28,24(r1)
+ std r27,32(r1)
+ std r26,40(r1)
+ std r25,48(r1)
+ std r24,56(r1)
+ std r23,64(r1)
+ std r22,72(r1)
+ std r21,80(r1)
+ std r20,88(r1)
+ std r19,96(r1)
+ std r18,104(r1)
+ std r17,112(r1)
+ std r16,120(r1)
+ std r15,128(r1)
+ std r14,136(r1)
+ std r13,144(r1)
+
+ ; Save return address
+ ; Possibly should rather be saved into linkage area, see libphobos and IBM docs
+ std r0,152(r1)
+
+ ; Save stack pointer to first argument
+ std r1,0(r3)
+
+ ; Load stack pointer from second argument
+ ld r1,0(r4)
+
+ ; Load return address
+ ld r0,152(r1)
+
+ ; Restore caller registers
+ ld r13,144(r1)
+ ld r14,136(r1)
+ ld r15,128(r1)
+ ld r16,120(r1)
+ ld r17,112(r1)
+ ld r18,104(r1)
+ ld r19,96(r1)
+ ld r20,88(r1)
+ ld r21,80(r1)
+ ld r22,72(r1)
+ ld r23,64(r1)
+ ld r24,56(r1)
+ ld r25,48(r1)
+ ld r26,40(r1)
+ ld r27,32(r1)
+ ld r28,24(r1)
+ ld r29,16(r1)
+ ld r30,8(r1)
+ ld r31,0(r1)
+
+ ; Set LR
+ mtlr r0
+
+ ; Pop stack frame
+ addi r1,r1,160
+
+ ; Jump to return address
+ blr
diff --git a/coroutine/ppc64/Context.h b/coroutine/ppc64/Context.h
new file mode 100644
index 0000000000..3e6f77f55a
--- /dev/null
+++ b/coroutine/ppc64/Context.h
@@ -0,0 +1,57 @@
+#ifndef COROUTINE_PPC64_CONTEXT_H
+#define COROUTINE_PPC64_CONTEXT_H 1
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#define COROUTINE __attribute__((noreturn)) void
+
+enum {
+ COROUTINE_REGISTERS =
+ 20 /* 19 general purpose registers (r13–r31) and 1 return address */
+ + 4 /* space for fiber_entry() to store the link register */
+};
+
+struct coroutine_context
+{
+ void **stack_pointer;
+ void *argument;
+};
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+static inline void coroutine_initialize_main(struct coroutine_context * context) {
+ context->stack_pointer = NULL;
+}
+
+static inline void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+) {
+ assert(start && stack && size >= 1024);
+
+ // Stack grows down. Force 16-byte alignment.
+ char * top = (char*)stack + size;
+ context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
+
+ context->stack_pointer -= COROUTINE_REGISTERS;
+ memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS);
+
+ /* Skip a global prologue that sets the TOC register */
+ context->stack_pointer[19] = ((char*)start) + 8;
+}
+
+struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target);
+
+static inline void coroutine_destroy(struct coroutine_context * context)
+{
+ context->stack_pointer = NULL;
+}
+
+#endif /* COROUTINE_PPC64_CONTEXT_H */
diff --git a/coroutine/ppc64le/Context.S b/coroutine/ppc64le/Context.S
index 1b39086f8f..61be9efcf0 100644
--- a/coroutine/ppc64le/Context.S
+++ b/coroutine/ppc64le/Context.S
@@ -1,9 +1,12 @@
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
.text
.align 2
-.globl coroutine_transfer
-.type coroutine_transfer, @function
-coroutine_transfer:
+.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+.type PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer), @function
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# Make space on the stack for caller registers
addi 1,1,-152
diff --git a/coroutine/ppc64le/Context.h b/coroutine/ppc64le/Context.h
index adf21b4fd9..fbfaa2ee63 100644
--- a/coroutine/ppc64le/Context.h
+++ b/coroutine/ppc64le/Context.h
@@ -1,6 +1,11 @@
+#ifndef COROUTINE_PPC64LE_CONTEXT_H
+#define COROUTINE_PPC64LE_CONTEXT_H 1
+
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __attribute__((noreturn)) void
@@ -14,6 +19,7 @@ enum {
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -47,3 +53,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_PPC64LE_CONTEXT_H */
diff --git a/coroutine/pthread/Context.c b/coroutine/pthread/Context.c
new file mode 100644
index 0000000000..38774cda0b
--- /dev/null
+++ b/coroutine/pthread/Context.c
@@ -0,0 +1,272 @@
+/*
+ * This file is part of the "Coroutine" project and released under the MIT License.
+ *
+ * Created by Samuel Williams on 24/6/2021.
+ * Copyright, 2021, by Samuel Williams.
+*/
+
+#include "Context.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+
+static const int DEBUG = 0;
+
+static
+int check(const char * message, int result) {
+ if (result) {
+ switch (result) {
+ case EDEADLK:
+ if (DEBUG) fprintf(stderr, "deadlock detected result=%d errno=%d\n", result, errno);
+ break;
+ default:
+ if (DEBUG) fprintf(stderr, "error detected result=%d errno=%d\n", result, errno);
+ perror(message);
+ }
+ }
+
+ assert(result == 0);
+
+ return result;
+}
+
+void coroutine_initialize_main(struct coroutine_context * context) {
+ context->id = pthread_self();
+
+ check("coroutine_initialize_main:pthread_cond_init",
+ pthread_cond_init(&context->schedule, NULL)
+ );
+
+ context->shared = (struct coroutine_shared*)malloc(sizeof(struct coroutine_shared));
+ assert(context->shared);
+
+ context->shared->main = context;
+ context->shared->count = 1;
+
+ if (DEBUG) {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
+
+ check("coroutine_initialize_main:pthread_mutex_init",
+ pthread_mutex_init(&context->shared->guard, &attr)
+ );
+ } else {
+ check("coroutine_initialize_main:pthread_mutex_init",
+ pthread_mutex_init(&context->shared->guard, NULL)
+ );
+ }
+}
+
+static
+void coroutine_release(struct coroutine_context *context) {
+ if (context->shared) {
+ size_t count = (context->shared->count -= 1);
+
+ if (count == 0) {
+ if (DEBUG) fprintf(stderr, "coroutine_release:pthread_mutex_destroy(%p)\n", &context->shared->guard);
+ pthread_mutex_destroy(&context->shared->guard);
+ free(context->shared);
+ }
+
+ context->shared = NULL;
+
+ if (DEBUG) fprintf(stderr, "coroutine_release:pthread_cond_destroy(%p)\n", &context->schedule);
+ pthread_cond_destroy(&context->schedule);
+ }
+}
+
+void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+) {
+ assert(start && stack && size >= 1024);
+
+ // We will create the thread when we first transfer, but save the details now:
+ context->shared = NULL;
+ context->start = start;
+ context->stack = stack;
+ context->size = size;
+}
+
+static
+int is_locked(pthread_mutex_t * mutex) {
+ int result = pthread_mutex_trylock(mutex);
+
+ // If we could successfully lock the mutex:
+ if (result == 0) {
+ pthread_mutex_unlock(mutex);
+ // We could lock the mutex, so it wasn't locked:
+ return 0;
+ } else {
+ // Otherwise we couldn't lock it because it's already locked:
+ return 1;
+ }
+}
+
+static
+void coroutine_guard_unlock(void * _context)
+{
+ struct coroutine_context * context = _context;
+
+ if (DEBUG) fprintf(stderr, "coroutine_guard_unlock:pthread_mutex_unlock\n");
+
+ check("coroutine_guard_unlock:pthread_mutex_unlock",
+ pthread_mutex_unlock(&context->shared->guard)
+ );
+}
+
+static
+void coroutine_wait(struct coroutine_context *context)
+{
+ if (DEBUG) fprintf(stderr, "coroutine_wait:pthread_mutex_lock(guard=%p is_locked=%d)\n", &context->shared->guard, is_locked(&context->shared->guard));
+ check("coroutine_wait:pthread_mutex_lock",
+ pthread_mutex_lock(&context->shared->guard)
+ );
+
+ if (DEBUG) fprintf(stderr, "coroutine_wait:pthread_mutex_unlock(guard)\n");
+ pthread_mutex_unlock(&context->shared->guard);
+}
+
+static
+void coroutine_trampoline_cleanup(void *_context) {
+ struct coroutine_context * context = _context;
+ coroutine_release(context);
+}
+
+void * coroutine_trampoline(void * _context)
+{
+ struct coroutine_context * context = _context;
+ assert(context->shared);
+
+ pthread_cleanup_push(coroutine_trampoline_cleanup, context);
+
+ coroutine_wait(context);
+
+ context->start(context->from, context);
+
+ pthread_cleanup_pop(1);
+
+ return NULL;
+}
+
+static
+int coroutine_create_thread(struct coroutine_context *context)
+{
+ int result;
+
+ pthread_attr_t attr;
+ result = pthread_attr_init(&attr);
+ if (result != 0) {
+ return result;
+ }
+
+ result = pthread_attr_setstack(&attr, context->stack, (size_t)context->size);
+ if (result != 0) {
+ pthread_attr_destroy(&attr);
+ return result;
+ }
+
+ result = pthread_cond_init(&context->schedule, NULL);
+ if (result != 0) {
+ pthread_attr_destroy(&attr);
+ return result;
+ }
+
+ result = pthread_create(&context->id, &attr, coroutine_trampoline, context);
+ if (result != 0) {
+ pthread_attr_destroy(&attr);
+ if (DEBUG) fprintf(stderr, "coroutine_create_thread:pthread_cond_destroy(%p)\n", &context->schedule);
+ pthread_cond_destroy(&context->schedule);
+ return result;
+ }
+
+ context->shared->count += 1;
+
+ return result;
+}
+
+struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target)
+{
+ assert(current->shared);
+
+ struct coroutine_context * previous = target->from;
+ target->from = current;
+
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:pthread_mutex_lock(guard=%p is_locked=%d)\n", &current->shared->guard, is_locked(&current->shared->guard));
+ pthread_mutex_lock(&current->shared->guard);
+ pthread_cleanup_push(coroutine_guard_unlock, current);
+
+ // First transfer:
+ if (target->shared == NULL) {
+ target->shared = current->shared;
+
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:coroutine_create_thread...\n");
+ if (coroutine_create_thread(target)) {
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:coroutine_create_thread failed\n");
+ target->shared = NULL;
+ target->from = previous;
+ return NULL;
+ }
+ } else {
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:pthread_cond_signal(target)\n");
+ pthread_cond_signal(&target->schedule);
+ }
+
+ // A side effect of acting upon a cancellation request while in a condition wait is that the mutex is (in effect) re-acquired before calling the first cancellation cleanup handler. If cancelled, pthread_cond_wait immediately invokes cleanup handlers.
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:pthread_cond_wait(schedule=%p, guard=%p, is_locked=%d)\n", &current->schedule, &current->shared->guard, is_locked(&current->shared->guard));
+ check("coroutine_transfer:pthread_cond_wait",
+ pthread_cond_wait(&current->schedule, &current->shared->guard)
+ );
+
+ if (DEBUG) fprintf(stderr, "coroutine_transfer:pthread_cleanup_pop\n");
+ pthread_cleanup_pop(1);
+
+#ifdef __FreeBSD__
+ // Apparently required for FreeBSD:
+ pthread_testcancel();
+#endif
+
+ target->from = previous;
+
+ return target;
+}
+
+static
+void coroutine_join(struct coroutine_context * context) {
+ if (DEBUG) fprintf(stderr, "coroutine_join:pthread_cancel\n");
+ int result = pthread_cancel(context->id);
+ if (result == -1 && errno == ESRCH) {
+ // The thread may be dead due to fork, so it cannot be joined and this doesn't represent a real error:
+ return;
+ }
+
+ check("coroutine_join:pthread_cancel", result);
+
+ if (DEBUG) fprintf(stderr, "coroutine_join:pthread_join\n");
+ check("coroutine_join:pthread_join",
+ pthread_join(context->id, NULL)
+ );
+
+ if (DEBUG) fprintf(stderr, "coroutine_join:pthread_join done\n");
+}
+
+void coroutine_destroy(struct coroutine_context * context)
+{
+ if (DEBUG) fprintf(stderr, "coroutine_destroy\n");
+
+ assert(context);
+
+ // We are already destroyed or never created:
+ if (context->shared == NULL) return;
+
+ if (context == context->shared->main) {
+ context->shared->main = NULL;
+ coroutine_release(context);
+ } else {
+ coroutine_join(context);
+ assert(context->shared == NULL);
+ }
+}
diff --git a/coroutine/pthread/Context.h b/coroutine/pthread/Context.h
new file mode 100644
index 0000000000..6d551ee9df
--- /dev/null
+++ b/coroutine/pthread/Context.h
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the "Coroutine" project and released under the MIT License.
+ *
+ * Created by Samuel Williams on 24/6/2021.
+ * Copyright, 2021, by Samuel Williams.
+*/
+
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <pthread.h>
+
+#define COROUTINE void
+
+#define COROUTINE_PTHREAD_CONTEXT
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#if INTPTR_MAX <= INT32_MAX
+#define COROUTINE_LIMITED_ADDRESS_SPACE
+#endif
+#endif
+
+struct coroutine_context;
+
+struct coroutine_shared
+{
+ pthread_mutex_t guard;
+ struct coroutine_context * main;
+
+ size_t count;
+};
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+struct coroutine_context
+{
+ struct coroutine_shared * shared;
+
+ coroutine_start start;
+ void *argument;
+
+ void *stack;
+ size_t size;
+
+ pthread_t id;
+ pthread_cond_t schedule;
+ struct coroutine_context * from;
+};
+
+void coroutine_initialize_main(struct coroutine_context * context);
+
+void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+);
+
+struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target);
+
+void coroutine_destroy(struct coroutine_context * context);
diff --git a/coroutine/riscv64/Context.S b/coroutine/riscv64/Context.S
new file mode 100644
index 0000000000..cc4e872f84
--- /dev/null
+++ b/coroutine/riscv64/Context.S
@@ -0,0 +1,87 @@
+#define TOKEN_PASTE(x,y) x##y
+#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
+
+.text
+.align 2
+
+.global PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
+PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
+
+ # Make space on the stack for caller registers
+ addi sp, sp, -0xd0
+
+ # Save caller registers
+ sd s0, 0x00(sp)
+ sd s1, 0x08(sp)
+ sd s2, 0x10(sp)
+ sd s3, 0x18(sp)
+ sd s4, 0x20(sp)
+ sd s5, 0x28(sp)
+ sd s6, 0x30(sp)
+ sd s7, 0x38(sp)
+ sd s8, 0x40(sp)
+ sd s9, 0x48(sp)
+ sd s10, 0x50(sp)
+ sd s11, 0x58(sp)
+ fsd fs0, 0x60(sp)
+ fsd fs1, 0x68(sp)
+ fsd fs2, 0x70(sp)
+ fsd fs3, 0x78(sp)
+ fsd fs4, 0x80(sp)
+ fsd fs5, 0x88(sp)
+ fsd fs6, 0x90(sp)
+ fsd fs7, 0x98(sp)
+ fsd fs8, 0xa0(sp)
+ fsd fs9, 0xa8(sp)
+ fsd fs10, 0xb0(sp)
+ fsd fs11, 0xb8(sp)
+
+ # Save return address
+ sd ra, 0xc0(sp)
+
+ # Save stack pointer to a0 (first argument)
+ mv a2, sp
+ sd a2, (a0)
+
+ # Load stack pointer from a1 (second argument)
+ ld a3, (a1)
+ mv sp, a3
+
+ # Restore caller registers
+ ld s0, 0x00(sp)
+ ld s1, 0x08(sp)
+ ld s2, 0x10(sp)
+ ld s3, 0x18(sp)
+ ld s4, 0x20(sp)
+ ld s5, 0x28(sp)
+ ld s6, 0x30(sp)
+ ld s7, 0x38(sp)
+ ld s8, 0x40(sp)
+ ld s9, 0x48(sp)
+ ld s10, 0x50(sp)
+ ld s11, 0x58(sp)
+ fld fs0, 0x60(sp)
+ fld fs1, 0x68(sp)
+ fld fs2, 0x70(sp)
+ fld fs3, 0x78(sp)
+ fld fs4, 0x80(sp)
+ fld fs5, 0x88(sp)
+ fld fs6, 0x90(sp)
+ fld fs7, 0x98(sp)
+ fld fs8, 0xa0(sp)
+ fld fs9, 0xa8(sp)
+ fld fs10, 0xb0(sp)
+ fld fs11, 0xb8(sp)
+
+ # Load return address
+ ld ra, 0xc0(sp)
+
+ # Pop stack frame
+ addi sp, sp, 0xd0
+
+ # Jump to return address
+ ret
+
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/coroutine/riscv64/Context.h b/coroutine/riscv64/Context.h
new file mode 100644
index 0000000000..9ce1140e0b
--- /dev/null
+++ b/coroutine/riscv64/Context.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#define COROUTINE __attribute__((noreturn)) void
+
+enum {COROUTINE_REGISTERS = 0xd0 / 8};
+
+struct coroutine_context
+{
+ void **stack_pointer;
+ void *argument;
+};
+
+typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
+
+static inline void coroutine_initialize_main(struct coroutine_context * context) {
+ context->stack_pointer = NULL;
+}
+
+static inline void coroutine_initialize(
+ struct coroutine_context *context,
+ coroutine_start start,
+ void *stack,
+ size_t size
+) {
+ assert(start && stack && size >= 1024);
+
+ // Stack grows down. Force 16-byte alignment.
+ char * top = (char*)stack + size;
+ context->stack_pointer = (void**)((uintptr_t)top & ~0xF);
+
+ context->stack_pointer -= COROUTINE_REGISTERS;
+ memset(context->stack_pointer, 0, sizeof(void*) * COROUTINE_REGISTERS);
+
+ context->stack_pointer[0xc0 / 8] = (void*)start;
+}
+
+struct coroutine_context * coroutine_transfer(struct coroutine_context * current, struct coroutine_context * target);
+
+static inline void coroutine_destroy(struct coroutine_context * context)
+{
+}
diff --git a/coroutine/ucontext/Context.c b/coroutine/ucontext/Context.c
index eec4ef3956..5d728d554d 100644
--- a/coroutine/ucontext/Context.c
+++ b/coroutine/ucontext/Context.c
@@ -2,7 +2,7 @@
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 24/6/2019.
- * Copyright, 2019, by Samuel Williams. All rights reserved.
+ * Copyright, 2019, by Samuel Williams.
*/
/* According to Solaris' ucontext.h, makecontext, etc. are removed in SUSv4.
@@ -11,11 +11,12 @@
#if defined(__sun) && !defined(__EXTENSIONS__)
#define __EXTENSIONS__
#endif
+
#include "Context.h"
void coroutine_trampoline(void * _start, void * _context)
{
- coroutine_start start = _start;
+ coroutine_start start = (coroutine_start)_start;
struct coroutine_context * context = _context;
start(context->from, context);
diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h
index 6cf16c8604..d338d8de60 100644
--- a/coroutine/ucontext/Context.h
+++ b/coroutine/ucontext/Context.h
@@ -1,8 +1,11 @@
+#ifndef COROUTINE_UCONTEXT_CONTEXT_H
+#define COROUTINE_UCONTEXT_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 24/6/2019.
- * Copyright, 2019, by Samuel Williams. All rights reserved.
+ * Copyright, 2019, by Samuel Williams.
*/
#pragma once
@@ -13,14 +16,18 @@
#define COROUTINE __attribute__((noreturn)) void
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
#if INTPTR_MAX <= INT32_MAX
#define COROUTINE_LIMITED_ADDRESS_SPACE
#endif
+#endif
struct coroutine_context
{
ucontext_t state;
struct coroutine_context * from;
+ void *argument;
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -68,3 +75,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
context->state.uc_stack.ss_size = 0;
context->from = NULL;
}
+
+#endif /* COROUTINE_UCONTEXT_CONTEXT_H */
diff --git a/coroutine/universal/Context.S b/coroutine/universal/Context.S
new file mode 100644
index 0000000000..11c80a7927
--- /dev/null
+++ b/coroutine/universal/Context.S
@@ -0,0 +1,16 @@
+#if 0
+#elif defined __x86_64__
+# include "coroutine/amd64/Context.S"
+#elif defined __i386__
+# include "coroutine/x86/Context.S"
+#elif defined __ppc__
+# include "coroutine/ppc/Context.S"
+#elif defined __ppc64__ && defined(WORDS_BIGENDIAN)
+# include "coroutine/ppc64/Context.S"
+#elif defined __ppc64__ && !defined(WORDS_BIGENDIAN)
+# include "coroutine/ppc64le/Context.S"
+#elif defined __arm64__
+# include "coroutine/arm64/Context.S"
+#else
+# error "Unsupported CPU"
+#endif
diff --git a/coroutine/universal/Context.h b/coroutine/universal/Context.h
new file mode 100644
index 0000000000..ec4d2f484a
--- /dev/null
+++ b/coroutine/universal/Context.h
@@ -0,0 +1,21 @@
+#ifndef COROUTINE_UNIVERSAL_CONTEXT_H
+#define COROUTINE_UNIVERSAL_CONTEXT_H 1
+
+#if 0
+#elif defined __x86_64__
+# include "coroutine/amd64/Context.h"
+#elif defined __i386__
+# include "coroutine/x86/Context.h"
+#elif defined __ppc__
+# include "coroutine/ppc/Context.h"
+#elif defined __ppc64__ && defined(WORDS_BIGENDIAN)
+# include "coroutine/ppc64/Context.h"
+#elif defined __ppc64__ && !defined(WORDS_BIGENDIAN)
+# include "coroutine/ppc64le/Context.h"
+#elif defined __arm64__
+# include "coroutine/arm64/Context.h"
+#else
+# error "Unsupported CPU"
+#endif
+
+#endif /* COROUTINE_UNIVERSAL_CONTEXT_H */
diff --git a/coroutine/win32/Context.asm b/coroutine/win32/Context.asm
index 2647ea4bc4..f8f431239b 100644
--- a/coroutine/win32/Context.asm
+++ b/coroutine/win32/Context.asm
@@ -2,7 +2,7 @@
;; This file is part of the "Coroutine" project and released under the MIT License.
;;
;; Created by Samuel Williams on 10/5/2018.
-;; Copyright, 2018, by Samuel Williams. All rights reserved.
+;; Copyright, 2018, by Samuel Williams.
;;
.386
diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h
index 299515ed92..902fd1246f 100644
--- a/coroutine/win32/Context.h
+++ b/coroutine/win32/Context.h
@@ -1,13 +1,18 @@
+#ifndef COROUTINE_WIN32_CONTEXT_H
+#define COROUTINE_WIN32_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 10/5/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __declspec(noreturn) void __fastcall
@@ -19,6 +24,7 @@ enum {COROUTINE_REGISTERS = 4};
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
};
typedef void(__fastcall * coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -55,3 +61,5 @@ struct coroutine_context * __fastcall coroutine_transfer(struct coroutine_contex
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_WIN32_CONTEXT_H */
diff --git a/coroutine/win64/Context.S b/coroutine/win64/Context.S
index 4b16e0ce8c..e0ee38e006 100644
--- a/coroutine/win64/Context.S
+++ b/coroutine/win64/Context.S
@@ -2,7 +2,7 @@
## This file is part of the "Coroutine" project and released under the MIT License.
##
## Created by Samuel Williams on 4/11/2018.
-## Copyright, 2018, by Samuel Williams. All rights reserved.
+## Copyright, 2018, by Samuel Williams.
##
.text
diff --git a/coroutine/win64/Context.asm b/coroutine/win64/Context.asm
index 59673ffa3e..8c4dea1c93 100644
--- a/coroutine/win64/Context.asm
+++ b/coroutine/win64/Context.asm
@@ -2,7 +2,7 @@
;; This file is part of the "Coroutine" project and released under the MIT License.
;;
;; Created by Samuel Williams on 10/5/2018.
-;; Copyright, 2018, by Samuel Williams. All rights reserved.
+;; Copyright, 2018, by Samuel Williams.
;;
.code
diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h
index 6bf2dc5b35..aaa4caeaf9 100644
--- a/coroutine/win64/Context.h
+++ b/coroutine/win64/Context.h
@@ -1,13 +1,18 @@
+#ifndef COROUTINE_WIN64_CONTEXT_H
+#define COROUTINE_WIN64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 10/5/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __declspec(noreturn) void
@@ -20,6 +25,7 @@ enum {
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
};
typedef void(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);
@@ -65,3 +71,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_WIN64_CONTEXT_H */
diff --git a/coroutine/x86/Context.S b/coroutine/x86/Context.S
index 001b699a30..f06a417084 100644
--- a/coroutine/x86/Context.S
+++ b/coroutine/x86/Context.S
@@ -2,7 +2,7 @@
## This file is part of the "Coroutine" project and released under the MIT License.
##
## Created by Samuel Williams on 3/11/2018.
-## Copyright, 2018, by Samuel Williams. All rights reserved.
+## Copyright, 2018, by Samuel Williams.
##
#define TOKEN_PASTE(x,y) x##y
@@ -37,6 +37,6 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
# Jump to the address on the stack
ret
-#if defined(__linux__) && defined(__ELF__)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h
index 6d3a56eaa6..d98eaf6486 100644
--- a/coroutine/x86/Context.h
+++ b/coroutine/x86/Context.h
@@ -1,13 +1,18 @@
+#ifndef COROUTINE_X86_CONTEXT_H
+#define COROUTINE_X86_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
* Created by Samuel Williams on 3/11/2018.
- * Copyright, 2018, by Samuel Williams. All rights reserved.
+ * Copyright, 2018, by Samuel Williams.
*/
#pragma once
#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#define COROUTINE __attribute__((noreturn, fastcall)) void
@@ -18,6 +23,7 @@ enum {COROUTINE_REGISTERS = 4};
struct coroutine_context
{
void **stack_pointer;
+ void *argument;
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self) __attribute__((fastcall));
@@ -51,3 +57,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_X86_CONTEXT_H */
diff --git a/coverage/README b/coverage/README
index 78a01826aa..a4c3dfcb03 100644
--- a/coverage/README
+++ b/coverage/README
@@ -13,5 +13,5 @@ Limitation
TODO
- * more reduce bundled simplecov(additional configuration, formatter, etc)
+ * more reduce bundled simplecov(additional configuration, formatter, etc.)
* measure rubyspec coverage
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index 192cf43b37..f342d2fcf7 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -1,16 +1,26 @@
+gnumake = yes
+
include Makefile
-ENABLE_SHARED=@ENABLE_SHARED@
-DLLWRAP = @DLLWRAP@ --target=@target_os@ --driver-name="$(CC)"
-WINDRES = @WINDRES@ --preprocessor="$(CPP) -xc" -DRC_INVOKED
+MUNICODE_FLAG := $(if $(filter mingw%,$(target_os)),-municode)
+override EXE_LDFLAGS += $(MUNICODE_FLAG)
+
+DLLWRAP = @DLLWRAP@ --target=$(target_os) --driver-name="$(CC)"
+windres-cpp := $(CPP) -xc
+windres-cpp := --preprocessor=$(firstword $(windres-cpp)) \
+ $(addprefix --preprocessor-arg=,$(wordlist 2,$(words $(windres-cpp)),$(windres-cpp)))
+WINDRES = @WINDRES@ $(windres-cpp) -DRC_INVOKED
STRIP = @STRIP@
-ifeq (@target_os@,cygwin)
+ifeq ($(target_os),cygwin)
DLL_BASE_NAME := $(LIBRUBY_SO:.dll=)
else
DLL_BASE_NAME := $(RUBY_SO_NAME)
DLLWRAP += -mno-cygwin
VPATH := $(VPATH):$(srcdir)/win32
+ ifneq ($(filter -flto%,$(LDFLAGS)),)
+ miniruby$(EXEEXT): XLDFLAGS += -Wno-maybe-uninitialized
+ endif
endif
ifneq ($(ENABLE_SHARED),yes)
@@ -28,11 +38,9 @@ endif
WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
--include uncommon.mk
+include $(srcdir)/template/GNUmakefile.in
-include $(srcdir)/defs/gmake.mk
-
-SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
+SOLIBS := $(DLL_BASE_NAME).res.$(OBJEXT) $(SOLIBS)
override EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc
RUBYDEF = $(DLL_BASE_NAME).def
@@ -41,26 +49,26 @@ ruby: $(PROGRAM)
rubyw: $(WPROGRAM)
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
-$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
+$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.$(OBJEXT)
-%.res.@OBJEXT@: %.rc
+%.res.$(OBJEXT): %.rc
$(ECHO) compiling $@
$(Q) $(WINDRES) --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@
-%.rc: $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
+%.rc: $(BOOTSTRAPRUBY_FAKE) $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/win32/resource.rb \
+ $(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/resource.rb \
-ruby_name=$(RUBY_INSTALL_NAME) -rubyw_name=$(RUBYW_INSTALL_NAME) \
-so_name=$(DLL_BASE_NAME) -output=$(*F) \
. $(icondirs) $(srcdir)/win32
-$(PROGRAM): $(RUBY_INSTALL_NAME).res.@OBJEXT@
-$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.@OBJEXT@
+$(PROGRAM): $(RUBY_INSTALL_NAME).res.$(OBJEXT)
+$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.$(OBJEXT)
@rm -f $@
$(ECHO) linking $@
- $(Q) $(PURIFY) $(CC) -mwindows -e $(SYMBOL_PREFIX)mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
+ $(Q) $(PURIFY) $(CC) $(MUNICODE_FLAG) -mwindows -e $(SYMBOL_PREFIX)mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
-$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.@OBJEXT@
+$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.$(OBJEXT)
$(RUBY_EXP): $(LIBRUBY_A)
$(ECHO) creating $@
@@ -72,7 +80,7 @@ $(RUBY_EXP): $(LIBRUBY_A)
GNUmakefile: $(srcdir)/cygwin/GNUmakefile.in
-ifeq (@target_os@,mingw32)
+ifeq ($(target_os),mingw32)
$(OBJS) $(MAINOBJ): win32.h
dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.h
@@ -83,24 +91,17 @@ MSYS2_ARG_CONV_EXCL_PARAM = --exclude=;--name=
yes-test-ruby: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
yes-test-all: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
yes-test-almost: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
+test/% spec/%/ spec/%_spec.rb: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
endif
$(LIBRUBY_SO): $(RUBYDEF)
-$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG)
+$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(BOOTSTRAPRUBY_FAKE) $(RBCONFIG)
$(ECHO) generating $@
- $(Q) $(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
+ $(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
clean-local::
@$(RM) $(RUBYDEF)
-
-ifeq (@target_os@,cygwin)
-cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)0.dll: $(LIBRUBY_A) $(RUBYDEF)
- $(ECHO) generating $@
- $(Q) @DLLWRAP@ -s --def=$(RUBYDEF) -o $@
-endif
-
-clean-local::
- @$(RM) $(RUBY_EXP) $(RCFILES:.rc=.res.@OBJEXT@)
+ @$(RM) $(RUBY_EXP) $(RCFILES:.rc=.res.$(OBJEXT))
@$(RM) $(RCFILES)
diff --git a/darray.h b/darray.h
new file mode 100644
index 0000000000..c9a53f1e01
--- /dev/null
+++ b/darray.h
@@ -0,0 +1,179 @@
+#ifndef RUBY_DARRAY_H
+#define RUBY_DARRAY_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+// Type for a dynamic array. Use to declare a dynamic array.
+// It is a pointer so it fits in st_table nicely. Designed
+// to be fairly type-safe.
+//
+// NULL is a valid empty dynamic array.
+//
+// Example:
+// rb_darray(char) char_array = NULL;
+// rb_darray_append(&char_array, 'e');
+// printf("pushed %c\n", *rb_darray_ref(char_array, 0));
+// rb_darray_free(char_array);
+//
+#define rb_darray(T) struct { rb_darray_meta_t meta; T data[]; } *
+
+// Copy an element out of the array. Warning: not bounds checked.
+//
+// T rb_darray_get(rb_darray(T) ary, size_t idx);
+//
+#define rb_darray_get(ary, idx) ((ary)->data[(idx)])
+
+// Assign to an element. Warning: not bounds checked.
+//
+// void rb_darray_set(rb_darray(T) ary, size_t idx, T element);
+//
+#define rb_darray_set(ary, idx, element) ((ary)->data[(idx)] = (element))
+
+// Get a pointer to an element. Warning: not bounds checked.
+//
+// T *rb_darray_ref(rb_darray(T) ary, size_t idx);
+//
+#define rb_darray_ref(ary, idx) (&((ary)->data[(idx)]))
+
+// Copy a new element into the array. ptr_to_ary is evaluated multiple times.
+//
+// void rb_darray_append(rb_darray(T) *ptr_to_ary, T element);
+//
+#define rb_darray_append(ptr_to_ary, element) do { \
+ rb_darray_ensure_space((ptr_to_ary), sizeof(**(ptr_to_ary)), \
+ sizeof((*(ptr_to_ary))->data[0])); \
+ rb_darray_set(*(ptr_to_ary), \
+ (*(ptr_to_ary))->meta.size, \
+ (element)); \
+ (*(ptr_to_ary))->meta.size++; \
+} while (0)
+
+
+// Last element of the array
+//
+#define rb_darray_back(ary) ((ary)->data[(ary)->meta.size - 1])
+
+// Remove the last element of the array.
+//
+#define rb_darray_pop_back(ary) ((ary)->meta.size--)
+
+// Remove element at idx and replace it by the last element
+#define rb_darray_remove_unordered(ary, idx) do { \
+ rb_darray_set(ary, idx, rb_darray_back(ary)); \
+ rb_darray_pop_back(ary); \
+} while (0);
+
+// Iterate over items of the array in a for loop
+//
+#define rb_darray_foreach(ary, idx_name, elem_ptr_var) \
+ for (size_t idx_name = 0; idx_name < rb_darray_size(ary) && ((elem_ptr_var) = rb_darray_ref(ary, idx_name)); ++idx_name)
+
+// Iterate over valid indicies in the array in a for loop
+//
+#define rb_darray_for(ary, idx_name) \
+ for (size_t idx_name = 0; idx_name < rb_darray_size(ary); ++idx_name)
+
+// Make a dynamic array of a certain size. All bytes backing the elements are set to zero.
+//
+// Note that NULL is a valid empty dynamic array.
+//
+// void rb_darray_make(rb_darray(T) *ptr_to_ary, size_t size);
+//
+#define rb_darray_make(ptr_to_ary, size) \
+ rb_darray_make_impl((ptr_to_ary), size, sizeof(**(ptr_to_ary)), \
+ sizeof((*(ptr_to_ary))->data[0]))
+
+#define rb_darray_data_ptr(ary) ((ary)->data)
+
+// Set the size of the array to zero without freeing the backing memory.
+// Allows reusing the same array.
+//
+#define rb_darray_clear(ary) (ary->meta.size = 0)
+
+typedef struct rb_darray_meta {
+ size_t size;
+ size_t capa;
+} rb_darray_meta_t;
+
+// Get the size of the dynamic array.
+//
+static inline size_t
+rb_darray_size(const void *ary)
+{
+ const rb_darray_meta_t *meta = ary;
+ return meta ? meta->size : 0;
+}
+
+// Get the capacity of the dynamic array.
+//
+static inline size_t
+rb_darray_capa(const void *ary)
+{
+ const rb_darray_meta_t *meta = ary;
+ return meta ? meta->capa : 0;
+}
+
+// Free the dynamic array.
+//
+static inline void
+rb_darray_free(void *ary)
+{
+ rb_darray_meta_t *meta = ary;
+ ruby_sized_xfree(ary, meta->capa);
+}
+
+// Internal function
+// Ensure there is space for one more element.
+// Note: header_size can be bigger than sizeof(rb_darray_meta_t) when T is __int128_t, for example.
+static inline void
+rb_darray_ensure_space(void *ptr_to_ary, size_t header_size, size_t element_size)
+{
+ rb_darray_meta_t **ptr_to_ptr_to_meta = ptr_to_ary;
+ rb_darray_meta_t *meta = *ptr_to_ptr_to_meta;
+ size_t current_capa = rb_darray_capa(meta);
+ if (rb_darray_size(meta) < current_capa) return;
+
+ // Double the capacity
+ size_t new_capa = current_capa == 0 ? 1 : current_capa * 2;
+
+ rb_darray_meta_t *doubled_ary = rb_xrealloc_mul_add(meta, new_capa, element_size, header_size);
+ // rb_xrealloc functions guarantee that NULL is not returned
+ assert(doubled_ary != NULL);
+
+ if (meta == NULL) {
+ // First allocation. Initialize size. On subsequence allocations
+ // realloc takes care of carrying over the size.
+ doubled_ary->size = 0;
+ }
+
+ doubled_ary->capa = new_capa;
+
+ // We don't have access to the type of the dynamic array in function context.
+ // Write out result with memcpy to avoid strict aliasing issue.
+ memcpy(ptr_to_ary, &doubled_ary, sizeof(doubled_ary));
+}
+
+static inline void
+rb_darray_make_impl(void *ptr_to_ary, size_t array_size, size_t header_size, size_t element_size)
+{
+ rb_darray_meta_t **ptr_to_ptr_to_meta = ptr_to_ary;
+ if (array_size == 0) {
+ *ptr_to_ptr_to_meta = NULL;
+ return;
+ }
+
+ rb_darray_meta_t *meta = rb_xcalloc_mul_add(array_size, element_size, header_size);
+ // rb_xcalloc functions guarantee that NULL is not returned
+ assert(meta != NULL);
+
+ meta->size = array_size;
+ meta->capa = array_size;
+
+ // We don't have access to the type of the dynamic array in function context.
+ // Write out result with memcpy to avoid strict aliasing issue.
+ memcpy(ptr_to_ary, &meta, sizeof(meta));
+}
+
+#endif /* RUBY_DARRAY_H */
diff --git a/debug.c b/debug.c
index a54be27152..3dd0f71906 100644
--- a/debug.c
+++ b/debug.c
@@ -9,15 +9,33 @@
**********************************************************************/
-#include "ruby/ruby.h"
+#include "ruby/internal/config.h"
+
+#include <stdio.h>
+
+#include "eval_intern.h"
+#include "encindex.h"
+#include "id.h"
+#include "internal/signal.h"
#include "ruby/encoding.h"
#include "ruby/io.h"
+#include "ruby/ruby.h"
#include "ruby/util.h"
-#include "vm_debug.h"
-#include "eval_intern.h"
-#include "vm_core.h"
#include "symbol.h"
-#include "id.h"
+#include "vm_core.h"
+#include "vm_debug.h"
+#include "vm_callinfo.h"
+#include "ruby/thread_native.h"
+#include "ractor_core.h"
+
+/* This is the only place struct RIMemo is actually used */
+struct RIMemo {
+ VALUE flags;
+ VALUE v0;
+ VALUE v1;
+ VALUE v2;
+ VALUE v3;
+};
/* for gdb */
const union {
@@ -28,31 +46,41 @@ const union {
enum ruby_method_ids method_ids;
enum ruby_id_types id_types;
enum ruby_fl_type fl_types;
+ enum ruby_fl_ushift fl_ushift;
enum ruby_encoding_consts encoding_consts;
enum ruby_coderange_type enc_coderange_types;
enum ruby_econv_flag_type econv_flag_types;
+ rb_econv_result_t econv_result;
+ enum ruby_preserved_encindex encoding_index;
enum ruby_robject_flags robject_flags;
+#if !USE_RVARGC
+ enum ruby_robject_consts robject_consts;
+#endif
enum ruby_rmodule_flags rmodule_flags;
enum ruby_rstring_flags rstring_flags;
+#if !USE_RVARGC
+ enum ruby_rstring_consts rstring_consts;
+#endif
enum ruby_rarray_flags rarray_flags;
+ enum ruby_rarray_consts rarray_consts;
enum {
- RUBY_FMODE_READABLE = FMODE_READABLE,
- RUBY_FMODE_WRITABLE = FMODE_WRITABLE,
- RUBY_FMODE_READWRITE = FMODE_READWRITE,
- RUBY_FMODE_BINMODE = FMODE_BINMODE,
- RUBY_FMODE_SYNC = FMODE_SYNC,
- RUBY_FMODE_TTY = FMODE_TTY,
- RUBY_FMODE_DUPLEX = FMODE_DUPLEX,
- RUBY_FMODE_APPEND = FMODE_APPEND,
- RUBY_FMODE_CREATE = FMODE_CREATE,
- RUBY_FMODE_NOREVLOOKUP = 0x00000100,
- RUBY_FMODE_TRUNC = FMODE_TRUNC,
- RUBY_FMODE_TEXTMODE = FMODE_TEXTMODE,
- RUBY_FMODE_PREP = 0x00010000,
- RUBY_FMODE_SETENC_BY_BOM = FMODE_SETENC_BY_BOM,
- RUBY_FMODE_UNIX = 0x00200000,
- RUBY_FMODE_INET = 0x00400000,
- RUBY_FMODE_INET6 = 0x00800000,
+ RUBY_FMODE_READABLE = FMODE_READABLE,
+ RUBY_FMODE_WRITABLE = FMODE_WRITABLE,
+ RUBY_FMODE_READWRITE = FMODE_READWRITE,
+ RUBY_FMODE_BINMODE = FMODE_BINMODE,
+ RUBY_FMODE_SYNC = FMODE_SYNC,
+ RUBY_FMODE_TTY = FMODE_TTY,
+ RUBY_FMODE_DUPLEX = FMODE_DUPLEX,
+ RUBY_FMODE_APPEND = FMODE_APPEND,
+ RUBY_FMODE_CREATE = FMODE_CREATE,
+ RUBY_FMODE_NOREVLOOKUP = 0x00000100,
+ RUBY_FMODE_TRUNC = FMODE_TRUNC,
+ RUBY_FMODE_TEXTMODE = FMODE_TEXTMODE,
+ RUBY_FMODE_PREP = 0x00010000,
+ RUBY_FMODE_SETENC_BY_BOM = FMODE_SETENC_BY_BOM,
+ RUBY_FMODE_UNIX = 0x00200000,
+ RUBY_FMODE_INET = 0x00400000,
+ RUBY_FMODE_INET6 = 0x00800000,
RUBY_NODE_TYPESHIFT = NODE_TYPESHIFT,
RUBY_NODE_TYPEMASK = NODE_TYPEMASK,
@@ -60,9 +88,9 @@ const union {
RUBY_NODE_FL_NEWLINE = NODE_FL_NEWLINE
} various;
union {
- enum imemo_type types;
- enum {RUBY_IMEMO_MASK = IMEMO_MASK} mask;
- struct RIMemo *ptr;
+ enum imemo_type types;
+ enum {RUBY_IMEMO_MASK = IMEMO_MASK} mask;
+ struct RIMemo *ptr;
} imemo;
struct RSymbol *symbol_ptr;
enum vm_call_flag_bits vm_call_flags;
@@ -74,9 +102,9 @@ int
ruby_debug_print_indent(int level, int debug_level, int indent_level)
{
if (level < debug_level) {
- fprintf(stderr, "%*s", indent_level, "");
- fflush(stderr);
- return TRUE;
+ fprintf(stderr, "%*s", indent_level, "");
+ fflush(stderr);
+ return TRUE;
}
return FALSE;
}
@@ -96,11 +124,11 @@ VALUE
ruby_debug_print_value(int level, int debug_level, const char *header, VALUE obj)
{
if (level < debug_level) {
- char buff[0x100];
- rb_raw_obj_info(buff, 0x100, obj);
+ char buff[0x100];
+ rb_raw_obj_info(buff, 0x100, obj);
- fprintf(stderr, "DBG> %s: %s\n", header, buff);
- fflush(stderr);
+ fprintf(stderr, "DBG> %s: %s\n", header, buff);
+ fflush(stderr);
}
return obj;
}
@@ -115,8 +143,8 @@ ID
ruby_debug_print_id(int level, int debug_level, const char *header, ID id)
{
if (level < debug_level) {
- fprintf(stderr, "DBG> %s: %s\n", header, rb_id2name(id));
- fflush(stderr);
+ fprintf(stderr, "DBG> %s: %s\n", header, rb_id2name(id));
+ fflush(stderr);
}
return id;
}
@@ -125,8 +153,8 @@ NODE *
ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node)
{
if (level < debug_level) {
- fprintf(stderr, "DBG> %s: %s (%u)\n", header,
- ruby_node_name(nd_type(node)), nd_line(node));
+ fprintf(stderr, "DBG> %s: %s (%u)\n", header,
+ ruby_node_name(nd_type(node)), nd_line(node));
}
return (NODE *)node;
}
@@ -156,11 +184,11 @@ ruby_env_debug_option(const char *str, int len, void *arg)
size_t retlen;
unsigned long n;
#define SET_WHEN(name, var, val) do { \
- if (len == sizeof(name) - 1 && \
- strncmp(str, (name), len) == 0) { \
- (var) = (val); \
- return 1; \
- } \
+ if (len == sizeof(name) - 1 && \
+ strncmp(str, (name), len) == 0) { \
+ (var) = (val); \
+ return 1; \
+ } \
} while (0)
#define NAME_MATCH_VALUE(name) \
((size_t)len >= sizeof(name)-1 && \
@@ -169,24 +197,24 @@ ruby_env_debug_option(const char *str, int len, void *arg)
(str[sizeof(name)-1] == '=' && \
(str += sizeof(name), len -= sizeof(name), 1))))
#define SET_UINT(val) do { \
- n = ruby_scan_digits(str, len, 10, &retlen, &ov); \
- if (!ov && retlen) { \
- val = (unsigned int)n; \
- } \
- str += retlen; \
- len -= retlen; \
+ n = ruby_scan_digits(str, len, 10, &retlen, &ov); \
+ if (!ov && retlen) { \
+ val = (unsigned int)n; \
+ } \
+ str += retlen; \
+ len -= retlen; \
} while (0)
#define SET_UINT_LIST(name, vals, num) do { \
- int i; \
- for (i = 0; i < (num); ++i) { \
- SET_UINT((vals)[i]); \
- if (!len || *str != ':') break; \
- ++str; \
- --len; \
- } \
- if (len > 0) { \
- fprintf(stderr, "ignored "name" option: `%.*s'\n", len, str); \
- } \
+ int i; \
+ for (i = 0; i < (num); ++i) { \
+ SET_UINT((vals)[i]); \
+ if (!len || *str != ':') break; \
+ ++str; \
+ --len; \
+ } \
+ if (len > 0) { \
+ fprintf(stderr, "ignored "name" option: `%.*s'\n", len, str); \
+ } \
} while (0)
#define SET_WHEN_UINT(name, vals, num, req) \
if (NAME_MATCH_VALUE(name)) SET_UINT_LIST(name, vals, num);
@@ -195,9 +223,9 @@ ruby_env_debug_option(const char *str, int len, void *arg)
SET_WHEN("core", ruby_enable_coredump, 1);
SET_WHEN("ci", ruby_on_ci, 1);
if (NAME_MATCH_VALUE("rgengc")) {
- if (!len) ruby_rgengc_debug = 1;
- else SET_UINT_LIST("rgengc", &ruby_rgengc_debug, 1);
- return 1;
+ if (!len) ruby_rgengc_debug = 1;
+ else SET_UINT_LIST("rgengc", &ruby_rgengc_debug, 1);
+ return 1;
}
#if defined _WIN32
# if RUBY_MSVCRT_VERSION >= 80
@@ -206,9 +234,9 @@ ruby_env_debug_option(const char *str, int len, void *arg)
#endif
#if defined _WIN32 || defined __CYGWIN__
if (NAME_MATCH_VALUE("codepage")) {
- if (!len) fprintf(stderr, "missing codepage argument");
- else SET_UINT_LIST("codepage", ruby_w32_codepage, numberof(ruby_w32_codepage));
- return 1;
+ if (!len) fprintf(stderr, "missing codepage argument");
+ else SET_UINT_LIST("codepage", ruby_w32_codepage, numberof(ruby_w32_codepage));
+ return 1;
}
#endif
return 0;
@@ -218,12 +246,388 @@ static void
set_debug_option(const char *str, int len, void *arg)
{
if (!ruby_env_debug_option(str, len, arg)) {
- fprintf(stderr, "unexpected debug option: %.*s\n", len, str);
+ fprintf(stderr, "unexpected debug option: %.*s\n", len, str);
}
}
+#if USE_RUBY_DEBUG_LOG
+static void setup_debug_log(void);
+#else
+#define setup_debug_log()
+#endif
+
void
ruby_set_debug_option(const char *str)
{
ruby_each_words(str, set_debug_option, 0);
+ setup_debug_log();
+}
+
+#if USE_RUBY_DEBUG_LOG
+
+// RUBY_DEBUG_LOG features
+// See vm_debug.h comments for details.
+
+#define MAX_DEBUG_LOG 0x1000
+#define MAX_DEBUG_LOG_MESSAGE_LEN 0x0200
+#define MAX_DEBUG_LOG_FILTER_LEN 0x0020
+#define MAX_DEBUG_LOG_FILTER_NUM 0x0010
+
+enum ruby_debug_log_mode ruby_debug_log_mode;
+
+struct debug_log_filter {
+ enum debug_log_filter_type {
+ dlf_all,
+ dlf_file, // "file:..."
+ dlf_func, // "func:..."
+ } type;
+ bool negative;
+ char str[MAX_DEBUG_LOG_FILTER_LEN];
+};
+
+static const char *dlf_type_names[] = {
+ "all",
+ "file",
+ "func",
+};
+
+static struct {
+ char *mem;
+ unsigned int cnt;
+ struct debug_log_filter filters[MAX_DEBUG_LOG_FILTER_NUM];
+ unsigned int filters_num;
+ rb_nativethread_lock_t lock;
+ FILE *output;
+} debug_log;
+
+static char *
+RUBY_DEBUG_LOG_MEM_ENTRY(unsigned int index)
+{
+ return &debug_log.mem[MAX_DEBUG_LOG_MESSAGE_LEN * index];
+}
+
+static enum debug_log_filter_type
+filter_type(const char *str, int *skiplen)
+{
+ if (strncmp(str, "file:", 5) == 0) {
+ *skiplen = 5;
+ return dlf_file;
+ }
+ else if(strncmp(str, "func:", 5) == 0) {
+ *skiplen = 5;
+ return dlf_func;
+ }
+ else {
+ *skiplen = 0;
+ return dlf_all;
+ }
+}
+
+static void
+setup_debug_log_filter(void)
+{
+ const char *filter_config = getenv("RUBY_DEBUG_LOG_FILTER");
+
+ if (filter_config && strlen(filter_config) > 0) {
+ unsigned int i;
+ for (i=0; i<MAX_DEBUG_LOG_FILTER_NUM && filter_config; i++) {
+ size_t len;
+ const char *str = filter_config;
+ const char *p;
+
+ if ((p = strchr(str, ',')) == NULL) {
+ len = strlen(str);
+ filter_config = NULL;
+ }
+ else {
+ len = p - str - 1; // 1 is ','
+ filter_config = p + 1;
+ }
+
+ // positive/negative
+ if (*str == '-') {
+ debug_log.filters[i].negative = true;
+ str++;
+ }
+ else if (*str == '+') {
+ // negative is false on default.
+ str++;
+ }
+
+ // type
+ int skiplen;
+ debug_log.filters[i].type = filter_type(str, &skiplen);
+ len -= skiplen;
+
+ if (len >= MAX_DEBUG_LOG_FILTER_LEN) {
+ fprintf(stderr, "too long: %s (max:%d)\n", str, MAX_DEBUG_LOG_FILTER_LEN - 1);
+ exit(1);
+ }
+
+ // body
+ strncpy(debug_log.filters[i].str, str + skiplen, len);
+ debug_log.filters[i].str[len] = 0;
+ }
+ debug_log.filters_num = i;
+
+ for (i=0; i<debug_log.filters_num; i++) {
+ fprintf(stderr, "RUBY_DEBUG_LOG_FILTER[%d]=%s (%s%s)\n", i,
+ debug_log.filters[i].str,
+ debug_log.filters[i].negative ? "-" : "",
+ dlf_type_names[debug_log.filters[i].type]);
+ }
+ }
+}
+
+static void
+setup_debug_log(void)
+{
+ // check RUBY_DEBUG_LOG
+ const char *log_config = getenv("RUBY_DEBUG_LOG");
+ if (log_config && strlen(log_config) > 0) {
+ if (strcmp(log_config, "mem") == 0) {
+ debug_log.mem = (char *)malloc(MAX_DEBUG_LOG * MAX_DEBUG_LOG_MESSAGE_LEN);
+ if (debug_log.mem == NULL) {
+ fprintf(stderr, "setup_debug_log failed (can't allocate memory)\n");
+ exit(1);
+ }
+ ruby_debug_log_mode |= ruby_debug_log_memory;
+ }
+ else if (strcmp(log_config, "stderr") == 0) {
+ ruby_debug_log_mode |= ruby_debug_log_stderr;
+ }
+ else {
+ ruby_debug_log_mode |= ruby_debug_log_file;
+ if ((debug_log.output = fopen(log_config, "w")) == NULL) {
+ fprintf(stderr, "can not open %s for RUBY_DEBUG_LOG\n", log_config);
+ exit(1);
+ }
+ setvbuf(debug_log.output, NULL, _IONBF, 0);
+ }
+
+ fprintf(stderr, "RUBY_DEBUG_LOG=%s %s%s%s\n", log_config,
+ (ruby_debug_log_mode & ruby_debug_log_memory) ? "[mem]" : "",
+ (ruby_debug_log_mode & ruby_debug_log_stderr) ? "[stderr]" : "",
+ (ruby_debug_log_mode & ruby_debug_log_file) ? "[file]" : "");
+ rb_nativethread_lock_initialize(&debug_log.lock);
+
+ setup_debug_log_filter();
+ }
+}
+
+static bool
+check_filter(const char *str, const struct debug_log_filter *filter, bool *state)
+{
+ if (filter->negative) {
+ if (strstr(str, filter->str) == NULL) {
+ *state = true;
+ return false;
+ }
+ else {
+ *state = false;
+ return true;
+ }
+ }
+ else {
+ if (strstr(str, filter->str) != NULL) {
+ *state = true;
+ return true;
+ }
+ else {
+ *state = false;
+ return false;
+ }
+ }
+}
+
+//
+// RUBY_DEBUG_LOG_FILTER=-foo,-bar,baz,boo
+// returns true if
+// (func_name or file_name) doesn't contain foo
+// and
+// (func_name or file_name) doesn't contain bar
+// and
+// (func_name or file_name) contains baz or boo
+//
+// RUBY_DEBUG_LOG_FILTER=foo,bar,-baz,-boo
+// retunrs true if
+// (func_name or file_name) contains foo or bar
+// or
+// (func_name or file_name) doesn't contain baz and
+// (func_name or file_name) doesn't contain boo and
+//
+// You can specify "file:" (ex file:foo) or "func:" (ex func:foo)
+// prefixes to specify the filter for.
+//
+bool
+ruby_debug_log_filter(const char *func_name, const char *file_name)
+{
+ if (debug_log.filters_num > 0) {
+ bool state = false;
+
+ for (unsigned int i = 0; i<debug_log.filters_num; i++) {
+ const struct debug_log_filter *filter = &debug_log.filters[i];
+
+ switch (filter->type) {
+ case dlf_all:
+ if (check_filter(func_name, filter, &state)) return state;
+ if (check_filter(file_name, filter, &state)) return state;
+ break;
+ case dlf_func:
+ if (check_filter(func_name, filter, &state)) return state;
+ break;
+ case dlf_file:
+ if (check_filter(file_name, filter, &state)) return state;
+ break;
+ }
+ }
+ return state;
+ }
+ else {
+ return true;
+ }
+}
+
+static const char *
+pretty_filename(const char *path)
+{
+ // basename is one idea.
+ const char *s;
+ while ((s = strchr(path, '/')) != NULL) {
+ path = s+1;
+ }
+ return path;
+}
+
+#undef ruby_debug_log
+void
+ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...)
+{
+ char buff[MAX_DEBUG_LOG_MESSAGE_LEN] = {0};
+ int len = 0;
+ int r = 0;
+
+ // message title
+ if (func_name && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN, "%s\t", func_name);
+ if (r < 0) rb_bug("ruby_debug_log returns %d\n", r);
+ len += r;
+ }
+
+ // message
+ if (fmt && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ va_list args;
+ va_start(args, fmt);
+ r = vsnprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN - len, fmt, args);
+ va_end(args);
+ if (r < 0) rb_bug("ruby_debug_log vsnprintf() returns %d", r);
+ len += r;
+ }
+
+ // optional information
+
+ // C location
+ if (file && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN, "\t%s:%d", pretty_filename(file), line);
+ if (r < 0) rb_bug("ruby_debug_log returns %d\n", r);
+ len += r;
+ }
+
+ if (rb_current_execution_context(false)) {
+ // Ruby location
+ int ruby_line;
+ const char *ruby_file = rb_source_location_cstr(&ruby_line);
+ if (len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ if (ruby_file) {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN - len, "\t%s:%d", pretty_filename(ruby_file), ruby_line);
+ }
+ else {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN - len, "\t");
+ }
+ if (r < 0) rb_bug("ruby_debug_log returns %d\n", r);
+ len += r;
+ }
+
+ // ractor information
+ if (ruby_single_main_ractor == NULL) {
+ rb_ractor_t *cr = GET_RACTOR();
+ if (r && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN - len, "\tr:#%u/%u",
+ (unsigned int)rb_ractor_id(cr), GET_VM()->ractor.cnt);
+ if (r < 0) rb_bug("ruby_debug_log returns %d\n", r);
+ len += r;
+ }
+ }
+
+ // thread information
+ const rb_thread_t *th = GET_THREAD();
+ if (r && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
+ r = snprintf(buff + len, MAX_DEBUG_LOG_MESSAGE_LEN - len, "\tth:%u", rb_th_serial(th));
+ if (r < 0) rb_bug("ruby_debug_log returns %d\n", r);
+ len += r;
+ }
+ }
+
+ rb_nativethread_lock_lock(&debug_log.lock);
+ {
+ unsigned int cnt = debug_log.cnt++;
+
+ if (ruby_debug_log_mode & ruby_debug_log_memory) {
+ unsigned int index = cnt % MAX_DEBUG_LOG;
+ char *dst = RUBY_DEBUG_LOG_MEM_ENTRY(index);
+ strncpy(dst, buff, MAX_DEBUG_LOG_MESSAGE_LEN);
+ }
+ if (ruby_debug_log_mode & ruby_debug_log_stderr) {
+ fprintf(stderr, "%4u: %s\n", cnt, buff);
+ }
+ if (ruby_debug_log_mode & ruby_debug_log_file) {
+ fprintf(debug_log.output, "%u\t%s\n", cnt, buff);
+ }
+ }
+ rb_nativethread_lock_unlock(&debug_log.lock);
+}
+
+// for debugger
+static void
+debug_log_dump(FILE *out, unsigned int n)
+{
+ if (ruby_debug_log_mode & ruby_debug_log_memory) {
+ unsigned int size = debug_log.cnt > MAX_DEBUG_LOG ? MAX_DEBUG_LOG : debug_log.cnt;
+ unsigned int current_index = debug_log.cnt % MAX_DEBUG_LOG;
+ if (n == 0) n = size;
+ if (n > size) n = size;
+
+ for (unsigned int i=0; i<n; i++) {
+ int index = current_index - size + i;
+ if (index < 0) index += MAX_DEBUG_LOG;
+ VM_ASSERT(index <= MAX_DEBUG_LOG);
+ const char *mesg = RUBY_DEBUG_LOG_MEM_ENTRY(index);;
+ fprintf(out, "%4u: %s\n", debug_log.cnt - size + i, mesg);
+ }
+ }
+ else {
+ fprintf(stderr, "RUBY_DEBUG_LOG=mem is not specified.");
+ }
+}
+
+// for debuggers
+
+void
+ruby_debug_log_print(unsigned int n)
+{
+ debug_log_dump(stderr, n);
+}
+
+void
+ruby_debug_log_dump(const char *fname, unsigned int n)
+{
+ FILE *fp = fopen(fname, "w");
+ if (fp == NULL) {
+ fprintf(stderr, "can't open %s. give up.\n", fname);
+ }
+ else {
+ debug_log_dump(fp, n);
+ fclose(fp);
+ }
}
+#endif // #if USE_RUBY_DEBUG_LOG
diff --git a/debug_counter.c b/debug_counter.c
index 1e395f306b..463bebf849 100644
--- a/debug_counter.c
+++ b/debug_counter.c
@@ -12,19 +12,79 @@
#include "internal.h"
#include <stdio.h>
#include <locale.h>
+#include "ruby/thread_native.h"
#if USE_DEBUG_COUNTER
-static const char *const debug_counter_names[] = {
- ""
+
+const char *const rb_debug_counter_names[] = {
+#define DEBUG_COUNTER_NAME_EMPTY "" /* Suppress -Wstring-concatenation */
+ DEBUG_COUNTER_NAME_EMPTY
+#undef DEBUG_COUNTER_NAME_EMPTY
#define RB_DEBUG_COUNTER(name) #name,
#include "debug_counter.h"
#undef RB_DEBUG_COUNTER
};
MJIT_SYMBOL_EXPORT_BEGIN
-size_t rb_debug_counter[numberof(debug_counter_names)];
+size_t rb_debug_counter[numberof(rb_debug_counter_names)];
+void rb_debug_counter_add_atomic(enum rb_debug_counter_type type, int add);
MJIT_SYMBOL_EXPORT_END
+static rb_nativethread_lock_t debug_counter_lock;
+
+__attribute__((constructor))
+static void
+debug_counter_setup(void)
+{
+ rb_nativethread_lock_initialize(&debug_counter_lock);
+}
+
+void
+rb_debug_counter_add_atomic(enum rb_debug_counter_type type, int add)
+{
+ rb_nativethread_lock_lock(&debug_counter_lock);
+ {
+ rb_debug_counter[(int)type] += add;
+ }
+ rb_nativethread_lock_unlock(&debug_counter_lock);
+}
+
+static int debug_counter_disable_show_at_exit = 0;
+
+// note that this operation is not atomic.
+void
+ruby_debug_counter_reset(void)
+{
+ for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
+ rb_debug_counter[i] = 0;
+ }
+}
+
+// note that this operation is not atomic.
+size_t
+ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr)
+{
+ int i;
+ if (names_ptr != NULL) {
+ for (i=0; i<RB_DEBUG_COUNTER_MAX; i++) {
+ names_ptr[i] = rb_debug_counter_names[i];
+ }
+ }
+ if (counters_ptr != NULL) {
+ for (i=0; i<RB_DEBUG_COUNTER_MAX; i++) {
+ counters_ptr[i] = rb_debug_counter[i];
+ }
+ }
+
+ return RB_DEBUG_COUNTER_MAX;
+}
+
+void
+ruby_debug_counter_show_at_exit(int enable)
+{
+ debug_counter_disable_show_at_exit = !enable;
+}
+
void
rb_debug_counter_show_results(const char *msg)
{
@@ -33,39 +93,28 @@ rb_debug_counter_show_results(const char *msg)
setlocale(LC_NUMERIC, "");
if (env == NULL || strcmp("1", env) != 0) {
- int i;
+ int i;
fprintf(stderr, "[RUBY_DEBUG_COUNTER]\t%d %s\n", getpid(), msg);
- for (i=0; i<RB_DEBUG_COUNTER_MAX; i++) {
+ for (i=0; i<RB_DEBUG_COUNTER_MAX; i++) {
fprintf(stderr, "[RUBY_DEBUG_COUNTER]\t%-30s\t%'14"PRIuSIZE"\n",
- debug_counter_names[i],
- rb_debug_counter[i]);
- }
+ rb_debug_counter_names[i],
+ rb_debug_counter[i]);
+ }
}
}
VALUE
rb_debug_counter_show(RB_UNUSED_VAR(VALUE klass))
{
- rb_debug_counter_show_results("method call");
+ rb_debug_counter_show_results("show_debug_counters");
+ ruby_debug_counter_show_at_exit(FALSE);
return Qnil;
}
VALUE
rb_debug_counter_reset(RB_UNUSED_VAR(VALUE klass))
{
- for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
- switch (i) {
- case RB_DEBUG_COUNTER_mjit_length_unit_queue:
- case RB_DEBUG_COUNTER_mjit_length_active_units:
- case RB_DEBUG_COUNTER_mjit_length_compact_units:
- case RB_DEBUG_COUNTER_mjit_length_stale_units:
- // These counters may be decreased and should not be reset.
- break;
- default:
- rb_debug_counter[i] = 0;
- break;
- }
- }
+ ruby_debug_counter_reset();
return Qnil;
}
@@ -73,11 +122,31 @@ __attribute__((destructor))
static void
debug_counter_show_results_at_exit(void)
{
- rb_debug_counter_show_results("normal exit.");
+ if (debug_counter_disable_show_at_exit == 0) {
+ rb_debug_counter_show_results("normal exit.");
+ }
}
+
#else
+
void
rb_debug_counter_show_results(const char *msg)
{
}
+
+size_t
+ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr)
+{
+ return 0;
+}
+void
+ruby_debug_counter_reset(void)
+{
+}
+
+void
+ruby_debug_counter_show_at_exit(int enable)
+{
+}
+
#endif /* USE_DEBUG_COUNTER */
diff --git a/debug_counter.h b/debug_counter.h
index b9515f4802..6e0b8dee60 100644
--- a/debug_counter.h
+++ b/debug_counter.h
@@ -14,40 +14,67 @@
#ifdef RB_DEBUG_COUNTER
-/*
- * method cache (mc) counts.
- *
- * * mc_inline_hit/miss: inline mc hit/miss counts (VM send insn)
- * * mc_global_hit/miss: global method cache hit/miss counts
- * two types: (1) inline cache miss (VM send insn)
- * (2) called from C (rb_funcall).
- * * mc_global_state_miss: inline mc miss by global_state miss.
- * * mc_class_serial_miss: ... by mc_class_serial_miss
- * * mc_cme_complement: callable_method_entry complement counts.
- * * mc_cme_complement_hit: callable_method_entry cache hit counts.
- * * mc_search_super: search_method() call counts.
- * * mc_miss_by_nome: inline mc miss by no ment.
- * * mc_miss_by_distinct: ... by distinct ment.
- * * mc_miss_by_refine: ... by ment being refined.
- * * mc_miss_by_visi: ... by visibility change.
- * * mc_miss_spurious: spurious inline mc misshit.
- * * mc_miss_reuse_call: count of reuse of cc->call.
- */
-RB_DEBUG_COUNTER(mc_inline_hit)
-RB_DEBUG_COUNTER(mc_inline_miss)
-RB_DEBUG_COUNTER(mc_global_hit)
-RB_DEBUG_COUNTER(mc_global_miss)
-RB_DEBUG_COUNTER(mc_global_state_miss)
-RB_DEBUG_COUNTER(mc_class_serial_miss)
-RB_DEBUG_COUNTER(mc_cme_complement)
-RB_DEBUG_COUNTER(mc_cme_complement_hit)
-RB_DEBUG_COUNTER(mc_search_super)
-RB_DEBUG_COUNTER(mc_miss_by_nome)
-RB_DEBUG_COUNTER(mc_miss_by_distinct)
-RB_DEBUG_COUNTER(mc_miss_by_refine)
-RB_DEBUG_COUNTER(mc_miss_by_visi)
-RB_DEBUG_COUNTER(mc_miss_spurious)
-RB_DEBUG_COUNTER(mc_miss_reuse_call)
+// method cache (IMC: inline method cache)
+RB_DEBUG_COUNTER(mc_inline_hit) // IMC hit
+RB_DEBUG_COUNTER(mc_inline_miss_klass) // IMC miss by different class
+RB_DEBUG_COUNTER(mc_inline_miss_invalidated) // IMC miss by invalidated ME
+RB_DEBUG_COUNTER(mc_inline_miss_empty) // IMC miss because prev is empty slot
+RB_DEBUG_COUNTER(mc_inline_miss_same_cc) // IMC miss, but same CC
+RB_DEBUG_COUNTER(mc_inline_miss_same_cme) // IMC miss, but same CME
+RB_DEBUG_COUNTER(mc_inline_miss_same_def) // IMC miss, but same definition
+RB_DEBUG_COUNTER(mc_inline_miss_diff) // IMC miss, different methods
+
+RB_DEBUG_COUNTER(cvar_write_inline_hit) // cvar cache hit on write
+RB_DEBUG_COUNTER(cvar_read_inline_hit) // cvar cache hit on read
+RB_DEBUG_COUNTER(cvar_inline_miss) // miss inline cache
+RB_DEBUG_COUNTER(cvar_class_invalidate) // invalidate cvar cache when define a cvar that's defined on a subclass
+RB_DEBUG_COUNTER(cvar_include_invalidate) // invalidate cvar cache on module include or prepend
+
+RB_DEBUG_COUNTER(mc_cme_complement) // number of acquiring complement CME
+RB_DEBUG_COUNTER(mc_cme_complement_hit) // number of cache hit for complemented CME
+
+RB_DEBUG_COUNTER(mc_search) // count for method lookup in class tree
+RB_DEBUG_COUNTER(mc_search_notfound) // method lookup, but not found
+RB_DEBUG_COUNTER(mc_search_super) // total traversed classes
+
+// callinfo
+RB_DEBUG_COUNTER(ci_packed) // number of packed CI
+RB_DEBUG_COUNTER(ci_kw) // non-packed CI w/ keywords
+RB_DEBUG_COUNTER(ci_nokw) // non-packed CI w/o keywords
+RB_DEBUG_COUNTER(ci_runtime) // creating temporary CI
+
+// callcache
+RB_DEBUG_COUNTER(cc_new) // number of CC
+RB_DEBUG_COUNTER(cc_temp) // dummy CC (stack-allocated)
+RB_DEBUG_COUNTER(cc_found_in_ccs) // count for CC lookup success in CCS
+RB_DEBUG_COUNTER(cc_not_found_in_ccs) // count for CC lookup success in CCS
+
+RB_DEBUG_COUNTER(cc_ent_invalidate) // count for invalidating cc (cc->klass = 0)
+RB_DEBUG_COUNTER(cc_cme_invalidate) // count for invalidating CME
+
+RB_DEBUG_COUNTER(cc_invalidate_leaf) // count for invalidating klass if klass has no-subclasses
+RB_DEBUG_COUNTER(cc_invalidate_leaf_ccs) // corresponding CCS
+RB_DEBUG_COUNTER(cc_invalidate_leaf_callable) // complimented cache (no-subclasses)
+RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has subclasses
+RB_DEBUG_COUNTER(cc_invalidate_tree_cme) // cme if cme is found in this class or superclasses
+RB_DEBUG_COUNTER(cc_invalidate_tree_callable) // complimented cache (subclasses)
+RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative cache
+
+RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs
+RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs
+RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup
+RB_DEBUG_COUNTER(ccs_not_found) // count for not found corresponding ccs on method lookup
+
+// vm_eval.c
+RB_DEBUG_COUNTER(call0_public)
+RB_DEBUG_COUNTER(call0_other)
+RB_DEBUG_COUNTER(gccct_hit)
+RB_DEBUG_COUNTER(gccct_miss)
+RB_DEBUG_COUNTER(gccct_null)
+
+// iseq
+RB_DEBUG_COUNTER(iseq_num) // number of total created iseq
+RB_DEBUG_COUNTER(iseq_cd_num) // number of total created cd (call_data)
/*
* call cache fastpath usage
@@ -61,6 +88,7 @@ RB_DEBUG_COUNTER(ccf_iseq_opt) /* has_opt == TRUE (has optional parameters), but
RB_DEBUG_COUNTER(ccf_iseq_kw1) /* vm_call_iseq_setup_kwparm_kwarg() */
RB_DEBUG_COUNTER(ccf_iseq_kw2) /* vm_call_iseq_setup_kwparm_nokwarg() */
RB_DEBUG_COUNTER(ccf_cfunc)
+RB_DEBUG_COUNTER(ccf_cfunc_with_frame)
RB_DEBUG_COUNTER(ccf_ivar) /* attr_reader */
RB_DEBUG_COUNTER(ccf_attrset) /* attr_writer */
RB_DEBUG_COUNTER(ccf_method_missing)
@@ -69,6 +97,8 @@ RB_DEBUG_COUNTER(ccf_bmethod)
RB_DEBUG_COUNTER(ccf_opt_send)
RB_DEBUG_COUNTER(ccf_opt_call)
RB_DEBUG_COUNTER(ccf_opt_block_call)
+RB_DEBUG_COUNTER(ccf_opt_struct_aref)
+RB_DEBUG_COUNTER(ccf_opt_struct_aset)
RB_DEBUG_COUNTER(ccf_super_method)
/*
@@ -100,7 +130,6 @@ RB_DEBUG_COUNTER(frame_C2R)
/* instance variable counts
*
* * ivar_get_ic_hit/miss: ivar_get inline cache (ic) hit/miss counts (VM insn)
- * * ivar_get_ic_miss_serial: ivar_get ic miss reason by serial (VM insn)
* * ivar_get_ic_miss_unset: ... by unset (VM insn)
* * ivar_get_ic_miss_noobject: ... by "not T_OBJECT" (VM insn)
* * ivar_set_...: same counts with ivar_set (VM insn)
@@ -110,17 +139,17 @@ RB_DEBUG_COUNTER(frame_C2R)
*/
RB_DEBUG_COUNTER(ivar_get_ic_hit)
RB_DEBUG_COUNTER(ivar_get_ic_miss)
-RB_DEBUG_COUNTER(ivar_get_ic_miss_serial)
-RB_DEBUG_COUNTER(ivar_get_ic_miss_unset)
RB_DEBUG_COUNTER(ivar_get_ic_miss_noobject)
RB_DEBUG_COUNTER(ivar_set_ic_hit)
RB_DEBUG_COUNTER(ivar_set_ic_miss)
-RB_DEBUG_COUNTER(ivar_set_ic_miss_serial)
-RB_DEBUG_COUNTER(ivar_set_ic_miss_unset)
-RB_DEBUG_COUNTER(ivar_set_ic_miss_oorange)
+RB_DEBUG_COUNTER(ivar_set_ic_miss_iv_hit)
RB_DEBUG_COUNTER(ivar_set_ic_miss_noobject)
RB_DEBUG_COUNTER(ivar_get_base)
RB_DEBUG_COUNTER(ivar_set_base)
+RB_DEBUG_COUNTER(ivar_get_ic_miss_set)
+RB_DEBUG_COUNTER(ivar_get_cc_miss_set)
+RB_DEBUG_COUNTER(ivar_get_ic_miss_unset)
+RB_DEBUG_COUNTER(ivar_get_cc_miss_unset)
/* local variable counts
*
@@ -155,6 +184,12 @@ RB_DEBUG_COUNTER(gc_major_shady)
RB_DEBUG_COUNTER(gc_major_force)
RB_DEBUG_COUNTER(gc_major_oldmalloc)
+RB_DEBUG_COUNTER(gc_enter_start)
+RB_DEBUG_COUNTER(gc_enter_mark_continue)
+RB_DEBUG_COUNTER(gc_enter_sweep_continue)
+RB_DEBUG_COUNTER(gc_enter_rest)
+RB_DEBUG_COUNTER(gc_enter_finalizer)
+
RB_DEBUG_COUNTER(gc_isptr_trial)
RB_DEBUG_COUNTER(gc_isptr_range)
RB_DEBUG_COUNTER(gc_isptr_align)
@@ -164,7 +199,7 @@ RB_DEBUG_COUNTER(gc_isptr_maybe)
*
* * obj_newobj: newobj counts
* * obj_newobj_slowpath: newobj with slowpath counts
- * * obj_newobj_wb_unprotected: newobj for wb_unprotecte.
+ * * obj_newobj_wb_unprotected: newobj for wb_unprotected.
* * obj_free: obj_free() counts
* * obj_promote: promoted counts (oldgen)
* * obj_wb_unprotect: wb unprotect counts
@@ -208,6 +243,7 @@ RB_DEBUG_COUNTER(obj_wb_unprotect)
RB_DEBUG_COUNTER(obj_obj_embed)
RB_DEBUG_COUNTER(obj_obj_transient)
RB_DEBUG_COUNTER(obj_obj_ptr)
+RB_DEBUG_COUNTER(obj_obj_too_complex)
RB_DEBUG_COUNTER(obj_str_ptr)
RB_DEBUG_COUNTER(obj_str_embed)
@@ -282,6 +318,9 @@ RB_DEBUG_COUNTER(obj_imemo_throw_data)
RB_DEBUG_COUNTER(obj_imemo_ifunc)
RB_DEBUG_COUNTER(obj_imemo_memo)
RB_DEBUG_COUNTER(obj_imemo_parser_strterm)
+RB_DEBUG_COUNTER(obj_imemo_callinfo)
+RB_DEBUG_COUNTER(obj_imemo_callcache)
+RB_DEBUG_COUNTER(obj_imemo_constcache)
/* ar_table */
RB_DEBUG_COUNTER(artable_hint_hit)
@@ -301,35 +340,12 @@ RB_DEBUG_COUNTER(theap_alloc)
RB_DEBUG_COUNTER(theap_alloc_fail)
RB_DEBUG_COUNTER(theap_evacuate)
-/* mjit_exec() counts */
-RB_DEBUG_COUNTER(mjit_exec)
-RB_DEBUG_COUNTER(mjit_exec_not_added)
-RB_DEBUG_COUNTER(mjit_exec_not_added_add_iseq)
-RB_DEBUG_COUNTER(mjit_exec_not_ready)
-RB_DEBUG_COUNTER(mjit_exec_not_compiled)
-RB_DEBUG_COUNTER(mjit_exec_call_func)
-
-/* MJIT <-> VM frame push counts */
-RB_DEBUG_COUNTER(mjit_frame_VM2VM)
-RB_DEBUG_COUNTER(mjit_frame_VM2JT)
-RB_DEBUG_COUNTER(mjit_frame_JT2JT)
-RB_DEBUG_COUNTER(mjit_frame_JT2VM)
-
-/* MJIT cancel counters */
-RB_DEBUG_COUNTER(mjit_cancel)
-RB_DEBUG_COUNTER(mjit_cancel_ivar_inline)
-RB_DEBUG_COUNTER(mjit_cancel_send_inline)
-RB_DEBUG_COUNTER(mjit_cancel_opt_insn) /* CALL_SIMPLE_METHOD */
-RB_DEBUG_COUNTER(mjit_cancel_invalidate_all)
-
-/* rb_mjit_unit_list length */
-RB_DEBUG_COUNTER(mjit_length_unit_queue)
-RB_DEBUG_COUNTER(mjit_length_active_units)
-RB_DEBUG_COUNTER(mjit_length_compact_units)
-RB_DEBUG_COUNTER(mjit_length_stale_units)
-
-/* Other MJIT counters */
-RB_DEBUG_COUNTER(mjit_compile_failures)
+// VM sync
+RB_DEBUG_COUNTER(vm_sync_lock)
+RB_DEBUG_COUNTER(vm_sync_lock_enter)
+RB_DEBUG_COUNTER(vm_sync_lock_enter_nb)
+RB_DEBUG_COUNTER(vm_sync_lock_enter_cr)
+RB_DEBUG_COUNTER(vm_sync_barrier)
/* load (not implemented yet) */
/*
@@ -341,6 +357,10 @@ RB_DEBUG_COUNTER(load_path_is_not_realpath)
#ifndef RUBY_DEBUG_COUNTER_H
#define RUBY_DEBUG_COUNTER_H 1
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "ruby/ruby.h" /* for VALUE */
+
#if !defined(__GNUC__) && USE_DEBUG_COUNTER
#error "USE_DEBUG_COUNTER is not supported by other than __GNUC__"
#endif
@@ -353,32 +373,62 @@ enum rb_debug_counter_type {
};
#if USE_DEBUG_COUNTER
-#include "ruby/ruby.h"
-
extern size_t rb_debug_counter[];
+RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor;
+RUBY_EXTERN void rb_debug_counter_add_atomic(enum rb_debug_counter_type type, int add);
inline static int
rb_debug_counter_add(enum rb_debug_counter_type type, int add, int cond)
{
if (cond) {
- rb_debug_counter[(int)type] += add;
+ if (ruby_single_main_ractor != NULL) {
+ rb_debug_counter[(int)type] += add;
+ }
+ else {
+ rb_debug_counter_add_atomic(type, add);
+ }
}
return cond;
}
+inline static int
+rb_debug_counter_max(enum rb_debug_counter_type type, unsigned int num)
+{
+ // TODO: sync
+ if (rb_debug_counter[(int)type] < num) {
+ rb_debug_counter[(int)type] = num;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
VALUE rb_debug_counter_reset(VALUE klass);
VALUE rb_debug_counter_show(VALUE klass);
#define RB_DEBUG_COUNTER_INC(type) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, 1)
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !(cond)))
-#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, (cond))
+#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !!(cond))
+#define RB_DEBUG_COUNTER_ADD(type, num) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, (num), 1)
+#define RB_DEBUG_COUNTER_SETMAX(type, num) rb_debug_counter_max(RB_DEBUG_COUNTER_##type, (unsigned int)(num))
#else
#define RB_DEBUG_COUNTER_INC(type) ((void)0)
-#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (cond)
-#define RB_DEBUG_COUNTER_INC_IF(type, cond) (cond)
+#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!!(cond))
+#define RB_DEBUG_COUNTER_INC_IF(type, cond) (!!(cond))
+#define RB_DEBUG_COUNTER_ADD(type, num) ((void)0)
+#define RB_DEBUG_COUNTER_SETMAX(type, num) 0
#endif
void rb_debug_counter_show_results(const char *msg);
+RUBY_SYMBOL_EXPORT_BEGIN
+
+size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
+void ruby_debug_counter_reset(void);
+void ruby_debug_counter_show_at_exit(int enable);
+
+RUBY_SYMBOL_EXPORT_END
+
#endif /* RUBY_DEBUG_COUNTER_H */
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 226e1066a5..54fef6685f 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -1,10 +1,25 @@
# -*- mode: makefile-gmake; indent-tabs-mode: t -*-
-gnumake = yes
+reconfig config.status: export MAKE:=$(MAKE)
override gnumake_recursive := $(if $(findstring n,$(firstword $(MFLAGS))),,+)
override mflags := $(filter-out -j%,$(MFLAGS))
MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
+nproc = $(subst -j,,$(filter -j%,$(MFLAGS)))
+ifeq ($(GITHUB_ACTIONS),true)
+override ACTIONS_GROUP = @echo "\#\#[group]$(patsubst yes-%,%,$@)"
+override ACTIONS_ENDGROUP = @echo "\#\#[endgroup]"
+endif
+
+ifneq ($(filter darwin%,$(target_os)),)
+# Remove debug option not to generate thousands of .dSYM
+MJIT_DEBUGFLAGS := $(filter-out -g%,$(MJIT_DEBUGFLAGS))
+
+INSTRUBY_ENV += SDKROOT=
+endif
+INSTRUBY_ARGS += --gnumake
+
+ifeq ($(DOT_WAIT),)
CHECK_TARGETS := great exam love check test check% test% btest%
# expand test targets, and those dependents
TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))
@@ -12,7 +27,7 @@ TEST_DEPENDS := $(filter-out commit $(TEST_TARGETS),$(MAKECMDGOALS))
TEST_TARGETS := $(patsubst great,exam,$(TEST_TARGETS))
TEST_DEPENDS := $(filter-out great $(TEST_TARGETS),$(TEST_DEPENDS))
TEST_TARGETS := $(patsubst exam,check,$(TEST_TARGETS))
-TEST_TARGETS := $(patsubst check,test-spec test-all test-tool test-short,$(TEST_TARGETS))
+TEST_TARGETS := $(patsubst check,test-syntax-suggest test-spec test-all test-tool test-short,$(TEST_TARGETS))
TEST_TARGETS := $(patsubst test-rubyspec,test-spec,$(TEST_TARGETS))
TEST_DEPENDS := $(filter-out exam check test-spec $(TEST_TARGETS),$(TEST_DEPENDS))
TEST_TARGETS := $(patsubst love,check,$(TEST_TARGETS))
@@ -22,15 +37,16 @@ TEST_DEPENDS := $(filter-out test-all $(TEST_TARGETS),$(TEST_DEPENDS))
TEST_TARGETS := $(patsubst test,test-short,$(TEST_TARGETS))
TEST_DEPENDS := $(filter-out test $(TEST_TARGETS),$(TEST_DEPENDS))
TEST_TARGETS := $(patsubst test-short,btest-ruby test-knownbug test-basic,$(TEST_TARGETS))
+TEST_TARGETS := $(patsubst test-bundled-gems,test-bundled-gems-run,$(TEST_TARGETS))
+TEST_TARGETS := $(patsubst test-bundled-gems-run,test-bundled-gems-run $(PREPARE_BUNDLED_GEMS),$(TEST_TARGETS))
+TEST_TARGETS := $(patsubst test-bundled-gems-prepare,test-bundled-gems-prepare $(PRECHECK_BUNDLED_GEMS) test-bundled-gems-fetch,$(TEST_TARGETS))
+TEST_TARGETS := $(patsubst test-syntax-suggest,test-syntax-suggest $(PREPARE_SYNTAX_SUGGEST),$(TEST_TARGETS))
TEST_DEPENDS := $(filter-out test-short $(TEST_TARGETS),$(TEST_DEPENDS))
TEST_DEPENDS += $(if $(filter great exam love check,$(MAKECMDGOALS)),all exts)
+endif
in-srcdir := $(if $(filter-out .,$(srcdir)),$(CHDIR) $(srcdir) &&)
-ifneq ($(filter -O0 -Od,$(optflags)),)
-override XCFLAGS := $(filter-out -D_FORTIFY_SOURCE=%,$(XCFLAGS))
-endif
-
ifeq ($(if $(filter all main exts enc trans libencs libenc libtrans \
prog program ruby ruby$(EXEEXT) \
wprogram rubyw rubyw$(EXEEXT) \
@@ -58,6 +74,7 @@ $(foreach arch,$(arch_flags),\
$(eval $(call archcmd,$(patsubst -arch=%,%,$(value arch)),$(patsubst -arch=%,-arch %,$(value arch)))))
endif
+ifeq ($(DOT_WAIT),)
.PHONY: $(addprefix yes-,$(TEST_TARGETS))
ifneq ($(filter-out btest%,$(TEST_TARGETS)),)
@@ -67,12 +84,16 @@ endif
ORDERED_TEST_TARGETS := $(filter $(TEST_TARGETS), \
btest-ruby test-knownbug test-basic \
test-testframework test-tool test-ruby test-all \
- test-spec test-bundler-prepare test-bundler \
+ test-spec test-syntax-suggest-prepare test-syntax-suggest \
+ test-bundler-prepare test-bundler test-bundler-parallel \
+ test-bundled-gems-precheck test-bundled-gems-fetch \
+ test-bundled-gems-prepare test-bundled-gems-run \
)
prev_test := $(if $(filter test-spec,$(ORDERED_TEST_TARGETS)),test-spec-precheck)
$(foreach test,$(ORDERED_TEST_TARGETS), \
$(eval yes-$(value test) no-$(value test): $(value prev_test)); \
$(eval prev_test := $(value test)))
+endif
ifneq ($(if $(filter install,$(MAKECMDGOALS)),$(filter uninstall,$(MAKECMDGOALS))),)
install-targets := $(filter install uninstall,$(MAKECMDGOALS))
@@ -90,15 +111,21 @@ sudo-precheck: test yes-test-testframework no-test-testframework
install-prereq: sudo-precheck
yes-test-all no-test-all: install
endif
+yes-test-bundler-parallel: PARALLELRSPECOPTS += $(if $(nproc),-n$(shell expr $(nproc) + $(nproc) / 2))
+
# Cross reference needs to parse all files at once
love install reinstall: RDOCFLAGS = --force-update
+ifneq ($(if $(filter -flto%,$(CFLAGS)),$(subst darwin,,$(arch)),$(arch)),$(arch))
+override EXE_LDFLAGS = $(filter-out -g%,$(LDFLAGS))
+endif
+
$(srcdir)/missing/des_tables.c: $(srcdir)/missing/crypt.c
ifeq ($(if $(filter yes,$(CROSS_COMPILING)),,$(CC)),)
touch $@
else
@$(ECHO) building make_des_table
- $(CC) $(INCFLAGS) $(CPPFLAGS) -DDUMP $(LDFLAGS) $(XLDFLAGS) $(LIBS) -omake_des_table $(srcdir)/missing/crypt.c
+ $(CC) $(INCFLAGS) $(CPPFLAGS) -DDUMP $(EXE_LDFLAGS) $(XLDFLAGS) $(LIBS) -omake_des_table $(srcdir)/missing/crypt.c
@[ -x ./make_des_table ]
@$(ECHO) generating $@
$(Q) $(MAKEDIRS) $(@D)
@@ -107,10 +134,12 @@ else
$(Q) $(RMALL) make_des_table*
endif
+config.status: $(wildcard config.cache)
+
STUBPROGRAM = rubystub$(EXEEXT)
IGNOREDPATTERNS = %~ .% %.orig %.rej \#%\#
SCRIPTBINDIR := $(if $(EXEEXT),,exec/)
-SCRIPTPROGRAMS = $(addprefix $(SCRIPTBINDIR),$(addsuffix $(EXEEXT),$(filter-out $(IGNOREDPATTERNS),$(notdir $(wildcard $(srcdir)/libexec/*)))))
+SCRIPTPROGRAMS = $(addprefix $(SCRIPTBINDIR),$(addsuffix $(EXEEXT),$(filter-out $(IGNOREDPATTERNS),$(notdir $(wildcard $(srcdir)/bin/*)))))
stub: $(STUBPROGRAM)
scriptbin: $(SCRIPTPROGRAMS)
@@ -125,7 +154,7 @@ $(STUBPROGRAM): rubystub.$(OBJEXT) $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SE
rubystub$(EXEEXT):
@rm -f $@
$(ECHO) linking $@
- $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) rubystub.$(OBJEXT) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
+ $(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) rubystub.$(OBJEXT) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
$(Q) $(POSTLINK)
$(if $(STRIP),$(Q) $(STRIP) $@)
@@ -136,9 +165,8 @@ $(SCRIPTBINDIR)%$(EXEEXT): bin/% $(STUBPROGRAM) \
$(Q) chmod +x $@
$(Q) $(POSTLINK)
-$(TIMESTAMPDIR)/.exec.time:
- $(Q) mkdir exec
- $(Q) exit > $@
+$(SCRIPTBINDIR):
+ $(Q) mkdir $@
.PHONY: commit
commit: $(if $(filter commit,$(MAKECMDGOALS)),$(filter-out commit,$(MAKECMDGOALS))) up
@@ -156,8 +184,8 @@ commit: $(if $(filter commit,$(MAKECMDGOALS)),$(filter-out commit,$(MAKECMDGOALS
GITHUB_RUBY_URL = https://github.com/ruby/ruby
PR =
-COMMIT_GPG_SIGN = $(shell git -C "$(srcdir)" config commit.gpgsign)
-REMOTE_GITHUB_URL = $(shell git -C "$(srcdir)" config remote.github.url)
+COMMIT_GPG_SIGN = $(shell $(GIT) -C "$(srcdir)" config commit.gpgsign)
+REMOTE_GITHUB_URL = $(shell $(GIT) -C "$(srcdir)" config remote.github.url)
COMMITS_NOTES = commits
.PHONY: fetch-github
@@ -170,21 +198,21 @@ define fetch-github
exit 1; \
)
$(eval REMOTE_GITHUB_URL := $(REMOTE_GITHUB_URL))
- $(if $(REMOTE_GITHUB_URL),, \
- echo adding $(GITHUB_RUBY_URL) as remote github; \
- git -C "$(srcdir)" remote add github $(GITHUB_RUBY_URL); \
- git -C "$(srcdir)" config --add remote.github.fetch +refs/notes/$(COMMITS_NOTES):refs/notes/$(COMMITS_NOTES)
- $(eval REMOTE_GITHUB_URL := $(GITHUB_RUBY_URL)) \
+ $(if $(REMOTE_GITHUB_URL),,
+ echo adding $(GITHUB_RUBY_URL) as remote github
+ $(GIT) -C "$(srcdir)" remote add github $(GITHUB_RUBY_URL)
+ $(GIT) -C "$(srcdir)" config --add remote.github.fetch +refs/notes/$(COMMITS_NOTES):refs/notes/$(COMMITS_NOTES)
+ $(eval REMOTE_GITHUB_URL := $(GITHUB_RUBY_URL))
)
- $(if $(git -C "$(srcdir)" rev-parse "github/pull/$(1)/head" -- 2> /dev/null), \
- git -C "$(srcdir)" branch -f "gh-$(1)" "github/pull/$(1)/head", \
- git -C "$(srcdir)" fetch -f github "pull/$(1)/head:gh-$(1)" \
+ $(if $(shell $(GIT) -C "$(srcdir)" rev-parse "github/pull/$(1)/head" -- 2> /dev/null),
+ $(GIT) -C "$(srcdir)" branch -f "gh-$(1)" "github/pull/$(1)/head",
+ $(GIT) -C "$(srcdir)" fetch -f github "pull/$(1)/head:gh-$(1)"
)
endef
.PHONY: checkout-github
checkout-github: fetch-github
- git -C "$(srcdir)" checkout "gh-$(PR)"
+ $(GIT) -C "$(srcdir)" checkout "gh-$(PR)"
.PHONY: update-github
update-github: fetch-github
@@ -197,30 +225,31 @@ update-github: fetch-github
$(eval PR_BRANCH := $(word 2,$(PULL_REQUEST_FORK_BRANCH)))
$(eval GITHUB_UPDATE_WORKTREE := $(shell mktemp -d "$(srcdir)/gh-$(PR)-XXXXXX"))
- git -C "$(srcdir)" worktree add $(notdir $(GITHUB_UPDATE_WORKTREE)) "gh-$(PR)"
- git -C "$(GITHUB_UPDATE_WORKTREE)" merge master --no-edit
+ $(GIT) -C "$(srcdir)" worktree add $(notdir $(GITHUB_UPDATE_WORKTREE)) "gh-$(PR)"
+ $(GIT) -C "$(GITHUB_UPDATE_WORKTREE)" merge master --no-edit
@$(BASERUBY) -e 'print "Are you sure to push this to PR=$(PR)? [Y/n]: "; exit(gets.chomp != "n")'
- git -C "$(srcdir)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git
- git -C "$(GITHUB_UPDATE_WORKTREE)" push fork-$(PR) gh-$(PR):$(PR_BRANCH)
- git -C "$(srcdir)" remote rm fork-$(PR)
- git -C "$(srcdir)" worktree remove $(notdir $(GITHUB_UPDATE_WORKTREE))
- git -C "$(srcdir)" branch -D gh-$(PR)
+ $(GIT) -C "$(srcdir)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git
+ $(GIT) -C "$(GITHUB_UPDATE_WORKTREE)" push fork-$(PR) gh-$(PR):$(PR_BRANCH)
+ $(GIT) -C "$(srcdir)" remote rm fork-$(PR)
+ $(GIT) -C "$(srcdir)" worktree remove $(notdir $(GITHUB_UPDATE_WORKTREE))
+ $(GIT) -C "$(srcdir)" branch -D gh-$(PR)
.PHONY: pull-github
pull-github: fetch-github
$(call pull-github,$(PR))
define pull-github
- $(eval GITHUB_MERGE_BASE := $(shell git -C "$(srcdir)" log -1 --format=format:%H))
- $(eval GITHUB_MERGE_BRANCH := $(shell git -C "$(srcdir)" symbolic-ref --short HEAD))
+ $(eval GITHUB_MERGE_BASE := $(shell $(GIT) -C "$(srcdir)" log -1 --format=format:%H))
+ $(eval GITHUB_MERGE_BRANCH := $(shell $(GIT) -C "$(srcdir)" symbolic-ref --short HEAD))
$(eval GITHUB_MERGE_WORKTREE := $(shell mktemp -d "$(srcdir)/gh-$(1)-XXXXXX"))
- git -C "$(srcdir)" worktree add $(notdir $(GITHUB_MERGE_WORKTREE)) "gh-$(1)"
- git -C "$(GITHUB_MERGE_WORKTREE)" rebase $(GITHUB_MERGE_BRANCH)
+ $(GIT) -C "$(srcdir)" worktree prune
+ $(GIT) -C "$(srcdir)" worktree add $(notdir $(GITHUB_MERGE_WORKTREE)) "gh-$(1)"
+ $(GIT) -C "$(GITHUB_MERGE_WORKTREE)" rebase $(GITHUB_MERGE_BRANCH)
$(eval COMMIT_GPG_SIGN := $(COMMIT_GPG_SIGN))
$(if $(filter true,$(COMMIT_GPG_SIGN)), \
- git -C "$(GITHUB_MERGE_WORKTREE)" rebase --exec "git commit --amend --no-edit -S" "$(GITHUB_MERGE_BASE)"; \
+ $(GIT) -C "$(GITHUB_MERGE_WORKTREE)" rebase --exec "$(GIT) commit --amend --no-edit -S" "$(GITHUB_MERGE_BASE)"; \
)
- git -C "$(GITHUB_MERGE_WORKTREE)" rebase --exec "git notes add --message 'Merged: $(GITHUB_RUBY_URL)/pull/$(1)'" "$(GITHUB_MERGE_BASE)"
+ $(GIT) -C "$(GITHUB_MERGE_WORKTREE)" rebase --exec "$(GIT) notes add --message 'Merged: $(GITHUB_RUBY_URL)/pull/$(1)'" "$(GITHUB_MERGE_BASE)"
endef
.PHONY: fetch-github-%
@@ -229,28 +258,104 @@ fetch-github-%:
.PHONY: checkout-github-%
checkout-github-%: fetch-github-%
- git -C "$(srcdir)" checkout "gh-$*"
+ $(GIT) -C "$(srcdir)" checkout "gh-$*"
.PHONY: pr-% pull-github-%
pr-% pull-github-%: fetch-github-%
$(call pull-github,$*)
HELP_EXTRA_TASKS = \
- " checkout-github: checkout GitHub Pull Request [PR=1234]" \
- " pull-github: rebase GitHub Pull Request to new worktree [PR=1234]" \
- " update-github: merge master branch and push it to Pull Request [PR=1234]" \
+ " checkout-github: checkout GitHub Pull Request [PR=1234]" \
+ " pull-github: rebase GitHub Pull Request to new worktree [PR=1234]" \
+ " update-github: merge master branch and push it to Pull Request [PR=1234]" \
""
-ifneq ($(filter refresh-gems,$(MAKECMDGOALS)),)
-extract-gems: update-gems
+# 1. squeeze spaces
+# 2. strip and skip comment/empty lines
+# 3. "gem x.y.z URL xxxxxx" -> "gem|x.y.z|xxxxxx|URL"
+# 4. "gem x.y.z URL" -> "gem-x.y.z"
+bundled-gems := $(shell sed \
+ -e 's/[ ][ ]*/ /g' \
+ -e 's/^ //;/\#/d;s/ *$$//;/^$$/d' \
+ $(if $(filter yes,$(HAVE_GIT)), \
+ -e 's/^\(.*\) \(.*\) \(.*\) \(.*\)/\1|\2|\4|\3/' \
+ ) \
+ -e 's/ /-/;s/ .*//' \
+ $(srcdir)/gems/bundled_gems)
+
+bundled-gems-rev := $(filter-out $(subst |,,$(bundled-gems)),$(bundled-gems))
+bundled-gems := $(filter-out $(bundled-gems-rev),$(bundled-gems))
+
+# calls $(1) with name, version, revision, URL
+foreach-bundled-gems-rev = \
+ $(foreach g,$(bundled-gems-rev),$(call foreach-bundled-gems-rev-0,$(1),$(subst |, ,$(value g))))
+foreach-bundled-gems-rev-0 = \
+ $(call $(1),$(word 1,$(2)),$(word 2,$(2)),$(word 3,$(2)),$(word 4,$(2)))
+bundled-gem-gemfile = $(srcdir)/gems/$(1)-$(2).gem
+bundled-gem-srcdir = $(srcdir)/gems/src/$(1)
+bundled-gem-extracted = $(srcdir)/.bundle/gems/$(1)-$(2)
+
+update-gems: | $(patsubst %,$(srcdir)/gems/%.gem,$(bundled-gems))
+update-gems: | $(call foreach-bundled-gems-rev,bundled-gem-gemfile)
+update-gems: | $(call foreach-bundled-gems-rev,bundled-gem-srcdir)
+
+test-bundler-precheck: | $(srcdir)/.bundle/cache
+
+$(srcdir)/.bundle/cache:
+ $(MAKEDIRS) $(@D) $(CACHE_DIR)
+ $(LN_S) ../.downloaded-cache $@
+
+$(srcdir)/gems/%.gem:
+ $(ECHO) Downloading bundled gem $*...
+ $(Q) $(BASERUBY) -C "$(srcdir)" \
+ -I./tool -rdownloader \
+ -e 'gem = "$(@F)"' \
+ -e 'old = Dir.glob("gems/"+gem.sub(/-[^-]*$$/, "-*.gem"))' \
+ -e 'Downloader::RubyGems.download(gem, "gems", nil) and' \
+ -e '(old.delete("gems/#{gem}"); !old.empty?) and' \
+ -e 'File.unlink(*old) and' \
+ -e 'FileUtils.rm_rf(old.map{'"|n|"'n.chomp(".gem")})'
+
+extract-gems: | $(patsubst %,$(srcdir)/.bundle/gems/%,$(bundled-gems))
+extract-gems: | $(call foreach-bundled-gems-rev,bundled-gem-extracted)
+
+$(srcdir)/.bundle/gems/%: $(srcdir)/gems/%.gem | .bundle/gems
+ $(ECHO) Extracting bundle gem $*...
+ $(Q) $(BASERUBY) -C "$(srcdir)" \
+ -Itool/lib -rbundled_gem \
+ -e 'BundledGem.unpack("gems/$(@F).gem", ".bundle")'
+
+define copy-gem
+$(srcdir)/gems/src/$(1): | $(srcdir)/gems/src
+ $(ECHO) Cloning $(4)
+ $(Q) $(GIT) clone $(4) $$(@)
+
+$(srcdir)/.bundle/gems/$(1)-$(2): | $(srcdir)/gems/src/$(1) .bundle/gems
+ $(ECHO) Copying $(1)@$(3) to $$(@F)
+ $(Q) $(CHDIR) "$(srcdir)/gems/src/$(1)" && \
+ $(GIT) fetch origin $(3) && \
+ $(GIT) checkout --detach $(3) && \
+ :
+ $(Q) $(BASERUBY) -C "$(srcdir)" \
+ -Itool/lib -rbundled_gem \
+ -e 'BundledGem.copy("gems/src/$(1)/$(1).gemspec", ".bundle")'
+
+endef
+define copy-gem-0
+$(eval $(call copy-gem,$(1),$(2),$(3),$(4)))
+endef
+
+$(call foreach-bundled-gems-rev,copy-gem-0)
+
+$(srcdir)/gems/src:
+ $(MAKEDIRS) $@
+
+$(srcdir)/.bundle/gems:
+ $(MAKEDIRS) $@
+
+ifneq ($(filter update-bundled_gems refresh-gems,$(MAKECMDGOALS)),)
update-gems: update-bundled_gems
endif
-ifneq ($(filter extract-gems,$(MAKECMDGOALS)),)
-extract-gems: $(filter update-gems update-bundled_gems,$(MAKECMDGOALS))
-endif
-ifneq ($(filter update-gems,$(MAKECMDGOALS)),)
-update-gems: $(filter update-bundled_gems,$(MAKECMDGOALS))
-endif
ifeq ($(filter 0 1,$(words $(arch_flags))),)
$(foreach x,$(patsubst -arch=%,%,$(arch_flags)), \
@@ -280,25 +385,26 @@ $(MJIT_MIN_HEADER): $(mjit_min_headers) $(PREP)
endif
-ifeq ($(if $(wildcard $(filter-out .,$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES))),,\
- $(wildcard $(srcdir)/lib/unicode_normalize/tables.rb)),)
-# Needs the dependency when any Unicode data file exists, or
-# normalization tables script doesn't. Otherwise, when the target
-# only exists, use it as-is.
-.PHONY: $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time
-UNICODE_TABLES_TIMESTAMP =
-$(UNICODE_SRC_DATA_DIR)/.unicode-tables.time: \
- $(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
-endif
+.SECONDARY: update-unicode-files
+.SECONDARY: update-unicode-auxiliary-files
+.SECONDARY: update-unicode-ucd-emoji-files
+.SECONDARY: update-unicode-emoji-files
-REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h 2>/dev/null)
-REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && git log -1 --format=%H 2>/dev/null)
+ifeq ($(HAVE_GIT),yes)
+REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && $(GIT) log -1 --format=%H 2>/dev/null)
+else
+REVISION_LATEST := update
+endif
+REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(wildcard $(srcdir)/revision.h revision.h) /dev/null 2>/dev/null)
+ifeq ($(REVISION_IN_HEADER),)
+REVISION_IN_HEADER := none
+endif
ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST))
-# GNU make treat the target as unmodified when its dependents get
-# updated but it is not updated, while others may not.
-$(srcdir)/revision.h: $(REVISION_H)
+$(REVISION_H): PHONY
endif
+include $(top_srcdir)/yjit/yjit.mk
+
# Query on the generated rdoc
#
# $ make rdoc:Integer#+
@@ -306,19 +412,25 @@ rdoc\:%: PHONY
$(Q)$(RUNRUBY) $(srcdir)/libexec/ri --no-standard-docs --doc-dir=$(RDOCOUT) $(patsubst rdoc:%,%,$@)
test_%.rb test/%: programs PHONY
- +$(Q)$(exec) $(RUNRUBY) "$(TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) -- $(patsubst test/%,%,$@)
+ $(Q)$(exec) $(RUNRUBY) "$(TESTSDIR)/runner.rb" --ruby="$(RUNRUBY)" $(TEST_EXCLUDES) $(TESTOPTS) -- $(patsubst test/%,%,$@)
spec/bundler/%: PHONY
- +$(Q)$(exec) $(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec --require spec_helper $(RSPECOPTS) $@
+ $(Q)$(exec) $(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec --require spec_helper $(RSPECOPTS) $@
-spec/%: programs exts PHONY
- +$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
+spec/bundler: test-bundler-parallel
+ $(Q)$(NULLCMD)
+
+# workaround to avoid matching non ruby files with "spec/%/" under GNU make 3.81
+spec/%_spec.c:
+ $(empty)
+$(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h:
+ $(empty)
benchmark/%: miniruby$(EXEEXT) update-benchmark-driver PHONY
$(Q)$(BASERUBY) -rrubygems -I$(srcdir)/benchmark/lib $(srcdir)/benchmark/benchmark-driver/exe/benchmark-driver \
--executables="compare-ruby::$(COMPARE_RUBY) -I$(EXTOUT)/common --disable-gem" \
--executables="built-ruby::$(BENCH_RUBY) --disable-gem" \
- $(srcdir)/$@ $(OPTS)
+ $(srcdir)/$@ $(BENCH_OPTS) $(OPTS)
clean-srcs-ext::
$(Q)$(RM) $(patsubst $(srcdir)/%,%,$(EXT_SRCS))
@@ -328,23 +440,43 @@ clean-srcs-extra::
ifneq ($(filter $(VCS),git),)
update-src::
- @$(BASERUBY) $(srcdir)/tool/lib/colorize.rb pass "Latest commit hash = $(shell $(filter-out svn,$(VCS)) -C $(srcdir) rev-parse --short=10 HEAD)"
+ @$(BASERUBY) $(tooldir)/lib/colorize.rb pass "Latest commit hash = $(shell $(filter-out svn,$(VCS)) -C $(srcdir) rev-parse --short=10 HEAD)"
endif
# Update dependencies and commit the updates to the current branch.
update-deps:
$(eval update_deps := $(shell date +update-deps-%Y%m%d))
$(eval deps_dir := $(shell mktemp -d)/$(update_deps))
- $(eval GIT_DIR := $(shell git -C $(srcdir) rev-parse --absolute-git-dir))
- git --git-dir=$(GIT_DIR) worktree add $(deps_dir)
- cp $(srcdir)/tool/config.guess $(srcdir)/tool/config.sub $(deps_dir)/tool
+ $(eval GIT_DIR := $(shell $(GIT) -C $(srcdir) rev-parse --absolute-git-dir))
+ $(GIT) --git-dir=$(GIT_DIR) worktree add $(deps_dir)
+ cp $(tooldir)/config.guess $(tooldir)/config.sub $(deps_dir)/tool
[ -f config.status ] && cp config.status $(deps_dir)
cd $(deps_dir) && autoconf && \
exec ./configure -q -C --enable-load-relative --disable-install-doc --disable-rubygems 'optflags=-O0' 'debugflags=-save-temps=obj -g'
$(RUNRUBY) -C $(deps_dir) tool/update-deps --fix
- git -C $(deps_dir) diff --no-ext-diff --ignore-submodules --exit-code || \
- git -C $(deps_dir) commit --all --message='Update dependencies'
- git --git-dir=$(GIT_DIR) worktree remove $(deps_dir)
+ $(GIT) -C $(deps_dir) diff --no-ext-diff --ignore-submodules --exit-code || \
+ $(GIT) -C $(deps_dir) commit --all --message='Update dependencies'
+ $(GIT) --git-dir=$(GIT_DIR) worktree remove $(deps_dir)
$(RMDIR) $(dir $(deps_dir))
- git --git-dir=$(GIT_DIR) merge --no-edit --ff-only $(update_deps)
- git --git-dir=$(GIT_DIR) branch --delete $(update_deps)
+ $(GIT) --git-dir=$(GIT_DIR) merge --no-edit --ff-only $(update_deps)
+ $(GIT) --git-dir=$(GIT_DIR) branch --delete $(update_deps)
+
+# order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT)
+# because the same named directory exists in the source tree.
+$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY)
+ $(ECHO) building $@
+ $(Q) $(MAKEDIRS) $(@D)
+ $(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG)
+ $(Q) $(RMALL) $@.*
+
+rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c)))
+ @ $(NULLCMD)
+
+ifeq ($(ENABLE_SHARED),yes)
+exts: rubyspec-capiext
+endif
+
+spec/%/ spec/%_spec.rb: programs exts PHONY
+ +$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
+
+ruby.pc: $(filter-out ruby.pc,$(ruby_pc))
diff --git a/defs/id.def b/defs/id.def
index fc7a04ffbc..ebf00506ea 100644
--- a/defs/id.def
+++ b/defs/id.def
@@ -7,6 +7,7 @@ firstline, predefined = __LINE__+1, %[\
inspect
intern
object_id
+ const_added
const_missing
method_missing MethodMissing
method_added
@@ -25,6 +26,7 @@ firstline, predefined = __LINE__+1, %[\
send
__send__
__attached__
+ __recursive_key__
initialize
initialize_copy
initialize_clone
@@ -56,6 +58,7 @@ firstline, predefined = __LINE__+1, %[\
quo
name
nil
+ path
_ UScore
@@ -73,6 +76,7 @@ firstline, predefined = __LINE__+1, %[\
"/*NULL*/" NULL
empty?
eql?
+ default
respond_to? Respond_to
respond_to_missing? Respond_to_missing
<IFUNC>
@@ -86,6 +90,7 @@ firstline, predefined = __LINE__+1, %[\
core#hash_merge_ptr
core#hash_merge_kwd
core#raise
+ core#sprintf
- debug#created_info
@@ -138,6 +143,21 @@ class KeywordError < RuntimeError
end
end
+def id2varname(token, prefix = nil)
+ if /#/ =~ token
+ token = "_#{token.gsub(/\W+/, '_')}"
+ else
+ token = token.sub(/\?/, 'P')
+ token = prefix + token if prefix
+ token.sub!(/\A[a-z]/) {$&.upcase}
+ token.sub!(/\A\$/, "_G_")
+ token.sub!(/\A@@/, "_C_")
+ token.sub!(/\A@/, "_I_")
+ token.gsub!(/\W+/, "")
+ end
+ token
+end
+
predefined_ids = {}
preserved_ids = []
local_ids = []
@@ -153,16 +173,7 @@ predefined.split(/^/).each_with_index do |line, num|
line.sub!(/\s+#.*/, '')
name, token = line.split
next unless name
- token ||= name
- if /#/ =~ token
- token = "_#{token.gsub(/\W+/, '_')}"
- else
- token = token.sub(/\?/, 'P').sub(/\A[a-z]/) {$&.upcase}
- token.sub!(/\A\$/, "_G_")
- token.sub!(/\A@@/, "_C_")
- token.sub!(/\A@/, "_I_")
- token.gsub!(/\W+/, "")
- end
+ token = id2varname(token || name)
if name == '-'
preserved_ids << token
next
@@ -185,13 +196,14 @@ predefined.split(/^/).each_with_index do |line, num|
end << token
predefined_ids[token] = name
end
+index = 127
token_ops.split(/^/).each do |line|
next if /^#/ =~ line
line.sub!(/\s+#.*/, '')
id, op, token = line.split
next unless id and op
token ||= (id unless /\A\W\z/ =~ op)
- token_op_ids << [id, op, token]
+ token_op_ids << [id, op, token, (index += 1 if token)]
end
{
"LOCAL" => local_ids,
@@ -203,4 +215,5 @@ end
:preserved => preserved_ids,
:predefined => predefined_ids,
:token_op => token_op_ids,
+ :last_token => index,
}
diff --git a/defs/keywords b/defs/keywords
index fc30ec2d15..a1b1f4f60f 100644
--- a/defs/keywords
+++ b/defs/keywords
@@ -2,7 +2,7 @@
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/);
+static const struct kwtable *reserved_word(register const char *str, register size_t len);
#define rb_reserved_word(str, len) reserved_word(str, len)
%}
diff --git a/defs/lex.c.src b/defs/lex.c.src
index fc30ec2d15..a1b1f4f60f 100644
--- a/defs/lex.c.src
+++ b/defs/lex.c.src
@@ -2,7 +2,7 @@
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/);
+static const struct kwtable *reserved_word(register const char *str, register size_t len);
#define rb_reserved_word(str, len) reserved_word(str, len)
%}
diff --git a/dir.c b/dir.c
index 6a926f438c..3f73f83fc5 100644
--- a/dir.c
+++ b/dir.c
@@ -11,12 +11,10 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "ruby/thread.h"
-#include "internal.h"
-#include "id.h"
-#include "encindex.h"
+#include "ruby/internal/config.h"
+#include <ctype.h>
+#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -36,12 +34,10 @@
# define USE_OPENDIR_AT 0
# endif
#endif
+
#if USE_OPENDIR_AT
# include <fcntl.h>
#endif
-#ifndef AT_FDCWD
-# define AT_FDCWD -1
-#endif
#undef HAVE_DIRENT_NAMLEN
#if defined HAVE_DIRENT_H && !defined _WIN32
@@ -54,13 +50,13 @@
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# define HAVE_DIRENT_NAMLEN 1
-# if HAVE_SYS_NDIR_H
+# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
-# if HAVE_SYS_DIR_H
+# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
-# if HAVE_NDIR_H
+# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
# ifdef _WIN32
@@ -68,8 +64,6 @@
# endif
#endif
-#include <errno.h>
-
#ifndef HAVE_STDLIB_H
char *getenv();
#endif
@@ -78,36 +72,14 @@ char *getenv();
char *strchr(char*,char);
#endif
-#include <ctype.h>
-
-#include "ruby/util.h"
-
-#define vm_initialized rb_cThread
-
-/* define system APIs */
-#ifdef _WIN32
-#undef chdir
-#define chdir(p) rb_w32_uchdir(p)
-#undef mkdir
-#define mkdir(p, m) rb_w32_umkdir((p), (m))
-#undef rmdir
-#define rmdir(p) rb_w32_urmdir(p)
-#undef opendir
-#define opendir(p) rb_w32_uopendir(p)
-#define ruby_getcwd() rb_w32_ugetcwd(NULL, 0)
-#define IS_WIN32 1
-#else
-#define IS_WIN32 0
-#endif
-
#ifdef HAVE_SYS_ATTR_H
#include <sys/attr.h>
#endif
#define USE_NAME_ON_FS_REAL_BASENAME 1 /* platform dependent APIs to
- * get real basenames */
+ * get real basenames */
#define USE_NAME_ON_FS_BY_FNMATCH 2 /* select the matching
- * basename by fnmatch */
+ * basename by fnmatch */
#ifdef HAVE_GETATTRLIST
# define USE_NAME_ON_FS USE_NAME_ON_FS_REAL_BASENAME
@@ -123,15 +95,54 @@ char *strchr(char*,char);
#ifdef __APPLE__
# define NORMALIZE_UTF8PATH 1
+# include <sys/param.h>
+# include <sys/mount.h>
+# include <sys/vnode.h>
#else
# define NORMALIZE_UTF8PATH 0
#endif
-#if NORMALIZE_UTF8PATH
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
+#include "encindex.h"
+#include "id.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/dir.h"
+#include "internal/encoding.h"
+#include "internal/error.h"
+#include "internal/file.h"
+#include "internal/gc.h"
+#include "internal/io.h"
+#include "internal/object.h"
+#include "internal/vm.h"
+#include "ruby/encoding.h"
+#include "ruby/ruby.h"
+#include "ruby/thread.h"
+#include "ruby/util.h"
+#include "builtin.h"
+#ifndef AT_FDCWD
+# define AT_FDCWD -1
+#endif
+
+#define vm_initialized rb_cThread
+
+/* define system APIs */
+#ifdef _WIN32
+# undef chdir
+# define chdir(p) rb_w32_uchdir(p)
+# undef mkdir
+# define mkdir(p, m) rb_w32_umkdir((p), (m))
+# undef rmdir
+# define rmdir(p) rb_w32_urmdir(p)
+# undef opendir
+# define opendir(p) rb_w32_uopendir(p)
+# define ruby_getcwd() rb_w32_ugetcwd(NULL, 0)
+# define IS_WIN32 1
+#else
+# define IS_WIN32 0
+#endif
+
+#if NORMALIZE_UTF8PATH
# if defined HAVE_FGETATTRLIST || !defined HAVE_GETATTRLIST
# define need_normalization(dirp, path) need_normalization(dirp)
# else
@@ -149,12 +160,12 @@ need_normalization(DIR *dirp, const char *path)
int ret = getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0);
# endif
if (!ret) {
- const fsobj_tag_t *tag = (void *)(attrbuf+1);
- switch (*tag) {
- case VT_HFS:
- case VT_CIFS:
- return TRUE;
- }
+ const fsobj_tag_t *tag = (void *)(attrbuf+1);
+ switch (*tag) {
+ case VT_HFS:
+ case VT_CIFS:
+ return TRUE;
+ }
}
# endif
return FALSE;
@@ -164,9 +175,9 @@ static inline int
has_nonascii(const char *ptr, size_t len)
{
while (len > 0) {
- if (!ISASCII(*ptr)) return 1;
- ptr++;
- --len;
+ if (!ISASCII(*ptr)) return 1;
+ ptr++;
+ --len;
}
return 0;
}
@@ -176,12 +187,18 @@ has_nonascii(const char *ptr, size_t len)
# define IF_NORMALIZE_UTF8PATH(something) /* nothing */
#endif
-#ifndef IFTODT
+#if defined(IFTODT) && defined(DT_UNKNOWN)
+# define EMULATE_IFTODT 0
+#else
+# define EMULATE_IFTODT 1
+#endif
+
+#if EMULATE_IFTODT
# define IFTODT(m) (((m) & S_IFMT) / ((~S_IFMT & (S_IFMT-1)) + 1))
#endif
typedef enum {
-#ifdef DT_UNKNOWN
+#if !EMULATE_IFTODT
path_exist = DT_UNKNOWN,
path_directory = DT_DIR,
path_regular = DT_REG,
@@ -206,11 +223,13 @@ typedef enum {
#else
#define FNM_SYSCASE 0
#endif
-#if _WIN32
+#ifdef _WIN32
#define FNM_SHORTNAME 0x20
#else
#define FNM_SHORTNAME 0
#endif
+#define FNM_GLOB_NOSORT 0x40
+#define FNM_GLOB_SKIPDOT 0x80
#define FNM_NOMATCH 1
#define FNM_ERROR 2
@@ -235,53 +254,53 @@ bracket(
if (p >= pend) return NULL;
if (*p == '!' || *p == '^') {
- not = 1;
- p++;
+ not = 1;
+ p++;
}
while (*p != ']') {
- const char *t1 = p;
- if (escape && *t1 == '\\')
- t1++;
- if (!*t1)
- return NULL;
- p = t1 + (r = rb_enc_mbclen(t1, pend, enc));
- if (p >= pend) return NULL;
- if (p[0] == '-' && p[1] != ']') {
- const char *t2 = p + 1;
- int r2;
- if (escape && *t2 == '\\')
- t2++;
- if (!*t2)
- return NULL;
- p = t2 + (r2 = rb_enc_mbclen(t2, pend, enc));
- if (ok) continue;
- if ((r <= (send-s) && memcmp(t1, s, r) == 0) ||
- (r2 <= (send-s) && memcmp(t2, s, r2) == 0)) {
- ok = 1;
- continue;
- }
- c1 = rb_enc_codepoint(s, send, enc);
- if (nocase) c1 = rb_enc_toupper(c1, enc);
- c2 = rb_enc_codepoint(t1, pend, enc);
- if (nocase) c2 = rb_enc_toupper(c2, enc);
- if (c1 < c2) continue;
- c2 = rb_enc_codepoint(t2, pend, enc);
- if (nocase) c2 = rb_enc_toupper(c2, enc);
- if (c1 > c2) continue;
- }
- else {
- if (ok) continue;
- if (r <= (send-s) && memcmp(t1, s, r) == 0) {
- ok = 1;
- continue;
- }
- if (!nocase) continue;
- c1 = rb_enc_toupper(rb_enc_codepoint(s, send, enc), enc);
- c2 = rb_enc_toupper(rb_enc_codepoint(p, pend, enc), enc);
- if (c1 != c2) continue;
- }
- ok = 1;
+ const char *t1 = p;
+ if (escape && *t1 == '\\')
+ t1++;
+ if (!*t1)
+ return NULL;
+ p = t1 + (r = rb_enc_mbclen(t1, pend, enc));
+ if (p >= pend) return NULL;
+ if (p[0] == '-' && p[1] != ']') {
+ const char *t2 = p + 1;
+ int r2;
+ if (escape && *t2 == '\\')
+ t2++;
+ if (!*t2)
+ return NULL;
+ p = t2 + (r2 = rb_enc_mbclen(t2, pend, enc));
+ if (ok) continue;
+ if ((r <= (send-s) && memcmp(t1, s, r) == 0) ||
+ (r2 <= (send-s) && memcmp(t2, s, r2) == 0)) {
+ ok = 1;
+ continue;
+ }
+ c1 = rb_enc_codepoint(s, send, enc);
+ if (nocase) c1 = rb_enc_toupper(c1, enc);
+ c2 = rb_enc_codepoint(t1, pend, enc);
+ if (nocase) c2 = rb_enc_toupper(c2, enc);
+ if (c1 < c2) continue;
+ c2 = rb_enc_codepoint(t2, pend, enc);
+ if (nocase) c2 = rb_enc_toupper(c2, enc);
+ if (c1 > c2) continue;
+ }
+ else {
+ if (ok) continue;
+ if (r <= (send-s) && memcmp(t1, s, r) == 0) {
+ ok = 1;
+ continue;
+ }
+ if (!nocase) continue;
+ c1 = rb_enc_toupper(rb_enc_codepoint(s, send, enc), enc);
+ c2 = rb_enc_toupper(rb_enc_codepoint(p, pend, enc), enc);
+ if (c1 != c2) continue;
+ }
+ ok = 1;
}
return ok == not ? NULL : (char *)p + 1;
@@ -319,72 +338,72 @@ fnmatch_helper(
int r;
if (period && *s == '.' && *UNESCAPE(p) != '.') /* leading period */
- RETURN(FNM_NOMATCH);
+ RETURN(FNM_NOMATCH);
while (1) {
- switch (*p) {
- case '*':
- do { p++; } while (*p == '*');
- if (ISEND(UNESCAPE(p))) {
- p = UNESCAPE(p);
- RETURN(0);
- }
- if (ISEND(s))
- RETURN(FNM_NOMATCH);
- ptmp = p;
- stmp = s;
- continue;
-
- case '?':
- if (ISEND(s))
- RETURN(FNM_NOMATCH);
- p++;
- Inc(s, send, enc);
- continue;
-
- case '[': {
- const char *t;
- if (ISEND(s))
- RETURN(FNM_NOMATCH);
- if ((t = bracket(p + 1, pend, s, send, flags, enc)) != 0) {
- p = t;
- Inc(s, send, enc);
- continue;
- }
- goto failed;
- }
- }
-
- /* ordinary */
- p = UNESCAPE(p);
- if (ISEND(s))
- RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
- if (ISEND(p))
- goto failed;
- r = rb_enc_precise_mbclen(p, pend, enc);
- if (!MBCLEN_CHARFOUND_P(r))
- goto failed;
- if (r <= (send-s) && memcmp(p, s, r) == 0) {
- p += r;
- s += r;
- continue;
- }
- if (!nocase) goto failed;
- if (rb_enc_toupper(rb_enc_codepoint(p, pend, enc), enc) !=
- rb_enc_toupper(rb_enc_codepoint(s, send, enc), enc))
- goto failed;
- p += r;
- Inc(s, send, enc);
- continue;
+ switch (*p) {
+ case '*':
+ do { p++; } while (*p == '*');
+ if (ISEND(UNESCAPE(p))) {
+ p = UNESCAPE(p);
+ RETURN(0);
+ }
+ if (ISEND(s))
+ RETURN(FNM_NOMATCH);
+ ptmp = p;
+ stmp = s;
+ continue;
+
+ case '?':
+ if (ISEND(s))
+ RETURN(FNM_NOMATCH);
+ p++;
+ Inc(s, send, enc);
+ continue;
+
+ case '[': {
+ const char *t;
+ if (ISEND(s))
+ RETURN(FNM_NOMATCH);
+ if ((t = bracket(p + 1, pend, s, send, flags, enc)) != 0) {
+ p = t;
+ Inc(s, send, enc);
+ continue;
+ }
+ goto failed;
+ }
+ }
+
+ /* ordinary */
+ p = UNESCAPE(p);
+ if (ISEND(s))
+ RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
+ if (ISEND(p))
+ goto failed;
+ r = rb_enc_precise_mbclen(p, pend, enc);
+ if (!MBCLEN_CHARFOUND_P(r))
+ goto failed;
+ if (r <= (send-s) && memcmp(p, s, r) == 0) {
+ p += r;
+ s += r;
+ continue;
+ }
+ if (!nocase) goto failed;
+ if (rb_enc_toupper(rb_enc_codepoint(p, pend, enc), enc) !=
+ rb_enc_toupper(rb_enc_codepoint(s, send, enc), enc))
+ goto failed;
+ p += r;
+ Inc(s, send, enc);
+ continue;
failed: /* try next '*' position */
- if (ptmp && stmp) {
- p = ptmp;
- Inc(stmp, send, enc); /* !ISEND(*stmp) */
- s = stmp;
- continue;
- }
- RETURN(FNM_NOMATCH);
+ if (ptmp && stmp) {
+ p = ptmp;
+ Inc(stmp, send, enc); /* !ISEND(*stmp) */
+ s = stmp;
+ continue;
+ }
+ RETURN(FNM_NOMATCH);
}
}
@@ -405,37 +424,37 @@ fnmatch(
const char *stmp = 0;
if (pathname) {
- while (1) {
- if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
- do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
- ptmp = p;
- stmp = s;
- }
- if (fnmatch_helper(&p, &s, flags, enc) == 0) {
- while (*s && *s != '/') Inc(s, send, enc);
- if (*p && *s) {
- p++;
- s++;
- continue;
- }
- if (!*p && !*s)
- return 0;
- }
- /* failed : try next recursion */
- if (ptmp && stmp && !(period && *stmp == '.')) {
- while (*stmp && *stmp != '/') Inc(stmp, send, enc);
- if (*stmp) {
- p = ptmp;
- stmp++;
- s = stmp;
- continue;
- }
- }
- return FNM_NOMATCH;
- }
+ while (1) {
+ if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
+ do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
+ ptmp = p;
+ stmp = s;
+ }
+ if (fnmatch_helper(&p, &s, flags, enc) == 0) {
+ while (*s && *s != '/') Inc(s, send, enc);
+ if (*p && *s) {
+ p++;
+ s++;
+ continue;
+ }
+ if (!*p && !*s)
+ return 0;
+ }
+ /* failed : try next recursion */
+ if (ptmp && stmp && !(period && *stmp == '.')) {
+ while (*stmp && *stmp != '/') Inc(stmp, send, enc);
+ if (*stmp) {
+ p = ptmp;
+ stmp++;
+ s = stmp;
+ continue;
+ }
+ }
+ return FNM_NOMATCH;
+ }
}
else
- return fnmatch_helper(&p, &s, flags, enc);
+ return fnmatch_helper(&p, &s, flags, enc);
}
VALUE rb_cDir;
@@ -501,50 +520,23 @@ static DIR *
opendir_without_gvl(const char *path)
{
if (vm_initialized) {
- union { const void *in; void *out; } u;
+ union { const void *in; void *out; } u;
- u.in = path;
+ u.in = path;
- return rb_thread_call_without_gvl(nogvl_opendir, u.out, RUBY_UBF_IO, 0);
+ return rb_thread_call_without_gvl(nogvl_opendir, u.out, RUBY_UBF_IO, 0);
}
else
- return opendir(path);
+ return opendir(path);
}
-/*
- * call-seq:
- * Dir.new( string ) -> aDir
- * Dir.new( string, encoding: enc ) -> aDir
- *
- * Returns a new directory object for the named directory.
- *
- * The optional <i>encoding</i> keyword argument specifies the encoding of the directory.
- * If not specified, the filesystem encoding is used.
- */
static VALUE
-dir_initialize(int argc, VALUE *argv, VALUE dir)
+dir_initialize(rb_execution_context_t *ec, VALUE dir, VALUE dirname, VALUE enc)
{
struct dir_data *dp;
- rb_encoding *fsenc;
- VALUE dirname, opt, orig;
- static ID keyword_ids[1];
+ VALUE orig;
const char *path;
-
- if (!keyword_ids[0]) {
- keyword_ids[0] = rb_id_encoding();
- }
-
- fsenc = rb_filesystem_encoding();
-
- rb_scan_args(argc, argv, "1:", &dirname, &opt);
-
- if (!NIL_P(opt)) {
- VALUE enc;
- rb_get_kwargs(opt, keyword_ids, 0, 1, &enc);
- if (enc != Qundef && !NIL_P(enc)) {
- fsenc = rb_to_encoding(enc);
- }
- }
+ rb_encoding *fsenc = NIL_P(enc) ? rb_filesystem_encoding() : rb_to_encoding(enc);
FilePathValue(dirname);
orig = rb_str_dup_frozen(dirname);
@@ -559,58 +551,46 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
path = RSTRING_PTR(dirname);
dp->dir = opendir_without_gvl(path);
if (dp->dir == NULL) {
- int e = errno;
- if (rb_gc_for_fd(e)) {
- dp->dir = opendir_without_gvl(path);
- }
+ int e = errno;
+ if (rb_gc_for_fd(e)) {
+ dp->dir = opendir_without_gvl(path);
+ }
#ifdef HAVE_GETATTRLIST
- else if (e == EIO) {
- u_int32_t attrbuf[1];
- struct attrlist al = {ATTR_BIT_MAP_COUNT, 0};
- if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW) == 0) {
- dp->dir = opendir_without_gvl(path);
- }
- }
-#endif
- if (dp->dir == NULL) {
- RB_GC_GUARD(dirname);
- rb_syserr_fail_path(e, orig);
- }
+ else if (e == EIO) {
+ u_int32_t attrbuf[1];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0};
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW) == 0) {
+ dp->dir = opendir_without_gvl(path);
+ }
+ }
+#endif
+ if (dp->dir == NULL) {
+ RB_GC_GUARD(dirname);
+ rb_syserr_fail_path(e, orig);
+ }
}
RB_OBJ_WRITE(dir, &dp->path, orig);
return dir;
}
-/*
- * call-seq:
- * Dir.open( string ) -> aDir
- * Dir.open( string, encoding: enc ) -> aDir
- * Dir.open( string ) {| aDir | block } -> anObject
- * Dir.open( string, encoding: enc ) {| aDir | block } -> anObject
- *
- * The optional <i>encoding</i> keyword argument specifies the encoding of the directory.
- * If not specified, the filesystem encoding is used.
- *
- * With no block, <code>open</code> is a synonym for Dir::new. If a
- * block is present, it is passed <i>aDir</i> as a parameter. The
- * directory is closed at the end of the block, and Dir::open returns
- * the value of the block.
- */
static VALUE
-dir_s_open(int argc, VALUE *argv, VALUE klass)
+dir_s_open(rb_execution_context_t *ec, VALUE klass, VALUE dirname, VALUE enc)
{
struct dir_data *dp;
VALUE dir = TypedData_Make_Struct(klass, struct dir_data, &dir_data_type, dp);
- dir_initialize(argc, argv, dir);
- if (rb_block_given_p()) {
- return rb_ensure(rb_yield, dir, dir_close, dir);
- }
+ dir_initialize(ec, dir, dirname, enc);
return dir;
}
+static VALUE
+dir_s_close(rb_execution_context_t *ec, VALUE klass, VALUE dir)
+{
+ return dir_close(dir);
+}
+
NORETURN(static void dir_closed(void));
static void
@@ -650,12 +630,12 @@ dir_inspect(VALUE dir)
TypedData_Get_Struct(dir, struct dir_data, &dir_data_type, dirp);
if (!NIL_P(dirp->path)) {
- VALUE str = rb_str_new_cstr("#<");
- rb_str_append(str, rb_class_name(CLASS_OF(dir)));
- rb_str_cat2(str, ":");
- rb_str_append(str, dirp->path);
- rb_str_cat2(str, ">");
- return str;
+ VALUE str = rb_str_new_cstr("#<");
+ rb_str_append(str, rb_class_name(CLASS_OF(dir)));
+ rb_str_cat2(str, ":");
+ rb_str_append(str, dirp->path);
+ rb_str_cat2(str, ">");
+ return str;
}
return rb_funcallv(dir, idTo_s, 0, 0);
}
@@ -697,7 +677,7 @@ dir_fileno(VALUE dir)
GetDIR(dir, dirp);
fd = dirfd(dirp->dir);
if (fd == -1)
- rb_sys_fail("dirfd");
+ rb_sys_fail("dirfd");
return INT2NUM(fd);
}
#else
@@ -729,12 +709,12 @@ static int
fundamental_encoding_p(rb_encoding *enc)
{
switch (rb_enc_to_index(enc)) {
- case ENCINDEX_ASCII:
+ case ENCINDEX_ASCII_8BIT:
case ENCINDEX_US_ASCII:
case ENCINDEX_UTF_8:
- return TRUE;
+ return TRUE;
default:
- return FALSE;
+ return FALSE;
}
}
# define READDIR(dir, enc) rb_w32_readdir((dir), (enc))
@@ -751,11 +731,11 @@ to_be_skipped(const struct dirent *dp)
#ifdef HAVE_DIRENT_NAMLEN
switch (NAMLEN(dp)) {
case 2:
- if (name[1] != '.') return FALSE;
+ if (name[1] != '.') return FALSE;
case 1:
- return TRUE;
+ return TRUE;
default:
- break;
+ break;
}
#else
if (!name[1]) return TRUE;
@@ -786,12 +766,12 @@ dir_read(VALUE dir)
GetDIR(dir, dirp);
errno = 0;
if ((dp = READDIR(dirp->dir, dirp->enc)) != NULL) {
- return rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc);
+ return rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc);
}
else {
- int e = errno;
- if (e != 0) rb_syserr_fail(e, 0);
- return Qnil; /* end of stream */
+ int e = errno;
+ if (e != 0) rb_syserr_fail(e, 0);
+ return Qnil; /* end of stream */
}
}
@@ -841,23 +821,23 @@ dir_each_entry(VALUE dir, VALUE (*each)(VALUE, VALUE), VALUE arg, int children_o
rewinddir(dirp->dir);
IF_NORMALIZE_UTF8PATH(norm_p = need_normalization(dirp->dir, RSTRING_PTR(dirp->path)));
while ((dp = READDIR(dirp->dir, dirp->enc)) != NULL) {
- const char *name = dp->d_name;
- size_t namlen = NAMLEN(dp);
- VALUE path;
-
- if (children_only && name[0] == '.') {
- if (namlen == 1) continue; /* current directory */
- if (namlen == 2 && name[1] == '.') continue; /* parent directory */
- }
+ const char *name = dp->d_name;
+ size_t namlen = NAMLEN(dp);
+ VALUE path;
+
+ if (children_only && name[0] == '.') {
+ if (namlen == 1) continue; /* current directory */
+ if (namlen == 2 && name[1] == '.') continue; /* parent directory */
+ }
#if NORMALIZE_UTF8PATH
- if (norm_p && has_nonascii(name, namlen) &&
- !NIL_P(path = rb_str_normalize_ospath(name, namlen))) {
- path = rb_external_str_with_enc(path, dirp->enc);
- }
- else
+ if (norm_p && has_nonascii(name, namlen) &&
+ !NIL_P(path = rb_str_normalize_ospath(name, namlen))) {
+ path = rb_external_str_with_enc(path, dirp->enc);
+ }
+ else
#endif
- path = rb_external_str_new_with_enc(name, namlen, dirp->enc);
- (*each)(arg, path);
+ path = rb_external_str_new_with_enc(name, namlen, dirp->enc);
+ (*each)(arg, path);
}
return dir;
}
@@ -998,7 +978,7 @@ static void
dir_chdir(VALUE path)
{
if (chdir(RSTRING_PTR(path)) < 0)
- rb_sys_fail_path(path);
+ rb_sys_fail_path(path);
}
static int chdir_blocking = 0;
@@ -1016,8 +996,8 @@ chdir_yield(VALUE v)
dir_chdir(args->new_path);
args->done = TRUE;
chdir_blocking++;
- if (chdir_thread == Qnil)
- chdir_thread = rb_thread_current();
+ if (NIL_P(chdir_thread))
+ chdir_thread = rb_thread_current();
return rb_yield(args->new_path);
}
@@ -1026,10 +1006,10 @@ chdir_restore(VALUE v)
{
struct chdir_data *args = (void *)v;
if (args->done) {
- chdir_blocking--;
- if (chdir_blocking == 0)
- chdir_thread = Qnil;
- dir_chdir(args->old_path);
+ chdir_blocking--;
+ if (chdir_blocking == 0)
+ chdir_thread = Qnil;
+ dir_chdir(args->old_path);
}
return Qnil;
}
@@ -1052,7 +1032,8 @@ chdir_restore(VALUE v)
* block. <code>chdir</code> blocks can be nested, but in a
* multi-threaded program an error will be raised if a thread attempts
* to open a <code>chdir</code> block while another thread has one
- * open.
+ * open or a call to <code>chdir</code> without a block occurs inside
+ * a block passed to <code>chdir</code> (even in the same thread).
*
* Dir.chdir("/var/spool/mail")
* puts Dir.pwd
@@ -1082,33 +1063,35 @@ dir_s_chdir(int argc, VALUE *argv, VALUE obj)
path = rb_str_encode_ospath(rb_get_path(argv[0]));
}
else {
- const char *dist = getenv("HOME");
- if (!dist) {
- dist = getenv("LOGDIR");
- if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set");
- }
- path = rb_str_new2(dist);
+ const char *dist = getenv("HOME");
+ if (!dist) {
+ dist = getenv("LOGDIR");
+ if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set");
+ }
+ path = rb_str_new2(dist);
}
if (chdir_blocking > 0) {
- if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
- rb_warn("conflicting chdir during another chdir block");
+ if (rb_thread_current() != chdir_thread)
+ rb_raise(rb_eRuntimeError, "conflicting chdir during another chdir block");
+ if (!rb_block_given_p())
+ rb_warn("conflicting chdir during another chdir block");
}
if (rb_block_given_p()) {
- struct chdir_data args;
+ struct chdir_data args;
- args.old_path = rb_str_encode_ospath(rb_dir_getwd());
- args.new_path = path;
- args.done = FALSE;
- return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
+ args.old_path = rb_str_encode_ospath(rb_dir_getwd());
+ args.new_path = path;
+ args.done = FALSE;
+ return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
}
else {
- char *p = RSTRING_PTR(path);
- int r = (int)(VALUE)rb_thread_call_without_gvl(nogvl_chdir, p,
- RUBY_UBF_IO, 0);
- if (r < 0)
- rb_sys_fail_path(path);
+ char *p = RSTRING_PTR(path);
+ int r = (int)(VALUE)rb_thread_call_without_gvl(nogvl_chdir, p,
+ RUBY_UBF_IO, 0);
+ if (r < 0)
+ rb_sys_fail_path(path);
}
return INT2FIX(0);
@@ -1148,12 +1131,12 @@ rb_dir_getwd(void)
switch (fsenc) {
case ENCINDEX_US_ASCII:
- fsenc = ENCINDEX_ASCII;
- case ENCINDEX_ASCII:
- break;
+ fsenc = ENCINDEX_ASCII_8BIT;
+ case ENCINDEX_ASCII_8BIT:
+ break;
#if defined _WIN32 || defined __APPLE__
default:
- return rb_str_conv_enc(cwd, NULL, fs);
+ return rb_str_conv_enc(cwd, NULL, fs);
#endif
}
return rb_enc_associate_index(cwd, fsenc);
@@ -1191,8 +1174,8 @@ check_dirname(VALUE dir)
pend = path + len;
pend = rb_enc_path_end(rb_enc_path_skip_prefix(path, pend, enc), pend, enc);
if (pend - path < len) {
- d = rb_str_subseq(d, 0, pend - path);
- StringValueCStr(d);
+ d = rb_str_subseq(d, 0, pend - path);
+ StringValueCStr(d);
}
return rb_str_encode_ospath(d);
}
@@ -1212,7 +1195,7 @@ dir_s_chroot(VALUE dir, VALUE path)
{
path = check_dirname(path);
if (chroot(RSTRING_PTR(path)) == -1)
- rb_sys_fail_path(path);
+ rb_sys_fail_path(path);
return INT2FIX(0);
}
@@ -1255,17 +1238,17 @@ dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
int r;
if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
- m.mode = NUM2MODET(vmode);
+ m.mode = NUM2MODET(vmode);
}
else {
- m.mode = 0777;
+ m.mode = 0777;
}
path = check_dirname(path);
m.path = RSTRING_PTR(path);
r = (int)(VALUE)rb_thread_call_without_gvl(nogvl_mkdir, &m, RUBY_UBF_IO, 0);
if (r < 0)
- rb_sys_fail_path(path);
+ rb_sys_fail_path(path);
return INT2FIX(0);
}
@@ -1297,7 +1280,7 @@ dir_s_rmdir(VALUE obj, VALUE dir)
p = RSTRING_PTR(dir);
r = (int)(VALUE)rb_thread_call_without_gvl(nogvl_rmdir, (void *)p, RUBY_UBF_IO, 0);
if (r < 0)
- rb_sys_fail_path(dir);
+ rb_sys_fail_path(dir);
return INT2FIX(0);
}
@@ -1342,21 +1325,34 @@ sys_enc_warning_in(const char *func, const char *mesg, rb_encoding *enc)
#define sys_warning(val, enc) \
((flags & GLOB_VERBOSE) ? sys_enc_warning_in(RUBY_FUNCTION_NAME_STRING, (val), (enc)) :(void)0)
-static inline void *
-glob_alloc_n(size_t x, size_t y)
+static inline size_t
+glob_alloc_size(size_t x, size_t y)
{
size_t z;
if (rb_mul_size_overflow(x, y, SSIZE_MAX, &z)) {
rb_memerror(); /* or...? */
}
else {
- return malloc(z);
+ return z;
}
}
+static inline void *
+glob_alloc_n(size_t x, size_t y)
+{
+ return malloc(glob_alloc_size(x, y));
+}
+
+static inline void *
+glob_realloc_n(void *p, size_t x, size_t y)
+{
+ return realloc(p, glob_alloc_size(x, y));
+}
+
#define GLOB_ALLOC(type) ((type *)malloc(sizeof(type)))
#define GLOB_ALLOC_N(type, n) ((type *)glob_alloc_n(sizeof(type), n))
#define GLOB_REALLOC(ptr, size) realloc((ptr), (size))
+#define GLOB_REALLOC_N(ptr, n) glob_realloc_n(ptr, sizeof(*(ptr)), n)
#define GLOB_FREE(ptr) free(ptr)
#define GLOB_JUMP_TAG(status) (((status) == -1) ? rb_memerror() : rb_jump_tag(status))
@@ -1390,8 +1386,8 @@ at_subpath(int fd, size_t baselen, const char *path)
{
#if USE_OPENDIR_AT
if (fd != (int)AT_FDCWD && baselen > 0) {
- path += baselen;
- if (*path == '/') ++path;
+ path += baselen;
+ if (*path == '/') ++path;
}
#endif
return *path ? path : ".";
@@ -1407,7 +1403,7 @@ do_stat(int fd, size_t baselen, const char *path, struct stat *pst, int flags, r
int ret = STAT(path, pst);
#endif
if (ret < 0 && !to_be_ignored(errno))
- sys_warning(path, enc);
+ sys_warning(path, enc);
return ret;
}
@@ -1422,7 +1418,7 @@ do_lstat(int fd, size_t baselen, const char *path, struct stat *pst, int flags,
int ret = lstat(path, pst);
#endif
if (ret < 0 && !to_be_ignored(errno))
- sys_warning(path, enc);
+ sys_warning(path, enc);
return ret;
}
@@ -1440,16 +1436,16 @@ with_gvl_gc_for_fd(void *ptr)
{
int *e = ptr;
- return (void *)(rb_gc_for_fd(*e) ? Qtrue : Qfalse);
+ return (void *)RBOOL(rb_gc_for_fd(*e));
}
static int
gc_for_fd_with_gvl(int e)
{
if (vm_initialized)
- return (int)(VALUE)rb_thread_call_with_gvl(with_gvl_gc_for_fd, &e);
+ return (int)(VALUE)rb_thread_call_with_gvl(with_gvl_gc_for_fd, &e);
else
- return rb_gc_for_fd(e) ? Qtrue : Qfalse;
+ return RBOOL(rb_gc_for_fd(e));
}
static void *
@@ -1461,32 +1457,32 @@ nogvl_opendir_at(void *ptr)
#if USE_OPENDIR_AT
const int opendir_flags = (O_RDONLY|O_CLOEXEC|
# ifdef O_DIRECTORY
- O_DIRECTORY|
+ O_DIRECTORY|
# endif /* O_DIRECTORY */
- 0);
+ 0);
int fd = openat(oaa->basefd, oaa->path, opendir_flags);
dirp = fd >= 0 ? fdopendir(fd) : 0;
if (!dirp) {
- int e = errno;
-
- switch (gc_for_fd_with_gvl(e)) {
- default:
- if (fd < 0) fd = openat(oaa->basefd, oaa->path, opendir_flags);
- if (fd >= 0) dirp = fdopendir(fd);
- if (dirp) return dirp;
-
- e = errno;
- /* fallthrough*/
- case 0:
- if (fd >= 0) close(fd);
- errno = e;
- }
+ int e = errno;
+
+ switch (gc_for_fd_with_gvl(e)) {
+ default:
+ if (fd < 0) fd = openat(oaa->basefd, oaa->path, opendir_flags);
+ if (fd >= 0) dirp = fdopendir(fd);
+ if (dirp) return dirp;
+
+ e = errno;
+ /* fallthrough*/
+ case 0:
+ if (fd >= 0) close(fd);
+ errno = e;
+ }
}
#else /* !USE_OPENDIR_AT */
dirp = opendir(oaa->path);
if (!dirp && gc_for_fd_with_gvl(errno))
- dirp = opendir(oaa->path);
+ dirp = opendir(oaa->path);
#endif /* !USE_OPENDIR_AT */
return dirp;
@@ -1501,37 +1497,37 @@ opendir_at(int basefd, const char *path)
oaa.path = path;
if (vm_initialized)
- return rb_thread_call_without_gvl(nogvl_opendir_at, &oaa, RUBY_UBF_IO, 0);
+ return rb_thread_call_without_gvl(nogvl_opendir_at, &oaa, RUBY_UBF_IO, 0);
else
- return nogvl_opendir_at(&oaa);
+ return nogvl_opendir_at(&oaa);
}
static DIR *
do_opendir(const int basefd, size_t baselen, const char *path, int flags, rb_encoding *enc,
- ruby_glob_errfunc *errfunc, VALUE arg, int *status)
+ ruby_glob_errfunc *errfunc, VALUE arg, int *status)
{
DIR *dirp;
#ifdef _WIN32
VALUE tmp = 0;
if (!fundamental_encoding_p(enc)) {
- tmp = rb_enc_str_new(path, strlen(path), enc);
- tmp = rb_str_encode_ospath(tmp);
- path = RSTRING_PTR(tmp);
+ tmp = rb_enc_str_new(path, strlen(path), enc);
+ tmp = rb_str_encode_ospath(tmp);
+ path = RSTRING_PTR(tmp);
}
#endif
dirp = opendir_at(basefd, at_subpath(basefd, baselen, path));
if (!dirp) {
- int e = errno;
-
- *status = 0;
- if (!to_be_ignored(e)) {
- if (errfunc) {
- *status = (*errfunc)(path, arg, enc, e);
- }
- else {
- sys_warning(path, enc);
- }
- }
+ int e = errno;
+
+ *status = 0;
+ if (!to_be_ignored(e)) {
+ if (errfunc) {
+ *status = (*errfunc)(path, arg, enc, e);
+ }
+ else {
+ sys_warning(path, enc);
+ }
+ }
}
#ifdef _WIN32
if (tmp) rb_str_resize(tmp, 0); /* GC guard */
@@ -1554,37 +1550,37 @@ has_magic(const char *p, const char *pend, int flags, rb_encoding *enc)
register char c;
while (p < pend && (c = *p++) != 0) {
- switch (c) {
- case '{':
- return BRACE;
+ switch (c) {
+ case '{':
+ return BRACE;
- case '*':
- case '?':
- case '[':
- hasmagical = 1;
- break;
+ case '*':
+ case '?':
+ case '[':
+ hasmagical = 1;
+ break;
- case '\\':
- if (escape && p++ >= pend)
- continue;
- break;
+ case '\\':
+ if (escape && p++ >= pend)
+ continue;
+ break;
#ifdef _WIN32
- case '.':
- break;
+ case '.':
+ break;
- case '~':
- hasalpha = 1;
- break;
+ case '~':
+ hasalpha = 1;
+ break;
#endif
- default:
- if (IS_WIN32 || ISALPHA(c)) {
- hasalpha = 1;
- }
- break;
- }
+ default:
+ if (IS_WIN32 || ISALPHA(c)) {
+ hasalpha = 1;
+ }
+ break;
+ }
- p = Next(p-1, pend, enc);
+ p = Next(p-1, pend, enc);
}
return hasmagical ? MAGICAL : hasalpha ? ALPHA : PLAIN;
@@ -1600,33 +1596,33 @@ find_dirsep(const char *p, const char *pend, int flags, rb_encoding *enc)
int open = 0;
while ((c = *p++) != 0) {
- switch (c) {
- case '[':
- open = 1;
- continue;
- case ']':
- open = 0;
- continue;
-
- case '{':
- open = 1;
- continue;
- case '}':
- open = 0;
- continue;
-
- case '/':
- if (!open)
- return (char *)p-1;
- continue;
-
- case '\\':
- if (escape && !(c = *p++))
- return (char *)p-1;
- continue;
- }
-
- p = Next(p-1, pend, enc);
+ switch (c) {
+ case '[':
+ open = 1;
+ continue;
+ case ']':
+ open = 0;
+ continue;
+
+ case '{':
+ open = 1;
+ continue;
+ case '}':
+ open = 0;
+ continue;
+
+ case '/':
+ if (!open)
+ return (char *)p-1;
+ continue;
+
+ case '\\':
+ if (escape && !(c = *p++))
+ return (char *)p-1;
+ continue;
+ }
+
+ p = Next(p-1, pend, enc);
}
return (char *)p-1;
@@ -1640,20 +1636,20 @@ remove_backslashes(char *p, register const char *pend, rb_encoding *enc)
char *s = p;
while (*p) {
- if (*p == '\\') {
- if (t != s)
- memmove(t, s, p - s);
- t += p - s;
- s = ++p;
- if (!*p) break;
- }
- Inc(p, pend, enc);
+ if (*p == '\\') {
+ if (t != s)
+ memmove(t, s, p - s);
+ t += p - s;
+ s = ++p;
+ if (!*p) break;
+ }
+ Inc(p, pend, enc);
}
while (*p++);
if (t != s)
- memmove(t, s, p - s); /* move '\0' too */
+ memmove(t, s, p - s); /* move '\0' too */
return p;
}
@@ -1674,57 +1670,54 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
int recursive = 0;
while (p < e && *p) {
- tmp = GLOB_ALLOC(struct glob_pattern);
- if (!tmp) goto error;
- if (p + 2 < e && p[0] == '*' && p[1] == '*' && p[2] == '/') {
- /* fold continuous RECURSIVEs (needed in glob_helper) */
- do { p += 3; while (*p == '/') p++; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
- tmp->type = RECURSIVE;
- tmp->str = 0;
- dirsep = 1;
- recursive = 1;
- }
- else {
- const char *m = find_dirsep(p, e, flags, enc);
- const enum glob_pattern_type magic = has_magic(p, m, flags, enc);
- const enum glob_pattern_type non_magic = (USE_NAME_ON_FS || FNM_SYSCASE) ? PLAIN : ALPHA;
- char *buf;
-
- if (!(FNM_SYSCASE || magic > non_magic) && !recursive && *m) {
- const char *m2;
- while (has_magic(m+1, m2 = find_dirsep(m+1, e, flags, enc), flags, enc) <= non_magic &&
- *m2) {
- m = m2;
- }
- }
- buf = GLOB_ALLOC_N(char, m-p+1);
- if (!buf) {
- GLOB_FREE(tmp);
- goto error;
- }
- memcpy(buf, p, m-p);
- buf[m-p] = '\0';
- tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
- tmp->str = buf;
- if (*m) {
- dirsep = 1;
- p = m + 1;
- }
- else {
- dirsep = 0;
- p = m;
- }
- }
- *tail = tmp;
- tail = &tmp->next;
+ tmp = GLOB_ALLOC(struct glob_pattern);
+ if (!tmp) goto error;
+ if (p + 2 < e && p[0] == '*' && p[1] == '*' && p[2] == '/') {
+ /* fold continuous RECURSIVEs (needed in glob_helper) */
+ do { p += 3; while (*p == '/') p++; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
+ tmp->type = RECURSIVE;
+ tmp->str = 0;
+ dirsep = 1;
+ recursive = 1;
+ }
+ else {
+ const char *m = find_dirsep(p, e, flags, enc);
+ const enum glob_pattern_type magic = has_magic(p, m, flags, enc);
+ const enum glob_pattern_type non_magic = (USE_NAME_ON_FS || FNM_SYSCASE) ? PLAIN : ALPHA;
+ char *buf;
+
+ if (!(FNM_SYSCASE || magic > non_magic) && !recursive && *m) {
+ const char *m2;
+ while (has_magic(m+1, m2 = find_dirsep(m+1, e, flags, enc), flags, enc) <= non_magic &&
+ *m2) {
+ m = m2;
+ }
+ }
+ buf = GLOB_ALLOC_N(char, m-p+1);
+ if (!buf) {
+ GLOB_FREE(tmp);
+ goto error;
+ }
+ memcpy(buf, p, m-p);
+ buf[m-p] = '\0';
+ tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
+ tmp->str = buf;
+ if (*m) {
+ dirsep = 1;
+ p = m + 1;
+ }
+ else {
+ dirsep = 0;
+ p = m;
+ }
+ }
+ *tail = tmp;
+ tail = &tmp->next;
}
tmp = GLOB_ALLOC(struct glob_pattern);
if (!tmp) {
- error:
- *tail = 0;
- glob_free_pattern(list);
- return 0;
+ goto error;
}
tmp->type = dirsep ? MATCH_DIR : MATCH_ALL;
tmp->str = 0;
@@ -1732,17 +1725,22 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
tmp->next = 0;
return list;
+
+ error:
+ *tail = 0;
+ glob_free_pattern(list);
+ return 0;
}
static void
glob_free_pattern(struct glob_pattern *list)
{
while (list) {
- struct glob_pattern *tmp = list;
- list = list->next;
- if (tmp->str)
- GLOB_FREE(tmp->str);
- GLOB_FREE(tmp);
+ struct glob_pattern *tmp = list;
+ list = list->next;
+ if (tmp->str)
+ GLOB_FREE(tmp->str);
+ GLOB_FREE(tmp);
}
}
@@ -1754,7 +1752,7 @@ join_path(const char *path, size_t len, int dirsep, const char *name, size_t nam
if (!buf) return 0;
memcpy(buf, path, len);
if (dirsep) {
- buf[len++] = '/';
+ buf[len++] = '/';
}
memcpy(buf+len, name, namlen);
buf[len+namlen] = '\0';
@@ -1771,8 +1769,8 @@ static int
is_case_sensitive(DIR *dirp, const char *path)
{
struct {
- u_int32_t length;
- vol_capabilities_attr_t cap[1];
+ u_int32_t length;
+ vol_capabilities_attr_t cap[1];
} __attribute__((aligned(4), packed)) attrbuf[1];
struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, 0, ATTR_VOL_INFO|ATTR_VOL_CAPABILITIES};
const vol_capabilities_attr_t *const cap = attrbuf[0].cap;
@@ -1781,13 +1779,13 @@ is_case_sensitive(DIR *dirp, const char *path)
# if defined HAVE_FGETATTRLIST
if (fgetattrlist(dirfd(dirp), &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
- return -1;
+ return -1;
# else
if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))
- return -1;
+ return -1;
# endif
if (!(cap->valid[idx] & mask))
- return -1;
+ return -1;
return (cap->capabilities[idx] & mask) != 0;
}
@@ -1795,10 +1793,10 @@ static char *
replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int flags, rb_pathtype_t *type)
{
struct {
- u_int32_t length;
- attrreference_t ref[1];
- fsobj_type_t objtype;
- char path[MAXPATHLEN * 3];
+ u_int32_t length;
+ attrreference_t ref[1];
+ fsobj_type_t objtype;
+ char path[MAXPATHLEN * 3];
} __attribute__((aligned(4), packed)) attrbuf[1];
struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_NAME|ATTR_CMN_OBJTYPE};
const attrreference_t *const ar = attrbuf[0].ref;
@@ -1809,9 +1807,9 @@ replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int f
*type = path_noent;
if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW)) {
- if (!to_be_ignored(errno))
- sys_warning(path, enc);
- return path;
+ if (!to_be_ignored(errno))
+ sys_warning(path, enc);
+ return path;
}
switch (attrbuf[0].objtype) {
@@ -1823,21 +1821,21 @@ replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int f
name = (char *)ar + ar->attr_dataoffset;
len = (long)ar->attr_length - 1;
if (name + len > (char *)attrbuf + sizeof(attrbuf))
- return path;
+ return path;
# if NORMALIZE_UTF8PATH
if (norm_p && has_nonascii(name, len)) {
- if (!NIL_P(utf8str = rb_str_normalize_ospath(name, len))) {
- RSTRING_GETMEM(utf8str, name, len);
- }
+ if (!NIL_P(utf8str = rb_str_normalize_ospath(name, len))) {
+ RSTRING_GETMEM(utf8str, name, len);
+ }
}
# endif
tmp = GLOB_REALLOC(path, base + len + 1);
if (tmp) {
- path = tmp;
- memcpy(path + base, name, len);
- path[base + len] = '\0';
+ path = tmp;
+ memcpy(path + base, name, len);
+ path[base + len] = '\0';
}
IF_NORMALIZE_UTF8PATH(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
return path;
@@ -1858,62 +1856,62 @@ replace_real_basename(char *path, long base, rb_encoding *enc, int norm_p, int f
long wlen;
int e = 0;
if (!fundamental_encoding_p(enc)) {
- tmp = rb_enc_str_new_cstr(plainname, enc);
- tmp = rb_str_encode_ospath(tmp);
- plainname = RSTRING_PTR(tmp);
+ tmp = rb_enc_str_new_cstr(plainname, enc);
+ tmp = rb_str_encode_ospath(tmp);
+ plainname = RSTRING_PTR(tmp);
}
wplain = rb_w32_mbstr_to_wstr(CP_UTF8, plainname, -1, &wlen);
if (tmp) rb_str_resize(tmp, 0);
if (!wplain) return path;
if (GetFileAttributesExW(wplain, GetFileExInfoStandard, &fa)) {
- h = FindFirstFileW(wplain, &fd);
- e = rb_w32_map_errno(GetLastError());
+ h = FindFirstFileW(wplain, &fd);
+ e = rb_w32_map_errno(GetLastError());
}
if (fa.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
- if (!rb_w32_reparse_symlink_p(wplain))
- fa.dwFileAttributes &= ~FILE_ATTRIBUTE_REPARSE_POINT;
+ if (!rb_w32_reparse_symlink_p(wplain))
+ fa.dwFileAttributes &= ~FILE_ATTRIBUTE_REPARSE_POINT;
}
free(wplain);
if (h == INVALID_HANDLE_VALUE) {
- *type = path_noent;
- if (e && !to_be_ignored(e)) {
- errno = e;
- sys_warning(path, enc);
- }
- return path;
+ *type = path_noent;
+ if (e && !to_be_ignored(e)) {
+ errno = e;
+ sys_warning(path, enc);
+ }
+ return path;
}
FindClose(h);
*type =
- (fa.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ? path_symlink :
- (fa.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? path_directory :
- path_regular;
+ (fa.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ? path_symlink :
+ (fa.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? path_directory :
+ path_regular;
if (tmp) {
- char *buf;
- tmp = rb_w32_conv_from_wchar(fd.cFileName, enc);
- wlen = RSTRING_LEN(tmp);
- buf = GLOB_REALLOC(path, base + wlen + 1);
- if (buf) {
- path = buf;
- memcpy(path + base, RSTRING_PTR(tmp), wlen);
- path[base + wlen] = 0;
- }
- rb_str_resize(tmp, 0);
+ char *buf;
+ tmp = rb_w32_conv_from_wchar(fd.cFileName, enc);
+ wlen = RSTRING_LEN(tmp);
+ buf = GLOB_REALLOC(path, base + wlen + 1);
+ if (buf) {
+ path = buf;
+ memcpy(path + base, RSTRING_PTR(tmp), wlen);
+ path[base + wlen] = 0;
+ }
+ rb_str_resize(tmp, 0);
}
else {
- char *utf8filename;
- wlen = WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, NULL, 0, NULL, NULL);
- utf8filename = GLOB_REALLOC(0, wlen);
- if (utf8filename) {
- char *buf;
- WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, utf8filename, wlen, NULL, NULL);
- buf = GLOB_REALLOC(path, base + wlen + 1);
- if (buf) {
- path = buf;
- memcpy(path + base, utf8filename, wlen);
- path[base + wlen] = 0;
- }
- GLOB_FREE(utf8filename);
- }
+ char *utf8filename;
+ wlen = WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, NULL, 0, NULL, NULL);
+ utf8filename = GLOB_REALLOC(0, wlen);
+ if (utf8filename) {
+ char *buf;
+ WideCharToMultiByte(CP_UTF8, 0, fd.cFileName, -1, utf8filename, wlen, NULL, NULL);
+ buf = GLOB_REALLOC(path, base + wlen + 1);
+ if (buf) {
+ path = buf;
+ memcpy(path + base, utf8filename, wlen);
+ path[base + wlen] = 0;
+ }
+ GLOB_FREE(utf8filename);
+ }
}
return path;
}
@@ -1982,13 +1980,15 @@ rb_glob_warning(const char *path, VALUE a, const void *enc, int error)
}
#endif
+NORETURN(static VALUE glob_func_error(VALUE val));
+
static VALUE
glob_func_error(VALUE val)
{
struct glob_error_args *arg = (struct glob_error_args *)val;
VALUE path = rb_enc_str_new_cstr(arg->path, arg->enc);
rb_syserr_fail_str(arg->error, path);
- return Qnil;
+ UNREACHABLE_RETURN(Qnil);
}
static int
@@ -1998,8 +1998,12 @@ rb_glob_error(const char *path, VALUE a, const void *enc, int error)
struct glob_error_args args;
VALUE (*errfunc)(VALUE) = glob_func_error;
- if (error == EACCES) {
- errfunc = glob_func_warning;
+ switch (error) {
+ case EACCES:
+#ifdef ENOTCAPABLE
+ case ENOTCAPABLE:
+#endif
+ errfunc = glob_func_warning;
}
args.path = path;
args.enc = enc;
@@ -2008,13 +2012,22 @@ rb_glob_error(const char *path, VALUE a, const void *enc, int error)
return status;
}
+typedef struct rb_dirent {
+ long d_namlen;
+ const char *d_name;
+#ifdef _WIN32
+ const char *d_altname;
+#endif
+ uint8_t d_type;
+} rb_dirent_t;
+
static inline int
-dirent_match(const char *pat, rb_encoding *enc, const char *name, const struct dirent *dp, int flags)
+dirent_match(const char *pat, rb_encoding *enc, const char *name, const rb_dirent_t *dp, int flags)
{
if (fnmatch(pat, enc, name, flags) == 0) return 1;
#ifdef _WIN32
if (dp->d_altname && (flags & FNM_SHORTNAME)) {
- if (fnmatch(pat, enc, dp->d_altname, flags) == 0) return 1;
+ if (fnmatch(pat, enc, dp->d_altname, flags) == 0) return 1;
}
#endif
return 0;
@@ -2034,7 +2047,7 @@ struct push_glob_args {
struct dirent_brace_args {
const char *name;
- const struct dirent *dp;
+ const rb_dirent_t *dp;
int flags;
};
@@ -2055,39 +2068,39 @@ join_path_from_pattern(struct glob_pattern **beg)
size_t path_len = 0;
for (p = *beg; p; p = p->next) {
- const char *str;
- switch (p->type) {
- case RECURSIVE:
- str = "**";
- break;
- case MATCH_DIR:
- /* append last slash */
- str = "";
- break;
- default:
- str = p->str;
- if (!str) continue;
- }
- if (!path) {
- path_len = strlen(str);
- path = GLOB_ALLOC_N(char, path_len + 1);
+ const char *str;
+ switch (p->type) {
+ case RECURSIVE:
+ str = "**";
+ break;
+ case MATCH_DIR:
+ /* append last slash */
+ str = "";
+ break;
+ default:
+ str = p->str;
+ if (!str) continue;
+ }
+ if (!path) {
+ path_len = strlen(str);
+ path = GLOB_ALLOC_N(char, path_len + 1);
if (path) {
memcpy(path, str, path_len);
path[path_len] = '\0';
}
}
else {
- size_t len = strlen(str);
- char *tmp;
- tmp = GLOB_REALLOC(path, path_len + len + 2);
- if (tmp) {
- path = tmp;
- path[path_len++] = '/';
- memcpy(path + path_len, str, len);
- path_len += len;
- path[path_len] = '\0';
- }
- }
+ size_t len = strlen(str);
+ char *tmp;
+ tmp = GLOB_REALLOC(path, path_len + len + 2);
+ if (tmp) {
+ path = tmp;
+ path[path_len++] = '/';
+ memcpy(path + path_len, str, len);
+ path_len += len;
+ path[path_len] = '\0';
+ }
+ }
}
return path;
}
@@ -2095,7 +2108,160 @@ join_path_from_pattern(struct glob_pattern **beg)
static int push_caller(const char *path, VALUE val, void *enc);
static int ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
- rb_encoding *enc, VALUE var);
+ rb_encoding *enc, VALUE var);
+
+static const size_t rb_dirent_name_offset =
+ offsetof(rb_dirent_t, d_type) + sizeof(uint8_t);
+
+static rb_dirent_t *
+dirent_copy(const struct dirent *dp, rb_dirent_t *rdp)
+{
+ if (!dp) return NULL;
+ size_t namlen = NAMLEN(dp);
+ const size_t altlen =
+#ifdef _WIN32
+ dp->d_altlen ? dp->d_altlen + 1 :
+#endif
+ 0;
+ rb_dirent_t *newrdp = rdp;
+ if (!rdp && !(newrdp = malloc(rb_dirent_name_offset + namlen + 1 + altlen)))
+ return NULL;
+ newrdp->d_namlen = namlen;
+ if (!rdp) {
+ char *name = (char *)newrdp + rb_dirent_name_offset;
+ memcpy(name, dp->d_name, namlen);
+ name[namlen] = '\0';
+#ifdef _WIN32
+ newrdp->d_altname = NULL;
+ if (altlen) {
+ char *const altname = name + namlen + 1;
+ memcpy(altname, dp->d_altname, altlen - 1);
+ altname[altlen - 1] = '\0';
+ newrdp->d_altname = altname;
+ }
+#endif
+ newrdp->d_name = name;
+ }
+ else {
+ newrdp->d_name = dp->d_name;
+#ifdef _WIN32
+ newrdp->d_altname = dp->d_altname;
+#endif
+ }
+#if !EMULATE_IFTODT
+ newrdp->d_type = dp->d_type;
+#else
+ newrdp->d_type = 0;
+#endif
+ return newrdp;
+}
+
+typedef union {
+ struct {
+ DIR *dirp;
+ rb_dirent_t ent;
+ } nosort;
+ struct {
+ size_t count, idx;
+ rb_dirent_t **entries;
+ } sort;
+} ruby_glob_entries_t;
+
+static int
+glob_sort_cmp(const void *a, const void *b, void *e)
+{
+ const rb_dirent_t *ent1 = *(void **)a;
+ const rb_dirent_t *ent2 = *(void **)b;
+ return strcmp(ent1->d_name, ent2->d_name);
+}
+
+static void
+glob_dir_finish(ruby_glob_entries_t *ent, int flags)
+{
+ if (flags & FNM_GLOB_NOSORT) {
+ closedir(ent->nosort.dirp);
+ ent->nosort.dirp = NULL;
+ }
+ else if (ent->sort.entries) {
+ for (size_t i = 0, count = ent->sort.count; i < count;) {
+ GLOB_FREE(ent->sort.entries[i++]);
+ }
+ GLOB_FREE(ent->sort.entries);
+ ent->sort.entries = NULL;
+ ent->sort.count = ent->sort.idx = 0;
+ }
+}
+
+static ruby_glob_entries_t *
+glob_opendir(ruby_glob_entries_t *ent, DIR *dirp, int flags, rb_encoding *enc)
+{
+ MEMZERO(ent, ruby_glob_entries_t, 1);
+ if (flags & FNM_GLOB_NOSORT) {
+ ent->nosort.dirp = dirp;
+ return ent;
+ }
+ else {
+ void *newp;
+ struct dirent *dp;
+ size_t count = 0, capacity = 0;
+ ent->sort.count = 0;
+ ent->sort.idx = 0;
+ ent->sort.entries = 0;
+#ifdef _WIN32
+ if ((capacity = dirp->nfiles) > 0) {
+ if (!(newp = GLOB_ALLOC_N(rb_dirent_t, capacity))) {
+ closedir(dirp);
+ return NULL;
+ }
+ ent->sort.entries = newp;
+ }
+#endif
+ while ((dp = READDIR(dirp, enc)) != NULL) {
+ rb_dirent_t *rdp = dirent_copy(dp, NULL);
+ if (!rdp) {
+ goto nomem;
+ }
+ if (count >= capacity) {
+ capacity += 256;
+ if (!(newp = GLOB_REALLOC_N(ent->sort.entries, capacity)))
+ goto nomem;
+ ent->sort.entries = newp;
+ }
+ ent->sort.entries[count++] = rdp;
+ ent->sort.count = count;
+ }
+ closedir(dirp);
+ if (count < capacity) {
+ if (!(newp = GLOB_REALLOC_N(ent->sort.entries, count))) {
+ glob_dir_finish(ent, 0);
+ return NULL;
+ }
+ ent->sort.entries = newp;
+ }
+ ruby_qsort(ent->sort.entries, ent->sort.count, sizeof(ent->sort.entries[0]),
+ glob_sort_cmp, NULL);
+ return ent;
+ }
+
+ nomem:
+ glob_dir_finish(ent, 0);
+ closedir(dirp);
+ return NULL;
+}
+
+static rb_dirent_t *
+glob_getent(ruby_glob_entries_t *ent, int flags, rb_encoding *enc)
+{
+ if (flags & FNM_GLOB_NOSORT) {
+ return dirent_copy(READDIR(ent->nosort.dirp, enc), &ent->nosort.ent);
+ }
+ else if (ent->sort.idx < ent->sort.count) {
+ return ent->sort.entries[ent->sort.idx++];
+ }
+ else {
+ return NULL;
+ }
+}
static int
glob_helper(
@@ -2119,307 +2285,325 @@ glob_helper(
int escape = !(flags & FNM_NOESCAPE);
size_t pathlen = baselen + namelen;
+ rb_check_stack_overflow();
+
for (cur = beg; cur < end; ++cur) {
- struct glob_pattern *p = *cur;
- if (p->type == RECURSIVE) {
- recursive = 1;
- p = p->next;
- }
- switch (p->type) {
- case PLAIN:
- plain = 1;
- break;
- case ALPHA:
+ struct glob_pattern *p = *cur;
+ if (p->type == RECURSIVE) {
+ recursive = 1;
+ p = p->next;
+ }
+ switch (p->type) {
+ case PLAIN:
+ plain = 1;
+ break;
+ case ALPHA:
#if USE_NAME_ON_FS == USE_NAME_ON_FS_REAL_BASENAME
- plain = 1;
+ plain = 1;
#else
- magical = 1;
-#endif
- break;
- case BRACE:
- if (!recursive) {
- brace = 1;
- }
- break;
- case MAGICAL:
- magical = 2;
- break;
- case MATCH_ALL:
- match_all = 1;
- break;
- case MATCH_DIR:
- match_dir = 1;
- break;
- case RECURSIVE:
- rb_bug("continuous RECURSIVEs");
- }
+ magical = 1;
+#endif
+ break;
+ case BRACE:
+ if (!recursive || strchr(p->str, '/')) {
+ brace = 1;
+ }
+ break;
+ case MAGICAL:
+ magical = 2;
+ break;
+ case MATCH_ALL:
+ match_all = 1;
+ break;
+ case MATCH_DIR:
+ match_dir = 1;
+ break;
+ case RECURSIVE:
+ rb_bug("continuous RECURSIVEs");
+ }
}
if (brace) {
- struct push_glob_args args;
- char* brace_path = join_path_from_pattern(beg);
- if (!brace_path) return -1;
- args.fd = fd;
- args.path = path;
- args.baselen = baselen;
- args.namelen = namelen;
- args.dirsep = dirsep;
- args.pathtype = pathtype;
- args.flags = flags;
- args.funcs = funcs;
- args.arg = arg;
- status = ruby_brace_expand(brace_path, flags, push_caller, (VALUE)&args, enc, Qfalse);
- GLOB_FREE(brace_path);
- return status;
+ struct push_glob_args args;
+ char* brace_path = join_path_from_pattern(beg);
+ if (!brace_path) return -1;
+ args.fd = fd;
+ args.path = path;
+ args.baselen = baselen;
+ args.namelen = namelen;
+ args.dirsep = dirsep;
+ args.pathtype = pathtype;
+ args.flags = flags;
+ args.funcs = funcs;
+ args.arg = arg;
+ status = ruby_brace_expand(brace_path, flags, push_caller, (VALUE)&args, enc, Qfalse);
+ GLOB_FREE(brace_path);
+ return status;
}
if (*path) {
- if (match_all && pathtype == path_unknown) {
- if (do_lstat(fd, baselen, path, &st, flags, enc) == 0) {
- pathtype = IFTODT(st.st_mode);
- }
- else {
- pathtype = path_noent;
- }
- }
- if (match_dir && (pathtype == path_unknown || pathtype == path_symlink)) {
- if (do_stat(fd, baselen, path, &st, flags, enc) == 0) {
- pathtype = IFTODT(st.st_mode);
- }
- else {
- pathtype = path_noent;
- }
- }
- if (match_all && pathtype > path_noent) {
- const char *subpath = path + baselen + (baselen && path[baselen] == '/');
- status = glob_call_func(funcs->match, subpath, arg, enc);
- if (status) return status;
- }
- if (match_dir && pathtype == path_directory) {
- int seplen = (baselen && path[baselen] == '/');
- const char *subpath = path + baselen + seplen;
- char *tmp = join_path(subpath, namelen - seplen, dirsep, "", 0);
- if (!tmp) return -1;
- status = glob_call_func(funcs->match, tmp, arg, enc);
- GLOB_FREE(tmp);
- if (status) return status;
- }
+ if (match_all && pathtype == path_unknown) {
+ if (do_lstat(fd, baselen, path, &st, flags, enc) == 0) {
+ pathtype = IFTODT(st.st_mode);
+ }
+ else {
+ pathtype = path_noent;
+ }
+ }
+ if (match_dir && (pathtype == path_unknown || pathtype == path_symlink)) {
+ if (do_stat(fd, baselen, path, &st, flags, enc) == 0) {
+ pathtype = IFTODT(st.st_mode);
+ }
+ else {
+ pathtype = path_noent;
+ }
+ }
+ if (match_all && pathtype > path_noent) {
+ const char *subpath = path + baselen + (baselen && path[baselen] == '/');
+ status = glob_call_func(funcs->match, subpath, arg, enc);
+ if (status) return status;
+ }
+ if (match_dir && pathtype == path_directory) {
+ int seplen = (baselen && path[baselen] == '/');
+ const char *subpath = path + baselen + seplen;
+ char *tmp = join_path(subpath, namelen - seplen, dirsep, "", 0);
+ if (!tmp) return -1;
+ status = glob_call_func(funcs->match, tmp, arg, enc);
+ GLOB_FREE(tmp);
+ if (status) return status;
+ }
}
if (pathtype == path_noent) return 0;
if (magical || recursive) {
- struct dirent *dp;
- DIR *dirp;
+ rb_dirent_t *dp;
+ DIR *dirp;
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
- char *plainname = 0;
+ char *plainname = 0;
# endif
- IF_NORMALIZE_UTF8PATH(int norm_p);
+ IF_NORMALIZE_UTF8PATH(int norm_p);
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
- if (cur + 1 == end && (*cur)->type <= ALPHA) {
- plainname = join_path(path, pathlen, dirsep, (*cur)->str, strlen((*cur)->str));
- if (!plainname) return -1;
- dirp = do_opendir(fd, basename, plainname, flags, enc, funcs->error, arg, &status);
- GLOB_FREE(plainname);
- }
- else
+ if (cur + 1 == end && (*cur)->type <= ALPHA) {
+ plainname = join_path(path, pathlen, dirsep, (*cur)->str, strlen((*cur)->str));
+ if (!plainname) return -1;
+ dirp = do_opendir(fd, basename, plainname, flags, enc, funcs->error, arg, &status);
+ GLOB_FREE(plainname);
+ }
+ else
# else
- ;
+ ;
# endif
- dirp = do_opendir(fd, baselen, path, flags, enc, funcs->error, arg, &status);
- if (dirp == NULL) {
+ dirp = do_opendir(fd, baselen, path, flags, enc, funcs->error, arg, &status);
+ if (dirp == NULL) {
# if FNM_SYSCASE || NORMALIZE_UTF8PATH
- if ((magical < 2) && !recursive && (errno == EACCES)) {
- /* no read permission, fallback */
- goto literally;
- }
+ if ((magical < 2) && !recursive && (errno == EACCES)) {
+ /* no read permission, fallback */
+ goto literally;
+ }
# endif
- return status;
- }
- IF_NORMALIZE_UTF8PATH(norm_p = need_normalization(dirp, *path ? path : "."));
+ return status;
+ }
+ IF_NORMALIZE_UTF8PATH(norm_p = need_normalization(dirp, *path ? path : "."));
# if NORMALIZE_UTF8PATH
- if (!(norm_p || magical || recursive)) {
- closedir(dirp);
- goto literally;
- }
+ if (!(norm_p || magical || recursive)) {
+ closedir(dirp);
+ goto literally;
+ }
# endif
# ifdef HAVE_GETATTRLIST
- if (is_case_sensitive(dirp, path) == 0)
- flags |= FNM_CASEFOLD;
+ if (is_case_sensitive(dirp, path) == 0)
+ flags |= FNM_CASEFOLD;
# endif
- while ((dp = READDIR(dirp, enc)) != NULL) {
- char *buf;
- rb_pathtype_t new_pathtype = path_unknown;
- const char *name;
- size_t namlen;
- int dotfile = 0;
- IF_NORMALIZE_UTF8PATH(VALUE utf8str = Qnil);
-
- name = dp->d_name;
- namlen = NAMLEN(dp);
- if (recursive && name[0] == '.') {
- ++dotfile;
- if (namlen == 1) {
- /* unless DOTMATCH, skip current directories not to recurse infinitely */
- if (!(flags & FNM_DOTMATCH)) continue;
- ++dotfile;
- new_pathtype = path_directory; /* force to skip stat/lstat */
- }
- else if (namlen == 2 && name[1] == '.') {
- /* always skip parent directories not to recurse infinitely */
- continue;
- }
- }
+ ruby_glob_entries_t globent;
+ if (!glob_opendir(&globent, dirp, flags, enc)) {
+ status = 0;
+ if (funcs->error) {
+ status = (*funcs->error)(path, arg, enc, ENOMEM);
+ }
+ else {
+ sys_warning(path, enc);
+ }
+ return status;
+ }
+
+ int skipdot = (flags & FNM_GLOB_SKIPDOT);
+ flags |= FNM_GLOB_SKIPDOT;
+
+ while ((dp = glob_getent(&globent, flags, enc)) != NULL) {
+ char *buf;
+ rb_pathtype_t new_pathtype = path_unknown;
+ const char *name;
+ size_t namlen;
+ int dotfile = 0;
+ IF_NORMALIZE_UTF8PATH(VALUE utf8str = Qnil);
+
+ name = dp->d_name;
+ namlen = dp->d_namlen;
+ if (name[0] == '.') {
+ ++dotfile;
+ if (namlen == 1) {
+ /* unless DOTMATCH, skip current directories not to recurse infinitely */
+ if (recursive && !(flags & FNM_DOTMATCH)) continue;
+ if (skipdot) continue;
+ ++dotfile;
+ new_pathtype = path_directory; /* force to skip stat/lstat */
+ }
+ else if (namlen == 2 && name[1] == '.') {
+ /* always skip parent directories not to recurse infinitely */
+ continue;
+ }
+ }
# if NORMALIZE_UTF8PATH
- if (norm_p && has_nonascii(name, namlen)) {
- if (!NIL_P(utf8str = rb_str_normalize_ospath(name, namlen))) {
- RSTRING_GETMEM(utf8str, name, namlen);
- }
- }
+ if (norm_p && has_nonascii(name, namlen)) {
+ if (!NIL_P(utf8str = rb_str_normalize_ospath(name, namlen))) {
+ RSTRING_GETMEM(utf8str, name, namlen);
+ }
+ }
# endif
- buf = join_path(path, pathlen, dirsep, name, namlen);
- IF_NORMALIZE_UTF8PATH(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
- if (!buf) {
- status = -1;
- break;
- }
- name = buf + pathlen + (dirsep != 0);
-#ifdef DT_UNKNOWN
- if (dp->d_type != DT_UNKNOWN) {
- /* Got it. We need no more lstat. */
- new_pathtype = dp->d_type;
- }
-#endif
- if (recursive && dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1) &&
- new_pathtype == path_unknown) {
- /* RECURSIVE never match dot files unless FNM_DOTMATCH is set */
- if (do_lstat(fd, baselen, buf, &st, flags, enc) == 0)
- new_pathtype = IFTODT(st.st_mode);
- else
- new_pathtype = path_noent;
- }
-
- new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, (end - beg) * 2);
- if (!new_beg) {
- GLOB_FREE(buf);
- status = -1;
- break;
- }
-
- for (cur = beg; cur < end; ++cur) {
- struct glob_pattern *p = *cur;
- struct dirent_brace_args args;
- if (p->type == RECURSIVE) {
- if (new_pathtype == path_directory || /* not symlink but real directory */
- new_pathtype == path_exist) {
- if (dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1))
- *new_end++ = p; /* append recursive pattern */
- }
- p = p->next; /* 0 times recursion */
- }
- switch (p->type) {
- case BRACE:
- args.name = name;
- args.dp = dp;
- args.flags = flags;
- if (ruby_brace_expand(p->str, flags, dirent_match_brace,
- (VALUE)&args, enc, Qfalse) > 0)
- *new_end++ = p->next;
- break;
- case ALPHA:
+ buf = join_path(path, pathlen, dirsep, name, namlen);
+ IF_NORMALIZE_UTF8PATH(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
+ if (!buf) {
+ status = -1;
+ break;
+ }
+ name = buf + pathlen + (dirsep != 0);
+#if !EMULATE_IFTODT
+ if (dp->d_type != DT_UNKNOWN) {
+ /* Got it. We need no more lstat. */
+ new_pathtype = dp->d_type;
+ }
+#endif
+ if (recursive && dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1) &&
+ new_pathtype == path_unknown) {
+ /* RECURSIVE never match dot files unless FNM_DOTMATCH is set */
+ if (do_lstat(fd, baselen, buf, &st, flags, enc) == 0)
+ new_pathtype = IFTODT(st.st_mode);
+ else
+ new_pathtype = path_noent;
+ }
+
+ new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, (end - beg) * 2);
+ if (!new_beg) {
+ GLOB_FREE(buf);
+ status = -1;
+ break;
+ }
+
+ for (cur = beg; cur < end; ++cur) {
+ struct glob_pattern *p = *cur;
+ struct dirent_brace_args args;
+ if (p->type == RECURSIVE) {
+ if (new_pathtype == path_directory || /* not symlink but real directory */
+ new_pathtype == path_exist) {
+ if (dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1))
+ *new_end++ = p; /* append recursive pattern */
+ }
+ p = p->next; /* 0 times recursion */
+ }
+ switch (p->type) {
+ case BRACE:
+ args.name = name;
+ args.dp = dp;
+ args.flags = flags;
+ if (ruby_brace_expand(p->str, flags, dirent_match_brace,
+ (VALUE)&args, enc, Qfalse) > 0)
+ *new_end++ = p->next;
+ break;
+ case ALPHA:
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
- if (plainname) {
- *new_end++ = p->next;
- break;
- }
+ if (plainname) {
+ *new_end++ = p->next;
+ break;
+ }
# endif
- case PLAIN:
- case MAGICAL:
- if (dirent_match(p->str, enc, name, dp, flags))
- *new_end++ = p->next;
- default:
- break;
- }
- }
-
- status = glob_helper(fd, buf, baselen, name - buf - baselen + namlen, 1,
- new_pathtype, new_beg, new_end,
- flags, funcs, arg, enc);
- GLOB_FREE(buf);
- GLOB_FREE(new_beg);
- if (status) break;
- }
-
- closedir(dirp);
+ case PLAIN:
+ case MAGICAL:
+ if (dirent_match(p->str, enc, name, dp, flags))
+ *new_end++ = p->next;
+ default:
+ break;
+ }
+ }
+
+ status = glob_helper(fd, buf, baselen, name - buf - baselen + namlen, 1,
+ new_pathtype, new_beg, new_end,
+ flags, funcs, arg, enc);
+ GLOB_FREE(buf);
+ GLOB_FREE(new_beg);
+ if (status) break;
+ }
+
+ glob_dir_finish(&globent, flags);
}
else if (plain) {
- struct glob_pattern **copy_beg, **copy_end, **cur2;
+ struct glob_pattern **copy_beg, **copy_end, **cur2;
# if FNM_SYSCASE || NORMALIZE_UTF8PATH
literally:
# endif
- copy_beg = copy_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
- if (!copy_beg) return -1;
- for (cur = beg; cur < end; ++cur)
- *copy_end++ = (*cur)->type <= ALPHA ? *cur : 0;
-
- for (cur = copy_beg; cur < copy_end; ++cur) {
- if (*cur) {
- rb_pathtype_t new_pathtype = path_unknown;
- char *buf;
- char *name;
- size_t len = strlen((*cur)->str) + 1;
- name = GLOB_ALLOC_N(char, len);
- if (!name) {
- status = -1;
- break;
- }
- memcpy(name, (*cur)->str, len);
- if (escape)
- len = remove_backslashes(name, name+len-1, enc) - name;
-
- new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
- if (!new_beg) {
- GLOB_FREE(name);
- status = -1;
- break;
- }
- *new_end++ = (*cur)->next;
- for (cur2 = cur + 1; cur2 < copy_end; ++cur2) {
- if (*cur2 && fnmatch((*cur2)->str, enc, name, flags) == 0) {
- *new_end++ = (*cur2)->next;
- *cur2 = 0;
- }
- }
-
- buf = join_path(path, pathlen, dirsep, name, len);
- GLOB_FREE(name);
- if (!buf) {
- GLOB_FREE(new_beg);
- status = -1;
- break;
- }
+ copy_beg = copy_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
+ if (!copy_beg) return -1;
+ for (cur = beg; cur < end; ++cur)
+ *copy_end++ = (*cur)->type <= ALPHA ? *cur : 0;
+
+ for (cur = copy_beg; cur < copy_end; ++cur) {
+ if (*cur) {
+ rb_pathtype_t new_pathtype = path_unknown;
+ char *buf;
+ char *name;
+ size_t len = strlen((*cur)->str) + 1;
+ name = GLOB_ALLOC_N(char, len);
+ if (!name) {
+ status = -1;
+ break;
+ }
+ memcpy(name, (*cur)->str, len);
+ if (escape)
+ len = remove_backslashes(name, name+len-1, enc) - name;
+
+ new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
+ if (!new_beg) {
+ GLOB_FREE(name);
+ status = -1;
+ break;
+ }
+ *new_end++ = (*cur)->next;
+ for (cur2 = cur + 1; cur2 < copy_end; ++cur2) {
+ if (*cur2 && fnmatch((*cur2)->str, enc, name, flags) == 0) {
+ *new_end++ = (*cur2)->next;
+ *cur2 = 0;
+ }
+ }
+
+ buf = join_path(path, pathlen, dirsep, name, len);
+ GLOB_FREE(name);
+ if (!buf) {
+ GLOB_FREE(new_beg);
+ status = -1;
+ break;
+ }
#if USE_NAME_ON_FS == USE_NAME_ON_FS_REAL_BASENAME
- if ((*cur)->type == ALPHA) {
- buf = replace_real_basename(buf, pathlen + (dirsep != 0), enc,
- IF_NORMALIZE_UTF8PATH(1)+0,
- flags, &new_pathtype);
- if (!buf) break;
- }
-#endif
- status = glob_helper(fd, buf, baselen,
- namelen + strlen(buf + pathlen), 1,
- new_pathtype, new_beg, new_end,
- flags, funcs, arg, enc);
- GLOB_FREE(buf);
- GLOB_FREE(new_beg);
- if (status) break;
- }
- }
-
- GLOB_FREE(copy_beg);
+ if ((*cur)->type == ALPHA) {
+ buf = replace_real_basename(buf, pathlen + (dirsep != 0), enc,
+ IF_NORMALIZE_UTF8PATH(1)+0,
+ flags, &new_pathtype);
+ if (!buf) break;
+ }
+#endif
+ status = glob_helper(fd, buf, baselen,
+ namelen + strlen(buf + pathlen), 1,
+ new_pathtype, new_beg, new_end,
+ flags, funcs, arg, enc);
+ GLOB_FREE(buf);
+ GLOB_FREE(new_beg);
+ if (status) break;
+ }
+ }
+
+ GLOB_FREE(copy_beg);
}
return status;
@@ -2434,11 +2618,11 @@ push_caller(const char *path, VALUE val, void *enc)
list = glob_make_pattern(path, path + strlen(path), arg->flags, enc);
if (!list) {
- return -1;
+ return -1;
}
status = glob_helper(arg->fd, arg->path, arg->baselen, arg->namelen, arg->dirsep,
- arg->pathtype, &list, &list + 1, arg->flags, arg->funcs,
- arg->arg, enc);
+ arg->pathtype, &list, &list + 1, arg->flags, arg->funcs,
+ arg->arg, enc);
glob_free_pattern(list);
return status;
}
@@ -2463,8 +2647,8 @@ push_glob0_caller(const char *path, VALUE val, void *enc)
static int
ruby_glob0(const char *path, int fd, const char *base, int flags,
- const ruby_glob_funcs_t *funcs, VALUE arg,
- rb_encoding *enc)
+ const ruby_glob_funcs_t *funcs, VALUE arg,
+ rb_encoding *enc)
{
struct glob_pattern *list;
const char *root, *start;
@@ -2493,10 +2677,10 @@ ruby_glob0(const char *path, int fd, const char *base, int flags,
n = root - start;
if (!n && base) {
- n = strlen(base);
- baselen = n;
- start = base;
- dirsep = TRUE;
+ n = strlen(base);
+ baselen = n;
+ start = base;
+ dirsep = TRUE;
}
buf = GLOB_ALLOC_N(char, n + 1);
if (!buf) return -1;
@@ -2505,12 +2689,12 @@ ruby_glob0(const char *path, int fd, const char *base, int flags,
list = glob_make_pattern(root, root + strlen(root), flags, enc);
if (!list) {
- GLOB_FREE(buf);
- return -1;
+ GLOB_FREE(buf);
+ return -1;
}
status = glob_helper(fd, buf, baselen, n-baselen, dirsep,
- path_unknown, &list, &list + 1,
- flags, funcs, arg, enc);
+ path_unknown, &list, &list + 1,
+ flags, funcs, arg, enc);
glob_free_pattern(list);
GLOB_FREE(buf);
@@ -2522,9 +2706,9 @@ ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg)
{
ruby_glob_funcs_t funcs;
funcs.match = func;
- funcs.error = NULL;
+ funcs.error = 0;
return ruby_glob0(path, AT_FDCWD, 0, flags & ~GLOB_VERBOSE,
- &funcs, arg, rb_ascii8bit_encoding());
+ &funcs, arg, rb_ascii8bit_encoding());
}
static int
@@ -2553,7 +2737,7 @@ rb_glob(const char *path, void (*func)(const char *, VALUE, void *), VALUE arg)
args.enc = rb_ascii8bit_encoding();
status = ruby_glob0(path, AT_FDCWD, 0, GLOB_VERBOSE, &rb_glob_funcs,
- (VALUE)&args, args.enc);
+ (VALUE)&args, args.enc);
if (status) GLOB_JUMP_TAG(status);
}
@@ -2572,7 +2756,7 @@ push_pattern(const char *path, VALUE ary, void *enc)
static int
ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
- rb_encoding *enc, VALUE var)
+ rb_encoding *enc, VALUE var)
{
const int escape = !(flags & FNM_NOESCAPE);
const char *p = str;
@@ -2582,48 +2766,48 @@ ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
int nest = 0, status = 0;
while (*p) {
- if (*p == '{' && nest++ == 0) {
- lbrace = p;
- }
- if (*p == '}' && lbrace && --nest == 0) {
- rbrace = p;
- break;
- }
- if (*p == '\\' && escape) {
- if (!*++p) break;
- }
- Inc(p, pend, enc);
+ if (*p == '{' && nest++ == 0) {
+ lbrace = p;
+ }
+ if (*p == '}' && lbrace && --nest == 0) {
+ rbrace = p;
+ break;
+ }
+ if (*p == '\\' && escape) {
+ if (!*++p) break;
+ }
+ Inc(p, pend, enc);
}
if (lbrace && rbrace) {
- size_t len = strlen(s) + 1;
- char *buf = GLOB_ALLOC_N(char, len);
- long shift;
-
- if (!buf) return -1;
- memcpy(buf, s, lbrace-s);
- shift = (lbrace-s);
- p = lbrace;
- while (p < rbrace) {
- const char *t = ++p;
- nest = 0;
- while (p < rbrace && !(*p == ',' && nest == 0)) {
- if (*p == '{') nest++;
- if (*p == '}') nest--;
- if (*p == '\\' && escape) {
- if (++p == rbrace) break;
- }
- Inc(p, pend, enc);
- }
- memcpy(buf+shift, t, p-t);
- strlcpy(buf+shift+(p-t), rbrace+1, len-(shift+(p-t)));
- status = ruby_brace_expand(buf, flags, func, arg, enc, var);
- if (status) break;
- }
- GLOB_FREE(buf);
+ size_t len = strlen(s) + 1;
+ char *buf = GLOB_ALLOC_N(char, len);
+ long shift;
+
+ if (!buf) return -1;
+ memcpy(buf, s, lbrace-s);
+ shift = (lbrace-s);
+ p = lbrace;
+ while (p < rbrace) {
+ const char *t = ++p;
+ nest = 0;
+ while (p < rbrace && !(*p == ',' && nest == 0)) {
+ if (*p == '{') nest++;
+ if (*p == '}') nest--;
+ if (*p == '\\' && escape) {
+ if (++p == rbrace) break;
+ }
+ Inc(p, pend, enc);
+ }
+ memcpy(buf+shift, t, p-t);
+ strlcpy(buf+shift+(p-t), rbrace+1, len-(shift+(p-t)));
+ status = ruby_brace_expand(buf, flags, func, arg, enc, var);
+ if (status) break;
+ }
+ GLOB_FREE(buf);
}
else if (!lbrace && !rbrace) {
- status = glob_call_func(func, s, arg, enc);
+ status = glob_call_func(func, s, arg, enc);
}
RB_GC_GUARD(var);
@@ -2651,7 +2835,7 @@ ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE
flags &= ~GLOB_VERBOSE;
args.funcs.match = func;
- args.funcs.error = NULL;
+ args.funcs.error = 0;
args.value = arg;
args.flags = flags;
return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc, Qfalse);
@@ -2674,9 +2858,9 @@ push_glob(VALUE ary, VALUE str, VALUE base, int flags)
str = rb_str_encode_ospath(str);
#endif
if (rb_enc_to_index(enc) == ENCINDEX_US_ASCII)
- enc = rb_filesystem_encoding();
+ enc = rb_filesystem_encoding();
if (rb_enc_to_index(enc) == ENCINDEX_US_ASCII)
- enc = rb_ascii8bit_encoding();
+ enc = rb_ascii8bit_encoding();
flags |= GLOB_VERBOSE;
args.func = push_pattern;
args.value = ary;
@@ -2684,23 +2868,23 @@ push_glob(VALUE ary, VALUE str, VALUE base, int flags)
args.base = 0;
fd = AT_FDCWD;
if (!NIL_P(base)) {
- if (!RB_TYPE_P(base, T_STRING) || !rb_enc_check(str, base)) {
- struct dir_data *dirp = DATA_PTR(base);
- if (!dirp->dir) dir_closed();
+ if (!RB_TYPE_P(base, T_STRING) || !rb_enc_check(str, base)) {
+ struct dir_data *dirp = DATA_PTR(base);
+ if (!dirp->dir) dir_closed();
#ifdef HAVE_DIRFD
- if ((fd = dirfd(dirp->dir)) == -1)
- rb_sys_fail_path(dir_inspect(base));
+ if ((fd = dirfd(dirp->dir)) == -1)
+ rb_sys_fail_path(dir_inspect(base));
#endif
- base = dirp->path;
- }
- args.base = RSTRING_PTR(base);
+ base = dirp->path;
+ }
+ args.base = RSTRING_PTR(base);
}
#if defined _WIN32 || defined __APPLE__
enc = rb_utf8_encoding();
#endif
return ruby_glob0(RSTRING_PTR(str), fd, args.base, flags, &rb_glob_funcs,
- (VALUE)&args, enc);
+ (VALUE)&args, enc);
}
static VALUE
@@ -2711,13 +2895,13 @@ rb_push_glob(VALUE str, VALUE base, int flags) /* '\0' is delimiter */
/* can contain null bytes as separators */
if (!RB_TYPE_P(str, T_STRING)) {
- FilePathValue(str);
+ FilePathValue(str);
}
else if (!rb_str_to_cstr(str)) {
rb_raise(rb_eArgError, "nul-separated glob pattern is deprecated");
}
else {
- rb_enc_check(str, rb_enc_from_encoding(rb_usascii_encoding()));
+ rb_enc_check(str, rb_enc_from_encoding(rb_usascii_encoding()));
}
ary = rb_ary_new();
@@ -2728,182 +2912,72 @@ rb_push_glob(VALUE str, VALUE base, int flags) /* '\0' is delimiter */
}
static VALUE
-dir_globs(long argc, const VALUE *argv, VALUE base, int flags)
+dir_globs(VALUE args, VALUE base, int flags)
{
VALUE ary = rb_ary_new();
long i;
- for (i = 0; i < argc; ++i) {
- int status;
- VALUE str = argv[i];
- FilePathValue(str);
- status = push_glob(ary, str, base, flags);
- if (status) GLOB_JUMP_TAG(status);
+ for (i = 0; i < RARRAY_LEN(args); ++i) {
+ int status;
+ VALUE str = RARRAY_AREF(args, i);
+ FilePathValue(str);
+ status = push_glob(ary, str, base, flags);
+ if (status) GLOB_JUMP_TAG(status);
}
+ RB_GC_GUARD(args);
return ary;
}
-static void
-dir_glob_options(VALUE opt, VALUE *base, int *flags)
+static VALUE
+dir_glob_option_base(VALUE base)
{
- ID kw[2];
- VALUE args[2];
- kw[0] = rb_intern("base");
- if (flags) kw[1] = rb_intern("flags");
- rb_get_kwargs(opt, kw, 0, flags ? 2 : 1, args);
- if (args[0] == Qundef || NIL_P(args[0])) {
- *base = Qnil;
+ if (NIL_OR_UNDEF_P(base)) {
+ return Qnil;
}
#if USE_OPENDIR_AT
- else if (rb_typeddata_is_kind_of(args[0], &dir_data_type)) {
- *base = args[0];
+ if (rb_typeddata_is_kind_of(base, &dir_data_type)) {
+ return base;
}
#endif
- else {
- FilePathValue(args[0]);
- if (!RSTRING_LEN(args[0])) args[0] = Qnil;
- *base = args[0];
- }
- if (flags && args[1] != Qundef) {
- *flags = NUM2INT(args[1]);
- }
+ FilePathValue(base);
+ if (!RSTRING_LEN(base)) return Qnil;
+ return base;
+}
+
+static int
+dir_glob_option_sort(VALUE sort)
+{
+ return (rb_bool_expected(sort, "sort", TRUE) ? 0 : FNM_GLOB_NOSORT);
}
-/*
- * call-seq:
- * Dir[ string [, string ...] [, base: path] ] -> array
- *
- * Equivalent to calling
- * <code>Dir.glob([</code><i>string,...</i><code>], 0)</code>.
- *
- */
static VALUE
-dir_s_aref(int argc, VALUE *argv, VALUE obj)
+dir_s_aref(rb_execution_context_t *ec, VALUE obj, VALUE args, VALUE base, VALUE sort)
{
- VALUE opts, base;
- argc = rb_scan_args(argc, argv, "*:", NULL, &opts);
- dir_glob_options(opts, &base, NULL);
- if (argc == 1) {
- return rb_push_glob(argv[0], base, 0);
+ const int flags = dir_glob_option_sort(sort);
+ base = dir_glob_option_base(base);
+ if (RARRAY_LEN(args) == 1) {
+ return rb_push_glob(RARRAY_AREF(args, 0), base, flags);
}
- return dir_globs(argc, argv, base, 0);
+ return dir_globs(args, base, flags);
}
-/*
- * call-seq:
- * Dir.glob( pattern, [flags], [base: path] ) -> array
- * Dir.glob( pattern, [flags], [base: path] ) { |filename| block } -> nil
- *
- * Expands +pattern+, which is a pattern string or an Array of pattern
- * strings, and returns an array containing the matching filenames.
- * If a block is given, calls the block once for each matching filename,
- * passing the filename as a parameter to the block.
- *
- * The optional +base+ keyword argument specifies the base directory for
- * interpreting relative pathnames instead of the current working directory.
- * As the results are not prefixed with the base directory name in this
- * case, you will need to prepend the base directory name if you want real
- * paths.
- *
- * Note that the pattern is not a regexp, it's closer to a shell glob.
- * See File::fnmatch for the meaning of the +flags+ parameter.
- * Case sensitivity depends on your system (File::FNM_CASEFOLD is ignored),
- * as does the order in which the results are returned.
- *
- * <code>*</code>::
- * Matches any file. Can be restricted by other values in the glob.
- * Equivalent to <code>/ .* /mx</code> in regexp.
- *
- * <code>*</code>:: Matches all files
- * <code>c*</code>:: Matches all files beginning with <code>c</code>
- * <code>*c</code>:: Matches all files ending with <code>c</code>
- * <code>\*c\*</code>:: Match all files that have <code>c</code> in them
- * (including at the beginning or end).
- *
- * Note, this will not match Unix-like hidden files (dotfiles). In order
- * to include those in the match results, you must use the
- * File::FNM_DOTMATCH flag or something like <code>"{*,.*}"</code>.
- *
- * <code>**</code>::
- * Matches directories recursively.
- *
- * <code>?</code>::
- * Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
- *
- * <code>[set]</code>::
- * Matches any one character in +set+. Behaves exactly like character sets
- * in Regexp, including set negation (<code>[^a-z]</code>).
- *
- * <code>{p,q}</code>::
- * Matches either literal <code>p</code> or literal <code>q</code>.
- * Equivalent to pattern alternation in regexp.
- *
- * Matching literals may be more than one character in length. More than
- * two literals may be specified.
- *
- * <code> \\ </code>::
- * Escapes the next metacharacter.
- *
- * Note that this means you cannot use backslash on windows as part of a
- * glob, i.e. <code>Dir["c:\\foo*"]</code> will not work, use
- * <code>Dir["c:/foo*"]</code> instead.
- *
- * Examples:
- *
- * Dir["config.?"] #=> ["config.h"]
- * Dir.glob("config.?") #=> ["config.h"]
- * Dir.glob("*.[a-z][a-z]") #=> ["main.rb"]
- * Dir.glob("*.[^r]*") #=> ["config.h"]
- * Dir.glob("*.{rb,h}") #=> ["main.rb", "config.h"]
- * Dir.glob("*") #=> ["config.h", "main.rb"]
- * Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"]
- * Dir.glob(["*.rb", "*.h"]) #=> ["main.rb", "config.h"]
- *
- * rbfiles = File.join("**", "*.rb")
- * Dir.glob(rbfiles) #=> ["main.rb",
- * # "lib/song.rb",
- * # "lib/song/karaoke.rb"]
- *
- * Dir.glob(rbfiles, base: "lib") #=> ["song.rb",
- * # "song/karaoke.rb"]
- *
- * libdirs = File.join("**", "lib")
- * Dir.glob(libdirs) #=> ["lib"]
- *
- * librbfiles = File.join("**", "lib", "**", "*.rb")
- * Dir.glob(librbfiles) #=> ["lib/song.rb",
- * # "lib/song/karaoke.rb"]
- *
- * librbfiles = File.join("**", "lib", "*.rb")
- * Dir.glob(librbfiles) #=> ["lib/song.rb"]
- */
static VALUE
-dir_s_glob(int argc, VALUE *argv, VALUE obj)
+dir_s_glob(rb_execution_context_t *ec, VALUE obj, VALUE str, VALUE rflags, VALUE base, VALUE sort)
{
- VALUE str, rflags, ary, opts, base;
- int flags;
-
- argc = rb_scan_args(argc, argv, "11:", &str, &rflags, &opts);
- if (argc == 2)
- flags = NUM2INT(rflags);
- else
- flags = 0;
- dir_glob_options(opts, &base, &flags);
-
- ary = rb_check_array_type(str);
+ VALUE ary = rb_check_array_type(str);
+ const int flags = (NUM2INT(rflags) | dir_glob_option_sort(sort)) & ~FNM_CASEFOLD;
+ base = dir_glob_option_base(base);
if (NIL_P(ary)) {
- ary = rb_push_glob(str, base, flags);
+ ary = rb_push_glob(str, base, flags);
}
else {
- VALUE v = ary;
- ary = dir_globs(RARRAY_LEN(v), RARRAY_CONST_PTR(v), base, flags);
- RB_GC_GUARD(v);
+ ary = dir_globs(ary, base, flags);
}
if (rb_block_given_p()) {
- rb_ary_each(ary);
- return Qnil;
+ rb_ary_each(ary);
+ return Qnil;
}
return ary;
}
@@ -3023,7 +3097,7 @@ dir_s_each_child(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * dir.each_child {| filename | block } -> nil
+ * dir.each_child {| filename | block } -> dir
* dir.each_child -> an_enumerator
*
* Calls the block once for each entry except for "." and ".." in
@@ -3100,117 +3174,24 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
rb_encoding *enc_path = rb_enc_get(path);
if (enc_pattern != enc_path) {
- if (!rb_enc_asciicompat(enc_pattern))
- return FNM_NOMATCH;
- if (!rb_enc_asciicompat(enc_path))
- return FNM_NOMATCH;
- if (!rb_enc_str_asciionly_p(path)) {
- int cr = ENC_CODERANGE_7BIT;
- long len = strlen(pattern);
- if (rb_str_coderange_scan_restartable(pattern, pattern + len,
- enc_pattern, &cr) != len)
- return FNM_NOMATCH;
- if (cr != ENC_CODERANGE_7BIT)
- return FNM_NOMATCH;
- }
+ if (!rb_enc_asciicompat(enc_pattern))
+ return FNM_NOMATCH;
+ if (!rb_enc_asciicompat(enc_path))
+ return FNM_NOMATCH;
+ if (!rb_enc_str_asciionly_p(path)) {
+ int cr = ENC_CODERANGE_7BIT;
+ long len = strlen(pattern);
+ if (rb_str_coderange_scan_restartable(pattern, pattern + len,
+ enc_pattern, &cr) != len)
+ return FNM_NOMATCH;
+ if (cr != ENC_CODERANGE_7BIT)
+ return FNM_NOMATCH;
+ }
}
return (fnmatch(pattern, enc, RSTRING_PTR(path), arg->flags) == 0);
}
-/*
- * call-seq:
- * File.fnmatch( pattern, path, [flags] ) -> (true or false)
- * File.fnmatch?( pattern, path, [flags] ) -> (true or false)
- *
- * Returns true if +path+ matches against +pattern+. The pattern is not a
- * regular expression; instead it follows rules similar to shell filename
- * globbing. It may contain the following metacharacters:
- *
- * <code>*</code>::
- * Matches any file. Can be restricted by other values in the glob.
- * Equivalent to <code>/ .* /x</code> in regexp.
- *
- * <code>*</code>:: Matches all files regular files
- * <code>c*</code>:: Matches all files beginning with <code>c</code>
- * <code>*c</code>:: Matches all files ending with <code>c</code>
- * <code>\*c*</code>:: Matches all files that have <code>c</code> in them
- * (including at the beginning or end).
- *
- * To match hidden files (that start with a <code>.</code> set the
- * File::FNM_DOTMATCH flag.
- *
- * <code>**</code>::
- * Matches directories recursively or files expansively.
- *
- * <code>?</code>::
- * Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
- *
- * <code>[set]</code>::
- * Matches any one character in +set+. Behaves exactly like character sets
- * in Regexp, including set negation (<code>[^a-z]</code>).
- *
- * <code> \ </code>::
- * Escapes the next metacharacter.
- *
- * <code>{a,b}</code>::
- * Matches pattern a and pattern b if File::FNM_EXTGLOB flag is enabled.
- * Behaves like a Regexp union (<code>(?:a|b)</code>).
- *
- * +flags+ is a bitwise OR of the <code>FNM_XXX</code> constants. The same
- * glob pattern and flags are used by Dir::glob.
- *
- * Examples:
- *
- * File.fnmatch('cat', 'cat') #=> true # match entire string
- * File.fnmatch('cat', 'category') #=> false # only match partial string
- *
- * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default
- * File.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> true # { } is supported on FNM_EXTGLOB
- *
- * File.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character
- * File.fnmatch('c??t', 'cat') #=> false # ditto
- * File.fnmatch('c*', 'cats') #=> true # '*' match 0 or more characters
- * File.fnmatch('c*t', 'c/a/b/t') #=> true # ditto
- * File.fnmatch('ca[a-z]', 'cat') #=> true # inclusive bracket expression
- * File.fnmatch('ca[^t]', 'cat') #=> false # exclusive bracket expression ('^' or '!')
- *
- * File.fnmatch('cat', 'CAT') #=> false # case sensitive
- * File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true # case insensitive
- * File.fnmatch('cat', 'CAT', File::FNM_SYSCASE) #=> true or false # depends on the system default
- *
- * File.fnmatch('?', '/', File::FNM_PATHNAME) #=> false # wildcard doesn't match '/' on FNM_PATHNAME
- * File.fnmatch('*', '/', File::FNM_PATHNAME) #=> false # ditto
- * File.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false # ditto
- *
- * File.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary
- * File.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary
- * File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESCAPE makes '\' ordinary
- * File.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression
- *
- * File.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading
- * File.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true # period by default.
- * File.fnmatch('.*', '.profile') #=> true
- *
- * rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string.
- * File.fnmatch(rbfiles, 'main.rb') #=> false
- * File.fnmatch(rbfiles, './main.rb') #=> false
- * File.fnmatch(rbfiles, 'lib/song.rb') #=> true
- * File.fnmatch('**.rb', 'main.rb') #=> true
- * File.fnmatch('**.rb', './main.rb') #=> false
- * File.fnmatch('**.rb', 'lib/song.rb') #=> true
- * File.fnmatch('*', 'dave/.profile') #=> true
- *
- * pattern = '*' '/' '*'
- * File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME) #=> false
- * File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
- *
- * pattern = '**' '/' 'foo'
- * File.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME) #=> true
- * File.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME) #=> true
- * File.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true
- * File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME) #=> false
- * File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
- */
+/* :nodoc: */
static VALUE
file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
{
@@ -3219,27 +3200,27 @@ file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
int flags;
if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3)
- flags = NUM2INT(rflags);
+ flags = NUM2INT(rflags);
else
- flags = 0;
+ flags = 0;
StringValueCStr(pattern);
FilePathStringValue(path);
if (flags & FNM_EXTGLOB) {
- struct brace_args args;
+ struct brace_args args;
- args.value = path;
- args.flags = flags;
- if (ruby_brace_expand(RSTRING_PTR(pattern), flags, fnmatch_brace,
- (VALUE)&args, rb_enc_get(pattern), pattern) > 0)
- return Qtrue;
+ args.value = path;
+ args.flags = flags;
+ if (ruby_brace_expand(RSTRING_PTR(pattern), flags, fnmatch_brace,
+ (VALUE)&args, rb_enc_get(pattern), pattern) > 0)
+ return Qtrue;
}
else {
- rb_encoding *enc = rb_enc_compatible(pattern, path);
- if (!enc) return Qfalse;
- if (fnmatch(RSTRING_PTR(pattern), enc, RSTRING_PTR(path), flags) == 0)
- return Qtrue;
+ rb_encoding *enc = rb_enc_compatible(pattern, path);
+ if (!enc) return Qfalse;
+ if (fnmatch(RSTRING_PTR(pattern), enc, RSTRING_PTR(path), flags) == 0)
+ return Qtrue;
}
RB_GC_GUARD(pattern);
@@ -3263,12 +3244,12 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
rb_check_arity(argc, 0, 1);
user = (argc > 0) ? argv[0] : Qnil;
if (!NIL_P(user)) {
- SafeStringValue(user);
- rb_must_asciicompat(user);
- u = StringValueCStr(user);
- if (*u) {
- return rb_home_dir_of(user, rb_str_new(0, 0));
- }
+ SafeStringValue(user);
+ rb_must_asciicompat(user);
+ u = StringValueCStr(user);
+ if (*u) {
+ return rb_home_dir_of(user, rb_str_new(0, 0));
+ }
}
return rb_default_home_dir(rb_str_new(0, 0));
@@ -3289,19 +3270,6 @@ rb_file_directory_p(void)
}
#endif
-/*
- * call-seq:
- * Dir.exists?(file_name) -> true or false
- *
- * Deprecated method. Don't use.
- */
-static VALUE
-rb_dir_exists_p(VALUE obj, VALUE fname)
-{
- rb_warning("Dir.exists? is a deprecated name, use Dir.exist? instead");
- return rb_file_directory_p(obj, fname);
-}
-
static void *
nogvl_dir_empty_p(void *ptr)
{
@@ -3311,24 +3279,24 @@ nogvl_dir_empty_p(void *ptr)
VALUE result = Qtrue;
if (!dir) {
- int e = errno;
- switch (gc_for_fd_with_gvl(e)) {
- default:
- dir = opendir(path);
- if (dir) break;
- e = errno;
- /* fall through */
- case 0:
- if (e == ENOTDIR) return (void *)Qfalse;
- errno = e; /* for rb_sys_fail_path */
- return (void *)Qundef;
- }
+ int e = errno;
+ switch (gc_for_fd_with_gvl(e)) {
+ default:
+ dir = opendir(path);
+ if (dir) break;
+ e = errno;
+ /* fall through */
+ case 0:
+ if (e == ENOTDIR) return (void *)Qfalse;
+ errno = e; /* for rb_sys_fail_path */
+ return (void *)Qundef;
+ }
}
while ((dp = READDIR(dir, NULL)) != NULL) {
- if (!to_be_skipped(dp)) {
- result = Qfalse;
- break;
- }
+ if (!to_be_skipped(dp)) {
+ result = Qfalse;
+ break;
+ }
}
closedir(dir);
return (void *)result;
@@ -3356,41 +3324,31 @@ rb_dir_s_empty_p(VALUE obj, VALUE dirname)
#if defined HAVE_GETATTRLIST && defined ATTR_DIR_ENTRYCOUNT
{
- u_int32_t attrbuf[SIZEUP32(fsobj_tag_t)];
- struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_OBJTAG,};
- if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0) != 0)
- rb_sys_fail_path(orig);
- if (*(const fsobj_tag_t *)(attrbuf+1) == VT_HFS) {
- al.commonattr = 0;
- al.dirattr = ATTR_DIR_ENTRYCOUNT;
- if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0) == 0) {
- if (attrbuf[0] >= 2 * sizeof(u_int32_t))
- return attrbuf[1] ? Qfalse : Qtrue;
- if (false_on_notdir) return Qfalse;
- }
- rb_sys_fail_path(orig);
- }
+ u_int32_t attrbuf[SIZEUP32(fsobj_tag_t)];
+ struct attrlist al = {ATTR_BIT_MAP_COUNT, 0, ATTR_CMN_OBJTAG,};
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0) != 0)
+ rb_sys_fail_path(orig);
+ if (*(const fsobj_tag_t *)(attrbuf+1) == VT_HFS) {
+ al.commonattr = 0;
+ al.dirattr = ATTR_DIR_ENTRYCOUNT;
+ if (getattrlist(path, &al, attrbuf, sizeof(attrbuf), 0) == 0) {
+ if (attrbuf[0] >= 2 * sizeof(u_int32_t))
+ return RBOOL(attrbuf[1] == 0);
+ if (false_on_notdir) return Qfalse;
+ }
+ rb_sys_fail_path(orig);
+ }
}
#endif
result = (VALUE)rb_thread_call_without_gvl(nogvl_dir_empty_p, (void *)path,
- RUBY_UBF_IO, 0);
- if (result == Qundef) {
- rb_sys_fail_path(orig);
+ RUBY_UBF_IO, 0);
+ if (UNDEF_P(result)) {
+ rb_sys_fail_path(orig);
}
return result;
}
-/*
- * Objects of class Dir are directory streams representing
- * directories in the underlying file system. They provide a variety
- * of ways to list directories and their contents. See also File.
- *
- * The directory used in these examples contains the two regular files
- * (<code>config.h</code> and <code>main.rb</code>), the parent
- * directory (<code>..</code>), and the directory itself
- * (<code>.</code>).
- */
void
Init_Dir(void)
{
@@ -3399,13 +3357,11 @@ Init_Dir(void)
rb_include_module(rb_cDir, rb_mEnumerable);
rb_define_alloc_func(rb_cDir, dir_s_alloc);
- rb_define_singleton_method(rb_cDir, "open", dir_s_open, -1);
rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, -1);
rb_define_singleton_method(rb_cDir, "entries", dir_entries, -1);
rb_define_singleton_method(rb_cDir, "each_child", dir_s_each_child, -1);
rb_define_singleton_method(rb_cDir, "children", dir_s_children, -1);
- rb_define_method(rb_cDir,"initialize", dir_initialize, -1);
rb_define_method(rb_cDir,"fileno", dir_fileno, 0);
rb_define_method(rb_cDir,"path", dir_path, 0);
rb_define_method(rb_cDir,"to_path", dir_path, 0);
@@ -3431,10 +3387,7 @@ Init_Dir(void)
rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);
rb_define_singleton_method(rb_cDir,"home", dir_s_home, -1);
- rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
- rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1);
rb_define_singleton_method(rb_cDir,"exist?", rb_file_directory_p, 1);
- rb_define_singleton_method(rb_cDir,"exists?", rb_dir_exists_p, 1);
rb_define_singleton_method(rb_cDir,"empty?", rb_dir_s_empty_p, 1);
rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
@@ -3487,3 +3440,5 @@ Init_Dir(void)
*/
rb_file_const("FNM_SHORTNAME", INT2FIX(FNM_SHORTNAME));
}
+
+#include "dir.rbinc"
diff --git a/dir.rb b/dir.rb
new file mode 100644
index 0000000000..2e426b0881
--- /dev/null
+++ b/dir.rb
@@ -0,0 +1,314 @@
+# Objects of class Dir are directory streams representing
+# directories in the underlying file system. They provide a variety
+# of ways to list directories and their contents. See also File.
+#
+# The directory used in these examples contains the two regular files
+# (<code>config.h</code> and <code>main.rb</code>), the parent
+# directory (<code>..</code>), and the directory itself
+# (<code>.</code>).
+#
+# == What's Here
+#
+# First, what's elsewhere. \Class \Dir:
+#
+# - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
+# - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
+# which provides dozens of additional methods.
+#
+# Here, class \Dir provides methods that are useful for:
+#
+# - {Reading}[rdoc-ref:Dir@Reading]
+# - {Setting}[rdoc-ref:Dir@Setting]
+# - {Querying}[rdoc-ref:Dir@Querying]
+# - {Iterating}[rdoc-ref:Dir@Iterating]
+# - {Other}[rdoc-ref:Dir@Other]
+#
+# === Reading
+#
+# - #close: Closes the directory stream for +self+.
+# - #pos=: Sets the position in the directory stream for +self+.
+# - #read: Reads and returns the next entry in the directory stream for +self+.
+# - #rewind: Sets the position in the directory stream for +self+ to the first entry.
+# - #seek: Sets the position in the directory stream for +self+
+# the entry at the given offset.
+#
+# === Setting
+#
+# - ::chdir: Changes the working directory of the current process
+# to the given directory.
+# - ::chroot: Changes the file-system root for the current process
+# to the given directory.
+#
+# === Querying
+#
+# - ::[]: Same as ::glob without the ability to pass flags.
+# - ::children: Returns an array of names of the children
+# (both files and directories) of the given directory,
+# but not including <tt>.</tt> or <tt>..</tt>.
+# - ::empty?: Returns whether the given path is an empty directory.
+# - ::entries: Returns an array of names of the children
+# (both files and directories) of the given directory,
+# including <tt>.</tt> and <tt>..</tt>.
+# - ::exist?: Returns whether the given path is a directory.
+# - ::getwd (aliased as #pwd): Returns the path to the current working directory.
+# - ::glob: Returns an array of file paths matching the given pattern and flags.
+# - ::home: Returns the home directory path for a given user or the current user.
+# - #children: Returns an array of names of the children
+# (both files and directories) of +self+,
+# but not including <tt>.</tt> or <tt>..</tt>.
+# - #fileno: Returns the integer file descriptor for +self+.
+# - #path (aliased as #to_path): Returns the path used to create +self+.
+# - #tell (aliased as #pos): Returns the integer position
+# in the directory stream for +self+.
+#
+# === Iterating
+#
+# - ::each_child: Calls the given block with each entry in the given directory,
+# but not including <tt>.</tt> or <tt>..</tt>.
+# - ::foreach: Calls the given block with each entry in the given directory,
+# including <tt>.</tt> and <tt>..</tt>.
+# - #each: Calls the given block with each entry in +self+,
+# including <tt>.</tt> and <tt>..</tt>.
+# - #each_child: Calls the given block with each entry in +self+,
+# but not including <tt>.</tt> or <tt>..</tt>.
+#
+# === Other
+#
+# - ::mkdir: Creates a directory at the given path, with optional permissions.
+# - ::new: Returns a new \Dir for the given path, with optional encoding.
+# - ::open: Same as ::new, but if a block is given, yields the \Dir to the block,
+# closing it upon block exit.
+# - ::unlink (aliased as ::delete and ::rmdir): Removes the given directory.
+# - #inspect: Returns a string description of +self+.
+class Dir
+ # call-seq:
+ # Dir.open( string ) -> aDir
+ # Dir.open( string, encoding: enc ) -> aDir
+ # Dir.open( string ) {| aDir | block } -> anObject
+ # Dir.open( string, encoding: enc ) {| aDir | block } -> anObject
+ #
+ # The optional <i>encoding</i> keyword argument specifies the encoding of the directory.
+ # If not specified, the filesystem encoding is used.
+ #
+ # With no block, <code>open</code> is a synonym for Dir::new. If a
+ # block is present, it is passed <i>aDir</i> as a parameter. The
+ # directory is closed at the end of the block, and Dir::open returns
+ # the value of the block.
+ def self.open(name, encoding: nil, &block)
+ dir = Primitive.dir_s_open(name, encoding)
+ if block
+ begin
+ yield dir
+ ensure
+ Primitive.dir_s_close(dir)
+ end
+ else
+ dir
+ end
+ end
+
+ # call-seq:
+ # Dir.new( string ) -> aDir
+ # Dir.new( string, encoding: enc ) -> aDir
+ #
+ # Returns a new directory object for the named directory.
+ #
+ # The optional <i>encoding</i> keyword argument specifies the encoding of the directory.
+ # If not specified, the filesystem encoding is used.
+ def initialize(name, encoding: nil)
+ Primitive.dir_initialize(name, encoding)
+ end
+
+ # call-seq:
+ # Dir[ string [, string ...] [, base: path] [, sort: true] ] -> array
+ #
+ # Equivalent to calling
+ # <code>Dir.glob([</code><i>string,...</i><code>], 0)</code>.
+ def self.[](*args, base: nil, sort: true)
+ Primitive.dir_s_aref(args, base, sort)
+ end
+
+ # call-seq:
+ # Dir.glob( pattern, [flags], [base: path] [, sort: true] ) -> array
+ # Dir.glob( pattern, [flags], [base: path] [, sort: true] ) { |filename| block } -> nil
+ #
+ # Expands +pattern+, which is a pattern string or an Array of pattern
+ # strings, and returns an array containing the matching filenames.
+ # If a block is given, calls the block once for each matching filename,
+ # passing the filename as a parameter to the block.
+ #
+ # The optional +base+ keyword argument specifies the base directory for
+ # interpreting relative pathnames instead of the current working directory.
+ # As the results are not prefixed with the base directory name in this
+ # case, you will need to prepend the base directory name if you want real
+ # paths.
+ #
+ # The results which matched single wildcard or character set are sorted in
+ # binary ascending order, unless +false+ is given as the optional +sort+
+ # keyword argument. The order of an Array of pattern strings and braces
+ # are preserved.
+ #
+ # Note that the pattern is not a regexp, it's closer to a shell glob.
+ # See File::fnmatch for the meaning of the +flags+ parameter.
+ # Case sensitivity depends on your system (+File::FNM_CASEFOLD+ is ignored).
+ #
+ # <code>*</code>::
+ # Matches any file. Can be restricted by other values in the glob.
+ # Equivalent to <code>/.*/mx</code> in regexp.
+ #
+ # <code>*</code>:: Matches all files
+ # <code>c*</code>:: Matches all files beginning with <code>c</code>
+ # <code>*c</code>:: Matches all files ending with <code>c</code>
+ # <code>\*c\*</code>:: Match all files that have <code>c</code> in them
+ # (including at the beginning or end).
+ #
+ # Note, this will not match Unix-like hidden files (dotfiles). In order
+ # to include those in the match results, you must use the
+ # File::FNM_DOTMATCH flag or something like <code>"{*,.*}"</code>.
+ #
+ # <code>**</code>::
+ # Matches directories recursively if followed by <code>/</code>. If
+ # this path segment contains any other characters, it is the same as the
+ # usual <code>*</code>.
+ #
+ # <code>?</code>::
+ # Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
+ #
+ # <code>[set]</code>::
+ # Matches any one character in +set+. Behaves exactly like character sets
+ # in Regexp, including set negation (<code>[^a-z]</code>).
+ #
+ # <code>{p,q}</code>::
+ # Matches either literal <code>p</code> or literal <code>q</code>.
+ # Equivalent to pattern alternation in regexp.
+ #
+ # Matching literals may be more than one character in length. More than
+ # two literals may be specified.
+ #
+ # <code>\\</code>::
+ # Escapes the next metacharacter.
+ #
+ # Note that this means you cannot use backslash on windows as part of a
+ # glob, i.e. <code>Dir["c:\\foo*"]</code> will not work, use
+ # <code>Dir["c:/foo*"]</code> instead.
+ #
+ # Examples:
+ #
+ # Dir["config.?"] #=> ["config.h"]
+ # Dir.glob("config.?") #=> ["config.h"]
+ # Dir.glob("*.[a-z][a-z]") #=> ["main.rb"]
+ # Dir.glob("*.[^r]*") #=> ["config.h"]
+ # Dir.glob("*.{rb,h}") #=> ["main.rb", "config.h"]
+ # Dir.glob("*") #=> ["config.h", "main.rb"]
+ # Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "config.h", "main.rb"]
+ # Dir.glob(["*.rb", "*.h"]) #=> ["main.rb", "config.h"]
+ #
+ # Dir.glob("**/*.rb") #=> ["main.rb",
+ # # "lib/song.rb",
+ # # "lib/song/karaoke.rb"]
+ #
+ # Dir.glob("**/*.rb", base: "lib") #=> ["song.rb",
+ # # "song/karaoke.rb"]
+ #
+ # Dir.glob("**/lib") #=> ["lib"]
+ #
+ # Dir.glob("**/lib/**/*.rb") #=> ["lib/song.rb",
+ # # "lib/song/karaoke.rb"]
+ #
+ # Dir.glob("**/lib/*.rb") #=> ["lib/song.rb"]
+ def self.glob(pattern, _flags = 0, flags: _flags, base: nil, sort: true)
+ Primitive.dir_s_glob(pattern, flags, base, sort)
+ end
+end
+
+class << File
+ # call-seq:
+ # File.fnmatch( pattern, path, [flags] ) -> (true or false)
+ # File.fnmatch?( pattern, path, [flags] ) -> (true or false)
+ #
+ # Returns true if +path+ matches against +pattern+. The pattern is not a
+ # regular expression; instead it follows rules similar to shell filename
+ # globbing. It may contain the following metacharacters:
+ #
+ # <code>*</code>::
+ # Matches any file. Can be restricted by other values in the glob.
+ # Equivalent to <code>/.*/x</code> in regexp.
+ #
+ # <code>*</code>:: Matches all regular files
+ # <code>c*</code>:: Matches all files beginning with <code>c</code>
+ # <code>*c</code>:: Matches all files ending with <code>c</code>
+ # <code>\*c*</code>:: Matches all files that have <code>c</code> in them
+ # (including at the beginning or end).
+ #
+ # To match hidden files (that start with a <code>.</code>) set the
+ # File::FNM_DOTMATCH flag.
+ #
+ # <code>**</code>::
+ # Matches directories recursively or files expansively.
+ #
+ # <code>?</code>::
+ # Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
+ #
+ # <code>[set]</code>::
+ # Matches any one character in +set+. Behaves exactly like character sets
+ # in Regexp, including set negation (<code>[^a-z]</code>).
+ #
+ # <code>\\</code>::
+ # Escapes the next metacharacter.
+ #
+ # <code>{a,b}</code>::
+ # Matches pattern a and pattern b if File::FNM_EXTGLOB flag is enabled.
+ # Behaves like a Regexp union (<code>(?:a|b)</code>).
+ #
+ # +flags+ is a bitwise OR of the <code>FNM_XXX</code> constants. The same
+ # glob pattern and flags are used by Dir::glob.
+ #
+ # Examples:
+ #
+ # File.fnmatch('cat', 'cat') #=> true # match entire string
+ # File.fnmatch('cat', 'category') #=> false # only match partial string
+ #
+ # File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default
+ # File.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> true # { } is supported on FNM_EXTGLOB
+ #
+ # File.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character
+ # File.fnmatch('c??t', 'cat') #=> false # ditto
+ # File.fnmatch('c*', 'cats') #=> true # '*' match 0 or more characters
+ # File.fnmatch('c*t', 'c/a/b/t') #=> true # ditto
+ # File.fnmatch('ca[a-z]', 'cat') #=> true # inclusive bracket expression
+ # File.fnmatch('ca[^t]', 'cat') #=> false # exclusive bracket expression ('^' or '!')
+ #
+ # File.fnmatch('cat', 'CAT') #=> false # case sensitive
+ # File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true # case insensitive
+ # File.fnmatch('cat', 'CAT', File::FNM_SYSCASE) #=> true or false # depends on the system default
+ #
+ # File.fnmatch('?', '/', File::FNM_PATHNAME) #=> false # wildcard doesn't match '/' on FNM_PATHNAME
+ # File.fnmatch('*', '/', File::FNM_PATHNAME) #=> false # ditto
+ # File.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false # ditto
+ #
+ # File.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary
+ # File.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary
+ # File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESCAPE makes '\' ordinary
+ # File.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression
+ #
+ # File.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading
+ # File.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true # period by default.
+ # File.fnmatch('.*', '.profile') #=> true
+ #
+ # File.fnmatch('**/*.rb', 'main.rb') #=> false
+ # File.fnmatch('**/*.rb', './main.rb') #=> false
+ # File.fnmatch('**/*.rb', 'lib/song.rb') #=> true
+ # File.fnmatch('**.rb', 'main.rb') #=> true
+ # File.fnmatch('**.rb', './main.rb') #=> false
+ # File.fnmatch('**.rb', 'lib/song.rb') #=> true
+ # File.fnmatch('*', 'dave/.profile') #=> true
+ #
+ # File.fnmatch('**/foo', 'a/b/c/foo', File::FNM_PATHNAME) #=> true
+ # File.fnmatch('**/foo', '/a/b/c/foo', File::FNM_PATHNAME) #=> true
+ # File.fnmatch('**/foo', 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true
+ # File.fnmatch('**/foo', 'a/.b/c/foo', File::FNM_PATHNAME) #=> false
+ # File.fnmatch('**/foo', 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
+ def fnmatch(pattern, path, flags = 0)
+ end
+ alias fnmatch? fnmatch
+end if false
diff --git a/dln.c b/dln.c
index c40cbfc6ac..0edd709bbe 100644
--- a/dln.c
+++ b/dln.c
@@ -15,23 +15,22 @@
#define dln_memerror rb_memerror
#define dln_exit rb_exit
#define dln_loaderror rb_loaderror
+#define dln_fatalerror rb_fatal
#else
#define dln_notimplement --->>> dln not implemented <<<---
#define dln_memerror abort
#define dln_exit exit
static void dln_loaderror(const char *format, ...);
+#define dln_fatalerror dln_loaderror
#endif
#include "dln.h"
#include "internal.h"
+#include "internal/compilers.h"
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
-#ifdef USE_DLN_A_OUT
-char *dln_argv0;
-#endif
-
#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif
@@ -42,6 +41,10 @@ char *dln_argv0;
# include <strings.h>
#endif
+#if defined __APPLE__
+# include <AvailabilityMacros.h>
+#endif
+
#ifndef xmalloc
void *xmalloc();
void *xcalloc();
@@ -59,7 +62,7 @@ void *xrealloc();
#include <sys/stat.h>
#ifndef S_ISDIR
-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
#ifdef HAVE_SYS_PARAM_H
@@ -73,19 +76,6 @@ void *xrealloc();
# include <unistd.h>
#endif
-#ifndef _WIN32
-char *getenv();
-#endif
-
-#ifdef __APPLE__
-# if defined(HAVE_DLOPEN)
- /* Mac OS X with dlopen (10.3 or later) */
-# define MACOSX_DLOPEN
-# else
-# define MACOSX_DYLD
-# endif
-#endif
-
#ifndef dln_loaderror
static void
dln_loaderror(const char *format, ...)
@@ -98,12 +88,12 @@ dln_loaderror(const char *format, ...)
}
#endif
-#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(MACOSX_DYLD) && !defined(_UNICOSMP)
+#if defined(HAVE_DLOPEN) && !defined(_AIX) && !defined(_UNICOSMP)
/* dynamic load with dlopen() */
# define USE_DLN_DLOPEN
#endif
-#if defined(__hp9000s300) || ((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__ELF__)) || defined(NeXT) || defined(MACOSX_DYLD)
+#if defined(__hp9000s300) || ((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__ELF__)) || defined(NeXT)
# define EXTERNAL_PREFIX "_"
#else
# define EXTERNAL_PREFIX ""
@@ -116,6 +106,7 @@ dln_loaderror(const char *format, ...)
#define isdirsep(x) ((x) == '/')
#endif
+#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
static size_t
init_funcname_len(const char **file)
{
@@ -123,8 +114,8 @@ init_funcname_len(const char **file)
/* Load the file as an object one */
for (base = p; *p; p++) { /* Find position of last '/' */
- if (*p == '.' && !dot) dot = p;
- if (isdirsep(*p)) base = p+1, dot = NULL;
+ if (*p == '.' && !dot) dot = p;
+ if (isdirsep(*p)) base = p+1, dot = NULL;
}
*file = base;
/* Delete suffix if it exists */
@@ -139,960 +130,19 @@ static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX
const size_t plen = sizeof(funcname_prefix);\
char *const tmp = ALLOCA_N(char, plen+flen+1);\
if (!tmp) {\
- dln_memerror();\
+ dln_memerror();\
}\
memcpy(tmp, funcname_prefix, plen);\
memcpy(tmp+plen, base, flen);\
tmp[plen+flen] = '\0';\
*(buf) = tmp;\
} while (0)
-
-#ifdef USE_DLN_A_OUT
-
-#ifndef LIBC_NAME
-# define LIBC_NAME "libc.a"
-#endif
-
-#ifndef DLN_DEFAULT_LIB_PATH
-# define DLN_DEFAULT_LIB_PATH "/lib:/usr/lib:/usr/local/lib:."
-#endif
-
-#include <errno.h>
-
-static int dln_errno;
-
-#define DLN_ENOEXEC ENOEXEC /* Exec format error */
-#define DLN_ECONFL 1201 /* Symbol name conflict */
-#define DLN_ENOINIT 1202 /* No initializer given */
-#define DLN_EUNDEF 1203 /* Undefine symbol remains */
-#define DLN_ENOTLIB 1204 /* Not a library file */
-#define DLN_EBADLIB 1205 /* Malformed library file */
-#define DLN_EINIT 1206 /* Not initialized */
-
-static int dln_init_p = 0;
-
-#include <ar.h>
-#include <a.out.h>
-#ifndef N_COMM
-# define N_COMM 0x12
-#endif
-#ifndef N_MAGIC
-# define N_MAGIC(x) (x).a_magic
-#endif
-
-#define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC)
-
-#include "ruby/util.h"
-#include "ruby/st.h"
-
-static st_table *sym_tbl;
-static st_table *undef_tbl;
-
-static int load_lib();
-
-static int
-load_header(int fd, struct exec *hdrp, long disp)
-{
- int size;
-
- lseek(fd, disp, 0);
- size = read(fd, hdrp, sizeof(struct exec));
- if (size == -1) {
- dln_errno = errno;
- return -1;
- }
- if (size != sizeof(struct exec) || N_BADMAG(*hdrp)) {
- dln_errno = DLN_ENOEXEC;
- return -1;
- }
- return 0;
-}
-
-#if defined(sequent)
-#define RELOC_SYMBOL(r) ((r)->r_symbolnum)
-#define RELOC_MEMORY_SUB_P(r) ((r)->r_bsr)
-#define RELOC_PCREL_P(r) ((r)->r_pcrel || (r)->r_bsr)
-#define RELOC_TARGET_SIZE(r) ((r)->r_length)
-#endif
-
-/* Default macros */
-#ifndef RELOC_ADDRESS
-#define RELOC_ADDRESS(r) ((r)->r_address)
-#define RELOC_EXTERN_P(r) ((r)->r_extern)
-#define RELOC_SYMBOL(r) ((r)->r_symbolnum)
-#define RELOC_MEMORY_SUB_P(r) 0
-#define RELOC_PCREL_P(r) ((r)->r_pcrel)
-#define RELOC_TARGET_SIZE(r) ((r)->r_length)
-#endif
-
-#if defined(__sun) && defined(__sparc)
-/* Sparc (Sun 4) macros */
-# undef relocation_info
-# define relocation_info reloc_info_sparc
-# define R_RIGHTSHIFT(r) (reloc_r_rightshift[(r)->r_type])
-# define R_BITSIZE(r) (reloc_r_bitsize[(r)->r_type])
-# define R_LENGTH(r) (reloc_r_length[(r)->r_type])
-static const int reloc_r_rightshift[] = {
- 0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 0, 0, 0,
-};
-static const int reloc_r_bitsize[] = {
- 8, 16, 32, 8, 16, 32, 30, 22, 22, 22, 13, 10, 32, 32, 16,
-};
-static const int reloc_r_length[] = {
- 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-};
-# define R_PCREL(r) \
- ((r)->r_type >= RELOC_DISP8 && (r)->r_type <= RELOC_WDISP22)
-# define R_SYMBOL(r) ((r)->r_index)
-#endif
-
-#if defined(sequent)
-#define R_SYMBOL(r) ((r)->r_symbolnum)
-#define R_MEMORY_SUB(r) ((r)->r_bsr)
-#define R_PCREL(r) ((r)->r_pcrel || (r)->r_bsr)
-#define R_LENGTH(r) ((r)->r_length)
-#endif
-
-#ifndef R_SYMBOL
-# define R_SYMBOL(r) ((r)->r_symbolnum)
-# define R_MEMORY_SUB(r) 0
-# define R_PCREL(r) ((r)->r_pcrel)
-# define R_LENGTH(r) ((r)->r_length)
-#endif
-
-static struct relocation_info *
-load_reloc(int fd, struct exec *hdrp, long disp)
-{
- struct relocation_info *reloc;
- int size;
-
- lseek(fd, disp + N_TXTOFF(*hdrp) + hdrp->a_text + hdrp->a_data, 0);
- size = hdrp->a_trsize + hdrp->a_drsize;
- reloc = (struct relocation_info*)xmalloc(size);
- if (reloc == NULL) {
- dln_errno = errno;
- return NULL;
- }
-
- if (read(fd, reloc, size) != size) {
- dln_errno = errno;
- free(reloc);
- return NULL;
- }
-
- return reloc;
-}
-
-static struct nlist *
-load_sym(int fd, struct exec *hdrp, long disp)
-{
- struct nlist * buffer;
- struct nlist * sym;
- struct nlist * end;
- long displ;
- int size;
-
- lseek(fd, N_SYMOFF(*hdrp) + hdrp->a_syms + disp, 0);
- if (read(fd, &size, sizeof(int)) != sizeof(int)) {
- goto err_noexec;
- }
-
- buffer = (struct nlist*)xmalloc(hdrp->a_syms + size);
- if (buffer == NULL) {
- dln_errno = errno;
- return NULL;
- }
-
- lseek(fd, disp + N_SYMOFF(*hdrp), 0);
- if (read(fd, buffer, hdrp->a_syms + size) != hdrp->a_syms + size) {
- free(buffer);
- goto err_noexec;
- }
-
- sym = buffer;
- end = sym + hdrp->a_syms / sizeof(struct nlist);
- displ = (long)buffer + (long)(hdrp->a_syms);
-
- while (sym < end) {
- sym->n_un.n_name = (char*)sym->n_un.n_strx + displ;
- sym++;
- }
- return buffer;
-
- err_noexec:
- dln_errno = DLN_ENOEXEC;
- return NULL;
-}
-
-static st_table *
-sym_hash(struct exec *hdrp, struct nlist *syms)
-{
- st_table *tbl;
- struct nlist *sym = syms;
- struct nlist *end = syms + (hdrp->a_syms / sizeof(struct nlist));
-
- tbl = st_init_strtable();
- if (tbl == NULL) {
- dln_errno = errno;
- return NULL;
- }
-
- while (sym < end) {
- st_insert(tbl, sym->n_un.n_name, sym);
- sym++;
- }
- return tbl;
-}
-
-static int
-dln_init(const char *prog)
-{
- char *file, fbuf[MAXPATHLEN];
- int fd;
- struct exec hdr;
- struct nlist *syms;
-
- if (dln_init_p == 1) return 0;
-
- file = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf));
- if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
- dln_errno = errno;
- return -1;
- }
-
- if (load_header(fd, &hdr, 0) == -1) return -1;
- syms = load_sym(fd, &hdr, 0);
- if (syms == NULL) {
- close(fd);
- return -1;
- }
- sym_tbl = sym_hash(&hdr, syms);
- if (sym_tbl == NULL) { /* file may be start with #! */
- char c = '\0';
- char buf[MAXPATHLEN];
- char *p;
-
- free(syms);
- lseek(fd, 0L, 0);
- if (read(fd, &c, 1) == -1) {
- dln_errno = errno;
- return -1;
- }
- if (c != '#') goto err_noexec;
- if (read(fd, &c, 1) == -1) {
- dln_errno = errno;
- return -1;
- }
- if (c != '!') goto err_noexec;
-
- p = buf;
- /* skip forwarding spaces */
- while (read(fd, &c, 1) == 1) {
- if (c == '\n') goto err_noexec;
- if (c != '\t' && c != ' ') {
- *p++ = c;
- break;
- }
- }
- /* read in command name */
- while (read(fd, p, 1) == 1) {
- if (*p == '\n' || *p == '\t' || *p == ' ') break;
- p++;
- if (p-buf >= MAXPATHLEN) {
- dln_errno = ENAMETOOLONG;
- return -1;
- }
- }
- *p = '\0';
-
- return dln_init(buf);
- }
- dln_init_p = 1;
- undef_tbl = st_init_strtable();
- close(fd);
- return 0;
-
- err_noexec:
- close(fd);
- dln_errno = DLN_ENOEXEC;
- return -1;
-}
-
-static long
-load_text_data(int fd, struct exec *hdrp, int bss, long disp)
-{
- int size;
- unsigned char* addr;
-
- lseek(fd, disp + N_TXTOFF(*hdrp), 0);
- size = hdrp->a_text + hdrp->a_data;
-
- if (bss == -1) size += hdrp->a_bss;
- else if (bss > 1) size += bss;
-
- addr = (unsigned char*)xmalloc(size);
- if (addr == NULL) {
- dln_errno = errno;
- return 0;
- }
-
- if (read(fd, addr, size) != size) {
- dln_errno = errno;
- free(addr);
- return 0;
- }
-
- if (bss == -1) {
- memset(addr + hdrp->a_text + hdrp->a_data, 0, hdrp->a_bss);
- }
- else if (bss > 0) {
- memset(addr + hdrp->a_text + hdrp->a_data, 0, bss);
- }
-
- return (long)addr;
-}
-
-static int
-undef_print(char *key, char *value)
-{
- fprintf(stderr, " %s\n", key);
- return ST_CONTINUE;
-}
-
-static void
-dln_print_undef(void)
-{
- fprintf(stderr, " Undefined symbols:\n");
- st_foreach(undef_tbl, undef_print, NULL);
-}
-
-static void
-dln_undefined(void)
-{
- if (undef_tbl->num_entries > 0) {
- fprintf(stderr, "dln: Calling undefined function\n");
- dln_print_undef();
- dln_exit(1);
- }
-}
-
-struct undef {
- char *name;
- struct relocation_info reloc;
- long base;
- char *addr;
- union {
- char c;
- short s;
- long l;
- } u;
-};
-
-static st_table *reloc_tbl = NULL;
-static void
-link_undef(const char *name, long base, struct relocation_info *reloc)
-{
- static int u_no = 0;
- struct undef *obj;
- char *addr = (char*)(reloc->r_address + base);
-
- obj = (struct undef*)xmalloc(sizeof(struct undef));
- obj->name = strdup(name);
- obj->reloc = *reloc;
- obj->base = base;
- switch (R_LENGTH(reloc)) {
- case 0: /* byte */
- obj->u.c = *addr;
- break;
- case 1: /* word */
- obj->u.s = *(short*)addr;
- break;
- case 2: /* long */
- obj->u.l = *(long*)addr;
- break;
- }
- if (reloc_tbl == NULL) {
- reloc_tbl = st_init_numtable();
- }
- st_insert(reloc_tbl, u_no++, obj);
-}
-
-struct reloc_arg {
- const char *name;
- long value;
-};
-
-static int
-reloc_undef(int no, struct undef *undef, struct reloc_arg *arg)
-{
- int datum;
- char *address;
-#if defined(__sun) && defined(__sparc)
- unsigned int mask = 0;
-#endif
-
- if (strcmp(arg->name, undef->name) != 0) return ST_CONTINUE;
- address = (char*)(undef->base + undef->reloc.r_address);
- datum = arg->value;
-
- if (R_PCREL(&(undef->reloc))) datum -= undef->base;
-#if defined(__sun) && defined(__sparc)
- datum += undef->reloc.r_addend;
- datum >>= R_RIGHTSHIFT(&(undef->reloc));
- mask = (1 << R_BITSIZE(&(undef->reloc))) - 1;
- mask |= mask -1;
- datum &= mask;
- switch (R_LENGTH(&(undef->reloc))) {
- case 0:
- *address = undef->u.c;
- *address &= ~mask;
- *address |= datum;
- break;
- case 1:
- *(short *)address = undef->u.s;
- *(short *)address &= ~mask;
- *(short *)address |= datum;
- break;
- case 2:
- *(long *)address = undef->u.l;
- *(long *)address &= ~mask;
- *(long *)address |= datum;
- break;
- }
-#else
- switch (R_LENGTH(&(undef->reloc))) {
- case 0: /* byte */
- if (R_MEMORY_SUB(&(undef->reloc)))
- *address = datum - *address;
- else *address = undef->u.c + datum;
- break;
- case 1: /* word */
- if (R_MEMORY_SUB(&(undef->reloc)))
- *(short*)address = datum - *(short*)address;
- else *(short*)address = undef->u.s + datum;
- break;
- case 2: /* long */
- if (R_MEMORY_SUB(&(undef->reloc)))
- *(long*)address = datum - *(long*)address;
- else *(long*)address = undef->u.l + datum;
- break;
- }
-#endif
- free(undef->name);
- free(undef);
- return ST_DELETE;
-}
-
-static void
-unlink_undef(const char *name, long value)
-{
- struct reloc_arg arg;
-
- arg.name = name;
- arg.value = value;
- st_foreach(reloc_tbl, reloc_undef, &arg);
-}
-
-#ifdef N_INDR
-struct indr_data {
- char *name0, *name1;
-};
-
-static int
-reloc_repl(int no, struct undef *undef, struct indr_data *data)
-{
- if (strcmp(data->name0, undef->name) == 0) {
- free(undef->name);
- undef->name = strdup(data->name1);
- }
- return ST_CONTINUE;
-}
-#endif
-
-static int
-load_1(int fd, long disp, const char *need_init)
-{
- static const char *libc = LIBC_NAME;
- struct exec hdr;
- struct relocation_info *reloc = NULL;
- long block = 0;
- long new_common = 0; /* Length of new common */
- struct nlist *syms = NULL;
- struct nlist *sym;
- struct nlist *end;
- int init_p = 0;
-
- if (load_header(fd, &hdr, disp) == -1) return -1;
- if (INVALID_OBJECT(hdr)) {
- dln_errno = DLN_ENOEXEC;
- return -1;
- }
- reloc = load_reloc(fd, &hdr, disp);
- if (reloc == NULL) return -1;
-
- syms = load_sym(fd, &hdr, disp);
- if (syms == NULL) {
- free(reloc);
- return -1;
- }
-
- sym = syms;
- end = syms + (hdr.a_syms / sizeof(struct nlist));
- while (sym < end) {
- struct nlist *old_sym;
- int value = sym->n_value;
-
-#ifdef N_INDR
- if (sym->n_type == (N_INDR | N_EXT)) {
- char *key = sym->n_un.n_name;
-
- if (st_lookup(sym_tbl, sym[1].n_un.n_name, &old_sym)) {
- if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
- unlink_undef(key, old_sym->n_value);
- free(key);
- }
- }
- else {
- struct indr_data data;
-
- data.name0 = sym->n_un.n_name;
- data.name1 = sym[1].n_un.n_name;
- st_foreach(reloc_tbl, reloc_repl, &data);
-
- st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
- if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
- free(key);
- }
- }
- sym += 2;
- continue;
- }
-#endif
- if (sym->n_type == (N_UNDF | N_EXT)) {
- if (st_lookup(sym_tbl, sym->n_un.n_name, &old_sym) == 0) {
- old_sym = NULL;
- }
-
- if (value) {
- if (old_sym) {
- sym->n_type = N_EXT | N_COMM;
- sym->n_value = old_sym->n_value;
- }
- else {
- int rnd =
- value >= sizeof(double) ? sizeof(double) - 1
- : value >= sizeof(long) ? sizeof(long) - 1
- : sizeof(short) - 1;
-
- sym->n_type = N_COMM;
- new_common += rnd;
- new_common &= ~(long)rnd;
- sym->n_value = new_common;
- new_common += value;
- }
- }
- else {
- if (old_sym) {
- sym->n_type = N_EXT | N_COMM;
- sym->n_value = old_sym->n_value;
- }
- else {
- sym->n_value = (long)dln_undefined;
- st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
- }
- }
- }
- sym++;
- }
-
- block = load_text_data(fd, &hdr, hdr.a_bss + new_common, disp);
- if (block == 0) goto err_exit;
-
- sym = syms;
- while (sym < end) {
- struct nlist *new_sym;
- char *key;
-
- switch (sym->n_type) {
- case N_COMM:
- sym->n_value += hdr.a_text + hdr.a_data;
- case N_TEXT|N_EXT:
- case N_DATA|N_EXT:
-
- sym->n_value += block;
-
- if (st_lookup(sym_tbl, sym->n_un.n_name, &new_sym) != 0
- && new_sym->n_value != (long)dln_undefined) {
- dln_errno = DLN_ECONFL;
- goto err_exit;
- }
-
- key = sym->n_un.n_name;
- if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
- unlink_undef(key, sym->n_value);
- free(key);
- }
-
- new_sym = (struct nlist*)xmalloc(sizeof(struct nlist));
- *new_sym = *sym;
- new_sym->n_un.n_name = strdup(sym->n_un.n_name);
- st_insert(sym_tbl, new_sym->n_un.n_name, new_sym);
- break;
-
- case N_TEXT:
- case N_DATA:
- sym->n_value += block;
- break;
- }
- sym++;
- }
-
- /*
- * First comes the text-relocation
- */
- {
- struct relocation_info * rel = reloc;
- struct relocation_info * rel_beg = reloc +
- (hdr.a_trsize/sizeof(struct relocation_info));
- struct relocation_info * rel_end = reloc +
- (hdr.a_trsize+hdr.a_drsize)/sizeof(struct relocation_info);
-
- while (rel < rel_end) {
- char *address = (char*)(rel->r_address + block);
- long datum = 0;
-#if defined(__sun) && defined(__sparc)
- unsigned int mask = 0;
#endif
- if (rel >= rel_beg)
- address += hdr.a_text;
-
- if (rel->r_extern) { /* Look it up in symbol-table */
- sym = &(syms[R_SYMBOL(rel)]);
- switch (sym->n_type) {
- case N_EXT|N_UNDF:
- link_undef(sym->n_un.n_name, block, rel);
- case N_EXT|N_COMM:
- case N_COMM:
- datum = sym->n_value;
- break;
- default:
- goto err_exit;
- }
- } /* end.. look it up */
- else { /* is static */
- switch (R_SYMBOL(rel)) {
- case N_TEXT:
- case N_DATA:
- datum = block;
- break;
- case N_BSS:
- datum = block + new_common;
- break;
- case N_ABS:
- break;
- }
- } /* end .. is static */
- if (R_PCREL(rel)) datum -= block;
-
-#if defined(__sun) && defined(__sparc)
- datum += rel->r_addend;
- datum >>= R_RIGHTSHIFT(rel);
- mask = (1 << R_BITSIZE(rel)) - 1;
- mask |= mask -1;
- datum &= mask;
-
- switch (R_LENGTH(rel)) {
- case 0:
- *address &= ~mask;
- *address |= datum;
- break;
- case 1:
- *(short *)address &= ~mask;
- *(short *)address |= datum;
- break;
- case 2:
- *(long *)address &= ~mask;
- *(long *)address |= datum;
- break;
- }
-#else
- switch (R_LENGTH(rel)) {
- case 0: /* byte */
- if (datum < -128 || datum > 127) goto err_exit;
- *address += datum;
- break;
- case 1: /* word */
- *(short *)address += datum;
- break;
- case 2: /* long */
- *(long *)address += datum;
- break;
- }
-#endif
- rel++;
- }
- }
-
- if (need_init) {
- int len;
- char **libs_to_be_linked = 0;
- char *buf;
-
- if (undef_tbl->num_entries > 0) {
- if (load_lib(libc) == -1) goto err_exit;
- }
-
- init_funcname(&buf, need_init);
- len = strlen(buf);
-
- for (sym = syms; sym<end; sym++) {
- char *name = sym->n_un.n_name;
- if (name[0] == '_' && sym->n_value >= block) {
- if (strcmp(name+1, "dln_libs_to_be_linked") == 0) {
- libs_to_be_linked = (char**)sym->n_value;
- }
- else if (strcmp(name+1, buf) == 0) {
- init_p = 1;
- ((int (*)())sym->n_value)();
- }
- }
- }
- if (libs_to_be_linked && undef_tbl->num_entries > 0) {
- while (*libs_to_be_linked) {
- load_lib(*libs_to_be_linked);
- libs_to_be_linked++;
- }
- }
- }
- free(reloc);
- free(syms);
- if (need_init) {
- if (init_p == 0) {
- dln_errno = DLN_ENOINIT;
- return -1;
- }
- if (undef_tbl->num_entries > 0) {
- if (load_lib(libc) == -1) goto err_exit;
- if (undef_tbl->num_entries > 0) {
- dln_errno = DLN_EUNDEF;
- return -1;
- }
- }
- }
- return 0;
-
- err_exit:
- if (syms) free(syms);
- if (reloc) free(reloc);
- if (block) free((char*)block);
- return -1;
-}
-
-static int target_offset;
-static int
-search_undef(const char *key, int value, st_table *lib_tbl)
-{
- long offset;
-
- if (st_lookup(lib_tbl, key, &offset) == 0) return ST_CONTINUE;
- target_offset = offset;
- return ST_STOP;
-}
-
-struct symdef {
- int rb_str_index;
- int lib_offset;
-};
-
-const char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH;
-
-static int
-load_lib(const char *lib)
-{
- char *path, *file, fbuf[MAXPATHLEN];
- char *envpath = 0;
- char armagic[SARMAG];
- int fd, size;
- struct ar_hdr ahdr;
- st_table *lib_tbl = NULL;
- int *data, nsym;
- struct symdef *base;
- char *name_base;
-
- if (dln_init_p == 0) {
- dln_errno = DLN_ENOINIT;
- return -1;
- }
-
- if (undef_tbl->num_entries == 0) return 0;
- dln_errno = DLN_EBADLIB;
-
- if (lib[0] == '-' && lib[1] == 'l') {
- long len = strlen(lib) + 4;
- char *p = alloca(len);
- snprintf(p, len, "lib%s.a", lib+2);
- lib = p;
- }
-
- /* library search path: */
- /* look for environment variable DLN_LIBRARY_PATH first. */
- /* then variable dln_librrb_ary_path. */
- /* if path is still NULL, use "." for path. */
- path = getenv("DLN_LIBRARY_PATH");
- if (path == NULL) path = dln_librrb_ary_path;
- else path = envpath = strdup(path);
-
- file = dln_find_file_r(lib, path, fbuf, sizeof(fbuf));
- if (envpath) free(envpath);
- fd = open(file, O_RDONLY);
- if (fd == -1) goto syserr;
- size = read(fd, armagic, SARMAG);
- if (size == -1) goto syserr;
-
- if (size != SARMAG) {
- dln_errno = DLN_ENOTLIB;
- goto badlib;
- }
- size = read(fd, &ahdr, sizeof(ahdr));
- if (size == -1) goto syserr;
- if (size != sizeof(ahdr) || sscanf(ahdr.ar_size, "%d", &size) != 1) {
- goto badlib;
- }
-
- if (strncmp(ahdr.ar_name, "__.SYMDEF", 9) == 0) {
- /* make hash table from __.SYMDEF */
-
- lib_tbl = st_init_strtable();
- data = (int*)xmalloc(size);
- if (data == NULL) goto syserr;
- size = read(fd, data, size);
- nsym = *data / sizeof(struct symdef);
- base = (struct symdef*)(data + 1);
- name_base = (char*)(base + nsym) + sizeof(int);
- while (nsym > 0) {
- char *name = name_base + base->rb_str_index;
-
- st_insert(lib_tbl, name, base->lib_offset + sizeof(ahdr));
- nsym--;
- base++;
- }
- for (;;) {
- target_offset = -1;
- st_foreach(undef_tbl, search_undef, lib_tbl);
- if (target_offset == -1) break;
- if (load_1(fd, target_offset, 0) == -1) {
- st_free_table(lib_tbl);
- free(data);
- goto badlib;
- }
- if (undef_tbl->num_entries == 0) break;
- }
- free(data);
- st_free_table(lib_tbl);
- }
- else {
- /* linear library, need to scan (FUTURE) */
-
- for (;;) {
- int offset = SARMAG;
- int found = 0;
- struct exec hdr;
- struct nlist *syms, *sym, *end;
-
- while (undef_tbl->num_entries > 0) {
- found = 0;
- lseek(fd, offset, 0);
- size = read(fd, &ahdr, sizeof(ahdr));
- if (size == -1) goto syserr;
- if (size == 0) break;
- if (size != sizeof(ahdr)
- || sscanf(ahdr.ar_size, "%d", &size) != 1) {
- goto badlib;
- }
- offset += sizeof(ahdr);
- if (load_header(fd, &hdr, offset) == -1)
- goto badlib;
- syms = load_sym(fd, &hdr, offset);
- if (syms == NULL) goto badlib;
- sym = syms;
- end = syms + (hdr.a_syms / sizeof(struct nlist));
- while (sym < end) {
- if (sym->n_type == N_EXT|N_TEXT
- && st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
- break;
- }
- sym++;
- }
- if (sym < end) {
- found++;
- free(syms);
- if (load_1(fd, offset, 0) == -1) {
- goto badlib;
- }
- }
- offset += size;
- if (offset & 1) offset++;
- }
- if (found) break;
- }
- }
- close(fd);
- return 0;
-
- syserr:
- dln_errno = errno;
- badlib:
- if (fd >= 0) close(fd);
- return -1;
-}
-
-static int
-load(const char *file)
-{
- int fd;
- int result;
-
- if (dln_init_p == 0) {
- if (dln_init(dln_argv0) == -1) return -1;
- }
- result = strlen(file);
- if (file[result-1] == 'a') {
- return load_lib(file);
- }
-
- fd = open(file, O_RDONLY);
- if (fd == -1) {
- dln_errno = errno;
- return -1;
- }
- result = load_1(fd, 0, file);
- close(fd);
-
- return result;
-}
-
-void*
-dln_sym(const char *name)
-{
- struct nlist *sym;
-
- if (st_lookup(sym_tbl, name, &sym))
- return (void*)sym->n_value;
- return NULL;
-}
-
-#endif /* USE_DLN_A_OUT */
-
#ifdef USE_DLN_DLOPEN
# include <dlfcn.h>
#endif
-#ifdef __hpux
-#include <errno.h>
-#include "dl.h"
-#endif
-
#if defined(_AIX)
#include <ctype.h> /* for isdigit() */
#include <errno.h> /* for global errno */
@@ -1108,10 +158,6 @@ dln_sym(const char *name)
#define NSLINKMODULE_OPTION_BINDNOW 1
#endif
#endif
-#else
-#ifdef MACOSX_DYLD
-#include <mach-o/dyld.h>
-#endif
#endif
#ifdef _WIN32
@@ -1128,46 +174,23 @@ dln_strerror(char *message, size_t size)
size_t len = snprintf(message, size, "%d: ", error);
#define format_message(sublang) FormatMessage(\
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, \
- NULL, error, MAKELANGID(LANG_NEUTRAL, (sublang)), \
- message + len, size - len, NULL)
+ FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, \
+ NULL, error, MAKELANGID(LANG_NEUTRAL, (sublang)), \
+ message + len, size - len, NULL)
if (format_message(SUBLANG_ENGLISH_US) == 0)
- format_message(SUBLANG_DEFAULT);
+ format_message(SUBLANG_DEFAULT);
for (p = message + len; *p; p++) {
- if (*p == '\n' || *p == '\r')
- *p = ' ';
+ if (*p == '\n' || *p == '\r')
+ *p = ' ';
}
return message;
}
#define dln_strerror() dln_strerror(message, sizeof message)
-#elif ! defined _AIX
+#elif defined USE_DLN_DLOPEN
static const char *
dln_strerror(void)
{
-#ifdef USE_DLN_A_OUT
- char *strerror();
-
- switch (dln_errno) {
- case DLN_ECONFL:
- return "Symbol name conflict";
- case DLN_ENOINIT:
- return "No initializer given";
- case DLN_EUNDEF:
- return "Unresolved symbols";
- case DLN_ENOTLIB:
- return "Not a library file";
- case DLN_EBADLIB:
- return "Malformed library file";
- case DLN_EINIT:
- return "Not initialized";
- default:
- return strerror(dln_errno);
- }
-#endif
-
-#ifdef USE_DLN_DLOPEN
return (char*)dlerror();
-#endif
}
#endif
@@ -1181,18 +204,18 @@ aix_loaderror(const char *pathname)
snprintf(errbuf, sizeof(errbuf), "load failed - %s. ", pathname);
if (loadquery(L_GETMESSAGES, &message[0], sizeof(message)) != -1) {
- ERRBUF_APPEND("Please issue below command for detailed reasons:\n\t");
- ERRBUF_APPEND("/usr/sbin/execerror ruby ");
- for (i=0; message[i]; i++) {
- ERRBUF_APPEND("\"");
- ERRBUF_APPEND(message[i]);
- ERRBUF_APPEND("\" ");
- }
- ERRBUF_APPEND("\n");
+ ERRBUF_APPEND("Please issue below command for detailed reasons:\n\t");
+ ERRBUF_APPEND("/usr/sbin/execerror ruby ");
+ for (i=0; message[i]; i++) {
+ ERRBUF_APPEND("\"");
+ ERRBUF_APPEND(message[i]);
+ ERRBUF_APPEND("\" ");
+ }
+ ERRBUF_APPEND("\n");
}
else {
- ERRBUF_APPEND(strerror(errno));
- ERRBUF_APPEND("[loadquery failed]");
+ ERRBUF_APPEND(strerror(errno));
+ ERRBUF_APPEND("[loadquery failed]");
}
dln_loaderror("%s", errbuf);
}
@@ -1210,22 +233,22 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
desc = ImageDirectoryEntryToData(ext, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &size);
if (!desc) return 0;
while (desc->Name) {
- PIMAGE_THUNK_DATA pint = (PIMAGE_THUNK_DATA)((char *)ext + desc->Characteristics);
- PIMAGE_THUNK_DATA piat = (PIMAGE_THUNK_DATA)((char *)ext + desc->FirstThunk);
- for (; piat->u1.Function; piat++, pint++) {
- static const char prefix[] = "rb_";
- PIMAGE_IMPORT_BY_NAME pii;
- const char *name;
-
- if (IMAGE_SNAP_BY_ORDINAL(pint->u1.Ordinal)) continue;
- pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData);
- name = (const char *)pii->Name;
- if (strncmp(name, prefix, sizeof(prefix) - 1) == 0) {
- FARPROC addr = GetProcAddress(mine, name);
- if (addr) return (FARPROC)piat->u1.Function == addr;
- }
- }
- desc++;
+ PIMAGE_THUNK_DATA pint = (PIMAGE_THUNK_DATA)((char *)ext + desc->Characteristics);
+ PIMAGE_THUNK_DATA piat = (PIMAGE_THUNK_DATA)((char *)ext + desc->FirstThunk);
+ for (; piat->u1.Function; piat++, pint++) {
+ static const char prefix[] = "rb_";
+ PIMAGE_IMPORT_BY_NAME pii;
+ const char *name;
+
+ if (IMAGE_SNAP_BY_ORDINAL(pint->u1.Ordinal)) continue;
+ pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData);
+ name = (const char *)pii->Name;
+ if (strncmp(name, prefix, sizeof(prefix) - 1) == 0) {
+ FARPROC addr = GetProcAddress(mine, name);
+ if (addr) return (FARPROC)piat->u1.Function == addr;
+ }
+ }
+ desc++;
}
return 1;
}
@@ -1233,54 +256,92 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
#if defined(DLN_NEEDS_ALT_SEPARATOR) && DLN_NEEDS_ALT_SEPARATOR
#define translit_separator(src) do { \
- char *tmp = ALLOCA_N(char, strlen(src) + 1), *p = tmp, c; \
- do { \
- *p++ = ((c = *file++) == '/') ? DLN_NEEDS_ALT_SEPARATOR : c; \
- } while (c); \
- (src) = tmp; \
+ char *tmp = ALLOCA_N(char, strlen(src) + 1), *p = tmp, c; \
+ do { \
+ *p++ = ((c = *file++) == '/') ? DLN_NEEDS_ALT_SEPARATOR : c; \
+ } while (c); \
+ (src) = tmp; \
} while (0)
#else
#define translit_separator(str) (void)(str)
#endif
#ifdef USE_DLN_DLOPEN
+# include "ruby/internal/stdbool.h"
+# include "internal/warnings.h"
+static bool
+dln_incompatible_func(void *handle, const char *funcname, void *const fp, const char **libname)
+{
+ Dl_info dli;
+ void *ex = dlsym(handle, funcname);
+ if (!ex) return false;
+ if (ex == fp) return false;
+ if (dladdr(ex, &dli)) {
+ *libname = dli.dli_fname;
+ }
+ return true;
+}
+
COMPILER_WARNING_PUSH
#if defined(__clang__) || GCC_VERSION_SINCE(4, 2, 0)
COMPILER_WARNING_IGNORED(-Wpedantic)
#endif
static bool
-dln_incompatible_library_p(void *handle)
+dln_incompatible_library_p(void *handle, const char **libname)
{
- void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc");
- return ex && ex != ruby_xmalloc;
+#define check_func(func) \
+ if (dln_incompatible_func(handle, EXTERNAL_PREFIX #func, (void *)&func, libname)) \
+ return true
+ check_func(ruby_xmalloc);
+ return false;
}
COMPILER_WARNING_POP
#endif
-void*
-dln_load(const char *file)
+#if !defined(MAC_OS_X_VERSION_MIN_REQUIRED)
+/* assume others than old Mac OS X have no problem */
+# define dln_disable_dlclose() false
+
+#elif !defined(MAC_OS_X_VERSION_10_11) || \
+ (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11)
+/* targeting older versions only */
+# define dln_disable_dlclose() true
+
+#elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
+/* targeting newer versions only */
+# define dln_disable_dlclose() false
+
+#else
+/* support both versions, and check at runtime */
+# include <sys/sysctl.h>
+
+static bool
+dln_disable_dlclose(void)
{
-#if (defined _WIN32 || defined USE_DLN_DLOPEN) && defined RUBY_EXPORT
- static const char incompatible[] = "incompatible library version";
-#endif
-#if !defined(_AIX) && !defined(NeXT)
- const char *error = 0;
+ int mib[] = {CTL_KERN, KERN_OSREV};
+ int32_t rev;
+ size_t size = sizeof(rev);
+ if (sysctl(mib, numberof(mib), &rev, &size, NULL, 0)) return true;
+ if (rev < MAC_OS_X_VERSION_10_11) return true;
+ return false;
+}
#endif
-#if defined _WIN32
- HINSTANCE handle;
- WCHAR *winfile;
- char message[1024];
- void (*init_fct)();
- char *buf;
+#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
+static void *
+dln_open(const char *file)
+{
+ static const char incompatible[] = "incompatible library version";
+ const char *error = NULL;
+ void *handle;
- /* Load the file as an object one */
- init_funcname(&buf, file);
+#if defined(_WIN32)
+ char message[1024];
/* Convert the file path to wide char */
- winfile = rb_w32_mbstr_to_wstr(CP_UTF8, file, -1, NULL);
+ WCHAR *winfile = rb_w32_mbstr_to_wstr(CP_UTF8, file, -1, NULL);
if (!winfile) {
- dln_memerror();
+ dln_memerror();
}
/* Load file */
@@ -1288,184 +349,147 @@ dln_load(const char *file)
free(winfile);
if (!handle) {
- error = dln_strerror();
- goto failed;
+ error = dln_strerror();
+ goto failed;
}
-#if defined _WIN32 && defined RUBY_EXPORT
+# if defined(RUBY_EXPORT)
if (!rb_w32_check_imported(handle, rb_libruby_handle())) {
- FreeLibrary(handle);
- error = incompatible;
- goto failed;
+ FreeLibrary(handle);
+ error = incompatible;
+ goto failed;
}
-#endif
+# endif
- if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
- dln_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
+#elif defined(USE_DLN_DLOPEN)
+
+# ifndef RTLD_LAZY
+# define RTLD_LAZY 1
+# endif
+# ifdef __INTERIX
+# undef RTLD_GLOBAL
+# endif
+# ifndef RTLD_GLOBAL
+# define RTLD_GLOBAL 0
+# endif
+
+ /* Load file */
+ handle = dlopen(file, RTLD_LAZY|RTLD_GLOBAL);
+ if (handle == NULL) {
+ error = dln_strerror();
+ goto failed;
}
- /* Call the init code */
- (*init_fct)();
- return handle;
-#else
-#ifdef USE_DLN_A_OUT
- if (load(file) == -1) {
- error = dln_strerror();
- goto failed;
+# if defined(RUBY_EXPORT)
+ {
+ const char *libruby_name = NULL;
+ if (dln_incompatible_library_p(handle, &libruby_name)) {
+ if (dln_disable_dlclose()) {
+ /* dlclose() segfaults */
+ if (libruby_name) {
+ dln_fatalerror("linked to incompatible %s - %s", libruby_name, file);
+ }
+ dln_fatalerror("%s - %s", incompatible, file);
+ }
+ else {
+ dlclose(handle);
+ if (libruby_name) {
+ dln_loaderror("linked to incompatible %s - %s", libruby_name, file);
+ }
+ error = incompatible;
+ goto failed;
+ }
+ }
}
- return 0;
-#else
+# endif
+#endif
- char *buf;
- /* Load the file as an object one */
- init_funcname(&buf, file);
- translit_separator(file);
+ return handle;
-#ifdef USE_DLN_DLOPEN
-#define DLN_DEFINED
- {
- void *handle;
- void (*init_fct)();
+ failed:
+ dln_loaderror("%s - %s", error, file);
+}
-#ifndef RTLD_LAZY
-# define RTLD_LAZY 1
-#endif
-#ifdef __INTERIX
-# undef RTLD_GLOBAL
-#endif
-#ifndef RTLD_GLOBAL
-# define RTLD_GLOBAL 0
-#endif
+static void *
+dln_sym(void *handle, const char *symbol)
+{
+ void *func;
+ const char *error;
- /* Load file */
- if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
- error = dln_strerror();
- goto failed;
- }
-# if defined RUBY_EXPORT
- {
- if (dln_incompatible_library_p(handle)) {
-
-# if defined __APPLE__ && \
- defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
- (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11)
- /* dlclose() segfaults */
- rb_fatal("%s - %s", incompatible, file);
-# else
- dlclose(handle);
- error = incompatible;
- goto failed;
-# endif
- }
- }
-# endif
+#if defined(_WIN32)
+ char message[1024];
- init_fct = (void(*)())(VALUE)dlsym(handle, buf);
- if (init_fct == NULL) {
- const size_t errlen = strlen(error = dln_strerror()) + 1;
- error = memcpy(ALLOCA_N(char, errlen), error, errlen);
- dlclose(handle);
- goto failed;
- }
- /* Call the init code */
- (*init_fct)();
-
- return handle;
+ func = GetProcAddress(handle, symbol);
+ if (func == NULL) {
+ error = dln_strerror();
+ goto failed;
}
-#endif /* USE_DLN_DLOPEN */
-#ifdef __hpux
-#define DLN_DEFINED
- {
- shl_t lib = NULL;
- int flags;
- void (*init_fct)();
-
- flags = BIND_DEFERRED;
- lib = shl_load(file, flags, 0);
- if (lib == NULL) {
- extern int errno;
- dln_loaderror("%s - %s", strerror(errno), file);
- }
- shl_findsym(&lib, buf, TYPE_PROCEDURE, (void*)&init_fct);
- if (init_fct == NULL) {
- shl_findsym(&lib, buf, TYPE_UNDEFINED, (void*)&init_fct);
- if (init_fct == NULL) {
- errno = ENOSYM;
- dln_loaderror("%s - %s", strerror(ENOSYM), file);
- }
- }
- (*init_fct)();
- return (void*)lib;
+#elif defined(USE_DLN_DLOPEN)
+ func = dlsym(handle, symbol);
+ if (func == NULL) {
+ const size_t errlen = strlen(error = dln_strerror()) + 1;
+ error = memcpy(ALLOCA_N(char, errlen), error, errlen);
+ goto failed;
}
-#endif /* hpux */
+#endif
-#if defined(_AIX)
-#define DLN_DEFINED
- {
- void (*init_fct)();
-
- init_fct = (void(*)())load((char*)file, 1, 0);
- if (init_fct == NULL) {
- aix_loaderror(file);
- }
- if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) {
- aix_loaderror(file);
- }
- (*init_fct)();
- return (void*)init_fct;
- }
-#endif /* _AIX */
-
-#if defined(MACOSX_DYLD)
-#define DLN_DEFINED
-/*----------------------------------------------------
- By SHIROYAMA Takayuki Psi@fortune.nest.or.jp
-
- Special Thanks...
- Yu tomoak-i@is.aist-nara.ac.jp,
- Mi hisho@tasihara.nest.or.jp,
- sunshine@sunshineco.com,
- and... Miss ARAI Akino(^^;)
- ----------------------------------------------------*/
- {
- int dyld_result;
- NSObjectFileImage obj_file; /* handle, but not use it */
- /* "file" is module file name .
- "buf" is pointer to initial function name with "_" . */
+ return func;
- void (*init_fct)();
+ failed:
+ dln_loaderror("%s - %s", error, symbol);
+}
+#endif
+#if defined(RUBY_DLN_CHECK_ABI) && defined(USE_DLN_DLOPEN)
+static bool
+abi_check_enabled_p(void)
+{
+ const char *val = getenv("RUBY_ABI_CHECK");
+ return val == NULL || !(val[0] == '0' && val[1] == '\0');
+}
+#endif
- dyld_result = NSCreateObjectFileImageFromFile(file, &obj_file);
+void *
+dln_load(const char *file)
+{
+#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
+ void *handle = dln_open(file);
- if (dyld_result != NSObjectFileImageSuccess) {
- dln_loaderror("Failed to load %.200s", file);
- }
+#ifdef RUBY_DLN_CHECK_ABI
+ unsigned long long (*abi_version_fct)(void) = (unsigned long long(*)(void))dln_sym(handle, "ruby_abi_version");
+ unsigned long long binary_abi_version = (*abi_version_fct)();
+ if (binary_abi_version != ruby_abi_version() && abi_check_enabled_p()) {
+ dln_loaderror("incompatible ABI version of binary - %s", file);
+ }
+#endif
- NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW);
+ char *init_fct_name;
+ init_funcname(&init_fct_name, file);
+ void (*init_fct)(void) = (void(*)(void))dln_sym(handle, init_fct_name);
- /* lookup the initial function */
- if (!NSIsSymbolNameDefined(buf)) {
- dln_loaderror("Failed to lookup Init function %.200s",file);
- }
- init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf));
- (*init_fct)();
+ /* Call the init code */
+ (*init_fct)();
- return (void*)init_fct;
- }
-#endif
+ return handle;
-#ifndef DLN_DEFINED
+#elif defined(_AIX)
+ {
+ void (*init_fct)(void);
+
+ init_fct = (void(*)(void))load((char*)file, 1, 0);
+ if (init_fct == NULL) {
+ aix_loaderror(file);
+ }
+ if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) {
+ aix_loaderror(file);
+ }
+ (*init_fct)();
+ return (void*)init_fct;
+ }
+#else
dln_notimplement();
#endif
-#endif /* USE_DLN_A_OUT */
-#endif
-#if !defined(_AIX) && !defined(NeXT)
- failed:
- dln_loaderror("%s - %s", error, file);
-#endif
-
return 0; /* dummy return */
}
diff --git a/dln.h b/dln.h
index d98b2607e2..902f753450 100644
--- a/dln.h
+++ b/dln.h
@@ -1,3 +1,5 @@
+#ifndef DLN_H
+#define DLN_H
/**********************************************************************
dln.h -
@@ -9,24 +11,7 @@
**********************************************************************/
-#ifndef DLN_H
-#define DLN_H
-
-#ifdef __cplusplus
-# ifndef HAVE_PROTOTYPES
-# define HAVE_PROTOTYPES 1
-# endif
-# ifndef HAVE_STDARG_PROTOTYPES
-# define HAVE_STDARG_PROTOTYPES 1
-# endif
-#endif
-
-#undef _
-#ifdef HAVE_PROTOTYPES
-# define _(args) args
-#else
-# define _(args) ()
-#endif
+#include "ruby/defines.h" /* for RUBY_SYMBOL_EXPORT_BEGIN */
RUBY_SYMBOL_EXPORT_BEGIN
@@ -39,11 +24,6 @@ RUBY_SYMBOL_EXPORT_BEGIN
char *dln_find_exe_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
char *dln_find_file_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
-
-#ifdef USE_DLN_A_OUT
-extern char *dln_argv0;
-#endif
-
void *dln_load(const char*);
RUBY_SYMBOL_EXPORT_END
diff --git a/dln_find.c b/dln_find.c
index b08612764e..5d380f5d39 100644
--- a/dln_find.c
+++ b/dln_find.c
@@ -23,10 +23,6 @@
# include <stdlib.h>
#endif
-#ifdef USE_DLN_A_OUT
-char *dln_argv0;
-#endif
-
#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif
@@ -57,26 +53,26 @@ char *getenv();
#endif
static char *dln_find_1(const char *fname, const char *path, char *buf, size_t size, int exe_flag
- DLN_FIND_EXTRA_ARG_DECL);
+ DLN_FIND_EXTRA_ARG_DECL);
char *
dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
- DLN_FIND_EXTRA_ARG_DECL)
+ DLN_FIND_EXTRA_ARG_DECL)
{
char *envpath = 0;
if (!path) {
- path = getenv(PATH_ENV);
- if (path) path = envpath = strdup(path);
+ path = getenv(PATH_ENV);
+ if (path) path = envpath = strdup(path);
}
if (!path) {
- path =
- "/usr/local/bin" PATH_SEP
- "/usr/ucb" PATH_SEP
- "/usr/bin" PATH_SEP
- "/bin" PATH_SEP
- ".";
+ path =
+ "/usr/local/bin" PATH_SEP
+ "/usr/ucb" PATH_SEP
+ "/usr/bin" PATH_SEP
+ "/bin" PATH_SEP
+ ".";
}
buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
if (envpath) free(envpath);
@@ -85,7 +81,7 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
char *
dln_find_file_r(const char *fname, const char *path, char *buf, size_t size
- DLN_FIND_EXTRA_ARG_DECL)
+ DLN_FIND_EXTRA_ARG_DECL)
{
if (!path) path = ".";
return dln_find_1(fname, path, buf, size, 0 DLN_FIND_EXTRA_ARG);
@@ -93,8 +89,8 @@ dln_find_file_r(const char *fname, const char *path, char *buf, size_t size
static char *
dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
- int exe_flag /* non 0 if looking for executable. */
- DLN_FIND_EXTRA_ARG_DECL)
+ int exe_flag /* non 0 if looking for executable. */
+ DLN_FIND_EXTRA_ARG_DECL)
{
register const char *dp;
register const char *ep;
@@ -103,7 +99,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
size_t i, fnlen, fspace;
#ifdef DOSISH
static const char extension[][5] = {
- EXECUTABLE_EXTS,
+ EXECUTABLE_EXTS,
};
size_t j;
int is_abs = 0, has_path = 0;
@@ -114,21 +110,21 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
static const char pathname_too_long[] = "openpath: pathname too long (ignored)\n\
\tDirectory \"%.*s\"%s\n\tFile \"%.*s\"%s\n";
#define PATHNAME_TOO_LONG() dln_warning(dln_warning_arg pathname_too_long, \
- ((bp - fbuf) > 100 ? 100 : (int)(bp - fbuf)), fbuf, \
- ((bp - fbuf) > 100 ? "..." : ""), \
- (fnlen > 100 ? 100 : (int)fnlen), fname, \
- (fnlen > 100 ? "..." : ""))
+ ((bp - fbuf) > 100 ? 100 : (int)(bp - fbuf)), fbuf, \
+ ((bp - fbuf) > 100 ? "..." : ""), \
+ (fnlen > 100 ? 100 : (int)fnlen), fname, \
+ (fnlen > 100 ? "..." : ""))
#define RETURN_IF(expr) if (expr) return (char *)fname;
RETURN_IF(!fname);
fnlen = strlen(fname);
if (fnlen >= size) {
- dln_warning(dln_warning_arg
- "openpath: pathname too long (ignored)\n\tFile \"%.*s\"%s\n",
- (fnlen > 100 ? 100 : (int)fnlen), fname,
- (fnlen > 100 ? "..." : ""));
- return NULL;
+ dln_warning(dln_warning_arg
+ "openpath: pathname too long (ignored)\n\tFile \"%.*s\"%s\n",
+ (fnlen > 100 ? 100 : (int)fnlen), fname,
+ (fnlen > 100 ? "..." : ""));
+ return NULL;
}
#ifdef DOSISH
# ifndef CharNext
@@ -136,52 +132,52 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
# endif
# ifdef DOSISH_DRIVE_LETTER
if (((p[0] | 0x20) - 'a') < 26 && p[1] == ':') {
- p += 2;
- is_abs = 1;
+ p += 2;
+ is_abs = 1;
}
# endif
switch (*p) {
case '/': case '\\':
- is_abs = 1;
- p++;
+ is_abs = 1;
+ p++;
}
has_path = is_abs;
while (*p) {
- switch (*p) {
- case '/': case '\\':
- has_path = 1;
- ext = 0;
- p++;
- break;
- case '.':
- ext = p;
- p++;
- break;
- default:
- p = CharNext(p);
- }
+ switch (*p) {
+ case '/': case '\\':
+ has_path = 1;
+ ext = 0;
+ p++;
+ break;
+ case '.':
+ ext = p;
+ p++;
+ break;
+ default:
+ p = CharNext(p);
+ }
}
if (ext) {
- for (j = 0; STRCASECMP(ext, extension[j]); ) {
- if (++j == sizeof(extension) / sizeof(extension[0])) {
- ext = 0;
- break;
- }
- }
+ for (j = 0; STRCASECMP(ext, extension[j]); ) {
+ if (++j == sizeof(extension) / sizeof(extension[0])) {
+ ext = 0;
+ break;
+ }
+ }
}
ep = bp = 0;
if (!exe_flag) {
- RETURN_IF(is_abs);
+ RETURN_IF(is_abs);
}
else if (has_path) {
- RETURN_IF(ext);
- i = p - fname;
- if (i + 1 > size) goto toolong;
- fspace = size - i - 1;
- bp = fbuf;
- ep = p;
- memcpy(fbuf, fname, i + 1);
- goto needs_extension;
+ RETURN_IF(ext);
+ i = p - fname;
+ if (i + 1 > size) goto toolong;
+ fspace = size - i - 1;
+ bp = fbuf;
+ ep = p;
+ memcpy(fbuf, fname, i + 1);
+ goto needs_extension;
}
p = fname;
#endif
@@ -193,98 +189,104 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
#undef RETURN_IF
for (dp = path;; dp = ++ep) {
- register size_t l;
-
- /* extract a component */
- ep = strchr(dp, PATH_SEP[0]);
- if (ep == NULL)
- ep = dp+strlen(dp);
-
- /* find the length of that component */
- l = ep - dp;
- bp = fbuf;
- fspace = size - 2;
- if (l > 0) {
- /*
- ** If the length of the component is zero length,
- ** start from the current directory. If the
- ** component begins with "~", start from the
- ** user's $HOME environment variable. Otherwise
- ** take the path literally.
- */
-
- if (*dp == '~' && (l == 1 ||
+ register size_t l;
+
+ /* extract a component */
+ ep = strchr(dp, PATH_SEP[0]);
+ if (ep == NULL)
+ ep = dp+strlen(dp);
+
+ /* find the length of that component */
+ l = ep - dp;
+ bp = fbuf;
+ fspace = size - 2;
+ if (l > 0) {
+ /*
+ ** If the length of the component is zero length,
+ ** start from the current directory. If the
+ ** component begins with "~", start from the
+ ** user's $HOME environment variable. Otherwise
+ ** take the path literally.
+ */
+
+ if (*dp == '~' && (l == 1 ||
#if defined(DOSISH)
- dp[1] == '\\' ||
+ dp[1] == '\\' ||
#endif
- dp[1] == '/')) {
- char *home;
-
- home = getenv("HOME");
- if (home != NULL) {
- i = strlen(home);
- if (fspace < i)
- goto toolong;
- fspace -= i;
- memcpy(bp, home, i);
- bp += i;
- }
- dp++;
- l--;
- }
- if (l > 0) {
- if (fspace < l)
- goto toolong;
- fspace -= l;
- memcpy(bp, dp, l);
- bp += l;
- }
-
- /* add a "/" between directory and filename */
- if (ep[-1] != '/')
- *bp++ = '/';
- }
-
- /* now append the file name */
- i = fnlen;
- if (fspace < i) {
- toolong:
- PATHNAME_TOO_LONG();
- goto next;
- }
- fspace -= i;
- memcpy(bp, fname, i + 1);
+ dp[1] == '/')) {
+ const char *home;
+
+ home = getenv("HOME");
+ if (home != NULL) {
+ i = strlen(home);
+ if (fspace < i)
+ goto toolong;
+ fspace -= i;
+ memcpy(bp, home, i);
+ bp += i;
+ }
+ dp++;
+ l--;
+ }
+ if (l > 0) {
+ if (fspace < l)
+ goto toolong;
+ fspace -= l;
+ memcpy(bp, dp, l);
+ bp += l;
+ }
+
+ /* add a "/" between directory and filename */
+ if (ep[-1] != '/')
+ *bp++ = '/';
+ }
+
+ /* now append the file name */
+ i = fnlen;
+ if (fspace < i) {
+ goto toolong;
+ }
+ fspace -= i;
+ memcpy(bp, fname, i + 1);
#if defined(DOSISH)
- if (exe_flag && !ext) {
- needs_extension:
- for (j = 0; j < sizeof(extension) / sizeof(extension[0]); j++) {
- if (fspace < strlen(extension[j])) {
- PATHNAME_TOO_LONG();
- continue;
- }
- strlcpy(bp + i, extension[j], fspace);
- if (stat(fbuf, &st) == 0)
- return fbuf;
- }
- goto next;
- }
+ if (exe_flag && !ext) {
+ goto needs_extension;
+ }
#endif
#ifndef S_ISREG
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
- if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) {
- if (exe_flag == 0) return fbuf;
- /* looking for executable */
- if (eaccess(fbuf, X_OK) == 0) return fbuf;
- }
+ if (stat(fbuf, &st) == 0 && S_ISREG(st.st_mode)) {
+ if (exe_flag == 0) return fbuf;
+ /* looking for executable */
+ if (eaccess(fbuf, X_OK) == 0) return fbuf;
+ }
next:
- /* if not, and no other alternatives, life is bleak */
- if (*ep == '\0') {
- return NULL;
- }
+ /* if not, and no other alternatives, life is bleak */
+ if (*ep == '\0') {
+ return NULL;
+ }
+ continue;
+
+ toolong:
+ PATHNAME_TOO_LONG();
+ goto next;
- /* otherwise try the next component in the search path */
+#if defined(DOSISH)
+ needs_extension:
+ for (j = 0; j < sizeof(extension) / sizeof(extension[0]); j++) {
+ if (fspace < strlen(extension[j])) {
+ PATHNAME_TOO_LONG();
+ continue;
+ }
+ strlcpy(bp + i, extension[j], fspace);
+ if (stat(fbuf, &st) == 0)
+ return fbuf;
+ }
+ goto next;
+#endif
+ /* otherwise try the next component in the search path */
}
}
diff --git a/dmyenc.c b/dmyenc.c
index 7e006e826c..75b8a2da43 100644
--- a/dmyenc.c
+++ b/dmyenc.c
@@ -5,6 +5,6 @@ void
Init_enc(void)
{
if (require("enc/encdb.so") == 1) {
- require("enc/trans/transdb.so");
+ require("enc/trans/transdb.so");
}
}
diff --git a/doc/.document b/doc/.document
index d739c9f6bc..f589dda07c 100644
--- a/doc/.document
+++ b/doc/.document
@@ -1,3 +1,9 @@
+*.md
+*.rb
*.rdoc
-NEWS-*
+contributing
+NEWS
syntax
+optparse
+rdoc
+yjit
diff --git a/doc/ChangeLog-0.60_to_1.1 b/doc/ChangeLog-0.60_to_1.1
index bd5f140dc3..59d195e780 100644
--- a/doc/ChangeLog-0.60_to_1.1
+++ b/doc/ChangeLog-0.60_to_1.1
@@ -28,7 +28,7 @@ Fri Aug 8 11:16:50 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
Thu Aug 7 11:40:01 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
- * variable.c (mod_constants): lists constants defiend in the
+ * variable.c (mod_constants): lists constants defined in the
modules/classes.
* variable.c (rb_const_set): no longer warns about constant
@@ -49,7 +49,7 @@ Mon Aug 4 11:50:28 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
classes (or modules) dynamically.
* variable.c (rb_class_path): scan class constants for anonymous
- classes/modules to make up pathes.
+ classes/modules to make up paths.
Wed Jul 30 08:45:12 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
@@ -76,7 +76,7 @@ Wed Jul 23 09:56:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
specified object.
* class.c (mod_instance_methods): returns list of method names of
- the class instnace.
+ the class instance.
Fri Jul 11 22:38:55 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
@@ -538,7 +538,7 @@ Wed Mar 12 10:20:30 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
Mon Mar 10 20:44:22 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
* re.c (reg_regsub): \& for substitution. \`, \', and \+ are
- avaiable also.
+ available also.
Thu Mar 6 01:47:03 1997 Yukihiro Matsumoto <matz@caelum.co.jp>
@@ -3573,7 +3573,7 @@ Fri Mar 17 15:56:44 1995 Yukihiro Matsumoto (matz@ix-02)
* dln.c: dlopenã®ã‚るマシンã§ã¯ãã¡ã‚‰ã‚’使ã†ã‚ˆã†ã«ï¼ŽãŸã ã—,ã¡ã‚ƒã‚“
ã¨å‹•ã„ã¦ã„ã‚‹ã‹ã©ã†ã‹ã¯è‡ªä¿¡ãŒãªã„.
- * regex.c: virtual concatinationã‚’ã‚„ã‚ãŸï¼Ž
+ * regex.c: virtual concatenationã‚’ã‚„ã‚ãŸï¼Ž
Thu Mar 16 11:32:57 1995 Yukihiro Matsumoto (matz@ix-02)
diff --git a/doc/ChangeLog-1.9.3 b/doc/ChangeLog-1.9.3
index eecfc44325..0f80eed2d5 100644
--- a/doc/ChangeLog-1.9.3
+++ b/doc/ChangeLog-1.9.3
@@ -5746,7 +5746,7 @@ Wed Mar 2 14:06:01 2011 NARUSE, Yui <naruse@ruby-lang.org>
Wed Mar 2 14:02:29 2011 Shota Fukumori <sorah@tubusu.net>
* test/testunit/test_parallel.rb(TestParallel#spawn_runner):
- Fix outputing empty line in running test.
+ Fix outputting empty line in running test.
* test/testunit/tests_for_parallel/test_third.rb: Remove `sleep`
@@ -5765,7 +5765,7 @@ Tue Mar 1 21:48:22 2011 Shota Fukumori <sorah@tubusu.net>
* test/testunit/test_parallel.rb(TestParallelWorker#test_quit_in_test):
Fix for above specification change.
* test/testunit/test_parallel.rb(TestParallel#spawn_runner):
- Fix outputing empty line in running test.
+ Fix outputting empty line in running test.
Tue Mar 1 20:51:57 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
@@ -7541,7 +7541,7 @@ Tue Jan 11 20:32:59 2011 Tanaka Akira <akr@fsij.org>
Tue Jan 11 13:06:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * array.c (rb_ary_resize): should care of embeded array when extending
+ * array.c (rb_ary_resize): should care of embedded array when extending
the array.
* array.c (rb_ary_resize): need to set capa when changing the real
@@ -9563,7 +9563,7 @@ Wed Nov 17 16:09:52 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
Wed Nov 17 16:04:23 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * test/ruby/envutil.rb (Test::Unit::Assersions#assert_warn):
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_warn):
new assertion to assert that a particular warning message is
displayed.
forward port from branches/ruby_1_9_2@29795.
@@ -9781,7 +9781,7 @@ Wed Nov 10 07:20:10 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Tue Nov 9 21:57:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dln.c (init_funcname): allocate and build initialization
- funciton name at once.
+ function name at once.
Tue Nov 9 21:14:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
@@ -23228,7 +23228,7 @@ Fri Sep 11 10:38:33 2009 URABE Shyouhei <shyouhei@ruby-lang.org>
* lib/net/http.rb (Net::HTTPHeader::encode_kvpair): also call to_s
to k. A patch from swdyh <youhei@gmail.com>
- http://github.com/swdyh/ruby/tree/c847f43c2ccb679b9ff728f8b1b16c6ceeb57f39
+ https://github.com/swdyh/ruby/tree/c847f43c2ccb679b9ff728f8b1b16c6ceeb57f39
Fri Sep 11 09:45:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
@@ -62969,7 +62969,7 @@ Thu Jul 12 12:24:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Jul 12 10:30:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread.c (thread_start_func_2): moved prototye from thread_*.ci.
+ * thread.c (thread_start_func_2): moved prototype from thread_*.ci.
* thread_pthread.ci (thread_start_func_2): not use a directive
inside a macro argument. [ruby-talk:258763]
@@ -73273,7 +73273,7 @@ Fri Nov 18 17:35:09 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/multi-tk.rb: add restriction to access the entried
command table and manipulate other IPs (for reason of security).
- Now, a IP object can be controlled by only its master IP or the
+ Now, an IP object can be controlled by only its master IP or the
default IP.
* ext/tk/lib/remote-tk.rb: add restriction to manipulate.
@@ -76346,7 +76346,7 @@ Tue Jul 5 14:52:56 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/validation.rb: ditto.
- * ext/tk/lib/tk/namespace.rb: arguemnts for TclTkIp#_merge_tklist
+ * ext/tk/lib/tk/namespace.rb: arguments for TclTkIp#_merge_tklist
should be UTF-8 strings.
Mon Jul 4 19:29:32 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
@@ -77285,7 +77285,7 @@ Sun May 15 09:57:30 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat May 14 23:59:11 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* error.c (exc_exception, {exit,name_err,syserr}_initialize): call
- Execption#initialize. fixed: [ruby-talk:142593]
+ Exception#initialize. fixed: [ruby-talk:142593]
Sat May 14 23:56:41 2005 Erik Huelsmann <ehuels@gmail.com>
@@ -77435,7 +77435,7 @@ Sat Apr 30 06:57:39 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
(suggested by Tatsuki Sugiura)
* lib/webrick/cgi.rb
- (WEBrick::CGI#initalize): set a dummy to @config[:ServerSoftware]
+ (WEBrick::CGI#initialize): set a dummy to @config[:ServerSoftware]
if SERVER_SOFTWARE environment variable is not given.
(WEBrick::CGI#start): req.path_info must be a String.
(WEBrick::CGI::Socket#request_line): treat REQUEST_METHOD, PATH_INFO
@@ -82696,7 +82696,7 @@ Tue Sep 14 20:24:49 2004 Minero Aoki <aamine@loveruby.net>
* ext/ripper/depend: Borland make does not accept pipes in
Makefile rules. [ruby-dev:24589]
- * ext/ripper/depend: separate rules for developpers.
+ * ext/ripper/depend: separate rules for developers.
* ext/ripper/Makefile.dev: new file.
@@ -82931,7 +82931,7 @@ Wed Sep 8 18:44:03 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
Wed Sep 8 15:19:49 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tcltklib/tcltklib.c (ip_init): cannot create a IP at level 4
+ * ext/tcltklib/tcltklib.c (ip_init): cannot create an IP at level 4
* ext/tk/lib/multi-tk.rb: improve 'exit' operation, security check,
and error treatment
@@ -88452,7 +88452,7 @@ Tue Dec 16 03:17:29 2003 why the lucky stiff <why@ruby-lang.org>
Tue Dec 16 01:14:44 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (catch_timer): check rb_thread_crtical in main native
+ * eval.c (catch_timer): check rb_thread_critical in main native
thread.
* eval.c (thread_timer): just sends signals periodically, to
@@ -92076,7 +92076,7 @@ Mon Sep 1 16:59:10 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_thread_start_0): should not error_print() within
terminated thread, because $stderr used by it might be
- overriden now. [ruby-dev:21280]
+ overridden now. [ruby-dev:21280]
Sun Aug 31 22:46:55 2003 WATANABE Hirofumi <eban@ruby-lang.org>
@@ -92616,7 +92616,7 @@ Fri Aug 8 03:22:28 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
Thu Aug 7 14:40:37 2003 WATANABE Hirofumi <eban@ruby-lang.org>
- * cygwin/GNUmakefile: better --disbale-shared option support.
+ * cygwin/GNUmakefile: better --disable-shared option support.
* cygwin/GNUmakefile: add forwarding DLL target for cygwin.
diff --git a/doc/ChangeLog-2.0.0 b/doc/ChangeLog-2.0.0
index a1a79b8dca..9e654db189 100644
--- a/doc/ChangeLog-2.0.0
+++ b/doc/ChangeLog-2.0.0
@@ -9758,7 +9758,7 @@ Thu Aug 23 16:20:04 2012 Koichi Sasada <ko1@atdot.net>
are b10.
If flonum is activated, then USE_FLONUM macro is 1.
I'll write detailed in this technique on
- https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
+ https://bugs.ruby-lang.org/projects/ruby-master/wiki/Flonum_tech
* benchmark/bmx_temp.rb: add an benchmark for simple
Float calculation.
@@ -13008,7 +13008,7 @@ Thu Jun 7 15:53:03 2012 Koichi Sasada <ko1@atdot.net>
* .gdbinit: add function `trace_machine_instructions' to trace
in native machine assemble.
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+ See https://bugs.ruby-lang.org/projects/ruby-master/wiki/MachineInstructionsTraceWithGDB
for more details.
Wed Jun 6 21:31:21 2012 Tanaka Akira <akr@fsij.org>
@@ -14711,7 +14711,7 @@ Fri Apr 27 01:45:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
(22) main thread waits at gvl_yield:112 (native_cond_wait)
As described above, the main thread can't escape from
rb_threadptr_execute_interrupts_common.
- See extended memo: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
+ See extended memo: http://bugs.ruby-lang.org/projects/ruby-master/wiki/R35480_ExtendedMemo
Fri Apr 27 07:15:07 2012 Tanaka Akira <akr@fsij.org>
@@ -16451,7 +16451,7 @@ Mon Mar 5 17:11:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
Exception#initialize doesn't use visible instance variable for
the exception message, so call the method with the message.
patched by Jingwen Owen Ou <jingweno AT gmail.com>.
- http://github.com/ruby/ruby/pull/41
+ https://github.com/ruby/ruby/pull/41
Mon Mar 5 16:50:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
@@ -16858,13 +16858,13 @@ Fri Feb 24 13:54:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
Fri Feb 24 12:07:34 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* lib/net/http.rb: Fix documentation. Patched from Florian Mhun
- via http://github.com/ruby/ruby/pull/96
+ via https://github.com/ruby/ruby/pull/96
Fri Feb 24 11:48:07 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* string.c (rb_str_prepend): Fix documentation for String#prepend.
- Patched from Franck Verrot via http://github.com/ruby/ruby/pull/98
- and Andrew Horsman via http://github.com/ruby/ruby/pull/55
+ Patched from Franck Verrot via https://github.com/ruby/ruby/pull/98
+ and Andrew Horsman via https://github.com/ruby/ruby/pull/55
Fri Feb 24 10:08:33 2012 Eric Hodel <drbrain@segment7.net>
diff --git a/doc/ChangeLog-2.1.0 b/doc/ChangeLog-2.1.0
index 76edfd3ce7..5b670b31c9 100644
--- a/doc/ChangeLog-2.1.0
+++ b/doc/ChangeLog-2.1.0
@@ -3596,7 +3596,7 @@ Tue Oct 22 19:19:05 2013 Koichi Sasada <ko1@atdot.net>
maintains all pages.
For example, pages are allocated from the heap_pages.
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
+ See https://bugs.ruby-lang.org/projects/ruby-master/wiki/GC_design
and https://bugs.ruby-lang.org/attachments/4015/data-heap_structure_with_multiple_heaps.png
for more details.
@@ -8612,7 +8612,7 @@ Wed Jul 17 14:31:13 2013 Koichi Sasada <ko1@atdot.net>
(4) heap::sorted is an array of "slots", sorted by an address of
slot::body.
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
+ See https://bugs.ruby-lang.org/projects/ruby-master/wiki/GC_design
for more details (figure).
* gc.c: Avoid "heaps" terminology. It is ambiguous.
diff --git a/doc/ChangeLog-2.3.0 b/doc/ChangeLog-2.3.0
index 7f3c4e672a..94996cffd0 100644
--- a/doc/ChangeLog-2.3.0
+++ b/doc/ChangeLog-2.3.0
@@ -170,7 +170,7 @@ Tue Dec 22 14:31:28 2015 Toru Iwase <tietew@tietew.net>
should return unfrozen new string.
[ruby-core:72426] [Bug #11858]
-Tue Dec 22 05:39:58 2015 Takashi Kokubun <takashikkbn@gmail.com>
+Tue Dec 22 05:39:58 2015 Takashi Kokubun <k0kubun@ruby-lang.org>
* ext/cgi/escape/escape.c (preserve_original_state): Preserve
original state for tainted and frozen. [Fix GH-1166]
@@ -208,7 +208,7 @@ Mon Dec 21 09:33:17 2015 Karol Bucek <kares@users.noreply.github.com>
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket): fix
NotImplementedError typo. [Fix GH-1165]
-Sun Dec 20 20:54:51 2015 Takashi Kokubun <takashikkbn@gmail.com>
+Sun Dec 20 20:54:51 2015 Takashi Kokubun <k0kubun@ruby-lang.org>
* cgi/escape/escape.c: Optimize CGI.escapeHTML for
ASCII-compatible encodings. [Fix GH-1164]
@@ -476,7 +476,7 @@ Tue Dec 15 17:57:57 2015 Martin Duerst <duerst@it.aoyama.ac.jp>
to the correct one in the IANA registry (IBM037)
and added an alias (ebcdic-cp-us)
-Tue Dec 15 16:19:26 2015 Takashi Kokubun <takashikkbn@gmail.com>
+Tue Dec 15 16:19:26 2015 Takashi Kokubun <k0kubun@ruby-lang.org>
* lib/erb.rb: Render erb with array buffer for function call optimization.
[fix GH-1143]
@@ -488,7 +488,7 @@ Tue Dec 15 13:50:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_oct): [DOC] mention radix indicators.
[ruby-core:71310] [Bug #11648]
-Tue Dec 15 12:20:30 2015 Takashi Kokubun <takashikkbn@gmail.com>
+Tue Dec 15 12:20:30 2015 Takashi Kokubun <k0kubun@ruby-lang.org>
* lib/erb.rb: Simplify regexp to optimize erb scanner.
[fix GH-1144]
@@ -2670,7 +2670,7 @@ Sat Nov 7 09:51:38 2015 Koichi Sasada <ko1@atdot.net>
* vm_trace.c (rb_threadptr_exec_event_hooks_orig):
maintain trace_running counter on internal events.
- This patch is made by Takashi Kokubun <takashikkbn@gmail.com>.
+ This patch is made by Takashi Kokubun <k0kubun@ruby-lang.org>.
[Bug #11603] https://github.com/ruby/ruby/pull/1059
Sat Nov 7 03:32:27 2015 Koichi Sasada <ko1@atdot.net>
@@ -5283,7 +5283,7 @@ Sat Aug 1 06:54:36 2015 Aaron Patterson <tenderlove@ruby-lang.org>
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): OpenSSL declares these
constants as longs, so we should follow that and use LONG2NUM.
- http://git.io/vOqxD
+ https://github.com/openssl/openssl/blob/34750dc25d74e3db4c1ba43cd219d3f4825e4c65/include/openssl/ssl.h#L391
Sat Aug 1 04:06:29 2015 Aaron Patterson <tenderlove@ruby-lang.org>
@@ -6754,7 +6754,8 @@ Thu Jul 2 09:51:44 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
Thu Jul 2 06:49:44 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* lib/rubygems: Update to RubyGems HEAD(c202db2).
- this version contains many enhancements see http://git.io/vtNwF
+ this version contains many enhancements see
+ https://github.com/rubygems/rubygems/blob/c202db2d681eb3c3a02f187d346fbb2e8d733b26/History.txt#L3
* test/rubygems: ditto.
Wed Jul 1 23:50:34 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
diff --git a/doc/ChangeLog-2.4.0 b/doc/ChangeLog-2.4.0
index 96b5ecb077..a297a579d1 100644
--- a/doc/ChangeLog-2.4.0
+++ b/doc/ChangeLog-2.4.0
@@ -792,7 +792,7 @@ Wed Oct 5 12:57:21 2016 Richard Schneeman <richard.schneeman+foo@gmail.com>
Wed Oct 5 11:47:19 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
- * io.c: Fixed equivalent ruby code with core implemention.
+ * io.c: Fixed equivalent ruby code with core implementation.
[fix GH-1429][ci skip] Patch by @sos4nt
Wed Oct 5 11:36:21 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
@@ -888,7 +888,7 @@ Sun Oct 2 02:03:06 2016 NAKAMURA Usaku <usa@ruby-lang.org>
Sat Oct 1 23:08:47 2016 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/date/date_parse.c (date_zone_to_diff): it's nonsence and really
+ * ext/date/date_parse.c (date_zone_to_diff): it's nonsense and really
harm that to use unary minus operator with unsigned value.
get rid of test failures introduced at r56312.
diff --git a/doc/ChangeLog-YARV b/doc/ChangeLog-YARV
index a8b999dff2..83df05c52c 100644
--- a/doc/ChangeLog-YARV
+++ b/doc/ChangeLog-YARV
@@ -493,7 +493,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* thread.c : remove some line break
- * yarvcore.c : reoder initialize sequence to mark main thread
+ * yarvcore.c : reorder initialize sequence to mark main thread
2006-08-18(Fri) 16:51:34 +0900 Koichi Sasada <ko1@atdot.net>
@@ -1481,7 +1481,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.c : ditto
- * yarvtest/test_thread.rb : separete assersions to tests
+ * yarvtest/test_thread.rb : separate assertions to tests
2006-02-21(Tue) 02:13:33 +900 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1503,7 +1503,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.c : support Proc#dup/clone, Binding#dup/clone
- * sample/test.rb : remove unsupport features (Proc as Binding)
+ * sample/test.rb : remove unsupported features (Proc as Binding)
2006-02-20(Mon) 16:28:59 +0900 Koichi Sasada <ko1@atdot.net>
@@ -1560,7 +1560,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvtest/test_thread.rb : add a test for above
* vm.h, vm.c, vm_dump.c, insns.def : add FRAME_MAGIC_LAMBDA and
- support return from lambda (especially retrun from method defined
+ support return from lambda (especially return from method defined
by "define_method")
* yarvtest/test_method.rb : add a test for above
@@ -1606,7 +1606,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* vm.c : "return" from lambda{} break block
- * eval.c : Unsupport Proc as Binding
+ * eval.c : Unsupported Proc as Binding
* test/ruby/test_eval.rb : apply above changes
@@ -3816,7 +3816,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-12-29(Thu) 12:27:12 +0900 Koichi Sasada <ko1@atdot.net>
* compile.c, yarvcore.h :
- remvoe needless yarv_iseq_t#rewind_frame_size
+ remove needless yarv_iseq_t#rewind_frame_size
2005-12-29(Thu) 11:17:58 +0900 Koichi Sasada <ko1@atdot.net>
@@ -4530,7 +4530,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* vm.c : fix return process
- * vm_macro.def : fix option prameters
+ * vm_macro.def : fix option parameters
* yarvtest/test_method.rb : add tests for above
@@ -4555,7 +4555,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* eval_intern.h : fix PASS_PASSED_BLOCK()
- * eval_load.c : fix re-enter require (temporalily)
+ * eval_load.c : fix re-enter require (temporarily)
* insns.def : permit re-open class when superclass is same
@@ -4729,7 +4729,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* eval.c, eval_intern.h, vm.c, eval_jump.h, yarvcore.h :
re-define PUSH/POP/EXEC/JUMP_TAG to use thread local tag
- * inits.c, yarvcore.c : fix boostrap
+ * inits.c, yarvcore.c : fix bootstrap
2005-10-03(Mon) 22:28:24 +0900 Koichi Sasada <ko1@atdot.net>
@@ -4909,7 +4909,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-09-14(Wed) 06:11:43 +0900 Koichi Sasada <ko1@atdot.net>
* yarvcore.h, vm_evalbody.h, vm.h, vm_dump.c,
- compile.c, yarvcore.c : use #ifdef insted of #if for recognize
+ compile.c, yarvcore.c : use #ifdef instead of #if for recognize
vm options
* vm_opts.h : fix default options
@@ -4973,13 +4973,13 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* common.mk : rule test -> test2, test1 -> test
- * compile.c : fix when clause bug and splat arugment
+ * compile.c : fix when clause bug and splat argument
2005-08-17(Wed) 05:22:31 +0900 Koichi Sasada <ko1@atdot.net>
* compile.c : fix block local parameter setting routine and support
- massign in block parameter initialze
+ massign in block parameter initialize
* yarvtest/test_yield.rb : add tests for above
@@ -5394,7 +5394,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* tmpl/vmtc.inc.tmpl : add const prefix
- * /rb/asm_parse.rb, extconf.rb : added and make assembler analised output
+ * /rb/asm_parse.rb, extconf.rb : added and make assembler analysed output
* opt_operand.def : add send operands unification
@@ -5654,7 +5654,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-03-01(Tue) 13:50:04 +0900 Koichi Sasada <ko1@atdot.net>
* yarvcore.c (yarvcore_eval_parsed) : added
- (separeted from yarvcore_eval)
+ (separated from yarvcore_eval)
* yarvcore.c, compile.c : iseq_translate_direct_threaded_code
is moved to compile.c
@@ -5806,7 +5806,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* compiled.c : add constant pool
- * vm_evalbody.inc, call_cfunc.inc, vm.c : separeted from vm.c
+ * vm_evalbody.inc, call_cfunc.inc, vm.c : separated from vm.c
* insns.def : fix return val
@@ -5840,7 +5840,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* depend : fixed for above
- * extconf.rb : add option --(enable|disalbe)-opt-insns-unification
+ * extconf.rb : add option --(enable|disable)-opt-insns-unification
2005-02-11(Fri) 12:14:39 +0900 Koichi Sasada <ko1@atdot.net>
@@ -5957,7 +5957,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* evalc.patch : fix for above
- * benchmark/bm_lists.rb : fix (unsupport block passing)
+ * benchmark/bm_lists.rb : fix (unsupported block passing)
* benchmark/run.rb : use full path to ruby
@@ -6014,7 +6014,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* test/test_block.rb (test_ifunc) : test for above
- * vm.c (get_block_objec, thread_make_env_object) : fixed bugs
+ * vm.c (get_block_object, thread_make_env_object) : fixed bugs
* test/test_bin.rb (test_xstr) : remove `ls` test
@@ -6067,7 +6067,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-01-04(Tue) 06:25:45 +0900 Koichi Sasada <ko1@atdot.net>
- * compile.h : COMPILE_ERROR break contol (instead of return)
+ * compile.h : COMPILE_ERROR break control (instead of return)
* compile.c : support NODE_MASGN
@@ -6108,7 +6108,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* insns.def : support super, zsuper (currently, super can't
handle with block)
- * test/test_bin.rb : add test for op_asgin2, op_assgin_and/or
+ * test/test_bin.rb : add test for op_assign2, op_assign_and/or
* test/test_class.rb : add test for super, zsuper
@@ -6272,7 +6272,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* opt_operand.def : add unification insn send
* rb/insns2vm.rb : define symbol instead of declare const
- variable (for more optmize on VC)
+ variable (for more optimize on VC)
* insns.def : move enter point in send
@@ -6322,7 +6322,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2004-12-02(Thu) 13:20:41 +0900 Koichi Sasada <ko1@atdot.net>
* yarvcore.c, vm.h, vm.c, insns.def, insnhelper.h, yarvutil.rb :
- add usage analisys framework
+ add usage analysis framework
* disasm.c : insn_operand_intern to separate function
@@ -6489,7 +6489,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2004-11-01(Mon) 04:45:54 +0900 Koichi Sasada <ko1@atdot.net>
* yarvcore.h, compile.c, debug.c, version.h :
- redesgin gc debug scheme (GC_CHECK())
+ redesign gc debug scheme (GC_CHECK())
* yarvcore.c : mark iseqobj->current_block on GC
@@ -6820,7 +6820,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* depend : add tbench rule
- * yarvcore.h : add 'exten ID idBackquote'
+ * yarvcore.h : add 'extern ID idBackquote'
2004-05-18(Tue) 00:09:48 +0900 Koichi Sasada <ko1@atdot.net>
diff --git a/doc/NEWS-2.0.0 b/doc/NEWS-2.0.0
deleted file mode 100644
index 414789dcd1..0000000000
--- a/doc/NEWS-2.0.0
+++ /dev/null
@@ -1,530 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.0.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file.
-
-== Changes since the 1.9.3 release
-
-=== Language changes
-
-* Added keyword arguments.
-
-* Added %i and %I for symbol list creation (similar to %w and %W).
-
-* Default source encoding is changed to UTF-8. (was US-ASCII)
-
-* No warning for unused variables starting with '_'
-
-=== Core classes updates (outstanding ones only)
-
-* ARGF
- * added method:
- * added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
- methods for IO.
-
-* Array
- * added method:
- * added Array#bsearch for binary search.
- * incompatible changes:
- * random parameter of Array#shuffle! and Array#sample now
- will be called with one argument, maximum value.
- * when given Range arguments, Array#values_at now returns nil for each
- value that is out-of-range.
-
-* Enumerable
- * added method:
- * added Enumerable#lazy method for lazy enumeration.
-
-* Enumerator
- * added method:
- * added Enumerator#size for lazy size evaluation.
- * extended method:
- * Enumerator.new accept an argument for lazy size evaluation.
- * new class Enumerator::Lazy for lazy enumeration
-
-* ENV
- * aliased method:
- * ENV.to_h is a new alias for ENV.to_hash
-
-* Fiber
- * incompatible changes:
- * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
-
-* File
- * extended method:
- * File.fnmatch? now expands braces in the pattern if
- File::FNM_EXTGLOB option is given.
-
-* GC
- * improvements:
- * introduced the bitmap marking which suppresses to copy a memory page
- with Copy-on-Write.
- * introduced the non-recursive marking which avoids unexpected stack overflow.
-
-* GC::Profiler
- * added method:
- * added GC::Profiler.raw_data which returns raw profile data for GC.
-
-* Hash
- * added method:
- * added Hash#to_h as explicit conversion method, like Array#to_a.
- * extended method:
- * Hash#default_proc= can be passed nil to clear the default proc.
-
-* IO
- * deprecated methods:
- * IO#lines, #bytes, #chars and #codepoints are deprecated.
-
-* Kernel
- * added method:
- * added Kernel#Hash conversion method like Array() or Float().
- * added Kernel#__dir__ which returns the absolute path of the
- directory of the file from which this method is called.
- * added Kernel#caller_locations which returns an array of
- frame information objects.
- * extended method:
- * Kernel#warn accepts multiple args in like puts.
- * Kernel#caller accepts second optional argument `n' which specify
- required caller size.
- * Kernel#to_enum and enum_for accept a block for lazy size evaluation.
- * incompatible changes:
- * system() and exec() close non-standard file descriptors
- (The default of :close_others option is changed to true by default.)
- * respond_to? against a protected method now returns false unless
- the second argument is true.
- * __callee__ has returned to the original behavior, and now
- returns the called name but not the original name in an
- aliased method.
- * Kernel#inspect does not call #to_s anymore
- (it used to call redefined #to_s).
-
-* LoadError
- * added method:
- * added LoadError#path method to return the file name that could not be
- loaded.
-
-* Module
- * added method:
- * added Module#prepend which is similar to Module#include,
- however a method in the prepended module overrides the
- corresponding method in the prepending module.
- * added Module.prepended and Module.prepend_features, similar
- to included and append_features.
- * added Module#refine, which extends a class or module locally.
- [experimental]
- * extended method:
- * Module#define_method accepts a UnboundMethod from a Module.
- * Module#const_get accepts a qualified constant string, e.g.
- Object.const_get("Foo::Bar::Baz")
-
-* Mutex
- * added method:
- * added Mutex#owned? which returns the mutex is held by current
- thread or not. [experimental]
- * incompatible changes:
- * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
- and Mutex#sleep are no longer allowed to be used from trap handler
- and raise a ThreadError in such case.
- * Mutex#sleep may spurious wakeup. Check after wakeup.
-
-* NilClass
- * added method:
- * added nil.to_h which returns {}
-
-* ObjectSpace::WeakMap
- * new low level class to hold weak references to objects.
-
-* Proc
- * incompatible change:
- * removed Proc#== and #eql? so two procs are == only when they are
- the same object.
-
-* Process
- * added method:
- * added getsid for getting session id (unix only).
-
-* Range
- * added method:
- * added Range#size for lazy size evaluation.
- * added Range#bsearch for binary search.
-
-* RubyVM (MRI specific)
- * added RubyVM::InstructionSequence.of to get the instruction sequence
- from a method or a block.
- * added RubyVM::InstructionSequence#path, #absolute_path, #label,
- #base_label and #first_lineno to retrieve information from where
- the instruction sequence was defined.
- * added Environment variables to specify stack usage:
- * RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
- default: 128KB (32bit CPU) or 256KB (64bit CPU).
- * RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
- creation. default: 512KB or 1024KB.
- * RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
- default: 64KB or 128KB.
- * RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
- creation. default: 256KB or 512KB.
- These variables are checked only at launched time.
- * added constant DEFAULT_PARAMS to get above default parameters.
-
-* Signal
- * added method:
- * added Signal.signame which returns signal name
-
- * incompatible changes:
- * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
- are specified.
-
-* String
- * added method:
- * added String#b returning a copied string whose encoding is ASCII-8BIT.
- * change return value:
- * String#lines now returns an array instead of an enumerator.
- * String#chars now returns an array instead of an enumerator.
- * String#codepoints now returns an array instead of an enumerator.
- * String#bytes now returns an array instead of an enumerator.
-
-* Struct
- * added method:
- * added Struct#to_h returning values with keys corresponding to the
- instance variable names.
-
-* Thread
- * added method:
- * added Thread#thread_variable_get for getting thread local variables
- (these are different than Fiber local variables).
- * added Thread#thread_variable_set for setting thread local variables.
- * added Thread#thread_variables for getting a list of the thread local
- variable keys.
- * added Thread#thread_variable? for testing to see if a particular thread
- variable has been set.
- * added Thread.handle_interrupt as well as instance and singleton methods
- pending_interrupt? for asynchronous handling of exceptions
- * added Thread#backtrace_locations which returns similar information of
- Kernel#caller_locations.
- * new class Thread::Backtrace::Location to hold backtrace location
- information. These are returned by Thread#backtrace_locations and
- Kernel#caller_locations.
- * incompatible changes:
- * Thread#join and Thread#value now raises a ThreadError if target thread
- is the current or main thread.
-
-* Time
- * change return value:
- * Time#to_s now returns US-ASCII encoding instead of BINARY.
-
-* TracePoint
- * new class. This class is replacement of set_trace_func.
- Easy to use and efficient implementation.
-
-* toplevel
- * added method:
- * added main.define_method which defines a global function.
- * added main.using, which imports refinements into the current file or
- eval string. [experimental]
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* Array#values_at
-
- See above.
-
-* String#lines
-* String#chars
-* String#codepoints
-* String#bytes
-
- These methods no longer return an Enumerator, although passing a
- block is still supported for backwards compatibility.
-
- Code like str.lines.with_index(1) { |line, lineno| ... } no longer
- works because str.lines returns an array. Replace lines with
- each_line in such cases.
-
-* IO#lines
-* IO#chars
-* IO#codepoints
-* IO#bytes
-* ARGF#lines
-* ARGF#chars
-* ARGF#bytes
-* StringIO#lines
-* StringIO#chars
-* StringIO#codepoints
-* StringIO#bytes
-* Zlib::GzipReader#lines
-* Zlib::GzipReader#bytes
-
- These methods are deprecated in favor of each_line, each_byte,
- each_char and each_codepoint.
-
-* Proc#==
-* Proc#eql?
-
- These methods were removed. Two procs are == only when they are
- the same object.
-
-* Fixnum
-* Bignum
-* Float
-
- Fixnums, Bignums and Floats are frozen.
-
-* Signal.trap
-
- See above.
-
-* Merge Onigmo.
- https://github.com/k-takata/Onigmo
-
-* The :close_others option is true by default for system() and exec().
- Also, the close-on-exec flag is set by default for all new file descriptors.
- This means file descriptors doesn't inherit to spawned process unless
- explicitly requested such as system(..., fd=>fd).
-
-* Kernel#respond_to? against a protected method now returns false
- unless the second argument is true.
-
-* Kernel#respond_to_missing?
-* Kernel#initialize_clone
-* Kernel#initialize_dup
-
- These methods are now private.
-
-* Thread#join, Thread#value
-
- See above.
-
-* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
-
- See above.
-
-=== Stdlib updates (outstanding ones only)
-
-* cgi
- * Add HTML5 tag maker.
- * CGI#header has been renamed to CGI#http_header and
- aliased to CGI#header.
- * When HTML5 tagmaker called, overwrite CGI#header,
- CGI#header function is to create a <header> element.
-
-* CSV
- * Removed CSV::dump and CSV::load to protect users from dangerous
- serialization vulnerability
-
-* iconv
- * Iconv has been removed. Use String#encode instead.
-
-* io/console
- * new methods:
- * added IO#cooked which sets the terminal to cooked mode within the given block.
- * added IO#cooked! which sets the terminal to cooked.
- * extended method:
- * IO#raw, IO#raw!, and IO#getch accept keyword arguments, :min and :time.
-
-* io/wait
- * new features:
- * added IO#wait_writable method.
- * added IO#wait_readable method as alias of IO#wait.
-
-* json
- * updated to 1.7.7.
-
-* net/http
- * new features:
- * Proxies are now automatically detected from the http_proxy environment
- variable. See Net::HTTP::new for details.
- * gzip and deflate compression are now requested for all requests by
- default. See Net::HTTP for details.
- * SSL sessions are now reused across connections for a single instance.
- This speeds up connection by using a previously negotiated session.
- * Requests may be created from a URI which sets the request_uri and host
- header of the request (but does not change the host connected to).
- * Responses contain the URI requested which allows easier implementation of
- redirect following.
- * new methods:
- * Net::HTTP#local_host
- * Net::HTTP#local_host=
- * Net::HTTP#local_port
- * Net::HTTP#local_port=
- * extended method:
- * Net::HTTP#connect uses local_host and local_port if specified.
-
-* net/imap
- * new methods:
- * Net::IMAP.default_port
- * Net::IMAP.default_imap_port
- * Net::IMAP.default_tls_port
- * Net::IMAP.default_ssl_port
- * Net::IMAP.default_imaps_port
-
-* objspace
- * new method:
- * ObjectSpace.reachable_objects_from(obj)
-
-* openssl
- * Consistently raise an error when trying to encode nil values. All instances
- of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
- instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
- raise NoMethodError in the same case. Constructing such values is still
- permitted.
- * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
- :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
- :TLSv1_1_client. The version being effectively used can be queried
- with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
- blacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and
- OpenSSL::SSL::OP_NO_TLSv1_2.
- * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
- may be set which gets called whenever a new handshake is negotiated. This
- also allows to programmatically decline (client) renegotiation attempts.
- * Support for "0/n" splitting of records as BEAST mitigation via
- OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
- * The default options for OpenSSL::SSL::SSLContext have changed to
- OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
- instead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for
- the BEAST attack by default.
- * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
- four characters long. This led to awkward situations where an export with
- a password with fewer than four characters was possible, but accessing the
- file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
- OpenSSL::PKey::EC therefore now enforce the same check when exporting a
- private key to PEM with a password - it has to be at least four characters
- long.
- * SSL/TLS support for the Next Protocol Negotiation extension. Supported
- with OpenSSL 1.0.1 and higher.
- * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
- is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
- manually in order to adapt to situations where FIPS mode would be an
- explicit requirement.
- * Authenticated Encryption with Associated Data (AEAD) is supported via
- Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
- Currently (OpenSSL 1.0.1c), only GCM mode is supported.
-
-* ostruct
- * new methods:
- * OpenStruct#[], []=
- * OpenStruct#each_pair
- * OpenStruct#eql?
- * OpenStruct#hash
- * OpenStruct#to_h converts the struct to a hash.
- * extended method:
- * OpenStruct.new also accepts an OpenStruct / Struct.
-
-* pathname
- * extended method:
- * Pathname#find returns an enumerator if no block is given.
-
-* rake
- * rake has been updated to version 0.9.5.
-
- This version is backwards-compatible with previous rake versions and
- contains many bug fixes.
-
- See
- http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list
- of changes in rake 0.9.3, 0.9.4 and 0.9.5.
-
-* RDoc
- * RDoc has been updated to version 4.0
-
- This version is largely backwards-compatible with previous rdoc versions.
- The most notable change is an update to the ri data format (ri data must
- be regenerated for gems shared across rdoc versions). Further API changes
- are internal and won't affect most users.
-
- Notable changes include:
-
- * Page support for ri. Try `ri ruby:` for a list of pages in ruby or
- `ri ruby:syntax/literals` for the syntax documentation for literals.
-
- This also works for gems such as `ri rspec:README` for the rspec gem's
- README file.
- * Markdown support. See ri RDoc::Markdown for details.
-
- See https://github.com/rdoc/rdoc/blob/master/History.rdoc for a full list
- of changes in rdoc 4.0.
-
-* resolv
- * new methods:
- * Resolv::DNS#timeouts=
- * Resolv::DNS::Config#timeouts=
-
-* rexml
- * REXML::Document#write supports Hash arguments.
- * REXML::Document#write supports new :encoding option. It changes
- XML document encoding. Without :encoding option, encoding in
- XML declaration is used for XML document encoding.
-
-* RubyGems
- * Updated to 2.0.0
-
- RubyGems 2.0.0 features the following improvements:
-
- * Improved support for default gems shipping with ruby 2.0.0+
- * A gem can have arbitrary metadata through Gem::Specification#metadata
- * `gem search` now defaults to --remote and is anchored like gem list.
- * Added --document to replace --rdoc and --ri. Use --no-document to
- disable documentation, --document=rdoc to only generate rdoc.
- * Only ri-format documentation is generated by default.
- * `gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML
- documentation.
-
- For an expanded list of updates and bug fixes see:
- https://github.com/rubygems/rubygems/blob/master/History.txt
-
-* shellwords
- * Shellwords#shellescape now stringifies the given object using to_s.
- * Shellwords#shelljoin accepts non-string objects in the given
- array, each of which is stringified using to_s.
-
-* stringio
- * deprecated methods:
- * StringIO#lines, #bytes, #chars and #codepoints are deprecated.
-
-* syslog
- * Added Syslog::Logger which provides a Logger API atop Syslog.
- * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
- are introduced for easy detection of available constants on a
- running system.
-
-* tmpdir
- * incompatible changes:
- * Dir.mktmpdir uses FileUtils.remove_entry instead of
- FileUtils.remove_entry_secure. This means that applications should not
- change the permission of the created temporary directory to make
- writable from other users.
-
-* yaml
- * Syck has been removed. YAML now completely depends on libyaml being
- installed.
- * libyaml is now bundled with ruby, for cases where the library is not
- installed locally.
-
-* zlib
- * Added streaming support for Zlib::Inflate and Zlib::Deflate. This allows
- processing of a stream without the use of large amounts of memory.
- * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
- * Zlib streams are now processed without the GVL. This allows gzip, zlib and
- deflate streams to be processed in parallel.
- * deprecated methods:
- * Zlib::GzipReader#lines and #bytes are deprecated.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* OpenStruct new methods can conflict with custom attributes named
- "each_pair", "eql?", "hash" or "to_h".
-
-* Dir.mktmpdir in lib/tmpdir.rb
-
- See above.
-
-=== C API updates
-
-* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
-
-* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
diff --git a/doc/NEWS-2.1.0 b/doc/NEWS-2.1.0
deleted file mode 100644
index 5d4152b8dc..0000000000
--- a/doc/NEWS-2.1.0
+++ /dev/null
@@ -1,376 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.1.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file.
-
-== Changes since the 2.0.0 release
-
-=== Language changes
-
-* Now the default values of keyword arguments can be omitted. Those
- "required keyword arguments" need giving explicitly at the call time.
-
-* Added suffixes for integer and float literals: 'r', 'i', and 'ri'.
- * "42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize,
- respectively. But exponential form with 'r' suffix like "6.022e+23r" is
- not accepted because it is misleading.
- * "42i" and "3.14i" are evaluated as Complex(0, 42) and Complex(0, 3.14),
- respectively.
- * "42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r),
- respectively.
-
-* def-expr now returns the symbol of its name instead of nil.
-
-=== Core classes updates (outstanding ones only)
-
-* Array
- * New methods
- * Array#to_h converts an array of key-value pairs into a Hash.
-
-* Binding
- * New methods
- * Binding#local_variable_get(symbol)
- * Binding#local_variable_set(symbol, obj)
- * Binding#local_variable_defined?(symbol)
-
-* Enumerable
- * New methods
- * Enumerable#to_h converts a list of key-value pairs into a Hash.
-
-* Exception
- * New methods
- * Exception#cause provides the previous exception which has been caught
- at where raising the new exception.
-
-* GC
- * improvements:
- * introduced the generational GC a.k.a RGenGC.
- * added environment variables:
- * RUBY_GC_HEAP_INIT_SLOTS
- * RUBY_GC_HEAP_FREE_SLOTS
- * RUBY_GC_HEAP_GROWTH_FACTOR
- * RUBY_GC_HEAP_GROWTH_MAX_SLOTS
- * RUBY_GC_MALLOC_LIMIT_MAX
- * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
- * RUBY_GC_OLDMALLOC_LIMIT
- * RUBY_GC_OLDMALLOC_LIMIT_MAX
- * RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
- * obsoleted environment variables:
- * RUBY_FREE_MIN (Use RUBY_GC_HEAP_FREE_SLOTS instead)
- * RUBY_HEAP_MIN_SLOTS (Use RUBY_GC_HEAP_INIT_SLOTS instead)
-
-* Integer
- * New methods
- * Fixnum#bit_length
- * Bignum#bit_length
- * Bignum performance improvement
- * Use GMP if available.
- GMP is used only for several operations:
- multiplication, division, radix conversion, GCD
-
-* IO
- * extended methods:
- * IO#seek supports SEEK_DATA and SEEK_HOLE as whence.
- * IO#seek accepts symbols (:CUR, :END, :SET, :DATA, :HOLE) for 2nd argument.
- * IO#read_nonblock accepts optional `exception: false` to return symbols
- * IO#write_nonblock accepts optional `exception: false` to return symbols
-
-* Kernel
- * New methods:
- * Kernel#singleton_method
-
-* Module
- * New methods:
- * Module#using, which activates refinements of the specified module only
- in the current class or module definition.
- * Module#singleton_class? returns true if the receiver is a singleton class
- or false if it is an ordinary class or module.
- * extended methods:
- * Module#refine is no longer experimental.
- * Module#include and Module#prepend are now public methods.
-
-* Mutex
- * misc
- * Mutex#owned? is no longer experimental.
-
-* Numeric
- * extended methods:
- * Numeric#step allows the limit argument to be omitted, in which
- case an infinite sequence of numbers is generated. Keyword
- arguments `to` and `by` are introduced for ease of use.
- `by` can be 0, in which case the same value will be generated
- indefinitely.
-
-* Process
- * New methods:
- * alternative methods to $0/$0=:
- * Process.argv0() returns the original value of $0.
- * Process.setproctitle() sets the process title without affecting $0.
- * Process.clock_gettime
- * Process.clock_getres
-
-* String
- * "literal".freeze is now optimized to return the same object
- * New methods:
- * String#scrub and String#scrub! verify and fix invalid byte sequence.
- If you want to use this function with older Ruby,
- consider to use string-scrub.gem.
-
-* Symbol
- * All symbols are now frozen.
-
-* pack/unpack (Array/String)
- * Q! and q! directives for long long type if platform has the type.
-
-* toplevel
- * extended methods:
- * main.using is no longer experimental. The method activates refinements
- in the ancestors of the argument module to support refinement
- inheritance by Module#include.
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* Hash
- * incompatible changes:
- * Hash#reject will return plain Hash object in the future versions, that
- is the original object's subclass, instance variables, default value,
- and taintedness will be no longer copied, so now warnings are emitted
- when called with such Hash.
-
-* IO
- * incompatible changes:
- * open ignore internal encoding if external encoding is ASCII-8BIT.
-
-* Kernel#eval, Kernel#instance_eval, and Module#module_eval.
- * Copies the scope information of the original environment, which means
- that private, protected, public, and module_function without arguments
- do not affect the environment outside the eval string.
- For example, `class Foo; eval "private"; def foo; end; end' doesn't make
- Foo#foo private.
-
-* Kernel#untrusted?, untrust, and trust
- * These methods are deprecated and their behavior is same as tainted?,
- taint, and untaint, respectively. If $VERBOSE is true, they show warnings.
-
-* Module#ancestors
- * The ancestors of a singleton class now include singleton classes,
- in particular itself.
-
-* Module#define_method and Object#define_singleton_method
- * Now they return the symbols of the defined methods, not the methods/procs
- themselves.
-
-* Numeric#quo
- * Raises TypeError instead of ArgumentError if the receiver doesn't have
- to_r method.
-
-* Proc
- * Returning from lambda proc now always exits from the Proc, not from the
- method where the lambda is created. Returning from non-lambda proc exits
- from the method, same as the former behavior.
-
-String
- * If invalid: :replace is specified for String#encode, replace
- invalid byte sequence even if the destination encoding equals to
- the source encoding.
-
-=== Stdlib updates (outstanding ones only)
-
-* CGI::Util
- * All class methods modulized.
-
-* Digest
- * extended methods:
- * Digest::Class.file takes optional arguments for its constructor
-
-* Matrix
- * Added Vector#cross_product.
-
-* Net::SMTP
- * Added Net::SMTP#rset to implement the RSET command
-
-* objspace
- * new method:
- * ObjectSpace.trace_object_allocations
- * ObjectSpace.trace_object_allocations_start
- * ObjectSpace.trace_object_allocations_stop
- * ObjectSpace.trace_object_allocations_clear
- * ObjectSpace.allocation_sourcefile
- * ObjectSpace.allocation_sourceline
- * ObjectSpace.allocation_class_path
- * ObjectSpace.allocation_method_id
- * ObjectSpace.allocation_generation
- * ObjectSpace.reachable_objects_from_root
- * ObjectSpace.dump
- * ObjectSpace.dump_all
-
-* OpenSSL::BN
- * extended methods:
- * OpenSSL::BN.new allows Fixnum/Bignum argument.
-
-* open-uri
- * Support multiple fields with same field name (like Set-Cookie).
-
-* Pathname
- * New methods:
- * Pathname#write
- * Pathname#binwrite
-
-* rake
- * Updated to 10.1.0. Major changes include removal of the class namespace,
- Rake::DSL to hold the rake DSL methods and removal of support for legacy
- rake features.
-
- For a complete list of changes since rake 0.9.6 see:
-
- http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html
-
- http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html
-
-* RbConfig
- * New constants:
- * RbConfig::SIZEOF is added to provide the size of C types.
-
-* RDoc
- * Updated to 4.1.0. Major enhancements include a modified default template
- * and accessibility enhancements.
-
- For a list of minor enhancements and bug fixes see:
- https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
-
-* Resolv
- * New methods:
- * Resolv::DNS.fetch_resource
- * One-shot multicast DNS support
- * Support LOC resources
-
-* REXML::Parsers::SAX2Parser
- * Fixes wrong number of arguments of entitydecl event. Document of the event
- says "an array of the entity declaration" but implementation passes two
- or more arguments. It is an implementation bug but it breaks backward
- compatibility.
-
-* REXML::Parsers::StreamParser
- * Supports "entity" event.
-
-* REXML::Text
- * REXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.
- * REXML::Text#<< supports not "raw" mode.
-
-* Rinda::RingServer, Rinda::RingFinger
- * Rinda now supports multicast sockets. See Rinda::RingServer and
- Rinda::RingFinger for details.
-
-* RubyGems
- * Updated to 2.2.0. Notable new features include:
-
- * Gemfile or gem.deps.rb support including Gem.file.lock (experimental)
- * Improved, iterative resolver (compared to RubyGems 2.1 and earlier)
- * Support for a sharing a GEM_HOME across ruby platforms and versions
-
- For a complete list of enhancements and bug fixes see:
- https://github.com/rubygems/rubygems/tree/master/History.txt
-
-* Set
- * New methods:
- * Set#intersect?
- * Set#disjoint?
-
-* Socket
- * New methods:
- * Socket.getifaddrs
-
-* StringScanner
- * extended methods:
- * StringScanner#[] supports named captures.
-
-* Syslog::Logger
- * Added facility.
-
-* Tempfile
- * New methods:
- * Tempfile.create
-
-* Timeout
- * The exception to terminate the given block can no longer be rescued
- inside the block, by default, unless the exception class is given
- explicitly.
-
-* TSort
- * New methods:
- * TSort.tsort
- * TSort.tsort_each
- * TSort.strongly_connected_components
- * TSort.each_strongly_connected_component
- * TSort.each_strongly_connected_component_from
-
-* WEBrick
- * The body of a response may now be a StringIO or other IO-like that responds
- to #readpartial and #read.
-
-* XMLRPC::Client
- * New methods:
- * XMLRPC::Client#http. It returns Net::HTTP for the client. Normally,
- it is not needed. It is useful when you want to change minor HTTP client
- options. You can change major HTTP client options by XMLRPC::Client
- methods. You should use XMLRPC::Client methods for changing major
- HTTP client options instead of XMLRPC::Client#http.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* Set
- * incompatible changes:
- * Set#to_set now returns self instead of generating a copy.
-
-* URI
- * incompatible changes:
- * URI.decode_www_form follows current WHATWG URL Standard.
- It gets encoding argument to specify the character encoding.
- It now allows loose percent encoded strings, but denies ;-separator.
- * URI.encode_www_form follows current WHATWG URL Standard.
- It gets encoding argument to convert before percent encode.
- UTF-16 strings aren't converted to UTF-8 before percent encode by default.
-
-* curses
- * Removed.
- curses is now available as a gem.
- See https://rubygems.org/gems/curses for details.
-
-=== Built-in global variables compatibility issues
-
-* $SAFE
- * $SAFE=4 is obsolete. If $SAFE is set to 4 or larger, an ArgumentError
- is raised.
-
-=== C API updates
-
-* rb_gc_set_params() is deprecated. This is only used in Ruby internal.
-
-* rb_gc_count() added. This returns the number of times GC occurred.
-
-* rb_gc_stat() added. This allows access to specific GC.stat() values from C
- without any allocation overhead.
-
-* rb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().
-
-* rb_postponed_job_register() added. Takes a function callback which is invoked
- when the VM is in a consistent state, i.e. to perform work from a C signal
- handler.
-
-* rb_profile_frames() added. Provides low-cost access to the current ruby stack
- for callstack profiling.
-
-* rb_tracepoint_new() supports new internal events accessible only from C:
- * RUBY_INTERNAL_EVENT_NEWOBJ
- * RUBY_INTERNAL_EVENT_FREEOBJ
- * RUBY_INTERNAL_EVENT_GC_START
- * RUBY_INTERNAL_EVENT_GC_END_MARK
- * RUBY_INTERNAL_EVENT_GC_END_SWEEP
- * Note that you *can not* specify "internal events" with normal events
- (such as RUBY_EVENT_CALL, RUBY_EVENT_RETURN) simultaneously.
diff --git a/doc/NEWS-2.2.0 b/doc/NEWS-2.2.0
deleted file mode 100644
index 5564c606ae..0000000000
--- a/doc/NEWS-2.2.0
+++ /dev/null
@@ -1,361 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.2.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file.
-
-== Changes since the 2.1.0 release
-
-=== Language changes
-
-* nil/true/false
- * nil/true/false objects are frozen. [Feature #8923]
-
-* Hash literal
- * Symbol key followed by a colon can be quoted. [Feature #4276]
-
-* default argument
- fixed a very longstanding bug that an optional argument was not
- accessible in its default value expression. [Bug #9593]
-
-=== Core classes updates (outstanding ones only)
-
-* Binding
- * New methods:
- * Binding#local_variables
- * Binding#receiver
-
-* Dir
- * New methods:
- * Dir#fileno
-
-* Enumerable
- * New methods:
- * Enumerable#slice_after
- * Enumerable#slice_when
- * Extended methods:
- * min, min_by, max and max_by supports optional argument to return
- multiple elements.
-
-* Float
- * New methods:
- * Float#next_float
- * Float#prev_float
-
-* File
- * New methods:
- * File.birthtime
- * File#birthtime
-
-* File::Stat
- * New methods:
- * File::Stat#birthtime
-
-* GC
- * GC.latest_gc_info returns :state to represent current GC status.
- * Improvements
- * Introduce incremental marking for major GC. [Feature #10137]
-
-* IO
- * Improvements
- * IO#read_nonblock and IO#write_nonblock for pipes on Windows are supported.
-
-* Kernel
- * New methods:
- * Kernel#itself
- * Improvements
- * Kernel#throw raises UncaughtThrowError, subclass of ArgumentError when
- there is no corresponding catch block, instead of ArgumentError.
-
-* Process
- * Extended method:
- * Process execution methods such as Process.spawn opens the file in write
- mode for redirect from [:out, :err].
-
-* String
- * New methods:
- * String#unicode_normalize
- * String#unicode_normalize!
- * String#unicode_normalized?
-
-* Symbol
- * Improvements
- * Most symbols which are returned by String#to_sym and
- String#intern are GC-able.
-
-* Method
- * New methods:
- * Method#curry([arity]) returns a curried Proc.
- * Method#super_method returns a Method of superclass, which would be called
- when super is used.
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* Enumerable
- * Enumerable#slice_before's state management deprecated.
- * Enumerable#chunk's state management deprecated.
-
-* GC
- * incompatible changes:
- * Rename GC.stat entries. [Feature #9924]
- See https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing
-
-* Hash
- * incompatible changes:
- * Change overriding policy for duplicated key. [Bug #10315]
- { **hash1, **hash2 } contains values of hash2 for duplicated keys.
-
-* IO
- * incompatible changes:
- * When flushing file IO with IO#flush, you cannot assume that the metadata
- of the file is updated immediately. On some platforms (especially
- Windows), it is delayed until the filesystem load is decreased.
- Use IO#fsync if you want to guarantee updating metadata.
-
-* Math
- * incompatible changes:
- * Math.log now raises Math::DomainError instead of returning NaN if the
- base is less than 0, and returns NaN instead of -infinity if both of
- two arguments are 0.
- * Math.atan2 now returns values like as expected by C99 if both two
- arguments are infinity.
-
-* Proc
- * incompatible changes:
- * ArgumentError is no longer raised when lambda Proc is passed as a
- block, and the number of yielded arguments does not match the formal
- arguments of the lambda, if just an array is yielded and its length
- matches.
-
-* Process
- * Process execution methods such as Process.spawn opens the file in write
- mode for redirect from [:out, :err].
- Before Ruby 2.2, it was opened in read mode.
-
-=== Stdlib updates (outstanding ones only)
-
-* Continuation
- * callcc is obsolete. use Fiber instead.
-
-* Digest
-
- * Digest() should now be thread-safe. If you have a problem with
- regard to on-demand loading under a multi-threaded environment,
- preload "digest/*" modules on boot or use this method instead of
- directly referencing Digest::*.
- * Digest::HMAC has been removed just as previously noticed.
-
-* DL
- * DL has been removed from stdlib. Please use Fiddle instead!
-
-* Etc
- * New methods:
- * Etc.uname
- * Etc.sysconf
- * Etc.confstr
- * IO#pathconf
- * Etc.nprocessors
-
-* Find, Pathname
- * Extended methods:
- * find method accepts "ignore_error" keyword argument.
-
-* Matrix
- * New methods:
- * Matrix#first_minor(row, column) returns the submatrix obtained
- by deleting the specified row and column.
- * Matrix#cofactor(row, column) returns the (row, column) cofactor
- which is obtained by multiplying the first minor by (-1)**(row + column).
- * Matrix#adjugate returns the adjugate of the matrix.
- * hstack and vstack are new instance and class methods to stack matrices
- horizontally and vertically.
- * Matrix#laplace_expansion(row_or_column: num) returns the laplace_expansion
- along the +num+ -th row or column.
- * Vector.basis(size:, index:) returns the specified basis vector.
- * Unary - and + added for Vector and Matrix.
- * Vector#cross_product generalized to arbitrary dimensions.
- * Vector#dot and #cross are aliases for #inner_product and #cross_product.
- * Vector#angle_with returns the angle with its argument
- * New instance and class method independent? to test linear independence.
-
-* Pathname
- * Pathname#/ is aliased to Pathname#+.
- * New methods:
- * Pathname#birthtime
-
-* Rake
- * Updated to Rake 10.4.0. For full release notes see:
-
- http://docs.seattlerb.org/rake/History_rdoc.html#label-10.4.0
-
-* RubyGems
- * Updated to RubyGems 2.4.2. For full release notes see:
-
- http://docs.seattlerb.org/rubygems/History_txt.html#label-2.4.2+%2F+2014-10-01
-
-* TSort
- * TSort.tsort_each, TSort.each_strongly_connected_component and
- TSort.each_strongly_connected_component_from returns an enumerator if
- no block given.
-
-* XMLRPC
- * Added new parser class named LibXMLStreamParser.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* lib/mathn.rb
- * Show deprecated warning [Feature #10169]
-
-* ext/date/lib/date/format.rb
- * Removed because it's empty file.
-
-* Digest
- * Digest::HMAC has finally ceased to exist. Use OpenSSL::HMAC or an external gem instead.
-
-* time.rb
- * Time.parse, Time.strptime, Time.rfc2822, Time.xmlschema may produce
- fixed-offset Time objects.
- It is happen when usual localtime doesn't preserve the offset from UTC.
- * Time.httpdate produces always UTC Time object.
- * Time.strptime raises ArgumentError when no date information.
-
-* lib/rational.rb
- * Removed because it is deprecated from 2009.
-
-* lib/complex.rb
- * Removed because it is deprecated from 2009.
-
-* lib/prettyprint.rb
- * Removed PrettyPrint#first?
-
-* lib/minitest/*.rb
- * Removed because it conflicts to minitest 5. [Feature #9711]
-
-* lib/test/**/*.rb
- * Removed because it conflicts to minitest 5, and it was just an wrapper
- of minitest 4. [Feature #9711]
-
-* lib/uri
- * support RFC 3986. [Feature #2542]
-
-* GServer
- * GServer is extracted to gserver gem. It's unmaintain code.
-
-* Logger
- * Logger::Application is extracted to logger-application gem. It's unmaintain code.
-
-* ObjectSpace (after requiring "objspace")
- * ObjectSpace.memsize_of(obj) returns a size includes sizeof(RVALUE).
- [Bug #8984]
-
-* Prime
- * incompatible changes:
- * Prime.prime? now returns false for negative numbers. This method
- should not be used to know the number is composite or not. [Bug #7395]
-
-* Psych
- * Removed Psych::EngineManager [Bug #8344]
-
-=== Built-in global variables compatibility issues
-
-=== C API updates
-
-* Deprecated APIs removed. [Feature #9502]
-
- Check_SafeStr -> SafeStringValue
- rb_check_safe_str -> SafeStringValue
- rb_quad_pack -> rb_integer_pack
- rb_quad_unpack -> rb_integer_unpack
- rb_read_check : access struct FILE internal. no replacement.
- rb_struct_iv_get : internal function. no replacement.
- struct rb_blocking_region_buffer : internal type. no replacement.
- rb_thread_blocking_region_begin -> rb_thread_call_without_gvl family
- rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
- TRAP_BEG -> rb_thread_call_without_gvl family
- TRAP_END -> rb_thread_call_without_gvl family
- rb_thread_select -> rb_thread_fd_select
- struct rb_exec_arg : internal type. no replacement.
- rb_exec : internal function. no replacement.
- rb_exec_arg_addopt : internal function. no replacement.
- rb_exec_arg_fixup : internal function. no replacement.
- rb_exec_arg_init : internal function. no replacement.
- rb_exec_err : internal function. no replacement.
- rb_fork : internal function. no replacement.
- rb_fork_err : internal function. no replacement.
- rb_proc_exec_n : internal function. no replacement.
- rb_run_exec_options : internal function. no replacement.
- rb_run_exec_options_err : internal function. no replacement.
- rb_thread_blocking_region -> rb_thread_call_without_gvl family
- rb_thread_polling -> rb_thread_wait_for
- rb_big2str0 : internal function. no replacement.
- rb_big2ulong_pack -> rb_integer_pack
- rb_gc_set_params : internal function. no replacement.
- rb_io_mode_flags -> rb_io_modestr_fmode
- rb_io_modenum_flags -> rb_io_oflags_fmode
-
-* struct RBignum is hidden. [Feature #6083]
- Use rb_integer_pack and rb_integer_unpack instead.
-
-* struct RRational is hidden. [Feature #9513]
- Use rb_rational_num and rb_rational_den instead.
-
-* rb_big_new and rb_big_resize takes a size_t instead of long.
-
-* rb_num2long returns a long instead of SIGNED_VALUE.
-
-* rb_num2ulong returns an unsigned long instead of VALUE.
-
-* st hash table uses power-of-two sizes for speed [Feature #9425].
- Lookups are 10-25% faster if using appropriate hash functions.
- However, weaknesses in hash distribution can no longer be masked
- by prime number-sized tables, so extensions may need to tweak
- hash functions to ensure good distribution.
-
-* rb_sym2str() added. This is almost same as `rb_id2str(SYM2ID(sym))`
- but not pinning a dynamic symbol.
-
-* rb_str_cat_cstr() added. This is same as `rb_str_cat2()`.
-
-* `rb_str_substr()` and `rb_str_subseq()` will share middle of a string,
- but not only the end of a string, in the future. Therefore, result
- strings may not be NUL-terminated, `StringValueCStr()` is needed
- calling to obtain a NUL-terminated C string.
-
-* rb_tracepoint_new() supports new internal events accessible only from C:
- * RUBY_INTERNAL_EVENT_GC_ENTER
- * RUBY_INTERNAL_EVENT_GC_EXIT
- r47528
-
-* rb_hash_delete() now does not call the block given to the current method.
-
-* rb_extract_keywords() and rb_get_kwargs() exported. See README.EXT
- for details.
-
-=== Build system updates
-
-* jemalloc is optionally supported via `./configure --with-jemalloc`
- jemalloc may be suitable when system malloc is slow or prone
- to fragmentation. [Feature #9113]
-
-=== Implementation changes
-
-* GC
- * Most symbols which are returned by String#to_sym and
- String#intern are GC-able [Feature #9634]
- * Introduce incremental marking for major GC. [Feature #10137]
- * Enable lazy sweep on GC caused by malloc().
-
-* VM
- * Use frozen string literals for Hash#[] and Hash#[]=
- * Fast keyword arguments passing [Feature #10440]
- * Allow to receive huge splatted array by a rest argument
- [Feature #10440]
-
-* Process
- * Process creation methods, such as spawn(), uses vfork() system call.
- vfork() is faster than fork() when the parent process uses huge memory.
diff --git a/doc/NEWS-2.3.0 b/doc/NEWS-2.3.0
deleted file mode 100644
index 489aba4a89..0000000000
--- a/doc/NEWS-2.3.0
+++ /dev/null
@@ -1,404 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.3.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
-
-== Changes since the 2.2.0 release
-
-=== Language changes
-
-* frozen-string-literal pragma:
-
- * new pragma, frozen-string-literal has been experimentally introduced.
- [Feature #8976]
- * besides, --enable/--disable=frozen-string-literal options also have
- been introduced. [Feature #8976]
- * command line options --debug or --debug=frozen-string-literal enable
- additional debugging mode which shows created location with at frozen
- object error (RuntimeError).
- [Feature #11725]
-
-* safe navigation operator:
-
- * new method call syntax, `object&.foo', method #foo is called on
- `object' if it is not nil.
- this is similar to `try!' in Active Support, except:
- * method name is syntactically required
- obj.try! {} # valid
- obj&. {} # syntax error
- * arguments are evaluated only if a call is made:
- obj.try!(:foo, bar()) # bar() is always evaluated
- obj&.foo(bar()) # bar() is conditionally evaluated
- * attribute assignment is valid
- obj&.attr += 1
- [Feature #11537]
-
-* the did_you_mean gem:
-
- * When a NameError or NoMethodError occurs because of a typo in the name,
- the did_you_mean gem automatically suggests other names similar to the
- method name.
-
- "Yuki".starts_with?("Y")
- # => NoMethodError: undefined method `starts_with?' for "Yuki":String
- # Did you mean? start_with?
-
-* indented here document:
-
- * new string literal, here document starts with `<<~`.
- refer doc/syntax/literals.rdoc for more details.
- [Feature #9098]
-
-=== Core classes updates (outstanding ones only)
-
-* ARGF
-
- * ARGF.read_nonblock supports `exception: false' like IO#read_nonblock.
- [Feature #11358]
-
-* Array
-
- * Array#bsearch_index [Feature #10730]
- * Array#dig [Feature #11643]
-
-* Comparable
-
- * Comparable#== no longer rescues exceptions [Feature #7688]
-
-* Encoding
-
- * new Encoding::IBM037 (alias ebcdic-cp-us; dummy)
-
-* Enumerable
-
- * Enumerable#grep_v is added as inverse version of Enumerable#grep.
- [Feature #11049]
- * Enumerable#chunk_while [Feature #10769]
-
-* Enumerator::Lazy
-
- * Enumerator::Lazy#grep_v [Feature #11773]
-
-* File
-
- * File.mkfifo [Feature #11536]
- * Add File::TMPFILE corresponding to O_TMPFILE
-
-* Hash
-
- * Hash#fetch_values [Feature #10017]
- * Hash#dig [Feature #11643]
- * Hash#<=, Hash#<, Hash#>=, Hash#> [Feature #10984]
- * Hash#to_proc [Feature #11653]
-
-* IO
-
- * new mode flag File::SHARE_DELETE is available.
- this flag means to permit deleting opened file on Windows, but currently
- this affect only files opened as binary. [Feature #11218]
-
- * new option parameter `flags' is added.
- this parameter is bitwise-ORed to oflags generated by normal mode argument.
- [Feature #11253]
-
- * IO#advise no longer raises Errno::ENOSYS in cases where it was
- detected at build time but not available at runtime. [Feature #11806]
-
-* Kernel
-
- * Kernel#loop, when stopped by a StopIteration exception, returns
- what the enumerator has returned instead of nil. [Feature #11498]
-
-* Module
- * Module#deprecate_constant [Feature #11398]
-
-* NameError
- * NameError#receiver is added to take the receiver object. [Feature #10881]
-
-* Numeric
-
- * Numeric#positive? and Numeric#negative? are added, which return
- true when the receiver is positive and negative respectively.
- [Feature #11151]
-
-* Proc
-
- * Proc#call (and also #[], #===, #yield) are optimized.
- Backtrace doesn't show each method (show block lines directly).
- TracePoint also ignores these calls. [Feature #11569]
-
-* Queue (Thread::Queue)
-
- * Queue#close is added to notice a termination. [Feature #10600]
-
-* Regexp/String: Updated Unicode version from 7.0.0 to 8.0.0
-
-* RubyVM::InstructionSequence
- * add the following methods as a primitive tool of iseq loader.
- See sample/iseq_loader.rb for usage.
- Note that loader does not have verifier so it is easy to cause
- critical problem by loading modified/broken binary data.
- See [Feature #11788] for more details. (experimental feature)
- * RubyVM::InstructionSequence#to_binary(extra_data = nil)
- * RubyVM::InstructionSequence.load_from_binary(binary)
- * RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
-
-* String
-
- * String#+@ and String#-@ are added to get mutable/frozen strings.
- [Feature #11782]
-
- * String.new now accepts new option parameter `encoding'.
- [Feature #11785]
-
-* Struct
- * Struct#dig [Feature #11688]
-
-* Thread
- * Thread#name, Thread#name= are added to handle thread names [Feature #11251]
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* Array
- * Array#select!, Array#keep_if, Array#reject!, and Array#delete_if
- no longer changes the receiver array instantly every time the
- block is called. [Feature #10714]
-
- * Array#flatten and Array#flatten! no longer try to call #to_ary
- method on elements beyond the given level. [Bug #10748]
-
- * Array#inspect doesn't raise error even if its content returns
- a string which is not compatible with Encoding.default_external
- as inspected result. [Feature #11801]
-
-* Enumerable
- * Enumerable#chunk and Enumerable#slice_before no longer takes the
- initial_state argument. [Feature #10958]
- Use a local variable instead to maintain a state.
-
-* File::Stat
- * On Windows File::Stat#ino always returned 0, but now returns
- BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low. [Feature #11216]
-
-* Hash
- * Hash#inspect doesn't raise error even if its content returns
- a string which is not compatible with Encoding.default_external
- as inspected result. [Feature #11801]
-
-* IO
- * IO#close doesn't raise when the IO object is closed. [Feature #10718]
- * IO#each_codepoint raises an exception at incomplete character
- before EOF when conversion takes place. [Bug #11444]
-
-* Module
- * Module#define_method and Object.define_singleton_method now
- require method body, Proc, Method, or a block, and raise
- ArgumentError if no block is given directly. [Bug #11283]
-
-* pack/unpack (Array/String)
- * j and J directives for pointer width integer type. [Feature #11215]
-
-
-=== Stdlib updates (outstanding ones only)
-
-* Logger
-
- * Logger#level= now supports symbol and string levels such as :debug, :info,
- :warn, :error, :fatal (case insensitive) [Feature #11695]
- * Logger#reopen is added to reopen a log device. [Feature #11696]
-
-* io/wait
- * IO#wait_readable no longer checks FIONREAD, it may be used for
- non-bytestream IO such as listen sockets.
-
-* Net::FTP
- * Net::FTP#mlst is added.
- * Net::FTP#mlsd is added.
-
-* nkf
- * Merge nkf 2.1.4.
-
-* ObjectSpace (objspace)
- * ObjectSpace.count_symbols is added.
- * ObjectSpace.count_imemo_objects is added.
- * ObjectSpace.internal_class_of is added.
- * ObjectSpace.internal_super_of is added.
-
-* OpenSSL
- * OpenSSL::SSL::SSLSocket#accept_nonblock and
- OpenSSL::SSL::SSLSocket#connect_nonblock supports `exception: false`.
- [Feature #10532]
-
-* Pathname
- * Pathname#descend and Pathname#ascend supported blockless form.
- [Feature #11052]
-
-* Socket
- * Socket#connect_nonblock, Socket#accept_nonblock,
- TCPServer#accept_nonblock, UNIXServer#accept_nonblock,
- BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock,
- BasicSocket#sendmsg_nonblock all support `exception: false` to return
- :wait_readable or :wait_writable symbols instead of raising
- IO::WaitReadable or IO::WaitWritable exceptions
- [Feature #10532] [Feature #11229]
- * BasicSocket#recv and BasicSocket#recv_nonblock allow an output
- String buffer argument like IO#read and IO#read_nonblock to reduce
- GC overhead [Feature #11242]
-
-* StringIO
- * In read-only mode, StringIO#set_encoding no longer sets the encoding
- of its buffer string. Setting the encoding of the string directly
- without StringIO#set_encoding may cause unpredictable behavior now.
- [Bug #11827]
-
-* timeout
- * Object#timeout is now warned as deprecated when called.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* ext/coverage/coverage.c
- * Coverage.peek_result: new method to allow coverage to be captured without
- stopping the coverage tool. [Feature #10816]
-
-* Fiddle
- * Fiddle::Function#call releases the GVL. [Feature #11607]
-
-* io-console
- * Update to io-console 0.4.5, and change the license to BSD 2-clause
- "Simplified" License.
-
-* lib/base64.rb
- * Base64.urlsafe_encode64: added a "padding" option to suppress
- the padding character ("="). [Feature #10740]
- * Base64.urlsafe_decode64: now it accepts not only correctly-padded
- input but also unpadded input. [Feature #10740]
-
-* lib/drb/drb.rb
- * removed unused argument. https://github.com/ruby/ruby/pull/515
-
-* lib/matrix.rb
- * Add Vector#round. https://github.com/ruby/ruby/pull/802
-
-* lib/webrick/utils.rb
- * removed unused argument. https://github.com/ruby/ruby/pull/356
-
-* Net::FTP
- * Connections are in passive mode per default now. The default mode can
- be changed by Net::FTP.default_passive=. [Feature #11612]
-
-* Net::HTTP
- * default value of Net::HTTP#open_timeout is now 60 (was nil).
-
-* Net::Telnet
- * Net::Telnet is extracted to net-telnet gem. It's unmaintain code.
- [Feature #11083]
-
-* Psych
- * Updated to Psych 2.0.17
-
-* Rake
- * Rake is removed from stdlib. [Feature #11025]
-
-* RDoc
- * Updated to RDoc 4.2.1. For full release notes see:
-
- https://github.com/rdoc/rdoc/blob/master/History.rdoc#421--2015-12-22
-
-* RubyGems
- * Updated to RubyGems 2.5.1. For full release notes see:
-
- http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
- and
- http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
-
-=== Built-in global variables compatibility issues
-
-* $SAFE
- * $SAFE=2 and $SAFE=3 are obsolete. If $SAFE is set to 2 or larger,
- an ArgumentError is raised. [Feature #5455]
-
-=== C API updates
-
-* rb_define_class_id_under() now raises a TypeError exception when the
- class is already defined but its superclass does not match the given
- superclass, as well as definitions in ruby level.
-
-* rb_timespec_now() is added to fetch current datetime as struct timespec.
- [Feature #11558]
-
-* rb_time_timespec_new() is added to create a time object with epoch,
- nanosecond, and UTC/localtime/time offset arguments. [Feature #11558]
-
-* rb_autoload() deprecated, use rb_funcall() instead. [Feature #11664]
-
-* rb_compile_error_with_enc(), rb_compile_error(), and rb_compile_bug()
- deprecated. these functions are exposed but only for internal use.
- external libraries should not use them.
-
-=== Supported platform changes
-
-* OS/2 is no longer supported
-
-* BeOS is no longer supported
-
-* Borland-C is no longer supported
-
-* Haiku now stable and best effort
-
-=== Implementation improvements
-
-* Optimize Proc#call to eliminate method frame construction.
- [Feature #11569]
-
-* Reconsidering method entry data structure.
- [Bug #11278]
-
-* Introducing new table data structure for ID keys tables used by
- method table and so on. New table structure is simple and fast
- than st_table. [Feature #11420]
-
-* Machine code level tuning for object allocation and method calling
- code. r52099, r52254
-
-* RubyVM::InstructionSequence is extended for future improvement.
- [Feature #11788]
-
-* Case dispatch is now optimized for all special constant literals
- including nil, true, and false. Previously, only literal strings,
- symbols, integers and floats compiled to optimized case dispatch.
- [Feature #11769]
-
-* Instance variables on non-pure Ruby classes (T_DATA, T_FILE,
- etc..) is less expensive to store than before. [Feature #11170]
-
-* All accesses to members of big Struct objects are performed in
- constant-time. Previously, Struct elements beyond the first 10
- elements used a linear scan. [Feature #10585]
-
-* The Set class got several speed up.
- [Misc #10754], [r52591]
-
-* Socket and I/O-related improvements
-
- * Calling overhead of most of new keyword-using I/O methods in
- [Feature #11229] is reduced by avoiding the inefficient C API
- to parse keywords. [Feature #11339]
-
- * The standard library is updated to use the improved
- exception-free non-blocking I/O from [Feature #11229].
- This has the additional benefit of quieter $DEBUG output in
- addition to reducing expensive exceptions. [Feature #11044]
-
- * (Linux-only) waiting on a single FD anywhere in the stdlib no longer
- uses select(2), making it immune to slowdowns with high-numbered FDs.
- [Feature #11081] [Feature #11377]
-
-* CGI.escapeHTML is optimized with C extension.
- https://github.com/ruby/ruby/pull/1164
diff --git a/doc/NEWS-2.4.0 b/doc/NEWS-2.4.0
deleted file mode 100644
index 28e855cde1..0000000000
--- a/doc/NEWS-2.4.0
+++ /dev/null
@@ -1,397 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.4.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
-
-== Changes since the 2.3.0 release
-
-=== Language changes
-
-* Multiple assignment in conditional expression is now allowed.
- [Feature #10617]
-
-* Refinements is enabled at method by Symbol#to_proc. [Feature #9451]
-
-* Refinements is enabled with Kernel#send and BasicObject#__send__.
- [Feature #11476]
-
-* Rescue modifier now applicable to method arguments.
- [Feature #12686]
-
-* Toplevel return is now allowed. [Feature #4840]
-
-=== Core classes updates (outstanding ones only)
-
-* Array
-
- * Array#concat [Feature #12333]
- Now takes multiple arguments.
-
- * Array#max and Array#min. [Feature #12172]
- This may cause a tiny incompatibility: if you redefine
- Enumerable#max and call max to an Array, your redefinition will be
- now ignored. You should also redefine Array#max.
-
- * Array#pack [Feature #12754]
- Now takes optional argument `buffer:' to reuse already allocated buffer.
-
- * Array#sum [Feature #12217]
- This is different from Enumerable#sum in that Array#sum doesn't depend on
- the definition of each method.
-
-* Comparable
-
- * Comparable#clamp. [Feature #10594]
-
-* Dir
-
- * Dir.empty?. [Feature #10121]
-
-* Enumerable
-
- * Enumerable#chunk called without a block now return an Enumerator
- [Feature #2172]
- * Enumerable#sum [Feature #12217]
- * Enumerable#uniq [Feature #11090]
-
-* Enumerator::Lazy
-
- * Enumerator::Lazy#chunk_while [GH-1186]
- * Enumerator::Lazy#uniq [Feature #11090]
-
-* File
-
- * File.empty?. [Feature #9969]
-
-* Float
-
- * Float#ceil, Float#floor, and Float#truncate now take an optional
- digits, as well as Float#round. [Feature #12245]
-
- * Float#round now takes an optional keyword argument, half option, and
- the default behavior is round-up. [Bug #12548] [Bug #12958]
- half option can be one of :even, :up, and :down. [Feature #12953]
-
-* Hash
-
- * Hash#compact and Hash#compact! [Feature #11818]
- * Hash#transform_values and Hash#transform_values! [Feature #12512]
-
-* Integer
-
- * Fixnum and Bignum are unified into Integer [Feature #12005]
-
- * Integer#ceil, Integer#floor, and Integer#truncate now take an optional
- digits, as well as Integer#round. [Feature #12245]
-
- * Integer#digits for extracting columns of place-value notation [Feature #12447]
-
- * Integer#round now takes an optional keyword argument, half option, and the
- default behavior is round-up now. [Bug #12548] [Bug #12958]
- half option can be one of :even, :up, and :down. [Feature #12953]
-
-* IO
-
- * IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach now takes
- an optional keyword argument, chomp flag. [Feature #12553]
-
-* Kernel
-
- * Kernel#clone now takes an optional keyword argument, freeze flag.
- [Feature #12300]
-
-* MatchData
-
- * MatchData#named_captures [Feature #11999]
- * MatchData#values_at supports named captures [Feature #9179]
-
-* Module
-
- * Module#refine accepts a module as the argument now. [Feature #12534]
- * Module.used_modules [Feature #7418]
-
-* Numeric
-
- * Numeric#finite?, Numeric#infinite? [Feature #12039]
-
-* Process
-
- * Support CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW, and
- CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12.
-
-* Rational
-
- * Rational#round now takes an optional keyword argument, half option, and
- the default behavior is round-up now. [Bug #12548] [Bug #12958]
- half option can be one of :even, :up, and :down. [Feature #12953]
-
-* Regexp
-
- * meta character \X matches Unicode 9.0 characters with some workarounds
- for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences.
-
- * Regexp#match? [Feature #8110]
- This returns bool and doesn't save backref.
-
- * Update to Onigmo 6.0.0.
-
-* Regexp/String: Update Unicode version from 8.0.0 to 9.0.0 [Feature #12513]
-
-* RubyVM::Env
-
- * RubyVM::Env was removed.
-
-* String
-
- * String#casecmp? [Feature #12786]
-
- * String#concat, String#prepend [Feature #12333]
- Now takes multiple arguments.
-
- * String#each_line, String#lines now takes an optional keyword argument,
- chomp flag. [Feature #12553]
-
- * String#match? [Feature #12898]
-
- * String#unpack1 [Feature #12752]
-
- * String#upcase, String#downcase, String#capitalize, String#swapcase and
- their bang variants work for all of Unicode, and are no longer limited
- to ASCII. Supported encodings are UTF-8, UTF-16BE/LE, UTF-32BE/LE, and
- ISO-8859-1~16. Variations are available with options. See the documentation
- of String#downcase for details. [Feature #10085]
-
- * String.new(capacity: size) [Feature #12024]
-
-* StringIO
-
- * StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines now takes
- an optional keyword argument, chomp flag. [Feature #12553]
-
-* Symbol
-
- * Symbol#casecmp? [Feature #12786]
-
- * Symbol#match now returns MatchData. [Bug #11991]
-
- * Symbol#match? [Feature #12898]
-
- * Symbol#upcase, Symbol#downcase, Symbol#capitalize, and Symbol#swapcase now
- work for all of Unicode. See the documentation of String#downcase
- for details. [Feature #10085]
-
-* Thread
-
- * Thread#report_on_exception and Thread.report_on_exception
- [Feature #6647]
-
-* TracePoint
-
- * TracePoint#callee_id [Feature #12747]
-
-* Warning
-
- * New module named Warning is introduced. By default it has only
- one singleton method, named warn. This makes it possible for
- 3rd-party libraries to control the way warnings are handled.
- [Feature #12299]
-
-=== Stdlib updates (outstanding ones only)
-
-* CGI
-
- * Don't allow , as a separator [Bug #12791]
-
-* CSV
-
- * Add a liberal_parsing option. [Feature #11839]
-
-* IPAddr
-
- * IPAddr#== and IPAddr#<=> no longer raise an exception if coercion fails.
- [Bug #12799]
-
-* IRB
-
- * Binding#irb: Start a REPL session like `binding.pry` at r56624.
-
-* Logger
-
- * Allow specifying logger parameters in constructor such
- as level, progname, datetime_format, formatter. [Feature #12224]
- * Add shift_period_suffix option. [Feature #10772]
-
-* Net::HTTP
-
- * New method: Net::HTTP.post [Feature #12375]
-
-* Net::FTP
-
- * Support TLS (RFC 4217).
- * Support hash style options for Net::FTP.new.
- * Add a new optional argument pathname to Net::FTP#status.
- Contributed by soleboxy. [GH-1478] [Feature #12965]
-
-* OpenSSL
-
- * Includes Ruby/OpenSSL 2.0. OpenSSL has been extracted as a Gem and is
- maintained at a separate repository now: https://github.com/ruby/openssl.
- It still remains as a 'default gem'. [Feature #9612]
- Refer to ext/openssl/History.md for the full release note.
-
-* optparse
-
- * Add an into option. [Feature #11191]
-
-* pathname
-
- * New method: Pathname#empty? [Feature #12596]
-
-* Readline
-
- * Readline.quoting_detection_proc and Readline.quoting_detection_proc=
- [Feature #12659]
-
-* REXML
-
- * REXML::Element#[]: If String or Symbol is specified, attribute
- value is returned. Otherwise, Nth child is returned. This is
- backward compatible change.
-
-* set
-
- * New methods: Set#compare_by_identity and Set#compare_by_identity?.
- [Feature #12210]
-
-* WEBrick
-
- * Don't allow , as a separator [Bug #12791]
-
-=== Compatibility issues (excluding feature bug fixes)
-
-* Array#sum and Enumerable#sum are implemented. [Feature #12217]
- Ruby itself has no compatibility problem because Ruby didn't have sum method
- for arrays before Ruby 2.4.
- However many third party gems, activesupport, facets, simple_stats, etc,
- defines sum method. These implementations are mostly compatible but
- there are subtle differences.
- Ruby's sum method should be mostly compatible but it is impossible to
- be perfectly compatible with all of them.
-
-* Fixnum and Bignum are unified into Integer [Feature #12005]
- Fixnum class and Bignum class is removed.
- Integer class is changed from abstract class to concrete class.
- For example, 0 is an instance of Integer: 0.class returns Integer.
- The constants Fixnum and Bignum is bound to Integer.
- So obj.kind_of?(Fixnum) works as obj.kind_of?(Integer).
- At C-level, Fixnum object and Bignum object should be distinguished by
- FIXNUM_P(obj) and RB_TYPE_P(obj, T_BIGNUM).
- RUBY_INTEGER_UNIFICATION can be used to detect this feature at C-level.
- 0.class == Integer can be used to detect this feature at Ruby-level.
- The C-level constants, rb_cFixnum and rb_cBignum, are removed.
- They can cause compilation failure.
-
-* String/Symbol#upcase/downcase/swapcase/capitalize(!) now work for all of
- Unicode, not only for ASCII. [Feature #10085]
- No change is needed if the data is in ASCII anyway or if the limitation
- to ASCII was only tolerated while waiting for a more extensive implementation.
- A change (using the :ascii option) is needed in cases where Unicode data
- is processed, but the operation has to be limited to ASCII only.
- A good example of this are internationalized domain names.
-
-* TRUE / FALSE / NIL
- These constants are now obsoleted. [Feature #12574]
- Use true / false / nil resp. instead.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* DateTime
-
- * DateTime#to_time now preserves timezone. [Bug #12189]
-
-* Psych
-
- * Update to Psych 2.2.2
-
-* RDoc
-
- * Update to RDoc 5.0.0
-
-* RubyGems
-
- * Update to RubyGems 2.6.8
-
-* shellwords
-
- * Shellwords.shellwords (shellsplit) treats the backslash as escape
- character only when followed by one of the following characters:
- $ ` " \ <newline>
- [Bug #10055]
-
-* Time
-
- * Time#to_time now preserves timezone. [Bug #12271]
-
-* thread
-
- * the extension library is removed. Till 2.0 it was a pure ruby script
- "thread.rb", which has precedence over "thread.so", and has been provided
- in $LOADED_FEATURES since 2.1.
-
-* Tk
-
- * Tk is removed from stdlib. [Feature #8539]
- https://github.com/ruby/tk is the new upstream.
-
-* XMLRPC
-
- * XMLRPC is removed from stdlib, and bundled as gem. [Feature #12160][ruby-core:74239]
- https://github.com/ruby/xmlrpc is the new upstream.
-
-* Zlib
-
- * Zlib.gzip and Zlib.gunzip [Feature #13020]
-
-=== C API updates
-
-* ruby_show_version() will no longer exits the process, if
- RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in
- the future.
-
-* rb_gc_adjust_memory_usage() [Feature #12690]
-
-=== Supported platform changes
-
-* FreeBSD < 4 is no longer supported
-
-=== Implementation improvements
-
-* In some condition, `[x, y].max` and `[x, y].min` are optimized
- so that a temporal array is not created. The concrete condition is
- an implementation detail: currently, the array literal must have no
- splat, must have at least one expression but literal, the length must
- be <= 0x100, and Array#max and min must not be redefined. It will work
- in most casual and real-life use case where it is written with intent
- to `Math.max(x, y)`.
-
-* Thread deadlock detection now shows their backtrace and dependency. [Feature #8214]
-
-* st_table (st.c) internal data structure is improved. [Feature #12142]
-
-* Rational is extensively optimized. [Feature #12484]
-
-=== Miscellaneous changes
-
-* ChangeLog is removed from the repository.
- It is generated from commit messages in Subversion by `make dist`.
- Also note that now people should follow Git style commit message.
- The template is written at
- [Short (50 chars or less) summary of changes](https://git-scm.com/book/ch5-2.html).
- [Feature #12283]
diff --git a/doc/NEWS-2.5.0 b/doc/NEWS-2.5.0
deleted file mode 100644
index c891317b61..0000000000
--- a/doc/NEWS-2.5.0
+++ /dev/null
@@ -1,565 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.5.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or
-reference information is supplied with. For a full list of changes
-with all sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
-
-== Changes since the 2.4.0 release
-
-=== Language changes
-
-* Top-level constant look-up is removed. [Feature #11547]
-
-* rescue/else/ensure are allowed inside do/end blocks. [Feature #12906]
-
-* refinements take place in string interpolations. [Feature #13812]
-
-=== Core classes updates (outstanding ones only)
-
-* Array
-
- * New methods:
-
- * Array#append [Feature #12746]
- * Array#prepend [Feature #12746]
-
-* Data
-
- * Is deprecated. It was a base class for C extensions, and it's not
- necessary to expose in Ruby level. [Feature #3072]
-
-* Exception
-
- * New methods:
-
- * Exception#full_message to retrieve a String expression of an exception,
- formatted in the same way in which Ruby prints out an uncaught
- exception. [Feature #14141] [experimental]
-
-* Dir
-
- * Dir.glob provides new optional keyword argument, +:base+ . [Feature #13056]
- * Dir.chdir (without block arg), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
- Dir.empty? releases GVL
-
- * New methods:
-
- * Dir.children [Feature #11302]
- * Dir.each_child [Feature #11302]
-
-* Enumerable
-
- * Enumerable#any?, Enumerable#all?, Enumerable#none? and Enumerable#one?
- accept a pattern argument. [Feature #11286]
-
-* File
-
- * File.open accepts +:newline+ option to imply text mode. [Bug #13350]
- * File#path raises an IOError for files opened with
- File::Constants::TMPFILE option. [Feature #13568]
- * File.stat, File.exist? and other <code>rb_stat()</code>-using methods
- release GVL. [Bug #13941]
- * File.rename releases GVL. [Feature #13951]
- * File::Stat#atime, File::Stat#mtime and File::Stat#ctime support fractional
- second timestamps on Windows 8 and later. [Feature #13726]
- * File::Stat#ino and File.identical? support ReFS 128bit ino on Windows 8.1
- and later. [Feature #13731]
- * File.readable?, File.readable_real?, File.writable?, File.writable_real?,
- File.executable?, File.executable_real?, File.mkfifo, File.readlink,
- File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
- File.lchown, File.unlink, File.utime, File.lstat release GVL
-
- * New method:
-
- * File.lutime [Feature #4052]
-
-* Hash
-
- * New methods:
-
- * Hash#transform_keys [Feature #13583]
- * Hash#transform_keys! [Feature #13583]
- * Hash#slice [Feature #8499]
-
-* IO
-
- * IO.copy_stream tries copy offload with copy_file_range(2) [Feature #13867]
-
- * New methods:
-
- * IO#pread [Feature #4532]
- * IO#pwrite [Feature #4532]
- * IO#write accepts multiple arguments [Feature #9323]
-
-* IOError
-
- * IO#close might raise an error with message "stream closed",
- but it is refined to "stream closed in another thread". The new message
- is more clear for user. [Bug #13405]
-
-* Integer
-
- * Integer#round, Integer#floor, Integer#ceil and Integer#truncate always
- return an Integer. [Bug #13420]
- * Integer#pow accepts modulo argument for calculating modular
- exponentiation. [Feature #12508] [Feature #11003]
-
- * New methods:
-
- * Integer#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753]
- * Integer.sqrt [Feature #13219]
-
-* Kernel
-
- * Kernel#yield_self [Feature #6721]
- * Kernel#pp [Feature #14123]
- * Kernel#warn(..., uplevel:n) [Feature #12882]
-
-* Method
-
- * New methods:
-
- * Method#=== that invokes Method#call, as same as Proc#=== [Feature #14142]
-
-* Module
-
- * Module#attr, Module#attr_accessor, Module#attr_reader and Module#attr_writer
- become public. [Feature #14132]
- * Module#define_method, Module#alias_method, Module#undef_method and
- Module#remove_method become public. [Feature #14133]
-
-* Numeric
-
- * Numeric#step no longer hides errors from coerce method when
- given a step value which cannot be compared with #> to 0. [Feature #7688]
- * Numerical comparison operators (<,<=,>=,>) no longer hide exceptions
- from #coerce method internally. Return nil in #coerce if the coercion is
- impossible. [Feature #7688]
-
-* Process
-
- * Precision of Process.times is improved if getrusage(2) exists. [Feature #11952]
-
- * New method:
-
- * Process.last_status as an alias of $? [Feature #14043]
-
-* Range
- * Range#initialize no longer hides exceptions when comparing begin and
- end with #<=> and raise a "bad value for range" ArgumentError
- but instead lets the exception from the #<=> call go through. [Feature #7688]
-
-* Regexp
-
- * Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
-
- * Support absence operator https://github.com/k-takata/Onigmo/issues/82
-
- * Support new 5 emoji-related Unicode character properties
-
-* RubyVM::InstructionSequence
-
- * New method:
-
- * RubyVM::InstructionSequence#each_child
- * RubyVM::InstructionSequence#trace_points
-
-* String
-
- * <code>String#-@</code> deduplicates unfrozen strings. Already-frozen
- strings remain unchanged for compatibility. [Feature #13077]
- * <code>-"literal"</code> (<code>String#-@</code>) optimized to return the same object
- (same as <code>"literal".freeze</code> in Ruby 2.1+) [Feature #13295]
- * String#casecmp and String#casecmp? return nil for non-string arguments
- instead of raising a TypeError. [Bug #13312]
- * String#start_with? accepts a regexp [Feature #13712]
-
- * New methods:
-
- * String#delete_prefix, String#delete_prefix! [Feature #12694]
- * String#delete_suffix, String#delete_suffix! [Feature #13665]
- * String#each_grapheme_cluster and String#grapheme_clusters to
- enumerate grapheme clusters [Feature #13780]
- * String#undump to unescape String#dump'ed string [Feature #12275]
-
-* Struct
-
- * Struct.new takes `keyword_init: true` option to initialize members
- with keyword arguments. [Feature #11925]
-
-* Regexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685]
-
-* Thread
-
- * Description set by Thread#name= is now visible on Windows 10.
-
- * New method:
- * Thread#fetch [Feature #13009]
-
- * The default of Thread.report_on_exception is now true,
- showing unhandled exceptions terminating threads on $stderr. [Feature #14143]
-
-* Time
-
- * Time.at receives 3rd argument which specifies the unit of 2nd argument. [Feature #13919]
-
-* KeyError
-
- * New methods:
-
- * KeyError#receiver [Feature #12063]
- * KeyError#key [Feature #12063]
-
-* FrozenError
-
- * New exception class. [Feature #13224]
-
-=== Stdlib updates (outstanding ones only)
-
-* BigDecimal
-
- * Update to BigDecimal 1.3.4
-
- * The following features are added:
-
- * BigDecimal::VERSION
-
- * The following features have been deprecated,
- and are planned to be removed in the version 1.4.0:
-
- * BigDecimal.new
-
- * BigDecimal.ver
-
- * BigDecimal#clone and #dup now do not make a new instance,
- but returns the receiver itself.
-
-* Coverage
-
- * Support branch coverage and method coverage measurement. [Feature #13901]
- Branch coverage tells you which branches are executed, and which not.
- Method coverage tells you which methods are invoked, and which not.
- By running a test suite with this new feature, you can know which branches
- and methods are executed by a test, and evaluate total coverage of a test
- suite more strictly.
-
- You can specify the measuring target by an option to `Coverage.start`:
-
- Coverage.start(lines: true, branches: true, methods: true)
-
- After some Ruby files are loaded, you can use `Coverage.result` to get
- the coverage result:
-
- Coverage.result
- #=> { "/path/to/file.rb"=>
- # { :lines => [1, 2, 0, nil, ...],
- # :branches =>
- # { [:if, 0, 2, 1, 6, 4] =>
- # { [:then, 1, 3, 2, 3, 8] => 0,
- # [:else, 2, 5, 2, 5, 8] => 2
- # }
- # },
- # :methods => {
- # [Object, :foo, 1, 0, 7, 3] => 2
- # }
- # }
- # }
-
- The result type of line coverage is not changed; it is just an array that
- contains numbers, which means the count that each line was executed,
- or `nil`s, which means that the line is not relevant.
-
- The result type of branch coverage is:
-
- { (jump base) => { (jump target) => (counter) } }
-
- where jump base and targets have the format
-
- [type, unique-id, start lineno, start column, end lineno, end column]
-
- For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from
- line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads
- a `then` clause that ranges from line 3 and column 2, to line 3 and column 8.
- Note that lineno starts from 1, and that columnno starts from 0. So, the
- above example shows a branch from the `if` to the `then` was never executed,
- and a branch from the `if` to the `else` was executed twice.
-
- The result type of method coverage is:
-
- { (method key) => (counter) }
-
- where method key has the format
-
- [class, method-name, start lineno, start column, end lineno, end column]
-
- For example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from
- line 1 and column 0, to line 7 and column 3. The above example shows this
- `Object#foo` was invoked twice.
-
- Note: To keep compatibility, passing no option to `Coverage.start` will measure
- only line coverage, and `Coverage.result` will return the old format:
-
- Coverage.result
- #=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
-
-* DRb
-
- * ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
-
-* ERB
-
- * Add ERB#result_with_hash to render a template with local variables passed
- with a Hash object. [Feature #8631]
-
- * Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb
- command. [Bug #14095]
-
- * Carriage returns are changed to be trimmed properly if trim_mode is specified
- and used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464]
-
-* IPAddr
-
- * IPAddr no longer accepts invalid address mask. [Bug #13399]
- * IPAddr#ipv4_compat and IPAddr#ipv4_compat? are marked for deprecation. [Bug #13769]
-
- * New methods:
-
- * IPAddr#prefix
- * IPAddr#loopback?
- * IPAddr#private? [Feature #11666]
- * IPAddr#link_local? [Feature #10912]
-
-* IRB
-
- * Print backtrace and error message in reverse order [Feature #8661] [experimental]
- * `binding.irb` automatically requires irb and runs [Bug #13099] [experimental]
- * `binding.irb` on its start shows source around the line where it was called [Feature #14124]
-
-* Matrix
-
- * New methods:
-
- * Matrix.combine and Matrix#combine [Feature #10903]
- * Matrix#hadamard_product and Matrix#entrywise_product
-
-* Net::HTTP
-
- * Net::HTTP.new supports no_proxy parameter [Feature #11195]
- * Net::HTTP#min_version and Net::HTTP#max_version [Feature #9450]
- * Add more HTTP status classes
- * Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]
- * Net::HTTP#proxy_user and Net::HTTP#proxy_pass reflect http_proxy environment
- variable if the system's environment variable is multiuser safe. [Bug #12921]
-
-* open-uri
- * URI.open method defined as an alias to open-uri's Kernel.open.
- open-uri's Kernel.open will be deprecated in future.
-
-* OpenSSL
-
- * Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in
- "Version 2.1.0" section in ext/openssl/History.md.
-
-* Pathname
-
- * New method:
-
- * Pathname#glob [Feature #7360]
-
-* Psych
-
- * Update to Psych 3.0.2.
-
- * Convert fallback option to a keyword argument
- https://github.com/ruby/psych/pull/342
- * Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
- https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
- * Add Psych::Handler#event_location
- https://github.com/ruby/psych/pull/326
- * Make frozen string literal = true
- https://github.com/ruby/psych/pull/320
- * Preserve time zone offset when deserializing times
- https://github.com/ruby/psych/pull/316
- * Remove deprecated method aliases for syck gem
- https://github.com/ruby/psych/pull/312
-
-* RbConfig
-
- * RbConfig::LIMITS is added to provide the limits of C types.
- This is available when rbconfig/sizeof is loaded.
-
-* Ripper
-
- * Ripper::EXPR_BEG and so on for Ripper#state.
-
- * New method:
-
- * Ripper#state to tell the state of scanner. [Feature #13686]
-
-* RDoc
-
- * Update to RDoc 6.0.1.
-
- * Replace IRB based lexer with Ripper.
- * https://github.com/ruby/rdoc/pull/512
- * This much improves the speed of generating documents.
- * It also facilitates supporting new syntax in the future.
- * Support many new syntaxes of Ruby from the past few years.
- * Use "frozen_string_literal: true".
- Performance survey: https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800
- * Support did_you_mean.
-
-* Rubygems
-
- * Update to Rubygems 2.7.3.
- * http://blog.rubygems.org/2017/11/28/2.7.3-released.html
- * http://blog.rubygems.org/2017/11/08/2.7.2-released.html
- * http://blog.rubygems.org/2017/11/03/2.7.1-released.html
- * http://blog.rubygems.org/2017/11/01/2.7.0-released.html
- * http://blog.rubygems.org/2017/10/09/2.6.14-released.html
- * http://blog.rubygems.org/2017/08/27/2.6.13-released.html
-
-* SecureRandom
-
- * New method:
-
- * SecureRandom.alphanumeric
-
-* Set
-
- * New methods:
-
- * Set#to_s as alias to #inspect [Feature #13676]
- * Set#=== as alias to #include? [Feature #13801]
- * Set#reset [Feature #6589]
-
-* StringIO
-
- * StringIO#write accepts multiple arguments
-
-* StringScanner
-
- * New methods:
-
- * StringScanner#size, StringScanner#captures, StringScanner#values_at [Feature #836]
-
-* URI
-
- * Relative path operations no longer collapse consecutive slashes to a single slash. [Bug #8352]
-
-* WEBrick
-
- * Add Server Name Indication (SNI) support [Feature #13729]
- * support Proc objects as body responses [Feature #855]
- * released as a RubyGem [Feature #13173]
- * avoid unintended behavior from Kernel#open [Misc #14216]
-
-* Zlib
-
- * Zlib::GzipWriter#write accepts multiple arguments
-
-=== Compatibility issues (excluding feature bug fixes)
-
-* Socket
-
- * BasicSocket#read_nonblock and BasicSocket#write_nonblock no
- longer set the O_NONBLOCK file description flag as side effect
- (on Linux only) [Feature #13362]
-
-* Random
-
- * Random.raw_seed renamed to become Random.urandom. It is now
- applicable to non-seeding purposes due to [Bug #9569].
-
-* Socket
-
- * Socket::Ifaddr#vhid is added [Feature #13803]
-
-* ConditionVariable, Queue and SizedQueue reimplemented for speed.
- They no longer subclass Struct. [Feature #13552]
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* Gemification
-
- * Promote following standard libraries to default gems.
- * cmath
- * csv
- * date
- * dbm
- * etc
- * fcntl
- * fiddle
- * fileutils
- * gdbm
- * ipaddr
- * scanf
- * sdbm
- * stringio
- * strscan
- * webrick
- * zlib
-
-* Logger
-
- * Logger.new("| command") had been working to open a command
- unintentionally. It was prohibited, and now Logger#initialize
- treats a String argument only as a filename, as its specification. [Bug #14212]
-
-* Net::HTTP
-
- * Net::HTTP#start now passes :ENV to p_addr by default. [Bug #13351]
- To avoid this, pass nil explicitly.
-
-* mathn.rb
-
- * Removed from stdlib. [Feature #10169]
-
-* Rubygems
-
- * Removed "ubygems.rb" file from stdlib. It's needless since Ruby 1.9.
-
-=== Supported platform changes
-
-* Drop support of NaCl platform
-
- * https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160
-
-=== Implementation improvements
-
-* (This might not be a "user visible feature change" but) Hash class's
- hash function is now SipHash13. [Feature #13017]
-
-* SecureRandom now prefers OS-provided sources than OpenSSL. [Bug #9569]
-
-* Mutex rewritten to be smaller and faster [Feature #13517]
-
-* Performance of block passing using block parameters is improved by
- lazy Proc allocation [Feature #14045]
-
-* Dynamic instrumentation for TracePoint hooks instead of using "trace"
- instruction to avoid overhead [Feature #14104]
-
-* ERB now generates code from a template twice as fast as Ruby 2.4
-
-=== Miscellaneous changes
-
-* Print backtrace and error message in reverse order if $stderr is unchanged
- and a tty. [Feature #8661] [experimental]
-
-* Print error message in bold/underlined text if $stderr is unchanged and a
- tty. [Feature #14140] [experimental]
-
-* configure option --with-ext now mandates its arguments. So for
- instance if you run ./configure --with-ext=openssl,+ then the
- openssl library is guaranteed compiled, otherwise the build fails
- abnormally.
-
- Note however to always add the ",+" at the end of the argument.
- Otherwise nothing but openssl are built. [Feature #13302]
diff --git a/doc/NEWS-2.6.0 b/doc/NEWS-2.6.0
deleted file mode 100644
index 2303a5bd41..0000000000
--- a/doc/NEWS-2.6.0
+++ /dev/null
@@ -1,662 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.6.0
-
-This document is a list of user visible feature changes made between
-releases except for bug fixes.
-
-Note that each entry is kept so brief that no reason behind or reference
-information is supplied with. For a full list of changes with all
-sufficient information, see the ChangeLog file or Redmine
-(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
-
-== Changes since the 2.5.0 release
-
-=== Language changes
-
-* <code>$SAFE</code> now is a process global state and can be set to 0 again. [Feature #14250]
-
-* Refinements take place at block passing. [Feature #14223]
-
-* Refinements take place at Kernel#public_send. [Feature #15326]
-
-* Refinements take place at Kernel#respond_to?. [Feature #15327]
-
-* +else+ without +rescue+ now causes a syntax error. [EXPERIMENTAL] [Feature #14606]
-
-* Constant names may start with a non-ASCII capital letter. [Feature #13770]
-
-* Endless ranges are introduced. You can use a Range that has no end,
- like <code>(0..)</code> (or similarly <code>(0...)</code>). [Feature #12912]
-
- The following shows typical use cases:
-
- ary[1..] # identical to ary[1..-1]
- (1...).each {|index| block } # infinite loop from index 1
- ary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { }
-
-* Non-Symbol keys in a keyword arguments hash cause an exception.
-
-* The "shadowing outer local variable" warning is removed. [Feature #12490]
-
- You can now write the following without warning:
-
- user = users.find {|user| cond(user) }
-
-* Print +cause+ of the exception if the exception is not caught and printed
- its backtraces and error message. [Feature #8257]
-
-* The flip-flop syntax is deprecated. [Feature #5400]
-
-=== Core classes updates (outstanding ones only)
-
-Array::
-
- New methods::
-
- * Added Array#union and Array#difference instance methods. [Feature #14097]
-
- Modified method::
-
- * Array#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
-
- Aliased methods::
-
- * Array#filter is a new alias for Array#select. [Feature #13784]
- * Array#filter! is a new alias for Array#select!. [Feature #13784]
-
-Binding::
-
- New method::
-
- * Added Binding#source_location. [Feature #14230]
-
- This method returns the source location of the binding, a 2-element
- array of <code>__FILE__</code> and <code>__LINE__</code>.
- Traditionally, the same information could be retrieved by
- <code>eval("[__FILE__, __LINE__]", binding)</code>, but we are
- planning to change this behavior so that Kernel#eval ignores
- binding's source location [Bug #4352]. So, users should use this
- newly-introduced method instead of Kernel#eval.
-
-Dir::
-
- New methods::
-
- * Added Dir#each_child and Dir#children instance methods. [Feature #13969]
-
-Enumerable::
-
- New method::
-
- * Enumerable#chain returns an enumerator object that iterates over the
- elements of the receiver and then those of each argument
- in sequence. [Feature #15144]
-
- Modified method::
-
- * Enumerable#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
-
- Aliased method::
-
- * Enumerable#filter is a new alias for Enumerable#select. [Feature #13784]
-
-Enumerator::ArithmeticSequence::
-
- * This is a new class to represent a generator of an arithmetic sequence,
- that is a number sequence defined by a common difference. It can be used
- for representing what is similar to Python's slice. You can get an
- instance of this class from Numeric#step and Range#step.
-
-Enumerator::Chain::
-
- * This is a new class to represent a chain of enumerables that works as a
- single enumerator, generated by such methods as Enumerable#chain and
- Enumerator#+.
-
-Enumerator::Lazy::
-
- Aliased method::
-
- * Enumerator::Lazy#filter is a new alias for
- Enumerator::Lazy#select. [Feature #13784]
-
-Enumerator::
-
- New methods::
-
- * Enumerator#+ returns an enumerator object that iterates over the
- elements of the receiver and then those of the other operand. [Feature #15144]
-
-ENV::
-
- Modified method::
-
- * ENV.to_h now accepts a block that maps names and values to new keys and values. [Feature #15143]
-
-Exception::
-
- New options::
-
- * Exception#full_message takes +:highlight+ and +:order+
- options. [Bug #14324]
-
-Hash::
-
- Modified methods::
-
- * Hash#merge, Hash#merge!, and Hash#update now accept multiple
- arguments. [Feature #15111]
-
- * Hash#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
-
- Aliased methods::
-
- * Hash#filter is a new alias for Hash#select. [Feature #13784]
-
- * Hash#filter! is a new alias for Hash#select!. [Feature #13784]
-
-IO::
-
- New option::
-
- * Added new mode character <code>'x'</code> to open files for exclusive
- access. [Feature #11258]
-
-Kernel::
-
- Aliased method::
-
- * Kernel#then is a new alias for Kernel#yield_self. [Feature #14594]
-
- New options::
-
- * Kernel#Complex, Kernel#Float, Kernel#Integer, and
- Kernel#Rational take an +:exception+ option to specify the way of
- error handling. [Feature #12732]
-
- * Kernel#system takes an +:exception+ option to raise an exception
- on failure. [Feature #14386]
-
- Incompatible changes::
-
- * Kernel#system and Kernel#exec do not close non-standard file descriptors
- (the default of the +:close_others+ option is changed to +false+,
- but we still set the +FD_CLOEXEC+ flag on descriptors we
- create). [Misc #14907]
-
-KeyError::
-
- New options::
-
- * KeyError.new accepts +:receiver+ and +:key+ options to set receiver and
- key in Ruby code. [Feature #14313]
-
-Method::
-
- New methods::
-
- * Added Method#<< and Method#>> for Proc composition. [Feature #6284]
-
-Module::
-
- Modified methods::
-
- * Module#method_defined?, Module#private_method_defined?, and
- Module#protected_method_defined? now accept the second
- parameter as optional. If it is +true+ (the default value), it checks
- ancestor modules/classes, or checks only the class itself. [Feature #14944]
-
-NameError::
-
- New option::
-
- * NameError.new accepts a +:receiver+ option to set receiver in Ruby
- code. [Feature #14313]
-
-NilClass::
-
- New method::
-
- * NilClass#=~ is added for compatibility. [Feature #15231]
-
-NoMethodError::
-
- New option::
-
- * NoMethodError.new accepts a +:receiver+ option to set receiver in Ruby
- code. [Feature #14313]
-
-Numeric::
-
- Incompatible changes::
-
- * Numeric#step now returns an instance of the Enumerator::ArithmeticSequence
- class rather than one of the Enumerator class.
-
-OpenStruct::
-
- Modified method::
-
- * OpenStruct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
-
-Proc::
-
- New methods::
-
- * Added Proc#<< and Proc#>> for Proc composition. [Feature #6284]
-
- Incompatible changes::
-
- * Proc#call doesn't change <code>$SAFE</code> any more. [Feature #14250]
-
-Random::
-
- New method::
-
- * Added Random.bytes. [Feature #4938]
-
-Range::
-
- New method::
-
- * Added Range#% instance method. [Feature #14697]
-
- Incompatible changes::
-
- * Range#=== now uses the +#cover?+ instead of the +#include?+ method. [Feature #14575]
- * Range#cover? now accepts a Range object. [Feature #14473]
- * Range#step now returns an instance of the Enumerator::ArithmeticSequence
- class rather than one of the Enumerator class.
-
-Regexp/String::
-
- * Update Unicode version from 10.0.0 to 11.0.0. [Feature #14802]
-
- This includes a rewrite of the grapheme cluster (/\X/) algorithm
- and special-casing for Georgian MTAVRULI on String#downcase.
-
- * Update Emoji version from 5.0 to 11.0.0 [Feature #14802]
-
-RubyVM::AbstractSyntaxTree::
-
- New methods::
-
- * RubyVM::AbstractSyntaxTree.parse parses a given string and returns AST
- nodes. [experimental]
-
- * RubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST
- nodes. [experimental]
-
- * RubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or
- method. [experimental]
-
-RubyVM::
-
- New method::
-
- * RubyVM.resolve_feature_path identifies the file that will be loaded by
- "require(feature)". [experimental] [Feature #15230]
-
-String::
-
- * String#crypt is now deprecated. [Feature #14915]
-
- New features::
-
- * String#split yields each substring to the block if given. [Feature #4780]
-
-Struct::
-
- Modified method::
-
- * Struct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
-
- Aliased method::
-
- * Struct#filter is a new alias for Struct#select. [Feature #13784]
-
-Time::
-
- New features::
-
- * Time.new and Time#getlocal accept a timezone object as well as
- a UTC offset string. Time#+, Time#-, and Time#succ also preserve
- the timezone. [Feature #14850]
-
-TracePoint::
-
- New features::
-
- * "script_compiled" event is supported. [Feature #15287]
-
- New methods::
-
- * TracePoint#parameters [Feature #14694]
-
- * TracePoint#instruction_sequence [Feature #15287]
-
- * TracePoint#eval_script [Feature #15287]
-
- Modified method::
-
- * TracePoint#enable accepts new keywords "target:" and
- "target_line:". [Feature #15289]
-
-=== Stdlib updates (outstanding ones only)
-
-BigDecimal::
-
- Update to version 1.4.0. This version includes several compatibility
- issues, see Compatibility issues section below for details.
-
- Modified method::
-
- * BigDecimal() accepts the new keyword "exception:" similar to Float().
-
- Note for the differences among recent versions::
-
- You should want to know the differences among recent versions of bigdecimal.
- Please select the suitable version of bigdecimal according to the following
- information.
-
- * 1.3.5 has BigDecimal.new without "exception:" keyword. You can see the
- deprecation warning of BigDecimal.new when you specify "-w" option.
- BigDecimal(), BigDecimal.new, and Object#to_d methods are the same.
-
- * 1.4.0 has BigDecimal.new with "exception:" keyword. You always see the
- deprecation warning of BigDecimal.new. Object#to_d method is different
- from BigDecimal() and BigDecimal.new.
-
- * 2.0.0 will be released soon after releasing Ruby 2.6.0. This version
- will not have the BigDecimal.new method.
-
-Bundler::
-
- * Add Bundler to Standard Library. [Feature #12733]
-
- * Use 1.17.2, the latest stable version.
-
-Coverage::
-
- A oneshot_lines mode is added. [Feature #15022]
-
- This mode checks "whether each line was executed at least once or not",
- instead of "how many times each line was executed".
- A hook for each line is fired at most once, and after it is fired
- the hook flag is removed, i.e., it runs with zero overhead.
-
- New options::
-
- * Add +:oneshot_lines+ keyword argument to Coverage.start.
-
- * Add +:stop+ and +:clear+ keyword arguments to Coverage.result.
- If +clear+ is true, it clears the counters to zero.
- If +stop+ is true, it disables coverage measurement.
-
- New methods::
-
- * Coverage.line_stub, which is a simple helper function that
- creates the "stub" of line coverage from a given source code.
-
-CSV::
-
- * Upgrade to 3.0.2. This includes performance improvements especially
- for writing. Writing is about 2 times faster.
- See https://github.com/ruby/csv/blob/master/NEWS.md.
-
-ERB::
-
- New options::
-
- * Add +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new.
- Now non-keyword arguments other than the first one are softly deprecated
- and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]
-
- * erb command's <tt>-S</tt> option is deprecated, and will be removed
- in the next version.
-
-FileUtils::
-
- New methods::
-
- * FileUtils#cp_lr. [Feature #4189]
-
-Matrix::
-
- New methods::
-
- * Matrix#antisymmetric?, Matrix#skew_symmetric?
-
- * Matrix#map!, Matrix#collect! [Feature #14151]
-
- * Matrix#[]=
-
- * Vector#map!, Vector#collect!
-
- * Vector#[]=
-
-Net::
-
- New options::
-
- * Add +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396]
-
- New methods::
-
- * Add Net::HTTP#write_timeout and Net::HTTP#write_timeout=. [Feature #13396]
-
- New constant::
-
- * Add Net::HTTPClientException to deprecate Net::HTTPServerException,
- whose name is misleading. [Bug #14688]
-
-NKF::
-
- * Upgrade to nkf v2.1.5
-
-Psych::
-
- * Upgrade to Psych 3.1.0
-
-RDoc::
-
- * Become about 2 times faster.
-
- * Use SOURCE_DATE_EPOCH to generate files.
-
- * Fix method line number that slipped off.
-
- * Enable <code>--width</code>, <code>--exclude</code>,
- and <code>--line-numbers</code> that were ignored.
-
- * Add support for blockquote by ">>>" in default markup notation.
-
- * Add support for "Raises" lines in TomDoc notation.
-
- * Fix syntax error output.
-
- * Fix many parsing bugs.
-
-REXML::
-
- * Upgrade to REXML 3.1.9.
- See https://github.com/ruby/rexml/blob/master/NEWS.md.
-
- Improved some XPath implementations::
-
- * <code>concat()</code> function: Stringify all arguments before concatenating.
-
- * <code>string()</code> function: Support context node.
-
- * <code>string()</code> function: Support processing instruction node.
-
- * Support <code>"*:#{ELEMENT_NAME}"</code> syntax in XPath 2.0.
-
- Fixed some XPath implementations::
-
- * <code>"//#{ELEMENT_NAME}[#{POSITION}]"</code> case
-
- * <code>string()</code> function: Fix <code>function(document)</code>
- returns nodes that are out of root elements.
-
- * <code>"/ #{ELEMENT_NAME} "</code> case
-
- * <code>"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"</code> case
-
- * <code>"/ #{AXIS}::#{ELEMENT_NAME}"</code> case
-
- * <code>"#{N}-#{M}"</code> case: One or more white spaces were required
- before <code>"-"</code>
-
- * <code>"/child::node()"</code> case
-
- * <code>"#{FUNCTION}()/#{PATH}"</code> case
-
- * <code>"@#{ATTRIBUTE}/parent::"</code> case
-
- * <code>"name(#{NODE_SET})"</code> case
-
-RSS::
-
- New options::
-
- * RSS::Parser.parse now accepts options as Hash. +:validate+ ,
- +:ignore_unknown_element+ , +:parser_class+ options are available.
-
-RubyGems::
-
- * Upgrade to RubyGems 3.0.1
-
- * https://blog.rubygems.org/2018/12/19/3.0.0-released.html
-
- * https://blog.rubygems.org/2018/12/23/3.0.1-released.html
-
-Set::
-
- Aliased method::
-
- * Set#filter! is a new alias for Set#select!. [Feature #13784]
-
-URI::
-
- New constant::
-
- * Add URI::File to handle the file URI scheme. [Feature #14035]
-
-=== Compatibility issues (excluding feature bug fixes)
-
-Dir::
-
- * Dir.glob with <code>'\0'</code>-separated pattern list will be deprecated,
- and is now warned. [Feature #14643]
-
-File::
-
- * File.read, File.binread, File.write, File.binwrite, File.foreach, and
- File.readlines do not invoke external commands even if the path starts
- with the pipe character <code>'|'</code>. [Feature #14245]
-
-Object::
-
- * Object#=~ is deprecated. [Feature #15231]
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* These standard libraries have been promoted to default gems.
-
- * e2mmap
- * forwardable
- * irb
- * logger
- * matrix
- * mutex_m
- * ostruct
- * prime
- * rexml
- * rss
- * shell
- * sync
- * thwait
- * tracer
-
-BigDecimal::
-
- * The following methods are removed.
-
- * BigDecimal.allocate
- * BigDecimal.ver
-
- * Every BigDecimal object is frozen. [Feature #13984]
-
- * BigDecimal() parses the given string similar to Float().
-
- * String#to_d parses the receiver string similar to String#to_f.
-
- * BigDecimal.new will be removed in version 2.0.
-
-Pathname::
-
- * Pathname#read, Pathname#binread, Pathname#write, Pathname#binwrite,
- Pathname#each_line and Pathname#readlines do not invoke external
- commands even if the path starts with the pipe character <code>'|'</code>.
- This follows [Feature #14245].
-
-=== Implementation improvements
-
-* Speedup Proc#call because we don't need to care about <code>$SAFE</code>
- any more. [Feature #14318]
-
- With +lc_fizzbuzz+ benchmark which uses Proc#call many times we can
- measure x1.4 improvements. [Bug #10212]
-
-* Speedup block.call where +block+ is passed block parameter. [Feature #14330]
-
- Ruby 2.5 improves block passing performance. [Feature #14045]
-
- Additionally, Ruby 2.6 improves the performance of passed block calling.
-
-* Introduce an initial implementation of a JIT (Just-in-time) compiler. [Feature #14235] [experimental]
-
- * <tt>--jit</tt> command line option is added to enable JIT. <tt>--jit-verbose=1</tt>
- is good for inspection. See <tt>ruby --help</tt> for others.
- * To generate machine code, this JIT compiler uses the C compiler used for building
- the interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.
- * <tt>--disable-mjit-support</tt> option is added to configure. This is added for JIT debugging,
- but if you get an error on building a header file for JIT, you can use this option to skip
- building it as a workaround.
- * rb_waitpid reimplemented on Unix-like platforms to maintain
- compatibility with processes created for JIT [Bug #14867]
-
-* VM generator script renewal; makes the generated VM more optimized. [GH-1779]
-
-* Thread cache enabled for pthreads platforms (for Thread.new and
- Thread.start). [Feature #14757]
-
-* timer thread is eliminated for platforms with POSIX timers. [Misc #14937]
-
-* Transient Heap (theap) is supported. [Bug #14858] [Feature #14989]
-
- theap is a managed heap for short-living memory objects. For example,
- making a small and short-living Hash object is x2 faster. With rdoc benchmark,
- we measured 6-7% performance improvement.
-
-* Native implementations (arm32, arm64, ppc64le, win32, win64, x86, amd64) of
- coroutines to improve performance of Fiber significantly. [Feature #14739]
-
-=== Miscellaneous changes
-
-* On macOS, shared libraries no longer include a full version number of Ruby
- in their names. This eliminates the burden of each teeny upgrade on the
- platform that users need to rebuild every extension library.
-
- Before::
- * libruby.2.6.0.dylib
- * libruby.2.6.dylib -> libruby.2.6.0.dylib
- * libruby.dylib -> libruby.2.6.0.dylib
-
- After::
- * libruby.2.6.dylib
- * libruby.dylib -> libruby.2.6.dylib
-
-* Extracted misc/*.el files to https://github.com/ruby/elisp
diff --git a/doc/NEWS-1.8.7 b/doc/NEWS/NEWS-1.8.7
index 5da39ff265..5da39ff265 100644
--- a/doc/NEWS-1.8.7
+++ b/doc/NEWS/NEWS-1.8.7
diff --git a/doc/NEWS-1.9.1 b/doc/NEWS/NEWS-1.9.1
index fb11026d60..fb11026d60 100644
--- a/doc/NEWS-1.9.1
+++ b/doc/NEWS/NEWS-1.9.1
diff --git a/doc/NEWS-1.9.2 b/doc/NEWS/NEWS-1.9.2
index 430c6cc4f5..430c6cc4f5 100644
--- a/doc/NEWS-1.9.2
+++ b/doc/NEWS/NEWS-1.9.2
diff --git a/doc/NEWS-1.9.3 b/doc/NEWS/NEWS-1.9.3
index 484660f420..484660f420 100644
--- a/doc/NEWS-1.9.3
+++ b/doc/NEWS/NEWS-1.9.3
diff --git a/doc/NEWS/NEWS-2.0.0 b/doc/NEWS/NEWS-2.0.0
new file mode 100644
index 0000000000..e070b19976
--- /dev/null
+++ b/doc/NEWS/NEWS-2.0.0
@@ -0,0 +1,529 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.0.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file.
+
+== Changes since the 1.9.3 release
+
+=== Language changes
+
+* Added keyword arguments.
+
+* Added %i and %I for symbol list creation (similar to %w and %W).
+
+* Default source encoding is changed to UTF-8. (was US-ASCII)
+
+* No warning for unused variables starting with '_'
+
+=== Core classes updates (outstanding ones only)
+
+* ARGF
+ * added method:
+ * added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
+ methods for IO.
+
+* Array
+ * added method:
+ * added Array#bsearch for binary search.
+ * incompatible changes:
+ * random parameter of Array#shuffle! and Array#sample now
+ will be called with one argument, maximum value.
+ * when given Range arguments, Array#values_at now returns nil for each
+ value that is out-of-range.
+
+* Enumerable
+ * added method:
+ * added Enumerable#lazy method for lazy enumeration.
+
+* Enumerator
+ * added method:
+ * added Enumerator#size for lazy size evaluation.
+ * extended method:
+ * Enumerator.new accept an argument for lazy size evaluation.
+ * new class Enumerator::Lazy for lazy enumeration
+
+* ENV
+ * aliased method:
+ * ENV.to_h is a new alias for ENV.to_hash
+
+* Fiber
+ * incompatible changes:
+ * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
+
+* File
+ * extended method:
+ * File.fnmatch? now expands braces in the pattern if
+ File::FNM_EXTGLOB option is given.
+
+* GC
+ * improvements:
+ * introduced the bitmap marking which suppresses to copy a memory page
+ with Copy-on-Write.
+ * introduced the non-recursive marking which avoids unexpected stack overflow.
+
+* GC::Profiler
+ * added method:
+ * added GC::Profiler.raw_data which returns raw profile data for GC.
+
+* Hash
+ * added method:
+ * added Hash#to_h as explicit conversion method, like Array#to_a.
+ * extended method:
+ * Hash#default_proc= can be passed nil to clear the default proc.
+
+* IO
+ * deprecated methods:
+ * IO#lines, #bytes, #chars and #codepoints are deprecated.
+
+* Kernel
+ * added method:
+ * added Kernel#Hash conversion method like Array() or Float().
+ * added Kernel#__dir__ which returns the absolute path of the
+ directory of the file from which this method is called.
+ * added Kernel#caller_locations which returns an array of
+ frame information objects.
+ * extended method:
+ * Kernel#warn accepts multiple args in like puts.
+ * Kernel#caller accepts second optional argument `n' which specify
+ required caller size.
+ * Kernel#to_enum and enum_for accept a block for lazy size evaluation.
+ * incompatible changes:
+ * system() and exec() close non-standard file descriptors
+ (The default of :close_others option is changed to true by default.)
+ * respond_to? against a protected method now returns false unless
+ the second argument is true.
+ * __callee__ has returned to the original behavior, and now
+ returns the called name but not the original name in an
+ aliased method.
+ * Kernel#inspect does not call #to_s anymore
+ (it used to call redefined #to_s).
+
+* LoadError
+ * added method:
+ * added LoadError#path method to return the file name that could not be
+ loaded.
+
+* Module
+ * added method:
+ * added Module#prepend which is similar to Module#include,
+ however a method in the prepended module overrides the
+ corresponding method in the prepending module.
+ * added Module.prepended and Module.prepend_features, similar
+ to included and append_features.
+ * added Module#refine, which extends a class or module locally. [experimental]
+ * extended method:
+ * Module#define_method accepts a UnboundMethod from a Module.
+ * Module#const_get accepts a qualified constant string, e.g.
+ Object.const_get("Foo::Bar::Baz")
+
+* Mutex
+ * added method:
+ * added Mutex#owned? which returns the mutex is held by current
+ thread or not. [experimental]
+ * incompatible changes:
+ * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
+ and Mutex#sleep are no longer allowed to be used from trap handler
+ and raise a ThreadError in such case.
+ * Mutex#sleep may spurious wakeup. Check after wakeup.
+
+* NilClass
+ * added method:
+ * added nil.to_h which returns {}
+
+* ObjectSpace::WeakMap
+ * new low level class to hold weak references to objects.
+
+* Proc
+ * incompatible change:
+ * removed Proc#== and #eql? so two procs are == only when they are
+ the same object.
+
+* Process
+ * added method:
+ * added getsid for getting session id (unix only).
+
+* Range
+ * added method:
+ * added Range#size for lazy size evaluation.
+ * added Range#bsearch for binary search.
+
+* RubyVM (MRI specific)
+ * added RubyVM::InstructionSequence.of to get the instruction sequence
+ from a method or a block.
+ * added RubyVM::InstructionSequence#path, #absolute_path, #label,
+ #base_label and #first_lineno to retrieve information from where
+ the instruction sequence was defined.
+ * added Environment variables to specify stack usage:
+ * RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
+ default: 128KB (32bit CPU) or 256KB (64bit CPU).
+ * RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
+ creation. default: 512KB or 1024KB.
+ * RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
+ default: 64KB or 128KB.
+ * RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
+ creation. default: 256KB or 512KB.
+ These variables are checked only at launched time.
+ * added constant DEFAULT_PARAMS to get above default parameters.
+
+* Signal
+ * added method:
+ * added Signal.signame which returns signal name
+
+ * incompatible changes:
+ * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
+ are specified.
+
+* String
+ * added method:
+ * added String#b returning a copied string whose encoding is ASCII-8BIT.
+ * change return value:
+ * String#lines now returns an array instead of an enumerator.
+ * String#chars now returns an array instead of an enumerator.
+ * String#codepoints now returns an array instead of an enumerator.
+ * String#bytes now returns an array instead of an enumerator.
+
+* Struct
+ * added method:
+ * added Struct#to_h returning values with keys corresponding to the
+ instance variable names.
+
+* Thread
+ * added method:
+ * added Thread#thread_variable_get for getting thread local variables
+ (these are different than Fiber local variables).
+ * added Thread#thread_variable_set for setting thread local variables.
+ * added Thread#thread_variables for getting a list of the thread local
+ variable keys.
+ * added Thread#thread_variable? for testing to see if a particular thread
+ variable has been set.
+ * added Thread.handle_interrupt as well as instance and singleton methods
+ pending_interrupt? for asynchronous handling of exceptions
+ * added Thread#backtrace_locations which returns similar information of
+ Kernel#caller_locations.
+ * new class Thread::Backtrace::Location to hold backtrace location
+ information. These are returned by Thread#backtrace_locations and
+ Kernel#caller_locations.
+ * incompatible changes:
+ * Thread#join and Thread#value now raises a ThreadError if target thread
+ is the current or main thread.
+
+* Time
+ * change return value:
+ * Time#to_s now returns US-ASCII encoding instead of BINARY.
+
+* TracePoint
+ * new class. This class is replacement of set_trace_func.
+ Easy to use and efficient implementation.
+
+* toplevel
+ * added method:
+ * added main.define_method which defines a global function.
+ * added main.using, which imports refinements into the current file or
+ eval string. [experimental]
+
+=== Core classes compatibility issues (excluding feature bug fixes)
+
+* Array#values_at
+
+ See above.
+
+* String#lines
+* String#chars
+* String#codepoints
+* String#bytes
+
+ These methods no longer return an Enumerator, although passing a
+ block is still supported for backwards compatibility.
+
+ Code like str.lines.with_index(1) { |line, lineno| ... } no longer
+ works because str.lines returns an array. Replace lines with
+ each_line in such cases.
+
+* IO#lines
+* IO#chars
+* IO#codepoints
+* IO#bytes
+* ARGF#lines
+* ARGF#chars
+* ARGF#bytes
+* StringIO#lines
+* StringIO#chars
+* StringIO#codepoints
+* StringIO#bytes
+* Zlib::GzipReader#lines
+* Zlib::GzipReader#bytes
+
+ These methods are deprecated in favor of each_line, each_byte,
+ each_char and each_codepoint.
+
+* Proc#==
+* Proc#eql?
+
+ These methods were removed. Two procs are == only when they are
+ the same object.
+
+* Fixnum
+* Bignum
+* Float
+
+ Fixnums, Bignums and Floats are frozen.
+
+* Signal.trap
+
+ See above.
+
+* Merge Onigmo.
+ https://github.com/k-takata/Onigmo
+
+* The :close_others option is true by default for system() and exec().
+ Also, the close-on-exec flag is set by default for all new file descriptors.
+ This means file descriptors doesn't inherit to spawned process unless
+ explicitly requested such as system(..., fd=>fd).
+
+* Kernel#respond_to? against a protected method now returns false
+ unless the second argument is true.
+
+* Kernel#respond_to_missing?
+* Kernel#initialize_clone
+* Kernel#initialize_dup
+
+ These methods are now private.
+
+* Thread#join, Thread#value
+
+ See above.
+
+* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
+
+ See above.
+
+=== Stdlib updates (outstanding ones only)
+
+* cgi
+ * Add HTML5 tag maker.
+ * CGI#header has been renamed to CGI#http_header and
+ aliased to CGI#header.
+ * When HTML5 tagmaker called, overwrite CGI#header,
+ CGI#header function is to create a <header> element.
+
+* CSV
+ * Removed CSV::dump and CSV::load to protect users from dangerous
+ serialization vulnerability
+
+* iconv
+ * Iconv has been removed. Use String#encode instead.
+
+* io/console
+ * new methods:
+ * added IO#cooked which sets the terminal to cooked mode within the given block.
+ * added IO#cooked! which sets the terminal to cooked.
+ * extended method:
+ * IO#raw, IO#raw!, and IO#getch accept keyword arguments, :min and :time.
+
+* io/wait
+ * new features:
+ * added IO#wait_writable method.
+ * added IO#wait_readable method as alias of IO#wait.
+
+* json
+ * updated to 1.7.7.
+
+* net/http
+ * new features:
+ * Proxies are now automatically detected from the http_proxy environment
+ variable. See Net::HTTP::new for details.
+ * gzip and deflate compression are now requested for all requests by
+ default. See Net::HTTP for details.
+ * SSL sessions are now reused across connections for a single instance.
+ This speeds up connection by using a previously negotiated session.
+ * Requests may be created from a URI which sets the request_uri and host
+ header of the request (but does not change the host connected to).
+ * Responses contain the URI requested which allows easier implementation of
+ redirect following.
+ * new methods:
+ * Net::HTTP#local_host
+ * Net::HTTP#local_host=
+ * Net::HTTP#local_port
+ * Net::HTTP#local_port=
+ * extended method:
+ * Net::HTTP#connect uses local_host and local_port if specified.
+
+* net/imap
+ * new methods:
+ * Net::IMAP.default_port
+ * Net::IMAP.default_imap_port
+ * Net::IMAP.default_tls_port
+ * Net::IMAP.default_ssl_port
+ * Net::IMAP.default_imaps_port
+
+* objspace
+ * new method:
+ * ObjectSpace.reachable_objects_from(obj)
+
+* openssl
+ * Consistently raise an error when trying to encode nil values. All instances
+ of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
+ instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
+ raise NoMethodError in the same case. Constructing such values is still
+ permitted.
+ * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
+ :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
+ :TLSv1_1_client. The version being effectively used can be queried
+ with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
+ blacklist the new TLS versions with OpenSSL::SSL::OP_NO_TLSv1_1 and
+ OpenSSL::SSL::OP_NO_TLSv1_2.
+ * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
+ may be set which gets called whenever a new handshake is negotiated. This
+ also allows to programmatically decline (client) renegotiation attempts.
+ * Support for "0/n" splitting of records as BEAST mitigation via
+ OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
+ * The default options for OpenSSL::SSL::SSLContext have changed to
+ OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
+ instead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for
+ the BEAST attack by default.
+ * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
+ four characters long. This led to awkward situations where an export with
+ a password with fewer than four characters was possible, but accessing the
+ file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
+ OpenSSL::PKey::EC therefore now enforce the same check when exporting a
+ private key to PEM with a password - it has to be at least four characters
+ long.
+ * SSL/TLS support for the Next Protocol Negotiation extension. Supported
+ with OpenSSL 1.0.1 and higher.
+ * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
+ is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
+ manually in order to adapt to situations where FIPS mode would be an
+ explicit requirement.
+ * Authenticated Encryption with Associated Data (AEAD) is supported via
+ Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
+ Currently (OpenSSL 1.0.1c), only GCM mode is supported.
+
+* ostruct
+ * new methods:
+ * OpenStruct#[], []=
+ * OpenStruct#each_pair
+ * OpenStruct#eql?
+ * OpenStruct#hash
+ * OpenStruct#to_h converts the struct to a hash.
+ * extended method:
+ * OpenStruct.new also accepts an OpenStruct / Struct.
+
+* pathname
+ * extended method:
+ * Pathname#find returns an enumerator if no block is given.
+
+* rake
+ * rake has been updated to version 0.9.5.
+
+ This version is backwards-compatible with previous rake versions and
+ contains many bug fixes.
+
+ See
+ http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list
+ of changes in rake 0.9.3, 0.9.4 and 0.9.5.
+
+* RDoc
+ * RDoc has been updated to version 4.0
+
+ This version is largely backwards-compatible with previous rdoc versions.
+ The most notable change is an update to the ri data format (ri data must
+ be regenerated for gems shared across rdoc versions). Further API changes
+ are internal and won't affect most users.
+
+ Notable changes include:
+
+ * Page support for ri. Try `ri ruby:` for a list of pages in ruby or
+ `ri ruby:syntax/literals` for the syntax documentation for literals.
+
+ This also works for gems such as `ri rspec:README` for the rspec gem's
+ README file.
+ * Markdown support. See ri RDoc::Markdown for details.
+
+ See https://github.com/rdoc/rdoc/blob/master/History.rdoc for a full list
+ of changes in rdoc 4.0.
+
+* resolv
+ * new methods:
+ * Resolv::DNS#timeouts=
+ * Resolv::DNS::Config#timeouts=
+
+* rexml
+ * REXML::Document#write supports Hash arguments.
+ * REXML::Document#write supports new :encoding option. It changes
+ XML document encoding. Without :encoding option, encoding in
+ XML declaration is used for XML document encoding.
+
+* RubyGems
+ * Updated to 2.0.0
+
+ RubyGems 2.0.0 features the following improvements:
+
+ * Improved support for default gems shipping with ruby 2.0.0+
+ * A gem can have arbitrary metadata through Gem::Specification#metadata
+ * `gem search` now defaults to --remote and is anchored like gem list.
+ * Added --document to replace --rdoc and --ri. Use --no-document to
+ disable documentation, --document=rdoc to only generate rdoc.
+ * Only ri-format documentation is generated by default.
+ * `gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML
+ documentation.
+
+ For an expanded list of updates and bug fixes see:
+ https://github.com/rubygems/rubygems/blob/master/History.txt
+
+* shellwords
+ * Shellwords#shellescape now stringifies the given object using to_s.
+ * Shellwords#shelljoin accepts non-string objects in the given
+ array, each of which is stringified using to_s.
+
+* stringio
+ * deprecated methods:
+ * StringIO#lines, #bytes, #chars and #codepoints are deprecated.
+
+* syslog
+ * Added Syslog::Logger which provides a Logger API atop Syslog.
+ * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
+ are introduced for easy detection of available constants on a
+ running system.
+
+* tmpdir
+ * incompatible changes:
+ * Dir.mktmpdir uses FileUtils.remove_entry instead of
+ FileUtils.remove_entry_secure. This means that applications should not
+ change the permission of the created temporary directory to make
+ writable from other users.
+
+* yaml
+ * Syck has been removed. YAML now completely depends on libyaml being
+ installed.
+ * libyaml is now bundled with ruby, for cases where the library is not
+ installed locally.
+
+* zlib
+ * Added streaming support for Zlib::Inflate and Zlib::Deflate. This allows
+ processing of a stream without the use of large amounts of memory.
+ * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
+ * Zlib streams are now processed without the GVL. This allows gzip, zlib and
+ deflate streams to be processed in parallel.
+ * deprecated methods:
+ * Zlib::GzipReader#lines and #bytes are deprecated.
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* OpenStruct new methods can conflict with custom attributes named
+ "each_pair", "eql?", "hash" or "to_h".
+
+* Dir.mktmpdir in lib/tmpdir.rb
+
+ See above.
+
+=== C API updates
+
+* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
+
+* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
diff --git a/doc/NEWS/NEWS-2.1.0 b/doc/NEWS/NEWS-2.1.0
new file mode 100644
index 0000000000..26f2374e94
--- /dev/null
+++ b/doc/NEWS/NEWS-2.1.0
@@ -0,0 +1,376 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.1.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file.
+
+== Changes since the 2.0.0 release
+
+=== Language changes
+
+* Now the default values of keyword arguments can be omitted. Those
+ "required keyword arguments" need giving explicitly at the call time.
+
+* Added suffixes for integer and float literals: 'r', 'i', and 'ri'.
+ * "42r" and "3.14r" are evaluated as Rational(42, 1) and 3.14.rationalize,
+ respectively. But exponential form with 'r' suffix like "6.022e+23r" is
+ not accepted because it is misleading.
+ * "42i" and "3.14i" are evaluated as Complex(0, 42) and Complex(0, 3.14),
+ respectively.
+ * "42ri" and "3.14ri" are evaluated as Complex(0, 42r) and Complex(0, 3.14r),
+ respectively.
+
+* def-expr now returns the symbol of its name instead of nil.
+
+=== Core classes updates (outstanding ones only)
+
+* Array
+ * New methods
+ * Array#to_h converts an array of key-value pairs into a Hash.
+
+* Binding
+ * New methods
+ * Binding#local_variable_get(symbol)
+ * Binding#local_variable_set(symbol, obj)
+ * Binding#local_variable_defined?(symbol)
+
+* Enumerable
+ * New methods
+ * Enumerable#to_h converts a list of key-value pairs into a Hash.
+
+* Exception
+ * New methods
+ * Exception#cause provides the previous exception which has been caught
+ at where raising the new exception.
+
+* GC
+ * improvements:
+ * introduced the generational GC a.k.a RGenGC.
+ * added environment variables:
+ * RUBY_GC_HEAP_INIT_SLOTS
+ * RUBY_GC_HEAP_FREE_SLOTS
+ * RUBY_GC_HEAP_GROWTH_FACTOR
+ * RUBY_GC_HEAP_GROWTH_MAX_SLOTS
+ * RUBY_GC_MALLOC_LIMIT_MAX
+ * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR
+ * RUBY_GC_OLDMALLOC_LIMIT
+ * RUBY_GC_OLDMALLOC_LIMIT_MAX
+ * RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
+ * obsoleted environment variables:
+ * RUBY_FREE_MIN (Use RUBY_GC_HEAP_FREE_SLOTS instead)
+ * RUBY_HEAP_MIN_SLOTS (Use RUBY_GC_HEAP_INIT_SLOTS instead)
+
+* Integer
+ * New methods
+ * Fixnum#bit_length
+ * Bignum#bit_length
+ * Bignum performance improvement
+ * Use GMP if available.
+ GMP is used only for several operations:
+ multiplication, division, radix conversion, GCD
+
+* IO
+ * extended methods:
+ * IO#seek supports SEEK_DATA and SEEK_HOLE as whence.
+ * IO#seek accepts symbols (:CUR, :END, :SET, :DATA, :HOLE) for 2nd argument.
+ * IO#read_nonblock accepts optional `exception: false` to return symbols
+ * IO#write_nonblock accepts optional `exception: false` to return symbols
+
+* Kernel
+ * New methods:
+ * Kernel#singleton_method
+
+* Module
+ * New methods:
+ * Module#using, which activates refinements of the specified module only
+ in the current class or module definition.
+ * Module#singleton_class? returns true if the receiver is a singleton class
+ or false if it is an ordinary class or module.
+ * extended methods:
+ * Module#refine is no longer experimental.
+ * Module#include and Module#prepend are now public methods.
+
+* Mutex
+ * misc
+ * Mutex#owned? is no longer experimental.
+
+* Numeric
+ * extended methods:
+ * Numeric#step allows the limit argument to be omitted, in which
+ case an infinite sequence of numbers is generated. Keyword
+ arguments `to` and `by` are introduced for ease of use.
+ `by` can be 0, in which case the same value will be generated
+ indefinitely.
+
+* Process
+ * New methods:
+ * alternative methods to $0/$0=:
+ * Process.argv0() returns the original value of $0.
+ * Process.setproctitle() sets the process title without affecting $0.
+ * Process.clock_gettime
+ * Process.clock_getres
+
+* String
+ * "literal".freeze is now optimized to return the same object
+ * New methods:
+ * String#scrub and String#scrub! verify and fix invalid byte sequence.
+ If you want to use this function with older Ruby,
+ consider to use string-scrub.gem.
+
+* Symbol
+ * All symbols are now frozen.
+
+* pack/unpack (Array/String)
+ * Q! and q! directives for long long type if platform has the type.
+
+* toplevel
+ * extended methods:
+ * main.using is no longer experimental. The method activates refinements
+ in the ancestors of the argument module to support refinement
+ inheritance by Module#include.
+
+=== Core classes compatibility issues (excluding feature bug fixes)
+
+* Hash
+ * incompatible changes:
+ * Hash#reject will return plain Hash object in the future versions, that
+ is the original object's subclass, instance variables, default value,
+ and taintedness will be no longer copied, so now warnings are emitted
+ when called with such Hash.
+
+* IO
+ * incompatible changes:
+ * open ignore internal encoding if external encoding is ASCII-8BIT.
+
+* Kernel#eval, Kernel#instance_eval, and Module#module_eval.
+ * Copies the scope information of the original environment, which means
+ that private, protected, public, and module_function without arguments
+ do not affect the environment outside the eval string.
+ For example, `class Foo; eval "private"; def foo; end; end' doesn't make
+ Foo#foo private.
+
+* Kernel#untrusted?, untrust, and trust
+ * These methods are deprecated and their behavior is the same as tainted?,
+ taint, and untaint, respectively. If $VERBOSE is true, they show warnings.
+
+* Module#ancestors
+ * The ancestors of a singleton class now include singleton classes,
+ in particular itself.
+
+* Module#define_method and Object#define_singleton_method
+ * Now they return the symbols of the defined methods, not the methods/procs
+ themselves.
+
+* Numeric#quo
+ * Raises TypeError instead of ArgumentError if the receiver doesn't have
+ to_r method.
+
+* Proc
+ * Returning from lambda proc now always exits from the Proc, not from the
+ method where the lambda is created. Returning from non-lambda proc exits
+ from the method, same as the former behavior.
+
+String
+ * If invalid: :replace is specified for String#encode, replace
+ invalid byte sequence even if the destination encoding equals to
+ the source encoding.
+
+=== Stdlib updates (outstanding ones only)
+
+* CGI::Util
+ * All class methods modulized.
+
+* Digest
+ * extended methods:
+ * Digest::Class.file takes optional arguments for its constructor
+
+* Matrix
+ * Added Vector#cross_product.
+
+* Net::SMTP
+ * Added Net::SMTP#rset to implement the RSET command
+
+* objspace
+ * new method:
+ * ObjectSpace.trace_object_allocations
+ * ObjectSpace.trace_object_allocations_start
+ * ObjectSpace.trace_object_allocations_stop
+ * ObjectSpace.trace_object_allocations_clear
+ * ObjectSpace.allocation_sourcefile
+ * ObjectSpace.allocation_sourceline
+ * ObjectSpace.allocation_class_path
+ * ObjectSpace.allocation_method_id
+ * ObjectSpace.allocation_generation
+ * ObjectSpace.reachable_objects_from_root
+ * ObjectSpace.dump
+ * ObjectSpace.dump_all
+
+* OpenSSL::BN
+ * extended methods:
+ * OpenSSL::BN.new allows Fixnum/Bignum argument.
+
+* open-uri
+ * Support multiple fields with same field name (like Set-Cookie).
+
+* Pathname
+ * New methods:
+ * Pathname#write
+ * Pathname#binwrite
+
+* rake
+ * Updated to 10.1.0. Major changes include removal of the class namespace,
+ Rake::DSL to hold the rake DSL methods and removal of support for legacy
+ rake features.
+
+ For a complete list of changes since rake 0.9.6 see:
+
+ http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html
+
+ http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html
+
+* RbConfig
+ * New constants:
+ * RbConfig::SIZEOF is added to provide the size of C types.
+
+* RDoc
+ * Updated to 4.1.0. Major enhancements include a modified default template
+ * and accessibility enhancements.
+
+ For a list of minor enhancements and bug fixes see:
+ https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
+
+* Resolv
+ * New methods:
+ * Resolv::DNS.fetch_resource
+ * One-shot multicast DNS support
+ * Support LOC resources
+
+* REXML::Parsers::SAX2Parser
+ * Fixes wrong number of arguments of entitydecl event. Document of the event
+ says "an array of the entity declaration" but implementation passes two
+ or more arguments. It is an implementation bug but it breaks backward
+ compatibility.
+
+* REXML::Parsers::StreamParser
+ * Supports "entity" event.
+
+* REXML::Text
+ * REXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.
+ * REXML::Text#<< supports not "raw" mode.
+
+* Rinda::RingServer, Rinda::RingFinger
+ * Rinda now supports multicast sockets. See Rinda::RingServer and
+ Rinda::RingFinger for details.
+
+* RubyGems
+ * Updated to 2.2.0. Notable new features include:
+
+ * Gemfile or gem.deps.rb support including Gem.file.lock (experimental)
+ * Improved, iterative resolver (compared to RubyGems 2.1 and earlier)
+ * Support for a sharing a GEM_HOME across ruby platforms and versions
+
+ For a complete list of enhancements and bug fixes see:
+ https://github.com/rubygems/rubygems/tree/master/History.txt
+
+* Set
+ * New methods:
+ * Set#intersect?
+ * Set#disjoint?
+
+* Socket
+ * New methods:
+ * Socket.getifaddrs
+
+* StringScanner
+ * extended methods:
+ * StringScanner#[] supports named captures.
+
+* Syslog::Logger
+ * Added facility.
+
+* Tempfile
+ * New methods:
+ * Tempfile.create
+
+* Timeout
+ * The exception to terminate the given block can no longer be rescued
+ inside the block, by default, unless the exception class is given
+ explicitly.
+
+* TSort
+ * New methods:
+ * TSort.tsort
+ * TSort.tsort_each
+ * TSort.strongly_connected_components
+ * TSort.each_strongly_connected_component
+ * TSort.each_strongly_connected_component_from
+
+* WEBrick
+ * The body of a response may now be a StringIO or other IO-like that responds
+ to #readpartial and #read.
+
+* XMLRPC::Client
+ * New methods:
+ * XMLRPC::Client#http. It returns Net::HTTP for the client. Normally,
+ it is not needed. It is useful when you want to change minor HTTP client
+ options. You can change major HTTP client options by XMLRPC::Client
+ methods. You should use XMLRPC::Client methods for changing major
+ HTTP client options instead of XMLRPC::Client#http.
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* Set
+ * incompatible changes:
+ * Set#to_set now returns self instead of generating a copy.
+
+* URI
+ * incompatible changes:
+ * URI.decode_www_form follows current WHATWG URL Standard.
+ It gets encoding argument to specify the character encoding.
+ It now allows loose percent encoded strings, but denies ;-separator.
+ * URI.encode_www_form follows current WHATWG URL Standard.
+ It gets encoding argument to convert before percent encode.
+ UTF-16 strings aren't converted to UTF-8 before percent encode by default.
+
+* curses
+ * Removed.
+ curses is now available as a gem.
+ See https://rubygems.org/gems/curses for details.
+
+=== Built-in global variables compatibility issues
+
+* $SAFE
+ * $SAFE=4 is obsolete. If $SAFE is set to 4 or larger, an ArgumentError
+ is raised.
+
+=== C API updates
+
+* rb_gc_set_params() is deprecated. This is only used in Ruby internal.
+
+* rb_gc_count() added. This returns the number of times GC occurred.
+
+* rb_gc_stat() added. This allows access to specific GC.stat() values from C
+ without any allocation overhead.
+
+* rb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().
+
+* rb_postponed_job_register() added. Takes a function callback which is invoked
+ when the VM is in a consistent state, i.e. to perform work from a C signal
+ handler.
+
+* rb_profile_frames() added. Provides low-cost access to the current ruby stack
+ for callstack profiling.
+
+* rb_tracepoint_new() supports new internal events accessible only from C:
+ * RUBY_INTERNAL_EVENT_NEWOBJ
+ * RUBY_INTERNAL_EVENT_FREEOBJ
+ * RUBY_INTERNAL_EVENT_GC_START
+ * RUBY_INTERNAL_EVENT_GC_END_MARK
+ * RUBY_INTERNAL_EVENT_GC_END_SWEEP
+ * Note that you *can not* specify "internal events" with normal events
+ (such as RUBY_EVENT_CALL, RUBY_EVENT_RETURN) simultaneously.
diff --git a/doc/NEWS/NEWS-2.2.0 b/doc/NEWS/NEWS-2.2.0
new file mode 100644
index 0000000000..8b2bd0ba0a
--- /dev/null
+++ b/doc/NEWS/NEWS-2.2.0
@@ -0,0 +1,359 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.2.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file.
+
+== Changes since the 2.1.0 release
+
+=== Language changes
+
+* nil/true/false
+ * nil/true/false objects are frozen. [Feature #8923]
+
+* Hash literal
+ * Symbol key followed by a colon can be quoted. [Feature #4276]
+
+* default argument
+ fixed a very longstanding bug that an optional argument was not
+ accessible in its default value expression. [Bug #9593]
+
+=== Core classes updates (outstanding ones only)
+
+* Binding
+ * New methods:
+ * Binding#local_variables
+ * Binding#receiver
+
+* Dir
+ * New methods:
+ * Dir#fileno
+
+* Enumerable
+ * New methods:
+ * Enumerable#slice_after
+ * Enumerable#slice_when
+ * Extended methods:
+ * min, min_by, max and max_by supports optional argument to return
+ multiple elements.
+
+* Float
+ * New methods:
+ * Float#next_float
+ * Float#prev_float
+
+* File
+ * New methods:
+ * File.birthtime
+ * File#birthtime
+
+* File::Stat
+ * New methods:
+ * File::Stat#birthtime
+
+* GC
+ * GC.latest_gc_info returns :state to represent current GC status.
+ * Improvements
+ * Introduce incremental marking for major GC. [Feature #10137]
+
+* IO
+ * Improvements
+ * IO#read_nonblock and IO#write_nonblock for pipes on Windows are supported.
+
+* Kernel
+ * New methods:
+ * Kernel#itself
+ * Improvements
+ * Kernel#throw raises UncaughtThrowError, subclass of ArgumentError when
+ there is no corresponding catch block, instead of ArgumentError.
+
+* Process
+ * Extended method:
+ * Process execution methods such as Process.spawn opens the file in write
+ mode for redirect from [:out, :err].
+
+* String
+ * New methods:
+ * String#unicode_normalize
+ * String#unicode_normalize!
+ * String#unicode_normalized?
+
+* Symbol
+ * Improvements
+ * Most symbols which are returned by String#to_sym and
+ String#intern are GC-able.
+
+* Method
+ * New methods:
+ * Method#curry([ arity ]) returns a curried Proc.
+ * Method#super_method returns a Method of superclass, which would be called
+ when super is used.
+
+=== Core classes compatibility issues (excluding feature bug fixes)
+
+* Enumerable
+ * Enumerable#slice_before's state management deprecated.
+ * Enumerable#chunk's state management deprecated.
+
+* GC
+ * incompatible changes:
+ * Rename GC.stat entries. [Feature #9924]
+ See https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing
+
+* Hash
+ * incompatible changes:
+ * Change overriding policy for duplicated key. [Bug #10315]
+ { **hash1, **hash2 } contains values of hash2 for duplicated keys.
+
+* IO
+ * incompatible changes:
+ * When flushing file IO with IO#flush, you cannot assume that the metadata
+ of the file is updated immediately. On some platforms (especially
+ Windows), it is delayed until the filesystem load is decreased.
+ Use IO#fsync if you want to guarantee updating metadata.
+
+* Math
+ * incompatible changes:
+ * Math.log now raises Math::DomainError instead of returning NaN if the
+ base is less than 0, and returns NaN instead of -infinity if both of
+ two arguments are 0.
+ * Math.atan2 now returns values like as expected by C99 if both two
+ arguments are infinity.
+
+* Proc
+ * incompatible changes:
+ * ArgumentError is no longer raised when lambda Proc is passed as a
+ block, and the number of yielded arguments does not match the formal
+ arguments of the lambda, if just an array is yielded and its length
+ matches.
+
+* Process
+ * Process execution methods such as Process.spawn opens the file in write
+ mode for redirect from [:out, :err].
+ Before Ruby 2.2, it was opened in read mode.
+
+=== Stdlib updates (outstanding ones only)
+
+* Continuation
+ * callcc is obsolete. use Fiber instead.
+
+* Digest
+
+ * Digest() should now be thread-safe. If you have a problem with
+ regard to on-demand loading under a multi-threaded environment,
+ preload "digest/*" modules on boot or use this method instead of
+ directly referencing Digest::*.
+ * Digest::HMAC has been removed just as previously noticed.
+
+* DL
+ * DL has been removed from stdlib. Please use Fiddle instead!
+
+* Etc
+ * New methods:
+ * Etc.uname
+ * Etc.sysconf
+ * Etc.confstr
+ * IO#pathconf
+ * Etc.nprocessors
+
+* Find, Pathname
+ * Extended methods:
+ * find method accepts "ignore_error" keyword argument.
+
+* Matrix
+ * New methods:
+ * Matrix#first_minor(row, column) returns the submatrix obtained
+ by deleting the specified row and column.
+ * Matrix#cofactor(row, column) returns the (row, column) cofactor
+ which is obtained by multiplying the first minor by (-1)**(row + column).
+ * Matrix#adjugate returns the adjugate of the matrix.
+ * hstack and vstack are new instance and class methods to stack matrices
+ horizontally and vertically.
+ * Matrix#laplace_expansion(row_or_column: num) returns the laplace_expansion
+ along the +num+ -th row or column.
+ * Vector.basis(size:, index:) returns the specified basis vector.
+ * Unary - and + added for Vector and Matrix.
+ * Vector#cross_product generalized to arbitrary dimensions.
+ * Vector#dot and #cross are aliases for #inner_product and #cross_product.
+ * Vector#angle_with returns the angle with its argument
+ * New instance and class method independent? to test linear independence.
+
+* Pathname
+ * Pathname#/ is aliased to Pathname#+.
+ * New methods:
+ * Pathname#birthtime
+
+* Rake
+ * Updated to Rake 10.4.0. For full release notes see:
+
+ http://docs.seattlerb.org/rake/History_rdoc.html#label-10.4.0
+
+* RubyGems
+ * Updated to RubyGems 2.4.2. For full release notes see:
+
+ http://docs.seattlerb.org/rubygems/History_txt.html#label-2.4.2+%2F+2014-10-01
+
+* TSort
+ * TSort.tsort_each, TSort.each_strongly_connected_component and
+ TSort.each_strongly_connected_component_from returns an enumerator if
+ no block given.
+
+* XMLRPC
+ * Added new parser class named LibXMLStreamParser.
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* lib/mathn.rb
+ * Show deprecated warning [Feature #10169]
+
+* ext/date/lib/date/format.rb
+ * Removed because it's empty file.
+
+* Digest
+ * Digest::HMAC has finally ceased to exist. Use OpenSSL::HMAC or an external gem instead.
+
+* time.rb
+ * Time.parse, Time.strptime, Time.rfc2822, Time.xmlschema may produce
+ fixed-offset Time objects.
+ It is happen when usual localtime doesn't preserve the offset from UTC.
+ * Time.httpdate produces always UTC Time object.
+ * Time.strptime raises ArgumentError when no date information.
+
+* lib/rational.rb
+ * Removed because it is deprecated from 2009.
+
+* lib/complex.rb
+ * Removed because it is deprecated from 2009.
+
+* lib/prettyprint.rb
+ * Removed PrettyPrint#first?
+
+* lib/minitest/*.rb
+ * Removed because it conflicts to minitest 5. [Feature #9711]
+
+* lib/test/**/*.rb
+ * Removed because it conflicts to minitest 5, and it was just an wrapper
+ of minitest 4. [Feature #9711]
+
+* lib/uri
+ * support RFC 3986. [Feature #2542]
+
+* GServer
+ * GServer is extracted to gserver gem. It's unmaintain code.
+
+* Logger
+ * Logger::Application is extracted to logger-application gem. It's unmaintain code.
+
+* ObjectSpace (after requiring "objspace")
+ * ObjectSpace.memsize_of(obj) returns a size includes sizeof(RVALUE). [Bug #8984]
+
+* Prime
+ * incompatible changes:
+ * Prime.prime? now returns false for negative numbers. This method
+ should not be used to know the number is composite or not. [Bug #7395]
+
+* Psych
+ * Removed Psych::EngineManager [Bug #8344]
+
+=== Built-in global variables compatibility issues
+
+=== C API updates
+
+* Deprecated APIs removed. [Feature #9502]
+
+ Check_SafeStr -> SafeStringValue
+ rb_check_safe_str -> SafeStringValue
+ rb_quad_pack -> rb_integer_pack
+ rb_quad_unpack -> rb_integer_unpack
+ rb_read_check : access struct FILE internal. no replacement.
+ rb_struct_iv_get : internal function. no replacement.
+ struct rb_blocking_region_buffer : internal type. no replacement.
+ rb_thread_blocking_region_begin -> rb_thread_call_without_gvl family
+ rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
+ TRAP_BEG -> rb_thread_call_without_gvl family
+ TRAP_END -> rb_thread_call_without_gvl family
+ rb_thread_select -> rb_thread_fd_select
+ struct rb_exec_arg : internal type. no replacement.
+ rb_exec : internal function. no replacement.
+ rb_exec_arg_addopt : internal function. no replacement.
+ rb_exec_arg_fixup : internal function. no replacement.
+ rb_exec_arg_init : internal function. no replacement.
+ rb_exec_err : internal function. no replacement.
+ rb_fork : internal function. no replacement.
+ rb_fork_err : internal function. no replacement.
+ rb_proc_exec_n : internal function. no replacement.
+ rb_run_exec_options : internal function. no replacement.
+ rb_run_exec_options_err : internal function. no replacement.
+ rb_thread_blocking_region -> rb_thread_call_without_gvl family
+ rb_thread_polling -> rb_thread_wait_for
+ rb_big2str0 : internal function. no replacement.
+ rb_big2ulong_pack -> rb_integer_pack
+ rb_gc_set_params : internal function. no replacement.
+ rb_io_mode_flags -> rb_io_modestr_fmode
+ rb_io_modenum_flags -> rb_io_oflags_fmode
+
+* struct RBignum is hidden. [Feature #6083]
+ Use rb_integer_pack and rb_integer_unpack instead.
+
+* struct RRational is hidden. [Feature #9513]
+ Use rb_rational_num and rb_rational_den instead.
+
+* rb_big_new and rb_big_resize takes a size_t instead of long.
+
+* rb_num2long returns a long instead of SIGNED_VALUE.
+
+* rb_num2ulong returns an unsigned long instead of VALUE.
+
+* st hash table uses power-of-two sizes for speed [Feature #9425].
+ Lookups are 10-25% faster if using appropriate hash functions.
+ However, weaknesses in hash distribution can no longer be masked
+ by prime number-sized tables, so extensions may need to tweak
+ hash functions to ensure good distribution.
+
+* rb_sym2str() added. This is almost same as `rb_id2str(SYM2ID(sym))`
+ but not pinning a dynamic symbol.
+
+* rb_str_cat_cstr() added. This is the same as `rb_str_cat2()`.
+
+* `rb_str_substr()` and `rb_str_subseq()` will share middle of a string,
+ but not only the end of a string, in the future. Therefore, result
+ strings may not be NUL-terminated, `StringValueCStr()` is needed
+ calling to obtain a NUL-terminated C string.
+
+* rb_tracepoint_new() supports new internal events accessible only from C:
+ * RUBY_INTERNAL_EVENT_GC_ENTER
+ * RUBY_INTERNAL_EVENT_GC_EXIT
+ r47528
+
+* rb_hash_delete() now does not call the block given to the current method.
+
+* rb_extract_keywords() and rb_get_kwargs() exported. See README.EXT
+ for details.
+
+=== Build system updates
+
+* jemalloc is optionally supported via `./configure --with-jemalloc`
+ jemalloc may be suitable when system malloc is slow or prone
+ to fragmentation. [Feature #9113]
+
+=== Implementation changes
+
+* GC
+ * Most symbols which are returned by String#to_sym and
+ String#intern are GC-able [Feature #9634]
+ * Introduce incremental marking for major GC. [Feature #10137]
+ * Enable lazy sweep on GC caused by malloc().
+
+* VM
+ * Use frozen string literals for Hash#[] and Hash#[]=
+ * Fast keyword arguments passing [Feature #10440]
+ * Allow to receive huge splatted array by a rest argument [Feature #10440]
+
+* Process
+ * Process creation methods, such as spawn(), uses vfork() system call.
+ vfork() is faster than fork() when the parent process uses huge memory.
diff --git a/doc/NEWS/NEWS-2.3.0 b/doc/NEWS/NEWS-2.3.0
new file mode 100644
index 0000000000..065515257e
--- /dev/null
+++ b/doc/NEWS/NEWS-2.3.0
@@ -0,0 +1,384 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.3.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
+
+== Changes since the 2.2.0 release
+
+=== Language changes
+
+* frozen-string-literal pragma:
+
+ * new pragma, frozen-string-literal has been experimentally introduced. [Feature #8976]
+ * besides, --enable/--disable=frozen-string-literal options also have
+ been introduced. [Feature #8976]
+ * command line options --debug or --debug=frozen-string-literal enable
+ additional debugging mode which shows created location with at frozen
+ object error (RuntimeError). [Feature #11725]
+
+* safe navigation operator:
+
+ * new method call syntax, `object&.foo', method #foo is called on
+ `object' if it is not nil. [Feature #11537]
+
+ This is similar to `try!' in Active Support, except:
+ * method name is syntactically required
+ obj.try! {} # valid
+ obj&. {} # syntax error
+ * arguments are evaluated only if a call is made:
+ obj.try!(:foo, bar()) # bar() is always evaluated
+ obj&.foo(bar()) # bar() is conditionally evaluated
+ * attribute assignment is valid
+ obj&.attr += 1
+
+* the did_you_mean gem:
+
+ * When a NameError or NoMethodError occurs because of a typo in the name,
+ the did_you_mean gem automatically suggests other names similar to the
+ method name.
+
+ "Yuki".starts_with?("Y")
+ # => NoMethodError: undefined method `starts_with?' for "Yuki":String
+ # Did you mean? start_with?
+
+* indented here document:
+
+ * new string literal, here document starts with `<<~`.
+ refer doc/syntax/literals.rdoc for more details. [Feature #9098]
+
+=== Core classes updates (outstanding ones only)
+
+* ARGF
+
+ * ARGF.read_nonblock supports `exception: false' like IO#read_nonblock. [Feature #11358]
+
+* Array
+
+ * Array#bsearch_index [Feature #10730]
+ * Array#dig [Feature #11643]
+
+* Comparable
+
+ * Comparable#== no longer rescues exceptions [Feature #7688]
+
+* Encoding
+
+ * new Encoding::IBM037 (alias ebcdic-cp-us; dummy)
+
+* Enumerable
+
+ * Enumerable#grep_v is added as inverse version of Enumerable#grep. [Feature #11049]
+ * Enumerable#chunk_while [Feature #10769]
+
+* Enumerator::Lazy
+
+ * Enumerator::Lazy#grep_v [Feature #11773]
+
+* File
+
+ * File.mkfifo [Feature #11536]
+ * Add File::TMPFILE corresponding to O_TMPFILE
+
+* Hash
+
+ * Hash#fetch_values [Feature #10017]
+ * Hash#dig [Feature #11643]
+ * Hash#<=, Hash#<, Hash#>=, Hash#> [Feature #10984]
+ * Hash#to_proc [Feature #11653]
+
+* IO
+
+ * new mode flag File::SHARE_DELETE is available.
+ this flag means to permit deleting opened file on Windows, but currently
+ this affect only files opened as binary. [Feature #11218]
+
+ * new option parameter `flags' is added.
+ this parameter is bitwise-ORed to oflags generated by normal mode argument. [Feature #11253]
+
+ * IO#advise no longer raises Errno::ENOSYS in cases where it was
+ detected at build time but not available at runtime. [Feature #11806]
+
+* Kernel
+
+ * Kernel#loop, when stopped by a StopIteration exception, returns
+ what the enumerator has returned instead of nil. [Feature #11498]
+
+* Module
+ * Module#deprecate_constant [Feature #11398]
+
+* NameError
+ * NameError#receiver is added to take the receiver object. [Feature #10881]
+
+* Numeric
+
+ * Numeric#positive? and Numeric#negative? are added, which return
+ true when the receiver is positive and negative respectively. [Feature #11151]
+
+* Proc
+
+ * Proc#call (and also #[], #===, #yield) are optimized.
+ Backtrace doesn't show each method (show block lines directly).
+ TracePoint also ignores these calls. [Feature #11569]
+
+* Queue (Thread::Queue)
+
+ * Queue#close is added to notice a termination. [Feature #10600]
+
+* Regexp/String: Updated Unicode version from 7.0.0 to 8.0.0
+
+* RubyVM::InstructionSequence
+ * add the following methods as a primitive tool of iseq loader.
+ See sample/iseq_loader.rb for usage.
+ Note that loader does not have verifier so it is easy to cause
+ critical problem by loading modified/broken binary data.
+ See [Feature #11788] for more details. (experimental feature)
+ * RubyVM::InstructionSequence#to_binary(extra_data = nil)
+ * RubyVM::InstructionSequence.load_from_binary(binary)
+ * RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
+
+* String
+
+ * String#+@ and String#-@ are added to get mutable/frozen strings. [Feature #11782]
+
+ * String.new now accepts new option parameter `encoding'. [Feature #11785]
+
+* Struct
+ * Struct#dig [Feature #11688]
+
+* Thread
+ * Thread#name, Thread#name= are added to handle thread names [Feature #11251]
+
+=== Core classes compatibility issues (excluding feature bug fixes)
+
+* Array
+ * Array#select!, Array#keep_if, Array#reject!, and Array#delete_if
+ no longer changes the receiver array instantly every time the
+ block is called. [Feature #10714]
+
+ * Array#flatten and Array#flatten! no longer try to call #to_ary
+ method on elements beyond the given level. [Bug #10748]
+
+ * Array#inspect doesn't raise error even if its content returns
+ a string which is not compatible with Encoding.default_external
+ as inspected result. [Feature #11801]
+
+* Enumerable
+ * Enumerable#chunk and Enumerable#slice_before no longer takes the
+ initial_state argument. [Feature #10958]
+ Use a local variable instead to maintain a state.
+
+* File::Stat
+ * On Windows File::Stat#ino always returned 0, but now returns
+ BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low. [Feature #11216]
+
+* Hash
+ * Hash#inspect doesn't raise error even if its content returns
+ a string which is not compatible with Encoding.default_external
+ as inspected result. [Feature #11801]
+
+* IO
+ * IO#close doesn't raise when the IO object is closed. [Feature #10718]
+ * IO#each_codepoint raises an exception at incomplete character
+ before EOF when conversion takes place. [Bug #11444]
+
+* Module
+ * Module#define_method and Object.define_singleton_method now
+ require method body, Proc, Method, or a block, and raise
+ ArgumentError if no block is given directly. [Bug #11283]
+
+* pack/unpack (Array/String)
+ * j and J directives for pointer width integer type. [Feature #11215]
+
+
+=== Stdlib updates (outstanding ones only)
+
+* Logger
+
+ * Logger#level= now supports symbol and string levels such as :debug, :info,
+ :warn, :error, :fatal (case insensitive) [Feature #11695]
+ * Logger#reopen is added to reopen a log device. [Feature #11696]
+
+* io/wait
+ * IO#wait_readable no longer checks FIONREAD, it may be used for
+ non-bytestream IO such as listen sockets.
+
+* Net::FTP
+ * Net::FTP#mlst is added.
+ * Net::FTP#mlsd is added.
+
+* nkf
+ * Merge nkf 2.1.4.
+
+* ObjectSpace (objspace)
+ * ObjectSpace.count_symbols is added.
+ * ObjectSpace.count_imemo_objects is added.
+ * ObjectSpace.internal_class_of is added.
+ * ObjectSpace.internal_super_of is added.
+
+* OpenSSL
+ * OpenSSL::SSL::SSLSocket#accept_nonblock and
+ OpenSSL::SSL::SSLSocket#connect_nonblock supports `exception: false`. [Feature #10532]
+
+* Pathname
+ * Pathname#descend and Pathname#ascend supported blockless form. [Feature #11052]
+
+* Socket
+ * Socket#connect_nonblock, Socket#accept_nonblock,
+ TCPServer#accept_nonblock, UNIXServer#accept_nonblock,
+ BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock,
+ BasicSocket#sendmsg_nonblock all support `exception: false` to return
+ :wait_readable or :wait_writable symbols instead of raising
+ IO::WaitReadable or IO::WaitWritable exceptions [Feature #10532] [Feature #11229]
+ * BasicSocket#recv and BasicSocket#recv_nonblock allow an output
+ String buffer argument like IO#read and IO#read_nonblock to reduce
+ GC overhead [Feature #11242]
+
+* StringIO
+ * In read-only mode, StringIO#set_encoding no longer sets the encoding
+ of its buffer string. Setting the encoding of the string directly
+ without StringIO#set_encoding may cause unpredictable behavior now. [Bug #11827]
+
+* timeout
+ * Object#timeout is now warned as deprecated when called.
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* ext/coverage/coverage.c
+ * Coverage.peek_result: new method to allow coverage to be captured without
+ stopping the coverage tool. [Feature #10816]
+
+* Fiddle
+ * Fiddle::Function#call releases the GVL. [Feature #11607]
+
+* io-console
+ * Update to io-console 0.4.5, and change the license to BSD 2-clause
+ "Simplified" License.
+
+* lib/base64.rb
+ * Base64.urlsafe_encode64: added a "padding" option to suppress
+ the padding character ("="). [Feature #10740]
+ * Base64.urlsafe_decode64: now it accepts not only correctly-padded
+ input but also unpadded input. [Feature #10740]
+
+* lib/drb/drb.rb
+ * removed unused argument. https://github.com/ruby/ruby/pull/515
+
+* lib/matrix.rb
+ * Add Vector#round. https://github.com/ruby/ruby/pull/802
+
+* lib/webrick/utils.rb
+ * removed unused argument. https://github.com/ruby/ruby/pull/356
+
+* Net::FTP
+ * Connections are in passive mode per default now. The default mode can
+ be changed by Net::FTP.default_passive=. [Feature #11612]
+
+* Net::HTTP
+ * default value of Net::HTTP#open_timeout is now 60 (was nil).
+
+* Net::Telnet
+ * Net::Telnet is extracted to net-telnet gem. It's unmaintain code. [Feature #11083]
+
+* Psych
+ * Updated to Psych 2.0.17
+
+* Rake
+ * Rake is removed from stdlib. [Feature #11025]
+
+* RDoc
+ * Updated to RDoc 4.2.1. For full release notes see:
+
+ https://github.com/rdoc/rdoc/blob/master/History.rdoc#421--2015-12-22
+
+* RubyGems
+ * Updated to RubyGems 2.5.1. For full release notes see:
+
+ http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
+ and
+ http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
+
+=== Built-in global variables compatibility issues
+
+* $SAFE
+ * $SAFE=2 and $SAFE=3 are obsolete. If $SAFE is set to 2 or larger,
+ an ArgumentError is raised. [Feature #5455]
+
+=== C API updates
+
+* rb_define_class_id_under() now raises a TypeError exception when the
+ class is already defined but its superclass does not match the given
+ superclass, as well as definitions in ruby level.
+
+* rb_timespec_now() is added to fetch current datetime as struct timespec. [Feature #11558]
+
+* rb_time_timespec_new() is added to create a time object with epoch,
+ nanosecond, and UTC/localtime/time offset arguments. [Feature #11558]
+
+* rb_autoload() deprecated, use rb_funcall() instead. [Feature #11664]
+
+* rb_compile_error_with_enc(), rb_compile_error(), and rb_compile_bug()
+ deprecated. these functions are exposed but only for internal use.
+ external libraries should not use them.
+
+=== Supported platform changes
+
+* OS/2 is no longer supported
+
+* BeOS is no longer supported
+
+* Borland-C is no longer supported
+
+* Haiku now stable and best effort
+
+=== Implementation improvements
+
+* Optimize Proc#call to eliminate method frame construction. [Feature #11569]
+
+* Reconsidering method entry data structure. [Bug #11278]
+
+* Introducing new table data structure for ID keys tables used by
+ method table and so on. New table structure is simple and fast
+ than st_table. [Feature #11420]
+
+* Machine code level tuning for object allocation and method calling
+ code. r52099, r52254
+
+* RubyVM::InstructionSequence is extended for future improvement. [Feature #11788]
+
+* Case dispatch is now optimized for all special constant literals
+ including nil, true, and false. Previously, only literal strings,
+ symbols, integers and floats compiled to optimized case dispatch. [Feature #11769]
+
+* Instance variables on non-pure Ruby classes (T_DATA, T_FILE,
+ etc..) is less expensive to store than before. [Feature #11170]
+
+* All accesses to members of big Struct objects are performed in
+ constant-time. Previously, Struct elements beyond the first 10
+ elements used a linear scan. [Feature #10585]
+
+* The Set class got several speed up. [Misc #10754], [r52591]
+
+* Socket and I/O-related improvements
+
+ * Calling overhead of most of new keyword-using I/O methods in
+ [Feature #11229] is reduced by avoiding the inefficient C API
+ to parse keywords. [Feature #11339]
+
+ * The standard library is updated to use the improved
+ exception-free non-blocking I/O from [Feature #11229].
+ This has the additional benefit of quieter $DEBUG output in
+ addition to reducing expensive exceptions. [Feature #11044]
+
+ * (Linux-only) waiting on a single FD anywhere in the stdlib no longer
+ uses select(2), making it immune to slowdowns with high-numbered
+ FDs. [Feature #11081] [Feature #11377]
+
+* CGI.escapeHTML is optimized with C extension.
+ https://github.com/ruby/ruby/pull/1164
diff --git a/doc/NEWS/NEWS-2.4.0 b/doc/NEWS/NEWS-2.4.0
new file mode 100644
index 0000000000..8a02f03809
--- /dev/null
+++ b/doc/NEWS/NEWS-2.4.0
@@ -0,0 +1,399 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.4.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
+
+== Changes since the 2.3.0 release
+
+=== Language changes
+
+* Multiple assignment in conditional expression is now allowed. [Feature #10617]
+
+* Refinements is enabled at method by Symbol#to_proc. [Feature #9451]
+
+* Refinements is enabled with Kernel#send and BasicObject#__send__. [Feature #11476]
+
+* Rescue modifier now applicable to method arguments. [Feature #12686]
+
+* Toplevel return is now allowed. [Feature #4840]
+
+=== Core classes updates (outstanding ones only)
+
+* Array
+
+ * Array#concat [Feature #12333]
+
+ Now takes multiple arguments.
+
+ * Array#max and Array#min. [Feature #12172]
+
+ This may cause a tiny incompatibility: if you redefine
+ Enumerable#max and call max to an Array, your redefinition will be
+ now ignored. You should also redefine Array#max.
+
+ * Array#pack [Feature #12754]
+
+ Now takes optional argument `buffer:' to reuse already allocated buffer.
+
+ * Array#sum [Feature #12217]
+
+ This is different from Enumerable#sum in that Array#sum doesn't depend on
+ the definition of each method.
+
+* Comparable
+
+ * Comparable#clamp. [Feature #10594]
+
+* Dir
+
+ * Dir.empty?. [Feature #10121]
+
+* Enumerable
+
+ * Enumerable#chunk called without a block now return an Enumerator [Feature #2172]
+ * Enumerable#sum [Feature #12217]
+ * Enumerable#uniq [Feature #11090]
+
+* Enumerator::Lazy
+
+ * Enumerator::Lazy#chunk_while [GH-1186]
+ * Enumerator::Lazy#uniq [Feature #11090]
+
+* File
+
+ * File.empty?. [Feature #9969]
+
+* Float
+
+ * Float#ceil, Float#floor, and Float#truncate now take an optional
+ digits, as well as Float#round. [Feature #12245]
+
+ * Float#round now takes an optional keyword argument, half option, and
+ the default behavior is round-up. [Bug #12548] [Bug #12958]
+ half option can be one of :even, :up, and :down. [Feature #12953]
+
+* Hash
+
+ * Hash#compact and Hash#compact! [Feature #11818]
+ * Hash#transform_values and Hash#transform_values! [Feature #12512]
+
+* Integer
+
+ * Fixnum and Bignum are unified into Integer [Feature #12005]
+
+ * Integer#ceil, Integer#floor, and Integer#truncate now take an optional
+ digits, as well as Integer#round. [Feature #12245]
+
+ * Integer#digits for extracting columns of place-value notation [Feature #12447]
+
+ * Integer#round now takes an optional keyword argument, half option, and the
+ default behavior is round-up now. [Bug #12548] [Bug #12958]
+
+ half option can be one of :even, :up, and :down. [Feature #12953]
+
+* IO
+
+ * IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach now takes
+ an optional keyword argument, chomp flag. [Feature #12553]
+
+* Kernel
+
+ * Kernel#clone now takes an optional keyword argument, freeze flag. [Feature #12300]
+
+* MatchData
+
+ * MatchData#named_captures [Feature #11999]
+ * MatchData#values_at supports named captures [Feature #9179]
+
+* Module
+
+ * Module#refine accepts a module as the argument now. [Feature #12534]
+ * Module.used_modules [Feature #7418]
+
+* Numeric
+
+ * Numeric#finite?, Numeric#infinite? [Feature #12039]
+
+* Process
+
+ * Support CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW, and
+ CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12.
+
+* Rational
+
+ * Rational#round now takes an optional keyword argument, half option, and
+ the default behavior is round-up now. [Bug #12548] [Bug #12958]
+ half option can be one of :even, :up, and :down. [Feature #12953]
+
+* Regexp
+
+ * meta character \X matches Unicode 9.0 characters with some workarounds
+ for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences.
+
+ * Regexp#match? [Feature #8110]
+
+ This returns bool and doesn't save backref.
+
+ * Update to Onigmo 6.0.0.
+
+* Regexp/String: Update Unicode version from 8.0.0 to 9.0.0 [Feature #12513]
+
+* RubyVM::Env
+
+ * RubyVM::Env was removed.
+
+* String
+
+ * String#casecmp? [Feature #12786]
+
+ * String#concat, String#prepend [Feature #12333]
+
+ Now takes multiple arguments.
+
+ * String#each_line, String#lines now takes an optional keyword argument,
+ chomp flag. [Feature #12553]
+
+ * String#match? [Feature #12898]
+
+ * String#unpack1 [Feature #12752]
+
+ * String#upcase, String#downcase, String#capitalize, String#swapcase and
+ their bang variants work for all of Unicode, and are no longer limited
+ to ASCII. Supported encodings are UTF-8, UTF-16BE/LE, UTF-32BE/LE, and
+ ISO-8859-1~16. Variations are available with options. See the documentation
+ of String#downcase for details. [Feature #10085]
+
+ * String.new(capacity: size) [Feature #12024]
+
+* StringIO
+
+ * StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines now takes
+ an optional keyword argument, chomp flag. [Feature #12553]
+
+* Symbol
+
+ * Symbol#casecmp? [Feature #12786]
+
+ * Symbol#match now returns MatchData. [Bug #11991]
+
+ * Symbol#match? [Feature #12898]
+
+ * Symbol#upcase, Symbol#downcase, Symbol#capitalize, and Symbol#swapcase now
+ work for all of Unicode. See the documentation of String#downcase
+ for details. [Feature #10085]
+
+* Thread
+
+ * Thread#report_on_exception and Thread.report_on_exception [Feature #6647]
+
+* TracePoint
+
+ * TracePoint#callee_id [Feature #12747]
+
+* Warning
+
+ * New module named Warning is introduced. By default it has only
+ one singleton method, named warn. This makes it possible for
+ 3rd-party libraries to control the way warnings are handled. [Feature #12299]
+
+=== Stdlib updates (outstanding ones only)
+
+* CGI
+
+ * Don't allow , as a separator [Bug #12791]
+
+* CSV
+
+ * Add a liberal_parsing option. [Feature #11839]
+
+* IPAddr
+
+ * IPAddr#== and IPAddr#<=> no longer raise an exception if coercion fails. [Bug #12799]
+
+* IRB
+
+ * Binding#irb: Start a REPL session like `binding.pry` at r56624.
+
+* Logger
+
+ * Allow specifying logger parameters in constructor such
+ as level, progname, datetime_format, formatter. [Feature #12224]
+ * Add shift_period_suffix option. [Feature #10772]
+
+* Net::HTTP
+
+ * New method: Net::HTTP.post [Feature #12375]
+
+* Net::FTP
+
+ * Support TLS (RFC 4217).
+ * Support hash style options for Net::FTP.new.
+ * Add a new optional argument pathname to Net::FTP#status.
+ Contributed by soleboxy. [GH-1478] [Feature #12965]
+
+* OpenSSL
+
+ * Includes Ruby/OpenSSL 2.0. OpenSSL has been extracted as a Gem and is
+ maintained at a separate repository now: https://github.com/ruby/openssl.
+ It still remains as a 'default gem'. [Feature #9612]
+ Refer to ext/openssl/History.md for the full release note.
+
+* optparse
+
+ * Add an into option. [Feature #11191]
+
+* pathname
+
+ * New method: Pathname#empty? [Feature #12596]
+
+* Readline
+
+ * Readline.quoting_detection_proc and Readline.quoting_detection_proc= [Feature #12659]
+
+* REXML
+
+ * REXML::Element#[]: If String or Symbol is specified, attribute
+ value is returned. Otherwise, Nth child is returned. This is
+ backward compatible change.
+
+* set
+
+ * New methods: Set#compare_by_identity and Set#compare_by_identity?. [Feature #12210]
+
+* WEBrick
+
+ * Don't allow , as a separator [Bug #12791]
+
+=== Compatibility issues (excluding feature bug fixes)
+
+* Array#sum and Enumerable#sum are implemented. [Feature #12217]
+
+ Ruby itself has no compatibility problem because Ruby didn't have sum method
+ for arrays before Ruby 2.4.
+ However many third party gems, activesupport, facets, simple_stats, etc,
+ defines sum method. These implementations are mostly compatible but
+ there are subtle differences.
+ Ruby's sum method should be mostly compatible but it is impossible to
+ be perfectly compatible with all of them.
+
+* Fixnum and Bignum are unified into Integer [Feature #12005]
+
+ Fixnum class and Bignum class is removed.
+ Integer class is changed from abstract class to concrete class.
+ For example, 0 is an instance of Integer: 0.class returns Integer.
+ The constants Fixnum and Bignum is bound to Integer.
+ So obj.kind_of?(Fixnum) works as obj.kind_of?(Integer).
+ At C-level, Fixnum object and Bignum object should be distinguished by
+ FIXNUM_P(obj) and RB_TYPE_P(obj, T_BIGNUM).
+ RUBY_INTEGER_UNIFICATION can be used to detect this feature at C-level.
+ 0.class == Integer can be used to detect this feature at Ruby-level.
+ The C-level constants, rb_cFixnum and rb_cBignum, are removed.
+ They can cause compilation failure.
+
+* String/Symbol#upcase/downcase/swapcase/capitalize(!) now work for all of
+ Unicode, not only for ASCII. [Feature #10085]
+
+ No change is needed if the data is in ASCII anyway or if the limitation
+ to ASCII was only tolerated while waiting for a more extensive implementation.
+ A change (using the :ascii option) is needed in cases where Unicode data
+ is processed, but the operation has to be limited to ASCII only.
+ A good example of this are internationalized domain names.
+
+* TRUE / FALSE / NIL
+
+ These constants are now obsoleted. [Feature #12574]
+ Use true / false / nil resp. instead.
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* DateTime
+
+ * DateTime#to_time now preserves timezone. [Bug #12189]
+
+* Psych
+
+ * Update to Psych 2.2.2
+
+* RDoc
+
+ * Update to RDoc 5.0.0
+
+* RubyGems
+
+ * Update to RubyGems 2.6.8
+
+* shellwords
+
+ * Shellwords.shellwords (shellsplit) treats the backslash as escape
+ character only when followed by one of the following characters:
+ $ ` " \ <newline> [Bug #10055]
+
+* Time
+
+ * Time#to_time now preserves timezone. [Bug #12271]
+
+* thread
+
+ * the extension library is removed. Till 2.0 it was a pure ruby script
+ "thread.rb", which has precedence over "thread.so", and has been provided
+ in $LOADED_FEATURES since 2.1.
+
+* Tk
+
+ * Tk is removed from stdlib. [Feature #8539]
+
+ https://github.com/ruby/tk is the new upstream.
+
+* XMLRPC
+
+ * XMLRPC is removed from stdlib, and bundled as gem. [Feature #12160][ruby-core:74239]
+
+ https://github.com/ruby/xmlrpc is the new upstream.
+
+* Zlib
+
+ * Zlib.gzip and Zlib.gunzip [Feature #13020]
+
+=== C API updates
+
+* ruby_show_version() will no longer exits the process, if
+ RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in
+ the future.
+
+* rb_gc_adjust_memory_usage() [Feature #12690]
+
+=== Supported platform changes
+
+* FreeBSD < 4 is no longer supported
+
+=== Implementation improvements
+
+* In some condition, `[x, y].max` and `[x, y].min` are optimized
+ so that a temporal array is not created. The concrete condition is
+ an implementation detail: currently, the array literal must have no
+ splat, must have at least one expression but literal, the length must
+ be <= 0x100, and Array#max and min must not be redefined. It will work
+ in most casual and real-life use case where it is written with intent
+ to `Math.max(x, y)`.
+
+* Thread deadlock detection now shows their backtrace and dependency. [Feature #8214]
+
+* st_table (st.c) internal data structure is improved. [Feature #12142]
+
+* Rational is extensively optimized. [Feature #12484]
+
+=== Miscellaneous changes
+
+* ChangeLog is removed from the repository.
+
+ It is generated from commit messages in Subversion by `make dist`.
+ Also note that now people should follow Git style commit message.
+ The template is written at {Short (50 chars or less) summary of
+ changes}[https://git-scm.com/book/ch5-2.html]. [Feature #12283]
diff --git a/doc/NEWS/NEWS-2.5.0 b/doc/NEWS/NEWS-2.5.0
new file mode 100644
index 0000000000..af7f3ada01
--- /dev/null
+++ b/doc/NEWS/NEWS-2.5.0
@@ -0,0 +1,565 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.5.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
+
+== Changes since the 2.4.0 release
+
+=== Language changes
+
+* Top-level constant look-up is removed. [Feature #11547]
+
+* rescue/else/ensure are allowed inside do/end blocks. [Feature #12906]
+
+* refinements take place in string interpolations. [Feature #13812]
+
+=== Core classes updates (outstanding ones only)
+
+* Array
+
+ * New methods:
+
+ * Array#append [Feature #12746]
+ * Array#prepend [Feature #12746]
+
+* Data
+
+ * Is deprecated. It was a base class for C extensions, and it's not
+ necessary to expose in Ruby level. [Feature #3072]
+
+* Exception
+
+ * New methods:
+
+ * Exception#full_message to retrieve a String expression of an exception,
+ formatted in the same way in which Ruby prints out an uncaught
+ exception. [Feature #14141] [experimental]
+
+* Dir
+
+ * Dir.glob provides new optional keyword argument, +:base+ . [Feature #13056]
+ * Dir.chdir (without block arg), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
+ Dir.empty? releases GVL
+
+ * New methods:
+
+ * Dir.children [Feature #11302]
+ * Dir.each_child [Feature #11302]
+
+* Enumerable
+
+ * Enumerable#any?, Enumerable#all?, Enumerable#none? and Enumerable#one?
+ accept a pattern argument. [Feature #11286]
+
+* File
+
+ * File.open accepts +:newline+ option to imply text mode. [Bug #13350]
+ * File#path raises an IOError for files opened with
+ File::Constants::TMPFILE option. [Feature #13568]
+ * File.stat, File.exist? and other <code>rb_stat()</code>-using methods
+ release GVL. [Bug #13941]
+ * File.rename releases GVL. [Feature #13951]
+ * File::Stat#atime, File::Stat#mtime and File::Stat#ctime support fractional
+ second timestamps on Windows 8 and later. [Feature #13726]
+ * File::Stat#ino and File.identical? support ReFS 128bit ino on Windows 8.1
+ and later. [Feature #13731]
+ * File.readable?, File.readable_real?, File.writable?, File.writable_real?,
+ File.executable?, File.executable_real?, File.mkfifo, File.readlink,
+ File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
+ File.lchown, File.unlink, File.utime, File.lstat release GVL
+
+ * New method:
+
+ * File.lutime [Feature #4052]
+
+* Hash
+
+ * New methods:
+
+ * Hash#transform_keys [Feature #13583]
+ * Hash#transform_keys! [Feature #13583]
+ * Hash#slice [Feature #8499]
+
+* IO
+
+ * IO.copy_stream tries copy offload with copy_file_range(2) [Feature #13867]
+
+ * New methods:
+
+ * IO#pread [Feature #4532]
+ * IO#pwrite [Feature #4532]
+ * IO#write accepts multiple arguments [Feature #9323]
+
+* IOError
+
+ * IO#close might raise an error with message "stream closed",
+ but it is refined to "stream closed in another thread". The new message
+ is more clear for user. [Bug #13405]
+
+* Integer
+
+ * Integer#round, Integer#floor, Integer#ceil and Integer#truncate always
+ return an Integer. [Bug #13420]
+ * Integer#pow accepts modulo argument for calculating modular
+ exponentiation. [Feature #12508] [Feature #11003]
+
+ * New methods:
+
+ * Integer#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753]
+ * Integer.sqrt [Feature #13219]
+
+* Kernel
+
+ * Kernel#yield_self [Feature #6721]
+ * Kernel#pp [Feature #14123]
+ * Kernel#warn(..., uplevel:n) [Feature #12882]
+
+* Method
+
+ * New methods:
+
+ * Method#=== that invokes Method#call, as same as Proc#=== [Feature #14142]
+
+* Module
+
+ * Module#attr, Module#attr_accessor, Module#attr_reader and Module#attr_writer
+ become public. [Feature #14132]
+ * Module#define_method, Module#alias_method, Module#undef_method and
+ Module#remove_method become public. [Feature #14133]
+
+* Numeric
+
+ * Numeric#step no longer hides errors from coerce method when
+ given a step value which cannot be compared with #> to 0. [Feature #7688]
+ * Numerical comparison operators (<,<=,>=,>) no longer hide exceptions
+ from #coerce method internally. Return nil in #coerce if the coercion is
+ impossible. [Feature #7688]
+
+* Process
+
+ * Precision of Process.times is improved if getrusage(2) exists. [Feature #11952]
+
+ * New method:
+
+ * Process.last_status as an alias of $? [Feature #14043]
+
+* Range
+ * Range#initialize no longer hides exceptions when comparing begin and
+ end with #<=> and raise a "bad value for range" ArgumentError
+ but instead lets the exception from the #<=> call go through. [Feature #7688]
+
+* Regexp
+
+ * Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
+
+ * Support absence operator https://github.com/k-takata/Onigmo/issues/82
+
+ * Support new 5 emoji-related Unicode character properties
+
+* RubyVM::InstructionSequence
+
+ * New method:
+
+ * RubyVM::InstructionSequence#each_child
+ * RubyVM::InstructionSequence#trace_points
+
+* String
+
+ * <code>String#-@</code> deduplicates unfrozen strings. Already-frozen
+ strings remain unchanged for compatibility. [Feature #13077]
+ * <code>-"literal"</code> (<code>String#-@</code>) optimized to return the same object
+ (same as <code>"literal".freeze</code> in Ruby 2.1+) [Feature #13295]
+ * String#casecmp and String#casecmp? return nil for non-string arguments
+ instead of raising a TypeError. [Bug #13312]
+ * String#start_with? accepts a regexp [Feature #13712]
+
+ * New methods:
+
+ * String#delete_prefix, String#delete_prefix! [Feature #12694]
+ * String#delete_suffix, String#delete_suffix! [Feature #13665]
+ * String#each_grapheme_cluster and String#grapheme_clusters to
+ enumerate grapheme clusters [Feature #13780]
+ * String#undump to unescape String#dump'ed string [Feature #12275]
+
+* Struct
+
+ * Struct.new takes `keyword_init: true` option to initialize members
+ with keyword arguments. [Feature #11925]
+
+* Regexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685]
+
+* Thread
+
+ * Description set by Thread#name= is now visible on Windows 10.
+
+ * New method:
+ * Thread#fetch [Feature #13009]
+
+ * The default of Thread.report_on_exception is now true,
+ showing unhandled exceptions terminating threads on $stderr. [Feature #14143]
+
+* Time
+
+ * Time.at receives 3rd argument which specifies the unit of 2nd argument. [Feature #13919]
+
+* KeyError
+
+ * New methods:
+
+ * KeyError#receiver [Feature #12063]
+ * KeyError#key [Feature #12063]
+
+* FrozenError
+
+ * New exception class. [Feature #13224]
+
+=== Stdlib updates (outstanding ones only)
+
+* BigDecimal
+
+ * Update to BigDecimal 1.3.4
+
+ * The following features are added:
+
+ * BigDecimal::VERSION
+
+ * The following features have been deprecated,
+ and are planned to be removed in the version 1.4.0:
+
+ * BigDecimal.new
+
+ * BigDecimal.ver
+
+ * BigDecimal#clone and #dup now do not make a new instance,
+ but returns the receiver itself.
+
+* Coverage
+
+ * Support branch coverage and method coverage measurement. [Feature #13901]
+ Branch coverage tells you which branches are executed, and which not.
+ Method coverage tells you which methods are invoked, and which not.
+ By running a test suite with this new feature, you can know which branches
+ and methods are executed by a test, and evaluate total coverage of a test
+ suite more strictly.
+
+ You can specify the measuring target by an option to `Coverage.start`:
+
+ Coverage.start(lines: true, branches: true, methods: true)
+
+ After some Ruby files are loaded, you can use `Coverage.result` to get
+ the coverage result:
+
+ Coverage.result
+ #=> { "/path/to/file.rb"=>
+ # { :lines => [1, 2, 0, nil, ...],
+ # :branches =>
+ # { [:if, 0, 2, 1, 6, 4] =>
+ # { [:then, 1, 3, 2, 3, 8] => 0,
+ # [:else, 2, 5, 2, 5, 8] => 2
+ # }
+ # },
+ # :methods => {
+ # [Object, :foo, 1, 0, 7, 3] => 2
+ # }
+ # }
+ # }
+
+ The result type of line coverage is not changed; it is just an array that
+ contains numbers, which means the count that each line was executed,
+ or `nil`s, which means that the line is not relevant.
+
+ The result type of branch coverage is:
+
+ { (jump base) => { (jump target) => (counter) } }
+
+ where jump base and targets have the format
+
+ [type, unique-id, start lineno, start column, end lineno, end column]
+
+ For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from
+ line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads
+ a `then` clause that ranges from line 3 and column 2, to line 3 and column 8.
+ Note that lineno starts from 1, and that columnno starts from 0. So, the
+ above example shows a branch from the `if` to the `then` was never executed,
+ and a branch from the `if` to the `else` was executed twice.
+
+ The result type of method coverage is:
+
+ { (method key) => (counter) }
+
+ where method key has the format
+
+ [class, method-name, start lineno, start column, end lineno, end column]
+
+ For example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from
+ line 1 and column 0, to line 7 and column 3. The above example shows this
+ `Object#foo` was invoked twice.
+
+ Note: To keep compatibility, passing no option to `Coverage.start` will measure
+ only line coverage, and `Coverage.result` will return the old format:
+
+ Coverage.result
+ #=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
+
+* DRb
+
+ * ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
+
+* ERB
+
+ * Add ERB#result_with_hash to render a template with local variables passed
+ with a Hash object. [Feature #8631]
+
+ * Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb
+ command. [Bug #14095]
+
+ * Carriage returns are changed to be trimmed properly if trim_mode is specified
+ and used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464]
+
+* IPAddr
+
+ * IPAddr no longer accepts invalid address mask. [Bug #13399]
+ * IPAddr#ipv4_compat and IPAddr#ipv4_compat? are marked for deprecation. [Bug #13769]
+
+ * New methods:
+
+ * IPAddr#prefix
+ * IPAddr#loopback?
+ * IPAddr#private? [Feature #11666]
+ * IPAddr#link_local? [Feature #10912]
+
+* IRB
+
+ * Print backtrace and error message in reverse order [Feature #8661] [experimental]
+ * `binding.irb` automatically requires irb and runs [Bug #13099] [experimental]
+ * `binding.irb` on its start shows source around the line where it was called [Feature #14124]
+
+* Matrix
+
+ * New methods:
+
+ * Matrix.combine and Matrix#combine [Feature #10903]
+ * Matrix#hadamard_product and Matrix#entrywise_product
+
+* Net::HTTP
+
+ * Net::HTTP.new supports no_proxy parameter [Feature #11195]
+ * Net::HTTP#min_version and Net::HTTP#max_version [Feature #9450]
+ * Add more HTTP status classes
+ * Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]
+ * Net::HTTP#proxy_user and Net::HTTP#proxy_pass reflect http_proxy environment
+ variable if the system's environment variable is multiuser safe. [Bug #12921]
+
+* open-uri
+ * URI.open method defined as an alias to open-uri's Kernel.open.
+ open-uri's Kernel.open will be deprecated in future.
+
+* OpenSSL
+
+ * Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in
+ "Version 2.1.0" section in ext/openssl/History.md.
+
+* Pathname
+
+ * New method:
+
+ * Pathname#glob [Feature #7360]
+
+* Psych
+
+ * Update to Psych 3.0.2.
+
+ * Convert fallback option to a keyword argument
+ https://github.com/ruby/psych/pull/342
+ * Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
+ https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
+ * Add Psych::Handler#event_location
+ https://github.com/ruby/psych/pull/326
+ * Make frozen string literal = true
+ https://github.com/ruby/psych/pull/320
+ * Preserve time zone offset when deserializing times
+ https://github.com/ruby/psych/pull/316
+ * Remove deprecated method aliases for syck gem
+ https://github.com/ruby/psych/pull/312
+
+* RbConfig
+
+ * RbConfig::LIMITS is added to provide the limits of C types.
+ This is available when rbconfig/sizeof is loaded.
+
+* Ripper
+
+ * Ripper::EXPR_BEG and so on for Ripper#state.
+
+ * New method:
+
+ * Ripper#state to tell the state of scanner. [Feature #13686]
+
+* RDoc
+
+ * Update to RDoc 6.0.1.
+
+ * Replace IRB based lexer with Ripper.
+ * https://github.com/ruby/rdoc/pull/512
+ * This much improves the speed of generating documents.
+ * It also facilitates supporting new syntax in the future.
+ * Support many new syntaxes of Ruby from the past few years.
+ * Use "frozen_string_literal: true".
+ Performance survey: https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800
+ * Support did_you_mean.
+
+* Rubygems
+
+ * Update to Rubygems 2.7.3.
+ * http://blog.rubygems.org/2017/11/28/2.7.3-released.html
+ * http://blog.rubygems.org/2017/11/08/2.7.2-released.html
+ * http://blog.rubygems.org/2017/11/03/2.7.1-released.html
+ * http://blog.rubygems.org/2017/11/01/2.7.0-released.html
+ * http://blog.rubygems.org/2017/10/09/2.6.14-released.html
+ * http://blog.rubygems.org/2017/08/27/2.6.13-released.html
+
+* SecureRandom
+
+ * New method:
+
+ * SecureRandom.alphanumeric
+
+* Set
+
+ * New methods:
+
+ * Set#to_s as alias to #inspect [Feature #13676]
+ * Set#=== as alias to #include? [Feature #13801]
+ * Set#reset [Feature #6589]
+
+* StringIO
+
+ * StringIO#write accepts multiple arguments
+
+* StringScanner
+
+ * New methods:
+
+ * StringScanner#size, StringScanner#captures, StringScanner#values_at [Feature #836]
+
+* URI
+
+ * Relative path operations no longer collapse consecutive slashes to a single slash. [Bug #8352]
+
+* WEBrick
+
+ * Add Server Name Indication (SNI) support [Feature #13729]
+ * support Proc objects as body responses [Feature #855]
+ * released as a RubyGem [Feature #13173]
+ * avoid unintended behavior from Kernel#open [Misc #14216]
+
+* Zlib
+
+ * Zlib::GzipWriter#write accepts multiple arguments
+
+=== Compatibility issues (excluding feature bug fixes)
+
+* BasicSocket
+
+ * BasicSocket#read_nonblock and BasicSocket#write_nonblock no
+ longer set the O_NONBLOCK file description flag as side effect
+ (on Linux only) [Feature #13362]
+
+* Random
+
+ * Random.raw_seed renamed to become Random.urandom. It is now
+ applicable to non-seeding purposes due to [Bug #9569].
+
+* Socket
+
+ * Socket::Ifaddr#vhid is added [Feature #13803]
+
+* ConditionVariable, Queue and SizedQueue reimplemented for speed.
+ They no longer subclass Struct. [Feature #13552]
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* Gemification
+
+ * Promote following standard libraries to default gems.
+ * cmath
+ * csv
+ * date
+ * dbm
+ * etc
+ * fcntl
+ * fiddle
+ * fileutils
+ * gdbm
+ * ipaddr
+ * scanf
+ * sdbm
+ * stringio
+ * strscan
+ * webrick
+ * zlib
+
+* Logger
+
+ * Logger.new("| command") had been working to open a command
+ unintentionally. It was prohibited, and now Logger#initialize
+ treats a String argument only as a filename, as its specification. [Bug #14212]
+
+* Net::HTTP
+
+ * Net::HTTP#start now passes :ENV to p_addr by default. [Bug #13351]
+ To avoid this, pass nil explicitly.
+
+* mathn.rb
+
+ * Removed from stdlib. [Feature #10169]
+
+* Rubygems
+
+ * Removed "ubygems.rb" file from stdlib. It's needless since Ruby 1.9.
+
+=== Supported platform changes
+
+* Drop support of NaCl platform
+
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160
+
+=== Implementation improvements
+
+* (This might not be a "user visible feature change" but) Hash class's
+ hash function is now SipHash13. [Feature #13017]
+
+* SecureRandom now prefers OS-provided sources than OpenSSL. [Bug #9569]
+
+* Mutex rewritten to be smaller and faster [Feature #13517]
+
+* Performance of block passing using block parameters is improved by
+ lazy Proc allocation [Feature #14045]
+
+* Dynamic instrumentation for TracePoint hooks instead of using "trace"
+ instruction to avoid overhead [Feature #14104]
+
+* ERB now generates code from a template twice as fast as Ruby 2.4
+
+=== Miscellaneous changes
+
+* Print backtrace and error message in reverse order if $stderr is unchanged
+ and a tty. [Feature #8661] [experimental]
+
+* Print error message in bold/underlined text if $stderr is unchanged and a
+ tty. [Feature #14140] [experimental]
+
+* configure option --with-ext now mandates its arguments. So for
+ instance if you run ./configure --with-ext=openssl,+ then the
+ openssl library is guaranteed compiled, otherwise the build fails
+ abnormally.
+
+ Note however to always add the ",+" at the end of the argument.
+ Otherwise nothing but openssl are built. [Feature #13302]
diff --git a/doc/NEWS/NEWS-2.6.0 b/doc/NEWS/NEWS-2.6.0
new file mode 100644
index 0000000000..6e70696de2
--- /dev/null
+++ b/doc/NEWS/NEWS-2.6.0
@@ -0,0 +1,662 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.6.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or reference
+information is supplied with. For a full list of changes with all
+sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
+
+== Changes since the 2.5.0 release
+
+=== Language changes
+
+* <code>$SAFE</code> now is a process global state and can be set to 0 again. [Feature #14250]
+
+* Refinements take place at block passing. [Feature #14223]
+
+* Refinements take place at Kernel#public_send. [Feature #15326]
+
+* Refinements take place at Kernel#respond_to?. [Feature #15327]
+
+* +else+ without +rescue+ now causes a syntax error. [EXPERIMENTAL] [Feature #14606]
+
+* Constant names may start with a non-ASCII capital letter. [Feature #13770]
+
+* Endless ranges are introduced. You can use a Range that has no end,
+ like <code>(0..)</code> (or similarly <code>(0...)</code>). [Feature #12912]
+
+ The following shows typical use cases:
+
+ ary[1..] # identical to ary[1..-1]
+ (1...).each {|index| block } # infinite loop from index 1
+ ary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { }
+
+* Non-Symbol keys in a keyword arguments hash cause an exception.
+
+* The "shadowing outer local variable" warning is removed. [Feature #12490]
+
+ You can now write the following without warning:
+
+ user = users.find {|user| cond(user) }
+
+* Print +cause+ of the exception if the exception is not caught and printed
+ its backtraces and error message. [Feature #8257]
+
+* The flip-flop syntax is deprecated. [Feature #5400]
+
+=== Core classes updates (outstanding ones only)
+
+[Array]
+
+ [New methods]
+
+ * Added Array#union and Array#difference instance methods. [Feature #14097]
+
+ [Modified method]
+
+ * Array#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
+
+ [Aliased methods]
+
+ * Array#filter is a new alias for Array#select. [Feature #13784]
+ * Array#filter! is a new alias for Array#select!. [Feature #13784]
+
+[Binding]
+
+ [New method]
+
+ * Added Binding#source_location. [Feature #14230]
+
+ This method returns the source location of the binding, a 2-element
+ array of <code>__FILE__</code> and <code>__LINE__</code>.
+ Traditionally, the same information could be retrieved by
+ <code>eval("[__FILE__, __LINE__]", binding)</code>, but we are
+ planning to change this behavior so that Kernel#eval ignores
+ binding's source location [Bug #4352]. So, users should use this
+ newly-introduced method instead of Kernel#eval.
+
+[Dir]
+
+ [New methods]
+
+ * Added Dir#each_child and Dir#children instance methods. [Feature #13969]
+
+[Enumerable]
+
+ [New method]
+
+ * Enumerable#chain returns an enumerator object that iterates over the
+ elements of the receiver and then those of each argument
+ in sequence. [Feature #15144]
+
+ [Modified method]
+
+ * Enumerable#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
+
+ [Aliased method]
+
+ * Enumerable#filter is a new alias for Enumerable#select. [Feature #13784]
+
+[Enumerator::ArithmeticSequence]
+
+ * This is a new class to represent a generator of an arithmetic sequence,
+ that is a number sequence defined by a common difference. It can be used
+ for representing what is similar to Python's slice. You can get an
+ instance of this class from Numeric#step and Range#step.
+
+[Enumerator::Chain]
+
+ * This is a new class to represent a chain of enumerables that works as a
+ single enumerator, generated by such methods as Enumerable#chain and
+ Enumerator#+.
+
+[Enumerator::Lazy]
+
+ [Aliased method]
+
+ * Enumerator::Lazy#filter is a new alias for
+ Enumerator::Lazy#select. [Feature #13784]
+
+[Enumerator]
+
+ [New methods]
+
+ * Enumerator#+ returns an enumerator object that iterates over the
+ elements of the receiver and then those of the other operand. [Feature #15144]
+
+[ENV]
+
+ [Modified method]
+
+ * ENV.to_h now accepts a block that maps names and values to new keys and values. [Feature #15143]
+
+[Exception]
+
+ [New options]
+
+ * Exception#full_message takes +:highlight+ and +:order+
+ options. [Bug #14324]
+
+[Hash]
+
+ [Modified methods]
+
+ * Hash#merge, Hash#merge!, and Hash#update now accept multiple
+ arguments. [Feature #15111]
+
+ * Hash#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
+
+ [Aliased methods]
+
+ * Hash#filter is a new alias for Hash#select. [Feature #13784]
+
+ * Hash#filter! is a new alias for Hash#select!. [Feature #13784]
+
+[IO]
+
+ [New option]
+
+ * Added new mode character <code>'x'</code> to open files for exclusive
+ access. [Feature #11258]
+
+[Kernel]
+
+ [Aliased method]
+
+ * Kernel#then is a new alias for Kernel#yield_self. [Feature #14594]
+
+ [New options]
+
+ * Kernel#Complex, Kernel#Float, Kernel#Integer, and
+ Kernel#Rational take an +:exception+ option to specify the way of
+ error handling. [Feature #12732]
+
+ * Kernel#system takes an +:exception+ option to raise an exception
+ on failure. [Feature #14386]
+
+ [Incompatible changes]
+
+ * Kernel#system and Kernel#exec do not close non-standard file descriptors
+ (the default of the +:close_others+ option is changed to +false+,
+ but we still set the +FD_CLOEXEC+ flag on descriptors we
+ create). [Misc #14907]
+
+[KeyError]
+
+ [New options]
+
+ * KeyError.new accepts +:receiver+ and +:key+ options to set receiver and
+ key in Ruby code. [Feature #14313]
+
+[Method]
+
+ [New methods]
+
+ * Added Method#<< and Method#>> for Proc composition. [Feature #6284]
+
+[Module]
+
+ [Modified methods]
+
+ * Module#method_defined?, Module#private_method_defined?, and
+ Module#protected_method_defined? now accept the second
+ parameter as optional. If it is +true+ (the default value), it checks
+ ancestor modules/classes, or checks only the class itself. [Feature #14944]
+
+[NameError]
+
+ [New option]
+
+ * NameError.new accepts a +:receiver+ option to set receiver in Ruby
+ code. [Feature #14313]
+
+[NilClass]
+
+ [New method]
+
+ * NilClass#=~ is added for compatibility. [Feature #15231]
+
+[NoMethodError]
+
+ [New option]
+
+ * NoMethodError.new accepts a +:receiver+ option to set receiver in Ruby
+ code. [Feature #14313]
+
+[Numeric]
+
+ [Incompatible changes]
+
+ * Numeric#step now returns an instance of the Enumerator::ArithmeticSequence
+ class rather than one of the Enumerator class.
+
+[OpenStruct]
+
+ [Modified method]
+
+ * OpenStruct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
+
+[Proc]
+
+ [New methods]
+
+ * Added Proc#<< and Proc#>> for Proc composition. [Feature #6284]
+
+ [Incompatible changes]
+
+ * Proc#call doesn't change <code>$SAFE</code> any more. [Feature #14250]
+
+[Random]
+
+ [New method]
+
+ * Added Random.bytes. [Feature #4938]
+
+[Range]
+
+ [New method]
+
+ * Added Range#% instance method. [Feature #14697]
+
+ [Incompatible changes]
+
+ * Range#=== now uses the +#cover?+ instead of the +#include?+ method. [Feature #14575]
+ * Range#cover? now accepts a Range object. [Feature #14473]
+ * Range#step now returns an instance of the Enumerator::ArithmeticSequence
+ class rather than one of the Enumerator class.
+
+[Regexp/String]
+
+ * Update Unicode version from 10.0.0 to 11.0.0. [Feature #14802]
+
+ This includes a rewrite of the grapheme cluster (/\X/) algorithm
+ and special-casing for Georgian MTAVRULI on String#downcase.
+
+ * Update Emoji version from 5.0 to 11.0.0 [Feature #14802]
+
+[RubyVM::AbstractSyntaxTree]
+
+ [New methods]
+
+ * RubyVM::AbstractSyntaxTree.parse parses a given string and returns AST
+ nodes. [experimental]
+
+ * RubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST
+ nodes. [experimental]
+
+ * RubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or
+ method. [experimental]
+
+[RubyVM]
+
+ [New method]
+
+ * RubyVM.resolve_feature_path identifies the file that will be loaded by
+ "require(feature)". [experimental] [Feature #15230]
+
+[String]
+
+ * String#crypt is now deprecated. [Feature #14915]
+
+ [New features]
+
+ * String#split yields each substring to the block if given. [Feature #4780]
+
+[Struct]
+
+ [Modified method]
+
+ * Struct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
+
+ [Aliased method]
+
+ * Struct#filter is a new alias for Struct#select. [Feature #13784]
+
+[Time]
+
+ [New features]
+
+ * Time.new and Time#getlocal accept a timezone object as well as
+ a UTC offset string. Time#+, Time#-, and Time#succ also preserve
+ the timezone. [Feature #14850]
+
+[TracePoint]
+
+ [New features]
+
+ * "script_compiled" event is supported. [Feature #15287]
+
+ [New methods]
+
+ * TracePoint#parameters [Feature #14694]
+
+ * TracePoint#instruction_sequence [Feature #15287]
+
+ * TracePoint#eval_script [Feature #15287]
+
+ [Modified method]
+
+ * TracePoint#enable accepts new keywords "target:" and
+ "target_line:". [Feature #15289]
+
+=== Stdlib updates (outstanding ones only)
+
+[BigDecimal]
+
+ Update to version 1.4.0. This version includes several compatibility
+ issues, see Compatibility issues section below for details.
+
+ [Modified method]
+
+ * BigDecimal() accepts the new keyword "exception:" similar to Float().
+
+ [Note for the differences among recent versions]
+
+ You should want to know the differences among recent versions of bigdecimal.
+ Please select the suitable version of bigdecimal according to the following
+ information.
+
+ * 1.3.5 has BigDecimal.new without "exception:" keyword. You can see the
+ deprecation warning of BigDecimal.new when you specify "-w" option.
+ BigDecimal(), BigDecimal.new, and Object#to_d methods are the same.
+
+ * 1.4.0 has BigDecimal.new with "exception:" keyword. You always see the
+ deprecation warning of BigDecimal.new. Object#to_d method is different
+ from BigDecimal() and BigDecimal.new.
+
+ * 2.0.0 will be released soon after releasing Ruby 2.6.0. This version
+ will not have the BigDecimal.new method.
+
+[Bundler]
+
+ * Add Bundler to Standard Library. [Feature #12733]
+
+ * Use 1.17.2, the latest stable version.
+
+[Coverage]
+
+ A oneshot_lines mode is added. [Feature #15022]
+
+ This mode checks "whether each line was executed at least once or not",
+ instead of "how many times each line was executed".
+ A hook for each line is fired at most once, and after it is fired
+ the hook flag is removed, i.e., it runs with zero overhead.
+
+ [New options]
+
+ * Add +:oneshot_lines+ keyword argument to Coverage.start.
+
+ * Add +:stop+ and +:clear+ keyword arguments to Coverage.result.
+ If +clear+ is true, it clears the counters to zero.
+ If +stop+ is true, it disables coverage measurement.
+
+ [New methods]
+
+ * Coverage.line_stub, which is a simple helper function that
+ creates the "stub" of line coverage from a given source code.
+
+[CSV]
+
+ * Upgrade to 3.0.2. This includes performance improvements especially
+ for writing. Writing is about 2 times faster.
+ See https://github.com/ruby/csv/blob/master/NEWS.md.
+
+[ERB]
+
+ [New options]
+
+ * Add +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new.
+ Now non-keyword arguments other than the first one are softly deprecated
+ and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]
+
+ * erb command's <tt>-S</tt> option is deprecated, and will be removed
+ in the next version.
+
+[FileUtils]
+
+ [New methods]
+
+ * FileUtils#cp_lr. [Feature #4189]
+
+[Matrix]
+
+ [New methods]
+
+ * Matrix#antisymmetric?, Matrix#skew_symmetric?
+
+ * Matrix#map!, Matrix#collect! [Feature #14151]
+
+ * Matrix#[]=
+
+ * Vector#map!, Vector#collect!
+
+ * Vector#[]=
+
+[Net]
+
+ [New options]
+
+ * Add +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396]
+
+ [New methods]
+
+ * Add Net::HTTP#write_timeout and Net::HTTP#write_timeout=. [Feature #13396]
+
+ [New constant]
+
+ * Add Net::HTTPClientException to deprecate Net::HTTPServerException,
+ whose name is misleading. [Bug #14688]
+
+[NKF]
+
+ * Upgrade to nkf v2.1.5
+
+[Psych]
+
+ * Upgrade to Psych 3.1.0
+
+[RDoc]
+
+ * Become about 2 times faster.
+
+ * Use SOURCE_DATE_EPOCH to generate files.
+
+ * Fix method line number that slipped off.
+
+ * Enable <code>--width</code>, <code>--exclude</code>,
+ and <code>--line-numbers</code> that were ignored.
+
+ * Add support for blockquote by ">>>" in default markup notation.
+
+ * Add support for "Raises" lines in TomDoc notation.
+
+ * Fix syntax error output.
+
+ * Fix many parsing bugs.
+
+[REXML]
+
+ * Upgrade to REXML 3.1.9.
+ See https://github.com/ruby/rexml/blob/master/NEWS.md.
+
+ [Improved some XPath implementations]
+
+ * <code>concat()</code> function: Stringify all arguments before concatenating.
+
+ * <code>string()</code> function: Support context node.
+
+ * <code>string()</code> function: Support processing instruction node.
+
+ * Support <code>"*:#{ELEMENT_NAME}"</code> syntax in XPath 2.0.
+
+ [Fixed some XPath implementations]
+
+ * <code>"//#{ELEMENT_NAME}[#{POSITION}]"</code> case
+
+ * <code>string()</code> function: Fix <code>function(document)</code>
+ returns nodes that are out of root elements.
+
+ * <code>"/ #{ELEMENT_NAME} "</code> case
+
+ * <code>"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"</code> case
+
+ * <code>"/ #{AXIS}::#{ELEMENT_NAME}"</code> case
+
+ * <code>"#{N}-#{M}"</code> case: One or more white spaces were required
+ before <code>"-"</code>
+
+ * <code>"/child::node()"</code> case
+
+ * <code>"#{FUNCTION}()/#{PATH}"</code> case
+
+ * <code>"@#{ATTRIBUTE}/parent::"</code> case
+
+ * <code>"name(#{NODE_SET})"</code> case
+
+[RSS]
+
+ [New options]
+
+ * RSS::Parser.parse now accepts options as Hash. +:validate+ ,
+ +:ignore_unknown_element+ , +:parser_class+ options are available.
+
+[RubyGems]
+
+ * Upgrade to RubyGems 3.0.1
+
+ * https://blog.rubygems.org/2018/12/19/3.0.0-released.html
+
+ * https://blog.rubygems.org/2018/12/23/3.0.1-released.html
+
+[Set]
+
+ [Aliased method]
+
+ * Set#filter! is a new alias for Set#select!. [Feature #13784]
+
+[URI]
+
+ [New constant]
+
+ * Add URI::File to handle the file URI scheme. [Feature #14035]
+
+=== Compatibility issues (excluding feature bug fixes)
+
+[Dir]
+
+ * Dir.glob with <code>'\0'</code>-separated pattern list will be deprecated,
+ and is now warned. [Feature #14643]
+
+[File]
+
+ * File.read, File.binread, File.write, File.binwrite, File.foreach, and
+ File.readlines do not invoke external commands even if the path starts
+ with the pipe character <code>'|'</code>. [Feature #14245]
+
+[Object]
+
+ * Object#=~ is deprecated. [Feature #15231]
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* These standard libraries have been promoted to default gems.
+
+ * e2mmap
+ * forwardable
+ * irb
+ * logger
+ * matrix
+ * mutex_m
+ * ostruct
+ * prime
+ * rexml
+ * rss
+ * shell
+ * sync
+ * thwait
+ * tracer
+
+[BigDecimal]
+
+ * The following methods are removed.
+
+ * BigDecimal.allocate
+ * BigDecimal.ver
+
+ * Every BigDecimal object is frozen. [Feature #13984]
+
+ * BigDecimal() parses the given string similar to Float().
+
+ * String#to_d parses the receiver string similar to String#to_f.
+
+ * BigDecimal.new will be removed in version 2.0.
+
+[Pathname]
+
+ * Pathname#read, Pathname#binread, Pathname#write, Pathname#binwrite,
+ Pathname#each_line and Pathname#readlines do not invoke external
+ commands even if the path starts with the pipe character <code>'|'</code>.
+ This follows [Feature #14245].
+
+=== Implementation improvements
+
+* Speedup Proc#call because we don't need to care about <code>$SAFE</code>
+ any more. [Feature #14318]
+
+ With +lc_fizzbuzz+ benchmark which uses Proc#call many times we can
+ measure x1.4 improvements. [Bug #10212]
+
+* Speedup block.call where +block+ is passed block parameter. [Feature #14330]
+
+ Ruby 2.5 improves block passing performance. [Feature #14045]
+
+ Additionally, Ruby 2.6 improves the performance of passed block calling.
+
+* Introduce an initial implementation of a JIT (Just-in-time) compiler. [Feature #14235] [experimental]
+
+ * <tt>--jit</tt> command line option is added to enable JIT. <tt>--jit-verbose=1</tt>
+ is good for inspection. See <tt>ruby --help</tt> for others.
+ * To generate machine code, this JIT compiler uses the C compiler used for building
+ the interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.
+ * <tt>--disable-mjit-support</tt> option is added to configure. This is added for JIT debugging,
+ but if you get an error on building a header file for JIT, you can use this option to skip
+ building it as a workaround.
+ * rb_waitpid reimplemented on Unix-like platforms to maintain
+ compatibility with processes created for JIT [Bug #14867]
+
+* VM generator script renewal; makes the generated VM more optimized. [GH-1779]
+
+* Thread cache enabled for pthreads platforms (for Thread.new and
+ Thread.start). [Feature #14757]
+
+* timer thread is eliminated for platforms with POSIX timers. [Misc #14937]
+
+* Transient Heap (theap) is supported. [Bug #14858] [Feature #14989]
+
+ theap is a managed heap for short-living memory objects. For example,
+ making a small and short-living Hash object is x2 faster. With rdoc benchmark,
+ we measured 6-7% performance improvement.
+
+* Native implementations (arm32, arm64, ppc64le, win32, win64, x86, amd64) of
+ coroutines to improve performance of Fiber significantly. [Feature #14739]
+
+=== Miscellaneous changes
+
+* On macOS, shared libraries no longer include a full version number of Ruby
+ in their names. This eliminates the burden of each teeny upgrade on the
+ platform that users need to rebuild every extension library.
+
+ [Before]
+ * libruby.2.6.0.dylib
+ * libruby.2.6.dylib -> libruby.2.6.0.dylib
+ * libruby.dylib -> libruby.2.6.0.dylib
+
+ [After]
+ * libruby.2.6.dylib
+ * libruby.dylib -> libruby.2.6.dylib
+
+* Extracted misc/*.el files to https://github.com/ruby/elisp
diff --git a/doc/NEWS/NEWS-2.7.0 b/doc/NEWS/NEWS-2.7.0
new file mode 100644
index 0000000000..7607a473de
--- /dev/null
+++ b/doc/NEWS/NEWS-2.7.0
@@ -0,0 +1,845 @@
+# -*- rdoc -*-
+
+= NEWS for Ruby 2.7.0
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or reference
+information is supplied with. For a full list of changes with all
+sufficient information, see the ChangeLog file or Redmine
+(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>).
+
+== Changes since the 2.6.0 release
+
+=== Language changes
+
+==== Pattern matching
+
+* Pattern matching is introduced as an experimental feature. [Feature #14912]
+
+ case [0, [1, 2, 3]]
+ in [a, [b, *c]]
+ p a #=> 0
+ p b #=> 1
+ p c #=> [2, 3]
+ end
+
+ case {a: 0, b: 1}
+ in {a: 0, x: 1}
+ :unreachable
+ in {a: 0, b: var}
+ p var #=> 1
+ end
+
+ case -1
+ in 0 then :unreachable
+ in 1 then :unreachable
+ end #=> NoMatchingPatternError
+
+ json = <<END
+ {
+ "name": "Alice",
+ "age": 30,
+ "children": [{ "name": "Bob", "age": 2 }]
+ }
+ END
+
+ JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: name, age: age}]}
+
+ p name #=> "Bob"
+ p age #=> 2
+
+ JSON.parse(json, symbolize_names: true) in {name: "Alice", children: [{name: "Charlie", age: age}]}
+ #=> NoMatchingPatternError
+
+* See the following slides for more details:
+ * https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7
+ * Note that the slides are slightly obsolete.
+
+* The warning against pattern matching can be suppressed with
+ {-W:no-experimental option}[#label-Warning+option].
+
+==== The spec of keyword arguments is changed towards 3.0
+
+* Automatic conversion of keyword arguments and positional arguments is
+ deprecated, and conversion will be removed in Ruby 3. [Feature #14183]
+
+ * When a method call passes a Hash at the last argument, and when it
+ passes no keywords, and when the called method accepts keywords,
+ a warning is emitted. To continue treating the hash as keywords,
+ add a double splat operator to avoid the warning and ensure
+ correct behavior in Ruby 3.
+
+ def foo(key: 42); end; foo({key: 42}) # warned
+ def foo(**kw); end; foo({key: 42}) # warned
+ def foo(key: 42); end; foo(**{key: 42}) # OK
+ def foo(**kw); end; foo(**{key: 42}) # OK
+
+ * When a method call passes keywords to a method that accepts keywords,
+ but it does not pass enough required positional arguments, the
+ keywords are treated as a final required positional argument, and a
+ warning is emitted. Pass the argument as a hash instead of keywords
+ to avoid the warning and ensure correct behavior in Ruby 3.
+
+ def foo(h, **kw); end; foo(key: 42) # warned
+ def foo(h, key: 42); end; foo(key: 42) # warned
+ def foo(h, **kw); end; foo({key: 42}) # OK
+ def foo(h, key: 42); end; foo({key: 42}) # OK
+
+ * When a method accepts specific keywords but not a keyword splat, and
+ a hash or keywords splat is passed to the method that includes both
+ Symbol and non-Symbol keys, the hash will continue to be split, and
+ a warning will be emitted. You will need to update the calling code
+ to pass separate hashes to ensure correct behavior in Ruby 3.
+
+ def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned
+ def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned
+ def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK
+
+ * If a method does not accept keywords, and is called with keywords,
+ the keywords are still treated as a positional hash, with no warning.
+ This behavior will continue to work in Ruby 3.
+
+ def foo(opt={}); end; foo( key: 42 ) # OK
+
+* Non-symbols are allowed as keyword argument keys if the method accepts
+ arbitrary keywords. [Feature #14183]
+
+ * Non-Symbol keys in a keyword arguments hash were prohibited in 2.6.0,
+ but are now allowed again. [Bug #15658]
+
+ def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1}
+
+* <code>**nil</code> is allowed in method definitions to explicitly mark
+ that the method accepts no keywords. Calling such a method with keywords
+ will result in an ArgumentError. [Feature #14183]
+
+ def foo(h, **nil); end; foo(key: 1) # ArgumentError
+ def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError
+ def foo(h, **nil); end; foo("str" => 1) # ArgumentError
+ def foo(h, **nil); end; foo({key: 1}) # OK
+ def foo(h, **nil); end; foo({"str" => 1}) # OK
+
+* Passing an empty keyword splat to a method that does not accept keywords
+ no longer passes an empty hash, unless the empty hash is necessary for
+ a required parameter, in which case a warning will be emitted. Remove
+ the double splat to continue passing a positional hash. [Feature #14183]
+
+ h = {}; def foo(*a) a end; foo(**h) # []
+ h = {}; def foo(a) a end; foo(**h) # {} and warning
+ h = {}; def foo(*a) a end; foo(h) # [{}]
+ h = {}; def foo(a) a end; foo(h) # {}
+
+* Above warnings can be suppressed also with {-W:no-deprecated option}[#label-Warning+option].
+
+==== Numbered parameters
+
+* Numbered parameters as default block parameters are introduced. [Feature #4475]
+
+ [1, 2, 10].map { _1.to_s(16) } #=> ["1", "2", "a"]
+ [[1, 2], [3, 4]].map { _1 + _2 } #=> [3, 7]
+
+ You can still define a local variable named +_1+ and so on,
+ and that is honored when present, but renders a warning.
+
+ _1 = 0 #=> warning: `_1' is reserved for numbered parameter; consider another name
+ [1].each { p _1 } # prints 0 instead of 1
+
+==== proc/lambda without block is deprecated
+
+* Proc.new and Kernel#proc with no block in a method called with a block will
+ now display a warning.
+
+ def foo
+ proc
+ end
+ foo { puts "Hello" } #=> warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
+
+ This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
+
+* Kernel#lambda with no block in a method called with a block raises an exception.
+
+ def bar
+ lambda
+ end
+ bar { puts "Hello" } #=> tried to create Proc object without a block (ArgumentError)
+
+==== Other miscellaneous changes
+
+* A beginless range is experimentally introduced. It might be useful
+ in +case+, new call-sequence of the <code>Comparable#clamp</code>,
+ constants and DSLs. [Feature #14799]
+
+ ary[..3] # identical to ary[0..3]
+
+ case RUBY_VERSION
+ when ..."2.4" then puts "EOL"
+ # ...
+ end
+
+ age.clamp(..100)
+
+ where(sales: ..100)
+
+* Setting <code>$;</code> to a non-nil value will now display a warning. [Feature #14240]
+ This includes the usage in String#split.
+ This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
+
+* Setting <code>$,</code> to a non-nil value will now display a warning. [Feature #14240]
+ This includes the usage in Array#join.
+ This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
+
+* Quoted here-document identifiers must end within the same line.
+
+ <<"EOS
+ " # This had been warned since 2.4; Now it raises a SyntaxError
+ EOS
+
+* The flip-flop syntax deprecation is reverted. [Feature #5400]
+
+* Comment lines can be placed between fluent dot now.
+
+ foo
+ # .bar
+ .baz # => foo.baz
+
+* Calling a private method with a literal +self+ as the receiver
+ is now allowed. [Feature #11297] [Feature #16123]
+
+* Modifier rescue now operates the same for multiple assignment as single
+ assignment. [Bug #8279]
+
+ a, b = raise rescue [1, 2]
+ # Previously parsed as: (a, b = raise) rescue [1, 2]
+ # Now parsed as: a, b = (raise rescue [1, 2])
+
+* +yield+ in singleton class syntax will now display a warning. This behavior
+ will soon be deprecated. [Feature #15575].
+
+ def foo
+ class << Object.new
+ yield #=> warning: `yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]
+ end
+ end
+ foo { p :ok }
+
+ This warning can be suppressed with {-W:no-deprecated option}[#label-Warning+option].
+
+* Argument forwarding by <code>(...)</code> is introduced. [Feature #16253]
+
+ def foo(...)
+ bar(...)
+ end
+
+ All arguments to +foo+ are forwarded to +bar+, including keyword and
+ block arguments.
+ Note that the parentheses are mandatory. <code>bar ...</code> is parsed
+ as an endless range.
+
+* Access and setting of <code>$SAFE</code> will now always display a warning.
+ <code>$SAFE</code> will become a normal global variable in Ruby 3.0. [Feature #16131]
+
+* <code>Object#{taint,untaint,trust,untrust}</code> and related functions in the C-API
+ no longer have an effect (all objects are always considered untainted), and will now
+ display a warning in verbose mode. This warning will be disabled even in non-verbose mode in
+ Ruby 3.0, and the methods and C functions will be removed in Ruby 3.2. [Feature #16131]
+
+* Refinements take place at Object#method and Module#instance_method. [Feature #15373]
+
+=== Command line options
+
+==== Warning option
+
+The +-W+ option has been extended with a following +:+, to manage categorized
+warnings. [Feature #16345] [Feature #16420]
+
+* To suppress deprecation warnings:
+
+ $ ruby -e '$; = ""'
+ -e:1: warning: `$;' is deprecated
+
+ $ ruby -W:no-deprecated -e '$; = //'
+
+* It works with the +RUBYOPT+ environment variable:
+
+ $ RUBYOPT=-W:no-deprecated ruby -e '$; = //'
+
+* To suppress experimental feature warnings:
+
+ $ ruby -e '0 in a'
+ -e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
+
+ $ ruby -W:no-experimental -e '0 in a'
+
+* To suppress both by using +RUBYOPT+, set space separated values:
+
+ $ RUBYOPT='-W:no-deprecated -W:no-experimental' ruby -e '($; = "") in a'
+
+See also Warning in {Core classes updates}[#label-Core+classes+updates+-28outstanding+ones+only-29].
+
+=== Core classes updates (outstanding ones only)
+
+[Array]
+
+ [New methods]
+
+ * Added Array#intersection. [Feature #16155]
+
+ * Added Array#minmax, with a faster implementation than Enumerable#minmax. [Bug #15929]
+
+[Comparable]
+
+ [Modified method]
+
+ * Comparable#clamp now accepts a Range argument. [Feature #14784]
+
+ -1.clamp(0..2) #=> 0
+ 1.clamp(0..2) #=> 1
+ 3.clamp(0..2) #=> 2
+ # With beginless and endless ranges:
+ -1.clamp(0..) #=> 0
+ 3.clamp(..2) #=> 2
+
+
+[Complex]
+
+ [New method]
+
+ * Added Complex#<=>.
+ So <code>0 <=> 0i</code> will not raise NoMethodError. [Bug #15857]
+
+[Dir]
+
+ [Modified methods]
+
+ * Dir.glob and Dir.[] no longer allow NUL-separated glob pattern.
+ Use Array instead. [Feature #14643]
+
+[Encoding]
+
+ [New encoding]
+
+ * Added new encoding CESU-8. [Feature #15931]
+
+[Enumerable]
+
+ [New methods]
+
+ * Added Enumerable#filter_map. [Feature #15323]
+
+ [1, 2, 3].filter_map {|x| x.odd? ? x.to_s : nil } #=> ["1", "3"]
+
+ * Added Enumerable#tally. [Feature #11076]
+
+ ["A", "B", "C", "B", "A"].tally #=> {"A"=>2, "B"=>2, "C"=>1}
+
+[Enumerator]
+
+ [New methods]
+
+ * Added Enumerator.produce to generate an Enumerator from any custom
+ data transformation. [Feature #14781]
+
+ require "date"
+ dates = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
+ dates.detect(&:tuesday?) #=> next Tuesday
+
+ * Added Enumerator::Lazy#eager that generates a non-lazy enumerator
+ from a lazy enumerator. [Feature #15901]
+
+ a = %w(foo bar baz)
+ e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
+ p e.class #=> Enumerator
+ p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
+
+ * Added Enumerator::Yielder#to_proc so that a Yielder object
+ can be directly passed to another method as a block
+ argument. [Feature #15618]
+
+ * Added Enumerator::Lazy#with_index be lazy
+ Previously, Enumerator::Lazy#with_index was not defined, so it
+ picked up the default implementation from Enumerator, which was
+ not lazy. [Bug #7877]
+
+ ("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
+ # => 1:a
+ # 2:b
+ # 3:c
+
+[Fiber]
+
+ [New method]
+
+ * Added Fiber#raise that behaves like Fiber#resume but raises an
+ exception on the resumed fiber. [Feature #10344]
+
+[File]
+
+ [New method]
+
+ * Added File.absolute_path? to check whether a path is absolute or
+ not in a portable way. [Feature #15868]
+
+ File.absolute_path?("/foo") # => true (on *nix)
+ File.absolute_path?("C:/foo") # => true (on Windows)
+ File.absolute_path?("foo") # => false
+
+ [Modified method]
+
+ * File.extname now returns a dot string for names ending with a dot on
+ non-Windows platforms. [Bug #15267]
+
+ File.extname("foo.") #=> "."
+
+[FrozenError]
+
+ [New method]
+
+ * Added FrozenError#receiver to return the frozen object on which
+ modification was attempted. To set this object when raising
+ FrozenError in Ruby code, FrozenError.new accepts a +:receiver+
+ option. [Feature #15751]
+
+[GC]
+
+ [New method]
+
+ * Added GC.compact method for compacting the heap.
+ This function compacts live objects in the heap so that fewer pages may
+ be used, and the heap may be more CoW (copy-on-write) friendly. [Feature #15626]
+
+ Details on the algorithm and caveats can be found here:
+ https://bugs.ruby-lang.org/issues/15626
+
+[IO]
+
+ [New method]
+
+ * Added IO#set_encoding_by_bom to check the BOM and set the external
+ encoding. [Bug #15210]
+
+[Integer]
+
+ [Modified method]
+
+ * Integer#[] now supports range operations. [Feature #8842]
+
+ 0b01001101[2, 4] #=> 0b0011
+ 0b01001100[2..5] #=> 0b0011
+ 0b01001100[2...6] #=> 0b0011
+ # ^^^^
+
+[Method]
+
+ [Modified method]
+
+ * Method#inspect shows more information. [Feature #14145]
+
+[Module]
+
+ [New methods]
+
+ * Added Module#const_source_location to retrieve the location where a
+ constant is defined. [Feature #10771]
+
+ * Added Module#ruby2_keywords for marking a method as passing keyword
+ arguments through a regular argument splat, useful when delegating
+ all arguments to another method in a way that can be backwards
+ compatible with older Ruby versions. [Bug #16154]
+
+ [Modified methods]
+
+ * Module#autoload? now takes an +inherit+ optional argument, like
+ Module#const_defined?. [Feature #15777]
+
+ * Module#name now always returns a frozen String. The returned String is
+ always the same for a given Module. This change is
+ experimental. [Feature #16150]
+
+[NilClass / TrueClass / FalseClass]
+
+ [Modified methods]
+
+ * NilClass#to_s, TrueClass#to_s, and FalseClass#to_s now always return a
+ frozen String. The returned String is always the same for each of these
+ values. This change is experimental. [Feature #16150]
+
+[ObjectSpace::WeakMap]
+
+ [Modified method]
+
+ * ObjectSpace::WeakMap#[]= now accepts special objects as either key or
+ values. [Feature #16035]
+
+[Proc]
+
+ [New method]
+
+ * Added Proc#ruby2_keywords for marking the proc as passing keyword
+ arguments through a regular argument splat, useful when delegating
+ all arguments to another method or proc in a way that can be backwards
+ compatible with older Ruby versions. [Feature #16404]
+
+[Range]
+
+ [New method]
+
+ * Added Range#minmax, with a faster implementation than Enumerable#minmax.
+ It returns a maximum that now corresponds to Range#max. [Bug #15807]
+
+ [Modified method]
+
+ * Range#=== now uses Range#cover? for String arguments, too (in Ruby 2.6, it was
+ changed from Range#include? for all types except strings). [Bug #15449]
+
+
+[RubyVM]
+
+ [Removed method]
+
+ * +RubyVM.resolve_feature_path+ moved to
+ <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
+
+[String]
+
+ [Unicode]
+
+ * Update Unicode version and Emoji version from 11.0.0 to
+ 12.0.0. [Feature #15321]
+
+ * Update Unicode version to 12.1.0, adding support for
+ U+32FF SQUARE ERA NAME REIWA. [Feature #15195]
+
+ * Update Unicode Emoji version to 12.1. [Feature #16272]
+
+[Symbol]
+
+ [New methods]
+
+ * Added Symbol#start_with? and Symbol#end_with? methods. [Feature #16348]
+
+[Time]
+
+ [New methods]
+
+ * Added Time#ceil method. [Feature #15772]
+
+ * Added Time#floor method. [Feature #15653]
+
+ [Modified method]
+
+ * Time#inspect is separated from Time#to_s and it shows
+ the time's sub second. [Feature #15958]
+
+[UnboundMethod]
+
+ [New method]
+
+ * Added UnboundMethod#bind_call method. [Feature #15955]
+
+ <code>umethod.bind_call(obj, ...)</code> is semantically equivalent
+ to <code>umethod.bind(obj).call(...)</code>. This idiom is used in
+ some libraries to call a method that is overridden. The added
+ method does the same without allocation of an intermediate Method
+ object.
+
+ class Foo
+ def add_1(x)
+ x + 1
+ end
+ end
+ class Bar < Foo
+ def add_1(x) # override
+ x + 2
+ end
+ end
+
+ obj = Bar.new
+ p obj.add_1(1) #=> 3
+ p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
+ p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
+
+[Warning]
+
+ [New methods]
+
+ * Added Warning.[] and Warning.[]= to manage emitting/suppressing
+ some categories of warnings. [Feature #16345] [Feature #16420]
+
+[$LOAD_PATH]
+
+ [New method]
+
+ * Added <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
+
+=== Stdlib updates (outstanding ones only)
+
+[Bundler]
+
+ * Upgrade to Bundler 2.1.2.
+ See https://github.com/bundler/bundler/releases/tag/v2.1.2
+
+[CGI]
+
+ * CGI.escapeHTML becomes 2~5x faster when there is at least one escaped character.
+ See https://github.com/ruby/ruby/pull/2226
+
+[CSV]
+
+ * Upgrade to 3.1.2.
+ See https://github.com/ruby/csv/blob/master/NEWS.md.
+
+[Date]
+
+ * Date.jisx0301, Date#jisx0301, and Date.parse support the new Japanese
+ era. [Feature #15742]
+
+[Delegator]
+
+ * Object#DelegateClass accepts a block and module_evals it in the context
+ of the returned class, similar to Class.new and Struct.new.
+
+[ERB]
+
+ * Prohibit marshaling ERB instance.
+
+[IRB]
+
+ * Introduce syntax highlighting inspired by the Pry gem to Binding#irb
+ source lines, REPL input, and inspect output of some core-class objects.
+
+ * Introduce multiline editing mode provided by Reline.
+
+ * Show documentation when completion.
+
+ * Enable auto indent and save/load history by default.
+
+[JSON]
+
+ * Upgrade to 2.3.0.
+
+[Net::FTP]
+
+ * Add Net::FTP#features to check available features, and Net::FTP#option to
+ enable/disable each of them. [Feature #15964]
+
+[Net::HTTP]
+
+ * Add +ipaddr+ optional parameter to Net::HTTP#start to replace the address for
+ the TCP/IP connection. [Feature #5180]
+
+[Net::IMAP]
+
+ * Add Server Name Indication (SNI) support. [Feature #15594]
+
+[open-uri]
+
+ * Warn open-uri's "open" method at Kernel.
+ Use URI.open instead. [Misc #15893]
+
+ * The default charset of "text/*" media type is UTF-8 instead of
+ ISO-8859-1. [Bug #15933]
+
+[OptionParser]
+
+ * Now show "Did you mean?" for unknown options. [Feature #16256]
+
+ test.rb:
+
+ require "optparse"
+ OptionParser.new do |opts|
+ opts.on("-f", "--foo", "foo") {|v| }
+ opts.on("-b", "--bar", "bar") {|v| }
+ opts.on("-c", "--baz", "baz") {|v| }
+ end.parse!
+
+ example:
+
+ $ ruby test.rb --baa
+ Traceback (most recent call last):
+ test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption)
+ Did you mean? baz
+ bar
+
+[Pathname]
+
+ * Pathname.glob now delegates 3 arguments to Dir.glob
+ to accept +base+ keyword. [Feature #14405]
+
+[Racc]
+
+ * Merge 1.4.15 from upstream repository and added cli of racc.
+
+[Reline]
+
+ * New stdlib that is compatible with the readline stdlib but is
+ implemented in pure Ruby. It also provides a multiline editing mode.
+
+[REXML]
+
+ * Upgrade to 3.2.3.
+ See https://github.com/ruby/rexml/blob/master/NEWS.md.
+
+[RSS]
+
+ * Upgrade to RSS 0.2.8.
+ See https://github.com/ruby/rss/blob/master/NEWS.md.
+
+[RubyGems]
+
+ * Upgrade to RubyGems 3.1.2.
+ * https://github.com/rubygems/rubygems/releases/tag/v3.1.0
+ * https://github.com/rubygems/rubygems/releases/tag/v3.1.1
+ * https://github.com/rubygems/rubygems/releases/tag/v3.1.2
+
+[StringScanner]
+
+ * Upgrade to 1.0.3.
+ See https://github.com/ruby/strscan/blob/master/NEWS.md.
+
+=== Compatibility issues (excluding feature bug fixes)
+
+* The following libraries are no longer bundled gems.
+ Install corresponding gems to use these features.
+ * CMath (cmath gem)
+ * Scanf (scanf gem)
+ * Shell (shell gem)
+ * Synchronizer (sync gem)
+ * ThreadsWait (thwait gem)
+ * E2MM (e2mmap gem)
+
+[Proc]
+ * The Proc#to_s format was changed. [Feature #16101]
+
+[Range]
+ * Range#minmax used to iterate on the range to determine the maximum.
+ It now uses the same algorithm as Range#max. In rare cases (e.g.
+ ranges of Floats or Strings), this may yield different results. [Bug #15807]
+
+=== Stdlib compatibility issues (excluding feature bug fixes)
+
+* Promote stdlib to default gems
+ * The following default gems were published on rubygems.org
+ * benchmark
+ * cgi
+ * delegate
+ * getoptlong
+ * net-pop
+ * net-smtp
+ * open3
+ * pstore
+ * readline
+ * readline-ext
+ * singleton
+ * The following default gems were only promoted at ruby-core,
+ but not yet published on rubygems.org.
+ * monitor
+ * observer
+ * timeout
+ * tracer
+ * uri
+ * yaml
+* The <tt>did_you_mean</tt> gem has been promoted up to a default gem from a bundled gem
+
+[pathname]
+
+ * Kernel#Pathname when called with a Pathname argument now returns
+ the argument instead of creating a new Pathname. This is more
+ similar to other Kernel methods, but can break code that modifies
+ the return value and expects the argument not to be modified.
+
+[profile.rb, Profiler__]
+
+ * Removed from standard library. It was unmaintained since Ruby 2.0.0.
+
+=== C API updates
+
+* Many <code>*_kw</code> functions have been added for setting whether
+ the final argument being passed should be treated as keywords. You
+ may need to switch to these functions to avoid keyword argument
+ separation warnings, and to ensure correct behavior in Ruby 3.
+
+* The <code>:</code> character in rb_scan_args format string is now
+ treated as keyword arguments. Passing a positional hash instead of
+ keyword arguments will emit a deprecation warning.
+
+* C API declarations with +ANYARGS+ are changed not to use +ANYARGS+.
+ See https://github.com/ruby/ruby/pull/2404
+
+=== Implementation improvements
+
+[Fiber]
+
+ * Allow selecting different coroutine implementations by using
+ +--with-coroutine=+, e.g.
+
+ $ ./configure --with-coroutine=ucontext
+ $ ./configure --with-coroutine=copy
+
+ * Replace previous stack cache with fiber pool cache. The fiber pool
+ allocates many stacks in a single memory region. Stack allocation
+ becomes O(log N) and fiber creation is amortized O(1). Around 10x
+ performance improvement was measured in micro-benchmarks.
+ https://github.com/ruby/ruby/pull/2224
+
+[File]
+ * File.realpath now uses realpath(3) on many platforms, which can
+ significantly improve performance. [Feature #15797]
+
+[Hash]
+ * Change data structure of small Hash objects. [Feature #15602]
+
+[Monitor]
+ * Monitor class is written in C-extension. [Feature #16255]
+
+[Thread]
+
+ * VM stack memory allocation is now combined with native thread stack,
+ improving thread allocation performance and reducing allocation related
+ failures. Around 10x performance improvement was measured in micro-benchmarks.
+
+[JIT]
+
+ * JIT-ed code is recompiled to less-optimized code when an optimization assumption is invalidated.
+
+ * Method inlining is performed when a method is considered as pure.
+ This optimization is still experimental and many methods are NOT considered as pure yet.
+
+ * The default value of +--jit-max-cache+ is changed from 1,000 to 100.
+
+ * The default value of +--jit-min-calls+ is changed from 5 to 10,000.
+
+[RubyVM]
+
+ * Per-call-site method cache, which has been there since around 1.9, was
+ improved: cache hit rate raised from 89% to 94%.
+ See https://github.com/ruby/ruby/pull/2583
+
+[RubyVM::InstructionSequence]
+
+ * RubyVM::InstructionSequence#to_binary method generates compiled binary.
+ The binary size is reduced. [Feature #16163]
+
+=== Miscellaneous changes
+
+* Support for IA64 architecture has been removed. Hardware for testing was
+ difficult to find, native fiber code is difficult to implement, and it added
+ non-trivial complexity to the interpreter. [Feature #15894]
+
+* Require compilers to support C99. [Misc #15347]
+
+ * Details of our dialect: https://bugs.ruby-lang.org/projects/ruby-master/wiki/C99
+
+* Ruby's upstream repository is changed from Subversion to Git.
+
+ * https://git.ruby-lang.org/ruby.git
+
+ * RUBY_REVISION class is changed from Integer to String.
+
+ * RUBY_DESCRIPTION includes Git revision instead of Subversion's one.
+
+* Support built-in methods in Ruby with the <code>_\_builtin_</code> syntax. [Feature #16254]
+
+ Some methods are defined in *.rb (such as trace_point.rb).
+ For example, it is easy to define a method which accepts keyword arguments.
diff --git a/doc/NEWS/NEWS-3.0.0.md b/doc/NEWS/NEWS-3.0.0.md
new file mode 100644
index 0000000000..bdbd47327b
--- /dev/null
+++ b/doc/NEWS/NEWS-3.0.0.md
@@ -0,0 +1,829 @@
+# NEWS for Ruby 3.0.0
+
+This document is a list of user visible feature changes
+since the **2.7.0** release, except for bug fixes.
+
+Note that each entry is kept to a minimum, see links for details.
+
+## Language changes
+
+* Keyword arguments are now separated from positional arguments.
+ Code that resulted in deprecation warnings in Ruby 2.7 will now
+ result in ArgumentError or different behavior. [[Feature #14183]]
+
+* Procs accepting a single rest argument and keywords are no longer
+ subject to autosplatting. This now matches the behavior of Procs
+ accepting a single rest argument and no keywords.
+ [[Feature #16166]]
+
+ ```ruby
+ pr = proc{|*a, **kw| [a, kw]}
+
+ pr.call([1])
+ # 2.7 => [[1], {}]
+ # 3.0 => [[[1]], {}]
+
+ pr.call([1, {a: 1}])
+ # 2.7 => [[1], {:a=>1}] # and deprecation warning
+ # 3.0 => [[[1, {:a=>1}]], {}]
+ ```
+
+* Arguments forwarding (`...`) now supports leading arguments.
+ [[Feature #16378]]
+
+ ```ruby
+ def method_missing(meth, ...)
+ send(:"do_#{meth}", ...)
+ end
+ ```
+
+* Pattern matching (`case/in`) is no longer experimental. [[Feature #17260]]
+
+* One-line pattern matching is redesigned. [EXPERIMENTAL]
+
+ * `=>` is added. It can be used like a rightward assignment.
+ [[Feature #17260]]
+
+ ```ruby
+ 0 => a
+ p a #=> 0
+
+ {b: 0, c: 1} => {b:}
+ p b #=> 0
+ ```
+
+ * `in` is changed to return `true` or `false`. [[Feature #17371]]
+
+ ```ruby
+ # version 3.0
+ 0 in 1 #=> false
+
+ # version 2.7
+ 0 in 1 #=> raise NoMatchingPatternError
+ ```
+
+* Find-pattern is added. [EXPERIMENTAL]
+ [[Feature #16828]]
+
+ ```ruby
+ case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
+ in [*pre, String => x, String => y, *post]
+ p pre #=> ["a", 1]
+ p x #=> "b"
+ p y #=> "c"
+ p post #=> [2, "d", "e", "f", 3]
+ end
+ ```
+
+* Endless method definition is added. [EXPERIMENTAL]
+ [[Feature #16746]]
+
+ ```ruby
+ def square(x) = x * x
+ ```
+
+* Interpolated String literals are no longer frozen when
+ `# frozen-string-literal: true` is used. [[Feature #17104]]
+
+* Magic comment `shareable_constant_value` added to freeze constants.
+ See {Magic Comments}[rdoc-ref:syntax/comments.rdoc@Magic+Comments] for more details.
+ [[Feature #17273]]
+
+* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
+ introduced.
+ * {RBS}[rdoc-label:label-RBS] is introduced. It is a type definition
+ language for Ruby programs.
+ * {TypeProf}[rdoc-label:label-TypeProf] is experimentally bundled. It is a
+ type analysis tool for Ruby programs.
+
+* Deprecation warnings are no longer shown by default (since Ruby 2.7.2).
+ Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
+ [[Feature #16345]]
+
+* `$SAFE` and `$KCODE` are now normal global variables with no special behavior.
+ C-API methods related to `$SAFE` have been removed.
+ [[Feature #16131]] [[Feature #17136]]
+
+* yield in singleton class definitions in methods is now a SyntaxError
+ instead of a warning. yield in a class definition outside of a method
+ is now a SyntaxError instead of a LocalJumpError. [[Feature #15575]]
+
+* When a class variable is overtaken by the same definition in an
+ ancestor class/module, a RuntimeError is now raised (previously,
+ it only issued a warning in verbose mode). Additionally, accessing a
+ class variable from the toplevel scope is now a RuntimeError.
+ [[Bug #14541]]
+
+* Assigning to a numbered parameter is now a SyntaxError instead of
+ a warning.
+
+## Command line options
+
+### `--help` option
+
+When the environment variable `RUBY_PAGER` or `PAGER` is present and has
+a non-empty value, and the standard input and output are tty, the `--help`
+option shows the help message via the pager designated by the value.
+[[Feature #16754]]
+
+### `--backtrace-limit` option
+
+The `--backtrace-limit` option limits the maximum length of a backtrace.
+[[Feature #8661]]
+
+## Core classes updates
+
+Outstanding ones only.
+
+* Array
+
+ * The following methods now return Array instances instead of
+ subclass instances when called on subclass instances:
+ [[Bug #6087]]
+
+ * Array#drop
+ * Array#drop_while
+ * Array#flatten
+ * Array#slice!
+ * Array#slice / Array#[]
+ * Array#take
+ * Array#take_while
+ * Array#uniq
+ * Array#*
+
+ * Can be sliced with Enumerator::ArithmeticSequence
+
+ ```ruby
+ dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
+ dirty_data[(1..).step(2)] # take each second element
+ # => ["data1", "data2", "data3"]
+ ```
+
+* Binding
+
+ * Binding#eval when called with one argument will use `"(eval)"`
+ for `__FILE__` and `1` for `__LINE__` in the evaluated code.
+ [[Bug #4352]] [[Bug #17419]]
+
+* ConditionVariable
+
+ * ConditionVariable#wait may now invoke the `block`/`unblock` scheduler
+ hooks in a non-blocking context. [[Feature #16786]]
+
+* Dir
+
+ * Dir.glob and Dir.[] now sort the results by default, and
+ accept the `sort:` keyword option. [[Feature #8709]]
+
+* ENV
+
+ * ENV.except has been added, which returns a hash excluding the
+ given keys and their values. [[Feature #15822]]
+
+ * Windows: Read ENV names and values as UTF-8 encoded Strings
+ [[Feature #12650]]
+
+* Encoding
+
+ * Added new encoding IBM720. [[Feature #16233]]
+
+ * Changed default for Encoding.default_external to UTF-8 on Windows
+ [[Feature #16604]]
+
+* Fiber
+
+ * Fiber.new(blocking: true/false) allows you to create non-blocking
+ execution contexts. [[Feature #16786]]
+
+ * Fiber#blocking? tells whether the fiber is non-blocking. [[Feature #16786]]
+
+ * Fiber#backtrace and Fiber#backtrace_locations provide per-fiber backtrace.
+ [[Feature #16815]]
+
+ * The limitation of Fiber#transfer is relaxed. [[Bug #17221]]
+
+* GC
+
+ * GC.auto_compact= and GC.auto_compact have been added to control
+ when compaction runs. Setting `auto_compact=` to `true` will cause
+ compaction to occur during major collections. At the moment,
+ compaction adds significant overhead to major collections, so please
+ test first! [[Feature #17176]]
+
+* Hash
+
+ * Hash#transform_keys and Hash#transform_keys! now accept a hash that maps
+ keys to new keys. [[Feature #16274]]
+
+ * Hash#except has been added, which returns a hash excluding the
+ given keys and their values. [[Feature #15822]]
+
+* IO
+
+ * IO#nonblock? now defaults to `true`. [[Feature #16786]]
+
+ * IO#wait_readable, IO#wait_writable, IO#read, IO#write and other
+ related methods (e.g. IO#puts, IO#gets) may invoke the scheduler hook
+ `#io_wait(io, events, timeout)` in a non-blocking execution context.
+ [[Feature #16786]]
+
+* Kernel
+
+ * Kernel#clone when called with the `freeze: false` keyword will call
+ `#initialize_clone` with the `freeze: false` keyword.
+ [[Bug #14266]]
+
+ * Kernel#clone when called with the `freeze: true` keyword will call
+ `#initialize_clone` with the `freeze: true` keyword, and will
+ return a frozen copy even if the receiver is unfrozen.
+ [[Feature #16175]]
+
+ * Kernel#eval when called with two arguments will use `"(eval)"`
+ for `__FILE__` and `1` for `__LINE__` in the evaluated code.
+ [[Bug #4352]]
+
+ * Kernel#lambda now warns if called without a literal block.
+ [[Feature #15973]]
+
+ * Kernel.sleep invokes the scheduler hook `#kernel_sleep(...)` in a
+ non-blocking execution context. [[Feature #16786]]
+
+* Module
+
+ * Module#include and Module#prepend now affect classes and modules
+ that have already included or prepended the receiver, mirroring the
+ behavior if the arguments were included in the receiver before
+ the other modules and classes included or prepended the receiver.
+ [[Feature #9573]]
+
+ ```ruby
+ class C; end
+ module M1; end
+ module M2; end
+ C.include M1
+ M1.include M2
+ p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
+ ```
+
+ * Module#public, Module#protected, Module#private, Module#public_class_method,
+ Module#private_class_method, toplevel "private" and "public" methods
+ now accept single array argument with a list of method names. [[Feature #17314]]
+
+ * Module#attr_accessor, Module#attr_reader, Module#attr_writer and Module#attr
+ methods now return an array of defined method names as symbols.
+ [[Feature #17314]]
+
+ * Module#alias_method now returns the defined alias as a symbol.
+ [[Feature #17314]]
+
+* Mutex
+
+ * `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change
+ should be compatible for essentially all usages and avoids blocking when
+ using a scheduler. [[Feature #16792]]
+
+* Proc
+
+ * Proc#== and Proc#eql? are now defined and will return true for
+ separate Proc instances if the procs were created from the same block.
+ [[Feature #14267]]
+
+* Queue / SizedQueue
+
+ * Queue#pop, SizedQueue#push and related methods may now invoke the
+ `block`/`unblock` scheduler hooks in a non-blocking context.
+ [[Feature #16786]]
+
+* Ractor
+
+ * New class added to enable parallel execution. See rdoc-ref:ractor.md for
+ more details.
+
+* Random
+
+ * `Random::DEFAULT` now refers to the `Random` class instead of being a `Random` instance,
+ so it can work with `Ractor`.
+ [[Feature #17322]]
+
+ * `Random::DEFAULT` is deprecated since its value is now confusing and it is no longer global,
+ use `Kernel.rand`/`Random.rand` directly, or create a `Random` instance with `Random.new` instead.
+ [[Feature #17351]]
+
+
+* String
+
+ * The following methods now return or yield String instances
+ instead of subclass instances when called on subclass instances:
+ [[Bug #10845]]
+
+ * String#*
+ * String#capitalize
+ * String#center
+ * String#chomp
+ * String#chop
+ * String#delete
+ * String#delete_prefix
+ * String#delete_suffix
+ * String#downcase
+ * String#dump
+ * String#each_char
+ * String#each_grapheme_cluster
+ * String#each_line
+ * String#gsub
+ * String#ljust
+ * String#lstrip
+ * String#partition
+ * String#reverse
+ * String#rjust
+ * String#rpartition
+ * String#rstrip
+ * String#scrub
+ * String#slice!
+ * String#slice / String#[]
+ * String#split
+ * String#squeeze
+ * String#strip
+ * String#sub
+ * String#succ / String#next
+ * String#swapcase
+ * String#tr
+ * String#tr_s
+ * String#upcase
+
+* Symbol
+
+ * Symbol#to_proc now returns a lambda Proc. [[Feature #16260]]
+
+ * Symbol#name has been added, which returns the name of the symbol
+ if it is named. The returned string is frozen. [[Feature #16150]]
+
+* Fiber
+
+ * Introduce Fiber.set_scheduler for intercepting blocking operations and
+ Fiber.scheduler for accessing the current scheduler. See
+ rdoc-ref:fiber.md for more details about what operations are supported and
+ how to implement the scheduler hooks. [[Feature #16786]]
+
+ * Fiber.blocking? tells whether the current execution context is
+ blocking. [[Feature #16786]]
+
+ * Thread#join invokes the scheduler hooks `block`/`unblock` in a
+ non-blocking execution context. [[Feature #16786]]
+
+* Thread
+
+ * Thread.ignore_deadlock accessor has been added for disabling the
+ default deadlock detection, allowing the use of signal handlers to
+ break deadlock. [[Bug #13768]]
+
+* Warning
+
+ * Warning#warn now supports a category keyword argument.
+ [[Feature #17122]]
+
+## Stdlib updates
+
+Outstanding ones only.
+
+* BigDecimal
+
+ * Update to BigDecimal 3.0.0
+
+ * This version is Ractor compatible.
+
+* Bundler
+
+ * Update to Bundler 2.2.3
+
+* CGI
+
+ * Update to 0.2.0
+
+ * This version is Ractor compatible.
+
+* CSV
+
+ * Update to CSV 3.1.9
+
+* Date
+
+ * Update to Date 3.1.1
+
+ * This version is Ractor compatible.
+
+* Digest
+
+ * Update to Digest 3.0.0
+
+ * This version is Ractor compatible.
+
+* Etc
+
+ * Update to Etc 1.2.0
+
+ * This version is Ractor compatible.
+
+* Fiddle
+
+ * Update to Fiddle 1.0.5
+
+* IRB
+
+ * Update to IRB 1.2.6
+
+* JSON
+
+ * Update to JSON 2.5.0
+
+ * This version is Ractor compatible.
+
+* Set
+
+ * Update to set 1.0.0
+
+ * SortedSet has been removed for dependency and performance reasons.
+
+ * Set#join is added as a shorthand for `.to_a.join`.
+
+ * Set#<=> is added.
+
+* Socket
+
+ * Add :connect_timeout to TCPSocket.new [[Feature #17187]]
+
+* Net::HTTP
+
+ * Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been
+ added to skip hostname verification. [[Feature #16555]]
+
+ * Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print
+ can take the request headers as a Hash in the second argument when the
+ first argument is a URI. [[Feature #16686]]
+
+* Net::SMTP
+
+ * Add SNI support.
+
+ * Net::SMTP.start arguments are keyword arguments.
+
+ * TLS should not check the host name by default.
+
+* OpenStruct
+
+ * Initialization is no longer lazy. [[Bug #12136]]
+
+ * Builtin methods can now be overridden safely. [[Bug #15409]]
+
+ * Implementation uses only methods ending with `!`.
+
+ * Ractor compatible.
+
+ * Improved support for YAML. [[Bug #8382]]
+
+ * Use officially discouraged. Read OpenStruct@Caveats section.
+
+* Pathname
+
+ * Ractor compatible.
+
+* Psych
+
+ * Update to Psych 3.3.0
+
+ * This version is Ractor compatible.
+
+* Reline
+
+ * Update to Reline 0.1.5
+
+* RubyGems
+
+ * Update to RubyGems 3.2.3
+
+* StringIO
+
+ * Update to StringIO 3.0.0
+
+ * This version is Ractor compatible.
+
+* StringScanner
+
+ * Update to StringScanner 3.0.0
+
+ * This version is Ractor compatible.
+
+* URI
+
+ * URI.escape and URI.unescape have been removed.
+ Instead, use the following methods depending on your specific use case.
+
+ * CGI.escape
+ * URI.encode_www_form
+ * URI.encode_www_form_component
+ * CGI.unescape
+ * URI.decode_www_form
+ * URI.decode_www_form_component
+
+## Compatibility issues
+
+Excluding feature bug fixes.
+
+* Regexp literals and all Range objects are frozen. [[Feature #8948]] [[Feature #16377]] [[Feature #15504]]
+
+ ```ruby
+ /foo/.frozen? #=> true
+ (42...).frozen? # => true
+ ```
+
+* EXPERIMENTAL: Hash#each consistently yields a 2-element array. [[Bug #12706]]
+
+ * Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError
+ due to lambda's arity check.
+
+* When writing to STDOUT redirected to a closed pipe, no broken pipe
+ error message will be shown now. [[Feature #14413]]
+
+* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
+
+* Integer#zero? overrides Numeric#zero? for optimization. [[Misc #16961]]
+
+* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify
+ Regexp.last_match. [[Bug #17030]]
+
+* Requiring 'open-uri' no longer redefines `Kernel#open`.
+ Call `URI.open` directly or `use URI#open` instead. [[Misc #15893]]
+
+* SortedSet has been removed for dependency and performance reasons.
+
+## Stdlib compatibility issues
+
+* Default gems
+
+ * The following libraries are promoted to default gems from stdlib.
+
+ * English
+ * abbrev
+ * base64
+ * drb
+ * debug
+ * erb
+ * find
+ * net-ftp
+ * net-http
+ * net-imap
+ * net-protocol
+ * open-uri
+ * optparse
+ * pp
+ * prettyprint
+ * resolv-replace
+ * resolv
+ * rinda
+ * set
+ * securerandom
+ * shellwords
+ * tempfile
+ * tmpdir
+ * time
+ * tsort
+ * un
+ * weakref
+
+ * The following extensions are promoted to default gems from stdlib.
+
+ * digest
+ * io-nonblock
+ * io-wait
+ * nkf
+ * pathname
+ * syslog
+ * win32ole
+
+* Bundled gems
+
+ * net-telnet and xmlrpc have been removed from the bundled gems.
+ If you are interested in maintaining them, please comment on
+ your plan to https://github.com/ruby/xmlrpc
+ or https://github.com/ruby/net-telnet.
+
+* SDBM has been removed from the Ruby standard library. [[Bug #8446]]
+
+ * The issues of sdbm will be handled at https://github.com/ruby/sdbm
+
+* WEBrick has been removed from the Ruby standard library. [[Feature #17303]]
+
+ * The issues of WEBrick will be handled at https://github.com/ruby/webrick
+
+## C API updates
+
+* C API functions related to `$SAFE` have been removed.
+ [[Feature #16131]]
+
+* C API header file `ruby/ruby.h` was split. [[GH-2991]]
+
+ This should have no impact on extension libraries,
+ but users might experience slow compilations.
+
+* Memory view interface [EXPERIMENTAL]
+
+ * The memory view interface is a C-API set to exchange a raw memory area,
+ such as a numeric array or a bitmap image, between extension libraries.
+ The extension libraries can share also the metadata of the memory area
+ that consists of the shape, the element format, and so on.
+ Using these kinds of metadata, the extension libraries can share even
+ a multidimensional array appropriately.
+ This feature is designed by referring to Python's buffer protocol.
+ [[Feature #13767]] [[Feature #14722]]
+
+* Ractor related C APIs are introduced (experimental) in "include/ruby/ractor.h".
+
+## Implementation improvements
+
+* New method cache mechanism for Ractor. [[Feature #16614]]
+
+ * Inline method caches pointed from ISeq can be accessed by multiple Ractors
+ in parallel and synchronization is needed even for method caches. However,
+ such synchronization can be overhead so introducing new inline method cache
+ mechanisms, (1) Disposable inline method cache (2) per-Class method cache
+ and (3) new invalidation mechanism. (1) can avoid per-method call
+ synchronization because it only uses atomic operations.
+ See the ticket for more details.
+
+* The number of hashes allocated when using a keyword splat in
+ a method call has been reduced to a maximum of 1, and passing
+ a keyword splat to a method that accepts specific keywords
+ does not allocate a hash.
+
+* `super` is optimized when the same type of method is called in the previous call
+ if it's not refinements or an attr reader or writer.
+
+### JIT
+
+* Performance improvements of JIT-ed code
+
+ * Microarchitectural optimizations
+
+ * Native functions shared by multiple methods are deduplicated on JIT compaction.
+
+ * Decrease code size of hot paths by some optimizations and partitioning cold paths.
+
+ * Instance variables
+
+ * Eliminate some redundant checks.
+
+ * Skip checking a class and a object multiple times in a method when possible.
+
+ * Optimize accesses in some core classes like Hash and their subclasses.
+
+ * Method inlining support for some C methods
+
+ * `Kernel`: `#class`, `#frozen?`
+
+ * `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`,
+ `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
+
+ * `Struct`: reader methods for 10th or later members
+
+ * Constant references are inlined.
+
+ * Always generate appropriate code for `==`, `nil?`, and `!` calls depending on
+ a receiver class.
+
+ * Reduce the number of PC accesses on branches and method returns.
+
+ * Optimize C method calls a little.
+
+* Compilation process improvements
+
+ * It does not keep temporary files in /tmp anymore.
+
+ * Throttle GC and compaction of JIT-ed code.
+
+ * Avoid GC-ing JIT-ed code when not necessary.
+
+ * GC-ing JIT-ed code is executed in a background thread.
+
+ * Reduce the number of locks between Ruby and JIT threads.
+
+## Static analysis
+
+### RBS
+
+* RBS is a new language for type definition of Ruby programs.
+ It allows writing types of classes and modules with advanced
+ types including union types, overloading, generics, and
+ _interface types_ for duck typing.
+
+* Ruby ships with type definitions for core/stdlib classes.
+
+* `rbs` gem is bundled to load and process RBS files.
+
+### TypeProf
+
+* TypeProf is a type analysis tool for Ruby code based on abstract interpretation.
+
+ * It reads non-annotated Ruby code, tries inferring its type signature, and prints
+ the analysis result in RBS format.
+
+ * Though it supports only a subset of the Ruby language yet, we will continuously
+ improve the coverage of language features, analysis performance, and usability.
+
+```ruby
+# test.rb
+def foo(x)
+ if x > 10
+ x.to_s
+ else
+ nil
+ end
+end
+
+foo(42)
+```
+
+```
+$ typeprof test.rb
+# Classes
+class Object
+ def foo : (Integer) -> String?
+end
+```
+
+## Miscellaneous changes
+
+* Methods using `ruby2_keywords` will no longer keep empty keyword
+ splats, those are now removed just as they are for methods not
+ using `ruby2_keywords`.
+
+* When an exception is caught in the default handler, the error
+ message and backtrace are printed in order from the innermost.
+ [[Feature #8661]]
+
+* Accessing an uninitialized instance variable no longer emits a
+ warning in verbose mode. [[Feature #17055]]
+
+[Bug #4352]: https://bugs.ruby-lang.org/issues/4352
+[Bug #6087]: https://bugs.ruby-lang.org/issues/6087
+[Bug #8382]: https://bugs.ruby-lang.org/issues/8382
+[Bug #8446]: https://bugs.ruby-lang.org/issues/8446
+[Feature #8661]: https://bugs.ruby-lang.org/issues/8661
+[Feature #8709]: https://bugs.ruby-lang.org/issues/8709
+[Feature #8948]: https://bugs.ruby-lang.org/issues/8948
+[Feature #9573]: https://bugs.ruby-lang.org/issues/9573
+[Bug #10845]: https://bugs.ruby-lang.org/issues/10845
+[Bug #12136]: https://bugs.ruby-lang.org/issues/12136
+[Feature #12650]: https://bugs.ruby-lang.org/issues/12650
+[Bug #12706]: https://bugs.ruby-lang.org/issues/12706
+[Feature #13767]: https://bugs.ruby-lang.org/issues/13767
+[Bug #13768]: https://bugs.ruby-lang.org/issues/13768
+[Feature #14183]: https://bugs.ruby-lang.org/issues/14183
+[Bug #14266]: https://bugs.ruby-lang.org/issues/14266
+[Feature #14267]: https://bugs.ruby-lang.org/issues/14267
+[Feature #14413]: https://bugs.ruby-lang.org/issues/14413
+[Bug #14541]: https://bugs.ruby-lang.org/issues/14541
+[Feature #14722]: https://bugs.ruby-lang.org/issues/14722
+[Bug #15409]: https://bugs.ruby-lang.org/issues/15409
+[Feature #15504]: https://bugs.ruby-lang.org/issues/15504
+[Feature #15575]: https://bugs.ruby-lang.org/issues/15575
+[Feature #15822]: https://bugs.ruby-lang.org/issues/15822
+[Misc #15893]: https://bugs.ruby-lang.org/issues/15893
+[Feature #15921]: https://bugs.ruby-lang.org/issues/15921
+[Feature #15973]: https://bugs.ruby-lang.org/issues/15973
+[Feature #16131]: https://bugs.ruby-lang.org/issues/16131
+[Feature #16150]: https://bugs.ruby-lang.org/issues/16150
+[Feature #16166]: https://bugs.ruby-lang.org/issues/16166
+[Feature #16175]: https://bugs.ruby-lang.org/issues/16175
+[Feature #16233]: https://bugs.ruby-lang.org/issues/16233
+[Feature #16260]: https://bugs.ruby-lang.org/issues/16260
+[Feature #16274]: https://bugs.ruby-lang.org/issues/16274
+[Feature #16345]: https://bugs.ruby-lang.org/issues/16345
+[Feature #16377]: https://bugs.ruby-lang.org/issues/16377
+[Feature #16378]: https://bugs.ruby-lang.org/issues/16378
+[Feature #16555]: https://bugs.ruby-lang.org/issues/16555
+[Feature #16604]: https://bugs.ruby-lang.org/issues/16604
+[Feature #16614]: https://bugs.ruby-lang.org/issues/16614
+[Feature #16686]: https://bugs.ruby-lang.org/issues/16686
+[Feature #16746]: https://bugs.ruby-lang.org/issues/16746
+[Feature #16754]: https://bugs.ruby-lang.org/issues/16754
+[Feature #16786]: https://bugs.ruby-lang.org/issues/16786
+[Feature #16792]: https://bugs.ruby-lang.org/issues/16792
+[Feature #16815]: https://bugs.ruby-lang.org/issues/16815
+[Feature #16828]: https://bugs.ruby-lang.org/issues/16828
+[Misc #16961]: https://bugs.ruby-lang.org/issues/16961
+[Bug #17030]: https://bugs.ruby-lang.org/issues/17030
+[Feature #17055]: https://bugs.ruby-lang.org/issues/17055
+[Feature #17104]: https://bugs.ruby-lang.org/issues/17104
+[Feature #17122]: https://bugs.ruby-lang.org/issues/17122
+[Feature #17136]: https://bugs.ruby-lang.org/issues/17136
+[Feature #17176]: https://bugs.ruby-lang.org/issues/17176
+[Feature #17187]: https://bugs.ruby-lang.org/issues/17187
+[Bug #17221]: https://bugs.ruby-lang.org/issues/17221
+[Feature #17260]: https://bugs.ruby-lang.org/issues/17260
+[Feature #17273]: https://bugs.ruby-lang.org/issues/17273
+[Feature #17303]: https://bugs.ruby-lang.org/issues/17303
+[Feature #17314]: https://bugs.ruby-lang.org/issues/17314
+[Feature #17322]: https://bugs.ruby-lang.org/issues/17322
+[Feature #17351]: https://bugs.ruby-lang.org/issues/17351
+[Feature #17371]: https://bugs.ruby-lang.org/issues/17371
+[Bug #17419]: https://bugs.ruby-lang.org/issues/17419
+[GH-2991]: https://github.com/ruby/ruby/pull/2991
diff --git a/doc/NEWS/NEWS-3.1.0.md b/doc/NEWS/NEWS-3.1.0.md
new file mode 100644
index 0000000000..fe292fc414
--- /dev/null
+++ b/doc/NEWS/NEWS-3.1.0.md
@@ -0,0 +1,660 @@
+# NEWS for Ruby 3.1.0
+
+This document is a list of user-visible feature changes
+since the **3.0.0** release, except for bug fixes.
+
+Note that each entry is kept to a minimum, see links for details.
+
+## Language changes
+
+* The block argument can now be anonymous if the block will
+ only be passed to another method. [[Feature #11256]]
+
+ ```ruby
+ def foo(&)
+ bar(&)
+ end
+ ```
+
+* Pin operator now takes an expression. [[Feature #17411]]
+
+ ```ruby
+ Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a
+ #=> [[3, 5], [5, 7], [11, 13]]
+ ```
+
+* Pin operator now supports instance, class, and global variables.
+ [[Feature #17724]]
+
+ ```ruby
+ @n = 5
+ Prime.each_cons(2).lazy.find{_1 in [n, ^@n]}
+ #=> [3, 5]
+ ```
+
+* One-line pattern matching is no longer experimental.
+
+* Parentheses can be omitted in one-line pattern matching.
+ [[Feature #16182]]
+
+ ```ruby
+ [0, 1] => _, x
+ {y: 2} => y:
+ x #=> 1
+ y #=> 2
+ ```
+
+* Multiple assignment evaluation order has been made consistent with
+ single assignment evaluation order. With single assignment, Ruby
+ uses a left-to-right evaluation order. With this code:
+
+ ```ruby
+ foo[0] = bar
+ ```
+
+ The following evaluation order is used:
+
+ 1. `foo`
+ 2. `bar`
+ 3. `[]=` called on the result of `foo`
+
+ In Ruby before 3.1.0, multiple assignment did not follow this
+ evaluation order. With this code:
+
+ ```ruby
+ foo[0], bar.baz = a, b
+ ```
+
+ Versions of Ruby before 3.1.0 would evaluate in the following
+ order
+
+ 1. `a`
+ 2. `b`
+ 3. `foo`
+ 4. `[]=` called on the result of `foo`
+ 5. `bar`
+ 6. `baz=` called on the result of `bar`
+
+ Starting in Ruby 3.1.0, the evaluation order is now consistent with
+ single assignment, with the left-hand side being evaluated before
+ the right-hand side:
+
+ 1. `foo`
+ 2. `bar`
+ 3. `a`
+ 4. `b`
+ 5. `[]=` called on the result of `foo`
+ 6. `baz=` called on the result of `bar`
+
+ [[Bug #4443]]
+
+* Values in Hash literals and keyword arguments can be omitted.
+ [[Feature #14579]]
+
+ For example,
+
+ * `{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
+ * `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`.
+
+ Constant names, local variable names, and method names are allowed as
+ key names. Note that a reserved word is considered as a local
+ variable or method name even if it's a pseudo variable name such as
+ `self`.
+
+* Non main-Ractors can get instance variables (ivars) of classes/modules
+ if ivars refer to shareable objects.
+ [[Feature #17592]]
+
+* A command syntax is allowed in endless method definitions, i.e.,
+ you can now write `def foo = puts "Hello"`.
+ Note that `private def foo = puts "Hello"` does not parse.
+ [[Feature #17398]]
+
+## Command line options
+
+* `--disable-gems` is now explicitly declared as "just for debugging".
+ Never use it in any real-world codebase.
+ [[Feature #17684]]
+
+## Core classes updates
+
+Note: We're only listing outstanding class updates.
+
+* Array
+
+ * Array#intersect? is added. [[Feature #15198]]
+
+* Class
+
+ * Class#subclasses, which returns an array of classes
+ directly inheriting from the receiver, not
+ including singleton classes.
+ [[Feature #18273]]
+
+ ```ruby
+ class A; end
+ class B < A; end
+ class C < B; end
+ class D < A; end
+ A.subclasses #=> [D, B]
+ B.subclasses #=> [C]
+ C.subclasses #=> []
+ ```
+
+* Enumerable
+
+ * Enumerable#compact is added. [[Feature #17312]]
+
+ * Enumerable#tally now accepts an optional hash to count. [[Feature #17744]]
+
+ * Enumerable#each_cons and each_slice to return a receiver. [[GH-1509]]
+
+ ```ruby
+ [1, 2, 3].each_cons(2){}
+ # 3.0 => nil
+ # 3.1 => [1, 2, 3]
+
+ [1, 2, 3].each_slice(2){}
+ # 3.0 => nil
+ # 3.1 => [1, 2, 3]
+ ```
+
+* Enumerator::Lazy
+
+ * Enumerator::Lazy#compact is added. [[Feature #17312]]
+
+* File
+
+ * File.dirname now accepts an optional argument for the level to
+ strip path components. [[Feature #12194]]
+
+* GC
+
+ * "GC.measure_total_time = true" enables the measurement of GC.
+ Measurement can introduce overhead. It is enabled by default.
+ GC.measure_total_time returns the current setting.
+ GC.stat[:time] or GC.stat(:time) returns measured time
+ in milli-seconds. [[[Feature #10917]]]
+
+ * GC.total_time returns measured time in nano-seconds. [[[Feature #10917]]]
+
+* Integer
+
+ * Integer.try_convert is added. [[Feature #15211]]
+
+* Kernel
+
+ * Kernel#load now accepts a module as the second argument,
+ and will load the file using the given module as the
+ top-level module. [[Feature #6210]]
+
+* Marshal
+
+ * Marshal.load now accepts a `freeze: true` option.
+ All returned objects are frozen except for `Class` and
+ `Module` instances. Strings are deduplicated. [[Feature #18148]]
+
+* MatchData
+
+ * MatchData#match is added [[Feature #18172]]
+
+ * MatchData#match_length is added [[Feature #18172]]
+
+* Method / UnboundMethod
+
+ * Method#public?, Method#private?, Method#protected?,
+ UnboundMethod#public?, UnboundMethod#private?,
+ UnboundMethod#protected? have been added. [[Feature #11689]]
+
+* Module
+
+ * Module#prepend now modifies the ancestor chain if the receiver
+ already includes the argument. Module#prepend still does not
+ modify the ancestor chain if the receiver has already prepended
+ the argument. [[Bug #17423]]
+
+ * Module#private, #public, #protected, and #module_function will
+ now return their arguments. If a single argument is given, it
+ is returned. If no arguments are given, nil is returned. If
+ multiple arguments are given, they are returned as an array.
+ [[Feature #12495]]
+
+* Process
+
+ * Process.\_fork is added. This is a core method for fork(2).
+ Do not call this method directly; it is called by existing
+ fork methods: Kernel.#fork, Process.fork, and IO.popen("-").
+ Application monitoring libraries can overwrite this method to
+ hook fork events. [[Feature #17795]]
+
+* Struct
+
+ * Passing only keyword arguments to Struct#initialize is warned.
+ You need to use a Hash literal to set a Hash to a first member.
+ [[Feature #16806]]
+
+ * StructClass#keyword_init? is added [[Feature #18008]]
+
+* String
+
+ * Update Unicode version to 13.0.0 [[Feature #17750]]
+ and Emoji version to 13.0 [[Feature #18029]]
+
+ * String#unpack and String#unpack1 now accept an `offset:` keyword
+ argument to start the unpacking after an arbitrary number of bytes
+ have been skipped. If `offset` is outside of the string bounds
+ `ArgumentError` is raised. [[Feature #18254]]
+
+* Thread
+
+ * Thread#native_thread_id is added. [[Feature #17853]]
+
+* Thread::Backtrace
+
+ * Thread::Backtrace.limit, which returns the value to limit backtrace
+ length set by `--backtrace-limit` command line option, is added.
+ [[Feature #17479]]
+
+* Thread::Queue
+
+ * Thread::Queue.new now accepts an Enumerable of initial values.
+ [[Feature #17327]]
+
+* Time
+
+ * Time.new now accepts optional `in:` keyword argument for the
+ timezone, as well as `Time.at` and `Time.now`, so that is now
+ you can omit minor arguments to `Time.new`. [[Feature #17485]]
+
+ ```ruby
+ Time.new(2021, 12, 25, in: "+07:00")
+ #=> 2021-12-25 00:00:00 +0700
+ ```
+
+ At the same time, time component strings are converted to
+ integers more strictly now.
+
+ ```ruby
+ Time.new(2021, 12, 25, "+07:30")
+ #=> invalid value for Integer(): "+07:30" (ArgumentError)
+ ```
+
+ Ruby 3.0 or earlier returned probably unexpected result
+ `2021-12-25 07:00:00`, not `2021-12-25 07:30:00` nor
+ `2021-12-25 00:00:00 +07:30`.
+
+ * Time#strftime supports RFC 3339 UTC for unknown offset local
+ time, `-0000`, as `%-z`. [[Feature #17544]]
+
+* TracePoint
+
+ * TracePoint.allow_reentry is added to allow reenter while TracePoint
+ callback.
+ [[Feature #15912]]
+
+* $LOAD_PATH
+
+ * $LOAD_PATH.resolve_feature_path does not raise. [[Feature #16043]]
+
+* Fiber Scheduler
+
+ * Add support for `Addrinfo.getaddrinfo` using `address_resolve` hook.
+ [[Feature #17370]]
+
+ * Introduce non-blocking `Timeout.timeout` using `timeout_after` hook.
+ [[Feature #17470]]
+
+ * Introduce new scheduler hooks `io_read` and `io_write` along with a
+ low level `IO::Buffer` for zero-copy read/write. [[Feature #18020]]
+
+ * IO hooks `io_wait`, `io_read`, `io_write`, receive the original IO object
+ where possible. [[Bug #18003]]
+
+ * Make `Monitor` fiber-safe. [[Bug #17827]]
+
+ * Replace copy coroutine with pthread implementation. [[Feature #18015]]
+
+* Refinement
+
+ * New class which represents a module created by Module#refine.
+ `include` and `prepend` are deprecated, and `import_methods` is added
+ instead. [[Bug #17429]]
+
+## Stdlib updates
+
+* The following default gem are updated.
+ * RubyGems 3.3.3
+ * base64 0.1.1
+ * benchmark 0.2.0
+ * bigdecimal 3.1.1
+ * bundler 2.3.3
+ * cgi 0.3.1
+ * csv 3.2.2
+ * date 3.2.2
+ * did_you_mean 1.6.1
+ * digest 3.1.0
+ * drb 2.1.0
+ * erb 2.2.3
+ * error_highlight 0.3.0
+ * etc 1.3.0
+ * fcntl 1.0.1
+ * fiddle 1.1.0
+ * fileutils 1.6.0
+ * find 0.1.1
+ * io-console 0.5.10
+ * io-wait 0.2.1
+ * ipaddr 1.2.3
+ * irb 1.4.1
+ * json 2.6.1
+ * logger 1.5.0
+ * net-http 0.2.0
+ * net-protocol 0.1.2
+ * nkf 0.1.1
+ * open-uri 0.2.0
+ * openssl 3.0.0
+ * optparse 0.2.0
+ * ostruct 0.5.2
+ * pathname 0.2.0
+ * pp 0.3.0
+ * prettyprint 0.1.1
+ * psych 4.0.3
+ * racc 1.6.0
+ * rdoc 6.4.0
+ * readline 0.0.3
+ * readline-ext 0.1.4
+ * reline 0.3.0
+ * resolv 0.2.1
+ * rinda 0.1.1
+ * ruby2_keywords 0.0.5
+ * securerandom 0.1.1
+ * set 1.0.2
+ * stringio 3.0.1
+ * strscan 3.0.1
+ * tempfile 0.1.2
+ * time 0.2.0
+ * timeout 0.2.0
+ * tmpdir 0.1.2
+ * un 0.2.0
+ * uri 0.11.0
+ * yaml 0.2.0
+ * zlib 2.1.1
+* The following bundled gems are updated.
+ * minitest 5.15.0
+ * power_assert 2.0.1
+ * rake 13.0.6
+ * test-unit 3.5.3
+ * rexml 3.2.5
+ * rbs 2.0.0
+ * typeprof 0.21.1
+* The following default gems are now bundled gems.
+ * net-ftp 0.1.3
+ * net-imap 0.2.2
+ * net-pop 0.1.1
+ * net-smtp 0.3.1
+ * matrix 0.4.2
+ * prime 0.1.2
+ * debug 1.4.0
+* The following gems has been removed from the Ruby standard library.
+ * dbm
+ * gdbm
+ * tracer
+
+* Coverage measurement now supports suspension. You can use `Coverage.suspend`
+ to stop the measurement temporarily, and `Coverage.resume` to restart it.
+ See [[Feature #18176]] in detail.
+
+* Random::Formatter is moved to random/formatter.rb, so that you can
+ use `Random#hex`, `Random#base64`, and so on without SecureRandom.
+ [[Feature #18190]]
+
+## Compatibility issues
+
+Note: Excluding feature bug fixes.
+
+* `rb_io_wait_readable`, `rb_io_wait_writable` and `rb_wait_for_single_fd` are
+ deprecated in favour of `rb_io_maybe_wait_readable`,
+ `rb_io_maybe_wait_writable` and `rb_io_maybe_wait` respectively.
+ `rb_thread_wait_fd` and `rb_thread_fd_writable` are deprecated. [[Bug #18003]]
+
+## Stdlib compatibility issues
+
+* `ERB#initialize` warns `safe_level` and later arguments even without -w.
+ [[Feature #14256]]
+
+* `lib/debug.rb` is replaced with `debug.gem`
+
+* `Kernel#pp` in `lib/pp.rb` uses the width of `IO#winsize` by default.
+ This means that the output width is automatically changed depending on
+ your terminal size. [[Feature #12913]]
+
+* Psych 4.0 changes `Psych.load` as `safe_load` by the default.
+ You may need to use Psych 3.3.2 for migrating to this behavior.
+ [[Bug #17866]]
+
+## C API updates
+
+* Documented. [[GH-4815]]
+
+* `rb_gc_force_recycle` is deprecated and has been changed to a no-op.
+ [[Feature #18290]]
+
+## Implementation improvements
+
+* Inline cache mechanism is introduced for reading class variables.
+ [[Feature #17763]]
+
+* `instance_eval` and `instance_exec` now only allocate a singleton class when
+ required, avoiding extra objects and improving performance. [[GH-5146]]
+
+* The performance of `Struct` accessors is improved. [[GH-5131]]
+
+* `mandatory_only?` builtin special form to improve performance on
+ builtin methods. [[GH-5112]]
+
+* Experimental feature Variable Width Allocation in the garbage collector.
+ This feature is turned off by default and can be enabled by compiling Ruby
+ with flag `USE_RVARGC=1` set. [[Feature #18045]] [[Feature #18239]]
+
+## JIT
+
+* Rename Ruby 3.0's `--jit` to `--mjit`, and alias `--jit` to `--yjit`
+ on non-Windows x86-64 platforms and to `--mjit` on others.
+
+### MJIT
+
+* The default `--mjit-max-cache` is changed from 100 to 10000.
+
+* JIT-ed code is no longer cancelled when a TracePoint for class events
+ is enabled.
+
+* The JIT compiler no longer skips compilation of methods longer than
+ 1000 instructions.
+
+* `--mjit-verbose` and `--mjit-warning` output "JIT cancel" when JIT-ed
+ code is disabled because TracePoint or GC.compact is used.
+
+### YJIT: New experimental in-process JIT compiler
+
+New JIT compiler available as an experimental feature. [[Feature #18229]]
+
+See [this blog post](https://shopify.engineering/yjit-just-in-time-compiler-cruby
+) introducing the project.
+
+* Disabled by default, use `--yjit` command-line option to enable YJIT.
+
+* Performance improvements on benchmarks based on real-world software,
+ up to 22% on railsbench, 39% on liquid-render.
+
+* Fast warm-up times.
+
+* Limited to Unix-like x86-64 platforms for now.
+
+## Static analysis
+
+### RBS
+
+* Generics type parameters can be bounded ([PR](https://github.com/ruby/rbs/pull/844)).
+
+ ```rbs
+ # `T` must be compatible with the `_Output` interface.
+ # `PrettyPrint[String]` is ok, but `PrettyPrint[Integer]` is a type error.
+ class PrettyPrint[T < _Output]
+ interface _Output
+ def <<: (String) -> void
+ end
+
+ attr_reader output: T
+
+ def initialize: (T output) -> void
+ end
+ ```
+
+* Type aliases can be generic. ([PR](https://github.com/ruby/rbs/pull/823))
+
+ ```rbs
+ # Defines a generic type `list`.
+ type list[T] = [ T, list[T] ]
+ | nil
+
+ type str_list = list[String]
+ type int_list = list[Integer]
+ ```
+
+* [rbs collection](https://github.com/ruby/rbs/blob/cdd6a3a896001e25bd1feda3eab7f470bae935c1/docs/collection.md) has been introduced to manage gems’ RBSs.
+
+* Many signatures for built-in and standard libraries have been added/updated.
+
+* It includes many bug fixes and performance improvements too.
+
+See the [CHANGELOG.md](https://github.com/ruby/rbs/blob/cdd6a3a896001e25bd1feda3eab7f470bae935c1/CHANGELOG.md) for more information.
+
+### TypeProf
+
+* [Experimental IDE support](https://github.com/ruby/typeprof/blob/ca15c5dae9bd62668463165f8409bd66ce7de223/doc/ide.md) has been implemented.
+* Many bug fixes and performance improvements since Ruby 3.0.0.
+
+## Debugger
+
+* A new debugger [debug.gem](https://github.com/ruby/debug) is bundled.
+ debug.gem is a fast debugger implementation, and it provides many features
+ like remote debugging, colorful REPL, IDE (VSCode) integration, and more.
+ It replaces `lib/debug.rb` standard library.
+
+* `rdbg` command is also installed into `bin/` directory to start and control
+ debugging execution.
+
+## error_highlight
+
+A built-in gem called error_highlight has been introduced.
+It shows fine-grained error locations in the backtrace.
+
+Example: `title = json[:article][:title]`
+
+If `json` is nil, it shows:
+
+```
+$ ruby test.rb
+test.rb:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
+
+title = json[:article][:title]
+ ^^^^^^^^^^
+```
+
+If `json[:article]` returns nil, it shows:
+
+```
+$ ruby test.rb
+test.rb:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
+
+title = json[:article][:title]
+ ^^^^^^^^
+```
+
+This feature is enabled by default.
+You can disable it by using a command-line option `--disable-error_highlight`.
+See [the repository](https://github.com/ruby/error_highlight) in detail.
+
+## IRB Autocomplete and Document Display
+
+The IRB now has an autocomplete feature, where you can just type in the code, and the completion candidates dialog will appear. You can use Tab and Shift+Tab to move up and down.
+
+If documents are installed when you select a completion candidate, the documentation dialog will appear next to the completion candidates dialog, showing part of the content. You can read the full document by pressing Alt+d.
+
+## Miscellaneous changes
+
+* lib/objspace/trace.rb is added, which is a tool for tracing the object
+ allocation. Just by requiring this file, tracing is started *immediately*.
+ Just by `Kernel#p`, you can investigate where an object was created.
+ Note that just requiring this file brings a large performance overhead.
+ This is only for debugging purposes. Do not use this in production.
+ [[Feature #17762]]
+
+* Now exceptions raised in finalizers will be printed to `STDERR`, unless
+ `$VERBOSE` is `nil`. [[Feature #17798]]
+
+* `ruby -run -e httpd` displays URLs to access. [[Feature #17847]]
+
+* Add `ruby -run -e colorize` to colorize Ruby code using
+ `IRB::Color.colorize_code`.
+
+[Bug #4443]: https://bugs.ruby-lang.org/issues/4443
+[Feature #6210]: https://bugs.ruby-lang.org/issues/6210
+[Feature #10917]: https://bugs.ruby-lang.org/issues/10917
+[Feature #11256]: https://bugs.ruby-lang.org/issues/11256
+[Feature #11689]: https://bugs.ruby-lang.org/issues/11689
+[Feature #12194]: https://bugs.ruby-lang.org/issues/12194
+[Feature #12495]: https://bugs.ruby-lang.org/issues/12495
+[Feature #12913]: https://bugs.ruby-lang.org/issues/12913
+[Feature #14256]: https://bugs.ruby-lang.org/issues/14256
+[Feature #14579]: https://bugs.ruby-lang.org/issues/14579
+[Feature #15198]: https://bugs.ruby-lang.org/issues/15198
+[Feature #15211]: https://bugs.ruby-lang.org/issues/15211
+[Feature #15912]: https://bugs.ruby-lang.org/issues/15912
+[Feature #16043]: https://bugs.ruby-lang.org/issues/16043
+[Feature #16182]: https://bugs.ruby-lang.org/issues/16182
+[Feature #16806]: https://bugs.ruby-lang.org/issues/16806
+[Feature #17312]: https://bugs.ruby-lang.org/issues/17312
+[Feature #17327]: https://bugs.ruby-lang.org/issues/17327
+[Feature #17370]: https://bugs.ruby-lang.org/issues/17370
+[Feature #17398]: https://bugs.ruby-lang.org/issues/17398
+[Feature #17411]: https://bugs.ruby-lang.org/issues/17411
+[Bug #17423]: https://bugs.ruby-lang.org/issues/17423
+[Bug #17429]: https://bugs.ruby-lang.org/issues/17429
+[Feature #17470]: https://bugs.ruby-lang.org/issues/17470
+[Feature #17479]: https://bugs.ruby-lang.org/issues/17479
+[Feature #17485]: https://bugs.ruby-lang.org/issues/17485
+[Feature #17544]: https://bugs.ruby-lang.org/issues/17544
+[Feature #17592]: https://bugs.ruby-lang.org/issues/17592
+[Feature #17684]: https://bugs.ruby-lang.org/issues/17684
+[Feature #17724]: https://bugs.ruby-lang.org/issues/17724
+[Feature #17744]: https://bugs.ruby-lang.org/issues/17744
+[Feature #17750]: https://bugs.ruby-lang.org/issues/17750
+[Feature #17762]: https://bugs.ruby-lang.org/issues/17762
+[Feature #17763]: https://bugs.ruby-lang.org/issues/17763
+[Feature #17795]: https://bugs.ruby-lang.org/issues/17795
+[Feature #17798]: https://bugs.ruby-lang.org/issues/17798
+[Bug #17827]: https://bugs.ruby-lang.org/issues/17827
+[Feature #17847]: https://bugs.ruby-lang.org/issues/17847
+[Feature #17853]: https://bugs.ruby-lang.org/issues/17853
+[Bug #17866]: https://bugs.ruby-lang.org/issues/17866
+[Bug #18003]: https://bugs.ruby-lang.org/issues/18003
+[Feature #18008]: https://bugs.ruby-lang.org/issues/18008
+[Feature #18015]: https://bugs.ruby-lang.org/issues/18015
+[Feature #18020]: https://bugs.ruby-lang.org/issues/18020
+[Feature #18029]: https://bugs.ruby-lang.org/issues/18029
+[Feature #18045]: https://bugs.ruby-lang.org/issues/18045
+[Feature #18148]: https://bugs.ruby-lang.org/issues/18148
+[Feature #18172]: https://bugs.ruby-lang.org/issues/18172
+[Feature #18176]: https://bugs.ruby-lang.org/issues/18176
+[Feature #18190]: https://bugs.ruby-lang.org/issues/18190
+[Feature #18229]: https://bugs.ruby-lang.org/issues/18229
+[Feature #18239]: https://bugs.ruby-lang.org/issues/18239
+[Feature #18254]: https://bugs.ruby-lang.org/issues/18254
+[Feature #18273]: https://bugs.ruby-lang.org/issues/18273
+[Feature #18290]: https://bugs.ruby-lang.org/issues/18290
+
+[GH-1509]: https://github.com/ruby/ruby/pull/1509
+[GH-4815]: https://github.com/ruby/ruby/pull/4815
+[GH-5112]: https://github.com/ruby/ruby/pull/5112
+[GH-5131]: https://github.com/ruby/ruby/pull/5131
+[GH-5146]: https://github.com/ruby/ruby/pull/5146
diff --git a/doc/bsearch.rdoc b/doc/bsearch.rdoc
new file mode 100644
index 0000000000..ca8091fc0d
--- /dev/null
+++ b/doc/bsearch.rdoc
@@ -0,0 +1,120 @@
+== Binary Searching
+
+A few Ruby methods support binary searching in a collection:
+
+Array#bsearch:: Returns an element selected via a binary search
+ as determined by a given block.
+Array#bsearch_index:: Returns the index of an element selected via a binary search
+ as determined by a given block.
+Range#bsearch:: Returns an element selected via a binary search
+ as determined by a given block.
+
+Each of these methods returns an enumerator if no block is given.
+
+Given a block, each of these methods returns an element (or element index) from +self+
+as determined by a binary search.
+The search finds an element of +self+ which meets
+the given condition in <tt>O(log n)</tt> operations, where +n+ is the count of elements.
++self+ should be sorted, but this is not checked.
+
+There are two search modes:
+
+Find-minimum mode:: method +bsearch+ returns the first element for which
+ the block returns +true+;
+ the block must return +true+ or +false+.
+Find-any mode:: method +bsearch+ some element, if any, for which
+ the block returns zero.
+ the block must return a numeric value.
+
+The block should not mix the modes by sometimes returning +true+ or +false+
+and other times returning a numeric value, but this is not checked.
+
+<b>Find-Minimum Mode</b>
+
+In find-minimum mode, the block must return +true+ or +false+.
+The further requirement (though not checked) is that
+there are no indexes +i+ and +j+ such that:
+
+- <tt>0 <= i < j <= self.size</tt>.
+- The block returns +true+ for <tt>self[i]</tt> and +false+ for <tt>self[j]</tt>.
+
+Less formally: the block is such that all +false+-evaluating elements
+precede all +true+-evaluating elements.
+
+In find-minimum mode, method +bsearch+ returns the first element
+for which the block returns +true+.
+
+Examples:
+
+ a = [0, 4, 7, 10, 12]
+ a.bsearch {|x| x >= 4 } # => 4
+ a.bsearch {|x| x >= 6 } # => 7
+ a.bsearch {|x| x >= -1 } # => 0
+ a.bsearch {|x| x >= 100 } # => nil
+
+ r = (0...a.size)
+ r.bsearch {|i| a[i] >= 4 } #=> 1
+ r.bsearch {|i| a[i] >= 6 } #=> 2
+ r.bsearch {|i| a[i] >= 8 } #=> 3
+ r.bsearch {|i| a[i] >= 100 } #=> nil
+ r = (0.0...Float::INFINITY)
+ r.bsearch {|x| Math.log(x) >= 0 } #=> 1.0
+
+These blocks make sense in find-minimum mode:
+
+ a = [0, 4, 7, 10, 12]
+ a.map {|x| x >= 4 } # => [false, true, true, true, true]
+ a.map {|x| x >= 6 } # => [false, false, true, true, true]
+ a.map {|x| x >= -1 } # => [true, true, true, true, true]
+ a.map {|x| x >= 100 } # => [false, false, false, false, false]
+
+This would not make sense:
+
+ a.map {|x| x == 7 } # => [false, false, true, false, false]
+
+<b>Find-Any Mode</b>
+
+In find-any mode, the block must return a numeric value.
+The further requirement (though not checked) is that
+there are no indexes +i+ and +j+ such that:
+
+- <tt>0 <= i < j <= self.size</tt>.
+- The block returns a negative value for <tt>self[i]</tt>
+ and a positive value for <tt>self[j]</tt>.
+- The block returns a negative value for <tt>self[i]</tt> and zero <tt>self[j]</tt>.
+- The block returns zero for <tt>self[i]</tt> and a positive value for <tt>self[j]</tt>.
+
+Less formally: the block is such that:
+
+- All positive-evaluating elements precede all zero-evaluating elements.
+- All positive-evaluating elements precede all negative-evaluating elements.
+- All zero-evaluating elements precede all negative-evaluating elements.
+
+In find-any mode, method +bsearch+ returns some element
+for which the block returns zero, or +nil+ if no such element is found.
+
+Examples:
+
+ a = [0, 4, 7, 10, 12]
+ a.bsearch {|element| 7 <=> element } # => 7
+ a.bsearch {|element| -1 <=> element } # => nil
+ a.bsearch {|element| 5 <=> element } # => nil
+ a.bsearch {|element| 15 <=> element } # => nil
+
+ a = [0, 100, 100, 100, 200]
+ r = (0..4)
+ r.bsearch {|i| 100 - a[i] } #=> 1, 2 or 3
+ r.bsearch {|i| 300 - a[i] } #=> nil
+ r.bsearch {|i| 50 - a[i] } #=> nil
+
+These blocks make sense in find-any mode:
+
+ a = [0, 4, 7, 10, 12]
+ a.map {|element| 7 <=> element } # => [1, 1, 0, -1, -1]
+ a.map {|element| -1 <=> element } # => [-1, -1, -1, -1, -1]
+ a.map {|element| 5 <=> element } # => [1, 1, -1, -1, -1]
+ a.map {|element| 15 <=> element } # => [1, 1, 1, 1, 1]
+
+This would not make sense:
+
+ a.map {|element| element <=> 7 } # => [-1, -1, 0, 1, 1]
diff --git a/doc/case_mapping.rdoc b/doc/case_mapping.rdoc
new file mode 100644
index 0000000000..3c42154973
--- /dev/null
+++ b/doc/case_mapping.rdoc
@@ -0,0 +1,116 @@
+== Case Mapping
+
+Some string-oriented methods use case mapping.
+
+In String:
+
+- String#capitalize
+- String#capitalize!
+- String#casecmp
+- String#casecmp?
+- String#downcase
+- String#downcase!
+- String#swapcase
+- String#swapcase!
+- String#upcase
+- String#upcase!
+
+In Symbol:
+
+- Symbol#capitalize
+- Symbol#casecmp
+- Symbol#casecmp?
+- Symbol#downcase
+- Symbol#swapcase
+- Symbol#upcase
+
+=== Default Case Mapping
+
+By default, all of these methods use full Unicode case mapping,
+which is suitable for most languages.
+See {Section 3.13 (Default Case Algorithms) of the Unicode standard}[https://www.unicode.org/versions/latest/ch03.pdf].
+
+Non-ASCII case mapping and folding are supported for UTF-8,
+UTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16 Strings/Symbols.
+
+Context-dependent case mapping as described in
+{Table 3-17 (Context Specification for Casing) of the Unicode standard}[https://www.unicode.org/versions/latest/ch03.pdf]
+is currently not supported.
+
+In most cases, case conversions of a string have the same number of characters.
+There are exceptions (see also +:fold+ below):
+
+ s = "\u00DF" # => "ß"
+ s.upcase # => "SS"
+ s = "\u0149" # => "ʼn"
+ s.upcase # => "ʼN"
+
+Case mapping may also depend on locale (see also +:turkic+ below):
+
+ s = "\u0049" # => "I"
+ s.downcase # => "i" # Dot above.
+ s.downcase(:turkic) # => "ı" # No dot above.
+
+Case changes may not be reversible:
+
+ s = 'Hello World!' # => "Hello World!"
+ s.downcase # => "hello world!"
+ s.downcase.upcase # => "HELLO WORLD!" # Different from original s.
+
+Case changing methods may not maintain Unicode normalization.
+See String#unicode_normalize).
+
+=== Options for Case Mapping
+
+Except for +casecmp+ and +casecmp?+,
+each of the case-mapping methods listed above
+accepts optional arguments, <tt>*options</tt>.
+
+The arguments may be:
+
+- +:ascii+ only.
+- +:fold+ only.
+- +:turkic+ or +:lithuanian+ or both.
+
+The options:
+
+- +:ascii+:
+ ASCII-only mapping:
+ uppercase letters ('A'..'Z') are mapped to lowercase letters ('a'..'z);
+ other characters are not changed
+
+ s = "Foo \u00D8 \u00F8 Bar" # => "Foo Ø ø Bar"
+ s.upcase # => "FOO Ø Ø BAR"
+ s.downcase # => "foo ø ø bar"
+ s.upcase(:ascii) # => "FOO Ø ø BAR"
+ s.downcase(:ascii) # => "foo Ø ø bar"
+
+- +:turkic+:
+ Full Unicode case mapping, adapted for the Turkic languages
+ that distinguish dotted and dotless I, for example Turkish and Azeri.
+
+ s = 'Türkiye' # => "Türkiye"
+ s.upcase # => "TÜRKIYE"
+ s.upcase(:turkic) # => "TÜRKİYE" # Dot above.
+
+ s = 'TÜRKIYE' # => "TÜRKIYE"
+ s.downcase # => "türkiye"
+ s.downcase(:turkic) # => "türkıye" # No dot above.
+
+- +:lithuanian+:
+ Not yet implemented.
+
+- +:fold+ (available only for String#downcase, String#downcase!,
+ and Symbol#downcase):
+ Unicode case folding,
+ which is more far-reaching than Unicode case mapping.
+
+ s = "\u00DF" # => "ß"
+ s.downcase # => "ß"
+ s.downcase(:fold) # => "ss"
+ s.upcase # => "SS"
+
+ s = "\uFB04" # => "ffl"
+ s.downcase # => "ffl"
+ s.upcase # => "FFL"
+ s.downcase(:fold) # => "ffl"
diff --git a/doc/character_selectors.rdoc b/doc/character_selectors.rdoc
new file mode 100644
index 0000000000..e01b0e6a25
--- /dev/null
+++ b/doc/character_selectors.rdoc
@@ -0,0 +1,97 @@
+== Character Selectors
+
+=== Character Selector
+
+A _character_ _selector_ is a string argument accepted by certain Ruby methods.
+Each of these instance methods accepts one or more character selectors:
+
+- String#tr(selector, replacements): returns a new string.
+- String#tr!(selector, replacements): returns +self+ or +nil+.
+- String#tr_s(selector, replacements): returns a new string.
+- String#tr_s!(selector, replacements): returns +self+ or +nil+.
+- String#count(*selectors): returns the count of the specified characters.
+- String#delete(*selectors): returns a new string.
+- String#delete!(*selectors): returns +self+ or +nil+.
+- String#squeeze(*selectors): returns a new string.
+- String#squeeze!(*selectors): returns +self+ or +nil+.
+
+A character selector identifies zero or more characters in +self+
+that are to be operands for the method.
+
+In this section, we illustrate using method String#delete(selector),
+which deletes the selected characters.
+
+In the simplest case, the characters selected are exactly those
+contained in the selector itself:
+
+ 'abracadabra'.delete('a') # => "brcdbr"
+ 'abracadabra'.delete('ab') # => "rcdr"
+ 'abracadabra'.delete('abc') # => "rdr"
+ '0123456789'.delete('258') # => "0134679"
+ '!@#$%&*()_+'.delete('+&#') # => "!@$%*()_"
+ 'теÑÑ‚'.delete('Ñ‚') # => "еÑ"
+ 'ã“ã‚“ã«ã¡ã¯'.delete('ã«') # => "ã“ã‚“ã¡ã¯"
+
+Note that order and repetitions do not matter:
+
+ 'abracadabra'.delete('dcab') # => "rr"
+ 'abracadabra'.delete('aaaa') # => "brcdbr"
+
+In a character selector, these three characters get special treatment:
+
+- A leading caret (<tt>'^'</tt>) functions as a "not" operator
+ for the characters to its right:
+
+ 'abracadabra'.delete('^bc') # => "bcb"
+ '0123456789'.delete('^852') # => "258"
+
+- A hyphen (<tt>'-'</tt>) between two other characters
+ defines a range of characters instead of a plain string of characters:
+
+ 'abracadabra'.delete('a-d') # => "rr"
+ '0123456789'.delete('4-7') # => "012389"
+ '!@#$%&*()_+'.delete(' -/') # => "@^_"
+
+ # May contain more than one range.
+ 'abracadabra'.delete('a-cq-t') # => "d"
+
+ # Ranges may be mixed with plain characters.
+ '0123456789'.delete('67-950-23') # => "4"
+
+ # Ranges may be mixed with negations.
+ 'abracadabra'.delete('^a-c') # => "abacaaba"
+
+- A backslash (<tt>'\'</tt>) acts as an escape for a caret, a hyphen,
+ or another backslash:
+
+ 'abracadabra^'.delete('\^bc') # => "araadara"
+ 'abracadabra-'.delete('a\-d') # => "brcbr"
+ "hello\r\nworld".delete("\r") # => "hello\nworld"
+ "hello\r\nworld".delete("\\r") # => "hello\r\nwold"
+ "hello\r\nworld".delete("\\\r") # => "hello\nworld"
+
+=== Multiple Character Selectors
+
+These instance methods accept multiple character selectors:
+
+- String#count(*selectors): returns the count of the specified characters.
+- String#delete(*selectors): returns a new string.
+- String#delete!(*selectors): returns +self+ or +nil+.
+- String#squeeze(*selectors): returns a new string.
+- String#squeeze!(*selectors): returns +self+ or +nil+.
+
+In effect, the given selectors are formed into a single selector
+consisting of only those characters common to _all_ of the given selectors.
+
+All forms of selectors may be used, including negations, ranges, and escapes.
+
+Each of these pairs of method calls is equivalent:
+
+ s.delete('abcde', 'dcbfg')
+ s.delete('bcd')
+
+ s.delete('^abc', '^def')
+ s.delete('^abcdef')
+
+ s.delete('a-e', 'c-g')
+ s.delete('cde')
diff --git a/doc/command_injection.rdoc b/doc/command_injection.rdoc
new file mode 100644
index 0000000000..af09be23f0
--- /dev/null
+++ b/doc/command_injection.rdoc
@@ -0,0 +1,29 @@
+== Command Injection
+
+Some Ruby core methods accept string data
+that includes text to be executed as a system command.
+
+They should not be called with unknown or unsanitized commands.
+
+These methods include:
+
+- Kernel.system
+- {\`command` (backtick method)}[rdoc-ref:Kernel#`]
+ (also called by the expression <tt>%x[command]</tt>).
+- IO.popen(command).
+- IO.read(command).
+- IO.write(command).
+- IO.binread(command).
+- IO.binwrite(command).
+- IO.readlines(command).
+- IO.foreach(command).
+
+Note that some of these methods do not execute commands when called
+from subclass \File:
+
+- File.read(path).
+- File.write(path).
+- File.binread(path).
+- File.binwrite(path).
+- File.readlines(path).
+- File.foreach(path).
diff --git a/doc/contributing.md b/doc/contributing.md
new file mode 100644
index 0000000000..a6c63de9b2
--- /dev/null
+++ b/doc/contributing.md
@@ -0,0 +1,12 @@
+# Contributing to Ruby
+
+This guide outlines ways to get started with contributing to Ruby:
+
+* [Reporting issues](contributing/reporting_issues.md): How to report issues, how to request features, and how backporting works
+* [Building Ruby](contributing/building_ruby.md): How to build Ruby on your local machine for development
+* [Testing Ruby](contributing/testing_ruby.md): How to test Ruby on your local machine once you've built it
+* [Making changes to Ruby](contributing/making_changes_to_ruby.md): How to submit pull requests
+ to change Ruby's documentation, code, test suite, or standard libraries
+* [Making changes to Ruby standard libraries](contributing/making_changes_to_stdlibs.md): How to build, test, and contribute to Ruby standard libraries
+* [Making changes to Ruby documentation](contributing/documentation_guide.md): How to make changes to Ruby documentation
+* [Benchmarking Ruby](https://github.com/ruby/ruby/tree/master/benchmark#make-benchmark): How to benchmark Ruby
diff --git a/doc/contributing.rdoc b/doc/contributing.rdoc
deleted file mode 100644
index 68dda66e46..0000000000
--- a/doc/contributing.rdoc
+++ /dev/null
@@ -1,447 +0,0 @@
-= Contributing to Ruby
-
-Ruby has a vast and friendly community with hundreds of people contributing to
-a thriving open-source ecosystem. This guide is designed to cover ways for
-participating in the development of CRuby.
-
-There are plenty of ways for you to help even if you're not ready to write
-code or documentation. You can help by reporting issues, testing patches, and
-trying out beta releases with your applications.
-
-== How To Report
-
-If you've encountered a bug in Ruby please report it to the redmine issue
-tracker available at {bugs.ruby-lang.org}[https://bugs.ruby-lang.org/]. Do not
-report security vulnerabilities here, there is a {separate
-channel}[rdoc-label:label-Reporting+Security+Issues] for them.
-
-There are a few simple steps you should follow in order to receive feedback
-on your ticket.
-
-* If you haven't already,
- {sign up for an account}[https://bugs.ruby-lang.org/account/register] on the
- bug tracker.
-* Try the latest version.
-
- If you aren't already using the latest version, try installing a newer
- stable release. See
- {Downloading Ruby}[https://www.ruby-lang.org/en/downloads/].
-* Look to see if anyone already reported your issue, try
- {searching on redmine}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues]
- for your problem.
-* If you can't find a ticket addressing your issue,
- {create a new one}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues/new].
-* Choose the target version, usually current. Bugs will be first fixed in the
- current release and then {backported}[rdoc-label:label-Backport+Requests].
-* Fill in the Ruby version you're using when experiencing this issue
- (<code>ruby -v</code>).
-* Attach any logs or reproducible programs to provide additional information.
- Reproducible scripts should be as small as possible.
-* Briefly describe your problem. A 2-3 sentence description will help give a
- quick response.
-* Pick a category, such as core for common problems, or lib for a standard
- library.
-* Check the {Maintainers
- list}[https://bugs.ruby-lang.org/projects/ruby/wiki/Maintainers] and assign
- the ticket if there is an active maintainer for the library or feature.
-* If the ticket doesn't have any replies after 10 days, you can send a
- reminder.
-* Please reply to feedback requests. If a bug report doesn't get any feedback,
- it'll eventually get rejected.
-
-=== Reporting to downstream distributions
-
-You can report downstream issues for the following distributions via their bug tracker:
-
-* {debian}[https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ruby-defaults]
-* {freebsd}[http://www.freebsd.org/cgi/query-pr-summary.cgi?text=ruby]
-* {redhat}[https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED]
-* {macports}[https://trac.macports.org/query?status=assigned&status=new&status=reopened&port=~ruby]
-* etc (add your distribution bug tracker here)
-
-=== Platform Maintainers
-
-For platform specific bugs in Ruby, you can assign your ticket to the current
-maintainer for a specific platform.
-
-The current active platform maintainers are as follows:
-
-[mswin64 (Microsoft Windows)]
- NAKAMURA Usaku (usa)
-[mingw32 (Minimalist GNU for Windows)]
- Nobuyoshi Nakada (nobu)
-[AIX]
- Yutaka Kanemoto (kanemoto)
-[FreeBSD]
- Akinori MUSHA (knu)
-[Solaris]
- Naohisa Goto (ngoto)
-[RHEL, CentOS]
- KOSAKI Motohiro (kosaki)
-[macOS]
- Kenta Murata (mrkn)
-[OpenBSD]
- Jeremy Evans (jeremyevans0)
-[cygwin, bcc32, djgpp, wince, ...]
- none. (Maintainer WANTED)
-
-== Reporting Security Issues
-
-Security vulnerabilities receive special treatment since they may negatively
-affect many users. There is a private mailing list that all security issues
-should be reported to and will be handled discretely. Email the
-mailto:security@ruby-lang.org list and the problem will be published after
-fixes have been released. You can also encrypt the issue using {the PGP public
-key}[https://www.ruby-lang.org/security.asc] for the list.
-
-== Reporting Other Issues
-
-If you're having an issue with the website, or maybe the mailing list, you can
-contact the webmaster to help resolve the problem.
-
-The current webmaster is:
-
-* Hiroshi SHIBATA (hsbt)
-
-You can also report issues with the ruby-lang.org website on the issue tracker:
-
-* {issue tracker}[https://github.com/ruby/www.ruby-lang.org/issues]
-
-== Resolve Existing Issues
-
-As a next step beyond reporting issues you can help the core team resolve
-existing issues. If you check the Everyone's Issues list in GitHub Issues,
-you will find a lot of issues already requiring attention. What can you do for
-these? Quite a bit, actually:
-
-When a bug report goes for a while without any feedback, it goes to the bug
-graveyard which is unfortunate. If you check the {issues
-list}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues] you will find lots
-of delinquent bugs that require attention.
-
-You can help by verifying the existing tickets, try to reproduce the reported
-issue on your own and comment if you still experience the bug. Some issues
-lack attention because of too much ambiguity, to help you can narrow down the
-problem and provide more specific details or instructions to reproduce the
-bug. You might also try contributing a failing test in the form of a patch,
-which we will cover later in this guide.
-
-It may also help to try out patches other contributors have submitted to
-redmine, if gone without notice. In this case the +patch+ command is your
-friend, see <code>man patch</code> for more information. Basically this would
-go something like this:
-
- cd path/to/ruby
- patch -p0 < path/to/patch
-
-You will then be prompted to apply the patch with the associated files. After
-building ruby again, you should try to run the tests and verify if the change
-actually worked or fixed the bug. It's important to provide valuable feedback
-on the patch that can help reach the overall goal, try to answer some of these
-questions:
-
-* What do you like about this change?
-* What would you do differently?
-* Are there any other edge cases not tested?
-* Is there any documentation that would be affected by this change?
-
-If you can answer some or all of these questions, you're on the right track.
-If your comment simply says "+1", then odds are that other reviewers aren't
-going to take it too seriously. Show that you took the time to review the
-patch.
-
-== How To Request Features
-
-If there's a new feature that you want to see added to Ruby, you will need to
-write a convincing proposal and patch to implement the feature.
-
-For new features in CRuby, use the {'Feature'
-tracker}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues?set_filter=1&tracker_id=2]
-on ruby-master. For non-CRuby dependent features, features that would apply to
-alternate Ruby implementations such as JRuby and Rubinius, use the {CommonRuby
-tracker}[https://bugs.ruby-lang.org/projects/common-ruby].
-
-When writing a proposal be sure to check for previous discussions on the
-topic and have a solid use case. You will need to be persuasive and convince
-Matz on your new feature. You should also consider the potential compatibility
-issues that this new feature might raise.
-
-Consider making your feature into a gem, and if there are enough people who
-benefit from your feature it could help persuade ruby-core. Although feature
-requests can seem like an alluring way to contribute to Ruby, often these
-discussions can lead nowhere and exhaust time and energy that could be better
-spent fixing bugs. Choose your battles.
-
-A good template for a feature proposal should look something like this:
-
-[Abstract]
- Summary of your feature
-[Background]
- Describe current behavior and why it is problem. Related work, such as
- solutions in other language helps us to understand the problem.
-[Proposal]
- Describe your proposal in details
-[Details]
- If it has complicated feature, describe it
-[Usecase]
- How would your feature be used? Who will benefit from it?
-[Discussion]
- Discuss about this proposal. A list of pros and cons will help start
- discussion.
-[Limitation]
- Limitation of your proposal
-[Another alternative proposal]
- If there are alternative proposals, show them.
-[See also]
- Links to the other related resources
-
-=== Slideshow
-
-At the Ruby Developer Meeting in Japan, committers discuss Feature Proposals together in Tokyo. We will judge proposals and then accept, reject, or give feedback for them.
-If you have a stalled proposal, making a slide to submit is good way to get feedback.
-
-Slides should be:
-
-* One-page slide
-* Include a corresponding ticket number
-* MUST include a figure and/or short example code
-* SHOULD have less sentence in natural language (try to write less than 140 characters)
-* It is RECOMMENDED to itemize: motivation/use case, proposal, pros/cons, corner case
-* PDF or Image (Web browsers can show it)
-
-Please note:
-
-* Even if the proposal is generally acceptable, it won't be accepted without writing corner cases in the ticket
-* Slide's example: DevelopersMeeting20130727Japan
-
-== Backport Requests
-
-When a new version of Ruby is released, it starts at patch level 0 (p0), and
-bugs will be fixed first on the master branch. If it's determined that a bug
-exists in a previous version of Ruby that is still in the bug fix stage of
-maintenance, then a patch will be backported. After the maintenance stage of a
-particular Ruby version ends, it goes into "security fix only" mode which
-means only security related vulnerabilities will be backported. Versions in
-End-of-life (EOL) will not receive any updates and it is recommended you
-upgrade as soon as possible.
-
-If a major security issue is found or after a certain amount of time since the
-last patch level release, a new patch-level release will be made.
-
-When submitting a backport request please confirm the bug has been fixed in
-newer versions and exists in maintenance mode versions. There is a backport
-tracker for each major version still in maintenance where you can request a
-particular revision merged in the affected version of Ruby.
-
-Each major version of Ruby has a release manager that should be assigned to
-handle backport requests. You can find the list of release managers on the
-{wiki}[https://bugs.ruby-lang.org/projects/ruby/wiki/ReleaseEngineering].
-
-=== Branches
-
-Status and maintainers of branches are listed on the
-{wiki}[https://bugs.ruby-lang.org/projects/ruby/wiki/ReleaseEngineering].
-
-== Running tests
-
-In order to help resolve existing issues and contributing patches to Ruby you
-need to be able to run the test suite.
-
-CRuby uses git for source control, the {git homepage}[https://git-scm.com/]
-has installation instructions with links to documentation for learning more
-about git. There is a mirror of the repository on {github}[https://github.com/ruby/ruby].
-For other resources see the {ruby-core documentation on
-ruby-lang.org}[https://www.ruby-lang.org/en/community/ruby-core/].
-
-Install the prerequisite dependencies for building the CRuby interpreter to
-run tests.
-
-* C compiler
-* autoconf - 2.67 or later, preferably 2.69.
-* bison - 2.0 or later, preferably 3.4.
-* gperf - 3.0.3 or later, preferably 3.1.
-* ruby - Ruby itself is prerequisite in order to build Ruby from source. It
- can be 1.8.
-
-You should also have access to development headers for the following
-libraries, but these are not required:
-
-* NDBM/QDBM
-* GDBM
-* OpenSSL/LibreSSL
-* readline/editline(libedit)
-* zlib
-* libffi
-* libyaml
-* libexecinfo (FreeBSD)
-
-Now let's build CRuby:
-
-* Checkout the CRuby source code:
-
- git clone https://github.com/ruby/ruby.git ruby-master
-
-* Generate the configuration files and build:
-
- cd ruby-master
- autoconf
- mkdir build && cd build # its good practice to build outside of source dir
- mkdir ~/.rubies # we will install to .rubies/ruby-master in our home dir
- ../configure --prefix="${HOME}/.rubies/ruby-master"
- make up && make install
-
-After adding Ruby to your PATH, you should be ready to run the test suite:
-
- make test
-
-You can also use +test-all+ to run all of the tests with the RUNRUBY
-interpreter just built. Use TESTS or RUNRUBYOPT to pass parameters, such as:
-
- make test-all TESTS=-v
-
-This is also how you can run a specific test from our build dir:
-
- make test-all TESTS=drb/test_drb.rb
-
-You can run +test+ and +test-all+ at once by +check+ .
-
- make check
-
-For older versions of Ruby you will need to run the build setup again after
-checking out the associated branch in git, for example if you wanted to
-checkout 1.9.3:
-
- git clone https://github.com/ruby/ruby.git --branch ruby_1_9_3
-
-Once you checked out the source code, you can update the local copy by:
-
- make up
-
-Or, update, build, install and check, by just:
-
- make love
-
-== Contributing Documentation
-
-If you're interested in contributing documentation directly to CRuby there is
-some information available at
-{Contributing}[https://github.com/ruby/ruby#contributing].
-
-There is also the {Ruby Reference
-Manual}[https://github.com/rurema/doctree/wiki] in Japanese.
-
-== Contributing A Patch
-
-=== Deciding what to patch
-
-Before you submit a patch, there are a few things you should know:
-
-* Pay attention to the maintenance policy for stable and maintained versions of Ruby.
-* Released versions in security mode will not merge feature changes.
-* Search for previous discussions on ruby-core to verify the maintenance policy
-* Patches must be distributed under Ruby's license.
-* This license may change in the future, you must join the discussion if you don't agree to the change
-
-To improve the chance your patch will be accepted please follow these simple rules:
-
-* Bug fixes should be committed on master first
-* Format of the patch file must be a unified diff (ie: diff -pu, svn diff, or git diff)
-* Don't introduce cosmetic changes
-* Follow the original coding style of the code
-* Don't mix different changes in one commit
-
-First thing you should do is check out the code if you haven't already:
-
- git clone https://github.com/ruby/ruby.git ruby-master
-
-Now create a dedicated branch:
-
- cd ruby-master
- git checkout -b my_new_branch
-
-The name of your branch doesn't really matter because it will only exist on
-your local computer and won't be part of the official Ruby repository. It will
-be used to create patches based on the differences between your branch and
-master, or edge Ruby.
-
-=== Coding style
-
-Here are some general rules to follow when writing Ruby and C code for CRuby:
-
-* Indent 4 spaces for C without tabs (old codes might use tabs for eight-space indentation,
- but newer codes recommend to use spaces only)
-* Indent 2 space tabs for Ruby
-* Do not use TABs in ruby codes
-* ANSI C style for 1.9+ for function declarations
-* Follow C90 (not C99) Standard
-* PascalStyle for class/module names.
-* UNDERSCORE_SEPARATED_UPPER_CASE for other constants.
-* Capitalize words.
-* ABBRs should be all upper case.
-* Do as others do
-
-=== Commit messages
-
-When you're ready to commit:
-
- git commit path/to/files
-
-This will open your editor in which you write your commit message.
-Use the following style for commit messages:
-
-* Use a succinct subject line.
-* Include reasoning behind the change in the commit message, focusing on why
- the change is being made.
-* Refer to redmine issue (such as Fixes [Bug #1234] or Implements
- [Feature #3456]), or discussion on the mailing list
- (such as [ruby-core:12345]).
-* For GitHub issues, use [GH-#] (such as [Fixes GH-234]).
-* Follow the style used by other committers.
-
-=== Contributing your code
-
-Now that you've got some code you want to contribute, let's get set up to
-generate a patch. Start by forking the github mirror, check the {github docs on
-forking}[https://help.github.com/articles/fork-a-repo] if you get stuck here.
-You will only need a github account if you intend to host your repository
-on github.
-
-Next copy the writable url for your fork and add it as a git remote, replace
-"my_username" with your github account name:
-
- git remote add my_fork git@github.com:my_username/ruby.git
- # Now we can push our branch to our fork
- git push my_fork my_new_branch
-
-In order to generate a patch that you can upload to the bug tracker, we can use
-the github interface to review our changes just visit
-https://github.com/my_username/ruby/compare/master...my_new_branch
-
-Next, you can simply add '.patch' to the end of this URL and it will generate
-the patch for you, save the file to your computer and upload it to the bug
-tracker. Alternatively you can submit a pull request, but for the best chances
-to receive feedback add it is recommended you add it to redmine.
-
-Since git is a distributed system, you are welcome to host your git repository
-on any {publicly accessible hosting
-site}[https://git.wiki.kernel.org/index.php/GitHosting], including {hosting your
-own}[https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#public-repositories]
-You may use the {'git format-patch'}[https://git-scm.com/docs/git-format-patch]
-command to generate patch files to upload to redmine. You may also use
-the {'git request-pull'}[https://git-scm.com/docs/git-request-pull] command for
-formatting pull request messages to redmine.
-
-=== Updating the official repository
-
-If you are a committer, you can push changes directly into the official
-repository:
-
- git push origin your-branch-name:master
-
-However, it is likely will have become outdated, and you will have to
-update it. In that case, run:
-
- git fetch origin
- git rebase remotes/origin/master
-
-and then try pushing your changes again.
diff --git a/doc/contributing/building_ruby.md b/doc/contributing/building_ruby.md
new file mode 100644
index 0000000000..469c9d8361
--- /dev/null
+++ b/doc/contributing/building_ruby.md
@@ -0,0 +1,172 @@
+# Building Ruby
+
+## Quick start guide
+
+1. Install the prerequisite dependencies for building the CRuby interpreter:
+
+ * C compiler
+ * autoconf - 2.67 or later
+ * bison - 3.0 or later
+ * gperf - 3.0.3 or later
+ * ruby - 2.7 or later
+
+2. Install optional, recommended dependencies:
+
+ * OpenSSL/LibreSSL
+ * readline/editline (libedit)
+ * zlib
+ * libffi
+ * libyaml
+ * libexecinfo (FreeBSD)
+ * rustc - 1.58.0 or later (if you wish to build [YJIT](/doc/yjit/yjit.md))
+
+3. Checkout the CRuby source code:
+
+ ```
+ git clone https://github.com/ruby/ruby.git
+ ```
+
+4. Generate the configure file:
+
+ ```
+ ./autogen.sh
+ ```
+
+5. Create a `build` directory outside of the source directory:
+
+ ```
+ mkdir build && cd build
+ ```
+
+ While it's not necessary to build in a separate directory, it's good practice to do so.
+
+6. We'll install Ruby in `~/.rubies/ruby-master`, so create the directory:
+
+ ```
+ mkdir ~/.rubies
+ ```
+
+7. Run configure:
+
+ ```
+ ../configure --prefix="${HOME}/.rubies/ruby-master"
+ ```
+
+ - If you are frequently building Ruby, add the `--disable-install-doc` flag to not build documentation which will speed up the build process.
+
+8. Build Ruby:
+
+ ```
+ make install
+ ```
+
+ - If you're on macOS and installed \OpenSSL through Homebrew, you may encounter failure to build \OpenSSL that look like this:
+
+ ```
+ openssl:
+ Could not be configured. It will not be installed.
+ ruby/ext/openssl/extconf.rb: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed.
+ Check ext/openssl/mkmf.log for more details.
+ ```
+
+ Adding `--with-openssl-dir=$(brew --prefix openssl)` to the list of options passed to configure may solve the issue.
+
+ Remember to delete your `build` directory and start again from the configure step.
+
+9. [Run tests](testing_ruby.md) to confirm your build succeeded.
+
+### Unexplainable Build Errors
+
+If you are having unexplainable build errors, after saving all your work, try running `git clean -xfd` in the source root to remove all git ignored local files. If you are working from a source directory that's been updated several times, you may have temporary build artifacts from previous releases which can cause build failures.
+
+## More details
+
+If you're interested in continuing development on Ruby, here are more details
+about Ruby's build to help out.
+
+### Running make scripts in parallel
+
+In GNU make and BSD make implementations, to run a specific make script in parallel, pass the flag `-j<number of processes>`. For instance,
+to run tests on 8 processes, use:
+
+```
+make test-all -j8
+```
+
+We can also set `MAKEFLAGS` to run _all_ `make` commands in parallel.
+
+Having the right `--jobs` flag will ensure all processors are utilized when building software projects. To do this effectively, you can set `MAKEFLAGS` in your shell configuration/profile:
+
+``` shell
+# On macOS with Fish shell:
+export MAKEFLAGS="--jobs "(sysctl -n hw.ncpu)
+
+# On macOS with Bash/ZSH shell:
+export MAKEFLAGS="--jobs $(sysctl -n hw.ncpu)"
+
+# On Linux with Fish shell:
+export MAKEFLAGS="--jobs "(nproc)
+
+# On Linux with Bash/ZSH shell:
+export MAKEFLAGS="--jobs $(nproc)"
+```
+
+### Miniruby vs Ruby
+
+Miniruby is a version of Ruby which has no external dependencies and lacks certain features.
+It can be useful in Ruby development because it allows for faster build times. Miniruby is
+built before Ruby. A functional Miniruby is required to build Ruby. To build Miniruby:
+
+```
+make miniruby
+```
+
+## Debugging
+
+You can use either lldb or gdb for debugging. Before debugging, you need to create a `test.rb`
+with the Ruby script you'd like to run. You can use the following make targets:
+
+* `make run`: Runs `test.rb` using Miniruby
+* `make lldb`: Runs `test.rb` using Miniruby in lldb
+* `make gdb`: Runs `test.rb` using Miniruby in gdb
+* `make runruby`: Runs `test.rb` using Ruby
+* `make lldb-ruby`: Runs `test.rb` using Ruby in lldb
+* `make gdb-ruby`: Runs `test.rb` using Ruby in gdb
+
+### Building with Address Sanitizer
+
+Using the address sanitizer is a great way to detect memory issues.
+
+``` shell
+./autogen.sh
+mkdir build && cd build
+export ASAN_OPTIONS="halt_on_error=0:use_sigaltstack=0:detect_leaks=0"
+../configure cppflags="-fsanitize=address -fno-omit-frame-pointer" optflags=-O0 LDFLAGS="-fsanitize=address -fno-omit-frame-pointer"
+make
+```
+
+On Linux it is important to specify `-O0` when debugging. This is especially true for ASAN which sometimes works incorrectly at higher optimisation levels.
+
+## How to measure coverage of C and Ruby code
+
+You need to be able to use gcc (gcov) and lcov visualizer.
+
+```
+./autogen.sh
+./configure --enable-gcov
+make
+make update-coverage
+rm -f test-coverage.dat
+make test-all COVERAGE=true
+make lcov
+open lcov-out/index.html
+```
+
+If you need only C code coverage, you can remove `COVERAGE=true` from the above process.
+You can also use `gcov` command directly to get per-file coverage.
+
+If you need only Ruby code coverage, you can remove `--enable-gcov`.
+Note that `test-coverage.dat` accumulates all runs of `make test-all`.
+Make sure that you remove the file if you want to measure one test run.
+
+You can see the coverage result of CI: https://rubyci.org/coverage
diff --git a/doc/contributing/documentation_guide.md b/doc/contributing/documentation_guide.md
new file mode 100644
index 0000000000..9cfd59d629
--- /dev/null
+++ b/doc/contributing/documentation_guide.md
@@ -0,0 +1,435 @@
+# Documentation Guide
+
+This guide discusses recommendations for documenting
+classes, modules, and methods
+in the Ruby core and in the Ruby standard library.
+
+## Generating documentation
+
+Most Ruby documentation lives in the source files and is written in
+[RDoc format](rdoc-ref:RDoc::Markup).
+
+Some pages live under the `doc` folder and can be written in either
+`.rdoc` or `.md` format, determined by the file extension.
+
+To generate the output of documentation changes in HTML in the
+`{build folder}/.ext/html` directory, run the following inside your
+build directory:
+
+```sh
+make html
+```
+
+Then you can preview your changes by opening
+`{build folder}/.ext/html/index.html` file in your browser.
+
+
+## Goal
+
+The goal of Ruby documentation is to impart the most important
+and relevant in the shortest time.
+The reader should be able to quickly understand the usefulness
+of the subject code and how to use it.
+
+Providing too little information is bad, but providing unimportant
+information or unnecessary examples is not good either.
+Use your judgment about what the user needs to know.
+
+## General Guidelines
+
+- Keep in mind that the reader may not be fluent in \English.
+- Write short declarative or imperative sentences.
+- Group sentences into (ideally short) paragraphs,
+ each covering a single topic.
+- Organize material with [headers](rdoc-ref:RDoc::Markup@Headers).
+- Refer to authoritative and relevant sources using
+ [links](rdoc-ref:RDoc::Markup@Links).
+- Use simple verb tenses: simple present, simple past, simple future.
+- Use simple sentence structure, not compound or complex structure.
+- Avoid:
+ - Excessive comma-separated phrases;
+ consider a [list](rdoc-ref:RDoc::Markup@Simple+Lists).
+ - Idioms and culture-specific references.
+ - Overuse of headers.
+ - Using US-ASCII-incompatible characters in C source files;
+ see [Characters](#label-Characters) below.
+
+### Characters
+
+Use only US-ASCII-compatible characters in a C source file.
+(If you use other characters, the Ruby CI will gently let you know.)
+
+If want to put ASCII-incompatible characters into the documentation
+for a C-coded class, module, or method, there are workarounds
+involving new files `doc/*.rdoc`:
+
+- For class `Foo` (defined in file `foo.c`),
+ create file `doc/foo.rdoc`, declare `class Foo; end`,
+ and place the class documentation above that declaration:
+
+ ```ruby
+ # Documentation for class Foo goes here.
+ class Foo; end
+ ```
+
+- Similarly, for module `Bar` (defined in file `bar.c`,
+ create file `doc/bar.rdoc`, declare `module Bar; end`,
+ and place the module documentation above that declaration:
+
+ ```ruby
+ # Documentation for module Bar goes here.
+ module Bar; end
+ ```
+
+- For a method, things are different.
+ Documenting a method as above disables the "click to toggle source" feature
+ in the rendered documentation.
+
+ Therefore it's best to use file inclusion:
+
+ - Retain the `call-seq` in the C code.
+ - Use file inclusion (`:include:`) to include text from an .rdoc file.
+
+ Example:
+
+ ```
+ /*
+ * call-seq:
+ * each_byte {|byte| ... } -> self
+ * each_byte -> enumerator
+ *
+ * :include: doc/string/each_byte.rdoc
+ *
+ */
+ ```
+
+### \RDoc
+
+Ruby is documented using RDoc.
+For information on \RDoc syntax and features, see the
+[RDoc Markup Reference](rdoc-ref:RDoc::Markup@RDoc+Markup+Reference).
+
+### Output from `irb`
+
+For code examples, consider using interactive Ruby,
+[irb](https://ruby-doc.org/stdlib/libdoc/irb/rdoc/IRB.html).
+
+For a code example that includes `irb` output,
+consider aligning `# => ...` in successive lines.
+Alignment may sometimes aid readability:
+
+```ruby
+a = [1, 2, 3] #=> [1, 2, 3]
+a.shuffle! #=> [2, 3, 1]
+a #=> [2, 3, 1]
+```
+
+### Headers
+
+Organize a long discussion with [headers](rdoc-ref:RDoc::Markup@Headers).
+
+### Blank Lines
+
+A blank line begins a new paragraph.
+
+A [code block](rdoc-ref:RDoc::Markup@Paragraphs+and+Verbatim)
+or [list](rdoc-ref:RDoc::Markup@Simple+Lists)
+should be preceded by and followed by a blank line.
+This is unnecessary for the HTML output, but helps in the `ri` output.
+
+### \Method Names
+
+For a method name in text:
+
+- For a method in the current class or module,
+ use a double-colon for a singleton method,
+ or a hash mark for an instance method:
+ <tt>::bar</tt>, <tt>#baz</tt>.
+- Otherwise, include the class or module name
+ and use a dot for a singleton method,
+ or a hash mark for an instance method:
+ <tt>Foo.bar</tt>, <tt>Foo#baz</tt>.
+
+### Auto-Linking
+
+In general, \RDoc's auto-linking should not be suppressed.
+For example, we should write `Array`, not `\Array`.
+
+We might consider whether to suppress when:
+
+- The word in question does not refer to a Ruby entity
+ (e.g., some uses of _Class_ or _English_).
+- The reference is to the current class document
+ (e.g., _Array_ in the documentation for class `Array`).
+- The same reference is repeated many times
+ (e.g., _RDoc_ on this page).
+
+### HTML Tags
+
+In general, avoid using HTML tags (even in formats where it's allowed)
+because `ri` (the Ruby Interactive reference tool)
+may not render them properly.
+
+### Tables
+
+In particular, avoid building tables with HTML tags
+(<tt><table></tt>, etc.).
+
+Alternatives are:
+
+- The GFM (GitHub Flavored Markdown) table extension,
+ which is enabled by default. See
+ {GFM tables extension}[https://github.github.com/gfm/#tables-extension-].
+
+- A {verbatim text block}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks],
+ using spaces and punctuation to format the text.
+ Note that {text markup}[rdoc-ref:RDoc::MarkupReference@Text+Markup]
+ will not be honored.
+
+## Documenting Classes and Modules
+
+The general structure of the class or module documentation should be:
+
+- Synopsis
+- Common uses, with examples
+- "What's Here" summary (optional)
+
+### Synopsis
+
+The synopsis is a short description of what the class or module does
+and why the reader might want to use it.
+Avoid details in the synopsis.
+
+### Common Uses
+
+Show common uses of the class or module.
+Depending on the class or module, this section may vary greatly
+in both length and complexity.
+
+### What's Here Summary
+
+The documentation for a class or module may include a "What's Here" section.
+
+Guidelines:
+
+- The section title is `What's Here`.
+- Consider listing the parent class and any included modules; consider
+ [links](rdoc-ref:RDoc::Markup@Links)
+ to their "What's Here" sections if those exist.
+- List methods as a bullet list:
+
+ - Begin each item with the method name, followed by a colon
+ and a short description.
+ - If the method has aliases, mention them in parentheses before the colon
+ (and do not list the aliases separately).
+ - Check the rendered documentation to determine whether \RDoc has recognized
+ the method and linked to it; if not, manually insert a
+ [link](rdoc-ref:RDoc::Markup@Links).
+
+- If there are numerous entries, consider grouping them into subsections with headers.
+- If there are more than a few such subsections,
+ consider adding a table of contents just below the main section title.
+
+## Documenting Methods
+
+### General Structure
+
+The general structure of the method documentation should be:
+
+- Calling sequence (for methods written in C).
+- Synopsis (short description).
+- Details and examples.
+- Argument description (if necessary).
+- Corner cases and exceptions.
+- Aliases.
+- Related methods (optional).
+
+### Calling Sequence (for methods written in C)
+
+For methods written in Ruby, \RDoc documents the calling sequence automatically.
+
+For methods written in C, \RDoc cannot determine what arguments
+the method accepts, so those need to be documented using \RDoc directive
+[`call-seq:`](rdoc-ref:RDoc::Markup@Method+arguments).
+
+For a singleton method, use the form:
+
+```
+class_name.method_name(method_args) {|block_args| ... } -> return_type
+```
+
+Example:
+
+```
+* call-seq:
+* Hash.new(default_value = nil) -> new_hash
+* Hash.new {|hash, key| ... } -> new_hash
+```
+
+For an instance method, use the form
+(omitting any prefix, just as RDoc does for a Ruby-coded method):
+
+```
+method_name(method_args) {|block_args| ... } -> return_type
+```
+For example, in Array, use:
+
+```
+* call-seq:
+* count -> integer
+* count(obj) -> integer
+* count {|element| ... } -> integer
+```
+
+```
+* call-seq:
+* <=> other -> -1, 0, 1, or nil
+```
+
+Arguments:
+
+- If the method does not accept arguments, omit the parentheses.
+- If the method accepts optional arguments:
+
+ - Separate each argument name and its default value with ` = `
+ (equal-sign with surrounding spaces).
+ - If the method has the same behavior with either an omitted
+ or an explicit argument, use a `call-seq` with optional arguments.
+ For example, use:
+
+ ```
+ respond_to?(symbol, include_all = false) -> true or false
+ ```
+
+ - If the behavior is different with an omitted or an explicit argument,
+ use a `call-seq` with separate lines.
+ For example, in Enumerable, use:
+
+ ```
+ * max -> element
+ * max(n) -> array
+ ```
+
+Block:
+
+- If the method does not accept a block, omit the block.
+- If the method accepts a block, the `call-seq` should have `{|args| ... }`,
+ not `{|args| block }` or `{|args| code }`.
+
+Return types:
+
+- If the method can return multiple different types,
+ separate the types with "or" and, if necessary, commas.
+- If the method can return multiple types, use +object+.
+- If the method returns the receiver, use +self+.
+- If the method returns an object of the same class,
+ prefix `new_` if an only if the object is not +self+;
+ example: `new_array`.
+
+Aliases:
+
+- Omit aliases from the `call-seq`, but mention them near the end (see below).
+
+### Synopsis
+
+The synopsis comes next, and is a short description of what the
+method does and why you would want to use it. Ideally, this
+is a single sentence, but for more complex methods it may require
+an entire paragraph.
+
+For `Array#count`, the synopsis is:
+
+```
+Returns a count of specified elements.
+```
+
+This is great as it is short and descriptive. Avoid documenting
+too much in the synopsis, stick to the most important information
+for the benefit of the reader.
+
+### Details and Examples
+
+Most non-trivial methods benefit from examples, as well as details
+beyond what is given in the synopsis. In the details and examples
+section, you can document how the method handles different types
+of arguments, and provides examples on proper usage. In this
+section, focus on how to use the method properly, not on how the
+method handles improper arguments or corner cases.
+
+Not every behavior of a method requires an example. If the method
+is documented to return `self`, you don't need to provide an example
+showing the return value is the same as the receiver. If the method
+is documented to return `nil`, you don't need to provide an example
+showing that it returns `nil`. If the details mention that for a
+certain argument type, an empty array is returned, you don't need
+to provide an example for that.
+
+Only add an example if it provides the user additional information,
+do not add an example if it provides the same information given
+in the synopsis or details. The purpose of examples is not to prove
+what the details are stating.
+
+### Argument Description (if necessary)
+
+For methods that require arguments, if not obvious and not explicitly
+mentioned in the details or implicitly shown in the examples, you can
+provide details about the types of arguments supported. When discussing
+the types of arguments, use simple language even if less-precise, such
+as "level must be an integer", not "level must be an Integer-convertible
+object". The vast majority of use will be with the expected type, not an
+argument that is explicitly convertible to the expected type, and
+documenting the difference is not important.
+
+For methods that take blocks, it can be useful to document the type of
+argument passed if it is not obvious, not explicitly mentioned in the
+details, and not implicitly shown in the examples.
+
+If there is more than one argument or block argument, use a
+[labeled list](rdoc-ref:RDoc::Markup@Labeled+Lists).
+
+### Corner Cases and Exceptions
+
+For corner cases of methods, such as atypical usage, briefly mention
+the behavior, but do not provide any examples.
+
+Only document exceptions raised if they are not obvious. For example,
+if you have stated earlier than an argument type must be an integer,
+you do not need to document that a `TypeError` is raised if a non-integer
+is passed. Do not provide examples of exceptions being raised unless
+that is a common case, such as `Hash#fetch` raising a `KeyError`.
+
+### Aliases
+
+Mention aliases in the form
+
+```
+// Array#find_index is an alias for Array#index.
+```
+
+### Related Methods (optional)
+
+In some cases, it is useful to document which methods are related to
+the current method. For example, documentation for `Hash#[]` might
+mention `Hash#fetch` as a related method, and `Hash#merge` might mention
+`Hash#merge!` as a related method.
+
+- Consider which methods may be related
+ to the current method, and if you think the reader would benefit it,
+ at the end of the method documentation, add a line starting with
+ "Related: " (e.g. "Related: #fetch.").
+- Don't list more than three related methods.
+ If you think more than three methods are related,
+ list the three you think are most important.
+- Consider adding:
+
+ - A phrase suggesting how the related method is similar to,
+ or different from,the current method.
+ See an example at Time#getutc.
+ - Example code that illustrates the similarities and differences.
+ See examples at Time#ctime, Time#inspect, Time#to_s.
+
+### Methods Accepting Multiple Argument Types
+
+For methods that accept multiple argument types, in some cases it can
+be useful to document the different argument types separately. It's
+best to use a separate paragraph for each case you are discussing.
diff --git a/doc/contributing/making_changes_to_ruby.md b/doc/contributing/making_changes_to_ruby.md
new file mode 100644
index 0000000000..260fadb7e3
--- /dev/null
+++ b/doc/contributing/making_changes_to_ruby.md
@@ -0,0 +1,28 @@
+# Contributing a pull request
+
+## Code style
+
+Here are some general rules to follow when writing Ruby and C code for CRuby:
+
+* Do not change code unrelated to your pull request (including style fixes)
+* Indent 4 spaces for C without tabs (tabs are two levels of indentation, equivalent to 8 spaces)
+* Indent 2 spaces for Ruby without tabs
+* ANSI C style for function declarations
+* Follow C99 Standard
+* PascalStyle for class/module names
+* UNDERSCORE_SEPARATED_UPPER_CASE for other constants
+* Abbreviations should be all upper case
+
+## Commit messages
+
+Use the following style for commit messages:
+
+* Use a succinct subject line
+* Include reasoning behind the change in the commit message, focusing on why the change is being made
+* Refer to issue (such as `Fixes [Bug #1234]` or `Implements [Feature #3456]`), or discussion on the mailing list (such as [ruby-core:12345])
+
+## CI
+
+GitHub actions will run on each pull request.
+
+There is [a CI that runs on master](https://rubyci.org/). It has broad coverage of different systems and architectures, such as Solaris SPARC and macOS.
diff --git a/doc/contributing/making_changes_to_stdlibs.md b/doc/contributing/making_changes_to_stdlibs.md
new file mode 100644
index 0000000000..ef3811ea12
--- /dev/null
+++ b/doc/contributing/making_changes_to_stdlibs.md
@@ -0,0 +1,49 @@
+# Making Changes To Standard Libraries
+
+Everything in the [lib](https://github.com/ruby/ruby/tree/master/lib) directory is mirrored from a standalone repository into the Ruby repository.
+If you'd like to make contributions to standard libraries, do so in the standalone repositories, and the
+changes will be automatically mirrored into the Ruby repository.
+
+For example, CSV lives in [a separate repository](https://github.com/ruby/csv) and is mirrored into [Ruby](https://github.com/ruby/ruby/tree/master/lib/csv).
+
+## Maintainers
+
+You can find the list of maintainers [here](https://docs.ruby-lang.org/en/master/maintainers_rdoc.html#label-Maintainers).
+
+## Build
+
+First, install its dependencies using:
+
+```
+bundle install
+```
+
+### Libraries with C-extension
+
+If the library has a `/ext` directory, it has C files that you need to compile with:
+
+```
+bundle exec rake compile
+```
+
+## Running tests
+
+All standard libraries use [test-unit](https://github.com/test-unit/test-unit) as the test framework.
+
+To run all tests:
+
+```
+bundle exec rake test
+```
+
+To run a single test file:
+
+```
+bundle exec rake test TEST="test/test_foo.rb"
+```
+
+To run a single test case:
+
+```
+bundle exec rake test TEST="test/test_foo.rb" TESTOPS="--name=/test_mytest/"
+```
diff --git a/doc/contributing/reporting_issues.md b/doc/contributing/reporting_issues.md
new file mode 100644
index 0000000000..25516ffc6b
--- /dev/null
+++ b/doc/contributing/reporting_issues.md
@@ -0,0 +1,91 @@
+# Reporting Issues
+## Reporting security issues
+
+If you've found a security vulnerability, please follow
+[these instructions](https://www.ruby-lang.org/en/security/).
+
+## Reporting bugs
+
+If you've encountered a bug in Ruby, please report it to the Redmine issue
+tracker available at [bugs.ruby-lang.org](https://bugs.ruby-lang.org/), by
+following these steps:
+
+* Check if anyone has already reported your issue by
+ searching [the Redmine issue tracker](https://bugs.ruby-lang.org/projects/ruby-master/issues).
+* If you haven't already,
+ [sign up for an account](https://bugs.ruby-lang.org/account/register) on the
+ Redmine issue tracker.
+* If you can't find a ticket addressing your issue, please [create a new issue](https://bugs.ruby-lang.org/projects/ruby-master/issues/new). You will need to fill in the subject, description and Ruby version.
+
+ * Ensure the issue exists on Ruby master by trying to replicate your bug on
+ the head of master (see ["making changes to Ruby"](making_changes_to_ruby.md)).
+ * Write a concise subject and briefly describe your problem in the description section. If
+ your issue affects [a released version of Ruby](#label-Backport+requests), please say so.
+ * Fill in the Ruby version you're using when experiencing this issue
+ (the output of running `ruby -v`).
+ * Attach any logs or reproducible programs to provide additional information.
+ Any scripts should be as small as possible.
+* If the ticket doesn't have any replies after 10 days, you can send a
+ reminder.
+* Please reply to feedback requests. If a bug report doesn't get any feedback,
+ it'll eventually get rejected.
+
+### Reporting website issues
+
+If you're having an issue with the bug tracker or the mailing list, you can
+contact the webmaster, Hiroshi SHIBATA (hsbt@ruby-lang.org).
+
+You can report issues with ruby-lang.org on the
+[repo's issue tracker](https://github.com/ruby/www.ruby-lang.org/issues).
+
+## Requesting features
+
+If there's a new feature that you want to see added to Ruby, you will need to
+write a proposal on [the Redmine issue tracker](https://bugs.ruby-lang.org/projects/ruby-master/issues/new).
+When you open the issue, select `Feature` in the Tracker dropdown.
+
+When writing a proposal, be sure to check for previous discussions on the
+topic and have a solid use case. You should also consider the potential
+compatibility issues that this new feature might raise. Consider making
+your feature into a gem, and if there are enough people who benefit from
+your feature it could help persuade Ruby core.
+
+Here is a template you can use for a feature proposal:
+
+```
+[Abstract]
+ Briefly summarize your feature
+[Background]
+ Describe current behavior
+[Proposal]
+ Describe your feature in detail
+[Use cases]
+ Give specific example uses of your feature
+[Discussion]
+ Describe why this feature is necessary and better than using existing features
+[See also]
+ Link to other related resources (such as implementations in other languages)
+```
+
+## Backport requests
+
+If a bug exists in a released version of Ruby, please report this in the issue.
+Once this bug is fixed, the fix can be backported if deemed necessary. Only Ruby
+committers can request backporting, and backporting is done by the backport manager.
+New patch versions are released at the discretion of the backport manager.
+
+[Ruby versions](https://www.ruby-lang.org/en/downloads/) can be in one of three maintenance states:
+
+* Stable releases: backport any bug fixes
+* Security maintenance: only backport security fixes
+* End of life: no backports, please upgrade your Ruby version
+
+## Add context to existing issues
+
+There are several ways you can help with a bug that aren't directly
+resolving it. These include:
+
+* Verifying or reproducing the existing issue and reporting it
+* Adding more specific reproduction instructions
+* Contributing a failing test as a patch (see ["making changes to Ruby"](making_changes_to_ruby.md))
+* Testing patches that others have submitted (see ["making changes to Ruby"](making_changes_to_ruby.md))
diff --git a/doc/contributing/testing_ruby.md b/doc/contributing/testing_ruby.md
new file mode 100644
index 0000000000..6247686efc
--- /dev/null
+++ b/doc/contributing/testing_ruby.md
@@ -0,0 +1,138 @@
+# Testing Ruby
+
+## Test suites
+
+There are several test suites in the Ruby codebase:
+
+We can run any of the make scripts [in parallel](building_ruby.md#label-Running+make+scripts+in+parallel) to speed them up.
+
+1. [bootstraptest/](https://github.com/ruby/ruby/tree/master/bootstraptest)
+
+ This is a small test suite that runs on Miniruby (see [building Ruby](building_ruby.md#label-Miniruby+vs+Ruby)). We can run it with:
+
+ ```
+ make btest
+ ```
+
+ To run it with logs, we can use:
+
+ ```
+ make btest OPTS=-v
+ ```
+
+ To run individual bootstrap tests, we can either specify a list of filenames or use the `--sets` flag in the variable `BTESTS`:
+
+ ```
+ make btest BTESTS="bootstraptest/test_fork.rb bootstraptest/tes_gc.rb"
+ make btest BTESTS="--sets=fork,gc"
+ ```
+
+ If we want to run the bootstrap test suite on Ruby (not Miniruby), we can use:
+
+ ```
+ make test
+ ```
+
+ To run it with logs, we can use:
+
+ ```
+ make test OPTS=-v
+ ```
+
+ To run a file or directory with GNU make, we can use:
+
+ ```
+ make test/ruby/test_foo.rb
+ make test/ruby/test_foo.rb TESTOPTS="-n /test_bar/"
+ ```
+
+2. [test/](https://github.com/ruby/ruby/tree/master/test)
+
+ This is a more comprehensive test suite that runs on Ruby. We can run it with:
+
+ ```
+ make test-all
+ ```
+
+ We can run a specific test directory in this suite using the `TESTS` option, for example:
+
+ ```
+ make test-all TESTS=test/rubygems
+ ```
+
+ We can run a specific test file in this suite by also using the `TESTS` option, for example:
+
+ ```
+ make test-all TESTS=test/ruby/test_array.rb
+ ```
+
+ We can run a specific test in this suite using the `TESTS` option, specifying
+ first the file name, and then the test name, prefixed with `--name`. For example:
+
+ ```
+ make test-all TESTS="../test/ruby/test_alias.rb --name=/test_alias_with_zsuper_method/"
+ ```
+
+ To run these specs with logs, we can use:
+
+ ```
+ make test-all TESTS=-v
+ ```
+
+ If we would like to run both the `test/` and `bootstraptest/` test suites, we can run
+
+ ```
+ make check
+ ```
+
+3. [spec/ruby](https://github.com/ruby/ruby/tree/master/spec/ruby)
+
+ This is a test suite that exists in [the Ruby spec repository](https://github.com/ruby/spec) and is mirrored into the `spec/ruby` directory in the Ruby repository. It tests the behavior of the Ruby programming language. We can run this using:
+
+ ```
+ make test-spec
+ ```
+
+ To run a specific directory, we can use `MSPECOPT` to specify the directory:
+
+ ```
+ make test-spec MSPECOPT=spec/ruby/core/array
+ ```
+
+ To run a specific file, we can also use `MSPECOPT` to specify the file:
+
+ ```
+ make test-spec MSPECOPT=spec/ruby/core/array/any_spec.rb
+ ```
+
+ To run a specific test, we can use the `--example` flag to match against the test name:
+
+ ```
+ make test-spec MSPECOPT="../spec/ruby/core/array/any_spec.rb --example='is false if the array is empty'"
+ ```
+
+ To run these specs with logs, we can use:
+
+ ```
+ make test-spec MSPECOPT=-Vfs
+ ```
+
+ To run a ruby-spec file or directory with GNU make, we can use
+
+ ```
+ make spec/ruby/core/foo/bar_spec.rb
+ ```
+
+4. [spec/bundler](https://github.com/ruby/ruby/tree/master/spec/bundler)
+
+ The bundler test suite exists in [the RubyGems repository](https://github.com/rubygems/rubygems/tree/master/bundler/spec) and is mirrored into the `spec/bundler` directory in the Ruby repository. We can run this using:
+
+ ```
+ make test-bundler
+ ```
+
+ To run a specific bundler spec file, we can use `BUNDLER_SPECS` as follows:
+
+ ```
+ $ make test-bundler BUNDLER_SPECS=commands/exec_spec.rb
+ ```
diff --git a/doc/contributors.rdoc b/doc/contributors.rdoc
deleted file mode 100644
index 7c3722032b..0000000000
--- a/doc/contributors.rdoc
+++ /dev/null
@@ -1,793 +0,0 @@
-= Contributors to Ruby
-
-The following list might be incomplete. Feel free to add your name if your
-patch was accepted into Ruby.
-
-== A
-
-Ayumu AIZAWA (ayumin)
-* committer
-
-AKIYOSHI, Masamichi (akiyoshi)
-* committer
-* He had maintained the VMS support on 2003-2004.
-
-Muhammad Ali
-* wrote rdoc for Fiber
-
-Minero Aoki (aamine)
-* committer
-* He is the maintainer of:
- * fileutils
- * net/http, net/https
- * net/pop
- * net/smtp
- * racc
- * ripper
- * strscan
-
-Wakou Aoyama (wakou)
-* committer
-* He was the maintainer of some standard libraries.
-
-Koji Arai
-* committer
-
-arton
-* He is the distributor of ActiveScriptRuby and experimental 1.9.0-x installers for win32.
-* Wrote patches for win32ole, gc.c, tmpdir.rb
-
-Sergey Avseyev
-* Added IO#pread and IO#pwrite.
-
-== B
-
-Daniel Berger
-* a patch for irb
-* documentation
-* He wrote forwardable.rb
-
-David Black (dblack)
-* committer
-* He is the maintainer of scanf
-
-Ken Bloom
-* a patch for REXML.
-
-Oliver M. Bolzer
-* a patch for soap
-
-Alexey Borzenkov
-* a patch for mkmf.rb
-
-Evan Brodie
-* a patch for documentation of Float#round
-
-Richard Brown
-* a patch for configure.in
-
-Dirkjan Bussink
-* a patch for date.rb
-
-Daniel Bovensiepen
-* documentation
-* a patch for irb
-
-== C
-
-Brian Candler
-* a patch for configure.in, net/telnet
-
-keith cascio
-* a patch for optparse.rb
-
-Frederick Cheung
-* a patch for test/ruby/test_symbol.rb
-
-Christoph
-* patches for set.rb
-
-Sean Chittenden
-* patches for net/http, cgi
-
-William D. Clinger
-* ruby_strtod is based on his paper.
-
-== D
-
-Ryan Davis (ryan)
-* committer
-* He wrote and is the maintainer of miniunit
-
-Guy Decoux (ts)
-* committer
-
-Zach Dennis
-
-Martin Duerst (duerst)
-* committer
-* M17N
-
-Paul Duncan
-* patches for rdoc
-
-Alexander Dymo
-* a patch for lib/benchmark.rb
-
-== E
-
-Yusuke Endoh (mame)
-* committer
-* He wrote and is the maintainer of base64 library (1.9)
-* did much upon YARV compiler.
-
-erlercw
-* wrote Integer::gcd2
-
-== F
-
-Frank S.Fejes
-* a patch for net/pop
-
-Fundakowski Feldman
-* a patch for process.c
-
-Mauricio Fernandez
-* patches for parse.y
-
-David Flanagan (davidflanagan)
-* committer
-* M17N
-
-Takeyuki Fujioka (xibbar)
-* committer
-* He is the maintainer of cgi/*
-
-FUKUMOTO, Atsushi
-* a patch for tracer.rb
-
-Shota Fukumori (sorah)
-* committer
-* #4415 parallel unit/test
-
-Tadayoshi Funaba (tadf)
-* committer
-* He wrote and is the maintainer of
- * date
- * parsedate (1.8)
-* He ported rational.rb and complex.rb, which 1.8 contains, into rational.c and complex.c of 1.9.
-
-== G
-
-David M. Gay
-* ruby_strtod
-
-Florian Gilcher
-* documentation
-
-GOTOU, Kentaro (gotoken)
-* committer
-* He wrote benchmark.rb
-* He is the maintainer of:
- * benchmark.rb
- * open3
-
-GOTOU, Yuuzou (gotoyuzo)
-* committer
-
-James Edward Gray II (jeg2)
-* committer
-* He wrote the faster implementation of CSV and is the maintainer of csv.
-* Wrote documentation for rdoc
-
-== H
-
-Phil Hagelberg
-* patch for ruby-mode.el's documentation.
-
-Kirk Haines (wyhaines)
-* committer
-* the maintainer of ruby_1_8_6 branch
-
-Shinichiro Hamaji
-* fixed memory leaks (marshal.c, string.c)
-
-Shin-ichiro HARA
-* the developer and the sysop of ruby-{dev,list,core,talk} archive.
-* a patch for numeric.c
-
-Chris Heath (traumdeutung)
-* a patch for proc.c
-
-HIROKAWA Hisashi
-* fixed socket/socket.c
-
-Daniel Hob
-* He wrote:
- * SMTP-TLS support for net/smtp.
- * POP3S support
-
-Eric Hodel (drbrain)
-* committer
-* He is the maintainer of:
- * rdoc
- * ri
- * rubygems
-
-Erik Hollensbe
-* a patch for delegate.rb
-
-Johan Holmberg
-* a patch for dir.c
-* documentation
-
-Erik Huelsmann
-
-Dae San Hwang
-* built a continuous integration environment on OpenSolaris.
-
-== I
-
-Nobuhiro IMAI
-* a patch for logger.rb
-
-"incorporate"
-* a patch for sprintf.c
-
-Keiju Ishitsuka (keiju)
-* committer
-* He wrote and is the maintainer of:
- * cmath.rb (1.9)
- * complex.rb (1.8)
- * e2mmap.rb
- * forwardable.rb
- * irb
- * mathn
- * matrix.rb
- * mutex_m.rb
- * rational.rb (1.8)
- * sync.rb
- * shell/*
- * thwait.rb
- * tracer.rb
-
-== J
-
-Curtis Jackson
-* missing/dup2.c
-
-Alan Johnson
-* a patch for net/ftp
-
-Lyle Johnson
-* patches for nkf, bigdecimal, numeric.c
-
-== K
-
-Yoshihiro Kambayashi
-* a patch for enc/trans/single_byte.trans.
-* He wrote supports for some encodings.
-
-Yutaka Kanemoto
-* patches for common.mk, AIX AF_INET6 support
-
-Motoyuki Kasahara
-* He wrote getoptlong.rb
-
-Masahiro Kawato
-* a patch for shellwords.rb
-
-Wataru Kimura
-* a patch for configure.in
-
-Michael Klishin
-* patch for make help.
-
-Noritada Kobayashi
-* a patch for optparse.rb
-
-Shigeo Kobayashi (shigek)
-* committer
-* He is the maintainer of bigdecimal
-
-KONISHI, Hiromasa (H_Konishi)
-* committer
-* He had maintained the bcc32 support in 2004.
-
-Kornelius "murphy" Kalnbach
-* documentation
-
-K.Kosako (kosako)
-* committer
-* He wrote Oniguruma.
-
-Takehiro Kubo
-* patches for dl 64bit support.
-
-== L
-
-Marc-Andre Lafortune (marcandre)
-* committer
-* patches for hash.c, array.c, thread.c, enumc, string.c, range.c and rdoc documentation.
-
-Hongli Lai
-* improved pstore.rb
-* patch for tool/file2lastrev.rb.
-
-raspberry lemon
-* a patch for webrick/httpproxy.rb.
-
-Christian Loew
-* a patch for fileutils.rb
-
-== M
-
-Shugo Maeda (shugo)
-* committer
-* A system administrator of ruby-lang.org servers.
-* He wrote and is the maintainer of:
- * monitor.rb
- * net/ftp
- * net/imap
-
-Stephan Maka (mathew)
-* documentation
-
-Yukihiro Matsumoto (matz)
-* Matz -- the founder, language designer of Ruby.
-* committer
-* Ruby itself, most of Ruby.
-* He is the maintainer of:
- * singleton
- * timeout
- * gdbm
- * sdbm
-
-Konrad Meyer
-* documentation
-
-Mib Software
-* missing/vsnprintf.c
-
-Todd C. Miller
-* missing/strlcat.c
-* missing/strlcpy.c
-
-MIYASAKA, Masaru
-* a patch for cgi.rb
-
-Stefan Monnier
-* regex.c was fixed with based on his Emacs21 patch.
-
-Marcel Moolenaar
-* patches for eval.c and gc.c.
-
-moonwolf
-* a patch for REXML, xmlrpc
-
-Hiroshi Moriyama
-* a patch for yaml.
-
-Kyosuke Morohashi
-* a patch for gem_prelude.rb
-
-Kenta Murata
-* patches for json, bignum.c
-
-Akinori MUSHA (knu)
-* committer
-* He wrote and is the maintainer of:
- * abbrev.rb
- * generator (1.8)
- * enumerator (1.8)
- * set
- * ipaddr.rb
- * digest/*
- * syslog
-* He is the branch maintainer of ruby_1_8, the release manager of 1.8 series.
-
-== N
-
-Hidetoshi NAGAI (nagai)
-* committer
-* He is the maintainer of tk/*
-
-Nobuyoshi Nakada (nobu)
-* committer
-* a.k.a. the "patch monster"
-* He wrote and is the maintainer of:
- * optparse
- * stringio
- * io/wait
- * iconv
-
-Satoshi Nakagawa
-* patches for util.c
-
-Narihiro Nakamura (nari)
-* committer
-* a.k.a. authorNari
-* working at GC
-
-NAKAMURA, Hiroshi (nahi)
-* committer
-* He is the maintainer of:
- * csv.rb (1.8)
- * logger.rb
- * soap/* (1.8)
- * wsdl/* (1.8)
- * xsd/* (1.8)
-
-NAKAMURA, Usaku (usa)
-* committer
-* a.k.a. unak
-* He is the maintainer of mswin32 and mswin64 support.
-
-NARUSE, Yui (naruse)
-* committer
-* a.k.a. "nurse"
-* Did much upon m17n.
-* He is the maintainer of:
- * json
- * nkf
-
-Christian Neukirchen
-* a patch for webrick/httputils
-
-Michael Neumann (mneumann)
-* committer
-* He is the maintainer of
- * xmlrpc (1.8)
- * gserver (1.8)
-
-NISHIO Hirokazu
-* wrote a patch for CVE-2010-0541
-
-Kazuhiro NISHIYAMA (kazu)
-* committer
-* a.k.a. znz
-
-Go Noguchi
-
-Martin Nordholts
-* misc/rdebug.el
-
-nmu
-* a patch for socket
-
-== O
-
-okkez
-* He is a sysop of the Ruby Reference Manual Renewal Project.
-* fixed ipaddr.rb, ext/etc
-
-Haruhiko Okumura
-* some of missing/* is based on his book:
- * missing/erf.c
- * missing/lgamma_r.c
- * missing/tgamma.c
-
-OMAE, jun
-* a patch for debug.rb
-
-Eugene Ossintsev
-* documentation
-
-== P
-
-Heesob Park
-* a patch for win32/win32.c.
-
-pegacorn
-* a patch for instruby.rb
-
-== Q
-
-== R
-
-Gaston Ramos
-* documentation
-
-The Regents of the University of California
-* missing/crypt.c
-* missing/vsnprintf.c
-
-Sam Roberts
-* patch for socket
-* documentation
-
-Michal Rokos (michal)
-* committer
-* He was the maintainer of DJGPP support.
-
-rubikitch
-* a patch for io.c
-
-Marcus Rueckert
-* a patch for mkconfig.rb.
-
-Run Paint Run Run
-* patch for enc/unicode.c
-* documentation
-
-Sean Russell (ser)
-* committer
-* He wrote and is the maintainer of REXML.
-
-== S
-
-Kazuo Saito (ksaito)
-* committer
-* M17N
-
-Tadashi Saito
-* patches for test/ruby/test_math.rb, thread_*.c, bignum.c
-* working upon BigDecimal.
-* did much upon documentation
-
-Masahiro Sakai
-* a patch for io.c
-
-Laurent Sansonetti
-* a patch for tool/ytab.sed
-
-Jeff Saracco
-* documentation
-
-Koichi Sasada (ko1)
-* committer
-* He wrote YARV.
-
-Hugh Sasse
-* a patch for net/http
-* documentation
-
-Charlie Savage
-* a patch for win32/Makefile.sub
-
-Michael Scholz
-* a patch for ruby-mode.el
-
-Arthur Schreiber
-* patch for net/http and rdoc.
-
-Masatoshi SEKI (seki)
-* committer
-* He wrote and is the maintainer of:
- * drb/*
- * erb
- * rinda
-
-Roman Shterenzon
-* a patch for open-uri.
-
-Kent Sibilev
-
-Gavin Sinclair (gsinclair)
-* committer
-
-John W. Small
-* He wrote gserver.rb
-
-Yuki Sonoda (yugui)
-* committer
-* She is the maintainer of man/* manual pages and is the release manager of 1.9 series.
-* She wrote prime.rb.
-* A developer and a sysop of redmine.ruby-lang.org.
-
-SOUMA, Yutaka
-* a patch for pack.c.
-
-Tatsuki Sugiura
-* WebDAV support for net/http
-
-Masaki Suketa (suke)
-* committer
-* He is the maintainer of win32ole
-
-sheepman
-* patches for ruby.c, thread.c, stringio, enum.c, webrick, net/http
-
-Siena. (siena)
-* committer
-
-Kirill A. Shutemov
-* a patch for parse.y
-
-Darren Smith
-* a patch for golf_prelude.rb
-
-Richard M. Stallman
-* missing/alloca.c
-
-Robin Stocker
-* documentation
-
-Joshua Stowers
-* a patch for array.c
-
-Marcus Stollsteimer (stomar)
-* committer
-* a maintainer of www.ruby-lang.org
-* patches for cgi (HTML5 tag maker), numeric.c, bigdecimal, ostruct.rb, prime.rb, and others
-* documentation
-
-Adam Strzelecki
-* a patch for compile.c
-
-Masashi Sumi
-* improved net/pop.rb
-
-Eric Sunshine
-* NeXT OpenStep, Rhapsody support
-
-Kouhei Sutou (kou)
-* committer
-* He wrote and is the maintainer of rss/*
-
-David Symonds
-* documentation
-
-== T
-
-TAKANO Mitsuhiro (takano32)
-* committer
-* He is the maintainer of IA-64 support.
-* BigDecimal
-
-TAKAO, Kouji (kouji)
-* committer
-* He is the maintainer of readline.
-
-Nathaniel Talbott (ntalbott)
-* committer
-* He was the maintainer of test/unit, runit, rubyunit.
-
-TANAKA, Akira (akr)
-* committer
-* Did much upon m17n.
-* And he is the maintainer of:
- * open-uri
- * pathname
- * pp
- * resolv-replace
- * resolv
- * time
- * tsort
-
-Takaaki Tateishi (ttate)
-* committer
-* He was the maintainer of dl
-
-Technorama Ltd. (technoroma)
-* committer
-* openssl
-
-Andrew Thompson
-* a patch for socket.c IRIX support.
-
-Dave Thomas (dave)
-* committer
-* a.k.a. the Pragmatic Programmer.
-* He wrote rdoc.
-
-Tietew
-* patches for win32 support
-
-Masahiro Tomita
-* a patch for cgi.rb
-
-Jakub Travnik
-* a patch for eval.c
-
-Tom Truscott
-* missing/crypt.c
-
-== U
-
-UEDA, Satoshi
-* a patch for uri
-
-Takaaki Uematsu (uema2)
-* committer
-* He was the maintainer of WinCE support.
-
-UENO, Katsuhiro (katsu)
-* committer
-* He is the maintainer of zlib
-
-Hajimu UMEMOTO
-* He wrote ipaddr.rb
-
-URABE, Shyouhei (shyouhei)
-* committer
-* a.k.a. mput.
-* He is the branch maintainer of ruby_1_8_6 and ruby_1_8_7
-* and is the release manager of 1.8.x-pXXX.
-
-== V
-
-Joel VanderWerf
-* a patch for numeric.c
-
-Peter Vanbroekhoven
-
-Corinna Vinschen
-
-== W
-
-wanabe (wanabe)
-* committer
-* fixed YARV and Oniguruma.
-
-Chun Wang
-* a patch for time.rb
-
-WATANABE, Hirofumi (eban)
-* committer
-* He is the maintainer of
- * ftools (1.8)
- * tmpdir
- * un
- * Win32API
-
-WATANABE, Tetsuya
-* a patch for ruby.c
-
-William Webber (wew)
-* committer
-
-Jim Weirich (jim)
-* committer
-* He wrote Rake.
-
-Nathan Weizenbaum
-* fixed misc/ruby-mode.el.
-
-why the lukky stiff (why)
-* committer
-* He is the maintainer of syck
-
-Caley Woods
-* documentation
-
-Gary Wright
-* documentation
-
-== X
-
-== Y
-
-Akira Yamada (akira)
-* committer
-* He is the maintainer of ruby related packages at Debian project.
-
-Keita Yamaguchi
-* patches for enum.c, parse.y
-* documentation
-
-Hirokazu Yamamoto (ocean)
-* committer
-
-Hirotaka Yoshioka
-* a patch for improving SEGV handling
-
-== Z
-
-Aristarkh A Zagorodnikov
-* a patch for io.c
-
-Alexander Zavorine
-* committer
-* He is the maintainer for Symbian OS.
-
-Chiyuan Zhang
-* a patch for misc/ruby-mode.el.
-
-Dee Zsombor (zunda)
-* a patch for thread_pthread.c
-
-Dan Zwell
-* a patch for net/pop
-
-
diff --git a/doc/csv/arguments/io.rdoc b/doc/csv/arguments/io.rdoc
new file mode 100644
index 0000000000..f5fe1d1975
--- /dev/null
+++ b/doc/csv/arguments/io.rdoc
@@ -0,0 +1,5 @@
+* Argument +io+ should be an IO object that is:
+ * Open for reading; on return, the IO object will be closed.
+ * Positioned at the beginning.
+ To position at the end, for appending, use method CSV.generate.
+ For any other positioning, pass a preset \StringIO object instead.
diff --git a/doc/csv/options/common/col_sep.rdoc b/doc/csv/options/common/col_sep.rdoc
new file mode 100644
index 0000000000..05769b5773
--- /dev/null
+++ b/doc/csv/options/common/col_sep.rdoc
@@ -0,0 +1,63 @@
+====== Option +col_sep+
+
+Specifies the \String field separator to be used
+for both parsing and generating.
+The \String will be transcoded into the data's \Encoding before use.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:col_sep) # => "," (comma)
+
+Using the default (comma):
+ str = CSV.generate do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0\nbar,1\nbaz,2\n"
+ ary = CSV.parse(str)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using +:+ (colon):
+ col_sep = ':'
+ str = CSV.generate(col_sep: col_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo:0\nbar:1\nbaz:2\n"
+ ary = CSV.parse(str, col_sep: col_sep)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using +::+ (two colons):
+ col_sep = '::'
+ str = CSV.generate(col_sep: col_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo::0\nbar::1\nbaz::2\n"
+ ary = CSV.parse(str, col_sep: col_sep)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using <tt>''</tt> (empty string):
+ col_sep = ''
+ str = CSV.generate(col_sep: col_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo0\nbar1\nbaz2\n"
+
+---
+
+Raises an exception if parsing with the empty \String:
+ col_sep = ''
+ # Raises ArgumentError (:col_sep must be 1 or more characters: "")
+ CSV.parse("foo0\nbar1\nbaz2\n", col_sep: col_sep)
+
+Raises an exception if the given value is not String-convertible:
+ col_sep = BasicObject.new
+ # Raises NoMethodError (undefined method `to_s' for #<BasicObject:>)
+ CSV.generate(line, col_sep: col_sep)
+ # Raises NoMethodError (undefined method `to_s' for #<BasicObject:>)
+ CSV.parse(str, col_sep: col_sep)
diff --git a/doc/csv/options/common/quote_char.rdoc b/doc/csv/options/common/quote_char.rdoc
new file mode 100644
index 0000000000..67fd3af68b
--- /dev/null
+++ b/doc/csv/options/common/quote_char.rdoc
@@ -0,0 +1,42 @@
+====== Option +quote_char+
+
+Specifies the character (\String of length 1) used used to quote fields
+in both parsing and generating.
+This String will be transcoded into the data's \Encoding before use.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:quote_char) # => "\"" (double quote)
+
+This is useful for an application that incorrectly uses <tt>'</tt> (single-quote)
+to quote fields, instead of the correct <tt>"</tt> (double-quote).
+
+Using the default (double quote):
+ str = CSV.generate do |csv|
+ csv << ['foo', 0]
+ csv << ["'bar'", 1]
+ csv << ['"baz"', 2]
+ end
+ str # => "foo,0\n'bar',1\n\"\"\"baz\"\"\",2\n"
+ ary = CSV.parse(str)
+ ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]]
+
+Using <tt>'</tt> (single-quote):
+ quote_char = "'"
+ str = CSV.generate(quote_char: quote_char) do |csv|
+ csv << ['foo', 0]
+ csv << ["'bar'", 1]
+ csv << ['"baz"', 2]
+ end
+ str # => "foo,0\n'''bar''',1\n\"baz\",2\n"
+ ary = CSV.parse(str, quote_char: quote_char)
+ ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]]
+
+---
+
+Raises an exception if the \String length is greater than 1:
+ # Raises ArgumentError (:quote_char has to be nil or a single character String)
+ CSV.new('', quote_char: 'xx')
+
+Raises an exception if the value is not a \String:
+ # Raises ArgumentError (:quote_char has to be nil or a single character String)
+ CSV.new('', quote_char: :foo)
diff --git a/doc/csv/options/common/row_sep.rdoc b/doc/csv/options/common/row_sep.rdoc
new file mode 100644
index 0000000000..872d9d1f3f
--- /dev/null
+++ b/doc/csv/options/common/row_sep.rdoc
@@ -0,0 +1,100 @@
+====== Option +row_sep+
+
+Specifies the row separator, a \String or the \Symbol <tt>:auto</tt> (see below),
+to be used for both parsing and generating.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:row_sep) # => :auto
+
+---
+
+When +row_sep+ is a \String, that \String becomes the row separator.
+The String will be transcoded into the data's Encoding before use.
+
+Using <tt>"\n"</tt>:
+ row_sep = "\n"
+ str = CSV.generate(row_sep: row_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0\nbar,1\nbaz,2\n"
+ ary = CSV.parse(str)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using <tt>|</tt> (pipe):
+ row_sep = '|'
+ str = CSV.generate(row_sep: row_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0|bar,1|baz,2|"
+ ary = CSV.parse(str, row_sep: row_sep)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using <tt>--</tt> (two hyphens):
+ row_sep = '--'
+ str = CSV.generate(row_sep: row_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0--bar,1--baz,2--"
+ ary = CSV.parse(str, row_sep: row_sep)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using <tt>''</tt> (empty string):
+ row_sep = ''
+ str = CSV.generate(row_sep: row_sep) do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0bar,1baz,2"
+ ary = CSV.parse(str, row_sep: row_sep)
+ ary # => [["foo", "0bar", "1baz", "2"]]
+
+---
+
+When +row_sep+ is the \Symbol +:auto+ (the default),
+generating uses <tt>"\n"</tt> as the row separator:
+ str = CSV.generate do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0\nbar,1\nbaz,2\n"
+
+Parsing, on the other hand, invokes auto-discovery of the row separator.
+
+Auto-discovery reads ahead in the data looking for the next <tt>\r\n</tt>, +\n+, or +\r+ sequence.
+The sequence will be selected even if it occurs in a quoted field,
+assuming that you would have the same line endings there.
+
+Example:
+ str = CSV.generate do |csv|
+ csv << [:foo, 0]
+ csv << [:bar, 1]
+ csv << [:baz, 2]
+ end
+ str # => "foo,0\nbar,1\nbaz,2\n"
+ ary = CSV.parse(str)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+The default <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>) is used
+if any of the following is true:
+* None of those sequences is found.
+* Data is +ARGF+, +STDIN+, +STDOUT+, or +STDERR+.
+* The stream is only available for output.
+
+Obviously, discovery takes a little time. Set manually if speed is important. Also note that IO objects should be opened in binary mode on Windows if this feature will be used as the line-ending translation can cause problems with resetting the document position to where it was before the read ahead.
+
+---
+
+Raises an exception if the given value is not String-convertible:
+ row_sep = BasicObject.new
+ # Raises NoMethodError (undefined method `to_s' for #<BasicObject:>)
+ CSV.generate(ary, row_sep: row_sep)
+ # Raises NoMethodError (undefined method `to_s' for #<BasicObject:>)
+ CSV.parse(str, row_sep: row_sep)
diff --git a/doc/csv/options/generating/force_quotes.rdoc b/doc/csv/options/generating/force_quotes.rdoc
new file mode 100644
index 0000000000..11afd1a16c
--- /dev/null
+++ b/doc/csv/options/generating/force_quotes.rdoc
@@ -0,0 +1,17 @@
+====== Option +force_quotes+
+
+Specifies the boolean that determines whether each output field is to be double-quoted.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:force_quotes) # => false
+
+For examples in this section:
+ ary = ['foo', 0, nil]
+
+Using the default, +false+:
+ str = CSV.generate_line(ary)
+ str # => "foo,0,\n"
+
+Using +true+:
+ str = CSV.generate_line(ary, force_quotes: true)
+ str # => "\"foo\",\"0\",\"\"\n"
diff --git a/doc/csv/options/generating/quote_empty.rdoc b/doc/csv/options/generating/quote_empty.rdoc
new file mode 100644
index 0000000000..4c5645c662
--- /dev/null
+++ b/doc/csv/options/generating/quote_empty.rdoc
@@ -0,0 +1,12 @@
+====== Option +quote_empty+
+
+Specifies the boolean that determines whether an empty value is to be double-quoted.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:quote_empty) # => true
+
+With the default +true+:
+ CSV.generate_line(['"', ""]) # => "\"\"\"\",\"\"\n"
+
+With +false+:
+ CSV.generate_line(['"', ""], quote_empty: false) # => "\"\"\"\",\n"
diff --git a/doc/csv/options/generating/write_converters.rdoc b/doc/csv/options/generating/write_converters.rdoc
new file mode 100644
index 0000000000..6e5fae5fda
--- /dev/null
+++ b/doc/csv/options/generating/write_converters.rdoc
@@ -0,0 +1,33 @@
+====== Option +write_converters+
+
+Specifies converters to be used in generating fields.
+See {Write Converters}[#class-CSV-label-Write+Converters]
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:write_converters) # => nil
+
+With no write converter:
+ str = CSV.generate_line(["\na\n", "\tb\t", " c "])
+ str # => "\"\na\n\",\tb\t, c \n"
+
+With a write converter:
+ strip_converter = proc {|field| field.strip }
+ str = CSV.generate_line(["\na\n", "\tb\t", " c "], write_converters: strip_converter)
+ str # => "a,b,c\n"
+
+With two write converters (called in order):
+ upcase_converter = proc {|field| field.upcase }
+ downcase_converter = proc {|field| field.downcase }
+ write_converters = [upcase_converter, downcase_converter]
+ str = CSV.generate_line(['a', 'b', 'c'], write_converters: write_converters)
+ str # => "a,b,c\n"
+
+See also {Write Converters}[#class-CSV-label-Write+Converters]
+
+---
+
+Raises an exception if the converter returns a value that is neither +nil+
+nor \String-convertible:
+ bad_converter = proc {|field| BasicObject.new }
+ # Raises NoMethodError (undefined method `is_a?' for #<BasicObject:>)
+ CSV.generate_line(['a', 'b', 'c'], write_converters: bad_converter) \ No newline at end of file
diff --git a/doc/csv/options/generating/write_empty_value.rdoc b/doc/csv/options/generating/write_empty_value.rdoc
new file mode 100644
index 0000000000..67be5662cb
--- /dev/null
+++ b/doc/csv/options/generating/write_empty_value.rdoc
@@ -0,0 +1,15 @@
+====== Option +write_empty_value+
+
+Specifies the object that is to be substituted for each field
+that has an empty \String.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:write_empty_value) # => ""
+
+Without the option:
+ str = CSV.generate_line(['a', '', 'c', ''])
+ str # => "a,\"\",c,\"\"\n"
+
+With the option:
+ str = CSV.generate_line(['a', '', 'c', ''], write_empty_value: "x")
+ str # => "a,x,c,x\n"
diff --git a/doc/csv/options/generating/write_headers.rdoc b/doc/csv/options/generating/write_headers.rdoc
new file mode 100644
index 0000000000..f9faa9d438
--- /dev/null
+++ b/doc/csv/options/generating/write_headers.rdoc
@@ -0,0 +1,29 @@
+====== Option +write_headers+
+
+Specifies the boolean that determines whether a header row is included in the output;
+ignored if there are no headers.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:write_headers) # => nil
+
+Without +write_headers+:
+ file_path = 't.csv'
+ CSV.open(file_path,'w',
+ :headers => ['Name','Value']
+ ) do |csv|
+ csv << ['foo', '0']
+ end
+ CSV.open(file_path) do |csv|
+ csv.shift
+ end # => ["foo", "0"]
+
+With +write_headers+":
+ CSV.open(file_path,'w',
+ :write_headers=> true,
+ :headers => ['Name','Value']
+ ) do |csv|
+ csv << ['foo', '0']
+ end
+ CSV.open(file_path) do |csv|
+ csv.shift
+ end # => ["Name", "Value"]
diff --git a/doc/csv/options/generating/write_nil_value.rdoc b/doc/csv/options/generating/write_nil_value.rdoc
new file mode 100644
index 0000000000..65d33ff54e
--- /dev/null
+++ b/doc/csv/options/generating/write_nil_value.rdoc
@@ -0,0 +1,14 @@
+====== Option +write_nil_value+
+
+Specifies the object that is to be substituted for each +nil+-valued field.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:write_nil_value) # => nil
+
+Without the option:
+ str = CSV.generate_line(['a', nil, 'c', nil])
+ str # => "a,,c,\n"
+
+With the option:
+ str = CSV.generate_line(['a', nil, 'c', nil], write_nil_value: "x")
+ str # => "a,x,c,x\n"
diff --git a/doc/csv/options/parsing/converters.rdoc b/doc/csv/options/parsing/converters.rdoc
new file mode 100644
index 0000000000..211fa48de6
--- /dev/null
+++ b/doc/csv/options/parsing/converters.rdoc
@@ -0,0 +1,46 @@
+====== Option +converters+
+
+Specifies converters to be used in parsing fields.
+See {Field Converters}[#class-CSV-label-Field+Converters]
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:converters) # => nil
+
+The value may be a field converter name
+(see {Stored Converters}[#class-CSV-label-Stored+Converters]):
+ str = '1,2,3'
+ # Without a converter
+ array = CSV.parse_line(str)
+ array # => ["1", "2", "3"]
+ # With built-in converter :integer
+ array = CSV.parse_line(str, converters: :integer)
+ array # => [1, 2, 3]
+
+The value may be a converter list
+(see {Converter Lists}[#class-CSV-label-Converter+Lists]):
+ str = '1,3.14159'
+ # Without converters
+ array = CSV.parse_line(str)
+ array # => ["1", "3.14159"]
+ # With built-in converters
+ array = CSV.parse_line(str, converters: [:integer, :float])
+ array # => [1, 3.14159]
+
+The value may be a \Proc custom converter:
+(see {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]):
+ str = ' foo , bar , baz '
+ # Without a converter
+ array = CSV.parse_line(str)
+ array # => [" foo ", " bar ", " baz "]
+ # With a custom converter
+ array = CSV.parse_line(str, converters: proc {|field| field.strip })
+ array # => ["foo", "bar", "baz"]
+
+See also {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters]
+
+---
+
+Raises an exception if the converter is not a converter name or a \Proc:
+ str = 'foo,0'
+ # Raises NoMethodError (undefined method `arity' for nil:NilClass)
+ CSV.parse(str, converters: :foo)
diff --git a/doc/csv/options/parsing/empty_value.rdoc b/doc/csv/options/parsing/empty_value.rdoc
new file mode 100644
index 0000000000..7d3bcc078c
--- /dev/null
+++ b/doc/csv/options/parsing/empty_value.rdoc
@@ -0,0 +1,13 @@
+====== Option +empty_value+
+
+Specifies the object that is to be substituted
+for each field that has an empty \String.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:empty_value) # => "" (empty string)
+
+With the default, <tt>""</tt>:
+ CSV.parse_line('a,"",b,"",c') # => ["a", "", "b", "", "c"]
+
+With a different object:
+ CSV.parse_line('a,"",b,"",c', empty_value: 'x') # => ["a", "x", "b", "x", "c"]
diff --git a/doc/csv/options/parsing/field_size_limit.rdoc b/doc/csv/options/parsing/field_size_limit.rdoc
new file mode 100644
index 0000000000..797c5776fc
--- /dev/null
+++ b/doc/csv/options/parsing/field_size_limit.rdoc
@@ -0,0 +1,39 @@
+====== Option +field_size_limit+
+
+Specifies the \Integer field size limit.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:field_size_limit) # => nil
+
+This is a maximum size CSV will read ahead looking for the closing quote for a field.
+(In truth, it reads to the first line ending beyond this size.)
+If a quote cannot be found within the limit CSV will raise a MalformedCSVError,
+assuming the data is faulty.
+You can use this limit to prevent what are effectively DoS attacks on the parser.
+However, this limit can cause a legitimate parse to fail;
+therefore the default value is +nil+ (no limit).
+
+For the examples in this section:
+ str = <<~EOT
+ "a","b"
+ "
+ 2345
+ ",""
+ EOT
+ str # => "\"a\",\"b\"\n\"\n2345\n\",\"\"\n"
+
+Using the default +nil+:
+ ary = CSV.parse(str)
+ ary # => [["a", "b"], ["\n2345\n", ""]]
+
+Using <tt>50</tt>:
+ field_size_limit = 50
+ ary = CSV.parse(str, field_size_limit: field_size_limit)
+ ary # => [["a", "b"], ["\n2345\n", ""]]
+
+---
+
+Raises an exception if a field is too long:
+ big_str = "123456789\n" * 1024
+ # Raises CSV::MalformedCSVError (Field size exceeded in line 1.)
+ CSV.parse('valid,fields,"' + big_str + '"', field_size_limit: 2048)
diff --git a/doc/csv/options/parsing/header_converters.rdoc b/doc/csv/options/parsing/header_converters.rdoc
new file mode 100644
index 0000000000..309180805f
--- /dev/null
+++ b/doc/csv/options/parsing/header_converters.rdoc
@@ -0,0 +1,43 @@
+====== Option +header_converters+
+
+Specifies converters to be used in parsing headers.
+See {Header Converters}[#class-CSV-label-Header+Converters]
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:header_converters) # => nil
+
+Identical in functionality to option {converters}[#class-CSV-label-Option+converters]
+except that:
+- The converters apply only to the header row.
+- The built-in header converters are +:downcase+ and +:symbol+.
+
+This section assumes prior execution of:
+ str = <<-EOT
+ Name,Value
+ foo,0
+ bar,1
+ baz,2
+ EOT
+ # With no header converter
+ table = CSV.parse(str, headers: true)
+ table.headers # => ["Name", "Value"]
+
+The value may be a header converter name
+(see {Stored Converters}[#class-CSV-label-Stored+Converters]):
+ table = CSV.parse(str, headers: true, header_converters: :downcase)
+ table.headers # => ["name", "value"]
+
+The value may be a converter list
+(see {Converter Lists}[#class-CSV-label-Converter+Lists]):
+ header_converters = [:downcase, :symbol]
+ table = CSV.parse(str, headers: true, header_converters: header_converters)
+ table.headers # => [:name, :value]
+
+The value may be a \Proc custom converter
+(see {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]):
+ upcase_converter = proc {|field| field.upcase }
+ table = CSV.parse(str, headers: true, header_converters: upcase_converter)
+ table.headers # => ["NAME", "VALUE"]
+
+See also {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters]
+
diff --git a/doc/csv/options/parsing/headers.rdoc b/doc/csv/options/parsing/headers.rdoc
new file mode 100644
index 0000000000..0ea151f24b
--- /dev/null
+++ b/doc/csv/options/parsing/headers.rdoc
@@ -0,0 +1,63 @@
+====== Option +headers+
+
+Specifies a boolean, \Symbol, \Array, or \String to be used
+to define column headers.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:headers) # => false
+
+---
+
+Without +headers+:
+ str = <<-EOT
+ Name,Count
+ foo,0
+ bar,1
+ bax,2
+ EOT
+ csv = CSV.new(str)
+ csv # => #<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ csv.headers # => nil
+ csv.shift # => ["Name", "Count"]
+
+---
+
+If set to +true+ or the \Symbol +:first_row+,
+the first row of the data is treated as a row of headers:
+ str = <<-EOT
+ Name,Count
+ foo,0
+ bar,1
+ bax,2
+ EOT
+ csv = CSV.new(str, headers: true)
+ csv # => #<CSV io_type:StringIO encoding:UTF-8 lineno:2 col_sep:"," row_sep:"\n" quote_char:"\"" headers:["Name", "Count"]>
+ csv.headers # => ["Name", "Count"]
+ csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">
+
+---
+
+If set to an \Array, the \Array elements are treated as headers:
+ str = <<-EOT
+ foo,0
+ bar,1
+ bax,2
+ EOT
+ csv = CSV.new(str, headers: ['Name', 'Count'])
+ csv
+ csv.headers # => ["Name", "Count"]
+ csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">
+
+---
+
+If set to a \String +str+, method <tt>CSV::parse_line(str, options)</tt> is called
+with the current +options+, and the returned \Array is treated as headers:
+ str = <<-EOT
+ foo,0
+ bar,1
+ bax,2
+ EOT
+ csv = CSV.new(str, headers: 'Name,Count')
+ csv
+ csv.headers # => ["Name", "Count"]
+ csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">
diff --git a/doc/csv/options/parsing/liberal_parsing.rdoc b/doc/csv/options/parsing/liberal_parsing.rdoc
new file mode 100644
index 0000000000..b8b9b00c98
--- /dev/null
+++ b/doc/csv/options/parsing/liberal_parsing.rdoc
@@ -0,0 +1,19 @@
+====== Option +liberal_parsing+
+
+Specifies the boolean value that determines whether
+CSV will attempt to parse input not conformant with RFC 4180,
+such as double quotes in unquoted fields.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:liberal_parsing) # => false
+
+For examples in this section:
+ str = 'is,this "three, or four",fields'
+
+Without +liberal_parsing+:
+ # Raises CSV::MalformedCSVError (Illegal quoting in str 1.)
+ CSV.parse_line(str)
+
+With +liberal_parsing+:
+ ary = CSV.parse_line(str, liberal_parsing: true)
+ ary # => ["is", "this \"three", " or four\"", "fields"]
diff --git a/doc/csv/options/parsing/nil_value.rdoc b/doc/csv/options/parsing/nil_value.rdoc
new file mode 100644
index 0000000000..412e8795e8
--- /dev/null
+++ b/doc/csv/options/parsing/nil_value.rdoc
@@ -0,0 +1,12 @@
+====== Option +nil_value+
+
+Specifies the object that is to be substituted for each null (no-text) field.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:nil_value) # => nil
+
+With the default, +nil+:
+ CSV.parse_line('a,,b,,c') # => ["a", nil, "b", nil, "c"]
+
+With a different object:
+ CSV.parse_line('a,,b,,c', nil_value: 0) # => ["a", 0, "b", 0, "c"]
diff --git a/doc/csv/options/parsing/return_headers.rdoc b/doc/csv/options/parsing/return_headers.rdoc
new file mode 100644
index 0000000000..45d2e3f3de
--- /dev/null
+++ b/doc/csv/options/parsing/return_headers.rdoc
@@ -0,0 +1,22 @@
+====== Option +return_headers+
+
+Specifies the boolean that determines whether method #shift
+returns or ignores the header row.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:return_headers) # => false
+
+Examples:
+ str = <<-EOT
+ Name,Count
+ foo,0
+ bar,1
+ bax,2
+ EOT
+ # Without return_headers first row is str.
+ csv = CSV.new(str, headers: true)
+ csv.shift # => #<CSV::Row "Name":"foo" "Count":"0">
+ # With return_headers first row is headers.
+ csv = CSV.new(str, headers: true, return_headers: true)
+ csv.shift # => #<CSV::Row "Name":"Name" "Count":"Count">
+
diff --git a/doc/csv/options/parsing/skip_blanks.rdoc b/doc/csv/options/parsing/skip_blanks.rdoc
new file mode 100644
index 0000000000..2c8f7b7bb8
--- /dev/null
+++ b/doc/csv/options/parsing/skip_blanks.rdoc
@@ -0,0 +1,31 @@
+====== Option +skip_blanks+
+
+Specifies a boolean that determines whether blank lines in the input will be ignored;
+a line that contains a column separator is not considered to be blank.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:skip_blanks) # => false
+
+See also option {skiplines}[#class-CSV-label-Option+skip_lines].
+
+For examples in this section:
+ str = <<-EOT
+ foo,0
+
+ bar,1
+ baz,2
+
+ ,
+ EOT
+
+Using the default, +false+:
+ ary = CSV.parse(str)
+ ary # => [["foo", "0"], [], ["bar", "1"], ["baz", "2"], [], [nil, nil]]
+
+Using +true+:
+ ary = CSV.parse(str, skip_blanks: true)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]]
+
+Using a truthy value:
+ ary = CSV.parse(str, skip_blanks: :foo)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]]
diff --git a/doc/csv/options/parsing/skip_lines.rdoc b/doc/csv/options/parsing/skip_lines.rdoc
new file mode 100644
index 0000000000..1481c40a5f
--- /dev/null
+++ b/doc/csv/options/parsing/skip_lines.rdoc
@@ -0,0 +1,37 @@
+====== Option +skip_lines+
+
+Specifies an object to use in identifying comment lines in the input that are to be ignored:
+* If a \Regexp, ignores lines that match it.
+* If a \String, converts it to a \Regexp, ignores lines that match it.
+* If +nil+, no lines are considered to be comments.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:skip_lines) # => nil
+
+For examples in this section:
+ str = <<-EOT
+ # Comment
+ foo,0
+ bar,1
+ baz,2
+ # Another comment
+ EOT
+ str # => "# Comment\nfoo,0\nbar,1\nbaz,2\n# Another comment\n"
+
+Using the default, +nil+:
+ ary = CSV.parse(str)
+ ary # => [["# Comment"], ["foo", "0"], ["bar", "1"], ["baz", "2"], ["# Another comment"]]
+
+Using a \Regexp:
+ ary = CSV.parse(str, skip_lines: /^#/)
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Using a \String:
+ ary = CSV.parse(str, skip_lines: '#')
+ ary # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+---
+
+Raises an exception if given an object that is not a \Regexp, a \String, or +nil+:
+ # Raises ArgumentError (:skip_lines has to respond to #match: 0)
+ CSV.parse(str, skip_lines: 0)
diff --git a/doc/csv/options/parsing/strip.rdoc b/doc/csv/options/parsing/strip.rdoc
new file mode 100644
index 0000000000..56ae4310c3
--- /dev/null
+++ b/doc/csv/options/parsing/strip.rdoc
@@ -0,0 +1,15 @@
+====== Option +strip+
+
+Specifies the boolean value that determines whether
+whitespace is stripped from each input field.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:strip) # => false
+
+With default value +false+:
+ ary = CSV.parse_line(' a , b ')
+ ary # => [" a ", " b "]
+
+With value +true+:
+ ary = CSV.parse_line(' a , b ', strip: true)
+ ary # => ["a", "b"]
diff --git a/doc/csv/options/parsing/unconverted_fields.rdoc b/doc/csv/options/parsing/unconverted_fields.rdoc
new file mode 100644
index 0000000000..3e7f839d49
--- /dev/null
+++ b/doc/csv/options/parsing/unconverted_fields.rdoc
@@ -0,0 +1,27 @@
+====== Option +unconverted_fields+
+
+Specifies the boolean that determines whether unconverted field values are to be available.
+
+Default value:
+ CSV::DEFAULT_OPTIONS.fetch(:unconverted_fields) # => nil
+
+The unconverted field values are those found in the source data,
+prior to any conversions performed via option +converters+.
+
+When option +unconverted_fields+ is +true+,
+each returned row (\Array or \CSV::Row) has an added method,
++unconverted_fields+, that returns the unconverted field values:
+ str = <<-EOT
+ foo,0
+ bar,1
+ baz,2
+ EOT
+ # Without unconverted_fields
+ csv = CSV.parse(str, converters: :integer)
+ csv # => [["foo", 0], ["bar", 1], ["baz", 2]]
+ csv.first.respond_to?(:unconverted_fields) # => false
+ # With unconverted_fields
+ csv = CSV.parse(str, converters: :integer, unconverted_fields: true)
+ csv # => [["foo", 0], ["bar", 1], ["baz", 2]]
+ csv.first.respond_to?(:unconverted_fields) # => true
+ csv.first.unconverted_fields # => ["foo", "0"]
diff --git a/doc/csv/recipes/filtering.rdoc b/doc/csv/recipes/filtering.rdoc
new file mode 100644
index 0000000000..470649d09a
--- /dev/null
+++ b/doc/csv/recipes/filtering.rdoc
@@ -0,0 +1,156 @@
+== Recipes for Filtering \CSV
+
+For other recipes, see {Recipes for CSV}[./recipes_rdoc.html].
+
+All code snippets on this page assume that the following has been executed:
+ require 'csv'
+
+=== Contents
+
+- {Source and Output Formats}[#label-Source+and+Output+Formats]
+ - {Filtering String to String}[#label-Filtering+String+to+String]
+ - {Recipe: Filter String to String with Headers}[#label-Recipe-3A+Filter+String+to+String+with+Headers]
+ - {Recipe: Filter String to String Without Headers}[#label-Recipe-3A+Filter+String+to+String+Without+Headers]
+ - {Filtering String to IO Stream}[#label-Filtering+String+to+IO+Stream]
+ - {Recipe: Filter String to IO Stream with Headers}[#label-Recipe-3A+Filter+String+to+IO+Stream+with+Headers]
+ - {Recipe: Filter String to IO Stream Without Headers}[#label-Recipe-3A+Filter+String+to+IO+Stream+Without+Headers]
+ - {Filtering IO Stream to String}[#label-Filtering+IO+Stream+to+String]
+ - {Recipe: Filter IO Stream to String with Headers}[#label-Recipe-3A+Filter+IO+Stream+to+String+with+Headers]
+ - {Recipe: Filter IO Stream to String Without Headers}[#label-Recipe-3A+Filter+IO+Stream+to+String+Without+Headers]
+ - {Filtering IO Stream to IO Stream}[#label-Filtering+IO+Stream+to+IO+Stream]
+ - {Recipe: Filter IO Stream to IO Stream with Headers}[#label-Recipe-3A+Filter+IO+Stream+to+IO+Stream+with+Headers]
+ - {Recipe: Filter IO Stream to IO Stream Without Headers}[#label-Recipe-3A+Filter+IO+Stream+to+IO+Stream+Without+Headers]
+
+=== Source and Output Formats
+
+You can use a Unix-style "filter" for \CSV data.
+The filter reads source \CSV data and writes output \CSV data as modified by the filter.
+The input and output \CSV data may be any mixture of \Strings and \IO streams.
+
+==== Filtering \String to \String
+
+You can filter one \String to another, with or without headers.
+
+===== Recipe: Filter \String to \String with Headers
+
+Use class method CSV.filter with option +headers+ to filter a \String to another \String:
+ in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ out_string = ''
+ CSV.filter(in_string, out_string, headers: true) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ out_string # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n"
+
+===== Recipe: Filter \String to \String Without Headers
+
+Use class method CSV.filter without option +headers+ to filter a \String to another \String:
+ in_string = "foo,0\nbar,1\nbaz,2\n"
+ out_string = ''
+ CSV.filter(in_string, out_string) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n"
+
+==== Filtering \String to \IO Stream
+
+You can filter a \String to an \IO stream, with or without headers.
+
+===== Recipe: Filter \String to \IO Stream with Headers
+
+Use class method CSV.filter with option +headers+ to filter a \String to an \IO stream:
+ in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.open(path, 'w') do |out_io|
+ CSV.filter(in_string, out_io, headers: true) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ p File.read(path) # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n"
+
+===== Recipe: Filter \String to \IO Stream Without Headers
+
+Use class method CSV.filter without option +headers+ to filter a \String to an \IO stream:
+ in_string = "foo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.open(path, 'w') do |out_io|
+ CSV.filter(in_string, out_io) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ p File.read(path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n"
+
+==== Filtering \IO Stream to \String
+
+You can filter an \IO stream to a \String, with or without headers.
+
+===== Recipe: Filter \IO Stream to \String with Headers
+
+Use class method CSV.filter with option +headers+ to filter an \IO stream to a \String:
+ in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, in_string)
+ out_string = ''
+ File.open(path, headers: true) do |in_io|
+ CSV.filter(in_io, out_string, headers: true) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ out_string # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n"
+
+===== Recipe: Filter \IO Stream to \String Without Headers
+
+Use class method CSV.filter without option +headers+ to filter an \IO stream to a \String:
+ in_string = "foo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, in_string)
+ out_string = ''
+ File.open(path) do |in_io|
+ CSV.filter(in_io, out_string) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n"
+
+==== Filtering \IO Stream to \IO Stream
+
+You can filter an \IO stream to another \IO stream, with or without headers.
+
+===== Recipe: Filter \IO Stream to \IO Stream with Headers
+
+Use class method CSV.filter with option +headers+ to filter an \IO stream to another \IO stream:
+ in_path = 't.csv'
+ in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ File.write(in_path, in_string)
+ out_path = 'u.csv'
+ File.open(in_path) do |in_io|
+ File.open(out_path, 'w') do |out_io|
+ CSV.filter(in_io, out_io, headers: true) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ end
+ p File.read(out_path) # => "Name,Value\nFOO,0000\nBAR,1111\nBAZ,2222\n"
+
+===== Recipe: Filter \IO Stream to \IO Stream Without Headers
+
+Use class method CSV.filter without option +headers+ to filter an \IO stream to another \IO stream:
+ in_path = 't.csv'
+ in_string = "foo,0\nbar,1\nbaz,2\n"
+ File.write(in_path, in_string)
+ out_path = 'u.csv'
+ File.open(in_path) do |in_io|
+ File.open(out_path, 'w') do |out_io|
+ CSV.filter(in_io, out_io) do |row|
+ row[0] = row[0].upcase
+ row[1] *= 4
+ end
+ end
+ end
+ p File.read(out_path) # => "FOO,0000\nBAR,1111\nBAZ,2222\n"
diff --git a/doc/csv/recipes/generating.rdoc b/doc/csv/recipes/generating.rdoc
new file mode 100644
index 0000000000..3ef6df99b4
--- /dev/null
+++ b/doc/csv/recipes/generating.rdoc
@@ -0,0 +1,244 @@
+== Recipes for Generating \CSV
+
+For other recipes, see {Recipes for CSV}[./recipes_rdoc.html].
+
+All code snippets on this page assume that the following has been executed:
+ require 'csv'
+
+=== Contents
+
+- {Output Formats}[#label-Output+Formats]
+ - {Generating to a String}[#label-Generating+to+a+String]
+ - {Recipe: Generate to String with Headers}[#label-Recipe-3A+Generate+to+String+with+Headers]
+ - {Recipe: Generate to String Without Headers}[#label-Recipe-3A+Generate+to+String+Without+Headers]
+ - {Generating to a File}[#label-Generating+to+a+File]
+ - {Recipe: Generate to File with Headers}[#label-Recipe-3A+Generate+to+File+with+Headers]
+ - {Recipe: Generate to File Without Headers}[#label-Recipe-3A+Generate+to+File+Without+Headers]
+ - {Generating to IO an Stream}[#label-Generating+to+an+IO+Stream]
+ - {Recipe: Generate to IO Stream with Headers}[#label-Recipe-3A+Generate+to+IO+Stream+with+Headers]
+ - {Recipe: Generate to IO Stream Without Headers}[#label-Recipe-3A+Generate+to+IO+Stream+Without+Headers]
+- {Converting Fields}[#label-Converting+Fields]
+ - {Recipe: Filter Generated Field Strings}[#label-Recipe-3A+Filter+Generated+Field+Strings]
+ - {Recipe: Specify Multiple Write Converters}[#label-Recipe-3A+Specify+Multiple+Write+Converters]
+- {RFC 4180 Compliance}[#label-RFC+4180+Compliance]
+ - {Row Separator}[#label-Row+Separator]
+ - {Recipe: Generate Compliant Row Separator}[#label-Recipe-3A+Generate+Compliant+Row+Separator]
+ - {Recipe: Generate Non-Compliant Row Separator}[#label-Recipe-3A+Generate+Non-Compliant+Row+Separator]
+ - {Column Separator}[#label-Column+Separator]
+ - {Recipe: Generate Compliant Column Separator}[#label-Recipe-3A+Generate+Compliant+Column+Separator]
+ - {Recipe: Generate Non-Compliant Column Separator}[#label-Recipe-3A+Generate+Non-Compliant+Column+Separator]
+ - {Quote Character}[#label-Quote+Character]
+ - {Recipe: Generate Compliant Quote Character}[#label-Recipe-3A+Generate+Compliant+Quote+Character]
+ - {Recipe: Generate Non-Compliant Quote Character}[#label-Recipe-3A+Generate+Non-Compliant+Quote+Character]
+
+=== Output Formats
+
+You can generate \CSV output to a \String, to a \File (via its path), or to an \IO stream.
+
+==== Generating to a \String
+
+You can generate \CSV output to a \String, with or without headers.
+
+===== Recipe: Generate to \String with Headers
+
+Use class method CSV.generate with option +headers+ to generate to a \String.
+
+This example uses method CSV#<< to append the rows
+that are to be generated:
+ output_string = CSV.generate('', headers: ['Name', 'Value'], write_headers: true) do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n"
+
+===== Recipe: Generate to \String Without Headers
+
+Use class method CSV.generate without option +headers+ to generate to a \String.
+
+This example uses method CSV#<< to append the rows
+that are to be generated:
+ output_string = CSV.generate do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Foo,0\nBar,1\nBaz,2\n"
+
+==== Generating to a \File
+
+You can generate /CSV data to a \File, with or without headers.
+
+===== Recipe: Generate to \File with Headers
+
+Use class method CSV.open with option +headers+ generate to a \File.
+
+This example uses method CSV#<< to append the rows
+that are to be generated:
+ path = 't.csv'
+ CSV.open(path, 'w', headers: ['Name', 'Value'], write_headers: true) do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ p File.read(path) # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n"
+
+===== Recipe: Generate to \File Without Headers
+
+Use class method CSV.open without option +headers+ to generate to a \File.
+
+This example uses method CSV#<< to append the rows
+that are to be generated:
+ path = 't.csv'
+ CSV.open(path, 'w') do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ p File.read(path) # => "Foo,0\nBar,1\nBaz,2\n"
+
+==== Generating to an \IO Stream
+
+You can generate \CSV data to an \IO stream, with or without headers.
+
+==== Recipe: Generate to \IO Stream with Headers
+
+Use class method CSV.new with option +headers+ to generate \CSV data to an \IO stream:
+ path = 't.csv'
+ File.open(path, 'w') do |file|
+ csv = CSV.new(file, headers: ['Name', 'Value'], write_headers: true)
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ p File.read(path) # => "Name,Value\nFoo,0\nBar,1\nBaz,2\n"
+
+===== Recipe: Generate to \IO Stream Without Headers
+
+Use class method CSV.new without option +headers+ to generate \CSV data to an \IO stream:
+ path = 't.csv'
+ File.open(path, 'w') do |file|
+ csv = CSV.new(file)
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ p File.read(path) # => "Foo,0\nBar,1\nBaz,2\n"
+
+=== Converting Fields
+
+You can use _write_ _converters_ to convert fields when generating \CSV.
+
+==== Recipe: Filter Generated Field Strings
+
+Use option <tt>:write_converters</tt> and a custom converter to convert field values when generating \CSV.
+
+This example defines and uses a custom write converter to strip whitespace from generated fields:
+ strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field }
+ output_string = CSV.generate(write_converters: strip_converter) do |csv|
+ csv << [' foo ', 0]
+ csv << [' bar ', 1]
+ csv << [' baz ', 2]
+ end
+ output_string # => "foo,0\nbar,1\nbaz,2\n"
+
+==== Recipe: Specify Multiple Write Converters
+
+Use option <tt>:write_converters</tt> and multiple custom coverters
+to convert field values when generating \CSV.
+
+This example defines and uses two custom write converters to strip and upcase generated fields:
+ strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field }
+ upcase_converter = proc {|field| field.respond_to?(:upcase) ? field.upcase : field }
+ converters = [strip_converter, upcase_converter]
+ output_string = CSV.generate(write_converters: converters) do |csv|
+ csv << [' foo ', 0]
+ csv << [' bar ', 1]
+ csv << [' baz ', 2]
+ end
+ output_string # => "FOO,0\nBAR,1\nBAZ,2\n"
+
+=== RFC 4180 Compliance
+
+By default, \CSV generates data that is compliant with
+{RFC 4180}[https://tools.ietf.org/html/rfc4180]
+with respect to:
+- Column separator.
+- Quote character.
+
+==== Row Separator
+
+RFC 4180 specifies the row separator CRLF (Ruby <tt>"\r\n"</tt>).
+
+===== Recipe: Generate Compliant Row Separator
+
+For strict compliance, use option +:row_sep+ to specify row separator <tt>"\r\n"</tt>:
+ output_string = CSV.generate('', row_sep: "\r\n") do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Foo,0\r\nBar,1\r\nBaz,2\r\n"
+
+===== Recipe: Generate Non-Compliant Row Separator
+
+For data with non-compliant row separators, use option +:row_sep+ with a different value:
+This example source uses semicolon (<tt>";'</tt>) as its row separator:
+ output_string = CSV.generate('', row_sep: ";") do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Foo,0;Bar,1;Baz,2;"
+
+==== Column Separator
+
+RFC 4180 specifies column separator COMMA (Ruby <tt>","</tt>).
+
+===== Recipe: Generate Compliant Column Separator
+
+Because the \CSV default comma separator is <tt>","</tt>,
+you need not specify option +:col_sep+ for compliant data:
+ output_string = CSV.generate('') do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Foo,0\nBar,1\nBaz,2\n"
+
+===== Recipe: Generate Non-Compliant Column Separator
+
+For data with non-compliant column separators, use option +:col_sep+.
+This example source uses TAB (<tt>"\t"</tt>) as its column separator:
+ output_string = CSV.generate('', col_sep: "\t") do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "Foo\t0\nBar\t1\nBaz\t2\n"
+
+==== Quote Character
+
+RFC 4180 specifies quote character DQUOTE (Ruby <tt>"\""</tt>).
+
+===== Recipe: Generate Compliant Quote Character
+
+Because the \CSV default quote character is <tt>"\""</tt>,
+you need not specify option +:quote_char+ for compliant data:
+ output_string = CSV.generate('', force_quotes: true) do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "\"Foo\",\"0\"\n\"Bar\",\"1\"\n\"Baz\",\"2\"\n"
+
+===== Recipe: Generate Non-Compliant Quote Character
+
+For data with non-compliant quote characters, use option +:quote_char+.
+This example source uses SQUOTE (<tt>"'"</tt>) as its quote character:
+ output_string = CSV.generate('', quote_char: "'", force_quotes: true) do |csv|
+ csv << ['Foo', 0]
+ csv << ['Bar', 1]
+ csv << ['Baz', 2]
+ end
+ output_string # => "'Foo','0'\n'Bar','1'\n'Baz','2'\n"
diff --git a/doc/csv/recipes/parsing.rdoc b/doc/csv/recipes/parsing.rdoc
new file mode 100644
index 0000000000..7ac96a934b
--- /dev/null
+++ b/doc/csv/recipes/parsing.rdoc
@@ -0,0 +1,543 @@
+== Recipes for Parsing \CSV
+
+For other recipes, see {Recipes for CSV}[./recipes_rdoc.html].
+
+All code snippets on this page assume that the following has been executed:
+ require 'csv'
+
+=== Contents
+
+- {Source Formats}[#label-Source+Formats]
+ - {Parsing from a String}[#label-Parsing+from+a+String]
+ - {Recipe: Parse from String with Headers}[#label-Recipe-3A+Parse+from+String+with+Headers]
+ - {Recipe: Parse from String Without Headers}[#label-Recipe-3A+Parse+from+String+Without+Headers]
+ - {Parsing from a File}[#label-Parsing+from+a+File]
+ - {Recipe: Parse from File with Headers}[#label-Recipe-3A+Parse+from+File+with+Headers]
+ - {Recipe: Parse from File Without Headers}[#label-Recipe-3A+Parse+from+File+Without+Headers]
+ - {Parsing from an IO Stream}[#label-Parsing+from+an+IO+Stream]
+ - {Recipe: Parse from IO Stream with Headers}[#label-Recipe-3A+Parse+from+IO+Stream+with+Headers]
+ - {Recipe: Parse from IO Stream Without Headers}[#label-Recipe-3A+Parse+from+IO+Stream+Without+Headers]
+- {RFC 4180 Compliance}[#label-RFC+4180+Compliance]
+ - {Row Separator}[#label-Row+Separator]
+ - {Recipe: Handle Compliant Row Separator}[#label-Recipe-3A+Handle+Compliant+Row+Separator]
+ - {Recipe: Handle Non-Compliant Row Separator}[#label-Recipe-3A+Handle+Non-Compliant+Row+Separator]
+ - {Column Separator}[#label-Column+Separator]
+ - {Recipe: Handle Compliant Column Separator}[#label-Recipe-3A+Handle+Compliant+Column+Separator]
+ - {Recipe: Handle Non-Compliant Column Separator}[#label-Recipe-3A+Handle+Non-Compliant+Column+Separator]
+ - {Quote Character}[#label-Quote+Character]
+ - {Recipe: Handle Compliant Quote Character}[#label-Recipe-3A+Handle+Compliant+Quote+Character]
+ - {Recipe: Handle Non-Compliant Quote Character}[#label-Recipe-3A+Handle+Non-Compliant+Quote+Character]
+ - {Recipe: Allow Liberal Parsing}[#label-Recipe-3A+Allow+Liberal+Parsing]
+- {Special Handling}[#label-Special+Handling]
+ - {Special Line Handling}[#label-Special+Line+Handling]
+ - {Recipe: Ignore Blank Lines}[#label-Recipe-3A+Ignore+Blank+Lines]
+ - {Recipe: Ignore Selected Lines}[#label-Recipe-3A+Ignore+Selected+Lines]
+ - {Special Field Handling}[#label-Special+Field+Handling]
+ - {Recipe: Strip Fields}[#label-Recipe-3A+Strip+Fields]
+ - {Recipe: Handle Null Fields}[#label-Recipe-3A+Handle+Null+Fields]
+ - {Recipe: Handle Empty Fields}[#label-Recipe-3A+Handle+Empty+Fields]
+- {Converting Fields}[#label-Converting+Fields]
+ - {Converting Fields to Objects}[#label-Converting+Fields+to+Objects]
+ - {Recipe: Convert Fields to Integers}[#label-Recipe-3A+Convert+Fields+to+Integers]
+ - {Recipe: Convert Fields to Floats}[#label-Recipe-3A+Convert+Fields+to+Floats]
+ - {Recipe: Convert Fields to Numerics}[#label-Recipe-3A+Convert+Fields+to+Numerics]
+ - {Recipe: Convert Fields to Dates}[#label-Recipe-3A+Convert+Fields+to+Dates]
+ - {Recipe: Convert Fields to DateTimes}[#label-Recipe-3A+Convert+Fields+to+DateTimes]
+ - {Recipe: Convert Assorted Fields to Objects}[#label-Recipe-3A+Convert+Assorted+Fields+to+Objects]
+ - {Recipe: Convert Fields to Other Objects}[#label-Recipe-3A+Convert+Fields+to+Other+Objects]
+ - {Recipe: Filter Field Strings}[#label-Recipe-3A+Filter+Field+Strings]
+ - {Recipe: Register Field Converters}[#label-Recipe-3A+Register+Field+Converters]
+ - {Using Multiple Field Converters}[#label-Using+Multiple+Field+Converters]
+ - {Recipe: Specify Multiple Field Converters in Option :converters}[#label-Recipe-3A+Specify+Multiple+Field+Converters+in+Option+-3Aconverters]
+ - {Recipe: Specify Multiple Field Converters in a Custom Converter List}[#label-Recipe-3A+Specify+Multiple+Field+Converters+in+a+Custom+Converter+List]
+- {Converting Headers}[#label-Converting+Headers]
+ - {Recipe: Convert Headers to Lowercase}[#label-Recipe-3A+Convert+Headers+to+Lowercase]
+ - {Recipe: Convert Headers to Symbols}[#label-Recipe-3A+Convert+Headers+to+Symbols]
+ - {Recipe: Filter Header Strings}[#label-Recipe-3A+Filter+Header+Strings]
+ - {Recipe: Register Header Converters}[#label-Recipe-3A+Register+Header+Converters]
+ - {Using Multiple Header Converters}[#label-Using+Multiple+Header+Converters]
+ - {Recipe: Specify Multiple Header Converters in Option :header_converters}[#label-Recipe-3A+Specify+Multiple+Header+Converters+in+Option+-3Aheader_converters]
+ - {Recipe: Specify Multiple Header Converters in a Custom Header Converter List}[#label-Recipe-3A+Specify+Multiple+Header+Converters+in+a+Custom+Header+Converter+List]
+- {Diagnostics}[#label-Diagnostics]
+ - {Recipe: Capture Unconverted Fields}[#label-Recipe-3A+Capture+Unconverted+Fields]
+ - {Recipe: Capture Field Info}[#label-Recipe-3A+Capture+Field+Info]
+
+=== Source Formats
+
+You can parse \CSV data from a \String, from a \File (via its path), or from an \IO stream.
+
+==== Parsing from a \String
+
+You can parse \CSV data from a \String, with or without headers.
+
+===== Recipe: Parse from \String with Headers
+
+Use class method CSV.parse with option +headers+ to read a source \String all at once
+(may have memory resource implications):
+ string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ CSV.parse(string, headers: true) # => #<CSV::Table mode:col_or_row row_count:4>
+
+Use instance method CSV#each with option +headers+ to read a source \String one row at a time:
+ CSV.new(string, headers: true).each do |row|
+ p row
+ end
+Output:
+ #<CSV::Row "Name":"foo" "Value":"0">
+ #<CSV::Row "Name":"bar" "Value":"1">
+ #<CSV::Row "Name":"baz" "Value":"2">
+
+===== Recipe: Parse from \String Without Headers
+
+Use class method CSV.parse without option +headers+ to read a source \String all at once
+(may have memory resource implications):
+ string = "foo,0\nbar,1\nbaz,2\n"
+ CSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Use instance method CSV#each without option +headers+ to read a source \String one row at a time:
+ CSV.new(string).each do |row|
+ p row
+ end
+Output:
+ ["foo", "0"]
+ ["bar", "1"]
+ ["baz", "2"]
+
+==== Parsing from a \File
+
+You can parse \CSV data from a \File, with or without headers.
+
+===== Recipe: Parse from \File with Headers
+
+Use instance method CSV#read with option +headers+ to read a file all at once:
+ string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, string)
+ CSV.read(path, headers: true) # => #<CSV::Table mode:col_or_row row_count:4>
+
+Use class method CSV.foreach with option +headers+ to read one row at a time:
+ CSV.foreach(path, headers: true) do |row|
+ p row
+ end
+Output:
+ #<CSV::Row "Name":"foo" "Value":"0">
+ #<CSV::Row "Name":"bar" "Value":"1">
+ #<CSV::Row "Name":"baz" "Value":"2">
+
+===== Recipe: Parse from \File Without Headers
+
+Use class method CSV.read without option +headers+ to read a file all at once:
+ string = "foo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, string)
+ CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Use class method CSV.foreach without option +headers+ to read one row at a time:
+ CSV.foreach(path) do |row|
+ p row
+ end
+Output:
+ ["foo", "0"]
+ ["bar", "1"]
+ ["baz", "2"]
+
+==== Parsing from an \IO Stream
+
+You can parse \CSV data from an \IO stream, with or without headers.
+
+===== Recipe: Parse from \IO Stream with Headers
+
+Use class method CSV.parse with option +headers+ to read an \IO stream all at once:
+ string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, string)
+ File.open(path) do |file|
+ CSV.parse(file, headers: true)
+ end # => #<CSV::Table mode:col_or_row row_count:4>
+
+Use class method CSV.foreach with option +headers+ to read one row at a time:
+ File.open(path) do |file|
+ CSV.foreach(file, headers: true) do |row|
+ p row
+ end
+ end
+Output:
+ #<CSV::Row "Name":"foo" "Value":"0">
+ #<CSV::Row "Name":"bar" "Value":"1">
+ #<CSV::Row "Name":"baz" "Value":"2">
+
+===== Recipe: Parse from \IO Stream Without Headers
+
+Use class method CSV.parse without option +headers+ to read an \IO stream all at once:
+ string = "foo,0\nbar,1\nbaz,2\n"
+ path = 't.csv'
+ File.write(path, string)
+ File.open(path) do |file|
+ CSV.parse(file)
+ end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+Use class method CSV.foreach without option +headers+ to read one row at a time:
+ File.open(path) do |file|
+ CSV.foreach(file) do |row|
+ p row
+ end
+ end
+Output:
+ ["foo", "0"]
+ ["bar", "1"]
+ ["baz", "2"]
+
+=== RFC 4180 Compliance
+
+By default, \CSV parses data that is compliant with
+{RFC 4180}[https://tools.ietf.org/html/rfc4180]
+with respect to:
+- Row separator.
+- Column separator.
+- Quote character.
+
+==== Row Separator
+
+RFC 4180 specifies the row separator CRLF (Ruby <tt>"\r\n"</tt>).
+
+Although the \CSV default row separator is <tt>"\n"</tt>,
+the parser also by default handles row separator <tt>"\r"</tt> and the RFC-compliant <tt>"\r\n"</tt>.
+
+===== Recipe: Handle Compliant Row Separator
+
+For strict compliance, use option +:row_sep+ to specify row separator <tt>"\r\n"</tt>,
+which allows the compliant row separator:
+ source = "foo,1\r\nbar,1\r\nbaz,2\r\n"
+ CSV.parse(source, row_sep: "\r\n") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+But rejects other row separators:
+ source = "foo,1\nbar,1\nbaz,2\n"
+ CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError
+ source = "foo,1\rbar,1\rbaz,2\r"
+ CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError
+ source = "foo,1\n\rbar,1\n\rbaz,2\n\r"
+ CSV.parse(source, row_sep: "\r\n") # Raised MalformedCSVError
+
+===== Recipe: Handle Non-Compliant Row Separator
+
+For data with non-compliant row separators, use option +:row_sep+.
+This example source uses semicolon (<tt>";"</tt>) as its row separator:
+ source = "foo,1;bar,1;baz,2;"
+ CSV.parse(source, row_sep: ';') # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+
+==== Column Separator
+
+RFC 4180 specifies column separator COMMA (Ruby <tt>","</tt>).
+
+===== Recipe: Handle Compliant Column Separator
+
+Because the \CSV default comma separator is ',',
+you need not specify option +:col_sep+ for compliant data:
+ source = "foo,1\nbar,1\nbaz,2\n"
+ CSV.parse(source) # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+
+===== Recipe: Handle Non-Compliant Column Separator
+
+For data with non-compliant column separators, use option +:col_sep+.
+This example source uses TAB (<tt>"\t"</tt>) as its column separator:
+ source = "foo,1\tbar,1\tbaz,2"
+ CSV.parse(source, col_sep: "\t") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+
+==== Quote Character
+
+RFC 4180 specifies quote character DQUOTE (Ruby <tt>"\""</tt>).
+
+===== Recipe: Handle Compliant Quote Character
+
+Because the \CSV default quote character is <tt>"\""</tt>,
+you need not specify option +:quote_char+ for compliant data:
+ source = "\"foo\",\"1\"\n\"bar\",\"1\"\n\"baz\",\"2\"\n"
+ CSV.parse(source) # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+
+===== Recipe: Handle Non-Compliant Quote Character
+
+For data with non-compliant quote characters, use option +:quote_char+.
+This example source uses SQUOTE (<tt>"'"</tt>) as its quote character:
+ source = "'foo','1'\n'bar','1'\n'baz','2'\n"
+ CSV.parse(source, quote_char: "'") # => [["foo", "1"], ["bar", "1"], ["baz", "2"]]
+
+==== Recipe: Allow Liberal Parsing
+
+Use option +:liberal_parsing+ to specify that \CSV should
+attempt to parse input not conformant with RFC 4180, such as double quotes in unquoted fields:
+ source = 'is,this "three, or four",fields'
+ CSV.parse(source) # Raises MalformedCSVError
+ CSV.parse(source, liberal_parsing: true) # => [["is", "this \"three", " or four\"", "fields"]]
+
+=== Special Handling
+
+You can use parsing options to specify special handling for certain lines and fields.
+
+==== Special Line Handling
+
+Use parsing options to specify special handling for blank lines, or for other selected lines.
+
+===== Recipe: Ignore Blank Lines
+
+Use option +:skip_blanks+ to ignore blank lines:
+ source = <<-EOT
+ foo,0
+
+ bar,1
+ baz,2
+
+ ,
+ EOT
+ parsed = CSV.parse(source, skip_blanks: true)
+ parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"], [nil, nil]]
+
+===== Recipe: Ignore Selected Lines
+
+Use option +:skip_lines+ to ignore selected lines.
+ source = <<-EOT
+ # Comment
+ foo,0
+ bar,1
+ baz,2
+ # Another comment
+ EOT
+ parsed = CSV.parse(source, skip_lines: /^#/)
+ parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+
+==== Special Field Handling
+
+Use parsing options to specify special handling for certain field values.
+
+===== Recipe: Strip Fields
+
+Use option +:strip+ to strip parsed field values:
+ CSV.parse_line(' a , b ', strip: true) # => ["a", "b"]
+
+===== Recipe: Handle Null Fields
+
+Use option +:nil_value+ to specify a value that will replace each field
+that is null (no text):
+ CSV.parse_line('a,,b,,c', nil_value: 0) # => ["a", 0, "b", 0, "c"]
+
+===== Recipe: Handle Empty Fields
+
+Use option +:empty_value+ to specify a value that will replace each field
+that is empty (\String of length 0);
+ CSV.parse_line('a,"",b,"",c', empty_value: 'x') # => ["a", "x", "b", "x", "c"]
+
+=== Converting Fields
+
+You can use field converters to change parsed \String fields into other objects,
+or to otherwise modify the \String fields.
+
+==== Converting Fields to Objects
+
+Use field converters to change parsed \String objects into other, more specific, objects.
+
+There are built-in field converters for converting to objects of certain classes:
+- \Float
+- \Integer
+- \Date
+- \DateTime
+
+Other built-in field converters include:
+- +:numeric+: converts to \Integer and \Float.
+- +:all+: converts to \DateTime, \Integer, \Float.
+
+You can also define field converters to convert to objects of other classes.
+
+===== Recipe: Convert Fields to Integers
+
+Convert fields to \Integer objects using built-in converter +:integer+:
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, converters: :integer)
+ parsed.map {|row| row['Value'].class} # => [Integer, Integer, Integer]
+
+===== Recipe: Convert Fields to Floats
+
+Convert fields to \Float objects using built-in converter +:float+:
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, converters: :float)
+ parsed.map {|row| row['Value'].class} # => [Float, Float, Float]
+
+===== Recipe: Convert Fields to Numerics
+
+Convert fields to \Integer and \Float objects using built-in converter +:numeric+:
+ source = "Name,Value\nfoo,0\nbar,1.1\nbaz,2.2\n"
+ parsed = CSV.parse(source, headers: true, converters: :numeric)
+ parsed.map {|row| row['Value'].class} # => [Integer, Float, Float]
+
+===== Recipe: Convert Fields to Dates
+
+Convert fields to \Date objects using built-in converter +:date+:
+ source = "Name,Date\nfoo,2001-02-03\nbar,2001-02-04\nbaz,2001-02-03\n"
+ parsed = CSV.parse(source, headers: true, converters: :date)
+ parsed.map {|row| row['Date'].class} # => [Date, Date, Date]
+
+===== Recipe: Convert Fields to DateTimes
+
+Convert fields to \DateTime objects using built-in converter +:date_time+:
+ source = "Name,DateTime\nfoo,2001-02-03\nbar,2001-02-04\nbaz,2020-05-07T14:59:00-05:00\n"
+ parsed = CSV.parse(source, headers: true, converters: :date_time)
+ parsed.map {|row| row['DateTime'].class} # => [DateTime, DateTime, DateTime]
+
+===== Recipe: Convert Assorted Fields to Objects
+
+Convert assorted fields to objects using built-in converter +:all+:
+ source = "Type,Value\nInteger,0\nFloat,1.0\nDateTime,2001-02-04\n"
+ parsed = CSV.parse(source, headers: true, converters: :all)
+ parsed.map {|row| row['Value'].class} # => [Integer, Float, DateTime]
+
+===== Recipe: Convert Fields to Other Objects
+
+Define a custom field converter to convert \String fields into other objects.
+This example defines and uses a custom field converter
+that converts each column-1 value to a \Rational object:
+ rational_converter = proc do |field, field_context|
+ field_context.index == 1 ? field.to_r : field
+ end
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, converters: rational_converter)
+ parsed.map {|row| row['Value'].class} # => [Rational, Rational, Rational]
+
+==== Recipe: Filter Field Strings
+
+Define a custom field converter to modify \String fields.
+This example defines and uses a custom field converter
+that strips whitespace from each field value:
+ strip_converter = proc {|field| field.strip }
+ source = "Name,Value\n foo , 0 \n bar , 1 \n baz , 2 \n"
+ parsed = CSV.parse(source, headers: true, converters: strip_converter)
+ parsed['Name'] # => ["foo", "bar", "baz"]
+ parsed['Value'] # => ["0", "1", "2"]
+
+==== Recipe: Register Field Converters
+
+Register a custom field converter, assigning it a name;
+then refer to the converter by its name:
+ rational_converter = proc do |field, field_context|
+ field_context.index == 1 ? field.to_r : field
+ end
+ CSV::Converters[:rational] = rational_converter
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, converters: :rational)
+ parsed['Value'] # => [(0/1), (1/1), (2/1)]
+
+==== Using Multiple Field Converters
+
+You can use multiple field converters in either of these ways:
+- Specify converters in option +:converters+.
+- Specify converters in a custom converter list.
+
+===== Recipe: Specify Multiple Field Converters in Option +:converters+
+
+Apply multiple field converters by specifying them in option +:converters+:
+ source = "Name,Value\nfoo,0\nbar,1.0\nbaz,2.0\n"
+ parsed = CSV.parse(source, headers: true, converters: [:integer, :float])
+ parsed['Value'] # => [0, 1.0, 2.0]
+
+===== Recipe: Specify Multiple Field Converters in a Custom Converter List
+
+Apply multiple field converters by defining and registering a custom converter list:
+ strip_converter = proc {|field| field.strip }
+ CSV::Converters[:strip] = strip_converter
+ CSV::Converters[:my_converters] = [:integer, :float, :strip]
+ source = "Name,Value\n foo , 0 \n bar , 1.0 \n baz , 2.0 \n"
+ parsed = CSV.parse(source, headers: true, converters: :my_converters)
+ parsed['Name'] # => ["foo", "bar", "baz"]
+ parsed['Value'] # => [0, 1.0, 2.0]
+
+=== Converting Headers
+
+You can use header converters to modify parsed \String headers.
+
+Built-in header converters include:
+- +:symbol+: converts \String header to \Symbol.
+- +:downcase+: converts \String header to lowercase.
+
+You can also define header converters to otherwise modify header \Strings.
+
+==== Recipe: Convert Headers to Lowercase
+
+Convert headers to lowercase using built-in converter +:downcase+:
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, header_converters: :downcase)
+ parsed.headers # => ["name", "value"]
+
+==== Recipe: Convert Headers to Symbols
+
+Convert headers to downcased Symbols using built-in converter +:symbol+:
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, header_converters: :symbol)
+ parsed.headers # => [:name, :value]
+ parsed.headers.map {|header| header.class} # => [Symbol, Symbol]
+
+==== Recipe: Filter Header Strings
+
+Define a custom header converter to modify \String fields.
+This example defines and uses a custom header converter
+that capitalizes each header \String:
+ capitalize_converter = proc {|header| header.capitalize }
+ source = "NAME,VALUE\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, header_converters: capitalize_converter)
+ parsed.headers # => ["Name", "Value"]
+
+==== Recipe: Register Header Converters
+
+Register a custom header converter, assigning it a name;
+then refer to the converter by its name:
+ capitalize_converter = proc {|header| header.capitalize }
+ CSV::HeaderConverters[:capitalize] = capitalize_converter
+ source = "NAME,VALUE\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, headers: true, header_converters: :capitalize)
+ parsed.headers # => ["Name", "Value"]
+
+==== Using Multiple Header Converters
+
+You can use multiple header converters in either of these ways:
+- Specify header converters in option +:header_converters+.
+- Specify header converters in a custom header converter list.
+
+===== Recipe: Specify Multiple Header Converters in Option :header_converters
+
+Apply multiple header converters by specifying them in option +:header_converters+:
+ source = "Name,Value\nfoo,0\nbar,1.0\nbaz,2.0\n"
+ parsed = CSV.parse(source, headers: true, header_converters: [:downcase, :symbol])
+ parsed.headers # => [:name, :value]
+
+===== Recipe: Specify Multiple Header Converters in a Custom Header Converter List
+
+Apply multiple header converters by defining and registering a custom header converter list:
+ CSV::HeaderConverters[:my_header_converters] = [:symbol, :downcase]
+ source = "NAME,VALUE\nfoo,0\nbar,1.0\nbaz,2.0\n"
+ parsed = CSV.parse(source, headers: true, header_converters: :my_header_converters)
+ parsed.headers # => [:name, :value]
+
+=== Diagnostics
+
+==== Recipe: Capture Unconverted Fields
+
+To capture unconverted field values, use option +:unconverted_fields+:
+ source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ parsed = CSV.parse(source, converters: :integer, unconverted_fields: true)
+ parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ parsed.each {|row| p row.unconverted_fields }
+Output:
+ ["Name", "Value"]
+ ["foo", "0"]
+ ["bar", "1"]
+ ["baz", "2"]
+
+==== Recipe: Capture Field Info
+
+To capture field info in a custom converter, accept two block arguments.
+The first is the field value; the second is a +CSV::FieldInfo+ object:
+ strip_converter = proc {|field, field_info| p field_info; field.strip }
+ source = " foo , 0 \n bar , 1 \n baz , 2 \n"
+ parsed = CSV.parse(source, converters: strip_converter)
+ parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+Output:
+ #<struct CSV::FieldInfo index=0, line=1, header=nil>
+ #<struct CSV::FieldInfo index=1, line=1, header=nil>
+ #<struct CSV::FieldInfo index=0, line=2, header=nil>
+ #<struct CSV::FieldInfo index=1, line=2, header=nil>
+ #<struct CSV::FieldInfo index=0, line=3, header=nil>
+ #<struct CSV::FieldInfo index=1, line=3, header=nil>
diff --git a/doc/csv/recipes/recipes.rdoc b/doc/csv/recipes/recipes.rdoc
new file mode 100644
index 0000000000..9e4eaa1da4
--- /dev/null
+++ b/doc/csv/recipes/recipes.rdoc
@@ -0,0 +1,6 @@
+== Recipes for \CSV
+
+See:
+- {Recipes for Parsing CSV}[./parsing_rdoc.html]
+- {Recipes for Generating CSV}[./generating_rdoc.html]
+- {Recipes for Filtering CSV}[./filtering_rdoc.html]
diff --git a/doc/date/calendars.rdoc b/doc/date/calendars.rdoc
new file mode 100644
index 0000000000..b8690841b1
--- /dev/null
+++ b/doc/date/calendars.rdoc
@@ -0,0 +1,62 @@
+== Julian and Gregorian Calendars
+
+The difference between the
+{Julian calendar}[https://en.wikipedia.org/wiki/Julian_calendar]
+and the
+{Gregorian calendar}[https://en.wikipedia.org/wiki/Gregorian_calendar]
+may matter to your program if it uses dates before the switchovers.
+
+- October 15, 1582.
+- September 14, 1752.
+
+A date will be different in the two calendars, in general.
+
+=== Different switchover dates
+
+The reasons for the difference are religious/political histories.
+
+- On October 15, 1582, several countries changed
+ from the Julian calendar to the Gregorian calendar;
+ these included Italy, Poland, Portugal, and Spain.
+ Other contries in the Western world retained the Julian calendar.
+- On September 14, 1752, most of the British empire
+ changed from the Julian calendar to the Gregorian calendar.
+
+When your code uses a date before these switchover dates,
+it will matter whether it considers the switchover date
+to be the earlier date or the later date (or neither).
+
+See also {a concrete example here}[rdoc-ref:DateTime@When+should+you+use+DateTime+and+when+should+you+use+Time-3F].
+
+=== Argument +start+
+
+Certain methods in class \Date handle differences in the
+{Julian and Gregorian calendars}[rdoc-ref:calendars.rdoc@Julian+and+Gregorian+Calendars]
+by accepting an optional argument +start+, whose value may be:
+
+- Date::ITALY (the default): the created date is Julian
+ if before October 15, 1582, Gregorian otherwise:
+
+ d = Date.new(1582, 10, 15)
+ d.prev_day.julian? # => true
+ d.julian? # => false
+ d.gregorian? # => true
+
+- Date::ENGLAND: the created date is Julian if before September 14, 1752,
+ Gregorian otherwise:
+
+ d = Date.new(1752, 9, 14, Date::ENGLAND)
+ d.prev_day.julian? # => true
+ d.julian? # => false
+ d.gregorian? # => true
+
+- Date::JULIAN: the created date is Julian regardless of its value:
+
+ d = Date.new(1582, 10, 15, Date::JULIAN)
+ d.julian? # => true
+
+- Date::GREGORIAN: the created date is Gregorian regardless of its value:
+
+ d = Date.new(1752, 9, 14, Date::GREGORIAN)
+ d.prev_day.gregorian? # => true
+
diff --git a/doc/dig_methods.rdoc b/doc/dig_methods.rdoc
new file mode 100644
index 0000000000..366275d451
--- /dev/null
+++ b/doc/dig_methods.rdoc
@@ -0,0 +1,82 @@
+= Dig Methods
+
+Ruby's +dig+ methods are useful for accessing nested data structures.
+
+Consider this data:
+ item = {
+ id: "0001",
+ type: "donut",
+ name: "Cake",
+ ppu: 0.55,
+ batters: {
+ batter: [
+ {id: "1001", type: "Regular"},
+ {id: "1002", type: "Chocolate"},
+ {id: "1003", type: "Blueberry"},
+ {id: "1004", type: "Devil's Food"}
+ ]
+ },
+ topping: [
+ {id: "5001", type: "None"},
+ {id: "5002", type: "Glazed"},
+ {id: "5005", type: "Sugar"},
+ {id: "5007", type: "Powdered Sugar"},
+ {id: "5006", type: "Chocolate with Sprinkles"},
+ {id: "5003", type: "Chocolate"},
+ {id: "5004", type: "Maple"}
+ ]
+ }
+
+Without a +dig+ method, you can write:
+ item[:batters][:batter][1][:type] # => "Chocolate"
+
+With a +dig+ method, you can write:
+ item.dig(:batters, :batter, 1, :type) # => "Chocolate"
+
+Without a +dig+ method, you can write, erroneously
+(raises <tt>NoMethodError (undefined method `[]' for nil:NilClass)</tt>):
+ item[:batters][:BATTER][1][:type]
+
+With a +dig+ method, you can write (still erroneously, but avoiding the exception):
+ item.dig(:batters, :BATTER, 1, :type) # => nil
+
+== Why Is +dig+ Better?
+
+- It has fewer syntactical elements (to get wrong).
+- It reads better.
+- It does not raise an exception if an item is not found.
+
+== How Does +dig+ Work?
+
+The call sequence is:
+ obj.dig(*identifiers)
+
+The +identifiers+ define a "path" into the nested data structures:
+- For each identifier in +identifiers+, calls method \#dig on a receiver
+ with that identifier.
+- The first receiver is +self+.
+- Each successive receiver is the value returned by the previous call to +dig+.
+- The value finally returned is the value returned by the last call to +dig+.
+
+A +dig+ method raises an exception if any receiver does not respond to \#dig:
+ h = { foo: 1 }
+ # Raises TypeError (Integer does not have #dig method):
+ h.dig(:foo, :bar)
+
+== What Else?
+
+The structure above has \Hash objects and \Array objects,
+both of which have instance method +dig+.
+
+Altogether there are six built-in Ruby classes that have method +dig+,
+three in the core classes and three in the standard library.
+
+In the core:
+- Array#dig: the first argument is an \Integer index.
+- Hash#dig: the first argument is a key.
+- Struct#dig: the first argument is a key.
+
+In the standard library:
+- OpenStruct#dig: the first argument is a \String name.
+- CSV::Table#dig: the first argument is an \Integer index or a \String header.
+- CSV::Row#dig: the first argument is an \Integer index or a \String header.
diff --git a/doc/dtrace_probes.rdoc b/doc/dtrace_probes.rdoc
index d2cdd56902..1b20597ab4 100644
--- a/doc/dtrace_probes.rdoc
+++ b/doc/dtrace_probes.rdoc
@@ -52,15 +52,21 @@ with when they are fired and the arguments they take:
[ruby:::method-entry(classname, methodname, filename, lineno);]
This probe is fired just before a method is entered.
- classname name of the class (a string)
- methodname name of the method about to be executed (a string)
- filename the file name where the method is _being called_ (a string)
- lineno the line number where the method is _being called_ (an int)
+ classname:: name of the class (a string)
+ methodname:: name of the method about to be executed (a string)
+ filename:: the file name where the method is _being called_ (a string)
+ lineno:: the line number where the method is _being called_ (an int)
+
+ *NOTE*: will only be fired if tracing is enabled, e.g. with: <code>TracePoint.new{}.enable</code>.
+ See Feature#14104[https://bugs.ruby-lang.org/issues/14104] for more details.
[ruby:::method-return(classname, methodname, filename, lineno);]
This probe is fired just after a method has returned. The arguments are the
same as "ruby:::method-entry".
+ *NOTE*: will only be fired if tracing is enabled, e.g. with: <code>TracePoint.new{}.enable</code>.
+ See Feature#14104[https://bugs.ruby-lang.org/issues/14104] for more details.
+
[ruby:::cmethod-entry(classname, methodname, filename, lineno);]
This probe is fired just before a C method is entered. The arguments are the
same as "ruby:::method-entry".
@@ -72,9 +78,9 @@ with when they are fired and the arguments they take:
[ruby:::require-entry(requiredfile, filename, lineno);]
This probe is fired on calls to rb_require_safe (when a file is required).
- requiredfile is the name of the file to be required (string).
- filename is the file that called "require" (string).
- lineno is the line number where the call to require was made (int).
+ requiredfile:: the name of the file to be required (string).
+ filename:: the file that called "+require+" (string).
+ lineno:: the line number where the call to require was made (int).
[ruby:::require-return(requiredfile, filename, lineno);]
This probe is fired just before rb_require_safe (when a file is required)
@@ -84,11 +90,11 @@ with when they are fired and the arguments they take:
[ruby:::find-require-entry(requiredfile, filename, lineno);]
This probe is fired right before search_required is called. search_required
determines whether the file has already been required by searching loaded
- features ($"), and if not, figures out which file must be loaded.
+ features (<code>$"</code>), and if not, figures out which file must be loaded.
- requiredfile is the file to be required (string).
- filename is the file that called "require" (string).
- lineno is the line number where the call to require was made (int).
+ requiredfile:: the file to be required (string).
+ filename:: the file that called "require" (string).
+ lineno:: the line number where the call to require was made (int).
[ruby:::find-require-return(requiredfile, filename, lineno);]
This probe is fired right after search_required returns. See the
@@ -106,56 +112,56 @@ with when they are fired and the arguments they take:
[ruby:::raise(classname, filename, lineno);]
This probe is fired when an exception is raised.
- classname is the class name of the raised exception (string)
- filename the name of the file where the exception was raised (string)
- lineno the line number in the file where the exception was raised (int)
+ classname:: the class name of the raised exception (string)
+ filename:: the name of the file where the exception was raised (string)
+ lineno:: the line number in the file where the exception was raised (int)
[ruby:::object-create(classname, filename, lineno);]
This probe is fired when an object is about to be allocated.
- classname the class of the allocated object (string)
- filename the name of the file where the object is allocated (string)
- lineno the line number in the file where the object is allocated (int)
+ classname:: the class of the allocated object (string)
+ filename:: the name of the file where the object is allocated (string)
+ lineno:: the line number in the file where the object is allocated (int)
[ruby:::array-create(length, filename, lineno);]
This probe is fired when an Array is about to be allocated.
- length the size of the array (long)
- filename the name of the file where the array is allocated (string)
- lineno the line number in the file where the array is allocated (int)
+ length:: the size of the array (long)
+ filename:: the name of the file where the array is allocated (string)
+ lineno:: the line number in the file where the array is allocated (int)
[ruby:::hash-create(length, filename, lineno);]
This probe is fired when a Hash is about to be allocated.
- length the size of the hash (long)
- filename the name of the file where the hash is allocated (string)
- lineno the line number in the file where the hash is allocated (int)
+ length:: the size of the hash (long)
+ filename:: the name of the file where the hash is allocated (string)
+ lineno:: the line number in the file where the hash is allocated (int)
[ruby:::string-create(length, filename, lineno);]
This probe is fired when a String is about to be allocated.
- length the size of the string (long)
- filename the name of the file where the string is allocated (string)
- lineno the line number in the file where the string is allocated (int)
+ length:: the size of the string (long)
+ filename:: the name of the file where the string is allocated (string)
+ lineno:: the line number in the file where the string is allocated (int)
[ruby:::symbol-create(str, filename, lineno);]
This probe is fired when a Symbol is about to be allocated.
- str the contents of the symbol (string)
- filename the name of the file where the string is allocated (string)
- lineno the line number in the file where the string is allocated (int)
+ str:: the contents of the symbol (string)
+ filename:: the name of the file where the string is allocated (string)
+ lineno:: the line number in the file where the string is allocated (int)
[ruby:::parse-begin(sourcefile, lineno);]
Fired just before parsing and compiling a source file.
- sourcefile the file being parsed (string)
- lineno the line number where the source starts (int)
+ sourcefile:: the file being parsed (string)
+ lineno:: the line number where the source starts (int)
[ruby:::parse-end(sourcefile, lineno);]
Fired just after parsing and compiling a source file.
- sourcefile the file being parsed (string)
- lineno the line number where the source ended (int)
+ sourcefile:: the file being parsed (string)
+ lineno:: the line number where the source ended (int)
[ruby:::gc-mark-begin();]
Fired at the beginning of a mark phase.
@@ -172,7 +178,7 @@ with when they are fired and the arguments they take:
[ruby:::method-cache-clear(class, sourcefile, lineno);]
Fired when the method cache is cleared.
- class is the classname being cleared, or "global" (string)
- sourcefile the file being parsed (string)
- lineno the line number where the source ended (int)
+ class:: the classname being cleared, or "global" (string)
+ sourcefile:: the file being parsed (string)
+ lineno:: the line number where the source ended (int)
diff --git a/doc/encodings.rdoc b/doc/encodings.rdoc
new file mode 100644
index 0000000000..1f3c54d740
--- /dev/null
+++ b/doc/encodings.rdoc
@@ -0,0 +1,479 @@
+== Encodings
+
+=== The Basics
+
+A {character encoding}[https://en.wikipedia.org/wiki/Character_encoding],
+often shortened to _encoding_, is a mapping between:
+
+- A sequence of 8-bit bytes (each byte in the range <tt>0..255</tt>).
+- Characters in a specific character set.
+
+Some character sets contain only 1-byte characters;
+{US-ASCII}[https://en.wikipedia.org/wiki/ASCII], for example, has 256 1-byte characters.
+This string, encoded in US-ASCII, has six characters that are stored as six bytes:
+
+ s = 'Hello!'.encode('US-ASCII') # => "Hello!"
+ s.encoding # => #<Encoding:US-ASCII>
+ s.bytes # => [72, 101, 108, 108, 111, 33]
+
+Other encodings may involve multi-byte characters.
+{UTF-8}[https://en.wikipedia.org/wiki/UTF-8], for example,
+encodes more than one million characters, encoding each in one to four bytes.
+The lowest-valued of these characters correspond to ASCII characters,
+and so are 1-byte characters:
+
+ s = 'Hello!' # => "Hello!"
+ s.bytes # => [72, 101, 108, 108, 111, 33]
+
+Other characters, such as the Euro symbol, are multi-byte:
+
+ s = "\u20ac" # => "€"
+ s.bytes # => [226, 130, 172]
+
+=== The \Encoding \Class
+
+==== \Encoding Objects
+
+Ruby encodings are defined by constants in class \Encoding.
+There can be only one instance of \Encoding for each of these constants.
+\Method Encoding.list returns an array of \Encoding objects (one for each constant):
+
+ Encoding.list.size # => 103
+ Encoding.list.first.class # => Encoding
+ Encoding.list.take(3)
+ # => [#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>, #<Encoding:US-ASCII>]
+
+==== Names and Aliases
+
+\Method Encoding#name returns the name of an \Encoding:
+
+ Encoding::ASCII_8BIT.name # => "ASCII-8BIT"
+ Encoding::WINDOWS_31J.name # => "Windows-31J"
+
+An \Encoding object has zero or more aliases;
+method Encoding#names returns an array containing the name and all aliases:
+
+ Encoding::ASCII_8BIT.names
+ # => ["ASCII-8BIT", "BINARY"]
+ Encoding::WINDOWS_31J.names
+ #=> ["Windows-31J", "CP932", "csWindows31J", "SJIS", "PCK"]
+
+\Method Encoding.aliases returns a hash of all alias/name pairs:
+
+ Encoding.aliases.size # => 71
+ Encoding.aliases.take(3)
+ # => [["BINARY", "ASCII-8BIT"], ["CP437", "IBM437"], ["CP720", "IBM720"]]
+
+\Method Encoding.name_list returns an array of all the encoding names and aliases:
+
+ Encoding.name_list.size # => 175
+ Encoding.name_list.take(3)
+ # => ["ASCII-8BIT", "UTF-8", "US-ASCII"]
+
+\Method +name_list+ returns more entries than method +list+
+because it includes both the names and their aliases.
+
+\Method Encoding.find returns the \Encoding for a given name or alias, if it exists:
+
+ Encoding.find("US-ASCII") # => #<Encoding:US-ASCII>
+ Encoding.find("US-ASCII").class # => Encoding
+
+==== Default Encodings
+
+\Method Encoding.find, above, also returns a default \Encoding
+for each of these special names:
+
+- +external+: the default external \Encoding:
+
+ Encoding.find("external") # => #<Encoding:UTF-8>
+
+- +internal+: the default internal \Encoding (may be +nil+):
+
+ Encoding.find("internal") # => nil
+
+- +locale+: the default \Encoding for a string from the environment:
+
+ Encoding.find("locale") # => #<Encoding:UTF-8> # Linux
+ Encoding.find("locale") # => #<Encoding:IBM437> # Windows
+
+- +filesystem+: the default \Encoding for a string from the filesystem:
+
+ Encoding.find("filesystem") # => #<Encoding:UTF-8>
+
+\Method Encoding.default_external returns the default external \Encoding:
+
+ Encoding.default_external # => #<Encoding:UTF-8>
+
+\Method Encoding.default_external= sets that value:
+
+ Encoding.default_external = 'US-ASCII' # => "US-ASCII"
+ Encoding.default_external # => #<Encoding:US-ASCII>
+
+\Method Encoding.default_internal returns the default internal \Encoding:
+
+ Encoding.default_internal # => nil
+
+\Method Encoding.default_internal= sets the default internal \Encoding:
+
+ Encoding.default_internal = 'US-ASCII' # => "US-ASCII"
+ Encoding.default_internal # => #<Encoding:US-ASCII>
+
+==== Compatible Encodings
+
+\Method Encoding.compatible? returns whether two given objects are encoding-compatible
+(that is, whether they can be concatenated);
+returns the \Encoding of the concatenated string, or +nil+ if incompatible:
+
+ rus = "\u{442 435 441 442}"
+ eng = 'text'
+ Encoding.compatible?(rus, eng) # => #<Encoding:UTF-8>
+
+ s0 = "\xa1\xa1".force_encoding('iso-8859-1') # => "\xA1\xA1"
+ s1 = "\xa1\xa1".force_encoding('euc-jp') # => "\x{A1A1}"
+ Encoding.compatible?(s0, s1) # => nil
+
+=== \String \Encoding
+
+A Ruby String object has an encoding that is an instance of class \Encoding.
+The encoding may be retrieved by method String#encoding.
+
+The default encoding for a string literal is the script encoding
+(see Encoding@Script+encoding):
+
+ 's'.encoding # => #<Encoding:UTF-8>
+
+The default encoding for a string created with method String.new is:
+
+- For a \String object argument, the encoding of that string.
+- For a string literal, the script encoding (see Encoding@Script+encoding).
+
+In either case, any encoding may be specified:
+
+ s = String.new(encoding: 'UTF-8') # => ""
+ s.encoding # => #<Encoding:UTF-8>
+ s = String.new('foo', encoding: 'ASCII-8BIT') # => "foo"
+ s.encoding # => #<Encoding:ASCII-8BIT>
+
+The encoding for a string may be changed:
+
+ s = "R\xC3\xA9sum\xC3\xA9" # => "Résumé"
+ s.encoding # => #<Encoding:UTF-8>
+ s.force_encoding('ISO-8859-1') # => "R\xC3\xA9sum\xC3\xA9"
+ s.encoding # => #<Encoding:ISO-8859-1>
+
+Changing the assigned encoding does not alter the content of the string;
+it changes only the way the content is to be interpreted:
+
+ s # => "R\xC3\xA9sum\xC3\xA9"
+ s.force_encoding('UTF-8') # => "Résumé"
+
+The actual content of a string may also be altered;
+see {Transcoding a String}[#label-Transcoding+a+String].
+
+Here are a couple of useful query methods:
+
+ s = "abc".force_encoding("UTF-8") # => "abc"
+ s.ascii_only? # => true
+ s = "abc\u{6666}".force_encoding("UTF-8") # => "abc晦"
+ s.ascii_only? # => false
+
+ s = "\xc2\xa1".force_encoding("UTF-8") # => "¡"
+ s.valid_encoding? # => true
+ s = "\xc2".force_encoding("UTF-8") # => "\xC2"
+ s.valid_encoding? # => false
+
+=== \Symbol and \Regexp Encodings
+
+The string stored in a Symbol or Regexp object also has an encoding;
+the encoding may be retrieved by method Symbol#encoding or Regexp#encoding.
+
+The default encoding for these, however, is:
+
+- US-ASCII, if all characters are US-ASCII.
+- The script encoding, otherwise (see Encoding@Script+encoding).
+
+=== Filesystem \Encoding
+
+The filesystem encoding is the default \Encoding for a string from the filesystem:
+
+ Encoding.find("filesystem") # => #<Encoding:UTF-8>
+
+=== Locale \Encoding
+
+The locale encoding is the default encoding for a string from the environment,
+other than from the filesystem:
+
+ Encoding.find('locale') # => #<Encoding:IBM437>
+
+=== Stream Encodings
+
+Certain stream objects can have two encodings; these objects include instances of:
+
+- IO.
+- File.
+- ARGF.
+- StringIO.
+
+The two encodings are:
+
+- An _external_ _encoding_, which identifies the encoding of the stream.
+- An _internal_ _encoding_, which (if not +nil+) specifies the encoding
+ to be used for the string constructed from the stream.
+
+==== External \Encoding
+
+The external encoding, which is an \Encoding object, specifies how bytes read
+from the stream are to be interpreted as characters.
+
+The default external encoding is:
+
+- UTF-8 for a text stream.
+- ASCII-8BIT for a binary stream.
+
+The default external encoding is returned by method Encoding.default_external,
+and may be set by:
+
+- Ruby command-line options <tt>--external_encoding</tt> or <tt>-E</tt>.
+
+You can also set the default external encoding using method Encoding.default_external=,
+but doing so may cause problems; strings created before and after the change
+may have a different encodings.
+
+For an \IO or \File object, the external encoding may be set by:
+
+- Open options +external_encoding+ or +encoding+, when the object is created;
+ see {Open Options}[rdoc-ref:IO@Open+Options].
+
+For an \IO, \File, \ARGF, or \StringIO object, the external encoding may be set by:
+
+- \Methods +set_encoding+ or (except for \ARGF) +set_encoding_by_bom+.
+
+==== Internal \Encoding
+
+The internal encoding, which is an \Encoding object or +nil+,
+specifies how characters read from the stream
+are to be converted to characters in the internal encoding;
+those characters become a string whose encoding is set to the internal encoding.
+
+The default internal encoding is +nil+ (no conversion).
+It is returned by method Encoding.default_internal,
+and may be set by:
+
+- Ruby command-line options <tt>--internal_encoding</tt> or <tt>-E</tt>.
+
+You can also set the default internal encoding using method Encoding.default_internal=,
+but doing so may cause problems; strings created before and after the change
+may have a different encodings.
+
+For an \IO or \File object, the internal encoding may be set by:
+
+- Open options +internal_encoding+ or +encoding+, when the object is created;
+ see {Open Options}[rdoc-ref:IO@Open+Options].
+
+For an \IO, \File, \ARGF, or \StringIO object, the internal encoding may be set by:
+
+- \Method +set_encoding+.
+
+=== Script \Encoding
+
+A Ruby script has a script encoding, which may be retrieved by:
+
+ __ENCODING__ # => #<Encoding:UTF-8>
+
+The default script encoding is UTF-8;
+a Ruby source file may set its script encoding with a magic comment
+on the first line of the file (or second line, if there is a shebang on the first).
+The comment must contain the word +coding+ or +encoding+,
+followed by a colon, space and the Encoding name or alias:
+
+ # encoding: ISO-8859-1
+ __ENCODING__ #=> #<Encoding:ISO-8859-1>
+
+=== Transcoding
+
+_Transcoding_ is the process of changing a sequence of characters
+from one encoding to another.
+
+As far as possible, the characters remain the same,
+but the bytes that represent them may change.
+
+The handling for characters that cannot be represented in the destination encoding
+may be specified by @Encoding+Options.
+
+==== Transcoding a \String
+
+Each of these methods transcodes a string:
+
+- String#encode: Transcodes +self+ into a new string
+ according to given encodings and options.
+- String#encode!: Like String#encode, but transcodes +self+ in place.
+- String#scrub: Transcodes +self+ into a new string
+ by replacing invalid byte sequences with a given or default replacement string.
+- String#scrub!: Like String#scrub, but transcodes +self+ in place.
+- String#unicode_normalize: Transcodes +self+ into a new string
+ according to Unicode normalization.
+- String#unicode_normalize!: Like String#unicode_normalize,
+ but transcodes +self+ in place.
+
+=== Transcoding a Stream
+
+Each of these methods may transcode a stream;
+whether it does so depends on the external and internal encodings:
+
+- IO.foreach: Yields each line of given stream to the block.
+- IO.new: Creates and returns a new \IO object for the given integer file descriptor.
+- IO.open: Creates a new \IO object.
+- IO.pipe: Creates a connected pair of reader and writer \IO objects.
+- IO.popen: Creates an \IO object to interact with a subprocess.
+- IO.read: Returns a string with all or a subset of bytes from the given stream.
+- IO.readlines: Returns an array of strings, which are the lines from the given stream.
+- IO.write: Writes a given string to the given stream.
+
+This example writes a string to a file, encoding it as ISO-8859-1,
+then reads the file into a new string, encoding it as UTF-8:
+
+ s = "R\u00E9sum\u00E9"
+ path = 't.tmp'
+ ext_enc = 'ISO-8859-1'
+ int_enc = 'UTF-8'
+
+ File.write(path, s, external_encoding: ext_enc)
+ raw_text = File.binread(path)
+
+ transcoded_text = File.read(path, external_encoding: ext_enc, internal_encoding: int_enc)
+
+ p raw_text
+ p transcoded_text
+
+Output:
+
+ "R\xE9sum\xE9"
+ "Résumé"
+
+=== \Encoding Options
+
+A number of methods in the Ruby core accept keyword arguments as encoding options.
+
+Some of the options specify or utilize a _replacement_ _string_, to be used
+in certain transcoding operations.
+A replacement string may be in any encoding that can be converted
+to the encoding of the destination string.
+
+These keyword-value pairs specify encoding options:
+
+- For an invalid byte sequence:
+
+ - <tt>:invalid: nil</tt> (default): Raise exception.
+ - <tt>:invalid: :replace</tt>: Replace each invalid byte sequence
+ with the replacement string.
+
+ Examples:
+
+ s = "\x80foo\x80"
+ s.encode('ISO-8859-3') # Raises Encoding::InvalidByteSequenceError.
+ s.encode('ISO-8859-3', invalid: :replace) # => "?foo?"
+
+- For an undefined character:
+
+ - <tt>:undef: nil</tt> (default): Raise exception.
+ - <tt>:undef: :replace</tt>: Replace each undefined character
+ with the replacement string.
+
+ Examples:
+
+ s = "\x80foo\x80"
+ "\x80".encode('UTF-8', 'ASCII-8BIT') # Raises Encoding::UndefinedConversionError.
+ s.encode('UTF-8', 'ASCII-8BIT', undef: :replace) # => "�foo�"
+
+
+- Replacement string:
+
+ - <tt>:replace: nil</tt> (default): Set replacement string to default value:
+ <tt>"\uFFFD"</tt> ("�") for a Unicode encoding, <tt>'?'</tt> otherwise.
+ - <tt>:replace: _some_string_</tt>: Set replacement string to the given +some_string+;
+ overrides +:fallback+.
+
+ Examples:
+
+ s = "\xA5foo\xA5"
+ options = {:undef => :replace, :replace => 'xyzzy'}
+ s.encode('UTF-8', 'ISO-8859-3', **options) # => "xyzzyfooxyzzy"
+
+- Replacement fallback:
+
+ One of these may be specified:
+
+ - <tt>:fallback: nil</tt> (default): No replacement fallback.
+ - <tt>:fallback: _hash_like_object_</tt>: Set replacement fallback to the given
+ +hash_like_object+; the replacement string is <tt>_hash_like_object_[X]</tt>.
+ - <tt>:fallback: _method_</tt>: Set replacement fallback to the given
+ +method+; the replacement string is <tt>_method_(X)</tt>.
+ - <tt>:fallback: _proc_</tt>: Set replacement fallback to the given
+ +proc+; the replacement string is <tt>_proc_[X]</tt>.
+
+ Examples:
+
+ s = "\u3042foo\u3043"
+
+ hash = {"\u3042" => 'xyzzy'}
+ hash.default = 'XYZZY'
+ s.encode('ASCII', fallback: h) # => "xyzzyfooXYZZY"
+
+ def (fallback = "U+%.4X").escape(x)
+ self % x.unpack("U")
+ end
+ "\u{3042}".encode("US-ASCII", fallback: fallback.method(:escape)) # => "U+3042"
+
+ proc = Proc.new {|x| x == "\u3042" ? 'xyzzy' : 'XYZZY' }
+ s.encode('ASCII', fallback: proc) # => "XYZZYfooXYZZY"
+
+- XML entities:
+
+ One of these may be specified:
+
+ - <tt>:xml: nil</tt> (default): No handling for XML entities.
+ - <tt>:xml: :text</tt>: Treat source text as XML;
+ replace each undefined character
+ with its upper-case hexdecimal numeric character reference,
+ except that:
+
+ - <tt>&</tt> is replaced with <tt>&amp;</tt>.
+ - <tt><</tt> is replaced with <tt>&lt;</tt>.
+ - <tt>></tt> is replaced with <tt>&gt;</tt>.
+
+ - <tt>:xml: :attr</tt>: Treat source text as XML attribute value;
+ replace each undefined character
+ with its upper-case hexdecimal numeric character reference,
+ except that:
+
+ - The replacement string <tt>r</tt> is double-quoted (<tt>"r"</tt>).
+ - Each embedded double-quote is replaced with <tt>&quot;</tt>.
+ - <tt>&</tt> is replaced with <tt>&amp;</tt>.
+ - <tt><</tt> is replaced with <tt>&lt;</tt>.
+ - <tt>></tt> is replaced with <tt>&gt;</tt>.
+
+ Examples:
+
+ s = 'foo"<&>"bar' + "\u3042"
+ s.encode('ASCII', xml: :text) # => "foo\"&lt;&amp;&gt;\"bar&#x3042;"
+ s.encode('ASCII', xml: :attr) # => "\"foo&quot;&lt;&amp;&gt;&quot;bar&#x3042;\""
+
+
+- Newlines:
+
+ One of these may be specified:
+
+ - <tt>:cr_newline: true</tt>: Replace each line-feed character (<tt>"\n"</tt>)
+ with a carriage-return character (<tt>"\r"</tt>).
+ - <tt>:crlf_newline: true</tt>: Replace each line-feed character (<tt>"\n"</tt>)
+ with a carriage-return/line-feed string (<tt>"\r\n"</tt>).
+ - <tt>:universal_newline: true</tt>: Replace each carriage-return
+ character (<tt>"\r"</tt>) and each carriage-return/line-feed string
+ (<tt>"\r\n"</tt>) with a line-feed character (<tt>"\n"</tt>).
+
+ Examples:
+
+ s = "\n \r \r\n" # => "\n \r \r\n"
+ s.encode('ASCII', cr_newline: true) # => "\r \r \r\r"
+ s.encode('ASCII', crlf_newline: true) # => "\r\n \r \r\r\n"
+ s.encode('ASCII', universal_newline: true) # => "\n \n \n"
diff --git a/doc/examples/files.rdoc b/doc/examples/files.rdoc
new file mode 100644
index 0000000000..f736132770
--- /dev/null
+++ b/doc/examples/files.rdoc
@@ -0,0 +1,26 @@
+# English text with newlines.
+text = <<~EOT
+ First line
+ Second line
+
+ Fourth line
+ Fifth line
+EOT
+
+# Russian text.
+russian = "\u{442 435 441 442}" # => "теÑÑ‚"
+
+# Binary data.
+data = "\u9990\u9991\u9992\u9993\u9994"
+
+# Text file.
+File.write('t.txt', text)
+
+# File with Russian text.
+File.write('t.rus', russian)
+
+# File with binary data.
+f = File.new('t.dat', 'wb:UTF-16')
+f.write(data)
+f.close
+
diff --git a/doc/extension.ja.rdoc b/doc/extension.ja.rdoc
index 47303ec408..93f5753cd1 100644
--- a/doc/extension.ja.rdoc
+++ b/doc/extension.ja.rdoc
@@ -617,12 +617,14 @@ C言語ã¨Rubyã®é–“ã§æƒ…報を共有ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦è§£èª¬ã—ã¾ã™ï¼Ž
Qtrue ::
Qfalse ::
- 真å½å€¤ï¼ŽQfalseã¯C言語ã§ã‚‚å½ã¨ã¿ãªã•れã¾ã™(ã¤ã¾ã‚Š0).
+ 真å½å€¤ï¼ŽC言語ã‹ã‚‰è¦‹ãŸã€Œtrueã€ã¨ã€Œfalseã€ï¼Ž
Qnil ::
C言語ã‹ã‚‰è¦‹ãŸã€Œnilã€ï¼Ž
+RTEST(obj)ã¨ã„ã†ãƒžã‚¯ãƒ­ã¯objãŒQfalseã‹Qnilã®ã¨ã0ã‚’è¿”ã—ã¾ã™ï¼Ž
+
=== Cã¨Rubyã§å…±æœ‰ã•れる大域変数
Cã¨Rubyã§å¤§åŸŸå¤‰æ•°ã‚’使ã£ã¦æƒ…報を共有ã§ãã¾ã™ï¼Žå…±æœ‰ã§ãる大域
@@ -697,30 +699,28 @@ Cã®ä¸–界ã§å®šç¾©ã•れãŸãƒ‡ãƒ¼ã‚¿(構造体)ã‚’Rubyã®ã‚ªãƒ–ジェクトã¨ã
ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸã‚ªãƒ–ジェクトを表ã™VALUE値ã§ã™ï¼Ž
-klassã¯ã“ã®ã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã§ã™ï¼Ždata_typeã¯ã“ã®æ§‹é€ ä½“ã‚’
-RubyãŒç®¡ç†ã™ã‚‹ãŸã‚ã®æƒ…報を記述ã—ãŸconst rb_data_type_tåž‹ã¸ã®
-ãƒã‚¤ãƒ³ã‚¿ã§ã™ï¼Ž
+klassã¯ã“ã®ã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã§ã™ï¼Žklassã¯, Objectクラスã‹
+ら派生ã—, å¿…ãšrb_define_alloc_funcã‹rb_undef_alloc_funcを呼
+ã³å‡ºã—ã¦allocatorを設定ã—ã¦ãã ã•ã„.
-ãªãŠ, klassã¯, Objectã‚„ä»–ã®ã‚¯ãƒ©ã‚¹ã§ã¯ãªãData (rb_cData)ã¨ã„
-ã†ç‰¹åˆ¥ãªã‚¯ãƒ©ã‚¹ã‹ã‚‰æ´¾ç”Ÿã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ï¼Ž
-Dataã‹ã‚‰æ´¾ç”Ÿã—ãªã„å ´åˆã«ã¯, å¿…ãšrb_undef_alloc_func(klass)
-を呼ã³å‡ºã—ã¦ãã ã•ã„.
+data_typeã¯ã“ã®æ§‹é€ ä½“ã‚’RubyãŒç®¡ç†ã™ã‚‹ãŸã‚ã®æƒ…報を記述ã—ãŸ
+const rb_data_type_tåž‹ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã§ã™ï¼Ž
rb_data_type_tã¯æ¬¡ã®ã‚ˆã†ã«å®šç¾©ã•れã¦ã„ã¾ã™ï¼Ž
typedef struct rb_data_type_struct rb_data_type_t;
struct rb_data_type_struct {
- const char *wrap_struct_name;
- struct {
- void (*dmark)(void*);
- void (*dfree)(void*);
- size_t (*dsize)(const void *);
- void *reserved[2];
- } function;
- const rb_data_type_t *parent;
- void *data;
- VALUE flags;
+ const char *wrap_struct_name;
+ struct {
+ void (*dmark)(void*);
+ void (*dfree)(void*);
+ size_t (*dsize)(const void *);
+ void *reserved[2];
+ } function;
+ const rb_data_type_t *parent;
+ void *data;
+ VALUE flags;
};
wrap_struct_nameã¯ã“ã®æ§‹é€ ä½“を識別ã™ã‚‹åå‰ã§ã™ï¼Žä¸»ã«çµ±è¨ˆæƒ…å ±
@@ -743,8 +743,8 @@ dmarkã¯ã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚¿ãŒã‚ªãƒ–ジェクトã¸ã®å‚照をマーク
++
dfreeã¯ã“ã®æ§‹é€ ä½“ãŒã‚‚ã†ä¸è¦ã«ãªã£ãŸæ™‚ã«å‘¼ã°ã‚Œã‚‹é–¢æ•°ã§ã™ï¼Žã“
-ã®é–¢æ•°ãŒã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚¿ã‹ã‚‰å‘¼ã°ã‚Œã¾ã™ï¼Žã“れãŒ-1ã®å ´åˆã¯ï¼Œ
-å˜ç´”ã«æ§‹é€ ä½“ãŒè§£æ”¾ã•れã¾ã™ï¼Ž
+ã®é–¢æ•°ãŒã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚¿ã‹ã‚‰å‘¼ã°ã‚Œã¾ã™ï¼Žã“れãŒ
+RUBY_DEFAULT_FREEã®å ´åˆã¯ï¼Œå˜ç´”ã«æ§‹é€ ä½“ãŒè§£æ”¾ã•れã¾ã™ï¼Ž
dsizeã¯æ§‹é€ ä½“ãŒæ¶ˆè²»ã—ã¦ã„るメモリã®ãƒã‚¤ãƒˆæ•°ã‚’è¿”ã™é–¢æ•°ã§ã™ï¼Ž
引数ã¨ã—ã¦æ§‹é€ ä½“ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãŒæ¸¡ã•れã¾ã™ï¼Žå®Ÿè£…困難ã§ã‚れã°0
@@ -1066,6 +1066,20 @@ Rubyã®ã‚½ãƒ¼ã‚¹ã¯ã„ãã¤ã‹ã«åˆ†é¡žã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼Žã“ã®ã†ã
ã¦ã„ã¾ã™ï¼Žã“れらã®ã‚½ãƒ¼ã‚¹ã¯ä»Šã¾ã§ã®èª¬æ˜Žã§ã»ã¨ã‚“ã©ç†è§£ã§ãã‚‹ã¨
æ€ã„ã¾ã™ï¼Ž
+=== Rubyã®ãƒ˜ãƒƒãƒ€ãƒ•ァイル
+
+<tt>$repo_root/include/ruby</tt>以下ã¯ã™ã¹ã¦<tt>make
+install</tt>ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¾ã™ï¼Žæ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã‹ã‚‰ã¯ï¼Œ
+<tt>#include <ruby.h></tt>ã§ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Ž
++rbimpl_+,+RBIMPL_+ã®ãƒ—レフィックスãŒä»˜ã„ãŸå®Ÿè£…ã®è©³ç´°ã®ãŸã‚
+ã®ã‚·ãƒ³ãƒœãƒ«ã‚’除ã,ã™ã¹ã¦ã®ã‚·ãƒ³ãƒœãƒ«ã¯å…¬é–‹APIã§ã™ï¼Ž
+
+拡張ライブラリã§ç›´æŽ¥ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã§ãã‚‹ã®ã¯ï¼Œ
+<tt>$repo_root/include/ruby/*.h</tt>ã®ã†ã¡ï¼Œå¯¾å¿œã™ã‚‹
+<tt>HAVE_RUBY_*_H</tt>マクロãŒ
+<tt>$repo_root/include/ruby.h</tt>ヘッダーã§å®šç¾©ã•れã¦ã„ã‚‹ã‚‚
+ã®ã§ã™ï¼Ž
+
=== Ruby言語ã®ã‚³ã‚¢
class.c :: クラスã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«
@@ -1108,9 +1122,8 @@ lex.c :: 自動生æˆ
-> opt*.inc : 自動生æˆ
-> vm.inc : 自動生æˆ
-=== æ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ (鬼車)
+=== æ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ (鬼雲)
- regex.c
regcomp.c
regenc.c
regerror.c
@@ -1682,6 +1695,9 @@ HAVE_RUBY_*_H ::
ã‚’æ„味ã™ã‚‹ï¼ŽãŸã¨ãˆã°ï¼ŒHAVE_RUBY_ST_H ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã¯
å˜ãªã‚‹ st.h ã§ã¯ãªã ruby/st.h を使用ã™ã‚‹ï¼Ž
+ ã“れらã®ãƒžã‚¯ãƒ­ã«å¯¾å¿œã™ã‚‹ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ァイルã¯ï¼Œæ‹¡å¼µãƒ©ã‚¤ãƒ–ラリ
+ ã‹ã‚‰ç›´æŽ¥ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã—ã¦ã‚‚よã„.
+
RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::
rb_add_event_hook() ãŒãƒ•ãƒƒã‚¯é–¢æ•°ã«æ¸¡ã™ data を第3引数ã¨ã—ã¦
@@ -1758,6 +1774,14 @@ check_sizeof(type, header) ::
`SIZEOF_{TYPE}` を定義ã—,ãã®ã‚µã‚¤ã‚ºã‚’è¿”ã™ï¼Žå®šç¾©ã•れã¦ã„ãª
ã„ã¨ãã¯nilã‚’è¿”ã™ï¼Ž
+append_cppflags(array-of-flags[, opt])
+append_cflags(array-of-flags[, opt])
+append_ldflags(array-of-flags[, opt])
+
+ å„flagãŒä½¿ç”¨å¯èƒ½ã§ã‚れã°ï¼Œãれãžã‚Œ$CPPFLAGS, $CFLAGS,
+ $LDFLAGSã«è¿½åŠ ã™ã‚‹ï¼Žã‚³ãƒ³ãƒ‘イラã®ãƒ•ラグã«ã¯ç§»æ¤æ€§ãŒãªã„ã®ã§ï¼Œ
+ 変数ã«ç›´æŽ¥è¿½åŠ ã›ãšã“れらを使ã†ã“ã¨ãŒæœ›ã¾ã—ã„.
+
create_makefile(target[, target_prefix]) ::
拡張ライブラリ用ã®Makefileを生æˆã™ã‚‹ï¼Žã“ã®é–¢æ•°ã‚’呼ã°ãªã‘れ
@@ -1829,6 +1853,17 @@ rb_ary_store() ãªã©ã®ï¼Œé©åˆ‡ãª API 関数を利用ã™ã‚‹ã‚ˆã†ã«ã—ã¦ä¸‹
ãã®ã»ã‹ï¼Œå¯¾å¿œã«ã¤ã„ã¦ã®è©³ç´°ã¯ extension.rdoc ã®ã€ŒAppendix D. Generational
GCã€ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„.
+== Appendix E. Ractor サãƒãƒ¼ãƒˆ
+
+Ruby 3.0 ã‹ã‚‰ã€Ruby プログラムを並列ã«å®Ÿè¡Œã™ã‚‹ãŸã‚ã®ä»•組ã¿ã§ã‚ã‚‹ Ractor
+ãŒå°Žå…¥ã•れã¾ã—ãŸã€‚é©åˆ‡ã«ä¸¦åˆ—ã«å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ã¯ã€Ractor サãƒãƒ¼ãƒˆãŒå¿…è¦ã«
+ãªã‚Šã¾ã™ã€‚サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ライブラリã¯ã€ãƒ¡ã‚¤ãƒ³ Ractor 以外ã§å®Ÿè¡Œã™ã‚‹ã¨
+エラーã«ãªã‚Šã¾ã™ï¼ˆRactor::UnsafeError)。
+
+Ractor をサãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®è©³ç´°ã¯ã€extension.rdoc ã®ã€ŒAppendix F. Ractor
+supportã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。
+
+
:enddoc: Local variables:
:enddoc: fill-column: 60
:enddoc: end:
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index 79eb96d518..ad9ae641d2 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -93,7 +93,9 @@ There are also faster check macros for fixnums and nil.
The data for type T_NIL, T_FALSE, T_TRUE are nil, false, true
respectively. They are singletons for the data type.
The equivalent C constants are: Qnil, Qfalse, Qtrue.
-Note that Qfalse is false in C also (i.e. 0), but not Qnil.
+RTEST() will return true if a VALUE is neither Qfalse nor Qnil.
+If you need to differentiate Qfalse from Qnil,
+specifically test against Qfalse.
The T_FIXNUM data is a 31bit or 63bit length fixed integer.
This size depends on the size of long: if long is 32bit then
@@ -450,15 +452,13 @@ you may rely on:
To specify whether keyword arguments are passed when calling super:
- VALUE rb_call_super(int argc, const VALUE *argv, int kw_splat)
+ VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
+kw_splat+ can have these possible values (used by all methods that accept
+kw_splat+ argument):
RB_NO_KEYWORDS :: Do not pass keywords
RB_PASS_KEYWORDS :: Pass keywords, final argument should be a hash of keywords
-RB_PASS_EMPTY_KEYWORDS :: Pass empty keywords (not included in arguments)
- (this will be removed in Ruby 3.0)
RB_PASS_CALLED_KEYWORDS :: Pass keywords if current method was called with
keywords, useful for argument delegation
@@ -659,30 +659,30 @@ with the next macro.
TypedData_Wrap_Struct() returns a created Ruby object as a VALUE.
-The klass argument is the class for the object.
+The klass argument is the class for the object. The klass should
+derive from rb_cObject, and the allocator must be set by calling
+rb_define_alloc_func or rb_undef_alloc_func.
+
data_type is a pointer to a const rb_data_type_t which describes
how Ruby should manage the struct.
-It is recommended that klass derives from a special class called
-Data (rb_cData) but not from Object or other ordinal classes.
-If it doesn't, you have to call rb_undef_alloc_func(klass).
-
rb_data_type_t is defined like this. Let's take a look at each
member of the struct.
typedef struct rb_data_type_struct rb_data_type_t;
struct rb_data_type_struct {
- const char *wrap_struct_name;
- struct {
- void (*dmark)(void*);
- void (*dfree)(void*);
- size_t (*dsize)(const void *);
- void *reserved[2];
- } function;
- const rb_data_type_t *parent;
- void *data;
- VALUE flags;
+ const char *wrap_struct_name;
+ struct {
+ void (*dmark)(void*);
+ void (*dfree)(void*);
+ size_t (*dsize)(const void *);
+ void (*dcompact)(void*);
+ void *reserved[1];
+ } function;
+ const rb_data_type_t *parent;
+ void *data;
+ VALUE flags;
};
wrap_struct_name is an identifier of this instance of the struct.
@@ -703,14 +703,22 @@ Note that it is recommended to avoid such a reference.
++
dfree is a function to free the pointer allocation.
-If this is -1, the pointer will be just freed.
+If this is RUBY_DEFAULT_FREE, the pointer will be just freed.
dsize calculates memory consumption in bytes by the struct.
Its parameter is a pointer to your struct.
You can pass 0 as dsize if it is hard to implement such a function.
But it is still recommended to avoid 0.
-You have to fill reserved and parent with 0.
+dcompact is invoked when memory compaction took place.
+Referred Ruby objects that were marked by rb_gc_mark_movable()
+can here be updated per rb_gc_location().
+
+You have to fill reserved with 0.
+
+parent can point to another C type definition that the Ruby object
+is inherited from. Then TypedData_Get_Struct() does also accept
+derived objects.
You can fill "data" with an arbitrary value for your use.
Ruby does nothing with the member.
@@ -742,6 +750,14 @@ RUBY_TYPED_WB_PROTECTED ::
More about write barriers can be found in "Generational GC" in
Appendix D.
+RUBY_TYPED_FROZEN_SHAREABLE ::
+
+ This flag indicates that the object is shareable object
+ if the object is frozen. See Appendix F more details.
+
+ If this flag is not set, the object can not become a shareable
+ object by Ractor.make_shareable() method.
+
You can allocate and wrap the structure in one step.
TypedData_Make_Struct(klass, type, data_type, sval)
@@ -799,11 +815,14 @@ the library.
Here's the example of an initializing function.
+ #include <ruby.h>
void
Init_dbm(void)
{
/* define DBM class */
VALUE cDBM = rb_define_class("DBM", rb_cObject);
+ /* Redefine DBM.allocate
+ rb_define_alloc_func(cDBM, fdbm_alloc);
/* DBM includes Enumerable module */
rb_include_module(cDBM, rb_mEnumerable);
@@ -813,7 +832,7 @@ Here's the example of an initializing function.
/* DBM instance method close(): no args */
rb_define_method(cDBM, "close", fdbm_close, 0);
/* DBM instance method []: 1 argument */
- rb_define_method(cDBM, "[]", fdbm_fetch, 1);
+ rb_define_method(cDBM, "[]", fdbm_aref, 1);
/* ... */
@@ -836,10 +855,19 @@ TypedData_Make_Struct.
RUBY_TYPED_FREE_IMMEDIATELY,
};
- obj = TypedData_Make_Struct(klass, struct dbmdata, &dbm_type, dbmp);
+ static VALUE
+ fdbm_alloc(VALUE klass)
+ {
+ struct dbmdata *dbmp;
+ /* Allocate T_DATA object and C struct and fill struct with zero bytes */
+ return TypedData_Make_Struct(klass, struct dbmdata, &dbm_type, dbmp);
+ }
This code wraps the dbmdata structure into a Ruby object. We avoid
wrapping DBM* directly, because we want to cache size information.
+Since Object.allocate allocates an ordinary T_OBJECT type (instead
+of T_DATA), it's important to either use rb_define_alloc_func() to
+overwrite it or rb_undef_alloc_func() to delete it.
To retrieve the dbmdata structure from a Ruby object, we define the
following macro:
@@ -857,9 +885,13 @@ There are three kinds of way to receive method arguments. First,
methods with a fixed number of arguments receive arguments like this:
static VALUE
- fdbm_delete(VALUE obj, VALUE keystr)
+ fdbm_aref(VALUE obj, VALUE keystr)
{
- /* ... */
+ struct dbmdata *dbmp;
+ GetDBM(obj, dbmp);
+ /* Use dbmp to access the key */
+ dbm_fetch(dbmp->di_dbm, StringValueCStr(keystr));
+ /* ... */
}
The first argument of the C function is the self, the rest are the
@@ -924,6 +956,9 @@ need to put
at the top of the file. You can use the functions below to check
various conditions.
+ append_cppflags(array-of-flags[, opt]): append each flag to $CPPFLAGS if usable
+ append_cflags(array-of-flags[, opt]): append each flag to $CFLAGS if usable
+ append_ldflags(array-of-flags[, opt]): append each flag to $LDFLAGS if usable
have_macro(macro[, headers[, opt]]): check whether macro is defined
have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists
find_library(lib[, func, *paths]): find library from paths
@@ -952,6 +987,10 @@ The value of the variables below will affect the Makefile.
$LDFLAGS: included in LDFLAGS make variable (such as -L)
$objs: list of object file names
+Compiler/linker flags are not portable usually, you should use
++append_cppflags+, +append_cpflags+ and +append_ldflags+ respectively
+instead of appending the above variables directly.
+
Normally, the object files list is automatically generated by searching
source files, but you must define them explicitly if any sources will
be generated while building.
@@ -1005,7 +1044,24 @@ You can do anything you want with your library. The author of Ruby
will not claim any restrictions on your code depending on the Ruby API.
Feel free to use, modify, distribute or sell your program.
-== Appendix A. Ruby Source Files Overview
+== Appendix A. Ruby Header and Source Files Overview
+
+=== Ruby Header Files
+
+Everything under <tt>$repo_root/include/ruby</tt> is installed with
+<tt>make install</tt>.
+It should be included per <tt>#include <ruby.h></tt> from C extensions.
+All symbols are public API with the exception of symbols prefixed with
++rbimpl_+ or +RBIMPL_+. They are implementation details and shouldn't
+be used by C extensions.
+
+Only <tt>$repo_root/include/ruby/*.h</tt> whose corresponding macros
+are defined in the <tt>$repo_root/include/ruby.h</tt> header are
+allowed to be <tt>#include</tt>-d by C extensions.
+
+Header files under <tt>$repo_root/internal/</tt> or directly under the
+root <tt>$repo_root/*.h</tt> are not make-installed.
+They are internal headers with only internal APIs.
=== Ruby Language Core
@@ -1049,9 +1105,8 @@ lex.c :: automatically generated from keywords
-> opt*.inc : automatically generated
-> vm.inc : automatically generated
-=== Regular Expression Engine (Oniguruma)
+=== Regular Expression Engine (Onigumo)
- regex.c
regcomp.c
regenc.c
regerror.c
@@ -1423,28 +1478,6 @@ rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::
; argument captured as a hash.
; If keyword arguments are not
; provided, returns nil.
- ;
- ; Currently, will also consider
- ; final argument as keywords if
- ; it is a hash or can be
- ; converted to a hash with
- ; #to_hash. When the last
- ; argument is nil, it is
- ; captured if it is not
- ; ambiguous to take it as
- ; empty option hash; i.e. '*'
- ; is not specified and
- ; arguments are given more
- ; than sufficient.
- ;
- ; However, handling final
- ; argument as keywords if
- ; method was not called with
- ; keywords (whether final
- ; argument is hash or nil) is
- ; deprecated. In that case, a
- ; warning will be emitted, and
- ; in Ruby 3.0 it will be an error.
sym-for-block-arg := "&" ; Indicates that an iterator
; block should be captured if
; given
@@ -1469,8 +1502,6 @@ rb_scan_args_kw(int kw_splat, int argc, VALUE *argv, const char *fmt, ...) ::
RB_SCAN_ARGS_PASS_CALLED_KEYWORDS :: Same behavior as +rb_scan_args+.
RB_SCAN_ARGS_KEYWORDS :: The final argument should be a hash treated as
keywords.
- RB_SCAN_ARGS_EMPTY_KEYWORDS :: Don't treat a final hash as keywords.
- (this will be removed in Ruby 3.0)
RB_SCAN_ARGS_LAST_HASH_KEYWORDS :: Treat a final argument as keywords if it
is a hash, and not as keywords otherwise.
@@ -1877,13 +1908,13 @@ NORETURN_STYLE_NEW ::
HAVE_RB_DEFINE_ALLOC_FUNC ::
Means that function rb_define_alloc_func() is provided, that means the
- allocation framework is used. This is same as the result of
+ allocation framework is used. This is the same as the result of
have_func("rb_define_alloc_func", "ruby.h").
HAVE_RB_REG_NEW_STR ::
Means that function rb_reg_new_str() is provided, that creates Regexp
- object from String object. This is same as the result of
+ object from String object. This is the same as the result of
have_func("rb_reg_new_str", "ruby.h").
HAVE_RB_IO_T ::
@@ -1901,6 +1932,9 @@ HAVE_RUBY_*_H ::
instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not
mere st.h.
+ Header files corresponding to these macros may be <tt>#include</tt>
+ directly from extension libraries.
+
RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ::
Means that rb_add_event_hook() takes the third argument `data', to be
@@ -1946,6 +1980,7 @@ the <code>*_kw</code> functions introduced in Ruby 2.7.
#define rb_proc_call_with_block_kw(p, c, v, b, kw) rb_proc_call_with_block(p, c, v, b)
#define rb_method_call_kw(c, v, m, kw) rb_method_call(c, v, m)
#define rb_method_call_with_block_kw(c, v, m, b, kw) rb_method_call_with_block(c, v, m, b)
+ #define rb_eval_cmd_kwd(c, a, kw) rb_eval_cmd(c, a, 0)
#endif
== Appendix C. Functions available for use in extconf.rb
@@ -2049,7 +2084,7 @@ Before inserting write barriers, you need to know about RGenGC algorithm
available in include/ruby/ruby.h. An example is available in iseq.c.
For a complete guide for RGenGC and write barriers, please refer to
-<https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RGenGC>.
+<https://bugs.ruby-lang.org/projects/ruby-master/wiki/RGenGC>.
== Appendix E. RB_GC_GUARD to protect from premature GC
@@ -2100,6 +2135,87 @@ keyword in C. RB_GC_GUARD has the following advantages:
compilers and architectures. RB_GC_GUARD is customizable for broken
systems/compilers without negatively affecting other systems.
+== Appendix F. Ractor support
+
+Ractor(s) are the parallel execution mechanism introduced in Ruby 3.0. All
+ractors can run in parallel on a different OS thread (using an underlying system
+provided thread), so the C extension should be thread-safe. A C extension that
+can run in multiple ractors is called "Ractor-safe".
+
+Ractor safety around C extensions has the following properties:
+1. By default, all C extensions are recognized as Ractor-unsafe.
+2. Ractor-unsafe C-methods may only be called from the main Ractor. If invoked
+ by a non-main Ractor, then a Ractor::UnsafeError is raised.
+3. If an extension desires to be marked as Ractor-safe the extension should
+ call rb_ext_ractor_safe(true) at the Init_ function for the extension, and
+ all defined methods will be marked as Ractor-safe.
+
+To make a "Ractor-safe" C extension, we need to check the following points:
+
+(1) Do not share unshareable objects between ractors
+
+For example, C's global variable can lead sharing an unshareable objects
+between ractors.
+
+ VALUE g_var;
+ VALUE set(VALUE self, VALUE v){ return g_var = v; }
+ VALUE get(VALUE self){ return g_var; }
+
+set() and get() pair can share an unshareable objects using g_var, and
+it is Ractor-unsafe.
+
+Not only using global variables directly, some indirect data structure
+such as global st_table can share the objects, so please take care.
+
+Note that class and module objects are shareable objects, so you can
+keep the code "cFoo = rb_define_class(...)" with C's global variables.
+
+(2) Check the thread-safety of the extension
+
+An extension should be thread-safe. For example, the following code is
+not thread-safe:
+
+ bool g_called = false;
+ VALUE call(VALUE self) {
+ if (g_called) rb_raise("recursive call is not allowed.");
+ g_called = true;
+ VALUE ret = do_something();
+ g_called = false;
+ return ret;
+ }
+
+because g_called global variable should be synchronized by other
+ractor's threads. To avoid such data-race, some synchronization should
+be used. Check include/ruby/thread_native.h and include/ruby/atomic.h.
+
+With Ractors, all objects given as method parameters and the receiver (self)
+are guaranteed to be from the current Ractor or to be shareable. As a
+consequence, it is easier to make code ractor-safe than to make code generally
+thread-safe. For example, we don't need to lock an array object to access the
+element of it.
+
+(3) Check the thread-safety of any used library
+
+If the extension relies on an external library, such as a function foo() from
+a library libfoo, the function libfoo foo() should be thread safe.
+
+(4) Make an object shareable
+
+This is not required to make an extension Ractor-safe.
+
+If an extension provides special objects defined by rb_data_type_t,
+consider these objects can become shareable or not.
+
+RUBY_TYPED_FROZEN_SHAREABLE flag indicates that these objects can be
+shareable objects if the object is frozen. This means that if the object
+is frozen, the mutation of wrapped data is not allowed.
+
+(5) Others
+
+There are possibly other points or requirements which must be considered in the
+making of a Ractor-safe extension. This document will be extended as they are
+discovered.
+
:enddoc: Local variables:
:enddoc: fill-column: 70
:enddoc: end:
diff --git a/doc/fiber.md b/doc/fiber.md
new file mode 100644
index 0000000000..a334faf739
--- /dev/null
+++ b/doc/fiber.md
@@ -0,0 +1,232 @@
+# Fiber
+
+Fibers provide a mechanism for cooperative concurrency.
+
+## Context Switching
+
+Fibers execute a user-provided block. During the execution, the block may call `Fiber.yield` or `Fiber.transfer` to switch to another fiber. `Fiber#resume` is used to continue execution from the point where `Fiber.yield` was called.
+
+``` ruby
+#!/usr/bin/env ruby
+
+puts "1: Start program."
+
+f = Fiber.new do
+ puts "3: Entered fiber."
+ Fiber.yield
+ puts "5: Resumed fiber."
+end
+
+puts "2: Resume fiber first time."
+f.resume
+
+puts "4: Resume fiber second time."
+f.resume
+
+puts "6: Finished."
+```
+
+This program demonstrates the flow control of fibers.
+
+## Scheduler
+
+The scheduler interface is used to intercept blocking operations. A typical
+implementation would be a wrapper for a gem like `EventMachine` or `Async`. This
+design provides separation of concerns between the event loop implementation
+and application code. It also allows for layered schedulers which can perform
+instrumentation.
+
+To set the scheduler for the current thread:
+
+``` ruby
+Fiber.set_scheduler(MyScheduler.new)
+```
+
+When the thread exits, there is an implicit call to `set_scheduler`:
+
+``` ruby
+Fiber.set_scheduler(nil)
+```
+
+### Design
+
+The scheduler interface is designed to be a un-opinionated light-weight layer
+between user code and blocking operations. The scheduler hooks should avoid
+translating or converting arguments or return values. Ideally, the exact same
+arguments from the user code are provided directly to the scheduler hook with
+no changes.
+
+### Interface
+
+This is the interface you need to implement.
+
+``` ruby
+class Scheduler
+ # Wait for the specified process ID to exit.
+ # This hook is optional.
+ # @parameter pid [Integer] The process ID to wait for.
+ # @parameter flags [Integer] A bit-mask of flags suitable for `Process::Status.wait`.
+ # @returns [Process::Status] A process status instance.
+ def process_wait(pid, flags)
+ Thread.new do
+ Process::Status.wait(pid, flags)
+ end.value
+ end
+
+ # Wait for the given io readiness to match the specified events within
+ # the specified timeout.
+ # @parameter event [Integer] A bit mask of `IO::READABLE`,
+ # `IO::WRITABLE` and `IO::PRIORITY`.
+ # @parameter timeout [Numeric] The amount of time to wait for the event in seconds.
+ # @returns [Integer] The subset of events that are ready.
+ def io_wait(io, events, timeout)
+ end
+
+ # Read from the given io into the specified buffer.
+ # WARNING: Experimental hook! Do not use in production code!
+ # @parameter io [IO] The io to read from.
+ # @parameter buffer [IO::Buffer] The buffer to read into.
+ # @parameter length [Integer] The minimum amount to read.
+ def io_read(io, buffer, length)
+ end
+
+ # Write from the given buffer into the specified IO.
+ # WARNING: Experimental hook! Do not use in production code!
+ # @parameter io [IO] The io to write to.
+ # @parameter buffer [IO::Buffer] The buffer to write from.
+ # @parameter length [Integer] The minimum amount to write.
+ def io_write(io, buffer, length)
+ end
+
+ # Sleep the current task for the specified duration, or forever if not
+ # specified.
+ # @parameter duration [Numeric] The amount of time to sleep in seconds.
+ def kernel_sleep(duration = nil)
+ end
+
+ # Execute the given block. If the block execution exceeds the given timeout,
+ # the specified exception `klass` will be raised. Typically, only non-blocking
+ # methods which enter the scheduler will raise such exceptions.
+ # @parameter duration [Integer] The amount of time to wait, after which an exception will be raised.
+ # @parameter klass [Class] The exception class to raise.
+ # @parameter *arguments [Array] The arguments to send to the constructor of the exception.
+ # @yields {...} The user code to execute.
+ def timeout_after(duration, klass, *arguments, &block)
+ end
+
+ # Resolve hostname to an array of IP addresses.
+ # This hook is optional.
+ # @parameter hostname [String] Example: "www.ruby-lang.org".
+ # @returns [Array] An array of IPv4 and/or IPv6 address strings that the hostname resolves to.
+ def address_resolve(hostname)
+ end
+
+ # Block the calling fiber.
+ # @parameter blocker [Object] What we are waiting on, informational only.
+ # @parameter timeout [Numeric | Nil] The amount of time to wait for in seconds.
+ # @returns [Boolean] Whether the blocking operation was successful or not.
+ def block(blocker, timeout = nil)
+ end
+
+ # Unblock the specified fiber.
+ # @parameter blocker [Object] What we are waiting on, informational only.
+ # @parameter fiber [Fiber] The fiber to unblock.
+ # @reentrant Thread safe.
+ def unblock(blocker, fiber)
+ end
+
+ # Intercept the creation of a non-blocking fiber.
+ # @returns [Fiber]
+ def fiber(&block)
+ Fiber.new(blocking: false, &block)
+ end
+
+ # Invoked when the thread exits.
+ def close
+ self.run
+ end
+
+ def run
+ # Implement event loop here.
+ end
+end
+```
+
+Additional hooks may be introduced in the future, we will use feature detection
+in order to enable these hooks.
+
+### Non-blocking Execution
+
+The scheduler hooks will only be used in special non-blocking execution
+contexts. Non-blocking execution contexts introduce non-determinism because the
+execution of scheduler hooks may introduce context switching points into your
+program.
+
+#### Fibers
+
+Fibers can be used to create non-blocking execution contexts.
+
+``` ruby
+Fiber.new do
+ puts Fiber.current.blocking? # false
+
+ # May invoke `Fiber.scheduler&.io_wait`.
+ io.read(...)
+
+ # May invoke `Fiber.scheduler&.io_wait`.
+ io.write(...)
+
+ # Will invoke `Fiber.scheduler&.kernel_sleep`.
+ sleep(n)
+end.resume
+```
+
+We also introduce a new method which simplifies the creation of these
+non-blocking fibers:
+
+``` ruby
+Fiber.schedule do
+ puts Fiber.current.blocking? # false
+end
+```
+
+The purpose of this method is to allow the scheduler to internally decide the
+policy for when to start the fiber, and whether to use symmetric or asymmetric
+fibers.
+
+You can also create blocking execution contexts:
+
+``` ruby
+Fiber.new(blocking: true) do
+ # Won't use the scheduler:
+ sleep(n)
+end
+```
+
+However you should generally avoid this unless you are implementing a scheduler.
+
+#### IO
+
+By default, I/O is non-blocking. Not all operating systems support non-blocking
+I/O. Windows is a notable example where socket I/O can be non-blocking but pipe
+I/O is blocking. Provided that there *is* a scheduler and the current thread *is
+non-blocking*, the operation will invoke the scheduler.
+
+#### Mutex
+
+The `Mutex` class can be used in a non-blocking context and is fiber specific.
+
+#### ConditionVariable
+
+The `ConditionVariable` class can be used in a non-blocking context and is
+fiber-specific.
+
+#### Queue / SizedQueue
+
+The `Queue` and `SizedQueue` classes can be used in a non-blocking context and
+are fiber-specific.
+
+#### Thread
+
+The `Thread#join` operation can be used in a non-blocking context and is
+fiber-specific.
diff --git a/doc/format_specifications.rdoc b/doc/format_specifications.rdoc
new file mode 100644
index 0000000000..e589524f27
--- /dev/null
+++ b/doc/format_specifications.rdoc
@@ -0,0 +1,348 @@
+== Format Specifications
+
+Several Ruby core classes have instance method +printf+ or +sprintf+:
+
+- ARGF#printf
+- IO#printf
+- Kernel#printf
+- Kernel#sprintf
+
+Each of these methods takes:
+
+- Argument +format_string+, which has zero or more
+ embedded _format_ _specifications_ (see below).
+- Arguments <tt>*arguments</tt>, which are zero or more objects to be formatted.
+
+Each of these methods prints or returns the string
+resulting from replacing each
+format specification embedded in +format_string+ with a string form
+of the corresponding argument among +arguments+.
+
+A simple example:
+
+ sprintf('Name: %s; value: %d', 'Foo', 0) # => "Name: Foo; value: 0"
+
+A format specification has the form:
+
+ %[flags][width][.precision]type
+
+It consists of:
+
+- A leading percent character.
+- Zero or more _flags_ (each is a character).
+- An optional _width_ _specifier_ (an integer).
+- An optional _precision_ _specifier_ (a period followed by a non-negative integer).
+- A _type_ _specifier_ (a character).
+
+Except for the leading percent character,
+the only required part is the type specifier, so we begin with that.
+
+=== Type Specifiers
+
+This section provides a brief explanation of each type specifier.
+The links lead to the details and examples.
+
+==== \Integer Type Specifiers
+
+- +b+ or +B+: Format +argument+ as a binary integer.
+ See {Specifiers b and B}[rdoc-ref:format_specifications.rdoc@Specifiers+b+and+B].
+- +d+, +i+, or +u+ (all are identical):
+ Format +argument+ as a decimal integer.
+ See {Specifier d}[rdoc-ref:format_specifications.rdoc@Specifier+d].
+- +o+: Format +argument+ as an octal integer.
+ See {Specifier o}[rdoc-ref:format_specifications.rdoc@Specifier+o].
+- +x+ or +X+: Format +argument+ as a hexadecimal integer.
+ See {Specifiers x and X}[rdoc-ref:format_specifications.rdoc@Specifiers+x+and+X].
+
+==== Floating-Point Type Specifiers
+
+- +a+ or +A+: Format +argument+ as hexadecimal floating-point number.
+ See {Specifiers a and A}[rdoc-ref:format_specifications.rdoc@Specifiers+a+and+A].
+- +e+ or +E+: Format +argument+ in scientific notation.
+ See {Specifiers e and E}[rdoc-ref:format_specifications.rdoc@Specifiers+e+and+E].
+- +f+: Format +argument+ as a decimal floating-point number.
+ See {Specifier f}[rdoc-ref:format_specifications.rdoc@Specifier+f].
+- +g+ or +G+: Format +argument+ in a "general" format.
+ See {Specifiers g and G}[rdoc-ref:format_specifications.rdoc@Specifiers+g+and+G].
+
+==== Other Type Specifiers
+
+- +c+: Format +argument+ as a character.
+ See {Specifier c}[rdoc-ref:format_specifications.rdoc@Specifier+c].
+- +p+: Format +argument+ as a string via <tt>argument.inspect</tt>.
+ See {Specifier p}[rdoc-ref:format_specifications.rdoc@Specifier+p].
+- +s+: Format +argument+ as a string via <tt>argument.to_s</tt>.
+ See {Specifier s}[rdoc-ref:format_specifications.rdoc@Specifier+s].
+- <tt>%</tt>: Format +argument+ (<tt>'%'</tt>) as a single percent character.
+ See {Specifier %}[rdoc-ref:format_specifications.rdoc@Specifier+-25].
+
+=== Flags
+
+The effect of a flag may vary greatly among type specifiers.
+These remarks are general in nature.
+See {type-specific details}[rdoc-ref:format_specifications.rdoc@Type+Specifier+Details+and+Examples].
+
+Multiple flags may be given with single type specifier;
+order does not matter.
+
+==== <tt>' '</tt> Flag
+
+Insert a space before a non-negative number:
+
+ sprintf('%d', 10) # => "10"
+ sprintf('% d', 10) # => " 10"
+
+Insert a minus sign for negative value:
+
+ sprintf('%d', -10) # => "-10"
+ sprintf('% d', -10) # => "-10"
+
+==== <tt>'#'</tt> Flag
+
+Use an alternate format; varies among types:
+
+ sprintf('%x', 100) # => "64"
+ sprintf('%#x', 100) # => "0x64"
+
+==== <tt>'+'</tt> Flag
+
+Add a leading plus sign for a non-negative number:
+
+ sprintf('%x', 100) # => "64"
+ sprintf('%+x', 100) # => "+64"
+
+==== <tt>'-'</tt> Flag
+
+Left justify the value in its field:
+
+ sprintf('%6d', 100) # => " 100"
+ sprintf('%-6d', 100) # => "100 "
+
+==== <tt>'0'</tt> Flag
+
+Left-pad with zeros instead of spaces:
+
+ sprintf('%6d', 100) # => " 100"
+ sprintf('%06d', 100) # => "000100"
+
+==== <tt>'*'</tt> Flag
+
+Use the next argument as the field width:
+
+ sprintf('%d', 20, 14) # => "20"
+ sprintf('%*d', 20, 14) # => " 14"
+
+==== <tt>'n$'</tt> Flag
+
+Format the (1-based) <tt>n</tt>th argument into this field:
+
+ sprintf("%s %s", 'world', 'hello') # => "world hello"
+ sprintf("%2$s %1$s", 'world', 'hello') # => "hello world"
+
+=== Width Specifier
+
+In general, a width specifier determines the minimum width (in characters)
+of the formatted field:
+
+ sprintf('%10d', 100) # => " 100"
+
+ # Left-justify if negative.
+ sprintf('%-10d', 100) # => "100 "
+
+ # Ignore if too small.
+ sprintf('%1d', 100) # => "100"
+
+=== Precision Specifier
+
+A precision specifier is a decimal point followed by zero or more
+decimal digits.
+
+For integer type specifiers, the precision specifies the minimum number of
+digits to be written. If the precision is shorter than the integer, the result is
+padded with leading zeros. There is no modification or truncation of the result
+if the integer is longer than the precision:
+
+ sprintf('%.3d', 1) # => "001"
+ sprintf('%.3d', 1000) # => "1000"
+
+ # If the precision is 0 and the value is 0, nothing is written
+ sprintf('%.d', 0) # => ""
+ sprintf('%.0d', 0) # => ""
+
+For the +a+/+A+, +e+/+E+, +f+/+F+ specifiers, the precision specifies
+the number of digits after the decimal point to be written:
+
+ sprintf('%.2f', 3.14159) # => "3.14"
+ sprintf('%.10f', 3.14159) # => "3.1415900000"
+
+ # With no precision specifier, defaults to 6-digit precision.
+ sprintf('%f', 3.14159) # => "3.141590"
+
+For the +g+/+G+ specifiers, the precision specifies
+the number of significant digits to be written:
+
+ sprintf('%.2g', 123.45) # => "1.2e+02"
+ sprintf('%.3g', 123.45) # => "123"
+ sprintf('%.10g', 123.45) # => "123.45"
+
+ # With no precision specifier, defaults to 6 significant digits.
+ sprintf('%g', 123.456789) # => "123.457"
+
+For the +s+, +p+ specifiers, the precision specifies
+the number of characters to write:
+
+ sprintf('%s', Time.now) # => "2022-05-04 11:59:16 -0400"
+ sprintf('%.10s', Time.now) # => "2022-05-04"
+
+=== Type Specifier Details and Examples
+
+==== Specifiers +a+ and +A+
+
+Format +argument+ as hexadecimal floating-point number:
+
+ sprintf('%a', 3.14159) # => "0x1.921f9f01b866ep+1"
+ sprintf('%a', -3.14159) # => "-0x1.921f9f01b866ep+1"
+ sprintf('%a', 4096) # => "0x1p+12"
+ sprintf('%a', -4096) # => "-0x1p+12"
+
+ # Capital 'A' means that alphabetical characters are printed in upper case.
+ sprintf('%A', 4096) # => "0X1P+12"
+ sprintf('%A', -4096) # => "-0X1P+12"
+
+==== Specifiers +b+ and +B+
+
+The two specifiers +b+ and +B+ behave identically
+except when flag <tt>'#'</tt>+ is used.
+
+Format +argument+ as a binary integer:
+
+ sprintf('%b', 1) # => "1"
+ sprintf('%b', 4) # => "100"
+
+ # Prefix '..' for negative value.
+ sprintf('%b', -4) # => "..100"
+
+ # Alternate format.
+ sprintf('%#b', 4) # => "0b100"
+ sprintf('%#B', 4) # => "0B100"
+
+==== Specifier +c+
+
+Format +argument+ as a single character:
+
+ sprintf('%c', 'A') # => "A"
+ sprintf('%c', 65) # => "A"
+
+==== Specifier +d+
+
+Format +argument+ as a decimal integer:
+
+ sprintf('%d', 100) # => "100"
+ sprintf('%d', -100) # => "-100"
+
+Flag <tt>'#'</tt> does not apply.
+
+==== Specifiers +e+ and +E+
+
+Format +argument+ in
+{scientific notation}[https://en.wikipedia.org/wiki/Scientific_notation]:
+
+ sprintf('%e', 3.14159) # => "3.141590e+00"
+ sprintf('%E', -3.14159) # => "-3.141590E+00"
+
+==== Specifier +f+
+
+Format +argument+ as a floating-point number:
+
+ sprintf('%f', 3.14159) # => "3.141590"
+ sprintf('%f', -3.14159) # => "-3.141590"
+
+Flag <tt>'#'</tt> does not apply.
+
+==== Specifiers +g+ and +G+
+
+Format +argument+ using exponential form (+e+/+E+ specifier)
+if the exponent is less than -4 or greater than or equal to the precision.
+Otherwise format +argument+ using floating-point form (+f+ specifier):
+
+ sprintf('%g', 100) # => "100"
+ sprintf('%g', 100.0) # => "100"
+ sprintf('%g', 3.14159) # => "3.14159"
+ sprintf('%g', 100000000000) # => "1e+11"
+ sprintf('%g', 0.000000000001) # => "1e-12"
+
+ # Capital 'G' means use capital 'E'.
+ sprintf('%G', 100000000000) # => "1E+11"
+ sprintf('%G', 0.000000000001) # => "1E-12"
+
+ # Alternate format.
+ sprintf('%#g', 100000000000) # => "1.00000e+11"
+ sprintf('%#g', 0.000000000001) # => "1.00000e-12"
+ sprintf('%#G', 100000000000) # => "1.00000E+11"
+ sprintf('%#G', 0.000000000001) # => "1.00000E-12"
+
+==== Specifier +o+
+
+Format +argument+ as an octal integer.
+If +argument+ is negative, it will be formatted as a two's complement
+prefixed with +..7+:
+
+ sprintf('%o', 16) # => "20"
+
+ # Prefix '..7' for negative value.
+ sprintf('%o', -16) # => "..760"
+
+ # Prefix zero for alternate format if positive.
+ sprintf('%#o', 16) # => "020"
+ sprintf('%#o', -16) # => "..760"
+
+==== Specifier +p+
+
+Format +argument+ as a string via <tt>argument.inspect</tt>:
+
+ t = Time.now
+ sprintf('%p', t) # => "2022-05-01 13:42:07.1645683 -0500"
+
+==== Specifier +s+
+
+Format +argument+ as a string via <tt>argument.to_s</tt>:
+
+ t = Time.now
+ sprintf('%s', t) # => "2022-05-01 13:42:07 -0500"
+
+Flag <tt>'#'</tt> does not apply.
+
+==== Specifiers +x+ and +X+
+
+Format +argument+ as a hexadecimal integer.
+If +argument+ is negative, it will be formatted as a two's complement
+prefixed with +..f+:
+
+ sprintf('%x', 100) # => "64"
+
+ # Prefix '..f' for negative value.
+ sprintf('%x', -100) # => "..f9c"
+
+ # Use alternate format.
+ sprintf('%#x', 100) # => "0x64"
+
+ # Alternate format for negative value.
+ sprintf('%#x', -100) # => "0x..f9c"
+
+==== Specifier <tt>%</tt>
+
+Format +argument+ (<tt>'%'</tt>) as a single percent character:
+
+ sprintf('%d %%', 100) # => "100 %"
+
+Flags do not apply.
+
+=== Reference by Name
+
+For more complex formatting, Ruby supports a reference by name.
+%<name>s style uses format style, but %{name} style doesn't.
+
+Examples:
+
+ sprintf("%<foo>d : %<bar>f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
+ sprintf("%{foo}f", { :foo => 1 }) # => "1f"
diff --git a/doc/globals.rdoc b/doc/globals.rdoc
index 89b94e9a8f..1d7cda69f9 100644
--- a/doc/globals.rdoc
+++ b/doc/globals.rdoc
@@ -50,9 +50,6 @@ $-p:: True if option <tt>-p</tt> is set. Read-only variable.
== Pre-defined global constants
-TRUE:: The typical true value. Deprecated.
-FALSE:: The +false+ itself. Deprecated.
-NIL:: The +nil+ itself. Deprecated.
STDIN:: The standard input. The default value for $stdin.
STDOUT:: The standard output. The default value for $stdout.
STDERR:: The standard error output. The default value for $stderr.
diff --git a/doc/implicit_conversion.rdoc b/doc/implicit_conversion.rdoc
new file mode 100644
index 0000000000..ba15fa4bf4
--- /dev/null
+++ b/doc/implicit_conversion.rdoc
@@ -0,0 +1,221 @@
+== Implicit Conversions
+
+Some Ruby methods accept one or more objects
+that can be either:
+
+* <i>Of a given class</i>, and so accepted as is.
+* <i>Implicitly convertible to that class</i>, in which case
+ the called method converts the object.
+
+For each of the relevant classes, the conversion is done by calling
+a specific conversion method:
+
+* Array: +to_ary+
+* Hash: +to_hash+
+* Integer: +to_int+
+* String: +to_str+
+
+=== Array-Convertible Objects
+
+An <i>Array-convertible object</i> is an object that:
+
+* Has instance method +to_ary+.
+* The method accepts no arguments.
+* The method returns an object +obj+ for which <tt>obj.kind_of?(Array)</tt> returns +true+.
+
+The Ruby core class that satisfies these requirements is:
+
+* Array
+
+The examples in this section use method <tt>Array#replace</tt>,
+which accepts an Array-convertible argument.
+
+This class is Array-convertible:
+
+ class ArrayConvertible
+ def to_ary
+ [:foo, 'bar', 2]
+ end
+ end
+ a = []
+ a.replace(ArrayConvertible.new) # => [:foo, "bar", 2]
+
+This class is not Array-convertible (no +to_ary+ method):
+
+ class NotArrayConvertible; end
+ a = []
+ # Raises TypeError (no implicit conversion of NotArrayConvertible into Array)
+ a.replace(NotArrayConvertible.new)
+
+This class is not Array-convertible (method +to_ary+ takes arguments):
+
+ class NotArrayConvertible
+ def to_ary(x)
+ [:foo, 'bar', 2]
+ end
+ end
+ a = []
+ # Raises ArgumentError (wrong number of arguments (given 0, expected 1))
+ a.replace(NotArrayConvertible.new)
+
+This class is not Array-convertible (method +to_ary+ returns non-Array):
+
+ class NotArrayConvertible
+ def to_ary
+ :foo
+ end
+ end
+ a = []
+ # Raises TypeError (can't convert NotArrayConvertible to Array (NotArrayConvertible#to_ary gives Symbol))
+ a.replace(NotArrayConvertible.new)
+
+=== Hash-Convertible Objects
+
+A <i>Hash-convertible object</i> is an object that:
+
+* Has instance method +to_hash+.
+* The method accepts no arguments.
+* The method returns an object +obj+ for which <tt>obj.kind_of?(Hash)</tt> returns +true+.
+
+The Ruby core class that satisfies these requirements is:
+
+* Hash
+
+The examples in this section use method <tt>Hash#merge</tt>,
+which accepts a Hash-convertible argument.
+
+This class is Hash-convertible:
+
+ class HashConvertible
+ def to_hash
+ {foo: 0, bar: 1, baz: 2}
+ end
+ end
+ h = {}
+ h.merge(HashConvertible.new) # => {:foo=>0, :bar=>1, :baz=>2}
+
+This class is not Hash-convertible (no +to_hash+ method):
+
+ class NotHashConvertible; end
+ h = {}
+ # Raises TypeError (no implicit conversion of NotHashConvertible into Hash)
+ h.merge(NotHashConvertible.new)
+
+This class is not Hash-convertible (method +to_hash+ takes arguments):
+
+ class NotHashConvertible
+ def to_hash(x)
+ {foo: 0, bar: 1, baz: 2}
+ end
+ end
+ h = {}
+ # Raises ArgumentError (wrong number of arguments (given 0, expected 1))
+ h.merge(NotHashConvertible.new)
+
+This class is not Hash-convertible (method +to_hash+ returns non-Hash):
+
+ class NotHashConvertible
+ def to_hash
+ :foo
+ end
+ end
+ h = {}
+ # Raises TypeError (can't convert NotHashConvertible to Hash (ToHashReturnsNonHash#to_hash gives Symbol))
+ h.merge(NotHashConvertible.new)
+
+=== Integer-Convertible Objects
+
+An <i>Integer-convertible object</i> is an object that:
+
+* Has instance method +to_int+.
+* The method accepts no arguments.
+* The method returns an object +obj+ for which <tt>obj.kind_of?(Integer)</tt> returns +true+.
+
+The Ruby core classes that satisfy these requirements are:
+
+* Integer
+* Float
+* Complex
+* Rational
+
+The examples in this section use method <tt>Array.new</tt>,
+which accepts an Integer-convertible argument.
+
+This user-defined class is Integer-convertible:
+
+ class IntegerConvertible
+ def to_int
+ 3
+ end
+ end
+ a = Array.new(IntegerConvertible.new).size
+ a # => 3
+
+This class is not Integer-convertible (method +to_int+ takes arguments):
+
+ class NotIntegerConvertible
+ def to_int(x)
+ 3
+ end
+ end
+ # Raises ArgumentError (wrong number of arguments (given 0, expected 1))
+ Array.new(NotIntegerConvertible.new)
+
+This class is not Integer-convertible (method +to_int+ returns non-Integer):
+
+ class NotIntegerConvertible
+ def to_int
+ :foo
+ end
+ end
+ # Raises TypeError (can't convert NotIntegerConvertible to Integer (NotIntegerConvertible#to_int gives Symbol))
+ Array.new(NotIntegerConvertible.new)
+
+=== String-Convertible Objects
+
+A <i>String-convertible object</i> is an object that:
+* Has instance method +to_str+.
+* The method accepts no arguments.
+* The method returns an object +obj+ for which <tt>obj.kind_of?(String)</tt> returns +true+.
+
+The Ruby core class that satisfies these requirements is:
+
+* String
+
+The examples in this section use method <tt>String::new</tt>,
+which accepts a String-convertible argument.
+
+This class is String-convertible:
+
+ class StringConvertible
+ def to_str
+ 'foo'
+ end
+ end
+ String.new(StringConvertible.new) # => "foo"
+
+This class is not String-convertible (no +to_str+ method):
+
+ class NotStringConvertible; end
+ # Raises TypeError (no implicit conversion of NotStringConvertible into String)
+ String.new(NotStringConvertible.new)
+
+This class is not String-convertible (method +to_str+ takes arguments):
+
+ class NotStringConvertible
+ def to_str(x)
+ 'foo'
+ end
+ end
+ # Raises ArgumentError (wrong number of arguments (given 0, expected 1))
+ String.new(NotStringConvertible.new)
+
+This class is not String-convertible (method +to_str+ returns non-String):
+
+ class NotStringConvertible
+ def to_str
+ :foo
+ end
+ end
+ # Raises TypeError (can't convert NotStringConvertible to String (NotStringConvertible#to_str gives Symbol))
+ String.new(NotStringConvertible.new)
diff --git a/doc/irb/irb.rd.ja b/doc/irb/irb.rd.ja
index 81247ce4b0..633c08cbd4 100644
--- a/doc/irb/irb.rd.ja
+++ b/doc/irb/irb.rd.ja
@@ -51,6 +51,12 @@ irbã®ä½¿ã„æ–¹ã¯, Rubyã•ãˆçŸ¥ã£ã¦ã„れã°ã„ãŸã£ã¦ç°¡å˜ã§ã™. 基本
オブジェクトã®ä½œæˆæ–¹æ³•ã‚’ 0 ã‹ã‚‰ 3 ã®ã„ãšã‚Œã‹ã«è¨­å®šã™ã‚‹.
--echo å®Ÿè¡Œçµæžœã‚’表示ã™ã‚‹(デフォルト).
--noecho å®Ÿè¡Œçµæžœã‚’表示ã—ãªã„.
+ --echo-on-assignment
+ 代入時ã«å®Ÿè¡Œçµæžœã‚’表示ã™ã‚‹.
+ --noecho-on-assignment
+ 代入時ã«å®Ÿè¡Œçµæžœã‚’表示ã—ãªã„.
+ --truncate-echo-on-assignment
+ 代入時ã«çœç•¥ã•れãŸå®Ÿè¡Œçµæžœã‚’表示ã™ã‚‹(デフォルト).
--inspect çµæžœå‡ºåŠ›ã«inspectを用ã„ã‚‹.
--noinspect çµæžœå‡ºåŠ›ã«inspectを用ã„ãªã„.
--singleline シングルラインエディタを利用ã™ã‚‹.
@@ -59,7 +65,10 @@ irbã®ä½¿ã„æ–¹ã¯, Rubyã•ãˆçŸ¥ã£ã¦ã„れã°ã„ãŸã£ã¦ç°¡å˜ã§ã™. 基本
用ã—よã†ã¨ã™ã‚‹.
--colorize 色付ã‘を利用ã™ã‚‹.
--nocolorize 色付ã‘を利用ã—ãªã„.
- --prompt prompt-mode/--prompt-mode prompt-mode
+ --autocomplete オートコンプリートを利用ã™ã‚‹.
+ --noautocomplete オートコンプリートを利用ã—ãªã„.
+ --prompt prompt-mode
+ --prompt-mode prompt-mode
プロンプトモードを切替ãˆã¾ã™. ç¾åœ¨å®šç¾©ã•れã¦ã„るプ
ロンプトモードã¯, default, simple, xmp, inf-rubyãŒ
用æ„ã•れã¦ã„ã¾ã™.
@@ -144,12 +153,12 @@ PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cã¯, フォーマットを指定ã—ã¾ã™.
例ãˆã°, デフォルトã®ãƒ—ロンプトモードã¯:
- IRB.conf[:PROMPT_MODE][:DEFAULT] = {
+ IRB.conf[:PROMPT][:DEFAULT] = {
:PROMPT_I => "%N(%m):%03n:%i> ",
:PROMPT_N => "%N(%m):%03n:%i> ",
:PROMPT_S => "%N(%m):%03n:%i%l ",
:PROMPT_C => "%N(%m):%03n:%i* ",
- :RETURN => "%s\n"
+ :RETURN => "=> %s\n"
}
ã¨ãªã£ã¦ã„ã¾ã™.
@@ -381,7 +390,7 @@ rubyã§ã¯, 以下ã®ãƒ—ログラムã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™.
パイルã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’決定ã™ã‚‹ã‹ã‚‰ã§ã™. ãれã«å¯¾ã—, irbã¯å®Ÿè¡Œå¯èƒ½ã«
ãªã‚‹(å¼ãŒé–‰ã˜ã‚‹)ã¨è‡ªå‹•çš„ã«è©•価ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™. 上記ã®ä¾‹ã§ã¯,
- evel "foo = 0"
+ eval "foo = 0"
を行ãªã£ãŸæ™‚点ã§è©•価を行ãªã„, ãã®æ™‚点ã§å¤‰æ•°ãŒå®šç¾©ã•れるãŸã‚, 次å¼ã§
変数fooã¯å®šç¾©ã•れã¦ã„ã‚‹ã‹ã‚‰ã§ã™.
diff --git a/doc/keywords.rdoc b/doc/keywords.rdoc
index a74126823d..cb1cff33f0 100644
--- a/doc/keywords.rdoc
+++ b/doc/keywords.rdoc
@@ -82,6 +82,8 @@ if::
in::
Used to separate the iterable object and iterator variable in a +for+ loop.
See {control expressions}[rdoc-ref:syntax/control_expressions.rdoc]
+ It also serves as a pattern in a +case+ expression.
+ See {pattern matching}[rdoc-ref:syntax/pattern_matching.rdoc]
module::
Creates or opens a module. See {modules and classes
diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
index 98de9f2549..7e0c35194f 100644
--- a/doc/maintainers.rdoc
+++ b/doc/maintainers.rdoc
@@ -13,7 +13,7 @@ A module maintainer is responsible for a certain part of Ruby.
* They have "developer" role on the Redmine to modify issues.
* They have authority to decide the feature of their part. But they should always respect discussions on ruby-core/ruby-dev.
-A submaintainer of a module is like a maintainer. But The submaintainer does
+A submaintainer of a module is like a maintainer. But the submaintainer does
not have authority to change/add a feature on his/her part. They need consensus
on ruby-core/ruby-dev before changing/adding. Some of submaintainers have
commit right, others don't.
@@ -30,77 +30,17 @@ Koichi Sasada (ko1)
Yukihiro Matsumoto (matz)
-=== Documentation
-
-Zachary Scott (zzak)
-
== Standard Library Maintainers
=== Libraries
-[lib/English.rb]
- _unmaintained_
-[lib/abbrev.rb]
- Akinori MUSHA (knu)
-[lib/base64.rb]
- Yusuke Endoh (mame)
-[lib/drb.rb, lib/drb/*]
- Masatoshi SEKI (seki)
-[lib/debug.rb]
- _unmaintained_
-[lib/erb.rb]
- Masatoshi SEKI (seki), Takashi Kokubun (k0kubun)
-[lib/find.rb]
- Kazuki Tsujimoto (ktsj)
[lib/mkmf.rb]
_unmaintained_
-[lib/monitor.rb]
- Shugo Maeda (shugo)
-[lib/net/ftp.rb]
- Shugo Maeda (shugo)
-[lib/net/imap.rb]
- Shugo Maeda (shugo)
-[lib/net/http.rb, lib/net/https.rb]
- NARUSE, Yui (naruse)
-[lib/net/protocol.rb]
- _unmaintained_
-[lib/open-uri.rb]
- Tanaka Akira (akr)
-[lib/optparse.rb, lib/optparse/*]
- Nobuyuki Nakada (nobu)
-[lib/pp.rb]
- Tanaka Akira (akr)
-[lib/prettyprint.rb]
- Tanaka Akira (akr)
-[lib/resolv-replace.rb]
- Tanaka Akira (akr)
-[lib/resolv.rb]
- Tanaka Akira (akr)
-[lib/rinda/*]
- Masatoshi SEKI (seki)
[lib/rubygems.rb, lib/rubygems/*]
Eric Hodel (drbrain), Hiroshi SHIBATA (hsbt)
https://github.com/rubygems/rubygems
-[lib/set.rb]
- Akinori MUSHA (knu)
-[lib/securerandom.rb]
- Tanaka Akira (akr)
-[lib/shellwords.rb]
- Akinori MUSHA (knu)
-[lib/tempfile.rb]
- _unmaintained_
-[lib/tmpdir.rb]
- _unmaintained_
-[lib/time.rb]
- Tanaka Akira (akr)
-[lib/tsort.rb]
- Tanaka Akira (akr)
-[lib/un.rb]
- WATANABE Hirofumi (eban)
[lib/unicode_normalize.rb, lib/unicode_normalize/*]
Martin J. Dürst
-[lib/weakref.rb]
- _unmaintained_
=== Extensions
@@ -108,56 +48,57 @@ Zachary Scott (zzak)
Koichi Sasada (ko1)
[ext/coverage]
Yusuke Endoh (mame)
-[ext/digest, ext/digest/*]
- Akinori MUSHA (knu)
[ext/fiber]
Koichi Sasada (ko1)
-[ext/io/nonblock]
- Nobuyuki Nakada (nobu)
-[ext/io/wait]
- Nobuyuki Nakada (nobu)
-[ext/nkf]
- NARUSE, Yui (naruse)
+[ext/monitor]
+ Koichi Sasada (ko1)
[ext/objspace]
_unmaintained_
-[ext/pathname]
- Tanaka Akira (akr)
[ext/pty]
_unmaintained_
-[ext/readline]
- TAKAO Kouji (kouji)
[ext/ripper]
_unmaintained_
[ext/socket]
* Tanaka Akira (akr)
* API change needs matz's approval
-[ext/syslog]
- Akinori MUSHA (knu)
[ext/win32]
NAKAMURA Usaku (usa)
-[ext/win32ole]
- Masaki Suketa (suke)
== Default gems Maintainers
=== Libraries
+[lib/abbrev.rb]
+ Akinori MUSHA (knu)
+ https://github.com/ruby/abbrev
+ https://rubygems.org/gems/abbrev
+[lib/base64.rb]
+ Yusuke Endoh (mame)
+ https://github.com/ruby/base64
+ https://rubygems.org/gems/base64
[lib/benchmark.rb]
_unmaintained_
- https://github.com/bundler/benchmark
+ https://github.com/ruby/benchmark
https://rubygems.org/gems/benchmark
[lib/bundler.rb, lib/bundler/*]
Hiroshi SHIBATA (hsbt)
- https://github.com/bundler/bundler
+ https://github.com/rubygems/rubygems
https://rubygems.org/gems/bundler
[lib/cgi.rb, lib/cgi/*]
- Takeyuki Fujioka (xibbar)
+ _unmaintained_
https://github.com/ruby/cgi
https://rubygems.org/gems/cgi
[lib/csv.rb]
Kenta Murata (mrkn), Kouhei Sutou (kou)
https://github.com/ruby/csv
https://rubygems.org/gems/csv
+[lib/English.rb]
+ _unmaintained_
+ https://github.com/ruby/English
+ https://rubygems.org/gems/English
+[lib/debug.rb]
+ _unmaintained_
+ https://github.com/ruby/debug
[lib/delegate.rb]
_unmaintained_
https://github.com/ruby/delegate
@@ -165,10 +106,31 @@ Zachary Scott (zzak)
[lib/did_you_mean.rb]
Yuki Nishijima (yuki24)
https://github.com/ruby/did_you_mean
+ https://rubygems.org/gems/did_you_mean
+[ext/digest, ext/digest/*]
+ Akinori MUSHA (knu)
+ https://github.com/ruby/digest
+ https://rubygems.org/gems/digest
+[lib/drb.rb, lib/drb/*]
+ Masatoshi SEKI (seki)
+ https://github.com/ruby/drb
+ https://rubygems.org/gems/drb
+[lib/erb.rb]
+ Masatoshi SEKI (seki), Takashi Kokubun (k0kubun)
+ https://github.com/ruby/erb
+ https://rubygems.org/gems/erb
+[lib/error_highlight.rb, lib/error_highlight/*]
+ Yusuke Endoh (mame)
+ https://github.com/ruby/error_highlight
+ https://rubygems.org/gems/error_highlight
[lib/fileutils.rb]
_unmaintained_
https://github.com/ruby/fileutils
https://rubygems.org/gems/fileutils
+[lib/find.rb]
+ Kazuki Tsujimoto (ktsj)
+ https://github.com/ruby/find
+ https://rubygems.org/gems/find
[lib/forwardable.rb]
Keiju ISHITSUKA (keiju)
https://github.com/ruby/forwardable
@@ -182,43 +144,51 @@ Zachary Scott (zzak)
https://github.com/ruby/ipaddr
https://rubygems.org/gems/ipaddr
[lib/irb.rb, lib/irb/*]
- Keiju ISHITSUKA (keiju)
+ aycabta
https://github.com/ruby/irb
https://rubygems.org/gems/irb
+[lib/optparse.rb, lib/optparse/*]
+ Nobuyuki Nakada (nobu)
+ https://github.com/ruby/optparse
[lib/logger.rb]
Naotoshi Seo (sonots)
https://github.com/ruby/logger
https://rubygems.org/gems/logger
-[lib/matrix.rb]
- Marc-Andre Lafortune (marcandre)
- https://github.com/ruby/matrix
- https://rubygems.org/gems/matrix
[lib/mutex_m.rb]
Keiju ISHITSUKA (keiju)
https://github.com/ruby/mutex_m
https://rubygems.org/gems/mutex_m
-[lib/net/pop.rb]
- _unmaintained_
- https://github.com/ruby/net-pop
- https://rubygems.org/gems/net-pop
-[lib/net/smtp.rb]
+[lib/net/http.rb, lib/net/https.rb]
+ NARUSE, Yui (naruse)
+ https://github.com/ruby/net-http
+ https://rubygems.org/gems/net-http
+[lib/net/protocol.rb]
_unmaintained_
- https://github.com/ruby/net-smtp
- https://rubygems.org/gems/net-smtp
+ https://github.com/ruby/net-protocol
+ https://rubygems.org/gems/net-protocol
[lib/observer.rb]
_unmaintained_
https://github.com/ruby/observer
+ https://rubygems.org/gems/observer
[lib/open3.rb]
_unmaintained_
https://github.com/ruby/open3
https://rubygems.org/gems/open3
+[lib/open-uri.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/open-uri
[lib/ostruct.rb]
- Marc-Andre Lafortune (marcandre)
+ Marc-André Lafortune (marcandre)
https://github.com/ruby/ostruct
https://rubygems.org/gems/ostruct
-[lib/prime.rb]
- Yuki Sonoda (yugui)
- https://github.com/ruby/prime
+[lib/pp.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/pp
+ https://rubygems.org/gems/pp
+[lib/prettyprint.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/prettyprint
+ https://rubygems.org/gems/prettyprint
[lib/pstore.rb]
_unmaintained_
https://github.com/ruby/pstore
@@ -231,46 +201,86 @@ Zachary Scott (zzak)
aycabta
https://github.com/ruby/readline
https://rubygems.org/gems/readline
+[lib/resolv.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/resolv
+ https://rubygems.org/gems/resolv
+[lib/resolv-replace.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/resolv-replace
+ https://rubygems.org/gems/resolv-replace
[lib/rdoc.rb, lib/rdoc/*]
Eric Hodel (drbrain), Hiroshi SHIBATA (hsbt)
https://github.com/ruby/rdoc
https://rubygems.org/gems/rdoc
+[lib/readline.rb]
+ aycabta
+ https://github.com/ruby/readline
+ https://rubygems.org/gems/readline
[lib/reline.rb, lib/reline/*]
aycabta
https://github.com/ruby/reline
https://rubygems.org/gems/reline
-[lib/rexml/*]
- Kouhei Sutou (kou)
- https://github.com/ruby/rexml
- https://rubygems.org/gems/rexml
-[lib/rss.rb, lib/rss/*]
- Kouhei Sutou (kou)
- https://github.com/ruby/rss
- https://rubygems.org/gems/rss
+[lib/rinda/*]
+ Masatoshi SEKI (seki)
+ https://github.com/ruby/rinda
+ https://rubygems.org/gems/rinda
+[lib/securerandom.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/securerandom
+ https://rubygems.org/gems/securerandom
+[lib/set.rb]
+ Akinori MUSHA (knu)
+ https://github.com/ruby/set
+ https://rubygems.org/gems/set
+[lib/shellwords.rb]
+ Akinori MUSHA (knu)
+ https://github.com/ruby/shellwords
+ https://rubygems.org/gems/shellwords
[lib/singleton.rb]
Yukihiro Matsumoto (matz)
https://github.com/ruby/singleton
https://rubygems.org/gems/singleton
+[lib/tempfile.rb]
+ _unmaintained_
+ https://github.com/ruby/tempfile
+ https://rubygems.org/gems/tempfile
+[lib/time.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/time
+ https://rubygems.org/gems/time
[lib/timeout.rb]
Yukihiro Matsumoto (matz)
https://github.com/ruby/timeout
+ https://rubygems.org/gems/timeout
[lib/thwait.rb]
Keiju ISHITSUKA (keiju)
https://github.com/ruby/thwait
https://rubygems.org/gems/thwait
-[lib/tracer.rb]
- Keiju ISHITSUKA (keiju)
- https://github.com/ruby/tracer
+[lib/tmpdir.rb]
+ _unmaintained_
+ https://github.com/ruby/tmpdir
+ https://rubygems.org/gems/tmpdir
+[lib/tsort.rb]
+ Tanaka Akira (akr)
+ https://github.com/ruby/tsort
+ https://rubygems.org/gems/tsort
+[lib/un.rb]
+ WATANABE Hirofumi (eban)
+ https://github.com/ruby/un
+ https://rubygems.org/gems/un
[lib/uri.rb, lib/uri/*]
YAMADA, Akira (akira)
https://github.com/ruby/uri
-[lib/webrick.rb, lib/webrick/*]
- Eric Wong (normalperson)
- https://bugs.ruby-lang.org/
- https://rubygems.org/gems/webrick
+ https://rubygems.org/gems/uri
[lib/yaml.rb, lib/yaml/*]
Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt)
https://github.com/ruby/yaml
+ https://rubygems.org/gems/yaml
+[lib/weakref.rb]
+ _unmaintained_
+ https://github.com/ruby/weakref
+ https://rubygems.org/gems/weakref
=== Extensions
@@ -286,10 +296,6 @@ Zachary Scott (zzak)
_unmaintained_
https://github.com/ruby/date
https://rubygems.org/gems/date
-[ext/dbm]
- _unmaintained_
- https://github.com/ruby/dbm
- https://rubygems.org/gems/dbm
[ext/etc]
Ruby core team
https://github.com/ruby/etc
@@ -302,22 +308,34 @@ Zachary Scott (zzak)
Aaron Patterson (tenderlove)
https://github.com/ruby/fiddle
https://rubygems.org/gems/fiddle
-[ext/gdbm]
- Yukihiro Matsumoto (matz)
- https://github.com/ruby/gdbm
- https://rubygems.org/gems/gdbm
[ext/io/console]
Nobuyuki Nakada (nobu)
https://github.com/ruby/io-console
https://rubygems.org/gems/io-console
+[ext/io/nonblock]
+ Nobuyuki Nakada (nobu)
+ https://github.com/ruby/io-nonblock
+ https://rubygems.org/gems/io-nonblock
+[ext/io/wait]
+ Nobuyuki Nakada (nobu)
+ https://github.com/ruby/io-wait
+ https://rubygems.org/gems/io-wait
[ext/json]
NARUSE, Yui (naruse), Hiroshi SHIBATA (hsbt)
https://github.com/flori/json
https://rubygems.org/gems/json
+[ext/nkf]
+ NARUSE, Yui (naruse)
+ https://github.com/ruby/nkf
+ https://rubygems.org/gems/nkf
[ext/openssl]
Kazuki Yamaguchi (rhe)
https://github.com/ruby/openssl
https://rubygems.org/gems/openssl
+[ext/pathname]
+ Tanaka Akira (akr)
+ https://github.com/ruby/pathname
+ https://rubygems.org/gems/pathname
[ext/psych]
Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt)
https://github.com/ruby/psych
@@ -326,10 +344,10 @@ Zachary Scott (zzak)
Aaron Patterson (tenderlove), Hiroshi SHIBATA (hsbt)
https://github.com/ruby/racc
https://rubygems.org/gems/racc
-[ext/sdbm]
- Yukihiro Matsumoto (matz)
- https://github.com/ruby/sdbm
- https://rubygems.org/gems/sdbm
+[ext/readline]
+ TAKAO Kouji (kouji)
+ https://github.com/ruby/readline-ext
+ https://rubygems.org/gems/readline-ext
[ext/stringio]
Nobuyuki Nakada (nobu)
https://github.com/ruby/stringio
@@ -338,6 +356,14 @@ Zachary Scott (zzak)
Kouhei Sutou (kou)
https://github.com/ruby/strscan
https://rubygems.org/gems/strscan
+[ext/syslog]
+ Akinori MUSHA (knu)
+ https://github.com/ruby/syslog
+ https://rubygems.org/gems/syslog
+[ext/win32ole]
+ Masaki Suketa (suke)
+ https://github.com/ruby/win32ole
+ https://rubygems.org/gems/win32ole
[ext/zlib]
NARUSE, Yui (naruse)
https://github.com/ruby/zlib
@@ -347,13 +373,52 @@ Zachary Scott (zzak)
[minitest]
https://github.com/seattlerb/minitest
-[net-telnet]
- https://github.com/ruby/net-telnet
[power_assert]
- https://github.com/k-tsj/power_assert
+ https://github.com/ruby/power_assert
[rake]
https://github.com/ruby/rake
[test-unit]
https://github.com/test-unit/test-unit
-[xmlrpc]
- https://github.com/ruby/xmlrpc
+[rexml]
+ https://github.com/ruby/rexml
+[rss]
+ https://github.com/ruby/rss
+[net-ftp]
+ https://github.com/ruby/net-ftp
+[net-imap]
+ https://github.com/ruby/net-imap
+[net-pop]
+ https://github.com/ruby/net-pop
+[net-smtp]
+ https://github.com/ruby/net-smtp
+[matrix]
+ https://github.com/ruby/matrix
+[prime]
+ https://github.com/ruby/prime
+[rbs]
+ https://github.com/ruby/rbs
+[typeprof]
+ https://github.com/ruby/typeprof
+
+=== Platform Maintainers
+
+[mswin64 (Microsoft Windows)]
+ NAKAMURA Usaku (usa)
+[mingw32 (Minimalist GNU for Windows)]
+ Nobuyoshi Nakada (nobu)
+[AIX]
+ Yutaka Kanemoto (kanemoto)
+[FreeBSD]
+ Akinori MUSHA (knu)
+[Solaris]
+ Naohisa Goto (ngoto)
+[RHEL, CentOS]
+ KOSAKI Motohiro (kosaki)
+[macOS]
+ Kenta Murata (mrkn)
+[OpenBSD]
+ Jeremy Evans (jeremyevans0)
+[cygwin, ...]
+ none. (Maintainer WANTED)
+[WebAssembly/WASI]
+ Yuta Saito (katei)
diff --git a/doc/marshal.rdoc b/doc/marshal.rdoc
index a51f1bf873..abf9467262 100644
--- a/doc/marshal.rdoc
+++ b/doc/marshal.rdoc
@@ -73,7 +73,7 @@ The first byte has the following special values:
a positive little-endian integer.
"\xfd"::
- The total size of the integer is two bytes. The following three bytes are a
+ The total size of the integer is four bytes. The following three bytes are a
negative little-endian integer.
"\x04"::
@@ -83,7 +83,7 @@ The first byte has the following special values:
of stream objects full precision may be used.
"\xfc"::
- The total size of the integer is two bytes. The following four bytes are a
+ The total size of the integer is five bytes. The following four bytes are a
negative little-endian integer. For compatibility with 32 bit ruby,
only Fixnums greater than -10737341824 should be represented this way. For
sizes of stream objects full precision may be used.
diff --git a/doc/matchdata/begin.rdoc b/doc/matchdata/begin.rdoc
new file mode 100644
index 0000000000..8046dd9d55
--- /dev/null
+++ b/doc/matchdata/begin.rdoc
@@ -0,0 +1,30 @@
+Returns the offset (in characters) of the beginning of the specified match.
+
+When non-negative integer argument +n+ is given,
+returns the offset of the beginning of the <tt>n</tt>th match:
+
+ m = /(.)(.)(\d+)(\d)/.match("THX1138.")
+ # => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">
+ m[0] # => "HX1138"
+ m.begin(0) # => 1
+ m[3] # => "113"
+ m.begin(3) # => 3
+
+ m = /(Ñ‚)(е)(Ñ)/.match('теÑÑ‚')
+ # => #<MatchData "теÑ" 1:"Ñ‚" 2:"е" 3:"Ñ">
+ m[0] # => "теÑ"
+ m.begin(0) # => 0
+ m[3] # => "Ñ"
+ m.begin(3) # => 2
+
+When string or symbol argument +name+ is given,
+returns the offset of the beginning for the named match:
+
+ m = /(?<foo>.)(.)(?<bar>.)/.match("hoge")
+ # => #<MatchData "hog" foo:"h" bar:"g">
+ m[:foo] # => "h"
+ m.begin('foo') # => 0
+ m[:bar] # => "g"
+ m.begin(:bar) # => 2
+
+Related: MatchData#end, MatchData#offset, MatchData#byteoffset.
diff --git a/doc/matchdata/end.rdoc b/doc/matchdata/end.rdoc
new file mode 100644
index 0000000000..0209b2d2fc
--- /dev/null
+++ b/doc/matchdata/end.rdoc
@@ -0,0 +1,30 @@
+Returns the offset (in characters) of the end of the specified match.
+
+When non-negative integer argument +n+ is given,
+returns the offset of the end of the <tt>n</tt>th match:
+
+ m = /(.)(.)(\d+)(\d)/.match("THX1138.")
+ # => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">
+ m[0] # => "HX1138"
+ m.end(0) # => 7
+ m[3] # => "113"
+ m.end(3) # => 6
+
+ m = /(Ñ‚)(е)(Ñ)/.match('теÑÑ‚')
+ # => #<MatchData "теÑ" 1:"Ñ‚" 2:"е" 3:"Ñ">
+ m[0] # => "теÑ"
+ m.end(0) # => 3
+ m[3] # => "Ñ"
+ m.end(3) # => 3
+
+When string or symbol argument +name+ is given,
+returns the offset of the end for the named match:
+
+ m = /(?<foo>.)(.)(?<bar>.)/.match("hoge")
+ # => #<MatchData "hog" foo:"h" bar:"g">
+ m[:foo] # => "h"
+ m.end('foo') # => 1
+ m[:bar] # => "g"
+ m.end(:bar) # => 3
+
+Related: MatchData#begin, MatchData#offset, MatchData#byteoffset.
diff --git a/doc/matchdata/offset.rdoc b/doc/matchdata/offset.rdoc
new file mode 100644
index 0000000000..0985316d76
--- /dev/null
+++ b/doc/matchdata/offset.rdoc
@@ -0,0 +1,31 @@
+Returns a 2-element array containing the beginning and ending
+offsets (in characters) of the specified match.
+
+When non-negative integer argument +n+ is given,
+returns the starting and ending offsets of the <tt>n</tt>th match:
+
+ m = /(.)(.)(\d+)(\d)/.match("THX1138.")
+ # => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8">
+ m[0] # => "HX1138"
+ m.offset(0) # => [1, 7]
+ m[3] # => "113"
+ m.offset(3) # => [3, 6]
+
+ m = /(Ñ‚)(е)(Ñ)/.match('теÑÑ‚')
+ # => #<MatchData "теÑ" 1:"Ñ‚" 2:"е" 3:"Ñ">
+ m[0] # => "теÑ"
+ m.offset(0) # => [0, 3]
+ m[3] # => "Ñ"
+ m.offset(3) # => [2, 3]
+
+When string or symbol argument +name+ is given,
+returns the starting and ending offsets for the named match:
+
+ m = /(?<foo>.)(.)(?<bar>.)/.match("hoge")
+ # => #<MatchData "hog" foo:"h" bar:"g">
+ m[:foo] # => "h"
+ m.offset('foo') # => [0, 1]
+ m[:bar] # => "g"
+ m.offset(:bar) # => [2, 3]
+
+Related: MatchData#byteoffset, MatchData#begin, MatchData#end.
diff --git a/doc/math/math.rdoc b/doc/math/math.rdoc
new file mode 100644
index 0000000000..7a89df951c
--- /dev/null
+++ b/doc/math/math.rdoc
@@ -0,0 +1,117 @@
+\Module \Math provides methods for basic trigonometric,
+logarithmic, and transcendental functions, and for extracting roots.
+
+You can write its constants and method calls thus:
+
+ Math::PI # => 3.141592653589793
+ Math::E # => 2.718281828459045
+ Math.sin(0.0) # => 0.0
+ Math.cos(0.0) # => 1.0
+
+If you include module \Math, you can write simpler forms:
+
+ include Math
+ PI # => 3.141592653589793
+ E # => 2.718281828459045
+ sin(0.0) # => 0.0
+ cos(0.0) # => 1.0
+
+For simplicity, the examples here assume:
+
+ include Math
+ INFINITY = Float::INFINITY
+
+The domains and ranges for the methods
+are denoted by open or closed intervals,
+using, respectively, parentheses or square brackets:
+
+- An open interval does not include the endpoints:
+
+ (-INFINITY, INFINITY)
+
+- A closed interval includes the endpoints:
+
+ [-1.0, 1.0]
+
+- A half-open interval includes one endpoint, but not the other:
+
+ [1.0, INFINITY)
+
+Many values returned by \Math methods are numerical approximations.
+This is because many such values are, in mathematics,
+of infinite precision, while in numerical computation
+the precision is finite.
+
+Thus, in mathematics, <i>cos(Ï€/2)</i> is exactly zero,
+but in our computation <tt>cos(PI/2)</tt> is a number very close to zero:
+
+ cos(PI/2) # => 6.123031769111886e-17
+
+For very large and very small returned values,
+we have added formatted numbers for clarity:
+
+ tan(PI/2) # => 1.633123935319537e+16 # 16331239353195370.0
+ tan(PI) # => -1.2246467991473532e-16 # -0.0000000000000001
+
+See class Float for the constants
+that affect Ruby's floating-point arithmetic.
+
+=== What's Here
+
+==== Trigonometric Functions
+
+- ::cos: Returns the cosine of the given argument.
+- ::sin: Returns the sine of the given argument.
+- ::tan: Returns the tangent of the given argument.
+
+==== Inverse Trigonometric Functions
+
+- ::acos: Returns the arc cosine of the given argument.
+- ::asin: Returns the arc sine of the given argument.
+- ::atan: Returns the arc tangent of the given argument.
+- ::atan2: Returns the arg tangent of two given arguments.
+
+==== Hyperbolic Trigonometric Functions
+
+- ::cosh: Returns the hyperbolic cosine of the given argument.
+- ::sinh: Returns the hyperbolic sine of the given argument.
+- ::tanh: Returns the hyperbolic tangent of the given argument.
+
+==== Inverse Hyperbolic Trigonometric Functions
+
+- ::acosh: Returns the inverse hyperbolic cosine of the given argument.
+- ::asinh: Returns the inverse hyperbolic sine of the given argument.
+- ::atanh: Returns the inverse hyperbolic tangent of the given argument.
+
+==== Exponentiation and Logarithmic Functions
+
+- ::exp: Returns the value of a given value raised to a given power.
+- ::log: Returns the logarithm of a given value in a given base.
+- ::log10: Returns the base 10 logarithm of the given argument.
+- ::log2: Returns the base 2 logarithm of the given argument.
+
+==== Fraction and Exponent Functions
+
+- ::frexp: Returns the fraction and exponent of the given argument.
+- ::ldexp: Returns the value for a given fraction and exponent.
+
+==== Root Functions
+
+- ::cbrt: Returns the cube root of the given argument.
+- ::sqrt: Returns the square root of the given argument.
+
+==== Error Functions
+
+- ::erf: Returns the value of the Gauss error function for the given argument.
+- ::erfc: Returns the value of the complementary error function
+ for the given argument.
+
+==== Gamma Functions
+
+- ::gamma: Returns the value of the gamma function for the given argument.
+- ::lgamma: Returns the value of the logarithmic gamma function
+ for the given argument.
+
+==== Hypotenuse Function
+
+- ::hypot: Returns <tt>sqrt(a**2 + b**2)</tt> for the given +a+ and +b+.
diff --git a/doc/memory_view.md b/doc/memory_view.md
new file mode 100644
index 0000000000..0b1369163d
--- /dev/null
+++ b/doc/memory_view.md
@@ -0,0 +1,167 @@
+# MemoryView
+
+MemoryView provides the features to share multidimensional homogeneous arrays of
+fixed-size element on memory among extension libraries.
+
+## Disclaimer
+
+* This feature is still experimental. The specification described here can be changed in the future.
+
+* This document is under construction. Please refer the master branch of ruby for the latest version of this document.
+
+## Overview
+
+We sometimes deal with certain kinds of objects that have arrays of the same typed fixed-size elements on a contiguous memory area as its internal representation.
+Numo::NArray in numo-narray and Magick::Image in rmagick are typical examples of such objects.
+MemoryView plays the role of the hub to share the internal data of such objects without copy among such libraries.
+
+Copy-less sharing of data is very important in some field such as data analysis, machine learning, and image processing. In these field, people need to handle large amount of on-memory data with several libraries. If we are forced to copy to exchange large data among libraries, a large amount of the data processing time must be occupied by copying data. You can avoid such wasting time by using MemoryView.
+
+MemoryView has two categories of APIs:
+
+1. Producer API
+
+ Classes can register own MemoryView entry which allows objects of that classes to expose their MemoryView
+
+2. Consumer API
+
+ Consumer API allows us to obtain and manage the MemoryView of an object
+
+## MemoryView structure
+
+A MemoryView structure, `rb_memory_view_t`, is used for exporting objects' MemoryView.
+This structure contains the reference of the object, which is the owner of the MemoryView, the pointer to the head of exported memory, and the metadata that describes the structure of the memory. The metadata can describe multidimensional arrays with strides.
+
+### The member of MemoryView structure
+
+The MemoryView structure consists of the following members.
+
+- `VALUE obj`
+
+ The reference to the original object that has the memory exported via the MemoryView.
+
+ RubyVM manages the reference count of the MemoryView-exported objects to guard them from the garbage collection. The consumers do not have to struggle to guard this object from GC.
+
+- `void *data`
+
+ The pointer to the head of the exported memory.
+
+- `ssize_t byte_size`
+
+ The number of bytes in the memory pointed by `data`.
+
+- `bool readonly`
+
+ `true` for readonly memory, `false` for writable memory.
+
+- `const char *format`
+
+ A string to describe the format of an element, or NULL for unsigned byte.
+
+- `ssize_t item_size`
+
+ The number of bytes in each element.
+
+- `const rb_memory_view_item_component_t *item_desc.components`
+
+ The array of the metadata of the component in an element.
+
+- `size_t item_desc.length`
+
+ The number of items in `item_desc.components`.
+
+- `ssize_t ndim`
+
+ The number of dimensions.
+
+- `const ssize_t *shape`
+
+ A `ndim` size array indicating the number of elements in each dimension.
+ This can be `NULL` when `ndim` is 1.
+
+- `const ssize_t *strides`
+
+ A `ndim` size array indicating the number of bytes to skip to go to the next element in each dimension.
+ This can be `NULL` when `ndim` is 1.
+
+- `const ssize_t *sub_offsets`
+
+ A `ndim` size array consisting of the offsets in each dimension when the MemoryView exposes a nested array.
+ This can be `NULL` when the MemoryView exposes a flat array.
+
+- `void *private_data`
+
+ The private data that MemoryView provider uses internally.
+ This can be `NULL` when any private data is unnecessary.
+
+## MemoryView APIs
+
+### For consumers
+
+- `bool rb_memory_view_available_p(VALUE obj)`
+
+ Return `true` if `obj` supports to export a MemoryView. Return `false` otherwise.
+
+ If this function returns `true`, it doesn't mean the function `rb_memory_view_get` will succeed.
+
+- `bool rb_memory_view_get(VALUE obj, rb_memory_view_t *view, int flags)`
+
+ If the given `obj` supports to export a MemoryView that conforms the given `flags`, this function fills `view` by the information of the MemoryView and returns `true`. In this case, the reference count of `obj` is increased.
+
+ If the given combination of `obj` and `flags` cannot export a MemoryView, this function returns `false`. The content of `view` is not touched in this case.
+
+ The exported MemoryView must be released by `rb_memory_view_release` when the MemoryView is no longer needed.
+
+- `bool rb_memory_view_release(rb_memory_view_t *view)`
+
+ Release the given MemoryView `view` and decrement the reference count of `view->obj`.
+
+ Consumers must call this function when the MemoryView is no longer needed. Missing to call this function leads memory leak.
+
+- `ssize_t rb_memory_view_item_size_from_format(const char *format, const char **err)`
+
+ Calculate the number of bytes occupied by an element.
+
+ When the calculation fails, the failed location in `format` is stored into `err`, and returns `-1`.
+
+- `void *rb_memory_view_get_item_pointer(rb_memory_view_t *view, const ssize_t *indices)`
+
+ Calculate the location of the item indicated by the given `indices`.
+ The length of `indices` must equal to `view->ndim`.
+ This function initializes `view->item_desc` if needed.
+
+- `VALUE rb_memory_view_get_item(rb_memory_view_t *view, const ssize_t *indices)`
+
+ Return the Ruby object representation of the item indicated by the given `indices`.
+ The length of `indices` must equal to `view->ndim`.
+ This function uses `rb_memory_view_get_item_pointer`.
+
+- `rb_memory_view_init_as_byte_array(rb_memory_view_t *view, VALUE obj, void *data, const ssize_t len, const bool readonly)`
+
+ Fill the members of `view` as an 1-dimensional byte array.
+
+- `void rb_memory_view_fill_contiguous_strides(const ssize_t ndim, const ssize_t item_size, const ssize_t *const shape, const bool row_major_p, ssize_t *const strides)`
+
+ Fill the `strides` array with byte-Strides of a contiguous array of the given shape with the given element size.
+
+- `void rb_memory_view_prepare_item_desc(rb_memory_view_t *view)`
+
+ Fill the `item_desc` member of `view`.
+
+- `bool rb_memory_view_is_contiguous(const rb_memory_view_t *view)`
+
+ Return `true` if the data in the MemoryView `view` is row-major or column-major contiguous.
+
+ Return `false` otherwise.
+
+- `bool rb_memory_view_is_row_major_contiguous(const rb_memory_view_t *view)`
+
+ Return `true` if the data in the MemoryView `view` is row-major contiguous.
+
+ Return `false` otherwise.
+
+- `bool rb_memory_view_is_column_major_contiguous(const rb_memory_view_t *view)`
+
+ Return `true` if the data in the MemoryView `view` is column-major contiguous.
+
+ Return `false` otherwise.
diff --git a/doc/mjit/mjit.md b/doc/mjit/mjit.md
new file mode 100644
index 0000000000..6f19ab3ea7
--- /dev/null
+++ b/doc/mjit/mjit.md
@@ -0,0 +1,39 @@
+# MJIT
+
+This document has some tips that might be useful when you work on MJIT.
+
+## Supported platforms
+
+The following platforms are either tested on CI or assumed to work.
+
+* OS: Linux, macOS
+* Arch: x86\_64, aarch64, arm64, i686, i386
+
+### Not supported
+
+The MJIT support for the following platforms is no longer maintained.
+
+* OS: Windows (mswin, MinGW), Solaris
+* Arch: SPARC, s390x
+
+## Developing MJIT
+
+### Bindgen
+
+If you see an "MJIT bindgen" GitHub Actions failure, please commit the `git diff` shown on the failed job.
+
+For doing the same thing locally, run `make mjit-bindgen` after installing libclang.
+macOS seems to have libclang by default. On Ubuntu, you can install it with `apt install libclang1`.
+
+### Always run make install
+
+Always run `make install` before running MJIT. It could easily cause a SEGV if you don't.
+MJIT looks for the installed header for security reasons.
+
+### --mjit-debug vs --mjit-debug=-ggdb3
+
+`--mjit-debug=[flags]` allows you to specify arbitrary flags while keeping other compiler flags like `-O3`,
+which is useful for profiling benchmarks.
+
+`--mjit-debug` alone, on the other hand, disables `-O3` and adds debug flags.
+If you're debugging MJIT, what you need to use is not `--mjit-debug=-ggdb3` but `--mjit-debug`.
diff --git a/doc/net-http/examples.rdoc b/doc/net-http/examples.rdoc
new file mode 100644
index 0000000000..c1366e7ad1
--- /dev/null
+++ b/doc/net-http/examples.rdoc
@@ -0,0 +1,31 @@
+Examples here assume that <tt>net/http</tt> has been required
+(which also requires +uri+):
+
+ require 'net/http'
+
+Many code examples here use these example websites:
+
+- https://jsonplaceholder.typicode.com.
+- http://example.com.
+
+Some examples also assume these variables:
+
+ uri = URI('https://jsonplaceholder.typicode.com/')
+ uri.freeze # Examples may not modify.
+ hostname = uri.hostname # => "jsonplaceholder.typicode.com"
+ path = uri.path # => "/"
+ port = uri.port # => 443
+
+So that example requests may be written as:
+
+ Net::HTTP.get(uri)
+ Net::HTTP.get(hostname, '/index.html')
+ Net::HTTP.start(hostname) do |http|
+ http.get('/todos/1')
+ http.get('/todos/2')
+ end
+
+An example that needs a modified URI first duplicates +uri+, then modifies the duplicate:
+
+ _uri = uri.dup
+ _uri.path = '/todos/1'
diff --git a/doc/net-http/included_getters.rdoc b/doc/net-http/included_getters.rdoc
new file mode 100644
index 0000000000..7ac327f4b4
--- /dev/null
+++ b/doc/net-http/included_getters.rdoc
@@ -0,0 +1,3 @@
+This class also includes (indirectly) module Net::HTTPHeader,
+which gives access to its
+{methods for getting headers}[rdoc-ref:Net::HTTPHeader@Getters].
diff --git a/doc/optparse/.document b/doc/optparse/.document
new file mode 100644
index 0000000000..96dfc7779f
--- /dev/null
+++ b/doc/optparse/.document
@@ -0,0 +1 @@
+*.rdoc
diff --git a/doc/optparse/argument_converters.rdoc b/doc/optparse/argument_converters.rdoc
new file mode 100644
index 0000000000..ac659da8c5
--- /dev/null
+++ b/doc/optparse/argument_converters.rdoc
@@ -0,0 +1,380 @@
+== Argument Converters
+
+An option can specify that its argument is to be converted
+from the default \String to an instance of another class.
+
+=== Contents
+
+- {Built-In Argument Converters}[#label-Built-In+Argument+Converters]
+ - {Date}[#label-Date]
+ - {DateTime}[#label-DateTime]
+ - {Time}[#label-Time]
+ - {URI}[#label-URI]
+ - {Shellwords}[#label-Shellwords]
+ - {Integer}[#label-Integer]
+ - {Float}[#label-Float]
+ - {Numeric}[#label-Numeric]
+ - {DecimalInteger}[#label-DecimalInteger]
+ - {OctalInteger}[#label-OctalInteger]
+ - {DecimalNumeric}[#label-DecimalNumeric]
+ - {TrueClass}[#label-TrueClass]
+ - {FalseClass}[#label-FalseClass]
+ - {Object}[#label-Object]
+ - {String}[#label-String]
+ - {Array}[#label-Array]
+ - {Regexp}[#label-Regexp]
+- {Custom Argument Converters}[#label-Custom+Argument+Converters]
+
+=== Built-In Argument Converters
+
+\OptionParser has a number of built-in argument converters,
+which are demonstrated below.
+
+==== \Date
+
+File +date.rb+
+defines an option whose argument is to be converted to a \Date object.
+The argument is converted by method Date#parse.
+
+ :include: ruby/date.rb
+
+Executions:
+
+ $ ruby date.rb --date 2001-02-03
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+ $ ruby date.rb --date 20010203
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+ $ ruby date.rb --date "3rd Feb 2001"
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+
+==== \DateTime
+
+File +datetime.rb+
+defines an option whose argument is to be converted to a \DateTime object.
+The argument is converted by method DateTime#parse.
+
+ :include: ruby/datetime.rb
+
+Executions:
+
+ $ ruby datetime.rb --datetime 2001-02-03T04:05:06+07:00
+ [#<DateTime: 2001-02-03T04:05:06+07:00 ((2451943j,75906s,0n),+25200s,2299161j)>, DateTime]
+ $ ruby datetime.rb --datetime 20010203T040506+0700
+ [#<DateTime: 2001-02-03T04:05:06+07:00 ((2451943j,75906s,0n),+25200s,2299161j)>, DateTime]
+ $ ruby datetime.rb --datetime "3rd Feb 2001 04:05:06 PM"
+ [#<DateTime: 2001-02-03T16:05:06+00:00 ((2451944j,57906s,0n),+0s,2299161j)>, DateTime]
+
+==== \Time
+
+File +time.rb+
+defines an option whose argument is to be converted to a \Time object.
+The argument is converted by method Time#httpdate or Time#parse.
+
+ :include: ruby/time.rb
+
+Executions:
+
+ $ ruby time.rb --time "Thu, 06 Oct 2011 02:26:12 GMT"
+ [2011-10-06 02:26:12 UTC, Time]
+ $ ruby time.rb --time 2010-10-31
+ [2010-10-31 00:00:00 -0500, Time]
+
+==== \URI
+
+File +uri.rb+
+defines an option whose argument is to be converted to a \URI object.
+The argument is converted by method URI#parse.
+
+ :include: ruby/uri.rb
+
+Executions:
+
+ $ ruby uri.rb --uri https://github.com
+ [#<URI::HTTPS https://github.com>, URI::HTTPS]
+ $ ruby uri.rb --uri http://github.com
+ [#<URI::HTTP http://github.com>, URI::HTTP]
+ $ ruby uri.rb --uri file://~/var
+ [#<URI::File file://~/var>, URI::File]
+
+==== \Shellwords
+
+File +shellwords.rb+
+defines an option whose argument is to be converted to an \Array object by method
+Shellwords#shellwords.
+
+ :include: ruby/shellwords.rb
+
+Executions:
+
+ $ ruby shellwords.rb --shellwords "ruby my_prog.rb | less"
+ [["ruby", "my_prog.rb", "|", "less"], Array]
+ $ ruby shellwords.rb --shellwords "here are 'two words'"
+ [["here", "are", "two words"], Array]
+
+==== \Integer
+
+File +integer.rb+
+defines an option whose argument is to be converted to an \Integer object.
+The argument is converted by method Kernel#Integer.
+
+ :include: ruby/integer.rb
+
+Executions:
+
+ $ ruby integer.rb --integer 100
+ [100, Integer]
+ $ ruby integer.rb --integer -100
+ [-100, Integer]
+ $ ruby integer.rb --integer 0100
+ [64, Integer]
+ $ ruby integer.rb --integer 0x100
+ [256, Integer]
+ $ ruby integer.rb --integer 0b100
+ [4, Integer]
+
+==== \Float
+
+File +float.rb+
+defines an option whose argument is to be converted to a \Float object.
+The argument is converted by method Kernel#Float.
+
+ :include: ruby/float.rb
+
+Executions:
+
+ $ ruby float.rb --float 1
+ [1.0, Float]
+ $ ruby float.rb --float 3.14159
+ [3.14159, Float]
+ $ ruby float.rb --float 1.234E2
+ [123.4, Float]
+ $ ruby float.rb --float 1.234E-2
+ [0.01234, Float]
+
+==== \Numeric
+
+File +numeric.rb+
+defines an option whose argument is to be converted to an instance
+of \Rational, \Float, or \Integer.
+The argument is converted by method Kernel#Rational,
+Kernel#Float, or Kernel#Integer.
+
+ :include: ruby/numeric.rb
+
+Executions:
+
+ $ ruby numeric.rb --numeric 1/3
+ [(1/3), Rational]
+ $ ruby numeric.rb --numeric 3.333E-1
+ [0.3333, Float]
+ $ ruby numeric.rb --numeric 3
+ [3, Integer]
+
+==== \DecimalInteger
+
+File +decimal_integer.rb+
+defines an option whose argument is to be converted to an \Integer object.
+The argument is converted by method Kernel#Integer.
+
+ :include: ruby/decimal_integer.rb
+
+The argument may not be in a binary or hexadecimal format;
+a leading zero is ignored (not parsed as octal).
+
+Executions:
+
+ $ ruby decimal_integer.rb --decimal_integer 100
+ [100, Integer]
+ $ ruby decimal_integer.rb --decimal_integer -100
+ [-100, Integer]
+ $ ruby decimal_integer.rb --decimal_integer 0100
+ [100, Integer]
+ $ ruby decimal_integer.rb --decimal_integer -0100
+ [-100, Integer]
+
+==== \OctalInteger
+
+File +octal_integer.rb+
+defines an option whose argument is to be converted to an \Integer object.
+The argument is converted by method Kernel#Integer.
+
+ :include: ruby/octal_integer.rb
+
+The argument may not be in a binary or hexadecimal format;
+it is parsed as octal, regardless of whether it has a leading zero.
+
+Executions:
+
+ $ ruby octal_integer.rb --octal_integer 100
+ [64, Integer]
+ $ ruby octal_integer.rb --octal_integer -100
+ [-64, Integer]
+ $ ruby octal_integer.rb --octal_integer 0100
+ [64, Integer]
+
+==== \DecimalNumeric
+
+File +decimal_numeric.rb+
+defines an option whose argument is to be converted to an \Integer object.
+The argument is converted by method Kernel#Integer
+
+ :include: ruby/decimal_numeric.rb
+
+The argument may not be in a binary or hexadecimal format;
+a leading zero causes the argument to be parsed as octal.
+
+Executions:
+
+ $ ruby decimal_numeric.rb --decimal_numeric 100
+ [100, Integer]
+ $ ruby decimal_numeric.rb --decimal_numeric -100
+ [-100, Integer]
+ $ ruby decimal_numeric.rb --decimal_numeric 0100
+ [64, Integer]
+
+==== \TrueClass
+
+File +true_class.rb+
+defines an option whose argument is to be converted to +true+ or +false+.
+The argument is evaluated by method Object#nil?.
+
+ :include: ruby/true_class.rb
+
+The argument may be any of those shown in the examples below.
+
+Executions:
+
+ $ ruby true_class.rb --true_class true
+ [true, TrueClass]
+ $ ruby true_class.rb --true_class yes
+ [true, TrueClass]
+ $ ruby true_class.rb --true_class +
+ [true, TrueClass]
+ $ ruby true_class.rb --true_class false
+ [false, FalseClass]
+ $ ruby true_class.rb --true_class no
+ [false, FalseClass]
+ $ ruby true_class.rb --true_class -
+ [false, FalseClass]
+ $ ruby true_class.rb --true_class nil
+ [false, FalseClass]
+
+==== \FalseClass
+
+File +false_class.rb+
+defines an option whose argument is to be converted to +true+ or +false+.
+The argument is evaluated by method Object#nil?.
+
+ :include: ruby/false_class.rb
+
+The argument may be any of those shown in the examples below.
+
+Executions:
+
+ $ ruby false_class.rb --false_class false
+ [false, FalseClass]
+ $ ruby false_class.rb --false_class no
+ [false, FalseClass]
+ $ ruby false_class.rb --false_class -
+ [false, FalseClass]
+ $ ruby false_class.rb --false_class nil
+ [false, FalseClass]
+ $ ruby false_class.rb --false_class true
+ [true, TrueClass]
+ $ ruby false_class.rb --false_class yes
+ [true, TrueClass]
+ $ ruby false_class.rb --false_class +
+ [true, TrueClass]
+
+==== \Object
+
+File +object.rb+
+defines an option whose argument is not to be converted from \String.
+
+ :include: ruby/object.rb
+
+Executions:
+
+ $ ruby object.rb --object foo
+ ["foo", String]
+ $ ruby object.rb --object nil
+ ["nil", String]
+
+==== \String
+
+File +string.rb+
+defines an option whose argument is not to be converted from \String.
+
+ :include: ruby/string.rb
+
+Executions:
+
+ $ ruby string.rb --string foo
+ ["foo", String]
+ $ ruby string.rb --string nil
+ ["nil", String]
+
+==== \Array
+
+File +array.rb+
+defines an option whose argument is to be converted from \String
+to an array of strings, based on comma-separated substrings.
+
+ :include: ruby/array.rb
+
+Executions:
+
+ $ ruby array.rb --array ""
+ [[], Array]
+ $ ruby array.rb --array foo,bar,baz
+ [["foo", "bar", "baz"], Array]
+ $ ruby array.rb --array "foo, bar, baz"
+ [["foo", " bar", " baz"], Array]
+
+==== \Regexp
+
+File +regexp.rb+
+defines an option whose argument is to be converted to a \Regexp object.
+
+ :include: ruby/regexp.rb
+
+Executions:
+
+ $ ruby regexp.rb --regexp foo
+
+=== Custom Argument Converters
+
+You can create custom argument converters.
+To create a custom converter, call OptionParser#accept with:
+
+- An identifier, which may be any object.
+- An optional match pattern, which defaults to <tt>/.*/m</tt>.
+- A block that accepts the argument and returns the converted value.
+
+This custom converter accepts any argument and converts it,
+if possible, to a \Complex object.
+
+ :include: ruby/custom_converter.rb
+
+Executions:
+
+ $ ruby custom_converter.rb --complex 0
+ [(0+0i), Complex]
+ $ ruby custom_converter.rb --complex 1
+ [(1+0i), Complex]
+ $ ruby custom_converter.rb --complex 1+2i
+ [(1+2i), Complex]
+ $ ruby custom_converter.rb --complex 0.3-0.5i
+ [(0.3-0.5i), Complex]
+
+This custom converter accepts any 1-word argument
+and capitalizes it, if possible.
+
+ :include: ruby/match_converter.rb
+
+Executions:
+
+ $ ruby match_converter.rb --capitalize foo
+ ["Foo", String]
+ $ ruby match_converter.rb --capitalize "foo bar"
+ match_converter.rb:9:in `<main>': invalid argument: --capitalize foo bar (OptionParser::InvalidArgument)
diff --git a/doc/optparse/creates_option.rdoc b/doc/optparse/creates_option.rdoc
new file mode 100644
index 0000000000..ab672d5124
--- /dev/null
+++ b/doc/optparse/creates_option.rdoc
@@ -0,0 +1,7 @@
+Creates an option from the given parameters +params+.
+See {Parameters for New Options}[optparse/option_params.rdoc].
+
+The block, if given, is the handler for the created option.
+When the option is encountered during command-line parsing,
+the block is called with the argument given for the option, if any.
+See {Option Handlers}[optparse/option_params.rdoc#label-Option+Handlers].
diff --git a/doc/optparse/option_params.rdoc b/doc/optparse/option_params.rdoc
new file mode 100644
index 0000000000..ace2c4283f
--- /dev/null
+++ b/doc/optparse/option_params.rdoc
@@ -0,0 +1,509 @@
+== Parameters for New Options
+
+Option-creating methods in \OptionParser
+accept arguments that determine the behavior of a new option:
+
+- OptionParser#on
+- OptionParser#on_head
+- OptionParser#on_tail
+- OptionParser#define
+- OptionParser#define_head
+- OptionParser#define_tail
+- OptionParser#make_switch
+
+The code examples on this page use:
+
+- OptionParser#on, to define options.
+- OptionParser#parse!, to parse the command line.
+- Built-in option <tt>--help</tt>, to display defined options.
+
+Contents:
+
+- {Option Names}[#label-Option+Names]
+ - {Short Names}[#label-Short+Names]
+ - {Simple Short Names}[#label-Simple+Short+Names]
+ - {Short Names with Required Arguments}[#label-Short+Names+with+Required+Arguments]
+ - {Short Names with Optional Arguments}[#label-Short+Names+with+Optional+Arguments]
+ - {Short Names from Range}[#label-Short+Names+from+Range]
+ - {Long Names}[#label-Long+Names]
+ - {Simple Long Names}[#label-Simple+Long+Names]
+ - {Long Names with Required Arguments}[#label-Long+Names+with+Required+Arguments]
+ - {Long Names with Optional Arguments}[#label-Long+Names+with+Optional+Arguments]
+ - {Long Names with Negation}[#label-Long+Names+with+Negation]
+ - {Mixed Names}[#label-Mixed+Names]
+- {Argument Styles}[#label-Argument+Styles]
+- {Argument Values}[#label-Argument+Values]
+ - {Explicit Argument Values}[#label-Explicit+Argument+Values]
+ - {Explicit Values in Array}[#label-Explicit+Values+in+Array]
+ - {Explicit Values in Hash}[#label-Explicit+Values+in+Hash]
+ - {Argument Value Patterns}[#label-Argument+Value+Patterns]
+- {Argument Converters}[#label-Argument+Converters]
+- {Descriptions}[#label-Descriptions]
+- {Option Handlers}[#label-Option+Handlers]
+ - {Handler Blocks}[#label-Handler+Blocks]
+ - {Handler Procs}[#label-Handler+Procs]
+ - {Handler Methods}[#label-Handler+Methods]
+
+=== Option Names
+
+There are two kinds of option names:
+
+- Short option name, consisting of a single hyphen and a single character.
+- Long option name, consisting of two hyphens and one or more characters.
+
+==== Short Names
+
+===== Simple Short Names
+
+File +short_simple.rb+ defines two options:
+
+- One with short name <tt>-x</tt>.
+- The other with two short names, in effect, aliases, <tt>-1</tt> and <tt>-%</tt>.
+
+ :include: ruby/short_simple.rb
+
+Executions:
+
+ $ ruby short_simple.rb --help
+ Usage: short_simple [options]
+ -x One short name
+ -1, -% Two short names (aliases)
+ $ ruby short_simple.rb -x
+ ["-x", true]
+ $ ruby short_simple.rb -1 -x -%
+ ["-1 or -%", true]
+ ["-x", true]
+ ["-1 or -%", true]
+
+===== Short Names with Required Arguments
+
+A short name followed (no whitespace) by a dummy word
+defines an option that requires an argument.
+
+File +short_required.rb+ defines an option <tt>-x</tt>
+that requires an argument.
+
+ :include: ruby/short_required.rb
+
+Executions:
+
+ $ ruby short_required.rb --help
+ Usage: short_required [options]
+ -xXXX Short name with required argument
+ $ ruby short_required.rb -x
+ short_required.rb:6:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+ $ ruby short_required.rb -x FOO
+ ["-x", "FOO"]
+
+===== Short Names with Optional Arguments
+
+A short name followed (with whitespace) by a dummy word in square brackets
+defines an option that allows an optional argument.
+
+File +short_optional.rb+ defines an option <tt>-x</tt>
+that allows an optional argument.
+
+ :include: ruby/short_optional.rb
+
+Executions:
+
+ $ ruby short_optional.rb --help
+ Usage: short_optional [options]
+ -x [XXX] Short name with optional argument
+ $ ruby short_optional.rb -x
+ ["-x", nil]
+ $ ruby short_optional.rb -x FOO
+ ["-x", "FOO"]
+
+===== Short Names from Range
+
+You can define an option with multiple short names
+taken from a range of characters.
+The parser yields both the actual character cited and the value.
+
+File +short_range.rb+ defines an option with short names
+for all printable characters from <tt>!</tt> to <tt>~</tt>:
+
+ :include: ruby/short_range.rb
+
+Executions:
+
+ $ ruby short_range.rb --help
+ Usage: short_range [options]
+ -[!-~] Short names in (very large) range
+ $ ruby short_range.rb -!
+ ["!-~", "!", nil]
+ $ ruby short_range.rb -!
+ ["!-~", "!", nil]
+ $ ruby short_range.rb -A
+ ["!-~", "A", nil]
+ $ ruby short_range.rb -z
+ ["!-~", "z", nil]
+
+==== Long Names
+
+===== Simple Long Names
+
+File +long_simple.rb+ defines two options:
+
+- One with long name <tt>-xxx</tt>.
+- The other with two long names, in effect, aliases,
+ <tt>--y1%</tt> and <tt>--z2#</tt>.
+
+ :include: ruby/long_simple.rb
+
+Executions:
+
+ $ ruby long_simple.rb --help
+ Usage: long_simple [options]
+ --xxx One long name
+ --y1%, --z2# Two long names (aliases)
+ $ ruby long_simple.rb --xxx
+ ["--xxx", true]
+ $ ruby long_simple.rb --y1% --xxx --z2#
+ ["--y1% or --z2#", true]
+ ["--xxx", true]
+ ["--y1% or --z2#", true]
+
+===== Long Names with Required Arguments
+
+A long name followed (with whitespace) by a dummy word
+defines an option that requires an argument.
+
+File +long_required.rb+ defines an option <tt>--xxx</tt>
+that requires an argument.
+
+ :include: ruby/long_required.rb
+
+Executions:
+
+ $ ruby long_required.rb --help
+ Usage: long_required [options]
+ --xxx XXX Long name with required argument
+ $ ruby long_required.rb --xxx
+ long_required.rb:6:in `<main>': missing argument: --xxx (OptionParser::MissingArgument)
+ $ ruby long_required.rb --xxx FOO
+ ["--xxx", "FOO"]
+
+===== Long Names with Optional Arguments
+
+A long name followed (with whitespace) by a dummy word in square brackets
+defines an option that allows an optional argument.
+
+File +long_optional.rb+ defines an option <tt>--xxx</tt>
+that allows an optional argument.
+
+ :include: ruby/long_optional.rb
+
+Executions:
+
+ $ ruby long_optional.rb --help
+ Usage: long_optional [options]
+ --xxx [XXX] Long name with optional argument
+ $ ruby long_optional.rb --xxx
+ ["--xxx", nil]
+ $ ruby long_optional.rb --xxx FOO
+ ["--xxx", "FOO"]
+
+===== Long Names with Negation
+
+A long name may be defined with both positive and negative senses.
+
+File +long_with_negation.rb+ defines an option that has both senses.
+
+ :include: ruby/long_with_negation.rb
+
+Executions:
+
+ $ ruby long_with_negation.rb --help
+ Usage: long_with_negation [options]
+ --[no-]binary Long name with negation
+ $ ruby long_with_negation.rb --binary
+ [true, TrueClass]
+ $ ruby long_with_negation.rb --no-binary
+ [false, FalseClass]
+
+==== Mixed Names
+
+An option may have both short and long names.
+
+File +mixed_names.rb+ defines a mixture of short and long names.
+
+ :include: ruby/mixed_names.rb
+
+Executions:
+
+ $ ruby mixed_names.rb --help
+Usage: mixed_names [options]
+ -x, --xxx Short and long, no argument
+ -y, --yyyYYY Short and long, required argument
+ -z, --zzz [ZZZ] Short and long, optional argument
+ $ ruby mixed_names.rb -x
+ ["--xxx", true]
+ $ ruby mixed_names.rb --xxx
+ ["--xxx", true]
+ $ ruby mixed_names.rb -y
+ mixed_names.rb:12:in `<main>': missing argument: -y (OptionParser::MissingArgument)
+ $ ruby mixed_names.rb -y FOO
+ ["--yyy", "FOO"]
+ $ ruby mixed_names.rb --yyy
+ mixed_names.rb:12:in `<main>': missing argument: --yyy (OptionParser::MissingArgument)
+ $ ruby mixed_names.rb --yyy BAR
+ ["--yyy", "BAR"]
+ $ ruby mixed_names.rb -z
+ ["--zzz", nil]
+ $ ruby mixed_names.rb -z BAZ
+ ["--zzz", "BAZ"]
+ $ ruby mixed_names.rb --zzz
+ ["--zzz", nil]
+ $ ruby mixed_names.rb --zzz BAT
+ ["--zzz", "BAT"]
+
+=== Argument Keywords
+
+As seen above, a given option name string may itself
+indicate whether the option has no argument, a required argument,
+or an optional argument.
+
+An alternative is to use a separate symbol keyword,
+which is one of <tt>:NONE</tt> (the default),
+<tt>:REQUIRED</tt>, <tt>:OPTIONAL</tt>.
+
+File +argument_keywords.rb+ defines an option with a required argument.
+
+ :include: ruby/argument_keywords.rb
+
+Executions:
+
+ $ ruby argument_keywords.rb --help
+ Usage: argument_keywords [options]
+ -x, --xxx Required argument
+ $ ruby argument_styles.rb --xxx
+ argument_styles.rb:6:in `<main>': missing argument: --xxx (OptionParser::MissingArgument)
+ $ ruby argument_styles.rb --xxx FOO
+ ["--xxx", "FOO"]
+
+=== Argument Strings
+
+Still another way to specify a required argument
+is to define it in a string separate from the name string.
+
+File +argument_strings.rb+ defines an option with a required argument.
+
+ :include: ruby/argument_strings.rb
+
+Executions:
+
+ $ ruby argument_strings.rb --help
+ Usage: argument_strings [options]
+ -x, --xxx=XXX Required argument
+ $ ruby argument_strings.rb --xxx
+ argument_strings.rb:9:in `<main>': missing argument: --xxx (OptionParser::MissingArgument)
+ $ ruby argument_strings.rb --xxx FOO
+ ["--xxx", "FOO"]
+
+=== Argument Values
+
+Permissible argument values may be restricted
+either by specifying explicit values
+or by providing a pattern that the given value must match.
+
+==== Explicit Argument Values
+
+You can specify argument values in either of two ways:
+
+- Specify values an array of strings.
+- Specify values a hash.
+
+===== Explicit Values in Array
+
+You can specify explicit argument values in an array of strings.
+The argument value must be one of those strings, or an unambiguous abbreviation.
+
+File +explicit_array_values.rb+ defines options with explicit argument values.
+
+ :include: ruby/explicit_array_values.rb
+
+Executions:
+
+ $ ruby explicit_array_values.rb --help
+ Usage: explicit_array_values [options]
+ -xXXX Values for required argument
+ -y [YYY] Values for optional argument
+ $ ruby explicit_array_values.rb -x
+ explicit_array_values.rb:9:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+ $ ruby explicit_array_values.rb -x foo
+ ["-x", "foo"]
+ $ ruby explicit_array_values.rb -x f
+ ["-x", "foo"]
+ $ ruby explicit_array_values.rb -x bar
+ ["-x", "bar"]
+ $ ruby explicit_array_values.rb -y ba
+ explicit_array_values.rb:9:in `<main>': ambiguous argument: -y ba (OptionParser::AmbiguousArgument)
+ $ ruby explicit_array_values.rb -x baz
+ explicit_array_values.rb:9:in `<main>': invalid argument: -x baz (OptionParser::InvalidArgument)
+
+
+===== Explicit Values in Hash
+
+You can specify explicit argument values in a hash with string keys.
+The value passed must be one of those keys, or an unambiguous abbreviation;
+the value yielded will be the value for that key.
+
+File +explicit_hash_values.rb+ defines options with explicit argument values.
+
+ :include: ruby/explicit_hash_values.rb
+
+Executions:
+
+ $ ruby explicit_hash_values.rb --help
+ Usage: explicit_hash_values [options]
+ -xXXX Values for required argument
+ -y [YYY] Values for optional argument
+ $ ruby explicit_hash_values.rb -x
+ explicit_hash_values.rb:9:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+ $ ruby explicit_hash_values.rb -x foo
+ ["-x", 0]
+ $ ruby explicit_hash_values.rb -x f
+ ["-x", 0]
+ $ ruby explicit_hash_values.rb -x bar
+ ["-x", 1]
+ $ ruby explicit_hash_values.rb -x baz
+ explicit_hash_values.rb:9:in `<main>': invalid argument: -x baz (OptionParser::InvalidArgument)
+ $ ruby explicit_hash_values.rb -y
+ ["-y", nil]
+ $ ruby explicit_hash_values.rb -y baz
+ ["-y", 2]
+ $ ruby explicit_hash_values.rb -y bat
+ ["-y", 3]
+ $ ruby explicit_hash_values.rb -y ba
+ explicit_hash_values.rb:9:in `<main>': ambiguous argument: -y ba (OptionParser::AmbiguousArgument)
+ $ ruby explicit_hash_values.rb -y bam
+ ["-y", nil]
+
+==== Argument Value Patterns
+
+You can restrict permissible argument values
+by specifying a Regexp that the given argument must match.
+
+File +matched_values.rb+ defines options with matched argument values.
+
+ :include: ruby/matched_values.rb
+
+Executions:
+
+ $ ruby matched_values.rb --help
+ Usage: matched_values [options]
+ --xxx XXX Matched values
+ $ ruby matched_values.rb --xxx foo
+ ["--xxx", "foo"]
+ $ ruby matched_values.rb --xxx FOO
+ ["--xxx", "FOO"]
+ $ ruby matched_values.rb --xxx bar
+ matched_values.rb:6:in `<main>': invalid argument: --xxx bar (OptionParser::InvalidArgument)
+
+=== Argument Converters
+
+An option can specify that its argument is to be converted
+from the default \String to an instance of another class.
+
+There are a number of built-in converters.
+You can also define custom converters.
+
+See {Argument Converters}[./argument_converters.rdoc].
+
+=== Descriptions
+
+A description parameter is any string parameter
+that is not recognized as an
+{option name}[#label-Option+Names] or a
+{terminator}[#label-Terminators];
+in other words, it does not begin with a hyphen.
+
+You may give any number of description parameters;
+each becomes a line in the text generated by option <tt>--help</tt>.
+
+File +descriptions.rb+ has six strings in its array +descriptions+.
+These are all passed as parameters to OptionParser#on, so that they
+all, line for line, become the option's description.
+
+ :include: ruby/descriptions.rb
+
+Executions:
+
+ $ ruby descriptions.rb --help
+ Usage: descriptions [options]
+ --xxx Lorem ipsum dolor sit amet, consectetuer
+ adipiscing elit. Aenean commodo ligula eget.
+ Aenean massa. Cum sociis natoque penatibus
+ et magnis dis parturient montes, nascetur
+ ridiculus mus. Donec quam felis, ultricies
+ nec, pellentesque eu, pretium quis, sem.
+ $ ruby descriptions.rb --xxx
+ ["--xxx", true]
+
+=== Option Handlers
+
+The handler for an option is an executable that will be called
+when the option is encountered. The handler may be:
+
+- A block (this is most often seen).
+- A proc.
+- A method.
+
+==== Handler Blocks
+
+An option handler may be a block.
+
+File +block.rb+ defines an option that has a handler block.
+
+ :include: ruby/block.rb
+
+Executions:
+
+ $ ruby block.rb --help
+ Usage: block [options]
+ --xxx Option with no argument
+ --yyy YYY Option with required argument
+ $ ruby block.rb --xxx
+ ["Handler block for -xxx called with value:", true]
+ $ ruby block.rb --yyy FOO
+ ["Handler block for -yyy called with value:", "FOO"]
+
+==== Handler Procs
+
+An option handler may be a Proc.
+
+File +proc.rb+ defines an option that has a handler proc.
+
+ :include: ruby/proc.rb
+
+Executions:
+
+ $ ruby proc.rb --help
+ Usage: proc [options]
+ --xxx Option with no argument
+ --yyy YYY Option with required argument
+ $ ruby proc.rb --xxx
+ ["Handler proc for -xxx called with value:", true]
+ $ ruby proc.rb --yyy FOO
+ ["Handler proc for -yyy called with value:", "FOO"]
+
+==== Handler Methods
+
+An option handler may be a Method.
+
+File +proc.rb+ defines an option that has a handler method.
+
+ :include: ruby/method.rb
+
+Executions:
+
+ $ ruby method.rb --help
+ Usage: method [options]
+ --xxx Option with no argument
+ --yyy YYY Option with required argument
+ $ ruby method.rb --xxx
+ ["Handler method for -xxx called with value:", true]
+ $ ruby method.rb --yyy FOO
+ ["Handler method for -yyy called with value:", "FOO"]
diff --git a/doc/optparse/ruby/argument_keywords.rb b/doc/optparse/ruby/argument_keywords.rb
new file mode 100644
index 0000000000..8533257c67
--- /dev/null
+++ b/doc/optparse/ruby/argument_keywords.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', :REQUIRED, 'Required argument') do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/argument_strings.rb b/doc/optparse/ruby/argument_strings.rb
new file mode 100644
index 0000000000..77861dda30
--- /dev/null
+++ b/doc/optparse/ruby/argument_strings.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', '=XXX', 'Required argument') do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/argv.rb b/doc/optparse/ruby/argv.rb
new file mode 100644
index 0000000000..12495cfa1f
--- /dev/null
+++ b/doc/optparse/ruby/argv.rb
@@ -0,0 +1,2 @@
+p ARGV
+
diff --git a/doc/optparse/ruby/array.rb b/doc/optparse/ruby/array.rb
new file mode 100644
index 0000000000..7c6c14fad4
--- /dev/null
+++ b/doc/optparse/ruby/array.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--array=ARRAY', Array) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/basic.rb b/doc/optparse/ruby/basic.rb
new file mode 100644
index 0000000000..91d37627c0
--- /dev/null
+++ b/doc/optparse/ruby/basic.rb
@@ -0,0 +1,17 @@
+# Require the OptionParser code.
+require 'optparse'
+# Create an OptionParser object.
+parser = OptionParser.new
+# Define one or more options.
+parser.on('-x', 'Whether to X') do |value|
+ p ['x', value]
+end
+parser.on('-y', 'Whether to Y') do |value|
+ p ['y', value]
+end
+parser.on('-z', 'Whether to Z') do |value|
+ p ['z', value]
+end
+# Parse the command line and return pared-down ARGV.
+p parser.parse!
+
diff --git a/doc/optparse/ruby/block.rb b/doc/optparse/ruby/block.rb
new file mode 100644
index 0000000000..c4dfdeb31e
--- /dev/null
+++ b/doc/optparse/ruby/block.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx', 'Option with no argument') do |value|
+ p ['Handler block for -xxx called with value:', value]
+end
+parser.on('--yyy YYY', 'Option with required argument') do |value|
+ p ['Handler block for -yyy called with value:', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/collected_options.rb b/doc/optparse/ruby/collected_options.rb
new file mode 100644
index 0000000000..2115e03a9a
--- /dev/null
+++ b/doc/optparse/ruby/collected_options.rb
@@ -0,0 +1,8 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', 'Short and long, no argument')
+parser.on('-yYYY', '--yyy', 'Short and long, required argument')
+parser.on('-z [ZZZ]', '--zzz', 'Short and long, optional argument')
+options = {}
+parser.parse!(into: options)
+p options
diff --git a/doc/optparse/ruby/custom_converter.rb b/doc/optparse/ruby/custom_converter.rb
new file mode 100644
index 0000000000..029da08c46
--- /dev/null
+++ b/doc/optparse/ruby/custom_converter.rb
@@ -0,0 +1,9 @@
+require 'optparse/date'
+parser = OptionParser.new
+parser.accept(Complex) do |value|
+ value.to_c
+end
+parser.on('--complex COMPLEX', Complex) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/date.rb b/doc/optparse/ruby/date.rb
new file mode 100644
index 0000000000..5994ad6a85
--- /dev/null
+++ b/doc/optparse/ruby/date.rb
@@ -0,0 +1,6 @@
+require 'optparse/date'
+parser = OptionParser.new
+parser.on('--date=DATE', Date) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/datetime.rb b/doc/optparse/ruby/datetime.rb
new file mode 100644
index 0000000000..b9b591d5f6
--- /dev/null
+++ b/doc/optparse/ruby/datetime.rb
@@ -0,0 +1,6 @@
+require 'optparse/date'
+parser = OptionParser.new
+parser.on('--datetime=DATETIME', DateTime) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/decimal_integer.rb b/doc/optparse/ruby/decimal_integer.rb
new file mode 100644
index 0000000000..360bd284f8
--- /dev/null
+++ b/doc/optparse/ruby/decimal_integer.rb
@@ -0,0 +1,7 @@
+require 'optparse'
+include OptionParser::Acceptables
+parser = OptionParser.new
+parser.on('--decimal_integer=DECIMAL_INTEGER', DecimalInteger) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/decimal_numeric.rb b/doc/optparse/ruby/decimal_numeric.rb
new file mode 100644
index 0000000000..954da13561
--- /dev/null
+++ b/doc/optparse/ruby/decimal_numeric.rb
@@ -0,0 +1,7 @@
+require 'optparse'
+include OptionParser::Acceptables
+parser = OptionParser.new
+parser.on('--decimal_numeric=DECIMAL_NUMERIC', DecimalNumeric) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/default_values.rb b/doc/optparse/ruby/default_values.rb
new file mode 100644
index 0000000000..24c26faea2
--- /dev/null
+++ b/doc/optparse/ruby/default_values.rb
@@ -0,0 +1,8 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', 'Short and long, no argument')
+parser.on('-yYYY', '--yyy', 'Short and long, required argument')
+parser.on('-z [ZZZ]', '--zzz', 'Short and long, optional argument')
+options = {yyy: 'AAA', zzz: 'BBB'}
+parser.parse!(into: options)
+p options
diff --git a/doc/optparse/ruby/descriptions.rb b/doc/optparse/ruby/descriptions.rb
new file mode 100644
index 0000000000..9aec80aae2
--- /dev/null
+++ b/doc/optparse/ruby/descriptions.rb
@@ -0,0 +1,15 @@
+require 'optparse'
+parser = OptionParser.new
+description = <<-EOT
+Lorem ipsum dolor sit amet, consectetuer
+adipiscing elit. Aenean commodo ligula eget.
+Aenean massa. Cum sociis natoque penatibus
+et magnis dis parturient montes, nascetur
+ridiculus mus. Donec quam felis, ultricies
+nec, pellentesque eu, pretium quis, sem.
+EOT
+descriptions = description.split($/)
+parser.on('--xxx', *descriptions) do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/explicit_array_values.rb b/doc/optparse/ruby/explicit_array_values.rb
new file mode 100644
index 0000000000..64f930a4bc
--- /dev/null
+++ b/doc/optparse/ruby/explicit_array_values.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-xXXX', ['foo', 'bar'], 'Values for required argument' ) do |value|
+ p ['-x', value]
+end
+parser.on('-y [YYY]', ['baz', 'bat'], 'Values for optional argument') do |value|
+ p ['-y', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/explicit_hash_values.rb b/doc/optparse/ruby/explicit_hash_values.rb
new file mode 100644
index 0000000000..9c9e6a48ed
--- /dev/null
+++ b/doc/optparse/ruby/explicit_hash_values.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-xXXX', {foo: 0, bar: 1}, 'Values for required argument' ) do |value|
+ p ['-x', value]
+end
+parser.on('-y [YYY]', {baz: 2, bat: 3}, 'Values for optional argument') do |value|
+ p ['-y', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/false_class.rb b/doc/optparse/ruby/false_class.rb
new file mode 100644
index 0000000000..04fe335ede
--- /dev/null
+++ b/doc/optparse/ruby/false_class.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--false_class=FALSE_CLASS', FalseClass) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/float.rb b/doc/optparse/ruby/float.rb
new file mode 100644
index 0000000000..390df7f7bd
--- /dev/null
+++ b/doc/optparse/ruby/float.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--float=FLOAT', Float) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/help.rb b/doc/optparse/ruby/help.rb
new file mode 100644
index 0000000000..95bcde1d77
--- /dev/null
+++ b/doc/optparse/ruby/help.rb
@@ -0,0 +1,18 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on(
+ '-x', '--xxx',
+ 'Adipiscing elit. Aenean commodo ligula eget.',
+ 'Aenean massa. Cum sociis natoque penatibus',
+ )
+parser.on(
+ '-y', '--yyy YYY',
+ 'Lorem ipsum dolor sit amet, consectetuer.'
+)
+parser.on(
+ '-z', '--zzz [ZZZ]',
+ 'Et magnis dis parturient montes, nascetur',
+ 'ridiculus mus. Donec quam felis, ultricies',
+ 'nec, pellentesque eu, pretium quis, sem.',
+ )
+parser.parse!
diff --git a/doc/optparse/ruby/help_banner.rb b/doc/optparse/ruby/help_banner.rb
new file mode 100644
index 0000000000..0943a3e029
--- /dev/null
+++ b/doc/optparse/ruby/help_banner.rb
@@ -0,0 +1,7 @@
+require 'optparse'
+parser = OptionParser.new
+parser.banner = "Usage: ruby help_banner.rb"
+parser.parse!
+
+
+
diff --git a/doc/optparse/ruby/help_format.rb b/doc/optparse/ruby/help_format.rb
new file mode 100644
index 0000000000..a2f1e85b00
--- /dev/null
+++ b/doc/optparse/ruby/help_format.rb
@@ -0,0 +1,25 @@
+require 'optparse'
+parser = OptionParser.new(
+ 'ruby help_format.rb [options]', # Banner
+ 20, # Width of options field
+ ' ' * 2 # Indentation
+)
+parser.on(
+ '-x', '--xxx',
+ 'Adipiscing elit. Aenean commodo ligula eget.',
+ 'Aenean massa. Cum sociis natoque penatibus',
+ )
+parser.on(
+ '-y', '--yyy YYY',
+ 'Lorem ipsum dolor sit amet, consectetuer.'
+)
+parser.on(
+ '-z', '--zzz [ZZZ]',
+ 'Et magnis dis parturient montes, nascetur',
+ 'ridiculus mus. Donec quam felis, ultricies',
+ 'nec, pellentesque eu, pretium quis, sem.',
+ )
+parser.parse!
+
+
+
diff --git a/doc/optparse/ruby/help_program_name.rb b/doc/optparse/ruby/help_program_name.rb
new file mode 100644
index 0000000000..7b3fbff067
--- /dev/null
+++ b/doc/optparse/ruby/help_program_name.rb
@@ -0,0 +1,7 @@
+require 'optparse'
+parser = OptionParser.new
+parser.program_name = 'help_program_name.rb'
+parser.parse!
+
+
+
diff --git a/doc/optparse/ruby/integer.rb b/doc/optparse/ruby/integer.rb
new file mode 100644
index 0000000000..f10656ff1a
--- /dev/null
+++ b/doc/optparse/ruby/integer.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--integer=INTEGER', Integer) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/long_names.rb b/doc/optparse/ruby/long_names.rb
new file mode 100644
index 0000000000..a49dbda69f
--- /dev/null
+++ b/doc/optparse/ruby/long_names.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx', 'Long name') do |value|
+ p ['-xxx', value]
+end
+parser.on('--y1%', '--z2#', "Two long names") do |value|
+ p ['--y1% or --z2#', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/long_optional.rb b/doc/optparse/ruby/long_optional.rb
new file mode 100644
index 0000000000..38dd82166b
--- /dev/null
+++ b/doc/optparse/ruby/long_optional.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx [XXX]', 'Long name with optional argument') do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/long_required.rb b/doc/optparse/ruby/long_required.rb
new file mode 100644
index 0000000000..b76c997339
--- /dev/null
+++ b/doc/optparse/ruby/long_required.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx XXX', 'Long name with required argument') do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/long_simple.rb b/doc/optparse/ruby/long_simple.rb
new file mode 100644
index 0000000000..4e489c43ed
--- /dev/null
+++ b/doc/optparse/ruby/long_simple.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx', 'One long name') do |value|
+ p ['--xxx', value]
+end
+parser.on('--y1%', '--z2#', 'Two long names (aliases)') do |value|
+ p ['--y1% or --z2#', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/long_with_negation.rb b/doc/optparse/ruby/long_with_negation.rb
new file mode 100644
index 0000000000..3f2913c361
--- /dev/null
+++ b/doc/optparse/ruby/long_with_negation.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--[no-]binary', 'Long name with negation') do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/match_converter.rb b/doc/optparse/ruby/match_converter.rb
new file mode 100644
index 0000000000..13dc5fcb51
--- /dev/null
+++ b/doc/optparse/ruby/match_converter.rb
@@ -0,0 +1,9 @@
+require 'optparse/date'
+parser = OptionParser.new
+parser.accept(:capitalize, /\w*/) do |value|
+ value.capitalize
+end
+parser.on('--capitalize XXX', :capitalize) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/matched_values.rb b/doc/optparse/ruby/matched_values.rb
new file mode 100644
index 0000000000..f184ca8474
--- /dev/null
+++ b/doc/optparse/ruby/matched_values.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx XXX', /foo/i, 'Matched values') do |value|
+ p ['--xxx', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/method.rb b/doc/optparse/ruby/method.rb
new file mode 100644
index 0000000000..3f02ff5798
--- /dev/null
+++ b/doc/optparse/ruby/method.rb
@@ -0,0 +1,11 @@
+require 'optparse'
+parser = OptionParser.new
+def xxx_handler(value)
+ p ['Handler method for -xxx called with value:', value]
+end
+parser.on('--xxx', 'Option with no argument', method(:xxx_handler))
+def yyy_handler(value)
+ p ['Handler method for -yyy called with value:', value]
+end
+parser.on('--yyy YYY', 'Option with required argument', method(:yyy_handler))
+parser.parse!
diff --git a/doc/optparse/ruby/missing_options.rb b/doc/optparse/ruby/missing_options.rb
new file mode 100644
index 0000000000..9428463cfd
--- /dev/null
+++ b/doc/optparse/ruby/missing_options.rb
@@ -0,0 +1,12 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', 'Short and long, no argument')
+parser.on('-yYYY', '--yyy', 'Short and long, required argument')
+parser.on('-z [ZZZ]', '--zzz', 'Short and long, optional argument')
+options = {}
+parser.parse!(into: options)
+required_options = [:xxx, :zzz]
+missing_options = required_options - options.keys
+unless missing_options.empty?
+ fail "Missing required options: #{missing_options}"
+end
diff --git a/doc/optparse/ruby/mixed_names.rb b/doc/optparse/ruby/mixed_names.rb
new file mode 100644
index 0000000000..67f81e7e8d
--- /dev/null
+++ b/doc/optparse/ruby/mixed_names.rb
@@ -0,0 +1,12 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx', 'Short and long, no argument') do |value|
+ p ['--xxx', value]
+end
+parser.on('-yYYY', '--yyy', 'Short and long, required argument') do |value|
+ p ['--yyy', value]
+end
+parser.on('-z [ZZZ]', '--zzz', 'Short and long, optional argument') do |value|
+ p ['--zzz', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/name_abbrev.rb b/doc/optparse/ruby/name_abbrev.rb
new file mode 100644
index 0000000000..b438c1b3dd
--- /dev/null
+++ b/doc/optparse/ruby/name_abbrev.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-n', '--dry-run',) do |value|
+ p ['--dry-run', value]
+end
+parser.on('-d', '--draft',) do |value|
+ p ['--draft', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/no_abbreviation.rb b/doc/optparse/ruby/no_abbreviation.rb
new file mode 100644
index 0000000000..5464492705
--- /dev/null
+++ b/doc/optparse/ruby/no_abbreviation.rb
@@ -0,0 +1,10 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-n', '--dry-run',) do |value|
+ p ['--dry-run', value]
+end
+parser.on('-d', '--draft',) do |value|
+ p ['--draft', value]
+end
+parser.require_exact = true
+parser.parse!
diff --git a/doc/optparse/ruby/numeric.rb b/doc/optparse/ruby/numeric.rb
new file mode 100644
index 0000000000..d7021f154a
--- /dev/null
+++ b/doc/optparse/ruby/numeric.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--numeric=NUMERIC', Numeric) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/object.rb b/doc/optparse/ruby/object.rb
new file mode 100644
index 0000000000..0f5ae8b922
--- /dev/null
+++ b/doc/optparse/ruby/object.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--object=OBJECT', Object) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/octal_integer.rb b/doc/optparse/ruby/octal_integer.rb
new file mode 100644
index 0000000000..b9644a076b
--- /dev/null
+++ b/doc/optparse/ruby/octal_integer.rb
@@ -0,0 +1,7 @@
+require 'optparse'
+include OptionParser::Acceptables
+parser = OptionParser.new
+parser.on('--octal_integer=OCTAL_INTEGER', OctalInteger) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/optional_argument.rb b/doc/optparse/ruby/optional_argument.rb
new file mode 100644
index 0000000000..456368a8ba
--- /dev/null
+++ b/doc/optparse/ruby/optional_argument.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x [XXX]', '--xxx', 'Optional argument via short name') do |value|
+ p ['--xxx', value]
+end
+parser.on('-y', '--yyy [YYY]', 'Optional argument via long name') do |value|
+ p ['--yyy', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/parse.rb b/doc/optparse/ruby/parse.rb
new file mode 100644
index 0000000000..a5d4329484
--- /dev/null
+++ b/doc/optparse/ruby/parse.rb
@@ -0,0 +1,13 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx') do |value|
+ p ['--xxx', value]
+end
+parser.on('--yyy YYY') do |value|
+ p ['--yyy', value]
+end
+parser.on('--zzz [ZZZ]') do |value|
+ p ['--zzz', value]
+end
+ret = parser.parse(ARGV)
+puts "Returned: #{ret} (#{ret.class})"
diff --git a/doc/optparse/ruby/parse_bang.rb b/doc/optparse/ruby/parse_bang.rb
new file mode 100644
index 0000000000..567bc733cf
--- /dev/null
+++ b/doc/optparse/ruby/parse_bang.rb
@@ -0,0 +1,13 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--xxx') do |value|
+ p ['--xxx', value]
+end
+parser.on('--yyy YYY') do |value|
+ p ['--yyy', value]
+end
+parser.on('--zzz [ZZZ]') do |value|
+ p ['--zzz', value]
+end
+ret = parser.parse!
+puts "Returned: #{ret} (#{ret.class})"
diff --git a/doc/optparse/ruby/proc.rb b/doc/optparse/ruby/proc.rb
new file mode 100644
index 0000000000..9c669fdc92
--- /dev/null
+++ b/doc/optparse/ruby/proc.rb
@@ -0,0 +1,13 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on(
+ '--xxx',
+ 'Option with no argument',
+ ->(value) {p ['Handler proc for -xxx called with value:', value]}
+)
+parser.on(
+ '--yyy YYY',
+ 'Option with required argument',
+ ->(value) {p ['Handler proc for -yyy called with value:', value]}
+)
+parser.parse!
diff --git a/doc/optparse/ruby/regexp.rb b/doc/optparse/ruby/regexp.rb
new file mode 100644
index 0000000000..6aba45ce76
--- /dev/null
+++ b/doc/optparse/ruby/regexp.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--regexp=REGEXP', Regexp) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/required_argument.rb b/doc/optparse/ruby/required_argument.rb
new file mode 100644
index 0000000000..228a492c3c
--- /dev/null
+++ b/doc/optparse/ruby/required_argument.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x XXX', '--xxx', 'Required argument via short name') do |value|
+ p ['--xxx', value]
+end
+parser.on('-y', '--y YYY', 'Required argument via long name') do |value|
+ p ['--yyy', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/shellwords.rb b/doc/optparse/ruby/shellwords.rb
new file mode 100644
index 0000000000..d181d4a4f6
--- /dev/null
+++ b/doc/optparse/ruby/shellwords.rb
@@ -0,0 +1,6 @@
+require 'optparse/shellwords'
+parser = OptionParser.new
+parser.on('--shellwords=SHELLWORDS', Shellwords) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/short_names.rb b/doc/optparse/ruby/short_names.rb
new file mode 100644
index 0000000000..4a756518fa
--- /dev/null
+++ b/doc/optparse/ruby/short_names.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', 'Short name') do |value|
+ p ['x', value]
+end
+parser.on('-1', '-%', 'Two short names') do |value|
+ p ['-1 or -%', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/short_optional.rb b/doc/optparse/ruby/short_optional.rb
new file mode 100644
index 0000000000..6eebf01c5f
--- /dev/null
+++ b/doc/optparse/ruby/short_optional.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x [XXX]', 'Short name with optional argument') do |value|
+ p ['-x', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/short_range.rb b/doc/optparse/ruby/short_range.rb
new file mode 100644
index 0000000000..f5b870a4bd
--- /dev/null
+++ b/doc/optparse/ruby/short_range.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-[!-~]', 'Short names in (very large) range') do |name, value|
+ p ['!-~', name, value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/short_required.rb b/doc/optparse/ruby/short_required.rb
new file mode 100644
index 0000000000..867c02c9f5
--- /dev/null
+++ b/doc/optparse/ruby/short_required.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-xXXX', 'Short name with required argument') do |value|
+ p ['-x', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/short_simple.rb b/doc/optparse/ruby/short_simple.rb
new file mode 100644
index 0000000000..d3d489e2dc
--- /dev/null
+++ b/doc/optparse/ruby/short_simple.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', 'One short name') do |value|
+ p ['-x', value]
+end
+parser.on('-1', '-%', 'Two short names (aliases)') do |value|
+ p ['-1 or -%', value]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/string.rb b/doc/optparse/ruby/string.rb
new file mode 100644
index 0000000000..fee84a17ea
--- /dev/null
+++ b/doc/optparse/ruby/string.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--string=STRING', String) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/terminator.rb b/doc/optparse/ruby/terminator.rb
new file mode 100644
index 0000000000..c718ac1a97
--- /dev/null
+++ b/doc/optparse/ruby/terminator.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--my_option XXX') do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/time.rb b/doc/optparse/ruby/time.rb
new file mode 100644
index 0000000000..aa8b0cfa16
--- /dev/null
+++ b/doc/optparse/ruby/time.rb
@@ -0,0 +1,6 @@
+require 'optparse/time'
+parser = OptionParser.new
+parser.on('--time=TIME', Time) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/true_class.rb b/doc/optparse/ruby/true_class.rb
new file mode 100644
index 0000000000..40db9d07c5
--- /dev/null
+++ b/doc/optparse/ruby/true_class.rb
@@ -0,0 +1,6 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('--true_class=TRUE_CLASS', TrueClass) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/ruby/uri.rb b/doc/optparse/ruby/uri.rb
new file mode 100644
index 0000000000..b492835b4f
--- /dev/null
+++ b/doc/optparse/ruby/uri.rb
@@ -0,0 +1,6 @@
+require 'optparse/uri'
+parser = OptionParser.new
+parser.on('--uri=URI', URI) do |value|
+ p [value, value.class]
+end
+parser.parse!
diff --git a/doc/optparse/tutorial.rdoc b/doc/optparse/tutorial.rdoc
new file mode 100644
index 0000000000..b95089826d
--- /dev/null
+++ b/doc/optparse/tutorial.rdoc
@@ -0,0 +1,835 @@
+== Tutorial
+
+=== Why \OptionParser?
+
+When a Ruby program executes, it captures its command-line arguments
+and options into variable ARGV.
+This simple program just prints its \ARGV:
+
+ :include: ruby/argv.rb
+
+Execution, with arguments and options:
+
+ $ ruby argv.rb foo --bar --baz bat bam
+ ["foo", "--bar", "--baz", "bat", "bam"]
+
+The executing program is responsible for parsing and handling
+the command-line options.
+
+OptionParser offers methods for parsing and handling those options.
+
+With \OptionParser, you can define options so that for each option:
+
+- The code that defines the option and code that handles that option
+ are in the same place.
+- The option may take no argument, a required argument, or an optional argument.
+- The argument may be automatically converted to a specified class.
+- The argument may be restricted to specified _forms_.
+- The argument may be restricted to specified _values_.
+
+The class also has method #help, which displays automatically-generated help text.
+
+=== Contents
+
+- {To Begin With}[#label-To+Begin+With]
+- {Defining Options}[#label-Defining+Options]
+- {Option Names}[#label-Option+Names]
+ - {Short Option Names}[#label-Short+Option+Names]
+ - {Long Option Names}[#label-Long+Option+Names]
+ - {Mixing Option Names}[#label-Mixing+Option+Names]
+ - {Option Name Abbreviations}[#label-Option+Name+Abbreviations]
+- {Option Arguments}[#label-Option+Arguments]
+ - {Option with No Argument}[#label-Option+with+No+Argument]
+ - {Option with Required Argument}[#label-Option+with+Required+Argument]
+ - {Option with Optional Argument}[#label-Option+with+Optional+Argument]
+ - {Argument Abbreviations}[#label-Argument+Abbreviations]
+- {Argument Values}[#label-Argument+Values]
+ - {Explicit Argument Values}[#label-Explicit+Argument+Values]
+ - {Explicit Values in Array}[#label-Explicit+Values+in+Array]
+ - {Explicit Values in Hash}[#label-Explicit+Values+in+Hash]
+ - {Argument Value Patterns}[#label-Argument+Value+Patterns]
+- {Keyword Argument into}[#label-Keyword+Argument+into]
+ - {Collecting Options}[#label-Collecting+Options]
+ - {Checking for Missing Options}[#label-Checking+for+Missing+Options]
+ - {Default Values for Options}[#label-Default+Values+for+Options]
+- {Argument Converters}[#label-Argument+Converters]
+- {Help}[#label-Help]
+- {Top List and Base List}[#label-Top+List+and+Base+List]
+- {Defining Options}[#label-Defining+Options]
+- {Parsing}[#label-Parsing]
+ - {Method parse!}[#label-Method+parse-21]
+ - {Method parse}[#label-Method+parse]
+ - {Method order!}[#label-Method+order-21]
+ - {Method order}[#label-Method+order]
+ - {Method permute!}[#label-Method+permute-21]
+ - {Method permute}[#label-Method+permute]
+
+=== To Begin With
+
+To use \OptionParser:
+
+1. Require the \OptionParser code.
+2. Create an \OptionParser object.
+3. Define one or more options.
+4. Parse the command line.
+
+File +basic.rb+ defines three options, <tt>-x</tt>,
+<tt>-y</tt>, and <tt>-z</tt>, each with a descriptive string,
+and each with a block.
+
+ :include: ruby/basic.rb
+
+From these defined options, the parser automatically builds help text:
+
+ $ ruby basic.rb --help
+ Usage: basic [options]
+ -x Whether to X
+ -y Whether to Y
+ -z Whether to Z
+
+When an option is found during parsing,
+the block defined for the option is called with the argument value.
+An invalid option raises an exception.
+
+Method #parse!, which is used most often in this tutorial,
+removes from \ARGV the options and arguments it finds,
+leaving other non-option arguments for the program to handle on its own.
+The method returns the possibly-reduced \ARGV array.
+
+Executions:
+
+ $ ruby basic.rb -x -z
+ ["x", true]
+ ["z", true]
+ []
+ $ ruby basic.rb -z -y -x
+ ["z", true]
+ ["y", true]
+ ["x", true]
+ []
+ $ ruby basic.rb -x input_file.txt output_file.txt
+ ["x", true]
+ ["input_file.txt", "output_file.txt"]
+ $ ruby basic.rb -a
+ basic.rb:16:in `<main>': invalid option: -a (OptionParser::InvalidOption)
+
+=== Defining Options
+
+A common way to define an option in \OptionParser
+is with instance method OptionParser#on.
+
+The method may be called with any number of arguments
+(whose order does not matter),
+and may also have a trailing optional keyword argument +into+.
+
+The given arguments determine the characteristics of the new option.
+These may include:
+
+- One or more short option names.
+- One or more long option names.
+- Whether the option takes no argument, an optional argument, or a required argument.
+- Acceptable _forms_ for the argument.
+- Acceptable _values_ for the argument.
+- A proc or method to be called when the parser encounters the option.
+- String descriptions for the option.
+
+=== Option Names
+
+You can give an option one or more names of two types:
+
+- Short (1-character) name, beginning with one hyphen (<tt>-</tt>).
+- Long (multi-character) name, beginning with two hyphens (<tt>--</tt>).
+
+==== Short Option Names
+
+A short option name consists of a hyphen and a single character.
+
+File +short_names.rb+
+defines an option with a short name, <tt>-x</tt>,
+and an option with two short names (aliases, in effect) <tt>-y</tt> and <tt>-z</tt>.
+
+ :include: ruby/short_names.rb
+
+Executions:
+
+ $ ruby short_names.rb --help
+ Usage: short_names [options]
+ -x Short name
+ -1, -% Two short names
+ $ ruby short_names.rb -x
+ ["x", true]
+ $ ruby short_names.rb -1
+ ["-1 or -%", true]
+ $ ruby short_names.rb -%
+ ["-1 or -%", true]
+
+Multiple short names can "share" a hyphen:
+
+ $ ruby short_names.rb -x1%
+ ["x", true]
+ ["-1 or -%", true]
+ ["-1 or -%", true]
+
+==== Long Option Names
+
+A long option name consists of two hyphens and a one or more characters
+(usually two or more characters).
+
+File +long_names.rb+
+defines an option with a long name, <tt>--xxx</tt>,
+and an option with two long names (aliases, in effect) <tt>--y1%</tt> and <tt>--z2#</tt>.
+
+ :include: ruby/long_names.rb
+
+Executions:
+
+ $ ruby long_names.rb --help
+ Usage: long_names [options]
+ --xxx Long name
+ --y1%, --z2# Two long names
+ $ ruby long_names.rb --xxx
+ ["-xxx", true]
+ $ ruby long_names.rb --y1%
+ ["--y1% or --z2#", true]
+ $ ruby long_names.rb --z2#
+ ["--y1% or --z2#", true]
+
+A long name may be defined with both positive and negative senses.
+
+File +long_with_negation.rb+ defines an option that has both senses.
+
+ :include: ruby/long_with_negation.rb
+
+Executions:
+
+ $ ruby long_with_negation.rb --help
+ Usage: long_with_negation [options]
+ --[no-]binary Long name with negation
+ $ ruby long_with_negation.rb --binary
+ [true, TrueClass]
+ $ ruby long_with_negation.rb --no-binary
+ [false, FalseClass]
+
+==== Mixing Option Names
+
+Many developers like to mix short and long option names,
+so that a short name is in effect an abbreviation of a long name.
+
+File +mixed_names.rb+
+defines options that each have both a short and a long name.
+
+ :include: ruby/mixed_names.rb
+
+Executions:
+
+ $ ruby mixed_names.rb --help
+ Usage: mixed_names [options]
+ -x, --xxx Short and long, no argument
+ -y, --yyyYYY Short and long, required argument
+ -z, --zzz [ZZZ] Short and long, optional argument
+ $ ruby mixed_names.rb -x
+ ["--xxx", true]
+ $ ruby mixed_names.rb --xxx
+ ["--xxx", true]
+ $ ruby mixed_names.rb -y
+ mixed_names.rb:12:in `<main>': missing argument: -y (OptionParser::MissingArgument)
+ $ ruby mixed_names.rb -y FOO
+ ["--yyy", "FOO"]
+ $ ruby mixed_names.rb --yyy
+ mixed_names.rb:12:in `<main>': missing argument: --yyy (OptionParser::MissingArgument)
+ $ ruby mixed_names.rb --yyy BAR
+ ["--yyy", "BAR"]
+ $ ruby mixed_names.rb -z
+ ["--zzz", nil]
+ $ ruby mixed_names.rb -z BAZ
+ ["--zzz", "BAZ"]
+ $ ruby mixed_names.rb --zzz
+ ["--zzz", nil]
+ $ ruby mixed_names.rb --zzz BAT
+ ["--zzz", "BAT"]
+
+==== Option Name Abbreviations
+
+By default, abbreviated option names on the command-line are allowed.
+An abbreviated name is valid if it is unique among abbreviated option names.
+
+ :include: ruby/name_abbrev.rb
+
+Executions:
+
+ $ ruby name_abbrev.rb --help
+ Usage: name_abbrev [options]
+ -n, --dry-run
+ -d, --draft
+ $ ruby name_abbrev.rb -n
+ ["--dry-run", true]
+ $ ruby name_abbrev.rb --dry-run
+ ["--dry-run", true]
+ $ ruby name_abbrev.rb -d
+ ["--draft", true]
+ $ ruby name_abbrev.rb --draft
+ ["--draft", true]
+ $ ruby name_abbrev.rb --d
+ name_abbrev.rb:9:in `<main>': ambiguous option: --d (OptionParser::AmbiguousOption)
+ $ ruby name_abbrev.rb --dr
+ name_abbrev.rb:9:in `<main>': ambiguous option: --dr (OptionParser::AmbiguousOption)
+ $ ruby name_abbrev.rb --dry
+ ["--dry-run", true]
+ $ ruby name_abbrev.rb --dra
+ ["--draft", true]
+
+You can disable abbreviation using method +require_exact+.
+
+ :include: ruby/no_abbreviation.rb
+
+Executions:
+
+ $ ruby no_abbreviation.rb --dry-ru
+ no_abbreviation.rb:10:in `<main>': invalid option: --dry-ru (OptionParser::InvalidOption)
+ $ ruby no_abbreviation.rb --dry-run
+ ["--dry-run", true]
+
+=== Option Arguments
+
+An option may take no argument, a required argument, or an optional argument.
+
+==== Option with No Argument
+
+All the examples above define options with no argument.
+
+==== Option with Required Argument
+
+Specify a required argument for an option by adding a dummy word
+to its name definition.
+
+File +required_argument.rb+ defines two options;
+each has a required argument because the name definition has a following dummy word.
+
+ :include: ruby/required_argument.rb
+
+When an option is found, the given argument is yielded.
+
+Executions:
+
+ $ ruby required_argument.rb --help
+ Usage: required_argument [options]
+ -x, --xxx XXX Required argument via short name
+ -y, --y YYY Required argument via long name
+ $ ruby required_argument.rb -x AAA
+ ["--xxx", "AAA"]
+ $ ruby required_argument.rb -y BBB
+ ["--yyy", "BBB"]
+
+Omitting a required argument raises an error:
+
+ $ ruby required_argument.rb -x
+ required_argument.rb:9:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+
+==== Option with Optional Argument
+
+Specify an optional argument for an option by adding a dummy word
+enclosed in square brackets to its name definition.
+
+File +optional_argument.rb+ defines two options;
+each has an optional argument because the name definition has a following dummy word
+in square brackets.
+
+ :include: ruby/optional_argument.rb
+
+When an option with an argument is found, the given argument yielded.
+
+Executions:
+
+ $ ruby optional_argument.rb --help
+ Usage: optional_argument [options]
+ -x, --xxx [XXX] Optional argument via short name
+ -y, --yyy [YYY] Optional argument via long name
+ $ ruby optional_argument.rb -x AAA
+ ["--xxx", "AAA"]
+ $ ruby optional_argument.rb -y BBB
+ ["--yyy", "BBB"]
+
+Omitting an optional argument does not raise an error.
+
+=== Argument Values
+
+Permissible argument values may be restricted
+either by specifying explicit values
+or by providing a pattern that the given value must match.
+
+==== Explicit Argument Values
+
+You can specify argument values in either of two ways:
+
+- Specify values an array of strings.
+- Specify values a hash.
+
+===== Explicit Values in Array
+
+You can specify explicit argument values in an array of strings.
+The argument value must be one of those strings, or an unambiguous abbreviation.
+
+File +explicit_array_values.rb+ defines options with explicit argument values.
+
+ :include: ruby/explicit_array_values.rb
+
+Executions:
+
+ $ ruby explicit_array_values.rb --help
+ Usage: explicit_array_values [options]
+ -xXXX Values for required argument
+ -y [YYY] Values for optional argument
+ $ ruby explicit_array_values.rb -x
+ explicit_array_values.rb:9:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+ $ ruby explicit_array_values.rb -x foo
+ ["-x", "foo"]
+ $ ruby explicit_array_values.rb -x f
+ ["-x", "foo"]
+ $ ruby explicit_array_values.rb -x bar
+ ["-x", "bar"]
+ $ ruby explicit_array_values.rb -y ba
+ explicit_array_values.rb:9:in `<main>': ambiguous argument: -y ba (OptionParser::AmbiguousArgument)
+ $ ruby explicit_array_values.rb -x baz
+ explicit_array_values.rb:9:in `<main>': invalid argument: -x baz (OptionParser::InvalidArgument)
+
+
+===== Explicit Values in Hash
+
+You can specify explicit argument values in a hash with string keys.
+The value passed must be one of those keys, or an unambiguous abbreviation;
+the value yielded will be the value for that key.
+
+File +explicit_hash_values.rb+ defines options with explicit argument values.
+
+ :include: ruby/explicit_hash_values.rb
+
+Executions:
+
+ $ ruby explicit_hash_values.rb --help
+ Usage: explicit_hash_values [options]
+ -xXXX Values for required argument
+ -y [YYY] Values for optional argument
+ $ ruby explicit_hash_values.rb -x
+ explicit_hash_values.rb:9:in `<main>': missing argument: -x (OptionParser::MissingArgument)
+ $ ruby explicit_hash_values.rb -x foo
+ ["-x", 0]
+ $ ruby explicit_hash_values.rb -x f
+ ["-x", 0]
+ $ ruby explicit_hash_values.rb -x bar
+ ["-x", 1]
+ $ ruby explicit_hash_values.rb -x baz
+ explicit_hash_values.rb:9:in `<main>': invalid argument: -x baz (OptionParser::InvalidArgument)
+ $ ruby explicit_hash_values.rb -y
+ ["-y", nil]
+ $ ruby explicit_hash_values.rb -y baz
+ ["-y", 2]
+ $ ruby explicit_hash_values.rb -y bat
+ ["-y", 3]
+ $ ruby explicit_hash_values.rb -y ba
+ explicit_hash_values.rb:9:in `<main>': ambiguous argument: -y ba (OptionParser::AmbiguousArgument)
+ $ ruby explicit_hash_values.rb -y bam
+ ["-y", nil]
+
+==== Argument Value Patterns
+
+You can restrict permissible argument values
+by specifying a Regexp that the given argument must match.
+
+File +matched_values.rb+ defines options with matched argument values.
+
+ :include: ruby/matched_values.rb
+
+Executions:
+
+ $ ruby matched_values.rb --help
+ Usage: matched_values [options]
+ --xxx XXX Matched values
+ $ ruby matched_values.rb --xxx foo
+ ["--xxx", "foo"]
+ $ ruby matched_values.rb --xxx FOO
+ ["--xxx", "FOO"]
+ $ ruby matched_values.rb --xxx bar
+ matched_values.rb:6:in `<main>': invalid argument: --xxx bar (OptionParser::InvalidArgument)
+
+=== Keyword Argument +into+
+
+In parsing options, you can add keyword option +into+ with a hash-like argument;
+each parsed option will be added as a name/value pair.
+
+This is useful for:
+
+- Collecting options.
+- Checking for missing options.
+- Providing default values for options.
+
+==== Collecting Options
+
+Use keyword argument +into+ to collect options.
+
+ :include: ruby/collected_options.rb
+
+Executions:
+
+ $ ruby collected_options.rb --help
+ Usage: into [options]
+ -x, --xxx Short and long, no argument
+ -y, --yyyYYY Short and long, required argument
+ -z, --zzz [ZZZ] Short and long, optional argument
+ $ ruby collected_options.rb --xxx
+ {:xxx=>true}
+ $ ruby collected_options.rb --xxx --yyy FOO
+ {:xxx=>true, :yyy=>"FOO"}
+ $ ruby collected_options.rb --xxx --yyy FOO --zzz Bar
+ {:xxx=>true, :yyy=>"FOO", :zzz=>"Bar"}
+ $ ruby collected_options.rb --xxx --yyy FOO --yyy BAR
+ {:xxx=>true, :yyy=>"BAR"}
+
+Note in the last execution that the argument value for option <tt>--yyy</tt>
+was overwritten.
+
+==== Checking for Missing Options
+
+Use the collected options to check for missing options.
+
+ :include: ruby/missing_options.rb
+
+Executions:
+
+ $ ruby missing_options.rb --help
+ Usage: missing_options [options]
+ -x, --xxx Short and long, no argument
+ -y, --yyyYYY Short and long, required argument
+ -z, --zzz [ZZZ] Short and long, optional argument
+ $ ruby missing_options.rb --yyy FOO
+ missing_options.rb:11:in `<main>': Missing required options: [:xxx, :zzz] (RuntimeError)
+
+==== Default Values for Options
+
+Initialize the +into+ argument to define default values for options.
+
+ :include: ruby/default_values.rb
+
+Executions:
+
+ $ ruby default_values.rb --help
+ Usage: default_values [options]
+ -x, --xxx Short and long, no argument
+ -y, --yyyYYY Short and long, required argument
+ -z, --zzz [ZZZ] Short and long, optional argument
+ $ ruby default_values.rb --yyy FOO
+ {:yyy=>"FOO", :zzz=>"BBB"}
+
+=== Argument Converters
+
+An option can specify that its argument is to be converted
+from the default \String to an instance of another class.
+There are a number of built-in converters.
+
+Example: File +date.rb+
+defines an option whose argument is to be converted to a \Date object.
+The argument is converted by method Date#parse.
+
+ :include: ruby/date.rb
+
+Executions:
+
+ $ ruby date.rb --date 2001-02-03
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+ $ ruby date.rb --date 20010203
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+ $ ruby date.rb --date "3rd Feb 2001"
+ [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, Date]
+
+You can also define custom converters.
+See {Argument Converters}[./argument_converters.rdoc]
+for both built-in and custom converters.
+
+=== Help
+
+\OptionParser makes automatically generated help text available.
+
+The help text consists of:
+
+- A banner, showing the usage.
+- Option short and long names.
+- Option dummy argument names.
+- Option descriptions.
+
+Example code:
+
+ :include: ruby/help.rb
+
+The option names and dummy argument names are defined as described above.
+
+The option description consists of the strings that are not themselves option names;
+An option can have more than one description string.
+Execution:
+
+ Usage: help [options]
+ -x, --xxx Adipiscing elit. Aenean commodo ligula eget.
+ Aenean massa. Cum sociis natoque penatibus
+ -y, --yyy YYY Lorem ipsum dolor sit amet, consectetuer.
+ -z, --zzz [ZZZ] Et magnis dis parturient montes, nascetur
+ ridiculus mus. Donec quam felis, ultricies
+ nec, pellentesque eu, pretium quis, sem.
+
+The program name is included in the default banner:
+<tt>Usage: #{program_name} [options]</tt>;
+you can change the program name.
+
+ :include: ruby/help_program_name.rb
+
+Execution:
+
+ $ ruby help_program_name.rb --help
+ Usage: help_program_name.rb [options]
+
+You can also change the entire banner.
+
+ :include: ruby/help_banner.rb
+
+Execution:
+
+ $ ruby help_banner.rb --help
+ Usage: ruby help_banner.rb
+
+By default, the option names are indented 4 spaces
+and the width of the option-names field is 32 spaces.
+
+You can change these values, along with the banner,
+by passing parameters to OptionParser.new.
+
+ :include: ruby/help_format.rb
+
+Execution:
+
+ $ ruby help_format.rb --help
+ ruby help_format.rb [options]
+ -x, --xxx Adipiscing elit. Aenean commodo ligula eget.
+ Aenean massa. Cum sociis natoque penatibus
+ -y, --yyy YYY Lorem ipsum dolor sit amet, consectetuer.
+ -z, --zzz [ZZZ] Et magnis dis parturient montes, nascetur
+ ridiculus mus. Donec quam felis, ultricies
+ nec, pellentesque eu, pretium quis, sem.
+
+=== Top List and Base List
+
+An \OptionParser object maintains a stack of \OptionParser::List objects,
+each of which has a collection of zero or more options.
+It is unlikely that you'll need to add or take away from that stack.
+
+The stack includes:
+
+- The <em>top list</em>, given by \OptionParser#top.
+- The <em>base list</em>, given by \OptionParser#base.
+
+When \OptionParser builds its help text, the options in the top list
+precede those in the base list.
+
+=== Defining Options
+
+Option-defining methods allow you to create an option, and also append/prepend it
+to the top list or append it to the base list.
+
+Each of these next three methods accepts a sequence of parameter arguments and a block,
+creates an option object using method \Option#make_switch (see below),
+and returns the created option:
+
+- \Method \OptionParser#define appends the created option to the top list.
+
+- \Method \OptionParser#define_head prepends the created option to the top list.
+
+- \Method \OptionParser#define_tail appends the created option to the base list.
+
+These next three methods are identical to the three above,
+except for their return values:
+
+- \Method \OptionParser#on is identical to method \OptionParser#define,
+ except that it returns the parser object +self+.
+
+- \Method \OptionParser#on_head is identical to method \OptionParser#define_head,
+ except that it returns the parser object +self+.
+
+- \Method \OptionParser#on_tail is identical to method \OptionParser#define_tail,
+ except that it returns the parser object +self+.
+
+Though you may never need to call it directly,
+here's the core method for defining an option:
+
+- \Method \OptionParser#make_switch accepts an array of parameters and a block.
+ See {Parameters for New Options}[optparse/option_params.rdoc].
+ This method is unlike others here in that it:
+ - Accepts an <em>array of parameters</em>;
+ others accept a <em>sequence of parameter arguments</em>.
+ - Returns an array containing the created option object,
+ option names, and other values;
+ others return either the created option object
+ or the parser object +self+.
+
+=== Parsing
+
+\OptionParser has six instance methods for parsing.
+
+Three have names ending with a "bang" (<tt>!</tt>):
+
+- parse!
+- order!
+- permute!
+
+Each of these methods:
+
+- Accepts an optional array of string arguments +argv+;
+ if not given, +argv+ defaults to the value of OptionParser#default_argv,
+ whose initial value is ARGV.
+- Accepts an optional keyword argument +into+
+ (see {Keyword Argument into}[#label-Keyword+Argument+into]).
+- Returns +argv+, possibly with some elements removed.
+
+The three other methods have names _not_ ending with a "bang":
+
+- parse
+- order
+- permute
+
+Each of these methods:
+
+- Accepts an array of string arguments
+ _or_ zero or more string arguments.
+- Accepts an optional keyword argument +into+ and its value _into_.
+ (see {Keyword Argument into}[#label-Keyword+Argument+into]).
+- Returns +argv+, possibly with some elements removed.
+
+==== \Method parse!
+
+\Method parse!:
+
+- Accepts an optional array of string arguments +argv+;
+ if not given, +argv+ defaults to the value of OptionParser#default_argv,
+ whose initial value is ARGV.
+- Accepts an optional keyword argument +into+
+ (see {Keyword Argument into}[#label-Keyword+Argument+into]).
+- Returns +argv+, possibly with some elements removed.
+
+The method processes the elements in +argv+ beginning at <tt>argv[0]</tt>,
+and ending, by default, at the end.
+
+Otherwise processing ends and the method returns when:
+
+- The terminator argument <tt>--</tt> is found;
+ the terminator argument is removed before the return.
+- Environment variable +POSIXLY_CORRECT+ is defined
+ and a non-option argument is found;
+ the non-option argument is not removed.
+ Note that the _value_ of that variable does not matter,
+ as only its existence is checked.
+
+File +parse_bang.rb+:
+
+ :include: ruby/parse_bang.rb
+
+Help:
+
+ $ ruby parse_bang.rb --help
+ Usage: parse_bang [options]
+ --xxx
+ --yyy YYY
+ --zzz [ZZZ]
+
+Default behavior:
+
+ $ ruby parse_bang.rb input_file.txt output_file.txt --xxx --yyy FOO --zzz BAR
+ ["--xxx", true]
+ ["--yyy", "FOO"]
+ ["--zzz", "BAR"]
+ Returned: ["input_file.txt", "output_file.txt"] (Array)
+
+Processing ended by terminator argument:
+
+ $ ruby parse_bang.rb input_file.txt output_file.txt --xxx --yyy FOO -- --zzz BAR
+ ["--xxx", true]
+ ["--yyy", "FOO"]
+ Returned: ["input_file.txt", "output_file.txt", "--zzz", "BAR"] (Array)
+
+Processing ended by non-option found when +POSIXLY_CORRECT+ is defined:
+
+ $ POSIXLY_CORRECT=true ruby parse_bang.rb --xxx input_file.txt output_file.txt -yyy FOO
+ ["--xxx", true]
+ Returned: ["input_file.txt", "output_file.txt", "-yyy", "FOO"] (Array)
+
+==== \Method parse
+
+\Method parse:
+
+- Accepts an array of string arguments
+ _or_ zero or more string arguments.
+- Accepts an optional keyword argument +into+ and its value _into_.
+ (see {Keyword Argument into}[#label-Keyword+Argument+into]).
+- Returns +argv+, possibly with some elements removed.
+
+If given an array +ary+, the method forms array +argv+ as <tt>ary.dup</tt>.
+If given zero or more string arguments, those arguments are formed
+into array +argv+.
+
+The method calls
+
+ parse!(argv, into: into)
+
+Note that environment variable +POSIXLY_CORRECT+
+and the terminator argument <tt>--</tt> are honored.
+
+File +parse.rb+:
+
+ :include: ruby/parse.rb
+
+Help:
+
+ $ ruby parse.rb --help
+ Usage: parse [options]
+ --xxx
+ --yyy YYY
+ --zzz [ZZZ]
+
+Default behavior:
+
+ $ ruby parse.rb input_file.txt output_file.txt --xxx --yyy FOO --zzz BAR
+ ["--xxx", true]
+ ["--yyy", "FOO"]
+ ["--zzz", "BAR"]
+ Returned: ["input_file.txt", "output_file.txt"] (Array)
+
+Processing ended by terminator argument:
+
+ $ ruby parse.rb input_file.txt output_file.txt --xxx --yyy FOO -- --zzz BAR
+ ["--xxx", true]
+ ["--yyy", "FOO"]
+ Returned: ["input_file.txt", "output_file.txt", "--zzz", "BAR"] (Array)
+
+Processing ended by non-option found when +POSIXLY_CORRECT+ is defined:
+
+ $ POSIXLY_CORRECT=true ruby parse.rb --xxx input_file.txt output_file.txt -yyy FOO
+ ["--xxx", true]
+ Returned: ["input_file.txt", "output_file.txt", "-yyy", "FOO"] (Array)
+
+==== \Method order!
+
+Calling method OptionParser#order! gives exactly the same result as
+calling method OptionParser#parse! with environment variable
++POSIXLY_CORRECT+ defined.
+
+==== \Method order
+
+Calling method OptionParser#order gives exactly the same result as
+calling method OptionParser#parse with environment variable
++POSIXLY_CORRECT+ defined.
+
+==== \Method permute!
+
+Calling method OptionParser#permute! gives exactly the same result as
+calling method OptionParser#parse! with environment variable
++POSIXLY_CORRECT+ _not_ defined.
+
+==== \Method permute
+
+Calling method OptionParser#permute gives exactly the same result as
+calling method OptionParser#parse with environment variable
++POSIXLY_CORRECT+ _not_ defined.
diff --git a/doc/packed_data.rdoc b/doc/packed_data.rdoc
new file mode 100644
index 0000000000..ec13b24c69
--- /dev/null
+++ b/doc/packed_data.rdoc
@@ -0,0 +1,590 @@
+== Packed \Data
+
+Certain Ruby core methods deal with packing and unpacking data:
+
+- \Method Array#pack:
+ Formats each element in array +self+ into a binary string;
+ returns that string.
+- \Method String#unpack:
+ Extracts data from string +self+,
+ forming objects that become the elements of a new array;
+ returns that array.
+- \Method String#unpack1:
+ Does the same, but unpacks and returns only the first extracted object.
+
+Each of these methods accepts a string +template+,
+consisting of zero or more _directive_ characters,
+each followed by zero or more _modifier_ characters.
+
+Examples (directive <tt>'C'</tt> specifies 'unsigned character'):
+
+ [65].pack('C') # => "A" # One element, one directive.
+ [65, 66].pack('CC') # => "AB" # Two elements, two directives.
+ [65, 66].pack('C') # => "A" # Extra element is ignored.
+ [65].pack('') # => "" # No directives.
+ [65].pack('CC') # Extra directive raises ArgumentError.
+
+ 'A'.unpack('C') # => [65] # One character, one directive.
+ 'AB'.unpack('CC') # => [65, 66] # Two characters, two directives.
+ 'AB'.unpack('C') # => [65] # Extra character is ignored.
+ 'A'.unpack('CC') # => [65, nil] # Extra directive generates nil.
+ 'AB'.unpack('') # => [] # No directives.
+
+The string +template+ may contain any mixture of valid directives
+(directive <tt>'c'</tt> specifies 'signed character'):
+
+ [65, -1].pack('cC') # => "A\xFF"
+ "A\xFF".unpack('cC') # => [65, 255]
+
+The string +template+ may contain whitespace (which is ignored)
+and comments, each of which begins with character <tt>'#'</tt>
+and continues up to and including the next following newline:
+
+ [0,1].pack(" C #foo \n C ") # => "\x00\x01"
+ "\0\1".unpack(" C #foo \n C ") # => [0, 1]
+
+Any directive may be followed by either of these modifiers:
+
+- <tt>'*'</tt> - The directive is to be applied as many times as needed:
+
+ [65, 66].pack('C*') # => "AB"
+ 'AB'.unpack('C*') # => [65, 66]
+
+- Integer +count+ - The directive is to be applied +count+ times:
+
+ [65, 66].pack('C2') # => "AB"
+ [65, 66].pack('C3') # Raises ArgumentError.
+ 'AB'.unpack('C2') # => [65, 66]
+ 'AB'.unpack('C3') # => [65, 66, nil]
+
+ Note: Directives in <tt>%w[A a Z m]</tt> use +count+ differently;
+ see {String Directives}[rdoc-ref:packed_data.rdoc@String+Directives].
+
+If elements don't fit the provided directive, only least significant bits are encoded:
+
+ [257].pack("C").unpack("C") # => [1]
+
+=== Packing \Method
+
+\Method Array#pack accepts optional keyword argument
++buffer+ that specifies the target string (instead of a new string):
+
+ [65, 66].pack('C*', buffer: 'foo') # => "fooAB"
+
+The method can accept a block:
+
+ # Packed string is passed to the block.
+ [65, 66].pack('C*') {|s| p s } # => "AB"
+
+=== Unpacking Methods
+
+Methods String#unpack and String#unpack1 each accept
+an optional keyword argument +offset+ that specifies an offset
+into the string:
+
+ 'ABC'.unpack('C*', offset: 1) # => [66, 67]
+ 'ABC'.unpack1('C*', offset: 1) # => 66
+
+Both methods can accept a block:
+
+ # Each unpacked object is passed to the block.
+ ret = []
+ "ABCD".unpack("C*") {|c| ret << c }
+ ret # => [65, 66, 67, 68]
+
+ # The single unpacked object is passed to the block.
+ 'AB'.unpack1('C*') {|ele| p ele } # => 65
+
+=== \Integer Directives
+
+Each integer directive specifies the packing or unpacking
+for one element in the input or output array.
+
+==== 8-Bit \Integer Directives
+
+- <tt>'c'</tt> - 8-bit signed integer
+ (like C <tt>signed char</tt>):
+
+ [0, 1, 255].pack('c*') # => "\x00\x01\xFF"
+ s = [0, 1, -1].pack('c*') # => "\x00\x01\xFF"
+ s.unpack('c*') # => [0, 1, -1]
+
+- <tt>'C'</tt> - 8-bit signed integer
+ (like C <tt>unsigned char</tt>):
+
+ [0, 1, 255].pack('C*') # => "\x00\x01\xFF"
+ s = [0, 1, -1].pack('C*') # => "\x00\x01\xFF"
+ s.unpack('C*') # => [0, 1, 255]
+
+==== 16-Bit \Integer Directives
+
+- <tt>'s'</tt> - 16-bit signed integer, native-endian
+ (like C <tt>int16_t</tt>):
+
+ [513, -514].pack('s*') # => "\x01\x02\xFE\xFD"
+ s = [513, 65022].pack('s*') # => "\x01\x02\xFE\xFD"
+ s.unpack('s*') # => [513, -514]
+
+- <tt>'S'</tt> - 16-bit unsigned integer, native-endian
+ (like C <tt>uint16_t</tt>):
+
+ [513, -514].pack('S*') # => "\x01\x02\xFE\xFD"
+ s = [513, 65022].pack('S*') # => "\x01\x02\xFE\xFD"
+ s.unpack('S*') # => [513, 65022]
+
+- <tt>'n'</tt> - 16-bit network integer, big-endian:
+
+ s = [0, 1, -1, 32767, -32768, 65535].pack('n*')
+ # => "\x00\x00\x00\x01\xFF\xFF\x7F\xFF\x80\x00\xFF\xFF"
+ s.unpack('n*')
+ # => [0, 1, 65535, 32767, 32768, 65535]
+
+- <tt>'v'</tt> - 16-bit VAX integer, little-endian:
+
+ s = [0, 1, -1, 32767, -32768, 65535].pack('v*')
+ # => "\x00\x00\x01\x00\xFF\xFF\xFF\x7F\x00\x80\xFF\xFF"
+ s.unpack('v*')
+ # => [0, 1, 65535, 32767, 32768, 65535]
+
+==== 32-Bit \Integer Directives
+
+- <tt>'l'</tt> - 32-bit signed integer, native-endian
+ (like C <tt>int32_t</tt>):
+
+ s = [67305985, -50462977].pack('l*')
+ # => "\x01\x02\x03\x04\xFF\xFE\xFD\xFC"
+ s.unpack('l*')
+ # => [67305985, -50462977]
+
+- <tt>'L'</tt> - 32-bit unsigned integer, native-endian
+ (like C <tt>uint32_t</tt>):
+
+ s = [67305985, 4244504319].pack('L*')
+ # => "\x01\x02\x03\x04\xFF\xFE\xFD\xFC"
+ s.unpack('L*')
+ # => [67305985, 4244504319]
+
+- <tt>'N'</tt> - 32-bit network integer, big-endian:
+
+ s = [0,1,-1].pack('N*')
+ # => "\x00\x00\x00\x00\x00\x00\x00\x01\xFF\xFF\xFF\xFF"
+ s.unpack('N*')
+ # => [0, 1, 4294967295]
+
+- <tt>'V'</tt> - 32-bit VAX integer, little-endian:
+
+ s = [0,1,-1].pack('V*')
+ # => "\x00\x00\x00\x00\x01\x00\x00\x00\xFF\xFF\xFF\xFF"
+ s.unpack('v*')
+ # => [0, 0, 1, 0, 65535, 65535]
+
+==== 64-Bit \Integer Directives
+
+- <tt>'q'</tt> - 64-bit signed integer, native-endian
+ (like C <tt>int64_t</tt>):
+
+ s = [578437695752307201, -506097522914230529].pack('q*')
+ # => "\x01\x02\x03\x04\x05\x06\a\b\xFF\xFE\xFD\xFC\xFB\xFA\xF9\xF8"
+ s.unpack('q*')
+ # => [578437695752307201, -506097522914230529]
+
+- <tt>'Q'</tt> - 64-bit unsigned integer, native-endian
+ (like C <tt>uint64_t</tt>):
+
+ s = [578437695752307201, 17940646550795321087].pack('Q*')
+ # => "\x01\x02\x03\x04\x05\x06\a\b\xFF\xFE\xFD\xFC\xFB\xFA\xF9\xF8"
+ s.unpack('Q*')
+ # => [578437695752307201, 17940646550795321087]
+
+==== Platform-Dependent \Integer Directives
+
+- <tt>'i'</tt> - Platform-dependent width signed integer,
+ native-endian (like C <tt>int</tt>):
+
+ s = [67305985, -50462977].pack('i*')
+ # => "\x01\x02\x03\x04\xFF\xFE\xFD\xFC"
+ s.unpack('i*')
+ # => [67305985, -50462977]
+
+- <tt>'I'</tt> - Platform-dependent width unsigned integer,
+ native-endian (like C <tt>unsigned int</tt>):
+
+ s = [67305985, -50462977].pack('I*')
+ # => "\x01\x02\x03\x04\xFF\xFE\xFD\xFC"
+ s.unpack('I*')
+ # => [67305985, 4244504319]
+
+==== Pointer Directives
+
+- <tt>'j'</tt> - 64-bit pointer-width signed integer,
+ native-endian (like C <tt>intptr_t</tt>):
+
+ s = [67305985, -50462977].pack('j*')
+ # => "\x01\x02\x03\x04\x00\x00\x00\x00\xFF\xFE\xFD\xFC\xFF\xFF\xFF\xFF"
+ s.unpack('j*')
+ # => [67305985, -50462977]
+
+- <tt>'j'</tt> - 64-bit pointer-width unsigned integer,
+ native-endian (like C <tt>uintptr_t</tt>):
+
+ s = [67305985, 4244504319].pack('J*')
+ # => "\x01\x02\x03\x04\x00\x00\x00\x00\xFF\xFE\xFD\xFC\x00\x00\x00\x00"
+ s.unpack('J*')
+ # => [67305985, 4244504319]
+
+==== Other \Integer Directives
+:
+- <tt>'U'</tt> - UTF-8 character:
+
+ s = [4194304].pack('U*')
+ # => "\xF8\x90\x80\x80\x80"
+ s.unpack('U*')
+ # => [4194304]
+
+- <tt>'w'</tt> - BER-encoded integer
+ (see {BER enocding}[https://en.wikipedia.org/wiki/X.690#BER_encoding]):
+
+ s = [1073741823].pack('w*')
+ # => "\x83\xFF\xFF\xFF\x7F"
+ s.unpack('w*')
+ # => [1073741823]
+
+==== Modifiers for \Integer Directives
+
+For directives in
+<tt>'i'</tt>,
+<tt>'I'</tt>,
+<tt>'s'</tt>,
+<tt>'S'</tt>,
+<tt>'l'</tt>,
+<tt>'L'</tt>,
+<tt>'q'</tt>,
+<tt>'Q'</tt>,
+<tt>'j'</tt>, and
+<tt>'J'</tt>,
+these modifiers may be suffixed:
+
+- <tt>'!'</tt> or <tt>'_'</tt> - Underlying platform’s native size.
+- <tt>'>'</tt> - Big-endian.
+- <tt>'<'</tt> - Little-endian.
+
+=== \Float Directives
+
+Each float directive specifies the packing or unpacking
+for one element in the input or output array.
+
+==== Single-Precision \Float Directives
+
+- <tt>'F'</tt> or <tt>'f'</tt> - Native format:
+
+ s = [3.0].pack('F') # => "\x00\x00@@"
+ s.unpack('F') # => [3.0]
+
+- <tt>'e'</tt> - Little-endian:
+
+ s = [3.0].pack('e') # => "\x00\x00@@"
+ s.unpack('e') # => [3.0]
+
+- <tt>'g'</tt> - Big-endian:
+
+ s = [3.0].pack('g') # => "@@\x00\x00"
+ s.unpack('g') # => [3.0]
+
+==== Double-Precision \Float Directives
+
+- <tt>'D'</tt> or <tt>'d'</tt> - Native format:
+
+ s = [3.0].pack('D') # => "\x00\x00\x00\x00\x00\x00\b@"
+ s.unpack('D') # => [3.0]
+
+- <tt>'E'</tt> - Little-endian:
+
+ s = [3.0].pack('E') # => "\x00\x00\x00\x00\x00\x00\b@"
+ s.unpack('E') # => [3.0]
+
+- <tt>'G'</tt> - Big-endian:
+
+ s = [3.0].pack('G') # => "@\b\x00\x00\x00\x00\x00\x00"
+ s.unpack('G') # => [3.0]
+
+A float directive may be infinity or not-a-number:
+
+ inf = 1.0/0.0 # => Infinity
+ [inf].pack('f') # => "\x00\x00\x80\x7F"
+ "\x00\x00\x80\x7F".unpack('f') # => [Infinity]
+
+ nan = inf/inf # => NaN
+ [nan].pack('f') # => "\x00\x00\xC0\x7F"
+ "\x00\x00\xC0\x7F".unpack('f') # => [NaN]
+
+=== \String Directives
+
+Each string directive specifies the packing or unpacking
+for one byte in the input or output string.
+
+==== Binary \String Directives
+
+- <tt>'A'</tt> - Arbitrary binary string (space padded; count is width);
+ +nil+ is treated as the empty string:
+
+ ['foo'].pack('A') # => "f"
+ ['foo'].pack('A*') # => "foo"
+ ['foo'].pack('A2') # => "fo"
+ ['foo'].pack('A4') # => "foo "
+ [nil].pack('A') # => " "
+ [nil].pack('A*') # => ""
+ [nil].pack('A2') # => " "
+ [nil].pack('A4') # => " "
+
+ "foo\0".unpack('A') # => ["f"]
+ "foo\0".unpack('A4') # => ["foo"]
+ "foo\0bar".unpack('A10') # => ["foo\x00bar"] # Reads past "\0".
+ "foo ".unpack('A') # => ["f"]
+ "foo ".unpack('A4') # => ["foo"]
+ "foo".unpack('A4') # => ["foo"]
+
+ russian = "\u{442 435 441 442}" # => "теÑÑ‚"
+ russian.size # => 4
+ russian.bytesize # => 8
+ [russian].pack('A') # => "\xD1"
+ [russian].pack('A*') # => "\xD1\x82\xD0\xB5\xD1\x81\xD1\x82"
+ russian.unpack('A') # => ["\xD1"]
+ russian.unpack('A2') # => ["\xD1\x82"]
+ russian.unpack('A4') # => ["\xD1\x82\xD0\xB5"]
+ russian.unpack('A*') # => ["\xD1\x82\xD0\xB5\xD1\x81\xD1\x82"]
+
+- <tt>'a'</tt> - Arbitrary binary string (null padded; count is width):
+
+ ["foo"].pack('a') # => "f"
+ ["foo"].pack('a*') # => "foo"
+ ["foo"].pack('a2') # => "fo"
+ ["foo\0"].pack('a4') # => "foo\x00"
+ [nil].pack('a') # => "\x00"
+ [nil].pack('a*') # => ""
+ [nil].pack('a2') # => "\x00\x00"
+ [nil].pack('a4') # => "\x00\x00\x00\x00"
+
+ "foo\0".unpack('a') # => ["f"]
+ "foo\0".unpack('a4') # => ["foo\x00"]
+ "foo ".unpack('a4') # => ["foo "]
+ "foo".unpack('a4') # => ["foo"]
+ "foo\0bar".unpack('a4') # => ["foo\x00"] # Reads past "\0".
+
+- <tt>'Z'</tt> - Same as <tt>'a'</tt>,
+ except that null is added or ignored with <tt>'*'</tt>:
+
+ ["foo"].pack('Z*') # => "foo\x00"
+ [nil].pack('Z*') # => "\x00"
+
+ "foo\0".unpack('Z*') # => ["foo"]
+ "foo".unpack('Z*') # => ["foo"]
+ "foo\0bar".unpack('Z*') # => ["foo"] # Does not read past "\0".
+
+==== Bit \String Directives
+
+- <tt>'B'</tt> - Bit string (high byte first):
+
+ ['11111111' + '00000000'].pack('B*') # => "\xFF\x00"
+ ['10000000' + '01000000'].pack('B*') # => "\x80@"
+
+ ['1'].pack('B0') # => ""
+ ['1'].pack('B1') # => "\x80"
+ ['1'].pack('B2') # => "\x80\x00"
+ ['1'].pack('B3') # => "\x80\x00"
+ ['1'].pack('B4') # => "\x80\x00\x00"
+ ['1'].pack('B5') # => "\x80\x00\x00"
+ ['1'].pack('B6') # => "\x80\x00\x00\x00"
+
+ "\xff\x00".unpack("B*") # => ["1111111100000000"]
+ "\x01\x02".unpack("B*") # => ["0000000100000010"]
+
+ "".unpack("B0") # => [""]
+ "\x80".unpack("B1") # => ["1"]
+ "\x80".unpack("B2") # => ["10"]
+ "\x80".unpack("B3") # => ["100"]
+
+- <tt>'b'</tt> - Bit string (low byte first):
+
+ ['11111111' + '00000000'].pack('b*') # => "\xFF\x00"
+ ['10000000' + '01000000'].pack('b*') # => "\x01\x02"
+
+ ['1'].pack('b0') # => ""
+ ['1'].pack('b1') # => "\x01"
+ ['1'].pack('b2') # => "\x01\x00"
+ ['1'].pack('b3') # => "\x01\x00"
+ ['1'].pack('b4') # => "\x01\x00\x00"
+ ['1'].pack('b5') # => "\x01\x00\x00"
+ ['1'].pack('b6') # => "\x01\x00\x00\x00"
+
+ "\xff\x00".unpack("b*") # => ["1111111100000000"]
+ "\x01\x02".unpack("b*") # => ["1000000001000000"]
+
+ "".unpack("b0") # => [""]
+ "\x01".unpack("b1") # => ["1"]
+ "\x01".unpack("b2") # => ["10"]
+ "\x01".unpack("b3") # => ["100"]
+
+==== Hex \String Directives
+
+- <tt>'H'</tt> - Hex string (high nibble first):
+
+ ['10ef'].pack('H*') # => "\x10\xEF"
+ ['10ef'].pack('H0') # => ""
+ ['10ef'].pack('H3') # => "\x10\xE0"
+ ['10ef'].pack('H5') # => "\x10\xEF\x00"
+
+ ['fff'].pack('H3') # => "\xFF\xF0"
+ ['fff'].pack('H4') # => "\xFF\xF0"
+ ['fff'].pack('H5') # => "\xFF\xF0\x00"
+ ['fff'].pack('H6') # => "\xFF\xF0\x00"
+ ['fff'].pack('H7') # => "\xFF\xF0\x00\x00"
+ ['fff'].pack('H8') # => "\xFF\xF0\x00\x00"
+
+ "\x10\xef".unpack('H*') # => ["10ef"]
+ "\x10\xef".unpack('H0') # => [""]
+ "\x10\xef".unpack('H1') # => ["1"]
+ "\x10\xef".unpack('H2') # => ["10"]
+ "\x10\xef".unpack('H3') # => ["10e"]
+ "\x10\xef".unpack('H4') # => ["10ef"]
+ "\x10\xef".unpack('H5') # => ["10ef"]
+
+- <tt>'h'</tt> - Hex string (low nibble first):
+
+ ['10ef'].pack('h*') # => "\x01\xFE"
+ ['10ef'].pack('h0') # => ""
+ ['10ef'].pack('h3') # => "\x01\x0E"
+ ['10ef'].pack('h5') # => "\x01\xFE\x00"
+
+ ['fff'].pack('h3') # => "\xFF\x0F"
+ ['fff'].pack('h4') # => "\xFF\x0F"
+ ['fff'].pack('h5') # => "\xFF\x0F\x00"
+ ['fff'].pack('h6') # => "\xFF\x0F\x00"
+ ['fff'].pack('h7') # => "\xFF\x0F\x00\x00"
+ ['fff'].pack('h8') # => "\xFF\x0F\x00\x00"
+
+ "\x01\xfe".unpack('h*') # => ["10ef"]
+ "\x01\xfe".unpack('h0') # => [""]
+ "\x01\xfe".unpack('h1') # => ["1"]
+ "\x01\xfe".unpack('h2') # => ["10"]
+ "\x01\xfe".unpack('h3') # => ["10e"]
+ "\x01\xfe".unpack('h4') # => ["10ef"]
+ "\x01\xfe".unpack('h5') # => ["10ef"]
+
+==== Pointer \String Directives
+
+- <tt>'P'</tt> - Pointer to a structure (fixed-length string):
+
+ s = ['abc'].pack('P') # => "\xE0O\x7F\xE5\xA1\x01\x00\x00"
+ s.unpack('P*') # => ["abc"]
+ ".".unpack("P") # => []
+ ("\0" * 8).unpack("P") # => [nil]
+ [nil].pack("P") # => "\x00\x00\x00\x00\x00\x00\x00\x00"
+
+- <tt>'p'</tt> - Pointer to a null-terminated string:
+
+ s = ['abc'].pack('p') # => "(\xE4u\xE5\xA1\x01\x00\x00"
+ s.unpack('p*') # => ["abc"]
+ ".".unpack("p") # => []
+ ("\0" * 8).unpack("p") # => [nil]
+ [nil].pack("p") # => "\x00\x00\x00\x00\x00\x00\x00\x00"
+
+==== Other \String Directives
+
+- <tt>'M'</tt> - Quoted printable, MIME encoding;
+ text mode, but input must use LF and output LF;
+ (see {RFC 2045}[https://www.ietf.org/rfc/rfc2045.txt]):
+
+ ["a b c\td \ne"].pack('M') # => "a b c\td =\n\ne=\n"
+ ["\0"].pack('M') # => "=00=\n"
+
+ ["a"*1023].pack('M') == ("a"*73+"=\n")*14+"a=\n" # => true
+ ("a"*73+"=\na=\n").unpack('M') == ["a"*74] # => true
+ (("a"*73+"=\n")*14+"a=\n").unpack('M') == ["a"*1023] # => true
+
+ "a b c\td =\n\ne=\n".unpack('M') # => ["a b c\td \ne"]
+ "=00=\n".unpack('M') # => ["\x00"]
+
+ "pre=31=32=33after".unpack('M') # => ["pre123after"]
+ "pre=\nafter".unpack('M') # => ["preafter"]
+ "pre=\r\nafter".unpack('M') # => ["preafter"]
+ "pre=".unpack('M') # => ["pre="]
+ "pre=\r".unpack('M') # => ["pre=\r"]
+ "pre=hoge".unpack('M') # => ["pre=hoge"]
+ "pre==31after".unpack('M') # => ["pre==31after"]
+ "pre===31after".unpack('M') # => ["pre===31after"]
+
+- <tt>'m'</tt> - Base64 encoded string;
+ count specifies input bytes between each newline,
+ rounded down to nearest multiple of 3;
+ if count is zero, no newlines are added;
+ (see {RFC 4648}[https://www.ietf.org/rfc/rfc4648.txt]):
+
+ [""].pack('m') # => ""
+ ["\0"].pack('m') # => "AA==\n"
+ ["\0\0"].pack('m') # => "AAA=\n"
+ ["\0\0\0"].pack('m') # => "AAAA\n"
+ ["\377"].pack('m') # => "/w==\n"
+ ["\377\377"].pack('m') # => "//8=\n"
+ ["\377\377\377"].pack('m') # => "////\n"
+
+ "".unpack('m') # => [""]
+ "AA==\n".unpack('m') # => ["\x00"]
+ "AAA=\n".unpack('m') # => ["\x00\x00"]
+ "AAAA\n".unpack('m') # => ["\x00\x00\x00"]
+ "/w==\n".unpack('m') # => ["\xFF"]
+ "//8=\n".unpack('m') # => ["\xFF\xFF"]
+ "////\n".unpack('m') # => ["\xFF\xFF\xFF"]
+ "A\n".unpack('m') # => [""]
+ "AA\n".unpack('m') # => ["\x00"]
+ "AA=\n".unpack('m') # => ["\x00"]
+ "AAA\n".unpack('m') # => ["\x00\x00"]
+
+ [""].pack('m0') # => ""
+ ["\0"].pack('m0') # => "AA=="
+ ["\0\0"].pack('m0') # => "AAA="
+ ["\0\0\0"].pack('m0') # => "AAAA"
+ ["\377"].pack('m0') # => "/w=="
+ ["\377\377"].pack('m0') # => "//8="
+ ["\377\377\377"].pack('m0') # => "////"
+
+ "".unpack('m0') # => [""]
+ "AA==".unpack('m0') # => ["\x00"]
+ "AAA=".unpack('m0') # => ["\x00\x00"]
+ "AAAA".unpack('m0') # => ["\x00\x00\x00"]
+ "/w==".unpack('m0') # => ["\xFF"]
+ "//8=".unpack('m0') # => ["\xFF\xFF"]
+ "////".unpack('m0') # => ["\xFF\xFF\xFF"]
+
+- <tt>'u'</tt> - UU-encoded string:
+
+ [0].pack("U") # => "\u0000"
+ [0x3fffffff].pack("U") # => "\xFC\xBF\xBF\xBF\xBF\xBF"
+ [0x40000000].pack("U") # => "\xFD\x80\x80\x80\x80\x80"
+ [0x7fffffff].pack("U") # => "\xFD\xBF\xBF\xBF\xBF\xBF"
+
+=== Offset Directives
+
+- <tt>'@'</tt> - Begin packing at the given byte offset;
+ for packing, null fill if necessary:
+
+ [1, 2].pack("C@0C") # => "\x02"
+ [1, 2].pack("C@1C") # => "\x01\x02"
+ [1, 2].pack("C@5C") # => "\x01\x00\x00\x00\x00\x02"
+
+ "\x01\x00\x00\x02".unpack("C@3C") # => [1, 2]
+ "\x00".unpack("@1C") # => [nil]
+
+- <tt>'X'</tt> - Back up a byte:
+
+ [0, 1, 2].pack("CCXC") # => "\x00\x02"
+ [0, 1, 2].pack("CCX2C") # => "\x02"
+ "\x00\x02".unpack("CCXC") # => [0, 2, 2]
+
+=== Null Byte Direcive
+
+- <tt>'x'</tt> - Null byte:
+
+ [].pack("x0") # => ""
+ [].pack("x") # => "\x00"
+ [].pack("x8") # => "\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x02".unpack("CxC") # => [0, 2]
diff --git a/doc/ractor.md b/doc/ractor.md
new file mode 100644
index 0000000000..843754c263
--- /dev/null
+++ b/doc/ractor.md
@@ -0,0 +1,952 @@
+# Ractor - Ruby's Actor-like concurrent abstraction
+
+Ractor is designed to provide a parallel execution feature of Ruby without thread-safety concerns.
+
+## Summary
+
+### Multiple Ractors in an interpreter process
+
+You can make multiple Ractors and they run in parallel.
+
+* `Ractor.new{ expr }` creates a new Ractor and `expr` is run in parallel on a parallel computer.
+* Interpreter invokes with the first Ractor (called *main Ractor*).
+* If main Ractor terminated, all Ractors receive terminate request like Threads (if main thread (first invoked Thread), Ruby interpreter sends all running threads to terminate execution).
+* Each Ractor has 1 or more Threads.
+ * Threads in a Ractor shares a Ractor-wide global lock like GIL (GVL in MRI terminology), so they can't run in parallel (without releasing GVL explicitly in C-level). Threads in different ractors run in parallel.
+ * The overhead of creating a Ractor is similar to overhead of one Thread creation.
+
+### Limited sharing between multiple ractors
+
+Ractors don't share everything, unlike threads.
+
+* Most objects are *Unshareable objects*, so you don't need to care about thread-safety problems which are caused by sharing.
+* Some objects are *Shareable objects*.
+ * Immutable objects: frozen objects which don't refer to unshareable-objects.
+ * `i = 123`: `i` is an immutable object.
+ * `s = "str".freeze`: `s` is an immutable object.
+ * `a = [1, [2], 3].freeze`: `a` is not an immutable object because `a` refers unshareable-object `[2]` (which is not frozen).
+ * `h = {c: Object}.freeze`: `h` is an immutable object because `h` refers Symbol `:c` and shareable `Object` class object which is not frozen.
+ * Class/Module objects
+ * Special shareable objects
+ * Ractor object itself.
+ * And more...
+
+### Two-types communication between Ractors
+
+Ractors communicate with each other and synchronize the execution by message exchanging between Ractors. There are two message exchange protocols: push type (message passing) and pull type.
+
+* Push type message passing: `Ractor#send(obj)` and `Ractor.receive()` pair.
+ * Sender ractor passes the `obj` to the ractor `r` by `r.send(obj)` and receiver ractor receives the message with `Ractor.receive`.
+ * Sender knows the destination Ractor `r` and the receiver does not know the sender (accept all messages from any ractors).
+ * Receiver has infinite queue and sender enqueues the message. Sender doesn't block to put message into this queue.
+ * This type of message exchanging is employed by many other Actor-based languages.
+ * `Ractor.receive_if{ filter_expr }` is a variant of `Ractor.receive` to select a message.
+* Pull type communication: `Ractor.yield(obj)` and `Ractor#take()` pair.
+ * Sender ractor declare to yield the `obj` by `Ractor.yield(obj)` and receiver Ractor take it with `r.take`.
+ * Sender doesn't know a destination Ractor and receiver knows the sender Ractor `r`.
+ * Sender or receiver will block if there is no other side.
+
+### Copy & Move semantics to send messages
+
+To send unshareable objects as messages, objects are copied or moved.
+
+* Copy: use deep-copy.
+* Move: move membership.
+ * Sender can not access the moved object after moving the object.
+ * Guarantee that at least only 1 Ractor can access the object.
+
+### Thread-safety
+
+Ractor helps to write a thread-safe concurrent program, but we can make thread-unsafe programs with Ractors.
+
+* GOOD: Sharing limitation
+ * Most objects are unshareable, so we can't make data-racy and race-conditional programs.
+ * Shareable objects are protected by an interpreter or locking mechanism.
+* BAD: Class/Module can violate this assumption
+ * To make it compatible with old behavior, classes and modules can introduce data-race and so on.
+ * Ruby programmers should take care if they modify class/module objects on multi Ractor programs.
+* BAD: Ractor can't solve all thread-safety problems
+ * There are several blocking operations (waiting send, waiting yield and waiting take) so you can make a program which has dead-lock and live-lock issues.
+ * Some kind of shareable objects can introduce transactions (STM, for example). However, misusing transactions will generate inconsistent state.
+
+Without Ractor, we need to trace all state-mutations to debug thread-safety issues.
+With Ractor, you can concentrate on suspicious code which are shared with Ractors.
+
+## Creation and termination
+
+### `Ractor.new`
+
+* `Ractor.new{ expr }` generates another Ractor.
+
+```ruby
+# Ractor.new with a block creates new Ractor
+r = Ractor.new do
+ # This block will be run in parallel with other ractors
+end
+
+# You can name a Ractor with `name:` argument.
+r = Ractor.new name: 'test-name' do
+end
+
+# and Ractor#name returns its name.
+r.name #=> 'test-name'
+```
+
+### Given block isolation
+
+The Ractor executes given `expr` in a given block.
+Given block will be isolated from outer scope by the `Proc#isolate` method (not exposed yet for Ruby users). To prevent sharing unshareable objects between ractors, block outer-variables, `self` and other information are isolated.
+
+`Proc#isolate` is called at Ractor creation time (when `Ractor.new` is called). If given Proc object is not able to isolate because of outer variables and so on, an error will be raised.
+
+```ruby
+begin
+ a = true
+ r = Ractor.new do
+ a #=> ArgumentError because this block accesses `a`.
+ end
+ r.take # see later
+rescue ArgumentError
+end
+```
+
+* The `self` of the given block is the `Ractor` object itself.
+
+```ruby
+r = Ractor.new do
+ p self.class #=> Ractor
+ self.object_id
+end
+r.take == self.object_id #=> false
+```
+
+Passed arguments to `Ractor.new()` becomes block parameters for the given block. However, an interpreter does not pass the parameter object references, but send them as messages (see below for details).
+
+```ruby
+r = Ractor.new 'ok' do |msg|
+ msg #=> 'ok'
+end
+r.take #=> 'ok'
+```
+
+```ruby
+# almost similar to the last example
+r = Ractor.new do
+ msg = Ractor.receive
+ msg
+end
+r.send 'ok'
+r.take #=> 'ok'
+```
+
+### An execution result of given block
+
+Return value of the given block becomes an outgoing message (see below for details).
+
+```ruby
+r = Ractor.new do
+ 'ok'
+end
+r.take #=> `ok`
+```
+
+```ruby
+# almost similar to the last example
+r = Ractor.new do
+ Ractor.yield 'ok'
+end
+r.take #=> 'ok'
+```
+
+Error in the given block will be propagated to the receiver of an outgoing message.
+
+```ruby
+r = Ractor.new do
+ raise 'ok' # exception will be transferred to the receiver
+end
+
+begin
+ r.take
+rescue Ractor::RemoteError => e
+ e.cause.class #=> RuntimeError
+ e.cause.message #=> 'ok'
+ e.ractor #=> r
+end
+```
+
+## Communication between Ractors
+
+Communication between Ractors is achieved by sending and receiving messages. There are two ways to communicate with each other.
+
+* (1) Message sending/receiving
+ * (1-1) push type send/receive (sender knows receiver). Similar to the Actor model.
+ * (1-2) pull type yield/take (receiver knows sender).
+* (2) Using shareable container objects
+ * Ractor::TVar gem ([ko1/ractor-tvar](https://github.com/ko1/ractor-tvar))
+ * more?
+
+Users can control program execution timing with (1), but should not control with (2) (only manage as critical section).
+
+For message sending and receiving, there are two types of APIs: push type and pull type.
+
+* (1-1) send/receive (push type)
+ * `Ractor#send(obj)` (`Ractor#<<(obj)` is an alias) send a message to the Ractor's incoming port. Incoming port is connected to the infinite size incoming queue so `Ractor#send` will never block.
+ * `Ractor.receive` dequeue a message from its own incoming queue. If the incoming queue is empty, `Ractor.receive` calling will block.
+ * `Ractor.receive_if{|msg| filter_expr }` is variant of `Ractor.receive`. `receive_if` only receives a message which `filter_expr` is true (So `Ractor.receive` is the same as `Ractor.receive_if{ true }`.
+* (1-2) yield/take (pull type)
+ * `Ractor.yield(obj)` send an message to a Ractor which are calling `Ractor#take` via outgoing port . If no Ractors are waiting for it, the `Ractor.yield(obj)` will block. If multiple Ractors are waiting for `Ractor.yield(obj)`, only one Ractor can receive the message.
+ * `Ractor#take` receives a message which is waiting by `Ractor.yield(obj)` method from the specified Ractor. If the Ractor does not call `Ractor.yield` yet, the `Ractor#take` call will block.
+* `Ractor.select()` can wait for the success of `take`, `yield` and `receive`.
+* You can close the incoming port or outgoing port.
+ * You can close then with `Ractor#close_incoming` and `Ractor#close_outgoing`.
+ * If the incoming port is closed for a Ractor, you can't `send` to the Ractor. If `Ractor.receive` is blocked for the closed incoming port, then it will raise an exception.
+ * If the outgoing port is closed for a Ractor, you can't call `Ractor#take` and `Ractor.yield` on the Ractor. If ractors are blocking by `Ractor#take` or `Ractor.yield`, closing outgoing port will raise an exception on these blocking ractors.
+ * When a Ractor is terminated, the Ractor's ports are closed.
+* There are 3 ways to send an object as a message
+ * (1) Send a reference: Sending a shareable object, send only a reference to the object (fast)
+ * (2) Copy an object: Sending an unshareable object by copying an object deeply (slow). Note that you can not send an object which does not support deep copy. Some `T_DATA` objects are not supported.
+ * (3) Move an object: Sending an unshareable object reference with a membership. Sender Ractor can not access moved objects anymore (raise an exception) after moving it. Current implementation makes new object as a moved object for receiver Ractor and copies references of sending object to moved object.
+ * You can choose "Copy" and "Move" by the `move:` keyword, `Ractor#send(obj, move: true/false)` and `Ractor.yield(obj, move: true/false)` (default is `false` (COPY)).
+
+### Sending/Receiving ports
+
+Each Ractor has _incoming-port_ and _outgoing-port_. Incoming-port is connected to the infinite sized incoming queue.
+
+```
+ Ractor r
+ +-------------------------------------------+
+ | incoming outgoing |
+ | port port |
+ r.send(obj) ->*->[incoming queue] Ractor.yield(obj) ->*-> r.take
+ | | |
+ | v |
+ | Ractor.receive |
+ +-------------------------------------------+
+
+
+Connection example: r2.send obj on r1ã€Ractor.receive on r2
+ +----+ +----+
+ * r1 |---->* r2 *
+ +----+ +----+
+
+
+Connection example: Ractor.yield(obj) on r1, r1.take on r2
+ +----+ +----+
+ * r1 *---->- r2 *
+ +----+ +----+
+
+Connection example: Ractor.yield(obj) on r1 and r2,
+ and waiting for both simultaneously by Ractor.select(r1, r2)
+
+ +----+
+ * r1 *------+
+ +----+ |
+ +----> Ractor.select(r1, r2)
+ +----+ |
+ * r2 *------|
+ +----+
+```
+
+```ruby
+r = Ractor.new do
+ msg = Ractor.receive # Receive from r's incoming queue
+ msg # send back msg as block return value
+end
+r.send 'ok' # Send 'ok' to r's incoming port -> incoming queue
+r.take # Receive from r's outgoing port
+```
+
+The last example shows the following ractor network.
+
+```
+
+ +------+ +---+
+ * main |------> * r *---+
+ +------+ +---+ |
+ ^ |
+ +-------------------+
+```
+
+And this code can be simplified by using an argument for `Ractor.new`.
+
+```ruby
+# Actual argument 'ok' for `Ractor.new()` will be sent to created Ractor.
+r = Ractor.new 'ok' do |msg|
+ # Values for formal parameters will be received from incoming queue.
+ # Similar to: msg = Ractor.receive
+
+ msg # Return value of the given block will be sent via outgoing port
+end
+
+# receive from the r's outgoing port.
+r.take #=> `ok`
+```
+
+### Return value of a block for `Ractor.new`
+
+As already explained, the return value of `Ractor.new` (an evaluated value of `expr` in `Ractor.new{ expr }`) can be taken by `Ractor#take`.
+
+```ruby
+Ractor.new{ 42 }.take #=> 42
+```
+
+When the block return value is available, the Ractor is dead so that no ractors except taken Ractor can touch the return value, so any values can be sent with this communication path without any modification.
+
+```ruby
+r = Ractor.new do
+ a = "hello"
+ binding
+end
+
+r.take.eval("p a") #=> "hello" (other communication path can not send a Binding object directly)
+```
+
+### Wait for multiple Ractors with `Ractor.select`
+
+You can wait multiple Ractor's `yield` with `Ractor.select(*ractors)`.
+The return value of `Ractor.select()` is `[r, msg]` where `r` is yielding Ractor and `msg` is yielded message.
+
+Wait for a single ractor (same as `Ractor.take`):
+
+```ruby
+r1 = Ractor.new{'r1'}
+
+r, obj = Ractor.select(r1)
+r == r1 and obj == 'r1' #=> true
+```
+
+Wait for two ractors:
+
+```ruby
+r1 = Ractor.new{'r1'}
+r2 = Ractor.new{'r2'}
+rs = [r1, r2]
+as = []
+
+# Wait for r1 or r2's Ractor.yield
+r, obj = Ractor.select(*rs)
+rs.delete(r)
+as << obj
+
+# Second try (rs only contain not-closed ractors)
+r, obj = Ractor.select(*rs)
+rs.delete(r)
+as << obj
+as.sort == ['r1', 'r2'] #=> true
+```
+
+Complex example:
+
+```ruby
+pipe = Ractor.new do
+ loop do
+ Ractor.yield Ractor.receive
+ end
+end
+
+RN = 10
+rs = RN.times.map{|i|
+ Ractor.new pipe, i do |pipe, i|
+ msg = pipe.take
+ msg # ping-pong
+ end
+}
+RN.times{|i|
+ pipe << i
+}
+RN.times.map{
+ r, n = Ractor.select(*rs)
+ rs.delete r
+ n
+}.sort #=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+```
+
+Multiple Ractors can send to one Ractor.
+
+```ruby
+# Create 10 ractors and they send objects to pipe ractor.
+# pipe ractor yield received objects
+
+pipe = Ractor.new do
+ loop do
+ Ractor.yield Ractor.receive
+ end
+end
+
+RN = 10
+rs = RN.times.map{|i|
+ Ractor.new pipe, i do |pipe, i|
+ pipe << i
+ end
+}
+
+RN.times.map{
+ pipe.take
+}.sort #=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+```
+
+TODO: Current `Ractor.select()` has the same issue of `select(2)`, so this interface should be refined.
+
+TODO: `select` syntax of go-language uses round-robin technique to make fair scheduling. Now `Ractor.select()` doesn't use it.
+
+### Closing Ractor's ports
+
+* `Ractor#close_incoming/outgoing` close incoming/outgoing ports (similar to `Queue#close`).
+* `Ractor#close_incoming`
+ * `r.send(obj) ` where `r`'s incoming port is closed, will raise an exception.
+ * When the incoming queue is empty and incoming port is closed, `Ractor.receive` raises an exception. If the incoming queue is not empty, it dequeues an object without exceptions.
+* `Ractor#close_outgoing`
+ * `Ractor.yield` on a Ractor which closed the outgoing port, it will raise an exception.
+ * `Ractor#take` for a Ractor which closed the outgoing port, it will raise an exception. If `Ractor#take` is blocking, it will raise an exception.
+* When a Ractor terminates, the ports are closed automatically.
+ * Return value of the Ractor's block will be yielded as `Ractor.yield(ret_val)`, even if the implementation terminates the based native thread.
+
+Example (try to take from closed Ractor):
+
+```ruby
+r = Ractor.new do
+ 'finish'
+end
+r.take # success (will return 'finish')
+begin
+ o = r.take # try to take from closed Ractor
+rescue Ractor::ClosedError
+ 'ok'
+else
+ "ng: #{o}"
+end
+```
+
+Example (try to send to closed (terminated) Ractor):
+
+```ruby
+r = Ractor.new do
+end
+
+r.take # wait terminate
+
+begin
+ r.send(1)
+rescue Ractor::ClosedError
+ 'ok'
+else
+ 'ng'
+end
+```
+
+When multiple Ractors are waiting for `Ractor.yield()`, `Ractor#close_outgoing` will cancel all blocking by raising an exception (`ClosedError`).
+
+### Send a message by copying
+
+`Ractor#send(obj)` or `Ractor.yield(obj)` copy `obj` deeply if `obj` is an unshareable object.
+
+```ruby
+obj = 'str'.dup
+r = Ractor.new obj do |msg|
+ # return received msg's object_id
+ msg.object_id
+end
+
+obj.object_id == r.take #=> false
+```
+
+Some objects are not supported to copy the value, and raise an exception.
+
+```ruby
+obj = Thread.new{}
+begin
+ Ractor.new obj do |msg|
+ msg
+ end
+rescue TypeError => e
+ e.message #=> #<TypeError: allocator undefined for Thread>
+else
+ 'ng' # unreachable here
+end
+```
+
+### Send a message by moving
+
+`Ractor#send(obj, move: true)` or `Ractor.yield(obj, move: true)` move `obj` to the destination Ractor.
+If the source Ractor touches the moved object (for example, call the method like `obj.foo()`), it will be an error.
+
+```ruby
+# move with Ractor#send
+r = Ractor.new do
+ obj = Ractor.receive
+ obj << ' world'
+end
+
+str = 'hello'
+r.send str, move: true
+modified = r.take #=> 'hello world'
+
+# str is moved, and accessing str from this Ractor is prohibited
+
+begin
+ # Error because it touches moved str.
+ str << ' exception' # raise Ractor::MovedError
+rescue Ractor::MovedError
+ modified #=> 'hello world'
+else
+ raise 'unreachable'
+end
+```
+
+```ruby
+# move with Ractor.yield
+r = Ractor.new do
+ obj = 'hello'
+ Ractor.yield obj, move: true
+ obj << 'world' # raise Ractor::MovedError
+end
+
+str = r.take
+begin
+ r.take
+rescue Ractor::RemoteError
+ p str #=> "hello"
+end
+```
+
+Some objects are not supported to move, and an exception will be raised.
+
+```ruby
+r = Ractor.new do
+ Ractor.receive
+end
+
+r.send(Thread.new{}, move: true) #=> allocator undefined for Thread (TypeError)
+```
+
+To achieve the access prohibition for moved objects, _class replacement_ technique is used to implement it.
+
+### Shareable objects
+
+The following objects are shareable.
+
+* Immutable objects
+ * Small integers, some symbols, `true`, `false`, `nil` (a.k.a. `SPECIAL_CONST_P()` objects in internal)
+ * Frozen native objects
+ * Numeric objects: `Float`, `Complex`, `Rational`, big integers (`T_BIGNUM` in internal)
+ * All Symbols.
+ * Frozen `String` and `Regexp` objects (their instance variables should refer only shareable objects)
+* Class, Module objects (`T_CLASS`, `T_MODULE` and `T_ICLASS` in internal)
+* `Ractor` and other special objects which care about synchronization.
+
+Implementation: Now shareable objects (`RVALUE`) have `FL_SHAREABLE` flag. This flag can be added lazily.
+
+To make shareable objects, `Ractor.make_shareable(obj)` method is provided. In this case, try to make sharaeble by freezing `obj` and recursively travasible objects. This method accepts `copy:` keyword (default value is false).`Ractor.make_shareable(obj, copy: true)` tries to make a deep copy of `obj` and make the copied object shareable.
+
+## Language changes to isolate unshareable objects between Ractors
+
+To isolate unshareable objects between Ractors, we introduced additional language semantics on multi-Ractor Ruby programs.
+
+Note that without using Ractors, these additional semantics is not needed (100% compatible with Ruby 2).
+
+### Global variables
+
+Only the main Ractor (a Ractor created at starting of interpreter) can access global variables.
+
+```ruby
+$gv = 1
+r = Ractor.new do
+ $gv
+end
+
+begin
+ r.take
+rescue Ractor::RemoteError => e
+ e.cause.message #=> 'can not access global variables from non-main Ractors'
+end
+```
+
+Note that some special global variables are ractor-local, like `$stdin`, `$stdout`, `$stderr`. See [[Bug #17268]](https://bugs.ruby-lang.org/issues/17268) for more details.
+
+### Instance variables of shareable objects
+
+Instance variables of classes/modules can be get from non-main Ractors if the referring values are shareable objects.
+
+```ruby
+class C
+ @iv = 1
+end
+
+p Ractor.new do
+ class C
+ @iv
+ end
+end.take #=> 1
+```
+
+Otherwise, only the main Ractor can access instance variables of shareable objects.
+
+```ruby
+class C
+ @iv = [] # unshareable object
+end
+
+Ractor.new do
+ class C
+ begin
+ p @iv
+ rescue Ractor::IsolationError
+ p $!.message
+ #=> "can not get unshareable values from instance variables of classes/modules from non-main Ractors"
+ end
+
+ begin
+ @iv = 42
+ rescue Ractor::IsolationError
+ p $!.message
+ #=> "can not set instance variables of classes/modules by non-main Ractors"
+ end
+ end
+end.take
+```
+
+
+
+```ruby
+shared = Ractor.new{}
+shared.instance_variable_set(:@iv, 'str')
+
+r = Ractor.new shared do |shared|
+ p shared.instance_variable_get(:@iv)
+end
+
+begin
+ r.take
+rescue Ractor::RemoteError => e
+ e.cause.message #=> can not access instance variables of shareable objects from non-main Ractors (Ractor::IsolationError)
+end
+```
+
+Note that instance variables for class/module objects are also prohibited on Ractors.
+
+### Class variables
+
+Only the main Ractor can access class variables.
+
+```ruby
+class C
+ @@cv = 'str'
+end
+
+r = Ractor.new do
+ class C
+ p @@cv
+ end
+end
+
+
+begin
+ r.take
+rescue => e
+ e.class #=> Ractor::IsolationError
+end
+```
+
+### Constants
+
+Only the main Ractor can read constants which refer to the unshareable object.
+
+```ruby
+class C
+ CONST = 'str'
+end
+r = Ractor.new do
+ C::CONST
+end
+begin
+ r.take
+rescue => e
+ e.class #=> Ractor::IsolationError
+end
+```
+
+Only the main Ractor can define constants which refer to the unshareable object.
+
+```ruby
+class C
+end
+r = Ractor.new do
+ C::CONST = 'str'
+end
+begin
+ r.take
+rescue => e
+ e.class #=> Ractor::IsolationError
+end
+```
+
+To make multi-ractor supported library, the constants should only refer shareable objects.
+
+```ruby
+TABLE = {a: 'ko1', b: 'ko2', c: 'ko3'}
+```
+
+In this case, `TABLE` references an unshareable Hash object. So that other ractors can not refer `TABLE` constant. To make it shareable, we can use `Ractor.make_shareable()` like that.
+
+```ruby
+TABLE = Ractor.make_shareable( {a: 'ko1', b: 'ko2', c: 'ko3'} )
+```
+
+To make it easy, Ruby 3.0 introduced new `shareable_constant_value` Directive.
+
+```ruby
+# shareable_constant_value: literal
+
+TABLE = {a: 'ko1', b: 'ko2', c: 'ko3'}
+#=> Same as: TABLE = Ractor.make_shareable( {a: 'ko1', b: 'ko2', c: 'ko3'} )
+```
+
+`shareable_constant_value` directive accepts the following modes (descriptions use the example: `CONST = expr`):
+
+* none: Do nothing. Same as: `CONST = expr`
+* literal:
+ * if `expr` is consites of literals, replaced to `CONST = Ractor.make_shareable(expr)`.
+ * otherwise: replaced to `CONST = expr.tap{|o| raise unless Ractor.shareable?}`.
+* experimental_everything: replaced to `CONST = Ractor.make_shareable(expr)`.
+* experimental_copy: replaced to `CONST = Ractor.make_shareable(expr, copy: true)`.
+
+Except the `none` mode (default), it is guaranteed that the assigned constants refer to only shareable objects.
+
+See [doc/syntax/comments.rdoc](syntax/comments.rdoc) for more details.
+
+## Implementation note
+
+* Each Ractor has its own thread, it means each Ractor has at least 1 native thread.
+* Each Ractor has its own ID (`rb_ractor_t::pub::id`).
+ * On debug mode, all unshareable objects are labeled with current Ractor's id, and it is checked to detect unshareable object leak (access an object from different Ractor) in VM.
+
+## Examples
+
+### Traditional Ring example in Actor-model
+
+```ruby
+RN = 1_000
+CR = Ractor.current
+
+r = Ractor.new do
+ p Ractor.receive
+ CR << :fin
+end
+
+RN.times{
+ r = Ractor.new r do |next_r|
+ next_r << Ractor.receive
+ end
+}
+
+p :setup_ok
+r << 1
+p Ractor.receive
+```
+
+### Fork-join
+
+```ruby
+def fib n
+ if n < 2
+ 1
+ else
+ fib(n-2) + fib(n-1)
+ end
+end
+
+RN = 10
+rs = (1..RN).map do |i|
+ Ractor.new i do |i|
+ [i, fib(i)]
+ end
+end
+
+until rs.empty?
+ r, v = Ractor.select(*rs)
+ rs.delete r
+ p answer: v
+end
+```
+
+### Worker pool
+
+```ruby
+require 'prime'
+
+pipe = Ractor.new do
+ loop do
+ Ractor.yield Ractor.receive
+ end
+end
+
+N = 1000
+RN = 10
+workers = (1..RN).map do
+ Ractor.new pipe do |pipe|
+ while n = pipe.take
+ Ractor.yield [n, n.prime?]
+ end
+ end
+end
+
+(1..N).each{|i|
+ pipe << i
+}
+
+pp (1..N).map{
+ _r, (n, b) = Ractor.select(*workers)
+ [n, b]
+}.sort_by{|(n, b)| n}
+```
+
+### Pipeline
+
+```ruby
+# pipeline with yield/take
+r1 = Ractor.new do
+ 'r1'
+end
+
+r2 = Ractor.new r1 do |r1|
+ r1.take + 'r2'
+end
+
+r3 = Ractor.new r2 do |r2|
+ r2.take + 'r3'
+end
+
+p r3.take #=> 'r1r2r3'
+```
+
+```ruby
+# pipeline with send/receive
+
+r3 = Ractor.new Ractor.current do |cr|
+ cr.send Ractor.receive + 'r3'
+end
+
+r2 = Ractor.new r3 do |r3|
+ r3.send Ractor.receive + 'r2'
+end
+
+r1 = Ractor.new r2 do |r2|
+ r2.send Ractor.receive + 'r1'
+end
+
+r1 << 'r0'
+p Ractor.receive #=> "r0r1r2r3"
+```
+
+### Supervise
+
+```ruby
+# ring example again
+
+r = Ractor.current
+(1..10).map{|i|
+ r = Ractor.new r, i do |r, i|
+ r.send Ractor.receive + "r#{i}"
+ end
+}
+
+r.send "r0"
+p Ractor.receive #=> "r0r10r9r8r7r6r5r4r3r2r1"
+```
+
+```ruby
+# ring example with an error
+
+r = Ractor.current
+rs = (1..10).map{|i|
+ r = Ractor.new r, i do |r, i|
+ loop do
+ msg = Ractor.receive
+ raise if /e/ =~ msg
+ r.send msg + "r#{i}"
+ end
+ end
+}
+
+r.send "r0"
+p Ractor.receive #=> "r0r10r9r8r7r6r5r4r3r2r1"
+r.send "r0"
+p Ractor.select(*rs, Ractor.current) #=> [:receive, "r0r10r9r8r7r6r5r4r3r2r1"]
+r.send "e0"
+p Ractor.select(*rs, Ractor.current)
+#=>
+#<Thread:0x000056262de28bd8 run> terminated with exception (report_on_exception is true):
+Traceback (most recent call last):
+ 2: from /home/ko1/src/ruby/trunk/test.rb:7:in `block (2 levels) in <main>'
+ 1: from /home/ko1/src/ruby/trunk/test.rb:7:in `loop'
+/home/ko1/src/ruby/trunk/test.rb:9:in `block (3 levels) in <main>': unhandled exception
+Traceback (most recent call last):
+ 2: from /home/ko1/src/ruby/trunk/test.rb:7:in `block (2 levels) in <main>'
+ 1: from /home/ko1/src/ruby/trunk/test.rb:7:in `loop'
+/home/ko1/src/ruby/trunk/test.rb:9:in `block (3 levels) in <main>': unhandled exception
+ 1: from /home/ko1/src/ruby/trunk/test.rb:21:in `<main>'
+<internal:ractor>:69:in `select': thrown by remote Ractor. (Ractor::RemoteError)
+```
+
+```ruby
+# resend non-error message
+
+r = Ractor.current
+rs = (1..10).map{|i|
+ r = Ractor.new r, i do |r, i|
+ loop do
+ msg = Ractor.receive
+ raise if /e/ =~ msg
+ r.send msg + "r#{i}"
+ end
+ end
+}
+
+r.send "r0"
+p Ractor.receive #=> "r0r10r9r8r7r6r5r4r3r2r1"
+r.send "r0"
+p Ractor.select(*rs, Ractor.current)
+[:receive, "r0r10r9r8r7r6r5r4r3r2r1"]
+msg = 'e0'
+begin
+ r.send msg
+ p Ractor.select(*rs, Ractor.current)
+rescue Ractor::RemoteError
+ msg = 'r0'
+ retry
+end
+
+#=> <internal:ractor>:100:in `send': The incoming-port is already closed (Ractor::ClosedError)
+# because r == r[-1] is terminated.
+```
+
+```ruby
+# ring example with supervisor and re-start
+
+def make_ractor r, i
+ Ractor.new r, i do |r, i|
+ loop do
+ msg = Ractor.receive
+ raise if /e/ =~ msg
+ r.send msg + "r#{i}"
+ end
+ end
+end
+
+r = Ractor.current
+rs = (1..10).map{|i|
+ r = make_ractor(r, i)
+}
+
+msg = 'e0' # error causing message
+begin
+ r.send msg
+ p Ractor.select(*rs, Ractor.current)
+rescue Ractor::RemoteError
+ r = rs[-1] = make_ractor(rs[-2], rs.size-1)
+ msg = 'x0'
+ retry
+end
+
+#=> [:receive, "x0r9r9r8r7r6r5r4r3r2r1"]
+```
diff --git a/doc/rdoc/markup_reference.rb b/doc/rdoc/markup_reference.rb
new file mode 100644
index 0000000000..66ec6786c0
--- /dev/null
+++ b/doc/rdoc/markup_reference.rb
@@ -0,0 +1,1257 @@
+require 'rdoc'
+
+# \Class \RDoc::MarkupReference exists only to provide a suitable home
+# for a reference document for \RDoc markup.
+#
+# All objects defined in this class -- classes, modules, methods, aliases,
+# attributes, and constants -- are solely for illustrating \RDoc markup,
+# and have no other legitimate use.
+#
+# = \RDoc Markup Reference
+#
+# Notes:
+#
+# - Examples in this reference are Ruby code and comments;
+# certain differences from other sources
+# (such as C code and comments) are noted.
+# - An example that shows rendered HTML output
+# displays that output in a blockquote:
+#
+# Rendered HTML:
+# >>>
+# Some stuff
+#
+# \RDoc-generated documentation is derived from and controlled by:
+#
+# - Single-line or multi-line comments that precede certain definitions;
+# see {Markup in Comments}[rdoc-ref:RDoc::MarkupReference@Markup+in+Comments].
+# - \RDoc directives in trailing comments (on the same line as code);
+# see <tt>:nodoc:</tt>, <tt>:doc:</tt>, and <tt>:notnew</tt>.
+# - \RDoc directives in single-line comments;
+# see other {Directives}[rdoc-ref:RDoc::MarkupReference@Directives].
+# - The Ruby code itself (but not from C code);
+# see {Documentation Derived from Ruby Code}[rdoc-ref:RDoc::MarkupReference@Documentation+Derived+from+Ruby+Code].
+#
+# == Markup in Comments
+#
+# The treatment of markup in comments varies according to the type of file:
+#
+# - <tt>.rb</tt> (Ruby code file): markup is parsed from Ruby comments.
+# - <tt>.c</tt> (C code file): markup is parsed from C comments.
+# - <tt>.rdoc</tt> (RDoc text file): markup is parsed from the entire file.
+#
+# The comment associated with
+# a Ruby class, module, method, alias, constant, or attribute
+# becomes the documentation for that defined object:
+#
+# - In a Ruby file, that comment immediately precedes
+# the definition of the object.
+# - In a C file, that comment immediately precedes
+# the function that implements a method,
+# or otherwise immediately precedes the definition of the object.
+#
+# In either a Ruby or a C file,
+# \RDoc ignores comments that do not precede object definitions.
+#
+# In an \RDoc file, the text is not associated with any code object,
+# but may (depending on how the documentation is built),
+# become a separate page.
+#
+# Almost all examples on this page are all RDoc-like;
+# that is, they have no comment markers like Ruby <tt>#</tt>
+# or C <tt>/* ... */</tt>.
+#
+# === Margins
+#
+# In a multi-line comment,
+# \RDoc looks for the comment's natural left margin,
+# which becomes the <em>base margin</em> for the comment
+# and is the initial <em>current margin</em> for for the comment.
+#
+# The current margin can change, and does so, for example in a list.
+#
+# === Blocks
+#
+# It's convenient to think of \RDoc markup input as a sequence of _blocks_
+# of various types (details at the links):
+#
+# - {Paragraph}[rdoc-ref:RDoc::MarkupReference@Paragraphs]:
+# an ordinary paragraph.
+# - {Verbatim text block}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks]:
+# a block of text to be rendered literally.
+# - {Code block}[rdoc-ref:RDoc::MarkupReference@Code+Blocks]:
+# a verbatim text block containing Ruby code,
+# to be rendered with code highlighting.
+# - {Block quote}[rdoc-ref:RDoc::MarkupReference@Block+Quotes]:
+# a longish quoted passage, to be rendered with indentation
+# instead of quote marks.
+# - {List}[rdoc-ref:RDoc::MarkupReference@Lists]: items for
+# a bullet list, numbered list, lettered list, or labeled list.
+# - {Heading}[rdoc-ref:RDoc::MarkupReference@Headings]:
+# a section heading.
+# - {Horizontal rule}[rdoc-ref:RDoc::MarkupReference@Horizontal+Rules]:
+# a line across the rendered page.
+# - {Directive}[rdoc-ref:RDoc::MarkupReference@Directives]:
+# various special directions for the rendering.
+# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup]:
+# text to be rendered in a special way.
+#
+# About the blocks:
+#
+# - Except for a paragraph, a block is distinguished by its indentation,
+# or by unusual initial or embedded characters.
+# - Any block may appear independently
+# (that is, not nested in another block);
+# some blocks may be nested, as detailed below.
+#
+# ==== Paragraphs
+#
+# A paragraph consists of one or more non-empty lines of ordinary text,
+# each beginning at the current margin.
+#
+# Note: Here, <em>ordinary text</em> means text that is <em>not identified</em>
+# by indentation, or by unusual initial or embedded characters.
+# See below.
+#
+# Paragraphs are separated by one or more empty lines.
+#
+# Example input:
+#
+# \RDoc produces HTML and command-line documentation for Ruby projects.
+# \RDoc includes the rdoc and ri tools for generating and displaying
+# documentation from the command-line.
+#
+# You'll love it.
+#
+# Rendered HTML:
+# >>>
+# \RDoc produces HTML and command-line documentation for Ruby projects.
+# \RDoc includes the rdoc and ri tools for generating and displaying
+# documentation from the command-line.
+#
+# You'll love it.
+#
+# A paragraph may contain nested blocks, including:
+#
+# - {Verbatim text blocks}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks].
+# - {Code blocks}[rdoc-ref:RDoc::MarkupReference@Code+Blocks].
+# - {Block quotes}[rdoc-ref:RDoc::MarkupReference@Block+Quotes].
+# - {Lists}[rdoc-ref:RDoc::MarkupReference@Lists].
+# - {Headings}[rdoc-ref:RDoc::MarkupReference@Headings].
+# - {Horizontal rules}[rdoc-ref:RDoc::MarkupReference@Horizontal+Rules].
+# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup].
+#
+# ==== Verbatim Text Blocks
+#
+# Text indented farther than the current margin becomes a <em>verbatim text block</em>
+# (or a code block, described next).
+# In the rendered HTML, such text:
+#
+# - Is indented.
+# - Has a contrasting background color.
+#
+# The verbatim text block ends at the first line beginning at the current margin.
+#
+# Example input:
+#
+# This is not verbatim text.
+#
+# This is verbatim text.
+# Whitespace is honored. # See?
+# Whitespace is honored. # See?
+#
+# This is still the same verbatim text block.
+#
+# This is not verbatim text.
+#
+# Rendered HTML:
+# >>>
+# This is not verbatim text.
+#
+# This is verbatim text.
+# Whitespace is honored. # See?
+# Whitespace is honored. # See?
+#
+# This is still the same verbatim text block.
+#
+# This is not verbatim text.
+#
+# A verbatim text block may not contain nested blocks of any kind
+# -- it's verbatim.
+#
+# ==== Code Blocks
+#
+# A special case of verbatim text is the <em>code block</em>,
+# which is merely verbatim text that \RDoc recognizes as Ruby code:
+#
+# In the rendered HTML, the code block:
+#
+# - Is indented.
+# - Has a contrasting background color.
+# - Has syntax highlighting.
+#
+# Example input:
+#
+# Consider this method:
+#
+# def foo(name = '', value = 0)
+# @name = name # Whitespace is still honored.
+# @value = value
+# end
+#
+#
+# Rendered HTML:
+# >>>
+# Consider this method:
+#
+# def foo(name = '', value = 0)
+# @name = name # Whitespace is still honored.
+# @value = value
+# end
+#
+# Pro tip: If your indented Ruby code does not get highlighted,
+# it may contain a syntax error.
+#
+# A code block may not contain nested blocks of any kind
+# -- it's verbatim.
+#
+# ==== Block Quotes
+#
+# You can use the characters <tt>>>></tt> (unindented),
+# followed by indented text, to treat the text
+# as a {block quote}[https://en.wikipedia.org/wiki/Block_quotation]:
+#
+# Example input:
+#
+# Here's a block quote:
+# >>>
+# Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
+# commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
+# Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
+#
+# Aenean congue ligula eu ligula molestie, eu pellentesque purus
+# faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
+# diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
+# purus magna ut tortor.
+#
+# Rendered HTML:
+#
+# >>>
+# Here's a block quote:
+# >>>
+# Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
+# commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
+# Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
+#
+# Aenean congue ligula eu ligula molestie, eu pellentesque purus
+# faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
+# diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
+# purus magna ut tortor.
+#
+# Note that, unlike verbatim text, single newlines are not honored,
+# but that a double newline begins a new paragraph in the block quote.
+#
+# A block quote may contain nested blocks, including:
+#
+# - Other block quotes.
+# - {Paragraphs}[rdoc-ref:RDoc::MarkupReference@Paragraphs].
+# - {Verbatim text blocks}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks].
+# - {Code blocks}[rdoc-ref:RDoc::MarkupReference@Code+Blocks].
+# - {Lists}[rdoc-ref:RDoc::MarkupReference@Lists].
+# - {Headings}[rdoc-ref:RDoc::MarkupReference@Headings].
+# - {Horizontal rules}[rdoc-ref:RDoc::MarkupReference@Horizontal+Rules].
+# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup].
+#
+# ==== Lists
+#
+# Each type of list item is marked by a special beginning:
+#
+# - Bullet list item: Begins with a hyphen or asterisk.
+# - Numbered list item: Begins with digits and a period.
+# - Lettered list item: Begins with an alphabetic character and a period.
+# - Labeled list item: Begins with one of:
+# - Square-bracketed text.
+# - A word followed by two colons.
+#
+# A list begins with a list item and continues, even across blank lines,
+# as long as list items of the same type are found at the same indentation level.
+#
+# A new list resets the current margin inward.
+# Additional lines of text aligned at that margin
+# are part of the continuing list item.
+#
+# A list item may be continued on additional lines that are aligned
+# with the first line. See examples below.
+#
+# A list item may contain nested blocks, including:
+#
+# - Other lists of any type.
+# - {Paragraphs}[rdoc-ref:RDoc::MarkupReference@Paragraphs].
+# - {Verbatim text blocks}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks].
+# - {Code blocks}[rdoc-ref:RDoc::MarkupReference@Code+Blocks].
+# - {Block quotes}[rdoc-ref:RDoc::MarkupReference@Block+Quotes].
+# - {Headings}[rdoc-ref:RDoc::MarkupReference@Headings].
+# - {Horizontal rules}[rdoc-ref:RDoc::MarkupReference@Horizontal+Rules].
+# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup].
+#
+# ===== Bullet Lists
+#
+# A bullet list item begins with a hyphen or asterisk.
+#
+# Example input:
+#
+# - An item.
+# - Another.
+# - An item spanning
+# multiple lines.
+#
+# * Yet another.
+# - Last one.
+#
+# Rendered HTML:
+# >>>
+# - An item.
+# - Another.
+# - An item spanning
+# multiple lines.
+#
+# * Yet another.
+# - Last one.
+#
+# ===== Numbered Lists
+#
+# A numbered list item begins with digits and a period.
+#
+# The items are automatically re-numbered.
+#
+# Example input:
+#
+# 100. An item.
+# 10. Another.
+# 1. An item spanning
+# multiple lines.
+#
+# 1. Yet another.
+# 1000. Last one.
+#
+# Rendered HTML:
+# >>>
+# 100. An item.
+# 10. Another.
+# 1. An item spanning
+# multiple lines.
+#
+# 1. Yet another.
+# 1000. Last one.
+#
+# ===== Lettered Lists
+#
+# A numbered list item begins with a letters and a period.
+#
+# The items are automatically "re-lettered."
+#
+# Example input:
+#
+# z. An item.
+# y. Another.
+# x. An item spanning
+# multiple lines.
+#
+# x. Yet another.
+# a. Last one.
+#
+# Rendered HTML:
+# >>>
+# z. An item.
+# y. Another.
+#
+# x. Yet another.
+# a. Last one.
+#
+# ===== Labeled Lists
+#
+# A labeled list item begins with one of:
+#
+# - Square-bracketed text: the label and text are on two lines.
+# - A word followed by two colons: the label and text are on the same line.
+#
+# Example input:
+#
+# [foo] An item.
+# bat:: Another.
+# [bag] An item spanning
+# multiple lines.
+#
+# [bar baz] Yet another.
+# bam:: Last one.
+#
+# Rendered HTML:
+# >>>
+# [foo] An item.
+# bat:: Another.
+# [bag] An item spanning
+# multiple lines.
+#
+# [bar baz] Yet another.
+# bam:: Last one.
+#
+# ==== Headings
+#
+# A heading begins with up to six equal-signs, followed by heading text.
+# Whitespace between those and the heading text is optional.
+#
+# Examples:
+#
+# = Section 1
+# == Section 1.1
+# === Section 1.1.1
+# === Section 1.1.2
+# == Section 1.2
+# = Section 2
+# = Foo
+# == Bar
+# === Baz
+# ==== Bam
+# ===== Bat
+# ====== Bad
+# ============Still a Heading (Level 6)
+# \== Not a Heading
+#
+# A heading may contain only one type of nested block:
+#
+# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup].
+#
+# ==== Horizontal Rules
+#
+# A horizontal rule consists of a line with three or more hyphens
+# and nothing more.
+#
+# Example input:
+#
+# ---
+# --- Not a horizontal rule.
+#
+# -- Also not a horizontal rule.
+# ---
+#
+# Rendered HTML:
+# >>>
+# ---
+# --- Not a horizontal rule.
+#
+# -- Also not a horizontal rule.
+# ---
+#
+# ==== Directives
+#
+# ===== Directives for Allowing or Suppressing Documentation
+#
+# - <tt># :stopdoc:</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that \RDoc should ignore markup
+# until next <tt>:startdoc:</tt> directive or end-of-file.
+#
+# - <tt># :startdoc:</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that \RDoc should resume parsing markup.
+#
+# - <tt># :enddoc:</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that \RDoc should ignore markup to end-of-file
+# regardless of other directives.
+#
+# - <tt># :nodoc:</tt>:
+#
+# - Appended to a line of code
+# that defines a class, module, method, alias, constant, or attribute.
+# - Specifies that the defined object should not be documented.
+#
+# - <tt># :nodoc: all</tt>:
+#
+# - Appended to a line of code
+# that defines a class or module.
+# - Specifies that the class or module should not be documented.
+# By default, however, a nested class or module _will_ be documented.
+#
+# - <tt># :doc:</tt>:
+#
+# - Appended to a line of code
+# that defines a class, module, method, alias, constant, or attribute.
+# - Specifies the defined object should be documented, even if otherwise
+# would not be documented.
+#
+# - <tt># :notnew:</tt> (aliased as <tt>:not_new:</tt> and <tt>:not-new:</tt>):
+#
+# - Appended to a line of code
+# that defines instance method +initialize+.
+# - Specifies that singleton method +new+ should not be documented.
+# By default, Ruby fakes a corresponding singleton method +new+,
+# which \RDoc includes in the documentation.
+# Note that instance method +initialize+ is private, and so by default
+# is not documented.
+#
+# For Ruby code, but not for other \RDoc sources,
+# there is a shorthand for <tt>:stopdoc:</tt> and <tt>:startdoc:</tt>:
+#
+# # Documented.
+# #--
+# # Not documented.
+# #++
+# # Documented.
+#
+# For C code, any of directives <tt>:startdoc:</tt>, <tt>:enddoc:</tt>,
+# and <tt>:nodoc:</tt> may appear in a stand-alone comment:
+#
+# /* :startdoc: */
+# /* :stopdoc: */
+# /* :enddoc: */
+#
+# ===== Directive for Specifying \RDoc Source Format
+#
+# - <tt># :markup: _type_</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies the format for the \RDoc input;
+# parameter +type+ is one of +markdown+, +rd+, +rdoc+, +tomdoc+.
+#
+# ===== Directives for HTML Output
+#
+# - <tt># :title: _text_</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies the title for the HTML output.
+#
+# - <tt># :main: _filename_</tt>:
+# - Appears on a line by itself.
+# - Specifies the HTML file to be displayed first.
+#
+# ===== Directives for Method Documentation
+#
+# - <tt># :call-seq:</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies the calling sequence to be reported in the HTML,
+# overriding the actual calling sequence in the code.
+# See method #call_seq_directive.
+#
+# Note that \RDoc can build the calling sequence for a Ruby-coded method,
+# but not for other languages.
+# You may want to override that by explicitly giving a <tt>:call-seq:</tt>
+# directive if you want to include:
+#
+# - A return type, which is not automatically inferred.
+# - Multiple calling sequences.
+#
+# For C code, the directive may appear in a stand-alone comment.
+#
+# - <tt># :args: _arg_names_</tt> (aliased as <tt>:arg:</tt>):
+#
+# - Appears on a line by itself.
+# - Specifies the arguments to be reported in the HTML,
+# overriding the actual arguments in the code.
+# See method #args_directive.
+#
+# - <tt># :yields: _arg_names_</tt> (aliased as <tt>:yield:</tt>):
+#
+# - Appears on a line by itself.
+# - Specifies the yield arguments to be reported in the HTML,
+# overriding the actual yield in the code.
+# See method #yields_directive.
+#
+# ===== Directives for Organizing Documentation
+#
+# By default, \RDoc groups:
+#
+# - Singleton methods together in alphabetical order.
+# - Instance methods and their aliases together in alphabetical order.
+# - Attributes and their aliases together in alphabetical order.
+#
+# You can use directives to modify those behaviors.
+#
+# - <tt># :section: _section_title_</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that following methods are to be grouped into the section
+# with the given <em>section_title</em>,
+# or into the default section if no title is given.
+# The directive remains in effect until another such directive is given,
+# but may be temporarily overridden by directive <tt>:category:</tt>.
+# See below.
+#
+# The comment block containing this directive:
+#
+# - Must be separated by a blank line from the documentation for the next item.
+# - May have one or more lines preceding the directive.
+# These will be removed, along with any trailing lines that match them.
+# Such lines may be visually helpful.
+# - Lines of text that are not so removed become the descriptive text
+# for the section.
+#
+# Example:
+#
+# # ----------------------------------------
+# # :section: My Section
+# # This is the section that I wrote.
+# # See it glisten in the noon-day sun.
+# # ----------------------------------------
+#
+# ##
+# # Comment for some_method
+# def some_method
+# # ...
+# end
+#
+# You can use directive <tt>:category:</tt> to temporarily
+# override the current section.
+#
+# - <tt># :category: _section_title_</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that just one following method is to be included
+# in the given section, or in the default section if no title is given.
+# Subsequent methods are to be grouped into the current section.
+#
+# ===== Directive for Including a File
+#
+# - <tt># :include: _filepath_</tt>:
+#
+# - Appears on a line by itself.
+# - Specifies that the contents of the given file
+# are to be included at this point.
+# The file content is shifted to have the same indentation as the colon
+# at the start of the directive.
+#
+# The file is searched for in the directories
+# given with the <tt>--include</tt> command-line option,
+# or by default in the current directory.
+#
+# For C code, the directive may appear in a stand-alone comment
+#
+# ==== Text Markup
+#
+# Text markup is metatext that affects HTML rendering:
+#
+# - Typeface: italic, bold, monofont.
+# - Character conversions: copyright, trademark, certain punctuation.
+# - Links.
+# - Escapes: marking text as "not markup."
+#
+# ===== Typeface Markup
+#
+# Typeface markup can specify that text is to be rendered
+# as italic, bold, or monofont.
+#
+# Typeface markup may contain only one type of nested block:
+#
+# - More typeface markup:
+# italic, bold, monofont.
+#
+# ====== Italic
+#
+# Text may be marked as italic via HTML tag <tt><i></tt> or <tt><em></tt>.
+#
+# Example input:
+#
+# <i>Italicized words</i> in a paragraph.
+#
+# >>>
+# <i>Italicized words in a block quote</i>.
+#
+# - <i>Italicized words</i> in a list item.
+#
+# ====== <i>Italicized words</i> in a Heading
+#
+# <i>Italicized passage containing *bold* and +monofont+.</i>
+#
+# Rendered HTML:
+# >>>
+# <i>Italicized words</i> in a paragraph.
+#
+# >>>
+# <i>Italicized words in a block quote</i>.
+#
+# - <i>Italicized words</i> in a list item.
+#
+# ====== <i>Italicized words</i> in a Heading
+#
+# <i>Italicized passage containing *bold* and +monofont+.</i>
+#
+# A single word may be italicized via a shorthand:
+# prefixed and suffixed underscores.
+#
+# Example input:
+#
+# _Italic_ in a paragraph.
+#
+# >>>
+# _Italic_ in a block quote.
+#
+# - _Italic_ in a list item.
+#
+# ====== _Italic_ in a Heading
+#
+# Rendered HTML:
+# >>>
+# _Italic_ in a paragraph.
+#
+# >>>
+# _Italic_ in a block quote.
+#
+# - _Italic_ in a list item.
+#
+# ====== _Italic_ in a Heading
+#
+# ====== Bold
+#
+# Text may be marked as bold via HTML tag <tt><b></tt>.
+#
+# Example input:
+#
+# <b>Bold words</b> in a paragraph.
+#
+# >>>
+# <b>Bold words</b> in a block quote.
+#
+# - <b>Bold words</b> in a list item.
+#
+# ====== <b>Bold words</b> in a Heading
+#
+# <b>Bold passage containing _italics_ and +monofont+.</b>
+#
+# Rendered HTML:
+#
+# >>>
+# <b>Bold words</b> in a paragraph.
+#
+# >>>
+# <b>Bold words</b> in a block quote.
+#
+# - <b>Bold words</b> in a list item.
+#
+# ====== <b>Bold words</b> in a Heading
+#
+# <b>Bold passage containing _italics_ and +monofont+.</b>
+#
+# A single word may be made bold via a shorthand:
+# prefixed and suffixed asterisks.
+#
+# Example input:
+#
+# *Bold* in a paragraph.
+#
+# >>>
+# *Bold* in a block quote.
+#
+# - *Bold* in a list item.
+#
+# ===== *Bold* in a Heading
+#
+# Rendered HTML:
+#
+# >>>
+# *Bold* in a paragraph.
+#
+# >>>
+# *Bold* in a block quote.
+#
+# - *Bold* in a list item.
+#
+# ===== *Bold* in a Heading
+#
+# ====== Monofont
+#
+# Text may be marked as monofont
+# -- sometimes called 'typewriter font' --
+# via HTML tag <tt><tt></tt> or <tt><code></tt>.
+#
+# Example input:
+#
+# <tt>Monofont words</tt> in a paragraph.
+#
+# >>>
+# <tt>Monofont words</tt> in a block quote.
+#
+# - <tt>Monofont words</tt> in a list item.
+#
+# ====== <tt>Monofont words</tt> in heading
+#
+# <tt>Monofont passage containing _italics_ and *bold*.</tt>
+#
+# Rendered HTML:
+#
+# >>>
+# <tt>Monofont words</tt> in a paragraph.
+#
+# >>>
+# <tt>Monofont words</tt> in a block quote.
+#
+# - <tt>Monofont words</tt> in a list item.
+#
+# ====== <tt>Monofont words</tt> in heading
+#
+# <tt>Monofont passage containing _italics_ and *bold*.</tt>
+#
+# A single word may be made monofont by a shorthand:
+# prefixed and suffixed plus-signs.
+#
+# Example input:
+#
+# +Monofont+ in a paragraph.
+#
+# >>>
+# +Monofont+ in a block quote.
+#
+# - +Monofont+ in a list item.
+#
+# ====== +Monofont+ in a Heading
+#
+# Rendered HTML:
+#
+# >>>
+# +Monofont+ in a paragraph.
+#
+# >>>
+# +Monofont+ in a block quote.
+#
+# - +Monofont+ in a list item.
+#
+# ====== +Monofont+ in a Heading
+#
+# ==== Character Conversions
+#
+# Certain combinations of characters may be converted to special characters;
+# whether the conversion occurs depends on whether the special character
+# is available in the current encoding.
+#
+# - <tt>(c)</tt> converts to (c) (copyright character); must be lowercase.
+#
+# - <tt>(r)</tt> converts to (r) (registered trademark character); must be lowercase.
+#
+# - <tt>'foo'</tt> converts to 'foo' (smart single-quotes).
+#
+# - <tt>"foo"</tt> converts to "foo" (smart double-quotes).
+#
+# - <tt>foo ... bar</tt> converts to foo ... bar (1-character ellipsis).
+#
+# - <tt>foo -- bar</tt> converts to foo -- bar (1-character en-dash).
+#
+# - <tt>foo --- bar</tt> converts to foo --- bar (1-character em-dash).
+#
+# ==== Links
+#
+# Certain strings in \RDoc text are converted to links.
+# Any such link may be suppressed by prefixing a backslash.
+# This section shows how to link to various
+# targets.
+#
+# [Class]
+#
+# - On-page: <tt>DummyClass</tt> links to DummyClass.
+# - Off-page: <tt>RDoc::Alias</tt> links to RDoc::Alias.
+#
+# [Module]
+#
+# - On-page: <tt>DummyModule</tt> links to DummyModule.
+# - Off-page: <tt>RDoc</tt> links to RDoc.
+#
+# [Constant]
+#
+# - On-page: <tt>DUMMY_CONSTANT</tt> links to DUMMY_CONSTANT.
+# - Off-page: <tt>RDoc::Text::MARKUP_FORMAT</tt> links to RDoc::Text::MARKUP_FORMAT.
+#
+# [Singleton Method]
+#
+# - On-page: <tt>::dummy_singleton_method</tt> links to ::dummy_singleton_method.
+# - Off-page<tt>RDoc::TokenStream::to_html</tt> links to RDoc::TokenStream::to_html.
+#
+# Note: Occasionally \RDoc is not linked to a method whose name
+# has only special characters. Check whether the links you were expecting
+# are actually there. If not, you'll need to put in an explicit link;
+# see below.
+#
+# Pro tip: The link to any method is available in the alphabetical table of contents
+# at the top left of the page for the class or module.
+#
+# [Instance Method]
+#
+# - On-page: <tt>#dummy_instance_method</tt> links to #dummy_instance_method.
+# - Off-page: <tt>RDoc::Alias#html_name</tt> links to RDoc::Alias#html_name.
+#
+# See the Note and Pro Tip immediately above.
+#
+# [Attribute]
+#
+# - On-page: <tt>#dummy_attribute</tt> links to #dummy_attribute.
+# - Off-page: <tt>RDoc::Alias#name</tt> links to RDoc::Alias#name.
+#
+# [Alias]
+#
+# - On-page: <tt>#dummy_instance_alias</tt> links to #dummy_instance_alias.
+# - Off-page: <tt>RDoc::Alias#new_name</tt> links to RDoc::Alias#new_name.
+#
+# [Protocol +http+]
+#
+# - Linked: <tt>http://yahoo.com</tt> links to http://yahoo.com.
+#
+# [Protocol +https+]
+#
+# - Linked: <tt>https://github.com</tt> links to https://github.com.
+#
+# [Protocol +www+]
+#
+# - Linked: <tt>www.yahoo.com</tt> links to www.yahoo.com.
+#
+# [Protocol +ftp+]
+#
+# - Linked: <tt>ftp://nosuch.site</tt> links to ftp://nosuch.site.
+#
+# [Protocol +mailto+]
+#
+# - Linked: <tt>mailto:/foo@bar.com</tt> links to mailto://foo@bar.com.
+#
+# [Protocol +irc+]
+#
+# - link: <tt>irc://irc.freenode.net/ruby</tt> links to irc://irc.freenode.net/ruby.
+#
+# [Image Filename Extensions]
+#
+# - Link: <tt>https://www.ruby-lang.org/images/header-ruby-logo@2x.png</tt> is
+# converted to an in-line HTML +img+ tag, which displays the image in the HTML:
+#
+# https://www.ruby-lang.org/images/header-ruby-logo@2x.png
+#
+# Also works for +bmp+, +gif+, +jpeg+, and +jpg+ files.
+#
+# Note: Works only for a fully qualified URL.
+#
+# [Heading]
+#
+# - Link: <tt>RDoc::RD@LICENSE</tt> links to RDoc::RDoc::RD@LICENSE.
+#
+# Note that spaces in the actual heading are represented by <tt>+</tt> characters
+# in the linkable text.
+#
+# - Link: <tt>RDoc::Options@Saved+Options</tt>
+# links to RDoc::Options@Saved+Options.
+#
+# Punctuation and other special characters must be escaped like CGI.escape.
+#
+# Pro tip: The link to any heading is available in the alphabetical table of contents
+# at the top left of the page for the class or module.
+#
+# [Section]
+#
+# See {Directives for Organizing Documentation}[#class-RDoc::MarkupReference-label-Directives+for+Organizing+Documentation].
+#
+# - Link: <tt>RDoc::Markup::ToHtml@Visitor</tt> links to RDoc::Markup::ToHtml@Visitor.
+#
+# If a section and a heading share the same name, the link target is the section.
+#
+# [Single-Word Text Link]
+#
+# Use square brackets to create single-word text link:
+#
+# - <tt>GitHub[https://github.com]</tt> links to GitHub[https://github.com].
+#
+# [Multi-Word Text Link]
+#
+# Use square brackets and curly braces to create a multi-word text link.
+#
+# - <tt>{GitHub home page}[https://github.com]</tt> links to
+# {GitHub home page}[https://github.com].
+#
+# [<tt>rdoc-ref</tt> Scheme]
+#
+# A link with the <tt>rdoc-ref:</tt> scheme links to the referenced item,
+# if that item exists.
+# The referenced item may be a class, module, method, file, etc.
+#
+# - Class: <tt>Alias[rdoc-ref:RDoc::Alias]</tt> links to Alias[rdoc-ref:RDoc::Alias].
+# - Module: <tt>RDoc[rdoc-ref:RDoc]</tt> links to RDoc[rdoc-ref:RDoc].
+# - Method: <tt>foo[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK]</tt>
+# links to foo[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK].
+# - Constant: <tt>bar[rdoc-ref:RDoc::Markup::ToHtml::LIST_TYPE_TO_HTML]</tt>
+# links to bar[rdoc-ref:RDoc::Markup::ToHtml::LIST_TYPE_TO_HTML].
+# - Attribute: <tt>baz[rdoc-ref:RDoc::Markup::ToHtml#code_object]</tt>
+# links to baz[rdoc-ref:RDoc::Markup::ToHtml#code_object].
+# - Alias: <tt>bad[rdoc-ref:RDoc::MarkupReference#dummy_instance_alias]</tt> links to
+# bad[rdoc-ref:RDoc::MarkupReference#dummy_instance_alias].
+#
+# If the referenced item does not exist, no link is generated
+# and entire <tt>rdoc-ref:</tt> square-bracketed clause is removed
+# from the resulting text.
+#
+# - <tt>Nosuch[rdoc-ref:RDoc::Nosuch]</tt> is rendered as
+# Nosuch[rdoc-ref:RDoc::Nosuch].
+#
+#
+# [<tt>rdoc-label</tt> Scheme]
+#
+# [Simple]
+#
+# You can specify a link target using this form,
+# where the second part cites the id of an HTML element.
+#
+# This link refers to the constant +DUMMY_CONSTANT+ on this page:
+#
+# - <tt>{DUMMY_CONSTANT}[rdoc-label:DUMMY_CONSTANT]</tt>
+#
+# Thus:
+#
+# {DUMMY_CONSTANT}[rdoc-label:DUMMY_CONSTANT]
+#
+# [With Return]
+#
+# You can specify both a link target and a local label
+# that can be used as the target for a return link.
+# These two links refer to each other:
+#
+# - <tt>{go to addressee}[rdoc-label:addressee:sender]</tt>
+# - <tt>{return to sender}[rdoc-label:sender:addressee]</tt>
+#
+# Thus:
+#
+# {go to addressee}[rdoc-label:addressee:sender]
+#
+# Some text.
+#
+# {return to sender}[rdoc-label:sender:addressee]
+#
+# [<tt>link:</tt> Scheme]
+#
+# - <tt>link:README_rdoc.html</tt> links to link:README_rdoc.html.
+#
+# [<tt>rdoc-image</tt> Scheme]
+#
+# Use the <tt>rdoc-image</tt> scheme to display an image that is also a link:
+#
+# # {rdoc-image:path/to/image}[link_target]
+#
+# - Link: <tt>{rdoc-image:https://www.ruby-lang.org/images/header-ruby-logo@2x.png}[https://www.ruby-lang.org]</tt>
+# displays image <tt>https://www.ruby-lang.org/images/header-ruby-logo@2x.png</tt>
+# as a link to <tt>https://www.ruby-lang.org</tt>.
+#
+# {rdoc-image:https://www.ruby-lang.org/images/header-ruby-logo@2x.png}[https://www.ruby-lang.org]
+#
+# A relative path as the target also works:
+#
+# - Link: <tt>{rdoc-image:https://www.ruby-lang.org/images/header-ruby-logo@2x.png}[./Alias.html]</tt> links to <tt>./Alias.html</tt>
+#
+# {rdoc-image:https://www.ruby-lang.org/images/header-ruby-logo@2x.png}[./Alias.html]
+#
+# === Escaping Text
+#
+# Text that would otherwise be interpreted as markup
+# can be "escaped," so that it is not interpreted as markup;
+# the escape character is the backslash (<tt>'\\'</tt>).
+#
+# In a verbatim text block or a code block,
+# the escape character is always preserved:
+#
+# Example input:
+#
+# This is not verbatim text.
+#
+# This is verbatim text, with an escape character \.
+#
+# This is not a code block.
+#
+# def foo
+# 'String with an escape character.'
+# end
+#
+# Rendered HTML:
+#
+# >>>
+# This is not verbatim text.
+#
+# This is verbatim text, with an escape character \.
+#
+# This is not a code block.
+#
+# def foo
+# 'This is a code block with an escape character \.'
+# end
+#
+# In typeface markup (italic, bold, or monofont),
+# an escape character is preserved unless it is immediately
+# followed by nested typeface markup.
+#
+# Example input:
+#
+# This list is about escapes; it contains:
+#
+# - <tt>Monofont text with unescaped nested _italic_</tt>.
+# - <tt>Monofont text with escaped nested \_italic_</tt>.
+# - <tt>Monofont text with an escape character \</tt>.
+#
+# Rendered HTML:
+#
+# >>>
+# This list is about escapes; it contains:
+#
+# - <tt>Monofont text with unescaped nested _italic_</tt>.
+# - <tt>Monofont text with escaped nested \_italic_</tt>.
+# - <tt>Monofont text with an escape character \ </tt>.
+#
+# In other text-bearing blocks
+# (paragraphs, block quotes, list items, headings):
+#
+# - A single escape character immediately followed by markup
+# escapes the markup.
+# - A single escape character followed by whitespace is preserved.
+# - A single escape character anywhere else is ignored.
+# - A double escape character is rendered as a single backslash.
+#
+# Example input:
+#
+# This list is about escapes; it contains:
+#
+# - An unescaped class name, RDoc, that will become a link.
+# - An escaped class name, \RDoc, that will not become a link.
+# - An escape character followed by whitespace \ .
+# - An escape character \that is ignored.
+# - A double escape character \\ that is rendered
+# as a single backslash.
+#
+# Rendered HTML:
+#
+# >>>
+# This list is about escapes; it contains:
+#
+# - An unescaped class name, RDoc, that will become a link.
+# - An escaped class name, \RDoc, that will not become a link.
+# - An escape character followed by whitespace \ .
+# - An escape character \that is ignored.
+# - A double escape character \\ that is rendered
+# as a single backslash.
+#
+# == Documentation Derived from Ruby Code
+#
+# [Class]
+#
+# By default, \RDoc documents:
+#
+# - \Class name.
+# - Parent class.
+# - Singleton methods.
+# - Instance methods.
+# - Aliases.
+# - Constants.
+# - Attributes.
+#
+# [Module]
+#
+# By default, \RDoc documents:
+#
+# - \Module name.
+# - \Singleton methods.
+# - Instance methods.
+# - Aliases.
+# - Constants.
+# - Attributes.
+#
+# [Method]
+#
+# By default, \RDoc documents:
+#
+# - \Method name.
+# - Arguments.
+# - Yielded values.
+#
+# See #method.
+#
+# [Alias]
+#
+# By default, \RDoc documents:
+#
+# - Alias name.
+# - Aliased name.
+#
+# See #dummy_instance_alias and #dummy_instance_method.
+#
+# [Constant]
+#
+# By default, \RDoc documents:
+#
+# - \Constant name.
+#
+# See DUMMY_CONSTANT.
+#
+# [Attribute]
+#
+# By default, \RDoc documents:
+#
+# - Attribute name.
+# - Attribute type (<tt>[R]</tt>, <tt>[W]</tt>, or <tt>[RW]</tt>)
+#
+# See #dummy_attribute.
+#
+class RDoc::MarkupReference
+
+ class DummyClass; end
+ module DummyModule; end
+ def self.dummy_singleton_method(foo, bar); end
+ def dummy_instance_method(foo, bar); end;
+ alias dummy_instance_alias dummy_instance_method
+ attr_accessor :dummy_attribute
+ alias dummy_attribute_alias dummy_attribute
+ DUMMY_CONSTANT = ''
+
+ # :call-seq:
+ # call_seq_directive(foo, bar)
+ # Can be anything -> bar
+ # Also anything more -> baz or bat
+ #
+ # The <tt>:call-seq:</tt> directive overrides the actual calling sequence
+ # found in the Ruby code.
+ #
+ # - It can specify anything at all.
+ # - It can have multiple calling sequences.
+ #
+ # This one includes <tt>Can be anything -> foo</tt>, which is nonsense.
+ #
+ # Note that the "arrow" is two characters, hyphen and right angle-bracket,
+ # which is made into a single character in the HTML.
+ #
+ # Click on the calling sequence to see the code.
+ #
+ # Here is the <tt>:call-seq:</tt> directive given for the method:
+ #
+ # :call-seq:
+ # call_seq_directive(foo, bar)
+ # Can be anything -> bar
+ # Also anything more -> baz or bat
+ #
+ def call_seq_directive
+ nil
+ end
+
+ # The <tt>:args:</tt> directive overrides the actual arguments found in the Ruby code.
+ #
+ # Click on the calling sequence to see the code.
+ #
+ def args_directive(foo, bar) # :args: baz
+ nil
+ end
+
+ # The <tt>:yields:</tt> directive overrides the actual yield found in the Ruby code.
+ #
+ # Click on the calling sequence to see the code.
+ #
+ def yields_directive(foo, bar) # :yields: 'bat'
+ yield 'baz'
+ end
+
+ # This method is documented only by \RDoc, except for these comments.
+ #
+ # Click on the calling sequence to see the code.
+ #
+ def method(foo, bar)
+ yield 'baz'
+ end
+
+end
diff --git a/doc/regexp.rdoc b/doc/regexp.rdoc
index ccf82538b7..92c7ecf66e 100644
--- a/doc/regexp.rdoc
+++ b/doc/regexp.rdoc
@@ -27,12 +27,22 @@ Here 'haystack' contains the pattern 'hay', so it matches:
Specifically, <tt>/st/</tt> requires that the string contains the letter
_s_ followed by the letter _t_, so it matches _haystack_, also.
+Note that any Regexp matching will raise a RuntimeError if timeout is set and
+exceeded. See {"Timeout"}[#label-Timeout] section in detail.
+
+== \Regexp Interpolation
+
+A regexp may contain interpolated strings; trivially:
+
+ foo = 'bar'
+ /#{foo}/ # => /bar/
+
== <tt>=~</tt> and Regexp#match
Pattern matching may be achieved by using <tt>=~</tt> operator or Regexp#match
method.
-=== <tt>=~</tt> operator
+=== <tt>=~</tt> Operator
<tt>=~</tt> is Ruby's basic pattern-matching operator. When one operand is a
regular expression and the other is a string then the regular expression is
@@ -51,7 +61,7 @@ Using <tt>=~</tt> operator with a String and Regexp the <tt>$~</tt> global
variable is set after a successful match. <tt>$~</tt> holds a MatchData
object. Regexp.last_match is equivalent to <tt>$~</tt>.
-=== Regexp#match method
+=== Regexp#match Method
The #match method returns a MatchData object:
@@ -68,9 +78,9 @@ a backslash literally, backslash-escape it: <tt>\\\\</tt>.
/1 \+ 2 = 3\?/.match('Does 1 + 2 = 3?') #=> #<MatchData "1 + 2 = 3?">
/a\\\\b/.match('a\\\\b') #=> #<MatchData "a\\b">
-Patterns behave like double-quoted strings so can contain the same
-backslash escapes (the meaning of <tt>\s</tt> is different a little however,
-see bellow[#label-Character+Classes]).
+Patterns behave like double-quoted strings and can contain the same
+backslash escapes (the meaning of <tt>\s</tt> is different, however,
+see below[#label-Character+Classes]).
/\s\u{6771 4eac 90fd}/.match("Go to æ±äº¬éƒ½")
#=> #<MatchData " æ±äº¬éƒ½">
@@ -190,6 +200,8 @@ At least one uppercase character ('H'), at least one lowercase character
"Hello".match(/[[:upper:]]+[[:lower:]]+l{2}o/) #=> #<MatchData "Hello">
+=== Greedy Match
+
Repetition is <i>greedy</i> by default: as many occurrences as possible
are matched while still allowing the overall match to succeed. By
contrast, <i>lazy</i> matching makes the minimal amount of matches
@@ -206,21 +218,27 @@ Both patterns below match the string. The first uses a greedy quantifier so
/<.+>/.match("<a><b>") #=> #<MatchData "<a><b>">
/<.+?>/.match("<a><b>") #=> #<MatchData "<a>">
+=== Possessive Match
+
A quantifier followed by <tt>+</tt> matches <i>possessively</i>: once it
has matched it does not backtrack. They behave like greedy quantifiers,
but having matched they refuse to "give up" their match even if this
jeopardises the overall match.
+ /<.*><.+>/.match("<a><b>") #=> #<MatchData "<a><b>">
+ /<.*+><.+>/.match("<a><b>") #=> nil
+ /<.*><.++>/.match("<a><b>") #=> nil
+
== Capturing
Parentheses can be used for <i>capturing</i>. The text enclosed by the
-<i>n</i><sup>th</sup> group of parentheses can be subsequently referred to
+<i>n</i>th group of parentheses can be subsequently referred to
with <i>n</i>. Within a pattern use the <i>backreference</i>
-<tt>\n</tt>; outside of the pattern use
-<tt>MatchData[</tt><i>n</i><tt>]</tt>.
+<tt>\n</tt> (e.g. <tt>\1</tt>); outside of the pattern use
+<tt>MatchData[n]</tt> (e.g. <tt>MatchData[1]</tt>).
-'at' is captured by the first group of parentheses, then referred to later
-with <tt>\1</tt>:
+In this example, <tt>'at'</tt> is captured by the first group of
+parentheses, then referred to later with <tt>\1</tt>:
/[csh](..) [csh]\1 in/.match("The cat sat in the hat")
#=> #<MatchData "cat sat in" 1:"at">
@@ -230,6 +248,23 @@ available with its #[] method:
/[csh](..) [csh]\1 in/.match("The cat sat in the hat")[1] #=> 'at'
+While Ruby supports an arbitrary number of numbered captured groups,
+only groups 1-9 are supported using the <tt>\n</tt> backreference
+syntax.
+
+Ruby also supports <tt>\0</tt> as a special backreference, which
+references the entire matched string. This is also available at
+<tt>MatchData[0]</tt>. Note that the <tt>\0</tt> backreference cannot
+be used inside the regexp, as backreferences can only be used after the
+end of the capture group, and the <tt>\0</tt> backreference uses the
+implicit capture group of the entire match. However, you can use
+this backreference when doing substitution:
+
+ "The cat sat in the hat".gsub(/[csh]at/, '\0s')
+ # => "The cats sats in the hats"
+
+=== Named Captures
+
Capture groups can be referred to by name when defined with the
<tt>(?<</tt><i>name</i><tt>>)</tt> or <tt>(?'</tt><i>name</i><tt>')</tt>
constructs.
@@ -362,8 +397,8 @@ then matches a literal <i>)</i>:
== Alternation
-The vertical bar metacharacter (<tt>|</tt>) combines two expressions into
-a single one that matches either of the expressions. Each expression is an
+The vertical bar metacharacter (<tt>|</tt>) combines several expressions into
+a single one that matches any of the expressions. Each expression is an
<i>alternative</i>.
/\w(and|or)\w/.match("Feliformia") #=> #<MatchData "form" 1:"or">
@@ -380,6 +415,7 @@ much like POSIX bracket classes.
* <tt>/\p{Blank}/</tt> - Space or tab
* <tt>/\p{Cntrl}/</tt> - Control character
* <tt>/\p{Digit}/</tt> - Digit
+* <tt>/\p{Emoji}/</tt> - Unicode emoji
* <tt>/\p{Graph}/</tt> - Non-blank character (excludes spaces, control
characters, and similar)
* <tt>/\p{Lower}/</tt> - Lowercase alphabetical character
@@ -515,6 +551,21 @@ characters, <i>anchoring</i> the match to a specific position.
assertion: ensures that the preceding characters do not match
<i>pat</i>, but doesn't include those characters in the matched text
+* <tt>\K</tt> - <i>Match reset</i>: the matched content preceding
+ <tt>\K</tt> in the regexp is excluded from the result. For example,
+ the following two regexps are almost equivalent:
+
+ /ab\Kc/ =~ "abc" #=> 0
+ /(?<=ab)c/ =~ "abc" #=> 2
+
+ These match same string and <i>$&</i> equals <tt>"c"</tt>, while the
+ matched position is different.
+
+ As are the following two regexps:
+
+ /(a)\K(b)\Kc/
+ /(?<=(?<=(a))(b))c/
+
If a pattern isn't anchored it can begin at any point in the string:
/real/.match("surrealist") #=> #<MatchData "real">
@@ -573,6 +624,11 @@ Options may also be used with <tt>Regexp.new</tt>:
Regexp.new("abc # Comment", Regexp::EXTENDED) #=> /abc # Comment/x
Regexp.new("abc", Regexp::IGNORECASE | Regexp::MULTILINE) #=> /abc/mi
+ Regexp.new("abc", "i") #=> /abc/i
+ Regexp.new("abc", "m") #=> /abc/m
+ Regexp.new("abc # Comment", "x") #=> /abc # Comment/x
+ Regexp.new("abc", "im") #=> /abc/mi
+
== Free-Spacing Mode and Comments
As mentioned above, the <tt>x</tt> option enables <i>free-spacing</i>
@@ -632,9 +688,10 @@ regexp's encoding can be explicitly fixed by supplying
# raises Encoding::CompatibilityError: incompatible encoding regexp match
# (ISO-8859-1 regexp with UTF-8 string)
-== Special global variables
+== \Regexp Global Variables
Pattern matching sets some global variables :
+
* <tt>$~</tt> is equivalent to Regexp.last_match;
* <tt>$&</tt> contains the complete matched text;
* <tt>$`</tt> contains string before match;
@@ -722,3 +779,23 @@ with <i>a{0,29}</i>:
Regexp.new('a{0,29}' + 'a' * 29) =~ 'a' * 29
+== Timeout
+
+There are two APIs to set timeout. One is Regexp.timeout=, which is
+process-global configuration of timeout for Regexp matching.
+
+ Regexp.timeout = 3
+ s = 'a' * 25 + 'd' + 'a' * 4 + 'c'
+ /(b|a+)*c/ =~ s #=> This raises an exception in three seconds
+
+The other is timeout keyword of Regexp.new.
+
+ re = Regexp.new("(b|a+)*c", timeout: 3)
+ s = 'a' * 25 + 'd' + 'a' * 4 + 'c'
+ /(b|a+)*c/ =~ s #=> This raises an exception in three seconds
+
+When using Regexps to process untrusted input, you should use the timeout
+feature to avoid excessive backtracking. Otherwise, a malicious user can
+provide input to Regexp causing Denial-of-Service attack.
+Note that the timeout is not set by default because an appropriate limit
+highly depends on an application requirement and context.
diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc
index f71cedebf7..7c9938c5b0 100644
--- a/doc/standard_library.rdoc
+++ b/doc/standard_library.rdoc
@@ -8,105 +8,93 @@ description.
== Libraries
-Abbrev:: Calculates a set of unique abbreviations for a given set of strings
-Base64:: Support for encoding and decoding binary data using a Base64 representation
-DEBUGGER__:: Debugging functionality for Ruby
-DRb:: Distributed object system for Ruby
-English.rb:: Require 'English.rb' to reference global variables with less cryptic names
-ERB:: An easy to use but powerful templating system for Ruby
-Find:: This module supports top-down traversal of a set of file paths
MakeMakefile:: Module used to generate a Makefile for C extensions
-Monitor:: Provides an object or module to use safely by more than one thread
-Net::FTP:: Support for the File Transfer Protocol
-Net::HTTP:: HTTP client api for Ruby
-Net::IMAP:: Ruby client api for Internet Message Access Protocol
-OpenURI:: An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP
-OptionParser:: Ruby-oriented class for command-line option analysis
-PP:: Provides a PrettyPrinter for Ruby objects
-PrettyPrinter:: Implements a pretty printing algorithm for readable structure
RbConfig:: Information of your configure and build of Ruby
-resolv-replace.rb:: Replace Socket DNS with Resolv
-Resolv:: Thread-aware DNS resolver library in Ruby
-Rinda:: The Linda distributed computing paradigm in Ruby
Gem:: Package management framework for Ruby
-SecureRandom:: Interface for secure random number generator
-Set:: Provides a class to deal with collections of unordered, unique values
-Shellwords:: Manipulates strings with word parsing rules of UNIX Bourne shell
-Tempfile:: A utility class for managing temporary files
-Time:: Extends the Time class with methods for parsing and conversion
-tmpdir.rb:: Extends the Dir class to manage the OS temporary file path
-TSort:: Topological sorting using Tarjan's algorithm
-un.rb:: Utilities to replace common UNIX commands
-WeakRef:: Allows a referenced object to be garbage-collected
== Extensions
Coverage:: Provides coverage measurement for Ruby
-Digest:: Provides a framework for message digest libraries
-IO:: Extensions for Ruby IO class, including #wait and ::console
-NKF:: Ruby extension for Network Kanji Filter
+Monitor:: Provides an object or module to use safely by more than one thread
objspace:: Extends ObjectSpace module to add methods for internal statistics
-Pathname:: Representation of the name of a file or directory on the filesystem
PTY:: Creates and manages pseudo terminals
Ripper:: Provides an interface for parsing Ruby programs into S-expressions
Socket:: Access underlying OS socket implementations
-Syslog:: Ruby interface for the POSIX system logging facility
-WIN32OLE:: Provides an interface for OLE Automation in Ruby
= Default gems
== Libraries
+Abbrev:: Calculates a set of unique abbreviations for a given set of strings
+Base64:: Support for encoding and decoding binary data using a Base64 representation
Benchmark:: Provides methods to measure and report the time used to execute code
Bundler:: Manage your Ruby application's gem dependencies
CGI:: Support for the Common Gateway Interface protocol
CSV:: Provides an interface to read and write CSV files and data
Delegator:: Provides three abilities to delegate method calls to an object
DidYouMean:: "Did you mean?" experience in Ruby
+DRb:: Distributed object system for Ruby
+English:: Provides references to special global variables with less cryptic names
+ERB:: An easy to use but powerful templating system for Ruby
+ErrorHighlight:: Highlight error location in your code
FileUtils:: Several file utility methods for copying, moving, removing, etc
+Find:: This module supports top-down traversal of a set of file paths
Forwardable:: Provides delegation of specified methods to a designated object
GetoptLong:: Parse command line options similar to the GNU C getopt_long()
IPAddr:: Provides methods to manipulate IPv4 and IPv6 IP addresses
IRB:: Interactive Ruby command-line tool for REPL (Read Eval Print Loop)
+OptionParser:: Ruby-oriented class for command-line option analysis
Logger:: Provides a simple logging utility for outputting messages
-Matrix:: Represents a mathematical matrix.
Mutex_m:: Mixin to extend objects to be handled like a Mutex
-Net::POP3:: Ruby client library for POP3
-Net::SMTP:: Simple Mail Transfer Protocol client library for Ruby
+Net::HTTP:: HTTP client api for Ruby
Observable:: Provides a mechanism for publish/subscribe pattern in Ruby
Open3:: Provides access to stdin, stdout and stderr when running other programs
OpenStruct:: Class to build custom data structures, similar to a Hash
-Prime:: Prime numbers and factorization library
+OpenURI:: An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP
+PP:: Provides a PrettyPrinter for Ruby objects
+PrettyPrinter:: Implements a pretty printing algorithm for readable structure
PStore:: Implements a file based persistence mechanism based on a Hash
-Racc:: A LALR(1) parser generator written in Ruby.
+Readline:: Wrapper for Readline extencion and Reline
+Reline:: GNU Readline and Editline by pure Ruby implementation.
+Resolv:: Thread-aware DNS resolver library in Ruby
+resolv-replace.rb:: Replace Socket DNS with Resolv
RDoc:: Produces HTML and command-line documentation for Ruby
-REXML:: An XML toolkit for Ruby
-RSS:: Family of libraries that support various formats of XML "feeds"
+Rinda:: The Linda distributed computing paradigm in Ruby
+SecureRandom:: Interface for secure random number generator
+Set:: Provides a class to deal with collections of unordered, unique values
+Shellwords:: Manipulates strings with word parsing rules of UNIX Bourne shell
Singleton:: Implementation of the Singleton pattern for Ruby
+Tempfile:: A utility class for managing temporary files
+Time:: Extends the Time class with methods for parsing and conversion
Timeout:: Auto-terminate potentially long-running operations in Ruby
-Tracer:: Outputs a source level execution trace of a Ruby program
+tmpdir.rb:: Extends the Dir class to manage the OS temporary file path
+TSort:: Topological sorting using Tarjan's algorithm
+un.rb:: Utilities to replace common UNIX commands
URI:: A Ruby module providing support for Uniform Resource Identifiers
-WEBrick:: An HTTP server toolkit for Ruby
YAML:: Ruby client library for the Psych YAML implementation
+WeakRef:: Allows a referenced object to be garbage-collected
== Extensions
BigDecimal:: Provides arbitrary-precision floating point decimal arithmetic
Date:: A subclass of Object includes Comparable module for handling dates
DateTime:: Subclass of Date to handling dates, hours, minutes, seconds, offsets
-DBM:: Provides a wrapper for the UNIX-style Database Manager Library
+Digest:: Provides a framework for message digest libraries
Etc:: Provides access to information typically stored in UNIX /etc directory
Fcntl:: Loads constants defined in the OS fcntl.h C header file
Fiddle:: A libffi wrapper for Ruby
-GDBM:: Ruby extension for the GNU dbm (gdbm) library
-IO::console:: Console interface
+IO:: Extensions for Ruby IO class, including #wait, #nonblock and ::console
JSON:: Implements Javascript Object Notation for Ruby
+NKF:: Ruby extension for Network Kanji Filter
OpenSSL:: Provides SSL, TLS and general purpose cryptography for Ruby
+Pathname:: Representation of the name of a file or directory on the filesystem
Psych:: A YAML parser and emitter for Ruby
+Racc:: A LALR(1) parser generator written in Ruby.
Readline:: Provides an interface for GNU Readline and Edit Line (libedit)
-SDBM:: Provides a simple file-based key-value store with String keys and values
StringIO:: Pseudo I/O on String objects
StringScanner:: Provides lexical scanning operations on a String
+Syslog:: Ruby interface for the POSIX system logging facility
+WIN32OLE:: Provides an interface for OLE Automation in Ruby
Zlib:: Ruby interface for the zlib compression/decompression library
= Bundled gems
@@ -114,8 +102,17 @@ Zlib:: Ruby interface for the zlib compression/decompression library
== Libraries
MiniTest:: A test suite with TDD, BDD, mocking and benchmarking
-Net::Telnet:: Telnet client library for Ruby
PowerAssert:: Power Assert for Ruby.
Rake:: Ruby build program with capabilities similar to make
Test::Unit:: A compatibility layer for MiniTest
-XMLRPC:: Remote Procedure Call over HTTP support for Ruby
+REXML:: An XML toolkit for Ruby
+RSS:: Family of libraries that support various formats of XML "feeds"
+Net::FTP:: Support for the File Transfer Protocol
+Net::IMAP:: Ruby client api for Internet Message Access Protocol
+Net::POP3:: Ruby client library for POP3
+Net::SMTP:: Simple Mail Transfer Protocol client library for Ruby
+Matrix:: Represents a mathematical matrix.
+Prime:: Prime numbers and factorization library
+RBS:: RBS is a language to describe the structure of Ruby programs
+TypeProf:: A type analysis tool for Ruby code based on abstract interpretation
+DEBUGGER__:: Debugging functionality for Ruby
diff --git a/doc/strftime_formatting.rdoc b/doc/strftime_formatting.rdoc
new file mode 100644
index 0000000000..30a629bf68
--- /dev/null
+++ b/doc/strftime_formatting.rdoc
@@ -0,0 +1,527 @@
+== Formats for Dates and Times
+
+Several Ruby time-related classes have instance method +strftime+,
+which returns a formatted string representing all or part of a date or time:
+
+- Date#strftime.
+- DateTime#strftime.
+- Time#strftime.
+
+Each of these methods takes optional argument +format+,
+which has zero or more embedded _format_ _specifications_ (see below).
+
+Each of these methods returns the string resulting from replacing each
+format specification embedded in +format+ with a string form
+of one or more parts of the date or time.
+
+A simple example:
+
+ Time.now.strftime('%H:%M:%S') # => "14:02:07"
+
+A format specification has the form:
+
+ %[flags][width]conversion
+
+It consists of:
+
+- A leading percent character.
+- Zero or more _flags_ (each is a character).
+- An optional _width_ _specifier_ (an integer).
+- A _conversion_ _specifier_ (a character).
+
+Except for the leading percent character,
+the only required part is the conversion specifier, so we begin with that.
+
+=== Conversion Specifiers
+
+==== \Date (Year, Month, Day)
+
+- <tt>%Y</tt> - Year including century, zero-padded:
+
+ Time.now.strftime('%Y') # => "2022"
+ Time.new(-1000).strftime('%Y') # => "-1000" # Before common era.
+ Time.new(10000).strftime('%Y') # => "10000" # Far future.
+ Time.new(10).strftime('%Y') # => "0010" # Zero-padded by default.
+
+- <tt>%y</tt> - Year without century, in range (0.99), zero-padded:
+
+ Time.now.strftime('%y') # => "22"
+ Time.new(1).strftime('%y') # => "01" # Zero-padded by default.
+
+- <tt>%C</tt> - Century, zero-padded:
+
+ Time.now.strftime('%C') # => "20"
+ Time.new(-1000).strftime('%C') # => "-10" # Before common era.
+ Time.new(10000).strftime('%C') # => "100" # Far future.
+ Time.new(100).strftime('%C') # => "01" # Zero-padded by default.
+
+- <tt>%m</tt> - Month of the year, in range (1..12), zero-padded:
+
+ Time.new(2022, 1).strftime('%m') # => "01" # Zero-padded by default.
+ Time.new(2022, 12).strftime('%m') # => "12"
+
+- <tt>%B</tt> - Full month name, capitalized:
+
+ Time.new(2022, 1).strftime('%B') # => "January"
+ Time.new(2022, 12).strftime('%B') # => "December"
+
+- <tt>%b</tt> - Abbreviated month name, capitalized:
+
+ Time.new(2022, 1).strftime('%b') # => "Jan"
+ Time.new(2022, 12).strftime('%h') # => "Dec"
+
+- <tt>%h</tt> - Same as <tt>%b</tt>.
+
+- <tt>%d</tt> - Day of the month, in range (1..31), zero-padded:
+
+ Time.new(2002, 1, 1).strftime('%d') # => "01"
+ Time.new(2002, 1, 31).strftime('%d') # => "31"
+
+- <tt>%e</tt> - Day of the month, in range (1..31), blank-padded:
+
+ Time.new(2002, 1, 1).strftime('%e') # => " 1"
+ Time.new(2002, 1, 31).strftime('%e') # => "31"
+
+- <tt>%j</tt> - Day of the year, in range (1..366), zero-padded:
+
+ Time.new(2002, 1, 1).strftime('%j') # => "001"
+ Time.new(2002, 12, 31).strftime('%j') # => "365"
+
+==== \Time (Hour, Minute, Second, Subsecond)
+
+- <tt>%H</tt> - Hour of the day, in range (0..23), zero-padded:
+
+ Time.new(2022, 1, 1, 1).strftime('%H') # => "01"
+ Time.new(2022, 1, 1, 13).strftime('%H') # => "13"
+
+- <tt>%k</tt> - Hour of the day, in range (0..23), blank-padded:
+
+ Time.new(2022, 1, 1, 1).strftime('%k') # => " 1"
+ Time.new(2022, 1, 1, 13).strftime('%k') # => "13"
+
+- <tt>%I</tt> - Hour of the day, in range (1..12), zero-padded:
+
+ Time.new(2022, 1, 1, 1).strftime('%I') # => "01"
+ Time.new(2022, 1, 1, 13).strftime('%I') # => "01"
+
+- <tt>%l</tt> - Hour of the day, in range (1..12), blank-padded:
+
+ Time.new(2022, 1, 1, 1).strftime('%l') # => " 1"
+ Time.new(2022, 1, 1, 13).strftime('%l') # => " 1"
+
+- <tt>%P</tt> - Meridian indicator, lowercase:
+
+ Time.new(2022, 1, 1, 1).strftime('%P') # => "am"
+ Time.new(2022, 1, 1, 13).strftime('%P') # => "pm"
+
+- <tt>%p</tt> - Meridian indicator, uppercase:
+
+ Time.new(2022, 1, 1, 1).strftime('%p') # => "AM"
+ Time.new(2022, 1, 1, 13).strftime('%p') # => "PM"
+
+- <tt>%M</tt> - Minute of the hour, in range (0..59), zero-padded:
+
+ Time.new(2022, 1, 1, 1, 0, 0).strftime('%M') # => "00"
+
+- <tt>%S</tt> - Second of the minute in range (0..59), zero-padded:
+
+ Time.new(2022, 1, 1, 1, 0, 0, 0).strftime('%S') # => "00"
+
+- <tt>%L</tt> - Millisecond of the second, in range (0..999), zero-padded:
+
+ Time.new(2022, 1, 1, 1, 0, 0, 0).strftime('%L') # => "000"
+
+- <tt>%N</tt> - Fractional seconds, default width is 9 digits (nanoseconds):
+
+ t = Time.now # => 2022-06-29 07:10:20.3230914 -0500
+ t.strftime('%N') # => "323091400" # Default.
+
+ Use {width specifiers}[rdoc-ref:strftime_formatting.rdoc@Width+Specifiers]
+ to adjust units:
+
+ t.strftime('%3N') # => "323" # Milliseconds.
+ t.strftime('%6N') # => "323091" # Microseconds.
+ t.strftime('%9N') # => "323091400" # Nanoseconds.
+ t.strftime('%12N') # => "323091400000" # Picoseconds.
+ t.strftime('%15N') # => "323091400000000" # Femptoseconds.
+ t.strftime('%18N') # => "323091400000000000" # Attoseconds.
+ t.strftime('%21N') # => "323091400000000000000" # Zeptoseconds.
+ t.strftime('%24N') # => "323091400000000000000000" # Yoctoseconds.
+
+- <tt>%s</tt> - Number of seconds since the epoch:
+
+ Time.now.strftime('%s') # => "1656505136"
+
+==== Timezone
+
+- <tt>%z</tt> - Timezone as hour and minute offset from UTC:
+
+ Time.now.strftime('%z') # => "-0500"
+
+- <tt>%Z</tt> - Timezone name (platform-dependent):
+
+ Time.now.strftime('%Z') # => "Central Daylight Time"
+
+==== Weekday
+
+- <tt>%A</tt> - Full weekday name:
+
+ Time.now.strftime('%A') # => "Wednesday"
+
+- <tt>%a</tt> - Abbreviated weekday name:
+
+ Time.now.strftime('%a') # => "Wed"
+
+- <tt>%u</tt> - Day of the week, in range (1..7), Monday is 1:
+
+ t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
+ t.strftime('%a') # => "Sun"
+ t.strftime('%u') # => "7"
+
+- <tt>%w</tt> - Day of the week, in range (0..6), Sunday is 0:
+
+ t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
+ t.strftime('%a') # => "Sun"
+ t.strftime('%w') # => "0"
+
+==== Week Number
+
+- <tt>%U</tt> - Week number of the year, in range (0..53), zero-padded,
+ where each week begins on a Sunday:
+
+ t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
+ t.strftime('%a') # => "Sun"
+ t.strftime('%U') # => "26"
+
+- <tt>%W</tt> - Week number of the year, in range (0..53), zero-padded,
+ where each week begins on a Monday:
+
+ t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
+ t.strftime('%a') # => "Sun"
+ t.strftime('%W') # => "25"
+
+==== Week Dates
+
+See {ISO 8601 week dates}[https://en.wikipedia.org/wiki/ISO_8601#Week_dates].
+
+ t0 = Time.new(2023, 1, 1) # => 2023-01-01 00:00:00 -0600
+ t1 = Time.new(2024, 1, 1) # => 2024-01-01 00:00:00 -0600
+
+- <tt>%G</tt> - Week-based year:
+
+ t0.strftime('%G') # => "2022"
+ t1.strftime('%G') # => "2024"
+
+- <tt>%g</tt> - Week-based year without century, in range (0..99), zero-padded:
+
+ t0.strftime('%g') # => "22"
+ t1.strftime('%g') # => "24"
+
+- <tt>%V</tt> - Week number of the week-based year, in range (1..53),
+ zero-padded:
+
+ t0.strftime('%V') # => "52"
+ t1.strftime('%V') # => "01"
+
+==== Literals
+
+- <tt>%n</tt> - Newline character "\n":
+
+ Time.now.strftime('%n') # => "\n"
+
+- <tt>%t</tt> - Tab character "\t":
+
+ Time.now.strftime('%t') # => "\t"
+
+- <tt>%%</tt> - Percent character '%':
+
+ Time.now.strftime('%%') # => "%"
+
+==== Shorthand Conversion Specifiers
+
+Each shorthand specifier here is shown with its corresponding
+longhand specifier.
+
+- <tt>%c</tt> - \Date and time:
+
+ Time.now.strftime('%c') # => "Wed Jun 29 08:01:41 2022"
+ Time.now.strftime('%a %b %e %T %Y') # => "Wed Jun 29 08:02:07 2022"
+
+- <tt>%D</tt> - \Date:
+
+ Time.now.strftime('%D') # => "06/29/22"
+ Time.now.strftime('%m/%d/%y') # => "06/29/22"
+
+- <tt>%F</tt> - ISO 8601 date:
+
+ Time.now.strftime('%F') # => "2022-06-29"
+ Time.now.strftime('%Y-%m-%d') # => "2022-06-29"
+
+- <tt>%v</tt> - VMS date:
+
+ Time.now.strftime('%v') # => "29-JUN-2022"
+ Time.now.strftime('%e-%^b-%4Y') # => "29-JUN-2022"
+
+- <tt>%x</tt> - Same as <tt>%D</tt>.
+
+- <tt>%X</tt> - Same as <tt>%T</tt>.
+
+- <tt>%r</tt> - 12-hour time:
+
+ Time.new(2022, 1, 1, 1).strftime('%r') # => "01:00:00 AM"
+ Time.new(2022, 1, 1, 1).strftime('%I:%M:%S %p') # => "01:00:00 AM"
+ Time.new(2022, 1, 1, 13).strftime('%r') # => "01:00:00 PM"
+ Time.new(2022, 1, 1, 13).strftime('%I:%M:%S %p') # => "01:00:00 PM"
+
+- <tt>%R</tt> - 24-hour time:
+
+ Time.new(2022, 1, 1, 1).strftime('%R') # => "01:00"
+ Time.new(2022, 1, 1, 1).strftime('%H:%M') # => "01:00"
+ Time.new(2022, 1, 1, 13).strftime('%R') # => "13:00"
+ Time.new(2022, 1, 1, 13).strftime('%H:%M') # => "13:00"
+
+- <tt>%T</tt> - 24-hour time:
+
+ Time.new(2022, 1, 1, 1).strftime('%T') # => "01:00:00"
+ Time.new(2022, 1, 1, 1).strftime('%H:%M:%S') # => "01:00:00"
+ Time.new(2022, 1, 1, 13).strftime('%T') # => "13:00:00"
+ Time.new(2022, 1, 1, 13).strftime('%H:%M:%S') # => "13:00:00"
+
+- <tt>%+</tt> (not supported in Time#strftime) - \Date and time:
+
+ DateTime.now.strftime('%+')
+ # => "Wed Jun 29 08:31:53 -05:00 2022"
+ DateTime.now.strftime('%a %b %e %H:%M:%S %Z %Y')
+ # => "Wed Jun 29 08:32:18 -05:00 2022"
+
+=== Flags
+
+Flags may affect certain formatting specifications.
+
+Multiple flags may be given with a single conversion specified;
+order does not matter.
+
+==== Padding Flags
+
+- <tt>0</tt> - Pad with zeroes:
+
+ Time.new(10).strftime('%0Y') # => "0010"
+
+- <tt>_</tt> - Pad with blanks:
+
+ Time.new(10).strftime('%_Y') # => " 10"
+
+- <tt>-</tt> - Don't pad:
+
+ Time.new(10).strftime('%-Y') # => "10"
+
+==== Casing Flags
+
+- <tt>^</tt> - Upcase result:
+
+ Time.new(2022, 1).strftime('%B') # => "January" # No casing flag.
+ Time.new(2022, 1).strftime('%^B') # => "JANUARY"
+
+- <tt>#</tt> - Swapcase result:
+
+ Time.now.strftime('%p') # => "AM"
+ Time.now.strftime('%^p') # => "AM"
+ Time.now.strftime('%#p') # => "am"
+
+==== Timezone Flags
+
+- <tt>:</tt> - Put timezone as colon-separated hours and minutes:
+
+ Time.now.strftime('%:z') # => "-05:00"
+
+- <tt>::</tt> - Put timezone as colon-separated hours, minutes, and seconds:
+
+ Time.now.strftime('%::z') # => "-05:00:00"
+
+=== Width Specifiers
+
+The integer width specifier gives a minimum width for the returned string:
+
+ Time.new(2002).strftime('%Y') # => "2002" # No width specifier.
+ Time.new(2002).strftime('%10Y') # => "0000002002"
+ Time.new(2002, 12).strftime('%B') # => "December" # No width specifier.
+ Time.new(2002, 12).strftime('%10B') # => " December"
+ Time.new(2002, 12).strftime('%3B') # => "December" # Ignored if too small.
+
+== Specialized Format Strings
+
+Here are a few specialized format strings,
+each based on an external standard.
+
+=== HTTP Format
+
+The HTTP date format is based on
+{RFC 2616}[https://datatracker.ietf.org/doc/html/rfc2616],
+and treats dates in the format <tt>'%a, %d %b %Y %T GMT'</tt>:
+
+ d = Date.new(2001, 2, 3) # => #<Date: 2001-02-03>
+ # Return HTTP-formatted string.
+ httpdate = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
+ # Return new date parsed from HTTP-formatted string.
+ Date.httpdate(httpdate) # => #<Date: 2001-02-03>
+ # Return hash parsed from HTTP-formatted string.
+ Date._httpdate(httpdate)
+ # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"GMT", :offset=>0}
+
+=== RFC 3339 Format
+
+The RFC 3339 date format is based on
+{RFC 3339}[https://datatracker.ietf.org/doc/html/rfc3339]:
+
+ d = Date.new(2001, 2, 3) # => #<Date: 2001-02-03>
+ # Return 3339-formatted string.
+ rfc3339 = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
+ # Return new date parsed from 3339-formatted string.
+ Date.rfc3339(rfc3339) # => #<Date: 2001-02-03>
+ # Return hash parsed from 3339-formatted string.
+ Date._rfc3339(rfc3339)
+ # => {:year=>2001, :mon=>2, :mday=>3, :hour=>0, :min=>0, :sec=>0, :zone=>"+00:00", :offset=>0}
+
+=== RFC 2822 Format
+
+The RFC 2822 date format is based on
+{RFC 2822}[https://datatracker.ietf.org/doc/html/rfc2822],
+and treats dates in the format <tt>'%a, %-d %b %Y %T %z'</tt>]:
+
+ d = Date.new(2001, 2, 3) # => #<Date: 2001-02-03>
+ # Return 2822-formatted string.
+ rfc2822 = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
+ # Return new date parsed from 2822-formatted string.
+ Date.rfc2822(rfc2822) # => #<Date: 2001-02-03>
+ # Return hash parsed from 2822-formatted string.
+ Date._rfc2822(rfc2822)
+ # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"+0000", :offset=>0}
+
+=== JIS X 0301 Format
+
+The JIS X 0301 format includes the
+{Japanese era name}[https://en.wikipedia.org/wiki/Japanese_era_name],
+and treats dates in the format <tt>'%Y-%m-%d'</tt>
+with the first letter of the romanized era name prefixed:
+
+ d = Date.new(2001, 2, 3) # => #<Date: 2001-02-03>
+ # Return 0301-formatted string.
+ jisx0301 = d.jisx0301 # => "H13.02.03"
+ # Return new date parsed from 0301-formatted string.
+ Date.jisx0301(jisx0301) # => #<Date: 2001-02-03>
+ # Return hash parsed from 0301-formatted string.
+ Date._jisx0301(jisx0301) # => {:year=>2001, :mon=>2, :mday=>3}
+
+=== ISO 8601 Format Specifications
+
+This section shows format specifications that are compatible with
+{ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601].
+Details for various formats may be seen at the links.
+
+Examples in this section assume:
+
+ t = Time.now # => 2022-06-29 16:49:25.465246 -0500
+
+==== Dates
+
+See {ISO 8601 dates}[https://en.wikipedia.org/wiki/ISO_8601#Dates].
+
+- {Years}[https://en.wikipedia.org/wiki/ISO_8601#Years]:
+
+ - Basic year (+YYYY+):
+
+ t.strftime('%Y') # => "2022"
+
+ - Expanded year (<tt>±YYYYY</tt>):
+
+ t.strftime('+%5Y') # => "+02022"
+ t.strftime('-%5Y') # => "-02022"
+
+- {Calendar dates}[https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates]:
+
+ - Basic date (+YYYYMMDD+):
+
+ t.strftime('%Y%m%d') # => "20220629"
+
+ - Extended date (<tt>YYYY-MM-DD</tt>):
+
+ t.strftime('%Y-%m-%d') # => "2022-06-29"
+
+ - Reduced extended date (<tt>YYYY-MM</tt>):
+
+ t.strftime('%Y-%m') # => "2022-06"
+
+- {Week dates}[https://en.wikipedia.org/wiki/ISO_8601#Week_dates]:
+
+ - Basic date (+YYYYWww+ or +YYYYWwwD+):
+
+ t.strftime('%Y%Ww') # => "202226w"
+ t.strftime('%Y%Ww%u') # => "202226w3"
+
+ - Extended date (<tt>YYYY-Www</tt> or <tt>YYYY-Www-D<tt>):
+
+ t.strftime('%Y-%Ww') # => "2022-26w"
+ t.strftime('%Y-%Ww-%u') # => "2022-26w-3"
+
+- {Ordinal dates}[https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates]:
+
+ - Basic date (+YYYYDDD+):
+
+ t.strftime('%Y%j') # => "2022180"
+
+ - Extended date (<tt>YYYY-DDD</tt>):
+
+ t.strftime('%Y-%j') # => "2022-180"
+
+==== Times
+
+See {ISO 8601 times}[https://en.wikipedia.org/wiki/ISO_8601#Times].
+
+- Times:
+
+ - Basic time (+Thhmmss.sss+, +Thhmmss+, +Thhmm+, or +Thh+):
+
+ t.strftime('T%H%M%S.%L') # => "T164925.465"
+ t.strftime('T%H%M%S') # => "T164925"
+ t.strftime('T%H%M') # => "T1649"
+ t.strftime('T%H') # => "T16"
+
+ - Extended time (+Thh:mm:ss.sss+, +Thh:mm:ss+, or +Thh:mm+):
+
+ t.strftime('T%H:%M:%S.%L') # => "T16:49:25.465"
+ t.strftime('T%H:%M:%S') # => "T16:49:25"
+ t.strftime('T%H:%M') # => "T16:49"
+
+- {Time zone designators}[https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators]:
+
+ - Timezone (+time+ represents a valid time,
+ +hh+ represents a valid 2-digit hour,
+ and +mm+ represents a valid 2-digit minute):
+
+ - Basic timezone (<tt>time±hhmm</tt>, <tt>time±hh</tt>, or +timeZ+):
+
+ t.strftime('T%H%M%S%z') # => "T164925-0500"
+ t.strftime('T%H%M%S%z').slice(0..-3) # => "T164925-05"
+ t.strftime('T%H%M%SZ') # => "T164925Z"
+
+ - Extended timezone (<tt>time±hh:mm</tt>):
+
+ t.strftime('T%H:%M:%S%z') # => "T16:49:25-0500"
+
+ - See also:
+
+ - {Local time (unqualified)}[https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified)].
+ - {Coordinated Universal Time (UTC)}[https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)].
+ - {Time offsets from UTC}[https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC].
+
+==== Combined \Date and \Time
+
+See {ISO 8601 Combined date and time representations}[https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations].
+
+An ISO 8601 combined date and time representation may be any
+ISO 8601 date and any ISO 8601 time,
+separated by the letter +T+.
+
+For the relevant +strftime+ formats, see
+{Dates}[rdoc-ref:strftime_formatting.rdoc@Dates]
+and {Times}[rdoc-ref:strftime_formatting.rdoc@Times] above.
diff --git a/doc/string/b.rdoc b/doc/string/b.rdoc
new file mode 100644
index 0000000000..f8ad2910b4
--- /dev/null
+++ b/doc/string/b.rdoc
@@ -0,0 +1,14 @@
+Returns a copy of +self+ that has ASCII-8BIT encoding;
+the underlying bytes are not modified:
+
+ s = "\x99"
+ s.encoding # => #<Encoding:UTF-8>
+ t = s.b # => "\x99"
+ t.encoding # => #<Encoding:ASCII-8BIT>
+
+ s = "\u4095" # => "ä‚•"
+ s.encoding # => #<Encoding:UTF-8>
+ s.bytes # => [228, 130, 149]
+ t = s.b # => "\xE4\x82\x95"
+ t.encoding # => #<Encoding:ASCII-8BIT>
+ t.bytes # => [228, 130, 149]
diff --git a/doc/string/bytes.rdoc b/doc/string/bytes.rdoc
new file mode 100644
index 0000000000..a9e89f1cd1
--- /dev/null
+++ b/doc/string/bytes.rdoc
@@ -0,0 +1,6 @@
+Returns an array of the bytes in +self+:
+
+ 'hello'.bytes # => [104, 101, 108, 108, 111]
+ 'теÑÑ‚'.bytes # => [209, 130, 208, 181, 209, 129, 209, 130]
+ 'ã“ã‚“ã«ã¡ã¯'.bytes
+ # => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
diff --git a/doc/string/bytesize.rdoc b/doc/string/bytesize.rdoc
new file mode 100644
index 0000000000..b0567ff67b
--- /dev/null
+++ b/doc/string/bytesize.rdoc
@@ -0,0 +1,11 @@
+Returns the count of bytes (not characters) in +self+:
+
+ 'foo'.bytesize # => 3
+ 'теÑÑ‚'.bytesize # => 8
+ 'ã“ã‚“ã«ã¡ã¯'.bytesize # => 15
+
+Contrast with String#length:
+
+ 'foo'.length # => 3
+ 'теÑÑ‚'.length # => 4
+ 'ã“ã‚“ã«ã¡ã¯'.length # => 5
diff --git a/doc/string/center.rdoc b/doc/string/center.rdoc
new file mode 100644
index 0000000000..d53d921ad5
--- /dev/null
+++ b/doc/string/center.rdoc
@@ -0,0 +1,16 @@
+Returns a centered copy of +self+.
+
+If integer argument +size+ is greater than the size (in characters) of +self+,
+returns a new string of length +size+ that is a copy of +self+,
+centered and padded on both ends with +pad_string+:
+
+ 'hello'.center(10) # => " hello "
+ ' hello'.center(10) # => " hello "
+ 'hello'.center(10, 'ab') # => "abhelloaba"
+ 'теÑÑ‚'.center(10) # => " теÑÑ‚ "
+ 'ã“ã‚“ã«ã¡ã¯'.center(10) # => " ã“ã‚“ã«ã¡ã¯ "
+
+If +size+ is not greater than the size of +self+, returns a copy of +self+:
+
+ 'hello'.center(5) # => "hello"
+ 'hello'.center(1) # => "hello"
diff --git a/doc/string/chars.rdoc b/doc/string/chars.rdoc
new file mode 100644
index 0000000000..d24a1cc3a9
--- /dev/null
+++ b/doc/string/chars.rdoc
@@ -0,0 +1,5 @@
+Returns an array of the characters in +self+:
+
+ 'hello'.chars # => ["h", "e", "l", "l", "o"]
+ 'теÑÑ‚'.chars # => ["Ñ‚", "е", "Ñ", "Ñ‚"]
+ 'ã“ã‚“ã«ã¡ã¯'.chars # => ["ã“", "ã‚“", "ã«", "ã¡", "ã¯"]
diff --git a/doc/string/chomp.rdoc b/doc/string/chomp.rdoc
new file mode 100644
index 0000000000..b6fb9ff38c
--- /dev/null
+++ b/doc/string/chomp.rdoc
@@ -0,0 +1,29 @@
+Returns a new string copied from +self+, with trailing characters possibly removed:
+
+When +line_sep+ is <tt>"\n"</tt>, removes the last one or two characters
+if they are <tt>"\r"</tt>, <tt>"\n"</tt>, or <tt>"\r\n"</tt>
+(but not <tt>"\n\r"</tt>):
+
+ $/ # => "\n"
+ "abc\r".chomp # => "abc"
+ "abc\n".chomp # => "abc"
+ "abc\r\n".chomp # => "abc"
+ "abc\n\r".chomp # => "abc\n"
+ "теÑÑ‚\r\n".chomp # => "теÑÑ‚"
+ "ã“ã‚“ã«ã¡ã¯\r\n".chomp # => "ã“ã‚“ã«ã¡ã¯"
+
+When +line_sep+ is <tt>''</tt> (an empty string),
+removes multiple trailing occurrences of <tt>"\n"</tt> or <tt>"\r\n"</tt>
+(but not <tt>"\r"</tt> or <tt>"\n\r"</tt>):
+
+ "abc\n\n\n".chomp('') # => "abc"
+ "abc\r\n\r\n\r\n".chomp('') # => "abc"
+ "abc\n\n\r\n\r\n\n\n".chomp('') # => "abc"
+ "abc\n\r\n\r\n\r".chomp('') # => "abc\n\r\n\r\n\r"
+ "abc\r\r\r".chomp('') # => "abc\r\r\r"
+
+When +line_sep+ is neither <tt>"\n"</tt> nor <tt>''</tt>,
+removes a single trailing line separator if there is one:
+
+ 'abcd'.chomp('d') # => "abc"
+ 'abcdd'.chomp('d') # => "abcd"
diff --git a/doc/string/chop.rdoc b/doc/string/chop.rdoc
new file mode 100644
index 0000000000..8ef82f8a49
--- /dev/null
+++ b/doc/string/chop.rdoc
@@ -0,0 +1,16 @@
+Returns a new string copied from +self+, with trailing characters possibly removed.
+
+Removes <tt>"\r\n"</tt> if those are the last two characters.
+
+ "abc\r\n".chop # => "abc"
+ "теÑÑ‚\r\n".chop # => "теÑÑ‚"
+ "ã“ã‚“ã«ã¡ã¯\r\n".chop # => "ã“ã‚“ã«ã¡ã¯"
+
+Otherwise removes the last character if it exists.
+
+ 'abcd'.chop # => "abc"
+ 'теÑÑ‚'.chop # => "теÑ"
+ 'ã“ã‚“ã«ã¡ã¯'.chop # => "ã“ã‚“ã«ã¡"
+ ''.chop # => ""
+
+If you only need to remove the newline separator at the end of the string, String#chomp is a better alternative.
diff --git a/doc/string/codepoints.rdoc b/doc/string/codepoints.rdoc
new file mode 100644
index 0000000000..0c55d3f4b9
--- /dev/null
+++ b/doc/string/codepoints.rdoc
@@ -0,0 +1,6 @@
+Returns an array of the codepoints in +self+;
+each codepoint is the integer value for a character:
+
+ 'hello'.codepoints # => [104, 101, 108, 108, 111]
+ 'теÑÑ‚'.codepoints # => [1090, 1077, 1089, 1090]
+ 'ã“ã‚“ã«ã¡ã¯'.codepoints # => [12371, 12435, 12395, 12385, 12399]
diff --git a/doc/string/delete_prefix.rdoc b/doc/string/delete_prefix.rdoc
new file mode 100644
index 0000000000..fa9d8abd38
--- /dev/null
+++ b/doc/string/delete_prefix.rdoc
@@ -0,0 +1,8 @@
+Returns a copy of +self+ with leading substring <tt>prefix</tt> removed:
+
+ 'hello'.delete_prefix('hel') # => "lo"
+ 'hello'.delete_prefix('llo') # => "hello"
+ 'теÑÑ‚'.delete_prefix('те') # => "ÑÑ‚"
+ 'ã“ã‚“ã«ã¡ã¯'.delete_prefix('ã“ã‚“') # => "ã«ã¡ã¯"
+
+Related: String#delete_prefix!, String#delete_suffix.
diff --git a/doc/string/delete_suffix.rdoc b/doc/string/delete_suffix.rdoc
new file mode 100644
index 0000000000..4862b725cf
--- /dev/null
+++ b/doc/string/delete_suffix.rdoc
@@ -0,0 +1,8 @@
+Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed:
+
+ 'hello'.delete_suffix('llo') # => "he"
+ 'hello'.delete_suffix('hel') # => "hello"
+ 'теÑÑ‚'.delete_suffix('ÑÑ‚') # => "те"
+ 'ã“ã‚“ã«ã¡ã¯'.delete_suffix('ã¡ã¯') # => "ã“ã‚“ã«"
+
+Related: String#delete_suffix!, String#delete_prefix.
diff --git a/doc/string/each_byte.rdoc b/doc/string/each_byte.rdoc
new file mode 100644
index 0000000000..643118fea3
--- /dev/null
+++ b/doc/string/each_byte.rdoc
@@ -0,0 +1,17 @@
+Calls the given block with each successive byte from +self+;
+returns +self+:
+
+ 'hello'.each_byte {|byte| print byte, ' ' }
+ print "\n"
+ 'теÑÑ‚'.each_byte {|byte| print byte, ' ' }
+ print "\n"
+ 'ã“ã‚“ã«ã¡ã¯'.each_byte {|byte| print byte, ' ' }
+ print "\n"
+
+Output:
+
+ 104 101 108 108 111
+ 209 130 208 181 209 129 209 130
+ 227 129 147 227 130 147 227 129 171 227 129 161 227 129 175
+
+Returns an enumerator if no block is given.
diff --git a/doc/string/each_char.rdoc b/doc/string/each_char.rdoc
new file mode 100644
index 0000000000..e5ae5a1812
--- /dev/null
+++ b/doc/string/each_char.rdoc
@@ -0,0 +1,17 @@
+Calls the given block with each successive character from +self+;
+returns +self+:
+
+ 'hello'.each_char {|char| print char, ' ' }
+ print "\n"
+ 'теÑÑ‚'.each_char {|char| print char, ' ' }
+ print "\n"
+ 'ã“ã‚“ã«ã¡ã¯'.each_char {|char| print char, ' ' }
+ print "\n"
+
+Output:
+
+ h e l l o
+ Ñ‚ е Ñ Ñ‚
+ ã“ ã‚“ ã« ã¡ ã¯
+
+Returns an enumerator if no block is given.
diff --git a/doc/string/each_codepoint.rdoc b/doc/string/each_codepoint.rdoc
new file mode 100644
index 0000000000..88bfcbd1c0
--- /dev/null
+++ b/doc/string/each_codepoint.rdoc
@@ -0,0 +1,18 @@
+Calls the given block with each successive codepoint from +self+;
+each codepoint is the integer value for a character;
+returns +self+:
+
+ 'hello'.each_codepoint {|codepoint| print codepoint, ' ' }
+ print "\n"
+ 'теÑÑ‚'.each_codepoint {|codepoint| print codepoint, ' ' }
+ print "\n"
+ 'ã“ã‚“ã«ã¡ã¯'.each_codepoint {|codepoint| print codepoint, ' ' }
+ print "\n"
+
+Output:
+
+ 104 101 108 108 111
+ 1090 1077 1089 1090
+ 12371 12435 12395 12385 12399
+
+Returns an enumerator if no block is given.
diff --git a/doc/string/each_grapheme_cluster.rdoc b/doc/string/each_grapheme_cluster.rdoc
new file mode 100644
index 0000000000..40be95fcac
--- /dev/null
+++ b/doc/string/each_grapheme_cluster.rdoc
@@ -0,0 +1,12 @@
+Calls the given block with each successive grapheme cluster from +self+
+(see {Unicode Grapheme Cluster Boundaries}[https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries]);
+returns +self+:
+
+ s = "\u0061\u0308-pqr-\u0062\u0308-xyz-\u0063\u0308" # => "ä-pqr-b̈-xyz-c̈"
+ s.each_grapheme_cluster {|gc| print gc, ' ' }
+
+Output:
+
+ ä - p q r - b̈ - x y z - c̈
+
+Returns an enumerator if no block is given.
diff --git a/doc/string/each_line.rdoc b/doc/string/each_line.rdoc
new file mode 100644
index 0000000000..e254c22d40
--- /dev/null
+++ b/doc/string/each_line.rdoc
@@ -0,0 +1,60 @@
+With a block given, forms the substrings ("lines")
+that are the result of splitting +self+
+at each occurrence of the given line separator +line_sep+;
+passes each line to the block;
+returns +self+:
+
+ s = <<~EOT
+ This is the first line.
+ This is line two.
+
+ This is line four.
+ This is line five.
+ EOT
+
+ s.each_line {|line| p line }
+
+Output:
+
+ "This is the first line.\n"
+ "This is line two.\n"
+ "\n"
+ "This is line four.\n"
+ "This is line five.\n"
+
+With a different +line_sep+:
+
+ s.each_line(' is ') {|line| p line }
+
+Output:
+
+ "This is "
+ "the first line.\nThis is "
+ "line two.\n\nThis is "
+ "line four.\nThis is "
+ "line five.\n"
+
+With +chomp+ as +true+, removes the trailing +line_sep+ from each line:
+
+ s.each_line(chomp: true) {|line| p line }
+
+Output:
+
+ "This is the first line."
+ "This is line two."
+ ""
+ "This is line four."
+ "This is line five."
+
+With an empty string as +line_sep+,
+forms and passes "paragraphs" by splitting at each occurrence
+of two or more newlines:
+
+ s.each_line('') {|line| p line }
+
+Output:
+
+ "This is the first line.\nThis is line two.\n\n"
+ "This is line four.\nThis is line five.\n"
+
+With no block given, returns an enumerator.
diff --git a/doc/string/end_with_p.rdoc b/doc/string/end_with_p.rdoc
new file mode 100644
index 0000000000..f959cf7aaa
--- /dev/null
+++ b/doc/string/end_with_p.rdoc
@@ -0,0 +1,11 @@
+Returns whether +self+ ends with any of the given +strings+.
+
+Returns +true+ if any given string matches the end, +false+ otherwise:
+
+ 'hello'.end_with?('ello') #=> true
+ 'hello'.end_with?('heaven', 'ello') #=> true
+ 'hello'.end_with?('heaven', 'paradise') #=> false
+ 'теÑÑ‚'.end_with?('Ñ‚') # => true
+ 'ã“ã‚“ã«ã¡ã¯'.end_with?('ã¯') # => true
+
+Related: String#start_with?.
diff --git a/doc/string/force_encoding.rdoc b/doc/string/force_encoding.rdoc
new file mode 100644
index 0000000000..fd9615caaa
--- /dev/null
+++ b/doc/string/force_encoding.rdoc
@@ -0,0 +1,20 @@
+Changes the encoding of +self+ to +encoding+,
+which may be a string encoding name or an Encoding object;
+returns self:
+
+ s = 'łał'
+ s.bytes # => [197, 130, 97, 197, 130]
+ s.encoding # => #<Encoding:UTF-8>
+ s.force_encoding('ascii') # => "\xC5\x82a\xC5\x82"
+ s.encoding # => #<Encoding:US-ASCII>
+
+Does not change the underlying bytes:
+
+ s.bytes # => [197, 130, 97, 197, 130]
+
+Makes the change even if the given +encoding+ is invalid
+for +self+ (as is the change above):
+
+ s.valid_encoding? # => false
+ s.force_encoding(Encoding::UTF_8) # => "łał"
+ s.valid_encoding? # => true
diff --git a/doc/string/grapheme_clusters.rdoc b/doc/string/grapheme_clusters.rdoc
new file mode 100644
index 0000000000..8c7f5a7259
--- /dev/null
+++ b/doc/string/grapheme_clusters.rdoc
@@ -0,0 +1,6 @@
+Returns an array of the grapheme clusters in +self+
+(see {Unicode Grapheme Cluster Boundaries}[https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries]):
+
+ s = "\u0061\u0308-pqr-\u0062\u0308-xyz-\u0063\u0308" # => "ä-pqr-b̈-xyz-c̈"
+ s.grapheme_clusters
+ # => ["ä", "-", "p", "q", "r", "-", "b̈", "-", "x", "y", "z", "-", "c̈"]
diff --git a/doc/string/index.rdoc b/doc/string/index.rdoc
new file mode 100644
index 0000000000..ce09a37bdf
--- /dev/null
+++ b/doc/string/index.rdoc
@@ -0,0 +1,38 @@
+Returns the integer index of the first match for the given argument,
+or +nil+ if none found;
+the search of +self+ is forward, and begins at position +offset+ (in characters).
+
+With string argument +substring+,
+returns the index of the first matching substring in +self+:
+
+ 'foo'.index('f') # => 0
+ 'foo'.index('o') # => 1
+ 'foo'.index('oo') # => 1
+ 'foo'.index('ooo') # => nil
+ 'теÑÑ‚'.index('Ñ') # => 2
+ 'ã“ã‚“ã«ã¡ã¯'.index('ã¡') # => 3
+
+With Regexp argument +regexp+, returns the index of the first match in +self+:
+
+ 'foo'.index(/o./) # => 1
+ 'foo'.index(/.o/) # => 0
+
+With positive integer +offset+, begins the search at position +offset+:
+
+ 'foo'.index('o', 1) # => 1
+ 'foo'.index('o', 2) # => 2
+ 'foo'.index('o', 3) # => nil
+ 'теÑÑ‚'.index('Ñ', 1) # => 2
+ 'ã“ã‚“ã«ã¡ã¯'.index('ã¡', 2) # => 3
+
+With negative integer +offset+, selects the search position by counting backward
+from the end of +self+:
+
+ 'foo'.index('o', -1) # => 2
+ 'foo'.index('o', -2) # => 1
+ 'foo'.index('o', -3) # => 1
+ 'foo'.index('o', -4) # => nil
+ 'foo'.index(/o./, -2) # => 1
+ 'foo'.index(/.o/, -2) # => 1
+
+Related: String#rindex.
diff --git a/doc/string/length.rdoc b/doc/string/length.rdoc
new file mode 100644
index 0000000000..0a7e17f7dc
--- /dev/null
+++ b/doc/string/length.rdoc
@@ -0,0 +1,13 @@
+Returns the count of characters (not bytes) in +self+:
+
+ 'foo'.length # => 3
+ 'теÑÑ‚'.length # => 4
+ 'ã“ã‚“ã«ã¡ã¯'.length # => 5
+
+Contrast with String#bytesize:
+
+ 'foo'.bytesize # => 3
+ 'теÑÑ‚'.bytesize # => 8
+ 'ã“ã‚“ã«ã¡ã¯'.bytesize # => 15
+
+String#size is an alias for String#length.
diff --git a/doc/string/ljust.rdoc b/doc/string/ljust.rdoc
new file mode 100644
index 0000000000..8e23c1fc8f
--- /dev/null
+++ b/doc/string/ljust.rdoc
@@ -0,0 +1,16 @@
+Returns a left-justified copy of +self+.
+
+If integer argument +size+ is greater than the size (in characters) of +self+,
+returns a new string of length +size+ that is a copy of +self+,
+left justified and padded on the right with +pad_string+:
+
+ 'hello'.ljust(10) # => "hello "
+ ' hello'.ljust(10) # => " hello "
+ 'hello'.ljust(10, 'ab') # => "helloababa"
+ 'теÑÑ‚'.ljust(10) # => "теÑÑ‚ "
+ 'ã“ã‚“ã«ã¡ã¯'.ljust(10) # => "ã“ã‚“ã«ã¡ã¯ "
+
+If +size+ is not greater than the size of +self+, returns a copy of +self+:
+
+ 'hello'.ljust(5) # => "hello"
+ 'hello'.ljust(1) # => "hello"
diff --git a/doc/string/new.rdoc b/doc/string/new.rdoc
new file mode 100644
index 0000000000..d955e61c87
--- /dev/null
+++ b/doc/string/new.rdoc
@@ -0,0 +1,51 @@
+Returns a new \String that is a copy of +string+.
+
+With no arguments, returns the empty string with the Encoding <tt>ASCII-8BIT</tt>:
+
+ s = String.new
+ s # => ""
+ s.encoding # => #<Encoding:ASCII-8BIT>
+
+With optional argument +string+ and no keyword arguments,
+returns a copy of +string+ with the same encoding:
+
+ String.new('foo') # => "foo"
+ String.new('теÑÑ‚') # => "теÑÑ‚"
+ String.new('ã“ã‚“ã«ã¡ã¯') # => "ã“ã‚“ã«ã¡ã¯"
+
+(Unlike \String.new,
+a {string literal}[rdoc-ref:syntax/literals.rdoc@String+Literals] like <tt>''</tt> or a
+{here document literal}[rdoc-ref:syntax/literals.rdoc@Here+Document+Literals]
+always has {script encoding}[rdoc-ref:encodings.rdoc@Script+Encoding].)
+
+With optional keyword argument +encoding+, returns a copy of +string+
+with the specified encoding;
+the +encoding+ may be an Encoding object, an encoding name,
+or an encoding name alias:
+
+ String.new('foo', encoding: Encoding::US_ASCII).encoding # => #<Encoding:US-ASCII>
+ String.new('foo', encoding: 'US-ASCII').encoding # => #<Encoding:US-ASCII>
+ String.new('foo', encoding: 'ASCII').encoding # => #<Encoding:US-ASCII>
+
+The given encoding need not be valid for the string's content,
+and that validity is not checked:
+
+ s = String.new('ã“ã‚“ã«ã¡ã¯', encoding: 'ascii')
+ s.valid_encoding? # => false
+
+But the given +encoding+ itself is checked:
+
+ String.new('foo', encoding: 'bar') # Raises ArgumentError.
+
+With optional keyword argument +capacity+, returns a copy of +string+
+(or an empty string, if +string+ is not given);
+the given +capacity+ is advisory only,
+and may or may not set the size of the internal buffer,
+which may in turn affect performance:
+
+ String.new(capacity: 1)
+ String.new('foo', capacity: 4096)
+
+The +string+, +encoding+, and +capacity+ arguments may all be used together:
+
+ String.new('hello', encoding: 'UTF-8', capacity: 25)
diff --git a/doc/string/ord.rdoc b/doc/string/ord.rdoc
new file mode 100644
index 0000000000..d586363d44
--- /dev/null
+++ b/doc/string/ord.rdoc
@@ -0,0 +1,6 @@
+Returns the integer ordinal of the first character of +self+:
+
+ 'h'.ord # => 104
+ 'hello'.ord # => 104
+ 'теÑÑ‚'.ord # => 1090
+ 'ã“ã‚“ã«ã¡ã¯'.ord # => 12371
diff --git a/doc/string/partition.rdoc b/doc/string/partition.rdoc
new file mode 100644
index 0000000000..ebe575e8eb
--- /dev/null
+++ b/doc/string/partition.rdoc
@@ -0,0 +1,24 @@
+Returns a 3-element array of substrings of +self+.
+
+Matches a pattern against +self+, scanning from the beginning.
+The pattern is:
+
+- +string_or_regexp+ itself, if it is a Regexp.
+- <tt>Regexp.quote(string_or_regexp)</tt>, if +string_or_regexp+ is a string.
+
+If the pattern is matched, returns pre-match, first-match, post-match:
+
+ 'hello'.partition('l') # => ["he", "l", "lo"]
+ 'hello'.partition('ll') # => ["he", "ll", "o"]
+ 'hello'.partition('h') # => ["", "h", "ello"]
+ 'hello'.partition('o') # => ["hell", "o", ""]
+ 'hello'.partition(/l+/) #=> ["he", "ll", "o"]
+ 'hello'.partition('') # => ["", "", "hello"]
+ 'теÑÑ‚'.partition('Ñ‚') # => ["", "Ñ‚", "еÑÑ‚"]
+ 'ã“ã‚“ã«ã¡ã¯'.partition('ã«') # => ["ã“ã‚“", "ã«", "ã¡ã¯"]
+
+If the pattern is not matched, returns a copy of +self+ and two empty strings:
+
+ 'hello'.partition('x') # => ["hello", "", ""]
+
+Related: String#rpartition, String#split.
diff --git a/doc/string/rjust.rdoc b/doc/string/rjust.rdoc
new file mode 100644
index 0000000000..24e7bf3159
--- /dev/null
+++ b/doc/string/rjust.rdoc
@@ -0,0 +1,16 @@
+Returns a right-justified copy of +self+.
+
+If integer argument +size+ is greater than the size (in characters) of +self+,
+returns a new string of length +size+ that is a copy of +self+,
+right justified and padded on the left with +pad_string+:
+
+ 'hello'.rjust(10) # => " hello"
+ 'hello '.rjust(10) # => " hello "
+ 'hello'.rjust(10, 'ab') # => "ababahello"
+ 'теÑÑ‚'.rjust(10) # => " теÑÑ‚"
+ 'ã“ã‚“ã«ã¡ã¯'.rjust(10) # => " ã“ã‚“ã«ã¡ã¯"
+
+If +size+ is not greater than the size of +self+, returns a copy of +self+:
+
+ 'hello'.rjust(5, 'ab') # => "hello"
+ 'hello'.rjust(1, 'ab') # => "hello"
diff --git a/doc/string/rpartition.rdoc b/doc/string/rpartition.rdoc
new file mode 100644
index 0000000000..d24106fb9f
--- /dev/null
+++ b/doc/string/rpartition.rdoc
@@ -0,0 +1,24 @@
+Returns a 3-element array of substrings of +self+.
+
+Matches a pattern against +self+, scanning backwards from the end.
+The pattern is:
+
+- +string_or_regexp+ itself, if it is a Regexp.
+- <tt>Regexp.quote(string_or_regexp)</tt>, if +string_or_regexp+ is a string.
+
+If the pattern is matched, returns pre-match, last-match, post-match:
+
+ 'hello'.rpartition('l') # => ["hel", "l", "o"]
+ 'hello'.rpartition('ll') # => ["he", "ll", "o"]
+ 'hello'.rpartition('h') # => ["", "h", "ello"]
+ 'hello'.rpartition('o') # => ["hell", "o", ""]
+ 'hello'.rpartition(/l+/) # => ["hel", "l", "o"]
+ 'hello'.rpartition('') # => ["hello", "", ""]
+ 'теÑÑ‚'.rpartition('Ñ‚') # => ["теÑ", "Ñ‚", ""]
+ 'ã“ã‚“ã«ã¡ã¯'.rpartition('ã«') # => ["ã“ã‚“", "ã«", "ã¡ã¯"]
+
+If the pattern is not matched, returns two empty strings and a copy of +self+:
+
+ 'hello'.rpartition('x') # => ["", "", "hello"]
+
+Related: String#partition, String#split.
diff --git a/doc/string/scrub.rdoc b/doc/string/scrub.rdoc
new file mode 100644
index 0000000000..1a5b1c79d0
--- /dev/null
+++ b/doc/string/scrub.rdoc
@@ -0,0 +1,25 @@
+Returns a copy of +self+ with each invalid byte sequence replaced
+by the given +replacement_string+.
+
+With no block given and no argument, replaces each invalid sequence
+with the default replacement string
+(<tt>"�"</tt> for a Unicode encoding, <tt>'?'</tt> otherwise):
+
+ s = "foo\x81\x81bar"
+ s.scrub # => "foo��bar"
+
+With no block given and argument +replacement_string+ given,
+replaces each invalid sequence with that string:
+
+ "foo\x81\x81bar".scrub('xyzzy') # => "fooxyzzyxyzzybar"
+
+With a block given, replaces each invalid sequence with the value
+of the block:
+
+ "foo\x81\x81bar".scrub {|bytes| p bytes; 'XYZZY' }
+ # => "fooXYZZYXYZZYbar"
+
+Output:
+
+ "\x81"
+ "\x81"
diff --git a/doc/string/split.rdoc b/doc/string/split.rdoc
new file mode 100644
index 0000000000..2b5e14ddb6
--- /dev/null
+++ b/doc/string/split.rdoc
@@ -0,0 +1,86 @@
+Returns an array of substrings of +self+
+that are the result of splitting +self+
+at each occurrence of the given field separator +field_sep+.
+
+When +field_sep+ is <tt>$;</tt>:
+
+- If <tt>$;</tt> is +nil+ (its default value),
+ the split occurs just as if +field_sep+ were given as a space character
+ (see below).
+
+- If <tt>$;</tt> is a string,
+ the split ocurs just as if +field_sep+ were given as that string
+ (see below).
+
+When +field_sep+ is <tt>' '</tt> and +limit+ is +nil+,
+the split occurs at each sequence of whitespace:
+
+ 'abc def ghi'.split(' ') => ["abc", "def", "ghi"]
+ "abc \n\tdef\t\n ghi".split(' ') # => ["abc", "def", "ghi"]
+ 'abc def ghi'.split(' ') => ["abc", "def", "ghi"]
+ ''.split(' ') => []
+
+When +field_sep+ is a string different from <tt>' '</tt>
+and +limit+ is +nil+,
+the split occurs at each occurrence of +field_sep+;
+trailing empty substrings are not returned:
+
+ 'abracadabra'.split('ab') => ["", "racad", "ra"]
+ 'aaabcdaaa'.split('a') => ["", "", "", "bcd"]
+ ''.split('a') => []
+ '3.14159'.split('1') => ["3.", "4", "59"]
+ '!@#$%^$&*($)_+'.split('$') # => ["!@#", "%^", "&*(", ")_+"]
+ 'теÑÑ‚'.split('Ñ‚') => ["", "еÑ"]
+ 'ã“ã‚“ã«ã¡ã¯'.split('ã«') => ["ã“ã‚“", "ã¡ã¯"]
+
+When +field_sep+ is a Regexp and +limit+ is +nil+,
+the split occurs at each occurrence of a match;
+trailing empty substrings are not returned:
+
+ 'abracadabra'.split(/ab/) # => ["", "racad", "ra"]
+ 'aaabcdaaa'.split(/a/) => ["", "", "", "bcd"]
+ 'aaabcdaaa'.split(//) => ["a", "a", "a", "b", "c", "d", "a", "a", "a"]
+ '1 + 1 == 2'.split(/\W+/) # => ["1", "1", "2"]
+
+If the \Regexp contains groups, their matches are also included
+in the returned array:
+
+ '1:2:3'.split(/(:)()()/, 2) # => ["1", ":", "", "", "2:3"]
+
+As seen above, if +limit+ is +nil+,
+trailing empty substrings are not returned;
+the same is true if +limit+ is zero:
+
+ 'aaabcdaaa'.split('a') => ["", "", "", "bcd"]
+ 'aaabcdaaa'.split('a', 0) # => ["", "", "", "bcd"]
+
+If +limit+ is positive integer +n+, no more than <tt>n - 1-</tt>
+splits occur, so that at most +n+ substrings are returned,
+and trailing empty substrings are included:
+
+ 'aaabcdaaa'.split('a', 1) # => ["aaabcdaaa"]
+ 'aaabcdaaa'.split('a', 2) # => ["", "aabcdaaa"]
+ 'aaabcdaaa'.split('a', 5) # => ["", "", "", "bcd", "aa"]
+ 'aaabcdaaa'.split('a', 7) # => ["", "", "", "bcd", "", "", ""]
+ 'aaabcdaaa'.split('a', 8) # => ["", "", "", "bcd", "", "", ""]
+
+Note that if +field_sep+ is a \Regexp containing groups,
+their matches are in the returned array, but do not count toward the limit.
+
+If +limit+ is negative, it behaves the same as if +limit+ was +nil+,
+meaning that there is no limit,
+and trailing empty substrings are included:
+
+ 'aaabcdaaa'.split('a', -1) # => ["", "", "", "bcd", "", "", ""]
+
+If a block is given, it is called with each substring:
+
+ 'abc def ghi'.split(' ') {|substring| p substring }
+
+Output:
+
+ "abc"
+ "def"
+ "ghi"
+
+Related: String#partition, String#rpartition.
diff --git a/doc/string/start_with_p.rdoc b/doc/string/start_with_p.rdoc
new file mode 100644
index 0000000000..5d1f9f9543
--- /dev/null
+++ b/doc/string/start_with_p.rdoc
@@ -0,0 +1,18 @@
+Returns whether +self+ starts with any of the given +string_or_regexp+.
+
+Matches patterns against the beginning of +self+.
+For each given +string_or_regexp+, the pattern is:
+
+- +string_or_regexp+ itself, if it is a Regexp.
+- <tt>Regexp.quote(string_or_regexp)</tt>, if +string_or_regexp+ is a string.
+
+Returns +true+ if any pattern matches the beginning, +false+ otherwise:
+
+ 'hello'.start_with?('hell') # => true
+ 'hello'.start_with?(/H/i) # => true
+ 'hello'.start_with?('heaven', 'hell') # => true
+ 'hello'.start_with?('heaven', 'paradise') # => false
+ 'теÑÑ‚'.start_with?('Ñ‚') # => true
+ 'ã“ã‚“ã«ã¡ã¯'.start_with?('ã“') # => true
+
+Related: String#end_with?.
diff --git a/doc/string/sum.rdoc b/doc/string/sum.rdoc
new file mode 100644
index 0000000000..5de24e6402
--- /dev/null
+++ b/doc/string/sum.rdoc
@@ -0,0 +1,11 @@
+Returns a basic +n+-bit checksum of the characters in +self+;
+the checksum is the sum of the binary value of each byte in +self+,
+modulo <tt>2**n - 1</tt>:
+
+ 'hello'.sum # => 532
+ 'hello'.sum(4) # => 4
+ 'hello'.sum(64) # => 532
+ 'теÑÑ‚'.sum # => 1405
+ 'ã“ã‚“ã«ã¡ã¯'.sum # => 2582
+
+This is not a particularly strong checksum.
diff --git a/doc/symbol/casecmp.rdoc b/doc/symbol/casecmp.rdoc
new file mode 100644
index 0000000000..9c286070b7
--- /dev/null
+++ b/doc/symbol/casecmp.rdoc
@@ -0,0 +1,27 @@
+Like Symbol#<=>, but case-insensitive;
+equivalent to <tt>self.to_s.casecmp(object.to_s)</tt>:
+
+ lower = :abc
+ upper = :ABC
+ upper.casecmp(lower) # => 0
+ lower.casecmp(lower) # => 0
+ lower.casecmp(upper) # => 0
+
+Returns nil if +self+ and +object+ have incompatible encodings,
+or if +object+ is not a symbol:
+
+ sym = 'äöü'.encode("ISO-8859-1").to_sym
+ other_sym = 'ÄÖÜ'
+ sym.casecmp(other_sym) # => nil
+ :foo.casecmp(2) # => nil
+
+Unlike Symbol#casecmp?,
+case-insensitivity does not work for characters outside of 'A'..'Z' and 'a'..'z':
+
+ lower = :äöü
+ upper = :ÄÖÜ
+ upper.casecmp(lower) # => -1
+ lower.casecmp(lower) # => 0
+ lower.casecmp(upper) # => 1
+
+Related: Symbol#casecmp?, String#casecmp.
diff --git a/doc/symbol/casecmp_p.rdoc b/doc/symbol/casecmp_p.rdoc
new file mode 100644
index 0000000000..7102b54289
--- /dev/null
+++ b/doc/symbol/casecmp_p.rdoc
@@ -0,0 +1,26 @@
+Returns +true+ if +self+ and +object+ are equal after Unicode case folding,
+otherwise +false+:
+
+ lower = :abc
+ upper = :ABC
+ upper.casecmp?(lower) # => true
+ lower.casecmp?(lower) # => true
+ lower.casecmp?(upper) # => true
+
+Returns nil if +self+ and +object+ have incompatible encodings,
+or if +object+ is not a symbol:
+
+ sym = 'äöü'.encode("ISO-8859-1").to_sym
+ other_sym = 'ÄÖÜ'
+ sym.casecmp?(other_sym) # => nil
+ :foo.casecmp?(2) # => nil
+
+Unlike Symbol#casecmp, works for characters outside of 'A'..'Z' and 'a'..'z':
+
+ lower = :äöü
+ upper = :ÄÖÜ
+ upper.casecmp?(lower) # => true
+ lower.casecmp?(lower) # => true
+ lower.casecmp?(upper) # => true
+
+Related: Symbol#casecmp, String#casecmp?.
diff --git a/doc/syntax.rdoc b/doc/syntax.rdoc
index 2463c12a63..5895673f36 100644
--- a/doc/syntax.rdoc
+++ b/doc/syntax.rdoc
@@ -11,6 +11,9 @@ Assignment[rdoc-ref:syntax/assignment.rdoc] ::
{Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] ::
+if+, +unless+, +while+, +until+, +for+, +break+, +next+, +redo+
+{Pattern matching}[rdoc-ref:syntax/pattern_matching.rdoc] ::
+ Experimental structural pattern matching and variable binding syntax
+
Methods[rdoc-ref:syntax/methods.rdoc] ::
Method and method argument syntax
@@ -27,7 +30,7 @@ Precedence[rdoc-ref:syntax/precedence.rdoc] ::
Precedence of ruby operators
Refinements[rdoc-ref:syntax/refinements.rdoc] ::
- Use and behavior of the experimental refinements feature
+ Use and behavior of the refinements feature
Miscellaneous[rdoc-ref:syntax/miscellaneous.rdoc] ::
+alias+, +undef+, +BEGIN+, +END+
diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc
index a1806e4c48..1321bbf3ac 100644
--- a/doc/syntax/assignment.rdoc
+++ b/doc/syntax/assignment.rdoc
@@ -8,6 +8,9 @@ example assigns the number five to the local variable +v+:
Assignment creates a local variable if the variable was not previously
referenced.
+An assignment expression result is always the assigned value, including
+{assignment methods}[rdoc-ref:syntax/assignment.rdoc@Assignment+Methods].
+
== Local Variable Names
A local variable name must start with a lowercase US-ASCII letter or a
@@ -342,6 +345,9 @@ This prints:
local_variables:
@value: 42
+Note that the value returned by an assignment method is ignored whatever,
+since an assignment expression result is always the assignment value.
+
== Abbreviated Assignment
You can mix several of the operators and assignment. To add 1 to an object
diff --git a/doc/syntax/calling_methods.rdoc b/doc/syntax/calling_methods.rdoc
index 5abecc69da..da061dbfdb 100644
--- a/doc/syntax/calling_methods.rdoc
+++ b/doc/syntax/calling_methods.rdoc
@@ -30,7 +30,41 @@ NoMethodError.
You may also use <code>::</code> to designate a receiver, but this is rarely
used due to the potential for confusion with <code>::</code> for namespaces.
-=== Safe navigation operator
+=== Chaining \Method Calls
+
+You can "chain" method calls by immediately following one method call with another.
+
+This example chains methods Array#append and Array#compact:
+
+ a = [:foo, 'bar', 2]
+ a1 = [:baz, nil, :bam, nil]
+ a2 = a.append(*a1).compact
+ a2 # => [:foo, "bar", 2, :baz, :bam]
+
+Details:
+
+- First method <tt>merge</tt> creates a copy of <tt>a</tt>,
+ appends (separately) each element of <tt>a1</tt> to the copy, and returns
+ [:foo, "bar", 2, :baz, nil, :bam, nil]
+- Chained method <tt>compact</tt> creates a copy of that return value,
+ removes its <tt>nil</tt>-valued entries, and returns
+ [:foo, "bar", 2, :baz, :bam]
+
+You can chain methods that are in different classes.
+This example chains methods Hash#to_a and Array#reverse:
+
+ h = {foo: 0, bar: 1, baz: 2}
+ h.to_a.reverse # => [[:baz, 2], [:bar, 1], [:foo, 0]]
+
+Details:
+
+- First method Hash#to_a converts <tt>a</tt> to an \Array, and returns
+ [[:foo, 0], [:bar, 1], [:baz, 2]]
+- Chained method Array#reverse creates copy of that return value,
+ reverses it, and returns
+ [[:baz, 2], [:bar, 1], [:foo, 0]]
+
+=== Safe Navigation Operator
<code>&.</code>, called "safe navigation operator", allows to skip method call
when receiver is +nil+. It returns +nil+ and doesn't evaluate method's arguments
@@ -176,6 +210,24 @@ definition. If a keyword argument is given that the method did not list,
and the method definition does not accept arbitrary keyword arguments, an
ArgumentError will be raised.
+Keyword argument value can be omitted, meaning the value will be be fetched
+from the context by the name of the key
+
+ keyword1 = 'some value'
+ my_method(positional1, keyword1:)
+ # ...is the same as
+ my_method(positional1, keyword1: keyword1)
+
+Be aware that when method parenthesis are omitted, too, the parsing order might
+be unexpected:
+
+ my_method positional1, keyword1:
+
+ some_other_expression
+
+ # ...is actually parsed as
+ my_method(positional1, keyword1: some_other_expression)
+
=== Block Argument
The block argument sends a closure from the calling scope to the method.
diff --git a/doc/syntax/comments.rdoc b/doc/syntax/comments.rdoc
index a07dd41494..dbc7816984 100644
--- a/doc/syntax/comments.rdoc
+++ b/doc/syntax/comments.rdoc
@@ -35,3 +35,219 @@ syntax error:
Will not work
=end
end
+
+== Magic Comments
+
+While comments are typically ignored by Ruby, special "magic comments" contain
+directives that affect how the code is interpreted.
+
+Top-level magic comments must appear in the first comment section of a file.
+
+NOTE: Magic comments affect only the file in which they appear;
+other files are unaffected.
+
+ # frozen_string_literal: true
+
+ var = 'hello'
+ var.frozen? # => true
+
+=== Alternative syntax
+
+Magic comments may consist of a single directive (as in the example above).
+Alternatively, multiple directives may appear on the same line if separated by ";"
+and wrapped between "-*-" (see Emacs' {file variables}[https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html]).
+
+ # emacs-compatible; -*- coding: big5; mode: ruby; frozen_string_literal: true -*-
+
+ p 'hello'.frozen? # => true
+ p 'hello'.encoding # => #<Encoding:Big5>
+
+=== +encoding+ Directive
+
+Indicates which string encoding should be used for string literals,
+regexp literals and <code>__ENCODING__</code>:
+
+ # encoding: big5
+
+ ''.encoding # => #<Encoding:Big5>
+
+Default encoding is UTF-8.
+
+Top-level magic comments must start on the first line, or on the second line if
+the first line looks like <tt>#! shebang line</tt>.
+
+The word "coding" may be used instead of "encoding".
+
+=== +frozen_string_literal+ Directive
+
+Indicates that string literals should be allocated once at parse time and frozen.
+
+ # frozen_string_literal: true
+
+ 3.times do
+ p 'hello'.object_id # => prints same number
+ end
+ p 'world'.frozen? # => true
+
+The default is false; this can be changed with <code>--enable=frozen-string-literal</code>.
+Without the directive, or with <code># frozen_string_literal: false</code>,
+the example above would print 3 different numbers and "false".
+
+Starting in Ruby 3.0, string literals that are dynamic are not frozen nor reused:
+
+ # frozen_string_literal: true
+
+ p "Addition: #{2 + 2}".frozen? # => false
+
+It must appear in the first comment section of a file.
+
+=== +warn_indent+ Directive
+
+This directive can turn on detection of bad indentation for statements that follow it:
+
+ def foo
+ end # => no warning
+
+ # warn_indent: true
+ def bar
+ end # => warning: mismatched indentations at 'end' with 'def' at 6
+
+Another way to get these warnings to show is by running Ruby with warnings (<code>ruby -w</code>). Using a directive to set this false will prevent these warnings to show.
+
+=== +shareable_constant_value+ Directive
+
+Note: This directive is experimental in Ruby 3.0 and may change in future releases.
+
+This special directive helps to create constants that hold only immutable objects, or {Ractor-shareable}[rdoc-ref:Ractor@Shareable+and+unshareable+objects] constants.
+
+The directive can specify special treatment for values assigned to constants:
+
+* +none+: (default)
+* +literal+: literals are implicitly frozen, others must be Ractor-shareable
+* +experimental_everything+: all made shareable
+* +experimental_copy+: copy deeply and make it shareable
+
+==== Mode +none+ (default)
+
+No special treatment in this mode (as in Ruby 2.x): no automatic freezing and no checks.
+
+It has always been a good idea to deep-freeze constants; Ractor makes this
+an even better idea as only the main ractor can access non-shareable constants:
+
+ # shareable_constant_value: none
+ A = {foo: []}
+ A.frozen? # => false
+ Ractor.new { puts A } # => can not access non-shareable objects by non-main Ractor.
+
+==== Mode +literal+
+
+In "literal" mode, constants assigned to literals will be deeply-frozen:
+
+ # shareable_constant_value: literal
+ X = [{foo: []}] # => same as [{foo: [].freeze}.freeze].freeze
+
+Other values must be shareable:
+
+ # shareable_constant_value: literal
+ X = Object.new # => cannot assign unshareable object to X
+
+Note that only literals directly assigned to constants, or recursively held in such literals will be frozen:
+
+ # shareable_constant_value: literal
+ var = [{foo: []}]
+ var.frozen? # => false (assignment was made to local variable)
+ X = var # => cannot assign unshareable object to X
+
+ X = Set[1, 2, {foo: []}].freeze # => cannot assign unshareable object to X
+ # (`Set[...]` is not a literal and
+ # `{foo: []}` is an argument to `Set.[]`)
+
+The method Module#const_set is not affected.
+
+==== Mode +experimental_everything+
+
+In this mode, all values assigned to constants are made shareable.
+
+ # shareable_constant_value: experimental_everything
+ FOO = Set[1, 2, {foo: []}]
+ # same as FOO = Ractor.make_sharable(...)
+ # OR same as `FOO = Set[1, 2, {foo: [].freeze}.freeze].freeze`
+
+ var = [{foo: []}]
+ var.frozen? # => false (assignment was made to local variable)
+ X = var # => calls `Ractor.make_shareable(var)`
+ var.frozen? # => true
+
+This mode is "experimental", because it might be error prone, for
+example by deep-freezing the constants of an external resource which
+could cause errors:
+
+ # shareable_constant_value: experimental_everything
+ FOO = SomeGem::Something::FOO
+ # => deep freezes the gem's constant!
+
+This will be revisited before Ruby 3.1 to either allow `everything`
+or to instead remove this mode.
+
+The method Module#const_set is not affected.
+
+==== Mode +experimental_copy+
+
+In this mode, all values assigned to constants are deeply copied and
+made shareable. It is safer mode than +experimental_everything+.
+
+ # shareable_constant_value: experimental_everything
+ var = [{foo: []}]
+ var.frozen? # => false (assignment was made to local variable)
+ X = var # => calls `Ractor.make_shareable(var, copy: true)`
+ var.frozen? # => false
+ Ractor.shareable?(X) #=> true
+ var.object_id == X.object_id #=> false
+
+This mode is "experimental" and has not been discussed thoroughly.
+This will be revisited before Ruby 3.1 to either allow `copy`
+or to instead remove this mode.
+
+The method Module#const_set is not affected.
+
+==== Scope
+
+This directive can be used multiple times in the same file:
+
+ # shareable_constant_value: none
+ A = {foo: []}
+ A.frozen? # => false
+ Ractor.new { puts A } # => can not access non-shareable objects by non-main Ractor.
+
+ # shareable_constant_value: literal
+ B = {foo: []}
+ B.frozen? # => true
+ B[:foo].frozen? # => true
+
+ C = [Object.new] # => cannot assign unshareable object to C (Ractor::IsolationError)
+
+ D = [Object.new.freeze]
+ D.frozen? # => true
+
+ # shareable_constant_value: experimental_everything
+ E = Set[1, 2, Object.new]
+ E.frozen? # => true
+ E.all(&:frozen?) # => true
+
+The directive affects only subsequent constants and only for the current scope:
+
+ module Mod
+ # shareable_constant_value: literal
+ A = [1, 2, 3]
+ module Sub
+ B = [4, 5]
+ end
+ end
+
+ C = [4, 5]
+
+ module Mod
+ D = [6]
+ end
+ p Mod::A.frozen?, Mod::Sub::B.frozen? # => true, true
+ p C.frozen?, Mod::D.frozen? # => false, false
diff --git a/doc/syntax/control_expressions.rdoc b/doc/syntax/control_expressions.rdoc
index f7e6d54924..df3b5ced38 100644
--- a/doc/syntax/control_expressions.rdoc
+++ b/doc/syntax/control_expressions.rdoc
@@ -232,7 +232,7 @@ You may use +then+ after the +when+ condition. This is most frequently used
to place the body of the +when+ on a single line.
case a
- when 1, 2 then puts "a is one or two
+ when 1, 2 then puts "a is one or two"
when 3 then puts "a is three"
else puts "I don't know what a is"
end
@@ -255,6 +255,20 @@ Again, the +then+ and +else+ are optional.
The result value of a +case+ expression is the last value executed in the
expression.
+Since Ruby 2.7, +case+ expressions also provide a more powerful experimental
+pattern matching feature via the +in+ keyword:
+
+ case {a: 1, b: 2, c: 3}
+ in a: Integer => m
+ "matched: #{m}"
+ else
+ "not matched"
+ end
+ # => "matched: 1"
+
+The pattern matching syntax is described on
+{its own page}[rdoc-ref:syntax/pattern_matching.rdoc].
+
== +while+ Loop
The +while+ loop executes while a condition is true:
@@ -499,9 +513,9 @@ and modifier +if+ has lower precedence than <code>=</code>.
== Flip-Flop
-The flip-flop is a rarely seen conditional expression. It's primary use is
-for processing text from ruby one-line programs used with <code>ruby -n</code>
-or <code>ruby -p</code>.
+The flip-flop is a slightly special conditional expression. One of its
+typical uses is processing text from ruby one-line programs used with
+<code>ruby -n</code> or <code>ruby -p</code>.
The form of the flip-flop is an expression that indicates when the
flip-flop turns on, <code>..</code> (or <code>...</code>), then an expression
@@ -510,7 +524,6 @@ will continue to evaluate to +true+, and +false+ when off.
Here is an example:
-
selected = []
0.upto 10 do |value|
@@ -519,15 +532,16 @@ Here is an example:
p selected # prints [2, 3, 4, 5, 6, 7, 8]
-In the above example, the on condition is <code>n==2</code>. The flip-flop
-is initially off (false) for 0 and 1, but becomes on (true) for 2 and remains
-on through 8. After 8 it turns off and remains off for 9 and 10.
+In the above example, the `on' condition is <code>n==2</code>. The flip-flop
+is initially `off' (false) for 0 and 1, but becomes `on' (true) for 2 and
+remains `on' through 8. After 8 it turns off and remains `off' for 9 and 10.
-The flip-flop must be used inside a conditional such as +if+, +while+,
-+unless+, +until+ etc. including the modifier forms.
+The flip-flop must be used inside a conditional such as <code>!</code>,
+<code>? :</code>, +not+, +if+, +while+, +unless+, +until+ etc. including the
+modifier forms.
-When you use an inclusive range (<code>..</code>), the off condition is
-evaluated when the on condition changes:
+When you use an inclusive range (<code>..</code>), the `off' condition is
+evaluated when the `on' condition changes:
selected = []
@@ -541,7 +555,7 @@ Here, both sides of the flip-flop are evaluated so the flip-flop turns on and
off only when +value+ equals 2. Since the flip-flop turned on in the
iteration it returns true.
-When you use an exclusive range (<code>...</code>), the off condition is
+When you use an exclusive range (<code>...</code>), the `off' condition is
evaluated on the following iteration:
selected = []
@@ -553,5 +567,5 @@ evaluated on the following iteration:
p selected # prints [2, 3, 4, 5]
Here, the flip-flop turns on when +value+ equals 2, but doesn't turn off on the
-same iteration. The off condition isn't evaluated until the following
+same iteration. The `off' condition isn't evaluated until the following
iteration and +value+ will never be two again.
diff --git a/doc/syntax/literals.rdoc b/doc/syntax/literals.rdoc
index 38bfa38676..b641433249 100644
--- a/doc/syntax/literals.rdoc
+++ b/doc/syntax/literals.rdoc
@@ -2,17 +2,33 @@
Literals create objects you can use in your program. Literals include:
-* Booleans and nil
-* Numbers
-* Strings
-* Symbols
-* Arrays
-* Hashes
-* Ranges
-* Regular Expressions
-* Procs
-
-== Booleans and nil
+* {Boolean and Nil Literals}[#label-Boolean+and+Nil+Literals]
+* {Number Literals}[#label-Number+Literals]
+
+ * {Integer Literals}[#label-Integer+Literals]
+ * {Float Literals}[#label-Float+Literals]
+ * {Rational Literals}[#label-Rational+Literals]
+ * {Complex Literals}[#label-Complex+Literals]
+
+* {String Literals}[#label-String+Literals]
+* {Here Document Literals}[#label-Here+Document+Literals]
+* {Symbol Literals}[#label-Symbol+Literals]
+* {Array Literals}[#label-Array+Literals]
+* {Hash Literals}[#label-Hash+Literals]
+* {Range Literals}[#label-Range+Literals]
+* {Regexp Literals}[#label-Regexp+Literals]
+* {Lambda Proc Literals}[#label-Lambda+Proc+Literals]
+* {Percent Literals}[#label-Percent+Literals]
+
+ * {%q: Non-Interpolable String Literals}[#label-25q-3A+Non-Interpolable+String+Literals]
+ * {% and %Q: Interpolable String Literals}[#label-25+and+-25Q-3A+Interpolable+String+Literals]
+ * {%w and %W: String-Array Literals}[#label-25w+and+-25W-3A+String-Array+Literals]
+ * {%i and %I: Symbol-Array Literals}[#label-25i+and+-25I-3A+Symbol-Array+Literals]
+ * {%r: Regexp Literals}[#label-25r-3A+Regexp+Literals]
+ * {%s: Symbol Literals}[#label-25s-3A+Symbol+Literals]
+ * {%x: Backtick Literals}[#label-25x-3A+Backtick+Literals]
+
+== Boolean and Nil Literals
+nil+ and +false+ are both false values. +nil+ is sometimes used to indicate
"no value" or "unknown" but evaluates to +false+ in conditional expressions.
@@ -20,10 +36,9 @@ Literals create objects you can use in your program. Literals include:
+true+ is a true value. All objects except +nil+ and +false+ evaluate to a
true value in conditional expressions.
-(There are also the constants +TRUE+, +FALSE+ and +NIL+, but the lowercase
-literal forms are preferred.)
+== Number Literals
-== Numbers
+=== \Integer Literals
You can write integers of any size as follows:
@@ -34,15 +49,6 @@ These numbers have the same value, 1,234. The underscore may be used to
enhance readability for humans. You may place an underscore anywhere in the
number.
-Floating point numbers may be written as follows:
-
- 12.34
- 1234e-2
- 1.234E1
-
-These numbers have the same value, 12.34. You may use underscores in floating
-point numbers as well.
-
You can use a special prefix to write numbers in decimal, hexadecimal, octal
or binary formats. For decimal numbers use a prefix of <tt>0d</tt>, for
hexadecimal numbers use a prefix of <tt>0x</tt>, for octal numbers use a
@@ -71,35 +77,69 @@ Examples:
All these numbers have the same decimal value, 170. Like integers and floats
you may use an underscore for readability.
-=== Rational numbers
+=== \Float Literals
+
+Floating-point numbers may be written as follows:
+
+ 12.34
+ 1234e-2
+ 1.234E1
+
+These numbers have the same value, 12.34. You may use underscores in floating
+point numbers as well.
+
+=== \Rational Literals
+
+You can write a Rational literal using a special suffix, <tt>'r'</tt>.
+
+Examples:
+
+ 1r # => (1/1)
+ 2/3r # => (2/3) # With denominator.
+ -1r # => (-1/1) # With signs.
+ -2/3r # => (-2/3)
+ 2/-3r # => (-2/3)
+ -2/-3r # => (2/3)
+ +1/+3r # => (1/3)
+ 1.2r # => (6/5) # With fractional part.
+ 1_1/2_1r # => (11/21) # With embedded underscores.
+ 2/4r # => (1/2) # Automatically reduced.
-Numbers suffixed by +r+ are Rational numbers.
+Syntax:
- 12r #=> (12/1)
- 12.3r #=> (123/10)
+ <rational-literal> = <numerator> [ '/' <denominator> ] 'r'
+ <numerator> = [ <sign> ] <digits> [ <fractional-part> ]
+ <fractional-part> = '.' <digits>
+ <denominator> = [ sign ] <digits>
+ <sign> = '-' | '+'
+ <digits> = <digit> { <digit> | '_' <digit> }
+ <digit> = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
-Rational numbers are exact, whereas Float numbers are inexact.
+Note this, which is parsed as \Float numerator <tt>1.2</tt>
+divided by \Rational denominator <tt>3r</tt>,
+resulting in a \Float:
- 0.1r + 0.2r #=> (3/10)
- 0.1 + 0.2 #=> 0.30000000000000004
+ 1.2/3r # => 0.39999999999999997
-=== Complex numbers
+=== \Complex Literals
-Numbers suffixed by +i+ are Complex (or imaginary) numbers.
+You can write a Complex number as follows (suffixed +i+):
1i #=> (0+1i)
1i * 1i #=> (-1+0i)
-Also Rational numbers may be imaginary numbers.
+Also \Rational numbers may be imaginary numbers.
12.3ri #=> (0+(123/10)*i)
-+i+ must be placed after +r+, the opposite is not allowed.
++i+ must be placed after +r+; the opposite is not allowed.
- 12.3ir #=> syntax error
+ 12.3ir #=> Syntax error
== Strings
+=== \String Literals
+
The most common way of writing strings is using <tt>"</tt>:
"This is a string."
@@ -146,6 +186,10 @@ Double-quote strings allow interpolation of other values using
Any expression may be placed inside the interpolated section, but it's best to
keep the expression small for readability.
+You can also use <tt>#@foo</tt>, <tt>#@@foo</tt> and <tt>#$foo</tt> as a
+shorthand for, respectively, <tt>#{ @foo }</tt>, <tt>#{ @@foo }</tt> and
+<tt>#{ $foo }</tt>.
+
Interpolation may be disabled by escaping the "#" character or using
single-quote strings:
@@ -155,15 +199,6 @@ In addition to disabling interpolation, single-quoted strings also disable all
escape sequences except for the single-quote (<tt>\'</tt>) and backslash
(<tt>\\\\</tt>).
-You may also create strings using <tt>%</tt>:
-
- %(1 + 1 is #{1 + 1}) #=> "1 + 1 is 2"
-
-There are two different types of <tt>%</tt> strings <tt>%q(...)</tt> behaves
-like a single-quote string (no interpolation or character escaping), while
-<tt>%Q</tt> behaves as a double-quote string. See Percent Strings below for
-more discussion of the syntax of percent strings.
-
Adjacent string literals are automatically concatenated by the interpreter:
"con" "cat" "en" "at" "ion" #=> "concatenation"
@@ -193,7 +228,12 @@ a single codepoint in the script encoding:
?\C-\M-a #=> "\x81", same as above
?ã‚ #=> "ã‚"
-=== Here Documents (heredocs)
+See also:
+
+* {%q: Non-Interpolable String Literals}[#label-25q-3A+Non-Interpolable+String+Literals]
+* {% and %Q: Interpolable String Literals}[#label-25+and+-25Q-3A+Interpolable+String+Literals]
+
+=== Here Document Literals
If you are writing a large block of text you may use a "here document" or
"heredoc":
@@ -219,7 +259,7 @@ You may indent the ending identifier if you place a "-" after <tt><<</tt>:
That might span many lines
INDENTED_HEREDOC
-Note that the while the closing identifier may be indented, the content is
+Note that while the closing identifier may be indented, the content is
always treated as if it is flush left. If you indent the content those spaces
will appear in the output.
@@ -237,6 +277,12 @@ the content. Note that empty lines and lines consisting solely of literal tabs
and spaces will be ignored for the purposes of determining indentation, but
escaped tabs and spaces are considered non-indentation characters.
+For the purpose of measuring an indentation, a horizontal tab is regarded as a
+sequence of one to eight spaces such that the column position corresponding to
+its end is a multiple of eight. The amount to be removed is counted in terms
+of the number of spaces. If the boundary appears in the middle of a tab, that
+tab is not removed.
+
A heredoc allows interpolation and escaped characters. You may disable
interpolation and escaping by surrounding the opening identifier with single
quotes:
@@ -273,7 +319,7 @@ read:
content for heredoc two
TWO
-== Symbols
+== \Symbol Literals
A Symbol represents a name inside the ruby interpreter. See Symbol for more
details on what symbols are and when ruby creates them internally.
@@ -292,7 +338,12 @@ Like strings, a single-quote may be used to disable interpolation:
When creating a Hash, there is a special syntax for referencing a Symbol as
well.
-== Arrays
+See also:
+
+* {%s: Symbol Literals}[#label-25s-3A+Symbol+Literals]
+
+
+== \Array Literals
An array is created using the objects between <tt>[</tt> and <tt>]</tt>:
@@ -303,9 +354,14 @@ You may place expressions inside the array:
[1, 1 + 1, 1 + 2]
[1, [1 + 1, [1 + 2]]]
+See also:
+
+* {%w and %W: String-Array Literals}[#label-25w+and+-25W-3A+String-Array+Literals]
+* {%i and %I: Symbol-Array Literals}[#label-25i+and+-25I-3A+Symbol-Array+Literals]
+
See Array for the methods you may use with an array.
-== Hashes
+== \Hash Literals
A hash is created using key-value pairs between <tt>{</tt> and <tt>}</tt>:
@@ -327,9 +383,17 @@ is equal to
{ :"a 1" => 1, :"b 2" => 2 }
+Hash values can be omitted, meaning that value will be fetched from the context
+by the name of the key:
+
+ x = 100
+ y = 200
+ h = { x:, y: }
+ #=> {:x=>100, :y=>200}
+
See Hash for the methods you may use with a hash.
-== Ranges
+== \Range Literals
A range represents an interval of values. The range may include or exclude
its ending value.
@@ -342,27 +406,31 @@ its ending value.
You may create a range of any object. See the Range documentation for details
on the methods you need to implement.
-== Regular Expressions
+== \Regexp Literals
-A regular expression is created using "/":
+A regular expression may be created using leading and trailing
+slash (<tt>'/'</tt>) characters:
- /my regular expression/
+ re = /foo/ # => /foo/
+ re.class # => Regexp
-The regular expression may be followed by flags which adjust the matching
-behavior of the regular expression. The "i" flag makes the regular expression
-case-insensitive:
-
- /my regular expression/i
+The trailing slash may be followed by one or more _flag_ characters
+that modify the behavior.
+See {Regexp options}[rdoc-ref:Regexp@Options] for details.
Interpolation may be used inside regular expressions along with escaped
characters. Note that a regular expression may require additional escaped
characters than a string.
+See also:
+
+* {%r: Regexp Literals}[#label-25r-3A+Regexp+Literals]
+
See Regexp for a description of the syntax of regular expressions.
-== Procs
+== Lambda Proc Literals
-A proc can be created with <tt>-></tt>:
+A lambda proc can be created with <tt>-></tt>:
-> { 1 + 1 }
@@ -374,27 +442,93 @@ You can require arguments for the proc as follows:
This proc will add one to its argument.
-== Percent Strings
+== Percent Literals
+
+Each of the literals in described in this section
+may use these paired delimiters:
+
+* <tt>[</tt> and <tt>]</tt>.
+* <tt>(</tt> and <tt>)</tt>.
+* <tt>{</tt> and <tt>}</tt>.
+* <tt><</tt> and <tt>></tt>.
+* Any other character, as both beginning and ending delimiters.
+
+These are demonstrated in the next section.
+
+=== <tt>%q</tt>: Non-Interpolable String Literals
+
+You can write a non-interpolable string with <tt>%q</tt>.
+The created string is the same as if you created it with single quotes:
+
+ %[foo bar baz] # => "foo bar baz" # Using [].
+ %(foo bar baz) # => "foo bar baz" # Using ().
+ %{foo bar baz} # => "foo bar baz" # Using {}.
+ %<foo bar baz> # => "foo bar baz" # Using <>.
+ %|foo bar baz| # => "foo bar baz" # Using two |.
+ %:foo bar baz: # => "foo bar baz" # Using two :.
+ %q(1 + 1 is #{1 + 1}) # => "1 + 1 is \#{1 + 1}" # No interpolation.
+
+=== <tt>% and %Q</tt>: Interpolable String Literals
+
+You can write an interpolable string with <tt>%Q</tt>
+or with its alias <tt>%</tt>:
+
+ %[foo bar baz] # => "foo bar baz"
+ %(1 + 1 is #{1 + 1}) # => "1 + 1 is 2" # Interpolation.
+
+=== <tt>%w and %W</tt>: String-Array Literals
+
+You can write an array of strings with <tt>%w</tt> (non-interpolable)
+or <tt>%W</tt> (interpolable):
+
+ %w[foo bar baz] # => ["foo", "bar", "baz"]
+ %w[1 % *] # => ["1", "%", "*"]
+ # Use backslash to embed spaces in the strings.
+ %w[foo\ bar baz\ bat] # => ["foo bar", "baz bat"]
+ %w(#{1 + 1}) # => ["\#{1", "+", "1}"]
+ %W(#{1 + 1}) # => ["2"]
+
+=== <tt>%i and %I</tt>: Symbol-Array Literals
+
+You can write an array of symbols with <tt>%i</tt> (non-interpolable)
+or <tt>%I</tt> (interpolable):
+
+ %i[foo bar baz] # => [:foo, :bar, :baz]
+ %i[1 % *] # => [:"1", :%, :*]
+ # Use backslash to embed spaces in the symbols.
+ %i[foo\ bar baz\ bat] # => [:"foo bar", :"baz bat"]
+ %i(#{1 + 1}) # => [:"\#{1", :+, :"1}"]
+ %I(#{1 + 1}) # => [:"2"]
+
+=== <tt>%s</tt>: Symbol Literals
+
+You can write a symbol with <tt>%s</tt>:
+
+ %s[foo] # => :foo
+ %s[foo bar] # => :"foo bar"
+
+=== <tt>%r</tt>: Regexp Literals
+
+You can write a regular expression with <tt>%r</tt>;
+the character used as the leading and trailing delimiter
+may be (almost) any character:
+
+ %r/foo/ # => /foo/
+ %r:name/value pair: # => /name\/value pair/
-Besides <tt>%(...)</tt> which creates a String, the <tt>%</tt> may create
-other types of object. As with strings, an uppercase letter allows
-interpolation and escaped characters while a lowercase letter disables them.
+A few "symmetrical" character pairs may be used as delimiters:
-These are the types of percent strings in ruby:
+ %r[foo] # => /foo/
+ %r{foo} # => /foo/
+ %r(foo) # => /foo/
+ %r<foo> # => /foo/
-<tt>%i</tt> :: Array of Symbols
-<tt>%q</tt> :: String
-<tt>%r</tt> :: Regular Expression
-<tt>%s</tt> :: Symbol
-<tt>%w</tt> :: Array of Strings
-<tt>%x</tt> :: Backtick (capture subshell result)
+The trailing delimiter may be followed by one or more _flag_ characters
+that modify the behavior.
+See {Regexp options}[rdoc-ref:Regexp@Options] for details.
-For the two array forms of percent string, if you wish to include a space in
-one of the array entries you must escape it with a "\\" character:
+=== <tt>%x</tt>: Backtick Literals
- %w[one one-hundred\ one]
- #=> ["one", "one-hundred one"]
+You can write and execute a shell command with <tt>%x</tt>:
-If you are using "(", "[", "{", "<" you must close it with ")", "]", "}", ">"
-respectively. You may use most other non-alphanumeric characters for percent
-string delimiters such as "%", "|", "^", etc.
+ %x(echo 1) # => "1\n"
diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc
index 924e31611f..8dafa6bb0c 100644
--- a/doc/syntax/methods.rdoc
+++ b/doc/syntax/methods.rdoc
@@ -11,6 +11,11 @@ A method definition consists of the +def+ keyword, a method name, the body of
the method, +return+ value and the +end+ keyword. When called the method will
execute the body of the method. This method returns +2+.
+Since Ruby 3.0, there is also a shorthand syntax for methods consisting
+of exactly one expression:
+
+ def one_plus_one = 1 + 1
+
This section only covers defining methods. See also the {syntax documentation
on calling methods}[rdoc-ref:syntax/calling_methods.rdoc].
@@ -64,6 +69,23 @@ object to indicate a true value (or "truthy" value).
Methods that end with an equals sign indicate an assignment method.
+ class C
+ def attr
+ @attr
+ end
+
+ def attr=(val)
+ @attr = val
+ end
+ end
+
+ c = C.new
+ c.attr #=> nil
+ c.attr = 10 # calls "attr=(10)"
+ c.attr #=> 10
+
+Assignment methods can not be defined using the shorthand syntax.
+
These are method names for the various Ruby operators. Each of these
operators accepts only one argument. Following the operator is the typical
use or name of the operator. Creating an alternate meaning for the operator
@@ -258,6 +280,13 @@ The parentheses around the arguments are optional:
value + 1
end
+The parentheses are mandatory in shorthand method definitions:
+
+ # OK
+ def add_one(value) = value + 1
+ # SyntaxError
+ def add_one value = value + 1
+
Multiple arguments are separated by a comma:
def add_values(a, b)
@@ -379,11 +408,22 @@ converted to an Array:
gather_arguments 1, 2, 3 # prints [1, 2, 3]
-The array argument must be the last positional argument, it must appear before
-any keyword arguments.
+The array argument must appear before any keyword arguments.
+
+It is possible to gather arguments at the beginning or in the middle:
+
+ def gather_arguments(first_arg, *middle_arguments, last_arg)
+ p middle_arguments
+ end
-The array argument will capture a Hash as the last entry if a hash was sent by
-the caller after all positional arguments.
+ gather_arguments 1, 2, 3, 4 # prints [2, 3]
+
+The array argument will capture a Hash as the last entry if keywords were
+provided by the caller after all positional arguments.
+
+ def gather_arguments(*arguments)
+ p arguments
+ end
gather_arguments 1, a: 2 # prints [1, {:a=>2}]
@@ -401,6 +441,13 @@ Also, note that a bare <code>*</code> can be used to ignore arguments:
def ignore_arguments(*)
end
+You can also use a bare <code>*</code> when calling a method to pass the
+arguments directly to another method:
+
+ def delegate_arguments(*)
+ other_method(*)
+ end
+
=== Keyword Arguments
Keyword arguments are similar to positional arguments with default values:
@@ -441,6 +488,13 @@ Also, note that <code>**</code> can be used to ignore keyword arguments:
def ignore_keywords(**)
end
+You can also use <code>**</code> when calling a method to delegate
+keyword arguments to another method:
+
+ def delegate_keywords(**)
+ other_method(**)
+ end
+
To mark a method as accepting keywords, but not actually accepting
keywords, you can use the <code>**nil</code>:
@@ -451,107 +505,105 @@ Calling such a method with keywords or a non-empty keyword splat will
result in an ArgumentError. This syntax is supported so that keywords
can be added to the method later without affected backwards compatibility.
-=== Keyword and Positional Argument Separation
+If a method definition does not accept any keywords, and the
+<code>**nil</code> syntax is not used, any keywords provided when calling
+the method will be converted to a Hash positional argument:
-Between Ruby 2.0 and 2.6, keyword and positional arguments were not
-separated, and a keyword argument could be used as a positional argument
-and vice-versa. In Ruby 3.0, keyword and positional arguments will
-be separated if the method definition includes keyword arguments.
-In Ruby 3.0, if the method definition does not include keyword arguments,
-keyword arguments provided when calling the method will continue to be
-treated as a final positional hash argument.
-
-Currently, the keyword and positional arguments are not separated,
-but cases where behavior will change in Ruby 3.0 will result in a
-warning being emitted.
-
-There are a few different types of keyword argument separation issues.
+ def meth(arg)
+ arg
+ end
+ meth(a: 1)
+ # => {:a=>1}
-==== Conversion of Hash to Keywords
+=== Block Argument
-If a method is called with the hash, the hash could be treated as
-keywords:
+The block argument is indicated by <code>&</code> and must come last:
- def my_method(**keywords)
- keywords
+ def my_method(&my_block)
+ my_block.call(self)
end
- my_method({a: 1}) # {:a => 1}
-This occurs even if the hash could be an optional positional argument
-or an element of a rest argument:
+Most frequently the block argument is used to pass a block to another method:
- def my_method(hash=nil, **keywords)
- [hash, keywords]
+ def each_item(&block)
+ @items.each(&block)
end
- my_method({a: 1}) # [nil, {:a => 1}]
- def my_method(*args, **keywords)
- [args, keywords]
+You are not required to give a name to the block if you will just be passing
+it to another method:
+
+ def each_item(&)
+ @items.each(&)
end
- my_method({a: 1}) # [[], {:a => 1}]
-However, if the hash is needed for a mandatory positional argument,
-it would not be treated as keywords:
+If you are only going to call the block and will not otherwise manipulate it
+or send it to another method, using <code>yield</code> without an explicit
+block parameter is preferred. This method is equivalent to the first method
+in this section:
- def my_method(hash, **keywords)
- [hash, keywords]
+ def my_method
+ yield self
end
- my_method({a: 1}) # [{:a => 1}, {}]
-==== Conversion of Keywords to Positional Arguments
+=== Argument Forwarding
-If a method is called with keywords, but it is missing one
-mandatory positional argument, the keywords are converted to
-a hash and the hash used as the mandatory positional argument:
+Since Ruby 2.7, an all-arguments forwarding syntax is available:
- def my_method(hash, **keywords)
- [hash, keywords]
+ def concrete_method(*positional_args, **keyword_args, &block)
+ [positional_args, keyword_args, block]
end
- my_method(a: 1) # [{:a => 1}, {}]
-
-This is also true for empty keyword splats:
- kw = {}
- my_method(**kw) # [{}, {}]
+ def forwarding_method(...)
+ concrete_method(...)
+ end
-==== Splitting of Positional Hashes or Keywords
+ forwarding_method(1, b: 2) { puts 3 }
+ #=> [[1], {:b=>2}, #<Proc:...skip...>]
-If a method definition accepts specific keywords and not arbitrary keywords,
-keywords or a positional hash may be split if the hash includes both Symbol
-keys and non-Symbol keys and the keywords or positional hash are not needed
-as a mandatory positional argument. In this case, the non-Symbol keys are
-separated into a positional argument hash, and the Symbol keys are used
-as the keyword arguments:
+Calling with forwarding <code>...</code> is available only in methods
+defined with <code>...</code>.
- def my_method(hash=3, a: 4)
- [hash, a]
+ def regular_method(arg, **kwarg)
+ concrete_method(...) # Syntax error
end
- my_method(a: 1, 'a' => 2) # [{"a"=>2}, 1]
- my_method({a: 1, 'a' => 2}) # [{"a"=>2}, 1]
-== Block Argument
+Since Ruby 3.0, there can be leading arguments before <code>...</code>
+both in definitions and in invocations (but in definitions they can be
+only positional arguments without default values).
-The block argument is indicated by <code>&</code> and must come last:
+ def request(method, path, **headers)
+ puts "#{method.upcase} #{path} #{headers}"
+ end
- def my_method(&my_block)
- my_block.call(self)
+ def get(...)
+ request(:GET, ...) # leading argument in invoking
end
-Most frequently the block argument is used to pass a block to another method:
+ get('http://ruby-lang.org', 'Accept' => 'text/html')
+ # Prints: GET http://ruby-lang.org {"Accept"=>"text/html"}
- def each_item(&block)
- @items.each(&block)
+ def logged_get(msg, ...) # leading argument in definition
+ puts "Invoking #get: #{msg}"
+ get(...)
end
-If you are only going to call the block and will not otherwise manipulate it
-or send it to another method using <code>yield</code> without an explicit
-block parameter is preferred. This method is equivalent to the first method
-in this section:
+ logged_get('Ruby site', 'http://ruby-lang.org')
+ # Prints:
+ # Invoking #get: Ruby site
+ # GET http://ruby-lang.org {}
- def my_method
- yield self
+Note that omitting parentheses in forwarding calls may lead to
+unexpected results:
+
+ def log(...)
+ puts ... # This would be treated as `puts()...',
+ # i.e. endless range from puts result
end
+ log("test")
+ # Prints: warning: ... at EOL, should be parenthesized?
+ # ...and then empty line
+
== Exception Handling
Methods have an implied exception handling block so you do not need to use
diff --git a/doc/syntax/miscellaneous.rdoc b/doc/syntax/miscellaneous.rdoc
index 87ec059ae7..d5cfd3e474 100644
--- a/doc/syntax/miscellaneous.rdoc
+++ b/doc/syntax/miscellaneous.rdoc
@@ -83,6 +83,36 @@ Using the specific reflection methods such as instance_variable_defined? for
instance variables or const_defined? for constants is less error prone than
using +defined?+.
++defined?+ handles some regexp global variables specially based on whether
+there is an active regexp match and how many capture groups there are:
+
+ /b/ =~ 'a'
+ defined?($~) # => "global-variable"
+ defined?($&) # => nil
+ defined?($`) # => nil
+ defined?($') # => nil
+ defined?($+) # => nil
+ defined?($1) # => nil
+ defined?($2) # => nil
+
+ /./ =~ 'a'
+ defined?($~) # => "global-variable"
+ defined?($&) # => "global-variable"
+ defined?($`) # => "global-variable"
+ defined?($') # => "global-variable"
+ defined?($+) # => nil
+ defined?($1) # => nil
+ defined?($2) # => nil
+
+ /(.)/ =~ 'a'
+ defined?($~) # => "global-variable"
+ defined?($&) # => "global-variable"
+ defined?($`) # => "global-variable"
+ defined?($') # => "global-variable"
+ defined?($+) # => "global-variable"
+ defined?($1) # => "global-variable"
+ defined?($2) # => nil
+
== +BEGIN+ and +END+
+BEGIN+ defines a block that is run before any other code in the current file.
diff --git a/doc/syntax/modules_and_classes.rdoc b/doc/syntax/modules_and_classes.rdoc
index 6122f6e08e..024815a5a6 100644
--- a/doc/syntax/modules_and_classes.rdoc
+++ b/doc/syntax/modules_and_classes.rdoc
@@ -155,8 +155,8 @@ Ruby has three types of visibility. The default is +public+. A public method
may be called from any other object.
The second visibility is +protected+. When calling a protected method the
-sender must be a subclass of the receiver or the receiver must be a subclass of
-the sender. Otherwise a NoMethodError will be raised.
+sender must inherit the Class or Module which defines the method. Otherwise a
+NoMethodError will be raised.
Protected visibility is most frequently used to define <code>==</code> and
other comparison methods where the author does not wish to expose an object's
diff --git a/doc/syntax/pattern_matching.rdoc b/doc/syntax/pattern_matching.rdoc
new file mode 100644
index 0000000000..b7d614770c
--- /dev/null
+++ b/doc/syntax/pattern_matching.rdoc
@@ -0,0 +1,540 @@
+= Pattern matching
+
+Pattern matching is a feature allowing deep matching of structured values: checking the structure and binding the matched parts to local variables.
+
+Pattern matching in Ruby is implemented with the +case+/+in+ expression:
+
+ case <expression>
+ in <pattern1>
+ ...
+ in <pattern2>
+ ...
+ in <pattern3>
+ ...
+ else
+ ...
+ end
+
+(Note that +in+ and +when+ branches can NOT be mixed in one +case+ expression.)
+
+Or with the <code>=></code> operator and the +in+ operator, which can be used in a standalone expression:
+
+ <expression> => <pattern>
+
+ <expression> in <pattern>
+
+The +case+/+in+ expression is _exhaustive_: if the value of the expression does not match any branch of the +case+ expression (and the +else+ branch is absent), +NoMatchingPatternError+ is raised.
+
+Therefore, the +case+ expression might be used for conditional matching and unpacking:
+
+ config = {db: {user: 'admin', password: 'abc123'}}
+
+ case config
+ in db: {user:} # matches subhash and puts matched value in variable user
+ puts "Connect with user '#{user}'"
+ in connection: {username: }
+ puts "Connect with user '#{username}'"
+ else
+ puts "Unrecognized structure of config"
+ end
+ # Prints: "Connect with user 'admin'"
+
+whilst the <code>=></code> operator is most useful when the expected data structure is known beforehand, to just unpack parts of it:
+
+ config = {db: {user: 'admin', password: 'abc123'}}
+
+ config => {db: {user:}} # will raise if the config's structure is unexpected
+
+ puts "Connect with user '#{user}'"
+ # Prints: "Connect with user 'admin'"
+
+<code><expression> in <pattern></code> is the same as <code>case <expression>; in <pattern>; true; else false; end</code>.
+You can use it when you only want to know if a pattern has been matched or not:
+
+ users = [{name: "Alice", age: 12}, {name: "Bob", age: 23}]
+ users.any? {|user| user in {name: /B/, age: 20..} } #=> true
+
+See below for more examples and explanations of the syntax.
+
+== Patterns
+
+Patterns can be:
+
+* any Ruby object (matched by the <code>===</code> operator, like in +when+); (<em>Value pattern</em>)
+* array pattern: <code>[<subpattern>, <subpattern>, <subpattern>, ...]</code>; (<em>Array pattern</em>)
+* find pattern: <code>[*variable, <subpattern>, <subpattern>, <subpattern>, ..., *variable]</code>; (<em>Find pattern</em>)
+* hash pattern: <code>{key: <subpattern>, key: <subpattern>, ...}</code>; (<em>Hash pattern</em>)
+* combination of patterns with <code>|</code>; (<em>Alternative pattern</em>)
+* variable capture: <code><pattern> => variable</code> or <code>variable</code>; (<em>As pattern</em>, <em>Variable pattern</em>)
+
+Any pattern can be nested inside array/find/hash patterns where <code><subpattern></code> is specified.
+
+Array patterns and find patterns match arrays, or objects that respond to +deconstruct+ (see below about the latter).
+Hash patterns match hashes, or objects that respond to +deconstruct_keys+ (see below about the latter). Note that only symbol keys are supported for hash patterns.
+
+An important difference between array and hash pattern behavior is that arrays match only a _whole_ array:
+
+ case [1, 2, 3]
+ in [Integer, Integer]
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "not matched"
+
+while the hash matches even if there are other keys besides the specified part:
+
+ case {a: 1, b: 2, c: 3}
+ in {a: Integer}
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+<code>{}</code> is the only exclusion from this rule. It matches only if an empty hash is given:
+
+ case {a: 1, b: 2, c: 3}
+ in {}
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "not matched"
+
+ case {}
+ in {}
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+There is also a way to specify there should be no other keys in the matched hash except those explicitly specified by the pattern, with <code>**nil</code>:
+
+ case {a: 1, b: 2}
+ in {a: Integer, **nil} # this will not match the pattern having keys other than a:
+ "matched a part"
+ in {a: Integer, b: Integer, **nil}
+ "matched a whole"
+ else
+ "not matched"
+ end
+ #=> "matched a whole"
+
+Both array and hash patterns support "rest" specification:
+
+ case [1, 2, 3]
+ in [Integer, *]
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+ case {a: 1, b: 2, c: 3}
+ in {a: Integer, **}
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+Parentheses around both kinds of patterns could be omitted:
+
+ case [1, 2]
+ in Integer, Integer
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+ case {a: 1, b: 2, c: 3}
+ in a: Integer
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+ [1, 2] => a, b
+ [1, 2] in a, b
+
+ {a: 1, b: 2, c: 3} => a:
+ {a: 1, b: 2, c: 3} in a:
+
+Find pattern is similar to array pattern but it can be used to check if the given object has any elements that match the pattern:
+
+ case ["a", 1, "b", "c", 2]
+ in [*, String, String, *]
+ "matched"
+ else
+ "not matched"
+ end
+
+== Variable binding
+
+Besides deep structural checks, one of the very important features of the pattern matching is the binding of the matched parts to local variables. The basic form of binding is just specifying <code>=> variable_name</code> after the matched (sub)pattern (one might find this similar to storing exceptions in local variables in a <code>rescue ExceptionClass => var</code> clause):
+
+ case [1, 2]
+ in Integer => a, Integer
+ "matched: #{a}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+ case {a: 1, b: 2, c: 3}
+ in a: Integer => m
+ "matched: #{m}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+If no additional check is required, for only binding some part of the data to a variable, a simpler form could be used:
+
+ case [1, 2]
+ in a, Integer
+ "matched: #{a}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+ case {a: 1, b: 2, c: 3}
+ in a: m
+ "matched: #{m}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+For hash patterns, even a simpler form exists: key-only specification (without any sub-pattern) binds the local variable with the key's name, too:
+
+ case {a: 1, b: 2, c: 3}
+ in a:
+ "matched: #{a}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+Binding works for nested patterns as well:
+
+ case {name: 'John', friends: [{name: 'Jane'}, {name: 'Rajesh'}]}
+ in name:, friends: [{name: first_friend}, *]
+ "matched: #{first_friend}"
+ else
+ "not matched"
+ end
+ #=> "matched: Jane"
+
+The "rest" part of a pattern also can be bound to a variable:
+
+ case [1, 2, 3]
+ in a, *rest
+ "matched: #{a}, #{rest}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1, [2, 3]"
+
+ case {a: 1, b: 2, c: 3}
+ in a:, **rest
+ "matched: #{a}, #{rest}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1, {:b=>2, :c=>3}"
+
+Binding to variables currently does NOT work for alternative patterns joined with <code>|</code>:
+
+ case {a: 1, b: 2}
+ in {a: } | Array
+ "matched: #{a}"
+ else
+ "not matched"
+ end
+ # SyntaxError (illegal variable in alternative pattern (a))
+
+Variables that start with <code>_</code> are the only exclusions from this rule:
+
+ case {a: 1, b: 2}
+ in {a: _, b: _foo} | Array
+ "matched: #{_}, #{_foo}"
+ else
+ "not matched"
+ end
+ # => "matched: 1, 2"
+
+It is, though, not advised to reuse the bound value, as this pattern's goal is to signify a discarded value.
+
+== Variable pinning
+
+Due to the variable binding feature, existing local variable can not be straightforwardly used as a sub-pattern:
+
+ expectation = 18
+
+ case [1, 2]
+ in expectation, *rest
+ "matched. expectation was: #{expectation}"
+ else
+ "not matched. expectation was: #{expectation}"
+ end
+ # expected: "not matched. expectation was: 18"
+ # real: "matched. expectation was: 1" -- local variable just rewritten
+
+For this case, the pin operator <code>^</code> can be used, to tell Ruby "just use this value as part of the pattern":
+
+ expectation = 18
+ case [1, 2]
+ in ^expectation, *rest
+ "matched. expectation was: #{expectation}"
+ else
+ "not matched. expectation was: #{expectation}"
+ end
+ #=> "not matched. expectation was: 18"
+
+One important usage of variable pinning is specifying that the same value should occur in the pattern several times:
+
+ jane = {school: 'high', schools: [{id: 1, level: 'middle'}, {id: 2, level: 'high'}]}
+ john = {school: 'high', schools: [{id: 1, level: 'middle'}]}
+
+ case jane
+ in school:, schools: [*, {id:, level: ^school}] # select the last school, level should match
+ "matched. school: #{id}"
+ else
+ "not matched"
+ end
+ #=> "matched. school: 2"
+
+ case john # the specified school level is "high", but last school does not match
+ in school:, schools: [*, {id:, level: ^school}]
+ "matched. school: #{id}"
+ else
+ "not matched"
+ end
+ #=> "not matched"
+
+In addition to pinning local variables, you can also pin instance, global, and class variables:
+
+ $gvar = 1
+ class A
+ @ivar = 2
+ @@cvar = 3
+ case [1, 2, 3]
+ in ^$gvar, ^@ivar, ^@@cvar
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+ end
+
+You can also pin the result of arbitrary expressions using parentheses:
+
+ a = 1
+ b = 2
+ case 3
+ in ^(a + b)
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+== Matching non-primitive objects: +deconstruct+ and +deconstruct_keys+
+
+As already mentioned above, array, find, and hash patterns besides literal arrays and hashes will try to match any object implementing +deconstruct+ (for array/find patterns) or +deconstruct_keys+ (for hash patterns).
+
+ class Point
+ def initialize(x, y)
+ @x, @y = x, y
+ end
+
+ def deconstruct
+ puts "deconstruct called"
+ [@x, @y]
+ end
+
+ def deconstruct_keys(keys)
+ puts "deconstruct_keys called with #{keys.inspect}"
+ {x: @x, y: @y}
+ end
+ end
+
+ case Point.new(1, -2)
+ in px, Integer # sub-patterns and variable binding works
+ "matched: #{px}"
+ else
+ "not matched"
+ end
+ # prints "deconstruct called"
+ "matched: 1"
+
+ case Point.new(1, -2)
+ in x: 0.. => px
+ "matched: #{px}"
+ else
+ "not matched"
+ end
+ # prints: deconstruct_keys called with [:x]
+ #=> "matched: 1"
+
++keys+ are passed to +deconstruct_keys+ to provide a room for optimization in the matched class: if calculating a full hash representation is expensive, one may calculate only the necessary subhash. When the <code>**rest</code> pattern is used, +nil+ is passed as a +keys+ value:
+
+ case Point.new(1, -2)
+ in x: 0.. => px, **rest
+ "matched: #{px}"
+ else
+ "not matched"
+ end
+ # prints: deconstruct_keys called with nil
+ #=> "matched: 1"
+
+Additionally, when matching custom classes, the expected class can be specified as part of the pattern and is checked with <code>===</code>
+
+ class SuperPoint < Point
+ end
+
+ case Point.new(1, -2)
+ in SuperPoint(x: 0.. => px)
+ "matched: #{px}"
+ else
+ "not matched"
+ end
+ #=> "not matched"
+
+ case SuperPoint.new(1, -2)
+ in SuperPoint[x: 0.. => px] # [] or () parentheses are allowed
+ "matched: #{px}"
+ else
+ "not matched"
+ end
+ #=> "matched: 1"
+
+== Guard clauses
+
++if+ can be used to attach an additional condition (guard clause) when the pattern matches. This condition may use bound variables:
+
+ case [1, 2]
+ in a, b if b == a*2
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+ case [1, 1]
+ in a, b if b == a*2
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "not matched"
+
++unless+ works, too:
+
+ case [1, 1]
+ in a, b unless b == a*2
+ "matched"
+ else
+ "not matched"
+ end
+ #=> "matched"
+
+== Current feature status
+
+As of Ruby 3.1, find patterns are considered _experimental_: its syntax can change in the future. Every time you use these features in code, a warning will be printed:
+
+ [0] => [*, 0, *]
+ # warning: Find pattern is experimental, and the behavior may change in future versions of Ruby!
+ # warning: One-line pattern matching is experimental, and the behavior may change in future versions of Ruby!
+
+To suppress this warning, one may use the Warning::[]= method:
+
+ Warning[:experimental] = false
+ eval('[0] => [*, 0, *]')
+ # ...no warning printed...
+
+Note that pattern-matching warnings are raised at compile time, so this will not suppress the warning:
+
+ Warning[:experimental] = false # At the time this line is evaluated, the parsing happened and warning emitted
+ [0] => [*, 0, *]
+
+So, only subsequently loaded files or `eval`-ed code is affected by switching the flag.
+
+Alternatively, the command line option <code>-W:no-experimental</code> can be used to turn off "experimental" feature warnings.
+
+== Appendix A. Pattern syntax
+
+Approximate syntax is:
+
+ pattern: value_pattern
+ | variable_pattern
+ | alternative_pattern
+ | as_pattern
+ | array_pattern
+ | find_pattern
+ | hash_pattern
+
+ value_pattern: literal
+ | Constant
+ | ^local_variable
+ | ^instance_variable
+ | ^class_variable
+ | ^global_variable
+ | ^(expression)
+
+ variable_pattern: variable
+
+ alternative_pattern: pattern | pattern | ...
+
+ as_pattern: pattern => variable
+
+ array_pattern: [pattern, ..., *variable]
+ | Constant(pattern, ..., *variable)
+ | Constant[pattern, ..., *variable]
+
+ find_pattern: [*variable, pattern, ..., *variable]
+ | Constant(*variable, pattern, ..., *variable)
+ | Constant[*variable, pattern, ..., *variable]
+
+ hash_pattern: {key: pattern, key:, ..., **variable}
+ | Constant(key: pattern, key:, ..., **variable)
+ | Constant[key: pattern, key:, ..., **variable]
+
+== Appendix B. Some undefined behavior examples
+
+To leave room for optimization in the future, the specification contains some undefined behavior.
+
+Use of a variable in an unmatched pattern:
+
+ case [0, 1]
+ in [a, 2]
+ "not matched"
+ in b
+ "matched"
+ in c
+ "not matched"
+ end
+ a #=> undefined
+ c #=> undefined
+
+Number of +deconstruct+, +deconstruct_keys+ method calls:
+
+ $i = 0
+ ary = [0]
+ def ary.deconstruct
+ $i += 1
+ self
+ end
+ case ary
+ in [0, 1]
+ "not matched"
+ in [0]
+ "matched"
+ end
+ $i #=> undefined
diff --git a/doc/syntax/precedence.rdoc b/doc/syntax/precedence.rdoc
index f64691ab1f..f0ca92b571 100644
--- a/doc/syntax/precedence.rdoc
+++ b/doc/syntax/precedence.rdoc
@@ -55,7 +55,7 @@ keywords. For example, this is a modifier-unless statement:
Note that <code>(a if b rescue c)</code> is parsed as <code>((a if b) rescue
c)</code> due to reasons not related to precedence. See {modifier
-statements}[control_expressions_rdoc.html#label-Modifier+Statements].
+statements}[control_expressions.rdoc#label-Modifier+Statements].
<code>{ ... }</code> blocks have priority below all listed operations, but
<code>do ... end</code> blocks have lower priority.
diff --git a/doc/syntax/refinements.rdoc b/doc/syntax/refinements.rdoc
index fc554bb476..c900ab1bdc 100644
--- a/doc/syntax/refinements.rdoc
+++ b/doc/syntax/refinements.rdoc
@@ -245,7 +245,8 @@ When +super+ is invoked method lookup checks:
Note that +super+ in a method of a refinement invokes the method in the
refined class even if there is another refinement which has been activated in
-the same context.
+the same context. This is only true for +super+ in a method of a refinement, it
+does not apply to +super+ in a method in a module that is included in a refinement.
== Methods Introspection
@@ -278,6 +279,6 @@ Refinements in descendants have higher precedence than those of ancestors.
== Further Reading
-See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RefinementsSpec for the
+See https://bugs.ruby-lang.org/projects/ruby-master/wiki/RefinementsSpec for the
current specification for implementing refinements. The specification also
contains more details.
diff --git a/doc/timezones.rdoc b/doc/timezones.rdoc
new file mode 100644
index 0000000000..c3aae88fde
--- /dev/null
+++ b/doc/timezones.rdoc
@@ -0,0 +1,108 @@
+== Timezones
+
+=== Timezone Specifiers
+
+Certain \Time methods accept arguments that specify timezones:
+
+- Time.at: keyword argument +in:+.
+- Time.new: positional argument +zone+ or keyword argument +in:+.
+- Time.now: keyword argument +in:+.
+- Time#getlocal: positional argument +zone+.
+- Time#localtime: positional argument +zone+.
+
+The value given with any of these must be one of the following
+(each detailed below):
+
+- {Hours/minutes offset}[rdoc-ref:timezones.rdoc@Hours-2FMinutes+Offsets].
+- {Single-letter offset}[rdoc-ref:timezones.rdoc@Single-Letter+Offsets].
+- {Integer offset}[rdoc-ref:timezones.rdoc@Integer+Offsets].
+- {Timezone object}[rdoc-ref:timezones.rdoc@Timezone+Objects].
+
+==== Hours/Minutes Offsets
+
+The zone value may be a string offset from UTC
+in the form <tt>'+HH:MM'</tt> or <tt>'-HH:MM'</tt>,
+where:
+
+- +HH+ is the 2-digit hour in the range <tt>0..23</tt>.
+- +MM+ is the 2-digit minute in the range <tt>0..59</tt>.
+
+Examples:
+
+ t = Time.utc(2000, 1, 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
+ Time.at(t, in: '-23:59') # => 1999-12-31 20:16:01 -2359
+ Time.at(t, in: '+23:59') # => 2000-01-02 20:14:01 +2359
+
+==== Single-Letter Offsets
+
+The zone value may be a letter in the range <tt>'A'..'I'</tt>
+or <tt>'K'..'Z'</tt>;
+see {List of military time zones}[https://en.wikipedia.org/wiki/List_of_military_time_zones]:
+
+ t = Time.utc(2000, 1, 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
+ Time.at(t, in: 'A') # => 2000-01-01 21:15:01 +0100
+ Time.at(t, in: 'I') # => 2000-01-02 05:15:01 +0900
+ Time.at(t, in: 'K') # => 2000-01-02 06:15:01 +1000
+ Time.at(t, in: 'Y') # => 2000-01-01 08:15:01 -1200
+ Time.at(t, in: 'Z') # => 2000-01-01 20:15:01 UTC
+
+==== \Integer Offsets
+
+The zone value may be an integer number of seconds
+in the range <tt>-86399..86399</tt>:
+
+ t = Time.utc(2000, 1, 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
+ Time.at(t, in: -86399) # => 1999-12-31 20:15:02 -235959
+ Time.at(t, in: 86399) # => 2000-01-02 20:15:00 +235959
+
+==== Timezone Objects
+
+In most cases, the zone value may be an object
+responding to certain timezone methods.
+
+\Exceptions (timezone object not allowed):
+
+- Time.new with positional argument +zone+.
+- Time.now with keyword argument +in:+.
+
+The timezone methods are:
+
+- +local_to_utc+:
+
+ - Called when Time.new is invoked with +tz+
+ as the value of positional argument +zone+ or keyword argument +in:+.
+ - Argument: a <tt>Time::tm</tt> object.
+ - Returns: a \Time-like object in the UTC timezone.
+
+- +utc_to_local+:
+
+ - Called when Time.at or Time.now is invoked with +tz+
+ as the value for keyword argument +in:+,
+ and when Time#getlocal or Time#localtime is called with +tz+
+ as the value for positional argument +zone+.
+ - Argument: a <tt>Time::tm</tt> object.
+ - Returns: a \Time-like object in the local timezone.
+
+A custom timezone class may have these instance methods,
+which will be called if defined:
+
+- +abbr+:
+
+ - Called when Time#strftime is invoked with a format involving <tt>%Z</tt>.
+ - Argument: a <tt>Time::tm</tt> object.
+ - Returns: a string abbreviation for the timezone name.
+
+- +dst?+:
+
+ - Called when Time.at or Time.now is invoked with +tz+
+ as the value for keyword argument +in:+,
+ and when Time#getlocal or Time#localtime is called with +tz+
+ as the value for positional argument +zone+.
+ - Argument: a <tt>Time::tm</tt> object.
+ - Returns: whether the time is daylight saving time.
+
+- +name+:
+
+ - Called when <tt>Marshal.dump(t) is invoked
+ - Argument: none.
+ - Returns: the string name of the timezone.
diff --git a/doc/transcode.rdoc b/doc/transcode.rdoc
new file mode 100644
index 0000000000..4f15dff94a
--- /dev/null
+++ b/doc/transcode.rdoc
@@ -0,0 +1,52 @@
+# :markup: ruby
+
+class String
+ # call-seq:
+ # encode(dst_encoding = Encoding.default_internal, **enc_opts) -> string
+ # encode(dst_encoding, src_encoding, **enc_opts) -> string
+ #
+ # Returns a copy of +self+ transcoded as determined by +dst_encoding+.
+ # By default, raises an exception if +self+
+ # contains an invalid byte or a character not defined in +dst_encoding+;
+ # that behavior may be modified by encoding options; see below.
+ #
+ # With no arguments:
+ #
+ # - Uses the same encoding if <tt>Encoding.default_internal</tt> is +nil+
+ # (the default):
+ #
+ # Encoding.default_internal # => nil
+ # s = "Ruby\x99".force_encoding('Windows-1252')
+ # s.encoding # => #<Encoding:Windows-1252>
+ # s.bytes # => [82, 117, 98, 121, 153]
+ # t = s.encode # => "Ruby\x99"
+ # t.encoding # => #<Encoding:Windows-1252>
+ # t.bytes # => [82, 117, 98, 121, 226, 132, 162]
+ #
+ # - Otherwise, uses the encoding <tt>Encoding.default_internal</tt>:
+ #
+ # Encoding.default_internal = 'UTF-8'
+ # t = s.encode # => "Rubyâ„¢"
+ # t.encoding # => #<Encoding:UTF-8>
+ #
+ # With only argument +dst_encoding+ given, uses that encoding:
+ #
+ # s = "Ruby\x99".force_encoding('Windows-1252')
+ # s.encoding # => #<Encoding:Windows-1252>
+ # t = s.encode('UTF-8') # => "Rubyâ„¢"
+ # t.encoding # => #<Encoding:UTF-8>
+ #
+ # With arguments +dst_encoding+ and +src_encoding+ given,
+ # interprets +self+ using +src_encoding+, encodes the new string using +dst_encoding+:
+ #
+ # s = "Ruby\x99"
+ # t = s.encode('UTF-8', 'Windows-1252') # => "Rubyâ„¢"
+ # t.encoding # => #<Encoding:UTF-8>
+ #
+ # Optional keyword arguments +enc_opts+ specify encoding options;
+ # see {Encoding Options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ def encode(dst_encoding = Encoding.default_internal, **enc_opts)
+ # Pseudo code
+ Primitive.str_encode(...)
+ end
+end
diff --git a/doc/yjit/yjit.md b/doc/yjit/yjit.md
new file mode 100644
index 0000000000..67b2ffa5f0
--- /dev/null
+++ b/doc/yjit/yjit.md
@@ -0,0 +1,417 @@
+<p align="center">
+ <a href="https://yjit.org/" target="_blank" rel="noopener noreferrer">
+ <img src="https://user-images.githubusercontent.com/224488/131155756-aa8fb528-a813-4dfd-99ac-8785c3d5eed7.png" width="400">
+ </a>
+</p>
+
+
+YJIT - Yet Another Ruby JIT
+===========================
+
+YJIT is a lightweight, minimalistic Ruby JIT built inside CRuby.
+It lazily compiles code using a Basic Block Versioning (BBV) architecture.
+The target use case is that of servers running Ruby on Rails.
+YJIT is currently supported for macOS, Linux and BSD on x86-64 and arm64/aarch64 CPUs.
+This project is open source and falls under the same license as CRuby.
+
+<p align="center"><b>
+ If you're using YJIT in production, please
+ <a href="mailto:maxime.chevalierboisvert@shopify.com">share your success stories with us!</a>
+ </b></p>
+
+If you wish to learn more about the approach taken, here are some conference talks and publications:
+- RubyKaigi 2022 keynote: [Stories from developing YJIT](https://www.youtube.com/watch?v=EMchdR9C8XM)
+- RubyKaigi 2022 talk: [Building a Lightweight IR and Backend for YJIT](https://www.youtube.com/watch?v=BbLGqTxTRp0)
+- RubyKaigi 2021 talk: [YJIT: Building a New JIT Compiler Inside CRuby](https://www.youtube.com/watch?v=PBVLf3yfMs8)
+- Blog post: [YJIT: Building a New JIT Compiler Inside CRuby](https://pointersgonewild.com/2021/06/02/yjit-building-a-new-jit-compiler-inside-cruby/)
+- VMIL 2021 paper: [YJIT: A Basic Block Versioning JIT Compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781)
+- MoreVMs 2021 talk: [YJIT: Building a New JIT Compiler Inside CRuby](https://www.youtube.com/watch?v=vucLAqv7qpc)
+- ECOOP 2016 talk: [Interprocedural Type Specialization of JavaScript Programs Without Type Analysis](https://www.youtube.com/watch?v=sRNBY7Ss97A)
+- ECOOP 2016 paper: [Interprocedural Type Specialization of JavaScript Programs Without Type Analysis](https://drops.dagstuhl.de/opus/volltexte/2016/6101/pdf/LIPIcs-ECOOP-2016-7.pdf)
+- ECOOP 2015 talk: [Simple and Effective Type Check Removal through Lazy Basic Block Versioning](https://www.youtube.com/watch?v=S-aHBuoiYE0)
+- ECOOP 2015 paper: [Simple and Effective Type Check Removal through Lazy Basic Block Versioning](https://arxiv.org/pdf/1411.0352.pdf)
+
+To cite YJIT in your publications, please cite the VMIL 2021 paper:
+
+```
+@inproceedings{yjit_vmil2021,
+author = {Chevalier-Boisvert, Maxime and Gibbs, Noah and Boussier, Jean and Wu, Si Xing (Alan) and Patterson, Aaron and Newton, Kevin and Hawthorn, John},
+title = {YJIT: A Basic Block Versioning JIT Compiler for CRuby},
+year = {2021},
+isbn = {9781450391092},
+publisher = {Association for Computing Machinery},
+address = {New York, NY, USA},
+url = {https://doi.org/10.1145/3486606.3486781},
+doi = {10.1145/3486606.3486781},
+booktitle = {Proceedings of the 13th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages},
+pages = {25–32},
+numpages = {8},
+keywords = {ruby, dynamically typed, compiler, optimization, just-in-time, bytecode},
+location = {Chicago, IL, USA},
+series = {VMIL 2021}
+}
+```
+
+## Current Limitations
+
+YJIT may not be suitable for certain applications. It currently only supports macOS and Linux on x86-64 and arm64/aarch64 CPUs. YJIT will use more memory than the Ruby interpreter because the JIT compiler needs to generate machine code in memory and maintain additional state information.
+You can change how much executable memory is allocated using [YJIT's command-line options](#command-line-options). There is a slight performance tradeoff because allocating less executable memory could result in the generated machine code being collected more often.
+
+## Installation
+
+### Requirements
+
+You will need to install:
+- A C compiler such as GCC or Clang
+- GNU Make and Autoconf
+- The Rust compiler `rustc` and Cargo (if you want to build in dev/debug mode)
+ - The Rust version must be [>= 1.58.0](../../yjit/Cargo.toml).
+
+To install the Rust build toolchain, we suggest following the [recommended installation method][rust-install]. Rust also provides first class [support][editor-tools] for many source code editors.
+
+[rust-install]: https://www.rust-lang.org/tools/install
+[editor-tools]: https://www.rust-lang.org/tools
+
+### Building YJIT
+
+Start by cloning the `ruby/ruby` repository:
+
+```sh
+git clone https://github.com/ruby/ruby yjit
+cd yjit
+```
+
+The YJIT `ruby` binary can be built with either GCC or Clang. It can be built either in dev (debug) mode or in release mode. For maximum performance, compile YJIT in release mode with GCC. More detailed build instructions are provided in the [Ruby README](https://github.com/ruby/ruby#how-to-build).
+
+```sh
+# Configure in release mode for maximum performance, build and install
+./autogen.sh
+./configure --enable-yjit --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc
+make -j && make install
+```
+
+or
+
+```sh
+# Configure in lower-performance dev (debug) mode for development, build and install
+./autogen.sh
+./configure --enable-yjit=dev --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc
+make -j && make install
+```
+
+Dev mode includes extended YJIT statistics, but can be slow. For only statistics you can configure in stats mode:
+
+```sh
+# Configure in extended-stats mode without slow runtime checks, build and install
+./autogen.sh
+./configure --enable-yjit=stats --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc
+make -j && make install
+```
+
+On macOS, you may need to specify where to find some libraries:
+
+```sh
+# Install dependencies
+brew install openssl readline libyaml
+
+# Configure in dev (debug) mode for development, build and install
+./autogen.sh
+./configure --enable-yjit=dev --prefix=$HOME/.rubies/ruby-yjit --disable-install-doc --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml)"
+make -j && make install
+```
+
+Typically configure will choose the default C compiler. To specify the C compiler, use
+
+```sh
+# Choosing a specific c compiler
+export CC=/path/to/my/chosen/c/compiler
+```
+
+before running `./configure`.
+
+You can test that YJIT works correctly by running:
+
+```sh
+# Quick tests found in /bootstraptest
+make btest
+
+# Complete set of tests
+make -j test-all
+```
+
+## Usage
+
+### Examples
+
+Once YJIT is built, you can either use `./miniruby` from within your build directory, or switch to the YJIT version of `ruby`
+by using the `chruby` tool:
+
+```sh
+chruby ruby-yjit
+ruby myscript.rb
+```
+
+You can dump statistics about compilation and execution by running YJIT with the `--yjit-stats` command-line option:
+
+```sh
+./miniruby --yjit-stats myscript.rb
+```
+
+The machine code generated for a given method can be printed by adding `puts RubyVM::YJIT.disasm(method(:method_name))` to a Ruby script. Note that no code will be generated if the method is not compiled.
+
+### Command-Line Options
+
+YJIT supports all command-line options supported by upstream CRuby, but also adds a few YJIT-specific options:
+
+- `--yjit`: enable YJIT (disabled by default)
+- `--yjit-call-threshold=N`: number of calls after which YJIT begins to compile a function (default 30)
+- `--yjit-exec-mem-size=N`: size of the executable memory block to allocate, in MiB (default 64 MiB)
+- `--yjit-stats`: print statistics after the execution of a program (incurs a run-time cost)
+- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats`
+
+Note that there is also an environment variable `RUBY_YJIT_ENABLE` which can be used to enable YJIT.
+This can be useful for some deployment scripts where specifying an extra command-line option to Ruby is not practical.
+
+### Benchmarking
+
+We have collected a set of benchmarks and implemented a simple benchmarking harness in the [yjit-bench](https://github.com/Shopify/yjit-bench) repository. This benchmarking harness is designed to disable CPU frequency scaling, set process affinity and disable address space randomization so that the variance between benchmarking runs will be as small as possible. Please kindly note that we are at an early stage in this project.
+
+## Performance Tips for Production Deployments
+
+While YJIT options default to what we think would work well for most workloads,
+they might not necessarily be the best configuration for your application.
+
+This section covers tips on improving YJIT performance in case YJIT does not
+speed up your application in production.
+
+### Increasing --yjit-exec-mem-size
+
+When JIT code size (`RubyVM::YJIT.runtime_stats[:code_region_size]`) reaches this value,
+YJIT triggers "code GC" that frees all JIT code and starts recompiling everything.
+Compiling code takes some time, so scheduling code GC too frequently slows down your application.
+Increasing `--yjit-exec-mem-size` may speed up your application if `RubyVM::YJIT.runtime_stats[:code_gc_count]` is not 0 or 1.
+
+### Running workers as long as possible
+
+It's helpful to call the same code as many times as possible before a process restarts.
+If a process is killed too frequently, the time taken for compiling methods may outweigh
+the speedup obtained by compiling them.
+
+You should monitor the number of requests each process has served.
+If you're periodically killing worker processes, e.g. with `unicorn-worker-killer` or `puma_worker_killer`,
+you may want to reduce the killing frequency or increase the limit.
+
+## Saving YJIT Memory Usage
+
+YJIT allocates memory for JIT code and metadata. Enabling YJIT generally results in more memory usage.
+
+This section goes over tips on minimizing YJIT memory usage in case it uses more than your capacity.
+
+### Increasing --yjit-call-threshold
+
+As of Ruby 3.2, `--yjit-call-threshold` defaults to 30. With this default, some applications end up
+compiling methods that are used only during the application boot. Increasing this option may help
+you reduce the size of JIT code and metadata. It's worth trying different values like `--yjit-call-threshold=100`.
+
+Note that increasing the value too much may result in compiling code too late.
+You should monitor how many requests each worker processes before it's restarted. For example,
+if each process only handles 1000 requests, `--yjit-call-threshold=1000` might be too large for your application.
+
+### Decreasing --yjit-exec-mem-size
+
+`--yjit-exec-mem-size` specifies the JIT code size, but YJIT also uses memory for its metadata,
+which often consumes more memory than JIT code. Generally, YJIT adds memory overhead by roughly
+3-4x of `--yjit-exec-mem-size` in production as of Ruby 3.2. You should multiply that by the number
+of worker processes to estimate the worst case memory overhead.
+
+Running code GC adds overhead, but it could be still faster than recovering from a whole process killed by OOM.
+
+## Code Optimization Tips
+
+This section contains tips on writing Ruby code that will run as fast as possible on YJIT. Some of this advice is based on current limitations of YJIT, while other advice is broadly applicable. It probably won't be practical to apply these tips everywhere in your codebase. You should ideally start by profiling your application using a tool such as [stackprof](https://github.com/tmm1/stackprof) so that you can determine which methods make up most of the execution time. You can then refactor the specific methods that make up the largest fractions of the execution time. We do not recommend modifying your entire codebase based on the current limitations of YJIT.
+
+- Avoid using `OpenStruct`
+- Avoid redefining basic integer operations (i.e. +, -, <, >, etc.)
+- Avoid redefining the meaning of `nil`, equality, etc.
+- Avoid allocating objects in the hot parts of your code
+- Minimize layers of indirection
+ - Avoid classes that wrap objects if you can
+ - Avoid methods that just call another method, trivial one liner methods
+- Try to write code so that the same variables always have the same type
+- Use `while` loops if you can, instead of C methods like `Array#each`
+ - This is not idiomatic Ruby, but could help in hot methods
+- CRuby method calls are costly. Avoid things such as methods that only return a value from a hash or return a constant.
+
+You can also use the `--yjit-stats` command-line option to see which bytecodes cause YJIT to exit, and refactor your code to avoid using these instructions in the hottest methods of your code.
+
+### Other Statistics
+
+If you run `ruby` with `--yjit --yjit-stats`, YJIT will track and return performance statistics in `RubyVM::YJIT.runtime_stats`.
+
+```rb
+$ RUBYOPT="--yjit --yjit-stats" irb
+irb(main):001:0> RubyVM::YJIT.runtime_stats
+=>
+{:inline_code_size=>340745,
+ :outlined_code_size=>297664,
+ :all_stats=>true,
+ :exec_instruction=>1547816,
+ :send_callsite_not_simple=>7267,
+ :send_kw_splat=>7,
+ :send_ivar_set_method=>72,
+...
+```
+
+Some of the counters include:
+
+* :exec_instruction - how many Ruby bytecode instructions have been executed
+* :binding_allocations - number of bindings allocated
+* :binding_set - number of variables set via a binding
+* :code_gc_count - number of garbage collections of compiled code since process start
+* :vm_insns_count - number of instructions executed by the Ruby interpreter
+* :compiled_iseq_count - number of bytecode sequences compiled
+* :inline_code_size - size in bytes of compiled YJIT blocks
+* :outline_code_size - size in bytes of YJIT error-handling compiled code
+* :side_exit_count - number of side exits taken at runtime
+* :total_exit_count - number of exits, including side exits, taken at runtime
+* :avg_len_in_yjit - avg. number of instructions in compiled blocks before exiting to interpreter
+
+Counters starting with "exit_" show reasons for YJIT code taking a side exit (return to the interpreter.) See yjit_hacking.md for more details.
+
+Performance counter names are not guaranteed to remain the same between Ruby versions. If you're curious what one does, it's usually best to search the source code for it &mdash; but it may change in a later Ruby version.
+
+The printed text after a --yjit-stats run includes other information that may be named differently than the information in runtime_stats.
+
+## Contributing
+
+We welcome open source contributors. You should feel free to open new issues to report bugs or just to ask questions.
+Suggestions on how to make this readme file more helpful for new contributors are most welcome.
+
+Bug fixes and bug reports are very valuable to us. If you find a bug in YJIT, it's very possible be that nobody has reported it before,
+or that we don't have a good reproduction for it, so please open an issue and provide as much information as you can about your configuration and a description of how you encountered the problem. List the commands you used to run YJIT so that we can easily reproduce the issue on our end and investigate it. If you are able to produce a small program reproducing the error to help us track it down, that is very much appreciated as well.
+
+If you would like to contribute a large patch to YJIT, we suggest opening an issue or a discussion on this repository so that
+we can have an active discussion. A common problem is that sometimes people submit large pull requests to open source projects
+without prior communication, and we have to reject them because the work they implemented does not fit within the design of the
+project. We want to save you time and frustration, so please reach out and we can have a productive discussion as to how
+you can contribute things we will want to merge into YJIT.
+
+### Source Code Organization
+
+The YJIT source code is divided between:
+- `yjit.c`: code YJIT uses to interface with the rest of CRuby
+- `yjit.h`: C definitions YJIT exposes to the rest of the CRuby
+- `yjit.rb`: `YJIT` Ruby module that is exposed to Ruby
+- `yjit/src/asm/*`: in-memory assembler we use to generate machine code
+- `yjit/src/codegen.rs`: logic for translating Ruby bytecode to machine code
+- `yjit/src/core.rb`: basic block versioning logic, core structure of YJIT
+- `yjit/src/stats.rs`: gathering of run-time statistics
+- `yjit/src/options.rs`: handling of command-line options
+- `yjit/bindgen/src/main.rs`: C bindings exposed to the Rust codebase through bindgen
+- `yjit/src/cruby.rs`: C bindings manually exposed to the Rust codebase
+
+The core of CRuby's interpreter logic is found in:
+- `insns.def`: defines Ruby's bytecode instructions (gets compiled into `vm.inc`)
+- `vm_insnshelper.c`: logic used by Ruby's bytecode instructions
+- `vm_exec.c`: Ruby interpreter loop
+
+### Generating C bindings with bindgen
+
+In order to expose C functions to the Rust codebase, you will need to generate C bindings:
+
+```sh
+CC=clang ./configure --enable-yjit=dev
+make -j yjit-bindgen
+```
+
+This uses the bindgen tools to generate/update `yjit/src/cruby_bindings.inc.rs` based on the
+bindings listed in `yjit/bindgen/src/main.rs`. Avoid manually editing this file
+as it could be automatically regenerated at a later time. If you need to manually add C bindings,
+add them to `yjit/cruby.rs` instead.
+
+### Coding & Debugging Protips
+
+There are 3 test suites:
+- `make btest` (see `/bootstraptest`)
+- `make test-all`
+- `make test-spec`
+- `make check` runs all of the above
+
+The tests can be run in parallel like this:
+
+```sh
+make -j test-all RUN_OPTS="--yjit-call-threshold=1"
+```
+
+Or single-threaded like this, to more easily identify which specific test is failing:
+
+```sh
+make test-all TESTOPTS=--verbose RUN_OPTS="--yjit-call-threshold=1"
+```
+
+To debug a single test in `test-all`:
+
+```sh
+make test-all TESTS='test/-ext-/marshal/test_usrmarshal.rb' RUNRUBYOPT=--debugger=lldb RUN_OPTS="--yjit-call-threshold=1"
+```
+
+You can also run one specific test in `btest`:
+
+```sh
+make btest BTESTS=bootstraptest/test_ractor.rb RUN_OPTS="--yjit-call-threshold=1"
+```
+
+There are shortcuts to run/debug your own test/repro in `test.rb`:
+
+```sh
+make run # runs ./miniruby test.rb
+make lldb # launches ./miniruby test.rb in lldb
+```
+
+You can use the Intel syntax for disassembly in LLDB, keeping it consistent with YJIT's disassembly:
+
+```sh
+echo "settings set target.x86-disassembly-flavor intel" >> ~/.lldbinit
+```
+
+## Running x86 YJIT on Apple's Rosetta
+
+For development purposes, it is possible to run x86 YJIT on an Apple M1 via Rosetta. You can find basic
+instructions below, but there are a few caveats listed further down.
+
+First, install Rosetta:
+
+```sh
+$ softwareupdate --install-rosetta
+```
+
+Now any command can be run with Rosetta via the `arch` command line tool.
+
+Then you can start your shell in an x86 environment:
+
+```sh
+$ arch -x86_64 zsh
+```
+
+You can double check your current architecture via the `arch` command:
+
+```sh
+$ arch -x86_64 zsh
+$ arch
+i386
+```
+
+You may need to set the default target for `rustc` to x86-64, e.g.
+
+```sh
+$ rustup default stable-x86_64-apple-darwin
+```
+
+While in your i386 shell, install Cargo and Homebrew, then hack away!
+
+### Rosetta Caveats
+
+1. You must install a version of Homebrew for each architecture
+2. Cargo will install in $HOME/.cargo by default, and I don't know a good way to change architectures after install
+
+If you use Fish shell you can [read this link](https://tenderlovemaking.com/2022/01/07/homebrew-rosetta-and-ruby.html) for information on making the dev environment easier.
diff --git a/doc/yjit/yjit_hacking.md b/doc/yjit/yjit_hacking.md
new file mode 100644
index 0000000000..4c4d742b73
--- /dev/null
+++ b/doc/yjit/yjit_hacking.md
@@ -0,0 +1,75 @@
+# YJIT Hacking
+
+## Code Generation and Assembly Language
+
+YJIT’s basic purpose is to take ISEQs and generate machine code.
+
+Documentation on each Ruby bytecode can be found in insns.def.
+
+YJIT uses those bytecodes as the “Basic Blocks†in Lazy Basic Block Versioning (LBBV.) For more deep details of LBBV, see yjit.md in this directory.
+
+Current YJIT has a simple assembler as a backend. Each method that generates code does it by emitting machine code:
+
+```
+# Excerpt of yjit_gen_exit() from yjit_codegen.c, Sept 2021
+// Generate an exit to return to the interpreter
+static uint32_t
+yjit_gen_exit(VALUE *exit_pc, ctx_t *ctx, codeblock_t *cb)
+{
+ const uint32_t code_pos = cb->write_pos;
+
+ ADD_COMMENT(cb, "exit to interpreter");
+
+ // Generate the code to exit to the interpreters
+ // Write the adjusted SP back into the CFP
+ if (ctx->sp_offset != 0) {
+ x86opnd_t stack_pointer = ctx_sp_opnd(ctx, 0);
+ lea(cb, REG_SP, stack_pointer);
+ mov(cb, member_opnd(REG_CFP, rb_control_frame_t, sp), REG_SP);
+ }
+
+ // Update CFP->PC
+ mov(cb, RAX, const_ptr_opnd(exit_pc));
+ mov(cb, member_opnd(REG_CFP, rb_control_frame_t, pc), RAX);
+```
+
+Later there will be a more complex backend.
+
+## Code Generation vs Code Execution
+
+When you see lea() call above (“load effective address,â€) it’s not running the LEA x86 instruction. It’s generating an LEA instruction to the codeblock pointer in the first argument. It will execute that instruction later, when the codeblock gets executed.
+
+This is subtle because YJIT will often wait to compile the method until you’re about to run it -- that’s when it knows the most about what types of arguments the method will receive. So it’s a compile-time instruction, but often it will defer compile-time until just barely before runtime.
+
+The ctx structure tracks what is known at compile time about the arguments being passed into the Ruby bytecode. Often YJIT will “peek†at an expected type before it generates machine code.
+
+## Inlined and Outlined Code
+
+When YJIT is generating code, it needs a code pointer. In many cases it needs two, usually called “cb†(codeblock) and “ocb†(out-of-line codeblock.)
+
+cb is for “inlined†normal code and ocb is for “outline†code such as exits. Inlined code is normal generated code for Ruby operations, while outlined code is for unusual and error conditions, such as encountering an unexpected parameter type and exiting to the interpreter.
+
+The purpose of the outlined code block is to keep things we believe are going to be infrequent somewhere else. That way we can keep the code in the inline block more linear and compact. Linear code, with as few branches as possible, is more easily predicted by the CPU. An exception or unsupported operation will cause YJIT to generate outlined code to handle it.
+
+If you search for ocb in yjit_codegen.c, you can see some places where out-of-line code is generated.
+
+YJIT statistics are only gathered when RUBY_DEBUG or YJIT_STATS is true. In some cases the code to increment YJIT statistics will be generated out-of-line, especially if those statistics are gathered when a side exit happens.
+
+## Statistics and Comments
+
+When RUBY_DEBUG is defined to a true value, YJIT will emit comments into the generated machine code. This can make disassemblies a lot more readable. When RUBY_DEBUG or YJIT_STATS is defined and stats are active (--yjit-stats or export YJIT_STATS=1), code will be generated to collect statistics during the run, and a report will be printed when the process exits.
+
+## Entering and Exiting the Interpreter
+
+YJIT won’t generate machine code for an ISEQ until it’s been run a certain number of times (10 by default.) Then, the next time the interpreter would call that ISEQ, it will call the generated machine code version instead. If YJIT hits an unexpected or unsupported operation, it will return to the normal interpreter.
+
+If YJIT returns to the interpreter, the behaviour will be correct but slower. YJIT only optimises part of some operations - for instance, YJIT will not optimise a BMETHOD call yet.
+
+When the interpreter calls to a YJIT-optimised method again, control will return to YJIT’s generated machine code. The more time that’s spent in YJIT-generated code (“ratio in YJIT,â€) the more CPU time YJIT can save with its optimisations.
+
+## Side Exits
+
+When YJIT has compiled an ISEQ and is running it later, sometimes it will hit an unexpected condition. It might see a parameter of a different type than before, or square-brackets might be used on a hash when they were first used on an array. In those cases, the generated code will contain a call to return to the interpreter at runtime, called a “side exit.â€
+
+Side exits are generated as out-of-line code.
+
diff --git a/enc/Makefile.in b/enc/Makefile.in
index 8385236494..9d0c367134 100644
--- a/enc/Makefile.in
+++ b/enc/Makefile.in
@@ -1,4 +1,5 @@
V = 0
+V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@@NULLCMD@)
@@ -11,6 +12,7 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
top_srcdir = $(encsrcdir:/enc=)
srcdir = $(top_srcdir)
+tooldir = $(top_srcdir)/tool
arch = @arch@
EXTOUT = @EXTOUT@
hdrdir = $(srcdir)/include
@@ -20,6 +22,7 @@ TRANSSODIR = $(ENCSODIR)/trans
DLEXT = @DLEXT@
OBJEXT = @OBJEXT@
LIBEXT = @LIBEXT@
+EXEEXT = @EXEEXT@
TIMESTAMPDIR = $(EXTOUT)/.timestamp
ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time
ENC_TRANS_SO_D = $(TIMESTAMPDIR)/.enc-trans.so.time
@@ -33,6 +36,7 @@ RUBY_SO_NAME = @RUBY_SO_NAME@
LIBRUBY = @LIBRUBY@
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
LIBRUBYARG_STATIC = $(LIBRUBYARG_SHARED)
+BUILTRUBY = $(topdir)/miniruby$(EXEEXT)
empty =
AR = @AR@
@@ -47,7 +51,7 @@ optflags = @optflags@
debugflags = @debugflags@
warnflags = @warnflags@
CCDLFLAGS = @CCDLFLAGS@
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir) @incflags@
DEFS = @DEFS@
CPPFLAGS = @CPPFLAGS@ -DONIG_ENC_REGISTER=rb_enc_register
LDFLAGS = @LDFLAGS@
diff --git a/enc/ascii.c b/enc/ascii.c
index 8b32c414fe..ae7db97f25 100644
--- a/enc/ascii.c
+++ b/enc/ascii.c
@@ -33,8 +33,8 @@
# include "encindex.h"
#endif
-#ifndef ENCINDEX_ASCII
-# define ENCINDEX_ASCII 0
+#ifndef ENCINDEX_ASCII_8BIT
+# define ENCINDEX_ASCII_8BIT 0
#endif
OnigEncodingDefine(ascii, ASCII) = {
@@ -55,12 +55,14 @@ OnigEncodingDefine(ascii, ASCII) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match,
onigenc_single_byte_ascii_only_case_map,
- ENCINDEX_ASCII,
+ ENCINDEX_ASCII_8BIT,
ONIGENC_FLAG_NONE,
};
ENC_ALIAS("BINARY", "ASCII-8BIT")
ENC_REPLICATE("IBM437", "ASCII-8BIT")
ENC_ALIAS("CP437", "IBM437")
+ENC_REPLICATE("IBM720", "ASCII-8BIT")
+ENC_ALIAS("CP720", "IBM720")
ENC_REPLICATE("IBM737", "ASCII-8BIT")
ENC_ALIAS("CP737", "IBM737")
ENC_REPLICATE("IBM775", "ASCII-8BIT")
diff --git a/enc/cesu_8.c b/enc/cesu_8.c
index decbb928f4..75f62df280 100644
--- a/enc/cesu_8.c
+++ b/enc/cesu_8.c
@@ -42,6 +42,8 @@
#define VALID_CODE_LIMIT 0x0010ffff
#define utf8_islead(c) ((UChar )((c) & 0xc0) != 0x80)
+#define utf16_is_high_surrogate(v) ((v >> 10) == 0x36)
+#define utf16_is_low_surrogate(v) ((v >> 10) == 0x37)
static const int EncLen_CESU8[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -283,6 +285,12 @@ is_mbc_newline(const UChar* p, const UChar* end, OnigEncoding enc)
return 0;
}
+static int
+utf8_decode_3byte_sequence(const UChar* p)
+{
+ return ((p[0] & 0xF) << 12) | ((p[1] & 0x3f) << 6) | (p[2] & 0x3f);
+}
+
static OnigCodePoint
mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
{
@@ -295,11 +303,11 @@ mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
case 2:
return ((p[0] & 0x1F) << 6) | (p[1] & 0x3f);
case 3:
- return ((p[0] & 0xF) << 12) | ((p[1] & 0x3f) << 6) | (p[2] & 0x3f);
+ return utf8_decode_3byte_sequence(p);
case 6:
{
- int high = ((p[0] & 0xF) << 12) | ((p[1] & 0x3f) << 6) | (p[2] & 0x3f);
- int low = ((p[3] & 0xF) << 12) | ((p[4] & 0x3f) << 6) | (p[5] & 0x3f);
+ int high = utf8_decode_3byte_sequence(p);
+ int low = utf8_decode_3byte_sequence(p + 3);
return ((high & 0x03ff) << 10) + (low & 0x03ff) + 0x10000;
}
}
@@ -410,7 +418,6 @@ get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out,
return onigenc_unicode_ctype_code_range(ctype, ranges);
}
-
static UChar*
left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
{
@@ -420,6 +427,14 @@ left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, Onig
p = s;
while (!utf8_islead(*p) && p > start) p--;
+
+ if (p > start && s - p == 2 && utf16_is_low_surrogate(utf8_decode_3byte_sequence(p))) {
+ const UChar *p_surrogate_pair = p - 1;
+ while (!utf8_islead(*p_surrogate_pair) && p_surrogate_pair > start) p_surrogate_pair--;
+ if (p - p_surrogate_pair == 3 && utf16_is_high_surrogate(utf8_decode_3byte_sequence(p_surrogate_pair))) {
+ return (UChar* )p_surrogate_pair;
+ }
+ }
return (UChar* )p;
}
diff --git a/enc/cp949.c b/enc/cp949.c
index bd2c8d21a4..1600d0cd5b 100644
--- a/enc/cp949.c
+++ b/enc/cp949.c
@@ -218,5 +218,5 @@ OnigEncodingDefine(cp949, CP949) = {
/*
* Name: CP949
* Link: http://www.microsoft.com/globaldev/reference/dbcs/949.mspx
- * Link: http://en.wikipedia.org/wiki/EUC-KR#EUC-KR
+ * Link: https://en.wikipedia.org/wiki/EUC-KR#EUC-KR
*/
diff --git a/enc/depend b/enc/depend
index 0fffcc273f..973ad93010 100644
--- a/enc/depend
+++ b/enc/depend
@@ -18,6 +18,7 @@
% else
% pathrep = proc {|path| path}
% end
+% ignore_error = $ignore_error
VPATH = <%=%w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(srcdir) $(encsrcdir)].join(CONFIG["PATH_SEPARATOR"])%>
LIBPATH = <%=libpathflag($DEFLIBPATH)%>
@@ -73,12 +74,12 @@ $(LIBENC): $(ENCOBJS)
@$(RM) $@
$(ECHO) linking statically-linked encoding library $@
$(Q) $(AR) $(ARFLAGS)$@ $(ENCOBJS)
- @-$(RANLIB) $@ 2> /dev/null || true
+ @-$(RANLIB) $@<%=ignore_error%>
$(LIBTRANS): $(TRANSOBJS)
@$(RM) $@
$(ECHO) linking statically-linked transcoder library $@
$(Q) $(AR) $(ARFLAGS)$@ $(TRANSOBJS)
- @-$(RANLIB) $@ 2> /dev/null || true
+ @-$(RANLIB) $@<%=ignore_error%>
enc trans $(ENCSOS) $(TRANSSOS): config.status
@@ -97,7 +98,7 @@ $(ENCSOS) $(TRANSSOS): $(ENC_TRANS_SO_D)
<%=transvpath_prefix%>.trans<%=transvpath_prefix%>.c:
$(ECHO) generating table from $@
- $(Q)$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<"
+ $(Q)$(MINIRUBY) "$(tooldir)/transcode-tblgen.rb" -v$(V0:1=v)o "$@" "$<"
% unless ENCS.empty? or TRANS.empty?
@@ -113,7 +114,7 @@ enc/<%=e%>.$(OBJEXT): <%=deps.map {|n| rule_subst % n}.join(' ')%>
% if src.empty?
% src = trans.scan(/^\s*transcode_tblgen_\w+\s+[\'\"]([^\'\"]*)/).flatten.map{|c|c.downcase+"-tbl.rb"}
% end
-<%=transvpath % "#{e}.c"%>: <%= src.map {|s| transvpath % "#{s}"}.join(" ")%> $(srcdir)/tool/transcode-tblgen.rb
+<%=transvpath % "#{e}.c"%>: <%= src.map {|s| transvpath % "#{s}"}.join(" ")%> $(tooldir)/transcode-tblgen.rb
% end
% end
@@ -156,240 +157,5062 @@ clean:
% %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS) $(ENC_TRANS_D) $(ENC_TRANS_SO_D)].each do |clean|
$(Q)$(RM) <%=pathrep[clean]%>
% end
-% @ignore_error = $nmake ? '' : ' 2> /dev/null || true'
% unless inplace
$(Q)$(RM) enc/unicode/*/casefold.h enc/unicode/*/name2ctype.h
$(Q)$(RM) enc/jis/props.h
- -$(Q)$(RMDIR) enc/unicode<%=@ignore_error%>
+ -$(Q)$(RMDIR) enc/unicode<%=ignore_error%>
% end
% workdirs.reverse_each do|d|
- -$(Q)$(RMDIR) <%=pathrep[d]%><%=@ignore_error%>
+ -$(Q)$(RMDIR) <%=pathrep[d]%><%=ignore_error%>
% end
clean-srcs:
$(Q)$(RM) <%=pathrep['$(TRANSCSRCS)']%>
- -$(Q)$(RMDIR) <%=pathrep['enc/trans']%><%=@ignore_error%>
+ -$(Q)$(RMDIR) <%=pathrep['enc/trans']%><%=ignore_error%>
$(Q)$(RM) enc/unicode/*/casefold.h enc/unicode/*/name2ctype.h
$(Q)$(RM) enc/jis/props.h
- -$(Q)$(RMDIR) <%=pathrep['enc/unicode']%><%=@ignore_error%>
- -$(Q)$(RMDIR) <%=pathrep['enc/props']%><%=@ignore_error%>
- -$(Q)$(RMDIR) <%=pathrep['enc']%><%=@ignore_error%>
+ -$(Q)$(RMDIR) <%=pathrep['enc/unicode']%><%=ignore_error%>
+ -$(Q)$(RMDIR) <%=pathrep['enc/props']%><%=ignore_error%>
+ -$(Q)$(RMDIR) <%=pathrep['enc']%><%=ignore_error%>
<%# vim: set ft=eruby noexpandtab ts=8 sw=2 : -%>
# AUTOGENERATED DEPENDENCIES START
+enc/ascii.$(OBJEXT): $(hdrdir)/ruby.h
+enc/ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/ascii.$(OBJEXT): $(top_srcdir)/encindex.h
enc/ascii.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/ascii.$(OBJEXT): assert.h
+enc/ascii.$(OBJEXT): backward/2/assume.h
+enc/ascii.$(OBJEXT): backward/2/attributes.h
+enc/ascii.$(OBJEXT): backward/2/bool.h
+enc/ascii.$(OBJEXT): backward/2/inttypes.h
+enc/ascii.$(OBJEXT): backward/2/limits.h
+enc/ascii.$(OBJEXT): backward/2/long_long.h
+enc/ascii.$(OBJEXT): backward/2/stdalign.h
+enc/ascii.$(OBJEXT): backward/2/stdarg.h
enc/ascii.$(OBJEXT): config.h
enc/ascii.$(OBJEXT): defines.h
enc/ascii.$(OBJEXT): enc/ascii.c
+enc/ascii.$(OBJEXT): encoding.h
+enc/ascii.$(OBJEXT): intern.h
+enc/ascii.$(OBJEXT): internal/abi.h
+enc/ascii.$(OBJEXT): internal/anyargs.h
+enc/ascii.$(OBJEXT): internal/arithmetic.h
+enc/ascii.$(OBJEXT): internal/arithmetic/char.h
+enc/ascii.$(OBJEXT): internal/arithmetic/double.h
+enc/ascii.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/ascii.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/int.h
+enc/ascii.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/long.h
+enc/ascii.$(OBJEXT): internal/arithmetic/long_long.h
+enc/ascii.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/off_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/short.h
+enc/ascii.$(OBJEXT): internal/arithmetic/size_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/ascii.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/ascii.$(OBJEXT): internal/assume.h
+enc/ascii.$(OBJEXT): internal/attr/alloc_size.h
+enc/ascii.$(OBJEXT): internal/attr/artificial.h
+enc/ascii.$(OBJEXT): internal/attr/cold.h
+enc/ascii.$(OBJEXT): internal/attr/const.h
+enc/ascii.$(OBJEXT): internal/attr/constexpr.h
+enc/ascii.$(OBJEXT): internal/attr/deprecated.h
+enc/ascii.$(OBJEXT): internal/attr/diagnose_if.h
+enc/ascii.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/ascii.$(OBJEXT): internal/attr/error.h
+enc/ascii.$(OBJEXT): internal/attr/flag_enum.h
+enc/ascii.$(OBJEXT): internal/attr/forceinline.h
+enc/ascii.$(OBJEXT): internal/attr/format.h
+enc/ascii.$(OBJEXT): internal/attr/maybe_unused.h
+enc/ascii.$(OBJEXT): internal/attr/noalias.h
+enc/ascii.$(OBJEXT): internal/attr/nodiscard.h
+enc/ascii.$(OBJEXT): internal/attr/noexcept.h
+enc/ascii.$(OBJEXT): internal/attr/noinline.h
+enc/ascii.$(OBJEXT): internal/attr/nonnull.h
+enc/ascii.$(OBJEXT): internal/attr/noreturn.h
+enc/ascii.$(OBJEXT): internal/attr/pure.h
+enc/ascii.$(OBJEXT): internal/attr/restrict.h
+enc/ascii.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/ascii.$(OBJEXT): internal/attr/warning.h
+enc/ascii.$(OBJEXT): internal/attr/weakref.h
+enc/ascii.$(OBJEXT): internal/cast.h
+enc/ascii.$(OBJEXT): internal/compiler_is.h
+enc/ascii.$(OBJEXT): internal/compiler_is/apple.h
+enc/ascii.$(OBJEXT): internal/compiler_is/clang.h
+enc/ascii.$(OBJEXT): internal/compiler_is/gcc.h
+enc/ascii.$(OBJEXT): internal/compiler_is/intel.h
+enc/ascii.$(OBJEXT): internal/compiler_is/msvc.h
+enc/ascii.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/ascii.$(OBJEXT): internal/compiler_since.h
+enc/ascii.$(OBJEXT): internal/config.h
+enc/ascii.$(OBJEXT): internal/constant_p.h
+enc/ascii.$(OBJEXT): internal/core.h
+enc/ascii.$(OBJEXT): internal/core/rarray.h
+enc/ascii.$(OBJEXT): internal/core/rbasic.h
+enc/ascii.$(OBJEXT): internal/core/rbignum.h
+enc/ascii.$(OBJEXT): internal/core/rclass.h
+enc/ascii.$(OBJEXT): internal/core/rdata.h
+enc/ascii.$(OBJEXT): internal/core/rfile.h
+enc/ascii.$(OBJEXT): internal/core/rhash.h
+enc/ascii.$(OBJEXT): internal/core/robject.h
+enc/ascii.$(OBJEXT): internal/core/rregexp.h
+enc/ascii.$(OBJEXT): internal/core/rstring.h
+enc/ascii.$(OBJEXT): internal/core/rstruct.h
+enc/ascii.$(OBJEXT): internal/core/rtypeddata.h
+enc/ascii.$(OBJEXT): internal/ctype.h
+enc/ascii.$(OBJEXT): internal/dllexport.h
+enc/ascii.$(OBJEXT): internal/dosish.h
+enc/ascii.$(OBJEXT): internal/encoding/coderange.h
+enc/ascii.$(OBJEXT): internal/encoding/ctype.h
+enc/ascii.$(OBJEXT): internal/encoding/encoding.h
+enc/ascii.$(OBJEXT): internal/encoding/pathname.h
+enc/ascii.$(OBJEXT): internal/encoding/re.h
+enc/ascii.$(OBJEXT): internal/encoding/sprintf.h
+enc/ascii.$(OBJEXT): internal/encoding/string.h
+enc/ascii.$(OBJEXT): internal/encoding/symbol.h
+enc/ascii.$(OBJEXT): internal/encoding/transcode.h
+enc/ascii.$(OBJEXT): internal/error.h
+enc/ascii.$(OBJEXT): internal/eval.h
+enc/ascii.$(OBJEXT): internal/event.h
+enc/ascii.$(OBJEXT): internal/fl_type.h
+enc/ascii.$(OBJEXT): internal/gc.h
+enc/ascii.$(OBJEXT): internal/glob.h
+enc/ascii.$(OBJEXT): internal/globals.h
+enc/ascii.$(OBJEXT): internal/has/attribute.h
+enc/ascii.$(OBJEXT): internal/has/builtin.h
+enc/ascii.$(OBJEXT): internal/has/c_attribute.h
+enc/ascii.$(OBJEXT): internal/has/cpp_attribute.h
+enc/ascii.$(OBJEXT): internal/has/declspec_attribute.h
+enc/ascii.$(OBJEXT): internal/has/extension.h
+enc/ascii.$(OBJEXT): internal/has/feature.h
+enc/ascii.$(OBJEXT): internal/has/warning.h
+enc/ascii.$(OBJEXT): internal/intern/array.h
+enc/ascii.$(OBJEXT): internal/intern/bignum.h
+enc/ascii.$(OBJEXT): internal/intern/class.h
+enc/ascii.$(OBJEXT): internal/intern/compar.h
+enc/ascii.$(OBJEXT): internal/intern/complex.h
+enc/ascii.$(OBJEXT): internal/intern/cont.h
+enc/ascii.$(OBJEXT): internal/intern/dir.h
+enc/ascii.$(OBJEXT): internal/intern/enum.h
+enc/ascii.$(OBJEXT): internal/intern/enumerator.h
+enc/ascii.$(OBJEXT): internal/intern/error.h
+enc/ascii.$(OBJEXT): internal/intern/eval.h
+enc/ascii.$(OBJEXT): internal/intern/file.h
+enc/ascii.$(OBJEXT): internal/intern/gc.h
+enc/ascii.$(OBJEXT): internal/intern/hash.h
+enc/ascii.$(OBJEXT): internal/intern/io.h
+enc/ascii.$(OBJEXT): internal/intern/load.h
+enc/ascii.$(OBJEXT): internal/intern/marshal.h
+enc/ascii.$(OBJEXT): internal/intern/numeric.h
+enc/ascii.$(OBJEXT): internal/intern/object.h
+enc/ascii.$(OBJEXT): internal/intern/parse.h
+enc/ascii.$(OBJEXT): internal/intern/proc.h
+enc/ascii.$(OBJEXT): internal/intern/process.h
+enc/ascii.$(OBJEXT): internal/intern/random.h
+enc/ascii.$(OBJEXT): internal/intern/range.h
+enc/ascii.$(OBJEXT): internal/intern/rational.h
+enc/ascii.$(OBJEXT): internal/intern/re.h
+enc/ascii.$(OBJEXT): internal/intern/ruby.h
+enc/ascii.$(OBJEXT): internal/intern/select.h
+enc/ascii.$(OBJEXT): internal/intern/select/largesize.h
+enc/ascii.$(OBJEXT): internal/intern/signal.h
+enc/ascii.$(OBJEXT): internal/intern/sprintf.h
+enc/ascii.$(OBJEXT): internal/intern/string.h
+enc/ascii.$(OBJEXT): internal/intern/struct.h
+enc/ascii.$(OBJEXT): internal/intern/thread.h
+enc/ascii.$(OBJEXT): internal/intern/time.h
+enc/ascii.$(OBJEXT): internal/intern/variable.h
+enc/ascii.$(OBJEXT): internal/intern/vm.h
+enc/ascii.$(OBJEXT): internal/interpreter.h
+enc/ascii.$(OBJEXT): internal/iterator.h
+enc/ascii.$(OBJEXT): internal/memory.h
+enc/ascii.$(OBJEXT): internal/method.h
+enc/ascii.$(OBJEXT): internal/module.h
+enc/ascii.$(OBJEXT): internal/newobj.h
+enc/ascii.$(OBJEXT): internal/rgengc.h
+enc/ascii.$(OBJEXT): internal/scan_args.h
+enc/ascii.$(OBJEXT): internal/special_consts.h
+enc/ascii.$(OBJEXT): internal/static_assert.h
+enc/ascii.$(OBJEXT): internal/stdalign.h
+enc/ascii.$(OBJEXT): internal/stdbool.h
+enc/ascii.$(OBJEXT): internal/symbol.h
+enc/ascii.$(OBJEXT): internal/value.h
+enc/ascii.$(OBJEXT): internal/value_type.h
+enc/ascii.$(OBJEXT): internal/variable.h
+enc/ascii.$(OBJEXT): internal/warning_push.h
+enc/ascii.$(OBJEXT): internal/xmalloc.h
enc/ascii.$(OBJEXT): missing.h
enc/ascii.$(OBJEXT): onigmo.h
+enc/ascii.$(OBJEXT): oniguruma.h
+enc/ascii.$(OBJEXT): st.h
+enc/ascii.$(OBJEXT): subst.h
+enc/big5.$(OBJEXT): $(hdrdir)/ruby.h
+enc/big5.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/big5.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/big5.$(OBJEXT): assert.h
+enc/big5.$(OBJEXT): backward.h
+enc/big5.$(OBJEXT): backward/2/assume.h
+enc/big5.$(OBJEXT): backward/2/attributes.h
+enc/big5.$(OBJEXT): backward/2/bool.h
+enc/big5.$(OBJEXT): backward/2/inttypes.h
+enc/big5.$(OBJEXT): backward/2/limits.h
+enc/big5.$(OBJEXT): backward/2/long_long.h
+enc/big5.$(OBJEXT): backward/2/stdalign.h
+enc/big5.$(OBJEXT): backward/2/stdarg.h
enc/big5.$(OBJEXT): config.h
enc/big5.$(OBJEXT): defines.h
enc/big5.$(OBJEXT): enc/big5.c
+enc/big5.$(OBJEXT): intern.h
+enc/big5.$(OBJEXT): internal/abi.h
+enc/big5.$(OBJEXT): internal/anyargs.h
+enc/big5.$(OBJEXT): internal/arithmetic.h
+enc/big5.$(OBJEXT): internal/arithmetic/char.h
+enc/big5.$(OBJEXT): internal/arithmetic/double.h
+enc/big5.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/big5.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/int.h
+enc/big5.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/long.h
+enc/big5.$(OBJEXT): internal/arithmetic/long_long.h
+enc/big5.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/off_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/short.h
+enc/big5.$(OBJEXT): internal/arithmetic/size_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/big5.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/big5.$(OBJEXT): internal/assume.h
+enc/big5.$(OBJEXT): internal/attr/alloc_size.h
+enc/big5.$(OBJEXT): internal/attr/artificial.h
+enc/big5.$(OBJEXT): internal/attr/cold.h
+enc/big5.$(OBJEXT): internal/attr/const.h
+enc/big5.$(OBJEXT): internal/attr/constexpr.h
+enc/big5.$(OBJEXT): internal/attr/deprecated.h
+enc/big5.$(OBJEXT): internal/attr/diagnose_if.h
+enc/big5.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/big5.$(OBJEXT): internal/attr/error.h
+enc/big5.$(OBJEXT): internal/attr/flag_enum.h
+enc/big5.$(OBJEXT): internal/attr/forceinline.h
+enc/big5.$(OBJEXT): internal/attr/format.h
+enc/big5.$(OBJEXT): internal/attr/maybe_unused.h
+enc/big5.$(OBJEXT): internal/attr/noalias.h
+enc/big5.$(OBJEXT): internal/attr/nodiscard.h
+enc/big5.$(OBJEXT): internal/attr/noexcept.h
+enc/big5.$(OBJEXT): internal/attr/noinline.h
+enc/big5.$(OBJEXT): internal/attr/nonnull.h
+enc/big5.$(OBJEXT): internal/attr/noreturn.h
+enc/big5.$(OBJEXT): internal/attr/pure.h
+enc/big5.$(OBJEXT): internal/attr/restrict.h
+enc/big5.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/big5.$(OBJEXT): internal/attr/warning.h
+enc/big5.$(OBJEXT): internal/attr/weakref.h
+enc/big5.$(OBJEXT): internal/cast.h
+enc/big5.$(OBJEXT): internal/compiler_is.h
+enc/big5.$(OBJEXT): internal/compiler_is/apple.h
+enc/big5.$(OBJEXT): internal/compiler_is/clang.h
+enc/big5.$(OBJEXT): internal/compiler_is/gcc.h
+enc/big5.$(OBJEXT): internal/compiler_is/intel.h
+enc/big5.$(OBJEXT): internal/compiler_is/msvc.h
+enc/big5.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/big5.$(OBJEXT): internal/compiler_since.h
+enc/big5.$(OBJEXT): internal/config.h
+enc/big5.$(OBJEXT): internal/constant_p.h
+enc/big5.$(OBJEXT): internal/core.h
+enc/big5.$(OBJEXT): internal/core/rarray.h
+enc/big5.$(OBJEXT): internal/core/rbasic.h
+enc/big5.$(OBJEXT): internal/core/rbignum.h
+enc/big5.$(OBJEXT): internal/core/rclass.h
+enc/big5.$(OBJEXT): internal/core/rdata.h
+enc/big5.$(OBJEXT): internal/core/rfile.h
+enc/big5.$(OBJEXT): internal/core/rhash.h
+enc/big5.$(OBJEXT): internal/core/robject.h
+enc/big5.$(OBJEXT): internal/core/rregexp.h
+enc/big5.$(OBJEXT): internal/core/rstring.h
+enc/big5.$(OBJEXT): internal/core/rstruct.h
+enc/big5.$(OBJEXT): internal/core/rtypeddata.h
+enc/big5.$(OBJEXT): internal/ctype.h
+enc/big5.$(OBJEXT): internal/dllexport.h
+enc/big5.$(OBJEXT): internal/dosish.h
+enc/big5.$(OBJEXT): internal/error.h
+enc/big5.$(OBJEXT): internal/eval.h
+enc/big5.$(OBJEXT): internal/event.h
+enc/big5.$(OBJEXT): internal/fl_type.h
+enc/big5.$(OBJEXT): internal/gc.h
+enc/big5.$(OBJEXT): internal/glob.h
+enc/big5.$(OBJEXT): internal/globals.h
+enc/big5.$(OBJEXT): internal/has/attribute.h
+enc/big5.$(OBJEXT): internal/has/builtin.h
+enc/big5.$(OBJEXT): internal/has/c_attribute.h
+enc/big5.$(OBJEXT): internal/has/cpp_attribute.h
+enc/big5.$(OBJEXT): internal/has/declspec_attribute.h
+enc/big5.$(OBJEXT): internal/has/extension.h
+enc/big5.$(OBJEXT): internal/has/feature.h
+enc/big5.$(OBJEXT): internal/has/warning.h
+enc/big5.$(OBJEXT): internal/intern/array.h
+enc/big5.$(OBJEXT): internal/intern/bignum.h
+enc/big5.$(OBJEXT): internal/intern/class.h
+enc/big5.$(OBJEXT): internal/intern/compar.h
+enc/big5.$(OBJEXT): internal/intern/complex.h
+enc/big5.$(OBJEXT): internal/intern/cont.h
+enc/big5.$(OBJEXT): internal/intern/dir.h
+enc/big5.$(OBJEXT): internal/intern/enum.h
+enc/big5.$(OBJEXT): internal/intern/enumerator.h
+enc/big5.$(OBJEXT): internal/intern/error.h
+enc/big5.$(OBJEXT): internal/intern/eval.h
+enc/big5.$(OBJEXT): internal/intern/file.h
+enc/big5.$(OBJEXT): internal/intern/gc.h
+enc/big5.$(OBJEXT): internal/intern/hash.h
+enc/big5.$(OBJEXT): internal/intern/io.h
+enc/big5.$(OBJEXT): internal/intern/load.h
+enc/big5.$(OBJEXT): internal/intern/marshal.h
+enc/big5.$(OBJEXT): internal/intern/numeric.h
+enc/big5.$(OBJEXT): internal/intern/object.h
+enc/big5.$(OBJEXT): internal/intern/parse.h
+enc/big5.$(OBJEXT): internal/intern/proc.h
+enc/big5.$(OBJEXT): internal/intern/process.h
+enc/big5.$(OBJEXT): internal/intern/random.h
+enc/big5.$(OBJEXT): internal/intern/range.h
+enc/big5.$(OBJEXT): internal/intern/rational.h
+enc/big5.$(OBJEXT): internal/intern/re.h
+enc/big5.$(OBJEXT): internal/intern/ruby.h
+enc/big5.$(OBJEXT): internal/intern/select.h
+enc/big5.$(OBJEXT): internal/intern/select/largesize.h
+enc/big5.$(OBJEXT): internal/intern/signal.h
+enc/big5.$(OBJEXT): internal/intern/sprintf.h
+enc/big5.$(OBJEXT): internal/intern/string.h
+enc/big5.$(OBJEXT): internal/intern/struct.h
+enc/big5.$(OBJEXT): internal/intern/thread.h
+enc/big5.$(OBJEXT): internal/intern/time.h
+enc/big5.$(OBJEXT): internal/intern/variable.h
+enc/big5.$(OBJEXT): internal/intern/vm.h
+enc/big5.$(OBJEXT): internal/interpreter.h
+enc/big5.$(OBJEXT): internal/iterator.h
+enc/big5.$(OBJEXT): internal/memory.h
+enc/big5.$(OBJEXT): internal/method.h
+enc/big5.$(OBJEXT): internal/module.h
+enc/big5.$(OBJEXT): internal/newobj.h
+enc/big5.$(OBJEXT): internal/rgengc.h
+enc/big5.$(OBJEXT): internal/scan_args.h
+enc/big5.$(OBJEXT): internal/special_consts.h
+enc/big5.$(OBJEXT): internal/static_assert.h
+enc/big5.$(OBJEXT): internal/stdalign.h
+enc/big5.$(OBJEXT): internal/stdbool.h
+enc/big5.$(OBJEXT): internal/symbol.h
+enc/big5.$(OBJEXT): internal/value.h
+enc/big5.$(OBJEXT): internal/value_type.h
+enc/big5.$(OBJEXT): internal/variable.h
+enc/big5.$(OBJEXT): internal/warning_push.h
+enc/big5.$(OBJEXT): internal/xmalloc.h
enc/big5.$(OBJEXT): missing.h
enc/big5.$(OBJEXT): onigmo.h
+enc/big5.$(OBJEXT): st.h
+enc/big5.$(OBJEXT): subst.h
+enc/cesu_8.$(OBJEXT): $(hdrdir)/ruby.h
+enc/cesu_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/cesu_8.$(OBJEXT): $(top_srcdir)/encindex.h
enc/cesu_8.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/cesu_8.$(OBJEXT): assert.h
+enc/cesu_8.$(OBJEXT): backward.h
+enc/cesu_8.$(OBJEXT): backward/2/assume.h
+enc/cesu_8.$(OBJEXT): backward/2/attributes.h
+enc/cesu_8.$(OBJEXT): backward/2/bool.h
+enc/cesu_8.$(OBJEXT): backward/2/inttypes.h
+enc/cesu_8.$(OBJEXT): backward/2/limits.h
+enc/cesu_8.$(OBJEXT): backward/2/long_long.h
+enc/cesu_8.$(OBJEXT): backward/2/stdalign.h
+enc/cesu_8.$(OBJEXT): backward/2/stdarg.h
enc/cesu_8.$(OBJEXT): config.h
enc/cesu_8.$(OBJEXT): defines.h
enc/cesu_8.$(OBJEXT): enc/cesu_8.c
+enc/cesu_8.$(OBJEXT): encoding.h
+enc/cesu_8.$(OBJEXT): intern.h
+enc/cesu_8.$(OBJEXT): internal/abi.h
+enc/cesu_8.$(OBJEXT): internal/anyargs.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/char.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/double.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/int.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/long.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/long_long.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/off_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/short.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/size_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/cesu_8.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/cesu_8.$(OBJEXT): internal/assume.h
+enc/cesu_8.$(OBJEXT): internal/attr/alloc_size.h
+enc/cesu_8.$(OBJEXT): internal/attr/artificial.h
+enc/cesu_8.$(OBJEXT): internal/attr/cold.h
+enc/cesu_8.$(OBJEXT): internal/attr/const.h
+enc/cesu_8.$(OBJEXT): internal/attr/constexpr.h
+enc/cesu_8.$(OBJEXT): internal/attr/deprecated.h
+enc/cesu_8.$(OBJEXT): internal/attr/diagnose_if.h
+enc/cesu_8.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/cesu_8.$(OBJEXT): internal/attr/error.h
+enc/cesu_8.$(OBJEXT): internal/attr/flag_enum.h
+enc/cesu_8.$(OBJEXT): internal/attr/forceinline.h
+enc/cesu_8.$(OBJEXT): internal/attr/format.h
+enc/cesu_8.$(OBJEXT): internal/attr/maybe_unused.h
+enc/cesu_8.$(OBJEXT): internal/attr/noalias.h
+enc/cesu_8.$(OBJEXT): internal/attr/nodiscard.h
+enc/cesu_8.$(OBJEXT): internal/attr/noexcept.h
+enc/cesu_8.$(OBJEXT): internal/attr/noinline.h
+enc/cesu_8.$(OBJEXT): internal/attr/nonnull.h
+enc/cesu_8.$(OBJEXT): internal/attr/noreturn.h
+enc/cesu_8.$(OBJEXT): internal/attr/pure.h
+enc/cesu_8.$(OBJEXT): internal/attr/restrict.h
+enc/cesu_8.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/cesu_8.$(OBJEXT): internal/attr/warning.h
+enc/cesu_8.$(OBJEXT): internal/attr/weakref.h
+enc/cesu_8.$(OBJEXT): internal/cast.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/apple.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/clang.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/gcc.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/intel.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/msvc.h
+enc/cesu_8.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/cesu_8.$(OBJEXT): internal/compiler_since.h
+enc/cesu_8.$(OBJEXT): internal/config.h
+enc/cesu_8.$(OBJEXT): internal/constant_p.h
+enc/cesu_8.$(OBJEXT): internal/core.h
+enc/cesu_8.$(OBJEXT): internal/core/rarray.h
+enc/cesu_8.$(OBJEXT): internal/core/rbasic.h
+enc/cesu_8.$(OBJEXT): internal/core/rbignum.h
+enc/cesu_8.$(OBJEXT): internal/core/rclass.h
+enc/cesu_8.$(OBJEXT): internal/core/rdata.h
+enc/cesu_8.$(OBJEXT): internal/core/rfile.h
+enc/cesu_8.$(OBJEXT): internal/core/rhash.h
+enc/cesu_8.$(OBJEXT): internal/core/robject.h
+enc/cesu_8.$(OBJEXT): internal/core/rregexp.h
+enc/cesu_8.$(OBJEXT): internal/core/rstring.h
+enc/cesu_8.$(OBJEXT): internal/core/rstruct.h
+enc/cesu_8.$(OBJEXT): internal/core/rtypeddata.h
+enc/cesu_8.$(OBJEXT): internal/ctype.h
+enc/cesu_8.$(OBJEXT): internal/dllexport.h
+enc/cesu_8.$(OBJEXT): internal/dosish.h
+enc/cesu_8.$(OBJEXT): internal/encoding/coderange.h
+enc/cesu_8.$(OBJEXT): internal/encoding/ctype.h
+enc/cesu_8.$(OBJEXT): internal/encoding/encoding.h
+enc/cesu_8.$(OBJEXT): internal/encoding/pathname.h
+enc/cesu_8.$(OBJEXT): internal/encoding/re.h
+enc/cesu_8.$(OBJEXT): internal/encoding/sprintf.h
+enc/cesu_8.$(OBJEXT): internal/encoding/string.h
+enc/cesu_8.$(OBJEXT): internal/encoding/symbol.h
+enc/cesu_8.$(OBJEXT): internal/encoding/transcode.h
+enc/cesu_8.$(OBJEXT): internal/error.h
+enc/cesu_8.$(OBJEXT): internal/eval.h
+enc/cesu_8.$(OBJEXT): internal/event.h
+enc/cesu_8.$(OBJEXT): internal/fl_type.h
+enc/cesu_8.$(OBJEXT): internal/gc.h
+enc/cesu_8.$(OBJEXT): internal/glob.h
+enc/cesu_8.$(OBJEXT): internal/globals.h
+enc/cesu_8.$(OBJEXT): internal/has/attribute.h
+enc/cesu_8.$(OBJEXT): internal/has/builtin.h
+enc/cesu_8.$(OBJEXT): internal/has/c_attribute.h
+enc/cesu_8.$(OBJEXT): internal/has/cpp_attribute.h
+enc/cesu_8.$(OBJEXT): internal/has/declspec_attribute.h
+enc/cesu_8.$(OBJEXT): internal/has/extension.h
+enc/cesu_8.$(OBJEXT): internal/has/feature.h
+enc/cesu_8.$(OBJEXT): internal/has/warning.h
+enc/cesu_8.$(OBJEXT): internal/intern/array.h
+enc/cesu_8.$(OBJEXT): internal/intern/bignum.h
+enc/cesu_8.$(OBJEXT): internal/intern/class.h
+enc/cesu_8.$(OBJEXT): internal/intern/compar.h
+enc/cesu_8.$(OBJEXT): internal/intern/complex.h
+enc/cesu_8.$(OBJEXT): internal/intern/cont.h
+enc/cesu_8.$(OBJEXT): internal/intern/dir.h
+enc/cesu_8.$(OBJEXT): internal/intern/enum.h
+enc/cesu_8.$(OBJEXT): internal/intern/enumerator.h
+enc/cesu_8.$(OBJEXT): internal/intern/error.h
+enc/cesu_8.$(OBJEXT): internal/intern/eval.h
+enc/cesu_8.$(OBJEXT): internal/intern/file.h
+enc/cesu_8.$(OBJEXT): internal/intern/gc.h
+enc/cesu_8.$(OBJEXT): internal/intern/hash.h
+enc/cesu_8.$(OBJEXT): internal/intern/io.h
+enc/cesu_8.$(OBJEXT): internal/intern/load.h
+enc/cesu_8.$(OBJEXT): internal/intern/marshal.h
+enc/cesu_8.$(OBJEXT): internal/intern/numeric.h
+enc/cesu_8.$(OBJEXT): internal/intern/object.h
+enc/cesu_8.$(OBJEXT): internal/intern/parse.h
+enc/cesu_8.$(OBJEXT): internal/intern/proc.h
+enc/cesu_8.$(OBJEXT): internal/intern/process.h
+enc/cesu_8.$(OBJEXT): internal/intern/random.h
+enc/cesu_8.$(OBJEXT): internal/intern/range.h
+enc/cesu_8.$(OBJEXT): internal/intern/rational.h
+enc/cesu_8.$(OBJEXT): internal/intern/re.h
+enc/cesu_8.$(OBJEXT): internal/intern/ruby.h
+enc/cesu_8.$(OBJEXT): internal/intern/select.h
+enc/cesu_8.$(OBJEXT): internal/intern/select/largesize.h
+enc/cesu_8.$(OBJEXT): internal/intern/signal.h
+enc/cesu_8.$(OBJEXT): internal/intern/sprintf.h
+enc/cesu_8.$(OBJEXT): internal/intern/string.h
+enc/cesu_8.$(OBJEXT): internal/intern/struct.h
+enc/cesu_8.$(OBJEXT): internal/intern/thread.h
+enc/cesu_8.$(OBJEXT): internal/intern/time.h
+enc/cesu_8.$(OBJEXT): internal/intern/variable.h
+enc/cesu_8.$(OBJEXT): internal/intern/vm.h
+enc/cesu_8.$(OBJEXT): internal/interpreter.h
+enc/cesu_8.$(OBJEXT): internal/iterator.h
+enc/cesu_8.$(OBJEXT): internal/memory.h
+enc/cesu_8.$(OBJEXT): internal/method.h
+enc/cesu_8.$(OBJEXT): internal/module.h
+enc/cesu_8.$(OBJEXT): internal/newobj.h
+enc/cesu_8.$(OBJEXT): internal/rgengc.h
+enc/cesu_8.$(OBJEXT): internal/scan_args.h
+enc/cesu_8.$(OBJEXT): internal/special_consts.h
+enc/cesu_8.$(OBJEXT): internal/static_assert.h
+enc/cesu_8.$(OBJEXT): internal/stdalign.h
+enc/cesu_8.$(OBJEXT): internal/stdbool.h
+enc/cesu_8.$(OBJEXT): internal/symbol.h
+enc/cesu_8.$(OBJEXT): internal/value.h
+enc/cesu_8.$(OBJEXT): internal/value_type.h
+enc/cesu_8.$(OBJEXT): internal/variable.h
+enc/cesu_8.$(OBJEXT): internal/warning_push.h
+enc/cesu_8.$(OBJEXT): internal/xmalloc.h
enc/cesu_8.$(OBJEXT): missing.h
enc/cesu_8.$(OBJEXT): onigmo.h
+enc/cesu_8.$(OBJEXT): oniguruma.h
+enc/cesu_8.$(OBJEXT): st.h
+enc/cesu_8.$(OBJEXT): subst.h
+enc/cp949.$(OBJEXT): $(hdrdir)/ruby.h
+enc/cp949.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/cp949.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/cp949.$(OBJEXT): assert.h
+enc/cp949.$(OBJEXT): backward.h
+enc/cp949.$(OBJEXT): backward/2/assume.h
+enc/cp949.$(OBJEXT): backward/2/attributes.h
+enc/cp949.$(OBJEXT): backward/2/bool.h
+enc/cp949.$(OBJEXT): backward/2/inttypes.h
+enc/cp949.$(OBJEXT): backward/2/limits.h
+enc/cp949.$(OBJEXT): backward/2/long_long.h
+enc/cp949.$(OBJEXT): backward/2/stdalign.h
+enc/cp949.$(OBJEXT): backward/2/stdarg.h
enc/cp949.$(OBJEXT): config.h
enc/cp949.$(OBJEXT): defines.h
enc/cp949.$(OBJEXT): enc/cp949.c
+enc/cp949.$(OBJEXT): intern.h
+enc/cp949.$(OBJEXT): internal/abi.h
+enc/cp949.$(OBJEXT): internal/anyargs.h
+enc/cp949.$(OBJEXT): internal/arithmetic.h
+enc/cp949.$(OBJEXT): internal/arithmetic/char.h
+enc/cp949.$(OBJEXT): internal/arithmetic/double.h
+enc/cp949.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/cp949.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/int.h
+enc/cp949.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/long.h
+enc/cp949.$(OBJEXT): internal/arithmetic/long_long.h
+enc/cp949.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/off_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/short.h
+enc/cp949.$(OBJEXT): internal/arithmetic/size_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/cp949.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/cp949.$(OBJEXT): internal/assume.h
+enc/cp949.$(OBJEXT): internal/attr/alloc_size.h
+enc/cp949.$(OBJEXT): internal/attr/artificial.h
+enc/cp949.$(OBJEXT): internal/attr/cold.h
+enc/cp949.$(OBJEXT): internal/attr/const.h
+enc/cp949.$(OBJEXT): internal/attr/constexpr.h
+enc/cp949.$(OBJEXT): internal/attr/deprecated.h
+enc/cp949.$(OBJEXT): internal/attr/diagnose_if.h
+enc/cp949.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/cp949.$(OBJEXT): internal/attr/error.h
+enc/cp949.$(OBJEXT): internal/attr/flag_enum.h
+enc/cp949.$(OBJEXT): internal/attr/forceinline.h
+enc/cp949.$(OBJEXT): internal/attr/format.h
+enc/cp949.$(OBJEXT): internal/attr/maybe_unused.h
+enc/cp949.$(OBJEXT): internal/attr/noalias.h
+enc/cp949.$(OBJEXT): internal/attr/nodiscard.h
+enc/cp949.$(OBJEXT): internal/attr/noexcept.h
+enc/cp949.$(OBJEXT): internal/attr/noinline.h
+enc/cp949.$(OBJEXT): internal/attr/nonnull.h
+enc/cp949.$(OBJEXT): internal/attr/noreturn.h
+enc/cp949.$(OBJEXT): internal/attr/pure.h
+enc/cp949.$(OBJEXT): internal/attr/restrict.h
+enc/cp949.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/cp949.$(OBJEXT): internal/attr/warning.h
+enc/cp949.$(OBJEXT): internal/attr/weakref.h
+enc/cp949.$(OBJEXT): internal/cast.h
+enc/cp949.$(OBJEXT): internal/compiler_is.h
+enc/cp949.$(OBJEXT): internal/compiler_is/apple.h
+enc/cp949.$(OBJEXT): internal/compiler_is/clang.h
+enc/cp949.$(OBJEXT): internal/compiler_is/gcc.h
+enc/cp949.$(OBJEXT): internal/compiler_is/intel.h
+enc/cp949.$(OBJEXT): internal/compiler_is/msvc.h
+enc/cp949.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/cp949.$(OBJEXT): internal/compiler_since.h
+enc/cp949.$(OBJEXT): internal/config.h
+enc/cp949.$(OBJEXT): internal/constant_p.h
+enc/cp949.$(OBJEXT): internal/core.h
+enc/cp949.$(OBJEXT): internal/core/rarray.h
+enc/cp949.$(OBJEXT): internal/core/rbasic.h
+enc/cp949.$(OBJEXT): internal/core/rbignum.h
+enc/cp949.$(OBJEXT): internal/core/rclass.h
+enc/cp949.$(OBJEXT): internal/core/rdata.h
+enc/cp949.$(OBJEXT): internal/core/rfile.h
+enc/cp949.$(OBJEXT): internal/core/rhash.h
+enc/cp949.$(OBJEXT): internal/core/robject.h
+enc/cp949.$(OBJEXT): internal/core/rregexp.h
+enc/cp949.$(OBJEXT): internal/core/rstring.h
+enc/cp949.$(OBJEXT): internal/core/rstruct.h
+enc/cp949.$(OBJEXT): internal/core/rtypeddata.h
+enc/cp949.$(OBJEXT): internal/ctype.h
+enc/cp949.$(OBJEXT): internal/dllexport.h
+enc/cp949.$(OBJEXT): internal/dosish.h
+enc/cp949.$(OBJEXT): internal/error.h
+enc/cp949.$(OBJEXT): internal/eval.h
+enc/cp949.$(OBJEXT): internal/event.h
+enc/cp949.$(OBJEXT): internal/fl_type.h
+enc/cp949.$(OBJEXT): internal/gc.h
+enc/cp949.$(OBJEXT): internal/glob.h
+enc/cp949.$(OBJEXT): internal/globals.h
+enc/cp949.$(OBJEXT): internal/has/attribute.h
+enc/cp949.$(OBJEXT): internal/has/builtin.h
+enc/cp949.$(OBJEXT): internal/has/c_attribute.h
+enc/cp949.$(OBJEXT): internal/has/cpp_attribute.h
+enc/cp949.$(OBJEXT): internal/has/declspec_attribute.h
+enc/cp949.$(OBJEXT): internal/has/extension.h
+enc/cp949.$(OBJEXT): internal/has/feature.h
+enc/cp949.$(OBJEXT): internal/has/warning.h
+enc/cp949.$(OBJEXT): internal/intern/array.h
+enc/cp949.$(OBJEXT): internal/intern/bignum.h
+enc/cp949.$(OBJEXT): internal/intern/class.h
+enc/cp949.$(OBJEXT): internal/intern/compar.h
+enc/cp949.$(OBJEXT): internal/intern/complex.h
+enc/cp949.$(OBJEXT): internal/intern/cont.h
+enc/cp949.$(OBJEXT): internal/intern/dir.h
+enc/cp949.$(OBJEXT): internal/intern/enum.h
+enc/cp949.$(OBJEXT): internal/intern/enumerator.h
+enc/cp949.$(OBJEXT): internal/intern/error.h
+enc/cp949.$(OBJEXT): internal/intern/eval.h
+enc/cp949.$(OBJEXT): internal/intern/file.h
+enc/cp949.$(OBJEXT): internal/intern/gc.h
+enc/cp949.$(OBJEXT): internal/intern/hash.h
+enc/cp949.$(OBJEXT): internal/intern/io.h
+enc/cp949.$(OBJEXT): internal/intern/load.h
+enc/cp949.$(OBJEXT): internal/intern/marshal.h
+enc/cp949.$(OBJEXT): internal/intern/numeric.h
+enc/cp949.$(OBJEXT): internal/intern/object.h
+enc/cp949.$(OBJEXT): internal/intern/parse.h
+enc/cp949.$(OBJEXT): internal/intern/proc.h
+enc/cp949.$(OBJEXT): internal/intern/process.h
+enc/cp949.$(OBJEXT): internal/intern/random.h
+enc/cp949.$(OBJEXT): internal/intern/range.h
+enc/cp949.$(OBJEXT): internal/intern/rational.h
+enc/cp949.$(OBJEXT): internal/intern/re.h
+enc/cp949.$(OBJEXT): internal/intern/ruby.h
+enc/cp949.$(OBJEXT): internal/intern/select.h
+enc/cp949.$(OBJEXT): internal/intern/select/largesize.h
+enc/cp949.$(OBJEXT): internal/intern/signal.h
+enc/cp949.$(OBJEXT): internal/intern/sprintf.h
+enc/cp949.$(OBJEXT): internal/intern/string.h
+enc/cp949.$(OBJEXT): internal/intern/struct.h
+enc/cp949.$(OBJEXT): internal/intern/thread.h
+enc/cp949.$(OBJEXT): internal/intern/time.h
+enc/cp949.$(OBJEXT): internal/intern/variable.h
+enc/cp949.$(OBJEXT): internal/intern/vm.h
+enc/cp949.$(OBJEXT): internal/interpreter.h
+enc/cp949.$(OBJEXT): internal/iterator.h
+enc/cp949.$(OBJEXT): internal/memory.h
+enc/cp949.$(OBJEXT): internal/method.h
+enc/cp949.$(OBJEXT): internal/module.h
+enc/cp949.$(OBJEXT): internal/newobj.h
+enc/cp949.$(OBJEXT): internal/rgengc.h
+enc/cp949.$(OBJEXT): internal/scan_args.h
+enc/cp949.$(OBJEXT): internal/special_consts.h
+enc/cp949.$(OBJEXT): internal/static_assert.h
+enc/cp949.$(OBJEXT): internal/stdalign.h
+enc/cp949.$(OBJEXT): internal/stdbool.h
+enc/cp949.$(OBJEXT): internal/symbol.h
+enc/cp949.$(OBJEXT): internal/value.h
+enc/cp949.$(OBJEXT): internal/value_type.h
+enc/cp949.$(OBJEXT): internal/variable.h
+enc/cp949.$(OBJEXT): internal/warning_push.h
+enc/cp949.$(OBJEXT): internal/xmalloc.h
enc/cp949.$(OBJEXT): missing.h
enc/cp949.$(OBJEXT): onigmo.h
+enc/cp949.$(OBJEXT): st.h
+enc/cp949.$(OBJEXT): subst.h
+enc/emacs_mule.$(OBJEXT): $(hdrdir)/ruby.h
+enc/emacs_mule.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/emacs_mule.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/emacs_mule.$(OBJEXT): assert.h
+enc/emacs_mule.$(OBJEXT): backward.h
+enc/emacs_mule.$(OBJEXT): backward/2/assume.h
+enc/emacs_mule.$(OBJEXT): backward/2/attributes.h
+enc/emacs_mule.$(OBJEXT): backward/2/bool.h
+enc/emacs_mule.$(OBJEXT): backward/2/inttypes.h
+enc/emacs_mule.$(OBJEXT): backward/2/limits.h
+enc/emacs_mule.$(OBJEXT): backward/2/long_long.h
+enc/emacs_mule.$(OBJEXT): backward/2/stdalign.h
+enc/emacs_mule.$(OBJEXT): backward/2/stdarg.h
enc/emacs_mule.$(OBJEXT): config.h
enc/emacs_mule.$(OBJEXT): defines.h
enc/emacs_mule.$(OBJEXT): enc/emacs_mule.c
+enc/emacs_mule.$(OBJEXT): intern.h
+enc/emacs_mule.$(OBJEXT): internal/abi.h
+enc/emacs_mule.$(OBJEXT): internal/anyargs.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/char.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/double.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/int.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/long.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/long_long.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/off_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/short.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/size_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/emacs_mule.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/emacs_mule.$(OBJEXT): internal/assume.h
+enc/emacs_mule.$(OBJEXT): internal/attr/alloc_size.h
+enc/emacs_mule.$(OBJEXT): internal/attr/artificial.h
+enc/emacs_mule.$(OBJEXT): internal/attr/cold.h
+enc/emacs_mule.$(OBJEXT): internal/attr/const.h
+enc/emacs_mule.$(OBJEXT): internal/attr/constexpr.h
+enc/emacs_mule.$(OBJEXT): internal/attr/deprecated.h
+enc/emacs_mule.$(OBJEXT): internal/attr/diagnose_if.h
+enc/emacs_mule.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/emacs_mule.$(OBJEXT): internal/attr/error.h
+enc/emacs_mule.$(OBJEXT): internal/attr/flag_enum.h
+enc/emacs_mule.$(OBJEXT): internal/attr/forceinline.h
+enc/emacs_mule.$(OBJEXT): internal/attr/format.h
+enc/emacs_mule.$(OBJEXT): internal/attr/maybe_unused.h
+enc/emacs_mule.$(OBJEXT): internal/attr/noalias.h
+enc/emacs_mule.$(OBJEXT): internal/attr/nodiscard.h
+enc/emacs_mule.$(OBJEXT): internal/attr/noexcept.h
+enc/emacs_mule.$(OBJEXT): internal/attr/noinline.h
+enc/emacs_mule.$(OBJEXT): internal/attr/nonnull.h
+enc/emacs_mule.$(OBJEXT): internal/attr/noreturn.h
+enc/emacs_mule.$(OBJEXT): internal/attr/pure.h
+enc/emacs_mule.$(OBJEXT): internal/attr/restrict.h
+enc/emacs_mule.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/emacs_mule.$(OBJEXT): internal/attr/warning.h
+enc/emacs_mule.$(OBJEXT): internal/attr/weakref.h
+enc/emacs_mule.$(OBJEXT): internal/cast.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/apple.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/clang.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/gcc.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/intel.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/msvc.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/emacs_mule.$(OBJEXT): internal/compiler_since.h
+enc/emacs_mule.$(OBJEXT): internal/config.h
+enc/emacs_mule.$(OBJEXT): internal/constant_p.h
+enc/emacs_mule.$(OBJEXT): internal/core.h
+enc/emacs_mule.$(OBJEXT): internal/core/rarray.h
+enc/emacs_mule.$(OBJEXT): internal/core/rbasic.h
+enc/emacs_mule.$(OBJEXT): internal/core/rbignum.h
+enc/emacs_mule.$(OBJEXT): internal/core/rclass.h
+enc/emacs_mule.$(OBJEXT): internal/core/rdata.h
+enc/emacs_mule.$(OBJEXT): internal/core/rfile.h
+enc/emacs_mule.$(OBJEXT): internal/core/rhash.h
+enc/emacs_mule.$(OBJEXT): internal/core/robject.h
+enc/emacs_mule.$(OBJEXT): internal/core/rregexp.h
+enc/emacs_mule.$(OBJEXT): internal/core/rstring.h
+enc/emacs_mule.$(OBJEXT): internal/core/rstruct.h
+enc/emacs_mule.$(OBJEXT): internal/core/rtypeddata.h
+enc/emacs_mule.$(OBJEXT): internal/ctype.h
+enc/emacs_mule.$(OBJEXT): internal/dllexport.h
+enc/emacs_mule.$(OBJEXT): internal/dosish.h
+enc/emacs_mule.$(OBJEXT): internal/error.h
+enc/emacs_mule.$(OBJEXT): internal/eval.h
+enc/emacs_mule.$(OBJEXT): internal/event.h
+enc/emacs_mule.$(OBJEXT): internal/fl_type.h
+enc/emacs_mule.$(OBJEXT): internal/gc.h
+enc/emacs_mule.$(OBJEXT): internal/glob.h
+enc/emacs_mule.$(OBJEXT): internal/globals.h
+enc/emacs_mule.$(OBJEXT): internal/has/attribute.h
+enc/emacs_mule.$(OBJEXT): internal/has/builtin.h
+enc/emacs_mule.$(OBJEXT): internal/has/c_attribute.h
+enc/emacs_mule.$(OBJEXT): internal/has/cpp_attribute.h
+enc/emacs_mule.$(OBJEXT): internal/has/declspec_attribute.h
+enc/emacs_mule.$(OBJEXT): internal/has/extension.h
+enc/emacs_mule.$(OBJEXT): internal/has/feature.h
+enc/emacs_mule.$(OBJEXT): internal/has/warning.h
+enc/emacs_mule.$(OBJEXT): internal/intern/array.h
+enc/emacs_mule.$(OBJEXT): internal/intern/bignum.h
+enc/emacs_mule.$(OBJEXT): internal/intern/class.h
+enc/emacs_mule.$(OBJEXT): internal/intern/compar.h
+enc/emacs_mule.$(OBJEXT): internal/intern/complex.h
+enc/emacs_mule.$(OBJEXT): internal/intern/cont.h
+enc/emacs_mule.$(OBJEXT): internal/intern/dir.h
+enc/emacs_mule.$(OBJEXT): internal/intern/enum.h
+enc/emacs_mule.$(OBJEXT): internal/intern/enumerator.h
+enc/emacs_mule.$(OBJEXT): internal/intern/error.h
+enc/emacs_mule.$(OBJEXT): internal/intern/eval.h
+enc/emacs_mule.$(OBJEXT): internal/intern/file.h
+enc/emacs_mule.$(OBJEXT): internal/intern/gc.h
+enc/emacs_mule.$(OBJEXT): internal/intern/hash.h
+enc/emacs_mule.$(OBJEXT): internal/intern/io.h
+enc/emacs_mule.$(OBJEXT): internal/intern/load.h
+enc/emacs_mule.$(OBJEXT): internal/intern/marshal.h
+enc/emacs_mule.$(OBJEXT): internal/intern/numeric.h
+enc/emacs_mule.$(OBJEXT): internal/intern/object.h
+enc/emacs_mule.$(OBJEXT): internal/intern/parse.h
+enc/emacs_mule.$(OBJEXT): internal/intern/proc.h
+enc/emacs_mule.$(OBJEXT): internal/intern/process.h
+enc/emacs_mule.$(OBJEXT): internal/intern/random.h
+enc/emacs_mule.$(OBJEXT): internal/intern/range.h
+enc/emacs_mule.$(OBJEXT): internal/intern/rational.h
+enc/emacs_mule.$(OBJEXT): internal/intern/re.h
+enc/emacs_mule.$(OBJEXT): internal/intern/ruby.h
+enc/emacs_mule.$(OBJEXT): internal/intern/select.h
+enc/emacs_mule.$(OBJEXT): internal/intern/select/largesize.h
+enc/emacs_mule.$(OBJEXT): internal/intern/signal.h
+enc/emacs_mule.$(OBJEXT): internal/intern/sprintf.h
+enc/emacs_mule.$(OBJEXT): internal/intern/string.h
+enc/emacs_mule.$(OBJEXT): internal/intern/struct.h
+enc/emacs_mule.$(OBJEXT): internal/intern/thread.h
+enc/emacs_mule.$(OBJEXT): internal/intern/time.h
+enc/emacs_mule.$(OBJEXT): internal/intern/variable.h
+enc/emacs_mule.$(OBJEXT): internal/intern/vm.h
+enc/emacs_mule.$(OBJEXT): internal/interpreter.h
+enc/emacs_mule.$(OBJEXT): internal/iterator.h
+enc/emacs_mule.$(OBJEXT): internal/memory.h
+enc/emacs_mule.$(OBJEXT): internal/method.h
+enc/emacs_mule.$(OBJEXT): internal/module.h
+enc/emacs_mule.$(OBJEXT): internal/newobj.h
+enc/emacs_mule.$(OBJEXT): internal/rgengc.h
+enc/emacs_mule.$(OBJEXT): internal/scan_args.h
+enc/emacs_mule.$(OBJEXT): internal/special_consts.h
+enc/emacs_mule.$(OBJEXT): internal/static_assert.h
+enc/emacs_mule.$(OBJEXT): internal/stdalign.h
+enc/emacs_mule.$(OBJEXT): internal/stdbool.h
+enc/emacs_mule.$(OBJEXT): internal/symbol.h
+enc/emacs_mule.$(OBJEXT): internal/value.h
+enc/emacs_mule.$(OBJEXT): internal/value_type.h
+enc/emacs_mule.$(OBJEXT): internal/variable.h
+enc/emacs_mule.$(OBJEXT): internal/warning_push.h
+enc/emacs_mule.$(OBJEXT): internal/xmalloc.h
enc/emacs_mule.$(OBJEXT): missing.h
enc/emacs_mule.$(OBJEXT): onigmo.h
-enc/encdb.$(OBJEXT): $(hdrdir)/ruby.h
+enc/emacs_mule.$(OBJEXT): st.h
+enc/emacs_mule.$(OBJEXT): subst.h
enc/encdb.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-enc/encdb.$(OBJEXT): $(top_srcdir)/internal.h
+enc/encdb.$(OBJEXT): $(top_srcdir)/internal/encoding.h
enc/encdb.$(OBJEXT): assert.h
enc/encdb.$(OBJEXT): backward.h
+enc/encdb.$(OBJEXT): backward/2/assume.h
+enc/encdb.$(OBJEXT): backward/2/attributes.h
+enc/encdb.$(OBJEXT): backward/2/bool.h
+enc/encdb.$(OBJEXT): backward/2/inttypes.h
+enc/encdb.$(OBJEXT): backward/2/limits.h
+enc/encdb.$(OBJEXT): backward/2/long_long.h
+enc/encdb.$(OBJEXT): backward/2/stdalign.h
+enc/encdb.$(OBJEXT): backward/2/stdarg.h
enc/encdb.$(OBJEXT): config.h
enc/encdb.$(OBJEXT): defines.h
enc/encdb.$(OBJEXT): enc/encdb.c
enc/encdb.$(OBJEXT): encdb.h
+enc/encdb.$(OBJEXT): encoding.h
enc/encdb.$(OBJEXT): intern.h
+enc/encdb.$(OBJEXT): internal/abi.h
+enc/encdb.$(OBJEXT): internal/anyargs.h
+enc/encdb.$(OBJEXT): internal/arithmetic.h
+enc/encdb.$(OBJEXT): internal/arithmetic/char.h
+enc/encdb.$(OBJEXT): internal/arithmetic/double.h
+enc/encdb.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/encdb.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/int.h
+enc/encdb.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/long.h
+enc/encdb.$(OBJEXT): internal/arithmetic/long_long.h
+enc/encdb.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/off_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/short.h
+enc/encdb.$(OBJEXT): internal/arithmetic/size_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/encdb.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/encdb.$(OBJEXT): internal/assume.h
+enc/encdb.$(OBJEXT): internal/attr/alloc_size.h
+enc/encdb.$(OBJEXT): internal/attr/artificial.h
+enc/encdb.$(OBJEXT): internal/attr/cold.h
+enc/encdb.$(OBJEXT): internal/attr/const.h
+enc/encdb.$(OBJEXT): internal/attr/constexpr.h
+enc/encdb.$(OBJEXT): internal/attr/deprecated.h
+enc/encdb.$(OBJEXT): internal/attr/diagnose_if.h
+enc/encdb.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/encdb.$(OBJEXT): internal/attr/error.h
+enc/encdb.$(OBJEXT): internal/attr/flag_enum.h
+enc/encdb.$(OBJEXT): internal/attr/forceinline.h
+enc/encdb.$(OBJEXT): internal/attr/format.h
+enc/encdb.$(OBJEXT): internal/attr/maybe_unused.h
+enc/encdb.$(OBJEXT): internal/attr/noalias.h
+enc/encdb.$(OBJEXT): internal/attr/nodiscard.h
+enc/encdb.$(OBJEXT): internal/attr/noexcept.h
+enc/encdb.$(OBJEXT): internal/attr/noinline.h
+enc/encdb.$(OBJEXT): internal/attr/nonnull.h
+enc/encdb.$(OBJEXT): internal/attr/noreturn.h
+enc/encdb.$(OBJEXT): internal/attr/pure.h
+enc/encdb.$(OBJEXT): internal/attr/restrict.h
+enc/encdb.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/encdb.$(OBJEXT): internal/attr/warning.h
+enc/encdb.$(OBJEXT): internal/attr/weakref.h
+enc/encdb.$(OBJEXT): internal/cast.h
+enc/encdb.$(OBJEXT): internal/compiler_is.h
+enc/encdb.$(OBJEXT): internal/compiler_is/apple.h
+enc/encdb.$(OBJEXT): internal/compiler_is/clang.h
+enc/encdb.$(OBJEXT): internal/compiler_is/gcc.h
+enc/encdb.$(OBJEXT): internal/compiler_is/intel.h
+enc/encdb.$(OBJEXT): internal/compiler_is/msvc.h
+enc/encdb.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/encdb.$(OBJEXT): internal/compiler_since.h
+enc/encdb.$(OBJEXT): internal/config.h
+enc/encdb.$(OBJEXT): internal/constant_p.h
+enc/encdb.$(OBJEXT): internal/core.h
+enc/encdb.$(OBJEXT): internal/core/rarray.h
+enc/encdb.$(OBJEXT): internal/core/rbasic.h
+enc/encdb.$(OBJEXT): internal/core/rbignum.h
+enc/encdb.$(OBJEXT): internal/core/rclass.h
+enc/encdb.$(OBJEXT): internal/core/rdata.h
+enc/encdb.$(OBJEXT): internal/core/rfile.h
+enc/encdb.$(OBJEXT): internal/core/rhash.h
+enc/encdb.$(OBJEXT): internal/core/robject.h
+enc/encdb.$(OBJEXT): internal/core/rregexp.h
+enc/encdb.$(OBJEXT): internal/core/rstring.h
+enc/encdb.$(OBJEXT): internal/core/rstruct.h
+enc/encdb.$(OBJEXT): internal/core/rtypeddata.h
+enc/encdb.$(OBJEXT): internal/ctype.h
+enc/encdb.$(OBJEXT): internal/dllexport.h
+enc/encdb.$(OBJEXT): internal/dosish.h
+enc/encdb.$(OBJEXT): internal/encoding/coderange.h
+enc/encdb.$(OBJEXT): internal/encoding/ctype.h
+enc/encdb.$(OBJEXT): internal/encoding/encoding.h
+enc/encdb.$(OBJEXT): internal/encoding/pathname.h
+enc/encdb.$(OBJEXT): internal/encoding/re.h
+enc/encdb.$(OBJEXT): internal/encoding/sprintf.h
+enc/encdb.$(OBJEXT): internal/encoding/string.h
+enc/encdb.$(OBJEXT): internal/encoding/symbol.h
+enc/encdb.$(OBJEXT): internal/encoding/transcode.h
+enc/encdb.$(OBJEXT): internal/error.h
+enc/encdb.$(OBJEXT): internal/eval.h
+enc/encdb.$(OBJEXT): internal/event.h
+enc/encdb.$(OBJEXT): internal/fl_type.h
+enc/encdb.$(OBJEXT): internal/gc.h
+enc/encdb.$(OBJEXT): internal/glob.h
+enc/encdb.$(OBJEXT): internal/globals.h
+enc/encdb.$(OBJEXT): internal/has/attribute.h
+enc/encdb.$(OBJEXT): internal/has/builtin.h
+enc/encdb.$(OBJEXT): internal/has/c_attribute.h
+enc/encdb.$(OBJEXT): internal/has/cpp_attribute.h
+enc/encdb.$(OBJEXT): internal/has/declspec_attribute.h
+enc/encdb.$(OBJEXT): internal/has/extension.h
+enc/encdb.$(OBJEXT): internal/has/feature.h
+enc/encdb.$(OBJEXT): internal/has/warning.h
+enc/encdb.$(OBJEXT): internal/intern/array.h
+enc/encdb.$(OBJEXT): internal/intern/bignum.h
+enc/encdb.$(OBJEXT): internal/intern/class.h
+enc/encdb.$(OBJEXT): internal/intern/compar.h
+enc/encdb.$(OBJEXT): internal/intern/complex.h
+enc/encdb.$(OBJEXT): internal/intern/cont.h
+enc/encdb.$(OBJEXT): internal/intern/dir.h
+enc/encdb.$(OBJEXT): internal/intern/enum.h
+enc/encdb.$(OBJEXT): internal/intern/enumerator.h
+enc/encdb.$(OBJEXT): internal/intern/error.h
+enc/encdb.$(OBJEXT): internal/intern/eval.h
+enc/encdb.$(OBJEXT): internal/intern/file.h
+enc/encdb.$(OBJEXT): internal/intern/gc.h
+enc/encdb.$(OBJEXT): internal/intern/hash.h
+enc/encdb.$(OBJEXT): internal/intern/io.h
+enc/encdb.$(OBJEXT): internal/intern/load.h
+enc/encdb.$(OBJEXT): internal/intern/marshal.h
+enc/encdb.$(OBJEXT): internal/intern/numeric.h
+enc/encdb.$(OBJEXT): internal/intern/object.h
+enc/encdb.$(OBJEXT): internal/intern/parse.h
+enc/encdb.$(OBJEXT): internal/intern/proc.h
+enc/encdb.$(OBJEXT): internal/intern/process.h
+enc/encdb.$(OBJEXT): internal/intern/random.h
+enc/encdb.$(OBJEXT): internal/intern/range.h
+enc/encdb.$(OBJEXT): internal/intern/rational.h
+enc/encdb.$(OBJEXT): internal/intern/re.h
+enc/encdb.$(OBJEXT): internal/intern/ruby.h
+enc/encdb.$(OBJEXT): internal/intern/select.h
+enc/encdb.$(OBJEXT): internal/intern/select/largesize.h
+enc/encdb.$(OBJEXT): internal/intern/signal.h
+enc/encdb.$(OBJEXT): internal/intern/sprintf.h
+enc/encdb.$(OBJEXT): internal/intern/string.h
+enc/encdb.$(OBJEXT): internal/intern/struct.h
+enc/encdb.$(OBJEXT): internal/intern/thread.h
+enc/encdb.$(OBJEXT): internal/intern/time.h
+enc/encdb.$(OBJEXT): internal/intern/variable.h
+enc/encdb.$(OBJEXT): internal/intern/vm.h
+enc/encdb.$(OBJEXT): internal/interpreter.h
+enc/encdb.$(OBJEXT): internal/iterator.h
+enc/encdb.$(OBJEXT): internal/memory.h
+enc/encdb.$(OBJEXT): internal/method.h
+enc/encdb.$(OBJEXT): internal/module.h
+enc/encdb.$(OBJEXT): internal/newobj.h
+enc/encdb.$(OBJEXT): internal/rgengc.h
+enc/encdb.$(OBJEXT): internal/scan_args.h
+enc/encdb.$(OBJEXT): internal/special_consts.h
+enc/encdb.$(OBJEXT): internal/static_assert.h
+enc/encdb.$(OBJEXT): internal/stdalign.h
+enc/encdb.$(OBJEXT): internal/stdbool.h
+enc/encdb.$(OBJEXT): internal/symbol.h
+enc/encdb.$(OBJEXT): internal/value.h
+enc/encdb.$(OBJEXT): internal/value_type.h
+enc/encdb.$(OBJEXT): internal/variable.h
+enc/encdb.$(OBJEXT): internal/warning_push.h
+enc/encdb.$(OBJEXT): internal/xmalloc.h
enc/encdb.$(OBJEXT): missing.h
+enc/encdb.$(OBJEXT): onigmo.h
+enc/encdb.$(OBJEXT): oniguruma.h
enc/encdb.$(OBJEXT): st.h
enc/encdb.$(OBJEXT): subst.h
+enc/euc_jp.$(OBJEXT): $(hdrdir)/ruby.h
+enc/euc_jp.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/euc_jp.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/euc_jp.$(OBJEXT): assert.h
+enc/euc_jp.$(OBJEXT): backward.h
+enc/euc_jp.$(OBJEXT): backward/2/assume.h
+enc/euc_jp.$(OBJEXT): backward/2/attributes.h
+enc/euc_jp.$(OBJEXT): backward/2/bool.h
+enc/euc_jp.$(OBJEXT): backward/2/inttypes.h
+enc/euc_jp.$(OBJEXT): backward/2/limits.h
+enc/euc_jp.$(OBJEXT): backward/2/long_long.h
+enc/euc_jp.$(OBJEXT): backward/2/stdalign.h
+enc/euc_jp.$(OBJEXT): backward/2/stdarg.h
enc/euc_jp.$(OBJEXT): config.h
enc/euc_jp.$(OBJEXT): defines.h
enc/euc_jp.$(OBJEXT): enc/euc_jp.c
enc/euc_jp.$(OBJEXT): enc/jis/props.h
enc/euc_jp.$(OBJEXT): enc/jis/props.kwd
+enc/euc_jp.$(OBJEXT): intern.h
+enc/euc_jp.$(OBJEXT): internal/abi.h
+enc/euc_jp.$(OBJEXT): internal/anyargs.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/char.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/double.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/int.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/long.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/long_long.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/off_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/short.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/size_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/euc_jp.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/euc_jp.$(OBJEXT): internal/assume.h
+enc/euc_jp.$(OBJEXT): internal/attr/alloc_size.h
+enc/euc_jp.$(OBJEXT): internal/attr/artificial.h
+enc/euc_jp.$(OBJEXT): internal/attr/cold.h
+enc/euc_jp.$(OBJEXT): internal/attr/const.h
+enc/euc_jp.$(OBJEXT): internal/attr/constexpr.h
+enc/euc_jp.$(OBJEXT): internal/attr/deprecated.h
+enc/euc_jp.$(OBJEXT): internal/attr/diagnose_if.h
+enc/euc_jp.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/euc_jp.$(OBJEXT): internal/attr/error.h
+enc/euc_jp.$(OBJEXT): internal/attr/flag_enum.h
+enc/euc_jp.$(OBJEXT): internal/attr/forceinline.h
+enc/euc_jp.$(OBJEXT): internal/attr/format.h
+enc/euc_jp.$(OBJEXT): internal/attr/maybe_unused.h
+enc/euc_jp.$(OBJEXT): internal/attr/noalias.h
+enc/euc_jp.$(OBJEXT): internal/attr/nodiscard.h
+enc/euc_jp.$(OBJEXT): internal/attr/noexcept.h
+enc/euc_jp.$(OBJEXT): internal/attr/noinline.h
+enc/euc_jp.$(OBJEXT): internal/attr/nonnull.h
+enc/euc_jp.$(OBJEXT): internal/attr/noreturn.h
+enc/euc_jp.$(OBJEXT): internal/attr/pure.h
+enc/euc_jp.$(OBJEXT): internal/attr/restrict.h
+enc/euc_jp.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/euc_jp.$(OBJEXT): internal/attr/warning.h
+enc/euc_jp.$(OBJEXT): internal/attr/weakref.h
+enc/euc_jp.$(OBJEXT): internal/cast.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/apple.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/clang.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/gcc.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/intel.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/msvc.h
+enc/euc_jp.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/euc_jp.$(OBJEXT): internal/compiler_since.h
+enc/euc_jp.$(OBJEXT): internal/config.h
+enc/euc_jp.$(OBJEXT): internal/constant_p.h
+enc/euc_jp.$(OBJEXT): internal/core.h
+enc/euc_jp.$(OBJEXT): internal/core/rarray.h
+enc/euc_jp.$(OBJEXT): internal/core/rbasic.h
+enc/euc_jp.$(OBJEXT): internal/core/rbignum.h
+enc/euc_jp.$(OBJEXT): internal/core/rclass.h
+enc/euc_jp.$(OBJEXT): internal/core/rdata.h
+enc/euc_jp.$(OBJEXT): internal/core/rfile.h
+enc/euc_jp.$(OBJEXT): internal/core/rhash.h
+enc/euc_jp.$(OBJEXT): internal/core/robject.h
+enc/euc_jp.$(OBJEXT): internal/core/rregexp.h
+enc/euc_jp.$(OBJEXT): internal/core/rstring.h
+enc/euc_jp.$(OBJEXT): internal/core/rstruct.h
+enc/euc_jp.$(OBJEXT): internal/core/rtypeddata.h
+enc/euc_jp.$(OBJEXT): internal/ctype.h
+enc/euc_jp.$(OBJEXT): internal/dllexport.h
+enc/euc_jp.$(OBJEXT): internal/dosish.h
+enc/euc_jp.$(OBJEXT): internal/error.h
+enc/euc_jp.$(OBJEXT): internal/eval.h
+enc/euc_jp.$(OBJEXT): internal/event.h
+enc/euc_jp.$(OBJEXT): internal/fl_type.h
+enc/euc_jp.$(OBJEXT): internal/gc.h
+enc/euc_jp.$(OBJEXT): internal/glob.h
+enc/euc_jp.$(OBJEXT): internal/globals.h
+enc/euc_jp.$(OBJEXT): internal/has/attribute.h
+enc/euc_jp.$(OBJEXT): internal/has/builtin.h
+enc/euc_jp.$(OBJEXT): internal/has/c_attribute.h
+enc/euc_jp.$(OBJEXT): internal/has/cpp_attribute.h
+enc/euc_jp.$(OBJEXT): internal/has/declspec_attribute.h
+enc/euc_jp.$(OBJEXT): internal/has/extension.h
+enc/euc_jp.$(OBJEXT): internal/has/feature.h
+enc/euc_jp.$(OBJEXT): internal/has/warning.h
+enc/euc_jp.$(OBJEXT): internal/intern/array.h
+enc/euc_jp.$(OBJEXT): internal/intern/bignum.h
+enc/euc_jp.$(OBJEXT): internal/intern/class.h
+enc/euc_jp.$(OBJEXT): internal/intern/compar.h
+enc/euc_jp.$(OBJEXT): internal/intern/complex.h
+enc/euc_jp.$(OBJEXT): internal/intern/cont.h
+enc/euc_jp.$(OBJEXT): internal/intern/dir.h
+enc/euc_jp.$(OBJEXT): internal/intern/enum.h
+enc/euc_jp.$(OBJEXT): internal/intern/enumerator.h
+enc/euc_jp.$(OBJEXT): internal/intern/error.h
+enc/euc_jp.$(OBJEXT): internal/intern/eval.h
+enc/euc_jp.$(OBJEXT): internal/intern/file.h
+enc/euc_jp.$(OBJEXT): internal/intern/gc.h
+enc/euc_jp.$(OBJEXT): internal/intern/hash.h
+enc/euc_jp.$(OBJEXT): internal/intern/io.h
+enc/euc_jp.$(OBJEXT): internal/intern/load.h
+enc/euc_jp.$(OBJEXT): internal/intern/marshal.h
+enc/euc_jp.$(OBJEXT): internal/intern/numeric.h
+enc/euc_jp.$(OBJEXT): internal/intern/object.h
+enc/euc_jp.$(OBJEXT): internal/intern/parse.h
+enc/euc_jp.$(OBJEXT): internal/intern/proc.h
+enc/euc_jp.$(OBJEXT): internal/intern/process.h
+enc/euc_jp.$(OBJEXT): internal/intern/random.h
+enc/euc_jp.$(OBJEXT): internal/intern/range.h
+enc/euc_jp.$(OBJEXT): internal/intern/rational.h
+enc/euc_jp.$(OBJEXT): internal/intern/re.h
+enc/euc_jp.$(OBJEXT): internal/intern/ruby.h
+enc/euc_jp.$(OBJEXT): internal/intern/select.h
+enc/euc_jp.$(OBJEXT): internal/intern/select/largesize.h
+enc/euc_jp.$(OBJEXT): internal/intern/signal.h
+enc/euc_jp.$(OBJEXT): internal/intern/sprintf.h
+enc/euc_jp.$(OBJEXT): internal/intern/string.h
+enc/euc_jp.$(OBJEXT): internal/intern/struct.h
+enc/euc_jp.$(OBJEXT): internal/intern/thread.h
+enc/euc_jp.$(OBJEXT): internal/intern/time.h
+enc/euc_jp.$(OBJEXT): internal/intern/variable.h
+enc/euc_jp.$(OBJEXT): internal/intern/vm.h
+enc/euc_jp.$(OBJEXT): internal/interpreter.h
+enc/euc_jp.$(OBJEXT): internal/iterator.h
+enc/euc_jp.$(OBJEXT): internal/memory.h
+enc/euc_jp.$(OBJEXT): internal/method.h
+enc/euc_jp.$(OBJEXT): internal/module.h
+enc/euc_jp.$(OBJEXT): internal/newobj.h
+enc/euc_jp.$(OBJEXT): internal/rgengc.h
+enc/euc_jp.$(OBJEXT): internal/scan_args.h
+enc/euc_jp.$(OBJEXT): internal/special_consts.h
+enc/euc_jp.$(OBJEXT): internal/static_assert.h
+enc/euc_jp.$(OBJEXT): internal/stdalign.h
+enc/euc_jp.$(OBJEXT): internal/stdbool.h
+enc/euc_jp.$(OBJEXT): internal/symbol.h
+enc/euc_jp.$(OBJEXT): internal/value.h
+enc/euc_jp.$(OBJEXT): internal/value_type.h
+enc/euc_jp.$(OBJEXT): internal/variable.h
+enc/euc_jp.$(OBJEXT): internal/warning_push.h
+enc/euc_jp.$(OBJEXT): internal/xmalloc.h
enc/euc_jp.$(OBJEXT): missing.h
enc/euc_jp.$(OBJEXT): onigmo.h
+enc/euc_jp.$(OBJEXT): st.h
+enc/euc_jp.$(OBJEXT): subst.h
+enc/euc_kr.$(OBJEXT): $(hdrdir)/ruby.h
+enc/euc_kr.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/euc_kr.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/euc_kr.$(OBJEXT): assert.h
+enc/euc_kr.$(OBJEXT): backward.h
+enc/euc_kr.$(OBJEXT): backward/2/assume.h
+enc/euc_kr.$(OBJEXT): backward/2/attributes.h
+enc/euc_kr.$(OBJEXT): backward/2/bool.h
+enc/euc_kr.$(OBJEXT): backward/2/inttypes.h
+enc/euc_kr.$(OBJEXT): backward/2/limits.h
+enc/euc_kr.$(OBJEXT): backward/2/long_long.h
+enc/euc_kr.$(OBJEXT): backward/2/stdalign.h
+enc/euc_kr.$(OBJEXT): backward/2/stdarg.h
enc/euc_kr.$(OBJEXT): config.h
enc/euc_kr.$(OBJEXT): defines.h
enc/euc_kr.$(OBJEXT): enc/euc_kr.c
+enc/euc_kr.$(OBJEXT): intern.h
+enc/euc_kr.$(OBJEXT): internal/abi.h
+enc/euc_kr.$(OBJEXT): internal/anyargs.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/char.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/double.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/int.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/long.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/long_long.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/off_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/short.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/size_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/euc_kr.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/euc_kr.$(OBJEXT): internal/assume.h
+enc/euc_kr.$(OBJEXT): internal/attr/alloc_size.h
+enc/euc_kr.$(OBJEXT): internal/attr/artificial.h
+enc/euc_kr.$(OBJEXT): internal/attr/cold.h
+enc/euc_kr.$(OBJEXT): internal/attr/const.h
+enc/euc_kr.$(OBJEXT): internal/attr/constexpr.h
+enc/euc_kr.$(OBJEXT): internal/attr/deprecated.h
+enc/euc_kr.$(OBJEXT): internal/attr/diagnose_if.h
+enc/euc_kr.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/euc_kr.$(OBJEXT): internal/attr/error.h
+enc/euc_kr.$(OBJEXT): internal/attr/flag_enum.h
+enc/euc_kr.$(OBJEXT): internal/attr/forceinline.h
+enc/euc_kr.$(OBJEXT): internal/attr/format.h
+enc/euc_kr.$(OBJEXT): internal/attr/maybe_unused.h
+enc/euc_kr.$(OBJEXT): internal/attr/noalias.h
+enc/euc_kr.$(OBJEXT): internal/attr/nodiscard.h
+enc/euc_kr.$(OBJEXT): internal/attr/noexcept.h
+enc/euc_kr.$(OBJEXT): internal/attr/noinline.h
+enc/euc_kr.$(OBJEXT): internal/attr/nonnull.h
+enc/euc_kr.$(OBJEXT): internal/attr/noreturn.h
+enc/euc_kr.$(OBJEXT): internal/attr/pure.h
+enc/euc_kr.$(OBJEXT): internal/attr/restrict.h
+enc/euc_kr.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/euc_kr.$(OBJEXT): internal/attr/warning.h
+enc/euc_kr.$(OBJEXT): internal/attr/weakref.h
+enc/euc_kr.$(OBJEXT): internal/cast.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/apple.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/clang.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/gcc.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/intel.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/msvc.h
+enc/euc_kr.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/euc_kr.$(OBJEXT): internal/compiler_since.h
+enc/euc_kr.$(OBJEXT): internal/config.h
+enc/euc_kr.$(OBJEXT): internal/constant_p.h
+enc/euc_kr.$(OBJEXT): internal/core.h
+enc/euc_kr.$(OBJEXT): internal/core/rarray.h
+enc/euc_kr.$(OBJEXT): internal/core/rbasic.h
+enc/euc_kr.$(OBJEXT): internal/core/rbignum.h
+enc/euc_kr.$(OBJEXT): internal/core/rclass.h
+enc/euc_kr.$(OBJEXT): internal/core/rdata.h
+enc/euc_kr.$(OBJEXT): internal/core/rfile.h
+enc/euc_kr.$(OBJEXT): internal/core/rhash.h
+enc/euc_kr.$(OBJEXT): internal/core/robject.h
+enc/euc_kr.$(OBJEXT): internal/core/rregexp.h
+enc/euc_kr.$(OBJEXT): internal/core/rstring.h
+enc/euc_kr.$(OBJEXT): internal/core/rstruct.h
+enc/euc_kr.$(OBJEXT): internal/core/rtypeddata.h
+enc/euc_kr.$(OBJEXT): internal/ctype.h
+enc/euc_kr.$(OBJEXT): internal/dllexport.h
+enc/euc_kr.$(OBJEXT): internal/dosish.h
+enc/euc_kr.$(OBJEXT): internal/error.h
+enc/euc_kr.$(OBJEXT): internal/eval.h
+enc/euc_kr.$(OBJEXT): internal/event.h
+enc/euc_kr.$(OBJEXT): internal/fl_type.h
+enc/euc_kr.$(OBJEXT): internal/gc.h
+enc/euc_kr.$(OBJEXT): internal/glob.h
+enc/euc_kr.$(OBJEXT): internal/globals.h
+enc/euc_kr.$(OBJEXT): internal/has/attribute.h
+enc/euc_kr.$(OBJEXT): internal/has/builtin.h
+enc/euc_kr.$(OBJEXT): internal/has/c_attribute.h
+enc/euc_kr.$(OBJEXT): internal/has/cpp_attribute.h
+enc/euc_kr.$(OBJEXT): internal/has/declspec_attribute.h
+enc/euc_kr.$(OBJEXT): internal/has/extension.h
+enc/euc_kr.$(OBJEXT): internal/has/feature.h
+enc/euc_kr.$(OBJEXT): internal/has/warning.h
+enc/euc_kr.$(OBJEXT): internal/intern/array.h
+enc/euc_kr.$(OBJEXT): internal/intern/bignum.h
+enc/euc_kr.$(OBJEXT): internal/intern/class.h
+enc/euc_kr.$(OBJEXT): internal/intern/compar.h
+enc/euc_kr.$(OBJEXT): internal/intern/complex.h
+enc/euc_kr.$(OBJEXT): internal/intern/cont.h
+enc/euc_kr.$(OBJEXT): internal/intern/dir.h
+enc/euc_kr.$(OBJEXT): internal/intern/enum.h
+enc/euc_kr.$(OBJEXT): internal/intern/enumerator.h
+enc/euc_kr.$(OBJEXT): internal/intern/error.h
+enc/euc_kr.$(OBJEXT): internal/intern/eval.h
+enc/euc_kr.$(OBJEXT): internal/intern/file.h
+enc/euc_kr.$(OBJEXT): internal/intern/gc.h
+enc/euc_kr.$(OBJEXT): internal/intern/hash.h
+enc/euc_kr.$(OBJEXT): internal/intern/io.h
+enc/euc_kr.$(OBJEXT): internal/intern/load.h
+enc/euc_kr.$(OBJEXT): internal/intern/marshal.h
+enc/euc_kr.$(OBJEXT): internal/intern/numeric.h
+enc/euc_kr.$(OBJEXT): internal/intern/object.h
+enc/euc_kr.$(OBJEXT): internal/intern/parse.h
+enc/euc_kr.$(OBJEXT): internal/intern/proc.h
+enc/euc_kr.$(OBJEXT): internal/intern/process.h
+enc/euc_kr.$(OBJEXT): internal/intern/random.h
+enc/euc_kr.$(OBJEXT): internal/intern/range.h
+enc/euc_kr.$(OBJEXT): internal/intern/rational.h
+enc/euc_kr.$(OBJEXT): internal/intern/re.h
+enc/euc_kr.$(OBJEXT): internal/intern/ruby.h
+enc/euc_kr.$(OBJEXT): internal/intern/select.h
+enc/euc_kr.$(OBJEXT): internal/intern/select/largesize.h
+enc/euc_kr.$(OBJEXT): internal/intern/signal.h
+enc/euc_kr.$(OBJEXT): internal/intern/sprintf.h
+enc/euc_kr.$(OBJEXT): internal/intern/string.h
+enc/euc_kr.$(OBJEXT): internal/intern/struct.h
+enc/euc_kr.$(OBJEXT): internal/intern/thread.h
+enc/euc_kr.$(OBJEXT): internal/intern/time.h
+enc/euc_kr.$(OBJEXT): internal/intern/variable.h
+enc/euc_kr.$(OBJEXT): internal/intern/vm.h
+enc/euc_kr.$(OBJEXT): internal/interpreter.h
+enc/euc_kr.$(OBJEXT): internal/iterator.h
+enc/euc_kr.$(OBJEXT): internal/memory.h
+enc/euc_kr.$(OBJEXT): internal/method.h
+enc/euc_kr.$(OBJEXT): internal/module.h
+enc/euc_kr.$(OBJEXT): internal/newobj.h
+enc/euc_kr.$(OBJEXT): internal/rgengc.h
+enc/euc_kr.$(OBJEXT): internal/scan_args.h
+enc/euc_kr.$(OBJEXT): internal/special_consts.h
+enc/euc_kr.$(OBJEXT): internal/static_assert.h
+enc/euc_kr.$(OBJEXT): internal/stdalign.h
+enc/euc_kr.$(OBJEXT): internal/stdbool.h
+enc/euc_kr.$(OBJEXT): internal/symbol.h
+enc/euc_kr.$(OBJEXT): internal/value.h
+enc/euc_kr.$(OBJEXT): internal/value_type.h
+enc/euc_kr.$(OBJEXT): internal/variable.h
+enc/euc_kr.$(OBJEXT): internal/warning_push.h
+enc/euc_kr.$(OBJEXT): internal/xmalloc.h
enc/euc_kr.$(OBJEXT): missing.h
enc/euc_kr.$(OBJEXT): onigmo.h
+enc/euc_kr.$(OBJEXT): st.h
+enc/euc_kr.$(OBJEXT): subst.h
+enc/euc_tw.$(OBJEXT): $(hdrdir)/ruby.h
+enc/euc_tw.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/euc_tw.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/euc_tw.$(OBJEXT): assert.h
+enc/euc_tw.$(OBJEXT): backward.h
+enc/euc_tw.$(OBJEXT): backward/2/assume.h
+enc/euc_tw.$(OBJEXT): backward/2/attributes.h
+enc/euc_tw.$(OBJEXT): backward/2/bool.h
+enc/euc_tw.$(OBJEXT): backward/2/inttypes.h
+enc/euc_tw.$(OBJEXT): backward/2/limits.h
+enc/euc_tw.$(OBJEXT): backward/2/long_long.h
+enc/euc_tw.$(OBJEXT): backward/2/stdalign.h
+enc/euc_tw.$(OBJEXT): backward/2/stdarg.h
enc/euc_tw.$(OBJEXT): config.h
enc/euc_tw.$(OBJEXT): defines.h
enc/euc_tw.$(OBJEXT): enc/euc_tw.c
+enc/euc_tw.$(OBJEXT): intern.h
+enc/euc_tw.$(OBJEXT): internal/abi.h
+enc/euc_tw.$(OBJEXT): internal/anyargs.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/char.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/double.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/int.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/long.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/long_long.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/off_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/short.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/size_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/euc_tw.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/euc_tw.$(OBJEXT): internal/assume.h
+enc/euc_tw.$(OBJEXT): internal/attr/alloc_size.h
+enc/euc_tw.$(OBJEXT): internal/attr/artificial.h
+enc/euc_tw.$(OBJEXT): internal/attr/cold.h
+enc/euc_tw.$(OBJEXT): internal/attr/const.h
+enc/euc_tw.$(OBJEXT): internal/attr/constexpr.h
+enc/euc_tw.$(OBJEXT): internal/attr/deprecated.h
+enc/euc_tw.$(OBJEXT): internal/attr/diagnose_if.h
+enc/euc_tw.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/euc_tw.$(OBJEXT): internal/attr/error.h
+enc/euc_tw.$(OBJEXT): internal/attr/flag_enum.h
+enc/euc_tw.$(OBJEXT): internal/attr/forceinline.h
+enc/euc_tw.$(OBJEXT): internal/attr/format.h
+enc/euc_tw.$(OBJEXT): internal/attr/maybe_unused.h
+enc/euc_tw.$(OBJEXT): internal/attr/noalias.h
+enc/euc_tw.$(OBJEXT): internal/attr/nodiscard.h
+enc/euc_tw.$(OBJEXT): internal/attr/noexcept.h
+enc/euc_tw.$(OBJEXT): internal/attr/noinline.h
+enc/euc_tw.$(OBJEXT): internal/attr/nonnull.h
+enc/euc_tw.$(OBJEXT): internal/attr/noreturn.h
+enc/euc_tw.$(OBJEXT): internal/attr/pure.h
+enc/euc_tw.$(OBJEXT): internal/attr/restrict.h
+enc/euc_tw.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/euc_tw.$(OBJEXT): internal/attr/warning.h
+enc/euc_tw.$(OBJEXT): internal/attr/weakref.h
+enc/euc_tw.$(OBJEXT): internal/cast.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/apple.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/clang.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/gcc.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/intel.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/msvc.h
+enc/euc_tw.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/euc_tw.$(OBJEXT): internal/compiler_since.h
+enc/euc_tw.$(OBJEXT): internal/config.h
+enc/euc_tw.$(OBJEXT): internal/constant_p.h
+enc/euc_tw.$(OBJEXT): internal/core.h
+enc/euc_tw.$(OBJEXT): internal/core/rarray.h
+enc/euc_tw.$(OBJEXT): internal/core/rbasic.h
+enc/euc_tw.$(OBJEXT): internal/core/rbignum.h
+enc/euc_tw.$(OBJEXT): internal/core/rclass.h
+enc/euc_tw.$(OBJEXT): internal/core/rdata.h
+enc/euc_tw.$(OBJEXT): internal/core/rfile.h
+enc/euc_tw.$(OBJEXT): internal/core/rhash.h
+enc/euc_tw.$(OBJEXT): internal/core/robject.h
+enc/euc_tw.$(OBJEXT): internal/core/rregexp.h
+enc/euc_tw.$(OBJEXT): internal/core/rstring.h
+enc/euc_tw.$(OBJEXT): internal/core/rstruct.h
+enc/euc_tw.$(OBJEXT): internal/core/rtypeddata.h
+enc/euc_tw.$(OBJEXT): internal/ctype.h
+enc/euc_tw.$(OBJEXT): internal/dllexport.h
+enc/euc_tw.$(OBJEXT): internal/dosish.h
+enc/euc_tw.$(OBJEXT): internal/error.h
+enc/euc_tw.$(OBJEXT): internal/eval.h
+enc/euc_tw.$(OBJEXT): internal/event.h
+enc/euc_tw.$(OBJEXT): internal/fl_type.h
+enc/euc_tw.$(OBJEXT): internal/gc.h
+enc/euc_tw.$(OBJEXT): internal/glob.h
+enc/euc_tw.$(OBJEXT): internal/globals.h
+enc/euc_tw.$(OBJEXT): internal/has/attribute.h
+enc/euc_tw.$(OBJEXT): internal/has/builtin.h
+enc/euc_tw.$(OBJEXT): internal/has/c_attribute.h
+enc/euc_tw.$(OBJEXT): internal/has/cpp_attribute.h
+enc/euc_tw.$(OBJEXT): internal/has/declspec_attribute.h
+enc/euc_tw.$(OBJEXT): internal/has/extension.h
+enc/euc_tw.$(OBJEXT): internal/has/feature.h
+enc/euc_tw.$(OBJEXT): internal/has/warning.h
+enc/euc_tw.$(OBJEXT): internal/intern/array.h
+enc/euc_tw.$(OBJEXT): internal/intern/bignum.h
+enc/euc_tw.$(OBJEXT): internal/intern/class.h
+enc/euc_tw.$(OBJEXT): internal/intern/compar.h
+enc/euc_tw.$(OBJEXT): internal/intern/complex.h
+enc/euc_tw.$(OBJEXT): internal/intern/cont.h
+enc/euc_tw.$(OBJEXT): internal/intern/dir.h
+enc/euc_tw.$(OBJEXT): internal/intern/enum.h
+enc/euc_tw.$(OBJEXT): internal/intern/enumerator.h
+enc/euc_tw.$(OBJEXT): internal/intern/error.h
+enc/euc_tw.$(OBJEXT): internal/intern/eval.h
+enc/euc_tw.$(OBJEXT): internal/intern/file.h
+enc/euc_tw.$(OBJEXT): internal/intern/gc.h
+enc/euc_tw.$(OBJEXT): internal/intern/hash.h
+enc/euc_tw.$(OBJEXT): internal/intern/io.h
+enc/euc_tw.$(OBJEXT): internal/intern/load.h
+enc/euc_tw.$(OBJEXT): internal/intern/marshal.h
+enc/euc_tw.$(OBJEXT): internal/intern/numeric.h
+enc/euc_tw.$(OBJEXT): internal/intern/object.h
+enc/euc_tw.$(OBJEXT): internal/intern/parse.h
+enc/euc_tw.$(OBJEXT): internal/intern/proc.h
+enc/euc_tw.$(OBJEXT): internal/intern/process.h
+enc/euc_tw.$(OBJEXT): internal/intern/random.h
+enc/euc_tw.$(OBJEXT): internal/intern/range.h
+enc/euc_tw.$(OBJEXT): internal/intern/rational.h
+enc/euc_tw.$(OBJEXT): internal/intern/re.h
+enc/euc_tw.$(OBJEXT): internal/intern/ruby.h
+enc/euc_tw.$(OBJEXT): internal/intern/select.h
+enc/euc_tw.$(OBJEXT): internal/intern/select/largesize.h
+enc/euc_tw.$(OBJEXT): internal/intern/signal.h
+enc/euc_tw.$(OBJEXT): internal/intern/sprintf.h
+enc/euc_tw.$(OBJEXT): internal/intern/string.h
+enc/euc_tw.$(OBJEXT): internal/intern/struct.h
+enc/euc_tw.$(OBJEXT): internal/intern/thread.h
+enc/euc_tw.$(OBJEXT): internal/intern/time.h
+enc/euc_tw.$(OBJEXT): internal/intern/variable.h
+enc/euc_tw.$(OBJEXT): internal/intern/vm.h
+enc/euc_tw.$(OBJEXT): internal/interpreter.h
+enc/euc_tw.$(OBJEXT): internal/iterator.h
+enc/euc_tw.$(OBJEXT): internal/memory.h
+enc/euc_tw.$(OBJEXT): internal/method.h
+enc/euc_tw.$(OBJEXT): internal/module.h
+enc/euc_tw.$(OBJEXT): internal/newobj.h
+enc/euc_tw.$(OBJEXT): internal/rgengc.h
+enc/euc_tw.$(OBJEXT): internal/scan_args.h
+enc/euc_tw.$(OBJEXT): internal/special_consts.h
+enc/euc_tw.$(OBJEXT): internal/static_assert.h
+enc/euc_tw.$(OBJEXT): internal/stdalign.h
+enc/euc_tw.$(OBJEXT): internal/stdbool.h
+enc/euc_tw.$(OBJEXT): internal/symbol.h
+enc/euc_tw.$(OBJEXT): internal/value.h
+enc/euc_tw.$(OBJEXT): internal/value_type.h
+enc/euc_tw.$(OBJEXT): internal/variable.h
+enc/euc_tw.$(OBJEXT): internal/warning_push.h
+enc/euc_tw.$(OBJEXT): internal/xmalloc.h
enc/euc_tw.$(OBJEXT): missing.h
enc/euc_tw.$(OBJEXT): onigmo.h
+enc/euc_tw.$(OBJEXT): st.h
+enc/euc_tw.$(OBJEXT): subst.h
+enc/gb18030.$(OBJEXT): $(hdrdir)/ruby.h
+enc/gb18030.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/gb18030.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/gb18030.$(OBJEXT): assert.h
+enc/gb18030.$(OBJEXT): backward.h
+enc/gb18030.$(OBJEXT): backward/2/assume.h
+enc/gb18030.$(OBJEXT): backward/2/attributes.h
+enc/gb18030.$(OBJEXT): backward/2/bool.h
+enc/gb18030.$(OBJEXT): backward/2/inttypes.h
+enc/gb18030.$(OBJEXT): backward/2/limits.h
+enc/gb18030.$(OBJEXT): backward/2/long_long.h
+enc/gb18030.$(OBJEXT): backward/2/stdalign.h
+enc/gb18030.$(OBJEXT): backward/2/stdarg.h
enc/gb18030.$(OBJEXT): config.h
enc/gb18030.$(OBJEXT): defines.h
enc/gb18030.$(OBJEXT): enc/gb18030.c
+enc/gb18030.$(OBJEXT): intern.h
+enc/gb18030.$(OBJEXT): internal/abi.h
+enc/gb18030.$(OBJEXT): internal/anyargs.h
+enc/gb18030.$(OBJEXT): internal/arithmetic.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/char.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/double.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/int.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/long.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/long_long.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/off_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/short.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/size_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/gb18030.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/gb18030.$(OBJEXT): internal/assume.h
+enc/gb18030.$(OBJEXT): internal/attr/alloc_size.h
+enc/gb18030.$(OBJEXT): internal/attr/artificial.h
+enc/gb18030.$(OBJEXT): internal/attr/cold.h
+enc/gb18030.$(OBJEXT): internal/attr/const.h
+enc/gb18030.$(OBJEXT): internal/attr/constexpr.h
+enc/gb18030.$(OBJEXT): internal/attr/deprecated.h
+enc/gb18030.$(OBJEXT): internal/attr/diagnose_if.h
+enc/gb18030.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/gb18030.$(OBJEXT): internal/attr/error.h
+enc/gb18030.$(OBJEXT): internal/attr/flag_enum.h
+enc/gb18030.$(OBJEXT): internal/attr/forceinline.h
+enc/gb18030.$(OBJEXT): internal/attr/format.h
+enc/gb18030.$(OBJEXT): internal/attr/maybe_unused.h
+enc/gb18030.$(OBJEXT): internal/attr/noalias.h
+enc/gb18030.$(OBJEXT): internal/attr/nodiscard.h
+enc/gb18030.$(OBJEXT): internal/attr/noexcept.h
+enc/gb18030.$(OBJEXT): internal/attr/noinline.h
+enc/gb18030.$(OBJEXT): internal/attr/nonnull.h
+enc/gb18030.$(OBJEXT): internal/attr/noreturn.h
+enc/gb18030.$(OBJEXT): internal/attr/pure.h
+enc/gb18030.$(OBJEXT): internal/attr/restrict.h
+enc/gb18030.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/gb18030.$(OBJEXT): internal/attr/warning.h
+enc/gb18030.$(OBJEXT): internal/attr/weakref.h
+enc/gb18030.$(OBJEXT): internal/cast.h
+enc/gb18030.$(OBJEXT): internal/compiler_is.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/apple.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/clang.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/gcc.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/intel.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/msvc.h
+enc/gb18030.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/gb18030.$(OBJEXT): internal/compiler_since.h
+enc/gb18030.$(OBJEXT): internal/config.h
+enc/gb18030.$(OBJEXT): internal/constant_p.h
+enc/gb18030.$(OBJEXT): internal/core.h
+enc/gb18030.$(OBJEXT): internal/core/rarray.h
+enc/gb18030.$(OBJEXT): internal/core/rbasic.h
+enc/gb18030.$(OBJEXT): internal/core/rbignum.h
+enc/gb18030.$(OBJEXT): internal/core/rclass.h
+enc/gb18030.$(OBJEXT): internal/core/rdata.h
+enc/gb18030.$(OBJEXT): internal/core/rfile.h
+enc/gb18030.$(OBJEXT): internal/core/rhash.h
+enc/gb18030.$(OBJEXT): internal/core/robject.h
+enc/gb18030.$(OBJEXT): internal/core/rregexp.h
+enc/gb18030.$(OBJEXT): internal/core/rstring.h
+enc/gb18030.$(OBJEXT): internal/core/rstruct.h
+enc/gb18030.$(OBJEXT): internal/core/rtypeddata.h
+enc/gb18030.$(OBJEXT): internal/ctype.h
+enc/gb18030.$(OBJEXT): internal/dllexport.h
+enc/gb18030.$(OBJEXT): internal/dosish.h
+enc/gb18030.$(OBJEXT): internal/error.h
+enc/gb18030.$(OBJEXT): internal/eval.h
+enc/gb18030.$(OBJEXT): internal/event.h
+enc/gb18030.$(OBJEXT): internal/fl_type.h
+enc/gb18030.$(OBJEXT): internal/gc.h
+enc/gb18030.$(OBJEXT): internal/glob.h
+enc/gb18030.$(OBJEXT): internal/globals.h
+enc/gb18030.$(OBJEXT): internal/has/attribute.h
+enc/gb18030.$(OBJEXT): internal/has/builtin.h
+enc/gb18030.$(OBJEXT): internal/has/c_attribute.h
+enc/gb18030.$(OBJEXT): internal/has/cpp_attribute.h
+enc/gb18030.$(OBJEXT): internal/has/declspec_attribute.h
+enc/gb18030.$(OBJEXT): internal/has/extension.h
+enc/gb18030.$(OBJEXT): internal/has/feature.h
+enc/gb18030.$(OBJEXT): internal/has/warning.h
+enc/gb18030.$(OBJEXT): internal/intern/array.h
+enc/gb18030.$(OBJEXT): internal/intern/bignum.h
+enc/gb18030.$(OBJEXT): internal/intern/class.h
+enc/gb18030.$(OBJEXT): internal/intern/compar.h
+enc/gb18030.$(OBJEXT): internal/intern/complex.h
+enc/gb18030.$(OBJEXT): internal/intern/cont.h
+enc/gb18030.$(OBJEXT): internal/intern/dir.h
+enc/gb18030.$(OBJEXT): internal/intern/enum.h
+enc/gb18030.$(OBJEXT): internal/intern/enumerator.h
+enc/gb18030.$(OBJEXT): internal/intern/error.h
+enc/gb18030.$(OBJEXT): internal/intern/eval.h
+enc/gb18030.$(OBJEXT): internal/intern/file.h
+enc/gb18030.$(OBJEXT): internal/intern/gc.h
+enc/gb18030.$(OBJEXT): internal/intern/hash.h
+enc/gb18030.$(OBJEXT): internal/intern/io.h
+enc/gb18030.$(OBJEXT): internal/intern/load.h
+enc/gb18030.$(OBJEXT): internal/intern/marshal.h
+enc/gb18030.$(OBJEXT): internal/intern/numeric.h
+enc/gb18030.$(OBJEXT): internal/intern/object.h
+enc/gb18030.$(OBJEXT): internal/intern/parse.h
+enc/gb18030.$(OBJEXT): internal/intern/proc.h
+enc/gb18030.$(OBJEXT): internal/intern/process.h
+enc/gb18030.$(OBJEXT): internal/intern/random.h
+enc/gb18030.$(OBJEXT): internal/intern/range.h
+enc/gb18030.$(OBJEXT): internal/intern/rational.h
+enc/gb18030.$(OBJEXT): internal/intern/re.h
+enc/gb18030.$(OBJEXT): internal/intern/ruby.h
+enc/gb18030.$(OBJEXT): internal/intern/select.h
+enc/gb18030.$(OBJEXT): internal/intern/select/largesize.h
+enc/gb18030.$(OBJEXT): internal/intern/signal.h
+enc/gb18030.$(OBJEXT): internal/intern/sprintf.h
+enc/gb18030.$(OBJEXT): internal/intern/string.h
+enc/gb18030.$(OBJEXT): internal/intern/struct.h
+enc/gb18030.$(OBJEXT): internal/intern/thread.h
+enc/gb18030.$(OBJEXT): internal/intern/time.h
+enc/gb18030.$(OBJEXT): internal/intern/variable.h
+enc/gb18030.$(OBJEXT): internal/intern/vm.h
+enc/gb18030.$(OBJEXT): internal/interpreter.h
+enc/gb18030.$(OBJEXT): internal/iterator.h
+enc/gb18030.$(OBJEXT): internal/memory.h
+enc/gb18030.$(OBJEXT): internal/method.h
+enc/gb18030.$(OBJEXT): internal/module.h
+enc/gb18030.$(OBJEXT): internal/newobj.h
+enc/gb18030.$(OBJEXT): internal/rgengc.h
+enc/gb18030.$(OBJEXT): internal/scan_args.h
+enc/gb18030.$(OBJEXT): internal/special_consts.h
+enc/gb18030.$(OBJEXT): internal/static_assert.h
+enc/gb18030.$(OBJEXT): internal/stdalign.h
+enc/gb18030.$(OBJEXT): internal/stdbool.h
+enc/gb18030.$(OBJEXT): internal/symbol.h
+enc/gb18030.$(OBJEXT): internal/value.h
+enc/gb18030.$(OBJEXT): internal/value_type.h
+enc/gb18030.$(OBJEXT): internal/variable.h
+enc/gb18030.$(OBJEXT): internal/warning_push.h
+enc/gb18030.$(OBJEXT): internal/xmalloc.h
enc/gb18030.$(OBJEXT): missing.h
enc/gb18030.$(OBJEXT): onigmo.h
+enc/gb18030.$(OBJEXT): st.h
+enc/gb18030.$(OBJEXT): subst.h
+enc/gb2312.$(OBJEXT): $(hdrdir)/ruby.h
+enc/gb2312.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/gb2312.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/gb2312.$(OBJEXT): assert.h
+enc/gb2312.$(OBJEXT): backward.h
+enc/gb2312.$(OBJEXT): backward/2/assume.h
+enc/gb2312.$(OBJEXT): backward/2/attributes.h
+enc/gb2312.$(OBJEXT): backward/2/bool.h
+enc/gb2312.$(OBJEXT): backward/2/inttypes.h
+enc/gb2312.$(OBJEXT): backward/2/limits.h
+enc/gb2312.$(OBJEXT): backward/2/long_long.h
+enc/gb2312.$(OBJEXT): backward/2/stdalign.h
+enc/gb2312.$(OBJEXT): backward/2/stdarg.h
enc/gb2312.$(OBJEXT): config.h
enc/gb2312.$(OBJEXT): defines.h
enc/gb2312.$(OBJEXT): enc/gb2312.c
+enc/gb2312.$(OBJEXT): intern.h
+enc/gb2312.$(OBJEXT): internal/abi.h
+enc/gb2312.$(OBJEXT): internal/anyargs.h
+enc/gb2312.$(OBJEXT): internal/arithmetic.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/char.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/double.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/int.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/long.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/long_long.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/off_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/short.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/size_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/gb2312.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/gb2312.$(OBJEXT): internal/assume.h
+enc/gb2312.$(OBJEXT): internal/attr/alloc_size.h
+enc/gb2312.$(OBJEXT): internal/attr/artificial.h
+enc/gb2312.$(OBJEXT): internal/attr/cold.h
+enc/gb2312.$(OBJEXT): internal/attr/const.h
+enc/gb2312.$(OBJEXT): internal/attr/constexpr.h
+enc/gb2312.$(OBJEXT): internal/attr/deprecated.h
+enc/gb2312.$(OBJEXT): internal/attr/diagnose_if.h
+enc/gb2312.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/gb2312.$(OBJEXT): internal/attr/error.h
+enc/gb2312.$(OBJEXT): internal/attr/flag_enum.h
+enc/gb2312.$(OBJEXT): internal/attr/forceinline.h
+enc/gb2312.$(OBJEXT): internal/attr/format.h
+enc/gb2312.$(OBJEXT): internal/attr/maybe_unused.h
+enc/gb2312.$(OBJEXT): internal/attr/noalias.h
+enc/gb2312.$(OBJEXT): internal/attr/nodiscard.h
+enc/gb2312.$(OBJEXT): internal/attr/noexcept.h
+enc/gb2312.$(OBJEXT): internal/attr/noinline.h
+enc/gb2312.$(OBJEXT): internal/attr/nonnull.h
+enc/gb2312.$(OBJEXT): internal/attr/noreturn.h
+enc/gb2312.$(OBJEXT): internal/attr/pure.h
+enc/gb2312.$(OBJEXT): internal/attr/restrict.h
+enc/gb2312.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/gb2312.$(OBJEXT): internal/attr/warning.h
+enc/gb2312.$(OBJEXT): internal/attr/weakref.h
+enc/gb2312.$(OBJEXT): internal/cast.h
+enc/gb2312.$(OBJEXT): internal/compiler_is.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/apple.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/clang.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/gcc.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/intel.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/msvc.h
+enc/gb2312.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/gb2312.$(OBJEXT): internal/compiler_since.h
+enc/gb2312.$(OBJEXT): internal/config.h
+enc/gb2312.$(OBJEXT): internal/constant_p.h
+enc/gb2312.$(OBJEXT): internal/core.h
+enc/gb2312.$(OBJEXT): internal/core/rarray.h
+enc/gb2312.$(OBJEXT): internal/core/rbasic.h
+enc/gb2312.$(OBJEXT): internal/core/rbignum.h
+enc/gb2312.$(OBJEXT): internal/core/rclass.h
+enc/gb2312.$(OBJEXT): internal/core/rdata.h
+enc/gb2312.$(OBJEXT): internal/core/rfile.h
+enc/gb2312.$(OBJEXT): internal/core/rhash.h
+enc/gb2312.$(OBJEXT): internal/core/robject.h
+enc/gb2312.$(OBJEXT): internal/core/rregexp.h
+enc/gb2312.$(OBJEXT): internal/core/rstring.h
+enc/gb2312.$(OBJEXT): internal/core/rstruct.h
+enc/gb2312.$(OBJEXT): internal/core/rtypeddata.h
+enc/gb2312.$(OBJEXT): internal/ctype.h
+enc/gb2312.$(OBJEXT): internal/dllexport.h
+enc/gb2312.$(OBJEXT): internal/dosish.h
+enc/gb2312.$(OBJEXT): internal/error.h
+enc/gb2312.$(OBJEXT): internal/eval.h
+enc/gb2312.$(OBJEXT): internal/event.h
+enc/gb2312.$(OBJEXT): internal/fl_type.h
+enc/gb2312.$(OBJEXT): internal/gc.h
+enc/gb2312.$(OBJEXT): internal/glob.h
+enc/gb2312.$(OBJEXT): internal/globals.h
+enc/gb2312.$(OBJEXT): internal/has/attribute.h
+enc/gb2312.$(OBJEXT): internal/has/builtin.h
+enc/gb2312.$(OBJEXT): internal/has/c_attribute.h
+enc/gb2312.$(OBJEXT): internal/has/cpp_attribute.h
+enc/gb2312.$(OBJEXT): internal/has/declspec_attribute.h
+enc/gb2312.$(OBJEXT): internal/has/extension.h
+enc/gb2312.$(OBJEXT): internal/has/feature.h
+enc/gb2312.$(OBJEXT): internal/has/warning.h
+enc/gb2312.$(OBJEXT): internal/intern/array.h
+enc/gb2312.$(OBJEXT): internal/intern/bignum.h
+enc/gb2312.$(OBJEXT): internal/intern/class.h
+enc/gb2312.$(OBJEXT): internal/intern/compar.h
+enc/gb2312.$(OBJEXT): internal/intern/complex.h
+enc/gb2312.$(OBJEXT): internal/intern/cont.h
+enc/gb2312.$(OBJEXT): internal/intern/dir.h
+enc/gb2312.$(OBJEXT): internal/intern/enum.h
+enc/gb2312.$(OBJEXT): internal/intern/enumerator.h
+enc/gb2312.$(OBJEXT): internal/intern/error.h
+enc/gb2312.$(OBJEXT): internal/intern/eval.h
+enc/gb2312.$(OBJEXT): internal/intern/file.h
+enc/gb2312.$(OBJEXT): internal/intern/gc.h
+enc/gb2312.$(OBJEXT): internal/intern/hash.h
+enc/gb2312.$(OBJEXT): internal/intern/io.h
+enc/gb2312.$(OBJEXT): internal/intern/load.h
+enc/gb2312.$(OBJEXT): internal/intern/marshal.h
+enc/gb2312.$(OBJEXT): internal/intern/numeric.h
+enc/gb2312.$(OBJEXT): internal/intern/object.h
+enc/gb2312.$(OBJEXT): internal/intern/parse.h
+enc/gb2312.$(OBJEXT): internal/intern/proc.h
+enc/gb2312.$(OBJEXT): internal/intern/process.h
+enc/gb2312.$(OBJEXT): internal/intern/random.h
+enc/gb2312.$(OBJEXT): internal/intern/range.h
+enc/gb2312.$(OBJEXT): internal/intern/rational.h
+enc/gb2312.$(OBJEXT): internal/intern/re.h
+enc/gb2312.$(OBJEXT): internal/intern/ruby.h
+enc/gb2312.$(OBJEXT): internal/intern/select.h
+enc/gb2312.$(OBJEXT): internal/intern/select/largesize.h
+enc/gb2312.$(OBJEXT): internal/intern/signal.h
+enc/gb2312.$(OBJEXT): internal/intern/sprintf.h
+enc/gb2312.$(OBJEXT): internal/intern/string.h
+enc/gb2312.$(OBJEXT): internal/intern/struct.h
+enc/gb2312.$(OBJEXT): internal/intern/thread.h
+enc/gb2312.$(OBJEXT): internal/intern/time.h
+enc/gb2312.$(OBJEXT): internal/intern/variable.h
+enc/gb2312.$(OBJEXT): internal/intern/vm.h
+enc/gb2312.$(OBJEXT): internal/interpreter.h
+enc/gb2312.$(OBJEXT): internal/iterator.h
+enc/gb2312.$(OBJEXT): internal/memory.h
+enc/gb2312.$(OBJEXT): internal/method.h
+enc/gb2312.$(OBJEXT): internal/module.h
+enc/gb2312.$(OBJEXT): internal/newobj.h
+enc/gb2312.$(OBJEXT): internal/rgengc.h
+enc/gb2312.$(OBJEXT): internal/scan_args.h
+enc/gb2312.$(OBJEXT): internal/special_consts.h
+enc/gb2312.$(OBJEXT): internal/static_assert.h
+enc/gb2312.$(OBJEXT): internal/stdalign.h
+enc/gb2312.$(OBJEXT): internal/stdbool.h
+enc/gb2312.$(OBJEXT): internal/symbol.h
+enc/gb2312.$(OBJEXT): internal/value.h
+enc/gb2312.$(OBJEXT): internal/value_type.h
+enc/gb2312.$(OBJEXT): internal/variable.h
+enc/gb2312.$(OBJEXT): internal/warning_push.h
+enc/gb2312.$(OBJEXT): internal/xmalloc.h
enc/gb2312.$(OBJEXT): missing.h
enc/gb2312.$(OBJEXT): onigmo.h
+enc/gb2312.$(OBJEXT): st.h
+enc/gb2312.$(OBJEXT): subst.h
+enc/gbk.$(OBJEXT): $(hdrdir)/ruby.h
+enc/gbk.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/gbk.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/gbk.$(OBJEXT): assert.h
+enc/gbk.$(OBJEXT): backward.h
+enc/gbk.$(OBJEXT): backward/2/assume.h
+enc/gbk.$(OBJEXT): backward/2/attributes.h
+enc/gbk.$(OBJEXT): backward/2/bool.h
+enc/gbk.$(OBJEXT): backward/2/inttypes.h
+enc/gbk.$(OBJEXT): backward/2/limits.h
+enc/gbk.$(OBJEXT): backward/2/long_long.h
+enc/gbk.$(OBJEXT): backward/2/stdalign.h
+enc/gbk.$(OBJEXT): backward/2/stdarg.h
enc/gbk.$(OBJEXT): config.h
enc/gbk.$(OBJEXT): defines.h
enc/gbk.$(OBJEXT): enc/gbk.c
+enc/gbk.$(OBJEXT): intern.h
+enc/gbk.$(OBJEXT): internal/abi.h
+enc/gbk.$(OBJEXT): internal/anyargs.h
+enc/gbk.$(OBJEXT): internal/arithmetic.h
+enc/gbk.$(OBJEXT): internal/arithmetic/char.h
+enc/gbk.$(OBJEXT): internal/arithmetic/double.h
+enc/gbk.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/gbk.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/int.h
+enc/gbk.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/long.h
+enc/gbk.$(OBJEXT): internal/arithmetic/long_long.h
+enc/gbk.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/off_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/short.h
+enc/gbk.$(OBJEXT): internal/arithmetic/size_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/gbk.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/gbk.$(OBJEXT): internal/assume.h
+enc/gbk.$(OBJEXT): internal/attr/alloc_size.h
+enc/gbk.$(OBJEXT): internal/attr/artificial.h
+enc/gbk.$(OBJEXT): internal/attr/cold.h
+enc/gbk.$(OBJEXT): internal/attr/const.h
+enc/gbk.$(OBJEXT): internal/attr/constexpr.h
+enc/gbk.$(OBJEXT): internal/attr/deprecated.h
+enc/gbk.$(OBJEXT): internal/attr/diagnose_if.h
+enc/gbk.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/gbk.$(OBJEXT): internal/attr/error.h
+enc/gbk.$(OBJEXT): internal/attr/flag_enum.h
+enc/gbk.$(OBJEXT): internal/attr/forceinline.h
+enc/gbk.$(OBJEXT): internal/attr/format.h
+enc/gbk.$(OBJEXT): internal/attr/maybe_unused.h
+enc/gbk.$(OBJEXT): internal/attr/noalias.h
+enc/gbk.$(OBJEXT): internal/attr/nodiscard.h
+enc/gbk.$(OBJEXT): internal/attr/noexcept.h
+enc/gbk.$(OBJEXT): internal/attr/noinline.h
+enc/gbk.$(OBJEXT): internal/attr/nonnull.h
+enc/gbk.$(OBJEXT): internal/attr/noreturn.h
+enc/gbk.$(OBJEXT): internal/attr/pure.h
+enc/gbk.$(OBJEXT): internal/attr/restrict.h
+enc/gbk.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/gbk.$(OBJEXT): internal/attr/warning.h
+enc/gbk.$(OBJEXT): internal/attr/weakref.h
+enc/gbk.$(OBJEXT): internal/cast.h
+enc/gbk.$(OBJEXT): internal/compiler_is.h
+enc/gbk.$(OBJEXT): internal/compiler_is/apple.h
+enc/gbk.$(OBJEXT): internal/compiler_is/clang.h
+enc/gbk.$(OBJEXT): internal/compiler_is/gcc.h
+enc/gbk.$(OBJEXT): internal/compiler_is/intel.h
+enc/gbk.$(OBJEXT): internal/compiler_is/msvc.h
+enc/gbk.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/gbk.$(OBJEXT): internal/compiler_since.h
+enc/gbk.$(OBJEXT): internal/config.h
+enc/gbk.$(OBJEXT): internal/constant_p.h
+enc/gbk.$(OBJEXT): internal/core.h
+enc/gbk.$(OBJEXT): internal/core/rarray.h
+enc/gbk.$(OBJEXT): internal/core/rbasic.h
+enc/gbk.$(OBJEXT): internal/core/rbignum.h
+enc/gbk.$(OBJEXT): internal/core/rclass.h
+enc/gbk.$(OBJEXT): internal/core/rdata.h
+enc/gbk.$(OBJEXT): internal/core/rfile.h
+enc/gbk.$(OBJEXT): internal/core/rhash.h
+enc/gbk.$(OBJEXT): internal/core/robject.h
+enc/gbk.$(OBJEXT): internal/core/rregexp.h
+enc/gbk.$(OBJEXT): internal/core/rstring.h
+enc/gbk.$(OBJEXT): internal/core/rstruct.h
+enc/gbk.$(OBJEXT): internal/core/rtypeddata.h
+enc/gbk.$(OBJEXT): internal/ctype.h
+enc/gbk.$(OBJEXT): internal/dllexport.h
+enc/gbk.$(OBJEXT): internal/dosish.h
+enc/gbk.$(OBJEXT): internal/error.h
+enc/gbk.$(OBJEXT): internal/eval.h
+enc/gbk.$(OBJEXT): internal/event.h
+enc/gbk.$(OBJEXT): internal/fl_type.h
+enc/gbk.$(OBJEXT): internal/gc.h
+enc/gbk.$(OBJEXT): internal/glob.h
+enc/gbk.$(OBJEXT): internal/globals.h
+enc/gbk.$(OBJEXT): internal/has/attribute.h
+enc/gbk.$(OBJEXT): internal/has/builtin.h
+enc/gbk.$(OBJEXT): internal/has/c_attribute.h
+enc/gbk.$(OBJEXT): internal/has/cpp_attribute.h
+enc/gbk.$(OBJEXT): internal/has/declspec_attribute.h
+enc/gbk.$(OBJEXT): internal/has/extension.h
+enc/gbk.$(OBJEXT): internal/has/feature.h
+enc/gbk.$(OBJEXT): internal/has/warning.h
+enc/gbk.$(OBJEXT): internal/intern/array.h
+enc/gbk.$(OBJEXT): internal/intern/bignum.h
+enc/gbk.$(OBJEXT): internal/intern/class.h
+enc/gbk.$(OBJEXT): internal/intern/compar.h
+enc/gbk.$(OBJEXT): internal/intern/complex.h
+enc/gbk.$(OBJEXT): internal/intern/cont.h
+enc/gbk.$(OBJEXT): internal/intern/dir.h
+enc/gbk.$(OBJEXT): internal/intern/enum.h
+enc/gbk.$(OBJEXT): internal/intern/enumerator.h
+enc/gbk.$(OBJEXT): internal/intern/error.h
+enc/gbk.$(OBJEXT): internal/intern/eval.h
+enc/gbk.$(OBJEXT): internal/intern/file.h
+enc/gbk.$(OBJEXT): internal/intern/gc.h
+enc/gbk.$(OBJEXT): internal/intern/hash.h
+enc/gbk.$(OBJEXT): internal/intern/io.h
+enc/gbk.$(OBJEXT): internal/intern/load.h
+enc/gbk.$(OBJEXT): internal/intern/marshal.h
+enc/gbk.$(OBJEXT): internal/intern/numeric.h
+enc/gbk.$(OBJEXT): internal/intern/object.h
+enc/gbk.$(OBJEXT): internal/intern/parse.h
+enc/gbk.$(OBJEXT): internal/intern/proc.h
+enc/gbk.$(OBJEXT): internal/intern/process.h
+enc/gbk.$(OBJEXT): internal/intern/random.h
+enc/gbk.$(OBJEXT): internal/intern/range.h
+enc/gbk.$(OBJEXT): internal/intern/rational.h
+enc/gbk.$(OBJEXT): internal/intern/re.h
+enc/gbk.$(OBJEXT): internal/intern/ruby.h
+enc/gbk.$(OBJEXT): internal/intern/select.h
+enc/gbk.$(OBJEXT): internal/intern/select/largesize.h
+enc/gbk.$(OBJEXT): internal/intern/signal.h
+enc/gbk.$(OBJEXT): internal/intern/sprintf.h
+enc/gbk.$(OBJEXT): internal/intern/string.h
+enc/gbk.$(OBJEXT): internal/intern/struct.h
+enc/gbk.$(OBJEXT): internal/intern/thread.h
+enc/gbk.$(OBJEXT): internal/intern/time.h
+enc/gbk.$(OBJEXT): internal/intern/variable.h
+enc/gbk.$(OBJEXT): internal/intern/vm.h
+enc/gbk.$(OBJEXT): internal/interpreter.h
+enc/gbk.$(OBJEXT): internal/iterator.h
+enc/gbk.$(OBJEXT): internal/memory.h
+enc/gbk.$(OBJEXT): internal/method.h
+enc/gbk.$(OBJEXT): internal/module.h
+enc/gbk.$(OBJEXT): internal/newobj.h
+enc/gbk.$(OBJEXT): internal/rgengc.h
+enc/gbk.$(OBJEXT): internal/scan_args.h
+enc/gbk.$(OBJEXT): internal/special_consts.h
+enc/gbk.$(OBJEXT): internal/static_assert.h
+enc/gbk.$(OBJEXT): internal/stdalign.h
+enc/gbk.$(OBJEXT): internal/stdbool.h
+enc/gbk.$(OBJEXT): internal/symbol.h
+enc/gbk.$(OBJEXT): internal/value.h
+enc/gbk.$(OBJEXT): internal/value_type.h
+enc/gbk.$(OBJEXT): internal/variable.h
+enc/gbk.$(OBJEXT): internal/warning_push.h
+enc/gbk.$(OBJEXT): internal/xmalloc.h
enc/gbk.$(OBJEXT): missing.h
enc/gbk.$(OBJEXT): onigmo.h
+enc/gbk.$(OBJEXT): st.h
+enc/gbk.$(OBJEXT): subst.h
+enc/iso_8859_1.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_1.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_1.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_1.$(OBJEXT): assert.h
+enc/iso_8859_1.$(OBJEXT): backward.h
+enc/iso_8859_1.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_1.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_1.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_1.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_1.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_1.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_1.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_1.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_1.$(OBJEXT): config.h
enc/iso_8859_1.$(OBJEXT): defines.h
enc/iso_8859_1.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_1.$(OBJEXT): enc/iso_8859_1.c
+enc/iso_8859_1.$(OBJEXT): intern.h
+enc/iso_8859_1.$(OBJEXT): internal/abi.h
+enc/iso_8859_1.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_1.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_1.$(OBJEXT): internal/assume.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_1.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_1.$(OBJEXT): internal/cast.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_1.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_1.$(OBJEXT): internal/config.h
+enc/iso_8859_1.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_1.$(OBJEXT): internal/core.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_1.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_1.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_1.$(OBJEXT): internal/ctype.h
+enc/iso_8859_1.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_1.$(OBJEXT): internal/dosish.h
+enc/iso_8859_1.$(OBJEXT): internal/error.h
+enc/iso_8859_1.$(OBJEXT): internal/eval.h
+enc/iso_8859_1.$(OBJEXT): internal/event.h
+enc/iso_8859_1.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_1.$(OBJEXT): internal/gc.h
+enc/iso_8859_1.$(OBJEXT): internal/glob.h
+enc/iso_8859_1.$(OBJEXT): internal/globals.h
+enc/iso_8859_1.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_1.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_1.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_1.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_1.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_1.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_1.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_1.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_1.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_1.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_1.$(OBJEXT): internal/iterator.h
+enc/iso_8859_1.$(OBJEXT): internal/memory.h
+enc/iso_8859_1.$(OBJEXT): internal/method.h
+enc/iso_8859_1.$(OBJEXT): internal/module.h
+enc/iso_8859_1.$(OBJEXT): internal/newobj.h
+enc/iso_8859_1.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_1.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_1.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_1.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_1.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_1.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_1.$(OBJEXT): internal/symbol.h
+enc/iso_8859_1.$(OBJEXT): internal/value.h
+enc/iso_8859_1.$(OBJEXT): internal/value_type.h
+enc/iso_8859_1.$(OBJEXT): internal/variable.h
+enc/iso_8859_1.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_1.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_1.$(OBJEXT): missing.h
enc/iso_8859_1.$(OBJEXT): onigmo.h
+enc/iso_8859_1.$(OBJEXT): st.h
+enc/iso_8859_1.$(OBJEXT): subst.h
+enc/iso_8859_10.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_10.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_10.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_10.$(OBJEXT): assert.h
+enc/iso_8859_10.$(OBJEXT): backward.h
+enc/iso_8859_10.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_10.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_10.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_10.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_10.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_10.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_10.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_10.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_10.$(OBJEXT): config.h
enc/iso_8859_10.$(OBJEXT): defines.h
enc/iso_8859_10.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_10.$(OBJEXT): enc/iso_8859_10.c
+enc/iso_8859_10.$(OBJEXT): intern.h
+enc/iso_8859_10.$(OBJEXT): internal/abi.h
+enc/iso_8859_10.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_10.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_10.$(OBJEXT): internal/assume.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_10.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_10.$(OBJEXT): internal/cast.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_10.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_10.$(OBJEXT): internal/config.h
+enc/iso_8859_10.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_10.$(OBJEXT): internal/core.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_10.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_10.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_10.$(OBJEXT): internal/ctype.h
+enc/iso_8859_10.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_10.$(OBJEXT): internal/dosish.h
+enc/iso_8859_10.$(OBJEXT): internal/error.h
+enc/iso_8859_10.$(OBJEXT): internal/eval.h
+enc/iso_8859_10.$(OBJEXT): internal/event.h
+enc/iso_8859_10.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_10.$(OBJEXT): internal/gc.h
+enc/iso_8859_10.$(OBJEXT): internal/glob.h
+enc/iso_8859_10.$(OBJEXT): internal/globals.h
+enc/iso_8859_10.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_10.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_10.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_10.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_10.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_10.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_10.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_10.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_10.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_10.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_10.$(OBJEXT): internal/iterator.h
+enc/iso_8859_10.$(OBJEXT): internal/memory.h
+enc/iso_8859_10.$(OBJEXT): internal/method.h
+enc/iso_8859_10.$(OBJEXT): internal/module.h
+enc/iso_8859_10.$(OBJEXT): internal/newobj.h
+enc/iso_8859_10.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_10.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_10.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_10.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_10.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_10.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_10.$(OBJEXT): internal/symbol.h
+enc/iso_8859_10.$(OBJEXT): internal/value.h
+enc/iso_8859_10.$(OBJEXT): internal/value_type.h
+enc/iso_8859_10.$(OBJEXT): internal/variable.h
+enc/iso_8859_10.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_10.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_10.$(OBJEXT): missing.h
enc/iso_8859_10.$(OBJEXT): onigmo.h
+enc/iso_8859_10.$(OBJEXT): st.h
+enc/iso_8859_10.$(OBJEXT): subst.h
+enc/iso_8859_11.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_11.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_11.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_11.$(OBJEXT): assert.h
+enc/iso_8859_11.$(OBJEXT): backward.h
+enc/iso_8859_11.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_11.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_11.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_11.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_11.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_11.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_11.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_11.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_11.$(OBJEXT): config.h
enc/iso_8859_11.$(OBJEXT): defines.h
enc/iso_8859_11.$(OBJEXT): enc/iso_8859_11.c
+enc/iso_8859_11.$(OBJEXT): intern.h
+enc/iso_8859_11.$(OBJEXT): internal/abi.h
+enc/iso_8859_11.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_11.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_11.$(OBJEXT): internal/assume.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_11.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_11.$(OBJEXT): internal/cast.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_11.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_11.$(OBJEXT): internal/config.h
+enc/iso_8859_11.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_11.$(OBJEXT): internal/core.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_11.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_11.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_11.$(OBJEXT): internal/ctype.h
+enc/iso_8859_11.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_11.$(OBJEXT): internal/dosish.h
+enc/iso_8859_11.$(OBJEXT): internal/error.h
+enc/iso_8859_11.$(OBJEXT): internal/eval.h
+enc/iso_8859_11.$(OBJEXT): internal/event.h
+enc/iso_8859_11.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_11.$(OBJEXT): internal/gc.h
+enc/iso_8859_11.$(OBJEXT): internal/glob.h
+enc/iso_8859_11.$(OBJEXT): internal/globals.h
+enc/iso_8859_11.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_11.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_11.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_11.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_11.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_11.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_11.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_11.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_11.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_11.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_11.$(OBJEXT): internal/iterator.h
+enc/iso_8859_11.$(OBJEXT): internal/memory.h
+enc/iso_8859_11.$(OBJEXT): internal/method.h
+enc/iso_8859_11.$(OBJEXT): internal/module.h
+enc/iso_8859_11.$(OBJEXT): internal/newobj.h
+enc/iso_8859_11.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_11.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_11.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_11.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_11.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_11.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_11.$(OBJEXT): internal/symbol.h
+enc/iso_8859_11.$(OBJEXT): internal/value.h
+enc/iso_8859_11.$(OBJEXT): internal/value_type.h
+enc/iso_8859_11.$(OBJEXT): internal/variable.h
+enc/iso_8859_11.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_11.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_11.$(OBJEXT): missing.h
enc/iso_8859_11.$(OBJEXT): onigmo.h
+enc/iso_8859_11.$(OBJEXT): st.h
+enc/iso_8859_11.$(OBJEXT): subst.h
+enc/iso_8859_13.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_13.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_13.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_13.$(OBJEXT): assert.h
+enc/iso_8859_13.$(OBJEXT): backward.h
+enc/iso_8859_13.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_13.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_13.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_13.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_13.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_13.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_13.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_13.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_13.$(OBJEXT): config.h
enc/iso_8859_13.$(OBJEXT): defines.h
enc/iso_8859_13.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_13.$(OBJEXT): enc/iso_8859_13.c
+enc/iso_8859_13.$(OBJEXT): intern.h
+enc/iso_8859_13.$(OBJEXT): internal/abi.h
+enc/iso_8859_13.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_13.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_13.$(OBJEXT): internal/assume.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_13.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_13.$(OBJEXT): internal/cast.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_13.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_13.$(OBJEXT): internal/config.h
+enc/iso_8859_13.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_13.$(OBJEXT): internal/core.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_13.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_13.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_13.$(OBJEXT): internal/ctype.h
+enc/iso_8859_13.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_13.$(OBJEXT): internal/dosish.h
+enc/iso_8859_13.$(OBJEXT): internal/error.h
+enc/iso_8859_13.$(OBJEXT): internal/eval.h
+enc/iso_8859_13.$(OBJEXT): internal/event.h
+enc/iso_8859_13.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_13.$(OBJEXT): internal/gc.h
+enc/iso_8859_13.$(OBJEXT): internal/glob.h
+enc/iso_8859_13.$(OBJEXT): internal/globals.h
+enc/iso_8859_13.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_13.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_13.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_13.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_13.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_13.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_13.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_13.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_13.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_13.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_13.$(OBJEXT): internal/iterator.h
+enc/iso_8859_13.$(OBJEXT): internal/memory.h
+enc/iso_8859_13.$(OBJEXT): internal/method.h
+enc/iso_8859_13.$(OBJEXT): internal/module.h
+enc/iso_8859_13.$(OBJEXT): internal/newobj.h
+enc/iso_8859_13.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_13.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_13.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_13.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_13.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_13.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_13.$(OBJEXT): internal/symbol.h
+enc/iso_8859_13.$(OBJEXT): internal/value.h
+enc/iso_8859_13.$(OBJEXT): internal/value_type.h
+enc/iso_8859_13.$(OBJEXT): internal/variable.h
+enc/iso_8859_13.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_13.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_13.$(OBJEXT): missing.h
enc/iso_8859_13.$(OBJEXT): onigmo.h
+enc/iso_8859_13.$(OBJEXT): st.h
+enc/iso_8859_13.$(OBJEXT): subst.h
+enc/iso_8859_14.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_14.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_14.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_14.$(OBJEXT): assert.h
+enc/iso_8859_14.$(OBJEXT): backward.h
+enc/iso_8859_14.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_14.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_14.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_14.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_14.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_14.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_14.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_14.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_14.$(OBJEXT): config.h
enc/iso_8859_14.$(OBJEXT): defines.h
enc/iso_8859_14.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_14.$(OBJEXT): enc/iso_8859_14.c
+enc/iso_8859_14.$(OBJEXT): intern.h
+enc/iso_8859_14.$(OBJEXT): internal/abi.h
+enc/iso_8859_14.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_14.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_14.$(OBJEXT): internal/assume.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_14.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_14.$(OBJEXT): internal/cast.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_14.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_14.$(OBJEXT): internal/config.h
+enc/iso_8859_14.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_14.$(OBJEXT): internal/core.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_14.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_14.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_14.$(OBJEXT): internal/ctype.h
+enc/iso_8859_14.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_14.$(OBJEXT): internal/dosish.h
+enc/iso_8859_14.$(OBJEXT): internal/error.h
+enc/iso_8859_14.$(OBJEXT): internal/eval.h
+enc/iso_8859_14.$(OBJEXT): internal/event.h
+enc/iso_8859_14.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_14.$(OBJEXT): internal/gc.h
+enc/iso_8859_14.$(OBJEXT): internal/glob.h
+enc/iso_8859_14.$(OBJEXT): internal/globals.h
+enc/iso_8859_14.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_14.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_14.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_14.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_14.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_14.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_14.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_14.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_14.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_14.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_14.$(OBJEXT): internal/iterator.h
+enc/iso_8859_14.$(OBJEXT): internal/memory.h
+enc/iso_8859_14.$(OBJEXT): internal/method.h
+enc/iso_8859_14.$(OBJEXT): internal/module.h
+enc/iso_8859_14.$(OBJEXT): internal/newobj.h
+enc/iso_8859_14.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_14.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_14.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_14.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_14.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_14.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_14.$(OBJEXT): internal/symbol.h
+enc/iso_8859_14.$(OBJEXT): internal/value.h
+enc/iso_8859_14.$(OBJEXT): internal/value_type.h
+enc/iso_8859_14.$(OBJEXT): internal/variable.h
+enc/iso_8859_14.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_14.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_14.$(OBJEXT): missing.h
enc/iso_8859_14.$(OBJEXT): onigmo.h
+enc/iso_8859_14.$(OBJEXT): st.h
+enc/iso_8859_14.$(OBJEXT): subst.h
+enc/iso_8859_15.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_15.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_15.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_15.$(OBJEXT): assert.h
+enc/iso_8859_15.$(OBJEXT): backward.h
+enc/iso_8859_15.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_15.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_15.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_15.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_15.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_15.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_15.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_15.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_15.$(OBJEXT): config.h
enc/iso_8859_15.$(OBJEXT): defines.h
enc/iso_8859_15.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_15.$(OBJEXT): enc/iso_8859_15.c
+enc/iso_8859_15.$(OBJEXT): intern.h
+enc/iso_8859_15.$(OBJEXT): internal/abi.h
+enc/iso_8859_15.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_15.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_15.$(OBJEXT): internal/assume.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_15.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_15.$(OBJEXT): internal/cast.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_15.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_15.$(OBJEXT): internal/config.h
+enc/iso_8859_15.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_15.$(OBJEXT): internal/core.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_15.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_15.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_15.$(OBJEXT): internal/ctype.h
+enc/iso_8859_15.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_15.$(OBJEXT): internal/dosish.h
+enc/iso_8859_15.$(OBJEXT): internal/error.h
+enc/iso_8859_15.$(OBJEXT): internal/eval.h
+enc/iso_8859_15.$(OBJEXT): internal/event.h
+enc/iso_8859_15.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_15.$(OBJEXT): internal/gc.h
+enc/iso_8859_15.$(OBJEXT): internal/glob.h
+enc/iso_8859_15.$(OBJEXT): internal/globals.h
+enc/iso_8859_15.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_15.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_15.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_15.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_15.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_15.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_15.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_15.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_15.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_15.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_15.$(OBJEXT): internal/iterator.h
+enc/iso_8859_15.$(OBJEXT): internal/memory.h
+enc/iso_8859_15.$(OBJEXT): internal/method.h
+enc/iso_8859_15.$(OBJEXT): internal/module.h
+enc/iso_8859_15.$(OBJEXT): internal/newobj.h
+enc/iso_8859_15.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_15.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_15.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_15.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_15.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_15.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_15.$(OBJEXT): internal/symbol.h
+enc/iso_8859_15.$(OBJEXT): internal/value.h
+enc/iso_8859_15.$(OBJEXT): internal/value_type.h
+enc/iso_8859_15.$(OBJEXT): internal/variable.h
+enc/iso_8859_15.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_15.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_15.$(OBJEXT): missing.h
enc/iso_8859_15.$(OBJEXT): onigmo.h
+enc/iso_8859_15.$(OBJEXT): st.h
+enc/iso_8859_15.$(OBJEXT): subst.h
+enc/iso_8859_16.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_16.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_16.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_16.$(OBJEXT): assert.h
+enc/iso_8859_16.$(OBJEXT): backward.h
+enc/iso_8859_16.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_16.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_16.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_16.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_16.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_16.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_16.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_16.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_16.$(OBJEXT): config.h
enc/iso_8859_16.$(OBJEXT): defines.h
enc/iso_8859_16.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_16.$(OBJEXT): enc/iso_8859_16.c
+enc/iso_8859_16.$(OBJEXT): intern.h
+enc/iso_8859_16.$(OBJEXT): internal/abi.h
+enc/iso_8859_16.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_16.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_16.$(OBJEXT): internal/assume.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_16.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_16.$(OBJEXT): internal/cast.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_16.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_16.$(OBJEXT): internal/config.h
+enc/iso_8859_16.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_16.$(OBJEXT): internal/core.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_16.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_16.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_16.$(OBJEXT): internal/ctype.h
+enc/iso_8859_16.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_16.$(OBJEXT): internal/dosish.h
+enc/iso_8859_16.$(OBJEXT): internal/error.h
+enc/iso_8859_16.$(OBJEXT): internal/eval.h
+enc/iso_8859_16.$(OBJEXT): internal/event.h
+enc/iso_8859_16.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_16.$(OBJEXT): internal/gc.h
+enc/iso_8859_16.$(OBJEXT): internal/glob.h
+enc/iso_8859_16.$(OBJEXT): internal/globals.h
+enc/iso_8859_16.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_16.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_16.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_16.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_16.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_16.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_16.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_16.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_16.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_16.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_16.$(OBJEXT): internal/iterator.h
+enc/iso_8859_16.$(OBJEXT): internal/memory.h
+enc/iso_8859_16.$(OBJEXT): internal/method.h
+enc/iso_8859_16.$(OBJEXT): internal/module.h
+enc/iso_8859_16.$(OBJEXT): internal/newobj.h
+enc/iso_8859_16.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_16.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_16.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_16.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_16.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_16.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_16.$(OBJEXT): internal/symbol.h
+enc/iso_8859_16.$(OBJEXT): internal/value.h
+enc/iso_8859_16.$(OBJEXT): internal/value_type.h
+enc/iso_8859_16.$(OBJEXT): internal/variable.h
+enc/iso_8859_16.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_16.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_16.$(OBJEXT): missing.h
enc/iso_8859_16.$(OBJEXT): onigmo.h
+enc/iso_8859_16.$(OBJEXT): st.h
+enc/iso_8859_16.$(OBJEXT): subst.h
+enc/iso_8859_2.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_2.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_2.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_2.$(OBJEXT): assert.h
+enc/iso_8859_2.$(OBJEXT): backward.h
+enc/iso_8859_2.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_2.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_2.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_2.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_2.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_2.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_2.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_2.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_2.$(OBJEXT): config.h
enc/iso_8859_2.$(OBJEXT): defines.h
enc/iso_8859_2.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_2.$(OBJEXT): enc/iso_8859_2.c
+enc/iso_8859_2.$(OBJEXT): intern.h
+enc/iso_8859_2.$(OBJEXT): internal/abi.h
+enc/iso_8859_2.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_2.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_2.$(OBJEXT): internal/assume.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_2.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_2.$(OBJEXT): internal/cast.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_2.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_2.$(OBJEXT): internal/config.h
+enc/iso_8859_2.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_2.$(OBJEXT): internal/core.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_2.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_2.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_2.$(OBJEXT): internal/ctype.h
+enc/iso_8859_2.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_2.$(OBJEXT): internal/dosish.h
+enc/iso_8859_2.$(OBJEXT): internal/error.h
+enc/iso_8859_2.$(OBJEXT): internal/eval.h
+enc/iso_8859_2.$(OBJEXT): internal/event.h
+enc/iso_8859_2.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_2.$(OBJEXT): internal/gc.h
+enc/iso_8859_2.$(OBJEXT): internal/glob.h
+enc/iso_8859_2.$(OBJEXT): internal/globals.h
+enc/iso_8859_2.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_2.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_2.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_2.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_2.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_2.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_2.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_2.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_2.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_2.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_2.$(OBJEXT): internal/iterator.h
+enc/iso_8859_2.$(OBJEXT): internal/memory.h
+enc/iso_8859_2.$(OBJEXT): internal/method.h
+enc/iso_8859_2.$(OBJEXT): internal/module.h
+enc/iso_8859_2.$(OBJEXT): internal/newobj.h
+enc/iso_8859_2.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_2.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_2.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_2.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_2.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_2.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_2.$(OBJEXT): internal/symbol.h
+enc/iso_8859_2.$(OBJEXT): internal/value.h
+enc/iso_8859_2.$(OBJEXT): internal/value_type.h
+enc/iso_8859_2.$(OBJEXT): internal/variable.h
+enc/iso_8859_2.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_2.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_2.$(OBJEXT): missing.h
enc/iso_8859_2.$(OBJEXT): onigmo.h
+enc/iso_8859_2.$(OBJEXT): st.h
+enc/iso_8859_2.$(OBJEXT): subst.h
+enc/iso_8859_3.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_3.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_3.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_3.$(OBJEXT): assert.h
+enc/iso_8859_3.$(OBJEXT): backward.h
+enc/iso_8859_3.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_3.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_3.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_3.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_3.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_3.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_3.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_3.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_3.$(OBJEXT): config.h
enc/iso_8859_3.$(OBJEXT): defines.h
enc/iso_8859_3.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_3.$(OBJEXT): enc/iso_8859_3.c
+enc/iso_8859_3.$(OBJEXT): intern.h
+enc/iso_8859_3.$(OBJEXT): internal/abi.h
+enc/iso_8859_3.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_3.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_3.$(OBJEXT): internal/assume.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_3.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_3.$(OBJEXT): internal/cast.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_3.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_3.$(OBJEXT): internal/config.h
+enc/iso_8859_3.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_3.$(OBJEXT): internal/core.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_3.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_3.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_3.$(OBJEXT): internal/ctype.h
+enc/iso_8859_3.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_3.$(OBJEXT): internal/dosish.h
+enc/iso_8859_3.$(OBJEXT): internal/error.h
+enc/iso_8859_3.$(OBJEXT): internal/eval.h
+enc/iso_8859_3.$(OBJEXT): internal/event.h
+enc/iso_8859_3.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_3.$(OBJEXT): internal/gc.h
+enc/iso_8859_3.$(OBJEXT): internal/glob.h
+enc/iso_8859_3.$(OBJEXT): internal/globals.h
+enc/iso_8859_3.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_3.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_3.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_3.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_3.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_3.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_3.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_3.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_3.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_3.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_3.$(OBJEXT): internal/iterator.h
+enc/iso_8859_3.$(OBJEXT): internal/memory.h
+enc/iso_8859_3.$(OBJEXT): internal/method.h
+enc/iso_8859_3.$(OBJEXT): internal/module.h
+enc/iso_8859_3.$(OBJEXT): internal/newobj.h
+enc/iso_8859_3.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_3.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_3.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_3.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_3.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_3.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_3.$(OBJEXT): internal/symbol.h
+enc/iso_8859_3.$(OBJEXT): internal/value.h
+enc/iso_8859_3.$(OBJEXT): internal/value_type.h
+enc/iso_8859_3.$(OBJEXT): internal/variable.h
+enc/iso_8859_3.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_3.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_3.$(OBJEXT): missing.h
enc/iso_8859_3.$(OBJEXT): onigmo.h
+enc/iso_8859_3.$(OBJEXT): st.h
+enc/iso_8859_3.$(OBJEXT): subst.h
+enc/iso_8859_4.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_4.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_4.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_4.$(OBJEXT): assert.h
+enc/iso_8859_4.$(OBJEXT): backward.h
+enc/iso_8859_4.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_4.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_4.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_4.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_4.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_4.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_4.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_4.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_4.$(OBJEXT): config.h
enc/iso_8859_4.$(OBJEXT): defines.h
enc/iso_8859_4.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_4.$(OBJEXT): enc/iso_8859_4.c
+enc/iso_8859_4.$(OBJEXT): intern.h
+enc/iso_8859_4.$(OBJEXT): internal/abi.h
+enc/iso_8859_4.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_4.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_4.$(OBJEXT): internal/assume.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_4.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_4.$(OBJEXT): internal/cast.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_4.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_4.$(OBJEXT): internal/config.h
+enc/iso_8859_4.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_4.$(OBJEXT): internal/core.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_4.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_4.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_4.$(OBJEXT): internal/ctype.h
+enc/iso_8859_4.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_4.$(OBJEXT): internal/dosish.h
+enc/iso_8859_4.$(OBJEXT): internal/error.h
+enc/iso_8859_4.$(OBJEXT): internal/eval.h
+enc/iso_8859_4.$(OBJEXT): internal/event.h
+enc/iso_8859_4.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_4.$(OBJEXT): internal/gc.h
+enc/iso_8859_4.$(OBJEXT): internal/glob.h
+enc/iso_8859_4.$(OBJEXT): internal/globals.h
+enc/iso_8859_4.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_4.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_4.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_4.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_4.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_4.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_4.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_4.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_4.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_4.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_4.$(OBJEXT): internal/iterator.h
+enc/iso_8859_4.$(OBJEXT): internal/memory.h
+enc/iso_8859_4.$(OBJEXT): internal/method.h
+enc/iso_8859_4.$(OBJEXT): internal/module.h
+enc/iso_8859_4.$(OBJEXT): internal/newobj.h
+enc/iso_8859_4.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_4.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_4.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_4.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_4.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_4.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_4.$(OBJEXT): internal/symbol.h
+enc/iso_8859_4.$(OBJEXT): internal/value.h
+enc/iso_8859_4.$(OBJEXT): internal/value_type.h
+enc/iso_8859_4.$(OBJEXT): internal/variable.h
+enc/iso_8859_4.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_4.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_4.$(OBJEXT): missing.h
enc/iso_8859_4.$(OBJEXT): onigmo.h
+enc/iso_8859_4.$(OBJEXT): st.h
+enc/iso_8859_4.$(OBJEXT): subst.h
+enc/iso_8859_5.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_5.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_5.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_5.$(OBJEXT): assert.h
+enc/iso_8859_5.$(OBJEXT): backward.h
+enc/iso_8859_5.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_5.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_5.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_5.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_5.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_5.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_5.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_5.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_5.$(OBJEXT): config.h
enc/iso_8859_5.$(OBJEXT): defines.h
enc/iso_8859_5.$(OBJEXT): enc/iso_8859_5.c
+enc/iso_8859_5.$(OBJEXT): intern.h
+enc/iso_8859_5.$(OBJEXT): internal/abi.h
+enc/iso_8859_5.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_5.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_5.$(OBJEXT): internal/assume.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_5.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_5.$(OBJEXT): internal/cast.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_5.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_5.$(OBJEXT): internal/config.h
+enc/iso_8859_5.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_5.$(OBJEXT): internal/core.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_5.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_5.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_5.$(OBJEXT): internal/ctype.h
+enc/iso_8859_5.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_5.$(OBJEXT): internal/dosish.h
+enc/iso_8859_5.$(OBJEXT): internal/error.h
+enc/iso_8859_5.$(OBJEXT): internal/eval.h
+enc/iso_8859_5.$(OBJEXT): internal/event.h
+enc/iso_8859_5.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_5.$(OBJEXT): internal/gc.h
+enc/iso_8859_5.$(OBJEXT): internal/glob.h
+enc/iso_8859_5.$(OBJEXT): internal/globals.h
+enc/iso_8859_5.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_5.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_5.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_5.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_5.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_5.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_5.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_5.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_5.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_5.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_5.$(OBJEXT): internal/iterator.h
+enc/iso_8859_5.$(OBJEXT): internal/memory.h
+enc/iso_8859_5.$(OBJEXT): internal/method.h
+enc/iso_8859_5.$(OBJEXT): internal/module.h
+enc/iso_8859_5.$(OBJEXT): internal/newobj.h
+enc/iso_8859_5.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_5.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_5.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_5.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_5.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_5.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_5.$(OBJEXT): internal/symbol.h
+enc/iso_8859_5.$(OBJEXT): internal/value.h
+enc/iso_8859_5.$(OBJEXT): internal/value_type.h
+enc/iso_8859_5.$(OBJEXT): internal/variable.h
+enc/iso_8859_5.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_5.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_5.$(OBJEXT): missing.h
enc/iso_8859_5.$(OBJEXT): onigmo.h
+enc/iso_8859_5.$(OBJEXT): st.h
+enc/iso_8859_5.$(OBJEXT): subst.h
+enc/iso_8859_6.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_6.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_6.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_6.$(OBJEXT): assert.h
+enc/iso_8859_6.$(OBJEXT): backward.h
+enc/iso_8859_6.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_6.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_6.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_6.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_6.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_6.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_6.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_6.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_6.$(OBJEXT): config.h
enc/iso_8859_6.$(OBJEXT): defines.h
enc/iso_8859_6.$(OBJEXT): enc/iso_8859_6.c
+enc/iso_8859_6.$(OBJEXT): intern.h
+enc/iso_8859_6.$(OBJEXT): internal/abi.h
+enc/iso_8859_6.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_6.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_6.$(OBJEXT): internal/assume.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_6.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_6.$(OBJEXT): internal/cast.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_6.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_6.$(OBJEXT): internal/config.h
+enc/iso_8859_6.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_6.$(OBJEXT): internal/core.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_6.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_6.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_6.$(OBJEXT): internal/ctype.h
+enc/iso_8859_6.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_6.$(OBJEXT): internal/dosish.h
+enc/iso_8859_6.$(OBJEXT): internal/error.h
+enc/iso_8859_6.$(OBJEXT): internal/eval.h
+enc/iso_8859_6.$(OBJEXT): internal/event.h
+enc/iso_8859_6.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_6.$(OBJEXT): internal/gc.h
+enc/iso_8859_6.$(OBJEXT): internal/glob.h
+enc/iso_8859_6.$(OBJEXT): internal/globals.h
+enc/iso_8859_6.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_6.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_6.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_6.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_6.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_6.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_6.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_6.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_6.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_6.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_6.$(OBJEXT): internal/iterator.h
+enc/iso_8859_6.$(OBJEXT): internal/memory.h
+enc/iso_8859_6.$(OBJEXT): internal/method.h
+enc/iso_8859_6.$(OBJEXT): internal/module.h
+enc/iso_8859_6.$(OBJEXT): internal/newobj.h
+enc/iso_8859_6.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_6.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_6.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_6.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_6.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_6.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_6.$(OBJEXT): internal/symbol.h
+enc/iso_8859_6.$(OBJEXT): internal/value.h
+enc/iso_8859_6.$(OBJEXT): internal/value_type.h
+enc/iso_8859_6.$(OBJEXT): internal/variable.h
+enc/iso_8859_6.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_6.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_6.$(OBJEXT): missing.h
enc/iso_8859_6.$(OBJEXT): onigmo.h
+enc/iso_8859_6.$(OBJEXT): st.h
+enc/iso_8859_6.$(OBJEXT): subst.h
+enc/iso_8859_7.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_7.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_7.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_7.$(OBJEXT): assert.h
+enc/iso_8859_7.$(OBJEXT): backward.h
+enc/iso_8859_7.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_7.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_7.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_7.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_7.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_7.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_7.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_7.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_7.$(OBJEXT): config.h
enc/iso_8859_7.$(OBJEXT): defines.h
enc/iso_8859_7.$(OBJEXT): enc/iso_8859_7.c
+enc/iso_8859_7.$(OBJEXT): intern.h
+enc/iso_8859_7.$(OBJEXT): internal/abi.h
+enc/iso_8859_7.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_7.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_7.$(OBJEXT): internal/assume.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_7.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_7.$(OBJEXT): internal/cast.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_7.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_7.$(OBJEXT): internal/config.h
+enc/iso_8859_7.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_7.$(OBJEXT): internal/core.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_7.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_7.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_7.$(OBJEXT): internal/ctype.h
+enc/iso_8859_7.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_7.$(OBJEXT): internal/dosish.h
+enc/iso_8859_7.$(OBJEXT): internal/error.h
+enc/iso_8859_7.$(OBJEXT): internal/eval.h
+enc/iso_8859_7.$(OBJEXT): internal/event.h
+enc/iso_8859_7.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_7.$(OBJEXT): internal/gc.h
+enc/iso_8859_7.$(OBJEXT): internal/glob.h
+enc/iso_8859_7.$(OBJEXT): internal/globals.h
+enc/iso_8859_7.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_7.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_7.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_7.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_7.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_7.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_7.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_7.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_7.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_7.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_7.$(OBJEXT): internal/iterator.h
+enc/iso_8859_7.$(OBJEXT): internal/memory.h
+enc/iso_8859_7.$(OBJEXT): internal/method.h
+enc/iso_8859_7.$(OBJEXT): internal/module.h
+enc/iso_8859_7.$(OBJEXT): internal/newobj.h
+enc/iso_8859_7.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_7.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_7.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_7.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_7.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_7.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_7.$(OBJEXT): internal/symbol.h
+enc/iso_8859_7.$(OBJEXT): internal/value.h
+enc/iso_8859_7.$(OBJEXT): internal/value_type.h
+enc/iso_8859_7.$(OBJEXT): internal/variable.h
+enc/iso_8859_7.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_7.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_7.$(OBJEXT): missing.h
enc/iso_8859_7.$(OBJEXT): onigmo.h
+enc/iso_8859_7.$(OBJEXT): st.h
+enc/iso_8859_7.$(OBJEXT): subst.h
+enc/iso_8859_8.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_8.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_8.$(OBJEXT): assert.h
+enc/iso_8859_8.$(OBJEXT): backward.h
+enc/iso_8859_8.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_8.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_8.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_8.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_8.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_8.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_8.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_8.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_8.$(OBJEXT): config.h
enc/iso_8859_8.$(OBJEXT): defines.h
enc/iso_8859_8.$(OBJEXT): enc/iso_8859_8.c
+enc/iso_8859_8.$(OBJEXT): intern.h
+enc/iso_8859_8.$(OBJEXT): internal/abi.h
+enc/iso_8859_8.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_8.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_8.$(OBJEXT): internal/assume.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_8.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_8.$(OBJEXT): internal/cast.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_8.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_8.$(OBJEXT): internal/config.h
+enc/iso_8859_8.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_8.$(OBJEXT): internal/core.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_8.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_8.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_8.$(OBJEXT): internal/ctype.h
+enc/iso_8859_8.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_8.$(OBJEXT): internal/dosish.h
+enc/iso_8859_8.$(OBJEXT): internal/error.h
+enc/iso_8859_8.$(OBJEXT): internal/eval.h
+enc/iso_8859_8.$(OBJEXT): internal/event.h
+enc/iso_8859_8.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_8.$(OBJEXT): internal/gc.h
+enc/iso_8859_8.$(OBJEXT): internal/glob.h
+enc/iso_8859_8.$(OBJEXT): internal/globals.h
+enc/iso_8859_8.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_8.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_8.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_8.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_8.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_8.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_8.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_8.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_8.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_8.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_8.$(OBJEXT): internal/iterator.h
+enc/iso_8859_8.$(OBJEXT): internal/memory.h
+enc/iso_8859_8.$(OBJEXT): internal/method.h
+enc/iso_8859_8.$(OBJEXT): internal/module.h
+enc/iso_8859_8.$(OBJEXT): internal/newobj.h
+enc/iso_8859_8.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_8.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_8.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_8.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_8.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_8.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_8.$(OBJEXT): internal/symbol.h
+enc/iso_8859_8.$(OBJEXT): internal/value.h
+enc/iso_8859_8.$(OBJEXT): internal/value_type.h
+enc/iso_8859_8.$(OBJEXT): internal/variable.h
+enc/iso_8859_8.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_8.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_8.$(OBJEXT): missing.h
enc/iso_8859_8.$(OBJEXT): onigmo.h
+enc/iso_8859_8.$(OBJEXT): st.h
+enc/iso_8859_8.$(OBJEXT): subst.h
+enc/iso_8859_9.$(OBJEXT): $(hdrdir)/ruby.h
+enc/iso_8859_9.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/iso_8859_9.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/iso_8859_9.$(OBJEXT): assert.h
+enc/iso_8859_9.$(OBJEXT): backward.h
+enc/iso_8859_9.$(OBJEXT): backward/2/assume.h
+enc/iso_8859_9.$(OBJEXT): backward/2/attributes.h
+enc/iso_8859_9.$(OBJEXT): backward/2/bool.h
+enc/iso_8859_9.$(OBJEXT): backward/2/inttypes.h
+enc/iso_8859_9.$(OBJEXT): backward/2/limits.h
+enc/iso_8859_9.$(OBJEXT): backward/2/long_long.h
+enc/iso_8859_9.$(OBJEXT): backward/2/stdalign.h
+enc/iso_8859_9.$(OBJEXT): backward/2/stdarg.h
enc/iso_8859_9.$(OBJEXT): config.h
enc/iso_8859_9.$(OBJEXT): defines.h
enc/iso_8859_9.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_9.$(OBJEXT): enc/iso_8859_9.c
+enc/iso_8859_9.$(OBJEXT): intern.h
+enc/iso_8859_9.$(OBJEXT): internal/abi.h
+enc/iso_8859_9.$(OBJEXT): internal/anyargs.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/char.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/double.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/int.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/long.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/long_long.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/off_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/short.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/size_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/iso_8859_9.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/iso_8859_9.$(OBJEXT): internal/assume.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/alloc_size.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/artificial.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/cold.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/const.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/constexpr.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/deprecated.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/diagnose_if.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/error.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/flag_enum.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/forceinline.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/format.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/maybe_unused.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/noalias.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/nodiscard.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/noexcept.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/noinline.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/nonnull.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/noreturn.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/pure.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/restrict.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/warning.h
+enc/iso_8859_9.$(OBJEXT): internal/attr/weakref.h
+enc/iso_8859_9.$(OBJEXT): internal/cast.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/apple.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/clang.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/gcc.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/intel.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/msvc.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/iso_8859_9.$(OBJEXT): internal/compiler_since.h
+enc/iso_8859_9.$(OBJEXT): internal/config.h
+enc/iso_8859_9.$(OBJEXT): internal/constant_p.h
+enc/iso_8859_9.$(OBJEXT): internal/core.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rarray.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rbasic.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rbignum.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rclass.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rdata.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rfile.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rhash.h
+enc/iso_8859_9.$(OBJEXT): internal/core/robject.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rregexp.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rstring.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rstruct.h
+enc/iso_8859_9.$(OBJEXT): internal/core/rtypeddata.h
+enc/iso_8859_9.$(OBJEXT): internal/ctype.h
+enc/iso_8859_9.$(OBJEXT): internal/dllexport.h
+enc/iso_8859_9.$(OBJEXT): internal/dosish.h
+enc/iso_8859_9.$(OBJEXT): internal/error.h
+enc/iso_8859_9.$(OBJEXT): internal/eval.h
+enc/iso_8859_9.$(OBJEXT): internal/event.h
+enc/iso_8859_9.$(OBJEXT): internal/fl_type.h
+enc/iso_8859_9.$(OBJEXT): internal/gc.h
+enc/iso_8859_9.$(OBJEXT): internal/glob.h
+enc/iso_8859_9.$(OBJEXT): internal/globals.h
+enc/iso_8859_9.$(OBJEXT): internal/has/attribute.h
+enc/iso_8859_9.$(OBJEXT): internal/has/builtin.h
+enc/iso_8859_9.$(OBJEXT): internal/has/c_attribute.h
+enc/iso_8859_9.$(OBJEXT): internal/has/cpp_attribute.h
+enc/iso_8859_9.$(OBJEXT): internal/has/declspec_attribute.h
+enc/iso_8859_9.$(OBJEXT): internal/has/extension.h
+enc/iso_8859_9.$(OBJEXT): internal/has/feature.h
+enc/iso_8859_9.$(OBJEXT): internal/has/warning.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/array.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/bignum.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/class.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/compar.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/complex.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/cont.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/dir.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/enum.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/enumerator.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/error.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/eval.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/file.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/gc.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/hash.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/io.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/load.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/marshal.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/numeric.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/object.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/parse.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/proc.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/process.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/random.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/range.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/rational.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/re.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/ruby.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/select.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/select/largesize.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/signal.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/sprintf.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/string.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/struct.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/thread.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/time.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/variable.h
+enc/iso_8859_9.$(OBJEXT): internal/intern/vm.h
+enc/iso_8859_9.$(OBJEXT): internal/interpreter.h
+enc/iso_8859_9.$(OBJEXT): internal/iterator.h
+enc/iso_8859_9.$(OBJEXT): internal/memory.h
+enc/iso_8859_9.$(OBJEXT): internal/method.h
+enc/iso_8859_9.$(OBJEXT): internal/module.h
+enc/iso_8859_9.$(OBJEXT): internal/newobj.h
+enc/iso_8859_9.$(OBJEXT): internal/rgengc.h
+enc/iso_8859_9.$(OBJEXT): internal/scan_args.h
+enc/iso_8859_9.$(OBJEXT): internal/special_consts.h
+enc/iso_8859_9.$(OBJEXT): internal/static_assert.h
+enc/iso_8859_9.$(OBJEXT): internal/stdalign.h
+enc/iso_8859_9.$(OBJEXT): internal/stdbool.h
+enc/iso_8859_9.$(OBJEXT): internal/symbol.h
+enc/iso_8859_9.$(OBJEXT): internal/value.h
+enc/iso_8859_9.$(OBJEXT): internal/value_type.h
+enc/iso_8859_9.$(OBJEXT): internal/variable.h
+enc/iso_8859_9.$(OBJEXT): internal/warning_push.h
+enc/iso_8859_9.$(OBJEXT): internal/xmalloc.h
enc/iso_8859_9.$(OBJEXT): missing.h
enc/iso_8859_9.$(OBJEXT): onigmo.h
+enc/iso_8859_9.$(OBJEXT): st.h
+enc/iso_8859_9.$(OBJEXT): subst.h
+enc/koi8_r.$(OBJEXT): $(hdrdir)/ruby.h
+enc/koi8_r.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/koi8_r.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/koi8_r.$(OBJEXT): assert.h
+enc/koi8_r.$(OBJEXT): backward.h
+enc/koi8_r.$(OBJEXT): backward/2/assume.h
+enc/koi8_r.$(OBJEXT): backward/2/attributes.h
+enc/koi8_r.$(OBJEXT): backward/2/bool.h
+enc/koi8_r.$(OBJEXT): backward/2/inttypes.h
+enc/koi8_r.$(OBJEXT): backward/2/limits.h
+enc/koi8_r.$(OBJEXT): backward/2/long_long.h
+enc/koi8_r.$(OBJEXT): backward/2/stdalign.h
+enc/koi8_r.$(OBJEXT): backward/2/stdarg.h
enc/koi8_r.$(OBJEXT): config.h
enc/koi8_r.$(OBJEXT): defines.h
enc/koi8_r.$(OBJEXT): enc/koi8_r.c
+enc/koi8_r.$(OBJEXT): intern.h
+enc/koi8_r.$(OBJEXT): internal/abi.h
+enc/koi8_r.$(OBJEXT): internal/anyargs.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/char.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/double.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/int.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/long.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/long_long.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/off_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/short.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/size_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/koi8_r.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/koi8_r.$(OBJEXT): internal/assume.h
+enc/koi8_r.$(OBJEXT): internal/attr/alloc_size.h
+enc/koi8_r.$(OBJEXT): internal/attr/artificial.h
+enc/koi8_r.$(OBJEXT): internal/attr/cold.h
+enc/koi8_r.$(OBJEXT): internal/attr/const.h
+enc/koi8_r.$(OBJEXT): internal/attr/constexpr.h
+enc/koi8_r.$(OBJEXT): internal/attr/deprecated.h
+enc/koi8_r.$(OBJEXT): internal/attr/diagnose_if.h
+enc/koi8_r.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/koi8_r.$(OBJEXT): internal/attr/error.h
+enc/koi8_r.$(OBJEXT): internal/attr/flag_enum.h
+enc/koi8_r.$(OBJEXT): internal/attr/forceinline.h
+enc/koi8_r.$(OBJEXT): internal/attr/format.h
+enc/koi8_r.$(OBJEXT): internal/attr/maybe_unused.h
+enc/koi8_r.$(OBJEXT): internal/attr/noalias.h
+enc/koi8_r.$(OBJEXT): internal/attr/nodiscard.h
+enc/koi8_r.$(OBJEXT): internal/attr/noexcept.h
+enc/koi8_r.$(OBJEXT): internal/attr/noinline.h
+enc/koi8_r.$(OBJEXT): internal/attr/nonnull.h
+enc/koi8_r.$(OBJEXT): internal/attr/noreturn.h
+enc/koi8_r.$(OBJEXT): internal/attr/pure.h
+enc/koi8_r.$(OBJEXT): internal/attr/restrict.h
+enc/koi8_r.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/koi8_r.$(OBJEXT): internal/attr/warning.h
+enc/koi8_r.$(OBJEXT): internal/attr/weakref.h
+enc/koi8_r.$(OBJEXT): internal/cast.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/apple.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/clang.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/gcc.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/intel.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/msvc.h
+enc/koi8_r.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/koi8_r.$(OBJEXT): internal/compiler_since.h
+enc/koi8_r.$(OBJEXT): internal/config.h
+enc/koi8_r.$(OBJEXT): internal/constant_p.h
+enc/koi8_r.$(OBJEXT): internal/core.h
+enc/koi8_r.$(OBJEXT): internal/core/rarray.h
+enc/koi8_r.$(OBJEXT): internal/core/rbasic.h
+enc/koi8_r.$(OBJEXT): internal/core/rbignum.h
+enc/koi8_r.$(OBJEXT): internal/core/rclass.h
+enc/koi8_r.$(OBJEXT): internal/core/rdata.h
+enc/koi8_r.$(OBJEXT): internal/core/rfile.h
+enc/koi8_r.$(OBJEXT): internal/core/rhash.h
+enc/koi8_r.$(OBJEXT): internal/core/robject.h
+enc/koi8_r.$(OBJEXT): internal/core/rregexp.h
+enc/koi8_r.$(OBJEXT): internal/core/rstring.h
+enc/koi8_r.$(OBJEXT): internal/core/rstruct.h
+enc/koi8_r.$(OBJEXT): internal/core/rtypeddata.h
+enc/koi8_r.$(OBJEXT): internal/ctype.h
+enc/koi8_r.$(OBJEXT): internal/dllexport.h
+enc/koi8_r.$(OBJEXT): internal/dosish.h
+enc/koi8_r.$(OBJEXT): internal/error.h
+enc/koi8_r.$(OBJEXT): internal/eval.h
+enc/koi8_r.$(OBJEXT): internal/event.h
+enc/koi8_r.$(OBJEXT): internal/fl_type.h
+enc/koi8_r.$(OBJEXT): internal/gc.h
+enc/koi8_r.$(OBJEXT): internal/glob.h
+enc/koi8_r.$(OBJEXT): internal/globals.h
+enc/koi8_r.$(OBJEXT): internal/has/attribute.h
+enc/koi8_r.$(OBJEXT): internal/has/builtin.h
+enc/koi8_r.$(OBJEXT): internal/has/c_attribute.h
+enc/koi8_r.$(OBJEXT): internal/has/cpp_attribute.h
+enc/koi8_r.$(OBJEXT): internal/has/declspec_attribute.h
+enc/koi8_r.$(OBJEXT): internal/has/extension.h
+enc/koi8_r.$(OBJEXT): internal/has/feature.h
+enc/koi8_r.$(OBJEXT): internal/has/warning.h
+enc/koi8_r.$(OBJEXT): internal/intern/array.h
+enc/koi8_r.$(OBJEXT): internal/intern/bignum.h
+enc/koi8_r.$(OBJEXT): internal/intern/class.h
+enc/koi8_r.$(OBJEXT): internal/intern/compar.h
+enc/koi8_r.$(OBJEXT): internal/intern/complex.h
+enc/koi8_r.$(OBJEXT): internal/intern/cont.h
+enc/koi8_r.$(OBJEXT): internal/intern/dir.h
+enc/koi8_r.$(OBJEXT): internal/intern/enum.h
+enc/koi8_r.$(OBJEXT): internal/intern/enumerator.h
+enc/koi8_r.$(OBJEXT): internal/intern/error.h
+enc/koi8_r.$(OBJEXT): internal/intern/eval.h
+enc/koi8_r.$(OBJEXT): internal/intern/file.h
+enc/koi8_r.$(OBJEXT): internal/intern/gc.h
+enc/koi8_r.$(OBJEXT): internal/intern/hash.h
+enc/koi8_r.$(OBJEXT): internal/intern/io.h
+enc/koi8_r.$(OBJEXT): internal/intern/load.h
+enc/koi8_r.$(OBJEXT): internal/intern/marshal.h
+enc/koi8_r.$(OBJEXT): internal/intern/numeric.h
+enc/koi8_r.$(OBJEXT): internal/intern/object.h
+enc/koi8_r.$(OBJEXT): internal/intern/parse.h
+enc/koi8_r.$(OBJEXT): internal/intern/proc.h
+enc/koi8_r.$(OBJEXT): internal/intern/process.h
+enc/koi8_r.$(OBJEXT): internal/intern/random.h
+enc/koi8_r.$(OBJEXT): internal/intern/range.h
+enc/koi8_r.$(OBJEXT): internal/intern/rational.h
+enc/koi8_r.$(OBJEXT): internal/intern/re.h
+enc/koi8_r.$(OBJEXT): internal/intern/ruby.h
+enc/koi8_r.$(OBJEXT): internal/intern/select.h
+enc/koi8_r.$(OBJEXT): internal/intern/select/largesize.h
+enc/koi8_r.$(OBJEXT): internal/intern/signal.h
+enc/koi8_r.$(OBJEXT): internal/intern/sprintf.h
+enc/koi8_r.$(OBJEXT): internal/intern/string.h
+enc/koi8_r.$(OBJEXT): internal/intern/struct.h
+enc/koi8_r.$(OBJEXT): internal/intern/thread.h
+enc/koi8_r.$(OBJEXT): internal/intern/time.h
+enc/koi8_r.$(OBJEXT): internal/intern/variable.h
+enc/koi8_r.$(OBJEXT): internal/intern/vm.h
+enc/koi8_r.$(OBJEXT): internal/interpreter.h
+enc/koi8_r.$(OBJEXT): internal/iterator.h
+enc/koi8_r.$(OBJEXT): internal/memory.h
+enc/koi8_r.$(OBJEXT): internal/method.h
+enc/koi8_r.$(OBJEXT): internal/module.h
+enc/koi8_r.$(OBJEXT): internal/newobj.h
+enc/koi8_r.$(OBJEXT): internal/rgengc.h
+enc/koi8_r.$(OBJEXT): internal/scan_args.h
+enc/koi8_r.$(OBJEXT): internal/special_consts.h
+enc/koi8_r.$(OBJEXT): internal/static_assert.h
+enc/koi8_r.$(OBJEXT): internal/stdalign.h
+enc/koi8_r.$(OBJEXT): internal/stdbool.h
+enc/koi8_r.$(OBJEXT): internal/symbol.h
+enc/koi8_r.$(OBJEXT): internal/value.h
+enc/koi8_r.$(OBJEXT): internal/value_type.h
+enc/koi8_r.$(OBJEXT): internal/variable.h
+enc/koi8_r.$(OBJEXT): internal/warning_push.h
+enc/koi8_r.$(OBJEXT): internal/xmalloc.h
enc/koi8_r.$(OBJEXT): missing.h
enc/koi8_r.$(OBJEXT): onigmo.h
+enc/koi8_r.$(OBJEXT): st.h
+enc/koi8_r.$(OBJEXT): subst.h
+enc/koi8_u.$(OBJEXT): $(hdrdir)/ruby.h
+enc/koi8_u.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/koi8_u.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/koi8_u.$(OBJEXT): assert.h
+enc/koi8_u.$(OBJEXT): backward.h
+enc/koi8_u.$(OBJEXT): backward/2/assume.h
+enc/koi8_u.$(OBJEXT): backward/2/attributes.h
+enc/koi8_u.$(OBJEXT): backward/2/bool.h
+enc/koi8_u.$(OBJEXT): backward/2/inttypes.h
+enc/koi8_u.$(OBJEXT): backward/2/limits.h
+enc/koi8_u.$(OBJEXT): backward/2/long_long.h
+enc/koi8_u.$(OBJEXT): backward/2/stdalign.h
+enc/koi8_u.$(OBJEXT): backward/2/stdarg.h
enc/koi8_u.$(OBJEXT): config.h
enc/koi8_u.$(OBJEXT): defines.h
enc/koi8_u.$(OBJEXT): enc/koi8_u.c
+enc/koi8_u.$(OBJEXT): intern.h
+enc/koi8_u.$(OBJEXT): internal/abi.h
+enc/koi8_u.$(OBJEXT): internal/anyargs.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/char.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/double.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/int.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/long.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/long_long.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/off_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/short.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/size_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/koi8_u.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/koi8_u.$(OBJEXT): internal/assume.h
+enc/koi8_u.$(OBJEXT): internal/attr/alloc_size.h
+enc/koi8_u.$(OBJEXT): internal/attr/artificial.h
+enc/koi8_u.$(OBJEXT): internal/attr/cold.h
+enc/koi8_u.$(OBJEXT): internal/attr/const.h
+enc/koi8_u.$(OBJEXT): internal/attr/constexpr.h
+enc/koi8_u.$(OBJEXT): internal/attr/deprecated.h
+enc/koi8_u.$(OBJEXT): internal/attr/diagnose_if.h
+enc/koi8_u.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/koi8_u.$(OBJEXT): internal/attr/error.h
+enc/koi8_u.$(OBJEXT): internal/attr/flag_enum.h
+enc/koi8_u.$(OBJEXT): internal/attr/forceinline.h
+enc/koi8_u.$(OBJEXT): internal/attr/format.h
+enc/koi8_u.$(OBJEXT): internal/attr/maybe_unused.h
+enc/koi8_u.$(OBJEXT): internal/attr/noalias.h
+enc/koi8_u.$(OBJEXT): internal/attr/nodiscard.h
+enc/koi8_u.$(OBJEXT): internal/attr/noexcept.h
+enc/koi8_u.$(OBJEXT): internal/attr/noinline.h
+enc/koi8_u.$(OBJEXT): internal/attr/nonnull.h
+enc/koi8_u.$(OBJEXT): internal/attr/noreturn.h
+enc/koi8_u.$(OBJEXT): internal/attr/pure.h
+enc/koi8_u.$(OBJEXT): internal/attr/restrict.h
+enc/koi8_u.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/koi8_u.$(OBJEXT): internal/attr/warning.h
+enc/koi8_u.$(OBJEXT): internal/attr/weakref.h
+enc/koi8_u.$(OBJEXT): internal/cast.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/apple.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/clang.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/gcc.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/intel.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/msvc.h
+enc/koi8_u.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/koi8_u.$(OBJEXT): internal/compiler_since.h
+enc/koi8_u.$(OBJEXT): internal/config.h
+enc/koi8_u.$(OBJEXT): internal/constant_p.h
+enc/koi8_u.$(OBJEXT): internal/core.h
+enc/koi8_u.$(OBJEXT): internal/core/rarray.h
+enc/koi8_u.$(OBJEXT): internal/core/rbasic.h
+enc/koi8_u.$(OBJEXT): internal/core/rbignum.h
+enc/koi8_u.$(OBJEXT): internal/core/rclass.h
+enc/koi8_u.$(OBJEXT): internal/core/rdata.h
+enc/koi8_u.$(OBJEXT): internal/core/rfile.h
+enc/koi8_u.$(OBJEXT): internal/core/rhash.h
+enc/koi8_u.$(OBJEXT): internal/core/robject.h
+enc/koi8_u.$(OBJEXT): internal/core/rregexp.h
+enc/koi8_u.$(OBJEXT): internal/core/rstring.h
+enc/koi8_u.$(OBJEXT): internal/core/rstruct.h
+enc/koi8_u.$(OBJEXT): internal/core/rtypeddata.h
+enc/koi8_u.$(OBJEXT): internal/ctype.h
+enc/koi8_u.$(OBJEXT): internal/dllexport.h
+enc/koi8_u.$(OBJEXT): internal/dosish.h
+enc/koi8_u.$(OBJEXT): internal/error.h
+enc/koi8_u.$(OBJEXT): internal/eval.h
+enc/koi8_u.$(OBJEXT): internal/event.h
+enc/koi8_u.$(OBJEXT): internal/fl_type.h
+enc/koi8_u.$(OBJEXT): internal/gc.h
+enc/koi8_u.$(OBJEXT): internal/glob.h
+enc/koi8_u.$(OBJEXT): internal/globals.h
+enc/koi8_u.$(OBJEXT): internal/has/attribute.h
+enc/koi8_u.$(OBJEXT): internal/has/builtin.h
+enc/koi8_u.$(OBJEXT): internal/has/c_attribute.h
+enc/koi8_u.$(OBJEXT): internal/has/cpp_attribute.h
+enc/koi8_u.$(OBJEXT): internal/has/declspec_attribute.h
+enc/koi8_u.$(OBJEXT): internal/has/extension.h
+enc/koi8_u.$(OBJEXT): internal/has/feature.h
+enc/koi8_u.$(OBJEXT): internal/has/warning.h
+enc/koi8_u.$(OBJEXT): internal/intern/array.h
+enc/koi8_u.$(OBJEXT): internal/intern/bignum.h
+enc/koi8_u.$(OBJEXT): internal/intern/class.h
+enc/koi8_u.$(OBJEXT): internal/intern/compar.h
+enc/koi8_u.$(OBJEXT): internal/intern/complex.h
+enc/koi8_u.$(OBJEXT): internal/intern/cont.h
+enc/koi8_u.$(OBJEXT): internal/intern/dir.h
+enc/koi8_u.$(OBJEXT): internal/intern/enum.h
+enc/koi8_u.$(OBJEXT): internal/intern/enumerator.h
+enc/koi8_u.$(OBJEXT): internal/intern/error.h
+enc/koi8_u.$(OBJEXT): internal/intern/eval.h
+enc/koi8_u.$(OBJEXT): internal/intern/file.h
+enc/koi8_u.$(OBJEXT): internal/intern/gc.h
+enc/koi8_u.$(OBJEXT): internal/intern/hash.h
+enc/koi8_u.$(OBJEXT): internal/intern/io.h
+enc/koi8_u.$(OBJEXT): internal/intern/load.h
+enc/koi8_u.$(OBJEXT): internal/intern/marshal.h
+enc/koi8_u.$(OBJEXT): internal/intern/numeric.h
+enc/koi8_u.$(OBJEXT): internal/intern/object.h
+enc/koi8_u.$(OBJEXT): internal/intern/parse.h
+enc/koi8_u.$(OBJEXT): internal/intern/proc.h
+enc/koi8_u.$(OBJEXT): internal/intern/process.h
+enc/koi8_u.$(OBJEXT): internal/intern/random.h
+enc/koi8_u.$(OBJEXT): internal/intern/range.h
+enc/koi8_u.$(OBJEXT): internal/intern/rational.h
+enc/koi8_u.$(OBJEXT): internal/intern/re.h
+enc/koi8_u.$(OBJEXT): internal/intern/ruby.h
+enc/koi8_u.$(OBJEXT): internal/intern/select.h
+enc/koi8_u.$(OBJEXT): internal/intern/select/largesize.h
+enc/koi8_u.$(OBJEXT): internal/intern/signal.h
+enc/koi8_u.$(OBJEXT): internal/intern/sprintf.h
+enc/koi8_u.$(OBJEXT): internal/intern/string.h
+enc/koi8_u.$(OBJEXT): internal/intern/struct.h
+enc/koi8_u.$(OBJEXT): internal/intern/thread.h
+enc/koi8_u.$(OBJEXT): internal/intern/time.h
+enc/koi8_u.$(OBJEXT): internal/intern/variable.h
+enc/koi8_u.$(OBJEXT): internal/intern/vm.h
+enc/koi8_u.$(OBJEXT): internal/interpreter.h
+enc/koi8_u.$(OBJEXT): internal/iterator.h
+enc/koi8_u.$(OBJEXT): internal/memory.h
+enc/koi8_u.$(OBJEXT): internal/method.h
+enc/koi8_u.$(OBJEXT): internal/module.h
+enc/koi8_u.$(OBJEXT): internal/newobj.h
+enc/koi8_u.$(OBJEXT): internal/rgengc.h
+enc/koi8_u.$(OBJEXT): internal/scan_args.h
+enc/koi8_u.$(OBJEXT): internal/special_consts.h
+enc/koi8_u.$(OBJEXT): internal/static_assert.h
+enc/koi8_u.$(OBJEXT): internal/stdalign.h
+enc/koi8_u.$(OBJEXT): internal/stdbool.h
+enc/koi8_u.$(OBJEXT): internal/symbol.h
+enc/koi8_u.$(OBJEXT): internal/value.h
+enc/koi8_u.$(OBJEXT): internal/value_type.h
+enc/koi8_u.$(OBJEXT): internal/variable.h
+enc/koi8_u.$(OBJEXT): internal/warning_push.h
+enc/koi8_u.$(OBJEXT): internal/xmalloc.h
enc/koi8_u.$(OBJEXT): missing.h
enc/koi8_u.$(OBJEXT): onigmo.h
+enc/koi8_u.$(OBJEXT): st.h
+enc/koi8_u.$(OBJEXT): subst.h
+enc/shift_jis.$(OBJEXT): $(hdrdir)/ruby.h
+enc/shift_jis.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/shift_jis.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/shift_jis.$(OBJEXT): assert.h
+enc/shift_jis.$(OBJEXT): backward.h
+enc/shift_jis.$(OBJEXT): backward/2/assume.h
+enc/shift_jis.$(OBJEXT): backward/2/attributes.h
+enc/shift_jis.$(OBJEXT): backward/2/bool.h
+enc/shift_jis.$(OBJEXT): backward/2/inttypes.h
+enc/shift_jis.$(OBJEXT): backward/2/limits.h
+enc/shift_jis.$(OBJEXT): backward/2/long_long.h
+enc/shift_jis.$(OBJEXT): backward/2/stdalign.h
+enc/shift_jis.$(OBJEXT): backward/2/stdarg.h
enc/shift_jis.$(OBJEXT): config.h
enc/shift_jis.$(OBJEXT): defines.h
enc/shift_jis.$(OBJEXT): enc/jis/props.h
enc/shift_jis.$(OBJEXT): enc/jis/props.kwd
enc/shift_jis.$(OBJEXT): enc/shift_jis.c
enc/shift_jis.$(OBJEXT): enc/shift_jis.h
+enc/shift_jis.$(OBJEXT): intern.h
+enc/shift_jis.$(OBJEXT): internal/abi.h
+enc/shift_jis.$(OBJEXT): internal/anyargs.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/char.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/double.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/int.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/long.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/long_long.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/off_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/short.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/size_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/shift_jis.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/shift_jis.$(OBJEXT): internal/assume.h
+enc/shift_jis.$(OBJEXT): internal/attr/alloc_size.h
+enc/shift_jis.$(OBJEXT): internal/attr/artificial.h
+enc/shift_jis.$(OBJEXT): internal/attr/cold.h
+enc/shift_jis.$(OBJEXT): internal/attr/const.h
+enc/shift_jis.$(OBJEXT): internal/attr/constexpr.h
+enc/shift_jis.$(OBJEXT): internal/attr/deprecated.h
+enc/shift_jis.$(OBJEXT): internal/attr/diagnose_if.h
+enc/shift_jis.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/shift_jis.$(OBJEXT): internal/attr/error.h
+enc/shift_jis.$(OBJEXT): internal/attr/flag_enum.h
+enc/shift_jis.$(OBJEXT): internal/attr/forceinline.h
+enc/shift_jis.$(OBJEXT): internal/attr/format.h
+enc/shift_jis.$(OBJEXT): internal/attr/maybe_unused.h
+enc/shift_jis.$(OBJEXT): internal/attr/noalias.h
+enc/shift_jis.$(OBJEXT): internal/attr/nodiscard.h
+enc/shift_jis.$(OBJEXT): internal/attr/noexcept.h
+enc/shift_jis.$(OBJEXT): internal/attr/noinline.h
+enc/shift_jis.$(OBJEXT): internal/attr/nonnull.h
+enc/shift_jis.$(OBJEXT): internal/attr/noreturn.h
+enc/shift_jis.$(OBJEXT): internal/attr/pure.h
+enc/shift_jis.$(OBJEXT): internal/attr/restrict.h
+enc/shift_jis.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/shift_jis.$(OBJEXT): internal/attr/warning.h
+enc/shift_jis.$(OBJEXT): internal/attr/weakref.h
+enc/shift_jis.$(OBJEXT): internal/cast.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/apple.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/clang.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/gcc.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/intel.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/msvc.h
+enc/shift_jis.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/shift_jis.$(OBJEXT): internal/compiler_since.h
+enc/shift_jis.$(OBJEXT): internal/config.h
+enc/shift_jis.$(OBJEXT): internal/constant_p.h
+enc/shift_jis.$(OBJEXT): internal/core.h
+enc/shift_jis.$(OBJEXT): internal/core/rarray.h
+enc/shift_jis.$(OBJEXT): internal/core/rbasic.h
+enc/shift_jis.$(OBJEXT): internal/core/rbignum.h
+enc/shift_jis.$(OBJEXT): internal/core/rclass.h
+enc/shift_jis.$(OBJEXT): internal/core/rdata.h
+enc/shift_jis.$(OBJEXT): internal/core/rfile.h
+enc/shift_jis.$(OBJEXT): internal/core/rhash.h
+enc/shift_jis.$(OBJEXT): internal/core/robject.h
+enc/shift_jis.$(OBJEXT): internal/core/rregexp.h
+enc/shift_jis.$(OBJEXT): internal/core/rstring.h
+enc/shift_jis.$(OBJEXT): internal/core/rstruct.h
+enc/shift_jis.$(OBJEXT): internal/core/rtypeddata.h
+enc/shift_jis.$(OBJEXT): internal/ctype.h
+enc/shift_jis.$(OBJEXT): internal/dllexport.h
+enc/shift_jis.$(OBJEXT): internal/dosish.h
+enc/shift_jis.$(OBJEXT): internal/error.h
+enc/shift_jis.$(OBJEXT): internal/eval.h
+enc/shift_jis.$(OBJEXT): internal/event.h
+enc/shift_jis.$(OBJEXT): internal/fl_type.h
+enc/shift_jis.$(OBJEXT): internal/gc.h
+enc/shift_jis.$(OBJEXT): internal/glob.h
+enc/shift_jis.$(OBJEXT): internal/globals.h
+enc/shift_jis.$(OBJEXT): internal/has/attribute.h
+enc/shift_jis.$(OBJEXT): internal/has/builtin.h
+enc/shift_jis.$(OBJEXT): internal/has/c_attribute.h
+enc/shift_jis.$(OBJEXT): internal/has/cpp_attribute.h
+enc/shift_jis.$(OBJEXT): internal/has/declspec_attribute.h
+enc/shift_jis.$(OBJEXT): internal/has/extension.h
+enc/shift_jis.$(OBJEXT): internal/has/feature.h
+enc/shift_jis.$(OBJEXT): internal/has/warning.h
+enc/shift_jis.$(OBJEXT): internal/intern/array.h
+enc/shift_jis.$(OBJEXT): internal/intern/bignum.h
+enc/shift_jis.$(OBJEXT): internal/intern/class.h
+enc/shift_jis.$(OBJEXT): internal/intern/compar.h
+enc/shift_jis.$(OBJEXT): internal/intern/complex.h
+enc/shift_jis.$(OBJEXT): internal/intern/cont.h
+enc/shift_jis.$(OBJEXT): internal/intern/dir.h
+enc/shift_jis.$(OBJEXT): internal/intern/enum.h
+enc/shift_jis.$(OBJEXT): internal/intern/enumerator.h
+enc/shift_jis.$(OBJEXT): internal/intern/error.h
+enc/shift_jis.$(OBJEXT): internal/intern/eval.h
+enc/shift_jis.$(OBJEXT): internal/intern/file.h
+enc/shift_jis.$(OBJEXT): internal/intern/gc.h
+enc/shift_jis.$(OBJEXT): internal/intern/hash.h
+enc/shift_jis.$(OBJEXT): internal/intern/io.h
+enc/shift_jis.$(OBJEXT): internal/intern/load.h
+enc/shift_jis.$(OBJEXT): internal/intern/marshal.h
+enc/shift_jis.$(OBJEXT): internal/intern/numeric.h
+enc/shift_jis.$(OBJEXT): internal/intern/object.h
+enc/shift_jis.$(OBJEXT): internal/intern/parse.h
+enc/shift_jis.$(OBJEXT): internal/intern/proc.h
+enc/shift_jis.$(OBJEXT): internal/intern/process.h
+enc/shift_jis.$(OBJEXT): internal/intern/random.h
+enc/shift_jis.$(OBJEXT): internal/intern/range.h
+enc/shift_jis.$(OBJEXT): internal/intern/rational.h
+enc/shift_jis.$(OBJEXT): internal/intern/re.h
+enc/shift_jis.$(OBJEXT): internal/intern/ruby.h
+enc/shift_jis.$(OBJEXT): internal/intern/select.h
+enc/shift_jis.$(OBJEXT): internal/intern/select/largesize.h
+enc/shift_jis.$(OBJEXT): internal/intern/signal.h
+enc/shift_jis.$(OBJEXT): internal/intern/sprintf.h
+enc/shift_jis.$(OBJEXT): internal/intern/string.h
+enc/shift_jis.$(OBJEXT): internal/intern/struct.h
+enc/shift_jis.$(OBJEXT): internal/intern/thread.h
+enc/shift_jis.$(OBJEXT): internal/intern/time.h
+enc/shift_jis.$(OBJEXT): internal/intern/variable.h
+enc/shift_jis.$(OBJEXT): internal/intern/vm.h
+enc/shift_jis.$(OBJEXT): internal/interpreter.h
+enc/shift_jis.$(OBJEXT): internal/iterator.h
+enc/shift_jis.$(OBJEXT): internal/memory.h
+enc/shift_jis.$(OBJEXT): internal/method.h
+enc/shift_jis.$(OBJEXT): internal/module.h
+enc/shift_jis.$(OBJEXT): internal/newobj.h
+enc/shift_jis.$(OBJEXT): internal/rgengc.h
+enc/shift_jis.$(OBJEXT): internal/scan_args.h
+enc/shift_jis.$(OBJEXT): internal/special_consts.h
+enc/shift_jis.$(OBJEXT): internal/static_assert.h
+enc/shift_jis.$(OBJEXT): internal/stdalign.h
+enc/shift_jis.$(OBJEXT): internal/stdbool.h
+enc/shift_jis.$(OBJEXT): internal/symbol.h
+enc/shift_jis.$(OBJEXT): internal/value.h
+enc/shift_jis.$(OBJEXT): internal/value_type.h
+enc/shift_jis.$(OBJEXT): internal/variable.h
+enc/shift_jis.$(OBJEXT): internal/warning_push.h
+enc/shift_jis.$(OBJEXT): internal/xmalloc.h
enc/shift_jis.$(OBJEXT): missing.h
enc/shift_jis.$(OBJEXT): onigmo.h
+enc/shift_jis.$(OBJEXT): st.h
+enc/shift_jis.$(OBJEXT): subst.h
enc/trans/big5.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/big5.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/big5.$(OBJEXT): assert.h
enc/trans/big5.$(OBJEXT): backward.h
+enc/trans/big5.$(OBJEXT): backward/2/assume.h
+enc/trans/big5.$(OBJEXT): backward/2/attributes.h
+enc/trans/big5.$(OBJEXT): backward/2/bool.h
+enc/trans/big5.$(OBJEXT): backward/2/inttypes.h
+enc/trans/big5.$(OBJEXT): backward/2/limits.h
+enc/trans/big5.$(OBJEXT): backward/2/long_long.h
+enc/trans/big5.$(OBJEXT): backward/2/stdalign.h
+enc/trans/big5.$(OBJEXT): backward/2/stdarg.h
enc/trans/big5.$(OBJEXT): config.h
enc/trans/big5.$(OBJEXT): defines.h
enc/trans/big5.$(OBJEXT): enc/trans/big5.c
enc/trans/big5.$(OBJEXT): intern.h
+enc/trans/big5.$(OBJEXT): internal/abi.h
+enc/trans/big5.$(OBJEXT): internal/anyargs.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/big5.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/big5.$(OBJEXT): internal/assume.h
+enc/trans/big5.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/big5.$(OBJEXT): internal/attr/artificial.h
+enc/trans/big5.$(OBJEXT): internal/attr/cold.h
+enc/trans/big5.$(OBJEXT): internal/attr/const.h
+enc/trans/big5.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/big5.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/big5.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/big5.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/big5.$(OBJEXT): internal/attr/error.h
+enc/trans/big5.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/big5.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/big5.$(OBJEXT): internal/attr/format.h
+enc/trans/big5.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/big5.$(OBJEXT): internal/attr/noalias.h
+enc/trans/big5.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/big5.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/big5.$(OBJEXT): internal/attr/noinline.h
+enc/trans/big5.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/big5.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/big5.$(OBJEXT): internal/attr/pure.h
+enc/trans/big5.$(OBJEXT): internal/attr/restrict.h
+enc/trans/big5.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/big5.$(OBJEXT): internal/attr/warning.h
+enc/trans/big5.$(OBJEXT): internal/attr/weakref.h
+enc/trans/big5.$(OBJEXT): internal/cast.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/big5.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/big5.$(OBJEXT): internal/compiler_since.h
+enc/trans/big5.$(OBJEXT): internal/config.h
+enc/trans/big5.$(OBJEXT): internal/constant_p.h
+enc/trans/big5.$(OBJEXT): internal/core.h
+enc/trans/big5.$(OBJEXT): internal/core/rarray.h
+enc/trans/big5.$(OBJEXT): internal/core/rbasic.h
+enc/trans/big5.$(OBJEXT): internal/core/rbignum.h
+enc/trans/big5.$(OBJEXT): internal/core/rclass.h
+enc/trans/big5.$(OBJEXT): internal/core/rdata.h
+enc/trans/big5.$(OBJEXT): internal/core/rfile.h
+enc/trans/big5.$(OBJEXT): internal/core/rhash.h
+enc/trans/big5.$(OBJEXT): internal/core/robject.h
+enc/trans/big5.$(OBJEXT): internal/core/rregexp.h
+enc/trans/big5.$(OBJEXT): internal/core/rstring.h
+enc/trans/big5.$(OBJEXT): internal/core/rstruct.h
+enc/trans/big5.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/big5.$(OBJEXT): internal/ctype.h
+enc/trans/big5.$(OBJEXT): internal/dllexport.h
+enc/trans/big5.$(OBJEXT): internal/dosish.h
+enc/trans/big5.$(OBJEXT): internal/error.h
+enc/trans/big5.$(OBJEXT): internal/eval.h
+enc/trans/big5.$(OBJEXT): internal/event.h
+enc/trans/big5.$(OBJEXT): internal/fl_type.h
+enc/trans/big5.$(OBJEXT): internal/gc.h
+enc/trans/big5.$(OBJEXT): internal/glob.h
+enc/trans/big5.$(OBJEXT): internal/globals.h
+enc/trans/big5.$(OBJEXT): internal/has/attribute.h
+enc/trans/big5.$(OBJEXT): internal/has/builtin.h
+enc/trans/big5.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/big5.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/big5.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/big5.$(OBJEXT): internal/has/extension.h
+enc/trans/big5.$(OBJEXT): internal/has/feature.h
+enc/trans/big5.$(OBJEXT): internal/has/warning.h
+enc/trans/big5.$(OBJEXT): internal/intern/array.h
+enc/trans/big5.$(OBJEXT): internal/intern/bignum.h
+enc/trans/big5.$(OBJEXT): internal/intern/class.h
+enc/trans/big5.$(OBJEXT): internal/intern/compar.h
+enc/trans/big5.$(OBJEXT): internal/intern/complex.h
+enc/trans/big5.$(OBJEXT): internal/intern/cont.h
+enc/trans/big5.$(OBJEXT): internal/intern/dir.h
+enc/trans/big5.$(OBJEXT): internal/intern/enum.h
+enc/trans/big5.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/big5.$(OBJEXT): internal/intern/error.h
+enc/trans/big5.$(OBJEXT): internal/intern/eval.h
+enc/trans/big5.$(OBJEXT): internal/intern/file.h
+enc/trans/big5.$(OBJEXT): internal/intern/gc.h
+enc/trans/big5.$(OBJEXT): internal/intern/hash.h
+enc/trans/big5.$(OBJEXT): internal/intern/io.h
+enc/trans/big5.$(OBJEXT): internal/intern/load.h
+enc/trans/big5.$(OBJEXT): internal/intern/marshal.h
+enc/trans/big5.$(OBJEXT): internal/intern/numeric.h
+enc/trans/big5.$(OBJEXT): internal/intern/object.h
+enc/trans/big5.$(OBJEXT): internal/intern/parse.h
+enc/trans/big5.$(OBJEXT): internal/intern/proc.h
+enc/trans/big5.$(OBJEXT): internal/intern/process.h
+enc/trans/big5.$(OBJEXT): internal/intern/random.h
+enc/trans/big5.$(OBJEXT): internal/intern/range.h
+enc/trans/big5.$(OBJEXT): internal/intern/rational.h
+enc/trans/big5.$(OBJEXT): internal/intern/re.h
+enc/trans/big5.$(OBJEXT): internal/intern/ruby.h
+enc/trans/big5.$(OBJEXT): internal/intern/select.h
+enc/trans/big5.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/big5.$(OBJEXT): internal/intern/signal.h
+enc/trans/big5.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/big5.$(OBJEXT): internal/intern/string.h
+enc/trans/big5.$(OBJEXT): internal/intern/struct.h
+enc/trans/big5.$(OBJEXT): internal/intern/thread.h
+enc/trans/big5.$(OBJEXT): internal/intern/time.h
+enc/trans/big5.$(OBJEXT): internal/intern/variable.h
+enc/trans/big5.$(OBJEXT): internal/intern/vm.h
+enc/trans/big5.$(OBJEXT): internal/interpreter.h
+enc/trans/big5.$(OBJEXT): internal/iterator.h
+enc/trans/big5.$(OBJEXT): internal/memory.h
+enc/trans/big5.$(OBJEXT): internal/method.h
+enc/trans/big5.$(OBJEXT): internal/module.h
+enc/trans/big5.$(OBJEXT): internal/newobj.h
+enc/trans/big5.$(OBJEXT): internal/rgengc.h
+enc/trans/big5.$(OBJEXT): internal/scan_args.h
+enc/trans/big5.$(OBJEXT): internal/special_consts.h
+enc/trans/big5.$(OBJEXT): internal/static_assert.h
+enc/trans/big5.$(OBJEXT): internal/stdalign.h
+enc/trans/big5.$(OBJEXT): internal/stdbool.h
+enc/trans/big5.$(OBJEXT): internal/symbol.h
+enc/trans/big5.$(OBJEXT): internal/value.h
+enc/trans/big5.$(OBJEXT): internal/value_type.h
+enc/trans/big5.$(OBJEXT): internal/variable.h
+enc/trans/big5.$(OBJEXT): internal/warning_push.h
+enc/trans/big5.$(OBJEXT): internal/xmalloc.h
enc/trans/big5.$(OBJEXT): missing.h
enc/trans/big5.$(OBJEXT): st.h
enc/trans/big5.$(OBJEXT): subst.h
@@ -397,10 +5220,158 @@ enc/trans/cesu_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/cesu_8.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/cesu_8.$(OBJEXT): assert.h
enc/trans/cesu_8.$(OBJEXT): backward.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/assume.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/attributes.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/bool.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/inttypes.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/limits.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/long_long.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/stdalign.h
+enc/trans/cesu_8.$(OBJEXT): backward/2/stdarg.h
enc/trans/cesu_8.$(OBJEXT): config.h
enc/trans/cesu_8.$(OBJEXT): defines.h
enc/trans/cesu_8.$(OBJEXT): enc/trans/cesu_8.c
enc/trans/cesu_8.$(OBJEXT): intern.h
+enc/trans/cesu_8.$(OBJEXT): internal/abi.h
+enc/trans/cesu_8.$(OBJEXT): internal/anyargs.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/cesu_8.$(OBJEXT): internal/assume.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/artificial.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/cold.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/const.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/error.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/format.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/noalias.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/noinline.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/pure.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/restrict.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/warning.h
+enc/trans/cesu_8.$(OBJEXT): internal/attr/weakref.h
+enc/trans/cesu_8.$(OBJEXT): internal/cast.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/cesu_8.$(OBJEXT): internal/compiler_since.h
+enc/trans/cesu_8.$(OBJEXT): internal/config.h
+enc/trans/cesu_8.$(OBJEXT): internal/constant_p.h
+enc/trans/cesu_8.$(OBJEXT): internal/core.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rarray.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rbasic.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rbignum.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rclass.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rdata.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rfile.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rhash.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/robject.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rregexp.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rstring.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rstruct.h
+enc/trans/cesu_8.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/cesu_8.$(OBJEXT): internal/ctype.h
+enc/trans/cesu_8.$(OBJEXT): internal/dllexport.h
+enc/trans/cesu_8.$(OBJEXT): internal/dosish.h
+enc/trans/cesu_8.$(OBJEXT): internal/error.h
+enc/trans/cesu_8.$(OBJEXT): internal/eval.h
+enc/trans/cesu_8.$(OBJEXT): internal/event.h
+enc/trans/cesu_8.$(OBJEXT): internal/fl_type.h
+enc/trans/cesu_8.$(OBJEXT): internal/gc.h
+enc/trans/cesu_8.$(OBJEXT): internal/glob.h
+enc/trans/cesu_8.$(OBJEXT): internal/globals.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/attribute.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/builtin.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/extension.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/feature.h
+enc/trans/cesu_8.$(OBJEXT): internal/has/warning.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/array.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/bignum.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/class.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/compar.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/complex.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/cont.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/dir.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/enum.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/error.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/eval.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/file.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/gc.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/hash.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/io.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/load.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/marshal.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/numeric.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/object.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/parse.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/proc.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/process.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/random.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/range.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/rational.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/re.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/ruby.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/select.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/signal.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/string.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/struct.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/thread.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/time.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/variable.h
+enc/trans/cesu_8.$(OBJEXT): internal/intern/vm.h
+enc/trans/cesu_8.$(OBJEXT): internal/interpreter.h
+enc/trans/cesu_8.$(OBJEXT): internal/iterator.h
+enc/trans/cesu_8.$(OBJEXT): internal/memory.h
+enc/trans/cesu_8.$(OBJEXT): internal/method.h
+enc/trans/cesu_8.$(OBJEXT): internal/module.h
+enc/trans/cesu_8.$(OBJEXT): internal/newobj.h
+enc/trans/cesu_8.$(OBJEXT): internal/rgengc.h
+enc/trans/cesu_8.$(OBJEXT): internal/scan_args.h
+enc/trans/cesu_8.$(OBJEXT): internal/special_consts.h
+enc/trans/cesu_8.$(OBJEXT): internal/static_assert.h
+enc/trans/cesu_8.$(OBJEXT): internal/stdalign.h
+enc/trans/cesu_8.$(OBJEXT): internal/stdbool.h
+enc/trans/cesu_8.$(OBJEXT): internal/symbol.h
+enc/trans/cesu_8.$(OBJEXT): internal/value.h
+enc/trans/cesu_8.$(OBJEXT): internal/value_type.h
+enc/trans/cesu_8.$(OBJEXT): internal/variable.h
+enc/trans/cesu_8.$(OBJEXT): internal/warning_push.h
+enc/trans/cesu_8.$(OBJEXT): internal/xmalloc.h
enc/trans/cesu_8.$(OBJEXT): missing.h
enc/trans/cesu_8.$(OBJEXT): st.h
enc/trans/cesu_8.$(OBJEXT): subst.h
@@ -408,10 +5379,158 @@ enc/trans/chinese.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/chinese.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/chinese.$(OBJEXT): assert.h
enc/trans/chinese.$(OBJEXT): backward.h
+enc/trans/chinese.$(OBJEXT): backward/2/assume.h
+enc/trans/chinese.$(OBJEXT): backward/2/attributes.h
+enc/trans/chinese.$(OBJEXT): backward/2/bool.h
+enc/trans/chinese.$(OBJEXT): backward/2/inttypes.h
+enc/trans/chinese.$(OBJEXT): backward/2/limits.h
+enc/trans/chinese.$(OBJEXT): backward/2/long_long.h
+enc/trans/chinese.$(OBJEXT): backward/2/stdalign.h
+enc/trans/chinese.$(OBJEXT): backward/2/stdarg.h
enc/trans/chinese.$(OBJEXT): config.h
enc/trans/chinese.$(OBJEXT): defines.h
enc/trans/chinese.$(OBJEXT): enc/trans/chinese.c
enc/trans/chinese.$(OBJEXT): intern.h
+enc/trans/chinese.$(OBJEXT): internal/abi.h
+enc/trans/chinese.$(OBJEXT): internal/anyargs.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/chinese.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/chinese.$(OBJEXT): internal/assume.h
+enc/trans/chinese.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/chinese.$(OBJEXT): internal/attr/artificial.h
+enc/trans/chinese.$(OBJEXT): internal/attr/cold.h
+enc/trans/chinese.$(OBJEXT): internal/attr/const.h
+enc/trans/chinese.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/chinese.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/chinese.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/chinese.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/chinese.$(OBJEXT): internal/attr/error.h
+enc/trans/chinese.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/chinese.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/chinese.$(OBJEXT): internal/attr/format.h
+enc/trans/chinese.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/chinese.$(OBJEXT): internal/attr/noalias.h
+enc/trans/chinese.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/chinese.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/chinese.$(OBJEXT): internal/attr/noinline.h
+enc/trans/chinese.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/chinese.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/chinese.$(OBJEXT): internal/attr/pure.h
+enc/trans/chinese.$(OBJEXT): internal/attr/restrict.h
+enc/trans/chinese.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/chinese.$(OBJEXT): internal/attr/warning.h
+enc/trans/chinese.$(OBJEXT): internal/attr/weakref.h
+enc/trans/chinese.$(OBJEXT): internal/cast.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/chinese.$(OBJEXT): internal/compiler_since.h
+enc/trans/chinese.$(OBJEXT): internal/config.h
+enc/trans/chinese.$(OBJEXT): internal/constant_p.h
+enc/trans/chinese.$(OBJEXT): internal/core.h
+enc/trans/chinese.$(OBJEXT): internal/core/rarray.h
+enc/trans/chinese.$(OBJEXT): internal/core/rbasic.h
+enc/trans/chinese.$(OBJEXT): internal/core/rbignum.h
+enc/trans/chinese.$(OBJEXT): internal/core/rclass.h
+enc/trans/chinese.$(OBJEXT): internal/core/rdata.h
+enc/trans/chinese.$(OBJEXT): internal/core/rfile.h
+enc/trans/chinese.$(OBJEXT): internal/core/rhash.h
+enc/trans/chinese.$(OBJEXT): internal/core/robject.h
+enc/trans/chinese.$(OBJEXT): internal/core/rregexp.h
+enc/trans/chinese.$(OBJEXT): internal/core/rstring.h
+enc/trans/chinese.$(OBJEXT): internal/core/rstruct.h
+enc/trans/chinese.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/chinese.$(OBJEXT): internal/ctype.h
+enc/trans/chinese.$(OBJEXT): internal/dllexport.h
+enc/trans/chinese.$(OBJEXT): internal/dosish.h
+enc/trans/chinese.$(OBJEXT): internal/error.h
+enc/trans/chinese.$(OBJEXT): internal/eval.h
+enc/trans/chinese.$(OBJEXT): internal/event.h
+enc/trans/chinese.$(OBJEXT): internal/fl_type.h
+enc/trans/chinese.$(OBJEXT): internal/gc.h
+enc/trans/chinese.$(OBJEXT): internal/glob.h
+enc/trans/chinese.$(OBJEXT): internal/globals.h
+enc/trans/chinese.$(OBJEXT): internal/has/attribute.h
+enc/trans/chinese.$(OBJEXT): internal/has/builtin.h
+enc/trans/chinese.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/chinese.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/chinese.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/chinese.$(OBJEXT): internal/has/extension.h
+enc/trans/chinese.$(OBJEXT): internal/has/feature.h
+enc/trans/chinese.$(OBJEXT): internal/has/warning.h
+enc/trans/chinese.$(OBJEXT): internal/intern/array.h
+enc/trans/chinese.$(OBJEXT): internal/intern/bignum.h
+enc/trans/chinese.$(OBJEXT): internal/intern/class.h
+enc/trans/chinese.$(OBJEXT): internal/intern/compar.h
+enc/trans/chinese.$(OBJEXT): internal/intern/complex.h
+enc/trans/chinese.$(OBJEXT): internal/intern/cont.h
+enc/trans/chinese.$(OBJEXT): internal/intern/dir.h
+enc/trans/chinese.$(OBJEXT): internal/intern/enum.h
+enc/trans/chinese.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/chinese.$(OBJEXT): internal/intern/error.h
+enc/trans/chinese.$(OBJEXT): internal/intern/eval.h
+enc/trans/chinese.$(OBJEXT): internal/intern/file.h
+enc/trans/chinese.$(OBJEXT): internal/intern/gc.h
+enc/trans/chinese.$(OBJEXT): internal/intern/hash.h
+enc/trans/chinese.$(OBJEXT): internal/intern/io.h
+enc/trans/chinese.$(OBJEXT): internal/intern/load.h
+enc/trans/chinese.$(OBJEXT): internal/intern/marshal.h
+enc/trans/chinese.$(OBJEXT): internal/intern/numeric.h
+enc/trans/chinese.$(OBJEXT): internal/intern/object.h
+enc/trans/chinese.$(OBJEXT): internal/intern/parse.h
+enc/trans/chinese.$(OBJEXT): internal/intern/proc.h
+enc/trans/chinese.$(OBJEXT): internal/intern/process.h
+enc/trans/chinese.$(OBJEXT): internal/intern/random.h
+enc/trans/chinese.$(OBJEXT): internal/intern/range.h
+enc/trans/chinese.$(OBJEXT): internal/intern/rational.h
+enc/trans/chinese.$(OBJEXT): internal/intern/re.h
+enc/trans/chinese.$(OBJEXT): internal/intern/ruby.h
+enc/trans/chinese.$(OBJEXT): internal/intern/select.h
+enc/trans/chinese.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/chinese.$(OBJEXT): internal/intern/signal.h
+enc/trans/chinese.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/chinese.$(OBJEXT): internal/intern/string.h
+enc/trans/chinese.$(OBJEXT): internal/intern/struct.h
+enc/trans/chinese.$(OBJEXT): internal/intern/thread.h
+enc/trans/chinese.$(OBJEXT): internal/intern/time.h
+enc/trans/chinese.$(OBJEXT): internal/intern/variable.h
+enc/trans/chinese.$(OBJEXT): internal/intern/vm.h
+enc/trans/chinese.$(OBJEXT): internal/interpreter.h
+enc/trans/chinese.$(OBJEXT): internal/iterator.h
+enc/trans/chinese.$(OBJEXT): internal/memory.h
+enc/trans/chinese.$(OBJEXT): internal/method.h
+enc/trans/chinese.$(OBJEXT): internal/module.h
+enc/trans/chinese.$(OBJEXT): internal/newobj.h
+enc/trans/chinese.$(OBJEXT): internal/rgengc.h
+enc/trans/chinese.$(OBJEXT): internal/scan_args.h
+enc/trans/chinese.$(OBJEXT): internal/special_consts.h
+enc/trans/chinese.$(OBJEXT): internal/static_assert.h
+enc/trans/chinese.$(OBJEXT): internal/stdalign.h
+enc/trans/chinese.$(OBJEXT): internal/stdbool.h
+enc/trans/chinese.$(OBJEXT): internal/symbol.h
+enc/trans/chinese.$(OBJEXT): internal/value.h
+enc/trans/chinese.$(OBJEXT): internal/value_type.h
+enc/trans/chinese.$(OBJEXT): internal/variable.h
+enc/trans/chinese.$(OBJEXT): internal/warning_push.h
+enc/trans/chinese.$(OBJEXT): internal/xmalloc.h
enc/trans/chinese.$(OBJEXT): missing.h
enc/trans/chinese.$(OBJEXT): st.h
enc/trans/chinese.$(OBJEXT): subst.h
@@ -419,10 +5538,158 @@ enc/trans/ebcdic.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/ebcdic.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/ebcdic.$(OBJEXT): assert.h
enc/trans/ebcdic.$(OBJEXT): backward.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/assume.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/attributes.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/bool.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/inttypes.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/limits.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/long_long.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/stdalign.h
+enc/trans/ebcdic.$(OBJEXT): backward/2/stdarg.h
enc/trans/ebcdic.$(OBJEXT): config.h
enc/trans/ebcdic.$(OBJEXT): defines.h
enc/trans/ebcdic.$(OBJEXT): enc/trans/ebcdic.c
enc/trans/ebcdic.$(OBJEXT): intern.h
+enc/trans/ebcdic.$(OBJEXT): internal/abi.h
+enc/trans/ebcdic.$(OBJEXT): internal/anyargs.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/ebcdic.$(OBJEXT): internal/assume.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/artificial.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/cold.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/const.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/error.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/format.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/noalias.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/noinline.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/pure.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/restrict.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/warning.h
+enc/trans/ebcdic.$(OBJEXT): internal/attr/weakref.h
+enc/trans/ebcdic.$(OBJEXT): internal/cast.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/ebcdic.$(OBJEXT): internal/compiler_since.h
+enc/trans/ebcdic.$(OBJEXT): internal/config.h
+enc/trans/ebcdic.$(OBJEXT): internal/constant_p.h
+enc/trans/ebcdic.$(OBJEXT): internal/core.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rarray.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rbasic.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rbignum.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rclass.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rdata.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rfile.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rhash.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/robject.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rregexp.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rstring.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rstruct.h
+enc/trans/ebcdic.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/ebcdic.$(OBJEXT): internal/ctype.h
+enc/trans/ebcdic.$(OBJEXT): internal/dllexport.h
+enc/trans/ebcdic.$(OBJEXT): internal/dosish.h
+enc/trans/ebcdic.$(OBJEXT): internal/error.h
+enc/trans/ebcdic.$(OBJEXT): internal/eval.h
+enc/trans/ebcdic.$(OBJEXT): internal/event.h
+enc/trans/ebcdic.$(OBJEXT): internal/fl_type.h
+enc/trans/ebcdic.$(OBJEXT): internal/gc.h
+enc/trans/ebcdic.$(OBJEXT): internal/glob.h
+enc/trans/ebcdic.$(OBJEXT): internal/globals.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/attribute.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/builtin.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/extension.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/feature.h
+enc/trans/ebcdic.$(OBJEXT): internal/has/warning.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/array.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/bignum.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/class.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/compar.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/complex.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/cont.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/dir.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/enum.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/error.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/eval.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/file.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/gc.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/hash.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/io.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/load.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/marshal.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/numeric.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/object.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/parse.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/proc.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/process.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/random.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/range.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/rational.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/re.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/ruby.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/select.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/signal.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/string.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/struct.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/thread.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/time.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/variable.h
+enc/trans/ebcdic.$(OBJEXT): internal/intern/vm.h
+enc/trans/ebcdic.$(OBJEXT): internal/interpreter.h
+enc/trans/ebcdic.$(OBJEXT): internal/iterator.h
+enc/trans/ebcdic.$(OBJEXT): internal/memory.h
+enc/trans/ebcdic.$(OBJEXT): internal/method.h
+enc/trans/ebcdic.$(OBJEXT): internal/module.h
+enc/trans/ebcdic.$(OBJEXT): internal/newobj.h
+enc/trans/ebcdic.$(OBJEXT): internal/rgengc.h
+enc/trans/ebcdic.$(OBJEXT): internal/scan_args.h
+enc/trans/ebcdic.$(OBJEXT): internal/special_consts.h
+enc/trans/ebcdic.$(OBJEXT): internal/static_assert.h
+enc/trans/ebcdic.$(OBJEXT): internal/stdalign.h
+enc/trans/ebcdic.$(OBJEXT): internal/stdbool.h
+enc/trans/ebcdic.$(OBJEXT): internal/symbol.h
+enc/trans/ebcdic.$(OBJEXT): internal/value.h
+enc/trans/ebcdic.$(OBJEXT): internal/value_type.h
+enc/trans/ebcdic.$(OBJEXT): internal/variable.h
+enc/trans/ebcdic.$(OBJEXT): internal/warning_push.h
+enc/trans/ebcdic.$(OBJEXT): internal/xmalloc.h
enc/trans/ebcdic.$(OBJEXT): missing.h
enc/trans/ebcdic.$(OBJEXT): st.h
enc/trans/ebcdic.$(OBJEXT): subst.h
@@ -430,10 +5697,158 @@ enc/trans/emoji.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/emoji.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/emoji.$(OBJEXT): assert.h
enc/trans/emoji.$(OBJEXT): backward.h
+enc/trans/emoji.$(OBJEXT): backward/2/assume.h
+enc/trans/emoji.$(OBJEXT): backward/2/attributes.h
+enc/trans/emoji.$(OBJEXT): backward/2/bool.h
+enc/trans/emoji.$(OBJEXT): backward/2/inttypes.h
+enc/trans/emoji.$(OBJEXT): backward/2/limits.h
+enc/trans/emoji.$(OBJEXT): backward/2/long_long.h
+enc/trans/emoji.$(OBJEXT): backward/2/stdalign.h
+enc/trans/emoji.$(OBJEXT): backward/2/stdarg.h
enc/trans/emoji.$(OBJEXT): config.h
enc/trans/emoji.$(OBJEXT): defines.h
enc/trans/emoji.$(OBJEXT): enc/trans/emoji.c
enc/trans/emoji.$(OBJEXT): intern.h
+enc/trans/emoji.$(OBJEXT): internal/abi.h
+enc/trans/emoji.$(OBJEXT): internal/anyargs.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/emoji.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/emoji.$(OBJEXT): internal/assume.h
+enc/trans/emoji.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/emoji.$(OBJEXT): internal/attr/artificial.h
+enc/trans/emoji.$(OBJEXT): internal/attr/cold.h
+enc/trans/emoji.$(OBJEXT): internal/attr/const.h
+enc/trans/emoji.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/emoji.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/emoji.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/emoji.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/emoji.$(OBJEXT): internal/attr/error.h
+enc/trans/emoji.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/emoji.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/emoji.$(OBJEXT): internal/attr/format.h
+enc/trans/emoji.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/emoji.$(OBJEXT): internal/attr/noalias.h
+enc/trans/emoji.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/emoji.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/emoji.$(OBJEXT): internal/attr/noinline.h
+enc/trans/emoji.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/emoji.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/emoji.$(OBJEXT): internal/attr/pure.h
+enc/trans/emoji.$(OBJEXT): internal/attr/restrict.h
+enc/trans/emoji.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/emoji.$(OBJEXT): internal/attr/warning.h
+enc/trans/emoji.$(OBJEXT): internal/attr/weakref.h
+enc/trans/emoji.$(OBJEXT): internal/cast.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/emoji.$(OBJEXT): internal/compiler_since.h
+enc/trans/emoji.$(OBJEXT): internal/config.h
+enc/trans/emoji.$(OBJEXT): internal/constant_p.h
+enc/trans/emoji.$(OBJEXT): internal/core.h
+enc/trans/emoji.$(OBJEXT): internal/core/rarray.h
+enc/trans/emoji.$(OBJEXT): internal/core/rbasic.h
+enc/trans/emoji.$(OBJEXT): internal/core/rbignum.h
+enc/trans/emoji.$(OBJEXT): internal/core/rclass.h
+enc/trans/emoji.$(OBJEXT): internal/core/rdata.h
+enc/trans/emoji.$(OBJEXT): internal/core/rfile.h
+enc/trans/emoji.$(OBJEXT): internal/core/rhash.h
+enc/trans/emoji.$(OBJEXT): internal/core/robject.h
+enc/trans/emoji.$(OBJEXT): internal/core/rregexp.h
+enc/trans/emoji.$(OBJEXT): internal/core/rstring.h
+enc/trans/emoji.$(OBJEXT): internal/core/rstruct.h
+enc/trans/emoji.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/emoji.$(OBJEXT): internal/ctype.h
+enc/trans/emoji.$(OBJEXT): internal/dllexport.h
+enc/trans/emoji.$(OBJEXT): internal/dosish.h
+enc/trans/emoji.$(OBJEXT): internal/error.h
+enc/trans/emoji.$(OBJEXT): internal/eval.h
+enc/trans/emoji.$(OBJEXT): internal/event.h
+enc/trans/emoji.$(OBJEXT): internal/fl_type.h
+enc/trans/emoji.$(OBJEXT): internal/gc.h
+enc/trans/emoji.$(OBJEXT): internal/glob.h
+enc/trans/emoji.$(OBJEXT): internal/globals.h
+enc/trans/emoji.$(OBJEXT): internal/has/attribute.h
+enc/trans/emoji.$(OBJEXT): internal/has/builtin.h
+enc/trans/emoji.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/emoji.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/emoji.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/emoji.$(OBJEXT): internal/has/extension.h
+enc/trans/emoji.$(OBJEXT): internal/has/feature.h
+enc/trans/emoji.$(OBJEXT): internal/has/warning.h
+enc/trans/emoji.$(OBJEXT): internal/intern/array.h
+enc/trans/emoji.$(OBJEXT): internal/intern/bignum.h
+enc/trans/emoji.$(OBJEXT): internal/intern/class.h
+enc/trans/emoji.$(OBJEXT): internal/intern/compar.h
+enc/trans/emoji.$(OBJEXT): internal/intern/complex.h
+enc/trans/emoji.$(OBJEXT): internal/intern/cont.h
+enc/trans/emoji.$(OBJEXT): internal/intern/dir.h
+enc/trans/emoji.$(OBJEXT): internal/intern/enum.h
+enc/trans/emoji.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/emoji.$(OBJEXT): internal/intern/error.h
+enc/trans/emoji.$(OBJEXT): internal/intern/eval.h
+enc/trans/emoji.$(OBJEXT): internal/intern/file.h
+enc/trans/emoji.$(OBJEXT): internal/intern/gc.h
+enc/trans/emoji.$(OBJEXT): internal/intern/hash.h
+enc/trans/emoji.$(OBJEXT): internal/intern/io.h
+enc/trans/emoji.$(OBJEXT): internal/intern/load.h
+enc/trans/emoji.$(OBJEXT): internal/intern/marshal.h
+enc/trans/emoji.$(OBJEXT): internal/intern/numeric.h
+enc/trans/emoji.$(OBJEXT): internal/intern/object.h
+enc/trans/emoji.$(OBJEXT): internal/intern/parse.h
+enc/trans/emoji.$(OBJEXT): internal/intern/proc.h
+enc/trans/emoji.$(OBJEXT): internal/intern/process.h
+enc/trans/emoji.$(OBJEXT): internal/intern/random.h
+enc/trans/emoji.$(OBJEXT): internal/intern/range.h
+enc/trans/emoji.$(OBJEXT): internal/intern/rational.h
+enc/trans/emoji.$(OBJEXT): internal/intern/re.h
+enc/trans/emoji.$(OBJEXT): internal/intern/ruby.h
+enc/trans/emoji.$(OBJEXT): internal/intern/select.h
+enc/trans/emoji.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/emoji.$(OBJEXT): internal/intern/signal.h
+enc/trans/emoji.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/emoji.$(OBJEXT): internal/intern/string.h
+enc/trans/emoji.$(OBJEXT): internal/intern/struct.h
+enc/trans/emoji.$(OBJEXT): internal/intern/thread.h
+enc/trans/emoji.$(OBJEXT): internal/intern/time.h
+enc/trans/emoji.$(OBJEXT): internal/intern/variable.h
+enc/trans/emoji.$(OBJEXT): internal/intern/vm.h
+enc/trans/emoji.$(OBJEXT): internal/interpreter.h
+enc/trans/emoji.$(OBJEXT): internal/iterator.h
+enc/trans/emoji.$(OBJEXT): internal/memory.h
+enc/trans/emoji.$(OBJEXT): internal/method.h
+enc/trans/emoji.$(OBJEXT): internal/module.h
+enc/trans/emoji.$(OBJEXT): internal/newobj.h
+enc/trans/emoji.$(OBJEXT): internal/rgengc.h
+enc/trans/emoji.$(OBJEXT): internal/scan_args.h
+enc/trans/emoji.$(OBJEXT): internal/special_consts.h
+enc/trans/emoji.$(OBJEXT): internal/static_assert.h
+enc/trans/emoji.$(OBJEXT): internal/stdalign.h
+enc/trans/emoji.$(OBJEXT): internal/stdbool.h
+enc/trans/emoji.$(OBJEXT): internal/symbol.h
+enc/trans/emoji.$(OBJEXT): internal/value.h
+enc/trans/emoji.$(OBJEXT): internal/value_type.h
+enc/trans/emoji.$(OBJEXT): internal/variable.h
+enc/trans/emoji.$(OBJEXT): internal/warning_push.h
+enc/trans/emoji.$(OBJEXT): internal/xmalloc.h
enc/trans/emoji.$(OBJEXT): missing.h
enc/trans/emoji.$(OBJEXT): st.h
enc/trans/emoji.$(OBJEXT): subst.h
@@ -441,10 +5856,158 @@ enc/trans/emoji_iso2022_kddi.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): assert.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/assume.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/attributes.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/bool.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/inttypes.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/limits.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/long_long.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/stdalign.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/stdarg.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): config.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): defines.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): enc/trans/emoji_iso2022_kddi.c
enc/trans/emoji_iso2022_kddi.$(OBJEXT): intern.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/abi.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/anyargs.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/assume.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/artificial.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/cold.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/const.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/error.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/format.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/noalias.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/noinline.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/pure.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/restrict.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/warning.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/attr/weakref.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/cast.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/compiler_since.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/config.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/constant_p.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rarray.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rbasic.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rbignum.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rclass.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rdata.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rfile.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rhash.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/robject.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rregexp.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rstring.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rstruct.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/ctype.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/dllexport.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/dosish.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/error.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/eval.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/event.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/fl_type.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/gc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/glob.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/globals.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/attribute.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/builtin.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/extension.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/feature.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/has/warning.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/array.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/bignum.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/class.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/compar.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/complex.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/cont.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/dir.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/enum.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/error.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/eval.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/file.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/gc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/hash.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/io.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/load.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/marshal.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/numeric.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/object.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/parse.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/proc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/process.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/random.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/range.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/rational.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/re.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/ruby.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/select.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/signal.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/string.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/struct.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/thread.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/time.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/variable.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/intern/vm.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/interpreter.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/iterator.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/memory.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/method.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/module.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/newobj.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/rgengc.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/scan_args.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/special_consts.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/static_assert.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/stdalign.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/stdbool.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/symbol.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/value.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/value_type.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/variable.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/warning_push.h
+enc/trans/emoji_iso2022_kddi.$(OBJEXT): internal/xmalloc.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): missing.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): st.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): subst.h
@@ -452,10 +6015,158 @@ enc/trans/emoji_sjis_docomo.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): assert.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/assume.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/attributes.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/bool.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/inttypes.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/limits.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/long_long.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/stdalign.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/stdarg.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): config.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): defines.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): enc/trans/emoji_sjis_docomo.c
enc/trans/emoji_sjis_docomo.$(OBJEXT): intern.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/abi.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/anyargs.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/assume.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/artificial.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/cold.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/const.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/error.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/format.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/noalias.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/noinline.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/pure.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/restrict.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/warning.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/attr/weakref.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/cast.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/compiler_since.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/config.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/constant_p.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rarray.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rbasic.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rbignum.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rclass.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rdata.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rfile.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rhash.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/robject.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rregexp.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rstring.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rstruct.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/ctype.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/dllexport.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/dosish.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/error.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/eval.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/event.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/fl_type.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/gc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/glob.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/globals.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/attribute.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/builtin.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/extension.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/feature.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/has/warning.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/array.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/bignum.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/class.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/compar.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/complex.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/cont.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/dir.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/enum.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/error.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/eval.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/file.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/gc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/hash.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/io.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/load.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/marshal.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/numeric.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/object.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/parse.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/proc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/process.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/random.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/range.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/rational.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/re.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/ruby.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/select.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/signal.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/string.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/struct.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/thread.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/time.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/variable.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/intern/vm.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/interpreter.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/iterator.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/memory.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/method.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/module.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/newobj.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/rgengc.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/scan_args.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/special_consts.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/static_assert.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/stdalign.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/stdbool.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/symbol.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/value.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/value_type.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/variable.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/warning_push.h
+enc/trans/emoji_sjis_docomo.$(OBJEXT): internal/xmalloc.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): missing.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): st.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): subst.h
@@ -463,10 +6174,158 @@ enc/trans/emoji_sjis_kddi.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): assert.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/assume.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/attributes.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/bool.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/inttypes.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/limits.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/long_long.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/stdalign.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/stdarg.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): config.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): defines.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): enc/trans/emoji_sjis_kddi.c
enc/trans/emoji_sjis_kddi.$(OBJEXT): intern.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/abi.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/anyargs.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/assume.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/artificial.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/cold.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/const.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/error.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/format.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/noalias.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/noinline.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/pure.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/restrict.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/warning.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/attr/weakref.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/cast.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/compiler_since.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/config.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/constant_p.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rarray.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rbasic.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rbignum.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rclass.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rdata.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rfile.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rhash.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/robject.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rregexp.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rstring.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rstruct.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/ctype.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/dllexport.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/dosish.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/error.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/eval.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/event.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/fl_type.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/gc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/glob.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/globals.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/attribute.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/builtin.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/extension.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/feature.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/has/warning.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/array.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/bignum.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/class.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/compar.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/complex.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/cont.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/dir.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/enum.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/error.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/eval.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/file.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/gc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/hash.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/io.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/load.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/marshal.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/numeric.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/object.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/parse.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/proc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/process.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/random.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/range.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/rational.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/re.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/ruby.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/select.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/signal.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/string.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/struct.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/thread.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/time.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/variable.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/intern/vm.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/interpreter.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/iterator.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/memory.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/method.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/module.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/newobj.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/rgengc.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/scan_args.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/special_consts.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/static_assert.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/stdalign.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/stdbool.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/symbol.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/value.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/value_type.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/variable.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/warning_push.h
+enc/trans/emoji_sjis_kddi.$(OBJEXT): internal/xmalloc.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): missing.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): st.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): subst.h
@@ -474,10 +6333,158 @@ enc/trans/emoji_sjis_softbank.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): assert.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/assume.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/attributes.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/bool.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/inttypes.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/limits.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/long_long.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/stdalign.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/stdarg.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): config.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): defines.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): enc/trans/emoji_sjis_softbank.c
enc/trans/emoji_sjis_softbank.$(OBJEXT): intern.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/abi.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/anyargs.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/assume.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/artificial.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/cold.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/const.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/error.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/format.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/noalias.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/noinline.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/pure.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/restrict.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/warning.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/attr/weakref.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/cast.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/compiler_since.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/config.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/constant_p.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rarray.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rbasic.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rbignum.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rclass.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rdata.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rfile.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rhash.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/robject.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rregexp.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rstring.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rstruct.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/ctype.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/dllexport.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/dosish.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/error.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/eval.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/event.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/fl_type.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/gc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/glob.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/globals.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/attribute.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/builtin.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/extension.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/feature.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/has/warning.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/array.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/bignum.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/class.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/compar.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/complex.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/cont.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/dir.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/enum.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/error.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/eval.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/file.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/gc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/hash.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/io.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/load.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/marshal.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/numeric.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/object.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/parse.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/proc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/process.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/random.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/range.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/rational.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/re.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/ruby.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/select.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/signal.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/string.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/struct.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/thread.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/time.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/variable.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/intern/vm.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/interpreter.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/iterator.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/memory.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/method.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/module.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/newobj.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/rgengc.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/scan_args.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/special_consts.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/static_assert.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/stdalign.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/stdbool.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/symbol.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/value.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/value_type.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/variable.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/warning_push.h
+enc/trans/emoji_sjis_softbank.$(OBJEXT): internal/xmalloc.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): missing.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): st.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): subst.h
@@ -485,10 +6492,158 @@ enc/trans/escape.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/escape.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/escape.$(OBJEXT): assert.h
enc/trans/escape.$(OBJEXT): backward.h
+enc/trans/escape.$(OBJEXT): backward/2/assume.h
+enc/trans/escape.$(OBJEXT): backward/2/attributes.h
+enc/trans/escape.$(OBJEXT): backward/2/bool.h
+enc/trans/escape.$(OBJEXT): backward/2/inttypes.h
+enc/trans/escape.$(OBJEXT): backward/2/limits.h
+enc/trans/escape.$(OBJEXT): backward/2/long_long.h
+enc/trans/escape.$(OBJEXT): backward/2/stdalign.h
+enc/trans/escape.$(OBJEXT): backward/2/stdarg.h
enc/trans/escape.$(OBJEXT): config.h
enc/trans/escape.$(OBJEXT): defines.h
enc/trans/escape.$(OBJEXT): enc/trans/escape.c
enc/trans/escape.$(OBJEXT): intern.h
+enc/trans/escape.$(OBJEXT): internal/abi.h
+enc/trans/escape.$(OBJEXT): internal/anyargs.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/escape.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/escape.$(OBJEXT): internal/assume.h
+enc/trans/escape.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/escape.$(OBJEXT): internal/attr/artificial.h
+enc/trans/escape.$(OBJEXT): internal/attr/cold.h
+enc/trans/escape.$(OBJEXT): internal/attr/const.h
+enc/trans/escape.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/escape.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/escape.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/escape.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/escape.$(OBJEXT): internal/attr/error.h
+enc/trans/escape.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/escape.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/escape.$(OBJEXT): internal/attr/format.h
+enc/trans/escape.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/escape.$(OBJEXT): internal/attr/noalias.h
+enc/trans/escape.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/escape.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/escape.$(OBJEXT): internal/attr/noinline.h
+enc/trans/escape.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/escape.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/escape.$(OBJEXT): internal/attr/pure.h
+enc/trans/escape.$(OBJEXT): internal/attr/restrict.h
+enc/trans/escape.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/escape.$(OBJEXT): internal/attr/warning.h
+enc/trans/escape.$(OBJEXT): internal/attr/weakref.h
+enc/trans/escape.$(OBJEXT): internal/cast.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/escape.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/escape.$(OBJEXT): internal/compiler_since.h
+enc/trans/escape.$(OBJEXT): internal/config.h
+enc/trans/escape.$(OBJEXT): internal/constant_p.h
+enc/trans/escape.$(OBJEXT): internal/core.h
+enc/trans/escape.$(OBJEXT): internal/core/rarray.h
+enc/trans/escape.$(OBJEXT): internal/core/rbasic.h
+enc/trans/escape.$(OBJEXT): internal/core/rbignum.h
+enc/trans/escape.$(OBJEXT): internal/core/rclass.h
+enc/trans/escape.$(OBJEXT): internal/core/rdata.h
+enc/trans/escape.$(OBJEXT): internal/core/rfile.h
+enc/trans/escape.$(OBJEXT): internal/core/rhash.h
+enc/trans/escape.$(OBJEXT): internal/core/robject.h
+enc/trans/escape.$(OBJEXT): internal/core/rregexp.h
+enc/trans/escape.$(OBJEXT): internal/core/rstring.h
+enc/trans/escape.$(OBJEXT): internal/core/rstruct.h
+enc/trans/escape.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/escape.$(OBJEXT): internal/ctype.h
+enc/trans/escape.$(OBJEXT): internal/dllexport.h
+enc/trans/escape.$(OBJEXT): internal/dosish.h
+enc/trans/escape.$(OBJEXT): internal/error.h
+enc/trans/escape.$(OBJEXT): internal/eval.h
+enc/trans/escape.$(OBJEXT): internal/event.h
+enc/trans/escape.$(OBJEXT): internal/fl_type.h
+enc/trans/escape.$(OBJEXT): internal/gc.h
+enc/trans/escape.$(OBJEXT): internal/glob.h
+enc/trans/escape.$(OBJEXT): internal/globals.h
+enc/trans/escape.$(OBJEXT): internal/has/attribute.h
+enc/trans/escape.$(OBJEXT): internal/has/builtin.h
+enc/trans/escape.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/escape.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/escape.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/escape.$(OBJEXT): internal/has/extension.h
+enc/trans/escape.$(OBJEXT): internal/has/feature.h
+enc/trans/escape.$(OBJEXT): internal/has/warning.h
+enc/trans/escape.$(OBJEXT): internal/intern/array.h
+enc/trans/escape.$(OBJEXT): internal/intern/bignum.h
+enc/trans/escape.$(OBJEXT): internal/intern/class.h
+enc/trans/escape.$(OBJEXT): internal/intern/compar.h
+enc/trans/escape.$(OBJEXT): internal/intern/complex.h
+enc/trans/escape.$(OBJEXT): internal/intern/cont.h
+enc/trans/escape.$(OBJEXT): internal/intern/dir.h
+enc/trans/escape.$(OBJEXT): internal/intern/enum.h
+enc/trans/escape.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/escape.$(OBJEXT): internal/intern/error.h
+enc/trans/escape.$(OBJEXT): internal/intern/eval.h
+enc/trans/escape.$(OBJEXT): internal/intern/file.h
+enc/trans/escape.$(OBJEXT): internal/intern/gc.h
+enc/trans/escape.$(OBJEXT): internal/intern/hash.h
+enc/trans/escape.$(OBJEXT): internal/intern/io.h
+enc/trans/escape.$(OBJEXT): internal/intern/load.h
+enc/trans/escape.$(OBJEXT): internal/intern/marshal.h
+enc/trans/escape.$(OBJEXT): internal/intern/numeric.h
+enc/trans/escape.$(OBJEXT): internal/intern/object.h
+enc/trans/escape.$(OBJEXT): internal/intern/parse.h
+enc/trans/escape.$(OBJEXT): internal/intern/proc.h
+enc/trans/escape.$(OBJEXT): internal/intern/process.h
+enc/trans/escape.$(OBJEXT): internal/intern/random.h
+enc/trans/escape.$(OBJEXT): internal/intern/range.h
+enc/trans/escape.$(OBJEXT): internal/intern/rational.h
+enc/trans/escape.$(OBJEXT): internal/intern/re.h
+enc/trans/escape.$(OBJEXT): internal/intern/ruby.h
+enc/trans/escape.$(OBJEXT): internal/intern/select.h
+enc/trans/escape.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/escape.$(OBJEXT): internal/intern/signal.h
+enc/trans/escape.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/escape.$(OBJEXT): internal/intern/string.h
+enc/trans/escape.$(OBJEXT): internal/intern/struct.h
+enc/trans/escape.$(OBJEXT): internal/intern/thread.h
+enc/trans/escape.$(OBJEXT): internal/intern/time.h
+enc/trans/escape.$(OBJEXT): internal/intern/variable.h
+enc/trans/escape.$(OBJEXT): internal/intern/vm.h
+enc/trans/escape.$(OBJEXT): internal/interpreter.h
+enc/trans/escape.$(OBJEXT): internal/iterator.h
+enc/trans/escape.$(OBJEXT): internal/memory.h
+enc/trans/escape.$(OBJEXT): internal/method.h
+enc/trans/escape.$(OBJEXT): internal/module.h
+enc/trans/escape.$(OBJEXT): internal/newobj.h
+enc/trans/escape.$(OBJEXT): internal/rgengc.h
+enc/trans/escape.$(OBJEXT): internal/scan_args.h
+enc/trans/escape.$(OBJEXT): internal/special_consts.h
+enc/trans/escape.$(OBJEXT): internal/static_assert.h
+enc/trans/escape.$(OBJEXT): internal/stdalign.h
+enc/trans/escape.$(OBJEXT): internal/stdbool.h
+enc/trans/escape.$(OBJEXT): internal/symbol.h
+enc/trans/escape.$(OBJEXT): internal/value.h
+enc/trans/escape.$(OBJEXT): internal/value_type.h
+enc/trans/escape.$(OBJEXT): internal/variable.h
+enc/trans/escape.$(OBJEXT): internal/warning_push.h
+enc/trans/escape.$(OBJEXT): internal/xmalloc.h
enc/trans/escape.$(OBJEXT): missing.h
enc/trans/escape.$(OBJEXT): st.h
enc/trans/escape.$(OBJEXT): subst.h
@@ -496,10 +6651,158 @@ enc/trans/gb18030.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/gb18030.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/gb18030.$(OBJEXT): assert.h
enc/trans/gb18030.$(OBJEXT): backward.h
+enc/trans/gb18030.$(OBJEXT): backward/2/assume.h
+enc/trans/gb18030.$(OBJEXT): backward/2/attributes.h
+enc/trans/gb18030.$(OBJEXT): backward/2/bool.h
+enc/trans/gb18030.$(OBJEXT): backward/2/inttypes.h
+enc/trans/gb18030.$(OBJEXT): backward/2/limits.h
+enc/trans/gb18030.$(OBJEXT): backward/2/long_long.h
+enc/trans/gb18030.$(OBJEXT): backward/2/stdalign.h
+enc/trans/gb18030.$(OBJEXT): backward/2/stdarg.h
enc/trans/gb18030.$(OBJEXT): config.h
enc/trans/gb18030.$(OBJEXT): defines.h
enc/trans/gb18030.$(OBJEXT): enc/trans/gb18030.c
enc/trans/gb18030.$(OBJEXT): intern.h
+enc/trans/gb18030.$(OBJEXT): internal/abi.h
+enc/trans/gb18030.$(OBJEXT): internal/anyargs.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/gb18030.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/gb18030.$(OBJEXT): internal/assume.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/artificial.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/cold.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/const.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/error.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/format.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/noalias.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/noinline.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/pure.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/restrict.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/warning.h
+enc/trans/gb18030.$(OBJEXT): internal/attr/weakref.h
+enc/trans/gb18030.$(OBJEXT): internal/cast.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/gb18030.$(OBJEXT): internal/compiler_since.h
+enc/trans/gb18030.$(OBJEXT): internal/config.h
+enc/trans/gb18030.$(OBJEXT): internal/constant_p.h
+enc/trans/gb18030.$(OBJEXT): internal/core.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rarray.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rbasic.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rbignum.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rclass.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rdata.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rfile.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rhash.h
+enc/trans/gb18030.$(OBJEXT): internal/core/robject.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rregexp.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rstring.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rstruct.h
+enc/trans/gb18030.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/gb18030.$(OBJEXT): internal/ctype.h
+enc/trans/gb18030.$(OBJEXT): internal/dllexport.h
+enc/trans/gb18030.$(OBJEXT): internal/dosish.h
+enc/trans/gb18030.$(OBJEXT): internal/error.h
+enc/trans/gb18030.$(OBJEXT): internal/eval.h
+enc/trans/gb18030.$(OBJEXT): internal/event.h
+enc/trans/gb18030.$(OBJEXT): internal/fl_type.h
+enc/trans/gb18030.$(OBJEXT): internal/gc.h
+enc/trans/gb18030.$(OBJEXT): internal/glob.h
+enc/trans/gb18030.$(OBJEXT): internal/globals.h
+enc/trans/gb18030.$(OBJEXT): internal/has/attribute.h
+enc/trans/gb18030.$(OBJEXT): internal/has/builtin.h
+enc/trans/gb18030.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/gb18030.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/gb18030.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/gb18030.$(OBJEXT): internal/has/extension.h
+enc/trans/gb18030.$(OBJEXT): internal/has/feature.h
+enc/trans/gb18030.$(OBJEXT): internal/has/warning.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/array.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/bignum.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/class.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/compar.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/complex.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/cont.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/dir.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/enum.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/error.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/eval.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/file.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/gc.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/hash.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/io.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/load.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/marshal.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/numeric.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/object.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/parse.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/proc.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/process.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/random.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/range.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/rational.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/re.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/ruby.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/select.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/signal.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/string.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/struct.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/thread.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/time.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/variable.h
+enc/trans/gb18030.$(OBJEXT): internal/intern/vm.h
+enc/trans/gb18030.$(OBJEXT): internal/interpreter.h
+enc/trans/gb18030.$(OBJEXT): internal/iterator.h
+enc/trans/gb18030.$(OBJEXT): internal/memory.h
+enc/trans/gb18030.$(OBJEXT): internal/method.h
+enc/trans/gb18030.$(OBJEXT): internal/module.h
+enc/trans/gb18030.$(OBJEXT): internal/newobj.h
+enc/trans/gb18030.$(OBJEXT): internal/rgengc.h
+enc/trans/gb18030.$(OBJEXT): internal/scan_args.h
+enc/trans/gb18030.$(OBJEXT): internal/special_consts.h
+enc/trans/gb18030.$(OBJEXT): internal/static_assert.h
+enc/trans/gb18030.$(OBJEXT): internal/stdalign.h
+enc/trans/gb18030.$(OBJEXT): internal/stdbool.h
+enc/trans/gb18030.$(OBJEXT): internal/symbol.h
+enc/trans/gb18030.$(OBJEXT): internal/value.h
+enc/trans/gb18030.$(OBJEXT): internal/value_type.h
+enc/trans/gb18030.$(OBJEXT): internal/variable.h
+enc/trans/gb18030.$(OBJEXT): internal/warning_push.h
+enc/trans/gb18030.$(OBJEXT): internal/xmalloc.h
enc/trans/gb18030.$(OBJEXT): missing.h
enc/trans/gb18030.$(OBJEXT): st.h
enc/trans/gb18030.$(OBJEXT): subst.h
@@ -507,10 +6810,158 @@ enc/trans/gbk.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/gbk.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/gbk.$(OBJEXT): assert.h
enc/trans/gbk.$(OBJEXT): backward.h
+enc/trans/gbk.$(OBJEXT): backward/2/assume.h
+enc/trans/gbk.$(OBJEXT): backward/2/attributes.h
+enc/trans/gbk.$(OBJEXT): backward/2/bool.h
+enc/trans/gbk.$(OBJEXT): backward/2/inttypes.h
+enc/trans/gbk.$(OBJEXT): backward/2/limits.h
+enc/trans/gbk.$(OBJEXT): backward/2/long_long.h
+enc/trans/gbk.$(OBJEXT): backward/2/stdalign.h
+enc/trans/gbk.$(OBJEXT): backward/2/stdarg.h
enc/trans/gbk.$(OBJEXT): config.h
enc/trans/gbk.$(OBJEXT): defines.h
enc/trans/gbk.$(OBJEXT): enc/trans/gbk.c
enc/trans/gbk.$(OBJEXT): intern.h
+enc/trans/gbk.$(OBJEXT): internal/abi.h
+enc/trans/gbk.$(OBJEXT): internal/anyargs.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/gbk.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/gbk.$(OBJEXT): internal/assume.h
+enc/trans/gbk.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/gbk.$(OBJEXT): internal/attr/artificial.h
+enc/trans/gbk.$(OBJEXT): internal/attr/cold.h
+enc/trans/gbk.$(OBJEXT): internal/attr/const.h
+enc/trans/gbk.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/gbk.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/gbk.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/gbk.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/gbk.$(OBJEXT): internal/attr/error.h
+enc/trans/gbk.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/gbk.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/gbk.$(OBJEXT): internal/attr/format.h
+enc/trans/gbk.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/gbk.$(OBJEXT): internal/attr/noalias.h
+enc/trans/gbk.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/gbk.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/gbk.$(OBJEXT): internal/attr/noinline.h
+enc/trans/gbk.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/gbk.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/gbk.$(OBJEXT): internal/attr/pure.h
+enc/trans/gbk.$(OBJEXT): internal/attr/restrict.h
+enc/trans/gbk.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/gbk.$(OBJEXT): internal/attr/warning.h
+enc/trans/gbk.$(OBJEXT): internal/attr/weakref.h
+enc/trans/gbk.$(OBJEXT): internal/cast.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/gbk.$(OBJEXT): internal/compiler_since.h
+enc/trans/gbk.$(OBJEXT): internal/config.h
+enc/trans/gbk.$(OBJEXT): internal/constant_p.h
+enc/trans/gbk.$(OBJEXT): internal/core.h
+enc/trans/gbk.$(OBJEXT): internal/core/rarray.h
+enc/trans/gbk.$(OBJEXT): internal/core/rbasic.h
+enc/trans/gbk.$(OBJEXT): internal/core/rbignum.h
+enc/trans/gbk.$(OBJEXT): internal/core/rclass.h
+enc/trans/gbk.$(OBJEXT): internal/core/rdata.h
+enc/trans/gbk.$(OBJEXT): internal/core/rfile.h
+enc/trans/gbk.$(OBJEXT): internal/core/rhash.h
+enc/trans/gbk.$(OBJEXT): internal/core/robject.h
+enc/trans/gbk.$(OBJEXT): internal/core/rregexp.h
+enc/trans/gbk.$(OBJEXT): internal/core/rstring.h
+enc/trans/gbk.$(OBJEXT): internal/core/rstruct.h
+enc/trans/gbk.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/gbk.$(OBJEXT): internal/ctype.h
+enc/trans/gbk.$(OBJEXT): internal/dllexport.h
+enc/trans/gbk.$(OBJEXT): internal/dosish.h
+enc/trans/gbk.$(OBJEXT): internal/error.h
+enc/trans/gbk.$(OBJEXT): internal/eval.h
+enc/trans/gbk.$(OBJEXT): internal/event.h
+enc/trans/gbk.$(OBJEXT): internal/fl_type.h
+enc/trans/gbk.$(OBJEXT): internal/gc.h
+enc/trans/gbk.$(OBJEXT): internal/glob.h
+enc/trans/gbk.$(OBJEXT): internal/globals.h
+enc/trans/gbk.$(OBJEXT): internal/has/attribute.h
+enc/trans/gbk.$(OBJEXT): internal/has/builtin.h
+enc/trans/gbk.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/gbk.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/gbk.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/gbk.$(OBJEXT): internal/has/extension.h
+enc/trans/gbk.$(OBJEXT): internal/has/feature.h
+enc/trans/gbk.$(OBJEXT): internal/has/warning.h
+enc/trans/gbk.$(OBJEXT): internal/intern/array.h
+enc/trans/gbk.$(OBJEXT): internal/intern/bignum.h
+enc/trans/gbk.$(OBJEXT): internal/intern/class.h
+enc/trans/gbk.$(OBJEXT): internal/intern/compar.h
+enc/trans/gbk.$(OBJEXT): internal/intern/complex.h
+enc/trans/gbk.$(OBJEXT): internal/intern/cont.h
+enc/trans/gbk.$(OBJEXT): internal/intern/dir.h
+enc/trans/gbk.$(OBJEXT): internal/intern/enum.h
+enc/trans/gbk.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/gbk.$(OBJEXT): internal/intern/error.h
+enc/trans/gbk.$(OBJEXT): internal/intern/eval.h
+enc/trans/gbk.$(OBJEXT): internal/intern/file.h
+enc/trans/gbk.$(OBJEXT): internal/intern/gc.h
+enc/trans/gbk.$(OBJEXT): internal/intern/hash.h
+enc/trans/gbk.$(OBJEXT): internal/intern/io.h
+enc/trans/gbk.$(OBJEXT): internal/intern/load.h
+enc/trans/gbk.$(OBJEXT): internal/intern/marshal.h
+enc/trans/gbk.$(OBJEXT): internal/intern/numeric.h
+enc/trans/gbk.$(OBJEXT): internal/intern/object.h
+enc/trans/gbk.$(OBJEXT): internal/intern/parse.h
+enc/trans/gbk.$(OBJEXT): internal/intern/proc.h
+enc/trans/gbk.$(OBJEXT): internal/intern/process.h
+enc/trans/gbk.$(OBJEXT): internal/intern/random.h
+enc/trans/gbk.$(OBJEXT): internal/intern/range.h
+enc/trans/gbk.$(OBJEXT): internal/intern/rational.h
+enc/trans/gbk.$(OBJEXT): internal/intern/re.h
+enc/trans/gbk.$(OBJEXT): internal/intern/ruby.h
+enc/trans/gbk.$(OBJEXT): internal/intern/select.h
+enc/trans/gbk.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/gbk.$(OBJEXT): internal/intern/signal.h
+enc/trans/gbk.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/gbk.$(OBJEXT): internal/intern/string.h
+enc/trans/gbk.$(OBJEXT): internal/intern/struct.h
+enc/trans/gbk.$(OBJEXT): internal/intern/thread.h
+enc/trans/gbk.$(OBJEXT): internal/intern/time.h
+enc/trans/gbk.$(OBJEXT): internal/intern/variable.h
+enc/trans/gbk.$(OBJEXT): internal/intern/vm.h
+enc/trans/gbk.$(OBJEXT): internal/interpreter.h
+enc/trans/gbk.$(OBJEXT): internal/iterator.h
+enc/trans/gbk.$(OBJEXT): internal/memory.h
+enc/trans/gbk.$(OBJEXT): internal/method.h
+enc/trans/gbk.$(OBJEXT): internal/module.h
+enc/trans/gbk.$(OBJEXT): internal/newobj.h
+enc/trans/gbk.$(OBJEXT): internal/rgengc.h
+enc/trans/gbk.$(OBJEXT): internal/scan_args.h
+enc/trans/gbk.$(OBJEXT): internal/special_consts.h
+enc/trans/gbk.$(OBJEXT): internal/static_assert.h
+enc/trans/gbk.$(OBJEXT): internal/stdalign.h
+enc/trans/gbk.$(OBJEXT): internal/stdbool.h
+enc/trans/gbk.$(OBJEXT): internal/symbol.h
+enc/trans/gbk.$(OBJEXT): internal/value.h
+enc/trans/gbk.$(OBJEXT): internal/value_type.h
+enc/trans/gbk.$(OBJEXT): internal/variable.h
+enc/trans/gbk.$(OBJEXT): internal/warning_push.h
+enc/trans/gbk.$(OBJEXT): internal/xmalloc.h
enc/trans/gbk.$(OBJEXT): missing.h
enc/trans/gbk.$(OBJEXT): st.h
enc/trans/gbk.$(OBJEXT): subst.h
@@ -518,10 +6969,159 @@ enc/trans/iso2022.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/iso2022.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/iso2022.$(OBJEXT): assert.h
enc/trans/iso2022.$(OBJEXT): backward.h
+enc/trans/iso2022.$(OBJEXT): backward/2/assume.h
+enc/trans/iso2022.$(OBJEXT): backward/2/attributes.h
+enc/trans/iso2022.$(OBJEXT): backward/2/bool.h
+enc/trans/iso2022.$(OBJEXT): backward/2/inttypes.h
+enc/trans/iso2022.$(OBJEXT): backward/2/limits.h
+enc/trans/iso2022.$(OBJEXT): backward/2/long_long.h
+enc/trans/iso2022.$(OBJEXT): backward/2/stdalign.h
+enc/trans/iso2022.$(OBJEXT): backward/2/stdarg.h
enc/trans/iso2022.$(OBJEXT): config.h
enc/trans/iso2022.$(OBJEXT): defines.h
enc/trans/iso2022.$(OBJEXT): enc/trans/iso2022.c
enc/trans/iso2022.$(OBJEXT): intern.h
+enc/trans/iso2022.$(OBJEXT): internal/abi.h
+enc/trans/iso2022.$(OBJEXT): internal/anyargs.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/iso2022.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/iso2022.$(OBJEXT): internal/assume.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/artificial.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/cold.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/const.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/error.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/format.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/noalias.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/noinline.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/nonstring.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/pure.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/restrict.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/warning.h
+enc/trans/iso2022.$(OBJEXT): internal/attr/weakref.h
+enc/trans/iso2022.$(OBJEXT): internal/cast.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/iso2022.$(OBJEXT): internal/compiler_since.h
+enc/trans/iso2022.$(OBJEXT): internal/config.h
+enc/trans/iso2022.$(OBJEXT): internal/constant_p.h
+enc/trans/iso2022.$(OBJEXT): internal/core.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rarray.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rbasic.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rbignum.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rclass.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rdata.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rfile.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rhash.h
+enc/trans/iso2022.$(OBJEXT): internal/core/robject.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rregexp.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rstring.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rstruct.h
+enc/trans/iso2022.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/iso2022.$(OBJEXT): internal/ctype.h
+enc/trans/iso2022.$(OBJEXT): internal/dllexport.h
+enc/trans/iso2022.$(OBJEXT): internal/dosish.h
+enc/trans/iso2022.$(OBJEXT): internal/error.h
+enc/trans/iso2022.$(OBJEXT): internal/eval.h
+enc/trans/iso2022.$(OBJEXT): internal/event.h
+enc/trans/iso2022.$(OBJEXT): internal/fl_type.h
+enc/trans/iso2022.$(OBJEXT): internal/gc.h
+enc/trans/iso2022.$(OBJEXT): internal/glob.h
+enc/trans/iso2022.$(OBJEXT): internal/globals.h
+enc/trans/iso2022.$(OBJEXT): internal/has/attribute.h
+enc/trans/iso2022.$(OBJEXT): internal/has/builtin.h
+enc/trans/iso2022.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/iso2022.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/iso2022.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/iso2022.$(OBJEXT): internal/has/extension.h
+enc/trans/iso2022.$(OBJEXT): internal/has/feature.h
+enc/trans/iso2022.$(OBJEXT): internal/has/warning.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/array.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/bignum.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/class.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/compar.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/complex.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/cont.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/dir.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/enum.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/error.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/eval.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/file.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/gc.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/hash.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/io.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/load.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/marshal.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/numeric.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/object.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/parse.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/proc.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/process.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/random.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/range.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/rational.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/re.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/ruby.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/select.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/signal.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/string.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/struct.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/thread.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/time.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/variable.h
+enc/trans/iso2022.$(OBJEXT): internal/intern/vm.h
+enc/trans/iso2022.$(OBJEXT): internal/interpreter.h
+enc/trans/iso2022.$(OBJEXT): internal/iterator.h
+enc/trans/iso2022.$(OBJEXT): internal/memory.h
+enc/trans/iso2022.$(OBJEXT): internal/method.h
+enc/trans/iso2022.$(OBJEXT): internal/module.h
+enc/trans/iso2022.$(OBJEXT): internal/newobj.h
+enc/trans/iso2022.$(OBJEXT): internal/rgengc.h
+enc/trans/iso2022.$(OBJEXT): internal/scan_args.h
+enc/trans/iso2022.$(OBJEXT): internal/special_consts.h
+enc/trans/iso2022.$(OBJEXT): internal/static_assert.h
+enc/trans/iso2022.$(OBJEXT): internal/stdalign.h
+enc/trans/iso2022.$(OBJEXT): internal/stdbool.h
+enc/trans/iso2022.$(OBJEXT): internal/symbol.h
+enc/trans/iso2022.$(OBJEXT): internal/value.h
+enc/trans/iso2022.$(OBJEXT): internal/value_type.h
+enc/trans/iso2022.$(OBJEXT): internal/variable.h
+enc/trans/iso2022.$(OBJEXT): internal/warning_push.h
+enc/trans/iso2022.$(OBJEXT): internal/xmalloc.h
enc/trans/iso2022.$(OBJEXT): missing.h
enc/trans/iso2022.$(OBJEXT): st.h
enc/trans/iso2022.$(OBJEXT): subst.h
@@ -529,10 +7129,158 @@ enc/trans/japanese.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/japanese.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/japanese.$(OBJEXT): assert.h
enc/trans/japanese.$(OBJEXT): backward.h
+enc/trans/japanese.$(OBJEXT): backward/2/assume.h
+enc/trans/japanese.$(OBJEXT): backward/2/attributes.h
+enc/trans/japanese.$(OBJEXT): backward/2/bool.h
+enc/trans/japanese.$(OBJEXT): backward/2/inttypes.h
+enc/trans/japanese.$(OBJEXT): backward/2/limits.h
+enc/trans/japanese.$(OBJEXT): backward/2/long_long.h
+enc/trans/japanese.$(OBJEXT): backward/2/stdalign.h
+enc/trans/japanese.$(OBJEXT): backward/2/stdarg.h
enc/trans/japanese.$(OBJEXT): config.h
enc/trans/japanese.$(OBJEXT): defines.h
enc/trans/japanese.$(OBJEXT): enc/trans/japanese.c
enc/trans/japanese.$(OBJEXT): intern.h
+enc/trans/japanese.$(OBJEXT): internal/abi.h
+enc/trans/japanese.$(OBJEXT): internal/anyargs.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/japanese.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/japanese.$(OBJEXT): internal/assume.h
+enc/trans/japanese.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/japanese.$(OBJEXT): internal/attr/artificial.h
+enc/trans/japanese.$(OBJEXT): internal/attr/cold.h
+enc/trans/japanese.$(OBJEXT): internal/attr/const.h
+enc/trans/japanese.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/japanese.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/japanese.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/japanese.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/japanese.$(OBJEXT): internal/attr/error.h
+enc/trans/japanese.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/japanese.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/japanese.$(OBJEXT): internal/attr/format.h
+enc/trans/japanese.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/japanese.$(OBJEXT): internal/attr/noalias.h
+enc/trans/japanese.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/japanese.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/japanese.$(OBJEXT): internal/attr/noinline.h
+enc/trans/japanese.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/japanese.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/japanese.$(OBJEXT): internal/attr/pure.h
+enc/trans/japanese.$(OBJEXT): internal/attr/restrict.h
+enc/trans/japanese.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/japanese.$(OBJEXT): internal/attr/warning.h
+enc/trans/japanese.$(OBJEXT): internal/attr/weakref.h
+enc/trans/japanese.$(OBJEXT): internal/cast.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/japanese.$(OBJEXT): internal/compiler_since.h
+enc/trans/japanese.$(OBJEXT): internal/config.h
+enc/trans/japanese.$(OBJEXT): internal/constant_p.h
+enc/trans/japanese.$(OBJEXT): internal/core.h
+enc/trans/japanese.$(OBJEXT): internal/core/rarray.h
+enc/trans/japanese.$(OBJEXT): internal/core/rbasic.h
+enc/trans/japanese.$(OBJEXT): internal/core/rbignum.h
+enc/trans/japanese.$(OBJEXT): internal/core/rclass.h
+enc/trans/japanese.$(OBJEXT): internal/core/rdata.h
+enc/trans/japanese.$(OBJEXT): internal/core/rfile.h
+enc/trans/japanese.$(OBJEXT): internal/core/rhash.h
+enc/trans/japanese.$(OBJEXT): internal/core/robject.h
+enc/trans/japanese.$(OBJEXT): internal/core/rregexp.h
+enc/trans/japanese.$(OBJEXT): internal/core/rstring.h
+enc/trans/japanese.$(OBJEXT): internal/core/rstruct.h
+enc/trans/japanese.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/japanese.$(OBJEXT): internal/ctype.h
+enc/trans/japanese.$(OBJEXT): internal/dllexport.h
+enc/trans/japanese.$(OBJEXT): internal/dosish.h
+enc/trans/japanese.$(OBJEXT): internal/error.h
+enc/trans/japanese.$(OBJEXT): internal/eval.h
+enc/trans/japanese.$(OBJEXT): internal/event.h
+enc/trans/japanese.$(OBJEXT): internal/fl_type.h
+enc/trans/japanese.$(OBJEXT): internal/gc.h
+enc/trans/japanese.$(OBJEXT): internal/glob.h
+enc/trans/japanese.$(OBJEXT): internal/globals.h
+enc/trans/japanese.$(OBJEXT): internal/has/attribute.h
+enc/trans/japanese.$(OBJEXT): internal/has/builtin.h
+enc/trans/japanese.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/japanese.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/japanese.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/japanese.$(OBJEXT): internal/has/extension.h
+enc/trans/japanese.$(OBJEXT): internal/has/feature.h
+enc/trans/japanese.$(OBJEXT): internal/has/warning.h
+enc/trans/japanese.$(OBJEXT): internal/intern/array.h
+enc/trans/japanese.$(OBJEXT): internal/intern/bignum.h
+enc/trans/japanese.$(OBJEXT): internal/intern/class.h
+enc/trans/japanese.$(OBJEXT): internal/intern/compar.h
+enc/trans/japanese.$(OBJEXT): internal/intern/complex.h
+enc/trans/japanese.$(OBJEXT): internal/intern/cont.h
+enc/trans/japanese.$(OBJEXT): internal/intern/dir.h
+enc/trans/japanese.$(OBJEXT): internal/intern/enum.h
+enc/trans/japanese.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/japanese.$(OBJEXT): internal/intern/error.h
+enc/trans/japanese.$(OBJEXT): internal/intern/eval.h
+enc/trans/japanese.$(OBJEXT): internal/intern/file.h
+enc/trans/japanese.$(OBJEXT): internal/intern/gc.h
+enc/trans/japanese.$(OBJEXT): internal/intern/hash.h
+enc/trans/japanese.$(OBJEXT): internal/intern/io.h
+enc/trans/japanese.$(OBJEXT): internal/intern/load.h
+enc/trans/japanese.$(OBJEXT): internal/intern/marshal.h
+enc/trans/japanese.$(OBJEXT): internal/intern/numeric.h
+enc/trans/japanese.$(OBJEXT): internal/intern/object.h
+enc/trans/japanese.$(OBJEXT): internal/intern/parse.h
+enc/trans/japanese.$(OBJEXT): internal/intern/proc.h
+enc/trans/japanese.$(OBJEXT): internal/intern/process.h
+enc/trans/japanese.$(OBJEXT): internal/intern/random.h
+enc/trans/japanese.$(OBJEXT): internal/intern/range.h
+enc/trans/japanese.$(OBJEXT): internal/intern/rational.h
+enc/trans/japanese.$(OBJEXT): internal/intern/re.h
+enc/trans/japanese.$(OBJEXT): internal/intern/ruby.h
+enc/trans/japanese.$(OBJEXT): internal/intern/select.h
+enc/trans/japanese.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/japanese.$(OBJEXT): internal/intern/signal.h
+enc/trans/japanese.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/japanese.$(OBJEXT): internal/intern/string.h
+enc/trans/japanese.$(OBJEXT): internal/intern/struct.h
+enc/trans/japanese.$(OBJEXT): internal/intern/thread.h
+enc/trans/japanese.$(OBJEXT): internal/intern/time.h
+enc/trans/japanese.$(OBJEXT): internal/intern/variable.h
+enc/trans/japanese.$(OBJEXT): internal/intern/vm.h
+enc/trans/japanese.$(OBJEXT): internal/interpreter.h
+enc/trans/japanese.$(OBJEXT): internal/iterator.h
+enc/trans/japanese.$(OBJEXT): internal/memory.h
+enc/trans/japanese.$(OBJEXT): internal/method.h
+enc/trans/japanese.$(OBJEXT): internal/module.h
+enc/trans/japanese.$(OBJEXT): internal/newobj.h
+enc/trans/japanese.$(OBJEXT): internal/rgengc.h
+enc/trans/japanese.$(OBJEXT): internal/scan_args.h
+enc/trans/japanese.$(OBJEXT): internal/special_consts.h
+enc/trans/japanese.$(OBJEXT): internal/static_assert.h
+enc/trans/japanese.$(OBJEXT): internal/stdalign.h
+enc/trans/japanese.$(OBJEXT): internal/stdbool.h
+enc/trans/japanese.$(OBJEXT): internal/symbol.h
+enc/trans/japanese.$(OBJEXT): internal/value.h
+enc/trans/japanese.$(OBJEXT): internal/value_type.h
+enc/trans/japanese.$(OBJEXT): internal/variable.h
+enc/trans/japanese.$(OBJEXT): internal/warning_push.h
+enc/trans/japanese.$(OBJEXT): internal/xmalloc.h
enc/trans/japanese.$(OBJEXT): missing.h
enc/trans/japanese.$(OBJEXT): st.h
enc/trans/japanese.$(OBJEXT): subst.h
@@ -540,10 +7288,158 @@ enc/trans/japanese_euc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/japanese_euc.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/japanese_euc.$(OBJEXT): assert.h
enc/trans/japanese_euc.$(OBJEXT): backward.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/assume.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/attributes.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/bool.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/inttypes.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/limits.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/long_long.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/stdalign.h
+enc/trans/japanese_euc.$(OBJEXT): backward/2/stdarg.h
enc/trans/japanese_euc.$(OBJEXT): config.h
enc/trans/japanese_euc.$(OBJEXT): defines.h
enc/trans/japanese_euc.$(OBJEXT): enc/trans/japanese_euc.c
enc/trans/japanese_euc.$(OBJEXT): intern.h
+enc/trans/japanese_euc.$(OBJEXT): internal/abi.h
+enc/trans/japanese_euc.$(OBJEXT): internal/anyargs.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/japanese_euc.$(OBJEXT): internal/assume.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/artificial.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/cold.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/const.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/error.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/format.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/noalias.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/noinline.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/pure.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/restrict.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/warning.h
+enc/trans/japanese_euc.$(OBJEXT): internal/attr/weakref.h
+enc/trans/japanese_euc.$(OBJEXT): internal/cast.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/japanese_euc.$(OBJEXT): internal/compiler_since.h
+enc/trans/japanese_euc.$(OBJEXT): internal/config.h
+enc/trans/japanese_euc.$(OBJEXT): internal/constant_p.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rarray.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rbasic.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rbignum.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rclass.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rdata.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rfile.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rhash.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/robject.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rregexp.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rstring.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rstruct.h
+enc/trans/japanese_euc.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/japanese_euc.$(OBJEXT): internal/ctype.h
+enc/trans/japanese_euc.$(OBJEXT): internal/dllexport.h
+enc/trans/japanese_euc.$(OBJEXT): internal/dosish.h
+enc/trans/japanese_euc.$(OBJEXT): internal/error.h
+enc/trans/japanese_euc.$(OBJEXT): internal/eval.h
+enc/trans/japanese_euc.$(OBJEXT): internal/event.h
+enc/trans/japanese_euc.$(OBJEXT): internal/fl_type.h
+enc/trans/japanese_euc.$(OBJEXT): internal/gc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/glob.h
+enc/trans/japanese_euc.$(OBJEXT): internal/globals.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/attribute.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/builtin.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/extension.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/feature.h
+enc/trans/japanese_euc.$(OBJEXT): internal/has/warning.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/array.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/bignum.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/class.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/compar.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/complex.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/cont.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/dir.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/enum.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/error.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/eval.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/file.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/gc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/hash.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/io.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/load.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/marshal.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/numeric.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/object.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/parse.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/proc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/process.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/random.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/range.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/rational.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/re.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/ruby.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/select.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/signal.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/string.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/struct.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/thread.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/time.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/variable.h
+enc/trans/japanese_euc.$(OBJEXT): internal/intern/vm.h
+enc/trans/japanese_euc.$(OBJEXT): internal/interpreter.h
+enc/trans/japanese_euc.$(OBJEXT): internal/iterator.h
+enc/trans/japanese_euc.$(OBJEXT): internal/memory.h
+enc/trans/japanese_euc.$(OBJEXT): internal/method.h
+enc/trans/japanese_euc.$(OBJEXT): internal/module.h
+enc/trans/japanese_euc.$(OBJEXT): internal/newobj.h
+enc/trans/japanese_euc.$(OBJEXT): internal/rgengc.h
+enc/trans/japanese_euc.$(OBJEXT): internal/scan_args.h
+enc/trans/japanese_euc.$(OBJEXT): internal/special_consts.h
+enc/trans/japanese_euc.$(OBJEXT): internal/static_assert.h
+enc/trans/japanese_euc.$(OBJEXT): internal/stdalign.h
+enc/trans/japanese_euc.$(OBJEXT): internal/stdbool.h
+enc/trans/japanese_euc.$(OBJEXT): internal/symbol.h
+enc/trans/japanese_euc.$(OBJEXT): internal/value.h
+enc/trans/japanese_euc.$(OBJEXT): internal/value_type.h
+enc/trans/japanese_euc.$(OBJEXT): internal/variable.h
+enc/trans/japanese_euc.$(OBJEXT): internal/warning_push.h
+enc/trans/japanese_euc.$(OBJEXT): internal/xmalloc.h
enc/trans/japanese_euc.$(OBJEXT): missing.h
enc/trans/japanese_euc.$(OBJEXT): st.h
enc/trans/japanese_euc.$(OBJEXT): subst.h
@@ -551,10 +7447,158 @@ enc/trans/japanese_sjis.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/japanese_sjis.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/japanese_sjis.$(OBJEXT): assert.h
enc/trans/japanese_sjis.$(OBJEXT): backward.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/assume.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/attributes.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/bool.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/inttypes.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/limits.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/long_long.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/stdalign.h
+enc/trans/japanese_sjis.$(OBJEXT): backward/2/stdarg.h
enc/trans/japanese_sjis.$(OBJEXT): config.h
enc/trans/japanese_sjis.$(OBJEXT): defines.h
enc/trans/japanese_sjis.$(OBJEXT): enc/trans/japanese_sjis.c
enc/trans/japanese_sjis.$(OBJEXT): intern.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/abi.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/anyargs.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/assume.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/artificial.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/cold.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/const.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/error.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/format.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/noalias.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/noinline.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/pure.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/restrict.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/warning.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/attr/weakref.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/cast.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/compiler_since.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/config.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/constant_p.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rarray.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rbasic.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rbignum.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rclass.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rdata.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rfile.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rhash.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/robject.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rregexp.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rstring.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rstruct.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/ctype.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/dllexport.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/dosish.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/error.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/eval.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/event.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/fl_type.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/gc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/glob.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/globals.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/attribute.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/builtin.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/extension.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/feature.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/has/warning.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/array.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/bignum.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/class.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/compar.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/complex.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/cont.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/dir.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/enum.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/error.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/eval.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/file.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/gc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/hash.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/io.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/load.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/marshal.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/numeric.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/object.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/parse.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/proc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/process.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/random.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/range.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/rational.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/re.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/ruby.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/select.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/signal.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/string.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/struct.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/thread.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/time.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/variable.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/intern/vm.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/interpreter.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/iterator.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/memory.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/method.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/module.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/newobj.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/rgengc.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/scan_args.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/special_consts.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/static_assert.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/stdalign.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/stdbool.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/symbol.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/value.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/value_type.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/variable.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/warning_push.h
+enc/trans/japanese_sjis.$(OBJEXT): internal/xmalloc.h
enc/trans/japanese_sjis.$(OBJEXT): missing.h
enc/trans/japanese_sjis.$(OBJEXT): st.h
enc/trans/japanese_sjis.$(OBJEXT): subst.h
@@ -562,20 +7606,316 @@ enc/trans/korean.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/korean.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/korean.$(OBJEXT): assert.h
enc/trans/korean.$(OBJEXT): backward.h
+enc/trans/korean.$(OBJEXT): backward/2/assume.h
+enc/trans/korean.$(OBJEXT): backward/2/attributes.h
+enc/trans/korean.$(OBJEXT): backward/2/bool.h
+enc/trans/korean.$(OBJEXT): backward/2/inttypes.h
+enc/trans/korean.$(OBJEXT): backward/2/limits.h
+enc/trans/korean.$(OBJEXT): backward/2/long_long.h
+enc/trans/korean.$(OBJEXT): backward/2/stdalign.h
+enc/trans/korean.$(OBJEXT): backward/2/stdarg.h
enc/trans/korean.$(OBJEXT): config.h
enc/trans/korean.$(OBJEXT): defines.h
enc/trans/korean.$(OBJEXT): enc/trans/korean.c
enc/trans/korean.$(OBJEXT): intern.h
+enc/trans/korean.$(OBJEXT): internal/abi.h
+enc/trans/korean.$(OBJEXT): internal/anyargs.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/korean.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/korean.$(OBJEXT): internal/assume.h
+enc/trans/korean.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/korean.$(OBJEXT): internal/attr/artificial.h
+enc/trans/korean.$(OBJEXT): internal/attr/cold.h
+enc/trans/korean.$(OBJEXT): internal/attr/const.h
+enc/trans/korean.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/korean.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/korean.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/korean.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/korean.$(OBJEXT): internal/attr/error.h
+enc/trans/korean.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/korean.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/korean.$(OBJEXT): internal/attr/format.h
+enc/trans/korean.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/korean.$(OBJEXT): internal/attr/noalias.h
+enc/trans/korean.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/korean.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/korean.$(OBJEXT): internal/attr/noinline.h
+enc/trans/korean.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/korean.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/korean.$(OBJEXT): internal/attr/pure.h
+enc/trans/korean.$(OBJEXT): internal/attr/restrict.h
+enc/trans/korean.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/korean.$(OBJEXT): internal/attr/warning.h
+enc/trans/korean.$(OBJEXT): internal/attr/weakref.h
+enc/trans/korean.$(OBJEXT): internal/cast.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/korean.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/korean.$(OBJEXT): internal/compiler_since.h
+enc/trans/korean.$(OBJEXT): internal/config.h
+enc/trans/korean.$(OBJEXT): internal/constant_p.h
+enc/trans/korean.$(OBJEXT): internal/core.h
+enc/trans/korean.$(OBJEXT): internal/core/rarray.h
+enc/trans/korean.$(OBJEXT): internal/core/rbasic.h
+enc/trans/korean.$(OBJEXT): internal/core/rbignum.h
+enc/trans/korean.$(OBJEXT): internal/core/rclass.h
+enc/trans/korean.$(OBJEXT): internal/core/rdata.h
+enc/trans/korean.$(OBJEXT): internal/core/rfile.h
+enc/trans/korean.$(OBJEXT): internal/core/rhash.h
+enc/trans/korean.$(OBJEXT): internal/core/robject.h
+enc/trans/korean.$(OBJEXT): internal/core/rregexp.h
+enc/trans/korean.$(OBJEXT): internal/core/rstring.h
+enc/trans/korean.$(OBJEXT): internal/core/rstruct.h
+enc/trans/korean.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/korean.$(OBJEXT): internal/ctype.h
+enc/trans/korean.$(OBJEXT): internal/dllexport.h
+enc/trans/korean.$(OBJEXT): internal/dosish.h
+enc/trans/korean.$(OBJEXT): internal/error.h
+enc/trans/korean.$(OBJEXT): internal/eval.h
+enc/trans/korean.$(OBJEXT): internal/event.h
+enc/trans/korean.$(OBJEXT): internal/fl_type.h
+enc/trans/korean.$(OBJEXT): internal/gc.h
+enc/trans/korean.$(OBJEXT): internal/glob.h
+enc/trans/korean.$(OBJEXT): internal/globals.h
+enc/trans/korean.$(OBJEXT): internal/has/attribute.h
+enc/trans/korean.$(OBJEXT): internal/has/builtin.h
+enc/trans/korean.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/korean.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/korean.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/korean.$(OBJEXT): internal/has/extension.h
+enc/trans/korean.$(OBJEXT): internal/has/feature.h
+enc/trans/korean.$(OBJEXT): internal/has/warning.h
+enc/trans/korean.$(OBJEXT): internal/intern/array.h
+enc/trans/korean.$(OBJEXT): internal/intern/bignum.h
+enc/trans/korean.$(OBJEXT): internal/intern/class.h
+enc/trans/korean.$(OBJEXT): internal/intern/compar.h
+enc/trans/korean.$(OBJEXT): internal/intern/complex.h
+enc/trans/korean.$(OBJEXT): internal/intern/cont.h
+enc/trans/korean.$(OBJEXT): internal/intern/dir.h
+enc/trans/korean.$(OBJEXT): internal/intern/enum.h
+enc/trans/korean.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/korean.$(OBJEXT): internal/intern/error.h
+enc/trans/korean.$(OBJEXT): internal/intern/eval.h
+enc/trans/korean.$(OBJEXT): internal/intern/file.h
+enc/trans/korean.$(OBJEXT): internal/intern/gc.h
+enc/trans/korean.$(OBJEXT): internal/intern/hash.h
+enc/trans/korean.$(OBJEXT): internal/intern/io.h
+enc/trans/korean.$(OBJEXT): internal/intern/load.h
+enc/trans/korean.$(OBJEXT): internal/intern/marshal.h
+enc/trans/korean.$(OBJEXT): internal/intern/numeric.h
+enc/trans/korean.$(OBJEXT): internal/intern/object.h
+enc/trans/korean.$(OBJEXT): internal/intern/parse.h
+enc/trans/korean.$(OBJEXT): internal/intern/proc.h
+enc/trans/korean.$(OBJEXT): internal/intern/process.h
+enc/trans/korean.$(OBJEXT): internal/intern/random.h
+enc/trans/korean.$(OBJEXT): internal/intern/range.h
+enc/trans/korean.$(OBJEXT): internal/intern/rational.h
+enc/trans/korean.$(OBJEXT): internal/intern/re.h
+enc/trans/korean.$(OBJEXT): internal/intern/ruby.h
+enc/trans/korean.$(OBJEXT): internal/intern/select.h
+enc/trans/korean.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/korean.$(OBJEXT): internal/intern/signal.h
+enc/trans/korean.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/korean.$(OBJEXT): internal/intern/string.h
+enc/trans/korean.$(OBJEXT): internal/intern/struct.h
+enc/trans/korean.$(OBJEXT): internal/intern/thread.h
+enc/trans/korean.$(OBJEXT): internal/intern/time.h
+enc/trans/korean.$(OBJEXT): internal/intern/variable.h
+enc/trans/korean.$(OBJEXT): internal/intern/vm.h
+enc/trans/korean.$(OBJEXT): internal/interpreter.h
+enc/trans/korean.$(OBJEXT): internal/iterator.h
+enc/trans/korean.$(OBJEXT): internal/memory.h
+enc/trans/korean.$(OBJEXT): internal/method.h
+enc/trans/korean.$(OBJEXT): internal/module.h
+enc/trans/korean.$(OBJEXT): internal/newobj.h
+enc/trans/korean.$(OBJEXT): internal/rgengc.h
+enc/trans/korean.$(OBJEXT): internal/scan_args.h
+enc/trans/korean.$(OBJEXT): internal/special_consts.h
+enc/trans/korean.$(OBJEXT): internal/static_assert.h
+enc/trans/korean.$(OBJEXT): internal/stdalign.h
+enc/trans/korean.$(OBJEXT): internal/stdbool.h
+enc/trans/korean.$(OBJEXT): internal/symbol.h
+enc/trans/korean.$(OBJEXT): internal/value.h
+enc/trans/korean.$(OBJEXT): internal/value_type.h
+enc/trans/korean.$(OBJEXT): internal/variable.h
+enc/trans/korean.$(OBJEXT): internal/warning_push.h
+enc/trans/korean.$(OBJEXT): internal/xmalloc.h
enc/trans/korean.$(OBJEXT): missing.h
enc/trans/korean.$(OBJEXT): st.h
enc/trans/korean.$(OBJEXT): subst.h
enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/newline.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/newline.$(OBJEXT): assert.h
+enc/trans/newline.$(OBJEXT): backward/2/assume.h
+enc/trans/newline.$(OBJEXT): backward/2/attributes.h
+enc/trans/newline.$(OBJEXT): backward/2/bool.h
+enc/trans/newline.$(OBJEXT): backward/2/inttypes.h
+enc/trans/newline.$(OBJEXT): backward/2/limits.h
+enc/trans/newline.$(OBJEXT): backward/2/long_long.h
+enc/trans/newline.$(OBJEXT): backward/2/stdalign.h
+enc/trans/newline.$(OBJEXT): backward/2/stdarg.h
enc/trans/newline.$(OBJEXT): config.h
enc/trans/newline.$(OBJEXT): defines.h
enc/trans/newline.$(OBJEXT): enc/trans/newline.c
enc/trans/newline.$(OBJEXT): intern.h
+enc/trans/newline.$(OBJEXT): internal/abi.h
+enc/trans/newline.$(OBJEXT): internal/anyargs.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/newline.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/newline.$(OBJEXT): internal/assume.h
+enc/trans/newline.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/newline.$(OBJEXT): internal/attr/artificial.h
+enc/trans/newline.$(OBJEXT): internal/attr/cold.h
+enc/trans/newline.$(OBJEXT): internal/attr/const.h
+enc/trans/newline.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/newline.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/newline.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/newline.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/newline.$(OBJEXT): internal/attr/error.h
+enc/trans/newline.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/newline.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/newline.$(OBJEXT): internal/attr/format.h
+enc/trans/newline.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/newline.$(OBJEXT): internal/attr/noalias.h
+enc/trans/newline.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/newline.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/newline.$(OBJEXT): internal/attr/noinline.h
+enc/trans/newline.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/newline.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/newline.$(OBJEXT): internal/attr/pure.h
+enc/trans/newline.$(OBJEXT): internal/attr/restrict.h
+enc/trans/newline.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/newline.$(OBJEXT): internal/attr/warning.h
+enc/trans/newline.$(OBJEXT): internal/attr/weakref.h
+enc/trans/newline.$(OBJEXT): internal/cast.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/newline.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/newline.$(OBJEXT): internal/compiler_since.h
+enc/trans/newline.$(OBJEXT): internal/config.h
+enc/trans/newline.$(OBJEXT): internal/constant_p.h
+enc/trans/newline.$(OBJEXT): internal/core.h
+enc/trans/newline.$(OBJEXT): internal/core/rarray.h
+enc/trans/newline.$(OBJEXT): internal/core/rbasic.h
+enc/trans/newline.$(OBJEXT): internal/core/rbignum.h
+enc/trans/newline.$(OBJEXT): internal/core/rclass.h
+enc/trans/newline.$(OBJEXT): internal/core/rdata.h
+enc/trans/newline.$(OBJEXT): internal/core/rfile.h
+enc/trans/newline.$(OBJEXT): internal/core/rhash.h
+enc/trans/newline.$(OBJEXT): internal/core/robject.h
+enc/trans/newline.$(OBJEXT): internal/core/rregexp.h
+enc/trans/newline.$(OBJEXT): internal/core/rstring.h
+enc/trans/newline.$(OBJEXT): internal/core/rstruct.h
+enc/trans/newline.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/newline.$(OBJEXT): internal/ctype.h
+enc/trans/newline.$(OBJEXT): internal/dllexport.h
+enc/trans/newline.$(OBJEXT): internal/dosish.h
+enc/trans/newline.$(OBJEXT): internal/error.h
+enc/trans/newline.$(OBJEXT): internal/eval.h
+enc/trans/newline.$(OBJEXT): internal/event.h
+enc/trans/newline.$(OBJEXT): internal/fl_type.h
+enc/trans/newline.$(OBJEXT): internal/gc.h
+enc/trans/newline.$(OBJEXT): internal/glob.h
+enc/trans/newline.$(OBJEXT): internal/globals.h
+enc/trans/newline.$(OBJEXT): internal/has/attribute.h
+enc/trans/newline.$(OBJEXT): internal/has/builtin.h
+enc/trans/newline.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/newline.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/newline.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/newline.$(OBJEXT): internal/has/extension.h
+enc/trans/newline.$(OBJEXT): internal/has/feature.h
+enc/trans/newline.$(OBJEXT): internal/has/warning.h
+enc/trans/newline.$(OBJEXT): internal/intern/array.h
+enc/trans/newline.$(OBJEXT): internal/intern/bignum.h
+enc/trans/newline.$(OBJEXT): internal/intern/class.h
+enc/trans/newline.$(OBJEXT): internal/intern/compar.h
+enc/trans/newline.$(OBJEXT): internal/intern/complex.h
+enc/trans/newline.$(OBJEXT): internal/intern/cont.h
+enc/trans/newline.$(OBJEXT): internal/intern/dir.h
+enc/trans/newline.$(OBJEXT): internal/intern/enum.h
+enc/trans/newline.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/newline.$(OBJEXT): internal/intern/error.h
+enc/trans/newline.$(OBJEXT): internal/intern/eval.h
+enc/trans/newline.$(OBJEXT): internal/intern/file.h
+enc/trans/newline.$(OBJEXT): internal/intern/gc.h
+enc/trans/newline.$(OBJEXT): internal/intern/hash.h
+enc/trans/newline.$(OBJEXT): internal/intern/io.h
+enc/trans/newline.$(OBJEXT): internal/intern/load.h
+enc/trans/newline.$(OBJEXT): internal/intern/marshal.h
+enc/trans/newline.$(OBJEXT): internal/intern/numeric.h
+enc/trans/newline.$(OBJEXT): internal/intern/object.h
+enc/trans/newline.$(OBJEXT): internal/intern/parse.h
+enc/trans/newline.$(OBJEXT): internal/intern/proc.h
+enc/trans/newline.$(OBJEXT): internal/intern/process.h
+enc/trans/newline.$(OBJEXT): internal/intern/random.h
+enc/trans/newline.$(OBJEXT): internal/intern/range.h
+enc/trans/newline.$(OBJEXT): internal/intern/rational.h
+enc/trans/newline.$(OBJEXT): internal/intern/re.h
+enc/trans/newline.$(OBJEXT): internal/intern/ruby.h
+enc/trans/newline.$(OBJEXT): internal/intern/select.h
+enc/trans/newline.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/newline.$(OBJEXT): internal/intern/signal.h
+enc/trans/newline.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/newline.$(OBJEXT): internal/intern/string.h
+enc/trans/newline.$(OBJEXT): internal/intern/struct.h
+enc/trans/newline.$(OBJEXT): internal/intern/thread.h
+enc/trans/newline.$(OBJEXT): internal/intern/time.h
+enc/trans/newline.$(OBJEXT): internal/intern/variable.h
+enc/trans/newline.$(OBJEXT): internal/intern/vm.h
+enc/trans/newline.$(OBJEXT): internal/interpreter.h
+enc/trans/newline.$(OBJEXT): internal/iterator.h
+enc/trans/newline.$(OBJEXT): internal/memory.h
+enc/trans/newline.$(OBJEXT): internal/method.h
+enc/trans/newline.$(OBJEXT): internal/module.h
+enc/trans/newline.$(OBJEXT): internal/newobj.h
+enc/trans/newline.$(OBJEXT): internal/rgengc.h
+enc/trans/newline.$(OBJEXT): internal/scan_args.h
+enc/trans/newline.$(OBJEXT): internal/special_consts.h
+enc/trans/newline.$(OBJEXT): internal/static_assert.h
+enc/trans/newline.$(OBJEXT): internal/stdalign.h
+enc/trans/newline.$(OBJEXT): internal/stdbool.h
+enc/trans/newline.$(OBJEXT): internal/symbol.h
+enc/trans/newline.$(OBJEXT): internal/value.h
+enc/trans/newline.$(OBJEXT): internal/value_type.h
+enc/trans/newline.$(OBJEXT): internal/variable.h
+enc/trans/newline.$(OBJEXT): internal/warning_push.h
+enc/trans/newline.$(OBJEXT): internal/xmalloc.h
enc/trans/newline.$(OBJEXT): missing.h
enc/trans/newline.$(OBJEXT): st.h
enc/trans/newline.$(OBJEXT): subst.h
@@ -583,23 +7923,477 @@ enc/trans/single_byte.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/single_byte.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/single_byte.$(OBJEXT): assert.h
enc/trans/single_byte.$(OBJEXT): backward.h
+enc/trans/single_byte.$(OBJEXT): backward/2/assume.h
+enc/trans/single_byte.$(OBJEXT): backward/2/attributes.h
+enc/trans/single_byte.$(OBJEXT): backward/2/bool.h
+enc/trans/single_byte.$(OBJEXT): backward/2/inttypes.h
+enc/trans/single_byte.$(OBJEXT): backward/2/limits.h
+enc/trans/single_byte.$(OBJEXT): backward/2/long_long.h
+enc/trans/single_byte.$(OBJEXT): backward/2/stdalign.h
+enc/trans/single_byte.$(OBJEXT): backward/2/stdarg.h
enc/trans/single_byte.$(OBJEXT): config.h
enc/trans/single_byte.$(OBJEXT): defines.h
enc/trans/single_byte.$(OBJEXT): enc/trans/single_byte.c
enc/trans/single_byte.$(OBJEXT): intern.h
+enc/trans/single_byte.$(OBJEXT): internal/abi.h
+enc/trans/single_byte.$(OBJEXT): internal/anyargs.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/single_byte.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/single_byte.$(OBJEXT): internal/assume.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/artificial.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/cold.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/const.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/error.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/format.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/noalias.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/noinline.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/pure.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/restrict.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/warning.h
+enc/trans/single_byte.$(OBJEXT): internal/attr/weakref.h
+enc/trans/single_byte.$(OBJEXT): internal/cast.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/single_byte.$(OBJEXT): internal/compiler_since.h
+enc/trans/single_byte.$(OBJEXT): internal/config.h
+enc/trans/single_byte.$(OBJEXT): internal/constant_p.h
+enc/trans/single_byte.$(OBJEXT): internal/core.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rarray.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rbasic.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rbignum.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rclass.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rdata.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rfile.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rhash.h
+enc/trans/single_byte.$(OBJEXT): internal/core/robject.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rregexp.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rstring.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rstruct.h
+enc/trans/single_byte.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/single_byte.$(OBJEXT): internal/ctype.h
+enc/trans/single_byte.$(OBJEXT): internal/dllexport.h
+enc/trans/single_byte.$(OBJEXT): internal/dosish.h
+enc/trans/single_byte.$(OBJEXT): internal/error.h
+enc/trans/single_byte.$(OBJEXT): internal/eval.h
+enc/trans/single_byte.$(OBJEXT): internal/event.h
+enc/trans/single_byte.$(OBJEXT): internal/fl_type.h
+enc/trans/single_byte.$(OBJEXT): internal/gc.h
+enc/trans/single_byte.$(OBJEXT): internal/glob.h
+enc/trans/single_byte.$(OBJEXT): internal/globals.h
+enc/trans/single_byte.$(OBJEXT): internal/has/attribute.h
+enc/trans/single_byte.$(OBJEXT): internal/has/builtin.h
+enc/trans/single_byte.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/single_byte.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/single_byte.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/single_byte.$(OBJEXT): internal/has/extension.h
+enc/trans/single_byte.$(OBJEXT): internal/has/feature.h
+enc/trans/single_byte.$(OBJEXT): internal/has/warning.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/array.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/bignum.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/class.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/compar.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/complex.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/cont.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/dir.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/enum.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/error.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/eval.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/file.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/gc.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/hash.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/io.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/load.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/marshal.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/numeric.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/object.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/parse.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/proc.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/process.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/random.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/range.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/rational.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/re.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/ruby.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/select.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/signal.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/string.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/struct.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/thread.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/time.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/variable.h
+enc/trans/single_byte.$(OBJEXT): internal/intern/vm.h
+enc/trans/single_byte.$(OBJEXT): internal/interpreter.h
+enc/trans/single_byte.$(OBJEXT): internal/iterator.h
+enc/trans/single_byte.$(OBJEXT): internal/memory.h
+enc/trans/single_byte.$(OBJEXT): internal/method.h
+enc/trans/single_byte.$(OBJEXT): internal/module.h
+enc/trans/single_byte.$(OBJEXT): internal/newobj.h
+enc/trans/single_byte.$(OBJEXT): internal/rgengc.h
+enc/trans/single_byte.$(OBJEXT): internal/scan_args.h
+enc/trans/single_byte.$(OBJEXT): internal/special_consts.h
+enc/trans/single_byte.$(OBJEXT): internal/static_assert.h
+enc/trans/single_byte.$(OBJEXT): internal/stdalign.h
+enc/trans/single_byte.$(OBJEXT): internal/stdbool.h
+enc/trans/single_byte.$(OBJEXT): internal/symbol.h
+enc/trans/single_byte.$(OBJEXT): internal/value.h
+enc/trans/single_byte.$(OBJEXT): internal/value_type.h
+enc/trans/single_byte.$(OBJEXT): internal/variable.h
+enc/trans/single_byte.$(OBJEXT): internal/warning_push.h
+enc/trans/single_byte.$(OBJEXT): internal/xmalloc.h
enc/trans/single_byte.$(OBJEXT): missing.h
enc/trans/single_byte.$(OBJEXT): st.h
enc/trans/single_byte.$(OBJEXT): subst.h
+enc/trans/transdb.$(OBJEXT): $(hdrdir)/ruby.h
+enc/trans/transdb.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/trans/transdb.$(OBJEXT): assert.h
+enc/trans/transdb.$(OBJEXT): backward.h
+enc/trans/transdb.$(OBJEXT): backward/2/assume.h
+enc/trans/transdb.$(OBJEXT): backward/2/attributes.h
+enc/trans/transdb.$(OBJEXT): backward/2/bool.h
+enc/trans/transdb.$(OBJEXT): backward/2/inttypes.h
+enc/trans/transdb.$(OBJEXT): backward/2/limits.h
+enc/trans/transdb.$(OBJEXT): backward/2/long_long.h
+enc/trans/transdb.$(OBJEXT): backward/2/stdalign.h
+enc/trans/transdb.$(OBJEXT): backward/2/stdarg.h
+enc/trans/transdb.$(OBJEXT): config.h
+enc/trans/transdb.$(OBJEXT): defines.h
enc/trans/transdb.$(OBJEXT): enc/trans/transdb.c
+enc/trans/transdb.$(OBJEXT): intern.h
+enc/trans/transdb.$(OBJEXT): internal/abi.h
+enc/trans/transdb.$(OBJEXT): internal/anyargs.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/transdb.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/transdb.$(OBJEXT): internal/assume.h
+enc/trans/transdb.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/transdb.$(OBJEXT): internal/attr/artificial.h
+enc/trans/transdb.$(OBJEXT): internal/attr/cold.h
+enc/trans/transdb.$(OBJEXT): internal/attr/const.h
+enc/trans/transdb.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/transdb.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/transdb.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/transdb.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/transdb.$(OBJEXT): internal/attr/error.h
+enc/trans/transdb.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/transdb.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/transdb.$(OBJEXT): internal/attr/format.h
+enc/trans/transdb.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/transdb.$(OBJEXT): internal/attr/noalias.h
+enc/trans/transdb.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/transdb.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/transdb.$(OBJEXT): internal/attr/noinline.h
+enc/trans/transdb.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/transdb.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/transdb.$(OBJEXT): internal/attr/pure.h
+enc/trans/transdb.$(OBJEXT): internal/attr/restrict.h
+enc/trans/transdb.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/transdb.$(OBJEXT): internal/attr/warning.h
+enc/trans/transdb.$(OBJEXT): internal/attr/weakref.h
+enc/trans/transdb.$(OBJEXT): internal/cast.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/transdb.$(OBJEXT): internal/compiler_since.h
+enc/trans/transdb.$(OBJEXT): internal/config.h
+enc/trans/transdb.$(OBJEXT): internal/constant_p.h
+enc/trans/transdb.$(OBJEXT): internal/core.h
+enc/trans/transdb.$(OBJEXT): internal/core/rarray.h
+enc/trans/transdb.$(OBJEXT): internal/core/rbasic.h
+enc/trans/transdb.$(OBJEXT): internal/core/rbignum.h
+enc/trans/transdb.$(OBJEXT): internal/core/rclass.h
+enc/trans/transdb.$(OBJEXT): internal/core/rdata.h
+enc/trans/transdb.$(OBJEXT): internal/core/rfile.h
+enc/trans/transdb.$(OBJEXT): internal/core/rhash.h
+enc/trans/transdb.$(OBJEXT): internal/core/robject.h
+enc/trans/transdb.$(OBJEXT): internal/core/rregexp.h
+enc/trans/transdb.$(OBJEXT): internal/core/rstring.h
+enc/trans/transdb.$(OBJEXT): internal/core/rstruct.h
+enc/trans/transdb.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/transdb.$(OBJEXT): internal/ctype.h
+enc/trans/transdb.$(OBJEXT): internal/dllexport.h
+enc/trans/transdb.$(OBJEXT): internal/dosish.h
+enc/trans/transdb.$(OBJEXT): internal/error.h
+enc/trans/transdb.$(OBJEXT): internal/eval.h
+enc/trans/transdb.$(OBJEXT): internal/event.h
+enc/trans/transdb.$(OBJEXT): internal/fl_type.h
+enc/trans/transdb.$(OBJEXT): internal/gc.h
+enc/trans/transdb.$(OBJEXT): internal/glob.h
+enc/trans/transdb.$(OBJEXT): internal/globals.h
+enc/trans/transdb.$(OBJEXT): internal/has/attribute.h
+enc/trans/transdb.$(OBJEXT): internal/has/builtin.h
+enc/trans/transdb.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/transdb.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/transdb.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/transdb.$(OBJEXT): internal/has/extension.h
+enc/trans/transdb.$(OBJEXT): internal/has/feature.h
+enc/trans/transdb.$(OBJEXT): internal/has/warning.h
+enc/trans/transdb.$(OBJEXT): internal/intern/array.h
+enc/trans/transdb.$(OBJEXT): internal/intern/bignum.h
+enc/trans/transdb.$(OBJEXT): internal/intern/class.h
+enc/trans/transdb.$(OBJEXT): internal/intern/compar.h
+enc/trans/transdb.$(OBJEXT): internal/intern/complex.h
+enc/trans/transdb.$(OBJEXT): internal/intern/cont.h
+enc/trans/transdb.$(OBJEXT): internal/intern/dir.h
+enc/trans/transdb.$(OBJEXT): internal/intern/enum.h
+enc/trans/transdb.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/transdb.$(OBJEXT): internal/intern/error.h
+enc/trans/transdb.$(OBJEXT): internal/intern/eval.h
+enc/trans/transdb.$(OBJEXT): internal/intern/file.h
+enc/trans/transdb.$(OBJEXT): internal/intern/gc.h
+enc/trans/transdb.$(OBJEXT): internal/intern/hash.h
+enc/trans/transdb.$(OBJEXT): internal/intern/io.h
+enc/trans/transdb.$(OBJEXT): internal/intern/load.h
+enc/trans/transdb.$(OBJEXT): internal/intern/marshal.h
+enc/trans/transdb.$(OBJEXT): internal/intern/numeric.h
+enc/trans/transdb.$(OBJEXT): internal/intern/object.h
+enc/trans/transdb.$(OBJEXT): internal/intern/parse.h
+enc/trans/transdb.$(OBJEXT): internal/intern/proc.h
+enc/trans/transdb.$(OBJEXT): internal/intern/process.h
+enc/trans/transdb.$(OBJEXT): internal/intern/random.h
+enc/trans/transdb.$(OBJEXT): internal/intern/range.h
+enc/trans/transdb.$(OBJEXT): internal/intern/rational.h
+enc/trans/transdb.$(OBJEXT): internal/intern/re.h
+enc/trans/transdb.$(OBJEXT): internal/intern/ruby.h
+enc/trans/transdb.$(OBJEXT): internal/intern/select.h
+enc/trans/transdb.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/transdb.$(OBJEXT): internal/intern/signal.h
+enc/trans/transdb.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/transdb.$(OBJEXT): internal/intern/string.h
+enc/trans/transdb.$(OBJEXT): internal/intern/struct.h
+enc/trans/transdb.$(OBJEXT): internal/intern/thread.h
+enc/trans/transdb.$(OBJEXT): internal/intern/time.h
+enc/trans/transdb.$(OBJEXT): internal/intern/variable.h
+enc/trans/transdb.$(OBJEXT): internal/intern/vm.h
+enc/trans/transdb.$(OBJEXT): internal/interpreter.h
+enc/trans/transdb.$(OBJEXT): internal/iterator.h
+enc/trans/transdb.$(OBJEXT): internal/memory.h
+enc/trans/transdb.$(OBJEXT): internal/method.h
+enc/trans/transdb.$(OBJEXT): internal/module.h
+enc/trans/transdb.$(OBJEXT): internal/newobj.h
+enc/trans/transdb.$(OBJEXT): internal/rgengc.h
+enc/trans/transdb.$(OBJEXT): internal/scan_args.h
+enc/trans/transdb.$(OBJEXT): internal/special_consts.h
+enc/trans/transdb.$(OBJEXT): internal/static_assert.h
+enc/trans/transdb.$(OBJEXT): internal/stdalign.h
+enc/trans/transdb.$(OBJEXT): internal/stdbool.h
+enc/trans/transdb.$(OBJEXT): internal/symbol.h
+enc/trans/transdb.$(OBJEXT): internal/value.h
+enc/trans/transdb.$(OBJEXT): internal/value_type.h
+enc/trans/transdb.$(OBJEXT): internal/variable.h
+enc/trans/transdb.$(OBJEXT): internal/warning_push.h
+enc/trans/transdb.$(OBJEXT): internal/xmalloc.h
+enc/trans/transdb.$(OBJEXT): missing.h
+enc/trans/transdb.$(OBJEXT): st.h
+enc/trans/transdb.$(OBJEXT): subst.h
enc/trans/transdb.$(OBJEXT): transdb.h
enc/trans/utf8_mac.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/utf8_mac.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/utf8_mac.$(OBJEXT): assert.h
enc/trans/utf8_mac.$(OBJEXT): backward.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/assume.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/attributes.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/bool.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/inttypes.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/limits.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/long_long.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/stdalign.h
+enc/trans/utf8_mac.$(OBJEXT): backward/2/stdarg.h
enc/trans/utf8_mac.$(OBJEXT): config.h
enc/trans/utf8_mac.$(OBJEXT): defines.h
enc/trans/utf8_mac.$(OBJEXT): enc/trans/utf8_mac.c
enc/trans/utf8_mac.$(OBJEXT): intern.h
+enc/trans/utf8_mac.$(OBJEXT): internal/abi.h
+enc/trans/utf8_mac.$(OBJEXT): internal/anyargs.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/utf8_mac.$(OBJEXT): internal/assume.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/artificial.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/cold.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/const.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/error.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/format.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/noalias.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/noinline.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/pure.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/restrict.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/warning.h
+enc/trans/utf8_mac.$(OBJEXT): internal/attr/weakref.h
+enc/trans/utf8_mac.$(OBJEXT): internal/cast.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/utf8_mac.$(OBJEXT): internal/compiler_since.h
+enc/trans/utf8_mac.$(OBJEXT): internal/config.h
+enc/trans/utf8_mac.$(OBJEXT): internal/constant_p.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rarray.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rbasic.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rbignum.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rclass.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rdata.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rfile.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rhash.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/robject.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rregexp.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rstring.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rstruct.h
+enc/trans/utf8_mac.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/utf8_mac.$(OBJEXT): internal/ctype.h
+enc/trans/utf8_mac.$(OBJEXT): internal/dllexport.h
+enc/trans/utf8_mac.$(OBJEXT): internal/dosish.h
+enc/trans/utf8_mac.$(OBJEXT): internal/error.h
+enc/trans/utf8_mac.$(OBJEXT): internal/eval.h
+enc/trans/utf8_mac.$(OBJEXT): internal/event.h
+enc/trans/utf8_mac.$(OBJEXT): internal/fl_type.h
+enc/trans/utf8_mac.$(OBJEXT): internal/gc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/glob.h
+enc/trans/utf8_mac.$(OBJEXT): internal/globals.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/attribute.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/builtin.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/extension.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/feature.h
+enc/trans/utf8_mac.$(OBJEXT): internal/has/warning.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/array.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/bignum.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/class.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/compar.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/complex.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/cont.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/dir.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/enum.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/error.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/eval.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/file.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/gc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/hash.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/io.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/load.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/marshal.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/numeric.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/object.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/parse.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/proc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/process.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/random.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/range.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/rational.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/re.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/ruby.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/select.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/signal.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/string.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/struct.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/thread.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/time.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/variable.h
+enc/trans/utf8_mac.$(OBJEXT): internal/intern/vm.h
+enc/trans/utf8_mac.$(OBJEXT): internal/interpreter.h
+enc/trans/utf8_mac.$(OBJEXT): internal/iterator.h
+enc/trans/utf8_mac.$(OBJEXT): internal/memory.h
+enc/trans/utf8_mac.$(OBJEXT): internal/method.h
+enc/trans/utf8_mac.$(OBJEXT): internal/module.h
+enc/trans/utf8_mac.$(OBJEXT): internal/newobj.h
+enc/trans/utf8_mac.$(OBJEXT): internal/rgengc.h
+enc/trans/utf8_mac.$(OBJEXT): internal/scan_args.h
+enc/trans/utf8_mac.$(OBJEXT): internal/special_consts.h
+enc/trans/utf8_mac.$(OBJEXT): internal/static_assert.h
+enc/trans/utf8_mac.$(OBJEXT): internal/stdalign.h
+enc/trans/utf8_mac.$(OBJEXT): internal/stdbool.h
+enc/trans/utf8_mac.$(OBJEXT): internal/symbol.h
+enc/trans/utf8_mac.$(OBJEXT): internal/value.h
+enc/trans/utf8_mac.$(OBJEXT): internal/value_type.h
+enc/trans/utf8_mac.$(OBJEXT): internal/variable.h
+enc/trans/utf8_mac.$(OBJEXT): internal/warning_push.h
+enc/trans/utf8_mac.$(OBJEXT): internal/xmalloc.h
enc/trans/utf8_mac.$(OBJEXT): missing.h
enc/trans/utf8_mac.$(OBJEXT): st.h
enc/trans/utf8_mac.$(OBJEXT): subst.h
@@ -607,116 +8401,2448 @@ enc/trans/utf_16_32.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/trans/utf_16_32.$(OBJEXT): $(top_srcdir)/transcode_data.h
enc/trans/utf_16_32.$(OBJEXT): assert.h
enc/trans/utf_16_32.$(OBJEXT): backward.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/assume.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/attributes.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/bool.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/inttypes.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/limits.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/long_long.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/stdalign.h
+enc/trans/utf_16_32.$(OBJEXT): backward/2/stdarg.h
enc/trans/utf_16_32.$(OBJEXT): config.h
enc/trans/utf_16_32.$(OBJEXT): defines.h
enc/trans/utf_16_32.$(OBJEXT): enc/trans/utf_16_32.c
enc/trans/utf_16_32.$(OBJEXT): intern.h
+enc/trans/utf_16_32.$(OBJEXT): internal/abi.h
+enc/trans/utf_16_32.$(OBJEXT): internal/anyargs.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/char.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/double.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/int.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/long.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/long_long.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/off_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/short.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/size_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/trans/utf_16_32.$(OBJEXT): internal/assume.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/alloc_size.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/artificial.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/cold.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/const.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/constexpr.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/deprecated.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/diagnose_if.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/error.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/flag_enum.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/forceinline.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/format.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/maybe_unused.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/noalias.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/nodiscard.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/noexcept.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/noinline.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/nonnull.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/noreturn.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/pure.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/restrict.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/warning.h
+enc/trans/utf_16_32.$(OBJEXT): internal/attr/weakref.h
+enc/trans/utf_16_32.$(OBJEXT): internal/cast.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/apple.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/clang.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/gcc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/intel.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/msvc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/trans/utf_16_32.$(OBJEXT): internal/compiler_since.h
+enc/trans/utf_16_32.$(OBJEXT): internal/config.h
+enc/trans/utf_16_32.$(OBJEXT): internal/constant_p.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rarray.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rbasic.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rbignum.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rclass.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rdata.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rfile.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rhash.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/robject.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rregexp.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rstring.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rstruct.h
+enc/trans/utf_16_32.$(OBJEXT): internal/core/rtypeddata.h
+enc/trans/utf_16_32.$(OBJEXT): internal/ctype.h
+enc/trans/utf_16_32.$(OBJEXT): internal/dllexport.h
+enc/trans/utf_16_32.$(OBJEXT): internal/dosish.h
+enc/trans/utf_16_32.$(OBJEXT): internal/error.h
+enc/trans/utf_16_32.$(OBJEXT): internal/eval.h
+enc/trans/utf_16_32.$(OBJEXT): internal/event.h
+enc/trans/utf_16_32.$(OBJEXT): internal/fl_type.h
+enc/trans/utf_16_32.$(OBJEXT): internal/gc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/glob.h
+enc/trans/utf_16_32.$(OBJEXT): internal/globals.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/attribute.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/builtin.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/c_attribute.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/cpp_attribute.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/declspec_attribute.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/extension.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/feature.h
+enc/trans/utf_16_32.$(OBJEXT): internal/has/warning.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/array.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/bignum.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/class.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/compar.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/complex.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/cont.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/dir.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/enum.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/enumerator.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/error.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/eval.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/file.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/gc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/hash.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/io.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/load.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/marshal.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/numeric.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/object.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/parse.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/proc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/process.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/random.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/range.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/rational.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/re.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/ruby.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/select.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/select/largesize.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/signal.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/sprintf.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/string.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/struct.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/thread.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/time.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/variable.h
+enc/trans/utf_16_32.$(OBJEXT): internal/intern/vm.h
+enc/trans/utf_16_32.$(OBJEXT): internal/interpreter.h
+enc/trans/utf_16_32.$(OBJEXT): internal/iterator.h
+enc/trans/utf_16_32.$(OBJEXT): internal/memory.h
+enc/trans/utf_16_32.$(OBJEXT): internal/method.h
+enc/trans/utf_16_32.$(OBJEXT): internal/module.h
+enc/trans/utf_16_32.$(OBJEXT): internal/newobj.h
+enc/trans/utf_16_32.$(OBJEXT): internal/rgengc.h
+enc/trans/utf_16_32.$(OBJEXT): internal/scan_args.h
+enc/trans/utf_16_32.$(OBJEXT): internal/special_consts.h
+enc/trans/utf_16_32.$(OBJEXT): internal/static_assert.h
+enc/trans/utf_16_32.$(OBJEXT): internal/stdalign.h
+enc/trans/utf_16_32.$(OBJEXT): internal/stdbool.h
+enc/trans/utf_16_32.$(OBJEXT): internal/symbol.h
+enc/trans/utf_16_32.$(OBJEXT): internal/value.h
+enc/trans/utf_16_32.$(OBJEXT): internal/value_type.h
+enc/trans/utf_16_32.$(OBJEXT): internal/variable.h
+enc/trans/utf_16_32.$(OBJEXT): internal/warning_push.h
+enc/trans/utf_16_32.$(OBJEXT): internal/xmalloc.h
enc/trans/utf_16_32.$(OBJEXT): missing.h
enc/trans/utf_16_32.$(OBJEXT): st.h
enc/trans/utf_16_32.$(OBJEXT): subst.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/casefold.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/name2ctype.h
+enc/unicode.$(OBJEXT): $(hdrdir)/ruby.h
enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/unicode.$(OBJEXT): $(top_srcdir)/regenc.h
enc/unicode.$(OBJEXT): $(top_srcdir)/regint.h
enc/unicode.$(OBJEXT): assert.h
+enc/unicode.$(OBJEXT): backward/2/assume.h
+enc/unicode.$(OBJEXT): backward/2/attributes.h
+enc/unicode.$(OBJEXT): backward/2/bool.h
+enc/unicode.$(OBJEXT): backward/2/inttypes.h
+enc/unicode.$(OBJEXT): backward/2/limits.h
+enc/unicode.$(OBJEXT): backward/2/long_long.h
+enc/unicode.$(OBJEXT): backward/2/stdalign.h
+enc/unicode.$(OBJEXT): backward/2/stdarg.h
enc/unicode.$(OBJEXT): config.h
enc/unicode.$(OBJEXT): defines.h
enc/unicode.$(OBJEXT): enc/unicode.c
enc/unicode.$(OBJEXT): intern.h
+enc/unicode.$(OBJEXT): internal/abi.h
+enc/unicode.$(OBJEXT): internal/anyargs.h
+enc/unicode.$(OBJEXT): internal/arithmetic.h
+enc/unicode.$(OBJEXT): internal/arithmetic/char.h
+enc/unicode.$(OBJEXT): internal/arithmetic/double.h
+enc/unicode.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/unicode.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/int.h
+enc/unicode.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/long.h
+enc/unicode.$(OBJEXT): internal/arithmetic/long_long.h
+enc/unicode.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/off_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/short.h
+enc/unicode.$(OBJEXT): internal/arithmetic/size_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/unicode.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/unicode.$(OBJEXT): internal/assume.h
+enc/unicode.$(OBJEXT): internal/attr/alloc_size.h
+enc/unicode.$(OBJEXT): internal/attr/artificial.h
+enc/unicode.$(OBJEXT): internal/attr/cold.h
+enc/unicode.$(OBJEXT): internal/attr/const.h
+enc/unicode.$(OBJEXT): internal/attr/constexpr.h
+enc/unicode.$(OBJEXT): internal/attr/deprecated.h
+enc/unicode.$(OBJEXT): internal/attr/diagnose_if.h
+enc/unicode.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/unicode.$(OBJEXT): internal/attr/error.h
+enc/unicode.$(OBJEXT): internal/attr/flag_enum.h
+enc/unicode.$(OBJEXT): internal/attr/forceinline.h
+enc/unicode.$(OBJEXT): internal/attr/format.h
+enc/unicode.$(OBJEXT): internal/attr/maybe_unused.h
+enc/unicode.$(OBJEXT): internal/attr/noalias.h
+enc/unicode.$(OBJEXT): internal/attr/nodiscard.h
+enc/unicode.$(OBJEXT): internal/attr/noexcept.h
+enc/unicode.$(OBJEXT): internal/attr/noinline.h
+enc/unicode.$(OBJEXT): internal/attr/nonnull.h
+enc/unicode.$(OBJEXT): internal/attr/noreturn.h
+enc/unicode.$(OBJEXT): internal/attr/pure.h
+enc/unicode.$(OBJEXT): internal/attr/restrict.h
+enc/unicode.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/unicode.$(OBJEXT): internal/attr/warning.h
+enc/unicode.$(OBJEXT): internal/attr/weakref.h
+enc/unicode.$(OBJEXT): internal/cast.h
+enc/unicode.$(OBJEXT): internal/compiler_is.h
+enc/unicode.$(OBJEXT): internal/compiler_is/apple.h
+enc/unicode.$(OBJEXT): internal/compiler_is/clang.h
+enc/unicode.$(OBJEXT): internal/compiler_is/gcc.h
+enc/unicode.$(OBJEXT): internal/compiler_is/intel.h
+enc/unicode.$(OBJEXT): internal/compiler_is/msvc.h
+enc/unicode.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/unicode.$(OBJEXT): internal/compiler_since.h
+enc/unicode.$(OBJEXT): internal/config.h
+enc/unicode.$(OBJEXT): internal/constant_p.h
+enc/unicode.$(OBJEXT): internal/core.h
+enc/unicode.$(OBJEXT): internal/core/rarray.h
+enc/unicode.$(OBJEXT): internal/core/rbasic.h
+enc/unicode.$(OBJEXT): internal/core/rbignum.h
+enc/unicode.$(OBJEXT): internal/core/rclass.h
+enc/unicode.$(OBJEXT): internal/core/rdata.h
+enc/unicode.$(OBJEXT): internal/core/rfile.h
+enc/unicode.$(OBJEXT): internal/core/rhash.h
+enc/unicode.$(OBJEXT): internal/core/robject.h
+enc/unicode.$(OBJEXT): internal/core/rregexp.h
+enc/unicode.$(OBJEXT): internal/core/rstring.h
+enc/unicode.$(OBJEXT): internal/core/rstruct.h
+enc/unicode.$(OBJEXT): internal/core/rtypeddata.h
+enc/unicode.$(OBJEXT): internal/ctype.h
+enc/unicode.$(OBJEXT): internal/dllexport.h
+enc/unicode.$(OBJEXT): internal/dosish.h
+enc/unicode.$(OBJEXT): internal/error.h
+enc/unicode.$(OBJEXT): internal/eval.h
+enc/unicode.$(OBJEXT): internal/event.h
+enc/unicode.$(OBJEXT): internal/fl_type.h
+enc/unicode.$(OBJEXT): internal/gc.h
+enc/unicode.$(OBJEXT): internal/glob.h
+enc/unicode.$(OBJEXT): internal/globals.h
+enc/unicode.$(OBJEXT): internal/has/attribute.h
+enc/unicode.$(OBJEXT): internal/has/builtin.h
+enc/unicode.$(OBJEXT): internal/has/c_attribute.h
+enc/unicode.$(OBJEXT): internal/has/cpp_attribute.h
+enc/unicode.$(OBJEXT): internal/has/declspec_attribute.h
+enc/unicode.$(OBJEXT): internal/has/extension.h
+enc/unicode.$(OBJEXT): internal/has/feature.h
+enc/unicode.$(OBJEXT): internal/has/warning.h
+enc/unicode.$(OBJEXT): internal/intern/array.h
+enc/unicode.$(OBJEXT): internal/intern/bignum.h
+enc/unicode.$(OBJEXT): internal/intern/class.h
+enc/unicode.$(OBJEXT): internal/intern/compar.h
+enc/unicode.$(OBJEXT): internal/intern/complex.h
+enc/unicode.$(OBJEXT): internal/intern/cont.h
+enc/unicode.$(OBJEXT): internal/intern/dir.h
+enc/unicode.$(OBJEXT): internal/intern/enum.h
+enc/unicode.$(OBJEXT): internal/intern/enumerator.h
+enc/unicode.$(OBJEXT): internal/intern/error.h
+enc/unicode.$(OBJEXT): internal/intern/eval.h
+enc/unicode.$(OBJEXT): internal/intern/file.h
+enc/unicode.$(OBJEXT): internal/intern/gc.h
+enc/unicode.$(OBJEXT): internal/intern/hash.h
+enc/unicode.$(OBJEXT): internal/intern/io.h
+enc/unicode.$(OBJEXT): internal/intern/load.h
+enc/unicode.$(OBJEXT): internal/intern/marshal.h
+enc/unicode.$(OBJEXT): internal/intern/numeric.h
+enc/unicode.$(OBJEXT): internal/intern/object.h
+enc/unicode.$(OBJEXT): internal/intern/parse.h
+enc/unicode.$(OBJEXT): internal/intern/proc.h
+enc/unicode.$(OBJEXT): internal/intern/process.h
+enc/unicode.$(OBJEXT): internal/intern/random.h
+enc/unicode.$(OBJEXT): internal/intern/range.h
+enc/unicode.$(OBJEXT): internal/intern/rational.h
+enc/unicode.$(OBJEXT): internal/intern/re.h
+enc/unicode.$(OBJEXT): internal/intern/ruby.h
+enc/unicode.$(OBJEXT): internal/intern/select.h
+enc/unicode.$(OBJEXT): internal/intern/select/largesize.h
+enc/unicode.$(OBJEXT): internal/intern/signal.h
+enc/unicode.$(OBJEXT): internal/intern/sprintf.h
+enc/unicode.$(OBJEXT): internal/intern/string.h
+enc/unicode.$(OBJEXT): internal/intern/struct.h
+enc/unicode.$(OBJEXT): internal/intern/thread.h
+enc/unicode.$(OBJEXT): internal/intern/time.h
+enc/unicode.$(OBJEXT): internal/intern/variable.h
+enc/unicode.$(OBJEXT): internal/intern/vm.h
+enc/unicode.$(OBJEXT): internal/interpreter.h
+enc/unicode.$(OBJEXT): internal/iterator.h
+enc/unicode.$(OBJEXT): internal/memory.h
+enc/unicode.$(OBJEXT): internal/method.h
+enc/unicode.$(OBJEXT): internal/module.h
+enc/unicode.$(OBJEXT): internal/newobj.h
+enc/unicode.$(OBJEXT): internal/rgengc.h
+enc/unicode.$(OBJEXT): internal/scan_args.h
+enc/unicode.$(OBJEXT): internal/special_consts.h
+enc/unicode.$(OBJEXT): internal/static_assert.h
+enc/unicode.$(OBJEXT): internal/stdalign.h
+enc/unicode.$(OBJEXT): internal/stdbool.h
+enc/unicode.$(OBJEXT): internal/symbol.h
+enc/unicode.$(OBJEXT): internal/value.h
+enc/unicode.$(OBJEXT): internal/value_type.h
+enc/unicode.$(OBJEXT): internal/variable.h
+enc/unicode.$(OBJEXT): internal/warning_push.h
+enc/unicode.$(OBJEXT): internal/xmalloc.h
enc/unicode.$(OBJEXT): missing.h
enc/unicode.$(OBJEXT): onigmo.h
enc/unicode.$(OBJEXT): st.h
enc/unicode.$(OBJEXT): subst.h
+enc/us_ascii.$(OBJEXT): $(hdrdir)/ruby.h
+enc/us_ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/us_ascii.$(OBJEXT): $(top_srcdir)/encindex.h
enc/us_ascii.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/us_ascii.$(OBJEXT): assert.h
+enc/us_ascii.$(OBJEXT): backward/2/assume.h
+enc/us_ascii.$(OBJEXT): backward/2/attributes.h
+enc/us_ascii.$(OBJEXT): backward/2/bool.h
+enc/us_ascii.$(OBJEXT): backward/2/inttypes.h
+enc/us_ascii.$(OBJEXT): backward/2/limits.h
+enc/us_ascii.$(OBJEXT): backward/2/long_long.h
+enc/us_ascii.$(OBJEXT): backward/2/stdalign.h
+enc/us_ascii.$(OBJEXT): backward/2/stdarg.h
enc/us_ascii.$(OBJEXT): config.h
enc/us_ascii.$(OBJEXT): defines.h
enc/us_ascii.$(OBJEXT): enc/us_ascii.c
+enc/us_ascii.$(OBJEXT): encoding.h
+enc/us_ascii.$(OBJEXT): intern.h
+enc/us_ascii.$(OBJEXT): internal/abi.h
+enc/us_ascii.$(OBJEXT): internal/anyargs.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/char.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/double.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/int.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/long.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/long_long.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/off_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/short.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/size_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/us_ascii.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/us_ascii.$(OBJEXT): internal/assume.h
+enc/us_ascii.$(OBJEXT): internal/attr/alloc_size.h
+enc/us_ascii.$(OBJEXT): internal/attr/artificial.h
+enc/us_ascii.$(OBJEXT): internal/attr/cold.h
+enc/us_ascii.$(OBJEXT): internal/attr/const.h
+enc/us_ascii.$(OBJEXT): internal/attr/constexpr.h
+enc/us_ascii.$(OBJEXT): internal/attr/deprecated.h
+enc/us_ascii.$(OBJEXT): internal/attr/diagnose_if.h
+enc/us_ascii.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/us_ascii.$(OBJEXT): internal/attr/error.h
+enc/us_ascii.$(OBJEXT): internal/attr/flag_enum.h
+enc/us_ascii.$(OBJEXT): internal/attr/forceinline.h
+enc/us_ascii.$(OBJEXT): internal/attr/format.h
+enc/us_ascii.$(OBJEXT): internal/attr/maybe_unused.h
+enc/us_ascii.$(OBJEXT): internal/attr/noalias.h
+enc/us_ascii.$(OBJEXT): internal/attr/nodiscard.h
+enc/us_ascii.$(OBJEXT): internal/attr/noexcept.h
+enc/us_ascii.$(OBJEXT): internal/attr/noinline.h
+enc/us_ascii.$(OBJEXT): internal/attr/nonnull.h
+enc/us_ascii.$(OBJEXT): internal/attr/noreturn.h
+enc/us_ascii.$(OBJEXT): internal/attr/pure.h
+enc/us_ascii.$(OBJEXT): internal/attr/restrict.h
+enc/us_ascii.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/us_ascii.$(OBJEXT): internal/attr/warning.h
+enc/us_ascii.$(OBJEXT): internal/attr/weakref.h
+enc/us_ascii.$(OBJEXT): internal/cast.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/apple.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/clang.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/gcc.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/intel.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/msvc.h
+enc/us_ascii.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/us_ascii.$(OBJEXT): internal/compiler_since.h
+enc/us_ascii.$(OBJEXT): internal/config.h
+enc/us_ascii.$(OBJEXT): internal/constant_p.h
+enc/us_ascii.$(OBJEXT): internal/core.h
+enc/us_ascii.$(OBJEXT): internal/core/rarray.h
+enc/us_ascii.$(OBJEXT): internal/core/rbasic.h
+enc/us_ascii.$(OBJEXT): internal/core/rbignum.h
+enc/us_ascii.$(OBJEXT): internal/core/rclass.h
+enc/us_ascii.$(OBJEXT): internal/core/rdata.h
+enc/us_ascii.$(OBJEXT): internal/core/rfile.h
+enc/us_ascii.$(OBJEXT): internal/core/rhash.h
+enc/us_ascii.$(OBJEXT): internal/core/robject.h
+enc/us_ascii.$(OBJEXT): internal/core/rregexp.h
+enc/us_ascii.$(OBJEXT): internal/core/rstring.h
+enc/us_ascii.$(OBJEXT): internal/core/rstruct.h
+enc/us_ascii.$(OBJEXT): internal/core/rtypeddata.h
+enc/us_ascii.$(OBJEXT): internal/ctype.h
+enc/us_ascii.$(OBJEXT): internal/dllexport.h
+enc/us_ascii.$(OBJEXT): internal/dosish.h
+enc/us_ascii.$(OBJEXT): internal/encoding/coderange.h
+enc/us_ascii.$(OBJEXT): internal/encoding/ctype.h
+enc/us_ascii.$(OBJEXT): internal/encoding/encoding.h
+enc/us_ascii.$(OBJEXT): internal/encoding/pathname.h
+enc/us_ascii.$(OBJEXT): internal/encoding/re.h
+enc/us_ascii.$(OBJEXT): internal/encoding/sprintf.h
+enc/us_ascii.$(OBJEXT): internal/encoding/string.h
+enc/us_ascii.$(OBJEXT): internal/encoding/symbol.h
+enc/us_ascii.$(OBJEXT): internal/encoding/transcode.h
+enc/us_ascii.$(OBJEXT): internal/error.h
+enc/us_ascii.$(OBJEXT): internal/eval.h
+enc/us_ascii.$(OBJEXT): internal/event.h
+enc/us_ascii.$(OBJEXT): internal/fl_type.h
+enc/us_ascii.$(OBJEXT): internal/gc.h
+enc/us_ascii.$(OBJEXT): internal/glob.h
+enc/us_ascii.$(OBJEXT): internal/globals.h
+enc/us_ascii.$(OBJEXT): internal/has/attribute.h
+enc/us_ascii.$(OBJEXT): internal/has/builtin.h
+enc/us_ascii.$(OBJEXT): internal/has/c_attribute.h
+enc/us_ascii.$(OBJEXT): internal/has/cpp_attribute.h
+enc/us_ascii.$(OBJEXT): internal/has/declspec_attribute.h
+enc/us_ascii.$(OBJEXT): internal/has/extension.h
+enc/us_ascii.$(OBJEXT): internal/has/feature.h
+enc/us_ascii.$(OBJEXT): internal/has/warning.h
+enc/us_ascii.$(OBJEXT): internal/intern/array.h
+enc/us_ascii.$(OBJEXT): internal/intern/bignum.h
+enc/us_ascii.$(OBJEXT): internal/intern/class.h
+enc/us_ascii.$(OBJEXT): internal/intern/compar.h
+enc/us_ascii.$(OBJEXT): internal/intern/complex.h
+enc/us_ascii.$(OBJEXT): internal/intern/cont.h
+enc/us_ascii.$(OBJEXT): internal/intern/dir.h
+enc/us_ascii.$(OBJEXT): internal/intern/enum.h
+enc/us_ascii.$(OBJEXT): internal/intern/enumerator.h
+enc/us_ascii.$(OBJEXT): internal/intern/error.h
+enc/us_ascii.$(OBJEXT): internal/intern/eval.h
+enc/us_ascii.$(OBJEXT): internal/intern/file.h
+enc/us_ascii.$(OBJEXT): internal/intern/gc.h
+enc/us_ascii.$(OBJEXT): internal/intern/hash.h
+enc/us_ascii.$(OBJEXT): internal/intern/io.h
+enc/us_ascii.$(OBJEXT): internal/intern/load.h
+enc/us_ascii.$(OBJEXT): internal/intern/marshal.h
+enc/us_ascii.$(OBJEXT): internal/intern/numeric.h
+enc/us_ascii.$(OBJEXT): internal/intern/object.h
+enc/us_ascii.$(OBJEXT): internal/intern/parse.h
+enc/us_ascii.$(OBJEXT): internal/intern/proc.h
+enc/us_ascii.$(OBJEXT): internal/intern/process.h
+enc/us_ascii.$(OBJEXT): internal/intern/random.h
+enc/us_ascii.$(OBJEXT): internal/intern/range.h
+enc/us_ascii.$(OBJEXT): internal/intern/rational.h
+enc/us_ascii.$(OBJEXT): internal/intern/re.h
+enc/us_ascii.$(OBJEXT): internal/intern/ruby.h
+enc/us_ascii.$(OBJEXT): internal/intern/select.h
+enc/us_ascii.$(OBJEXT): internal/intern/select/largesize.h
+enc/us_ascii.$(OBJEXT): internal/intern/signal.h
+enc/us_ascii.$(OBJEXT): internal/intern/sprintf.h
+enc/us_ascii.$(OBJEXT): internal/intern/string.h
+enc/us_ascii.$(OBJEXT): internal/intern/struct.h
+enc/us_ascii.$(OBJEXT): internal/intern/thread.h
+enc/us_ascii.$(OBJEXT): internal/intern/time.h
+enc/us_ascii.$(OBJEXT): internal/intern/variable.h
+enc/us_ascii.$(OBJEXT): internal/intern/vm.h
+enc/us_ascii.$(OBJEXT): internal/interpreter.h
+enc/us_ascii.$(OBJEXT): internal/iterator.h
+enc/us_ascii.$(OBJEXT): internal/memory.h
+enc/us_ascii.$(OBJEXT): internal/method.h
+enc/us_ascii.$(OBJEXT): internal/module.h
+enc/us_ascii.$(OBJEXT): internal/newobj.h
+enc/us_ascii.$(OBJEXT): internal/rgengc.h
+enc/us_ascii.$(OBJEXT): internal/scan_args.h
+enc/us_ascii.$(OBJEXT): internal/special_consts.h
+enc/us_ascii.$(OBJEXT): internal/static_assert.h
+enc/us_ascii.$(OBJEXT): internal/stdalign.h
+enc/us_ascii.$(OBJEXT): internal/stdbool.h
+enc/us_ascii.$(OBJEXT): internal/symbol.h
+enc/us_ascii.$(OBJEXT): internal/value.h
+enc/us_ascii.$(OBJEXT): internal/value_type.h
+enc/us_ascii.$(OBJEXT): internal/variable.h
+enc/us_ascii.$(OBJEXT): internal/warning_push.h
+enc/us_ascii.$(OBJEXT): internal/xmalloc.h
enc/us_ascii.$(OBJEXT): missing.h
enc/us_ascii.$(OBJEXT): onigmo.h
+enc/us_ascii.$(OBJEXT): oniguruma.h
+enc/us_ascii.$(OBJEXT): st.h
+enc/us_ascii.$(OBJEXT): subst.h
+enc/utf_16be.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_16be.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/utf_16be.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/utf_16be.$(OBJEXT): assert.h
+enc/utf_16be.$(OBJEXT): backward.h
+enc/utf_16be.$(OBJEXT): backward/2/assume.h
+enc/utf_16be.$(OBJEXT): backward/2/attributes.h
+enc/utf_16be.$(OBJEXT): backward/2/bool.h
+enc/utf_16be.$(OBJEXT): backward/2/inttypes.h
+enc/utf_16be.$(OBJEXT): backward/2/limits.h
+enc/utf_16be.$(OBJEXT): backward/2/long_long.h
+enc/utf_16be.$(OBJEXT): backward/2/stdalign.h
+enc/utf_16be.$(OBJEXT): backward/2/stdarg.h
enc/utf_16be.$(OBJEXT): config.h
enc/utf_16be.$(OBJEXT): defines.h
enc/utf_16be.$(OBJEXT): enc/iso_8859.h
enc/utf_16be.$(OBJEXT): enc/utf_16be.c
+enc/utf_16be.$(OBJEXT): intern.h
+enc/utf_16be.$(OBJEXT): internal/abi.h
+enc/utf_16be.$(OBJEXT): internal/anyargs.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/char.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/double.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/int.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/long.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/long_long.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/off_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/short.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/size_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/utf_16be.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/utf_16be.$(OBJEXT): internal/assume.h
+enc/utf_16be.$(OBJEXT): internal/attr/alloc_size.h
+enc/utf_16be.$(OBJEXT): internal/attr/artificial.h
+enc/utf_16be.$(OBJEXT): internal/attr/cold.h
+enc/utf_16be.$(OBJEXT): internal/attr/const.h
+enc/utf_16be.$(OBJEXT): internal/attr/constexpr.h
+enc/utf_16be.$(OBJEXT): internal/attr/deprecated.h
+enc/utf_16be.$(OBJEXT): internal/attr/diagnose_if.h
+enc/utf_16be.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/utf_16be.$(OBJEXT): internal/attr/error.h
+enc/utf_16be.$(OBJEXT): internal/attr/flag_enum.h
+enc/utf_16be.$(OBJEXT): internal/attr/forceinline.h
+enc/utf_16be.$(OBJEXT): internal/attr/format.h
+enc/utf_16be.$(OBJEXT): internal/attr/maybe_unused.h
+enc/utf_16be.$(OBJEXT): internal/attr/noalias.h
+enc/utf_16be.$(OBJEXT): internal/attr/nodiscard.h
+enc/utf_16be.$(OBJEXT): internal/attr/noexcept.h
+enc/utf_16be.$(OBJEXT): internal/attr/noinline.h
+enc/utf_16be.$(OBJEXT): internal/attr/nonnull.h
+enc/utf_16be.$(OBJEXT): internal/attr/noreturn.h
+enc/utf_16be.$(OBJEXT): internal/attr/pure.h
+enc/utf_16be.$(OBJEXT): internal/attr/restrict.h
+enc/utf_16be.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/utf_16be.$(OBJEXT): internal/attr/warning.h
+enc/utf_16be.$(OBJEXT): internal/attr/weakref.h
+enc/utf_16be.$(OBJEXT): internal/cast.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/apple.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/clang.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/gcc.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/intel.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/msvc.h
+enc/utf_16be.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/utf_16be.$(OBJEXT): internal/compiler_since.h
+enc/utf_16be.$(OBJEXT): internal/config.h
+enc/utf_16be.$(OBJEXT): internal/constant_p.h
+enc/utf_16be.$(OBJEXT): internal/core.h
+enc/utf_16be.$(OBJEXT): internal/core/rarray.h
+enc/utf_16be.$(OBJEXT): internal/core/rbasic.h
+enc/utf_16be.$(OBJEXT): internal/core/rbignum.h
+enc/utf_16be.$(OBJEXT): internal/core/rclass.h
+enc/utf_16be.$(OBJEXT): internal/core/rdata.h
+enc/utf_16be.$(OBJEXT): internal/core/rfile.h
+enc/utf_16be.$(OBJEXT): internal/core/rhash.h
+enc/utf_16be.$(OBJEXT): internal/core/robject.h
+enc/utf_16be.$(OBJEXT): internal/core/rregexp.h
+enc/utf_16be.$(OBJEXT): internal/core/rstring.h
+enc/utf_16be.$(OBJEXT): internal/core/rstruct.h
+enc/utf_16be.$(OBJEXT): internal/core/rtypeddata.h
+enc/utf_16be.$(OBJEXT): internal/ctype.h
+enc/utf_16be.$(OBJEXT): internal/dllexport.h
+enc/utf_16be.$(OBJEXT): internal/dosish.h
+enc/utf_16be.$(OBJEXT): internal/error.h
+enc/utf_16be.$(OBJEXT): internal/eval.h
+enc/utf_16be.$(OBJEXT): internal/event.h
+enc/utf_16be.$(OBJEXT): internal/fl_type.h
+enc/utf_16be.$(OBJEXT): internal/gc.h
+enc/utf_16be.$(OBJEXT): internal/glob.h
+enc/utf_16be.$(OBJEXT): internal/globals.h
+enc/utf_16be.$(OBJEXT): internal/has/attribute.h
+enc/utf_16be.$(OBJEXT): internal/has/builtin.h
+enc/utf_16be.$(OBJEXT): internal/has/c_attribute.h
+enc/utf_16be.$(OBJEXT): internal/has/cpp_attribute.h
+enc/utf_16be.$(OBJEXT): internal/has/declspec_attribute.h
+enc/utf_16be.$(OBJEXT): internal/has/extension.h
+enc/utf_16be.$(OBJEXT): internal/has/feature.h
+enc/utf_16be.$(OBJEXT): internal/has/warning.h
+enc/utf_16be.$(OBJEXT): internal/intern/array.h
+enc/utf_16be.$(OBJEXT): internal/intern/bignum.h
+enc/utf_16be.$(OBJEXT): internal/intern/class.h
+enc/utf_16be.$(OBJEXT): internal/intern/compar.h
+enc/utf_16be.$(OBJEXT): internal/intern/complex.h
+enc/utf_16be.$(OBJEXT): internal/intern/cont.h
+enc/utf_16be.$(OBJEXT): internal/intern/dir.h
+enc/utf_16be.$(OBJEXT): internal/intern/enum.h
+enc/utf_16be.$(OBJEXT): internal/intern/enumerator.h
+enc/utf_16be.$(OBJEXT): internal/intern/error.h
+enc/utf_16be.$(OBJEXT): internal/intern/eval.h
+enc/utf_16be.$(OBJEXT): internal/intern/file.h
+enc/utf_16be.$(OBJEXT): internal/intern/gc.h
+enc/utf_16be.$(OBJEXT): internal/intern/hash.h
+enc/utf_16be.$(OBJEXT): internal/intern/io.h
+enc/utf_16be.$(OBJEXT): internal/intern/load.h
+enc/utf_16be.$(OBJEXT): internal/intern/marshal.h
+enc/utf_16be.$(OBJEXT): internal/intern/numeric.h
+enc/utf_16be.$(OBJEXT): internal/intern/object.h
+enc/utf_16be.$(OBJEXT): internal/intern/parse.h
+enc/utf_16be.$(OBJEXT): internal/intern/proc.h
+enc/utf_16be.$(OBJEXT): internal/intern/process.h
+enc/utf_16be.$(OBJEXT): internal/intern/random.h
+enc/utf_16be.$(OBJEXT): internal/intern/range.h
+enc/utf_16be.$(OBJEXT): internal/intern/rational.h
+enc/utf_16be.$(OBJEXT): internal/intern/re.h
+enc/utf_16be.$(OBJEXT): internal/intern/ruby.h
+enc/utf_16be.$(OBJEXT): internal/intern/select.h
+enc/utf_16be.$(OBJEXT): internal/intern/select/largesize.h
+enc/utf_16be.$(OBJEXT): internal/intern/signal.h
+enc/utf_16be.$(OBJEXT): internal/intern/sprintf.h
+enc/utf_16be.$(OBJEXT): internal/intern/string.h
+enc/utf_16be.$(OBJEXT): internal/intern/struct.h
+enc/utf_16be.$(OBJEXT): internal/intern/thread.h
+enc/utf_16be.$(OBJEXT): internal/intern/time.h
+enc/utf_16be.$(OBJEXT): internal/intern/variable.h
+enc/utf_16be.$(OBJEXT): internal/intern/vm.h
+enc/utf_16be.$(OBJEXT): internal/interpreter.h
+enc/utf_16be.$(OBJEXT): internal/iterator.h
+enc/utf_16be.$(OBJEXT): internal/memory.h
+enc/utf_16be.$(OBJEXT): internal/method.h
+enc/utf_16be.$(OBJEXT): internal/module.h
+enc/utf_16be.$(OBJEXT): internal/newobj.h
+enc/utf_16be.$(OBJEXT): internal/rgengc.h
+enc/utf_16be.$(OBJEXT): internal/scan_args.h
+enc/utf_16be.$(OBJEXT): internal/special_consts.h
+enc/utf_16be.$(OBJEXT): internal/static_assert.h
+enc/utf_16be.$(OBJEXT): internal/stdalign.h
+enc/utf_16be.$(OBJEXT): internal/stdbool.h
+enc/utf_16be.$(OBJEXT): internal/symbol.h
+enc/utf_16be.$(OBJEXT): internal/value.h
+enc/utf_16be.$(OBJEXT): internal/value_type.h
+enc/utf_16be.$(OBJEXT): internal/variable.h
+enc/utf_16be.$(OBJEXT): internal/warning_push.h
+enc/utf_16be.$(OBJEXT): internal/xmalloc.h
enc/utf_16be.$(OBJEXT): missing.h
enc/utf_16be.$(OBJEXT): onigmo.h
+enc/utf_16be.$(OBJEXT): st.h
+enc/utf_16be.$(OBJEXT): subst.h
+enc/utf_16le.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_16le.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/utf_16le.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/utf_16le.$(OBJEXT): assert.h
+enc/utf_16le.$(OBJEXT): backward.h
+enc/utf_16le.$(OBJEXT): backward/2/assume.h
+enc/utf_16le.$(OBJEXT): backward/2/attributes.h
+enc/utf_16le.$(OBJEXT): backward/2/bool.h
+enc/utf_16le.$(OBJEXT): backward/2/inttypes.h
+enc/utf_16le.$(OBJEXT): backward/2/limits.h
+enc/utf_16le.$(OBJEXT): backward/2/long_long.h
+enc/utf_16le.$(OBJEXT): backward/2/stdalign.h
+enc/utf_16le.$(OBJEXT): backward/2/stdarg.h
enc/utf_16le.$(OBJEXT): config.h
enc/utf_16le.$(OBJEXT): defines.h
enc/utf_16le.$(OBJEXT): enc/iso_8859.h
enc/utf_16le.$(OBJEXT): enc/utf_16le.c
+enc/utf_16le.$(OBJEXT): intern.h
+enc/utf_16le.$(OBJEXT): internal/abi.h
+enc/utf_16le.$(OBJEXT): internal/anyargs.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/char.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/double.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/int.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/long.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/long_long.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/off_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/short.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/size_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/utf_16le.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/utf_16le.$(OBJEXT): internal/assume.h
+enc/utf_16le.$(OBJEXT): internal/attr/alloc_size.h
+enc/utf_16le.$(OBJEXT): internal/attr/artificial.h
+enc/utf_16le.$(OBJEXT): internal/attr/cold.h
+enc/utf_16le.$(OBJEXT): internal/attr/const.h
+enc/utf_16le.$(OBJEXT): internal/attr/constexpr.h
+enc/utf_16le.$(OBJEXT): internal/attr/deprecated.h
+enc/utf_16le.$(OBJEXT): internal/attr/diagnose_if.h
+enc/utf_16le.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/utf_16le.$(OBJEXT): internal/attr/error.h
+enc/utf_16le.$(OBJEXT): internal/attr/flag_enum.h
+enc/utf_16le.$(OBJEXT): internal/attr/forceinline.h
+enc/utf_16le.$(OBJEXT): internal/attr/format.h
+enc/utf_16le.$(OBJEXT): internal/attr/maybe_unused.h
+enc/utf_16le.$(OBJEXT): internal/attr/noalias.h
+enc/utf_16le.$(OBJEXT): internal/attr/nodiscard.h
+enc/utf_16le.$(OBJEXT): internal/attr/noexcept.h
+enc/utf_16le.$(OBJEXT): internal/attr/noinline.h
+enc/utf_16le.$(OBJEXT): internal/attr/nonnull.h
+enc/utf_16le.$(OBJEXT): internal/attr/noreturn.h
+enc/utf_16le.$(OBJEXT): internal/attr/pure.h
+enc/utf_16le.$(OBJEXT): internal/attr/restrict.h
+enc/utf_16le.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/utf_16le.$(OBJEXT): internal/attr/warning.h
+enc/utf_16le.$(OBJEXT): internal/attr/weakref.h
+enc/utf_16le.$(OBJEXT): internal/cast.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/apple.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/clang.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/gcc.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/intel.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/msvc.h
+enc/utf_16le.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/utf_16le.$(OBJEXT): internal/compiler_since.h
+enc/utf_16le.$(OBJEXT): internal/config.h
+enc/utf_16le.$(OBJEXT): internal/constant_p.h
+enc/utf_16le.$(OBJEXT): internal/core.h
+enc/utf_16le.$(OBJEXT): internal/core/rarray.h
+enc/utf_16le.$(OBJEXT): internal/core/rbasic.h
+enc/utf_16le.$(OBJEXT): internal/core/rbignum.h
+enc/utf_16le.$(OBJEXT): internal/core/rclass.h
+enc/utf_16le.$(OBJEXT): internal/core/rdata.h
+enc/utf_16le.$(OBJEXT): internal/core/rfile.h
+enc/utf_16le.$(OBJEXT): internal/core/rhash.h
+enc/utf_16le.$(OBJEXT): internal/core/robject.h
+enc/utf_16le.$(OBJEXT): internal/core/rregexp.h
+enc/utf_16le.$(OBJEXT): internal/core/rstring.h
+enc/utf_16le.$(OBJEXT): internal/core/rstruct.h
+enc/utf_16le.$(OBJEXT): internal/core/rtypeddata.h
+enc/utf_16le.$(OBJEXT): internal/ctype.h
+enc/utf_16le.$(OBJEXT): internal/dllexport.h
+enc/utf_16le.$(OBJEXT): internal/dosish.h
+enc/utf_16le.$(OBJEXT): internal/error.h
+enc/utf_16le.$(OBJEXT): internal/eval.h
+enc/utf_16le.$(OBJEXT): internal/event.h
+enc/utf_16le.$(OBJEXT): internal/fl_type.h
+enc/utf_16le.$(OBJEXT): internal/gc.h
+enc/utf_16le.$(OBJEXT): internal/glob.h
+enc/utf_16le.$(OBJEXT): internal/globals.h
+enc/utf_16le.$(OBJEXT): internal/has/attribute.h
+enc/utf_16le.$(OBJEXT): internal/has/builtin.h
+enc/utf_16le.$(OBJEXT): internal/has/c_attribute.h
+enc/utf_16le.$(OBJEXT): internal/has/cpp_attribute.h
+enc/utf_16le.$(OBJEXT): internal/has/declspec_attribute.h
+enc/utf_16le.$(OBJEXT): internal/has/extension.h
+enc/utf_16le.$(OBJEXT): internal/has/feature.h
+enc/utf_16le.$(OBJEXT): internal/has/warning.h
+enc/utf_16le.$(OBJEXT): internal/intern/array.h
+enc/utf_16le.$(OBJEXT): internal/intern/bignum.h
+enc/utf_16le.$(OBJEXT): internal/intern/class.h
+enc/utf_16le.$(OBJEXT): internal/intern/compar.h
+enc/utf_16le.$(OBJEXT): internal/intern/complex.h
+enc/utf_16le.$(OBJEXT): internal/intern/cont.h
+enc/utf_16le.$(OBJEXT): internal/intern/dir.h
+enc/utf_16le.$(OBJEXT): internal/intern/enum.h
+enc/utf_16le.$(OBJEXT): internal/intern/enumerator.h
+enc/utf_16le.$(OBJEXT): internal/intern/error.h
+enc/utf_16le.$(OBJEXT): internal/intern/eval.h
+enc/utf_16le.$(OBJEXT): internal/intern/file.h
+enc/utf_16le.$(OBJEXT): internal/intern/gc.h
+enc/utf_16le.$(OBJEXT): internal/intern/hash.h
+enc/utf_16le.$(OBJEXT): internal/intern/io.h
+enc/utf_16le.$(OBJEXT): internal/intern/load.h
+enc/utf_16le.$(OBJEXT): internal/intern/marshal.h
+enc/utf_16le.$(OBJEXT): internal/intern/numeric.h
+enc/utf_16le.$(OBJEXT): internal/intern/object.h
+enc/utf_16le.$(OBJEXT): internal/intern/parse.h
+enc/utf_16le.$(OBJEXT): internal/intern/proc.h
+enc/utf_16le.$(OBJEXT): internal/intern/process.h
+enc/utf_16le.$(OBJEXT): internal/intern/random.h
+enc/utf_16le.$(OBJEXT): internal/intern/range.h
+enc/utf_16le.$(OBJEXT): internal/intern/rational.h
+enc/utf_16le.$(OBJEXT): internal/intern/re.h
+enc/utf_16le.$(OBJEXT): internal/intern/ruby.h
+enc/utf_16le.$(OBJEXT): internal/intern/select.h
+enc/utf_16le.$(OBJEXT): internal/intern/select/largesize.h
+enc/utf_16le.$(OBJEXT): internal/intern/signal.h
+enc/utf_16le.$(OBJEXT): internal/intern/sprintf.h
+enc/utf_16le.$(OBJEXT): internal/intern/string.h
+enc/utf_16le.$(OBJEXT): internal/intern/struct.h
+enc/utf_16le.$(OBJEXT): internal/intern/thread.h
+enc/utf_16le.$(OBJEXT): internal/intern/time.h
+enc/utf_16le.$(OBJEXT): internal/intern/variable.h
+enc/utf_16le.$(OBJEXT): internal/intern/vm.h
+enc/utf_16le.$(OBJEXT): internal/interpreter.h
+enc/utf_16le.$(OBJEXT): internal/iterator.h
+enc/utf_16le.$(OBJEXT): internal/memory.h
+enc/utf_16le.$(OBJEXT): internal/method.h
+enc/utf_16le.$(OBJEXT): internal/module.h
+enc/utf_16le.$(OBJEXT): internal/newobj.h
+enc/utf_16le.$(OBJEXT): internal/rgengc.h
+enc/utf_16le.$(OBJEXT): internal/scan_args.h
+enc/utf_16le.$(OBJEXT): internal/special_consts.h
+enc/utf_16le.$(OBJEXT): internal/static_assert.h
+enc/utf_16le.$(OBJEXT): internal/stdalign.h
+enc/utf_16le.$(OBJEXT): internal/stdbool.h
+enc/utf_16le.$(OBJEXT): internal/symbol.h
+enc/utf_16le.$(OBJEXT): internal/value.h
+enc/utf_16le.$(OBJEXT): internal/value_type.h
+enc/utf_16le.$(OBJEXT): internal/variable.h
+enc/utf_16le.$(OBJEXT): internal/warning_push.h
+enc/utf_16le.$(OBJEXT): internal/xmalloc.h
enc/utf_16le.$(OBJEXT): missing.h
enc/utf_16le.$(OBJEXT): onigmo.h
+enc/utf_16le.$(OBJEXT): st.h
+enc/utf_16le.$(OBJEXT): subst.h
+enc/utf_32be.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_32be.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/utf_32be.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/utf_32be.$(OBJEXT): assert.h
+enc/utf_32be.$(OBJEXT): backward.h
+enc/utf_32be.$(OBJEXT): backward/2/assume.h
+enc/utf_32be.$(OBJEXT): backward/2/attributes.h
+enc/utf_32be.$(OBJEXT): backward/2/bool.h
+enc/utf_32be.$(OBJEXT): backward/2/inttypes.h
+enc/utf_32be.$(OBJEXT): backward/2/limits.h
+enc/utf_32be.$(OBJEXT): backward/2/long_long.h
+enc/utf_32be.$(OBJEXT): backward/2/stdalign.h
+enc/utf_32be.$(OBJEXT): backward/2/stdarg.h
enc/utf_32be.$(OBJEXT): config.h
enc/utf_32be.$(OBJEXT): defines.h
enc/utf_32be.$(OBJEXT): enc/iso_8859.h
enc/utf_32be.$(OBJEXT): enc/utf_32be.c
+enc/utf_32be.$(OBJEXT): intern.h
+enc/utf_32be.$(OBJEXT): internal/abi.h
+enc/utf_32be.$(OBJEXT): internal/anyargs.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/char.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/double.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/int.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/long.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/long_long.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/off_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/short.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/size_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/utf_32be.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/utf_32be.$(OBJEXT): internal/assume.h
+enc/utf_32be.$(OBJEXT): internal/attr/alloc_size.h
+enc/utf_32be.$(OBJEXT): internal/attr/artificial.h
+enc/utf_32be.$(OBJEXT): internal/attr/cold.h
+enc/utf_32be.$(OBJEXT): internal/attr/const.h
+enc/utf_32be.$(OBJEXT): internal/attr/constexpr.h
+enc/utf_32be.$(OBJEXT): internal/attr/deprecated.h
+enc/utf_32be.$(OBJEXT): internal/attr/diagnose_if.h
+enc/utf_32be.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/utf_32be.$(OBJEXT): internal/attr/error.h
+enc/utf_32be.$(OBJEXT): internal/attr/flag_enum.h
+enc/utf_32be.$(OBJEXT): internal/attr/forceinline.h
+enc/utf_32be.$(OBJEXT): internal/attr/format.h
+enc/utf_32be.$(OBJEXT): internal/attr/maybe_unused.h
+enc/utf_32be.$(OBJEXT): internal/attr/noalias.h
+enc/utf_32be.$(OBJEXT): internal/attr/nodiscard.h
+enc/utf_32be.$(OBJEXT): internal/attr/noexcept.h
+enc/utf_32be.$(OBJEXT): internal/attr/noinline.h
+enc/utf_32be.$(OBJEXT): internal/attr/nonnull.h
+enc/utf_32be.$(OBJEXT): internal/attr/noreturn.h
+enc/utf_32be.$(OBJEXT): internal/attr/pure.h
+enc/utf_32be.$(OBJEXT): internal/attr/restrict.h
+enc/utf_32be.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/utf_32be.$(OBJEXT): internal/attr/warning.h
+enc/utf_32be.$(OBJEXT): internal/attr/weakref.h
+enc/utf_32be.$(OBJEXT): internal/cast.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/apple.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/clang.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/gcc.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/intel.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/msvc.h
+enc/utf_32be.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/utf_32be.$(OBJEXT): internal/compiler_since.h
+enc/utf_32be.$(OBJEXT): internal/config.h
+enc/utf_32be.$(OBJEXT): internal/constant_p.h
+enc/utf_32be.$(OBJEXT): internal/core.h
+enc/utf_32be.$(OBJEXT): internal/core/rarray.h
+enc/utf_32be.$(OBJEXT): internal/core/rbasic.h
+enc/utf_32be.$(OBJEXT): internal/core/rbignum.h
+enc/utf_32be.$(OBJEXT): internal/core/rclass.h
+enc/utf_32be.$(OBJEXT): internal/core/rdata.h
+enc/utf_32be.$(OBJEXT): internal/core/rfile.h
+enc/utf_32be.$(OBJEXT): internal/core/rhash.h
+enc/utf_32be.$(OBJEXT): internal/core/robject.h
+enc/utf_32be.$(OBJEXT): internal/core/rregexp.h
+enc/utf_32be.$(OBJEXT): internal/core/rstring.h
+enc/utf_32be.$(OBJEXT): internal/core/rstruct.h
+enc/utf_32be.$(OBJEXT): internal/core/rtypeddata.h
+enc/utf_32be.$(OBJEXT): internal/ctype.h
+enc/utf_32be.$(OBJEXT): internal/dllexport.h
+enc/utf_32be.$(OBJEXT): internal/dosish.h
+enc/utf_32be.$(OBJEXT): internal/error.h
+enc/utf_32be.$(OBJEXT): internal/eval.h
+enc/utf_32be.$(OBJEXT): internal/event.h
+enc/utf_32be.$(OBJEXT): internal/fl_type.h
+enc/utf_32be.$(OBJEXT): internal/gc.h
+enc/utf_32be.$(OBJEXT): internal/glob.h
+enc/utf_32be.$(OBJEXT): internal/globals.h
+enc/utf_32be.$(OBJEXT): internal/has/attribute.h
+enc/utf_32be.$(OBJEXT): internal/has/builtin.h
+enc/utf_32be.$(OBJEXT): internal/has/c_attribute.h
+enc/utf_32be.$(OBJEXT): internal/has/cpp_attribute.h
+enc/utf_32be.$(OBJEXT): internal/has/declspec_attribute.h
+enc/utf_32be.$(OBJEXT): internal/has/extension.h
+enc/utf_32be.$(OBJEXT): internal/has/feature.h
+enc/utf_32be.$(OBJEXT): internal/has/warning.h
+enc/utf_32be.$(OBJEXT): internal/intern/array.h
+enc/utf_32be.$(OBJEXT): internal/intern/bignum.h
+enc/utf_32be.$(OBJEXT): internal/intern/class.h
+enc/utf_32be.$(OBJEXT): internal/intern/compar.h
+enc/utf_32be.$(OBJEXT): internal/intern/complex.h
+enc/utf_32be.$(OBJEXT): internal/intern/cont.h
+enc/utf_32be.$(OBJEXT): internal/intern/dir.h
+enc/utf_32be.$(OBJEXT): internal/intern/enum.h
+enc/utf_32be.$(OBJEXT): internal/intern/enumerator.h
+enc/utf_32be.$(OBJEXT): internal/intern/error.h
+enc/utf_32be.$(OBJEXT): internal/intern/eval.h
+enc/utf_32be.$(OBJEXT): internal/intern/file.h
+enc/utf_32be.$(OBJEXT): internal/intern/gc.h
+enc/utf_32be.$(OBJEXT): internal/intern/hash.h
+enc/utf_32be.$(OBJEXT): internal/intern/io.h
+enc/utf_32be.$(OBJEXT): internal/intern/load.h
+enc/utf_32be.$(OBJEXT): internal/intern/marshal.h
+enc/utf_32be.$(OBJEXT): internal/intern/numeric.h
+enc/utf_32be.$(OBJEXT): internal/intern/object.h
+enc/utf_32be.$(OBJEXT): internal/intern/parse.h
+enc/utf_32be.$(OBJEXT): internal/intern/proc.h
+enc/utf_32be.$(OBJEXT): internal/intern/process.h
+enc/utf_32be.$(OBJEXT): internal/intern/random.h
+enc/utf_32be.$(OBJEXT): internal/intern/range.h
+enc/utf_32be.$(OBJEXT): internal/intern/rational.h
+enc/utf_32be.$(OBJEXT): internal/intern/re.h
+enc/utf_32be.$(OBJEXT): internal/intern/ruby.h
+enc/utf_32be.$(OBJEXT): internal/intern/select.h
+enc/utf_32be.$(OBJEXT): internal/intern/select/largesize.h
+enc/utf_32be.$(OBJEXT): internal/intern/signal.h
+enc/utf_32be.$(OBJEXT): internal/intern/sprintf.h
+enc/utf_32be.$(OBJEXT): internal/intern/string.h
+enc/utf_32be.$(OBJEXT): internal/intern/struct.h
+enc/utf_32be.$(OBJEXT): internal/intern/thread.h
+enc/utf_32be.$(OBJEXT): internal/intern/time.h
+enc/utf_32be.$(OBJEXT): internal/intern/variable.h
+enc/utf_32be.$(OBJEXT): internal/intern/vm.h
+enc/utf_32be.$(OBJEXT): internal/interpreter.h
+enc/utf_32be.$(OBJEXT): internal/iterator.h
+enc/utf_32be.$(OBJEXT): internal/memory.h
+enc/utf_32be.$(OBJEXT): internal/method.h
+enc/utf_32be.$(OBJEXT): internal/module.h
+enc/utf_32be.$(OBJEXT): internal/newobj.h
+enc/utf_32be.$(OBJEXT): internal/rgengc.h
+enc/utf_32be.$(OBJEXT): internal/scan_args.h
+enc/utf_32be.$(OBJEXT): internal/special_consts.h
+enc/utf_32be.$(OBJEXT): internal/static_assert.h
+enc/utf_32be.$(OBJEXT): internal/stdalign.h
+enc/utf_32be.$(OBJEXT): internal/stdbool.h
+enc/utf_32be.$(OBJEXT): internal/symbol.h
+enc/utf_32be.$(OBJEXT): internal/value.h
+enc/utf_32be.$(OBJEXT): internal/value_type.h
+enc/utf_32be.$(OBJEXT): internal/variable.h
+enc/utf_32be.$(OBJEXT): internal/warning_push.h
+enc/utf_32be.$(OBJEXT): internal/xmalloc.h
enc/utf_32be.$(OBJEXT): missing.h
enc/utf_32be.$(OBJEXT): onigmo.h
+enc/utf_32be.$(OBJEXT): st.h
+enc/utf_32be.$(OBJEXT): subst.h
+enc/utf_32le.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_32le.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/utf_32le.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/utf_32le.$(OBJEXT): assert.h
+enc/utf_32le.$(OBJEXT): backward.h
+enc/utf_32le.$(OBJEXT): backward/2/assume.h
+enc/utf_32le.$(OBJEXT): backward/2/attributes.h
+enc/utf_32le.$(OBJEXT): backward/2/bool.h
+enc/utf_32le.$(OBJEXT): backward/2/inttypes.h
+enc/utf_32le.$(OBJEXT): backward/2/limits.h
+enc/utf_32le.$(OBJEXT): backward/2/long_long.h
+enc/utf_32le.$(OBJEXT): backward/2/stdalign.h
+enc/utf_32le.$(OBJEXT): backward/2/stdarg.h
enc/utf_32le.$(OBJEXT): config.h
enc/utf_32le.$(OBJEXT): defines.h
enc/utf_32le.$(OBJEXT): enc/iso_8859.h
enc/utf_32le.$(OBJEXT): enc/utf_32le.c
+enc/utf_32le.$(OBJEXT): intern.h
+enc/utf_32le.$(OBJEXT): internal/abi.h
+enc/utf_32le.$(OBJEXT): internal/anyargs.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/char.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/double.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/int.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/long.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/long_long.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/off_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/short.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/size_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/utf_32le.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/utf_32le.$(OBJEXT): internal/assume.h
+enc/utf_32le.$(OBJEXT): internal/attr/alloc_size.h
+enc/utf_32le.$(OBJEXT): internal/attr/artificial.h
+enc/utf_32le.$(OBJEXT): internal/attr/cold.h
+enc/utf_32le.$(OBJEXT): internal/attr/const.h
+enc/utf_32le.$(OBJEXT): internal/attr/constexpr.h
+enc/utf_32le.$(OBJEXT): internal/attr/deprecated.h
+enc/utf_32le.$(OBJEXT): internal/attr/diagnose_if.h
+enc/utf_32le.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/utf_32le.$(OBJEXT): internal/attr/error.h
+enc/utf_32le.$(OBJEXT): internal/attr/flag_enum.h
+enc/utf_32le.$(OBJEXT): internal/attr/forceinline.h
+enc/utf_32le.$(OBJEXT): internal/attr/format.h
+enc/utf_32le.$(OBJEXT): internal/attr/maybe_unused.h
+enc/utf_32le.$(OBJEXT): internal/attr/noalias.h
+enc/utf_32le.$(OBJEXT): internal/attr/nodiscard.h
+enc/utf_32le.$(OBJEXT): internal/attr/noexcept.h
+enc/utf_32le.$(OBJEXT): internal/attr/noinline.h
+enc/utf_32le.$(OBJEXT): internal/attr/nonnull.h
+enc/utf_32le.$(OBJEXT): internal/attr/noreturn.h
+enc/utf_32le.$(OBJEXT): internal/attr/pure.h
+enc/utf_32le.$(OBJEXT): internal/attr/restrict.h
+enc/utf_32le.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/utf_32le.$(OBJEXT): internal/attr/warning.h
+enc/utf_32le.$(OBJEXT): internal/attr/weakref.h
+enc/utf_32le.$(OBJEXT): internal/cast.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/apple.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/clang.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/gcc.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/intel.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/msvc.h
+enc/utf_32le.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/utf_32le.$(OBJEXT): internal/compiler_since.h
+enc/utf_32le.$(OBJEXT): internal/config.h
+enc/utf_32le.$(OBJEXT): internal/constant_p.h
+enc/utf_32le.$(OBJEXT): internal/core.h
+enc/utf_32le.$(OBJEXT): internal/core/rarray.h
+enc/utf_32le.$(OBJEXT): internal/core/rbasic.h
+enc/utf_32le.$(OBJEXT): internal/core/rbignum.h
+enc/utf_32le.$(OBJEXT): internal/core/rclass.h
+enc/utf_32le.$(OBJEXT): internal/core/rdata.h
+enc/utf_32le.$(OBJEXT): internal/core/rfile.h
+enc/utf_32le.$(OBJEXT): internal/core/rhash.h
+enc/utf_32le.$(OBJEXT): internal/core/robject.h
+enc/utf_32le.$(OBJEXT): internal/core/rregexp.h
+enc/utf_32le.$(OBJEXT): internal/core/rstring.h
+enc/utf_32le.$(OBJEXT): internal/core/rstruct.h
+enc/utf_32le.$(OBJEXT): internal/core/rtypeddata.h
+enc/utf_32le.$(OBJEXT): internal/ctype.h
+enc/utf_32le.$(OBJEXT): internal/dllexport.h
+enc/utf_32le.$(OBJEXT): internal/dosish.h
+enc/utf_32le.$(OBJEXT): internal/error.h
+enc/utf_32le.$(OBJEXT): internal/eval.h
+enc/utf_32le.$(OBJEXT): internal/event.h
+enc/utf_32le.$(OBJEXT): internal/fl_type.h
+enc/utf_32le.$(OBJEXT): internal/gc.h
+enc/utf_32le.$(OBJEXT): internal/glob.h
+enc/utf_32le.$(OBJEXT): internal/globals.h
+enc/utf_32le.$(OBJEXT): internal/has/attribute.h
+enc/utf_32le.$(OBJEXT): internal/has/builtin.h
+enc/utf_32le.$(OBJEXT): internal/has/c_attribute.h
+enc/utf_32le.$(OBJEXT): internal/has/cpp_attribute.h
+enc/utf_32le.$(OBJEXT): internal/has/declspec_attribute.h
+enc/utf_32le.$(OBJEXT): internal/has/extension.h
+enc/utf_32le.$(OBJEXT): internal/has/feature.h
+enc/utf_32le.$(OBJEXT): internal/has/warning.h
+enc/utf_32le.$(OBJEXT): internal/intern/array.h
+enc/utf_32le.$(OBJEXT): internal/intern/bignum.h
+enc/utf_32le.$(OBJEXT): internal/intern/class.h
+enc/utf_32le.$(OBJEXT): internal/intern/compar.h
+enc/utf_32le.$(OBJEXT): internal/intern/complex.h
+enc/utf_32le.$(OBJEXT): internal/intern/cont.h
+enc/utf_32le.$(OBJEXT): internal/intern/dir.h
+enc/utf_32le.$(OBJEXT): internal/intern/enum.h
+enc/utf_32le.$(OBJEXT): internal/intern/enumerator.h
+enc/utf_32le.$(OBJEXT): internal/intern/error.h
+enc/utf_32le.$(OBJEXT): internal/intern/eval.h
+enc/utf_32le.$(OBJEXT): internal/intern/file.h
+enc/utf_32le.$(OBJEXT): internal/intern/gc.h
+enc/utf_32le.$(OBJEXT): internal/intern/hash.h
+enc/utf_32le.$(OBJEXT): internal/intern/io.h
+enc/utf_32le.$(OBJEXT): internal/intern/load.h
+enc/utf_32le.$(OBJEXT): internal/intern/marshal.h
+enc/utf_32le.$(OBJEXT): internal/intern/numeric.h
+enc/utf_32le.$(OBJEXT): internal/intern/object.h
+enc/utf_32le.$(OBJEXT): internal/intern/parse.h
+enc/utf_32le.$(OBJEXT): internal/intern/proc.h
+enc/utf_32le.$(OBJEXT): internal/intern/process.h
+enc/utf_32le.$(OBJEXT): internal/intern/random.h
+enc/utf_32le.$(OBJEXT): internal/intern/range.h
+enc/utf_32le.$(OBJEXT): internal/intern/rational.h
+enc/utf_32le.$(OBJEXT): internal/intern/re.h
+enc/utf_32le.$(OBJEXT): internal/intern/ruby.h
+enc/utf_32le.$(OBJEXT): internal/intern/select.h
+enc/utf_32le.$(OBJEXT): internal/intern/select/largesize.h
+enc/utf_32le.$(OBJEXT): internal/intern/signal.h
+enc/utf_32le.$(OBJEXT): internal/intern/sprintf.h
+enc/utf_32le.$(OBJEXT): internal/intern/string.h
+enc/utf_32le.$(OBJEXT): internal/intern/struct.h
+enc/utf_32le.$(OBJEXT): internal/intern/thread.h
+enc/utf_32le.$(OBJEXT): internal/intern/time.h
+enc/utf_32le.$(OBJEXT): internal/intern/variable.h
+enc/utf_32le.$(OBJEXT): internal/intern/vm.h
+enc/utf_32le.$(OBJEXT): internal/interpreter.h
+enc/utf_32le.$(OBJEXT): internal/iterator.h
+enc/utf_32le.$(OBJEXT): internal/memory.h
+enc/utf_32le.$(OBJEXT): internal/method.h
+enc/utf_32le.$(OBJEXT): internal/module.h
+enc/utf_32le.$(OBJEXT): internal/newobj.h
+enc/utf_32le.$(OBJEXT): internal/rgengc.h
+enc/utf_32le.$(OBJEXT): internal/scan_args.h
+enc/utf_32le.$(OBJEXT): internal/special_consts.h
+enc/utf_32le.$(OBJEXT): internal/static_assert.h
+enc/utf_32le.$(OBJEXT): internal/stdalign.h
+enc/utf_32le.$(OBJEXT): internal/stdbool.h
+enc/utf_32le.$(OBJEXT): internal/symbol.h
+enc/utf_32le.$(OBJEXT): internal/value.h
+enc/utf_32le.$(OBJEXT): internal/value_type.h
+enc/utf_32le.$(OBJEXT): internal/variable.h
+enc/utf_32le.$(OBJEXT): internal/warning_push.h
+enc/utf_32le.$(OBJEXT): internal/xmalloc.h
enc/utf_32le.$(OBJEXT): missing.h
enc/utf_32le.$(OBJEXT): onigmo.h
+enc/utf_32le.$(OBJEXT): st.h
+enc/utf_32le.$(OBJEXT): subst.h
+enc/utf_8.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/utf_8.$(OBJEXT): $(top_srcdir)/encindex.h
enc/utf_8.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/utf_8.$(OBJEXT): assert.h
+enc/utf_8.$(OBJEXT): backward/2/assume.h
+enc/utf_8.$(OBJEXT): backward/2/attributes.h
+enc/utf_8.$(OBJEXT): backward/2/bool.h
+enc/utf_8.$(OBJEXT): backward/2/inttypes.h
+enc/utf_8.$(OBJEXT): backward/2/limits.h
+enc/utf_8.$(OBJEXT): backward/2/long_long.h
+enc/utf_8.$(OBJEXT): backward/2/stdalign.h
+enc/utf_8.$(OBJEXT): backward/2/stdarg.h
enc/utf_8.$(OBJEXT): config.h
enc/utf_8.$(OBJEXT): defines.h
enc/utf_8.$(OBJEXT): enc/utf_8.c
+enc/utf_8.$(OBJEXT): encoding.h
+enc/utf_8.$(OBJEXT): intern.h
+enc/utf_8.$(OBJEXT): internal/abi.h
+enc/utf_8.$(OBJEXT): internal/anyargs.h
+enc/utf_8.$(OBJEXT): internal/arithmetic.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/char.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/double.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/int.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/long.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/long_long.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/off_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/short.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/size_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/utf_8.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/utf_8.$(OBJEXT): internal/assume.h
+enc/utf_8.$(OBJEXT): internal/attr/alloc_size.h
+enc/utf_8.$(OBJEXT): internal/attr/artificial.h
+enc/utf_8.$(OBJEXT): internal/attr/cold.h
+enc/utf_8.$(OBJEXT): internal/attr/const.h
+enc/utf_8.$(OBJEXT): internal/attr/constexpr.h
+enc/utf_8.$(OBJEXT): internal/attr/deprecated.h
+enc/utf_8.$(OBJEXT): internal/attr/diagnose_if.h
+enc/utf_8.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/utf_8.$(OBJEXT): internal/attr/error.h
+enc/utf_8.$(OBJEXT): internal/attr/flag_enum.h
+enc/utf_8.$(OBJEXT): internal/attr/forceinline.h
+enc/utf_8.$(OBJEXT): internal/attr/format.h
+enc/utf_8.$(OBJEXT): internal/attr/maybe_unused.h
+enc/utf_8.$(OBJEXT): internal/attr/noalias.h
+enc/utf_8.$(OBJEXT): internal/attr/nodiscard.h
+enc/utf_8.$(OBJEXT): internal/attr/noexcept.h
+enc/utf_8.$(OBJEXT): internal/attr/noinline.h
+enc/utf_8.$(OBJEXT): internal/attr/nonnull.h
+enc/utf_8.$(OBJEXT): internal/attr/noreturn.h
+enc/utf_8.$(OBJEXT): internal/attr/pure.h
+enc/utf_8.$(OBJEXT): internal/attr/restrict.h
+enc/utf_8.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/utf_8.$(OBJEXT): internal/attr/warning.h
+enc/utf_8.$(OBJEXT): internal/attr/weakref.h
+enc/utf_8.$(OBJEXT): internal/cast.h
+enc/utf_8.$(OBJEXT): internal/compiler_is.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/apple.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/clang.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/gcc.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/intel.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/msvc.h
+enc/utf_8.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/utf_8.$(OBJEXT): internal/compiler_since.h
+enc/utf_8.$(OBJEXT): internal/config.h
+enc/utf_8.$(OBJEXT): internal/constant_p.h
+enc/utf_8.$(OBJEXT): internal/core.h
+enc/utf_8.$(OBJEXT): internal/core/rarray.h
+enc/utf_8.$(OBJEXT): internal/core/rbasic.h
+enc/utf_8.$(OBJEXT): internal/core/rbignum.h
+enc/utf_8.$(OBJEXT): internal/core/rclass.h
+enc/utf_8.$(OBJEXT): internal/core/rdata.h
+enc/utf_8.$(OBJEXT): internal/core/rfile.h
+enc/utf_8.$(OBJEXT): internal/core/rhash.h
+enc/utf_8.$(OBJEXT): internal/core/robject.h
+enc/utf_8.$(OBJEXT): internal/core/rregexp.h
+enc/utf_8.$(OBJEXT): internal/core/rstring.h
+enc/utf_8.$(OBJEXT): internal/core/rstruct.h
+enc/utf_8.$(OBJEXT): internal/core/rtypeddata.h
+enc/utf_8.$(OBJEXT): internal/ctype.h
+enc/utf_8.$(OBJEXT): internal/dllexport.h
+enc/utf_8.$(OBJEXT): internal/dosish.h
+enc/utf_8.$(OBJEXT): internal/encoding/coderange.h
+enc/utf_8.$(OBJEXT): internal/encoding/ctype.h
+enc/utf_8.$(OBJEXT): internal/encoding/encoding.h
+enc/utf_8.$(OBJEXT): internal/encoding/pathname.h
+enc/utf_8.$(OBJEXT): internal/encoding/re.h
+enc/utf_8.$(OBJEXT): internal/encoding/sprintf.h
+enc/utf_8.$(OBJEXT): internal/encoding/string.h
+enc/utf_8.$(OBJEXT): internal/encoding/symbol.h
+enc/utf_8.$(OBJEXT): internal/encoding/transcode.h
+enc/utf_8.$(OBJEXT): internal/error.h
+enc/utf_8.$(OBJEXT): internal/eval.h
+enc/utf_8.$(OBJEXT): internal/event.h
+enc/utf_8.$(OBJEXT): internal/fl_type.h
+enc/utf_8.$(OBJEXT): internal/gc.h
+enc/utf_8.$(OBJEXT): internal/glob.h
+enc/utf_8.$(OBJEXT): internal/globals.h
+enc/utf_8.$(OBJEXT): internal/has/attribute.h
+enc/utf_8.$(OBJEXT): internal/has/builtin.h
+enc/utf_8.$(OBJEXT): internal/has/c_attribute.h
+enc/utf_8.$(OBJEXT): internal/has/cpp_attribute.h
+enc/utf_8.$(OBJEXT): internal/has/declspec_attribute.h
+enc/utf_8.$(OBJEXT): internal/has/extension.h
+enc/utf_8.$(OBJEXT): internal/has/feature.h
+enc/utf_8.$(OBJEXT): internal/has/warning.h
+enc/utf_8.$(OBJEXT): internal/intern/array.h
+enc/utf_8.$(OBJEXT): internal/intern/bignum.h
+enc/utf_8.$(OBJEXT): internal/intern/class.h
+enc/utf_8.$(OBJEXT): internal/intern/compar.h
+enc/utf_8.$(OBJEXT): internal/intern/complex.h
+enc/utf_8.$(OBJEXT): internal/intern/cont.h
+enc/utf_8.$(OBJEXT): internal/intern/dir.h
+enc/utf_8.$(OBJEXT): internal/intern/enum.h
+enc/utf_8.$(OBJEXT): internal/intern/enumerator.h
+enc/utf_8.$(OBJEXT): internal/intern/error.h
+enc/utf_8.$(OBJEXT): internal/intern/eval.h
+enc/utf_8.$(OBJEXT): internal/intern/file.h
+enc/utf_8.$(OBJEXT): internal/intern/gc.h
+enc/utf_8.$(OBJEXT): internal/intern/hash.h
+enc/utf_8.$(OBJEXT): internal/intern/io.h
+enc/utf_8.$(OBJEXT): internal/intern/load.h
+enc/utf_8.$(OBJEXT): internal/intern/marshal.h
+enc/utf_8.$(OBJEXT): internal/intern/numeric.h
+enc/utf_8.$(OBJEXT): internal/intern/object.h
+enc/utf_8.$(OBJEXT): internal/intern/parse.h
+enc/utf_8.$(OBJEXT): internal/intern/proc.h
+enc/utf_8.$(OBJEXT): internal/intern/process.h
+enc/utf_8.$(OBJEXT): internal/intern/random.h
+enc/utf_8.$(OBJEXT): internal/intern/range.h
+enc/utf_8.$(OBJEXT): internal/intern/rational.h
+enc/utf_8.$(OBJEXT): internal/intern/re.h
+enc/utf_8.$(OBJEXT): internal/intern/ruby.h
+enc/utf_8.$(OBJEXT): internal/intern/select.h
+enc/utf_8.$(OBJEXT): internal/intern/select/largesize.h
+enc/utf_8.$(OBJEXT): internal/intern/signal.h
+enc/utf_8.$(OBJEXT): internal/intern/sprintf.h
+enc/utf_8.$(OBJEXT): internal/intern/string.h
+enc/utf_8.$(OBJEXT): internal/intern/struct.h
+enc/utf_8.$(OBJEXT): internal/intern/thread.h
+enc/utf_8.$(OBJEXT): internal/intern/time.h
+enc/utf_8.$(OBJEXT): internal/intern/variable.h
+enc/utf_8.$(OBJEXT): internal/intern/vm.h
+enc/utf_8.$(OBJEXT): internal/interpreter.h
+enc/utf_8.$(OBJEXT): internal/iterator.h
+enc/utf_8.$(OBJEXT): internal/memory.h
+enc/utf_8.$(OBJEXT): internal/method.h
+enc/utf_8.$(OBJEXT): internal/module.h
+enc/utf_8.$(OBJEXT): internal/newobj.h
+enc/utf_8.$(OBJEXT): internal/rgengc.h
+enc/utf_8.$(OBJEXT): internal/scan_args.h
+enc/utf_8.$(OBJEXT): internal/special_consts.h
+enc/utf_8.$(OBJEXT): internal/static_assert.h
+enc/utf_8.$(OBJEXT): internal/stdalign.h
+enc/utf_8.$(OBJEXT): internal/stdbool.h
+enc/utf_8.$(OBJEXT): internal/symbol.h
+enc/utf_8.$(OBJEXT): internal/value.h
+enc/utf_8.$(OBJEXT): internal/value_type.h
+enc/utf_8.$(OBJEXT): internal/variable.h
+enc/utf_8.$(OBJEXT): internal/warning_push.h
+enc/utf_8.$(OBJEXT): internal/xmalloc.h
enc/utf_8.$(OBJEXT): missing.h
enc/utf_8.$(OBJEXT): onigmo.h
+enc/utf_8.$(OBJEXT): oniguruma.h
+enc/utf_8.$(OBJEXT): st.h
+enc/utf_8.$(OBJEXT): subst.h
+enc/windows_1250.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1250.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1250.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1250.$(OBJEXT): assert.h
+enc/windows_1250.$(OBJEXT): backward.h
+enc/windows_1250.$(OBJEXT): backward/2/assume.h
+enc/windows_1250.$(OBJEXT): backward/2/attributes.h
+enc/windows_1250.$(OBJEXT): backward/2/bool.h
+enc/windows_1250.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1250.$(OBJEXT): backward/2/limits.h
+enc/windows_1250.$(OBJEXT): backward/2/long_long.h
+enc/windows_1250.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1250.$(OBJEXT): backward/2/stdarg.h
enc/windows_1250.$(OBJEXT): config.h
enc/windows_1250.$(OBJEXT): defines.h
enc/windows_1250.$(OBJEXT): enc/iso_8859.h
enc/windows_1250.$(OBJEXT): enc/windows_1250.c
+enc/windows_1250.$(OBJEXT): intern.h
+enc/windows_1250.$(OBJEXT): internal/abi.h
+enc/windows_1250.$(OBJEXT): internal/anyargs.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1250.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1250.$(OBJEXT): internal/assume.h
+enc/windows_1250.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1250.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1250.$(OBJEXT): internal/attr/cold.h
+enc/windows_1250.$(OBJEXT): internal/attr/const.h
+enc/windows_1250.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1250.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1250.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1250.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1250.$(OBJEXT): internal/attr/error.h
+enc/windows_1250.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1250.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1250.$(OBJEXT): internal/attr/format.h
+enc/windows_1250.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1250.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1250.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1250.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1250.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1250.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1250.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1250.$(OBJEXT): internal/attr/pure.h
+enc/windows_1250.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1250.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1250.$(OBJEXT): internal/attr/warning.h
+enc/windows_1250.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1250.$(OBJEXT): internal/cast.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1250.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1250.$(OBJEXT): internal/compiler_since.h
+enc/windows_1250.$(OBJEXT): internal/config.h
+enc/windows_1250.$(OBJEXT): internal/constant_p.h
+enc/windows_1250.$(OBJEXT): internal/core.h
+enc/windows_1250.$(OBJEXT): internal/core/rarray.h
+enc/windows_1250.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1250.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1250.$(OBJEXT): internal/core/rclass.h
+enc/windows_1250.$(OBJEXT): internal/core/rdata.h
+enc/windows_1250.$(OBJEXT): internal/core/rfile.h
+enc/windows_1250.$(OBJEXT): internal/core/rhash.h
+enc/windows_1250.$(OBJEXT): internal/core/robject.h
+enc/windows_1250.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1250.$(OBJEXT): internal/core/rstring.h
+enc/windows_1250.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1250.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1250.$(OBJEXT): internal/ctype.h
+enc/windows_1250.$(OBJEXT): internal/dllexport.h
+enc/windows_1250.$(OBJEXT): internal/dosish.h
+enc/windows_1250.$(OBJEXT): internal/error.h
+enc/windows_1250.$(OBJEXT): internal/eval.h
+enc/windows_1250.$(OBJEXT): internal/event.h
+enc/windows_1250.$(OBJEXT): internal/fl_type.h
+enc/windows_1250.$(OBJEXT): internal/gc.h
+enc/windows_1250.$(OBJEXT): internal/glob.h
+enc/windows_1250.$(OBJEXT): internal/globals.h
+enc/windows_1250.$(OBJEXT): internal/has/attribute.h
+enc/windows_1250.$(OBJEXT): internal/has/builtin.h
+enc/windows_1250.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1250.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1250.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1250.$(OBJEXT): internal/has/extension.h
+enc/windows_1250.$(OBJEXT): internal/has/feature.h
+enc/windows_1250.$(OBJEXT): internal/has/warning.h
+enc/windows_1250.$(OBJEXT): internal/intern/array.h
+enc/windows_1250.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1250.$(OBJEXT): internal/intern/class.h
+enc/windows_1250.$(OBJEXT): internal/intern/compar.h
+enc/windows_1250.$(OBJEXT): internal/intern/complex.h
+enc/windows_1250.$(OBJEXT): internal/intern/cont.h
+enc/windows_1250.$(OBJEXT): internal/intern/dir.h
+enc/windows_1250.$(OBJEXT): internal/intern/enum.h
+enc/windows_1250.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1250.$(OBJEXT): internal/intern/error.h
+enc/windows_1250.$(OBJEXT): internal/intern/eval.h
+enc/windows_1250.$(OBJEXT): internal/intern/file.h
+enc/windows_1250.$(OBJEXT): internal/intern/gc.h
+enc/windows_1250.$(OBJEXT): internal/intern/hash.h
+enc/windows_1250.$(OBJEXT): internal/intern/io.h
+enc/windows_1250.$(OBJEXT): internal/intern/load.h
+enc/windows_1250.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1250.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1250.$(OBJEXT): internal/intern/object.h
+enc/windows_1250.$(OBJEXT): internal/intern/parse.h
+enc/windows_1250.$(OBJEXT): internal/intern/proc.h
+enc/windows_1250.$(OBJEXT): internal/intern/process.h
+enc/windows_1250.$(OBJEXT): internal/intern/random.h
+enc/windows_1250.$(OBJEXT): internal/intern/range.h
+enc/windows_1250.$(OBJEXT): internal/intern/rational.h
+enc/windows_1250.$(OBJEXT): internal/intern/re.h
+enc/windows_1250.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1250.$(OBJEXT): internal/intern/select.h
+enc/windows_1250.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1250.$(OBJEXT): internal/intern/signal.h
+enc/windows_1250.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1250.$(OBJEXT): internal/intern/string.h
+enc/windows_1250.$(OBJEXT): internal/intern/struct.h
+enc/windows_1250.$(OBJEXT): internal/intern/thread.h
+enc/windows_1250.$(OBJEXT): internal/intern/time.h
+enc/windows_1250.$(OBJEXT): internal/intern/variable.h
+enc/windows_1250.$(OBJEXT): internal/intern/vm.h
+enc/windows_1250.$(OBJEXT): internal/interpreter.h
+enc/windows_1250.$(OBJEXT): internal/iterator.h
+enc/windows_1250.$(OBJEXT): internal/memory.h
+enc/windows_1250.$(OBJEXT): internal/method.h
+enc/windows_1250.$(OBJEXT): internal/module.h
+enc/windows_1250.$(OBJEXT): internal/newobj.h
+enc/windows_1250.$(OBJEXT): internal/rgengc.h
+enc/windows_1250.$(OBJEXT): internal/scan_args.h
+enc/windows_1250.$(OBJEXT): internal/special_consts.h
+enc/windows_1250.$(OBJEXT): internal/static_assert.h
+enc/windows_1250.$(OBJEXT): internal/stdalign.h
+enc/windows_1250.$(OBJEXT): internal/stdbool.h
+enc/windows_1250.$(OBJEXT): internal/symbol.h
+enc/windows_1250.$(OBJEXT): internal/value.h
+enc/windows_1250.$(OBJEXT): internal/value_type.h
+enc/windows_1250.$(OBJEXT): internal/variable.h
+enc/windows_1250.$(OBJEXT): internal/warning_push.h
+enc/windows_1250.$(OBJEXT): internal/xmalloc.h
enc/windows_1250.$(OBJEXT): missing.h
enc/windows_1250.$(OBJEXT): onigmo.h
+enc/windows_1250.$(OBJEXT): st.h
+enc/windows_1250.$(OBJEXT): subst.h
+enc/windows_1251.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1251.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1251.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1251.$(OBJEXT): assert.h
+enc/windows_1251.$(OBJEXT): backward.h
+enc/windows_1251.$(OBJEXT): backward/2/assume.h
+enc/windows_1251.$(OBJEXT): backward/2/attributes.h
+enc/windows_1251.$(OBJEXT): backward/2/bool.h
+enc/windows_1251.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1251.$(OBJEXT): backward/2/limits.h
+enc/windows_1251.$(OBJEXT): backward/2/long_long.h
+enc/windows_1251.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1251.$(OBJEXT): backward/2/stdarg.h
enc/windows_1251.$(OBJEXT): config.h
enc/windows_1251.$(OBJEXT): defines.h
enc/windows_1251.$(OBJEXT): enc/windows_1251.c
+enc/windows_1251.$(OBJEXT): intern.h
+enc/windows_1251.$(OBJEXT): internal/abi.h
+enc/windows_1251.$(OBJEXT): internal/anyargs.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1251.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1251.$(OBJEXT): internal/assume.h
+enc/windows_1251.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1251.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1251.$(OBJEXT): internal/attr/cold.h
+enc/windows_1251.$(OBJEXT): internal/attr/const.h
+enc/windows_1251.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1251.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1251.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1251.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1251.$(OBJEXT): internal/attr/error.h
+enc/windows_1251.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1251.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1251.$(OBJEXT): internal/attr/format.h
+enc/windows_1251.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1251.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1251.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1251.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1251.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1251.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1251.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1251.$(OBJEXT): internal/attr/pure.h
+enc/windows_1251.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1251.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1251.$(OBJEXT): internal/attr/warning.h
+enc/windows_1251.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1251.$(OBJEXT): internal/cast.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1251.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1251.$(OBJEXT): internal/compiler_since.h
+enc/windows_1251.$(OBJEXT): internal/config.h
+enc/windows_1251.$(OBJEXT): internal/constant_p.h
+enc/windows_1251.$(OBJEXT): internal/core.h
+enc/windows_1251.$(OBJEXT): internal/core/rarray.h
+enc/windows_1251.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1251.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1251.$(OBJEXT): internal/core/rclass.h
+enc/windows_1251.$(OBJEXT): internal/core/rdata.h
+enc/windows_1251.$(OBJEXT): internal/core/rfile.h
+enc/windows_1251.$(OBJEXT): internal/core/rhash.h
+enc/windows_1251.$(OBJEXT): internal/core/robject.h
+enc/windows_1251.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1251.$(OBJEXT): internal/core/rstring.h
+enc/windows_1251.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1251.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1251.$(OBJEXT): internal/ctype.h
+enc/windows_1251.$(OBJEXT): internal/dllexport.h
+enc/windows_1251.$(OBJEXT): internal/dosish.h
+enc/windows_1251.$(OBJEXT): internal/error.h
+enc/windows_1251.$(OBJEXT): internal/eval.h
+enc/windows_1251.$(OBJEXT): internal/event.h
+enc/windows_1251.$(OBJEXT): internal/fl_type.h
+enc/windows_1251.$(OBJEXT): internal/gc.h
+enc/windows_1251.$(OBJEXT): internal/glob.h
+enc/windows_1251.$(OBJEXT): internal/globals.h
+enc/windows_1251.$(OBJEXT): internal/has/attribute.h
+enc/windows_1251.$(OBJEXT): internal/has/builtin.h
+enc/windows_1251.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1251.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1251.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1251.$(OBJEXT): internal/has/extension.h
+enc/windows_1251.$(OBJEXT): internal/has/feature.h
+enc/windows_1251.$(OBJEXT): internal/has/warning.h
+enc/windows_1251.$(OBJEXT): internal/intern/array.h
+enc/windows_1251.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1251.$(OBJEXT): internal/intern/class.h
+enc/windows_1251.$(OBJEXT): internal/intern/compar.h
+enc/windows_1251.$(OBJEXT): internal/intern/complex.h
+enc/windows_1251.$(OBJEXT): internal/intern/cont.h
+enc/windows_1251.$(OBJEXT): internal/intern/dir.h
+enc/windows_1251.$(OBJEXT): internal/intern/enum.h
+enc/windows_1251.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1251.$(OBJEXT): internal/intern/error.h
+enc/windows_1251.$(OBJEXT): internal/intern/eval.h
+enc/windows_1251.$(OBJEXT): internal/intern/file.h
+enc/windows_1251.$(OBJEXT): internal/intern/gc.h
+enc/windows_1251.$(OBJEXT): internal/intern/hash.h
+enc/windows_1251.$(OBJEXT): internal/intern/io.h
+enc/windows_1251.$(OBJEXT): internal/intern/load.h
+enc/windows_1251.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1251.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1251.$(OBJEXT): internal/intern/object.h
+enc/windows_1251.$(OBJEXT): internal/intern/parse.h
+enc/windows_1251.$(OBJEXT): internal/intern/proc.h
+enc/windows_1251.$(OBJEXT): internal/intern/process.h
+enc/windows_1251.$(OBJEXT): internal/intern/random.h
+enc/windows_1251.$(OBJEXT): internal/intern/range.h
+enc/windows_1251.$(OBJEXT): internal/intern/rational.h
+enc/windows_1251.$(OBJEXT): internal/intern/re.h
+enc/windows_1251.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1251.$(OBJEXT): internal/intern/select.h
+enc/windows_1251.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1251.$(OBJEXT): internal/intern/signal.h
+enc/windows_1251.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1251.$(OBJEXT): internal/intern/string.h
+enc/windows_1251.$(OBJEXT): internal/intern/struct.h
+enc/windows_1251.$(OBJEXT): internal/intern/thread.h
+enc/windows_1251.$(OBJEXT): internal/intern/time.h
+enc/windows_1251.$(OBJEXT): internal/intern/variable.h
+enc/windows_1251.$(OBJEXT): internal/intern/vm.h
+enc/windows_1251.$(OBJEXT): internal/interpreter.h
+enc/windows_1251.$(OBJEXT): internal/iterator.h
+enc/windows_1251.$(OBJEXT): internal/memory.h
+enc/windows_1251.$(OBJEXT): internal/method.h
+enc/windows_1251.$(OBJEXT): internal/module.h
+enc/windows_1251.$(OBJEXT): internal/newobj.h
+enc/windows_1251.$(OBJEXT): internal/rgengc.h
+enc/windows_1251.$(OBJEXT): internal/scan_args.h
+enc/windows_1251.$(OBJEXT): internal/special_consts.h
+enc/windows_1251.$(OBJEXT): internal/static_assert.h
+enc/windows_1251.$(OBJEXT): internal/stdalign.h
+enc/windows_1251.$(OBJEXT): internal/stdbool.h
+enc/windows_1251.$(OBJEXT): internal/symbol.h
+enc/windows_1251.$(OBJEXT): internal/value.h
+enc/windows_1251.$(OBJEXT): internal/value_type.h
+enc/windows_1251.$(OBJEXT): internal/variable.h
+enc/windows_1251.$(OBJEXT): internal/warning_push.h
+enc/windows_1251.$(OBJEXT): internal/xmalloc.h
enc/windows_1251.$(OBJEXT): missing.h
enc/windows_1251.$(OBJEXT): onigmo.h
+enc/windows_1251.$(OBJEXT): st.h
+enc/windows_1251.$(OBJEXT): subst.h
+enc/windows_1252.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1252.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1252.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1252.$(OBJEXT): assert.h
+enc/windows_1252.$(OBJEXT): backward.h
+enc/windows_1252.$(OBJEXT): backward/2/assume.h
+enc/windows_1252.$(OBJEXT): backward/2/attributes.h
+enc/windows_1252.$(OBJEXT): backward/2/bool.h
+enc/windows_1252.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1252.$(OBJEXT): backward/2/limits.h
+enc/windows_1252.$(OBJEXT): backward/2/long_long.h
+enc/windows_1252.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1252.$(OBJEXT): backward/2/stdarg.h
enc/windows_1252.$(OBJEXT): config.h
enc/windows_1252.$(OBJEXT): defines.h
enc/windows_1252.$(OBJEXT): enc/iso_8859.h
enc/windows_1252.$(OBJEXT): enc/windows_1252.c
+enc/windows_1252.$(OBJEXT): intern.h
+enc/windows_1252.$(OBJEXT): internal/abi.h
+enc/windows_1252.$(OBJEXT): internal/anyargs.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1252.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1252.$(OBJEXT): internal/assume.h
+enc/windows_1252.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1252.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1252.$(OBJEXT): internal/attr/cold.h
+enc/windows_1252.$(OBJEXT): internal/attr/const.h
+enc/windows_1252.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1252.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1252.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1252.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1252.$(OBJEXT): internal/attr/error.h
+enc/windows_1252.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1252.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1252.$(OBJEXT): internal/attr/format.h
+enc/windows_1252.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1252.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1252.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1252.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1252.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1252.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1252.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1252.$(OBJEXT): internal/attr/pure.h
+enc/windows_1252.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1252.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1252.$(OBJEXT): internal/attr/warning.h
+enc/windows_1252.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1252.$(OBJEXT): internal/cast.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1252.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1252.$(OBJEXT): internal/compiler_since.h
+enc/windows_1252.$(OBJEXT): internal/config.h
+enc/windows_1252.$(OBJEXT): internal/constant_p.h
+enc/windows_1252.$(OBJEXT): internal/core.h
+enc/windows_1252.$(OBJEXT): internal/core/rarray.h
+enc/windows_1252.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1252.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1252.$(OBJEXT): internal/core/rclass.h
+enc/windows_1252.$(OBJEXT): internal/core/rdata.h
+enc/windows_1252.$(OBJEXT): internal/core/rfile.h
+enc/windows_1252.$(OBJEXT): internal/core/rhash.h
+enc/windows_1252.$(OBJEXT): internal/core/robject.h
+enc/windows_1252.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1252.$(OBJEXT): internal/core/rstring.h
+enc/windows_1252.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1252.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1252.$(OBJEXT): internal/ctype.h
+enc/windows_1252.$(OBJEXT): internal/dllexport.h
+enc/windows_1252.$(OBJEXT): internal/dosish.h
+enc/windows_1252.$(OBJEXT): internal/error.h
+enc/windows_1252.$(OBJEXT): internal/eval.h
+enc/windows_1252.$(OBJEXT): internal/event.h
+enc/windows_1252.$(OBJEXT): internal/fl_type.h
+enc/windows_1252.$(OBJEXT): internal/gc.h
+enc/windows_1252.$(OBJEXT): internal/glob.h
+enc/windows_1252.$(OBJEXT): internal/globals.h
+enc/windows_1252.$(OBJEXT): internal/has/attribute.h
+enc/windows_1252.$(OBJEXT): internal/has/builtin.h
+enc/windows_1252.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1252.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1252.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1252.$(OBJEXT): internal/has/extension.h
+enc/windows_1252.$(OBJEXT): internal/has/feature.h
+enc/windows_1252.$(OBJEXT): internal/has/warning.h
+enc/windows_1252.$(OBJEXT): internal/intern/array.h
+enc/windows_1252.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1252.$(OBJEXT): internal/intern/class.h
+enc/windows_1252.$(OBJEXT): internal/intern/compar.h
+enc/windows_1252.$(OBJEXT): internal/intern/complex.h
+enc/windows_1252.$(OBJEXT): internal/intern/cont.h
+enc/windows_1252.$(OBJEXT): internal/intern/dir.h
+enc/windows_1252.$(OBJEXT): internal/intern/enum.h
+enc/windows_1252.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1252.$(OBJEXT): internal/intern/error.h
+enc/windows_1252.$(OBJEXT): internal/intern/eval.h
+enc/windows_1252.$(OBJEXT): internal/intern/file.h
+enc/windows_1252.$(OBJEXT): internal/intern/gc.h
+enc/windows_1252.$(OBJEXT): internal/intern/hash.h
+enc/windows_1252.$(OBJEXT): internal/intern/io.h
+enc/windows_1252.$(OBJEXT): internal/intern/load.h
+enc/windows_1252.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1252.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1252.$(OBJEXT): internal/intern/object.h
+enc/windows_1252.$(OBJEXT): internal/intern/parse.h
+enc/windows_1252.$(OBJEXT): internal/intern/proc.h
+enc/windows_1252.$(OBJEXT): internal/intern/process.h
+enc/windows_1252.$(OBJEXT): internal/intern/random.h
+enc/windows_1252.$(OBJEXT): internal/intern/range.h
+enc/windows_1252.$(OBJEXT): internal/intern/rational.h
+enc/windows_1252.$(OBJEXT): internal/intern/re.h
+enc/windows_1252.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1252.$(OBJEXT): internal/intern/select.h
+enc/windows_1252.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1252.$(OBJEXT): internal/intern/signal.h
+enc/windows_1252.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1252.$(OBJEXT): internal/intern/string.h
+enc/windows_1252.$(OBJEXT): internal/intern/struct.h
+enc/windows_1252.$(OBJEXT): internal/intern/thread.h
+enc/windows_1252.$(OBJEXT): internal/intern/time.h
+enc/windows_1252.$(OBJEXT): internal/intern/variable.h
+enc/windows_1252.$(OBJEXT): internal/intern/vm.h
+enc/windows_1252.$(OBJEXT): internal/interpreter.h
+enc/windows_1252.$(OBJEXT): internal/iterator.h
+enc/windows_1252.$(OBJEXT): internal/memory.h
+enc/windows_1252.$(OBJEXT): internal/method.h
+enc/windows_1252.$(OBJEXT): internal/module.h
+enc/windows_1252.$(OBJEXT): internal/newobj.h
+enc/windows_1252.$(OBJEXT): internal/rgengc.h
+enc/windows_1252.$(OBJEXT): internal/scan_args.h
+enc/windows_1252.$(OBJEXT): internal/special_consts.h
+enc/windows_1252.$(OBJEXT): internal/static_assert.h
+enc/windows_1252.$(OBJEXT): internal/stdalign.h
+enc/windows_1252.$(OBJEXT): internal/stdbool.h
+enc/windows_1252.$(OBJEXT): internal/symbol.h
+enc/windows_1252.$(OBJEXT): internal/value.h
+enc/windows_1252.$(OBJEXT): internal/value_type.h
+enc/windows_1252.$(OBJEXT): internal/variable.h
+enc/windows_1252.$(OBJEXT): internal/warning_push.h
+enc/windows_1252.$(OBJEXT): internal/xmalloc.h
enc/windows_1252.$(OBJEXT): missing.h
enc/windows_1252.$(OBJEXT): onigmo.h
+enc/windows_1252.$(OBJEXT): st.h
+enc/windows_1252.$(OBJEXT): subst.h
+enc/windows_1253.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1253.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1253.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1253.$(OBJEXT): assert.h
+enc/windows_1253.$(OBJEXT): backward.h
+enc/windows_1253.$(OBJEXT): backward/2/assume.h
+enc/windows_1253.$(OBJEXT): backward/2/attributes.h
+enc/windows_1253.$(OBJEXT): backward/2/bool.h
+enc/windows_1253.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1253.$(OBJEXT): backward/2/limits.h
+enc/windows_1253.$(OBJEXT): backward/2/long_long.h
+enc/windows_1253.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1253.$(OBJEXT): backward/2/stdarg.h
enc/windows_1253.$(OBJEXT): config.h
enc/windows_1253.$(OBJEXT): defines.h
enc/windows_1253.$(OBJEXT): enc/windows_1253.c
+enc/windows_1253.$(OBJEXT): intern.h
+enc/windows_1253.$(OBJEXT): internal/abi.h
+enc/windows_1253.$(OBJEXT): internal/anyargs.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1253.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1253.$(OBJEXT): internal/assume.h
+enc/windows_1253.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1253.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1253.$(OBJEXT): internal/attr/cold.h
+enc/windows_1253.$(OBJEXT): internal/attr/const.h
+enc/windows_1253.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1253.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1253.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1253.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1253.$(OBJEXT): internal/attr/error.h
+enc/windows_1253.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1253.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1253.$(OBJEXT): internal/attr/format.h
+enc/windows_1253.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1253.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1253.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1253.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1253.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1253.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1253.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1253.$(OBJEXT): internal/attr/pure.h
+enc/windows_1253.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1253.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1253.$(OBJEXT): internal/attr/warning.h
+enc/windows_1253.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1253.$(OBJEXT): internal/cast.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1253.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1253.$(OBJEXT): internal/compiler_since.h
+enc/windows_1253.$(OBJEXT): internal/config.h
+enc/windows_1253.$(OBJEXT): internal/constant_p.h
+enc/windows_1253.$(OBJEXT): internal/core.h
+enc/windows_1253.$(OBJEXT): internal/core/rarray.h
+enc/windows_1253.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1253.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1253.$(OBJEXT): internal/core/rclass.h
+enc/windows_1253.$(OBJEXT): internal/core/rdata.h
+enc/windows_1253.$(OBJEXT): internal/core/rfile.h
+enc/windows_1253.$(OBJEXT): internal/core/rhash.h
+enc/windows_1253.$(OBJEXT): internal/core/robject.h
+enc/windows_1253.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1253.$(OBJEXT): internal/core/rstring.h
+enc/windows_1253.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1253.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1253.$(OBJEXT): internal/ctype.h
+enc/windows_1253.$(OBJEXT): internal/dllexport.h
+enc/windows_1253.$(OBJEXT): internal/dosish.h
+enc/windows_1253.$(OBJEXT): internal/error.h
+enc/windows_1253.$(OBJEXT): internal/eval.h
+enc/windows_1253.$(OBJEXT): internal/event.h
+enc/windows_1253.$(OBJEXT): internal/fl_type.h
+enc/windows_1253.$(OBJEXT): internal/gc.h
+enc/windows_1253.$(OBJEXT): internal/glob.h
+enc/windows_1253.$(OBJEXT): internal/globals.h
+enc/windows_1253.$(OBJEXT): internal/has/attribute.h
+enc/windows_1253.$(OBJEXT): internal/has/builtin.h
+enc/windows_1253.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1253.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1253.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1253.$(OBJEXT): internal/has/extension.h
+enc/windows_1253.$(OBJEXT): internal/has/feature.h
+enc/windows_1253.$(OBJEXT): internal/has/warning.h
+enc/windows_1253.$(OBJEXT): internal/intern/array.h
+enc/windows_1253.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1253.$(OBJEXT): internal/intern/class.h
+enc/windows_1253.$(OBJEXT): internal/intern/compar.h
+enc/windows_1253.$(OBJEXT): internal/intern/complex.h
+enc/windows_1253.$(OBJEXT): internal/intern/cont.h
+enc/windows_1253.$(OBJEXT): internal/intern/dir.h
+enc/windows_1253.$(OBJEXT): internal/intern/enum.h
+enc/windows_1253.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1253.$(OBJEXT): internal/intern/error.h
+enc/windows_1253.$(OBJEXT): internal/intern/eval.h
+enc/windows_1253.$(OBJEXT): internal/intern/file.h
+enc/windows_1253.$(OBJEXT): internal/intern/gc.h
+enc/windows_1253.$(OBJEXT): internal/intern/hash.h
+enc/windows_1253.$(OBJEXT): internal/intern/io.h
+enc/windows_1253.$(OBJEXT): internal/intern/load.h
+enc/windows_1253.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1253.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1253.$(OBJEXT): internal/intern/object.h
+enc/windows_1253.$(OBJEXT): internal/intern/parse.h
+enc/windows_1253.$(OBJEXT): internal/intern/proc.h
+enc/windows_1253.$(OBJEXT): internal/intern/process.h
+enc/windows_1253.$(OBJEXT): internal/intern/random.h
+enc/windows_1253.$(OBJEXT): internal/intern/range.h
+enc/windows_1253.$(OBJEXT): internal/intern/rational.h
+enc/windows_1253.$(OBJEXT): internal/intern/re.h
+enc/windows_1253.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1253.$(OBJEXT): internal/intern/select.h
+enc/windows_1253.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1253.$(OBJEXT): internal/intern/signal.h
+enc/windows_1253.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1253.$(OBJEXT): internal/intern/string.h
+enc/windows_1253.$(OBJEXT): internal/intern/struct.h
+enc/windows_1253.$(OBJEXT): internal/intern/thread.h
+enc/windows_1253.$(OBJEXT): internal/intern/time.h
+enc/windows_1253.$(OBJEXT): internal/intern/variable.h
+enc/windows_1253.$(OBJEXT): internal/intern/vm.h
+enc/windows_1253.$(OBJEXT): internal/interpreter.h
+enc/windows_1253.$(OBJEXT): internal/iterator.h
+enc/windows_1253.$(OBJEXT): internal/memory.h
+enc/windows_1253.$(OBJEXT): internal/method.h
+enc/windows_1253.$(OBJEXT): internal/module.h
+enc/windows_1253.$(OBJEXT): internal/newobj.h
+enc/windows_1253.$(OBJEXT): internal/rgengc.h
+enc/windows_1253.$(OBJEXT): internal/scan_args.h
+enc/windows_1253.$(OBJEXT): internal/special_consts.h
+enc/windows_1253.$(OBJEXT): internal/static_assert.h
+enc/windows_1253.$(OBJEXT): internal/stdalign.h
+enc/windows_1253.$(OBJEXT): internal/stdbool.h
+enc/windows_1253.$(OBJEXT): internal/symbol.h
+enc/windows_1253.$(OBJEXT): internal/value.h
+enc/windows_1253.$(OBJEXT): internal/value_type.h
+enc/windows_1253.$(OBJEXT): internal/variable.h
+enc/windows_1253.$(OBJEXT): internal/warning_push.h
+enc/windows_1253.$(OBJEXT): internal/xmalloc.h
enc/windows_1253.$(OBJEXT): missing.h
enc/windows_1253.$(OBJEXT): onigmo.h
+enc/windows_1253.$(OBJEXT): st.h
+enc/windows_1253.$(OBJEXT): subst.h
+enc/windows_1254.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1254.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1254.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1254.$(OBJEXT): assert.h
+enc/windows_1254.$(OBJEXT): backward.h
+enc/windows_1254.$(OBJEXT): backward/2/assume.h
+enc/windows_1254.$(OBJEXT): backward/2/attributes.h
+enc/windows_1254.$(OBJEXT): backward/2/bool.h
+enc/windows_1254.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1254.$(OBJEXT): backward/2/limits.h
+enc/windows_1254.$(OBJEXT): backward/2/long_long.h
+enc/windows_1254.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1254.$(OBJEXT): backward/2/stdarg.h
enc/windows_1254.$(OBJEXT): config.h
enc/windows_1254.$(OBJEXT): defines.h
enc/windows_1254.$(OBJEXT): enc/iso_8859.h
enc/windows_1254.$(OBJEXT): enc/windows_1254.c
+enc/windows_1254.$(OBJEXT): intern.h
+enc/windows_1254.$(OBJEXT): internal/abi.h
+enc/windows_1254.$(OBJEXT): internal/anyargs.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1254.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1254.$(OBJEXT): internal/assume.h
+enc/windows_1254.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1254.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1254.$(OBJEXT): internal/attr/cold.h
+enc/windows_1254.$(OBJEXT): internal/attr/const.h
+enc/windows_1254.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1254.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1254.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1254.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1254.$(OBJEXT): internal/attr/error.h
+enc/windows_1254.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1254.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1254.$(OBJEXT): internal/attr/format.h
+enc/windows_1254.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1254.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1254.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1254.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1254.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1254.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1254.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1254.$(OBJEXT): internal/attr/pure.h
+enc/windows_1254.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1254.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1254.$(OBJEXT): internal/attr/warning.h
+enc/windows_1254.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1254.$(OBJEXT): internal/cast.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1254.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1254.$(OBJEXT): internal/compiler_since.h
+enc/windows_1254.$(OBJEXT): internal/config.h
+enc/windows_1254.$(OBJEXT): internal/constant_p.h
+enc/windows_1254.$(OBJEXT): internal/core.h
+enc/windows_1254.$(OBJEXT): internal/core/rarray.h
+enc/windows_1254.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1254.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1254.$(OBJEXT): internal/core/rclass.h
+enc/windows_1254.$(OBJEXT): internal/core/rdata.h
+enc/windows_1254.$(OBJEXT): internal/core/rfile.h
+enc/windows_1254.$(OBJEXT): internal/core/rhash.h
+enc/windows_1254.$(OBJEXT): internal/core/robject.h
+enc/windows_1254.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1254.$(OBJEXT): internal/core/rstring.h
+enc/windows_1254.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1254.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1254.$(OBJEXT): internal/ctype.h
+enc/windows_1254.$(OBJEXT): internal/dllexport.h
+enc/windows_1254.$(OBJEXT): internal/dosish.h
+enc/windows_1254.$(OBJEXT): internal/error.h
+enc/windows_1254.$(OBJEXT): internal/eval.h
+enc/windows_1254.$(OBJEXT): internal/event.h
+enc/windows_1254.$(OBJEXT): internal/fl_type.h
+enc/windows_1254.$(OBJEXT): internal/gc.h
+enc/windows_1254.$(OBJEXT): internal/glob.h
+enc/windows_1254.$(OBJEXT): internal/globals.h
+enc/windows_1254.$(OBJEXT): internal/has/attribute.h
+enc/windows_1254.$(OBJEXT): internal/has/builtin.h
+enc/windows_1254.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1254.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1254.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1254.$(OBJEXT): internal/has/extension.h
+enc/windows_1254.$(OBJEXT): internal/has/feature.h
+enc/windows_1254.$(OBJEXT): internal/has/warning.h
+enc/windows_1254.$(OBJEXT): internal/intern/array.h
+enc/windows_1254.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1254.$(OBJEXT): internal/intern/class.h
+enc/windows_1254.$(OBJEXT): internal/intern/compar.h
+enc/windows_1254.$(OBJEXT): internal/intern/complex.h
+enc/windows_1254.$(OBJEXT): internal/intern/cont.h
+enc/windows_1254.$(OBJEXT): internal/intern/dir.h
+enc/windows_1254.$(OBJEXT): internal/intern/enum.h
+enc/windows_1254.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1254.$(OBJEXT): internal/intern/error.h
+enc/windows_1254.$(OBJEXT): internal/intern/eval.h
+enc/windows_1254.$(OBJEXT): internal/intern/file.h
+enc/windows_1254.$(OBJEXT): internal/intern/gc.h
+enc/windows_1254.$(OBJEXT): internal/intern/hash.h
+enc/windows_1254.$(OBJEXT): internal/intern/io.h
+enc/windows_1254.$(OBJEXT): internal/intern/load.h
+enc/windows_1254.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1254.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1254.$(OBJEXT): internal/intern/object.h
+enc/windows_1254.$(OBJEXT): internal/intern/parse.h
+enc/windows_1254.$(OBJEXT): internal/intern/proc.h
+enc/windows_1254.$(OBJEXT): internal/intern/process.h
+enc/windows_1254.$(OBJEXT): internal/intern/random.h
+enc/windows_1254.$(OBJEXT): internal/intern/range.h
+enc/windows_1254.$(OBJEXT): internal/intern/rational.h
+enc/windows_1254.$(OBJEXT): internal/intern/re.h
+enc/windows_1254.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1254.$(OBJEXT): internal/intern/select.h
+enc/windows_1254.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1254.$(OBJEXT): internal/intern/signal.h
+enc/windows_1254.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1254.$(OBJEXT): internal/intern/string.h
+enc/windows_1254.$(OBJEXT): internal/intern/struct.h
+enc/windows_1254.$(OBJEXT): internal/intern/thread.h
+enc/windows_1254.$(OBJEXT): internal/intern/time.h
+enc/windows_1254.$(OBJEXT): internal/intern/variable.h
+enc/windows_1254.$(OBJEXT): internal/intern/vm.h
+enc/windows_1254.$(OBJEXT): internal/interpreter.h
+enc/windows_1254.$(OBJEXT): internal/iterator.h
+enc/windows_1254.$(OBJEXT): internal/memory.h
+enc/windows_1254.$(OBJEXT): internal/method.h
+enc/windows_1254.$(OBJEXT): internal/module.h
+enc/windows_1254.$(OBJEXT): internal/newobj.h
+enc/windows_1254.$(OBJEXT): internal/rgengc.h
+enc/windows_1254.$(OBJEXT): internal/scan_args.h
+enc/windows_1254.$(OBJEXT): internal/special_consts.h
+enc/windows_1254.$(OBJEXT): internal/static_assert.h
+enc/windows_1254.$(OBJEXT): internal/stdalign.h
+enc/windows_1254.$(OBJEXT): internal/stdbool.h
+enc/windows_1254.$(OBJEXT): internal/symbol.h
+enc/windows_1254.$(OBJEXT): internal/value.h
+enc/windows_1254.$(OBJEXT): internal/value_type.h
+enc/windows_1254.$(OBJEXT): internal/variable.h
+enc/windows_1254.$(OBJEXT): internal/warning_push.h
+enc/windows_1254.$(OBJEXT): internal/xmalloc.h
enc/windows_1254.$(OBJEXT): missing.h
enc/windows_1254.$(OBJEXT): onigmo.h
+enc/windows_1254.$(OBJEXT): st.h
+enc/windows_1254.$(OBJEXT): subst.h
+enc/windows_1257.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_1257.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_1257.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_1257.$(OBJEXT): assert.h
+enc/windows_1257.$(OBJEXT): backward.h
+enc/windows_1257.$(OBJEXT): backward/2/assume.h
+enc/windows_1257.$(OBJEXT): backward/2/attributes.h
+enc/windows_1257.$(OBJEXT): backward/2/bool.h
+enc/windows_1257.$(OBJEXT): backward/2/inttypes.h
+enc/windows_1257.$(OBJEXT): backward/2/limits.h
+enc/windows_1257.$(OBJEXT): backward/2/long_long.h
+enc/windows_1257.$(OBJEXT): backward/2/stdalign.h
+enc/windows_1257.$(OBJEXT): backward/2/stdarg.h
enc/windows_1257.$(OBJEXT): config.h
enc/windows_1257.$(OBJEXT): defines.h
enc/windows_1257.$(OBJEXT): enc/iso_8859.h
enc/windows_1257.$(OBJEXT): enc/windows_1257.c
+enc/windows_1257.$(OBJEXT): intern.h
+enc/windows_1257.$(OBJEXT): internal/abi.h
+enc/windows_1257.$(OBJEXT): internal/anyargs.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_1257.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_1257.$(OBJEXT): internal/assume.h
+enc/windows_1257.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_1257.$(OBJEXT): internal/attr/artificial.h
+enc/windows_1257.$(OBJEXT): internal/attr/cold.h
+enc/windows_1257.$(OBJEXT): internal/attr/const.h
+enc/windows_1257.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_1257.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_1257.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_1257.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_1257.$(OBJEXT): internal/attr/error.h
+enc/windows_1257.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_1257.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_1257.$(OBJEXT): internal/attr/format.h
+enc/windows_1257.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_1257.$(OBJEXT): internal/attr/noalias.h
+enc/windows_1257.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_1257.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_1257.$(OBJEXT): internal/attr/noinline.h
+enc/windows_1257.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_1257.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_1257.$(OBJEXT): internal/attr/pure.h
+enc/windows_1257.$(OBJEXT): internal/attr/restrict.h
+enc/windows_1257.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_1257.$(OBJEXT): internal/attr/warning.h
+enc/windows_1257.$(OBJEXT): internal/attr/weakref.h
+enc/windows_1257.$(OBJEXT): internal/cast.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_1257.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_1257.$(OBJEXT): internal/compiler_since.h
+enc/windows_1257.$(OBJEXT): internal/config.h
+enc/windows_1257.$(OBJEXT): internal/constant_p.h
+enc/windows_1257.$(OBJEXT): internal/core.h
+enc/windows_1257.$(OBJEXT): internal/core/rarray.h
+enc/windows_1257.$(OBJEXT): internal/core/rbasic.h
+enc/windows_1257.$(OBJEXT): internal/core/rbignum.h
+enc/windows_1257.$(OBJEXT): internal/core/rclass.h
+enc/windows_1257.$(OBJEXT): internal/core/rdata.h
+enc/windows_1257.$(OBJEXT): internal/core/rfile.h
+enc/windows_1257.$(OBJEXT): internal/core/rhash.h
+enc/windows_1257.$(OBJEXT): internal/core/robject.h
+enc/windows_1257.$(OBJEXT): internal/core/rregexp.h
+enc/windows_1257.$(OBJEXT): internal/core/rstring.h
+enc/windows_1257.$(OBJEXT): internal/core/rstruct.h
+enc/windows_1257.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_1257.$(OBJEXT): internal/ctype.h
+enc/windows_1257.$(OBJEXT): internal/dllexport.h
+enc/windows_1257.$(OBJEXT): internal/dosish.h
+enc/windows_1257.$(OBJEXT): internal/error.h
+enc/windows_1257.$(OBJEXT): internal/eval.h
+enc/windows_1257.$(OBJEXT): internal/event.h
+enc/windows_1257.$(OBJEXT): internal/fl_type.h
+enc/windows_1257.$(OBJEXT): internal/gc.h
+enc/windows_1257.$(OBJEXT): internal/glob.h
+enc/windows_1257.$(OBJEXT): internal/globals.h
+enc/windows_1257.$(OBJEXT): internal/has/attribute.h
+enc/windows_1257.$(OBJEXT): internal/has/builtin.h
+enc/windows_1257.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_1257.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_1257.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_1257.$(OBJEXT): internal/has/extension.h
+enc/windows_1257.$(OBJEXT): internal/has/feature.h
+enc/windows_1257.$(OBJEXT): internal/has/warning.h
+enc/windows_1257.$(OBJEXT): internal/intern/array.h
+enc/windows_1257.$(OBJEXT): internal/intern/bignum.h
+enc/windows_1257.$(OBJEXT): internal/intern/class.h
+enc/windows_1257.$(OBJEXT): internal/intern/compar.h
+enc/windows_1257.$(OBJEXT): internal/intern/complex.h
+enc/windows_1257.$(OBJEXT): internal/intern/cont.h
+enc/windows_1257.$(OBJEXT): internal/intern/dir.h
+enc/windows_1257.$(OBJEXT): internal/intern/enum.h
+enc/windows_1257.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_1257.$(OBJEXT): internal/intern/error.h
+enc/windows_1257.$(OBJEXT): internal/intern/eval.h
+enc/windows_1257.$(OBJEXT): internal/intern/file.h
+enc/windows_1257.$(OBJEXT): internal/intern/gc.h
+enc/windows_1257.$(OBJEXT): internal/intern/hash.h
+enc/windows_1257.$(OBJEXT): internal/intern/io.h
+enc/windows_1257.$(OBJEXT): internal/intern/load.h
+enc/windows_1257.$(OBJEXT): internal/intern/marshal.h
+enc/windows_1257.$(OBJEXT): internal/intern/numeric.h
+enc/windows_1257.$(OBJEXT): internal/intern/object.h
+enc/windows_1257.$(OBJEXT): internal/intern/parse.h
+enc/windows_1257.$(OBJEXT): internal/intern/proc.h
+enc/windows_1257.$(OBJEXT): internal/intern/process.h
+enc/windows_1257.$(OBJEXT): internal/intern/random.h
+enc/windows_1257.$(OBJEXT): internal/intern/range.h
+enc/windows_1257.$(OBJEXT): internal/intern/rational.h
+enc/windows_1257.$(OBJEXT): internal/intern/re.h
+enc/windows_1257.$(OBJEXT): internal/intern/ruby.h
+enc/windows_1257.$(OBJEXT): internal/intern/select.h
+enc/windows_1257.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_1257.$(OBJEXT): internal/intern/signal.h
+enc/windows_1257.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_1257.$(OBJEXT): internal/intern/string.h
+enc/windows_1257.$(OBJEXT): internal/intern/struct.h
+enc/windows_1257.$(OBJEXT): internal/intern/thread.h
+enc/windows_1257.$(OBJEXT): internal/intern/time.h
+enc/windows_1257.$(OBJEXT): internal/intern/variable.h
+enc/windows_1257.$(OBJEXT): internal/intern/vm.h
+enc/windows_1257.$(OBJEXT): internal/interpreter.h
+enc/windows_1257.$(OBJEXT): internal/iterator.h
+enc/windows_1257.$(OBJEXT): internal/memory.h
+enc/windows_1257.$(OBJEXT): internal/method.h
+enc/windows_1257.$(OBJEXT): internal/module.h
+enc/windows_1257.$(OBJEXT): internal/newobj.h
+enc/windows_1257.$(OBJEXT): internal/rgengc.h
+enc/windows_1257.$(OBJEXT): internal/scan_args.h
+enc/windows_1257.$(OBJEXT): internal/special_consts.h
+enc/windows_1257.$(OBJEXT): internal/static_assert.h
+enc/windows_1257.$(OBJEXT): internal/stdalign.h
+enc/windows_1257.$(OBJEXT): internal/stdbool.h
+enc/windows_1257.$(OBJEXT): internal/symbol.h
+enc/windows_1257.$(OBJEXT): internal/value.h
+enc/windows_1257.$(OBJEXT): internal/value_type.h
+enc/windows_1257.$(OBJEXT): internal/variable.h
+enc/windows_1257.$(OBJEXT): internal/warning_push.h
+enc/windows_1257.$(OBJEXT): internal/xmalloc.h
enc/windows_1257.$(OBJEXT): missing.h
enc/windows_1257.$(OBJEXT): onigmo.h
+enc/windows_1257.$(OBJEXT): st.h
+enc/windows_1257.$(OBJEXT): subst.h
+enc/windows_31j.$(OBJEXT): $(hdrdir)/ruby.h
+enc/windows_31j.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enc/windows_31j.$(OBJEXT): $(top_srcdir)/regenc.h
+enc/windows_31j.$(OBJEXT): assert.h
+enc/windows_31j.$(OBJEXT): backward.h
+enc/windows_31j.$(OBJEXT): backward/2/assume.h
+enc/windows_31j.$(OBJEXT): backward/2/attributes.h
+enc/windows_31j.$(OBJEXT): backward/2/bool.h
+enc/windows_31j.$(OBJEXT): backward/2/inttypes.h
+enc/windows_31j.$(OBJEXT): backward/2/limits.h
+enc/windows_31j.$(OBJEXT): backward/2/long_long.h
+enc/windows_31j.$(OBJEXT): backward/2/stdalign.h
+enc/windows_31j.$(OBJEXT): backward/2/stdarg.h
enc/windows_31j.$(OBJEXT): config.h
enc/windows_31j.$(OBJEXT): defines.h
enc/windows_31j.$(OBJEXT): enc/jis/props.h
enc/windows_31j.$(OBJEXT): enc/jis/props.kwd
enc/windows_31j.$(OBJEXT): enc/shift_jis.h
enc/windows_31j.$(OBJEXT): enc/windows_31j.c
+enc/windows_31j.$(OBJEXT): intern.h
+enc/windows_31j.$(OBJEXT): internal/abi.h
+enc/windows_31j.$(OBJEXT): internal/anyargs.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/char.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/double.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/fixnum.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/gid_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/int.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/intptr_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/long.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/long_long.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/mode_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/off_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/pid_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/short.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/size_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/st_data_t.h
+enc/windows_31j.$(OBJEXT): internal/arithmetic/uid_t.h
+enc/windows_31j.$(OBJEXT): internal/assume.h
+enc/windows_31j.$(OBJEXT): internal/attr/alloc_size.h
+enc/windows_31j.$(OBJEXT): internal/attr/artificial.h
+enc/windows_31j.$(OBJEXT): internal/attr/cold.h
+enc/windows_31j.$(OBJEXT): internal/attr/const.h
+enc/windows_31j.$(OBJEXT): internal/attr/constexpr.h
+enc/windows_31j.$(OBJEXT): internal/attr/deprecated.h
+enc/windows_31j.$(OBJEXT): internal/attr/diagnose_if.h
+enc/windows_31j.$(OBJEXT): internal/attr/enum_extensibility.h
+enc/windows_31j.$(OBJEXT): internal/attr/error.h
+enc/windows_31j.$(OBJEXT): internal/attr/flag_enum.h
+enc/windows_31j.$(OBJEXT): internal/attr/forceinline.h
+enc/windows_31j.$(OBJEXT): internal/attr/format.h
+enc/windows_31j.$(OBJEXT): internal/attr/maybe_unused.h
+enc/windows_31j.$(OBJEXT): internal/attr/noalias.h
+enc/windows_31j.$(OBJEXT): internal/attr/nodiscard.h
+enc/windows_31j.$(OBJEXT): internal/attr/noexcept.h
+enc/windows_31j.$(OBJEXT): internal/attr/noinline.h
+enc/windows_31j.$(OBJEXT): internal/attr/nonnull.h
+enc/windows_31j.$(OBJEXT): internal/attr/noreturn.h
+enc/windows_31j.$(OBJEXT): internal/attr/pure.h
+enc/windows_31j.$(OBJEXT): internal/attr/restrict.h
+enc/windows_31j.$(OBJEXT): internal/attr/returns_nonnull.h
+enc/windows_31j.$(OBJEXT): internal/attr/warning.h
+enc/windows_31j.$(OBJEXT): internal/attr/weakref.h
+enc/windows_31j.$(OBJEXT): internal/cast.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/apple.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/clang.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/gcc.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/intel.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/msvc.h
+enc/windows_31j.$(OBJEXT): internal/compiler_is/sunpro.h
+enc/windows_31j.$(OBJEXT): internal/compiler_since.h
+enc/windows_31j.$(OBJEXT): internal/config.h
+enc/windows_31j.$(OBJEXT): internal/constant_p.h
+enc/windows_31j.$(OBJEXT): internal/core.h
+enc/windows_31j.$(OBJEXT): internal/core/rarray.h
+enc/windows_31j.$(OBJEXT): internal/core/rbasic.h
+enc/windows_31j.$(OBJEXT): internal/core/rbignum.h
+enc/windows_31j.$(OBJEXT): internal/core/rclass.h
+enc/windows_31j.$(OBJEXT): internal/core/rdata.h
+enc/windows_31j.$(OBJEXT): internal/core/rfile.h
+enc/windows_31j.$(OBJEXT): internal/core/rhash.h
+enc/windows_31j.$(OBJEXT): internal/core/robject.h
+enc/windows_31j.$(OBJEXT): internal/core/rregexp.h
+enc/windows_31j.$(OBJEXT): internal/core/rstring.h
+enc/windows_31j.$(OBJEXT): internal/core/rstruct.h
+enc/windows_31j.$(OBJEXT): internal/core/rtypeddata.h
+enc/windows_31j.$(OBJEXT): internal/ctype.h
+enc/windows_31j.$(OBJEXT): internal/dllexport.h
+enc/windows_31j.$(OBJEXT): internal/dosish.h
+enc/windows_31j.$(OBJEXT): internal/error.h
+enc/windows_31j.$(OBJEXT): internal/eval.h
+enc/windows_31j.$(OBJEXT): internal/event.h
+enc/windows_31j.$(OBJEXT): internal/fl_type.h
+enc/windows_31j.$(OBJEXT): internal/gc.h
+enc/windows_31j.$(OBJEXT): internal/glob.h
+enc/windows_31j.$(OBJEXT): internal/globals.h
+enc/windows_31j.$(OBJEXT): internal/has/attribute.h
+enc/windows_31j.$(OBJEXT): internal/has/builtin.h
+enc/windows_31j.$(OBJEXT): internal/has/c_attribute.h
+enc/windows_31j.$(OBJEXT): internal/has/cpp_attribute.h
+enc/windows_31j.$(OBJEXT): internal/has/declspec_attribute.h
+enc/windows_31j.$(OBJEXT): internal/has/extension.h
+enc/windows_31j.$(OBJEXT): internal/has/feature.h
+enc/windows_31j.$(OBJEXT): internal/has/warning.h
+enc/windows_31j.$(OBJEXT): internal/intern/array.h
+enc/windows_31j.$(OBJEXT): internal/intern/bignum.h
+enc/windows_31j.$(OBJEXT): internal/intern/class.h
+enc/windows_31j.$(OBJEXT): internal/intern/compar.h
+enc/windows_31j.$(OBJEXT): internal/intern/complex.h
+enc/windows_31j.$(OBJEXT): internal/intern/cont.h
+enc/windows_31j.$(OBJEXT): internal/intern/dir.h
+enc/windows_31j.$(OBJEXT): internal/intern/enum.h
+enc/windows_31j.$(OBJEXT): internal/intern/enumerator.h
+enc/windows_31j.$(OBJEXT): internal/intern/error.h
+enc/windows_31j.$(OBJEXT): internal/intern/eval.h
+enc/windows_31j.$(OBJEXT): internal/intern/file.h
+enc/windows_31j.$(OBJEXT): internal/intern/gc.h
+enc/windows_31j.$(OBJEXT): internal/intern/hash.h
+enc/windows_31j.$(OBJEXT): internal/intern/io.h
+enc/windows_31j.$(OBJEXT): internal/intern/load.h
+enc/windows_31j.$(OBJEXT): internal/intern/marshal.h
+enc/windows_31j.$(OBJEXT): internal/intern/numeric.h
+enc/windows_31j.$(OBJEXT): internal/intern/object.h
+enc/windows_31j.$(OBJEXT): internal/intern/parse.h
+enc/windows_31j.$(OBJEXT): internal/intern/proc.h
+enc/windows_31j.$(OBJEXT): internal/intern/process.h
+enc/windows_31j.$(OBJEXT): internal/intern/random.h
+enc/windows_31j.$(OBJEXT): internal/intern/range.h
+enc/windows_31j.$(OBJEXT): internal/intern/rational.h
+enc/windows_31j.$(OBJEXT): internal/intern/re.h
+enc/windows_31j.$(OBJEXT): internal/intern/ruby.h
+enc/windows_31j.$(OBJEXT): internal/intern/select.h
+enc/windows_31j.$(OBJEXT): internal/intern/select/largesize.h
+enc/windows_31j.$(OBJEXT): internal/intern/signal.h
+enc/windows_31j.$(OBJEXT): internal/intern/sprintf.h
+enc/windows_31j.$(OBJEXT): internal/intern/string.h
+enc/windows_31j.$(OBJEXT): internal/intern/struct.h
+enc/windows_31j.$(OBJEXT): internal/intern/thread.h
+enc/windows_31j.$(OBJEXT): internal/intern/time.h
+enc/windows_31j.$(OBJEXT): internal/intern/variable.h
+enc/windows_31j.$(OBJEXT): internal/intern/vm.h
+enc/windows_31j.$(OBJEXT): internal/interpreter.h
+enc/windows_31j.$(OBJEXT): internal/iterator.h
+enc/windows_31j.$(OBJEXT): internal/memory.h
+enc/windows_31j.$(OBJEXT): internal/method.h
+enc/windows_31j.$(OBJEXT): internal/module.h
+enc/windows_31j.$(OBJEXT): internal/newobj.h
+enc/windows_31j.$(OBJEXT): internal/rgengc.h
+enc/windows_31j.$(OBJEXT): internal/scan_args.h
+enc/windows_31j.$(OBJEXT): internal/special_consts.h
+enc/windows_31j.$(OBJEXT): internal/static_assert.h
+enc/windows_31j.$(OBJEXT): internal/stdalign.h
+enc/windows_31j.$(OBJEXT): internal/stdbool.h
+enc/windows_31j.$(OBJEXT): internal/symbol.h
+enc/windows_31j.$(OBJEXT): internal/value.h
+enc/windows_31j.$(OBJEXT): internal/value_type.h
+enc/windows_31j.$(OBJEXT): internal/variable.h
+enc/windows_31j.$(OBJEXT): internal/warning_push.h
+enc/windows_31j.$(OBJEXT): internal/xmalloc.h
enc/windows_31j.$(OBJEXT): missing.h
enc/windows_31j.$(OBJEXT): onigmo.h
+enc/windows_31j.$(OBJEXT): st.h
+enc/windows_31j.$(OBJEXT): subst.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/enc/encdb.c b/enc/encdb.c
index a41e4edc6d..8247e9ff6a 100644
--- a/enc/encdb.c
+++ b/enc/encdb.c
@@ -9,7 +9,7 @@
**********************************************************************/
-#include "internal.h"
+#include "internal/encoding.h"
#define ENC_REPLICATE(name, orig) rb_encdb_replicate((name), (orig))
#define ENC_ALIAS(name, orig) rb_encdb_alias((name), (orig))
@@ -17,7 +17,7 @@
#define ENC_DEFINE(name) rb_encdb_declare(name)
#define ENC_SET_BASE(name, orig) rb_enc_set_base((name), (orig))
#define ENC_SET_DUMMY(name, orig) rb_enc_set_dummy(name)
-#define ENC_DUMMY_UNICODE(name) rb_encdb_set_unicode(rb_enc_set_dummy(ENC_REPLICATE((name), name "BE")))
+#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
void
Init_encdb(void)
diff --git a/enc/encinit.c.erb b/enc/encinit.c.erb
index 70c2a1934c..120408f8e3 100644
--- a/enc/encinit.c.erb
+++ b/enc/encinit.c.erb
@@ -2,6 +2,7 @@
* Author: yugui@google.com (Yugui Sonoda)
*/
#include <stdio.h>
+#include "ruby.h"
#define init(func, name) { \
extern void func(void); \
diff --git a/enc/euc_jp.c b/enc/euc_jp.c
index ded051af69..d283bf4ebb 100644
--- a/enc/euc_jp.c
+++ b/enc/euc_jp.c
@@ -593,7 +593,7 @@ ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese
* Name: eucJP-ms
* Link: http://home.m05.itscom.net/numa/cde/ucs-conv/ucs-conv.html
* Link: http://www2d.biglobe.ne.jp/~msyk/charcode/cp932/eucJP-ms.html
- * Link: http://ja.wikipedia.org/wiki/EUC-JP
+ * Link: https://ja.wikipedia.org/wiki/EUC-JP
*/
ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */
ENC_ALIAS("euc-jp-ms", "eucJP-ms")
@@ -610,7 +610,7 @@ ENC_REPLICATE("CP51932", "EUC-JP")
/*
* Name: EUC-JIS-2004
- * Link: http://ja.wikipedia.org/wiki/EUC-JIS-2004
+ * Link: https://ja.wikipedia.org/wiki/EUC-JIS-2004
*/
ENC_REPLICATE("EUC-JIS-2004", "EUC-JP") /* defined at JIS X 0213:2004 */
ENC_ALIAS("EUC-JISX0213", "EUC-JIS-2004") /* defined at JIS X 0213:2000, and obsolete at JIS X 0213:2004 */
diff --git a/enc/iso_8859_11.c b/enc/iso_8859_11.c
index 85e8f2cdb4..b9c6119fd9 100644
--- a/enc/iso_8859_11.c
+++ b/enc/iso_8859_11.c
@@ -102,7 +102,7 @@ ENC_ALIAS("ISO8859-11", "ISO-8859-11")
/*
* Name: TIS-620
* MIBenum: 2259
- * Link: http://en.wikipedia.org/wiki/Thai_Industrial_Standard_620-2533
+ * Link: https://en.wikipedia.org/wiki/Thai_Industrial_Standard_620-2533
*/
ENC_REPLICATE("TIS-620", "ISO-8859-11")
diff --git a/enc/iso_8859_6.c b/enc/iso_8859_6.c
index 6d852ac8c0..cdb74054d1 100644
--- a/enc/iso_8859_6.c
+++ b/enc/iso_8859_6.c
@@ -104,7 +104,7 @@ ENC_ALIAS("ISO8859-6", "ISO-8859-6")
* MIBenum: 2256
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1256.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1256
+ * Link: https://en.wikipedia.org/wiki/Windows-1256
*/
ENC_REPLICATE("Windows-1256", "ISO-8859-6")
ENC_ALIAS("CP1256", "Windows-1256")
diff --git a/enc/iso_8859_8.c b/enc/iso_8859_8.c
index 0a7a29e82e..e256855f21 100644
--- a/enc/iso_8859_8.c
+++ b/enc/iso_8859_8.c
@@ -104,7 +104,7 @@ ENC_ALIAS("ISO8859-8", "ISO-8859-8")
* MIBenum: 2255
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1255.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1255
+ * Link: https://en.wikipedia.org/wiki/Windows-1255
*/
ENC_REPLICATE("Windows-1255", "ISO-8859-8")
ENC_ALIAS("CP1255", "Windows-1255")
diff --git a/enc/jis/props.h.blt b/enc/jis/props.h.blt
index 54aa94f8bc..508a084449 100644
--- a/enc/jis/props.h.blt
+++ b/enc/jis/props.h.blt
@@ -69,7 +69,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(/*const char *str, unsigned int len*/);
+static const struct enc_property *onig_jis_property(register const char *str, register size_t len);
#line 43 "enc/jis/props.kwd"
struct enc_property;
@@ -82,7 +82,7 @@ struct enc_property;
#ifndef GPERF_DOWNCASE
#define GPERF_DOWNCASE 1
-static unsigned char gperf_downcase[256] =
+static const unsigned char gperf_downcase[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
diff --git a/enc/jis/props.kwd b/enc/jis/props.kwd
index 659cf0aff4..9606828459 100644
--- a/enc/jis/props.kwd
+++ b/enc/jis/props.kwd
@@ -37,7 +37,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/);
+static const struct enc_property *onig_jis_property(register const char *str, register size_t len);
%}
struct enc_property;
diff --git a/enc/jis/props.src b/enc/jis/props.src
index 659cf0aff4..9606828459 100644
--- a/enc/jis/props.src
+++ b/enc/jis/props.src
@@ -37,7 +37,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/);
+static const struct enc_property *onig_jis_property(register const char *str, register size_t len);
%}
struct enc_property;
diff --git a/enc/make_encmake.rb b/enc/make_encmake.rb
index bc0597e3f4..fcfc2c9267 100755
--- a/enc/make_encmake.rb
+++ b/enc/make_encmake.rb
@@ -134,7 +134,7 @@ else
end
mkin = File.read(File.join($srcdir, "Makefile.in"))
mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
-open(ARGV[0], 'wb') {|f|
+File.open(ARGV[0], 'wb') {|f|
f.puts mkin, dep
}
if MODULE_TYPE == :static
diff --git a/enc/shift_jis.c b/enc/shift_jis.c
index 65fd5102de..f1355d2d95 100644
--- a/enc/shift_jis.c
+++ b/enc/shift_jis.c
@@ -55,13 +55,13 @@ OnigEncodingDefine(shift_jis, Shift_JIS) = {
* Name: Shift_JIS
* MIBenum: 17
* Link: http://www.iana.org/assignments/character-sets
- * Link: http://ja.wikipedia.org/wiki/Shift_JIS
+ * Link: https://ja.wikipedia.org/wiki/Shift_JIS
*/
/*
* Name: MacJapanese
* Link: http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/JAPANESE.TXT
- * Link: http://ja.wikipedia.org/wiki/MacJapanese
+ * Link: https://ja.wikipedia.org/wiki/MacJapanese
*/
ENC_REPLICATE("MacJapanese", "Shift_JIS")
ENC_ALIAS("MacJapan", "MacJapanese")
diff --git a/enc/trans/escape.trans b/enc/trans/escape.trans
index c76ffa0e06..36d9dd0f13 100644
--- a/enc/trans/escape.trans
+++ b/enc/trans/escape.trans
@@ -18,9 +18,10 @@
], nil)
transcode_tblgen("", "xml_attr_content_escape", [
- ["{00-21,23-25,27-3B,3D,3F-FF}", :nomap],
+ ["{00-21,23-25,28-3B,3D,3F-FF}", :nomap],
["22", hexstr("&quot;")],
["26", hexstr("&amp;")],
+ ["27", hexstr("&apos;")],
["3C", hexstr("&lt;")],
["3E", hexstr("&gt;")]
], nil)
diff --git a/enc/trans/ibm720-tbl.rb b/enc/trans/ibm720-tbl.rb
new file mode 100644
index 0000000000..558684d649
--- /dev/null
+++ b/enc/trans/ibm720-tbl.rb
@@ -0,0 +1,122 @@
+IBM720_TO_UCS_TBL = [
+ ["FF",0xA0],
+ ["9C",0xA3],
+ ["94",0xA4],
+ ["AE",0xAB],
+ ["F8",0xB0],
+ ["FD",0xB2],
+ ["E6",0xB5],
+ ["FA",0xB7],
+ ["AF",0xBB],
+ ["85",0xE0],
+ ["83",0xE2],
+ ["87",0xE7],
+ ["8A",0xE8],
+ ["82",0xE9],
+ ["88",0xEA],
+ ["89",0xEB],
+ ["8C",0xEE],
+ ["8B",0xEF],
+ ["93",0xF4],
+ ["97",0xF9],
+ ["96",0xFB],
+ ["98",0x621],
+ ["99",0x622],
+ ["9A",0x623],
+ ["9B",0x624],
+ ["9D",0x625],
+ ["9E",0x626],
+ ["9F",0x627],
+ ["A0",0x628],
+ ["A1",0x629],
+ ["A2",0x62A],
+ ["A3",0x62B],
+ ["A4",0x62C],
+ ["A5",0x62D],
+ ["A6",0x62E],
+ ["A7",0x62F],
+ ["A8",0x630],
+ ["A9",0x631],
+ ["AA",0x632],
+ ["AB",0x633],
+ ["AC",0x634],
+ ["AD",0x635],
+ ["E0",0x636],
+ ["E1",0x637],
+ ["E2",0x638],
+ ["E3",0x639],
+ ["E4",0x63A],
+ ["95",0x640],
+ ["E5",0x641],
+ ["E7",0x642],
+ ["E8",0x643],
+ ["E9",0x644],
+ ["EA",0x645],
+ ["EB",0x646],
+ ["EC",0x647],
+ ["ED",0x648],
+ ["EE",0x649],
+ ["EF",0x64A],
+ ["F1",0x64B],
+ ["F2",0x64C],
+ ["F3",0x64D],
+ ["F4",0x64E],
+ ["F5",0x64F],
+ ["F6",0x650],
+ ["91",0x651],
+ ["92",0x652],
+ ["FC",0x207F],
+ ["F9",0x2219],
+ ["FB",0x221A],
+ ["F7",0x2248],
+ ["F0",0x2261],
+ ["C4",0x2500],
+ ["B3",0x2502],
+ ["DA",0x250C],
+ ["BF",0x2510],
+ ["C0",0x2514],
+ ["D9",0x2518],
+ ["C3",0x251C],
+ ["B4",0x2524],
+ ["C2",0x252C],
+ ["C1",0x2534],
+ ["C5",0x253C],
+ ["CD",0x2550],
+ ["BA",0x2551],
+ ["D5",0x2552],
+ ["D6",0x2553],
+ ["C9",0x2554],
+ ["B8",0x2555],
+ ["B7",0x2556],
+ ["BB",0x2557],
+ ["D4",0x2558],
+ ["D3",0x2559],
+ ["C8",0x255A],
+ ["BE",0x255B],
+ ["BD",0x255C],
+ ["BC",0x255D],
+ ["C6",0x255E],
+ ["C7",0x255F],
+ ["CC",0x2560],
+ ["B5",0x2561],
+ ["B6",0x2562],
+ ["B9",0x2563],
+ ["D1",0x2564],
+ ["D2",0x2565],
+ ["CB",0x2566],
+ ["CF",0x2567],
+ ["D0",0x2568],
+ ["CA",0x2569],
+ ["D8",0x256A],
+ ["D7",0x256B],
+ ["CE",0x256C],
+ ["DF",0x2580],
+ ["DC",0x2584],
+ ["DB",0x2588],
+ ["DD",0x258C],
+ ["DE",0x2590],
+ ["B0",0x2591],
+ ["B1",0x2592],
+ ["B2",0x2593],
+ ["FE",0x25A0],
+]
diff --git a/enc/trans/newline.trans b/enc/trans/newline.trans
index a200ec00a7..95e082f5bd 100644
--- a/enc/trans/newline.trans
+++ b/enc/trans/newline.trans
@@ -17,10 +17,16 @@
map_cr["0a"] = "0d"
transcode_generate_node(ActionMap.parse(map_cr), "cr_newline")
+
+ map_normalize = {}
+ map_normalize["{00-ff}"] = :func_so
+
+ transcode_generate_node(ActionMap.parse(map_normalize), "lf_newline")
%>
<%= transcode_generated_code %>
+#define lf_newline universal_newline
#define STATE (sp[0])
#define NORMAL 0
#define JUST_AFTER_CR 1
@@ -98,7 +104,7 @@ rb_universal_newline = {
2, /* max_output */
asciicompat_converter, /* asciicompat_type */
2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */
- NULL, NULL, NULL, fun_so_universal_newline,
+ 0, 0, 0, fun_so_universal_newline,
universal_newline_finish
};
@@ -110,8 +116,8 @@ rb_crlf_newline = {
1, /* max_input */
2, /* max_output */
asciicompat_converter, /* asciicompat_type */
- 0, NULL, NULL, /* state_size, state_init, state_fini */
- NULL, NULL, NULL, NULL
+ 0, 0, 0, /* state_size, state_init, state_fini */
+ 0, 0, 0, 0
};
static const rb_transcoder
@@ -122,8 +128,21 @@ rb_cr_newline = {
1, /* max_input */
1, /* max_output */
asciicompat_converter, /* asciicompat_type */
- 0, NULL, NULL, /* state_size, state_init, state_fini */
- NULL, NULL, NULL, NULL
+ 0, 0, 0, /* state_size, state_init, state_fini */
+ 0, 0, 0, 0
+};
+
+static const rb_transcoder
+rb_lf_newline = {
+ "", "lf_newline", lf_newline,
+ TRANSCODE_TABLE_INFO,
+ 1, /* input_unit_length */
+ 1, /* max_input */
+ 2, /* max_output */
+ asciicompat_converter, /* asciicompat_type */
+ 2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */
+ 0, 0, 0, fun_so_universal_newline,
+ universal_newline_finish
};
void
@@ -132,4 +151,5 @@ Init_newline(void)
rb_register_transcoder(&rb_universal_newline);
rb_register_transcoder(&rb_crlf_newline);
rb_register_transcoder(&rb_cr_newline);
+ rb_register_transcoder(&rb_lf_newline);
}
diff --git a/enc/trans/single_byte.trans b/enc/trans/single_byte.trans
index cf521bed38..0d5407b918 100644
--- a/enc/trans/single_byte.trans
+++ b/enc/trans/single_byte.trans
@@ -51,8 +51,9 @@
transcode_tblgen_singlebyte "WINDOWS-1256"
transcode_tblgen_singlebyte "WINDOWS-1257"
transcode_tblgen_singlebyte "IBM437"
- transcode_tblgen_singlebyte "IBM775"
+ transcode_tblgen_singlebyte "IBM720"
transcode_tblgen_singlebyte "IBM737"
+ transcode_tblgen_singlebyte "IBM775"
transcode_tblgen_singlebyte "IBM852"
transcode_tblgen_singlebyte "IBM855"
transcode_tblgen_singlebyte "IBM857"
diff --git a/enc/trans/transdb.c b/enc/trans/transdb.c
index d6ac41e967..7caf8d845d 100644
--- a/enc/trans/transdb.c
+++ b/enc/trans/transdb.c
@@ -9,6 +9,8 @@
**********************************************************************/
+#include "ruby.h"
+
void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib);
void
diff --git a/enc/unicode.c b/enc/unicode.c
index 6e8c3d8816..18fba02476 100644
--- a/enc/unicode.c
+++ b/enc/unicode.c
@@ -493,6 +493,10 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
#endif
if ((to = onigenc_unicode_fold_lookup(code)) != 0) {
+ if (OnigCodePointCount(to->n) == 0) {
+ /* any codepoint should not be empty */
+ UNREACHABLE_RETURN(0);
+ }
if (OnigCodePointCount(to->n) == 1) {
OnigCodePoint orig_code = code;
diff --git a/enc/unicode/12.1.0/casefold.h b/enc/unicode/12.1.0/casefold.h
deleted file mode 100644
index 4c62f0faee..0000000000
--- a/enc/unicode/12.1.0/casefold.h
+++ /dev/null
@@ -1,7428 +0,0 @@
-/* DO NOT EDIT THIS FILE. */
-/* Generated by enc/unicode/case-folding.rb */
-
-#if defined ONIG_UNICODE_VERSION_STRING && !( \
- ONIG_UNICODE_VERSION_MAJOR == 12 && \
- ONIG_UNICODE_VERSION_MINOR == 1 && \
- ONIG_UNICODE_VERSION_TEENY == 0 && \
- 1)
-# error ONIG_UNICODE_VERSION_STRING mismatch
-#endif
-#define ONIG_UNICODE_VERSION_STRING "12.1.0"
-#define ONIG_UNICODE_VERSION_MAJOR 12
-#define ONIG_UNICODE_VERSION_MINOR 1
-#define ONIG_UNICODE_VERSION_TEENY 0
-
-static const CaseFold_11_Type CaseFold_11_Table[] = {
-#define CaseFold (*(CaseFold_11_Type (*)[1485])(CaseFold_11_Table+0))
- {0x0041, {1|F|D, {0x0061}}},
- {0x0042, {1|F|D, {0x0062}}},
- {0x0043, {1|F|D, {0x0063}}},
- {0x0044, {1|F|D, {0x0064}}},
- {0x0045, {1|F|D, {0x0065}}},
- {0x0046, {1|F|D, {0x0066}}},
- {0x0047, {1|F|D, {0x0067}}},
- {0x0048, {1|F|D, {0x0068}}},
- {0x004a, {1|F|D, {0x006a}}},
- {0x004b, {1|F|D, {0x006b}}},
- {0x004c, {1|F|D, {0x006c}}},
- {0x004d, {1|F|D, {0x006d}}},
- {0x004e, {1|F|D, {0x006e}}},
- {0x004f, {1|F|D, {0x006f}}},
- {0x0050, {1|F|D, {0x0070}}},
- {0x0051, {1|F|D, {0x0071}}},
- {0x0052, {1|F|D, {0x0072}}},
- {0x0053, {1|F|D, {0x0073}}},
- {0x0054, {1|F|D, {0x0074}}},
- {0x0055, {1|F|D, {0x0075}}},
- {0x0056, {1|F|D, {0x0076}}},
- {0x0057, {1|F|D, {0x0077}}},
- {0x0058, {1|F|D, {0x0078}}},
- {0x0059, {1|F|D, {0x0079}}},
- {0x005a, {1|F|D, {0x007a}}},
- {0x00b5, {1|F|SU|I(0), {0x03bc}}},
- {0x00c0, {1|F|D, {0x00e0}}},
- {0x00c1, {1|F|D, {0x00e1}}},
- {0x00c2, {1|F|D, {0x00e2}}},
- {0x00c3, {1|F|D, {0x00e3}}},
- {0x00c4, {1|F|D, {0x00e4}}},
- {0x00c5, {1|F|D, {0x00e5}}},
- {0x00c6, {1|F|D, {0x00e6}}},
- {0x00c7, {1|F|D, {0x00e7}}},
- {0x00c8, {1|F|D, {0x00e8}}},
- {0x00c9, {1|F|D, {0x00e9}}},
- {0x00ca, {1|F|D, {0x00ea}}},
- {0x00cb, {1|F|D, {0x00eb}}},
- {0x00cc, {1|F|D, {0x00ec}}},
- {0x00cd, {1|F|D, {0x00ed}}},
- {0x00ce, {1|F|D, {0x00ee}}},
- {0x00cf, {1|F|D, {0x00ef}}},
- {0x00d0, {1|F|D, {0x00f0}}},
- {0x00d1, {1|F|D, {0x00f1}}},
- {0x00d2, {1|F|D, {0x00f2}}},
- {0x00d3, {1|F|D, {0x00f3}}},
- {0x00d4, {1|F|D, {0x00f4}}},
- {0x00d5, {1|F|D, {0x00f5}}},
- {0x00d6, {1|F|D, {0x00f6}}},
- {0x00d8, {1|F|D, {0x00f8}}},
- {0x00d9, {1|F|D, {0x00f9}}},
- {0x00da, {1|F|D, {0x00fa}}},
- {0x00db, {1|F|D, {0x00fb}}},
- {0x00dc, {1|F|D, {0x00fc}}},
- {0x00dd, {1|F|D, {0x00fd}}},
- {0x00de, {1|F|D, {0x00fe}}},
- {0x00df, {2|F|ST|SU|I(1), {0x0073, 0x0073}}},
- {0x0100, {1|F|D, {0x0101}}},
- {0x0102, {1|F|D, {0x0103}}},
- {0x0104, {1|F|D, {0x0105}}},
- {0x0106, {1|F|D, {0x0107}}},
- {0x0108, {1|F|D, {0x0109}}},
- {0x010a, {1|F|D, {0x010b}}},
- {0x010c, {1|F|D, {0x010d}}},
- {0x010e, {1|F|D, {0x010f}}},
- {0x0110, {1|F|D, {0x0111}}},
- {0x0112, {1|F|D, {0x0113}}},
- {0x0114, {1|F|D, {0x0115}}},
- {0x0116, {1|F|D, {0x0117}}},
- {0x0118, {1|F|D, {0x0119}}},
- {0x011a, {1|F|D, {0x011b}}},
- {0x011c, {1|F|D, {0x011d}}},
- {0x011e, {1|F|D, {0x011f}}},
- {0x0120, {1|F|D, {0x0121}}},
- {0x0122, {1|F|D, {0x0123}}},
- {0x0124, {1|F|D, {0x0125}}},
- {0x0126, {1|F|D, {0x0127}}},
- {0x0128, {1|F|D, {0x0129}}},
- {0x012a, {1|F|D, {0x012b}}},
- {0x012c, {1|F|D, {0x012d}}},
- {0x012e, {1|F|D, {0x012f}}},
- {0x0132, {1|F|D, {0x0133}}},
- {0x0134, {1|F|D, {0x0135}}},
- {0x0136, {1|F|D, {0x0137}}},
- {0x0139, {1|F|D, {0x013a}}},
- {0x013b, {1|F|D, {0x013c}}},
- {0x013d, {1|F|D, {0x013e}}},
- {0x013f, {1|F|D, {0x0140}}},
- {0x0141, {1|F|D, {0x0142}}},
- {0x0143, {1|F|D, {0x0144}}},
- {0x0145, {1|F|D, {0x0146}}},
- {0x0147, {1|F|D, {0x0148}}},
- {0x0149, {2|F|SU|I(5), {0x02bc, 0x006e}}},
- {0x014a, {1|F|D, {0x014b}}},
- {0x014c, {1|F|D, {0x014d}}},
- {0x014e, {1|F|D, {0x014f}}},
- {0x0150, {1|F|D, {0x0151}}},
- {0x0152, {1|F|D, {0x0153}}},
- {0x0154, {1|F|D, {0x0155}}},
- {0x0156, {1|F|D, {0x0157}}},
- {0x0158, {1|F|D, {0x0159}}},
- {0x015a, {1|F|D, {0x015b}}},
- {0x015c, {1|F|D, {0x015d}}},
- {0x015e, {1|F|D, {0x015f}}},
- {0x0160, {1|F|D, {0x0161}}},
- {0x0162, {1|F|D, {0x0163}}},
- {0x0164, {1|F|D, {0x0165}}},
- {0x0166, {1|F|D, {0x0167}}},
- {0x0168, {1|F|D, {0x0169}}},
- {0x016a, {1|F|D, {0x016b}}},
- {0x016c, {1|F|D, {0x016d}}},
- {0x016e, {1|F|D, {0x016f}}},
- {0x0170, {1|F|D, {0x0171}}},
- {0x0172, {1|F|D, {0x0173}}},
- {0x0174, {1|F|D, {0x0175}}},
- {0x0176, {1|F|D, {0x0177}}},
- {0x0178, {1|F|D, {0x00ff}}},
- {0x0179, {1|F|D, {0x017a}}},
- {0x017b, {1|F|D, {0x017c}}},
- {0x017d, {1|F|D, {0x017e}}},
- {0x017f, {1|F|SU|I(7), {0x0073}}},
- {0x0181, {1|F|D, {0x0253}}},
- {0x0182, {1|F|D, {0x0183}}},
- {0x0184, {1|F|D, {0x0185}}},
- {0x0186, {1|F|D, {0x0254}}},
- {0x0187, {1|F|D, {0x0188}}},
- {0x0189, {1|F|D, {0x0256}}},
- {0x018a, {1|F|D, {0x0257}}},
- {0x018b, {1|F|D, {0x018c}}},
- {0x018e, {1|F|D, {0x01dd}}},
- {0x018f, {1|F|D, {0x0259}}},
- {0x0190, {1|F|D, {0x025b}}},
- {0x0191, {1|F|D, {0x0192}}},
- {0x0193, {1|F|D, {0x0260}}},
- {0x0194, {1|F|D, {0x0263}}},
- {0x0196, {1|F|D, {0x0269}}},
- {0x0197, {1|F|D, {0x0268}}},
- {0x0198, {1|F|D, {0x0199}}},
- {0x019c, {1|F|D, {0x026f}}},
- {0x019d, {1|F|D, {0x0272}}},
- {0x019f, {1|F|D, {0x0275}}},
- {0x01a0, {1|F|D, {0x01a1}}},
- {0x01a2, {1|F|D, {0x01a3}}},
- {0x01a4, {1|F|D, {0x01a5}}},
- {0x01a6, {1|F|D, {0x0280}}},
- {0x01a7, {1|F|D, {0x01a8}}},
- {0x01a9, {1|F|D, {0x0283}}},
- {0x01ac, {1|F|D, {0x01ad}}},
- {0x01ae, {1|F|D, {0x0288}}},
- {0x01af, {1|F|D, {0x01b0}}},
- {0x01b1, {1|F|D, {0x028a}}},
- {0x01b2, {1|F|D, {0x028b}}},
- {0x01b3, {1|F|D, {0x01b4}}},
- {0x01b5, {1|F|D, {0x01b6}}},
- {0x01b7, {1|F|D, {0x0292}}},
- {0x01b8, {1|F|D, {0x01b9}}},
- {0x01bc, {1|F|D, {0x01bd}}},
- {0x01c4, {1|F|D|ST|I(8), {0x01c6}}},
- {0x01c5, {1|F|D|IT|SU|I(9), {0x01c6}}},
- {0x01c7, {1|F|D|ST|I(12), {0x01c9}}},
- {0x01c8, {1|F|D|IT|SU|I(13), {0x01c9}}},
- {0x01ca, {1|F|D|ST|I(16), {0x01cc}}},
- {0x01cb, {1|F|D|IT|SU|I(17), {0x01cc}}},
- {0x01cd, {1|F|D, {0x01ce}}},
- {0x01cf, {1|F|D, {0x01d0}}},
- {0x01d1, {1|F|D, {0x01d2}}},
- {0x01d3, {1|F|D, {0x01d4}}},
- {0x01d5, {1|F|D, {0x01d6}}},
- {0x01d7, {1|F|D, {0x01d8}}},
- {0x01d9, {1|F|D, {0x01da}}},
- {0x01db, {1|F|D, {0x01dc}}},
- {0x01de, {1|F|D, {0x01df}}},
- {0x01e0, {1|F|D, {0x01e1}}},
- {0x01e2, {1|F|D, {0x01e3}}},
- {0x01e4, {1|F|D, {0x01e5}}},
- {0x01e6, {1|F|D, {0x01e7}}},
- {0x01e8, {1|F|D, {0x01e9}}},
- {0x01ea, {1|F|D, {0x01eb}}},
- {0x01ec, {1|F|D, {0x01ed}}},
- {0x01ee, {1|F|D, {0x01ef}}},
- {0x01f0, {2|F|SU|I(20), {0x006a, 0x030c}}},
- {0x01f1, {1|F|D|ST|I(22), {0x01f3}}},
- {0x01f2, {1|F|D|IT|SU|I(23), {0x01f3}}},
- {0x01f4, {1|F|D, {0x01f5}}},
- {0x01f6, {1|F|D, {0x0195}}},
- {0x01f7, {1|F|D, {0x01bf}}},
- {0x01f8, {1|F|D, {0x01f9}}},
- {0x01fa, {1|F|D, {0x01fb}}},
- {0x01fc, {1|F|D, {0x01fd}}},
- {0x01fe, {1|F|D, {0x01ff}}},
- {0x0200, {1|F|D, {0x0201}}},
- {0x0202, {1|F|D, {0x0203}}},
- {0x0204, {1|F|D, {0x0205}}},
- {0x0206, {1|F|D, {0x0207}}},
- {0x0208, {1|F|D, {0x0209}}},
- {0x020a, {1|F|D, {0x020b}}},
- {0x020c, {1|F|D, {0x020d}}},
- {0x020e, {1|F|D, {0x020f}}},
- {0x0210, {1|F|D, {0x0211}}},
- {0x0212, {1|F|D, {0x0213}}},
- {0x0214, {1|F|D, {0x0215}}},
- {0x0216, {1|F|D, {0x0217}}},
- {0x0218, {1|F|D, {0x0219}}},
- {0x021a, {1|F|D, {0x021b}}},
- {0x021c, {1|F|D, {0x021d}}},
- {0x021e, {1|F|D, {0x021f}}},
- {0x0220, {1|F|D, {0x019e}}},
- {0x0222, {1|F|D, {0x0223}}},
- {0x0224, {1|F|D, {0x0225}}},
- {0x0226, {1|F|D, {0x0227}}},
- {0x0228, {1|F|D, {0x0229}}},
- {0x022a, {1|F|D, {0x022b}}},
- {0x022c, {1|F|D, {0x022d}}},
- {0x022e, {1|F|D, {0x022f}}},
- {0x0230, {1|F|D, {0x0231}}},
- {0x0232, {1|F|D, {0x0233}}},
- {0x023a, {1|F|D, {0x2c65}}},
- {0x023b, {1|F|D, {0x023c}}},
- {0x023d, {1|F|D, {0x019a}}},
- {0x023e, {1|F|D, {0x2c66}}},
- {0x0241, {1|F|D, {0x0242}}},
- {0x0243, {1|F|D, {0x0180}}},
- {0x0244, {1|F|D, {0x0289}}},
- {0x0245, {1|F|D, {0x028c}}},
- {0x0246, {1|F|D, {0x0247}}},
- {0x0248, {1|F|D, {0x0249}}},
- {0x024a, {1|F|D, {0x024b}}},
- {0x024c, {1|F|D, {0x024d}}},
- {0x024e, {1|F|D, {0x024f}}},
- {0x0345, {1|F|SU|I(26), {0x03b9}}},
- {0x0370, {1|F|D, {0x0371}}},
- {0x0372, {1|F|D, {0x0373}}},
- {0x0376, {1|F|D, {0x0377}}},
- {0x037f, {1|F|D, {0x03f3}}},
- {0x0386, {1|F|D, {0x03ac}}},
- {0x0388, {1|F|D, {0x03ad}}},
- {0x0389, {1|F|D, {0x03ae}}},
- {0x038a, {1|F|D, {0x03af}}},
- {0x038c, {1|F|D, {0x03cc}}},
- {0x038e, {1|F|D, {0x03cd}}},
- {0x038f, {1|F|D, {0x03ce}}},
- {0x0390, {3|F|SU|I(27), {0x03b9, 0x0308, 0x0301}}},
- {0x0391, {1|F|D, {0x03b1}}},
- {0x0392, {1|F|D, {0x03b2}}},
- {0x0393, {1|F|D, {0x03b3}}},
- {0x0394, {1|F|D, {0x03b4}}},
- {0x0395, {1|F|D, {0x03b5}}},
- {0x0396, {1|F|D, {0x03b6}}},
- {0x0397, {1|F|D, {0x03b7}}},
- {0x0398, {1|F|D, {0x03b8}}},
- {0x0399, {1|F|D, {0x03b9}}},
- {0x039a, {1|F|D, {0x03ba}}},
- {0x039b, {1|F|D, {0x03bb}}},
- {0x039c, {1|F|D, {0x03bc}}},
- {0x039d, {1|F|D, {0x03bd}}},
- {0x039e, {1|F|D, {0x03be}}},
- {0x039f, {1|F|D, {0x03bf}}},
- {0x03a0, {1|F|D, {0x03c0}}},
- {0x03a1, {1|F|D, {0x03c1}}},
- {0x03a3, {1|F|D, {0x03c3}}},
- {0x03a4, {1|F|D, {0x03c4}}},
- {0x03a5, {1|F|D, {0x03c5}}},
- {0x03a6, {1|F|D, {0x03c6}}},
- {0x03a7, {1|F|D, {0x03c7}}},
- {0x03a8, {1|F|D, {0x03c8}}},
- {0x03a9, {1|F|D, {0x03c9}}},
- {0x03aa, {1|F|D, {0x03ca}}},
- {0x03ab, {1|F|D, {0x03cb}}},
- {0x03b0, {3|F|SU|I(30), {0x03c5, 0x0308, 0x0301}}},
- {0x03c2, {1|F|SU|I(33), {0x03c3}}},
- {0x03cf, {1|F|D, {0x03d7}}},
- {0x03d0, {1|F|SU|I(34), {0x03b2}}},
- {0x03d1, {1|F|SU|I(35), {0x03b8}}},
- {0x03d5, {1|F|SU|I(36), {0x03c6}}},
- {0x03d6, {1|F|SU|I(37), {0x03c0}}},
- {0x03d8, {1|F|D, {0x03d9}}},
- {0x03da, {1|F|D, {0x03db}}},
- {0x03dc, {1|F|D, {0x03dd}}},
- {0x03de, {1|F|D, {0x03df}}},
- {0x03e0, {1|F|D, {0x03e1}}},
- {0x03e2, {1|F|D, {0x03e3}}},
- {0x03e4, {1|F|D, {0x03e5}}},
- {0x03e6, {1|F|D, {0x03e7}}},
- {0x03e8, {1|F|D, {0x03e9}}},
- {0x03ea, {1|F|D, {0x03eb}}},
- {0x03ec, {1|F|D, {0x03ed}}},
- {0x03ee, {1|F|D, {0x03ef}}},
- {0x03f0, {1|F|SU|I(38), {0x03ba}}},
- {0x03f1, {1|F|SU|I(39), {0x03c1}}},
- {0x03f4, {1|F|D, {0x03b8}}},
- {0x03f5, {1|F|SU|I(40), {0x03b5}}},
- {0x03f7, {1|F|D, {0x03f8}}},
- {0x03f9, {1|F|D, {0x03f2}}},
- {0x03fa, {1|F|D, {0x03fb}}},
- {0x03fd, {1|F|D, {0x037b}}},
- {0x03fe, {1|F|D, {0x037c}}},
- {0x03ff, {1|F|D, {0x037d}}},
- {0x0400, {1|F|D, {0x0450}}},
- {0x0401, {1|F|D, {0x0451}}},
- {0x0402, {1|F|D, {0x0452}}},
- {0x0403, {1|F|D, {0x0453}}},
- {0x0404, {1|F|D, {0x0454}}},
- {0x0405, {1|F|D, {0x0455}}},
- {0x0406, {1|F|D, {0x0456}}},
- {0x0407, {1|F|D, {0x0457}}},
- {0x0408, {1|F|D, {0x0458}}},
- {0x0409, {1|F|D, {0x0459}}},
- {0x040a, {1|F|D, {0x045a}}},
- {0x040b, {1|F|D, {0x045b}}},
- {0x040c, {1|F|D, {0x045c}}},
- {0x040d, {1|F|D, {0x045d}}},
- {0x040e, {1|F|D, {0x045e}}},
- {0x040f, {1|F|D, {0x045f}}},
- {0x0410, {1|F|D, {0x0430}}},
- {0x0411, {1|F|D, {0x0431}}},
- {0x0412, {1|F|D, {0x0432}}},
- {0x0413, {1|F|D, {0x0433}}},
- {0x0414, {1|F|D, {0x0434}}},
- {0x0415, {1|F|D, {0x0435}}},
- {0x0416, {1|F|D, {0x0436}}},
- {0x0417, {1|F|D, {0x0437}}},
- {0x0418, {1|F|D, {0x0438}}},
- {0x0419, {1|F|D, {0x0439}}},
- {0x041a, {1|F|D, {0x043a}}},
- {0x041b, {1|F|D, {0x043b}}},
- {0x041c, {1|F|D, {0x043c}}},
- {0x041d, {1|F|D, {0x043d}}},
- {0x041e, {1|F|D, {0x043e}}},
- {0x041f, {1|F|D, {0x043f}}},
- {0x0420, {1|F|D, {0x0440}}},
- {0x0421, {1|F|D, {0x0441}}},
- {0x0422, {1|F|D, {0x0442}}},
- {0x0423, {1|F|D, {0x0443}}},
- {0x0424, {1|F|D, {0x0444}}},
- {0x0425, {1|F|D, {0x0445}}},
- {0x0426, {1|F|D, {0x0446}}},
- {0x0427, {1|F|D, {0x0447}}},
- {0x0428, {1|F|D, {0x0448}}},
- {0x0429, {1|F|D, {0x0449}}},
- {0x042a, {1|F|D, {0x044a}}},
- {0x042b, {1|F|D, {0x044b}}},
- {0x042c, {1|F|D, {0x044c}}},
- {0x042d, {1|F|D, {0x044d}}},
- {0x042e, {1|F|D, {0x044e}}},
- {0x042f, {1|F|D, {0x044f}}},
- {0x0460, {1|F|D, {0x0461}}},
- {0x0462, {1|F|D, {0x0463}}},
- {0x0464, {1|F|D, {0x0465}}},
- {0x0466, {1|F|D, {0x0467}}},
- {0x0468, {1|F|D, {0x0469}}},
- {0x046a, {1|F|D, {0x046b}}},
- {0x046c, {1|F|D, {0x046d}}},
- {0x046e, {1|F|D, {0x046f}}},
- {0x0470, {1|F|D, {0x0471}}},
- {0x0472, {1|F|D, {0x0473}}},
- {0x0474, {1|F|D, {0x0475}}},
- {0x0476, {1|F|D, {0x0477}}},
- {0x0478, {1|F|D, {0x0479}}},
- {0x047a, {1|F|D, {0x047b}}},
- {0x047c, {1|F|D, {0x047d}}},
- {0x047e, {1|F|D, {0x047f}}},
- {0x0480, {1|F|D, {0x0481}}},
- {0x048a, {1|F|D, {0x048b}}},
- {0x048c, {1|F|D, {0x048d}}},
- {0x048e, {1|F|D, {0x048f}}},
- {0x0490, {1|F|D, {0x0491}}},
- {0x0492, {1|F|D, {0x0493}}},
- {0x0494, {1|F|D, {0x0495}}},
- {0x0496, {1|F|D, {0x0497}}},
- {0x0498, {1|F|D, {0x0499}}},
- {0x049a, {1|F|D, {0x049b}}},
- {0x049c, {1|F|D, {0x049d}}},
- {0x049e, {1|F|D, {0x049f}}},
- {0x04a0, {1|F|D, {0x04a1}}},
- {0x04a2, {1|F|D, {0x04a3}}},
- {0x04a4, {1|F|D, {0x04a5}}},
- {0x04a6, {1|F|D, {0x04a7}}},
- {0x04a8, {1|F|D, {0x04a9}}},
- {0x04aa, {1|F|D, {0x04ab}}},
- {0x04ac, {1|F|D, {0x04ad}}},
- {0x04ae, {1|F|D, {0x04af}}},
- {0x04b0, {1|F|D, {0x04b1}}},
- {0x04b2, {1|F|D, {0x04b3}}},
- {0x04b4, {1|F|D, {0x04b5}}},
- {0x04b6, {1|F|D, {0x04b7}}},
- {0x04b8, {1|F|D, {0x04b9}}},
- {0x04ba, {1|F|D, {0x04bb}}},
- {0x04bc, {1|F|D, {0x04bd}}},
- {0x04be, {1|F|D, {0x04bf}}},
- {0x04c0, {1|F|D, {0x04cf}}},
- {0x04c1, {1|F|D, {0x04c2}}},
- {0x04c3, {1|F|D, {0x04c4}}},
- {0x04c5, {1|F|D, {0x04c6}}},
- {0x04c7, {1|F|D, {0x04c8}}},
- {0x04c9, {1|F|D, {0x04ca}}},
- {0x04cb, {1|F|D, {0x04cc}}},
- {0x04cd, {1|F|D, {0x04ce}}},
- {0x04d0, {1|F|D, {0x04d1}}},
- {0x04d2, {1|F|D, {0x04d3}}},
- {0x04d4, {1|F|D, {0x04d5}}},
- {0x04d6, {1|F|D, {0x04d7}}},
- {0x04d8, {1|F|D, {0x04d9}}},
- {0x04da, {1|F|D, {0x04db}}},
- {0x04dc, {1|F|D, {0x04dd}}},
- {0x04de, {1|F|D, {0x04df}}},
- {0x04e0, {1|F|D, {0x04e1}}},
- {0x04e2, {1|F|D, {0x04e3}}},
- {0x04e4, {1|F|D, {0x04e5}}},
- {0x04e6, {1|F|D, {0x04e7}}},
- {0x04e8, {1|F|D, {0x04e9}}},
- {0x04ea, {1|F|D, {0x04eb}}},
- {0x04ec, {1|F|D, {0x04ed}}},
- {0x04ee, {1|F|D, {0x04ef}}},
- {0x04f0, {1|F|D, {0x04f1}}},
- {0x04f2, {1|F|D, {0x04f3}}},
- {0x04f4, {1|F|D, {0x04f5}}},
- {0x04f6, {1|F|D, {0x04f7}}},
- {0x04f8, {1|F|D, {0x04f9}}},
- {0x04fa, {1|F|D, {0x04fb}}},
- {0x04fc, {1|F|D, {0x04fd}}},
- {0x04fe, {1|F|D, {0x04ff}}},
- {0x0500, {1|F|D, {0x0501}}},
- {0x0502, {1|F|D, {0x0503}}},
- {0x0504, {1|F|D, {0x0505}}},
- {0x0506, {1|F|D, {0x0507}}},
- {0x0508, {1|F|D, {0x0509}}},
- {0x050a, {1|F|D, {0x050b}}},
- {0x050c, {1|F|D, {0x050d}}},
- {0x050e, {1|F|D, {0x050f}}},
- {0x0510, {1|F|D, {0x0511}}},
- {0x0512, {1|F|D, {0x0513}}},
- {0x0514, {1|F|D, {0x0515}}},
- {0x0516, {1|F|D, {0x0517}}},
- {0x0518, {1|F|D, {0x0519}}},
- {0x051a, {1|F|D, {0x051b}}},
- {0x051c, {1|F|D, {0x051d}}},
- {0x051e, {1|F|D, {0x051f}}},
- {0x0520, {1|F|D, {0x0521}}},
- {0x0522, {1|F|D, {0x0523}}},
- {0x0524, {1|F|D, {0x0525}}},
- {0x0526, {1|F|D, {0x0527}}},
- {0x0528, {1|F|D, {0x0529}}},
- {0x052a, {1|F|D, {0x052b}}},
- {0x052c, {1|F|D, {0x052d}}},
- {0x052e, {1|F|D, {0x052f}}},
- {0x0531, {1|F|D, {0x0561}}},
- {0x0532, {1|F|D, {0x0562}}},
- {0x0533, {1|F|D, {0x0563}}},
- {0x0534, {1|F|D, {0x0564}}},
- {0x0535, {1|F|D, {0x0565}}},
- {0x0536, {1|F|D, {0x0566}}},
- {0x0537, {1|F|D, {0x0567}}},
- {0x0538, {1|F|D, {0x0568}}},
- {0x0539, {1|F|D, {0x0569}}},
- {0x053a, {1|F|D, {0x056a}}},
- {0x053b, {1|F|D, {0x056b}}},
- {0x053c, {1|F|D, {0x056c}}},
- {0x053d, {1|F|D, {0x056d}}},
- {0x053e, {1|F|D, {0x056e}}},
- {0x053f, {1|F|D, {0x056f}}},
- {0x0540, {1|F|D, {0x0570}}},
- {0x0541, {1|F|D, {0x0571}}},
- {0x0542, {1|F|D, {0x0572}}},
- {0x0543, {1|F|D, {0x0573}}},
- {0x0544, {1|F|D, {0x0574}}},
- {0x0545, {1|F|D, {0x0575}}},
- {0x0546, {1|F|D, {0x0576}}},
- {0x0547, {1|F|D, {0x0577}}},
- {0x0548, {1|F|D, {0x0578}}},
- {0x0549, {1|F|D, {0x0579}}},
- {0x054a, {1|F|D, {0x057a}}},
- {0x054b, {1|F|D, {0x057b}}},
- {0x054c, {1|F|D, {0x057c}}},
- {0x054d, {1|F|D, {0x057d}}},
- {0x054e, {1|F|D, {0x057e}}},
- {0x054f, {1|F|D, {0x057f}}},
- {0x0550, {1|F|D, {0x0580}}},
- {0x0551, {1|F|D, {0x0581}}},
- {0x0552, {1|F|D, {0x0582}}},
- {0x0553, {1|F|D, {0x0583}}},
- {0x0554, {1|F|D, {0x0584}}},
- {0x0555, {1|F|D, {0x0585}}},
- {0x0556, {1|F|D, {0x0586}}},
- {0x0587, {2|F|ST|SU|I(41), {0x0565, 0x0582}}},
- {0x10a0, {1|F|D, {0x2d00}}},
- {0x10a1, {1|F|D, {0x2d01}}},
- {0x10a2, {1|F|D, {0x2d02}}},
- {0x10a3, {1|F|D, {0x2d03}}},
- {0x10a4, {1|F|D, {0x2d04}}},
- {0x10a5, {1|F|D, {0x2d05}}},
- {0x10a6, {1|F|D, {0x2d06}}},
- {0x10a7, {1|F|D, {0x2d07}}},
- {0x10a8, {1|F|D, {0x2d08}}},
- {0x10a9, {1|F|D, {0x2d09}}},
- {0x10aa, {1|F|D, {0x2d0a}}},
- {0x10ab, {1|F|D, {0x2d0b}}},
- {0x10ac, {1|F|D, {0x2d0c}}},
- {0x10ad, {1|F|D, {0x2d0d}}},
- {0x10ae, {1|F|D, {0x2d0e}}},
- {0x10af, {1|F|D, {0x2d0f}}},
- {0x10b0, {1|F|D, {0x2d10}}},
- {0x10b1, {1|F|D, {0x2d11}}},
- {0x10b2, {1|F|D, {0x2d12}}},
- {0x10b3, {1|F|D, {0x2d13}}},
- {0x10b4, {1|F|D, {0x2d14}}},
- {0x10b5, {1|F|D, {0x2d15}}},
- {0x10b6, {1|F|D, {0x2d16}}},
- {0x10b7, {1|F|D, {0x2d17}}},
- {0x10b8, {1|F|D, {0x2d18}}},
- {0x10b9, {1|F|D, {0x2d19}}},
- {0x10ba, {1|F|D, {0x2d1a}}},
- {0x10bb, {1|F|D, {0x2d1b}}},
- {0x10bc, {1|F|D, {0x2d1c}}},
- {0x10bd, {1|F|D, {0x2d1d}}},
- {0x10be, {1|F|D, {0x2d1e}}},
- {0x10bf, {1|F|D, {0x2d1f}}},
- {0x10c0, {1|F|D, {0x2d20}}},
- {0x10c1, {1|F|D, {0x2d21}}},
- {0x10c2, {1|F|D, {0x2d22}}},
- {0x10c3, {1|F|D, {0x2d23}}},
- {0x10c4, {1|F|D, {0x2d24}}},
- {0x10c5, {1|F|D, {0x2d25}}},
- {0x10c7, {1|F|D, {0x2d27}}},
- {0x10cd, {1|F|D, {0x2d2d}}},
- {0x13f8, {1|F|U, {0x13f0}}},
- {0x13f9, {1|F|U, {0x13f1}}},
- {0x13fa, {1|F|U, {0x13f2}}},
- {0x13fb, {1|F|U, {0x13f3}}},
- {0x13fc, {1|F|U, {0x13f4}}},
- {0x13fd, {1|F|U, {0x13f5}}},
- {0x1c80, {1|F|SU|I(45), {0x0432}}},
- {0x1c81, {1|F|SU|I(46), {0x0434}}},
- {0x1c82, {1|F|SU|I(47), {0x043e}}},
- {0x1c83, {1|F|SU|I(48), {0x0441}}},
- {0x1c84, {1|F|SU|I(49), {0x0442}}},
- {0x1c85, {1|F|SU|I(50), {0x0442}}},
- {0x1c86, {1|F|SU|I(51), {0x044a}}},
- {0x1c87, {1|F|SU|I(52), {0x0463}}},
- {0x1c88, {1|F|SU|I(53), {0xa64b}}},
- {0x1c90, {1|F|D, {0x10d0}}},
- {0x1c91, {1|F|D, {0x10d1}}},
- {0x1c92, {1|F|D, {0x10d2}}},
- {0x1c93, {1|F|D, {0x10d3}}},
- {0x1c94, {1|F|D, {0x10d4}}},
- {0x1c95, {1|F|D, {0x10d5}}},
- {0x1c96, {1|F|D, {0x10d6}}},
- {0x1c97, {1|F|D, {0x10d7}}},
- {0x1c98, {1|F|D, {0x10d8}}},
- {0x1c99, {1|F|D, {0x10d9}}},
- {0x1c9a, {1|F|D, {0x10da}}},
- {0x1c9b, {1|F|D, {0x10db}}},
- {0x1c9c, {1|F|D, {0x10dc}}},
- {0x1c9d, {1|F|D, {0x10dd}}},
- {0x1c9e, {1|F|D, {0x10de}}},
- {0x1c9f, {1|F|D, {0x10df}}},
- {0x1ca0, {1|F|D, {0x10e0}}},
- {0x1ca1, {1|F|D, {0x10e1}}},
- {0x1ca2, {1|F|D, {0x10e2}}},
- {0x1ca3, {1|F|D, {0x10e3}}},
- {0x1ca4, {1|F|D, {0x10e4}}},
- {0x1ca5, {1|F|D, {0x10e5}}},
- {0x1ca6, {1|F|D, {0x10e6}}},
- {0x1ca7, {1|F|D, {0x10e7}}},
- {0x1ca8, {1|F|D, {0x10e8}}},
- {0x1ca9, {1|F|D, {0x10e9}}},
- {0x1caa, {1|F|D, {0x10ea}}},
- {0x1cab, {1|F|D, {0x10eb}}},
- {0x1cac, {1|F|D, {0x10ec}}},
- {0x1cad, {1|F|D, {0x10ed}}},
- {0x1cae, {1|F|D, {0x10ee}}},
- {0x1caf, {1|F|D, {0x10ef}}},
- {0x1cb0, {1|F|D, {0x10f0}}},
- {0x1cb1, {1|F|D, {0x10f1}}},
- {0x1cb2, {1|F|D, {0x10f2}}},
- {0x1cb3, {1|F|D, {0x10f3}}},
- {0x1cb4, {1|F|D, {0x10f4}}},
- {0x1cb5, {1|F|D, {0x10f5}}},
- {0x1cb6, {1|F|D, {0x10f6}}},
- {0x1cb7, {1|F|D, {0x10f7}}},
- {0x1cb8, {1|F|D, {0x10f8}}},
- {0x1cb9, {1|F|D, {0x10f9}}},
- {0x1cba, {1|F|D, {0x10fa}}},
- {0x1cbd, {1|F|D, {0x10fd}}},
- {0x1cbe, {1|F|D, {0x10fe}}},
- {0x1cbf, {1|F|D, {0x10ff}}},
- {0x1e00, {1|F|D, {0x1e01}}},
- {0x1e02, {1|F|D, {0x1e03}}},
- {0x1e04, {1|F|D, {0x1e05}}},
- {0x1e06, {1|F|D, {0x1e07}}},
- {0x1e08, {1|F|D, {0x1e09}}},
- {0x1e0a, {1|F|D, {0x1e0b}}},
- {0x1e0c, {1|F|D, {0x1e0d}}},
- {0x1e0e, {1|F|D, {0x1e0f}}},
- {0x1e10, {1|F|D, {0x1e11}}},
- {0x1e12, {1|F|D, {0x1e13}}},
- {0x1e14, {1|F|D, {0x1e15}}},
- {0x1e16, {1|F|D, {0x1e17}}},
- {0x1e18, {1|F|D, {0x1e19}}},
- {0x1e1a, {1|F|D, {0x1e1b}}},
- {0x1e1c, {1|F|D, {0x1e1d}}},
- {0x1e1e, {1|F|D, {0x1e1f}}},
- {0x1e20, {1|F|D, {0x1e21}}},
- {0x1e22, {1|F|D, {0x1e23}}},
- {0x1e24, {1|F|D, {0x1e25}}},
- {0x1e26, {1|F|D, {0x1e27}}},
- {0x1e28, {1|F|D, {0x1e29}}},
- {0x1e2a, {1|F|D, {0x1e2b}}},
- {0x1e2c, {1|F|D, {0x1e2d}}},
- {0x1e2e, {1|F|D, {0x1e2f}}},
- {0x1e30, {1|F|D, {0x1e31}}},
- {0x1e32, {1|F|D, {0x1e33}}},
- {0x1e34, {1|F|D, {0x1e35}}},
- {0x1e36, {1|F|D, {0x1e37}}},
- {0x1e38, {1|F|D, {0x1e39}}},
- {0x1e3a, {1|F|D, {0x1e3b}}},
- {0x1e3c, {1|F|D, {0x1e3d}}},
- {0x1e3e, {1|F|D, {0x1e3f}}},
- {0x1e40, {1|F|D, {0x1e41}}},
- {0x1e42, {1|F|D, {0x1e43}}},
- {0x1e44, {1|F|D, {0x1e45}}},
- {0x1e46, {1|F|D, {0x1e47}}},
- {0x1e48, {1|F|D, {0x1e49}}},
- {0x1e4a, {1|F|D, {0x1e4b}}},
- {0x1e4c, {1|F|D, {0x1e4d}}},
- {0x1e4e, {1|F|D, {0x1e4f}}},
- {0x1e50, {1|F|D, {0x1e51}}},
- {0x1e52, {1|F|D, {0x1e53}}},
- {0x1e54, {1|F|D, {0x1e55}}},
- {0x1e56, {1|F|D, {0x1e57}}},
- {0x1e58, {1|F|D, {0x1e59}}},
- {0x1e5a, {1|F|D, {0x1e5b}}},
- {0x1e5c, {1|F|D, {0x1e5d}}},
- {0x1e5e, {1|F|D, {0x1e5f}}},
- {0x1e60, {1|F|D, {0x1e61}}},
- {0x1e62, {1|F|D, {0x1e63}}},
- {0x1e64, {1|F|D, {0x1e65}}},
- {0x1e66, {1|F|D, {0x1e67}}},
- {0x1e68, {1|F|D, {0x1e69}}},
- {0x1e6a, {1|F|D, {0x1e6b}}},
- {0x1e6c, {1|F|D, {0x1e6d}}},
- {0x1e6e, {1|F|D, {0x1e6f}}},
- {0x1e70, {1|F|D, {0x1e71}}},
- {0x1e72, {1|F|D, {0x1e73}}},
- {0x1e74, {1|F|D, {0x1e75}}},
- {0x1e76, {1|F|D, {0x1e77}}},
- {0x1e78, {1|F|D, {0x1e79}}},
- {0x1e7a, {1|F|D, {0x1e7b}}},
- {0x1e7c, {1|F|D, {0x1e7d}}},
- {0x1e7e, {1|F|D, {0x1e7f}}},
- {0x1e80, {1|F|D, {0x1e81}}},
- {0x1e82, {1|F|D, {0x1e83}}},
- {0x1e84, {1|F|D, {0x1e85}}},
- {0x1e86, {1|F|D, {0x1e87}}},
- {0x1e88, {1|F|D, {0x1e89}}},
- {0x1e8a, {1|F|D, {0x1e8b}}},
- {0x1e8c, {1|F|D, {0x1e8d}}},
- {0x1e8e, {1|F|D, {0x1e8f}}},
- {0x1e90, {1|F|D, {0x1e91}}},
- {0x1e92, {1|F|D, {0x1e93}}},
- {0x1e94, {1|F|D, {0x1e95}}},
- {0x1e96, {2|F|SU|I(54), {0x0068, 0x0331}}},
- {0x1e97, {2|F|SU|I(56), {0x0074, 0x0308}}},
- {0x1e98, {2|F|SU|I(58), {0x0077, 0x030a}}},
- {0x1e99, {2|F|SU|I(60), {0x0079, 0x030a}}},
- {0x1e9a, {2|F|SU|I(62), {0x0061, 0x02be}}},
- {0x1e9b, {1|F|SU|I(64), {0x1e61}}},
- {0x1e9e, {2|F|SL|I(65), {0x0073, 0x0073}}},
- {0x1ea0, {1|F|D, {0x1ea1}}},
- {0x1ea2, {1|F|D, {0x1ea3}}},
- {0x1ea4, {1|F|D, {0x1ea5}}},
- {0x1ea6, {1|F|D, {0x1ea7}}},
- {0x1ea8, {1|F|D, {0x1ea9}}},
- {0x1eaa, {1|F|D, {0x1eab}}},
- {0x1eac, {1|F|D, {0x1ead}}},
- {0x1eae, {1|F|D, {0x1eaf}}},
- {0x1eb0, {1|F|D, {0x1eb1}}},
- {0x1eb2, {1|F|D, {0x1eb3}}},
- {0x1eb4, {1|F|D, {0x1eb5}}},
- {0x1eb6, {1|F|D, {0x1eb7}}},
- {0x1eb8, {1|F|D, {0x1eb9}}},
- {0x1eba, {1|F|D, {0x1ebb}}},
- {0x1ebc, {1|F|D, {0x1ebd}}},
- {0x1ebe, {1|F|D, {0x1ebf}}},
- {0x1ec0, {1|F|D, {0x1ec1}}},
- {0x1ec2, {1|F|D, {0x1ec3}}},
- {0x1ec4, {1|F|D, {0x1ec5}}},
- {0x1ec6, {1|F|D, {0x1ec7}}},
- {0x1ec8, {1|F|D, {0x1ec9}}},
- {0x1eca, {1|F|D, {0x1ecb}}},
- {0x1ecc, {1|F|D, {0x1ecd}}},
- {0x1ece, {1|F|D, {0x1ecf}}},
- {0x1ed0, {1|F|D, {0x1ed1}}},
- {0x1ed2, {1|F|D, {0x1ed3}}},
- {0x1ed4, {1|F|D, {0x1ed5}}},
- {0x1ed6, {1|F|D, {0x1ed7}}},
- {0x1ed8, {1|F|D, {0x1ed9}}},
- {0x1eda, {1|F|D, {0x1edb}}},
- {0x1edc, {1|F|D, {0x1edd}}},
- {0x1ede, {1|F|D, {0x1edf}}},
- {0x1ee0, {1|F|D, {0x1ee1}}},
- {0x1ee2, {1|F|D, {0x1ee3}}},
- {0x1ee4, {1|F|D, {0x1ee5}}},
- {0x1ee6, {1|F|D, {0x1ee7}}},
- {0x1ee8, {1|F|D, {0x1ee9}}},
- {0x1eea, {1|F|D, {0x1eeb}}},
- {0x1eec, {1|F|D, {0x1eed}}},
- {0x1eee, {1|F|D, {0x1eef}}},
- {0x1ef0, {1|F|D, {0x1ef1}}},
- {0x1ef2, {1|F|D, {0x1ef3}}},
- {0x1ef4, {1|F|D, {0x1ef5}}},
- {0x1ef6, {1|F|D, {0x1ef7}}},
- {0x1ef8, {1|F|D, {0x1ef9}}},
- {0x1efa, {1|F|D, {0x1efb}}},
- {0x1efc, {1|F|D, {0x1efd}}},
- {0x1efe, {1|F|D, {0x1eff}}},
- {0x1f08, {1|F|D, {0x1f00}}},
- {0x1f09, {1|F|D, {0x1f01}}},
- {0x1f0a, {1|F|D, {0x1f02}}},
- {0x1f0b, {1|F|D, {0x1f03}}},
- {0x1f0c, {1|F|D, {0x1f04}}},
- {0x1f0d, {1|F|D, {0x1f05}}},
- {0x1f0e, {1|F|D, {0x1f06}}},
- {0x1f0f, {1|F|D, {0x1f07}}},
- {0x1f18, {1|F|D, {0x1f10}}},
- {0x1f19, {1|F|D, {0x1f11}}},
- {0x1f1a, {1|F|D, {0x1f12}}},
- {0x1f1b, {1|F|D, {0x1f13}}},
- {0x1f1c, {1|F|D, {0x1f14}}},
- {0x1f1d, {1|F|D, {0x1f15}}},
- {0x1f28, {1|F|D, {0x1f20}}},
- {0x1f29, {1|F|D, {0x1f21}}},
- {0x1f2a, {1|F|D, {0x1f22}}},
- {0x1f2b, {1|F|D, {0x1f23}}},
- {0x1f2c, {1|F|D, {0x1f24}}},
- {0x1f2d, {1|F|D, {0x1f25}}},
- {0x1f2e, {1|F|D, {0x1f26}}},
- {0x1f2f, {1|F|D, {0x1f27}}},
- {0x1f38, {1|F|D, {0x1f30}}},
- {0x1f39, {1|F|D, {0x1f31}}},
- {0x1f3a, {1|F|D, {0x1f32}}},
- {0x1f3b, {1|F|D, {0x1f33}}},
- {0x1f3c, {1|F|D, {0x1f34}}},
- {0x1f3d, {1|F|D, {0x1f35}}},
- {0x1f3e, {1|F|D, {0x1f36}}},
- {0x1f3f, {1|F|D, {0x1f37}}},
- {0x1f48, {1|F|D, {0x1f40}}},
- {0x1f49, {1|F|D, {0x1f41}}},
- {0x1f4a, {1|F|D, {0x1f42}}},
- {0x1f4b, {1|F|D, {0x1f43}}},
- {0x1f4c, {1|F|D, {0x1f44}}},
- {0x1f4d, {1|F|D, {0x1f45}}},
- {0x1f50, {2|F|SU|I(66), {0x03c5, 0x0313}}},
- {0x1f52, {3|F|SU|I(68), {0x03c5, 0x0313, 0x0300}}},
- {0x1f54, {3|F|SU|I(71), {0x03c5, 0x0313, 0x0301}}},
- {0x1f56, {3|F|SU|I(74), {0x03c5, 0x0313, 0x0342}}},
- {0x1f59, {1|F|D, {0x1f51}}},
- {0x1f5b, {1|F|D, {0x1f53}}},
- {0x1f5d, {1|F|D, {0x1f55}}},
- {0x1f5f, {1|F|D, {0x1f57}}},
- {0x1f68, {1|F|D, {0x1f60}}},
- {0x1f69, {1|F|D, {0x1f61}}},
- {0x1f6a, {1|F|D, {0x1f62}}},
- {0x1f6b, {1|F|D, {0x1f63}}},
- {0x1f6c, {1|F|D, {0x1f64}}},
- {0x1f6d, {1|F|D, {0x1f65}}},
- {0x1f6e, {1|F|D, {0x1f66}}},
- {0x1f6f, {1|F|D, {0x1f67}}},
- {0x1f80, {2|F|ST|SU|I(77), {0x1f00, 0x03b9}}},
- {0x1f81, {2|F|ST|SU|I(80), {0x1f01, 0x03b9}}},
- {0x1f82, {2|F|ST|SU|I(83), {0x1f02, 0x03b9}}},
- {0x1f83, {2|F|ST|SU|I(86), {0x1f03, 0x03b9}}},
- {0x1f84, {2|F|ST|SU|I(89), {0x1f04, 0x03b9}}},
- {0x1f85, {2|F|ST|SU|I(92), {0x1f05, 0x03b9}}},
- {0x1f86, {2|F|ST|SU|I(95), {0x1f06, 0x03b9}}},
- {0x1f87, {2|F|ST|SU|I(98), {0x1f07, 0x03b9}}},
- {0x1f88, {2|F|IT|SL|SU|I(101), {0x1f00, 0x03b9}}},
- {0x1f89, {2|F|IT|SL|SU|I(106), {0x1f01, 0x03b9}}},
- {0x1f8a, {2|F|IT|SL|SU|I(111), {0x1f02, 0x03b9}}},
- {0x1f8b, {2|F|IT|SL|SU|I(116), {0x1f03, 0x03b9}}},
- {0x1f8c, {2|F|IT|SL|SU|I(121), {0x1f04, 0x03b9}}},
- {0x1f8d, {2|F|IT|SL|SU|I(126), {0x1f05, 0x03b9}}},
- {0x1f8e, {2|F|IT|SL|SU|I(131), {0x1f06, 0x03b9}}},
- {0x1f8f, {2|F|IT|SL|SU|I(136), {0x1f07, 0x03b9}}},
- {0x1f90, {2|F|ST|SU|I(141), {0x1f20, 0x03b9}}},
- {0x1f91, {2|F|ST|SU|I(144), {0x1f21, 0x03b9}}},
- {0x1f92, {2|F|ST|SU|I(147), {0x1f22, 0x03b9}}},
- {0x1f93, {2|F|ST|SU|I(150), {0x1f23, 0x03b9}}},
- {0x1f94, {2|F|ST|SU|I(153), {0x1f24, 0x03b9}}},
- {0x1f95, {2|F|ST|SU|I(156), {0x1f25, 0x03b9}}},
- {0x1f96, {2|F|ST|SU|I(159), {0x1f26, 0x03b9}}},
- {0x1f97, {2|F|ST|SU|I(162), {0x1f27, 0x03b9}}},
- {0x1f98, {2|F|IT|SL|SU|I(165), {0x1f20, 0x03b9}}},
- {0x1f99, {2|F|IT|SL|SU|I(170), {0x1f21, 0x03b9}}},
- {0x1f9a, {2|F|IT|SL|SU|I(175), {0x1f22, 0x03b9}}},
- {0x1f9b, {2|F|IT|SL|SU|I(180), {0x1f23, 0x03b9}}},
- {0x1f9c, {2|F|IT|SL|SU|I(185), {0x1f24, 0x03b9}}},
- {0x1f9d, {2|F|IT|SL|SU|I(190), {0x1f25, 0x03b9}}},
- {0x1f9e, {2|F|IT|SL|SU|I(195), {0x1f26, 0x03b9}}},
- {0x1f9f, {2|F|IT|SL|SU|I(200), {0x1f27, 0x03b9}}},
- {0x1fa0, {2|F|ST|SU|I(205), {0x1f60, 0x03b9}}},
- {0x1fa1, {2|F|ST|SU|I(208), {0x1f61, 0x03b9}}},
- {0x1fa2, {2|F|ST|SU|I(211), {0x1f62, 0x03b9}}},
- {0x1fa3, {2|F|ST|SU|I(214), {0x1f63, 0x03b9}}},
- {0x1fa4, {2|F|ST|SU|I(217), {0x1f64, 0x03b9}}},
- {0x1fa5, {2|F|ST|SU|I(220), {0x1f65, 0x03b9}}},
- {0x1fa6, {2|F|ST|SU|I(223), {0x1f66, 0x03b9}}},
- {0x1fa7, {2|F|ST|SU|I(226), {0x1f67, 0x03b9}}},
- {0x1fa8, {2|F|IT|SL|SU|I(229), {0x1f60, 0x03b9}}},
- {0x1fa9, {2|F|IT|SL|SU|I(234), {0x1f61, 0x03b9}}},
- {0x1faa, {2|F|IT|SL|SU|I(239), {0x1f62, 0x03b9}}},
- {0x1fab, {2|F|IT|SL|SU|I(244), {0x1f63, 0x03b9}}},
- {0x1fac, {2|F|IT|SL|SU|I(249), {0x1f64, 0x03b9}}},
- {0x1fad, {2|F|IT|SL|SU|I(254), {0x1f65, 0x03b9}}},
- {0x1fae, {2|F|IT|SL|SU|I(259), {0x1f66, 0x03b9}}},
- {0x1faf, {2|F|IT|SL|SU|I(264), {0x1f67, 0x03b9}}},
- {0x1fb2, {2|F|ST|SU|I(269), {0x1f70, 0x03b9}}},
- {0x1fb3, {2|F|ST|SU|I(273), {0x03b1, 0x03b9}}},
- {0x1fb4, {2|F|ST|SU|I(276), {0x03ac, 0x03b9}}},
- {0x1fb6, {2|F|SU|I(280), {0x03b1, 0x0342}}},
- {0x1fb7, {3|F|ST|SU|I(282), {0x03b1, 0x0342, 0x03b9}}},
- {0x1fb8, {1|F|D, {0x1fb0}}},
- {0x1fb9, {1|F|D, {0x1fb1}}},
- {0x1fba, {1|F|D, {0x1f70}}},
- {0x1fbb, {1|F|D, {0x1f71}}},
- {0x1fbc, {2|F|IT|SL|SU|I(288), {0x03b1, 0x03b9}}},
- {0x1fbe, {1|F|SU|I(293), {0x03b9}}},
- {0x1fc2, {2|F|ST|SU|I(294), {0x1f74, 0x03b9}}},
- {0x1fc3, {2|F|ST|SU|I(298), {0x03b7, 0x03b9}}},
- {0x1fc4, {2|F|ST|SU|I(301), {0x03ae, 0x03b9}}},
- {0x1fc6, {2|F|SU|I(305), {0x03b7, 0x0342}}},
- {0x1fc7, {3|F|ST|SU|I(307), {0x03b7, 0x0342, 0x03b9}}},
- {0x1fc8, {1|F|D, {0x1f72}}},
- {0x1fc9, {1|F|D, {0x1f73}}},
- {0x1fca, {1|F|D, {0x1f74}}},
- {0x1fcb, {1|F|D, {0x1f75}}},
- {0x1fcc, {2|F|IT|SL|SU|I(313), {0x03b7, 0x03b9}}},
- {0x1fd2, {3|F|SU|I(318), {0x03b9, 0x0308, 0x0300}}},
- {0x1fd3, {3|F|SU|I(321), {0x03b9, 0x0308, 0x0301}}},
- {0x1fd6, {2|F|SU|I(324), {0x03b9, 0x0342}}},
- {0x1fd7, {3|F|SU|I(326), {0x03b9, 0x0308, 0x0342}}},
- {0x1fd8, {1|F|D, {0x1fd0}}},
- {0x1fd9, {1|F|D, {0x1fd1}}},
- {0x1fda, {1|F|D, {0x1f76}}},
- {0x1fdb, {1|F|D, {0x1f77}}},
- {0x1fe2, {3|F|SU|I(329), {0x03c5, 0x0308, 0x0300}}},
- {0x1fe3, {3|F|SU|I(332), {0x03c5, 0x0308, 0x0301}}},
- {0x1fe4, {2|F|SU|I(335), {0x03c1, 0x0313}}},
- {0x1fe6, {2|F|SU|I(337), {0x03c5, 0x0342}}},
- {0x1fe7, {3|F|SU|I(339), {0x03c5, 0x0308, 0x0342}}},
- {0x1fe8, {1|F|D, {0x1fe0}}},
- {0x1fe9, {1|F|D, {0x1fe1}}},
- {0x1fea, {1|F|D, {0x1f7a}}},
- {0x1feb, {1|F|D, {0x1f7b}}},
- {0x1fec, {1|F|D, {0x1fe5}}},
- {0x1ff2, {2|F|ST|SU|I(342), {0x1f7c, 0x03b9}}},
- {0x1ff3, {2|F|ST|SU|I(346), {0x03c9, 0x03b9}}},
- {0x1ff4, {2|F|ST|SU|I(349), {0x03ce, 0x03b9}}},
- {0x1ff6, {2|F|SU|I(353), {0x03c9, 0x0342}}},
- {0x1ff7, {3|F|ST|SU|I(355), {0x03c9, 0x0342, 0x03b9}}},
- {0x1ff8, {1|F|D, {0x1f78}}},
- {0x1ff9, {1|F|D, {0x1f79}}},
- {0x1ffa, {1|F|D, {0x1f7c}}},
- {0x1ffb, {1|F|D, {0x1f7d}}},
- {0x1ffc, {2|F|IT|SL|SU|I(361), {0x03c9, 0x03b9}}},
- {0x2126, {1|F|D, {0x03c9}}},
- {0x212a, {1|F|D, {0x006b}}},
- {0x212b, {1|F|D, {0x00e5}}},
- {0x2132, {1|F|D, {0x214e}}},
- {0x2160, {1|F|D, {0x2170}}},
- {0x2161, {1|F|D, {0x2171}}},
- {0x2162, {1|F|D, {0x2172}}},
- {0x2163, {1|F|D, {0x2173}}},
- {0x2164, {1|F|D, {0x2174}}},
- {0x2165, {1|F|D, {0x2175}}},
- {0x2166, {1|F|D, {0x2176}}},
- {0x2167, {1|F|D, {0x2177}}},
- {0x2168, {1|F|D, {0x2178}}},
- {0x2169, {1|F|D, {0x2179}}},
- {0x216a, {1|F|D, {0x217a}}},
- {0x216b, {1|F|D, {0x217b}}},
- {0x216c, {1|F|D, {0x217c}}},
- {0x216d, {1|F|D, {0x217d}}},
- {0x216e, {1|F|D, {0x217e}}},
- {0x216f, {1|F|D, {0x217f}}},
- {0x2183, {1|F|D, {0x2184}}},
- {0x24b6, {1|F|D, {0x24d0}}},
- {0x24b7, {1|F|D, {0x24d1}}},
- {0x24b8, {1|F|D, {0x24d2}}},
- {0x24b9, {1|F|D, {0x24d3}}},
- {0x24ba, {1|F|D, {0x24d4}}},
- {0x24bb, {1|F|D, {0x24d5}}},
- {0x24bc, {1|F|D, {0x24d6}}},
- {0x24bd, {1|F|D, {0x24d7}}},
- {0x24be, {1|F|D, {0x24d8}}},
- {0x24bf, {1|F|D, {0x24d9}}},
- {0x24c0, {1|F|D, {0x24da}}},
- {0x24c1, {1|F|D, {0x24db}}},
- {0x24c2, {1|F|D, {0x24dc}}},
- {0x24c3, {1|F|D, {0x24dd}}},
- {0x24c4, {1|F|D, {0x24de}}},
- {0x24c5, {1|F|D, {0x24df}}},
- {0x24c6, {1|F|D, {0x24e0}}},
- {0x24c7, {1|F|D, {0x24e1}}},
- {0x24c8, {1|F|D, {0x24e2}}},
- {0x24c9, {1|F|D, {0x24e3}}},
- {0x24ca, {1|F|D, {0x24e4}}},
- {0x24cb, {1|F|D, {0x24e5}}},
- {0x24cc, {1|F|D, {0x24e6}}},
- {0x24cd, {1|F|D, {0x24e7}}},
- {0x24ce, {1|F|D, {0x24e8}}},
- {0x24cf, {1|F|D, {0x24e9}}},
- {0x2c00, {1|F|D, {0x2c30}}},
- {0x2c01, {1|F|D, {0x2c31}}},
- {0x2c02, {1|F|D, {0x2c32}}},
- {0x2c03, {1|F|D, {0x2c33}}},
- {0x2c04, {1|F|D, {0x2c34}}},
- {0x2c05, {1|F|D, {0x2c35}}},
- {0x2c06, {1|F|D, {0x2c36}}},
- {0x2c07, {1|F|D, {0x2c37}}},
- {0x2c08, {1|F|D, {0x2c38}}},
- {0x2c09, {1|F|D, {0x2c39}}},
- {0x2c0a, {1|F|D, {0x2c3a}}},
- {0x2c0b, {1|F|D, {0x2c3b}}},
- {0x2c0c, {1|F|D, {0x2c3c}}},
- {0x2c0d, {1|F|D, {0x2c3d}}},
- {0x2c0e, {1|F|D, {0x2c3e}}},
- {0x2c0f, {1|F|D, {0x2c3f}}},
- {0x2c10, {1|F|D, {0x2c40}}},
- {0x2c11, {1|F|D, {0x2c41}}},
- {0x2c12, {1|F|D, {0x2c42}}},
- {0x2c13, {1|F|D, {0x2c43}}},
- {0x2c14, {1|F|D, {0x2c44}}},
- {0x2c15, {1|F|D, {0x2c45}}},
- {0x2c16, {1|F|D, {0x2c46}}},
- {0x2c17, {1|F|D, {0x2c47}}},
- {0x2c18, {1|F|D, {0x2c48}}},
- {0x2c19, {1|F|D, {0x2c49}}},
- {0x2c1a, {1|F|D, {0x2c4a}}},
- {0x2c1b, {1|F|D, {0x2c4b}}},
- {0x2c1c, {1|F|D, {0x2c4c}}},
- {0x2c1d, {1|F|D, {0x2c4d}}},
- {0x2c1e, {1|F|D, {0x2c4e}}},
- {0x2c1f, {1|F|D, {0x2c4f}}},
- {0x2c20, {1|F|D, {0x2c50}}},
- {0x2c21, {1|F|D, {0x2c51}}},
- {0x2c22, {1|F|D, {0x2c52}}},
- {0x2c23, {1|F|D, {0x2c53}}},
- {0x2c24, {1|F|D, {0x2c54}}},
- {0x2c25, {1|F|D, {0x2c55}}},
- {0x2c26, {1|F|D, {0x2c56}}},
- {0x2c27, {1|F|D, {0x2c57}}},
- {0x2c28, {1|F|D, {0x2c58}}},
- {0x2c29, {1|F|D, {0x2c59}}},
- {0x2c2a, {1|F|D, {0x2c5a}}},
- {0x2c2b, {1|F|D, {0x2c5b}}},
- {0x2c2c, {1|F|D, {0x2c5c}}},
- {0x2c2d, {1|F|D, {0x2c5d}}},
- {0x2c2e, {1|F|D, {0x2c5e}}},
- {0x2c60, {1|F|D, {0x2c61}}},
- {0x2c62, {1|F|D, {0x026b}}},
- {0x2c63, {1|F|D, {0x1d7d}}},
- {0x2c64, {1|F|D, {0x027d}}},
- {0x2c67, {1|F|D, {0x2c68}}},
- {0x2c69, {1|F|D, {0x2c6a}}},
- {0x2c6b, {1|F|D, {0x2c6c}}},
- {0x2c6d, {1|F|D, {0x0251}}},
- {0x2c6e, {1|F|D, {0x0271}}},
- {0x2c6f, {1|F|D, {0x0250}}},
- {0x2c70, {1|F|D, {0x0252}}},
- {0x2c72, {1|F|D, {0x2c73}}},
- {0x2c75, {1|F|D, {0x2c76}}},
- {0x2c7e, {1|F|D, {0x023f}}},
- {0x2c7f, {1|F|D, {0x0240}}},
- {0x2c80, {1|F|D, {0x2c81}}},
- {0x2c82, {1|F|D, {0x2c83}}},
- {0x2c84, {1|F|D, {0x2c85}}},
- {0x2c86, {1|F|D, {0x2c87}}},
- {0x2c88, {1|F|D, {0x2c89}}},
- {0x2c8a, {1|F|D, {0x2c8b}}},
- {0x2c8c, {1|F|D, {0x2c8d}}},
- {0x2c8e, {1|F|D, {0x2c8f}}},
- {0x2c90, {1|F|D, {0x2c91}}},
- {0x2c92, {1|F|D, {0x2c93}}},
- {0x2c94, {1|F|D, {0x2c95}}},
- {0x2c96, {1|F|D, {0x2c97}}},
- {0x2c98, {1|F|D, {0x2c99}}},
- {0x2c9a, {1|F|D, {0x2c9b}}},
- {0x2c9c, {1|F|D, {0x2c9d}}},
- {0x2c9e, {1|F|D, {0x2c9f}}},
- {0x2ca0, {1|F|D, {0x2ca1}}},
- {0x2ca2, {1|F|D, {0x2ca3}}},
- {0x2ca4, {1|F|D, {0x2ca5}}},
- {0x2ca6, {1|F|D, {0x2ca7}}},
- {0x2ca8, {1|F|D, {0x2ca9}}},
- {0x2caa, {1|F|D, {0x2cab}}},
- {0x2cac, {1|F|D, {0x2cad}}},
- {0x2cae, {1|F|D, {0x2caf}}},
- {0x2cb0, {1|F|D, {0x2cb1}}},
- {0x2cb2, {1|F|D, {0x2cb3}}},
- {0x2cb4, {1|F|D, {0x2cb5}}},
- {0x2cb6, {1|F|D, {0x2cb7}}},
- {0x2cb8, {1|F|D, {0x2cb9}}},
- {0x2cba, {1|F|D, {0x2cbb}}},
- {0x2cbc, {1|F|D, {0x2cbd}}},
- {0x2cbe, {1|F|D, {0x2cbf}}},
- {0x2cc0, {1|F|D, {0x2cc1}}},
- {0x2cc2, {1|F|D, {0x2cc3}}},
- {0x2cc4, {1|F|D, {0x2cc5}}},
- {0x2cc6, {1|F|D, {0x2cc7}}},
- {0x2cc8, {1|F|D, {0x2cc9}}},
- {0x2cca, {1|F|D, {0x2ccb}}},
- {0x2ccc, {1|F|D, {0x2ccd}}},
- {0x2cce, {1|F|D, {0x2ccf}}},
- {0x2cd0, {1|F|D, {0x2cd1}}},
- {0x2cd2, {1|F|D, {0x2cd3}}},
- {0x2cd4, {1|F|D, {0x2cd5}}},
- {0x2cd6, {1|F|D, {0x2cd7}}},
- {0x2cd8, {1|F|D, {0x2cd9}}},
- {0x2cda, {1|F|D, {0x2cdb}}},
- {0x2cdc, {1|F|D, {0x2cdd}}},
- {0x2cde, {1|F|D, {0x2cdf}}},
- {0x2ce0, {1|F|D, {0x2ce1}}},
- {0x2ce2, {1|F|D, {0x2ce3}}},
- {0x2ceb, {1|F|D, {0x2cec}}},
- {0x2ced, {1|F|D, {0x2cee}}},
- {0x2cf2, {1|F|D, {0x2cf3}}},
- {0xa640, {1|F|D, {0xa641}}},
- {0xa642, {1|F|D, {0xa643}}},
- {0xa644, {1|F|D, {0xa645}}},
- {0xa646, {1|F|D, {0xa647}}},
- {0xa648, {1|F|D, {0xa649}}},
- {0xa64a, {1|F|D, {0xa64b}}},
- {0xa64c, {1|F|D, {0xa64d}}},
- {0xa64e, {1|F|D, {0xa64f}}},
- {0xa650, {1|F|D, {0xa651}}},
- {0xa652, {1|F|D, {0xa653}}},
- {0xa654, {1|F|D, {0xa655}}},
- {0xa656, {1|F|D, {0xa657}}},
- {0xa658, {1|F|D, {0xa659}}},
- {0xa65a, {1|F|D, {0xa65b}}},
- {0xa65c, {1|F|D, {0xa65d}}},
- {0xa65e, {1|F|D, {0xa65f}}},
- {0xa660, {1|F|D, {0xa661}}},
- {0xa662, {1|F|D, {0xa663}}},
- {0xa664, {1|F|D, {0xa665}}},
- {0xa666, {1|F|D, {0xa667}}},
- {0xa668, {1|F|D, {0xa669}}},
- {0xa66a, {1|F|D, {0xa66b}}},
- {0xa66c, {1|F|D, {0xa66d}}},
- {0xa680, {1|F|D, {0xa681}}},
- {0xa682, {1|F|D, {0xa683}}},
- {0xa684, {1|F|D, {0xa685}}},
- {0xa686, {1|F|D, {0xa687}}},
- {0xa688, {1|F|D, {0xa689}}},
- {0xa68a, {1|F|D, {0xa68b}}},
- {0xa68c, {1|F|D, {0xa68d}}},
- {0xa68e, {1|F|D, {0xa68f}}},
- {0xa690, {1|F|D, {0xa691}}},
- {0xa692, {1|F|D, {0xa693}}},
- {0xa694, {1|F|D, {0xa695}}},
- {0xa696, {1|F|D, {0xa697}}},
- {0xa698, {1|F|D, {0xa699}}},
- {0xa69a, {1|F|D, {0xa69b}}},
- {0xa722, {1|F|D, {0xa723}}},
- {0xa724, {1|F|D, {0xa725}}},
- {0xa726, {1|F|D, {0xa727}}},
- {0xa728, {1|F|D, {0xa729}}},
- {0xa72a, {1|F|D, {0xa72b}}},
- {0xa72c, {1|F|D, {0xa72d}}},
- {0xa72e, {1|F|D, {0xa72f}}},
- {0xa732, {1|F|D, {0xa733}}},
- {0xa734, {1|F|D, {0xa735}}},
- {0xa736, {1|F|D, {0xa737}}},
- {0xa738, {1|F|D, {0xa739}}},
- {0xa73a, {1|F|D, {0xa73b}}},
- {0xa73c, {1|F|D, {0xa73d}}},
- {0xa73e, {1|F|D, {0xa73f}}},
- {0xa740, {1|F|D, {0xa741}}},
- {0xa742, {1|F|D, {0xa743}}},
- {0xa744, {1|F|D, {0xa745}}},
- {0xa746, {1|F|D, {0xa747}}},
- {0xa748, {1|F|D, {0xa749}}},
- {0xa74a, {1|F|D, {0xa74b}}},
- {0xa74c, {1|F|D, {0xa74d}}},
- {0xa74e, {1|F|D, {0xa74f}}},
- {0xa750, {1|F|D, {0xa751}}},
- {0xa752, {1|F|D, {0xa753}}},
- {0xa754, {1|F|D, {0xa755}}},
- {0xa756, {1|F|D, {0xa757}}},
- {0xa758, {1|F|D, {0xa759}}},
- {0xa75a, {1|F|D, {0xa75b}}},
- {0xa75c, {1|F|D, {0xa75d}}},
- {0xa75e, {1|F|D, {0xa75f}}},
- {0xa760, {1|F|D, {0xa761}}},
- {0xa762, {1|F|D, {0xa763}}},
- {0xa764, {1|F|D, {0xa765}}},
- {0xa766, {1|F|D, {0xa767}}},
- {0xa768, {1|F|D, {0xa769}}},
- {0xa76a, {1|F|D, {0xa76b}}},
- {0xa76c, {1|F|D, {0xa76d}}},
- {0xa76e, {1|F|D, {0xa76f}}},
- {0xa779, {1|F|D, {0xa77a}}},
- {0xa77b, {1|F|D, {0xa77c}}},
- {0xa77d, {1|F|D, {0x1d79}}},
- {0xa77e, {1|F|D, {0xa77f}}},
- {0xa780, {1|F|D, {0xa781}}},
- {0xa782, {1|F|D, {0xa783}}},
- {0xa784, {1|F|D, {0xa785}}},
- {0xa786, {1|F|D, {0xa787}}},
- {0xa78b, {1|F|D, {0xa78c}}},
- {0xa78d, {1|F|D, {0x0265}}},
- {0xa790, {1|F|D, {0xa791}}},
- {0xa792, {1|F|D, {0xa793}}},
- {0xa796, {1|F|D, {0xa797}}},
- {0xa798, {1|F|D, {0xa799}}},
- {0xa79a, {1|F|D, {0xa79b}}},
- {0xa79c, {1|F|D, {0xa79d}}},
- {0xa79e, {1|F|D, {0xa79f}}},
- {0xa7a0, {1|F|D, {0xa7a1}}},
- {0xa7a2, {1|F|D, {0xa7a3}}},
- {0xa7a4, {1|F|D, {0xa7a5}}},
- {0xa7a6, {1|F|D, {0xa7a7}}},
- {0xa7a8, {1|F|D, {0xa7a9}}},
- {0xa7aa, {1|F|D, {0x0266}}},
- {0xa7ab, {1|F|D, {0x025c}}},
- {0xa7ac, {1|F|D, {0x0261}}},
- {0xa7ad, {1|F|D, {0x026c}}},
- {0xa7ae, {1|F|D, {0x026a}}},
- {0xa7b0, {1|F|D, {0x029e}}},
- {0xa7b1, {1|F|D, {0x0287}}},
- {0xa7b2, {1|F|D, {0x029d}}},
- {0xa7b3, {1|F|D, {0xab53}}},
- {0xa7b4, {1|F|D, {0xa7b5}}},
- {0xa7b6, {1|F|D, {0xa7b7}}},
- {0xa7b8, {1|F|D, {0xa7b9}}},
- {0xa7ba, {1|F|D, {0xa7bb}}},
- {0xa7bc, {1|F|D, {0xa7bd}}},
- {0xa7be, {1|F|D, {0xa7bf}}},
- {0xa7c2, {1|F|D, {0xa7c3}}},
- {0xa7c4, {1|F|D, {0xa794}}},
- {0xa7c5, {1|F|D, {0x0282}}},
- {0xa7c6, {1|F|D, {0x1d8e}}},
- {0xab70, {1|F|U, {0x13a0}}},
- {0xab71, {1|F|U, {0x13a1}}},
- {0xab72, {1|F|U, {0x13a2}}},
- {0xab73, {1|F|U, {0x13a3}}},
- {0xab74, {1|F|U, {0x13a4}}},
- {0xab75, {1|F|U, {0x13a5}}},
- {0xab76, {1|F|U, {0x13a6}}},
- {0xab77, {1|F|U, {0x13a7}}},
- {0xab78, {1|F|U, {0x13a8}}},
- {0xab79, {1|F|U, {0x13a9}}},
- {0xab7a, {1|F|U, {0x13aa}}},
- {0xab7b, {1|F|U, {0x13ab}}},
- {0xab7c, {1|F|U, {0x13ac}}},
- {0xab7d, {1|F|U, {0x13ad}}},
- {0xab7e, {1|F|U, {0x13ae}}},
- {0xab7f, {1|F|U, {0x13af}}},
- {0xab80, {1|F|U, {0x13b0}}},
- {0xab81, {1|F|U, {0x13b1}}},
- {0xab82, {1|F|U, {0x13b2}}},
- {0xab83, {1|F|U, {0x13b3}}},
- {0xab84, {1|F|U, {0x13b4}}},
- {0xab85, {1|F|U, {0x13b5}}},
- {0xab86, {1|F|U, {0x13b6}}},
- {0xab87, {1|F|U, {0x13b7}}},
- {0xab88, {1|F|U, {0x13b8}}},
- {0xab89, {1|F|U, {0x13b9}}},
- {0xab8a, {1|F|U, {0x13ba}}},
- {0xab8b, {1|F|U, {0x13bb}}},
- {0xab8c, {1|F|U, {0x13bc}}},
- {0xab8d, {1|F|U, {0x13bd}}},
- {0xab8e, {1|F|U, {0x13be}}},
- {0xab8f, {1|F|U, {0x13bf}}},
- {0xab90, {1|F|U, {0x13c0}}},
- {0xab91, {1|F|U, {0x13c1}}},
- {0xab92, {1|F|U, {0x13c2}}},
- {0xab93, {1|F|U, {0x13c3}}},
- {0xab94, {1|F|U, {0x13c4}}},
- {0xab95, {1|F|U, {0x13c5}}},
- {0xab96, {1|F|U, {0x13c6}}},
- {0xab97, {1|F|U, {0x13c7}}},
- {0xab98, {1|F|U, {0x13c8}}},
- {0xab99, {1|F|U, {0x13c9}}},
- {0xab9a, {1|F|U, {0x13ca}}},
- {0xab9b, {1|F|U, {0x13cb}}},
- {0xab9c, {1|F|U, {0x13cc}}},
- {0xab9d, {1|F|U, {0x13cd}}},
- {0xab9e, {1|F|U, {0x13ce}}},
- {0xab9f, {1|F|U, {0x13cf}}},
- {0xaba0, {1|F|U, {0x13d0}}},
- {0xaba1, {1|F|U, {0x13d1}}},
- {0xaba2, {1|F|U, {0x13d2}}},
- {0xaba3, {1|F|U, {0x13d3}}},
- {0xaba4, {1|F|U, {0x13d4}}},
- {0xaba5, {1|F|U, {0x13d5}}},
- {0xaba6, {1|F|U, {0x13d6}}},
- {0xaba7, {1|F|U, {0x13d7}}},
- {0xaba8, {1|F|U, {0x13d8}}},
- {0xaba9, {1|F|U, {0x13d9}}},
- {0xabaa, {1|F|U, {0x13da}}},
- {0xabab, {1|F|U, {0x13db}}},
- {0xabac, {1|F|U, {0x13dc}}},
- {0xabad, {1|F|U, {0x13dd}}},
- {0xabae, {1|F|U, {0x13de}}},
- {0xabaf, {1|F|U, {0x13df}}},
- {0xabb0, {1|F|U, {0x13e0}}},
- {0xabb1, {1|F|U, {0x13e1}}},
- {0xabb2, {1|F|U, {0x13e2}}},
- {0xabb3, {1|F|U, {0x13e3}}},
- {0xabb4, {1|F|U, {0x13e4}}},
- {0xabb5, {1|F|U, {0x13e5}}},
- {0xabb6, {1|F|U, {0x13e6}}},
- {0xabb7, {1|F|U, {0x13e7}}},
- {0xabb8, {1|F|U, {0x13e8}}},
- {0xabb9, {1|F|U, {0x13e9}}},
- {0xabba, {1|F|U, {0x13ea}}},
- {0xabbb, {1|F|U, {0x13eb}}},
- {0xabbc, {1|F|U, {0x13ec}}},
- {0xabbd, {1|F|U, {0x13ed}}},
- {0xabbe, {1|F|U, {0x13ee}}},
- {0xabbf, {1|F|U, {0x13ef}}},
- {0xfb00, {2|F|ST|SU|I(366), {0x0066, 0x0066}}},
- {0xfb01, {2|F|ST|SU|I(370), {0x0066, 0x0069}}},
- {0xfb02, {2|F|ST|SU|I(374), {0x0066, 0x006c}}},
- {0xfb03, {3|F|ST|SU|I(378), {0x0066, 0x0066, 0x0069}}},
- {0xfb04, {3|F|ST|SU|I(384), {0x0066, 0x0066, 0x006c}}},
- {0xfb05, {2|F|ST|SU|I(390), {0x0073, 0x0074}}},
- {0xfb06, {2|F|ST|SU|I(394), {0x0073, 0x0074}}},
- {0xfb13, {2|F|ST|SU|I(398), {0x0574, 0x0576}}},
- {0xfb14, {2|F|ST|SU|I(402), {0x0574, 0x0565}}},
- {0xfb15, {2|F|ST|SU|I(406), {0x0574, 0x056b}}},
- {0xfb16, {2|F|ST|SU|I(410), {0x057e, 0x0576}}},
- {0xfb17, {2|F|ST|SU|I(414), {0x0574, 0x056d}}},
- {0xff21, {1|F|D, {0xff41}}},
- {0xff22, {1|F|D, {0xff42}}},
- {0xff23, {1|F|D, {0xff43}}},
- {0xff24, {1|F|D, {0xff44}}},
- {0xff25, {1|F|D, {0xff45}}},
- {0xff26, {1|F|D, {0xff46}}},
- {0xff27, {1|F|D, {0xff47}}},
- {0xff28, {1|F|D, {0xff48}}},
- {0xff29, {1|F|D, {0xff49}}},
- {0xff2a, {1|F|D, {0xff4a}}},
- {0xff2b, {1|F|D, {0xff4b}}},
- {0xff2c, {1|F|D, {0xff4c}}},
- {0xff2d, {1|F|D, {0xff4d}}},
- {0xff2e, {1|F|D, {0xff4e}}},
- {0xff2f, {1|F|D, {0xff4f}}},
- {0xff30, {1|F|D, {0xff50}}},
- {0xff31, {1|F|D, {0xff51}}},
- {0xff32, {1|F|D, {0xff52}}},
- {0xff33, {1|F|D, {0xff53}}},
- {0xff34, {1|F|D, {0xff54}}},
- {0xff35, {1|F|D, {0xff55}}},
- {0xff36, {1|F|D, {0xff56}}},
- {0xff37, {1|F|D, {0xff57}}},
- {0xff38, {1|F|D, {0xff58}}},
- {0xff39, {1|F|D, {0xff59}}},
- {0xff3a, {1|F|D, {0xff5a}}},
- {0x10400, {1|F|D, {0x10428}}},
- {0x10401, {1|F|D, {0x10429}}},
- {0x10402, {1|F|D, {0x1042a}}},
- {0x10403, {1|F|D, {0x1042b}}},
- {0x10404, {1|F|D, {0x1042c}}},
- {0x10405, {1|F|D, {0x1042d}}},
- {0x10406, {1|F|D, {0x1042e}}},
- {0x10407, {1|F|D, {0x1042f}}},
- {0x10408, {1|F|D, {0x10430}}},
- {0x10409, {1|F|D, {0x10431}}},
- {0x1040a, {1|F|D, {0x10432}}},
- {0x1040b, {1|F|D, {0x10433}}},
- {0x1040c, {1|F|D, {0x10434}}},
- {0x1040d, {1|F|D, {0x10435}}},
- {0x1040e, {1|F|D, {0x10436}}},
- {0x1040f, {1|F|D, {0x10437}}},
- {0x10410, {1|F|D, {0x10438}}},
- {0x10411, {1|F|D, {0x10439}}},
- {0x10412, {1|F|D, {0x1043a}}},
- {0x10413, {1|F|D, {0x1043b}}},
- {0x10414, {1|F|D, {0x1043c}}},
- {0x10415, {1|F|D, {0x1043d}}},
- {0x10416, {1|F|D, {0x1043e}}},
- {0x10417, {1|F|D, {0x1043f}}},
- {0x10418, {1|F|D, {0x10440}}},
- {0x10419, {1|F|D, {0x10441}}},
- {0x1041a, {1|F|D, {0x10442}}},
- {0x1041b, {1|F|D, {0x10443}}},
- {0x1041c, {1|F|D, {0x10444}}},
- {0x1041d, {1|F|D, {0x10445}}},
- {0x1041e, {1|F|D, {0x10446}}},
- {0x1041f, {1|F|D, {0x10447}}},
- {0x10420, {1|F|D, {0x10448}}},
- {0x10421, {1|F|D, {0x10449}}},
- {0x10422, {1|F|D, {0x1044a}}},
- {0x10423, {1|F|D, {0x1044b}}},
- {0x10424, {1|F|D, {0x1044c}}},
- {0x10425, {1|F|D, {0x1044d}}},
- {0x10426, {1|F|D, {0x1044e}}},
- {0x10427, {1|F|D, {0x1044f}}},
- {0x104b0, {1|F|D, {0x104d8}}},
- {0x104b1, {1|F|D, {0x104d9}}},
- {0x104b2, {1|F|D, {0x104da}}},
- {0x104b3, {1|F|D, {0x104db}}},
- {0x104b4, {1|F|D, {0x104dc}}},
- {0x104b5, {1|F|D, {0x104dd}}},
- {0x104b6, {1|F|D, {0x104de}}},
- {0x104b7, {1|F|D, {0x104df}}},
- {0x104b8, {1|F|D, {0x104e0}}},
- {0x104b9, {1|F|D, {0x104e1}}},
- {0x104ba, {1|F|D, {0x104e2}}},
- {0x104bb, {1|F|D, {0x104e3}}},
- {0x104bc, {1|F|D, {0x104e4}}},
- {0x104bd, {1|F|D, {0x104e5}}},
- {0x104be, {1|F|D, {0x104e6}}},
- {0x104bf, {1|F|D, {0x104e7}}},
- {0x104c0, {1|F|D, {0x104e8}}},
- {0x104c1, {1|F|D, {0x104e9}}},
- {0x104c2, {1|F|D, {0x104ea}}},
- {0x104c3, {1|F|D, {0x104eb}}},
- {0x104c4, {1|F|D, {0x104ec}}},
- {0x104c5, {1|F|D, {0x104ed}}},
- {0x104c6, {1|F|D, {0x104ee}}},
- {0x104c7, {1|F|D, {0x104ef}}},
- {0x104c8, {1|F|D, {0x104f0}}},
- {0x104c9, {1|F|D, {0x104f1}}},
- {0x104ca, {1|F|D, {0x104f2}}},
- {0x104cb, {1|F|D, {0x104f3}}},
- {0x104cc, {1|F|D, {0x104f4}}},
- {0x104cd, {1|F|D, {0x104f5}}},
- {0x104ce, {1|F|D, {0x104f6}}},
- {0x104cf, {1|F|D, {0x104f7}}},
- {0x104d0, {1|F|D, {0x104f8}}},
- {0x104d1, {1|F|D, {0x104f9}}},
- {0x104d2, {1|F|D, {0x104fa}}},
- {0x104d3, {1|F|D, {0x104fb}}},
- {0x10c80, {1|F|D, {0x10cc0}}},
- {0x10c81, {1|F|D, {0x10cc1}}},
- {0x10c82, {1|F|D, {0x10cc2}}},
- {0x10c83, {1|F|D, {0x10cc3}}},
- {0x10c84, {1|F|D, {0x10cc4}}},
- {0x10c85, {1|F|D, {0x10cc5}}},
- {0x10c86, {1|F|D, {0x10cc6}}},
- {0x10c87, {1|F|D, {0x10cc7}}},
- {0x10c88, {1|F|D, {0x10cc8}}},
- {0x10c89, {1|F|D, {0x10cc9}}},
- {0x10c8a, {1|F|D, {0x10cca}}},
- {0x10c8b, {1|F|D, {0x10ccb}}},
- {0x10c8c, {1|F|D, {0x10ccc}}},
- {0x10c8d, {1|F|D, {0x10ccd}}},
- {0x10c8e, {1|F|D, {0x10cce}}},
- {0x10c8f, {1|F|D, {0x10ccf}}},
- {0x10c90, {1|F|D, {0x10cd0}}},
- {0x10c91, {1|F|D, {0x10cd1}}},
- {0x10c92, {1|F|D, {0x10cd2}}},
- {0x10c93, {1|F|D, {0x10cd3}}},
- {0x10c94, {1|F|D, {0x10cd4}}},
- {0x10c95, {1|F|D, {0x10cd5}}},
- {0x10c96, {1|F|D, {0x10cd6}}},
- {0x10c97, {1|F|D, {0x10cd7}}},
- {0x10c98, {1|F|D, {0x10cd8}}},
- {0x10c99, {1|F|D, {0x10cd9}}},
- {0x10c9a, {1|F|D, {0x10cda}}},
- {0x10c9b, {1|F|D, {0x10cdb}}},
- {0x10c9c, {1|F|D, {0x10cdc}}},
- {0x10c9d, {1|F|D, {0x10cdd}}},
- {0x10c9e, {1|F|D, {0x10cde}}},
- {0x10c9f, {1|F|D, {0x10cdf}}},
- {0x10ca0, {1|F|D, {0x10ce0}}},
- {0x10ca1, {1|F|D, {0x10ce1}}},
- {0x10ca2, {1|F|D, {0x10ce2}}},
- {0x10ca3, {1|F|D, {0x10ce3}}},
- {0x10ca4, {1|F|D, {0x10ce4}}},
- {0x10ca5, {1|F|D, {0x10ce5}}},
- {0x10ca6, {1|F|D, {0x10ce6}}},
- {0x10ca7, {1|F|D, {0x10ce7}}},
- {0x10ca8, {1|F|D, {0x10ce8}}},
- {0x10ca9, {1|F|D, {0x10ce9}}},
- {0x10caa, {1|F|D, {0x10cea}}},
- {0x10cab, {1|F|D, {0x10ceb}}},
- {0x10cac, {1|F|D, {0x10cec}}},
- {0x10cad, {1|F|D, {0x10ced}}},
- {0x10cae, {1|F|D, {0x10cee}}},
- {0x10caf, {1|F|D, {0x10cef}}},
- {0x10cb0, {1|F|D, {0x10cf0}}},
- {0x10cb1, {1|F|D, {0x10cf1}}},
- {0x10cb2, {1|F|D, {0x10cf2}}},
- {0x118a0, {1|F|D, {0x118c0}}},
- {0x118a1, {1|F|D, {0x118c1}}},
- {0x118a2, {1|F|D, {0x118c2}}},
- {0x118a3, {1|F|D, {0x118c3}}},
- {0x118a4, {1|F|D, {0x118c4}}},
- {0x118a5, {1|F|D, {0x118c5}}},
- {0x118a6, {1|F|D, {0x118c6}}},
- {0x118a7, {1|F|D, {0x118c7}}},
- {0x118a8, {1|F|D, {0x118c8}}},
- {0x118a9, {1|F|D, {0x118c9}}},
- {0x118aa, {1|F|D, {0x118ca}}},
- {0x118ab, {1|F|D, {0x118cb}}},
- {0x118ac, {1|F|D, {0x118cc}}},
- {0x118ad, {1|F|D, {0x118cd}}},
- {0x118ae, {1|F|D, {0x118ce}}},
- {0x118af, {1|F|D, {0x118cf}}},
- {0x118b0, {1|F|D, {0x118d0}}},
- {0x118b1, {1|F|D, {0x118d1}}},
- {0x118b2, {1|F|D, {0x118d2}}},
- {0x118b3, {1|F|D, {0x118d3}}},
- {0x118b4, {1|F|D, {0x118d4}}},
- {0x118b5, {1|F|D, {0x118d5}}},
- {0x118b6, {1|F|D, {0x118d6}}},
- {0x118b7, {1|F|D, {0x118d7}}},
- {0x118b8, {1|F|D, {0x118d8}}},
- {0x118b9, {1|F|D, {0x118d9}}},
- {0x118ba, {1|F|D, {0x118da}}},
- {0x118bb, {1|F|D, {0x118db}}},
- {0x118bc, {1|F|D, {0x118dc}}},
- {0x118bd, {1|F|D, {0x118dd}}},
- {0x118be, {1|F|D, {0x118de}}},
- {0x118bf, {1|F|D, {0x118df}}},
- {0x16e40, {1|F|D, {0x16e60}}},
- {0x16e41, {1|F|D, {0x16e61}}},
- {0x16e42, {1|F|D, {0x16e62}}},
- {0x16e43, {1|F|D, {0x16e63}}},
- {0x16e44, {1|F|D, {0x16e64}}},
- {0x16e45, {1|F|D, {0x16e65}}},
- {0x16e46, {1|F|D, {0x16e66}}},
- {0x16e47, {1|F|D, {0x16e67}}},
- {0x16e48, {1|F|D, {0x16e68}}},
- {0x16e49, {1|F|D, {0x16e69}}},
- {0x16e4a, {1|F|D, {0x16e6a}}},
- {0x16e4b, {1|F|D, {0x16e6b}}},
- {0x16e4c, {1|F|D, {0x16e6c}}},
- {0x16e4d, {1|F|D, {0x16e6d}}},
- {0x16e4e, {1|F|D, {0x16e6e}}},
- {0x16e4f, {1|F|D, {0x16e6f}}},
- {0x16e50, {1|F|D, {0x16e70}}},
- {0x16e51, {1|F|D, {0x16e71}}},
- {0x16e52, {1|F|D, {0x16e72}}},
- {0x16e53, {1|F|D, {0x16e73}}},
- {0x16e54, {1|F|D, {0x16e74}}},
- {0x16e55, {1|F|D, {0x16e75}}},
- {0x16e56, {1|F|D, {0x16e76}}},
- {0x16e57, {1|F|D, {0x16e77}}},
- {0x16e58, {1|F|D, {0x16e78}}},
- {0x16e59, {1|F|D, {0x16e79}}},
- {0x16e5a, {1|F|D, {0x16e7a}}},
- {0x16e5b, {1|F|D, {0x16e7b}}},
- {0x16e5c, {1|F|D, {0x16e7c}}},
- {0x16e5d, {1|F|D, {0x16e7d}}},
- {0x16e5e, {1|F|D, {0x16e7e}}},
- {0x16e5f, {1|F|D, {0x16e7f}}},
- {0x1e900, {1|F|D, {0x1e922}}},
- {0x1e901, {1|F|D, {0x1e923}}},
- {0x1e902, {1|F|D, {0x1e924}}},
- {0x1e903, {1|F|D, {0x1e925}}},
- {0x1e904, {1|F|D, {0x1e926}}},
- {0x1e905, {1|F|D, {0x1e927}}},
- {0x1e906, {1|F|D, {0x1e928}}},
- {0x1e907, {1|F|D, {0x1e929}}},
- {0x1e908, {1|F|D, {0x1e92a}}},
- {0x1e909, {1|F|D, {0x1e92b}}},
- {0x1e90a, {1|F|D, {0x1e92c}}},
- {0x1e90b, {1|F|D, {0x1e92d}}},
- {0x1e90c, {1|F|D, {0x1e92e}}},
- {0x1e90d, {1|F|D, {0x1e92f}}},
- {0x1e90e, {1|F|D, {0x1e930}}},
- {0x1e90f, {1|F|D, {0x1e931}}},
- {0x1e910, {1|F|D, {0x1e932}}},
- {0x1e911, {1|F|D, {0x1e933}}},
- {0x1e912, {1|F|D, {0x1e934}}},
- {0x1e913, {1|F|D, {0x1e935}}},
- {0x1e914, {1|F|D, {0x1e936}}},
- {0x1e915, {1|F|D, {0x1e937}}},
- {0x1e916, {1|F|D, {0x1e938}}},
- {0x1e917, {1|F|D, {0x1e939}}},
- {0x1e918, {1|F|D, {0x1e93a}}},
- {0x1e919, {1|F|D, {0x1e93b}}},
- {0x1e91a, {1|F|D, {0x1e93c}}},
- {0x1e91b, {1|F|D, {0x1e93d}}},
- {0x1e91c, {1|F|D, {0x1e93e}}},
- {0x1e91d, {1|F|D, {0x1e93f}}},
- {0x1e91e, {1|F|D, {0x1e940}}},
- {0x1e91f, {1|F|D, {0x1e941}}},
- {0x1e920, {1|F|D, {0x1e942}}},
- {0x1e921, {1|F|D, {0x1e943}}},
-#define CaseFold_Locale (*(CaseFold_11_Type (*)[2])(CaseFold_11_Table+1485))
- {0x0049, {1|F|D, {0x0069}}},
- {0x0130, {2|F|D, {0x0069, 0x0307}}},
-};
-
-/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseFold_11_hash -N onigenc_unicode_CaseFold_11_lookup -n */
-
-/* maximum key range = 3500, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-/*ARGSUSED*/
-static unsigned int
-onigenc_unicode_CaseFold_11_hash(const OnigCodePoint code)
-{
- static const unsigned short asso_values[] =
- {
- 5, 273, 4, 8, 3, 1, 86, 9, 2, 289,
- 290, 3, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510,
- 3510, 3510, 3510, 3510, 3510, 50, 3510, 3510, 3510, 3510,
- 3510, 3510, 3510, 225, 3510, 3510, 3510, 3510, 3510, 28,
- 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 394,
- 3510, 3510, 3510, 3510, 3510, 3510, 3510, 47, 3510, 3510,
- 255, 40, 286, 1, 3510, 3510, 599, 8, 3510, 3510,
- 3510, 3510, 3510, 282, 3510, 3510, 267, 667, 473, 39,
- 2019, 189, 47, 175, 2001, 107, 1626, 6, 12, 25,
- 1961, 678, 1128, 526, 1945, 148, 1923, 371, 1720, 134,
- 1857, 80, 1375, 66, 1705, 300, 1635, 445, 1611, 472,
- 1795, 216, 1303, 499, 1552, 270, 1511, 243, 121, 619,
- 1284, 540, 875, 592, 1484, 567, 412, 703, 1692, 387,
- 1782, 781, 1767, 664, 1718, 648, 1316, 608, 1647, 715,
- 1592, 771, 1544, 1029, 1563, 887, 1296, 861, 1194, 978,
- 95, 899, 1257, 835, 1335, 765, 1529, 984, 862, 938,
- 1460, 759, 329, 1079, 1159, 940, 234, 1101, 1204, 990,
- 949, 1493, 92, 1438, 77, 1391, 7, 1073, 44, 1377,
- 2, 1435, 4, 1321, 428, 1274, 332, 1206, 11, 1426,
- 46, 478, 200, 1502, 31, 1400, 153, 1663, 352, 1820,
- 229, 1733, 265, 1405, 315, 1879, 198
- };
- return asso_values[bits_of(code, 2)+79] + asso_values[bits_of(code, 1)] + asso_values[bits_of(code, 0)];
-}
-
-static const CodePointList3 *
-onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code)
-{
- enum
- {
- MIN_CODE_VALUE = 0x41,
- MAX_CODE_VALUE = 0x1e921,
- TOTAL_KEYWORDS = 1487,
- MIN_WORD_LENGTH = 3,
- MAX_WORD_LENGTH = 3,
- MIN_HASH_VALUE = 10,
- MAX_HASH_VALUE = 3509
- };
-
- static const short wordlist[] =
- {
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0x1fe7*/ 848,
- /*0x10408*/ 1268,
- /*0x1f88*/ 775,
- /*0x0408*/ 305,
- /*0x0208*/ 194,
- /*0x0108*/ 61,
- /*0xab88*/ 1166,
- /*0x10409*/ 1269,
- /*0x1f89*/ 776,
- /*0x0409*/ 306,
- /*0x0388*/ 235,
- /*0x2c67*/ 962,
- /*0xab89*/ 1167,
- /*0x2c08*/ 919,
- -1,
- /*0x0189*/ 126,
- /*0x0389*/ 236,
- -1,
- /*0x2c6d*/ 965,
- /*0x2c09*/ 920,
- /*0x1040a*/ 1270,
- /*0x1f8a*/ 777,
- /*0x040a*/ 307,
- /*0x020a*/ 195,
- /*0x010a*/ 62,
- /*0xab8a*/ 1168,
- /*0x2c88*/ 977,
- /*0x1ff3*/ 855,
- /*0x018a*/ 127,
- /*0x038a*/ 237,
- -1,
- /*0x2ced*/ 1024,
- /*0x2c0a*/ 921,
- -1,
- /*0x10400*/ 1260,
- /*0x1f80*/ 767,
- /*0x0400*/ 297,
- /*0x0200*/ 190,
- /*0x0100*/ 57,
- /*0xab80*/ 1158,
- /*0x1fe3*/ 845,
- /*0x1e88*/ 653,
- /*0x10403*/ 1263,
- /*0x1f83*/ 770,
- /*0x0403*/ 300,
- /*0x2c8a*/ 978,
- /*0x2c00*/ 911,
- /*0xab83*/ 1161,
- /*0x1c88*/ 538,
- /*0x10c88*/ 1344,
- /*0x2183*/ 884,
- /*0x2c63*/ 960,
- /*0x1e908*/ 1459,
- /*0x2c6f*/ 967,
- /*0x2c03*/ 914,
- /*0x10c89*/ 1345,
- -1, -1,
- /*0x1e909*/ 1460,
- /*0x2c80*/ 973,
- /*0x1e8a*/ 654,
- /*0x10418*/ 1284,
- /*0x1f98*/ 791,
- /*0x0418*/ 321,
- /*0x0218*/ 202,
- /*0x0118*/ 69,
- /*0xab98*/ 1182,
- -1,
- /*0x10c8a*/ 1346,
- /*0x0198*/ 137,
- /*0x0398*/ 249,
- /*0x1e90a*/ 1461,
- /*0xa780*/ 1105,
- /*0x2c18*/ 935,
- /*0x1e80*/ 649,
- /*0x10416*/ 1282,
- /*0x1f96*/ 789,
- /*0x0416*/ 319,
- /*0x0216*/ 201,
- /*0x0116*/ 68,
- /*0xab96*/ 1180,
- /*0x1c80*/ 530,
- /*0x10c80*/ 1336,
- /*0x0196*/ 135,
- /*0x0396*/ 247,
- /*0x1e900*/ 1451,
- /*0x2c98*/ 985,
- /*0x2c16*/ 933,
- -1,
- /*0x1c83*/ 533,
- /*0x10c83*/ 1339,
- /*0x1fc7*/ 830,
- -1,
- /*0x1e903*/ 1454,
- /*0x0147*/ 91,
- /*0x0047*/ 6,
- -1, -1,
- /*0x01c7*/ 159,
- /*0xa798*/ 1114,
- /*0x2c96*/ 984,
- /*0x1e98*/ 662,
- /*0x10406*/ 1266,
- /*0x1f86*/ 773,
- /*0x0406*/ 303,
- /*0x0206*/ 193,
- /*0x0106*/ 60,
- /*0xab86*/ 1164,
- /*0x1c98*/ 547,
- /*0x10c98*/ 1360,
- /*0x0186*/ 124,
- /*0x0386*/ 234,
- /*0x1e918*/ 1475,
- /*0xa796*/ 1113,
- /*0x2c06*/ 917,
- /*0x1e96*/ 660,
- /*0x10427*/ 1299,
- /*0x1fa7*/ 806,
- /*0x0427*/ 336,
- -1, -1,
- /*0xaba7*/ 1197,
- /*0x1c96*/ 545,
- /*0x10c96*/ 1358,
- /*0x01a7*/ 145,
- /*0x03a7*/ 263,
- /*0x1e916*/ 1473,
- /*0x2c86*/ 976,
- /*0x2c27*/ 950,
- /*0x10414*/ 1280,
- /*0x1f94*/ 787,
- /*0x0414*/ 317,
- /*0x0214*/ 200,
- /*0x0114*/ 67,
- /*0xab94*/ 1178,
- -1, -1,
- /*0x0194*/ 134,
- /*0x0394*/ 245,
- -1,
- /*0xa786*/ 1108,
- /*0x2c14*/ 931,
- /*0x1e86*/ 652,
- /*0x10410*/ 1276,
- /*0x1f90*/ 783,
- /*0x0410*/ 313,
- /*0x0210*/ 198,
- /*0x0110*/ 65,
- /*0xab90*/ 1174,
- /*0x1c86*/ 536,
- /*0x10c86*/ 1342,
- /*0x0190*/ 131,
- /*0x0390*/ 241,
- /*0x1e906*/ 1457,
- /*0x2c94*/ 983,
- /*0x2c10*/ 927,
- -1,
- /*0x03f5*/ 290,
- /*0xfb00*/ 1222,
- -1,
- /*0x2c75*/ 970,
- -1, -1,
- /*0x1ca7*/ 562,
- /*0x10ca7*/ 1375,
- -1,
- /*0xfb03*/ 1225,
- -1,
- /*0x2c90*/ 981,
- /*0x1e94*/ 659,
- /*0x10404*/ 1264,
- /*0x1f84*/ 771,
- /*0x0404*/ 301,
- /*0x0204*/ 192,
- /*0x0104*/ 59,
- /*0xab84*/ 1162,
- /*0x1c94*/ 543,
- /*0x10c94*/ 1356,
- /*0x0184*/ 123,
- -1,
- /*0x1e914*/ 1471,
- /*0xa790*/ 1111,
- /*0x2c04*/ 915,
- /*0x1e90*/ 657,
- /*0x10402*/ 1262,
- /*0x1f82*/ 769,
- /*0x0402*/ 299,
- /*0x0202*/ 191,
- /*0x0102*/ 58,
- /*0xab82*/ 1160,
- /*0x1c90*/ 539,
- /*0x10c90*/ 1352,
- /*0x0182*/ 122,
- -1,
- /*0x1e910*/ 1467,
- /*0x2c84*/ 975,
- /*0x2c02*/ 913,
- /*0x017f*/ 120,
- -1,
- /*0xfb16*/ 1232,
- -1, -1,
- /*0x03ff*/ 296,
- /*0x01f1*/ 181,
- /*0x03f1*/ 288,
- /*0x2c7f*/ 972,
- -1, -1,
- /*0xa784*/ 1107,
- /*0x2c82*/ 974,
- /*0x1e84*/ 651,
- /*0x10420*/ 1292,
- /*0x1fa0*/ 799,
- /*0x0420*/ 329,
- /*0x0220*/ 206,
- /*0x0120*/ 73,
- /*0xaba0*/ 1190,
- /*0x1c84*/ 534,
- /*0x10c84*/ 1340,
- /*0x01a0*/ 141,
- /*0x03a0*/ 257,
- /*0x1e904*/ 1455,
- /*0xa782*/ 1106,
- /*0x2c20*/ 943,
- /*0x1e82*/ 650,
- /*0x1ff9*/ 860,
- /*0xfb06*/ 1228,
- -1,
- /*0x0179*/ 117,
- -1,
- /*0x1fd7*/ 839,
- /*0x1c82*/ 532,
- /*0x10c82*/ 1338,
- /*0x03f9*/ 292,
- /*0x0057*/ 21,
- /*0x1e902*/ 1453,
- /*0x2ca0*/ 989,
- /*0x01d7*/ 168,
- /*0x10426*/ 1298,
- /*0x1fa6*/ 805,
- /*0x0426*/ 335,
- /*0x0226*/ 209,
- /*0x0126*/ 76,
- /*0xaba6*/ 1196,
- -1, -1,
- /*0x01a6*/ 144,
- /*0x03a6*/ 262,
- -1,
- /*0xa7a0*/ 1118,
- /*0x2c26*/ 949,
- /*0x1ea0*/ 667,
- /*0x13f9*/ 525,
- /*0xfb14*/ 1230,
- -1, -1,
- /*0x1e08*/ 589,
- -1,
- /*0x1ca0*/ 555,
- /*0x10ca0*/ 1368,
- -1,
- /*0x1ffb*/ 862,
- /*0x1e920*/ 1483,
- /*0x2ca6*/ 992,
- /*0x017b*/ 118,
- /*0x10424*/ 1296,
- /*0x1fa4*/ 803,
- /*0x0424*/ 333,
- /*0x0224*/ 208,
- /*0x0124*/ 75,
- /*0xaba4*/ 1194,
- -1, -1,
- /*0x01a4*/ 143,
- /*0x03a4*/ 260,
- /*0x1e0a*/ 590,
- /*0xa7a6*/ 1121,
- /*0x2c24*/ 947,
- /*0x1ea6*/ 670,
- /*0x037f*/ 233,
- -1, -1, -1, -1, -1,
- /*0x1ca6*/ 561,
- /*0x10ca6*/ 1374,
- /*0x1f08*/ 715,
- /*0x13fb*/ 527,
- /*0x1e00*/ 585,
- /*0x2ca4*/ 991,
- /*0x0508*/ 425,
- /*0x1f6d*/ 764,
- /*0x1f09*/ 716,
- /*0xfb04*/ 1226,
- /*0x1041a*/ 1286,
- /*0x1f9a*/ 793,
- /*0x041a*/ 323,
- /*0x021a*/ 203,
- /*0x011a*/ 70,
- /*0xab9a*/ 1184,
- -1, -1,
- /*0xa7a4*/ 1120,
- /*0x039a*/ 251,
- /*0x1ea4*/ 669,
- /*0x1f0a*/ 717,
- /*0x2c1a*/ 937,
- /*0xfb02*/ 1224,
- /*0x048a*/ 362,
- /*0x050a*/ 426,
- -1,
- /*0x1ca4*/ 559,
- /*0x10ca4*/ 1372,
- /*0x017d*/ 119,
- /*0x10c7*/ 522,
- /*0x1e18*/ 597,
- -1, -1,
- /*0x03fd*/ 294,
- /*0x2c9a*/ 986,
- -1, -1,
- /*0x0480*/ 361,
- /*0x0500*/ 421,
- /*0x1fd3*/ 837,
- -1,
- /*0x1f6f*/ 766,
- /*0x1feb*/ 852,
- /*0x0053*/ 17,
- /*0x1e16*/ 596,
- -1,
- /*0x01d3*/ 166,
- /*0xa79a*/ 1115,
- -1,
- /*0x1e9a*/ 664,
- -1, -1,
- /*0x13fd*/ 529,
- /*0x2c6b*/ 964,
- -1,
- /*0x10a7*/ 491,
- /*0x1c9a*/ 549,
- /*0x10c9a*/ 1362,
- -1,
- /*0x00df*/ 56,
- /*0x1e91a*/ 1477,
- /*0x1f18*/ 723,
- /*0x1ff7*/ 858,
- -1,
- /*0x0498*/ 369,
- /*0x0518*/ 433,
- /*0x2ceb*/ 1023,
- -1, -1,
- /*0x01f7*/ 185,
- /*0x03f7*/ 291,
- /*0x1e06*/ 588,
- /*0x1f5f*/ 758,
- -1,
- /*0x00dd*/ 54,
- -1, -1,
- /*0x00c7*/ 33,
- /*0x0496*/ 368,
- /*0x0516*/ 432,
- /*0x10412*/ 1278,
- /*0x1f92*/ 785,
- /*0x0412*/ 315,
- /*0x0212*/ 199,
- /*0x0112*/ 66,
- /*0xab92*/ 1176,
- /*0x24c7*/ 902,
- /*0x1f5d*/ 757,
- -1,
- /*0x0392*/ 243,
- -1,
- /*0x104c7*/ 1323,
- /*0x2c12*/ 929,
- /*0x04c7*/ 393,
- /*0x0547*/ 467,
- -1, -1,
- /*0x1fb2*/ 815,
- /*0x1e14*/ 595,
- /*0x0232*/ 215,
- /*0x0132*/ 81,
- /*0xabb2*/ 1208,
- -1, -1,
- /*0x01b2*/ 151,
- /*0x2c92*/ 982,
- /*0x0506*/ 424,
- -1, -1, -1, -1, -1,
- /*0x1e10*/ 593,
- -1, -1, -1, -1, -1,
- /*0xa792*/ 1112,
- -1,
- /*0x1e92*/ 658,
- /*0x2cb2*/ 998,
- /*0x1faf*/ 814,
- /*0x042f*/ 344,
- -1, -1,
- /*0xabaf*/ 1205,
- /*0x1c92*/ 541,
- /*0x10c92*/ 1354,
- /*0x01af*/ 149,
- -1,
- /*0x1e912*/ 1469,
- /*0x0494*/ 367,
- /*0x0514*/ 431,
- /*0xa7b2*/ 1130,
- -1,
- /*0x1eb2*/ 676,
- -1,
- /*0x1fe9*/ 850,
- /*0x1e04*/ 587,
- -1, -1, -1,
- /*0x1cb2*/ 573,
- /*0x10cb2*/ 1386,
- -1,
- /*0x0490*/ 365,
- /*0x0510*/ 429,
- -1,
- /*0x2c69*/ 963,
- /*0x10a0*/ 484,
- -1, -1,
- /*0x1e02*/ 586,
- /*0x1041c*/ 1288,
- /*0x1f9c*/ 795,
- /*0x041c*/ 325,
- /*0x021c*/ 204,
- /*0x011c*/ 71,
- /*0xab9c*/ 1186,
- -1, -1,
- /*0x019c*/ 138,
- /*0x039c*/ 253,
- -1, -1,
- /*0x2c1c*/ 939,
- -1,
- /*0x1caf*/ 570,
- /*0x10caf*/ 1383,
- -1, -1, -1, -1,
- /*0x0504*/ 423,
- -1, -1,
- /*0x10a6*/ 490,
- -1,
- /*0x2c9c*/ 987,
- /*0x1e20*/ 601,
- /*0x1041e*/ 1290,
- /*0x1f9e*/ 797,
- /*0x041e*/ 327,
- /*0x021e*/ 205,
- /*0x011e*/ 72,
- /*0xab9e*/ 1188,
- -1,
- /*0x0502*/ 422,
- /*0x0470*/ 353,
- /*0x039e*/ 255,
- /*0x0170*/ 112,
- /*0xa79c*/ 1116,
- /*0x2c1e*/ 941,
- -1,
- /*0x01f0*/ 180,
- /*0x03f0*/ 287,
- -1, -1,
- /*0x2c70*/ 968,
- -1,
- /*0x1c9c*/ 551,
- /*0x10c9c*/ 1364,
- -1,
- /*0x10a4*/ 488,
- /*0x1e91c*/ 1479,
- /*0x2c9e*/ 988,
- /*0x1e26*/ 604,
- /*0x10422*/ 1294,
- /*0x1fa2*/ 801,
- /*0x0422*/ 331,
- /*0x0222*/ 207,
- /*0x0122*/ 74,
- /*0xaba2*/ 1192,
- /*0x04a0*/ 373,
- /*0x0520*/ 437,
- /*0x01a2*/ 142,
- -1, -1,
- /*0xa79e*/ 1117,
- /*0x2c22*/ 945,
- /*0x1e9e*/ 666,
- /*0x118a7*/ 1394,
- -1, -1, -1, -1,
- /*0x1ef0*/ 707,
- /*0x1c9e*/ 553,
- /*0x10c9e*/ 1366,
- -1, -1,
- /*0x1e91e*/ 1481,
- /*0x2ca2*/ 990,
- /*0x1e24*/ 603,
- /*0x1040e*/ 1274,
- /*0x1f8e*/ 781,
- /*0x040e*/ 311,
- /*0x020e*/ 197,
- /*0x010e*/ 64,
- /*0xab8e*/ 1172,
- /*0x04a6*/ 376,
- /*0x0526*/ 440,
- /*0x018e*/ 129,
- /*0x038e*/ 239,
- /*0xff27*/ 1240,
- /*0xa7a2*/ 1119,
- /*0x2c0e*/ 925,
- /*0x1ea2*/ 668,
- -1,
- /*0x1faa*/ 809,
- /*0x042a*/ 339,
- /*0x022a*/ 211,
- /*0x012a*/ 78,
- /*0xabaa*/ 1200,
- /*0x1ca2*/ 557,
- /*0x10ca2*/ 1370,
- -1,
- /*0x03aa*/ 266,
- -1,
- /*0x2c8e*/ 980,
- /*0x2c2a*/ 953,
- -1, -1,
- /*0x1e1a*/ 598,
- -1, -1, -1,
- /*0x04a4*/ 375,
- /*0x0524*/ 439,
- -1, -1, -1,
- /*0x0370*/ 230,
- /*0x2caa*/ 994,
- /*0x1e8e*/ 656,
- -1,
- /*0x1fae*/ 813,
- /*0x042e*/ 343,
- /*0x022e*/ 213,
- /*0x012e*/ 80,
- /*0xabae*/ 1204,
- -1,
- /*0x10c8e*/ 1350,
- /*0x01ae*/ 148,
- -1,
- /*0x1e90e*/ 1465,
- /*0xa7aa*/ 1123,
- /*0x2c2e*/ 957,
- /*0x1eaa*/ 672,
- -1, -1, -1, -1, -1,
- /*0x1f1a*/ 725,
- /*0x1caa*/ 565,
- /*0x10caa*/ 1378,
- /*0x049a*/ 370,
- /*0x051a*/ 434,
- -1,
- /*0x2cae*/ 996,
- /*0x1fac*/ 811,
- /*0x042c*/ 341,
- /*0x022c*/ 212,
- /*0x012c*/ 79,
- /*0xabac*/ 1202,
- -1, -1,
- /*0x01ac*/ 147,
- /*0x2165*/ 873,
- /*0x00d3*/ 45,
- /*0x2167*/ 875,
- /*0x2c2c*/ 955,
- /*0xa7ae*/ 1127,
- /*0x2161*/ 869,
- /*0x1eae*/ 674,
- /*0x118a0*/ 1387,
- /*0x1fba*/ 822,
- /*0x216d*/ 881,
- /*0x023a*/ 216,
- /*0x10b2*/ 502,
- /*0xabba*/ 1216,
- /*0x1cae*/ 569,
- /*0x10cae*/ 1382,
- /*0x104d3*/ 1335,
- /*0x2cac*/ 995,
- /*0x1f6b*/ 762,
- /*0x0553*/ 479,
- /*0x1fa8*/ 807,
- /*0x0428*/ 337,
- /*0x0228*/ 210,
- /*0x0128*/ 77,
- /*0xaba8*/ 1198,
- -1,
- /*0x1e12*/ 594,
- -1,
- /*0x03a8*/ 264,
- -1,
- /*0xa7ac*/ 1125,
- /*0x2c28*/ 951,
- /*0x1eac*/ 673,
- /*0x2cba*/ 1002,
- -1,
- /*0x118a6*/ 1393,
- -1,
- /*0x10af*/ 499,
- -1,
- /*0x1cac*/ 567,
- /*0x10cac*/ 1380,
- -1,
- /*0x1e32*/ 610,
- /*0x2163*/ 871,
- /*0x2ca8*/ 993,
- /*0x216f*/ 883,
- /*0xa7ba*/ 1135,
- -1,
- /*0x1eba*/ 680,
- /*0x1fb8*/ 820,
- -1, -1, -1,
- /*0xabb8*/ 1214,
- -1,
- /*0x1cba*/ 581,
- /*0x01b8*/ 155,
- /*0xa7a8*/ 1122,
- /*0xff26*/ 1239,
- /*0x1ea8*/ 671,
- /*0x0492*/ 366,
- /*0x0512*/ 430,
- /*0x118a4*/ 1391,
- -1, -1,
- /*0x1fb6*/ 818,
- /*0x1ca8*/ 563,
- /*0x10ca8*/ 1376,
- /*0x0136*/ 83,
- /*0xabb6*/ 1212,
- -1, -1,
- /*0xa688*/ 1053,
- /*0x2cb8*/ 1001,
- /*0x104b2*/ 1302,
- -1,
- /*0x04b2*/ 382,
- /*0x0532*/ 446,
- /*0x1040c*/ 1272,
- /*0x1f8c*/ 779,
- /*0x040c*/ 309,
- /*0x020c*/ 196,
- /*0x010c*/ 63,
- /*0xab8c*/ 1170,
- -1,
- /*0xff24*/ 1237,
- /*0xa7b8*/ 1134,
- /*0x038c*/ 238,
- /*0x1eb8*/ 679,
- /*0x2cb6*/ 1000,
- /*0x2c0c*/ 923,
- /*0xa68a*/ 1054,
- -1, -1, -1,
- /*0x1cb8*/ 579,
- -1, -1,
- /*0x1f2f*/ 736,
- -1,
- /*0x1e1c*/ 599,
- /*0xa779*/ 1101,
- /*0xa7b6*/ 1133,
- /*0x2c8c*/ 979,
- /*0x1eb6*/ 678,
- /*0xa680*/ 1049,
- /*0x0230*/ 214,
- /*0x0130*/ 1486,
- /*0xabb0*/ 1206,
- -1, -1,
- /*0x1cb6*/ 577,
- /*0x03b0*/ 268,
- -1,
- /*0x1f69*/ 760,
- /*0xa726*/ 1065,
- /*0x1fbc*/ 824,
- -1,
- /*0x1e8c*/ 655,
- -1,
- /*0xabbc*/ 1218,
- -1, -1,
- /*0x01bc*/ 156,
- /*0x10a2*/ 486,
- -1,
- /*0x10c8c*/ 1348,
- /*0x1e1e*/ 600,
- /*0x2cb0*/ 997,
- /*0x1e90c*/ 1463,
- -1,
- /*0x1f1c*/ 727,
- /*0xa698*/ 1061,
- /*0x1e70*/ 641,
- /*0x049c*/ 371,
- /*0x051c*/ 435,
- -1,
- /*0xa77b*/ 1102,
- -1, -1,
- /*0x2cbc*/ 1003,
- /*0xa7b0*/ 1128,
- /*0xa724*/ 1064,
- /*0x1eb0*/ 675,
- -1, -1,
- /*0xa696*/ 1060,
- -1, -1, -1,
- /*0x1cb0*/ 571,
- /*0x10cb0*/ 1384,
- -1,
- /*0xa7bc*/ 1136,
- /*0x1e22*/ 602,
- /*0x1ebc*/ 681,
- -1, -1, -1, -1,
- /*0x1fd2*/ 836,
- /*0x049e*/ 372,
- /*0x051e*/ 436,
- /*0x0152*/ 97,
- /*0x0052*/ 16,
- /*0x10aa*/ 494,
- /*0x1fcc*/ 835,
- /*0x04f0*/ 413,
- /*0x024c*/ 227,
- /*0x014c*/ 94,
- /*0x004c*/ 10,
- -1,
- /*0x1fbe*/ 825,
- /*0xa686*/ 1052,
- /*0x023e*/ 219,
- -1,
- /*0xabbe*/ 1220,
- -1, -1,
- /*0x118b2*/ 1405,
- -1,
- /*0x1e0e*/ 592,
- /*0x1fb4*/ 817,
- -1,
- /*0x2cd2*/ 1014,
- /*0x0134*/ 82,
- /*0xabb4*/ 1210,
- /*0xa77d*/ 1103,
- /*0x04a2*/ 374,
- /*0x0522*/ 438,
- /*0x2ccc*/ 1011,
- -1,
- /*0x10ae*/ 498,
- -1, -1,
- /*0x1e2a*/ 606,
- /*0x2cbe*/ 1004,
- -1, -1,
- /*0x1ed2*/ 692,
- /*0xa694*/ 1059,
- -1,
- /*0xff32*/ 1251,
- -1,
- /*0x118af*/ 1402,
- /*0x1ecc*/ 689,
- /*0x2cb4*/ 999,
- -1, -1,
- /*0xa7be*/ 1137,
- -1,
- /*0x1ebe*/ 682,
- /*0x1f0e*/ 721,
- -1,
- /*0xa690*/ 1057,
- /*0x048e*/ 364,
- /*0x050e*/ 428,
- /*0x10ac*/ 496,
- /*0x1cbe*/ 583,
- /*0xa7b4*/ 1132,
- -1,
- /*0x1eb4*/ 677,
- /*0x1e2e*/ 608,
- -1, -1, -1,
- /*0x1f2a*/ 731,
- /*0xff2f*/ 1248,
- /*0x1cb4*/ 575,
- /*0x04aa*/ 378,
- /*0x052a*/ 442,
- -1, -1,
- /*0x10ba*/ 510,
- -1, -1,
- /*0x1fca*/ 833,
- -1,
- /*0x024a*/ 226,
- /*0x014a*/ 93,
- /*0x004a*/ 8,
- /*0xa684*/ 1051,
- /*0x2126*/ 864,
- /*0x01ca*/ 161,
- /*0x10a8*/ 492,
- -1, -1,
- /*0x1e2c*/ 607,
- -1, -1, -1, -1, -1,
- /*0x1f2e*/ 735,
- -1,
- /*0xa682*/ 1050,
- /*0x04ae*/ 380,
- /*0x052e*/ 444,
- -1,
- /*0xa732*/ 1070,
- /*0x2cca*/ 1010,
- -1,
- /*0x1fc4*/ 828,
- /*0x1e3a*/ 614,
- /*0x0244*/ 222,
- -1,
- /*0x0044*/ 3,
- /*0x004f*/ 13,
- -1,
- /*0x01c4*/ 157,
- /*0x01cf*/ 164,
- /*0x03cf*/ 270,
- -1,
- /*0x10b8*/ 508,
- /*0x1e28*/ 605,
- /*0x1eca*/ 688,
- /*0x1fab*/ 810,
- /*0x042b*/ 340,
- /*0x1f2c*/ 733,
- -1,
- /*0xabab*/ 1201,
- /*0x04ac*/ 379,
- /*0x052c*/ 443,
- -1,
- /*0x03ab*/ 267,
- -1,
- /*0x2cc4*/ 1007,
- /*0x2c2b*/ 954,
- /*0x1fc2*/ 826,
- /*0x10b6*/ 506,
- /*0x24ba*/ 889,
- /*0x118a2*/ 1389,
- /*0x0042*/ 1,
- -1,
- /*0x1f3a*/ 739,
- /*0x104ba*/ 1310,
- /*0x03c2*/ 269,
- /*0x04ba*/ 386,
- /*0x053a*/ 454,
- /*0xa7c4*/ 1139,
- /*0x1fc8*/ 831,
- /*0x1ec4*/ 685,
- /*0x0248*/ 225,
- /*0x1e38*/ 613,
- /*0x0048*/ 7,
- /*0x1f28*/ 729,
- -1,
- /*0x01c8*/ 160,
- /*0x04a8*/ 377,
- /*0x0528*/ 441,
- -1, -1,
- /*0x2cc2*/ 1006,
- /*0xa7ab*/ 1124,
- /*0xff22*/ 1235,
- -1, -1, -1, -1,
- /*0x1e36*/ 612,
- -1, -1,
- /*0x1cab*/ 566,
- /*0x10cab*/ 1379,
- /*0x2cc8*/ 1009,
- /*0xa7c2*/ 1138,
- -1,
- /*0x1ec2*/ 684,
- /*0x10b0*/ 500,
- -1,
- /*0x24b8*/ 887,
- /*0x216b*/ 879,
- /*0x118aa*/ 1397,
- /*0x1e0c*/ 591,
- /*0x1f38*/ 737,
- /*0x104b8*/ 1308,
- -1,
- /*0x04b8*/ 385,
- /*0x0538*/ 452,
- /*0x1ec8*/ 687,
- /*0x10bc*/ 512,
- /*0x1fd6*/ 838,
- /*0x0150*/ 96,
- /*0x0050*/ 14,
- /*0x0156*/ 99,
- /*0x0056*/ 20,
- /*0x24b6*/ 885,
- /*0x03d0*/ 271,
- -1,
- /*0x03d6*/ 274,
- /*0x1fdb*/ 843,
- /*0x104b6*/ 1306,
- -1,
- /*0x04b6*/ 384,
- /*0x0536*/ 450,
- /*0xff2a*/ 1243,
- -1,
- /*0x01db*/ 170,
- /*0x1e30*/ 609,
- /*0x118ae*/ 1401,
- -1, -1, -1,
- /*0x2cd0*/ 1013,
- /*0x1f0c*/ 719,
- /*0x2cd6*/ 1016,
- /*0xa69a*/ 1062,
- /*0x048c*/ 363,
- /*0x050c*/ 427,
- -1,
- /*0x1e3c*/ 615,
- /*0xa722*/ 1063,
- -1, -1, -1, -1, -1, -1,
- /*0x1ed0*/ 691,
- /*0x1fc6*/ 829,
- /*0x1ed6*/ 694,
- /*0x0246*/ 224,
- /*0xff2e*/ 1247,
- /*0x0046*/ 5,
- /*0x118ac*/ 1399,
- -1,
- /*0x2132*/ 867,
- /*0x024e*/ 228,
- /*0x014e*/ 95,
- /*0x004e*/ 12,
- /*0x104b0*/ 1300,
- /*0x1fda*/ 842,
- /*0x04b0*/ 381,
- -1,
- /*0x015a*/ 101,
- /*0x005a*/ 24,
- /*0x10be*/ 514,
- /*0x24bc*/ 891,
- -1,
- /*0x03da*/ 276,
- /*0x118ba*/ 1413,
- /*0x1f3c*/ 741,
- /*0x104bc*/ 1312,
- /*0x2cc6*/ 1008,
- /*0x04bc*/ 387,
- /*0x053c*/ 456,
- /*0x10b4*/ 504,
- /*0xff2c*/ 1245,
- -1,
- /*0x2cce*/ 1012,
- -1,
- /*0x118a8*/ 1395,
- /*0xa72a*/ 1067,
- -1,
- /*0x1e52*/ 626,
- /*0x2cda*/ 1018,
- /*0xa7c6*/ 1141,
- -1,
- /*0x1ec6*/ 686,
- -1,
- /*0x1e4c*/ 623,
- -1, -1,
- /*0xff3a*/ 1259,
- /*0x1ece*/ 690,
- /*0xa652*/ 1035,
- /*0x1e3e*/ 616,
- /*0x2169*/ 877,
- -1, -1,
- /*0x1eda*/ 696,
- /*0xa64c*/ 1032,
- /*0x00d2*/ 44,
- -1,
- /*0xff28*/ 1241,
- -1,
- /*0x1e34*/ 611,
- /*0xa692*/ 1058,
- /*0x00cc*/ 38,
- /*0xa72e*/ 1069,
- /*0x118b8*/ 1411,
- -1, -1, -1, -1,
- /*0x1f52*/ 752,
- /*0x104d2*/ 1334,
- /*0x24cc*/ 907,
- /*0x04d2*/ 398,
- /*0x0552*/ 478,
- -1,
- /*0x1f4c*/ 749,
- /*0x104cc*/ 1328,
- /*0x24be*/ 893,
- /*0x2cc0*/ 1005,
- /*0x054c*/ 472,
- /*0x118b6*/ 1409,
- /*0x1f3e*/ 743,
- /*0x104be*/ 1314,
- -1,
- /*0x04be*/ 388,
- /*0x053e*/ 458,
- -1,
- /*0xff38*/ 1257,
- /*0xa72c*/ 1068,
- -1, -1, -1,
- /*0x104b4*/ 1304,
- /*0x1ec0*/ 683,
- /*0x04b4*/ 383,
- /*0x0534*/ 448,
- -1, -1,
- /*0x1fe2*/ 844,
- /*0x0462*/ 346,
- -1,
- /*0x0162*/ 105,
- -1,
- /*0xff36*/ 1255,
- /*0xa73a*/ 1074,
- /*0x01e2*/ 173,
- /*0x03e2*/ 280,
- /*0x0154*/ 98,
- /*0x0054*/ 18,
- /*0x2c62*/ 959,
- /*0x10c4*/ 520,
- -1, -1, -1,
- /*0x1e4a*/ 622,
- /*0xa728*/ 1066,
- -1, -1, -1,
- /*0x118b0*/ 1403,
- -1, -1,
- /*0x2ce2*/ 1022,
- -1,
- /*0x10ab*/ 495,
- /*0xa64a*/ 1031,
- /*0x1fd8*/ 840,
- -1,
- /*0x2cd4*/ 1015,
- /*0x0158*/ 100,
- /*0x0058*/ 22,
- /*0x118bc*/ 1415,
- /*0x00ca*/ 36,
- -1,
- /*0x03d8*/ 275,
- -1,
- /*0x10c2*/ 518,
- /*0x1ee2*/ 700,
- -1, -1,
- /*0x1e44*/ 619,
- /*0x24ca*/ 905,
- /*0xff30*/ 1249,
- /*0x1ed4*/ 693,
- /*0xa738*/ 1073,
- /*0x1f4a*/ 747,
- /*0x104ca*/ 1326,
- -1, -1,
- /*0x054a*/ 470,
- /*0x2cd8*/ 1017,
- /*0xa644*/ 1028,
- /*0x1040d*/ 1273,
- /*0x1f8d*/ 780,
- /*0x040d*/ 310,
- -1, -1,
- /*0xab8d*/ 1171,
- /*0x00c4*/ 30,
- /*0x00cf*/ 41,
- /*0xa736*/ 1072,
- -1, -1,
- /*0x212a*/ 865,
- /*0x2c0d*/ 924,
- /*0x1ed8*/ 695,
- /*0x1e42*/ 618,
- /*0x24c4*/ 899,
- /*0x24cf*/ 910,
- -1, -1, -1,
- /*0x104c4*/ 1320,
- /*0x104cf*/ 1331,
- -1,
- /*0x0544*/ 464,
- /*0x054f*/ 475,
- /*0xa642*/ 1027,
- /*0x1e48*/ 621,
- -1, -1, -1, -1, -1,
- /*0x00c2*/ 28,
- /*0x1f2b*/ 732,
- -1,
- /*0x118be*/ 1417,
- /*0x0055*/ 19,
- /*0xa648*/ 1030,
- /*0xa78d*/ 1110,
- /*0x01d5*/ 167,
- /*0x03d5*/ 273,
- /*0x24c2*/ 897,
- -1, -1,
- /*0x00c8*/ 34,
- /*0x118b4*/ 1407,
- /*0x104c2*/ 1318,
- -1,
- /*0x10c8d*/ 1349,
- /*0x0542*/ 462,
- -1,
- /*0x1e90d*/ 1464,
- -1,
- /*0x24c8*/ 903,
- -1, -1, -1,
- /*0x1f48*/ 745,
- /*0x104c8*/ 1324,
- /*0xa73c*/ 1075,
- -1,
- /*0x0548*/ 468,
- -1, -1,
- /*0xa68e*/ 1056,
- /*0x1e50*/ 625,
- -1,
- /*0x1e56*/ 628,
- /*0xff34*/ 1253,
- /*0x0245*/ 223,
- /*0x0145*/ 90,
- /*0x0045*/ 4,
- -1,
- /*0x16e5f*/ 1450,
- /*0x01c5*/ 158,
- -1,
- /*0xa650*/ 1034,
- /*0x1fd9*/ 841,
- /*0xa656*/ 1037,
- /*0x1fec*/ 853,
- /*0x046c*/ 351,
- /*0x0059*/ 23,
- /*0x016c*/ 110,
- /*0x00d0*/ 42,
- /*0x01d9*/ 169,
- /*0x00d6*/ 48,
- /*0x01ec*/ 178,
- /*0x03ec*/ 285,
- /*0x16e5d*/ 1448,
- -1, -1,
- /*0x16e47*/ 1426,
- -1, -1,
- /*0x00db*/ 52,
- -1,
- /*0x1f50*/ 751,
- /*0x104d0*/ 1332,
- /*0x1f56*/ 754,
- /*0x04d0*/ 397,
- /*0x0550*/ 476,
- /*0x04d6*/ 400,
- /*0x0556*/ 482,
- /*0xa752*/ 1086,
- /*0xa7c5*/ 1140,
- /*0x1e46*/ 620,
- -1,
- /*0x1f5b*/ 756,
- -1,
- /*0xa74c*/ 1083,
- -1,
- /*0x1e4e*/ 624,
- -1, -1, -1,
- /*0xa73e*/ 1076,
- /*0xa646*/ 1029,
- /*0x1e5a*/ 630,
- /*0x1eec*/ 705,
- -1, -1, -1,
- /*0xa64e*/ 1033,
- /*0x00c6*/ 32,
- -1,
- /*0xa734*/ 1071,
- /*0x10c0*/ 516,
- -1,
- /*0xa65a*/ 1039,
- /*0x00ce*/ 40,
- /*0x1fc9*/ 832,
- -1,
- /*0x24c6*/ 901,
- /*0x0149*/ 92,
- /*0x0049*/ 1485,
- /*0x00da*/ 51,
- -1,
- /*0x104c6*/ 1322,
- /*0x24ce*/ 909,
- /*0x118ab*/ 1398,
- /*0x0546*/ 466,
- -1, -1,
- /*0x104ce*/ 1330,
- -1, -1,
- /*0x054e*/ 474,
- /*0x1fea*/ 851,
- /*0x046a*/ 350,
- -1,
- /*0x016a*/ 109,
- /*0x04da*/ 402,
- /*0x0345*/ 229,
- -1,
- /*0x01ea*/ 177,
- /*0x03ea*/ 284,
- /*0x1e40*/ 617,
- /*0x1fa9*/ 808,
- /*0x0429*/ 338,
- -1, -1,
- /*0xaba9*/ 1199,
- /*0xff2b*/ 1244,
- -1,
- /*0x01a9*/ 146,
- /*0x03a9*/ 265,
- -1,
- /*0xa640*/ 1026,
- /*0x2c29*/ 952,
- /*0x1fc3*/ 827,
- -1,
- /*0x0243*/ 221,
- /*0x0143*/ 89,
- /*0x0043*/ 2,
- /*0x00c0*/ 26,
- /*0x10421*/ 1293,
- /*0x1fa1*/ 800,
- /*0x0421*/ 330,
- -1,
- /*0xa74a*/ 1082,
- /*0xaba1*/ 1191,
- -1, -1,
- /*0x24c0*/ 895,
- /*0x03a1*/ 258,
- -1,
- /*0x1eea*/ 704,
- /*0x2c21*/ 944,
- /*0x104c0*/ 1316,
- /*0x1fb9*/ 821,
- /*0x04c0*/ 389,
- /*0x0540*/ 460,
- /*0x0139*/ 84,
- /*0xabb9*/ 1215,
- /*0x1fe8*/ 849,
- /*0x0468*/ 349,
- -1,
- /*0x0168*/ 108,
- -1, -1,
- /*0x1e62*/ 634,
- /*0x01e8*/ 176,
- /*0x03e8*/ 283,
- /*0x1ca9*/ 564,
- /*0x10ca9*/ 1377,
- /*0xa744*/ 1079,
- /*0x1e54*/ 627,
- -1,
- /*0x1fcb*/ 834,
- -1, -1,
- /*0xa662*/ 1043,
- /*0x004b*/ 9,
- -1, -1,
- /*0x01cb*/ 162,
- /*0xa68c*/ 1055,
- /*0xa654*/ 1036,
- -1, -1, -1, -1,
- /*0x1ca1*/ 556,
- /*0x10ca1*/ 1369,
- /*0x00d4*/ 46,
- -1,
- /*0x1e921*/ 1484,
- -1,
- /*0x1e58*/ 629,
- -1,
- /*0x16e57*/ 1442,
- /*0xa742*/ 1078,
- -1,
- /*0x1ee8*/ 703,
- /*0x04e2*/ 406,
- /*0x1cb9*/ 580,
- -1,
- /*0x1f54*/ 753,
- -1,
- /*0xa658*/ 1038,
- /*0x04d4*/ 399,
- /*0x0554*/ 480,
- -1,
- /*0xa748*/ 1081,
- -1, -1,
- /*0x00d8*/ 49,
- /*0x10417*/ 1283,
- /*0x1f97*/ 790,
- /*0x0417*/ 320,
- /*0x1fe4*/ 846,
- /*0x0464*/ 347,
- /*0xab97*/ 1181,
- /*0x0164*/ 106,
- -1,
- /*0x0197*/ 136,
- /*0x0397*/ 248,
- /*0x01e4*/ 174,
- /*0x03e4*/ 281,
- /*0x2c17*/ 934,
- -1,
- /*0x2c64*/ 961,
- /*0x04d8*/ 401,
- -1, -1,
- /*0x0460*/ 345,
- -1,
- /*0x0160*/ 104,
- -1, -1, -1,
- /*0x01e0*/ 172,
- /*0x03e0*/ 279,
- /*0x1ff4*/ 856,
- /*0x0474*/ 355,
- /*0x2c60*/ 958,
- /*0x0174*/ 114,
- -1,
- /*0x1ffc*/ 863,
- /*0x047c*/ 359,
- /*0x01f4*/ 183,
- /*0x03f4*/ 289,
- /*0xa750*/ 1085,
- -1,
- /*0xa756*/ 1088,
- /*0x01fc*/ 188,
- /*0x1f0d*/ 720,
- /*0x1e97*/ 661,
- /*0x2ce0*/ 1021,
- /*0x1ee4*/ 701,
- -1,
- /*0x10c5*/ 521,
- -1, -1,
- /*0x1c97*/ 546,
- /*0x10c97*/ 1359,
- -1, -1,
- /*0x1e917*/ 1474,
- -1,
- /*0x046e*/ 352,
- -1,
- /*0x016e*/ 111,
- /*0x1ee0*/ 699,
- /*0x00d5*/ 47,
- /*0x13fc*/ 528,
- /*0x01ee*/ 179,
- /*0x03ee*/ 286,
- /*0x1fe6*/ 847,
- /*0x0466*/ 348,
- /*0x2c6e*/ 966,
- /*0x0166*/ 107,
- /*0x1ef4*/ 709,
- -1,
- /*0x015e*/ 103,
- /*0x01e6*/ 175,
- /*0x03e6*/ 282,
- /*0x1efc*/ 713,
- /*0x01de*/ 171,
- /*0x03de*/ 278,
- -1,
- /*0x0555*/ 481,
- /*0xa746*/ 1080,
- -1, -1,
- /*0x16e53*/ 1438,
- -1, -1,
- /*0xa74e*/ 1084,
- -1, -1, -1, -1,
- /*0x1e6c*/ 639,
- /*0xa75a*/ 1090,
- /*0x2cde*/ 1020,
- -1,
- /*0x0051*/ 15,
- /*0x1eee*/ 706,
- /*0x00c5*/ 31,
- /*0x01d1*/ 165,
- /*0x03d1*/ 272,
- -1, -1,
- /*0xa66c*/ 1048,
- -1,
- /*0x212b*/ 866,
- /*0x1ee6*/ 702,
- /*0x24c5*/ 900,
- /*0x00d9*/ 50,
- /*0x1ede*/ 698,
- -1, -1,
- /*0x104c5*/ 1321,
- -1,
- /*0x04c5*/ 392,
- /*0x0545*/ 465,
- /*0x1fad*/ 812,
- /*0x042d*/ 342,
- -1, -1,
- /*0xabad*/ 1203,
- /*0x1f59*/ 755,
- -1,
- /*0x1f6c*/ 763,
- -1, -1,
- /*0x04ec*/ 411,
- /*0x2c2d*/ 956,
- /*0x015c*/ 102,
- -1,
- /*0xfb17*/ 1233,
- -1,
- /*0xa740*/ 1077,
- /*0x03dc*/ 277,
- /*0x1ff2*/ 854,
- /*0x0472*/ 354,
- -1,
- /*0x0172*/ 113,
- -1, -1,
- /*0x10a9*/ 493,
- /*0x01f2*/ 182,
- /*0x10425*/ 1297,
- /*0x1fa5*/ 804,
- /*0x0425*/ 334,
- /*0x2c72*/ 969,
- -1,
- /*0xaba5*/ 1195,
- -1,
- /*0x2cdc*/ 1019,
- -1,
- /*0x03a5*/ 261,
- /*0x10c3*/ 519,
- /*0xa7ad*/ 1126,
- /*0x2c25*/ 948,
- -1, -1, -1,
- /*0x2cf2*/ 1025,
- /*0x10a1*/ 485,
- /*0x1e6a*/ 638,
- /*0x00c9*/ 35,
- /*0x1cad*/ 568,
- /*0x10cad*/ 1381,
- /*0x1edc*/ 697,
- /*0x004d*/ 11,
- -1, -1,
- /*0x01cd*/ 163,
- -1,
- /*0x24c9*/ 904,
- /*0xa66a*/ 1047,
- /*0x10b9*/ 509,
- /*0x1ef2*/ 708,
- /*0x1f49*/ 746,
- /*0x104c9*/ 1325,
- /*0xa762*/ 1094,
- /*0x04c9*/ 394,
- /*0x0549*/ 469,
- /*0x013f*/ 87,
- /*0xabbf*/ 1221,
- -1,
- /*0xa754*/ 1087,
- /*0x10423*/ 1295,
- /*0x1fa3*/ 802,
- /*0x0423*/ 332,
- -1, -1,
- /*0xaba3*/ 1193,
- /*0x1ca5*/ 560,
- /*0x10ca5*/ 1373,
- /*0x1f6a*/ 761,
- /*0x03a3*/ 259,
- -1,
- /*0x04ea*/ 410,
- /*0x2c23*/ 946,
- -1,
- /*0x0241*/ 220,
- /*0x0141*/ 88,
- /*0x0041*/ 0,
- /*0x00c3*/ 29,
- /*0x1f29*/ 730,
- -1, -1,
- /*0xa758*/ 1089,
- -1, -1,
- /*0x1e68*/ 637,
- -1,
- /*0x24c3*/ 898,
- -1, -1, -1, -1,
- /*0x104c3*/ 1319,
- -1,
- /*0x04c3*/ 391,
- /*0x0543*/ 463,
- /*0xa668*/ 1046,
- /*0x0372*/ 231,
- -1, -1,
- /*0x1cbf*/ 584,
- -1, -1, -1,
- /*0x023d*/ 218,
- /*0x013d*/ 86,
- /*0xabbd*/ 1219,
- /*0x24b9*/ 888,
- /*0x1ca3*/ 558,
- /*0x10ca3*/ 1371,
- -1,
- /*0x1f39*/ 738,
- /*0x104b9*/ 1309,
- -1, -1,
- /*0x0539*/ 453,
- /*0x1f68*/ 759,
- /*0x00cb*/ 37,
- -1,
- /*0x04e8*/ 409,
- /*0x1041d*/ 1289,
- /*0x1f9d*/ 796,
- /*0x041d*/ 326,
- -1, -1,
- /*0xab9d*/ 1187,
- /*0x24cb*/ 906,
- -1,
- /*0x019d*/ 139,
- /*0x039d*/ 254,
- /*0x1f4b*/ 748,
- /*0x104cb*/ 1327,
- /*0x2c1d*/ 940,
- /*0x04cb*/ 395,
- /*0x054b*/ 471,
- /*0x10407*/ 1267,
- /*0x1f87*/ 774,
- /*0x0407*/ 304,
- /*0x0587*/ 483,
- -1,
- /*0xab87*/ 1165,
- /*0x1e64*/ 635,
- -1,
- /*0x0187*/ 125,
- /*0x1041b*/ 1287,
- /*0x1f9b*/ 794,
- /*0x041b*/ 324,
- /*0x2c07*/ 918,
- /*0x1cbd*/ 582,
- /*0xab9b*/ 1185,
- -1, -1,
- /*0xa664*/ 1044,
- /*0x039b*/ 252,
- -1,
- /*0x1e60*/ 633,
- /*0x2c1b*/ 938,
- /*0x1fbb*/ 823,
- -1,
- /*0x023b*/ 217,
- /*0x013b*/ 85,
- /*0xabbb*/ 1217,
- -1, -1,
- /*0x1e74*/ 643,
- /*0xab73*/ 1145,
- /*0xa660*/ 1042,
- /*0x1c9d*/ 552,
- /*0x10c9d*/ 1365,
- /*0x1e7c*/ 647,
- -1,
- /*0x1e91d*/ 1480,
- -1,
- /*0x1ff6*/ 857,
- /*0x0476*/ 356,
- /*0x04e4*/ 407,
- /*0x0176*/ 115,
- -1, -1, -1,
- /*0x01f6*/ 184,
- /*0x2162*/ 870,
- /*0x1c87*/ 537,
- /*0x10c87*/ 1343,
- /*0x1e9b*/ 665,
- /*0x118a9*/ 1396,
- /*0x1e907*/ 1458,
- /*0xa76c*/ 1099,
- -1,
- /*0x04e0*/ 405,
- /*0x1e6e*/ 640,
- /*0x1c9b*/ 550,
- /*0x10c9b*/ 1363,
- -1, -1,
- /*0x1e91b*/ 1478,
- -1, -1,
- /*0x04f4*/ 415,
- /*0x1e66*/ 636,
- -1, -1,
- /*0x1e5e*/ 632,
- /*0x04fc*/ 419,
- /*0x118a1*/ 1388,
- -1,
- /*0xabb1*/ 1207,
- -1,
- /*0xff29*/ 1242,
- /*0x01b1*/ 150,
- /*0xa666*/ 1045,
- -1,
- /*0x1ef6*/ 710,
- /*0xa65e*/ 1041,
- /*0x10419*/ 1285,
- /*0x1f99*/ 792,
- /*0x0419*/ 322,
- /*0x118b9*/ 1412,
- /*0x10ad*/ 497,
- /*0xab99*/ 1183,
- /*0x00de*/ 55,
- /*0x1f6e*/ 765,
- -1,
- /*0x0399*/ 250,
- /*0x04ee*/ 412,
- -1,
- /*0x2c19*/ 936,
- /*0xff21*/ 1234,
- /*0x1fb7*/ 819,
- /*0x10413*/ 1279,
- /*0x1f93*/ 786,
- /*0x0413*/ 316,
- /*0xabb7*/ 1213,
- /*0x04e6*/ 408,
- /*0xab93*/ 1177,
- /*0x01b7*/ 154,
- /*0x04de*/ 404,
- /*0x0193*/ 133,
- /*0x0393*/ 244,
- /*0xa7b1*/ 1129,
- /*0xff39*/ 1258,
- /*0x2c13*/ 930,
- /*0x00d1*/ 43,
- /*0x1ffa*/ 861,
- /*0x047a*/ 358,
- /*0x10a5*/ 489,
- -1, -1,
- /*0x1cb1*/ 572,
- /*0x10cb1*/ 1385,
- /*0x01fa*/ 187,
- /*0x03fa*/ 293,
- -1, -1,
- /*0x1e99*/ 663,
- /*0xa76a*/ 1098,
- /*0x104d1*/ 1333,
- /*0x1e5c*/ 631,
- /*0x0376*/ 232,
- /*0x0551*/ 477,
- -1,
- /*0x1c99*/ 548,
- /*0x10c99*/ 1361,
- /*0x10cd*/ 523,
- -1,
- /*0x1e919*/ 1476,
- /*0x1e72*/ 642,
- -1,
- /*0xa65c*/ 1040,
- -1,
- /*0x13fa*/ 526,
- -1, -1, -1,
- /*0x1cb7*/ 578,
- /*0x00dc*/ 53,
- /*0x1c93*/ 542,
- /*0x10c93*/ 1355,
- /*0x10bf*/ 515,
- /*0x1f2d*/ 734,
- /*0x1e913*/ 1470,
- /*0xabb5*/ 1211,
- /*0x1efa*/ 712,
- -1,
- /*0x01b5*/ 153,
- -1,
- /*0x10a3*/ 487,
- /*0xab75*/ 1147,
- -1, -1, -1,
- /*0x04dc*/ 403,
- /*0x1fb3*/ 816,
- -1, -1, -1,
- /*0xabb3*/ 1209,
- /*0x10c1*/ 517,
- -1,
- /*0x01b3*/ 152,
- /*0x04f2*/ 414,
- -1,
- /*0xa768*/ 1097,
- -1,
- /*0x1041f*/ 1291,
- /*0x1f9f*/ 798,
- /*0x041f*/ 328,
- -1, -1,
- /*0xab9f*/ 1189,
- -1,
- /*0x00cd*/ 39,
- /*0x019f*/ 140,
- /*0x039f*/ 256,
- /*0x216c*/ 880,
- -1,
- /*0x2c1f*/ 942,
- -1, -1, -1,
- /*0x24cd*/ 908,
- -1, -1,
- /*0x1cb5*/ 576,
- /*0x1f4d*/ 750,
- /*0x104cd*/ 1329,
- /*0x10bd*/ 513,
- /*0x04cd*/ 396,
- /*0x054d*/ 473,
- /*0xa7b3*/ 1131,
- /*0x1ff8*/ 859,
- /*0x0478*/ 357,
- /*0xab7f*/ 1157,
- /*0x0178*/ 116,
- /*0xab71*/ 1143,
- /*0x24bf*/ 894,
- -1,
- /*0x01f8*/ 186,
- /*0x1cb3*/ 574,
- /*0x1f3f*/ 744,
- /*0x104bf*/ 1315,
- -1, -1,
- /*0x053f*/ 459,
- -1,
- /*0x00c1*/ 27,
- -1, -1, -1, -1, -1,
- /*0x1c9f*/ 554,
- /*0x10c9f*/ 1367,
- /*0xfb13*/ 1229,
- /*0x24c1*/ 896,
- /*0x1e91f*/ 1482,
- -1,
- /*0x13f8*/ 524,
- /*0xa764*/ 1095,
- /*0x104c1*/ 1317,
- -1,
- /*0x04c1*/ 390,
- /*0x0541*/ 461,
- /*0xab79*/ 1151,
- -1, -1,
- /*0x10415*/ 1281,
- /*0x1f95*/ 788,
- /*0x0415*/ 318,
- /*0x1ef8*/ 711,
- -1,
- /*0xab95*/ 1179,
- /*0xa760*/ 1093,
- -1, -1,
- /*0x0395*/ 246,
- -1, -1,
- /*0x2c15*/ 932,
- -1, -1,
- /*0x10bb*/ 511,
- /*0x216a*/ 878,
- /*0x24bd*/ 892,
- -1,
- /*0x118ad*/ 1400,
- -1,
- /*0x1f3d*/ 742,
- /*0x104bd*/ 1313,
- -1,
- /*0x047e*/ 360,
- /*0x053d*/ 457,
- /*0x16e52*/ 1437,
- -1, -1, -1,
- /*0x01fe*/ 189,
- /*0x03fe*/ 295,
- /*0x16e4c*/ 1431,
- /*0xab7b*/ 1153,
- /*0x2c7e*/ 971,
- -1, -1, -1, -1, -1,
- /*0x1f1d*/ 728,
- /*0xa76e*/ 1100,
- /*0xff2d*/ 1246,
- -1, -1, -1,
- /*0x118a5*/ 1392,
- /*0x1c95*/ 544,
- /*0x10c95*/ 1357,
- -1,
- /*0xa766*/ 1096,
- /*0x1e915*/ 1472,
- -1,
- /*0xa75e*/ 1092,
- -1, -1, -1, -1, -1, -1,
- /*0x10b1*/ 501,
- /*0x1e76*/ 644,
- /*0x1efe*/ 714,
- /*0x2168*/ 876,
- /*0x1f1b*/ 726,
- -1,
- /*0x10411*/ 1277,
- /*0x1f91*/ 784,
- /*0x0411*/ 314,
- /*0xff25*/ 1238,
- -1,
- /*0xab91*/ 1175,
- /*0x24bb*/ 890,
- -1,
- /*0x0191*/ 132,
- /*0x0391*/ 242,
- /*0x1f3b*/ 740,
- /*0x104bb*/ 1311,
- /*0x2c11*/ 928,
- /*0x118bf*/ 1418,
- /*0x053b*/ 455,
- -1, -1,
- /*0xab7d*/ 1155,
- -1, -1,
- /*0x10b7*/ 507,
- /*0x118a3*/ 1390,
- /*0x1040f*/ 1275,
- /*0x1f8f*/ 782,
- /*0x040f*/ 312,
- -1, -1,
- /*0xab8f*/ 1173,
- -1,
- /*0x04f6*/ 416,
- /*0x018f*/ 130,
- /*0x038f*/ 240,
- -1, -1,
- /*0x2c0f*/ 926,
- -1,
- /*0x16e4a*/ 1429,
- -1,
- /*0x1040b*/ 1271,
- /*0x1f8b*/ 778,
- /*0x040b*/ 308,
- -1,
- /*0xa75c*/ 1091,
- /*0xab8b*/ 1169,
- /*0xff23*/ 1236,
- -1,
- /*0x018b*/ 128,
- /*0x1c91*/ 540,
- /*0x10c91*/ 1353,
- -1,
- /*0x2c0b*/ 922,
- /*0x1e911*/ 1468,
- -1,
- /*0x2164*/ 872,
- /*0xab77*/ 1149,
- -1,
- /*0x104b1*/ 1301,
- -1,
- /*0xfb15*/ 1231,
- /*0x0531*/ 445,
- -1,
- /*0x118bd*/ 1416,
- /*0x16e44*/ 1423,
- /*0x16e4f*/ 1434,
- -1,
- /*0x1e7a*/ 646,
- -1,
- /*0x2160*/ 868,
- /*0x1f19*/ 724,
- /*0x10b5*/ 505,
- /*0x10c8f*/ 1351,
- -1, -1,
- /*0x1e90f*/ 1466,
- -1, -1,
- /*0xa78b*/ 1109,
- /*0x24b7*/ 886,
- /*0x10405*/ 1265,
- /*0x1f85*/ 772,
- /*0x0405*/ 302,
- -1,
- /*0x104b7*/ 1307,
- /*0xab85*/ 1163,
- /*0x10b3*/ 503,
- /*0x0537*/ 451,
- /*0x10c8b*/ 1347,
- -1,
- /*0x16e42*/ 1421,
- /*0x1e90b*/ 1462,
- /*0x2c05*/ 916,
- -1, -1, -1, -1, -1,
- /*0x10401*/ 1261,
- /*0x1f81*/ 768,
- /*0x0401*/ 298,
- /*0x04fa*/ 418,
- /*0x16e48*/ 1427,
- /*0xab81*/ 1159,
- /*0x216e*/ 882,
- -1,
- /*0x0181*/ 121,
- -1, -1, -1,
- /*0x2c01*/ 912,
- -1, -1,
- /*0x2166*/ 874,
- -1, -1, -1, -1,
- /*0x118bb*/ 1414,
- /*0x00b5*/ 25,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x1c85*/ 535,
- /*0x10c85*/ 1341,
- -1, -1,
- /*0x1e905*/ 1456,
- -1,
- /*0x104b5*/ 1305,
- -1, -1,
- /*0x0535*/ 449,
- -1, -1, -1, -1,
- /*0x16e50*/ 1435,
- -1,
- /*0x16e56*/ 1441,
- -1,
- /*0x1c81*/ 531,
- /*0x10c81*/ 1337,
- -1,
- /*0x104b3*/ 1303,
- /*0x1e901*/ 1452,
- -1,
- /*0x0533*/ 447,
- /*0x16e5b*/ 1446,
- -1,
- /*0x1e78*/ 645,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x118b1*/ 1404,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0x16e46*/ 1425,
- /*0xab70*/ 1142,
- -1, -1, -1,
- /*0xff31*/ 1250,
- /*0x16e4e*/ 1433,
- /*0x04f8*/ 417,
- /*0x118b7*/ 1410,
- -1, -1, -1,
- /*0x16e5a*/ 1445,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0xfb05*/ 1227,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0xff37*/ 1256,
- /*0x1e7e*/ 648,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0xfb01*/ 1223,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x16e40*/ 1419,
- -1, -1, -1, -1, -1,
- /*0x118b5*/ 1408,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x04fe*/ 420,
- -1, -1, -1, -1, -1,
- /*0x118b3*/ 1406,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0xff35*/ 1254,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0xff33*/ 1252,
- -1, -1, -1, -1, -1,
- /*0x16e54*/ 1439,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x16e58*/ 1443,
- -1, -1, -1, -1, -1,
- /*0x1f0f*/ 722,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x1f0b*/ 718,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0x16e55*/ 1440,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0x16e45*/ 1424,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x16e59*/ 1444,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0xa77e*/ 1104,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0x16e49*/ 1428,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x16e43*/ 1422,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x16e4b*/ 1430,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x16e5e*/ 1449,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x16e51*/ 1436,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x16e5c*/ 1447,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0x16e4d*/ 1432,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x16e41*/ 1420,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0xab74*/ 1146,
- -1, -1, -1, -1,
- /*0xab7c*/ 1154,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0xab72*/ 1144,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0xab76*/ 1148,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0xab7a*/ 1152,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0xab78*/ 1150,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0xab7e*/ 1156
- };
-
- if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE)
- {
- register unsigned int key = onigenc_unicode_CaseFold_11_hash(code);
-
- if (key <= MAX_HASH_VALUE)
- {
- register short s = wordlist[key];
-
- if (s >= 0 && code1_equal(code, CaseFold_11_Table[s].from))
- return &CaseFold_11_Table[s].to;
- }
- }
- return 0;
-}
-
-static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
-#define CaseUnfold_11 (*(CaseUnfold_11_Type (*)[1352])(CaseUnfold_11_Table+0))
- {0x0061, {1|U, {0x0041}}},
- {0x0062, {1|U, {0x0042}}},
- {0x0063, {1|U, {0x0043}}},
- {0x0064, {1|U, {0x0044}}},
- {0x0065, {1|U, {0x0045}}},
- {0x0066, {1|U, {0x0046}}},
- {0x0067, {1|U, {0x0047}}},
- {0x0068, {1|U, {0x0048}}},
- {0x006a, {1|U, {0x004a}}},
- {0x006b, {2|U, {0x004b, 0x212a}}},
- {0x006c, {1|U, {0x004c}}},
- {0x006d, {1|U, {0x004d}}},
- {0x006e, {1|U, {0x004e}}},
- {0x006f, {1|U, {0x004f}}},
- {0x0070, {1|U, {0x0050}}},
- {0x0071, {1|U, {0x0051}}},
- {0x0072, {1|U, {0x0052}}},
- {0x0073, {2|U, {0x0053, 0x017f}}},
- {0x0074, {1|U, {0x0054}}},
- {0x0075, {1|U, {0x0055}}},
- {0x0076, {1|U, {0x0056}}},
- {0x0077, {1|U, {0x0057}}},
- {0x0078, {1|U, {0x0058}}},
- {0x0079, {1|U, {0x0059}}},
- {0x007a, {1|U, {0x005a}}},
- {0x00e0, {1|U, {0x00c0}}},
- {0x00e1, {1|U, {0x00c1}}},
- {0x00e2, {1|U, {0x00c2}}},
- {0x00e3, {1|U, {0x00c3}}},
- {0x00e4, {1|U, {0x00c4}}},
- {0x00e5, {2|U, {0x00c5, 0x212b}}},
- {0x00e6, {1|U, {0x00c6}}},
- {0x00e7, {1|U, {0x00c7}}},
- {0x00e8, {1|U, {0x00c8}}},
- {0x00e9, {1|U, {0x00c9}}},
- {0x00ea, {1|U, {0x00ca}}},
- {0x00eb, {1|U, {0x00cb}}},
- {0x00ec, {1|U, {0x00cc}}},
- {0x00ed, {1|U, {0x00cd}}},
- {0x00ee, {1|U, {0x00ce}}},
- {0x00ef, {1|U, {0x00cf}}},
- {0x00f0, {1|U, {0x00d0}}},
- {0x00f1, {1|U, {0x00d1}}},
- {0x00f2, {1|U, {0x00d2}}},
- {0x00f3, {1|U, {0x00d3}}},
- {0x00f4, {1|U, {0x00d4}}},
- {0x00f5, {1|U, {0x00d5}}},
- {0x00f6, {1|U, {0x00d6}}},
- {0x00f8, {1|U, {0x00d8}}},
- {0x00f9, {1|U, {0x00d9}}},
- {0x00fa, {1|U, {0x00da}}},
- {0x00fb, {1|U, {0x00db}}},
- {0x00fc, {1|U, {0x00dc}}},
- {0x00fd, {1|U, {0x00dd}}},
- {0x00fe, {1|U, {0x00de}}},
- {0x00ff, {1|U, {0x0178}}},
- {0x0101, {1|U, {0x0100}}},
- {0x0103, {1|U, {0x0102}}},
- {0x0105, {1|U, {0x0104}}},
- {0x0107, {1|U, {0x0106}}},
- {0x0109, {1|U, {0x0108}}},
- {0x010b, {1|U, {0x010a}}},
- {0x010d, {1|U, {0x010c}}},
- {0x010f, {1|U, {0x010e}}},
- {0x0111, {1|U, {0x0110}}},
- {0x0113, {1|U, {0x0112}}},
- {0x0115, {1|U, {0x0114}}},
- {0x0117, {1|U, {0x0116}}},
- {0x0119, {1|U, {0x0118}}},
- {0x011b, {1|U, {0x011a}}},
- {0x011d, {1|U, {0x011c}}},
- {0x011f, {1|U, {0x011e}}},
- {0x0121, {1|U, {0x0120}}},
- {0x0123, {1|U, {0x0122}}},
- {0x0125, {1|U, {0x0124}}},
- {0x0127, {1|U, {0x0126}}},
- {0x0129, {1|U, {0x0128}}},
- {0x012b, {1|U, {0x012a}}},
- {0x012d, {1|U, {0x012c}}},
- {0x012f, {1|U, {0x012e}}},
- {0x0133, {1|U, {0x0132}}},
- {0x0135, {1|U, {0x0134}}},
- {0x0137, {1|U, {0x0136}}},
- {0x013a, {1|U, {0x0139}}},
- {0x013c, {1|U, {0x013b}}},
- {0x013e, {1|U, {0x013d}}},
- {0x0140, {1|U, {0x013f}}},
- {0x0142, {1|U, {0x0141}}},
- {0x0144, {1|U, {0x0143}}},
- {0x0146, {1|U, {0x0145}}},
- {0x0148, {1|U, {0x0147}}},
- {0x014b, {1|U, {0x014a}}},
- {0x014d, {1|U, {0x014c}}},
- {0x014f, {1|U, {0x014e}}},
- {0x0151, {1|U, {0x0150}}},
- {0x0153, {1|U, {0x0152}}},
- {0x0155, {1|U, {0x0154}}},
- {0x0157, {1|U, {0x0156}}},
- {0x0159, {1|U, {0x0158}}},
- {0x015b, {1|U, {0x015a}}},
- {0x015d, {1|U, {0x015c}}},
- {0x015f, {1|U, {0x015e}}},
- {0x0161, {1|U, {0x0160}}},
- {0x0163, {1|U, {0x0162}}},
- {0x0165, {1|U, {0x0164}}},
- {0x0167, {1|U, {0x0166}}},
- {0x0169, {1|U, {0x0168}}},
- {0x016b, {1|U, {0x016a}}},
- {0x016d, {1|U, {0x016c}}},
- {0x016f, {1|U, {0x016e}}},
- {0x0171, {1|U, {0x0170}}},
- {0x0173, {1|U, {0x0172}}},
- {0x0175, {1|U, {0x0174}}},
- {0x0177, {1|U, {0x0176}}},
- {0x017a, {1|U, {0x0179}}},
- {0x017c, {1|U, {0x017b}}},
- {0x017e, {1|U, {0x017d}}},
- {0x0180, {1|U, {0x0243}}},
- {0x0183, {1|U, {0x0182}}},
- {0x0185, {1|U, {0x0184}}},
- {0x0188, {1|U, {0x0187}}},
- {0x018c, {1|U, {0x018b}}},
- {0x0192, {1|U, {0x0191}}},
- {0x0195, {1|U, {0x01f6}}},
- {0x0199, {1|U, {0x0198}}},
- {0x019a, {1|U, {0x023d}}},
- {0x019e, {1|U, {0x0220}}},
- {0x01a1, {1|U, {0x01a0}}},
- {0x01a3, {1|U, {0x01a2}}},
- {0x01a5, {1|U, {0x01a4}}},
- {0x01a8, {1|U, {0x01a7}}},
- {0x01ad, {1|U, {0x01ac}}},
- {0x01b0, {1|U, {0x01af}}},
- {0x01b4, {1|U, {0x01b3}}},
- {0x01b6, {1|U, {0x01b5}}},
- {0x01b9, {1|U, {0x01b8}}},
- {0x01bd, {1|U, {0x01bc}}},
- {0x01bf, {1|U, {0x01f7}}},
- {0x01c6, {2|U|ST, {0x01c4, 0x01c5}}},
- {0x01c9, {2|U|ST, {0x01c7, 0x01c8}}},
- {0x01cc, {2|U|ST, {0x01ca, 0x01cb}}},
- {0x01ce, {1|U, {0x01cd}}},
- {0x01d0, {1|U, {0x01cf}}},
- {0x01d2, {1|U, {0x01d1}}},
- {0x01d4, {1|U, {0x01d3}}},
- {0x01d6, {1|U, {0x01d5}}},
- {0x01d8, {1|U, {0x01d7}}},
- {0x01da, {1|U, {0x01d9}}},
- {0x01dc, {1|U, {0x01db}}},
- {0x01dd, {1|U, {0x018e}}},
- {0x01df, {1|U, {0x01de}}},
- {0x01e1, {1|U, {0x01e0}}},
- {0x01e3, {1|U, {0x01e2}}},
- {0x01e5, {1|U, {0x01e4}}},
- {0x01e7, {1|U, {0x01e6}}},
- {0x01e9, {1|U, {0x01e8}}},
- {0x01eb, {1|U, {0x01ea}}},
- {0x01ed, {1|U, {0x01ec}}},
- {0x01ef, {1|U, {0x01ee}}},
- {0x01f3, {2|U|ST, {0x01f1, 0x01f2}}},
- {0x01f5, {1|U, {0x01f4}}},
- {0x01f9, {1|U, {0x01f8}}},
- {0x01fb, {1|U, {0x01fa}}},
- {0x01fd, {1|U, {0x01fc}}},
- {0x01ff, {1|U, {0x01fe}}},
- {0x0201, {1|U, {0x0200}}},
- {0x0203, {1|U, {0x0202}}},
- {0x0205, {1|U, {0x0204}}},
- {0x0207, {1|U, {0x0206}}},
- {0x0209, {1|U, {0x0208}}},
- {0x020b, {1|U, {0x020a}}},
- {0x020d, {1|U, {0x020c}}},
- {0x020f, {1|U, {0x020e}}},
- {0x0211, {1|U, {0x0210}}},
- {0x0213, {1|U, {0x0212}}},
- {0x0215, {1|U, {0x0214}}},
- {0x0217, {1|U, {0x0216}}},
- {0x0219, {1|U, {0x0218}}},
- {0x021b, {1|U, {0x021a}}},
- {0x021d, {1|U, {0x021c}}},
- {0x021f, {1|U, {0x021e}}},
- {0x0223, {1|U, {0x0222}}},
- {0x0225, {1|U, {0x0224}}},
- {0x0227, {1|U, {0x0226}}},
- {0x0229, {1|U, {0x0228}}},
- {0x022b, {1|U, {0x022a}}},
- {0x022d, {1|U, {0x022c}}},
- {0x022f, {1|U, {0x022e}}},
- {0x0231, {1|U, {0x0230}}},
- {0x0233, {1|U, {0x0232}}},
- {0x023c, {1|U, {0x023b}}},
- {0x023f, {1|U, {0x2c7e}}},
- {0x0240, {1|U, {0x2c7f}}},
- {0x0242, {1|U, {0x0241}}},
- {0x0247, {1|U, {0x0246}}},
- {0x0249, {1|U, {0x0248}}},
- {0x024b, {1|U, {0x024a}}},
- {0x024d, {1|U, {0x024c}}},
- {0x024f, {1|U, {0x024e}}},
- {0x0250, {1|U, {0x2c6f}}},
- {0x0251, {1|U, {0x2c6d}}},
- {0x0252, {1|U, {0x2c70}}},
- {0x0253, {1|U, {0x0181}}},
- {0x0254, {1|U, {0x0186}}},
- {0x0256, {1|U, {0x0189}}},
- {0x0257, {1|U, {0x018a}}},
- {0x0259, {1|U, {0x018f}}},
- {0x025b, {1|U, {0x0190}}},
- {0x025c, {1|U, {0xa7ab}}},
- {0x0260, {1|U, {0x0193}}},
- {0x0261, {1|U, {0xa7ac}}},
- {0x0263, {1|U, {0x0194}}},
- {0x0265, {1|U, {0xa78d}}},
- {0x0266, {1|U, {0xa7aa}}},
- {0x0268, {1|U, {0x0197}}},
- {0x0269, {1|U, {0x0196}}},
- {0x026a, {1|U, {0xa7ae}}},
- {0x026b, {1|U, {0x2c62}}},
- {0x026c, {1|U, {0xa7ad}}},
- {0x026f, {1|U, {0x019c}}},
- {0x0271, {1|U, {0x2c6e}}},
- {0x0272, {1|U, {0x019d}}},
- {0x0275, {1|U, {0x019f}}},
- {0x027d, {1|U, {0x2c64}}},
- {0x0280, {1|U, {0x01a6}}},
- {0x0282, {1|U, {0xa7c5}}},
- {0x0283, {1|U, {0x01a9}}},
- {0x0287, {1|U, {0xa7b1}}},
- {0x0288, {1|U, {0x01ae}}},
- {0x0289, {1|U, {0x0244}}},
- {0x028a, {1|U, {0x01b1}}},
- {0x028b, {1|U, {0x01b2}}},
- {0x028c, {1|U, {0x0245}}},
- {0x0292, {1|U, {0x01b7}}},
- {0x029d, {1|U, {0xa7b2}}},
- {0x029e, {1|U, {0xa7b0}}},
- {0x0371, {1|U, {0x0370}}},
- {0x0373, {1|U, {0x0372}}},
- {0x0377, {1|U, {0x0376}}},
- {0x037b, {1|U, {0x03fd}}},
- {0x037c, {1|U, {0x03fe}}},
- {0x037d, {1|U, {0x03ff}}},
- {0x03ac, {1|U, {0x0386}}},
- {0x03ad, {1|U, {0x0388}}},
- {0x03ae, {1|U, {0x0389}}},
- {0x03af, {1|U, {0x038a}}},
- {0x03b1, {1|U, {0x0391}}},
- {0x03b2, {2|U, {0x0392, 0x03d0}}},
- {0x03b3, {1|U, {0x0393}}},
- {0x03b4, {1|U, {0x0394}}},
- {0x03b5, {2|U, {0x0395, 0x03f5}}},
- {0x03b6, {1|U, {0x0396}}},
- {0x03b7, {1|U, {0x0397}}},
- {0x03b8, {3|U, {0x0398, 0x03d1, 0x03f4}}},
- {0x03b9, {3|U, {0x0399, 0x0345, 0x1fbe}}},
- {0x03ba, {2|U, {0x039a, 0x03f0}}},
- {0x03bb, {1|U, {0x039b}}},
- {0x03bc, {2|U, {0x039c, 0x00b5}}},
- {0x03bd, {1|U, {0x039d}}},
- {0x03be, {1|U, {0x039e}}},
- {0x03bf, {1|U, {0x039f}}},
- {0x03c0, {2|U, {0x03a0, 0x03d6}}},
- {0x03c1, {2|U, {0x03a1, 0x03f1}}},
- {0x03c3, {2|U, {0x03a3, 0x03c2}}},
- {0x03c4, {1|U, {0x03a4}}},
- {0x03c5, {1|U, {0x03a5}}},
- {0x03c6, {2|U, {0x03a6, 0x03d5}}},
- {0x03c7, {1|U, {0x03a7}}},
- {0x03c8, {1|U, {0x03a8}}},
- {0x03c9, {2|U, {0x03a9, 0x2126}}},
- {0x03ca, {1|U, {0x03aa}}},
- {0x03cb, {1|U, {0x03ab}}},
- {0x03cc, {1|U, {0x038c}}},
- {0x03cd, {1|U, {0x038e}}},
- {0x03ce, {1|U, {0x038f}}},
- {0x03d7, {1|U, {0x03cf}}},
- {0x03d9, {1|U, {0x03d8}}},
- {0x03db, {1|U, {0x03da}}},
- {0x03dd, {1|U, {0x03dc}}},
- {0x03df, {1|U, {0x03de}}},
- {0x03e1, {1|U, {0x03e0}}},
- {0x03e3, {1|U, {0x03e2}}},
- {0x03e5, {1|U, {0x03e4}}},
- {0x03e7, {1|U, {0x03e6}}},
- {0x03e9, {1|U, {0x03e8}}},
- {0x03eb, {1|U, {0x03ea}}},
- {0x03ed, {1|U, {0x03ec}}},
- {0x03ef, {1|U, {0x03ee}}},
- {0x03f2, {1|U, {0x03f9}}},
- {0x03f3, {1|U, {0x037f}}},
- {0x03f8, {1|U, {0x03f7}}},
- {0x03fb, {1|U, {0x03fa}}},
- {0x0430, {1|U, {0x0410}}},
- {0x0431, {1|U, {0x0411}}},
- {0x0432, {2|U, {0x0412, 0x1c80}}},
- {0x0433, {1|U, {0x0413}}},
- {0x0434, {2|U, {0x0414, 0x1c81}}},
- {0x0435, {1|U, {0x0415}}},
- {0x0436, {1|U, {0x0416}}},
- {0x0437, {1|U, {0x0417}}},
- {0x0438, {1|U, {0x0418}}},
- {0x0439, {1|U, {0x0419}}},
- {0x043a, {1|U, {0x041a}}},
- {0x043b, {1|U, {0x041b}}},
- {0x043c, {1|U, {0x041c}}},
- {0x043d, {1|U, {0x041d}}},
- {0x043e, {2|U, {0x041e, 0x1c82}}},
- {0x043f, {1|U, {0x041f}}},
- {0x0440, {1|U, {0x0420}}},
- {0x0441, {2|U, {0x0421, 0x1c83}}},
- {0x0442, {3|U, {0x0422, 0x1c84, 0x1c85}}},
- {0x0443, {1|U, {0x0423}}},
- {0x0444, {1|U, {0x0424}}},
- {0x0445, {1|U, {0x0425}}},
- {0x0446, {1|U, {0x0426}}},
- {0x0447, {1|U, {0x0427}}},
- {0x0448, {1|U, {0x0428}}},
- {0x0449, {1|U, {0x0429}}},
- {0x044a, {2|U, {0x042a, 0x1c86}}},
- {0x044b, {1|U, {0x042b}}},
- {0x044c, {1|U, {0x042c}}},
- {0x044d, {1|U, {0x042d}}},
- {0x044e, {1|U, {0x042e}}},
- {0x044f, {1|U, {0x042f}}},
- {0x0450, {1|U, {0x0400}}},
- {0x0451, {1|U, {0x0401}}},
- {0x0452, {1|U, {0x0402}}},
- {0x0453, {1|U, {0x0403}}},
- {0x0454, {1|U, {0x0404}}},
- {0x0455, {1|U, {0x0405}}},
- {0x0456, {1|U, {0x0406}}},
- {0x0457, {1|U, {0x0407}}},
- {0x0458, {1|U, {0x0408}}},
- {0x0459, {1|U, {0x0409}}},
- {0x045a, {1|U, {0x040a}}},
- {0x045b, {1|U, {0x040b}}},
- {0x045c, {1|U, {0x040c}}},
- {0x045d, {1|U, {0x040d}}},
- {0x045e, {1|U, {0x040e}}},
- {0x045f, {1|U, {0x040f}}},
- {0x0461, {1|U, {0x0460}}},
- {0x0463, {2|U, {0x0462, 0x1c87}}},
- {0x0465, {1|U, {0x0464}}},
- {0x0467, {1|U, {0x0466}}},
- {0x0469, {1|U, {0x0468}}},
- {0x046b, {1|U, {0x046a}}},
- {0x046d, {1|U, {0x046c}}},
- {0x046f, {1|U, {0x046e}}},
- {0x0471, {1|U, {0x0470}}},
- {0x0473, {1|U, {0x0472}}},
- {0x0475, {1|U, {0x0474}}},
- {0x0477, {1|U, {0x0476}}},
- {0x0479, {1|U, {0x0478}}},
- {0x047b, {1|U, {0x047a}}},
- {0x047d, {1|U, {0x047c}}},
- {0x047f, {1|U, {0x047e}}},
- {0x0481, {1|U, {0x0480}}},
- {0x048b, {1|U, {0x048a}}},
- {0x048d, {1|U, {0x048c}}},
- {0x048f, {1|U, {0x048e}}},
- {0x0491, {1|U, {0x0490}}},
- {0x0493, {1|U, {0x0492}}},
- {0x0495, {1|U, {0x0494}}},
- {0x0497, {1|U, {0x0496}}},
- {0x0499, {1|U, {0x0498}}},
- {0x049b, {1|U, {0x049a}}},
- {0x049d, {1|U, {0x049c}}},
- {0x049f, {1|U, {0x049e}}},
- {0x04a1, {1|U, {0x04a0}}},
- {0x04a3, {1|U, {0x04a2}}},
- {0x04a5, {1|U, {0x04a4}}},
- {0x04a7, {1|U, {0x04a6}}},
- {0x04a9, {1|U, {0x04a8}}},
- {0x04ab, {1|U, {0x04aa}}},
- {0x04ad, {1|U, {0x04ac}}},
- {0x04af, {1|U, {0x04ae}}},
- {0x04b1, {1|U, {0x04b0}}},
- {0x04b3, {1|U, {0x04b2}}},
- {0x04b5, {1|U, {0x04b4}}},
- {0x04b7, {1|U, {0x04b6}}},
- {0x04b9, {1|U, {0x04b8}}},
- {0x04bb, {1|U, {0x04ba}}},
- {0x04bd, {1|U, {0x04bc}}},
- {0x04bf, {1|U, {0x04be}}},
- {0x04c2, {1|U, {0x04c1}}},
- {0x04c4, {1|U, {0x04c3}}},
- {0x04c6, {1|U, {0x04c5}}},
- {0x04c8, {1|U, {0x04c7}}},
- {0x04ca, {1|U, {0x04c9}}},
- {0x04cc, {1|U, {0x04cb}}},
- {0x04ce, {1|U, {0x04cd}}},
- {0x04cf, {1|U, {0x04c0}}},
- {0x04d1, {1|U, {0x04d0}}},
- {0x04d3, {1|U, {0x04d2}}},
- {0x04d5, {1|U, {0x04d4}}},
- {0x04d7, {1|U, {0x04d6}}},
- {0x04d9, {1|U, {0x04d8}}},
- {0x04db, {1|U, {0x04da}}},
- {0x04dd, {1|U, {0x04dc}}},
- {0x04df, {1|U, {0x04de}}},
- {0x04e1, {1|U, {0x04e0}}},
- {0x04e3, {1|U, {0x04e2}}},
- {0x04e5, {1|U, {0x04e4}}},
- {0x04e7, {1|U, {0x04e6}}},
- {0x04e9, {1|U, {0x04e8}}},
- {0x04eb, {1|U, {0x04ea}}},
- {0x04ed, {1|U, {0x04ec}}},
- {0x04ef, {1|U, {0x04ee}}},
- {0x04f1, {1|U, {0x04f0}}},
- {0x04f3, {1|U, {0x04f2}}},
- {0x04f5, {1|U, {0x04f4}}},
- {0x04f7, {1|U, {0x04f6}}},
- {0x04f9, {1|U, {0x04f8}}},
- {0x04fb, {1|U, {0x04fa}}},
- {0x04fd, {1|U, {0x04fc}}},
- {0x04ff, {1|U, {0x04fe}}},
- {0x0501, {1|U, {0x0500}}},
- {0x0503, {1|U, {0x0502}}},
- {0x0505, {1|U, {0x0504}}},
- {0x0507, {1|U, {0x0506}}},
- {0x0509, {1|U, {0x0508}}},
- {0x050b, {1|U, {0x050a}}},
- {0x050d, {1|U, {0x050c}}},
- {0x050f, {1|U, {0x050e}}},
- {0x0511, {1|U, {0x0510}}},
- {0x0513, {1|U, {0x0512}}},
- {0x0515, {1|U, {0x0514}}},
- {0x0517, {1|U, {0x0516}}},
- {0x0519, {1|U, {0x0518}}},
- {0x051b, {1|U, {0x051a}}},
- {0x051d, {1|U, {0x051c}}},
- {0x051f, {1|U, {0x051e}}},
- {0x0521, {1|U, {0x0520}}},
- {0x0523, {1|U, {0x0522}}},
- {0x0525, {1|U, {0x0524}}},
- {0x0527, {1|U, {0x0526}}},
- {0x0529, {1|U, {0x0528}}},
- {0x052b, {1|U, {0x052a}}},
- {0x052d, {1|U, {0x052c}}},
- {0x052f, {1|U, {0x052e}}},
- {0x0561, {1|U, {0x0531}}},
- {0x0562, {1|U, {0x0532}}},
- {0x0563, {1|U, {0x0533}}},
- {0x0564, {1|U, {0x0534}}},
- {0x0565, {1|U, {0x0535}}},
- {0x0566, {1|U, {0x0536}}},
- {0x0567, {1|U, {0x0537}}},
- {0x0568, {1|U, {0x0538}}},
- {0x0569, {1|U, {0x0539}}},
- {0x056a, {1|U, {0x053a}}},
- {0x056b, {1|U, {0x053b}}},
- {0x056c, {1|U, {0x053c}}},
- {0x056d, {1|U, {0x053d}}},
- {0x056e, {1|U, {0x053e}}},
- {0x056f, {1|U, {0x053f}}},
- {0x0570, {1|U, {0x0540}}},
- {0x0571, {1|U, {0x0541}}},
- {0x0572, {1|U, {0x0542}}},
- {0x0573, {1|U, {0x0543}}},
- {0x0574, {1|U, {0x0544}}},
- {0x0575, {1|U, {0x0545}}},
- {0x0576, {1|U, {0x0546}}},
- {0x0577, {1|U, {0x0547}}},
- {0x0578, {1|U, {0x0548}}},
- {0x0579, {1|U, {0x0549}}},
- {0x057a, {1|U, {0x054a}}},
- {0x057b, {1|U, {0x054b}}},
- {0x057c, {1|U, {0x054c}}},
- {0x057d, {1|U, {0x054d}}},
- {0x057e, {1|U, {0x054e}}},
- {0x057f, {1|U, {0x054f}}},
- {0x0580, {1|U, {0x0550}}},
- {0x0581, {1|U, {0x0551}}},
- {0x0582, {1|U, {0x0552}}},
- {0x0583, {1|U, {0x0553}}},
- {0x0584, {1|U, {0x0554}}},
- {0x0585, {1|U, {0x0555}}},
- {0x0586, {1|U, {0x0556}}},
- {0x10d0, {1|U|IT, {0x1c90}}},
- {0x10d1, {1|U|IT, {0x1c91}}},
- {0x10d2, {1|U|IT, {0x1c92}}},
- {0x10d3, {1|U|IT, {0x1c93}}},
- {0x10d4, {1|U|IT, {0x1c94}}},
- {0x10d5, {1|U|IT, {0x1c95}}},
- {0x10d6, {1|U|IT, {0x1c96}}},
- {0x10d7, {1|U|IT, {0x1c97}}},
- {0x10d8, {1|U|IT, {0x1c98}}},
- {0x10d9, {1|U|IT, {0x1c99}}},
- {0x10da, {1|U|IT, {0x1c9a}}},
- {0x10db, {1|U|IT, {0x1c9b}}},
- {0x10dc, {1|U|IT, {0x1c9c}}},
- {0x10dd, {1|U|IT, {0x1c9d}}},
- {0x10de, {1|U|IT, {0x1c9e}}},
- {0x10df, {1|U|IT, {0x1c9f}}},
- {0x10e0, {1|U|IT, {0x1ca0}}},
- {0x10e1, {1|U|IT, {0x1ca1}}},
- {0x10e2, {1|U|IT, {0x1ca2}}},
- {0x10e3, {1|U|IT, {0x1ca3}}},
- {0x10e4, {1|U|IT, {0x1ca4}}},
- {0x10e5, {1|U|IT, {0x1ca5}}},
- {0x10e6, {1|U|IT, {0x1ca6}}},
- {0x10e7, {1|U|IT, {0x1ca7}}},
- {0x10e8, {1|U|IT, {0x1ca8}}},
- {0x10e9, {1|U|IT, {0x1ca9}}},
- {0x10ea, {1|U|IT, {0x1caa}}},
- {0x10eb, {1|U|IT, {0x1cab}}},
- {0x10ec, {1|U|IT, {0x1cac}}},
- {0x10ed, {1|U|IT, {0x1cad}}},
- {0x10ee, {1|U|IT, {0x1cae}}},
- {0x10ef, {1|U|IT, {0x1caf}}},
- {0x10f0, {1|U|IT, {0x1cb0}}},
- {0x10f1, {1|U|IT, {0x1cb1}}},
- {0x10f2, {1|U|IT, {0x1cb2}}},
- {0x10f3, {1|U|IT, {0x1cb3}}},
- {0x10f4, {1|U|IT, {0x1cb4}}},
- {0x10f5, {1|U|IT, {0x1cb5}}},
- {0x10f6, {1|U|IT, {0x1cb6}}},
- {0x10f7, {1|U|IT, {0x1cb7}}},
- {0x10f8, {1|U|IT, {0x1cb8}}},
- {0x10f9, {1|U|IT, {0x1cb9}}},
- {0x10fa, {1|U|IT, {0x1cba}}},
- {0x10fd, {1|U|IT, {0x1cbd}}},
- {0x10fe, {1|U|IT, {0x1cbe}}},
- {0x10ff, {1|U|IT, {0x1cbf}}},
- {0x13a0, {1|D, {0xab70}}},
- {0x13a1, {1|D, {0xab71}}},
- {0x13a2, {1|D, {0xab72}}},
- {0x13a3, {1|D, {0xab73}}},
- {0x13a4, {1|D, {0xab74}}},
- {0x13a5, {1|D, {0xab75}}},
- {0x13a6, {1|D, {0xab76}}},
- {0x13a7, {1|D, {0xab77}}},
- {0x13a8, {1|D, {0xab78}}},
- {0x13a9, {1|D, {0xab79}}},
- {0x13aa, {1|D, {0xab7a}}},
- {0x13ab, {1|D, {0xab7b}}},
- {0x13ac, {1|D, {0xab7c}}},
- {0x13ad, {1|D, {0xab7d}}},
- {0x13ae, {1|D, {0xab7e}}},
- {0x13af, {1|D, {0xab7f}}},
- {0x13b0, {1|D, {0xab80}}},
- {0x13b1, {1|D, {0xab81}}},
- {0x13b2, {1|D, {0xab82}}},
- {0x13b3, {1|D, {0xab83}}},
- {0x13b4, {1|D, {0xab84}}},
- {0x13b5, {1|D, {0xab85}}},
- {0x13b6, {1|D, {0xab86}}},
- {0x13b7, {1|D, {0xab87}}},
- {0x13b8, {1|D, {0xab88}}},
- {0x13b9, {1|D, {0xab89}}},
- {0x13ba, {1|D, {0xab8a}}},
- {0x13bb, {1|D, {0xab8b}}},
- {0x13bc, {1|D, {0xab8c}}},
- {0x13bd, {1|D, {0xab8d}}},
- {0x13be, {1|D, {0xab8e}}},
- {0x13bf, {1|D, {0xab8f}}},
- {0x13c0, {1|D, {0xab90}}},
- {0x13c1, {1|D, {0xab91}}},
- {0x13c2, {1|D, {0xab92}}},
- {0x13c3, {1|D, {0xab93}}},
- {0x13c4, {1|D, {0xab94}}},
- {0x13c5, {1|D, {0xab95}}},
- {0x13c6, {1|D, {0xab96}}},
- {0x13c7, {1|D, {0xab97}}},
- {0x13c8, {1|D, {0xab98}}},
- {0x13c9, {1|D, {0xab99}}},
- {0x13ca, {1|D, {0xab9a}}},
- {0x13cb, {1|D, {0xab9b}}},
- {0x13cc, {1|D, {0xab9c}}},
- {0x13cd, {1|D, {0xab9d}}},
- {0x13ce, {1|D, {0xab9e}}},
- {0x13cf, {1|D, {0xab9f}}},
- {0x13d0, {1|D, {0xaba0}}},
- {0x13d1, {1|D, {0xaba1}}},
- {0x13d2, {1|D, {0xaba2}}},
- {0x13d3, {1|D, {0xaba3}}},
- {0x13d4, {1|D, {0xaba4}}},
- {0x13d5, {1|D, {0xaba5}}},
- {0x13d6, {1|D, {0xaba6}}},
- {0x13d7, {1|D, {0xaba7}}},
- {0x13d8, {1|D, {0xaba8}}},
- {0x13d9, {1|D, {0xaba9}}},
- {0x13da, {1|D, {0xabaa}}},
- {0x13db, {1|D, {0xabab}}},
- {0x13dc, {1|D, {0xabac}}},
- {0x13dd, {1|D, {0xabad}}},
- {0x13de, {1|D, {0xabae}}},
- {0x13df, {1|D, {0xabaf}}},
- {0x13e0, {1|D, {0xabb0}}},
- {0x13e1, {1|D, {0xabb1}}},
- {0x13e2, {1|D, {0xabb2}}},
- {0x13e3, {1|D, {0xabb3}}},
- {0x13e4, {1|D, {0xabb4}}},
- {0x13e5, {1|D, {0xabb5}}},
- {0x13e6, {1|D, {0xabb6}}},
- {0x13e7, {1|D, {0xabb7}}},
- {0x13e8, {1|D, {0xabb8}}},
- {0x13e9, {1|D, {0xabb9}}},
- {0x13ea, {1|D, {0xabba}}},
- {0x13eb, {1|D, {0xabbb}}},
- {0x13ec, {1|D, {0xabbc}}},
- {0x13ed, {1|D, {0xabbd}}},
- {0x13ee, {1|D, {0xabbe}}},
- {0x13ef, {1|D, {0xabbf}}},
- {0x13f0, {1|D, {0x13f8}}},
- {0x13f1, {1|D, {0x13f9}}},
- {0x13f2, {1|D, {0x13fa}}},
- {0x13f3, {1|D, {0x13fb}}},
- {0x13f4, {1|D, {0x13fc}}},
- {0x13f5, {1|D, {0x13fd}}},
- {0x1d79, {1|U, {0xa77d}}},
- {0x1d7d, {1|U, {0x2c63}}},
- {0x1d8e, {1|U, {0xa7c6}}},
- {0x1e01, {1|U, {0x1e00}}},
- {0x1e03, {1|U, {0x1e02}}},
- {0x1e05, {1|U, {0x1e04}}},
- {0x1e07, {1|U, {0x1e06}}},
- {0x1e09, {1|U, {0x1e08}}},
- {0x1e0b, {1|U, {0x1e0a}}},
- {0x1e0d, {1|U, {0x1e0c}}},
- {0x1e0f, {1|U, {0x1e0e}}},
- {0x1e11, {1|U, {0x1e10}}},
- {0x1e13, {1|U, {0x1e12}}},
- {0x1e15, {1|U, {0x1e14}}},
- {0x1e17, {1|U, {0x1e16}}},
- {0x1e19, {1|U, {0x1e18}}},
- {0x1e1b, {1|U, {0x1e1a}}},
- {0x1e1d, {1|U, {0x1e1c}}},
- {0x1e1f, {1|U, {0x1e1e}}},
- {0x1e21, {1|U, {0x1e20}}},
- {0x1e23, {1|U, {0x1e22}}},
- {0x1e25, {1|U, {0x1e24}}},
- {0x1e27, {1|U, {0x1e26}}},
- {0x1e29, {1|U, {0x1e28}}},
- {0x1e2b, {1|U, {0x1e2a}}},
- {0x1e2d, {1|U, {0x1e2c}}},
- {0x1e2f, {1|U, {0x1e2e}}},
- {0x1e31, {1|U, {0x1e30}}},
- {0x1e33, {1|U, {0x1e32}}},
- {0x1e35, {1|U, {0x1e34}}},
- {0x1e37, {1|U, {0x1e36}}},
- {0x1e39, {1|U, {0x1e38}}},
- {0x1e3b, {1|U, {0x1e3a}}},
- {0x1e3d, {1|U, {0x1e3c}}},
- {0x1e3f, {1|U, {0x1e3e}}},
- {0x1e41, {1|U, {0x1e40}}},
- {0x1e43, {1|U, {0x1e42}}},
- {0x1e45, {1|U, {0x1e44}}},
- {0x1e47, {1|U, {0x1e46}}},
- {0x1e49, {1|U, {0x1e48}}},
- {0x1e4b, {1|U, {0x1e4a}}},
- {0x1e4d, {1|U, {0x1e4c}}},
- {0x1e4f, {1|U, {0x1e4e}}},
- {0x1e51, {1|U, {0x1e50}}},
- {0x1e53, {1|U, {0x1e52}}},
- {0x1e55, {1|U, {0x1e54}}},
- {0x1e57, {1|U, {0x1e56}}},
- {0x1e59, {1|U, {0x1e58}}},
- {0x1e5b, {1|U, {0x1e5a}}},
- {0x1e5d, {1|U, {0x1e5c}}},
- {0x1e5f, {1|U, {0x1e5e}}},
- {0x1e61, {2|U, {0x1e60, 0x1e9b}}},
- {0x1e63, {1|U, {0x1e62}}},
- {0x1e65, {1|U, {0x1e64}}},
- {0x1e67, {1|U, {0x1e66}}},
- {0x1e69, {1|U, {0x1e68}}},
- {0x1e6b, {1|U, {0x1e6a}}},
- {0x1e6d, {1|U, {0x1e6c}}},
- {0x1e6f, {1|U, {0x1e6e}}},
- {0x1e71, {1|U, {0x1e70}}},
- {0x1e73, {1|U, {0x1e72}}},
- {0x1e75, {1|U, {0x1e74}}},
- {0x1e77, {1|U, {0x1e76}}},
- {0x1e79, {1|U, {0x1e78}}},
- {0x1e7b, {1|U, {0x1e7a}}},
- {0x1e7d, {1|U, {0x1e7c}}},
- {0x1e7f, {1|U, {0x1e7e}}},
- {0x1e81, {1|U, {0x1e80}}},
- {0x1e83, {1|U, {0x1e82}}},
- {0x1e85, {1|U, {0x1e84}}},
- {0x1e87, {1|U, {0x1e86}}},
- {0x1e89, {1|U, {0x1e88}}},
- {0x1e8b, {1|U, {0x1e8a}}},
- {0x1e8d, {1|U, {0x1e8c}}},
- {0x1e8f, {1|U, {0x1e8e}}},
- {0x1e91, {1|U, {0x1e90}}},
- {0x1e93, {1|U, {0x1e92}}},
- {0x1e95, {1|U, {0x1e94}}},
- {0x1ea1, {1|U, {0x1ea0}}},
- {0x1ea3, {1|U, {0x1ea2}}},
- {0x1ea5, {1|U, {0x1ea4}}},
- {0x1ea7, {1|U, {0x1ea6}}},
- {0x1ea9, {1|U, {0x1ea8}}},
- {0x1eab, {1|U, {0x1eaa}}},
- {0x1ead, {1|U, {0x1eac}}},
- {0x1eaf, {1|U, {0x1eae}}},
- {0x1eb1, {1|U, {0x1eb0}}},
- {0x1eb3, {1|U, {0x1eb2}}},
- {0x1eb5, {1|U, {0x1eb4}}},
- {0x1eb7, {1|U, {0x1eb6}}},
- {0x1eb9, {1|U, {0x1eb8}}},
- {0x1ebb, {1|U, {0x1eba}}},
- {0x1ebd, {1|U, {0x1ebc}}},
- {0x1ebf, {1|U, {0x1ebe}}},
- {0x1ec1, {1|U, {0x1ec0}}},
- {0x1ec3, {1|U, {0x1ec2}}},
- {0x1ec5, {1|U, {0x1ec4}}},
- {0x1ec7, {1|U, {0x1ec6}}},
- {0x1ec9, {1|U, {0x1ec8}}},
- {0x1ecb, {1|U, {0x1eca}}},
- {0x1ecd, {1|U, {0x1ecc}}},
- {0x1ecf, {1|U, {0x1ece}}},
- {0x1ed1, {1|U, {0x1ed0}}},
- {0x1ed3, {1|U, {0x1ed2}}},
- {0x1ed5, {1|U, {0x1ed4}}},
- {0x1ed7, {1|U, {0x1ed6}}},
- {0x1ed9, {1|U, {0x1ed8}}},
- {0x1edb, {1|U, {0x1eda}}},
- {0x1edd, {1|U, {0x1edc}}},
- {0x1edf, {1|U, {0x1ede}}},
- {0x1ee1, {1|U, {0x1ee0}}},
- {0x1ee3, {1|U, {0x1ee2}}},
- {0x1ee5, {1|U, {0x1ee4}}},
- {0x1ee7, {1|U, {0x1ee6}}},
- {0x1ee9, {1|U, {0x1ee8}}},
- {0x1eeb, {1|U, {0x1eea}}},
- {0x1eed, {1|U, {0x1eec}}},
- {0x1eef, {1|U, {0x1eee}}},
- {0x1ef1, {1|U, {0x1ef0}}},
- {0x1ef3, {1|U, {0x1ef2}}},
- {0x1ef5, {1|U, {0x1ef4}}},
- {0x1ef7, {1|U, {0x1ef6}}},
- {0x1ef9, {1|U, {0x1ef8}}},
- {0x1efb, {1|U, {0x1efa}}},
- {0x1efd, {1|U, {0x1efc}}},
- {0x1eff, {1|U, {0x1efe}}},
- {0x1f00, {1|U, {0x1f08}}},
- {0x1f01, {1|U, {0x1f09}}},
- {0x1f02, {1|U, {0x1f0a}}},
- {0x1f03, {1|U, {0x1f0b}}},
- {0x1f04, {1|U, {0x1f0c}}},
- {0x1f05, {1|U, {0x1f0d}}},
- {0x1f06, {1|U, {0x1f0e}}},
- {0x1f07, {1|U, {0x1f0f}}},
- {0x1f10, {1|U, {0x1f18}}},
- {0x1f11, {1|U, {0x1f19}}},
- {0x1f12, {1|U, {0x1f1a}}},
- {0x1f13, {1|U, {0x1f1b}}},
- {0x1f14, {1|U, {0x1f1c}}},
- {0x1f15, {1|U, {0x1f1d}}},
- {0x1f20, {1|U, {0x1f28}}},
- {0x1f21, {1|U, {0x1f29}}},
- {0x1f22, {1|U, {0x1f2a}}},
- {0x1f23, {1|U, {0x1f2b}}},
- {0x1f24, {1|U, {0x1f2c}}},
- {0x1f25, {1|U, {0x1f2d}}},
- {0x1f26, {1|U, {0x1f2e}}},
- {0x1f27, {1|U, {0x1f2f}}},
- {0x1f30, {1|U, {0x1f38}}},
- {0x1f31, {1|U, {0x1f39}}},
- {0x1f32, {1|U, {0x1f3a}}},
- {0x1f33, {1|U, {0x1f3b}}},
- {0x1f34, {1|U, {0x1f3c}}},
- {0x1f35, {1|U, {0x1f3d}}},
- {0x1f36, {1|U, {0x1f3e}}},
- {0x1f37, {1|U, {0x1f3f}}},
- {0x1f40, {1|U, {0x1f48}}},
- {0x1f41, {1|U, {0x1f49}}},
- {0x1f42, {1|U, {0x1f4a}}},
- {0x1f43, {1|U, {0x1f4b}}},
- {0x1f44, {1|U, {0x1f4c}}},
- {0x1f45, {1|U, {0x1f4d}}},
- {0x1f51, {1|U, {0x1f59}}},
- {0x1f53, {1|U, {0x1f5b}}},
- {0x1f55, {1|U, {0x1f5d}}},
- {0x1f57, {1|U, {0x1f5f}}},
- {0x1f60, {1|U, {0x1f68}}},
- {0x1f61, {1|U, {0x1f69}}},
- {0x1f62, {1|U, {0x1f6a}}},
- {0x1f63, {1|U, {0x1f6b}}},
- {0x1f64, {1|U, {0x1f6c}}},
- {0x1f65, {1|U, {0x1f6d}}},
- {0x1f66, {1|U, {0x1f6e}}},
- {0x1f67, {1|U, {0x1f6f}}},
- {0x1f70, {1|U, {0x1fba}}},
- {0x1f71, {1|U, {0x1fbb}}},
- {0x1f72, {1|U, {0x1fc8}}},
- {0x1f73, {1|U, {0x1fc9}}},
- {0x1f74, {1|U, {0x1fca}}},
- {0x1f75, {1|U, {0x1fcb}}},
- {0x1f76, {1|U, {0x1fda}}},
- {0x1f77, {1|U, {0x1fdb}}},
- {0x1f78, {1|U, {0x1ff8}}},
- {0x1f79, {1|U, {0x1ff9}}},
- {0x1f7a, {1|U, {0x1fea}}},
- {0x1f7b, {1|U, {0x1feb}}},
- {0x1f7c, {1|U, {0x1ffa}}},
- {0x1f7d, {1|U, {0x1ffb}}},
- {0x1fb0, {1|U, {0x1fb8}}},
- {0x1fb1, {1|U, {0x1fb9}}},
- {0x1fd0, {1|U, {0x1fd8}}},
- {0x1fd1, {1|U, {0x1fd9}}},
- {0x1fe0, {1|U, {0x1fe8}}},
- {0x1fe1, {1|U, {0x1fe9}}},
- {0x1fe5, {1|U, {0x1fec}}},
- {0x214e, {1|U, {0x2132}}},
- {0x2170, {1|U, {0x2160}}},
- {0x2171, {1|U, {0x2161}}},
- {0x2172, {1|U, {0x2162}}},
- {0x2173, {1|U, {0x2163}}},
- {0x2174, {1|U, {0x2164}}},
- {0x2175, {1|U, {0x2165}}},
- {0x2176, {1|U, {0x2166}}},
- {0x2177, {1|U, {0x2167}}},
- {0x2178, {1|U, {0x2168}}},
- {0x2179, {1|U, {0x2169}}},
- {0x217a, {1|U, {0x216a}}},
- {0x217b, {1|U, {0x216b}}},
- {0x217c, {1|U, {0x216c}}},
- {0x217d, {1|U, {0x216d}}},
- {0x217e, {1|U, {0x216e}}},
- {0x217f, {1|U, {0x216f}}},
- {0x2184, {1|U, {0x2183}}},
- {0x24d0, {1|U, {0x24b6}}},
- {0x24d1, {1|U, {0x24b7}}},
- {0x24d2, {1|U, {0x24b8}}},
- {0x24d3, {1|U, {0x24b9}}},
- {0x24d4, {1|U, {0x24ba}}},
- {0x24d5, {1|U, {0x24bb}}},
- {0x24d6, {1|U, {0x24bc}}},
- {0x24d7, {1|U, {0x24bd}}},
- {0x24d8, {1|U, {0x24be}}},
- {0x24d9, {1|U, {0x24bf}}},
- {0x24da, {1|U, {0x24c0}}},
- {0x24db, {1|U, {0x24c1}}},
- {0x24dc, {1|U, {0x24c2}}},
- {0x24dd, {1|U, {0x24c3}}},
- {0x24de, {1|U, {0x24c4}}},
- {0x24df, {1|U, {0x24c5}}},
- {0x24e0, {1|U, {0x24c6}}},
- {0x24e1, {1|U, {0x24c7}}},
- {0x24e2, {1|U, {0x24c8}}},
- {0x24e3, {1|U, {0x24c9}}},
- {0x24e4, {1|U, {0x24ca}}},
- {0x24e5, {1|U, {0x24cb}}},
- {0x24e6, {1|U, {0x24cc}}},
- {0x24e7, {1|U, {0x24cd}}},
- {0x24e8, {1|U, {0x24ce}}},
- {0x24e9, {1|U, {0x24cf}}},
- {0x2c30, {1|U, {0x2c00}}},
- {0x2c31, {1|U, {0x2c01}}},
- {0x2c32, {1|U, {0x2c02}}},
- {0x2c33, {1|U, {0x2c03}}},
- {0x2c34, {1|U, {0x2c04}}},
- {0x2c35, {1|U, {0x2c05}}},
- {0x2c36, {1|U, {0x2c06}}},
- {0x2c37, {1|U, {0x2c07}}},
- {0x2c38, {1|U, {0x2c08}}},
- {0x2c39, {1|U, {0x2c09}}},
- {0x2c3a, {1|U, {0x2c0a}}},
- {0x2c3b, {1|U, {0x2c0b}}},
- {0x2c3c, {1|U, {0x2c0c}}},
- {0x2c3d, {1|U, {0x2c0d}}},
- {0x2c3e, {1|U, {0x2c0e}}},
- {0x2c3f, {1|U, {0x2c0f}}},
- {0x2c40, {1|U, {0x2c10}}},
- {0x2c41, {1|U, {0x2c11}}},
- {0x2c42, {1|U, {0x2c12}}},
- {0x2c43, {1|U, {0x2c13}}},
- {0x2c44, {1|U, {0x2c14}}},
- {0x2c45, {1|U, {0x2c15}}},
- {0x2c46, {1|U, {0x2c16}}},
- {0x2c47, {1|U, {0x2c17}}},
- {0x2c48, {1|U, {0x2c18}}},
- {0x2c49, {1|U, {0x2c19}}},
- {0x2c4a, {1|U, {0x2c1a}}},
- {0x2c4b, {1|U, {0x2c1b}}},
- {0x2c4c, {1|U, {0x2c1c}}},
- {0x2c4d, {1|U, {0x2c1d}}},
- {0x2c4e, {1|U, {0x2c1e}}},
- {0x2c4f, {1|U, {0x2c1f}}},
- {0x2c50, {1|U, {0x2c20}}},
- {0x2c51, {1|U, {0x2c21}}},
- {0x2c52, {1|U, {0x2c22}}},
- {0x2c53, {1|U, {0x2c23}}},
- {0x2c54, {1|U, {0x2c24}}},
- {0x2c55, {1|U, {0x2c25}}},
- {0x2c56, {1|U, {0x2c26}}},
- {0x2c57, {1|U, {0x2c27}}},
- {0x2c58, {1|U, {0x2c28}}},
- {0x2c59, {1|U, {0x2c29}}},
- {0x2c5a, {1|U, {0x2c2a}}},
- {0x2c5b, {1|U, {0x2c2b}}},
- {0x2c5c, {1|U, {0x2c2c}}},
- {0x2c5d, {1|U, {0x2c2d}}},
- {0x2c5e, {1|U, {0x2c2e}}},
- {0x2c61, {1|U, {0x2c60}}},
- {0x2c65, {1|U, {0x023a}}},
- {0x2c66, {1|U, {0x023e}}},
- {0x2c68, {1|U, {0x2c67}}},
- {0x2c6a, {1|U, {0x2c69}}},
- {0x2c6c, {1|U, {0x2c6b}}},
- {0x2c73, {1|U, {0x2c72}}},
- {0x2c76, {1|U, {0x2c75}}},
- {0x2c81, {1|U, {0x2c80}}},
- {0x2c83, {1|U, {0x2c82}}},
- {0x2c85, {1|U, {0x2c84}}},
- {0x2c87, {1|U, {0x2c86}}},
- {0x2c89, {1|U, {0x2c88}}},
- {0x2c8b, {1|U, {0x2c8a}}},
- {0x2c8d, {1|U, {0x2c8c}}},
- {0x2c8f, {1|U, {0x2c8e}}},
- {0x2c91, {1|U, {0x2c90}}},
- {0x2c93, {1|U, {0x2c92}}},
- {0x2c95, {1|U, {0x2c94}}},
- {0x2c97, {1|U, {0x2c96}}},
- {0x2c99, {1|U, {0x2c98}}},
- {0x2c9b, {1|U, {0x2c9a}}},
- {0x2c9d, {1|U, {0x2c9c}}},
- {0x2c9f, {1|U, {0x2c9e}}},
- {0x2ca1, {1|U, {0x2ca0}}},
- {0x2ca3, {1|U, {0x2ca2}}},
- {0x2ca5, {1|U, {0x2ca4}}},
- {0x2ca7, {1|U, {0x2ca6}}},
- {0x2ca9, {1|U, {0x2ca8}}},
- {0x2cab, {1|U, {0x2caa}}},
- {0x2cad, {1|U, {0x2cac}}},
- {0x2caf, {1|U, {0x2cae}}},
- {0x2cb1, {1|U, {0x2cb0}}},
- {0x2cb3, {1|U, {0x2cb2}}},
- {0x2cb5, {1|U, {0x2cb4}}},
- {0x2cb7, {1|U, {0x2cb6}}},
- {0x2cb9, {1|U, {0x2cb8}}},
- {0x2cbb, {1|U, {0x2cba}}},
- {0x2cbd, {1|U, {0x2cbc}}},
- {0x2cbf, {1|U, {0x2cbe}}},
- {0x2cc1, {1|U, {0x2cc0}}},
- {0x2cc3, {1|U, {0x2cc2}}},
- {0x2cc5, {1|U, {0x2cc4}}},
- {0x2cc7, {1|U, {0x2cc6}}},
- {0x2cc9, {1|U, {0x2cc8}}},
- {0x2ccb, {1|U, {0x2cca}}},
- {0x2ccd, {1|U, {0x2ccc}}},
- {0x2ccf, {1|U, {0x2cce}}},
- {0x2cd1, {1|U, {0x2cd0}}},
- {0x2cd3, {1|U, {0x2cd2}}},
- {0x2cd5, {1|U, {0x2cd4}}},
- {0x2cd7, {1|U, {0x2cd6}}},
- {0x2cd9, {1|U, {0x2cd8}}},
- {0x2cdb, {1|U, {0x2cda}}},
- {0x2cdd, {1|U, {0x2cdc}}},
- {0x2cdf, {1|U, {0x2cde}}},
- {0x2ce1, {1|U, {0x2ce0}}},
- {0x2ce3, {1|U, {0x2ce2}}},
- {0x2cec, {1|U, {0x2ceb}}},
- {0x2cee, {1|U, {0x2ced}}},
- {0x2cf3, {1|U, {0x2cf2}}},
- {0x2d00, {1|U, {0x10a0}}},
- {0x2d01, {1|U, {0x10a1}}},
- {0x2d02, {1|U, {0x10a2}}},
- {0x2d03, {1|U, {0x10a3}}},
- {0x2d04, {1|U, {0x10a4}}},
- {0x2d05, {1|U, {0x10a5}}},
- {0x2d06, {1|U, {0x10a6}}},
- {0x2d07, {1|U, {0x10a7}}},
- {0x2d08, {1|U, {0x10a8}}},
- {0x2d09, {1|U, {0x10a9}}},
- {0x2d0a, {1|U, {0x10aa}}},
- {0x2d0b, {1|U, {0x10ab}}},
- {0x2d0c, {1|U, {0x10ac}}},
- {0x2d0d, {1|U, {0x10ad}}},
- {0x2d0e, {1|U, {0x10ae}}},
- {0x2d0f, {1|U, {0x10af}}},
- {0x2d10, {1|U, {0x10b0}}},
- {0x2d11, {1|U, {0x10b1}}},
- {0x2d12, {1|U, {0x10b2}}},
- {0x2d13, {1|U, {0x10b3}}},
- {0x2d14, {1|U, {0x10b4}}},
- {0x2d15, {1|U, {0x10b5}}},
- {0x2d16, {1|U, {0x10b6}}},
- {0x2d17, {1|U, {0x10b7}}},
- {0x2d18, {1|U, {0x10b8}}},
- {0x2d19, {1|U, {0x10b9}}},
- {0x2d1a, {1|U, {0x10ba}}},
- {0x2d1b, {1|U, {0x10bb}}},
- {0x2d1c, {1|U, {0x10bc}}},
- {0x2d1d, {1|U, {0x10bd}}},
- {0x2d1e, {1|U, {0x10be}}},
- {0x2d1f, {1|U, {0x10bf}}},
- {0x2d20, {1|U, {0x10c0}}},
- {0x2d21, {1|U, {0x10c1}}},
- {0x2d22, {1|U, {0x10c2}}},
- {0x2d23, {1|U, {0x10c3}}},
- {0x2d24, {1|U, {0x10c4}}},
- {0x2d25, {1|U, {0x10c5}}},
- {0x2d27, {1|U, {0x10c7}}},
- {0x2d2d, {1|U, {0x10cd}}},
- {0xa641, {1|U, {0xa640}}},
- {0xa643, {1|U, {0xa642}}},
- {0xa645, {1|U, {0xa644}}},
- {0xa647, {1|U, {0xa646}}},
- {0xa649, {1|U, {0xa648}}},
- {0xa64b, {2|U, {0xa64a, 0x1c88}}},
- {0xa64d, {1|U, {0xa64c}}},
- {0xa64f, {1|U, {0xa64e}}},
- {0xa651, {1|U, {0xa650}}},
- {0xa653, {1|U, {0xa652}}},
- {0xa655, {1|U, {0xa654}}},
- {0xa657, {1|U, {0xa656}}},
- {0xa659, {1|U, {0xa658}}},
- {0xa65b, {1|U, {0xa65a}}},
- {0xa65d, {1|U, {0xa65c}}},
- {0xa65f, {1|U, {0xa65e}}},
- {0xa661, {1|U, {0xa660}}},
- {0xa663, {1|U, {0xa662}}},
- {0xa665, {1|U, {0xa664}}},
- {0xa667, {1|U, {0xa666}}},
- {0xa669, {1|U, {0xa668}}},
- {0xa66b, {1|U, {0xa66a}}},
- {0xa66d, {1|U, {0xa66c}}},
- {0xa681, {1|U, {0xa680}}},
- {0xa683, {1|U, {0xa682}}},
- {0xa685, {1|U, {0xa684}}},
- {0xa687, {1|U, {0xa686}}},
- {0xa689, {1|U, {0xa688}}},
- {0xa68b, {1|U, {0xa68a}}},
- {0xa68d, {1|U, {0xa68c}}},
- {0xa68f, {1|U, {0xa68e}}},
- {0xa691, {1|U, {0xa690}}},
- {0xa693, {1|U, {0xa692}}},
- {0xa695, {1|U, {0xa694}}},
- {0xa697, {1|U, {0xa696}}},
- {0xa699, {1|U, {0xa698}}},
- {0xa69b, {1|U, {0xa69a}}},
- {0xa723, {1|U, {0xa722}}},
- {0xa725, {1|U, {0xa724}}},
- {0xa727, {1|U, {0xa726}}},
- {0xa729, {1|U, {0xa728}}},
- {0xa72b, {1|U, {0xa72a}}},
- {0xa72d, {1|U, {0xa72c}}},
- {0xa72f, {1|U, {0xa72e}}},
- {0xa733, {1|U, {0xa732}}},
- {0xa735, {1|U, {0xa734}}},
- {0xa737, {1|U, {0xa736}}},
- {0xa739, {1|U, {0xa738}}},
- {0xa73b, {1|U, {0xa73a}}},
- {0xa73d, {1|U, {0xa73c}}},
- {0xa73f, {1|U, {0xa73e}}},
- {0xa741, {1|U, {0xa740}}},
- {0xa743, {1|U, {0xa742}}},
- {0xa745, {1|U, {0xa744}}},
- {0xa747, {1|U, {0xa746}}},
- {0xa749, {1|U, {0xa748}}},
- {0xa74b, {1|U, {0xa74a}}},
- {0xa74d, {1|U, {0xa74c}}},
- {0xa74f, {1|U, {0xa74e}}},
- {0xa751, {1|U, {0xa750}}},
- {0xa753, {1|U, {0xa752}}},
- {0xa755, {1|U, {0xa754}}},
- {0xa757, {1|U, {0xa756}}},
- {0xa759, {1|U, {0xa758}}},
- {0xa75b, {1|U, {0xa75a}}},
- {0xa75d, {1|U, {0xa75c}}},
- {0xa75f, {1|U, {0xa75e}}},
- {0xa761, {1|U, {0xa760}}},
- {0xa763, {1|U, {0xa762}}},
- {0xa765, {1|U, {0xa764}}},
- {0xa767, {1|U, {0xa766}}},
- {0xa769, {1|U, {0xa768}}},
- {0xa76b, {1|U, {0xa76a}}},
- {0xa76d, {1|U, {0xa76c}}},
- {0xa76f, {1|U, {0xa76e}}},
- {0xa77a, {1|U, {0xa779}}},
- {0xa77c, {1|U, {0xa77b}}},
- {0xa77f, {1|U, {0xa77e}}},
- {0xa781, {1|U, {0xa780}}},
- {0xa783, {1|U, {0xa782}}},
- {0xa785, {1|U, {0xa784}}},
- {0xa787, {1|U, {0xa786}}},
- {0xa78c, {1|U, {0xa78b}}},
- {0xa791, {1|U, {0xa790}}},
- {0xa793, {1|U, {0xa792}}},
- {0xa794, {1|U, {0xa7c4}}},
- {0xa797, {1|U, {0xa796}}},
- {0xa799, {1|U, {0xa798}}},
- {0xa79b, {1|U, {0xa79a}}},
- {0xa79d, {1|U, {0xa79c}}},
- {0xa79f, {1|U, {0xa79e}}},
- {0xa7a1, {1|U, {0xa7a0}}},
- {0xa7a3, {1|U, {0xa7a2}}},
- {0xa7a5, {1|U, {0xa7a4}}},
- {0xa7a7, {1|U, {0xa7a6}}},
- {0xa7a9, {1|U, {0xa7a8}}},
- {0xa7b5, {1|U, {0xa7b4}}},
- {0xa7b7, {1|U, {0xa7b6}}},
- {0xa7b9, {1|U, {0xa7b8}}},
- {0xa7bb, {1|U, {0xa7ba}}},
- {0xa7bd, {1|U, {0xa7bc}}},
- {0xa7bf, {1|U, {0xa7be}}},
- {0xa7c3, {1|U, {0xa7c2}}},
- {0xab53, {1|U, {0xa7b3}}},
- {0xff41, {1|U, {0xff21}}},
- {0xff42, {1|U, {0xff22}}},
- {0xff43, {1|U, {0xff23}}},
- {0xff44, {1|U, {0xff24}}},
- {0xff45, {1|U, {0xff25}}},
- {0xff46, {1|U, {0xff26}}},
- {0xff47, {1|U, {0xff27}}},
- {0xff48, {1|U, {0xff28}}},
- {0xff49, {1|U, {0xff29}}},
- {0xff4a, {1|U, {0xff2a}}},
- {0xff4b, {1|U, {0xff2b}}},
- {0xff4c, {1|U, {0xff2c}}},
- {0xff4d, {1|U, {0xff2d}}},
- {0xff4e, {1|U, {0xff2e}}},
- {0xff4f, {1|U, {0xff2f}}},
- {0xff50, {1|U, {0xff30}}},
- {0xff51, {1|U, {0xff31}}},
- {0xff52, {1|U, {0xff32}}},
- {0xff53, {1|U, {0xff33}}},
- {0xff54, {1|U, {0xff34}}},
- {0xff55, {1|U, {0xff35}}},
- {0xff56, {1|U, {0xff36}}},
- {0xff57, {1|U, {0xff37}}},
- {0xff58, {1|U, {0xff38}}},
- {0xff59, {1|U, {0xff39}}},
- {0xff5a, {1|U, {0xff3a}}},
- {0x10428, {1|U, {0x10400}}},
- {0x10429, {1|U, {0x10401}}},
- {0x1042a, {1|U, {0x10402}}},
- {0x1042b, {1|U, {0x10403}}},
- {0x1042c, {1|U, {0x10404}}},
- {0x1042d, {1|U, {0x10405}}},
- {0x1042e, {1|U, {0x10406}}},
- {0x1042f, {1|U, {0x10407}}},
- {0x10430, {1|U, {0x10408}}},
- {0x10431, {1|U, {0x10409}}},
- {0x10432, {1|U, {0x1040a}}},
- {0x10433, {1|U, {0x1040b}}},
- {0x10434, {1|U, {0x1040c}}},
- {0x10435, {1|U, {0x1040d}}},
- {0x10436, {1|U, {0x1040e}}},
- {0x10437, {1|U, {0x1040f}}},
- {0x10438, {1|U, {0x10410}}},
- {0x10439, {1|U, {0x10411}}},
- {0x1043a, {1|U, {0x10412}}},
- {0x1043b, {1|U, {0x10413}}},
- {0x1043c, {1|U, {0x10414}}},
- {0x1043d, {1|U, {0x10415}}},
- {0x1043e, {1|U, {0x10416}}},
- {0x1043f, {1|U, {0x10417}}},
- {0x10440, {1|U, {0x10418}}},
- {0x10441, {1|U, {0x10419}}},
- {0x10442, {1|U, {0x1041a}}},
- {0x10443, {1|U, {0x1041b}}},
- {0x10444, {1|U, {0x1041c}}},
- {0x10445, {1|U, {0x1041d}}},
- {0x10446, {1|U, {0x1041e}}},
- {0x10447, {1|U, {0x1041f}}},
- {0x10448, {1|U, {0x10420}}},
- {0x10449, {1|U, {0x10421}}},
- {0x1044a, {1|U, {0x10422}}},
- {0x1044b, {1|U, {0x10423}}},
- {0x1044c, {1|U, {0x10424}}},
- {0x1044d, {1|U, {0x10425}}},
- {0x1044e, {1|U, {0x10426}}},
- {0x1044f, {1|U, {0x10427}}},
- {0x104d8, {1|U, {0x104b0}}},
- {0x104d9, {1|U, {0x104b1}}},
- {0x104da, {1|U, {0x104b2}}},
- {0x104db, {1|U, {0x104b3}}},
- {0x104dc, {1|U, {0x104b4}}},
- {0x104dd, {1|U, {0x104b5}}},
- {0x104de, {1|U, {0x104b6}}},
- {0x104df, {1|U, {0x104b7}}},
- {0x104e0, {1|U, {0x104b8}}},
- {0x104e1, {1|U, {0x104b9}}},
- {0x104e2, {1|U, {0x104ba}}},
- {0x104e3, {1|U, {0x104bb}}},
- {0x104e4, {1|U, {0x104bc}}},
- {0x104e5, {1|U, {0x104bd}}},
- {0x104e6, {1|U, {0x104be}}},
- {0x104e7, {1|U, {0x104bf}}},
- {0x104e8, {1|U, {0x104c0}}},
- {0x104e9, {1|U, {0x104c1}}},
- {0x104ea, {1|U, {0x104c2}}},
- {0x104eb, {1|U, {0x104c3}}},
- {0x104ec, {1|U, {0x104c4}}},
- {0x104ed, {1|U, {0x104c5}}},
- {0x104ee, {1|U, {0x104c6}}},
- {0x104ef, {1|U, {0x104c7}}},
- {0x104f0, {1|U, {0x104c8}}},
- {0x104f1, {1|U, {0x104c9}}},
- {0x104f2, {1|U, {0x104ca}}},
- {0x104f3, {1|U, {0x104cb}}},
- {0x104f4, {1|U, {0x104cc}}},
- {0x104f5, {1|U, {0x104cd}}},
- {0x104f6, {1|U, {0x104ce}}},
- {0x104f7, {1|U, {0x104cf}}},
- {0x104f8, {1|U, {0x104d0}}},
- {0x104f9, {1|U, {0x104d1}}},
- {0x104fa, {1|U, {0x104d2}}},
- {0x104fb, {1|U, {0x104d3}}},
- {0x10cc0, {1|U, {0x10c80}}},
- {0x10cc1, {1|U, {0x10c81}}},
- {0x10cc2, {1|U, {0x10c82}}},
- {0x10cc3, {1|U, {0x10c83}}},
- {0x10cc4, {1|U, {0x10c84}}},
- {0x10cc5, {1|U, {0x10c85}}},
- {0x10cc6, {1|U, {0x10c86}}},
- {0x10cc7, {1|U, {0x10c87}}},
- {0x10cc8, {1|U, {0x10c88}}},
- {0x10cc9, {1|U, {0x10c89}}},
- {0x10cca, {1|U, {0x10c8a}}},
- {0x10ccb, {1|U, {0x10c8b}}},
- {0x10ccc, {1|U, {0x10c8c}}},
- {0x10ccd, {1|U, {0x10c8d}}},
- {0x10cce, {1|U, {0x10c8e}}},
- {0x10ccf, {1|U, {0x10c8f}}},
- {0x10cd0, {1|U, {0x10c90}}},
- {0x10cd1, {1|U, {0x10c91}}},
- {0x10cd2, {1|U, {0x10c92}}},
- {0x10cd3, {1|U, {0x10c93}}},
- {0x10cd4, {1|U, {0x10c94}}},
- {0x10cd5, {1|U, {0x10c95}}},
- {0x10cd6, {1|U, {0x10c96}}},
- {0x10cd7, {1|U, {0x10c97}}},
- {0x10cd8, {1|U, {0x10c98}}},
- {0x10cd9, {1|U, {0x10c99}}},
- {0x10cda, {1|U, {0x10c9a}}},
- {0x10cdb, {1|U, {0x10c9b}}},
- {0x10cdc, {1|U, {0x10c9c}}},
- {0x10cdd, {1|U, {0x10c9d}}},
- {0x10cde, {1|U, {0x10c9e}}},
- {0x10cdf, {1|U, {0x10c9f}}},
- {0x10ce0, {1|U, {0x10ca0}}},
- {0x10ce1, {1|U, {0x10ca1}}},
- {0x10ce2, {1|U, {0x10ca2}}},
- {0x10ce3, {1|U, {0x10ca3}}},
- {0x10ce4, {1|U, {0x10ca4}}},
- {0x10ce5, {1|U, {0x10ca5}}},
- {0x10ce6, {1|U, {0x10ca6}}},
- {0x10ce7, {1|U, {0x10ca7}}},
- {0x10ce8, {1|U, {0x10ca8}}},
- {0x10ce9, {1|U, {0x10ca9}}},
- {0x10cea, {1|U, {0x10caa}}},
- {0x10ceb, {1|U, {0x10cab}}},
- {0x10cec, {1|U, {0x10cac}}},
- {0x10ced, {1|U, {0x10cad}}},
- {0x10cee, {1|U, {0x10cae}}},
- {0x10cef, {1|U, {0x10caf}}},
- {0x10cf0, {1|U, {0x10cb0}}},
- {0x10cf1, {1|U, {0x10cb1}}},
- {0x10cf2, {1|U, {0x10cb2}}},
- {0x118c0, {1|U, {0x118a0}}},
- {0x118c1, {1|U, {0x118a1}}},
- {0x118c2, {1|U, {0x118a2}}},
- {0x118c3, {1|U, {0x118a3}}},
- {0x118c4, {1|U, {0x118a4}}},
- {0x118c5, {1|U, {0x118a5}}},
- {0x118c6, {1|U, {0x118a6}}},
- {0x118c7, {1|U, {0x118a7}}},
- {0x118c8, {1|U, {0x118a8}}},
- {0x118c9, {1|U, {0x118a9}}},
- {0x118ca, {1|U, {0x118aa}}},
- {0x118cb, {1|U, {0x118ab}}},
- {0x118cc, {1|U, {0x118ac}}},
- {0x118cd, {1|U, {0x118ad}}},
- {0x118ce, {1|U, {0x118ae}}},
- {0x118cf, {1|U, {0x118af}}},
- {0x118d0, {1|U, {0x118b0}}},
- {0x118d1, {1|U, {0x118b1}}},
- {0x118d2, {1|U, {0x118b2}}},
- {0x118d3, {1|U, {0x118b3}}},
- {0x118d4, {1|U, {0x118b4}}},
- {0x118d5, {1|U, {0x118b5}}},
- {0x118d6, {1|U, {0x118b6}}},
- {0x118d7, {1|U, {0x118b7}}},
- {0x118d8, {1|U, {0x118b8}}},
- {0x118d9, {1|U, {0x118b9}}},
- {0x118da, {1|U, {0x118ba}}},
- {0x118db, {1|U, {0x118bb}}},
- {0x118dc, {1|U, {0x118bc}}},
- {0x118dd, {1|U, {0x118bd}}},
- {0x118de, {1|U, {0x118be}}},
- {0x118df, {1|U, {0x118bf}}},
- {0x16e60, {1|U, {0x16e40}}},
- {0x16e61, {1|U, {0x16e41}}},
- {0x16e62, {1|U, {0x16e42}}},
- {0x16e63, {1|U, {0x16e43}}},
- {0x16e64, {1|U, {0x16e44}}},
- {0x16e65, {1|U, {0x16e45}}},
- {0x16e66, {1|U, {0x16e46}}},
- {0x16e67, {1|U, {0x16e47}}},
- {0x16e68, {1|U, {0x16e48}}},
- {0x16e69, {1|U, {0x16e49}}},
- {0x16e6a, {1|U, {0x16e4a}}},
- {0x16e6b, {1|U, {0x16e4b}}},
- {0x16e6c, {1|U, {0x16e4c}}},
- {0x16e6d, {1|U, {0x16e4d}}},
- {0x16e6e, {1|U, {0x16e4e}}},
- {0x16e6f, {1|U, {0x16e4f}}},
- {0x16e70, {1|U, {0x16e50}}},
- {0x16e71, {1|U, {0x16e51}}},
- {0x16e72, {1|U, {0x16e52}}},
- {0x16e73, {1|U, {0x16e53}}},
- {0x16e74, {1|U, {0x16e54}}},
- {0x16e75, {1|U, {0x16e55}}},
- {0x16e76, {1|U, {0x16e56}}},
- {0x16e77, {1|U, {0x16e57}}},
- {0x16e78, {1|U, {0x16e58}}},
- {0x16e79, {1|U, {0x16e59}}},
- {0x16e7a, {1|U, {0x16e5a}}},
- {0x16e7b, {1|U, {0x16e5b}}},
- {0x16e7c, {1|U, {0x16e5c}}},
- {0x16e7d, {1|U, {0x16e5d}}},
- {0x16e7e, {1|U, {0x16e5e}}},
- {0x16e7f, {1|U, {0x16e5f}}},
- {0x1e922, {1|U, {0x1e900}}},
- {0x1e923, {1|U, {0x1e901}}},
- {0x1e924, {1|U, {0x1e902}}},
- {0x1e925, {1|U, {0x1e903}}},
- {0x1e926, {1|U, {0x1e904}}},
- {0x1e927, {1|U, {0x1e905}}},
- {0x1e928, {1|U, {0x1e906}}},
- {0x1e929, {1|U, {0x1e907}}},
- {0x1e92a, {1|U, {0x1e908}}},
- {0x1e92b, {1|U, {0x1e909}}},
- {0x1e92c, {1|U, {0x1e90a}}},
- {0x1e92d, {1|U, {0x1e90b}}},
- {0x1e92e, {1|U, {0x1e90c}}},
- {0x1e92f, {1|U, {0x1e90d}}},
- {0x1e930, {1|U, {0x1e90e}}},
- {0x1e931, {1|U, {0x1e90f}}},
- {0x1e932, {1|U, {0x1e910}}},
- {0x1e933, {1|U, {0x1e911}}},
- {0x1e934, {1|U, {0x1e912}}},
- {0x1e935, {1|U, {0x1e913}}},
- {0x1e936, {1|U, {0x1e914}}},
- {0x1e937, {1|U, {0x1e915}}},
- {0x1e938, {1|U, {0x1e916}}},
- {0x1e939, {1|U, {0x1e917}}},
- {0x1e93a, {1|U, {0x1e918}}},
- {0x1e93b, {1|U, {0x1e919}}},
- {0x1e93c, {1|U, {0x1e91a}}},
- {0x1e93d, {1|U, {0x1e91b}}},
- {0x1e93e, {1|U, {0x1e91c}}},
- {0x1e93f, {1|U, {0x1e91d}}},
- {0x1e940, {1|U, {0x1e91e}}},
- {0x1e941, {1|U, {0x1e91f}}},
- {0x1e942, {1|U, {0x1e920}}},
- {0x1e943, {1|U, {0x1e921}}},
-#define CaseUnfold_11_Locale (*(CaseUnfold_11_Type (*)[1])(CaseUnfold_11_Table+1352))
- {0x0069, {1|U, {0x0049}}},
-};
-
-/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_11_hash -N onigenc_unicode_CaseUnfold_11_lookup -n */
-
-/* maximum key range = 2507, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-/*ARGSUSED*/
-static unsigned int
-onigenc_unicode_CaseUnfold_11_hash(const OnigCodePoint code)
-{
- static const unsigned short asso_values[] =
- {
- 1, 2510, 2, 7, 4, 582, 9, 308, 197, 674,
- 297, 20, 2, 3, 303, 351, 2510, 2510, 2510, 2510,
- 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 112,
- 2510, 2510, 2510, 2510, 2510, 2510, 2510, 120, 2510, 2510,
- 2510, 2510, 2510, 1, 2510, 2510, 2510, 2510, 2510, 2510,
- 2510, 2510, 2510, 278, 2510, 2510, 2510, 2510, 2510, 2510,
- 2510, 2510, 12, 1, 7, 8, 218, 878, 222, 1178,
- 480, 1102, 54, 1340, 151, 1615, 8, 15, 106, 1607,
- 225, 854, 87, 490, 44, 1351, 5, 1281, 3, 1470,
- 11, 1215, 377, 10, 441, 599, 152, 1642, 127, 1334,
- 702, 841, 594, 827, 123, 916, 146, 1118, 117, 1363,
- 254, 812, 249, 1096, 1630, 945, 437, 745, 1600, 718,
- 1593, 704, 152, 1005, 383, 1064, 1493, 975, 236, 676,
- 761, 579, 1017, 557, 1241, 628, 1195, 614, 1506, 464,
- 1576, 535, 1432, 513, 1159, 423, 1026, 276, 1460, 291,
- 1453, 392, 1263, 201, 1442, 85, 1412, 70, 1430, 100,
- 1632, 129, 1410, 1, 1386, 25, 1373, 35, 656, 55,
- 1188, 45, 1308, 160, 687, 227, 355, 175, 1201, 328,
- 1030, 367, 1483, 414, 1479, 1166, 1418, 783, 994, 937,
- 1083, 959, 1463, 967
- };
- return asso_values[bits_of(code, 2)+66] + asso_values[bits_of(code, 1)+4] + asso_values[bits_of(code, 0)];
-}
-
-static const CodePointList3 *
-onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code)
-{
- enum
- {
- MIN_CODE_VALUE = 0x61,
- MAX_CODE_VALUE = 0x1e943,
- TOTAL_KEYWORDS = 1353,
- MIN_WORD_LENGTH = 3,
- MAX_WORD_LENGTH = 3,
- MIN_HASH_VALUE = 3,
- MAX_HASH_VALUE = 2509
- };
-
- static const short wordlist[] =
- {
- -1, -1, -1,
- /*0x13e1*/ 589,
- /*0x0461*/ 340,
- /*0x04e1*/ 400,
- /*0x0061*/ 0,
- -1,
- /*0x104e1*/ 1176,
- /*0x1e61*/ 661,
- /*0x1ee1*/ 720,
- /*0x0161*/ 102,
- /*0x2ce1*/ 952,
- -1,
- /*0x049b*/ 365,
- -1, -1,
- /*0x24e1*/ 840,
- /*0x1e1b*/ 626,
- /*0x048b*/ 357,
- /*0x011b*/ 69,
- /*0x2c9b*/ 917,
- /*0x03e1*/ 280,
- /*0x1e0b*/ 618,
- /*0x1e8b*/ 682,
- /*0x010b*/ 61,
- /*0x2c8b*/ 909,
- /*0x13e3*/ 591,
- /*0x0463*/ 341,
- /*0x04e3*/ 401,
- /*0x0063*/ 2,
- -1,
- /*0x104e3*/ 1178,
- /*0x1e63*/ 662,
- /*0x1ee3*/ 721,
- /*0x0163*/ 103,
- /*0x2ce3*/ 953,
- /*0x13e5*/ 593,
- /*0x0465*/ 342,
- /*0x04e5*/ 402,
- /*0x0065*/ 4,
- /*0x24e3*/ 842,
- /*0x104e5*/ 1180,
- /*0x1e65*/ 663,
- /*0x1ee5*/ 722,
- /*0x0165*/ 104,
- /*0x03e3*/ 281,
- /*0x13e9*/ 597,
- /*0x0469*/ 344,
- /*0x04e9*/ 404,
- /*0x0069*/ 1352,
- /*0x24e5*/ 844,
- /*0x104e9*/ 1184,
- /*0x1e69*/ 665,
- /*0x1ee9*/ 724,
- /*0x0169*/ 106,
- /*0x03e5*/ 282,
- /*0x13e7*/ 595,
- /*0x0467*/ 343,
- /*0x04e7*/ 403,
- /*0x0067*/ 6,
- /*0x24e9*/ 848,
- /*0x104e7*/ 1182,
- /*0x1e67*/ 664,
- /*0x1ee7*/ 723,
- /*0x0167*/ 105,
- /*0x03e9*/ 284,
- -1, -1, -1, -1,
- /*0x24e7*/ 846,
- /*0x13db*/ 583,
- /*0x045b*/ 335,
- /*0x04db*/ 397,
- -1,
- /*0x03e7*/ 283,
- /*0x104db*/ 1170,
- /*0x1e5b*/ 658,
- /*0x1edb*/ 717,
- /*0x015b*/ 99,
- /*0x2cdb*/ 949,
- -1, -1, -1, -1,
- /*0x24db*/ 834,
- /*0x13d9*/ 581,
- /*0x0459*/ 333,
- /*0x04d9*/ 396,
- /*0xa761*/ 1064,
- /*0x03db*/ 277,
- /*0x104d9*/ 1168,
- /*0x1e59*/ 657,
- /*0x1ed9*/ 716,
- /*0x0159*/ 98,
- /*0x2cd9*/ 948,
- -1, -1, -1, -1,
- /*0x24d9*/ 832,
- /*0x13dd*/ 585,
- /*0x045d*/ 337,
- /*0x04dd*/ 398,
- -1,
- /*0x03d9*/ 276,
- /*0x104dd*/ 1172,
- /*0x1e5d*/ 659,
- /*0x1edd*/ 718,
- /*0x015d*/ 100,
- /*0x2cdd*/ 950,
- -1, -1,
- /*0xa763*/ 1065,
- -1,
- /*0x24dd*/ 836,
- /*0x10ce1*/ 1236,
- -1,
- /*0x13aa*/ 534,
- -1,
- /*0x03dd*/ 278,
- /*0x10e1*/ 495,
- /*0x1042a*/ 1129,
- /*0xa765*/ 1066,
- /*0x13a6*/ 530,
- -1, -1, -1,
- /*0x13a0*/ 524,
- -1,
- /*0x13df*/ 587,
- /*0x045f*/ 339,
- /*0x04df*/ 399,
- /*0xa769*/ 1068,
- -1,
- /*0x104df*/ 1174,
- /*0x1e5f*/ 660,
- /*0x1edf*/ 719,
- /*0x015f*/ 101,
- /*0x2cdf*/ 951,
- /*0x10ce3*/ 1238,
- -1, -1,
- /*0xa767*/ 1067,
- /*0x24df*/ 838,
- /*0x10e3*/ 497,
- -1,
- /*0x13a8*/ 532,
- -1,
- /*0x03df*/ 279,
- /*0x10ce5*/ 1240,
- /*0x10428*/ 1127,
- -1,
- /*0x13b8*/ 548,
- /*0x0438*/ 300,
- /*0x10e5*/ 499,
- -1,
- /*0x10438*/ 1143,
- /*0xa75b*/ 1061,
- -1,
- /*0x10ce9*/ 1244,
- /*0x13eb*/ 599,
- /*0x046b*/ 345,
- /*0x04eb*/ 405,
- /*0x006b*/ 9,
- /*0x10e9*/ 503,
- /*0x104eb*/ 1186,
- /*0x1e6b*/ 666,
- /*0x1eeb*/ 725,
- /*0x016b*/ 107,
- /*0x10ce7*/ 1242,
- -1,
- /*0x03b8*/ 253,
- /*0xa759*/ 1060,
- -1,
- /*0x10e7*/ 501,
- /*0x13ef*/ 603,
- /*0x046f*/ 347,
- /*0x04ef*/ 407,
- /*0x006f*/ 13,
- /*0x03eb*/ 285,
- /*0x104ef*/ 1190,
- /*0x1e6f*/ 668,
- /*0x1eef*/ 727,
- /*0x016f*/ 109,
- /*0x10cdb*/ 1230,
- -1, -1,
- /*0xa75d*/ 1062,
- -1,
- /*0x10db*/ 489,
- -1, -1, -1, -1,
- /*0x03ef*/ 287,
- -1, -1,
- /*0x0261*/ 210,
- -1,
- /*0x10cd9*/ 1228,
- -1,
- /*0x13d7*/ 579,
- /*0x0457*/ 331,
- /*0x04d7*/ 395,
- /*0x10d9*/ 487,
- -1,
- /*0x021b*/ 178,
- /*0x1e57*/ 656,
- /*0x1ed7*/ 715,
- /*0x0157*/ 97,
- /*0x2cd7*/ 947,
- /*0x020b*/ 170,
- -1, -1,
- /*0x10cdd*/ 1232,
- /*0x24d7*/ 830,
- /*0xa75f*/ 1063,
- -1,
- /*0x1f61*/ 777,
- /*0x10dd*/ 491,
- /*0x03d7*/ 275,
- /*0x0263*/ 211,
- /*0x1f14*/ 748,
- -1, -1,
- /*0x1d8e*/ 612,
- /*0xa661*/ 1013,
- /*0x13ed*/ 601,
- /*0x046d*/ 346,
- /*0x04ed*/ 406,
- /*0x006d*/ 11,
- /*0x0265*/ 212,
- /*0x104ed*/ 1188,
- /*0x1e6d*/ 667,
- /*0x1eed*/ 726,
- /*0x016d*/ 108,
- /*0x13be*/ 554,
- /*0x043e*/ 306,
- -1, -1,
- /*0x1043e*/ 1149,
- /*0x0269*/ 215,
- /*0x1f63*/ 779,
- /*0x10cdf*/ 1234,
- /*0x013e*/ 85,
- -1,
- /*0x03ed*/ 286,
- /*0xa76b*/ 1069,
- /*0x10df*/ 493,
- /*0x13ae*/ 538,
- /*0xa663*/ 1014,
- -1,
- /*0x1f65*/ 781,
- /*0x1042e*/ 1133,
- /*0x13ac*/ 536,
- /*0x03be*/ 259,
- -1, -1,
- /*0x1042c*/ 1131,
- -1,
- /*0xa665*/ 1015,
- /*0x1f12*/ 746,
- /*0xa76f*/ 1071,
- -1, -1, -1,
- /*0x025b*/ 207,
- -1,
- /*0x03ae*/ 244,
- -1,
- /*0xa669*/ 1017,
- /*0x1f06*/ 742,
- /*0x1f67*/ 783,
- /*0x03ac*/ 242,
- /*0x10ceb*/ 1246,
- -1,
- /*0x13d1*/ 573,
- /*0x0451*/ 325,
- /*0x04d1*/ 392,
- /*0x10eb*/ 505,
- /*0xa667*/ 1016,
- /*0x0259*/ 206,
- /*0x1e51*/ 653,
- /*0x1ed1*/ 712,
- /*0x0151*/ 94,
- /*0x2cd1*/ 944,
- -1, -1,
- /*0xa757*/ 1059,
- /*0x10cef*/ 1250,
- /*0x24d1*/ 824,
- /*0x13d3*/ 575,
- /*0x0453*/ 327,
- /*0x04d3*/ 393,
- /*0x10ef*/ 509,
- /*0xa65b*/ 1010,
- -1,
- /*0x1e53*/ 654,
- /*0x1ed3*/ 713,
- /*0x0153*/ 95,
- /*0x2cd3*/ 945,
- -1,
- /*0xab53*/ 1100,
- /*0x0561*/ 440,
- /*0x1f10*/ 744,
- /*0x24d3*/ 826,
- -1, -1,
- /*0x01e1*/ 151,
- -1,
- /*0xa659*/ 1009,
- -1,
- /*0x051b*/ 429,
- -1,
- /*0xa76d*/ 1070,
- /*0x10cd7*/ 1226,
- -1,
- /*0x050b*/ 421,
- -1, -1,
- /*0x10d7*/ 485,
- -1, -1, -1, -1,
- /*0xa65d*/ 1011,
- -1,
- /*0x0563*/ 442,
- /*0x13f1*/ 605,
- /*0x0471*/ 348,
- /*0x04f1*/ 408,
- /*0x0071*/ 15,
- /*0x01e3*/ 152,
- /*0x104f1*/ 1192,
- /*0x1e71*/ 669,
- /*0x1ef1*/ 728,
- /*0x0171*/ 110,
- /*0x0565*/ 444,
- -1, -1,
- /*0x1f26*/ 756,
- /*0x10ced*/ 1248,
- /*0x01e5*/ 153,
- -1,
- /*0x1f20*/ 750,
- -1,
- /*0x10ed*/ 507,
- /*0x0569*/ 448,
- -1, -1,
- /*0x118db*/ 1281,
- /*0x0192*/ 122,
- /*0x01e9*/ 155,
- -1,
- /*0xa65f*/ 1012,
- /*0x13ee*/ 602,
- /*0x026b*/ 217,
- /*0x0567*/ 446,
- /*0x006e*/ 12,
- -1,
- /*0x104ee*/ 1189,
- -1,
- /*0x01e7*/ 154,
- /*0xa751*/ 1056,
- /*0x2cee*/ 955,
- /*0x118d9*/ 1279,
- -1,
- /*0x13f3*/ 607,
- /*0x0473*/ 349,
- /*0x04f3*/ 409,
- /*0x0073*/ 17,
- /*0x026f*/ 219,
- /*0x104f3*/ 1194,
- /*0x1e73*/ 670,
- /*0x1ef3*/ 729,
- /*0x0173*/ 111,
- /*0x2cf3*/ 956,
- /*0x2c61*/ 896,
- /*0xa753*/ 1057,
- -1,
- /*0x118dd*/ 1283,
- -1, -1,
- /*0x13ba*/ 550,
- /*0x043a*/ 302,
- /*0xa66b*/ 1018,
- /*0x03f3*/ 289,
- /*0x1043a*/ 1145,
- -1, -1,
- /*0x10cd1*/ 1220,
- /*0x013a*/ 83,
- /*0x13d5*/ 577,
- /*0x0455*/ 329,
- /*0x04d5*/ 394,
- /*0x10d1*/ 479,
- -1,
- /*0x0257*/ 205,
- /*0x1e55*/ 655,
- /*0x1ed5*/ 714,
- /*0x0155*/ 96,
- /*0x2cd5*/ 946,
- /*0x03ba*/ 255,
- -1,
- /*0x0586*/ 477,
- /*0x10cd3*/ 1222,
- /*0x24d5*/ 828,
- /*0x01dd*/ 149,
- -1,
- /*0x118df*/ 1285,
- /*0x10d3*/ 481,
- /*0x2c65*/ 897,
- -1,
- /*0x018c*/ 121,
- /*0x13f5*/ 609,
- /*0x0475*/ 350,
- /*0x04f5*/ 410,
- /*0x0075*/ 19,
- /*0x1f57*/ 775,
- /*0x104f5*/ 1196,
- /*0x1e75*/ 671,
- /*0x1ef5*/ 730,
- /*0x0175*/ 112,
- /*0x13cf*/ 571,
- /*0x044f*/ 323,
- /*0x04cf*/ 391,
- /*0xa657*/ 1008,
- /*0x1044f*/ 1166,
- /*0x1e92a*/ 1326,
- /*0x1e4f*/ 652,
- /*0x1ecf*/ 711,
- /*0x014f*/ 93,
- /*0x2ccf*/ 943,
- -1,
- /*0x1e926*/ 1322,
- /*0x1f00*/ 736,
- /*0x01df*/ 150,
- /*0x13b2*/ 542,
- /*0x0432*/ 294,
- /*0x1f02*/ 738,
- -1,
- /*0x10432*/ 1137,
- /*0x10cf1*/ 1252,
- /*0x2d16*/ 979,
- -1,
- /*0x2d14*/ 977,
- /*0x2c5b*/ 892,
- /*0x10f1*/ 511,
- /*0x2d0a*/ 967,
- -1,
- /*0x2d1b*/ 984,
- /*0x2d18*/ 981,
- /*0xa66d*/ 1019,
- /*0x01a8*/ 130,
- -1,
- /*0x2d0b*/ 968,
- /*0x03b2*/ 247,
- /*0x1e928*/ 1324,
- /*0x0188*/ 120,
- /*0x019e*/ 126,
- -1,
- /*0x2c59*/ 890,
- /*0x056b*/ 450,
- /*0x1e938*/ 1340,
- /*0x13c9*/ 565,
- /*0x0449*/ 317,
- -1,
- /*0x01eb*/ 156,
- /*0x10449*/ 1160,
- /*0x10cee*/ 1249,
- /*0x1e49*/ 649,
- /*0x1ec9*/ 708,
- /*0x0251*/ 200,
- /*0x2cc9*/ 940,
- /*0x10ee*/ 508,
- -1,
- /*0x2c5d*/ 894,
- /*0x056f*/ 454,
- -1,
- /*0xa755*/ 1058,
- -1,
- /*0x118d7*/ 1277,
- /*0x01ef*/ 158,
- /*0x03c9*/ 269,
- /*0x2d12*/ 975,
- -1,
- /*0x10f3*/ 513,
- /*0x0253*/ 202,
- -1, -1, -1, -1,
- /*0x0491*/ 360,
- /*0x1f51*/ 772,
- /*0x2d06*/ 963,
- /*0xa794*/ 1082,
- /*0x1e11*/ 621,
- /*0x1e91*/ 685,
- /*0x0111*/ 64,
- /*0x2c91*/ 912,
- /*0xa79b*/ 1085,
- /*0xa651*/ 1005,
- -1, -1, -1, -1,
- /*0x10cd5*/ 1224,
- -1,
- /*0x1f53*/ 773,
- -1,
- /*0xa74f*/ 1055,
- /*0x10d5*/ 483,
- -1,
- /*0x13cd*/ 569,
- /*0x044d*/ 321,
- -1,
- /*0xa653*/ 1006,
- /*0x1044d*/ 1164,
- -1,
- /*0x1e4d*/ 651,
- /*0x1ecd*/ 710,
- /*0x014d*/ 92,
- /*0x2ccd*/ 942,
- -1,
- /*0x0271*/ 220,
- /*0x0180*/ 117,
- -1,
- /*0x2d10*/ 973,
- /*0x2c38*/ 857,
- /*0x056d*/ 452,
- -1, -1,
- /*0x03cd*/ 273,
- /*0x10f5*/ 515,
- /*0x01ed*/ 157,
- /*0x13cb*/ 567,
- /*0x044b*/ 319,
- /*0x10ccf*/ 1218,
- -1,
- /*0x1044b*/ 1162,
- -1,
- /*0x1e4b*/ 650,
- /*0x1ecb*/ 709,
- /*0x014b*/ 91,
- /*0x2ccb*/ 941,
- /*0x1f71*/ 785,
- /*0x2d0c*/ 969,
- /*0x1e93e*/ 1346,
- -1, -1, -1,
- /*0xa749*/ 1052,
- -1, -1,
- /*0x03cb*/ 271,
- -1,
- /*0x118d1*/ 1271,
- /*0x13c3*/ 559,
- /*0x0443*/ 311,
- -1,
- /*0x1e92e*/ 1330,
- /*0x10443*/ 1154,
- -1,
- /*0x1e43*/ 646,
- /*0x1ec3*/ 705,
- /*0x1e92c*/ 1328,
- /*0x2cc3*/ 937,
- /*0x2d20*/ 989,
- /*0x0580*/ 471,
- -1, -1,
- /*0x118d3*/ 1273,
- /*0x0582*/ 473,
- -1, -1, -1,
- /*0x03c3*/ 263,
- /*0x2c57*/ 888,
- /*0x10cc9*/ 1212,
- /*0x13c1*/ 557,
- /*0x0441*/ 309,
- -1,
- /*0x00e1*/ 26,
- /*0x10441*/ 1152,
- /*0x1f73*/ 787,
- /*0x1e41*/ 645,
- /*0x1ec1*/ 704,
- -1,
- /*0x2cc1*/ 936,
- -1, -1,
- /*0x2d08*/ 965,
- /*0x2d1e*/ 987,
- -1,
- /*0x13a4*/ 528,
- -1,
- /*0xa78c*/ 1079,
- -1,
- /*0x03c1*/ 262,
- -1,
- /*0xa74d*/ 1054,
- /*0x049d*/ 366,
- -1, -1, -1,
- /*0x1e1d*/ 627,
- /*0x00e3*/ 28,
- /*0x011d*/ 70,
- /*0x2c9d*/ 918,
- /*0x1f55*/ 774,
- /*0x0275*/ 222,
- -1,
- /*0x2c3e*/ 863,
- -1,
- /*0x13c7*/ 563,
- /*0x0447*/ 315,
- /*0x00e5*/ 30,
- /*0xa655*/ 1007,
- /*0x10447*/ 1158,
- /*0x024f*/ 198,
- /*0x1e47*/ 648,
- /*0x1ec7*/ 707,
- /*0xa74b*/ 1053,
- /*0x2cc7*/ 939,
- /*0x0371*/ 236,
- -1,
- /*0x00e9*/ 34,
- /*0x10ccd*/ 1216,
- /*0x13c5*/ 561,
- /*0x0445*/ 313,
- /*0x0571*/ 456,
- /*0x1f75*/ 789,
- /*0x10445*/ 1156,
- /*0x03c7*/ 267,
- /*0x1e45*/ 647,
- /*0x1ec5*/ 706,
- /*0x00e7*/ 32,
- /*0x2cc5*/ 938,
- -1, -1, -1, -1, -1, -1,
- /*0xa743*/ 1049,
- -1, -1,
- /*0x03c5*/ 265,
- /*0xa64f*/ 1004,
- /*0x10ccb*/ 1214,
- -1, -1,
- /*0x2c51*/ 882,
- -1,
- /*0x1f32*/ 760,
- -1,
- /*0x13e6*/ 594,
- /*0x056e*/ 453,
- /*0x2d00*/ 957,
- /*0x0066*/ 5,
- /*0x0249*/ 195,
- /*0x104e6*/ 1181,
- /*0x2d02*/ 959,
- /*0x0373*/ 237,
- -1,
- /*0x2d0e*/ 971,
- /*0xa741*/ 1048,
- /*0x2c53*/ 884,
- -1,
- /*0x0573*/ 458,
- /*0x24e6*/ 845,
- /*0x10cc3*/ 1206,
- /*0x118d5*/ 1275,
- -1,
- /*0x01f3*/ 159,
- -1,
- /*0x13bf*/ 555,
- /*0x043f*/ 307,
- /*0x04bf*/ 383,
- -1,
- /*0x1043f*/ 1150,
- /*0x028a*/ 230,
- /*0x1e3f*/ 644,
- /*0x1ebf*/ 703,
- /*0x019a*/ 125,
- /*0x2cbf*/ 935,
- /*0x0211*/ 173,
- /*0x13ec*/ 600,
- /*0x028b*/ 231,
- /*0xa649*/ 1001,
- /*0x006c*/ 10,
- -1,
- /*0x104ec*/ 1187,
- /*0x10cc1*/ 1204,
- /*0x1e93a*/ 1342,
- /*0x03bf*/ 260,
- /*0x2cec*/ 954,
- /*0x1f04*/ 740,
- -1, -1, -1,
- /*0xa747*/ 1051,
- /*0x13a2*/ 526,
- /*0x118cf*/ 1269,
- /*0x13b7*/ 547,
- /*0x0437*/ 299,
- /*0x04b7*/ 379,
- /*0x1f11*/ 745,
- /*0x10437*/ 1142,
- /*0x024d*/ 197,
- /*0x1e37*/ 640,
- /*0x1eb7*/ 699,
- /*0x0137*/ 82,
- /*0x2cb7*/ 931,
- -1,
- /*0xa745*/ 1050,
- /*0x0575*/ 460,
- /*0x0292*/ 233,
- /*0x13b5*/ 545,
- /*0x0435*/ 297,
- /*0x04b5*/ 378,
- /*0x01f5*/ 160,
- /*0x10435*/ 1140,
- /*0x03b7*/ 252,
- /*0x1e35*/ 639,
- /*0x1eb5*/ 698,
- /*0x0135*/ 81,
- /*0x2cb5*/ 930,
- /*0x10cc7*/ 1210,
- -1, -1,
- /*0x024b*/ 196,
- -1,
- /*0x16e61*/ 1287,
- -1, -1, -1,
- /*0x03b5*/ 250,
- /*0xa64d*/ 1003,
- -1, -1,
- /*0x00eb*/ 36,
- /*0x10cc5*/ 1208,
- /*0x2c73*/ 902,
- /*0x118c9*/ 1263,
- /*0x13b3*/ 543,
- /*0x0433*/ 295,
- /*0x04b3*/ 377,
- /*0x1e932*/ 1334,
- /*0x10433*/ 1138,
- -1,
- /*0x1e33*/ 638,
- /*0x1eb3*/ 697,
- /*0x0133*/ 80,
- /*0x2cb3*/ 929,
- -1,
- /*0x00ef*/ 40,
- /*0x16e63*/ 1289,
- -1,
- /*0x2c3a*/ 859,
- /*0xa64b*/ 1002,
- /*0x13c0*/ 556,
- /*0x0440*/ 308,
- /*0xa73f*/ 1047,
- /*0x03b3*/ 248,
- /*0x10440*/ 1151,
- -1,
- /*0x16e65*/ 1291,
- /*0x2c55*/ 886,
- /*0x0140*/ 86,
- /*0x10ce6*/ 1241,
- /*0x01c9*/ 139,
- -1, -1,
- /*0x1f43*/ 769,
- /*0x10e6*/ 500,
- -1,
- /*0x16e69*/ 1295,
- -1,
- /*0x028c*/ 232,
- /*0x03c0*/ 261,
- -1,
- /*0xa643*/ 998,
- -1,
- /*0x0479*/ 352,
- /*0x04f9*/ 412,
- /*0x0079*/ 23,
- /*0x16e67*/ 1293,
- /*0x104f9*/ 1200,
- /*0x1e79*/ 673,
- /*0x1ef9*/ 732,
- /*0xa737*/ 1043,
- /*0x0511*/ 424,
- /*0x118cd*/ 1267,
- /*0x1d79*/ 610,
- /*0x021d*/ 179,
- /*0x1f41*/ 767,
- -1, -1,
- /*0x2c4f*/ 880,
- -1,
- /*0x10cec*/ 1247,
- -1, -1,
- /*0xa641*/ 997,
- /*0xa735*/ 1042,
- /*0x10ec*/ 506,
- /*0x2171*/ 807,
- /*0x00ed*/ 38,
- -1,
- /*0x0247*/ 194,
- /*0x1f24*/ 754,
- /*0x13ad*/ 537,
- /*0x2c32*/ 851,
- /*0x04ad*/ 374,
- /*0x118cb*/ 1265,
- /*0x1042d*/ 1132,
- /*0x2d1a*/ 983,
- /*0x1e2d*/ 635,
- /*0x1ead*/ 694,
- /*0x012d*/ 78,
- /*0x2cad*/ 926,
- -1, -1,
- /*0x0288*/ 228,
- /*0x029e*/ 235,
- -1,
- /*0x13a5*/ 529,
- -1,
- /*0x04a5*/ 370,
- /*0x0584*/ 475,
- /*0x03ad*/ 243,
- /*0xa733*/ 1041,
- /*0x1e25*/ 631,
- /*0x1ea5*/ 690,
- /*0x0125*/ 74,
- /*0x2ca5*/ 922,
- /*0x118c3*/ 1257,
- -1,
- /*0xa647*/ 1000,
- /*0x2c49*/ 874,
- /*0x13a3*/ 527,
- -1,
- /*0x04a3*/ 369,
- -1,
- /*0x1f45*/ 771,
- /*0x2173*/ 809,
- /*0x1e23*/ 630,
- /*0x1ea3*/ 689,
- /*0x0123*/ 73,
- /*0x2ca3*/ 921,
- /*0xff59*/ 1125,
- /*0x0266*/ 213,
- /*0xa645*/ 999,
- -1, -1,
- /*0x048f*/ 359,
- -1, -1,
- /*0x118c1*/ 1255,
- /*0x1e0f*/ 620,
- /*0x1e8f*/ 684,
- /*0x010f*/ 63,
- /*0x2c8f*/ 911,
- /*0xa69b*/ 1033,
- -1, -1, -1,
- /*0x1e943*/ 1351,
- /*0xa68b*/ 1025,
- -1, -1,
- /*0x023f*/ 191,
- /*0x1f66*/ 782,
- -1,
- /*0x10cc0*/ 1203,
- -1, -1,
- /*0x1fe1*/ 803,
- -1,
- /*0x0481*/ 356,
- /*0x2d1c*/ 985,
- -1,
- /*0x026c*/ 218,
- /*0x1e01*/ 613,
- /*0x1e81*/ 677,
- /*0x0101*/ 56,
- /*0x2c81*/ 904,
- -1,
- /*0x2c4d*/ 878,
- /*0x1e941*/ 1349,
- /*0x0280*/ 224,
- /*0x16e6b*/ 1297,
- /*0x2175*/ 811,
- /*0x118c7*/ 1261,
- /*0x0282*/ 225,
- -1, -1, -1,
- /*0xa72d*/ 1039,
- -1,
- /*0x051d*/ 430,
- /*0x10f9*/ 519,
- -1, -1,
- /*0x1e924*/ 1320,
- -1,
- /*0x16e6f*/ 1301,
- /*0x118c5*/ 1259,
- /*0x00f1*/ 42,
- -1,
- /*0x2c4b*/ 876,
- /*0x1fe5*/ 804,
- -1,
- /*0xa725*/ 1035,
- -1,
- /*0x13a7*/ 531,
- -1,
- /*0x04a7*/ 371,
- /*0x1f22*/ 752,
- /*0x2d04*/ 961,
- /*0x1f37*/ 765,
- /*0x1e27*/ 632,
- /*0x1ea7*/ 691,
- /*0x0127*/ 75,
- /*0x2ca7*/ 923,
- -1, -1,
- /*0xa723*/ 1034,
- -1,
- /*0x2d11*/ 974,
- -1, -1,
- /*0x2c43*/ 868,
- -1,
- /*0x1f35*/ 763,
- /*0x00ee*/ 39,
- -1,
- /*0x047b*/ 353,
- /*0x04fb*/ 413,
- -1,
- /*0x0233*/ 189,
- /*0x104fb*/ 1202,
- /*0x1e7b*/ 674,
- /*0x1efb*/ 733,
- /*0x13b1*/ 541,
- /*0x0431*/ 293,
- /*0x04b1*/ 376,
- /*0x00f3*/ 44,
- /*0x10431*/ 1136,
- -1,
- /*0x1e31*/ 637,
- /*0x1eb1*/ 696,
- -1,
- /*0x2cb1*/ 928,
- /*0x2c41*/ 866,
- /*0x03fb*/ 291,
- /*0x0240*/ 192,
- /*0x0566*/ 445,
- /*0x16e6d*/ 1299,
- /*0x047d*/ 354,
- /*0x04fd*/ 414,
- /*0x1f33*/ 761,
- -1,
- /*0x03b1*/ 246,
- /*0x1e7d*/ 675,
- /*0x1efd*/ 734,
- /*0xff57*/ 1123,
- /*0x047f*/ 355,
- /*0x04ff*/ 415,
- /*0x1d7d*/ 611,
- -1, -1,
- /*0x1e7f*/ 676,
- /*0x1eff*/ 735,
- /*0x13bd*/ 553,
- /*0x043d*/ 305,
- /*0x04bd*/ 382,
- /*0x1f40*/ 766,
- /*0x1043d*/ 1148,
- /*0xa791*/ 1080,
- /*0x1e3d*/ 643,
- /*0x1ebd*/ 702,
- /*0x01bf*/ 137,
- /*0x2cbd*/ 934,
- -1, -1,
- /*0x1e93f*/ 1347,
- -1,
- /*0x056c*/ 451,
- /*0x2c47*/ 872,
- -1, -1, -1,
- /*0x03bd*/ 258,
- /*0x00f5*/ 46,
- -1,
- /*0x007a*/ 24,
- -1,
- /*0x104fa*/ 1201,
- /*0x1f79*/ 793,
- -1,
- /*0x017a*/ 114,
- /*0xa727*/ 1036,
- /*0x2c45*/ 870,
- /*0x13b9*/ 549,
- /*0x0439*/ 301,
- /*0x04b9*/ 380,
- /*0x022d*/ 186,
- /*0x10439*/ 1144,
- -1,
- /*0x1e39*/ 641,
- /*0x1eb9*/ 700,
- /*0x1e922*/ 1318,
- /*0x2cb9*/ 932,
- /*0x1e937*/ 1339,
- -1,
- /*0x13c2*/ 558,
- /*0x0442*/ 310,
- /*0x04c2*/ 384,
- -1,
- /*0x10442*/ 1153,
- -1,
- /*0x0225*/ 182,
- /*0x03b9*/ 254,
- /*0x0142*/ 87,
- /*0x13d0*/ 572,
- /*0x0450*/ 324,
- -1,
- /*0x1e935*/ 1337,
- /*0x13f2*/ 606,
- -1,
- /*0x2c66*/ 898,
- /*0x0072*/ 16,
- /*0x2d24*/ 993,
- /*0x104f2*/ 1193,
- -1,
- /*0x0223*/ 181,
- -1,
- /*0x2d1d*/ 986,
- /*0x24d0*/ 823,
- /*0x118c0*/ 1254,
- /*0xff51*/ 1117,
- -1,
- /*0x1f25*/ 755,
- -1, -1,
- /*0xa7c3*/ 1099,
- -1,
- /*0x03f2*/ 288,
- /*0x020f*/ 172,
- -1,
- /*0x2c3f*/ 864,
- -1,
- /*0xa77f*/ 1074,
- -1,
- /*0x1e933*/ 1335,
- /*0xff53*/ 1119,
- /*0x1f23*/ 753,
- -1,
- /*0x16e71*/ 1303,
- -1,
- /*0xa73d*/ 1046,
- /*0x2c6c*/ 901,
- /*0x13bb*/ 551,
- /*0x043b*/ 303,
- /*0x04bb*/ 381,
- -1,
- /*0x1043b*/ 1146,
- -1,
- /*0x1e3b*/ 642,
- /*0x1ebb*/ 701,
- /*0x1e940*/ 1348,
- /*0x2cbb*/ 933,
- /*0x0201*/ 165,
- -1, -1, -1,
- /*0x10fd*/ 521,
- -1,
- /*0x2c37*/ 856,
- /*0xa77a*/ 1072,
- -1,
- /*0x03bb*/ 256,
- -1,
- /*0x0579*/ 464,
- /*0x10ff*/ 523,
- /*0x16e6e*/ 1300,
- -1,
- /*0xa79d*/ 1086,
- /*0x01f9*/ 161,
- /*0x017c*/ 115,
- /*0xa739*/ 1044,
- -1,
- /*0x2c35*/ 854,
- /*0x1f01*/ 737,
- /*0x13af*/ 539,
- -1,
- /*0x04af*/ 375,
- /*0x16e73*/ 1305,
- /*0x1042f*/ 1134,
- -1,
- /*0x1e2f*/ 636,
- /*0x1eaf*/ 695,
- /*0x012f*/ 79,
- /*0x2caf*/ 927,
- -1, -1,
- /*0x1e05*/ 615,
- /*0x1e85*/ 679,
- /*0x0105*/ 58,
- /*0x2c85*/ 906,
- /*0x0227*/ 183,
- /*0x10fa*/ 520,
- /*0x052d*/ 438,
- /*0x03af*/ 245,
- -1, -1,
- /*0x13a9*/ 533,
- /*0x01ad*/ 131,
- /*0x04a9*/ 372,
- /*0x2c33*/ 852,
- /*0x10429*/ 1128,
- /*0x1e92d*/ 1329,
- /*0x1e29*/ 633,
- /*0x1ea9*/ 692,
- /*0x0129*/ 76,
- /*0x2ca9*/ 924,
- -1,
- /*0x0525*/ 434,
- -1,
- /*0x10cc2*/ 1205,
- -1,
- /*0x1f27*/ 757,
- /*0x01a5*/ 129,
- -1, -1,
- /*0x2c40*/ 865,
- /*0x1e925*/ 1321,
- -1,
- /*0x10cd0*/ 1219,
- /*0x0231*/ 188,
- /*0x2d22*/ 991,
- /*0x0523*/ 433,
- /*0x10cf2*/ 1253,
- /*0x10d0*/ 478,
- /*0x16e75*/ 1307,
- -1,
- /*0x01a3*/ 128,
- /*0x10f2*/ 512,
- -1,
- /*0xa73b*/ 1045,
- /*0x1e923*/ 1319,
- /*0x1fd1*/ 801,
- /*0x1f7b*/ 795,
- /*0x027d*/ 223,
- /*0x050f*/ 423,
- -1,
- /*0xff55*/ 1121,
- /*0x13ce*/ 570,
- /*0x044e*/ 322,
- /*0x04ce*/ 390,
- /*0x1f31*/ 759,
- /*0x1044e*/ 1165,
- -1, -1,
- /*0xa7bf*/ 1098,
- /*0x0477*/ 351,
- /*0x04f7*/ 411,
- /*0x0077*/ 21,
- /*0xa77c*/ 1073,
- /*0x104f7*/ 1198,
- /*0x1e77*/ 672,
- /*0x1ef7*/ 731,
- /*0x0177*/ 113,
- -1,
- /*0x1f7d*/ 797,
- -1,
- /*0x03ce*/ 274,
- -1,
- /*0x0501*/ 416,
- -1, -1,
- /*0xa72f*/ 1040,
- /*0x1e03*/ 614,
- /*0x1e83*/ 678,
- /*0x0103*/ 57,
- /*0x2c83*/ 905,
- /*0x13e8*/ 596,
- /*0xff4f*/ 1115,
- -1,
- /*0x0068*/ 7,
- -1,
- /*0x104e8*/ 1183,
- /*0xa7b7*/ 1094,
- /*0x13c6*/ 562,
- /*0x0446*/ 314,
- /*0x04c6*/ 386,
- -1,
- /*0x10446*/ 1157,
- -1,
- /*0x13f0*/ 604,
- /*0x24e8*/ 847,
- /*0x0146*/ 89,
- /*0x0070*/ 14,
- /*0xa729*/ 1037,
- /*0x104f0*/ 1191,
- -1,
- /*0xa7b5*/ 1093,
- -1, -1,
- /*0x1f7a*/ 794,
- -1,
- /*0x0242*/ 193,
- /*0x03c6*/ 266,
- -1, -1,
- /*0x0499*/ 364,
- /*0x0527*/ 435,
- -1, -1,
- /*0x1e19*/ 625,
- /*0x0250*/ 199,
- /*0x0119*/ 68,
- /*0x2c99*/ 916,
- -1,
- /*0x0272*/ 221,
- /*0x1e927*/ 1323,
- /*0x0581*/ 472,
- -1,
- /*0xff49*/ 1109,
- -1, -1,
- /*0x037b*/ 239,
- /*0x1f42*/ 768,
- -1, -1,
- /*0x00e6*/ 31,
- -1,
- /*0x057b*/ 466,
- -1,
- /*0x13c4*/ 560,
- /*0x0444*/ 312,
- /*0x04c4*/ 385,
- /*0x01fb*/ 162,
- /*0x10444*/ 1155,
- -1,
- /*0x1f72*/ 786,
- -1,
- /*0x0144*/ 88,
- -1, -1,
- /*0x2d2d*/ 996,
- -1, -1,
- /*0x037d*/ 241,
- /*0x1e931*/ 1333,
- -1, -1, -1,
- /*0x03c4*/ 264,
- /*0x057d*/ 468,
- /*0x2179*/ 815,
- /*0x13d6*/ 578,
- /*0x0456*/ 330,
- -1,
- /*0x01fd*/ 163,
- /*0x2d25*/ 994,
- /*0x00ec*/ 37,
- /*0x057f*/ 470,
- -1, -1,
- /*0x029d*/ 234,
- /*0x10cce*/ 1217,
- /*0x01ff*/ 164,
- -1, -1,
- /*0x24d6*/ 829,
- -1,
- /*0xff4d*/ 1113,
- -1,
- /*0x2d23*/ 992,
- /*0x01bd*/ 136,
- /*0x0495*/ 362,
- -1,
- /*0x10f7*/ 517,
- /*0x1e93d*/ 1345,
- /*0x1e15*/ 623,
- /*0x1e95*/ 687,
- /*0x0115*/ 66,
- /*0x2c95*/ 914,
- -1,
- /*0x022f*/ 187,
- -1,
- /*0x2d0f*/ 972,
- -1,
- /*0x057a*/ 465,
- /*0x118c2*/ 1256,
- /*0x0205*/ 167,
- -1,
- /*0x1f7c*/ 796,
- /*0xff4b*/ 1111,
- /*0x10ce8*/ 1243,
- -1, -1, -1,
- /*0x118d0*/ 1270,
- /*0x10e8*/ 502,
- /*0x13ea*/ 598,
- /*0x10cc6*/ 1209,
- -1,
- /*0x006a*/ 8,
- /*0x01b9*/ 135,
- /*0x104ea*/ 1185,
- /*0x0229*/ 184,
- /*0x10cf0*/ 1251,
- /*0x1e939*/ 1341,
- /*0xa7a5*/ 1090,
- /*0x2d01*/ 958,
- /*0x1f05*/ 741,
- /*0x10f0*/ 510,
- /*0x2c31*/ 850,
- -1,
- /*0xff43*/ 1103,
- -1, -1, -1, -1,
- /*0x1e942*/ 1350,
- -1, -1,
- /*0xa7a3*/ 1089,
- /*0x0572*/ 457,
- /*0x01d0*/ 142,
- /*0x13a1*/ 525,
- -1,
- /*0x04a1*/ 368,
- -1, -1, -1,
- /*0x1e21*/ 629,
- /*0x1ea1*/ 688,
- /*0x0121*/ 72,
- /*0x2ca1*/ 920,
- /*0xa691*/ 1028,
- /*0xff41*/ 1101,
- /*0x1e07*/ 616,
- /*0x1e87*/ 680,
- /*0x0107*/ 59,
- /*0x2c87*/ 907,
- -1,
- /*0x2c3d*/ 862,
- -1,
- /*0x0493*/ 361,
- -1,
- /*0x10cc4*/ 1207,
- /*0x2d27*/ 995,
- /*0x1e13*/ 622,
- /*0x1e93*/ 686,
- /*0x0113*/ 65,
- /*0x2c93*/ 913,
- -1, -1,
- /*0x13ab*/ 535,
- /*0x00f9*/ 49,
- /*0x04ab*/ 373,
- -1,
- /*0x1042b*/ 1130,
- /*0xa781*/ 1075,
- /*0x1e2b*/ 634,
- /*0x1eab*/ 693,
- /*0x012b*/ 77,
- /*0x2cab*/ 925,
- /*0x13e4*/ 592,
- /*0x0203*/ 166,
- /*0x1e93b*/ 1343,
- /*0x0064*/ 3,
- /*0x10cd6*/ 1225,
- /*0x104e4*/ 1179,
- /*0x037c*/ 240,
- /*0xff47*/ 1107,
- /*0x2c39*/ 858,
- /*0x10d6*/ 484,
- /*0x1f77*/ 791,
- /*0x0268*/ 214,
- /*0x057c*/ 467,
- /*0x13e2*/ 590,
- /*0x24e4*/ 843,
- /*0x16e66*/ 1292,
- /*0x0062*/ 1,
- -1,
- /*0x104e2*/ 1177,
- -1,
- /*0x2c42*/ 867,
- /*0xff45*/ 1105,
- /*0x1f03*/ 739,
- -1, -1,
- /*0x052f*/ 439,
- -1,
- /*0x24e2*/ 841,
- -1,
- /*0x2c50*/ 881,
- -1,
- /*0x0505*/ 418,
- -1,
- /*0xa7a7*/ 1091,
- /*0x1e92f*/ 1331,
- -1,
- /*0x0185*/ 119,
- /*0x13e0*/ 588,
- /*0x0219*/ 177,
- /*0x13da*/ 582,
- /*0x045a*/ 334,
- -1,
- /*0x104e0*/ 1175,
- /*0x217b*/ 817,
- /*0x104da*/ 1169,
- /*0x1f70*/ 784,
- /*0x16e6c*/ 1298,
- /*0x0529*/ 436,
- /*0x0078*/ 22,
- /*0x10cea*/ 1245,
- /*0x104f8*/ 1199,
- /*0x24e0*/ 839,
- -1,
- /*0x24da*/ 833,
- /*0x10ea*/ 504,
- -1,
- /*0x1e929*/ 1325,
- /*0x13dc*/ 584,
- /*0x045c*/ 336,
- /*0x13cc*/ 568,
- /*0x044c*/ 320,
- /*0x04cc*/ 389,
- /*0x104dc*/ 1171,
- /*0x1044c*/ 1163,
- /*0x03f8*/ 290,
- /*0x217d*/ 819,
- /*0x118ce*/ 1268,
- /*0x2c3b*/ 860,
- -1,
- /*0x13d8*/ 580,
- /*0x0458*/ 332,
- /*0x24dc*/ 835,
- -1,
- /*0x217f*/ 821,
- /*0x104d8*/ 1167,
- -1, -1,
- /*0xa72b*/ 1038,
- /*0x03cc*/ 272,
- /*0x0585*/ 476,
- /*0x13d4*/ 576,
- /*0x0454*/ 328,
- -1,
- /*0x24d8*/ 831,
- -1,
- /*0x1f44*/ 770,
- /*0x0256*/ 204,
- /*0x13d2*/ 574,
- /*0x0452*/ 326,
- /*0x0377*/ 238,
- -1, -1,
- /*0xa7bd*/ 1097,
- /*0x01ce*/ 141,
- /*0x24d4*/ 827,
- /*0x0577*/ 462,
- -1, -1,
- /*0x017e*/ 116,
- /*0x0497*/ 363,
- /*0x217a*/ 816,
- /*0x24d2*/ 825,
- /*0x118c6*/ 1260,
- /*0x1e17*/ 624,
- /*0x0215*/ 175,
- /*0x0117*/ 67,
- /*0x2c97*/ 915,
- /*0x0503*/ 417,
- -1,
- /*0x0076*/ 20,
- /*0x13f4*/ 608,
- /*0x104f6*/ 1197,
- /*0x0183*/ 118,
- /*0x0074*/ 18,
- /*0x10ce4*/ 1239,
- /*0x104f4*/ 1195,
- -1,
- /*0x0568*/ 447,
- -1,
- /*0x10e4*/ 498,
- /*0x13bc*/ 552,
- /*0x043c*/ 304,
- /*0xa7b9*/ 1095,
- -1,
- /*0x1043c*/ 1147,
- /*0x1f15*/ 749,
- -1,
- /*0x10ce2*/ 1237,
- /*0x013c*/ 84,
- /*0x01c6*/ 138,
- /*0x0570*/ 455,
- /*0x026a*/ 216,
- /*0x10e2*/ 496,
- /*0x13c8*/ 564,
- /*0x0448*/ 316,
- /*0x04c8*/ 387,
- /*0x2172*/ 808,
- /*0x10448*/ 1159,
- -1,
- /*0x03bc*/ 257,
- -1,
- /*0x0148*/ 90,
- /*0x16e79*/ 1311,
- -1,
- /*0x0519*/ 428,
- /*0x00fb*/ 51,
- -1, -1,
- /*0x118c4*/ 1258,
- /*0x0199*/ 124,
- -1,
- /*0x10ce0*/ 1235,
- /*0x03c8*/ 268,
- /*0x10cda*/ 1229,
- -1,
- /*0x0583*/ 474,
- /*0x10e0*/ 494,
- -1,
- /*0x10da*/ 488,
- -1, -1, -1,
- /*0x2c4e*/ 879,
- /*0x0207*/ 168,
- /*0x10f8*/ 518,
- -1, -1,
- /*0x00fd*/ 53,
- -1,
- /*0x2d05*/ 962,
- /*0x118d6*/ 1276,
- /*0x10cdc*/ 1231,
- -1,
- /*0x10ccc*/ 1215,
- /*0x0213*/ 174,
- /*0x00ff*/ 55,
- /*0x10dc*/ 490,
- -1,
- /*0x1f21*/ 751,
- -1, -1,
- /*0xa7bb*/ 1096,
- -1,
- /*0x10cd8*/ 1227,
- /*0x1f07*/ 743,
- -1,
- /*0x022b*/ 185,
- -1,
- /*0x10d8*/ 486,
- /*0x217c*/ 818,
- -1,
- /*0x2c68*/ 899,
- -1, -1,
- /*0x10cd4*/ 1223,
- /*0x1f13*/ 747,
- -1,
- /*0x01d6*/ 145,
- /*0x2c46*/ 871,
- /*0x10d4*/ 482,
- -1,
- /*0x10cd2*/ 1221,
- /*0x00fa*/ 50,
- /*0x13ca*/ 566,
- /*0x044a*/ 318,
- /*0x04ca*/ 388,
- /*0x10d2*/ 480,
- /*0x1044a*/ 1161,
- /*0x2184*/ 822,
- /*0x10fe*/ 522,
- /*0x0515*/ 426,
- -1, -1, -1, -1,
- /*0x0195*/ 123,
- -1,
- /*0x1f64*/ 780,
- -1,
- /*0xa785*/ 1077,
- /*0x13b6*/ 546,
- /*0x0436*/ 298,
- /*0x03ca*/ 270,
- -1,
- /*0x10436*/ 1141,
- /*0x10f6*/ 516,
- -1,
- /*0x13b4*/ 544,
- /*0x0434*/ 296,
- /*0x10f4*/ 514,
- /*0x1f62*/ 778,
- /*0x10434*/ 1139,
- -1,
- /*0x0260*/ 209,
- -1,
- /*0xa7a9*/ 1092,
- /*0x048d*/ 358,
- /*0x056a*/ 449,
- /*0x00f2*/ 43,
- /*0x03b6*/ 251,
- /*0x1e0d*/ 619,
- /*0x1e8d*/ 683,
- /*0x010d*/ 62,
- /*0x2c8d*/ 910,
- /*0x2c44*/ 869,
- /*0x2d03*/ 960,
- /*0x03b4*/ 249,
- /*0x10cc8*/ 1211,
- /*0x1e09*/ 617,
- /*0x1e89*/ 681,
- /*0x0109*/ 60,
- /*0x2c89*/ 908,
- -1,
- /*0x025c*/ 208,
- /*0x1f60*/ 776,
- -1, -1,
- /*0x13b0*/ 540,
- /*0x0430*/ 292,
- /*0x13de*/ 586,
- /*0x045e*/ 338,
- /*0x10430*/ 1135,
- /*0x1f78*/ 792,
- /*0x0521*/ 432,
- /*0x104de*/ 1173,
- /*0x214e*/ 805,
- /*0x2c56*/ 887,
- -1,
- /*0x01a1*/ 127,
- /*0x0507*/ 419,
- -1,
- /*0x049f*/ 367,
- /*0x2177*/ 813,
- /*0x24de*/ 837,
- -1,
- /*0x1e1f*/ 628,
- /*0x0254*/ 203,
- /*0x011f*/ 71,
- /*0x2c9f*/ 919,
- -1,
- /*0x0513*/ 425,
- -1,
- /*0x2d19*/ 982,
- /*0x0252*/ 201,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x00fc*/ 52,
- /*0x052b*/ 437,
- /*0x0217*/ 176,
- -1,
- /*0xa783*/ 1076,
- /*0x16e7b*/ 1313,
- -1, -1, -1, -1,
- /*0x1e92b*/ 1327,
- /*0x0564*/ 443,
- -1, -1, -1, -1,
- /*0x2170*/ 806,
- -1, -1, -1,
- /*0x2c6a*/ 900,
- -1, -1, -1,
- /*0x0562*/ 441,
- /*0x023c*/ 190,
- /*0x10cca*/ 1213,
- /*0x16e7d*/ 1315,
- /*0x118da*/ 1280,
- -1, -1, -1,
- /*0x1f76*/ 790,
- -1, -1,
- /*0x16e7f*/ 1317,
- /*0x1f74*/ 788,
- -1, -1, -1, -1,
- /*0xa799*/ 1084,
- -1, -1,
- /*0xa68f*/ 1027,
- -1,
- /*0x118dc*/ 1282,
- -1,
- /*0x118cc*/ 1266,
- -1, -1, -1, -1, -1, -1,
- /*0x01da*/ 147,
- /*0x0578*/ 463,
- /*0x2d15*/ 978,
- /*0x118d8*/ 1278,
- -1, -1, -1,
- /*0x16e7a*/ 1312,
- -1, -1, -1, -1, -1,
- /*0xa681*/ 1020,
- /*0x118d4*/ 1274,
- -1, -1, -1,
- /*0x01dc*/ 148,
- -1,
- /*0x01cc*/ 140,
- /*0x118d2*/ 1272,
- -1, -1, -1, -1, -1,
- /*0x10cde*/ 1233,
- -1, -1,
- /*0x01d8*/ 146,
- -1,
- /*0x10de*/ 492,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x01d4*/ 144,
- -1,
- /*0x16e72*/ 1304,
- -1, -1,
- /*0x057e*/ 469,
- -1,
- /*0x01d2*/ 143,
- -1,
- /*0x00e8*/ 33,
- -1, -1,
- /*0x0517*/ 427,
- -1,
- /*0x2d21*/ 990,
- -1, -1, -1, -1, -1,
- /*0x2d07*/ 964,
- /*0x0576*/ 461,
- /*0x00f0*/ 41,
- /*0xff42*/ 1102,
- -1,
- /*0x0574*/ 459,
- /*0x118c8*/ 1262,
- -1,
- /*0x2c5a*/ 891,
- -1, -1,
- /*0x2d13*/ 976,
- /*0xff50*/ 1116,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0x020d*/ 171,
- /*0x1e93c*/ 1344,
- -1,
- /*0x2c5c*/ 893,
- -1,
- /*0x2c4c*/ 877,
- -1,
- /*0x1f36*/ 764,
- /*0x0209*/ 169,
- -1, -1, -1,
- /*0x16e7c*/ 1314,
- -1,
- /*0x1f34*/ 762,
- /*0x2c58*/ 889,
- -1, -1, -1,
- /*0x1fb1*/ 799,
- -1,
- /*0xa7a1*/ 1088,
- -1, -1, -1, -1,
- /*0x2c54*/ 885,
- /*0xa787*/ 1078,
- -1, -1, -1, -1, -1,
- /*0x2c52*/ 883,
- -1,
- /*0x021f*/ 180,
- -1, -1,
- /*0xa793*/ 1081,
- -1, -1, -1, -1, -1,
- /*0x1f30*/ 758,
- -1, -1, -1,
- /*0x0283*/ 226,
- -1, -1, -1,
- /*0x2c76*/ 903,
- /*0x118ca*/ 1264,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x2c3c*/ 861,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x2c48*/ 873,
- -1, -1, -1, -1, -1, -1,
- /*0x00ea*/ 35,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x2178*/ 814,
- /*0x16e77*/ 1309,
- -1,
- /*0x01b6*/ 134,
- -1, -1,
- /*0x1fd0*/ 800,
- /*0x1e936*/ 1338,
- -1, -1,
- /*0x01b4*/ 133,
- -1,
- /*0x050d*/ 422,
- /*0x2d17*/ 980,
- /*0x1e934*/ 1336,
- /*0x118de*/ 1284,
- -1, -1, -1, -1,
- /*0x0509*/ 420,
- -1, -1,
- /*0x16e68*/ 1294,
- -1, -1, -1, -1,
- /*0xff4e*/ 1114,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x16e70*/ 1302,
- -1, -1, -1,
- /*0x01b0*/ 132,
- -1, -1, -1,
- /*0x1e930*/ 1332,
- /*0x217e*/ 820,
- -1,
- /*0x051f*/ 431,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x2c4a*/ 875,
- -1,
- /*0x00e4*/ 29,
- -1,
- /*0xa685*/ 1022,
- -1,
- /*0x2176*/ 812,
- -1,
- /*0xa797*/ 1083,
- /*0xff46*/ 1106,
- /*0x2174*/ 810,
- -1, -1, -1, -1,
- /*0x00e2*/ 27,
- -1,
- /*0x2c36*/ 855,
- -1, -1, -1, -1, -1, -1,
- /*0x2c34*/ 853,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x00e0*/ 25,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x00f8*/ 48,
- -1, -1, -1, -1, -1, -1,
- /*0x2c30*/ 849,
- /*0xff44*/ 1104,
- /*0x2c5e*/ 895,
- -1, -1, -1, -1,
- /*0x0287*/ 227,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0xff56*/ 1122,
- -1, -1,
- /*0xa683*/ 1021,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x16e6a*/ 1296,
- -1, -1, -1,
- /*0x00fe*/ 54,
- -1, -1,
- /*0x2d0d*/ 970,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x2d09*/ 966,
- -1, -1, -1, -1,
- /*0x00f6*/ 47,
- -1, -1, -1,
- /*0x00f4*/ 45,
- -1, -1, -1, -1,
- /*0xa699*/ 1032,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x2d1f*/ 988,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0x16e64*/ 1290,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x16e62*/ 1288,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0xa79f*/ 1087,
- -1, -1,
- /*0xa695*/ 1030,
- -1, -1, -1, -1, -1, -1,
- /*0x16e60*/ 1286,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x16e78*/ 1310,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0xff5a*/ 1126,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0xa687*/ 1023,
- /*0x16e7e*/ 1316,
- -1, -1,
- /*0xff4c*/ 1112,
- -1, -1, -1, -1, -1, -1,
- /*0xa693*/ 1029,
- -1, -1,
- /*0xff58*/ 1124,
- -1, -1,
- /*0x16e76*/ 1308,
- -1, -1, -1,
- /*0x16e74*/ 1306,
- -1, -1, -1,
- /*0xff54*/ 1120,
- -1, -1, -1, -1, -1, -1,
- /*0xff52*/ 1118,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0xff48*/ 1108,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1,
- /*0x1fe0*/ 802,
- /*0x0289*/ 229,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0xa697*/ 1031,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0xff4a*/ 1110,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- /*0xa68d*/ 1026,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0xa689*/ 1024,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1,
- /*0x1fb0*/ 798
- };
-
- if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE)
- {
- register unsigned int key = onigenc_unicode_CaseUnfold_11_hash(code);
-
- if (key <= MAX_HASH_VALUE)
- {
- register short s = wordlist[key];
-
- if (s >= 0 && code1_equal(code, CaseUnfold_11_Table[s].from))
- return &CaseUnfold_11_Table[s].to;
- }
- }
- return 0;
-}
-
-static const CaseUnfold_12_Type CaseUnfold_12_Table[] = {
-#define CaseUnfold_12 (*(CaseUnfold_12_Type (*)[58])(CaseUnfold_12_Table+0))
- {{0x0061, 0x02be}, {1, {0x1e9a}}},
- {{0x0066, 0x0066}, {1, {0xfb00}}},
- {{0x0066, 0x0069}, {1, {0xfb01}}},
- {{0x0066, 0x006c}, {1, {0xfb02}}},
- {{0x0068, 0x0331}, {1, {0x1e96}}},
- {{0x006a, 0x030c}, {1, {0x01f0}}},
- {{0x0073, 0x0073}, {2, {0x00df, 0x1e9e}}},
- {{0x0073, 0x0074}, {2, {0xfb05, 0xfb06}}},
- {{0x0074, 0x0308}, {1, {0x1e97}}},
- {{0x0077, 0x030a}, {1, {0x1e98}}},
- {{0x0079, 0x030a}, {1, {0x1e99}}},
- {{0x02bc, 0x006e}, {1, {0x0149}}},
- {{0x03ac, 0x03b9}, {1, {0x1fb4}}},
- {{0x03ae, 0x03b9}, {1, {0x1fc4}}},
- {{0x03b1, 0x0342}, {1, {0x1fb6}}},
- {{0x03b1, 0x03b9}, {2, {0x1fb3, 0x1fbc}}},
- {{0x03b7, 0x0342}, {1, {0x1fc6}}},
- {{0x03b7, 0x03b9}, {2, {0x1fc3, 0x1fcc}}},
- {{0x03b9, 0x0342}, {1, {0x1fd6}}},
- {{0x03c1, 0x0313}, {1, {0x1fe4}}},
- {{0x03c5, 0x0313}, {1, {0x1f50}}},
- {{0x03c5, 0x0342}, {1, {0x1fe6}}},
- {{0x03c9, 0x0342}, {1, {0x1ff6}}},
- {{0x03c9, 0x03b9}, {2, {0x1ff3, 0x1ffc}}},
- {{0x03ce, 0x03b9}, {1, {0x1ff4}}},
- {{0x0565, 0x0582}, {1, {0x0587}}},
- {{0x0574, 0x0565}, {1, {0xfb14}}},
- {{0x0574, 0x056b}, {1, {0xfb15}}},
- {{0x0574, 0x056d}, {1, {0xfb17}}},
- {{0x0574, 0x0576}, {1, {0xfb13}}},
- {{0x057e, 0x0576}, {1, {0xfb16}}},
- {{0x1f00, 0x03b9}, {2, {0x1f80, 0x1f88}}},
- {{0x1f01, 0x03b9}, {2, {0x1f81, 0x1f89}}},
- {{0x1f02, 0x03b9}, {2, {0x1f82, 0x1f8a}}},
- {{0x1f03, 0x03b9}, {2, {0x1f83, 0x1f8b}}},
- {{0x1f04, 0x03b9}, {2, {0x1f84, 0x1f8c}}},
- {{0x1f05, 0x03b9}, {2, {0x1f85, 0x1f8d}}},
- {{0x1f06, 0x03b9}, {2, {0x1f86, 0x1f8e}}},
- {{0x1f07, 0x03b9}, {2, {0x1f87, 0x1f8f}}},
- {{0x1f20, 0x03b9}, {2, {0x1f90, 0x1f98}}},
- {{0x1f21, 0x03b9}, {2, {0x1f91, 0x1f99}}},
- {{0x1f22, 0x03b9}, {2, {0x1f92, 0x1f9a}}},
- {{0x1f23, 0x03b9}, {2, {0x1f93, 0x1f9b}}},
- {{0x1f24, 0x03b9}, {2, {0x1f94, 0x1f9c}}},
- {{0x1f25, 0x03b9}, {2, {0x1f95, 0x1f9d}}},
- {{0x1f26, 0x03b9}, {2, {0x1f96, 0x1f9e}}},
- {{0x1f27, 0x03b9}, {2, {0x1f97, 0x1f9f}}},
- {{0x1f60, 0x03b9}, {2, {0x1fa0, 0x1fa8}}},
- {{0x1f61, 0x03b9}, {2, {0x1fa1, 0x1fa9}}},
- {{0x1f62, 0x03b9}, {2, {0x1fa2, 0x1faa}}},
- {{0x1f63, 0x03b9}, {2, {0x1fa3, 0x1fab}}},
- {{0x1f64, 0x03b9}, {2, {0x1fa4, 0x1fac}}},
- {{0x1f65, 0x03b9}, {2, {0x1fa5, 0x1fad}}},
- {{0x1f66, 0x03b9}, {2, {0x1fa6, 0x1fae}}},
- {{0x1f67, 0x03b9}, {2, {0x1fa7, 0x1faf}}},
- {{0x1f70, 0x03b9}, {1, {0x1fb2}}},
- {{0x1f74, 0x03b9}, {1, {0x1fc2}}},
- {{0x1f7c, 0x03b9}, {1, {0x1ff2}}},
-#define CaseUnfold_12_Locale (*(CaseUnfold_12_Type (*)[1])(CaseUnfold_12_Table+58))
- {{0x0069, 0x0307}, {1, {0x0130}}},
-};
-
-/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf -7 -k1,2,3,4,5,6 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_12_hash -N onigenc_unicode_CaseUnfold_12_lookup -n */
-
-/* maximum key range = 71, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-/*ARGSUSED*/
-static unsigned int
-onigenc_unicode_CaseUnfold_12_hash(const OnigCodePoint *codes)
-{
- static const unsigned char asso_values[] =
- {
- 3, 58, 54, 57, 56, 16, 8, 2, 43, 82,
- 3, 1, 23, 82, 82, 82, 82, 82, 82, 4,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 52, 51, 50, 49, 48, 47, 46, 45,
- 82, 82, 82, 82, 43, 82, 42, 82, 82, 13,
- 82, 82, 82, 82, 82, 11, 82, 1, 82, 82,
- 14, 82, 1, 82, 82, 31, 3, 82, 82, 30,
- 82, 82, 82, 10, 82, 82, 82, 82, 37, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 37, 15, 36, 35,
- 34, 17, 1, 33, 12, 4, 23, 23, 26, 21,
- 13, 82, 27, 82, 82, 2, 5, 82, 11, 16,
- 82, 15, 82, 82, 23, 82, 8, 82
- };
- return asso_values[bits_at(codes, 5)] + asso_values[bits_at(codes, 4)] + asso_values[bits_at(codes, 3)] + asso_values[bits_at(codes, 2)] + asso_values[bits_at(codes, 1)] + asso_values[bits_at(codes, 0)];
-}
-
-static const CodePointList2 *
-onigenc_unicode_CaseUnfold_12_lookup(const OnigCodePoint *codes)
-{
- enum
- {
- MIN_CODE_VALUE = 0x61,
- MAX_CODE_VALUE = 0x1f7c,
- TOTAL_KEYWORDS = 59,
- MIN_WORD_LENGTH = 6,
- MAX_WORD_LENGTH = 6,
- MIN_HASH_VALUE = 11,
- MAX_HASH_VALUE = 81
- };
-
- static const short wordlist[] =
- {
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1,
- /*0x1f66,0x03b9*/ 53,
- /*0x1f07,0x03b9*/ 38,
- /*0x1f00,0x03b9*/ 31,
- /*0x0066,0x0066*/ 1,
- /*0x1f74,0x03b9*/ 56,
- /*0x0073,0x0073*/ 6,
- /*0x0066,0x0069*/ 2,
- /*0x1f06,0x03b9*/ 37,
- /*0x0073,0x0074*/ 7,
- /*0x03b9,0x0342*/ 18,
- /*0x03c9,0x03b9*/ 23,
- /*0x03b7,0x03b9*/ 17,
- /*0x0069,0x0307*/ 58,
- /*0x03b1,0x03b9*/ 15,
- /*0x1f61,0x03b9*/ 48,
- /*0x1f05,0x03b9*/ 36,
- /*0x1f65,0x03b9*/ 52,
- /*0x0574,0x0576*/ 29,
- /*0x03c9,0x0342*/ 22,
- /*0x03b7,0x0342*/ 16,
- /*0x057e,0x0576*/ 30,
- /*0x03b1,0x0342*/ 14,
- /*0x1f7c,0x03b9*/ 57,
- /*0x0574,0x0565*/ 26,
- /*0x0079,0x030a*/ 10,
- /*0x0077,0x030a*/ 9,
- /*0x1f70,0x03b9*/ 55,
- /*0x0574,0x056d*/ 28,
- /*0x0066,0x006c*/ 3,
- /*0x0574,0x056b*/ 27,
- /*0x0061,0x02be*/ 0,
- /*0x0068,0x0331*/ 4,
- /*0x1f67,0x03b9*/ 54,
- /*0x1f64,0x03b9*/ 51,
- /*0x1f63,0x03b9*/ 50,
- /*0x1f62,0x03b9*/ 49,
- /*0x1f60,0x03b9*/ 47,
- /*0x03ce,0x03b9*/ 24,
- /*0x03c5,0x0342*/ 21,
- /*0x03c5,0x0313*/ 20,
- /*0x03c1,0x0313*/ 19,
- /*0x02bc,0x006e*/ 11,
- /*0x03ae,0x03b9*/ 13,
- /*0x03ac,0x03b9*/ 12,
- /*0x1f27,0x03b9*/ 46,
- /*0x1f26,0x03b9*/ 45,
- /*0x1f25,0x03b9*/ 44,
- /*0x1f24,0x03b9*/ 43,
- /*0x1f23,0x03b9*/ 42,
- /*0x1f22,0x03b9*/ 41,
- /*0x1f21,0x03b9*/ 40,
- /*0x1f20,0x03b9*/ 39,
- /*0x006a,0x030c*/ 5,
- /*0x1f02,0x03b9*/ 33,
- /*0x0074,0x0308*/ 8,
- /*0x1f04,0x03b9*/ 35,
- /*0x1f03,0x03b9*/ 34,
- /*0x1f01,0x03b9*/ 32,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- /*0x0565,0x0582*/ 25
- };
-
- if (codes[0] <= MAX_CODE_VALUE && codes[0] >= MIN_CODE_VALUE &&
- codes[1] <= MAX_CODE_VALUE && codes[1] >= MIN_CODE_VALUE)
- {
- register unsigned int key = onigenc_unicode_CaseUnfold_12_hash(codes);
-
- if (key <= MAX_HASH_VALUE)
- {
- register short s = wordlist[key];
-
- if (s >= 0 && code2_equal(codes, CaseUnfold_12_Table[s].from))
- return &CaseUnfold_12_Table[s].to;
- }
- }
- return 0;
-}
-
-static const CaseUnfold_13_Type CaseUnfold_13_Table[] = {
-#define CaseUnfold_13 (*(CaseUnfold_13_Type (*)[14])(CaseUnfold_13_Table+0))
- {{0x0066, 0x0066, 0x0069}, {1, {0xfb03}}},
- {{0x0066, 0x0066, 0x006c}, {1, {0xfb04}}},
- {{0x03b1, 0x0342, 0x03b9}, {1, {0x1fb7}}},
- {{0x03b7, 0x0342, 0x03b9}, {1, {0x1fc7}}},
- {{0x03b9, 0x0308, 0x0300}, {1, {0x1fd2}}},
- {{0x03b9, 0x0308, 0x0301}, {2, {0x0390, 0x1fd3}}},
- {{0x03b9, 0x0308, 0x0342}, {1, {0x1fd7}}},
- {{0x03c5, 0x0308, 0x0300}, {1, {0x1fe2}}},
- {{0x03c5, 0x0308, 0x0301}, {2, {0x03b0, 0x1fe3}}},
- {{0x03c5, 0x0308, 0x0342}, {1, {0x1fe7}}},
- {{0x03c5, 0x0313, 0x0300}, {1, {0x1f52}}},
- {{0x03c5, 0x0313, 0x0301}, {1, {0x1f54}}},
- {{0x03c5, 0x0313, 0x0342}, {1, {0x1f56}}},
- {{0x03c9, 0x0342, 0x03b9}, {1, {0x1ff7}}},
-};
-
-/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf -7 -k1,2,3,4,5,6,7,8,9 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_13_hash -N onigenc_unicode_CaseUnfold_13_lookup -n */
-
-/* maximum key range = 20, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-/*ARGSUSED*/
-static unsigned int
-onigenc_unicode_CaseUnfold_13_hash(const OnigCodePoint *codes)
-{
- static const unsigned char asso_values[] =
- {
- 7, 4, 47, 47, 47, 47, 1, 1, 2, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 1,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 11,
- 47, 47, 47, 47, 47, 10, 47, 2, 47, 47,
- 47, 47, 47, 47, 47, 47, 1, 47, 47, 1,
- 47, 47, 47, 9, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 1, 47, 47, 2, 47, 47, 1, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47
- };
- return asso_values[bits_at(codes, 8)] + asso_values[bits_at(codes, 7)] + asso_values[bits_at(codes, 6)] + asso_values[bits_at(codes, 5)] + asso_values[bits_at(codes, 4)] + asso_values[bits_at(codes, 3)] + asso_values[bits_at(codes, 2)] + asso_values[bits_at(codes, 1)] + asso_values[bits_at(codes, 0)];
-}
-
-static const CodePointList2 *
-onigenc_unicode_CaseUnfold_13_lookup(const OnigCodePoint *codes)
-{
- enum
- {
- MIN_CODE_VALUE = 0x66,
- MAX_CODE_VALUE = 0x3c9,
- TOTAL_KEYWORDS = 14,
- MIN_WORD_LENGTH = 9,
- MAX_WORD_LENGTH = 9,
- MIN_HASH_VALUE = 27,
- MAX_HASH_VALUE = 46
- };
-
- static const short wordlist[] =
- {
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- /*0x03c5,0x0313,0x0342*/ 12,
- /*0x03c5,0x0308,0x0342*/ 9,
- /*0x03b9,0x0308,0x0342*/ 6,
- /*0x03c5,0x0313,0x0301*/ 11,
- /*0x03c5,0x0308,0x0301*/ 8,
- /*0x03b9,0x0308,0x0301*/ 5,
- /*0x03c5,0x0313,0x0300*/ 10,
- /*0x03c5,0x0308,0x0300*/ 7,
- /*0x03b9,0x0308,0x0300*/ 4,
- /*0x03c9,0x0342,0x03b9*/ 13,
- /*0x03b7,0x0342,0x03b9*/ 3,
- /*0x03b1,0x0342,0x03b9*/ 2,
- -1, -1, -1, -1, -1, -1,
- /*0x0066,0x0066,0x006c*/ 1,
- /*0x0066,0x0066,0x0069*/ 0
- };
-
- if (codes[0] <= MAX_CODE_VALUE && codes[0] >= MIN_CODE_VALUE &&
- codes[1] <= MAX_CODE_VALUE && codes[1] >= MIN_CODE_VALUE &&
- codes[2] <= MAX_CODE_VALUE && codes[2] >= MIN_CODE_VALUE)
- {
- register unsigned int key = onigenc_unicode_CaseUnfold_13_hash(codes);
-
- if (key <= MAX_HASH_VALUE)
- {
- register short s = wordlist[key];
-
- if (s >= 0 && code3_equal(codes, CaseUnfold_13_Table[s].from))
- return &CaseUnfold_13_Table[s].to;
- }
- }
- return 0;
-}
-
-static const OnigCodePoint CaseMappingSpecials[] = {
- L(1)|0x039C,
- L(2)|0x0053, 0x0073, L(2)|0x0053, 0x0053,
- L(2)|0x02BC, 0x004E,
- L(1)|0x0053,
- L(1)|0x01C5,
- L(2)|0x0064, 0x017D, L(1)|0x01C4,
- L(1)|0x01C8,
- L(2)|0x006C, 0x004A, L(1)|0x01C7,
- L(1)|0x01CB,
- L(2)|0x006E, 0x004A, L(1)|0x01CA,
- L(2)|0x004A, 0x030C,
- L(1)|0x01F2,
- L(2)|0x0064, 0x005A, L(1)|0x01F1,
- L(1)|0x0399,
- L(3)|0x0399, 0x0308, 0x0301,
- L(3)|0x03A5, 0x0308, 0x0301,
- L(1)|0x03A3,
- L(1)|0x0392,
- L(1)|0x0398,
- L(1)|0x03A6,
- L(1)|0x03A0,
- L(1)|0x039A,
- L(1)|0x03A1,
- L(1)|0x0395,
- L(2)|0x0535, 0x0582, L(2)|0x0535, 0x0552,
- L(1)|0x0412,
- L(1)|0x0414,
- L(1)|0x041E,
- L(1)|0x0421,
- L(1)|0x0422,
- L(1)|0x0422,
- L(1)|0x042A,
- L(1)|0x0462,
- L(1)|0xA64A,
- L(2)|0x0048, 0x0331,
- L(2)|0x0054, 0x0308,
- L(2)|0x0057, 0x030A,
- L(2)|0x0059, 0x030A,
- L(2)|0x0041, 0x02BE,
- L(1)|0x1E60,
- L(1)|0x00DF,
- L(2)|0x03A5, 0x0313,
- L(3)|0x03A5, 0x0313, 0x0300,
- L(3)|0x03A5, 0x0313, 0x0301,
- L(3)|0x03A5, 0x0313, 0x0342,
- L(1)|0x1F88, L(2)|0x1F08, 0x0399,
- L(1)|0x1F89, L(2)|0x1F09, 0x0399,
- L(1)|0x1F8A, L(2)|0x1F0A, 0x0399,
- L(1)|0x1F8B, L(2)|0x1F0B, 0x0399,
- L(1)|0x1F8C, L(2)|0x1F0C, 0x0399,
- L(1)|0x1F8D, L(2)|0x1F0D, 0x0399,
- L(1)|0x1F8E, L(2)|0x1F0E, 0x0399,
- L(1)|0x1F8F, L(2)|0x1F0F, 0x0399,
- L(2)|0x1F00, 0x0399, L(1)|0x1F80, L(2)|0x1F08, 0x0399,
- L(2)|0x1F01, 0x0399, L(1)|0x1F81, L(2)|0x1F09, 0x0399,
- L(2)|0x1F02, 0x0399, L(1)|0x1F82, L(2)|0x1F0A, 0x0399,
- L(2)|0x1F03, 0x0399, L(1)|0x1F83, L(2)|0x1F0B, 0x0399,
- L(2)|0x1F04, 0x0399, L(1)|0x1F84, L(2)|0x1F0C, 0x0399,
- L(2)|0x1F05, 0x0399, L(1)|0x1F85, L(2)|0x1F0D, 0x0399,
- L(2)|0x1F06, 0x0399, L(1)|0x1F86, L(2)|0x1F0E, 0x0399,
- L(2)|0x1F07, 0x0399, L(1)|0x1F87, L(2)|0x1F0F, 0x0399,
- L(1)|0x1F98, L(2)|0x1F28, 0x0399,
- L(1)|0x1F99, L(2)|0x1F29, 0x0399,
- L(1)|0x1F9A, L(2)|0x1F2A, 0x0399,
- L(1)|0x1F9B, L(2)|0x1F2B, 0x0399,
- L(1)|0x1F9C, L(2)|0x1F2C, 0x0399,
- L(1)|0x1F9D, L(2)|0x1F2D, 0x0399,
- L(1)|0x1F9E, L(2)|0x1F2E, 0x0399,
- L(1)|0x1F9F, L(2)|0x1F2F, 0x0399,
- L(2)|0x1F20, 0x0399, L(1)|0x1F90, L(2)|0x1F28, 0x0399,
- L(2)|0x1F21, 0x0399, L(1)|0x1F91, L(2)|0x1F29, 0x0399,
- L(2)|0x1F22, 0x0399, L(1)|0x1F92, L(2)|0x1F2A, 0x0399,
- L(2)|0x1F23, 0x0399, L(1)|0x1F93, L(2)|0x1F2B, 0x0399,
- L(2)|0x1F24, 0x0399, L(1)|0x1F94, L(2)|0x1F2C, 0x0399,
- L(2)|0x1F25, 0x0399, L(1)|0x1F95, L(2)|0x1F2D, 0x0399,
- L(2)|0x1F26, 0x0399, L(1)|0x1F96, L(2)|0x1F2E, 0x0399,
- L(2)|0x1F27, 0x0399, L(1)|0x1F97, L(2)|0x1F2F, 0x0399,
- L(1)|0x1FA8, L(2)|0x1F68, 0x0399,
- L(1)|0x1FA9, L(2)|0x1F69, 0x0399,
- L(1)|0x1FAA, L(2)|0x1F6A, 0x0399,
- L(1)|0x1FAB, L(2)|0x1F6B, 0x0399,
- L(1)|0x1FAC, L(2)|0x1F6C, 0x0399,
- L(1)|0x1FAD, L(2)|0x1F6D, 0x0399,
- L(1)|0x1FAE, L(2)|0x1F6E, 0x0399,
- L(1)|0x1FAF, L(2)|0x1F6F, 0x0399,
- L(2)|0x1F60, 0x0399, L(1)|0x1FA0, L(2)|0x1F68, 0x0399,
- L(2)|0x1F61, 0x0399, L(1)|0x1FA1, L(2)|0x1F69, 0x0399,
- L(2)|0x1F62, 0x0399, L(1)|0x1FA2, L(2)|0x1F6A, 0x0399,
- L(2)|0x1F63, 0x0399, L(1)|0x1FA3, L(2)|0x1F6B, 0x0399,
- L(2)|0x1F64, 0x0399, L(1)|0x1FA4, L(2)|0x1F6C, 0x0399,
- L(2)|0x1F65, 0x0399, L(1)|0x1FA5, L(2)|0x1F6D, 0x0399,
- L(2)|0x1F66, 0x0399, L(1)|0x1FA6, L(2)|0x1F6E, 0x0399,
- L(2)|0x1F67, 0x0399, L(1)|0x1FA7, L(2)|0x1F6F, 0x0399,
- L(2)|0x1FBA, 0x0345, L(2)|0x1FBA, 0x0399,
- L(1)|0x1FBC, L(2)|0x0391, 0x0399,
- L(2)|0x0386, 0x0345, L(2)|0x0386, 0x0399,
- L(2)|0x0391, 0x0342,
- L(3)|0x0391, 0x0342, 0x0345, L(3)|0x0391, 0x0342, 0x0399,
- L(2)|0x03B1, 0x0399, L(1)|0x1FB3, L(2)|0x0391, 0x0399,
- L(1)|0x0399,
- L(2)|0x1FCA, 0x0345, L(2)|0x1FCA, 0x0399,
- L(1)|0x1FCC, L(2)|0x0397, 0x0399,
- L(2)|0x0389, 0x0345, L(2)|0x0389, 0x0399,
- L(2)|0x0397, 0x0342,
- L(3)|0x0397, 0x0342, 0x0345, L(3)|0x0397, 0x0342, 0x0399,
- L(2)|0x03B7, 0x0399, L(1)|0x1FC3, L(2)|0x0397, 0x0399,
- L(3)|0x0399, 0x0308, 0x0300,
- L(3)|0x0399, 0x0308, 0x0301,
- L(2)|0x0399, 0x0342,
- L(3)|0x0399, 0x0308, 0x0342,
- L(3)|0x03A5, 0x0308, 0x0300,
- L(3)|0x03A5, 0x0308, 0x0301,
- L(2)|0x03A1, 0x0313,
- L(2)|0x03A5, 0x0342,
- L(3)|0x03A5, 0x0308, 0x0342,
- L(2)|0x1FFA, 0x0345, L(2)|0x1FFA, 0x0399,
- L(1)|0x1FFC, L(2)|0x03A9, 0x0399,
- L(2)|0x038F, 0x0345, L(2)|0x038F, 0x0399,
- L(2)|0x03A9, 0x0342,
- L(3)|0x03A9, 0x0342, 0x0345, L(3)|0x03A9, 0x0342, 0x0399,
- L(2)|0x03C9, 0x0399, L(1)|0x1FF3, L(2)|0x03A9, 0x0399,
- L(2)|0x0046, 0x0066, L(2)|0x0046, 0x0046,
- L(2)|0x0046, 0x0069, L(2)|0x0046, 0x0049,
- L(2)|0x0046, 0x006C, L(2)|0x0046, 0x004C,
- L(3)|0x0046, 0x0066, 0x0069, L(3)|0x0046, 0x0046, 0x0049,
- L(3)|0x0046, 0x0066, 0x006C, L(3)|0x0046, 0x0046, 0x004C,
- L(2)|0x0053, 0x0074, L(2)|0x0053, 0x0054,
- L(2)|0x0053, 0x0074, L(2)|0x0053, 0x0054,
- L(2)|0x0544, 0x0576, L(2)|0x0544, 0x0546,
- L(2)|0x0544, 0x0565, L(2)|0x0544, 0x0535,
- L(2)|0x0544, 0x056B, L(2)|0x0544, 0x053B,
- L(2)|0x054E, 0x0576, L(2)|0x054E, 0x0546,
- L(2)|0x0544, 0x056D, L(2)|0x0544, 0x053D,
-};
diff --git a/enc/unicode/12.1.0/name2ctype.h b/enc/unicode/12.1.0/name2ctype.h
deleted file mode 100644
index b2270d5cac..0000000000
--- a/enc/unicode/12.1.0/name2ctype.h
+++ /dev/null
@@ -1,41810 +0,0 @@
-/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p */
-#ifndef USE_UNICODE_PROPERTIES
-/* Computed positions: -k'1,3' */
-#else /* USE_UNICODE_PROPERTIES */
-/* Computed positions: -k'1-3,5-6,12,16,$' */
-#endif /* USE_UNICODE_PROPERTIES */
-
-#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
- && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
- && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
- && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
- && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
- && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
- && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
- && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
- && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
- && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
- && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
- && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
- && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
- && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
- && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
- && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
- && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
- && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
- && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
- && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
- && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
- && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
-/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
-#endif
-
-
-
-/* 'NEWLINE': [[:NEWLINE:]] */
-static const OnigCodePoint CR_NEWLINE[] = {
- 1,
- 0x000a, 0x000a,
-}; /* CR_NEWLINE */
-
-/* 'Alpha': [[:Alpha:]] */
-static const OnigCodePoint CR_Alpha[] = {
- 679,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0345, 0x0345,
- 0x0370, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x05b0, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0610, 0x061a,
- 0x0620, 0x0657,
- 0x0659, 0x065f,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06e1, 0x06e8,
- 0x06ed, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x073f,
- 0x074d, 0x07b1,
- 0x07ca, 0x07ea,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x0800, 0x0817,
- 0x081a, 0x082c,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d4, 0x08df,
- 0x08e3, 0x08e9,
- 0x08f0, 0x093b,
- 0x093d, 0x094c,
- 0x094e, 0x0950,
- 0x0955, 0x0963,
- 0x0971, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x09ce, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09f0, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4c,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a70, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0af9, 0x0afc,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4c,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c80, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccc,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d7a, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e46,
- 0x0e4d, 0x0e4d,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ecd, 0x0ecd,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f81,
- 0x0f88, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x1000, 0x1036,
- 0x1038, 0x1038,
- 0x103b, 0x103f,
- 0x1050, 0x108f,
- 0x109a, 0x109d,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1713,
- 0x1720, 0x1733,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17c8,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dc,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x1938,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x1a00, 0x1a1b,
- 0x1a20, 0x1a5e,
- 0x1a61, 0x1a74,
- 0x1aa7, 0x1aa7,
- 0x1b00, 0x1b33,
- 0x1b35, 0x1b43,
- 0x1b45, 0x1b4b,
- 0x1b80, 0x1ba9,
- 0x1bac, 0x1baf,
- 0x1bba, 0x1be5,
- 0x1be7, 0x1bf1,
- 0x1c00, 0x1c36,
- 0x1c4d, 0x1c4f,
- 0x1c5a, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1de7, 0x1df4,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x24b6, 0x24e9,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2dff,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3007,
- 0x3021, 0x3029,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa61f,
- 0xa62a, 0xa62b,
- 0xa640, 0xa66e,
- 0xa674, 0xa67b,
- 0xa67f, 0xa6ef,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa805,
- 0xa807, 0xa827,
- 0xa840, 0xa873,
- 0xa880, 0xa8c3,
- 0xa8c5, 0xa8c5,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa8ff,
- 0xa90a, 0xa92a,
- 0xa930, 0xa952,
- 0xa960, 0xa97c,
- 0xa980, 0xa9b2,
- 0xa9b4, 0xa9bf,
- 0xa9cf, 0xa9cf,
- 0xa9e0, 0xa9ef,
- 0xa9fa, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaabe,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaef,
- 0xaaf2, 0xaaf5,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabea,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d27,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11045,
- 0x11082, 0x110b8,
- 0x110d0, 0x110e8,
- 0x11100, 0x11132,
- 0x11144, 0x11146,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11180, 0x111bf,
- 0x111c1, 0x111c4,
- 0x111da, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x11234,
- 0x11237, 0x11237,
- 0x1123e, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112e8,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134c,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11400, 0x11441,
- 0x11443, 0x11445,
- 0x11447, 0x1144a,
- 0x1145f, 0x1145f,
- 0x11480, 0x114c1,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x11580, 0x115b5,
- 0x115b8, 0x115be,
- 0x115d8, 0x115dd,
- 0x11600, 0x1163e,
- 0x11640, 0x11640,
- 0x11644, 0x11644,
- 0x11680, 0x116b5,
- 0x116b8, 0x116b8,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172a,
- 0x11800, 0x11838,
- 0x118a0, 0x118df,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119df,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e4,
- 0x11a00, 0x11a32,
- 0x11a35, 0x11a3e,
- 0x11a50, 0x11a97,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c3e,
- 0x11c40, 0x11c40,
- 0x11c72, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d41,
- 0x11d43, 0x11d43,
- 0x11d46, 0x11d47,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d96,
- 0x11d98, 0x11d98,
- 0x11ee0, 0x11ef6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b40, 0x16b43,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9e, 0x1bc9e,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e800, 0x1e8c4,
- 0x1e900, 0x1e943,
- 0x1e947, 0x1e947,
- 0x1e94b, 0x1e94b,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Alpha */
-
-/* 'Blank': [[:Blank:]] */
-static const OnigCodePoint CR_Blank[] = {
- 8,
- 0x0009, 0x0009,
- 0x0020, 0x0020,
- 0x00a0, 0x00a0,
- 0x1680, 0x1680,
- 0x2000, 0x200a,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000,
-}; /* CR_Blank */
-
-/* 'Cntrl': [[:Cntrl:]] */
-static const OnigCodePoint CR_Cntrl[] = {
- 2,
- 0x0000, 0x001f,
- 0x007f, 0x009f,
-}; /* CR_Cntrl */
-
-/* 'Digit': [[:Digit:]] */
-static const OnigCodePoint CR_Digit[] = {
- 59,
- 0x0030, 0x0039,
- 0x0660, 0x0669,
- 0x06f0, 0x06f9,
- 0x07c0, 0x07c9,
- 0x0966, 0x096f,
- 0x09e6, 0x09ef,
- 0x0a66, 0x0a6f,
- 0x0ae6, 0x0aef,
- 0x0b66, 0x0b6f,
- 0x0be6, 0x0bef,
- 0x0c66, 0x0c6f,
- 0x0ce6, 0x0cef,
- 0x0d66, 0x0d6f,
- 0x0de6, 0x0def,
- 0x0e50, 0x0e59,
- 0x0ed0, 0x0ed9,
- 0x0f20, 0x0f29,
- 0x1040, 0x1049,
- 0x1090, 0x1099,
- 0x17e0, 0x17e9,
- 0x1810, 0x1819,
- 0x1946, 0x194f,
- 0x19d0, 0x19d9,
- 0x1a80, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1b50, 0x1b59,
- 0x1bb0, 0x1bb9,
- 0x1c40, 0x1c49,
- 0x1c50, 0x1c59,
- 0xa620, 0xa629,
- 0xa8d0, 0xa8d9,
- 0xa900, 0xa909,
- 0xa9d0, 0xa9d9,
- 0xa9f0, 0xa9f9,
- 0xaa50, 0xaa59,
- 0xabf0, 0xabf9,
- 0xff10, 0xff19,
- 0x104a0, 0x104a9,
- 0x10d30, 0x10d39,
- 0x11066, 0x1106f,
- 0x110f0, 0x110f9,
- 0x11136, 0x1113f,
- 0x111d0, 0x111d9,
- 0x112f0, 0x112f9,
- 0x11450, 0x11459,
- 0x114d0, 0x114d9,
- 0x11650, 0x11659,
- 0x116c0, 0x116c9,
- 0x11730, 0x11739,
- 0x118e0, 0x118e9,
- 0x11c50, 0x11c59,
- 0x11d50, 0x11d59,
- 0x11da0, 0x11da9,
- 0x16a60, 0x16a69,
- 0x16b50, 0x16b59,
- 0x1d7ce, 0x1d7ff,
- 0x1e140, 0x1e149,
- 0x1e2f0, 0x1e2f9,
- 0x1e950, 0x1e959,
-}; /* CR_Digit */
-
-/* 'Graph': [[:Graph:]] */
-static const OnigCodePoint CR_Graph[] = {
- 671,
- 0x0021, 0x007e,
- 0x00a1, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x167f,
- 0x1681, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x200b, 0x2027,
- 0x202a, 0x202e,
- 0x2030, 0x205e,
- 0x2060, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3001, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xe000, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd,
-}; /* CR_Graph */
-
-/* 'Lower': [[:Lower:]] */
-static const OnigCodePoint CR_Lower[] = {
- 649,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00df, 0x00f6,
- 0x00f8, 0x00ff,
- 0x0101, 0x0101,
- 0x0103, 0x0103,
- 0x0105, 0x0105,
- 0x0107, 0x0107,
- 0x0109, 0x0109,
- 0x010b, 0x010b,
- 0x010d, 0x010d,
- 0x010f, 0x010f,
- 0x0111, 0x0111,
- 0x0113, 0x0113,
- 0x0115, 0x0115,
- 0x0117, 0x0117,
- 0x0119, 0x0119,
- 0x011b, 0x011b,
- 0x011d, 0x011d,
- 0x011f, 0x011f,
- 0x0121, 0x0121,
- 0x0123, 0x0123,
- 0x0125, 0x0125,
- 0x0127, 0x0127,
- 0x0129, 0x0129,
- 0x012b, 0x012b,
- 0x012d, 0x012d,
- 0x012f, 0x012f,
- 0x0131, 0x0131,
- 0x0133, 0x0133,
- 0x0135, 0x0135,
- 0x0137, 0x0138,
- 0x013a, 0x013a,
- 0x013c, 0x013c,
- 0x013e, 0x013e,
- 0x0140, 0x0140,
- 0x0142, 0x0142,
- 0x0144, 0x0144,
- 0x0146, 0x0146,
- 0x0148, 0x0149,
- 0x014b, 0x014b,
- 0x014d, 0x014d,
- 0x014f, 0x014f,
- 0x0151, 0x0151,
- 0x0153, 0x0153,
- 0x0155, 0x0155,
- 0x0157, 0x0157,
- 0x0159, 0x0159,
- 0x015b, 0x015b,
- 0x015d, 0x015d,
- 0x015f, 0x015f,
- 0x0161, 0x0161,
- 0x0163, 0x0163,
- 0x0165, 0x0165,
- 0x0167, 0x0167,
- 0x0169, 0x0169,
- 0x016b, 0x016b,
- 0x016d, 0x016d,
- 0x016f, 0x016f,
- 0x0171, 0x0171,
- 0x0173, 0x0173,
- 0x0175, 0x0175,
- 0x0177, 0x0177,
- 0x017a, 0x017a,
- 0x017c, 0x017c,
- 0x017e, 0x0180,
- 0x0183, 0x0183,
- 0x0185, 0x0185,
- 0x0188, 0x0188,
- 0x018c, 0x018d,
- 0x0192, 0x0192,
- 0x0195, 0x0195,
- 0x0199, 0x019b,
- 0x019e, 0x019e,
- 0x01a1, 0x01a1,
- 0x01a3, 0x01a3,
- 0x01a5, 0x01a5,
- 0x01a8, 0x01a8,
- 0x01aa, 0x01ab,
- 0x01ad, 0x01ad,
- 0x01b0, 0x01b0,
- 0x01b4, 0x01b4,
- 0x01b6, 0x01b6,
- 0x01b9, 0x01ba,
- 0x01bd, 0x01bf,
- 0x01c6, 0x01c6,
- 0x01c9, 0x01c9,
- 0x01cc, 0x01cc,
- 0x01ce, 0x01ce,
- 0x01d0, 0x01d0,
- 0x01d2, 0x01d2,
- 0x01d4, 0x01d4,
- 0x01d6, 0x01d6,
- 0x01d8, 0x01d8,
- 0x01da, 0x01da,
- 0x01dc, 0x01dd,
- 0x01df, 0x01df,
- 0x01e1, 0x01e1,
- 0x01e3, 0x01e3,
- 0x01e5, 0x01e5,
- 0x01e7, 0x01e7,
- 0x01e9, 0x01e9,
- 0x01eb, 0x01eb,
- 0x01ed, 0x01ed,
- 0x01ef, 0x01f0,
- 0x01f3, 0x01f3,
- 0x01f5, 0x01f5,
- 0x01f9, 0x01f9,
- 0x01fb, 0x01fb,
- 0x01fd, 0x01fd,
- 0x01ff, 0x01ff,
- 0x0201, 0x0201,
- 0x0203, 0x0203,
- 0x0205, 0x0205,
- 0x0207, 0x0207,
- 0x0209, 0x0209,
- 0x020b, 0x020b,
- 0x020d, 0x020d,
- 0x020f, 0x020f,
- 0x0211, 0x0211,
- 0x0213, 0x0213,
- 0x0215, 0x0215,
- 0x0217, 0x0217,
- 0x0219, 0x0219,
- 0x021b, 0x021b,
- 0x021d, 0x021d,
- 0x021f, 0x021f,
- 0x0221, 0x0221,
- 0x0223, 0x0223,
- 0x0225, 0x0225,
- 0x0227, 0x0227,
- 0x0229, 0x0229,
- 0x022b, 0x022b,
- 0x022d, 0x022d,
- 0x022f, 0x022f,
- 0x0231, 0x0231,
- 0x0233, 0x0239,
- 0x023c, 0x023c,
- 0x023f, 0x0240,
- 0x0242, 0x0242,
- 0x0247, 0x0247,
- 0x0249, 0x0249,
- 0x024b, 0x024b,
- 0x024d, 0x024d,
- 0x024f, 0x0293,
- 0x0295, 0x02b8,
- 0x02c0, 0x02c1,
- 0x02e0, 0x02e4,
- 0x0345, 0x0345,
- 0x0371, 0x0371,
- 0x0373, 0x0373,
- 0x0377, 0x0377,
- 0x037a, 0x037d,
- 0x0390, 0x0390,
- 0x03ac, 0x03ce,
- 0x03d0, 0x03d1,
- 0x03d5, 0x03d7,
- 0x03d9, 0x03d9,
- 0x03db, 0x03db,
- 0x03dd, 0x03dd,
- 0x03df, 0x03df,
- 0x03e1, 0x03e1,
- 0x03e3, 0x03e3,
- 0x03e5, 0x03e5,
- 0x03e7, 0x03e7,
- 0x03e9, 0x03e9,
- 0x03eb, 0x03eb,
- 0x03ed, 0x03ed,
- 0x03ef, 0x03f3,
- 0x03f5, 0x03f5,
- 0x03f8, 0x03f8,
- 0x03fb, 0x03fc,
- 0x0430, 0x045f,
- 0x0461, 0x0461,
- 0x0463, 0x0463,
- 0x0465, 0x0465,
- 0x0467, 0x0467,
- 0x0469, 0x0469,
- 0x046b, 0x046b,
- 0x046d, 0x046d,
- 0x046f, 0x046f,
- 0x0471, 0x0471,
- 0x0473, 0x0473,
- 0x0475, 0x0475,
- 0x0477, 0x0477,
- 0x0479, 0x0479,
- 0x047b, 0x047b,
- 0x047d, 0x047d,
- 0x047f, 0x047f,
- 0x0481, 0x0481,
- 0x048b, 0x048b,
- 0x048d, 0x048d,
- 0x048f, 0x048f,
- 0x0491, 0x0491,
- 0x0493, 0x0493,
- 0x0495, 0x0495,
- 0x0497, 0x0497,
- 0x0499, 0x0499,
- 0x049b, 0x049b,
- 0x049d, 0x049d,
- 0x049f, 0x049f,
- 0x04a1, 0x04a1,
- 0x04a3, 0x04a3,
- 0x04a5, 0x04a5,
- 0x04a7, 0x04a7,
- 0x04a9, 0x04a9,
- 0x04ab, 0x04ab,
- 0x04ad, 0x04ad,
- 0x04af, 0x04af,
- 0x04b1, 0x04b1,
- 0x04b3, 0x04b3,
- 0x04b5, 0x04b5,
- 0x04b7, 0x04b7,
- 0x04b9, 0x04b9,
- 0x04bb, 0x04bb,
- 0x04bd, 0x04bd,
- 0x04bf, 0x04bf,
- 0x04c2, 0x04c2,
- 0x04c4, 0x04c4,
- 0x04c6, 0x04c6,
- 0x04c8, 0x04c8,
- 0x04ca, 0x04ca,
- 0x04cc, 0x04cc,
- 0x04ce, 0x04cf,
- 0x04d1, 0x04d1,
- 0x04d3, 0x04d3,
- 0x04d5, 0x04d5,
- 0x04d7, 0x04d7,
- 0x04d9, 0x04d9,
- 0x04db, 0x04db,
- 0x04dd, 0x04dd,
- 0x04df, 0x04df,
- 0x04e1, 0x04e1,
- 0x04e3, 0x04e3,
- 0x04e5, 0x04e5,
- 0x04e7, 0x04e7,
- 0x04e9, 0x04e9,
- 0x04eb, 0x04eb,
- 0x04ed, 0x04ed,
- 0x04ef, 0x04ef,
- 0x04f1, 0x04f1,
- 0x04f3, 0x04f3,
- 0x04f5, 0x04f5,
- 0x04f7, 0x04f7,
- 0x04f9, 0x04f9,
- 0x04fb, 0x04fb,
- 0x04fd, 0x04fd,
- 0x04ff, 0x04ff,
- 0x0501, 0x0501,
- 0x0503, 0x0503,
- 0x0505, 0x0505,
- 0x0507, 0x0507,
- 0x0509, 0x0509,
- 0x050b, 0x050b,
- 0x050d, 0x050d,
- 0x050f, 0x050f,
- 0x0511, 0x0511,
- 0x0513, 0x0513,
- 0x0515, 0x0515,
- 0x0517, 0x0517,
- 0x0519, 0x0519,
- 0x051b, 0x051b,
- 0x051d, 0x051d,
- 0x051f, 0x051f,
- 0x0521, 0x0521,
- 0x0523, 0x0523,
- 0x0525, 0x0525,
- 0x0527, 0x0527,
- 0x0529, 0x0529,
- 0x052b, 0x052b,
- 0x052d, 0x052d,
- 0x052f, 0x052f,
- 0x0560, 0x0588,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1d00, 0x1dbf,
- 0x1e01, 0x1e01,
- 0x1e03, 0x1e03,
- 0x1e05, 0x1e05,
- 0x1e07, 0x1e07,
- 0x1e09, 0x1e09,
- 0x1e0b, 0x1e0b,
- 0x1e0d, 0x1e0d,
- 0x1e0f, 0x1e0f,
- 0x1e11, 0x1e11,
- 0x1e13, 0x1e13,
- 0x1e15, 0x1e15,
- 0x1e17, 0x1e17,
- 0x1e19, 0x1e19,
- 0x1e1b, 0x1e1b,
- 0x1e1d, 0x1e1d,
- 0x1e1f, 0x1e1f,
- 0x1e21, 0x1e21,
- 0x1e23, 0x1e23,
- 0x1e25, 0x1e25,
- 0x1e27, 0x1e27,
- 0x1e29, 0x1e29,
- 0x1e2b, 0x1e2b,
- 0x1e2d, 0x1e2d,
- 0x1e2f, 0x1e2f,
- 0x1e31, 0x1e31,
- 0x1e33, 0x1e33,
- 0x1e35, 0x1e35,
- 0x1e37, 0x1e37,
- 0x1e39, 0x1e39,
- 0x1e3b, 0x1e3b,
- 0x1e3d, 0x1e3d,
- 0x1e3f, 0x1e3f,
- 0x1e41, 0x1e41,
- 0x1e43, 0x1e43,
- 0x1e45, 0x1e45,
- 0x1e47, 0x1e47,
- 0x1e49, 0x1e49,
- 0x1e4b, 0x1e4b,
- 0x1e4d, 0x1e4d,
- 0x1e4f, 0x1e4f,
- 0x1e51, 0x1e51,
- 0x1e53, 0x1e53,
- 0x1e55, 0x1e55,
- 0x1e57, 0x1e57,
- 0x1e59, 0x1e59,
- 0x1e5b, 0x1e5b,
- 0x1e5d, 0x1e5d,
- 0x1e5f, 0x1e5f,
- 0x1e61, 0x1e61,
- 0x1e63, 0x1e63,
- 0x1e65, 0x1e65,
- 0x1e67, 0x1e67,
- 0x1e69, 0x1e69,
- 0x1e6b, 0x1e6b,
- 0x1e6d, 0x1e6d,
- 0x1e6f, 0x1e6f,
- 0x1e71, 0x1e71,
- 0x1e73, 0x1e73,
- 0x1e75, 0x1e75,
- 0x1e77, 0x1e77,
- 0x1e79, 0x1e79,
- 0x1e7b, 0x1e7b,
- 0x1e7d, 0x1e7d,
- 0x1e7f, 0x1e7f,
- 0x1e81, 0x1e81,
- 0x1e83, 0x1e83,
- 0x1e85, 0x1e85,
- 0x1e87, 0x1e87,
- 0x1e89, 0x1e89,
- 0x1e8b, 0x1e8b,
- 0x1e8d, 0x1e8d,
- 0x1e8f, 0x1e8f,
- 0x1e91, 0x1e91,
- 0x1e93, 0x1e93,
- 0x1e95, 0x1e9d,
- 0x1e9f, 0x1e9f,
- 0x1ea1, 0x1ea1,
- 0x1ea3, 0x1ea3,
- 0x1ea5, 0x1ea5,
- 0x1ea7, 0x1ea7,
- 0x1ea9, 0x1ea9,
- 0x1eab, 0x1eab,
- 0x1ead, 0x1ead,
- 0x1eaf, 0x1eaf,
- 0x1eb1, 0x1eb1,
- 0x1eb3, 0x1eb3,
- 0x1eb5, 0x1eb5,
- 0x1eb7, 0x1eb7,
- 0x1eb9, 0x1eb9,
- 0x1ebb, 0x1ebb,
- 0x1ebd, 0x1ebd,
- 0x1ebf, 0x1ebf,
- 0x1ec1, 0x1ec1,
- 0x1ec3, 0x1ec3,
- 0x1ec5, 0x1ec5,
- 0x1ec7, 0x1ec7,
- 0x1ec9, 0x1ec9,
- 0x1ecb, 0x1ecb,
- 0x1ecd, 0x1ecd,
- 0x1ecf, 0x1ecf,
- 0x1ed1, 0x1ed1,
- 0x1ed3, 0x1ed3,
- 0x1ed5, 0x1ed5,
- 0x1ed7, 0x1ed7,
- 0x1ed9, 0x1ed9,
- 0x1edb, 0x1edb,
- 0x1edd, 0x1edd,
- 0x1edf, 0x1edf,
- 0x1ee1, 0x1ee1,
- 0x1ee3, 0x1ee3,
- 0x1ee5, 0x1ee5,
- 0x1ee7, 0x1ee7,
- 0x1ee9, 0x1ee9,
- 0x1eeb, 0x1eeb,
- 0x1eed, 0x1eed,
- 0x1eef, 0x1eef,
- 0x1ef1, 0x1ef1,
- 0x1ef3, 0x1ef3,
- 0x1ef5, 0x1ef5,
- 0x1ef7, 0x1ef7,
- 0x1ef9, 0x1ef9,
- 0x1efb, 0x1efb,
- 0x1efd, 0x1efd,
- 0x1eff, 0x1f07,
- 0x1f10, 0x1f15,
- 0x1f20, 0x1f27,
- 0x1f30, 0x1f37,
- 0x1f40, 0x1f45,
- 0x1f50, 0x1f57,
- 0x1f60, 0x1f67,
- 0x1f70, 0x1f7d,
- 0x1f80, 0x1f87,
- 0x1f90, 0x1f97,
- 0x1fa0, 0x1fa7,
- 0x1fb0, 0x1fb4,
- 0x1fb6, 0x1fb7,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fc7,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fd7,
- 0x1fe0, 0x1fe7,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ff7,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x210a, 0x210a,
- 0x210e, 0x210f,
- 0x2113, 0x2113,
- 0x212f, 0x212f,
- 0x2134, 0x2134,
- 0x2139, 0x2139,
- 0x213c, 0x213d,
- 0x2146, 0x2149,
- 0x214e, 0x214e,
- 0x2170, 0x217f,
- 0x2184, 0x2184,
- 0x24d0, 0x24e9,
- 0x2c30, 0x2c5e,
- 0x2c61, 0x2c61,
- 0x2c65, 0x2c66,
- 0x2c68, 0x2c68,
- 0x2c6a, 0x2c6a,
- 0x2c6c, 0x2c6c,
- 0x2c71, 0x2c71,
- 0x2c73, 0x2c74,
- 0x2c76, 0x2c7d,
- 0x2c81, 0x2c81,
- 0x2c83, 0x2c83,
- 0x2c85, 0x2c85,
- 0x2c87, 0x2c87,
- 0x2c89, 0x2c89,
- 0x2c8b, 0x2c8b,
- 0x2c8d, 0x2c8d,
- 0x2c8f, 0x2c8f,
- 0x2c91, 0x2c91,
- 0x2c93, 0x2c93,
- 0x2c95, 0x2c95,
- 0x2c97, 0x2c97,
- 0x2c99, 0x2c99,
- 0x2c9b, 0x2c9b,
- 0x2c9d, 0x2c9d,
- 0x2c9f, 0x2c9f,
- 0x2ca1, 0x2ca1,
- 0x2ca3, 0x2ca3,
- 0x2ca5, 0x2ca5,
- 0x2ca7, 0x2ca7,
- 0x2ca9, 0x2ca9,
- 0x2cab, 0x2cab,
- 0x2cad, 0x2cad,
- 0x2caf, 0x2caf,
- 0x2cb1, 0x2cb1,
- 0x2cb3, 0x2cb3,
- 0x2cb5, 0x2cb5,
- 0x2cb7, 0x2cb7,
- 0x2cb9, 0x2cb9,
- 0x2cbb, 0x2cbb,
- 0x2cbd, 0x2cbd,
- 0x2cbf, 0x2cbf,
- 0x2cc1, 0x2cc1,
- 0x2cc3, 0x2cc3,
- 0x2cc5, 0x2cc5,
- 0x2cc7, 0x2cc7,
- 0x2cc9, 0x2cc9,
- 0x2ccb, 0x2ccb,
- 0x2ccd, 0x2ccd,
- 0x2ccf, 0x2ccf,
- 0x2cd1, 0x2cd1,
- 0x2cd3, 0x2cd3,
- 0x2cd5, 0x2cd5,
- 0x2cd7, 0x2cd7,
- 0x2cd9, 0x2cd9,
- 0x2cdb, 0x2cdb,
- 0x2cdd, 0x2cdd,
- 0x2cdf, 0x2cdf,
- 0x2ce1, 0x2ce1,
- 0x2ce3, 0x2ce4,
- 0x2cec, 0x2cec,
- 0x2cee, 0x2cee,
- 0x2cf3, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa641, 0xa641,
- 0xa643, 0xa643,
- 0xa645, 0xa645,
- 0xa647, 0xa647,
- 0xa649, 0xa649,
- 0xa64b, 0xa64b,
- 0xa64d, 0xa64d,
- 0xa64f, 0xa64f,
- 0xa651, 0xa651,
- 0xa653, 0xa653,
- 0xa655, 0xa655,
- 0xa657, 0xa657,
- 0xa659, 0xa659,
- 0xa65b, 0xa65b,
- 0xa65d, 0xa65d,
- 0xa65f, 0xa65f,
- 0xa661, 0xa661,
- 0xa663, 0xa663,
- 0xa665, 0xa665,
- 0xa667, 0xa667,
- 0xa669, 0xa669,
- 0xa66b, 0xa66b,
- 0xa66d, 0xa66d,
- 0xa681, 0xa681,
- 0xa683, 0xa683,
- 0xa685, 0xa685,
- 0xa687, 0xa687,
- 0xa689, 0xa689,
- 0xa68b, 0xa68b,
- 0xa68d, 0xa68d,
- 0xa68f, 0xa68f,
- 0xa691, 0xa691,
- 0xa693, 0xa693,
- 0xa695, 0xa695,
- 0xa697, 0xa697,
- 0xa699, 0xa699,
- 0xa69b, 0xa69d,
- 0xa723, 0xa723,
- 0xa725, 0xa725,
- 0xa727, 0xa727,
- 0xa729, 0xa729,
- 0xa72b, 0xa72b,
- 0xa72d, 0xa72d,
- 0xa72f, 0xa731,
- 0xa733, 0xa733,
- 0xa735, 0xa735,
- 0xa737, 0xa737,
- 0xa739, 0xa739,
- 0xa73b, 0xa73b,
- 0xa73d, 0xa73d,
- 0xa73f, 0xa73f,
- 0xa741, 0xa741,
- 0xa743, 0xa743,
- 0xa745, 0xa745,
- 0xa747, 0xa747,
- 0xa749, 0xa749,
- 0xa74b, 0xa74b,
- 0xa74d, 0xa74d,
- 0xa74f, 0xa74f,
- 0xa751, 0xa751,
- 0xa753, 0xa753,
- 0xa755, 0xa755,
- 0xa757, 0xa757,
- 0xa759, 0xa759,
- 0xa75b, 0xa75b,
- 0xa75d, 0xa75d,
- 0xa75f, 0xa75f,
- 0xa761, 0xa761,
- 0xa763, 0xa763,
- 0xa765, 0xa765,
- 0xa767, 0xa767,
- 0xa769, 0xa769,
- 0xa76b, 0xa76b,
- 0xa76d, 0xa76d,
- 0xa76f, 0xa778,
- 0xa77a, 0xa77a,
- 0xa77c, 0xa77c,
- 0xa77f, 0xa77f,
- 0xa781, 0xa781,
- 0xa783, 0xa783,
- 0xa785, 0xa785,
- 0xa787, 0xa787,
- 0xa78c, 0xa78c,
- 0xa78e, 0xa78e,
- 0xa791, 0xa791,
- 0xa793, 0xa795,
- 0xa797, 0xa797,
- 0xa799, 0xa799,
- 0xa79b, 0xa79b,
- 0xa79d, 0xa79d,
- 0xa79f, 0xa79f,
- 0xa7a1, 0xa7a1,
- 0xa7a3, 0xa7a3,
- 0xa7a5, 0xa7a5,
- 0xa7a7, 0xa7a7,
- 0xa7a9, 0xa7a9,
- 0xa7af, 0xa7af,
- 0xa7b5, 0xa7b5,
- 0xa7b7, 0xa7b7,
- 0xa7b9, 0xa7b9,
- 0xa7bb, 0xa7bb,
- 0xa7bd, 0xa7bd,
- 0xa7bf, 0xa7bf,
- 0xa7c3, 0xa7c3,
- 0xa7f8, 0xa7fa,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff41, 0xff5a,
- 0x10428, 0x1044f,
- 0x104d8, 0x104fb,
- 0x10cc0, 0x10cf2,
- 0x118c0, 0x118df,
- 0x16e60, 0x16e7f,
- 0x1d41a, 0x1d433,
- 0x1d44e, 0x1d454,
- 0x1d456, 0x1d467,
- 0x1d482, 0x1d49b,
- 0x1d4b6, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d4cf,
- 0x1d4ea, 0x1d503,
- 0x1d51e, 0x1d537,
- 0x1d552, 0x1d56b,
- 0x1d586, 0x1d59f,
- 0x1d5ba, 0x1d5d3,
- 0x1d5ee, 0x1d607,
- 0x1d622, 0x1d63b,
- 0x1d656, 0x1d66f,
- 0x1d68a, 0x1d6a5,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6e1,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d71b,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d755,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d78f,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x1d7cb, 0x1d7cb,
- 0x1e922, 0x1e943,
-}; /* CR_Lower */
-
-/* 'Print': [[:Print:]] */
-static const OnigCodePoint CR_Print[] = {
- 668,
- 0x0020, 0x007e,
- 0x00a0, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2027,
- 0x202a, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xe000, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd,
-}; /* CR_Print */
-
-/* 'XPosixPunct': [[:Punct:]] */
-static const OnigCodePoint CR_XPosixPunct[] = {
- 177,
- 0x0021, 0x002f,
- 0x003a, 0x0040,
- 0x005b, 0x0060,
- 0x007b, 0x007e,
- 0x00a1, 0x00a1,
- 0x00a7, 0x00a7,
- 0x00ab, 0x00ab,
- 0x00b6, 0x00b7,
- 0x00bb, 0x00bb,
- 0x00bf, 0x00bf,
- 0x037e, 0x037e,
- 0x0387, 0x0387,
- 0x055a, 0x055f,
- 0x0589, 0x058a,
- 0x05be, 0x05be,
- 0x05c0, 0x05c0,
- 0x05c3, 0x05c3,
- 0x05c6, 0x05c6,
- 0x05f3, 0x05f4,
- 0x0609, 0x060a,
- 0x060c, 0x060d,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x066a, 0x066d,
- 0x06d4, 0x06d4,
- 0x0700, 0x070d,
- 0x07f7, 0x07f9,
- 0x0830, 0x083e,
- 0x085e, 0x085e,
- 0x0964, 0x0965,
- 0x0970, 0x0970,
- 0x09fd, 0x09fd,
- 0x0a76, 0x0a76,
- 0x0af0, 0x0af0,
- 0x0c77, 0x0c77,
- 0x0c84, 0x0c84,
- 0x0df4, 0x0df4,
- 0x0e4f, 0x0e4f,
- 0x0e5a, 0x0e5b,
- 0x0f04, 0x0f12,
- 0x0f14, 0x0f14,
- 0x0f3a, 0x0f3d,
- 0x0f85, 0x0f85,
- 0x0fd0, 0x0fd4,
- 0x0fd9, 0x0fda,
- 0x104a, 0x104f,
- 0x10fb, 0x10fb,
- 0x1360, 0x1368,
- 0x1400, 0x1400,
- 0x166e, 0x166e,
- 0x169b, 0x169c,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x17d4, 0x17d6,
- 0x17d8, 0x17da,
- 0x1800, 0x180a,
- 0x1944, 0x1945,
- 0x1a1e, 0x1a1f,
- 0x1aa0, 0x1aa6,
- 0x1aa8, 0x1aad,
- 0x1b5a, 0x1b60,
- 0x1bfc, 0x1bff,
- 0x1c3b, 0x1c3f,
- 0x1c7e, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd3, 0x1cd3,
- 0x2010, 0x2027,
- 0x2030, 0x2043,
- 0x2045, 0x2051,
- 0x2053, 0x205e,
- 0x207d, 0x207e,
- 0x208d, 0x208e,
- 0x2308, 0x230b,
- 0x2329, 0x232a,
- 0x2768, 0x2775,
- 0x27c5, 0x27c6,
- 0x27e6, 0x27ef,
- 0x2983, 0x2998,
- 0x29d8, 0x29db,
- 0x29fc, 0x29fd,
- 0x2cf9, 0x2cfc,
- 0x2cfe, 0x2cff,
- 0x2d70, 0x2d70,
- 0x2e00, 0x2e2e,
- 0x2e30, 0x2e4f,
- 0x3001, 0x3003,
- 0x3008, 0x3011,
- 0x3014, 0x301f,
- 0x3030, 0x3030,
- 0x303d, 0x303d,
- 0x30a0, 0x30a0,
- 0x30fb, 0x30fb,
- 0xa4fe, 0xa4ff,
- 0xa60d, 0xa60f,
- 0xa673, 0xa673,
- 0xa67e, 0xa67e,
- 0xa6f2, 0xa6f7,
- 0xa874, 0xa877,
- 0xa8ce, 0xa8cf,
- 0xa8f8, 0xa8fa,
- 0xa8fc, 0xa8fc,
- 0xa92e, 0xa92f,
- 0xa95f, 0xa95f,
- 0xa9c1, 0xa9cd,
- 0xa9de, 0xa9df,
- 0xaa5c, 0xaa5f,
- 0xaade, 0xaadf,
- 0xaaf0, 0xaaf1,
- 0xabeb, 0xabeb,
- 0xfd3e, 0xfd3f,
- 0xfe10, 0xfe19,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe61,
- 0xfe63, 0xfe63,
- 0xfe68, 0xfe68,
- 0xfe6a, 0xfe6b,
- 0xff01, 0xff03,
- 0xff05, 0xff0a,
- 0xff0c, 0xff0f,
- 0xff1a, 0xff1b,
- 0xff1f, 0xff20,
- 0xff3b, 0xff3d,
- 0xff3f, 0xff3f,
- 0xff5b, 0xff5b,
- 0xff5d, 0xff5d,
- 0xff5f, 0xff65,
- 0x10100, 0x10102,
- 0x1039f, 0x1039f,
- 0x103d0, 0x103d0,
- 0x1056f, 0x1056f,
- 0x10857, 0x10857,
- 0x1091f, 0x1091f,
- 0x1093f, 0x1093f,
- 0x10a50, 0x10a58,
- 0x10a7f, 0x10a7f,
- 0x10af0, 0x10af6,
- 0x10b39, 0x10b3f,
- 0x10b99, 0x10b9c,
- 0x10f55, 0x10f59,
- 0x11047, 0x1104d,
- 0x110bb, 0x110bc,
- 0x110be, 0x110c1,
- 0x11140, 0x11143,
- 0x11174, 0x11175,
- 0x111c5, 0x111c8,
- 0x111cd, 0x111cd,
- 0x111db, 0x111db,
- 0x111dd, 0x111df,
- 0x11238, 0x1123d,
- 0x112a9, 0x112a9,
- 0x1144b, 0x1144f,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x114c6, 0x114c6,
- 0x115c1, 0x115d7,
- 0x11641, 0x11643,
- 0x11660, 0x1166c,
- 0x1173c, 0x1173e,
- 0x1183b, 0x1183b,
- 0x119e2, 0x119e2,
- 0x11a3f, 0x11a46,
- 0x11a9a, 0x11a9c,
- 0x11a9e, 0x11aa2,
- 0x11c41, 0x11c45,
- 0x11c70, 0x11c71,
- 0x11ef7, 0x11ef8,
- 0x11fff, 0x11fff,
- 0x12470, 0x12474,
- 0x16a6e, 0x16a6f,
- 0x16af5, 0x16af5,
- 0x16b37, 0x16b3b,
- 0x16b44, 0x16b44,
- 0x16e97, 0x16e9a,
- 0x16fe2, 0x16fe2,
- 0x1bc9f, 0x1bc9f,
- 0x1da87, 0x1da8b,
- 0x1e95e, 0x1e95f,
-}; /* CR_XPosixPunct */
-
-/* 'Space': [[:Space:]] */
-static const OnigCodePoint CR_Space[] = {
- 10,
- 0x0009, 0x000d,
- 0x0020, 0x0020,
- 0x0085, 0x0085,
- 0x00a0, 0x00a0,
- 0x1680, 0x1680,
- 0x2000, 0x200a,
- 0x2028, 0x2029,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000,
-}; /* CR_Space */
-
-/* 'Upper': [[:Upper:]] */
-static const OnigCodePoint CR_Upper[] = {
- 641,
- 0x0041, 0x005a,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00de,
- 0x0100, 0x0100,
- 0x0102, 0x0102,
- 0x0104, 0x0104,
- 0x0106, 0x0106,
- 0x0108, 0x0108,
- 0x010a, 0x010a,
- 0x010c, 0x010c,
- 0x010e, 0x010e,
- 0x0110, 0x0110,
- 0x0112, 0x0112,
- 0x0114, 0x0114,
- 0x0116, 0x0116,
- 0x0118, 0x0118,
- 0x011a, 0x011a,
- 0x011c, 0x011c,
- 0x011e, 0x011e,
- 0x0120, 0x0120,
- 0x0122, 0x0122,
- 0x0124, 0x0124,
- 0x0126, 0x0126,
- 0x0128, 0x0128,
- 0x012a, 0x012a,
- 0x012c, 0x012c,
- 0x012e, 0x012e,
- 0x0130, 0x0130,
- 0x0132, 0x0132,
- 0x0134, 0x0134,
- 0x0136, 0x0136,
- 0x0139, 0x0139,
- 0x013b, 0x013b,
- 0x013d, 0x013d,
- 0x013f, 0x013f,
- 0x0141, 0x0141,
- 0x0143, 0x0143,
- 0x0145, 0x0145,
- 0x0147, 0x0147,
- 0x014a, 0x014a,
- 0x014c, 0x014c,
- 0x014e, 0x014e,
- 0x0150, 0x0150,
- 0x0152, 0x0152,
- 0x0154, 0x0154,
- 0x0156, 0x0156,
- 0x0158, 0x0158,
- 0x015a, 0x015a,
- 0x015c, 0x015c,
- 0x015e, 0x015e,
- 0x0160, 0x0160,
- 0x0162, 0x0162,
- 0x0164, 0x0164,
- 0x0166, 0x0166,
- 0x0168, 0x0168,
- 0x016a, 0x016a,
- 0x016c, 0x016c,
- 0x016e, 0x016e,
- 0x0170, 0x0170,
- 0x0172, 0x0172,
- 0x0174, 0x0174,
- 0x0176, 0x0176,
- 0x0178, 0x0179,
- 0x017b, 0x017b,
- 0x017d, 0x017d,
- 0x0181, 0x0182,
- 0x0184, 0x0184,
- 0x0186, 0x0187,
- 0x0189, 0x018b,
- 0x018e, 0x0191,
- 0x0193, 0x0194,
- 0x0196, 0x0198,
- 0x019c, 0x019d,
- 0x019f, 0x01a0,
- 0x01a2, 0x01a2,
- 0x01a4, 0x01a4,
- 0x01a6, 0x01a7,
- 0x01a9, 0x01a9,
- 0x01ac, 0x01ac,
- 0x01ae, 0x01af,
- 0x01b1, 0x01b3,
- 0x01b5, 0x01b5,
- 0x01b7, 0x01b8,
- 0x01bc, 0x01bc,
- 0x01c4, 0x01c4,
- 0x01c7, 0x01c7,
- 0x01ca, 0x01ca,
- 0x01cd, 0x01cd,
- 0x01cf, 0x01cf,
- 0x01d1, 0x01d1,
- 0x01d3, 0x01d3,
- 0x01d5, 0x01d5,
- 0x01d7, 0x01d7,
- 0x01d9, 0x01d9,
- 0x01db, 0x01db,
- 0x01de, 0x01de,
- 0x01e0, 0x01e0,
- 0x01e2, 0x01e2,
- 0x01e4, 0x01e4,
- 0x01e6, 0x01e6,
- 0x01e8, 0x01e8,
- 0x01ea, 0x01ea,
- 0x01ec, 0x01ec,
- 0x01ee, 0x01ee,
- 0x01f1, 0x01f1,
- 0x01f4, 0x01f4,
- 0x01f6, 0x01f8,
- 0x01fa, 0x01fa,
- 0x01fc, 0x01fc,
- 0x01fe, 0x01fe,
- 0x0200, 0x0200,
- 0x0202, 0x0202,
- 0x0204, 0x0204,
- 0x0206, 0x0206,
- 0x0208, 0x0208,
- 0x020a, 0x020a,
- 0x020c, 0x020c,
- 0x020e, 0x020e,
- 0x0210, 0x0210,
- 0x0212, 0x0212,
- 0x0214, 0x0214,
- 0x0216, 0x0216,
- 0x0218, 0x0218,
- 0x021a, 0x021a,
- 0x021c, 0x021c,
- 0x021e, 0x021e,
- 0x0220, 0x0220,
- 0x0222, 0x0222,
- 0x0224, 0x0224,
- 0x0226, 0x0226,
- 0x0228, 0x0228,
- 0x022a, 0x022a,
- 0x022c, 0x022c,
- 0x022e, 0x022e,
- 0x0230, 0x0230,
- 0x0232, 0x0232,
- 0x023a, 0x023b,
- 0x023d, 0x023e,
- 0x0241, 0x0241,
- 0x0243, 0x0246,
- 0x0248, 0x0248,
- 0x024a, 0x024a,
- 0x024c, 0x024c,
- 0x024e, 0x024e,
- 0x0370, 0x0370,
- 0x0372, 0x0372,
- 0x0376, 0x0376,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x038f,
- 0x0391, 0x03a1,
- 0x03a3, 0x03ab,
- 0x03cf, 0x03cf,
- 0x03d2, 0x03d4,
- 0x03d8, 0x03d8,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03e2,
- 0x03e4, 0x03e4,
- 0x03e6, 0x03e6,
- 0x03e8, 0x03e8,
- 0x03ea, 0x03ea,
- 0x03ec, 0x03ec,
- 0x03ee, 0x03ee,
- 0x03f4, 0x03f4,
- 0x03f7, 0x03f7,
- 0x03f9, 0x03fa,
- 0x03fd, 0x042f,
- 0x0460, 0x0460,
- 0x0462, 0x0462,
- 0x0464, 0x0464,
- 0x0466, 0x0466,
- 0x0468, 0x0468,
- 0x046a, 0x046a,
- 0x046c, 0x046c,
- 0x046e, 0x046e,
- 0x0470, 0x0470,
- 0x0472, 0x0472,
- 0x0474, 0x0474,
- 0x0476, 0x0476,
- 0x0478, 0x0478,
- 0x047a, 0x047a,
- 0x047c, 0x047c,
- 0x047e, 0x047e,
- 0x0480, 0x0480,
- 0x048a, 0x048a,
- 0x048c, 0x048c,
- 0x048e, 0x048e,
- 0x0490, 0x0490,
- 0x0492, 0x0492,
- 0x0494, 0x0494,
- 0x0496, 0x0496,
- 0x0498, 0x0498,
- 0x049a, 0x049a,
- 0x049c, 0x049c,
- 0x049e, 0x049e,
- 0x04a0, 0x04a0,
- 0x04a2, 0x04a2,
- 0x04a4, 0x04a4,
- 0x04a6, 0x04a6,
- 0x04a8, 0x04a8,
- 0x04aa, 0x04aa,
- 0x04ac, 0x04ac,
- 0x04ae, 0x04ae,
- 0x04b0, 0x04b0,
- 0x04b2, 0x04b2,
- 0x04b4, 0x04b4,
- 0x04b6, 0x04b6,
- 0x04b8, 0x04b8,
- 0x04ba, 0x04ba,
- 0x04bc, 0x04bc,
- 0x04be, 0x04be,
- 0x04c0, 0x04c1,
- 0x04c3, 0x04c3,
- 0x04c5, 0x04c5,
- 0x04c7, 0x04c7,
- 0x04c9, 0x04c9,
- 0x04cb, 0x04cb,
- 0x04cd, 0x04cd,
- 0x04d0, 0x04d0,
- 0x04d2, 0x04d2,
- 0x04d4, 0x04d4,
- 0x04d6, 0x04d6,
- 0x04d8, 0x04d8,
- 0x04da, 0x04da,
- 0x04dc, 0x04dc,
- 0x04de, 0x04de,
- 0x04e0, 0x04e0,
- 0x04e2, 0x04e2,
- 0x04e4, 0x04e4,
- 0x04e6, 0x04e6,
- 0x04e8, 0x04e8,
- 0x04ea, 0x04ea,
- 0x04ec, 0x04ec,
- 0x04ee, 0x04ee,
- 0x04f0, 0x04f0,
- 0x04f2, 0x04f2,
- 0x04f4, 0x04f4,
- 0x04f6, 0x04f6,
- 0x04f8, 0x04f8,
- 0x04fa, 0x04fa,
- 0x04fc, 0x04fc,
- 0x04fe, 0x04fe,
- 0x0500, 0x0500,
- 0x0502, 0x0502,
- 0x0504, 0x0504,
- 0x0506, 0x0506,
- 0x0508, 0x0508,
- 0x050a, 0x050a,
- 0x050c, 0x050c,
- 0x050e, 0x050e,
- 0x0510, 0x0510,
- 0x0512, 0x0512,
- 0x0514, 0x0514,
- 0x0516, 0x0516,
- 0x0518, 0x0518,
- 0x051a, 0x051a,
- 0x051c, 0x051c,
- 0x051e, 0x051e,
- 0x0520, 0x0520,
- 0x0522, 0x0522,
- 0x0524, 0x0524,
- 0x0526, 0x0526,
- 0x0528, 0x0528,
- 0x052a, 0x052a,
- 0x052c, 0x052c,
- 0x052e, 0x052e,
- 0x0531, 0x0556,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x13a0, 0x13f5,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1e00, 0x1e00,
- 0x1e02, 0x1e02,
- 0x1e04, 0x1e04,
- 0x1e06, 0x1e06,
- 0x1e08, 0x1e08,
- 0x1e0a, 0x1e0a,
- 0x1e0c, 0x1e0c,
- 0x1e0e, 0x1e0e,
- 0x1e10, 0x1e10,
- 0x1e12, 0x1e12,
- 0x1e14, 0x1e14,
- 0x1e16, 0x1e16,
- 0x1e18, 0x1e18,
- 0x1e1a, 0x1e1a,
- 0x1e1c, 0x1e1c,
- 0x1e1e, 0x1e1e,
- 0x1e20, 0x1e20,
- 0x1e22, 0x1e22,
- 0x1e24, 0x1e24,
- 0x1e26, 0x1e26,
- 0x1e28, 0x1e28,
- 0x1e2a, 0x1e2a,
- 0x1e2c, 0x1e2c,
- 0x1e2e, 0x1e2e,
- 0x1e30, 0x1e30,
- 0x1e32, 0x1e32,
- 0x1e34, 0x1e34,
- 0x1e36, 0x1e36,
- 0x1e38, 0x1e38,
- 0x1e3a, 0x1e3a,
- 0x1e3c, 0x1e3c,
- 0x1e3e, 0x1e3e,
- 0x1e40, 0x1e40,
- 0x1e42, 0x1e42,
- 0x1e44, 0x1e44,
- 0x1e46, 0x1e46,
- 0x1e48, 0x1e48,
- 0x1e4a, 0x1e4a,
- 0x1e4c, 0x1e4c,
- 0x1e4e, 0x1e4e,
- 0x1e50, 0x1e50,
- 0x1e52, 0x1e52,
- 0x1e54, 0x1e54,
- 0x1e56, 0x1e56,
- 0x1e58, 0x1e58,
- 0x1e5a, 0x1e5a,
- 0x1e5c, 0x1e5c,
- 0x1e5e, 0x1e5e,
- 0x1e60, 0x1e60,
- 0x1e62, 0x1e62,
- 0x1e64, 0x1e64,
- 0x1e66, 0x1e66,
- 0x1e68, 0x1e68,
- 0x1e6a, 0x1e6a,
- 0x1e6c, 0x1e6c,
- 0x1e6e, 0x1e6e,
- 0x1e70, 0x1e70,
- 0x1e72, 0x1e72,
- 0x1e74, 0x1e74,
- 0x1e76, 0x1e76,
- 0x1e78, 0x1e78,
- 0x1e7a, 0x1e7a,
- 0x1e7c, 0x1e7c,
- 0x1e7e, 0x1e7e,
- 0x1e80, 0x1e80,
- 0x1e82, 0x1e82,
- 0x1e84, 0x1e84,
- 0x1e86, 0x1e86,
- 0x1e88, 0x1e88,
- 0x1e8a, 0x1e8a,
- 0x1e8c, 0x1e8c,
- 0x1e8e, 0x1e8e,
- 0x1e90, 0x1e90,
- 0x1e92, 0x1e92,
- 0x1e94, 0x1e94,
- 0x1e9e, 0x1e9e,
- 0x1ea0, 0x1ea0,
- 0x1ea2, 0x1ea2,
- 0x1ea4, 0x1ea4,
- 0x1ea6, 0x1ea6,
- 0x1ea8, 0x1ea8,
- 0x1eaa, 0x1eaa,
- 0x1eac, 0x1eac,
- 0x1eae, 0x1eae,
- 0x1eb0, 0x1eb0,
- 0x1eb2, 0x1eb2,
- 0x1eb4, 0x1eb4,
- 0x1eb6, 0x1eb6,
- 0x1eb8, 0x1eb8,
- 0x1eba, 0x1eba,
- 0x1ebc, 0x1ebc,
- 0x1ebe, 0x1ebe,
- 0x1ec0, 0x1ec0,
- 0x1ec2, 0x1ec2,
- 0x1ec4, 0x1ec4,
- 0x1ec6, 0x1ec6,
- 0x1ec8, 0x1ec8,
- 0x1eca, 0x1eca,
- 0x1ecc, 0x1ecc,
- 0x1ece, 0x1ece,
- 0x1ed0, 0x1ed0,
- 0x1ed2, 0x1ed2,
- 0x1ed4, 0x1ed4,
- 0x1ed6, 0x1ed6,
- 0x1ed8, 0x1ed8,
- 0x1eda, 0x1eda,
- 0x1edc, 0x1edc,
- 0x1ede, 0x1ede,
- 0x1ee0, 0x1ee0,
- 0x1ee2, 0x1ee2,
- 0x1ee4, 0x1ee4,
- 0x1ee6, 0x1ee6,
- 0x1ee8, 0x1ee8,
- 0x1eea, 0x1eea,
- 0x1eec, 0x1eec,
- 0x1eee, 0x1eee,
- 0x1ef0, 0x1ef0,
- 0x1ef2, 0x1ef2,
- 0x1ef4, 0x1ef4,
- 0x1ef6, 0x1ef6,
- 0x1ef8, 0x1ef8,
- 0x1efa, 0x1efa,
- 0x1efc, 0x1efc,
- 0x1efe, 0x1efe,
- 0x1f08, 0x1f0f,
- 0x1f18, 0x1f1d,
- 0x1f28, 0x1f2f,
- 0x1f38, 0x1f3f,
- 0x1f48, 0x1f4d,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f5f,
- 0x1f68, 0x1f6f,
- 0x1fb8, 0x1fbb,
- 0x1fc8, 0x1fcb,
- 0x1fd8, 0x1fdb,
- 0x1fe8, 0x1fec,
- 0x1ff8, 0x1ffb,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210b, 0x210d,
- 0x2110, 0x2112,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x2130, 0x2133,
- 0x213e, 0x213f,
- 0x2145, 0x2145,
- 0x2160, 0x216f,
- 0x2183, 0x2183,
- 0x24b6, 0x24cf,
- 0x2c00, 0x2c2e,
- 0x2c60, 0x2c60,
- 0x2c62, 0x2c64,
- 0x2c67, 0x2c67,
- 0x2c69, 0x2c69,
- 0x2c6b, 0x2c6b,
- 0x2c6d, 0x2c70,
- 0x2c72, 0x2c72,
- 0x2c75, 0x2c75,
- 0x2c7e, 0x2c80,
- 0x2c82, 0x2c82,
- 0x2c84, 0x2c84,
- 0x2c86, 0x2c86,
- 0x2c88, 0x2c88,
- 0x2c8a, 0x2c8a,
- 0x2c8c, 0x2c8c,
- 0x2c8e, 0x2c8e,
- 0x2c90, 0x2c90,
- 0x2c92, 0x2c92,
- 0x2c94, 0x2c94,
- 0x2c96, 0x2c96,
- 0x2c98, 0x2c98,
- 0x2c9a, 0x2c9a,
- 0x2c9c, 0x2c9c,
- 0x2c9e, 0x2c9e,
- 0x2ca0, 0x2ca0,
- 0x2ca2, 0x2ca2,
- 0x2ca4, 0x2ca4,
- 0x2ca6, 0x2ca6,
- 0x2ca8, 0x2ca8,
- 0x2caa, 0x2caa,
- 0x2cac, 0x2cac,
- 0x2cae, 0x2cae,
- 0x2cb0, 0x2cb0,
- 0x2cb2, 0x2cb2,
- 0x2cb4, 0x2cb4,
- 0x2cb6, 0x2cb6,
- 0x2cb8, 0x2cb8,
- 0x2cba, 0x2cba,
- 0x2cbc, 0x2cbc,
- 0x2cbe, 0x2cbe,
- 0x2cc0, 0x2cc0,
- 0x2cc2, 0x2cc2,
- 0x2cc4, 0x2cc4,
- 0x2cc6, 0x2cc6,
- 0x2cc8, 0x2cc8,
- 0x2cca, 0x2cca,
- 0x2ccc, 0x2ccc,
- 0x2cce, 0x2cce,
- 0x2cd0, 0x2cd0,
- 0x2cd2, 0x2cd2,
- 0x2cd4, 0x2cd4,
- 0x2cd6, 0x2cd6,
- 0x2cd8, 0x2cd8,
- 0x2cda, 0x2cda,
- 0x2cdc, 0x2cdc,
- 0x2cde, 0x2cde,
- 0x2ce0, 0x2ce0,
- 0x2ce2, 0x2ce2,
- 0x2ceb, 0x2ceb,
- 0x2ced, 0x2ced,
- 0x2cf2, 0x2cf2,
- 0xa640, 0xa640,
- 0xa642, 0xa642,
- 0xa644, 0xa644,
- 0xa646, 0xa646,
- 0xa648, 0xa648,
- 0xa64a, 0xa64a,
- 0xa64c, 0xa64c,
- 0xa64e, 0xa64e,
- 0xa650, 0xa650,
- 0xa652, 0xa652,
- 0xa654, 0xa654,
- 0xa656, 0xa656,
- 0xa658, 0xa658,
- 0xa65a, 0xa65a,
- 0xa65c, 0xa65c,
- 0xa65e, 0xa65e,
- 0xa660, 0xa660,
- 0xa662, 0xa662,
- 0xa664, 0xa664,
- 0xa666, 0xa666,
- 0xa668, 0xa668,
- 0xa66a, 0xa66a,
- 0xa66c, 0xa66c,
- 0xa680, 0xa680,
- 0xa682, 0xa682,
- 0xa684, 0xa684,
- 0xa686, 0xa686,
- 0xa688, 0xa688,
- 0xa68a, 0xa68a,
- 0xa68c, 0xa68c,
- 0xa68e, 0xa68e,
- 0xa690, 0xa690,
- 0xa692, 0xa692,
- 0xa694, 0xa694,
- 0xa696, 0xa696,
- 0xa698, 0xa698,
- 0xa69a, 0xa69a,
- 0xa722, 0xa722,
- 0xa724, 0xa724,
- 0xa726, 0xa726,
- 0xa728, 0xa728,
- 0xa72a, 0xa72a,
- 0xa72c, 0xa72c,
- 0xa72e, 0xa72e,
- 0xa732, 0xa732,
- 0xa734, 0xa734,
- 0xa736, 0xa736,
- 0xa738, 0xa738,
- 0xa73a, 0xa73a,
- 0xa73c, 0xa73c,
- 0xa73e, 0xa73e,
- 0xa740, 0xa740,
- 0xa742, 0xa742,
- 0xa744, 0xa744,
- 0xa746, 0xa746,
- 0xa748, 0xa748,
- 0xa74a, 0xa74a,
- 0xa74c, 0xa74c,
- 0xa74e, 0xa74e,
- 0xa750, 0xa750,
- 0xa752, 0xa752,
- 0xa754, 0xa754,
- 0xa756, 0xa756,
- 0xa758, 0xa758,
- 0xa75a, 0xa75a,
- 0xa75c, 0xa75c,
- 0xa75e, 0xa75e,
- 0xa760, 0xa760,
- 0xa762, 0xa762,
- 0xa764, 0xa764,
- 0xa766, 0xa766,
- 0xa768, 0xa768,
- 0xa76a, 0xa76a,
- 0xa76c, 0xa76c,
- 0xa76e, 0xa76e,
- 0xa779, 0xa779,
- 0xa77b, 0xa77b,
- 0xa77d, 0xa77e,
- 0xa780, 0xa780,
- 0xa782, 0xa782,
- 0xa784, 0xa784,
- 0xa786, 0xa786,
- 0xa78b, 0xa78b,
- 0xa78d, 0xa78d,
- 0xa790, 0xa790,
- 0xa792, 0xa792,
- 0xa796, 0xa796,
- 0xa798, 0xa798,
- 0xa79a, 0xa79a,
- 0xa79c, 0xa79c,
- 0xa79e, 0xa79e,
- 0xa7a0, 0xa7a0,
- 0xa7a2, 0xa7a2,
- 0xa7a4, 0xa7a4,
- 0xa7a6, 0xa7a6,
- 0xa7a8, 0xa7a8,
- 0xa7aa, 0xa7ae,
- 0xa7b0, 0xa7b4,
- 0xa7b6, 0xa7b6,
- 0xa7b8, 0xa7b8,
- 0xa7ba, 0xa7ba,
- 0xa7bc, 0xa7bc,
- 0xa7be, 0xa7be,
- 0xa7c2, 0xa7c2,
- 0xa7c4, 0xa7c6,
- 0xff21, 0xff3a,
- 0x10400, 0x10427,
- 0x104b0, 0x104d3,
- 0x10c80, 0x10cb2,
- 0x118a0, 0x118bf,
- 0x16e40, 0x16e5f,
- 0x1d400, 0x1d419,
- 0x1d434, 0x1d44d,
- 0x1d468, 0x1d481,
- 0x1d49c, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b5,
- 0x1d4d0, 0x1d4e9,
- 0x1d504, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d538, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d56c, 0x1d585,
- 0x1d5a0, 0x1d5b9,
- 0x1d5d4, 0x1d5ed,
- 0x1d608, 0x1d621,
- 0x1d63c, 0x1d655,
- 0x1d670, 0x1d689,
- 0x1d6a8, 0x1d6c0,
- 0x1d6e2, 0x1d6fa,
- 0x1d71c, 0x1d734,
- 0x1d756, 0x1d76e,
- 0x1d790, 0x1d7a8,
- 0x1d7ca, 0x1d7ca,
- 0x1e900, 0x1e921,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
-}; /* CR_Upper */
-
-/* 'XDigit': [[:XDigit:]] */
-static const OnigCodePoint CR_XDigit[] = {
- 3,
- 0x0030, 0x0039,
- 0x0041, 0x0046,
- 0x0061, 0x0066,
-}; /* CR_XDigit */
-
-/* 'Word': [[:Word:]] */
-static const OnigCodePoint CR_Word[] = {
- 716,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x005f, 0x005f,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0300, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x0483, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0610, 0x061a,
- 0x0620, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06df, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07f5,
- 0x07fa, 0x07fa,
- 0x07fd, 0x07fd,
- 0x0800, 0x082d,
- 0x0840, 0x085b,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0963,
- 0x0966, 0x096f,
- 0x0971, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x09fc, 0x09fc,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bef,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c80, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d54, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d66, 0x0d6f,
- 0x0d7a, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f29,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1049,
- 0x1050, 0x109d,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x135f,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19d9,
- 0x1a00, 0x1a1b,
- 0x1a20, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa7, 0x1aa7,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b59,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1bf3,
- 0x1c00, 0x1c37,
- 0x1c40, 0x1c49,
- 0x1c4d, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x203f, 0x2040,
- 0x2054, 0x2054,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x20d0, 0x20f0,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x24b6, 0x24e9,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2dff,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3007,
- 0x3021, 0x302f,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa62b,
- 0xa640, 0xa672,
- 0xa674, 0xa67d,
- 0xa67f, 0xa6f1,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa827,
- 0xa840, 0xa873,
- 0xa880, 0xa8c5,
- 0xa8d0, 0xa8d9,
- 0xa8e0, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa92d,
- 0xa930, 0xa953,
- 0xa960, 0xa97c,
- 0xa980, 0xa9c0,
- 0xa9cf, 0xa9d9,
- 0xa9e0, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaef,
- 0xaaf2, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabea,
- 0xabec, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0xfe33, 0xfe34,
- 0xfe4d, 0xfe4f,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff3f, 0xff3f,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x101fd, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102e0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae6,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f50,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11046,
- 0x11066, 0x1106f,
- 0x1107f, 0x110ba,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x1113f,
- 0x11144, 0x11146,
- 0x11150, 0x11173,
- 0x11176, 0x11176,
- 0x11180, 0x111c4,
- 0x111c9, 0x111cc,
- 0x111d0, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x11237,
- 0x1123e, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x1144a,
- 0x11450, 0x11459,
- 0x1145e, 0x1145f,
- 0x11480, 0x114c5,
- 0x114c7, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115c0,
- 0x115d8, 0x115dd,
- 0x11600, 0x11640,
- 0x11644, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x11739,
- 0x11800, 0x1183a,
- 0x118a0, 0x118e9,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e1,
- 0x119e3, 0x119e4,
- 0x11a00, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a50, 0x11a99,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c40,
- 0x11c50, 0x11c59,
- 0x11c72, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af4,
- 0x16b00, 0x16b36,
- 0x16b40, 0x16b43,
- 0x16b50, 0x16b59,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2f9,
- 0x1e800, 0x1e8c4,
- 0x1e8d0, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef,
-}; /* CR_Word */
-
-/* 'Alnum': [[:Alnum:]] */
-static const OnigCodePoint CR_Alnum[] = {
- 715,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0345, 0x0345,
- 0x0370, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x05b0, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0610, 0x061a,
- 0x0620, 0x0657,
- 0x0659, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06e1, 0x06e8,
- 0x06ed, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x073f,
- 0x074d, 0x07b1,
- 0x07c0, 0x07ea,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x0800, 0x0817,
- 0x081a, 0x082c,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d4, 0x08df,
- 0x08e3, 0x08e9,
- 0x08f0, 0x093b,
- 0x093d, 0x094c,
- 0x094e, 0x0950,
- 0x0955, 0x0963,
- 0x0966, 0x096f,
- 0x0971, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x09ce, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4c,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af9, 0x0afc,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bef,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4c,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c80, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccc,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d66, 0x0d6f,
- 0x0d7a, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e46,
- 0x0e4d, 0x0e4d,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ecd, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f20, 0x0f29,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f81,
- 0x0f88, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x1000, 0x1036,
- 0x1038, 0x1038,
- 0x103b, 0x1049,
- 0x1050, 0x109d,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1713,
- 0x1720, 0x1733,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17b3,
- 0x17b6, 0x17c8,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dc,
- 0x17e0, 0x17e9,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x1938,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19d9,
- 0x1a00, 0x1a1b,
- 0x1a20, 0x1a5e,
- 0x1a61, 0x1a74,
- 0x1a80, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa7, 0x1aa7,
- 0x1b00, 0x1b33,
- 0x1b35, 0x1b43,
- 0x1b45, 0x1b4b,
- 0x1b50, 0x1b59,
- 0x1b80, 0x1ba9,
- 0x1bac, 0x1be5,
- 0x1be7, 0x1bf1,
- 0x1c00, 0x1c36,
- 0x1c40, 0x1c49,
- 0x1c4d, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1de7, 0x1df4,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x24b6, 0x24e9,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2dff,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3007,
- 0x3021, 0x3029,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa62b,
- 0xa640, 0xa66e,
- 0xa674, 0xa67b,
- 0xa67f, 0xa6ef,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa805,
- 0xa807, 0xa827,
- 0xa840, 0xa873,
- 0xa880, 0xa8c3,
- 0xa8c5, 0xa8c5,
- 0xa8d0, 0xa8d9,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa92a,
- 0xa930, 0xa952,
- 0xa960, 0xa97c,
- 0xa980, 0xa9b2,
- 0xa9b4, 0xa9bf,
- 0xa9cf, 0xa9d9,
- 0xa9e0, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaabe,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaef,
- 0xaaf2, 0xaaf5,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabea,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11045,
- 0x11066, 0x1106f,
- 0x11082, 0x110b8,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11132,
- 0x11136, 0x1113f,
- 0x11144, 0x11146,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11180, 0x111bf,
- 0x111c1, 0x111c4,
- 0x111d0, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x11234,
- 0x11237, 0x11237,
- 0x1123e, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112e8,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134c,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11400, 0x11441,
- 0x11443, 0x11445,
- 0x11447, 0x1144a,
- 0x11450, 0x11459,
- 0x1145f, 0x1145f,
- 0x11480, 0x114c1,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115be,
- 0x115d8, 0x115dd,
- 0x11600, 0x1163e,
- 0x11640, 0x11640,
- 0x11644, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b5,
- 0x116b8, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172a,
- 0x11730, 0x11739,
- 0x11800, 0x11838,
- 0x118a0, 0x118e9,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119df,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e4,
- 0x11a00, 0x11a32,
- 0x11a35, 0x11a3e,
- 0x11a50, 0x11a97,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c3e,
- 0x11c40, 0x11c40,
- 0x11c50, 0x11c59,
- 0x11c72, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d41,
- 0x11d43, 0x11d43,
- 0x11d46, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d96,
- 0x11d98, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b40, 0x16b43,
- 0x16b50, 0x16b59,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9e, 0x1bc9e,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e2f0, 0x1e2f9,
- 0x1e800, 0x1e8c4,
- 0x1e900, 0x1e943,
- 0x1e947, 0x1e947,
- 0x1e94b, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Alnum */
-
-/* 'ASCII': [[:ASCII:]] */
-static const OnigCodePoint CR_ASCII[] = {
- 1,
- 0x0000, 0x007f,
-}; /* CR_ASCII */
-
-/* 'Punct' */
-static const OnigCodePoint CR_Punct[] = {
- 182,
- 0x0021, 0x0023,
- 0x0025, 0x002a,
- 0x002c, 0x002f,
- 0x003a, 0x003b,
- 0x003f, 0x0040,
- 0x005b, 0x005d,
- 0x005f, 0x005f,
- 0x007b, 0x007b,
- 0x007d, 0x007d,
- 0x00a1, 0x00a1,
- 0x00a7, 0x00a7,
- 0x00ab, 0x00ab,
- 0x00b6, 0x00b7,
- 0x00bb, 0x00bb,
- 0x00bf, 0x00bf,
- 0x037e, 0x037e,
- 0x0387, 0x0387,
- 0x055a, 0x055f,
- 0x0589, 0x058a,
- 0x05be, 0x05be,
- 0x05c0, 0x05c0,
- 0x05c3, 0x05c3,
- 0x05c6, 0x05c6,
- 0x05f3, 0x05f4,
- 0x0609, 0x060a,
- 0x060c, 0x060d,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x066a, 0x066d,
- 0x06d4, 0x06d4,
- 0x0700, 0x070d,
- 0x07f7, 0x07f9,
- 0x0830, 0x083e,
- 0x085e, 0x085e,
- 0x0964, 0x0965,
- 0x0970, 0x0970,
- 0x09fd, 0x09fd,
- 0x0a76, 0x0a76,
- 0x0af0, 0x0af0,
- 0x0c77, 0x0c77,
- 0x0c84, 0x0c84,
- 0x0df4, 0x0df4,
- 0x0e4f, 0x0e4f,
- 0x0e5a, 0x0e5b,
- 0x0f04, 0x0f12,
- 0x0f14, 0x0f14,
- 0x0f3a, 0x0f3d,
- 0x0f85, 0x0f85,
- 0x0fd0, 0x0fd4,
- 0x0fd9, 0x0fda,
- 0x104a, 0x104f,
- 0x10fb, 0x10fb,
- 0x1360, 0x1368,
- 0x1400, 0x1400,
- 0x166e, 0x166e,
- 0x169b, 0x169c,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x17d4, 0x17d6,
- 0x17d8, 0x17da,
- 0x1800, 0x180a,
- 0x1944, 0x1945,
- 0x1a1e, 0x1a1f,
- 0x1aa0, 0x1aa6,
- 0x1aa8, 0x1aad,
- 0x1b5a, 0x1b60,
- 0x1bfc, 0x1bff,
- 0x1c3b, 0x1c3f,
- 0x1c7e, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd3, 0x1cd3,
- 0x2010, 0x2027,
- 0x2030, 0x2043,
- 0x2045, 0x2051,
- 0x2053, 0x205e,
- 0x207d, 0x207e,
- 0x208d, 0x208e,
- 0x2308, 0x230b,
- 0x2329, 0x232a,
- 0x2768, 0x2775,
- 0x27c5, 0x27c6,
- 0x27e6, 0x27ef,
- 0x2983, 0x2998,
- 0x29d8, 0x29db,
- 0x29fc, 0x29fd,
- 0x2cf9, 0x2cfc,
- 0x2cfe, 0x2cff,
- 0x2d70, 0x2d70,
- 0x2e00, 0x2e2e,
- 0x2e30, 0x2e4f,
- 0x3001, 0x3003,
- 0x3008, 0x3011,
- 0x3014, 0x301f,
- 0x3030, 0x3030,
- 0x303d, 0x303d,
- 0x30a0, 0x30a0,
- 0x30fb, 0x30fb,
- 0xa4fe, 0xa4ff,
- 0xa60d, 0xa60f,
- 0xa673, 0xa673,
- 0xa67e, 0xa67e,
- 0xa6f2, 0xa6f7,
- 0xa874, 0xa877,
- 0xa8ce, 0xa8cf,
- 0xa8f8, 0xa8fa,
- 0xa8fc, 0xa8fc,
- 0xa92e, 0xa92f,
- 0xa95f, 0xa95f,
- 0xa9c1, 0xa9cd,
- 0xa9de, 0xa9df,
- 0xaa5c, 0xaa5f,
- 0xaade, 0xaadf,
- 0xaaf0, 0xaaf1,
- 0xabeb, 0xabeb,
- 0xfd3e, 0xfd3f,
- 0xfe10, 0xfe19,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe61,
- 0xfe63, 0xfe63,
- 0xfe68, 0xfe68,
- 0xfe6a, 0xfe6b,
- 0xff01, 0xff03,
- 0xff05, 0xff0a,
- 0xff0c, 0xff0f,
- 0xff1a, 0xff1b,
- 0xff1f, 0xff20,
- 0xff3b, 0xff3d,
- 0xff3f, 0xff3f,
- 0xff5b, 0xff5b,
- 0xff5d, 0xff5d,
- 0xff5f, 0xff65,
- 0x10100, 0x10102,
- 0x1039f, 0x1039f,
- 0x103d0, 0x103d0,
- 0x1056f, 0x1056f,
- 0x10857, 0x10857,
- 0x1091f, 0x1091f,
- 0x1093f, 0x1093f,
- 0x10a50, 0x10a58,
- 0x10a7f, 0x10a7f,
- 0x10af0, 0x10af6,
- 0x10b39, 0x10b3f,
- 0x10b99, 0x10b9c,
- 0x10f55, 0x10f59,
- 0x11047, 0x1104d,
- 0x110bb, 0x110bc,
- 0x110be, 0x110c1,
- 0x11140, 0x11143,
- 0x11174, 0x11175,
- 0x111c5, 0x111c8,
- 0x111cd, 0x111cd,
- 0x111db, 0x111db,
- 0x111dd, 0x111df,
- 0x11238, 0x1123d,
- 0x112a9, 0x112a9,
- 0x1144b, 0x1144f,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x114c6, 0x114c6,
- 0x115c1, 0x115d7,
- 0x11641, 0x11643,
- 0x11660, 0x1166c,
- 0x1173c, 0x1173e,
- 0x1183b, 0x1183b,
- 0x119e2, 0x119e2,
- 0x11a3f, 0x11a46,
- 0x11a9a, 0x11a9c,
- 0x11a9e, 0x11aa2,
- 0x11c41, 0x11c45,
- 0x11c70, 0x11c71,
- 0x11ef7, 0x11ef8,
- 0x11fff, 0x11fff,
- 0x12470, 0x12474,
- 0x16a6e, 0x16a6f,
- 0x16af5, 0x16af5,
- 0x16b37, 0x16b3b,
- 0x16b44, 0x16b44,
- 0x16e97, 0x16e9a,
- 0x16fe2, 0x16fe2,
- 0x1bc9f, 0x1bc9f,
- 0x1da87, 0x1da8b,
- 0x1e95e, 0x1e95f,
-}; /* CR_Punct */
-
-#ifdef USE_UNICODE_PROPERTIES
-/* 'Any': - */
-static const OnigCodePoint CR_Any[] = {
- 1,
- 0x0000, 0x10ffff,
-}; /* CR_Any */
-
-/* 'Assigned': - */
-static const OnigCodePoint CR_Assigned[] = {
- 666,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd,
-}; /* CR_Assigned */
-
-/* 'C': Major Category */
-static const OnigCodePoint CR_C[] = {
- 668,
- 0x0000, 0x001f,
- 0x007f, 0x009f,
- 0x00ad, 0x00ad,
- 0x0378, 0x0379,
- 0x0380, 0x0383,
- 0x038b, 0x038b,
- 0x038d, 0x038d,
- 0x03a2, 0x03a2,
- 0x0530, 0x0530,
- 0x0557, 0x0558,
- 0x058b, 0x058c,
- 0x0590, 0x0590,
- 0x05c8, 0x05cf,
- 0x05eb, 0x05ee,
- 0x05f5, 0x0605,
- 0x061c, 0x061d,
- 0x06dd, 0x06dd,
- 0x070e, 0x070f,
- 0x074b, 0x074c,
- 0x07b2, 0x07bf,
- 0x07fb, 0x07fc,
- 0x082e, 0x082f,
- 0x083f, 0x083f,
- 0x085c, 0x085d,
- 0x085f, 0x085f,
- 0x086b, 0x089f,
- 0x08b5, 0x08b5,
- 0x08be, 0x08d2,
- 0x08e2, 0x08e2,
- 0x0984, 0x0984,
- 0x098d, 0x098e,
- 0x0991, 0x0992,
- 0x09a9, 0x09a9,
- 0x09b1, 0x09b1,
- 0x09b3, 0x09b5,
- 0x09ba, 0x09bb,
- 0x09c5, 0x09c6,
- 0x09c9, 0x09ca,
- 0x09cf, 0x09d6,
- 0x09d8, 0x09db,
- 0x09de, 0x09de,
- 0x09e4, 0x09e5,
- 0x09ff, 0x0a00,
- 0x0a04, 0x0a04,
- 0x0a0b, 0x0a0e,
- 0x0a11, 0x0a12,
- 0x0a29, 0x0a29,
- 0x0a31, 0x0a31,
- 0x0a34, 0x0a34,
- 0x0a37, 0x0a37,
- 0x0a3a, 0x0a3b,
- 0x0a3d, 0x0a3d,
- 0x0a43, 0x0a46,
- 0x0a49, 0x0a4a,
- 0x0a4e, 0x0a50,
- 0x0a52, 0x0a58,
- 0x0a5d, 0x0a5d,
- 0x0a5f, 0x0a65,
- 0x0a77, 0x0a80,
- 0x0a84, 0x0a84,
- 0x0a8e, 0x0a8e,
- 0x0a92, 0x0a92,
- 0x0aa9, 0x0aa9,
- 0x0ab1, 0x0ab1,
- 0x0ab4, 0x0ab4,
- 0x0aba, 0x0abb,
- 0x0ac6, 0x0ac6,
- 0x0aca, 0x0aca,
- 0x0ace, 0x0acf,
- 0x0ad1, 0x0adf,
- 0x0ae4, 0x0ae5,
- 0x0af2, 0x0af8,
- 0x0b00, 0x0b00,
- 0x0b04, 0x0b04,
- 0x0b0d, 0x0b0e,
- 0x0b11, 0x0b12,
- 0x0b29, 0x0b29,
- 0x0b31, 0x0b31,
- 0x0b34, 0x0b34,
- 0x0b3a, 0x0b3b,
- 0x0b45, 0x0b46,
- 0x0b49, 0x0b4a,
- 0x0b4e, 0x0b55,
- 0x0b58, 0x0b5b,
- 0x0b5e, 0x0b5e,
- 0x0b64, 0x0b65,
- 0x0b78, 0x0b81,
- 0x0b84, 0x0b84,
- 0x0b8b, 0x0b8d,
- 0x0b91, 0x0b91,
- 0x0b96, 0x0b98,
- 0x0b9b, 0x0b9b,
- 0x0b9d, 0x0b9d,
- 0x0ba0, 0x0ba2,
- 0x0ba5, 0x0ba7,
- 0x0bab, 0x0bad,
- 0x0bba, 0x0bbd,
- 0x0bc3, 0x0bc5,
- 0x0bc9, 0x0bc9,
- 0x0bce, 0x0bcf,
- 0x0bd1, 0x0bd6,
- 0x0bd8, 0x0be5,
- 0x0bfb, 0x0bff,
- 0x0c0d, 0x0c0d,
- 0x0c11, 0x0c11,
- 0x0c29, 0x0c29,
- 0x0c3a, 0x0c3c,
- 0x0c45, 0x0c45,
- 0x0c49, 0x0c49,
- 0x0c4e, 0x0c54,
- 0x0c57, 0x0c57,
- 0x0c5b, 0x0c5f,
- 0x0c64, 0x0c65,
- 0x0c70, 0x0c76,
- 0x0c8d, 0x0c8d,
- 0x0c91, 0x0c91,
- 0x0ca9, 0x0ca9,
- 0x0cb4, 0x0cb4,
- 0x0cba, 0x0cbb,
- 0x0cc5, 0x0cc5,
- 0x0cc9, 0x0cc9,
- 0x0cce, 0x0cd4,
- 0x0cd7, 0x0cdd,
- 0x0cdf, 0x0cdf,
- 0x0ce4, 0x0ce5,
- 0x0cf0, 0x0cf0,
- 0x0cf3, 0x0cff,
- 0x0d04, 0x0d04,
- 0x0d0d, 0x0d0d,
- 0x0d11, 0x0d11,
- 0x0d45, 0x0d45,
- 0x0d49, 0x0d49,
- 0x0d50, 0x0d53,
- 0x0d64, 0x0d65,
- 0x0d80, 0x0d81,
- 0x0d84, 0x0d84,
- 0x0d97, 0x0d99,
- 0x0db2, 0x0db2,
- 0x0dbc, 0x0dbc,
- 0x0dbe, 0x0dbf,
- 0x0dc7, 0x0dc9,
- 0x0dcb, 0x0dce,
- 0x0dd5, 0x0dd5,
- 0x0dd7, 0x0dd7,
- 0x0de0, 0x0de5,
- 0x0df0, 0x0df1,
- 0x0df5, 0x0e00,
- 0x0e3b, 0x0e3e,
- 0x0e5c, 0x0e80,
- 0x0e83, 0x0e83,
- 0x0e85, 0x0e85,
- 0x0e8b, 0x0e8b,
- 0x0ea4, 0x0ea4,
- 0x0ea6, 0x0ea6,
- 0x0ebe, 0x0ebf,
- 0x0ec5, 0x0ec5,
- 0x0ec7, 0x0ec7,
- 0x0ece, 0x0ecf,
- 0x0eda, 0x0edb,
- 0x0ee0, 0x0eff,
- 0x0f48, 0x0f48,
- 0x0f6d, 0x0f70,
- 0x0f98, 0x0f98,
- 0x0fbd, 0x0fbd,
- 0x0fcd, 0x0fcd,
- 0x0fdb, 0x0fff,
- 0x10c6, 0x10c6,
- 0x10c8, 0x10cc,
- 0x10ce, 0x10cf,
- 0x1249, 0x1249,
- 0x124e, 0x124f,
- 0x1257, 0x1257,
- 0x1259, 0x1259,
- 0x125e, 0x125f,
- 0x1289, 0x1289,
- 0x128e, 0x128f,
- 0x12b1, 0x12b1,
- 0x12b6, 0x12b7,
- 0x12bf, 0x12bf,
- 0x12c1, 0x12c1,
- 0x12c6, 0x12c7,
- 0x12d7, 0x12d7,
- 0x1311, 0x1311,
- 0x1316, 0x1317,
- 0x135b, 0x135c,
- 0x137d, 0x137f,
- 0x139a, 0x139f,
- 0x13f6, 0x13f7,
- 0x13fe, 0x13ff,
- 0x169d, 0x169f,
- 0x16f9, 0x16ff,
- 0x170d, 0x170d,
- 0x1715, 0x171f,
- 0x1737, 0x173f,
- 0x1754, 0x175f,
- 0x176d, 0x176d,
- 0x1771, 0x1771,
- 0x1774, 0x177f,
- 0x17de, 0x17df,
- 0x17ea, 0x17ef,
- 0x17fa, 0x17ff,
- 0x180e, 0x180f,
- 0x181a, 0x181f,
- 0x1879, 0x187f,
- 0x18ab, 0x18af,
- 0x18f6, 0x18ff,
- 0x191f, 0x191f,
- 0x192c, 0x192f,
- 0x193c, 0x193f,
- 0x1941, 0x1943,
- 0x196e, 0x196f,
- 0x1975, 0x197f,
- 0x19ac, 0x19af,
- 0x19ca, 0x19cf,
- 0x19db, 0x19dd,
- 0x1a1c, 0x1a1d,
- 0x1a5f, 0x1a5f,
- 0x1a7d, 0x1a7e,
- 0x1a8a, 0x1a8f,
- 0x1a9a, 0x1a9f,
- 0x1aae, 0x1aaf,
- 0x1abf, 0x1aff,
- 0x1b4c, 0x1b4f,
- 0x1b7d, 0x1b7f,
- 0x1bf4, 0x1bfb,
- 0x1c38, 0x1c3a,
- 0x1c4a, 0x1c4c,
- 0x1c89, 0x1c8f,
- 0x1cbb, 0x1cbc,
- 0x1cc8, 0x1ccf,
- 0x1cfb, 0x1cff,
- 0x1dfa, 0x1dfa,
- 0x1f16, 0x1f17,
- 0x1f1e, 0x1f1f,
- 0x1f46, 0x1f47,
- 0x1f4e, 0x1f4f,
- 0x1f58, 0x1f58,
- 0x1f5a, 0x1f5a,
- 0x1f5c, 0x1f5c,
- 0x1f5e, 0x1f5e,
- 0x1f7e, 0x1f7f,
- 0x1fb5, 0x1fb5,
- 0x1fc5, 0x1fc5,
- 0x1fd4, 0x1fd5,
- 0x1fdc, 0x1fdc,
- 0x1ff0, 0x1ff1,
- 0x1ff5, 0x1ff5,
- 0x1fff, 0x1fff,
- 0x200b, 0x200f,
- 0x202a, 0x202e,
- 0x2060, 0x206f,
- 0x2072, 0x2073,
- 0x208f, 0x208f,
- 0x209d, 0x209f,
- 0x20c0, 0x20cf,
- 0x20f1, 0x20ff,
- 0x218c, 0x218f,
- 0x2427, 0x243f,
- 0x244b, 0x245f,
- 0x2b74, 0x2b75,
- 0x2b96, 0x2b97,
- 0x2c2f, 0x2c2f,
- 0x2c5f, 0x2c5f,
- 0x2cf4, 0x2cf8,
- 0x2d26, 0x2d26,
- 0x2d28, 0x2d2c,
- 0x2d2e, 0x2d2f,
- 0x2d68, 0x2d6e,
- 0x2d71, 0x2d7e,
- 0x2d97, 0x2d9f,
- 0x2da7, 0x2da7,
- 0x2daf, 0x2daf,
- 0x2db7, 0x2db7,
- 0x2dbf, 0x2dbf,
- 0x2dc7, 0x2dc7,
- 0x2dcf, 0x2dcf,
- 0x2dd7, 0x2dd7,
- 0x2ddf, 0x2ddf,
- 0x2e50, 0x2e7f,
- 0x2e9a, 0x2e9a,
- 0x2ef4, 0x2eff,
- 0x2fd6, 0x2fef,
- 0x2ffc, 0x2fff,
- 0x3040, 0x3040,
- 0x3097, 0x3098,
- 0x3100, 0x3104,
- 0x3130, 0x3130,
- 0x318f, 0x318f,
- 0x31bb, 0x31bf,
- 0x31e4, 0x31ef,
- 0x321f, 0x321f,
- 0x4db6, 0x4dbf,
- 0x9ff0, 0x9fff,
- 0xa48d, 0xa48f,
- 0xa4c7, 0xa4cf,
- 0xa62c, 0xa63f,
- 0xa6f8, 0xa6ff,
- 0xa7c0, 0xa7c1,
- 0xa7c7, 0xa7f6,
- 0xa82c, 0xa82f,
- 0xa83a, 0xa83f,
- 0xa878, 0xa87f,
- 0xa8c6, 0xa8cd,
- 0xa8da, 0xa8df,
- 0xa954, 0xa95e,
- 0xa97d, 0xa97f,
- 0xa9ce, 0xa9ce,
- 0xa9da, 0xa9dd,
- 0xa9ff, 0xa9ff,
- 0xaa37, 0xaa3f,
- 0xaa4e, 0xaa4f,
- 0xaa5a, 0xaa5b,
- 0xaac3, 0xaada,
- 0xaaf7, 0xab00,
- 0xab07, 0xab08,
- 0xab0f, 0xab10,
- 0xab17, 0xab1f,
- 0xab27, 0xab27,
- 0xab2f, 0xab2f,
- 0xab68, 0xab6f,
- 0xabee, 0xabef,
- 0xabfa, 0xabff,
- 0xd7a4, 0xd7af,
- 0xd7c7, 0xd7ca,
- 0xd7fc, 0xf8ff,
- 0xfa6e, 0xfa6f,
- 0xfada, 0xfaff,
- 0xfb07, 0xfb12,
- 0xfb18, 0xfb1c,
- 0xfb37, 0xfb37,
- 0xfb3d, 0xfb3d,
- 0xfb3f, 0xfb3f,
- 0xfb42, 0xfb42,
- 0xfb45, 0xfb45,
- 0xfbc2, 0xfbd2,
- 0xfd40, 0xfd4f,
- 0xfd90, 0xfd91,
- 0xfdc8, 0xfdef,
- 0xfdfe, 0xfdff,
- 0xfe1a, 0xfe1f,
- 0xfe53, 0xfe53,
- 0xfe67, 0xfe67,
- 0xfe6c, 0xfe6f,
- 0xfe75, 0xfe75,
- 0xfefd, 0xff00,
- 0xffbf, 0xffc1,
- 0xffc8, 0xffc9,
- 0xffd0, 0xffd1,
- 0xffd8, 0xffd9,
- 0xffdd, 0xffdf,
- 0xffe7, 0xffe7,
- 0xffef, 0xfffb,
- 0xfffe, 0xffff,
- 0x1000c, 0x1000c,
- 0x10027, 0x10027,
- 0x1003b, 0x1003b,
- 0x1003e, 0x1003e,
- 0x1004e, 0x1004f,
- 0x1005e, 0x1007f,
- 0x100fb, 0x100ff,
- 0x10103, 0x10106,
- 0x10134, 0x10136,
- 0x1018f, 0x1018f,
- 0x1019c, 0x1019f,
- 0x101a1, 0x101cf,
- 0x101fe, 0x1027f,
- 0x1029d, 0x1029f,
- 0x102d1, 0x102df,
- 0x102fc, 0x102ff,
- 0x10324, 0x1032c,
- 0x1034b, 0x1034f,
- 0x1037b, 0x1037f,
- 0x1039e, 0x1039e,
- 0x103c4, 0x103c7,
- 0x103d6, 0x103ff,
- 0x1049e, 0x1049f,
- 0x104aa, 0x104af,
- 0x104d4, 0x104d7,
- 0x104fc, 0x104ff,
- 0x10528, 0x1052f,
- 0x10564, 0x1056e,
- 0x10570, 0x105ff,
- 0x10737, 0x1073f,
- 0x10756, 0x1075f,
- 0x10768, 0x107ff,
- 0x10806, 0x10807,
- 0x10809, 0x10809,
- 0x10836, 0x10836,
- 0x10839, 0x1083b,
- 0x1083d, 0x1083e,
- 0x10856, 0x10856,
- 0x1089f, 0x108a6,
- 0x108b0, 0x108df,
- 0x108f3, 0x108f3,
- 0x108f6, 0x108fa,
- 0x1091c, 0x1091e,
- 0x1093a, 0x1093e,
- 0x10940, 0x1097f,
- 0x109b8, 0x109bb,
- 0x109d0, 0x109d1,
- 0x10a04, 0x10a04,
- 0x10a07, 0x10a0b,
- 0x10a14, 0x10a14,
- 0x10a18, 0x10a18,
- 0x10a36, 0x10a37,
- 0x10a3b, 0x10a3e,
- 0x10a49, 0x10a4f,
- 0x10a59, 0x10a5f,
- 0x10aa0, 0x10abf,
- 0x10ae7, 0x10aea,
- 0x10af7, 0x10aff,
- 0x10b36, 0x10b38,
- 0x10b56, 0x10b57,
- 0x10b73, 0x10b77,
- 0x10b92, 0x10b98,
- 0x10b9d, 0x10ba8,
- 0x10bb0, 0x10bff,
- 0x10c49, 0x10c7f,
- 0x10cb3, 0x10cbf,
- 0x10cf3, 0x10cf9,
- 0x10d28, 0x10d2f,
- 0x10d3a, 0x10e5f,
- 0x10e7f, 0x10eff,
- 0x10f28, 0x10f2f,
- 0x10f5a, 0x10fdf,
- 0x10ff7, 0x10fff,
- 0x1104e, 0x11051,
- 0x11070, 0x1107e,
- 0x110bd, 0x110bd,
- 0x110c2, 0x110cf,
- 0x110e9, 0x110ef,
- 0x110fa, 0x110ff,
- 0x11135, 0x11135,
- 0x11147, 0x1114f,
- 0x11177, 0x1117f,
- 0x111ce, 0x111cf,
- 0x111e0, 0x111e0,
- 0x111f5, 0x111ff,
- 0x11212, 0x11212,
- 0x1123f, 0x1127f,
- 0x11287, 0x11287,
- 0x11289, 0x11289,
- 0x1128e, 0x1128e,
- 0x1129e, 0x1129e,
- 0x112aa, 0x112af,
- 0x112eb, 0x112ef,
- 0x112fa, 0x112ff,
- 0x11304, 0x11304,
- 0x1130d, 0x1130e,
- 0x11311, 0x11312,
- 0x11329, 0x11329,
- 0x11331, 0x11331,
- 0x11334, 0x11334,
- 0x1133a, 0x1133a,
- 0x11345, 0x11346,
- 0x11349, 0x1134a,
- 0x1134e, 0x1134f,
- 0x11351, 0x11356,
- 0x11358, 0x1135c,
- 0x11364, 0x11365,
- 0x1136d, 0x1136f,
- 0x11375, 0x113ff,
- 0x1145a, 0x1145a,
- 0x1145c, 0x1145c,
- 0x11460, 0x1147f,
- 0x114c8, 0x114cf,
- 0x114da, 0x1157f,
- 0x115b6, 0x115b7,
- 0x115de, 0x115ff,
- 0x11645, 0x1164f,
- 0x1165a, 0x1165f,
- 0x1166d, 0x1167f,
- 0x116b9, 0x116bf,
- 0x116ca, 0x116ff,
- 0x1171b, 0x1171c,
- 0x1172c, 0x1172f,
- 0x11740, 0x117ff,
- 0x1183c, 0x1189f,
- 0x118f3, 0x118fe,
- 0x11900, 0x1199f,
- 0x119a8, 0x119a9,
- 0x119d8, 0x119d9,
- 0x119e5, 0x119ff,
- 0x11a48, 0x11a4f,
- 0x11aa3, 0x11abf,
- 0x11af9, 0x11bff,
- 0x11c09, 0x11c09,
- 0x11c37, 0x11c37,
- 0x11c46, 0x11c4f,
- 0x11c6d, 0x11c6f,
- 0x11c90, 0x11c91,
- 0x11ca8, 0x11ca8,
- 0x11cb7, 0x11cff,
- 0x11d07, 0x11d07,
- 0x11d0a, 0x11d0a,
- 0x11d37, 0x11d39,
- 0x11d3b, 0x11d3b,
- 0x11d3e, 0x11d3e,
- 0x11d48, 0x11d4f,
- 0x11d5a, 0x11d5f,
- 0x11d66, 0x11d66,
- 0x11d69, 0x11d69,
- 0x11d8f, 0x11d8f,
- 0x11d92, 0x11d92,
- 0x11d99, 0x11d9f,
- 0x11daa, 0x11edf,
- 0x11ef9, 0x11fbf,
- 0x11ff2, 0x11ffe,
- 0x1239a, 0x123ff,
- 0x1246f, 0x1246f,
- 0x12475, 0x1247f,
- 0x12544, 0x12fff,
- 0x1342f, 0x143ff,
- 0x14647, 0x167ff,
- 0x16a39, 0x16a3f,
- 0x16a5f, 0x16a5f,
- 0x16a6a, 0x16a6d,
- 0x16a70, 0x16acf,
- 0x16aee, 0x16aef,
- 0x16af6, 0x16aff,
- 0x16b46, 0x16b4f,
- 0x16b5a, 0x16b5a,
- 0x16b62, 0x16b62,
- 0x16b78, 0x16b7c,
- 0x16b90, 0x16e3f,
- 0x16e9b, 0x16eff,
- 0x16f4b, 0x16f4e,
- 0x16f88, 0x16f8e,
- 0x16fa0, 0x16fdf,
- 0x16fe4, 0x16fff,
- 0x187f8, 0x187ff,
- 0x18af3, 0x1afff,
- 0x1b11f, 0x1b14f,
- 0x1b153, 0x1b163,
- 0x1b168, 0x1b16f,
- 0x1b2fc, 0x1bbff,
- 0x1bc6b, 0x1bc6f,
- 0x1bc7d, 0x1bc7f,
- 0x1bc89, 0x1bc8f,
- 0x1bc9a, 0x1bc9b,
- 0x1bca0, 0x1cfff,
- 0x1d0f6, 0x1d0ff,
- 0x1d127, 0x1d128,
- 0x1d173, 0x1d17a,
- 0x1d1e9, 0x1d1ff,
- 0x1d246, 0x1d2df,
- 0x1d2f4, 0x1d2ff,
- 0x1d357, 0x1d35f,
- 0x1d379, 0x1d3ff,
- 0x1d455, 0x1d455,
- 0x1d49d, 0x1d49d,
- 0x1d4a0, 0x1d4a1,
- 0x1d4a3, 0x1d4a4,
- 0x1d4a7, 0x1d4a8,
- 0x1d4ad, 0x1d4ad,
- 0x1d4ba, 0x1d4ba,
- 0x1d4bc, 0x1d4bc,
- 0x1d4c4, 0x1d4c4,
- 0x1d506, 0x1d506,
- 0x1d50b, 0x1d50c,
- 0x1d515, 0x1d515,
- 0x1d51d, 0x1d51d,
- 0x1d53a, 0x1d53a,
- 0x1d53f, 0x1d53f,
- 0x1d545, 0x1d545,
- 0x1d547, 0x1d549,
- 0x1d551, 0x1d551,
- 0x1d6a6, 0x1d6a7,
- 0x1d7cc, 0x1d7cd,
- 0x1da8c, 0x1da9a,
- 0x1daa0, 0x1daa0,
- 0x1dab0, 0x1dfff,
- 0x1e007, 0x1e007,
- 0x1e019, 0x1e01a,
- 0x1e022, 0x1e022,
- 0x1e025, 0x1e025,
- 0x1e02b, 0x1e0ff,
- 0x1e12d, 0x1e12f,
- 0x1e13e, 0x1e13f,
- 0x1e14a, 0x1e14d,
- 0x1e150, 0x1e2bf,
- 0x1e2fa, 0x1e2fe,
- 0x1e300, 0x1e7ff,
- 0x1e8c5, 0x1e8c6,
- 0x1e8d7, 0x1e8ff,
- 0x1e94c, 0x1e94f,
- 0x1e95a, 0x1e95d,
- 0x1e960, 0x1ec70,
- 0x1ecb5, 0x1ed00,
- 0x1ed3e, 0x1edff,
- 0x1ee04, 0x1ee04,
- 0x1ee20, 0x1ee20,
- 0x1ee23, 0x1ee23,
- 0x1ee25, 0x1ee26,
- 0x1ee28, 0x1ee28,
- 0x1ee33, 0x1ee33,
- 0x1ee38, 0x1ee38,
- 0x1ee3a, 0x1ee3a,
- 0x1ee3c, 0x1ee41,
- 0x1ee43, 0x1ee46,
- 0x1ee48, 0x1ee48,
- 0x1ee4a, 0x1ee4a,
- 0x1ee4c, 0x1ee4c,
- 0x1ee50, 0x1ee50,
- 0x1ee53, 0x1ee53,
- 0x1ee55, 0x1ee56,
- 0x1ee58, 0x1ee58,
- 0x1ee5a, 0x1ee5a,
- 0x1ee5c, 0x1ee5c,
- 0x1ee5e, 0x1ee5e,
- 0x1ee60, 0x1ee60,
- 0x1ee63, 0x1ee63,
- 0x1ee65, 0x1ee66,
- 0x1ee6b, 0x1ee6b,
- 0x1ee73, 0x1ee73,
- 0x1ee78, 0x1ee78,
- 0x1ee7d, 0x1ee7d,
- 0x1ee7f, 0x1ee7f,
- 0x1ee8a, 0x1ee8a,
- 0x1ee9c, 0x1eea0,
- 0x1eea4, 0x1eea4,
- 0x1eeaa, 0x1eeaa,
- 0x1eebc, 0x1eeef,
- 0x1eef2, 0x1efff,
- 0x1f02c, 0x1f02f,
- 0x1f094, 0x1f09f,
- 0x1f0af, 0x1f0b0,
- 0x1f0c0, 0x1f0c0,
- 0x1f0d0, 0x1f0d0,
- 0x1f0f6, 0x1f0ff,
- 0x1f10d, 0x1f10f,
- 0x1f16d, 0x1f16f,
- 0x1f1ad, 0x1f1e5,
- 0x1f203, 0x1f20f,
- 0x1f23c, 0x1f23f,
- 0x1f249, 0x1f24f,
- 0x1f252, 0x1f25f,
- 0x1f266, 0x1f2ff,
- 0x1f6d6, 0x1f6df,
- 0x1f6ed, 0x1f6ef,
- 0x1f6fb, 0x1f6ff,
- 0x1f774, 0x1f77f,
- 0x1f7d9, 0x1f7df,
- 0x1f7ec, 0x1f7ff,
- 0x1f80c, 0x1f80f,
- 0x1f848, 0x1f84f,
- 0x1f85a, 0x1f85f,
- 0x1f888, 0x1f88f,
- 0x1f8ae, 0x1f8ff,
- 0x1f90c, 0x1f90c,
- 0x1f972, 0x1f972,
- 0x1f977, 0x1f979,
- 0x1f9a3, 0x1f9a4,
- 0x1f9ab, 0x1f9ad,
- 0x1f9cb, 0x1f9cc,
- 0x1fa54, 0x1fa5f,
- 0x1fa6e, 0x1fa6f,
- 0x1fa74, 0x1fa77,
- 0x1fa7b, 0x1fa7f,
- 0x1fa83, 0x1fa8f,
- 0x1fa96, 0x1ffff,
- 0x2a6d7, 0x2a6ff,
- 0x2b735, 0x2b73f,
- 0x2b81e, 0x2b81f,
- 0x2cea2, 0x2ceaf,
- 0x2ebe1, 0x2f7ff,
- 0x2fa1e, 0xe00ff,
- 0xe01f0, 0x10ffff,
-}; /* CR_C */
-
-/* 'Cc': General Category */
-#define CR_Cc CR_Cntrl
-
-/* 'Cf': General Category */
-static const OnigCodePoint CR_Cf[] = {
- 20,
- 0x00ad, 0x00ad,
- 0x0600, 0x0605,
- 0x061c, 0x061c,
- 0x06dd, 0x06dd,
- 0x070f, 0x070f,
- 0x08e2, 0x08e2,
- 0x180e, 0x180e,
- 0x200b, 0x200f,
- 0x202a, 0x202e,
- 0x2060, 0x2064,
- 0x2066, 0x206f,
- 0xfeff, 0xfeff,
- 0xfff9, 0xfffb,
- 0x110bd, 0x110bd,
- 0x110cd, 0x110cd,
- 0x13430, 0x13438,
- 0x1bca0, 0x1bca3,
- 0x1d173, 0x1d17a,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
-}; /* CR_Cf */
-
-/* 'Cn': General Category */
-static const OnigCodePoint CR_Cn[] = {
- 666,
- 0x0378, 0x0379,
- 0x0380, 0x0383,
- 0x038b, 0x038b,
- 0x038d, 0x038d,
- 0x03a2, 0x03a2,
- 0x0530, 0x0530,
- 0x0557, 0x0558,
- 0x058b, 0x058c,
- 0x0590, 0x0590,
- 0x05c8, 0x05cf,
- 0x05eb, 0x05ee,
- 0x05f5, 0x05ff,
- 0x061d, 0x061d,
- 0x070e, 0x070e,
- 0x074b, 0x074c,
- 0x07b2, 0x07bf,
- 0x07fb, 0x07fc,
- 0x082e, 0x082f,
- 0x083f, 0x083f,
- 0x085c, 0x085d,
- 0x085f, 0x085f,
- 0x086b, 0x089f,
- 0x08b5, 0x08b5,
- 0x08be, 0x08d2,
- 0x0984, 0x0984,
- 0x098d, 0x098e,
- 0x0991, 0x0992,
- 0x09a9, 0x09a9,
- 0x09b1, 0x09b1,
- 0x09b3, 0x09b5,
- 0x09ba, 0x09bb,
- 0x09c5, 0x09c6,
- 0x09c9, 0x09ca,
- 0x09cf, 0x09d6,
- 0x09d8, 0x09db,
- 0x09de, 0x09de,
- 0x09e4, 0x09e5,
- 0x09ff, 0x0a00,
- 0x0a04, 0x0a04,
- 0x0a0b, 0x0a0e,
- 0x0a11, 0x0a12,
- 0x0a29, 0x0a29,
- 0x0a31, 0x0a31,
- 0x0a34, 0x0a34,
- 0x0a37, 0x0a37,
- 0x0a3a, 0x0a3b,
- 0x0a3d, 0x0a3d,
- 0x0a43, 0x0a46,
- 0x0a49, 0x0a4a,
- 0x0a4e, 0x0a50,
- 0x0a52, 0x0a58,
- 0x0a5d, 0x0a5d,
- 0x0a5f, 0x0a65,
- 0x0a77, 0x0a80,
- 0x0a84, 0x0a84,
- 0x0a8e, 0x0a8e,
- 0x0a92, 0x0a92,
- 0x0aa9, 0x0aa9,
- 0x0ab1, 0x0ab1,
- 0x0ab4, 0x0ab4,
- 0x0aba, 0x0abb,
- 0x0ac6, 0x0ac6,
- 0x0aca, 0x0aca,
- 0x0ace, 0x0acf,
- 0x0ad1, 0x0adf,
- 0x0ae4, 0x0ae5,
- 0x0af2, 0x0af8,
- 0x0b00, 0x0b00,
- 0x0b04, 0x0b04,
- 0x0b0d, 0x0b0e,
- 0x0b11, 0x0b12,
- 0x0b29, 0x0b29,
- 0x0b31, 0x0b31,
- 0x0b34, 0x0b34,
- 0x0b3a, 0x0b3b,
- 0x0b45, 0x0b46,
- 0x0b49, 0x0b4a,
- 0x0b4e, 0x0b55,
- 0x0b58, 0x0b5b,
- 0x0b5e, 0x0b5e,
- 0x0b64, 0x0b65,
- 0x0b78, 0x0b81,
- 0x0b84, 0x0b84,
- 0x0b8b, 0x0b8d,
- 0x0b91, 0x0b91,
- 0x0b96, 0x0b98,
- 0x0b9b, 0x0b9b,
- 0x0b9d, 0x0b9d,
- 0x0ba0, 0x0ba2,
- 0x0ba5, 0x0ba7,
- 0x0bab, 0x0bad,
- 0x0bba, 0x0bbd,
- 0x0bc3, 0x0bc5,
- 0x0bc9, 0x0bc9,
- 0x0bce, 0x0bcf,
- 0x0bd1, 0x0bd6,
- 0x0bd8, 0x0be5,
- 0x0bfb, 0x0bff,
- 0x0c0d, 0x0c0d,
- 0x0c11, 0x0c11,
- 0x0c29, 0x0c29,
- 0x0c3a, 0x0c3c,
- 0x0c45, 0x0c45,
- 0x0c49, 0x0c49,
- 0x0c4e, 0x0c54,
- 0x0c57, 0x0c57,
- 0x0c5b, 0x0c5f,
- 0x0c64, 0x0c65,
- 0x0c70, 0x0c76,
- 0x0c8d, 0x0c8d,
- 0x0c91, 0x0c91,
- 0x0ca9, 0x0ca9,
- 0x0cb4, 0x0cb4,
- 0x0cba, 0x0cbb,
- 0x0cc5, 0x0cc5,
- 0x0cc9, 0x0cc9,
- 0x0cce, 0x0cd4,
- 0x0cd7, 0x0cdd,
- 0x0cdf, 0x0cdf,
- 0x0ce4, 0x0ce5,
- 0x0cf0, 0x0cf0,
- 0x0cf3, 0x0cff,
- 0x0d04, 0x0d04,
- 0x0d0d, 0x0d0d,
- 0x0d11, 0x0d11,
- 0x0d45, 0x0d45,
- 0x0d49, 0x0d49,
- 0x0d50, 0x0d53,
- 0x0d64, 0x0d65,
- 0x0d80, 0x0d81,
- 0x0d84, 0x0d84,
- 0x0d97, 0x0d99,
- 0x0db2, 0x0db2,
- 0x0dbc, 0x0dbc,
- 0x0dbe, 0x0dbf,
- 0x0dc7, 0x0dc9,
- 0x0dcb, 0x0dce,
- 0x0dd5, 0x0dd5,
- 0x0dd7, 0x0dd7,
- 0x0de0, 0x0de5,
- 0x0df0, 0x0df1,
- 0x0df5, 0x0e00,
- 0x0e3b, 0x0e3e,
- 0x0e5c, 0x0e80,
- 0x0e83, 0x0e83,
- 0x0e85, 0x0e85,
- 0x0e8b, 0x0e8b,
- 0x0ea4, 0x0ea4,
- 0x0ea6, 0x0ea6,
- 0x0ebe, 0x0ebf,
- 0x0ec5, 0x0ec5,
- 0x0ec7, 0x0ec7,
- 0x0ece, 0x0ecf,
- 0x0eda, 0x0edb,
- 0x0ee0, 0x0eff,
- 0x0f48, 0x0f48,
- 0x0f6d, 0x0f70,
- 0x0f98, 0x0f98,
- 0x0fbd, 0x0fbd,
- 0x0fcd, 0x0fcd,
- 0x0fdb, 0x0fff,
- 0x10c6, 0x10c6,
- 0x10c8, 0x10cc,
- 0x10ce, 0x10cf,
- 0x1249, 0x1249,
- 0x124e, 0x124f,
- 0x1257, 0x1257,
- 0x1259, 0x1259,
- 0x125e, 0x125f,
- 0x1289, 0x1289,
- 0x128e, 0x128f,
- 0x12b1, 0x12b1,
- 0x12b6, 0x12b7,
- 0x12bf, 0x12bf,
- 0x12c1, 0x12c1,
- 0x12c6, 0x12c7,
- 0x12d7, 0x12d7,
- 0x1311, 0x1311,
- 0x1316, 0x1317,
- 0x135b, 0x135c,
- 0x137d, 0x137f,
- 0x139a, 0x139f,
- 0x13f6, 0x13f7,
- 0x13fe, 0x13ff,
- 0x169d, 0x169f,
- 0x16f9, 0x16ff,
- 0x170d, 0x170d,
- 0x1715, 0x171f,
- 0x1737, 0x173f,
- 0x1754, 0x175f,
- 0x176d, 0x176d,
- 0x1771, 0x1771,
- 0x1774, 0x177f,
- 0x17de, 0x17df,
- 0x17ea, 0x17ef,
- 0x17fa, 0x17ff,
- 0x180f, 0x180f,
- 0x181a, 0x181f,
- 0x1879, 0x187f,
- 0x18ab, 0x18af,
- 0x18f6, 0x18ff,
- 0x191f, 0x191f,
- 0x192c, 0x192f,
- 0x193c, 0x193f,
- 0x1941, 0x1943,
- 0x196e, 0x196f,
- 0x1975, 0x197f,
- 0x19ac, 0x19af,
- 0x19ca, 0x19cf,
- 0x19db, 0x19dd,
- 0x1a1c, 0x1a1d,
- 0x1a5f, 0x1a5f,
- 0x1a7d, 0x1a7e,
- 0x1a8a, 0x1a8f,
- 0x1a9a, 0x1a9f,
- 0x1aae, 0x1aaf,
- 0x1abf, 0x1aff,
- 0x1b4c, 0x1b4f,
- 0x1b7d, 0x1b7f,
- 0x1bf4, 0x1bfb,
- 0x1c38, 0x1c3a,
- 0x1c4a, 0x1c4c,
- 0x1c89, 0x1c8f,
- 0x1cbb, 0x1cbc,
- 0x1cc8, 0x1ccf,
- 0x1cfb, 0x1cff,
- 0x1dfa, 0x1dfa,
- 0x1f16, 0x1f17,
- 0x1f1e, 0x1f1f,
- 0x1f46, 0x1f47,
- 0x1f4e, 0x1f4f,
- 0x1f58, 0x1f58,
- 0x1f5a, 0x1f5a,
- 0x1f5c, 0x1f5c,
- 0x1f5e, 0x1f5e,
- 0x1f7e, 0x1f7f,
- 0x1fb5, 0x1fb5,
- 0x1fc5, 0x1fc5,
- 0x1fd4, 0x1fd5,
- 0x1fdc, 0x1fdc,
- 0x1ff0, 0x1ff1,
- 0x1ff5, 0x1ff5,
- 0x1fff, 0x1fff,
- 0x2065, 0x2065,
- 0x2072, 0x2073,
- 0x208f, 0x208f,
- 0x209d, 0x209f,
- 0x20c0, 0x20cf,
- 0x20f1, 0x20ff,
- 0x218c, 0x218f,
- 0x2427, 0x243f,
- 0x244b, 0x245f,
- 0x2b74, 0x2b75,
- 0x2b96, 0x2b97,
- 0x2c2f, 0x2c2f,
- 0x2c5f, 0x2c5f,
- 0x2cf4, 0x2cf8,
- 0x2d26, 0x2d26,
- 0x2d28, 0x2d2c,
- 0x2d2e, 0x2d2f,
- 0x2d68, 0x2d6e,
- 0x2d71, 0x2d7e,
- 0x2d97, 0x2d9f,
- 0x2da7, 0x2da7,
- 0x2daf, 0x2daf,
- 0x2db7, 0x2db7,
- 0x2dbf, 0x2dbf,
- 0x2dc7, 0x2dc7,
- 0x2dcf, 0x2dcf,
- 0x2dd7, 0x2dd7,
- 0x2ddf, 0x2ddf,
- 0x2e50, 0x2e7f,
- 0x2e9a, 0x2e9a,
- 0x2ef4, 0x2eff,
- 0x2fd6, 0x2fef,
- 0x2ffc, 0x2fff,
- 0x3040, 0x3040,
- 0x3097, 0x3098,
- 0x3100, 0x3104,
- 0x3130, 0x3130,
- 0x318f, 0x318f,
- 0x31bb, 0x31bf,
- 0x31e4, 0x31ef,
- 0x321f, 0x321f,
- 0x4db6, 0x4dbf,
- 0x9ff0, 0x9fff,
- 0xa48d, 0xa48f,
- 0xa4c7, 0xa4cf,
- 0xa62c, 0xa63f,
- 0xa6f8, 0xa6ff,
- 0xa7c0, 0xa7c1,
- 0xa7c7, 0xa7f6,
- 0xa82c, 0xa82f,
- 0xa83a, 0xa83f,
- 0xa878, 0xa87f,
- 0xa8c6, 0xa8cd,
- 0xa8da, 0xa8df,
- 0xa954, 0xa95e,
- 0xa97d, 0xa97f,
- 0xa9ce, 0xa9ce,
- 0xa9da, 0xa9dd,
- 0xa9ff, 0xa9ff,
- 0xaa37, 0xaa3f,
- 0xaa4e, 0xaa4f,
- 0xaa5a, 0xaa5b,
- 0xaac3, 0xaada,
- 0xaaf7, 0xab00,
- 0xab07, 0xab08,
- 0xab0f, 0xab10,
- 0xab17, 0xab1f,
- 0xab27, 0xab27,
- 0xab2f, 0xab2f,
- 0xab68, 0xab6f,
- 0xabee, 0xabef,
- 0xabfa, 0xabff,
- 0xd7a4, 0xd7af,
- 0xd7c7, 0xd7ca,
- 0xd7fc, 0xd7ff,
- 0xfa6e, 0xfa6f,
- 0xfada, 0xfaff,
- 0xfb07, 0xfb12,
- 0xfb18, 0xfb1c,
- 0xfb37, 0xfb37,
- 0xfb3d, 0xfb3d,
- 0xfb3f, 0xfb3f,
- 0xfb42, 0xfb42,
- 0xfb45, 0xfb45,
- 0xfbc2, 0xfbd2,
- 0xfd40, 0xfd4f,
- 0xfd90, 0xfd91,
- 0xfdc8, 0xfdef,
- 0xfdfe, 0xfdff,
- 0xfe1a, 0xfe1f,
- 0xfe53, 0xfe53,
- 0xfe67, 0xfe67,
- 0xfe6c, 0xfe6f,
- 0xfe75, 0xfe75,
- 0xfefd, 0xfefe,
- 0xff00, 0xff00,
- 0xffbf, 0xffc1,
- 0xffc8, 0xffc9,
- 0xffd0, 0xffd1,
- 0xffd8, 0xffd9,
- 0xffdd, 0xffdf,
- 0xffe7, 0xffe7,
- 0xffef, 0xfff8,
- 0xfffe, 0xffff,
- 0x1000c, 0x1000c,
- 0x10027, 0x10027,
- 0x1003b, 0x1003b,
- 0x1003e, 0x1003e,
- 0x1004e, 0x1004f,
- 0x1005e, 0x1007f,
- 0x100fb, 0x100ff,
- 0x10103, 0x10106,
- 0x10134, 0x10136,
- 0x1018f, 0x1018f,
- 0x1019c, 0x1019f,
- 0x101a1, 0x101cf,
- 0x101fe, 0x1027f,
- 0x1029d, 0x1029f,
- 0x102d1, 0x102df,
- 0x102fc, 0x102ff,
- 0x10324, 0x1032c,
- 0x1034b, 0x1034f,
- 0x1037b, 0x1037f,
- 0x1039e, 0x1039e,
- 0x103c4, 0x103c7,
- 0x103d6, 0x103ff,
- 0x1049e, 0x1049f,
- 0x104aa, 0x104af,
- 0x104d4, 0x104d7,
- 0x104fc, 0x104ff,
- 0x10528, 0x1052f,
- 0x10564, 0x1056e,
- 0x10570, 0x105ff,
- 0x10737, 0x1073f,
- 0x10756, 0x1075f,
- 0x10768, 0x107ff,
- 0x10806, 0x10807,
- 0x10809, 0x10809,
- 0x10836, 0x10836,
- 0x10839, 0x1083b,
- 0x1083d, 0x1083e,
- 0x10856, 0x10856,
- 0x1089f, 0x108a6,
- 0x108b0, 0x108df,
- 0x108f3, 0x108f3,
- 0x108f6, 0x108fa,
- 0x1091c, 0x1091e,
- 0x1093a, 0x1093e,
- 0x10940, 0x1097f,
- 0x109b8, 0x109bb,
- 0x109d0, 0x109d1,
- 0x10a04, 0x10a04,
- 0x10a07, 0x10a0b,
- 0x10a14, 0x10a14,
- 0x10a18, 0x10a18,
- 0x10a36, 0x10a37,
- 0x10a3b, 0x10a3e,
- 0x10a49, 0x10a4f,
- 0x10a59, 0x10a5f,
- 0x10aa0, 0x10abf,
- 0x10ae7, 0x10aea,
- 0x10af7, 0x10aff,
- 0x10b36, 0x10b38,
- 0x10b56, 0x10b57,
- 0x10b73, 0x10b77,
- 0x10b92, 0x10b98,
- 0x10b9d, 0x10ba8,
- 0x10bb0, 0x10bff,
- 0x10c49, 0x10c7f,
- 0x10cb3, 0x10cbf,
- 0x10cf3, 0x10cf9,
- 0x10d28, 0x10d2f,
- 0x10d3a, 0x10e5f,
- 0x10e7f, 0x10eff,
- 0x10f28, 0x10f2f,
- 0x10f5a, 0x10fdf,
- 0x10ff7, 0x10fff,
- 0x1104e, 0x11051,
- 0x11070, 0x1107e,
- 0x110c2, 0x110cc,
- 0x110ce, 0x110cf,
- 0x110e9, 0x110ef,
- 0x110fa, 0x110ff,
- 0x11135, 0x11135,
- 0x11147, 0x1114f,
- 0x11177, 0x1117f,
- 0x111ce, 0x111cf,
- 0x111e0, 0x111e0,
- 0x111f5, 0x111ff,
- 0x11212, 0x11212,
- 0x1123f, 0x1127f,
- 0x11287, 0x11287,
- 0x11289, 0x11289,
- 0x1128e, 0x1128e,
- 0x1129e, 0x1129e,
- 0x112aa, 0x112af,
- 0x112eb, 0x112ef,
- 0x112fa, 0x112ff,
- 0x11304, 0x11304,
- 0x1130d, 0x1130e,
- 0x11311, 0x11312,
- 0x11329, 0x11329,
- 0x11331, 0x11331,
- 0x11334, 0x11334,
- 0x1133a, 0x1133a,
- 0x11345, 0x11346,
- 0x11349, 0x1134a,
- 0x1134e, 0x1134f,
- 0x11351, 0x11356,
- 0x11358, 0x1135c,
- 0x11364, 0x11365,
- 0x1136d, 0x1136f,
- 0x11375, 0x113ff,
- 0x1145a, 0x1145a,
- 0x1145c, 0x1145c,
- 0x11460, 0x1147f,
- 0x114c8, 0x114cf,
- 0x114da, 0x1157f,
- 0x115b6, 0x115b7,
- 0x115de, 0x115ff,
- 0x11645, 0x1164f,
- 0x1165a, 0x1165f,
- 0x1166d, 0x1167f,
- 0x116b9, 0x116bf,
- 0x116ca, 0x116ff,
- 0x1171b, 0x1171c,
- 0x1172c, 0x1172f,
- 0x11740, 0x117ff,
- 0x1183c, 0x1189f,
- 0x118f3, 0x118fe,
- 0x11900, 0x1199f,
- 0x119a8, 0x119a9,
- 0x119d8, 0x119d9,
- 0x119e5, 0x119ff,
- 0x11a48, 0x11a4f,
- 0x11aa3, 0x11abf,
- 0x11af9, 0x11bff,
- 0x11c09, 0x11c09,
- 0x11c37, 0x11c37,
- 0x11c46, 0x11c4f,
- 0x11c6d, 0x11c6f,
- 0x11c90, 0x11c91,
- 0x11ca8, 0x11ca8,
- 0x11cb7, 0x11cff,
- 0x11d07, 0x11d07,
- 0x11d0a, 0x11d0a,
- 0x11d37, 0x11d39,
- 0x11d3b, 0x11d3b,
- 0x11d3e, 0x11d3e,
- 0x11d48, 0x11d4f,
- 0x11d5a, 0x11d5f,
- 0x11d66, 0x11d66,
- 0x11d69, 0x11d69,
- 0x11d8f, 0x11d8f,
- 0x11d92, 0x11d92,
- 0x11d99, 0x11d9f,
- 0x11daa, 0x11edf,
- 0x11ef9, 0x11fbf,
- 0x11ff2, 0x11ffe,
- 0x1239a, 0x123ff,
- 0x1246f, 0x1246f,
- 0x12475, 0x1247f,
- 0x12544, 0x12fff,
- 0x1342f, 0x1342f,
- 0x13439, 0x143ff,
- 0x14647, 0x167ff,
- 0x16a39, 0x16a3f,
- 0x16a5f, 0x16a5f,
- 0x16a6a, 0x16a6d,
- 0x16a70, 0x16acf,
- 0x16aee, 0x16aef,
- 0x16af6, 0x16aff,
- 0x16b46, 0x16b4f,
- 0x16b5a, 0x16b5a,
- 0x16b62, 0x16b62,
- 0x16b78, 0x16b7c,
- 0x16b90, 0x16e3f,
- 0x16e9b, 0x16eff,
- 0x16f4b, 0x16f4e,
- 0x16f88, 0x16f8e,
- 0x16fa0, 0x16fdf,
- 0x16fe4, 0x16fff,
- 0x187f8, 0x187ff,
- 0x18af3, 0x1afff,
- 0x1b11f, 0x1b14f,
- 0x1b153, 0x1b163,
- 0x1b168, 0x1b16f,
- 0x1b2fc, 0x1bbff,
- 0x1bc6b, 0x1bc6f,
- 0x1bc7d, 0x1bc7f,
- 0x1bc89, 0x1bc8f,
- 0x1bc9a, 0x1bc9b,
- 0x1bca4, 0x1cfff,
- 0x1d0f6, 0x1d0ff,
- 0x1d127, 0x1d128,
- 0x1d1e9, 0x1d1ff,
- 0x1d246, 0x1d2df,
- 0x1d2f4, 0x1d2ff,
- 0x1d357, 0x1d35f,
- 0x1d379, 0x1d3ff,
- 0x1d455, 0x1d455,
- 0x1d49d, 0x1d49d,
- 0x1d4a0, 0x1d4a1,
- 0x1d4a3, 0x1d4a4,
- 0x1d4a7, 0x1d4a8,
- 0x1d4ad, 0x1d4ad,
- 0x1d4ba, 0x1d4ba,
- 0x1d4bc, 0x1d4bc,
- 0x1d4c4, 0x1d4c4,
- 0x1d506, 0x1d506,
- 0x1d50b, 0x1d50c,
- 0x1d515, 0x1d515,
- 0x1d51d, 0x1d51d,
- 0x1d53a, 0x1d53a,
- 0x1d53f, 0x1d53f,
- 0x1d545, 0x1d545,
- 0x1d547, 0x1d549,
- 0x1d551, 0x1d551,
- 0x1d6a6, 0x1d6a7,
- 0x1d7cc, 0x1d7cd,
- 0x1da8c, 0x1da9a,
- 0x1daa0, 0x1daa0,
- 0x1dab0, 0x1dfff,
- 0x1e007, 0x1e007,
- 0x1e019, 0x1e01a,
- 0x1e022, 0x1e022,
- 0x1e025, 0x1e025,
- 0x1e02b, 0x1e0ff,
- 0x1e12d, 0x1e12f,
- 0x1e13e, 0x1e13f,
- 0x1e14a, 0x1e14d,
- 0x1e150, 0x1e2bf,
- 0x1e2fa, 0x1e2fe,
- 0x1e300, 0x1e7ff,
- 0x1e8c5, 0x1e8c6,
- 0x1e8d7, 0x1e8ff,
- 0x1e94c, 0x1e94f,
- 0x1e95a, 0x1e95d,
- 0x1e960, 0x1ec70,
- 0x1ecb5, 0x1ed00,
- 0x1ed3e, 0x1edff,
- 0x1ee04, 0x1ee04,
- 0x1ee20, 0x1ee20,
- 0x1ee23, 0x1ee23,
- 0x1ee25, 0x1ee26,
- 0x1ee28, 0x1ee28,
- 0x1ee33, 0x1ee33,
- 0x1ee38, 0x1ee38,
- 0x1ee3a, 0x1ee3a,
- 0x1ee3c, 0x1ee41,
- 0x1ee43, 0x1ee46,
- 0x1ee48, 0x1ee48,
- 0x1ee4a, 0x1ee4a,
- 0x1ee4c, 0x1ee4c,
- 0x1ee50, 0x1ee50,
- 0x1ee53, 0x1ee53,
- 0x1ee55, 0x1ee56,
- 0x1ee58, 0x1ee58,
- 0x1ee5a, 0x1ee5a,
- 0x1ee5c, 0x1ee5c,
- 0x1ee5e, 0x1ee5e,
- 0x1ee60, 0x1ee60,
- 0x1ee63, 0x1ee63,
- 0x1ee65, 0x1ee66,
- 0x1ee6b, 0x1ee6b,
- 0x1ee73, 0x1ee73,
- 0x1ee78, 0x1ee78,
- 0x1ee7d, 0x1ee7d,
- 0x1ee7f, 0x1ee7f,
- 0x1ee8a, 0x1ee8a,
- 0x1ee9c, 0x1eea0,
- 0x1eea4, 0x1eea4,
- 0x1eeaa, 0x1eeaa,
- 0x1eebc, 0x1eeef,
- 0x1eef2, 0x1efff,
- 0x1f02c, 0x1f02f,
- 0x1f094, 0x1f09f,
- 0x1f0af, 0x1f0b0,
- 0x1f0c0, 0x1f0c0,
- 0x1f0d0, 0x1f0d0,
- 0x1f0f6, 0x1f0ff,
- 0x1f10d, 0x1f10f,
- 0x1f16d, 0x1f16f,
- 0x1f1ad, 0x1f1e5,
- 0x1f203, 0x1f20f,
- 0x1f23c, 0x1f23f,
- 0x1f249, 0x1f24f,
- 0x1f252, 0x1f25f,
- 0x1f266, 0x1f2ff,
- 0x1f6d6, 0x1f6df,
- 0x1f6ed, 0x1f6ef,
- 0x1f6fb, 0x1f6ff,
- 0x1f774, 0x1f77f,
- 0x1f7d9, 0x1f7df,
- 0x1f7ec, 0x1f7ff,
- 0x1f80c, 0x1f80f,
- 0x1f848, 0x1f84f,
- 0x1f85a, 0x1f85f,
- 0x1f888, 0x1f88f,
- 0x1f8ae, 0x1f8ff,
- 0x1f90c, 0x1f90c,
- 0x1f972, 0x1f972,
- 0x1f977, 0x1f979,
- 0x1f9a3, 0x1f9a4,
- 0x1f9ab, 0x1f9ad,
- 0x1f9cb, 0x1f9cc,
- 0x1fa54, 0x1fa5f,
- 0x1fa6e, 0x1fa6f,
- 0x1fa74, 0x1fa77,
- 0x1fa7b, 0x1fa7f,
- 0x1fa83, 0x1fa8f,
- 0x1fa96, 0x1ffff,
- 0x2a6d7, 0x2a6ff,
- 0x2b735, 0x2b73f,
- 0x2b81e, 0x2b81f,
- 0x2cea2, 0x2ceaf,
- 0x2ebe1, 0x2f7ff,
- 0x2fa1e, 0xe0000,
- 0xe0002, 0xe001f,
- 0xe0080, 0xe00ff,
- 0xe01f0, 0xeffff,
- 0xffffe, 0xfffff,
- 0x10fffe, 0x10ffff,
-}; /* CR_Cn */
-
-/* 'Co': General Category */
-static const OnigCodePoint CR_Co[] = {
- 3,
- 0xe000, 0xf8ff,
- 0xf0000, 0xffffd,
- 0x100000, 0x10fffd,
-}; /* CR_Co */
-
-/* 'Cs': General Category */
-static const OnigCodePoint CR_Cs[] = {
- 1,
- 0xd800, 0xdfff,
-}; /* CR_Cs */
-
-/* 'L': Major Category */
-static const OnigCodePoint CR_L[] = {
- 609,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0370, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0620, 0x064a,
- 0x066e, 0x066f,
- 0x0671, 0x06d3,
- 0x06d5, 0x06d5,
- 0x06e5, 0x06e6,
- 0x06ee, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x0710,
- 0x0712, 0x072f,
- 0x074d, 0x07a5,
- 0x07b1, 0x07b1,
- 0x07ca, 0x07ea,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x0800, 0x0815,
- 0x081a, 0x081a,
- 0x0824, 0x0824,
- 0x0828, 0x0828,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x0904, 0x0939,
- 0x093d, 0x093d,
- 0x0950, 0x0950,
- 0x0958, 0x0961,
- 0x0971, 0x0980,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09bd,
- 0x09ce, 0x09ce,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e1,
- 0x09f0, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a72, 0x0a74,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0abd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae1,
- 0x0af9, 0x0af9,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b3d,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b71, 0x0b71,
- 0x0b83, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bd0, 0x0bd0,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c3d,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c61,
- 0x0c80, 0x0c80,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cbd,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0cf1, 0x0cf2,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d3d,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d56,
- 0x0d5f, 0x0d61,
- 0x0d7a, 0x0d7f,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0e01, 0x0e30,
- 0x0e32, 0x0e33,
- 0x0e40, 0x0e46,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb0,
- 0x0eb2, 0x0eb3,
- 0x0ebd, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f88, 0x0f8c,
- 0x1000, 0x102a,
- 0x103f, 0x103f,
- 0x1050, 0x1055,
- 0x105a, 0x105d,
- 0x1061, 0x1061,
- 0x1065, 0x1066,
- 0x106e, 0x1070,
- 0x1075, 0x1081,
- 0x108e, 0x108e,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16f1, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1711,
- 0x1720, 0x1731,
- 0x1740, 0x1751,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1780, 0x17b3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dc,
- 0x1820, 0x1878,
- 0x1880, 0x1884,
- 0x1887, 0x18a8,
- 0x18aa, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x1a00, 0x1a16,
- 0x1a20, 0x1a54,
- 0x1aa7, 0x1aa7,
- 0x1b05, 0x1b33,
- 0x1b45, 0x1b4b,
- 0x1b83, 0x1ba0,
- 0x1bae, 0x1baf,
- 0x1bba, 0x1be5,
- 0x1c00, 0x1c23,
- 0x1c4d, 0x1c4f,
- 0x1c5a, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2183, 0x2184,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3006,
- 0x3031, 0x3035,
- 0x303b, 0x303c,
- 0x3041, 0x3096,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa61f,
- 0xa62a, 0xa62b,
- 0xa640, 0xa66e,
- 0xa67f, 0xa69d,
- 0xa6a0, 0xa6e5,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa801,
- 0xa803, 0xa805,
- 0xa807, 0xa80a,
- 0xa80c, 0xa822,
- 0xa840, 0xa873,
- 0xa882, 0xa8b3,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa8fe,
- 0xa90a, 0xa925,
- 0xa930, 0xa946,
- 0xa960, 0xa97c,
- 0xa984, 0xa9b2,
- 0xa9cf, 0xa9cf,
- 0xa9e0, 0xa9e4,
- 0xa9e6, 0xa9ef,
- 0xa9fa, 0xa9fe,
- 0xaa00, 0xaa28,
- 0xaa40, 0xaa42,
- 0xaa44, 0xaa4b,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaa7a,
- 0xaa7e, 0xaaaf,
- 0xaab1, 0xaab1,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaabd,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaea,
- 0xaaf2, 0xaaf4,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabe2,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb1d,
- 0xfb1f, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x10340,
- 0x10342, 0x10349,
- 0x10350, 0x10375,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x10400, 0x1049d,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a00,
- 0x10a10, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d23,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11003, 0x11037,
- 0x11083, 0x110af,
- 0x110d0, 0x110e8,
- 0x11103, 0x11126,
- 0x11144, 0x11144,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11183, 0x111b2,
- 0x111c1, 0x111c4,
- 0x111da, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x1122b,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112de,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x1133d,
- 0x11350, 0x11350,
- 0x1135d, 0x11361,
- 0x11400, 0x11434,
- 0x11447, 0x1144a,
- 0x1145f, 0x1145f,
- 0x11480, 0x114af,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x11580, 0x115ae,
- 0x115d8, 0x115db,
- 0x11600, 0x1162f,
- 0x11644, 0x11644,
- 0x11680, 0x116aa,
- 0x116b8, 0x116b8,
- 0x11700, 0x1171a,
- 0x11800, 0x1182b,
- 0x118a0, 0x118df,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d0,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e3,
- 0x11a00, 0x11a00,
- 0x11a0b, 0x11a32,
- 0x11a3a, 0x11a3a,
- 0x11a50, 0x11a50,
- 0x11a5c, 0x11a89,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c2e,
- 0x11c40, 0x11c40,
- 0x11c72, 0x11c8f,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d30,
- 0x11d46, 0x11d46,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d89,
- 0x11d98, 0x11d98,
- 0x11ee0, 0x11ef2,
- 0x12000, 0x12399,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b40, 0x16b43,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f50, 0x16f50,
- 0x16f93, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e800, 0x1e8c4,
- 0x1e900, 0x1e943,
- 0x1e94b, 0x1e94b,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_L */
-
-/* 'LC': General Category */
-static const OnigCodePoint CR_LC[] = {
- 131,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00b5, 0x00b5,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x01ba,
- 0x01bc, 0x01bf,
- 0x01c4, 0x0293,
- 0x0295, 0x02af,
- 0x0370, 0x0373,
- 0x0376, 0x0377,
- 0x037b, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0560, 0x0588,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1d00, 0x1d2b,
- 0x1d6b, 0x1d77,
- 0x1d79, 0x1d9a,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2134,
- 0x2139, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2183, 0x2184,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2c7b,
- 0x2c7e, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa640, 0xa66d,
- 0xa680, 0xa69b,
- 0xa722, 0xa76f,
- 0xa771, 0xa787,
- 0xa78b, 0xa78e,
- 0xa790, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7fa, 0xa7fa,
- 0xab30, 0xab5a,
- 0xab60, 0xab67,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0x10400, 0x1044f,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x118a0, 0x118df,
- 0x16e40, 0x16e7f,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e900, 0x1e943,
-}; /* CR_LC */
-
-/* 'Ll': General Category */
-static const OnigCodePoint CR_Ll[] = {
- 642,
- 0x0061, 0x007a,
- 0x00b5, 0x00b5,
- 0x00df, 0x00f6,
- 0x00f8, 0x00ff,
- 0x0101, 0x0101,
- 0x0103, 0x0103,
- 0x0105, 0x0105,
- 0x0107, 0x0107,
- 0x0109, 0x0109,
- 0x010b, 0x010b,
- 0x010d, 0x010d,
- 0x010f, 0x010f,
- 0x0111, 0x0111,
- 0x0113, 0x0113,
- 0x0115, 0x0115,
- 0x0117, 0x0117,
- 0x0119, 0x0119,
- 0x011b, 0x011b,
- 0x011d, 0x011d,
- 0x011f, 0x011f,
- 0x0121, 0x0121,
- 0x0123, 0x0123,
- 0x0125, 0x0125,
- 0x0127, 0x0127,
- 0x0129, 0x0129,
- 0x012b, 0x012b,
- 0x012d, 0x012d,
- 0x012f, 0x012f,
- 0x0131, 0x0131,
- 0x0133, 0x0133,
- 0x0135, 0x0135,
- 0x0137, 0x0138,
- 0x013a, 0x013a,
- 0x013c, 0x013c,
- 0x013e, 0x013e,
- 0x0140, 0x0140,
- 0x0142, 0x0142,
- 0x0144, 0x0144,
- 0x0146, 0x0146,
- 0x0148, 0x0149,
- 0x014b, 0x014b,
- 0x014d, 0x014d,
- 0x014f, 0x014f,
- 0x0151, 0x0151,
- 0x0153, 0x0153,
- 0x0155, 0x0155,
- 0x0157, 0x0157,
- 0x0159, 0x0159,
- 0x015b, 0x015b,
- 0x015d, 0x015d,
- 0x015f, 0x015f,
- 0x0161, 0x0161,
- 0x0163, 0x0163,
- 0x0165, 0x0165,
- 0x0167, 0x0167,
- 0x0169, 0x0169,
- 0x016b, 0x016b,
- 0x016d, 0x016d,
- 0x016f, 0x016f,
- 0x0171, 0x0171,
- 0x0173, 0x0173,
- 0x0175, 0x0175,
- 0x0177, 0x0177,
- 0x017a, 0x017a,
- 0x017c, 0x017c,
- 0x017e, 0x0180,
- 0x0183, 0x0183,
- 0x0185, 0x0185,
- 0x0188, 0x0188,
- 0x018c, 0x018d,
- 0x0192, 0x0192,
- 0x0195, 0x0195,
- 0x0199, 0x019b,
- 0x019e, 0x019e,
- 0x01a1, 0x01a1,
- 0x01a3, 0x01a3,
- 0x01a5, 0x01a5,
- 0x01a8, 0x01a8,
- 0x01aa, 0x01ab,
- 0x01ad, 0x01ad,
- 0x01b0, 0x01b0,
- 0x01b4, 0x01b4,
- 0x01b6, 0x01b6,
- 0x01b9, 0x01ba,
- 0x01bd, 0x01bf,
- 0x01c6, 0x01c6,
- 0x01c9, 0x01c9,
- 0x01cc, 0x01cc,
- 0x01ce, 0x01ce,
- 0x01d0, 0x01d0,
- 0x01d2, 0x01d2,
- 0x01d4, 0x01d4,
- 0x01d6, 0x01d6,
- 0x01d8, 0x01d8,
- 0x01da, 0x01da,
- 0x01dc, 0x01dd,
- 0x01df, 0x01df,
- 0x01e1, 0x01e1,
- 0x01e3, 0x01e3,
- 0x01e5, 0x01e5,
- 0x01e7, 0x01e7,
- 0x01e9, 0x01e9,
- 0x01eb, 0x01eb,
- 0x01ed, 0x01ed,
- 0x01ef, 0x01f0,
- 0x01f3, 0x01f3,
- 0x01f5, 0x01f5,
- 0x01f9, 0x01f9,
- 0x01fb, 0x01fb,
- 0x01fd, 0x01fd,
- 0x01ff, 0x01ff,
- 0x0201, 0x0201,
- 0x0203, 0x0203,
- 0x0205, 0x0205,
- 0x0207, 0x0207,
- 0x0209, 0x0209,
- 0x020b, 0x020b,
- 0x020d, 0x020d,
- 0x020f, 0x020f,
- 0x0211, 0x0211,
- 0x0213, 0x0213,
- 0x0215, 0x0215,
- 0x0217, 0x0217,
- 0x0219, 0x0219,
- 0x021b, 0x021b,
- 0x021d, 0x021d,
- 0x021f, 0x021f,
- 0x0221, 0x0221,
- 0x0223, 0x0223,
- 0x0225, 0x0225,
- 0x0227, 0x0227,
- 0x0229, 0x0229,
- 0x022b, 0x022b,
- 0x022d, 0x022d,
- 0x022f, 0x022f,
- 0x0231, 0x0231,
- 0x0233, 0x0239,
- 0x023c, 0x023c,
- 0x023f, 0x0240,
- 0x0242, 0x0242,
- 0x0247, 0x0247,
- 0x0249, 0x0249,
- 0x024b, 0x024b,
- 0x024d, 0x024d,
- 0x024f, 0x0293,
- 0x0295, 0x02af,
- 0x0371, 0x0371,
- 0x0373, 0x0373,
- 0x0377, 0x0377,
- 0x037b, 0x037d,
- 0x0390, 0x0390,
- 0x03ac, 0x03ce,
- 0x03d0, 0x03d1,
- 0x03d5, 0x03d7,
- 0x03d9, 0x03d9,
- 0x03db, 0x03db,
- 0x03dd, 0x03dd,
- 0x03df, 0x03df,
- 0x03e1, 0x03e1,
- 0x03e3, 0x03e3,
- 0x03e5, 0x03e5,
- 0x03e7, 0x03e7,
- 0x03e9, 0x03e9,
- 0x03eb, 0x03eb,
- 0x03ed, 0x03ed,
- 0x03ef, 0x03f3,
- 0x03f5, 0x03f5,
- 0x03f8, 0x03f8,
- 0x03fb, 0x03fc,
- 0x0430, 0x045f,
- 0x0461, 0x0461,
- 0x0463, 0x0463,
- 0x0465, 0x0465,
- 0x0467, 0x0467,
- 0x0469, 0x0469,
- 0x046b, 0x046b,
- 0x046d, 0x046d,
- 0x046f, 0x046f,
- 0x0471, 0x0471,
- 0x0473, 0x0473,
- 0x0475, 0x0475,
- 0x0477, 0x0477,
- 0x0479, 0x0479,
- 0x047b, 0x047b,
- 0x047d, 0x047d,
- 0x047f, 0x047f,
- 0x0481, 0x0481,
- 0x048b, 0x048b,
- 0x048d, 0x048d,
- 0x048f, 0x048f,
- 0x0491, 0x0491,
- 0x0493, 0x0493,
- 0x0495, 0x0495,
- 0x0497, 0x0497,
- 0x0499, 0x0499,
- 0x049b, 0x049b,
- 0x049d, 0x049d,
- 0x049f, 0x049f,
- 0x04a1, 0x04a1,
- 0x04a3, 0x04a3,
- 0x04a5, 0x04a5,
- 0x04a7, 0x04a7,
- 0x04a9, 0x04a9,
- 0x04ab, 0x04ab,
- 0x04ad, 0x04ad,
- 0x04af, 0x04af,
- 0x04b1, 0x04b1,
- 0x04b3, 0x04b3,
- 0x04b5, 0x04b5,
- 0x04b7, 0x04b7,
- 0x04b9, 0x04b9,
- 0x04bb, 0x04bb,
- 0x04bd, 0x04bd,
- 0x04bf, 0x04bf,
- 0x04c2, 0x04c2,
- 0x04c4, 0x04c4,
- 0x04c6, 0x04c6,
- 0x04c8, 0x04c8,
- 0x04ca, 0x04ca,
- 0x04cc, 0x04cc,
- 0x04ce, 0x04cf,
- 0x04d1, 0x04d1,
- 0x04d3, 0x04d3,
- 0x04d5, 0x04d5,
- 0x04d7, 0x04d7,
- 0x04d9, 0x04d9,
- 0x04db, 0x04db,
- 0x04dd, 0x04dd,
- 0x04df, 0x04df,
- 0x04e1, 0x04e1,
- 0x04e3, 0x04e3,
- 0x04e5, 0x04e5,
- 0x04e7, 0x04e7,
- 0x04e9, 0x04e9,
- 0x04eb, 0x04eb,
- 0x04ed, 0x04ed,
- 0x04ef, 0x04ef,
- 0x04f1, 0x04f1,
- 0x04f3, 0x04f3,
- 0x04f5, 0x04f5,
- 0x04f7, 0x04f7,
- 0x04f9, 0x04f9,
- 0x04fb, 0x04fb,
- 0x04fd, 0x04fd,
- 0x04ff, 0x04ff,
- 0x0501, 0x0501,
- 0x0503, 0x0503,
- 0x0505, 0x0505,
- 0x0507, 0x0507,
- 0x0509, 0x0509,
- 0x050b, 0x050b,
- 0x050d, 0x050d,
- 0x050f, 0x050f,
- 0x0511, 0x0511,
- 0x0513, 0x0513,
- 0x0515, 0x0515,
- 0x0517, 0x0517,
- 0x0519, 0x0519,
- 0x051b, 0x051b,
- 0x051d, 0x051d,
- 0x051f, 0x051f,
- 0x0521, 0x0521,
- 0x0523, 0x0523,
- 0x0525, 0x0525,
- 0x0527, 0x0527,
- 0x0529, 0x0529,
- 0x052b, 0x052b,
- 0x052d, 0x052d,
- 0x052f, 0x052f,
- 0x0560, 0x0588,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1d00, 0x1d2b,
- 0x1d6b, 0x1d77,
- 0x1d79, 0x1d9a,
- 0x1e01, 0x1e01,
- 0x1e03, 0x1e03,
- 0x1e05, 0x1e05,
- 0x1e07, 0x1e07,
- 0x1e09, 0x1e09,
- 0x1e0b, 0x1e0b,
- 0x1e0d, 0x1e0d,
- 0x1e0f, 0x1e0f,
- 0x1e11, 0x1e11,
- 0x1e13, 0x1e13,
- 0x1e15, 0x1e15,
- 0x1e17, 0x1e17,
- 0x1e19, 0x1e19,
- 0x1e1b, 0x1e1b,
- 0x1e1d, 0x1e1d,
- 0x1e1f, 0x1e1f,
- 0x1e21, 0x1e21,
- 0x1e23, 0x1e23,
- 0x1e25, 0x1e25,
- 0x1e27, 0x1e27,
- 0x1e29, 0x1e29,
- 0x1e2b, 0x1e2b,
- 0x1e2d, 0x1e2d,
- 0x1e2f, 0x1e2f,
- 0x1e31, 0x1e31,
- 0x1e33, 0x1e33,
- 0x1e35, 0x1e35,
- 0x1e37, 0x1e37,
- 0x1e39, 0x1e39,
- 0x1e3b, 0x1e3b,
- 0x1e3d, 0x1e3d,
- 0x1e3f, 0x1e3f,
- 0x1e41, 0x1e41,
- 0x1e43, 0x1e43,
- 0x1e45, 0x1e45,
- 0x1e47, 0x1e47,
- 0x1e49, 0x1e49,
- 0x1e4b, 0x1e4b,
- 0x1e4d, 0x1e4d,
- 0x1e4f, 0x1e4f,
- 0x1e51, 0x1e51,
- 0x1e53, 0x1e53,
- 0x1e55, 0x1e55,
- 0x1e57, 0x1e57,
- 0x1e59, 0x1e59,
- 0x1e5b, 0x1e5b,
- 0x1e5d, 0x1e5d,
- 0x1e5f, 0x1e5f,
- 0x1e61, 0x1e61,
- 0x1e63, 0x1e63,
- 0x1e65, 0x1e65,
- 0x1e67, 0x1e67,
- 0x1e69, 0x1e69,
- 0x1e6b, 0x1e6b,
- 0x1e6d, 0x1e6d,
- 0x1e6f, 0x1e6f,
- 0x1e71, 0x1e71,
- 0x1e73, 0x1e73,
- 0x1e75, 0x1e75,
- 0x1e77, 0x1e77,
- 0x1e79, 0x1e79,
- 0x1e7b, 0x1e7b,
- 0x1e7d, 0x1e7d,
- 0x1e7f, 0x1e7f,
- 0x1e81, 0x1e81,
- 0x1e83, 0x1e83,
- 0x1e85, 0x1e85,
- 0x1e87, 0x1e87,
- 0x1e89, 0x1e89,
- 0x1e8b, 0x1e8b,
- 0x1e8d, 0x1e8d,
- 0x1e8f, 0x1e8f,
- 0x1e91, 0x1e91,
- 0x1e93, 0x1e93,
- 0x1e95, 0x1e9d,
- 0x1e9f, 0x1e9f,
- 0x1ea1, 0x1ea1,
- 0x1ea3, 0x1ea3,
- 0x1ea5, 0x1ea5,
- 0x1ea7, 0x1ea7,
- 0x1ea9, 0x1ea9,
- 0x1eab, 0x1eab,
- 0x1ead, 0x1ead,
- 0x1eaf, 0x1eaf,
- 0x1eb1, 0x1eb1,
- 0x1eb3, 0x1eb3,
- 0x1eb5, 0x1eb5,
- 0x1eb7, 0x1eb7,
- 0x1eb9, 0x1eb9,
- 0x1ebb, 0x1ebb,
- 0x1ebd, 0x1ebd,
- 0x1ebf, 0x1ebf,
- 0x1ec1, 0x1ec1,
- 0x1ec3, 0x1ec3,
- 0x1ec5, 0x1ec5,
- 0x1ec7, 0x1ec7,
- 0x1ec9, 0x1ec9,
- 0x1ecb, 0x1ecb,
- 0x1ecd, 0x1ecd,
- 0x1ecf, 0x1ecf,
- 0x1ed1, 0x1ed1,
- 0x1ed3, 0x1ed3,
- 0x1ed5, 0x1ed5,
- 0x1ed7, 0x1ed7,
- 0x1ed9, 0x1ed9,
- 0x1edb, 0x1edb,
- 0x1edd, 0x1edd,
- 0x1edf, 0x1edf,
- 0x1ee1, 0x1ee1,
- 0x1ee3, 0x1ee3,
- 0x1ee5, 0x1ee5,
- 0x1ee7, 0x1ee7,
- 0x1ee9, 0x1ee9,
- 0x1eeb, 0x1eeb,
- 0x1eed, 0x1eed,
- 0x1eef, 0x1eef,
- 0x1ef1, 0x1ef1,
- 0x1ef3, 0x1ef3,
- 0x1ef5, 0x1ef5,
- 0x1ef7, 0x1ef7,
- 0x1ef9, 0x1ef9,
- 0x1efb, 0x1efb,
- 0x1efd, 0x1efd,
- 0x1eff, 0x1f07,
- 0x1f10, 0x1f15,
- 0x1f20, 0x1f27,
- 0x1f30, 0x1f37,
- 0x1f40, 0x1f45,
- 0x1f50, 0x1f57,
- 0x1f60, 0x1f67,
- 0x1f70, 0x1f7d,
- 0x1f80, 0x1f87,
- 0x1f90, 0x1f97,
- 0x1fa0, 0x1fa7,
- 0x1fb0, 0x1fb4,
- 0x1fb6, 0x1fb7,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fc7,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fd7,
- 0x1fe0, 0x1fe7,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ff7,
- 0x210a, 0x210a,
- 0x210e, 0x210f,
- 0x2113, 0x2113,
- 0x212f, 0x212f,
- 0x2134, 0x2134,
- 0x2139, 0x2139,
- 0x213c, 0x213d,
- 0x2146, 0x2149,
- 0x214e, 0x214e,
- 0x2184, 0x2184,
- 0x2c30, 0x2c5e,
- 0x2c61, 0x2c61,
- 0x2c65, 0x2c66,
- 0x2c68, 0x2c68,
- 0x2c6a, 0x2c6a,
- 0x2c6c, 0x2c6c,
- 0x2c71, 0x2c71,
- 0x2c73, 0x2c74,
- 0x2c76, 0x2c7b,
- 0x2c81, 0x2c81,
- 0x2c83, 0x2c83,
- 0x2c85, 0x2c85,
- 0x2c87, 0x2c87,
- 0x2c89, 0x2c89,
- 0x2c8b, 0x2c8b,
- 0x2c8d, 0x2c8d,
- 0x2c8f, 0x2c8f,
- 0x2c91, 0x2c91,
- 0x2c93, 0x2c93,
- 0x2c95, 0x2c95,
- 0x2c97, 0x2c97,
- 0x2c99, 0x2c99,
- 0x2c9b, 0x2c9b,
- 0x2c9d, 0x2c9d,
- 0x2c9f, 0x2c9f,
- 0x2ca1, 0x2ca1,
- 0x2ca3, 0x2ca3,
- 0x2ca5, 0x2ca5,
- 0x2ca7, 0x2ca7,
- 0x2ca9, 0x2ca9,
- 0x2cab, 0x2cab,
- 0x2cad, 0x2cad,
- 0x2caf, 0x2caf,
- 0x2cb1, 0x2cb1,
- 0x2cb3, 0x2cb3,
- 0x2cb5, 0x2cb5,
- 0x2cb7, 0x2cb7,
- 0x2cb9, 0x2cb9,
- 0x2cbb, 0x2cbb,
- 0x2cbd, 0x2cbd,
- 0x2cbf, 0x2cbf,
- 0x2cc1, 0x2cc1,
- 0x2cc3, 0x2cc3,
- 0x2cc5, 0x2cc5,
- 0x2cc7, 0x2cc7,
- 0x2cc9, 0x2cc9,
- 0x2ccb, 0x2ccb,
- 0x2ccd, 0x2ccd,
- 0x2ccf, 0x2ccf,
- 0x2cd1, 0x2cd1,
- 0x2cd3, 0x2cd3,
- 0x2cd5, 0x2cd5,
- 0x2cd7, 0x2cd7,
- 0x2cd9, 0x2cd9,
- 0x2cdb, 0x2cdb,
- 0x2cdd, 0x2cdd,
- 0x2cdf, 0x2cdf,
- 0x2ce1, 0x2ce1,
- 0x2ce3, 0x2ce4,
- 0x2cec, 0x2cec,
- 0x2cee, 0x2cee,
- 0x2cf3, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa641, 0xa641,
- 0xa643, 0xa643,
- 0xa645, 0xa645,
- 0xa647, 0xa647,
- 0xa649, 0xa649,
- 0xa64b, 0xa64b,
- 0xa64d, 0xa64d,
- 0xa64f, 0xa64f,
- 0xa651, 0xa651,
- 0xa653, 0xa653,
- 0xa655, 0xa655,
- 0xa657, 0xa657,
- 0xa659, 0xa659,
- 0xa65b, 0xa65b,
- 0xa65d, 0xa65d,
- 0xa65f, 0xa65f,
- 0xa661, 0xa661,
- 0xa663, 0xa663,
- 0xa665, 0xa665,
- 0xa667, 0xa667,
- 0xa669, 0xa669,
- 0xa66b, 0xa66b,
- 0xa66d, 0xa66d,
- 0xa681, 0xa681,
- 0xa683, 0xa683,
- 0xa685, 0xa685,
- 0xa687, 0xa687,
- 0xa689, 0xa689,
- 0xa68b, 0xa68b,
- 0xa68d, 0xa68d,
- 0xa68f, 0xa68f,
- 0xa691, 0xa691,
- 0xa693, 0xa693,
- 0xa695, 0xa695,
- 0xa697, 0xa697,
- 0xa699, 0xa699,
- 0xa69b, 0xa69b,
- 0xa723, 0xa723,
- 0xa725, 0xa725,
- 0xa727, 0xa727,
- 0xa729, 0xa729,
- 0xa72b, 0xa72b,
- 0xa72d, 0xa72d,
- 0xa72f, 0xa731,
- 0xa733, 0xa733,
- 0xa735, 0xa735,
- 0xa737, 0xa737,
- 0xa739, 0xa739,
- 0xa73b, 0xa73b,
- 0xa73d, 0xa73d,
- 0xa73f, 0xa73f,
- 0xa741, 0xa741,
- 0xa743, 0xa743,
- 0xa745, 0xa745,
- 0xa747, 0xa747,
- 0xa749, 0xa749,
- 0xa74b, 0xa74b,
- 0xa74d, 0xa74d,
- 0xa74f, 0xa74f,
- 0xa751, 0xa751,
- 0xa753, 0xa753,
- 0xa755, 0xa755,
- 0xa757, 0xa757,
- 0xa759, 0xa759,
- 0xa75b, 0xa75b,
- 0xa75d, 0xa75d,
- 0xa75f, 0xa75f,
- 0xa761, 0xa761,
- 0xa763, 0xa763,
- 0xa765, 0xa765,
- 0xa767, 0xa767,
- 0xa769, 0xa769,
- 0xa76b, 0xa76b,
- 0xa76d, 0xa76d,
- 0xa76f, 0xa76f,
- 0xa771, 0xa778,
- 0xa77a, 0xa77a,
- 0xa77c, 0xa77c,
- 0xa77f, 0xa77f,
- 0xa781, 0xa781,
- 0xa783, 0xa783,
- 0xa785, 0xa785,
- 0xa787, 0xa787,
- 0xa78c, 0xa78c,
- 0xa78e, 0xa78e,
- 0xa791, 0xa791,
- 0xa793, 0xa795,
- 0xa797, 0xa797,
- 0xa799, 0xa799,
- 0xa79b, 0xa79b,
- 0xa79d, 0xa79d,
- 0xa79f, 0xa79f,
- 0xa7a1, 0xa7a1,
- 0xa7a3, 0xa7a3,
- 0xa7a5, 0xa7a5,
- 0xa7a7, 0xa7a7,
- 0xa7a9, 0xa7a9,
- 0xa7af, 0xa7af,
- 0xa7b5, 0xa7b5,
- 0xa7b7, 0xa7b7,
- 0xa7b9, 0xa7b9,
- 0xa7bb, 0xa7bb,
- 0xa7bd, 0xa7bd,
- 0xa7bf, 0xa7bf,
- 0xa7c3, 0xa7c3,
- 0xa7fa, 0xa7fa,
- 0xab30, 0xab5a,
- 0xab60, 0xab67,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff41, 0xff5a,
- 0x10428, 0x1044f,
- 0x104d8, 0x104fb,
- 0x10cc0, 0x10cf2,
- 0x118c0, 0x118df,
- 0x16e60, 0x16e7f,
- 0x1d41a, 0x1d433,
- 0x1d44e, 0x1d454,
- 0x1d456, 0x1d467,
- 0x1d482, 0x1d49b,
- 0x1d4b6, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d4cf,
- 0x1d4ea, 0x1d503,
- 0x1d51e, 0x1d537,
- 0x1d552, 0x1d56b,
- 0x1d586, 0x1d59f,
- 0x1d5ba, 0x1d5d3,
- 0x1d5ee, 0x1d607,
- 0x1d622, 0x1d63b,
- 0x1d656, 0x1d66f,
- 0x1d68a, 0x1d6a5,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6e1,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d71b,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d755,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d78f,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7c9,
- 0x1d7cb, 0x1d7cb,
- 0x1e922, 0x1e943,
-}; /* CR_Ll */
-
-/* 'Lm': General Category */
-static const OnigCodePoint CR_Lm[] = {
- 60,
- 0x02b0, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0374, 0x0374,
- 0x037a, 0x037a,
- 0x0559, 0x0559,
- 0x0640, 0x0640,
- 0x06e5, 0x06e6,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x081a, 0x081a,
- 0x0824, 0x0824,
- 0x0828, 0x0828,
- 0x0971, 0x0971,
- 0x0e46, 0x0e46,
- 0x0ec6, 0x0ec6,
- 0x10fc, 0x10fc,
- 0x17d7, 0x17d7,
- 0x1843, 0x1843,
- 0x1aa7, 0x1aa7,
- 0x1c78, 0x1c7d,
- 0x1d2c, 0x1d6a,
- 0x1d78, 0x1d78,
- 0x1d9b, 0x1dbf,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2c7c, 0x2c7d,
- 0x2d6f, 0x2d6f,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3005,
- 0x3031, 0x3035,
- 0x303b, 0x303b,
- 0x309d, 0x309e,
- 0x30fc, 0x30fe,
- 0xa015, 0xa015,
- 0xa4f8, 0xa4fd,
- 0xa60c, 0xa60c,
- 0xa67f, 0xa67f,
- 0xa69c, 0xa69d,
- 0xa717, 0xa71f,
- 0xa770, 0xa770,
- 0xa788, 0xa788,
- 0xa7f8, 0xa7f9,
- 0xa9cf, 0xa9cf,
- 0xa9e6, 0xa9e6,
- 0xaa70, 0xaa70,
- 0xaadd, 0xaadd,
- 0xaaf3, 0xaaf4,
- 0xab5c, 0xab5f,
- 0xff70, 0xff70,
- 0xff9e, 0xff9f,
- 0x16b40, 0x16b43,
- 0x16f93, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x1e137, 0x1e13d,
- 0x1e94b, 0x1e94b,
-}; /* CR_Lm */
-
-/* 'Lo': General Category */
-static const OnigCodePoint CR_Lo[] = {
- 476,
- 0x00aa, 0x00aa,
- 0x00ba, 0x00ba,
- 0x01bb, 0x01bb,
- 0x01c0, 0x01c3,
- 0x0294, 0x0294,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0620, 0x063f,
- 0x0641, 0x064a,
- 0x066e, 0x066f,
- 0x0671, 0x06d3,
- 0x06d5, 0x06d5,
- 0x06ee, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x0710,
- 0x0712, 0x072f,
- 0x074d, 0x07a5,
- 0x07b1, 0x07b1,
- 0x07ca, 0x07ea,
- 0x0800, 0x0815,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x0904, 0x0939,
- 0x093d, 0x093d,
- 0x0950, 0x0950,
- 0x0958, 0x0961,
- 0x0972, 0x0980,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09bd,
- 0x09ce, 0x09ce,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e1,
- 0x09f0, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a72, 0x0a74,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0abd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae1,
- 0x0af9, 0x0af9,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b3d,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b71, 0x0b71,
- 0x0b83, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bd0, 0x0bd0,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c3d,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c61,
- 0x0c80, 0x0c80,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cbd,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0cf1, 0x0cf2,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d3d,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d56,
- 0x0d5f, 0x0d61,
- 0x0d7a, 0x0d7f,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0e01, 0x0e30,
- 0x0e32, 0x0e33,
- 0x0e40, 0x0e45,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb0,
- 0x0eb2, 0x0eb3,
- 0x0ebd, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f88, 0x0f8c,
- 0x1000, 0x102a,
- 0x103f, 0x103f,
- 0x1050, 0x1055,
- 0x105a, 0x105d,
- 0x1061, 0x1061,
- 0x1065, 0x1066,
- 0x106e, 0x1070,
- 0x1075, 0x1081,
- 0x108e, 0x108e,
- 0x1100, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16f1, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1711,
- 0x1720, 0x1731,
- 0x1740, 0x1751,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1780, 0x17b3,
- 0x17dc, 0x17dc,
- 0x1820, 0x1842,
- 0x1844, 0x1878,
- 0x1880, 0x1884,
- 0x1887, 0x18a8,
- 0x18aa, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x1a00, 0x1a16,
- 0x1a20, 0x1a54,
- 0x1b05, 0x1b33,
- 0x1b45, 0x1b4b,
- 0x1b83, 0x1ba0,
- 0x1bae, 0x1baf,
- 0x1bba, 0x1be5,
- 0x1c00, 0x1c23,
- 0x1c4d, 0x1c4f,
- 0x1c5a, 0x1c77,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x2135, 0x2138,
- 0x2d30, 0x2d67,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x3006, 0x3006,
- 0x303c, 0x303c,
- 0x3041, 0x3096,
- 0x309f, 0x309f,
- 0x30a1, 0x30fa,
- 0x30ff, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa014,
- 0xa016, 0xa48c,
- 0xa4d0, 0xa4f7,
- 0xa500, 0xa60b,
- 0xa610, 0xa61f,
- 0xa62a, 0xa62b,
- 0xa66e, 0xa66e,
- 0xa6a0, 0xa6e5,
- 0xa78f, 0xa78f,
- 0xa7f7, 0xa7f7,
- 0xa7fb, 0xa801,
- 0xa803, 0xa805,
- 0xa807, 0xa80a,
- 0xa80c, 0xa822,
- 0xa840, 0xa873,
- 0xa882, 0xa8b3,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa8fe,
- 0xa90a, 0xa925,
- 0xa930, 0xa946,
- 0xa960, 0xa97c,
- 0xa984, 0xa9b2,
- 0xa9e0, 0xa9e4,
- 0xa9e7, 0xa9ef,
- 0xa9fa, 0xa9fe,
- 0xaa00, 0xaa28,
- 0xaa40, 0xaa42,
- 0xaa44, 0xaa4b,
- 0xaa60, 0xaa6f,
- 0xaa71, 0xaa76,
- 0xaa7a, 0xaa7a,
- 0xaa7e, 0xaaaf,
- 0xaab1, 0xaab1,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaabd,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadc,
- 0xaae0, 0xaaea,
- 0xaaf2, 0xaaf2,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xabc0, 0xabe2,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb1d, 0xfb1d,
- 0xfb1f, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff66, 0xff6f,
- 0xff71, 0xff9d,
- 0xffa0, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x10340,
- 0x10342, 0x10349,
- 0x10350, 0x10375,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x10450, 0x1049d,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a00,
- 0x10a10, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10d00, 0x10d23,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11003, 0x11037,
- 0x11083, 0x110af,
- 0x110d0, 0x110e8,
- 0x11103, 0x11126,
- 0x11144, 0x11144,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11183, 0x111b2,
- 0x111c1, 0x111c4,
- 0x111da, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x1122b,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112de,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x1133d,
- 0x11350, 0x11350,
- 0x1135d, 0x11361,
- 0x11400, 0x11434,
- 0x11447, 0x1144a,
- 0x1145f, 0x1145f,
- 0x11480, 0x114af,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x11580, 0x115ae,
- 0x115d8, 0x115db,
- 0x11600, 0x1162f,
- 0x11644, 0x11644,
- 0x11680, 0x116aa,
- 0x116b8, 0x116b8,
- 0x11700, 0x1171a,
- 0x11800, 0x1182b,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d0,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e3,
- 0x11a00, 0x11a00,
- 0x11a0b, 0x11a32,
- 0x11a3a, 0x11a3a,
- 0x11a50, 0x11a50,
- 0x11a5c, 0x11a89,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c2e,
- 0x11c40, 0x11c40,
- 0x11c72, 0x11c8f,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d30,
- 0x11d46, 0x11d46,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d89,
- 0x11d98, 0x11d98,
- 0x11ee0, 0x11ef2,
- 0x12000, 0x12399,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16f00, 0x16f4a,
- 0x16f50, 0x16f50,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1e100, 0x1e12c,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e800, 0x1e8c4,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Lo */
-
-/* 'Lt': General Category */
-static const OnigCodePoint CR_Lt[] = {
- 10,
- 0x01c5, 0x01c5,
- 0x01c8, 0x01c8,
- 0x01cb, 0x01cb,
- 0x01f2, 0x01f2,
- 0x1f88, 0x1f8f,
- 0x1f98, 0x1f9f,
- 0x1fa8, 0x1faf,
- 0x1fbc, 0x1fbc,
- 0x1fcc, 0x1fcc,
- 0x1ffc, 0x1ffc,
-}; /* CR_Lt */
-
-/* 'Lu': General Category */
-static const OnigCodePoint CR_Lu[] = {
- 636,
- 0x0041, 0x005a,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00de,
- 0x0100, 0x0100,
- 0x0102, 0x0102,
- 0x0104, 0x0104,
- 0x0106, 0x0106,
- 0x0108, 0x0108,
- 0x010a, 0x010a,
- 0x010c, 0x010c,
- 0x010e, 0x010e,
- 0x0110, 0x0110,
- 0x0112, 0x0112,
- 0x0114, 0x0114,
- 0x0116, 0x0116,
- 0x0118, 0x0118,
- 0x011a, 0x011a,
- 0x011c, 0x011c,
- 0x011e, 0x011e,
- 0x0120, 0x0120,
- 0x0122, 0x0122,
- 0x0124, 0x0124,
- 0x0126, 0x0126,
- 0x0128, 0x0128,
- 0x012a, 0x012a,
- 0x012c, 0x012c,
- 0x012e, 0x012e,
- 0x0130, 0x0130,
- 0x0132, 0x0132,
- 0x0134, 0x0134,
- 0x0136, 0x0136,
- 0x0139, 0x0139,
- 0x013b, 0x013b,
- 0x013d, 0x013d,
- 0x013f, 0x013f,
- 0x0141, 0x0141,
- 0x0143, 0x0143,
- 0x0145, 0x0145,
- 0x0147, 0x0147,
- 0x014a, 0x014a,
- 0x014c, 0x014c,
- 0x014e, 0x014e,
- 0x0150, 0x0150,
- 0x0152, 0x0152,
- 0x0154, 0x0154,
- 0x0156, 0x0156,
- 0x0158, 0x0158,
- 0x015a, 0x015a,
- 0x015c, 0x015c,
- 0x015e, 0x015e,
- 0x0160, 0x0160,
- 0x0162, 0x0162,
- 0x0164, 0x0164,
- 0x0166, 0x0166,
- 0x0168, 0x0168,
- 0x016a, 0x016a,
- 0x016c, 0x016c,
- 0x016e, 0x016e,
- 0x0170, 0x0170,
- 0x0172, 0x0172,
- 0x0174, 0x0174,
- 0x0176, 0x0176,
- 0x0178, 0x0179,
- 0x017b, 0x017b,
- 0x017d, 0x017d,
- 0x0181, 0x0182,
- 0x0184, 0x0184,
- 0x0186, 0x0187,
- 0x0189, 0x018b,
- 0x018e, 0x0191,
- 0x0193, 0x0194,
- 0x0196, 0x0198,
- 0x019c, 0x019d,
- 0x019f, 0x01a0,
- 0x01a2, 0x01a2,
- 0x01a4, 0x01a4,
- 0x01a6, 0x01a7,
- 0x01a9, 0x01a9,
- 0x01ac, 0x01ac,
- 0x01ae, 0x01af,
- 0x01b1, 0x01b3,
- 0x01b5, 0x01b5,
- 0x01b7, 0x01b8,
- 0x01bc, 0x01bc,
- 0x01c4, 0x01c4,
- 0x01c7, 0x01c7,
- 0x01ca, 0x01ca,
- 0x01cd, 0x01cd,
- 0x01cf, 0x01cf,
- 0x01d1, 0x01d1,
- 0x01d3, 0x01d3,
- 0x01d5, 0x01d5,
- 0x01d7, 0x01d7,
- 0x01d9, 0x01d9,
- 0x01db, 0x01db,
- 0x01de, 0x01de,
- 0x01e0, 0x01e0,
- 0x01e2, 0x01e2,
- 0x01e4, 0x01e4,
- 0x01e6, 0x01e6,
- 0x01e8, 0x01e8,
- 0x01ea, 0x01ea,
- 0x01ec, 0x01ec,
- 0x01ee, 0x01ee,
- 0x01f1, 0x01f1,
- 0x01f4, 0x01f4,
- 0x01f6, 0x01f8,
- 0x01fa, 0x01fa,
- 0x01fc, 0x01fc,
- 0x01fe, 0x01fe,
- 0x0200, 0x0200,
- 0x0202, 0x0202,
- 0x0204, 0x0204,
- 0x0206, 0x0206,
- 0x0208, 0x0208,
- 0x020a, 0x020a,
- 0x020c, 0x020c,
- 0x020e, 0x020e,
- 0x0210, 0x0210,
- 0x0212, 0x0212,
- 0x0214, 0x0214,
- 0x0216, 0x0216,
- 0x0218, 0x0218,
- 0x021a, 0x021a,
- 0x021c, 0x021c,
- 0x021e, 0x021e,
- 0x0220, 0x0220,
- 0x0222, 0x0222,
- 0x0224, 0x0224,
- 0x0226, 0x0226,
- 0x0228, 0x0228,
- 0x022a, 0x022a,
- 0x022c, 0x022c,
- 0x022e, 0x022e,
- 0x0230, 0x0230,
- 0x0232, 0x0232,
- 0x023a, 0x023b,
- 0x023d, 0x023e,
- 0x0241, 0x0241,
- 0x0243, 0x0246,
- 0x0248, 0x0248,
- 0x024a, 0x024a,
- 0x024c, 0x024c,
- 0x024e, 0x024e,
- 0x0370, 0x0370,
- 0x0372, 0x0372,
- 0x0376, 0x0376,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x038f,
- 0x0391, 0x03a1,
- 0x03a3, 0x03ab,
- 0x03cf, 0x03cf,
- 0x03d2, 0x03d4,
- 0x03d8, 0x03d8,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03e2,
- 0x03e4, 0x03e4,
- 0x03e6, 0x03e6,
- 0x03e8, 0x03e8,
- 0x03ea, 0x03ea,
- 0x03ec, 0x03ec,
- 0x03ee, 0x03ee,
- 0x03f4, 0x03f4,
- 0x03f7, 0x03f7,
- 0x03f9, 0x03fa,
- 0x03fd, 0x042f,
- 0x0460, 0x0460,
- 0x0462, 0x0462,
- 0x0464, 0x0464,
- 0x0466, 0x0466,
- 0x0468, 0x0468,
- 0x046a, 0x046a,
- 0x046c, 0x046c,
- 0x046e, 0x046e,
- 0x0470, 0x0470,
- 0x0472, 0x0472,
- 0x0474, 0x0474,
- 0x0476, 0x0476,
- 0x0478, 0x0478,
- 0x047a, 0x047a,
- 0x047c, 0x047c,
- 0x047e, 0x047e,
- 0x0480, 0x0480,
- 0x048a, 0x048a,
- 0x048c, 0x048c,
- 0x048e, 0x048e,
- 0x0490, 0x0490,
- 0x0492, 0x0492,
- 0x0494, 0x0494,
- 0x0496, 0x0496,
- 0x0498, 0x0498,
- 0x049a, 0x049a,
- 0x049c, 0x049c,
- 0x049e, 0x049e,
- 0x04a0, 0x04a0,
- 0x04a2, 0x04a2,
- 0x04a4, 0x04a4,
- 0x04a6, 0x04a6,
- 0x04a8, 0x04a8,
- 0x04aa, 0x04aa,
- 0x04ac, 0x04ac,
- 0x04ae, 0x04ae,
- 0x04b0, 0x04b0,
- 0x04b2, 0x04b2,
- 0x04b4, 0x04b4,
- 0x04b6, 0x04b6,
- 0x04b8, 0x04b8,
- 0x04ba, 0x04ba,
- 0x04bc, 0x04bc,
- 0x04be, 0x04be,
- 0x04c0, 0x04c1,
- 0x04c3, 0x04c3,
- 0x04c5, 0x04c5,
- 0x04c7, 0x04c7,
- 0x04c9, 0x04c9,
- 0x04cb, 0x04cb,
- 0x04cd, 0x04cd,
- 0x04d0, 0x04d0,
- 0x04d2, 0x04d2,
- 0x04d4, 0x04d4,
- 0x04d6, 0x04d6,
- 0x04d8, 0x04d8,
- 0x04da, 0x04da,
- 0x04dc, 0x04dc,
- 0x04de, 0x04de,
- 0x04e0, 0x04e0,
- 0x04e2, 0x04e2,
- 0x04e4, 0x04e4,
- 0x04e6, 0x04e6,
- 0x04e8, 0x04e8,
- 0x04ea, 0x04ea,
- 0x04ec, 0x04ec,
- 0x04ee, 0x04ee,
- 0x04f0, 0x04f0,
- 0x04f2, 0x04f2,
- 0x04f4, 0x04f4,
- 0x04f6, 0x04f6,
- 0x04f8, 0x04f8,
- 0x04fa, 0x04fa,
- 0x04fc, 0x04fc,
- 0x04fe, 0x04fe,
- 0x0500, 0x0500,
- 0x0502, 0x0502,
- 0x0504, 0x0504,
- 0x0506, 0x0506,
- 0x0508, 0x0508,
- 0x050a, 0x050a,
- 0x050c, 0x050c,
- 0x050e, 0x050e,
- 0x0510, 0x0510,
- 0x0512, 0x0512,
- 0x0514, 0x0514,
- 0x0516, 0x0516,
- 0x0518, 0x0518,
- 0x051a, 0x051a,
- 0x051c, 0x051c,
- 0x051e, 0x051e,
- 0x0520, 0x0520,
- 0x0522, 0x0522,
- 0x0524, 0x0524,
- 0x0526, 0x0526,
- 0x0528, 0x0528,
- 0x052a, 0x052a,
- 0x052c, 0x052c,
- 0x052e, 0x052e,
- 0x0531, 0x0556,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x13a0, 0x13f5,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1e00, 0x1e00,
- 0x1e02, 0x1e02,
- 0x1e04, 0x1e04,
- 0x1e06, 0x1e06,
- 0x1e08, 0x1e08,
- 0x1e0a, 0x1e0a,
- 0x1e0c, 0x1e0c,
- 0x1e0e, 0x1e0e,
- 0x1e10, 0x1e10,
- 0x1e12, 0x1e12,
- 0x1e14, 0x1e14,
- 0x1e16, 0x1e16,
- 0x1e18, 0x1e18,
- 0x1e1a, 0x1e1a,
- 0x1e1c, 0x1e1c,
- 0x1e1e, 0x1e1e,
- 0x1e20, 0x1e20,
- 0x1e22, 0x1e22,
- 0x1e24, 0x1e24,
- 0x1e26, 0x1e26,
- 0x1e28, 0x1e28,
- 0x1e2a, 0x1e2a,
- 0x1e2c, 0x1e2c,
- 0x1e2e, 0x1e2e,
- 0x1e30, 0x1e30,
- 0x1e32, 0x1e32,
- 0x1e34, 0x1e34,
- 0x1e36, 0x1e36,
- 0x1e38, 0x1e38,
- 0x1e3a, 0x1e3a,
- 0x1e3c, 0x1e3c,
- 0x1e3e, 0x1e3e,
- 0x1e40, 0x1e40,
- 0x1e42, 0x1e42,
- 0x1e44, 0x1e44,
- 0x1e46, 0x1e46,
- 0x1e48, 0x1e48,
- 0x1e4a, 0x1e4a,
- 0x1e4c, 0x1e4c,
- 0x1e4e, 0x1e4e,
- 0x1e50, 0x1e50,
- 0x1e52, 0x1e52,
- 0x1e54, 0x1e54,
- 0x1e56, 0x1e56,
- 0x1e58, 0x1e58,
- 0x1e5a, 0x1e5a,
- 0x1e5c, 0x1e5c,
- 0x1e5e, 0x1e5e,
- 0x1e60, 0x1e60,
- 0x1e62, 0x1e62,
- 0x1e64, 0x1e64,
- 0x1e66, 0x1e66,
- 0x1e68, 0x1e68,
- 0x1e6a, 0x1e6a,
- 0x1e6c, 0x1e6c,
- 0x1e6e, 0x1e6e,
- 0x1e70, 0x1e70,
- 0x1e72, 0x1e72,
- 0x1e74, 0x1e74,
- 0x1e76, 0x1e76,
- 0x1e78, 0x1e78,
- 0x1e7a, 0x1e7a,
- 0x1e7c, 0x1e7c,
- 0x1e7e, 0x1e7e,
- 0x1e80, 0x1e80,
- 0x1e82, 0x1e82,
- 0x1e84, 0x1e84,
- 0x1e86, 0x1e86,
- 0x1e88, 0x1e88,
- 0x1e8a, 0x1e8a,
- 0x1e8c, 0x1e8c,
- 0x1e8e, 0x1e8e,
- 0x1e90, 0x1e90,
- 0x1e92, 0x1e92,
- 0x1e94, 0x1e94,
- 0x1e9e, 0x1e9e,
- 0x1ea0, 0x1ea0,
- 0x1ea2, 0x1ea2,
- 0x1ea4, 0x1ea4,
- 0x1ea6, 0x1ea6,
- 0x1ea8, 0x1ea8,
- 0x1eaa, 0x1eaa,
- 0x1eac, 0x1eac,
- 0x1eae, 0x1eae,
- 0x1eb0, 0x1eb0,
- 0x1eb2, 0x1eb2,
- 0x1eb4, 0x1eb4,
- 0x1eb6, 0x1eb6,
- 0x1eb8, 0x1eb8,
- 0x1eba, 0x1eba,
- 0x1ebc, 0x1ebc,
- 0x1ebe, 0x1ebe,
- 0x1ec0, 0x1ec0,
- 0x1ec2, 0x1ec2,
- 0x1ec4, 0x1ec4,
- 0x1ec6, 0x1ec6,
- 0x1ec8, 0x1ec8,
- 0x1eca, 0x1eca,
- 0x1ecc, 0x1ecc,
- 0x1ece, 0x1ece,
- 0x1ed0, 0x1ed0,
- 0x1ed2, 0x1ed2,
- 0x1ed4, 0x1ed4,
- 0x1ed6, 0x1ed6,
- 0x1ed8, 0x1ed8,
- 0x1eda, 0x1eda,
- 0x1edc, 0x1edc,
- 0x1ede, 0x1ede,
- 0x1ee0, 0x1ee0,
- 0x1ee2, 0x1ee2,
- 0x1ee4, 0x1ee4,
- 0x1ee6, 0x1ee6,
- 0x1ee8, 0x1ee8,
- 0x1eea, 0x1eea,
- 0x1eec, 0x1eec,
- 0x1eee, 0x1eee,
- 0x1ef0, 0x1ef0,
- 0x1ef2, 0x1ef2,
- 0x1ef4, 0x1ef4,
- 0x1ef6, 0x1ef6,
- 0x1ef8, 0x1ef8,
- 0x1efa, 0x1efa,
- 0x1efc, 0x1efc,
- 0x1efe, 0x1efe,
- 0x1f08, 0x1f0f,
- 0x1f18, 0x1f1d,
- 0x1f28, 0x1f2f,
- 0x1f38, 0x1f3f,
- 0x1f48, 0x1f4d,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f5f,
- 0x1f68, 0x1f6f,
- 0x1fb8, 0x1fbb,
- 0x1fc8, 0x1fcb,
- 0x1fd8, 0x1fdb,
- 0x1fe8, 0x1fec,
- 0x1ff8, 0x1ffb,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210b, 0x210d,
- 0x2110, 0x2112,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x2130, 0x2133,
- 0x213e, 0x213f,
- 0x2145, 0x2145,
- 0x2183, 0x2183,
- 0x2c00, 0x2c2e,
- 0x2c60, 0x2c60,
- 0x2c62, 0x2c64,
- 0x2c67, 0x2c67,
- 0x2c69, 0x2c69,
- 0x2c6b, 0x2c6b,
- 0x2c6d, 0x2c70,
- 0x2c72, 0x2c72,
- 0x2c75, 0x2c75,
- 0x2c7e, 0x2c80,
- 0x2c82, 0x2c82,
- 0x2c84, 0x2c84,
- 0x2c86, 0x2c86,
- 0x2c88, 0x2c88,
- 0x2c8a, 0x2c8a,
- 0x2c8c, 0x2c8c,
- 0x2c8e, 0x2c8e,
- 0x2c90, 0x2c90,
- 0x2c92, 0x2c92,
- 0x2c94, 0x2c94,
- 0x2c96, 0x2c96,
- 0x2c98, 0x2c98,
- 0x2c9a, 0x2c9a,
- 0x2c9c, 0x2c9c,
- 0x2c9e, 0x2c9e,
- 0x2ca0, 0x2ca0,
- 0x2ca2, 0x2ca2,
- 0x2ca4, 0x2ca4,
- 0x2ca6, 0x2ca6,
- 0x2ca8, 0x2ca8,
- 0x2caa, 0x2caa,
- 0x2cac, 0x2cac,
- 0x2cae, 0x2cae,
- 0x2cb0, 0x2cb0,
- 0x2cb2, 0x2cb2,
- 0x2cb4, 0x2cb4,
- 0x2cb6, 0x2cb6,
- 0x2cb8, 0x2cb8,
- 0x2cba, 0x2cba,
- 0x2cbc, 0x2cbc,
- 0x2cbe, 0x2cbe,
- 0x2cc0, 0x2cc0,
- 0x2cc2, 0x2cc2,
- 0x2cc4, 0x2cc4,
- 0x2cc6, 0x2cc6,
- 0x2cc8, 0x2cc8,
- 0x2cca, 0x2cca,
- 0x2ccc, 0x2ccc,
- 0x2cce, 0x2cce,
- 0x2cd0, 0x2cd0,
- 0x2cd2, 0x2cd2,
- 0x2cd4, 0x2cd4,
- 0x2cd6, 0x2cd6,
- 0x2cd8, 0x2cd8,
- 0x2cda, 0x2cda,
- 0x2cdc, 0x2cdc,
- 0x2cde, 0x2cde,
- 0x2ce0, 0x2ce0,
- 0x2ce2, 0x2ce2,
- 0x2ceb, 0x2ceb,
- 0x2ced, 0x2ced,
- 0x2cf2, 0x2cf2,
- 0xa640, 0xa640,
- 0xa642, 0xa642,
- 0xa644, 0xa644,
- 0xa646, 0xa646,
- 0xa648, 0xa648,
- 0xa64a, 0xa64a,
- 0xa64c, 0xa64c,
- 0xa64e, 0xa64e,
- 0xa650, 0xa650,
- 0xa652, 0xa652,
- 0xa654, 0xa654,
- 0xa656, 0xa656,
- 0xa658, 0xa658,
- 0xa65a, 0xa65a,
- 0xa65c, 0xa65c,
- 0xa65e, 0xa65e,
- 0xa660, 0xa660,
- 0xa662, 0xa662,
- 0xa664, 0xa664,
- 0xa666, 0xa666,
- 0xa668, 0xa668,
- 0xa66a, 0xa66a,
- 0xa66c, 0xa66c,
- 0xa680, 0xa680,
- 0xa682, 0xa682,
- 0xa684, 0xa684,
- 0xa686, 0xa686,
- 0xa688, 0xa688,
- 0xa68a, 0xa68a,
- 0xa68c, 0xa68c,
- 0xa68e, 0xa68e,
- 0xa690, 0xa690,
- 0xa692, 0xa692,
- 0xa694, 0xa694,
- 0xa696, 0xa696,
- 0xa698, 0xa698,
- 0xa69a, 0xa69a,
- 0xa722, 0xa722,
- 0xa724, 0xa724,
- 0xa726, 0xa726,
- 0xa728, 0xa728,
- 0xa72a, 0xa72a,
- 0xa72c, 0xa72c,
- 0xa72e, 0xa72e,
- 0xa732, 0xa732,
- 0xa734, 0xa734,
- 0xa736, 0xa736,
- 0xa738, 0xa738,
- 0xa73a, 0xa73a,
- 0xa73c, 0xa73c,
- 0xa73e, 0xa73e,
- 0xa740, 0xa740,
- 0xa742, 0xa742,
- 0xa744, 0xa744,
- 0xa746, 0xa746,
- 0xa748, 0xa748,
- 0xa74a, 0xa74a,
- 0xa74c, 0xa74c,
- 0xa74e, 0xa74e,
- 0xa750, 0xa750,
- 0xa752, 0xa752,
- 0xa754, 0xa754,
- 0xa756, 0xa756,
- 0xa758, 0xa758,
- 0xa75a, 0xa75a,
- 0xa75c, 0xa75c,
- 0xa75e, 0xa75e,
- 0xa760, 0xa760,
- 0xa762, 0xa762,
- 0xa764, 0xa764,
- 0xa766, 0xa766,
- 0xa768, 0xa768,
- 0xa76a, 0xa76a,
- 0xa76c, 0xa76c,
- 0xa76e, 0xa76e,
- 0xa779, 0xa779,
- 0xa77b, 0xa77b,
- 0xa77d, 0xa77e,
- 0xa780, 0xa780,
- 0xa782, 0xa782,
- 0xa784, 0xa784,
- 0xa786, 0xa786,
- 0xa78b, 0xa78b,
- 0xa78d, 0xa78d,
- 0xa790, 0xa790,
- 0xa792, 0xa792,
- 0xa796, 0xa796,
- 0xa798, 0xa798,
- 0xa79a, 0xa79a,
- 0xa79c, 0xa79c,
- 0xa79e, 0xa79e,
- 0xa7a0, 0xa7a0,
- 0xa7a2, 0xa7a2,
- 0xa7a4, 0xa7a4,
- 0xa7a6, 0xa7a6,
- 0xa7a8, 0xa7a8,
- 0xa7aa, 0xa7ae,
- 0xa7b0, 0xa7b4,
- 0xa7b6, 0xa7b6,
- 0xa7b8, 0xa7b8,
- 0xa7ba, 0xa7ba,
- 0xa7bc, 0xa7bc,
- 0xa7be, 0xa7be,
- 0xa7c2, 0xa7c2,
- 0xa7c4, 0xa7c6,
- 0xff21, 0xff3a,
- 0x10400, 0x10427,
- 0x104b0, 0x104d3,
- 0x10c80, 0x10cb2,
- 0x118a0, 0x118bf,
- 0x16e40, 0x16e5f,
- 0x1d400, 0x1d419,
- 0x1d434, 0x1d44d,
- 0x1d468, 0x1d481,
- 0x1d49c, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b5,
- 0x1d4d0, 0x1d4e9,
- 0x1d504, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d538, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d56c, 0x1d585,
- 0x1d5a0, 0x1d5b9,
- 0x1d5d4, 0x1d5ed,
- 0x1d608, 0x1d621,
- 0x1d63c, 0x1d655,
- 0x1d670, 0x1d689,
- 0x1d6a8, 0x1d6c0,
- 0x1d6e2, 0x1d6fa,
- 0x1d71c, 0x1d734,
- 0x1d756, 0x1d76e,
- 0x1d790, 0x1d7a8,
- 0x1d7ca, 0x1d7ca,
- 0x1e900, 0x1e921,
-}; /* CR_Lu */
-
-/* 'M': Major Category */
-static const OnigCodePoint CR_M[] = {
- 280,
- 0x0300, 0x036f,
- 0x0483, 0x0489,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x0610, 0x061a,
- 0x064b, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dc,
- 0x06df, 0x06e4,
- 0x06e7, 0x06e8,
- 0x06ea, 0x06ed,
- 0x0711, 0x0711,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f3,
- 0x07fd, 0x07fd,
- 0x0816, 0x0819,
- 0x081b, 0x0823,
- 0x0825, 0x0827,
- 0x0829, 0x082d,
- 0x0859, 0x085b,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0903,
- 0x093a, 0x093c,
- 0x093e, 0x094f,
- 0x0951, 0x0957,
- 0x0962, 0x0963,
- 0x0981, 0x0983,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09e2, 0x09e3,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0abc, 0x0abc,
- 0x0abe, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b3c, 0x0b3c,
- 0x0b3e, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0c00, 0x0c04,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c83,
- 0x0cbc, 0x0cbc,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d03,
- 0x0d3b, 0x0d3c,
- 0x0d3e, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d62, 0x0d63,
- 0x0d82, 0x0d83,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e47, 0x0e4e,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0ebc,
- 0x0ec8, 0x0ecd,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f3f,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x102b, 0x103e,
- 0x1056, 0x1059,
- 0x105e, 0x1060,
- 0x1062, 0x1064,
- 0x1067, 0x106d,
- 0x1071, 0x1074,
- 0x1082, 0x108d,
- 0x108f, 0x108f,
- 0x109a, 0x109d,
- 0x135d, 0x135f,
- 0x1712, 0x1714,
- 0x1732, 0x1734,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b4, 0x17d3,
- 0x17dd, 0x17dd,
- 0x180b, 0x180d,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1a17, 0x1a1b,
- 0x1a55, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b04,
- 0x1b34, 0x1b44,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1b82,
- 0x1ba1, 0x1bad,
- 0x1be6, 0x1bf3,
- 0x1c24, 0x1c37,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf7, 0x1cf9,
- 0x1dc0, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x20d0, 0x20f0,
- 0x2cef, 0x2cf1,
- 0x2d7f, 0x2d7f,
- 0x2de0, 0x2dff,
- 0x302a, 0x302f,
- 0x3099, 0x309a,
- 0xa66f, 0xa672,
- 0xa674, 0xa67d,
- 0xa69e, 0xa69f,
- 0xa6f0, 0xa6f1,
- 0xa802, 0xa802,
- 0xa806, 0xa806,
- 0xa80b, 0xa80b,
- 0xa823, 0xa827,
- 0xa880, 0xa881,
- 0xa8b4, 0xa8c5,
- 0xa8e0, 0xa8f1,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92d,
- 0xa947, 0xa953,
- 0xa980, 0xa983,
- 0xa9b3, 0xa9c0,
- 0xa9e5, 0xa9e5,
- 0xaa29, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4d,
- 0xaa7b, 0xaa7d,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabf,
- 0xaac1, 0xaac1,
- 0xaaeb, 0xaaef,
- 0xaaf5, 0xaaf6,
- 0xabe3, 0xabea,
- 0xabec, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10ae5, 0x10ae6,
- 0x10d24, 0x10d27,
- 0x10f46, 0x10f50,
- 0x11000, 0x11002,
- 0x11038, 0x11046,
- 0x1107f, 0x11082,
- 0x110b0, 0x110ba,
- 0x11100, 0x11102,
- 0x11127, 0x11134,
- 0x11145, 0x11146,
- 0x11173, 0x11173,
- 0x11180, 0x11182,
- 0x111b3, 0x111c0,
- 0x111c9, 0x111cc,
- 0x1122c, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112ea,
- 0x11300, 0x11303,
- 0x1133b, 0x1133c,
- 0x1133e, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11357, 0x11357,
- 0x11362, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11435, 0x11446,
- 0x1145e, 0x1145e,
- 0x114b0, 0x114c3,
- 0x115af, 0x115b5,
- 0x115b8, 0x115c0,
- 0x115dc, 0x115dd,
- 0x11630, 0x11640,
- 0x116ab, 0x116b7,
- 0x1171d, 0x1172b,
- 0x1182c, 0x1183a,
- 0x119d1, 0x119d7,
- 0x119da, 0x119e0,
- 0x119e4, 0x119e4,
- 0x11a01, 0x11a0a,
- 0x11a33, 0x11a39,
- 0x11a3b, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a51, 0x11a5b,
- 0x11a8a, 0x11a99,
- 0x11c2f, 0x11c36,
- 0x11c38, 0x11c3f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d45,
- 0x11d47, 0x11d47,
- 0x11d8a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d97,
- 0x11ef3, 0x11ef6,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16f4f, 0x16f4f,
- 0x16f51, 0x16f87,
- 0x16f8f, 0x16f92,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e130, 0x1e136,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e94a,
- 0xe0100, 0xe01ef,
-}; /* CR_M */
-
-/* 'Mc': General Category */
-static const OnigCodePoint CR_Mc[] = {
- 168,
- 0x0903, 0x0903,
- 0x093b, 0x093b,
- 0x093e, 0x0940,
- 0x0949, 0x094c,
- 0x094e, 0x094f,
- 0x0982, 0x0983,
- 0x09be, 0x09c0,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x09d7, 0x09d7,
- 0x0a03, 0x0a03,
- 0x0a3e, 0x0a40,
- 0x0a83, 0x0a83,
- 0x0abe, 0x0ac0,
- 0x0ac9, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0b02, 0x0b03,
- 0x0b3e, 0x0b3e,
- 0x0b40, 0x0b40,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0b57, 0x0b57,
- 0x0bbe, 0x0bbf,
- 0x0bc1, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0bd7, 0x0bd7,
- 0x0c01, 0x0c03,
- 0x0c41, 0x0c44,
- 0x0c82, 0x0c83,
- 0x0cbe, 0x0cbe,
- 0x0cc0, 0x0cc4,
- 0x0cc7, 0x0cc8,
- 0x0cca, 0x0ccb,
- 0x0cd5, 0x0cd6,
- 0x0d02, 0x0d03,
- 0x0d3e, 0x0d40,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d57, 0x0d57,
- 0x0d82, 0x0d83,
- 0x0dcf, 0x0dd1,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0f3e, 0x0f3f,
- 0x0f7f, 0x0f7f,
- 0x102b, 0x102c,
- 0x1031, 0x1031,
- 0x1038, 0x1038,
- 0x103b, 0x103c,
- 0x1056, 0x1057,
- 0x1062, 0x1064,
- 0x1067, 0x106d,
- 0x1083, 0x1084,
- 0x1087, 0x108c,
- 0x108f, 0x108f,
- 0x109a, 0x109c,
- 0x17b6, 0x17b6,
- 0x17be, 0x17c5,
- 0x17c7, 0x17c8,
- 0x1923, 0x1926,
- 0x1929, 0x192b,
- 0x1930, 0x1931,
- 0x1933, 0x1938,
- 0x1a19, 0x1a1a,
- 0x1a55, 0x1a55,
- 0x1a57, 0x1a57,
- 0x1a61, 0x1a61,
- 0x1a63, 0x1a64,
- 0x1a6d, 0x1a72,
- 0x1b04, 0x1b04,
- 0x1b35, 0x1b35,
- 0x1b3b, 0x1b3b,
- 0x1b3d, 0x1b41,
- 0x1b43, 0x1b44,
- 0x1b82, 0x1b82,
- 0x1ba1, 0x1ba1,
- 0x1ba6, 0x1ba7,
- 0x1baa, 0x1baa,
- 0x1be7, 0x1be7,
- 0x1bea, 0x1bec,
- 0x1bee, 0x1bee,
- 0x1bf2, 0x1bf3,
- 0x1c24, 0x1c2b,
- 0x1c34, 0x1c35,
- 0x1ce1, 0x1ce1,
- 0x1cf7, 0x1cf7,
- 0x302e, 0x302f,
- 0xa823, 0xa824,
- 0xa827, 0xa827,
- 0xa880, 0xa881,
- 0xa8b4, 0xa8c3,
- 0xa952, 0xa953,
- 0xa983, 0xa983,
- 0xa9b4, 0xa9b5,
- 0xa9ba, 0xa9bb,
- 0xa9be, 0xa9c0,
- 0xaa2f, 0xaa30,
- 0xaa33, 0xaa34,
- 0xaa4d, 0xaa4d,
- 0xaa7b, 0xaa7b,
- 0xaa7d, 0xaa7d,
- 0xaaeb, 0xaaeb,
- 0xaaee, 0xaaef,
- 0xaaf5, 0xaaf5,
- 0xabe3, 0xabe4,
- 0xabe6, 0xabe7,
- 0xabe9, 0xabea,
- 0xabec, 0xabec,
- 0x11000, 0x11000,
- 0x11002, 0x11002,
- 0x11082, 0x11082,
- 0x110b0, 0x110b2,
- 0x110b7, 0x110b8,
- 0x1112c, 0x1112c,
- 0x11145, 0x11146,
- 0x11182, 0x11182,
- 0x111b3, 0x111b5,
- 0x111bf, 0x111c0,
- 0x1122c, 0x1122e,
- 0x11232, 0x11233,
- 0x11235, 0x11235,
- 0x112e0, 0x112e2,
- 0x11302, 0x11303,
- 0x1133e, 0x1133f,
- 0x11341, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11357, 0x11357,
- 0x11362, 0x11363,
- 0x11435, 0x11437,
- 0x11440, 0x11441,
- 0x11445, 0x11445,
- 0x114b0, 0x114b2,
- 0x114b9, 0x114b9,
- 0x114bb, 0x114be,
- 0x114c1, 0x114c1,
- 0x115af, 0x115b1,
- 0x115b8, 0x115bb,
- 0x115be, 0x115be,
- 0x11630, 0x11632,
- 0x1163b, 0x1163c,
- 0x1163e, 0x1163e,
- 0x116ac, 0x116ac,
- 0x116ae, 0x116af,
- 0x116b6, 0x116b6,
- 0x11720, 0x11721,
- 0x11726, 0x11726,
- 0x1182c, 0x1182e,
- 0x11838, 0x11838,
- 0x119d1, 0x119d3,
- 0x119dc, 0x119df,
- 0x119e4, 0x119e4,
- 0x11a39, 0x11a39,
- 0x11a57, 0x11a58,
- 0x11a97, 0x11a97,
- 0x11c2f, 0x11c2f,
- 0x11c3e, 0x11c3e,
- 0x11ca9, 0x11ca9,
- 0x11cb1, 0x11cb1,
- 0x11cb4, 0x11cb4,
- 0x11d8a, 0x11d8e,
- 0x11d93, 0x11d94,
- 0x11d96, 0x11d96,
- 0x11ef5, 0x11ef6,
- 0x16f51, 0x16f87,
- 0x1d165, 0x1d166,
- 0x1d16d, 0x1d172,
-}; /* CR_Mc */
-
-/* 'Me': General Category */
-static const OnigCodePoint CR_Me[] = {
- 5,
- 0x0488, 0x0489,
- 0x1abe, 0x1abe,
- 0x20dd, 0x20e0,
- 0x20e2, 0x20e4,
- 0xa670, 0xa672,
-}; /* CR_Me */
-
-/* 'Mn': General Category */
-static const OnigCodePoint CR_Mn[] = {
- 318,
- 0x0300, 0x036f,
- 0x0483, 0x0487,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x0610, 0x061a,
- 0x064b, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dc,
- 0x06df, 0x06e4,
- 0x06e7, 0x06e8,
- 0x06ea, 0x06ed,
- 0x0711, 0x0711,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f3,
- 0x07fd, 0x07fd,
- 0x0816, 0x0819,
- 0x081b, 0x0823,
- 0x0825, 0x0827,
- 0x0829, 0x082d,
- 0x0859, 0x085b,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0902,
- 0x093a, 0x093a,
- 0x093c, 0x093c,
- 0x0941, 0x0948,
- 0x094d, 0x094d,
- 0x0951, 0x0957,
- 0x0962, 0x0963,
- 0x0981, 0x0981,
- 0x09bc, 0x09bc,
- 0x09c1, 0x09c4,
- 0x09cd, 0x09cd,
- 0x09e2, 0x09e3,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a02,
- 0x0a3c, 0x0a3c,
- 0x0a41, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a82,
- 0x0abc, 0x0abc,
- 0x0ac1, 0x0ac5,
- 0x0ac7, 0x0ac8,
- 0x0acd, 0x0acd,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0aff,
- 0x0b01, 0x0b01,
- 0x0b3c, 0x0b3c,
- 0x0b3f, 0x0b3f,
- 0x0b41, 0x0b44,
- 0x0b4d, 0x0b4d,
- 0x0b56, 0x0b56,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bc0, 0x0bc0,
- 0x0bcd, 0x0bcd,
- 0x0c00, 0x0c00,
- 0x0c04, 0x0c04,
- 0x0c3e, 0x0c40,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c81,
- 0x0cbc, 0x0cbc,
- 0x0cbf, 0x0cbf,
- 0x0cc6, 0x0cc6,
- 0x0ccc, 0x0ccd,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d01,
- 0x0d3b, 0x0d3c,
- 0x0d41, 0x0d44,
- 0x0d4d, 0x0d4d,
- 0x0d62, 0x0d63,
- 0x0dca, 0x0dca,
- 0x0dd2, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e47, 0x0e4e,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0ebc,
- 0x0ec8, 0x0ecd,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f71, 0x0f7e,
- 0x0f80, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x102d, 0x1030,
- 0x1032, 0x1037,
- 0x1039, 0x103a,
- 0x103d, 0x103e,
- 0x1058, 0x1059,
- 0x105e, 0x1060,
- 0x1071, 0x1074,
- 0x1082, 0x1082,
- 0x1085, 0x1086,
- 0x108d, 0x108d,
- 0x109d, 0x109d,
- 0x135d, 0x135f,
- 0x1712, 0x1714,
- 0x1732, 0x1734,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b4, 0x17b5,
- 0x17b7, 0x17bd,
- 0x17c6, 0x17c6,
- 0x17c9, 0x17d3,
- 0x17dd, 0x17dd,
- 0x180b, 0x180d,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x1922,
- 0x1927, 0x1928,
- 0x1932, 0x1932,
- 0x1939, 0x193b,
- 0x1a17, 0x1a18,
- 0x1a1b, 0x1a1b,
- 0x1a56, 0x1a56,
- 0x1a58, 0x1a5e,
- 0x1a60, 0x1a60,
- 0x1a62, 0x1a62,
- 0x1a65, 0x1a6c,
- 0x1a73, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1ab0, 0x1abd,
- 0x1b00, 0x1b03,
- 0x1b34, 0x1b34,
- 0x1b36, 0x1b3a,
- 0x1b3c, 0x1b3c,
- 0x1b42, 0x1b42,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1b81,
- 0x1ba2, 0x1ba5,
- 0x1ba8, 0x1ba9,
- 0x1bab, 0x1bad,
- 0x1be6, 0x1be6,
- 0x1be8, 0x1be9,
- 0x1bed, 0x1bed,
- 0x1bef, 0x1bf1,
- 0x1c2c, 0x1c33,
- 0x1c36, 0x1c37,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce0,
- 0x1ce2, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf8, 0x1cf9,
- 0x1dc0, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x20d0, 0x20dc,
- 0x20e1, 0x20e1,
- 0x20e5, 0x20f0,
- 0x2cef, 0x2cf1,
- 0x2d7f, 0x2d7f,
- 0x2de0, 0x2dff,
- 0x302a, 0x302d,
- 0x3099, 0x309a,
- 0xa66f, 0xa66f,
- 0xa674, 0xa67d,
- 0xa69e, 0xa69f,
- 0xa6f0, 0xa6f1,
- 0xa802, 0xa802,
- 0xa806, 0xa806,
- 0xa80b, 0xa80b,
- 0xa825, 0xa826,
- 0xa8c4, 0xa8c5,
- 0xa8e0, 0xa8f1,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92d,
- 0xa947, 0xa951,
- 0xa980, 0xa982,
- 0xa9b3, 0xa9b3,
- 0xa9b6, 0xa9b9,
- 0xa9bc, 0xa9bd,
- 0xa9e5, 0xa9e5,
- 0xaa29, 0xaa2e,
- 0xaa31, 0xaa32,
- 0xaa35, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4c,
- 0xaa7c, 0xaa7c,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabf,
- 0xaac1, 0xaac1,
- 0xaaec, 0xaaed,
- 0xaaf6, 0xaaf6,
- 0xabe5, 0xabe5,
- 0xabe8, 0xabe8,
- 0xabed, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10ae5, 0x10ae6,
- 0x10d24, 0x10d27,
- 0x10f46, 0x10f50,
- 0x11001, 0x11001,
- 0x11038, 0x11046,
- 0x1107f, 0x11081,
- 0x110b3, 0x110b6,
- 0x110b9, 0x110ba,
- 0x11100, 0x11102,
- 0x11127, 0x1112b,
- 0x1112d, 0x11134,
- 0x11173, 0x11173,
- 0x11180, 0x11181,
- 0x111b6, 0x111be,
- 0x111c9, 0x111cc,
- 0x1122f, 0x11231,
- 0x11234, 0x11234,
- 0x11236, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112df,
- 0x112e3, 0x112ea,
- 0x11300, 0x11301,
- 0x1133b, 0x1133c,
- 0x11340, 0x11340,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11438, 0x1143f,
- 0x11442, 0x11444,
- 0x11446, 0x11446,
- 0x1145e, 0x1145e,
- 0x114b3, 0x114b8,
- 0x114ba, 0x114ba,
- 0x114bf, 0x114c0,
- 0x114c2, 0x114c3,
- 0x115b2, 0x115b5,
- 0x115bc, 0x115bd,
- 0x115bf, 0x115c0,
- 0x115dc, 0x115dd,
- 0x11633, 0x1163a,
- 0x1163d, 0x1163d,
- 0x1163f, 0x11640,
- 0x116ab, 0x116ab,
- 0x116ad, 0x116ad,
- 0x116b0, 0x116b5,
- 0x116b7, 0x116b7,
- 0x1171d, 0x1171f,
- 0x11722, 0x11725,
- 0x11727, 0x1172b,
- 0x1182f, 0x11837,
- 0x11839, 0x1183a,
- 0x119d4, 0x119d7,
- 0x119da, 0x119db,
- 0x119e0, 0x119e0,
- 0x11a01, 0x11a0a,
- 0x11a33, 0x11a38,
- 0x11a3b, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a51, 0x11a56,
- 0x11a59, 0x11a5b,
- 0x11a8a, 0x11a96,
- 0x11a98, 0x11a99,
- 0x11c30, 0x11c36,
- 0x11c38, 0x11c3d,
- 0x11c3f, 0x11c3f,
- 0x11c92, 0x11ca7,
- 0x11caa, 0x11cb0,
- 0x11cb2, 0x11cb3,
- 0x11cb5, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d45,
- 0x11d47, 0x11d47,
- 0x11d90, 0x11d91,
- 0x11d95, 0x11d95,
- 0x11d97, 0x11d97,
- 0x11ef3, 0x11ef4,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16f4f, 0x16f4f,
- 0x16f8f, 0x16f92,
- 0x1bc9d, 0x1bc9e,
- 0x1d167, 0x1d169,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e130, 0x1e136,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e94a,
- 0xe0100, 0xe01ef,
-}; /* CR_Mn */
-
-/* 'N': Major Category */
-static const OnigCodePoint CR_N[] = {
- 130,
- 0x0030, 0x0039,
- 0x00b2, 0x00b3,
- 0x00b9, 0x00b9,
- 0x00bc, 0x00be,
- 0x0660, 0x0669,
- 0x06f0, 0x06f9,
- 0x07c0, 0x07c9,
- 0x0966, 0x096f,
- 0x09e6, 0x09ef,
- 0x09f4, 0x09f9,
- 0x0a66, 0x0a6f,
- 0x0ae6, 0x0aef,
- 0x0b66, 0x0b6f,
- 0x0b72, 0x0b77,
- 0x0be6, 0x0bf2,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7e,
- 0x0ce6, 0x0cef,
- 0x0d58, 0x0d5e,
- 0x0d66, 0x0d78,
- 0x0de6, 0x0def,
- 0x0e50, 0x0e59,
- 0x0ed0, 0x0ed9,
- 0x0f20, 0x0f33,
- 0x1040, 0x1049,
- 0x1090, 0x1099,
- 0x1369, 0x137c,
- 0x16ee, 0x16f0,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1810, 0x1819,
- 0x1946, 0x194f,
- 0x19d0, 0x19da,
- 0x1a80, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1b50, 0x1b59,
- 0x1bb0, 0x1bb9,
- 0x1c40, 0x1c49,
- 0x1c50, 0x1c59,
- 0x2070, 0x2070,
- 0x2074, 0x2079,
- 0x2080, 0x2089,
- 0x2150, 0x2182,
- 0x2185, 0x2189,
- 0x2460, 0x249b,
- 0x24ea, 0x24ff,
- 0x2776, 0x2793,
- 0x2cfd, 0x2cfd,
- 0x3007, 0x3007,
- 0x3021, 0x3029,
- 0x3038, 0x303a,
- 0x3192, 0x3195,
- 0x3220, 0x3229,
- 0x3248, 0x324f,
- 0x3251, 0x325f,
- 0x3280, 0x3289,
- 0x32b1, 0x32bf,
- 0xa620, 0xa629,
- 0xa6e6, 0xa6ef,
- 0xa830, 0xa835,
- 0xa8d0, 0xa8d9,
- 0xa900, 0xa909,
- 0xa9d0, 0xa9d9,
- 0xa9f0, 0xa9f9,
- 0xaa50, 0xaa59,
- 0xabf0, 0xabf9,
- 0xff10, 0xff19,
- 0x10107, 0x10133,
- 0x10140, 0x10178,
- 0x1018a, 0x1018b,
- 0x102e1, 0x102fb,
- 0x10320, 0x10323,
- 0x10341, 0x10341,
- 0x1034a, 0x1034a,
- 0x103d1, 0x103d5,
- 0x104a0, 0x104a9,
- 0x10858, 0x1085f,
- 0x10879, 0x1087f,
- 0x108a7, 0x108af,
- 0x108fb, 0x108ff,
- 0x10916, 0x1091b,
- 0x109bc, 0x109bd,
- 0x109c0, 0x109cf,
- 0x109d2, 0x109ff,
- 0x10a40, 0x10a48,
- 0x10a7d, 0x10a7e,
- 0x10a9d, 0x10a9f,
- 0x10aeb, 0x10aef,
- 0x10b58, 0x10b5f,
- 0x10b78, 0x10b7f,
- 0x10ba9, 0x10baf,
- 0x10cfa, 0x10cff,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f1d, 0x10f26,
- 0x10f51, 0x10f54,
- 0x11052, 0x1106f,
- 0x110f0, 0x110f9,
- 0x11136, 0x1113f,
- 0x111d0, 0x111d9,
- 0x111e1, 0x111f4,
- 0x112f0, 0x112f9,
- 0x11450, 0x11459,
- 0x114d0, 0x114d9,
- 0x11650, 0x11659,
- 0x116c0, 0x116c9,
- 0x11730, 0x1173b,
- 0x118e0, 0x118f2,
- 0x11c50, 0x11c6c,
- 0x11d50, 0x11d59,
- 0x11da0, 0x11da9,
- 0x11fc0, 0x11fd4,
- 0x12400, 0x1246e,
- 0x16a60, 0x16a69,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16e80, 0x16e96,
- 0x1d2e0, 0x1d2f3,
- 0x1d360, 0x1d378,
- 0x1d7ce, 0x1d7ff,
- 0x1e140, 0x1e149,
- 0x1e2f0, 0x1e2f9,
- 0x1e8c7, 0x1e8cf,
- 0x1e950, 0x1e959,
- 0x1ec71, 0x1ecab,
- 0x1ecad, 0x1ecaf,
- 0x1ecb1, 0x1ecb4,
- 0x1ed01, 0x1ed2d,
- 0x1ed2f, 0x1ed3d,
- 0x1f100, 0x1f10c,
-}; /* CR_N */
-
-/* 'Nd': General Category */
-#define CR_Nd CR_Digit
-
-/* 'Nl': General Category */
-static const OnigCodePoint CR_Nl[] = {
- 12,
- 0x16ee, 0x16f0,
- 0x2160, 0x2182,
- 0x2185, 0x2188,
- 0x3007, 0x3007,
- 0x3021, 0x3029,
- 0x3038, 0x303a,
- 0xa6e6, 0xa6ef,
- 0x10140, 0x10174,
- 0x10341, 0x10341,
- 0x1034a, 0x1034a,
- 0x103d1, 0x103d5,
- 0x12400, 0x1246e,
-}; /* CR_Nl */
-
-/* 'No': General Category */
-static const OnigCodePoint CR_No[] = {
- 70,
- 0x00b2, 0x00b3,
- 0x00b9, 0x00b9,
- 0x00bc, 0x00be,
- 0x09f4, 0x09f9,
- 0x0b72, 0x0b77,
- 0x0bf0, 0x0bf2,
- 0x0c78, 0x0c7e,
- 0x0d58, 0x0d5e,
- 0x0d70, 0x0d78,
- 0x0f2a, 0x0f33,
- 0x1369, 0x137c,
- 0x17f0, 0x17f9,
- 0x19da, 0x19da,
- 0x2070, 0x2070,
- 0x2074, 0x2079,
- 0x2080, 0x2089,
- 0x2150, 0x215f,
- 0x2189, 0x2189,
- 0x2460, 0x249b,
- 0x24ea, 0x24ff,
- 0x2776, 0x2793,
- 0x2cfd, 0x2cfd,
- 0x3192, 0x3195,
- 0x3220, 0x3229,
- 0x3248, 0x324f,
- 0x3251, 0x325f,
- 0x3280, 0x3289,
- 0x32b1, 0x32bf,
- 0xa830, 0xa835,
- 0x10107, 0x10133,
- 0x10175, 0x10178,
- 0x1018a, 0x1018b,
- 0x102e1, 0x102fb,
- 0x10320, 0x10323,
- 0x10858, 0x1085f,
- 0x10879, 0x1087f,
- 0x108a7, 0x108af,
- 0x108fb, 0x108ff,
- 0x10916, 0x1091b,
- 0x109bc, 0x109bd,
- 0x109c0, 0x109cf,
- 0x109d2, 0x109ff,
- 0x10a40, 0x10a48,
- 0x10a7d, 0x10a7e,
- 0x10a9d, 0x10a9f,
- 0x10aeb, 0x10aef,
- 0x10b58, 0x10b5f,
- 0x10b78, 0x10b7f,
- 0x10ba9, 0x10baf,
- 0x10cfa, 0x10cff,
- 0x10e60, 0x10e7e,
- 0x10f1d, 0x10f26,
- 0x10f51, 0x10f54,
- 0x11052, 0x11065,
- 0x111e1, 0x111f4,
- 0x1173a, 0x1173b,
- 0x118ea, 0x118f2,
- 0x11c5a, 0x11c6c,
- 0x11fc0, 0x11fd4,
- 0x16b5b, 0x16b61,
- 0x16e80, 0x16e96,
- 0x1d2e0, 0x1d2f3,
- 0x1d360, 0x1d378,
- 0x1e8c7, 0x1e8cf,
- 0x1ec71, 0x1ecab,
- 0x1ecad, 0x1ecaf,
- 0x1ecb1, 0x1ecb4,
- 0x1ed01, 0x1ed2d,
- 0x1ed2f, 0x1ed3d,
- 0x1f100, 0x1f10c,
-}; /* CR_No */
-
-/* 'P': Major Category */
-#define CR_P CR_Punct
-
-/* 'Pc': General Category */
-static const OnigCodePoint CR_Pc[] = {
- 6,
- 0x005f, 0x005f,
- 0x203f, 0x2040,
- 0x2054, 0x2054,
- 0xfe33, 0xfe34,
- 0xfe4d, 0xfe4f,
- 0xff3f, 0xff3f,
-}; /* CR_Pc */
-
-/* 'Pd': General Category */
-static const OnigCodePoint CR_Pd[] = {
- 17,
- 0x002d, 0x002d,
- 0x058a, 0x058a,
- 0x05be, 0x05be,
- 0x1400, 0x1400,
- 0x1806, 0x1806,
- 0x2010, 0x2015,
- 0x2e17, 0x2e17,
- 0x2e1a, 0x2e1a,
- 0x2e3a, 0x2e3b,
- 0x2e40, 0x2e40,
- 0x301c, 0x301c,
- 0x3030, 0x3030,
- 0x30a0, 0x30a0,
- 0xfe31, 0xfe32,
- 0xfe58, 0xfe58,
- 0xfe63, 0xfe63,
- 0xff0d, 0xff0d,
-}; /* CR_Pd */
-
-/* 'Pe': General Category */
-static const OnigCodePoint CR_Pe[] = {
- 72,
- 0x0029, 0x0029,
- 0x005d, 0x005d,
- 0x007d, 0x007d,
- 0x0f3b, 0x0f3b,
- 0x0f3d, 0x0f3d,
- 0x169c, 0x169c,
- 0x2046, 0x2046,
- 0x207e, 0x207e,
- 0x208e, 0x208e,
- 0x2309, 0x2309,
- 0x230b, 0x230b,
- 0x232a, 0x232a,
- 0x2769, 0x2769,
- 0x276b, 0x276b,
- 0x276d, 0x276d,
- 0x276f, 0x276f,
- 0x2771, 0x2771,
- 0x2773, 0x2773,
- 0x2775, 0x2775,
- 0x27c6, 0x27c6,
- 0x27e7, 0x27e7,
- 0x27e9, 0x27e9,
- 0x27eb, 0x27eb,
- 0x27ed, 0x27ed,
- 0x27ef, 0x27ef,
- 0x2984, 0x2984,
- 0x2986, 0x2986,
- 0x2988, 0x2988,
- 0x298a, 0x298a,
- 0x298c, 0x298c,
- 0x298e, 0x298e,
- 0x2990, 0x2990,
- 0x2992, 0x2992,
- 0x2994, 0x2994,
- 0x2996, 0x2996,
- 0x2998, 0x2998,
- 0x29d9, 0x29d9,
- 0x29db, 0x29db,
- 0x29fd, 0x29fd,
- 0x2e23, 0x2e23,
- 0x2e25, 0x2e25,
- 0x2e27, 0x2e27,
- 0x2e29, 0x2e29,
- 0x3009, 0x3009,
- 0x300b, 0x300b,
- 0x300d, 0x300d,
- 0x300f, 0x300f,
- 0x3011, 0x3011,
- 0x3015, 0x3015,
- 0x3017, 0x3017,
- 0x3019, 0x3019,
- 0x301b, 0x301b,
- 0x301e, 0x301f,
- 0xfd3e, 0xfd3e,
- 0xfe18, 0xfe18,
- 0xfe36, 0xfe36,
- 0xfe38, 0xfe38,
- 0xfe3a, 0xfe3a,
- 0xfe3c, 0xfe3c,
- 0xfe3e, 0xfe3e,
- 0xfe40, 0xfe40,
- 0xfe42, 0xfe42,
- 0xfe44, 0xfe44,
- 0xfe48, 0xfe48,
- 0xfe5a, 0xfe5a,
- 0xfe5c, 0xfe5c,
- 0xfe5e, 0xfe5e,
- 0xff09, 0xff09,
- 0xff3d, 0xff3d,
- 0xff5d, 0xff5d,
- 0xff60, 0xff60,
- 0xff63, 0xff63,
-}; /* CR_Pe */
-
-/* 'Pf': General Category */
-static const OnigCodePoint CR_Pf[] = {
- 10,
- 0x00bb, 0x00bb,
- 0x2019, 0x2019,
- 0x201d, 0x201d,
- 0x203a, 0x203a,
- 0x2e03, 0x2e03,
- 0x2e05, 0x2e05,
- 0x2e0a, 0x2e0a,
- 0x2e0d, 0x2e0d,
- 0x2e1d, 0x2e1d,
- 0x2e21, 0x2e21,
-}; /* CR_Pf */
-
-/* 'Pi': General Category */
-static const OnigCodePoint CR_Pi[] = {
- 11,
- 0x00ab, 0x00ab,
- 0x2018, 0x2018,
- 0x201b, 0x201c,
- 0x201f, 0x201f,
- 0x2039, 0x2039,
- 0x2e02, 0x2e02,
- 0x2e04, 0x2e04,
- 0x2e09, 0x2e09,
- 0x2e0c, 0x2e0c,
- 0x2e1c, 0x2e1c,
- 0x2e20, 0x2e20,
-}; /* CR_Pi */
-
-/* 'Po': General Category */
-static const OnigCodePoint CR_Po[] = {
- 179,
- 0x0021, 0x0023,
- 0x0025, 0x0027,
- 0x002a, 0x002a,
- 0x002c, 0x002c,
- 0x002e, 0x002f,
- 0x003a, 0x003b,
- 0x003f, 0x0040,
- 0x005c, 0x005c,
- 0x00a1, 0x00a1,
- 0x00a7, 0x00a7,
- 0x00b6, 0x00b7,
- 0x00bf, 0x00bf,
- 0x037e, 0x037e,
- 0x0387, 0x0387,
- 0x055a, 0x055f,
- 0x0589, 0x0589,
- 0x05c0, 0x05c0,
- 0x05c3, 0x05c3,
- 0x05c6, 0x05c6,
- 0x05f3, 0x05f4,
- 0x0609, 0x060a,
- 0x060c, 0x060d,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x066a, 0x066d,
- 0x06d4, 0x06d4,
- 0x0700, 0x070d,
- 0x07f7, 0x07f9,
- 0x0830, 0x083e,
- 0x085e, 0x085e,
- 0x0964, 0x0965,
- 0x0970, 0x0970,
- 0x09fd, 0x09fd,
- 0x0a76, 0x0a76,
- 0x0af0, 0x0af0,
- 0x0c77, 0x0c77,
- 0x0c84, 0x0c84,
- 0x0df4, 0x0df4,
- 0x0e4f, 0x0e4f,
- 0x0e5a, 0x0e5b,
- 0x0f04, 0x0f12,
- 0x0f14, 0x0f14,
- 0x0f85, 0x0f85,
- 0x0fd0, 0x0fd4,
- 0x0fd9, 0x0fda,
- 0x104a, 0x104f,
- 0x10fb, 0x10fb,
- 0x1360, 0x1368,
- 0x166e, 0x166e,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x17d4, 0x17d6,
- 0x17d8, 0x17da,
- 0x1800, 0x1805,
- 0x1807, 0x180a,
- 0x1944, 0x1945,
- 0x1a1e, 0x1a1f,
- 0x1aa0, 0x1aa6,
- 0x1aa8, 0x1aad,
- 0x1b5a, 0x1b60,
- 0x1bfc, 0x1bff,
- 0x1c3b, 0x1c3f,
- 0x1c7e, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd3, 0x1cd3,
- 0x2016, 0x2017,
- 0x2020, 0x2027,
- 0x2030, 0x2038,
- 0x203b, 0x203e,
- 0x2041, 0x2043,
- 0x2047, 0x2051,
- 0x2053, 0x2053,
- 0x2055, 0x205e,
- 0x2cf9, 0x2cfc,
- 0x2cfe, 0x2cff,
- 0x2d70, 0x2d70,
- 0x2e00, 0x2e01,
- 0x2e06, 0x2e08,
- 0x2e0b, 0x2e0b,
- 0x2e0e, 0x2e16,
- 0x2e18, 0x2e19,
- 0x2e1b, 0x2e1b,
- 0x2e1e, 0x2e1f,
- 0x2e2a, 0x2e2e,
- 0x2e30, 0x2e39,
- 0x2e3c, 0x2e3f,
- 0x2e41, 0x2e41,
- 0x2e43, 0x2e4f,
- 0x3001, 0x3003,
- 0x303d, 0x303d,
- 0x30fb, 0x30fb,
- 0xa4fe, 0xa4ff,
- 0xa60d, 0xa60f,
- 0xa673, 0xa673,
- 0xa67e, 0xa67e,
- 0xa6f2, 0xa6f7,
- 0xa874, 0xa877,
- 0xa8ce, 0xa8cf,
- 0xa8f8, 0xa8fa,
- 0xa8fc, 0xa8fc,
- 0xa92e, 0xa92f,
- 0xa95f, 0xa95f,
- 0xa9c1, 0xa9cd,
- 0xa9de, 0xa9df,
- 0xaa5c, 0xaa5f,
- 0xaade, 0xaadf,
- 0xaaf0, 0xaaf1,
- 0xabeb, 0xabeb,
- 0xfe10, 0xfe16,
- 0xfe19, 0xfe19,
- 0xfe30, 0xfe30,
- 0xfe45, 0xfe46,
- 0xfe49, 0xfe4c,
- 0xfe50, 0xfe52,
- 0xfe54, 0xfe57,
- 0xfe5f, 0xfe61,
- 0xfe68, 0xfe68,
- 0xfe6a, 0xfe6b,
- 0xff01, 0xff03,
- 0xff05, 0xff07,
- 0xff0a, 0xff0a,
- 0xff0c, 0xff0c,
- 0xff0e, 0xff0f,
- 0xff1a, 0xff1b,
- 0xff1f, 0xff20,
- 0xff3c, 0xff3c,
- 0xff61, 0xff61,
- 0xff64, 0xff65,
- 0x10100, 0x10102,
- 0x1039f, 0x1039f,
- 0x103d0, 0x103d0,
- 0x1056f, 0x1056f,
- 0x10857, 0x10857,
- 0x1091f, 0x1091f,
- 0x1093f, 0x1093f,
- 0x10a50, 0x10a58,
- 0x10a7f, 0x10a7f,
- 0x10af0, 0x10af6,
- 0x10b39, 0x10b3f,
- 0x10b99, 0x10b9c,
- 0x10f55, 0x10f59,
- 0x11047, 0x1104d,
- 0x110bb, 0x110bc,
- 0x110be, 0x110c1,
- 0x11140, 0x11143,
- 0x11174, 0x11175,
- 0x111c5, 0x111c8,
- 0x111cd, 0x111cd,
- 0x111db, 0x111db,
- 0x111dd, 0x111df,
- 0x11238, 0x1123d,
- 0x112a9, 0x112a9,
- 0x1144b, 0x1144f,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x114c6, 0x114c6,
- 0x115c1, 0x115d7,
- 0x11641, 0x11643,
- 0x11660, 0x1166c,
- 0x1173c, 0x1173e,
- 0x1183b, 0x1183b,
- 0x119e2, 0x119e2,
- 0x11a3f, 0x11a46,
- 0x11a9a, 0x11a9c,
- 0x11a9e, 0x11aa2,
- 0x11c41, 0x11c45,
- 0x11c70, 0x11c71,
- 0x11ef7, 0x11ef8,
- 0x11fff, 0x11fff,
- 0x12470, 0x12474,
- 0x16a6e, 0x16a6f,
- 0x16af5, 0x16af5,
- 0x16b37, 0x16b3b,
- 0x16b44, 0x16b44,
- 0x16e97, 0x16e9a,
- 0x16fe2, 0x16fe2,
- 0x1bc9f, 0x1bc9f,
- 0x1da87, 0x1da8b,
- 0x1e95e, 0x1e95f,
-}; /* CR_Po */
-
-/* 'Ps': General Category */
-static const OnigCodePoint CR_Ps[] = {
- 75,
- 0x0028, 0x0028,
- 0x005b, 0x005b,
- 0x007b, 0x007b,
- 0x0f3a, 0x0f3a,
- 0x0f3c, 0x0f3c,
- 0x169b, 0x169b,
- 0x201a, 0x201a,
- 0x201e, 0x201e,
- 0x2045, 0x2045,
- 0x207d, 0x207d,
- 0x208d, 0x208d,
- 0x2308, 0x2308,
- 0x230a, 0x230a,
- 0x2329, 0x2329,
- 0x2768, 0x2768,
- 0x276a, 0x276a,
- 0x276c, 0x276c,
- 0x276e, 0x276e,
- 0x2770, 0x2770,
- 0x2772, 0x2772,
- 0x2774, 0x2774,
- 0x27c5, 0x27c5,
- 0x27e6, 0x27e6,
- 0x27e8, 0x27e8,
- 0x27ea, 0x27ea,
- 0x27ec, 0x27ec,
- 0x27ee, 0x27ee,
- 0x2983, 0x2983,
- 0x2985, 0x2985,
- 0x2987, 0x2987,
- 0x2989, 0x2989,
- 0x298b, 0x298b,
- 0x298d, 0x298d,
- 0x298f, 0x298f,
- 0x2991, 0x2991,
- 0x2993, 0x2993,
- 0x2995, 0x2995,
- 0x2997, 0x2997,
- 0x29d8, 0x29d8,
- 0x29da, 0x29da,
- 0x29fc, 0x29fc,
- 0x2e22, 0x2e22,
- 0x2e24, 0x2e24,
- 0x2e26, 0x2e26,
- 0x2e28, 0x2e28,
- 0x2e42, 0x2e42,
- 0x3008, 0x3008,
- 0x300a, 0x300a,
- 0x300c, 0x300c,
- 0x300e, 0x300e,
- 0x3010, 0x3010,
- 0x3014, 0x3014,
- 0x3016, 0x3016,
- 0x3018, 0x3018,
- 0x301a, 0x301a,
- 0x301d, 0x301d,
- 0xfd3f, 0xfd3f,
- 0xfe17, 0xfe17,
- 0xfe35, 0xfe35,
- 0xfe37, 0xfe37,
- 0xfe39, 0xfe39,
- 0xfe3b, 0xfe3b,
- 0xfe3d, 0xfe3d,
- 0xfe3f, 0xfe3f,
- 0xfe41, 0xfe41,
- 0xfe43, 0xfe43,
- 0xfe47, 0xfe47,
- 0xfe59, 0xfe59,
- 0xfe5b, 0xfe5b,
- 0xfe5d, 0xfe5d,
- 0xff08, 0xff08,
- 0xff3b, 0xff3b,
- 0xff5b, 0xff5b,
- 0xff5f, 0xff5f,
- 0xff62, 0xff62,
-}; /* CR_Ps */
-
-/* 'S': Major Category */
-static const OnigCodePoint CR_S[] = {
- 226,
- 0x0024, 0x0024,
- 0x002b, 0x002b,
- 0x003c, 0x003e,
- 0x005e, 0x005e,
- 0x0060, 0x0060,
- 0x007c, 0x007c,
- 0x007e, 0x007e,
- 0x00a2, 0x00a6,
- 0x00a8, 0x00a9,
- 0x00ac, 0x00ac,
- 0x00ae, 0x00b1,
- 0x00b4, 0x00b4,
- 0x00b8, 0x00b8,
- 0x00d7, 0x00d7,
- 0x00f7, 0x00f7,
- 0x02c2, 0x02c5,
- 0x02d2, 0x02df,
- 0x02e5, 0x02eb,
- 0x02ed, 0x02ed,
- 0x02ef, 0x02ff,
- 0x0375, 0x0375,
- 0x0384, 0x0385,
- 0x03f6, 0x03f6,
- 0x0482, 0x0482,
- 0x058d, 0x058f,
- 0x0606, 0x0608,
- 0x060b, 0x060b,
- 0x060e, 0x060f,
- 0x06de, 0x06de,
- 0x06e9, 0x06e9,
- 0x06fd, 0x06fe,
- 0x07f6, 0x07f6,
- 0x07fe, 0x07ff,
- 0x09f2, 0x09f3,
- 0x09fa, 0x09fb,
- 0x0af1, 0x0af1,
- 0x0b70, 0x0b70,
- 0x0bf3, 0x0bfa,
- 0x0c7f, 0x0c7f,
- 0x0d4f, 0x0d4f,
- 0x0d79, 0x0d79,
- 0x0e3f, 0x0e3f,
- 0x0f01, 0x0f03,
- 0x0f13, 0x0f13,
- 0x0f15, 0x0f17,
- 0x0f1a, 0x0f1f,
- 0x0f34, 0x0f34,
- 0x0f36, 0x0f36,
- 0x0f38, 0x0f38,
- 0x0fbe, 0x0fc5,
- 0x0fc7, 0x0fcc,
- 0x0fce, 0x0fcf,
- 0x0fd5, 0x0fd8,
- 0x109e, 0x109f,
- 0x1390, 0x1399,
- 0x166d, 0x166d,
- 0x17db, 0x17db,
- 0x1940, 0x1940,
- 0x19de, 0x19ff,
- 0x1b61, 0x1b6a,
- 0x1b74, 0x1b7c,
- 0x1fbd, 0x1fbd,
- 0x1fbf, 0x1fc1,
- 0x1fcd, 0x1fcf,
- 0x1fdd, 0x1fdf,
- 0x1fed, 0x1fef,
- 0x1ffd, 0x1ffe,
- 0x2044, 0x2044,
- 0x2052, 0x2052,
- 0x207a, 0x207c,
- 0x208a, 0x208c,
- 0x20a0, 0x20bf,
- 0x2100, 0x2101,
- 0x2103, 0x2106,
- 0x2108, 0x2109,
- 0x2114, 0x2114,
- 0x2116, 0x2118,
- 0x211e, 0x2123,
- 0x2125, 0x2125,
- 0x2127, 0x2127,
- 0x2129, 0x2129,
- 0x212e, 0x212e,
- 0x213a, 0x213b,
- 0x2140, 0x2144,
- 0x214a, 0x214d,
- 0x214f, 0x214f,
- 0x218a, 0x218b,
- 0x2190, 0x2307,
- 0x230c, 0x2328,
- 0x232b, 0x2426,
- 0x2440, 0x244a,
- 0x249c, 0x24e9,
- 0x2500, 0x2767,
- 0x2794, 0x27c4,
- 0x27c7, 0x27e5,
- 0x27f0, 0x2982,
- 0x2999, 0x29d7,
- 0x29dc, 0x29fb,
- 0x29fe, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bff,
- 0x2ce5, 0x2cea,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3004, 0x3004,
- 0x3012, 0x3013,
- 0x3020, 0x3020,
- 0x3036, 0x3037,
- 0x303e, 0x303f,
- 0x309b, 0x309c,
- 0x3190, 0x3191,
- 0x3196, 0x319f,
- 0x31c0, 0x31e3,
- 0x3200, 0x321e,
- 0x322a, 0x3247,
- 0x3250, 0x3250,
- 0x3260, 0x327f,
- 0x328a, 0x32b0,
- 0x32c0, 0x33ff,
- 0x4dc0, 0x4dff,
- 0xa490, 0xa4c6,
- 0xa700, 0xa716,
- 0xa720, 0xa721,
- 0xa789, 0xa78a,
- 0xa828, 0xa82b,
- 0xa836, 0xa839,
- 0xaa77, 0xaa79,
- 0xab5b, 0xab5b,
- 0xfb29, 0xfb29,
- 0xfbb2, 0xfbc1,
- 0xfdfc, 0xfdfd,
- 0xfe62, 0xfe62,
- 0xfe64, 0xfe66,
- 0xfe69, 0xfe69,
- 0xff04, 0xff04,
- 0xff0b, 0xff0b,
- 0xff1c, 0xff1e,
- 0xff3e, 0xff3e,
- 0xff40, 0xff40,
- 0xff5c, 0xff5c,
- 0xff5e, 0xff5e,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfffc, 0xfffd,
- 0x10137, 0x1013f,
- 0x10179, 0x10189,
- 0x1018c, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fc,
- 0x10877, 0x10878,
- 0x10ac8, 0x10ac8,
- 0x1173f, 0x1173f,
- 0x11fd5, 0x11ff1,
- 0x16b3c, 0x16b3f,
- 0x16b45, 0x16b45,
- 0x1bc9c, 0x1bc9c,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d164,
- 0x1d16a, 0x1d16c,
- 0x1d183, 0x1d184,
- 0x1d18c, 0x1d1a9,
- 0x1d1ae, 0x1d1e8,
- 0x1d200, 0x1d241,
- 0x1d245, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d6c1, 0x1d6c1,
- 0x1d6db, 0x1d6db,
- 0x1d6fb, 0x1d6fb,
- 0x1d715, 0x1d715,
- 0x1d735, 0x1d735,
- 0x1d74f, 0x1d74f,
- 0x1d76f, 0x1d76f,
- 0x1d789, 0x1d789,
- 0x1d7a9, 0x1d7a9,
- 0x1d7c3, 0x1d7c3,
- 0x1d800, 0x1d9ff,
- 0x1da37, 0x1da3a,
- 0x1da6d, 0x1da74,
- 0x1da76, 0x1da83,
- 0x1da85, 0x1da86,
- 0x1e14f, 0x1e14f,
- 0x1e2ff, 0x1e2ff,
- 0x1ecac, 0x1ecac,
- 0x1ecb0, 0x1ecb0,
- 0x1ed2e, 0x1ed2e,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
-}; /* CR_S */
-
-/* 'Sc': General Category */
-static const OnigCodePoint CR_Sc[] = {
- 21,
- 0x0024, 0x0024,
- 0x00a2, 0x00a5,
- 0x058f, 0x058f,
- 0x060b, 0x060b,
- 0x07fe, 0x07ff,
- 0x09f2, 0x09f3,
- 0x09fb, 0x09fb,
- 0x0af1, 0x0af1,
- 0x0bf9, 0x0bf9,
- 0x0e3f, 0x0e3f,
- 0x17db, 0x17db,
- 0x20a0, 0x20bf,
- 0xa838, 0xa838,
- 0xfdfc, 0xfdfc,
- 0xfe69, 0xfe69,
- 0xff04, 0xff04,
- 0xffe0, 0xffe1,
- 0xffe5, 0xffe6,
- 0x11fdd, 0x11fe0,
- 0x1e2ff, 0x1e2ff,
- 0x1ecb0, 0x1ecb0,
-}; /* CR_Sc */
-
-/* 'Sk': General Category */
-static const OnigCodePoint CR_Sk[] = {
- 29,
- 0x005e, 0x005e,
- 0x0060, 0x0060,
- 0x00a8, 0x00a8,
- 0x00af, 0x00af,
- 0x00b4, 0x00b4,
- 0x00b8, 0x00b8,
- 0x02c2, 0x02c5,
- 0x02d2, 0x02df,
- 0x02e5, 0x02eb,
- 0x02ed, 0x02ed,
- 0x02ef, 0x02ff,
- 0x0375, 0x0375,
- 0x0384, 0x0385,
- 0x1fbd, 0x1fbd,
- 0x1fbf, 0x1fc1,
- 0x1fcd, 0x1fcf,
- 0x1fdd, 0x1fdf,
- 0x1fed, 0x1fef,
- 0x1ffd, 0x1ffe,
- 0x309b, 0x309c,
- 0xa700, 0xa716,
- 0xa720, 0xa721,
- 0xa789, 0xa78a,
- 0xab5b, 0xab5b,
- 0xfbb2, 0xfbc1,
- 0xff3e, 0xff3e,
- 0xff40, 0xff40,
- 0xffe3, 0xffe3,
- 0x1f3fb, 0x1f3ff,
-}; /* CR_Sk */
-
-/* 'Sm': General Category */
-static const OnigCodePoint CR_Sm[] = {
- 64,
- 0x002b, 0x002b,
- 0x003c, 0x003e,
- 0x007c, 0x007c,
- 0x007e, 0x007e,
- 0x00ac, 0x00ac,
- 0x00b1, 0x00b1,
- 0x00d7, 0x00d7,
- 0x00f7, 0x00f7,
- 0x03f6, 0x03f6,
- 0x0606, 0x0608,
- 0x2044, 0x2044,
- 0x2052, 0x2052,
- 0x207a, 0x207c,
- 0x208a, 0x208c,
- 0x2118, 0x2118,
- 0x2140, 0x2144,
- 0x214b, 0x214b,
- 0x2190, 0x2194,
- 0x219a, 0x219b,
- 0x21a0, 0x21a0,
- 0x21a3, 0x21a3,
- 0x21a6, 0x21a6,
- 0x21ae, 0x21ae,
- 0x21ce, 0x21cf,
- 0x21d2, 0x21d2,
- 0x21d4, 0x21d4,
- 0x21f4, 0x22ff,
- 0x2320, 0x2321,
- 0x237c, 0x237c,
- 0x239b, 0x23b3,
- 0x23dc, 0x23e1,
- 0x25b7, 0x25b7,
- 0x25c1, 0x25c1,
- 0x25f8, 0x25ff,
- 0x266f, 0x266f,
- 0x27c0, 0x27c4,
- 0x27c7, 0x27e5,
- 0x27f0, 0x27ff,
- 0x2900, 0x2982,
- 0x2999, 0x29d7,
- 0x29dc, 0x29fb,
- 0x29fe, 0x2aff,
- 0x2b30, 0x2b44,
- 0x2b47, 0x2b4c,
- 0xfb29, 0xfb29,
- 0xfe62, 0xfe62,
- 0xfe64, 0xfe66,
- 0xff0b, 0xff0b,
- 0xff1c, 0xff1e,
- 0xff5c, 0xff5c,
- 0xff5e, 0xff5e,
- 0xffe2, 0xffe2,
- 0xffe9, 0xffec,
- 0x1d6c1, 0x1d6c1,
- 0x1d6db, 0x1d6db,
- 0x1d6fb, 0x1d6fb,
- 0x1d715, 0x1d715,
- 0x1d735, 0x1d735,
- 0x1d74f, 0x1d74f,
- 0x1d76f, 0x1d76f,
- 0x1d789, 0x1d789,
- 0x1d7a9, 0x1d7a9,
- 0x1d7c3, 0x1d7c3,
- 0x1eef0, 0x1eef1,
-}; /* CR_Sm */
-
-/* 'So': General Category */
-static const OnigCodePoint CR_So[] = {
- 180,
- 0x00a6, 0x00a6,
- 0x00a9, 0x00a9,
- 0x00ae, 0x00ae,
- 0x00b0, 0x00b0,
- 0x0482, 0x0482,
- 0x058d, 0x058e,
- 0x060e, 0x060f,
- 0x06de, 0x06de,
- 0x06e9, 0x06e9,
- 0x06fd, 0x06fe,
- 0x07f6, 0x07f6,
- 0x09fa, 0x09fa,
- 0x0b70, 0x0b70,
- 0x0bf3, 0x0bf8,
- 0x0bfa, 0x0bfa,
- 0x0c7f, 0x0c7f,
- 0x0d4f, 0x0d4f,
- 0x0d79, 0x0d79,
- 0x0f01, 0x0f03,
- 0x0f13, 0x0f13,
- 0x0f15, 0x0f17,
- 0x0f1a, 0x0f1f,
- 0x0f34, 0x0f34,
- 0x0f36, 0x0f36,
- 0x0f38, 0x0f38,
- 0x0fbe, 0x0fc5,
- 0x0fc7, 0x0fcc,
- 0x0fce, 0x0fcf,
- 0x0fd5, 0x0fd8,
- 0x109e, 0x109f,
- 0x1390, 0x1399,
- 0x166d, 0x166d,
- 0x1940, 0x1940,
- 0x19de, 0x19ff,
- 0x1b61, 0x1b6a,
- 0x1b74, 0x1b7c,
- 0x2100, 0x2101,
- 0x2103, 0x2106,
- 0x2108, 0x2109,
- 0x2114, 0x2114,
- 0x2116, 0x2117,
- 0x211e, 0x2123,
- 0x2125, 0x2125,
- 0x2127, 0x2127,
- 0x2129, 0x2129,
- 0x212e, 0x212e,
- 0x213a, 0x213b,
- 0x214a, 0x214a,
- 0x214c, 0x214d,
- 0x214f, 0x214f,
- 0x218a, 0x218b,
- 0x2195, 0x2199,
- 0x219c, 0x219f,
- 0x21a1, 0x21a2,
- 0x21a4, 0x21a5,
- 0x21a7, 0x21ad,
- 0x21af, 0x21cd,
- 0x21d0, 0x21d1,
- 0x21d3, 0x21d3,
- 0x21d5, 0x21f3,
- 0x2300, 0x2307,
- 0x230c, 0x231f,
- 0x2322, 0x2328,
- 0x232b, 0x237b,
- 0x237d, 0x239a,
- 0x23b4, 0x23db,
- 0x23e2, 0x2426,
- 0x2440, 0x244a,
- 0x249c, 0x24e9,
- 0x2500, 0x25b6,
- 0x25b8, 0x25c0,
- 0x25c2, 0x25f7,
- 0x2600, 0x266e,
- 0x2670, 0x2767,
- 0x2794, 0x27bf,
- 0x2800, 0x28ff,
- 0x2b00, 0x2b2f,
- 0x2b45, 0x2b46,
- 0x2b4d, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bff,
- 0x2ce5, 0x2cea,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3004, 0x3004,
- 0x3012, 0x3013,
- 0x3020, 0x3020,
- 0x3036, 0x3037,
- 0x303e, 0x303f,
- 0x3190, 0x3191,
- 0x3196, 0x319f,
- 0x31c0, 0x31e3,
- 0x3200, 0x321e,
- 0x322a, 0x3247,
- 0x3250, 0x3250,
- 0x3260, 0x327f,
- 0x328a, 0x32b0,
- 0x32c0, 0x33ff,
- 0x4dc0, 0x4dff,
- 0xa490, 0xa4c6,
- 0xa828, 0xa82b,
- 0xa836, 0xa837,
- 0xa839, 0xa839,
- 0xaa77, 0xaa79,
- 0xfdfd, 0xfdfd,
- 0xffe4, 0xffe4,
- 0xffe8, 0xffe8,
- 0xffed, 0xffee,
- 0xfffc, 0xfffd,
- 0x10137, 0x1013f,
- 0x10179, 0x10189,
- 0x1018c, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fc,
- 0x10877, 0x10878,
- 0x10ac8, 0x10ac8,
- 0x1173f, 0x1173f,
- 0x11fd5, 0x11fdc,
- 0x11fe1, 0x11ff1,
- 0x16b3c, 0x16b3f,
- 0x16b45, 0x16b45,
- 0x1bc9c, 0x1bc9c,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d164,
- 0x1d16a, 0x1d16c,
- 0x1d183, 0x1d184,
- 0x1d18c, 0x1d1a9,
- 0x1d1ae, 0x1d1e8,
- 0x1d200, 0x1d241,
- 0x1d245, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d800, 0x1d9ff,
- 0x1da37, 0x1da3a,
- 0x1da6d, 0x1da74,
- 0x1da76, 0x1da83,
- 0x1da85, 0x1da86,
- 0x1e14f, 0x1e14f,
- 0x1ecac, 0x1ecac,
- 0x1ed2e, 0x1ed2e,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f3fa,
- 0x1f400, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
-}; /* CR_So */
-
-/* 'Z': Major Category */
-static const OnigCodePoint CR_Z[] = {
- 8,
- 0x0020, 0x0020,
- 0x00a0, 0x00a0,
- 0x1680, 0x1680,
- 0x2000, 0x200a,
- 0x2028, 0x2029,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000,
-}; /* CR_Z */
-
-/* 'Zl': General Category */
-static const OnigCodePoint CR_Zl[] = {
- 1,
- 0x2028, 0x2028,
-}; /* CR_Zl */
-
-/* 'Zp': General Category */
-static const OnigCodePoint CR_Zp[] = {
- 1,
- 0x2029, 0x2029,
-}; /* CR_Zp */
-
-/* 'Zs': General Category */
-static const OnigCodePoint CR_Zs[] = {
- 7,
- 0x0020, 0x0020,
- 0x00a0, 0x00a0,
- 0x1680, 0x1680,
- 0x2000, 0x200a,
- 0x202f, 0x202f,
- 0x205f, 0x205f,
- 0x3000, 0x3000,
-}; /* CR_Zs */
-
-/* 'Math': Derived Property */
-static const OnigCodePoint CR_Math[] = {
- 138,
- 0x002b, 0x002b,
- 0x003c, 0x003e,
- 0x005e, 0x005e,
- 0x007c, 0x007c,
- 0x007e, 0x007e,
- 0x00ac, 0x00ac,
- 0x00b1, 0x00b1,
- 0x00d7, 0x00d7,
- 0x00f7, 0x00f7,
- 0x03d0, 0x03d2,
- 0x03d5, 0x03d5,
- 0x03f0, 0x03f1,
- 0x03f4, 0x03f6,
- 0x0606, 0x0608,
- 0x2016, 0x2016,
- 0x2032, 0x2034,
- 0x2040, 0x2040,
- 0x2044, 0x2044,
- 0x2052, 0x2052,
- 0x2061, 0x2064,
- 0x207a, 0x207e,
- 0x208a, 0x208e,
- 0x20d0, 0x20dc,
- 0x20e1, 0x20e1,
- 0x20e5, 0x20e6,
- 0x20eb, 0x20ef,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2118, 0x211d,
- 0x2124, 0x2124,
- 0x2128, 0x2129,
- 0x212c, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2138,
- 0x213c, 0x2149,
- 0x214b, 0x214b,
- 0x2190, 0x21a7,
- 0x21a9, 0x21ae,
- 0x21b0, 0x21b1,
- 0x21b6, 0x21b7,
- 0x21bc, 0x21db,
- 0x21dd, 0x21dd,
- 0x21e4, 0x21e5,
- 0x21f4, 0x22ff,
- 0x2308, 0x230b,
- 0x2320, 0x2321,
- 0x237c, 0x237c,
- 0x239b, 0x23b5,
- 0x23b7, 0x23b7,
- 0x23d0, 0x23d0,
- 0x23dc, 0x23e2,
- 0x25a0, 0x25a1,
- 0x25ae, 0x25b7,
- 0x25bc, 0x25c1,
- 0x25c6, 0x25c7,
- 0x25ca, 0x25cb,
- 0x25cf, 0x25d3,
- 0x25e2, 0x25e2,
- 0x25e4, 0x25e4,
- 0x25e7, 0x25ec,
- 0x25f8, 0x25ff,
- 0x2605, 0x2606,
- 0x2640, 0x2640,
- 0x2642, 0x2642,
- 0x2660, 0x2663,
- 0x266d, 0x266f,
- 0x27c0, 0x27ff,
- 0x2900, 0x2aff,
- 0x2b30, 0x2b44,
- 0x2b47, 0x2b4c,
- 0xfb29, 0xfb29,
- 0xfe61, 0xfe66,
- 0xfe68, 0xfe68,
- 0xff0b, 0xff0b,
- 0xff1c, 0xff1e,
- 0xff3c, 0xff3c,
- 0xff3e, 0xff3e,
- 0xff5c, 0xff5c,
- 0xff5e, 0xff5e,
- 0xffe2, 0xffe2,
- 0xffe9, 0xffec,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
-}; /* CR_Math */
-
-/* 'Alphabetic': Derived Property */
-#define CR_Alphabetic CR_Alpha
-
-/* 'Lowercase': Derived Property */
-#define CR_Lowercase CR_Lower
-
-/* 'Uppercase': Derived Property */
-#define CR_Uppercase CR_Upper
-
-/* 'Cased': Derived Property */
-static const OnigCodePoint CR_Cased[] = {
- 140,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x01ba,
- 0x01bc, 0x01bf,
- 0x01c4, 0x0293,
- 0x0295, 0x02b8,
- 0x02c0, 0x02c1,
- 0x02e0, 0x02e4,
- 0x0345, 0x0345,
- 0x0370, 0x0373,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0560, 0x0588,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1d00, 0x1dbf,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x212d,
- 0x212f, 0x2134,
- 0x2139, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x217f,
- 0x2183, 0x2184,
- 0x24b6, 0x24e9,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa640, 0xa66d,
- 0xa680, 0xa69d,
- 0xa722, 0xa787,
- 0xa78b, 0xa78e,
- 0xa790, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f8, 0xa7fa,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0x10400, 0x1044f,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x118a0, 0x118df,
- 0x16e40, 0x16e7f,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e900, 0x1e943,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
-}; /* CR_Cased */
-
-/* 'Case_Ignorable': Derived Property */
-static const OnigCodePoint CR_Case_Ignorable[] = {
- 401,
- 0x0027, 0x0027,
- 0x002e, 0x002e,
- 0x003a, 0x003a,
- 0x005e, 0x005e,
- 0x0060, 0x0060,
- 0x00a8, 0x00a8,
- 0x00ad, 0x00ad,
- 0x00af, 0x00af,
- 0x00b4, 0x00b4,
- 0x00b7, 0x00b8,
- 0x02b0, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x0384, 0x0385,
- 0x0387, 0x0387,
- 0x0483, 0x0489,
- 0x0559, 0x0559,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05f4, 0x05f4,
- 0x0600, 0x0605,
- 0x0610, 0x061a,
- 0x061c, 0x061c,
- 0x0640, 0x0640,
- 0x064b, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dd,
- 0x06df, 0x06e8,
- 0x06ea, 0x06ed,
- 0x070f, 0x070f,
- 0x0711, 0x0711,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f5,
- 0x07fa, 0x07fa,
- 0x07fd, 0x07fd,
- 0x0816, 0x082d,
- 0x0859, 0x085b,
- 0x08d3, 0x0902,
- 0x093a, 0x093a,
- 0x093c, 0x093c,
- 0x0941, 0x0948,
- 0x094d, 0x094d,
- 0x0951, 0x0957,
- 0x0962, 0x0963,
- 0x0971, 0x0971,
- 0x0981, 0x0981,
- 0x09bc, 0x09bc,
- 0x09c1, 0x09c4,
- 0x09cd, 0x09cd,
- 0x09e2, 0x09e3,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a02,
- 0x0a3c, 0x0a3c,
- 0x0a41, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a82,
- 0x0abc, 0x0abc,
- 0x0ac1, 0x0ac5,
- 0x0ac7, 0x0ac8,
- 0x0acd, 0x0acd,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0aff,
- 0x0b01, 0x0b01,
- 0x0b3c, 0x0b3c,
- 0x0b3f, 0x0b3f,
- 0x0b41, 0x0b44,
- 0x0b4d, 0x0b4d,
- 0x0b56, 0x0b56,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bc0, 0x0bc0,
- 0x0bcd, 0x0bcd,
- 0x0c00, 0x0c00,
- 0x0c04, 0x0c04,
- 0x0c3e, 0x0c40,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c81,
- 0x0cbc, 0x0cbc,
- 0x0cbf, 0x0cbf,
- 0x0cc6, 0x0cc6,
- 0x0ccc, 0x0ccd,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d01,
- 0x0d3b, 0x0d3c,
- 0x0d41, 0x0d44,
- 0x0d4d, 0x0d4d,
- 0x0d62, 0x0d63,
- 0x0dca, 0x0dca,
- 0x0dd2, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e46, 0x0e4e,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0ebc,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f71, 0x0f7e,
- 0x0f80, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x102d, 0x1030,
- 0x1032, 0x1037,
- 0x1039, 0x103a,
- 0x103d, 0x103e,
- 0x1058, 0x1059,
- 0x105e, 0x1060,
- 0x1071, 0x1074,
- 0x1082, 0x1082,
- 0x1085, 0x1086,
- 0x108d, 0x108d,
- 0x109d, 0x109d,
- 0x10fc, 0x10fc,
- 0x135d, 0x135f,
- 0x1712, 0x1714,
- 0x1732, 0x1734,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b4, 0x17b5,
- 0x17b7, 0x17bd,
- 0x17c6, 0x17c6,
- 0x17c9, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dd, 0x17dd,
- 0x180b, 0x180e,
- 0x1843, 0x1843,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x1922,
- 0x1927, 0x1928,
- 0x1932, 0x1932,
- 0x1939, 0x193b,
- 0x1a17, 0x1a18,
- 0x1a1b, 0x1a1b,
- 0x1a56, 0x1a56,
- 0x1a58, 0x1a5e,
- 0x1a60, 0x1a60,
- 0x1a62, 0x1a62,
- 0x1a65, 0x1a6c,
- 0x1a73, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1aa7, 0x1aa7,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b03,
- 0x1b34, 0x1b34,
- 0x1b36, 0x1b3a,
- 0x1b3c, 0x1b3c,
- 0x1b42, 0x1b42,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1b81,
- 0x1ba2, 0x1ba5,
- 0x1ba8, 0x1ba9,
- 0x1bab, 0x1bad,
- 0x1be6, 0x1be6,
- 0x1be8, 0x1be9,
- 0x1bed, 0x1bed,
- 0x1bef, 0x1bf1,
- 0x1c2c, 0x1c33,
- 0x1c36, 0x1c37,
- 0x1c78, 0x1c7d,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce0,
- 0x1ce2, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf8, 0x1cf9,
- 0x1d2c, 0x1d6a,
- 0x1d78, 0x1d78,
- 0x1d9b, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x1fbd, 0x1fbd,
- 0x1fbf, 0x1fc1,
- 0x1fcd, 0x1fcf,
- 0x1fdd, 0x1fdf,
- 0x1fed, 0x1fef,
- 0x1ffd, 0x1ffe,
- 0x200b, 0x200f,
- 0x2018, 0x2019,
- 0x2024, 0x2024,
- 0x2027, 0x2027,
- 0x202a, 0x202e,
- 0x2060, 0x2064,
- 0x2066, 0x206f,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x20d0, 0x20f0,
- 0x2c7c, 0x2c7d,
- 0x2cef, 0x2cf1,
- 0x2d6f, 0x2d6f,
- 0x2d7f, 0x2d7f,
- 0x2de0, 0x2dff,
- 0x2e2f, 0x2e2f,
- 0x3005, 0x3005,
- 0x302a, 0x302d,
- 0x3031, 0x3035,
- 0x303b, 0x303b,
- 0x3099, 0x309e,
- 0x30fc, 0x30fe,
- 0xa015, 0xa015,
- 0xa4f8, 0xa4fd,
- 0xa60c, 0xa60c,
- 0xa66f, 0xa672,
- 0xa674, 0xa67d,
- 0xa67f, 0xa67f,
- 0xa69c, 0xa69f,
- 0xa6f0, 0xa6f1,
- 0xa700, 0xa721,
- 0xa770, 0xa770,
- 0xa788, 0xa78a,
- 0xa7f8, 0xa7f9,
- 0xa802, 0xa802,
- 0xa806, 0xa806,
- 0xa80b, 0xa80b,
- 0xa825, 0xa826,
- 0xa8c4, 0xa8c5,
- 0xa8e0, 0xa8f1,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92d,
- 0xa947, 0xa951,
- 0xa980, 0xa982,
- 0xa9b3, 0xa9b3,
- 0xa9b6, 0xa9b9,
- 0xa9bc, 0xa9bd,
- 0xa9cf, 0xa9cf,
- 0xa9e5, 0xa9e6,
- 0xaa29, 0xaa2e,
- 0xaa31, 0xaa32,
- 0xaa35, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4c,
- 0xaa70, 0xaa70,
- 0xaa7c, 0xaa7c,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabf,
- 0xaac1, 0xaac1,
- 0xaadd, 0xaadd,
- 0xaaec, 0xaaed,
- 0xaaf3, 0xaaf4,
- 0xaaf6, 0xaaf6,
- 0xab5b, 0xab5f,
- 0xabe5, 0xabe5,
- 0xabe8, 0xabe8,
- 0xabed, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfbb2, 0xfbc1,
- 0xfe00, 0xfe0f,
- 0xfe13, 0xfe13,
- 0xfe20, 0xfe2f,
- 0xfe52, 0xfe52,
- 0xfe55, 0xfe55,
- 0xfeff, 0xfeff,
- 0xff07, 0xff07,
- 0xff0e, 0xff0e,
- 0xff1a, 0xff1a,
- 0xff3e, 0xff3e,
- 0xff40, 0xff40,
- 0xff70, 0xff70,
- 0xff9e, 0xff9f,
- 0xffe3, 0xffe3,
- 0xfff9, 0xfffb,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10ae5, 0x10ae6,
- 0x10d24, 0x10d27,
- 0x10f46, 0x10f50,
- 0x11001, 0x11001,
- 0x11038, 0x11046,
- 0x1107f, 0x11081,
- 0x110b3, 0x110b6,
- 0x110b9, 0x110ba,
- 0x110bd, 0x110bd,
- 0x110cd, 0x110cd,
- 0x11100, 0x11102,
- 0x11127, 0x1112b,
- 0x1112d, 0x11134,
- 0x11173, 0x11173,
- 0x11180, 0x11181,
- 0x111b6, 0x111be,
- 0x111c9, 0x111cc,
- 0x1122f, 0x11231,
- 0x11234, 0x11234,
- 0x11236, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112df,
- 0x112e3, 0x112ea,
- 0x11300, 0x11301,
- 0x1133b, 0x1133c,
- 0x11340, 0x11340,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11438, 0x1143f,
- 0x11442, 0x11444,
- 0x11446, 0x11446,
- 0x1145e, 0x1145e,
- 0x114b3, 0x114b8,
- 0x114ba, 0x114ba,
- 0x114bf, 0x114c0,
- 0x114c2, 0x114c3,
- 0x115b2, 0x115b5,
- 0x115bc, 0x115bd,
- 0x115bf, 0x115c0,
- 0x115dc, 0x115dd,
- 0x11633, 0x1163a,
- 0x1163d, 0x1163d,
- 0x1163f, 0x11640,
- 0x116ab, 0x116ab,
- 0x116ad, 0x116ad,
- 0x116b0, 0x116b5,
- 0x116b7, 0x116b7,
- 0x1171d, 0x1171f,
- 0x11722, 0x11725,
- 0x11727, 0x1172b,
- 0x1182f, 0x11837,
- 0x11839, 0x1183a,
- 0x119d4, 0x119d7,
- 0x119da, 0x119db,
- 0x119e0, 0x119e0,
- 0x11a01, 0x11a0a,
- 0x11a33, 0x11a38,
- 0x11a3b, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a51, 0x11a56,
- 0x11a59, 0x11a5b,
- 0x11a8a, 0x11a96,
- 0x11a98, 0x11a99,
- 0x11c30, 0x11c36,
- 0x11c38, 0x11c3d,
- 0x11c3f, 0x11c3f,
- 0x11c92, 0x11ca7,
- 0x11caa, 0x11cb0,
- 0x11cb2, 0x11cb3,
- 0x11cb5, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d45,
- 0x11d47, 0x11d47,
- 0x11d90, 0x11d91,
- 0x11d95, 0x11d95,
- 0x11d97, 0x11d97,
- 0x11ef3, 0x11ef4,
- 0x13430, 0x13438,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16b40, 0x16b43,
- 0x16f4f, 0x16f4f,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x1bc9d, 0x1bc9e,
- 0x1bca0, 0x1bca3,
- 0x1d167, 0x1d169,
- 0x1d173, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e130, 0x1e13d,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e94b,
- 0x1f3fb, 0x1f3ff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
-}; /* CR_Case_Ignorable */
-
-/* 'Changes_When_Lowercased': Derived Property */
-static const OnigCodePoint CR_Changes_When_Lowercased[] = {
- 599,
- 0x0041, 0x005a,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00de,
- 0x0100, 0x0100,
- 0x0102, 0x0102,
- 0x0104, 0x0104,
- 0x0106, 0x0106,
- 0x0108, 0x0108,
- 0x010a, 0x010a,
- 0x010c, 0x010c,
- 0x010e, 0x010e,
- 0x0110, 0x0110,
- 0x0112, 0x0112,
- 0x0114, 0x0114,
- 0x0116, 0x0116,
- 0x0118, 0x0118,
- 0x011a, 0x011a,
- 0x011c, 0x011c,
- 0x011e, 0x011e,
- 0x0120, 0x0120,
- 0x0122, 0x0122,
- 0x0124, 0x0124,
- 0x0126, 0x0126,
- 0x0128, 0x0128,
- 0x012a, 0x012a,
- 0x012c, 0x012c,
- 0x012e, 0x012e,
- 0x0130, 0x0130,
- 0x0132, 0x0132,
- 0x0134, 0x0134,
- 0x0136, 0x0136,
- 0x0139, 0x0139,
- 0x013b, 0x013b,
- 0x013d, 0x013d,
- 0x013f, 0x013f,
- 0x0141, 0x0141,
- 0x0143, 0x0143,
- 0x0145, 0x0145,
- 0x0147, 0x0147,
- 0x014a, 0x014a,
- 0x014c, 0x014c,
- 0x014e, 0x014e,
- 0x0150, 0x0150,
- 0x0152, 0x0152,
- 0x0154, 0x0154,
- 0x0156, 0x0156,
- 0x0158, 0x0158,
- 0x015a, 0x015a,
- 0x015c, 0x015c,
- 0x015e, 0x015e,
- 0x0160, 0x0160,
- 0x0162, 0x0162,
- 0x0164, 0x0164,
- 0x0166, 0x0166,
- 0x0168, 0x0168,
- 0x016a, 0x016a,
- 0x016c, 0x016c,
- 0x016e, 0x016e,
- 0x0170, 0x0170,
- 0x0172, 0x0172,
- 0x0174, 0x0174,
- 0x0176, 0x0176,
- 0x0178, 0x0179,
- 0x017b, 0x017b,
- 0x017d, 0x017d,
- 0x0181, 0x0182,
- 0x0184, 0x0184,
- 0x0186, 0x0187,
- 0x0189, 0x018b,
- 0x018e, 0x0191,
- 0x0193, 0x0194,
- 0x0196, 0x0198,
- 0x019c, 0x019d,
- 0x019f, 0x01a0,
- 0x01a2, 0x01a2,
- 0x01a4, 0x01a4,
- 0x01a6, 0x01a7,
- 0x01a9, 0x01a9,
- 0x01ac, 0x01ac,
- 0x01ae, 0x01af,
- 0x01b1, 0x01b3,
- 0x01b5, 0x01b5,
- 0x01b7, 0x01b8,
- 0x01bc, 0x01bc,
- 0x01c4, 0x01c5,
- 0x01c7, 0x01c8,
- 0x01ca, 0x01cb,
- 0x01cd, 0x01cd,
- 0x01cf, 0x01cf,
- 0x01d1, 0x01d1,
- 0x01d3, 0x01d3,
- 0x01d5, 0x01d5,
- 0x01d7, 0x01d7,
- 0x01d9, 0x01d9,
- 0x01db, 0x01db,
- 0x01de, 0x01de,
- 0x01e0, 0x01e0,
- 0x01e2, 0x01e2,
- 0x01e4, 0x01e4,
- 0x01e6, 0x01e6,
- 0x01e8, 0x01e8,
- 0x01ea, 0x01ea,
- 0x01ec, 0x01ec,
- 0x01ee, 0x01ee,
- 0x01f1, 0x01f2,
- 0x01f4, 0x01f4,
- 0x01f6, 0x01f8,
- 0x01fa, 0x01fa,
- 0x01fc, 0x01fc,
- 0x01fe, 0x01fe,
- 0x0200, 0x0200,
- 0x0202, 0x0202,
- 0x0204, 0x0204,
- 0x0206, 0x0206,
- 0x0208, 0x0208,
- 0x020a, 0x020a,
- 0x020c, 0x020c,
- 0x020e, 0x020e,
- 0x0210, 0x0210,
- 0x0212, 0x0212,
- 0x0214, 0x0214,
- 0x0216, 0x0216,
- 0x0218, 0x0218,
- 0x021a, 0x021a,
- 0x021c, 0x021c,
- 0x021e, 0x021e,
- 0x0220, 0x0220,
- 0x0222, 0x0222,
- 0x0224, 0x0224,
- 0x0226, 0x0226,
- 0x0228, 0x0228,
- 0x022a, 0x022a,
- 0x022c, 0x022c,
- 0x022e, 0x022e,
- 0x0230, 0x0230,
- 0x0232, 0x0232,
- 0x023a, 0x023b,
- 0x023d, 0x023e,
- 0x0241, 0x0241,
- 0x0243, 0x0246,
- 0x0248, 0x0248,
- 0x024a, 0x024a,
- 0x024c, 0x024c,
- 0x024e, 0x024e,
- 0x0370, 0x0370,
- 0x0372, 0x0372,
- 0x0376, 0x0376,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x038f,
- 0x0391, 0x03a1,
- 0x03a3, 0x03ab,
- 0x03cf, 0x03cf,
- 0x03d8, 0x03d8,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03e2,
- 0x03e4, 0x03e4,
- 0x03e6, 0x03e6,
- 0x03e8, 0x03e8,
- 0x03ea, 0x03ea,
- 0x03ec, 0x03ec,
- 0x03ee, 0x03ee,
- 0x03f4, 0x03f4,
- 0x03f7, 0x03f7,
- 0x03f9, 0x03fa,
- 0x03fd, 0x042f,
- 0x0460, 0x0460,
- 0x0462, 0x0462,
- 0x0464, 0x0464,
- 0x0466, 0x0466,
- 0x0468, 0x0468,
- 0x046a, 0x046a,
- 0x046c, 0x046c,
- 0x046e, 0x046e,
- 0x0470, 0x0470,
- 0x0472, 0x0472,
- 0x0474, 0x0474,
- 0x0476, 0x0476,
- 0x0478, 0x0478,
- 0x047a, 0x047a,
- 0x047c, 0x047c,
- 0x047e, 0x047e,
- 0x0480, 0x0480,
- 0x048a, 0x048a,
- 0x048c, 0x048c,
- 0x048e, 0x048e,
- 0x0490, 0x0490,
- 0x0492, 0x0492,
- 0x0494, 0x0494,
- 0x0496, 0x0496,
- 0x0498, 0x0498,
- 0x049a, 0x049a,
- 0x049c, 0x049c,
- 0x049e, 0x049e,
- 0x04a0, 0x04a0,
- 0x04a2, 0x04a2,
- 0x04a4, 0x04a4,
- 0x04a6, 0x04a6,
- 0x04a8, 0x04a8,
- 0x04aa, 0x04aa,
- 0x04ac, 0x04ac,
- 0x04ae, 0x04ae,
- 0x04b0, 0x04b0,
- 0x04b2, 0x04b2,
- 0x04b4, 0x04b4,
- 0x04b6, 0x04b6,
- 0x04b8, 0x04b8,
- 0x04ba, 0x04ba,
- 0x04bc, 0x04bc,
- 0x04be, 0x04be,
- 0x04c0, 0x04c1,
- 0x04c3, 0x04c3,
- 0x04c5, 0x04c5,
- 0x04c7, 0x04c7,
- 0x04c9, 0x04c9,
- 0x04cb, 0x04cb,
- 0x04cd, 0x04cd,
- 0x04d0, 0x04d0,
- 0x04d2, 0x04d2,
- 0x04d4, 0x04d4,
- 0x04d6, 0x04d6,
- 0x04d8, 0x04d8,
- 0x04da, 0x04da,
- 0x04dc, 0x04dc,
- 0x04de, 0x04de,
- 0x04e0, 0x04e0,
- 0x04e2, 0x04e2,
- 0x04e4, 0x04e4,
- 0x04e6, 0x04e6,
- 0x04e8, 0x04e8,
- 0x04ea, 0x04ea,
- 0x04ec, 0x04ec,
- 0x04ee, 0x04ee,
- 0x04f0, 0x04f0,
- 0x04f2, 0x04f2,
- 0x04f4, 0x04f4,
- 0x04f6, 0x04f6,
- 0x04f8, 0x04f8,
- 0x04fa, 0x04fa,
- 0x04fc, 0x04fc,
- 0x04fe, 0x04fe,
- 0x0500, 0x0500,
- 0x0502, 0x0502,
- 0x0504, 0x0504,
- 0x0506, 0x0506,
- 0x0508, 0x0508,
- 0x050a, 0x050a,
- 0x050c, 0x050c,
- 0x050e, 0x050e,
- 0x0510, 0x0510,
- 0x0512, 0x0512,
- 0x0514, 0x0514,
- 0x0516, 0x0516,
- 0x0518, 0x0518,
- 0x051a, 0x051a,
- 0x051c, 0x051c,
- 0x051e, 0x051e,
- 0x0520, 0x0520,
- 0x0522, 0x0522,
- 0x0524, 0x0524,
- 0x0526, 0x0526,
- 0x0528, 0x0528,
- 0x052a, 0x052a,
- 0x052c, 0x052c,
- 0x052e, 0x052e,
- 0x0531, 0x0556,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x13a0, 0x13f5,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1e00, 0x1e00,
- 0x1e02, 0x1e02,
- 0x1e04, 0x1e04,
- 0x1e06, 0x1e06,
- 0x1e08, 0x1e08,
- 0x1e0a, 0x1e0a,
- 0x1e0c, 0x1e0c,
- 0x1e0e, 0x1e0e,
- 0x1e10, 0x1e10,
- 0x1e12, 0x1e12,
- 0x1e14, 0x1e14,
- 0x1e16, 0x1e16,
- 0x1e18, 0x1e18,
- 0x1e1a, 0x1e1a,
- 0x1e1c, 0x1e1c,
- 0x1e1e, 0x1e1e,
- 0x1e20, 0x1e20,
- 0x1e22, 0x1e22,
- 0x1e24, 0x1e24,
- 0x1e26, 0x1e26,
- 0x1e28, 0x1e28,
- 0x1e2a, 0x1e2a,
- 0x1e2c, 0x1e2c,
- 0x1e2e, 0x1e2e,
- 0x1e30, 0x1e30,
- 0x1e32, 0x1e32,
- 0x1e34, 0x1e34,
- 0x1e36, 0x1e36,
- 0x1e38, 0x1e38,
- 0x1e3a, 0x1e3a,
- 0x1e3c, 0x1e3c,
- 0x1e3e, 0x1e3e,
- 0x1e40, 0x1e40,
- 0x1e42, 0x1e42,
- 0x1e44, 0x1e44,
- 0x1e46, 0x1e46,
- 0x1e48, 0x1e48,
- 0x1e4a, 0x1e4a,
- 0x1e4c, 0x1e4c,
- 0x1e4e, 0x1e4e,
- 0x1e50, 0x1e50,
- 0x1e52, 0x1e52,
- 0x1e54, 0x1e54,
- 0x1e56, 0x1e56,
- 0x1e58, 0x1e58,
- 0x1e5a, 0x1e5a,
- 0x1e5c, 0x1e5c,
- 0x1e5e, 0x1e5e,
- 0x1e60, 0x1e60,
- 0x1e62, 0x1e62,
- 0x1e64, 0x1e64,
- 0x1e66, 0x1e66,
- 0x1e68, 0x1e68,
- 0x1e6a, 0x1e6a,
- 0x1e6c, 0x1e6c,
- 0x1e6e, 0x1e6e,
- 0x1e70, 0x1e70,
- 0x1e72, 0x1e72,
- 0x1e74, 0x1e74,
- 0x1e76, 0x1e76,
- 0x1e78, 0x1e78,
- 0x1e7a, 0x1e7a,
- 0x1e7c, 0x1e7c,
- 0x1e7e, 0x1e7e,
- 0x1e80, 0x1e80,
- 0x1e82, 0x1e82,
- 0x1e84, 0x1e84,
- 0x1e86, 0x1e86,
- 0x1e88, 0x1e88,
- 0x1e8a, 0x1e8a,
- 0x1e8c, 0x1e8c,
- 0x1e8e, 0x1e8e,
- 0x1e90, 0x1e90,
- 0x1e92, 0x1e92,
- 0x1e94, 0x1e94,
- 0x1e9e, 0x1e9e,
- 0x1ea0, 0x1ea0,
- 0x1ea2, 0x1ea2,
- 0x1ea4, 0x1ea4,
- 0x1ea6, 0x1ea6,
- 0x1ea8, 0x1ea8,
- 0x1eaa, 0x1eaa,
- 0x1eac, 0x1eac,
- 0x1eae, 0x1eae,
- 0x1eb0, 0x1eb0,
- 0x1eb2, 0x1eb2,
- 0x1eb4, 0x1eb4,
- 0x1eb6, 0x1eb6,
- 0x1eb8, 0x1eb8,
- 0x1eba, 0x1eba,
- 0x1ebc, 0x1ebc,
- 0x1ebe, 0x1ebe,
- 0x1ec0, 0x1ec0,
- 0x1ec2, 0x1ec2,
- 0x1ec4, 0x1ec4,
- 0x1ec6, 0x1ec6,
- 0x1ec8, 0x1ec8,
- 0x1eca, 0x1eca,
- 0x1ecc, 0x1ecc,
- 0x1ece, 0x1ece,
- 0x1ed0, 0x1ed0,
- 0x1ed2, 0x1ed2,
- 0x1ed4, 0x1ed4,
- 0x1ed6, 0x1ed6,
- 0x1ed8, 0x1ed8,
- 0x1eda, 0x1eda,
- 0x1edc, 0x1edc,
- 0x1ede, 0x1ede,
- 0x1ee0, 0x1ee0,
- 0x1ee2, 0x1ee2,
- 0x1ee4, 0x1ee4,
- 0x1ee6, 0x1ee6,
- 0x1ee8, 0x1ee8,
- 0x1eea, 0x1eea,
- 0x1eec, 0x1eec,
- 0x1eee, 0x1eee,
- 0x1ef0, 0x1ef0,
- 0x1ef2, 0x1ef2,
- 0x1ef4, 0x1ef4,
- 0x1ef6, 0x1ef6,
- 0x1ef8, 0x1ef8,
- 0x1efa, 0x1efa,
- 0x1efc, 0x1efc,
- 0x1efe, 0x1efe,
- 0x1f08, 0x1f0f,
- 0x1f18, 0x1f1d,
- 0x1f28, 0x1f2f,
- 0x1f38, 0x1f3f,
- 0x1f48, 0x1f4d,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f5f,
- 0x1f68, 0x1f6f,
- 0x1f88, 0x1f8f,
- 0x1f98, 0x1f9f,
- 0x1fa8, 0x1faf,
- 0x1fb8, 0x1fbc,
- 0x1fc8, 0x1fcc,
- 0x1fd8, 0x1fdb,
- 0x1fe8, 0x1fec,
- 0x1ff8, 0x1ffc,
- 0x2126, 0x2126,
- 0x212a, 0x212b,
- 0x2132, 0x2132,
- 0x2160, 0x216f,
- 0x2183, 0x2183,
- 0x24b6, 0x24cf,
- 0x2c00, 0x2c2e,
- 0x2c60, 0x2c60,
- 0x2c62, 0x2c64,
- 0x2c67, 0x2c67,
- 0x2c69, 0x2c69,
- 0x2c6b, 0x2c6b,
- 0x2c6d, 0x2c70,
- 0x2c72, 0x2c72,
- 0x2c75, 0x2c75,
- 0x2c7e, 0x2c80,
- 0x2c82, 0x2c82,
- 0x2c84, 0x2c84,
- 0x2c86, 0x2c86,
- 0x2c88, 0x2c88,
- 0x2c8a, 0x2c8a,
- 0x2c8c, 0x2c8c,
- 0x2c8e, 0x2c8e,
- 0x2c90, 0x2c90,
- 0x2c92, 0x2c92,
- 0x2c94, 0x2c94,
- 0x2c96, 0x2c96,
- 0x2c98, 0x2c98,
- 0x2c9a, 0x2c9a,
- 0x2c9c, 0x2c9c,
- 0x2c9e, 0x2c9e,
- 0x2ca0, 0x2ca0,
- 0x2ca2, 0x2ca2,
- 0x2ca4, 0x2ca4,
- 0x2ca6, 0x2ca6,
- 0x2ca8, 0x2ca8,
- 0x2caa, 0x2caa,
- 0x2cac, 0x2cac,
- 0x2cae, 0x2cae,
- 0x2cb0, 0x2cb0,
- 0x2cb2, 0x2cb2,
- 0x2cb4, 0x2cb4,
- 0x2cb6, 0x2cb6,
- 0x2cb8, 0x2cb8,
- 0x2cba, 0x2cba,
- 0x2cbc, 0x2cbc,
- 0x2cbe, 0x2cbe,
- 0x2cc0, 0x2cc0,
- 0x2cc2, 0x2cc2,
- 0x2cc4, 0x2cc4,
- 0x2cc6, 0x2cc6,
- 0x2cc8, 0x2cc8,
- 0x2cca, 0x2cca,
- 0x2ccc, 0x2ccc,
- 0x2cce, 0x2cce,
- 0x2cd0, 0x2cd0,
- 0x2cd2, 0x2cd2,
- 0x2cd4, 0x2cd4,
- 0x2cd6, 0x2cd6,
- 0x2cd8, 0x2cd8,
- 0x2cda, 0x2cda,
- 0x2cdc, 0x2cdc,
- 0x2cde, 0x2cde,
- 0x2ce0, 0x2ce0,
- 0x2ce2, 0x2ce2,
- 0x2ceb, 0x2ceb,
- 0x2ced, 0x2ced,
- 0x2cf2, 0x2cf2,
- 0xa640, 0xa640,
- 0xa642, 0xa642,
- 0xa644, 0xa644,
- 0xa646, 0xa646,
- 0xa648, 0xa648,
- 0xa64a, 0xa64a,
- 0xa64c, 0xa64c,
- 0xa64e, 0xa64e,
- 0xa650, 0xa650,
- 0xa652, 0xa652,
- 0xa654, 0xa654,
- 0xa656, 0xa656,
- 0xa658, 0xa658,
- 0xa65a, 0xa65a,
- 0xa65c, 0xa65c,
- 0xa65e, 0xa65e,
- 0xa660, 0xa660,
- 0xa662, 0xa662,
- 0xa664, 0xa664,
- 0xa666, 0xa666,
- 0xa668, 0xa668,
- 0xa66a, 0xa66a,
- 0xa66c, 0xa66c,
- 0xa680, 0xa680,
- 0xa682, 0xa682,
- 0xa684, 0xa684,
- 0xa686, 0xa686,
- 0xa688, 0xa688,
- 0xa68a, 0xa68a,
- 0xa68c, 0xa68c,
- 0xa68e, 0xa68e,
- 0xa690, 0xa690,
- 0xa692, 0xa692,
- 0xa694, 0xa694,
- 0xa696, 0xa696,
- 0xa698, 0xa698,
- 0xa69a, 0xa69a,
- 0xa722, 0xa722,
- 0xa724, 0xa724,
- 0xa726, 0xa726,
- 0xa728, 0xa728,
- 0xa72a, 0xa72a,
- 0xa72c, 0xa72c,
- 0xa72e, 0xa72e,
- 0xa732, 0xa732,
- 0xa734, 0xa734,
- 0xa736, 0xa736,
- 0xa738, 0xa738,
- 0xa73a, 0xa73a,
- 0xa73c, 0xa73c,
- 0xa73e, 0xa73e,
- 0xa740, 0xa740,
- 0xa742, 0xa742,
- 0xa744, 0xa744,
- 0xa746, 0xa746,
- 0xa748, 0xa748,
- 0xa74a, 0xa74a,
- 0xa74c, 0xa74c,
- 0xa74e, 0xa74e,
- 0xa750, 0xa750,
- 0xa752, 0xa752,
- 0xa754, 0xa754,
- 0xa756, 0xa756,
- 0xa758, 0xa758,
- 0xa75a, 0xa75a,
- 0xa75c, 0xa75c,
- 0xa75e, 0xa75e,
- 0xa760, 0xa760,
- 0xa762, 0xa762,
- 0xa764, 0xa764,
- 0xa766, 0xa766,
- 0xa768, 0xa768,
- 0xa76a, 0xa76a,
- 0xa76c, 0xa76c,
- 0xa76e, 0xa76e,
- 0xa779, 0xa779,
- 0xa77b, 0xa77b,
- 0xa77d, 0xa77e,
- 0xa780, 0xa780,
- 0xa782, 0xa782,
- 0xa784, 0xa784,
- 0xa786, 0xa786,
- 0xa78b, 0xa78b,
- 0xa78d, 0xa78d,
- 0xa790, 0xa790,
- 0xa792, 0xa792,
- 0xa796, 0xa796,
- 0xa798, 0xa798,
- 0xa79a, 0xa79a,
- 0xa79c, 0xa79c,
- 0xa79e, 0xa79e,
- 0xa7a0, 0xa7a0,
- 0xa7a2, 0xa7a2,
- 0xa7a4, 0xa7a4,
- 0xa7a6, 0xa7a6,
- 0xa7a8, 0xa7a8,
- 0xa7aa, 0xa7ae,
- 0xa7b0, 0xa7b4,
- 0xa7b6, 0xa7b6,
- 0xa7b8, 0xa7b8,
- 0xa7ba, 0xa7ba,
- 0xa7bc, 0xa7bc,
- 0xa7be, 0xa7be,
- 0xa7c2, 0xa7c2,
- 0xa7c4, 0xa7c6,
- 0xff21, 0xff3a,
- 0x10400, 0x10427,
- 0x104b0, 0x104d3,
- 0x10c80, 0x10cb2,
- 0x118a0, 0x118bf,
- 0x16e40, 0x16e5f,
- 0x1e900, 0x1e921,
-}; /* CR_Changes_When_Lowercased */
-
-/* 'Changes_When_Uppercased': Derived Property */
-static const OnigCodePoint CR_Changes_When_Uppercased[] = {
- 616,
- 0x0061, 0x007a,
- 0x00b5, 0x00b5,
- 0x00df, 0x00f6,
- 0x00f8, 0x00ff,
- 0x0101, 0x0101,
- 0x0103, 0x0103,
- 0x0105, 0x0105,
- 0x0107, 0x0107,
- 0x0109, 0x0109,
- 0x010b, 0x010b,
- 0x010d, 0x010d,
- 0x010f, 0x010f,
- 0x0111, 0x0111,
- 0x0113, 0x0113,
- 0x0115, 0x0115,
- 0x0117, 0x0117,
- 0x0119, 0x0119,
- 0x011b, 0x011b,
- 0x011d, 0x011d,
- 0x011f, 0x011f,
- 0x0121, 0x0121,
- 0x0123, 0x0123,
- 0x0125, 0x0125,
- 0x0127, 0x0127,
- 0x0129, 0x0129,
- 0x012b, 0x012b,
- 0x012d, 0x012d,
- 0x012f, 0x012f,
- 0x0131, 0x0131,
- 0x0133, 0x0133,
- 0x0135, 0x0135,
- 0x0137, 0x0137,
- 0x013a, 0x013a,
- 0x013c, 0x013c,
- 0x013e, 0x013e,
- 0x0140, 0x0140,
- 0x0142, 0x0142,
- 0x0144, 0x0144,
- 0x0146, 0x0146,
- 0x0148, 0x0149,
- 0x014b, 0x014b,
- 0x014d, 0x014d,
- 0x014f, 0x014f,
- 0x0151, 0x0151,
- 0x0153, 0x0153,
- 0x0155, 0x0155,
- 0x0157, 0x0157,
- 0x0159, 0x0159,
- 0x015b, 0x015b,
- 0x015d, 0x015d,
- 0x015f, 0x015f,
- 0x0161, 0x0161,
- 0x0163, 0x0163,
- 0x0165, 0x0165,
- 0x0167, 0x0167,
- 0x0169, 0x0169,
- 0x016b, 0x016b,
- 0x016d, 0x016d,
- 0x016f, 0x016f,
- 0x0171, 0x0171,
- 0x0173, 0x0173,
- 0x0175, 0x0175,
- 0x0177, 0x0177,
- 0x017a, 0x017a,
- 0x017c, 0x017c,
- 0x017e, 0x0180,
- 0x0183, 0x0183,
- 0x0185, 0x0185,
- 0x0188, 0x0188,
- 0x018c, 0x018c,
- 0x0192, 0x0192,
- 0x0195, 0x0195,
- 0x0199, 0x019a,
- 0x019e, 0x019e,
- 0x01a1, 0x01a1,
- 0x01a3, 0x01a3,
- 0x01a5, 0x01a5,
- 0x01a8, 0x01a8,
- 0x01ad, 0x01ad,
- 0x01b0, 0x01b0,
- 0x01b4, 0x01b4,
- 0x01b6, 0x01b6,
- 0x01b9, 0x01b9,
- 0x01bd, 0x01bd,
- 0x01bf, 0x01bf,
- 0x01c5, 0x01c6,
- 0x01c8, 0x01c9,
- 0x01cb, 0x01cc,
- 0x01ce, 0x01ce,
- 0x01d0, 0x01d0,
- 0x01d2, 0x01d2,
- 0x01d4, 0x01d4,
- 0x01d6, 0x01d6,
- 0x01d8, 0x01d8,
- 0x01da, 0x01da,
- 0x01dc, 0x01dd,
- 0x01df, 0x01df,
- 0x01e1, 0x01e1,
- 0x01e3, 0x01e3,
- 0x01e5, 0x01e5,
- 0x01e7, 0x01e7,
- 0x01e9, 0x01e9,
- 0x01eb, 0x01eb,
- 0x01ed, 0x01ed,
- 0x01ef, 0x01f0,
- 0x01f2, 0x01f3,
- 0x01f5, 0x01f5,
- 0x01f9, 0x01f9,
- 0x01fb, 0x01fb,
- 0x01fd, 0x01fd,
- 0x01ff, 0x01ff,
- 0x0201, 0x0201,
- 0x0203, 0x0203,
- 0x0205, 0x0205,
- 0x0207, 0x0207,
- 0x0209, 0x0209,
- 0x020b, 0x020b,
- 0x020d, 0x020d,
- 0x020f, 0x020f,
- 0x0211, 0x0211,
- 0x0213, 0x0213,
- 0x0215, 0x0215,
- 0x0217, 0x0217,
- 0x0219, 0x0219,
- 0x021b, 0x021b,
- 0x021d, 0x021d,
- 0x021f, 0x021f,
- 0x0223, 0x0223,
- 0x0225, 0x0225,
- 0x0227, 0x0227,
- 0x0229, 0x0229,
- 0x022b, 0x022b,
- 0x022d, 0x022d,
- 0x022f, 0x022f,
- 0x0231, 0x0231,
- 0x0233, 0x0233,
- 0x023c, 0x023c,
- 0x023f, 0x0240,
- 0x0242, 0x0242,
- 0x0247, 0x0247,
- 0x0249, 0x0249,
- 0x024b, 0x024b,
- 0x024d, 0x024d,
- 0x024f, 0x0254,
- 0x0256, 0x0257,
- 0x0259, 0x0259,
- 0x025b, 0x025c,
- 0x0260, 0x0261,
- 0x0263, 0x0263,
- 0x0265, 0x0266,
- 0x0268, 0x026c,
- 0x026f, 0x026f,
- 0x0271, 0x0272,
- 0x0275, 0x0275,
- 0x027d, 0x027d,
- 0x0280, 0x0280,
- 0x0282, 0x0283,
- 0x0287, 0x028c,
- 0x0292, 0x0292,
- 0x029d, 0x029e,
- 0x0345, 0x0345,
- 0x0371, 0x0371,
- 0x0373, 0x0373,
- 0x0377, 0x0377,
- 0x037b, 0x037d,
- 0x0390, 0x0390,
- 0x03ac, 0x03ce,
- 0x03d0, 0x03d1,
- 0x03d5, 0x03d7,
- 0x03d9, 0x03d9,
- 0x03db, 0x03db,
- 0x03dd, 0x03dd,
- 0x03df, 0x03df,
- 0x03e1, 0x03e1,
- 0x03e3, 0x03e3,
- 0x03e5, 0x03e5,
- 0x03e7, 0x03e7,
- 0x03e9, 0x03e9,
- 0x03eb, 0x03eb,
- 0x03ed, 0x03ed,
- 0x03ef, 0x03f3,
- 0x03f5, 0x03f5,
- 0x03f8, 0x03f8,
- 0x03fb, 0x03fb,
- 0x0430, 0x045f,
- 0x0461, 0x0461,
- 0x0463, 0x0463,
- 0x0465, 0x0465,
- 0x0467, 0x0467,
- 0x0469, 0x0469,
- 0x046b, 0x046b,
- 0x046d, 0x046d,
- 0x046f, 0x046f,
- 0x0471, 0x0471,
- 0x0473, 0x0473,
- 0x0475, 0x0475,
- 0x0477, 0x0477,
- 0x0479, 0x0479,
- 0x047b, 0x047b,
- 0x047d, 0x047d,
- 0x047f, 0x047f,
- 0x0481, 0x0481,
- 0x048b, 0x048b,
- 0x048d, 0x048d,
- 0x048f, 0x048f,
- 0x0491, 0x0491,
- 0x0493, 0x0493,
- 0x0495, 0x0495,
- 0x0497, 0x0497,
- 0x0499, 0x0499,
- 0x049b, 0x049b,
- 0x049d, 0x049d,
- 0x049f, 0x049f,
- 0x04a1, 0x04a1,
- 0x04a3, 0x04a3,
- 0x04a5, 0x04a5,
- 0x04a7, 0x04a7,
- 0x04a9, 0x04a9,
- 0x04ab, 0x04ab,
- 0x04ad, 0x04ad,
- 0x04af, 0x04af,
- 0x04b1, 0x04b1,
- 0x04b3, 0x04b3,
- 0x04b5, 0x04b5,
- 0x04b7, 0x04b7,
- 0x04b9, 0x04b9,
- 0x04bb, 0x04bb,
- 0x04bd, 0x04bd,
- 0x04bf, 0x04bf,
- 0x04c2, 0x04c2,
- 0x04c4, 0x04c4,
- 0x04c6, 0x04c6,
- 0x04c8, 0x04c8,
- 0x04ca, 0x04ca,
- 0x04cc, 0x04cc,
- 0x04ce, 0x04cf,
- 0x04d1, 0x04d1,
- 0x04d3, 0x04d3,
- 0x04d5, 0x04d5,
- 0x04d7, 0x04d7,
- 0x04d9, 0x04d9,
- 0x04db, 0x04db,
- 0x04dd, 0x04dd,
- 0x04df, 0x04df,
- 0x04e1, 0x04e1,
- 0x04e3, 0x04e3,
- 0x04e5, 0x04e5,
- 0x04e7, 0x04e7,
- 0x04e9, 0x04e9,
- 0x04eb, 0x04eb,
- 0x04ed, 0x04ed,
- 0x04ef, 0x04ef,
- 0x04f1, 0x04f1,
- 0x04f3, 0x04f3,
- 0x04f5, 0x04f5,
- 0x04f7, 0x04f7,
- 0x04f9, 0x04f9,
- 0x04fb, 0x04fb,
- 0x04fd, 0x04fd,
- 0x04ff, 0x04ff,
- 0x0501, 0x0501,
- 0x0503, 0x0503,
- 0x0505, 0x0505,
- 0x0507, 0x0507,
- 0x0509, 0x0509,
- 0x050b, 0x050b,
- 0x050d, 0x050d,
- 0x050f, 0x050f,
- 0x0511, 0x0511,
- 0x0513, 0x0513,
- 0x0515, 0x0515,
- 0x0517, 0x0517,
- 0x0519, 0x0519,
- 0x051b, 0x051b,
- 0x051d, 0x051d,
- 0x051f, 0x051f,
- 0x0521, 0x0521,
- 0x0523, 0x0523,
- 0x0525, 0x0525,
- 0x0527, 0x0527,
- 0x0529, 0x0529,
- 0x052b, 0x052b,
- 0x052d, 0x052d,
- 0x052f, 0x052f,
- 0x0561, 0x0587,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1d79, 0x1d79,
- 0x1d7d, 0x1d7d,
- 0x1d8e, 0x1d8e,
- 0x1e01, 0x1e01,
- 0x1e03, 0x1e03,
- 0x1e05, 0x1e05,
- 0x1e07, 0x1e07,
- 0x1e09, 0x1e09,
- 0x1e0b, 0x1e0b,
- 0x1e0d, 0x1e0d,
- 0x1e0f, 0x1e0f,
- 0x1e11, 0x1e11,
- 0x1e13, 0x1e13,
- 0x1e15, 0x1e15,
- 0x1e17, 0x1e17,
- 0x1e19, 0x1e19,
- 0x1e1b, 0x1e1b,
- 0x1e1d, 0x1e1d,
- 0x1e1f, 0x1e1f,
- 0x1e21, 0x1e21,
- 0x1e23, 0x1e23,
- 0x1e25, 0x1e25,
- 0x1e27, 0x1e27,
- 0x1e29, 0x1e29,
- 0x1e2b, 0x1e2b,
- 0x1e2d, 0x1e2d,
- 0x1e2f, 0x1e2f,
- 0x1e31, 0x1e31,
- 0x1e33, 0x1e33,
- 0x1e35, 0x1e35,
- 0x1e37, 0x1e37,
- 0x1e39, 0x1e39,
- 0x1e3b, 0x1e3b,
- 0x1e3d, 0x1e3d,
- 0x1e3f, 0x1e3f,
- 0x1e41, 0x1e41,
- 0x1e43, 0x1e43,
- 0x1e45, 0x1e45,
- 0x1e47, 0x1e47,
- 0x1e49, 0x1e49,
- 0x1e4b, 0x1e4b,
- 0x1e4d, 0x1e4d,
- 0x1e4f, 0x1e4f,
- 0x1e51, 0x1e51,
- 0x1e53, 0x1e53,
- 0x1e55, 0x1e55,
- 0x1e57, 0x1e57,
- 0x1e59, 0x1e59,
- 0x1e5b, 0x1e5b,
- 0x1e5d, 0x1e5d,
- 0x1e5f, 0x1e5f,
- 0x1e61, 0x1e61,
- 0x1e63, 0x1e63,
- 0x1e65, 0x1e65,
- 0x1e67, 0x1e67,
- 0x1e69, 0x1e69,
- 0x1e6b, 0x1e6b,
- 0x1e6d, 0x1e6d,
- 0x1e6f, 0x1e6f,
- 0x1e71, 0x1e71,
- 0x1e73, 0x1e73,
- 0x1e75, 0x1e75,
- 0x1e77, 0x1e77,
- 0x1e79, 0x1e79,
- 0x1e7b, 0x1e7b,
- 0x1e7d, 0x1e7d,
- 0x1e7f, 0x1e7f,
- 0x1e81, 0x1e81,
- 0x1e83, 0x1e83,
- 0x1e85, 0x1e85,
- 0x1e87, 0x1e87,
- 0x1e89, 0x1e89,
- 0x1e8b, 0x1e8b,
- 0x1e8d, 0x1e8d,
- 0x1e8f, 0x1e8f,
- 0x1e91, 0x1e91,
- 0x1e93, 0x1e93,
- 0x1e95, 0x1e9b,
- 0x1ea1, 0x1ea1,
- 0x1ea3, 0x1ea3,
- 0x1ea5, 0x1ea5,
- 0x1ea7, 0x1ea7,
- 0x1ea9, 0x1ea9,
- 0x1eab, 0x1eab,
- 0x1ead, 0x1ead,
- 0x1eaf, 0x1eaf,
- 0x1eb1, 0x1eb1,
- 0x1eb3, 0x1eb3,
- 0x1eb5, 0x1eb5,
- 0x1eb7, 0x1eb7,
- 0x1eb9, 0x1eb9,
- 0x1ebb, 0x1ebb,
- 0x1ebd, 0x1ebd,
- 0x1ebf, 0x1ebf,
- 0x1ec1, 0x1ec1,
- 0x1ec3, 0x1ec3,
- 0x1ec5, 0x1ec5,
- 0x1ec7, 0x1ec7,
- 0x1ec9, 0x1ec9,
- 0x1ecb, 0x1ecb,
- 0x1ecd, 0x1ecd,
- 0x1ecf, 0x1ecf,
- 0x1ed1, 0x1ed1,
- 0x1ed3, 0x1ed3,
- 0x1ed5, 0x1ed5,
- 0x1ed7, 0x1ed7,
- 0x1ed9, 0x1ed9,
- 0x1edb, 0x1edb,
- 0x1edd, 0x1edd,
- 0x1edf, 0x1edf,
- 0x1ee1, 0x1ee1,
- 0x1ee3, 0x1ee3,
- 0x1ee5, 0x1ee5,
- 0x1ee7, 0x1ee7,
- 0x1ee9, 0x1ee9,
- 0x1eeb, 0x1eeb,
- 0x1eed, 0x1eed,
- 0x1eef, 0x1eef,
- 0x1ef1, 0x1ef1,
- 0x1ef3, 0x1ef3,
- 0x1ef5, 0x1ef5,
- 0x1ef7, 0x1ef7,
- 0x1ef9, 0x1ef9,
- 0x1efb, 0x1efb,
- 0x1efd, 0x1efd,
- 0x1eff, 0x1f07,
- 0x1f10, 0x1f15,
- 0x1f20, 0x1f27,
- 0x1f30, 0x1f37,
- 0x1f40, 0x1f45,
- 0x1f50, 0x1f57,
- 0x1f60, 0x1f67,
- 0x1f70, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fb7,
- 0x1fbc, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fc7,
- 0x1fcc, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fd7,
- 0x1fe0, 0x1fe7,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ff7,
- 0x1ffc, 0x1ffc,
- 0x214e, 0x214e,
- 0x2170, 0x217f,
- 0x2184, 0x2184,
- 0x24d0, 0x24e9,
- 0x2c30, 0x2c5e,
- 0x2c61, 0x2c61,
- 0x2c65, 0x2c66,
- 0x2c68, 0x2c68,
- 0x2c6a, 0x2c6a,
- 0x2c6c, 0x2c6c,
- 0x2c73, 0x2c73,
- 0x2c76, 0x2c76,
- 0x2c81, 0x2c81,
- 0x2c83, 0x2c83,
- 0x2c85, 0x2c85,
- 0x2c87, 0x2c87,
- 0x2c89, 0x2c89,
- 0x2c8b, 0x2c8b,
- 0x2c8d, 0x2c8d,
- 0x2c8f, 0x2c8f,
- 0x2c91, 0x2c91,
- 0x2c93, 0x2c93,
- 0x2c95, 0x2c95,
- 0x2c97, 0x2c97,
- 0x2c99, 0x2c99,
- 0x2c9b, 0x2c9b,
- 0x2c9d, 0x2c9d,
- 0x2c9f, 0x2c9f,
- 0x2ca1, 0x2ca1,
- 0x2ca3, 0x2ca3,
- 0x2ca5, 0x2ca5,
- 0x2ca7, 0x2ca7,
- 0x2ca9, 0x2ca9,
- 0x2cab, 0x2cab,
- 0x2cad, 0x2cad,
- 0x2caf, 0x2caf,
- 0x2cb1, 0x2cb1,
- 0x2cb3, 0x2cb3,
- 0x2cb5, 0x2cb5,
- 0x2cb7, 0x2cb7,
- 0x2cb9, 0x2cb9,
- 0x2cbb, 0x2cbb,
- 0x2cbd, 0x2cbd,
- 0x2cbf, 0x2cbf,
- 0x2cc1, 0x2cc1,
- 0x2cc3, 0x2cc3,
- 0x2cc5, 0x2cc5,
- 0x2cc7, 0x2cc7,
- 0x2cc9, 0x2cc9,
- 0x2ccb, 0x2ccb,
- 0x2ccd, 0x2ccd,
- 0x2ccf, 0x2ccf,
- 0x2cd1, 0x2cd1,
- 0x2cd3, 0x2cd3,
- 0x2cd5, 0x2cd5,
- 0x2cd7, 0x2cd7,
- 0x2cd9, 0x2cd9,
- 0x2cdb, 0x2cdb,
- 0x2cdd, 0x2cdd,
- 0x2cdf, 0x2cdf,
- 0x2ce1, 0x2ce1,
- 0x2ce3, 0x2ce3,
- 0x2cec, 0x2cec,
- 0x2cee, 0x2cee,
- 0x2cf3, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa641, 0xa641,
- 0xa643, 0xa643,
- 0xa645, 0xa645,
- 0xa647, 0xa647,
- 0xa649, 0xa649,
- 0xa64b, 0xa64b,
- 0xa64d, 0xa64d,
- 0xa64f, 0xa64f,
- 0xa651, 0xa651,
- 0xa653, 0xa653,
- 0xa655, 0xa655,
- 0xa657, 0xa657,
- 0xa659, 0xa659,
- 0xa65b, 0xa65b,
- 0xa65d, 0xa65d,
- 0xa65f, 0xa65f,
- 0xa661, 0xa661,
- 0xa663, 0xa663,
- 0xa665, 0xa665,
- 0xa667, 0xa667,
- 0xa669, 0xa669,
- 0xa66b, 0xa66b,
- 0xa66d, 0xa66d,
- 0xa681, 0xa681,
- 0xa683, 0xa683,
- 0xa685, 0xa685,
- 0xa687, 0xa687,
- 0xa689, 0xa689,
- 0xa68b, 0xa68b,
- 0xa68d, 0xa68d,
- 0xa68f, 0xa68f,
- 0xa691, 0xa691,
- 0xa693, 0xa693,
- 0xa695, 0xa695,
- 0xa697, 0xa697,
- 0xa699, 0xa699,
- 0xa69b, 0xa69b,
- 0xa723, 0xa723,
- 0xa725, 0xa725,
- 0xa727, 0xa727,
- 0xa729, 0xa729,
- 0xa72b, 0xa72b,
- 0xa72d, 0xa72d,
- 0xa72f, 0xa72f,
- 0xa733, 0xa733,
- 0xa735, 0xa735,
- 0xa737, 0xa737,
- 0xa739, 0xa739,
- 0xa73b, 0xa73b,
- 0xa73d, 0xa73d,
- 0xa73f, 0xa73f,
- 0xa741, 0xa741,
- 0xa743, 0xa743,
- 0xa745, 0xa745,
- 0xa747, 0xa747,
- 0xa749, 0xa749,
- 0xa74b, 0xa74b,
- 0xa74d, 0xa74d,
- 0xa74f, 0xa74f,
- 0xa751, 0xa751,
- 0xa753, 0xa753,
- 0xa755, 0xa755,
- 0xa757, 0xa757,
- 0xa759, 0xa759,
- 0xa75b, 0xa75b,
- 0xa75d, 0xa75d,
- 0xa75f, 0xa75f,
- 0xa761, 0xa761,
- 0xa763, 0xa763,
- 0xa765, 0xa765,
- 0xa767, 0xa767,
- 0xa769, 0xa769,
- 0xa76b, 0xa76b,
- 0xa76d, 0xa76d,
- 0xa76f, 0xa76f,
- 0xa77a, 0xa77a,
- 0xa77c, 0xa77c,
- 0xa77f, 0xa77f,
- 0xa781, 0xa781,
- 0xa783, 0xa783,
- 0xa785, 0xa785,
- 0xa787, 0xa787,
- 0xa78c, 0xa78c,
- 0xa791, 0xa791,
- 0xa793, 0xa794,
- 0xa797, 0xa797,
- 0xa799, 0xa799,
- 0xa79b, 0xa79b,
- 0xa79d, 0xa79d,
- 0xa79f, 0xa79f,
- 0xa7a1, 0xa7a1,
- 0xa7a3, 0xa7a3,
- 0xa7a5, 0xa7a5,
- 0xa7a7, 0xa7a7,
- 0xa7a9, 0xa7a9,
- 0xa7b5, 0xa7b5,
- 0xa7b7, 0xa7b7,
- 0xa7b9, 0xa7b9,
- 0xa7bb, 0xa7bb,
- 0xa7bd, 0xa7bd,
- 0xa7bf, 0xa7bf,
- 0xa7c3, 0xa7c3,
- 0xab53, 0xab53,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff41, 0xff5a,
- 0x10428, 0x1044f,
- 0x104d8, 0x104fb,
- 0x10cc0, 0x10cf2,
- 0x118c0, 0x118df,
- 0x16e60, 0x16e7f,
- 0x1e922, 0x1e943,
-}; /* CR_Changes_When_Uppercased */
-
-/* 'Changes_When_Titlecased': Derived Property */
-static const OnigCodePoint CR_Changes_When_Titlecased[] = {
- 615,
- 0x0061, 0x007a,
- 0x00b5, 0x00b5,
- 0x00df, 0x00f6,
- 0x00f8, 0x00ff,
- 0x0101, 0x0101,
- 0x0103, 0x0103,
- 0x0105, 0x0105,
- 0x0107, 0x0107,
- 0x0109, 0x0109,
- 0x010b, 0x010b,
- 0x010d, 0x010d,
- 0x010f, 0x010f,
- 0x0111, 0x0111,
- 0x0113, 0x0113,
- 0x0115, 0x0115,
- 0x0117, 0x0117,
- 0x0119, 0x0119,
- 0x011b, 0x011b,
- 0x011d, 0x011d,
- 0x011f, 0x011f,
- 0x0121, 0x0121,
- 0x0123, 0x0123,
- 0x0125, 0x0125,
- 0x0127, 0x0127,
- 0x0129, 0x0129,
- 0x012b, 0x012b,
- 0x012d, 0x012d,
- 0x012f, 0x012f,
- 0x0131, 0x0131,
- 0x0133, 0x0133,
- 0x0135, 0x0135,
- 0x0137, 0x0137,
- 0x013a, 0x013a,
- 0x013c, 0x013c,
- 0x013e, 0x013e,
- 0x0140, 0x0140,
- 0x0142, 0x0142,
- 0x0144, 0x0144,
- 0x0146, 0x0146,
- 0x0148, 0x0149,
- 0x014b, 0x014b,
- 0x014d, 0x014d,
- 0x014f, 0x014f,
- 0x0151, 0x0151,
- 0x0153, 0x0153,
- 0x0155, 0x0155,
- 0x0157, 0x0157,
- 0x0159, 0x0159,
- 0x015b, 0x015b,
- 0x015d, 0x015d,
- 0x015f, 0x015f,
- 0x0161, 0x0161,
- 0x0163, 0x0163,
- 0x0165, 0x0165,
- 0x0167, 0x0167,
- 0x0169, 0x0169,
- 0x016b, 0x016b,
- 0x016d, 0x016d,
- 0x016f, 0x016f,
- 0x0171, 0x0171,
- 0x0173, 0x0173,
- 0x0175, 0x0175,
- 0x0177, 0x0177,
- 0x017a, 0x017a,
- 0x017c, 0x017c,
- 0x017e, 0x0180,
- 0x0183, 0x0183,
- 0x0185, 0x0185,
- 0x0188, 0x0188,
- 0x018c, 0x018c,
- 0x0192, 0x0192,
- 0x0195, 0x0195,
- 0x0199, 0x019a,
- 0x019e, 0x019e,
- 0x01a1, 0x01a1,
- 0x01a3, 0x01a3,
- 0x01a5, 0x01a5,
- 0x01a8, 0x01a8,
- 0x01ad, 0x01ad,
- 0x01b0, 0x01b0,
- 0x01b4, 0x01b4,
- 0x01b6, 0x01b6,
- 0x01b9, 0x01b9,
- 0x01bd, 0x01bd,
- 0x01bf, 0x01bf,
- 0x01c4, 0x01c4,
- 0x01c6, 0x01c7,
- 0x01c9, 0x01ca,
- 0x01cc, 0x01cc,
- 0x01ce, 0x01ce,
- 0x01d0, 0x01d0,
- 0x01d2, 0x01d2,
- 0x01d4, 0x01d4,
- 0x01d6, 0x01d6,
- 0x01d8, 0x01d8,
- 0x01da, 0x01da,
- 0x01dc, 0x01dd,
- 0x01df, 0x01df,
- 0x01e1, 0x01e1,
- 0x01e3, 0x01e3,
- 0x01e5, 0x01e5,
- 0x01e7, 0x01e7,
- 0x01e9, 0x01e9,
- 0x01eb, 0x01eb,
- 0x01ed, 0x01ed,
- 0x01ef, 0x01f1,
- 0x01f3, 0x01f3,
- 0x01f5, 0x01f5,
- 0x01f9, 0x01f9,
- 0x01fb, 0x01fb,
- 0x01fd, 0x01fd,
- 0x01ff, 0x01ff,
- 0x0201, 0x0201,
- 0x0203, 0x0203,
- 0x0205, 0x0205,
- 0x0207, 0x0207,
- 0x0209, 0x0209,
- 0x020b, 0x020b,
- 0x020d, 0x020d,
- 0x020f, 0x020f,
- 0x0211, 0x0211,
- 0x0213, 0x0213,
- 0x0215, 0x0215,
- 0x0217, 0x0217,
- 0x0219, 0x0219,
- 0x021b, 0x021b,
- 0x021d, 0x021d,
- 0x021f, 0x021f,
- 0x0223, 0x0223,
- 0x0225, 0x0225,
- 0x0227, 0x0227,
- 0x0229, 0x0229,
- 0x022b, 0x022b,
- 0x022d, 0x022d,
- 0x022f, 0x022f,
- 0x0231, 0x0231,
- 0x0233, 0x0233,
- 0x023c, 0x023c,
- 0x023f, 0x0240,
- 0x0242, 0x0242,
- 0x0247, 0x0247,
- 0x0249, 0x0249,
- 0x024b, 0x024b,
- 0x024d, 0x024d,
- 0x024f, 0x0254,
- 0x0256, 0x0257,
- 0x0259, 0x0259,
- 0x025b, 0x025c,
- 0x0260, 0x0261,
- 0x0263, 0x0263,
- 0x0265, 0x0266,
- 0x0268, 0x026c,
- 0x026f, 0x026f,
- 0x0271, 0x0272,
- 0x0275, 0x0275,
- 0x027d, 0x027d,
- 0x0280, 0x0280,
- 0x0282, 0x0283,
- 0x0287, 0x028c,
- 0x0292, 0x0292,
- 0x029d, 0x029e,
- 0x0345, 0x0345,
- 0x0371, 0x0371,
- 0x0373, 0x0373,
- 0x0377, 0x0377,
- 0x037b, 0x037d,
- 0x0390, 0x0390,
- 0x03ac, 0x03ce,
- 0x03d0, 0x03d1,
- 0x03d5, 0x03d7,
- 0x03d9, 0x03d9,
- 0x03db, 0x03db,
- 0x03dd, 0x03dd,
- 0x03df, 0x03df,
- 0x03e1, 0x03e1,
- 0x03e3, 0x03e3,
- 0x03e5, 0x03e5,
- 0x03e7, 0x03e7,
- 0x03e9, 0x03e9,
- 0x03eb, 0x03eb,
- 0x03ed, 0x03ed,
- 0x03ef, 0x03f3,
- 0x03f5, 0x03f5,
- 0x03f8, 0x03f8,
- 0x03fb, 0x03fb,
- 0x0430, 0x045f,
- 0x0461, 0x0461,
- 0x0463, 0x0463,
- 0x0465, 0x0465,
- 0x0467, 0x0467,
- 0x0469, 0x0469,
- 0x046b, 0x046b,
- 0x046d, 0x046d,
- 0x046f, 0x046f,
- 0x0471, 0x0471,
- 0x0473, 0x0473,
- 0x0475, 0x0475,
- 0x0477, 0x0477,
- 0x0479, 0x0479,
- 0x047b, 0x047b,
- 0x047d, 0x047d,
- 0x047f, 0x047f,
- 0x0481, 0x0481,
- 0x048b, 0x048b,
- 0x048d, 0x048d,
- 0x048f, 0x048f,
- 0x0491, 0x0491,
- 0x0493, 0x0493,
- 0x0495, 0x0495,
- 0x0497, 0x0497,
- 0x0499, 0x0499,
- 0x049b, 0x049b,
- 0x049d, 0x049d,
- 0x049f, 0x049f,
- 0x04a1, 0x04a1,
- 0x04a3, 0x04a3,
- 0x04a5, 0x04a5,
- 0x04a7, 0x04a7,
- 0x04a9, 0x04a9,
- 0x04ab, 0x04ab,
- 0x04ad, 0x04ad,
- 0x04af, 0x04af,
- 0x04b1, 0x04b1,
- 0x04b3, 0x04b3,
- 0x04b5, 0x04b5,
- 0x04b7, 0x04b7,
- 0x04b9, 0x04b9,
- 0x04bb, 0x04bb,
- 0x04bd, 0x04bd,
- 0x04bf, 0x04bf,
- 0x04c2, 0x04c2,
- 0x04c4, 0x04c4,
- 0x04c6, 0x04c6,
- 0x04c8, 0x04c8,
- 0x04ca, 0x04ca,
- 0x04cc, 0x04cc,
- 0x04ce, 0x04cf,
- 0x04d1, 0x04d1,
- 0x04d3, 0x04d3,
- 0x04d5, 0x04d5,
- 0x04d7, 0x04d7,
- 0x04d9, 0x04d9,
- 0x04db, 0x04db,
- 0x04dd, 0x04dd,
- 0x04df, 0x04df,
- 0x04e1, 0x04e1,
- 0x04e3, 0x04e3,
- 0x04e5, 0x04e5,
- 0x04e7, 0x04e7,
- 0x04e9, 0x04e9,
- 0x04eb, 0x04eb,
- 0x04ed, 0x04ed,
- 0x04ef, 0x04ef,
- 0x04f1, 0x04f1,
- 0x04f3, 0x04f3,
- 0x04f5, 0x04f5,
- 0x04f7, 0x04f7,
- 0x04f9, 0x04f9,
- 0x04fb, 0x04fb,
- 0x04fd, 0x04fd,
- 0x04ff, 0x04ff,
- 0x0501, 0x0501,
- 0x0503, 0x0503,
- 0x0505, 0x0505,
- 0x0507, 0x0507,
- 0x0509, 0x0509,
- 0x050b, 0x050b,
- 0x050d, 0x050d,
- 0x050f, 0x050f,
- 0x0511, 0x0511,
- 0x0513, 0x0513,
- 0x0515, 0x0515,
- 0x0517, 0x0517,
- 0x0519, 0x0519,
- 0x051b, 0x051b,
- 0x051d, 0x051d,
- 0x051f, 0x051f,
- 0x0521, 0x0521,
- 0x0523, 0x0523,
- 0x0525, 0x0525,
- 0x0527, 0x0527,
- 0x0529, 0x0529,
- 0x052b, 0x052b,
- 0x052d, 0x052d,
- 0x052f, 0x052f,
- 0x0561, 0x0587,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1d79, 0x1d79,
- 0x1d7d, 0x1d7d,
- 0x1d8e, 0x1d8e,
- 0x1e01, 0x1e01,
- 0x1e03, 0x1e03,
- 0x1e05, 0x1e05,
- 0x1e07, 0x1e07,
- 0x1e09, 0x1e09,
- 0x1e0b, 0x1e0b,
- 0x1e0d, 0x1e0d,
- 0x1e0f, 0x1e0f,
- 0x1e11, 0x1e11,
- 0x1e13, 0x1e13,
- 0x1e15, 0x1e15,
- 0x1e17, 0x1e17,
- 0x1e19, 0x1e19,
- 0x1e1b, 0x1e1b,
- 0x1e1d, 0x1e1d,
- 0x1e1f, 0x1e1f,
- 0x1e21, 0x1e21,
- 0x1e23, 0x1e23,
- 0x1e25, 0x1e25,
- 0x1e27, 0x1e27,
- 0x1e29, 0x1e29,
- 0x1e2b, 0x1e2b,
- 0x1e2d, 0x1e2d,
- 0x1e2f, 0x1e2f,
- 0x1e31, 0x1e31,
- 0x1e33, 0x1e33,
- 0x1e35, 0x1e35,
- 0x1e37, 0x1e37,
- 0x1e39, 0x1e39,
- 0x1e3b, 0x1e3b,
- 0x1e3d, 0x1e3d,
- 0x1e3f, 0x1e3f,
- 0x1e41, 0x1e41,
- 0x1e43, 0x1e43,
- 0x1e45, 0x1e45,
- 0x1e47, 0x1e47,
- 0x1e49, 0x1e49,
- 0x1e4b, 0x1e4b,
- 0x1e4d, 0x1e4d,
- 0x1e4f, 0x1e4f,
- 0x1e51, 0x1e51,
- 0x1e53, 0x1e53,
- 0x1e55, 0x1e55,
- 0x1e57, 0x1e57,
- 0x1e59, 0x1e59,
- 0x1e5b, 0x1e5b,
- 0x1e5d, 0x1e5d,
- 0x1e5f, 0x1e5f,
- 0x1e61, 0x1e61,
- 0x1e63, 0x1e63,
- 0x1e65, 0x1e65,
- 0x1e67, 0x1e67,
- 0x1e69, 0x1e69,
- 0x1e6b, 0x1e6b,
- 0x1e6d, 0x1e6d,
- 0x1e6f, 0x1e6f,
- 0x1e71, 0x1e71,
- 0x1e73, 0x1e73,
- 0x1e75, 0x1e75,
- 0x1e77, 0x1e77,
- 0x1e79, 0x1e79,
- 0x1e7b, 0x1e7b,
- 0x1e7d, 0x1e7d,
- 0x1e7f, 0x1e7f,
- 0x1e81, 0x1e81,
- 0x1e83, 0x1e83,
- 0x1e85, 0x1e85,
- 0x1e87, 0x1e87,
- 0x1e89, 0x1e89,
- 0x1e8b, 0x1e8b,
- 0x1e8d, 0x1e8d,
- 0x1e8f, 0x1e8f,
- 0x1e91, 0x1e91,
- 0x1e93, 0x1e93,
- 0x1e95, 0x1e9b,
- 0x1ea1, 0x1ea1,
- 0x1ea3, 0x1ea3,
- 0x1ea5, 0x1ea5,
- 0x1ea7, 0x1ea7,
- 0x1ea9, 0x1ea9,
- 0x1eab, 0x1eab,
- 0x1ead, 0x1ead,
- 0x1eaf, 0x1eaf,
- 0x1eb1, 0x1eb1,
- 0x1eb3, 0x1eb3,
- 0x1eb5, 0x1eb5,
- 0x1eb7, 0x1eb7,
- 0x1eb9, 0x1eb9,
- 0x1ebb, 0x1ebb,
- 0x1ebd, 0x1ebd,
- 0x1ebf, 0x1ebf,
- 0x1ec1, 0x1ec1,
- 0x1ec3, 0x1ec3,
- 0x1ec5, 0x1ec5,
- 0x1ec7, 0x1ec7,
- 0x1ec9, 0x1ec9,
- 0x1ecb, 0x1ecb,
- 0x1ecd, 0x1ecd,
- 0x1ecf, 0x1ecf,
- 0x1ed1, 0x1ed1,
- 0x1ed3, 0x1ed3,
- 0x1ed5, 0x1ed5,
- 0x1ed7, 0x1ed7,
- 0x1ed9, 0x1ed9,
- 0x1edb, 0x1edb,
- 0x1edd, 0x1edd,
- 0x1edf, 0x1edf,
- 0x1ee1, 0x1ee1,
- 0x1ee3, 0x1ee3,
- 0x1ee5, 0x1ee5,
- 0x1ee7, 0x1ee7,
- 0x1ee9, 0x1ee9,
- 0x1eeb, 0x1eeb,
- 0x1eed, 0x1eed,
- 0x1eef, 0x1eef,
- 0x1ef1, 0x1ef1,
- 0x1ef3, 0x1ef3,
- 0x1ef5, 0x1ef5,
- 0x1ef7, 0x1ef7,
- 0x1ef9, 0x1ef9,
- 0x1efb, 0x1efb,
- 0x1efd, 0x1efd,
- 0x1eff, 0x1f07,
- 0x1f10, 0x1f15,
- 0x1f20, 0x1f27,
- 0x1f30, 0x1f37,
- 0x1f40, 0x1f45,
- 0x1f50, 0x1f57,
- 0x1f60, 0x1f67,
- 0x1f70, 0x1f7d,
- 0x1f80, 0x1f87,
- 0x1f90, 0x1f97,
- 0x1fa0, 0x1fa7,
- 0x1fb0, 0x1fb4,
- 0x1fb6, 0x1fb7,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fc7,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fd7,
- 0x1fe0, 0x1fe7,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ff7,
- 0x214e, 0x214e,
- 0x2170, 0x217f,
- 0x2184, 0x2184,
- 0x24d0, 0x24e9,
- 0x2c30, 0x2c5e,
- 0x2c61, 0x2c61,
- 0x2c65, 0x2c66,
- 0x2c68, 0x2c68,
- 0x2c6a, 0x2c6a,
- 0x2c6c, 0x2c6c,
- 0x2c73, 0x2c73,
- 0x2c76, 0x2c76,
- 0x2c81, 0x2c81,
- 0x2c83, 0x2c83,
- 0x2c85, 0x2c85,
- 0x2c87, 0x2c87,
- 0x2c89, 0x2c89,
- 0x2c8b, 0x2c8b,
- 0x2c8d, 0x2c8d,
- 0x2c8f, 0x2c8f,
- 0x2c91, 0x2c91,
- 0x2c93, 0x2c93,
- 0x2c95, 0x2c95,
- 0x2c97, 0x2c97,
- 0x2c99, 0x2c99,
- 0x2c9b, 0x2c9b,
- 0x2c9d, 0x2c9d,
- 0x2c9f, 0x2c9f,
- 0x2ca1, 0x2ca1,
- 0x2ca3, 0x2ca3,
- 0x2ca5, 0x2ca5,
- 0x2ca7, 0x2ca7,
- 0x2ca9, 0x2ca9,
- 0x2cab, 0x2cab,
- 0x2cad, 0x2cad,
- 0x2caf, 0x2caf,
- 0x2cb1, 0x2cb1,
- 0x2cb3, 0x2cb3,
- 0x2cb5, 0x2cb5,
- 0x2cb7, 0x2cb7,
- 0x2cb9, 0x2cb9,
- 0x2cbb, 0x2cbb,
- 0x2cbd, 0x2cbd,
- 0x2cbf, 0x2cbf,
- 0x2cc1, 0x2cc1,
- 0x2cc3, 0x2cc3,
- 0x2cc5, 0x2cc5,
- 0x2cc7, 0x2cc7,
- 0x2cc9, 0x2cc9,
- 0x2ccb, 0x2ccb,
- 0x2ccd, 0x2ccd,
- 0x2ccf, 0x2ccf,
- 0x2cd1, 0x2cd1,
- 0x2cd3, 0x2cd3,
- 0x2cd5, 0x2cd5,
- 0x2cd7, 0x2cd7,
- 0x2cd9, 0x2cd9,
- 0x2cdb, 0x2cdb,
- 0x2cdd, 0x2cdd,
- 0x2cdf, 0x2cdf,
- 0x2ce1, 0x2ce1,
- 0x2ce3, 0x2ce3,
- 0x2cec, 0x2cec,
- 0x2cee, 0x2cee,
- 0x2cf3, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa641, 0xa641,
- 0xa643, 0xa643,
- 0xa645, 0xa645,
- 0xa647, 0xa647,
- 0xa649, 0xa649,
- 0xa64b, 0xa64b,
- 0xa64d, 0xa64d,
- 0xa64f, 0xa64f,
- 0xa651, 0xa651,
- 0xa653, 0xa653,
- 0xa655, 0xa655,
- 0xa657, 0xa657,
- 0xa659, 0xa659,
- 0xa65b, 0xa65b,
- 0xa65d, 0xa65d,
- 0xa65f, 0xa65f,
- 0xa661, 0xa661,
- 0xa663, 0xa663,
- 0xa665, 0xa665,
- 0xa667, 0xa667,
- 0xa669, 0xa669,
- 0xa66b, 0xa66b,
- 0xa66d, 0xa66d,
- 0xa681, 0xa681,
- 0xa683, 0xa683,
- 0xa685, 0xa685,
- 0xa687, 0xa687,
- 0xa689, 0xa689,
- 0xa68b, 0xa68b,
- 0xa68d, 0xa68d,
- 0xa68f, 0xa68f,
- 0xa691, 0xa691,
- 0xa693, 0xa693,
- 0xa695, 0xa695,
- 0xa697, 0xa697,
- 0xa699, 0xa699,
- 0xa69b, 0xa69b,
- 0xa723, 0xa723,
- 0xa725, 0xa725,
- 0xa727, 0xa727,
- 0xa729, 0xa729,
- 0xa72b, 0xa72b,
- 0xa72d, 0xa72d,
- 0xa72f, 0xa72f,
- 0xa733, 0xa733,
- 0xa735, 0xa735,
- 0xa737, 0xa737,
- 0xa739, 0xa739,
- 0xa73b, 0xa73b,
- 0xa73d, 0xa73d,
- 0xa73f, 0xa73f,
- 0xa741, 0xa741,
- 0xa743, 0xa743,
- 0xa745, 0xa745,
- 0xa747, 0xa747,
- 0xa749, 0xa749,
- 0xa74b, 0xa74b,
- 0xa74d, 0xa74d,
- 0xa74f, 0xa74f,
- 0xa751, 0xa751,
- 0xa753, 0xa753,
- 0xa755, 0xa755,
- 0xa757, 0xa757,
- 0xa759, 0xa759,
- 0xa75b, 0xa75b,
- 0xa75d, 0xa75d,
- 0xa75f, 0xa75f,
- 0xa761, 0xa761,
- 0xa763, 0xa763,
- 0xa765, 0xa765,
- 0xa767, 0xa767,
- 0xa769, 0xa769,
- 0xa76b, 0xa76b,
- 0xa76d, 0xa76d,
- 0xa76f, 0xa76f,
- 0xa77a, 0xa77a,
- 0xa77c, 0xa77c,
- 0xa77f, 0xa77f,
- 0xa781, 0xa781,
- 0xa783, 0xa783,
- 0xa785, 0xa785,
- 0xa787, 0xa787,
- 0xa78c, 0xa78c,
- 0xa791, 0xa791,
- 0xa793, 0xa794,
- 0xa797, 0xa797,
- 0xa799, 0xa799,
- 0xa79b, 0xa79b,
- 0xa79d, 0xa79d,
- 0xa79f, 0xa79f,
- 0xa7a1, 0xa7a1,
- 0xa7a3, 0xa7a3,
- 0xa7a5, 0xa7a5,
- 0xa7a7, 0xa7a7,
- 0xa7a9, 0xa7a9,
- 0xa7b5, 0xa7b5,
- 0xa7b7, 0xa7b7,
- 0xa7b9, 0xa7b9,
- 0xa7bb, 0xa7bb,
- 0xa7bd, 0xa7bd,
- 0xa7bf, 0xa7bf,
- 0xa7c3, 0xa7c3,
- 0xab53, 0xab53,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff41, 0xff5a,
- 0x10428, 0x1044f,
- 0x104d8, 0x104fb,
- 0x10cc0, 0x10cf2,
- 0x118c0, 0x118df,
- 0x16e60, 0x16e7f,
- 0x1e922, 0x1e943,
-}; /* CR_Changes_When_Titlecased */
-
-/* 'Changes_When_Casefolded': Derived Property */
-static const OnigCodePoint CR_Changes_When_Casefolded[] = {
- 612,
- 0x0041, 0x005a,
- 0x00b5, 0x00b5,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00df,
- 0x0100, 0x0100,
- 0x0102, 0x0102,
- 0x0104, 0x0104,
- 0x0106, 0x0106,
- 0x0108, 0x0108,
- 0x010a, 0x010a,
- 0x010c, 0x010c,
- 0x010e, 0x010e,
- 0x0110, 0x0110,
- 0x0112, 0x0112,
- 0x0114, 0x0114,
- 0x0116, 0x0116,
- 0x0118, 0x0118,
- 0x011a, 0x011a,
- 0x011c, 0x011c,
- 0x011e, 0x011e,
- 0x0120, 0x0120,
- 0x0122, 0x0122,
- 0x0124, 0x0124,
- 0x0126, 0x0126,
- 0x0128, 0x0128,
- 0x012a, 0x012a,
- 0x012c, 0x012c,
- 0x012e, 0x012e,
- 0x0130, 0x0130,
- 0x0132, 0x0132,
- 0x0134, 0x0134,
- 0x0136, 0x0136,
- 0x0139, 0x0139,
- 0x013b, 0x013b,
- 0x013d, 0x013d,
- 0x013f, 0x013f,
- 0x0141, 0x0141,
- 0x0143, 0x0143,
- 0x0145, 0x0145,
- 0x0147, 0x0147,
- 0x0149, 0x014a,
- 0x014c, 0x014c,
- 0x014e, 0x014e,
- 0x0150, 0x0150,
- 0x0152, 0x0152,
- 0x0154, 0x0154,
- 0x0156, 0x0156,
- 0x0158, 0x0158,
- 0x015a, 0x015a,
- 0x015c, 0x015c,
- 0x015e, 0x015e,
- 0x0160, 0x0160,
- 0x0162, 0x0162,
- 0x0164, 0x0164,
- 0x0166, 0x0166,
- 0x0168, 0x0168,
- 0x016a, 0x016a,
- 0x016c, 0x016c,
- 0x016e, 0x016e,
- 0x0170, 0x0170,
- 0x0172, 0x0172,
- 0x0174, 0x0174,
- 0x0176, 0x0176,
- 0x0178, 0x0179,
- 0x017b, 0x017b,
- 0x017d, 0x017d,
- 0x017f, 0x017f,
- 0x0181, 0x0182,
- 0x0184, 0x0184,
- 0x0186, 0x0187,
- 0x0189, 0x018b,
- 0x018e, 0x0191,
- 0x0193, 0x0194,
- 0x0196, 0x0198,
- 0x019c, 0x019d,
- 0x019f, 0x01a0,
- 0x01a2, 0x01a2,
- 0x01a4, 0x01a4,
- 0x01a6, 0x01a7,
- 0x01a9, 0x01a9,
- 0x01ac, 0x01ac,
- 0x01ae, 0x01af,
- 0x01b1, 0x01b3,
- 0x01b5, 0x01b5,
- 0x01b7, 0x01b8,
- 0x01bc, 0x01bc,
- 0x01c4, 0x01c5,
- 0x01c7, 0x01c8,
- 0x01ca, 0x01cb,
- 0x01cd, 0x01cd,
- 0x01cf, 0x01cf,
- 0x01d1, 0x01d1,
- 0x01d3, 0x01d3,
- 0x01d5, 0x01d5,
- 0x01d7, 0x01d7,
- 0x01d9, 0x01d9,
- 0x01db, 0x01db,
- 0x01de, 0x01de,
- 0x01e0, 0x01e0,
- 0x01e2, 0x01e2,
- 0x01e4, 0x01e4,
- 0x01e6, 0x01e6,
- 0x01e8, 0x01e8,
- 0x01ea, 0x01ea,
- 0x01ec, 0x01ec,
- 0x01ee, 0x01ee,
- 0x01f1, 0x01f2,
- 0x01f4, 0x01f4,
- 0x01f6, 0x01f8,
- 0x01fa, 0x01fa,
- 0x01fc, 0x01fc,
- 0x01fe, 0x01fe,
- 0x0200, 0x0200,
- 0x0202, 0x0202,
- 0x0204, 0x0204,
- 0x0206, 0x0206,
- 0x0208, 0x0208,
- 0x020a, 0x020a,
- 0x020c, 0x020c,
- 0x020e, 0x020e,
- 0x0210, 0x0210,
- 0x0212, 0x0212,
- 0x0214, 0x0214,
- 0x0216, 0x0216,
- 0x0218, 0x0218,
- 0x021a, 0x021a,
- 0x021c, 0x021c,
- 0x021e, 0x021e,
- 0x0220, 0x0220,
- 0x0222, 0x0222,
- 0x0224, 0x0224,
- 0x0226, 0x0226,
- 0x0228, 0x0228,
- 0x022a, 0x022a,
- 0x022c, 0x022c,
- 0x022e, 0x022e,
- 0x0230, 0x0230,
- 0x0232, 0x0232,
- 0x023a, 0x023b,
- 0x023d, 0x023e,
- 0x0241, 0x0241,
- 0x0243, 0x0246,
- 0x0248, 0x0248,
- 0x024a, 0x024a,
- 0x024c, 0x024c,
- 0x024e, 0x024e,
- 0x0345, 0x0345,
- 0x0370, 0x0370,
- 0x0372, 0x0372,
- 0x0376, 0x0376,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x038f,
- 0x0391, 0x03a1,
- 0x03a3, 0x03ab,
- 0x03c2, 0x03c2,
- 0x03cf, 0x03d1,
- 0x03d5, 0x03d6,
- 0x03d8, 0x03d8,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03e2,
- 0x03e4, 0x03e4,
- 0x03e6, 0x03e6,
- 0x03e8, 0x03e8,
- 0x03ea, 0x03ea,
- 0x03ec, 0x03ec,
- 0x03ee, 0x03ee,
- 0x03f0, 0x03f1,
- 0x03f4, 0x03f5,
- 0x03f7, 0x03f7,
- 0x03f9, 0x03fa,
- 0x03fd, 0x042f,
- 0x0460, 0x0460,
- 0x0462, 0x0462,
- 0x0464, 0x0464,
- 0x0466, 0x0466,
- 0x0468, 0x0468,
- 0x046a, 0x046a,
- 0x046c, 0x046c,
- 0x046e, 0x046e,
- 0x0470, 0x0470,
- 0x0472, 0x0472,
- 0x0474, 0x0474,
- 0x0476, 0x0476,
- 0x0478, 0x0478,
- 0x047a, 0x047a,
- 0x047c, 0x047c,
- 0x047e, 0x047e,
- 0x0480, 0x0480,
- 0x048a, 0x048a,
- 0x048c, 0x048c,
- 0x048e, 0x048e,
- 0x0490, 0x0490,
- 0x0492, 0x0492,
- 0x0494, 0x0494,
- 0x0496, 0x0496,
- 0x0498, 0x0498,
- 0x049a, 0x049a,
- 0x049c, 0x049c,
- 0x049e, 0x049e,
- 0x04a0, 0x04a0,
- 0x04a2, 0x04a2,
- 0x04a4, 0x04a4,
- 0x04a6, 0x04a6,
- 0x04a8, 0x04a8,
- 0x04aa, 0x04aa,
- 0x04ac, 0x04ac,
- 0x04ae, 0x04ae,
- 0x04b0, 0x04b0,
- 0x04b2, 0x04b2,
- 0x04b4, 0x04b4,
- 0x04b6, 0x04b6,
- 0x04b8, 0x04b8,
- 0x04ba, 0x04ba,
- 0x04bc, 0x04bc,
- 0x04be, 0x04be,
- 0x04c0, 0x04c1,
- 0x04c3, 0x04c3,
- 0x04c5, 0x04c5,
- 0x04c7, 0x04c7,
- 0x04c9, 0x04c9,
- 0x04cb, 0x04cb,
- 0x04cd, 0x04cd,
- 0x04d0, 0x04d0,
- 0x04d2, 0x04d2,
- 0x04d4, 0x04d4,
- 0x04d6, 0x04d6,
- 0x04d8, 0x04d8,
- 0x04da, 0x04da,
- 0x04dc, 0x04dc,
- 0x04de, 0x04de,
- 0x04e0, 0x04e0,
- 0x04e2, 0x04e2,
- 0x04e4, 0x04e4,
- 0x04e6, 0x04e6,
- 0x04e8, 0x04e8,
- 0x04ea, 0x04ea,
- 0x04ec, 0x04ec,
- 0x04ee, 0x04ee,
- 0x04f0, 0x04f0,
- 0x04f2, 0x04f2,
- 0x04f4, 0x04f4,
- 0x04f6, 0x04f6,
- 0x04f8, 0x04f8,
- 0x04fa, 0x04fa,
- 0x04fc, 0x04fc,
- 0x04fe, 0x04fe,
- 0x0500, 0x0500,
- 0x0502, 0x0502,
- 0x0504, 0x0504,
- 0x0506, 0x0506,
- 0x0508, 0x0508,
- 0x050a, 0x050a,
- 0x050c, 0x050c,
- 0x050e, 0x050e,
- 0x0510, 0x0510,
- 0x0512, 0x0512,
- 0x0514, 0x0514,
- 0x0516, 0x0516,
- 0x0518, 0x0518,
- 0x051a, 0x051a,
- 0x051c, 0x051c,
- 0x051e, 0x051e,
- 0x0520, 0x0520,
- 0x0522, 0x0522,
- 0x0524, 0x0524,
- 0x0526, 0x0526,
- 0x0528, 0x0528,
- 0x052a, 0x052a,
- 0x052c, 0x052c,
- 0x052e, 0x052e,
- 0x0531, 0x0556,
- 0x0587, 0x0587,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1e00, 0x1e00,
- 0x1e02, 0x1e02,
- 0x1e04, 0x1e04,
- 0x1e06, 0x1e06,
- 0x1e08, 0x1e08,
- 0x1e0a, 0x1e0a,
- 0x1e0c, 0x1e0c,
- 0x1e0e, 0x1e0e,
- 0x1e10, 0x1e10,
- 0x1e12, 0x1e12,
- 0x1e14, 0x1e14,
- 0x1e16, 0x1e16,
- 0x1e18, 0x1e18,
- 0x1e1a, 0x1e1a,
- 0x1e1c, 0x1e1c,
- 0x1e1e, 0x1e1e,
- 0x1e20, 0x1e20,
- 0x1e22, 0x1e22,
- 0x1e24, 0x1e24,
- 0x1e26, 0x1e26,
- 0x1e28, 0x1e28,
- 0x1e2a, 0x1e2a,
- 0x1e2c, 0x1e2c,
- 0x1e2e, 0x1e2e,
- 0x1e30, 0x1e30,
- 0x1e32, 0x1e32,
- 0x1e34, 0x1e34,
- 0x1e36, 0x1e36,
- 0x1e38, 0x1e38,
- 0x1e3a, 0x1e3a,
- 0x1e3c, 0x1e3c,
- 0x1e3e, 0x1e3e,
- 0x1e40, 0x1e40,
- 0x1e42, 0x1e42,
- 0x1e44, 0x1e44,
- 0x1e46, 0x1e46,
- 0x1e48, 0x1e48,
- 0x1e4a, 0x1e4a,
- 0x1e4c, 0x1e4c,
- 0x1e4e, 0x1e4e,
- 0x1e50, 0x1e50,
- 0x1e52, 0x1e52,
- 0x1e54, 0x1e54,
- 0x1e56, 0x1e56,
- 0x1e58, 0x1e58,
- 0x1e5a, 0x1e5a,
- 0x1e5c, 0x1e5c,
- 0x1e5e, 0x1e5e,
- 0x1e60, 0x1e60,
- 0x1e62, 0x1e62,
- 0x1e64, 0x1e64,
- 0x1e66, 0x1e66,
- 0x1e68, 0x1e68,
- 0x1e6a, 0x1e6a,
- 0x1e6c, 0x1e6c,
- 0x1e6e, 0x1e6e,
- 0x1e70, 0x1e70,
- 0x1e72, 0x1e72,
- 0x1e74, 0x1e74,
- 0x1e76, 0x1e76,
- 0x1e78, 0x1e78,
- 0x1e7a, 0x1e7a,
- 0x1e7c, 0x1e7c,
- 0x1e7e, 0x1e7e,
- 0x1e80, 0x1e80,
- 0x1e82, 0x1e82,
- 0x1e84, 0x1e84,
- 0x1e86, 0x1e86,
- 0x1e88, 0x1e88,
- 0x1e8a, 0x1e8a,
- 0x1e8c, 0x1e8c,
- 0x1e8e, 0x1e8e,
- 0x1e90, 0x1e90,
- 0x1e92, 0x1e92,
- 0x1e94, 0x1e94,
- 0x1e9a, 0x1e9b,
- 0x1e9e, 0x1e9e,
- 0x1ea0, 0x1ea0,
- 0x1ea2, 0x1ea2,
- 0x1ea4, 0x1ea4,
- 0x1ea6, 0x1ea6,
- 0x1ea8, 0x1ea8,
- 0x1eaa, 0x1eaa,
- 0x1eac, 0x1eac,
- 0x1eae, 0x1eae,
- 0x1eb0, 0x1eb0,
- 0x1eb2, 0x1eb2,
- 0x1eb4, 0x1eb4,
- 0x1eb6, 0x1eb6,
- 0x1eb8, 0x1eb8,
- 0x1eba, 0x1eba,
- 0x1ebc, 0x1ebc,
- 0x1ebe, 0x1ebe,
- 0x1ec0, 0x1ec0,
- 0x1ec2, 0x1ec2,
- 0x1ec4, 0x1ec4,
- 0x1ec6, 0x1ec6,
- 0x1ec8, 0x1ec8,
- 0x1eca, 0x1eca,
- 0x1ecc, 0x1ecc,
- 0x1ece, 0x1ece,
- 0x1ed0, 0x1ed0,
- 0x1ed2, 0x1ed2,
- 0x1ed4, 0x1ed4,
- 0x1ed6, 0x1ed6,
- 0x1ed8, 0x1ed8,
- 0x1eda, 0x1eda,
- 0x1edc, 0x1edc,
- 0x1ede, 0x1ede,
- 0x1ee0, 0x1ee0,
- 0x1ee2, 0x1ee2,
- 0x1ee4, 0x1ee4,
- 0x1ee6, 0x1ee6,
- 0x1ee8, 0x1ee8,
- 0x1eea, 0x1eea,
- 0x1eec, 0x1eec,
- 0x1eee, 0x1eee,
- 0x1ef0, 0x1ef0,
- 0x1ef2, 0x1ef2,
- 0x1ef4, 0x1ef4,
- 0x1ef6, 0x1ef6,
- 0x1ef8, 0x1ef8,
- 0x1efa, 0x1efa,
- 0x1efc, 0x1efc,
- 0x1efe, 0x1efe,
- 0x1f08, 0x1f0f,
- 0x1f18, 0x1f1d,
- 0x1f28, 0x1f2f,
- 0x1f38, 0x1f3f,
- 0x1f48, 0x1f4d,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f5f,
- 0x1f68, 0x1f6f,
- 0x1f80, 0x1faf,
- 0x1fb2, 0x1fb4,
- 0x1fb7, 0x1fbc,
- 0x1fc2, 0x1fc4,
- 0x1fc7, 0x1fcc,
- 0x1fd8, 0x1fdb,
- 0x1fe8, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff7, 0x1ffc,
- 0x2126, 0x2126,
- 0x212a, 0x212b,
- 0x2132, 0x2132,
- 0x2160, 0x216f,
- 0x2183, 0x2183,
- 0x24b6, 0x24cf,
- 0x2c00, 0x2c2e,
- 0x2c60, 0x2c60,
- 0x2c62, 0x2c64,
- 0x2c67, 0x2c67,
- 0x2c69, 0x2c69,
- 0x2c6b, 0x2c6b,
- 0x2c6d, 0x2c70,
- 0x2c72, 0x2c72,
- 0x2c75, 0x2c75,
- 0x2c7e, 0x2c80,
- 0x2c82, 0x2c82,
- 0x2c84, 0x2c84,
- 0x2c86, 0x2c86,
- 0x2c88, 0x2c88,
- 0x2c8a, 0x2c8a,
- 0x2c8c, 0x2c8c,
- 0x2c8e, 0x2c8e,
- 0x2c90, 0x2c90,
- 0x2c92, 0x2c92,
- 0x2c94, 0x2c94,
- 0x2c96, 0x2c96,
- 0x2c98, 0x2c98,
- 0x2c9a, 0x2c9a,
- 0x2c9c, 0x2c9c,
- 0x2c9e, 0x2c9e,
- 0x2ca0, 0x2ca0,
- 0x2ca2, 0x2ca2,
- 0x2ca4, 0x2ca4,
- 0x2ca6, 0x2ca6,
- 0x2ca8, 0x2ca8,
- 0x2caa, 0x2caa,
- 0x2cac, 0x2cac,
- 0x2cae, 0x2cae,
- 0x2cb0, 0x2cb0,
- 0x2cb2, 0x2cb2,
- 0x2cb4, 0x2cb4,
- 0x2cb6, 0x2cb6,
- 0x2cb8, 0x2cb8,
- 0x2cba, 0x2cba,
- 0x2cbc, 0x2cbc,
- 0x2cbe, 0x2cbe,
- 0x2cc0, 0x2cc0,
- 0x2cc2, 0x2cc2,
- 0x2cc4, 0x2cc4,
- 0x2cc6, 0x2cc6,
- 0x2cc8, 0x2cc8,
- 0x2cca, 0x2cca,
- 0x2ccc, 0x2ccc,
- 0x2cce, 0x2cce,
- 0x2cd0, 0x2cd0,
- 0x2cd2, 0x2cd2,
- 0x2cd4, 0x2cd4,
- 0x2cd6, 0x2cd6,
- 0x2cd8, 0x2cd8,
- 0x2cda, 0x2cda,
- 0x2cdc, 0x2cdc,
- 0x2cde, 0x2cde,
- 0x2ce0, 0x2ce0,
- 0x2ce2, 0x2ce2,
- 0x2ceb, 0x2ceb,
- 0x2ced, 0x2ced,
- 0x2cf2, 0x2cf2,
- 0xa640, 0xa640,
- 0xa642, 0xa642,
- 0xa644, 0xa644,
- 0xa646, 0xa646,
- 0xa648, 0xa648,
- 0xa64a, 0xa64a,
- 0xa64c, 0xa64c,
- 0xa64e, 0xa64e,
- 0xa650, 0xa650,
- 0xa652, 0xa652,
- 0xa654, 0xa654,
- 0xa656, 0xa656,
- 0xa658, 0xa658,
- 0xa65a, 0xa65a,
- 0xa65c, 0xa65c,
- 0xa65e, 0xa65e,
- 0xa660, 0xa660,
- 0xa662, 0xa662,
- 0xa664, 0xa664,
- 0xa666, 0xa666,
- 0xa668, 0xa668,
- 0xa66a, 0xa66a,
- 0xa66c, 0xa66c,
- 0xa680, 0xa680,
- 0xa682, 0xa682,
- 0xa684, 0xa684,
- 0xa686, 0xa686,
- 0xa688, 0xa688,
- 0xa68a, 0xa68a,
- 0xa68c, 0xa68c,
- 0xa68e, 0xa68e,
- 0xa690, 0xa690,
- 0xa692, 0xa692,
- 0xa694, 0xa694,
- 0xa696, 0xa696,
- 0xa698, 0xa698,
- 0xa69a, 0xa69a,
- 0xa722, 0xa722,
- 0xa724, 0xa724,
- 0xa726, 0xa726,
- 0xa728, 0xa728,
- 0xa72a, 0xa72a,
- 0xa72c, 0xa72c,
- 0xa72e, 0xa72e,
- 0xa732, 0xa732,
- 0xa734, 0xa734,
- 0xa736, 0xa736,
- 0xa738, 0xa738,
- 0xa73a, 0xa73a,
- 0xa73c, 0xa73c,
- 0xa73e, 0xa73e,
- 0xa740, 0xa740,
- 0xa742, 0xa742,
- 0xa744, 0xa744,
- 0xa746, 0xa746,
- 0xa748, 0xa748,
- 0xa74a, 0xa74a,
- 0xa74c, 0xa74c,
- 0xa74e, 0xa74e,
- 0xa750, 0xa750,
- 0xa752, 0xa752,
- 0xa754, 0xa754,
- 0xa756, 0xa756,
- 0xa758, 0xa758,
- 0xa75a, 0xa75a,
- 0xa75c, 0xa75c,
- 0xa75e, 0xa75e,
- 0xa760, 0xa760,
- 0xa762, 0xa762,
- 0xa764, 0xa764,
- 0xa766, 0xa766,
- 0xa768, 0xa768,
- 0xa76a, 0xa76a,
- 0xa76c, 0xa76c,
- 0xa76e, 0xa76e,
- 0xa779, 0xa779,
- 0xa77b, 0xa77b,
- 0xa77d, 0xa77e,
- 0xa780, 0xa780,
- 0xa782, 0xa782,
- 0xa784, 0xa784,
- 0xa786, 0xa786,
- 0xa78b, 0xa78b,
- 0xa78d, 0xa78d,
- 0xa790, 0xa790,
- 0xa792, 0xa792,
- 0xa796, 0xa796,
- 0xa798, 0xa798,
- 0xa79a, 0xa79a,
- 0xa79c, 0xa79c,
- 0xa79e, 0xa79e,
- 0xa7a0, 0xa7a0,
- 0xa7a2, 0xa7a2,
- 0xa7a4, 0xa7a4,
- 0xa7a6, 0xa7a6,
- 0xa7a8, 0xa7a8,
- 0xa7aa, 0xa7ae,
- 0xa7b0, 0xa7b4,
- 0xa7b6, 0xa7b6,
- 0xa7b8, 0xa7b8,
- 0xa7ba, 0xa7ba,
- 0xa7bc, 0xa7bc,
- 0xa7be, 0xa7be,
- 0xa7c2, 0xa7c2,
- 0xa7c4, 0xa7c6,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff21, 0xff3a,
- 0x10400, 0x10427,
- 0x104b0, 0x104d3,
- 0x10c80, 0x10cb2,
- 0x118a0, 0x118bf,
- 0x16e40, 0x16e5f,
- 0x1e900, 0x1e921,
-}; /* CR_Changes_When_Casefolded */
-
-/* 'Changes_When_Casemapped': Derived Property */
-static const OnigCodePoint CR_Changes_When_Casemapped[] = {
- 123,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00b5, 0x00b5,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x0137,
- 0x0139, 0x018c,
- 0x018e, 0x019a,
- 0x019c, 0x01a9,
- 0x01ac, 0x01b9,
- 0x01bc, 0x01bd,
- 0x01bf, 0x01bf,
- 0x01c4, 0x0220,
- 0x0222, 0x0233,
- 0x023a, 0x0254,
- 0x0256, 0x0257,
- 0x0259, 0x0259,
- 0x025b, 0x025c,
- 0x0260, 0x0261,
- 0x0263, 0x0263,
- 0x0265, 0x0266,
- 0x0268, 0x026c,
- 0x026f, 0x026f,
- 0x0271, 0x0272,
- 0x0275, 0x0275,
- 0x027d, 0x027d,
- 0x0280, 0x0280,
- 0x0282, 0x0283,
- 0x0287, 0x028c,
- 0x0292, 0x0292,
- 0x029d, 0x029e,
- 0x0345, 0x0345,
- 0x0370, 0x0373,
- 0x0376, 0x0377,
- 0x037b, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03d1,
- 0x03d5, 0x03f5,
- 0x03f7, 0x03fb,
- 0x03fd, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0561, 0x0587,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fd, 0x10ff,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1d79, 0x1d79,
- 0x1d7d, 0x1d7d,
- 0x1d8e, 0x1d8e,
- 0x1e00, 0x1e9b,
- 0x1e9e, 0x1e9e,
- 0x1ea0, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2126, 0x2126,
- 0x212a, 0x212b,
- 0x2132, 0x2132,
- 0x214e, 0x214e,
- 0x2160, 0x217f,
- 0x2183, 0x2184,
- 0x24b6, 0x24e9,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2c70,
- 0x2c72, 0x2c73,
- 0x2c75, 0x2c76,
- 0x2c7e, 0x2ce3,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0xa640, 0xa66d,
- 0xa680, 0xa69b,
- 0xa722, 0xa72f,
- 0xa732, 0xa76f,
- 0xa779, 0xa787,
- 0xa78b, 0xa78d,
- 0xa790, 0xa794,
- 0xa796, 0xa7ae,
- 0xa7b0, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xab53, 0xab53,
- 0xab70, 0xabbf,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0x10400, 0x1044f,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x118a0, 0x118df,
- 0x16e40, 0x16e7f,
- 0x1e900, 0x1e943,
-}; /* CR_Changes_When_Casemapped */
-
-/* 'ID_Start': Derived Property */
-static const OnigCodePoint CR_ID_Start[] = {
- 609,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0370, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0620, 0x064a,
- 0x066e, 0x066f,
- 0x0671, 0x06d3,
- 0x06d5, 0x06d5,
- 0x06e5, 0x06e6,
- 0x06ee, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x0710,
- 0x0712, 0x072f,
- 0x074d, 0x07a5,
- 0x07b1, 0x07b1,
- 0x07ca, 0x07ea,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x0800, 0x0815,
- 0x081a, 0x081a,
- 0x0824, 0x0824,
- 0x0828, 0x0828,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x0904, 0x0939,
- 0x093d, 0x093d,
- 0x0950, 0x0950,
- 0x0958, 0x0961,
- 0x0971, 0x0980,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09bd,
- 0x09ce, 0x09ce,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e1,
- 0x09f0, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a72, 0x0a74,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0abd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae1,
- 0x0af9, 0x0af9,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b3d,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b71, 0x0b71,
- 0x0b83, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bd0, 0x0bd0,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c3d,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c61,
- 0x0c80, 0x0c80,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cbd,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0cf1, 0x0cf2,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d3d,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d56,
- 0x0d5f, 0x0d61,
- 0x0d7a, 0x0d7f,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0e01, 0x0e30,
- 0x0e32, 0x0e33,
- 0x0e40, 0x0e46,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb0,
- 0x0eb2, 0x0eb3,
- 0x0ebd, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f88, 0x0f8c,
- 0x1000, 0x102a,
- 0x103f, 0x103f,
- 0x1050, 0x1055,
- 0x105a, 0x105d,
- 0x1061, 0x1061,
- 0x1065, 0x1066,
- 0x106e, 0x1070,
- 0x1075, 0x1081,
- 0x108e, 0x108e,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1711,
- 0x1720, 0x1731,
- 0x1740, 0x1751,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1780, 0x17b3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dc,
- 0x1820, 0x1878,
- 0x1880, 0x18a8,
- 0x18aa, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x1a00, 0x1a16,
- 0x1a20, 0x1a54,
- 0x1aa7, 0x1aa7,
- 0x1b05, 0x1b33,
- 0x1b45, 0x1b4b,
- 0x1b83, 0x1ba0,
- 0x1bae, 0x1baf,
- 0x1bba, 0x1be5,
- 0x1c00, 0x1c23,
- 0x1c4d, 0x1c4f,
- 0x1c5a, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2118, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x3005, 0x3007,
- 0x3021, 0x3029,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x309b, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa61f,
- 0xa62a, 0xa62b,
- 0xa640, 0xa66e,
- 0xa67f, 0xa69d,
- 0xa6a0, 0xa6ef,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa801,
- 0xa803, 0xa805,
- 0xa807, 0xa80a,
- 0xa80c, 0xa822,
- 0xa840, 0xa873,
- 0xa882, 0xa8b3,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa8fe,
- 0xa90a, 0xa925,
- 0xa930, 0xa946,
- 0xa960, 0xa97c,
- 0xa984, 0xa9b2,
- 0xa9cf, 0xa9cf,
- 0xa9e0, 0xa9e4,
- 0xa9e6, 0xa9ef,
- 0xa9fa, 0xa9fe,
- 0xaa00, 0xaa28,
- 0xaa40, 0xaa42,
- 0xaa44, 0xaa4b,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaa7a,
- 0xaa7e, 0xaaaf,
- 0xaab1, 0xaab1,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaabd,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaea,
- 0xaaf2, 0xaaf4,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabe2,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb1d,
- 0xfb1f, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x10375,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a00,
- 0x10a10, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d23,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11003, 0x11037,
- 0x11083, 0x110af,
- 0x110d0, 0x110e8,
- 0x11103, 0x11126,
- 0x11144, 0x11144,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11183, 0x111b2,
- 0x111c1, 0x111c4,
- 0x111da, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x1122b,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112de,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x1133d,
- 0x11350, 0x11350,
- 0x1135d, 0x11361,
- 0x11400, 0x11434,
- 0x11447, 0x1144a,
- 0x1145f, 0x1145f,
- 0x11480, 0x114af,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x11580, 0x115ae,
- 0x115d8, 0x115db,
- 0x11600, 0x1162f,
- 0x11644, 0x11644,
- 0x11680, 0x116aa,
- 0x116b8, 0x116b8,
- 0x11700, 0x1171a,
- 0x11800, 0x1182b,
- 0x118a0, 0x118df,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d0,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e3,
- 0x11a00, 0x11a00,
- 0x11a0b, 0x11a32,
- 0x11a3a, 0x11a3a,
- 0x11a50, 0x11a50,
- 0x11a5c, 0x11a89,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c2e,
- 0x11c40, 0x11c40,
- 0x11c72, 0x11c8f,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d30,
- 0x11d46, 0x11d46,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d89,
- 0x11d98, 0x11d98,
- 0x11ee0, 0x11ef2,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b40, 0x16b43,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f50, 0x16f50,
- 0x16f93, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e800, 0x1e8c4,
- 0x1e900, 0x1e943,
- 0x1e94b, 0x1e94b,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_ID_Start */
-
-/* 'ID_Continue': Derived Property */
-static const OnigCodePoint CR_ID_Continue[] = {
- 713,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x005f, 0x005f,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00b7, 0x00b7,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0300, 0x0374,
- 0x0376, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x0483, 0x0487,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0610, 0x061a,
- 0x0620, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06df, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07f5,
- 0x07fa, 0x07fa,
- 0x07fd, 0x07fd,
- 0x0800, 0x082d,
- 0x0840, 0x085b,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0963,
- 0x0966, 0x096f,
- 0x0971, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x09fc, 0x09fc,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bef,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c80, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d54, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d66, 0x0d6f,
- 0x0d7a, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f29,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1049,
- 0x1050, 0x109d,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x135f,
- 0x1369, 0x1371,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x1a00, 0x1a1b,
- 0x1a20, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa7, 0x1aa7,
- 0x1ab0, 0x1abd,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b59,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1bf3,
- 0x1c00, 0x1c37,
- 0x1c40, 0x1c49,
- 0x1c4d, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x203f, 0x2040,
- 0x2054, 0x2054,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x20d0, 0x20dc,
- 0x20e1, 0x20e1,
- 0x20e5, 0x20f0,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2118, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2dff,
- 0x3005, 0x3007,
- 0x3021, 0x302f,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa62b,
- 0xa640, 0xa66f,
- 0xa674, 0xa67d,
- 0xa67f, 0xa6f1,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa827,
- 0xa840, 0xa873,
- 0xa880, 0xa8c5,
- 0xa8d0, 0xa8d9,
- 0xa8e0, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa92d,
- 0xa930, 0xa953,
- 0xa960, 0xa97c,
- 0xa980, 0xa9c0,
- 0xa9cf, 0xa9d9,
- 0xa9e0, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaef,
- 0xaaf2, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabea,
- 0xabec, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0xfe33, 0xfe34,
- 0xfe4d, 0xfe4f,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff3f, 0xff3f,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x101fd, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102e0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae6,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f50,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11046,
- 0x11066, 0x1106f,
- 0x1107f, 0x110ba,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x1113f,
- 0x11144, 0x11146,
- 0x11150, 0x11173,
- 0x11176, 0x11176,
- 0x11180, 0x111c4,
- 0x111c9, 0x111cc,
- 0x111d0, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x11237,
- 0x1123e, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x1144a,
- 0x11450, 0x11459,
- 0x1145e, 0x1145f,
- 0x11480, 0x114c5,
- 0x114c7, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115c0,
- 0x115d8, 0x115dd,
- 0x11600, 0x11640,
- 0x11644, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x11739,
- 0x11800, 0x1183a,
- 0x118a0, 0x118e9,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e1,
- 0x119e3, 0x119e4,
- 0x11a00, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a50, 0x11a99,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c40,
- 0x11c50, 0x11c59,
- 0x11c72, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af4,
- 0x16b00, 0x16b36,
- 0x16b40, 0x16b43,
- 0x16b50, 0x16b59,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2f9,
- 0x1e800, 0x1e8c4,
- 0x1e8d0, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef,
-}; /* CR_ID_Continue */
-
-/* 'XID_Start': Derived Property */
-static const OnigCodePoint CR_XID_Start[] = {
- 616,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0370, 0x0374,
- 0x0376, 0x0377,
- 0x037b, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0620, 0x064a,
- 0x066e, 0x066f,
- 0x0671, 0x06d3,
- 0x06d5, 0x06d5,
- 0x06e5, 0x06e6,
- 0x06ee, 0x06ef,
- 0x06fa, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x0710,
- 0x0712, 0x072f,
- 0x074d, 0x07a5,
- 0x07b1, 0x07b1,
- 0x07ca, 0x07ea,
- 0x07f4, 0x07f5,
- 0x07fa, 0x07fa,
- 0x0800, 0x0815,
- 0x081a, 0x081a,
- 0x0824, 0x0824,
- 0x0828, 0x0828,
- 0x0840, 0x0858,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x0904, 0x0939,
- 0x093d, 0x093d,
- 0x0950, 0x0950,
- 0x0958, 0x0961,
- 0x0971, 0x0980,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09bd,
- 0x09ce, 0x09ce,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e1,
- 0x09f0, 0x09f1,
- 0x09fc, 0x09fc,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a72, 0x0a74,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0abd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae1,
- 0x0af9, 0x0af9,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b3d,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b71, 0x0b71,
- 0x0b83, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bd0, 0x0bd0,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c3d,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c61,
- 0x0c80, 0x0c80,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cbd,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0cf1, 0x0cf2,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d3d,
- 0x0d4e, 0x0d4e,
- 0x0d54, 0x0d56,
- 0x0d5f, 0x0d61,
- 0x0d7a, 0x0d7f,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0e01, 0x0e30,
- 0x0e32, 0x0e32,
- 0x0e40, 0x0e46,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb0,
- 0x0eb2, 0x0eb2,
- 0x0ebd, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f40, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f88, 0x0f8c,
- 0x1000, 0x102a,
- 0x103f, 0x103f,
- 0x1050, 0x1055,
- 0x105a, 0x105d,
- 0x1061, 0x1061,
- 0x1065, 0x1066,
- 0x106e, 0x1070,
- 0x1075, 0x1081,
- 0x108e, 0x108e,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1711,
- 0x1720, 0x1731,
- 0x1740, 0x1751,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1780, 0x17b3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dc,
- 0x1820, 0x1878,
- 0x1880, 0x18a8,
- 0x18aa, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x1a00, 0x1a16,
- 0x1a20, 0x1a54,
- 0x1aa7, 0x1aa7,
- 0x1b05, 0x1b33,
- 0x1b45, 0x1b4b,
- 0x1b83, 0x1ba0,
- 0x1bae, 0x1baf,
- 0x1bba, 0x1be5,
- 0x1c00, 0x1c23,
- 0x1c4d, 0x1c4f,
- 0x1c5a, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf6,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2118, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x3005, 0x3007,
- 0x3021, 0x3029,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa61f,
- 0xa62a, 0xa62b,
- 0xa640, 0xa66e,
- 0xa67f, 0xa69d,
- 0xa6a0, 0xa6ef,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa801,
- 0xa803, 0xa805,
- 0xa807, 0xa80a,
- 0xa80c, 0xa822,
- 0xa840, 0xa873,
- 0xa882, 0xa8b3,
- 0xa8f2, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa8fe,
- 0xa90a, 0xa925,
- 0xa930, 0xa946,
- 0xa960, 0xa97c,
- 0xa984, 0xa9b2,
- 0xa9cf, 0xa9cf,
- 0xa9e0, 0xa9e4,
- 0xa9e6, 0xa9ef,
- 0xa9fa, 0xa9fe,
- 0xaa00, 0xaa28,
- 0xaa40, 0xaa42,
- 0xaa44, 0xaa4b,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaa7a,
- 0xaa7e, 0xaaaf,
- 0xaab1, 0xaab1,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaabd,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaea,
- 0xaaf2, 0xaaf4,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabe2,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb1d,
- 0xfb1f, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfc5d,
- 0xfc64, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdf9,
- 0xfe71, 0xfe71,
- 0xfe73, 0xfe73,
- 0xfe77, 0xfe77,
- 0xfe79, 0xfe79,
- 0xfe7b, 0xfe7b,
- 0xfe7d, 0xfe7d,
- 0xfe7f, 0xfefc,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
- 0xff66, 0xff9d,
- 0xffa0, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x10375,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a00,
- 0x10a10, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae4,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d23,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10fe0, 0x10ff6,
- 0x11003, 0x11037,
- 0x11083, 0x110af,
- 0x110d0, 0x110e8,
- 0x11103, 0x11126,
- 0x11144, 0x11144,
- 0x11150, 0x11172,
- 0x11176, 0x11176,
- 0x11183, 0x111b2,
- 0x111c1, 0x111c4,
- 0x111da, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x1122b,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112de,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x1133d,
- 0x11350, 0x11350,
- 0x1135d, 0x11361,
- 0x11400, 0x11434,
- 0x11447, 0x1144a,
- 0x1145f, 0x1145f,
- 0x11480, 0x114af,
- 0x114c4, 0x114c5,
- 0x114c7, 0x114c7,
- 0x11580, 0x115ae,
- 0x115d8, 0x115db,
- 0x11600, 0x1162f,
- 0x11644, 0x11644,
- 0x11680, 0x116aa,
- 0x116b8, 0x116b8,
- 0x11700, 0x1171a,
- 0x11800, 0x1182b,
- 0x118a0, 0x118df,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d0,
- 0x119e1, 0x119e1,
- 0x119e3, 0x119e3,
- 0x11a00, 0x11a00,
- 0x11a0b, 0x11a32,
- 0x11a3a, 0x11a3a,
- 0x11a50, 0x11a50,
- 0x11a5c, 0x11a89,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c2e,
- 0x11c40, 0x11c40,
- 0x11c72, 0x11c8f,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d30,
- 0x11d46, 0x11d46,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d89,
- 0x11d98, 0x11d98,
- 0x11ee0, 0x11ef2,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16ad0, 0x16aed,
- 0x16b00, 0x16b2f,
- 0x16b40, 0x16b43,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f50, 0x16f50,
- 0x16f93, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2eb,
- 0x1e800, 0x1e8c4,
- 0x1e900, 0x1e943,
- 0x1e94b, 0x1e94b,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_XID_Start */
-
-/* 'XID_Continue': Derived Property */
-static const OnigCodePoint CR_XID_Continue[] = {
- 720,
- 0x0030, 0x0039,
- 0x0041, 0x005a,
- 0x005f, 0x005f,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00b5, 0x00b5,
- 0x00b7, 0x00b7,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02c1,
- 0x02c6, 0x02d1,
- 0x02e0, 0x02e4,
- 0x02ec, 0x02ec,
- 0x02ee, 0x02ee,
- 0x0300, 0x0374,
- 0x0376, 0x0377,
- 0x037b, 0x037d,
- 0x037f, 0x037f,
- 0x0386, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03f5,
- 0x03f7, 0x0481,
- 0x0483, 0x0487,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x0559,
- 0x0560, 0x0588,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f2,
- 0x0610, 0x061a,
- 0x0620, 0x0669,
- 0x066e, 0x06d3,
- 0x06d5, 0x06dc,
- 0x06df, 0x06e8,
- 0x06ea, 0x06fc,
- 0x06ff, 0x06ff,
- 0x0710, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07f5,
- 0x07fa, 0x07fa,
- 0x07fd, 0x07fd,
- 0x0800, 0x082d,
- 0x0840, 0x085b,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0963,
- 0x0966, 0x096f,
- 0x0971, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09f1,
- 0x09fc, 0x09fc,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b6f,
- 0x0b71, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bef,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c80, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d54, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d66, 0x0d6f,
- 0x0d7a, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df3,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e4e,
- 0x0e50, 0x0e59,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f00,
- 0x0f18, 0x0f19,
- 0x0f20, 0x0f29,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f84,
- 0x0f86, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x1000, 0x1049,
- 0x1050, 0x109d,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x135f,
- 0x1369, 0x1371,
- 0x1380, 0x138f,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1401, 0x166c,
- 0x166f, 0x167f,
- 0x1681, 0x169a,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1734,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17d3,
- 0x17d7, 0x17d7,
- 0x17dc, 0x17dd,
- 0x17e0, 0x17e9,
- 0x180b, 0x180d,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1946, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x1a00, 0x1a1b,
- 0x1a20, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa7, 0x1aa7,
- 0x1ab0, 0x1abd,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b59,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1bf3,
- 0x1c00, 0x1c37,
- 0x1c40, 0x1c49,
- 0x1c4d, 0x1c7d,
- 0x1c80, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fbc,
- 0x1fbe, 0x1fbe,
- 0x1fc2, 0x1fc4,
- 0x1fc6, 0x1fcc,
- 0x1fd0, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fe0, 0x1fec,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffc,
- 0x203f, 0x2040,
- 0x2054, 0x2054,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x20d0, 0x20dc,
- 0x20e1, 0x20e1,
- 0x20e5, 0x20f0,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2118, 0x211d,
- 0x2124, 0x2124,
- 0x2126, 0x2126,
- 0x2128, 0x2128,
- 0x212a, 0x2139,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2ce4,
- 0x2ceb, 0x2cf3,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d6f,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2dff,
- 0x3005, 0x3007,
- 0x3021, 0x302f,
- 0x3031, 0x3035,
- 0x3038, 0x303c,
- 0x3041, 0x3096,
- 0x3099, 0x309a,
- 0x309d, 0x309f,
- 0x30a1, 0x30fa,
- 0x30fc, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x31a0, 0x31ba,
- 0x31f0, 0x31ff,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xa000, 0xa48c,
- 0xa4d0, 0xa4fd,
- 0xa500, 0xa60c,
- 0xa610, 0xa62b,
- 0xa640, 0xa66f,
- 0xa674, 0xa67d,
- 0xa67f, 0xa6f1,
- 0xa717, 0xa71f,
- 0xa722, 0xa788,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa827,
- 0xa840, 0xa873,
- 0xa880, 0xa8c5,
- 0xa8d0, 0xa8d9,
- 0xa8e0, 0xa8f7,
- 0xa8fb, 0xa8fb,
- 0xa8fd, 0xa92d,
- 0xa930, 0xa953,
- 0xa960, 0xa97c,
- 0xa980, 0xa9c0,
- 0xa9cf, 0xa9d9,
- 0xa9e0, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa60, 0xaa76,
- 0xaa7a, 0xaac2,
- 0xaadb, 0xaadd,
- 0xaae0, 0xaaef,
- 0xaaf2, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5a,
- 0xab5c, 0xab67,
- 0xab70, 0xabea,
- 0xabec, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb28,
- 0xfb2a, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfc5d,
- 0xfc64, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdf9,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0xfe33, 0xfe34,
- 0xfe4d, 0xfe4f,
- 0xfe71, 0xfe71,
- 0xfe73, 0xfe73,
- 0xfe77, 0xfe77,
- 0xfe79, 0xfe79,
- 0xfe7b, 0xfe7b,
- 0xfe7d, 0xfe7d,
- 0xfe7f, 0xfefc,
- 0xff10, 0xff19,
- 0xff21, 0xff3a,
- 0xff3f, 0xff3f,
- 0xff41, 0xff5a,
- 0xff66, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10140, 0x10174,
- 0x101fd, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102e0,
- 0x10300, 0x1031f,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103cf,
- 0x103d1, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10860, 0x10876,
- 0x10880, 0x1089e,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x10900, 0x10915,
- 0x10920, 0x10939,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10a60, 0x10a7c,
- 0x10a80, 0x10a9c,
- 0x10ac0, 0x10ac7,
- 0x10ac9, 0x10ae6,
- 0x10b00, 0x10b35,
- 0x10b40, 0x10b55,
- 0x10b60, 0x10b72,
- 0x10b80, 0x10b91,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10d00, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10f00, 0x10f1c,
- 0x10f27, 0x10f27,
- 0x10f30, 0x10f50,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11046,
- 0x11066, 0x1106f,
- 0x1107f, 0x110ba,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x1113f,
- 0x11144, 0x11146,
- 0x11150, 0x11173,
- 0x11176, 0x11176,
- 0x11180, 0x111c4,
- 0x111c9, 0x111cc,
- 0x111d0, 0x111da,
- 0x111dc, 0x111dc,
- 0x11200, 0x11211,
- 0x11213, 0x11237,
- 0x1123e, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a8,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x1144a,
- 0x11450, 0x11459,
- 0x1145e, 0x1145f,
- 0x11480, 0x114c5,
- 0x114c7, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115c0,
- 0x115d8, 0x115dd,
- 0x11600, 0x11640,
- 0x11644, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x11739,
- 0x11800, 0x1183a,
- 0x118a0, 0x118e9,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e1,
- 0x119e3, 0x119e4,
- 0x11a00, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a50, 0x11a99,
- 0x11a9d, 0x11a9d,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c40,
- 0x11c50, 0x11c59,
- 0x11c72, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af4,
- 0x16b00, 0x16b36,
- 0x16b40, 0x16b43,
- 0x16b50, 0x16b59,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e7f,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14e,
- 0x1e2c0, 0x1e2f9,
- 0x1e800, 0x1e8c4,
- 0x1e8d0, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0xe0100, 0xe01ef,
-}; /* CR_XID_Continue */
-
-/* 'Default_Ignorable_Code_Point': Derived Property */
-static const OnigCodePoint CR_Default_Ignorable_Code_Point[] = {
- 17,
- 0x00ad, 0x00ad,
- 0x034f, 0x034f,
- 0x061c, 0x061c,
- 0x115f, 0x1160,
- 0x17b4, 0x17b5,
- 0x180b, 0x180e,
- 0x200b, 0x200f,
- 0x202a, 0x202e,
- 0x2060, 0x206f,
- 0x3164, 0x3164,
- 0xfe00, 0xfe0f,
- 0xfeff, 0xfeff,
- 0xffa0, 0xffa0,
- 0xfff0, 0xfff8,
- 0x1bca0, 0x1bca3,
- 0x1d173, 0x1d17a,
- 0xe0000, 0xe0fff,
-}; /* CR_Default_Ignorable_Code_Point */
-
-/* 'Grapheme_Extend': Derived Property */
-static const OnigCodePoint CR_Grapheme_Extend[] = {
- 335,
- 0x0300, 0x036f,
- 0x0483, 0x0489,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x0610, 0x061a,
- 0x064b, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dc,
- 0x06df, 0x06e4,
- 0x06e7, 0x06e8,
- 0x06ea, 0x06ed,
- 0x0711, 0x0711,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f3,
- 0x07fd, 0x07fd,
- 0x0816, 0x0819,
- 0x081b, 0x0823,
- 0x0825, 0x0827,
- 0x0829, 0x082d,
- 0x0859, 0x085b,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0902,
- 0x093a, 0x093a,
- 0x093c, 0x093c,
- 0x0941, 0x0948,
- 0x094d, 0x094d,
- 0x0951, 0x0957,
- 0x0962, 0x0963,
- 0x0981, 0x0981,
- 0x09bc, 0x09bc,
- 0x09be, 0x09be,
- 0x09c1, 0x09c4,
- 0x09cd, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09e2, 0x09e3,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a02,
- 0x0a3c, 0x0a3c,
- 0x0a41, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a82,
- 0x0abc, 0x0abc,
- 0x0ac1, 0x0ac5,
- 0x0ac7, 0x0ac8,
- 0x0acd, 0x0acd,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0aff,
- 0x0b01, 0x0b01,
- 0x0b3c, 0x0b3c,
- 0x0b3e, 0x0b3f,
- 0x0b41, 0x0b44,
- 0x0b4d, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bbe, 0x0bbe,
- 0x0bc0, 0x0bc0,
- 0x0bcd, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0c00, 0x0c00,
- 0x0c04, 0x0c04,
- 0x0c3e, 0x0c40,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c81,
- 0x0cbc, 0x0cbc,
- 0x0cbf, 0x0cbf,
- 0x0cc2, 0x0cc2,
- 0x0cc6, 0x0cc6,
- 0x0ccc, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d01,
- 0x0d3b, 0x0d3c,
- 0x0d3e, 0x0d3e,
- 0x0d41, 0x0d44,
- 0x0d4d, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d62, 0x0d63,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dcf,
- 0x0dd2, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0ddf, 0x0ddf,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e47, 0x0e4e,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0ebc,
- 0x0ec8, 0x0ecd,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f71, 0x0f7e,
- 0x0f80, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x102d, 0x1030,
- 0x1032, 0x1037,
- 0x1039, 0x103a,
- 0x103d, 0x103e,
- 0x1058, 0x1059,
- 0x105e, 0x1060,
- 0x1071, 0x1074,
- 0x1082, 0x1082,
- 0x1085, 0x1086,
- 0x108d, 0x108d,
- 0x109d, 0x109d,
- 0x135d, 0x135f,
- 0x1712, 0x1714,
- 0x1732, 0x1734,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b4, 0x17b5,
- 0x17b7, 0x17bd,
- 0x17c6, 0x17c6,
- 0x17c9, 0x17d3,
- 0x17dd, 0x17dd,
- 0x180b, 0x180d,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x1922,
- 0x1927, 0x1928,
- 0x1932, 0x1932,
- 0x1939, 0x193b,
- 0x1a17, 0x1a18,
- 0x1a1b, 0x1a1b,
- 0x1a56, 0x1a56,
- 0x1a58, 0x1a5e,
- 0x1a60, 0x1a60,
- 0x1a62, 0x1a62,
- 0x1a65, 0x1a6c,
- 0x1a73, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b03,
- 0x1b34, 0x1b3a,
- 0x1b3c, 0x1b3c,
- 0x1b42, 0x1b42,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1b81,
- 0x1ba2, 0x1ba5,
- 0x1ba8, 0x1ba9,
- 0x1bab, 0x1bad,
- 0x1be6, 0x1be6,
- 0x1be8, 0x1be9,
- 0x1bed, 0x1bed,
- 0x1bef, 0x1bf1,
- 0x1c2c, 0x1c33,
- 0x1c36, 0x1c37,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce0,
- 0x1ce2, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf8, 0x1cf9,
- 0x1dc0, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x200c, 0x200c,
- 0x20d0, 0x20f0,
- 0x2cef, 0x2cf1,
- 0x2d7f, 0x2d7f,
- 0x2de0, 0x2dff,
- 0x302a, 0x302f,
- 0x3099, 0x309a,
- 0xa66f, 0xa672,
- 0xa674, 0xa67d,
- 0xa69e, 0xa69f,
- 0xa6f0, 0xa6f1,
- 0xa802, 0xa802,
- 0xa806, 0xa806,
- 0xa80b, 0xa80b,
- 0xa825, 0xa826,
- 0xa8c4, 0xa8c5,
- 0xa8e0, 0xa8f1,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92d,
- 0xa947, 0xa951,
- 0xa980, 0xa982,
- 0xa9b3, 0xa9b3,
- 0xa9b6, 0xa9b9,
- 0xa9bc, 0xa9bd,
- 0xa9e5, 0xa9e5,
- 0xaa29, 0xaa2e,
- 0xaa31, 0xaa32,
- 0xaa35, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4c,
- 0xaa7c, 0xaa7c,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabf,
- 0xaac1, 0xaac1,
- 0xaaec, 0xaaed,
- 0xaaf6, 0xaaf6,
- 0xabe5, 0xabe5,
- 0xabe8, 0xabe8,
- 0xabed, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0xff9e, 0xff9f,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10ae5, 0x10ae6,
- 0x10d24, 0x10d27,
- 0x10f46, 0x10f50,
- 0x11001, 0x11001,
- 0x11038, 0x11046,
- 0x1107f, 0x11081,
- 0x110b3, 0x110b6,
- 0x110b9, 0x110ba,
- 0x11100, 0x11102,
- 0x11127, 0x1112b,
- 0x1112d, 0x11134,
- 0x11173, 0x11173,
- 0x11180, 0x11181,
- 0x111b6, 0x111be,
- 0x111c9, 0x111cc,
- 0x1122f, 0x11231,
- 0x11234, 0x11234,
- 0x11236, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112df,
- 0x112e3, 0x112ea,
- 0x11300, 0x11301,
- 0x1133b, 0x1133c,
- 0x1133e, 0x1133e,
- 0x11340, 0x11340,
- 0x11357, 0x11357,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11438, 0x1143f,
- 0x11442, 0x11444,
- 0x11446, 0x11446,
- 0x1145e, 0x1145e,
- 0x114b0, 0x114b0,
- 0x114b3, 0x114b8,
- 0x114ba, 0x114ba,
- 0x114bd, 0x114bd,
- 0x114bf, 0x114c0,
- 0x114c2, 0x114c3,
- 0x115af, 0x115af,
- 0x115b2, 0x115b5,
- 0x115bc, 0x115bd,
- 0x115bf, 0x115c0,
- 0x115dc, 0x115dd,
- 0x11633, 0x1163a,
- 0x1163d, 0x1163d,
- 0x1163f, 0x11640,
- 0x116ab, 0x116ab,
- 0x116ad, 0x116ad,
- 0x116b0, 0x116b5,
- 0x116b7, 0x116b7,
- 0x1171d, 0x1171f,
- 0x11722, 0x11725,
- 0x11727, 0x1172b,
- 0x1182f, 0x11837,
- 0x11839, 0x1183a,
- 0x119d4, 0x119d7,
- 0x119da, 0x119db,
- 0x119e0, 0x119e0,
- 0x11a01, 0x11a0a,
- 0x11a33, 0x11a38,
- 0x11a3b, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a51, 0x11a56,
- 0x11a59, 0x11a5b,
- 0x11a8a, 0x11a96,
- 0x11a98, 0x11a99,
- 0x11c30, 0x11c36,
- 0x11c38, 0x11c3d,
- 0x11c3f, 0x11c3f,
- 0x11c92, 0x11ca7,
- 0x11caa, 0x11cb0,
- 0x11cb2, 0x11cb3,
- 0x11cb5, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d45,
- 0x11d47, 0x11d47,
- 0x11d90, 0x11d91,
- 0x11d95, 0x11d95,
- 0x11d97, 0x11d97,
- 0x11ef3, 0x11ef4,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16f4f, 0x16f4f,
- 0x16f8f, 0x16f92,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d165,
- 0x1d167, 0x1d169,
- 0x1d16e, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e130, 0x1e136,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e94a,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
-}; /* CR_Grapheme_Extend */
-
-/* 'Grapheme_Base': Derived Property */
-static const OnigCodePoint CR_Grapheme_Base[] = {
- 819,
- 0x0020, 0x007e,
- 0x00a0, 0x00ac,
- 0x00ae, 0x02ff,
- 0x0370, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0482,
- 0x048a, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x05be, 0x05be,
- 0x05c0, 0x05c0,
- 0x05c3, 0x05c3,
- 0x05c6, 0x05c6,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0606, 0x060f,
- 0x061b, 0x061b,
- 0x061e, 0x064a,
- 0x0660, 0x066f,
- 0x0671, 0x06d5,
- 0x06de, 0x06de,
- 0x06e5, 0x06e6,
- 0x06e9, 0x06e9,
- 0x06ee, 0x070d,
- 0x0710, 0x0710,
- 0x0712, 0x072f,
- 0x074d, 0x07a5,
- 0x07b1, 0x07b1,
- 0x07c0, 0x07ea,
- 0x07f4, 0x07fa,
- 0x07fe, 0x0815,
- 0x081a, 0x081a,
- 0x0824, 0x0824,
- 0x0828, 0x0828,
- 0x0830, 0x083e,
- 0x0840, 0x0858,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x0903, 0x0939,
- 0x093b, 0x093b,
- 0x093d, 0x0940,
- 0x0949, 0x094c,
- 0x094e, 0x0950,
- 0x0958, 0x0961,
- 0x0964, 0x0980,
- 0x0982, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bd, 0x09bd,
- 0x09bf, 0x09c0,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x09ce, 0x09ce,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e1,
- 0x09e6, 0x09fd,
- 0x0a03, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3e, 0x0a40,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a6f,
- 0x0a72, 0x0a74,
- 0x0a76, 0x0a76,
- 0x0a83, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abd, 0x0ac0,
- 0x0ac9, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae1,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0af9,
- 0x0b02, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3d, 0x0b3d,
- 0x0b40, 0x0b40,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b77,
- 0x0b83, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbf, 0x0bbf,
- 0x0bc1, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0bd0, 0x0bd0,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c3d,
- 0x0c41, 0x0c44,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c80,
- 0x0c82, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbd, 0x0cbe,
- 0x0cc0, 0x0cc1,
- 0x0cc3, 0x0cc4,
- 0x0cc7, 0x0cc8,
- 0x0cca, 0x0ccb,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d3d,
- 0x0d3f, 0x0d40,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d4e, 0x0d4f,
- 0x0d54, 0x0d56,
- 0x0d58, 0x0d61,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dd0, 0x0dd1,
- 0x0dd8, 0x0dde,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e30,
- 0x0e32, 0x0e33,
- 0x0e3f, 0x0e46,
- 0x0e4f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0eb0,
- 0x0eb2, 0x0eb3,
- 0x0ebd, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f17,
- 0x0f1a, 0x0f34,
- 0x0f36, 0x0f36,
- 0x0f38, 0x0f38,
- 0x0f3a, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f7f, 0x0f7f,
- 0x0f85, 0x0f85,
- 0x0f88, 0x0f8c,
- 0x0fbe, 0x0fc5,
- 0x0fc7, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x102c,
- 0x1031, 0x1031,
- 0x1038, 0x1038,
- 0x103b, 0x103c,
- 0x103f, 0x1057,
- 0x105a, 0x105d,
- 0x1061, 0x1070,
- 0x1075, 0x1081,
- 0x1083, 0x1084,
- 0x1087, 0x108c,
- 0x108e, 0x109c,
- 0x109e, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x1360, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1711,
- 0x1720, 0x1731,
- 0x1735, 0x1736,
- 0x1740, 0x1751,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1780, 0x17b3,
- 0x17b6, 0x17b6,
- 0x17be, 0x17c5,
- 0x17c7, 0x17c8,
- 0x17d4, 0x17dc,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180a,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x1884,
- 0x1887, 0x18a8,
- 0x18aa, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1923, 0x1926,
- 0x1929, 0x192b,
- 0x1930, 0x1931,
- 0x1933, 0x1938,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a16,
- 0x1a19, 0x1a1a,
- 0x1a1e, 0x1a55,
- 0x1a57, 0x1a57,
- 0x1a61, 0x1a61,
- 0x1a63, 0x1a64,
- 0x1a6d, 0x1a72,
- 0x1a80, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b04, 0x1b33,
- 0x1b3b, 0x1b3b,
- 0x1b3d, 0x1b41,
- 0x1b43, 0x1b4b,
- 0x1b50, 0x1b6a,
- 0x1b74, 0x1b7c,
- 0x1b82, 0x1ba1,
- 0x1ba6, 0x1ba7,
- 0x1baa, 0x1baa,
- 0x1bae, 0x1be5,
- 0x1be7, 0x1be7,
- 0x1bea, 0x1bec,
- 0x1bee, 0x1bee,
- 0x1bf2, 0x1bf3,
- 0x1bfc, 0x1c2b,
- 0x1c34, 0x1c35,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd3, 0x1cd3,
- 0x1ce1, 0x1ce1,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf7,
- 0x1cfa, 0x1cfa,
- 0x1d00, 0x1dbf,
- 0x1e00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x200a,
- 0x2010, 0x2027,
- 0x202f, 0x205f,
- 0x2070, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cee,
- 0x2cf2, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2e00, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x3029,
- 0x3030, 0x303f,
- 0x3041, 0x3096,
- 0x309b, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa66e,
- 0xa673, 0xa673,
- 0xa67e, 0xa69d,
- 0xa6a0, 0xa6ef,
- 0xa6f2, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa801,
- 0xa803, 0xa805,
- 0xa807, 0xa80a,
- 0xa80c, 0xa824,
- 0xa827, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c3,
- 0xa8ce, 0xa8d9,
- 0xa8f2, 0xa8fe,
- 0xa900, 0xa925,
- 0xa92e, 0xa946,
- 0xa952, 0xa953,
- 0xa95f, 0xa97c,
- 0xa983, 0xa9b2,
- 0xa9b4, 0xa9b5,
- 0xa9ba, 0xa9bb,
- 0xa9be, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9e4,
- 0xa9e6, 0xa9fe,
- 0xaa00, 0xaa28,
- 0xaa2f, 0xaa30,
- 0xaa33, 0xaa34,
- 0xaa40, 0xaa42,
- 0xaa44, 0xaa4b,
- 0xaa4d, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa7d, 0xaaaf,
- 0xaab1, 0xaab1,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaabd,
- 0xaac0, 0xaac0,
- 0xaac2, 0xaac2,
- 0xaadb, 0xaaeb,
- 0xaaee, 0xaaf5,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabe4,
- 0xabe6, 0xabe7,
- 0xabe9, 0xabec,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb1d,
- 0xfb1f, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe10, 0xfe19,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xff01, 0xff9d,
- 0xffa0, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfffc, 0xfffd,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fc,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e1, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x10375,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a00,
- 0x10a10, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a40, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae4,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d23,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f45,
- 0x10f51, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x11000,
- 0x11002, 0x11037,
- 0x11047, 0x1104d,
- 0x11052, 0x1106f,
- 0x11082, 0x110b2,
- 0x110b7, 0x110b8,
- 0x110bb, 0x110bc,
- 0x110be, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11103, 0x11126,
- 0x1112c, 0x1112c,
- 0x11136, 0x11146,
- 0x11150, 0x11172,
- 0x11174, 0x11176,
- 0x11182, 0x111b5,
- 0x111bf, 0x111c8,
- 0x111cd, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1122e,
- 0x11232, 0x11233,
- 0x11235, 0x11235,
- 0x11238, 0x1123d,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112de,
- 0x112e0, 0x112e2,
- 0x112f0, 0x112f9,
- 0x11302, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133d, 0x1133d,
- 0x1133f, 0x1133f,
- 0x11341, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x1135d, 0x11363,
- 0x11400, 0x11437,
- 0x11440, 0x11441,
- 0x11445, 0x11445,
- 0x11447, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x1145f, 0x1145f,
- 0x11480, 0x114af,
- 0x114b1, 0x114b2,
- 0x114b9, 0x114b9,
- 0x114bb, 0x114bc,
- 0x114be, 0x114be,
- 0x114c1, 0x114c1,
- 0x114c4, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115ae,
- 0x115b0, 0x115b1,
- 0x115b8, 0x115bb,
- 0x115be, 0x115be,
- 0x115c1, 0x115db,
- 0x11600, 0x11632,
- 0x1163b, 0x1163c,
- 0x1163e, 0x1163e,
- 0x11641, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116aa,
- 0x116ac, 0x116ac,
- 0x116ae, 0x116af,
- 0x116b6, 0x116b6,
- 0x116b8, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x11720, 0x11721,
- 0x11726, 0x11726,
- 0x11730, 0x1173f,
- 0x11800, 0x1182e,
- 0x11838, 0x11838,
- 0x1183b, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d3,
- 0x119dc, 0x119df,
- 0x119e1, 0x119e4,
- 0x11a00, 0x11a00,
- 0x11a0b, 0x11a32,
- 0x11a39, 0x11a3a,
- 0x11a3f, 0x11a46,
- 0x11a50, 0x11a50,
- 0x11a57, 0x11a58,
- 0x11a5c, 0x11a89,
- 0x11a97, 0x11a97,
- 0x11a9a, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c2f,
- 0x11c3e, 0x11c3e,
- 0x11c40, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11ca9, 0x11ca9,
- 0x11cb1, 0x11cb1,
- 0x11cb4, 0x11cb4,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d30,
- 0x11d46, 0x11d46,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d93, 0x11d94,
- 0x11d96, 0x11d96,
- 0x11d98, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef2,
- 0x11ef5, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af5, 0x16af5,
- 0x16b00, 0x16b2f,
- 0x16b37, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f50, 0x16f87,
- 0x16f93, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bc9c,
- 0x1bc9f, 0x1bc9f,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d164,
- 0x1d166, 0x1d166,
- 0x1d16a, 0x1d16d,
- 0x1d183, 0x1d184,
- 0x1d18c, 0x1d1a9,
- 0x1d1ae, 0x1d1e8,
- 0x1d200, 0x1d241,
- 0x1d245, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d9ff,
- 0x1da37, 0x1da3a,
- 0x1da6d, 0x1da74,
- 0x1da76, 0x1da83,
- 0x1da85, 0x1da8b,
- 0x1e100, 0x1e12c,
- 0x1e137, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2eb,
- 0x1e2f0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8cf,
- 0x1e900, 0x1e943,
- 0x1e94b, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Grapheme_Base */
-
-/* 'Grapheme_Link': Derived Property */
-static const OnigCodePoint CR_Grapheme_Link[] = {
- 52,
- 0x094d, 0x094d,
- 0x09cd, 0x09cd,
- 0x0a4d, 0x0a4d,
- 0x0acd, 0x0acd,
- 0x0b4d, 0x0b4d,
- 0x0bcd, 0x0bcd,
- 0x0c4d, 0x0c4d,
- 0x0ccd, 0x0ccd,
- 0x0d3b, 0x0d3c,
- 0x0d4d, 0x0d4d,
- 0x0dca, 0x0dca,
- 0x0e3a, 0x0e3a,
- 0x0eba, 0x0eba,
- 0x0f84, 0x0f84,
- 0x1039, 0x103a,
- 0x1714, 0x1714,
- 0x1734, 0x1734,
- 0x17d2, 0x17d2,
- 0x1a60, 0x1a60,
- 0x1b44, 0x1b44,
- 0x1baa, 0x1bab,
- 0x1bf2, 0x1bf3,
- 0x2d7f, 0x2d7f,
- 0xa806, 0xa806,
- 0xa8c4, 0xa8c4,
- 0xa953, 0xa953,
- 0xa9c0, 0xa9c0,
- 0xaaf6, 0xaaf6,
- 0xabed, 0xabed,
- 0x10a3f, 0x10a3f,
- 0x11046, 0x11046,
- 0x1107f, 0x1107f,
- 0x110b9, 0x110b9,
- 0x11133, 0x11134,
- 0x111c0, 0x111c0,
- 0x11235, 0x11235,
- 0x112ea, 0x112ea,
- 0x1134d, 0x1134d,
- 0x11442, 0x11442,
- 0x114c2, 0x114c2,
- 0x115bf, 0x115bf,
- 0x1163f, 0x1163f,
- 0x116b6, 0x116b6,
- 0x1172b, 0x1172b,
- 0x11839, 0x11839,
- 0x119e0, 0x119e0,
- 0x11a34, 0x11a34,
- 0x11a47, 0x11a47,
- 0x11a99, 0x11a99,
- 0x11c3f, 0x11c3f,
- 0x11d44, 0x11d45,
- 0x11d97, 0x11d97,
-}; /* CR_Grapheme_Link */
-
-/* 'Common': Script */
-static const OnigCodePoint CR_Common[] = {
- 172,
- 0x0000, 0x0040,
- 0x005b, 0x0060,
- 0x007b, 0x00a9,
- 0x00ab, 0x00b9,
- 0x00bb, 0x00bf,
- 0x00d7, 0x00d7,
- 0x00f7, 0x00f7,
- 0x02b9, 0x02df,
- 0x02e5, 0x02e9,
- 0x02ec, 0x02ff,
- 0x0374, 0x0374,
- 0x037e, 0x037e,
- 0x0385, 0x0385,
- 0x0387, 0x0387,
- 0x0589, 0x0589,
- 0x0605, 0x0605,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0640, 0x0640,
- 0x06dd, 0x06dd,
- 0x08e2, 0x08e2,
- 0x0964, 0x0965,
- 0x0e3f, 0x0e3f,
- 0x0fd5, 0x0fd8,
- 0x10fb, 0x10fb,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x1802, 0x1803,
- 0x1805, 0x1805,
- 0x1cd3, 0x1cd3,
- 0x1ce1, 0x1ce1,
- 0x1ce9, 0x1cec,
- 0x1cee, 0x1cf3,
- 0x1cf5, 0x1cf7,
- 0x1cfa, 0x1cfa,
- 0x2000, 0x200b,
- 0x200e, 0x2064,
- 0x2066, 0x2070,
- 0x2074, 0x207e,
- 0x2080, 0x208e,
- 0x20a0, 0x20bf,
- 0x2100, 0x2125,
- 0x2127, 0x2129,
- 0x212c, 0x2131,
- 0x2133, 0x214d,
- 0x214f, 0x215f,
- 0x2189, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x27ff,
- 0x2900, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bff,
- 0x2e00, 0x2e4f,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x3004,
- 0x3006, 0x3006,
- 0x3008, 0x3020,
- 0x3030, 0x3037,
- 0x303c, 0x303f,
- 0x309b, 0x309c,
- 0x30a0, 0x30a0,
- 0x30fb, 0x30fc,
- 0x3190, 0x319f,
- 0x31c0, 0x31e3,
- 0x3220, 0x325f,
- 0x327f, 0x32cf,
- 0x32ff, 0x32ff,
- 0x3358, 0x33ff,
- 0x4dc0, 0x4dff,
- 0xa700, 0xa721,
- 0xa788, 0xa78a,
- 0xa830, 0xa839,
- 0xa92e, 0xa92e,
- 0xa9cf, 0xa9cf,
- 0xab5b, 0xab5b,
- 0xfd3e, 0xfd3f,
- 0xfe10, 0xfe19,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfeff, 0xfeff,
- 0xff01, 0xff20,
- 0xff3b, 0xff40,
- 0xff5b, 0xff65,
- 0xff70, 0xff70,
- 0xff9e, 0xff9f,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xfffd,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1013f,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fc,
- 0x102e1, 0x102fb,
- 0x16fe2, 0x16fe3,
- 0x1bca0, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d166,
- 0x1d16a, 0x1d17a,
- 0x1d183, 0x1d184,
- 0x1d18c, 0x1d1a9,
- 0x1d1ae, 0x1d1e8,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f1ff,
- 0x1f201, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
-}; /* CR_Common */
-
-/* 'Latin': Script */
-static const OnigCodePoint CR_Latin[] = {
- 32,
- 0x0041, 0x005a,
- 0x0061, 0x007a,
- 0x00aa, 0x00aa,
- 0x00ba, 0x00ba,
- 0x00c0, 0x00d6,
- 0x00d8, 0x00f6,
- 0x00f8, 0x02b8,
- 0x02e0, 0x02e4,
- 0x1d00, 0x1d25,
- 0x1d2c, 0x1d5c,
- 0x1d62, 0x1d65,
- 0x1d6b, 0x1d77,
- 0x1d79, 0x1dbe,
- 0x1e00, 0x1eff,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x212a, 0x212b,
- 0x2132, 0x2132,
- 0x214e, 0x214e,
- 0x2160, 0x2188,
- 0x2c60, 0x2c7f,
- 0xa722, 0xa787,
- 0xa78b, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa7ff,
- 0xab30, 0xab5a,
- 0xab5c, 0xab64,
- 0xab66, 0xab67,
- 0xfb00, 0xfb06,
- 0xff21, 0xff3a,
- 0xff41, 0xff5a,
-}; /* CR_Latin */
-
-/* 'Greek': Script */
-static const OnigCodePoint CR_Greek[] = {
- 36,
- 0x0370, 0x0373,
- 0x0375, 0x0377,
- 0x037a, 0x037d,
- 0x037f, 0x037f,
- 0x0384, 0x0384,
- 0x0386, 0x0386,
- 0x0388, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03e1,
- 0x03f0, 0x03ff,
- 0x1d26, 0x1d2a,
- 0x1d5d, 0x1d61,
- 0x1d66, 0x1d6a,
- 0x1dbf, 0x1dbf,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2126, 0x2126,
- 0xab65, 0xab65,
- 0x10140, 0x1018e,
- 0x101a0, 0x101a0,
- 0x1d200, 0x1d245,
-}; /* CR_Greek */
-
-/* 'Cyrillic': Script */
-static const OnigCodePoint CR_Cyrillic[] = {
- 8,
- 0x0400, 0x0484,
- 0x0487, 0x052f,
- 0x1c80, 0x1c88,
- 0x1d2b, 0x1d2b,
- 0x1d78, 0x1d78,
- 0x2de0, 0x2dff,
- 0xa640, 0xa69f,
- 0xfe2e, 0xfe2f,
-}; /* CR_Cyrillic */
-
-/* 'Armenian': Script */
-static const OnigCodePoint CR_Armenian[] = {
- 5,
- 0x0531, 0x0556,
- 0x0559, 0x0588,
- 0x058a, 0x058a,
- 0x058d, 0x058f,
- 0xfb13, 0xfb17,
-}; /* CR_Armenian */
-
-/* 'Hebrew': Script */
-static const OnigCodePoint CR_Hebrew[] = {
- 9,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfb4f,
-}; /* CR_Hebrew */
-
-/* 'Arabic': Script */
-static const OnigCodePoint CR_Arabic[] = {
- 57,
- 0x0600, 0x0604,
- 0x0606, 0x060b,
- 0x060d, 0x061a,
- 0x061c, 0x061c,
- 0x061e, 0x061e,
- 0x0620, 0x063f,
- 0x0641, 0x064a,
- 0x0656, 0x066f,
- 0x0671, 0x06dc,
- 0x06de, 0x06ff,
- 0x0750, 0x077f,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x08e1,
- 0x08e3, 0x08ff,
- 0xfb50, 0xfbc1,
- 0xfbd3, 0xfd3d,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfd,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0x10e60, 0x10e7e,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
-}; /* CR_Arabic */
-
-/* 'Syriac': Script */
-static const OnigCodePoint CR_Syriac[] = {
- 4,
- 0x0700, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x074f,
- 0x0860, 0x086a,
-}; /* CR_Syriac */
-
-/* 'Thaana': Script */
-static const OnigCodePoint CR_Thaana[] = {
- 1,
- 0x0780, 0x07b1,
-}; /* CR_Thaana */
-
-/* 'Devanagari': Script */
-static const OnigCodePoint CR_Devanagari[] = {
- 4,
- 0x0900, 0x0950,
- 0x0955, 0x0963,
- 0x0966, 0x097f,
- 0xa8e0, 0xa8ff,
-}; /* CR_Devanagari */
-
-/* 'Bengali': Script */
-static const OnigCodePoint CR_Bengali[] = {
- 14,
- 0x0980, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
-}; /* CR_Bengali */
-
-/* 'Gurmukhi': Script */
-static const OnigCodePoint CR_Gurmukhi[] = {
- 16,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
-}; /* CR_Gurmukhi */
-
-/* 'Gujarati': Script */
-static const OnigCodePoint CR_Gujarati[] = {
- 14,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
-}; /* CR_Gujarati */
-
-/* 'Oriya': Script */
-static const OnigCodePoint CR_Oriya[] = {
- 14,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
-}; /* CR_Oriya */
-
-/* 'Tamil': Script */
-static const OnigCodePoint CR_Tamil[] = {
- 18,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x11fff,
-}; /* CR_Tamil */
-
-/* 'Telugu': Script */
-static const OnigCodePoint CR_Telugu[] = {
- 12,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c7f,
-}; /* CR_Telugu */
-
-/* 'Kannada': Script */
-static const OnigCodePoint CR_Kannada[] = {
- 13,
- 0x0c80, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
-}; /* CR_Kannada */
-
-/* 'Malayalam': Script */
-static const OnigCodePoint CR_Malayalam[] = {
- 8,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
-}; /* CR_Malayalam */
-
-/* 'Sinhala': Script */
-static const OnigCodePoint CR_Sinhala[] = {
- 13,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x111e1, 0x111f4,
-}; /* CR_Sinhala */
-
-/* 'Thai': Script */
-static const OnigCodePoint CR_Thai[] = {
- 2,
- 0x0e01, 0x0e3a,
- 0x0e40, 0x0e5b,
-}; /* CR_Thai */
-
-/* 'Lao': Script */
-static const OnigCodePoint CR_Lao[] = {
- 11,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
-}; /* CR_Lao */
-
-/* 'Tibetan': Script */
-static const OnigCodePoint CR_Tibetan[] = {
- 7,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fd4,
- 0x0fd9, 0x0fda,
-}; /* CR_Tibetan */
-
-/* 'Myanmar': Script */
-static const OnigCodePoint CR_Myanmar[] = {
- 3,
- 0x1000, 0x109f,
- 0xa9e0, 0xa9fe,
- 0xaa60, 0xaa7f,
-}; /* CR_Myanmar */
-
-/* 'Georgian': Script */
-static const OnigCodePoint CR_Georgian[] = {
- 10,
- 0x10a0, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x10fa,
- 0x10fc, 0x10ff,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cbf,
- 0x2d00, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
-}; /* CR_Georgian */
-
-/* 'Hangul': Script */
-static const OnigCodePoint CR_Hangul[] = {
- 14,
- 0x1100, 0x11ff,
- 0x302e, 0x302f,
- 0x3131, 0x318e,
- 0x3200, 0x321e,
- 0x3260, 0x327e,
- 0xa960, 0xa97c,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xffa0, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
-}; /* CR_Hangul */
-
-/* 'Ethiopic': Script */
-static const OnigCodePoint CR_Ethiopic[] = {
- 32,
- 0x1200, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
-}; /* CR_Ethiopic */
-
-/* 'Cherokee': Script */
-static const OnigCodePoint CR_Cherokee[] = {
- 3,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0xab70, 0xabbf,
-}; /* CR_Cherokee */
-
-/* 'Canadian_Aboriginal': Script */
-static const OnigCodePoint CR_Canadian_Aboriginal[] = {
- 2,
- 0x1400, 0x167f,
- 0x18b0, 0x18f5,
-}; /* CR_Canadian_Aboriginal */
-
-/* 'Ogham': Script */
-static const OnigCodePoint CR_Ogham[] = {
- 1,
- 0x1680, 0x169c,
-}; /* CR_Ogham */
-
-/* 'Runic': Script */
-static const OnigCodePoint CR_Runic[] = {
- 2,
- 0x16a0, 0x16ea,
- 0x16ee, 0x16f8,
-}; /* CR_Runic */
-
-/* 'Khmer': Script */
-static const OnigCodePoint CR_Khmer[] = {
- 4,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x19e0, 0x19ff,
-}; /* CR_Khmer */
-
-/* 'Mongolian': Script */
-static const OnigCodePoint CR_Mongolian[] = {
- 7,
- 0x1800, 0x1801,
- 0x1804, 0x1804,
- 0x1806, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x11660, 0x1166c,
-}; /* CR_Mongolian */
-
-/* 'Hiragana': Script */
-static const OnigCodePoint CR_Hiragana[] = {
- 5,
- 0x3041, 0x3096,
- 0x309d, 0x309f,
- 0x1b001, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1f200, 0x1f200,
-}; /* CR_Hiragana */
-
-/* 'Katakana': Script */
-static const OnigCodePoint CR_Katakana[] = {
- 9,
- 0x30a1, 0x30fa,
- 0x30fd, 0x30ff,
- 0x31f0, 0x31ff,
- 0x32d0, 0x32fe,
- 0x3300, 0x3357,
- 0xff66, 0xff6f,
- 0xff71, 0xff9d,
- 0x1b000, 0x1b000,
- 0x1b164, 0x1b167,
-}; /* CR_Katakana */
-
-/* 'Bopomofo': Script */
-static const OnigCodePoint CR_Bopomofo[] = {
- 3,
- 0x02ea, 0x02eb,
- 0x3105, 0x312f,
- 0x31a0, 0x31ba,
-}; /* CR_Bopomofo */
-
-/* 'Han': Script */
-static const OnigCodePoint CR_Han[] = {
- 17,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x3005, 0x3005,
- 0x3007, 0x3007,
- 0x3021, 0x3029,
- 0x3038, 0x303b,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Han */
-
-/* 'Yi': Script */
-static const OnigCodePoint CR_Yi[] = {
- 2,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
-}; /* CR_Yi */
-
-/* 'Old_Italic': Script */
-static const OnigCodePoint CR_Old_Italic[] = {
- 2,
- 0x10300, 0x10323,
- 0x1032d, 0x1032f,
-}; /* CR_Old_Italic */
-
-/* 'Gothic': Script */
-static const OnigCodePoint CR_Gothic[] = {
- 1,
- 0x10330, 0x1034a,
-}; /* CR_Gothic */
-
-/* 'Deseret': Script */
-static const OnigCodePoint CR_Deseret[] = {
- 1,
- 0x10400, 0x1044f,
-}; /* CR_Deseret */
-
-/* 'Inherited': Script */
-static const OnigCodePoint CR_Inherited[] = {
- 28,
- 0x0300, 0x036f,
- 0x0485, 0x0486,
- 0x064b, 0x0655,
- 0x0670, 0x0670,
- 0x0951, 0x0954,
- 0x1ab0, 0x1abe,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce0,
- 0x1ce2, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf8, 0x1cf9,
- 0x1dc0, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x200c, 0x200d,
- 0x20d0, 0x20f0,
- 0x302a, 0x302d,
- 0x3099, 0x309a,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2d,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x1133b, 0x1133b,
- 0x1d167, 0x1d169,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0xe0100, 0xe01ef,
-}; /* CR_Inherited */
-
-/* 'Tagalog': Script */
-static const OnigCodePoint CR_Tagalog[] = {
- 2,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
-}; /* CR_Tagalog */
-
-/* 'Hanunoo': Script */
-static const OnigCodePoint CR_Hanunoo[] = {
- 1,
- 0x1720, 0x1734,
-}; /* CR_Hanunoo */
-
-/* 'Buhid': Script */
-static const OnigCodePoint CR_Buhid[] = {
- 1,
- 0x1740, 0x1753,
-}; /* CR_Buhid */
-
-/* 'Tagbanwa': Script */
-static const OnigCodePoint CR_Tagbanwa[] = {
- 3,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
-}; /* CR_Tagbanwa */
-
-/* 'Limbu': Script */
-static const OnigCodePoint CR_Limbu[] = {
- 5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x194f,
-}; /* CR_Limbu */
-
-/* 'Tai_Le': Script */
-static const OnigCodePoint CR_Tai_Le[] = {
- 2,
- 0x1950, 0x196d,
- 0x1970, 0x1974,
-}; /* CR_Tai_Le */
-
-/* 'Linear_B': Script */
-static const OnigCodePoint CR_Linear_B[] = {
- 7,
- 0x10000, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
-}; /* CR_Linear_B */
-
-/* 'Ugaritic': Script */
-static const OnigCodePoint CR_Ugaritic[] = {
- 2,
- 0x10380, 0x1039d,
- 0x1039f, 0x1039f,
-}; /* CR_Ugaritic */
-
-/* 'Shavian': Script */
-static const OnigCodePoint CR_Shavian[] = {
- 1,
- 0x10450, 0x1047f,
-}; /* CR_Shavian */
-
-/* 'Osmanya': Script */
-static const OnigCodePoint CR_Osmanya[] = {
- 2,
- 0x10480, 0x1049d,
- 0x104a0, 0x104a9,
-}; /* CR_Osmanya */
-
-/* 'Cypriot': Script */
-static const OnigCodePoint CR_Cypriot[] = {
- 6,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
-}; /* CR_Cypriot */
-
-/* 'Braille': Script */
-static const OnigCodePoint CR_Braille[] = {
- 1,
- 0x2800, 0x28ff,
-}; /* CR_Braille */
-
-/* 'Buginese': Script */
-static const OnigCodePoint CR_Buginese[] = {
- 2,
- 0x1a00, 0x1a1b,
- 0x1a1e, 0x1a1f,
-}; /* CR_Buginese */
-
-/* 'Coptic': Script */
-static const OnigCodePoint CR_Coptic[] = {
- 3,
- 0x03e2, 0x03ef,
- 0x2c80, 0x2cf3,
- 0x2cf9, 0x2cff,
-}; /* CR_Coptic */
-
-/* 'New_Tai_Lue': Script */
-static const OnigCodePoint CR_New_Tai_Lue[] = {
- 4,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x19df,
-}; /* CR_New_Tai_Lue */
-
-/* 'Glagolitic': Script */
-static const OnigCodePoint CR_Glagolitic[] = {
- 7,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
-}; /* CR_Glagolitic */
-
-/* 'Tifinagh': Script */
-static const OnigCodePoint CR_Tifinagh[] = {
- 3,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d7f,
-}; /* CR_Tifinagh */
-
-/* 'Syloti_Nagri': Script */
-static const OnigCodePoint CR_Syloti_Nagri[] = {
- 1,
- 0xa800, 0xa82b,
-}; /* CR_Syloti_Nagri */
-
-/* 'Old_Persian': Script */
-static const OnigCodePoint CR_Old_Persian[] = {
- 2,
- 0x103a0, 0x103c3,
- 0x103c8, 0x103d5,
-}; /* CR_Old_Persian */
-
-/* 'Kharoshthi': Script */
-static const OnigCodePoint CR_Kharoshthi[] = {
- 8,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
-}; /* CR_Kharoshthi */
-
-/* 'Balinese': Script */
-static const OnigCodePoint CR_Balinese[] = {
- 2,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
-}; /* CR_Balinese */
-
-/* 'Cuneiform': Script */
-static const OnigCodePoint CR_Cuneiform[] = {
- 4,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
-}; /* CR_Cuneiform */
-
-/* 'Phoenician': Script */
-static const OnigCodePoint CR_Phoenician[] = {
- 2,
- 0x10900, 0x1091b,
- 0x1091f, 0x1091f,
-}; /* CR_Phoenician */
-
-/* 'Phags_Pa': Script */
-static const OnigCodePoint CR_Phags_Pa[] = {
- 1,
- 0xa840, 0xa877,
-}; /* CR_Phags_Pa */
-
-/* 'Nko': Script */
-static const OnigCodePoint CR_Nko[] = {
- 2,
- 0x07c0, 0x07fa,
- 0x07fd, 0x07ff,
-}; /* CR_Nko */
-
-/* 'Sundanese': Script */
-static const OnigCodePoint CR_Sundanese[] = {
- 2,
- 0x1b80, 0x1bbf,
- 0x1cc0, 0x1cc7,
-}; /* CR_Sundanese */
-
-/* 'Lepcha': Script */
-static const OnigCodePoint CR_Lepcha[] = {
- 3,
- 0x1c00, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c4f,
-}; /* CR_Lepcha */
-
-/* 'Ol_Chiki': Script */
-static const OnigCodePoint CR_Ol_Chiki[] = {
- 1,
- 0x1c50, 0x1c7f,
-}; /* CR_Ol_Chiki */
-
-/* 'Vai': Script */
-static const OnigCodePoint CR_Vai[] = {
- 1,
- 0xa500, 0xa62b,
-}; /* CR_Vai */
-
-/* 'Saurashtra': Script */
-static const OnigCodePoint CR_Saurashtra[] = {
- 2,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
-}; /* CR_Saurashtra */
-
-/* 'Kayah_Li': Script */
-static const OnigCodePoint CR_Kayah_Li[] = {
- 2,
- 0xa900, 0xa92d,
- 0xa92f, 0xa92f,
-}; /* CR_Kayah_Li */
-
-/* 'Rejang': Script */
-static const OnigCodePoint CR_Rejang[] = {
- 2,
- 0xa930, 0xa953,
- 0xa95f, 0xa95f,
-}; /* CR_Rejang */
-
-/* 'Lycian': Script */
-static const OnigCodePoint CR_Lycian[] = {
- 1,
- 0x10280, 0x1029c,
-}; /* CR_Lycian */
-
-/* 'Carian': Script */
-static const OnigCodePoint CR_Carian[] = {
- 1,
- 0x102a0, 0x102d0,
-}; /* CR_Carian */
-
-/* 'Lydian': Script */
-static const OnigCodePoint CR_Lydian[] = {
- 2,
- 0x10920, 0x10939,
- 0x1093f, 0x1093f,
-}; /* CR_Lydian */
-
-/* 'Cham': Script */
-static const OnigCodePoint CR_Cham[] = {
- 4,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa5f,
-}; /* CR_Cham */
-
-/* 'Tai_Tham': Script */
-static const OnigCodePoint CR_Tai_Tham[] = {
- 5,
- 0x1a20, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
-}; /* CR_Tai_Tham */
-
-/* 'Tai_Viet': Script */
-static const OnigCodePoint CR_Tai_Viet[] = {
- 2,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaadf,
-}; /* CR_Tai_Viet */
-
-/* 'Avestan': Script */
-static const OnigCodePoint CR_Avestan[] = {
- 2,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b3f,
-}; /* CR_Avestan */
-
-/* 'Egyptian_Hieroglyphs': Script */
-static const OnigCodePoint CR_Egyptian_Hieroglyphs[] = {
- 2,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
-}; /* CR_Egyptian_Hieroglyphs */
-
-/* 'Samaritan': Script */
-static const OnigCodePoint CR_Samaritan[] = {
- 2,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
-}; /* CR_Samaritan */
-
-/* 'Lisu': Script */
-static const OnigCodePoint CR_Lisu[] = {
- 1,
- 0xa4d0, 0xa4ff,
-}; /* CR_Lisu */
-
-/* 'Bamum': Script */
-static const OnigCodePoint CR_Bamum[] = {
- 2,
- 0xa6a0, 0xa6f7,
- 0x16800, 0x16a38,
-}; /* CR_Bamum */
-
-/* 'Javanese': Script */
-static const OnigCodePoint CR_Javanese[] = {
- 3,
- 0xa980, 0xa9cd,
- 0xa9d0, 0xa9d9,
- 0xa9de, 0xa9df,
-}; /* CR_Javanese */
-
-/* 'Meetei_Mayek': Script */
-static const OnigCodePoint CR_Meetei_Mayek[] = {
- 3,
- 0xaae0, 0xaaf6,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
-}; /* CR_Meetei_Mayek */
-
-/* 'Imperial_Aramaic': Script */
-static const OnigCodePoint CR_Imperial_Aramaic[] = {
- 2,
- 0x10840, 0x10855,
- 0x10857, 0x1085f,
-}; /* CR_Imperial_Aramaic */
-
-/* 'Old_South_Arabian': Script */
-static const OnigCodePoint CR_Old_South_Arabian[] = {
- 1,
- 0x10a60, 0x10a7f,
-}; /* CR_Old_South_Arabian */
-
-/* 'Inscriptional_Parthian': Script */
-static const OnigCodePoint CR_Inscriptional_Parthian[] = {
- 2,
- 0x10b40, 0x10b55,
- 0x10b58, 0x10b5f,
-}; /* CR_Inscriptional_Parthian */
-
-/* 'Inscriptional_Pahlavi': Script */
-static const OnigCodePoint CR_Inscriptional_Pahlavi[] = {
- 2,
- 0x10b60, 0x10b72,
- 0x10b78, 0x10b7f,
-}; /* CR_Inscriptional_Pahlavi */
-
-/* 'Old_Turkic': Script */
-static const OnigCodePoint CR_Old_Turkic[] = {
- 1,
- 0x10c00, 0x10c48,
-}; /* CR_Old_Turkic */
-
-/* 'Kaithi': Script */
-static const OnigCodePoint CR_Kaithi[] = {
- 2,
- 0x11080, 0x110c1,
- 0x110cd, 0x110cd,
-}; /* CR_Kaithi */
-
-/* 'Batak': Script */
-static const OnigCodePoint CR_Batak[] = {
- 2,
- 0x1bc0, 0x1bf3,
- 0x1bfc, 0x1bff,
-}; /* CR_Batak */
-
-/* 'Brahmi': Script */
-static const OnigCodePoint CR_Brahmi[] = {
- 3,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x1107f,
-}; /* CR_Brahmi */
-
-/* 'Mandaic': Script */
-static const OnigCodePoint CR_Mandaic[] = {
- 2,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
-}; /* CR_Mandaic */
-
-/* 'Chakma': Script */
-static const OnigCodePoint CR_Chakma[] = {
- 2,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
-}; /* CR_Chakma */
-
-/* 'Meroitic_Cursive': Script */
-static const OnigCodePoint CR_Meroitic_Cursive[] = {
- 3,
- 0x109a0, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x109ff,
-}; /* CR_Meroitic_Cursive */
-
-/* 'Meroitic_Hieroglyphs': Script */
-static const OnigCodePoint CR_Meroitic_Hieroglyphs[] = {
- 1,
- 0x10980, 0x1099f,
-}; /* CR_Meroitic_Hieroglyphs */
-
-/* 'Miao': Script */
-static const OnigCodePoint CR_Miao[] = {
- 3,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
-}; /* CR_Miao */
-
-/* 'Sharada': Script */
-static const OnigCodePoint CR_Sharada[] = {
- 2,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
-}; /* CR_Sharada */
-
-/* 'Sora_Sompeng': Script */
-static const OnigCodePoint CR_Sora_Sompeng[] = {
- 2,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
-}; /* CR_Sora_Sompeng */
-
-/* 'Takri': Script */
-static const OnigCodePoint CR_Takri[] = {
- 2,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
-}; /* CR_Takri */
-
-/* 'Caucasian_Albanian': Script */
-static const OnigCodePoint CR_Caucasian_Albanian[] = {
- 2,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
-}; /* CR_Caucasian_Albanian */
-
-/* 'Bassa_Vah': Script */
-static const OnigCodePoint CR_Bassa_Vah[] = {
- 2,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
-}; /* CR_Bassa_Vah */
-
-/* 'Duployan': Script */
-static const OnigCodePoint CR_Duployan[] = {
- 5,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bc9f,
-}; /* CR_Duployan */
-
-/* 'Elbasan': Script */
-static const OnigCodePoint CR_Elbasan[] = {
- 1,
- 0x10500, 0x10527,
-}; /* CR_Elbasan */
-
-/* 'Grantha': Script */
-static const OnigCodePoint CR_Grantha[] = {
- 15,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133c, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
-}; /* CR_Grantha */
-
-/* 'Pahawh_Hmong': Script */
-static const OnigCodePoint CR_Pahawh_Hmong[] = {
- 5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
-}; /* CR_Pahawh_Hmong */
-
-/* 'Khojki': Script */
-static const OnigCodePoint CR_Khojki[] = {
- 2,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
-}; /* CR_Khojki */
-
-/* 'Linear_A': Script */
-static const OnigCodePoint CR_Linear_A[] = {
- 3,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
-}; /* CR_Linear_A */
-
-/* 'Mahajani': Script */
-static const OnigCodePoint CR_Mahajani[] = {
- 1,
- 0x11150, 0x11176,
-}; /* CR_Mahajani */
-
-/* 'Manichaean': Script */
-static const OnigCodePoint CR_Manichaean[] = {
- 2,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
-}; /* CR_Manichaean */
-
-/* 'Mende_Kikakui': Script */
-static const OnigCodePoint CR_Mende_Kikakui[] = {
- 2,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
-}; /* CR_Mende_Kikakui */
-
-/* 'Modi': Script */
-static const OnigCodePoint CR_Modi[] = {
- 2,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
-}; /* CR_Modi */
-
-/* 'Mro': Script */
-static const OnigCodePoint CR_Mro[] = {
- 3,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
-}; /* CR_Mro */
-
-/* 'Old_North_Arabian': Script */
-static const OnigCodePoint CR_Old_North_Arabian[] = {
- 1,
- 0x10a80, 0x10a9f,
-}; /* CR_Old_North_Arabian */
-
-/* 'Nabataean': Script */
-static const OnigCodePoint CR_Nabataean[] = {
- 2,
- 0x10880, 0x1089e,
- 0x108a7, 0x108af,
-}; /* CR_Nabataean */
-
-/* 'Palmyrene': Script */
-static const OnigCodePoint CR_Palmyrene[] = {
- 1,
- 0x10860, 0x1087f,
-}; /* CR_Palmyrene */
-
-/* 'Pau_Cin_Hau': Script */
-static const OnigCodePoint CR_Pau_Cin_Hau[] = {
- 1,
- 0x11ac0, 0x11af8,
-}; /* CR_Pau_Cin_Hau */
-
-/* 'Old_Permic': Script */
-static const OnigCodePoint CR_Old_Permic[] = {
- 1,
- 0x10350, 0x1037a,
-}; /* CR_Old_Permic */
-
-/* 'Psalter_Pahlavi': Script */
-static const OnigCodePoint CR_Psalter_Pahlavi[] = {
- 3,
- 0x10b80, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
-}; /* CR_Psalter_Pahlavi */
-
-/* 'Siddham': Script */
-static const OnigCodePoint CR_Siddham[] = {
- 2,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
-}; /* CR_Siddham */
-
-/* 'Khudawadi': Script */
-static const OnigCodePoint CR_Khudawadi[] = {
- 2,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
-}; /* CR_Khudawadi */
-
-/* 'Tirhuta': Script */
-static const OnigCodePoint CR_Tirhuta[] = {
- 2,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
-}; /* CR_Tirhuta */
-
-/* 'Warang_Citi': Script */
-static const OnigCodePoint CR_Warang_Citi[] = {
- 2,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
-}; /* CR_Warang_Citi */
-
-/* 'Ahom': Script */
-static const OnigCodePoint CR_Ahom[] = {
- 3,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
-}; /* CR_Ahom */
-
-/* 'Anatolian_Hieroglyphs': Script */
-static const OnigCodePoint CR_Anatolian_Hieroglyphs[] = {
- 1,
- 0x14400, 0x14646,
-}; /* CR_Anatolian_Hieroglyphs */
-
-/* 'Hatran': Script */
-static const OnigCodePoint CR_Hatran[] = {
- 3,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x108ff,
-}; /* CR_Hatran */
-
-/* 'Multani': Script */
-static const OnigCodePoint CR_Multani[] = {
- 5,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
-}; /* CR_Multani */
-
-/* 'Old_Hungarian': Script */
-static const OnigCodePoint CR_Old_Hungarian[] = {
- 3,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10cff,
-}; /* CR_Old_Hungarian */
-
-/* 'SignWriting': Script */
-static const OnigCodePoint CR_SignWriting[] = {
- 3,
- 0x1d800, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
-}; /* CR_SignWriting */
-
-/* 'Adlam': Script */
-static const OnigCodePoint CR_Adlam[] = {
- 3,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
-}; /* CR_Adlam */
-
-/* 'Bhaiksuki': Script */
-static const OnigCodePoint CR_Bhaiksuki[] = {
- 4,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
-}; /* CR_Bhaiksuki */
-
-/* 'Marchen': Script */
-static const OnigCodePoint CR_Marchen[] = {
- 3,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
-}; /* CR_Marchen */
-
-/* 'Newa': Script */
-static const OnigCodePoint CR_Newa[] = {
- 3,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
-}; /* CR_Newa */
-
-/* 'Osage': Script */
-static const OnigCodePoint CR_Osage[] = {
- 2,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
-}; /* CR_Osage */
-
-/* 'Tangut': Script */
-static const OnigCodePoint CR_Tangut[] = {
- 3,
- 0x16fe0, 0x16fe0,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
-}; /* CR_Tangut */
-
-/* 'Masaram_Gondi': Script */
-static const OnigCodePoint CR_Masaram_Gondi[] = {
- 7,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
-}; /* CR_Masaram_Gondi */
-
-/* 'Nushu': Script */
-static const OnigCodePoint CR_Nushu[] = {
- 2,
- 0x16fe1, 0x16fe1,
- 0x1b170, 0x1b2fb,
-}; /* CR_Nushu */
-
-/* 'Soyombo': Script */
-static const OnigCodePoint CR_Soyombo[] = {
- 1,
- 0x11a50, 0x11aa2,
-}; /* CR_Soyombo */
-
-/* 'Zanabazar_Square': Script */
-static const OnigCodePoint CR_Zanabazar_Square[] = {
- 1,
- 0x11a00, 0x11a47,
-}; /* CR_Zanabazar_Square */
-
-/* 'Dogra': Script */
-static const OnigCodePoint CR_Dogra[] = {
- 1,
- 0x11800, 0x1183b,
-}; /* CR_Dogra */
-
-/* 'Gunjala_Gondi': Script */
-static const OnigCodePoint CR_Gunjala_Gondi[] = {
- 6,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
-}; /* CR_Gunjala_Gondi */
-
-/* 'Makasar': Script */
-static const OnigCodePoint CR_Makasar[] = {
- 1,
- 0x11ee0, 0x11ef8,
-}; /* CR_Makasar */
-
-/* 'Medefaidrin': Script */
-static const OnigCodePoint CR_Medefaidrin[] = {
- 1,
- 0x16e40, 0x16e9a,
-}; /* CR_Medefaidrin */
-
-/* 'Hanifi_Rohingya': Script */
-static const OnigCodePoint CR_Hanifi_Rohingya[] = {
- 2,
- 0x10d00, 0x10d27,
- 0x10d30, 0x10d39,
-}; /* CR_Hanifi_Rohingya */
-
-/* 'Sogdian': Script */
-static const OnigCodePoint CR_Sogdian[] = {
- 1,
- 0x10f30, 0x10f59,
-}; /* CR_Sogdian */
-
-/* 'Old_Sogdian': Script */
-static const OnigCodePoint CR_Old_Sogdian[] = {
- 1,
- 0x10f00, 0x10f27,
-}; /* CR_Old_Sogdian */
-
-/* 'Elymaic': Script */
-static const OnigCodePoint CR_Elymaic[] = {
- 1,
- 0x10fe0, 0x10ff6,
-}; /* CR_Elymaic */
-
-/* 'Nandinagari': Script */
-static const OnigCodePoint CR_Nandinagari[] = {
- 3,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
-}; /* CR_Nandinagari */
-
-/* 'Nyiakeng_Puachue_Hmong': Script */
-static const OnigCodePoint CR_Nyiakeng_Puachue_Hmong[] = {
- 4,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
-}; /* CR_Nyiakeng_Puachue_Hmong */
-
-/* 'Wancho': Script */
-static const OnigCodePoint CR_Wancho[] = {
- 2,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
-}; /* CR_Wancho */
-
-/* 'White_Space': Binary Property */
-#define CR_White_Space CR_Space
-
-/* 'Bidi_Control': Binary Property */
-static const OnigCodePoint CR_Bidi_Control[] = {
- 4,
- 0x061c, 0x061c,
- 0x200e, 0x200f,
- 0x202a, 0x202e,
- 0x2066, 0x2069,
-}; /* CR_Bidi_Control */
-
-/* 'Join_Control': Binary Property */
-static const OnigCodePoint CR_Join_Control[] = {
- 1,
- 0x200c, 0x200d,
-}; /* CR_Join_Control */
-
-/* 'Dash': Binary Property */
-static const OnigCodePoint CR_Dash[] = {
- 21,
- 0x002d, 0x002d,
- 0x058a, 0x058a,
- 0x05be, 0x05be,
- 0x1400, 0x1400,
- 0x1806, 0x1806,
- 0x2010, 0x2015,
- 0x2053, 0x2053,
- 0x207b, 0x207b,
- 0x208b, 0x208b,
- 0x2212, 0x2212,
- 0x2e17, 0x2e17,
- 0x2e1a, 0x2e1a,
- 0x2e3a, 0x2e3b,
- 0x2e40, 0x2e40,
- 0x301c, 0x301c,
- 0x3030, 0x3030,
- 0x30a0, 0x30a0,
- 0xfe31, 0xfe32,
- 0xfe58, 0xfe58,
- 0xfe63, 0xfe63,
- 0xff0d, 0xff0d,
-}; /* CR_Dash */
-
-/* 'Hyphen': Binary Property */
-static const OnigCodePoint CR_Hyphen[] = {
- 10,
- 0x002d, 0x002d,
- 0x00ad, 0x00ad,
- 0x058a, 0x058a,
- 0x1806, 0x1806,
- 0x2010, 0x2011,
- 0x2e17, 0x2e17,
- 0x30fb, 0x30fb,
- 0xfe63, 0xfe63,
- 0xff0d, 0xff0d,
- 0xff65, 0xff65,
-}; /* CR_Hyphen */
-
-/* 'Quotation_Mark': Binary Property */
-static const OnigCodePoint CR_Quotation_Mark[] = {
- 13,
- 0x0022, 0x0022,
- 0x0027, 0x0027,
- 0x00ab, 0x00ab,
- 0x00bb, 0x00bb,
- 0x2018, 0x201f,
- 0x2039, 0x203a,
- 0x2e42, 0x2e42,
- 0x300c, 0x300f,
- 0x301d, 0x301f,
- 0xfe41, 0xfe44,
- 0xff02, 0xff02,
- 0xff07, 0xff07,
- 0xff62, 0xff63,
-}; /* CR_Quotation_Mark */
-
-/* 'Terminal_Punctuation': Binary Property */
-static const OnigCodePoint CR_Terminal_Punctuation[] = {
- 102,
- 0x0021, 0x0021,
- 0x002c, 0x002c,
- 0x002e, 0x002e,
- 0x003a, 0x003b,
- 0x003f, 0x003f,
- 0x037e, 0x037e,
- 0x0387, 0x0387,
- 0x0589, 0x0589,
- 0x05c3, 0x05c3,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x06d4, 0x06d4,
- 0x0700, 0x070a,
- 0x070c, 0x070c,
- 0x07f8, 0x07f9,
- 0x0830, 0x083e,
- 0x085e, 0x085e,
- 0x0964, 0x0965,
- 0x0e5a, 0x0e5b,
- 0x0f08, 0x0f08,
- 0x0f0d, 0x0f12,
- 0x104a, 0x104b,
- 0x1361, 0x1368,
- 0x166e, 0x166e,
- 0x16eb, 0x16ed,
- 0x1735, 0x1736,
- 0x17d4, 0x17d6,
- 0x17da, 0x17da,
- 0x1802, 0x1805,
- 0x1808, 0x1809,
- 0x1944, 0x1945,
- 0x1aa8, 0x1aab,
- 0x1b5a, 0x1b5b,
- 0x1b5d, 0x1b5f,
- 0x1c3b, 0x1c3f,
- 0x1c7e, 0x1c7f,
- 0x203c, 0x203d,
- 0x2047, 0x2049,
- 0x2e2e, 0x2e2e,
- 0x2e3c, 0x2e3c,
- 0x2e41, 0x2e41,
- 0x2e4c, 0x2e4c,
- 0x2e4e, 0x2e4f,
- 0x3001, 0x3002,
- 0xa4fe, 0xa4ff,
- 0xa60d, 0xa60f,
- 0xa6f3, 0xa6f7,
- 0xa876, 0xa877,
- 0xa8ce, 0xa8cf,
- 0xa92f, 0xa92f,
- 0xa9c7, 0xa9c9,
- 0xaa5d, 0xaa5f,
- 0xaadf, 0xaadf,
- 0xaaf0, 0xaaf1,
- 0xabeb, 0xabeb,
- 0xfe50, 0xfe52,
- 0xfe54, 0xfe57,
- 0xff01, 0xff01,
- 0xff0c, 0xff0c,
- 0xff0e, 0xff0e,
- 0xff1a, 0xff1b,
- 0xff1f, 0xff1f,
- 0xff61, 0xff61,
- 0xff64, 0xff64,
- 0x1039f, 0x1039f,
- 0x103d0, 0x103d0,
- 0x10857, 0x10857,
- 0x1091f, 0x1091f,
- 0x10a56, 0x10a57,
- 0x10af0, 0x10af5,
- 0x10b3a, 0x10b3f,
- 0x10b99, 0x10b9c,
- 0x10f55, 0x10f59,
- 0x11047, 0x1104d,
- 0x110be, 0x110c1,
- 0x11141, 0x11143,
- 0x111c5, 0x111c6,
- 0x111cd, 0x111cd,
- 0x111de, 0x111df,
- 0x11238, 0x1123c,
- 0x112a9, 0x112a9,
- 0x1144b, 0x1144d,
- 0x1145b, 0x1145b,
- 0x115c2, 0x115c5,
- 0x115c9, 0x115d7,
- 0x11641, 0x11642,
- 0x1173c, 0x1173e,
- 0x11a42, 0x11a43,
- 0x11a9b, 0x11a9c,
- 0x11aa1, 0x11aa2,
- 0x11c41, 0x11c43,
- 0x11c71, 0x11c71,
- 0x11ef7, 0x11ef8,
- 0x12470, 0x12474,
- 0x16a6e, 0x16a6f,
- 0x16af5, 0x16af5,
- 0x16b37, 0x16b39,
- 0x16b44, 0x16b44,
- 0x16e97, 0x16e98,
- 0x1bc9f, 0x1bc9f,
- 0x1da87, 0x1da8a,
-}; /* CR_Terminal_Punctuation */
-
-/* 'Other_Math': Binary Property */
-static const OnigCodePoint CR_Other_Math[] = {
- 134,
- 0x005e, 0x005e,
- 0x03d0, 0x03d2,
- 0x03d5, 0x03d5,
- 0x03f0, 0x03f1,
- 0x03f4, 0x03f5,
- 0x2016, 0x2016,
- 0x2032, 0x2034,
- 0x2040, 0x2040,
- 0x2061, 0x2064,
- 0x207d, 0x207e,
- 0x208d, 0x208e,
- 0x20d0, 0x20dc,
- 0x20e1, 0x20e1,
- 0x20e5, 0x20e6,
- 0x20eb, 0x20ef,
- 0x2102, 0x2102,
- 0x2107, 0x2107,
- 0x210a, 0x2113,
- 0x2115, 0x2115,
- 0x2119, 0x211d,
- 0x2124, 0x2124,
- 0x2128, 0x2129,
- 0x212c, 0x212d,
- 0x212f, 0x2131,
- 0x2133, 0x2138,
- 0x213c, 0x213f,
- 0x2145, 0x2149,
- 0x2195, 0x2199,
- 0x219c, 0x219f,
- 0x21a1, 0x21a2,
- 0x21a4, 0x21a5,
- 0x21a7, 0x21a7,
- 0x21a9, 0x21ad,
- 0x21b0, 0x21b1,
- 0x21b6, 0x21b7,
- 0x21bc, 0x21cd,
- 0x21d0, 0x21d1,
- 0x21d3, 0x21d3,
- 0x21d5, 0x21db,
- 0x21dd, 0x21dd,
- 0x21e4, 0x21e5,
- 0x2308, 0x230b,
- 0x23b4, 0x23b5,
- 0x23b7, 0x23b7,
- 0x23d0, 0x23d0,
- 0x23e2, 0x23e2,
- 0x25a0, 0x25a1,
- 0x25ae, 0x25b6,
- 0x25bc, 0x25c0,
- 0x25c6, 0x25c7,
- 0x25ca, 0x25cb,
- 0x25cf, 0x25d3,
- 0x25e2, 0x25e2,
- 0x25e4, 0x25e4,
- 0x25e7, 0x25ec,
- 0x2605, 0x2606,
- 0x2640, 0x2640,
- 0x2642, 0x2642,
- 0x2660, 0x2663,
- 0x266d, 0x266e,
- 0x27c5, 0x27c6,
- 0x27e6, 0x27ef,
- 0x2983, 0x2998,
- 0x29d8, 0x29db,
- 0x29fc, 0x29fd,
- 0xfe61, 0xfe61,
- 0xfe63, 0xfe63,
- 0xfe68, 0xfe68,
- 0xff3c, 0xff3c,
- 0xff3e, 0xff3e,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d6c0,
- 0x1d6c2, 0x1d6da,
- 0x1d6dc, 0x1d6fa,
- 0x1d6fc, 0x1d714,
- 0x1d716, 0x1d734,
- 0x1d736, 0x1d74e,
- 0x1d750, 0x1d76e,
- 0x1d770, 0x1d788,
- 0x1d78a, 0x1d7a8,
- 0x1d7aa, 0x1d7c2,
- 0x1d7c4, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
-}; /* CR_Other_Math */
-
-/* 'Hex_Digit': Binary Property */
-static const OnigCodePoint CR_Hex_Digit[] = {
- 6,
- 0x0030, 0x0039,
- 0x0041, 0x0046,
- 0x0061, 0x0066,
- 0xff10, 0xff19,
- 0xff21, 0xff26,
- 0xff41, 0xff46,
-}; /* CR_Hex_Digit */
-
-/* 'ASCII_Hex_Digit': Binary Property */
-#define CR_ASCII_Hex_Digit CR_XDigit
-
-/* 'Other_Alphabetic': Binary Property */
-static const OnigCodePoint CR_Other_Alphabetic[] = {
- 221,
- 0x0345, 0x0345,
- 0x05b0, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x0610, 0x061a,
- 0x064b, 0x0657,
- 0x0659, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dc,
- 0x06e1, 0x06e4,
- 0x06e7, 0x06e8,
- 0x06ed, 0x06ed,
- 0x0711, 0x0711,
- 0x0730, 0x073f,
- 0x07a6, 0x07b0,
- 0x0816, 0x0817,
- 0x081b, 0x0823,
- 0x0825, 0x0827,
- 0x0829, 0x082c,
- 0x08d4, 0x08df,
- 0x08e3, 0x08e9,
- 0x08f0, 0x0903,
- 0x093a, 0x093b,
- 0x093e, 0x094c,
- 0x094e, 0x094f,
- 0x0955, 0x0957,
- 0x0962, 0x0963,
- 0x0981, 0x0983,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x09d7, 0x09d7,
- 0x09e2, 0x09e3,
- 0x0a01, 0x0a03,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4c,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0abe, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0afc,
- 0x0b01, 0x0b03,
- 0x0b3e, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0b56, 0x0b57,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0bd7, 0x0bd7,
- 0x0c00, 0x0c03,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4c,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c83,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccc,
- 0x0cd5, 0x0cd6,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d03,
- 0x0d3e, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d57, 0x0d57,
- 0x0d62, 0x0d63,
- 0x0d82, 0x0d83,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df3,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e4d, 0x0e4d,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0eb9,
- 0x0ebb, 0x0ebc,
- 0x0ecd, 0x0ecd,
- 0x0f71, 0x0f81,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x102b, 0x1036,
- 0x1038, 0x1038,
- 0x103b, 0x103e,
- 0x1056, 0x1059,
- 0x105e, 0x1060,
- 0x1062, 0x1064,
- 0x1067, 0x106d,
- 0x1071, 0x1074,
- 0x1082, 0x108d,
- 0x108f, 0x108f,
- 0x109a, 0x109d,
- 0x1712, 0x1713,
- 0x1732, 0x1733,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b6, 0x17c8,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x192b,
- 0x1930, 0x1938,
- 0x1a17, 0x1a1b,
- 0x1a55, 0x1a5e,
- 0x1a61, 0x1a74,
- 0x1b00, 0x1b04,
- 0x1b35, 0x1b43,
- 0x1b80, 0x1b82,
- 0x1ba1, 0x1ba9,
- 0x1bac, 0x1bad,
- 0x1be7, 0x1bf1,
- 0x1c24, 0x1c36,
- 0x1de7, 0x1df4,
- 0x24b6, 0x24e9,
- 0x2de0, 0x2dff,
- 0xa674, 0xa67b,
- 0xa69e, 0xa69f,
- 0xa802, 0xa802,
- 0xa80b, 0xa80b,
- 0xa823, 0xa827,
- 0xa880, 0xa881,
- 0xa8b4, 0xa8c3,
- 0xa8c5, 0xa8c5,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92a,
- 0xa947, 0xa952,
- 0xa980, 0xa983,
- 0xa9b4, 0xa9bf,
- 0xa9e5, 0xa9e5,
- 0xaa29, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4d,
- 0xaa7b, 0xaa7d,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabe,
- 0xaaeb, 0xaaef,
- 0xaaf5, 0xaaf5,
- 0xabe3, 0xabea,
- 0xfb1e, 0xfb1e,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10d24, 0x10d27,
- 0x11000, 0x11002,
- 0x11038, 0x11045,
- 0x11082, 0x11082,
- 0x110b0, 0x110b8,
- 0x11100, 0x11102,
- 0x11127, 0x11132,
- 0x11145, 0x11146,
- 0x11180, 0x11182,
- 0x111b3, 0x111bf,
- 0x1122c, 0x11234,
- 0x11237, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112e8,
- 0x11300, 0x11303,
- 0x1133e, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134c,
- 0x11357, 0x11357,
- 0x11362, 0x11363,
- 0x11435, 0x11441,
- 0x11443, 0x11445,
- 0x114b0, 0x114c1,
- 0x115af, 0x115b5,
- 0x115b8, 0x115be,
- 0x115dc, 0x115dd,
- 0x11630, 0x1163e,
- 0x11640, 0x11640,
- 0x116ab, 0x116b5,
- 0x1171d, 0x1172a,
- 0x1182c, 0x11838,
- 0x119d1, 0x119d7,
- 0x119da, 0x119df,
- 0x119e4, 0x119e4,
- 0x11a01, 0x11a0a,
- 0x11a35, 0x11a39,
- 0x11a3b, 0x11a3e,
- 0x11a51, 0x11a5b,
- 0x11a8a, 0x11a97,
- 0x11c2f, 0x11c36,
- 0x11c38, 0x11c3e,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d41,
- 0x11d43, 0x11d43,
- 0x11d47, 0x11d47,
- 0x11d8a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d96,
- 0x11ef3, 0x11ef6,
- 0x16f4f, 0x16f4f,
- 0x16f51, 0x16f87,
- 0x16f8f, 0x16f92,
- 0x1bc9e, 0x1bc9e,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e947, 0x1e947,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
-}; /* CR_Other_Alphabetic */
-
-/* 'Ideographic': Binary Property */
-static const OnigCodePoint CR_Ideographic[] = {
- 16,
- 0x3006, 0x3007,
- 0x3021, 0x3029,
- 0x3038, 0x303a,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xf900, 0xfa6d,
- 0xfa70, 0xfad9,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b170, 0x1b2fb,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
-}; /* CR_Ideographic */
-
-/* 'Diacritic': Binary Property */
-static const OnigCodePoint CR_Diacritic[] = {
- 171,
- 0x005e, 0x005e,
- 0x0060, 0x0060,
- 0x00a8, 0x00a8,
- 0x00af, 0x00af,
- 0x00b4, 0x00b4,
- 0x00b7, 0x00b8,
- 0x02b0, 0x034e,
- 0x0350, 0x0357,
- 0x035d, 0x0362,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x0384, 0x0385,
- 0x0483, 0x0487,
- 0x0559, 0x0559,
- 0x0591, 0x05a1,
- 0x05a3, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c4,
- 0x064b, 0x0652,
- 0x0657, 0x0658,
- 0x06df, 0x06e0,
- 0x06e5, 0x06e6,
- 0x06ea, 0x06ec,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f5,
- 0x0818, 0x0819,
- 0x08e3, 0x08fe,
- 0x093c, 0x093c,
- 0x094d, 0x094d,
- 0x0951, 0x0954,
- 0x0971, 0x0971,
- 0x09bc, 0x09bc,
- 0x09cd, 0x09cd,
- 0x0a3c, 0x0a3c,
- 0x0a4d, 0x0a4d,
- 0x0abc, 0x0abc,
- 0x0acd, 0x0acd,
- 0x0afd, 0x0aff,
- 0x0b3c, 0x0b3c,
- 0x0b4d, 0x0b4d,
- 0x0bcd, 0x0bcd,
- 0x0c4d, 0x0c4d,
- 0x0cbc, 0x0cbc,
- 0x0ccd, 0x0ccd,
- 0x0d3b, 0x0d3c,
- 0x0d4d, 0x0d4d,
- 0x0dca, 0x0dca,
- 0x0e47, 0x0e4c,
- 0x0e4e, 0x0e4e,
- 0x0eba, 0x0eba,
- 0x0ec8, 0x0ecc,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f3e, 0x0f3f,
- 0x0f82, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0fc6, 0x0fc6,
- 0x1037, 0x1037,
- 0x1039, 0x103a,
- 0x1063, 0x1064,
- 0x1069, 0x106d,
- 0x1087, 0x108d,
- 0x108f, 0x108f,
- 0x109a, 0x109b,
- 0x135d, 0x135f,
- 0x17c9, 0x17d3,
- 0x17dd, 0x17dd,
- 0x1939, 0x193b,
- 0x1a75, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1ab0, 0x1abd,
- 0x1b34, 0x1b34,
- 0x1b44, 0x1b44,
- 0x1b6b, 0x1b73,
- 0x1baa, 0x1bab,
- 0x1c36, 0x1c37,
- 0x1c78, 0x1c7d,
- 0x1cd0, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf7, 0x1cf9,
- 0x1d2c, 0x1d6a,
- 0x1dc4, 0x1dcf,
- 0x1df5, 0x1df9,
- 0x1dfd, 0x1dff,
- 0x1fbd, 0x1fbd,
- 0x1fbf, 0x1fc1,
- 0x1fcd, 0x1fcf,
- 0x1fdd, 0x1fdf,
- 0x1fed, 0x1fef,
- 0x1ffd, 0x1ffe,
- 0x2cef, 0x2cf1,
- 0x2e2f, 0x2e2f,
- 0x302a, 0x302f,
- 0x3099, 0x309c,
- 0x30fc, 0x30fc,
- 0xa66f, 0xa66f,
- 0xa67c, 0xa67d,
- 0xa67f, 0xa67f,
- 0xa69c, 0xa69d,
- 0xa6f0, 0xa6f1,
- 0xa700, 0xa721,
- 0xa788, 0xa78a,
- 0xa7f8, 0xa7f9,
- 0xa8c4, 0xa8c4,
- 0xa8e0, 0xa8f1,
- 0xa92b, 0xa92e,
- 0xa953, 0xa953,
- 0xa9b3, 0xa9b3,
- 0xa9c0, 0xa9c0,
- 0xa9e5, 0xa9e5,
- 0xaa7b, 0xaa7d,
- 0xaabf, 0xaac2,
- 0xaaf6, 0xaaf6,
- 0xab5b, 0xab5f,
- 0xabec, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfe20, 0xfe2f,
- 0xff3e, 0xff3e,
- 0xff40, 0xff40,
- 0xff70, 0xff70,
- 0xff9e, 0xff9f,
- 0xffe3, 0xffe3,
- 0x102e0, 0x102e0,
- 0x10ae5, 0x10ae6,
- 0x10d22, 0x10d27,
- 0x10f46, 0x10f50,
- 0x110b9, 0x110ba,
- 0x11133, 0x11134,
- 0x11173, 0x11173,
- 0x111c0, 0x111c0,
- 0x111ca, 0x111cc,
- 0x11235, 0x11236,
- 0x112e9, 0x112ea,
- 0x1133c, 0x1133c,
- 0x1134d, 0x1134d,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11442, 0x11442,
- 0x11446, 0x11446,
- 0x114c2, 0x114c3,
- 0x115bf, 0x115c0,
- 0x1163f, 0x1163f,
- 0x116b6, 0x116b7,
- 0x1172b, 0x1172b,
- 0x11839, 0x1183a,
- 0x119e0, 0x119e0,
- 0x11a34, 0x11a34,
- 0x11a47, 0x11a47,
- 0x11a99, 0x11a99,
- 0x11c3f, 0x11c3f,
- 0x11d42, 0x11d42,
- 0x11d44, 0x11d45,
- 0x11d97, 0x11d97,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16f8f, 0x16f9f,
- 0x1d167, 0x1d169,
- 0x1d16d, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1e130, 0x1e136,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e946,
- 0x1e948, 0x1e94a,
-}; /* CR_Diacritic */
-
-/* 'Extender': Binary Property */
-static const OnigCodePoint CR_Extender[] = {
- 31,
- 0x00b7, 0x00b7,
- 0x02d0, 0x02d1,
- 0x0640, 0x0640,
- 0x07fa, 0x07fa,
- 0x0e46, 0x0e46,
- 0x0ec6, 0x0ec6,
- 0x180a, 0x180a,
- 0x1843, 0x1843,
- 0x1aa7, 0x1aa7,
- 0x1c36, 0x1c36,
- 0x1c7b, 0x1c7b,
- 0x3005, 0x3005,
- 0x3031, 0x3035,
- 0x309d, 0x309e,
- 0x30fc, 0x30fe,
- 0xa015, 0xa015,
- 0xa60c, 0xa60c,
- 0xa9cf, 0xa9cf,
- 0xa9e6, 0xa9e6,
- 0xaa70, 0xaa70,
- 0xaadd, 0xaadd,
- 0xaaf3, 0xaaf4,
- 0xff70, 0xff70,
- 0x1135d, 0x1135d,
- 0x115c6, 0x115c8,
- 0x11a98, 0x11a98,
- 0x16b42, 0x16b43,
- 0x16fe0, 0x16fe1,
- 0x16fe3, 0x16fe3,
- 0x1e13c, 0x1e13d,
- 0x1e944, 0x1e946,
-}; /* CR_Extender */
-
-/* 'Other_Lowercase': Binary Property */
-static const OnigCodePoint CR_Other_Lowercase[] = {
- 20,
- 0x00aa, 0x00aa,
- 0x00ba, 0x00ba,
- 0x02b0, 0x02b8,
- 0x02c0, 0x02c1,
- 0x02e0, 0x02e4,
- 0x0345, 0x0345,
- 0x037a, 0x037a,
- 0x1d2c, 0x1d6a,
- 0x1d78, 0x1d78,
- 0x1d9b, 0x1dbf,
- 0x2071, 0x2071,
- 0x207f, 0x207f,
- 0x2090, 0x209c,
- 0x2170, 0x217f,
- 0x24d0, 0x24e9,
- 0x2c7c, 0x2c7d,
- 0xa69c, 0xa69d,
- 0xa770, 0xa770,
- 0xa7f8, 0xa7f9,
- 0xab5c, 0xab5f,
-}; /* CR_Other_Lowercase */
-
-/* 'Other_Uppercase': Binary Property */
-static const OnigCodePoint CR_Other_Uppercase[] = {
- 5,
- 0x2160, 0x216f,
- 0x24b6, 0x24cf,
- 0x1f130, 0x1f149,
- 0x1f150, 0x1f169,
- 0x1f170, 0x1f189,
-}; /* CR_Other_Uppercase */
-
-/* 'Noncharacter_Code_Point': Binary Property */
-static const OnigCodePoint CR_Noncharacter_Code_Point[] = {
- 18,
- 0xfdd0, 0xfdef,
- 0xfffe, 0xffff,
- 0x1fffe, 0x1ffff,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xefffe, 0xeffff,
- 0xffffe, 0xfffff,
- 0x10fffe, 0x10ffff,
-}; /* CR_Noncharacter_Code_Point */
-
-/* 'Other_Grapheme_Extend': Binary Property */
-static const OnigCodePoint CR_Other_Grapheme_Extend[] = {
- 24,
- 0x09be, 0x09be,
- 0x09d7, 0x09d7,
- 0x0b3e, 0x0b3e,
- 0x0b57, 0x0b57,
- 0x0bbe, 0x0bbe,
- 0x0bd7, 0x0bd7,
- 0x0cc2, 0x0cc2,
- 0x0cd5, 0x0cd6,
- 0x0d3e, 0x0d3e,
- 0x0d57, 0x0d57,
- 0x0dcf, 0x0dcf,
- 0x0ddf, 0x0ddf,
- 0x1b35, 0x1b35,
- 0x200c, 0x200c,
- 0x302e, 0x302f,
- 0xff9e, 0xff9f,
- 0x1133e, 0x1133e,
- 0x11357, 0x11357,
- 0x114b0, 0x114b0,
- 0x114bd, 0x114bd,
- 0x115af, 0x115af,
- 0x1d165, 0x1d165,
- 0x1d16e, 0x1d172,
- 0xe0020, 0xe007f,
-}; /* CR_Other_Grapheme_Extend */
-
-/* 'IDS_Binary_Operator': Binary Property */
-static const OnigCodePoint CR_IDS_Binary_Operator[] = {
- 2,
- 0x2ff0, 0x2ff1,
- 0x2ff4, 0x2ffb,
-}; /* CR_IDS_Binary_Operator */
-
-/* 'IDS_Trinary_Operator': Binary Property */
-static const OnigCodePoint CR_IDS_Trinary_Operator[] = {
- 1,
- 0x2ff2, 0x2ff3,
-}; /* CR_IDS_Trinary_Operator */
-
-/* 'Radical': Binary Property */
-static const OnigCodePoint CR_Radical[] = {
- 3,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
-}; /* CR_Radical */
-
-/* 'Unified_Ideograph': Binary Property */
-static const OnigCodePoint CR_Unified_Ideograph[] = {
- 14,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fef,
- 0xfa0e, 0xfa0f,
- 0xfa11, 0xfa11,
- 0xfa13, 0xfa14,
- 0xfa1f, 0xfa1f,
- 0xfa21, 0xfa21,
- 0xfa23, 0xfa24,
- 0xfa27, 0xfa29,
- 0x20000, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
-}; /* CR_Unified_Ideograph */
-
-/* 'Other_Default_Ignorable_Code_Point': Binary Property */
-static const OnigCodePoint CR_Other_Default_Ignorable_Code_Point[] = {
- 11,
- 0x034f, 0x034f,
- 0x115f, 0x1160,
- 0x17b4, 0x17b5,
- 0x2065, 0x2065,
- 0x3164, 0x3164,
- 0xffa0, 0xffa0,
- 0xfff0, 0xfff8,
- 0xe0000, 0xe0000,
- 0xe0002, 0xe001f,
- 0xe0080, 0xe00ff,
- 0xe01f0, 0xe0fff,
-}; /* CR_Other_Default_Ignorable_Code_Point */
-
-/* 'Deprecated': Binary Property */
-static const OnigCodePoint CR_Deprecated[] = {
- 8,
- 0x0149, 0x0149,
- 0x0673, 0x0673,
- 0x0f77, 0x0f77,
- 0x0f79, 0x0f79,
- 0x17a3, 0x17a4,
- 0x206a, 0x206f,
- 0x2329, 0x232a,
- 0xe0001, 0xe0001,
-}; /* CR_Deprecated */
-
-/* 'Soft_Dotted': Binary Property */
-static const OnigCodePoint CR_Soft_Dotted[] = {
- 31,
- 0x0069, 0x006a,
- 0x012f, 0x012f,
- 0x0249, 0x0249,
- 0x0268, 0x0268,
- 0x029d, 0x029d,
- 0x02b2, 0x02b2,
- 0x03f3, 0x03f3,
- 0x0456, 0x0456,
- 0x0458, 0x0458,
- 0x1d62, 0x1d62,
- 0x1d96, 0x1d96,
- 0x1da4, 0x1da4,
- 0x1da8, 0x1da8,
- 0x1e2d, 0x1e2d,
- 0x1ecb, 0x1ecb,
- 0x2071, 0x2071,
- 0x2148, 0x2149,
- 0x2c7c, 0x2c7c,
- 0x1d422, 0x1d423,
- 0x1d456, 0x1d457,
- 0x1d48a, 0x1d48b,
- 0x1d4be, 0x1d4bf,
- 0x1d4f2, 0x1d4f3,
- 0x1d526, 0x1d527,
- 0x1d55a, 0x1d55b,
- 0x1d58e, 0x1d58f,
- 0x1d5c2, 0x1d5c3,
- 0x1d5f6, 0x1d5f7,
- 0x1d62a, 0x1d62b,
- 0x1d65e, 0x1d65f,
- 0x1d692, 0x1d693,
-}; /* CR_Soft_Dotted */
-
-/* 'Logical_Order_Exception': Binary Property */
-static const OnigCodePoint CR_Logical_Order_Exception[] = {
- 7,
- 0x0e40, 0x0e44,
- 0x0ec0, 0x0ec4,
- 0x19b5, 0x19b7,
- 0x19ba, 0x19ba,
- 0xaab5, 0xaab6,
- 0xaab9, 0xaab9,
- 0xaabb, 0xaabc,
-}; /* CR_Logical_Order_Exception */
-
-/* 'Other_ID_Start': Binary Property */
-static const OnigCodePoint CR_Other_ID_Start[] = {
- 4,
- 0x1885, 0x1886,
- 0x2118, 0x2118,
- 0x212e, 0x212e,
- 0x309b, 0x309c,
-}; /* CR_Other_ID_Start */
-
-/* 'Other_ID_Continue': Binary Property */
-static const OnigCodePoint CR_Other_ID_Continue[] = {
- 4,
- 0x00b7, 0x00b7,
- 0x0387, 0x0387,
- 0x1369, 0x1371,
- 0x19da, 0x19da,
-}; /* CR_Other_ID_Continue */
-
-/* 'Sentence_Terminal': Binary Property */
-static const OnigCodePoint CR_Sentence_Terminal[] = {
- 74,
- 0x0021, 0x0021,
- 0x002e, 0x002e,
- 0x003f, 0x003f,
- 0x0589, 0x0589,
- 0x061e, 0x061f,
- 0x06d4, 0x06d4,
- 0x0700, 0x0702,
- 0x07f9, 0x07f9,
- 0x0837, 0x0837,
- 0x0839, 0x0839,
- 0x083d, 0x083e,
- 0x0964, 0x0965,
- 0x104a, 0x104b,
- 0x1362, 0x1362,
- 0x1367, 0x1368,
- 0x166e, 0x166e,
- 0x1735, 0x1736,
- 0x1803, 0x1803,
- 0x1809, 0x1809,
- 0x1944, 0x1945,
- 0x1aa8, 0x1aab,
- 0x1b5a, 0x1b5b,
- 0x1b5e, 0x1b5f,
- 0x1c3b, 0x1c3c,
- 0x1c7e, 0x1c7f,
- 0x203c, 0x203d,
- 0x2047, 0x2049,
- 0x2e2e, 0x2e2e,
- 0x2e3c, 0x2e3c,
- 0x3002, 0x3002,
- 0xa4ff, 0xa4ff,
- 0xa60e, 0xa60f,
- 0xa6f3, 0xa6f3,
- 0xa6f7, 0xa6f7,
- 0xa876, 0xa877,
- 0xa8ce, 0xa8cf,
- 0xa92f, 0xa92f,
- 0xa9c8, 0xa9c9,
- 0xaa5d, 0xaa5f,
- 0xaaf0, 0xaaf1,
- 0xabeb, 0xabeb,
- 0xfe52, 0xfe52,
- 0xfe56, 0xfe57,
- 0xff01, 0xff01,
- 0xff0e, 0xff0e,
- 0xff1f, 0xff1f,
- 0xff61, 0xff61,
- 0x10a56, 0x10a57,
- 0x10f55, 0x10f59,
- 0x11047, 0x11048,
- 0x110be, 0x110c1,
- 0x11141, 0x11143,
- 0x111c5, 0x111c6,
- 0x111cd, 0x111cd,
- 0x111de, 0x111df,
- 0x11238, 0x11239,
- 0x1123b, 0x1123c,
- 0x112a9, 0x112a9,
- 0x1144b, 0x1144c,
- 0x115c2, 0x115c3,
- 0x115c9, 0x115d7,
- 0x11641, 0x11642,
- 0x1173c, 0x1173e,
- 0x11a42, 0x11a43,
- 0x11a9b, 0x11a9c,
- 0x11c41, 0x11c42,
- 0x11ef7, 0x11ef8,
- 0x16a6e, 0x16a6f,
- 0x16af5, 0x16af5,
- 0x16b37, 0x16b38,
- 0x16b44, 0x16b44,
- 0x16e98, 0x16e98,
- 0x1bc9f, 0x1bc9f,
- 0x1da88, 0x1da88,
-}; /* CR_Sentence_Terminal */
-
-/* 'Variation_Selector': Binary Property */
-static const OnigCodePoint CR_Variation_Selector[] = {
- 3,
- 0x180b, 0x180d,
- 0xfe00, 0xfe0f,
- 0xe0100, 0xe01ef,
-}; /* CR_Variation_Selector */
-
-/* 'Pattern_White_Space': Binary Property */
-static const OnigCodePoint CR_Pattern_White_Space[] = {
- 5,
- 0x0009, 0x000d,
- 0x0020, 0x0020,
- 0x0085, 0x0085,
- 0x200e, 0x200f,
- 0x2028, 0x2029,
-}; /* CR_Pattern_White_Space */
-
-/* 'Pattern_Syntax': Binary Property */
-static const OnigCodePoint CR_Pattern_Syntax[] = {
- 28,
- 0x0021, 0x002f,
- 0x003a, 0x0040,
- 0x005b, 0x005e,
- 0x0060, 0x0060,
- 0x007b, 0x007e,
- 0x00a1, 0x00a7,
- 0x00a9, 0x00a9,
- 0x00ab, 0x00ac,
- 0x00ae, 0x00ae,
- 0x00b0, 0x00b1,
- 0x00b6, 0x00b6,
- 0x00bb, 0x00bb,
- 0x00bf, 0x00bf,
- 0x00d7, 0x00d7,
- 0x00f7, 0x00f7,
- 0x2010, 0x2027,
- 0x2030, 0x203e,
- 0x2041, 0x2053,
- 0x2055, 0x205e,
- 0x2190, 0x245f,
- 0x2500, 0x2775,
- 0x2794, 0x2bff,
- 0x2e00, 0x2e7f,
- 0x3001, 0x3003,
- 0x3008, 0x3020,
- 0x3030, 0x3030,
- 0xfd3e, 0xfd3f,
- 0xfe45, 0xfe46,
-}; /* CR_Pattern_Syntax */
-
-/* 'Prepended_Concatenation_Mark': Binary Property */
-static const OnigCodePoint CR_Prepended_Concatenation_Mark[] = {
- 6,
- 0x0600, 0x0605,
- 0x06dd, 0x06dd,
- 0x070f, 0x070f,
- 0x08e2, 0x08e2,
- 0x110bd, 0x110bd,
- 0x110cd, 0x110cd,
-}; /* CR_Prepended_Concatenation_Mark */
-
-/* 'Regional_Indicator': Binary Property */
-static const OnigCodePoint CR_Regional_Indicator[] = {
- 1,
- 0x1f1e6, 0x1f1ff,
-}; /* CR_Regional_Indicator */
-
-/* 'Emoji': Emoji */
-static const OnigCodePoint CR_Emoji[] = {
- 151,
- 0x0023, 0x0023,
- 0x002a, 0x002a,
- 0x0030, 0x0039,
- 0x00a9, 0x00a9,
- 0x00ae, 0x00ae,
- 0x203c, 0x203c,
- 0x2049, 0x2049,
- 0x2122, 0x2122,
- 0x2139, 0x2139,
- 0x2194, 0x2199,
- 0x21a9, 0x21aa,
- 0x231a, 0x231b,
- 0x2328, 0x2328,
- 0x23cf, 0x23cf,
- 0x23e9, 0x23f3,
- 0x23f8, 0x23fa,
- 0x24c2, 0x24c2,
- 0x25aa, 0x25ab,
- 0x25b6, 0x25b6,
- 0x25c0, 0x25c0,
- 0x25fb, 0x25fe,
- 0x2600, 0x2604,
- 0x260e, 0x260e,
- 0x2611, 0x2611,
- 0x2614, 0x2615,
- 0x2618, 0x2618,
- 0x261d, 0x261d,
- 0x2620, 0x2620,
- 0x2622, 0x2623,
- 0x2626, 0x2626,
- 0x262a, 0x262a,
- 0x262e, 0x262f,
- 0x2638, 0x263a,
- 0x2640, 0x2640,
- 0x2642, 0x2642,
- 0x2648, 0x2653,
- 0x265f, 0x2660,
- 0x2663, 0x2663,
- 0x2665, 0x2666,
- 0x2668, 0x2668,
- 0x267b, 0x267b,
- 0x267e, 0x267f,
- 0x2692, 0x2697,
- 0x2699, 0x2699,
- 0x269b, 0x269c,
- 0x26a0, 0x26a1,
- 0x26aa, 0x26ab,
- 0x26b0, 0x26b1,
- 0x26bd, 0x26be,
- 0x26c4, 0x26c5,
- 0x26c8, 0x26c8,
- 0x26ce, 0x26cf,
- 0x26d1, 0x26d1,
- 0x26d3, 0x26d4,
- 0x26e9, 0x26ea,
- 0x26f0, 0x26f5,
- 0x26f7, 0x26fa,
- 0x26fd, 0x26fd,
- 0x2702, 0x2702,
- 0x2705, 0x2705,
- 0x2708, 0x270d,
- 0x270f, 0x270f,
- 0x2712, 0x2712,
- 0x2714, 0x2714,
- 0x2716, 0x2716,
- 0x271d, 0x271d,
- 0x2721, 0x2721,
- 0x2728, 0x2728,
- 0x2733, 0x2734,
- 0x2744, 0x2744,
- 0x2747, 0x2747,
- 0x274c, 0x274c,
- 0x274e, 0x274e,
- 0x2753, 0x2755,
- 0x2757, 0x2757,
- 0x2763, 0x2764,
- 0x2795, 0x2797,
- 0x27a1, 0x27a1,
- 0x27b0, 0x27b0,
- 0x27bf, 0x27bf,
- 0x2934, 0x2935,
- 0x2b05, 0x2b07,
- 0x2b1b, 0x2b1c,
- 0x2b50, 0x2b50,
- 0x2b55, 0x2b55,
- 0x3030, 0x3030,
- 0x303d, 0x303d,
- 0x3297, 0x3297,
- 0x3299, 0x3299,
- 0x1f004, 0x1f004,
- 0x1f0cf, 0x1f0cf,
- 0x1f170, 0x1f171,
- 0x1f17e, 0x1f17f,
- 0x1f18e, 0x1f18e,
- 0x1f191, 0x1f19a,
- 0x1f1e6, 0x1f1ff,
- 0x1f201, 0x1f202,
- 0x1f21a, 0x1f21a,
- 0x1f22f, 0x1f22f,
- 0x1f232, 0x1f23a,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f321,
- 0x1f324, 0x1f393,
- 0x1f396, 0x1f397,
- 0x1f399, 0x1f39b,
- 0x1f39e, 0x1f3f0,
- 0x1f3f3, 0x1f3f5,
- 0x1f3f7, 0x1f4fd,
- 0x1f4ff, 0x1f53d,
- 0x1f549, 0x1f54e,
- 0x1f550, 0x1f567,
- 0x1f56f, 0x1f570,
- 0x1f573, 0x1f57a,
- 0x1f587, 0x1f587,
- 0x1f58a, 0x1f58d,
- 0x1f590, 0x1f590,
- 0x1f595, 0x1f596,
- 0x1f5a4, 0x1f5a5,
- 0x1f5a8, 0x1f5a8,
- 0x1f5b1, 0x1f5b2,
- 0x1f5bc, 0x1f5bc,
- 0x1f5c2, 0x1f5c4,
- 0x1f5d1, 0x1f5d3,
- 0x1f5dc, 0x1f5de,
- 0x1f5e1, 0x1f5e1,
- 0x1f5e3, 0x1f5e3,
- 0x1f5e8, 0x1f5e8,
- 0x1f5ef, 0x1f5ef,
- 0x1f5f3, 0x1f5f3,
- 0x1f5fa, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f6cb, 0x1f6d2,
- 0x1f6d5, 0x1f6d5,
- 0x1f6e0, 0x1f6e5,
- 0x1f6e9, 0x1f6e9,
- 0x1f6eb, 0x1f6ec,
- 0x1f6f0, 0x1f6f0,
- 0x1f6f3, 0x1f6fa,
- 0x1f7e0, 0x1f7eb,
- 0x1f90d, 0x1f93a,
- 0x1f93c, 0x1f945,
- 0x1f947, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1f9ff,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
-}; /* CR_Emoji */
-
-/* 'Emoji_Presentation': Emoji */
-static const OnigCodePoint CR_Emoji_Presentation[] = {
- 81,
- 0x231a, 0x231b,
- 0x23e9, 0x23ec,
- 0x23f0, 0x23f0,
- 0x23f3, 0x23f3,
- 0x25fd, 0x25fe,
- 0x2614, 0x2615,
- 0x2648, 0x2653,
- 0x267f, 0x267f,
- 0x2693, 0x2693,
- 0x26a1, 0x26a1,
- 0x26aa, 0x26ab,
- 0x26bd, 0x26be,
- 0x26c4, 0x26c5,
- 0x26ce, 0x26ce,
- 0x26d4, 0x26d4,
- 0x26ea, 0x26ea,
- 0x26f2, 0x26f3,
- 0x26f5, 0x26f5,
- 0x26fa, 0x26fa,
- 0x26fd, 0x26fd,
- 0x2705, 0x2705,
- 0x270a, 0x270b,
- 0x2728, 0x2728,
- 0x274c, 0x274c,
- 0x274e, 0x274e,
- 0x2753, 0x2755,
- 0x2757, 0x2757,
- 0x2795, 0x2797,
- 0x27b0, 0x27b0,
- 0x27bf, 0x27bf,
- 0x2b1b, 0x2b1c,
- 0x2b50, 0x2b50,
- 0x2b55, 0x2b55,
- 0x1f004, 0x1f004,
- 0x1f0cf, 0x1f0cf,
- 0x1f18e, 0x1f18e,
- 0x1f191, 0x1f19a,
- 0x1f1e6, 0x1f1ff,
- 0x1f201, 0x1f201,
- 0x1f21a, 0x1f21a,
- 0x1f22f, 0x1f22f,
- 0x1f232, 0x1f236,
- 0x1f238, 0x1f23a,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f320,
- 0x1f32d, 0x1f335,
- 0x1f337, 0x1f37c,
- 0x1f37e, 0x1f393,
- 0x1f3a0, 0x1f3ca,
- 0x1f3cf, 0x1f3d3,
- 0x1f3e0, 0x1f3f0,
- 0x1f3f4, 0x1f3f4,
- 0x1f3f8, 0x1f43e,
- 0x1f440, 0x1f440,
- 0x1f442, 0x1f4fc,
- 0x1f4ff, 0x1f53d,
- 0x1f54b, 0x1f54e,
- 0x1f550, 0x1f567,
- 0x1f57a, 0x1f57a,
- 0x1f595, 0x1f596,
- 0x1f5a4, 0x1f5a4,
- 0x1f5fb, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f6cc, 0x1f6cc,
- 0x1f6d0, 0x1f6d2,
- 0x1f6d5, 0x1f6d5,
- 0x1f6eb, 0x1f6ec,
- 0x1f6f4, 0x1f6fa,
- 0x1f7e0, 0x1f7eb,
- 0x1f90d, 0x1f93a,
- 0x1f93c, 0x1f945,
- 0x1f947, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1f9ff,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
-}; /* CR_Emoji_Presentation */
-
-/* 'Emoji_Modifier': Emoji */
-static const OnigCodePoint CR_Emoji_Modifier[] = {
- 1,
- 0x1f3fb, 0x1f3ff,
-}; /* CR_Emoji_Modifier */
-
-/* 'Emoji_Modifier_Base': Emoji */
-static const OnigCodePoint CR_Emoji_Modifier_Base[] = {
- 36,
- 0x261d, 0x261d,
- 0x26f9, 0x26f9,
- 0x270a, 0x270d,
- 0x1f385, 0x1f385,
- 0x1f3c2, 0x1f3c4,
- 0x1f3c7, 0x1f3c7,
- 0x1f3ca, 0x1f3cc,
- 0x1f442, 0x1f443,
- 0x1f446, 0x1f450,
- 0x1f466, 0x1f478,
- 0x1f47c, 0x1f47c,
- 0x1f481, 0x1f483,
- 0x1f485, 0x1f487,
- 0x1f48f, 0x1f48f,
- 0x1f491, 0x1f491,
- 0x1f4aa, 0x1f4aa,
- 0x1f574, 0x1f575,
- 0x1f57a, 0x1f57a,
- 0x1f590, 0x1f590,
- 0x1f595, 0x1f596,
- 0x1f645, 0x1f647,
- 0x1f64b, 0x1f64f,
- 0x1f6a3, 0x1f6a3,
- 0x1f6b4, 0x1f6b6,
- 0x1f6c0, 0x1f6c0,
- 0x1f6cc, 0x1f6cc,
- 0x1f90f, 0x1f90f,
- 0x1f918, 0x1f91f,
- 0x1f926, 0x1f926,
- 0x1f930, 0x1f939,
- 0x1f93c, 0x1f93e,
- 0x1f9b5, 0x1f9b6,
- 0x1f9b8, 0x1f9b9,
- 0x1f9bb, 0x1f9bb,
- 0x1f9cd, 0x1f9cf,
- 0x1f9d1, 0x1f9dd,
-}; /* CR_Emoji_Modifier_Base */
-
-/* 'Emoji_Component': Emoji */
-static const OnigCodePoint CR_Emoji_Component[] = {
- 10,
- 0x0023, 0x0023,
- 0x002a, 0x002a,
- 0x0030, 0x0039,
- 0x200d, 0x200d,
- 0x20e3, 0x20e3,
- 0xfe0f, 0xfe0f,
- 0x1f1e6, 0x1f1ff,
- 0x1f3fb, 0x1f3ff,
- 0x1f9b0, 0x1f9b3,
- 0xe0020, 0xe007f,
-}; /* CR_Emoji_Component */
-
-/* 'Extended_Pictographic': Emoji */
-static const OnigCodePoint CR_Extended_Pictographic[] = {
- 77,
- 0x00a9, 0x00a9,
- 0x00ae, 0x00ae,
- 0x203c, 0x203c,
- 0x2049, 0x2049,
- 0x2122, 0x2122,
- 0x2139, 0x2139,
- 0x2194, 0x2199,
- 0x21a9, 0x21aa,
- 0x231a, 0x231b,
- 0x2328, 0x2328,
- 0x2388, 0x2388,
- 0x23cf, 0x23cf,
- 0x23e9, 0x23f3,
- 0x23f8, 0x23fa,
- 0x24c2, 0x24c2,
- 0x25aa, 0x25ab,
- 0x25b6, 0x25b6,
- 0x25c0, 0x25c0,
- 0x25fb, 0x25fe,
- 0x2600, 0x2605,
- 0x2607, 0x2612,
- 0x2614, 0x2685,
- 0x2690, 0x2705,
- 0x2708, 0x2712,
- 0x2714, 0x2714,
- 0x2716, 0x2716,
- 0x271d, 0x271d,
- 0x2721, 0x2721,
- 0x2728, 0x2728,
- 0x2733, 0x2734,
- 0x2744, 0x2744,
- 0x2747, 0x2747,
- 0x274c, 0x274c,
- 0x274e, 0x274e,
- 0x2753, 0x2755,
- 0x2757, 0x2757,
- 0x2763, 0x2767,
- 0x2795, 0x2797,
- 0x27a1, 0x27a1,
- 0x27b0, 0x27b0,
- 0x27bf, 0x27bf,
- 0x2934, 0x2935,
- 0x2b05, 0x2b07,
- 0x2b1b, 0x2b1c,
- 0x2b50, 0x2b50,
- 0x2b55, 0x2b55,
- 0x3030, 0x3030,
- 0x303d, 0x303d,
- 0x3297, 0x3297,
- 0x3299, 0x3299,
- 0x1f000, 0x1f0ff,
- 0x1f10d, 0x1f10f,
- 0x1f12f, 0x1f12f,
- 0x1f16c, 0x1f171,
- 0x1f17e, 0x1f17f,
- 0x1f18e, 0x1f18e,
- 0x1f191, 0x1f19a,
- 0x1f1ad, 0x1f1e5,
- 0x1f201, 0x1f20f,
- 0x1f21a, 0x1f21a,
- 0x1f22f, 0x1f22f,
- 0x1f232, 0x1f23a,
- 0x1f23c, 0x1f23f,
- 0x1f249, 0x1f3fa,
- 0x1f400, 0x1f53d,
- 0x1f546, 0x1f64f,
- 0x1f680, 0x1f6ff,
- 0x1f774, 0x1f77f,
- 0x1f7d5, 0x1f7ff,
- 0x1f80c, 0x1f80f,
- 0x1f848, 0x1f84f,
- 0x1f85a, 0x1f85f,
- 0x1f888, 0x1f88f,
- 0x1f8ae, 0x1f8ff,
- 0x1f90c, 0x1f93a,
- 0x1f93c, 0x1f945,
- 0x1f947, 0x1fffd,
-}; /* CR_Extended_Pictographic */
-
-/* 'Unknown': Script */
-static const OnigCodePoint CR_Unknown[] = {
- 664,
- 0x0378, 0x0379,
- 0x0380, 0x0383,
- 0x038b, 0x038b,
- 0x038d, 0x038d,
- 0x03a2, 0x03a2,
- 0x0530, 0x0530,
- 0x0557, 0x0558,
- 0x058b, 0x058c,
- 0x0590, 0x0590,
- 0x05c8, 0x05cf,
- 0x05eb, 0x05ee,
- 0x05f5, 0x05ff,
- 0x061d, 0x061d,
- 0x070e, 0x070e,
- 0x074b, 0x074c,
- 0x07b2, 0x07bf,
- 0x07fb, 0x07fc,
- 0x082e, 0x082f,
- 0x083f, 0x083f,
- 0x085c, 0x085d,
- 0x085f, 0x085f,
- 0x086b, 0x089f,
- 0x08b5, 0x08b5,
- 0x08be, 0x08d2,
- 0x0984, 0x0984,
- 0x098d, 0x098e,
- 0x0991, 0x0992,
- 0x09a9, 0x09a9,
- 0x09b1, 0x09b1,
- 0x09b3, 0x09b5,
- 0x09ba, 0x09bb,
- 0x09c5, 0x09c6,
- 0x09c9, 0x09ca,
- 0x09cf, 0x09d6,
- 0x09d8, 0x09db,
- 0x09de, 0x09de,
- 0x09e4, 0x09e5,
- 0x09ff, 0x0a00,
- 0x0a04, 0x0a04,
- 0x0a0b, 0x0a0e,
- 0x0a11, 0x0a12,
- 0x0a29, 0x0a29,
- 0x0a31, 0x0a31,
- 0x0a34, 0x0a34,
- 0x0a37, 0x0a37,
- 0x0a3a, 0x0a3b,
- 0x0a3d, 0x0a3d,
- 0x0a43, 0x0a46,
- 0x0a49, 0x0a4a,
- 0x0a4e, 0x0a50,
- 0x0a52, 0x0a58,
- 0x0a5d, 0x0a5d,
- 0x0a5f, 0x0a65,
- 0x0a77, 0x0a80,
- 0x0a84, 0x0a84,
- 0x0a8e, 0x0a8e,
- 0x0a92, 0x0a92,
- 0x0aa9, 0x0aa9,
- 0x0ab1, 0x0ab1,
- 0x0ab4, 0x0ab4,
- 0x0aba, 0x0abb,
- 0x0ac6, 0x0ac6,
- 0x0aca, 0x0aca,
- 0x0ace, 0x0acf,
- 0x0ad1, 0x0adf,
- 0x0ae4, 0x0ae5,
- 0x0af2, 0x0af8,
- 0x0b00, 0x0b00,
- 0x0b04, 0x0b04,
- 0x0b0d, 0x0b0e,
- 0x0b11, 0x0b12,
- 0x0b29, 0x0b29,
- 0x0b31, 0x0b31,
- 0x0b34, 0x0b34,
- 0x0b3a, 0x0b3b,
- 0x0b45, 0x0b46,
- 0x0b49, 0x0b4a,
- 0x0b4e, 0x0b55,
- 0x0b58, 0x0b5b,
- 0x0b5e, 0x0b5e,
- 0x0b64, 0x0b65,
- 0x0b78, 0x0b81,
- 0x0b84, 0x0b84,
- 0x0b8b, 0x0b8d,
- 0x0b91, 0x0b91,
- 0x0b96, 0x0b98,
- 0x0b9b, 0x0b9b,
- 0x0b9d, 0x0b9d,
- 0x0ba0, 0x0ba2,
- 0x0ba5, 0x0ba7,
- 0x0bab, 0x0bad,
- 0x0bba, 0x0bbd,
- 0x0bc3, 0x0bc5,
- 0x0bc9, 0x0bc9,
- 0x0bce, 0x0bcf,
- 0x0bd1, 0x0bd6,
- 0x0bd8, 0x0be5,
- 0x0bfb, 0x0bff,
- 0x0c0d, 0x0c0d,
- 0x0c11, 0x0c11,
- 0x0c29, 0x0c29,
- 0x0c3a, 0x0c3c,
- 0x0c45, 0x0c45,
- 0x0c49, 0x0c49,
- 0x0c4e, 0x0c54,
- 0x0c57, 0x0c57,
- 0x0c5b, 0x0c5f,
- 0x0c64, 0x0c65,
- 0x0c70, 0x0c76,
- 0x0c8d, 0x0c8d,
- 0x0c91, 0x0c91,
- 0x0ca9, 0x0ca9,
- 0x0cb4, 0x0cb4,
- 0x0cba, 0x0cbb,
- 0x0cc5, 0x0cc5,
- 0x0cc9, 0x0cc9,
- 0x0cce, 0x0cd4,
- 0x0cd7, 0x0cdd,
- 0x0cdf, 0x0cdf,
- 0x0ce4, 0x0ce5,
- 0x0cf0, 0x0cf0,
- 0x0cf3, 0x0cff,
- 0x0d04, 0x0d04,
- 0x0d0d, 0x0d0d,
- 0x0d11, 0x0d11,
- 0x0d45, 0x0d45,
- 0x0d49, 0x0d49,
- 0x0d50, 0x0d53,
- 0x0d64, 0x0d65,
- 0x0d80, 0x0d81,
- 0x0d84, 0x0d84,
- 0x0d97, 0x0d99,
- 0x0db2, 0x0db2,
- 0x0dbc, 0x0dbc,
- 0x0dbe, 0x0dbf,
- 0x0dc7, 0x0dc9,
- 0x0dcb, 0x0dce,
- 0x0dd5, 0x0dd5,
- 0x0dd7, 0x0dd7,
- 0x0de0, 0x0de5,
- 0x0df0, 0x0df1,
- 0x0df5, 0x0e00,
- 0x0e3b, 0x0e3e,
- 0x0e5c, 0x0e80,
- 0x0e83, 0x0e83,
- 0x0e85, 0x0e85,
- 0x0e8b, 0x0e8b,
- 0x0ea4, 0x0ea4,
- 0x0ea6, 0x0ea6,
- 0x0ebe, 0x0ebf,
- 0x0ec5, 0x0ec5,
- 0x0ec7, 0x0ec7,
- 0x0ece, 0x0ecf,
- 0x0eda, 0x0edb,
- 0x0ee0, 0x0eff,
- 0x0f48, 0x0f48,
- 0x0f6d, 0x0f70,
- 0x0f98, 0x0f98,
- 0x0fbd, 0x0fbd,
- 0x0fcd, 0x0fcd,
- 0x0fdb, 0x0fff,
- 0x10c6, 0x10c6,
- 0x10c8, 0x10cc,
- 0x10ce, 0x10cf,
- 0x1249, 0x1249,
- 0x124e, 0x124f,
- 0x1257, 0x1257,
- 0x1259, 0x1259,
- 0x125e, 0x125f,
- 0x1289, 0x1289,
- 0x128e, 0x128f,
- 0x12b1, 0x12b1,
- 0x12b6, 0x12b7,
- 0x12bf, 0x12bf,
- 0x12c1, 0x12c1,
- 0x12c6, 0x12c7,
- 0x12d7, 0x12d7,
- 0x1311, 0x1311,
- 0x1316, 0x1317,
- 0x135b, 0x135c,
- 0x137d, 0x137f,
- 0x139a, 0x139f,
- 0x13f6, 0x13f7,
- 0x13fe, 0x13ff,
- 0x169d, 0x169f,
- 0x16f9, 0x16ff,
- 0x170d, 0x170d,
- 0x1715, 0x171f,
- 0x1737, 0x173f,
- 0x1754, 0x175f,
- 0x176d, 0x176d,
- 0x1771, 0x1771,
- 0x1774, 0x177f,
- 0x17de, 0x17df,
- 0x17ea, 0x17ef,
- 0x17fa, 0x17ff,
- 0x180f, 0x180f,
- 0x181a, 0x181f,
- 0x1879, 0x187f,
- 0x18ab, 0x18af,
- 0x18f6, 0x18ff,
- 0x191f, 0x191f,
- 0x192c, 0x192f,
- 0x193c, 0x193f,
- 0x1941, 0x1943,
- 0x196e, 0x196f,
- 0x1975, 0x197f,
- 0x19ac, 0x19af,
- 0x19ca, 0x19cf,
- 0x19db, 0x19dd,
- 0x1a1c, 0x1a1d,
- 0x1a5f, 0x1a5f,
- 0x1a7d, 0x1a7e,
- 0x1a8a, 0x1a8f,
- 0x1a9a, 0x1a9f,
- 0x1aae, 0x1aaf,
- 0x1abf, 0x1aff,
- 0x1b4c, 0x1b4f,
- 0x1b7d, 0x1b7f,
- 0x1bf4, 0x1bfb,
- 0x1c38, 0x1c3a,
- 0x1c4a, 0x1c4c,
- 0x1c89, 0x1c8f,
- 0x1cbb, 0x1cbc,
- 0x1cc8, 0x1ccf,
- 0x1cfb, 0x1cff,
- 0x1dfa, 0x1dfa,
- 0x1f16, 0x1f17,
- 0x1f1e, 0x1f1f,
- 0x1f46, 0x1f47,
- 0x1f4e, 0x1f4f,
- 0x1f58, 0x1f58,
- 0x1f5a, 0x1f5a,
- 0x1f5c, 0x1f5c,
- 0x1f5e, 0x1f5e,
- 0x1f7e, 0x1f7f,
- 0x1fb5, 0x1fb5,
- 0x1fc5, 0x1fc5,
- 0x1fd4, 0x1fd5,
- 0x1fdc, 0x1fdc,
- 0x1ff0, 0x1ff1,
- 0x1ff5, 0x1ff5,
- 0x1fff, 0x1fff,
- 0x2065, 0x2065,
- 0x2072, 0x2073,
- 0x208f, 0x208f,
- 0x209d, 0x209f,
- 0x20c0, 0x20cf,
- 0x20f1, 0x20ff,
- 0x218c, 0x218f,
- 0x2427, 0x243f,
- 0x244b, 0x245f,
- 0x2b74, 0x2b75,
- 0x2b96, 0x2b97,
- 0x2c2f, 0x2c2f,
- 0x2c5f, 0x2c5f,
- 0x2cf4, 0x2cf8,
- 0x2d26, 0x2d26,
- 0x2d28, 0x2d2c,
- 0x2d2e, 0x2d2f,
- 0x2d68, 0x2d6e,
- 0x2d71, 0x2d7e,
- 0x2d97, 0x2d9f,
- 0x2da7, 0x2da7,
- 0x2daf, 0x2daf,
- 0x2db7, 0x2db7,
- 0x2dbf, 0x2dbf,
- 0x2dc7, 0x2dc7,
- 0x2dcf, 0x2dcf,
- 0x2dd7, 0x2dd7,
- 0x2ddf, 0x2ddf,
- 0x2e50, 0x2e7f,
- 0x2e9a, 0x2e9a,
- 0x2ef4, 0x2eff,
- 0x2fd6, 0x2fef,
- 0x2ffc, 0x2fff,
- 0x3040, 0x3040,
- 0x3097, 0x3098,
- 0x3100, 0x3104,
- 0x3130, 0x3130,
- 0x318f, 0x318f,
- 0x31bb, 0x31bf,
- 0x31e4, 0x31ef,
- 0x321f, 0x321f,
- 0x4db6, 0x4dbf,
- 0x9ff0, 0x9fff,
- 0xa48d, 0xa48f,
- 0xa4c7, 0xa4cf,
- 0xa62c, 0xa63f,
- 0xa6f8, 0xa6ff,
- 0xa7c0, 0xa7c1,
- 0xa7c7, 0xa7f6,
- 0xa82c, 0xa82f,
- 0xa83a, 0xa83f,
- 0xa878, 0xa87f,
- 0xa8c6, 0xa8cd,
- 0xa8da, 0xa8df,
- 0xa954, 0xa95e,
- 0xa97d, 0xa97f,
- 0xa9ce, 0xa9ce,
- 0xa9da, 0xa9dd,
- 0xa9ff, 0xa9ff,
- 0xaa37, 0xaa3f,
- 0xaa4e, 0xaa4f,
- 0xaa5a, 0xaa5b,
- 0xaac3, 0xaada,
- 0xaaf7, 0xab00,
- 0xab07, 0xab08,
- 0xab0f, 0xab10,
- 0xab17, 0xab1f,
- 0xab27, 0xab27,
- 0xab2f, 0xab2f,
- 0xab68, 0xab6f,
- 0xabee, 0xabef,
- 0xabfa, 0xabff,
- 0xd7a4, 0xd7af,
- 0xd7c7, 0xd7ca,
- 0xd7fc, 0xf8ff,
- 0xfa6e, 0xfa6f,
- 0xfada, 0xfaff,
- 0xfb07, 0xfb12,
- 0xfb18, 0xfb1c,
- 0xfb37, 0xfb37,
- 0xfb3d, 0xfb3d,
- 0xfb3f, 0xfb3f,
- 0xfb42, 0xfb42,
- 0xfb45, 0xfb45,
- 0xfbc2, 0xfbd2,
- 0xfd40, 0xfd4f,
- 0xfd90, 0xfd91,
- 0xfdc8, 0xfdef,
- 0xfdfe, 0xfdff,
- 0xfe1a, 0xfe1f,
- 0xfe53, 0xfe53,
- 0xfe67, 0xfe67,
- 0xfe6c, 0xfe6f,
- 0xfe75, 0xfe75,
- 0xfefd, 0xfefe,
- 0xff00, 0xff00,
- 0xffbf, 0xffc1,
- 0xffc8, 0xffc9,
- 0xffd0, 0xffd1,
- 0xffd8, 0xffd9,
- 0xffdd, 0xffdf,
- 0xffe7, 0xffe7,
- 0xffef, 0xfff8,
- 0xfffe, 0xffff,
- 0x1000c, 0x1000c,
- 0x10027, 0x10027,
- 0x1003b, 0x1003b,
- 0x1003e, 0x1003e,
- 0x1004e, 0x1004f,
- 0x1005e, 0x1007f,
- 0x100fb, 0x100ff,
- 0x10103, 0x10106,
- 0x10134, 0x10136,
- 0x1018f, 0x1018f,
- 0x1019c, 0x1019f,
- 0x101a1, 0x101cf,
- 0x101fe, 0x1027f,
- 0x1029d, 0x1029f,
- 0x102d1, 0x102df,
- 0x102fc, 0x102ff,
- 0x10324, 0x1032c,
- 0x1034b, 0x1034f,
- 0x1037b, 0x1037f,
- 0x1039e, 0x1039e,
- 0x103c4, 0x103c7,
- 0x103d6, 0x103ff,
- 0x1049e, 0x1049f,
- 0x104aa, 0x104af,
- 0x104d4, 0x104d7,
- 0x104fc, 0x104ff,
- 0x10528, 0x1052f,
- 0x10564, 0x1056e,
- 0x10570, 0x105ff,
- 0x10737, 0x1073f,
- 0x10756, 0x1075f,
- 0x10768, 0x107ff,
- 0x10806, 0x10807,
- 0x10809, 0x10809,
- 0x10836, 0x10836,
- 0x10839, 0x1083b,
- 0x1083d, 0x1083e,
- 0x10856, 0x10856,
- 0x1089f, 0x108a6,
- 0x108b0, 0x108df,
- 0x108f3, 0x108f3,
- 0x108f6, 0x108fa,
- 0x1091c, 0x1091e,
- 0x1093a, 0x1093e,
- 0x10940, 0x1097f,
- 0x109b8, 0x109bb,
- 0x109d0, 0x109d1,
- 0x10a04, 0x10a04,
- 0x10a07, 0x10a0b,
- 0x10a14, 0x10a14,
- 0x10a18, 0x10a18,
- 0x10a36, 0x10a37,
- 0x10a3b, 0x10a3e,
- 0x10a49, 0x10a4f,
- 0x10a59, 0x10a5f,
- 0x10aa0, 0x10abf,
- 0x10ae7, 0x10aea,
- 0x10af7, 0x10aff,
- 0x10b36, 0x10b38,
- 0x10b56, 0x10b57,
- 0x10b73, 0x10b77,
- 0x10b92, 0x10b98,
- 0x10b9d, 0x10ba8,
- 0x10bb0, 0x10bff,
- 0x10c49, 0x10c7f,
- 0x10cb3, 0x10cbf,
- 0x10cf3, 0x10cf9,
- 0x10d28, 0x10d2f,
- 0x10d3a, 0x10e5f,
- 0x10e7f, 0x10eff,
- 0x10f28, 0x10f2f,
- 0x10f5a, 0x10fdf,
- 0x10ff7, 0x10fff,
- 0x1104e, 0x11051,
- 0x11070, 0x1107e,
- 0x110c2, 0x110cc,
- 0x110ce, 0x110cf,
- 0x110e9, 0x110ef,
- 0x110fa, 0x110ff,
- 0x11135, 0x11135,
- 0x11147, 0x1114f,
- 0x11177, 0x1117f,
- 0x111ce, 0x111cf,
- 0x111e0, 0x111e0,
- 0x111f5, 0x111ff,
- 0x11212, 0x11212,
- 0x1123f, 0x1127f,
- 0x11287, 0x11287,
- 0x11289, 0x11289,
- 0x1128e, 0x1128e,
- 0x1129e, 0x1129e,
- 0x112aa, 0x112af,
- 0x112eb, 0x112ef,
- 0x112fa, 0x112ff,
- 0x11304, 0x11304,
- 0x1130d, 0x1130e,
- 0x11311, 0x11312,
- 0x11329, 0x11329,
- 0x11331, 0x11331,
- 0x11334, 0x11334,
- 0x1133a, 0x1133a,
- 0x11345, 0x11346,
- 0x11349, 0x1134a,
- 0x1134e, 0x1134f,
- 0x11351, 0x11356,
- 0x11358, 0x1135c,
- 0x11364, 0x11365,
- 0x1136d, 0x1136f,
- 0x11375, 0x113ff,
- 0x1145a, 0x1145a,
- 0x1145c, 0x1145c,
- 0x11460, 0x1147f,
- 0x114c8, 0x114cf,
- 0x114da, 0x1157f,
- 0x115b6, 0x115b7,
- 0x115de, 0x115ff,
- 0x11645, 0x1164f,
- 0x1165a, 0x1165f,
- 0x1166d, 0x1167f,
- 0x116b9, 0x116bf,
- 0x116ca, 0x116ff,
- 0x1171b, 0x1171c,
- 0x1172c, 0x1172f,
- 0x11740, 0x117ff,
- 0x1183c, 0x1189f,
- 0x118f3, 0x118fe,
- 0x11900, 0x1199f,
- 0x119a8, 0x119a9,
- 0x119d8, 0x119d9,
- 0x119e5, 0x119ff,
- 0x11a48, 0x11a4f,
- 0x11aa3, 0x11abf,
- 0x11af9, 0x11bff,
- 0x11c09, 0x11c09,
- 0x11c37, 0x11c37,
- 0x11c46, 0x11c4f,
- 0x11c6d, 0x11c6f,
- 0x11c90, 0x11c91,
- 0x11ca8, 0x11ca8,
- 0x11cb7, 0x11cff,
- 0x11d07, 0x11d07,
- 0x11d0a, 0x11d0a,
- 0x11d37, 0x11d39,
- 0x11d3b, 0x11d3b,
- 0x11d3e, 0x11d3e,
- 0x11d48, 0x11d4f,
- 0x11d5a, 0x11d5f,
- 0x11d66, 0x11d66,
- 0x11d69, 0x11d69,
- 0x11d8f, 0x11d8f,
- 0x11d92, 0x11d92,
- 0x11d99, 0x11d9f,
- 0x11daa, 0x11edf,
- 0x11ef9, 0x11fbf,
- 0x11ff2, 0x11ffe,
- 0x1239a, 0x123ff,
- 0x1246f, 0x1246f,
- 0x12475, 0x1247f,
- 0x12544, 0x12fff,
- 0x1342f, 0x1342f,
- 0x13439, 0x143ff,
- 0x14647, 0x167ff,
- 0x16a39, 0x16a3f,
- 0x16a5f, 0x16a5f,
- 0x16a6a, 0x16a6d,
- 0x16a70, 0x16acf,
- 0x16aee, 0x16aef,
- 0x16af6, 0x16aff,
- 0x16b46, 0x16b4f,
- 0x16b5a, 0x16b5a,
- 0x16b62, 0x16b62,
- 0x16b78, 0x16b7c,
- 0x16b90, 0x16e3f,
- 0x16e9b, 0x16eff,
- 0x16f4b, 0x16f4e,
- 0x16f88, 0x16f8e,
- 0x16fa0, 0x16fdf,
- 0x16fe4, 0x16fff,
- 0x187f8, 0x187ff,
- 0x18af3, 0x1afff,
- 0x1b11f, 0x1b14f,
- 0x1b153, 0x1b163,
- 0x1b168, 0x1b16f,
- 0x1b2fc, 0x1bbff,
- 0x1bc6b, 0x1bc6f,
- 0x1bc7d, 0x1bc7f,
- 0x1bc89, 0x1bc8f,
- 0x1bc9a, 0x1bc9b,
- 0x1bca4, 0x1cfff,
- 0x1d0f6, 0x1d0ff,
- 0x1d127, 0x1d128,
- 0x1d1e9, 0x1d1ff,
- 0x1d246, 0x1d2df,
- 0x1d2f4, 0x1d2ff,
- 0x1d357, 0x1d35f,
- 0x1d379, 0x1d3ff,
- 0x1d455, 0x1d455,
- 0x1d49d, 0x1d49d,
- 0x1d4a0, 0x1d4a1,
- 0x1d4a3, 0x1d4a4,
- 0x1d4a7, 0x1d4a8,
- 0x1d4ad, 0x1d4ad,
- 0x1d4ba, 0x1d4ba,
- 0x1d4bc, 0x1d4bc,
- 0x1d4c4, 0x1d4c4,
- 0x1d506, 0x1d506,
- 0x1d50b, 0x1d50c,
- 0x1d515, 0x1d515,
- 0x1d51d, 0x1d51d,
- 0x1d53a, 0x1d53a,
- 0x1d53f, 0x1d53f,
- 0x1d545, 0x1d545,
- 0x1d547, 0x1d549,
- 0x1d551, 0x1d551,
- 0x1d6a6, 0x1d6a7,
- 0x1d7cc, 0x1d7cd,
- 0x1da8c, 0x1da9a,
- 0x1daa0, 0x1daa0,
- 0x1dab0, 0x1dfff,
- 0x1e007, 0x1e007,
- 0x1e019, 0x1e01a,
- 0x1e022, 0x1e022,
- 0x1e025, 0x1e025,
- 0x1e02b, 0x1e0ff,
- 0x1e12d, 0x1e12f,
- 0x1e13e, 0x1e13f,
- 0x1e14a, 0x1e14d,
- 0x1e150, 0x1e2bf,
- 0x1e2fa, 0x1e2fe,
- 0x1e300, 0x1e7ff,
- 0x1e8c5, 0x1e8c6,
- 0x1e8d7, 0x1e8ff,
- 0x1e94c, 0x1e94f,
- 0x1e95a, 0x1e95d,
- 0x1e960, 0x1ec70,
- 0x1ecb5, 0x1ed00,
- 0x1ed3e, 0x1edff,
- 0x1ee04, 0x1ee04,
- 0x1ee20, 0x1ee20,
- 0x1ee23, 0x1ee23,
- 0x1ee25, 0x1ee26,
- 0x1ee28, 0x1ee28,
- 0x1ee33, 0x1ee33,
- 0x1ee38, 0x1ee38,
- 0x1ee3a, 0x1ee3a,
- 0x1ee3c, 0x1ee41,
- 0x1ee43, 0x1ee46,
- 0x1ee48, 0x1ee48,
- 0x1ee4a, 0x1ee4a,
- 0x1ee4c, 0x1ee4c,
- 0x1ee50, 0x1ee50,
- 0x1ee53, 0x1ee53,
- 0x1ee55, 0x1ee56,
- 0x1ee58, 0x1ee58,
- 0x1ee5a, 0x1ee5a,
- 0x1ee5c, 0x1ee5c,
- 0x1ee5e, 0x1ee5e,
- 0x1ee60, 0x1ee60,
- 0x1ee63, 0x1ee63,
- 0x1ee65, 0x1ee66,
- 0x1ee6b, 0x1ee6b,
- 0x1ee73, 0x1ee73,
- 0x1ee78, 0x1ee78,
- 0x1ee7d, 0x1ee7d,
- 0x1ee7f, 0x1ee7f,
- 0x1ee8a, 0x1ee8a,
- 0x1ee9c, 0x1eea0,
- 0x1eea4, 0x1eea4,
- 0x1eeaa, 0x1eeaa,
- 0x1eebc, 0x1eeef,
- 0x1eef2, 0x1efff,
- 0x1f02c, 0x1f02f,
- 0x1f094, 0x1f09f,
- 0x1f0af, 0x1f0b0,
- 0x1f0c0, 0x1f0c0,
- 0x1f0d0, 0x1f0d0,
- 0x1f0f6, 0x1f0ff,
- 0x1f10d, 0x1f10f,
- 0x1f16d, 0x1f16f,
- 0x1f1ad, 0x1f1e5,
- 0x1f203, 0x1f20f,
- 0x1f23c, 0x1f23f,
- 0x1f249, 0x1f24f,
- 0x1f252, 0x1f25f,
- 0x1f266, 0x1f2ff,
- 0x1f6d6, 0x1f6df,
- 0x1f6ed, 0x1f6ef,
- 0x1f6fb, 0x1f6ff,
- 0x1f774, 0x1f77f,
- 0x1f7d9, 0x1f7df,
- 0x1f7ec, 0x1f7ff,
- 0x1f80c, 0x1f80f,
- 0x1f848, 0x1f84f,
- 0x1f85a, 0x1f85f,
- 0x1f888, 0x1f88f,
- 0x1f8ae, 0x1f8ff,
- 0x1f90c, 0x1f90c,
- 0x1f972, 0x1f972,
- 0x1f977, 0x1f979,
- 0x1f9a3, 0x1f9a4,
- 0x1f9ab, 0x1f9ad,
- 0x1f9cb, 0x1f9cc,
- 0x1fa54, 0x1fa5f,
- 0x1fa6e, 0x1fa6f,
- 0x1fa74, 0x1fa77,
- 0x1fa7b, 0x1fa7f,
- 0x1fa83, 0x1fa8f,
- 0x1fa96, 0x1ffff,
- 0x2a6d7, 0x2a6ff,
- 0x2b735, 0x2b73f,
- 0x2b81e, 0x2b81f,
- 0x2cea2, 0x2ceaf,
- 0x2ebe1, 0x2f7ff,
- 0x2fa1e, 0xe0000,
- 0xe0002, 0xe001f,
- 0xe0080, 0xe00ff,
- 0xe01f0, 0x10ffff,
-}; /* CR_Unknown */
-
-#ifdef USE_UNICODE_AGE_PROPERTIES
-/* 'Age_1_1': Derived Age 1.1 */
-static const OnigCodePoint CR_Age_1_1[] = {
- 288,
- 0x0000, 0x01f5,
- 0x01fa, 0x0217,
- 0x0250, 0x02a8,
- 0x02b0, 0x02de,
- 0x02e0, 0x02e9,
- 0x0300, 0x0345,
- 0x0360, 0x0361,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03d6,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03f3,
- 0x0401, 0x040c,
- 0x040e, 0x044f,
- 0x0451, 0x045c,
- 0x045e, 0x0486,
- 0x0490, 0x04c4,
- 0x04c7, 0x04c8,
- 0x04cb, 0x04cc,
- 0x04d0, 0x04eb,
- 0x04ee, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x0589,
- 0x05b0, 0x05b9,
- 0x05bb, 0x05c3,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0652,
- 0x0660, 0x066d,
- 0x0670, 0x06b7,
- 0x06ba, 0x06be,
- 0x06c0, 0x06ce,
- 0x06d0, 0x06ed,
- 0x06f0, 0x06f9,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f6,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1e00, 0x1e9a,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x202e,
- 0x2030, 0x2046,
- 0x206a, 0x2070,
- 0x2074, 0x208e,
- 0x20a0, 0x20aa,
- 0x20d0, 0x20e1,
- 0x2100, 0x2138,
- 0x2153, 0x2182,
- 0x2190, 0x21ea,
- 0x2200, 0x22f1,
- 0x2300, 0x2300,
- 0x2302, 0x237a,
- 0x2400, 0x2424,
- 0x2440, 0x244a,
- 0x2460, 0x24ea,
- 0x2500, 0x2595,
- 0x25a0, 0x25ef,
- 0x2600, 0x2613,
- 0x261a, 0x266f,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2767,
- 0x2776, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x3000, 0x3037,
- 0x303f, 0x303f,
- 0x3041, 0x3094,
- 0x3099, 0x309e,
- 0x30a1, 0x30fe,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x319f,
- 0x3200, 0x321c,
- 0x3220, 0x3243,
- 0x3260, 0x327b,
- 0x327f, 0x32b0,
- 0x32c0, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x4e00, 0x9fa5,
- 0xe000, 0xfa2d,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1e, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe44,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe72,
- 0xfe74, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xff5e,
- 0xff61, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfffd, 0xffff,
-}; /* CR_Age_1_1 */
-
-/* 'Age_2_0': Derived Age 2.0 */
-static const OnigCodePoint CR_Age_2_0[] = {
- 312,
- 0x0000, 0x01f5,
- 0x01fa, 0x0217,
- 0x0250, 0x02a8,
- 0x02b0, 0x02de,
- 0x02e0, 0x02e9,
- 0x0300, 0x0345,
- 0x0360, 0x0361,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03d6,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03f3,
- 0x0401, 0x040c,
- 0x040e, 0x044f,
- 0x0451, 0x045c,
- 0x045e, 0x0486,
- 0x0490, 0x04c4,
- 0x04c7, 0x04c8,
- 0x04cb, 0x04cc,
- 0x04d0, 0x04eb,
- 0x04ee, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x0589,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0652,
- 0x0660, 0x066d,
- 0x0670, 0x06b7,
- 0x06ba, 0x06be,
- 0x06c0, 0x06ce,
- 0x06d0, 0x06ed,
- 0x06f0, 0x06f9,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f69,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f95,
- 0x0f97, 0x0f97,
- 0x0f99, 0x0fad,
- 0x0fb1, 0x0fb7,
- 0x0fb9, 0x0fb9,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f6,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x202e,
- 0x2030, 0x2046,
- 0x206a, 0x2070,
- 0x2074, 0x208e,
- 0x20a0, 0x20ab,
- 0x20d0, 0x20e1,
- 0x2100, 0x2138,
- 0x2153, 0x2182,
- 0x2190, 0x21ea,
- 0x2200, 0x22f1,
- 0x2300, 0x2300,
- 0x2302, 0x237a,
- 0x2400, 0x2424,
- 0x2440, 0x244a,
- 0x2460, 0x24ea,
- 0x2500, 0x2595,
- 0x25a0, 0x25ef,
- 0x2600, 0x2613,
- 0x261a, 0x266f,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2767,
- 0x2776, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x3000, 0x3037,
- 0x303f, 0x303f,
- 0x3041, 0x3094,
- 0x3099, 0x309e,
- 0x30a1, 0x30fe,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x319f,
- 0x3200, 0x321c,
- 0x3220, 0x3243,
- 0x3260, 0x327b,
- 0x327f, 0x32b0,
- 0x32c0, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x4e00, 0x9fa5,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1e, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe44,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe72,
- 0xfe74, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xff5e,
- 0xff61, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfffd, 0xffff,
- 0x1fffe, 0x1ffff,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_2_0 */
-
-/* 'Age_2_1': Derived Age 2.1 */
-static const OnigCodePoint CR_Age_2_1[] = {
- 312,
- 0x0000, 0x01f5,
- 0x01fa, 0x0217,
- 0x0250, 0x02a8,
- 0x02b0, 0x02de,
- 0x02e0, 0x02e9,
- 0x0300, 0x0345,
- 0x0360, 0x0361,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03d6,
- 0x03da, 0x03da,
- 0x03dc, 0x03dc,
- 0x03de, 0x03de,
- 0x03e0, 0x03e0,
- 0x03e2, 0x03f3,
- 0x0401, 0x040c,
- 0x040e, 0x044f,
- 0x0451, 0x045c,
- 0x045e, 0x0486,
- 0x0490, 0x04c4,
- 0x04c7, 0x04c8,
- 0x04cb, 0x04cc,
- 0x04d0, 0x04eb,
- 0x04ee, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x0589,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0652,
- 0x0660, 0x066d,
- 0x0670, 0x06b7,
- 0x06ba, 0x06be,
- 0x06c0, 0x06ce,
- 0x06d0, 0x06ed,
- 0x06f0, 0x06f9,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f69,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f95,
- 0x0f97, 0x0f97,
- 0x0f99, 0x0fad,
- 0x0fb1, 0x0fb7,
- 0x0fb9, 0x0fb9,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f6,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x202e,
- 0x2030, 0x2046,
- 0x206a, 0x2070,
- 0x2074, 0x208e,
- 0x20a0, 0x20ac,
- 0x20d0, 0x20e1,
- 0x2100, 0x2138,
- 0x2153, 0x2182,
- 0x2190, 0x21ea,
- 0x2200, 0x22f1,
- 0x2300, 0x2300,
- 0x2302, 0x237a,
- 0x2400, 0x2424,
- 0x2440, 0x244a,
- 0x2460, 0x24ea,
- 0x2500, 0x2595,
- 0x25a0, 0x25ef,
- 0x2600, 0x2613,
- 0x261a, 0x266f,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2767,
- 0x2776, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x3000, 0x3037,
- 0x303f, 0x303f,
- 0x3041, 0x3094,
- 0x3099, 0x309e,
- 0x30a1, 0x30fe,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x319f,
- 0x3200, 0x321c,
- 0x3220, 0x3243,
- 0x3260, 0x327b,
- 0x327f, 0x32b0,
- 0x32c0, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x4e00, 0x9fa5,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1e, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe44,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe72,
- 0xfe74, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xff5e,
- 0xff61, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfffc, 0xffff,
- 0x1fffe, 0x1ffff,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_2_1 */
-
-/* 'Age_3_0': Derived Age 3.0 */
-static const OnigCodePoint CR_Age_3_0[] = {
- 369,
- 0x0000, 0x021f,
- 0x0222, 0x0233,
- 0x0250, 0x02ad,
- 0x02b0, 0x02ee,
- 0x0300, 0x034e,
- 0x0360, 0x0362,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03d7,
- 0x03da, 0x03f3,
- 0x0400, 0x0486,
- 0x0488, 0x0489,
- 0x048c, 0x04c4,
- 0x04c7, 0x04c8,
- 0x04cb, 0x04cc,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0655,
- 0x0660, 0x066d,
- 0x0670, 0x06ed,
- 0x06f0, 0x06fe,
- 0x0700, 0x070d,
- 0x070f, 0x072c,
- 0x0730, 0x074a,
- 0x0780, 0x07b0,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f6,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1780, 0x17dc,
- 0x17e0, 0x17e9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2046,
- 0x2048, 0x204d,
- 0x206a, 0x2070,
- 0x2074, 0x208e,
- 0x20a0, 0x20af,
- 0x20d0, 0x20e3,
- 0x2100, 0x213a,
- 0x2153, 0x2183,
- 0x2190, 0x21f3,
- 0x2200, 0x22f1,
- 0x2300, 0x237b,
- 0x237d, 0x239a,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x24ea,
- 0x2500, 0x2595,
- 0x25a0, 0x25f7,
- 0x2600, 0x2613,
- 0x2619, 0x2671,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2767,
- 0x2776, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x2800, 0x28ff,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303a,
- 0x303e, 0x303f,
- 0x3041, 0x3094,
- 0x3099, 0x309e,
- 0x30a1, 0x30fe,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x3200, 0x321c,
- 0x3220, 0x3243,
- 0x3260, 0x327b,
- 0x327f, 0x32b0,
- 0x32c0, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4a1,
- 0xa4a4, 0xa4b3,
- 0xa4b5, 0xa4c0,
- 0xa4c2, 0xa4c4,
- 0xa4c6, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdf0, 0xfdfb,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe44,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe72,
- 0xfe74, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xff5e,
- 0xff61, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xffff,
- 0x1fffe, 0x1ffff,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_3_0 */
-
-/* 'Age_3_1': Derived Age 3.1 */
-static const OnigCodePoint CR_Age_3_1[] = {
- 402,
- 0x0000, 0x021f,
- 0x0222, 0x0233,
- 0x0250, 0x02ad,
- 0x02b0, 0x02ee,
- 0x0300, 0x034e,
- 0x0360, 0x0362,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03d7,
- 0x03da, 0x03f5,
- 0x0400, 0x0486,
- 0x0488, 0x0489,
- 0x048c, 0x04c4,
- 0x04c7, 0x04c8,
- 0x04cb, 0x04cc,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0655,
- 0x0660, 0x066d,
- 0x0670, 0x06ed,
- 0x06f0, 0x06fe,
- 0x0700, 0x070d,
- 0x070f, 0x072c,
- 0x0730, 0x074a,
- 0x0780, 0x07b0,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f6,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1780, 0x17dc,
- 0x17e0, 0x17e9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2046,
- 0x2048, 0x204d,
- 0x206a, 0x2070,
- 0x2074, 0x208e,
- 0x20a0, 0x20af,
- 0x20d0, 0x20e3,
- 0x2100, 0x213a,
- 0x2153, 0x2183,
- 0x2190, 0x21f3,
- 0x2200, 0x22f1,
- 0x2300, 0x237b,
- 0x237d, 0x239a,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x24ea,
- 0x2500, 0x2595,
- 0x25a0, 0x25f7,
- 0x2600, 0x2613,
- 0x2619, 0x2671,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2767,
- 0x2776, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x2800, 0x28ff,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303a,
- 0x303e, 0x303f,
- 0x3041, 0x3094,
- 0x3099, 0x309e,
- 0x30a1, 0x30fe,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x3200, 0x321c,
- 0x3220, 0x3243,
- 0x3260, 0x327b,
- 0x327f, 0x32b0,
- 0x32c0, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4a1,
- 0xa4a4, 0xa4b3,
- 0xa4b5, 0xa4c0,
- 0xa4c2, 0xa4c4,
- 0xa4c6, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfb,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe44,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe72,
- 0xfe74, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xff5e,
- 0xff61, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xffff,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10400, 0x10425,
- 0x10428, 0x1044d,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c0,
- 0x1d4c2, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_3_1 */
-
-/* 'Age_3_2': Derived Age 3.2 */
-static const OnigCodePoint CR_Age_3_2[] = {
- 397,
- 0x0000, 0x0220,
- 0x0222, 0x0233,
- 0x0250, 0x02ad,
- 0x02b0, 0x02ee,
- 0x0300, 0x034f,
- 0x0360, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03f6,
- 0x0400, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x060c, 0x060c,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0655,
- 0x0660, 0x06ed,
- 0x06f0, 0x06fe,
- 0x0700, 0x070d,
- 0x070f, 0x072c,
- 0x0730, 0x074a,
- 0x0780, 0x07b1,
- 0x0901, 0x0903,
- 0x0905, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09bc,
- 0x09be, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a02, 0x0a02,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8b,
- 0x0a8d, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae0,
- 0x0ae6, 0x0aef,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b36, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b70,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bf2,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbe, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dc,
- 0x17e0, 0x17e9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2052,
- 0x2057, 0x2057,
- 0x205f, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213a,
- 0x213d, 0x214b,
- 0x2153, 0x2183,
- 0x2190, 0x23ce,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x24fe,
- 0x2500, 0x2613,
- 0x2616, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2689,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2aff,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31f0, 0x321c,
- 0x3220, 0x3243,
- 0x3251, 0x327b,
- 0x327f, 0x32cb,
- 0x32d0, 0x32fe,
- 0x3300, 0x3376,
- 0x337b, 0x33dd,
- 0x33e0, 0x33fe,
- 0x3400, 0x4db5,
- 0x4e00, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfc,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe46,
- 0xfe49, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0xffff,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10400, 0x10425,
- 0x10428, 0x1044d,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c0,
- 0x1d4c2, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_3_2 */
-
-/* 'Age_4_0': Derived Age 4.0 */
-static const OnigCodePoint CR_Age_4_0[] = {
- 412,
- 0x0000, 0x0236,
- 0x0250, 0x0357,
- 0x035d, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x03fb,
- 0x0400, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f5,
- 0x04f8, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05a1,
- 0x05a3, 0x05b9,
- 0x05bb, 0x05c4,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x060c, 0x0615,
- 0x061b, 0x061b,
- 0x061f, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x0658,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x074f,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb5,
- 0x0bb7, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be7, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fcf,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10f8,
- 0x10fb, 0x10fb,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1206,
- 0x1208, 0x1246,
- 0x1248, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1286,
- 0x1288, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12ae,
- 0x12b0, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12ce,
- 0x12d0, 0x12d6,
- 0x12d8, 0x12ee,
- 0x12f0, 0x130e,
- 0x1310, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x131e,
- 0x1320, 0x1346,
- 0x1348, 0x135a,
- 0x1361, 0x137c,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x19e0, 0x19ff,
- 0x1d00, 0x1d6b,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2054,
- 0x2057, 0x2057,
- 0x205f, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x20a0, 0x20b1,
- 0x20d0, 0x20ea,
- 0x2100, 0x213b,
- 0x213d, 0x214b,
- 0x2153, 0x2183,
- 0x2190, 0x23d0,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2617,
- 0x2619, 0x267d,
- 0x2680, 0x2691,
- 0x26a0, 0x26a1,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2b0d,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x327d,
- 0x327f, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fa5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1013f,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x1039f,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d300, 0x1d356,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a3,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_4_0 */
-
-/* 'Age_4_1': Derived Age 4.1 */
-static const OnigCodePoint CR_Age_4_1[] = {
- 430,
- 0x0000, 0x0241,
- 0x0250, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037a,
- 0x037e, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x0486,
- 0x0488, 0x04ce,
- 0x04d0, 0x04f9,
- 0x0500, 0x050f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05b9,
- 0x05bb, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x060b, 0x0615,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x065e,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x076d,
- 0x0780, 0x07b1,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x097d, 0x097d,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce1,
- 0x0ce6, 0x0cef,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fd1,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10fc,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135f, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19a9,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19d9,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a1f,
- 0x1d00, 0x1dc3,
- 0x1e00, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x2094,
- 0x20a0, 0x20b5,
- 0x20d0, 0x20eb,
- 0x2100, 0x214c,
- 0x2153, 0x2183,
- 0x2190, 0x23db,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x269c,
- 0x26a0, 0x26b1,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27c0, 0x27c6,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2b13,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c80, 0x2cea,
- 0x2cf9, 0x2d25,
- 0x2d30, 0x2d65,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2e00, 0x2e17,
- 0x2e1c, 0x2e1d,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31c0, 0x31cf,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fbb,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa700, 0xa716,
- 0xa800, 0xa82b,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7c9,
- 0x1d7ce, 0x1d7ff,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_4_1 */
-
-/* 'Age_5_0': Derived Age 5.0 */
-static const OnigCodePoint CR_Age_5_0[] = {
- 440,
- 0x0000, 0x036f,
- 0x0374, 0x0375,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x03ce,
- 0x03d0, 0x0486,
- 0x0488, 0x0513,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x060b, 0x0615,
- 0x061b, 0x061b,
- 0x061e, 0x061f,
- 0x0621, 0x063a,
- 0x0640, 0x065e,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x076d,
- 0x0780, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0970,
- 0x097b, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a74,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b43,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b61,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3e, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c60, 0x0c61,
- 0x0c66, 0x0c6f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3e, 0x0d43,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d61,
- 0x0d66, 0x0d6f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6a,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fcf, 0x0fd1,
- 0x1000, 0x1021,
- 0x1023, 0x1027,
- 0x1029, 0x102a,
- 0x102c, 0x1032,
- 0x1036, 0x1039,
- 0x1040, 0x1059,
- 0x10a0, 0x10c5,
- 0x10d0, 0x10fc,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135f, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18a9,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19a9,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19d9,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a1f,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1d00, 0x1dca,
- 0x1dfe, 0x1e9b,
- 0x1ea0, 0x1ef9,
- 0x1f00, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2063,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x2094,
- 0x20a0, 0x20b5,
- 0x20d0, 0x20ef,
- 0x2100, 0x214e,
- 0x2153, 0x2184,
- 0x2190, 0x23e7,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x269c,
- 0x26a0, 0x26b2,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27c0, 0x27ca,
- 0x27d0, 0x27eb,
- 0x27f0, 0x2b1a,
- 0x2b20, 0x2b23,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2c6c,
- 0x2c74, 0x2c77,
- 0x2c80, 0x2cea,
- 0x2cf9, 0x2d25,
- 0x2d30, 0x2d65,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2e00, 0x2e17,
- 0x2e1c, 0x2e1d,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312c,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31c0, 0x31cf,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fbb,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa700, 0xa71a,
- 0xa720, 0xa721,
- 0xa800, 0xa82b,
- 0xa840, 0xa877,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe23,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x10900, 0x10919,
- 0x1091f, 0x1091f,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d12a, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_5_0 */
-
-/* 'Age_5_1': Derived Age 5.1 */
-static const OnigCodePoint CR_Age_5_1[] = {
- 455,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0523,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x0606, 0x061b,
- 0x061e, 0x061f,
- 0x0621, 0x065e,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0901, 0x0939,
- 0x093c, 0x094d,
- 0x0950, 0x0954,
- 0x0958, 0x0972,
- 0x097b, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fa,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fd4,
- 0x1000, 0x1099,
- 0x109e, 0x10c5,
- 0x10d0, 0x10fc,
- 0x1100, 0x1159,
- 0x115f, 0x11a2,
- 0x11a8, 0x11f9,
- 0x1200, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135f, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1401, 0x1676,
- 0x1680, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19a9,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19d9,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a1f,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1baa,
- 0x1bae, 0x1bb9,
- 0x1c00, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1d00, 0x1de6,
- 0x1dfe, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x2094,
- 0x20a0, 0x20b5,
- 0x20d0, 0x20f0,
- 0x2100, 0x214f,
- 0x2153, 0x2188,
- 0x2190, 0x23e7,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x269d,
- 0x26a0, 0x26bc,
- 0x26c0, 0x26c3,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x2756,
- 0x2758, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27c0, 0x27ca,
- 0x27cc, 0x27cc,
- 0x27d0, 0x2b4c,
- 0x2b50, 0x2b54,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2c6f,
- 0x2c71, 0x2c7d,
- 0x2c80, 0x2cea,
- 0x2cf9, 0x2d25,
- 0x2d30, 0x2d65,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e30,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x3243,
- 0x3250, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fc3,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa500, 0xa62b,
- 0xa640, 0xa65f,
- 0xa662, 0xa673,
- 0xa67c, 0xa697,
- 0xa700, 0xa78c,
- 0xa7fb, 0xa82b,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa900, 0xa953,
- 0xa95f, 0xa95f,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa5f,
- 0xac00, 0xd7a3,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6a,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x1083f,
- 0x10900, 0x10919,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1fffe, 0x2a6d6,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_5_1 */
-
-/* 'Age_5_2': Derived Age 5.2 */
-static const OnigCodePoint CR_Age_5_2[] = {
- 495,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0525,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x0606, 0x061b,
- 0x061e, 0x061f,
- 0x0621, 0x065e,
- 0x0660, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0900, 0x0939,
- 0x093c, 0x094e,
- 0x0950, 0x0955,
- 0x0958, 0x0972,
- 0x0979, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b71,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d28,
- 0x0d2a, 0x0d39,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f8b,
- 0x0f90, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fd8,
- 0x1000, 0x10c5,
- 0x10d0, 0x10fc,
- 0x1100, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135f, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1baa,
- 0x1bae, 0x1bb9,
- 0x1c00, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cd0, 0x1cf2,
- 0x1d00, 0x1de6,
- 0x1dfd, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x2094,
- 0x20a0, 0x20b8,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23e8,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x26cd,
- 0x26cf, 0x26e1,
- 0x26e3, 0x26e3,
- 0x26e8, 0x26ff,
- 0x2701, 0x2704,
- 0x2706, 0x2709,
- 0x270c, 0x2727,
- 0x2729, 0x274b,
- 0x274d, 0x274d,
- 0x274f, 0x2752,
- 0x2756, 0x275e,
- 0x2761, 0x2794,
- 0x2798, 0x27af,
- 0x27b1, 0x27be,
- 0x27c0, 0x27ca,
- 0x27cc, 0x27cc,
- 0x27d0, 0x2b4c,
- 0x2b50, 0x2b59,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf1,
- 0x2cf9, 0x2d25,
- 0x2d30, 0x2d65,
- 0x2d6f, 0x2d6f,
- 0x2d80, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e31,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31b7,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcb,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa65f,
- 0xa662, 0xa673,
- 0xa67c, 0xa697,
- 0xa6a0, 0xa6f7,
- 0xa700, 0xa78c,
- 0xa7fb, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9df,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaadf,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbb1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1085f,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a7f,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b7f,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11080, 0x110c1,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x13000, 0x1342e,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f100, 0x1f10a,
- 0x1f110, 0x1f12e,
- 0x1f131, 0x1f131,
- 0x1f13d, 0x1f13d,
- 0x1f13f, 0x1f13f,
- 0x1f142, 0x1f142,
- 0x1f146, 0x1f146,
- 0x1f14a, 0x1f14e,
- 0x1f157, 0x1f157,
- 0x1f15f, 0x1f15f,
- 0x1f179, 0x1f179,
- 0x1f17b, 0x1f17c,
- 0x1f17f, 0x1f17f,
- 0x1f18a, 0x1f18d,
- 0x1f190, 0x1f190,
- 0x1f200, 0x1f200,
- 0x1f210, 0x1f231,
- 0x1f240, 0x1f248,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_5_2 */
-
-/* 'Age_6_0': Derived Age 6.0 */
-static const OnigCodePoint CR_Age_6_0[] = {
- 511,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0527,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0603,
- 0x0606, 0x061b,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0900, 0x0977,
- 0x0979, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0aef,
- 0x0af1, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edd,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10d0, 0x10fc,
- 0x1100, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1baa,
- 0x1bae, 0x1bb9,
- 0x1bc0, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cd0, 0x1cf2,
- 0x1d00, 0x1de6,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20b9,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23f3,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x26ff,
- 0x2701, 0x27ca,
- 0x27cc, 0x27cc,
- 0x27ce, 0x2b4c,
- 0x2b50, 0x2b59,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf1,
- 0x2cf9, 0x2d25,
- 0x2d30, 0x2d65,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e31,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcb,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa673,
- 0xa67c, 0xa697,
- 0xa6a0, 0xa6f7,
- 0xa700, 0xa78e,
- 0xa790, 0xa791,
- 0xa7a0, 0xa7a9,
- 0xa7fa, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9df,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaadf,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa2d,
- 0xfa30, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1085f,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a7f,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b7f,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x11080, 0x110c1,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x13000, 0x1342e,
- 0x16800, 0x16a38,
- 0x1b000, 0x1b001,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0be,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0df,
- 0x1f100, 0x1f10a,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f169,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f320,
- 0x1f330, 0x1f335,
- 0x1f337, 0x1f37c,
- 0x1f380, 0x1f393,
- 0x1f3a0, 0x1f3c4,
- 0x1f3c6, 0x1f3ca,
- 0x1f3e0, 0x1f3f0,
- 0x1f400, 0x1f43e,
- 0x1f440, 0x1f440,
- 0x1f442, 0x1f4f7,
- 0x1f4f9, 0x1f4fc,
- 0x1f500, 0x1f53d,
- 0x1f550, 0x1f567,
- 0x1f5fb, 0x1f5ff,
- 0x1f601, 0x1f610,
- 0x1f612, 0x1f614,
- 0x1f616, 0x1f616,
- 0x1f618, 0x1f618,
- 0x1f61a, 0x1f61a,
- 0x1f61c, 0x1f61e,
- 0x1f620, 0x1f625,
- 0x1f628, 0x1f62b,
- 0x1f62d, 0x1f62d,
- 0x1f630, 0x1f633,
- 0x1f635, 0x1f640,
- 0x1f645, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f700, 0x1f773,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_6_0 */
-
-/* 'Age_6_1': Derived Age 6.1 */
-static const OnigCodePoint CR_Age_6_1[] = {
- 549,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0527,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058f, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0604,
- 0x0606, 0x061b,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08a0,
- 0x08a2, 0x08ac,
- 0x08e4, 0x08fe,
- 0x0900, 0x0977,
- 0x0979, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1d00, 0x1de6,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20b9,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23f3,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x26ff,
- 0x2701, 0x2b4c,
- 0x2b50, 0x2b59,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e3b,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcc,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa697,
- 0xa69f, 0xa6f7,
- 0xa700, 0xa78e,
- 0xa790, 0xa793,
- 0xa7a0, 0xa7aa,
- 0xa7f8, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9df,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1085f,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a7f,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b7f,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x11080, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11180, 0x111c8,
- 0x111d0, 0x111d9,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x13000, 0x1342e,
- 0x16800, 0x16a38,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x1b000, 0x1b001,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0be,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0df,
- 0x1f100, 0x1f10a,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f320,
- 0x1f330, 0x1f335,
- 0x1f337, 0x1f37c,
- 0x1f380, 0x1f393,
- 0x1f3a0, 0x1f3c4,
- 0x1f3c6, 0x1f3ca,
- 0x1f3e0, 0x1f3f0,
- 0x1f400, 0x1f43e,
- 0x1f440, 0x1f440,
- 0x1f442, 0x1f4f7,
- 0x1f4f9, 0x1f4fc,
- 0x1f500, 0x1f53d,
- 0x1f540, 0x1f543,
- 0x1f550, 0x1f567,
- 0x1f5fb, 0x1f640,
- 0x1f645, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f700, 0x1f773,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_6_1 */
-
-/* 'Age_6_2': Derived Age 6.2 */
-static const OnigCodePoint CR_Age_6_2[] = {
- 549,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0527,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058f, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0604,
- 0x0606, 0x061b,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08a0,
- 0x08a2, 0x08ac,
- 0x08e4, 0x08fe,
- 0x0900, 0x0977,
- 0x0979, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1d00, 0x1de6,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x206a, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20ba,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23f3,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x26ff,
- 0x2701, 0x2b4c,
- 0x2b50, 0x2b59,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e3b,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcc,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa697,
- 0xa69f, 0xa6f7,
- 0xa700, 0xa78e,
- 0xa790, 0xa793,
- 0xa7a0, 0xa7aa,
- 0xa7f8, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9df,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1085f,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a7f,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b7f,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x11080, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11180, 0x111c8,
- 0x111d0, 0x111d9,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x13000, 0x1342e,
- 0x16800, 0x16a38,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x1b000, 0x1b001,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0be,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0df,
- 0x1f100, 0x1f10a,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f320,
- 0x1f330, 0x1f335,
- 0x1f337, 0x1f37c,
- 0x1f380, 0x1f393,
- 0x1f3a0, 0x1f3c4,
- 0x1f3c6, 0x1f3ca,
- 0x1f3e0, 0x1f3f0,
- 0x1f400, 0x1f43e,
- 0x1f440, 0x1f440,
- 0x1f442, 0x1f4f7,
- 0x1f4f9, 0x1f4fc,
- 0x1f500, 0x1f53d,
- 0x1f540, 0x1f543,
- 0x1f550, 0x1f567,
- 0x1f5fb, 0x1f640,
- 0x1f645, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f700, 0x1f773,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_6_2 */
-
-/* 'Age_6_3': Derived Age 6.3 */
-static const OnigCodePoint CR_Age_6_3[] = {
- 549,
- 0x0000, 0x0377,
- 0x037a, 0x037e,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x0527,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058f, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x0604,
- 0x0606, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08a0,
- 0x08a2, 0x08ac,
- 0x08e4, 0x08fe,
- 0x0900, 0x0977,
- 0x0979, 0x097f,
- 0x0981, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c01, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c33,
- 0x0c35, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c82, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d02, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f0,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191c,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1d00, 0x1de6,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20ba,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23f3,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x26ff,
- 0x2701, 0x2b4c,
- 0x2b50, 0x2b59,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e3b,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcc,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa697,
- 0xa69f, 0xa6f7,
- 0xa700, 0xa78e,
- 0xa790, 0xa793,
- 0xa7a0, 0xa7aa,
- 0xa7f8, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9df,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaa7b,
- 0xaa80, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe26,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018a,
- 0x10190, 0x1019b,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x10300, 0x1031e,
- 0x10320, 0x10323,
- 0x10330, 0x1034a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1085f,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a7f,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b7f,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x11080, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11180, 0x111c8,
- 0x111d0, 0x111d9,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x12000, 0x1236e,
- 0x12400, 0x12462,
- 0x12470, 0x12473,
- 0x13000, 0x1342e,
- 0x16800, 0x16a38,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x1b000, 0x1b001,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0be,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0df,
- 0x1f100, 0x1f10a,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f320,
- 0x1f330, 0x1f335,
- 0x1f337, 0x1f37c,
- 0x1f380, 0x1f393,
- 0x1f3a0, 0x1f3c4,
- 0x1f3c6, 0x1f3ca,
- 0x1f3e0, 0x1f3f0,
- 0x1f400, 0x1f43e,
- 0x1f440, 0x1f440,
- 0x1f442, 0x1f4f7,
- 0x1f4f9, 0x1f4fc,
- 0x1f500, 0x1f53d,
- 0x1f540, 0x1f543,
- 0x1f550, 0x1f567,
- 0x1f5fb, 0x1f640,
- 0x1f645, 0x1f64f,
- 0x1f680, 0x1f6c5,
- 0x1f700, 0x1f773,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_6_3 */
-
-/* 'Age_7_0': Derived Age 7.0 */
-static const OnigCodePoint CR_Age_7_0[] = {
- 610,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08b2,
- 0x08e4, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c59,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c81, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d01, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d60, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f4,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1cf8, 0x1cf9,
- 0x1d00, 0x1df5,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bd,
- 0x20d0, 0x20f0,
- 0x2100, 0x2189,
- 0x2190, 0x23fa,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bb9,
- 0x2bbd, 0x2bc8,
- 0x2bca, 0x2bd1,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e42,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fcc,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa69d,
- 0xa69f, 0xa6f7,
- 0xa700, 0xa78e,
- 0xa790, 0xa7ad,
- 0xa7b0, 0xa7b1,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fb,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab5f,
- 0xab64, 0xab65,
- 0xabc0, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe2d,
- 0xfe30, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018c,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x10330, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x10900, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109be, 0x109bf,
- 0x10a00, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11150, 0x11176,
- 0x11180, 0x111c8,
- 0x111cd, 0x111cd,
- 0x111d0, 0x111da,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123d,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11301, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133c, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115c9,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x11ac0, 0x11af8,
- 0x12000, 0x12398,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x13000, 0x1342e,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x1b000, 0x1b001,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1dd,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1d7ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f32c,
- 0x1f330, 0x1f37d,
- 0x1f380, 0x1f3ce,
- 0x1f3d4, 0x1f3f7,
- 0x1f400, 0x1f4fe,
- 0x1f500, 0x1f54a,
- 0x1f550, 0x1f579,
- 0x1f57b, 0x1f5a3,
- 0x1f5a5, 0x1f642,
- 0x1f645, 0x1f6cf,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6f3,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d4,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_7_0 */
-
-/* 'Age_8_0': Derived Age 8.0 */
-static const OnigCodePoint CR_Age_8_0[] = {
- 623,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08b4,
- 0x08e3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0af9,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c7f,
- 0x0c81, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d01, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4e,
- 0x0d57, 0x0d57,
- 0x0d5f, 0x0d63,
- 0x0d66, 0x0d75,
- 0x0d79, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c7f,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1cf8, 0x1cf9,
- 0x1d00, 0x1df5,
- 0x1dfc, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20be,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x23fa,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bb9,
- 0x2bbd, 0x2bc8,
- 0x2bca, 0x2bd1,
- 0x2bec, 0x2bef,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e42,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fd5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7ad,
- 0xa7b0, 0xa7b7,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c4,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fd,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab65,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018c,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x10330, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10cff,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123d,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133c, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x11700, 0x11719,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x11ac0, 0x11af8,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x1b000, 0x1b001,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f19a,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23a,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f579,
- 0x1f57b, 0x1f5a3,
- 0x1f5a5, 0x1f6d0,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6f3,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d4,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f910, 0x1f918,
- 0x1f980, 0x1f984,
- 0x1f9c0, 0x1f9c0,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_8_0 */
-
-/* 'Age_9_0': Derived Age 9.0 */
-static const OnigCodePoint CR_Age_9_0[] = {
- 648,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d4, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fb,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0af9,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d01, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d3a,
- 0x0d3d, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf6,
- 0x1cf8, 0x1cf9,
- 0x1d00, 0x1df5,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20be,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x23fe,
- 0x2400, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bb9,
- 0x2bbd, 0x2bc8,
- 0x2bca, 0x2bd1,
- 0x2bec, 0x2bef,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e44,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312d,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fd5,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7ae,
- 0xa7b0, 0xa7b7,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fd,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab65,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x10330, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10cff,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133c, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x11700, 0x11719,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe0,
- 0x17000, 0x187ec,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b001,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94a,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f300, 0x1f6d2,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6f6,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d4,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f910, 0x1f91e,
- 0x1f920, 0x1f927,
- 0x1f930, 0x1f930,
- 0x1f933, 0x1f93e,
- 0x1f940, 0x1f94b,
- 0x1f950, 0x1f95e,
- 0x1f980, 0x1f991,
- 0x1f9c0, 0x1f9c0,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_9_0 */
-
-/* 'Age_10_0': Derived Age 10.0 */
-static const OnigCodePoint CR_Age_10_0[] = {
- 659,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x055f,
- 0x0561, 0x0587,
- 0x0589, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05f0, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x0800, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d4, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fd,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a75,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c03,
- 0x0c05, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c83,
- 0x0c85, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1877,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1cc0, 0x1cc7,
- 0x1cd0, 0x1cf9,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bb9,
- 0x2bbd, 0x2bc8,
- 0x2bca, 0x2bd2,
- 0x2bec, 0x2bef,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e49,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312e,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fea,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7ae,
- 0xa7b0, 0xa7b7,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa8fd,
- 0xa900, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab65,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a33,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a47,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10cff,
- 0x10e60, 0x10e7e,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11143,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133c, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145d,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x11700, 0x11719,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11a83,
- 0x11a86, 0x11a9c,
- 0x11a9e, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x17000, 0x187ec,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d371,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94a,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f12e,
- 0x1f130, 0x1f16b,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d4,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6f8,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d4,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f910, 0x1f93e,
- 0x1f940, 0x1f94c,
- 0x1f950, 0x1f96b,
- 0x1f980, 0x1f997,
- 0x1f9c0, 0x1f9c0,
- 0x1f9d0, 0x1f9e6,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_10_0 */
-
-/* 'Age_11_0': Derived Age 11.0 */
-static const OnigCodePoint CR_Age_11_0[] = {
- 668,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c78, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e87, 0x0e88,
- 0x0e8a, 0x0e8a,
- 0x0e8d, 0x0e8d,
- 0x0e94, 0x0e97,
- 0x0e99, 0x0e9f,
- 0x0ea1, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ea7,
- 0x0eaa, 0x0eab,
- 0x0ead, 0x0eb9,
- 0x0ebb, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cf9,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2bc8,
- 0x2bca, 0x2bfe,
- 0x2c00, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4e,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7b9,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab65,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145e,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b7,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11a83,
- 0x11a86, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x12000, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f44,
- 0x16f50, 0x16f7e,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe1,
- 0x17000, 0x187f1,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94a,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16b,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d4,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6f9,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f910, 0x1f93e,
- 0x1f940, 0x1f970,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f97a,
- 0x1f97c, 0x1f9a2,
- 0x1f9b0, 0x1f9b9,
- 0x1f9c0, 0x1f9c2,
- 0x1f9d0, 0x1f9ff,
- 0x1fa60, 0x1fa6d,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_11_0 */
-
-/* 'Age_12_0': Derived Age 12.0 */
-static const OnigCodePoint CR_Age_12_0[] = {
- 677,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x32fe,
- 0x3300, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_12_0 */
-
-/* 'Age_12_1': Derived Age 12.1 */
-static const OnigCodePoint CR_Age_12_1[] = {
- 676,
- 0x0000, 0x0377,
- 0x037a, 0x037f,
- 0x0384, 0x038a,
- 0x038c, 0x038c,
- 0x038e, 0x03a1,
- 0x03a3, 0x052f,
- 0x0531, 0x0556,
- 0x0559, 0x058a,
- 0x058d, 0x058f,
- 0x0591, 0x05c7,
- 0x05d0, 0x05ea,
- 0x05ef, 0x05f4,
- 0x0600, 0x061c,
- 0x061e, 0x070d,
- 0x070f, 0x074a,
- 0x074d, 0x07b1,
- 0x07c0, 0x07fa,
- 0x07fd, 0x082d,
- 0x0830, 0x083e,
- 0x0840, 0x085b,
- 0x085e, 0x085e,
- 0x0860, 0x086a,
- 0x08a0, 0x08b4,
- 0x08b6, 0x08bd,
- 0x08d3, 0x0983,
- 0x0985, 0x098c,
- 0x098f, 0x0990,
- 0x0993, 0x09a8,
- 0x09aa, 0x09b0,
- 0x09b2, 0x09b2,
- 0x09b6, 0x09b9,
- 0x09bc, 0x09c4,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09ce,
- 0x09d7, 0x09d7,
- 0x09dc, 0x09dd,
- 0x09df, 0x09e3,
- 0x09e6, 0x09fe,
- 0x0a01, 0x0a03,
- 0x0a05, 0x0a0a,
- 0x0a0f, 0x0a10,
- 0x0a13, 0x0a28,
- 0x0a2a, 0x0a30,
- 0x0a32, 0x0a33,
- 0x0a35, 0x0a36,
- 0x0a38, 0x0a39,
- 0x0a3c, 0x0a3c,
- 0x0a3e, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a59, 0x0a5c,
- 0x0a5e, 0x0a5e,
- 0x0a66, 0x0a76,
- 0x0a81, 0x0a83,
- 0x0a85, 0x0a8d,
- 0x0a8f, 0x0a91,
- 0x0a93, 0x0aa8,
- 0x0aaa, 0x0ab0,
- 0x0ab2, 0x0ab3,
- 0x0ab5, 0x0ab9,
- 0x0abc, 0x0ac5,
- 0x0ac7, 0x0ac9,
- 0x0acb, 0x0acd,
- 0x0ad0, 0x0ad0,
- 0x0ae0, 0x0ae3,
- 0x0ae6, 0x0af1,
- 0x0af9, 0x0aff,
- 0x0b01, 0x0b03,
- 0x0b05, 0x0b0c,
- 0x0b0f, 0x0b10,
- 0x0b13, 0x0b28,
- 0x0b2a, 0x0b30,
- 0x0b32, 0x0b33,
- 0x0b35, 0x0b39,
- 0x0b3c, 0x0b44,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b5c, 0x0b5d,
- 0x0b5f, 0x0b63,
- 0x0b66, 0x0b77,
- 0x0b82, 0x0b83,
- 0x0b85, 0x0b8a,
- 0x0b8e, 0x0b90,
- 0x0b92, 0x0b95,
- 0x0b99, 0x0b9a,
- 0x0b9c, 0x0b9c,
- 0x0b9e, 0x0b9f,
- 0x0ba3, 0x0ba4,
- 0x0ba8, 0x0baa,
- 0x0bae, 0x0bb9,
- 0x0bbe, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcd,
- 0x0bd0, 0x0bd0,
- 0x0bd7, 0x0bd7,
- 0x0be6, 0x0bfa,
- 0x0c00, 0x0c0c,
- 0x0c0e, 0x0c10,
- 0x0c12, 0x0c28,
- 0x0c2a, 0x0c39,
- 0x0c3d, 0x0c44,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c58, 0x0c5a,
- 0x0c60, 0x0c63,
- 0x0c66, 0x0c6f,
- 0x0c77, 0x0c8c,
- 0x0c8e, 0x0c90,
- 0x0c92, 0x0ca8,
- 0x0caa, 0x0cb3,
- 0x0cb5, 0x0cb9,
- 0x0cbc, 0x0cc4,
- 0x0cc6, 0x0cc8,
- 0x0cca, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0cde, 0x0cde,
- 0x0ce0, 0x0ce3,
- 0x0ce6, 0x0cef,
- 0x0cf1, 0x0cf2,
- 0x0d00, 0x0d03,
- 0x0d05, 0x0d0c,
- 0x0d0e, 0x0d10,
- 0x0d12, 0x0d44,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4f,
- 0x0d54, 0x0d63,
- 0x0d66, 0x0d7f,
- 0x0d82, 0x0d83,
- 0x0d85, 0x0d96,
- 0x0d9a, 0x0db1,
- 0x0db3, 0x0dbb,
- 0x0dbd, 0x0dbd,
- 0x0dc0, 0x0dc6,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0dd8, 0x0ddf,
- 0x0de6, 0x0def,
- 0x0df2, 0x0df4,
- 0x0e01, 0x0e3a,
- 0x0e3f, 0x0e5b,
- 0x0e81, 0x0e82,
- 0x0e84, 0x0e84,
- 0x0e86, 0x0e8a,
- 0x0e8c, 0x0ea3,
- 0x0ea5, 0x0ea5,
- 0x0ea7, 0x0ebd,
- 0x0ec0, 0x0ec4,
- 0x0ec6, 0x0ec6,
- 0x0ec8, 0x0ecd,
- 0x0ed0, 0x0ed9,
- 0x0edc, 0x0edf,
- 0x0f00, 0x0f47,
- 0x0f49, 0x0f6c,
- 0x0f71, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fbe, 0x0fcc,
- 0x0fce, 0x0fda,
- 0x1000, 0x10c5,
- 0x10c7, 0x10c7,
- 0x10cd, 0x10cd,
- 0x10d0, 0x1248,
- 0x124a, 0x124d,
- 0x1250, 0x1256,
- 0x1258, 0x1258,
- 0x125a, 0x125d,
- 0x1260, 0x1288,
- 0x128a, 0x128d,
- 0x1290, 0x12b0,
- 0x12b2, 0x12b5,
- 0x12b8, 0x12be,
- 0x12c0, 0x12c0,
- 0x12c2, 0x12c5,
- 0x12c8, 0x12d6,
- 0x12d8, 0x1310,
- 0x1312, 0x1315,
- 0x1318, 0x135a,
- 0x135d, 0x137c,
- 0x1380, 0x1399,
- 0x13a0, 0x13f5,
- 0x13f8, 0x13fd,
- 0x1400, 0x169c,
- 0x16a0, 0x16f8,
- 0x1700, 0x170c,
- 0x170e, 0x1714,
- 0x1720, 0x1736,
- 0x1740, 0x1753,
- 0x1760, 0x176c,
- 0x176e, 0x1770,
- 0x1772, 0x1773,
- 0x1780, 0x17dd,
- 0x17e0, 0x17e9,
- 0x17f0, 0x17f9,
- 0x1800, 0x180e,
- 0x1810, 0x1819,
- 0x1820, 0x1878,
- 0x1880, 0x18aa,
- 0x18b0, 0x18f5,
- 0x1900, 0x191e,
- 0x1920, 0x192b,
- 0x1930, 0x193b,
- 0x1940, 0x1940,
- 0x1944, 0x196d,
- 0x1970, 0x1974,
- 0x1980, 0x19ab,
- 0x19b0, 0x19c9,
- 0x19d0, 0x19da,
- 0x19de, 0x1a1b,
- 0x1a1e, 0x1a5e,
- 0x1a60, 0x1a7c,
- 0x1a7f, 0x1a89,
- 0x1a90, 0x1a99,
- 0x1aa0, 0x1aad,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b4b,
- 0x1b50, 0x1b7c,
- 0x1b80, 0x1bf3,
- 0x1bfc, 0x1c37,
- 0x1c3b, 0x1c49,
- 0x1c4d, 0x1c88,
- 0x1c90, 0x1cba,
- 0x1cbd, 0x1cc7,
- 0x1cd0, 0x1cfa,
- 0x1d00, 0x1df9,
- 0x1dfb, 0x1f15,
- 0x1f18, 0x1f1d,
- 0x1f20, 0x1f45,
- 0x1f48, 0x1f4d,
- 0x1f50, 0x1f57,
- 0x1f59, 0x1f59,
- 0x1f5b, 0x1f5b,
- 0x1f5d, 0x1f5d,
- 0x1f5f, 0x1f7d,
- 0x1f80, 0x1fb4,
- 0x1fb6, 0x1fc4,
- 0x1fc6, 0x1fd3,
- 0x1fd6, 0x1fdb,
- 0x1fdd, 0x1fef,
- 0x1ff2, 0x1ff4,
- 0x1ff6, 0x1ffe,
- 0x2000, 0x2064,
- 0x2066, 0x2071,
- 0x2074, 0x208e,
- 0x2090, 0x209c,
- 0x20a0, 0x20bf,
- 0x20d0, 0x20f0,
- 0x2100, 0x218b,
- 0x2190, 0x2426,
- 0x2440, 0x244a,
- 0x2460, 0x2b73,
- 0x2b76, 0x2b95,
- 0x2b98, 0x2c2e,
- 0x2c30, 0x2c5e,
- 0x2c60, 0x2cf3,
- 0x2cf9, 0x2d25,
- 0x2d27, 0x2d27,
- 0x2d2d, 0x2d2d,
- 0x2d30, 0x2d67,
- 0x2d6f, 0x2d70,
- 0x2d7f, 0x2d96,
- 0x2da0, 0x2da6,
- 0x2da8, 0x2dae,
- 0x2db0, 0x2db6,
- 0x2db8, 0x2dbe,
- 0x2dc0, 0x2dc6,
- 0x2dc8, 0x2dce,
- 0x2dd0, 0x2dd6,
- 0x2dd8, 0x2dde,
- 0x2de0, 0x2e4f,
- 0x2e80, 0x2e99,
- 0x2e9b, 0x2ef3,
- 0x2f00, 0x2fd5,
- 0x2ff0, 0x2ffb,
- 0x3000, 0x303f,
- 0x3041, 0x3096,
- 0x3099, 0x30ff,
- 0x3105, 0x312f,
- 0x3131, 0x318e,
- 0x3190, 0x31ba,
- 0x31c0, 0x31e3,
- 0x31f0, 0x321e,
- 0x3220, 0x4db5,
- 0x4dc0, 0x9fef,
- 0xa000, 0xa48c,
- 0xa490, 0xa4c6,
- 0xa4d0, 0xa62b,
- 0xa640, 0xa6f7,
- 0xa700, 0xa7bf,
- 0xa7c2, 0xa7c6,
- 0xa7f7, 0xa82b,
- 0xa830, 0xa839,
- 0xa840, 0xa877,
- 0xa880, 0xa8c5,
- 0xa8ce, 0xa8d9,
- 0xa8e0, 0xa953,
- 0xa95f, 0xa97c,
- 0xa980, 0xa9cd,
- 0xa9cf, 0xa9d9,
- 0xa9de, 0xa9fe,
- 0xaa00, 0xaa36,
- 0xaa40, 0xaa4d,
- 0xaa50, 0xaa59,
- 0xaa5c, 0xaac2,
- 0xaadb, 0xaaf6,
- 0xab01, 0xab06,
- 0xab09, 0xab0e,
- 0xab11, 0xab16,
- 0xab20, 0xab26,
- 0xab28, 0xab2e,
- 0xab30, 0xab67,
- 0xab70, 0xabed,
- 0xabf0, 0xabf9,
- 0xac00, 0xd7a3,
- 0xd7b0, 0xd7c6,
- 0xd7cb, 0xd7fb,
- 0xd800, 0xfa6d,
- 0xfa70, 0xfad9,
- 0xfb00, 0xfb06,
- 0xfb13, 0xfb17,
- 0xfb1d, 0xfb36,
- 0xfb38, 0xfb3c,
- 0xfb3e, 0xfb3e,
- 0xfb40, 0xfb41,
- 0xfb43, 0xfb44,
- 0xfb46, 0xfbc1,
- 0xfbd3, 0xfd3f,
- 0xfd50, 0xfd8f,
- 0xfd92, 0xfdc7,
- 0xfdd0, 0xfdfd,
- 0xfe00, 0xfe19,
- 0xfe20, 0xfe52,
- 0xfe54, 0xfe66,
- 0xfe68, 0xfe6b,
- 0xfe70, 0xfe74,
- 0xfe76, 0xfefc,
- 0xfeff, 0xfeff,
- 0xff01, 0xffbe,
- 0xffc2, 0xffc7,
- 0xffca, 0xffcf,
- 0xffd2, 0xffd7,
- 0xffda, 0xffdc,
- 0xffe0, 0xffe6,
- 0xffe8, 0xffee,
- 0xfff9, 0x1000b,
- 0x1000d, 0x10026,
- 0x10028, 0x1003a,
- 0x1003c, 0x1003d,
- 0x1003f, 0x1004d,
- 0x10050, 0x1005d,
- 0x10080, 0x100fa,
- 0x10100, 0x10102,
- 0x10107, 0x10133,
- 0x10137, 0x1018e,
- 0x10190, 0x1019b,
- 0x101a0, 0x101a0,
- 0x101d0, 0x101fd,
- 0x10280, 0x1029c,
- 0x102a0, 0x102d0,
- 0x102e0, 0x102fb,
- 0x10300, 0x10323,
- 0x1032d, 0x1034a,
- 0x10350, 0x1037a,
- 0x10380, 0x1039d,
- 0x1039f, 0x103c3,
- 0x103c8, 0x103d5,
- 0x10400, 0x1049d,
- 0x104a0, 0x104a9,
- 0x104b0, 0x104d3,
- 0x104d8, 0x104fb,
- 0x10500, 0x10527,
- 0x10530, 0x10563,
- 0x1056f, 0x1056f,
- 0x10600, 0x10736,
- 0x10740, 0x10755,
- 0x10760, 0x10767,
- 0x10800, 0x10805,
- 0x10808, 0x10808,
- 0x1080a, 0x10835,
- 0x10837, 0x10838,
- 0x1083c, 0x1083c,
- 0x1083f, 0x10855,
- 0x10857, 0x1089e,
- 0x108a7, 0x108af,
- 0x108e0, 0x108f2,
- 0x108f4, 0x108f5,
- 0x108fb, 0x1091b,
- 0x1091f, 0x10939,
- 0x1093f, 0x1093f,
- 0x10980, 0x109b7,
- 0x109bc, 0x109cf,
- 0x109d2, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a13,
- 0x10a15, 0x10a17,
- 0x10a19, 0x10a35,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a48,
- 0x10a50, 0x10a58,
- 0x10a60, 0x10a9f,
- 0x10ac0, 0x10ae6,
- 0x10aeb, 0x10af6,
- 0x10b00, 0x10b35,
- 0x10b39, 0x10b55,
- 0x10b58, 0x10b72,
- 0x10b78, 0x10b91,
- 0x10b99, 0x10b9c,
- 0x10ba9, 0x10baf,
- 0x10c00, 0x10c48,
- 0x10c80, 0x10cb2,
- 0x10cc0, 0x10cf2,
- 0x10cfa, 0x10d27,
- 0x10d30, 0x10d39,
- 0x10e60, 0x10e7e,
- 0x10f00, 0x10f27,
- 0x10f30, 0x10f59,
- 0x10fe0, 0x10ff6,
- 0x11000, 0x1104d,
- 0x11052, 0x1106f,
- 0x1107f, 0x110c1,
- 0x110cd, 0x110cd,
- 0x110d0, 0x110e8,
- 0x110f0, 0x110f9,
- 0x11100, 0x11134,
- 0x11136, 0x11146,
- 0x11150, 0x11176,
- 0x11180, 0x111cd,
- 0x111d0, 0x111df,
- 0x111e1, 0x111f4,
- 0x11200, 0x11211,
- 0x11213, 0x1123e,
- 0x11280, 0x11286,
- 0x11288, 0x11288,
- 0x1128a, 0x1128d,
- 0x1128f, 0x1129d,
- 0x1129f, 0x112a9,
- 0x112b0, 0x112ea,
- 0x112f0, 0x112f9,
- 0x11300, 0x11303,
- 0x11305, 0x1130c,
- 0x1130f, 0x11310,
- 0x11313, 0x11328,
- 0x1132a, 0x11330,
- 0x11332, 0x11333,
- 0x11335, 0x11339,
- 0x1133b, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11350, 0x11350,
- 0x11357, 0x11357,
- 0x1135d, 0x11363,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11400, 0x11459,
- 0x1145b, 0x1145b,
- 0x1145d, 0x1145f,
- 0x11480, 0x114c7,
- 0x114d0, 0x114d9,
- 0x11580, 0x115b5,
- 0x115b8, 0x115dd,
- 0x11600, 0x11644,
- 0x11650, 0x11659,
- 0x11660, 0x1166c,
- 0x11680, 0x116b8,
- 0x116c0, 0x116c9,
- 0x11700, 0x1171a,
- 0x1171d, 0x1172b,
- 0x11730, 0x1173f,
- 0x11800, 0x1183b,
- 0x118a0, 0x118f2,
- 0x118ff, 0x118ff,
- 0x119a0, 0x119a7,
- 0x119aa, 0x119d7,
- 0x119da, 0x119e4,
- 0x11a00, 0x11a47,
- 0x11a50, 0x11aa2,
- 0x11ac0, 0x11af8,
- 0x11c00, 0x11c08,
- 0x11c0a, 0x11c36,
- 0x11c38, 0x11c45,
- 0x11c50, 0x11c6c,
- 0x11c70, 0x11c8f,
- 0x11c92, 0x11ca7,
- 0x11ca9, 0x11cb6,
- 0x11d00, 0x11d06,
- 0x11d08, 0x11d09,
- 0x11d0b, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d47,
- 0x11d50, 0x11d59,
- 0x11d60, 0x11d65,
- 0x11d67, 0x11d68,
- 0x11d6a, 0x11d8e,
- 0x11d90, 0x11d91,
- 0x11d93, 0x11d98,
- 0x11da0, 0x11da9,
- 0x11ee0, 0x11ef8,
- 0x11fc0, 0x11ff1,
- 0x11fff, 0x12399,
- 0x12400, 0x1246e,
- 0x12470, 0x12474,
- 0x12480, 0x12543,
- 0x13000, 0x1342e,
- 0x13430, 0x13438,
- 0x14400, 0x14646,
- 0x16800, 0x16a38,
- 0x16a40, 0x16a5e,
- 0x16a60, 0x16a69,
- 0x16a6e, 0x16a6f,
- 0x16ad0, 0x16aed,
- 0x16af0, 0x16af5,
- 0x16b00, 0x16b45,
- 0x16b50, 0x16b59,
- 0x16b5b, 0x16b61,
- 0x16b63, 0x16b77,
- 0x16b7d, 0x16b8f,
- 0x16e40, 0x16e9a,
- 0x16f00, 0x16f4a,
- 0x16f4f, 0x16f87,
- 0x16f8f, 0x16f9f,
- 0x16fe0, 0x16fe3,
- 0x17000, 0x187f7,
- 0x18800, 0x18af2,
- 0x1b000, 0x1b11e,
- 0x1b150, 0x1b152,
- 0x1b164, 0x1b167,
- 0x1b170, 0x1b2fb,
- 0x1bc00, 0x1bc6a,
- 0x1bc70, 0x1bc7c,
- 0x1bc80, 0x1bc88,
- 0x1bc90, 0x1bc99,
- 0x1bc9c, 0x1bca3,
- 0x1d000, 0x1d0f5,
- 0x1d100, 0x1d126,
- 0x1d129, 0x1d1e8,
- 0x1d200, 0x1d245,
- 0x1d2e0, 0x1d2f3,
- 0x1d300, 0x1d356,
- 0x1d360, 0x1d378,
- 0x1d400, 0x1d454,
- 0x1d456, 0x1d49c,
- 0x1d49e, 0x1d49f,
- 0x1d4a2, 0x1d4a2,
- 0x1d4a5, 0x1d4a6,
- 0x1d4a9, 0x1d4ac,
- 0x1d4ae, 0x1d4b9,
- 0x1d4bb, 0x1d4bb,
- 0x1d4bd, 0x1d4c3,
- 0x1d4c5, 0x1d505,
- 0x1d507, 0x1d50a,
- 0x1d50d, 0x1d514,
- 0x1d516, 0x1d51c,
- 0x1d51e, 0x1d539,
- 0x1d53b, 0x1d53e,
- 0x1d540, 0x1d544,
- 0x1d546, 0x1d546,
- 0x1d54a, 0x1d550,
- 0x1d552, 0x1d6a5,
- 0x1d6a8, 0x1d7cb,
- 0x1d7ce, 0x1da8b,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e100, 0x1e12c,
- 0x1e130, 0x1e13d,
- 0x1e140, 0x1e149,
- 0x1e14e, 0x1e14f,
- 0x1e2c0, 0x1e2f9,
- 0x1e2ff, 0x1e2ff,
- 0x1e800, 0x1e8c4,
- 0x1e8c7, 0x1e8d6,
- 0x1e900, 0x1e94b,
- 0x1e950, 0x1e959,
- 0x1e95e, 0x1e95f,
- 0x1ec71, 0x1ecb4,
- 0x1ed01, 0x1ed3d,
- 0x1ee00, 0x1ee03,
- 0x1ee05, 0x1ee1f,
- 0x1ee21, 0x1ee22,
- 0x1ee24, 0x1ee24,
- 0x1ee27, 0x1ee27,
- 0x1ee29, 0x1ee32,
- 0x1ee34, 0x1ee37,
- 0x1ee39, 0x1ee39,
- 0x1ee3b, 0x1ee3b,
- 0x1ee42, 0x1ee42,
- 0x1ee47, 0x1ee47,
- 0x1ee49, 0x1ee49,
- 0x1ee4b, 0x1ee4b,
- 0x1ee4d, 0x1ee4f,
- 0x1ee51, 0x1ee52,
- 0x1ee54, 0x1ee54,
- 0x1ee57, 0x1ee57,
- 0x1ee59, 0x1ee59,
- 0x1ee5b, 0x1ee5b,
- 0x1ee5d, 0x1ee5d,
- 0x1ee5f, 0x1ee5f,
- 0x1ee61, 0x1ee62,
- 0x1ee64, 0x1ee64,
- 0x1ee67, 0x1ee6a,
- 0x1ee6c, 0x1ee72,
- 0x1ee74, 0x1ee77,
- 0x1ee79, 0x1ee7c,
- 0x1ee7e, 0x1ee7e,
- 0x1ee80, 0x1ee89,
- 0x1ee8b, 0x1ee9b,
- 0x1eea1, 0x1eea3,
- 0x1eea5, 0x1eea9,
- 0x1eeab, 0x1eebb,
- 0x1eef0, 0x1eef1,
- 0x1f000, 0x1f02b,
- 0x1f030, 0x1f093,
- 0x1f0a0, 0x1f0ae,
- 0x1f0b1, 0x1f0bf,
- 0x1f0c1, 0x1f0cf,
- 0x1f0d1, 0x1f0f5,
- 0x1f100, 0x1f10c,
- 0x1f110, 0x1f16c,
- 0x1f170, 0x1f1ac,
- 0x1f1e6, 0x1f202,
- 0x1f210, 0x1f23b,
- 0x1f240, 0x1f248,
- 0x1f250, 0x1f251,
- 0x1f260, 0x1f265,
- 0x1f300, 0x1f6d5,
- 0x1f6e0, 0x1f6ec,
- 0x1f6f0, 0x1f6fa,
- 0x1f700, 0x1f773,
- 0x1f780, 0x1f7d8,
- 0x1f7e0, 0x1f7eb,
- 0x1f800, 0x1f80b,
- 0x1f810, 0x1f847,
- 0x1f850, 0x1f859,
- 0x1f860, 0x1f887,
- 0x1f890, 0x1f8ad,
- 0x1f900, 0x1f90b,
- 0x1f90d, 0x1f971,
- 0x1f973, 0x1f976,
- 0x1f97a, 0x1f9a2,
- 0x1f9a5, 0x1f9aa,
- 0x1f9ae, 0x1f9ca,
- 0x1f9cd, 0x1fa53,
- 0x1fa60, 0x1fa6d,
- 0x1fa70, 0x1fa73,
- 0x1fa78, 0x1fa7a,
- 0x1fa80, 0x1fa82,
- 0x1fa90, 0x1fa95,
- 0x1fffe, 0x2a6d6,
- 0x2a700, 0x2b734,
- 0x2b740, 0x2b81d,
- 0x2b820, 0x2cea1,
- 0x2ceb0, 0x2ebe0,
- 0x2f800, 0x2fa1d,
- 0x2fffe, 0x2ffff,
- 0x3fffe, 0x3ffff,
- 0x4fffe, 0x4ffff,
- 0x5fffe, 0x5ffff,
- 0x6fffe, 0x6ffff,
- 0x7fffe, 0x7ffff,
- 0x8fffe, 0x8ffff,
- 0x9fffe, 0x9ffff,
- 0xafffe, 0xaffff,
- 0xbfffe, 0xbffff,
- 0xcfffe, 0xcffff,
- 0xdfffe, 0xdffff,
- 0xe0001, 0xe0001,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
- 0xefffe, 0x10ffff,
-}; /* CR_Age_12_1 */
-
-#endif /* USE_UNICODE_AGE_PROPERTIES */
-/* 'Grapheme_Cluster_Break_Prepend': Grapheme_Cluster_Break=Prepend */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_Prepend[] = {
- 11,
- 0x0600, 0x0605,
- 0x06dd, 0x06dd,
- 0x070f, 0x070f,
- 0x08e2, 0x08e2,
- 0x0d4e, 0x0d4e,
- 0x110bd, 0x110bd,
- 0x110cd, 0x110cd,
- 0x111c2, 0x111c3,
- 0x11a3a, 0x11a3a,
- 0x11a84, 0x11a89,
- 0x11d46, 0x11d46,
-}; /* CR_Grapheme_Cluster_Break_Prepend */
-
-/* 'Grapheme_Cluster_Break_CR': Grapheme_Cluster_Break=CR */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_CR[] = {
- 1,
- 0x000d, 0x000d,
-}; /* CR_Grapheme_Cluster_Break_CR */
-
-/* 'Grapheme_Cluster_Break_LF': Grapheme_Cluster_Break=LF */
-#define CR_Grapheme_Cluster_Break_LF CR_NEWLINE
-
-/* 'Grapheme_Cluster_Break_Control': Grapheme_Cluster_Break=Control */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_Control[] = {
- 19,
- 0x0000, 0x0009,
- 0x000b, 0x000c,
- 0x000e, 0x001f,
- 0x007f, 0x009f,
- 0x00ad, 0x00ad,
- 0x061c, 0x061c,
- 0x180e, 0x180e,
- 0x200b, 0x200b,
- 0x200e, 0x200f,
- 0x2028, 0x202e,
- 0x2060, 0x206f,
- 0xfeff, 0xfeff,
- 0xfff0, 0xfffb,
- 0x13430, 0x13438,
- 0x1bca0, 0x1bca3,
- 0x1d173, 0x1d17a,
- 0xe0000, 0xe001f,
- 0xe0080, 0xe00ff,
- 0xe01f0, 0xe0fff,
-}; /* CR_Grapheme_Cluster_Break_Control */
-
-/* 'Grapheme_Cluster_Break_Extend': Grapheme_Cluster_Break=Extend */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = {
- 336,
- 0x0300, 0x036f,
- 0x0483, 0x0489,
- 0x0591, 0x05bd,
- 0x05bf, 0x05bf,
- 0x05c1, 0x05c2,
- 0x05c4, 0x05c5,
- 0x05c7, 0x05c7,
- 0x0610, 0x061a,
- 0x064b, 0x065f,
- 0x0670, 0x0670,
- 0x06d6, 0x06dc,
- 0x06df, 0x06e4,
- 0x06e7, 0x06e8,
- 0x06ea, 0x06ed,
- 0x0711, 0x0711,
- 0x0730, 0x074a,
- 0x07a6, 0x07b0,
- 0x07eb, 0x07f3,
- 0x07fd, 0x07fd,
- 0x0816, 0x0819,
- 0x081b, 0x0823,
- 0x0825, 0x0827,
- 0x0829, 0x082d,
- 0x0859, 0x085b,
- 0x08d3, 0x08e1,
- 0x08e3, 0x0902,
- 0x093a, 0x093a,
- 0x093c, 0x093c,
- 0x0941, 0x0948,
- 0x094d, 0x094d,
- 0x0951, 0x0957,
- 0x0962, 0x0963,
- 0x0981, 0x0981,
- 0x09bc, 0x09bc,
- 0x09be, 0x09be,
- 0x09c1, 0x09c4,
- 0x09cd, 0x09cd,
- 0x09d7, 0x09d7,
- 0x09e2, 0x09e3,
- 0x09fe, 0x09fe,
- 0x0a01, 0x0a02,
- 0x0a3c, 0x0a3c,
- 0x0a41, 0x0a42,
- 0x0a47, 0x0a48,
- 0x0a4b, 0x0a4d,
- 0x0a51, 0x0a51,
- 0x0a70, 0x0a71,
- 0x0a75, 0x0a75,
- 0x0a81, 0x0a82,
- 0x0abc, 0x0abc,
- 0x0ac1, 0x0ac5,
- 0x0ac7, 0x0ac8,
- 0x0acd, 0x0acd,
- 0x0ae2, 0x0ae3,
- 0x0afa, 0x0aff,
- 0x0b01, 0x0b01,
- 0x0b3c, 0x0b3c,
- 0x0b3e, 0x0b3f,
- 0x0b41, 0x0b44,
- 0x0b4d, 0x0b4d,
- 0x0b56, 0x0b57,
- 0x0b62, 0x0b63,
- 0x0b82, 0x0b82,
- 0x0bbe, 0x0bbe,
- 0x0bc0, 0x0bc0,
- 0x0bcd, 0x0bcd,
- 0x0bd7, 0x0bd7,
- 0x0c00, 0x0c00,
- 0x0c04, 0x0c04,
- 0x0c3e, 0x0c40,
- 0x0c46, 0x0c48,
- 0x0c4a, 0x0c4d,
- 0x0c55, 0x0c56,
- 0x0c62, 0x0c63,
- 0x0c81, 0x0c81,
- 0x0cbc, 0x0cbc,
- 0x0cbf, 0x0cbf,
- 0x0cc2, 0x0cc2,
- 0x0cc6, 0x0cc6,
- 0x0ccc, 0x0ccd,
- 0x0cd5, 0x0cd6,
- 0x0ce2, 0x0ce3,
- 0x0d00, 0x0d01,
- 0x0d3b, 0x0d3c,
- 0x0d3e, 0x0d3e,
- 0x0d41, 0x0d44,
- 0x0d4d, 0x0d4d,
- 0x0d57, 0x0d57,
- 0x0d62, 0x0d63,
- 0x0dca, 0x0dca,
- 0x0dcf, 0x0dcf,
- 0x0dd2, 0x0dd4,
- 0x0dd6, 0x0dd6,
- 0x0ddf, 0x0ddf,
- 0x0e31, 0x0e31,
- 0x0e34, 0x0e3a,
- 0x0e47, 0x0e4e,
- 0x0eb1, 0x0eb1,
- 0x0eb4, 0x0ebc,
- 0x0ec8, 0x0ecd,
- 0x0f18, 0x0f19,
- 0x0f35, 0x0f35,
- 0x0f37, 0x0f37,
- 0x0f39, 0x0f39,
- 0x0f71, 0x0f7e,
- 0x0f80, 0x0f84,
- 0x0f86, 0x0f87,
- 0x0f8d, 0x0f97,
- 0x0f99, 0x0fbc,
- 0x0fc6, 0x0fc6,
- 0x102d, 0x1030,
- 0x1032, 0x1037,
- 0x1039, 0x103a,
- 0x103d, 0x103e,
- 0x1058, 0x1059,
- 0x105e, 0x1060,
- 0x1071, 0x1074,
- 0x1082, 0x1082,
- 0x1085, 0x1086,
- 0x108d, 0x108d,
- 0x109d, 0x109d,
- 0x135d, 0x135f,
- 0x1712, 0x1714,
- 0x1732, 0x1734,
- 0x1752, 0x1753,
- 0x1772, 0x1773,
- 0x17b4, 0x17b5,
- 0x17b7, 0x17bd,
- 0x17c6, 0x17c6,
- 0x17c9, 0x17d3,
- 0x17dd, 0x17dd,
- 0x180b, 0x180d,
- 0x1885, 0x1886,
- 0x18a9, 0x18a9,
- 0x1920, 0x1922,
- 0x1927, 0x1928,
- 0x1932, 0x1932,
- 0x1939, 0x193b,
- 0x1a17, 0x1a18,
- 0x1a1b, 0x1a1b,
- 0x1a56, 0x1a56,
- 0x1a58, 0x1a5e,
- 0x1a60, 0x1a60,
- 0x1a62, 0x1a62,
- 0x1a65, 0x1a6c,
- 0x1a73, 0x1a7c,
- 0x1a7f, 0x1a7f,
- 0x1ab0, 0x1abe,
- 0x1b00, 0x1b03,
- 0x1b34, 0x1b3a,
- 0x1b3c, 0x1b3c,
- 0x1b42, 0x1b42,
- 0x1b6b, 0x1b73,
- 0x1b80, 0x1b81,
- 0x1ba2, 0x1ba5,
- 0x1ba8, 0x1ba9,
- 0x1bab, 0x1bad,
- 0x1be6, 0x1be6,
- 0x1be8, 0x1be9,
- 0x1bed, 0x1bed,
- 0x1bef, 0x1bf1,
- 0x1c2c, 0x1c33,
- 0x1c36, 0x1c37,
- 0x1cd0, 0x1cd2,
- 0x1cd4, 0x1ce0,
- 0x1ce2, 0x1ce8,
- 0x1ced, 0x1ced,
- 0x1cf4, 0x1cf4,
- 0x1cf8, 0x1cf9,
- 0x1dc0, 0x1df9,
- 0x1dfb, 0x1dff,
- 0x200c, 0x200c,
- 0x20d0, 0x20f0,
- 0x2cef, 0x2cf1,
- 0x2d7f, 0x2d7f,
- 0x2de0, 0x2dff,
- 0x302a, 0x302f,
- 0x3099, 0x309a,
- 0xa66f, 0xa672,
- 0xa674, 0xa67d,
- 0xa69e, 0xa69f,
- 0xa6f0, 0xa6f1,
- 0xa802, 0xa802,
- 0xa806, 0xa806,
- 0xa80b, 0xa80b,
- 0xa825, 0xa826,
- 0xa8c4, 0xa8c5,
- 0xa8e0, 0xa8f1,
- 0xa8ff, 0xa8ff,
- 0xa926, 0xa92d,
- 0xa947, 0xa951,
- 0xa980, 0xa982,
- 0xa9b3, 0xa9b3,
- 0xa9b6, 0xa9b9,
- 0xa9bc, 0xa9bd,
- 0xa9e5, 0xa9e5,
- 0xaa29, 0xaa2e,
- 0xaa31, 0xaa32,
- 0xaa35, 0xaa36,
- 0xaa43, 0xaa43,
- 0xaa4c, 0xaa4c,
- 0xaa7c, 0xaa7c,
- 0xaab0, 0xaab0,
- 0xaab2, 0xaab4,
- 0xaab7, 0xaab8,
- 0xaabe, 0xaabf,
- 0xaac1, 0xaac1,
- 0xaaec, 0xaaed,
- 0xaaf6, 0xaaf6,
- 0xabe5, 0xabe5,
- 0xabe8, 0xabe8,
- 0xabed, 0xabed,
- 0xfb1e, 0xfb1e,
- 0xfe00, 0xfe0f,
- 0xfe20, 0xfe2f,
- 0xff9e, 0xff9f,
- 0x101fd, 0x101fd,
- 0x102e0, 0x102e0,
- 0x10376, 0x1037a,
- 0x10a01, 0x10a03,
- 0x10a05, 0x10a06,
- 0x10a0c, 0x10a0f,
- 0x10a38, 0x10a3a,
- 0x10a3f, 0x10a3f,
- 0x10ae5, 0x10ae6,
- 0x10d24, 0x10d27,
- 0x10f46, 0x10f50,
- 0x11001, 0x11001,
- 0x11038, 0x11046,
- 0x1107f, 0x11081,
- 0x110b3, 0x110b6,
- 0x110b9, 0x110ba,
- 0x11100, 0x11102,
- 0x11127, 0x1112b,
- 0x1112d, 0x11134,
- 0x11173, 0x11173,
- 0x11180, 0x11181,
- 0x111b6, 0x111be,
- 0x111c9, 0x111cc,
- 0x1122f, 0x11231,
- 0x11234, 0x11234,
- 0x11236, 0x11237,
- 0x1123e, 0x1123e,
- 0x112df, 0x112df,
- 0x112e3, 0x112ea,
- 0x11300, 0x11301,
- 0x1133b, 0x1133c,
- 0x1133e, 0x1133e,
- 0x11340, 0x11340,
- 0x11357, 0x11357,
- 0x11366, 0x1136c,
- 0x11370, 0x11374,
- 0x11438, 0x1143f,
- 0x11442, 0x11444,
- 0x11446, 0x11446,
- 0x1145e, 0x1145e,
- 0x114b0, 0x114b0,
- 0x114b3, 0x114b8,
- 0x114ba, 0x114ba,
- 0x114bd, 0x114bd,
- 0x114bf, 0x114c0,
- 0x114c2, 0x114c3,
- 0x115af, 0x115af,
- 0x115b2, 0x115b5,
- 0x115bc, 0x115bd,
- 0x115bf, 0x115c0,
- 0x115dc, 0x115dd,
- 0x11633, 0x1163a,
- 0x1163d, 0x1163d,
- 0x1163f, 0x11640,
- 0x116ab, 0x116ab,
- 0x116ad, 0x116ad,
- 0x116b0, 0x116b5,
- 0x116b7, 0x116b7,
- 0x1171d, 0x1171f,
- 0x11722, 0x11725,
- 0x11727, 0x1172b,
- 0x1182f, 0x11837,
- 0x11839, 0x1183a,
- 0x119d4, 0x119d7,
- 0x119da, 0x119db,
- 0x119e0, 0x119e0,
- 0x11a01, 0x11a0a,
- 0x11a33, 0x11a38,
- 0x11a3b, 0x11a3e,
- 0x11a47, 0x11a47,
- 0x11a51, 0x11a56,
- 0x11a59, 0x11a5b,
- 0x11a8a, 0x11a96,
- 0x11a98, 0x11a99,
- 0x11c30, 0x11c36,
- 0x11c38, 0x11c3d,
- 0x11c3f, 0x11c3f,
- 0x11c92, 0x11ca7,
- 0x11caa, 0x11cb0,
- 0x11cb2, 0x11cb3,
- 0x11cb5, 0x11cb6,
- 0x11d31, 0x11d36,
- 0x11d3a, 0x11d3a,
- 0x11d3c, 0x11d3d,
- 0x11d3f, 0x11d45,
- 0x11d47, 0x11d47,
- 0x11d90, 0x11d91,
- 0x11d95, 0x11d95,
- 0x11d97, 0x11d97,
- 0x11ef3, 0x11ef4,
- 0x16af0, 0x16af4,
- 0x16b30, 0x16b36,
- 0x16f4f, 0x16f4f,
- 0x16f8f, 0x16f92,
- 0x1bc9d, 0x1bc9e,
- 0x1d165, 0x1d165,
- 0x1d167, 0x1d169,
- 0x1d16e, 0x1d172,
- 0x1d17b, 0x1d182,
- 0x1d185, 0x1d18b,
- 0x1d1aa, 0x1d1ad,
- 0x1d242, 0x1d244,
- 0x1da00, 0x1da36,
- 0x1da3b, 0x1da6c,
- 0x1da75, 0x1da75,
- 0x1da84, 0x1da84,
- 0x1da9b, 0x1da9f,
- 0x1daa1, 0x1daaf,
- 0x1e000, 0x1e006,
- 0x1e008, 0x1e018,
- 0x1e01b, 0x1e021,
- 0x1e023, 0x1e024,
- 0x1e026, 0x1e02a,
- 0x1e130, 0x1e136,
- 0x1e2ec, 0x1e2ef,
- 0x1e8d0, 0x1e8d6,
- 0x1e944, 0x1e94a,
- 0x1f3fb, 0x1f3ff,
- 0xe0020, 0xe007f,
- 0xe0100, 0xe01ef,
-}; /* CR_Grapheme_Cluster_Break_Extend */
-
-/* 'Grapheme_Cluster_Break_Regional_Indicator': Grapheme_Cluster_Break=Regional_Indicator */
-#define CR_Grapheme_Cluster_Break_Regional_Indicator CR_Regional_Indicator
-
-/* 'Grapheme_Cluster_Break_SpacingMark': Grapheme_Cluster_Break=SpacingMark */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = {
- 152,
- 0x0903, 0x0903,
- 0x093b, 0x093b,
- 0x093e, 0x0940,
- 0x0949, 0x094c,
- 0x094e, 0x094f,
- 0x0982, 0x0983,
- 0x09bf, 0x09c0,
- 0x09c7, 0x09c8,
- 0x09cb, 0x09cc,
- 0x0a03, 0x0a03,
- 0x0a3e, 0x0a40,
- 0x0a83, 0x0a83,
- 0x0abe, 0x0ac0,
- 0x0ac9, 0x0ac9,
- 0x0acb, 0x0acc,
- 0x0b02, 0x0b03,
- 0x0b40, 0x0b40,
- 0x0b47, 0x0b48,
- 0x0b4b, 0x0b4c,
- 0x0bbf, 0x0bbf,
- 0x0bc1, 0x0bc2,
- 0x0bc6, 0x0bc8,
- 0x0bca, 0x0bcc,
- 0x0c01, 0x0c03,
- 0x0c41, 0x0c44,
- 0x0c82, 0x0c83,
- 0x0cbe, 0x0cbe,
- 0x0cc0, 0x0cc1,
- 0x0cc3, 0x0cc4,
- 0x0cc7, 0x0cc8,
- 0x0cca, 0x0ccb,
- 0x0d02, 0x0d03,
- 0x0d3f, 0x0d40,
- 0x0d46, 0x0d48,
- 0x0d4a, 0x0d4c,
- 0x0d82, 0x0d83,
- 0x0dd0, 0x0dd1,
- 0x0dd8, 0x0dde,
- 0x0df2, 0x0df3,
- 0x0e33, 0x0e33,
- 0x0eb3, 0x0eb3,
- 0x0f3e, 0x0f3f,
- 0x0f7f, 0x0f7f,
- 0x1031, 0x1031,
- 0x103b, 0x103c,
- 0x1056, 0x1057,
- 0x1084, 0x1084,
- 0x17b6, 0x17b6,
- 0x17be, 0x17c5,
- 0x17c7, 0x17c8,
- 0x1923, 0x1926,
- 0x1929, 0x192b,
- 0x1930, 0x1931,
- 0x1933, 0x1938,
- 0x1a19, 0x1a1a,
- 0x1a55, 0x1a55,
- 0x1a57, 0x1a57,
- 0x1a6d, 0x1a72,
- 0x1b04, 0x1b04,
- 0x1b3b, 0x1b3b,
- 0x1b3d, 0x1b41,
- 0x1b43, 0x1b44,
- 0x1b82, 0x1b82,
- 0x1ba1, 0x1ba1,
- 0x1ba6, 0x1ba7,
- 0x1baa, 0x1baa,
- 0x1be7, 0x1be7,
- 0x1bea, 0x1bec,
- 0x1bee, 0x1bee,
- 0x1bf2, 0x1bf3,
- 0x1c24, 0x1c2b,
- 0x1c34, 0x1c35,
- 0x1ce1, 0x1ce1,
- 0x1cf7, 0x1cf7,
- 0xa823, 0xa824,
- 0xa827, 0xa827,
- 0xa880, 0xa881,
- 0xa8b4, 0xa8c3,
- 0xa952, 0xa953,
- 0xa983, 0xa983,
- 0xa9b4, 0xa9b5,
- 0xa9ba, 0xa9bb,
- 0xa9be, 0xa9c0,
- 0xaa2f, 0xaa30,
- 0xaa33, 0xaa34,
- 0xaa4d, 0xaa4d,
- 0xaaeb, 0xaaeb,
- 0xaaee, 0xaaef,
- 0xaaf5, 0xaaf5,
- 0xabe3, 0xabe4,
- 0xabe6, 0xabe7,
- 0xabe9, 0xabea,
- 0xabec, 0xabec,
- 0x11000, 0x11000,
- 0x11002, 0x11002,
- 0x11082, 0x11082,
- 0x110b0, 0x110b2,
- 0x110b7, 0x110b8,
- 0x1112c, 0x1112c,
- 0x11145, 0x11146,
- 0x11182, 0x11182,
- 0x111b3, 0x111b5,
- 0x111bf, 0x111c0,
- 0x1122c, 0x1122e,
- 0x11232, 0x11233,
- 0x11235, 0x11235,
- 0x112e0, 0x112e2,
- 0x11302, 0x11303,
- 0x1133f, 0x1133f,
- 0x11341, 0x11344,
- 0x11347, 0x11348,
- 0x1134b, 0x1134d,
- 0x11362, 0x11363,
- 0x11435, 0x11437,
- 0x11440, 0x11441,
- 0x11445, 0x11445,
- 0x114b1, 0x114b2,
- 0x114b9, 0x114b9,
- 0x114bb, 0x114bc,
- 0x114be, 0x114be,
- 0x114c1, 0x114c1,
- 0x115b0, 0x115b1,
- 0x115b8, 0x115bb,
- 0x115be, 0x115be,
- 0x11630, 0x11632,
- 0x1163b, 0x1163c,
- 0x1163e, 0x1163e,
- 0x116ac, 0x116ac,
- 0x116ae, 0x116af,
- 0x116b6, 0x116b6,
- 0x11720, 0x11721,
- 0x11726, 0x11726,
- 0x1182c, 0x1182e,
- 0x11838, 0x11838,
- 0x119d1, 0x119d3,
- 0x119dc, 0x119df,
- 0x119e4, 0x119e4,
- 0x11a39, 0x11a39,
- 0x11a57, 0x11a58,
- 0x11a97, 0x11a97,
- 0x11c2f, 0x11c2f,
- 0x11c3e, 0x11c3e,
- 0x11ca9, 0x11ca9,
- 0x11cb1, 0x11cb1,
- 0x11cb4, 0x11cb4,
- 0x11d8a, 0x11d8e,
- 0x11d93, 0x11d94,
- 0x11d96, 0x11d96,
- 0x11ef5, 0x11ef6,
- 0x16f51, 0x16f87,
- 0x1d166, 0x1d166,
- 0x1d16d, 0x1d16d,
-}; /* CR_Grapheme_Cluster_Break_SpacingMark */
-
-/* 'Grapheme_Cluster_Break_L': Grapheme_Cluster_Break=L */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_L[] = {
- 2,
- 0x1100, 0x115f,
- 0xa960, 0xa97c,
-}; /* CR_Grapheme_Cluster_Break_L */
-
-/* 'Grapheme_Cluster_Break_V': Grapheme_Cluster_Break=V */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_V[] = {
- 2,
- 0x1160, 0x11a7,
- 0xd7b0, 0xd7c6,
-}; /* CR_Grapheme_Cluster_Break_V */
-
-/* 'Grapheme_Cluster_Break_T': Grapheme_Cluster_Break=T */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_T[] = {
- 2,
- 0x11a8, 0x11ff,
- 0xd7cb, 0xd7fb,
-}; /* CR_Grapheme_Cluster_Break_T */
-
-/* 'Grapheme_Cluster_Break_LV': Grapheme_Cluster_Break=LV */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_LV[] = {
- 399,
- 0xac00, 0xac00,
- 0xac1c, 0xac1c,
- 0xac38, 0xac38,
- 0xac54, 0xac54,
- 0xac70, 0xac70,
- 0xac8c, 0xac8c,
- 0xaca8, 0xaca8,
- 0xacc4, 0xacc4,
- 0xace0, 0xace0,
- 0xacfc, 0xacfc,
- 0xad18, 0xad18,
- 0xad34, 0xad34,
- 0xad50, 0xad50,
- 0xad6c, 0xad6c,
- 0xad88, 0xad88,
- 0xada4, 0xada4,
- 0xadc0, 0xadc0,
- 0xaddc, 0xaddc,
- 0xadf8, 0xadf8,
- 0xae14, 0xae14,
- 0xae30, 0xae30,
- 0xae4c, 0xae4c,
- 0xae68, 0xae68,
- 0xae84, 0xae84,
- 0xaea0, 0xaea0,
- 0xaebc, 0xaebc,
- 0xaed8, 0xaed8,
- 0xaef4, 0xaef4,
- 0xaf10, 0xaf10,
- 0xaf2c, 0xaf2c,
- 0xaf48, 0xaf48,
- 0xaf64, 0xaf64,
- 0xaf80, 0xaf80,
- 0xaf9c, 0xaf9c,
- 0xafb8, 0xafb8,
- 0xafd4, 0xafd4,
- 0xaff0, 0xaff0,
- 0xb00c, 0xb00c,
- 0xb028, 0xb028,
- 0xb044, 0xb044,
- 0xb060, 0xb060,
- 0xb07c, 0xb07c,
- 0xb098, 0xb098,
- 0xb0b4, 0xb0b4,
- 0xb0d0, 0xb0d0,
- 0xb0ec, 0xb0ec,
- 0xb108, 0xb108,
- 0xb124, 0xb124,
- 0xb140, 0xb140,
- 0xb15c, 0xb15c,
- 0xb178, 0xb178,
- 0xb194, 0xb194,
- 0xb1b0, 0xb1b0,
- 0xb1cc, 0xb1cc,
- 0xb1e8, 0xb1e8,
- 0xb204, 0xb204,
- 0xb220, 0xb220,
- 0xb23c, 0xb23c,
- 0xb258, 0xb258,
- 0xb274, 0xb274,
- 0xb290, 0xb290,
- 0xb2ac, 0xb2ac,
- 0xb2c8, 0xb2c8,
- 0xb2e4, 0xb2e4,
- 0xb300, 0xb300,
- 0xb31c, 0xb31c,
- 0xb338, 0xb338,
- 0xb354, 0xb354,
- 0xb370, 0xb370,
- 0xb38c, 0xb38c,
- 0xb3a8, 0xb3a8,
- 0xb3c4, 0xb3c4,
- 0xb3e0, 0xb3e0,
- 0xb3fc, 0xb3fc,
- 0xb418, 0xb418,
- 0xb434, 0xb434,
- 0xb450, 0xb450,
- 0xb46c, 0xb46c,
- 0xb488, 0xb488,
- 0xb4a4, 0xb4a4,
- 0xb4c0, 0xb4c0,
- 0xb4dc, 0xb4dc,
- 0xb4f8, 0xb4f8,
- 0xb514, 0xb514,
- 0xb530, 0xb530,
- 0xb54c, 0xb54c,
- 0xb568, 0xb568,
- 0xb584, 0xb584,
- 0xb5a0, 0xb5a0,
- 0xb5bc, 0xb5bc,
- 0xb5d8, 0xb5d8,
- 0xb5f4, 0xb5f4,
- 0xb610, 0xb610,
- 0xb62c, 0xb62c,
- 0xb648, 0xb648,
- 0xb664, 0xb664,
- 0xb680, 0xb680,
- 0xb69c, 0xb69c,
- 0xb6b8, 0xb6b8,
- 0xb6d4, 0xb6d4,
- 0xb6f0, 0xb6f0,
- 0xb70c, 0xb70c,
- 0xb728, 0xb728,
- 0xb744, 0xb744,
- 0xb760, 0xb760,
- 0xb77c, 0xb77c,
- 0xb798, 0xb798,
- 0xb7b4, 0xb7b4,
- 0xb7d0, 0xb7d0,
- 0xb7ec, 0xb7ec,
- 0xb808, 0xb808,
- 0xb824, 0xb824,
- 0xb840, 0xb840,
- 0xb85c, 0xb85c,
- 0xb878, 0xb878,
- 0xb894, 0xb894,
- 0xb8b0, 0xb8b0,
- 0xb8cc, 0xb8cc,
- 0xb8e8, 0xb8e8,
- 0xb904, 0xb904,
- 0xb920, 0xb920,
- 0xb93c, 0xb93c,
- 0xb958, 0xb958,
- 0xb974, 0xb974,
- 0xb990, 0xb990,
- 0xb9ac, 0xb9ac,
- 0xb9c8, 0xb9c8,
- 0xb9e4, 0xb9e4,
- 0xba00, 0xba00,
- 0xba1c, 0xba1c,
- 0xba38, 0xba38,
- 0xba54, 0xba54,
- 0xba70, 0xba70,
- 0xba8c, 0xba8c,
- 0xbaa8, 0xbaa8,
- 0xbac4, 0xbac4,
- 0xbae0, 0xbae0,
- 0xbafc, 0xbafc,
- 0xbb18, 0xbb18,
- 0xbb34, 0xbb34,
- 0xbb50, 0xbb50,
- 0xbb6c, 0xbb6c,
- 0xbb88, 0xbb88,
- 0xbba4, 0xbba4,
- 0xbbc0, 0xbbc0,
- 0xbbdc, 0xbbdc,
- 0xbbf8, 0xbbf8,
- 0xbc14, 0xbc14,
- 0xbc30, 0xbc30,
- 0xbc4c, 0xbc4c,
- 0xbc68, 0xbc68,
- 0xbc84, 0xbc84,
- 0xbca0, 0xbca0,
- 0xbcbc, 0xbcbc,
- 0xbcd8, 0xbcd8,
- 0xbcf4, 0xbcf4,
- 0xbd10, 0xbd10,
- 0xbd2c, 0xbd2c,
- 0xbd48, 0xbd48,
- 0xbd64, 0xbd64,
- 0xbd80, 0xbd80,
- 0xbd9c, 0xbd9c,
- 0xbdb8, 0xbdb8,
- 0xbdd4, 0xbdd4,
- 0xbdf0, 0xbdf0,
- 0xbe0c, 0xbe0c,
- 0xbe28, 0xbe28,
- 0xbe44, 0xbe44,
- 0xbe60, 0xbe60,
- 0xbe7c, 0xbe7c,
- 0xbe98, 0xbe98,
- 0xbeb4, 0xbeb4,
- 0xbed0, 0xbed0,
- 0xbeec, 0xbeec,
- 0xbf08, 0xbf08,
- 0xbf24, 0xbf24,
- 0xbf40, 0xbf40,
- 0xbf5c, 0xbf5c,
- 0xbf78, 0xbf78,
- 0xbf94, 0xbf94,
- 0xbfb0, 0xbfb0,
- 0xbfcc, 0xbfcc,
- 0xbfe8, 0xbfe8,
- 0xc004, 0xc004,
- 0xc020, 0xc020,
- 0xc03c, 0xc03c,
- 0xc058, 0xc058,
- 0xc074, 0xc074,
- 0xc090, 0xc090,
- 0xc0ac, 0xc0ac,
- 0xc0c8, 0xc0c8,
- 0xc0e4, 0xc0e4,
- 0xc100, 0xc100,
- 0xc11c, 0xc11c,
- 0xc138, 0xc138,
- 0xc154, 0xc154,
- 0xc170, 0xc170,
- 0xc18c, 0xc18c,
- 0xc1a8, 0xc1a8,
- 0xc1c4, 0xc1c4,
- 0xc1e0, 0xc1e0,
- 0xc1fc, 0xc1fc,
- 0xc218, 0xc218,
- 0xc234, 0xc234,
- 0xc250, 0xc250,
- 0xc26c, 0xc26c,
- 0xc288, 0xc288,
- 0xc2a4, 0xc2a4,
- 0xc2c0, 0xc2c0,
- 0xc2dc, 0xc2dc,
- 0xc2f8, 0xc2f8,
- 0xc314, 0xc314,
- 0xc330, 0xc330,
- 0xc34c, 0xc34c,
- 0xc368, 0xc368,
- 0xc384, 0xc384,
- 0xc3a0, 0xc3a0,
- 0xc3bc, 0xc3bc,
- 0xc3d8, 0xc3d8,
- 0xc3f4, 0xc3f4,
- 0xc410, 0xc410,
- 0xc42c, 0xc42c,
- 0xc448, 0xc448,
- 0xc464, 0xc464,
- 0xc480, 0xc480,
- 0xc49c, 0xc49c,
- 0xc4b8, 0xc4b8,
- 0xc4d4, 0xc4d4,
- 0xc4f0, 0xc4f0,
- 0xc50c, 0xc50c,
- 0xc528, 0xc528,
- 0xc544, 0xc544,
- 0xc560, 0xc560,
- 0xc57c, 0xc57c,
- 0xc598, 0xc598,
- 0xc5b4, 0xc5b4,
- 0xc5d0, 0xc5d0,
- 0xc5ec, 0xc5ec,
- 0xc608, 0xc608,
- 0xc624, 0xc624,
- 0xc640, 0xc640,
- 0xc65c, 0xc65c,
- 0xc678, 0xc678,
- 0xc694, 0xc694,
- 0xc6b0, 0xc6b0,
- 0xc6cc, 0xc6cc,
- 0xc6e8, 0xc6e8,
- 0xc704, 0xc704,
- 0xc720, 0xc720,
- 0xc73c, 0xc73c,
- 0xc758, 0xc758,
- 0xc774, 0xc774,
- 0xc790, 0xc790,
- 0xc7ac, 0xc7ac,
- 0xc7c8, 0xc7c8,
- 0xc7e4, 0xc7e4,
- 0xc800, 0xc800,
- 0xc81c, 0xc81c,
- 0xc838, 0xc838,
- 0xc854, 0xc854,
- 0xc870, 0xc870,
- 0xc88c, 0xc88c,
- 0xc8a8, 0xc8a8,
- 0xc8c4, 0xc8c4,
- 0xc8e0, 0xc8e0,
- 0xc8fc, 0xc8fc,
- 0xc918, 0xc918,
- 0xc934, 0xc934,
- 0xc950, 0xc950,
- 0xc96c, 0xc96c,
- 0xc988, 0xc988,
- 0xc9a4, 0xc9a4,
- 0xc9c0, 0xc9c0,
- 0xc9dc, 0xc9dc,
- 0xc9f8, 0xc9f8,
- 0xca14, 0xca14,
- 0xca30, 0xca30,
- 0xca4c, 0xca4c,
- 0xca68, 0xca68,
- 0xca84, 0xca84,
- 0xcaa0, 0xcaa0,
- 0xcabc, 0xcabc,
- 0xcad8, 0xcad8,
- 0xcaf4, 0xcaf4,
- 0xcb10, 0xcb10,
- 0xcb2c, 0xcb2c,
- 0xcb48, 0xcb48,
- 0xcb64, 0xcb64,
- 0xcb80, 0xcb80,
- 0xcb9c, 0xcb9c,
- 0xcbb8, 0xcbb8,
- 0xcbd4, 0xcbd4,
- 0xcbf0, 0xcbf0,
- 0xcc0c, 0xcc0c,
- 0xcc28, 0xcc28,
- 0xcc44, 0xcc44,
- 0xcc60, 0xcc60,
- 0xcc7c, 0xcc7c,
- 0xcc98, 0xcc98,
- 0xccb4, 0xccb4,
- 0xccd0, 0xccd0,
- 0xccec, 0xccec,
- 0xcd08, 0xcd08,
- 0xcd24, 0xcd24,
- 0xcd40, 0xcd40,
- 0xcd5c, 0xcd5c,
- 0xcd78, 0xcd78,
- 0xcd94, 0xcd94,
- 0xcdb0, 0xcdb0,
- 0xcdcc, 0xcdcc,
- 0xcde8, 0xcde8,
- 0xce04, 0xce04,
- 0xce20, 0xce20,
- 0xce3c, 0xce3c,
- 0xce58, 0xce58,
- 0xce74, 0xce74,
- 0xce90, 0xce90,
- 0xceac, 0xceac,
- 0xcec8, 0xcec8,
- 0xcee4, 0xcee4,
- 0xcf00, 0xcf00,
- 0xcf1c, 0xcf1c,
- 0xcf38, 0xcf38,
- 0xcf54, 0xcf54,
- 0xcf70, 0xcf70,
- 0xcf8c, 0xcf8c,
- 0xcfa8, 0xcfa8,
- 0xcfc4, 0xcfc4,
- 0xcfe0, 0xcfe0,
- 0xcffc, 0xcffc,
- 0xd018, 0xd018,
- 0xd034, 0xd034,
- 0xd050, 0xd050,
- 0xd06c, 0xd06c,
- 0xd088, 0xd088,
- 0xd0a4, 0xd0a4,
- 0xd0c0, 0xd0c0,
- 0xd0dc, 0xd0dc,
- 0xd0f8, 0xd0f8,
- 0xd114, 0xd114,
- 0xd130, 0xd130,
- 0xd14c, 0xd14c,
- 0xd168, 0xd168,
- 0xd184, 0xd184,
- 0xd1a0, 0xd1a0,
- 0xd1bc, 0xd1bc,
- 0xd1d8, 0xd1d8,
- 0xd1f4, 0xd1f4,
- 0xd210, 0xd210,
- 0xd22c, 0xd22c,
- 0xd248, 0xd248,
- 0xd264, 0xd264,
- 0xd280, 0xd280,
- 0xd29c, 0xd29c,
- 0xd2b8, 0xd2b8,
- 0xd2d4, 0xd2d4,
- 0xd2f0, 0xd2f0,
- 0xd30c, 0xd30c,
- 0xd328, 0xd328,
- 0xd344, 0xd344,
- 0xd360, 0xd360,
- 0xd37c, 0xd37c,
- 0xd398, 0xd398,
- 0xd3b4, 0xd3b4,
- 0xd3d0, 0xd3d0,
- 0xd3ec, 0xd3ec,
- 0xd408, 0xd408,
- 0xd424, 0xd424,
- 0xd440, 0xd440,
- 0xd45c, 0xd45c,
- 0xd478, 0xd478,
- 0xd494, 0xd494,
- 0xd4b0, 0xd4b0,
- 0xd4cc, 0xd4cc,
- 0xd4e8, 0xd4e8,
- 0xd504, 0xd504,
- 0xd520, 0xd520,
- 0xd53c, 0xd53c,
- 0xd558, 0xd558,
- 0xd574, 0xd574,
- 0xd590, 0xd590,
- 0xd5ac, 0xd5ac,
- 0xd5c8, 0xd5c8,
- 0xd5e4, 0xd5e4,
- 0xd600, 0xd600,
- 0xd61c, 0xd61c,
- 0xd638, 0xd638,
- 0xd654, 0xd654,
- 0xd670, 0xd670,
- 0xd68c, 0xd68c,
- 0xd6a8, 0xd6a8,
- 0xd6c4, 0xd6c4,
- 0xd6e0, 0xd6e0,
- 0xd6fc, 0xd6fc,
- 0xd718, 0xd718,
- 0xd734, 0xd734,
- 0xd750, 0xd750,
- 0xd76c, 0xd76c,
- 0xd788, 0xd788,
-}; /* CR_Grapheme_Cluster_Break_LV */
-
-/* 'Grapheme_Cluster_Break_LVT': Grapheme_Cluster_Break=LVT */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_LVT[] = {
- 399,
- 0xac01, 0xac1b,
- 0xac1d, 0xac37,
- 0xac39, 0xac53,
- 0xac55, 0xac6f,
- 0xac71, 0xac8b,
- 0xac8d, 0xaca7,
- 0xaca9, 0xacc3,
- 0xacc5, 0xacdf,
- 0xace1, 0xacfb,
- 0xacfd, 0xad17,
- 0xad19, 0xad33,
- 0xad35, 0xad4f,
- 0xad51, 0xad6b,
- 0xad6d, 0xad87,
- 0xad89, 0xada3,
- 0xada5, 0xadbf,
- 0xadc1, 0xaddb,
- 0xaddd, 0xadf7,
- 0xadf9, 0xae13,
- 0xae15, 0xae2f,
- 0xae31, 0xae4b,
- 0xae4d, 0xae67,
- 0xae69, 0xae83,
- 0xae85, 0xae9f,
- 0xaea1, 0xaebb,
- 0xaebd, 0xaed7,
- 0xaed9, 0xaef3,
- 0xaef5, 0xaf0f,
- 0xaf11, 0xaf2b,
- 0xaf2d, 0xaf47,
- 0xaf49, 0xaf63,
- 0xaf65, 0xaf7f,
- 0xaf81, 0xaf9b,
- 0xaf9d, 0xafb7,
- 0xafb9, 0xafd3,
- 0xafd5, 0xafef,
- 0xaff1, 0xb00b,
- 0xb00d, 0xb027,
- 0xb029, 0xb043,
- 0xb045, 0xb05f,
- 0xb061, 0xb07b,
- 0xb07d, 0xb097,
- 0xb099, 0xb0b3,
- 0xb0b5, 0xb0cf,
- 0xb0d1, 0xb0eb,
- 0xb0ed, 0xb107,
- 0xb109, 0xb123,
- 0xb125, 0xb13f,
- 0xb141, 0xb15b,
- 0xb15d, 0xb177,
- 0xb179, 0xb193,
- 0xb195, 0xb1af,
- 0xb1b1, 0xb1cb,
- 0xb1cd, 0xb1e7,
- 0xb1e9, 0xb203,
- 0xb205, 0xb21f,
- 0xb221, 0xb23b,
- 0xb23d, 0xb257,
- 0xb259, 0xb273,
- 0xb275, 0xb28f,
- 0xb291, 0xb2ab,
- 0xb2ad, 0xb2c7,
- 0xb2c9, 0xb2e3,
- 0xb2e5, 0xb2ff,
- 0xb301, 0xb31b,
- 0xb31d, 0xb337,
- 0xb339, 0xb353,
- 0xb355, 0xb36f,
- 0xb371, 0xb38b,
- 0xb38d, 0xb3a7,
- 0xb3a9, 0xb3c3,
- 0xb3c5, 0xb3df,
- 0xb3e1, 0xb3fb,
- 0xb3fd, 0xb417,
- 0xb419, 0xb433,
- 0xb435, 0xb44f,
- 0xb451, 0xb46b,
- 0xb46d, 0xb487,
- 0xb489, 0xb4a3,
- 0xb4a5, 0xb4bf,
- 0xb4c1, 0xb4db,
- 0xb4dd, 0xb4f7,
- 0xb4f9, 0xb513,
- 0xb515, 0xb52f,
- 0xb531, 0xb54b,
- 0xb54d, 0xb567,
- 0xb569, 0xb583,
- 0xb585, 0xb59f,
- 0xb5a1, 0xb5bb,
- 0xb5bd, 0xb5d7,
- 0xb5d9, 0xb5f3,
- 0xb5f5, 0xb60f,
- 0xb611, 0xb62b,
- 0xb62d, 0xb647,
- 0xb649, 0xb663,
- 0xb665, 0xb67f,
- 0xb681, 0xb69b,
- 0xb69d, 0xb6b7,
- 0xb6b9, 0xb6d3,
- 0xb6d5, 0xb6ef,
- 0xb6f1, 0xb70b,
- 0xb70d, 0xb727,
- 0xb729, 0xb743,
- 0xb745, 0xb75f,
- 0xb761, 0xb77b,
- 0xb77d, 0xb797,
- 0xb799, 0xb7b3,
- 0xb7b5, 0xb7cf,
- 0xb7d1, 0xb7eb,
- 0xb7ed, 0xb807,
- 0xb809, 0xb823,
- 0xb825, 0xb83f,
- 0xb841, 0xb85b,
- 0xb85d, 0xb877,
- 0xb879, 0xb893,
- 0xb895, 0xb8af,
- 0xb8b1, 0xb8cb,
- 0xb8cd, 0xb8e7,
- 0xb8e9, 0xb903,
- 0xb905, 0xb91f,
- 0xb921, 0xb93b,
- 0xb93d, 0xb957,
- 0xb959, 0xb973,
- 0xb975, 0xb98f,
- 0xb991, 0xb9ab,
- 0xb9ad, 0xb9c7,
- 0xb9c9, 0xb9e3,
- 0xb9e5, 0xb9ff,
- 0xba01, 0xba1b,
- 0xba1d, 0xba37,
- 0xba39, 0xba53,
- 0xba55, 0xba6f,
- 0xba71, 0xba8b,
- 0xba8d, 0xbaa7,
- 0xbaa9, 0xbac3,
- 0xbac5, 0xbadf,
- 0xbae1, 0xbafb,
- 0xbafd, 0xbb17,
- 0xbb19, 0xbb33,
- 0xbb35, 0xbb4f,
- 0xbb51, 0xbb6b,
- 0xbb6d, 0xbb87,
- 0xbb89, 0xbba3,
- 0xbba5, 0xbbbf,
- 0xbbc1, 0xbbdb,
- 0xbbdd, 0xbbf7,
- 0xbbf9, 0xbc13,
- 0xbc15, 0xbc2f,
- 0xbc31, 0xbc4b,
- 0xbc4d, 0xbc67,
- 0xbc69, 0xbc83,
- 0xbc85, 0xbc9f,
- 0xbca1, 0xbcbb,
- 0xbcbd, 0xbcd7,
- 0xbcd9, 0xbcf3,
- 0xbcf5, 0xbd0f,
- 0xbd11, 0xbd2b,
- 0xbd2d, 0xbd47,
- 0xbd49, 0xbd63,
- 0xbd65, 0xbd7f,
- 0xbd81, 0xbd9b,
- 0xbd9d, 0xbdb7,
- 0xbdb9, 0xbdd3,
- 0xbdd5, 0xbdef,
- 0xbdf1, 0xbe0b,
- 0xbe0d, 0xbe27,
- 0xbe29, 0xbe43,
- 0xbe45, 0xbe5f,
- 0xbe61, 0xbe7b,
- 0xbe7d, 0xbe97,
- 0xbe99, 0xbeb3,
- 0xbeb5, 0xbecf,
- 0xbed1, 0xbeeb,
- 0xbeed, 0xbf07,
- 0xbf09, 0xbf23,
- 0xbf25, 0xbf3f,
- 0xbf41, 0xbf5b,
- 0xbf5d, 0xbf77,
- 0xbf79, 0xbf93,
- 0xbf95, 0xbfaf,
- 0xbfb1, 0xbfcb,
- 0xbfcd, 0xbfe7,
- 0xbfe9, 0xc003,
- 0xc005, 0xc01f,
- 0xc021, 0xc03b,
- 0xc03d, 0xc057,
- 0xc059, 0xc073,
- 0xc075, 0xc08f,
- 0xc091, 0xc0ab,
- 0xc0ad, 0xc0c7,
- 0xc0c9, 0xc0e3,
- 0xc0e5, 0xc0ff,
- 0xc101, 0xc11b,
- 0xc11d, 0xc137,
- 0xc139, 0xc153,
- 0xc155, 0xc16f,
- 0xc171, 0xc18b,
- 0xc18d, 0xc1a7,
- 0xc1a9, 0xc1c3,
- 0xc1c5, 0xc1df,
- 0xc1e1, 0xc1fb,
- 0xc1fd, 0xc217,
- 0xc219, 0xc233,
- 0xc235, 0xc24f,
- 0xc251, 0xc26b,
- 0xc26d, 0xc287,
- 0xc289, 0xc2a3,
- 0xc2a5, 0xc2bf,
- 0xc2c1, 0xc2db,
- 0xc2dd, 0xc2f7,
- 0xc2f9, 0xc313,
- 0xc315, 0xc32f,
- 0xc331, 0xc34b,
- 0xc34d, 0xc367,
- 0xc369, 0xc383,
- 0xc385, 0xc39f,
- 0xc3a1, 0xc3bb,
- 0xc3bd, 0xc3d7,
- 0xc3d9, 0xc3f3,
- 0xc3f5, 0xc40f,
- 0xc411, 0xc42b,
- 0xc42d, 0xc447,
- 0xc449, 0xc463,
- 0xc465, 0xc47f,
- 0xc481, 0xc49b,
- 0xc49d, 0xc4b7,
- 0xc4b9, 0xc4d3,
- 0xc4d5, 0xc4ef,
- 0xc4f1, 0xc50b,
- 0xc50d, 0xc527,
- 0xc529, 0xc543,
- 0xc545, 0xc55f,
- 0xc561, 0xc57b,
- 0xc57d, 0xc597,
- 0xc599, 0xc5b3,
- 0xc5b5, 0xc5cf,
- 0xc5d1, 0xc5eb,
- 0xc5ed, 0xc607,
- 0xc609, 0xc623,
- 0xc625, 0xc63f,
- 0xc641, 0xc65b,
- 0xc65d, 0xc677,
- 0xc679, 0xc693,
- 0xc695, 0xc6af,
- 0xc6b1, 0xc6cb,
- 0xc6cd, 0xc6e7,
- 0xc6e9, 0xc703,
- 0xc705, 0xc71f,
- 0xc721, 0xc73b,
- 0xc73d, 0xc757,
- 0xc759, 0xc773,
- 0xc775, 0xc78f,
- 0xc791, 0xc7ab,
- 0xc7ad, 0xc7c7,
- 0xc7c9, 0xc7e3,
- 0xc7e5, 0xc7ff,
- 0xc801, 0xc81b,
- 0xc81d, 0xc837,
- 0xc839, 0xc853,
- 0xc855, 0xc86f,
- 0xc871, 0xc88b,
- 0xc88d, 0xc8a7,
- 0xc8a9, 0xc8c3,
- 0xc8c5, 0xc8df,
- 0xc8e1, 0xc8fb,
- 0xc8fd, 0xc917,
- 0xc919, 0xc933,
- 0xc935, 0xc94f,
- 0xc951, 0xc96b,
- 0xc96d, 0xc987,
- 0xc989, 0xc9a3,
- 0xc9a5, 0xc9bf,
- 0xc9c1, 0xc9db,
- 0xc9dd, 0xc9f7,
- 0xc9f9, 0xca13,
- 0xca15, 0xca2f,
- 0xca31, 0xca4b,
- 0xca4d, 0xca67,
- 0xca69, 0xca83,
- 0xca85, 0xca9f,
- 0xcaa1, 0xcabb,
- 0xcabd, 0xcad7,
- 0xcad9, 0xcaf3,
- 0xcaf5, 0xcb0f,
- 0xcb11, 0xcb2b,
- 0xcb2d, 0xcb47,
- 0xcb49, 0xcb63,
- 0xcb65, 0xcb7f,
- 0xcb81, 0xcb9b,
- 0xcb9d, 0xcbb7,
- 0xcbb9, 0xcbd3,
- 0xcbd5, 0xcbef,
- 0xcbf1, 0xcc0b,
- 0xcc0d, 0xcc27,
- 0xcc29, 0xcc43,
- 0xcc45, 0xcc5f,
- 0xcc61, 0xcc7b,
- 0xcc7d, 0xcc97,
- 0xcc99, 0xccb3,
- 0xccb5, 0xcccf,
- 0xccd1, 0xcceb,
- 0xcced, 0xcd07,
- 0xcd09, 0xcd23,
- 0xcd25, 0xcd3f,
- 0xcd41, 0xcd5b,
- 0xcd5d, 0xcd77,
- 0xcd79, 0xcd93,
- 0xcd95, 0xcdaf,
- 0xcdb1, 0xcdcb,
- 0xcdcd, 0xcde7,
- 0xcde9, 0xce03,
- 0xce05, 0xce1f,
- 0xce21, 0xce3b,
- 0xce3d, 0xce57,
- 0xce59, 0xce73,
- 0xce75, 0xce8f,
- 0xce91, 0xceab,
- 0xcead, 0xcec7,
- 0xcec9, 0xcee3,
- 0xcee5, 0xceff,
- 0xcf01, 0xcf1b,
- 0xcf1d, 0xcf37,
- 0xcf39, 0xcf53,
- 0xcf55, 0xcf6f,
- 0xcf71, 0xcf8b,
- 0xcf8d, 0xcfa7,
- 0xcfa9, 0xcfc3,
- 0xcfc5, 0xcfdf,
- 0xcfe1, 0xcffb,
- 0xcffd, 0xd017,
- 0xd019, 0xd033,
- 0xd035, 0xd04f,
- 0xd051, 0xd06b,
- 0xd06d, 0xd087,
- 0xd089, 0xd0a3,
- 0xd0a5, 0xd0bf,
- 0xd0c1, 0xd0db,
- 0xd0dd, 0xd0f7,
- 0xd0f9, 0xd113,
- 0xd115, 0xd12f,
- 0xd131, 0xd14b,
- 0xd14d, 0xd167,
- 0xd169, 0xd183,
- 0xd185, 0xd19f,
- 0xd1a1, 0xd1bb,
- 0xd1bd, 0xd1d7,
- 0xd1d9, 0xd1f3,
- 0xd1f5, 0xd20f,
- 0xd211, 0xd22b,
- 0xd22d, 0xd247,
- 0xd249, 0xd263,
- 0xd265, 0xd27f,
- 0xd281, 0xd29b,
- 0xd29d, 0xd2b7,
- 0xd2b9, 0xd2d3,
- 0xd2d5, 0xd2ef,
- 0xd2f1, 0xd30b,
- 0xd30d, 0xd327,
- 0xd329, 0xd343,
- 0xd345, 0xd35f,
- 0xd361, 0xd37b,
- 0xd37d, 0xd397,
- 0xd399, 0xd3b3,
- 0xd3b5, 0xd3cf,
- 0xd3d1, 0xd3eb,
- 0xd3ed, 0xd407,
- 0xd409, 0xd423,
- 0xd425, 0xd43f,
- 0xd441, 0xd45b,
- 0xd45d, 0xd477,
- 0xd479, 0xd493,
- 0xd495, 0xd4af,
- 0xd4b1, 0xd4cb,
- 0xd4cd, 0xd4e7,
- 0xd4e9, 0xd503,
- 0xd505, 0xd51f,
- 0xd521, 0xd53b,
- 0xd53d, 0xd557,
- 0xd559, 0xd573,
- 0xd575, 0xd58f,
- 0xd591, 0xd5ab,
- 0xd5ad, 0xd5c7,
- 0xd5c9, 0xd5e3,
- 0xd5e5, 0xd5ff,
- 0xd601, 0xd61b,
- 0xd61d, 0xd637,
- 0xd639, 0xd653,
- 0xd655, 0xd66f,
- 0xd671, 0xd68b,
- 0xd68d, 0xd6a7,
- 0xd6a9, 0xd6c3,
- 0xd6c5, 0xd6df,
- 0xd6e1, 0xd6fb,
- 0xd6fd, 0xd717,
- 0xd719, 0xd733,
- 0xd735, 0xd74f,
- 0xd751, 0xd76b,
- 0xd76d, 0xd787,
- 0xd789, 0xd7a3,
-}; /* CR_Grapheme_Cluster_Break_LVT */
-
-/* 'Grapheme_Cluster_Break_ZWJ': Grapheme_Cluster_Break=ZWJ */
-static const OnigCodePoint CR_Grapheme_Cluster_Break_ZWJ[] = {
- 1,
- 0x200d, 0x200d,
-}; /* CR_Grapheme_Cluster_Break_ZWJ */
-
-/* 'In_Basic_Latin': Block */
-#define CR_In_Basic_Latin CR_ASCII
-
-/* 'In_Latin_1_Supplement': Block */
-static const OnigCodePoint CR_In_Latin_1_Supplement[] = {
- 1,
- 0x0080, 0x00ff,
-}; /* CR_In_Latin_1_Supplement */
-
-/* 'In_Latin_Extended_A': Block */
-static const OnigCodePoint CR_In_Latin_Extended_A[] = {
- 1,
- 0x0100, 0x017f,
-}; /* CR_In_Latin_Extended_A */
-
-/* 'In_Latin_Extended_B': Block */
-static const OnigCodePoint CR_In_Latin_Extended_B[] = {
- 1,
- 0x0180, 0x024f,
-}; /* CR_In_Latin_Extended_B */
-
-/* 'In_IPA_Extensions': Block */
-static const OnigCodePoint CR_In_IPA_Extensions[] = {
- 1,
- 0x0250, 0x02af,
-}; /* CR_In_IPA_Extensions */
-
-/* 'In_Spacing_Modifier_Letters': Block */
-static const OnigCodePoint CR_In_Spacing_Modifier_Letters[] = {
- 1,
- 0x02b0, 0x02ff,
-}; /* CR_In_Spacing_Modifier_Letters */
-
-/* 'In_Combining_Diacritical_Marks': Block */
-static const OnigCodePoint CR_In_Combining_Diacritical_Marks[] = {
- 1,
- 0x0300, 0x036f,
-}; /* CR_In_Combining_Diacritical_Marks */
-
-/* 'In_Greek_and_Coptic': Block */
-static const OnigCodePoint CR_In_Greek_and_Coptic[] = {
- 1,
- 0x0370, 0x03ff,
-}; /* CR_In_Greek_and_Coptic */
-
-/* 'In_Cyrillic': Block */
-static const OnigCodePoint CR_In_Cyrillic[] = {
- 1,
- 0x0400, 0x04ff,
-}; /* CR_In_Cyrillic */
-
-/* 'In_Cyrillic_Supplement': Block */
-static const OnigCodePoint CR_In_Cyrillic_Supplement[] = {
- 1,
- 0x0500, 0x052f,
-}; /* CR_In_Cyrillic_Supplement */
-
-/* 'In_Armenian': Block */
-static const OnigCodePoint CR_In_Armenian[] = {
- 1,
- 0x0530, 0x058f,
-}; /* CR_In_Armenian */
-
-/* 'In_Hebrew': Block */
-static const OnigCodePoint CR_In_Hebrew[] = {
- 1,
- 0x0590, 0x05ff,
-}; /* CR_In_Hebrew */
-
-/* 'In_Arabic': Block */
-static const OnigCodePoint CR_In_Arabic[] = {
- 1,
- 0x0600, 0x06ff,
-}; /* CR_In_Arabic */
-
-/* 'In_Syriac': Block */
-static const OnigCodePoint CR_In_Syriac[] = {
- 1,
- 0x0700, 0x074f,
-}; /* CR_In_Syriac */
-
-/* 'In_Arabic_Supplement': Block */
-static const OnigCodePoint CR_In_Arabic_Supplement[] = {
- 1,
- 0x0750, 0x077f,
-}; /* CR_In_Arabic_Supplement */
-
-/* 'In_Thaana': Block */
-static const OnigCodePoint CR_In_Thaana[] = {
- 1,
- 0x0780, 0x07bf,
-}; /* CR_In_Thaana */
-
-/* 'In_NKo': Block */
-static const OnigCodePoint CR_In_NKo[] = {
- 1,
- 0x07c0, 0x07ff,
-}; /* CR_In_NKo */
-
-/* 'In_Samaritan': Block */
-static const OnigCodePoint CR_In_Samaritan[] = {
- 1,
- 0x0800, 0x083f,
-}; /* CR_In_Samaritan */
-
-/* 'In_Mandaic': Block */
-static const OnigCodePoint CR_In_Mandaic[] = {
- 1,
- 0x0840, 0x085f,
-}; /* CR_In_Mandaic */
-
-/* 'In_Syriac_Supplement': Block */
-static const OnigCodePoint CR_In_Syriac_Supplement[] = {
- 1,
- 0x0860, 0x086f,
-}; /* CR_In_Syriac_Supplement */
-
-/* 'In_Arabic_Extended_A': Block */
-static const OnigCodePoint CR_In_Arabic_Extended_A[] = {
- 1,
- 0x08a0, 0x08ff,
-}; /* CR_In_Arabic_Extended_A */
-
-/* 'In_Devanagari': Block */
-static const OnigCodePoint CR_In_Devanagari[] = {
- 1,
- 0x0900, 0x097f,
-}; /* CR_In_Devanagari */
-
-/* 'In_Bengali': Block */
-static const OnigCodePoint CR_In_Bengali[] = {
- 1,
- 0x0980, 0x09ff,
-}; /* CR_In_Bengali */
-
-/* 'In_Gurmukhi': Block */
-static const OnigCodePoint CR_In_Gurmukhi[] = {
- 1,
- 0x0a00, 0x0a7f,
-}; /* CR_In_Gurmukhi */
-
-/* 'In_Gujarati': Block */
-static const OnigCodePoint CR_In_Gujarati[] = {
- 1,
- 0x0a80, 0x0aff,
-}; /* CR_In_Gujarati */
-
-/* 'In_Oriya': Block */
-static const OnigCodePoint CR_In_Oriya[] = {
- 1,
- 0x0b00, 0x0b7f,
-}; /* CR_In_Oriya */
-
-/* 'In_Tamil': Block */
-static const OnigCodePoint CR_In_Tamil[] = {
- 1,
- 0x0b80, 0x0bff,
-}; /* CR_In_Tamil */
-
-/* 'In_Telugu': Block */
-static const OnigCodePoint CR_In_Telugu[] = {
- 1,
- 0x0c00, 0x0c7f,
-}; /* CR_In_Telugu */
-
-/* 'In_Kannada': Block */
-static const OnigCodePoint CR_In_Kannada[] = {
- 1,
- 0x0c80, 0x0cff,
-}; /* CR_In_Kannada */
-
-/* 'In_Malayalam': Block */
-static const OnigCodePoint CR_In_Malayalam[] = {
- 1,
- 0x0d00, 0x0d7f,
-}; /* CR_In_Malayalam */
-
-/* 'In_Sinhala': Block */
-static const OnigCodePoint CR_In_Sinhala[] = {
- 1,
- 0x0d80, 0x0dff,
-}; /* CR_In_Sinhala */
-
-/* 'In_Thai': Block */
-static const OnigCodePoint CR_In_Thai[] = {
- 1,
- 0x0e00, 0x0e7f,
-}; /* CR_In_Thai */
-
-/* 'In_Lao': Block */
-static const OnigCodePoint CR_In_Lao[] = {
- 1,
- 0x0e80, 0x0eff,
-}; /* CR_In_Lao */
-
-/* 'In_Tibetan': Block */
-static const OnigCodePoint CR_In_Tibetan[] = {
- 1,
- 0x0f00, 0x0fff,
-}; /* CR_In_Tibetan */
-
-/* 'In_Myanmar': Block */
-static const OnigCodePoint CR_In_Myanmar[] = {
- 1,
- 0x1000, 0x109f,
-}; /* CR_In_Myanmar */
-
-/* 'In_Georgian': Block */
-static const OnigCodePoint CR_In_Georgian[] = {
- 1,
- 0x10a0, 0x10ff,
-}; /* CR_In_Georgian */
-
-/* 'In_Hangul_Jamo': Block */
-static const OnigCodePoint CR_In_Hangul_Jamo[] = {
- 1,
- 0x1100, 0x11ff,
-}; /* CR_In_Hangul_Jamo */
-
-/* 'In_Ethiopic': Block */
-static const OnigCodePoint CR_In_Ethiopic[] = {
- 1,
- 0x1200, 0x137f,
-}; /* CR_In_Ethiopic */
-
-/* 'In_Ethiopic_Supplement': Block */
-static const OnigCodePoint CR_In_Ethiopic_Supplement[] = {
- 1,
- 0x1380, 0x139f,
-}; /* CR_In_Ethiopic_Supplement */
-
-/* 'In_Cherokee': Block */
-static const OnigCodePoint CR_In_Cherokee[] = {
- 1,
- 0x13a0, 0x13ff,
-}; /* CR_In_Cherokee */
-
-/* 'In_Unified_Canadian_Aboriginal_Syllabics': Block */
-static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics[] = {
- 1,
- 0x1400, 0x167f,
-}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics */
-
-/* 'In_Ogham': Block */
-static const OnigCodePoint CR_In_Ogham[] = {
- 1,
- 0x1680, 0x169f,
-}; /* CR_In_Ogham */
-
-/* 'In_Runic': Block */
-static const OnigCodePoint CR_In_Runic[] = {
- 1,
- 0x16a0, 0x16ff,
-}; /* CR_In_Runic */
-
-/* 'In_Tagalog': Block */
-static const OnigCodePoint CR_In_Tagalog[] = {
- 1,
- 0x1700, 0x171f,
-}; /* CR_In_Tagalog */
-
-/* 'In_Hanunoo': Block */
-static const OnigCodePoint CR_In_Hanunoo[] = {
- 1,
- 0x1720, 0x173f,
-}; /* CR_In_Hanunoo */
-
-/* 'In_Buhid': Block */
-static const OnigCodePoint CR_In_Buhid[] = {
- 1,
- 0x1740, 0x175f,
-}; /* CR_In_Buhid */
-
-/* 'In_Tagbanwa': Block */
-static const OnigCodePoint CR_In_Tagbanwa[] = {
- 1,
- 0x1760, 0x177f,
-}; /* CR_In_Tagbanwa */
-
-/* 'In_Khmer': Block */
-static const OnigCodePoint CR_In_Khmer[] = {
- 1,
- 0x1780, 0x17ff,
-}; /* CR_In_Khmer */
-
-/* 'In_Mongolian': Block */
-static const OnigCodePoint CR_In_Mongolian[] = {
- 1,
- 0x1800, 0x18af,
-}; /* CR_In_Mongolian */
-
-/* 'In_Unified_Canadian_Aboriginal_Syllabics_Extended': Block */
-static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended[] = {
- 1,
- 0x18b0, 0x18ff,
-}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended */
-
-/* 'In_Limbu': Block */
-static const OnigCodePoint CR_In_Limbu[] = {
- 1,
- 0x1900, 0x194f,
-}; /* CR_In_Limbu */
-
-/* 'In_Tai_Le': Block */
-static const OnigCodePoint CR_In_Tai_Le[] = {
- 1,
- 0x1950, 0x197f,
-}; /* CR_In_Tai_Le */
-
-/* 'In_New_Tai_Lue': Block */
-static const OnigCodePoint CR_In_New_Tai_Lue[] = {
- 1,
- 0x1980, 0x19df,
-}; /* CR_In_New_Tai_Lue */
-
-/* 'In_Khmer_Symbols': Block */
-static const OnigCodePoint CR_In_Khmer_Symbols[] = {
- 1,
- 0x19e0, 0x19ff,
-}; /* CR_In_Khmer_Symbols */
-
-/* 'In_Buginese': Block */
-static const OnigCodePoint CR_In_Buginese[] = {
- 1,
- 0x1a00, 0x1a1f,
-}; /* CR_In_Buginese */
-
-/* 'In_Tai_Tham': Block */
-static const OnigCodePoint CR_In_Tai_Tham[] = {
- 1,
- 0x1a20, 0x1aaf,
-}; /* CR_In_Tai_Tham */
-
-/* 'In_Combining_Diacritical_Marks_Extended': Block */
-static const OnigCodePoint CR_In_Combining_Diacritical_Marks_Extended[] = {
- 1,
- 0x1ab0, 0x1aff,
-}; /* CR_In_Combining_Diacritical_Marks_Extended */
-
-/* 'In_Balinese': Block */
-static const OnigCodePoint CR_In_Balinese[] = {
- 1,
- 0x1b00, 0x1b7f,
-}; /* CR_In_Balinese */
-
-/* 'In_Sundanese': Block */
-static const OnigCodePoint CR_In_Sundanese[] = {
- 1,
- 0x1b80, 0x1bbf,
-}; /* CR_In_Sundanese */
-
-/* 'In_Batak': Block */
-static const OnigCodePoint CR_In_Batak[] = {
- 1,
- 0x1bc0, 0x1bff,
-}; /* CR_In_Batak */
-
-/* 'In_Lepcha': Block */
-static const OnigCodePoint CR_In_Lepcha[] = {
- 1,
- 0x1c00, 0x1c4f,
-}; /* CR_In_Lepcha */
-
-/* 'In_Ol_Chiki': Block */
-#define CR_In_Ol_Chiki CR_Ol_Chiki
-
-/* 'In_Cyrillic_Extended_C': Block */
-static const OnigCodePoint CR_In_Cyrillic_Extended_C[] = {
- 1,
- 0x1c80, 0x1c8f,
-}; /* CR_In_Cyrillic_Extended_C */
-
-/* 'In_Georgian_Extended': Block */
-static const OnigCodePoint CR_In_Georgian_Extended[] = {
- 1,
- 0x1c90, 0x1cbf,
-}; /* CR_In_Georgian_Extended */
-
-/* 'In_Sundanese_Supplement': Block */
-static const OnigCodePoint CR_In_Sundanese_Supplement[] = {
- 1,
- 0x1cc0, 0x1ccf,
-}; /* CR_In_Sundanese_Supplement */
-
-/* 'In_Vedic_Extensions': Block */
-static const OnigCodePoint CR_In_Vedic_Extensions[] = {
- 1,
- 0x1cd0, 0x1cff,
-}; /* CR_In_Vedic_Extensions */
-
-/* 'In_Phonetic_Extensions': Block */
-static const OnigCodePoint CR_In_Phonetic_Extensions[] = {
- 1,
- 0x1d00, 0x1d7f,
-}; /* CR_In_Phonetic_Extensions */
-
-/* 'In_Phonetic_Extensions_Supplement': Block */
-static const OnigCodePoint CR_In_Phonetic_Extensions_Supplement[] = {
- 1,
- 0x1d80, 0x1dbf,
-}; /* CR_In_Phonetic_Extensions_Supplement */
-
-/* 'In_Combining_Diacritical_Marks_Supplement': Block */
-static const OnigCodePoint CR_In_Combining_Diacritical_Marks_Supplement[] = {
- 1,
- 0x1dc0, 0x1dff,
-}; /* CR_In_Combining_Diacritical_Marks_Supplement */
-
-/* 'In_Latin_Extended_Additional': Block */
-static const OnigCodePoint CR_In_Latin_Extended_Additional[] = {
- 1,
- 0x1e00, 0x1eff,
-}; /* CR_In_Latin_Extended_Additional */
-
-/* 'In_Greek_Extended': Block */
-static const OnigCodePoint CR_In_Greek_Extended[] = {
- 1,
- 0x1f00, 0x1fff,
-}; /* CR_In_Greek_Extended */
-
-/* 'In_General_Punctuation': Block */
-static const OnigCodePoint CR_In_General_Punctuation[] = {
- 1,
- 0x2000, 0x206f,
-}; /* CR_In_General_Punctuation */
-
-/* 'In_Superscripts_and_Subscripts': Block */
-static const OnigCodePoint CR_In_Superscripts_and_Subscripts[] = {
- 1,
- 0x2070, 0x209f,
-}; /* CR_In_Superscripts_and_Subscripts */
-
-/* 'In_Currency_Symbols': Block */
-static const OnigCodePoint CR_In_Currency_Symbols[] = {
- 1,
- 0x20a0, 0x20cf,
-}; /* CR_In_Currency_Symbols */
-
-/* 'In_Combining_Diacritical_Marks_for_Symbols': Block */
-static const OnigCodePoint CR_In_Combining_Diacritical_Marks_for_Symbols[] = {
- 1,
- 0x20d0, 0x20ff,
-}; /* CR_In_Combining_Diacritical_Marks_for_Symbols */
-
-/* 'In_Letterlike_Symbols': Block */
-static const OnigCodePoint CR_In_Letterlike_Symbols[] = {
- 1,
- 0x2100, 0x214f,
-}; /* CR_In_Letterlike_Symbols */
-
-/* 'In_Number_Forms': Block */
-static const OnigCodePoint CR_In_Number_Forms[] = {
- 1,
- 0x2150, 0x218f,
-}; /* CR_In_Number_Forms */
-
-/* 'In_Arrows': Block */
-static const OnigCodePoint CR_In_Arrows[] = {
- 1,
- 0x2190, 0x21ff,
-}; /* CR_In_Arrows */
-
-/* 'In_Mathematical_Operators': Block */
-static const OnigCodePoint CR_In_Mathematical_Operators[] = {
- 1,
- 0x2200, 0x22ff,
-}; /* CR_In_Mathematical_Operators */
-
-/* 'In_Miscellaneous_Technical': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Technical[] = {
- 1,
- 0x2300, 0x23ff,
-}; /* CR_In_Miscellaneous_Technical */
-
-/* 'In_Control_Pictures': Block */
-static const OnigCodePoint CR_In_Control_Pictures[] = {
- 1,
- 0x2400, 0x243f,
-}; /* CR_In_Control_Pictures */
-
-/* 'In_Optical_Character_Recognition': Block */
-static const OnigCodePoint CR_In_Optical_Character_Recognition[] = {
- 1,
- 0x2440, 0x245f,
-}; /* CR_In_Optical_Character_Recognition */
-
-/* 'In_Enclosed_Alphanumerics': Block */
-static const OnigCodePoint CR_In_Enclosed_Alphanumerics[] = {
- 1,
- 0x2460, 0x24ff,
-}; /* CR_In_Enclosed_Alphanumerics */
-
-/* 'In_Box_Drawing': Block */
-static const OnigCodePoint CR_In_Box_Drawing[] = {
- 1,
- 0x2500, 0x257f,
-}; /* CR_In_Box_Drawing */
-
-/* 'In_Block_Elements': Block */
-static const OnigCodePoint CR_In_Block_Elements[] = {
- 1,
- 0x2580, 0x259f,
-}; /* CR_In_Block_Elements */
-
-/* 'In_Geometric_Shapes': Block */
-static const OnigCodePoint CR_In_Geometric_Shapes[] = {
- 1,
- 0x25a0, 0x25ff,
-}; /* CR_In_Geometric_Shapes */
-
-/* 'In_Miscellaneous_Symbols': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Symbols[] = {
- 1,
- 0x2600, 0x26ff,
-}; /* CR_In_Miscellaneous_Symbols */
-
-/* 'In_Dingbats': Block */
-static const OnigCodePoint CR_In_Dingbats[] = {
- 1,
- 0x2700, 0x27bf,
-}; /* CR_In_Dingbats */
-
-/* 'In_Miscellaneous_Mathematical_Symbols_A': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Mathematical_Symbols_A[] = {
- 1,
- 0x27c0, 0x27ef,
-}; /* CR_In_Miscellaneous_Mathematical_Symbols_A */
-
-/* 'In_Supplemental_Arrows_A': Block */
-static const OnigCodePoint CR_In_Supplemental_Arrows_A[] = {
- 1,
- 0x27f0, 0x27ff,
-}; /* CR_In_Supplemental_Arrows_A */
-
-/* 'In_Braille_Patterns': Block */
-#define CR_In_Braille_Patterns CR_Braille
-
-/* 'In_Supplemental_Arrows_B': Block */
-static const OnigCodePoint CR_In_Supplemental_Arrows_B[] = {
- 1,
- 0x2900, 0x297f,
-}; /* CR_In_Supplemental_Arrows_B */
-
-/* 'In_Miscellaneous_Mathematical_Symbols_B': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Mathematical_Symbols_B[] = {
- 1,
- 0x2980, 0x29ff,
-}; /* CR_In_Miscellaneous_Mathematical_Symbols_B */
-
-/* 'In_Supplemental_Mathematical_Operators': Block */
-static const OnigCodePoint CR_In_Supplemental_Mathematical_Operators[] = {
- 1,
- 0x2a00, 0x2aff,
-}; /* CR_In_Supplemental_Mathematical_Operators */
-
-/* 'In_Miscellaneous_Symbols_and_Arrows': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Symbols_and_Arrows[] = {
- 1,
- 0x2b00, 0x2bff,
-}; /* CR_In_Miscellaneous_Symbols_and_Arrows */
-
-/* 'In_Glagolitic': Block */
-static const OnigCodePoint CR_In_Glagolitic[] = {
- 1,
- 0x2c00, 0x2c5f,
-}; /* CR_In_Glagolitic */
-
-/* 'In_Latin_Extended_C': Block */
-static const OnigCodePoint CR_In_Latin_Extended_C[] = {
- 1,
- 0x2c60, 0x2c7f,
-}; /* CR_In_Latin_Extended_C */
-
-/* 'In_Coptic': Block */
-static const OnigCodePoint CR_In_Coptic[] = {
- 1,
- 0x2c80, 0x2cff,
-}; /* CR_In_Coptic */
-
-/* 'In_Georgian_Supplement': Block */
-static const OnigCodePoint CR_In_Georgian_Supplement[] = {
- 1,
- 0x2d00, 0x2d2f,
-}; /* CR_In_Georgian_Supplement */
-
-/* 'In_Tifinagh': Block */
-static const OnigCodePoint CR_In_Tifinagh[] = {
- 1,
- 0x2d30, 0x2d7f,
-}; /* CR_In_Tifinagh */
-
-/* 'In_Ethiopic_Extended': Block */
-static const OnigCodePoint CR_In_Ethiopic_Extended[] = {
- 1,
- 0x2d80, 0x2ddf,
-}; /* CR_In_Ethiopic_Extended */
-
-/* 'In_Cyrillic_Extended_A': Block */
-static const OnigCodePoint CR_In_Cyrillic_Extended_A[] = {
- 1,
- 0x2de0, 0x2dff,
-}; /* CR_In_Cyrillic_Extended_A */
-
-/* 'In_Supplemental_Punctuation': Block */
-static const OnigCodePoint CR_In_Supplemental_Punctuation[] = {
- 1,
- 0x2e00, 0x2e7f,
-}; /* CR_In_Supplemental_Punctuation */
-
-/* 'In_CJK_Radicals_Supplement': Block */
-static const OnigCodePoint CR_In_CJK_Radicals_Supplement[] = {
- 1,
- 0x2e80, 0x2eff,
-}; /* CR_In_CJK_Radicals_Supplement */
-
-/* 'In_Kangxi_Radicals': Block */
-static const OnigCodePoint CR_In_Kangxi_Radicals[] = {
- 1,
- 0x2f00, 0x2fdf,
-}; /* CR_In_Kangxi_Radicals */
-
-/* 'In_Ideographic_Description_Characters': Block */
-static const OnigCodePoint CR_In_Ideographic_Description_Characters[] = {
- 1,
- 0x2ff0, 0x2fff,
-}; /* CR_In_Ideographic_Description_Characters */
-
-/* 'In_CJK_Symbols_and_Punctuation': Block */
-static const OnigCodePoint CR_In_CJK_Symbols_and_Punctuation[] = {
- 1,
- 0x3000, 0x303f,
-}; /* CR_In_CJK_Symbols_and_Punctuation */
-
-/* 'In_Hiragana': Block */
-static const OnigCodePoint CR_In_Hiragana[] = {
- 1,
- 0x3040, 0x309f,
-}; /* CR_In_Hiragana */
-
-/* 'In_Katakana': Block */
-static const OnigCodePoint CR_In_Katakana[] = {
- 1,
- 0x30a0, 0x30ff,
-}; /* CR_In_Katakana */
-
-/* 'In_Bopomofo': Block */
-static const OnigCodePoint CR_In_Bopomofo[] = {
- 1,
- 0x3100, 0x312f,
-}; /* CR_In_Bopomofo */
-
-/* 'In_Hangul_Compatibility_Jamo': Block */
-static const OnigCodePoint CR_In_Hangul_Compatibility_Jamo[] = {
- 1,
- 0x3130, 0x318f,
-}; /* CR_In_Hangul_Compatibility_Jamo */
-
-/* 'In_Kanbun': Block */
-static const OnigCodePoint CR_In_Kanbun[] = {
- 1,
- 0x3190, 0x319f,
-}; /* CR_In_Kanbun */
-
-/* 'In_Bopomofo_Extended': Block */
-static const OnigCodePoint CR_In_Bopomofo_Extended[] = {
- 1,
- 0x31a0, 0x31bf,
-}; /* CR_In_Bopomofo_Extended */
-
-/* 'In_CJK_Strokes': Block */
-static const OnigCodePoint CR_In_CJK_Strokes[] = {
- 1,
- 0x31c0, 0x31ef,
-}; /* CR_In_CJK_Strokes */
-
-/* 'In_Katakana_Phonetic_Extensions': Block */
-static const OnigCodePoint CR_In_Katakana_Phonetic_Extensions[] = {
- 1,
- 0x31f0, 0x31ff,
-}; /* CR_In_Katakana_Phonetic_Extensions */
-
-/* 'In_Enclosed_CJK_Letters_and_Months': Block */
-static const OnigCodePoint CR_In_Enclosed_CJK_Letters_and_Months[] = {
- 1,
- 0x3200, 0x32ff,
-}; /* CR_In_Enclosed_CJK_Letters_and_Months */
-
-/* 'In_CJK_Compatibility': Block */
-static const OnigCodePoint CR_In_CJK_Compatibility[] = {
- 1,
- 0x3300, 0x33ff,
-}; /* CR_In_CJK_Compatibility */
-
-/* 'In_CJK_Unified_Ideographs_Extension_A': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_A[] = {
- 1,
- 0x3400, 0x4dbf,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_A */
-
-/* 'In_Yijing_Hexagram_Symbols': Block */
-static const OnigCodePoint CR_In_Yijing_Hexagram_Symbols[] = {
- 1,
- 0x4dc0, 0x4dff,
-}; /* CR_In_Yijing_Hexagram_Symbols */
-
-/* 'In_CJK_Unified_Ideographs': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs[] = {
- 1,
- 0x4e00, 0x9fff,
-}; /* CR_In_CJK_Unified_Ideographs */
-
-/* 'In_Yi_Syllables': Block */
-static const OnigCodePoint CR_In_Yi_Syllables[] = {
- 1,
- 0xa000, 0xa48f,
-}; /* CR_In_Yi_Syllables */
-
-/* 'In_Yi_Radicals': Block */
-static const OnigCodePoint CR_In_Yi_Radicals[] = {
- 1,
- 0xa490, 0xa4cf,
-}; /* CR_In_Yi_Radicals */
-
-/* 'In_Lisu': Block */
-#define CR_In_Lisu CR_Lisu
-
-/* 'In_Vai': Block */
-static const OnigCodePoint CR_In_Vai[] = {
- 1,
- 0xa500, 0xa63f,
-}; /* CR_In_Vai */
-
-/* 'In_Cyrillic_Extended_B': Block */
-static const OnigCodePoint CR_In_Cyrillic_Extended_B[] = {
- 1,
- 0xa640, 0xa69f,
-}; /* CR_In_Cyrillic_Extended_B */
-
-/* 'In_Bamum': Block */
-static const OnigCodePoint CR_In_Bamum[] = {
- 1,
- 0xa6a0, 0xa6ff,
-}; /* CR_In_Bamum */
-
-/* 'In_Modifier_Tone_Letters': Block */
-static const OnigCodePoint CR_In_Modifier_Tone_Letters[] = {
- 1,
- 0xa700, 0xa71f,
-}; /* CR_In_Modifier_Tone_Letters */
-
-/* 'In_Latin_Extended_D': Block */
-static const OnigCodePoint CR_In_Latin_Extended_D[] = {
- 1,
- 0xa720, 0xa7ff,
-}; /* CR_In_Latin_Extended_D */
-
-/* 'In_Syloti_Nagri': Block */
-static const OnigCodePoint CR_In_Syloti_Nagri[] = {
- 1,
- 0xa800, 0xa82f,
-}; /* CR_In_Syloti_Nagri */
-
-/* 'In_Common_Indic_Number_Forms': Block */
-static const OnigCodePoint CR_In_Common_Indic_Number_Forms[] = {
- 1,
- 0xa830, 0xa83f,
-}; /* CR_In_Common_Indic_Number_Forms */
-
-/* 'In_Phags_pa': Block */
-static const OnigCodePoint CR_In_Phags_pa[] = {
- 1,
- 0xa840, 0xa87f,
-}; /* CR_In_Phags_pa */
-
-/* 'In_Saurashtra': Block */
-static const OnigCodePoint CR_In_Saurashtra[] = {
- 1,
- 0xa880, 0xa8df,
-}; /* CR_In_Saurashtra */
-
-/* 'In_Devanagari_Extended': Block */
-static const OnigCodePoint CR_In_Devanagari_Extended[] = {
- 1,
- 0xa8e0, 0xa8ff,
-}; /* CR_In_Devanagari_Extended */
-
-/* 'In_Kayah_Li': Block */
-static const OnigCodePoint CR_In_Kayah_Li[] = {
- 1,
- 0xa900, 0xa92f,
-}; /* CR_In_Kayah_Li */
-
-/* 'In_Rejang': Block */
-static const OnigCodePoint CR_In_Rejang[] = {
- 1,
- 0xa930, 0xa95f,
-}; /* CR_In_Rejang */
-
-/* 'In_Hangul_Jamo_Extended_A': Block */
-static const OnigCodePoint CR_In_Hangul_Jamo_Extended_A[] = {
- 1,
- 0xa960, 0xa97f,
-}; /* CR_In_Hangul_Jamo_Extended_A */
-
-/* 'In_Javanese': Block */
-static const OnigCodePoint CR_In_Javanese[] = {
- 1,
- 0xa980, 0xa9df,
-}; /* CR_In_Javanese */
-
-/* 'In_Myanmar_Extended_B': Block */
-static const OnigCodePoint CR_In_Myanmar_Extended_B[] = {
- 1,
- 0xa9e0, 0xa9ff,
-}; /* CR_In_Myanmar_Extended_B */
-
-/* 'In_Cham': Block */
-static const OnigCodePoint CR_In_Cham[] = {
- 1,
- 0xaa00, 0xaa5f,
-}; /* CR_In_Cham */
-
-/* 'In_Myanmar_Extended_A': Block */
-static const OnigCodePoint CR_In_Myanmar_Extended_A[] = {
- 1,
- 0xaa60, 0xaa7f,
-}; /* CR_In_Myanmar_Extended_A */
-
-/* 'In_Tai_Viet': Block */
-static const OnigCodePoint CR_In_Tai_Viet[] = {
- 1,
- 0xaa80, 0xaadf,
-}; /* CR_In_Tai_Viet */
-
-/* 'In_Meetei_Mayek_Extensions': Block */
-static const OnigCodePoint CR_In_Meetei_Mayek_Extensions[] = {
- 1,
- 0xaae0, 0xaaff,
-}; /* CR_In_Meetei_Mayek_Extensions */
-
-/* 'In_Ethiopic_Extended_A': Block */
-static const OnigCodePoint CR_In_Ethiopic_Extended_A[] = {
- 1,
- 0xab00, 0xab2f,
-}; /* CR_In_Ethiopic_Extended_A */
-
-/* 'In_Latin_Extended_E': Block */
-static const OnigCodePoint CR_In_Latin_Extended_E[] = {
- 1,
- 0xab30, 0xab6f,
-}; /* CR_In_Latin_Extended_E */
-
-/* 'In_Cherokee_Supplement': Block */
-static const OnigCodePoint CR_In_Cherokee_Supplement[] = {
- 1,
- 0xab70, 0xabbf,
-}; /* CR_In_Cherokee_Supplement */
-
-/* 'In_Meetei_Mayek': Block */
-static const OnigCodePoint CR_In_Meetei_Mayek[] = {
- 1,
- 0xabc0, 0xabff,
-}; /* CR_In_Meetei_Mayek */
-
-/* 'In_Hangul_Syllables': Block */
-static const OnigCodePoint CR_In_Hangul_Syllables[] = {
- 1,
- 0xac00, 0xd7af,
-}; /* CR_In_Hangul_Syllables */
-
-/* 'In_Hangul_Jamo_Extended_B': Block */
-static const OnigCodePoint CR_In_Hangul_Jamo_Extended_B[] = {
- 1,
- 0xd7b0, 0xd7ff,
-}; /* CR_In_Hangul_Jamo_Extended_B */
-
-/* 'In_High_Surrogates': Block */
-static const OnigCodePoint CR_In_High_Surrogates[] = {
- 1,
- 0xd800, 0xdb7f,
-}; /* CR_In_High_Surrogates */
-
-/* 'In_High_Private_Use_Surrogates': Block */
-static const OnigCodePoint CR_In_High_Private_Use_Surrogates[] = {
- 1,
- 0xdb80, 0xdbff,
-}; /* CR_In_High_Private_Use_Surrogates */
-
-/* 'In_Low_Surrogates': Block */
-static const OnigCodePoint CR_In_Low_Surrogates[] = {
- 1,
- 0xdc00, 0xdfff,
-}; /* CR_In_Low_Surrogates */
-
-/* 'In_Private_Use_Area': Block */
-static const OnigCodePoint CR_In_Private_Use_Area[] = {
- 1,
- 0xe000, 0xf8ff,
-}; /* CR_In_Private_Use_Area */
-
-/* 'In_CJK_Compatibility_Ideographs': Block */
-static const OnigCodePoint CR_In_CJK_Compatibility_Ideographs[] = {
- 1,
- 0xf900, 0xfaff,
-}; /* CR_In_CJK_Compatibility_Ideographs */
-
-/* 'In_Alphabetic_Presentation_Forms': Block */
-static const OnigCodePoint CR_In_Alphabetic_Presentation_Forms[] = {
- 1,
- 0xfb00, 0xfb4f,
-}; /* CR_In_Alphabetic_Presentation_Forms */
-
-/* 'In_Arabic_Presentation_Forms_A': Block */
-static const OnigCodePoint CR_In_Arabic_Presentation_Forms_A[] = {
- 1,
- 0xfb50, 0xfdff,
-}; /* CR_In_Arabic_Presentation_Forms_A */
-
-/* 'In_Variation_Selectors': Block */
-static const OnigCodePoint CR_In_Variation_Selectors[] = {
- 1,
- 0xfe00, 0xfe0f,
-}; /* CR_In_Variation_Selectors */
-
-/* 'In_Vertical_Forms': Block */
-static const OnigCodePoint CR_In_Vertical_Forms[] = {
- 1,
- 0xfe10, 0xfe1f,
-}; /* CR_In_Vertical_Forms */
-
-/* 'In_Combining_Half_Marks': Block */
-static const OnigCodePoint CR_In_Combining_Half_Marks[] = {
- 1,
- 0xfe20, 0xfe2f,
-}; /* CR_In_Combining_Half_Marks */
-
-/* 'In_CJK_Compatibility_Forms': Block */
-static const OnigCodePoint CR_In_CJK_Compatibility_Forms[] = {
- 1,
- 0xfe30, 0xfe4f,
-}; /* CR_In_CJK_Compatibility_Forms */
-
-/* 'In_Small_Form_Variants': Block */
-static const OnigCodePoint CR_In_Small_Form_Variants[] = {
- 1,
- 0xfe50, 0xfe6f,
-}; /* CR_In_Small_Form_Variants */
-
-/* 'In_Arabic_Presentation_Forms_B': Block */
-static const OnigCodePoint CR_In_Arabic_Presentation_Forms_B[] = {
- 1,
- 0xfe70, 0xfeff,
-}; /* CR_In_Arabic_Presentation_Forms_B */
-
-/* 'In_Halfwidth_and_Fullwidth_Forms': Block */
-static const OnigCodePoint CR_In_Halfwidth_and_Fullwidth_Forms[] = {
- 1,
- 0xff00, 0xffef,
-}; /* CR_In_Halfwidth_and_Fullwidth_Forms */
-
-/* 'In_Specials': Block */
-static const OnigCodePoint CR_In_Specials[] = {
- 1,
- 0xfff0, 0xffff,
-}; /* CR_In_Specials */
-
-/* 'In_Linear_B_Syllabary': Block */
-static const OnigCodePoint CR_In_Linear_B_Syllabary[] = {
- 1,
- 0x10000, 0x1007f,
-}; /* CR_In_Linear_B_Syllabary */
-
-/* 'In_Linear_B_Ideograms': Block */
-static const OnigCodePoint CR_In_Linear_B_Ideograms[] = {
- 1,
- 0x10080, 0x100ff,
-}; /* CR_In_Linear_B_Ideograms */
-
-/* 'In_Aegean_Numbers': Block */
-static const OnigCodePoint CR_In_Aegean_Numbers[] = {
- 1,
- 0x10100, 0x1013f,
-}; /* CR_In_Aegean_Numbers */
-
-/* 'In_Ancient_Greek_Numbers': Block */
-static const OnigCodePoint CR_In_Ancient_Greek_Numbers[] = {
- 1,
- 0x10140, 0x1018f,
-}; /* CR_In_Ancient_Greek_Numbers */
-
-/* 'In_Ancient_Symbols': Block */
-static const OnigCodePoint CR_In_Ancient_Symbols[] = {
- 1,
- 0x10190, 0x101cf,
-}; /* CR_In_Ancient_Symbols */
-
-/* 'In_Phaistos_Disc': Block */
-static const OnigCodePoint CR_In_Phaistos_Disc[] = {
- 1,
- 0x101d0, 0x101ff,
-}; /* CR_In_Phaistos_Disc */
-
-/* 'In_Lycian': Block */
-static const OnigCodePoint CR_In_Lycian[] = {
- 1,
- 0x10280, 0x1029f,
-}; /* CR_In_Lycian */
-
-/* 'In_Carian': Block */
-static const OnigCodePoint CR_In_Carian[] = {
- 1,
- 0x102a0, 0x102df,
-}; /* CR_In_Carian */
-
-/* 'In_Coptic_Epact_Numbers': Block */
-static const OnigCodePoint CR_In_Coptic_Epact_Numbers[] = {
- 1,
- 0x102e0, 0x102ff,
-}; /* CR_In_Coptic_Epact_Numbers */
-
-/* 'In_Old_Italic': Block */
-static const OnigCodePoint CR_In_Old_Italic[] = {
- 1,
- 0x10300, 0x1032f,
-}; /* CR_In_Old_Italic */
-
-/* 'In_Gothic': Block */
-static const OnigCodePoint CR_In_Gothic[] = {
- 1,
- 0x10330, 0x1034f,
-}; /* CR_In_Gothic */
-
-/* 'In_Old_Permic': Block */
-static const OnigCodePoint CR_In_Old_Permic[] = {
- 1,
- 0x10350, 0x1037f,
-}; /* CR_In_Old_Permic */
-
-/* 'In_Ugaritic': Block */
-static const OnigCodePoint CR_In_Ugaritic[] = {
- 1,
- 0x10380, 0x1039f,
-}; /* CR_In_Ugaritic */
-
-/* 'In_Old_Persian': Block */
-static const OnigCodePoint CR_In_Old_Persian[] = {
- 1,
- 0x103a0, 0x103df,
-}; /* CR_In_Old_Persian */
-
-/* 'In_Deseret': Block */
-#define CR_In_Deseret CR_Deseret
-
-/* 'In_Shavian': Block */
-#define CR_In_Shavian CR_Shavian
-
-/* 'In_Osmanya': Block */
-static const OnigCodePoint CR_In_Osmanya[] = {
- 1,
- 0x10480, 0x104af,
-}; /* CR_In_Osmanya */
-
-/* 'In_Osage': Block */
-static const OnigCodePoint CR_In_Osage[] = {
- 1,
- 0x104b0, 0x104ff,
-}; /* CR_In_Osage */
-
-/* 'In_Elbasan': Block */
-static const OnigCodePoint CR_In_Elbasan[] = {
- 1,
- 0x10500, 0x1052f,
-}; /* CR_In_Elbasan */
-
-/* 'In_Caucasian_Albanian': Block */
-static const OnigCodePoint CR_In_Caucasian_Albanian[] = {
- 1,
- 0x10530, 0x1056f,
-}; /* CR_In_Caucasian_Albanian */
-
-/* 'In_Linear_A': Block */
-static const OnigCodePoint CR_In_Linear_A[] = {
- 1,
- 0x10600, 0x1077f,
-}; /* CR_In_Linear_A */
-
-/* 'In_Cypriot_Syllabary': Block */
-static const OnigCodePoint CR_In_Cypriot_Syllabary[] = {
- 1,
- 0x10800, 0x1083f,
-}; /* CR_In_Cypriot_Syllabary */
-
-/* 'In_Imperial_Aramaic': Block */
-static const OnigCodePoint CR_In_Imperial_Aramaic[] = {
- 1,
- 0x10840, 0x1085f,
-}; /* CR_In_Imperial_Aramaic */
-
-/* 'In_Palmyrene': Block */
-#define CR_In_Palmyrene CR_Palmyrene
-
-/* 'In_Nabataean': Block */
-static const OnigCodePoint CR_In_Nabataean[] = {
- 1,
- 0x10880, 0x108af,
-}; /* CR_In_Nabataean */
-
-/* 'In_Hatran': Block */
-static const OnigCodePoint CR_In_Hatran[] = {
- 1,
- 0x108e0, 0x108ff,
-}; /* CR_In_Hatran */
-
-/* 'In_Phoenician': Block */
-static const OnigCodePoint CR_In_Phoenician[] = {
- 1,
- 0x10900, 0x1091f,
-}; /* CR_In_Phoenician */
-
-/* 'In_Lydian': Block */
-static const OnigCodePoint CR_In_Lydian[] = {
- 1,
- 0x10920, 0x1093f,
-}; /* CR_In_Lydian */
-
-/* 'In_Meroitic_Hieroglyphs': Block */
-#define CR_In_Meroitic_Hieroglyphs CR_Meroitic_Hieroglyphs
-
-/* 'In_Meroitic_Cursive': Block */
-static const OnigCodePoint CR_In_Meroitic_Cursive[] = {
- 1,
- 0x109a0, 0x109ff,
-}; /* CR_In_Meroitic_Cursive */
-
-/* 'In_Kharoshthi': Block */
-static const OnigCodePoint CR_In_Kharoshthi[] = {
- 1,
- 0x10a00, 0x10a5f,
-}; /* CR_In_Kharoshthi */
-
-/* 'In_Old_South_Arabian': Block */
-#define CR_In_Old_South_Arabian CR_Old_South_Arabian
-
-/* 'In_Old_North_Arabian': Block */
-#define CR_In_Old_North_Arabian CR_Old_North_Arabian
-
-/* 'In_Manichaean': Block */
-static const OnigCodePoint CR_In_Manichaean[] = {
- 1,
- 0x10ac0, 0x10aff,
-}; /* CR_In_Manichaean */
-
-/* 'In_Avestan': Block */
-static const OnigCodePoint CR_In_Avestan[] = {
- 1,
- 0x10b00, 0x10b3f,
-}; /* CR_In_Avestan */
-
-/* 'In_Inscriptional_Parthian': Block */
-static const OnigCodePoint CR_In_Inscriptional_Parthian[] = {
- 1,
- 0x10b40, 0x10b5f,
-}; /* CR_In_Inscriptional_Parthian */
-
-/* 'In_Inscriptional_Pahlavi': Block */
-static const OnigCodePoint CR_In_Inscriptional_Pahlavi[] = {
- 1,
- 0x10b60, 0x10b7f,
-}; /* CR_In_Inscriptional_Pahlavi */
-
-/* 'In_Psalter_Pahlavi': Block */
-static const OnigCodePoint CR_In_Psalter_Pahlavi[] = {
- 1,
- 0x10b80, 0x10baf,
-}; /* CR_In_Psalter_Pahlavi */
-
-/* 'In_Old_Turkic': Block */
-static const OnigCodePoint CR_In_Old_Turkic[] = {
- 1,
- 0x10c00, 0x10c4f,
-}; /* CR_In_Old_Turkic */
-
-/* 'In_Old_Hungarian': Block */
-static const OnigCodePoint CR_In_Old_Hungarian[] = {
- 1,
- 0x10c80, 0x10cff,
-}; /* CR_In_Old_Hungarian */
-
-/* 'In_Hanifi_Rohingya': Block */
-static const OnigCodePoint CR_In_Hanifi_Rohingya[] = {
- 1,
- 0x10d00, 0x10d3f,
-}; /* CR_In_Hanifi_Rohingya */
-
-/* 'In_Rumi_Numeral_Symbols': Block */
-static const OnigCodePoint CR_In_Rumi_Numeral_Symbols[] = {
- 1,
- 0x10e60, 0x10e7f,
-}; /* CR_In_Rumi_Numeral_Symbols */
-
-/* 'In_Old_Sogdian': Block */
-static const OnigCodePoint CR_In_Old_Sogdian[] = {
- 1,
- 0x10f00, 0x10f2f,
-}; /* CR_In_Old_Sogdian */
-
-/* 'In_Sogdian': Block */
-static const OnigCodePoint CR_In_Sogdian[] = {
- 1,
- 0x10f30, 0x10f6f,
-}; /* CR_In_Sogdian */
-
-/* 'In_Elymaic': Block */
-static const OnigCodePoint CR_In_Elymaic[] = {
- 1,
- 0x10fe0, 0x10fff,
-}; /* CR_In_Elymaic */
-
-/* 'In_Brahmi': Block */
-static const OnigCodePoint CR_In_Brahmi[] = {
- 1,
- 0x11000, 0x1107f,
-}; /* CR_In_Brahmi */
-
-/* 'In_Kaithi': Block */
-static const OnigCodePoint CR_In_Kaithi[] = {
- 1,
- 0x11080, 0x110cf,
-}; /* CR_In_Kaithi */
-
-/* 'In_Sora_Sompeng': Block */
-static const OnigCodePoint CR_In_Sora_Sompeng[] = {
- 1,
- 0x110d0, 0x110ff,
-}; /* CR_In_Sora_Sompeng */
-
-/* 'In_Chakma': Block */
-static const OnigCodePoint CR_In_Chakma[] = {
- 1,
- 0x11100, 0x1114f,
-}; /* CR_In_Chakma */
-
-/* 'In_Mahajani': Block */
-static const OnigCodePoint CR_In_Mahajani[] = {
- 1,
- 0x11150, 0x1117f,
-}; /* CR_In_Mahajani */
-
-/* 'In_Sharada': Block */
-static const OnigCodePoint CR_In_Sharada[] = {
- 1,
- 0x11180, 0x111df,
-}; /* CR_In_Sharada */
-
-/* 'In_Sinhala_Archaic_Numbers': Block */
-static const OnigCodePoint CR_In_Sinhala_Archaic_Numbers[] = {
- 1,
- 0x111e0, 0x111ff,
-}; /* CR_In_Sinhala_Archaic_Numbers */
-
-/* 'In_Khojki': Block */
-static const OnigCodePoint CR_In_Khojki[] = {
- 1,
- 0x11200, 0x1124f,
-}; /* CR_In_Khojki */
-
-/* 'In_Multani': Block */
-static const OnigCodePoint CR_In_Multani[] = {
- 1,
- 0x11280, 0x112af,
-}; /* CR_In_Multani */
-
-/* 'In_Khudawadi': Block */
-static const OnigCodePoint CR_In_Khudawadi[] = {
- 1,
- 0x112b0, 0x112ff,
-}; /* CR_In_Khudawadi */
-
-/* 'In_Grantha': Block */
-static const OnigCodePoint CR_In_Grantha[] = {
- 1,
- 0x11300, 0x1137f,
-}; /* CR_In_Grantha */
-
-/* 'In_Newa': Block */
-static const OnigCodePoint CR_In_Newa[] = {
- 1,
- 0x11400, 0x1147f,
-}; /* CR_In_Newa */
-
-/* 'In_Tirhuta': Block */
-static const OnigCodePoint CR_In_Tirhuta[] = {
- 1,
- 0x11480, 0x114df,
-}; /* CR_In_Tirhuta */
-
-/* 'In_Siddham': Block */
-static const OnigCodePoint CR_In_Siddham[] = {
- 1,
- 0x11580, 0x115ff,
-}; /* CR_In_Siddham */
-
-/* 'In_Modi': Block */
-static const OnigCodePoint CR_In_Modi[] = {
- 1,
- 0x11600, 0x1165f,
-}; /* CR_In_Modi */
-
-/* 'In_Mongolian_Supplement': Block */
-static const OnigCodePoint CR_In_Mongolian_Supplement[] = {
- 1,
- 0x11660, 0x1167f,
-}; /* CR_In_Mongolian_Supplement */
-
-/* 'In_Takri': Block */
-static const OnigCodePoint CR_In_Takri[] = {
- 1,
- 0x11680, 0x116cf,
-}; /* CR_In_Takri */
-
-/* 'In_Ahom': Block */
-static const OnigCodePoint CR_In_Ahom[] = {
- 1,
- 0x11700, 0x1173f,
-}; /* CR_In_Ahom */
-
-/* 'In_Dogra': Block */
-static const OnigCodePoint CR_In_Dogra[] = {
- 1,
- 0x11800, 0x1184f,
-}; /* CR_In_Dogra */
-
-/* 'In_Warang_Citi': Block */
-static const OnigCodePoint CR_In_Warang_Citi[] = {
- 1,
- 0x118a0, 0x118ff,
-}; /* CR_In_Warang_Citi */
-
-/* 'In_Nandinagari': Block */
-static const OnigCodePoint CR_In_Nandinagari[] = {
- 1,
- 0x119a0, 0x119ff,
-}; /* CR_In_Nandinagari */
-
-/* 'In_Zanabazar_Square': Block */
-static const OnigCodePoint CR_In_Zanabazar_Square[] = {
- 1,
- 0x11a00, 0x11a4f,
-}; /* CR_In_Zanabazar_Square */
-
-/* 'In_Soyombo': Block */
-static const OnigCodePoint CR_In_Soyombo[] = {
- 1,
- 0x11a50, 0x11aaf,
-}; /* CR_In_Soyombo */
-
-/* 'In_Pau_Cin_Hau': Block */
-static const OnigCodePoint CR_In_Pau_Cin_Hau[] = {
- 1,
- 0x11ac0, 0x11aff,
-}; /* CR_In_Pau_Cin_Hau */
-
-/* 'In_Bhaiksuki': Block */
-static const OnigCodePoint CR_In_Bhaiksuki[] = {
- 1,
- 0x11c00, 0x11c6f,
-}; /* CR_In_Bhaiksuki */
-
-/* 'In_Marchen': Block */
-static const OnigCodePoint CR_In_Marchen[] = {
- 1,
- 0x11c70, 0x11cbf,
-}; /* CR_In_Marchen */
-
-/* 'In_Masaram_Gondi': Block */
-static const OnigCodePoint CR_In_Masaram_Gondi[] = {
- 1,
- 0x11d00, 0x11d5f,
-}; /* CR_In_Masaram_Gondi */
-
-/* 'In_Gunjala_Gondi': Block */
-static const OnigCodePoint CR_In_Gunjala_Gondi[] = {
- 1,
- 0x11d60, 0x11daf,
-}; /* CR_In_Gunjala_Gondi */
-
-/* 'In_Makasar': Block */
-static const OnigCodePoint CR_In_Makasar[] = {
- 1,
- 0x11ee0, 0x11eff,
-}; /* CR_In_Makasar */
-
-/* 'In_Tamil_Supplement': Block */
-static const OnigCodePoint CR_In_Tamil_Supplement[] = {
- 1,
- 0x11fc0, 0x11fff,
-}; /* CR_In_Tamil_Supplement */
-
-/* 'In_Cuneiform': Block */
-static const OnigCodePoint CR_In_Cuneiform[] = {
- 1,
- 0x12000, 0x123ff,
-}; /* CR_In_Cuneiform */
-
-/* 'In_Cuneiform_Numbers_and_Punctuation': Block */
-static const OnigCodePoint CR_In_Cuneiform_Numbers_and_Punctuation[] = {
- 1,
- 0x12400, 0x1247f,
-}; /* CR_In_Cuneiform_Numbers_and_Punctuation */
-
-/* 'In_Early_Dynastic_Cuneiform': Block */
-static const OnigCodePoint CR_In_Early_Dynastic_Cuneiform[] = {
- 1,
- 0x12480, 0x1254f,
-}; /* CR_In_Early_Dynastic_Cuneiform */
-
-/* 'In_Egyptian_Hieroglyphs': Block */
-static const OnigCodePoint CR_In_Egyptian_Hieroglyphs[] = {
- 1,
- 0x13000, 0x1342f,
-}; /* CR_In_Egyptian_Hieroglyphs */
-
-/* 'In_Egyptian_Hieroglyph_Format_Controls': Block */
-static const OnigCodePoint CR_In_Egyptian_Hieroglyph_Format_Controls[] = {
- 1,
- 0x13430, 0x1343f,
-}; /* CR_In_Egyptian_Hieroglyph_Format_Controls */
-
-/* 'In_Anatolian_Hieroglyphs': Block */
-static const OnigCodePoint CR_In_Anatolian_Hieroglyphs[] = {
- 1,
- 0x14400, 0x1467f,
-}; /* CR_In_Anatolian_Hieroglyphs */
-
-/* 'In_Bamum_Supplement': Block */
-static const OnigCodePoint CR_In_Bamum_Supplement[] = {
- 1,
- 0x16800, 0x16a3f,
-}; /* CR_In_Bamum_Supplement */
-
-/* 'In_Mro': Block */
-static const OnigCodePoint CR_In_Mro[] = {
- 1,
- 0x16a40, 0x16a6f,
-}; /* CR_In_Mro */
-
-/* 'In_Bassa_Vah': Block */
-static const OnigCodePoint CR_In_Bassa_Vah[] = {
- 1,
- 0x16ad0, 0x16aff,
-}; /* CR_In_Bassa_Vah */
-
-/* 'In_Pahawh_Hmong': Block */
-static const OnigCodePoint CR_In_Pahawh_Hmong[] = {
- 1,
- 0x16b00, 0x16b8f,
-}; /* CR_In_Pahawh_Hmong */
-
-/* 'In_Medefaidrin': Block */
-static const OnigCodePoint CR_In_Medefaidrin[] = {
- 1,
- 0x16e40, 0x16e9f,
-}; /* CR_In_Medefaidrin */
-
-/* 'In_Miao': Block */
-static const OnigCodePoint CR_In_Miao[] = {
- 1,
- 0x16f00, 0x16f9f,
-}; /* CR_In_Miao */
-
-/* 'In_Ideographic_Symbols_and_Punctuation': Block */
-static const OnigCodePoint CR_In_Ideographic_Symbols_and_Punctuation[] = {
- 1,
- 0x16fe0, 0x16fff,
-}; /* CR_In_Ideographic_Symbols_and_Punctuation */
-
-/* 'In_Tangut': Block */
-static const OnigCodePoint CR_In_Tangut[] = {
- 1,
- 0x17000, 0x187ff,
-}; /* CR_In_Tangut */
-
-/* 'In_Tangut_Components': Block */
-static const OnigCodePoint CR_In_Tangut_Components[] = {
- 1,
- 0x18800, 0x18aff,
-}; /* CR_In_Tangut_Components */
-
-/* 'In_Kana_Supplement': Block */
-static const OnigCodePoint CR_In_Kana_Supplement[] = {
- 1,
- 0x1b000, 0x1b0ff,
-}; /* CR_In_Kana_Supplement */
-
-/* 'In_Kana_Extended_A': Block */
-static const OnigCodePoint CR_In_Kana_Extended_A[] = {
- 1,
- 0x1b100, 0x1b12f,
-}; /* CR_In_Kana_Extended_A */
-
-/* 'In_Small_Kana_Extension': Block */
-static const OnigCodePoint CR_In_Small_Kana_Extension[] = {
- 1,
- 0x1b130, 0x1b16f,
-}; /* CR_In_Small_Kana_Extension */
-
-/* 'In_Nushu': Block */
-static const OnigCodePoint CR_In_Nushu[] = {
- 1,
- 0x1b170, 0x1b2ff,
-}; /* CR_In_Nushu */
-
-/* 'In_Duployan': Block */
-static const OnigCodePoint CR_In_Duployan[] = {
- 1,
- 0x1bc00, 0x1bc9f,
-}; /* CR_In_Duployan */
-
-/* 'In_Shorthand_Format_Controls': Block */
-static const OnigCodePoint CR_In_Shorthand_Format_Controls[] = {
- 1,
- 0x1bca0, 0x1bcaf,
-}; /* CR_In_Shorthand_Format_Controls */
-
-/* 'In_Byzantine_Musical_Symbols': Block */
-static const OnigCodePoint CR_In_Byzantine_Musical_Symbols[] = {
- 1,
- 0x1d000, 0x1d0ff,
-}; /* CR_In_Byzantine_Musical_Symbols */
-
-/* 'In_Musical_Symbols': Block */
-static const OnigCodePoint CR_In_Musical_Symbols[] = {
- 1,
- 0x1d100, 0x1d1ff,
-}; /* CR_In_Musical_Symbols */
-
-/* 'In_Ancient_Greek_Musical_Notation': Block */
-static const OnigCodePoint CR_In_Ancient_Greek_Musical_Notation[] = {
- 1,
- 0x1d200, 0x1d24f,
-}; /* CR_In_Ancient_Greek_Musical_Notation */
-
-/* 'In_Mayan_Numerals': Block */
-static const OnigCodePoint CR_In_Mayan_Numerals[] = {
- 1,
- 0x1d2e0, 0x1d2ff,
-}; /* CR_In_Mayan_Numerals */
-
-/* 'In_Tai_Xuan_Jing_Symbols': Block */
-static const OnigCodePoint CR_In_Tai_Xuan_Jing_Symbols[] = {
- 1,
- 0x1d300, 0x1d35f,
-}; /* CR_In_Tai_Xuan_Jing_Symbols */
-
-/* 'In_Counting_Rod_Numerals': Block */
-static const OnigCodePoint CR_In_Counting_Rod_Numerals[] = {
- 1,
- 0x1d360, 0x1d37f,
-}; /* CR_In_Counting_Rod_Numerals */
-
-/* 'In_Mathematical_Alphanumeric_Symbols': Block */
-static const OnigCodePoint CR_In_Mathematical_Alphanumeric_Symbols[] = {
- 1,
- 0x1d400, 0x1d7ff,
-}; /* CR_In_Mathematical_Alphanumeric_Symbols */
-
-/* 'In_Sutton_SignWriting': Block */
-static const OnigCodePoint CR_In_Sutton_SignWriting[] = {
- 1,
- 0x1d800, 0x1daaf,
-}; /* CR_In_Sutton_SignWriting */
-
-/* 'In_Glagolitic_Supplement': Block */
-static const OnigCodePoint CR_In_Glagolitic_Supplement[] = {
- 1,
- 0x1e000, 0x1e02f,
-}; /* CR_In_Glagolitic_Supplement */
-
-/* 'In_Nyiakeng_Puachue_Hmong': Block */
-static const OnigCodePoint CR_In_Nyiakeng_Puachue_Hmong[] = {
- 1,
- 0x1e100, 0x1e14f,
-}; /* CR_In_Nyiakeng_Puachue_Hmong */
-
-/* 'In_Wancho': Block */
-static const OnigCodePoint CR_In_Wancho[] = {
- 1,
- 0x1e2c0, 0x1e2ff,
-}; /* CR_In_Wancho */
-
-/* 'In_Mende_Kikakui': Block */
-static const OnigCodePoint CR_In_Mende_Kikakui[] = {
- 1,
- 0x1e800, 0x1e8df,
-}; /* CR_In_Mende_Kikakui */
-
-/* 'In_Adlam': Block */
-static const OnigCodePoint CR_In_Adlam[] = {
- 1,
- 0x1e900, 0x1e95f,
-}; /* CR_In_Adlam */
-
-/* 'In_Indic_Siyaq_Numbers': Block */
-static const OnigCodePoint CR_In_Indic_Siyaq_Numbers[] = {
- 1,
- 0x1ec70, 0x1ecbf,
-}; /* CR_In_Indic_Siyaq_Numbers */
-
-/* 'In_Ottoman_Siyaq_Numbers': Block */
-static const OnigCodePoint CR_In_Ottoman_Siyaq_Numbers[] = {
- 1,
- 0x1ed00, 0x1ed4f,
-}; /* CR_In_Ottoman_Siyaq_Numbers */
-
-/* 'In_Arabic_Mathematical_Alphabetic_Symbols': Block */
-static const OnigCodePoint CR_In_Arabic_Mathematical_Alphabetic_Symbols[] = {
- 1,
- 0x1ee00, 0x1eeff,
-}; /* CR_In_Arabic_Mathematical_Alphabetic_Symbols */
-
-/* 'In_Mahjong_Tiles': Block */
-static const OnigCodePoint CR_In_Mahjong_Tiles[] = {
- 1,
- 0x1f000, 0x1f02f,
-}; /* CR_In_Mahjong_Tiles */
-
-/* 'In_Domino_Tiles': Block */
-static const OnigCodePoint CR_In_Domino_Tiles[] = {
- 1,
- 0x1f030, 0x1f09f,
-}; /* CR_In_Domino_Tiles */
-
-/* 'In_Playing_Cards': Block */
-static const OnigCodePoint CR_In_Playing_Cards[] = {
- 1,
- 0x1f0a0, 0x1f0ff,
-}; /* CR_In_Playing_Cards */
-
-/* 'In_Enclosed_Alphanumeric_Supplement': Block */
-static const OnigCodePoint CR_In_Enclosed_Alphanumeric_Supplement[] = {
- 1,
- 0x1f100, 0x1f1ff,
-}; /* CR_In_Enclosed_Alphanumeric_Supplement */
-
-/* 'In_Enclosed_Ideographic_Supplement': Block */
-static const OnigCodePoint CR_In_Enclosed_Ideographic_Supplement[] = {
- 1,
- 0x1f200, 0x1f2ff,
-}; /* CR_In_Enclosed_Ideographic_Supplement */
-
-/* 'In_Miscellaneous_Symbols_and_Pictographs': Block */
-static const OnigCodePoint CR_In_Miscellaneous_Symbols_and_Pictographs[] = {
- 1,
- 0x1f300, 0x1f5ff,
-}; /* CR_In_Miscellaneous_Symbols_and_Pictographs */
-
-/* 'In_Emoticons': Block */
-static const OnigCodePoint CR_In_Emoticons[] = {
- 1,
- 0x1f600, 0x1f64f,
-}; /* CR_In_Emoticons */
-
-/* 'In_Ornamental_Dingbats': Block */
-static const OnigCodePoint CR_In_Ornamental_Dingbats[] = {
- 1,
- 0x1f650, 0x1f67f,
-}; /* CR_In_Ornamental_Dingbats */
-
-/* 'In_Transport_and_Map_Symbols': Block */
-static const OnigCodePoint CR_In_Transport_and_Map_Symbols[] = {
- 1,
- 0x1f680, 0x1f6ff,
-}; /* CR_In_Transport_and_Map_Symbols */
-
-/* 'In_Alchemical_Symbols': Block */
-static const OnigCodePoint CR_In_Alchemical_Symbols[] = {
- 1,
- 0x1f700, 0x1f77f,
-}; /* CR_In_Alchemical_Symbols */
-
-/* 'In_Geometric_Shapes_Extended': Block */
-static const OnigCodePoint CR_In_Geometric_Shapes_Extended[] = {
- 1,
- 0x1f780, 0x1f7ff,
-}; /* CR_In_Geometric_Shapes_Extended */
-
-/* 'In_Supplemental_Arrows_C': Block */
-static const OnigCodePoint CR_In_Supplemental_Arrows_C[] = {
- 1,
- 0x1f800, 0x1f8ff,
-}; /* CR_In_Supplemental_Arrows_C */
-
-/* 'In_Supplemental_Symbols_and_Pictographs': Block */
-static const OnigCodePoint CR_In_Supplemental_Symbols_and_Pictographs[] = {
- 1,
- 0x1f900, 0x1f9ff,
-}; /* CR_In_Supplemental_Symbols_and_Pictographs */
-
-/* 'In_Chess_Symbols': Block */
-static const OnigCodePoint CR_In_Chess_Symbols[] = {
- 1,
- 0x1fa00, 0x1fa6f,
-}; /* CR_In_Chess_Symbols */
-
-/* 'In_Symbols_and_Pictographs_Extended_A': Block */
-static const OnigCodePoint CR_In_Symbols_and_Pictographs_Extended_A[] = {
- 1,
- 0x1fa70, 0x1faff,
-}; /* CR_In_Symbols_and_Pictographs_Extended_A */
-
-/* 'In_CJK_Unified_Ideographs_Extension_B': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_B[] = {
- 1,
- 0x20000, 0x2a6df,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_B */
-
-/* 'In_CJK_Unified_Ideographs_Extension_C': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_C[] = {
- 1,
- 0x2a700, 0x2b73f,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_C */
-
-/* 'In_CJK_Unified_Ideographs_Extension_D': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_D[] = {
- 1,
- 0x2b740, 0x2b81f,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_D */
-
-/* 'In_CJK_Unified_Ideographs_Extension_E': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_E[] = {
- 1,
- 0x2b820, 0x2ceaf,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_E */
-
-/* 'In_CJK_Unified_Ideographs_Extension_F': Block */
-static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_F[] = {
- 1,
- 0x2ceb0, 0x2ebef,
-}; /* CR_In_CJK_Unified_Ideographs_Extension_F */
-
-/* 'In_CJK_Compatibility_Ideographs_Supplement': Block */
-static const OnigCodePoint CR_In_CJK_Compatibility_Ideographs_Supplement[] = {
- 1,
- 0x2f800, 0x2fa1f,
-}; /* CR_In_CJK_Compatibility_Ideographs_Supplement */
-
-/* 'In_Tags': Block */
-static const OnigCodePoint CR_In_Tags[] = {
- 1,
- 0xe0000, 0xe007f,
-}; /* CR_In_Tags */
-
-/* 'In_Variation_Selectors_Supplement': Block */
-static const OnigCodePoint CR_In_Variation_Selectors_Supplement[] = {
- 1,
- 0xe0100, 0xe01ef,
-}; /* CR_In_Variation_Selectors_Supplement */
-
-/* 'In_Supplementary_Private_Use_Area_A': Block */
-static const OnigCodePoint CR_In_Supplementary_Private_Use_Area_A[] = {
- 1,
- 0xf0000, 0xfffff,
-}; /* CR_In_Supplementary_Private_Use_Area_A */
-
-/* 'In_Supplementary_Private_Use_Area_B': Block */
-static const OnigCodePoint CR_In_Supplementary_Private_Use_Area_B[] = {
- 1,
- 0x100000, 0x10ffff,
-}; /* CR_In_Supplementary_Private_Use_Area_B */
-
-/* 'In_No_Block': Block */
-static const OnigCodePoint CR_In_No_Block[] = {
- 53,
- 0x0870, 0x089f,
- 0x2fe0, 0x2fef,
- 0x10200, 0x1027f,
- 0x103e0, 0x103ff,
- 0x10570, 0x105ff,
- 0x10780, 0x107ff,
- 0x108b0, 0x108df,
- 0x10940, 0x1097f,
- 0x10aa0, 0x10abf,
- 0x10bb0, 0x10bff,
- 0x10c50, 0x10c7f,
- 0x10d40, 0x10e5f,
- 0x10e80, 0x10eff,
- 0x10f70, 0x10fdf,
- 0x11250, 0x1127f,
- 0x11380, 0x113ff,
- 0x114e0, 0x1157f,
- 0x116d0, 0x116ff,
- 0x11740, 0x117ff,
- 0x11850, 0x1189f,
- 0x11900, 0x1199f,
- 0x11ab0, 0x11abf,
- 0x11b00, 0x11bff,
- 0x11cc0, 0x11cff,
- 0x11db0, 0x11edf,
- 0x11f00, 0x11fbf,
- 0x12550, 0x12fff,
- 0x13440, 0x143ff,
- 0x14680, 0x167ff,
- 0x16a70, 0x16acf,
- 0x16b90, 0x16e3f,
- 0x16ea0, 0x16eff,
- 0x16fa0, 0x16fdf,
- 0x18b00, 0x1afff,
- 0x1b300, 0x1bbff,
- 0x1bcb0, 0x1cfff,
- 0x1d250, 0x1d2df,
- 0x1d380, 0x1d3ff,
- 0x1dab0, 0x1dfff,
- 0x1e030, 0x1e0ff,
- 0x1e150, 0x1e2bf,
- 0x1e300, 0x1e7ff,
- 0x1e8e0, 0x1e8ff,
- 0x1e960, 0x1ec6f,
- 0x1ecc0, 0x1ecff,
- 0x1ed50, 0x1edff,
- 0x1ef00, 0x1efff,
- 0x1fb00, 0x1ffff,
- 0x2a6e0, 0x2a6ff,
- 0x2ebf0, 0x2f7ff,
- 0x2fa20, 0xdffff,
- 0xe0080, 0xe00ff,
- 0xe01f0, 0xeffff,
-}; /* CR_In_No_Block */
-
-#endif /* USE_UNICODE_PROPERTIES */
-static const OnigCodePoint* const CodeRanges[] = {
- CR_NEWLINE,
- CR_Alpha,
- CR_Blank,
- CR_Cntrl,
- CR_Digit,
- CR_Graph,
- CR_Lower,
- CR_Print,
- CR_XPosixPunct,
- CR_Space,
- CR_Upper,
- CR_XDigit,
- CR_Word,
- CR_Alnum,
- CR_ASCII,
- CR_Punct,
-#ifdef USE_UNICODE_PROPERTIES
- CR_Any,
- CR_Assigned,
- CR_C,
- CR_Cc,
- CR_Cf,
- CR_Cn,
- CR_Co,
- CR_Cs,
- CR_L,
- CR_LC,
- CR_Ll,
- CR_Lm,
- CR_Lo,
- CR_Lt,
- CR_Lu,
- CR_M,
- CR_Mc,
- CR_Me,
- CR_Mn,
- CR_N,
- CR_Nd,
- CR_Nl,
- CR_No,
- CR_P,
- CR_Pc,
- CR_Pd,
- CR_Pe,
- CR_Pf,
- CR_Pi,
- CR_Po,
- CR_Ps,
- CR_S,
- CR_Sc,
- CR_Sk,
- CR_Sm,
- CR_So,
- CR_Z,
- CR_Zl,
- CR_Zp,
- CR_Zs,
- CR_Math,
- CR_Alphabetic,
- CR_Lowercase,
- CR_Uppercase,
- CR_Cased,
- CR_Case_Ignorable,
- CR_Changes_When_Lowercased,
- CR_Changes_When_Uppercased,
- CR_Changes_When_Titlecased,
- CR_Changes_When_Casefolded,
- CR_Changes_When_Casemapped,
- CR_ID_Start,
- CR_ID_Continue,
- CR_XID_Start,
- CR_XID_Continue,
- CR_Default_Ignorable_Code_Point,
- CR_Grapheme_Extend,
- CR_Grapheme_Base,
- CR_Grapheme_Link,
- CR_Common,
- CR_Latin,
- CR_Greek,
- CR_Cyrillic,
- CR_Armenian,
- CR_Hebrew,
- CR_Arabic,
- CR_Syriac,
- CR_Thaana,
- CR_Devanagari,
- CR_Bengali,
- CR_Gurmukhi,
- CR_Gujarati,
- CR_Oriya,
- CR_Tamil,
- CR_Telugu,
- CR_Kannada,
- CR_Malayalam,
- CR_Sinhala,
- CR_Thai,
- CR_Lao,
- CR_Tibetan,
- CR_Myanmar,
- CR_Georgian,
- CR_Hangul,
- CR_Ethiopic,
- CR_Cherokee,
- CR_Canadian_Aboriginal,
- CR_Ogham,
- CR_Runic,
- CR_Khmer,
- CR_Mongolian,
- CR_Hiragana,
- CR_Katakana,
- CR_Bopomofo,
- CR_Han,
- CR_Yi,
- CR_Old_Italic,
- CR_Gothic,
- CR_Deseret,
- CR_Inherited,
- CR_Tagalog,
- CR_Hanunoo,
- CR_Buhid,
- CR_Tagbanwa,
- CR_Limbu,
- CR_Tai_Le,
- CR_Linear_B,
- CR_Ugaritic,
- CR_Shavian,
- CR_Osmanya,
- CR_Cypriot,
- CR_Braille,
- CR_Buginese,
- CR_Coptic,
- CR_New_Tai_Lue,
- CR_Glagolitic,
- CR_Tifinagh,
- CR_Syloti_Nagri,
- CR_Old_Persian,
- CR_Kharoshthi,
- CR_Balinese,
- CR_Cuneiform,
- CR_Phoenician,
- CR_Phags_Pa,
- CR_Nko,
- CR_Sundanese,
- CR_Lepcha,
- CR_Ol_Chiki,
- CR_Vai,
- CR_Saurashtra,
- CR_Kayah_Li,
- CR_Rejang,
- CR_Lycian,
- CR_Carian,
- CR_Lydian,
- CR_Cham,
- CR_Tai_Tham,
- CR_Tai_Viet,
- CR_Avestan,
- CR_Egyptian_Hieroglyphs,
- CR_Samaritan,
- CR_Lisu,
- CR_Bamum,
- CR_Javanese,
- CR_Meetei_Mayek,
- CR_Imperial_Aramaic,
- CR_Old_South_Arabian,
- CR_Inscriptional_Parthian,
- CR_Inscriptional_Pahlavi,
- CR_Old_Turkic,
- CR_Kaithi,
- CR_Batak,
- CR_Brahmi,
- CR_Mandaic,
- CR_Chakma,
- CR_Meroitic_Cursive,
- CR_Meroitic_Hieroglyphs,
- CR_Miao,
- CR_Sharada,
- CR_Sora_Sompeng,
- CR_Takri,
- CR_Caucasian_Albanian,
- CR_Bassa_Vah,
- CR_Duployan,
- CR_Elbasan,
- CR_Grantha,
- CR_Pahawh_Hmong,
- CR_Khojki,
- CR_Linear_A,
- CR_Mahajani,
- CR_Manichaean,
- CR_Mende_Kikakui,
- CR_Modi,
- CR_Mro,
- CR_Old_North_Arabian,
- CR_Nabataean,
- CR_Palmyrene,
- CR_Pau_Cin_Hau,
- CR_Old_Permic,
- CR_Psalter_Pahlavi,
- CR_Siddham,
- CR_Khudawadi,
- CR_Tirhuta,
- CR_Warang_Citi,
- CR_Ahom,
- CR_Anatolian_Hieroglyphs,
- CR_Hatran,
- CR_Multani,
- CR_Old_Hungarian,
- CR_SignWriting,
- CR_Adlam,
- CR_Bhaiksuki,
- CR_Marchen,
- CR_Newa,
- CR_Osage,
- CR_Tangut,
- CR_Masaram_Gondi,
- CR_Nushu,
- CR_Soyombo,
- CR_Zanabazar_Square,
- CR_Dogra,
- CR_Gunjala_Gondi,
- CR_Makasar,
- CR_Medefaidrin,
- CR_Hanifi_Rohingya,
- CR_Sogdian,
- CR_Old_Sogdian,
- CR_Elymaic,
- CR_Nandinagari,
- CR_Nyiakeng_Puachue_Hmong,
- CR_Wancho,
- CR_White_Space,
- CR_Bidi_Control,
- CR_Join_Control,
- CR_Dash,
- CR_Hyphen,
- CR_Quotation_Mark,
- CR_Terminal_Punctuation,
- CR_Other_Math,
- CR_Hex_Digit,
- CR_ASCII_Hex_Digit,
- CR_Other_Alphabetic,
- CR_Ideographic,
- CR_Diacritic,
- CR_Extender,
- CR_Other_Lowercase,
- CR_Other_Uppercase,
- CR_Noncharacter_Code_Point,
- CR_Other_Grapheme_Extend,
- CR_IDS_Binary_Operator,
- CR_IDS_Trinary_Operator,
- CR_Radical,
- CR_Unified_Ideograph,
- CR_Other_Default_Ignorable_Code_Point,
- CR_Deprecated,
- CR_Soft_Dotted,
- CR_Logical_Order_Exception,
- CR_Other_ID_Start,
- CR_Other_ID_Continue,
- CR_Sentence_Terminal,
- CR_Variation_Selector,
- CR_Pattern_White_Space,
- CR_Pattern_Syntax,
- CR_Prepended_Concatenation_Mark,
- CR_Regional_Indicator,
- CR_Emoji,
- CR_Emoji_Presentation,
- CR_Emoji_Modifier,
- CR_Emoji_Modifier_Base,
- CR_Emoji_Component,
- CR_Extended_Pictographic,
- CR_Unknown,
-#ifdef USE_UNICODE_AGE_PROPERTIES
- CR_Age_1_1,
- CR_Age_2_0,
- CR_Age_2_1,
- CR_Age_3_0,
- CR_Age_3_1,
- CR_Age_3_2,
- CR_Age_4_0,
- CR_Age_4_1,
- CR_Age_5_0,
- CR_Age_5_1,
- CR_Age_5_2,
- CR_Age_6_0,
- CR_Age_6_1,
- CR_Age_6_2,
- CR_Age_6_3,
- CR_Age_7_0,
- CR_Age_8_0,
- CR_Age_9_0,
- CR_Age_10_0,
- CR_Age_11_0,
- CR_Age_12_0,
- CR_Age_12_1,
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- CR_Grapheme_Cluster_Break_Prepend,
- CR_Grapheme_Cluster_Break_CR,
- CR_Grapheme_Cluster_Break_LF,
- CR_Grapheme_Cluster_Break_Control,
- CR_Grapheme_Cluster_Break_Extend,
- CR_Grapheme_Cluster_Break_Regional_Indicator,
- CR_Grapheme_Cluster_Break_SpacingMark,
- CR_Grapheme_Cluster_Break_L,
- CR_Grapheme_Cluster_Break_V,
- CR_Grapheme_Cluster_Break_T,
- CR_Grapheme_Cluster_Break_LV,
- CR_Grapheme_Cluster_Break_LVT,
- CR_Grapheme_Cluster_Break_ZWJ,
- CR_In_Basic_Latin,
- CR_In_Latin_1_Supplement,
- CR_In_Latin_Extended_A,
- CR_In_Latin_Extended_B,
- CR_In_IPA_Extensions,
- CR_In_Spacing_Modifier_Letters,
- CR_In_Combining_Diacritical_Marks,
- CR_In_Greek_and_Coptic,
- CR_In_Cyrillic,
- CR_In_Cyrillic_Supplement,
- CR_In_Armenian,
- CR_In_Hebrew,
- CR_In_Arabic,
- CR_In_Syriac,
- CR_In_Arabic_Supplement,
- CR_In_Thaana,
- CR_In_NKo,
- CR_In_Samaritan,
- CR_In_Mandaic,
- CR_In_Syriac_Supplement,
- CR_In_Arabic_Extended_A,
- CR_In_Devanagari,
- CR_In_Bengali,
- CR_In_Gurmukhi,
- CR_In_Gujarati,
- CR_In_Oriya,
- CR_In_Tamil,
- CR_In_Telugu,
- CR_In_Kannada,
- CR_In_Malayalam,
- CR_In_Sinhala,
- CR_In_Thai,
- CR_In_Lao,
- CR_In_Tibetan,
- CR_In_Myanmar,
- CR_In_Georgian,
- CR_In_Hangul_Jamo,
- CR_In_Ethiopic,
- CR_In_Ethiopic_Supplement,
- CR_In_Cherokee,
- CR_In_Unified_Canadian_Aboriginal_Syllabics,
- CR_In_Ogham,
- CR_In_Runic,
- CR_In_Tagalog,
- CR_In_Hanunoo,
- CR_In_Buhid,
- CR_In_Tagbanwa,
- CR_In_Khmer,
- CR_In_Mongolian,
- CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended,
- CR_In_Limbu,
- CR_In_Tai_Le,
- CR_In_New_Tai_Lue,
- CR_In_Khmer_Symbols,
- CR_In_Buginese,
- CR_In_Tai_Tham,
- CR_In_Combining_Diacritical_Marks_Extended,
- CR_In_Balinese,
- CR_In_Sundanese,
- CR_In_Batak,
- CR_In_Lepcha,
- CR_In_Ol_Chiki,
- CR_In_Cyrillic_Extended_C,
- CR_In_Georgian_Extended,
- CR_In_Sundanese_Supplement,
- CR_In_Vedic_Extensions,
- CR_In_Phonetic_Extensions,
- CR_In_Phonetic_Extensions_Supplement,
- CR_In_Combining_Diacritical_Marks_Supplement,
- CR_In_Latin_Extended_Additional,
- CR_In_Greek_Extended,
- CR_In_General_Punctuation,
- CR_In_Superscripts_and_Subscripts,
- CR_In_Currency_Symbols,
- CR_In_Combining_Diacritical_Marks_for_Symbols,
- CR_In_Letterlike_Symbols,
- CR_In_Number_Forms,
- CR_In_Arrows,
- CR_In_Mathematical_Operators,
- CR_In_Miscellaneous_Technical,
- CR_In_Control_Pictures,
- CR_In_Optical_Character_Recognition,
- CR_In_Enclosed_Alphanumerics,
- CR_In_Box_Drawing,
- CR_In_Block_Elements,
- CR_In_Geometric_Shapes,
- CR_In_Miscellaneous_Symbols,
- CR_In_Dingbats,
- CR_In_Miscellaneous_Mathematical_Symbols_A,
- CR_In_Supplemental_Arrows_A,
- CR_In_Braille_Patterns,
- CR_In_Supplemental_Arrows_B,
- CR_In_Miscellaneous_Mathematical_Symbols_B,
- CR_In_Supplemental_Mathematical_Operators,
- CR_In_Miscellaneous_Symbols_and_Arrows,
- CR_In_Glagolitic,
- CR_In_Latin_Extended_C,
- CR_In_Coptic,
- CR_In_Georgian_Supplement,
- CR_In_Tifinagh,
- CR_In_Ethiopic_Extended,
- CR_In_Cyrillic_Extended_A,
- CR_In_Supplemental_Punctuation,
- CR_In_CJK_Radicals_Supplement,
- CR_In_Kangxi_Radicals,
- CR_In_Ideographic_Description_Characters,
- CR_In_CJK_Symbols_and_Punctuation,
- CR_In_Hiragana,
- CR_In_Katakana,
- CR_In_Bopomofo,
- CR_In_Hangul_Compatibility_Jamo,
- CR_In_Kanbun,
- CR_In_Bopomofo_Extended,
- CR_In_CJK_Strokes,
- CR_In_Katakana_Phonetic_Extensions,
- CR_In_Enclosed_CJK_Letters_and_Months,
- CR_In_CJK_Compatibility,
- CR_In_CJK_Unified_Ideographs_Extension_A,
- CR_In_Yijing_Hexagram_Symbols,
- CR_In_CJK_Unified_Ideographs,
- CR_In_Yi_Syllables,
- CR_In_Yi_Radicals,
- CR_In_Lisu,
- CR_In_Vai,
- CR_In_Cyrillic_Extended_B,
- CR_In_Bamum,
- CR_In_Modifier_Tone_Letters,
- CR_In_Latin_Extended_D,
- CR_In_Syloti_Nagri,
- CR_In_Common_Indic_Number_Forms,
- CR_In_Phags_pa,
- CR_In_Saurashtra,
- CR_In_Devanagari_Extended,
- CR_In_Kayah_Li,
- CR_In_Rejang,
- CR_In_Hangul_Jamo_Extended_A,
- CR_In_Javanese,
- CR_In_Myanmar_Extended_B,
- CR_In_Cham,
- CR_In_Myanmar_Extended_A,
- CR_In_Tai_Viet,
- CR_In_Meetei_Mayek_Extensions,
- CR_In_Ethiopic_Extended_A,
- CR_In_Latin_Extended_E,
- CR_In_Cherokee_Supplement,
- CR_In_Meetei_Mayek,
- CR_In_Hangul_Syllables,
- CR_In_Hangul_Jamo_Extended_B,
- CR_In_High_Surrogates,
- CR_In_High_Private_Use_Surrogates,
- CR_In_Low_Surrogates,
- CR_In_Private_Use_Area,
- CR_In_CJK_Compatibility_Ideographs,
- CR_In_Alphabetic_Presentation_Forms,
- CR_In_Arabic_Presentation_Forms_A,
- CR_In_Variation_Selectors,
- CR_In_Vertical_Forms,
- CR_In_Combining_Half_Marks,
- CR_In_CJK_Compatibility_Forms,
- CR_In_Small_Form_Variants,
- CR_In_Arabic_Presentation_Forms_B,
- CR_In_Halfwidth_and_Fullwidth_Forms,
- CR_In_Specials,
- CR_In_Linear_B_Syllabary,
- CR_In_Linear_B_Ideograms,
- CR_In_Aegean_Numbers,
- CR_In_Ancient_Greek_Numbers,
- CR_In_Ancient_Symbols,
- CR_In_Phaistos_Disc,
- CR_In_Lycian,
- CR_In_Carian,
- CR_In_Coptic_Epact_Numbers,
- CR_In_Old_Italic,
- CR_In_Gothic,
- CR_In_Old_Permic,
- CR_In_Ugaritic,
- CR_In_Old_Persian,
- CR_In_Deseret,
- CR_In_Shavian,
- CR_In_Osmanya,
- CR_In_Osage,
- CR_In_Elbasan,
- CR_In_Caucasian_Albanian,
- CR_In_Linear_A,
- CR_In_Cypriot_Syllabary,
- CR_In_Imperial_Aramaic,
- CR_In_Palmyrene,
- CR_In_Nabataean,
- CR_In_Hatran,
- CR_In_Phoenician,
- CR_In_Lydian,
- CR_In_Meroitic_Hieroglyphs,
- CR_In_Meroitic_Cursive,
- CR_In_Kharoshthi,
- CR_In_Old_South_Arabian,
- CR_In_Old_North_Arabian,
- CR_In_Manichaean,
- CR_In_Avestan,
- CR_In_Inscriptional_Parthian,
- CR_In_Inscriptional_Pahlavi,
- CR_In_Psalter_Pahlavi,
- CR_In_Old_Turkic,
- CR_In_Old_Hungarian,
- CR_In_Hanifi_Rohingya,
- CR_In_Rumi_Numeral_Symbols,
- CR_In_Old_Sogdian,
- CR_In_Sogdian,
- CR_In_Elymaic,
- CR_In_Brahmi,
- CR_In_Kaithi,
- CR_In_Sora_Sompeng,
- CR_In_Chakma,
- CR_In_Mahajani,
- CR_In_Sharada,
- CR_In_Sinhala_Archaic_Numbers,
- CR_In_Khojki,
- CR_In_Multani,
- CR_In_Khudawadi,
- CR_In_Grantha,
- CR_In_Newa,
- CR_In_Tirhuta,
- CR_In_Siddham,
- CR_In_Modi,
- CR_In_Mongolian_Supplement,
- CR_In_Takri,
- CR_In_Ahom,
- CR_In_Dogra,
- CR_In_Warang_Citi,
- CR_In_Nandinagari,
- CR_In_Zanabazar_Square,
- CR_In_Soyombo,
- CR_In_Pau_Cin_Hau,
- CR_In_Bhaiksuki,
- CR_In_Marchen,
- CR_In_Masaram_Gondi,
- CR_In_Gunjala_Gondi,
- CR_In_Makasar,
- CR_In_Tamil_Supplement,
- CR_In_Cuneiform,
- CR_In_Cuneiform_Numbers_and_Punctuation,
- CR_In_Early_Dynastic_Cuneiform,
- CR_In_Egyptian_Hieroglyphs,
- CR_In_Egyptian_Hieroglyph_Format_Controls,
- CR_In_Anatolian_Hieroglyphs,
- CR_In_Bamum_Supplement,
- CR_In_Mro,
- CR_In_Bassa_Vah,
- CR_In_Pahawh_Hmong,
- CR_In_Medefaidrin,
- CR_In_Miao,
- CR_In_Ideographic_Symbols_and_Punctuation,
- CR_In_Tangut,
- CR_In_Tangut_Components,
- CR_In_Kana_Supplement,
- CR_In_Kana_Extended_A,
- CR_In_Small_Kana_Extension,
- CR_In_Nushu,
- CR_In_Duployan,
- CR_In_Shorthand_Format_Controls,
- CR_In_Byzantine_Musical_Symbols,
- CR_In_Musical_Symbols,
- CR_In_Ancient_Greek_Musical_Notation,
- CR_In_Mayan_Numerals,
- CR_In_Tai_Xuan_Jing_Symbols,
- CR_In_Counting_Rod_Numerals,
- CR_In_Mathematical_Alphanumeric_Symbols,
- CR_In_Sutton_SignWriting,
- CR_In_Glagolitic_Supplement,
- CR_In_Nyiakeng_Puachue_Hmong,
- CR_In_Wancho,
- CR_In_Mende_Kikakui,
- CR_In_Adlam,
- CR_In_Indic_Siyaq_Numbers,
- CR_In_Ottoman_Siyaq_Numbers,
- CR_In_Arabic_Mathematical_Alphabetic_Symbols,
- CR_In_Mahjong_Tiles,
- CR_In_Domino_Tiles,
- CR_In_Playing_Cards,
- CR_In_Enclosed_Alphanumeric_Supplement,
- CR_In_Enclosed_Ideographic_Supplement,
- CR_In_Miscellaneous_Symbols_and_Pictographs,
- CR_In_Emoticons,
- CR_In_Ornamental_Dingbats,
- CR_In_Transport_and_Map_Symbols,
- CR_In_Alchemical_Symbols,
- CR_In_Geometric_Shapes_Extended,
- CR_In_Supplemental_Arrows_C,
- CR_In_Supplemental_Symbols_and_Pictographs,
- CR_In_Chess_Symbols,
- CR_In_Symbols_and_Pictographs_Extended_A,
- CR_In_CJK_Unified_Ideographs_Extension_B,
- CR_In_CJK_Unified_Ideographs_Extension_C,
- CR_In_CJK_Unified_Ideographs_Extension_D,
- CR_In_CJK_Unified_Ideographs_Extension_E,
- CR_In_CJK_Unified_Ideographs_Extension_F,
- CR_In_CJK_Compatibility_Ideographs_Supplement,
- CR_In_Tags,
- CR_In_Variation_Selectors_Supplement,
- CR_In_Supplementary_Private_Use_Area_A,
- CR_In_Supplementary_Private_Use_Area_B,
- CR_In_No_Block,
-#endif /* USE_UNICODE_PROPERTIES */
-};
-struct uniname2ctype_struct {
- short name;
- unsigned short ctype;
-};
-#define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
-
-static const struct uniname2ctype_struct *uniname2ctype_p(
-#if !(1+0) /* if ANSI, old style not to conflict with generated prototype */
- const char *, unsigned int
-#endif
-);
-
-#ifndef USE_UNICODE_PROPERTIES
-#define TOTAL_KEYWORDS 15
-#define MIN_WORD_LENGTH 4
-#define MAX_WORD_LENGTH 11
-#define MIN_HASH_VALUE 6
-#define MAX_HASH_VALUE 20
-/* maximum key range = 15, duplicates = 0 */
-#else /* USE_UNICODE_PROPERTIES */
-#ifndef USE_UNICODE_AGE_PROPERTIES
-#define TOTAL_KEYWORDS 814
-#else /* USE_UNICODE_AGE_PROPERTIES */
-#define TOTAL_KEYWORDS 836
-#endif /* USE_UNICODE_AGE_PROPERTIES */
-#define MIN_WORD_LENGTH 1
-#define MAX_WORD_LENGTH 44
-#define MIN_HASH_VALUE 11
-#define MAX_HASH_VALUE 6098
-/* maximum key range = 6088, duplicates = 0 */
-#endif /* USE_UNICODE_PROPERTIES */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static unsigned int
-uniname2ctype_hash (register const char *str, register size_t len)
-{
-#ifndef USE_UNICODE_PROPERTIES
- static const unsigned char asso_values[] =
-#else /* USE_UNICODE_PROPERTIES */
- static const unsigned short asso_values[] =
-#endif /* USE_UNICODE_PROPERTIES */
- {
-#ifndef USE_UNICODE_PROPERTIES
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 3, 12, 5,
- 4, 21, 21, 10, 21, 1, 21, 21, 11, 21,
- 2, 1, 1, 21, 1, 7, 4, 6, 21, 1,
- 4, 21, 21, 21, 21, 21, 21, 21
-#else /* USE_UNICODE_PROPERTIES */
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
-#ifndef USE_UNICODE_AGE_PROPERTIES
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
-#else /* USE_UNICODE_AGE_PROPERTIES */
- 6099, 6099, 6099, 6099, 6099, 6099, 17, 6099, 3, 1,
- 4, 13, 3, 22, 9, 16, 12, 5, 6099, 6099,
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
- 6099, 6099, 6099, 6099, 6099, 6099, 6099, 1, 1425, 113,
- 437, 37, 1023, 1071, 1051, 4, 1492, 9, 500, 88,
- 8, 18, 1371, 797, 54, 203, 310, 619, 1608, 603,
- 364, 1438, 20, 1, 3, 6099, 6099, 6099, 6099, 6099
-#endif /* USE_UNICODE_PROPERTIES */
- };
-#ifndef USE_UNICODE_PROPERTIES
- return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
-#else /* USE_UNICODE_PROPERTIES */
- register unsigned int hval = (unsigned int)len;
-
- switch (hval)
- {
- default:
- hval += asso_values[(unsigned char)str[15]];
- /*FALLTHROUGH*/
- case 15:
- case 14:
- case 13:
- case 12:
- hval += asso_values[(unsigned char)str[11]];
- /*FALLTHROUGH*/
- case 11:
- case 10:
- case 9:
- case 8:
- case 7:
- case 6:
- hval += asso_values[(unsigned char)str[5]];
- /*FALLTHROUGH*/
- case 5:
- hval += asso_values[(unsigned char)str[4]];
- /*FALLTHROUGH*/
- case 4:
- case 3:
- hval += asso_values[(unsigned char)str[2]];
- /*FALLTHROUGH*/
- case 2:
- hval += asso_values[(unsigned char)str[1]];
- /*FALLTHROUGH*/
- case 1:
- hval += asso_values[(unsigned char)str[0]+2];
- break;
- }
- return hval + asso_values[(unsigned char)str[len - 1]];
-#endif /* USE_UNICODE_PROPERTIES */
-}
-
-struct uniname2ctype_pool_t
- {
-#ifndef USE_UNICODE_PROPERTIES
- char uniname2ctype_pool_str6[sizeof("word")];
- char uniname2ctype_pool_str7[sizeof("print")];
- char uniname2ctype_pool_str8[sizeof("punct")];
- char uniname2ctype_pool_str9[sizeof("alpha")];
- char uniname2ctype_pool_str10[sizeof("alnum")];
- char uniname2ctype_pool_str11[sizeof("xdigit")];
- char uniname2ctype_pool_str12[sizeof("upper")];
- char uniname2ctype_pool_str13[sizeof("ascii")];
- char uniname2ctype_pool_str14[sizeof("cntrl")];
- char uniname2ctype_pool_str15[sizeof("space")];
- char uniname2ctype_pool_str16[sizeof("xposixpunct")];
- char uniname2ctype_pool_str17[sizeof("lower")];
- char uniname2ctype_pool_str18[sizeof("graph")];
- char uniname2ctype_pool_str19[sizeof("digit")];
- char uniname2ctype_pool_str20[sizeof("blank")];
-#else /* USE_UNICODE_PROPERTIES */
- char uniname2ctype_pool_str11[sizeof("yi")];
- char uniname2ctype_pool_str17[sizeof("yiii")];
- char uniname2ctype_pool_str22[sizeof("lana")];
- char uniname2ctype_pool_str24[sizeof("z")];
- char uniname2ctype_pool_str25[sizeof("lina")];
- char uniname2ctype_pool_str33[sizeof("maka")];
- char uniname2ctype_pool_str35[sizeof("mani")];
- char uniname2ctype_pool_str36[sizeof("mn")];
- char uniname2ctype_pool_str45[sizeof("miao")];
- char uniname2ctype_pool_str46[sizeof("lo")];
- char uniname2ctype_pool_str47[sizeof("ci")];
- char uniname2ctype_pool_str48[sizeof("lao")];
- char uniname2ctype_pool_str49[sizeof("laoo")];
- char uniname2ctype_pool_str52[sizeof("inkannada")];
- char uniname2ctype_pool_str55[sizeof("cn")];
- char uniname2ctype_pool_str64[sizeof("pi")];
- char uniname2ctype_pool_str66[sizeof("innko")];
- char uniname2ctype_pool_str67[sizeof("zzzz")];
- char uniname2ctype_pool_str71[sizeof("gran")];
- char uniname2ctype_pool_str75[sizeof("co")];
- char uniname2ctype_pool_str83[sizeof("lineara")];
- char uniname2ctype_pool_str86[sizeof("mark")];
- char uniname2ctype_pool_str92[sizeof("po")];
- char uniname2ctype_pool_str94[sizeof("me")];
- char uniname2ctype_pool_str100[sizeof("cari")];
- char uniname2ctype_pool_str101[sizeof("inkharoshthi")];
- char uniname2ctype_pool_str102[sizeof("kana")];
- char uniname2ctype_pool_str103[sizeof("loe")];
- char uniname2ctype_pool_str107[sizeof("m")];
- char uniname2ctype_pool_str108[sizeof("grek")];
- char uniname2ctype_pool_str111[sizeof("mro")];
- char uniname2ctype_pool_str112[sizeof("mroo")];
- char uniname2ctype_pool_str115[sizeof("carian")];
- char uniname2ctype_pool_str117[sizeof("geor")];
- char uniname2ctype_pool_str118[sizeof("greek")];
- char uniname2ctype_pool_str122[sizeof("gonm")];
- char uniname2ctype_pool_str129[sizeof("mendekikakui")];
- char uniname2ctype_pool_str130[sizeof("pe")];
- char uniname2ctype_pool_str131[sizeof("mero")];
- char uniname2ctype_pool_str134[sizeof("inosmanya")];
- char uniname2ctype_pool_str139[sizeof("cakm")];
- char uniname2ctype_pool_str145[sizeof("inmanichaean")];
- char uniname2ctype_pool_str146[sizeof("inmro")];
- char uniname2ctype_pool_str148[sizeof("inmiao")];
- char uniname2ctype_pool_str149[sizeof("inchakma")];
- char uniname2ctype_pool_str151[sizeof("c")];
- char uniname2ctype_pool_str152[sizeof("mandaic")];
- char uniname2ctype_pool_str153[sizeof("meeteimayek")];
- char uniname2ctype_pool_str161[sizeof("inarmenian")];
- char uniname2ctype_pool_str177[sizeof("inmyanmar")];
- char uniname2ctype_pool_str178[sizeof("inmakasar")];
- char uniname2ctype_pool_str183[sizeof("common")];
- char uniname2ctype_pool_str186[sizeof("lm")];
- char uniname2ctype_pool_str190[sizeof("marc")];
- char uniname2ctype_pool_str203[sizeof("inrunic")];
- char uniname2ctype_pool_str204[sizeof("incarian")];
- char uniname2ctype_pool_str210[sizeof("inideographicsymbolsandpunctuation")];
- char uniname2ctype_pool_str212[sizeof("inkhmer")];
- char uniname2ctype_pool_str213[sizeof("qaai")];
- char uniname2ctype_pool_str218[sizeof("inahom")];
- char uniname2ctype_pool_str226[sizeof("merc")];
- char uniname2ctype_pool_str231[sizeof("combiningmark")];
- char uniname2ctype_pool_str236[sizeof("lc")];
- char uniname2ctype_pool_str237[sizeof("perm")];
- char uniname2ctype_pool_str246[sizeof("mc")];
- char uniname2ctype_pool_str250[sizeof("connectorpunctuation")];
- char uniname2ctype_pool_str253[sizeof("cans")];
- char uniname2ctype_pool_str260[sizeof("incuneiformnumbersandpunctuation")];
- char uniname2ctype_pool_str263[sizeof("armi")];
- char uniname2ctype_pool_str265[sizeof("cc")];
- char uniname2ctype_pool_str267[sizeof("armn")];
- char uniname2ctype_pool_str268[sizeof("incherokee")];
- char uniname2ctype_pool_str270[sizeof("prependedconcatenationmark")];
- char uniname2ctype_pool_str274[sizeof("incuneiform")];
- char uniname2ctype_pool_str275[sizeof("inavestan")];
- char uniname2ctype_pool_str281[sizeof("inipaextensions")];
- char uniname2ctype_pool_str282[sizeof("pc")];
- char uniname2ctype_pool_str283[sizeof("armenian")];
- char uniname2ctype_pool_str285[sizeof("insharada")];
- char uniname2ctype_pool_str289[sizeof("inmarchen")];
- char uniname2ctype_pool_str293[sizeof("makasar")];
- char uniname2ctype_pool_str297[sizeof("masaramgondi")];
- char uniname2ctype_pool_str301[sizeof("inarrows")];
- char uniname2ctype_pool_str311[sizeof("incyrillic")];
- char uniname2ctype_pool_str313[sizeof("incham")];
- char uniname2ctype_pool_str315[sizeof("qmark")];
- char uniname2ctype_pool_str320[sizeof("ri")];
- char uniname2ctype_pool_str322[sizeof("qaac")];
- char uniname2ctype_pool_str328[sizeof("insamaritan")];
- char uniname2ctype_pool_str331[sizeof("latn")];
- char uniname2ctype_pool_str335[sizeof("inmasaramgondi")];
- char uniname2ctype_pool_str338[sizeof("inthaana")];
- char uniname2ctype_pool_str340[sizeof("latin")];
- char uniname2ctype_pool_str342[sizeof("inthai")];
- char uniname2ctype_pool_str345[sizeof("lineseparator")];
- char uniname2ctype_pool_str346[sizeof("pcm")];
- char uniname2ctype_pool_str348[sizeof("inkatakana")];
- char uniname2ctype_pool_str352[sizeof("inkaithi")];
- char uniname2ctype_pool_str357[sizeof("inzanabazarsquare")];
- char uniname2ctype_pool_str362[sizeof("inscriptionalparthian")];
- char uniname2ctype_pool_str366[sizeof("initialpunctuation")];
- char uniname2ctype_pool_str373[sizeof("mtei")];
- char uniname2ctype_pool_str376[sizeof("vai")];
- char uniname2ctype_pool_str377[sizeof("vaii")];
- char uniname2ctype_pool_str386[sizeof("inkhmersymbols")];
- char uniname2ctype_pool_str399[sizeof("insyriac")];
- char uniname2ctype_pool_str401[sizeof("intakri")];
- char uniname2ctype_pool_str404[sizeof("arabic")];
- char uniname2ctype_pool_str411[sizeof("zs")];
- char uniname2ctype_pool_str418[sizeof("katakana")];
- char uniname2ctype_pool_str426[sizeof("prti")];
- char uniname2ctype_pool_str442[sizeof("ascii")];
- char uniname2ctype_pool_str445[sizeof("cs")];
- char uniname2ctype_pool_str462[sizeof("ps")];
- char uniname2ctype_pool_str468[sizeof("mand")];
- char uniname2ctype_pool_str470[sizeof("privateuse")];
- char uniname2ctype_pool_str475[sizeof("inruminumeralsymbols")];
- char uniname2ctype_pool_str480[sizeof("inmyanmarextendeda")];
- char uniname2ctype_pool_str481[sizeof("modi")];
- char uniname2ctype_pool_str486[sizeof("incjkcompatibilityforms")];
- char uniname2ctype_pool_str488[sizeof("inkanaextendeda")];
- char uniname2ctype_pool_str491[sizeof("incjkcompatibilityideographs")];
- char uniname2ctype_pool_str500[sizeof("brai")];
- char uniname2ctype_pool_str504[sizeof("mend")];
- char uniname2ctype_pool_str505[sizeof("ideo")];
- char uniname2ctype_pool_str506[sizeof("letter")];
- char uniname2ctype_pool_str509[sizeof("l")];
- char uniname2ctype_pool_str511[sizeof("inmeeteimayek")];
- char uniname2ctype_pool_str520[sizeof("inideographicdescriptioncharacters")];
- char uniname2ctype_pool_str535[sizeof("xidcontinue")];
- char uniname2ctype_pool_str538[sizeof("knda")];
- char uniname2ctype_pool_str541[sizeof("innandinagari")];
- char uniname2ctype_pool_str543[sizeof("kannada")];
- char uniname2ctype_pool_str556[sizeof("inmodi")];
- char uniname2ctype_pool_str558[sizeof("inlao")];
- char uniname2ctype_pool_str560[sizeof("inoldnortharabian")];
- char uniname2ctype_pool_str565[sizeof("intransportandmapsymbols")];
- char uniname2ctype_pool_str566[sizeof("letternumber")];
- char uniname2ctype_pool_str568[sizeof("gothic")];
- char uniname2ctype_pool_str572[sizeof("inlineara")];
- char uniname2ctype_pool_str577[sizeof("inmendekikakui")];
- char uniname2ctype_pool_str578[sizeof("xidc")];
- char uniname2ctype_pool_str579[sizeof("mongolian")];
- char uniname2ctype_pool_str582[sizeof("inmiscellaneousmathematicalsymbolsa")];
- char uniname2ctype_pool_str583[sizeof("inspecials")];
- char uniname2ctype_pool_str590[sizeof("grlink")];
- char uniname2ctype_pool_str594[sizeof("brahmi")];
- char uniname2ctype_pool_str596[sizeof("inemoticons")];
- char uniname2ctype_pool_str597[sizeof("kali")];
- char uniname2ctype_pool_str600[sizeof("inolditalic")];
- char uniname2ctype_pool_str604[sizeof("inmedefaidrin")];
- char uniname2ctype_pool_str605[sizeof("inchesssymbols")];
- char uniname2ctype_pool_str608[sizeof("incjkcompatibilityideographssupplement")];
- char uniname2ctype_pool_str614[sizeof("inadlam")];
- char uniname2ctype_pool_str624[sizeof("psalterpahlavi")];
- char uniname2ctype_pool_str625[sizeof("incommonindicnumberforms")];
- char uniname2ctype_pool_str630[sizeof("lt")];
- char uniname2ctype_pool_str636[sizeof("innewa")];
- char uniname2ctype_pool_str639[sizeof("sk")];
- char uniname2ctype_pool_str642[sizeof("control")];
- char uniname2ctype_pool_str645[sizeof("inancientsymbols")];
- char uniname2ctype_pool_str647[sizeof("palm")];
- char uniname2ctype_pool_str650[sizeof("inlycian")];
- char uniname2ctype_pool_str657[sizeof("so")];
- char uniname2ctype_pool_str660[sizeof("patternwhitespace")];
- char uniname2ctype_pool_str668[sizeof("xids")];
- char uniname2ctype_pool_str672[sizeof("inmandaic")];
- char uniname2ctype_pool_str675[sizeof("idc")];
- char uniname2ctype_pool_str678[sizeof("meroiticcursive")];
- char uniname2ctype_pool_str695[sizeof("inwarangciti")];
- char uniname2ctype_pool_str696[sizeof("sora")];
- char uniname2ctype_pool_str697[sizeof("inopticalcharacterrecognition")];
- char uniname2ctype_pool_str703[sizeof("inoldsogdian")];
- char uniname2ctype_pool_str705[sizeof("inmalayalam")];
- char uniname2ctype_pool_str707[sizeof("bamum")];
- char uniname2ctype_pool_str708[sizeof("inkanasupplement")];
- char uniname2ctype_pool_str713[sizeof("insundanese")];
- char uniname2ctype_pool_str720[sizeof("grext")];
- char uniname2ctype_pool_str737[sizeof("print")];
- char uniname2ctype_pool_str738[sizeof("intaitham")];
- char uniname2ctype_pool_str742[sizeof("lower")];
- char uniname2ctype_pool_str753[sizeof("joinc")];
- char uniname2ctype_pool_str755[sizeof("inoldsoutharabian")];
- char uniname2ctype_pool_str760[sizeof("incjkstrokes")];
- char uniname2ctype_pool_str761[sizeof("batk")];
- char uniname2ctype_pool_str766[sizeof("samr")];
- char uniname2ctype_pool_str767[sizeof("inwancho")];
- char uniname2ctype_pool_str771[sizeof("batak")];
- char uniname2ctype_pool_str772[sizeof("vs")];
- char uniname2ctype_pool_str776[sizeof("patws")];
- char uniname2ctype_pool_str783[sizeof("samaritan")];
- char uniname2ctype_pool_str787[sizeof("idsbinaryoperator")];
- char uniname2ctype_pool_str791[sizeof("pauc")];
- char uniname2ctype_pool_str794[sizeof("insmallkanaextension")];
- char uniname2ctype_pool_str797[sizeof("sm")];
- char uniname2ctype_pool_str799[sizeof("indominotiles")];
- char uniname2ctype_pool_str802[sizeof("alnum")];
- char uniname2ctype_pool_str809[sizeof("insylotinagri")];
- char uniname2ctype_pool_str814[sizeof("inugaritic")];
- char uniname2ctype_pool_str818[sizeof("incontrolpictures")];
- char uniname2ctype_pool_str821[sizeof("inlinearbideograms")];
- char uniname2ctype_pool_str822[sizeof("inmusicalsymbols")];
- char uniname2ctype_pool_str823[sizeof("s")];
- char uniname2ctype_pool_str824[sizeof("ital")];
- char uniname2ctype_pool_str825[sizeof("inmodifiertoneletters")];
- char uniname2ctype_pool_str828[sizeof("inancientgreekmusicalnotation")];
- char uniname2ctype_pool_str834[sizeof("patternsyntax")];
- char uniname2ctype_pool_str838[sizeof("lisu")];
- char uniname2ctype_pool_str842[sizeof("lowercase")];
- char uniname2ctype_pool_str845[sizeof("cwcm")];
- char uniname2ctype_pool_str847[sizeof("sc")];
- char uniname2ctype_pool_str848[sizeof("bass")];
- char uniname2ctype_pool_str855[sizeof("ids")];
- char uniname2ctype_pool_str857[sizeof("inlatinextendeda")];
- char uniname2ctype_pool_str862[sizeof("oriya")];
- char uniname2ctype_pool_str875[sizeof("intaile")];
- char uniname2ctype_pool_str886[sizeof("inmiscellaneoussymbols")];
- char uniname2ctype_pool_str895[sizeof("inmiscellaneoussymbolsandarrows")];
- char uniname2ctype_pool_str898[sizeof("incaucasianalbanian")];
- char uniname2ctype_pool_str900[sizeof("inmiscellaneoussymbolsandpictographs")];
- char uniname2ctype_pool_str906[sizeof("inoldturkic")];
- char uniname2ctype_pool_str907[sizeof("insaurashtra")];
- char uniname2ctype_pool_str924[sizeof("idcontinue")];
- char uniname2ctype_pool_str926[sizeof("intamil")];
- char uniname2ctype_pool_str928[sizeof("inmultani")];
- char uniname2ctype_pool_str929[sizeof("inlatinextendede")];
- char uniname2ctype_pool_str930[sizeof("pd")];
- char uniname2ctype_pool_str946[sizeof("bali")];
- char uniname2ctype_pool_str961[sizeof("blank")];
- char uniname2ctype_pool_str963[sizeof("idst")];
- char uniname2ctype_pool_str974[sizeof("inlydian")];
- char uniname2ctype_pool_str986[sizeof("innewtailue")];
- char uniname2ctype_pool_str994[sizeof("bengali")];
- char uniname2ctype_pool_str995[sizeof("runr")];
- char uniname2ctype_pool_str1005[sizeof("zl")];
- char uniname2ctype_pool_str1009[sizeof("incyrillicextendeda")];
- char uniname2ctype_pool_str1010[sizeof("ll")];
- char uniname2ctype_pool_str1013[sizeof("indeseret")];
- char uniname2ctype_pool_str1014[sizeof("intaixuanjingsymbols")];
- char uniname2ctype_pool_str1015[sizeof("inancientgreeknumbers")];
- char uniname2ctype_pool_str1021[sizeof("idstart")];
- char uniname2ctype_pool_str1025[sizeof("inmeeteimayekextensions")];
- char uniname2ctype_pool_str1028[sizeof("balinese")];
- char uniname2ctype_pool_str1032[sizeof("dia")];
- char uniname2ctype_pool_str1033[sizeof("di")];
- char uniname2ctype_pool_str1035[sizeof("inspacingmodifierletters")];
- char uniname2ctype_pool_str1036[sizeof("inearlydynasticcuneiform")];
- char uniname2ctype_pool_str1049[sizeof("plrd")];
- char uniname2ctype_pool_str1067[sizeof("canadianaboriginal")];
- char uniname2ctype_pool_str1070[sizeof("zinh")];
- char uniname2ctype_pool_str1072[sizeof("sind")];
- char uniname2ctype_pool_str1080[sizeof("osage")];
- char uniname2ctype_pool_str1081[sizeof("inlatinextendedc")];
- char uniname2ctype_pool_str1085[sizeof("uideo")];
- char uniname2ctype_pool_str1087[sizeof("incountingrodnumerals")];
- char uniname2ctype_pool_str1090[sizeof("xidstart")];
- char uniname2ctype_pool_str1091[sizeof("xdigit")];
- char uniname2ctype_pool_str1093[sizeof("osma")];
- char uniname2ctype_pool_str1097[sizeof("inkhudawadi")];
- char uniname2ctype_pool_str1102[sizeof("inhanifirohingya")];
- char uniname2ctype_pool_str1105[sizeof("gong")];
- char uniname2ctype_pool_str1107[sizeof("ingrantha")];
- char uniname2ctype_pool_str1109[sizeof("bidic")];
- char uniname2ctype_pool_str1119[sizeof("mong")];
- char uniname2ctype_pool_str1120[sizeof("cased")];
- char uniname2ctype_pool_str1121[sizeof("incyrillicextendedc")];
- char uniname2ctype_pool_str1134[sizeof("inhiragana")];
- char uniname2ctype_pool_str1140[sizeof("sinhala")];
- char uniname2ctype_pool_str1142[sizeof("adlm")];
- char uniname2ctype_pool_str1146[sizeof("glagolitic")];
- char uniname2ctype_pool_str1147[sizeof("sterm")];
- char uniname2ctype_pool_str1149[sizeof("bamu")];
- char uniname2ctype_pool_str1150[sizeof("georgian")];
- char uniname2ctype_pool_str1151[sizeof("inosage")];
- char uniname2ctype_pool_str1152[sizeof("gunjalagondi")];
- char uniname2ctype_pool_str1153[sizeof("phoenician")];
- char uniname2ctype_pool_str1157[sizeof("multani")];
- char uniname2ctype_pool_str1158[sizeof("kaithi")];
- char uniname2ctype_pool_str1164[sizeof("joincontrol")];
- char uniname2ctype_pool_str1168[sizeof("runic")];
- char uniname2ctype_pool_str1170[sizeof("ingeneralpunctuation")];
- char uniname2ctype_pool_str1171[sizeof("inmahajani")];
- char uniname2ctype_pool_str1174[sizeof("incyrillicsupplement")];
- char uniname2ctype_pool_str1175[sizeof("lowercaseletter")];
- char uniname2ctype_pool_str1176[sizeof("marchen")];
- char uniname2ctype_pool_str1177[sizeof("graphemelink")];
- char uniname2ctype_pool_str1178[sizeof("ingeorgian")];
- char uniname2ctype_pool_str1180[sizeof("khojki")];
- char uniname2ctype_pool_str1181[sizeof("cham")];
- char uniname2ctype_pool_str1182[sizeof("inogham")];
- char uniname2ctype_pool_str1183[sizeof("cher")];
- char uniname2ctype_pool_str1185[sizeof("chakma")];
- char uniname2ctype_pool_str1190[sizeof("emoji")];
- char uniname2ctype_pool_str1191[sizeof("insiddham")];
- char uniname2ctype_pool_str1197[sizeof("cherokee")];
- char uniname2ctype_pool_str1198[sizeof("khar")];
- char uniname2ctype_pool_str1203[sizeof("inmongolian")];
- char uniname2ctype_pool_str1207[sizeof("incherokeesupplement")];
- char uniname2ctype_pool_str1208[sizeof("diacritic")];
- char uniname2ctype_pool_str1209[sizeof("manichaean")];
- char uniname2ctype_pool_str1210[sizeof("xsux")];
- char uniname2ctype_pool_str1212[sizeof("inolchiki")];
- char uniname2ctype_pool_str1227[sizeof("quotationmark")];
- char uniname2ctype_pool_str1231[sizeof("adlam")];
- char uniname2ctype_pool_str1232[sizeof("inethiopic")];
- char uniname2ctype_pool_str1233[sizeof("graphemebase")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1234[sizeof("age=11.0")];
- char uniname2ctype_pool_str1235[sizeof("age=12.1")];
- char uniname2ctype_pool_str1236[sizeof("age=10.0")];
- char uniname2ctype_pool_str1237[sizeof("age=12.0")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1243[sizeof("casedletter")];
- char uniname2ctype_pool_str1244[sizeof("ingurmukhi")];
- char uniname2ctype_pool_str1245[sizeof("odi")];
- char uniname2ctype_pool_str1246[sizeof("incjkunifiedideographsextensiona")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1247[sizeof("age=1.1")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1248[sizeof("lu")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1249[sizeof("age=4.1")];
- char uniname2ctype_pool_str1250[sizeof("age=2.1")];
- char uniname2ctype_pool_str1251[sizeof("age=4.0")];
- char uniname2ctype_pool_str1252[sizeof("age=2.0")];
- char uniname2ctype_pool_str1253[sizeof("age=9.0")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1254[sizeof("intamilsupplement")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1255[sizeof("age=6.1")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1256[sizeof("unknown")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1257[sizeof("age=6.0")];
- char uniname2ctype_pool_str1258[sizeof("age=6.2")];
- char uniname2ctype_pool_str1259[sizeof("age=3.1")];
- char uniname2ctype_pool_str1260[sizeof("age=8.0")];
- char uniname2ctype_pool_str1261[sizeof("age=3.0")];
- char uniname2ctype_pool_str1262[sizeof("age=3.2")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1263[sizeof("cwt")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1264[sizeof("age=7.0")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1266[sizeof("unassigned")];
-#ifdef USE_UNICODE_AGE_PROPERTIES
- char uniname2ctype_pool_str1267[sizeof("age=6.3")];
- char uniname2ctype_pool_str1268[sizeof("age=5.1")];
- char uniname2ctype_pool_str1270[sizeof("age=5.0")];
- char uniname2ctype_pool_str1271[sizeof("age=5.2")];
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- char uniname2ctype_pool_str1274[sizeof("ahom")];
- char uniname2ctype_pool_str1282[sizeof("incjkunifiedideographsextensione")];
- char uniname2ctype_pool_str1285[sizeof("khmr")];
- char uniname2ctype_pool_str1289[sizeof("insinhala")];
- char uniname2ctype_pool_str1292[sizeof("inmiscellaneoustechnical")];
- char uniname2ctype_pool_str1297[sizeof("saur")];
- char uniname2ctype_pool_str1300[sizeof("guru")];
- char uniname2ctype_pool_str1301[sizeof("sundanese")];
- char uniname2ctype_pool_str1306[sizeof("punct")];
- char uniname2ctype_pool_str1314[sizeof("paucinhau")];
- char uniname2ctype_pool_str1317[sizeof("gurmukhi")];
- char uniname2ctype_pool_str1319[sizeof("variationselector")];
- char uniname2ctype_pool_str1331[sizeof("logicalorderexception")];
- char uniname2ctype_pool_str1340[sizeof("khmer")];
- char uniname2ctype_pool_str1343[sizeof("limbu")];
- char uniname2ctype_pool_str1354[sizeof("inscriptionalpahlavi")];
- char uniname2ctype_pool_str1355[sizeof("oidc")];
- char uniname2ctype_pool_str1358[sizeof("incjkunifiedideographsextensionc")];
- char uniname2ctype_pool_str1360[sizeof("cntrl")];
- char uniname2ctype_pool_str1365[sizeof("inlatinextendedadditional")];
- char uniname2ctype_pool_str1366[sizeof("decimalnumber")];
- char uniname2ctype_pool_str1367[sizeof("insorasompeng")];
- char uniname2ctype_pool_str1369[sizeof("radical")];
- char uniname2ctype_pool_str1373[sizeof("emojimodifier")];
- char uniname2ctype_pool_str1375[sizeof("kharoshthi")];
- char uniname2ctype_pool_str1380[sizeof("n")];
- char uniname2ctype_pool_str1384[sizeof("math")];
- char uniname2ctype_pool_str1387[sizeof("goth")];
- char uniname2ctype_pool_str1400[sizeof("anatolianhieroglyphs")];
- char uniname2ctype_pool_str1401[sizeof("inenclosedalphanumerics")];
- char uniname2ctype_pool_str1407[sizeof("nandinagari")];
- char uniname2ctype_pool_str1409[sizeof("no")];
- char uniname2ctype_pool_str1419[sizeof("nko")];
- char uniname2ctype_pool_str1420[sizeof("nkoo")];
- char uniname2ctype_pool_str1422[sizeof("ingreekandcoptic")];
- char uniname2ctype_pool_str1423[sizeof("olck")];
- char uniname2ctype_pool_str1426[sizeof("p")];
- char uniname2ctype_pool_str1428[sizeof("grantha")];
- char uniname2ctype_pool_str1434[sizeof("olchiki")];
- char uniname2ctype_pool_str1438[sizeof("incjkunifiedideographs")];
- char uniname2ctype_pool_str1441[sizeof("zanb")];
- char uniname2ctype_pool_str1442[sizeof("intirhuta")];
- char uniname2ctype_pool_str1445[sizeof("oids")];
- char uniname2ctype_pool_str1448[sizeof("inhatran")];
- char uniname2ctype_pool_str1449[sizeof("linb")];
- char uniname2ctype_pool_str1450[sizeof("xpeo")];
- char uniname2ctype_pool_str1451[sizeof("mult")];
- char uniname2ctype_pool_str1454[sizeof("saurashtra")];
- char uniname2ctype_pool_str1457[sizeof("kthi")];
- char uniname2ctype_pool_str1462[sizeof("inbhaiksuki")];
- char uniname2ctype_pool_str1466[sizeof("olower")];
- char uniname2ctype_pool_str1470[sizeof("innabataean")];
- char uniname2ctype_pool_str1471[sizeof("inphoenician")];
- char uniname2ctype_pool_str1475[sizeof("inkanbun")];
- char uniname2ctype_pool_str1476[sizeof("inmeroitichieroglyphs")];
- char uniname2ctype_pool_str1478[sizeof("inkayahli")];
- char uniname2ctype_pool_str1481[sizeof("phnx")];
- char uniname2ctype_pool_str1485[sizeof("inoriya")];
- char uniname2ctype_pool_str1489[sizeof("enclosingmark")];
- char uniname2ctype_pool_str1495[sizeof("sd")];
- char uniname2ctype_pool_str1497[sizeof("inelbasan")];
- char uniname2ctype_pool_str1498[sizeof("wara")];
- char uniname2ctype_pool_str1499[sizeof("inenclosedideographicsupplement")];
- char uniname2ctype_pool_str1501[sizeof("sidd")];
- char uniname2ctype_pool_str1507[sizeof("linearb")];
- char uniname2ctype_pool_str1509[sizeof("hani")];
- char uniname2ctype_pool_str1512[sizeof("han")];
- char uniname2ctype_pool_str1517[sizeof("inenclosedalphanumericsupplement")];
- char uniname2ctype_pool_str1519[sizeof("medf")];
- char uniname2ctype_pool_str1520[sizeof("bidicontrol")];
- char uniname2ctype_pool_str1523[sizeof("hano")];
- char uniname2ctype_pool_str1524[sizeof("inphaistosdisc")];
- char uniname2ctype_pool_str1529[sizeof("limb")];
- char uniname2ctype_pool_str1531[sizeof("inkangxiradicals")];
- char uniname2ctype_pool_str1533[sizeof("lepc")];
- char uniname2ctype_pool_str1535[sizeof("medefaidrin")];
- char uniname2ctype_pool_str1536[sizeof("braille")];
- char uniname2ctype_pool_str1537[sizeof("regionalindicator")];
- char uniname2ctype_pool_str1542[sizeof("inlowsurrogates")];
- char uniname2ctype_pool_str1544[sizeof("inshorthandformatcontrols")];
- char uniname2ctype_pool_str1547[sizeof("brah")];
- char uniname2ctype_pool_str1548[sizeof("inkhojki")];
- char uniname2ctype_pool_str1549[sizeof("inoldhungarian")];
- char uniname2ctype_pool_str1552[sizeof("hanunoo")];
- char uniname2ctype_pool_str1555[sizeof("hira")];
- char uniname2ctype_pool_str1557[sizeof("beng")];
- char uniname2ctype_pool_str1563[sizeof("emojimodifierbase")];
- char uniname2ctype_pool_str1565[sizeof("inarabic")];
- char uniname2ctype_pool_str1567[sizeof("lyci")];
- char uniname2ctype_pool_str1569[sizeof("ahex")];
- char uniname2ctype_pool_str1572[sizeof("inherited")];
- char uniname2ctype_pool_str1580[sizeof("glag")];
- char uniname2ctype_pool_str1582[sizeof("lycian")];
- char uniname2ctype_pool_str1587[sizeof("indogra")];
- char uniname2ctype_pool_str1594[sizeof("dsrt")];
- char uniname2ctype_pool_str1597[sizeof("arab")];
- char uniname2ctype_pool_str1602[sizeof("mymr")];
- char uniname2ctype_pool_str1607[sizeof("myanmar")];
- char uniname2ctype_pool_str1613[sizeof("phli")];
- char uniname2ctype_pool_str1617[sizeof("inimperialaramaic")];
- char uniname2ctype_pool_str1622[sizeof("ingreekextended")];
- char uniname2ctype_pool_str1623[sizeof("inanatolianhieroglyphs")];
- char uniname2ctype_pool_str1629[sizeof("punctuation")];
- char uniname2ctype_pool_str1631[sizeof("takri")];
- char uniname2ctype_pool_str1635[sizeof("graphemeextend")];
- char uniname2ctype_pool_str1638[sizeof("invai")];
- char uniname2ctype_pool_str1643[sizeof("cwl")];
- char uniname2ctype_pool_str1654[sizeof("ingeometricshapes")];
- char uniname2ctype_pool_str1655[sizeof("emojicomponent")];
- char uniname2ctype_pool_str1662[sizeof("coptic")];
- char uniname2ctype_pool_str1671[sizeof("deseret")];
- char uniname2ctype_pool_str1675[sizeof("inarabicpresentationformsa")];
- char uniname2ctype_pool_str1676[sizeof("takr")];
- char uniname2ctype_pool_str1677[sizeof("inbasiclatin")];
- char uniname2ctype_pool_str1682[sizeof("incjkunifiedideographsextensiond")];
- char uniname2ctype_pool_str1686[sizeof("sinh")];
- char uniname2ctype_pool_str1687[sizeof("sund")];
- char uniname2ctype_pool_str1691[sizeof("shavian")];
- char uniname2ctype_pool_str1692[sizeof("taile")];
- char uniname2ctype_pool_str1699[sizeof("insundanesesupplement")];
- char uniname2ctype_pool_str1702[sizeof("inelymaic")];
- char uniname2ctype_pool_str1703[sizeof("insoyombo")];
- char uniname2ctype_pool_str1704[sizeof("bhks")];
- char uniname2ctype_pool_str1714[sizeof("bhaiksuki")];
- char uniname2ctype_pool_str1716[sizeof("incjkcompatibility")];
- char uniname2ctype_pool_str1722[sizeof("inhanunoo")];
- char uniname2ctype_pool_str1724[sizeof("intangut")];
- char uniname2ctype_pool_str1728[sizeof("sogdian")];
- char uniname2ctype_pool_str1729[sizeof("inlatinextendedd")];
- char uniname2ctype_pool_str1730[sizeof("sogo")];
- char uniname2ctype_pool_str1731[sizeof("insinhalaarchaicnumbers")];
- char uniname2ctype_pool_str1732[sizeof("ideographic")];
- char uniname2ctype_pool_str1733[sizeof("ugar")];
- char uniname2ctype_pool_str1740[sizeof("copt")];
- char uniname2ctype_pool_str1742[sizeof("imperialaramaic")];
- char uniname2ctype_pool_str1745[sizeof("insogdian")];
- char uniname2ctype_pool_str1746[sizeof("indingbats")];
- char uniname2ctype_pool_str1750[sizeof("format")];
- char uniname2ctype_pool_str1752[sizeof("ininscriptionalpahlavi")];
- char uniname2ctype_pool_str1757[sizeof("ininscriptionalparthian")];
- char uniname2ctype_pool_str1766[sizeof("grbase")];
- char uniname2ctype_pool_str1769[sizeof("inbatak")];
- char uniname2ctype_pool_str1776[sizeof("cprt")];
- char uniname2ctype_pool_str1780[sizeof("cwcf")];
- char uniname2ctype_pool_str1788[sizeof("cuneiform")];
- char uniname2ctype_pool_str1791[sizeof("term")];
- char uniname2ctype_pool_str1806[sizeof("intibetan")];
- char uniname2ctype_pool_str1810[sizeof("intags")];
- char uniname2ctype_pool_str1811[sizeof("asciihexdigit")];
- char uniname2ctype_pool_str1813[sizeof("sentenceterminal")];
- char uniname2ctype_pool_str1816[sizeof("inmayannumerals")];
- char uniname2ctype_pool_str1821[sizeof("nand")];
- char uniname2ctype_pool_str1825[sizeof("patsyn")];
- char uniname2ctype_pool_str1826[sizeof("hatran")];
- char uniname2ctype_pool_str1828[sizeof("inblockelements")];
- char uniname2ctype_pool_str1838[sizeof("inornamentaldingbats")];
- char uniname2ctype_pool_str1842[sizeof("innumberforms")];
- char uniname2ctype_pool_str1843[sizeof("oldpersian")];
- char uniname2ctype_pool_str1846[sizeof("inshavian")];
- char uniname2ctype_pool_str1848[sizeof("bopo")];
- char uniname2ctype_pool_str1861[sizeof("hatr")];
- char uniname2ctype_pool_str1866[sizeof("caseignorable")];
- char uniname2ctype_pool_str1871[sizeof("inoldpersian")];
- char uniname2ctype_pool_str1878[sizeof("modifierletter")];
- char uniname2ctype_pool_str1881[sizeof("cwu")];
- char uniname2ctype_pool_str1891[sizeof("lydi")];
- char uniname2ctype_pool_str1892[sizeof("inbyzantinemusicalsymbols")];
- char uniname2ctype_pool_str1896[sizeof("ingeometricshapesextended")];
- char uniname2ctype_pool_str1904[sizeof("inmyanmarextendedb")];
- char uniname2ctype_pool_str1905[sizeof("innushu")];
- char uniname2ctype_pool_str1906[sizeof("lydian")];
- char uniname2ctype_pool_str1911[sizeof("inunifiedcanadianaboriginalsyllabics")];
- char uniname2ctype_pool_str1915[sizeof("orkh")];
- char uniname2ctype_pool_str1928[sizeof("inyiradicals")];
- char uniname2ctype_pool_str1929[sizeof("inkatakanaphoneticextensions")];
- char uniname2ctype_pool_str1930[sizeof("inethiopicextendeda")];
- char uniname2ctype_pool_str1932[sizeof("incoptic")];
- char uniname2ctype_pool_str1936[sizeof("inarabicextendeda")];
- char uniname2ctype_pool_str1947[sizeof("oldpermic")];
- char uniname2ctype_pool_str1950[sizeof("incjksymbolsandpunctuation")];
- char uniname2ctype_pool_str1951[sizeof("word")];
- char uniname2ctype_pool_str1958[sizeof("bopomofo")];
- char uniname2ctype_pool_str1961[sizeof("ogam")];
- char uniname2ctype_pool_str1964[sizeof("inlisu")];
- char uniname2ctype_pool_str1967[sizeof("inoldpermic")];
- char uniname2ctype_pool_str1968[sizeof("innoblock")];
- char uniname2ctype_pool_str1971[sizeof("taiviet")];
- char uniname2ctype_pool_str1985[sizeof("inbraillepatterns")];
- char uniname2ctype_pool_str1991[sizeof("alpha")];
- char uniname2ctype_pool_str1993[sizeof("inbalinese")];
- char uniname2ctype_pool_str1994[sizeof("sorasompeng")];
- char uniname2ctype_pool_str1996[sizeof("closepunctuation")];
- char uniname2ctype_pool_str2006[sizeof("inmiscellaneousmathematicalsymbolsb")];
- char uniname2ctype_pool_str2010[sizeof("inlepcha")];
- char uniname2ctype_pool_str2014[sizeof("insyriacsupplement")];
- char uniname2ctype_pool_str2016[sizeof("newa")];
- char uniname2ctype_pool_str2023[sizeof("spacingmark")];
- char uniname2ctype_pool_str2024[sizeof("inpalmyrene")];
- char uniname2ctype_pool_str2033[sizeof("cyrl")];
- char uniname2ctype_pool_str2043[sizeof("assigned")];
- char uniname2ctype_pool_str2048[sizeof("mlym")];
- char uniname2ctype_pool_str2055[sizeof("malayalam")];
- char uniname2ctype_pool_str2058[sizeof("ext")];
- char uniname2ctype_pool_str2062[sizeof("newtailue")];
- char uniname2ctype_pool_str2070[sizeof("space")];
- char uniname2ctype_pool_str2073[sizeof("intelugu")];
- char uniname2ctype_pool_str2078[sizeof("idsb")];
- char uniname2ctype_pool_str2083[sizeof("indevanagari")];
- char uniname2ctype_pool_str2084[sizeof("avestan")];
- char uniname2ctype_pool_str2085[sizeof("cf")];
- char uniname2ctype_pool_str2093[sizeof("palmyrene")];
- char uniname2ctype_pool_str2095[sizeof("inethiopicsupplement")];
- char uniname2ctype_pool_str2097[sizeof("soyo")];
- char uniname2ctype_pool_str2098[sizeof("xposixpunct")];
- char uniname2ctype_pool_str2102[sizeof("pf")];
- char uniname2ctype_pool_str2103[sizeof("sarb")];
- char uniname2ctype_pool_str2109[sizeof("zanabazarsquare")];
- char uniname2ctype_pool_str2110[sizeof("ugaritic")];
- char uniname2ctype_pool_str2112[sizeof("osge")];
- char uniname2ctype_pool_str2114[sizeof("java")];
- char uniname2ctype_pool_str2117[sizeof("sharada")];
- char uniname2ctype_pool_str2119[sizeof("dogra")];
- char uniname2ctype_pool_str2135[sizeof("bugi")];
- char uniname2ctype_pool_str2137[sizeof("meroitichieroglyphs")];
- char uniname2ctype_pool_str2145[sizeof("separator")];
- char uniname2ctype_pool_str2146[sizeof("ingeorgiansupplement")];
- char uniname2ctype_pool_str2149[sizeof("sogd")];
- char uniname2ctype_pool_str2150[sizeof("tale")];
- char uniname2ctype_pool_str2153[sizeof("inunifiedcanadianaboriginalsyllabicsextended")];
- char uniname2ctype_pool_str2161[sizeof("terminalpunctuation")];
- char uniname2ctype_pool_str2165[sizeof("shrd")];
- char uniname2ctype_pool_str2166[sizeof("graph")];
- char uniname2ctype_pool_str2167[sizeof("olditalic")];
- char uniname2ctype_pool_str2170[sizeof("dogr")];
- char uniname2ctype_pool_str2173[sizeof("gujr")];
- char uniname2ctype_pool_str2181[sizeof("phag")];
- char uniname2ctype_pool_str2182[sizeof("gujarati")];
- char uniname2ctype_pool_str2195[sizeof("inhanguljamo")];
- char uniname2ctype_pool_str2199[sizeof("javanese")];
- char uniname2ctype_pool_str2201[sizeof("taml")];
- char uniname2ctype_pool_str2204[sizeof("inphoneticextensions")];
- char uniname2ctype_pool_str2207[sizeof("siddham")];
- char uniname2ctype_pool_str2217[sizeof("buginese")];
- char uniname2ctype_pool_str2218[sizeof("inmongoliansupplement")];
- char uniname2ctype_pool_str2222[sizeof("invariationselectors")];
- char uniname2ctype_pool_str2224[sizeof("inhanguljamoextendeda")];
- char uniname2ctype_pool_str2225[sizeof("inverticalforms")];
- char uniname2ctype_pool_str2228[sizeof("syrc")];
- char uniname2ctype_pool_str2229[sizeof("number")];
- char uniname2ctype_pool_str2235[sizeof("incopticepactnumbers")];
- char uniname2ctype_pool_str2238[sizeof("avst")];
- char uniname2ctype_pool_str2244[sizeof("inbamum")];
- char uniname2ctype_pool_str2247[sizeof("nd")];
- char uniname2ctype_pool_str2248[sizeof("insuttonsignwriting")];
- char uniname2ctype_pool_str2252[sizeof("extender")];
- char uniname2ctype_pool_str2258[sizeof("intaiviet")];
- char uniname2ctype_pool_str2260[sizeof("hex")];
- char uniname2ctype_pool_str2268[sizeof("incjkunifiedideographsextensionf")];
- char uniname2ctype_pool_str2271[sizeof("other")];
- char uniname2ctype_pool_str2272[sizeof("otheridcontinue")];
- char uniname2ctype_pool_str2278[sizeof("shaw")];
- char uniname2ctype_pool_str2282[sizeof("dash")];
- char uniname2ctype_pool_str2285[sizeof("othernumber")];
- char uniname2ctype_pool_str2294[sizeof("orya")];
- char uniname2ctype_pool_str2302[sizeof("invedicextensions")];
- char uniname2ctype_pool_str2305[sizeof("sgnw")];
- char uniname2ctype_pool_str2312[sizeof("caucasianalbanian")];
- char uniname2ctype_pool_str2315[sizeof("inmathematicalalphanumericsymbols")];
- char uniname2ctype_pool_str2321[sizeof("inphoneticextensionssupplement")];
- char uniname2ctype_pool_str2339[sizeof("invariationselectorssupplement")];
- char uniname2ctype_pool_str2343[sizeof("induployan")];
- char uniname2ctype_pool_str2344[sizeof("syriac")];
- char uniname2ctype_pool_str2357[sizeof("oalpha")];
- char uniname2ctype_pool_str2361[sizeof("innyiakengpuachuehmong")];
- char uniname2ctype_pool_str2364[sizeof("incombiningdiacriticalmarks")];
- char uniname2ctype_pool_str2365[sizeof("inethiopicextended")];
- char uniname2ctype_pool_str2373[sizeof("nl")];
- char uniname2ctype_pool_str2374[sizeof("incombiningdiacriticalmarksforsymbols")];
- char uniname2ctype_pool_str2375[sizeof("khudawadi")];
- char uniname2ctype_pool_str2378[sizeof("otheralphabetic")];
- char uniname2ctype_pool_str2389[sizeof("oldhungarian")];
- char uniname2ctype_pool_str2396[sizeof("incurrencysymbols")];
- char uniname2ctype_pool_str2397[sizeof("incjkradicalssupplement")];
- char uniname2ctype_pool_str2398[sizeof("inglagolitic")];
- char uniname2ctype_pool_str2415[sizeof("intifinagh")];
- char uniname2ctype_pool_str2416[sizeof("ingeorgianextended")];
- char uniname2ctype_pool_str2427[sizeof("surrogate")];
- char uniname2ctype_pool_str2433[sizeof("incyrillicextendedb")];
- char uniname2ctype_pool_str2440[sizeof("ethi")];
- char uniname2ctype_pool_str2451[sizeof("titlecaseletter")];
- char uniname2ctype_pool_str2454[sizeof("rohg")];
- char uniname2ctype_pool_str2458[sizeof("inmeroiticcursive")];
- char uniname2ctype_pool_str2460[sizeof("idstrinaryoperator")];
- char uniname2ctype_pool_str2470[sizeof("inphagspa")];
- char uniname2ctype_pool_str2475[sizeof("lepcha")];
- char uniname2ctype_pool_str2479[sizeof("intagalog")];
- char uniname2ctype_pool_str2480[sizeof("mathsymbol")];
- char uniname2ctype_pool_str2481[sizeof("incombiningdiacriticalmarkssupplement")];
- char uniname2ctype_pool_str2506[sizeof("inbrahmi")];
- char uniname2ctype_pool_str2513[sizeof("insymbolsandpictographsextendeda")];
- char uniname2ctype_pool_str2519[sizeof("inlinearbsyllabary")];
- char uniname2ctype_pool_str2529[sizeof("oldturkic")];
- char uniname2ctype_pool_str2534[sizeof("inbengali")];
- char uniname2ctype_pool_str2540[sizeof("wancho")];
- char uniname2ctype_pool_str2542[sizeof("osmanya")];
- char uniname2ctype_pool_str2548[sizeof("buhd")];
- char uniname2ctype_pool_str2552[sizeof("insmallformvariants")];
- char uniname2ctype_pool_str2561[sizeof("indevanagariextended")];
- char uniname2ctype_pool_str2562[sizeof("softdotted")];
- char uniname2ctype_pool_str2564[sizeof("inbuginese")];
- char uniname2ctype_pool_str2566[sizeof("mahj")];
- char uniname2ctype_pool_str2567[sizeof("inlatin1supplement")];
- char uniname2ctype_pool_str2570[sizeof("ingothic")];
- char uniname2ctype_pool_str2575[sizeof("mahajani")];
- char uniname2ctype_pool_str2576[sizeof("hang")];
- char uniname2ctype_pool_str2579[sizeof("sylo")];
- char uniname2ctype_pool_str2586[sizeof("warangciti")];
- char uniname2ctype_pool_str2595[sizeof("ingujarati")];
- char uniname2ctype_pool_str2603[sizeof("tirhuta")];
- char uniname2ctype_pool_str2606[sizeof("incombiningdiacriticalmarksextended")];
- char uniname2ctype_pool_str2609[sizeof("spaceseparator")];
- char uniname2ctype_pool_str2614[sizeof("ingunjalagondi")];
- char uniname2ctype_pool_str2624[sizeof("wcho")];
- char uniname2ctype_pool_str2631[sizeof("hiragana")];
- char uniname2ctype_pool_str2634[sizeof("extendedpictographic")];
- char uniname2ctype_pool_str2643[sizeof("inrejang")];
- char uniname2ctype_pool_str2644[sizeof("inottomansiyaqnumbers")];
- char uniname2ctype_pool_str2648[sizeof("nchar")];
- char uniname2ctype_pool_str2650[sizeof("cyrillic")];
- char uniname2ctype_pool_str2653[sizeof("khoj")];
- char uniname2ctype_pool_str2656[sizeof("inlimbu")];
- char uniname2ctype_pool_str2663[sizeof("hmng")];
- char uniname2ctype_pool_str2665[sizeof("thaa")];
- char uniname2ctype_pool_str2668[sizeof("thai")];
- char uniname2ctype_pool_str2670[sizeof("incjkunifiedideographsextensionb")];
- char uniname2ctype_pool_str2673[sizeof("deva")];
- char uniname2ctype_pool_str2676[sizeof("thaana")];
- char uniname2ctype_pool_str2688[sizeof("phagspa")];
- char uniname2ctype_pool_str2691[sizeof("devanagari")];
- char uniname2ctype_pool_str2692[sizeof("tang")];
- char uniname2ctype_pool_str2694[sizeof("currencysymbol")];
- char uniname2ctype_pool_str2698[sizeof("tagbanwa")];
- char uniname2ctype_pool_str2701[sizeof("inenclosedcjklettersandmonths")];
- char uniname2ctype_pool_str2702[sizeof("tamil")];
- char uniname2ctype_pool_str2721[sizeof("tirh")];
- char uniname2ctype_pool_str2723[sizeof("digit")];
- char uniname2ctype_pool_str2732[sizeof("talu")];
- char uniname2ctype_pool_str2747[sizeof("zp")];
- char uniname2ctype_pool_str2750[sizeof("inpaucinhau")];
- char uniname2ctype_pool_str2760[sizeof("taitham")];
- char uniname2ctype_pool_str2764[sizeof("otherlowercase")];
- char uniname2ctype_pool_str2768[sizeof("telu")];
- char uniname2ctype_pool_str2769[sizeof("inaegeannumbers")];
- char uniname2ctype_pool_str2777[sizeof("otherletter")];
- char uniname2ctype_pool_str2780[sizeof("whitespace")];
- char uniname2ctype_pool_str2793[sizeof("nonspacingmark")];
- char uniname2ctype_pool_str2816[sizeof("graphemeclusterbreak=spacingmark")];
- char uniname2ctype_pool_str2821[sizeof("inletterlikesymbols")];
- char uniname2ctype_pool_str2834[sizeof("intagbanwa")];
- char uniname2ctype_pool_str2841[sizeof("oldsogdian")];
- char uniname2ctype_pool_str2848[sizeof("otheridstart")];
- char uniname2ctype_pool_str2852[sizeof("graphemeclusterbreak=cr")];
- char uniname2ctype_pool_str2855[sizeof("narb")];
- char uniname2ctype_pool_str2856[sizeof("changeswhencasemapped")];
- char uniname2ctype_pool_str2859[sizeof("inbopomofo")];
- char uniname2ctype_pool_str2862[sizeof("tangut")];
- char uniname2ctype_pool_str2867[sizeof("graphemeclusterbreak=regionalindicator")];
- char uniname2ctype_pool_str2871[sizeof("noncharactercodepoint")];
- char uniname2ctype_pool_str2883[sizeof("otheruppercase")];
- char uniname2ctype_pool_str2885[sizeof("rjng")];
- char uniname2ctype_pool_str2886[sizeof("sylotinagri")];
- char uniname2ctype_pool_str2904[sizeof("inhangulsyllables")];
- char uniname2ctype_pool_str2905[sizeof("emojipresentation")];
- char uniname2ctype_pool_str2906[sizeof("inindicsiyaqnumbers")];
- char uniname2ctype_pool_str2909[sizeof("inbassavah")];
- char uniname2ctype_pool_str2912[sizeof("ogrext")];
- char uniname2ctype_pool_str2926[sizeof("othersymbol")];
- char uniname2ctype_pool_str2938[sizeof("oupper")];
- char uniname2ctype_pool_str2941[sizeof("inbuhid")];
- char uniname2ctype_pool_str2963[sizeof("hmnp")];
- char uniname2ctype_pool_str2964[sizeof("inpsalterpahlavi")];
- char uniname2ctype_pool_str2967[sizeof("finalpunctuation")];
- char uniname2ctype_pool_str2980[sizeof("phlp")];
- char uniname2ctype_pool_str2984[sizeof("inbamumsupplement")];
- char uniname2ctype_pool_str2986[sizeof("buhid")];
- char uniname2ctype_pool_str2987[sizeof("paragraphseparator")];
- char uniname2ctype_pool_str2988[sizeof("inalphabeticpresentationforms")];
- char uniname2ctype_pool_str2993[sizeof("omath")];
- char uniname2ctype_pool_str3000[sizeof("any")];
- char uniname2ctype_pool_str3001[sizeof("elba")];
- char uniname2ctype_pool_str3002[sizeof("changeswhentitlecased")];
- char uniname2ctype_pool_str3005[sizeof("incombininghalfmarks")];
- char uniname2ctype_pool_str3006[sizeof("intangutcomponents")];
- char uniname2ctype_pool_str3012[sizeof("hebr")];
- char uniname2ctype_pool_str3028[sizeof("deprecated")];
- char uniname2ctype_pool_str3045[sizeof("inarabicmathematicalalphabeticsymbols")];
- char uniname2ctype_pool_str3055[sizeof("inprivateusearea")];
- char uniname2ctype_pool_str3089[sizeof("kayahli")];
- char uniname2ctype_pool_str3098[sizeof("inplayingcards")];
- char uniname2ctype_pool_str3099[sizeof("inarabicpresentationformsb")];
- char uniname2ctype_pool_str3100[sizeof("ogham")];
- char uniname2ctype_pool_str3101[sizeof("elym")];
- char uniname2ctype_pool_str3107[sizeof("graphemeclusterbreak=t")];
- char uniname2ctype_pool_str3109[sizeof("graphemeclusterbreak=lvt")];
- char uniname2ctype_pool_str3111[sizeof("nbat")];
- char uniname2ctype_pool_str3125[sizeof("nabataean")];
- char uniname2ctype_pool_str3126[sizeof("hangul")];
- char uniname2ctype_pool_str3134[sizeof("elymaic")];
- char uniname2ctype_pool_str3158[sizeof("inhebrew")];
- char uniname2ctype_pool_str3165[sizeof("injavanese")];
- char uniname2ctype_pool_str3169[sizeof("symbol")];
- char uniname2ctype_pool_str3176[sizeof("inmathematicaloperators")];
- char uniname2ctype_pool_str3180[sizeof("inarabicsupplement")];
- char uniname2ctype_pool_str3185[sizeof("cypriot")];
- char uniname2ctype_pool_str3194[sizeof("hung")];
- char uniname2ctype_pool_str3205[sizeof("wspace")];
- char uniname2ctype_pool_str3209[sizeof("changeswhenlowercased")];
- char uniname2ctype_pool_str3215[sizeof("elbasan")];
- char uniname2ctype_pool_str3218[sizeof("hluw")];
- char uniname2ctype_pool_str3237[sizeof("insuperscriptsandsubscripts")];
- char uniname2ctype_pool_str3239[sizeof("graphemeclusterbreak=extend")];
- char uniname2ctype_pool_str3240[sizeof("graphemeclusterbreak=prepend")];
- char uniname2ctype_pool_str3248[sizeof("nshu")];
- char uniname2ctype_pool_str3254[sizeof("oldnortharabian")];
- char uniname2ctype_pool_str3266[sizeof("inyijinghexagramsymbols")];
- char uniname2ctype_pool_str3286[sizeof("hexdigit")];
- char uniname2ctype_pool_str3297[sizeof("graphemeclusterbreak=l")];
- char uniname2ctype_pool_str3303[sizeof("graphemeclusterbreak=control")];
- char uniname2ctype_pool_str3309[sizeof("bassavah")];
- char uniname2ctype_pool_str3317[sizeof("otherdefaultignorablecodepoint")];
- char uniname2ctype_pool_str3328[sizeof("changeswhenuppercased")];
- char uniname2ctype_pool_str3329[sizeof("inalchemicalsymbols")];
- char uniname2ctype_pool_str3348[sizeof("insupplementalarrowsa")];
- char uniname2ctype_pool_str3349[sizeof("inyisyllables")];
- char uniname2ctype_pool_str3351[sizeof("tibt")];
- char uniname2ctype_pool_str3360[sizeof("othermath")];
- char uniname2ctype_pool_str3363[sizeof("tibetan")];
- char uniname2ctype_pool_str3365[sizeof("inmahjongtiles")];
- char uniname2ctype_pool_str3433[sizeof("signwriting")];
- char uniname2ctype_pool_str3436[sizeof("nushu")];
- char uniname2ctype_pool_str3439[sizeof("modifiersymbol")];
- char uniname2ctype_pool_str3442[sizeof("inhalfwidthandfullwidthforms")];
- char uniname2ctype_pool_str3458[sizeof("upper")];
- char uniname2ctype_pool_str3460[sizeof("insupplementalarrowsc")];
- char uniname2ctype_pool_str3511[sizeof("insupplementalmathematicaloperators")];
- char uniname2ctype_pool_str3512[sizeof("incypriotsyllabary")];
- char uniname2ctype_pool_str3517[sizeof("dupl")];
- char uniname2ctype_pool_str3531[sizeof("tavt")];
- char uniname2ctype_pool_str3532[sizeof("inpahawhhmong")];
- char uniname2ctype_pool_str3533[sizeof("alphabetic")];
- char uniname2ctype_pool_str3550[sizeof("dashpunctuation")];
- char uniname2ctype_pool_str3558[sizeof("uppercase")];
- char uniname2ctype_pool_str3613[sizeof("soyombo")];
- char uniname2ctype_pool_str3614[sizeof("hanifirohingya")];
- char uniname2ctype_pool_str3616[sizeof("otherpunctuation")];
- char uniname2ctype_pool_str3628[sizeof("defaultignorablecodepoint")];
- char uniname2ctype_pool_str3648[sizeof("inhanguljamoextendedb")];
- char uniname2ctype_pool_str3664[sizeof("aghb")];
- char uniname2ctype_pool_str3703[sizeof("tifinagh")];
- char uniname2ctype_pool_str3705[sizeof("inlatinextendedb")];
- char uniname2ctype_pool_str3714[sizeof("tfng")];
- char uniname2ctype_pool_str3766[sizeof("inhighprivateusesurrogates")];
- char uniname2ctype_pool_str3791[sizeof("changeswhencasefolded")];
- char uniname2ctype_pool_str3805[sizeof("dep")];
- char uniname2ctype_pool_str3819[sizeof("oldsoutharabian")];
- char uniname2ctype_pool_str3821[sizeof("graphemeclusterbreak=lf")];
- char uniname2ctype_pool_str3842[sizeof("pahawhhmong")];
- char uniname2ctype_pool_str3845[sizeof("unifiedideograph")];
- char uniname2ctype_pool_str3891[sizeof("uppercaseletter")];
- char uniname2ctype_pool_str3924[sizeof("insupplementalpunctuation")];
- char uniname2ctype_pool_str3942[sizeof("ethiopic")];
- char uniname2ctype_pool_str3976[sizeof("inglagoliticsupplement")];
- char uniname2ctype_pool_str3995[sizeof("rejang")];
- char uniname2ctype_pool_str4087[sizeof("inbopomofoextended")];
- char uniname2ctype_pool_str4109[sizeof("tagb")];
- char uniname2ctype_pool_str4137[sizeof("othergraphemeextend")];
- char uniname2ctype_pool_str4162[sizeof("inegyptianhieroglyphs")];
- char uniname2ctype_pool_str4175[sizeof("inegyptianhieroglyphformatcontrols")];
- char uniname2ctype_pool_str4203[sizeof("hebrew")];
- char uniname2ctype_pool_str4254[sizeof("tglg")];
- char uniname2ctype_pool_str4276[sizeof("tagalog")];
- char uniname2ctype_pool_str4291[sizeof("graphemeclusterbreak=zwj")];
- char uniname2ctype_pool_str4321[sizeof("zyyy")];
- char uniname2ctype_pool_str4360[sizeof("hyphen")];
- char uniname2ctype_pool_str4397[sizeof("inboxdrawing")];
- char uniname2ctype_pool_str4405[sizeof("graphemeclusterbreak=v")];
- char uniname2ctype_pool_str4406[sizeof("graphemeclusterbreak=lv")];
- char uniname2ctype_pool_str4460[sizeof("telugu")];
- char uniname2ctype_pool_str4485[sizeof("duployan")];
- char uniname2ctype_pool_str4528[sizeof("openpunctuation")];
- char uniname2ctype_pool_str4674[sizeof("insupplementaryprivateuseareaa")];
- char uniname2ctype_pool_str4683[sizeof("inhighsurrogates")];
- char uniname2ctype_pool_str4772[sizeof("insupplementalarrowsb")];
- char uniname2ctype_pool_str4948[sizeof("insupplementalsymbolsandpictographs")];
- char uniname2ctype_pool_str4955[sizeof("egyp")];
- char uniname2ctype_pool_str4986[sizeof("inhangulcompatibilityjamo")];
- char uniname2ctype_pool_str5114[sizeof("nyiakengpuachuehmong")];
- char uniname2ctype_pool_str5608[sizeof("egyptianhieroglyphs")];
- char uniname2ctype_pool_str6098[sizeof("insupplementaryprivateuseareab")];
-#endif /* USE_UNICODE_PROPERTIES */
- };
-static const struct uniname2ctype_pool_t uniname2ctype_pool_contents =
- {
-#ifndef USE_UNICODE_PROPERTIES
- "word",
-#else /* USE_UNICODE_PROPERTIES */
- "yi",
- "yiii",
- "lana",
- "z",
- "lina",
- "maka",
- "mani",
- "mn",
- "miao",
- "lo",
- "ci",
- "lao",
- "laoo",
- "inkannada",
- "cn",
- "pi",
- "innko",
- "zzzz",
- "gran",
- "co",
- "lineara",
- "mark",
- "po",
- "me",
- "cari",
- "inkharoshthi",
- "kana",
- "loe",
- "m",
- "grek",
- "mro",
- "mroo",
- "carian",
- "geor",
- "greek",
- "gonm",
- "mendekikakui",
- "pe",
- "mero",
- "inosmanya",
- "cakm",
- "inmanichaean",
- "inmro",
- "inmiao",
- "inchakma",
- "c",
- "mandaic",
- "meeteimayek",
- "inarmenian",
- "inmyanmar",
- "inmakasar",
- "common",
- "lm",
- "marc",
- "inrunic",
- "incarian",
- "inideographicsymbolsandpunctuation",
- "inkhmer",
- "qaai",
- "inahom",
- "merc",
- "combiningmark",
- "lc",
- "perm",
- "mc",
- "connectorpunctuation",
- "cans",
- "incuneiformnumbersandpunctuation",
- "armi",
- "cc",
- "armn",
- "incherokee",
- "prependedconcatenationmark",
- "incuneiform",
- "inavestan",
- "inipaextensions",
- "pc",
- "armenian",
- "insharada",
- "inmarchen",
- "makasar",
- "masaramgondi",
- "inarrows",
- "incyrillic",
- "incham",
- "qmark",
- "ri",
- "qaac",
- "insamaritan",
- "latn",
- "inmasaramgondi",
- "inthaana",
- "latin",
- "inthai",
- "lineseparator",
- "pcm",
- "inkatakana",
- "inkaithi",
- "inzanabazarsquare",
- "inscriptionalparthian",
- "initialpunctuation",
- "mtei",
- "vai",
- "vaii",
- "inkhmersymbols",
- "insyriac",
- "intakri",
- "arabic",
- "zs",
- "katakana",
- "prti",
- "ascii",
- "cs",
- "ps",
- "mand",
- "privateuse",
- "inruminumeralsymbols",
- "inmyanmarextendeda",
- "modi",
- "incjkcompatibilityforms",
- "inkanaextendeda",
- "incjkcompatibilityideographs",
- "brai",
- "mend",
- "ideo",
- "letter",
- "l",
- "inmeeteimayek",
- "inideographicdescriptioncharacters",
- "xidcontinue",
- "knda",
- "innandinagari",
- "kannada",
- "inmodi",
- "inlao",
- "inoldnortharabian",
- "intransportandmapsymbols",
- "letternumber",
- "gothic",
- "inlineara",
- "inmendekikakui",
- "xidc",
- "mongolian",
- "inmiscellaneousmathematicalsymbolsa",
- "inspecials",
- "grlink",
- "brahmi",
- "inemoticons",
- "kali",
- "inolditalic",
- "inmedefaidrin",
- "inchesssymbols",
- "incjkcompatibilityideographssupplement",
- "inadlam",
- "psalterpahlavi",
- "incommonindicnumberforms",
- "lt",
- "innewa",
- "sk",
- "control",
- "inancientsymbols",
- "palm",
- "inlycian",
- "so",
- "patternwhitespace",
- "xids",
- "inmandaic",
- "idc",
- "meroiticcursive",
- "inwarangciti",
- "sora",
- "inopticalcharacterrecognition",
- "inoldsogdian",
- "inmalayalam",
- "bamum",
- "inkanasupplement",
- "insundanese",
- "grext",
-#endif /* USE_UNICODE_PROPERTIES */
- "print",
-#ifndef USE_UNICODE_PROPERTIES
- "punct",
- "alpha",
-#else /* USE_UNICODE_PROPERTIES */
- "intaitham",
- "lower",
- "joinc",
- "inoldsoutharabian",
- "incjkstrokes",
- "batk",
- "samr",
- "inwancho",
- "batak",
- "vs",
- "patws",
- "samaritan",
- "idsbinaryoperator",
- "pauc",
- "insmallkanaextension",
- "sm",
- "indominotiles",
-#endif /* USE_UNICODE_PROPERTIES */
- "alnum",
-#ifdef USE_UNICODE_PROPERTIES
- "insylotinagri",
- "inugaritic",
- "incontrolpictures",
- "inlinearbideograms",
- "inmusicalsymbols",
- "s",
- "ital",
- "inmodifiertoneletters",
- "inancientgreekmusicalnotation",
- "patternsyntax",
- "lisu",
- "lowercase",
- "cwcm",
- "sc",
- "bass",
- "ids",
- "inlatinextendeda",
- "oriya",
- "intaile",
- "inmiscellaneoussymbols",
- "inmiscellaneoussymbolsandarrows",
- "incaucasianalbanian",
- "inmiscellaneoussymbolsandpictographs",
- "inoldturkic",
- "insaurashtra",
- "idcontinue",
- "intamil",
- "inmultani",
- "inlatinextendede",
- "pd",
- "bali",
- "blank",
- "idst",
- "inlydian",
- "innewtailue",
- "bengali",
- "runr",
- "zl",
- "incyrillicextendeda",
- "ll",
- "indeseret",
- "intaixuanjingsymbols",
- "inancientgreeknumbers",
- "idstart",
- "inmeeteimayekextensions",
- "balinese",
- "dia",
- "di",
- "inspacingmodifierletters",
- "inearlydynasticcuneiform",
- "plrd",
- "canadianaboriginal",
- "zinh",
- "sind",
- "osage",
- "inlatinextendedc",
- "uideo",
- "incountingrodnumerals",
- "xidstart",
-#endif /* USE_UNICODE_PROPERTIES */
- "xdigit",
-#ifndef USE_UNICODE_PROPERTIES
- "upper",
- "ascii",
-#else /* USE_UNICODE_PROPERTIES */
- "osma",
- "inkhudawadi",
- "inhanifirohingya",
- "gong",
- "ingrantha",
- "bidic",
- "mong",
- "cased",
- "incyrillicextendedc",
- "inhiragana",
- "sinhala",
- "adlm",
- "glagolitic",
- "sterm",
- "bamu",
- "georgian",
- "inosage",
- "gunjalagondi",
- "phoenician",
- "multani",
- "kaithi",
- "joincontrol",
- "runic",
- "ingeneralpunctuation",
- "inmahajani",
- "incyrillicsupplement",
- "lowercaseletter",
- "marchen",
- "graphemelink",
- "ingeorgian",
- "khojki",
- "cham",
- "inogham",
- "cher",
- "chakma",
- "emoji",
- "insiddham",
- "cherokee",
- "khar",
- "inmongolian",
- "incherokeesupplement",
- "diacritic",
- "manichaean",
- "xsux",
- "inolchiki",
- "quotationmark",
- "adlam",
- "inethiopic",
- "graphemebase",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=11.0",
- "age=12.1",
- "age=10.0",
- "age=12.0",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "casedletter",
- "ingurmukhi",
- "odi",
- "incjkunifiedideographsextensiona",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=1.1",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "lu",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=4.1",
- "age=2.1",
- "age=4.0",
- "age=2.0",
- "age=9.0",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "intamilsupplement",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=6.1",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "unknown",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=6.0",
- "age=6.2",
- "age=3.1",
- "age=8.0",
- "age=3.0",
- "age=3.2",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "cwt",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=7.0",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "unassigned",
-#ifdef USE_UNICODE_AGE_PROPERTIES
- "age=6.3",
- "age=5.1",
- "age=5.0",
- "age=5.2",
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- "ahom",
- "incjkunifiedideographsextensione",
- "khmr",
- "insinhala",
- "inmiscellaneoustechnical",
- "saur",
- "guru",
- "sundanese",
- "punct",
- "paucinhau",
- "gurmukhi",
- "variationselector",
- "logicalorderexception",
- "khmer",
- "limbu",
- "inscriptionalpahlavi",
- "oidc",
- "incjkunifiedideographsextensionc",
-#endif /* USE_UNICODE_PROPERTIES */
- "cntrl",
-#ifdef USE_UNICODE_PROPERTIES
- "inlatinextendedadditional",
- "decimalnumber",
- "insorasompeng",
- "radical",
- "emojimodifier",
- "kharoshthi",
- "n",
- "math",
- "goth",
- "anatolianhieroglyphs",
- "inenclosedalphanumerics",
- "nandinagari",
- "no",
- "nko",
- "nkoo",
- "ingreekandcoptic",
- "olck",
- "p",
- "grantha",
- "olchiki",
- "incjkunifiedideographs",
- "zanb",
- "intirhuta",
- "oids",
- "inhatran",
- "linb",
- "xpeo",
- "mult",
- "saurashtra",
- "kthi",
- "inbhaiksuki",
- "olower",
- "innabataean",
- "inphoenician",
- "inkanbun",
- "inmeroitichieroglyphs",
- "inkayahli",
- "phnx",
- "inoriya",
- "enclosingmark",
- "sd",
- "inelbasan",
- "wara",
- "inenclosedideographicsupplement",
- "sidd",
- "linearb",
- "hani",
- "han",
- "inenclosedalphanumericsupplement",
- "medf",
- "bidicontrol",
- "hano",
- "inphaistosdisc",
- "limb",
- "inkangxiradicals",
- "lepc",
- "medefaidrin",
- "braille",
- "regionalindicator",
- "inlowsurrogates",
- "inshorthandformatcontrols",
- "brah",
- "inkhojki",
- "inoldhungarian",
- "hanunoo",
- "hira",
- "beng",
- "emojimodifierbase",
- "inarabic",
- "lyci",
- "ahex",
- "inherited",
- "glag",
- "lycian",
- "indogra",
- "dsrt",
- "arab",
- "mymr",
- "myanmar",
- "phli",
- "inimperialaramaic",
- "ingreekextended",
- "inanatolianhieroglyphs",
- "punctuation",
- "takri",
- "graphemeextend",
- "invai",
- "cwl",
- "ingeometricshapes",
- "emojicomponent",
- "coptic",
- "deseret",
- "inarabicpresentationformsa",
- "takr",
- "inbasiclatin",
- "incjkunifiedideographsextensiond",
- "sinh",
- "sund",
- "shavian",
- "taile",
- "insundanesesupplement",
- "inelymaic",
- "insoyombo",
- "bhks",
- "bhaiksuki",
- "incjkcompatibility",
- "inhanunoo",
- "intangut",
- "sogdian",
- "inlatinextendedd",
- "sogo",
- "insinhalaarchaicnumbers",
- "ideographic",
- "ugar",
- "copt",
- "imperialaramaic",
- "insogdian",
- "indingbats",
- "format",
- "ininscriptionalpahlavi",
- "ininscriptionalparthian",
- "grbase",
- "inbatak",
- "cprt",
- "cwcf",
- "cuneiform",
- "term",
- "intibetan",
- "intags",
- "asciihexdigit",
- "sentenceterminal",
- "inmayannumerals",
- "nand",
- "patsyn",
- "hatran",
- "inblockelements",
- "inornamentaldingbats",
- "innumberforms",
- "oldpersian",
- "inshavian",
- "bopo",
- "hatr",
- "caseignorable",
- "inoldpersian",
- "modifierletter",
- "cwu",
- "lydi",
- "inbyzantinemusicalsymbols",
- "ingeometricshapesextended",
- "inmyanmarextendedb",
- "innushu",
- "lydian",
- "inunifiedcanadianaboriginalsyllabics",
- "orkh",
- "inyiradicals",
- "inkatakanaphoneticextensions",
- "inethiopicextendeda",
- "incoptic",
- "inarabicextendeda",
- "oldpermic",
- "incjksymbolsandpunctuation",
- "word",
- "bopomofo",
- "ogam",
- "inlisu",
- "inoldpermic",
- "innoblock",
- "taiviet",
- "inbraillepatterns",
- "alpha",
- "inbalinese",
- "sorasompeng",
- "closepunctuation",
- "inmiscellaneousmathematicalsymbolsb",
- "inlepcha",
- "insyriacsupplement",
- "newa",
- "spacingmark",
- "inpalmyrene",
- "cyrl",
- "assigned",
- "mlym",
- "malayalam",
- "ext",
- "newtailue",
-#endif /* USE_UNICODE_PROPERTIES */
- "space",
-#ifdef USE_UNICODE_PROPERTIES
- "intelugu",
- "idsb",
- "indevanagari",
- "avestan",
- "cf",
- "palmyrene",
- "inethiopicsupplement",
- "soyo",
-#endif /* USE_UNICODE_PROPERTIES */
- "xposixpunct",
-#ifndef USE_UNICODE_PROPERTIES
- "lower",
-#else /* USE_UNICODE_PROPERTIES */
- "pf",
- "sarb",
- "zanabazarsquare",
- "ugaritic",
- "osge",
- "java",
- "sharada",
- "dogra",
- "bugi",
- "meroitichieroglyphs",
- "separator",
- "ingeorgiansupplement",
- "sogd",
- "tale",
- "inunifiedcanadianaboriginalsyllabicsextended",
- "terminalpunctuation",
- "shrd",
-#endif /* USE_UNICODE_PROPERTIES */
- "graph",
-#ifdef USE_UNICODE_PROPERTIES
- "olditalic",
- "dogr",
- "gujr",
- "phag",
- "gujarati",
- "inhanguljamo",
- "javanese",
- "taml",
- "inphoneticextensions",
- "siddham",
- "buginese",
- "inmongoliansupplement",
- "invariationselectors",
- "inhanguljamoextendeda",
- "inverticalforms",
- "syrc",
- "number",
- "incopticepactnumbers",
- "avst",
- "inbamum",
- "nd",
- "insuttonsignwriting",
- "extender",
- "intaiviet",
- "hex",
- "incjkunifiedideographsextensionf",
- "other",
- "otheridcontinue",
- "shaw",
- "dash",
- "othernumber",
- "orya",
- "invedicextensions",
- "sgnw",
- "caucasianalbanian",
- "inmathematicalalphanumericsymbols",
- "inphoneticextensionssupplement",
- "invariationselectorssupplement",
- "induployan",
- "syriac",
- "oalpha",
- "innyiakengpuachuehmong",
- "incombiningdiacriticalmarks",
- "inethiopicextended",
- "nl",
- "incombiningdiacriticalmarksforsymbols",
- "khudawadi",
- "otheralphabetic",
- "oldhungarian",
- "incurrencysymbols",
- "incjkradicalssupplement",
- "inglagolitic",
- "intifinagh",
- "ingeorgianextended",
- "surrogate",
- "incyrillicextendedb",
- "ethi",
- "titlecaseletter",
- "rohg",
- "inmeroiticcursive",
- "idstrinaryoperator",
- "inphagspa",
- "lepcha",
- "intagalog",
- "mathsymbol",
- "incombiningdiacriticalmarkssupplement",
- "inbrahmi",
- "insymbolsandpictographsextendeda",
- "inlinearbsyllabary",
- "oldturkic",
- "inbengali",
- "wancho",
- "osmanya",
- "buhd",
- "insmallformvariants",
- "indevanagariextended",
- "softdotted",
- "inbuginese",
- "mahj",
- "inlatin1supplement",
- "ingothic",
- "mahajani",
- "hang",
- "sylo",
- "warangciti",
- "ingujarati",
- "tirhuta",
- "incombiningdiacriticalmarksextended",
- "spaceseparator",
- "ingunjalagondi",
- "wcho",
- "hiragana",
- "extendedpictographic",
- "inrejang",
- "inottomansiyaqnumbers",
- "nchar",
- "cyrillic",
- "khoj",
- "inlimbu",
- "hmng",
- "thaa",
- "thai",
- "incjkunifiedideographsextensionb",
- "deva",
- "thaana",
- "phagspa",
- "devanagari",
- "tang",
- "currencysymbol",
- "tagbanwa",
- "inenclosedcjklettersandmonths",
- "tamil",
- "tirh",
-#endif /* USE_UNICODE_PROPERTIES */
- "digit",
-#ifndef USE_UNICODE_PROPERTIES
- "blank"
-#else /* USE_UNICODE_PROPERTIES */
- "talu",
- "zp",
- "inpaucinhau",
- "taitham",
- "otherlowercase",
- "telu",
- "inaegeannumbers",
- "otherletter",
- "whitespace",
- "nonspacingmark",
- "graphemeclusterbreak=spacingmark",
- "inletterlikesymbols",
- "intagbanwa",
- "oldsogdian",
- "otheridstart",
- "graphemeclusterbreak=cr",
- "narb",
- "changeswhencasemapped",
- "inbopomofo",
- "tangut",
- "graphemeclusterbreak=regionalindicator",
- "noncharactercodepoint",
- "otheruppercase",
- "rjng",
- "sylotinagri",
- "inhangulsyllables",
- "emojipresentation",
- "inindicsiyaqnumbers",
- "inbassavah",
- "ogrext",
- "othersymbol",
- "oupper",
- "inbuhid",
- "hmnp",
- "inpsalterpahlavi",
- "finalpunctuation",
- "phlp",
- "inbamumsupplement",
- "buhid",
- "paragraphseparator",
- "inalphabeticpresentationforms",
- "omath",
- "any",
- "elba",
- "changeswhentitlecased",
- "incombininghalfmarks",
- "intangutcomponents",
- "hebr",
- "deprecated",
- "inarabicmathematicalalphabeticsymbols",
- "inprivateusearea",
- "kayahli",
- "inplayingcards",
- "inarabicpresentationformsb",
- "ogham",
- "elym",
- "graphemeclusterbreak=t",
- "graphemeclusterbreak=lvt",
- "nbat",
- "nabataean",
- "hangul",
- "elymaic",
- "inhebrew",
- "injavanese",
- "symbol",
- "inmathematicaloperators",
- "inarabicsupplement",
- "cypriot",
- "hung",
- "wspace",
- "changeswhenlowercased",
- "elbasan",
- "hluw",
- "insuperscriptsandsubscripts",
- "graphemeclusterbreak=extend",
- "graphemeclusterbreak=prepend",
- "nshu",
- "oldnortharabian",
- "inyijinghexagramsymbols",
- "hexdigit",
- "graphemeclusterbreak=l",
- "graphemeclusterbreak=control",
- "bassavah",
- "otherdefaultignorablecodepoint",
- "changeswhenuppercased",
- "inalchemicalsymbols",
- "insupplementalarrowsa",
- "inyisyllables",
- "tibt",
- "othermath",
- "tibetan",
- "inmahjongtiles",
- "signwriting",
- "nushu",
- "modifiersymbol",
- "inhalfwidthandfullwidthforms",
- "upper",
- "insupplementalarrowsc",
- "insupplementalmathematicaloperators",
- "incypriotsyllabary",
- "dupl",
- "tavt",
- "inpahawhhmong",
- "alphabetic",
- "dashpunctuation",
- "uppercase",
- "soyombo",
- "hanifirohingya",
- "otherpunctuation",
- "defaultignorablecodepoint",
- "inhanguljamoextendedb",
- "aghb",
- "tifinagh",
- "inlatinextendedb",
- "tfng",
- "inhighprivateusesurrogates",
- "changeswhencasefolded",
- "dep",
- "oldsoutharabian",
- "graphemeclusterbreak=lf",
- "pahawhhmong",
- "unifiedideograph",
- "uppercaseletter",
- "insupplementalpunctuation",
- "ethiopic",
- "inglagoliticsupplement",
- "rejang",
- "inbopomofoextended",
- "tagb",
- "othergraphemeextend",
- "inegyptianhieroglyphs",
- "inegyptianhieroglyphformatcontrols",
- "hebrew",
- "tglg",
- "tagalog",
- "graphemeclusterbreak=zwj",
- "zyyy",
- "hyphen",
- "inboxdrawing",
- "graphemeclusterbreak=v",
- "graphemeclusterbreak=lv",
- "telugu",
- "duployan",
- "openpunctuation",
- "insupplementaryprivateuseareaa",
- "inhighsurrogates",
- "insupplementalarrowsb",
- "insupplementalsymbolsandpictographs",
- "egyp",
- "inhangulcompatibilityjamo",
- "nyiakengpuachuehmong",
- "egyptianhieroglyphs",
- "insupplementaryprivateuseareab"
-#endif /* USE_UNICODE_PROPERTIES */
- };
-#define uniname2ctype_pool ((const char *) &uniname2ctype_pool_contents)
-const struct uniname2ctype_struct *
-uniname2ctype_p (register const char *str, register size_t len)
-{
- static const struct uniname2ctype_struct wordlist[] =
- {
-#ifdef USE_UNICODE_PROPERTIES
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str11), 111},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str17), 111},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str22), 152},
- {-1},
- {uniname2ctype_offset(str24), 52},
- {uniname2ctype_offset(str25), 184},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str33), 218},
- {-1},
- {uniname2ctype_offset(str35), 186},
- {uniname2ctype_offset(str36), 34},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str45), 173},
- {uniname2ctype_offset(str46), 28},
- {uniname2ctype_offset(str47), 61},
- {uniname2ctype_offset(str48), 95},
- {uniname2ctype_offset(str49), 95},
- {-1}, {-1},
- {uniname2ctype_offset(str52), 331},
- {-1}, {-1},
- {uniname2ctype_offset(str55), 21},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str64), 44},
- {-1},
- {uniname2ctype_offset(str66), 319},
- {uniname2ctype_offset(str67), 267},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str71), 181},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str75), 22},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str83), 184},
- {-1}, {-1},
- {uniname2ctype_offset(str86), 31},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str92), 45},
- {-1},
- {uniname2ctype_offset(str94), 33},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str100), 149},
- {uniname2ctype_offset(str101), 496},
- {uniname2ctype_offset(str102), 108},
- {uniname2ctype_offset(str103), 252},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str107), 31},
- {uniname2ctype_offset(str108), 77},
- {-1}, {-1},
- {uniname2ctype_offset(str111), 189},
- {uniname2ctype_offset(str112), 189},
- {-1}, {-1},
- {uniname2ctype_offset(str115), 149},
- {-1},
- {uniname2ctype_offset(str117), 98},
- {uniname2ctype_offset(str118), 77},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str122), 212},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str129), 187},
- {uniname2ctype_offset(str130), 42},
- {uniname2ctype_offset(str131), 172},
- {-1}, {-1},
- {uniname2ctype_offset(str134), 482},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str139), 170},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str145), 499},
- {uniname2ctype_offset(str146), 548},
- {-1},
- {uniname2ctype_offset(str148), 552},
- {uniname2ctype_offset(str149), 514},
- {-1},
- {uniname2ctype_offset(str151), 18},
- {uniname2ctype_offset(str152), 169},
- {uniname2ctype_offset(str153), 160},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str161), 313},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str177), 337},
- {uniname2ctype_offset(str178), 539},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str183), 75},
- {-1}, {-1},
- {uniname2ctype_offset(str186), 27},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str190), 208},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str203), 345},
- {uniname2ctype_offset(str204), 473},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str210), 553},
- {-1},
- {uniname2ctype_offset(str212), 350},
- {uniname2ctype_offset(str213), 115},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str218), 528},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str226), 171},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str231), 31},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str236), 25},
- {uniname2ctype_offset(str237), 194},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str246), 32},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str250), 40},
- {-1}, {-1},
- {uniname2ctype_offset(str253), 102},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str260), 542},
- {-1}, {-1},
- {uniname2ctype_offset(str263), 161},
- {-1},
- {uniname2ctype_offset(str265), 19},
- {-1},
- {uniname2ctype_offset(str267), 79},
- {uniname2ctype_offset(str268), 342},
- {-1},
- {uniname2ctype_offset(str270), 259},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str274), 541},
- {uniname2ctype_offset(str275), 500},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str281), 307},
- {uniname2ctype_offset(str282), 40},
- {uniname2ctype_offset(str283), 79},
- {-1},
- {uniname2ctype_offset(str285), 516},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str289), 536},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str293), 218},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str297), 212},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str301), 380},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str311), 311},
- {-1},
- {uniname2ctype_offset(str313), 441},
- {-1},
- {uniname2ctype_offset(str315), 232},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str320), 260},
- {-1},
- {uniname2ctype_offset(str322), 129},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str328), 320},
- {-1}, {-1},
- {uniname2ctype_offset(str331), 76},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str335), 537},
- {-1}, {-1},
- {uniname2ctype_offset(str338), 318},
- {-1},
- {uniname2ctype_offset(str340), 76},
- {-1},
- {uniname2ctype_offset(str342), 334},
- {-1}, {-1},
- {uniname2ctype_offset(str345), 53},
- {uniname2ctype_offset(str346), 259},
- {-1},
- {uniname2ctype_offset(str348), 411},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str352), 512},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str357), 532},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str362), 163},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str366), 44},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str373), 160},
- {-1}, {-1},
- {uniname2ctype_offset(str376), 144},
- {uniname2ctype_offset(str377), 144},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str386), 356},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str399), 316},
- {-1},
- {uniname2ctype_offset(str401), 527},
- {-1}, {-1},
- {uniname2ctype_offset(str404), 81},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str411), 55},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str418), 108},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str426), 163},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str442), 14},
- {-1}, {-1},
- {uniname2ctype_offset(str445), 23},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str462), 46},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str468), 169},
- {-1},
- {uniname2ctype_offset(str470), 22},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str475), 507},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str480), 442},
- {uniname2ctype_offset(str481), 188},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str486), 461},
- {-1},
- {uniname2ctype_offset(str488), 557},
- {-1}, {-1},
- {uniname2ctype_offset(str491), 455},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str500), 127},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str504), 187},
- {uniname2ctype_offset(str505), 238},
- {uniname2ctype_offset(str506), 24},
- {-1}, {-1},
- {uniname2ctype_offset(str509), 24},
- {-1},
- {uniname2ctype_offset(str511), 448},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str520), 408},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str535), 70},
- {-1}, {-1},
- {uniname2ctype_offset(str538), 91},
- {-1}, {-1},
- {uniname2ctype_offset(str541), 531},
- {-1},
- {uniname2ctype_offset(str543), 91},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str556), 525},
- {-1},
- {uniname2ctype_offset(str558), 335},
- {-1},
- {uniname2ctype_offset(str560), 498},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str565), 586},
- {uniname2ctype_offset(str566), 37},
- {-1},
- {uniname2ctype_offset(str568), 113},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str572), 486},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str577), 573},
- {uniname2ctype_offset(str578), 70},
- {uniname2ctype_offset(str579), 106},
- {-1}, {-1},
- {uniname2ctype_offset(str582), 391},
- {uniname2ctype_offset(str583), 465},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str590), 74},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str594), 168},
- {-1},
- {uniname2ctype_offset(str596), 584},
- {uniname2ctype_offset(str597), 146},
- {-1}, {-1},
- {uniname2ctype_offset(str600), 475},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str604), 551},
- {uniname2ctype_offset(str605), 591},
- {-1}, {-1},
- {uniname2ctype_offset(str608), 598},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str614), 574},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str624), 195},
- {uniname2ctype_offset(str625), 432},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str630), 29},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str636), 522},
- {-1}, {-1},
- {uniname2ctype_offset(str639), 49},
- {-1}, {-1},
- {uniname2ctype_offset(str642), 19},
- {-1}, {-1},
- {uniname2ctype_offset(str645), 470},
- {-1},
- {uniname2ctype_offset(str647), 192},
- {-1}, {-1},
- {uniname2ctype_offset(str650), 472},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str657), 51},
- {-1}, {-1},
- {uniname2ctype_offset(str660), 257},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str668), 69},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str672), 321},
- {-1}, {-1},
- {uniname2ctype_offset(str675), 68},
- {-1}, {-1},
- {uniname2ctype_offset(str678), 171},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str695), 530},
- {uniname2ctype_offset(str696), 175},
- {uniname2ctype_offset(str697), 384},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str703), 508},
- {-1},
- {uniname2ctype_offset(str705), 332},
- {-1},
- {uniname2ctype_offset(str707), 158},
- {uniname2ctype_offset(str708), 556},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str713), 361},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str720), 72},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str737), 7},
- {uniname2ctype_offset(str738), 358},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str742), 6},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str753), 229},
- {-1},
- {uniname2ctype_offset(str755), 497},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str760), 416},
- {uniname2ctype_offset(str761), 167},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str766), 156},
- {uniname2ctype_offset(str767), 572},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str771), 167},
- {uniname2ctype_offset(str772), 256},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str776), 257},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str783), 156},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str787), 245},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str791), 193},
- {-1}, {-1},
- {uniname2ctype_offset(str794), 558},
- {-1}, {-1},
- {uniname2ctype_offset(str797), 50},
- {-1},
- {uniname2ctype_offset(str799), 579},
- {-1}, {-1},
- {uniname2ctype_offset(str802), 13},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str809), 431},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str814), 478},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str818), 383},
- {-1}, {-1},
- {uniname2ctype_offset(str821), 467},
- {uniname2ctype_offset(str822), 563},
- {uniname2ctype_offset(str823), 47},
- {uniname2ctype_offset(str824), 112},
- {uniname2ctype_offset(str825), 429},
- {-1}, {-1},
- {uniname2ctype_offset(str828), 564},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str834), 258},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str838), 157},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str842), 58},
- {-1}, {-1},
- {uniname2ctype_offset(str845), 66},
- {-1},
- {uniname2ctype_offset(str847), 48},
- {uniname2ctype_offset(str848), 178},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str855), 67},
- {-1},
- {uniname2ctype_offset(str857), 305},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str862), 88},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str875), 354},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str886), 389},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str895), 397},
- {-1}, {-1},
- {uniname2ctype_offset(str898), 485},
- {-1},
- {uniname2ctype_offset(str900), 583},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str906), 504},
- {uniname2ctype_offset(str907), 434},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str924), 68},
- {-1},
- {uniname2ctype_offset(str926), 329},
- {-1},
- {uniname2ctype_offset(str928), 519},
- {uniname2ctype_offset(str929), 446},
- {uniname2ctype_offset(str930), 41},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str946), 136},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str961), 2},
- {-1},
- {uniname2ctype_offset(str963), 246},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str974), 493},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str986), 355},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str994), 85},
- {uniname2ctype_offset(str995), 104},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1005), 53},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1009), 404},
- {uniname2ctype_offset(str1010), 26},
- {-1}, {-1},
- {uniname2ctype_offset(str1013), 480},
- {uniname2ctype_offset(str1014), 566},
- {uniname2ctype_offset(str1015), 469},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1021), 67},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1025), 444},
- {-1}, {-1},
- {uniname2ctype_offset(str1028), 136},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1032), 239},
- {uniname2ctype_offset(str1033), 71},
- {-1},
- {uniname2ctype_offset(str1035), 308},
- {uniname2ctype_offset(str1036), 543},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1049), 173},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1067), 102},
- {-1}, {-1},
- {uniname2ctype_offset(str1070), 115},
- {-1},
- {uniname2ctype_offset(str1072), 197},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1080), 210},
- {uniname2ctype_offset(str1081), 399},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1085), 248},
- {-1},
- {uniname2ctype_offset(str1087), 567},
- {-1}, {-1},
- {uniname2ctype_offset(str1090), 69},
- {uniname2ctype_offset(str1091), 11},
- {-1},
- {uniname2ctype_offset(str1093), 125},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1097), 520},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1102), 506},
- {-1}, {-1},
- {uniname2ctype_offset(str1105), 217},
- {-1},
- {uniname2ctype_offset(str1107), 521},
- {-1},
- {uniname2ctype_offset(str1109), 228},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1119), 106},
- {uniname2ctype_offset(str1120), 60},
- {uniname2ctype_offset(str1121), 365},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1134), 410},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1140), 93},
- {-1},
- {uniname2ctype_offset(str1142), 206},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1146), 131},
- {uniname2ctype_offset(str1147), 255},
- {-1},
- {uniname2ctype_offset(str1149), 158},
- {uniname2ctype_offset(str1150), 98},
- {uniname2ctype_offset(str1151), 483},
- {uniname2ctype_offset(str1152), 217},
- {uniname2ctype_offset(str1153), 138},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1157), 203},
- {uniname2ctype_offset(str1158), 166},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1164), 229},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1168), 104},
- {-1},
- {uniname2ctype_offset(str1170), 374},
- {uniname2ctype_offset(str1171), 515},
- {-1}, {-1},
- {uniname2ctype_offset(str1174), 312},
- {uniname2ctype_offset(str1175), 26},
- {uniname2ctype_offset(str1176), 208},
- {uniname2ctype_offset(str1177), 74},
- {uniname2ctype_offset(str1178), 338},
- {-1},
- {uniname2ctype_offset(str1180), 183},
- {uniname2ctype_offset(str1181), 151},
- {uniname2ctype_offset(str1182), 344},
- {uniname2ctype_offset(str1183), 101},
- {-1},
- {uniname2ctype_offset(str1185), 170},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1190), 261},
- {uniname2ctype_offset(str1191), 524},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1197), 101},
- {uniname2ctype_offset(str1198), 135},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1203), 351},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1207), 447},
- {uniname2ctype_offset(str1208), 239},
- {uniname2ctype_offset(str1209), 186},
- {uniname2ctype_offset(str1210), 137},
- {-1},
- {uniname2ctype_offset(str1212), 364},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1227), 232},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1231), 206},
- {uniname2ctype_offset(str1232), 340},
- {uniname2ctype_offset(str1233), 73},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1234), 287},
- {uniname2ctype_offset(str1235), 289},
- {uniname2ctype_offset(str1236), 286},
- {uniname2ctype_offset(str1237), 288},
- {-1}, {-1}, {-1}, {-1}, {-1},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1243), 25},
- {uniname2ctype_offset(str1244), 326},
- {uniname2ctype_offset(str1245), 249},
- {uniname2ctype_offset(str1246), 420},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1247), 268},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1248), 30},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1}, {-1}, {-1}, {-1}, {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1249), 275},
- {uniname2ctype_offset(str1250), 270},
- {uniname2ctype_offset(str1251), 274},
- {uniname2ctype_offset(str1252), 269},
- {uniname2ctype_offset(str1253), 285},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1254), 540},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1255), 280},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1256), 267},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1257), 279},
- {uniname2ctype_offset(str1258), 281},
- {uniname2ctype_offset(str1259), 272},
- {uniname2ctype_offset(str1260), 284},
- {uniname2ctype_offset(str1261), 271},
- {uniname2ctype_offset(str1262), 273},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1263), 64},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1}, {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1264), 283},
- {-1},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1266), 21},
-#ifndef USE_UNICODE_AGE_PROPERTIES
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#else /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1267), 282},
- {uniname2ctype_offset(str1268), 277},
- {-1},
- {uniname2ctype_offset(str1270), 276},
- {uniname2ctype_offset(str1271), 278},
- {-1}, {-1},
-#endif /* USE_UNICODE_AGE_PROPERTIES */
- {uniname2ctype_offset(str1274), 200},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1282), 596},
- {-1}, {-1},
- {uniname2ctype_offset(str1285), 105},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1289), 333},
- {-1}, {-1},
- {uniname2ctype_offset(str1292), 382},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1297), 145},
- {-1}, {-1},
- {uniname2ctype_offset(str1300), 86},
- {uniname2ctype_offset(str1301), 141},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1306), 15},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1314), 193},
- {-1}, {-1},
- {uniname2ctype_offset(str1317), 86},
- {-1},
- {uniname2ctype_offset(str1319), 256},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str1331), 252},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1340), 105},
- {-1}, {-1},
- {uniname2ctype_offset(str1343), 120},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str1354), 164},
- {uniname2ctype_offset(str1355), 254},
- {-1}, {-1},
- {uniname2ctype_offset(str1358), 594},
- {-1},
- {uniname2ctype_offset(str1360), 3},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1365), 372},
- {uniname2ctype_offset(str1366), 36},
- {uniname2ctype_offset(str1367), 513},
- {-1},
- {uniname2ctype_offset(str1369), 247},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1373), 263},
- {-1},
- {uniname2ctype_offset(str1375), 135},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1380), 35},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1384), 56},
- {-1}, {-1},
- {uniname2ctype_offset(str1387), 113},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1400), 201},
- {uniname2ctype_offset(str1401), 385},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1407), 224},
- {-1},
- {uniname2ctype_offset(str1409), 38},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1419), 140},
- {uniname2ctype_offset(str1420), 140},
- {-1},
- {uniname2ctype_offset(str1422), 310},
- {uniname2ctype_offset(str1423), 143},
- {-1}, {-1},
- {uniname2ctype_offset(str1426), 39},
- {-1},
- {uniname2ctype_offset(str1428), 181},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1434), 143},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1438), 422},
- {-1}, {-1},
- {uniname2ctype_offset(str1441), 215},
- {uniname2ctype_offset(str1442), 523},
- {-1}, {-1},
- {uniname2ctype_offset(str1445), 253},
- {-1}, {-1},
- {uniname2ctype_offset(str1448), 491},
- {uniname2ctype_offset(str1449), 122},
- {uniname2ctype_offset(str1450), 134},
- {uniname2ctype_offset(str1451), 203},
- {-1}, {-1},
- {uniname2ctype_offset(str1454), 145},
- {-1}, {-1},
- {uniname2ctype_offset(str1457), 166},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1462), 535},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1466), 241},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1470), 490},
- {uniname2ctype_offset(str1471), 492},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1475), 414},
- {uniname2ctype_offset(str1476), 494},
- {-1},
- {uniname2ctype_offset(str1478), 436},
- {-1}, {-1},
- {uniname2ctype_offset(str1481), 138},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1485), 328},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1489), 33},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1495), 251},
- {-1},
- {uniname2ctype_offset(str1497), 484},
- {uniname2ctype_offset(str1498), 199},
- {uniname2ctype_offset(str1499), 582},
- {-1},
- {uniname2ctype_offset(str1501), 196},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1507), 122},
- {-1},
- {uniname2ctype_offset(str1509), 110},
- {-1}, {-1},
- {uniname2ctype_offset(str1512), 110},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1517), 581},
- {-1},
- {uniname2ctype_offset(str1519), 219},
- {uniname2ctype_offset(str1520), 228},
- {-1}, {-1},
- {uniname2ctype_offset(str1523), 117},
- {uniname2ctype_offset(str1524), 471},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1529), 120},
- {-1},
- {uniname2ctype_offset(str1531), 407},
- {-1},
- {uniname2ctype_offset(str1533), 142},
- {-1},
- {uniname2ctype_offset(str1535), 219},
- {uniname2ctype_offset(str1536), 127},
- {uniname2ctype_offset(str1537), 260},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1542), 453},
- {-1},
- {uniname2ctype_offset(str1544), 561},
- {-1}, {-1},
- {uniname2ctype_offset(str1547), 168},
- {uniname2ctype_offset(str1548), 518},
- {uniname2ctype_offset(str1549), 505},
- {-1}, {-1},
- {uniname2ctype_offset(str1552), 117},
- {-1}, {-1},
- {uniname2ctype_offset(str1555), 107},
- {-1},
- {uniname2ctype_offset(str1557), 85},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1563), 264},
- {-1},
- {uniname2ctype_offset(str1565), 315},
- {-1},
- {uniname2ctype_offset(str1567), 148},
- {-1},
- {uniname2ctype_offset(str1569), 236},
- {-1}, {-1},
- {uniname2ctype_offset(str1572), 115},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1580), 131},
- {-1},
- {uniname2ctype_offset(str1582), 148},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1587), 529},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1594), 114},
- {-1}, {-1},
- {uniname2ctype_offset(str1597), 81},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1602), 97},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1607), 97},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1613), 164},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1617), 488},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1622), 373},
- {uniname2ctype_offset(str1623), 546},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1629), 39},
- {-1},
- {uniname2ctype_offset(str1631), 176},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1635), 72},
- {-1}, {-1},
- {uniname2ctype_offset(str1638), 426},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1643), 62},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str1654), 388},
- {uniname2ctype_offset(str1655), 265},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1662), 129},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1671), 114},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1675), 457},
- {uniname2ctype_offset(str1676), 176},
- {uniname2ctype_offset(str1677), 303},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1682), 595},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1686), 93},
- {uniname2ctype_offset(str1687), 141},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1691), 124},
- {uniname2ctype_offset(str1692), 121},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1699), 367},
- {-1}, {-1},
- {uniname2ctype_offset(str1702), 510},
- {uniname2ctype_offset(str1703), 533},
- {uniname2ctype_offset(str1704), 207},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1714), 207},
- {-1},
- {uniname2ctype_offset(str1716), 419},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1722), 347},
- {-1},
- {uniname2ctype_offset(str1724), 554},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1728), 221},
- {uniname2ctype_offset(str1729), 430},
- {uniname2ctype_offset(str1730), 222},
- {uniname2ctype_offset(str1731), 517},
- {uniname2ctype_offset(str1732), 238},
- {uniname2ctype_offset(str1733), 123},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1740), 129},
- {-1},
- {uniname2ctype_offset(str1742), 161},
- {-1}, {-1},
- {uniname2ctype_offset(str1745), 509},
- {uniname2ctype_offset(str1746), 390},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1750), 20},
- {-1},
- {uniname2ctype_offset(str1752), 502},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1757), 501},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1766), 73},
- {-1}, {-1},
- {uniname2ctype_offset(str1769), 362},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1776), 126},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1780), 65},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1788), 137},
- {-1}, {-1},
- {uniname2ctype_offset(str1791), 233},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1806), 336},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1810), 599},
- {uniname2ctype_offset(str1811), 236},
- {-1},
- {uniname2ctype_offset(str1813), 255},
- {-1}, {-1},
- {uniname2ctype_offset(str1816), 565},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1821), 224},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1825), 258},
- {uniname2ctype_offset(str1826), 202},
- {-1},
- {uniname2ctype_offset(str1828), 387},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1838), 585},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1842), 379},
- {uniname2ctype_offset(str1843), 134},
- {-1}, {-1},
- {uniname2ctype_offset(str1846), 481},
- {-1},
- {uniname2ctype_offset(str1848), 109},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1861), 202},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1866), 61},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1871), 479},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1878), 27},
- {-1}, {-1},
- {uniname2ctype_offset(str1881), 63},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1891), 150},
- {uniname2ctype_offset(str1892), 562},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1896), 588},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1904), 440},
- {uniname2ctype_offset(str1905), 559},
- {uniname2ctype_offset(str1906), 150},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1911), 343},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1915), 165},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1928), 424},
- {uniname2ctype_offset(str1929), 417},
- {uniname2ctype_offset(str1930), 445},
- {-1},
- {uniname2ctype_offset(str1932), 400},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1936), 323},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str1947), 194},
- {-1}, {-1},
- {uniname2ctype_offset(str1950), 409},
- {uniname2ctype_offset(str1951), 12},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1958), 109},
- {-1}, {-1},
- {uniname2ctype_offset(str1961), 103},
- {-1}, {-1},
- {uniname2ctype_offset(str1964), 425},
- {-1}, {-1},
- {uniname2ctype_offset(str1967), 477},
- {uniname2ctype_offset(str1968), 603},
- {-1}, {-1},
- {uniname2ctype_offset(str1971), 153},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1985), 393},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str1991), 1},
- {-1},
- {uniname2ctype_offset(str1993), 360},
- {uniname2ctype_offset(str1994), 175},
- {-1},
- {uniname2ctype_offset(str1996), 42},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2006), 395},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2010), 363},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2014), 322},
- {-1},
- {uniname2ctype_offset(str2016), 209},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2023), 32},
- {uniname2ctype_offset(str2024), 489},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2033), 78},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2043), 17},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2048), 92},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2055), 92},
- {-1}, {-1},
- {uniname2ctype_offset(str2058), 240},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2062), 130},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2070), 9},
- {-1}, {-1},
- {uniname2ctype_offset(str2073), 330},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2078), 245},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2083), 324},
- {uniname2ctype_offset(str2084), 154},
- {uniname2ctype_offset(str2085), 20},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2093), 192},
- {-1},
- {uniname2ctype_offset(str2095), 341},
- {-1},
- {uniname2ctype_offset(str2097), 214},
- {uniname2ctype_offset(str2098), 8},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2102), 43},
- {uniname2ctype_offset(str2103), 162},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2109), 215},
- {uniname2ctype_offset(str2110), 123},
- {-1},
- {uniname2ctype_offset(str2112), 210},
- {-1},
- {uniname2ctype_offset(str2114), 159},
- {-1}, {-1},
- {uniname2ctype_offset(str2117), 174},
- {-1},
- {uniname2ctype_offset(str2119), 216},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2135), 128},
- {-1},
- {uniname2ctype_offset(str2137), 172},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2145), 52},
- {uniname2ctype_offset(str2146), 401},
- {-1}, {-1},
- {uniname2ctype_offset(str2149), 221},
- {uniname2ctype_offset(str2150), 121},
- {-1}, {-1},
- {uniname2ctype_offset(str2153), 352},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2161), 233},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2165), 174},
- {uniname2ctype_offset(str2166), 5},
- {uniname2ctype_offset(str2167), 112},
- {-1}, {-1},
- {uniname2ctype_offset(str2170), 216},
- {-1}, {-1},
- {uniname2ctype_offset(str2173), 87},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2181), 139},
- {uniname2ctype_offset(str2182), 87},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2195), 339},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2199), 159},
- {-1},
- {uniname2ctype_offset(str2201), 89},
- {-1}, {-1},
- {uniname2ctype_offset(str2204), 369},
- {-1}, {-1},
- {uniname2ctype_offset(str2207), 196},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2217), 128},
- {uniname2ctype_offset(str2218), 526},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2222), 458},
- {-1},
- {uniname2ctype_offset(str2224), 438},
- {uniname2ctype_offset(str2225), 459},
- {-1}, {-1},
- {uniname2ctype_offset(str2228), 82},
- {uniname2ctype_offset(str2229), 35},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2235), 474},
- {-1}, {-1},
- {uniname2ctype_offset(str2238), 154},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2244), 428},
- {-1}, {-1},
- {uniname2ctype_offset(str2247), 36},
- {uniname2ctype_offset(str2248), 569},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2252), 240},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2258), 443},
- {-1},
- {uniname2ctype_offset(str2260), 235},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2268), 597},
- {-1}, {-1},
- {uniname2ctype_offset(str2271), 18},
- {uniname2ctype_offset(str2272), 254},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2278), 124},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2282), 230},
- {-1}, {-1},
- {uniname2ctype_offset(str2285), 38},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2294), 88},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2302), 368},
- {-1}, {-1},
- {uniname2ctype_offset(str2305), 205},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2312), 177},
- {-1}, {-1},
- {uniname2ctype_offset(str2315), 568},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2321), 370},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2339), 600},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2343), 560},
- {uniname2ctype_offset(str2344), 82},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2357), 237},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2361), 571},
- {-1}, {-1},
- {uniname2ctype_offset(str2364), 309},
- {uniname2ctype_offset(str2365), 403},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2373), 37},
- {uniname2ctype_offset(str2374), 377},
- {uniname2ctype_offset(str2375), 197},
- {-1}, {-1},
- {uniname2ctype_offset(str2378), 237},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str2389), 204},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2396), 376},
- {uniname2ctype_offset(str2397), 406},
- {uniname2ctype_offset(str2398), 398},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2415), 402},
- {uniname2ctype_offset(str2416), 366},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str2427), 23},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2433), 427},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2440), 100},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str2451), 29},
- {-1}, {-1},
- {uniname2ctype_offset(str2454), 220},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2458), 495},
- {-1},
- {uniname2ctype_offset(str2460), 246},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2470), 433},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2475), 142},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2479), 346},
- {uniname2ctype_offset(str2480), 50},
- {uniname2ctype_offset(str2481), 371},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2506), 511},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2513), 592},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2519), 466},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2529), 165},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2534), 325},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2540), 226},
- {-1},
- {uniname2ctype_offset(str2542), 125},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2548), 118},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2552), 462},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2561), 435},
- {uniname2ctype_offset(str2562), 251},
- {-1},
- {uniname2ctype_offset(str2564), 357},
- {-1},
- {uniname2ctype_offset(str2566), 185},
- {uniname2ctype_offset(str2567), 304},
- {-1}, {-1},
- {uniname2ctype_offset(str2570), 476},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2575), 185},
- {uniname2ctype_offset(str2576), 99},
- {-1}, {-1},
- {uniname2ctype_offset(str2579), 133},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2586), 199},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2595), 327},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2603), 198},
- {-1}, {-1},
- {uniname2ctype_offset(str2606), 359},
- {-1}, {-1},
- {uniname2ctype_offset(str2609), 55},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2614), 538},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2624), 226},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2631), 107},
- {-1}, {-1},
- {uniname2ctype_offset(str2634), 266},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2643), 437},
- {uniname2ctype_offset(str2644), 576},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2648), 243},
- {-1},
- {uniname2ctype_offset(str2650), 78},
- {-1}, {-1},
- {uniname2ctype_offset(str2653), 183},
- {-1}, {-1},
- {uniname2ctype_offset(str2656), 353},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2663), 182},
- {-1},
- {uniname2ctype_offset(str2665), 83},
- {-1}, {-1},
- {uniname2ctype_offset(str2668), 94},
- {-1},
- {uniname2ctype_offset(str2670), 593},
- {-1}, {-1},
- {uniname2ctype_offset(str2673), 84},
- {-1}, {-1},
- {uniname2ctype_offset(str2676), 83},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str2688), 139},
- {-1}, {-1},
- {uniname2ctype_offset(str2691), 84},
- {uniname2ctype_offset(str2692), 211},
- {-1},
- {uniname2ctype_offset(str2694), 48},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2698), 119},
- {-1}, {-1},
- {uniname2ctype_offset(str2701), 418},
- {uniname2ctype_offset(str2702), 89},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2721), 198},
- {-1},
- {uniname2ctype_offset(str2723), 4},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2732), 130},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2747), 54},
- {-1}, {-1},
- {uniname2ctype_offset(str2750), 534},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2760), 152},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2764), 241},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2768), 90},
- {uniname2ctype_offset(str2769), 468},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2777), 28},
- {-1}, {-1},
- {uniname2ctype_offset(str2780), 227},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2793), 34},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2816), 296},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2821), 378},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2834), 349},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2841), 222},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2848), 253},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2852), 291},
- {-1}, {-1},
- {uniname2ctype_offset(str2855), 190},
- {uniname2ctype_offset(str2856), 66},
- {-1}, {-1},
- {uniname2ctype_offset(str2859), 412},
- {-1}, {-1},
- {uniname2ctype_offset(str2862), 211},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2867), 295},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2871), 243},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str2883), 242},
- {-1},
- {uniname2ctype_offset(str2885), 147},
- {uniname2ctype_offset(str2886), 133},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2904), 449},
- {uniname2ctype_offset(str2905), 262},
- {uniname2ctype_offset(str2906), 575},
- {-1}, {-1},
- {uniname2ctype_offset(str2909), 549},
- {-1}, {-1},
- {uniname2ctype_offset(str2912), 244},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2926), 51},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str2938), 242},
- {-1}, {-1},
- {uniname2ctype_offset(str2941), 348},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2963), 225},
- {uniname2ctype_offset(str2964), 503},
- {-1}, {-1},
- {uniname2ctype_offset(str2967), 43},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2980), 195},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2984), 547},
- {-1},
- {uniname2ctype_offset(str2986), 118},
- {uniname2ctype_offset(str2987), 54},
- {uniname2ctype_offset(str2988), 456},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str2993), 234},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3000), 16},
- {uniname2ctype_offset(str3001), 180},
- {uniname2ctype_offset(str3002), 64},
- {-1}, {-1},
- {uniname2ctype_offset(str3005), 460},
- {uniname2ctype_offset(str3006), 555},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3012), 80},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3028), 250},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3045), 577},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3055), 454},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3089), 146},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3098), 580},
- {uniname2ctype_offset(str3099), 463},
- {uniname2ctype_offset(str3100), 103},
- {uniname2ctype_offset(str3101), 223},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3107), 299},
- {-1},
- {uniname2ctype_offset(str3109), 301},
- {-1},
- {uniname2ctype_offset(str3111), 191},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3125), 191},
- {uniname2ctype_offset(str3126), 99},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3134), 223},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3158), 314},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3165), 439},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3169), 47},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3176), 381},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3180), 317},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3185), 126},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3194), 204},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str3205), 227},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3209), 62},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3215), 180},
- {-1}, {-1},
- {uniname2ctype_offset(str3218), 201},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3237), 375},
- {-1},
- {uniname2ctype_offset(str3239), 294},
- {uniname2ctype_offset(str3240), 290},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3248), 213},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3254), 190},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str3266), 421},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str3286), 235},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str3297), 297},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3303), 293},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3309), 178},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3317), 249},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str3328), 63},
- {uniname2ctype_offset(str3329), 587},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3348), 392},
- {uniname2ctype_offset(str3349), 423},
- {-1},
- {uniname2ctype_offset(str3351), 96},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3360), 234},
- {-1}, {-1},
- {uniname2ctype_offset(str3363), 96},
- {-1},
- {uniname2ctype_offset(str3365), 578},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3433), 205},
- {-1}, {-1},
- {uniname2ctype_offset(str3436), 213},
- {-1}, {-1},
- {uniname2ctype_offset(str3439), 49},
- {-1}, {-1},
- {uniname2ctype_offset(str3442), 464},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3458), 10},
- {-1},
- {uniname2ctype_offset(str3460), 589},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3511), 396},
- {uniname2ctype_offset(str3512), 487},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3517), 179},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3531), 153},
- {uniname2ctype_offset(str3532), 550},
- {uniname2ctype_offset(str3533), 57},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3550), 41},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3558), 59},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3613), 214},
- {uniname2ctype_offset(str3614), 220},
- {-1},
- {uniname2ctype_offset(str3616), 45},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str3628), 71},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str3648), 450},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3664), 177},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str3703), 132},
- {-1},
- {uniname2ctype_offset(str3705), 306},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3714), 132},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3766), 452},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3791), 65},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3805), 250},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3819), 162},
- {-1},
- {uniname2ctype_offset(str3821), 292},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str3842), 182},
- {-1}, {-1},
- {uniname2ctype_offset(str3845), 248},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3891), 30},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3924), 405},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3942), 100},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3976), 570},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str3995), 147},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str4087), 415},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4109), 119},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4137), 244},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4162), 544},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4175), 545},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4203), 80},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4254), 116},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4276), 116},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4291), 302},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str4321), 75},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1},
- {uniname2ctype_offset(str4360), 231},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4397), 386},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4405), 298},
- {uniname2ctype_offset(str4406), 300},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4460), 90},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4485), 179},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4528), 46},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str4674), 601},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4683), 451},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4772), 394},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4948), 590},
-#endif /* USE_UNICODE_PROPERTIES */
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#ifndef USE_UNICODE_PROPERTIES
- {uniname2ctype_offset(str6), 12},
- {uniname2ctype_offset(str7), 7},
- {uniname2ctype_offset(str8), 15},
- {uniname2ctype_offset(str9), 1},
- {uniname2ctype_offset(str10), 13},
- {uniname2ctype_offset(str11), 11},
- {uniname2ctype_offset(str12), 10},
- {uniname2ctype_offset(str13), 14},
- {uniname2ctype_offset(str14), 3},
- {uniname2ctype_offset(str15), 9},
- {uniname2ctype_offset(str16), 8},
- {uniname2ctype_offset(str17), 6},
- {uniname2ctype_offset(str18), 5},
- {uniname2ctype_offset(str19), 4},
- {uniname2ctype_offset(str20), 2}
-#else /* USE_UNICODE_PROPERTIES */
- {uniname2ctype_offset(str4955), 155},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str4986), 413},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1},
- {uniname2ctype_offset(str5114), 225},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {uniname2ctype_offset(str5608), 155},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1},
- {uniname2ctype_offset(str6098), 602}
-#endif /* USE_UNICODE_PROPERTIES */
- };
-
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
- {
- register unsigned int key = uniname2ctype_hash (str, len);
-
- if (key <= MAX_HASH_VALUE)
- {
- register int o = wordlist[key].name;
- if (o >= 0)
- {
- register const char *s = o + uniname2ctype_pool;
-
- if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
- return &wordlist[key];
- }
- }
- }
- return 0;
-}
-
-static int
-uniname2ctype(const UChar *name, unsigned int len)
-{
- const struct uniname2ctype_struct *p = uniname2ctype_p((const char *)name, len);
- if (p) return p->ctype;
- return -1;
-}
-#if defined ONIG_UNICODE_VERSION_STRING && !( \
- ONIG_UNICODE_VERSION_MAJOR == 12 && \
- ONIG_UNICODE_VERSION_MINOR == 1 && \
- ONIG_UNICODE_VERSION_TEENY == 0 && \
- 1)
-# error ONIG_UNICODE_VERSION_STRING mismatch
-#endif
-#define ONIG_UNICODE_VERSION_STRING "12.1.0"
-#define ONIG_UNICODE_VERSION_MAJOR 12
-#define ONIG_UNICODE_VERSION_MINOR 1
-#define ONIG_UNICODE_VERSION_TEENY 0
-#if defined ONIG_UNICODE_EMOJI_VERSION_STRING && !( \
- ONIG_UNICODE_EMOJI_VERSION_MAJOR == 12 && \
- ONIG_UNICODE_EMOJI_VERSION_MINOR == 0 && \
- 1)
-# error ONIG_UNICODE_EMOJI_VERSION_STRING mismatch
-#endif
-#define ONIG_UNICODE_EMOJI_VERSION_STRING "12.0"
-#define ONIG_UNICODE_EMOJI_VERSION_MAJOR 12
-#define ONIG_UNICODE_EMOJI_VERSION_MINOR 0
diff --git a/enc/unicode/15.0.0/casefold.h b/enc/unicode/15.0.0/casefold.h
new file mode 100644
index 0000000000..51120d867d
--- /dev/null
+++ b/enc/unicode/15.0.0/casefold.h
@@ -0,0 +1,7629 @@
+/* DO NOT EDIT THIS FILE. */
+/* Generated by enc-case-folding.rb */
+
+#if defined ONIG_UNICODE_VERSION_STRING && !( \
+ ONIG_UNICODE_VERSION_MAJOR == 15 && \
+ ONIG_UNICODE_VERSION_MINOR == 0 && \
+ ONIG_UNICODE_VERSION_TEENY == 0 && \
+ 1)
+# error ONIG_UNICODE_VERSION_STRING mismatch
+#endif
+#define ONIG_UNICODE_VERSION_STRING "15.0.0"
+#define ONIG_UNICODE_VERSION_MAJOR 15
+#define ONIG_UNICODE_VERSION_MINOR 0
+#define ONIG_UNICODE_VERSION_TEENY 0
+
+static const CaseFold_11_Type CaseFold_11_Table[] = {
+#define CaseFold (*(CaseFold_11_Type (*)[1528])(CaseFold_11_Table+0))
+ {0x0041, {1|F|D, {0x0061}}},
+ {0x0042, {1|F|D, {0x0062}}},
+ {0x0043, {1|F|D, {0x0063}}},
+ {0x0044, {1|F|D, {0x0064}}},
+ {0x0045, {1|F|D, {0x0065}}},
+ {0x0046, {1|F|D, {0x0066}}},
+ {0x0047, {1|F|D, {0x0067}}},
+ {0x0048, {1|F|D, {0x0068}}},
+ {0x004a, {1|F|D, {0x006a}}},
+ {0x004b, {1|F|D, {0x006b}}},
+ {0x004c, {1|F|D, {0x006c}}},
+ {0x004d, {1|F|D, {0x006d}}},
+ {0x004e, {1|F|D, {0x006e}}},
+ {0x004f, {1|F|D, {0x006f}}},
+ {0x0050, {1|F|D, {0x0070}}},
+ {0x0051, {1|F|D, {0x0071}}},
+ {0x0052, {1|F|D, {0x0072}}},
+ {0x0053, {1|F|D, {0x0073}}},
+ {0x0054, {1|F|D, {0x0074}}},
+ {0x0055, {1|F|D, {0x0075}}},
+ {0x0056, {1|F|D, {0x0076}}},
+ {0x0057, {1|F|D, {0x0077}}},
+ {0x0058, {1|F|D, {0x0078}}},
+ {0x0059, {1|F|D, {0x0079}}},
+ {0x005a, {1|F|D, {0x007a}}},
+ {0x00b5, {1|F|SU|I(0), {0x03bc}}},
+ {0x00c0, {1|F|D, {0x00e0}}},
+ {0x00c1, {1|F|D, {0x00e1}}},
+ {0x00c2, {1|F|D, {0x00e2}}},
+ {0x00c3, {1|F|D, {0x00e3}}},
+ {0x00c4, {1|F|D, {0x00e4}}},
+ {0x00c5, {1|F|D, {0x00e5}}},
+ {0x00c6, {1|F|D, {0x00e6}}},
+ {0x00c7, {1|F|D, {0x00e7}}},
+ {0x00c8, {1|F|D, {0x00e8}}},
+ {0x00c9, {1|F|D, {0x00e9}}},
+ {0x00ca, {1|F|D, {0x00ea}}},
+ {0x00cb, {1|F|D, {0x00eb}}},
+ {0x00cc, {1|F|D, {0x00ec}}},
+ {0x00cd, {1|F|D, {0x00ed}}},
+ {0x00ce, {1|F|D, {0x00ee}}},
+ {0x00cf, {1|F|D, {0x00ef}}},
+ {0x00d0, {1|F|D, {0x00f0}}},
+ {0x00d1, {1|F|D, {0x00f1}}},
+ {0x00d2, {1|F|D, {0x00f2}}},
+ {0x00d3, {1|F|D, {0x00f3}}},
+ {0x00d4, {1|F|D, {0x00f4}}},
+ {0x00d5, {1|F|D, {0x00f5}}},
+ {0x00d6, {1|F|D, {0x00f6}}},
+ {0x00d8, {1|F|D, {0x00f8}}},
+ {0x00d9, {1|F|D, {0x00f9}}},
+ {0x00da, {1|F|D, {0x00fa}}},
+ {0x00db, {1|F|D, {0x00fb}}},
+ {0x00dc, {1|F|D, {0x00fc}}},
+ {0x00dd, {1|F|D, {0x00fd}}},
+ {0x00de, {1|F|D, {0x00fe}}},
+ {0x00df, {2|F|ST|SU|I(1), {0x0073, 0x0073}}},
+ {0x0100, {1|F|D, {0x0101}}},
+ {0x0102, {1|F|D, {0x0103}}},
+ {0x0104, {1|F|D, {0x0105}}},
+ {0x0106, {1|F|D, {0x0107}}},
+ {0x0108, {1|F|D, {0x0109}}},
+ {0x010a, {1|F|D, {0x010b}}},
+ {0x010c, {1|F|D, {0x010d}}},
+ {0x010e, {1|F|D, {0x010f}}},
+ {0x0110, {1|F|D, {0x0111}}},
+ {0x0112, {1|F|D, {0x0113}}},
+ {0x0114, {1|F|D, {0x0115}}},
+ {0x0116, {1|F|D, {0x0117}}},
+ {0x0118, {1|F|D, {0x0119}}},
+ {0x011a, {1|F|D, {0x011b}}},
+ {0x011c, {1|F|D, {0x011d}}},
+ {0x011e, {1|F|D, {0x011f}}},
+ {0x0120, {1|F|D, {0x0121}}},
+ {0x0122, {1|F|D, {0x0123}}},
+ {0x0124, {1|F|D, {0x0125}}},
+ {0x0126, {1|F|D, {0x0127}}},
+ {0x0128, {1|F|D, {0x0129}}},
+ {0x012a, {1|F|D, {0x012b}}},
+ {0x012c, {1|F|D, {0x012d}}},
+ {0x012e, {1|F|D, {0x012f}}},
+ {0x0132, {1|F|D, {0x0133}}},
+ {0x0134, {1|F|D, {0x0135}}},
+ {0x0136, {1|F|D, {0x0137}}},
+ {0x0139, {1|F|D, {0x013a}}},
+ {0x013b, {1|F|D, {0x013c}}},
+ {0x013d, {1|F|D, {0x013e}}},
+ {0x013f, {1|F|D, {0x0140}}},
+ {0x0141, {1|F|D, {0x0142}}},
+ {0x0143, {1|F|D, {0x0144}}},
+ {0x0145, {1|F|D, {0x0146}}},
+ {0x0147, {1|F|D, {0x0148}}},
+ {0x0149, {2|F|SU|I(5), {0x02bc, 0x006e}}},
+ {0x014a, {1|F|D, {0x014b}}},
+ {0x014c, {1|F|D, {0x014d}}},
+ {0x014e, {1|F|D, {0x014f}}},
+ {0x0150, {1|F|D, {0x0151}}},
+ {0x0152, {1|F|D, {0x0153}}},
+ {0x0154, {1|F|D, {0x0155}}},
+ {0x0156, {1|F|D, {0x0157}}},
+ {0x0158, {1|F|D, {0x0159}}},
+ {0x015a, {1|F|D, {0x015b}}},
+ {0x015c, {1|F|D, {0x015d}}},
+ {0x015e, {1|F|D, {0x015f}}},
+ {0x0160, {1|F|D, {0x0161}}},
+ {0x0162, {1|F|D, {0x0163}}},
+ {0x0164, {1|F|D, {0x0165}}},
+ {0x0166, {1|F|D, {0x0167}}},
+ {0x0168, {1|F|D, {0x0169}}},
+ {0x016a, {1|F|D, {0x016b}}},
+ {0x016c, {1|F|D, {0x016d}}},
+ {0x016e, {1|F|D, {0x016f}}},
+ {0x0170, {1|F|D, {0x0171}}},
+ {0x0172, {1|F|D, {0x0173}}},
+ {0x0174, {1|F|D, {0x0175}}},
+ {0x0176, {1|F|D, {0x0177}}},
+ {0x0178, {1|F|D, {0x00ff}}},
+ {0x0179, {1|F|D, {0x017a}}},
+ {0x017b, {1|F|D, {0x017c}}},
+ {0x017d, {1|F|D, {0x017e}}},
+ {0x017f, {1|F|SU|I(7), {0x0073}}},
+ {0x0181, {1|F|D, {0x0253}}},
+ {0x0182, {1|F|D, {0x0183}}},
+ {0x0184, {1|F|D, {0x0185}}},
+ {0x0186, {1|F|D, {0x0254}}},
+ {0x0187, {1|F|D, {0x0188}}},
+ {0x0189, {1|F|D, {0x0256}}},
+ {0x018a, {1|F|D, {0x0257}}},
+ {0x018b, {1|F|D, {0x018c}}},
+ {0x018e, {1|F|D, {0x01dd}}},
+ {0x018f, {1|F|D, {0x0259}}},
+ {0x0190, {1|F|D, {0x025b}}},
+ {0x0191, {1|F|D, {0x0192}}},
+ {0x0193, {1|F|D, {0x0260}}},
+ {0x0194, {1|F|D, {0x0263}}},
+ {0x0196, {1|F|D, {0x0269}}},
+ {0x0197, {1|F|D, {0x0268}}},
+ {0x0198, {1|F|D, {0x0199}}},
+ {0x019c, {1|F|D, {0x026f}}},
+ {0x019d, {1|F|D, {0x0272}}},
+ {0x019f, {1|F|D, {0x0275}}},
+ {0x01a0, {1|F|D, {0x01a1}}},
+ {0x01a2, {1|F|D, {0x01a3}}},
+ {0x01a4, {1|F|D, {0x01a5}}},
+ {0x01a6, {1|F|D, {0x0280}}},
+ {0x01a7, {1|F|D, {0x01a8}}},
+ {0x01a9, {1|F|D, {0x0283}}},
+ {0x01ac, {1|F|D, {0x01ad}}},
+ {0x01ae, {1|F|D, {0x0288}}},
+ {0x01af, {1|F|D, {0x01b0}}},
+ {0x01b1, {1|F|D, {0x028a}}},
+ {0x01b2, {1|F|D, {0x028b}}},
+ {0x01b3, {1|F|D, {0x01b4}}},
+ {0x01b5, {1|F|D, {0x01b6}}},
+ {0x01b7, {1|F|D, {0x0292}}},
+ {0x01b8, {1|F|D, {0x01b9}}},
+ {0x01bc, {1|F|D, {0x01bd}}},
+ {0x01c4, {1|F|D|ST|I(8), {0x01c6}}},
+ {0x01c5, {1|F|D|IT|SU|I(9), {0x01c6}}},
+ {0x01c7, {1|F|D|ST|I(12), {0x01c9}}},
+ {0x01c8, {1|F|D|IT|SU|I(13), {0x01c9}}},
+ {0x01ca, {1|F|D|ST|I(16), {0x01cc}}},
+ {0x01cb, {1|F|D|IT|SU|I(17), {0x01cc}}},
+ {0x01cd, {1|F|D, {0x01ce}}},
+ {0x01cf, {1|F|D, {0x01d0}}},
+ {0x01d1, {1|F|D, {0x01d2}}},
+ {0x01d3, {1|F|D, {0x01d4}}},
+ {0x01d5, {1|F|D, {0x01d6}}},
+ {0x01d7, {1|F|D, {0x01d8}}},
+ {0x01d9, {1|F|D, {0x01da}}},
+ {0x01db, {1|F|D, {0x01dc}}},
+ {0x01de, {1|F|D, {0x01df}}},
+ {0x01e0, {1|F|D, {0x01e1}}},
+ {0x01e2, {1|F|D, {0x01e3}}},
+ {0x01e4, {1|F|D, {0x01e5}}},
+ {0x01e6, {1|F|D, {0x01e7}}},
+ {0x01e8, {1|F|D, {0x01e9}}},
+ {0x01ea, {1|F|D, {0x01eb}}},
+ {0x01ec, {1|F|D, {0x01ed}}},
+ {0x01ee, {1|F|D, {0x01ef}}},
+ {0x01f0, {2|F|SU|I(20), {0x006a, 0x030c}}},
+ {0x01f1, {1|F|D|ST|I(22), {0x01f3}}},
+ {0x01f2, {1|F|D|IT|SU|I(23), {0x01f3}}},
+ {0x01f4, {1|F|D, {0x01f5}}},
+ {0x01f6, {1|F|D, {0x0195}}},
+ {0x01f7, {1|F|D, {0x01bf}}},
+ {0x01f8, {1|F|D, {0x01f9}}},
+ {0x01fa, {1|F|D, {0x01fb}}},
+ {0x01fc, {1|F|D, {0x01fd}}},
+ {0x01fe, {1|F|D, {0x01ff}}},
+ {0x0200, {1|F|D, {0x0201}}},
+ {0x0202, {1|F|D, {0x0203}}},
+ {0x0204, {1|F|D, {0x0205}}},
+ {0x0206, {1|F|D, {0x0207}}},
+ {0x0208, {1|F|D, {0x0209}}},
+ {0x020a, {1|F|D, {0x020b}}},
+ {0x020c, {1|F|D, {0x020d}}},
+ {0x020e, {1|F|D, {0x020f}}},
+ {0x0210, {1|F|D, {0x0211}}},
+ {0x0212, {1|F|D, {0x0213}}},
+ {0x0214, {1|F|D, {0x0215}}},
+ {0x0216, {1|F|D, {0x0217}}},
+ {0x0218, {1|F|D, {0x0219}}},
+ {0x021a, {1|F|D, {0x021b}}},
+ {0x021c, {1|F|D, {0x021d}}},
+ {0x021e, {1|F|D, {0x021f}}},
+ {0x0220, {1|F|D, {0x019e}}},
+ {0x0222, {1|F|D, {0x0223}}},
+ {0x0224, {1|F|D, {0x0225}}},
+ {0x0226, {1|F|D, {0x0227}}},
+ {0x0228, {1|F|D, {0x0229}}},
+ {0x022a, {1|F|D, {0x022b}}},
+ {0x022c, {1|F|D, {0x022d}}},
+ {0x022e, {1|F|D, {0x022f}}},
+ {0x0230, {1|F|D, {0x0231}}},
+ {0x0232, {1|F|D, {0x0233}}},
+ {0x023a, {1|F|D, {0x2c65}}},
+ {0x023b, {1|F|D, {0x023c}}},
+ {0x023d, {1|F|D, {0x019a}}},
+ {0x023e, {1|F|D, {0x2c66}}},
+ {0x0241, {1|F|D, {0x0242}}},
+ {0x0243, {1|F|D, {0x0180}}},
+ {0x0244, {1|F|D, {0x0289}}},
+ {0x0245, {1|F|D, {0x028c}}},
+ {0x0246, {1|F|D, {0x0247}}},
+ {0x0248, {1|F|D, {0x0249}}},
+ {0x024a, {1|F|D, {0x024b}}},
+ {0x024c, {1|F|D, {0x024d}}},
+ {0x024e, {1|F|D, {0x024f}}},
+ {0x0345, {1|F|SU|I(26), {0x03b9}}},
+ {0x0370, {1|F|D, {0x0371}}},
+ {0x0372, {1|F|D, {0x0373}}},
+ {0x0376, {1|F|D, {0x0377}}},
+ {0x037f, {1|F|D, {0x03f3}}},
+ {0x0386, {1|F|D, {0x03ac}}},
+ {0x0388, {1|F|D, {0x03ad}}},
+ {0x0389, {1|F|D, {0x03ae}}},
+ {0x038a, {1|F|D, {0x03af}}},
+ {0x038c, {1|F|D, {0x03cc}}},
+ {0x038e, {1|F|D, {0x03cd}}},
+ {0x038f, {1|F|D, {0x03ce}}},
+ {0x0390, {3|F|SU|I(27), {0x03b9, 0x0308, 0x0301}}},
+ {0x0391, {1|F|D, {0x03b1}}},
+ {0x0392, {1|F|D, {0x03b2}}},
+ {0x0393, {1|F|D, {0x03b3}}},
+ {0x0394, {1|F|D, {0x03b4}}},
+ {0x0395, {1|F|D, {0x03b5}}},
+ {0x0396, {1|F|D, {0x03b6}}},
+ {0x0397, {1|F|D, {0x03b7}}},
+ {0x0398, {1|F|D, {0x03b8}}},
+ {0x0399, {1|F|D, {0x03b9}}},
+ {0x039a, {1|F|D, {0x03ba}}},
+ {0x039b, {1|F|D, {0x03bb}}},
+ {0x039c, {1|F|D, {0x03bc}}},
+ {0x039d, {1|F|D, {0x03bd}}},
+ {0x039e, {1|F|D, {0x03be}}},
+ {0x039f, {1|F|D, {0x03bf}}},
+ {0x03a0, {1|F|D, {0x03c0}}},
+ {0x03a1, {1|F|D, {0x03c1}}},
+ {0x03a3, {1|F|D, {0x03c3}}},
+ {0x03a4, {1|F|D, {0x03c4}}},
+ {0x03a5, {1|F|D, {0x03c5}}},
+ {0x03a6, {1|F|D, {0x03c6}}},
+ {0x03a7, {1|F|D, {0x03c7}}},
+ {0x03a8, {1|F|D, {0x03c8}}},
+ {0x03a9, {1|F|D, {0x03c9}}},
+ {0x03aa, {1|F|D, {0x03ca}}},
+ {0x03ab, {1|F|D, {0x03cb}}},
+ {0x03b0, {3|F|SU|I(30), {0x03c5, 0x0308, 0x0301}}},
+ {0x03c2, {1|F|SU|I(33), {0x03c3}}},
+ {0x03cf, {1|F|D, {0x03d7}}},
+ {0x03d0, {1|F|SU|I(34), {0x03b2}}},
+ {0x03d1, {1|F|SU|I(35), {0x03b8}}},
+ {0x03d5, {1|F|SU|I(36), {0x03c6}}},
+ {0x03d6, {1|F|SU|I(37), {0x03c0}}},
+ {0x03d8, {1|F|D, {0x03d9}}},
+ {0x03da, {1|F|D, {0x03db}}},
+ {0x03dc, {1|F|D, {0x03dd}}},
+ {0x03de, {1|F|D, {0x03df}}},
+ {0x03e0, {1|F|D, {0x03e1}}},
+ {0x03e2, {1|F|D, {0x03e3}}},
+ {0x03e4, {1|F|D, {0x03e5}}},
+ {0x03e6, {1|F|D, {0x03e7}}},
+ {0x03e8, {1|F|D, {0x03e9}}},
+ {0x03ea, {1|F|D, {0x03eb}}},
+ {0x03ec, {1|F|D, {0x03ed}}},
+ {0x03ee, {1|F|D, {0x03ef}}},
+ {0x03f0, {1|F|SU|I(38), {0x03ba}}},
+ {0x03f1, {1|F|SU|I(39), {0x03c1}}},
+ {0x03f4, {1|F|D, {0x03b8}}},
+ {0x03f5, {1|F|SU|I(40), {0x03b5}}},
+ {0x03f7, {1|F|D, {0x03f8}}},
+ {0x03f9, {1|F|D, {0x03f2}}},
+ {0x03fa, {1|F|D, {0x03fb}}},
+ {0x03fd, {1|F|D, {0x037b}}},
+ {0x03fe, {1|F|D, {0x037c}}},
+ {0x03ff, {1|F|D, {0x037d}}},
+ {0x0400, {1|F|D, {0x0450}}},
+ {0x0401, {1|F|D, {0x0451}}},
+ {0x0402, {1|F|D, {0x0452}}},
+ {0x0403, {1|F|D, {0x0453}}},
+ {0x0404, {1|F|D, {0x0454}}},
+ {0x0405, {1|F|D, {0x0455}}},
+ {0x0406, {1|F|D, {0x0456}}},
+ {0x0407, {1|F|D, {0x0457}}},
+ {0x0408, {1|F|D, {0x0458}}},
+ {0x0409, {1|F|D, {0x0459}}},
+ {0x040a, {1|F|D, {0x045a}}},
+ {0x040b, {1|F|D, {0x045b}}},
+ {0x040c, {1|F|D, {0x045c}}},
+ {0x040d, {1|F|D, {0x045d}}},
+ {0x040e, {1|F|D, {0x045e}}},
+ {0x040f, {1|F|D, {0x045f}}},
+ {0x0410, {1|F|D, {0x0430}}},
+ {0x0411, {1|F|D, {0x0431}}},
+ {0x0412, {1|F|D, {0x0432}}},
+ {0x0413, {1|F|D, {0x0433}}},
+ {0x0414, {1|F|D, {0x0434}}},
+ {0x0415, {1|F|D, {0x0435}}},
+ {0x0416, {1|F|D, {0x0436}}},
+ {0x0417, {1|F|D, {0x0437}}},
+ {0x0418, {1|F|D, {0x0438}}},
+ {0x0419, {1|F|D, {0x0439}}},
+ {0x041a, {1|F|D, {0x043a}}},
+ {0x041b, {1|F|D, {0x043b}}},
+ {0x041c, {1|F|D, {0x043c}}},
+ {0x041d, {1|F|D, {0x043d}}},
+ {0x041e, {1|F|D, {0x043e}}},
+ {0x041f, {1|F|D, {0x043f}}},
+ {0x0420, {1|F|D, {0x0440}}},
+ {0x0421, {1|F|D, {0x0441}}},
+ {0x0422, {1|F|D, {0x0442}}},
+ {0x0423, {1|F|D, {0x0443}}},
+ {0x0424, {1|F|D, {0x0444}}},
+ {0x0425, {1|F|D, {0x0445}}},
+ {0x0426, {1|F|D, {0x0446}}},
+ {0x0427, {1|F|D, {0x0447}}},
+ {0x0428, {1|F|D, {0x0448}}},
+ {0x0429, {1|F|D, {0x0449}}},
+ {0x042a, {1|F|D, {0x044a}}},
+ {0x042b, {1|F|D, {0x044b}}},
+ {0x042c, {1|F|D, {0x044c}}},
+ {0x042d, {1|F|D, {0x044d}}},
+ {0x042e, {1|F|D, {0x044e}}},
+ {0x042f, {1|F|D, {0x044f}}},
+ {0x0460, {1|F|D, {0x0461}}},
+ {0x0462, {1|F|D, {0x0463}}},
+ {0x0464, {1|F|D, {0x0465}}},
+ {0x0466, {1|F|D, {0x0467}}},
+ {0x0468, {1|F|D, {0x0469}}},
+ {0x046a, {1|F|D, {0x046b}}},
+ {0x046c, {1|F|D, {0x046d}}},
+ {0x046e, {1|F|D, {0x046f}}},
+ {0x0470, {1|F|D, {0x0471}}},
+ {0x0472, {1|F|D, {0x0473}}},
+ {0x0474, {1|F|D, {0x0475}}},
+ {0x0476, {1|F|D, {0x0477}}},
+ {0x0478, {1|F|D, {0x0479}}},
+ {0x047a, {1|F|D, {0x047b}}},
+ {0x047c, {1|F|D, {0x047d}}},
+ {0x047e, {1|F|D, {0x047f}}},
+ {0x0480, {1|F|D, {0x0481}}},
+ {0x048a, {1|F|D, {0x048b}}},
+ {0x048c, {1|F|D, {0x048d}}},
+ {0x048e, {1|F|D, {0x048f}}},
+ {0x0490, {1|F|D, {0x0491}}},
+ {0x0492, {1|F|D, {0x0493}}},
+ {0x0494, {1|F|D, {0x0495}}},
+ {0x0496, {1|F|D, {0x0497}}},
+ {0x0498, {1|F|D, {0x0499}}},
+ {0x049a, {1|F|D, {0x049b}}},
+ {0x049c, {1|F|D, {0x049d}}},
+ {0x049e, {1|F|D, {0x049f}}},
+ {0x04a0, {1|F|D, {0x04a1}}},
+ {0x04a2, {1|F|D, {0x04a3}}},
+ {0x04a4, {1|F|D, {0x04a5}}},
+ {0x04a6, {1|F|D, {0x04a7}}},
+ {0x04a8, {1|F|D, {0x04a9}}},
+ {0x04aa, {1|F|D, {0x04ab}}},
+ {0x04ac, {1|F|D, {0x04ad}}},
+ {0x04ae, {1|F|D, {0x04af}}},
+ {0x04b0, {1|F|D, {0x04b1}}},
+ {0x04b2, {1|F|D, {0x04b3}}},
+ {0x04b4, {1|F|D, {0x04b5}}},
+ {0x04b6, {1|F|D, {0x04b7}}},
+ {0x04b8, {1|F|D, {0x04b9}}},
+ {0x04ba, {1|F|D, {0x04bb}}},
+ {0x04bc, {1|F|D, {0x04bd}}},
+ {0x04be, {1|F|D, {0x04bf}}},
+ {0x04c0, {1|F|D, {0x04cf}}},
+ {0x04c1, {1|F|D, {0x04c2}}},
+ {0x04c3, {1|F|D, {0x04c4}}},
+ {0x04c5, {1|F|D, {0x04c6}}},
+ {0x04c7, {1|F|D, {0x04c8}}},
+ {0x04c9, {1|F|D, {0x04ca}}},
+ {0x04cb, {1|F|D, {0x04cc}}},
+ {0x04cd, {1|F|D, {0x04ce}}},
+ {0x04d0, {1|F|D, {0x04d1}}},
+ {0x04d2, {1|F|D, {0x04d3}}},
+ {0x04d4, {1|F|D, {0x04d5}}},
+ {0x04d6, {1|F|D, {0x04d7}}},
+ {0x04d8, {1|F|D, {0x04d9}}},
+ {0x04da, {1|F|D, {0x04db}}},
+ {0x04dc, {1|F|D, {0x04dd}}},
+ {0x04de, {1|F|D, {0x04df}}},
+ {0x04e0, {1|F|D, {0x04e1}}},
+ {0x04e2, {1|F|D, {0x04e3}}},
+ {0x04e4, {1|F|D, {0x04e5}}},
+ {0x04e6, {1|F|D, {0x04e7}}},
+ {0x04e8, {1|F|D, {0x04e9}}},
+ {0x04ea, {1|F|D, {0x04eb}}},
+ {0x04ec, {1|F|D, {0x04ed}}},
+ {0x04ee, {1|F|D, {0x04ef}}},
+ {0x04f0, {1|F|D, {0x04f1}}},
+ {0x04f2, {1|F|D, {0x04f3}}},
+ {0x04f4, {1|F|D, {0x04f5}}},
+ {0x04f6, {1|F|D, {0x04f7}}},
+ {0x04f8, {1|F|D, {0x04f9}}},
+ {0x04fa, {1|F|D, {0x04fb}}},
+ {0x04fc, {1|F|D, {0x04fd}}},
+ {0x04fe, {1|F|D, {0x04ff}}},
+ {0x0500, {1|F|D, {0x0501}}},
+ {0x0502, {1|F|D, {0x0503}}},
+ {0x0504, {1|F|D, {0x0505}}},
+ {0x0506, {1|F|D, {0x0507}}},
+ {0x0508, {1|F|D, {0x0509}}},
+ {0x050a, {1|F|D, {0x050b}}},
+ {0x050c, {1|F|D, {0x050d}}},
+ {0x050e, {1|F|D, {0x050f}}},
+ {0x0510, {1|F|D, {0x0511}}},
+ {0x0512, {1|F|D, {0x0513}}},
+ {0x0514, {1|F|D, {0x0515}}},
+ {0x0516, {1|F|D, {0x0517}}},
+ {0x0518, {1|F|D, {0x0519}}},
+ {0x051a, {1|F|D, {0x051b}}},
+ {0x051c, {1|F|D, {0x051d}}},
+ {0x051e, {1|F|D, {0x051f}}},
+ {0x0520, {1|F|D, {0x0521}}},
+ {0x0522, {1|F|D, {0x0523}}},
+ {0x0524, {1|F|D, {0x0525}}},
+ {0x0526, {1|F|D, {0x0527}}},
+ {0x0528, {1|F|D, {0x0529}}},
+ {0x052a, {1|F|D, {0x052b}}},
+ {0x052c, {1|F|D, {0x052d}}},
+ {0x052e, {1|F|D, {0x052f}}},
+ {0x0531, {1|F|D, {0x0561}}},
+ {0x0532, {1|F|D, {0x0562}}},
+ {0x0533, {1|F|D, {0x0563}}},
+ {0x0534, {1|F|D, {0x0564}}},
+ {0x0535, {1|F|D, {0x0565}}},
+ {0x0536, {1|F|D, {0x0566}}},
+ {0x0537, {1|F|D, {0x0567}}},
+ {0x0538, {1|F|D, {0x0568}}},
+ {0x0539, {1|F|D, {0x0569}}},
+ {0x053a, {1|F|D, {0x056a}}},
+ {0x053b, {1|F|D, {0x056b}}},
+ {0x053c, {1|F|D, {0x056c}}},
+ {0x053d, {1|F|D, {0x056d}}},
+ {0x053e, {1|F|D, {0x056e}}},
+ {0x053f, {1|F|D, {0x056f}}},
+ {0x0540, {1|F|D, {0x0570}}},
+ {0x0541, {1|F|D, {0x0571}}},
+ {0x0542, {1|F|D, {0x0572}}},
+ {0x0543, {1|F|D, {0x0573}}},
+ {0x0544, {1|F|D, {0x0574}}},
+ {0x0545, {1|F|D, {0x0575}}},
+ {0x0546, {1|F|D, {0x0576}}},
+ {0x0547, {1|F|D, {0x0577}}},
+ {0x0548, {1|F|D, {0x0578}}},
+ {0x0549, {1|F|D, {0x0579}}},
+ {0x054a, {1|F|D, {0x057a}}},
+ {0x054b, {1|F|D, {0x057b}}},
+ {0x054c, {1|F|D, {0x057c}}},
+ {0x054d, {1|F|D, {0x057d}}},
+ {0x054e, {1|F|D, {0x057e}}},
+ {0x054f, {1|F|D, {0x057f}}},
+ {0x0550, {1|F|D, {0x0580}}},
+ {0x0551, {1|F|D, {0x0581}}},
+ {0x0552, {1|F|D, {0x0582}}},
+ {0x0553, {1|F|D, {0x0583}}},
+ {0x0554, {1|F|D, {0x0584}}},
+ {0x0555, {1|F|D, {0x0585}}},
+ {0x0556, {1|F|D, {0x0586}}},
+ {0x0587, {2|F|ST|SU|I(41), {0x0565, 0x0582}}},
+ {0x10a0, {1|F|D, {0x2d00}}},
+ {0x10a1, {1|F|D, {0x2d01}}},
+ {0x10a2, {1|F|D, {0x2d02}}},
+ {0x10a3, {1|F|D, {0x2d03}}},
+ {0x10a4, {1|F|D, {0x2d04}}},
+ {0x10a5, {1|F|D, {0x2d05}}},
+ {0x10a6, {1|F|D, {0x2d06}}},
+ {0x10a7, {1|F|D, {0x2d07}}},
+ {0x10a8, {1|F|D, {0x2d08}}},
+ {0x10a9, {1|F|D, {0x2d09}}},
+ {0x10aa, {1|F|D, {0x2d0a}}},
+ {0x10ab, {1|F|D, {0x2d0b}}},
+ {0x10ac, {1|F|D, {0x2d0c}}},
+ {0x10ad, {1|F|D, {0x2d0d}}},
+ {0x10ae, {1|F|D, {0x2d0e}}},
+ {0x10af, {1|F|D, {0x2d0f}}},
+ {0x10b0, {1|F|D, {0x2d10}}},
+ {0x10b1, {1|F|D, {0x2d11}}},
+ {0x10b2, {1|F|D, {0x2d12}}},
+ {0x10b3, {1|F|D, {0x2d13}}},
+ {0x10b4, {1|F|D, {0x2d14}}},
+ {0x10b5, {1|F|D, {0x2d15}}},
+ {0x10b6, {1|F|D, {0x2d16}}},
+ {0x10b7, {1|F|D, {0x2d17}}},
+ {0x10b8, {1|F|D, {0x2d18}}},
+ {0x10b9, {1|F|D, {0x2d19}}},
+ {0x10ba, {1|F|D, {0x2d1a}}},
+ {0x10bb, {1|F|D, {0x2d1b}}},
+ {0x10bc, {1|F|D, {0x2d1c}}},
+ {0x10bd, {1|F|D, {0x2d1d}}},
+ {0x10be, {1|F|D, {0x2d1e}}},
+ {0x10bf, {1|F|D, {0x2d1f}}},
+ {0x10c0, {1|F|D, {0x2d20}}},
+ {0x10c1, {1|F|D, {0x2d21}}},
+ {0x10c2, {1|F|D, {0x2d22}}},
+ {0x10c3, {1|F|D, {0x2d23}}},
+ {0x10c4, {1|F|D, {0x2d24}}},
+ {0x10c5, {1|F|D, {0x2d25}}},
+ {0x10c7, {1|F|D, {0x2d27}}},
+ {0x10cd, {1|F|D, {0x2d2d}}},
+ {0x13f8, {1|F|U, {0x13f0}}},
+ {0x13f9, {1|F|U, {0x13f1}}},
+ {0x13fa, {1|F|U, {0x13f2}}},
+ {0x13fb, {1|F|U, {0x13f3}}},
+ {0x13fc, {1|F|U, {0x13f4}}},
+ {0x13fd, {1|F|U, {0x13f5}}},
+ {0x1c80, {1|F|SU|I(45), {0x0432}}},
+ {0x1c81, {1|F|SU|I(46), {0x0434}}},
+ {0x1c82, {1|F|SU|I(47), {0x043e}}},
+ {0x1c83, {1|F|SU|I(48), {0x0441}}},
+ {0x1c84, {1|F|SU|I(49), {0x0442}}},
+ {0x1c85, {1|F|SU|I(50), {0x0442}}},
+ {0x1c86, {1|F|SU|I(51), {0x044a}}},
+ {0x1c87, {1|F|SU|I(52), {0x0463}}},
+ {0x1c88, {1|F|SU|I(53), {0xa64b}}},
+ {0x1c90, {1|F|D, {0x10d0}}},
+ {0x1c91, {1|F|D, {0x10d1}}},
+ {0x1c92, {1|F|D, {0x10d2}}},
+ {0x1c93, {1|F|D, {0x10d3}}},
+ {0x1c94, {1|F|D, {0x10d4}}},
+ {0x1c95, {1|F|D, {0x10d5}}},
+ {0x1c96, {1|F|D, {0x10d6}}},
+ {0x1c97, {1|F|D, {0x10d7}}},
+ {0x1c98, {1|F|D, {0x10d8}}},
+ {0x1c99, {1|F|D, {0x10d9}}},
+ {0x1c9a, {1|F|D, {0x10da}}},
+ {0x1c9b, {1|F|D, {0x10db}}},
+ {0x1c9c, {1|F|D, {0x10dc}}},
+ {0x1c9d, {1|F|D, {0x10dd}}},
+ {0x1c9e, {1|F|D, {0x10de}}},
+ {0x1c9f, {1|F|D, {0x10df}}},
+ {0x1ca0, {1|F|D, {0x10e0}}},
+ {0x1ca1, {1|F|D, {0x10e1}}},
+ {0x1ca2, {1|F|D, {0x10e2}}},
+ {0x1ca3, {1|F|D, {0x10e3}}},
+ {0x1ca4, {1|F|D, {0x10e4}}},
+ {0x1ca5, {1|F|D, {0x10e5}}},
+ {0x1ca6, {1|F|D, {0x10e6}}},
+ {0x1ca7, {1|F|D, {0x10e7}}},
+ {0x1ca8, {1|F|D, {0x10e8}}},
+ {0x1ca9, {1|F|D, {0x10e9}}},
+ {0x1caa, {1|F|D, {0x10ea}}},
+ {0x1cab, {1|F|D, {0x10eb}}},
+ {0x1cac, {1|F|D, {0x10ec}}},
+ {0x1cad, {1|F|D, {0x10ed}}},
+ {0x1cae, {1|F|D, {0x10ee}}},
+ {0x1caf, {1|F|D, {0x10ef}}},
+ {0x1cb0, {1|F|D, {0x10f0}}},
+ {0x1cb1, {1|F|D, {0x10f1}}},
+ {0x1cb2, {1|F|D, {0x10f2}}},
+ {0x1cb3, {1|F|D, {0x10f3}}},
+ {0x1cb4, {1|F|D, {0x10f4}}},
+ {0x1cb5, {1|F|D, {0x10f5}}},
+ {0x1cb6, {1|F|D, {0x10f6}}},
+ {0x1cb7, {1|F|D, {0x10f7}}},
+ {0x1cb8, {1|F|D, {0x10f8}}},
+ {0x1cb9, {1|F|D, {0x10f9}}},
+ {0x1cba, {1|F|D, {0x10fa}}},
+ {0x1cbd, {1|F|D, {0x10fd}}},
+ {0x1cbe, {1|F|D, {0x10fe}}},
+ {0x1cbf, {1|F|D, {0x10ff}}},
+ {0x1e00, {1|F|D, {0x1e01}}},
+ {0x1e02, {1|F|D, {0x1e03}}},
+ {0x1e04, {1|F|D, {0x1e05}}},
+ {0x1e06, {1|F|D, {0x1e07}}},
+ {0x1e08, {1|F|D, {0x1e09}}},
+ {0x1e0a, {1|F|D, {0x1e0b}}},
+ {0x1e0c, {1|F|D, {0x1e0d}}},
+ {0x1e0e, {1|F|D, {0x1e0f}}},
+ {0x1e10, {1|F|D, {0x1e11}}},
+ {0x1e12, {1|F|D, {0x1e13}}},
+ {0x1e14, {1|F|D, {0x1e15}}},
+ {0x1e16, {1|F|D, {0x1e17}}},
+ {0x1e18, {1|F|D, {0x1e19}}},
+ {0x1e1a, {1|F|D, {0x1e1b}}},
+ {0x1e1c, {1|F|D, {0x1e1d}}},
+ {0x1e1e, {1|F|D, {0x1e1f}}},
+ {0x1e20, {1|F|D, {0x1e21}}},
+ {0x1e22, {1|F|D, {0x1e23}}},
+ {0x1e24, {1|F|D, {0x1e25}}},
+ {0x1e26, {1|F|D, {0x1e27}}},
+ {0x1e28, {1|F|D, {0x1e29}}},
+ {0x1e2a, {1|F|D, {0x1e2b}}},
+ {0x1e2c, {1|F|D, {0x1e2d}}},
+ {0x1e2e, {1|F|D, {0x1e2f}}},
+ {0x1e30, {1|F|D, {0x1e31}}},
+ {0x1e32, {1|F|D, {0x1e33}}},
+ {0x1e34, {1|F|D, {0x1e35}}},
+ {0x1e36, {1|F|D, {0x1e37}}},
+ {0x1e38, {1|F|D, {0x1e39}}},
+ {0x1e3a, {1|F|D, {0x1e3b}}},
+ {0x1e3c, {1|F|D, {0x1e3d}}},
+ {0x1e3e, {1|F|D, {0x1e3f}}},
+ {0x1e40, {1|F|D, {0x1e41}}},
+ {0x1e42, {1|F|D, {0x1e43}}},
+ {0x1e44, {1|F|D, {0x1e45}}},
+ {0x1e46, {1|F|D, {0x1e47}}},
+ {0x1e48, {1|F|D, {0x1e49}}},
+ {0x1e4a, {1|F|D, {0x1e4b}}},
+ {0x1e4c, {1|F|D, {0x1e4d}}},
+ {0x1e4e, {1|F|D, {0x1e4f}}},
+ {0x1e50, {1|F|D, {0x1e51}}},
+ {0x1e52, {1|F|D, {0x1e53}}},
+ {0x1e54, {1|F|D, {0x1e55}}},
+ {0x1e56, {1|F|D, {0x1e57}}},
+ {0x1e58, {1|F|D, {0x1e59}}},
+ {0x1e5a, {1|F|D, {0x1e5b}}},
+ {0x1e5c, {1|F|D, {0x1e5d}}},
+ {0x1e5e, {1|F|D, {0x1e5f}}},
+ {0x1e60, {1|F|D, {0x1e61}}},
+ {0x1e62, {1|F|D, {0x1e63}}},
+ {0x1e64, {1|F|D, {0x1e65}}},
+ {0x1e66, {1|F|D, {0x1e67}}},
+ {0x1e68, {1|F|D, {0x1e69}}},
+ {0x1e6a, {1|F|D, {0x1e6b}}},
+ {0x1e6c, {1|F|D, {0x1e6d}}},
+ {0x1e6e, {1|F|D, {0x1e6f}}},
+ {0x1e70, {1|F|D, {0x1e71}}},
+ {0x1e72, {1|F|D, {0x1e73}}},
+ {0x1e74, {1|F|D, {0x1e75}}},
+ {0x1e76, {1|F|D, {0x1e77}}},
+ {0x1e78, {1|F|D, {0x1e79}}},
+ {0x1e7a, {1|F|D, {0x1e7b}}},
+ {0x1e7c, {1|F|D, {0x1e7d}}},
+ {0x1e7e, {1|F|D, {0x1e7f}}},
+ {0x1e80, {1|F|D, {0x1e81}}},
+ {0x1e82, {1|F|D, {0x1e83}}},
+ {0x1e84, {1|F|D, {0x1e85}}},
+ {0x1e86, {1|F|D, {0x1e87}}},
+ {0x1e88, {1|F|D, {0x1e89}}},
+ {0x1e8a, {1|F|D, {0x1e8b}}},
+ {0x1e8c, {1|F|D, {0x1e8d}}},
+ {0x1e8e, {1|F|D, {0x1e8f}}},
+ {0x1e90, {1|F|D, {0x1e91}}},
+ {0x1e92, {1|F|D, {0x1e93}}},
+ {0x1e94, {1|F|D, {0x1e95}}},
+ {0x1e96, {2|F|SU|I(54), {0x0068, 0x0331}}},
+ {0x1e97, {2|F|SU|I(56), {0x0074, 0x0308}}},
+ {0x1e98, {2|F|SU|I(58), {0x0077, 0x030a}}},
+ {0x1e99, {2|F|SU|I(60), {0x0079, 0x030a}}},
+ {0x1e9a, {2|F|SU|I(62), {0x0061, 0x02be}}},
+ {0x1e9b, {1|F|SU|I(64), {0x1e61}}},
+ {0x1e9e, {2|F|SL|I(65), {0x0073, 0x0073}}},
+ {0x1ea0, {1|F|D, {0x1ea1}}},
+ {0x1ea2, {1|F|D, {0x1ea3}}},
+ {0x1ea4, {1|F|D, {0x1ea5}}},
+ {0x1ea6, {1|F|D, {0x1ea7}}},
+ {0x1ea8, {1|F|D, {0x1ea9}}},
+ {0x1eaa, {1|F|D, {0x1eab}}},
+ {0x1eac, {1|F|D, {0x1ead}}},
+ {0x1eae, {1|F|D, {0x1eaf}}},
+ {0x1eb0, {1|F|D, {0x1eb1}}},
+ {0x1eb2, {1|F|D, {0x1eb3}}},
+ {0x1eb4, {1|F|D, {0x1eb5}}},
+ {0x1eb6, {1|F|D, {0x1eb7}}},
+ {0x1eb8, {1|F|D, {0x1eb9}}},
+ {0x1eba, {1|F|D, {0x1ebb}}},
+ {0x1ebc, {1|F|D, {0x1ebd}}},
+ {0x1ebe, {1|F|D, {0x1ebf}}},
+ {0x1ec0, {1|F|D, {0x1ec1}}},
+ {0x1ec2, {1|F|D, {0x1ec3}}},
+ {0x1ec4, {1|F|D, {0x1ec5}}},
+ {0x1ec6, {1|F|D, {0x1ec7}}},
+ {0x1ec8, {1|F|D, {0x1ec9}}},
+ {0x1eca, {1|F|D, {0x1ecb}}},
+ {0x1ecc, {1|F|D, {0x1ecd}}},
+ {0x1ece, {1|F|D, {0x1ecf}}},
+ {0x1ed0, {1|F|D, {0x1ed1}}},
+ {0x1ed2, {1|F|D, {0x1ed3}}},
+ {0x1ed4, {1|F|D, {0x1ed5}}},
+ {0x1ed6, {1|F|D, {0x1ed7}}},
+ {0x1ed8, {1|F|D, {0x1ed9}}},
+ {0x1eda, {1|F|D, {0x1edb}}},
+ {0x1edc, {1|F|D, {0x1edd}}},
+ {0x1ede, {1|F|D, {0x1edf}}},
+ {0x1ee0, {1|F|D, {0x1ee1}}},
+ {0x1ee2, {1|F|D, {0x1ee3}}},
+ {0x1ee4, {1|F|D, {0x1ee5}}},
+ {0x1ee6, {1|F|D, {0x1ee7}}},
+ {0x1ee8, {1|F|D, {0x1ee9}}},
+ {0x1eea, {1|F|D, {0x1eeb}}},
+ {0x1eec, {1|F|D, {0x1eed}}},
+ {0x1eee, {1|F|D, {0x1eef}}},
+ {0x1ef0, {1|F|D, {0x1ef1}}},
+ {0x1ef2, {1|F|D, {0x1ef3}}},
+ {0x1ef4, {1|F|D, {0x1ef5}}},
+ {0x1ef6, {1|F|D, {0x1ef7}}},
+ {0x1ef8, {1|F|D, {0x1ef9}}},
+ {0x1efa, {1|F|D, {0x1efb}}},
+ {0x1efc, {1|F|D, {0x1efd}}},
+ {0x1efe, {1|F|D, {0x1eff}}},
+ {0x1f08, {1|F|D, {0x1f00}}},
+ {0x1f09, {1|F|D, {0x1f01}}},
+ {0x1f0a, {1|F|D, {0x1f02}}},
+ {0x1f0b, {1|F|D, {0x1f03}}},
+ {0x1f0c, {1|F|D, {0x1f04}}},
+ {0x1f0d, {1|F|D, {0x1f05}}},
+ {0x1f0e, {1|F|D, {0x1f06}}},
+ {0x1f0f, {1|F|D, {0x1f07}}},
+ {0x1f18, {1|F|D, {0x1f10}}},
+ {0x1f19, {1|F|D, {0x1f11}}},
+ {0x1f1a, {1|F|D, {0x1f12}}},
+ {0x1f1b, {1|F|D, {0x1f13}}},
+ {0x1f1c, {1|F|D, {0x1f14}}},
+ {0x1f1d, {1|F|D, {0x1f15}}},
+ {0x1f28, {1|F|D, {0x1f20}}},
+ {0x1f29, {1|F|D, {0x1f21}}},
+ {0x1f2a, {1|F|D, {0x1f22}}},
+ {0x1f2b, {1|F|D, {0x1f23}}},
+ {0x1f2c, {1|F|D, {0x1f24}}},
+ {0x1f2d, {1|F|D, {0x1f25}}},
+ {0x1f2e, {1|F|D, {0x1f26}}},
+ {0x1f2f, {1|F|D, {0x1f27}}},
+ {0x1f38, {1|F|D, {0x1f30}}},
+ {0x1f39, {1|F|D, {0x1f31}}},
+ {0x1f3a, {1|F|D, {0x1f32}}},
+ {0x1f3b, {1|F|D, {0x1f33}}},
+ {0x1f3c, {1|F|D, {0x1f34}}},
+ {0x1f3d, {1|F|D, {0x1f35}}},
+ {0x1f3e, {1|F|D, {0x1f36}}},
+ {0x1f3f, {1|F|D, {0x1f37}}},
+ {0x1f48, {1|F|D, {0x1f40}}},
+ {0x1f49, {1|F|D, {0x1f41}}},
+ {0x1f4a, {1|F|D, {0x1f42}}},
+ {0x1f4b, {1|F|D, {0x1f43}}},
+ {0x1f4c, {1|F|D, {0x1f44}}},
+ {0x1f4d, {1|F|D, {0x1f45}}},
+ {0x1f50, {2|F|SU|I(66), {0x03c5, 0x0313}}},
+ {0x1f52, {3|F|SU|I(68), {0x03c5, 0x0313, 0x0300}}},
+ {0x1f54, {3|F|SU|I(71), {0x03c5, 0x0313, 0x0301}}},
+ {0x1f56, {3|F|SU|I(74), {0x03c5, 0x0313, 0x0342}}},
+ {0x1f59, {1|F|D, {0x1f51}}},
+ {0x1f5b, {1|F|D, {0x1f53}}},
+ {0x1f5d, {1|F|D, {0x1f55}}},
+ {0x1f5f, {1|F|D, {0x1f57}}},
+ {0x1f68, {1|F|D, {0x1f60}}},
+ {0x1f69, {1|F|D, {0x1f61}}},
+ {0x1f6a, {1|F|D, {0x1f62}}},
+ {0x1f6b, {1|F|D, {0x1f63}}},
+ {0x1f6c, {1|F|D, {0x1f64}}},
+ {0x1f6d, {1|F|D, {0x1f65}}},
+ {0x1f6e, {1|F|D, {0x1f66}}},
+ {0x1f6f, {1|F|D, {0x1f67}}},
+ {0x1f80, {2|F|ST|SU|I(77), {0x1f00, 0x03b9}}},
+ {0x1f81, {2|F|ST|SU|I(80), {0x1f01, 0x03b9}}},
+ {0x1f82, {2|F|ST|SU|I(83), {0x1f02, 0x03b9}}},
+ {0x1f83, {2|F|ST|SU|I(86), {0x1f03, 0x03b9}}},
+ {0x1f84, {2|F|ST|SU|I(89), {0x1f04, 0x03b9}}},
+ {0x1f85, {2|F|ST|SU|I(92), {0x1f05, 0x03b9}}},
+ {0x1f86, {2|F|ST|SU|I(95), {0x1f06, 0x03b9}}},
+ {0x1f87, {2|F|ST|SU|I(98), {0x1f07, 0x03b9}}},
+ {0x1f88, {2|F|IT|SL|SU|I(101), {0x1f00, 0x03b9}}},
+ {0x1f89, {2|F|IT|SL|SU|I(106), {0x1f01, 0x03b9}}},
+ {0x1f8a, {2|F|IT|SL|SU|I(111), {0x1f02, 0x03b9}}},
+ {0x1f8b, {2|F|IT|SL|SU|I(116), {0x1f03, 0x03b9}}},
+ {0x1f8c, {2|F|IT|SL|SU|I(121), {0x1f04, 0x03b9}}},
+ {0x1f8d, {2|F|IT|SL|SU|I(126), {0x1f05, 0x03b9}}},
+ {0x1f8e, {2|F|IT|SL|SU|I(131), {0x1f06, 0x03b9}}},
+ {0x1f8f, {2|F|IT|SL|SU|I(136), {0x1f07, 0x03b9}}},
+ {0x1f90, {2|F|ST|SU|I(141), {0x1f20, 0x03b9}}},
+ {0x1f91, {2|F|ST|SU|I(144), {0x1f21, 0x03b9}}},
+ {0x1f92, {2|F|ST|SU|I(147), {0x1f22, 0x03b9}}},
+ {0x1f93, {2|F|ST|SU|I(150), {0x1f23, 0x03b9}}},
+ {0x1f94, {2|F|ST|SU|I(153), {0x1f24, 0x03b9}}},
+ {0x1f95, {2|F|ST|SU|I(156), {0x1f25, 0x03b9}}},
+ {0x1f96, {2|F|ST|SU|I(159), {0x1f26, 0x03b9}}},
+ {0x1f97, {2|F|ST|SU|I(162), {0x1f27, 0x03b9}}},
+ {0x1f98, {2|F|IT|SL|SU|I(165), {0x1f20, 0x03b9}}},
+ {0x1f99, {2|F|IT|SL|SU|I(170), {0x1f21, 0x03b9}}},
+ {0x1f9a, {2|F|IT|SL|SU|I(175), {0x1f22, 0x03b9}}},
+ {0x1f9b, {2|F|IT|SL|SU|I(180), {0x1f23, 0x03b9}}},
+ {0x1f9c, {2|F|IT|SL|SU|I(185), {0x1f24, 0x03b9}}},
+ {0x1f9d, {2|F|IT|SL|SU|I(190), {0x1f25, 0x03b9}}},
+ {0x1f9e, {2|F|IT|SL|SU|I(195), {0x1f26, 0x03b9}}},
+ {0x1f9f, {2|F|IT|SL|SU|I(200), {0x1f27, 0x03b9}}},
+ {0x1fa0, {2|F|ST|SU|I(205), {0x1f60, 0x03b9}}},
+ {0x1fa1, {2|F|ST|SU|I(208), {0x1f61, 0x03b9}}},
+ {0x1fa2, {2|F|ST|SU|I(211), {0x1f62, 0x03b9}}},
+ {0x1fa3, {2|F|ST|SU|I(214), {0x1f63, 0x03b9}}},
+ {0x1fa4, {2|F|ST|SU|I(217), {0x1f64, 0x03b9}}},
+ {0x1fa5, {2|F|ST|SU|I(220), {0x1f65, 0x03b9}}},
+ {0x1fa6, {2|F|ST|SU|I(223), {0x1f66, 0x03b9}}},
+ {0x1fa7, {2|F|ST|SU|I(226), {0x1f67, 0x03b9}}},
+ {0x1fa8, {2|F|IT|SL|SU|I(229), {0x1f60, 0x03b9}}},
+ {0x1fa9, {2|F|IT|SL|SU|I(234), {0x1f61, 0x03b9}}},
+ {0x1faa, {2|F|IT|SL|SU|I(239), {0x1f62, 0x03b9}}},
+ {0x1fab, {2|F|IT|SL|SU|I(244), {0x1f63, 0x03b9}}},
+ {0x1fac, {2|F|IT|SL|SU|I(249), {0x1f64, 0x03b9}}},
+ {0x1fad, {2|F|IT|SL|SU|I(254), {0x1f65, 0x03b9}}},
+ {0x1fae, {2|F|IT|SL|SU|I(259), {0x1f66, 0x03b9}}},
+ {0x1faf, {2|F|IT|SL|SU|I(264), {0x1f67, 0x03b9}}},
+ {0x1fb2, {2|F|ST|SU|I(269), {0x1f70, 0x03b9}}},
+ {0x1fb3, {2|F|ST|SU|I(273), {0x03b1, 0x03b9}}},
+ {0x1fb4, {2|F|ST|SU|I(276), {0x03ac, 0x03b9}}},
+ {0x1fb6, {2|F|SU|I(280), {0x03b1, 0x0342}}},
+ {0x1fb7, {3|F|ST|SU|I(282), {0x03b1, 0x0342, 0x03b9}}},
+ {0x1fb8, {1|F|D, {0x1fb0}}},
+ {0x1fb9, {1|F|D, {0x1fb1}}},
+ {0x1fba, {1|F|D, {0x1f70}}},
+ {0x1fbb, {1|F|D, {0x1f71}}},
+ {0x1fbc, {2|F|IT|SL|SU|I(288), {0x03b1, 0x03b9}}},
+ {0x1fbe, {1|F|SU|I(293), {0x03b9}}},
+ {0x1fc2, {2|F|ST|SU|I(294), {0x1f74, 0x03b9}}},
+ {0x1fc3, {2|F|ST|SU|I(298), {0x03b7, 0x03b9}}},
+ {0x1fc4, {2|F|ST|SU|I(301), {0x03ae, 0x03b9}}},
+ {0x1fc6, {2|F|SU|I(305), {0x03b7, 0x0342}}},
+ {0x1fc7, {3|F|ST|SU|I(307), {0x03b7, 0x0342, 0x03b9}}},
+ {0x1fc8, {1|F|D, {0x1f72}}},
+ {0x1fc9, {1|F|D, {0x1f73}}},
+ {0x1fca, {1|F|D, {0x1f74}}},
+ {0x1fcb, {1|F|D, {0x1f75}}},
+ {0x1fcc, {2|F|IT|SL|SU|I(313), {0x03b7, 0x03b9}}},
+ {0x1fd2, {3|F|SU|I(318), {0x03b9, 0x0308, 0x0300}}},
+ {0x1fd3, {3|F|SU|I(321), {0x03b9, 0x0308, 0x0301}}},
+ {0x1fd6, {2|F|SU|I(324), {0x03b9, 0x0342}}},
+ {0x1fd7, {3|F|SU|I(326), {0x03b9, 0x0308, 0x0342}}},
+ {0x1fd8, {1|F|D, {0x1fd0}}},
+ {0x1fd9, {1|F|D, {0x1fd1}}},
+ {0x1fda, {1|F|D, {0x1f76}}},
+ {0x1fdb, {1|F|D, {0x1f77}}},
+ {0x1fe2, {3|F|SU|I(329), {0x03c5, 0x0308, 0x0300}}},
+ {0x1fe3, {3|F|SU|I(332), {0x03c5, 0x0308, 0x0301}}},
+ {0x1fe4, {2|F|SU|I(335), {0x03c1, 0x0313}}},
+ {0x1fe6, {2|F|SU|I(337), {0x03c5, 0x0342}}},
+ {0x1fe7, {3|F|SU|I(339), {0x03c5, 0x0308, 0x0342}}},
+ {0x1fe8, {1|F|D, {0x1fe0}}},
+ {0x1fe9, {1|F|D, {0x1fe1}}},
+ {0x1fea, {1|F|D, {0x1f7a}}},
+ {0x1feb, {1|F|D, {0x1f7b}}},
+ {0x1fec, {1|F|D, {0x1fe5}}},
+ {0x1ff2, {2|F|ST|SU|I(342), {0x1f7c, 0x03b9}}},
+ {0x1ff3, {2|F|ST|SU|I(346), {0x03c9, 0x03b9}}},
+ {0x1ff4, {2|F|ST|SU|I(349), {0x03ce, 0x03b9}}},
+ {0x1ff6, {2|F|SU|I(353), {0x03c9, 0x0342}}},
+ {0x1ff7, {3|F|ST|SU|I(355), {0x03c9, 0x0342, 0x03b9}}},
+ {0x1ff8, {1|F|D, {0x1f78}}},
+ {0x1ff9, {1|F|D, {0x1f79}}},
+ {0x1ffa, {1|F|D, {0x1f7c}}},
+ {0x1ffb, {1|F|D, {0x1f7d}}},
+ {0x1ffc, {2|F|IT|SL|SU|I(361), {0x03c9, 0x03b9}}},
+ {0x2126, {1|F|D, {0x03c9}}},
+ {0x212a, {1|F|D, {0x006b}}},
+ {0x212b, {1|F|D, {0x00e5}}},
+ {0x2132, {1|F|D, {0x214e}}},
+ {0x2160, {1|F|D, {0x2170}}},
+ {0x2161, {1|F|D, {0x2171}}},
+ {0x2162, {1|F|D, {0x2172}}},
+ {0x2163, {1|F|D, {0x2173}}},
+ {0x2164, {1|F|D, {0x2174}}},
+ {0x2165, {1|F|D, {0x2175}}},
+ {0x2166, {1|F|D, {0x2176}}},
+ {0x2167, {1|F|D, {0x2177}}},
+ {0x2168, {1|F|D, {0x2178}}},
+ {0x2169, {1|F|D, {0x2179}}},
+ {0x216a, {1|F|D, {0x217a}}},
+ {0x216b, {1|F|D, {0x217b}}},
+ {0x216c, {1|F|D, {0x217c}}},
+ {0x216d, {1|F|D, {0x217d}}},
+ {0x216e, {1|F|D, {0x217e}}},
+ {0x216f, {1|F|D, {0x217f}}},
+ {0x2183, {1|F|D, {0x2184}}},
+ {0x24b6, {1|F|D, {0x24d0}}},
+ {0x24b7, {1|F|D, {0x24d1}}},
+ {0x24b8, {1|F|D, {0x24d2}}},
+ {0x24b9, {1|F|D, {0x24d3}}},
+ {0x24ba, {1|F|D, {0x24d4}}},
+ {0x24bb, {1|F|D, {0x24d5}}},
+ {0x24bc, {1|F|D, {0x24d6}}},
+ {0x24bd, {1|F|D, {0x24d7}}},
+ {0x24be, {1|F|D, {0x24d8}}},
+ {0x24bf, {1|F|D, {0x24d9}}},
+ {0x24c0, {1|F|D, {0x24da}}},
+ {0x24c1, {1|F|D, {0x24db}}},
+ {0x24c2, {1|F|D, {0x24dc}}},
+ {0x24c3, {1|F|D, {0x24dd}}},
+ {0x24c4, {1|F|D, {0x24de}}},
+ {0x24c5, {1|F|D, {0x24df}}},
+ {0x24c6, {1|F|D, {0x24e0}}},
+ {0x24c7, {1|F|D, {0x24e1}}},
+ {0x24c8, {1|F|D, {0x24e2}}},
+ {0x24c9, {1|F|D, {0x24e3}}},
+ {0x24ca, {1|F|D, {0x24e4}}},
+ {0x24cb, {1|F|D, {0x24e5}}},
+ {0x24cc, {1|F|D, {0x24e6}}},
+ {0x24cd, {1|F|D, {0x24e7}}},
+ {0x24ce, {1|F|D, {0x24e8}}},
+ {0x24cf, {1|F|D, {0x24e9}}},
+ {0x2c00, {1|F|D, {0x2c30}}},
+ {0x2c01, {1|F|D, {0x2c31}}},
+ {0x2c02, {1|F|D, {0x2c32}}},
+ {0x2c03, {1|F|D, {0x2c33}}},
+ {0x2c04, {1|F|D, {0x2c34}}},
+ {0x2c05, {1|F|D, {0x2c35}}},
+ {0x2c06, {1|F|D, {0x2c36}}},
+ {0x2c07, {1|F|D, {0x2c37}}},
+ {0x2c08, {1|F|D, {0x2c38}}},
+ {0x2c09, {1|F|D, {0x2c39}}},
+ {0x2c0a, {1|F|D, {0x2c3a}}},
+ {0x2c0b, {1|F|D, {0x2c3b}}},
+ {0x2c0c, {1|F|D, {0x2c3c}}},
+ {0x2c0d, {1|F|D, {0x2c3d}}},
+ {0x2c0e, {1|F|D, {0x2c3e}}},
+ {0x2c0f, {1|F|D, {0x2c3f}}},
+ {0x2c10, {1|F|D, {0x2c40}}},
+ {0x2c11, {1|F|D, {0x2c41}}},
+ {0x2c12, {1|F|D, {0x2c42}}},
+ {0x2c13, {1|F|D, {0x2c43}}},
+ {0x2c14, {1|F|D, {0x2c44}}},
+ {0x2c15, {1|F|D, {0x2c45}}},
+ {0x2c16, {1|F|D, {0x2c46}}},
+ {0x2c17, {1|F|D, {0x2c47}}},
+ {0x2c18, {1|F|D, {0x2c48}}},
+ {0x2c19, {1|F|D, {0x2c49}}},
+ {0x2c1a, {1|F|D, {0x2c4a}}},
+ {0x2c1b, {1|F|D, {0x2c4b}}},
+ {0x2c1c, {1|F|D, {0x2c4c}}},
+ {0x2c1d, {1|F|D, {0x2c4d}}},
+ {0x2c1e, {1|F|D, {0x2c4e}}},
+ {0x2c1f, {1|F|D, {0x2c4f}}},
+ {0x2c20, {1|F|D, {0x2c50}}},
+ {0x2c21, {1|F|D, {0x2c51}}},
+ {0x2c22, {1|F|D, {0x2c52}}},
+ {0x2c23, {1|F|D, {0x2c53}}},
+ {0x2c24, {1|F|D, {0x2c54}}},
+ {0x2c25, {1|F|D, {0x2c55}}},
+ {0x2c26, {1|F|D, {0x2c56}}},
+ {0x2c27, {1|F|D, {0x2c57}}},
+ {0x2c28, {1|F|D, {0x2c58}}},
+ {0x2c29, {1|F|D, {0x2c59}}},
+ {0x2c2a, {1|F|D, {0x2c5a}}},
+ {0x2c2b, {1|F|D, {0x2c5b}}},
+ {0x2c2c, {1|F|D, {0x2c5c}}},
+ {0x2c2d, {1|F|D, {0x2c5d}}},
+ {0x2c2e, {1|F|D, {0x2c5e}}},
+ {0x2c2f, {1|F|D, {0x2c5f}}},
+ {0x2c60, {1|F|D, {0x2c61}}},
+ {0x2c62, {1|F|D, {0x026b}}},
+ {0x2c63, {1|F|D, {0x1d7d}}},
+ {0x2c64, {1|F|D, {0x027d}}},
+ {0x2c67, {1|F|D, {0x2c68}}},
+ {0x2c69, {1|F|D, {0x2c6a}}},
+ {0x2c6b, {1|F|D, {0x2c6c}}},
+ {0x2c6d, {1|F|D, {0x0251}}},
+ {0x2c6e, {1|F|D, {0x0271}}},
+ {0x2c6f, {1|F|D, {0x0250}}},
+ {0x2c70, {1|F|D, {0x0252}}},
+ {0x2c72, {1|F|D, {0x2c73}}},
+ {0x2c75, {1|F|D, {0x2c76}}},
+ {0x2c7e, {1|F|D, {0x023f}}},
+ {0x2c7f, {1|F|D, {0x0240}}},
+ {0x2c80, {1|F|D, {0x2c81}}},
+ {0x2c82, {1|F|D, {0x2c83}}},
+ {0x2c84, {1|F|D, {0x2c85}}},
+ {0x2c86, {1|F|D, {0x2c87}}},
+ {0x2c88, {1|F|D, {0x2c89}}},
+ {0x2c8a, {1|F|D, {0x2c8b}}},
+ {0x2c8c, {1|F|D, {0x2c8d}}},
+ {0x2c8e, {1|F|D, {0x2c8f}}},
+ {0x2c90, {1|F|D, {0x2c91}}},
+ {0x2c92, {1|F|D, {0x2c93}}},
+ {0x2c94, {1|F|D, {0x2c95}}},
+ {0x2c96, {1|F|D, {0x2c97}}},
+ {0x2c98, {1|F|D, {0x2c99}}},
+ {0x2c9a, {1|F|D, {0x2c9b}}},
+ {0x2c9c, {1|F|D, {0x2c9d}}},
+ {0x2c9e, {1|F|D, {0x2c9f}}},
+ {0x2ca0, {1|F|D, {0x2ca1}}},
+ {0x2ca2, {1|F|D, {0x2ca3}}},
+ {0x2ca4, {1|F|D, {0x2ca5}}},
+ {0x2ca6, {1|F|D, {0x2ca7}}},
+ {0x2ca8, {1|F|D, {0x2ca9}}},
+ {0x2caa, {1|F|D, {0x2cab}}},
+ {0x2cac, {1|F|D, {0x2cad}}},
+ {0x2cae, {1|F|D, {0x2caf}}},
+ {0x2cb0, {1|F|D, {0x2cb1}}},
+ {0x2cb2, {1|F|D, {0x2cb3}}},
+ {0x2cb4, {1|F|D, {0x2cb5}}},
+ {0x2cb6, {1|F|D, {0x2cb7}}},
+ {0x2cb8, {1|F|D, {0x2cb9}}},
+ {0x2cba, {1|F|D, {0x2cbb}}},
+ {0x2cbc, {1|F|D, {0x2cbd}}},
+ {0x2cbe, {1|F|D, {0x2cbf}}},
+ {0x2cc0, {1|F|D, {0x2cc1}}},
+ {0x2cc2, {1|F|D, {0x2cc3}}},
+ {0x2cc4, {1|F|D, {0x2cc5}}},
+ {0x2cc6, {1|F|D, {0x2cc7}}},
+ {0x2cc8, {1|F|D, {0x2cc9}}},
+ {0x2cca, {1|F|D, {0x2ccb}}},
+ {0x2ccc, {1|F|D, {0x2ccd}}},
+ {0x2cce, {1|F|D, {0x2ccf}}},
+ {0x2cd0, {1|F|D, {0x2cd1}}},
+ {0x2cd2, {1|F|D, {0x2cd3}}},
+ {0x2cd4, {1|F|D, {0x2cd5}}},
+ {0x2cd6, {1|F|D, {0x2cd7}}},
+ {0x2cd8, {1|F|D, {0x2cd9}}},
+ {0x2cda, {1|F|D, {0x2cdb}}},
+ {0x2cdc, {1|F|D, {0x2cdd}}},
+ {0x2cde, {1|F|D, {0x2cdf}}},
+ {0x2ce0, {1|F|D, {0x2ce1}}},
+ {0x2ce2, {1|F|D, {0x2ce3}}},
+ {0x2ceb, {1|F|D, {0x2cec}}},
+ {0x2ced, {1|F|D, {0x2cee}}},
+ {0x2cf2, {1|F|D, {0x2cf3}}},
+ {0xa640, {1|F|D, {0xa641}}},
+ {0xa642, {1|F|D, {0xa643}}},
+ {0xa644, {1|F|D, {0xa645}}},
+ {0xa646, {1|F|D, {0xa647}}},
+ {0xa648, {1|F|D, {0xa649}}},
+ {0xa64a, {1|F|D, {0xa64b}}},
+ {0xa64c, {1|F|D, {0xa64d}}},
+ {0xa64e, {1|F|D, {0xa64f}}},
+ {0xa650, {1|F|D, {0xa651}}},
+ {0xa652, {1|F|D, {0xa653}}},
+ {0xa654, {1|F|D, {0xa655}}},
+ {0xa656, {1|F|D, {0xa657}}},
+ {0xa658, {1|F|D, {0xa659}}},
+ {0xa65a, {1|F|D, {0xa65b}}},
+ {0xa65c, {1|F|D, {0xa65d}}},
+ {0xa65e, {1|F|D, {0xa65f}}},
+ {0xa660, {1|F|D, {0xa661}}},
+ {0xa662, {1|F|D, {0xa663}}},
+ {0xa664, {1|F|D, {0xa665}}},
+ {0xa666, {1|F|D, {0xa667}}},
+ {0xa668, {1|F|D, {0xa669}}},
+ {0xa66a, {1|F|D, {0xa66b}}},
+ {0xa66c, {1|F|D, {0xa66d}}},
+ {0xa680, {1|F|D, {0xa681}}},
+ {0xa682, {1|F|D, {0xa683}}},
+ {0xa684, {1|F|D, {0xa685}}},
+ {0xa686, {1|F|D, {0xa687}}},
+ {0xa688, {1|F|D, {0xa689}}},
+ {0xa68a, {1|F|D, {0xa68b}}},
+ {0xa68c, {1|F|D, {0xa68d}}},
+ {0xa68e, {1|F|D, {0xa68f}}},
+ {0xa690, {1|F|D, {0xa691}}},
+ {0xa692, {1|F|D, {0xa693}}},
+ {0xa694, {1|F|D, {0xa695}}},
+ {0xa696, {1|F|D, {0xa697}}},
+ {0xa698, {1|F|D, {0xa699}}},
+ {0xa69a, {1|F|D, {0xa69b}}},
+ {0xa722, {1|F|D, {0xa723}}},
+ {0xa724, {1|F|D, {0xa725}}},
+ {0xa726, {1|F|D, {0xa727}}},
+ {0xa728, {1|F|D, {0xa729}}},
+ {0xa72a, {1|F|D, {0xa72b}}},
+ {0xa72c, {1|F|D, {0xa72d}}},
+ {0xa72e, {1|F|D, {0xa72f}}},
+ {0xa732, {1|F|D, {0xa733}}},
+ {0xa734, {1|F|D, {0xa735}}},
+ {0xa736, {1|F|D, {0xa737}}},
+ {0xa738, {1|F|D, {0xa739}}},
+ {0xa73a, {1|F|D, {0xa73b}}},
+ {0xa73c, {1|F|D, {0xa73d}}},
+ {0xa73e, {1|F|D, {0xa73f}}},
+ {0xa740, {1|F|D, {0xa741}}},
+ {0xa742, {1|F|D, {0xa743}}},
+ {0xa744, {1|F|D, {0xa745}}},
+ {0xa746, {1|F|D, {0xa747}}},
+ {0xa748, {1|F|D, {0xa749}}},
+ {0xa74a, {1|F|D, {0xa74b}}},
+ {0xa74c, {1|F|D, {0xa74d}}},
+ {0xa74e, {1|F|D, {0xa74f}}},
+ {0xa750, {1|F|D, {0xa751}}},
+ {0xa752, {1|F|D, {0xa753}}},
+ {0xa754, {1|F|D, {0xa755}}},
+ {0xa756, {1|F|D, {0xa757}}},
+ {0xa758, {1|F|D, {0xa759}}},
+ {0xa75a, {1|F|D, {0xa75b}}},
+ {0xa75c, {1|F|D, {0xa75d}}},
+ {0xa75e, {1|F|D, {0xa75f}}},
+ {0xa760, {1|F|D, {0xa761}}},
+ {0xa762, {1|F|D, {0xa763}}},
+ {0xa764, {1|F|D, {0xa765}}},
+ {0xa766, {1|F|D, {0xa767}}},
+ {0xa768, {1|F|D, {0xa769}}},
+ {0xa76a, {1|F|D, {0xa76b}}},
+ {0xa76c, {1|F|D, {0xa76d}}},
+ {0xa76e, {1|F|D, {0xa76f}}},
+ {0xa779, {1|F|D, {0xa77a}}},
+ {0xa77b, {1|F|D, {0xa77c}}},
+ {0xa77d, {1|F|D, {0x1d79}}},
+ {0xa77e, {1|F|D, {0xa77f}}},
+ {0xa780, {1|F|D, {0xa781}}},
+ {0xa782, {1|F|D, {0xa783}}},
+ {0xa784, {1|F|D, {0xa785}}},
+ {0xa786, {1|F|D, {0xa787}}},
+ {0xa78b, {1|F|D, {0xa78c}}},
+ {0xa78d, {1|F|D, {0x0265}}},
+ {0xa790, {1|F|D, {0xa791}}},
+ {0xa792, {1|F|D, {0xa793}}},
+ {0xa796, {1|F|D, {0xa797}}},
+ {0xa798, {1|F|D, {0xa799}}},
+ {0xa79a, {1|F|D, {0xa79b}}},
+ {0xa79c, {1|F|D, {0xa79d}}},
+ {0xa79e, {1|F|D, {0xa79f}}},
+ {0xa7a0, {1|F|D, {0xa7a1}}},
+ {0xa7a2, {1|F|D, {0xa7a3}}},
+ {0xa7a4, {1|F|D, {0xa7a5}}},
+ {0xa7a6, {1|F|D, {0xa7a7}}},
+ {0xa7a8, {1|F|D, {0xa7a9}}},
+ {0xa7aa, {1|F|D, {0x0266}}},
+ {0xa7ab, {1|F|D, {0x025c}}},
+ {0xa7ac, {1|F|D, {0x0261}}},
+ {0xa7ad, {1|F|D, {0x026c}}},
+ {0xa7ae, {1|F|D, {0x026a}}},
+ {0xa7b0, {1|F|D, {0x029e}}},
+ {0xa7b1, {1|F|D, {0x0287}}},
+ {0xa7b2, {1|F|D, {0x029d}}},
+ {0xa7b3, {1|F|D, {0xab53}}},
+ {0xa7b4, {1|F|D, {0xa7b5}}},
+ {0xa7b6, {1|F|D, {0xa7b7}}},
+ {0xa7b8, {1|F|D, {0xa7b9}}},
+ {0xa7ba, {1|F|D, {0xa7bb}}},
+ {0xa7bc, {1|F|D, {0xa7bd}}},
+ {0xa7be, {1|F|D, {0xa7bf}}},
+ {0xa7c0, {1|F|D, {0xa7c1}}},
+ {0xa7c2, {1|F|D, {0xa7c3}}},
+ {0xa7c4, {1|F|D, {0xa794}}},
+ {0xa7c5, {1|F|D, {0x0282}}},
+ {0xa7c6, {1|F|D, {0x1d8e}}},
+ {0xa7c7, {1|F|D, {0xa7c8}}},
+ {0xa7c9, {1|F|D, {0xa7ca}}},
+ {0xa7d0, {1|F|D, {0xa7d1}}},
+ {0xa7d6, {1|F|D, {0xa7d7}}},
+ {0xa7d8, {1|F|D, {0xa7d9}}},
+ {0xa7f5, {1|F|D, {0xa7f6}}},
+ {0xab70, {1|F|U, {0x13a0}}},
+ {0xab71, {1|F|U, {0x13a1}}},
+ {0xab72, {1|F|U, {0x13a2}}},
+ {0xab73, {1|F|U, {0x13a3}}},
+ {0xab74, {1|F|U, {0x13a4}}},
+ {0xab75, {1|F|U, {0x13a5}}},
+ {0xab76, {1|F|U, {0x13a6}}},
+ {0xab77, {1|F|U, {0x13a7}}},
+ {0xab78, {1|F|U, {0x13a8}}},
+ {0xab79, {1|F|U, {0x13a9}}},
+ {0xab7a, {1|F|U, {0x13aa}}},
+ {0xab7b, {1|F|U, {0x13ab}}},
+ {0xab7c, {1|F|U, {0x13ac}}},
+ {0xab7d, {1|F|U, {0x13ad}}},
+ {0xab7e, {1|F|U, {0x13ae}}},
+ {0xab7f, {1|F|U, {0x13af}}},
+ {0xab80, {1|F|U, {0x13b0}}},
+ {0xab81, {1|F|U, {0x13b1}}},
+ {0xab82, {1|F|U, {0x13b2}}},
+ {0xab83, {1|F|U, {0x13b3}}},
+ {0xab84, {1|F|U, {0x13b4}}},
+ {0xab85, {1|F|U, {0x13b5}}},
+ {0xab86, {1|F|U, {0x13b6}}},
+ {0xab87, {1|F|U, {0x13b7}}},
+ {0xab88, {1|F|U, {0x13b8}}},
+ {0xab89, {1|F|U, {0x13b9}}},
+ {0xab8a, {1|F|U, {0x13ba}}},
+ {0xab8b, {1|F|U, {0x13bb}}},
+ {0xab8c, {1|F|U, {0x13bc}}},
+ {0xab8d, {1|F|U, {0x13bd}}},
+ {0xab8e, {1|F|U, {0x13be}}},
+ {0xab8f, {1|F|U, {0x13bf}}},
+ {0xab90, {1|F|U, {0x13c0}}},
+ {0xab91, {1|F|U, {0x13c1}}},
+ {0xab92, {1|F|U, {0x13c2}}},
+ {0xab93, {1|F|U, {0x13c3}}},
+ {0xab94, {1|F|U, {0x13c4}}},
+ {0xab95, {1|F|U, {0x13c5}}},
+ {0xab96, {1|F|U, {0x13c6}}},
+ {0xab97, {1|F|U, {0x13c7}}},
+ {0xab98, {1|F|U, {0x13c8}}},
+ {0xab99, {1|F|U, {0x13c9}}},
+ {0xab9a, {1|F|U, {0x13ca}}},
+ {0xab9b, {1|F|U, {0x13cb}}},
+ {0xab9c, {1|F|U, {0x13cc}}},
+ {0xab9d, {1|F|U, {0x13cd}}},
+ {0xab9e, {1|F|U, {0x13ce}}},
+ {0xab9f, {1|F|U, {0x13cf}}},
+ {0xaba0, {1|F|U, {0x13d0}}},
+ {0xaba1, {1|F|U, {0x13d1}}},
+ {0xaba2, {1|F|U, {0x13d2}}},
+ {0xaba3, {1|F|U, {0x13d3}}},
+ {0xaba4, {1|F|U, {0x13d4}}},
+ {0xaba5, {1|F|U, {0x13d5}}},
+ {0xaba6, {1|F|U, {0x13d6}}},
+ {0xaba7, {1|F|U, {0x13d7}}},
+ {0xaba8, {1|F|U, {0x13d8}}},
+ {0xaba9, {1|F|U, {0x13d9}}},
+ {0xabaa, {1|F|U, {0x13da}}},
+ {0xabab, {1|F|U, {0x13db}}},
+ {0xabac, {1|F|U, {0x13dc}}},
+ {0xabad, {1|F|U, {0x13dd}}},
+ {0xabae, {1|F|U, {0x13de}}},
+ {0xabaf, {1|F|U, {0x13df}}},
+ {0xabb0, {1|F|U, {0x13e0}}},
+ {0xabb1, {1|F|U, {0x13e1}}},
+ {0xabb2, {1|F|U, {0x13e2}}},
+ {0xabb3, {1|F|U, {0x13e3}}},
+ {0xabb4, {1|F|U, {0x13e4}}},
+ {0xabb5, {1|F|U, {0x13e5}}},
+ {0xabb6, {1|F|U, {0x13e6}}},
+ {0xabb7, {1|F|U, {0x13e7}}},
+ {0xabb8, {1|F|U, {0x13e8}}},
+ {0xabb9, {1|F|U, {0x13e9}}},
+ {0xabba, {1|F|U, {0x13ea}}},
+ {0xabbb, {1|F|U, {0x13eb}}},
+ {0xabbc, {1|F|U, {0x13ec}}},
+ {0xabbd, {1|F|U, {0x13ed}}},
+ {0xabbe, {1|F|U, {0x13ee}}},
+ {0xabbf, {1|F|U, {0x13ef}}},
+ {0xfb00, {2|F|ST|SU|I(366), {0x0066, 0x0066}}},
+ {0xfb01, {2|F|ST|SU|I(370), {0x0066, 0x0069}}},
+ {0xfb02, {2|F|ST|SU|I(374), {0x0066, 0x006c}}},
+ {0xfb03, {3|F|ST|SU|I(378), {0x0066, 0x0066, 0x0069}}},
+ {0xfb04, {3|F|ST|SU|I(384), {0x0066, 0x0066, 0x006c}}},
+ {0xfb05, {2|F|ST|SU|I(390), {0x0073, 0x0074}}},
+ {0xfb06, {2|F|ST|SU|I(394), {0x0073, 0x0074}}},
+ {0xfb13, {2|F|ST|SU|I(398), {0x0574, 0x0576}}},
+ {0xfb14, {2|F|ST|SU|I(402), {0x0574, 0x0565}}},
+ {0xfb15, {2|F|ST|SU|I(406), {0x0574, 0x056b}}},
+ {0xfb16, {2|F|ST|SU|I(410), {0x057e, 0x0576}}},
+ {0xfb17, {2|F|ST|SU|I(414), {0x0574, 0x056d}}},
+ {0xff21, {1|F|D, {0xff41}}},
+ {0xff22, {1|F|D, {0xff42}}},
+ {0xff23, {1|F|D, {0xff43}}},
+ {0xff24, {1|F|D, {0xff44}}},
+ {0xff25, {1|F|D, {0xff45}}},
+ {0xff26, {1|F|D, {0xff46}}},
+ {0xff27, {1|F|D, {0xff47}}},
+ {0xff28, {1|F|D, {0xff48}}},
+ {0xff29, {1|F|D, {0xff49}}},
+ {0xff2a, {1|F|D, {0xff4a}}},
+ {0xff2b, {1|F|D, {0xff4b}}},
+ {0xff2c, {1|F|D, {0xff4c}}},
+ {0xff2d, {1|F|D, {0xff4d}}},
+ {0xff2e, {1|F|D, {0xff4e}}},
+ {0xff2f, {1|F|D, {0xff4f}}},
+ {0xff30, {1|F|D, {0xff50}}},
+ {0xff31, {1|F|D, {0xff51}}},
+ {0xff32, {1|F|D, {0xff52}}},
+ {0xff33, {1|F|D, {0xff53}}},
+ {0xff34, {1|F|D, {0xff54}}},
+ {0xff35, {1|F|D, {0xff55}}},
+ {0xff36, {1|F|D, {0xff56}}},
+ {0xff37, {1|F|D, {0xff57}}},
+ {0xff38, {1|F|D, {0xff58}}},
+ {0xff39, {1|F|D, {0xff59}}},
+ {0xff3a, {1|F|D, {0xff5a}}},
+ {0x10400, {1|F|D, {0x10428}}},
+ {0x10401, {1|F|D, {0x10429}}},
+ {0x10402, {1|F|D, {0x1042a}}},
+ {0x10403, {1|F|D, {0x1042b}}},
+ {0x10404, {1|F|D, {0x1042c}}},
+ {0x10405, {1|F|D, {0x1042d}}},
+ {0x10406, {1|F|D, {0x1042e}}},
+ {0x10407, {1|F|D, {0x1042f}}},
+ {0x10408, {1|F|D, {0x10430}}},
+ {0x10409, {1|F|D, {0x10431}}},
+ {0x1040a, {1|F|D, {0x10432}}},
+ {0x1040b, {1|F|D, {0x10433}}},
+ {0x1040c, {1|F|D, {0x10434}}},
+ {0x1040d, {1|F|D, {0x10435}}},
+ {0x1040e, {1|F|D, {0x10436}}},
+ {0x1040f, {1|F|D, {0x10437}}},
+ {0x10410, {1|F|D, {0x10438}}},
+ {0x10411, {1|F|D, {0x10439}}},
+ {0x10412, {1|F|D, {0x1043a}}},
+ {0x10413, {1|F|D, {0x1043b}}},
+ {0x10414, {1|F|D, {0x1043c}}},
+ {0x10415, {1|F|D, {0x1043d}}},
+ {0x10416, {1|F|D, {0x1043e}}},
+ {0x10417, {1|F|D, {0x1043f}}},
+ {0x10418, {1|F|D, {0x10440}}},
+ {0x10419, {1|F|D, {0x10441}}},
+ {0x1041a, {1|F|D, {0x10442}}},
+ {0x1041b, {1|F|D, {0x10443}}},
+ {0x1041c, {1|F|D, {0x10444}}},
+ {0x1041d, {1|F|D, {0x10445}}},
+ {0x1041e, {1|F|D, {0x10446}}},
+ {0x1041f, {1|F|D, {0x10447}}},
+ {0x10420, {1|F|D, {0x10448}}},
+ {0x10421, {1|F|D, {0x10449}}},
+ {0x10422, {1|F|D, {0x1044a}}},
+ {0x10423, {1|F|D, {0x1044b}}},
+ {0x10424, {1|F|D, {0x1044c}}},
+ {0x10425, {1|F|D, {0x1044d}}},
+ {0x10426, {1|F|D, {0x1044e}}},
+ {0x10427, {1|F|D, {0x1044f}}},
+ {0x104b0, {1|F|D, {0x104d8}}},
+ {0x104b1, {1|F|D, {0x104d9}}},
+ {0x104b2, {1|F|D, {0x104da}}},
+ {0x104b3, {1|F|D, {0x104db}}},
+ {0x104b4, {1|F|D, {0x104dc}}},
+ {0x104b5, {1|F|D, {0x104dd}}},
+ {0x104b6, {1|F|D, {0x104de}}},
+ {0x104b7, {1|F|D, {0x104df}}},
+ {0x104b8, {1|F|D, {0x104e0}}},
+ {0x104b9, {1|F|D, {0x104e1}}},
+ {0x104ba, {1|F|D, {0x104e2}}},
+ {0x104bb, {1|F|D, {0x104e3}}},
+ {0x104bc, {1|F|D, {0x104e4}}},
+ {0x104bd, {1|F|D, {0x104e5}}},
+ {0x104be, {1|F|D, {0x104e6}}},
+ {0x104bf, {1|F|D, {0x104e7}}},
+ {0x104c0, {1|F|D, {0x104e8}}},
+ {0x104c1, {1|F|D, {0x104e9}}},
+ {0x104c2, {1|F|D, {0x104ea}}},
+ {0x104c3, {1|F|D, {0x104eb}}},
+ {0x104c4, {1|F|D, {0x104ec}}},
+ {0x104c5, {1|F|D, {0x104ed}}},
+ {0x104c6, {1|F|D, {0x104ee}}},
+ {0x104c7, {1|F|D, {0x104ef}}},
+ {0x104c8, {1|F|D, {0x104f0}}},
+ {0x104c9, {1|F|D, {0x104f1}}},
+ {0x104ca, {1|F|D, {0x104f2}}},
+ {0x104cb, {1|F|D, {0x104f3}}},
+ {0x104cc, {1|F|D, {0x104f4}}},
+ {0x104cd, {1|F|D, {0x104f5}}},
+ {0x104ce, {1|F|D, {0x104f6}}},
+ {0x104cf, {1|F|D, {0x104f7}}},
+ {0x104d0, {1|F|D, {0x104f8}}},
+ {0x104d1, {1|F|D, {0x104f9}}},
+ {0x104d2, {1|F|D, {0x104fa}}},
+ {0x104d3, {1|F|D, {0x104fb}}},
+ {0x10570, {1|F|D, {0x10597}}},
+ {0x10571, {1|F|D, {0x10598}}},
+ {0x10572, {1|F|D, {0x10599}}},
+ {0x10573, {1|F|D, {0x1059a}}},
+ {0x10574, {1|F|D, {0x1059b}}},
+ {0x10575, {1|F|D, {0x1059c}}},
+ {0x10576, {1|F|D, {0x1059d}}},
+ {0x10577, {1|F|D, {0x1059e}}},
+ {0x10578, {1|F|D, {0x1059f}}},
+ {0x10579, {1|F|D, {0x105a0}}},
+ {0x1057a, {1|F|D, {0x105a1}}},
+ {0x1057c, {1|F|D, {0x105a3}}},
+ {0x1057d, {1|F|D, {0x105a4}}},
+ {0x1057e, {1|F|D, {0x105a5}}},
+ {0x1057f, {1|F|D, {0x105a6}}},
+ {0x10580, {1|F|D, {0x105a7}}},
+ {0x10581, {1|F|D, {0x105a8}}},
+ {0x10582, {1|F|D, {0x105a9}}},
+ {0x10583, {1|F|D, {0x105aa}}},
+ {0x10584, {1|F|D, {0x105ab}}},
+ {0x10585, {1|F|D, {0x105ac}}},
+ {0x10586, {1|F|D, {0x105ad}}},
+ {0x10587, {1|F|D, {0x105ae}}},
+ {0x10588, {1|F|D, {0x105af}}},
+ {0x10589, {1|F|D, {0x105b0}}},
+ {0x1058a, {1|F|D, {0x105b1}}},
+ {0x1058c, {1|F|D, {0x105b3}}},
+ {0x1058d, {1|F|D, {0x105b4}}},
+ {0x1058e, {1|F|D, {0x105b5}}},
+ {0x1058f, {1|F|D, {0x105b6}}},
+ {0x10590, {1|F|D, {0x105b7}}},
+ {0x10591, {1|F|D, {0x105b8}}},
+ {0x10592, {1|F|D, {0x105b9}}},
+ {0x10594, {1|F|D, {0x105bb}}},
+ {0x10595, {1|F|D, {0x105bc}}},
+ {0x10c80, {1|F|D, {0x10cc0}}},
+ {0x10c81, {1|F|D, {0x10cc1}}},
+ {0x10c82, {1|F|D, {0x10cc2}}},
+ {0x10c83, {1|F|D, {0x10cc3}}},
+ {0x10c84, {1|F|D, {0x10cc4}}},
+ {0x10c85, {1|F|D, {0x10cc5}}},
+ {0x10c86, {1|F|D, {0x10cc6}}},
+ {0x10c87, {1|F|D, {0x10cc7}}},
+ {0x10c88, {1|F|D, {0x10cc8}}},
+ {0x10c89, {1|F|D, {0x10cc9}}},
+ {0x10c8a, {1|F|D, {0x10cca}}},
+ {0x10c8b, {1|F|D, {0x10ccb}}},
+ {0x10c8c, {1|F|D, {0x10ccc}}},
+ {0x10c8d, {1|F|D, {0x10ccd}}},
+ {0x10c8e, {1|F|D, {0x10cce}}},
+ {0x10c8f, {1|F|D, {0x10ccf}}},
+ {0x10c90, {1|F|D, {0x10cd0}}},
+ {0x10c91, {1|F|D, {0x10cd1}}},
+ {0x10c92, {1|F|D, {0x10cd2}}},
+ {0x10c93, {1|F|D, {0x10cd3}}},
+ {0x10c94, {1|F|D, {0x10cd4}}},
+ {0x10c95, {1|F|D, {0x10cd5}}},
+ {0x10c96, {1|F|D, {0x10cd6}}},
+ {0x10c97, {1|F|D, {0x10cd7}}},
+ {0x10c98, {1|F|D, {0x10cd8}}},
+ {0x10c99, {1|F|D, {0x10cd9}}},
+ {0x10c9a, {1|F|D, {0x10cda}}},
+ {0x10c9b, {1|F|D, {0x10cdb}}},
+ {0x10c9c, {1|F|D, {0x10cdc}}},
+ {0x10c9d, {1|F|D, {0x10cdd}}},
+ {0x10c9e, {1|F|D, {0x10cde}}},
+ {0x10c9f, {1|F|D, {0x10cdf}}},
+ {0x10ca0, {1|F|D, {0x10ce0}}},
+ {0x10ca1, {1|F|D, {0x10ce1}}},
+ {0x10ca2, {1|F|D, {0x10ce2}}},
+ {0x10ca3, {1|F|D, {0x10ce3}}},
+ {0x10ca4, {1|F|D, {0x10ce4}}},
+ {0x10ca5, {1|F|D, {0x10ce5}}},
+ {0x10ca6, {1|F|D, {0x10ce6}}},
+ {0x10ca7, {1|F|D, {0x10ce7}}},
+ {0x10ca8, {1|F|D, {0x10ce8}}},
+ {0x10ca9, {1|F|D, {0x10ce9}}},
+ {0x10caa, {1|F|D, {0x10cea}}},
+ {0x10cab, {1|F|D, {0x10ceb}}},
+ {0x10cac, {1|F|D, {0x10cec}}},
+ {0x10cad, {1|F|D, {0x10ced}}},
+ {0x10cae, {1|F|D, {0x10cee}}},
+ {0x10caf, {1|F|D, {0x10cef}}},
+ {0x10cb0, {1|F|D, {0x10cf0}}},
+ {0x10cb1, {1|F|D, {0x10cf1}}},
+ {0x10cb2, {1|F|D, {0x10cf2}}},
+ {0x118a0, {1|F|D, {0x118c0}}},
+ {0x118a1, {1|F|D, {0x118c1}}},
+ {0x118a2, {1|F|D, {0x118c2}}},
+ {0x118a3, {1|F|D, {0x118c3}}},
+ {0x118a4, {1|F|D, {0x118c4}}},
+ {0x118a5, {1|F|D, {0x118c5}}},
+ {0x118a6, {1|F|D, {0x118c6}}},
+ {0x118a7, {1|F|D, {0x118c7}}},
+ {0x118a8, {1|F|D, {0x118c8}}},
+ {0x118a9, {1|F|D, {0x118c9}}},
+ {0x118aa, {1|F|D, {0x118ca}}},
+ {0x118ab, {1|F|D, {0x118cb}}},
+ {0x118ac, {1|F|D, {0x118cc}}},
+ {0x118ad, {1|F|D, {0x118cd}}},
+ {0x118ae, {1|F|D, {0x118ce}}},
+ {0x118af, {1|F|D, {0x118cf}}},
+ {0x118b0, {1|F|D, {0x118d0}}},
+ {0x118b1, {1|F|D, {0x118d1}}},
+ {0x118b2, {1|F|D, {0x118d2}}},
+ {0x118b3, {1|F|D, {0x118d3}}},
+ {0x118b4, {1|F|D, {0x118d4}}},
+ {0x118b5, {1|F|D, {0x118d5}}},
+ {0x118b6, {1|F|D, {0x118d6}}},
+ {0x118b7, {1|F|D, {0x118d7}}},
+ {0x118b8, {1|F|D, {0x118d8}}},
+ {0x118b9, {1|F|D, {0x118d9}}},
+ {0x118ba, {1|F|D, {0x118da}}},
+ {0x118bb, {1|F|D, {0x118db}}},
+ {0x118bc, {1|F|D, {0x118dc}}},
+ {0x118bd, {1|F|D, {0x118dd}}},
+ {0x118be, {1|F|D, {0x118de}}},
+ {0x118bf, {1|F|D, {0x118df}}},
+ {0x16e40, {1|F|D, {0x16e60}}},
+ {0x16e41, {1|F|D, {0x16e61}}},
+ {0x16e42, {1|F|D, {0x16e62}}},
+ {0x16e43, {1|F|D, {0x16e63}}},
+ {0x16e44, {1|F|D, {0x16e64}}},
+ {0x16e45, {1|F|D, {0x16e65}}},
+ {0x16e46, {1|F|D, {0x16e66}}},
+ {0x16e47, {1|F|D, {0x16e67}}},
+ {0x16e48, {1|F|D, {0x16e68}}},
+ {0x16e49, {1|F|D, {0x16e69}}},
+ {0x16e4a, {1|F|D, {0x16e6a}}},
+ {0x16e4b, {1|F|D, {0x16e6b}}},
+ {0x16e4c, {1|F|D, {0x16e6c}}},
+ {0x16e4d, {1|F|D, {0x16e6d}}},
+ {0x16e4e, {1|F|D, {0x16e6e}}},
+ {0x16e4f, {1|F|D, {0x16e6f}}},
+ {0x16e50, {1|F|D, {0x16e70}}},
+ {0x16e51, {1|F|D, {0x16e71}}},
+ {0x16e52, {1|F|D, {0x16e72}}},
+ {0x16e53, {1|F|D, {0x16e73}}},
+ {0x16e54, {1|F|D, {0x16e74}}},
+ {0x16e55, {1|F|D, {0x16e75}}},
+ {0x16e56, {1|F|D, {0x16e76}}},
+ {0x16e57, {1|F|D, {0x16e77}}},
+ {0x16e58, {1|F|D, {0x16e78}}},
+ {0x16e59, {1|F|D, {0x16e79}}},
+ {0x16e5a, {1|F|D, {0x16e7a}}},
+ {0x16e5b, {1|F|D, {0x16e7b}}},
+ {0x16e5c, {1|F|D, {0x16e7c}}},
+ {0x16e5d, {1|F|D, {0x16e7d}}},
+ {0x16e5e, {1|F|D, {0x16e7e}}},
+ {0x16e5f, {1|F|D, {0x16e7f}}},
+ {0x1e900, {1|F|D, {0x1e922}}},
+ {0x1e901, {1|F|D, {0x1e923}}},
+ {0x1e902, {1|F|D, {0x1e924}}},
+ {0x1e903, {1|F|D, {0x1e925}}},
+ {0x1e904, {1|F|D, {0x1e926}}},
+ {0x1e905, {1|F|D, {0x1e927}}},
+ {0x1e906, {1|F|D, {0x1e928}}},
+ {0x1e907, {1|F|D, {0x1e929}}},
+ {0x1e908, {1|F|D, {0x1e92a}}},
+ {0x1e909, {1|F|D, {0x1e92b}}},
+ {0x1e90a, {1|F|D, {0x1e92c}}},
+ {0x1e90b, {1|F|D, {0x1e92d}}},
+ {0x1e90c, {1|F|D, {0x1e92e}}},
+ {0x1e90d, {1|F|D, {0x1e92f}}},
+ {0x1e90e, {1|F|D, {0x1e930}}},
+ {0x1e90f, {1|F|D, {0x1e931}}},
+ {0x1e910, {1|F|D, {0x1e932}}},
+ {0x1e911, {1|F|D, {0x1e933}}},
+ {0x1e912, {1|F|D, {0x1e934}}},
+ {0x1e913, {1|F|D, {0x1e935}}},
+ {0x1e914, {1|F|D, {0x1e936}}},
+ {0x1e915, {1|F|D, {0x1e937}}},
+ {0x1e916, {1|F|D, {0x1e938}}},
+ {0x1e917, {1|F|D, {0x1e939}}},
+ {0x1e918, {1|F|D, {0x1e93a}}},
+ {0x1e919, {1|F|D, {0x1e93b}}},
+ {0x1e91a, {1|F|D, {0x1e93c}}},
+ {0x1e91b, {1|F|D, {0x1e93d}}},
+ {0x1e91c, {1|F|D, {0x1e93e}}},
+ {0x1e91d, {1|F|D, {0x1e93f}}},
+ {0x1e91e, {1|F|D, {0x1e940}}},
+ {0x1e91f, {1|F|D, {0x1e941}}},
+ {0x1e920, {1|F|D, {0x1e942}}},
+ {0x1e921, {1|F|D, {0x1e943}}},
+#define CaseFold_Locale (*(CaseFold_11_Type (*)[2])(CaseFold_11_Table+1528))
+ {0x0049, {1|F|D, {0x0069}}},
+ {0x0130, {2|F|D, {0x0069, 0x0307}}},
+};
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseFold_11_hash -N onigenc_unicode_CaseFold_11_lookup -n */
+
+/* maximum key range = 3080, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+/*ARGSUSED*/
+static unsigned int
+onigenc_unicode_CaseFold_11_hash(const OnigCodePoint code)
+{
+ static const unsigned short asso_values[] =
+ {
+ 1, 3085, 2, 20, 3, 307, 200, 8, 31, 159,
+ 2, 253, 33, 967, 3085, 3085, 3085, 3085, 3085, 3085,
+ 3085, 3085, 3085, 3085, 3085, 3085, 3085, 30, 3085, 3085,
+ 3085, 3085, 3085, 3085, 3085, 352, 3085, 3085, 3085, 3085,
+ 3085, 93, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085,
+ 3085, 407, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 201,
+ 3085, 3085, 14, 13, 373, 1, 3085, 3085, 503, 19,
+ 3085, 3085, 3085, 3085, 3085, 325, 3085, 3085, 290, 1064,
+ 484, 28, 1906, 447, 272, 414, 2002, 79, 905, 5,
+ 11, 22, 2024, 623, 761, 617, 1893, 45, 1874, 113,
+ 1856, 255, 1823, 96, 1463, 62, 1841, 130, 1798, 331,
+ 1771, 238, 1977, 147, 1387, 464, 1691, 187, 1639, 181,
+ 366, 580, 1331, 508, 1287, 547, 1583, 541, 400, 783,
+ 1944, 657, 1850, 932, 1785, 858, 1645, 681, 1412, 722,
+ 1622, 972, 1306, 807, 1942, 1282, 283, 1218, 1557, 1055,
+ 1406, 1258, 1401, 1168, 1327, 864, 893, 1123, 1714, 1195,
+ 1885, 1083, 2016, 1232, 823, 678, 1420, 1017, 155, 1261,
+ 86, 1351, 794, 1929, 51, 1525, 50, 221, 4, 1383,
+ 196, 325, 1, 1562, 102, 1441, 3, 1356, 226, 1304,
+ 271, 1516, 68, 1752, 37, 1469, 51, 1920, 143, 2059,
+ 198, 2095, 370, 2069, 137, 718, 407, 1926, 136
+ };
+ return asso_values[bits_of(code, 2)+81] + asso_values[bits_of(code, 1)+2] + asso_values[bits_of(code, 0)];
+}
+
+static const CodePointList3 *
+onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code)
+{
+ enum
+ {
+ MIN_CODE_VALUE = 0x41,
+ MAX_CODE_VALUE = 0x1e921,
+ TOTAL_KEYWORDS = 1530,
+ MIN_WORD_LENGTH = 3,
+ MAX_WORD_LENGTH = 3,
+ MIN_HASH_VALUE = 5,
+ MAX_HASH_VALUE = 3084
+ };
+
+ static const short wordlist[] =
+ {
+ -1, -1, -1, -1, -1,
+ /*0x1fe9*/ 850,
+ -1,
+ /*0x1f88*/ 775,
+ /*0x0408*/ 305,
+ /*0x0108*/ 61,
+ /*0x10408*/ 1276,
+ -1,
+ /*0xab88*/ 1174,
+ /*0x1f89*/ 776,
+ /*0x0409*/ 306,
+ /*0x2c69*/ 964,
+ /*0x10409*/ 1277,
+ /*0x2c08*/ 919,
+ /*0xab89*/ 1175,
+ /*0x1e88*/ 653,
+ /*0x1e08*/ 589,
+ -1, -1,
+ /*0x2c09*/ 920,
+ /*0x1f8a*/ 777,
+ /*0x040a*/ 307,
+ /*0x010a*/ 62,
+ /*0x1040a*/ 1278,
+ /*0x2c88*/ 978,
+ /*0xab8a*/ 1176,
+ /*0x1f80*/ 767,
+ /*0x0400*/ 297,
+ /*0x0100*/ 57,
+ /*0x10400*/ 1268,
+ /*0x2c0a*/ 921,
+ /*0xab80*/ 1166,
+ /*0x1e8a*/ 654,
+ /*0x1e0a*/ 590,
+ /*0x10c88*/ 1387,
+ /*0x0508*/ 425,
+ /*0x2c00*/ 911,
+ -1,
+ /*0x1e80*/ 649,
+ /*0x1e00*/ 585,
+ /*0x10c89*/ 1388,
+ /*0x2c8a*/ 979,
+ -1,
+ /*0x1f90*/ 783,
+ /*0x0410*/ 313,
+ /*0x0110*/ 65,
+ /*0x10410*/ 1284,
+ /*0x2c80*/ 974,
+ /*0xab90*/ 1182,
+ /*0x1ff3*/ 855,
+ -1,
+ /*0x10c8a*/ 1389,
+ /*0x050a*/ 426,
+ /*0x2c10*/ 927,
+ /*0xa780*/ 1106,
+ /*0x1e90*/ 657,
+ /*0x1e10*/ 593,
+ /*0x10c80*/ 1379,
+ /*0x0500*/ 421,
+ -1,
+ /*0x1f98*/ 791,
+ /*0x0418*/ 321,
+ /*0x0118*/ 69,
+ /*0x10418*/ 1292,
+ /*0x2c90*/ 982,
+ /*0xab98*/ 1190,
+ -1,
+ /*0x00df*/ 56,
+ /*0x00dd*/ 54,
+ /*0x10571*/ 1345,
+ /*0x2c18*/ 935,
+ /*0xa790*/ 1112,
+ /*0x1e98*/ 662,
+ /*0x1e18*/ 597,
+ /*0x10c90*/ 1395,
+ /*0x0510*/ 429,
+ /*0x2c6f*/ 968,
+ /*0x1f86*/ 773,
+ /*0x0406*/ 303,
+ /*0x0106*/ 60,
+ /*0x10406*/ 1274,
+ /*0x2c98*/ 986,
+ /*0xab86*/ 1172,
+ /*0x10573*/ 1347,
+ /*0x1fd9*/ 841,
+ /*0x0059*/ 23,
+ -1,
+ /*0x2c06*/ 917,
+ /*0xa798*/ 1115,
+ /*0x1e86*/ 652,
+ /*0x1e06*/ 588,
+ /*0x10c98*/ 1403,
+ /*0x0518*/ 433,
+ -1,
+ /*0x1f96*/ 789,
+ /*0x0416*/ 319,
+ /*0x0116*/ 68,
+ /*0x10416*/ 1290,
+ /*0x2c86*/ 977,
+ /*0xab96*/ 1188,
+ /*0x1fe7*/ 848,
+ -1, -1,
+ /*0x00d9*/ 50,
+ /*0x2c16*/ 933,
+ /*0xa786*/ 1109,
+ /*0x1e96*/ 660,
+ /*0x1e16*/ 596,
+ /*0x10c86*/ 1385,
+ /*0x0506*/ 424,
+ /*0x2c67*/ 963,
+ /*0x1f92*/ 785,
+ /*0x0412*/ 315,
+ /*0x0112*/ 66,
+ /*0x10412*/ 1286,
+ /*0x2c96*/ 985,
+ /*0xab92*/ 1184,
+ -1, -1, -1, -1,
+ /*0x2c12*/ 929,
+ /*0xa796*/ 1114,
+ /*0x1e92*/ 658,
+ /*0x1e12*/ 594,
+ /*0x10c96*/ 1401,
+ /*0x0516*/ 432,
+ -1,
+ /*0x1f9a*/ 793,
+ /*0x041a*/ 323,
+ /*0x011a*/ 70,
+ /*0x1041a*/ 1294,
+ /*0x2c92*/ 983,
+ /*0xab9a*/ 1192,
+ -1,
+ /*0x1ffb*/ 862,
+ /*0x017f*/ 120,
+ /*0x017b*/ 118,
+ /*0x2c1a*/ 937,
+ /*0xa792*/ 1113,
+ /*0x1e9a*/ 664,
+ /*0x1e1a*/ 598,
+ /*0x10c92*/ 1397,
+ /*0x0512*/ 430,
+ /*0x2c7f*/ 973,
+ /*0x1fa0*/ 799,
+ /*0x0420*/ 329,
+ /*0x0120*/ 73,
+ /*0x10420*/ 1300,
+ /*0x2c9a*/ 987,
+ /*0xaba0*/ 1198,
+ /*0x2c75*/ 971,
+ -1,
+ /*0x1fd7*/ 839,
+ /*0x0057*/ 21,
+ /*0x2c20*/ 943,
+ /*0xa79a*/ 1116,
+ /*0x1ea0*/ 667,
+ /*0x1e20*/ 601,
+ /*0x10c9a*/ 1405,
+ /*0x051a*/ 434,
+ /*0x0388*/ 235,
+ -1, -1,
+ /*0x037f*/ 233,
+ -1,
+ /*0x2ca0*/ 990,
+ /*0x0389*/ 236,
+ /*0x1057f*/ 1358,
+ /*0xa7f5*/ 1149,
+ -1, -1, -1,
+ /*0xa7a0*/ 1119,
+ -1,
+ /*0x10575*/ 1349,
+ /*0x10ca0*/ 1411,
+ /*0x0520*/ 437,
+ /*0x038a*/ 237,
+ /*0x1fa6*/ 805,
+ /*0x0426*/ 335,
+ /*0x0126*/ 76,
+ /*0x10426*/ 1306,
+ -1,
+ /*0xaba6*/ 1204,
+ /*0x1fa4*/ 803,
+ /*0x0424*/ 333,
+ /*0x0124*/ 75,
+ /*0x10424*/ 1304,
+ /*0x2c26*/ 949,
+ /*0xaba4*/ 1202,
+ /*0x1ea6*/ 670,
+ /*0x1e26*/ 604,
+ /*0x03f1*/ 288,
+ /*0x1fe3*/ 845,
+ /*0x2c24*/ 947,
+ /*0x1ff7*/ 858,
+ /*0x1ea4*/ 669,
+ /*0x1e24*/ 603,
+ -1,
+ /*0x2ca6*/ 993,
+ /*0x0390*/ 241,
+ /*0x0208*/ 194,
+ /*0x1c88*/ 538,
+ /*0x2c63*/ 961,
+ -1,
+ /*0x2ca4*/ 992,
+ /*0xa7a6*/ 1122,
+ -1, -1,
+ /*0x10ca6*/ 1417,
+ /*0x0526*/ 440,
+ -1,
+ /*0xa7a4*/ 1121,
+ -1, -1,
+ /*0x10ca4*/ 1415,
+ /*0x0524*/ 439,
+ /*0x0398*/ 249,
+ /*0x020a*/ 195,
+ /*0x0460*/ 345,
+ /*0x0160*/ 104,
+ -1, -1,
+ /*0x1feb*/ 852,
+ /*0x0200*/ 190,
+ /*0x1c80*/ 530,
+ /*0x13fb*/ 527,
+ -1,
+ /*0x2c60*/ 959,
+ /*0x10577*/ 1351,
+ /*0x1ee0*/ 699,
+ /*0x1e60*/ 633,
+ -1,
+ /*0x2c6b*/ 965,
+ /*0x0386*/ 234,
+ /*0x1f9e*/ 797,
+ /*0x041e*/ 327,
+ /*0x011e*/ 72,
+ /*0x1041e*/ 1298,
+ /*0x2ce0*/ 1022,
+ /*0xab9e*/ 1196,
+ /*0x0210*/ 198,
+ /*0x1c90*/ 539,
+ -1,
+ /*0x2ceb*/ 1024,
+ /*0x2c1e*/ 941,
+ -1,
+ /*0x1e9e*/ 666,
+ /*0x1e1e*/ 600,
+ -1, -1,
+ /*0x0396*/ 247,
+ /*0x1f94*/ 787,
+ /*0x0414*/ 317,
+ /*0x0114*/ 67,
+ /*0x10414*/ 1288,
+ /*0x2c9e*/ 989,
+ /*0xab94*/ 1186,
+ /*0x0218*/ 202,
+ /*0x1c98*/ 547,
+ -1, -1,
+ /*0x2c14*/ 931,
+ /*0xa79e*/ 1118,
+ /*0x1e94*/ 659,
+ /*0x1e14*/ 595,
+ /*0x10c9e*/ 1409,
+ /*0x051e*/ 436,
+ /*0x0392*/ 243,
+ /*0x1f83*/ 770,
+ /*0x0403*/ 300,
+ /*0x048a*/ 362,
+ /*0x10403*/ 1271,
+ /*0x2c94*/ 984,
+ /*0xab83*/ 1169,
+ /*0x0206*/ 193,
+ /*0x1c86*/ 536,
+ /*0x0480*/ 361,
+ /*0x2c6d*/ 966,
+ /*0x2c03*/ 914,
+ /*0x1e908*/ 1502,
+ /*0x0041*/ 0,
+ /*0x0141*/ 88,
+ /*0x10c94*/ 1399,
+ /*0x0514*/ 431,
+ /*0x039a*/ 251,
+ /*0x1e909*/ 1503,
+ /*0x2183*/ 884,
+ -1,
+ /*0x2ced*/ 1025,
+ -1,
+ /*0x03ff*/ 296,
+ /*0x0216*/ 201,
+ /*0x1c96*/ 545,
+ /*0x0490*/ 365,
+ -1, -1,
+ /*0x1e90a*/ 1504,
+ /*0x03f5*/ 290,
+ /*0x00c1*/ 27,
+ /*0x10c83*/ 1382,
+ -1,
+ /*0x03a0*/ 257,
+ /*0x1e900*/ 1494,
+ -1, -1, -1, -1, -1,
+ /*0x0212*/ 199,
+ /*0x1c92*/ 541,
+ /*0x0498*/ 369,
+ /*0x0541*/ 461,
+ -1,
+ /*0x0189*/ 126,
+ -1, -1, -1, -1, -1,
+ /*0x1e910*/ 1510,
+ -1,
+ /*0x1fe4*/ 846,
+ /*0x0464*/ 347,
+ /*0x0164*/ 106,
+ /*0x018a*/ 127,
+ /*0x021a*/ 203,
+ /*0x1c9a*/ 549,
+ /*0x1f9c*/ 795,
+ /*0x041c*/ 325,
+ /*0x011c*/ 71,
+ /*0x1041c*/ 1296,
+ /*0x2c64*/ 962,
+ /*0xab9c*/ 1194,
+ /*0x1ee4*/ 701,
+ /*0x1e64*/ 635,
+ /*0x03a6*/ 262,
+ /*0x1e918*/ 1518,
+ /*0x2c1c*/ 939,
+ -1,
+ /*0x01f1*/ 181,
+ /*0x1e1c*/ 599,
+ /*0x03a4*/ 260,
+ /*0x0220*/ 206,
+ /*0x1ca0*/ 555,
+ /*0x0496*/ 368,
+ -1, -1,
+ /*0x0190*/ 131,
+ /*0x2c9c*/ 988,
+ -1, -1, -1,
+ /*0x03f7*/ 291,
+ /*0x1e906*/ 1500,
+ -1,
+ /*0xa79c*/ 1117,
+ -1, -1,
+ /*0x10c9c*/ 1407,
+ /*0x051c*/ 435,
+ -1,
+ /*0x0492*/ 366,
+ /*0x1fa7*/ 806,
+ /*0x0427*/ 336,
+ /*0x0198*/ 137,
+ /*0x10427*/ 1307,
+ /*0x1ff9*/ 860,
+ /*0xaba7*/ 1205,
+ /*0x0179*/ 117,
+ -1,
+ /*0x1e916*/ 1516,
+ /*0x1f69*/ 760,
+ /*0x2c27*/ 950,
+ /*0x1f08*/ 715,
+ -1,
+ /*0x03e0*/ 279,
+ /*0x0226*/ 209,
+ /*0x1ca6*/ 561,
+ /*0x049a*/ 370,
+ /*0x1f09*/ 716,
+ -1,
+ /*0x0186*/ 124,
+ /*0x0224*/ 208,
+ /*0x1ca4*/ 559,
+ -1, -1, -1,
+ /*0x1e912*/ 1512,
+ /*0x01d9*/ 169,
+ -1,
+ /*0x1f0a*/ 717,
+ -1,
+ /*0x039e*/ 255,
+ /*0x10ca7*/ 1418,
+ -1,
+ /*0x04a0*/ 373,
+ /*0x1faf*/ 814,
+ /*0x042f*/ 344,
+ /*0x0196*/ 135,
+ -1,
+ /*0x10579*/ 1353,
+ /*0xabaf*/ 1213,
+ -1, -1,
+ /*0x1e91a*/ 1520,
+ /*0x017d*/ 119,
+ /*0x2c2f*/ 958,
+ -1,
+ /*0xfb00*/ 1230,
+ /*0x0394*/ 245,
+ /*0x1f84*/ 771,
+ /*0x0404*/ 301,
+ /*0x0104*/ 59,
+ /*0x10404*/ 1272,
+ -1,
+ /*0xab84*/ 1170,
+ -1, -1,
+ /*0x1f5f*/ 758,
+ /*0x1f5d*/ 757,
+ /*0x2c04*/ 915,
+ /*0x1e920*/ 1526,
+ /*0x1e84*/ 651,
+ /*0x1e04*/ 587,
+ -1, -1, -1,
+ /*0x10caf*/ 1426,
+ -1,
+ /*0x04a6*/ 376,
+ /*0x1f18*/ 723,
+ /*0x2c84*/ 976,
+ -1,
+ /*0x021e*/ 205,
+ /*0x1c9e*/ 553,
+ /*0x04a4*/ 375,
+ /*0x1f6f*/ 766,
+ /*0x1057d*/ 1356,
+ /*0xa784*/ 1108,
+ -1, -1,
+ /*0x10c84*/ 1383,
+ /*0x0504*/ 423,
+ /*0x1f82*/ 769,
+ /*0x0402*/ 299,
+ /*0x0102*/ 58,
+ /*0x10402*/ 1270,
+ -1,
+ /*0xab82*/ 1168,
+ /*0x01a0*/ 141,
+ /*0x0214*/ 200,
+ /*0x1c94*/ 543,
+ -1,
+ /*0x2c02*/ 913,
+ /*0x1f59*/ 755,
+ /*0x1e82*/ 650,
+ /*0x1e02*/ 586,
+ /*0x01d7*/ 168,
+ /*0x13f9*/ 525,
+ /*0xfb06*/ 1236,
+ /*0x1fa2*/ 801,
+ /*0x0422*/ 331,
+ /*0x0122*/ 74,
+ /*0x10422*/ 1302,
+ /*0x2c82*/ 975,
+ /*0xaba2*/ 1200,
+ -1, -1,
+ /*0x1c83*/ 533,
+ /*0x04e0*/ 405,
+ /*0x2c22*/ 945,
+ /*0xa782*/ 1107,
+ /*0x1ea2*/ 668,
+ /*0x1e22*/ 602,
+ /*0x10c82*/ 1381,
+ /*0x0502*/ 422,
+ /*0xfb16*/ 1240,
+ -1,
+ /*0x0241*/ 220,
+ /*0x03e4*/ 281,
+ -1,
+ /*0x2ca2*/ 991,
+ -1,
+ /*0x01a6*/ 144,
+ -1,
+ /*0x039c*/ 253,
+ /*0x049e*/ 372,
+ -1,
+ /*0xa7a2*/ 1120,
+ /*0x01a4*/ 143,
+ -1,
+ /*0x10ca2*/ 1413,
+ /*0x0522*/ 438,
+ -1,
+ /*0x10a0*/ 484,
+ /*0x13fd*/ 529,
+ -1, -1,
+ /*0x1f1a*/ 725,
+ /*0x2165*/ 873,
+ /*0x01f7*/ 185,
+ /*0x2169*/ 877,
+ /*0x2161*/ 869,
+ /*0x0494*/ 367,
+ /*0x1faa*/ 809,
+ /*0x042a*/ 339,
+ /*0x012a*/ 78,
+ /*0xa660*/ 1043,
+ -1,
+ /*0xabaa*/ 1208,
+ -1, -1,
+ /*0x1e91e*/ 1524,
+ -1,
+ /*0x2c2a*/ 953,
+ -1,
+ /*0x1eaa*/ 672,
+ /*0x1e2a*/ 606,
+ -1, -1,
+ /*0x03a7*/ 263,
+ -1, -1,
+ /*0x01e0*/ 172,
+ /*0x03f9*/ 292,
+ /*0x2caa*/ 995,
+ /*0x021c*/ 204,
+ /*0x1c9c*/ 551,
+ /*0x10a6*/ 490,
+ /*0x1e914*/ 1514,
+ -1,
+ /*0x04c1*/ 390,
+ /*0xa7aa*/ 1124,
+ /*0x104c1*/ 1325,
+ /*0x10a4*/ 488,
+ /*0x10caa*/ 1421,
+ /*0x052a*/ 442,
+ /*0x1fae*/ 813,
+ /*0x042e*/ 343,
+ /*0x012e*/ 80,
+ -1, -1,
+ /*0xabae*/ 1212,
+ /*0x1fac*/ 811,
+ /*0x042c*/ 341,
+ /*0x012c*/ 79,
+ /*0x1e903*/ 1497,
+ /*0x2c2e*/ 957,
+ /*0xabac*/ 1210,
+ /*0x1eae*/ 674,
+ /*0x1e2e*/ 608,
+ /*0x118a0*/ 1430,
+ -1,
+ /*0x2c2c*/ 955,
+ -1,
+ /*0x1eac*/ 673,
+ /*0x1e2c*/ 607,
+ /*0x0194*/ 134,
+ /*0x2cae*/ 997,
+ -1, -1,
+ /*0x03fd*/ 294,
+ /*0x1ca7*/ 562,
+ -1,
+ /*0x2cac*/ 996,
+ /*0xa7ae*/ 1128,
+ /*0x216f*/ 883,
+ -1,
+ /*0x10cae*/ 1425,
+ /*0x052e*/ 444,
+ -1,
+ /*0xa7ac*/ 1126,
+ -1,
+ /*0x04e4*/ 407,
+ /*0x10cac*/ 1423,
+ /*0x052c*/ 443,
+ /*0x1fa8*/ 807,
+ /*0x0428*/ 337,
+ /*0x0128*/ 77,
+ /*0x049c*/ 371,
+ -1,
+ /*0xaba8*/ 1206,
+ -1, -1, -1,
+ /*0x118a6*/ 1436,
+ /*0x2c28*/ 951,
+ -1,
+ /*0x1ea8*/ 671,
+ /*0x1e28*/ 605,
+ -1,
+ /*0x118a4*/ 1434,
+ -1, -1,
+ /*0x1f6b*/ 762,
+ /*0xff26*/ 1247,
+ /*0x1caf*/ 570,
+ /*0x2ca8*/ 994,
+ -1, -1,
+ /*0x2167*/ 875,
+ /*0xff24*/ 1245,
+ -1,
+ /*0x24c1*/ 896,
+ /*0xa7a8*/ 1123,
+ /*0x1e91c*/ 1522,
+ -1,
+ /*0x10ca8*/ 1419,
+ /*0x0528*/ 441,
+ /*0x0204*/ 192,
+ /*0x1c84*/ 534,
+ /*0xa664*/ 1045,
+ -1,
+ /*0x1f8e*/ 781,
+ /*0x040e*/ 311,
+ /*0x010e*/ 64,
+ /*0x1040e*/ 1282,
+ /*0xa77b*/ 1103,
+ /*0xab8e*/ 1180,
+ /*0x1f8c*/ 779,
+ /*0x040c*/ 309,
+ /*0x010c*/ 63,
+ /*0x1040c*/ 1280,
+ /*0x2c0e*/ 925,
+ /*0xab8c*/ 1178,
+ /*0x1e8e*/ 656,
+ /*0x1e0e*/ 592,
+ /*0x01e4*/ 174,
+ -1,
+ /*0x2c0c*/ 923,
+ /*0x10c1*/ 517,
+ /*0x1e8c*/ 655,
+ /*0x1e0c*/ 591,
+ /*0x019c*/ 138,
+ /*0x2c8e*/ 981,
+ /*0xfb14*/ 1238,
+ -1, -1, -1,
+ /*0x1f6d*/ 764,
+ /*0x2c8c*/ 980,
+ -1,
+ /*0x0202*/ 191,
+ /*0x1c82*/ 532,
+ /*0x10c8e*/ 1393,
+ /*0x050e*/ 428,
+ -1, -1, -1, -1,
+ /*0x10c8c*/ 1391,
+ /*0x050c*/ 427,
+ /*0xfb03*/ 1233,
+ /*0x1fb2*/ 815,
+ -1,
+ /*0x0132*/ 81,
+ -1, -1,
+ /*0xabb2*/ 1216,
+ /*0x0222*/ 207,
+ /*0x1ca2*/ 557,
+ /*0xa726*/ 1066,
+ /*0x03aa*/ 266,
+ -1, -1,
+ /*0x1eb2*/ 676,
+ /*0x1e32*/ 610,
+ /*0xa724*/ 1065,
+ /*0x01a7*/ 145,
+ -1, -1, -1, -1, -1,
+ /*0x2cb2*/ 999,
+ /*0x0054*/ 18,
+ /*0x0154*/ 98,
+ /*0x1fb8*/ 820,
+ -1,
+ /*0x2126*/ 864,
+ -1,
+ /*0xa7b2*/ 1131,
+ /*0xabb8*/ 1222,
+ -1,
+ /*0x10cb2*/ 1429,
+ /*0x0532*/ 446,
+ /*0x1ed4*/ 693,
+ /*0x1e54*/ 627,
+ /*0x1e904*/ 1498,
+ /*0x1eb8*/ 679,
+ /*0x1e38*/ 613,
+ -1, -1,
+ /*0x00d4*/ 46,
+ /*0x2163*/ 871,
+ /*0x2cd4*/ 1016,
+ -1, -1,
+ /*0x2cb8*/ 1002,
+ /*0x1f1c*/ 727,
+ -1,
+ /*0xa760*/ 1094,
+ /*0x01af*/ 149,
+ /*0x022a*/ 211,
+ /*0x1caa*/ 565,
+ /*0xa7b8*/ 1135,
+ /*0x0554*/ 480,
+ -1, -1,
+ /*0x0538*/ 452,
+ -1, -1,
+ /*0x04a2*/ 374,
+ /*0x10a7*/ 491,
+ /*0x1ffc*/ 863,
+ /*0x047c*/ 359,
+ /*0x0184*/ 123,
+ -1,
+ /*0x1fba*/ 822,
+ /*0x2160*/ 868,
+ -1,
+ /*0x1e902*/ 1496,
+ -1,
+ /*0xabba*/ 1224,
+ /*0x216b*/ 879,
+ -1,
+ /*0x1efc*/ 713,
+ /*0x1e7c*/ 647,
+ -1, -1,
+ /*0x1eba*/ 680,
+ /*0x1e3a*/ 614,
+ -1, -1,
+ /*0x03a8*/ 264,
+ -1,
+ /*0x022e*/ 213,
+ /*0x1cae*/ 569,
+ -1,
+ /*0x2cba*/ 1003,
+ -1, -1,
+ /*0x022c*/ 212,
+ /*0x1cac*/ 567,
+ -1, -1,
+ /*0xa7ba*/ 1136,
+ /*0x10af*/ 499,
+ /*0x1057c*/ 1355,
+ /*0x0182*/ 122,
+ /*0x053a*/ 454,
+ -1, -1, -1, -1, -1,
+ /*0x04aa*/ 378,
+ /*0x1f8d*/ 780,
+ /*0x040d*/ 310,
+ -1,
+ /*0x1040d*/ 1281,
+ -1,
+ /*0xab8d*/ 1179,
+ -1, -1, -1,
+ /*0x01a2*/ 142,
+ /*0x2c0d*/ 924,
+ /*0x1f2f*/ 736,
+ /*0x216d*/ 881,
+ /*0x118a7*/ 1437,
+ /*0x038e*/ 239,
+ -1, -1, -1,
+ /*0x0228*/ 210,
+ /*0x1ca8*/ 563,
+ /*0x038c*/ 238,
+ -1, -1,
+ /*0xff27*/ 1248,
+ /*0x0130*/ 1529,
+ -1, -1,
+ /*0xabb0*/ 1214,
+ /*0xa78d*/ 1111,
+ -1, -1,
+ /*0x10c8d*/ 1392,
+ /*0x04ae*/ 380,
+ /*0x1fdb*/ 843,
+ /*0x1eb0*/ 675,
+ /*0x1e30*/ 609,
+ -1,
+ /*0xfb04*/ 1234,
+ /*0x04ac*/ 379,
+ -1, -1, -1, -1,
+ /*0x2cb0*/ 998,
+ -1, -1,
+ /*0x1fbe*/ 825,
+ /*0x118af*/ 1445,
+ /*0xa764*/ 1096,
+ /*0x13fc*/ 528,
+ /*0xa7b0*/ 1129,
+ /*0xabbe*/ 1228,
+ /*0x00db*/ 52,
+ /*0x10cb0*/ 1427,
+ /*0x10a2*/ 486,
+ /*0x020e*/ 197,
+ -1,
+ /*0xff2f*/ 1256,
+ /*0x1ebe*/ 682,
+ /*0x1e3e*/ 616,
+ -1,
+ /*0x020c*/ 196,
+ /*0x1fd3*/ 837,
+ /*0x0053*/ 17,
+ -1, -1,
+ /*0x2164*/ 872,
+ /*0x2cbe*/ 1005,
+ -1, -1,
+ /*0xfb02*/ 1232,
+ /*0x04a8*/ 377,
+ -1, -1,
+ /*0xa7be*/ 1138,
+ -1, -1, -1,
+ /*0x053e*/ 458,
+ -1, -1,
+ /*0x00d3*/ 45,
+ -1, -1, -1, -1,
+ /*0x01ae*/ 148,
+ -1, -1, -1, -1, -1,
+ /*0x01ac*/ 147,
+ /*0xa779*/ 1102,
+ /*0x0553*/ 479,
+ /*0x0232*/ 215,
+ /*0x1cb2*/ 573,
+ /*0x1fb6*/ 818,
+ /*0x10aa*/ 494,
+ /*0x0136*/ 83,
+ -1, -1,
+ /*0xabb6*/ 1220,
+ /*0x1fca*/ 833,
+ /*0x004a*/ 8,
+ /*0x014a*/ 93,
+ -1, -1,
+ /*0x048e*/ 364,
+ /*0x1eb6*/ 678,
+ /*0x1e36*/ 612,
+ /*0x118a2*/ 1432,
+ -1, -1,
+ /*0x048c*/ 363,
+ /*0x1eca*/ 688,
+ /*0x1e4a*/ 622,
+ -1,
+ /*0x2cb6*/ 1001,
+ /*0x1f2a*/ 731,
+ /*0x1cb8*/ 579,
+ /*0xff22*/ 1243,
+ /*0x00ca*/ 36,
+ -1,
+ /*0x2cca*/ 1011,
+ /*0xa7b6*/ 1134,
+ -1, -1, -1,
+ /*0x0536*/ 450,
+ /*0xa77d*/ 1104,
+ /*0x10ae*/ 498,
+ /*0x1fcb*/ 834,
+ /*0x004b*/ 9,
+ /*0x1e90e*/ 1508,
+ /*0x054a*/ 470,
+ -1,
+ /*0x10ac*/ 496,
+ -1, -1,
+ /*0x1e90c*/ 1506,
+ -1, -1, -1,
+ /*0x1f87*/ 774,
+ /*0x0407*/ 304,
+ -1,
+ /*0x10407*/ 1275,
+ /*0x04b2*/ 382,
+ /*0xab87*/ 1173,
+ /*0x104b2*/ 1310,
+ /*0x00cb*/ 37,
+ /*0x1f2e*/ 735,
+ -1,
+ /*0x2c07*/ 918,
+ /*0x118aa*/ 1440,
+ -1, -1,
+ /*0x1f2c*/ 733,
+ -1,
+ /*0x023a*/ 216,
+ /*0x1cba*/ 581,
+ /*0x018e*/ 129,
+ -1,
+ /*0x054b*/ 471,
+ /*0xff2a*/ 1251,
+ -1, -1, -1,
+ /*0x04d4*/ 399,
+ /*0x10a8*/ 492,
+ /*0x1fb4*/ 817,
+ /*0x04b8*/ 385,
+ /*0x0134*/ 82,
+ /*0x104b8*/ 1316,
+ /*0x10c87*/ 1386,
+ /*0xabb4*/ 1218,
+ -1, -1, -1,
+ /*0x03b0*/ 268,
+ /*0xab71*/ 1151,
+ -1,
+ /*0x1eb4*/ 677,
+ /*0x1e34*/ 611,
+ -1, -1,
+ /*0xa722*/ 1064,
+ /*0x118ae*/ 1444,
+ -1, -1,
+ /*0x1f28*/ 729,
+ /*0x2cb4*/ 1000,
+ -1,
+ /*0x118ac*/ 1442,
+ /*0xab73*/ 1153,
+ -1, -1,
+ /*0xff2e*/ 1255,
+ /*0xa7b4*/ 1133,
+ -1, -1,
+ /*0x01b2*/ 151,
+ /*0x0534*/ 448,
+ /*0xff2c*/ 1253,
+ -1, -1,
+ /*0xa654*/ 1037,
+ -1,
+ /*0x04fc*/ 419,
+ -1,
+ /*0x1fbc*/ 824,
+ /*0x10588*/ 1367,
+ /*0x04ba*/ 386,
+ -1,
+ /*0x104ba*/ 1318,
+ /*0xabbc*/ 1226,
+ -1,
+ /*0x10589*/ 1368,
+ -1, -1,
+ /*0x0230*/ 214,
+ /*0x1cb0*/ 571,
+ /*0x1ebc*/ 681,
+ /*0x1e3c*/ 615,
+ -1,
+ /*0x01b8*/ 155,
+ /*0x118a8*/ 1438,
+ /*0x1f0e*/ 721,
+ /*0x1058a*/ 1369,
+ -1,
+ /*0xa72a*/ 1068,
+ /*0x2cbc*/ 1004,
+ -1,
+ /*0x1f0c*/ 719,
+ /*0x10580*/ 1359,
+ -1,
+ /*0xff28*/ 1249,
+ -1,
+ /*0xa7bc*/ 1137,
+ -1, -1, -1,
+ /*0x053c*/ 456,
+ /*0x24b8*/ 887,
+ /*0x023e*/ 219,
+ /*0x1cbe*/ 583,
+ /*0x10b2*/ 502,
+ -1,
+ /*0x212a*/ 865,
+ -1, -1,
+ /*0x10590*/ 1374,
+ -1, -1, -1,
+ /*0x1fd6*/ 838,
+ /*0x0056*/ 20,
+ /*0x0156*/ 99,
+ -1, -1, -1, -1,
+ /*0x01fc*/ 188,
+ /*0xa72e*/ 1070,
+ -1, -1, -1,
+ /*0x1ed6*/ 694,
+ /*0x1e56*/ 628,
+ /*0xa72c*/ 1069,
+ /*0x10b8*/ 508,
+ -1, -1,
+ /*0x04b0*/ 381,
+ /*0x00d6*/ 48,
+ /*0x104b0*/ 1308,
+ /*0x2cd6*/ 1017,
+ /*0x1e90d*/ 1507,
+ -1,
+ /*0xab7f*/ 1165,
+ /*0xab7b*/ 1161,
+ -1, -1,
+ /*0xa7d6*/ 1147,
+ /*0x24ba*/ 889,
+ /*0x10586*/ 1365,
+ /*0xab75*/ 1155,
+ /*0x0556*/ 482,
+ /*0x1f54*/ 753,
+ -1, -1,
+ /*0x1f38*/ 737,
+ -1,
+ /*0x1fc4*/ 828,
+ /*0x0044*/ 3,
+ -1,
+ /*0x1cb6*/ 577,
+ /*0x04be*/ 388,
+ -1,
+ /*0x104be*/ 1322,
+ -1,
+ /*0x024a*/ 226,
+ /*0xa728*/ 1067,
+ /*0x118b2*/ 1448,
+ -1,
+ /*0x1ec4*/ 685,
+ /*0x1e44*/ 619,
+ /*0xa688*/ 1054,
+ -1, -1, -1,
+ /*0x10ba*/ 510,
+ /*0x00c4*/ 30,
+ /*0xff32*/ 1259,
+ /*0x2cc4*/ 1008,
+ /*0x104d3*/ 1343,
+ -1, -1, -1,
+ /*0x10592*/ 1376,
+ -1,
+ /*0xa7c4*/ 1141,
+ /*0x0050*/ 14,
+ /*0x0150*/ 96,
+ /*0xa68a*/ 1055,
+ /*0x0544*/ 464,
+ -1,
+ /*0x118b8*/ 1454,
+ -1, -1,
+ /*0xa680*/ 1050,
+ -1,
+ /*0x1f3a*/ 739,
+ /*0x1ed0*/ 691,
+ /*0x1e50*/ 625,
+ -1, -1,
+ /*0xff38*/ 1265,
+ /*0x01db*/ 170,
+ -1,
+ /*0x00d0*/ 42,
+ /*0xab77*/ 1157,
+ /*0x2cd0*/ 1014,
+ /*0x1c87*/ 537,
+ -1, -1, -1,
+ /*0xa690*/ 1058,
+ /*0x04b6*/ 384,
+ /*0xa7d0*/ 1146,
+ /*0x104b6*/ 1314,
+ -1, -1,
+ /*0x0550*/ 476,
+ /*0x16e5f*/ 1493,
+ /*0x16e5d*/ 1491,
+ /*0x104ca*/ 1334,
+ -1, -1, -1, -1,
+ /*0x1fcc*/ 835,
+ /*0x004c*/ 10,
+ /*0x014c*/ 94,
+ /*0xa698*/ 1062,
+ -1, -1,
+ /*0x01d3*/ 166,
+ /*0x118ba*/ 1456,
+ /*0x24be*/ 893,
+ /*0x1cb4*/ 575,
+ /*0x1f0d*/ 720,
+ /*0x10b0*/ 500,
+ /*0x1ecc*/ 689,
+ /*0x1e4c*/ 623,
+ -1, -1, -1,
+ /*0xff3a*/ 1267,
+ /*0xa732*/ 1071,
+ /*0x00cc*/ 38,
+ /*0xa686*/ 1053,
+ /*0x2ccc*/ 1012,
+ /*0x04cb*/ 395,
+ -1,
+ /*0x104cb*/ 1335,
+ -1, -1, -1, -1,
+ /*0x16e59*/ 1487,
+ -1,
+ /*0xa64a*/ 1032,
+ /*0x054c*/ 472,
+ -1, -1,
+ /*0x10be*/ 514,
+ /*0x2132*/ 867,
+ /*0xa696*/ 1061,
+ -1,
+ /*0xa754*/ 1088,
+ -1, -1,
+ /*0xa738*/ 1074,
+ /*0x1f5b*/ 756,
+ -1,
+ /*0x1fc8*/ 831,
+ /*0x0048*/ 7,
+ /*0x01ca*/ 161,
+ -1, -1, -1, -1,
+ /*0x03d6*/ 274,
+ -1,
+ /*0xa692*/ 1059,
+ -1,
+ /*0x1f3e*/ 743,
+ /*0x1ec8*/ 687,
+ /*0x1e48*/ 621,
+ /*0x24b6*/ 885,
+ /*0x1e907*/ 1501,
+ /*0x04b4*/ 383,
+ -1,
+ /*0x104b4*/ 1312,
+ /*0x00c8*/ 34,
+ /*0x24ca*/ 905,
+ /*0x2cc8*/ 1010,
+ -1,
+ /*0x118b0*/ 1446,
+ -1, -1,
+ /*0xa69a*/ 1063,
+ -1,
+ /*0x004e*/ 12,
+ /*0x014e*/ 95,
+ -1,
+ /*0x01cb*/ 162,
+ /*0x0548*/ 468,
+ /*0xff30*/ 1257,
+ -1, -1, -1, -1,
+ /*0xa73a*/ 1075,
+ /*0x1ece*/ 690,
+ /*0x1e4e*/ 624,
+ /*0x10b6*/ 506,
+ -1,
+ /*0x0187*/ 125,
+ -1, -1,
+ /*0x00ce*/ 40,
+ /*0x118be*/ 1460,
+ /*0x2cce*/ 1013,
+ /*0x24cb*/ 906,
+ /*0x1fc2*/ 826,
+ /*0x0042*/ 1,
+ -1,
+ /*0x16e57*/ 1485,
+ -1,
+ /*0x10594*/ 1377,
+ /*0x04bc*/ 387,
+ -1,
+ /*0x104bc*/ 1320,
+ /*0x054e*/ 474,
+ -1, -1,
+ /*0x1ec2*/ 684,
+ /*0x1e42*/ 618,
+ /*0x1fd2*/ 836,
+ /*0x0052*/ 16,
+ /*0x0152*/ 97,
+ -1,
+ /*0x1f4a*/ 747,
+ /*0x00c2*/ 28,
+ -1,
+ /*0x2cc2*/ 1007,
+ /*0x10583*/ 1362,
+ /*0x03d0*/ 271,
+ -1, -1,
+ /*0x1ed2*/ 692,
+ /*0x1e52*/ 626,
+ /*0xa7c2*/ 1140,
+ -1, -1, -1,
+ /*0x0542*/ 462,
+ /*0x00d2*/ 44,
+ -1,
+ /*0x2cd2*/ 1015,
+ /*0x0244*/ 222,
+ -1, -1, -1,
+ /*0x1fc6*/ 829,
+ /*0x0046*/ 5,
+ -1,
+ /*0x1fd8*/ 840,
+ /*0x0058*/ 22,
+ /*0x0158*/ 100,
+ /*0x0552*/ 478,
+ /*0x1f4b*/ 748,
+ /*0x118b6*/ 1452,
+ -1, -1,
+ /*0x04d6*/ 400,
+ /*0x1ec6*/ 686,
+ /*0x1e46*/ 620,
+ -1,
+ /*0x1ed8*/ 695,
+ /*0x1e58*/ 629,
+ /*0xab79*/ 1159,
+ /*0xff36*/ 1263,
+ /*0x00c6*/ 32,
+ /*0x01bc*/ 156,
+ /*0x2cc6*/ 1009,
+ /*0x00d8*/ 49,
+ -1,
+ /*0x2cd8*/ 1018,
+ /*0x10b4*/ 504,
+ -1, -1,
+ /*0xa7c6*/ 1143,
+ /*0x1fab*/ 810,
+ /*0x042b*/ 340,
+ /*0xa7d8*/ 1148,
+ /*0x0546*/ 466,
+ /*0xa73e*/ 1077,
+ /*0xabab*/ 1209,
+ -1,
+ /*0x1ec0*/ 683,
+ /*0x1e40*/ 617,
+ /*0x24bc*/ 891,
+ /*0x2c2b*/ 954,
+ -1, -1, -1,
+ /*0x00c0*/ 26,
+ -1,
+ /*0x2cc0*/ 1006,
+ /*0x1fec*/ 853,
+ /*0x046c*/ 351,
+ /*0x016c*/ 110,
+ /*0xa656*/ 1038,
+ /*0x013d*/ 86,
+ /*0x104c4*/ 1328,
+ /*0xa7c0*/ 1139,
+ /*0xabbd*/ 1227,
+ /*0xab7d*/ 1163,
+ -1,
+ /*0x0540*/ 460,
+ /*0xa7ab*/ 1125,
+ /*0x1eec*/ 705,
+ /*0x1e6c*/ 639,
+ /*0x10cab*/ 1422,
+ /*0xa694*/ 1060,
+ -1, -1,
+ /*0x024c*/ 227,
+ /*0x10bc*/ 512,
+ -1, -1, -1,
+ /*0x1fc9*/ 832,
+ /*0x0049*/ 1528,
+ /*0x0149*/ 92,
+ -1,
+ /*0x1fa9*/ 808,
+ /*0x0429*/ 338,
+ -1, -1,
+ /*0x04d0*/ 397,
+ /*0xaba9*/ 1207,
+ /*0x104d0*/ 1340,
+ /*0x053d*/ 457,
+ -1,
+ /*0x118b4*/ 1450,
+ /*0x2c29*/ 952,
+ /*0xa736*/ 1073,
+ -1,
+ /*0x1f3c*/ 741,
+ /*0xa644*/ 1029,
+ /*0x00c9*/ 35,
+ -1,
+ /*0xa74a*/ 1083,
+ /*0x16e41*/ 1463,
+ /*0xff34*/ 1261,
+ /*0x1fda*/ 842,
+ /*0x005a*/ 24,
+ /*0x015a*/ 101,
+ -1,
+ /*0xa7c9*/ 1145,
+ /*0x1fea*/ 851,
+ /*0x046a*/ 350,
+ /*0x016a*/ 109,
+ /*0x0549*/ 469,
+ -1,
+ /*0x01c4*/ 157,
+ /*0x10ca9*/ 1420,
+ /*0x1eda*/ 696,
+ /*0x1e5a*/ 630,
+ -1, -1,
+ /*0x0248*/ 225,
+ /*0x1eea*/ 704,
+ /*0x1e6a*/ 638,
+ /*0x00da*/ 51,
+ -1,
+ /*0x2cda*/ 1019,
+ /*0xa650*/ 1035,
+ -1, -1,
+ /*0x03c2*/ 269,
+ /*0x104cc*/ 1336,
+ -1,
+ /*0x24c4*/ 899,
+ /*0x118bc*/ 1458,
+ -1,
+ /*0x10584*/ 1363,
+ /*0x1fe2*/ 844,
+ /*0x0462*/ 346,
+ /*0x0162*/ 105,
+ -1,
+ /*0x1fa1*/ 800,
+ /*0x0421*/ 330,
+ /*0x1f56*/ 754,
+ /*0x10421*/ 1301,
+ -1,
+ /*0xaba1*/ 1199,
+ /*0x2c62*/ 960,
+ /*0x024e*/ 228,
+ /*0x1ee2*/ 700,
+ /*0x1e62*/ 634,
+ /*0x2c21*/ 944,
+ -1, -1, -1,
+ /*0x1fc7*/ 830,
+ /*0x0047*/ 6,
+ /*0x0147*/ 91,
+ /*0x2ce2*/ 1023,
+ -1,
+ /*0x10c4*/ 520,
+ /*0x0045*/ 4,
+ /*0x0145*/ 90,
+ -1, -1, -1,
+ /*0x1fb9*/ 821,
+ /*0xa64c*/ 1033,
+ /*0x0139*/ 84,
+ /*0x10582*/ 1361,
+ /*0xa734*/ 1072,
+ /*0xabb9*/ 1223,
+ /*0x10ca1*/ 1412,
+ /*0x03d8*/ 275,
+ /*0x00c7*/ 33,
+ /*0x0055*/ 19,
+ /*0x104c8*/ 1332,
+ -1, -1,
+ /*0x00c5*/ 31,
+ -1, -1, -1,
+ /*0xa7c7*/ 1144,
+ -1, -1, -1,
+ /*0x0547*/ 467,
+ /*0xa7c5*/ 1142,
+ -1,
+ /*0x0345*/ 229,
+ -1,
+ /*0x0545*/ 465,
+ /*0x00d5*/ 47,
+ -1,
+ /*0x1fe8*/ 849,
+ /*0x0468*/ 349,
+ /*0x0168*/ 108,
+ /*0x0539*/ 453,
+ /*0x03ab*/ 267,
+ -1,
+ /*0x24cc*/ 907,
+ -1,
+ /*0x104ce*/ 1338,
+ -1, -1,
+ /*0x0555*/ 481,
+ /*0x1ee8*/ 703,
+ /*0x1e68*/ 637,
+ /*0x1f50*/ 751,
+ /*0xa73c*/ 1076,
+ /*0x0246*/ 224,
+ /*0xa648*/ 1031,
+ -1, -1, -1,
+ /*0x03ec*/ 285,
+ /*0x1f97*/ 790,
+ /*0x0417*/ 320,
+ -1,
+ /*0x10417*/ 1291,
+ -1,
+ /*0xab97*/ 1189,
+ /*0x1ff2*/ 854,
+ /*0x0472*/ 354,
+ /*0x0172*/ 113,
+ /*0x104c2*/ 1326,
+ /*0x2c17*/ 934,
+ /*0x01c8*/ 160,
+ /*0x1e97*/ 661,
+ -1, -1,
+ /*0xa684*/ 1052,
+ /*0x2c72*/ 970,
+ -1,
+ /*0x1ef2*/ 708,
+ /*0x1e72*/ 642,
+ -1,
+ /*0x04d2*/ 398,
+ /*0xa64e*/ 1034,
+ /*0x104d2*/ 1342,
+ /*0x1cab*/ 566,
+ -1,
+ /*0x03a9*/ 265,
+ /*0x2cf2*/ 1026,
+ -1,
+ /*0x24c8*/ 903,
+ -1,
+ /*0x10c97*/ 1402,
+ /*0x1f4c*/ 749,
+ -1, -1, -1,
+ /*0x0372*/ 231,
+ -1,
+ /*0xa756*/ 1089,
+ -1,
+ /*0x10572*/ 1346,
+ -1,
+ /*0x023d*/ 218,
+ /*0x1cbd*/ 582,
+ -1,
+ /*0xa642*/ 1028,
+ /*0x03da*/ 276,
+ -1,
+ /*0xa682*/ 1051,
+ /*0x104c6*/ 1330,
+ /*0x04d8*/ 401,
+ /*0x03ea*/ 284,
+ -1, -1,
+ /*0x046e*/ 352,
+ /*0x016e*/ 111,
+ /*0x24ce*/ 909,
+ -1, -1,
+ /*0xa652*/ 1036,
+ -1, -1, -1,
+ /*0x2c6e*/ 967,
+ /*0x015e*/ 103,
+ /*0x1eee*/ 706,
+ /*0x1e6e*/ 640,
+ -1,
+ /*0x1ca9*/ 564,
+ -1, -1,
+ /*0x04c0*/ 389,
+ -1,
+ /*0x104c0*/ 1324,
+ /*0x1ede*/ 698,
+ /*0x1e5e*/ 632,
+ /*0xa744*/ 1080,
+ /*0x1f48*/ 745,
+ /*0x03e2*/ 280,
+ /*0x24c2*/ 897,
+ -1,
+ /*0x00de*/ 55,
+ /*0x03a1*/ 258,
+ /*0x2cde*/ 1021,
+ -1,
+ /*0xa646*/ 1030,
+ -1, -1,
+ /*0xa658*/ 1039,
+ -1, -1, -1, -1,
+ /*0x04ec*/ 411,
+ /*0x1fc3*/ 827,
+ /*0x0043*/ 2,
+ /*0x0143*/ 89,
+ /*0x104bd*/ 1321,
+ -1,
+ /*0x1fe6*/ 847,
+ /*0x0466*/ 348,
+ /*0x0166*/ 107,
+ -1, -1,
+ /*0xa750*/ 1086,
+ -1,
+ /*0x10c2*/ 518,
+ -1, -1,
+ /*0xa640*/ 1027,
+ -1,
+ /*0x1ee6*/ 702,
+ /*0x1e66*/ 636,
+ /*0x00c3*/ 29,
+ -1,
+ /*0x03d5*/ 273,
+ /*0x04c9*/ 394,
+ -1,
+ /*0x104c9*/ 1333,
+ /*0x24c6*/ 901,
+ /*0x1fad*/ 812,
+ /*0x042d*/ 342,
+ /*0x1058e*/ 1372,
+ -1,
+ /*0x1ca1*/ 556,
+ /*0xabad*/ 1211,
+ /*0x0543*/ 463,
+ -1,
+ /*0x1058c*/ 1370,
+ -1,
+ /*0x2c2d*/ 956,
+ /*0xa66c*/ 1049,
+ -1, -1, -1, -1,
+ /*0x03e8*/ 283,
+ -1, -1, -1,
+ /*0x04da*/ 402,
+ /*0x1f52*/ 752,
+ /*0x0245*/ 223,
+ /*0x24c0*/ 895,
+ /*0xa74c*/ 1084,
+ /*0x04ea*/ 410,
+ -1,
+ /*0x01ec*/ 178,
+ /*0xa7ad*/ 1127,
+ /*0x1cb9*/ 580,
+ -1,
+ /*0x10cad*/ 1424,
+ -1, -1, -1, -1, -1, -1,
+ /*0x0397*/ 248,
+ /*0x1fbb*/ 823,
+ /*0xab7c*/ 1162,
+ /*0x013b*/ 85,
+ -1, -1,
+ /*0xabbb*/ 1225,
+ -1, -1,
+ /*0x24bd*/ 892,
+ -1, -1,
+ /*0x10c0*/ 516,
+ -1,
+ /*0x04e2*/ 406,
+ -1,
+ /*0x01a9*/ 146,
+ /*0x10ab*/ 495,
+ /*0x1fa5*/ 804,
+ /*0x0425*/ 334,
+ /*0xa65a*/ 1040,
+ /*0x10425*/ 1305,
+ -1,
+ /*0xaba5*/ 1203,
+ /*0x1fb7*/ 819,
+ /*0xa66a*/ 1048,
+ -1, -1,
+ /*0x2c25*/ 948,
+ /*0xabb7*/ 1221,
+ /*0x24c9*/ 904,
+ /*0xa748*/ 1082,
+ /*0x04c7*/ 393,
+ /*0x053b*/ 455,
+ /*0x104c7*/ 1331,
+ -1,
+ /*0x10bd*/ 513,
+ /*0x04c5*/ 392,
+ /*0x1f2b*/ 732,
+ /*0x104c5*/ 1329,
+ -1,
+ /*0x01ea*/ 177,
+ /*0x1c97*/ 546,
+ -1,
+ /*0x1e921*/ 1527,
+ /*0x104b9*/ 1317,
+ -1, -1, -1,
+ /*0x10ca5*/ 1416,
+ -1, -1,
+ /*0xa662*/ 1044,
+ /*0x03ee*/ 286,
+ -1,
+ /*0x1f6c*/ 763,
+ /*0x0537*/ 451,
+ /*0x1f3d*/ 742,
+ /*0xa74e*/ 1085,
+ -1,
+ /*0xa68e*/ 1057,
+ /*0x10a9*/ 493,
+ /*0x03de*/ 278,
+ -1, -1, -1,
+ /*0xa68c*/ 1056,
+ -1,
+ /*0x01e2*/ 173,
+ -1,
+ /*0x1fa3*/ 802,
+ /*0x0423*/ 332,
+ /*0x04e8*/ 409,
+ /*0x10423*/ 1303,
+ /*0x118ab*/ 1441,
+ /*0xaba3*/ 1201,
+ -1, -1,
+ /*0x1f49*/ 746,
+ -1,
+ /*0x2c23*/ 946,
+ /*0xa742*/ 1079,
+ /*0x1f29*/ 730,
+ -1,
+ /*0xff2b*/ 1252,
+ -1,
+ /*0x01c7*/ 159,
+ -1, -1, -1, -1,
+ /*0x01c5*/ 158,
+ -1,
+ /*0x118bd*/ 1459,
+ /*0x004d*/ 11,
+ /*0xa752*/ 1087,
+ -1, -1, -1,
+ /*0x03e6*/ 282,
+ /*0x04f2*/ 414,
+ /*0x10ca3*/ 1414,
+ -1, -1,
+ /*0x24c7*/ 902,
+ /*0x01d5*/ 167,
+ -1,
+ /*0x1f6a*/ 761,
+ /*0x1058d*/ 1371,
+ /*0x24c5*/ 900,
+ /*0xa668*/ 1047,
+ -1,
+ /*0x00cd*/ 39,
+ -1, -1,
+ /*0x24b9*/ 888,
+ -1,
+ /*0x10a1*/ 485,
+ /*0x118a9*/ 1439,
+ -1,
+ /*0x1e917*/ 1517,
+ /*0xa746*/ 1081,
+ -1,
+ /*0x16e54*/ 1482,
+ /*0xa758*/ 1090,
+ /*0x054d*/ 473,
+ /*0x01e8*/ 176,
+ -1,
+ /*0xff29*/ 1250,
+ -1, -1,
+ /*0x10c7*/ 522,
+ /*0x0470*/ 353,
+ /*0x0170*/ 112,
+ -1,
+ /*0x0243*/ 221,
+ /*0x10c5*/ 521,
+ -1, -1, -1, -1,
+ /*0x2c70*/ 969,
+ /*0x10b9*/ 509,
+ /*0x1ef0*/ 707,
+ /*0x1e70*/ 641,
+ /*0xa740*/ 1078,
+ -1,
+ /*0x04ee*/ 412,
+ /*0x0197*/ 136,
+ -1,
+ /*0x1f9d*/ 796,
+ /*0x041d*/ 326,
+ -1,
+ /*0x1041d*/ 1297,
+ /*0x01f2*/ 182,
+ /*0xab9d*/ 1195,
+ /*0x04de*/ 404,
+ -1, -1, -1,
+ /*0x2c1d*/ 940,
+ /*0x0370*/ 230,
+ /*0x1cad*/ 568,
+ /*0x1f39*/ 738,
+ -1,
+ /*0x10570*/ 1344,
+ -1,
+ /*0xa76c*/ 1100,
+ /*0x212b*/ 866,
+ /*0xabb5*/ 1219,
+ -1, -1, -1, -1,
+ /*0x118a1*/ 1431,
+ -1,
+ /*0x03a5*/ 261,
+ /*0x1f9b*/ 794,
+ /*0x041b*/ 324,
+ -1,
+ /*0x1041b*/ 1295,
+ /*0x10c9d*/ 1408,
+ /*0xab9b*/ 1193,
+ /*0x00b5*/ 25,
+ /*0xff21*/ 1242,
+ /*0x216c*/ 880,
+ -1,
+ /*0x2c1b*/ 938,
+ /*0x04c3*/ 391,
+ /*0x1e9b*/ 665,
+ /*0x104c3*/ 1327,
+ -1,
+ /*0x1f68*/ 759,
+ /*0x04e6*/ 408,
+ /*0xa65e*/ 1042,
+ -1,
+ /*0x0535*/ 449,
+ -1, -1,
+ /*0x118b9*/ 1455,
+ /*0x023b*/ 217,
+ /*0x01ee*/ 179,
+ /*0x1f95*/ 788,
+ /*0x0415*/ 318,
+ -1,
+ /*0x10415*/ 1289,
+ -1,
+ /*0xab95*/ 1187,
+ /*0x10c9b*/ 1406,
+ /*0xff39*/ 1266,
+ /*0x01de*/ 171,
+ -1,
+ /*0x2c15*/ 932,
+ -1,
+ /*0xa75a*/ 1091,
+ -1, -1, -1,
+ /*0x1ca5*/ 560,
+ /*0xa76a*/ 1099,
+ /*0x1f99*/ 792,
+ /*0x0419*/ 322,
+ -1,
+ /*0x10419*/ 1293,
+ /*0x1cb7*/ 578,
+ /*0xab99*/ 1191,
+ /*0xfb17*/ 1241,
+ -1,
+ /*0x03a3*/ 259,
+ /*0x1fb3*/ 816,
+ /*0x2c19*/ 936,
+ /*0xa666*/ 1046,
+ /*0x1e99*/ 663,
+ /*0x10c95*/ 1400,
+ /*0xabb3*/ 1217,
+ /*0x1f93*/ 786,
+ /*0x0413*/ 316,
+ /*0x216a*/ 878,
+ /*0x10413*/ 1287,
+ /*0x16e5b*/ 1489,
+ /*0xab93*/ 1185,
+ -1, -1, -1, -1,
+ /*0x2c13*/ 930,
+ /*0xa762*/ 1095,
+ /*0x01e6*/ 175,
+ -1, -1,
+ /*0x0587*/ 483,
+ /*0x10c99*/ 1404,
+ /*0x10587*/ 1366,
+ /*0x1f91*/ 784,
+ /*0x0411*/ 314,
+ /*0x104bb*/ 1319,
+ /*0x10411*/ 1285,
+ /*0xa7b3*/ 1132,
+ /*0xab91*/ 1183,
+ -1,
+ /*0x24c3*/ 898,
+ /*0x0533*/ 447,
+ -1,
+ /*0x2c11*/ 928,
+ /*0x2162*/ 870,
+ /*0x004f*/ 13,
+ /*0x10c93*/ 1398,
+ /*0x1f6e*/ 765,
+ /*0x16e53*/ 1481,
+ -1,
+ /*0x1ca3*/ 558,
+ -1,
+ /*0x1f8f*/ 782,
+ /*0x040f*/ 312,
+ -1,
+ /*0x1040f*/ 1283,
+ -1,
+ /*0xab8f*/ 1181,
+ /*0x104b7*/ 1315,
+ -1, -1, -1,
+ /*0x2c0f*/ 926,
+ /*0x00cf*/ 41,
+ /*0x10c91*/ 1396,
+ /*0x1f81*/ 768,
+ /*0x0401*/ 298,
+ /*0x10c3*/ 519,
+ /*0x10401*/ 1269,
+ /*0x03f0*/ 287,
+ /*0xab81*/ 1167,
+ -1, -1, -1, -1,
+ /*0x2c01*/ 912,
+ /*0x054f*/ 475,
+ -1, -1,
+ /*0x1ff4*/ 856,
+ /*0x0474*/ 355,
+ /*0x0174*/ 114,
+ -1,
+ /*0x10c8f*/ 1394,
+ /*0xa768*/ 1098,
+ -1,
+ /*0x047e*/ 360,
+ -1,
+ /*0x039d*/ 254,
+ /*0x16e4a*/ 1472,
+ /*0x015c*/ 102,
+ /*0x1ef4*/ 709,
+ /*0x1e74*/ 643,
+ /*0x10ad*/ 497,
+ -1,
+ /*0x2c7e*/ 972,
+ /*0x10c81*/ 1380,
+ /*0x1efe*/ 714,
+ /*0x1e7e*/ 648,
+ -1,
+ /*0x1edc*/ 697,
+ /*0x1e5c*/ 631,
+ /*0x2168*/ 876,
+ /*0x013f*/ 87,
+ -1,
+ /*0x24bb*/ 890,
+ /*0xabbf*/ 1229,
+ /*0x00dc*/ 53,
+ /*0xabb1*/ 1215,
+ /*0x2cdc*/ 1020,
+ /*0x01b7*/ 154,
+ -1, -1,
+ /*0x10574*/ 1348,
+ /*0x1f2d*/ 734,
+ /*0x039b*/ 252,
+ -1, -1,
+ /*0x16e4b*/ 1473,
+ /*0x1057e*/ 1357,
+ -1, -1, -1, -1, -1,
+ /*0x04cd*/ 396,
+ -1,
+ /*0x104cd*/ 1337,
+ /*0x24b7*/ 886,
+ -1,
+ /*0x1c9d*/ 552,
+ /*0xa7b1*/ 1130,
+ /*0x10bb*/ 511,
+ /*0x053f*/ 459,
+ /*0x10cb1*/ 1428,
+ /*0x0531*/ 445,
+ /*0x1f9f*/ 798,
+ /*0x041f*/ 328,
+ -1,
+ /*0x1041f*/ 1299,
+ /*0x0395*/ 246,
+ /*0xab9f*/ 1197,
+ -1, -1,
+ /*0x1cb5*/ 576,
+ -1,
+ /*0x2c1f*/ 942,
+ -1, -1,
+ /*0x10a5*/ 489,
+ /*0x118ad*/ 1443,
+ -1, -1,
+ /*0x1f3b*/ 740,
+ -1,
+ /*0x10b7*/ 507,
+ -1,
+ /*0x1c9b*/ 550,
+ /*0x0399*/ 250,
+ /*0xa76e*/ 1101,
+ /*0xff2d*/ 1254,
+ /*0x1f85*/ 772,
+ /*0x0405*/ 302,
+ /*0x04f0*/ 413,
+ /*0x10405*/ 1273,
+ -1,
+ /*0xab85*/ 1171,
+ /*0x10c9f*/ 1410,
+ /*0xa75e*/ 1093,
+ -1, -1,
+ /*0x2c05*/ 916,
+ -1,
+ /*0x0393*/ 244,
+ -1, -1,
+ /*0x0051*/ 15,
+ /*0x216e*/ 882,
+ -1,
+ /*0x01cd*/ 163,
+ -1, -1,
+ /*0x1c95*/ 544,
+ /*0x1f8b*/ 778,
+ /*0x040b*/ 308,
+ -1,
+ /*0x1040b*/ 1279,
+ -1,
+ /*0xab8b*/ 1177,
+ /*0x118bb*/ 1457,
+ -1,
+ /*0x0391*/ 242,
+ /*0x10c85*/ 1384,
+ /*0x2c0b*/ 922,
+ /*0x00d1*/ 43,
+ -1, -1,
+ /*0x24cd*/ 908,
+ /*0x104b5*/ 1313,
+ -1,
+ /*0x1c99*/ 548,
+ /*0x10a3*/ 487,
+ /*0x03cf*/ 270,
+ -1, -1,
+ /*0xa766*/ 1097,
+ /*0x118a5*/ 1435,
+ /*0x0551*/ 477,
+ /*0x1e91d*/ 1523,
+ /*0x1cb3*/ 574,
+ /*0x038f*/ 240,
+ /*0xa78b*/ 1110,
+ /*0x118b7*/ 1453,
+ -1,
+ /*0x10c8b*/ 1390,
+ /*0x1c93*/ 542,
+ /*0xff25*/ 1246,
+ /*0x01f0*/ 180,
+ /*0x1ff6*/ 857,
+ /*0x0476*/ 356,
+ /*0x0176*/ 115,
+ -1,
+ /*0xff37*/ 1264,
+ /*0x2166*/ 874,
+ /*0x10cd*/ 523,
+ -1, -1, -1,
+ /*0x1ffa*/ 861,
+ /*0x047a*/ 358,
+ /*0x1ef6*/ 710,
+ /*0x1e76*/ 644,
+ -1,
+ /*0x1c91*/ 540,
+ -1,
+ /*0x1e91b*/ 1521,
+ /*0x019d*/ 139,
+ /*0x03f4*/ 289,
+ -1, -1,
+ /*0x1efa*/ 712,
+ /*0x1e7a*/ 646,
+ /*0x16e56*/ 1484,
+ /*0x03fe*/ 295,
+ -1,
+ /*0x1f4d*/ 750,
+ /*0x03dc*/ 277,
+ -1,
+ /*0x0376*/ 232,
+ -1,
+ /*0x01b5*/ 153,
+ -1,
+ /*0x10576*/ 1350,
+ -1,
+ /*0x1ff8*/ 859,
+ /*0x0478*/ 357,
+ /*0x0178*/ 116,
+ -1,
+ /*0x118a3*/ 1433,
+ -1,
+ /*0x1e915*/ 1515,
+ -1,
+ /*0x1057a*/ 1354,
+ /*0x104b3*/ 1311,
+ -1,
+ /*0x1c81*/ 531,
+ /*0x1ef8*/ 711,
+ /*0x1e78*/ 645,
+ /*0xff23*/ 1244,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x1e919*/ 1519,
+ -1,
+ /*0x16e44*/ 1466,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x10578*/ 1352,
+ -1, -1, -1, -1,
+ /*0x1e913*/ 1513,
+ /*0x039f*/ 256,
+ /*0x10b5*/ 505,
+ -1, -1,
+ /*0x104cf*/ 1339,
+ -1, -1,
+ /*0x1cbf*/ 584,
+ /*0x1f1d*/ 728,
+ /*0x1cb1*/ 572,
+ -1, -1, -1, -1,
+ /*0x16e50*/ 1478,
+ -1, -1,
+ /*0x1e911*/ 1511,
+ -1, -1, -1,
+ /*0x01b3*/ 152,
+ -1, -1, -1, -1,
+ /*0x13fa*/ 526,
+ /*0x0193*/ 133,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x1f1b*/ 726,
+ /*0x1e90f*/ 1509,
+ /*0x04f4*/ 415,
+ -1,
+ /*0x03d1*/ 272,
+ -1, -1,
+ /*0x1c9f*/ 554,
+ /*0x04fe*/ 420,
+ -1,
+ /*0x0191*/ 132,
+ /*0x04dc*/ 403,
+ -1, -1,
+ /*0x1e901*/ 1495,
+ -1, -1,
+ /*0x13f8*/ 524,
+ -1,
+ /*0x16e4c*/ 1474,
+ -1,
+ /*0x01cf*/ 164,
+ -1,
+ /*0x118b5*/ 1451,
+ -1, -1,
+ /*0x104bf*/ 1323,
+ -1,
+ /*0x104b1*/ 1309,
+ /*0x018f*/ 130,
+ -1,
+ /*0x10b3*/ 503,
+ /*0x1c85*/ 535,
+ /*0xff35*/ 1262,
+ -1, -1, -1,
+ /*0xfb15*/ 1239,
+ -1,
+ /*0x24cf*/ 910,
+ -1, -1,
+ /*0x0181*/ 121,
+ /*0x1f19*/ 724,
+ -1, -1, -1, -1, -1,
+ /*0xa65c*/ 1041,
+ -1, -1, -1, -1, -1, -1,
+ /*0x01f4*/ 183,
+ /*0x03fa*/ 293,
+ -1, -1, -1, -1,
+ /*0x01fe*/ 189,
+ -1,
+ /*0x16e48*/ 1470,
+ -1, -1, -1, -1, -1,
+ /*0xfb13*/ 1237,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x01b1*/ 150,
+ -1, -1, -1, -1,
+ /*0x1e91f*/ 1525,
+ -1, -1,
+ /*0x118b3*/ 1449,
+ -1, -1,
+ /*0x16e4e*/ 1476,
+ -1, -1, -1,
+ /*0x1f0f*/ 722,
+ /*0x24bf*/ 894,
+ -1,
+ /*0xff33*/ 1260,
+ -1,
+ /*0x104d1*/ 1341,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x1e905*/ 1499,
+ -1, -1,
+ /*0x019f*/ 140,
+ /*0x16e42*/ 1464,
+ -1, -1, -1, -1, -1,
+ /*0xfb01*/ 1231,
+ -1, -1,
+ /*0x10bf*/ 515,
+ -1,
+ /*0x10b1*/ 501,
+ -1, -1,
+ /*0x16e52*/ 1480,
+ -1, -1, -1,
+ /*0x1e90b*/ 1505,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0x04f6*/ 416,
+ -1, -1,
+ /*0x1f3f*/ 744,
+ -1, -1, -1, -1, -1, -1,
+ /*0x04fa*/ 418,
+ /*0x01d1*/ 165,
+ -1,
+ /*0x16e46*/ 1468,
+ -1, -1,
+ /*0x16e58*/ 1486,
+ -1, -1,
+ /*0x018b*/ 128,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x04f8*/ 417,
+ /*0x16e40*/ 1462,
+ -1,
+ /*0x118bf*/ 1461,
+ -1,
+ /*0x118b1*/ 1447,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0xff31*/ 1258,
+ -1, -1,
+ /*0x01f6*/ 184,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0xab72*/ 1152,
+ /*0x01fa*/ 187,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0xfb05*/ 1235,
+ -1, -1, -1, -1, -1, -1,
+ /*0x16e49*/ 1471,
+ -1, -1,
+ /*0x1f0b*/ 718,
+ -1, -1, -1, -1,
+ /*0x01f8*/ 186,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0xa77e*/ 1105,
+ -1, -1,
+ /*0xa75c*/ 1092,
+ -1, -1, -1,
+ /*0x16e5a*/ 1488,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x16e47*/ 1469,
+ -1, -1, -1, -1,
+ /*0x16e45*/ 1467,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x16e55*/ 1483,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0x16e5e*/ 1492,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x16e43*/ 1465,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0xab70*/ 1150,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0x16e4d*/ 1475,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x10595*/ 1378,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0xab74*/ 1154,
+ -1, -1, -1, -1, -1,
+ /*0xab7e*/ 1164,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x10591*/ 1375,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0x1058f*/ 1373,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0x10581*/ 1360,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x16e4f*/ 1477,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0xab76*/ 1156,
+ -1, -1, -1, -1, -1,
+ /*0x10585*/ 1364,
+ -1, -1, -1,
+ /*0xab7a*/ 1160,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0x16e5c*/ 1490,
+ -1, -1, -1, -1,
+ /*0xab78*/ 1158,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x16e51*/ 1479
+ };
+
+ if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE)
+ {
+ register unsigned int key = onigenc_unicode_CaseFold_11_hash(code);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register short s = wordlist[key];
+
+ if (s >= 0 && code1_equal(code, CaseFold_11_Table[s].from))
+ return &CaseFold_11_Table[s].to;
+ }
+ }
+ return 0;
+}
+
+static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
+#define CaseUnfold_11 (*(CaseUnfold_11_Type (*)[1395])(CaseUnfold_11_Table+0))
+ {0x0061, {1|U, {0x0041}}},
+ {0x0062, {1|U, {0x0042}}},
+ {0x0063, {1|U, {0x0043}}},
+ {0x0064, {1|U, {0x0044}}},
+ {0x0065, {1|U, {0x0045}}},
+ {0x0066, {1|U, {0x0046}}},
+ {0x0067, {1|U, {0x0047}}},
+ {0x0068, {1|U, {0x0048}}},
+ {0x006a, {1|U, {0x004a}}},
+ {0x006b, {2|U, {0x004b, 0x212a}}},
+ {0x006c, {1|U, {0x004c}}},
+ {0x006d, {1|U, {0x004d}}},
+ {0x006e, {1|U, {0x004e}}},
+ {0x006f, {1|U, {0x004f}}},
+ {0x0070, {1|U, {0x0050}}},
+ {0x0071, {1|U, {0x0051}}},
+ {0x0072, {1|U, {0x0052}}},
+ {0x0073, {2|U, {0x0053, 0x017f}}},
+ {0x0074, {1|U, {0x0054}}},
+ {0x0075, {1|U, {0x0055}}},
+ {0x0076, {1|U, {0x0056}}},
+ {0x0077, {1|U, {0x0057}}},
+ {0x0078, {1|U, {0x0058}}},
+ {0x0079, {1|U, {0x0059}}},
+ {0x007a, {1|U, {0x005a}}},
+ {0x00e0, {1|U, {0x00c0}}},
+ {0x00e1, {1|U, {0x00c1}}},
+ {0x00e2, {1|U, {0x00c2}}},
+ {0x00e3, {1|U, {0x00c3}}},
+ {0x00e4, {1|U, {0x00c4}}},
+ {0x00e5, {2|U, {0x00c5, 0x212b}}},
+ {0x00e6, {1|U, {0x00c6}}},
+ {0x00e7, {1|U, {0x00c7}}},
+ {0x00e8, {1|U, {0x00c8}}},
+ {0x00e9, {1|U, {0x00c9}}},
+ {0x00ea, {1|U, {0x00ca}}},
+ {0x00eb, {1|U, {0x00cb}}},
+ {0x00ec, {1|U, {0x00cc}}},
+ {0x00ed, {1|U, {0x00cd}}},
+ {0x00ee, {1|U, {0x00ce}}},
+ {0x00ef, {1|U, {0x00cf}}},
+ {0x00f0, {1|U, {0x00d0}}},
+ {0x00f1, {1|U, {0x00d1}}},
+ {0x00f2, {1|U, {0x00d2}}},
+ {0x00f3, {1|U, {0x00d3}}},
+ {0x00f4, {1|U, {0x00d4}}},
+ {0x00f5, {1|U, {0x00d5}}},
+ {0x00f6, {1|U, {0x00d6}}},
+ {0x00f8, {1|U, {0x00d8}}},
+ {0x00f9, {1|U, {0x00d9}}},
+ {0x00fa, {1|U, {0x00da}}},
+ {0x00fb, {1|U, {0x00db}}},
+ {0x00fc, {1|U, {0x00dc}}},
+ {0x00fd, {1|U, {0x00dd}}},
+ {0x00fe, {1|U, {0x00de}}},
+ {0x00ff, {1|U, {0x0178}}},
+ {0x0101, {1|U, {0x0100}}},
+ {0x0103, {1|U, {0x0102}}},
+ {0x0105, {1|U, {0x0104}}},
+ {0x0107, {1|U, {0x0106}}},
+ {0x0109, {1|U, {0x0108}}},
+ {0x010b, {1|U, {0x010a}}},
+ {0x010d, {1|U, {0x010c}}},
+ {0x010f, {1|U, {0x010e}}},
+ {0x0111, {1|U, {0x0110}}},
+ {0x0113, {1|U, {0x0112}}},
+ {0x0115, {1|U, {0x0114}}},
+ {0x0117, {1|U, {0x0116}}},
+ {0x0119, {1|U, {0x0118}}},
+ {0x011b, {1|U, {0x011a}}},
+ {0x011d, {1|U, {0x011c}}},
+ {0x011f, {1|U, {0x011e}}},
+ {0x0121, {1|U, {0x0120}}},
+ {0x0123, {1|U, {0x0122}}},
+ {0x0125, {1|U, {0x0124}}},
+ {0x0127, {1|U, {0x0126}}},
+ {0x0129, {1|U, {0x0128}}},
+ {0x012b, {1|U, {0x012a}}},
+ {0x012d, {1|U, {0x012c}}},
+ {0x012f, {1|U, {0x012e}}},
+ {0x0133, {1|U, {0x0132}}},
+ {0x0135, {1|U, {0x0134}}},
+ {0x0137, {1|U, {0x0136}}},
+ {0x013a, {1|U, {0x0139}}},
+ {0x013c, {1|U, {0x013b}}},
+ {0x013e, {1|U, {0x013d}}},
+ {0x0140, {1|U, {0x013f}}},
+ {0x0142, {1|U, {0x0141}}},
+ {0x0144, {1|U, {0x0143}}},
+ {0x0146, {1|U, {0x0145}}},
+ {0x0148, {1|U, {0x0147}}},
+ {0x014b, {1|U, {0x014a}}},
+ {0x014d, {1|U, {0x014c}}},
+ {0x014f, {1|U, {0x014e}}},
+ {0x0151, {1|U, {0x0150}}},
+ {0x0153, {1|U, {0x0152}}},
+ {0x0155, {1|U, {0x0154}}},
+ {0x0157, {1|U, {0x0156}}},
+ {0x0159, {1|U, {0x0158}}},
+ {0x015b, {1|U, {0x015a}}},
+ {0x015d, {1|U, {0x015c}}},
+ {0x015f, {1|U, {0x015e}}},
+ {0x0161, {1|U, {0x0160}}},
+ {0x0163, {1|U, {0x0162}}},
+ {0x0165, {1|U, {0x0164}}},
+ {0x0167, {1|U, {0x0166}}},
+ {0x0169, {1|U, {0x0168}}},
+ {0x016b, {1|U, {0x016a}}},
+ {0x016d, {1|U, {0x016c}}},
+ {0x016f, {1|U, {0x016e}}},
+ {0x0171, {1|U, {0x0170}}},
+ {0x0173, {1|U, {0x0172}}},
+ {0x0175, {1|U, {0x0174}}},
+ {0x0177, {1|U, {0x0176}}},
+ {0x017a, {1|U, {0x0179}}},
+ {0x017c, {1|U, {0x017b}}},
+ {0x017e, {1|U, {0x017d}}},
+ {0x0180, {1|U, {0x0243}}},
+ {0x0183, {1|U, {0x0182}}},
+ {0x0185, {1|U, {0x0184}}},
+ {0x0188, {1|U, {0x0187}}},
+ {0x018c, {1|U, {0x018b}}},
+ {0x0192, {1|U, {0x0191}}},
+ {0x0195, {1|U, {0x01f6}}},
+ {0x0199, {1|U, {0x0198}}},
+ {0x019a, {1|U, {0x023d}}},
+ {0x019e, {1|U, {0x0220}}},
+ {0x01a1, {1|U, {0x01a0}}},
+ {0x01a3, {1|U, {0x01a2}}},
+ {0x01a5, {1|U, {0x01a4}}},
+ {0x01a8, {1|U, {0x01a7}}},
+ {0x01ad, {1|U, {0x01ac}}},
+ {0x01b0, {1|U, {0x01af}}},
+ {0x01b4, {1|U, {0x01b3}}},
+ {0x01b6, {1|U, {0x01b5}}},
+ {0x01b9, {1|U, {0x01b8}}},
+ {0x01bd, {1|U, {0x01bc}}},
+ {0x01bf, {1|U, {0x01f7}}},
+ {0x01c6, {2|U|ST, {0x01c4, 0x01c5}}},
+ {0x01c9, {2|U|ST, {0x01c7, 0x01c8}}},
+ {0x01cc, {2|U|ST, {0x01ca, 0x01cb}}},
+ {0x01ce, {1|U, {0x01cd}}},
+ {0x01d0, {1|U, {0x01cf}}},
+ {0x01d2, {1|U, {0x01d1}}},
+ {0x01d4, {1|U, {0x01d3}}},
+ {0x01d6, {1|U, {0x01d5}}},
+ {0x01d8, {1|U, {0x01d7}}},
+ {0x01da, {1|U, {0x01d9}}},
+ {0x01dc, {1|U, {0x01db}}},
+ {0x01dd, {1|U, {0x018e}}},
+ {0x01df, {1|U, {0x01de}}},
+ {0x01e1, {1|U, {0x01e0}}},
+ {0x01e3, {1|U, {0x01e2}}},
+ {0x01e5, {1|U, {0x01e4}}},
+ {0x01e7, {1|U, {0x01e6}}},
+ {0x01e9, {1|U, {0x01e8}}},
+ {0x01eb, {1|U, {0x01ea}}},
+ {0x01ed, {1|U, {0x01ec}}},
+ {0x01ef, {1|U, {0x01ee}}},
+ {0x01f3, {2|U|ST, {0x01f1, 0x01f2}}},
+ {0x01f5, {1|U, {0x01f4}}},
+ {0x01f9, {1|U, {0x01f8}}},
+ {0x01fb, {1|U, {0x01fa}}},
+ {0x01fd, {1|U, {0x01fc}}},
+ {0x01ff, {1|U, {0x01fe}}},
+ {0x0201, {1|U, {0x0200}}},
+ {0x0203, {1|U, {0x0202}}},
+ {0x0205, {1|U, {0x0204}}},
+ {0x0207, {1|U, {0x0206}}},
+ {0x0209, {1|U, {0x0208}}},
+ {0x020b, {1|U, {0x020a}}},
+ {0x020d, {1|U, {0x020c}}},
+ {0x020f, {1|U, {0x020e}}},
+ {0x0211, {1|U, {0x0210}}},
+ {0x0213, {1|U, {0x0212}}},
+ {0x0215, {1|U, {0x0214}}},
+ {0x0217, {1|U, {0x0216}}},
+ {0x0219, {1|U, {0x0218}}},
+ {0x021b, {1|U, {0x021a}}},
+ {0x021d, {1|U, {0x021c}}},
+ {0x021f, {1|U, {0x021e}}},
+ {0x0223, {1|U, {0x0222}}},
+ {0x0225, {1|U, {0x0224}}},
+ {0x0227, {1|U, {0x0226}}},
+ {0x0229, {1|U, {0x0228}}},
+ {0x022b, {1|U, {0x022a}}},
+ {0x022d, {1|U, {0x022c}}},
+ {0x022f, {1|U, {0x022e}}},
+ {0x0231, {1|U, {0x0230}}},
+ {0x0233, {1|U, {0x0232}}},
+ {0x023c, {1|U, {0x023b}}},
+ {0x023f, {1|U, {0x2c7e}}},
+ {0x0240, {1|U, {0x2c7f}}},
+ {0x0242, {1|U, {0x0241}}},
+ {0x0247, {1|U, {0x0246}}},
+ {0x0249, {1|U, {0x0248}}},
+ {0x024b, {1|U, {0x024a}}},
+ {0x024d, {1|U, {0x024c}}},
+ {0x024f, {1|U, {0x024e}}},
+ {0x0250, {1|U, {0x2c6f}}},
+ {0x0251, {1|U, {0x2c6d}}},
+ {0x0252, {1|U, {0x2c70}}},
+ {0x0253, {1|U, {0x0181}}},
+ {0x0254, {1|U, {0x0186}}},
+ {0x0256, {1|U, {0x0189}}},
+ {0x0257, {1|U, {0x018a}}},
+ {0x0259, {1|U, {0x018f}}},
+ {0x025b, {1|U, {0x0190}}},
+ {0x025c, {1|U, {0xa7ab}}},
+ {0x0260, {1|U, {0x0193}}},
+ {0x0261, {1|U, {0xa7ac}}},
+ {0x0263, {1|U, {0x0194}}},
+ {0x0265, {1|U, {0xa78d}}},
+ {0x0266, {1|U, {0xa7aa}}},
+ {0x0268, {1|U, {0x0197}}},
+ {0x0269, {1|U, {0x0196}}},
+ {0x026a, {1|U, {0xa7ae}}},
+ {0x026b, {1|U, {0x2c62}}},
+ {0x026c, {1|U, {0xa7ad}}},
+ {0x026f, {1|U, {0x019c}}},
+ {0x0271, {1|U, {0x2c6e}}},
+ {0x0272, {1|U, {0x019d}}},
+ {0x0275, {1|U, {0x019f}}},
+ {0x027d, {1|U, {0x2c64}}},
+ {0x0280, {1|U, {0x01a6}}},
+ {0x0282, {1|U, {0xa7c5}}},
+ {0x0283, {1|U, {0x01a9}}},
+ {0x0287, {1|U, {0xa7b1}}},
+ {0x0288, {1|U, {0x01ae}}},
+ {0x0289, {1|U, {0x0244}}},
+ {0x028a, {1|U, {0x01b1}}},
+ {0x028b, {1|U, {0x01b2}}},
+ {0x028c, {1|U, {0x0245}}},
+ {0x0292, {1|U, {0x01b7}}},
+ {0x029d, {1|U, {0xa7b2}}},
+ {0x029e, {1|U, {0xa7b0}}},
+ {0x0371, {1|U, {0x0370}}},
+ {0x0373, {1|U, {0x0372}}},
+ {0x0377, {1|U, {0x0376}}},
+ {0x037b, {1|U, {0x03fd}}},
+ {0x037c, {1|U, {0x03fe}}},
+ {0x037d, {1|U, {0x03ff}}},
+ {0x03ac, {1|U, {0x0386}}},
+ {0x03ad, {1|U, {0x0388}}},
+ {0x03ae, {1|U, {0x0389}}},
+ {0x03af, {1|U, {0x038a}}},
+ {0x03b1, {1|U, {0x0391}}},
+ {0x03b2, {2|U, {0x0392, 0x03d0}}},
+ {0x03b3, {1|U, {0x0393}}},
+ {0x03b4, {1|U, {0x0394}}},
+ {0x03b5, {2|U, {0x0395, 0x03f5}}},
+ {0x03b6, {1|U, {0x0396}}},
+ {0x03b7, {1|U, {0x0397}}},
+ {0x03b8, {3|U, {0x0398, 0x03d1, 0x03f4}}},
+ {0x03b9, {3|U, {0x0399, 0x0345, 0x1fbe}}},
+ {0x03ba, {2|U, {0x039a, 0x03f0}}},
+ {0x03bb, {1|U, {0x039b}}},
+ {0x03bc, {2|U, {0x039c, 0x00b5}}},
+ {0x03bd, {1|U, {0x039d}}},
+ {0x03be, {1|U, {0x039e}}},
+ {0x03bf, {1|U, {0x039f}}},
+ {0x03c0, {2|U, {0x03a0, 0x03d6}}},
+ {0x03c1, {2|U, {0x03a1, 0x03f1}}},
+ {0x03c3, {2|U, {0x03a3, 0x03c2}}},
+ {0x03c4, {1|U, {0x03a4}}},
+ {0x03c5, {1|U, {0x03a5}}},
+ {0x03c6, {2|U, {0x03a6, 0x03d5}}},
+ {0x03c7, {1|U, {0x03a7}}},
+ {0x03c8, {1|U, {0x03a8}}},
+ {0x03c9, {2|U, {0x03a9, 0x2126}}},
+ {0x03ca, {1|U, {0x03aa}}},
+ {0x03cb, {1|U, {0x03ab}}},
+ {0x03cc, {1|U, {0x038c}}},
+ {0x03cd, {1|U, {0x038e}}},
+ {0x03ce, {1|U, {0x038f}}},
+ {0x03d7, {1|U, {0x03cf}}},
+ {0x03d9, {1|U, {0x03d8}}},
+ {0x03db, {1|U, {0x03da}}},
+ {0x03dd, {1|U, {0x03dc}}},
+ {0x03df, {1|U, {0x03de}}},
+ {0x03e1, {1|U, {0x03e0}}},
+ {0x03e3, {1|U, {0x03e2}}},
+ {0x03e5, {1|U, {0x03e4}}},
+ {0x03e7, {1|U, {0x03e6}}},
+ {0x03e9, {1|U, {0x03e8}}},
+ {0x03eb, {1|U, {0x03ea}}},
+ {0x03ed, {1|U, {0x03ec}}},
+ {0x03ef, {1|U, {0x03ee}}},
+ {0x03f2, {1|U, {0x03f9}}},
+ {0x03f3, {1|U, {0x037f}}},
+ {0x03f8, {1|U, {0x03f7}}},
+ {0x03fb, {1|U, {0x03fa}}},
+ {0x0430, {1|U, {0x0410}}},
+ {0x0431, {1|U, {0x0411}}},
+ {0x0432, {2|U, {0x0412, 0x1c80}}},
+ {0x0433, {1|U, {0x0413}}},
+ {0x0434, {2|U, {0x0414, 0x1c81}}},
+ {0x0435, {1|U, {0x0415}}},
+ {0x0436, {1|U, {0x0416}}},
+ {0x0437, {1|U, {0x0417}}},
+ {0x0438, {1|U, {0x0418}}},
+ {0x0439, {1|U, {0x0419}}},
+ {0x043a, {1|U, {0x041a}}},
+ {0x043b, {1|U, {0x041b}}},
+ {0x043c, {1|U, {0x041c}}},
+ {0x043d, {1|U, {0x041d}}},
+ {0x043e, {2|U, {0x041e, 0x1c82}}},
+ {0x043f, {1|U, {0x041f}}},
+ {0x0440, {1|U, {0x0420}}},
+ {0x0441, {2|U, {0x0421, 0x1c83}}},
+ {0x0442, {3|U, {0x0422, 0x1c84, 0x1c85}}},
+ {0x0443, {1|U, {0x0423}}},
+ {0x0444, {1|U, {0x0424}}},
+ {0x0445, {1|U, {0x0425}}},
+ {0x0446, {1|U, {0x0426}}},
+ {0x0447, {1|U, {0x0427}}},
+ {0x0448, {1|U, {0x0428}}},
+ {0x0449, {1|U, {0x0429}}},
+ {0x044a, {2|U, {0x042a, 0x1c86}}},
+ {0x044b, {1|U, {0x042b}}},
+ {0x044c, {1|U, {0x042c}}},
+ {0x044d, {1|U, {0x042d}}},
+ {0x044e, {1|U, {0x042e}}},
+ {0x044f, {1|U, {0x042f}}},
+ {0x0450, {1|U, {0x0400}}},
+ {0x0451, {1|U, {0x0401}}},
+ {0x0452, {1|U, {0x0402}}},
+ {0x0453, {1|U, {0x0403}}},
+ {0x0454, {1|U, {0x0404}}},
+ {0x0455, {1|U, {0x0405}}},
+ {0x0456, {1|U, {0x0406}}},
+ {0x0457, {1|U, {0x0407}}},
+ {0x0458, {1|U, {0x0408}}},
+ {0x0459, {1|U, {0x0409}}},
+ {0x045a, {1|U, {0x040a}}},
+ {0x045b, {1|U, {0x040b}}},
+ {0x045c, {1|U, {0x040c}}},
+ {0x045d, {1|U, {0x040d}}},
+ {0x045e, {1|U, {0x040e}}},
+ {0x045f, {1|U, {0x040f}}},
+ {0x0461, {1|U, {0x0460}}},
+ {0x0463, {2|U, {0x0462, 0x1c87}}},
+ {0x0465, {1|U, {0x0464}}},
+ {0x0467, {1|U, {0x0466}}},
+ {0x0469, {1|U, {0x0468}}},
+ {0x046b, {1|U, {0x046a}}},
+ {0x046d, {1|U, {0x046c}}},
+ {0x046f, {1|U, {0x046e}}},
+ {0x0471, {1|U, {0x0470}}},
+ {0x0473, {1|U, {0x0472}}},
+ {0x0475, {1|U, {0x0474}}},
+ {0x0477, {1|U, {0x0476}}},
+ {0x0479, {1|U, {0x0478}}},
+ {0x047b, {1|U, {0x047a}}},
+ {0x047d, {1|U, {0x047c}}},
+ {0x047f, {1|U, {0x047e}}},
+ {0x0481, {1|U, {0x0480}}},
+ {0x048b, {1|U, {0x048a}}},
+ {0x048d, {1|U, {0x048c}}},
+ {0x048f, {1|U, {0x048e}}},
+ {0x0491, {1|U, {0x0490}}},
+ {0x0493, {1|U, {0x0492}}},
+ {0x0495, {1|U, {0x0494}}},
+ {0x0497, {1|U, {0x0496}}},
+ {0x0499, {1|U, {0x0498}}},
+ {0x049b, {1|U, {0x049a}}},
+ {0x049d, {1|U, {0x049c}}},
+ {0x049f, {1|U, {0x049e}}},
+ {0x04a1, {1|U, {0x04a0}}},
+ {0x04a3, {1|U, {0x04a2}}},
+ {0x04a5, {1|U, {0x04a4}}},
+ {0x04a7, {1|U, {0x04a6}}},
+ {0x04a9, {1|U, {0x04a8}}},
+ {0x04ab, {1|U, {0x04aa}}},
+ {0x04ad, {1|U, {0x04ac}}},
+ {0x04af, {1|U, {0x04ae}}},
+ {0x04b1, {1|U, {0x04b0}}},
+ {0x04b3, {1|U, {0x04b2}}},
+ {0x04b5, {1|U, {0x04b4}}},
+ {0x04b7, {1|U, {0x04b6}}},
+ {0x04b9, {1|U, {0x04b8}}},
+ {0x04bb, {1|U, {0x04ba}}},
+ {0x04bd, {1|U, {0x04bc}}},
+ {0x04bf, {1|U, {0x04be}}},
+ {0x04c2, {1|U, {0x04c1}}},
+ {0x04c4, {1|U, {0x04c3}}},
+ {0x04c6, {1|U, {0x04c5}}},
+ {0x04c8, {1|U, {0x04c7}}},
+ {0x04ca, {1|U, {0x04c9}}},
+ {0x04cc, {1|U, {0x04cb}}},
+ {0x04ce, {1|U, {0x04cd}}},
+ {0x04cf, {1|U, {0x04c0}}},
+ {0x04d1, {1|U, {0x04d0}}},
+ {0x04d3, {1|U, {0x04d2}}},
+ {0x04d5, {1|U, {0x04d4}}},
+ {0x04d7, {1|U, {0x04d6}}},
+ {0x04d9, {1|U, {0x04d8}}},
+ {0x04db, {1|U, {0x04da}}},
+ {0x04dd, {1|U, {0x04dc}}},
+ {0x04df, {1|U, {0x04de}}},
+ {0x04e1, {1|U, {0x04e0}}},
+ {0x04e3, {1|U, {0x04e2}}},
+ {0x04e5, {1|U, {0x04e4}}},
+ {0x04e7, {1|U, {0x04e6}}},
+ {0x04e9, {1|U, {0x04e8}}},
+ {0x04eb, {1|U, {0x04ea}}},
+ {0x04ed, {1|U, {0x04ec}}},
+ {0x04ef, {1|U, {0x04ee}}},
+ {0x04f1, {1|U, {0x04f0}}},
+ {0x04f3, {1|U, {0x04f2}}},
+ {0x04f5, {1|U, {0x04f4}}},
+ {0x04f7, {1|U, {0x04f6}}},
+ {0x04f9, {1|U, {0x04f8}}},
+ {0x04fb, {1|U, {0x04fa}}},
+ {0x04fd, {1|U, {0x04fc}}},
+ {0x04ff, {1|U, {0x04fe}}},
+ {0x0501, {1|U, {0x0500}}},
+ {0x0503, {1|U, {0x0502}}},
+ {0x0505, {1|U, {0x0504}}},
+ {0x0507, {1|U, {0x0506}}},
+ {0x0509, {1|U, {0x0508}}},
+ {0x050b, {1|U, {0x050a}}},
+ {0x050d, {1|U, {0x050c}}},
+ {0x050f, {1|U, {0x050e}}},
+ {0x0511, {1|U, {0x0510}}},
+ {0x0513, {1|U, {0x0512}}},
+ {0x0515, {1|U, {0x0514}}},
+ {0x0517, {1|U, {0x0516}}},
+ {0x0519, {1|U, {0x0518}}},
+ {0x051b, {1|U, {0x051a}}},
+ {0x051d, {1|U, {0x051c}}},
+ {0x051f, {1|U, {0x051e}}},
+ {0x0521, {1|U, {0x0520}}},
+ {0x0523, {1|U, {0x0522}}},
+ {0x0525, {1|U, {0x0524}}},
+ {0x0527, {1|U, {0x0526}}},
+ {0x0529, {1|U, {0x0528}}},
+ {0x052b, {1|U, {0x052a}}},
+ {0x052d, {1|U, {0x052c}}},
+ {0x052f, {1|U, {0x052e}}},
+ {0x0561, {1|U, {0x0531}}},
+ {0x0562, {1|U, {0x0532}}},
+ {0x0563, {1|U, {0x0533}}},
+ {0x0564, {1|U, {0x0534}}},
+ {0x0565, {1|U, {0x0535}}},
+ {0x0566, {1|U, {0x0536}}},
+ {0x0567, {1|U, {0x0537}}},
+ {0x0568, {1|U, {0x0538}}},
+ {0x0569, {1|U, {0x0539}}},
+ {0x056a, {1|U, {0x053a}}},
+ {0x056b, {1|U, {0x053b}}},
+ {0x056c, {1|U, {0x053c}}},
+ {0x056d, {1|U, {0x053d}}},
+ {0x056e, {1|U, {0x053e}}},
+ {0x056f, {1|U, {0x053f}}},
+ {0x0570, {1|U, {0x0540}}},
+ {0x0571, {1|U, {0x0541}}},
+ {0x0572, {1|U, {0x0542}}},
+ {0x0573, {1|U, {0x0543}}},
+ {0x0574, {1|U, {0x0544}}},
+ {0x0575, {1|U, {0x0545}}},
+ {0x0576, {1|U, {0x0546}}},
+ {0x0577, {1|U, {0x0547}}},
+ {0x0578, {1|U, {0x0548}}},
+ {0x0579, {1|U, {0x0549}}},
+ {0x057a, {1|U, {0x054a}}},
+ {0x057b, {1|U, {0x054b}}},
+ {0x057c, {1|U, {0x054c}}},
+ {0x057d, {1|U, {0x054d}}},
+ {0x057e, {1|U, {0x054e}}},
+ {0x057f, {1|U, {0x054f}}},
+ {0x0580, {1|U, {0x0550}}},
+ {0x0581, {1|U, {0x0551}}},
+ {0x0582, {1|U, {0x0552}}},
+ {0x0583, {1|U, {0x0553}}},
+ {0x0584, {1|U, {0x0554}}},
+ {0x0585, {1|U, {0x0555}}},
+ {0x0586, {1|U, {0x0556}}},
+ {0x10d0, {1|U|IT, {0x1c90}}},
+ {0x10d1, {1|U|IT, {0x1c91}}},
+ {0x10d2, {1|U|IT, {0x1c92}}},
+ {0x10d3, {1|U|IT, {0x1c93}}},
+ {0x10d4, {1|U|IT, {0x1c94}}},
+ {0x10d5, {1|U|IT, {0x1c95}}},
+ {0x10d6, {1|U|IT, {0x1c96}}},
+ {0x10d7, {1|U|IT, {0x1c97}}},
+ {0x10d8, {1|U|IT, {0x1c98}}},
+ {0x10d9, {1|U|IT, {0x1c99}}},
+ {0x10da, {1|U|IT, {0x1c9a}}},
+ {0x10db, {1|U|IT, {0x1c9b}}},
+ {0x10dc, {1|U|IT, {0x1c9c}}},
+ {0x10dd, {1|U|IT, {0x1c9d}}},
+ {0x10de, {1|U|IT, {0x1c9e}}},
+ {0x10df, {1|U|IT, {0x1c9f}}},
+ {0x10e0, {1|U|IT, {0x1ca0}}},
+ {0x10e1, {1|U|IT, {0x1ca1}}},
+ {0x10e2, {1|U|IT, {0x1ca2}}},
+ {0x10e3, {1|U|IT, {0x1ca3}}},
+ {0x10e4, {1|U|IT, {0x1ca4}}},
+ {0x10e5, {1|U|IT, {0x1ca5}}},
+ {0x10e6, {1|U|IT, {0x1ca6}}},
+ {0x10e7, {1|U|IT, {0x1ca7}}},
+ {0x10e8, {1|U|IT, {0x1ca8}}},
+ {0x10e9, {1|U|IT, {0x1ca9}}},
+ {0x10ea, {1|U|IT, {0x1caa}}},
+ {0x10eb, {1|U|IT, {0x1cab}}},
+ {0x10ec, {1|U|IT, {0x1cac}}},
+ {0x10ed, {1|U|IT, {0x1cad}}},
+ {0x10ee, {1|U|IT, {0x1cae}}},
+ {0x10ef, {1|U|IT, {0x1caf}}},
+ {0x10f0, {1|U|IT, {0x1cb0}}},
+ {0x10f1, {1|U|IT, {0x1cb1}}},
+ {0x10f2, {1|U|IT, {0x1cb2}}},
+ {0x10f3, {1|U|IT, {0x1cb3}}},
+ {0x10f4, {1|U|IT, {0x1cb4}}},
+ {0x10f5, {1|U|IT, {0x1cb5}}},
+ {0x10f6, {1|U|IT, {0x1cb6}}},
+ {0x10f7, {1|U|IT, {0x1cb7}}},
+ {0x10f8, {1|U|IT, {0x1cb8}}},
+ {0x10f9, {1|U|IT, {0x1cb9}}},
+ {0x10fa, {1|U|IT, {0x1cba}}},
+ {0x10fd, {1|U|IT, {0x1cbd}}},
+ {0x10fe, {1|U|IT, {0x1cbe}}},
+ {0x10ff, {1|U|IT, {0x1cbf}}},
+ {0x13a0, {1|D, {0xab70}}},
+ {0x13a1, {1|D, {0xab71}}},
+ {0x13a2, {1|D, {0xab72}}},
+ {0x13a3, {1|D, {0xab73}}},
+ {0x13a4, {1|D, {0xab74}}},
+ {0x13a5, {1|D, {0xab75}}},
+ {0x13a6, {1|D, {0xab76}}},
+ {0x13a7, {1|D, {0xab77}}},
+ {0x13a8, {1|D, {0xab78}}},
+ {0x13a9, {1|D, {0xab79}}},
+ {0x13aa, {1|D, {0xab7a}}},
+ {0x13ab, {1|D, {0xab7b}}},
+ {0x13ac, {1|D, {0xab7c}}},
+ {0x13ad, {1|D, {0xab7d}}},
+ {0x13ae, {1|D, {0xab7e}}},
+ {0x13af, {1|D, {0xab7f}}},
+ {0x13b0, {1|D, {0xab80}}},
+ {0x13b1, {1|D, {0xab81}}},
+ {0x13b2, {1|D, {0xab82}}},
+ {0x13b3, {1|D, {0xab83}}},
+ {0x13b4, {1|D, {0xab84}}},
+ {0x13b5, {1|D, {0xab85}}},
+ {0x13b6, {1|D, {0xab86}}},
+ {0x13b7, {1|D, {0xab87}}},
+ {0x13b8, {1|D, {0xab88}}},
+ {0x13b9, {1|D, {0xab89}}},
+ {0x13ba, {1|D, {0xab8a}}},
+ {0x13bb, {1|D, {0xab8b}}},
+ {0x13bc, {1|D, {0xab8c}}},
+ {0x13bd, {1|D, {0xab8d}}},
+ {0x13be, {1|D, {0xab8e}}},
+ {0x13bf, {1|D, {0xab8f}}},
+ {0x13c0, {1|D, {0xab90}}},
+ {0x13c1, {1|D, {0xab91}}},
+ {0x13c2, {1|D, {0xab92}}},
+ {0x13c3, {1|D, {0xab93}}},
+ {0x13c4, {1|D, {0xab94}}},
+ {0x13c5, {1|D, {0xab95}}},
+ {0x13c6, {1|D, {0xab96}}},
+ {0x13c7, {1|D, {0xab97}}},
+ {0x13c8, {1|D, {0xab98}}},
+ {0x13c9, {1|D, {0xab99}}},
+ {0x13ca, {1|D, {0xab9a}}},
+ {0x13cb, {1|D, {0xab9b}}},
+ {0x13cc, {1|D, {0xab9c}}},
+ {0x13cd, {1|D, {0xab9d}}},
+ {0x13ce, {1|D, {0xab9e}}},
+ {0x13cf, {1|D, {0xab9f}}},
+ {0x13d0, {1|D, {0xaba0}}},
+ {0x13d1, {1|D, {0xaba1}}},
+ {0x13d2, {1|D, {0xaba2}}},
+ {0x13d3, {1|D, {0xaba3}}},
+ {0x13d4, {1|D, {0xaba4}}},
+ {0x13d5, {1|D, {0xaba5}}},
+ {0x13d6, {1|D, {0xaba6}}},
+ {0x13d7, {1|D, {0xaba7}}},
+ {0x13d8, {1|D, {0xaba8}}},
+ {0x13d9, {1|D, {0xaba9}}},
+ {0x13da, {1|D, {0xabaa}}},
+ {0x13db, {1|D, {0xabab}}},
+ {0x13dc, {1|D, {0xabac}}},
+ {0x13dd, {1|D, {0xabad}}},
+ {0x13de, {1|D, {0xabae}}},
+ {0x13df, {1|D, {0xabaf}}},
+ {0x13e0, {1|D, {0xabb0}}},
+ {0x13e1, {1|D, {0xabb1}}},
+ {0x13e2, {1|D, {0xabb2}}},
+ {0x13e3, {1|D, {0xabb3}}},
+ {0x13e4, {1|D, {0xabb4}}},
+ {0x13e5, {1|D, {0xabb5}}},
+ {0x13e6, {1|D, {0xabb6}}},
+ {0x13e7, {1|D, {0xabb7}}},
+ {0x13e8, {1|D, {0xabb8}}},
+ {0x13e9, {1|D, {0xabb9}}},
+ {0x13ea, {1|D, {0xabba}}},
+ {0x13eb, {1|D, {0xabbb}}},
+ {0x13ec, {1|D, {0xabbc}}},
+ {0x13ed, {1|D, {0xabbd}}},
+ {0x13ee, {1|D, {0xabbe}}},
+ {0x13ef, {1|D, {0xabbf}}},
+ {0x13f0, {1|D, {0x13f8}}},
+ {0x13f1, {1|D, {0x13f9}}},
+ {0x13f2, {1|D, {0x13fa}}},
+ {0x13f3, {1|D, {0x13fb}}},
+ {0x13f4, {1|D, {0x13fc}}},
+ {0x13f5, {1|D, {0x13fd}}},
+ {0x1d79, {1|U, {0xa77d}}},
+ {0x1d7d, {1|U, {0x2c63}}},
+ {0x1d8e, {1|U, {0xa7c6}}},
+ {0x1e01, {1|U, {0x1e00}}},
+ {0x1e03, {1|U, {0x1e02}}},
+ {0x1e05, {1|U, {0x1e04}}},
+ {0x1e07, {1|U, {0x1e06}}},
+ {0x1e09, {1|U, {0x1e08}}},
+ {0x1e0b, {1|U, {0x1e0a}}},
+ {0x1e0d, {1|U, {0x1e0c}}},
+ {0x1e0f, {1|U, {0x1e0e}}},
+ {0x1e11, {1|U, {0x1e10}}},
+ {0x1e13, {1|U, {0x1e12}}},
+ {0x1e15, {1|U, {0x1e14}}},
+ {0x1e17, {1|U, {0x1e16}}},
+ {0x1e19, {1|U, {0x1e18}}},
+ {0x1e1b, {1|U, {0x1e1a}}},
+ {0x1e1d, {1|U, {0x1e1c}}},
+ {0x1e1f, {1|U, {0x1e1e}}},
+ {0x1e21, {1|U, {0x1e20}}},
+ {0x1e23, {1|U, {0x1e22}}},
+ {0x1e25, {1|U, {0x1e24}}},
+ {0x1e27, {1|U, {0x1e26}}},
+ {0x1e29, {1|U, {0x1e28}}},
+ {0x1e2b, {1|U, {0x1e2a}}},
+ {0x1e2d, {1|U, {0x1e2c}}},
+ {0x1e2f, {1|U, {0x1e2e}}},
+ {0x1e31, {1|U, {0x1e30}}},
+ {0x1e33, {1|U, {0x1e32}}},
+ {0x1e35, {1|U, {0x1e34}}},
+ {0x1e37, {1|U, {0x1e36}}},
+ {0x1e39, {1|U, {0x1e38}}},
+ {0x1e3b, {1|U, {0x1e3a}}},
+ {0x1e3d, {1|U, {0x1e3c}}},
+ {0x1e3f, {1|U, {0x1e3e}}},
+ {0x1e41, {1|U, {0x1e40}}},
+ {0x1e43, {1|U, {0x1e42}}},
+ {0x1e45, {1|U, {0x1e44}}},
+ {0x1e47, {1|U, {0x1e46}}},
+ {0x1e49, {1|U, {0x1e48}}},
+ {0x1e4b, {1|U, {0x1e4a}}},
+ {0x1e4d, {1|U, {0x1e4c}}},
+ {0x1e4f, {1|U, {0x1e4e}}},
+ {0x1e51, {1|U, {0x1e50}}},
+ {0x1e53, {1|U, {0x1e52}}},
+ {0x1e55, {1|U, {0x1e54}}},
+ {0x1e57, {1|U, {0x1e56}}},
+ {0x1e59, {1|U, {0x1e58}}},
+ {0x1e5b, {1|U, {0x1e5a}}},
+ {0x1e5d, {1|U, {0x1e5c}}},
+ {0x1e5f, {1|U, {0x1e5e}}},
+ {0x1e61, {2|U, {0x1e60, 0x1e9b}}},
+ {0x1e63, {1|U, {0x1e62}}},
+ {0x1e65, {1|U, {0x1e64}}},
+ {0x1e67, {1|U, {0x1e66}}},
+ {0x1e69, {1|U, {0x1e68}}},
+ {0x1e6b, {1|U, {0x1e6a}}},
+ {0x1e6d, {1|U, {0x1e6c}}},
+ {0x1e6f, {1|U, {0x1e6e}}},
+ {0x1e71, {1|U, {0x1e70}}},
+ {0x1e73, {1|U, {0x1e72}}},
+ {0x1e75, {1|U, {0x1e74}}},
+ {0x1e77, {1|U, {0x1e76}}},
+ {0x1e79, {1|U, {0x1e78}}},
+ {0x1e7b, {1|U, {0x1e7a}}},
+ {0x1e7d, {1|U, {0x1e7c}}},
+ {0x1e7f, {1|U, {0x1e7e}}},
+ {0x1e81, {1|U, {0x1e80}}},
+ {0x1e83, {1|U, {0x1e82}}},
+ {0x1e85, {1|U, {0x1e84}}},
+ {0x1e87, {1|U, {0x1e86}}},
+ {0x1e89, {1|U, {0x1e88}}},
+ {0x1e8b, {1|U, {0x1e8a}}},
+ {0x1e8d, {1|U, {0x1e8c}}},
+ {0x1e8f, {1|U, {0x1e8e}}},
+ {0x1e91, {1|U, {0x1e90}}},
+ {0x1e93, {1|U, {0x1e92}}},
+ {0x1e95, {1|U, {0x1e94}}},
+ {0x1ea1, {1|U, {0x1ea0}}},
+ {0x1ea3, {1|U, {0x1ea2}}},
+ {0x1ea5, {1|U, {0x1ea4}}},
+ {0x1ea7, {1|U, {0x1ea6}}},
+ {0x1ea9, {1|U, {0x1ea8}}},
+ {0x1eab, {1|U, {0x1eaa}}},
+ {0x1ead, {1|U, {0x1eac}}},
+ {0x1eaf, {1|U, {0x1eae}}},
+ {0x1eb1, {1|U, {0x1eb0}}},
+ {0x1eb3, {1|U, {0x1eb2}}},
+ {0x1eb5, {1|U, {0x1eb4}}},
+ {0x1eb7, {1|U, {0x1eb6}}},
+ {0x1eb9, {1|U, {0x1eb8}}},
+ {0x1ebb, {1|U, {0x1eba}}},
+ {0x1ebd, {1|U, {0x1ebc}}},
+ {0x1ebf, {1|U, {0x1ebe}}},
+ {0x1ec1, {1|U, {0x1ec0}}},
+ {0x1ec3, {1|U, {0x1ec2}}},
+ {0x1ec5, {1|U, {0x1ec4}}},
+ {0x1ec7, {1|U, {0x1ec6}}},
+ {0x1ec9, {1|U, {0x1ec8}}},
+ {0x1ecb, {1|U, {0x1eca}}},
+ {0x1ecd, {1|U, {0x1ecc}}},
+ {0x1ecf, {1|U, {0x1ece}}},
+ {0x1ed1, {1|U, {0x1ed0}}},
+ {0x1ed3, {1|U, {0x1ed2}}},
+ {0x1ed5, {1|U, {0x1ed4}}},
+ {0x1ed7, {1|U, {0x1ed6}}},
+ {0x1ed9, {1|U, {0x1ed8}}},
+ {0x1edb, {1|U, {0x1eda}}},
+ {0x1edd, {1|U, {0x1edc}}},
+ {0x1edf, {1|U, {0x1ede}}},
+ {0x1ee1, {1|U, {0x1ee0}}},
+ {0x1ee3, {1|U, {0x1ee2}}},
+ {0x1ee5, {1|U, {0x1ee4}}},
+ {0x1ee7, {1|U, {0x1ee6}}},
+ {0x1ee9, {1|U, {0x1ee8}}},
+ {0x1eeb, {1|U, {0x1eea}}},
+ {0x1eed, {1|U, {0x1eec}}},
+ {0x1eef, {1|U, {0x1eee}}},
+ {0x1ef1, {1|U, {0x1ef0}}},
+ {0x1ef3, {1|U, {0x1ef2}}},
+ {0x1ef5, {1|U, {0x1ef4}}},
+ {0x1ef7, {1|U, {0x1ef6}}},
+ {0x1ef9, {1|U, {0x1ef8}}},
+ {0x1efb, {1|U, {0x1efa}}},
+ {0x1efd, {1|U, {0x1efc}}},
+ {0x1eff, {1|U, {0x1efe}}},
+ {0x1f00, {1|U, {0x1f08}}},
+ {0x1f01, {1|U, {0x1f09}}},
+ {0x1f02, {1|U, {0x1f0a}}},
+ {0x1f03, {1|U, {0x1f0b}}},
+ {0x1f04, {1|U, {0x1f0c}}},
+ {0x1f05, {1|U, {0x1f0d}}},
+ {0x1f06, {1|U, {0x1f0e}}},
+ {0x1f07, {1|U, {0x1f0f}}},
+ {0x1f10, {1|U, {0x1f18}}},
+ {0x1f11, {1|U, {0x1f19}}},
+ {0x1f12, {1|U, {0x1f1a}}},
+ {0x1f13, {1|U, {0x1f1b}}},
+ {0x1f14, {1|U, {0x1f1c}}},
+ {0x1f15, {1|U, {0x1f1d}}},
+ {0x1f20, {1|U, {0x1f28}}},
+ {0x1f21, {1|U, {0x1f29}}},
+ {0x1f22, {1|U, {0x1f2a}}},
+ {0x1f23, {1|U, {0x1f2b}}},
+ {0x1f24, {1|U, {0x1f2c}}},
+ {0x1f25, {1|U, {0x1f2d}}},
+ {0x1f26, {1|U, {0x1f2e}}},
+ {0x1f27, {1|U, {0x1f2f}}},
+ {0x1f30, {1|U, {0x1f38}}},
+ {0x1f31, {1|U, {0x1f39}}},
+ {0x1f32, {1|U, {0x1f3a}}},
+ {0x1f33, {1|U, {0x1f3b}}},
+ {0x1f34, {1|U, {0x1f3c}}},
+ {0x1f35, {1|U, {0x1f3d}}},
+ {0x1f36, {1|U, {0x1f3e}}},
+ {0x1f37, {1|U, {0x1f3f}}},
+ {0x1f40, {1|U, {0x1f48}}},
+ {0x1f41, {1|U, {0x1f49}}},
+ {0x1f42, {1|U, {0x1f4a}}},
+ {0x1f43, {1|U, {0x1f4b}}},
+ {0x1f44, {1|U, {0x1f4c}}},
+ {0x1f45, {1|U, {0x1f4d}}},
+ {0x1f51, {1|U, {0x1f59}}},
+ {0x1f53, {1|U, {0x1f5b}}},
+ {0x1f55, {1|U, {0x1f5d}}},
+ {0x1f57, {1|U, {0x1f5f}}},
+ {0x1f60, {1|U, {0x1f68}}},
+ {0x1f61, {1|U, {0x1f69}}},
+ {0x1f62, {1|U, {0x1f6a}}},
+ {0x1f63, {1|U, {0x1f6b}}},
+ {0x1f64, {1|U, {0x1f6c}}},
+ {0x1f65, {1|U, {0x1f6d}}},
+ {0x1f66, {1|U, {0x1f6e}}},
+ {0x1f67, {1|U, {0x1f6f}}},
+ {0x1f70, {1|U, {0x1fba}}},
+ {0x1f71, {1|U, {0x1fbb}}},
+ {0x1f72, {1|U, {0x1fc8}}},
+ {0x1f73, {1|U, {0x1fc9}}},
+ {0x1f74, {1|U, {0x1fca}}},
+ {0x1f75, {1|U, {0x1fcb}}},
+ {0x1f76, {1|U, {0x1fda}}},
+ {0x1f77, {1|U, {0x1fdb}}},
+ {0x1f78, {1|U, {0x1ff8}}},
+ {0x1f79, {1|U, {0x1ff9}}},
+ {0x1f7a, {1|U, {0x1fea}}},
+ {0x1f7b, {1|U, {0x1feb}}},
+ {0x1f7c, {1|U, {0x1ffa}}},
+ {0x1f7d, {1|U, {0x1ffb}}},
+ {0x1fb0, {1|U, {0x1fb8}}},
+ {0x1fb1, {1|U, {0x1fb9}}},
+ {0x1fd0, {1|U, {0x1fd8}}},
+ {0x1fd1, {1|U, {0x1fd9}}},
+ {0x1fe0, {1|U, {0x1fe8}}},
+ {0x1fe1, {1|U, {0x1fe9}}},
+ {0x1fe5, {1|U, {0x1fec}}},
+ {0x214e, {1|U, {0x2132}}},
+ {0x2170, {1|U, {0x2160}}},
+ {0x2171, {1|U, {0x2161}}},
+ {0x2172, {1|U, {0x2162}}},
+ {0x2173, {1|U, {0x2163}}},
+ {0x2174, {1|U, {0x2164}}},
+ {0x2175, {1|U, {0x2165}}},
+ {0x2176, {1|U, {0x2166}}},
+ {0x2177, {1|U, {0x2167}}},
+ {0x2178, {1|U, {0x2168}}},
+ {0x2179, {1|U, {0x2169}}},
+ {0x217a, {1|U, {0x216a}}},
+ {0x217b, {1|U, {0x216b}}},
+ {0x217c, {1|U, {0x216c}}},
+ {0x217d, {1|U, {0x216d}}},
+ {0x217e, {1|U, {0x216e}}},
+ {0x217f, {1|U, {0x216f}}},
+ {0x2184, {1|U, {0x2183}}},
+ {0x24d0, {1|U, {0x24b6}}},
+ {0x24d1, {1|U, {0x24b7}}},
+ {0x24d2, {1|U, {0x24b8}}},
+ {0x24d3, {1|U, {0x24b9}}},
+ {0x24d4, {1|U, {0x24ba}}},
+ {0x24d5, {1|U, {0x24bb}}},
+ {0x24d6, {1|U, {0x24bc}}},
+ {0x24d7, {1|U, {0x24bd}}},
+ {0x24d8, {1|U, {0x24be}}},
+ {0x24d9, {1|U, {0x24bf}}},
+ {0x24da, {1|U, {0x24c0}}},
+ {0x24db, {1|U, {0x24c1}}},
+ {0x24dc, {1|U, {0x24c2}}},
+ {0x24dd, {1|U, {0x24c3}}},
+ {0x24de, {1|U, {0x24c4}}},
+ {0x24df, {1|U, {0x24c5}}},
+ {0x24e0, {1|U, {0x24c6}}},
+ {0x24e1, {1|U, {0x24c7}}},
+ {0x24e2, {1|U, {0x24c8}}},
+ {0x24e3, {1|U, {0x24c9}}},
+ {0x24e4, {1|U, {0x24ca}}},
+ {0x24e5, {1|U, {0x24cb}}},
+ {0x24e6, {1|U, {0x24cc}}},
+ {0x24e7, {1|U, {0x24cd}}},
+ {0x24e8, {1|U, {0x24ce}}},
+ {0x24e9, {1|U, {0x24cf}}},
+ {0x2c30, {1|U, {0x2c00}}},
+ {0x2c31, {1|U, {0x2c01}}},
+ {0x2c32, {1|U, {0x2c02}}},
+ {0x2c33, {1|U, {0x2c03}}},
+ {0x2c34, {1|U, {0x2c04}}},
+ {0x2c35, {1|U, {0x2c05}}},
+ {0x2c36, {1|U, {0x2c06}}},
+ {0x2c37, {1|U, {0x2c07}}},
+ {0x2c38, {1|U, {0x2c08}}},
+ {0x2c39, {1|U, {0x2c09}}},
+ {0x2c3a, {1|U, {0x2c0a}}},
+ {0x2c3b, {1|U, {0x2c0b}}},
+ {0x2c3c, {1|U, {0x2c0c}}},
+ {0x2c3d, {1|U, {0x2c0d}}},
+ {0x2c3e, {1|U, {0x2c0e}}},
+ {0x2c3f, {1|U, {0x2c0f}}},
+ {0x2c40, {1|U, {0x2c10}}},
+ {0x2c41, {1|U, {0x2c11}}},
+ {0x2c42, {1|U, {0x2c12}}},
+ {0x2c43, {1|U, {0x2c13}}},
+ {0x2c44, {1|U, {0x2c14}}},
+ {0x2c45, {1|U, {0x2c15}}},
+ {0x2c46, {1|U, {0x2c16}}},
+ {0x2c47, {1|U, {0x2c17}}},
+ {0x2c48, {1|U, {0x2c18}}},
+ {0x2c49, {1|U, {0x2c19}}},
+ {0x2c4a, {1|U, {0x2c1a}}},
+ {0x2c4b, {1|U, {0x2c1b}}},
+ {0x2c4c, {1|U, {0x2c1c}}},
+ {0x2c4d, {1|U, {0x2c1d}}},
+ {0x2c4e, {1|U, {0x2c1e}}},
+ {0x2c4f, {1|U, {0x2c1f}}},
+ {0x2c50, {1|U, {0x2c20}}},
+ {0x2c51, {1|U, {0x2c21}}},
+ {0x2c52, {1|U, {0x2c22}}},
+ {0x2c53, {1|U, {0x2c23}}},
+ {0x2c54, {1|U, {0x2c24}}},
+ {0x2c55, {1|U, {0x2c25}}},
+ {0x2c56, {1|U, {0x2c26}}},
+ {0x2c57, {1|U, {0x2c27}}},
+ {0x2c58, {1|U, {0x2c28}}},
+ {0x2c59, {1|U, {0x2c29}}},
+ {0x2c5a, {1|U, {0x2c2a}}},
+ {0x2c5b, {1|U, {0x2c2b}}},
+ {0x2c5c, {1|U, {0x2c2c}}},
+ {0x2c5d, {1|U, {0x2c2d}}},
+ {0x2c5e, {1|U, {0x2c2e}}},
+ {0x2c5f, {1|U, {0x2c2f}}},
+ {0x2c61, {1|U, {0x2c60}}},
+ {0x2c65, {1|U, {0x023a}}},
+ {0x2c66, {1|U, {0x023e}}},
+ {0x2c68, {1|U, {0x2c67}}},
+ {0x2c6a, {1|U, {0x2c69}}},
+ {0x2c6c, {1|U, {0x2c6b}}},
+ {0x2c73, {1|U, {0x2c72}}},
+ {0x2c76, {1|U, {0x2c75}}},
+ {0x2c81, {1|U, {0x2c80}}},
+ {0x2c83, {1|U, {0x2c82}}},
+ {0x2c85, {1|U, {0x2c84}}},
+ {0x2c87, {1|U, {0x2c86}}},
+ {0x2c89, {1|U, {0x2c88}}},
+ {0x2c8b, {1|U, {0x2c8a}}},
+ {0x2c8d, {1|U, {0x2c8c}}},
+ {0x2c8f, {1|U, {0x2c8e}}},
+ {0x2c91, {1|U, {0x2c90}}},
+ {0x2c93, {1|U, {0x2c92}}},
+ {0x2c95, {1|U, {0x2c94}}},
+ {0x2c97, {1|U, {0x2c96}}},
+ {0x2c99, {1|U, {0x2c98}}},
+ {0x2c9b, {1|U, {0x2c9a}}},
+ {0x2c9d, {1|U, {0x2c9c}}},
+ {0x2c9f, {1|U, {0x2c9e}}},
+ {0x2ca1, {1|U, {0x2ca0}}},
+ {0x2ca3, {1|U, {0x2ca2}}},
+ {0x2ca5, {1|U, {0x2ca4}}},
+ {0x2ca7, {1|U, {0x2ca6}}},
+ {0x2ca9, {1|U, {0x2ca8}}},
+ {0x2cab, {1|U, {0x2caa}}},
+ {0x2cad, {1|U, {0x2cac}}},
+ {0x2caf, {1|U, {0x2cae}}},
+ {0x2cb1, {1|U, {0x2cb0}}},
+ {0x2cb3, {1|U, {0x2cb2}}},
+ {0x2cb5, {1|U, {0x2cb4}}},
+ {0x2cb7, {1|U, {0x2cb6}}},
+ {0x2cb9, {1|U, {0x2cb8}}},
+ {0x2cbb, {1|U, {0x2cba}}},
+ {0x2cbd, {1|U, {0x2cbc}}},
+ {0x2cbf, {1|U, {0x2cbe}}},
+ {0x2cc1, {1|U, {0x2cc0}}},
+ {0x2cc3, {1|U, {0x2cc2}}},
+ {0x2cc5, {1|U, {0x2cc4}}},
+ {0x2cc7, {1|U, {0x2cc6}}},
+ {0x2cc9, {1|U, {0x2cc8}}},
+ {0x2ccb, {1|U, {0x2cca}}},
+ {0x2ccd, {1|U, {0x2ccc}}},
+ {0x2ccf, {1|U, {0x2cce}}},
+ {0x2cd1, {1|U, {0x2cd0}}},
+ {0x2cd3, {1|U, {0x2cd2}}},
+ {0x2cd5, {1|U, {0x2cd4}}},
+ {0x2cd7, {1|U, {0x2cd6}}},
+ {0x2cd9, {1|U, {0x2cd8}}},
+ {0x2cdb, {1|U, {0x2cda}}},
+ {0x2cdd, {1|U, {0x2cdc}}},
+ {0x2cdf, {1|U, {0x2cde}}},
+ {0x2ce1, {1|U, {0x2ce0}}},
+ {0x2ce3, {1|U, {0x2ce2}}},
+ {0x2cec, {1|U, {0x2ceb}}},
+ {0x2cee, {1|U, {0x2ced}}},
+ {0x2cf3, {1|U, {0x2cf2}}},
+ {0x2d00, {1|U, {0x10a0}}},
+ {0x2d01, {1|U, {0x10a1}}},
+ {0x2d02, {1|U, {0x10a2}}},
+ {0x2d03, {1|U, {0x10a3}}},
+ {0x2d04, {1|U, {0x10a4}}},
+ {0x2d05, {1|U, {0x10a5}}},
+ {0x2d06, {1|U, {0x10a6}}},
+ {0x2d07, {1|U, {0x10a7}}},
+ {0x2d08, {1|U, {0x10a8}}},
+ {0x2d09, {1|U, {0x10a9}}},
+ {0x2d0a, {1|U, {0x10aa}}},
+ {0x2d0b, {1|U, {0x10ab}}},
+ {0x2d0c, {1|U, {0x10ac}}},
+ {0x2d0d, {1|U, {0x10ad}}},
+ {0x2d0e, {1|U, {0x10ae}}},
+ {0x2d0f, {1|U, {0x10af}}},
+ {0x2d10, {1|U, {0x10b0}}},
+ {0x2d11, {1|U, {0x10b1}}},
+ {0x2d12, {1|U, {0x10b2}}},
+ {0x2d13, {1|U, {0x10b3}}},
+ {0x2d14, {1|U, {0x10b4}}},
+ {0x2d15, {1|U, {0x10b5}}},
+ {0x2d16, {1|U, {0x10b6}}},
+ {0x2d17, {1|U, {0x10b7}}},
+ {0x2d18, {1|U, {0x10b8}}},
+ {0x2d19, {1|U, {0x10b9}}},
+ {0x2d1a, {1|U, {0x10ba}}},
+ {0x2d1b, {1|U, {0x10bb}}},
+ {0x2d1c, {1|U, {0x10bc}}},
+ {0x2d1d, {1|U, {0x10bd}}},
+ {0x2d1e, {1|U, {0x10be}}},
+ {0x2d1f, {1|U, {0x10bf}}},
+ {0x2d20, {1|U, {0x10c0}}},
+ {0x2d21, {1|U, {0x10c1}}},
+ {0x2d22, {1|U, {0x10c2}}},
+ {0x2d23, {1|U, {0x10c3}}},
+ {0x2d24, {1|U, {0x10c4}}},
+ {0x2d25, {1|U, {0x10c5}}},
+ {0x2d27, {1|U, {0x10c7}}},
+ {0x2d2d, {1|U, {0x10cd}}},
+ {0xa641, {1|U, {0xa640}}},
+ {0xa643, {1|U, {0xa642}}},
+ {0xa645, {1|U, {0xa644}}},
+ {0xa647, {1|U, {0xa646}}},
+ {0xa649, {1|U, {0xa648}}},
+ {0xa64b, {2|U, {0xa64a, 0x1c88}}},
+ {0xa64d, {1|U, {0xa64c}}},
+ {0xa64f, {1|U, {0xa64e}}},
+ {0xa651, {1|U, {0xa650}}},
+ {0xa653, {1|U, {0xa652}}},
+ {0xa655, {1|U, {0xa654}}},
+ {0xa657, {1|U, {0xa656}}},
+ {0xa659, {1|U, {0xa658}}},
+ {0xa65b, {1|U, {0xa65a}}},
+ {0xa65d, {1|U, {0xa65c}}},
+ {0xa65f, {1|U, {0xa65e}}},
+ {0xa661, {1|U, {0xa660}}},
+ {0xa663, {1|U, {0xa662}}},
+ {0xa665, {1|U, {0xa664}}},
+ {0xa667, {1|U, {0xa666}}},
+ {0xa669, {1|U, {0xa668}}},
+ {0xa66b, {1|U, {0xa66a}}},
+ {0xa66d, {1|U, {0xa66c}}},
+ {0xa681, {1|U, {0xa680}}},
+ {0xa683, {1|U, {0xa682}}},
+ {0xa685, {1|U, {0xa684}}},
+ {0xa687, {1|U, {0xa686}}},
+ {0xa689, {1|U, {0xa688}}},
+ {0xa68b, {1|U, {0xa68a}}},
+ {0xa68d, {1|U, {0xa68c}}},
+ {0xa68f, {1|U, {0xa68e}}},
+ {0xa691, {1|U, {0xa690}}},
+ {0xa693, {1|U, {0xa692}}},
+ {0xa695, {1|U, {0xa694}}},
+ {0xa697, {1|U, {0xa696}}},
+ {0xa699, {1|U, {0xa698}}},
+ {0xa69b, {1|U, {0xa69a}}},
+ {0xa723, {1|U, {0xa722}}},
+ {0xa725, {1|U, {0xa724}}},
+ {0xa727, {1|U, {0xa726}}},
+ {0xa729, {1|U, {0xa728}}},
+ {0xa72b, {1|U, {0xa72a}}},
+ {0xa72d, {1|U, {0xa72c}}},
+ {0xa72f, {1|U, {0xa72e}}},
+ {0xa733, {1|U, {0xa732}}},
+ {0xa735, {1|U, {0xa734}}},
+ {0xa737, {1|U, {0xa736}}},
+ {0xa739, {1|U, {0xa738}}},
+ {0xa73b, {1|U, {0xa73a}}},
+ {0xa73d, {1|U, {0xa73c}}},
+ {0xa73f, {1|U, {0xa73e}}},
+ {0xa741, {1|U, {0xa740}}},
+ {0xa743, {1|U, {0xa742}}},
+ {0xa745, {1|U, {0xa744}}},
+ {0xa747, {1|U, {0xa746}}},
+ {0xa749, {1|U, {0xa748}}},
+ {0xa74b, {1|U, {0xa74a}}},
+ {0xa74d, {1|U, {0xa74c}}},
+ {0xa74f, {1|U, {0xa74e}}},
+ {0xa751, {1|U, {0xa750}}},
+ {0xa753, {1|U, {0xa752}}},
+ {0xa755, {1|U, {0xa754}}},
+ {0xa757, {1|U, {0xa756}}},
+ {0xa759, {1|U, {0xa758}}},
+ {0xa75b, {1|U, {0xa75a}}},
+ {0xa75d, {1|U, {0xa75c}}},
+ {0xa75f, {1|U, {0xa75e}}},
+ {0xa761, {1|U, {0xa760}}},
+ {0xa763, {1|U, {0xa762}}},
+ {0xa765, {1|U, {0xa764}}},
+ {0xa767, {1|U, {0xa766}}},
+ {0xa769, {1|U, {0xa768}}},
+ {0xa76b, {1|U, {0xa76a}}},
+ {0xa76d, {1|U, {0xa76c}}},
+ {0xa76f, {1|U, {0xa76e}}},
+ {0xa77a, {1|U, {0xa779}}},
+ {0xa77c, {1|U, {0xa77b}}},
+ {0xa77f, {1|U, {0xa77e}}},
+ {0xa781, {1|U, {0xa780}}},
+ {0xa783, {1|U, {0xa782}}},
+ {0xa785, {1|U, {0xa784}}},
+ {0xa787, {1|U, {0xa786}}},
+ {0xa78c, {1|U, {0xa78b}}},
+ {0xa791, {1|U, {0xa790}}},
+ {0xa793, {1|U, {0xa792}}},
+ {0xa794, {1|U, {0xa7c4}}},
+ {0xa797, {1|U, {0xa796}}},
+ {0xa799, {1|U, {0xa798}}},
+ {0xa79b, {1|U, {0xa79a}}},
+ {0xa79d, {1|U, {0xa79c}}},
+ {0xa79f, {1|U, {0xa79e}}},
+ {0xa7a1, {1|U, {0xa7a0}}},
+ {0xa7a3, {1|U, {0xa7a2}}},
+ {0xa7a5, {1|U, {0xa7a4}}},
+ {0xa7a7, {1|U, {0xa7a6}}},
+ {0xa7a9, {1|U, {0xa7a8}}},
+ {0xa7b5, {1|U, {0xa7b4}}},
+ {0xa7b7, {1|U, {0xa7b6}}},
+ {0xa7b9, {1|U, {0xa7b8}}},
+ {0xa7bb, {1|U, {0xa7ba}}},
+ {0xa7bd, {1|U, {0xa7bc}}},
+ {0xa7bf, {1|U, {0xa7be}}},
+ {0xa7c1, {1|U, {0xa7c0}}},
+ {0xa7c3, {1|U, {0xa7c2}}},
+ {0xa7c8, {1|U, {0xa7c7}}},
+ {0xa7ca, {1|U, {0xa7c9}}},
+ {0xa7d1, {1|U, {0xa7d0}}},
+ {0xa7d7, {1|U, {0xa7d6}}},
+ {0xa7d9, {1|U, {0xa7d8}}},
+ {0xa7f6, {1|U, {0xa7f5}}},
+ {0xab53, {1|U, {0xa7b3}}},
+ {0xff41, {1|U, {0xff21}}},
+ {0xff42, {1|U, {0xff22}}},
+ {0xff43, {1|U, {0xff23}}},
+ {0xff44, {1|U, {0xff24}}},
+ {0xff45, {1|U, {0xff25}}},
+ {0xff46, {1|U, {0xff26}}},
+ {0xff47, {1|U, {0xff27}}},
+ {0xff48, {1|U, {0xff28}}},
+ {0xff49, {1|U, {0xff29}}},
+ {0xff4a, {1|U, {0xff2a}}},
+ {0xff4b, {1|U, {0xff2b}}},
+ {0xff4c, {1|U, {0xff2c}}},
+ {0xff4d, {1|U, {0xff2d}}},
+ {0xff4e, {1|U, {0xff2e}}},
+ {0xff4f, {1|U, {0xff2f}}},
+ {0xff50, {1|U, {0xff30}}},
+ {0xff51, {1|U, {0xff31}}},
+ {0xff52, {1|U, {0xff32}}},
+ {0xff53, {1|U, {0xff33}}},
+ {0xff54, {1|U, {0xff34}}},
+ {0xff55, {1|U, {0xff35}}},
+ {0xff56, {1|U, {0xff36}}},
+ {0xff57, {1|U, {0xff37}}},
+ {0xff58, {1|U, {0xff38}}},
+ {0xff59, {1|U, {0xff39}}},
+ {0xff5a, {1|U, {0xff3a}}},
+ {0x10428, {1|U, {0x10400}}},
+ {0x10429, {1|U, {0x10401}}},
+ {0x1042a, {1|U, {0x10402}}},
+ {0x1042b, {1|U, {0x10403}}},
+ {0x1042c, {1|U, {0x10404}}},
+ {0x1042d, {1|U, {0x10405}}},
+ {0x1042e, {1|U, {0x10406}}},
+ {0x1042f, {1|U, {0x10407}}},
+ {0x10430, {1|U, {0x10408}}},
+ {0x10431, {1|U, {0x10409}}},
+ {0x10432, {1|U, {0x1040a}}},
+ {0x10433, {1|U, {0x1040b}}},
+ {0x10434, {1|U, {0x1040c}}},
+ {0x10435, {1|U, {0x1040d}}},
+ {0x10436, {1|U, {0x1040e}}},
+ {0x10437, {1|U, {0x1040f}}},
+ {0x10438, {1|U, {0x10410}}},
+ {0x10439, {1|U, {0x10411}}},
+ {0x1043a, {1|U, {0x10412}}},
+ {0x1043b, {1|U, {0x10413}}},
+ {0x1043c, {1|U, {0x10414}}},
+ {0x1043d, {1|U, {0x10415}}},
+ {0x1043e, {1|U, {0x10416}}},
+ {0x1043f, {1|U, {0x10417}}},
+ {0x10440, {1|U, {0x10418}}},
+ {0x10441, {1|U, {0x10419}}},
+ {0x10442, {1|U, {0x1041a}}},
+ {0x10443, {1|U, {0x1041b}}},
+ {0x10444, {1|U, {0x1041c}}},
+ {0x10445, {1|U, {0x1041d}}},
+ {0x10446, {1|U, {0x1041e}}},
+ {0x10447, {1|U, {0x1041f}}},
+ {0x10448, {1|U, {0x10420}}},
+ {0x10449, {1|U, {0x10421}}},
+ {0x1044a, {1|U, {0x10422}}},
+ {0x1044b, {1|U, {0x10423}}},
+ {0x1044c, {1|U, {0x10424}}},
+ {0x1044d, {1|U, {0x10425}}},
+ {0x1044e, {1|U, {0x10426}}},
+ {0x1044f, {1|U, {0x10427}}},
+ {0x104d8, {1|U, {0x104b0}}},
+ {0x104d9, {1|U, {0x104b1}}},
+ {0x104da, {1|U, {0x104b2}}},
+ {0x104db, {1|U, {0x104b3}}},
+ {0x104dc, {1|U, {0x104b4}}},
+ {0x104dd, {1|U, {0x104b5}}},
+ {0x104de, {1|U, {0x104b6}}},
+ {0x104df, {1|U, {0x104b7}}},
+ {0x104e0, {1|U, {0x104b8}}},
+ {0x104e1, {1|U, {0x104b9}}},
+ {0x104e2, {1|U, {0x104ba}}},
+ {0x104e3, {1|U, {0x104bb}}},
+ {0x104e4, {1|U, {0x104bc}}},
+ {0x104e5, {1|U, {0x104bd}}},
+ {0x104e6, {1|U, {0x104be}}},
+ {0x104e7, {1|U, {0x104bf}}},
+ {0x104e8, {1|U, {0x104c0}}},
+ {0x104e9, {1|U, {0x104c1}}},
+ {0x104ea, {1|U, {0x104c2}}},
+ {0x104eb, {1|U, {0x104c3}}},
+ {0x104ec, {1|U, {0x104c4}}},
+ {0x104ed, {1|U, {0x104c5}}},
+ {0x104ee, {1|U, {0x104c6}}},
+ {0x104ef, {1|U, {0x104c7}}},
+ {0x104f0, {1|U, {0x104c8}}},
+ {0x104f1, {1|U, {0x104c9}}},
+ {0x104f2, {1|U, {0x104ca}}},
+ {0x104f3, {1|U, {0x104cb}}},
+ {0x104f4, {1|U, {0x104cc}}},
+ {0x104f5, {1|U, {0x104cd}}},
+ {0x104f6, {1|U, {0x104ce}}},
+ {0x104f7, {1|U, {0x104cf}}},
+ {0x104f8, {1|U, {0x104d0}}},
+ {0x104f9, {1|U, {0x104d1}}},
+ {0x104fa, {1|U, {0x104d2}}},
+ {0x104fb, {1|U, {0x104d3}}},
+ {0x10597, {1|U, {0x10570}}},
+ {0x10598, {1|U, {0x10571}}},
+ {0x10599, {1|U, {0x10572}}},
+ {0x1059a, {1|U, {0x10573}}},
+ {0x1059b, {1|U, {0x10574}}},
+ {0x1059c, {1|U, {0x10575}}},
+ {0x1059d, {1|U, {0x10576}}},
+ {0x1059e, {1|U, {0x10577}}},
+ {0x1059f, {1|U, {0x10578}}},
+ {0x105a0, {1|U, {0x10579}}},
+ {0x105a1, {1|U, {0x1057a}}},
+ {0x105a3, {1|U, {0x1057c}}},
+ {0x105a4, {1|U, {0x1057d}}},
+ {0x105a5, {1|U, {0x1057e}}},
+ {0x105a6, {1|U, {0x1057f}}},
+ {0x105a7, {1|U, {0x10580}}},
+ {0x105a8, {1|U, {0x10581}}},
+ {0x105a9, {1|U, {0x10582}}},
+ {0x105aa, {1|U, {0x10583}}},
+ {0x105ab, {1|U, {0x10584}}},
+ {0x105ac, {1|U, {0x10585}}},
+ {0x105ad, {1|U, {0x10586}}},
+ {0x105ae, {1|U, {0x10587}}},
+ {0x105af, {1|U, {0x10588}}},
+ {0x105b0, {1|U, {0x10589}}},
+ {0x105b1, {1|U, {0x1058a}}},
+ {0x105b3, {1|U, {0x1058c}}},
+ {0x105b4, {1|U, {0x1058d}}},
+ {0x105b5, {1|U, {0x1058e}}},
+ {0x105b6, {1|U, {0x1058f}}},
+ {0x105b7, {1|U, {0x10590}}},
+ {0x105b8, {1|U, {0x10591}}},
+ {0x105b9, {1|U, {0x10592}}},
+ {0x105bb, {1|U, {0x10594}}},
+ {0x105bc, {1|U, {0x10595}}},
+ {0x10cc0, {1|U, {0x10c80}}},
+ {0x10cc1, {1|U, {0x10c81}}},
+ {0x10cc2, {1|U, {0x10c82}}},
+ {0x10cc3, {1|U, {0x10c83}}},
+ {0x10cc4, {1|U, {0x10c84}}},
+ {0x10cc5, {1|U, {0x10c85}}},
+ {0x10cc6, {1|U, {0x10c86}}},
+ {0x10cc7, {1|U, {0x10c87}}},
+ {0x10cc8, {1|U, {0x10c88}}},
+ {0x10cc9, {1|U, {0x10c89}}},
+ {0x10cca, {1|U, {0x10c8a}}},
+ {0x10ccb, {1|U, {0x10c8b}}},
+ {0x10ccc, {1|U, {0x10c8c}}},
+ {0x10ccd, {1|U, {0x10c8d}}},
+ {0x10cce, {1|U, {0x10c8e}}},
+ {0x10ccf, {1|U, {0x10c8f}}},
+ {0x10cd0, {1|U, {0x10c90}}},
+ {0x10cd1, {1|U, {0x10c91}}},
+ {0x10cd2, {1|U, {0x10c92}}},
+ {0x10cd3, {1|U, {0x10c93}}},
+ {0x10cd4, {1|U, {0x10c94}}},
+ {0x10cd5, {1|U, {0x10c95}}},
+ {0x10cd6, {1|U, {0x10c96}}},
+ {0x10cd7, {1|U, {0x10c97}}},
+ {0x10cd8, {1|U, {0x10c98}}},
+ {0x10cd9, {1|U, {0x10c99}}},
+ {0x10cda, {1|U, {0x10c9a}}},
+ {0x10cdb, {1|U, {0x10c9b}}},
+ {0x10cdc, {1|U, {0x10c9c}}},
+ {0x10cdd, {1|U, {0x10c9d}}},
+ {0x10cde, {1|U, {0x10c9e}}},
+ {0x10cdf, {1|U, {0x10c9f}}},
+ {0x10ce0, {1|U, {0x10ca0}}},
+ {0x10ce1, {1|U, {0x10ca1}}},
+ {0x10ce2, {1|U, {0x10ca2}}},
+ {0x10ce3, {1|U, {0x10ca3}}},
+ {0x10ce4, {1|U, {0x10ca4}}},
+ {0x10ce5, {1|U, {0x10ca5}}},
+ {0x10ce6, {1|U, {0x10ca6}}},
+ {0x10ce7, {1|U, {0x10ca7}}},
+ {0x10ce8, {1|U, {0x10ca8}}},
+ {0x10ce9, {1|U, {0x10ca9}}},
+ {0x10cea, {1|U, {0x10caa}}},
+ {0x10ceb, {1|U, {0x10cab}}},
+ {0x10cec, {1|U, {0x10cac}}},
+ {0x10ced, {1|U, {0x10cad}}},
+ {0x10cee, {1|U, {0x10cae}}},
+ {0x10cef, {1|U, {0x10caf}}},
+ {0x10cf0, {1|U, {0x10cb0}}},
+ {0x10cf1, {1|U, {0x10cb1}}},
+ {0x10cf2, {1|U, {0x10cb2}}},
+ {0x118c0, {1|U, {0x118a0}}},
+ {0x118c1, {1|U, {0x118a1}}},
+ {0x118c2, {1|U, {0x118a2}}},
+ {0x118c3, {1|U, {0x118a3}}},
+ {0x118c4, {1|U, {0x118a4}}},
+ {0x118c5, {1|U, {0x118a5}}},
+ {0x118c6, {1|U, {0x118a6}}},
+ {0x118c7, {1|U, {0x118a7}}},
+ {0x118c8, {1|U, {0x118a8}}},
+ {0x118c9, {1|U, {0x118a9}}},
+ {0x118ca, {1|U, {0x118aa}}},
+ {0x118cb, {1|U, {0x118ab}}},
+ {0x118cc, {1|U, {0x118ac}}},
+ {0x118cd, {1|U, {0x118ad}}},
+ {0x118ce, {1|U, {0x118ae}}},
+ {0x118cf, {1|U, {0x118af}}},
+ {0x118d0, {1|U, {0x118b0}}},
+ {0x118d1, {1|U, {0x118b1}}},
+ {0x118d2, {1|U, {0x118b2}}},
+ {0x118d3, {1|U, {0x118b3}}},
+ {0x118d4, {1|U, {0x118b4}}},
+ {0x118d5, {1|U, {0x118b5}}},
+ {0x118d6, {1|U, {0x118b6}}},
+ {0x118d7, {1|U, {0x118b7}}},
+ {0x118d8, {1|U, {0x118b8}}},
+ {0x118d9, {1|U, {0x118b9}}},
+ {0x118da, {1|U, {0x118ba}}},
+ {0x118db, {1|U, {0x118bb}}},
+ {0x118dc, {1|U, {0x118bc}}},
+ {0x118dd, {1|U, {0x118bd}}},
+ {0x118de, {1|U, {0x118be}}},
+ {0x118df, {1|U, {0x118bf}}},
+ {0x16e60, {1|U, {0x16e40}}},
+ {0x16e61, {1|U, {0x16e41}}},
+ {0x16e62, {1|U, {0x16e42}}},
+ {0x16e63, {1|U, {0x16e43}}},
+ {0x16e64, {1|U, {0x16e44}}},
+ {0x16e65, {1|U, {0x16e45}}},
+ {0x16e66, {1|U, {0x16e46}}},
+ {0x16e67, {1|U, {0x16e47}}},
+ {0x16e68, {1|U, {0x16e48}}},
+ {0x16e69, {1|U, {0x16e49}}},
+ {0x16e6a, {1|U, {0x16e4a}}},
+ {0x16e6b, {1|U, {0x16e4b}}},
+ {0x16e6c, {1|U, {0x16e4c}}},
+ {0x16e6d, {1|U, {0x16e4d}}},
+ {0x16e6e, {1|U, {0x16e4e}}},
+ {0x16e6f, {1|U, {0x16e4f}}},
+ {0x16e70, {1|U, {0x16e50}}},
+ {0x16e71, {1|U, {0x16e51}}},
+ {0x16e72, {1|U, {0x16e52}}},
+ {0x16e73, {1|U, {0x16e53}}},
+ {0x16e74, {1|U, {0x16e54}}},
+ {0x16e75, {1|U, {0x16e55}}},
+ {0x16e76, {1|U, {0x16e56}}},
+ {0x16e77, {1|U, {0x16e57}}},
+ {0x16e78, {1|U, {0x16e58}}},
+ {0x16e79, {1|U, {0x16e59}}},
+ {0x16e7a, {1|U, {0x16e5a}}},
+ {0x16e7b, {1|U, {0x16e5b}}},
+ {0x16e7c, {1|U, {0x16e5c}}},
+ {0x16e7d, {1|U, {0x16e5d}}},
+ {0x16e7e, {1|U, {0x16e5e}}},
+ {0x16e7f, {1|U, {0x16e5f}}},
+ {0x1e922, {1|U, {0x1e900}}},
+ {0x1e923, {1|U, {0x1e901}}},
+ {0x1e924, {1|U, {0x1e902}}},
+ {0x1e925, {1|U, {0x1e903}}},
+ {0x1e926, {1|U, {0x1e904}}},
+ {0x1e927, {1|U, {0x1e905}}},
+ {0x1e928, {1|U, {0x1e906}}},
+ {0x1e929, {1|U, {0x1e907}}},
+ {0x1e92a, {1|U, {0x1e908}}},
+ {0x1e92b, {1|U, {0x1e909}}},
+ {0x1e92c, {1|U, {0x1e90a}}},
+ {0x1e92d, {1|U, {0x1e90b}}},
+ {0x1e92e, {1|U, {0x1e90c}}},
+ {0x1e92f, {1|U, {0x1e90d}}},
+ {0x1e930, {1|U, {0x1e90e}}},
+ {0x1e931, {1|U, {0x1e90f}}},
+ {0x1e932, {1|U, {0x1e910}}},
+ {0x1e933, {1|U, {0x1e911}}},
+ {0x1e934, {1|U, {0x1e912}}},
+ {0x1e935, {1|U, {0x1e913}}},
+ {0x1e936, {1|U, {0x1e914}}},
+ {0x1e937, {1|U, {0x1e915}}},
+ {0x1e938, {1|U, {0x1e916}}},
+ {0x1e939, {1|U, {0x1e917}}},
+ {0x1e93a, {1|U, {0x1e918}}},
+ {0x1e93b, {1|U, {0x1e919}}},
+ {0x1e93c, {1|U, {0x1e91a}}},
+ {0x1e93d, {1|U, {0x1e91b}}},
+ {0x1e93e, {1|U, {0x1e91c}}},
+ {0x1e93f, {1|U, {0x1e91d}}},
+ {0x1e940, {1|U, {0x1e91e}}},
+ {0x1e941, {1|U, {0x1e91f}}},
+ {0x1e942, {1|U, {0x1e920}}},
+ {0x1e943, {1|U, {0x1e921}}},
+#define CaseUnfold_11_Locale (*(CaseUnfold_11_Type (*)[1])(CaseUnfold_11_Table+1395))
+ {0x0069, {1|U, {0x0049}}},
+};
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_11_hash -N onigenc_unicode_CaseUnfold_11_lookup -n */
+
+/* maximum key range = 2771, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+/*ARGSUSED*/
+static unsigned int
+onigenc_unicode_CaseUnfold_11_hash(const OnigCodePoint code)
+{
+ static const unsigned short asso_values[] =
+ {
+ 1, 2774, 2, 2, 4, 421, 9, 371, 231, 463,
+ 37, 20, 2, 3, 419, 408, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 112,
+ 2774, 2774, 2774, 2774, 2774, 2774, 2774, 120, 2774, 2774,
+ 2774, 2774, 2774, 1, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 2774, 355, 2774, 2774, 2774, 2774, 2774, 2774,
+ 2774, 2774, 10, 9, 7, 8, 244, 689, 226, 993,
+ 561, 710, 104, 1429, 36, 1190, 28, 15, 114, 1768,
+ 241, 1003, 87, 285, 26, 1399, 78, 1360, 7, 1455,
+ 90, 1076, 113, 10, 724, 1460, 167, 1727, 155, 1040,
+ 67, 754, 66, 705, 246, 886, 331, 1140, 430, 1251,
+ 864, 768, 643, 1064, 1591, 865, 834, 720, 1700, 671,
+ 1581, 657, 1794, 842, 1782, 1050, 1537, 1024, 1760, 814,
+ 975, 440, 1187, 407, 1440, 951, 1384, 909, 1320, 555,
+ 1567, 541, 1723, 525, 383, 501, 1179, 250, 1596, 342,
+ 1575, 352, 1501, 194, 1559, 70, 1512, 85, 1509, 129,
+ 467, 100, 1413, 1, 1485, 25, 1351, 35, 1088, 55,
+ 1262, 45, 1277, 160, 1245, 317, 118, 220, 1300, 596,
+ 1100, 373, 1632, 617, 1337, 1236, 1500, 1152, 148, 793,
+ 1538, 979, 385, 1228
+ };
+ return asso_values[bits_of(code, 2)+66] + asso_values[bits_of(code, 1)+4] + asso_values[bits_of(code, 0)];
+}
+
+static const CodePointList3 *
+onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code)
+{
+ enum
+ {
+ MIN_CODE_VALUE = 0x61,
+ MAX_CODE_VALUE = 0x1e943,
+ TOTAL_KEYWORDS = 1396,
+ MIN_WORD_LENGTH = 3,
+ MAX_WORD_LENGTH = 3,
+ MIN_HASH_VALUE = 3,
+ MAX_HASH_VALUE = 2773
+ };
+
+ static const short wordlist[] =
+ {
+ -1, -1, -1,
+ /*0x13e1*/ 589,
+ /*0x0461*/ 340,
+ /*0x04e1*/ 400,
+ /*0x0061*/ 0,
+ -1,
+ /*0x104e1*/ 1184,
+ /*0x1e61*/ 661,
+ /*0x1ee1*/ 720,
+ /*0x0161*/ 102,
+ /*0x2ce1*/ 953,
+ -1,
+ /*0x049b*/ 365,
+ -1, -1,
+ /*0x24e1*/ 840,
+ /*0x1e1b*/ 626,
+ /*0x048b*/ 357,
+ /*0x011b*/ 69,
+ /*0x2c9b*/ 918,
+ /*0x03e1*/ 280,
+ /*0x1e0b*/ 618,
+ /*0x1e8b*/ 682,
+ /*0x010b*/ 61,
+ /*0x2c8b*/ 910,
+ /*0x13e3*/ 591,
+ /*0x0463*/ 341,
+ /*0x04e3*/ 401,
+ /*0x0063*/ 2,
+ -1,
+ /*0x104e3*/ 1186,
+ /*0x1e63*/ 662,
+ /*0x1ee3*/ 721,
+ /*0x0163*/ 103,
+ /*0x2ce3*/ 954,
+ /*0x13e5*/ 593,
+ /*0x0465*/ 342,
+ /*0x04e5*/ 402,
+ /*0x0065*/ 4,
+ /*0x24e3*/ 842,
+ /*0x104e5*/ 1188,
+ /*0x1e65*/ 663,
+ /*0x1ee5*/ 722,
+ /*0x0165*/ 104,
+ /*0x03e3*/ 281,
+ /*0x13e9*/ 597,
+ /*0x0469*/ 344,
+ /*0x04e9*/ 404,
+ /*0x0069*/ 1395,
+ /*0x24e5*/ 844,
+ /*0x104e9*/ 1192,
+ /*0x1e69*/ 665,
+ /*0x1ee9*/ 724,
+ /*0x0169*/ 106,
+ /*0x03e5*/ 282,
+ /*0x13e7*/ 595,
+ /*0x0467*/ 343,
+ /*0x04e7*/ 403,
+ /*0x0067*/ 6,
+ /*0x24e9*/ 848,
+ /*0x104e7*/ 1190,
+ /*0x1e67*/ 664,
+ /*0x1ee7*/ 723,
+ /*0x0167*/ 105,
+ /*0x03e9*/ 284,
+ -1,
+ /*0x13a4*/ 528,
+ /*0x13a2*/ 526,
+ -1,
+ /*0x24e7*/ 846,
+ /*0x13d9*/ 581,
+ /*0x0459*/ 333,
+ /*0x04d9*/ 396,
+ -1,
+ /*0x03e7*/ 283,
+ /*0x104d9*/ 1176,
+ /*0x1e59*/ 657,
+ /*0x1ed9*/ 716,
+ /*0x0159*/ 98,
+ /*0x2cd9*/ 949,
+ -1, -1, -1, -1,
+ /*0x24d9*/ 832,
+ /*0x13db*/ 583,
+ /*0x045b*/ 335,
+ /*0x04db*/ 397,
+ /*0xa761*/ 1065,
+ /*0x03d9*/ 276,
+ /*0x104db*/ 1178,
+ /*0x1e5b*/ 658,
+ /*0x1edb*/ 717,
+ /*0x015b*/ 99,
+ /*0x2cdb*/ 950,
+ -1, -1, -1, -1,
+ /*0x24db*/ 834,
+ /*0x13df*/ 587,
+ /*0x045f*/ 339,
+ /*0x04df*/ 399,
+ -1,
+ /*0x03db*/ 277,
+ /*0x104df*/ 1182,
+ /*0x1e5f*/ 660,
+ /*0x1edf*/ 719,
+ /*0x015f*/ 101,
+ /*0x2cdf*/ 952,
+ -1, -1,
+ /*0xa763*/ 1066,
+ /*0x2c61*/ 897,
+ /*0x24df*/ 838,
+ /*0x10ce1*/ 1279,
+ -1, -1,
+ /*0x13ee*/ 602,
+ /*0x03df*/ 279,
+ /*0x10e1*/ 495,
+ /*0x006e*/ 12,
+ /*0xa765*/ 1067,
+ /*0x104ee*/ 1197,
+ -1, -1, -1,
+ /*0x2cee*/ 956,
+ -1,
+ /*0x13dd*/ 585,
+ /*0x045d*/ 337,
+ /*0x04dd*/ 398,
+ /*0xa769*/ 1069,
+ -1,
+ /*0x104dd*/ 1180,
+ /*0x1e5d*/ 659,
+ /*0x1edd*/ 718,
+ /*0x015d*/ 100,
+ /*0x2cdd*/ 951,
+ /*0x10ce3*/ 1281,
+ -1, -1,
+ /*0xa767*/ 1068,
+ /*0x24dd*/ 836,
+ /*0x10e3*/ 497,
+ -1, -1,
+ /*0x2c65*/ 898,
+ /*0x03dd*/ 278,
+ /*0x10ce5*/ 1283,
+ -1,
+ /*0x007a*/ 24,
+ -1,
+ /*0x104fa*/ 1209,
+ /*0x10e5*/ 499,
+ /*0x13a0*/ 524,
+ /*0x017a*/ 114,
+ /*0xa759*/ 1061,
+ -1,
+ /*0x10ce9*/ 1287,
+ /*0x13eb*/ 599,
+ /*0x046b*/ 345,
+ /*0x04eb*/ 405,
+ /*0x006b*/ 9,
+ /*0x10e9*/ 503,
+ /*0x104eb*/ 1194,
+ /*0x1e6b*/ 666,
+ /*0x1eeb*/ 725,
+ /*0x016b*/ 107,
+ /*0x10ce7*/ 1285,
+ -1, -1,
+ /*0xa75b*/ 1062,
+ -1,
+ /*0x10e7*/ 501,
+ -1, -1, -1, -1,
+ /*0x03eb*/ 285,
+ -1, -1,
+ /*0x2c59*/ 890,
+ -1,
+ /*0x10cd9*/ 1271,
+ -1, -1,
+ /*0xa75f*/ 1064,
+ -1,
+ /*0x10d9*/ 487,
+ -1, -1, -1, -1,
+ /*0x13d7*/ 579,
+ /*0x0457*/ 331,
+ /*0x04d7*/ 395,
+ /*0x2c5b*/ 892,
+ -1,
+ /*0x10cdb*/ 1273,
+ /*0x1e57*/ 656,
+ /*0x1ed7*/ 715,
+ /*0x0157*/ 97,
+ /*0x2cd7*/ 948,
+ /*0x10db*/ 489,
+ -1, -1, -1,
+ /*0x24d7*/ 830,
+ -1, -1, -1,
+ /*0x2c5f*/ 896,
+ /*0x03d7*/ 275,
+ /*0x10cdf*/ 1277,
+ -1,
+ /*0xa75d*/ 1063,
+ -1, -1,
+ /*0x10df*/ 493,
+ /*0x13ef*/ 603,
+ /*0x046f*/ 347,
+ /*0x04ef*/ 407,
+ /*0x006f*/ 13,
+ -1,
+ /*0x104ef*/ 1198,
+ /*0x1e6f*/ 668,
+ /*0x1eef*/ 727,
+ /*0x016f*/ 109,
+ -1, -1,
+ /*0x0261*/ 210,
+ /*0x10cee*/ 1292,
+ -1, -1,
+ /*0xa77a*/ 1073,
+ -1,
+ /*0x10ee*/ 508,
+ -1,
+ /*0x03ef*/ 287,
+ /*0x021b*/ 178,
+ /*0x2c5d*/ 894,
+ /*0xa661*/ 1014,
+ /*0x10cdd*/ 1275,
+ /*0x1f61*/ 777,
+ /*0x020b*/ 170,
+ /*0x13a6*/ 530,
+ /*0xa76b*/ 1070,
+ /*0x10dd*/ 491,
+ /*0x1d8e*/ 612,
+ /*0x13d1*/ 573,
+ /*0x0451*/ 325,
+ /*0x04d1*/ 392,
+ -1, -1,
+ /*0x0263*/ 211,
+ /*0x1e51*/ 653,
+ /*0x1ed1*/ 712,
+ /*0x0151*/ 94,
+ /*0x2cd1*/ 945,
+ -1, -1, -1, -1,
+ /*0x24d1*/ 824,
+ /*0x0265*/ 212,
+ /*0xa663*/ 1015,
+ /*0x10fa*/ 520,
+ /*0x1f63*/ 779,
+ /*0x1f12*/ 746,
+ -1, -1, -1, -1,
+ /*0x10ceb*/ 1289,
+ /*0x0269*/ 215,
+ /*0xa665*/ 1016,
+ -1,
+ /*0x1f65*/ 781,
+ /*0x10eb*/ 505,
+ -1,
+ /*0xa757*/ 1060,
+ -1, -1, -1, -1,
+ /*0xa669*/ 1018,
+ /*0x0491*/ 360,
+ -1, -1, -1,
+ /*0x1e11*/ 621,
+ /*0x1e91*/ 685,
+ /*0x0111*/ 64,
+ /*0x2c91*/ 913,
+ /*0xa79b*/ 1086,
+ /*0xa667*/ 1017,
+ -1,
+ /*0x1f67*/ 783,
+ -1,
+ /*0x0259*/ 206,
+ -1, -1, -1, -1, -1,
+ /*0x2c57*/ 888,
+ /*0xa76f*/ 1072,
+ /*0x10cd7*/ 1269,
+ /*0x1f24*/ 754,
+ /*0x1f22*/ 752,
+ /*0xa659*/ 1010,
+ -1,
+ /*0x10d7*/ 485,
+ -1,
+ /*0x025b*/ 207,
+ -1,
+ /*0x13ed*/ 601,
+ /*0x046d*/ 346,
+ /*0x04ed*/ 406,
+ /*0x006d*/ 11,
+ /*0x1f14*/ 748,
+ /*0x104ed*/ 1196,
+ /*0x1e6d*/ 667,
+ /*0x1eed*/ 726,
+ /*0x016d*/ 108,
+ /*0xa65b*/ 1011,
+ -1, -1, -1,
+ /*0x1f10*/ 744,
+ /*0x13a8*/ 532,
+ -1, -1,
+ /*0x10cef*/ 1293,
+ /*0x10428*/ 1135,
+ /*0x03ed*/ 286,
+ /*0xa751*/ 1057,
+ -1,
+ /*0x10ef*/ 509,
+ -1,
+ /*0xa65f*/ 1013,
+ /*0x13d3*/ 575,
+ /*0x0453*/ 327,
+ /*0x04d3*/ 393,
+ -1, -1,
+ /*0x1f06*/ 742,
+ /*0x1e53*/ 654,
+ /*0x1ed3*/ 713,
+ /*0x0153*/ 95,
+ /*0x2cd3*/ 946,
+ /*0x13d5*/ 577,
+ /*0x0455*/ 329,
+ /*0x04d5*/ 394,
+ /*0xa7d9*/ 1106,
+ /*0x24d3*/ 826,
+ -1,
+ /*0x1e55*/ 655,
+ /*0x1ed5*/ 714,
+ /*0x0155*/ 96,
+ /*0x2cd5*/ 947,
+ /*0x2c51*/ 882,
+ /*0xa794*/ 1083,
+ /*0x10cd1*/ 1263,
+ -1,
+ /*0x24d5*/ 828,
+ -1, -1,
+ /*0x10d1*/ 479,
+ /*0xa65d*/ 1012,
+ /*0x01e1*/ 151,
+ -1,
+ /*0x13f3*/ 607,
+ /*0x0473*/ 349,
+ /*0x04f3*/ 409,
+ /*0x0073*/ 17,
+ -1,
+ /*0x104f3*/ 1202,
+ /*0x1e73*/ 670,
+ /*0x1ef3*/ 729,
+ /*0x0173*/ 111,
+ /*0x2cf3*/ 957,
+ /*0x13ce*/ 570,
+ /*0x044e*/ 322,
+ /*0x04ce*/ 390,
+ -1,
+ /*0x1044e*/ 1173,
+ -1, -1,
+ /*0x026b*/ 217,
+ /*0x1f7a*/ 794,
+ /*0x03f3*/ 289,
+ /*0x017e*/ 116,
+ -1,
+ /*0x01e3*/ 152,
+ /*0x0192*/ 122,
+ -1,
+ /*0x1f20*/ 750,
+ /*0xa78c*/ 1080,
+ -1,
+ /*0xa66b*/ 1019,
+ /*0x03ce*/ 274,
+ -1,
+ /*0xa76d*/ 1071,
+ /*0x01e5*/ 153,
+ /*0x0188*/ 120,
+ /*0x13c3*/ 559,
+ /*0x0443*/ 311,
+ /*0x0373*/ 237,
+ -1,
+ /*0x10443*/ 1162,
+ -1,
+ /*0x1e43*/ 646,
+ /*0x1ec3*/ 705,
+ /*0x01e9*/ 155,
+ /*0x2cc3*/ 938,
+ -1, -1,
+ /*0x0561*/ 440,
+ /*0x1059b*/ 1215,
+ /*0x00e1*/ 26,
+ -1, -1,
+ /*0x0257*/ 205,
+ /*0x01e7*/ 154,
+ /*0x03c3*/ 263,
+ /*0x118d9*/ 1322,
+ /*0x051b*/ 429,
+ /*0xa753*/ 1058,
+ /*0x13aa*/ 534,
+ /*0x10ced*/ 1291,
+ /*0xab53*/ 1108,
+ /*0x050b*/ 421,
+ /*0x1042a*/ 1137,
+ /*0xa657*/ 1009,
+ /*0x10ed*/ 507,
+ /*0x1f57*/ 775,
+ -1,
+ /*0xa755*/ 1059,
+ /*0x13c1*/ 557,
+ /*0x0441*/ 309,
+ /*0x118db*/ 1324,
+ /*0x0563*/ 442,
+ /*0x10441*/ 1160,
+ /*0x00e3*/ 28,
+ /*0x1e41*/ 645,
+ /*0x1ec1*/ 704,
+ -1,
+ /*0x2cc1*/ 937,
+ /*0x026f*/ 219,
+ -1, -1,
+ /*0x0565*/ 444,
+ /*0x2c53*/ 884,
+ /*0x00e5*/ 30,
+ /*0x10cd3*/ 1265,
+ /*0x118df*/ 1328,
+ -1,
+ /*0x03c1*/ 262,
+ -1,
+ /*0x10d3*/ 481,
+ -1,
+ /*0x0569*/ 448,
+ /*0x2c55*/ 886,
+ /*0x00e9*/ 34,
+ /*0x10cd5*/ 1267,
+ /*0x13de*/ 586,
+ /*0x045e*/ 338,
+ /*0x1f02*/ 738,
+ /*0x01df*/ 150,
+ /*0x10d5*/ 483,
+ /*0x104de*/ 1181,
+ /*0x0567*/ 446,
+ -1,
+ /*0x00e7*/ 32,
+ /*0x105a4*/ 1223,
+ /*0x028b*/ 231,
+ -1,
+ /*0xa7d7*/ 1105,
+ /*0x0251*/ 200,
+ /*0x24de*/ 837,
+ -1,
+ /*0x019a*/ 125,
+ /*0x018c*/ 121,
+ /*0x2c73*/ 903,
+ /*0x118dd*/ 1326,
+ /*0x1f00*/ 736,
+ /*0x0292*/ 233,
+ /*0x1f26*/ 756,
+ /*0x028a*/ 230,
+ /*0xa651*/ 1006,
+ /*0x10f3*/ 513,
+ /*0x1f51*/ 772,
+ /*0xa743*/ 1050,
+ /*0x2c4e*/ 879,
+ -1,
+ /*0x10cce*/ 1260,
+ /*0x0288*/ 228,
+ /*0x01dd*/ 149,
+ /*0x10598*/ 1212,
+ /*0x13cf*/ 571,
+ /*0x044f*/ 323,
+ /*0x04cf*/ 391,
+ /*0x10fe*/ 522,
+ /*0x1044f*/ 1174,
+ -1,
+ /*0x1e4f*/ 652,
+ /*0x1ecf*/ 711,
+ /*0x014f*/ 93,
+ /*0x2ccf*/ 944,
+ /*0x0586*/ 477,
+ -1,
+ /*0x1e924*/ 1363,
+ /*0x1e922*/ 1361,
+ /*0x0211*/ 173,
+ -1, -1, -1,
+ /*0x2c43*/ 868,
+ -1,
+ /*0x10cc3*/ 1249,
+ -1,
+ /*0x1059a*/ 1214,
+ -1,
+ /*0x13cd*/ 569,
+ /*0x044d*/ 321,
+ /*0xa741*/ 1049,
+ /*0x1f11*/ 745,
+ /*0x1044d*/ 1172,
+ /*0x01eb*/ 156,
+ /*0x1e4d*/ 651,
+ /*0x1ecd*/ 710,
+ /*0x014d*/ 92,
+ /*0x2ccd*/ 943,
+ /*0xa7d1*/ 1104,
+ /*0x056e*/ 453,
+ /*0x019e*/ 126,
+ /*0x00ee*/ 39,
+ -1, -1,
+ /*0x13cb*/ 567,
+ /*0x044b*/ 319,
+ -1,
+ /*0x03cd*/ 273,
+ /*0x1044b*/ 1170,
+ -1,
+ /*0x1e4b*/ 650,
+ /*0x1ecb*/ 709,
+ /*0x014b*/ 91,
+ /*0x2ccb*/ 942,
+ /*0x118d7*/ 1320,
+ /*0x2c41*/ 866,
+ -1,
+ /*0x10cc1*/ 1247,
+ /*0x13c9*/ 565,
+ /*0x0449*/ 317,
+ -1,
+ /*0xa66d*/ 1020,
+ /*0x10449*/ 1168,
+ /*0x03cb*/ 271,
+ /*0x1e49*/ 649,
+ /*0x1ec9*/ 708,
+ -1,
+ /*0x2cc9*/ 941,
+ /*0x105a0*/ 1220,
+ /*0x057a*/ 465,
+ -1,
+ /*0x00fa*/ 50,
+ -1,
+ /*0xa791*/ 1081,
+ -1,
+ /*0x0253*/ 202,
+ -1,
+ /*0x03c9*/ 269,
+ -1,
+ /*0x028c*/ 232,
+ /*0x1059e*/ 1218,
+ /*0x056b*/ 450,
+ /*0x2c5e*/ 895,
+ /*0x00eb*/ 36,
+ /*0x10cde*/ 1276,
+ -1,
+ /*0xa653*/ 1007,
+ -1,
+ /*0x1f53*/ 773,
+ /*0x10de*/ 492,
+ /*0x16e61*/ 1330,
+ /*0xa74f*/ 1056,
+ -1,
+ /*0x01ef*/ 158,
+ -1, -1,
+ /*0xa655*/ 1008,
+ -1,
+ /*0x1f55*/ 774,
+ /*0x13f1*/ 605,
+ /*0x0471*/ 348,
+ /*0x04f1*/ 408,
+ /*0x0071*/ 15,
+ -1,
+ /*0x104f1*/ 1200,
+ /*0x1e71*/ 669,
+ /*0x1ef1*/ 728,
+ /*0x0171*/ 110,
+ -1, -1,
+ /*0x118d1*/ 1314,
+ -1, -1, -1,
+ /*0x16e63*/ 1332,
+ /*0xa74d*/ 1055,
+ /*0x2c4f*/ 880,
+ /*0x0180*/ 117,
+ /*0x10ccf*/ 1261,
+ /*0x1f73*/ 787,
+ /*0x13f5*/ 609,
+ /*0x0475*/ 350,
+ /*0x04f5*/ 410,
+ /*0x0075*/ 19,
+ /*0x16e65*/ 1334,
+ /*0x104f5*/ 1204,
+ /*0x1e75*/ 671,
+ /*0x1ef5*/ 730,
+ /*0x0175*/ 112,
+ -1, -1,
+ /*0xa74b*/ 1054,
+ /*0x029e*/ 235,
+ -1,
+ /*0x16e69*/ 1338,
+ /*0x0371*/ 236,
+ /*0x0582*/ 473,
+ -1, -1, -1,
+ /*0x2c4d*/ 878,
+ /*0x056f*/ 454,
+ /*0x10ccd*/ 1259,
+ /*0x00ef*/ 40,
+ /*0x16e67*/ 1336,
+ /*0xa749*/ 1053,
+ /*0x13ae*/ 538,
+ -1, -1, -1,
+ /*0x1042e*/ 1141,
+ /*0xa643*/ 999,
+ -1,
+ /*0x1f43*/ 769,
+ /*0x0580*/ 471,
+ -1,
+ /*0x2c4b*/ 876,
+ -1,
+ /*0x10ccb*/ 1257,
+ /*0x105a6*/ 1225,
+ /*0x13b7*/ 547,
+ /*0x0437*/ 299,
+ /*0x04b7*/ 379,
+ -1,
+ /*0x10437*/ 1150,
+ /*0x03ae*/ 244,
+ /*0x1e37*/ 640,
+ /*0x1eb7*/ 699,
+ /*0x0137*/ 82,
+ /*0x2cb7*/ 932,
+ /*0x2c49*/ 874,
+ -1,
+ /*0x10cc9*/ 1255,
+ -1,
+ /*0x13b5*/ 545,
+ /*0x0435*/ 297,
+ /*0x04b5*/ 378,
+ -1,
+ /*0x10435*/ 1148,
+ /*0x03b7*/ 252,
+ /*0x1e35*/ 639,
+ /*0x1eb5*/ 698,
+ /*0x0135*/ 81,
+ /*0x2cb5*/ 931,
+ /*0xa641*/ 998,
+ -1,
+ /*0x1f41*/ 767,
+ -1, -1, -1,
+ /*0x01ed*/ 157,
+ /*0x0282*/ 225,
+ /*0x1fe1*/ 803,
+ /*0x03b5*/ 250,
+ /*0x0481*/ 356,
+ /*0xa7c3*/ 1101,
+ /*0x1e926*/ 1365,
+ -1,
+ /*0x1e01*/ 613,
+ /*0x1e81*/ 677,
+ /*0x0101*/ 56,
+ /*0x2c81*/ 905,
+ /*0x118d3*/ 1316,
+ -1,
+ /*0x01a8*/ 130,
+ -1,
+ /*0x0511*/ 424,
+ /*0x16e6e*/ 1343,
+ /*0x13a5*/ 529,
+ /*0x0280*/ 224,
+ /*0x04a5*/ 370,
+ /*0x217a*/ 816,
+ /*0x118d5*/ 1318,
+ /*0x10cf1*/ 1295,
+ /*0x1e25*/ 631,
+ /*0x1ea5*/ 690,
+ /*0x0125*/ 74,
+ /*0x2ca5*/ 923,
+ /*0x10f1*/ 511,
+ /*0x1e05*/ 615,
+ /*0x1e85*/ 679,
+ /*0x0105*/ 58,
+ /*0x2c85*/ 907,
+ /*0x13b3*/ 543,
+ /*0x0433*/ 295,
+ /*0x04b3*/ 377,
+ /*0x1fe5*/ 804,
+ /*0x10433*/ 1146,
+ /*0xa7c1*/ 1100,
+ /*0x1e33*/ 638,
+ /*0x1eb3*/ 697,
+ /*0x0133*/ 80,
+ /*0x2cb3*/ 930,
+ /*0x2d16*/ 980,
+ /*0x024f*/ 198,
+ -1,
+ /*0x2d1b*/ 985,
+ /*0x16e7a*/ 1355,
+ /*0x056d*/ 452,
+ /*0x10f5*/ 515,
+ /*0x00ed*/ 38,
+ /*0x2d0b*/ 969,
+ /*0x03b3*/ 248,
+ /*0x118ce*/ 1311,
+ /*0x105a8*/ 1227,
+ /*0xa64f*/ 1005,
+ /*0x01f3*/ 159,
+ /*0xa737*/ 1044,
+ -1,
+ /*0x16e6b*/ 1340,
+ -1, -1,
+ /*0x2d12*/ 976,
+ -1,
+ /*0x2d0a*/ 968,
+ -1,
+ /*0x01ce*/ 141,
+ /*0x13a3*/ 527,
+ /*0x024d*/ 197,
+ /*0x04a3*/ 369,
+ -1,
+ /*0xa735*/ 1043,
+ /*0x2d08*/ 966,
+ /*0x1e23*/ 630,
+ /*0x1ea3*/ 689,
+ /*0x0123*/ 73,
+ /*0x2ca3*/ 922,
+ /*0x118c3*/ 1300,
+ -1,
+ /*0xa64d*/ 1004,
+ -1,
+ /*0x13ad*/ 537,
+ /*0x2c37*/ 856,
+ /*0x04ad*/ 374,
+ /*0x024b*/ 196,
+ /*0x1042d*/ 1140,
+ -1,
+ /*0x1e2d*/ 635,
+ /*0x1ead*/ 694,
+ /*0x012d*/ 78,
+ /*0x2cad*/ 927,
+ /*0x1e928*/ 1367,
+ -1, -1, -1,
+ /*0xa64b*/ 1003,
+ /*0x2c35*/ 854,
+ -1,
+ /*0x0249*/ 195,
+ -1,
+ /*0x03ad*/ 243,
+ -1,
+ /*0x2d24*/ 994,
+ /*0x2d22*/ 992,
+ /*0x0573*/ 458,
+ /*0xa725*/ 1036,
+ /*0x00f3*/ 44,
+ /*0x047b*/ 353,
+ /*0x04fb*/ 413,
+ /*0xa649*/ 1002,
+ /*0x118c1*/ 1298,
+ /*0x104fb*/ 1210,
+ /*0x1e7b*/ 674,
+ /*0x1efb*/ 733,
+ /*0x2d14*/ 978,
+ -1,
+ /*0x057e*/ 469,
+ /*0x1f04*/ 740,
+ /*0x00fe*/ 54,
+ /*0x16e6f*/ 1344,
+ /*0xa733*/ 1042,
+ -1, -1,
+ /*0x2d10*/ 974,
+ -1,
+ /*0x03fb*/ 291,
+ /*0x2d18*/ 982,
+ /*0x13bf*/ 555,
+ /*0x043f*/ 307,
+ /*0x04bf*/ 383,
+ -1,
+ /*0x1043f*/ 1158,
+ -1,
+ /*0x1e3f*/ 644,
+ /*0x1ebf*/ 703,
+ -1,
+ /*0x2cbf*/ 936,
+ /*0x118de*/ 1327,
+ -1,
+ /*0x0271*/ 220,
+ /*0x2d06*/ 964,
+ -1,
+ /*0x037b*/ 239,
+ -1, -1,
+ /*0x2c33*/ 852,
+ /*0x03bf*/ 260,
+ /*0x13b2*/ 542,
+ /*0x0432*/ 294,
+ /*0x2d1a*/ 984,
+ /*0x2d0c*/ 970,
+ /*0x10432*/ 1145,
+ /*0x1f71*/ 785,
+ /*0x105aa*/ 1229,
+ /*0xa723*/ 1035,
+ /*0x13b9*/ 549,
+ /*0x0439*/ 301,
+ /*0x04b9*/ 380,
+ -1,
+ /*0x10439*/ 1152,
+ /*0x0275*/ 222,
+ /*0x1e39*/ 641,
+ /*0x1eb9*/ 700,
+ -1,
+ /*0x2cb9*/ 933,
+ -1,
+ /*0x03b2*/ 247,
+ /*0x1e943*/ 1394,
+ /*0xa72d*/ 1040,
+ -1, -1,
+ /*0x118cf*/ 1312,
+ -1,
+ /*0x1f75*/ 789,
+ /*0x03b9*/ 254,
+ -1, -1,
+ /*0x13ac*/ 536,
+ /*0x13b1*/ 541,
+ /*0x0431*/ 293,
+ /*0x04b1*/ 376,
+ /*0x1042c*/ 1139,
+ /*0x10431*/ 1144,
+ -1,
+ /*0x1e31*/ 637,
+ /*0x1eb1*/ 696,
+ -1,
+ /*0x2cb1*/ 929,
+ -1, -1,
+ /*0x1e92a*/ 1369,
+ /*0x2d20*/ 990,
+ -1, -1, -1,
+ /*0x118cd*/ 1310,
+ /*0x03ac*/ 242,
+ /*0x03b1*/ 246,
+ -1,
+ /*0x13a7*/ 531,
+ /*0x1e941*/ 1392,
+ /*0x04a7*/ 371,
+ -1,
+ /*0x2d1e*/ 988,
+ -1,
+ /*0x1e27*/ 632,
+ /*0x1ea7*/ 691,
+ /*0x0127*/ 75,
+ /*0x2ca7*/ 924,
+ -1, -1,
+ /*0x118cb*/ 1308,
+ -1,
+ /*0x1f37*/ 765,
+ /*0xa73f*/ 1048,
+ -1,
+ /*0x16e6d*/ 1342,
+ -1, -1, -1, -1, -1,
+ /*0x13c7*/ 563,
+ /*0x0447*/ 315,
+ -1,
+ /*0x118c9*/ 1306,
+ /*0x10447*/ 1166,
+ /*0x1f35*/ 763,
+ /*0x1e47*/ 648,
+ /*0x1ec7*/ 707,
+ -1,
+ /*0x2cc7*/ 940,
+ /*0x0201*/ 165,
+ -1, -1, -1, -1, -1,
+ /*0x01c9*/ 139,
+ /*0x2c3f*/ 864,
+ -1,
+ /*0x03c7*/ 267,
+ /*0xa739*/ 1045,
+ -1, -1,
+ /*0x1f01*/ 737,
+ /*0x2173*/ 809,
+ -1,
+ /*0x0225*/ 182,
+ -1, -1,
+ /*0x1fd1*/ 801,
+ -1,
+ /*0x0205*/ 167,
+ -1,
+ /*0xa7b7*/ 1095,
+ /*0x214e*/ 805,
+ -1,
+ /*0x217e*/ 820,
+ /*0x2c32*/ 851,
+ -1,
+ /*0x1f25*/ 755,
+ /*0x2d02*/ 960,
+ /*0x0233*/ 189,
+ /*0x13c5*/ 561,
+ /*0x0445*/ 313,
+ /*0x1f05*/ 741,
+ /*0x2c39*/ 858,
+ /*0x10445*/ 1164,
+ /*0xa7b5*/ 1094,
+ /*0x1e45*/ 647,
+ /*0x1ec5*/ 706,
+ /*0x16e73*/ 1348,
+ /*0x2cc5*/ 939,
+ -1, -1,
+ /*0x1f33*/ 761,
+ /*0x2d0e*/ 972,
+ -1, -1,
+ /*0x2d00*/ 958,
+ /*0x0584*/ 475,
+ -1,
+ /*0x03c5*/ 265,
+ /*0x16e7e*/ 1359,
+ -1,
+ /*0xa727*/ 1037,
+ /*0xa781*/ 1076,
+ /*0x13c0*/ 556,
+ /*0x0440*/ 308,
+ /*0x2c31*/ 850,
+ -1,
+ /*0x10440*/ 1159,
+ /*0x047d*/ 354,
+ /*0x04fd*/ 414,
+ -1,
+ /*0x0140*/ 86,
+ /*0x0223*/ 181,
+ /*0x1e7d*/ 675,
+ /*0x1efd*/ 734,
+ /*0x01f5*/ 160,
+ /*0x1d7d*/ 611,
+ -1,
+ /*0xa7a5*/ 1091,
+ -1, -1, -1,
+ /*0x03c0*/ 261,
+ /*0xa785*/ 1078,
+ /*0xa747*/ 1052,
+ /*0x1f23*/ 753,
+ /*0x022d*/ 186,
+ /*0x1e03*/ 614,
+ /*0x1e83*/ 678,
+ /*0x0103*/ 57,
+ /*0x2c83*/ 906,
+ -1, -1,
+ /*0x048f*/ 359,
+ -1, -1,
+ /*0x2d11*/ 975,
+ /*0x1e0f*/ 620,
+ /*0x1e8f*/ 684,
+ /*0x010f*/ 63,
+ /*0x2c8f*/ 912,
+ /*0xa69b*/ 1034,
+ /*0x0571*/ 456,
+ /*0x037d*/ 241,
+ /*0x00f1*/ 42,
+ -1,
+ /*0xa68b*/ 1026,
+ -1, -1,
+ /*0x2c47*/ 872,
+ -1,
+ /*0x10cc7*/ 1253,
+ /*0x13bd*/ 553,
+ /*0x043d*/ 305,
+ /*0x04bd*/ 382,
+ -1,
+ /*0x1043d*/ 1156,
+ -1,
+ /*0x1e3d*/ 643,
+ /*0x1ebd*/ 702,
+ -1,
+ /*0x2cbd*/ 935,
+ -1,
+ /*0x0575*/ 460,
+ /*0x1f7b*/ 795,
+ /*0x00f5*/ 46,
+ /*0xa745*/ 1051,
+ /*0xa7a3*/ 1090,
+ /*0x13a1*/ 525,
+ -1,
+ /*0x04a1*/ 368,
+ /*0x03bd*/ 258,
+ /*0x023f*/ 191,
+ /*0xff59*/ 1133,
+ /*0x1e21*/ 629,
+ /*0x1ea1*/ 688,
+ /*0x0121*/ 72,
+ /*0x2ca1*/ 921,
+ /*0x13bb*/ 551,
+ /*0x043b*/ 303,
+ /*0x04bb*/ 381,
+ /*0x105ae*/ 1233,
+ /*0x1043b*/ 1154,
+ -1,
+ /*0x1e3b*/ 642,
+ /*0x1ebb*/ 701,
+ -1,
+ /*0x2cbb*/ 934,
+ -1, -1, -1,
+ /*0x2c45*/ 870,
+ /*0x13af*/ 539,
+ /*0x10cc5*/ 1251,
+ /*0x04af*/ 375,
+ /*0x105b7*/ 1241,
+ /*0x1042f*/ 1142,
+ /*0x03bb*/ 256,
+ /*0x1e2f*/ 636,
+ /*0x1eaf*/ 695,
+ /*0x012f*/ 79,
+ /*0x2caf*/ 928,
+ -1,
+ /*0x01a5*/ 129,
+ -1,
+ /*0x1f32*/ 760,
+ /*0x0499*/ 364,
+ -1,
+ /*0x0185*/ 119,
+ /*0x105b5*/ 1239,
+ /*0x1e19*/ 625,
+ /*0x03af*/ 245,
+ /*0x0119*/ 68,
+ /*0x2c99*/ 917,
+ -1,
+ /*0x2c40*/ 865,
+ /*0x13e6*/ 594,
+ /*0x10cc0*/ 1246,
+ /*0x1e92e*/ 1373,
+ /*0x0066*/ 5,
+ -1,
+ /*0x104e6*/ 1189,
+ -1,
+ /*0x0231*/ 188,
+ /*0x0581*/ 472,
+ -1,
+ /*0x10fd*/ 521,
+ /*0xa7bf*/ 1099,
+ /*0x13f2*/ 606,
+ -1,
+ /*0x24e6*/ 845,
+ /*0x0072*/ 16,
+ /*0x1e937*/ 1382,
+ /*0x104f2*/ 1201,
+ -1,
+ /*0x0501*/ 416,
+ /*0x1f31*/ 759,
+ -1, -1,
+ /*0xa73d*/ 1047,
+ -1, -1, -1,
+ /*0x105a5*/ 1224,
+ /*0x0227*/ 183,
+ /*0x0585*/ 476,
+ /*0x1e935*/ 1380,
+ /*0x03f2*/ 288,
+ -1, -1, -1,
+ /*0x0525*/ 434,
+ /*0x01a3*/ 128,
+ -1, -1,
+ /*0xa7b9*/ 1096,
+ /*0x0505*/ 418,
+ /*0x1f27*/ 757,
+ /*0x105b3*/ 1237,
+ -1, -1, -1,
+ /*0x1059c*/ 1216,
+ -1,
+ /*0x2c3d*/ 862,
+ /*0xa73b*/ 1046,
+ /*0x01ad*/ 131,
+ /*0x0247*/ 194,
+ /*0x13a9*/ 533,
+ -1,
+ /*0x04a9*/ 372,
+ -1,
+ /*0x10429*/ 1136,
+ -1,
+ /*0x1e29*/ 633,
+ /*0x1ea9*/ 692,
+ /*0x0129*/ 76,
+ /*0x2ca9*/ 925,
+ /*0xa647*/ 1001,
+ /*0xa72f*/ 1041,
+ /*0x1e925*/ 1364,
+ /*0x0479*/ 352,
+ /*0x04f9*/ 412,
+ /*0x0079*/ 23,
+ /*0x2171*/ 807,
+ /*0x104f9*/ 1208,
+ /*0x1e79*/ 673,
+ /*0x1ef9*/ 732,
+ -1,
+ /*0x1d79*/ 610,
+ /*0x2c3b*/ 860,
+ /*0x01fb*/ 162,
+ /*0x105a3*/ 1222,
+ -1, -1,
+ /*0x1e933*/ 1378,
+ -1,
+ /*0xff57*/ 1131,
+ -1,
+ /*0xa7a7*/ 1092,
+ /*0x0523*/ 433,
+ -1, -1, -1, -1,
+ /*0x2175*/ 811,
+ /*0x105ad*/ 1232,
+ /*0x13d0*/ 572,
+ /*0x0450*/ 324,
+ -1,
+ /*0x16e71*/ 1346,
+ -1,
+ /*0x01bf*/ 137,
+ -1,
+ /*0x052d*/ 438,
+ /*0x13c2*/ 558,
+ /*0x0442*/ 310,
+ /*0x04c2*/ 384,
+ -1,
+ /*0x10442*/ 1161,
+ /*0xa645*/ 1000,
+ /*0x24d0*/ 823,
+ /*0x1f45*/ 771,
+ /*0x0142*/ 87,
+ /*0x1e09*/ 617,
+ /*0x1e89*/ 681,
+ /*0x0109*/ 60,
+ /*0x2c89*/ 909,
+ /*0x2c66*/ 899,
+ /*0x1e923*/ 1362,
+ /*0x10ce6*/ 1284,
+ /*0x16e75*/ 1350,
+ -1,
+ /*0x0240*/ 192,
+ -1,
+ /*0x10e6*/ 500,
+ -1,
+ /*0x027d*/ 223,
+ -1,
+ /*0x057b*/ 466,
+ /*0x01b9*/ 135,
+ /*0x00fb*/ 51,
+ /*0x10cf2*/ 1296,
+ /*0x1e92d*/ 1372,
+ -1, -1,
+ /*0x1f40*/ 766,
+ /*0x10f2*/ 512,
+ -1, -1,
+ /*0x1f7d*/ 797,
+ /*0x0203*/ 166,
+ -1,
+ /*0xff51*/ 1125,
+ -1,
+ /*0xa729*/ 1038,
+ -1,
+ /*0x047f*/ 355,
+ /*0x04ff*/ 415,
+ -1, -1,
+ /*0x020f*/ 172,
+ /*0x1e7f*/ 676,
+ /*0x1eff*/ 735,
+ /*0x1f03*/ 739,
+ /*0x0477*/ 351,
+ /*0x04f7*/ 411,
+ /*0x0077*/ 21,
+ -1,
+ /*0x104f7*/ 1206,
+ /*0x1e77*/ 672,
+ /*0x1ef7*/ 731,
+ /*0x0177*/ 113,
+ /*0x13ec*/ 600,
+ -1, -1,
+ /*0x006c*/ 10,
+ -1,
+ /*0x104ec*/ 1195,
+ /*0x13ab*/ 535,
+ /*0x105b9*/ 1243,
+ /*0x04ab*/ 373,
+ /*0x2cec*/ 955,
+ /*0x1042b*/ 1138,
+ -1,
+ /*0x1e2b*/ 634,
+ /*0x1eab*/ 693,
+ /*0x012b*/ 77,
+ /*0x2cab*/ 926,
+ /*0x1e93f*/ 1390,
+ /*0x13e8*/ 596,
+ -1, -1,
+ /*0x0068*/ 7,
+ /*0x118c7*/ 1304,
+ /*0x104e8*/ 1191,
+ -1, -1,
+ /*0x2184*/ 822,
+ /*0x10f9*/ 519,
+ /*0x0377*/ 238,
+ -1,
+ /*0x105ac*/ 1231,
+ /*0x105b1*/ 1236,
+ /*0x24e8*/ 847,
+ /*0x13ea*/ 598,
+ /*0xa783*/ 1077,
+ -1,
+ /*0x006a*/ 8,
+ /*0x1e932*/ 1377,
+ /*0x104ea*/ 1193,
+ /*0x1f21*/ 751,
+ /*0x2d04*/ 962,
+ -1, -1, -1,
+ /*0xa691*/ 1029,
+ /*0x1e939*/ 1384,
+ -1,
+ /*0x2c50*/ 881,
+ -1,
+ /*0x10cd0*/ 1262,
+ /*0x022f*/ 187,
+ -1,
+ /*0x105a7*/ 1226,
+ -1,
+ /*0x10d0*/ 478,
+ /*0x2c42*/ 867,
+ /*0x13f0*/ 604,
+ /*0x10cc2*/ 1248,
+ -1,
+ /*0x0070*/ 14,
+ /*0x0527*/ 435,
+ /*0x104f0*/ 1199,
+ /*0x0219*/ 177,
+ -1,
+ /*0x118c5*/ 1302,
+ /*0xa7bd*/ 1098,
+ -1,
+ /*0x1e92c*/ 1371,
+ /*0x1e931*/ 1376,
+ -1, -1,
+ /*0xa77f*/ 1075,
+ -1,
+ /*0xff53*/ 1127,
+ /*0x0266*/ 213,
+ -1,
+ /*0x13c8*/ 564,
+ /*0x0448*/ 316,
+ /*0x04c8*/ 387,
+ -1,
+ /*0x10448*/ 1167,
+ /*0xa7a1*/ 1089,
+ -1,
+ /*0xff55*/ 1129,
+ /*0x0148*/ 90,
+ -1,
+ /*0x0272*/ 221,
+ /*0x1f66*/ 782,
+ /*0x118c0*/ 1297,
+ /*0x1e927*/ 1366,
+ -1,
+ /*0xa7bb*/ 1097,
+ -1, -1,
+ /*0xa72b*/ 1039,
+ /*0x03c8*/ 268,
+ /*0x0076*/ 20,
+ -1,
+ /*0x104f6*/ 1205,
+ /*0x1f72*/ 786,
+ -1, -1, -1,
+ /*0x10ff*/ 523,
+ -1,
+ /*0x01fd*/ 163,
+ -1,
+ /*0x13e4*/ 592,
+ -1,
+ /*0x217b*/ 817,
+ /*0x0064*/ 3,
+ /*0x10f7*/ 517,
+ /*0x104e4*/ 1187,
+ /*0x2c6c*/ 902,
+ /*0xff4e*/ 1122,
+ /*0x10cec*/ 1290,
+ -1,
+ /*0xa799*/ 1085,
+ /*0x0495*/ 362,
+ /*0x0183*/ 118,
+ /*0x10ec*/ 506,
+ /*0x24e4*/ 843,
+ /*0x1e15*/ 623,
+ /*0x1e95*/ 687,
+ /*0x0115*/ 66,
+ /*0x2c95*/ 915,
+ /*0x0229*/ 184,
+ -1, -1, -1,
+ /*0x2c68*/ 900,
+ -1,
+ /*0x10ce8*/ 1286,
+ -1, -1,
+ /*0x16e7b*/ 1356,
+ -1,
+ /*0x10e8*/ 502,
+ /*0xff43*/ 1111,
+ -1,
+ /*0x13c6*/ 562,
+ /*0x0446*/ 314,
+ /*0x04c6*/ 386,
+ -1,
+ /*0x10446*/ 1165,
+ /*0x2c6a*/ 901,
+ -1,
+ /*0x10cea*/ 1288,
+ /*0x0146*/ 89,
+ -1,
+ /*0x01bd*/ 136,
+ /*0x1f79*/ 793,
+ /*0x10ea*/ 504,
+ /*0x057d*/ 468,
+ -1,
+ /*0x00fd*/ 53,
+ /*0x0583*/ 474,
+ /*0x0493*/ 361,
+ -1,
+ /*0x03c6*/ 266,
+ -1,
+ /*0x1e13*/ 622,
+ /*0x1e93*/ 686,
+ /*0x0113*/ 65,
+ /*0x2c93*/ 914,
+ /*0x0250*/ 199,
+ /*0x01a1*/ 127,
+ /*0x0503*/ 417,
+ /*0x2d01*/ 959,
+ /*0x13e0*/ 588,
+ /*0x10cf0*/ 1294,
+ /*0xff41*/ 1109,
+ -1,
+ /*0x0242*/ 193,
+ /*0x104e0*/ 1183,
+ /*0x10f0*/ 510,
+ /*0x0209*/ 169,
+ /*0x050f*/ 423,
+ /*0x1e940*/ 1391,
+ -1, -1,
+ /*0xa7a9*/ 1093,
+ -1,
+ /*0x24e0*/ 839,
+ /*0x2d25*/ 995,
+ -1,
+ /*0x1f42*/ 768,
+ -1,
+ /*0x2c48*/ 873,
+ /*0x2d05*/ 963,
+ /*0x10cc8*/ 1254,
+ /*0x1e07*/ 616,
+ /*0x1e87*/ 680,
+ /*0x0107*/ 59,
+ /*0x2c87*/ 908,
+ -1,
+ /*0x13c4*/ 560,
+ /*0x0444*/ 312,
+ /*0x04c4*/ 385,
+ -1,
+ /*0x10444*/ 1163,
+ -1,
+ /*0x0199*/ 124,
+ /*0x2d1c*/ 986,
+ /*0x0144*/ 88,
+ /*0x2c76*/ 904,
+ /*0x105a1*/ 1221,
+ -1, -1, -1, -1,
+ /*0x0283*/ 226,
+ /*0x10f6*/ 516,
+ /*0x0497*/ 363,
+ /*0x0521*/ 432,
+ /*0x03c4*/ 264,
+ /*0x105bb*/ 1244,
+ /*0x1e17*/ 624,
+ /*0x049d*/ 366,
+ /*0x0117*/ 67,
+ /*0x2c97*/ 916,
+ /*0x10ce4*/ 1282,
+ /*0x1e1d*/ 627,
+ -1,
+ /*0x011d*/ 70,
+ /*0x2c9d*/ 919,
+ /*0x10e4*/ 498,
+ /*0x1e93d*/ 1388,
+ -1, -1,
+ /*0x105af*/ 1234,
+ /*0x026c*/ 218,
+ /*0xff4f*/ 1123,
+ /*0x2d23*/ 993,
+ -1,
+ /*0x1f77*/ 791,
+ -1,
+ /*0x022b*/ 185,
+ /*0x052f*/ 439,
+ -1, -1,
+ /*0x13e2*/ 590,
+ /*0x10599*/ 1213,
+ -1,
+ /*0x0062*/ 1,
+ -1,
+ /*0x104e2*/ 1185,
+ /*0x2d2d*/ 997,
+ /*0x0268*/ 214,
+ -1,
+ /*0x0519*/ 428,
+ -1,
+ /*0x2c46*/ 871,
+ /*0x1e93b*/ 1386,
+ /*0x10cc6*/ 1252,
+ /*0x24e2*/ 841,
+ /*0xff4d*/ 1121,
+ /*0x13d6*/ 578,
+ /*0x0456*/ 330,
+ /*0x0078*/ 22,
+ -1,
+ /*0x104f8*/ 1207,
+ /*0x0566*/ 445,
+ /*0x026a*/ 216,
+ /*0x00e6*/ 31,
+ /*0x13dc*/ 584,
+ /*0x045c*/ 336,
+ /*0x1e92f*/ 1374,
+ /*0x13da*/ 582,
+ /*0x045a*/ 334,
+ /*0x104dc*/ 1179,
+ /*0x24d6*/ 829,
+ /*0xff4b*/ 1119,
+ /*0x104da*/ 1177,
+ /*0x0572*/ 457,
+ /*0x03f8*/ 290,
+ /*0x00f2*/ 43,
+ -1,
+ /*0x01f9*/ 161,
+ /*0x24dc*/ 835,
+ -1, -1,
+ /*0x24da*/ 833,
+ /*0x10ce0*/ 1278,
+ -1, -1,
+ /*0xff49*/ 1117,
+ -1,
+ /*0x10e0*/ 494,
+ -1, -1, -1,
+ /*0x118d0*/ 1313,
+ /*0x13bc*/ 552,
+ /*0x043c*/ 304,
+ /*0x217d*/ 819,
+ -1,
+ /*0x1043c*/ 1155,
+ -1,
+ /*0x1f70*/ 784,
+ /*0x118c2*/ 1299,
+ /*0x013c*/ 84,
+ /*0x017c*/ 115,
+ -1, -1,
+ /*0x01d0*/ 142,
+ /*0x105a9*/ 1228,
+ -1,
+ /*0x2c44*/ 869,
+ /*0x1fb1*/ 799,
+ /*0x10cc4*/ 1250,
+ -1,
+ /*0x03bc*/ 257,
+ -1,
+ /*0x0529*/ 436,
+ /*0x13d8*/ 580,
+ /*0x0458*/ 332,
+ -1, -1, -1,
+ /*0x104d8*/ 1175,
+ /*0x16e7d*/ 1358,
+ -1,
+ /*0x13ca*/ 566,
+ /*0x044a*/ 318,
+ /*0x04ca*/ 388,
+ /*0x0579*/ 464,
+ /*0x1044a*/ 1169,
+ /*0x00f9*/ 49,
+ /*0x24d8*/ 831,
+ /*0x037c*/ 240,
+ /*0x13d4*/ 576,
+ /*0x0454*/ 328,
+ -1, -1, -1,
+ /*0x1f76*/ 790,
+ /*0x13b6*/ 546,
+ /*0x0436*/ 298,
+ -1, -1,
+ /*0x10436*/ 1149,
+ /*0x03ca*/ 270,
+ /*0x1e929*/ 1368,
+ -1,
+ /*0x24d4*/ 827,
+ /*0x0215*/ 175,
+ /*0x13b0*/ 540,
+ /*0x0430*/ 292,
+ -1,
+ /*0x1f64*/ 780,
+ /*0x10430*/ 1143,
+ /*0x13d2*/ 574,
+ /*0x0452*/ 326,
+ /*0x01ff*/ 164,
+ /*0x10ce2*/ 1280,
+ /*0x03b6*/ 251,
+ -1, -1,
+ /*0x1f15*/ 749,
+ /*0x10e2*/ 496,
+ /*0xa7c8*/ 1102,
+ -1, -1,
+ /*0x0509*/ 420,
+ /*0x2d27*/ 996,
+ /*0x24d2*/ 825,
+ -1, -1,
+ /*0x2c56*/ 887,
+ -1,
+ /*0x10cd6*/ 1268,
+ -1, -1, -1,
+ /*0x10f8*/ 518,
+ /*0x10d6*/ 484,
+ /*0x2c5c*/ 893,
+ /*0xa7f6*/ 1107,
+ /*0x10cdc*/ 1274,
+ /*0x2c5a*/ 891,
+ /*0xa77c*/ 1074,
+ /*0x10cda*/ 1272,
+ -1,
+ /*0x10dc*/ 490,
+ /*0x0213*/ 174,
+ -1,
+ /*0x10da*/ 488,
+ /*0x13f4*/ 608,
+ -1,
+ /*0x1e942*/ 1393,
+ /*0x0074*/ 18,
+ -1,
+ /*0x104f4*/ 1203,
+ -1, -1, -1, -1,
+ /*0x1f13*/ 747,
+ /*0x0260*/ 209,
+ -1, -1,
+ /*0x057f*/ 470,
+ -1,
+ /*0x00ff*/ 55,
+ /*0x2c3c*/ 861,
+ -1, -1,
+ /*0x0289*/ 229,
+ -1,
+ /*0x0577*/ 462,
+ -1,
+ /*0x1f60*/ 776,
+ -1, -1,
+ /*0x0207*/ 168,
+ /*0x2172*/ 808,
+ /*0x105ab*/ 1230,
+ -1,
+ /*0x056c*/ 451,
+ -1,
+ /*0x00ec*/ 37,
+ -1, -1, -1,
+ /*0x052b*/ 437,
+ -1,
+ /*0x2c58*/ 889,
+ /*0x1f07*/ 743,
+ /*0x10cd8*/ 1270,
+ /*0x16e66*/ 1335,
+ -1, -1,
+ /*0x118c8*/ 1305,
+ /*0x10d8*/ 486,
+ /*0x2c4a*/ 875,
+ /*0x0568*/ 447,
+ /*0x10cca*/ 1256,
+ /*0x00e8*/ 33,
+ /*0x1f44*/ 770,
+ /*0xa793*/ 1082,
+ /*0x0217*/ 176,
+ /*0x16e72*/ 1347,
+ /*0x2c54*/ 885,
+ -1,
+ /*0x10cd4*/ 1266,
+ /*0x021d*/ 179,
+ -1,
+ /*0xa681*/ 1021,
+ /*0x2c36*/ 855,
+ /*0x10d4*/ 482,
+ /*0x056a*/ 449,
+ -1,
+ /*0x00ea*/ 35,
+ /*0x1e92b*/ 1370,
+ -1,
+ /*0x13b4*/ 544,
+ /*0x0434*/ 296,
+ -1,
+ /*0x2c30*/ 849,
+ /*0x10434*/ 1147,
+ -1, -1, -1,
+ /*0x2c52*/ 883,
+ -1,
+ /*0x10cd2*/ 1264,
+ -1,
+ /*0x2179*/ 815,
+ /*0xa685*/ 1023,
+ /*0xa787*/ 1079,
+ /*0x10d2*/ 480,
+ /*0x2d03*/ 961,
+ -1,
+ /*0x0570*/ 455,
+ /*0x03b4*/ 249,
+ /*0x00f0*/ 41,
+ -1, -1,
+ /*0x13cc*/ 568,
+ /*0x044c*/ 320,
+ /*0x04cc*/ 389,
+ /*0x2d0f*/ 973,
+ /*0x1044c*/ 1171,
+ /*0x1f62*/ 778,
+ /*0x049f*/ 367,
+ /*0x0195*/ 123,
+ /*0x0256*/ 204,
+ -1,
+ /*0x1e1f*/ 628,
+ -1,
+ /*0x011f*/ 71,
+ /*0x2c9f*/ 920,
+ -1,
+ /*0x16e79*/ 1354,
+ /*0x025c*/ 208,
+ /*0xa797*/ 1084,
+ /*0x118c6*/ 1303,
+ /*0x03cc*/ 272,
+ /*0x1f78*/ 792,
+ -1,
+ /*0xa79d*/ 1087,
+ -1, -1, -1, -1, -1,
+ /*0x10f4*/ 514,
+ -1, -1,
+ /*0x01c6*/ 138,
+ /*0x0576*/ 461,
+ -1,
+ /*0x00f6*/ 47,
+ -1, -1,
+ /*0x13be*/ 554,
+ /*0x043e*/ 306,
+ -1,
+ /*0x2d21*/ 991,
+ /*0x1043e*/ 1157,
+ -1, -1,
+ /*0x023c*/ 190,
+ /*0x013e*/ 85,
+ /*0x0564*/ 443,
+ /*0x048d*/ 358,
+ /*0x00e4*/ 29,
+ -1, -1,
+ /*0x1e0d*/ 619,
+ /*0x1e8d*/ 683,
+ /*0x010d*/ 62,
+ /*0x2c8d*/ 911,
+ /*0x0515*/ 426,
+ /*0x03be*/ 259,
+ -1,
+ /*0x1f7c*/ 796,
+ /*0x13ba*/ 550,
+ /*0x043a*/ 302,
+ -1, -1,
+ /*0x1043a*/ 1153,
+ -1,
+ /*0x217f*/ 821,
+ -1,
+ /*0x013a*/ 83,
+ -1, -1, -1,
+ /*0x13b8*/ 548,
+ /*0x0438*/ 300,
+ /*0x2177*/ 813,
+ /*0x118c4*/ 1301,
+ /*0x10438*/ 1151,
+ /*0x2d19*/ 983,
+ -1,
+ /*0x03ba*/ 255,
+ -1, -1, -1,
+ /*0x0254*/ 203,
+ -1, -1, -1, -1, -1, -1,
+ /*0x2c34*/ 853,
+ /*0x03b8*/ 253,
+ /*0x16e7f*/ 1360,
+ -1, -1,
+ /*0x0513*/ 425,
+ -1, -1, -1, -1,
+ /*0x16e77*/ 1352,
+ -1,
+ /*0x1f36*/ 764,
+ -1,
+ /*0x0252*/ 201,
+ -1, -1, -1, -1,
+ /*0x16e6c*/ 1341,
+ -1,
+ /*0x00e0*/ 25,
+ /*0x1f30*/ 758,
+ /*0x2c4c*/ 877,
+ -1,
+ /*0x10ccc*/ 1258,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x0507*/ 419,
+ /*0x16e68*/ 1337,
+ -1, -1, -1,
+ /*0xa7ca*/ 1103,
+ -1, -1, -1, -1, -1,
+ /*0x118d6*/ 1319,
+ -1,
+ /*0x2170*/ 806,
+ -1, -1,
+ /*0x16e6a*/ 1339,
+ -1,
+ /*0x10597*/ 1211,
+ /*0x118dc*/ 1325,
+ /*0x1fd0*/ 800,
+ -1,
+ /*0x118da*/ 1323,
+ /*0x1059d*/ 1217,
+ /*0x01d6*/ 145,
+ /*0x2c3e*/ 863,
+ /*0x0517*/ 427,
+ -1,
+ /*0x1f74*/ 788,
+ -1, -1,
+ /*0x051d*/ 430,
+ /*0x01dc*/ 148,
+ -1, -1,
+ /*0x01da*/ 147,
+ -1,
+ /*0xff47*/ 1115,
+ -1,
+ /*0x16e70*/ 1345,
+ -1, -1, -1, -1,
+ /*0x0287*/ 227,
+ -1, -1,
+ /*0x2c3a*/ 859,
+ -1, -1,
+ /*0x2176*/ 812,
+ -1, -1, -1, -1, -1,
+ /*0x0562*/ 441,
+ -1,
+ /*0x00e2*/ 27,
+ /*0x2c38*/ 857,
+ -1, -1, -1, -1, -1, -1,
+ /*0x2d09*/ 967,
+ -1, -1,
+ /*0x118d8*/ 1321,
+ -1,
+ /*0x0578*/ 463,
+ -1,
+ /*0x00f8*/ 48,
+ -1,
+ /*0x029d*/ 234,
+ /*0x16e76*/ 1351,
+ /*0x118ca*/ 1307,
+ -1,
+ /*0xff45*/ 1113,
+ -1, -1,
+ /*0x01d8*/ 146,
+ -1, -1,
+ /*0x118d4*/ 1317,
+ -1, -1, -1, -1,
+ /*0x16e64*/ 1333,
+ -1, -1, -1, -1, -1,
+ /*0x1f34*/ 762,
+ -1,
+ /*0x01d4*/ 144,
+ -1,
+ /*0x105bc*/ 1245,
+ -1, -1, -1,
+ /*0x01b6*/ 134,
+ -1,
+ /*0x118d2*/ 1315,
+ -1, -1,
+ /*0x057c*/ 467,
+ /*0x021f*/ 180,
+ /*0x00fc*/ 52,
+ -1, -1,
+ /*0x01b0*/ 132,
+ -1, -1, -1, -1,
+ /*0x01d2*/ 143,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x1e93c*/ 1387,
+ -1, -1, -1, -1, -1, -1,
+ /*0x105b6*/ 1240,
+ -1, -1, -1, -1,
+ /*0xa683*/ 1022,
+ -1,
+ /*0x020d*/ 171,
+ /*0x16e60*/ 1329,
+ -1,
+ /*0x105b0*/ 1235,
+ -1, -1, -1, -1,
+ /*0xa68f*/ 1028,
+ -1, -1, -1, -1, -1,
+ /*0xa79f*/ 1088,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x1e936*/ 1381,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x1e930*/ 1375,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x0574*/ 459,
+ -1,
+ /*0x00f4*/ 45,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x2178*/ 814,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x01b4*/ 133,
+ /*0x16e62*/ 1331,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0xa699*/ 1033,
+ /*0x118cc*/ 1309,
+ -1, -1,
+ /*0x2d15*/ 979,
+ -1, -1,
+ /*0x16e78*/ 1353,
+ -1, -1, -1, -1, -1, -1,
+ /*0x01cc*/ 140,
+ -1, -1, -1, -1,
+ /*0x217c*/ 818,
+ -1, -1,
+ /*0x1fe0*/ 802,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0x105b4*/ 1238,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x2d13*/ 977,
+ -1,
+ /*0x16e7c*/ 1357,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0x1059f*/ 1219,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x051f*/ 431,
+ -1,
+ /*0x1e934*/ 1379,
+ -1, -1, -1, -1,
+ /*0x2d07*/ 965,
+ -1,
+ /*0xff50*/ 1124,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0xff42*/ 1110,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x2d17*/ 981,
+ -1, -1, -1, -1,
+ /*0x2d1d*/ 987,
+ -1, -1,
+ /*0x050d*/ 422,
+ -1, -1, -1, -1, -1,
+ /*0x2174*/ 810,
+ /*0xa689*/ 1025,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x105b8*/ 1242,
+ -1, -1,
+ /*0x1e93e*/ 1389,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x16e74*/ 1349,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0x1e93a*/ 1385,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x1e938*/ 1383,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0x1fb0*/ 798,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0xff48*/ 1116,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0xff46*/ 1114,
+ -1, -1, -1,
+ /*0xa695*/ 1031,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0xa693*/ 1030,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0xff44*/ 1112,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0xa687*/ 1024,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x2d1f*/ 989,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0xa697*/ 1032,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0xff56*/ 1130,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /*0xff5a*/ 1134,
+ -1, -1, -1,
+ /*0x2d0d*/ 971,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0xff58*/ 1132,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0xff4a*/ 1118,
+ -1, -1, -1, -1, -1, -1,
+ -1,
+ /*0xff54*/ 1128,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1,
+ /*0xff52*/ 1126,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0xff4c*/ 1120,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0xa68d*/ 1027
+ };
+
+ if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE)
+ {
+ register unsigned int key = onigenc_unicode_CaseUnfold_11_hash(code);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register short s = wordlist[key];
+
+ if (s >= 0 && code1_equal(code, CaseUnfold_11_Table[s].from))
+ return &CaseUnfold_11_Table[s].to;
+ }
+ }
+ return 0;
+}
+
+static const CaseUnfold_12_Type CaseUnfold_12_Table[] = {
+#define CaseUnfold_12 (*(CaseUnfold_12_Type (*)[58])(CaseUnfold_12_Table+0))
+ {{0x0061, 0x02be}, {1, {0x1e9a}}},
+ {{0x0066, 0x0066}, {1, {0xfb00}}},
+ {{0x0066, 0x0069}, {1, {0xfb01}}},
+ {{0x0066, 0x006c}, {1, {0xfb02}}},
+ {{0x0068, 0x0331}, {1, {0x1e96}}},
+ {{0x006a, 0x030c}, {1, {0x01f0}}},
+ {{0x0073, 0x0073}, {2, {0x00df, 0x1e9e}}},
+ {{0x0073, 0x0074}, {2, {0xfb05, 0xfb06}}},
+ {{0x0074, 0x0308}, {1, {0x1e97}}},
+ {{0x0077, 0x030a}, {1, {0x1e98}}},
+ {{0x0079, 0x030a}, {1, {0x1e99}}},
+ {{0x02bc, 0x006e}, {1, {0x0149}}},
+ {{0x03ac, 0x03b9}, {1, {0x1fb4}}},
+ {{0x03ae, 0x03b9}, {1, {0x1fc4}}},
+ {{0x03b1, 0x0342}, {1, {0x1fb6}}},
+ {{0x03b1, 0x03b9}, {2, {0x1fb3, 0x1fbc}}},
+ {{0x03b7, 0x0342}, {1, {0x1fc6}}},
+ {{0x03b7, 0x03b9}, {2, {0x1fc3, 0x1fcc}}},
+ {{0x03b9, 0x0342}, {1, {0x1fd6}}},
+ {{0x03c1, 0x0313}, {1, {0x1fe4}}},
+ {{0x03c5, 0x0313}, {1, {0x1f50}}},
+ {{0x03c5, 0x0342}, {1, {0x1fe6}}},
+ {{0x03c9, 0x0342}, {1, {0x1ff6}}},
+ {{0x03c9, 0x03b9}, {2, {0x1ff3, 0x1ffc}}},
+ {{0x03ce, 0x03b9}, {1, {0x1ff4}}},
+ {{0x0565, 0x0582}, {1, {0x0587}}},
+ {{0x0574, 0x0565}, {1, {0xfb14}}},
+ {{0x0574, 0x056b}, {1, {0xfb15}}},
+ {{0x0574, 0x056d}, {1, {0xfb17}}},
+ {{0x0574, 0x0576}, {1, {0xfb13}}},
+ {{0x057e, 0x0576}, {1, {0xfb16}}},
+ {{0x1f00, 0x03b9}, {2, {0x1f80, 0x1f88}}},
+ {{0x1f01, 0x03b9}, {2, {0x1f81, 0x1f89}}},
+ {{0x1f02, 0x03b9}, {2, {0x1f82, 0x1f8a}}},
+ {{0x1f03, 0x03b9}, {2, {0x1f83, 0x1f8b}}},
+ {{0x1f04, 0x03b9}, {2, {0x1f84, 0x1f8c}}},
+ {{0x1f05, 0x03b9}, {2, {0x1f85, 0x1f8d}}},
+ {{0x1f06, 0x03b9}, {2, {0x1f86, 0x1f8e}}},
+ {{0x1f07, 0x03b9}, {2, {0x1f87, 0x1f8f}}},
+ {{0x1f20, 0x03b9}, {2, {0x1f90, 0x1f98}}},
+ {{0x1f21, 0x03b9}, {2, {0x1f91, 0x1f99}}},
+ {{0x1f22, 0x03b9}, {2, {0x1f92, 0x1f9a}}},
+ {{0x1f23, 0x03b9}, {2, {0x1f93, 0x1f9b}}},
+ {{0x1f24, 0x03b9}, {2, {0x1f94, 0x1f9c}}},
+ {{0x1f25, 0x03b9}, {2, {0x1f95, 0x1f9d}}},
+ {{0x1f26, 0x03b9}, {2, {0x1f96, 0x1f9e}}},
+ {{0x1f27, 0x03b9}, {2, {0x1f97, 0x1f9f}}},
+ {{0x1f60, 0x03b9}, {2, {0x1fa0, 0x1fa8}}},
+ {{0x1f61, 0x03b9}, {2, {0x1fa1, 0x1fa9}}},
+ {{0x1f62, 0x03b9}, {2, {0x1fa2, 0x1faa}}},
+ {{0x1f63, 0x03b9}, {2, {0x1fa3, 0x1fab}}},
+ {{0x1f64, 0x03b9}, {2, {0x1fa4, 0x1fac}}},
+ {{0x1f65, 0x03b9}, {2, {0x1fa5, 0x1fad}}},
+ {{0x1f66, 0x03b9}, {2, {0x1fa6, 0x1fae}}},
+ {{0x1f67, 0x03b9}, {2, {0x1fa7, 0x1faf}}},
+ {{0x1f70, 0x03b9}, {1, {0x1fb2}}},
+ {{0x1f74, 0x03b9}, {1, {0x1fc2}}},
+ {{0x1f7c, 0x03b9}, {1, {0x1ff2}}},
+#define CaseUnfold_12_Locale (*(CaseUnfold_12_Type (*)[1])(CaseUnfold_12_Table+58))
+ {{0x0069, 0x0307}, {1, {0x0130}}},
+};
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -7 -k1,2,3,4,5,6 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_12_hash -N onigenc_unicode_CaseUnfold_12_lookup -n */
+
+/* maximum key range = 71, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+/*ARGSUSED*/
+static unsigned int
+onigenc_unicode_CaseUnfold_12_hash(const OnigCodePoint *codes)
+{
+ static const unsigned char asso_values[] =
+ {
+ 3, 58, 54, 57, 56, 16, 8, 2, 43, 82,
+ 3, 1, 23, 82, 82, 82, 82, 82, 82, 4,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 52, 51, 50, 49, 48, 47, 46, 45,
+ 82, 82, 82, 82, 43, 82, 42, 82, 82, 13,
+ 82, 82, 82, 82, 82, 11, 82, 1, 82, 82,
+ 14, 82, 1, 82, 82, 31, 3, 82, 82, 30,
+ 82, 82, 82, 10, 82, 82, 82, 82, 37, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 37, 15, 36, 35,
+ 34, 17, 1, 33, 12, 4, 23, 23, 26, 21,
+ 13, 82, 27, 82, 82, 2, 5, 82, 11, 16,
+ 82, 15, 82, 82, 23, 82, 8, 82
+ };
+ return asso_values[bits_at(codes, 5)] + asso_values[bits_at(codes, 4)] + asso_values[bits_at(codes, 3)] + asso_values[bits_at(codes, 2)] + asso_values[bits_at(codes, 1)] + asso_values[bits_at(codes, 0)];
+}
+
+static const CodePointList2 *
+onigenc_unicode_CaseUnfold_12_lookup(const OnigCodePoint *codes)
+{
+ enum
+ {
+ MIN_CODE_VALUE = 0x61,
+ MAX_CODE_VALUE = 0x1f7c,
+ TOTAL_KEYWORDS = 59,
+ MIN_WORD_LENGTH = 6,
+ MAX_WORD_LENGTH = 6,
+ MIN_HASH_VALUE = 11,
+ MAX_HASH_VALUE = 81
+ };
+
+ static const short wordlist[] =
+ {
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1,
+ /*0x1f66,0x03b9*/ 53,
+ /*0x1f07,0x03b9*/ 38,
+ /*0x1f00,0x03b9*/ 31,
+ /*0x0066,0x0066*/ 1,
+ /*0x1f74,0x03b9*/ 56,
+ /*0x0073,0x0073*/ 6,
+ /*0x0066,0x0069*/ 2,
+ /*0x1f06,0x03b9*/ 37,
+ /*0x0073,0x0074*/ 7,
+ /*0x03b9,0x0342*/ 18,
+ /*0x03c9,0x03b9*/ 23,
+ /*0x03b7,0x03b9*/ 17,
+ /*0x0069,0x0307*/ 58,
+ /*0x03b1,0x03b9*/ 15,
+ /*0x1f61,0x03b9*/ 48,
+ /*0x1f05,0x03b9*/ 36,
+ /*0x1f65,0x03b9*/ 52,
+ /*0x0574,0x0576*/ 29,
+ /*0x03c9,0x0342*/ 22,
+ /*0x03b7,0x0342*/ 16,
+ /*0x057e,0x0576*/ 30,
+ /*0x03b1,0x0342*/ 14,
+ /*0x1f7c,0x03b9*/ 57,
+ /*0x0574,0x0565*/ 26,
+ /*0x0079,0x030a*/ 10,
+ /*0x0077,0x030a*/ 9,
+ /*0x1f70,0x03b9*/ 55,
+ /*0x0574,0x056d*/ 28,
+ /*0x0066,0x006c*/ 3,
+ /*0x0574,0x056b*/ 27,
+ /*0x0061,0x02be*/ 0,
+ /*0x0068,0x0331*/ 4,
+ /*0x1f67,0x03b9*/ 54,
+ /*0x1f64,0x03b9*/ 51,
+ /*0x1f63,0x03b9*/ 50,
+ /*0x1f62,0x03b9*/ 49,
+ /*0x1f60,0x03b9*/ 47,
+ /*0x03ce,0x03b9*/ 24,
+ /*0x03c5,0x0342*/ 21,
+ /*0x03c5,0x0313*/ 20,
+ /*0x03c1,0x0313*/ 19,
+ /*0x02bc,0x006e*/ 11,
+ /*0x03ae,0x03b9*/ 13,
+ /*0x03ac,0x03b9*/ 12,
+ /*0x1f27,0x03b9*/ 46,
+ /*0x1f26,0x03b9*/ 45,
+ /*0x1f25,0x03b9*/ 44,
+ /*0x1f24,0x03b9*/ 43,
+ /*0x1f23,0x03b9*/ 42,
+ /*0x1f22,0x03b9*/ 41,
+ /*0x1f21,0x03b9*/ 40,
+ /*0x1f20,0x03b9*/ 39,
+ /*0x006a,0x030c*/ 5,
+ /*0x1f02,0x03b9*/ 33,
+ /*0x0074,0x0308*/ 8,
+ /*0x1f04,0x03b9*/ 35,
+ /*0x1f03,0x03b9*/ 34,
+ /*0x1f01,0x03b9*/ 32,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ /*0x0565,0x0582*/ 25
+ };
+
+ if (codes[0] <= MAX_CODE_VALUE && codes[0] >= MIN_CODE_VALUE &&
+ codes[1] <= MAX_CODE_VALUE && codes[1] >= MIN_CODE_VALUE)
+ {
+ register unsigned int key = onigenc_unicode_CaseUnfold_12_hash(codes);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register short s = wordlist[key];
+
+ if (s >= 0 && code2_equal(codes, CaseUnfold_12_Table[s].from))
+ return &CaseUnfold_12_Table[s].to;
+ }
+ }
+ return 0;
+}
+
+static const CaseUnfold_13_Type CaseUnfold_13_Table[] = {
+#define CaseUnfold_13 (*(CaseUnfold_13_Type (*)[14])(CaseUnfold_13_Table+0))
+ {{0x0066, 0x0066, 0x0069}, {1, {0xfb03}}},
+ {{0x0066, 0x0066, 0x006c}, {1, {0xfb04}}},
+ {{0x03b1, 0x0342, 0x03b9}, {1, {0x1fb7}}},
+ {{0x03b7, 0x0342, 0x03b9}, {1, {0x1fc7}}},
+ {{0x03b9, 0x0308, 0x0300}, {1, {0x1fd2}}},
+ {{0x03b9, 0x0308, 0x0301}, {2, {0x0390, 0x1fd3}}},
+ {{0x03b9, 0x0308, 0x0342}, {1, {0x1fd7}}},
+ {{0x03c5, 0x0308, 0x0300}, {1, {0x1fe2}}},
+ {{0x03c5, 0x0308, 0x0301}, {2, {0x03b0, 0x1fe3}}},
+ {{0x03c5, 0x0308, 0x0342}, {1, {0x1fe7}}},
+ {{0x03c5, 0x0313, 0x0300}, {1, {0x1f52}}},
+ {{0x03c5, 0x0313, 0x0301}, {1, {0x1f54}}},
+ {{0x03c5, 0x0313, 0x0342}, {1, {0x1f56}}},
+ {{0x03c9, 0x0342, 0x03b9}, {1, {0x1ff7}}},
+};
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -7 -k1,2,3,4,5,6,7,8,9 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_13_hash -N onigenc_unicode_CaseUnfold_13_lookup -n */
+
+/* maximum key range = 20, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+/*ARGSUSED*/
+static unsigned int
+onigenc_unicode_CaseUnfold_13_hash(const OnigCodePoint *codes)
+{
+ static const unsigned char asso_values[] =
+ {
+ 7, 4, 47, 47, 47, 47, 1, 1, 2, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 1,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 11,
+ 47, 47, 47, 47, 47, 10, 47, 2, 47, 47,
+ 47, 47, 47, 47, 47, 47, 1, 47, 47, 1,
+ 47, 47, 47, 9, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 1, 47, 47, 2, 47, 47, 1, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47
+ };
+ return asso_values[bits_at(codes, 8)] + asso_values[bits_at(codes, 7)] + asso_values[bits_at(codes, 6)] + asso_values[bits_at(codes, 5)] + asso_values[bits_at(codes, 4)] + asso_values[bits_at(codes, 3)] + asso_values[bits_at(codes, 2)] + asso_values[bits_at(codes, 1)] + asso_values[bits_at(codes, 0)];
+}
+
+static const CodePointList2 *
+onigenc_unicode_CaseUnfold_13_lookup(const OnigCodePoint *codes)
+{
+ enum
+ {
+ MIN_CODE_VALUE = 0x66,
+ MAX_CODE_VALUE = 0x3c9,
+ TOTAL_KEYWORDS = 14,
+ MIN_WORD_LENGTH = 9,
+ MAX_WORD_LENGTH = 9,
+ MIN_HASH_VALUE = 27,
+ MAX_HASH_VALUE = 46
+ };
+
+ static const short wordlist[] =
+ {
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ /*0x03c5,0x0313,0x0342*/ 12,
+ /*0x03c5,0x0308,0x0342*/ 9,
+ /*0x03b9,0x0308,0x0342*/ 6,
+ /*0x03c5,0x0313,0x0301*/ 11,
+ /*0x03c5,0x0308,0x0301*/ 8,
+ /*0x03b9,0x0308,0x0301*/ 5,
+ /*0x03c5,0x0313,0x0300*/ 10,
+ /*0x03c5,0x0308,0x0300*/ 7,
+ /*0x03b9,0x0308,0x0300*/ 4,
+ /*0x03c9,0x0342,0x03b9*/ 13,
+ /*0x03b7,0x0342,0x03b9*/ 3,
+ /*0x03b1,0x0342,0x03b9*/ 2,
+ -1, -1, -1, -1, -1, -1,
+ /*0x0066,0x0066,0x006c*/ 1,
+ /*0x0066,0x0066,0x0069*/ 0
+ };
+
+ if (codes[0] <= MAX_CODE_VALUE && codes[0] >= MIN_CODE_VALUE &&
+ codes[1] <= MAX_CODE_VALUE && codes[1] >= MIN_CODE_VALUE &&
+ codes[2] <= MAX_CODE_VALUE && codes[2] >= MIN_CODE_VALUE)
+ {
+ register unsigned int key = onigenc_unicode_CaseUnfold_13_hash(codes);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register short s = wordlist[key];
+
+ if (s >= 0 && code3_equal(codes, CaseUnfold_13_Table[s].from))
+ return &CaseUnfold_13_Table[s].to;
+ }
+ }
+ return 0;
+}
+
+static const OnigCodePoint CaseMappingSpecials[] = {
+ L(1)|0x039C,
+ L(2)|0x0053, 0x0073, L(2)|0x0053, 0x0053,
+ L(2)|0x02BC, 0x004E,
+ L(1)|0x0053,
+ L(1)|0x01C5,
+ L(2)|0x0064, 0x017D, L(1)|0x01C4,
+ L(1)|0x01C8,
+ L(2)|0x006C, 0x004A, L(1)|0x01C7,
+ L(1)|0x01CB,
+ L(2)|0x006E, 0x004A, L(1)|0x01CA,
+ L(2)|0x004A, 0x030C,
+ L(1)|0x01F2,
+ L(2)|0x0064, 0x005A, L(1)|0x01F1,
+ L(1)|0x0399,
+ L(3)|0x0399, 0x0308, 0x0301,
+ L(3)|0x03A5, 0x0308, 0x0301,
+ L(1)|0x03A3,
+ L(1)|0x0392,
+ L(1)|0x0398,
+ L(1)|0x03A6,
+ L(1)|0x03A0,
+ L(1)|0x039A,
+ L(1)|0x03A1,
+ L(1)|0x0395,
+ L(2)|0x0535, 0x0582, L(2)|0x0535, 0x0552,
+ L(1)|0x0412,
+ L(1)|0x0414,
+ L(1)|0x041E,
+ L(1)|0x0421,
+ L(1)|0x0422,
+ L(1)|0x0422,
+ L(1)|0x042A,
+ L(1)|0x0462,
+ L(1)|0xA64A,
+ L(2)|0x0048, 0x0331,
+ L(2)|0x0054, 0x0308,
+ L(2)|0x0057, 0x030A,
+ L(2)|0x0059, 0x030A,
+ L(2)|0x0041, 0x02BE,
+ L(1)|0x1E60,
+ L(1)|0x00DF,
+ L(2)|0x03A5, 0x0313,
+ L(3)|0x03A5, 0x0313, 0x0300,
+ L(3)|0x03A5, 0x0313, 0x0301,
+ L(3)|0x03A5, 0x0313, 0x0342,
+ L(1)|0x1F88, L(2)|0x1F08, 0x0399,
+ L(1)|0x1F89, L(2)|0x1F09, 0x0399,
+ L(1)|0x1F8A, L(2)|0x1F0A, 0x0399,
+ L(1)|0x1F8B, L(2)|0x1F0B, 0x0399,
+ L(1)|0x1F8C, L(2)|0x1F0C, 0x0399,
+ L(1)|0x1F8D, L(2)|0x1F0D, 0x0399,
+ L(1)|0x1F8E, L(2)|0x1F0E, 0x0399,
+ L(1)|0x1F8F, L(2)|0x1F0F, 0x0399,
+ L(2)|0x1F00, 0x0399, L(1)|0x1F80, L(2)|0x1F08, 0x0399,
+ L(2)|0x1F01, 0x0399, L(1)|0x1F81, L(2)|0x1F09, 0x0399,
+ L(2)|0x1F02, 0x0399, L(1)|0x1F82, L(2)|0x1F0A, 0x0399,
+ L(2)|0x1F03, 0x0399, L(1)|0x1F83, L(2)|0x1F0B, 0x0399,
+ L(2)|0x1F04, 0x0399, L(1)|0x1F84, L(2)|0x1F0C, 0x0399,
+ L(2)|0x1F05, 0x0399, L(1)|0x1F85, L(2)|0x1F0D, 0x0399,
+ L(2)|0x1F06, 0x0399, L(1)|0x1F86, L(2)|0x1F0E, 0x0399,
+ L(2)|0x1F07, 0x0399, L(1)|0x1F87, L(2)|0x1F0F, 0x0399,
+ L(1)|0x1F98, L(2)|0x1F28, 0x0399,
+ L(1)|0x1F99, L(2)|0x1F29, 0x0399,
+ L(1)|0x1F9A, L(2)|0x1F2A, 0x0399,
+ L(1)|0x1F9B, L(2)|0x1F2B, 0x0399,
+ L(1)|0x1F9C, L(2)|0x1F2C, 0x0399,
+ L(1)|0x1F9D, L(2)|0x1F2D, 0x0399,
+ L(1)|0x1F9E, L(2)|0x1F2E, 0x0399,
+ L(1)|0x1F9F, L(2)|0x1F2F, 0x0399,
+ L(2)|0x1F20, 0x0399, L(1)|0x1F90, L(2)|0x1F28, 0x0399,
+ L(2)|0x1F21, 0x0399, L(1)|0x1F91, L(2)|0x1F29, 0x0399,
+ L(2)|0x1F22, 0x0399, L(1)|0x1F92, L(2)|0x1F2A, 0x0399,
+ L(2)|0x1F23, 0x0399, L(1)|0x1F93, L(2)|0x1F2B, 0x0399,
+ L(2)|0x1F24, 0x0399, L(1)|0x1F94, L(2)|0x1F2C, 0x0399,
+ L(2)|0x1F25, 0x0399, L(1)|0x1F95, L(2)|0x1F2D, 0x0399,
+ L(2)|0x1F26, 0x0399, L(1)|0x1F96, L(2)|0x1F2E, 0x0399,
+ L(2)|0x1F27, 0x0399, L(1)|0x1F97, L(2)|0x1F2F, 0x0399,
+ L(1)|0x1FA8, L(2)|0x1F68, 0x0399,
+ L(1)|0x1FA9, L(2)|0x1F69, 0x0399,
+ L(1)|0x1FAA, L(2)|0x1F6A, 0x0399,
+ L(1)|0x1FAB, L(2)|0x1F6B, 0x0399,
+ L(1)|0x1FAC, L(2)|0x1F6C, 0x0399,
+ L(1)|0x1FAD, L(2)|0x1F6D, 0x0399,
+ L(1)|0x1FAE, L(2)|0x1F6E, 0x0399,
+ L(1)|0x1FAF, L(2)|0x1F6F, 0x0399,
+ L(2)|0x1F60, 0x0399, L(1)|0x1FA0, L(2)|0x1F68, 0x0399,
+ L(2)|0x1F61, 0x0399, L(1)|0x1FA1, L(2)|0x1F69, 0x0399,
+ L(2)|0x1F62, 0x0399, L(1)|0x1FA2, L(2)|0x1F6A, 0x0399,
+ L(2)|0x1F63, 0x0399, L(1)|0x1FA3, L(2)|0x1F6B, 0x0399,
+ L(2)|0x1F64, 0x0399, L(1)|0x1FA4, L(2)|0x1F6C, 0x0399,
+ L(2)|0x1F65, 0x0399, L(1)|0x1FA5, L(2)|0x1F6D, 0x0399,
+ L(2)|0x1F66, 0x0399, L(1)|0x1FA6, L(2)|0x1F6E, 0x0399,
+ L(2)|0x1F67, 0x0399, L(1)|0x1FA7, L(2)|0x1F6F, 0x0399,
+ L(2)|0x1FBA, 0x0345, L(2)|0x1FBA, 0x0399,
+ L(1)|0x1FBC, L(2)|0x0391, 0x0399,
+ L(2)|0x0386, 0x0345, L(2)|0x0386, 0x0399,
+ L(2)|0x0391, 0x0342,
+ L(3)|0x0391, 0x0342, 0x0345, L(3)|0x0391, 0x0342, 0x0399,
+ L(2)|0x03B1, 0x0399, L(1)|0x1FB3, L(2)|0x0391, 0x0399,
+ L(1)|0x0399,
+ L(2)|0x1FCA, 0x0345, L(2)|0x1FCA, 0x0399,
+ L(1)|0x1FCC, L(2)|0x0397, 0x0399,
+ L(2)|0x0389, 0x0345, L(2)|0x0389, 0x0399,
+ L(2)|0x0397, 0x0342,
+ L(3)|0x0397, 0x0342, 0x0345, L(3)|0x0397, 0x0342, 0x0399,
+ L(2)|0x03B7, 0x0399, L(1)|0x1FC3, L(2)|0x0397, 0x0399,
+ L(3)|0x0399, 0x0308, 0x0300,
+ L(3)|0x0399, 0x0308, 0x0301,
+ L(2)|0x0399, 0x0342,
+ L(3)|0x0399, 0x0308, 0x0342,
+ L(3)|0x03A5, 0x0308, 0x0300,
+ L(3)|0x03A5, 0x0308, 0x0301,
+ L(2)|0x03A1, 0x0313,
+ L(2)|0x03A5, 0x0342,
+ L(3)|0x03A5, 0x0308, 0x0342,
+ L(2)|0x1FFA, 0x0345, L(2)|0x1FFA, 0x0399,
+ L(1)|0x1FFC, L(2)|0x03A9, 0x0399,
+ L(2)|0x038F, 0x0345, L(2)|0x038F, 0x0399,
+ L(2)|0x03A9, 0x0342,
+ L(3)|0x03A9, 0x0342, 0x0345, L(3)|0x03A9, 0x0342, 0x0399,
+ L(2)|0x03C9, 0x0399, L(1)|0x1FF3, L(2)|0x03A9, 0x0399,
+ L(2)|0x0046, 0x0066, L(2)|0x0046, 0x0046,
+ L(2)|0x0046, 0x0069, L(2)|0x0046, 0x0049,
+ L(2)|0x0046, 0x006C, L(2)|0x0046, 0x004C,
+ L(3)|0x0046, 0x0066, 0x0069, L(3)|0x0046, 0x0046, 0x0049,
+ L(3)|0x0046, 0x0066, 0x006C, L(3)|0x0046, 0x0046, 0x004C,
+ L(2)|0x0053, 0x0074, L(2)|0x0053, 0x0054,
+ L(2)|0x0053, 0x0074, L(2)|0x0053, 0x0054,
+ L(2)|0x0544, 0x0576, L(2)|0x0544, 0x0546,
+ L(2)|0x0544, 0x0565, L(2)|0x0544, 0x0535,
+ L(2)|0x0544, 0x056B, L(2)|0x0544, 0x053B,
+ L(2)|0x054E, 0x0576, L(2)|0x054E, 0x0546,
+ L(2)|0x0544, 0x056D, L(2)|0x0544, 0x053D,
+};
diff --git a/enc/unicode/15.0.0/name2ctype.h b/enc/unicode/15.0.0/name2ctype.h
new file mode 100644
index 0000000000..a2c996423d
--- /dev/null
+++ b/enc/unicode/15.0.0/name2ctype.h
@@ -0,0 +1,45690 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p */
+#ifndef USE_UNICODE_PROPERTIES
+/* Computed positions: -k'1,3' */
+#else /* USE_UNICODE_PROPERTIES */
+/* Computed positions: -k'1-3,5-6,12,16,$' */
+#endif /* USE_UNICODE_PROPERTIES */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646. */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
+#endif
+
+
+
+/* 'NEWLINE': [[:NEWLINE:]] */
+static const OnigCodePoint CR_NEWLINE[] = {
+ 1,
+ 0x000a, 0x000a,
+}; /* CR_NEWLINE */
+
+/* 'Alpha': [[:Alpha:]] */
+static const OnigCodePoint CR_Alpha[] = {
+ 732,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0345, 0x0345,
+ 0x0370, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x05b0, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0610, 0x061a,
+ 0x0620, 0x0657,
+ 0x0659, 0x065f,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06e1, 0x06e8,
+ 0x06ed, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x073f,
+ 0x074d, 0x07b1,
+ 0x07ca, 0x07ea,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x0800, 0x0817,
+ 0x081a, 0x082c,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x08d4, 0x08df,
+ 0x08e3, 0x08e9,
+ 0x08f0, 0x093b,
+ 0x093d, 0x094c,
+ 0x094e, 0x0950,
+ 0x0955, 0x0963,
+ 0x0971, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09ce, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09f0, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4c,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a70, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0af9, 0x0afc,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4c,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c80, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccc,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d7a, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e46,
+ 0x0e4d, 0x0e4d,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ecd, 0x0ecd,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f83,
+ 0x0f88, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x1000, 0x1036,
+ 0x1038, 0x1038,
+ 0x103b, 0x103f,
+ 0x1050, 0x108f,
+ 0x109a, 0x109d,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1713,
+ 0x171f, 0x1733,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17b3,
+ 0x17b6, 0x17c8,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x1938,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a1b,
+ 0x1a20, 0x1a5e,
+ 0x1a61, 0x1a74,
+ 0x1aa7, 0x1aa7,
+ 0x1abf, 0x1ac0,
+ 0x1acc, 0x1ace,
+ 0x1b00, 0x1b33,
+ 0x1b35, 0x1b43,
+ 0x1b45, 0x1b4c,
+ 0x1b80, 0x1ba9,
+ 0x1bac, 0x1baf,
+ 0x1bba, 0x1be5,
+ 0x1be7, 0x1bf1,
+ 0x1c00, 0x1c36,
+ 0x1c4d, 0x1c4f,
+ 0x1c5a, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1de7, 0x1df4,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x24b6, 0x24e9,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2dff,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3007,
+ 0x3021, 0x3029,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa61f,
+ 0xa62a, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa674, 0xa67b,
+ 0xa67f, 0xa6ef,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa805,
+ 0xa807, 0xa827,
+ 0xa840, 0xa873,
+ 0xa880, 0xa8c3,
+ 0xa8c5, 0xa8c5,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa8ff,
+ 0xa90a, 0xa92a,
+ 0xa930, 0xa952,
+ 0xa960, 0xa97c,
+ 0xa980, 0xa9b2,
+ 0xa9b4, 0xa9bf,
+ 0xa9cf, 0xa9cf,
+ 0xa9e0, 0xa9ef,
+ 0xa9fa, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaabe,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaef,
+ 0xaaf2, 0xaaf5,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabea,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d27,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10eac,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11045,
+ 0x11071, 0x11075,
+ 0x11080, 0x110b8,
+ 0x110c2, 0x110c2,
+ 0x110d0, 0x110e8,
+ 0x11100, 0x11132,
+ 0x11144, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11180, 0x111bf,
+ 0x111c1, 0x111c4,
+ 0x111ce, 0x111cf,
+ 0x111da, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x11234,
+ 0x11237, 0x11237,
+ 0x1123e, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112e8,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134c,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11400, 0x11441,
+ 0x11443, 0x11445,
+ 0x11447, 0x1144a,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114c1,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115be,
+ 0x115d8, 0x115dd,
+ 0x11600, 0x1163e,
+ 0x11640, 0x11640,
+ 0x11644, 0x11644,
+ 0x11680, 0x116b5,
+ 0x116b8, 0x116b8,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172a,
+ 0x11740, 0x11746,
+ 0x11800, 0x11838,
+ 0x118a0, 0x118df,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x1193c,
+ 0x1193f, 0x11942,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119df,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e4,
+ 0x11a00, 0x11a32,
+ 0x11a35, 0x11a3e,
+ 0x11a50, 0x11a97,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c3e,
+ 0x11c40, 0x11c40,
+ 0x11c72, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d41,
+ 0x11d43, 0x11d43,
+ 0x11d46, 0x11d47,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d96,
+ 0x11d98, 0x11d98,
+ 0x11ee0, 0x11ef6,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f40,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a70, 0x16abe,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b40, 0x16b43,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9e, 0x1bc9e,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e900, 0x1e943,
+ 0x1e947, 0x1e947,
+ 0x1e94b, 0x1e94b,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Alpha */
+
+/* 'Blank': [[:Blank:]] */
+static const OnigCodePoint CR_Blank[] = {
+ 8,
+ 0x0009, 0x0009,
+ 0x0020, 0x0020,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x2000, 0x200a,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000,
+}; /* CR_Blank */
+
+/* 'Cntrl': [[:Cntrl:]] */
+static const OnigCodePoint CR_Cntrl[] = {
+ 2,
+ 0x0000, 0x001f,
+ 0x007f, 0x009f,
+}; /* CR_Cntrl */
+
+/* 'Digit': [[:Digit:]] */
+static const OnigCodePoint CR_Digit[] = {
+ 64,
+ 0x0030, 0x0039,
+ 0x0660, 0x0669,
+ 0x06f0, 0x06f9,
+ 0x07c0, 0x07c9,
+ 0x0966, 0x096f,
+ 0x09e6, 0x09ef,
+ 0x0a66, 0x0a6f,
+ 0x0ae6, 0x0aef,
+ 0x0b66, 0x0b6f,
+ 0x0be6, 0x0bef,
+ 0x0c66, 0x0c6f,
+ 0x0ce6, 0x0cef,
+ 0x0d66, 0x0d6f,
+ 0x0de6, 0x0def,
+ 0x0e50, 0x0e59,
+ 0x0ed0, 0x0ed9,
+ 0x0f20, 0x0f29,
+ 0x1040, 0x1049,
+ 0x1090, 0x1099,
+ 0x17e0, 0x17e9,
+ 0x1810, 0x1819,
+ 0x1946, 0x194f,
+ 0x19d0, 0x19d9,
+ 0x1a80, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1b50, 0x1b59,
+ 0x1bb0, 0x1bb9,
+ 0x1c40, 0x1c49,
+ 0x1c50, 0x1c59,
+ 0xa620, 0xa629,
+ 0xa8d0, 0xa8d9,
+ 0xa900, 0xa909,
+ 0xa9d0, 0xa9d9,
+ 0xa9f0, 0xa9f9,
+ 0xaa50, 0xaa59,
+ 0xabf0, 0xabf9,
+ 0xff10, 0xff19,
+ 0x104a0, 0x104a9,
+ 0x10d30, 0x10d39,
+ 0x11066, 0x1106f,
+ 0x110f0, 0x110f9,
+ 0x11136, 0x1113f,
+ 0x111d0, 0x111d9,
+ 0x112f0, 0x112f9,
+ 0x11450, 0x11459,
+ 0x114d0, 0x114d9,
+ 0x11650, 0x11659,
+ 0x116c0, 0x116c9,
+ 0x11730, 0x11739,
+ 0x118e0, 0x118e9,
+ 0x11950, 0x11959,
+ 0x11c50, 0x11c59,
+ 0x11d50, 0x11d59,
+ 0x11da0, 0x11da9,
+ 0x11f50, 0x11f59,
+ 0x16a60, 0x16a69,
+ 0x16ac0, 0x16ac9,
+ 0x16b50, 0x16b59,
+ 0x1d7ce, 0x1d7ff,
+ 0x1e140, 0x1e149,
+ 0x1e2f0, 0x1e2f9,
+ 0x1e4f0, 0x1e4f9,
+ 0x1e950, 0x1e959,
+ 0x1fbf0, 0x1fbf9,
+}; /* CR_Digit */
+
+/* 'Graph': [[:Graph:]] */
+static const OnigCodePoint CR_Graph[] = {
+ 712,
+ 0x0021, 0x007e,
+ 0x00a1, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x167f,
+ 0x1681, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x200b, 0x2027,
+ 0x202a, 0x202e,
+ 0x2030, 0x205e,
+ 0x2060, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3001, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xe000, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfdcf,
+ 0xfdf0, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10f70, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11b00, 0x11b09,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1ea,
+ 0x1d200, 0x1d245,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd,
+}; /* CR_Graph */
+
+/* 'Lower': [[:Lower:]] */
+static const OnigCodePoint CR_Lower[] = {
+ 671,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00df, 0x00f6,
+ 0x00f8, 0x00ff,
+ 0x0101, 0x0101,
+ 0x0103, 0x0103,
+ 0x0105, 0x0105,
+ 0x0107, 0x0107,
+ 0x0109, 0x0109,
+ 0x010b, 0x010b,
+ 0x010d, 0x010d,
+ 0x010f, 0x010f,
+ 0x0111, 0x0111,
+ 0x0113, 0x0113,
+ 0x0115, 0x0115,
+ 0x0117, 0x0117,
+ 0x0119, 0x0119,
+ 0x011b, 0x011b,
+ 0x011d, 0x011d,
+ 0x011f, 0x011f,
+ 0x0121, 0x0121,
+ 0x0123, 0x0123,
+ 0x0125, 0x0125,
+ 0x0127, 0x0127,
+ 0x0129, 0x0129,
+ 0x012b, 0x012b,
+ 0x012d, 0x012d,
+ 0x012f, 0x012f,
+ 0x0131, 0x0131,
+ 0x0133, 0x0133,
+ 0x0135, 0x0135,
+ 0x0137, 0x0138,
+ 0x013a, 0x013a,
+ 0x013c, 0x013c,
+ 0x013e, 0x013e,
+ 0x0140, 0x0140,
+ 0x0142, 0x0142,
+ 0x0144, 0x0144,
+ 0x0146, 0x0146,
+ 0x0148, 0x0149,
+ 0x014b, 0x014b,
+ 0x014d, 0x014d,
+ 0x014f, 0x014f,
+ 0x0151, 0x0151,
+ 0x0153, 0x0153,
+ 0x0155, 0x0155,
+ 0x0157, 0x0157,
+ 0x0159, 0x0159,
+ 0x015b, 0x015b,
+ 0x015d, 0x015d,
+ 0x015f, 0x015f,
+ 0x0161, 0x0161,
+ 0x0163, 0x0163,
+ 0x0165, 0x0165,
+ 0x0167, 0x0167,
+ 0x0169, 0x0169,
+ 0x016b, 0x016b,
+ 0x016d, 0x016d,
+ 0x016f, 0x016f,
+ 0x0171, 0x0171,
+ 0x0173, 0x0173,
+ 0x0175, 0x0175,
+ 0x0177, 0x0177,
+ 0x017a, 0x017a,
+ 0x017c, 0x017c,
+ 0x017e, 0x0180,
+ 0x0183, 0x0183,
+ 0x0185, 0x0185,
+ 0x0188, 0x0188,
+ 0x018c, 0x018d,
+ 0x0192, 0x0192,
+ 0x0195, 0x0195,
+ 0x0199, 0x019b,
+ 0x019e, 0x019e,
+ 0x01a1, 0x01a1,
+ 0x01a3, 0x01a3,
+ 0x01a5, 0x01a5,
+ 0x01a8, 0x01a8,
+ 0x01aa, 0x01ab,
+ 0x01ad, 0x01ad,
+ 0x01b0, 0x01b0,
+ 0x01b4, 0x01b4,
+ 0x01b6, 0x01b6,
+ 0x01b9, 0x01ba,
+ 0x01bd, 0x01bf,
+ 0x01c6, 0x01c6,
+ 0x01c9, 0x01c9,
+ 0x01cc, 0x01cc,
+ 0x01ce, 0x01ce,
+ 0x01d0, 0x01d0,
+ 0x01d2, 0x01d2,
+ 0x01d4, 0x01d4,
+ 0x01d6, 0x01d6,
+ 0x01d8, 0x01d8,
+ 0x01da, 0x01da,
+ 0x01dc, 0x01dd,
+ 0x01df, 0x01df,
+ 0x01e1, 0x01e1,
+ 0x01e3, 0x01e3,
+ 0x01e5, 0x01e5,
+ 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9,
+ 0x01eb, 0x01eb,
+ 0x01ed, 0x01ed,
+ 0x01ef, 0x01f0,
+ 0x01f3, 0x01f3,
+ 0x01f5, 0x01f5,
+ 0x01f9, 0x01f9,
+ 0x01fb, 0x01fb,
+ 0x01fd, 0x01fd,
+ 0x01ff, 0x01ff,
+ 0x0201, 0x0201,
+ 0x0203, 0x0203,
+ 0x0205, 0x0205,
+ 0x0207, 0x0207,
+ 0x0209, 0x0209,
+ 0x020b, 0x020b,
+ 0x020d, 0x020d,
+ 0x020f, 0x020f,
+ 0x0211, 0x0211,
+ 0x0213, 0x0213,
+ 0x0215, 0x0215,
+ 0x0217, 0x0217,
+ 0x0219, 0x0219,
+ 0x021b, 0x021b,
+ 0x021d, 0x021d,
+ 0x021f, 0x021f,
+ 0x0221, 0x0221,
+ 0x0223, 0x0223,
+ 0x0225, 0x0225,
+ 0x0227, 0x0227,
+ 0x0229, 0x0229,
+ 0x022b, 0x022b,
+ 0x022d, 0x022d,
+ 0x022f, 0x022f,
+ 0x0231, 0x0231,
+ 0x0233, 0x0239,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
+ 0x0242, 0x0242,
+ 0x0247, 0x0247,
+ 0x0249, 0x0249,
+ 0x024b, 0x024b,
+ 0x024d, 0x024d,
+ 0x024f, 0x0293,
+ 0x0295, 0x02b8,
+ 0x02c0, 0x02c1,
+ 0x02e0, 0x02e4,
+ 0x0345, 0x0345,
+ 0x0371, 0x0371,
+ 0x0373, 0x0373,
+ 0x0377, 0x0377,
+ 0x037a, 0x037d,
+ 0x0390, 0x0390,
+ 0x03ac, 0x03ce,
+ 0x03d0, 0x03d1,
+ 0x03d5, 0x03d7,
+ 0x03d9, 0x03d9,
+ 0x03db, 0x03db,
+ 0x03dd, 0x03dd,
+ 0x03df, 0x03df,
+ 0x03e1, 0x03e1,
+ 0x03e3, 0x03e3,
+ 0x03e5, 0x03e5,
+ 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9,
+ 0x03eb, 0x03eb,
+ 0x03ed, 0x03ed,
+ 0x03ef, 0x03f3,
+ 0x03f5, 0x03f5,
+ 0x03f8, 0x03f8,
+ 0x03fb, 0x03fc,
+ 0x0430, 0x045f,
+ 0x0461, 0x0461,
+ 0x0463, 0x0463,
+ 0x0465, 0x0465,
+ 0x0467, 0x0467,
+ 0x0469, 0x0469,
+ 0x046b, 0x046b,
+ 0x046d, 0x046d,
+ 0x046f, 0x046f,
+ 0x0471, 0x0471,
+ 0x0473, 0x0473,
+ 0x0475, 0x0475,
+ 0x0477, 0x0477,
+ 0x0479, 0x0479,
+ 0x047b, 0x047b,
+ 0x047d, 0x047d,
+ 0x047f, 0x047f,
+ 0x0481, 0x0481,
+ 0x048b, 0x048b,
+ 0x048d, 0x048d,
+ 0x048f, 0x048f,
+ 0x0491, 0x0491,
+ 0x0493, 0x0493,
+ 0x0495, 0x0495,
+ 0x0497, 0x0497,
+ 0x0499, 0x0499,
+ 0x049b, 0x049b,
+ 0x049d, 0x049d,
+ 0x049f, 0x049f,
+ 0x04a1, 0x04a1,
+ 0x04a3, 0x04a3,
+ 0x04a5, 0x04a5,
+ 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9,
+ 0x04ab, 0x04ab,
+ 0x04ad, 0x04ad,
+ 0x04af, 0x04af,
+ 0x04b1, 0x04b1,
+ 0x04b3, 0x04b3,
+ 0x04b5, 0x04b5,
+ 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9,
+ 0x04bb, 0x04bb,
+ 0x04bd, 0x04bd,
+ 0x04bf, 0x04bf,
+ 0x04c2, 0x04c2,
+ 0x04c4, 0x04c4,
+ 0x04c6, 0x04c6,
+ 0x04c8, 0x04c8,
+ 0x04ca, 0x04ca,
+ 0x04cc, 0x04cc,
+ 0x04ce, 0x04cf,
+ 0x04d1, 0x04d1,
+ 0x04d3, 0x04d3,
+ 0x04d5, 0x04d5,
+ 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9,
+ 0x04db, 0x04db,
+ 0x04dd, 0x04dd,
+ 0x04df, 0x04df,
+ 0x04e1, 0x04e1,
+ 0x04e3, 0x04e3,
+ 0x04e5, 0x04e5,
+ 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9,
+ 0x04eb, 0x04eb,
+ 0x04ed, 0x04ed,
+ 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1,
+ 0x04f3, 0x04f3,
+ 0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
+ 0x04f9, 0x04f9,
+ 0x04fb, 0x04fb,
+ 0x04fd, 0x04fd,
+ 0x04ff, 0x04ff,
+ 0x0501, 0x0501,
+ 0x0503, 0x0503,
+ 0x0505, 0x0505,
+ 0x0507, 0x0507,
+ 0x0509, 0x0509,
+ 0x050b, 0x050b,
+ 0x050d, 0x050d,
+ 0x050f, 0x050f,
+ 0x0511, 0x0511,
+ 0x0513, 0x0513,
+ 0x0515, 0x0515,
+ 0x0517, 0x0517,
+ 0x0519, 0x0519,
+ 0x051b, 0x051b,
+ 0x051d, 0x051d,
+ 0x051f, 0x051f,
+ 0x0521, 0x0521,
+ 0x0523, 0x0523,
+ 0x0525, 0x0525,
+ 0x0527, 0x0527,
+ 0x0529, 0x0529,
+ 0x052b, 0x052b,
+ 0x052d, 0x052d,
+ 0x052f, 0x052f,
+ 0x0560, 0x0588,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10ff,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1d00, 0x1dbf,
+ 0x1e01, 0x1e01,
+ 0x1e03, 0x1e03,
+ 0x1e05, 0x1e05,
+ 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09,
+ 0x1e0b, 0x1e0b,
+ 0x1e0d, 0x1e0d,
+ 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11,
+ 0x1e13, 0x1e13,
+ 0x1e15, 0x1e15,
+ 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19,
+ 0x1e1b, 0x1e1b,
+ 0x1e1d, 0x1e1d,
+ 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21,
+ 0x1e23, 0x1e23,
+ 0x1e25, 0x1e25,
+ 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29,
+ 0x1e2b, 0x1e2b,
+ 0x1e2d, 0x1e2d,
+ 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31,
+ 0x1e33, 0x1e33,
+ 0x1e35, 0x1e35,
+ 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39,
+ 0x1e3b, 0x1e3b,
+ 0x1e3d, 0x1e3d,
+ 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41,
+ 0x1e43, 0x1e43,
+ 0x1e45, 0x1e45,
+ 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49,
+ 0x1e4b, 0x1e4b,
+ 0x1e4d, 0x1e4d,
+ 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51,
+ 0x1e53, 0x1e53,
+ 0x1e55, 0x1e55,
+ 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59,
+ 0x1e5b, 0x1e5b,
+ 0x1e5d, 0x1e5d,
+ 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61,
+ 0x1e63, 0x1e63,
+ 0x1e65, 0x1e65,
+ 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69,
+ 0x1e6b, 0x1e6b,
+ 0x1e6d, 0x1e6d,
+ 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71,
+ 0x1e73, 0x1e73,
+ 0x1e75, 0x1e75,
+ 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79,
+ 0x1e7b, 0x1e7b,
+ 0x1e7d, 0x1e7d,
+ 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81,
+ 0x1e83, 0x1e83,
+ 0x1e85, 0x1e85,
+ 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89,
+ 0x1e8b, 0x1e8b,
+ 0x1e8d, 0x1e8d,
+ 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91,
+ 0x1e93, 0x1e93,
+ 0x1e95, 0x1e9d,
+ 0x1e9f, 0x1e9f,
+ 0x1ea1, 0x1ea1,
+ 0x1ea3, 0x1ea3,
+ 0x1ea5, 0x1ea5,
+ 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9,
+ 0x1eab, 0x1eab,
+ 0x1ead, 0x1ead,
+ 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1,
+ 0x1eb3, 0x1eb3,
+ 0x1eb5, 0x1eb5,
+ 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9,
+ 0x1ebb, 0x1ebb,
+ 0x1ebd, 0x1ebd,
+ 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1,
+ 0x1ec3, 0x1ec3,
+ 0x1ec5, 0x1ec5,
+ 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9,
+ 0x1ecb, 0x1ecb,
+ 0x1ecd, 0x1ecd,
+ 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1,
+ 0x1ed3, 0x1ed3,
+ 0x1ed5, 0x1ed5,
+ 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9,
+ 0x1edb, 0x1edb,
+ 0x1edd, 0x1edd,
+ 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1,
+ 0x1ee3, 0x1ee3,
+ 0x1ee5, 0x1ee5,
+ 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9,
+ 0x1eeb, 0x1eeb,
+ 0x1eed, 0x1eed,
+ 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1,
+ 0x1ef3, 0x1ef3,
+ 0x1ef5, 0x1ef5,
+ 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9,
+ 0x1efb, 0x1efb,
+ 0x1efd, 0x1efd,
+ 0x1eff, 0x1f07,
+ 0x1f10, 0x1f15,
+ 0x1f20, 0x1f27,
+ 0x1f30, 0x1f37,
+ 0x1f40, 0x1f45,
+ 0x1f50, 0x1f57,
+ 0x1f60, 0x1f67,
+ 0x1f70, 0x1f7d,
+ 0x1f80, 0x1f87,
+ 0x1f90, 0x1f97,
+ 0x1fa0, 0x1fa7,
+ 0x1fb0, 0x1fb4,
+ 0x1fb6, 0x1fb7,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fc7,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fd7,
+ 0x1fe0, 0x1fe7,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ff7,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x210a, 0x210a,
+ 0x210e, 0x210f,
+ 0x2113, 0x2113,
+ 0x212f, 0x212f,
+ 0x2134, 0x2134,
+ 0x2139, 0x2139,
+ 0x213c, 0x213d,
+ 0x2146, 0x2149,
+ 0x214e, 0x214e,
+ 0x2170, 0x217f,
+ 0x2184, 0x2184,
+ 0x24d0, 0x24e9,
+ 0x2c30, 0x2c5f,
+ 0x2c61, 0x2c61,
+ 0x2c65, 0x2c66,
+ 0x2c68, 0x2c68,
+ 0x2c6a, 0x2c6a,
+ 0x2c6c, 0x2c6c,
+ 0x2c71, 0x2c71,
+ 0x2c73, 0x2c74,
+ 0x2c76, 0x2c7d,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce4,
+ 0x2cec, 0x2cec,
+ 0x2cee, 0x2cee,
+ 0x2cf3, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa641, 0xa641,
+ 0xa643, 0xa643,
+ 0xa645, 0xa645,
+ 0xa647, 0xa647,
+ 0xa649, 0xa649,
+ 0xa64b, 0xa64b,
+ 0xa64d, 0xa64d,
+ 0xa64f, 0xa64f,
+ 0xa651, 0xa651,
+ 0xa653, 0xa653,
+ 0xa655, 0xa655,
+ 0xa657, 0xa657,
+ 0xa659, 0xa659,
+ 0xa65b, 0xa65b,
+ 0xa65d, 0xa65d,
+ 0xa65f, 0xa65f,
+ 0xa661, 0xa661,
+ 0xa663, 0xa663,
+ 0xa665, 0xa665,
+ 0xa667, 0xa667,
+ 0xa669, 0xa669,
+ 0xa66b, 0xa66b,
+ 0xa66d, 0xa66d,
+ 0xa681, 0xa681,
+ 0xa683, 0xa683,
+ 0xa685, 0xa685,
+ 0xa687, 0xa687,
+ 0xa689, 0xa689,
+ 0xa68b, 0xa68b,
+ 0xa68d, 0xa68d,
+ 0xa68f, 0xa68f,
+ 0xa691, 0xa691,
+ 0xa693, 0xa693,
+ 0xa695, 0xa695,
+ 0xa697, 0xa697,
+ 0xa699, 0xa699,
+ 0xa69b, 0xa69d,
+ 0xa723, 0xa723,
+ 0xa725, 0xa725,
+ 0xa727, 0xa727,
+ 0xa729, 0xa729,
+ 0xa72b, 0xa72b,
+ 0xa72d, 0xa72d,
+ 0xa72f, 0xa731,
+ 0xa733, 0xa733,
+ 0xa735, 0xa735,
+ 0xa737, 0xa737,
+ 0xa739, 0xa739,
+ 0xa73b, 0xa73b,
+ 0xa73d, 0xa73d,
+ 0xa73f, 0xa73f,
+ 0xa741, 0xa741,
+ 0xa743, 0xa743,
+ 0xa745, 0xa745,
+ 0xa747, 0xa747,
+ 0xa749, 0xa749,
+ 0xa74b, 0xa74b,
+ 0xa74d, 0xa74d,
+ 0xa74f, 0xa74f,
+ 0xa751, 0xa751,
+ 0xa753, 0xa753,
+ 0xa755, 0xa755,
+ 0xa757, 0xa757,
+ 0xa759, 0xa759,
+ 0xa75b, 0xa75b,
+ 0xa75d, 0xa75d,
+ 0xa75f, 0xa75f,
+ 0xa761, 0xa761,
+ 0xa763, 0xa763,
+ 0xa765, 0xa765,
+ 0xa767, 0xa767,
+ 0xa769, 0xa769,
+ 0xa76b, 0xa76b,
+ 0xa76d, 0xa76d,
+ 0xa76f, 0xa778,
+ 0xa77a, 0xa77a,
+ 0xa77c, 0xa77c,
+ 0xa77f, 0xa77f,
+ 0xa781, 0xa781,
+ 0xa783, 0xa783,
+ 0xa785, 0xa785,
+ 0xa787, 0xa787,
+ 0xa78c, 0xa78c,
+ 0xa78e, 0xa78e,
+ 0xa791, 0xa791,
+ 0xa793, 0xa795,
+ 0xa797, 0xa797,
+ 0xa799, 0xa799,
+ 0xa79b, 0xa79b,
+ 0xa79d, 0xa79d,
+ 0xa79f, 0xa79f,
+ 0xa7a1, 0xa7a1,
+ 0xa7a3, 0xa7a3,
+ 0xa7a5, 0xa7a5,
+ 0xa7a7, 0xa7a7,
+ 0xa7a9, 0xa7a9,
+ 0xa7af, 0xa7af,
+ 0xa7b5, 0xa7b5,
+ 0xa7b7, 0xa7b7,
+ 0xa7b9, 0xa7b9,
+ 0xa7bb, 0xa7bb,
+ 0xa7bd, 0xa7bd,
+ 0xa7bf, 0xa7bf,
+ 0xa7c1, 0xa7c1,
+ 0xa7c3, 0xa7c3,
+ 0xa7c8, 0xa7c8,
+ 0xa7ca, 0xa7ca,
+ 0xa7d1, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d5,
+ 0xa7d7, 0xa7d7,
+ 0xa7d9, 0xa7d9,
+ 0xa7f2, 0xa7f4,
+ 0xa7f6, 0xa7f6,
+ 0xa7f8, 0xa7fa,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff41, 0xff5a,
+ 0x10428, 0x1044f,
+ 0x104d8, 0x104fb,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10780, 0x10780,
+ 0x10783, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10cc0, 0x10cf2,
+ 0x118c0, 0x118df,
+ 0x16e60, 0x16e7f,
+ 0x1d41a, 0x1d433,
+ 0x1d44e, 0x1d454,
+ 0x1d456, 0x1d467,
+ 0x1d482, 0x1d49b,
+ 0x1d4b6, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d4cf,
+ 0x1d4ea, 0x1d503,
+ 0x1d51e, 0x1d537,
+ 0x1d552, 0x1d56b,
+ 0x1d586, 0x1d59f,
+ 0x1d5ba, 0x1d5d3,
+ 0x1d5ee, 0x1d607,
+ 0x1d622, 0x1d63b,
+ 0x1d656, 0x1d66f,
+ 0x1d68a, 0x1d6a5,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6e1,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d71b,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d755,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d78f,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7c9,
+ 0x1d7cb, 0x1d7cb,
+ 0x1df00, 0x1df09,
+ 0x1df0b, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e922, 0x1e943,
+}; /* CR_Lower */
+
+/* 'Print': [[:Print:]] */
+static const OnigCodePoint CR_Print[] = {
+ 709,
+ 0x0020, 0x007e,
+ 0x00a0, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2027,
+ 0x202a, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xe000, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfdcf,
+ 0xfdf0, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10f70, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11b00, 0x11b09,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1ea,
+ 0x1d200, 0x1d245,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd,
+}; /* CR_Print */
+
+/* 'XPosixPunct': [[:Punct:]] */
+static const OnigCodePoint CR_XPosixPunct[] = {
+ 186,
+ 0x0021, 0x002f,
+ 0x003a, 0x0040,
+ 0x005b, 0x0060,
+ 0x007b, 0x007e,
+ 0x00a1, 0x00a1,
+ 0x00a7, 0x00a7,
+ 0x00ab, 0x00ab,
+ 0x00b6, 0x00b7,
+ 0x00bb, 0x00bb,
+ 0x00bf, 0x00bf,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x055a, 0x055f,
+ 0x0589, 0x058a,
+ 0x05be, 0x05be,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05f3, 0x05f4,
+ 0x0609, 0x060a,
+ 0x060c, 0x060d,
+ 0x061b, 0x061b,
+ 0x061d, 0x061f,
+ 0x066a, 0x066d,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070d,
+ 0x07f7, 0x07f9,
+ 0x0830, 0x083e,
+ 0x085e, 0x085e,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x09fd, 0x09fd,
+ 0x0a76, 0x0a76,
+ 0x0af0, 0x0af0,
+ 0x0c77, 0x0c77,
+ 0x0c84, 0x0c84,
+ 0x0df4, 0x0df4,
+ 0x0e4f, 0x0e4f,
+ 0x0e5a, 0x0e5b,
+ 0x0f04, 0x0f12,
+ 0x0f14, 0x0f14,
+ 0x0f3a, 0x0f3d,
+ 0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd4,
+ 0x0fd9, 0x0fda,
+ 0x104a, 0x104f,
+ 0x10fb, 0x10fb,
+ 0x1360, 0x1368,
+ 0x1400, 0x1400,
+ 0x166e, 0x166e,
+ 0x169b, 0x169c,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17d8, 0x17da,
+ 0x1800, 0x180a,
+ 0x1944, 0x1945,
+ 0x1a1e, 0x1a1f,
+ 0x1aa0, 0x1aa6,
+ 0x1aa8, 0x1aad,
+ 0x1b5a, 0x1b60,
+ 0x1b7d, 0x1b7e,
+ 0x1bfc, 0x1bff,
+ 0x1c3b, 0x1c3f,
+ 0x1c7e, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd3, 0x1cd3,
+ 0x2010, 0x2027,
+ 0x2030, 0x2043,
+ 0x2045, 0x2051,
+ 0x2053, 0x205e,
+ 0x207d, 0x207e,
+ 0x208d, 0x208e,
+ 0x2308, 0x230b,
+ 0x2329, 0x232a,
+ 0x2768, 0x2775,
+ 0x27c5, 0x27c6,
+ 0x27e6, 0x27ef,
+ 0x2983, 0x2998,
+ 0x29d8, 0x29db,
+ 0x29fc, 0x29fd,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2d70, 0x2d70,
+ 0x2e00, 0x2e2e,
+ 0x2e30, 0x2e4f,
+ 0x2e52, 0x2e5d,
+ 0x3001, 0x3003,
+ 0x3008, 0x3011,
+ 0x3014, 0x301f,
+ 0x3030, 0x3030,
+ 0x303d, 0x303d,
+ 0x30a0, 0x30a0,
+ 0x30fb, 0x30fb,
+ 0xa4fe, 0xa4ff,
+ 0xa60d, 0xa60f,
+ 0xa673, 0xa673,
+ 0xa67e, 0xa67e,
+ 0xa6f2, 0xa6f7,
+ 0xa874, 0xa877,
+ 0xa8ce, 0xa8cf,
+ 0xa8f8, 0xa8fa,
+ 0xa8fc, 0xa8fc,
+ 0xa92e, 0xa92f,
+ 0xa95f, 0xa95f,
+ 0xa9c1, 0xa9cd,
+ 0xa9de, 0xa9df,
+ 0xaa5c, 0xaa5f,
+ 0xaade, 0xaadf,
+ 0xaaf0, 0xaaf1,
+ 0xabeb, 0xabeb,
+ 0xfd3e, 0xfd3f,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe61,
+ 0xfe63, 0xfe63,
+ 0xfe68, 0xfe68,
+ 0xfe6a, 0xfe6b,
+ 0xff01, 0xff03,
+ 0xff05, 0xff0a,
+ 0xff0c, 0xff0f,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff20,
+ 0xff3b, 0xff3d,
+ 0xff3f, 0xff3f,
+ 0xff5b, 0xff5b,
+ 0xff5d, 0xff5d,
+ 0xff5f, 0xff65,
+ 0x10100, 0x10102,
+ 0x1039f, 0x1039f,
+ 0x103d0, 0x103d0,
+ 0x1056f, 0x1056f,
+ 0x10857, 0x10857,
+ 0x1091f, 0x1091f,
+ 0x1093f, 0x1093f,
+ 0x10a50, 0x10a58,
+ 0x10a7f, 0x10a7f,
+ 0x10af0, 0x10af6,
+ 0x10b39, 0x10b3f,
+ 0x10b99, 0x10b9c,
+ 0x10ead, 0x10ead,
+ 0x10f55, 0x10f59,
+ 0x10f86, 0x10f89,
+ 0x11047, 0x1104d,
+ 0x110bb, 0x110bc,
+ 0x110be, 0x110c1,
+ 0x11140, 0x11143,
+ 0x11174, 0x11175,
+ 0x111c5, 0x111c8,
+ 0x111cd, 0x111cd,
+ 0x111db, 0x111db,
+ 0x111dd, 0x111df,
+ 0x11238, 0x1123d,
+ 0x112a9, 0x112a9,
+ 0x1144b, 0x1144f,
+ 0x1145a, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x114c6, 0x114c6,
+ 0x115c1, 0x115d7,
+ 0x11641, 0x11643,
+ 0x11660, 0x1166c,
+ 0x116b9, 0x116b9,
+ 0x1173c, 0x1173e,
+ 0x1183b, 0x1183b,
+ 0x11944, 0x11946,
+ 0x119e2, 0x119e2,
+ 0x11a3f, 0x11a46,
+ 0x11a9a, 0x11a9c,
+ 0x11a9e, 0x11aa2,
+ 0x11b00, 0x11b09,
+ 0x11c41, 0x11c45,
+ 0x11c70, 0x11c71,
+ 0x11ef7, 0x11ef8,
+ 0x11f43, 0x11f4f,
+ 0x11fff, 0x11fff,
+ 0x12470, 0x12474,
+ 0x12ff1, 0x12ff2,
+ 0x16a6e, 0x16a6f,
+ 0x16af5, 0x16af5,
+ 0x16b37, 0x16b3b,
+ 0x16b44, 0x16b44,
+ 0x16e97, 0x16e9a,
+ 0x16fe2, 0x16fe2,
+ 0x1bc9f, 0x1bc9f,
+ 0x1da87, 0x1da8b,
+ 0x1e95e, 0x1e95f,
+}; /* CR_XPosixPunct */
+
+/* 'Space': [[:Space:]] */
+static const OnigCodePoint CR_Space[] = {
+ 10,
+ 0x0009, 0x000d,
+ 0x0020, 0x0020,
+ 0x0085, 0x0085,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x2000, 0x200a,
+ 0x2028, 0x2029,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000,
+}; /* CR_Space */
+
+/* 'Upper': [[:Upper:]] */
+static const OnigCodePoint CR_Upper[] = {
+ 651,
+ 0x0041, 0x005a,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00de,
+ 0x0100, 0x0100,
+ 0x0102, 0x0102,
+ 0x0104, 0x0104,
+ 0x0106, 0x0106,
+ 0x0108, 0x0108,
+ 0x010a, 0x010a,
+ 0x010c, 0x010c,
+ 0x010e, 0x010e,
+ 0x0110, 0x0110,
+ 0x0112, 0x0112,
+ 0x0114, 0x0114,
+ 0x0116, 0x0116,
+ 0x0118, 0x0118,
+ 0x011a, 0x011a,
+ 0x011c, 0x011c,
+ 0x011e, 0x011e,
+ 0x0120, 0x0120,
+ 0x0122, 0x0122,
+ 0x0124, 0x0124,
+ 0x0126, 0x0126,
+ 0x0128, 0x0128,
+ 0x012a, 0x012a,
+ 0x012c, 0x012c,
+ 0x012e, 0x012e,
+ 0x0130, 0x0130,
+ 0x0132, 0x0132,
+ 0x0134, 0x0134,
+ 0x0136, 0x0136,
+ 0x0139, 0x0139,
+ 0x013b, 0x013b,
+ 0x013d, 0x013d,
+ 0x013f, 0x013f,
+ 0x0141, 0x0141,
+ 0x0143, 0x0143,
+ 0x0145, 0x0145,
+ 0x0147, 0x0147,
+ 0x014a, 0x014a,
+ 0x014c, 0x014c,
+ 0x014e, 0x014e,
+ 0x0150, 0x0150,
+ 0x0152, 0x0152,
+ 0x0154, 0x0154,
+ 0x0156, 0x0156,
+ 0x0158, 0x0158,
+ 0x015a, 0x015a,
+ 0x015c, 0x015c,
+ 0x015e, 0x015e,
+ 0x0160, 0x0160,
+ 0x0162, 0x0162,
+ 0x0164, 0x0164,
+ 0x0166, 0x0166,
+ 0x0168, 0x0168,
+ 0x016a, 0x016a,
+ 0x016c, 0x016c,
+ 0x016e, 0x016e,
+ 0x0170, 0x0170,
+ 0x0172, 0x0172,
+ 0x0174, 0x0174,
+ 0x0176, 0x0176,
+ 0x0178, 0x0179,
+ 0x017b, 0x017b,
+ 0x017d, 0x017d,
+ 0x0181, 0x0182,
+ 0x0184, 0x0184,
+ 0x0186, 0x0187,
+ 0x0189, 0x018b,
+ 0x018e, 0x0191,
+ 0x0193, 0x0194,
+ 0x0196, 0x0198,
+ 0x019c, 0x019d,
+ 0x019f, 0x01a0,
+ 0x01a2, 0x01a2,
+ 0x01a4, 0x01a4,
+ 0x01a6, 0x01a7,
+ 0x01a9, 0x01a9,
+ 0x01ac, 0x01ac,
+ 0x01ae, 0x01af,
+ 0x01b1, 0x01b3,
+ 0x01b5, 0x01b5,
+ 0x01b7, 0x01b8,
+ 0x01bc, 0x01bc,
+ 0x01c4, 0x01c4,
+ 0x01c7, 0x01c7,
+ 0x01ca, 0x01ca,
+ 0x01cd, 0x01cd,
+ 0x01cf, 0x01cf,
+ 0x01d1, 0x01d1,
+ 0x01d3, 0x01d3,
+ 0x01d5, 0x01d5,
+ 0x01d7, 0x01d7,
+ 0x01d9, 0x01d9,
+ 0x01db, 0x01db,
+ 0x01de, 0x01de,
+ 0x01e0, 0x01e0,
+ 0x01e2, 0x01e2,
+ 0x01e4, 0x01e4,
+ 0x01e6, 0x01e6,
+ 0x01e8, 0x01e8,
+ 0x01ea, 0x01ea,
+ 0x01ec, 0x01ec,
+ 0x01ee, 0x01ee,
+ 0x01f1, 0x01f1,
+ 0x01f4, 0x01f4,
+ 0x01f6, 0x01f8,
+ 0x01fa, 0x01fa,
+ 0x01fc, 0x01fc,
+ 0x01fe, 0x01fe,
+ 0x0200, 0x0200,
+ 0x0202, 0x0202,
+ 0x0204, 0x0204,
+ 0x0206, 0x0206,
+ 0x0208, 0x0208,
+ 0x020a, 0x020a,
+ 0x020c, 0x020c,
+ 0x020e, 0x020e,
+ 0x0210, 0x0210,
+ 0x0212, 0x0212,
+ 0x0214, 0x0214,
+ 0x0216, 0x0216,
+ 0x0218, 0x0218,
+ 0x021a, 0x021a,
+ 0x021c, 0x021c,
+ 0x021e, 0x021e,
+ 0x0220, 0x0220,
+ 0x0222, 0x0222,
+ 0x0224, 0x0224,
+ 0x0226, 0x0226,
+ 0x0228, 0x0228,
+ 0x022a, 0x022a,
+ 0x022c, 0x022c,
+ 0x022e, 0x022e,
+ 0x0230, 0x0230,
+ 0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
+ 0x0243, 0x0246,
+ 0x0248, 0x0248,
+ 0x024a, 0x024a,
+ 0x024c, 0x024c,
+ 0x024e, 0x024e,
+ 0x0370, 0x0370,
+ 0x0372, 0x0372,
+ 0x0376, 0x0376,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x038f,
+ 0x0391, 0x03a1,
+ 0x03a3, 0x03ab,
+ 0x03cf, 0x03cf,
+ 0x03d2, 0x03d4,
+ 0x03d8, 0x03d8,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03e2,
+ 0x03e4, 0x03e4,
+ 0x03e6, 0x03e6,
+ 0x03e8, 0x03e8,
+ 0x03ea, 0x03ea,
+ 0x03ec, 0x03ec,
+ 0x03ee, 0x03ee,
+ 0x03f4, 0x03f4,
+ 0x03f7, 0x03f7,
+ 0x03f9, 0x03fa,
+ 0x03fd, 0x042f,
+ 0x0460, 0x0460,
+ 0x0462, 0x0462,
+ 0x0464, 0x0464,
+ 0x0466, 0x0466,
+ 0x0468, 0x0468,
+ 0x046a, 0x046a,
+ 0x046c, 0x046c,
+ 0x046e, 0x046e,
+ 0x0470, 0x0470,
+ 0x0472, 0x0472,
+ 0x0474, 0x0474,
+ 0x0476, 0x0476,
+ 0x0478, 0x0478,
+ 0x047a, 0x047a,
+ 0x047c, 0x047c,
+ 0x047e, 0x047e,
+ 0x0480, 0x0480,
+ 0x048a, 0x048a,
+ 0x048c, 0x048c,
+ 0x048e, 0x048e,
+ 0x0490, 0x0490,
+ 0x0492, 0x0492,
+ 0x0494, 0x0494,
+ 0x0496, 0x0496,
+ 0x0498, 0x0498,
+ 0x049a, 0x049a,
+ 0x049c, 0x049c,
+ 0x049e, 0x049e,
+ 0x04a0, 0x04a0,
+ 0x04a2, 0x04a2,
+ 0x04a4, 0x04a4,
+ 0x04a6, 0x04a6,
+ 0x04a8, 0x04a8,
+ 0x04aa, 0x04aa,
+ 0x04ac, 0x04ac,
+ 0x04ae, 0x04ae,
+ 0x04b0, 0x04b0,
+ 0x04b2, 0x04b2,
+ 0x04b4, 0x04b4,
+ 0x04b6, 0x04b6,
+ 0x04b8, 0x04b8,
+ 0x04ba, 0x04ba,
+ 0x04bc, 0x04bc,
+ 0x04be, 0x04be,
+ 0x04c0, 0x04c1,
+ 0x04c3, 0x04c3,
+ 0x04c5, 0x04c5,
+ 0x04c7, 0x04c7,
+ 0x04c9, 0x04c9,
+ 0x04cb, 0x04cb,
+ 0x04cd, 0x04cd,
+ 0x04d0, 0x04d0,
+ 0x04d2, 0x04d2,
+ 0x04d4, 0x04d4,
+ 0x04d6, 0x04d6,
+ 0x04d8, 0x04d8,
+ 0x04da, 0x04da,
+ 0x04dc, 0x04dc,
+ 0x04de, 0x04de,
+ 0x04e0, 0x04e0,
+ 0x04e2, 0x04e2,
+ 0x04e4, 0x04e4,
+ 0x04e6, 0x04e6,
+ 0x04e8, 0x04e8,
+ 0x04ea, 0x04ea,
+ 0x04ec, 0x04ec,
+ 0x04ee, 0x04ee,
+ 0x04f0, 0x04f0,
+ 0x04f2, 0x04f2,
+ 0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
+ 0x04f8, 0x04f8,
+ 0x04fa, 0x04fa,
+ 0x04fc, 0x04fc,
+ 0x04fe, 0x04fe,
+ 0x0500, 0x0500,
+ 0x0502, 0x0502,
+ 0x0504, 0x0504,
+ 0x0506, 0x0506,
+ 0x0508, 0x0508,
+ 0x050a, 0x050a,
+ 0x050c, 0x050c,
+ 0x050e, 0x050e,
+ 0x0510, 0x0510,
+ 0x0512, 0x0512,
+ 0x0514, 0x0514,
+ 0x0516, 0x0516,
+ 0x0518, 0x0518,
+ 0x051a, 0x051a,
+ 0x051c, 0x051c,
+ 0x051e, 0x051e,
+ 0x0520, 0x0520,
+ 0x0522, 0x0522,
+ 0x0524, 0x0524,
+ 0x0526, 0x0526,
+ 0x0528, 0x0528,
+ 0x052a, 0x052a,
+ 0x052c, 0x052c,
+ 0x052e, 0x052e,
+ 0x0531, 0x0556,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x13a0, 0x13f5,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1e00, 0x1e00,
+ 0x1e02, 0x1e02,
+ 0x1e04, 0x1e04,
+ 0x1e06, 0x1e06,
+ 0x1e08, 0x1e08,
+ 0x1e0a, 0x1e0a,
+ 0x1e0c, 0x1e0c,
+ 0x1e0e, 0x1e0e,
+ 0x1e10, 0x1e10,
+ 0x1e12, 0x1e12,
+ 0x1e14, 0x1e14,
+ 0x1e16, 0x1e16,
+ 0x1e18, 0x1e18,
+ 0x1e1a, 0x1e1a,
+ 0x1e1c, 0x1e1c,
+ 0x1e1e, 0x1e1e,
+ 0x1e20, 0x1e20,
+ 0x1e22, 0x1e22,
+ 0x1e24, 0x1e24,
+ 0x1e26, 0x1e26,
+ 0x1e28, 0x1e28,
+ 0x1e2a, 0x1e2a,
+ 0x1e2c, 0x1e2c,
+ 0x1e2e, 0x1e2e,
+ 0x1e30, 0x1e30,
+ 0x1e32, 0x1e32,
+ 0x1e34, 0x1e34,
+ 0x1e36, 0x1e36,
+ 0x1e38, 0x1e38,
+ 0x1e3a, 0x1e3a,
+ 0x1e3c, 0x1e3c,
+ 0x1e3e, 0x1e3e,
+ 0x1e40, 0x1e40,
+ 0x1e42, 0x1e42,
+ 0x1e44, 0x1e44,
+ 0x1e46, 0x1e46,
+ 0x1e48, 0x1e48,
+ 0x1e4a, 0x1e4a,
+ 0x1e4c, 0x1e4c,
+ 0x1e4e, 0x1e4e,
+ 0x1e50, 0x1e50,
+ 0x1e52, 0x1e52,
+ 0x1e54, 0x1e54,
+ 0x1e56, 0x1e56,
+ 0x1e58, 0x1e58,
+ 0x1e5a, 0x1e5a,
+ 0x1e5c, 0x1e5c,
+ 0x1e5e, 0x1e5e,
+ 0x1e60, 0x1e60,
+ 0x1e62, 0x1e62,
+ 0x1e64, 0x1e64,
+ 0x1e66, 0x1e66,
+ 0x1e68, 0x1e68,
+ 0x1e6a, 0x1e6a,
+ 0x1e6c, 0x1e6c,
+ 0x1e6e, 0x1e6e,
+ 0x1e70, 0x1e70,
+ 0x1e72, 0x1e72,
+ 0x1e74, 0x1e74,
+ 0x1e76, 0x1e76,
+ 0x1e78, 0x1e78,
+ 0x1e7a, 0x1e7a,
+ 0x1e7c, 0x1e7c,
+ 0x1e7e, 0x1e7e,
+ 0x1e80, 0x1e80,
+ 0x1e82, 0x1e82,
+ 0x1e84, 0x1e84,
+ 0x1e86, 0x1e86,
+ 0x1e88, 0x1e88,
+ 0x1e8a, 0x1e8a,
+ 0x1e8c, 0x1e8c,
+ 0x1e8e, 0x1e8e,
+ 0x1e90, 0x1e90,
+ 0x1e92, 0x1e92,
+ 0x1e94, 0x1e94,
+ 0x1e9e, 0x1e9e,
+ 0x1ea0, 0x1ea0,
+ 0x1ea2, 0x1ea2,
+ 0x1ea4, 0x1ea4,
+ 0x1ea6, 0x1ea6,
+ 0x1ea8, 0x1ea8,
+ 0x1eaa, 0x1eaa,
+ 0x1eac, 0x1eac,
+ 0x1eae, 0x1eae,
+ 0x1eb0, 0x1eb0,
+ 0x1eb2, 0x1eb2,
+ 0x1eb4, 0x1eb4,
+ 0x1eb6, 0x1eb6,
+ 0x1eb8, 0x1eb8,
+ 0x1eba, 0x1eba,
+ 0x1ebc, 0x1ebc,
+ 0x1ebe, 0x1ebe,
+ 0x1ec0, 0x1ec0,
+ 0x1ec2, 0x1ec2,
+ 0x1ec4, 0x1ec4,
+ 0x1ec6, 0x1ec6,
+ 0x1ec8, 0x1ec8,
+ 0x1eca, 0x1eca,
+ 0x1ecc, 0x1ecc,
+ 0x1ece, 0x1ece,
+ 0x1ed0, 0x1ed0,
+ 0x1ed2, 0x1ed2,
+ 0x1ed4, 0x1ed4,
+ 0x1ed6, 0x1ed6,
+ 0x1ed8, 0x1ed8,
+ 0x1eda, 0x1eda,
+ 0x1edc, 0x1edc,
+ 0x1ede, 0x1ede,
+ 0x1ee0, 0x1ee0,
+ 0x1ee2, 0x1ee2,
+ 0x1ee4, 0x1ee4,
+ 0x1ee6, 0x1ee6,
+ 0x1ee8, 0x1ee8,
+ 0x1eea, 0x1eea,
+ 0x1eec, 0x1eec,
+ 0x1eee, 0x1eee,
+ 0x1ef0, 0x1ef0,
+ 0x1ef2, 0x1ef2,
+ 0x1ef4, 0x1ef4,
+ 0x1ef6, 0x1ef6,
+ 0x1ef8, 0x1ef8,
+ 0x1efa, 0x1efa,
+ 0x1efc, 0x1efc,
+ 0x1efe, 0x1efe,
+ 0x1f08, 0x1f0f,
+ 0x1f18, 0x1f1d,
+ 0x1f28, 0x1f2f,
+ 0x1f38, 0x1f3f,
+ 0x1f48, 0x1f4d,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f5f,
+ 0x1f68, 0x1f6f,
+ 0x1fb8, 0x1fbb,
+ 0x1fc8, 0x1fcb,
+ 0x1fd8, 0x1fdb,
+ 0x1fe8, 0x1fec,
+ 0x1ff8, 0x1ffb,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210b, 0x210d,
+ 0x2110, 0x2112,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x2130, 0x2133,
+ 0x213e, 0x213f,
+ 0x2145, 0x2145,
+ 0x2160, 0x216f,
+ 0x2183, 0x2183,
+ 0x24b6, 0x24cf,
+ 0x2c00, 0x2c2f,
+ 0x2c60, 0x2c60,
+ 0x2c62, 0x2c64,
+ 0x2c67, 0x2c67,
+ 0x2c69, 0x2c69,
+ 0x2c6b, 0x2c6b,
+ 0x2c6d, 0x2c70,
+ 0x2c72, 0x2c72,
+ 0x2c75, 0x2c75,
+ 0x2c7e, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
+ 0x2ceb, 0x2ceb,
+ 0x2ced, 0x2ced,
+ 0x2cf2, 0x2cf2,
+ 0xa640, 0xa640,
+ 0xa642, 0xa642,
+ 0xa644, 0xa644,
+ 0xa646, 0xa646,
+ 0xa648, 0xa648,
+ 0xa64a, 0xa64a,
+ 0xa64c, 0xa64c,
+ 0xa64e, 0xa64e,
+ 0xa650, 0xa650,
+ 0xa652, 0xa652,
+ 0xa654, 0xa654,
+ 0xa656, 0xa656,
+ 0xa658, 0xa658,
+ 0xa65a, 0xa65a,
+ 0xa65c, 0xa65c,
+ 0xa65e, 0xa65e,
+ 0xa660, 0xa660,
+ 0xa662, 0xa662,
+ 0xa664, 0xa664,
+ 0xa666, 0xa666,
+ 0xa668, 0xa668,
+ 0xa66a, 0xa66a,
+ 0xa66c, 0xa66c,
+ 0xa680, 0xa680,
+ 0xa682, 0xa682,
+ 0xa684, 0xa684,
+ 0xa686, 0xa686,
+ 0xa688, 0xa688,
+ 0xa68a, 0xa68a,
+ 0xa68c, 0xa68c,
+ 0xa68e, 0xa68e,
+ 0xa690, 0xa690,
+ 0xa692, 0xa692,
+ 0xa694, 0xa694,
+ 0xa696, 0xa696,
+ 0xa698, 0xa698,
+ 0xa69a, 0xa69a,
+ 0xa722, 0xa722,
+ 0xa724, 0xa724,
+ 0xa726, 0xa726,
+ 0xa728, 0xa728,
+ 0xa72a, 0xa72a,
+ 0xa72c, 0xa72c,
+ 0xa72e, 0xa72e,
+ 0xa732, 0xa732,
+ 0xa734, 0xa734,
+ 0xa736, 0xa736,
+ 0xa738, 0xa738,
+ 0xa73a, 0xa73a,
+ 0xa73c, 0xa73c,
+ 0xa73e, 0xa73e,
+ 0xa740, 0xa740,
+ 0xa742, 0xa742,
+ 0xa744, 0xa744,
+ 0xa746, 0xa746,
+ 0xa748, 0xa748,
+ 0xa74a, 0xa74a,
+ 0xa74c, 0xa74c,
+ 0xa74e, 0xa74e,
+ 0xa750, 0xa750,
+ 0xa752, 0xa752,
+ 0xa754, 0xa754,
+ 0xa756, 0xa756,
+ 0xa758, 0xa758,
+ 0xa75a, 0xa75a,
+ 0xa75c, 0xa75c,
+ 0xa75e, 0xa75e,
+ 0xa760, 0xa760,
+ 0xa762, 0xa762,
+ 0xa764, 0xa764,
+ 0xa766, 0xa766,
+ 0xa768, 0xa768,
+ 0xa76a, 0xa76a,
+ 0xa76c, 0xa76c,
+ 0xa76e, 0xa76e,
+ 0xa779, 0xa779,
+ 0xa77b, 0xa77b,
+ 0xa77d, 0xa77e,
+ 0xa780, 0xa780,
+ 0xa782, 0xa782,
+ 0xa784, 0xa784,
+ 0xa786, 0xa786,
+ 0xa78b, 0xa78b,
+ 0xa78d, 0xa78d,
+ 0xa790, 0xa790,
+ 0xa792, 0xa792,
+ 0xa796, 0xa796,
+ 0xa798, 0xa798,
+ 0xa79a, 0xa79a,
+ 0xa79c, 0xa79c,
+ 0xa79e, 0xa79e,
+ 0xa7a0, 0xa7a0,
+ 0xa7a2, 0xa7a2,
+ 0xa7a4, 0xa7a4,
+ 0xa7a6, 0xa7a6,
+ 0xa7a8, 0xa7a8,
+ 0xa7aa, 0xa7ae,
+ 0xa7b0, 0xa7b4,
+ 0xa7b6, 0xa7b6,
+ 0xa7b8, 0xa7b8,
+ 0xa7ba, 0xa7ba,
+ 0xa7bc, 0xa7bc,
+ 0xa7be, 0xa7be,
+ 0xa7c0, 0xa7c0,
+ 0xa7c2, 0xa7c2,
+ 0xa7c4, 0xa7c7,
+ 0xa7c9, 0xa7c9,
+ 0xa7d0, 0xa7d0,
+ 0xa7d6, 0xa7d6,
+ 0xa7d8, 0xa7d8,
+ 0xa7f5, 0xa7f5,
+ 0xff21, 0xff3a,
+ 0x10400, 0x10427,
+ 0x104b0, 0x104d3,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10c80, 0x10cb2,
+ 0x118a0, 0x118bf,
+ 0x16e40, 0x16e5f,
+ 0x1d400, 0x1d419,
+ 0x1d434, 0x1d44d,
+ 0x1d468, 0x1d481,
+ 0x1d49c, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b5,
+ 0x1d4d0, 0x1d4e9,
+ 0x1d504, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d538, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d56c, 0x1d585,
+ 0x1d5a0, 0x1d5b9,
+ 0x1d5d4, 0x1d5ed,
+ 0x1d608, 0x1d621,
+ 0x1d63c, 0x1d655,
+ 0x1d670, 0x1d689,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6e2, 0x1d6fa,
+ 0x1d71c, 0x1d734,
+ 0x1d756, 0x1d76e,
+ 0x1d790, 0x1d7a8,
+ 0x1d7ca, 0x1d7ca,
+ 0x1e900, 0x1e921,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+}; /* CR_Upper */
+
+/* 'XDigit': [[:XDigit:]] */
+static const OnigCodePoint CR_XDigit[] = {
+ 3,
+ 0x0030, 0x0039,
+ 0x0041, 0x0046,
+ 0x0061, 0x0066,
+}; /* CR_XDigit */
+
+/* 'Word': [[:Word:]] */
+static const OnigCodePoint CR_Word[] = {
+ 770,
+ 0x0030, 0x0039,
+ 0x0041, 0x005a,
+ 0x005f, 0x005f,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0300, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x0483, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0610, 0x061a,
+ 0x0620, 0x0669,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06df, 0x06e8,
+ 0x06ea, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x07fd, 0x07fd,
+ 0x0800, 0x082d,
+ 0x0840, 0x085b,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x0898, 0x08e1,
+ 0x08e3, 0x0963,
+ 0x0966, 0x096f,
+ 0x0971, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b6f,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bef,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c80, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d54, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d66, 0x0d6f,
+ 0x0d7a, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e4e,
+ 0x0e50, 0x0e59,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f18, 0x0f19,
+ 0x0f20, 0x0f29,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x1000, 0x1049,
+ 0x1050, 0x109d,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x135f,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1734,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17d3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x180b, 0x180d,
+ 0x180f, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1946, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x1a00, 0x1a1b,
+ 0x1a20, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa7, 0x1aa7,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b59,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1bf3,
+ 0x1c00, 0x1c37,
+ 0x1c40, 0x1c49,
+ 0x1c4d, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x203f, 0x2040,
+ 0x2054, 0x2054,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x20d0, 0x20f0,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x24b6, 0x24e9,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2dff,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3007,
+ 0x3021, 0x302f,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x3099, 0x309a,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa62b,
+ 0xa640, 0xa672,
+ 0xa674, 0xa67d,
+ 0xa67f, 0xa6f1,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa827,
+ 0xa82c, 0xa82c,
+ 0xa840, 0xa873,
+ 0xa880, 0xa8c5,
+ 0xa8d0, 0xa8d9,
+ 0xa8e0, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa92d,
+ 0xa930, 0xa953,
+ 0xa960, 0xa97c,
+ 0xa980, 0xa9c0,
+ 0xa9cf, 0xa9d9,
+ 0xa9e0, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaef,
+ 0xaaf2, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabea,
+ 0xabec, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0xfe33, 0xfe34,
+ 0xfe4d, 0xfe4f,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff10, 0xff19,
+ 0xff21, 0xff3a,
+ 0xff3f, 0xff3f,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x101fd, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102e0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae6,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10eac,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f50,
+ 0x10f70, 0x10f85,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11046,
+ 0x11066, 0x11075,
+ 0x1107f, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x1113f,
+ 0x11144, 0x11147,
+ 0x11150, 0x11173,
+ 0x11176, 0x11176,
+ 0x11180, 0x111c4,
+ 0x111c9, 0x111cc,
+ 0x111ce, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x11237,
+ 0x1123e, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1144a,
+ 0x11450, 0x11459,
+ 0x1145e, 0x11461,
+ 0x11480, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115c0,
+ 0x115d8, 0x115dd,
+ 0x11600, 0x11640,
+ 0x11644, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11739,
+ 0x11740, 0x11746,
+ 0x11800, 0x1183a,
+ 0x118a0, 0x118e9,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11943,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e1,
+ 0x119e3, 0x119e4,
+ 0x11a00, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a50, 0x11a99,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c40,
+ 0x11c50, 0x11c59,
+ 0x11c72, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef6,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f42,
+ 0x11f50, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13440, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a70, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af4,
+ 0x16b00, 0x16b36,
+ 0x16b40, 0x16b43,
+ 0x16b50, 0x16b59,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0100, 0xe01ef,
+}; /* CR_Word */
+
+/* 'Alnum': [[:Alnum:]] */
+static const OnigCodePoint CR_Alnum[] = {
+ 772,
+ 0x0030, 0x0039,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0345, 0x0345,
+ 0x0370, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x05b0, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0610, 0x061a,
+ 0x0620, 0x0657,
+ 0x0659, 0x0669,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06e1, 0x06e8,
+ 0x06ed, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x073f,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07ea,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x0800, 0x0817,
+ 0x081a, 0x082c,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x08d4, 0x08df,
+ 0x08e3, 0x08e9,
+ 0x08f0, 0x093b,
+ 0x093d, 0x094c,
+ 0x094e, 0x0950,
+ 0x0955, 0x0963,
+ 0x0966, 0x096f,
+ 0x0971, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09ce, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4c,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af9, 0x0afc,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b6f,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bef,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4c,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c80, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccc,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d66, 0x0d6f,
+ 0x0d7a, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e46,
+ 0x0e4d, 0x0e4d,
+ 0x0e50, 0x0e59,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ecd, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f20, 0x0f29,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f83,
+ 0x0f88, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x1000, 0x1036,
+ 0x1038, 0x1038,
+ 0x103b, 0x1049,
+ 0x1050, 0x109d,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1713,
+ 0x171f, 0x1733,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17b3,
+ 0x17b6, 0x17c8,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x17e0, 0x17e9,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x1938,
+ 0x1946, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x1a00, 0x1a1b,
+ 0x1a20, 0x1a5e,
+ 0x1a61, 0x1a74,
+ 0x1a80, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa7, 0x1aa7,
+ 0x1abf, 0x1ac0,
+ 0x1acc, 0x1ace,
+ 0x1b00, 0x1b33,
+ 0x1b35, 0x1b43,
+ 0x1b45, 0x1b4c,
+ 0x1b50, 0x1b59,
+ 0x1b80, 0x1ba9,
+ 0x1bac, 0x1be5,
+ 0x1be7, 0x1bf1,
+ 0x1c00, 0x1c36,
+ 0x1c40, 0x1c49,
+ 0x1c4d, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1de7, 0x1df4,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x24b6, 0x24e9,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2dff,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3007,
+ 0x3021, 0x3029,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa674, 0xa67b,
+ 0xa67f, 0xa6ef,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa805,
+ 0xa807, 0xa827,
+ 0xa840, 0xa873,
+ 0xa880, 0xa8c3,
+ 0xa8c5, 0xa8c5,
+ 0xa8d0, 0xa8d9,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa92a,
+ 0xa930, 0xa952,
+ 0xa960, 0xa97c,
+ 0xa980, 0xa9b2,
+ 0xa9b4, 0xa9bf,
+ 0xa9cf, 0xa9d9,
+ 0xa9e0, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaabe,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaef,
+ 0xaaf2, 0xaaf5,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabea,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff10, 0xff19,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10eac,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11045,
+ 0x11066, 0x1106f,
+ 0x11071, 0x11075,
+ 0x11080, 0x110b8,
+ 0x110c2, 0x110c2,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11132,
+ 0x11136, 0x1113f,
+ 0x11144, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11180, 0x111bf,
+ 0x111c1, 0x111c4,
+ 0x111ce, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x11234,
+ 0x11237, 0x11237,
+ 0x1123e, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112e8,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134c,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11400, 0x11441,
+ 0x11443, 0x11445,
+ 0x11447, 0x1144a,
+ 0x11450, 0x11459,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114c1,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115be,
+ 0x115d8, 0x115dd,
+ 0x11600, 0x1163e,
+ 0x11640, 0x11640,
+ 0x11644, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b5,
+ 0x116b8, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172a,
+ 0x11730, 0x11739,
+ 0x11740, 0x11746,
+ 0x11800, 0x11838,
+ 0x118a0, 0x118e9,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x1193c,
+ 0x1193f, 0x11942,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119df,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e4,
+ 0x11a00, 0x11a32,
+ 0x11a35, 0x11a3e,
+ 0x11a50, 0x11a97,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c3e,
+ 0x11c40, 0x11c40,
+ 0x11c50, 0x11c59,
+ 0x11c72, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d41,
+ 0x11d43, 0x11d43,
+ 0x11d46, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d96,
+ 0x11d98, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef6,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f40,
+ 0x11f50, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a70, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b40, 0x16b43,
+ 0x16b50, 0x16b59,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9e, 0x1bc9e,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e2f0, 0x1e2f9,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e4f0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e900, 0x1e943,
+ 0x1e947, 0x1e947,
+ 0x1e94b, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Alnum */
+
+/* 'ASCII': [[:ASCII:]] */
+static const OnigCodePoint CR_ASCII[] = {
+ 1,
+ 0x0000, 0x007f,
+}; /* CR_ASCII */
+
+/* 'Punct' */
+static const OnigCodePoint CR_Punct[] = {
+ 191,
+ 0x0021, 0x0023,
+ 0x0025, 0x002a,
+ 0x002c, 0x002f,
+ 0x003a, 0x003b,
+ 0x003f, 0x0040,
+ 0x005b, 0x005d,
+ 0x005f, 0x005f,
+ 0x007b, 0x007b,
+ 0x007d, 0x007d,
+ 0x00a1, 0x00a1,
+ 0x00a7, 0x00a7,
+ 0x00ab, 0x00ab,
+ 0x00b6, 0x00b7,
+ 0x00bb, 0x00bb,
+ 0x00bf, 0x00bf,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x055a, 0x055f,
+ 0x0589, 0x058a,
+ 0x05be, 0x05be,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05f3, 0x05f4,
+ 0x0609, 0x060a,
+ 0x060c, 0x060d,
+ 0x061b, 0x061b,
+ 0x061d, 0x061f,
+ 0x066a, 0x066d,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070d,
+ 0x07f7, 0x07f9,
+ 0x0830, 0x083e,
+ 0x085e, 0x085e,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x09fd, 0x09fd,
+ 0x0a76, 0x0a76,
+ 0x0af0, 0x0af0,
+ 0x0c77, 0x0c77,
+ 0x0c84, 0x0c84,
+ 0x0df4, 0x0df4,
+ 0x0e4f, 0x0e4f,
+ 0x0e5a, 0x0e5b,
+ 0x0f04, 0x0f12,
+ 0x0f14, 0x0f14,
+ 0x0f3a, 0x0f3d,
+ 0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd4,
+ 0x0fd9, 0x0fda,
+ 0x104a, 0x104f,
+ 0x10fb, 0x10fb,
+ 0x1360, 0x1368,
+ 0x1400, 0x1400,
+ 0x166e, 0x166e,
+ 0x169b, 0x169c,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17d8, 0x17da,
+ 0x1800, 0x180a,
+ 0x1944, 0x1945,
+ 0x1a1e, 0x1a1f,
+ 0x1aa0, 0x1aa6,
+ 0x1aa8, 0x1aad,
+ 0x1b5a, 0x1b60,
+ 0x1b7d, 0x1b7e,
+ 0x1bfc, 0x1bff,
+ 0x1c3b, 0x1c3f,
+ 0x1c7e, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd3, 0x1cd3,
+ 0x2010, 0x2027,
+ 0x2030, 0x2043,
+ 0x2045, 0x2051,
+ 0x2053, 0x205e,
+ 0x207d, 0x207e,
+ 0x208d, 0x208e,
+ 0x2308, 0x230b,
+ 0x2329, 0x232a,
+ 0x2768, 0x2775,
+ 0x27c5, 0x27c6,
+ 0x27e6, 0x27ef,
+ 0x2983, 0x2998,
+ 0x29d8, 0x29db,
+ 0x29fc, 0x29fd,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2d70, 0x2d70,
+ 0x2e00, 0x2e2e,
+ 0x2e30, 0x2e4f,
+ 0x2e52, 0x2e5d,
+ 0x3001, 0x3003,
+ 0x3008, 0x3011,
+ 0x3014, 0x301f,
+ 0x3030, 0x3030,
+ 0x303d, 0x303d,
+ 0x30a0, 0x30a0,
+ 0x30fb, 0x30fb,
+ 0xa4fe, 0xa4ff,
+ 0xa60d, 0xa60f,
+ 0xa673, 0xa673,
+ 0xa67e, 0xa67e,
+ 0xa6f2, 0xa6f7,
+ 0xa874, 0xa877,
+ 0xa8ce, 0xa8cf,
+ 0xa8f8, 0xa8fa,
+ 0xa8fc, 0xa8fc,
+ 0xa92e, 0xa92f,
+ 0xa95f, 0xa95f,
+ 0xa9c1, 0xa9cd,
+ 0xa9de, 0xa9df,
+ 0xaa5c, 0xaa5f,
+ 0xaade, 0xaadf,
+ 0xaaf0, 0xaaf1,
+ 0xabeb, 0xabeb,
+ 0xfd3e, 0xfd3f,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe61,
+ 0xfe63, 0xfe63,
+ 0xfe68, 0xfe68,
+ 0xfe6a, 0xfe6b,
+ 0xff01, 0xff03,
+ 0xff05, 0xff0a,
+ 0xff0c, 0xff0f,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff20,
+ 0xff3b, 0xff3d,
+ 0xff3f, 0xff3f,
+ 0xff5b, 0xff5b,
+ 0xff5d, 0xff5d,
+ 0xff5f, 0xff65,
+ 0x10100, 0x10102,
+ 0x1039f, 0x1039f,
+ 0x103d0, 0x103d0,
+ 0x1056f, 0x1056f,
+ 0x10857, 0x10857,
+ 0x1091f, 0x1091f,
+ 0x1093f, 0x1093f,
+ 0x10a50, 0x10a58,
+ 0x10a7f, 0x10a7f,
+ 0x10af0, 0x10af6,
+ 0x10b39, 0x10b3f,
+ 0x10b99, 0x10b9c,
+ 0x10ead, 0x10ead,
+ 0x10f55, 0x10f59,
+ 0x10f86, 0x10f89,
+ 0x11047, 0x1104d,
+ 0x110bb, 0x110bc,
+ 0x110be, 0x110c1,
+ 0x11140, 0x11143,
+ 0x11174, 0x11175,
+ 0x111c5, 0x111c8,
+ 0x111cd, 0x111cd,
+ 0x111db, 0x111db,
+ 0x111dd, 0x111df,
+ 0x11238, 0x1123d,
+ 0x112a9, 0x112a9,
+ 0x1144b, 0x1144f,
+ 0x1145a, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x114c6, 0x114c6,
+ 0x115c1, 0x115d7,
+ 0x11641, 0x11643,
+ 0x11660, 0x1166c,
+ 0x116b9, 0x116b9,
+ 0x1173c, 0x1173e,
+ 0x1183b, 0x1183b,
+ 0x11944, 0x11946,
+ 0x119e2, 0x119e2,
+ 0x11a3f, 0x11a46,
+ 0x11a9a, 0x11a9c,
+ 0x11a9e, 0x11aa2,
+ 0x11b00, 0x11b09,
+ 0x11c41, 0x11c45,
+ 0x11c70, 0x11c71,
+ 0x11ef7, 0x11ef8,
+ 0x11f43, 0x11f4f,
+ 0x11fff, 0x11fff,
+ 0x12470, 0x12474,
+ 0x12ff1, 0x12ff2,
+ 0x16a6e, 0x16a6f,
+ 0x16af5, 0x16af5,
+ 0x16b37, 0x16b3b,
+ 0x16b44, 0x16b44,
+ 0x16e97, 0x16e9a,
+ 0x16fe2, 0x16fe2,
+ 0x1bc9f, 0x1bc9f,
+ 0x1da87, 0x1da8b,
+ 0x1e95e, 0x1e95f,
+}; /* CR_Punct */
+
+#ifdef USE_UNICODE_PROPERTIES
+/* 'Any': - */
+static const OnigCodePoint CR_Any[] = {
+ 1,
+ 0x0000, 0x10ffff,
+}; /* CR_Any */
+
+/* 'Assigned': - */
+static const OnigCodePoint CR_Assigned[] = {
+ 707,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfdcf,
+ 0xfdf0, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10f70, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11b00, 0x11b09,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1ea,
+ 0x1d200, 0x1d245,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd,
+}; /* CR_Assigned */
+
+/* 'C': Major Category */
+static const OnigCodePoint CR_C[] = {
+ 712,
+ 0x0000, 0x001f,
+ 0x007f, 0x009f,
+ 0x00ad, 0x00ad,
+ 0x0378, 0x0379,
+ 0x0380, 0x0383,
+ 0x038b, 0x038b,
+ 0x038d, 0x038d,
+ 0x03a2, 0x03a2,
+ 0x0530, 0x0530,
+ 0x0557, 0x0558,
+ 0x058b, 0x058c,
+ 0x0590, 0x0590,
+ 0x05c8, 0x05cf,
+ 0x05eb, 0x05ee,
+ 0x05f5, 0x0605,
+ 0x061c, 0x061c,
+ 0x06dd, 0x06dd,
+ 0x070e, 0x070f,
+ 0x074b, 0x074c,
+ 0x07b2, 0x07bf,
+ 0x07fb, 0x07fc,
+ 0x082e, 0x082f,
+ 0x083f, 0x083f,
+ 0x085c, 0x085d,
+ 0x085f, 0x085f,
+ 0x086b, 0x086f,
+ 0x088f, 0x0897,
+ 0x08e2, 0x08e2,
+ 0x0984, 0x0984,
+ 0x098d, 0x098e,
+ 0x0991, 0x0992,
+ 0x09a9, 0x09a9,
+ 0x09b1, 0x09b1,
+ 0x09b3, 0x09b5,
+ 0x09ba, 0x09bb,
+ 0x09c5, 0x09c6,
+ 0x09c9, 0x09ca,
+ 0x09cf, 0x09d6,
+ 0x09d8, 0x09db,
+ 0x09de, 0x09de,
+ 0x09e4, 0x09e5,
+ 0x09ff, 0x0a00,
+ 0x0a04, 0x0a04,
+ 0x0a0b, 0x0a0e,
+ 0x0a11, 0x0a12,
+ 0x0a29, 0x0a29,
+ 0x0a31, 0x0a31,
+ 0x0a34, 0x0a34,
+ 0x0a37, 0x0a37,
+ 0x0a3a, 0x0a3b,
+ 0x0a3d, 0x0a3d,
+ 0x0a43, 0x0a46,
+ 0x0a49, 0x0a4a,
+ 0x0a4e, 0x0a50,
+ 0x0a52, 0x0a58,
+ 0x0a5d, 0x0a5d,
+ 0x0a5f, 0x0a65,
+ 0x0a77, 0x0a80,
+ 0x0a84, 0x0a84,
+ 0x0a8e, 0x0a8e,
+ 0x0a92, 0x0a92,
+ 0x0aa9, 0x0aa9,
+ 0x0ab1, 0x0ab1,
+ 0x0ab4, 0x0ab4,
+ 0x0aba, 0x0abb,
+ 0x0ac6, 0x0ac6,
+ 0x0aca, 0x0aca,
+ 0x0ace, 0x0acf,
+ 0x0ad1, 0x0adf,
+ 0x0ae4, 0x0ae5,
+ 0x0af2, 0x0af8,
+ 0x0b00, 0x0b00,
+ 0x0b04, 0x0b04,
+ 0x0b0d, 0x0b0e,
+ 0x0b11, 0x0b12,
+ 0x0b29, 0x0b29,
+ 0x0b31, 0x0b31,
+ 0x0b34, 0x0b34,
+ 0x0b3a, 0x0b3b,
+ 0x0b45, 0x0b46,
+ 0x0b49, 0x0b4a,
+ 0x0b4e, 0x0b54,
+ 0x0b58, 0x0b5b,
+ 0x0b5e, 0x0b5e,
+ 0x0b64, 0x0b65,
+ 0x0b78, 0x0b81,
+ 0x0b84, 0x0b84,
+ 0x0b8b, 0x0b8d,
+ 0x0b91, 0x0b91,
+ 0x0b96, 0x0b98,
+ 0x0b9b, 0x0b9b,
+ 0x0b9d, 0x0b9d,
+ 0x0ba0, 0x0ba2,
+ 0x0ba5, 0x0ba7,
+ 0x0bab, 0x0bad,
+ 0x0bba, 0x0bbd,
+ 0x0bc3, 0x0bc5,
+ 0x0bc9, 0x0bc9,
+ 0x0bce, 0x0bcf,
+ 0x0bd1, 0x0bd6,
+ 0x0bd8, 0x0be5,
+ 0x0bfb, 0x0bff,
+ 0x0c0d, 0x0c0d,
+ 0x0c11, 0x0c11,
+ 0x0c29, 0x0c29,
+ 0x0c3a, 0x0c3b,
+ 0x0c45, 0x0c45,
+ 0x0c49, 0x0c49,
+ 0x0c4e, 0x0c54,
+ 0x0c57, 0x0c57,
+ 0x0c5b, 0x0c5c,
+ 0x0c5e, 0x0c5f,
+ 0x0c64, 0x0c65,
+ 0x0c70, 0x0c76,
+ 0x0c8d, 0x0c8d,
+ 0x0c91, 0x0c91,
+ 0x0ca9, 0x0ca9,
+ 0x0cb4, 0x0cb4,
+ 0x0cba, 0x0cbb,
+ 0x0cc5, 0x0cc5,
+ 0x0cc9, 0x0cc9,
+ 0x0cce, 0x0cd4,
+ 0x0cd7, 0x0cdc,
+ 0x0cdf, 0x0cdf,
+ 0x0ce4, 0x0ce5,
+ 0x0cf0, 0x0cf0,
+ 0x0cf4, 0x0cff,
+ 0x0d0d, 0x0d0d,
+ 0x0d11, 0x0d11,
+ 0x0d45, 0x0d45,
+ 0x0d49, 0x0d49,
+ 0x0d50, 0x0d53,
+ 0x0d64, 0x0d65,
+ 0x0d80, 0x0d80,
+ 0x0d84, 0x0d84,
+ 0x0d97, 0x0d99,
+ 0x0db2, 0x0db2,
+ 0x0dbc, 0x0dbc,
+ 0x0dbe, 0x0dbf,
+ 0x0dc7, 0x0dc9,
+ 0x0dcb, 0x0dce,
+ 0x0dd5, 0x0dd5,
+ 0x0dd7, 0x0dd7,
+ 0x0de0, 0x0de5,
+ 0x0df0, 0x0df1,
+ 0x0df5, 0x0e00,
+ 0x0e3b, 0x0e3e,
+ 0x0e5c, 0x0e80,
+ 0x0e83, 0x0e83,
+ 0x0e85, 0x0e85,
+ 0x0e8b, 0x0e8b,
+ 0x0ea4, 0x0ea4,
+ 0x0ea6, 0x0ea6,
+ 0x0ebe, 0x0ebf,
+ 0x0ec5, 0x0ec5,
+ 0x0ec7, 0x0ec7,
+ 0x0ecf, 0x0ecf,
+ 0x0eda, 0x0edb,
+ 0x0ee0, 0x0eff,
+ 0x0f48, 0x0f48,
+ 0x0f6d, 0x0f70,
+ 0x0f98, 0x0f98,
+ 0x0fbd, 0x0fbd,
+ 0x0fcd, 0x0fcd,
+ 0x0fdb, 0x0fff,
+ 0x10c6, 0x10c6,
+ 0x10c8, 0x10cc,
+ 0x10ce, 0x10cf,
+ 0x1249, 0x1249,
+ 0x124e, 0x124f,
+ 0x1257, 0x1257,
+ 0x1259, 0x1259,
+ 0x125e, 0x125f,
+ 0x1289, 0x1289,
+ 0x128e, 0x128f,
+ 0x12b1, 0x12b1,
+ 0x12b6, 0x12b7,
+ 0x12bf, 0x12bf,
+ 0x12c1, 0x12c1,
+ 0x12c6, 0x12c7,
+ 0x12d7, 0x12d7,
+ 0x1311, 0x1311,
+ 0x1316, 0x1317,
+ 0x135b, 0x135c,
+ 0x137d, 0x137f,
+ 0x139a, 0x139f,
+ 0x13f6, 0x13f7,
+ 0x13fe, 0x13ff,
+ 0x169d, 0x169f,
+ 0x16f9, 0x16ff,
+ 0x1716, 0x171e,
+ 0x1737, 0x173f,
+ 0x1754, 0x175f,
+ 0x176d, 0x176d,
+ 0x1771, 0x1771,
+ 0x1774, 0x177f,
+ 0x17de, 0x17df,
+ 0x17ea, 0x17ef,
+ 0x17fa, 0x17ff,
+ 0x180e, 0x180e,
+ 0x181a, 0x181f,
+ 0x1879, 0x187f,
+ 0x18ab, 0x18af,
+ 0x18f6, 0x18ff,
+ 0x191f, 0x191f,
+ 0x192c, 0x192f,
+ 0x193c, 0x193f,
+ 0x1941, 0x1943,
+ 0x196e, 0x196f,
+ 0x1975, 0x197f,
+ 0x19ac, 0x19af,
+ 0x19ca, 0x19cf,
+ 0x19db, 0x19dd,
+ 0x1a1c, 0x1a1d,
+ 0x1a5f, 0x1a5f,
+ 0x1a7d, 0x1a7e,
+ 0x1a8a, 0x1a8f,
+ 0x1a9a, 0x1a9f,
+ 0x1aae, 0x1aaf,
+ 0x1acf, 0x1aff,
+ 0x1b4d, 0x1b4f,
+ 0x1b7f, 0x1b7f,
+ 0x1bf4, 0x1bfb,
+ 0x1c38, 0x1c3a,
+ 0x1c4a, 0x1c4c,
+ 0x1c89, 0x1c8f,
+ 0x1cbb, 0x1cbc,
+ 0x1cc8, 0x1ccf,
+ 0x1cfb, 0x1cff,
+ 0x1f16, 0x1f17,
+ 0x1f1e, 0x1f1f,
+ 0x1f46, 0x1f47,
+ 0x1f4e, 0x1f4f,
+ 0x1f58, 0x1f58,
+ 0x1f5a, 0x1f5a,
+ 0x1f5c, 0x1f5c,
+ 0x1f5e, 0x1f5e,
+ 0x1f7e, 0x1f7f,
+ 0x1fb5, 0x1fb5,
+ 0x1fc5, 0x1fc5,
+ 0x1fd4, 0x1fd5,
+ 0x1fdc, 0x1fdc,
+ 0x1ff0, 0x1ff1,
+ 0x1ff5, 0x1ff5,
+ 0x1fff, 0x1fff,
+ 0x200b, 0x200f,
+ 0x202a, 0x202e,
+ 0x2060, 0x206f,
+ 0x2072, 0x2073,
+ 0x208f, 0x208f,
+ 0x209d, 0x209f,
+ 0x20c1, 0x20cf,
+ 0x20f1, 0x20ff,
+ 0x218c, 0x218f,
+ 0x2427, 0x243f,
+ 0x244b, 0x245f,
+ 0x2b74, 0x2b75,
+ 0x2b96, 0x2b96,
+ 0x2cf4, 0x2cf8,
+ 0x2d26, 0x2d26,
+ 0x2d28, 0x2d2c,
+ 0x2d2e, 0x2d2f,
+ 0x2d68, 0x2d6e,
+ 0x2d71, 0x2d7e,
+ 0x2d97, 0x2d9f,
+ 0x2da7, 0x2da7,
+ 0x2daf, 0x2daf,
+ 0x2db7, 0x2db7,
+ 0x2dbf, 0x2dbf,
+ 0x2dc7, 0x2dc7,
+ 0x2dcf, 0x2dcf,
+ 0x2dd7, 0x2dd7,
+ 0x2ddf, 0x2ddf,
+ 0x2e5e, 0x2e7f,
+ 0x2e9a, 0x2e9a,
+ 0x2ef4, 0x2eff,
+ 0x2fd6, 0x2fef,
+ 0x2ffc, 0x2fff,
+ 0x3040, 0x3040,
+ 0x3097, 0x3098,
+ 0x3100, 0x3104,
+ 0x3130, 0x3130,
+ 0x318f, 0x318f,
+ 0x31e4, 0x31ef,
+ 0x321f, 0x321f,
+ 0xa48d, 0xa48f,
+ 0xa4c7, 0xa4cf,
+ 0xa62c, 0xa63f,
+ 0xa6f8, 0xa6ff,
+ 0xa7cb, 0xa7cf,
+ 0xa7d2, 0xa7d2,
+ 0xa7d4, 0xa7d4,
+ 0xa7da, 0xa7f1,
+ 0xa82d, 0xa82f,
+ 0xa83a, 0xa83f,
+ 0xa878, 0xa87f,
+ 0xa8c6, 0xa8cd,
+ 0xa8da, 0xa8df,
+ 0xa954, 0xa95e,
+ 0xa97d, 0xa97f,
+ 0xa9ce, 0xa9ce,
+ 0xa9da, 0xa9dd,
+ 0xa9ff, 0xa9ff,
+ 0xaa37, 0xaa3f,
+ 0xaa4e, 0xaa4f,
+ 0xaa5a, 0xaa5b,
+ 0xaac3, 0xaada,
+ 0xaaf7, 0xab00,
+ 0xab07, 0xab08,
+ 0xab0f, 0xab10,
+ 0xab17, 0xab1f,
+ 0xab27, 0xab27,
+ 0xab2f, 0xab2f,
+ 0xab6c, 0xab6f,
+ 0xabee, 0xabef,
+ 0xabfa, 0xabff,
+ 0xd7a4, 0xd7af,
+ 0xd7c7, 0xd7ca,
+ 0xd7fc, 0xf8ff,
+ 0xfa6e, 0xfa6f,
+ 0xfada, 0xfaff,
+ 0xfb07, 0xfb12,
+ 0xfb18, 0xfb1c,
+ 0xfb37, 0xfb37,
+ 0xfb3d, 0xfb3d,
+ 0xfb3f, 0xfb3f,
+ 0xfb42, 0xfb42,
+ 0xfb45, 0xfb45,
+ 0xfbc3, 0xfbd2,
+ 0xfd90, 0xfd91,
+ 0xfdc8, 0xfdce,
+ 0xfdd0, 0xfdef,
+ 0xfe1a, 0xfe1f,
+ 0xfe53, 0xfe53,
+ 0xfe67, 0xfe67,
+ 0xfe6c, 0xfe6f,
+ 0xfe75, 0xfe75,
+ 0xfefd, 0xff00,
+ 0xffbf, 0xffc1,
+ 0xffc8, 0xffc9,
+ 0xffd0, 0xffd1,
+ 0xffd8, 0xffd9,
+ 0xffdd, 0xffdf,
+ 0xffe7, 0xffe7,
+ 0xffef, 0xfffb,
+ 0xfffe, 0xffff,
+ 0x1000c, 0x1000c,
+ 0x10027, 0x10027,
+ 0x1003b, 0x1003b,
+ 0x1003e, 0x1003e,
+ 0x1004e, 0x1004f,
+ 0x1005e, 0x1007f,
+ 0x100fb, 0x100ff,
+ 0x10103, 0x10106,
+ 0x10134, 0x10136,
+ 0x1018f, 0x1018f,
+ 0x1019d, 0x1019f,
+ 0x101a1, 0x101cf,
+ 0x101fe, 0x1027f,
+ 0x1029d, 0x1029f,
+ 0x102d1, 0x102df,
+ 0x102fc, 0x102ff,
+ 0x10324, 0x1032c,
+ 0x1034b, 0x1034f,
+ 0x1037b, 0x1037f,
+ 0x1039e, 0x1039e,
+ 0x103c4, 0x103c7,
+ 0x103d6, 0x103ff,
+ 0x1049e, 0x1049f,
+ 0x104aa, 0x104af,
+ 0x104d4, 0x104d7,
+ 0x104fc, 0x104ff,
+ 0x10528, 0x1052f,
+ 0x10564, 0x1056e,
+ 0x1057b, 0x1057b,
+ 0x1058b, 0x1058b,
+ 0x10593, 0x10593,
+ 0x10596, 0x10596,
+ 0x105a2, 0x105a2,
+ 0x105b2, 0x105b2,
+ 0x105ba, 0x105ba,
+ 0x105bd, 0x105ff,
+ 0x10737, 0x1073f,
+ 0x10756, 0x1075f,
+ 0x10768, 0x1077f,
+ 0x10786, 0x10786,
+ 0x107b1, 0x107b1,
+ 0x107bb, 0x107ff,
+ 0x10806, 0x10807,
+ 0x10809, 0x10809,
+ 0x10836, 0x10836,
+ 0x10839, 0x1083b,
+ 0x1083d, 0x1083e,
+ 0x10856, 0x10856,
+ 0x1089f, 0x108a6,
+ 0x108b0, 0x108df,
+ 0x108f3, 0x108f3,
+ 0x108f6, 0x108fa,
+ 0x1091c, 0x1091e,
+ 0x1093a, 0x1093e,
+ 0x10940, 0x1097f,
+ 0x109b8, 0x109bb,
+ 0x109d0, 0x109d1,
+ 0x10a04, 0x10a04,
+ 0x10a07, 0x10a0b,
+ 0x10a14, 0x10a14,
+ 0x10a18, 0x10a18,
+ 0x10a36, 0x10a37,
+ 0x10a3b, 0x10a3e,
+ 0x10a49, 0x10a4f,
+ 0x10a59, 0x10a5f,
+ 0x10aa0, 0x10abf,
+ 0x10ae7, 0x10aea,
+ 0x10af7, 0x10aff,
+ 0x10b36, 0x10b38,
+ 0x10b56, 0x10b57,
+ 0x10b73, 0x10b77,
+ 0x10b92, 0x10b98,
+ 0x10b9d, 0x10ba8,
+ 0x10bb0, 0x10bff,
+ 0x10c49, 0x10c7f,
+ 0x10cb3, 0x10cbf,
+ 0x10cf3, 0x10cf9,
+ 0x10d28, 0x10d2f,
+ 0x10d3a, 0x10e5f,
+ 0x10e7f, 0x10e7f,
+ 0x10eaa, 0x10eaa,
+ 0x10eae, 0x10eaf,
+ 0x10eb2, 0x10efc,
+ 0x10f28, 0x10f2f,
+ 0x10f5a, 0x10f6f,
+ 0x10f8a, 0x10faf,
+ 0x10fcc, 0x10fdf,
+ 0x10ff7, 0x10fff,
+ 0x1104e, 0x11051,
+ 0x11076, 0x1107e,
+ 0x110bd, 0x110bd,
+ 0x110c3, 0x110cf,
+ 0x110e9, 0x110ef,
+ 0x110fa, 0x110ff,
+ 0x11135, 0x11135,
+ 0x11148, 0x1114f,
+ 0x11177, 0x1117f,
+ 0x111e0, 0x111e0,
+ 0x111f5, 0x111ff,
+ 0x11212, 0x11212,
+ 0x11242, 0x1127f,
+ 0x11287, 0x11287,
+ 0x11289, 0x11289,
+ 0x1128e, 0x1128e,
+ 0x1129e, 0x1129e,
+ 0x112aa, 0x112af,
+ 0x112eb, 0x112ef,
+ 0x112fa, 0x112ff,
+ 0x11304, 0x11304,
+ 0x1130d, 0x1130e,
+ 0x11311, 0x11312,
+ 0x11329, 0x11329,
+ 0x11331, 0x11331,
+ 0x11334, 0x11334,
+ 0x1133a, 0x1133a,
+ 0x11345, 0x11346,
+ 0x11349, 0x1134a,
+ 0x1134e, 0x1134f,
+ 0x11351, 0x11356,
+ 0x11358, 0x1135c,
+ 0x11364, 0x11365,
+ 0x1136d, 0x1136f,
+ 0x11375, 0x113ff,
+ 0x1145c, 0x1145c,
+ 0x11462, 0x1147f,
+ 0x114c8, 0x114cf,
+ 0x114da, 0x1157f,
+ 0x115b6, 0x115b7,
+ 0x115de, 0x115ff,
+ 0x11645, 0x1164f,
+ 0x1165a, 0x1165f,
+ 0x1166d, 0x1167f,
+ 0x116ba, 0x116bf,
+ 0x116ca, 0x116ff,
+ 0x1171b, 0x1171c,
+ 0x1172c, 0x1172f,
+ 0x11747, 0x117ff,
+ 0x1183c, 0x1189f,
+ 0x118f3, 0x118fe,
+ 0x11907, 0x11908,
+ 0x1190a, 0x1190b,
+ 0x11914, 0x11914,
+ 0x11917, 0x11917,
+ 0x11936, 0x11936,
+ 0x11939, 0x1193a,
+ 0x11947, 0x1194f,
+ 0x1195a, 0x1199f,
+ 0x119a8, 0x119a9,
+ 0x119d8, 0x119d9,
+ 0x119e5, 0x119ff,
+ 0x11a48, 0x11a4f,
+ 0x11aa3, 0x11aaf,
+ 0x11af9, 0x11aff,
+ 0x11b0a, 0x11bff,
+ 0x11c09, 0x11c09,
+ 0x11c37, 0x11c37,
+ 0x11c46, 0x11c4f,
+ 0x11c6d, 0x11c6f,
+ 0x11c90, 0x11c91,
+ 0x11ca8, 0x11ca8,
+ 0x11cb7, 0x11cff,
+ 0x11d07, 0x11d07,
+ 0x11d0a, 0x11d0a,
+ 0x11d37, 0x11d39,
+ 0x11d3b, 0x11d3b,
+ 0x11d3e, 0x11d3e,
+ 0x11d48, 0x11d4f,
+ 0x11d5a, 0x11d5f,
+ 0x11d66, 0x11d66,
+ 0x11d69, 0x11d69,
+ 0x11d8f, 0x11d8f,
+ 0x11d92, 0x11d92,
+ 0x11d99, 0x11d9f,
+ 0x11daa, 0x11edf,
+ 0x11ef9, 0x11eff,
+ 0x11f11, 0x11f11,
+ 0x11f3b, 0x11f3d,
+ 0x11f5a, 0x11faf,
+ 0x11fb1, 0x11fbf,
+ 0x11ff2, 0x11ffe,
+ 0x1239a, 0x123ff,
+ 0x1246f, 0x1246f,
+ 0x12475, 0x1247f,
+ 0x12544, 0x12f8f,
+ 0x12ff3, 0x12fff,
+ 0x13430, 0x1343f,
+ 0x13456, 0x143ff,
+ 0x14647, 0x167ff,
+ 0x16a39, 0x16a3f,
+ 0x16a5f, 0x16a5f,
+ 0x16a6a, 0x16a6d,
+ 0x16abf, 0x16abf,
+ 0x16aca, 0x16acf,
+ 0x16aee, 0x16aef,
+ 0x16af6, 0x16aff,
+ 0x16b46, 0x16b4f,
+ 0x16b5a, 0x16b5a,
+ 0x16b62, 0x16b62,
+ 0x16b78, 0x16b7c,
+ 0x16b90, 0x16e3f,
+ 0x16e9b, 0x16eff,
+ 0x16f4b, 0x16f4e,
+ 0x16f88, 0x16f8e,
+ 0x16fa0, 0x16fdf,
+ 0x16fe5, 0x16fef,
+ 0x16ff2, 0x16fff,
+ 0x187f8, 0x187ff,
+ 0x18cd6, 0x18cff,
+ 0x18d09, 0x1afef,
+ 0x1aff4, 0x1aff4,
+ 0x1affc, 0x1affc,
+ 0x1afff, 0x1afff,
+ 0x1b123, 0x1b131,
+ 0x1b133, 0x1b14f,
+ 0x1b153, 0x1b154,
+ 0x1b156, 0x1b163,
+ 0x1b168, 0x1b16f,
+ 0x1b2fc, 0x1bbff,
+ 0x1bc6b, 0x1bc6f,
+ 0x1bc7d, 0x1bc7f,
+ 0x1bc89, 0x1bc8f,
+ 0x1bc9a, 0x1bc9b,
+ 0x1bca0, 0x1ceff,
+ 0x1cf2e, 0x1cf2f,
+ 0x1cf47, 0x1cf4f,
+ 0x1cfc4, 0x1cfff,
+ 0x1d0f6, 0x1d0ff,
+ 0x1d127, 0x1d128,
+ 0x1d173, 0x1d17a,
+ 0x1d1eb, 0x1d1ff,
+ 0x1d246, 0x1d2bf,
+ 0x1d2d4, 0x1d2df,
+ 0x1d2f4, 0x1d2ff,
+ 0x1d357, 0x1d35f,
+ 0x1d379, 0x1d3ff,
+ 0x1d455, 0x1d455,
+ 0x1d49d, 0x1d49d,
+ 0x1d4a0, 0x1d4a1,
+ 0x1d4a3, 0x1d4a4,
+ 0x1d4a7, 0x1d4a8,
+ 0x1d4ad, 0x1d4ad,
+ 0x1d4ba, 0x1d4ba,
+ 0x1d4bc, 0x1d4bc,
+ 0x1d4c4, 0x1d4c4,
+ 0x1d506, 0x1d506,
+ 0x1d50b, 0x1d50c,
+ 0x1d515, 0x1d515,
+ 0x1d51d, 0x1d51d,
+ 0x1d53a, 0x1d53a,
+ 0x1d53f, 0x1d53f,
+ 0x1d545, 0x1d545,
+ 0x1d547, 0x1d549,
+ 0x1d551, 0x1d551,
+ 0x1d6a6, 0x1d6a7,
+ 0x1d7cc, 0x1d7cd,
+ 0x1da8c, 0x1da9a,
+ 0x1daa0, 0x1daa0,
+ 0x1dab0, 0x1deff,
+ 0x1df1f, 0x1df24,
+ 0x1df2b, 0x1dfff,
+ 0x1e007, 0x1e007,
+ 0x1e019, 0x1e01a,
+ 0x1e022, 0x1e022,
+ 0x1e025, 0x1e025,
+ 0x1e02b, 0x1e02f,
+ 0x1e06e, 0x1e08e,
+ 0x1e090, 0x1e0ff,
+ 0x1e12d, 0x1e12f,
+ 0x1e13e, 0x1e13f,
+ 0x1e14a, 0x1e14d,
+ 0x1e150, 0x1e28f,
+ 0x1e2af, 0x1e2bf,
+ 0x1e2fa, 0x1e2fe,
+ 0x1e300, 0x1e4cf,
+ 0x1e4fa, 0x1e7df,
+ 0x1e7e7, 0x1e7e7,
+ 0x1e7ec, 0x1e7ec,
+ 0x1e7ef, 0x1e7ef,
+ 0x1e7ff, 0x1e7ff,
+ 0x1e8c5, 0x1e8c6,
+ 0x1e8d7, 0x1e8ff,
+ 0x1e94c, 0x1e94f,
+ 0x1e95a, 0x1e95d,
+ 0x1e960, 0x1ec70,
+ 0x1ecb5, 0x1ed00,
+ 0x1ed3e, 0x1edff,
+ 0x1ee04, 0x1ee04,
+ 0x1ee20, 0x1ee20,
+ 0x1ee23, 0x1ee23,
+ 0x1ee25, 0x1ee26,
+ 0x1ee28, 0x1ee28,
+ 0x1ee33, 0x1ee33,
+ 0x1ee38, 0x1ee38,
+ 0x1ee3a, 0x1ee3a,
+ 0x1ee3c, 0x1ee41,
+ 0x1ee43, 0x1ee46,
+ 0x1ee48, 0x1ee48,
+ 0x1ee4a, 0x1ee4a,
+ 0x1ee4c, 0x1ee4c,
+ 0x1ee50, 0x1ee50,
+ 0x1ee53, 0x1ee53,
+ 0x1ee55, 0x1ee56,
+ 0x1ee58, 0x1ee58,
+ 0x1ee5a, 0x1ee5a,
+ 0x1ee5c, 0x1ee5c,
+ 0x1ee5e, 0x1ee5e,
+ 0x1ee60, 0x1ee60,
+ 0x1ee63, 0x1ee63,
+ 0x1ee65, 0x1ee66,
+ 0x1ee6b, 0x1ee6b,
+ 0x1ee73, 0x1ee73,
+ 0x1ee78, 0x1ee78,
+ 0x1ee7d, 0x1ee7d,
+ 0x1ee7f, 0x1ee7f,
+ 0x1ee8a, 0x1ee8a,
+ 0x1ee9c, 0x1eea0,
+ 0x1eea4, 0x1eea4,
+ 0x1eeaa, 0x1eeaa,
+ 0x1eebc, 0x1eeef,
+ 0x1eef2, 0x1efff,
+ 0x1f02c, 0x1f02f,
+ 0x1f094, 0x1f09f,
+ 0x1f0af, 0x1f0b0,
+ 0x1f0c0, 0x1f0c0,
+ 0x1f0d0, 0x1f0d0,
+ 0x1f0f6, 0x1f0ff,
+ 0x1f1ae, 0x1f1e5,
+ 0x1f203, 0x1f20f,
+ 0x1f23c, 0x1f23f,
+ 0x1f249, 0x1f24f,
+ 0x1f252, 0x1f25f,
+ 0x1f266, 0x1f2ff,
+ 0x1f6d8, 0x1f6db,
+ 0x1f6ed, 0x1f6ef,
+ 0x1f6fd, 0x1f6ff,
+ 0x1f777, 0x1f77a,
+ 0x1f7da, 0x1f7df,
+ 0x1f7ec, 0x1f7ef,
+ 0x1f7f1, 0x1f7ff,
+ 0x1f80c, 0x1f80f,
+ 0x1f848, 0x1f84f,
+ 0x1f85a, 0x1f85f,
+ 0x1f888, 0x1f88f,
+ 0x1f8ae, 0x1f8af,
+ 0x1f8b2, 0x1f8ff,
+ 0x1fa54, 0x1fa5f,
+ 0x1fa6e, 0x1fa6f,
+ 0x1fa7d, 0x1fa7f,
+ 0x1fa89, 0x1fa8f,
+ 0x1fabe, 0x1fabe,
+ 0x1fac6, 0x1facd,
+ 0x1fadc, 0x1fadf,
+ 0x1fae9, 0x1faef,
+ 0x1faf9, 0x1faff,
+ 0x1fb93, 0x1fb93,
+ 0x1fbcb, 0x1fbef,
+ 0x1fbfa, 0x1ffff,
+ 0x2a6e0, 0x2a6ff,
+ 0x2b73a, 0x2b73f,
+ 0x2b81e, 0x2b81f,
+ 0x2cea2, 0x2ceaf,
+ 0x2ebe1, 0x2f7ff,
+ 0x2fa1e, 0x2ffff,
+ 0x3134b, 0x3134f,
+ 0x323b0, 0xe00ff,
+ 0xe01f0, 0x10ffff,
+}; /* CR_C */
+
+/* 'Cc': General Category */
+#define CR_Cc CR_Cntrl
+
+/* 'Cf': General Category */
+static const OnigCodePoint CR_Cf[] = {
+ 21,
+ 0x00ad, 0x00ad,
+ 0x0600, 0x0605,
+ 0x061c, 0x061c,
+ 0x06dd, 0x06dd,
+ 0x070f, 0x070f,
+ 0x0890, 0x0891,
+ 0x08e2, 0x08e2,
+ 0x180e, 0x180e,
+ 0x200b, 0x200f,
+ 0x202a, 0x202e,
+ 0x2060, 0x2064,
+ 0x2066, 0x206f,
+ 0xfeff, 0xfeff,
+ 0xfff9, 0xfffb,
+ 0x110bd, 0x110bd,
+ 0x110cd, 0x110cd,
+ 0x13430, 0x1343f,
+ 0x1bca0, 0x1bca3,
+ 0x1d173, 0x1d17a,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+}; /* CR_Cf */
+
+/* 'Cn': General Category */
+static const OnigCodePoint CR_Cn[] = {
+ 707,
+ 0x0378, 0x0379,
+ 0x0380, 0x0383,
+ 0x038b, 0x038b,
+ 0x038d, 0x038d,
+ 0x03a2, 0x03a2,
+ 0x0530, 0x0530,
+ 0x0557, 0x0558,
+ 0x058b, 0x058c,
+ 0x0590, 0x0590,
+ 0x05c8, 0x05cf,
+ 0x05eb, 0x05ee,
+ 0x05f5, 0x05ff,
+ 0x070e, 0x070e,
+ 0x074b, 0x074c,
+ 0x07b2, 0x07bf,
+ 0x07fb, 0x07fc,
+ 0x082e, 0x082f,
+ 0x083f, 0x083f,
+ 0x085c, 0x085d,
+ 0x085f, 0x085f,
+ 0x086b, 0x086f,
+ 0x088f, 0x088f,
+ 0x0892, 0x0897,
+ 0x0984, 0x0984,
+ 0x098d, 0x098e,
+ 0x0991, 0x0992,
+ 0x09a9, 0x09a9,
+ 0x09b1, 0x09b1,
+ 0x09b3, 0x09b5,
+ 0x09ba, 0x09bb,
+ 0x09c5, 0x09c6,
+ 0x09c9, 0x09ca,
+ 0x09cf, 0x09d6,
+ 0x09d8, 0x09db,
+ 0x09de, 0x09de,
+ 0x09e4, 0x09e5,
+ 0x09ff, 0x0a00,
+ 0x0a04, 0x0a04,
+ 0x0a0b, 0x0a0e,
+ 0x0a11, 0x0a12,
+ 0x0a29, 0x0a29,
+ 0x0a31, 0x0a31,
+ 0x0a34, 0x0a34,
+ 0x0a37, 0x0a37,
+ 0x0a3a, 0x0a3b,
+ 0x0a3d, 0x0a3d,
+ 0x0a43, 0x0a46,
+ 0x0a49, 0x0a4a,
+ 0x0a4e, 0x0a50,
+ 0x0a52, 0x0a58,
+ 0x0a5d, 0x0a5d,
+ 0x0a5f, 0x0a65,
+ 0x0a77, 0x0a80,
+ 0x0a84, 0x0a84,
+ 0x0a8e, 0x0a8e,
+ 0x0a92, 0x0a92,
+ 0x0aa9, 0x0aa9,
+ 0x0ab1, 0x0ab1,
+ 0x0ab4, 0x0ab4,
+ 0x0aba, 0x0abb,
+ 0x0ac6, 0x0ac6,
+ 0x0aca, 0x0aca,
+ 0x0ace, 0x0acf,
+ 0x0ad1, 0x0adf,
+ 0x0ae4, 0x0ae5,
+ 0x0af2, 0x0af8,
+ 0x0b00, 0x0b00,
+ 0x0b04, 0x0b04,
+ 0x0b0d, 0x0b0e,
+ 0x0b11, 0x0b12,
+ 0x0b29, 0x0b29,
+ 0x0b31, 0x0b31,
+ 0x0b34, 0x0b34,
+ 0x0b3a, 0x0b3b,
+ 0x0b45, 0x0b46,
+ 0x0b49, 0x0b4a,
+ 0x0b4e, 0x0b54,
+ 0x0b58, 0x0b5b,
+ 0x0b5e, 0x0b5e,
+ 0x0b64, 0x0b65,
+ 0x0b78, 0x0b81,
+ 0x0b84, 0x0b84,
+ 0x0b8b, 0x0b8d,
+ 0x0b91, 0x0b91,
+ 0x0b96, 0x0b98,
+ 0x0b9b, 0x0b9b,
+ 0x0b9d, 0x0b9d,
+ 0x0ba0, 0x0ba2,
+ 0x0ba5, 0x0ba7,
+ 0x0bab, 0x0bad,
+ 0x0bba, 0x0bbd,
+ 0x0bc3, 0x0bc5,
+ 0x0bc9, 0x0bc9,
+ 0x0bce, 0x0bcf,
+ 0x0bd1, 0x0bd6,
+ 0x0bd8, 0x0be5,
+ 0x0bfb, 0x0bff,
+ 0x0c0d, 0x0c0d,
+ 0x0c11, 0x0c11,
+ 0x0c29, 0x0c29,
+ 0x0c3a, 0x0c3b,
+ 0x0c45, 0x0c45,
+ 0x0c49, 0x0c49,
+ 0x0c4e, 0x0c54,
+ 0x0c57, 0x0c57,
+ 0x0c5b, 0x0c5c,
+ 0x0c5e, 0x0c5f,
+ 0x0c64, 0x0c65,
+ 0x0c70, 0x0c76,
+ 0x0c8d, 0x0c8d,
+ 0x0c91, 0x0c91,
+ 0x0ca9, 0x0ca9,
+ 0x0cb4, 0x0cb4,
+ 0x0cba, 0x0cbb,
+ 0x0cc5, 0x0cc5,
+ 0x0cc9, 0x0cc9,
+ 0x0cce, 0x0cd4,
+ 0x0cd7, 0x0cdc,
+ 0x0cdf, 0x0cdf,
+ 0x0ce4, 0x0ce5,
+ 0x0cf0, 0x0cf0,
+ 0x0cf4, 0x0cff,
+ 0x0d0d, 0x0d0d,
+ 0x0d11, 0x0d11,
+ 0x0d45, 0x0d45,
+ 0x0d49, 0x0d49,
+ 0x0d50, 0x0d53,
+ 0x0d64, 0x0d65,
+ 0x0d80, 0x0d80,
+ 0x0d84, 0x0d84,
+ 0x0d97, 0x0d99,
+ 0x0db2, 0x0db2,
+ 0x0dbc, 0x0dbc,
+ 0x0dbe, 0x0dbf,
+ 0x0dc7, 0x0dc9,
+ 0x0dcb, 0x0dce,
+ 0x0dd5, 0x0dd5,
+ 0x0dd7, 0x0dd7,
+ 0x0de0, 0x0de5,
+ 0x0df0, 0x0df1,
+ 0x0df5, 0x0e00,
+ 0x0e3b, 0x0e3e,
+ 0x0e5c, 0x0e80,
+ 0x0e83, 0x0e83,
+ 0x0e85, 0x0e85,
+ 0x0e8b, 0x0e8b,
+ 0x0ea4, 0x0ea4,
+ 0x0ea6, 0x0ea6,
+ 0x0ebe, 0x0ebf,
+ 0x0ec5, 0x0ec5,
+ 0x0ec7, 0x0ec7,
+ 0x0ecf, 0x0ecf,
+ 0x0eda, 0x0edb,
+ 0x0ee0, 0x0eff,
+ 0x0f48, 0x0f48,
+ 0x0f6d, 0x0f70,
+ 0x0f98, 0x0f98,
+ 0x0fbd, 0x0fbd,
+ 0x0fcd, 0x0fcd,
+ 0x0fdb, 0x0fff,
+ 0x10c6, 0x10c6,
+ 0x10c8, 0x10cc,
+ 0x10ce, 0x10cf,
+ 0x1249, 0x1249,
+ 0x124e, 0x124f,
+ 0x1257, 0x1257,
+ 0x1259, 0x1259,
+ 0x125e, 0x125f,
+ 0x1289, 0x1289,
+ 0x128e, 0x128f,
+ 0x12b1, 0x12b1,
+ 0x12b6, 0x12b7,
+ 0x12bf, 0x12bf,
+ 0x12c1, 0x12c1,
+ 0x12c6, 0x12c7,
+ 0x12d7, 0x12d7,
+ 0x1311, 0x1311,
+ 0x1316, 0x1317,
+ 0x135b, 0x135c,
+ 0x137d, 0x137f,
+ 0x139a, 0x139f,
+ 0x13f6, 0x13f7,
+ 0x13fe, 0x13ff,
+ 0x169d, 0x169f,
+ 0x16f9, 0x16ff,
+ 0x1716, 0x171e,
+ 0x1737, 0x173f,
+ 0x1754, 0x175f,
+ 0x176d, 0x176d,
+ 0x1771, 0x1771,
+ 0x1774, 0x177f,
+ 0x17de, 0x17df,
+ 0x17ea, 0x17ef,
+ 0x17fa, 0x17ff,
+ 0x181a, 0x181f,
+ 0x1879, 0x187f,
+ 0x18ab, 0x18af,
+ 0x18f6, 0x18ff,
+ 0x191f, 0x191f,
+ 0x192c, 0x192f,
+ 0x193c, 0x193f,
+ 0x1941, 0x1943,
+ 0x196e, 0x196f,
+ 0x1975, 0x197f,
+ 0x19ac, 0x19af,
+ 0x19ca, 0x19cf,
+ 0x19db, 0x19dd,
+ 0x1a1c, 0x1a1d,
+ 0x1a5f, 0x1a5f,
+ 0x1a7d, 0x1a7e,
+ 0x1a8a, 0x1a8f,
+ 0x1a9a, 0x1a9f,
+ 0x1aae, 0x1aaf,
+ 0x1acf, 0x1aff,
+ 0x1b4d, 0x1b4f,
+ 0x1b7f, 0x1b7f,
+ 0x1bf4, 0x1bfb,
+ 0x1c38, 0x1c3a,
+ 0x1c4a, 0x1c4c,
+ 0x1c89, 0x1c8f,
+ 0x1cbb, 0x1cbc,
+ 0x1cc8, 0x1ccf,
+ 0x1cfb, 0x1cff,
+ 0x1f16, 0x1f17,
+ 0x1f1e, 0x1f1f,
+ 0x1f46, 0x1f47,
+ 0x1f4e, 0x1f4f,
+ 0x1f58, 0x1f58,
+ 0x1f5a, 0x1f5a,
+ 0x1f5c, 0x1f5c,
+ 0x1f5e, 0x1f5e,
+ 0x1f7e, 0x1f7f,
+ 0x1fb5, 0x1fb5,
+ 0x1fc5, 0x1fc5,
+ 0x1fd4, 0x1fd5,
+ 0x1fdc, 0x1fdc,
+ 0x1ff0, 0x1ff1,
+ 0x1ff5, 0x1ff5,
+ 0x1fff, 0x1fff,
+ 0x2065, 0x2065,
+ 0x2072, 0x2073,
+ 0x208f, 0x208f,
+ 0x209d, 0x209f,
+ 0x20c1, 0x20cf,
+ 0x20f1, 0x20ff,
+ 0x218c, 0x218f,
+ 0x2427, 0x243f,
+ 0x244b, 0x245f,
+ 0x2b74, 0x2b75,
+ 0x2b96, 0x2b96,
+ 0x2cf4, 0x2cf8,
+ 0x2d26, 0x2d26,
+ 0x2d28, 0x2d2c,
+ 0x2d2e, 0x2d2f,
+ 0x2d68, 0x2d6e,
+ 0x2d71, 0x2d7e,
+ 0x2d97, 0x2d9f,
+ 0x2da7, 0x2da7,
+ 0x2daf, 0x2daf,
+ 0x2db7, 0x2db7,
+ 0x2dbf, 0x2dbf,
+ 0x2dc7, 0x2dc7,
+ 0x2dcf, 0x2dcf,
+ 0x2dd7, 0x2dd7,
+ 0x2ddf, 0x2ddf,
+ 0x2e5e, 0x2e7f,
+ 0x2e9a, 0x2e9a,
+ 0x2ef4, 0x2eff,
+ 0x2fd6, 0x2fef,
+ 0x2ffc, 0x2fff,
+ 0x3040, 0x3040,
+ 0x3097, 0x3098,
+ 0x3100, 0x3104,
+ 0x3130, 0x3130,
+ 0x318f, 0x318f,
+ 0x31e4, 0x31ef,
+ 0x321f, 0x321f,
+ 0xa48d, 0xa48f,
+ 0xa4c7, 0xa4cf,
+ 0xa62c, 0xa63f,
+ 0xa6f8, 0xa6ff,
+ 0xa7cb, 0xa7cf,
+ 0xa7d2, 0xa7d2,
+ 0xa7d4, 0xa7d4,
+ 0xa7da, 0xa7f1,
+ 0xa82d, 0xa82f,
+ 0xa83a, 0xa83f,
+ 0xa878, 0xa87f,
+ 0xa8c6, 0xa8cd,
+ 0xa8da, 0xa8df,
+ 0xa954, 0xa95e,
+ 0xa97d, 0xa97f,
+ 0xa9ce, 0xa9ce,
+ 0xa9da, 0xa9dd,
+ 0xa9ff, 0xa9ff,
+ 0xaa37, 0xaa3f,
+ 0xaa4e, 0xaa4f,
+ 0xaa5a, 0xaa5b,
+ 0xaac3, 0xaada,
+ 0xaaf7, 0xab00,
+ 0xab07, 0xab08,
+ 0xab0f, 0xab10,
+ 0xab17, 0xab1f,
+ 0xab27, 0xab27,
+ 0xab2f, 0xab2f,
+ 0xab6c, 0xab6f,
+ 0xabee, 0xabef,
+ 0xabfa, 0xabff,
+ 0xd7a4, 0xd7af,
+ 0xd7c7, 0xd7ca,
+ 0xd7fc, 0xd7ff,
+ 0xfa6e, 0xfa6f,
+ 0xfada, 0xfaff,
+ 0xfb07, 0xfb12,
+ 0xfb18, 0xfb1c,
+ 0xfb37, 0xfb37,
+ 0xfb3d, 0xfb3d,
+ 0xfb3f, 0xfb3f,
+ 0xfb42, 0xfb42,
+ 0xfb45, 0xfb45,
+ 0xfbc3, 0xfbd2,
+ 0xfd90, 0xfd91,
+ 0xfdc8, 0xfdce,
+ 0xfdd0, 0xfdef,
+ 0xfe1a, 0xfe1f,
+ 0xfe53, 0xfe53,
+ 0xfe67, 0xfe67,
+ 0xfe6c, 0xfe6f,
+ 0xfe75, 0xfe75,
+ 0xfefd, 0xfefe,
+ 0xff00, 0xff00,
+ 0xffbf, 0xffc1,
+ 0xffc8, 0xffc9,
+ 0xffd0, 0xffd1,
+ 0xffd8, 0xffd9,
+ 0xffdd, 0xffdf,
+ 0xffe7, 0xffe7,
+ 0xffef, 0xfff8,
+ 0xfffe, 0xffff,
+ 0x1000c, 0x1000c,
+ 0x10027, 0x10027,
+ 0x1003b, 0x1003b,
+ 0x1003e, 0x1003e,
+ 0x1004e, 0x1004f,
+ 0x1005e, 0x1007f,
+ 0x100fb, 0x100ff,
+ 0x10103, 0x10106,
+ 0x10134, 0x10136,
+ 0x1018f, 0x1018f,
+ 0x1019d, 0x1019f,
+ 0x101a1, 0x101cf,
+ 0x101fe, 0x1027f,
+ 0x1029d, 0x1029f,
+ 0x102d1, 0x102df,
+ 0x102fc, 0x102ff,
+ 0x10324, 0x1032c,
+ 0x1034b, 0x1034f,
+ 0x1037b, 0x1037f,
+ 0x1039e, 0x1039e,
+ 0x103c4, 0x103c7,
+ 0x103d6, 0x103ff,
+ 0x1049e, 0x1049f,
+ 0x104aa, 0x104af,
+ 0x104d4, 0x104d7,
+ 0x104fc, 0x104ff,
+ 0x10528, 0x1052f,
+ 0x10564, 0x1056e,
+ 0x1057b, 0x1057b,
+ 0x1058b, 0x1058b,
+ 0x10593, 0x10593,
+ 0x10596, 0x10596,
+ 0x105a2, 0x105a2,
+ 0x105b2, 0x105b2,
+ 0x105ba, 0x105ba,
+ 0x105bd, 0x105ff,
+ 0x10737, 0x1073f,
+ 0x10756, 0x1075f,
+ 0x10768, 0x1077f,
+ 0x10786, 0x10786,
+ 0x107b1, 0x107b1,
+ 0x107bb, 0x107ff,
+ 0x10806, 0x10807,
+ 0x10809, 0x10809,
+ 0x10836, 0x10836,
+ 0x10839, 0x1083b,
+ 0x1083d, 0x1083e,
+ 0x10856, 0x10856,
+ 0x1089f, 0x108a6,
+ 0x108b0, 0x108df,
+ 0x108f3, 0x108f3,
+ 0x108f6, 0x108fa,
+ 0x1091c, 0x1091e,
+ 0x1093a, 0x1093e,
+ 0x10940, 0x1097f,
+ 0x109b8, 0x109bb,
+ 0x109d0, 0x109d1,
+ 0x10a04, 0x10a04,
+ 0x10a07, 0x10a0b,
+ 0x10a14, 0x10a14,
+ 0x10a18, 0x10a18,
+ 0x10a36, 0x10a37,
+ 0x10a3b, 0x10a3e,
+ 0x10a49, 0x10a4f,
+ 0x10a59, 0x10a5f,
+ 0x10aa0, 0x10abf,
+ 0x10ae7, 0x10aea,
+ 0x10af7, 0x10aff,
+ 0x10b36, 0x10b38,
+ 0x10b56, 0x10b57,
+ 0x10b73, 0x10b77,
+ 0x10b92, 0x10b98,
+ 0x10b9d, 0x10ba8,
+ 0x10bb0, 0x10bff,
+ 0x10c49, 0x10c7f,
+ 0x10cb3, 0x10cbf,
+ 0x10cf3, 0x10cf9,
+ 0x10d28, 0x10d2f,
+ 0x10d3a, 0x10e5f,
+ 0x10e7f, 0x10e7f,
+ 0x10eaa, 0x10eaa,
+ 0x10eae, 0x10eaf,
+ 0x10eb2, 0x10efc,
+ 0x10f28, 0x10f2f,
+ 0x10f5a, 0x10f6f,
+ 0x10f8a, 0x10faf,
+ 0x10fcc, 0x10fdf,
+ 0x10ff7, 0x10fff,
+ 0x1104e, 0x11051,
+ 0x11076, 0x1107e,
+ 0x110c3, 0x110cc,
+ 0x110ce, 0x110cf,
+ 0x110e9, 0x110ef,
+ 0x110fa, 0x110ff,
+ 0x11135, 0x11135,
+ 0x11148, 0x1114f,
+ 0x11177, 0x1117f,
+ 0x111e0, 0x111e0,
+ 0x111f5, 0x111ff,
+ 0x11212, 0x11212,
+ 0x11242, 0x1127f,
+ 0x11287, 0x11287,
+ 0x11289, 0x11289,
+ 0x1128e, 0x1128e,
+ 0x1129e, 0x1129e,
+ 0x112aa, 0x112af,
+ 0x112eb, 0x112ef,
+ 0x112fa, 0x112ff,
+ 0x11304, 0x11304,
+ 0x1130d, 0x1130e,
+ 0x11311, 0x11312,
+ 0x11329, 0x11329,
+ 0x11331, 0x11331,
+ 0x11334, 0x11334,
+ 0x1133a, 0x1133a,
+ 0x11345, 0x11346,
+ 0x11349, 0x1134a,
+ 0x1134e, 0x1134f,
+ 0x11351, 0x11356,
+ 0x11358, 0x1135c,
+ 0x11364, 0x11365,
+ 0x1136d, 0x1136f,
+ 0x11375, 0x113ff,
+ 0x1145c, 0x1145c,
+ 0x11462, 0x1147f,
+ 0x114c8, 0x114cf,
+ 0x114da, 0x1157f,
+ 0x115b6, 0x115b7,
+ 0x115de, 0x115ff,
+ 0x11645, 0x1164f,
+ 0x1165a, 0x1165f,
+ 0x1166d, 0x1167f,
+ 0x116ba, 0x116bf,
+ 0x116ca, 0x116ff,
+ 0x1171b, 0x1171c,
+ 0x1172c, 0x1172f,
+ 0x11747, 0x117ff,
+ 0x1183c, 0x1189f,
+ 0x118f3, 0x118fe,
+ 0x11907, 0x11908,
+ 0x1190a, 0x1190b,
+ 0x11914, 0x11914,
+ 0x11917, 0x11917,
+ 0x11936, 0x11936,
+ 0x11939, 0x1193a,
+ 0x11947, 0x1194f,
+ 0x1195a, 0x1199f,
+ 0x119a8, 0x119a9,
+ 0x119d8, 0x119d9,
+ 0x119e5, 0x119ff,
+ 0x11a48, 0x11a4f,
+ 0x11aa3, 0x11aaf,
+ 0x11af9, 0x11aff,
+ 0x11b0a, 0x11bff,
+ 0x11c09, 0x11c09,
+ 0x11c37, 0x11c37,
+ 0x11c46, 0x11c4f,
+ 0x11c6d, 0x11c6f,
+ 0x11c90, 0x11c91,
+ 0x11ca8, 0x11ca8,
+ 0x11cb7, 0x11cff,
+ 0x11d07, 0x11d07,
+ 0x11d0a, 0x11d0a,
+ 0x11d37, 0x11d39,
+ 0x11d3b, 0x11d3b,
+ 0x11d3e, 0x11d3e,
+ 0x11d48, 0x11d4f,
+ 0x11d5a, 0x11d5f,
+ 0x11d66, 0x11d66,
+ 0x11d69, 0x11d69,
+ 0x11d8f, 0x11d8f,
+ 0x11d92, 0x11d92,
+ 0x11d99, 0x11d9f,
+ 0x11daa, 0x11edf,
+ 0x11ef9, 0x11eff,
+ 0x11f11, 0x11f11,
+ 0x11f3b, 0x11f3d,
+ 0x11f5a, 0x11faf,
+ 0x11fb1, 0x11fbf,
+ 0x11ff2, 0x11ffe,
+ 0x1239a, 0x123ff,
+ 0x1246f, 0x1246f,
+ 0x12475, 0x1247f,
+ 0x12544, 0x12f8f,
+ 0x12ff3, 0x12fff,
+ 0x13456, 0x143ff,
+ 0x14647, 0x167ff,
+ 0x16a39, 0x16a3f,
+ 0x16a5f, 0x16a5f,
+ 0x16a6a, 0x16a6d,
+ 0x16abf, 0x16abf,
+ 0x16aca, 0x16acf,
+ 0x16aee, 0x16aef,
+ 0x16af6, 0x16aff,
+ 0x16b46, 0x16b4f,
+ 0x16b5a, 0x16b5a,
+ 0x16b62, 0x16b62,
+ 0x16b78, 0x16b7c,
+ 0x16b90, 0x16e3f,
+ 0x16e9b, 0x16eff,
+ 0x16f4b, 0x16f4e,
+ 0x16f88, 0x16f8e,
+ 0x16fa0, 0x16fdf,
+ 0x16fe5, 0x16fef,
+ 0x16ff2, 0x16fff,
+ 0x187f8, 0x187ff,
+ 0x18cd6, 0x18cff,
+ 0x18d09, 0x1afef,
+ 0x1aff4, 0x1aff4,
+ 0x1affc, 0x1affc,
+ 0x1afff, 0x1afff,
+ 0x1b123, 0x1b131,
+ 0x1b133, 0x1b14f,
+ 0x1b153, 0x1b154,
+ 0x1b156, 0x1b163,
+ 0x1b168, 0x1b16f,
+ 0x1b2fc, 0x1bbff,
+ 0x1bc6b, 0x1bc6f,
+ 0x1bc7d, 0x1bc7f,
+ 0x1bc89, 0x1bc8f,
+ 0x1bc9a, 0x1bc9b,
+ 0x1bca4, 0x1ceff,
+ 0x1cf2e, 0x1cf2f,
+ 0x1cf47, 0x1cf4f,
+ 0x1cfc4, 0x1cfff,
+ 0x1d0f6, 0x1d0ff,
+ 0x1d127, 0x1d128,
+ 0x1d1eb, 0x1d1ff,
+ 0x1d246, 0x1d2bf,
+ 0x1d2d4, 0x1d2df,
+ 0x1d2f4, 0x1d2ff,
+ 0x1d357, 0x1d35f,
+ 0x1d379, 0x1d3ff,
+ 0x1d455, 0x1d455,
+ 0x1d49d, 0x1d49d,
+ 0x1d4a0, 0x1d4a1,
+ 0x1d4a3, 0x1d4a4,
+ 0x1d4a7, 0x1d4a8,
+ 0x1d4ad, 0x1d4ad,
+ 0x1d4ba, 0x1d4ba,
+ 0x1d4bc, 0x1d4bc,
+ 0x1d4c4, 0x1d4c4,
+ 0x1d506, 0x1d506,
+ 0x1d50b, 0x1d50c,
+ 0x1d515, 0x1d515,
+ 0x1d51d, 0x1d51d,
+ 0x1d53a, 0x1d53a,
+ 0x1d53f, 0x1d53f,
+ 0x1d545, 0x1d545,
+ 0x1d547, 0x1d549,
+ 0x1d551, 0x1d551,
+ 0x1d6a6, 0x1d6a7,
+ 0x1d7cc, 0x1d7cd,
+ 0x1da8c, 0x1da9a,
+ 0x1daa0, 0x1daa0,
+ 0x1dab0, 0x1deff,
+ 0x1df1f, 0x1df24,
+ 0x1df2b, 0x1dfff,
+ 0x1e007, 0x1e007,
+ 0x1e019, 0x1e01a,
+ 0x1e022, 0x1e022,
+ 0x1e025, 0x1e025,
+ 0x1e02b, 0x1e02f,
+ 0x1e06e, 0x1e08e,
+ 0x1e090, 0x1e0ff,
+ 0x1e12d, 0x1e12f,
+ 0x1e13e, 0x1e13f,
+ 0x1e14a, 0x1e14d,
+ 0x1e150, 0x1e28f,
+ 0x1e2af, 0x1e2bf,
+ 0x1e2fa, 0x1e2fe,
+ 0x1e300, 0x1e4cf,
+ 0x1e4fa, 0x1e7df,
+ 0x1e7e7, 0x1e7e7,
+ 0x1e7ec, 0x1e7ec,
+ 0x1e7ef, 0x1e7ef,
+ 0x1e7ff, 0x1e7ff,
+ 0x1e8c5, 0x1e8c6,
+ 0x1e8d7, 0x1e8ff,
+ 0x1e94c, 0x1e94f,
+ 0x1e95a, 0x1e95d,
+ 0x1e960, 0x1ec70,
+ 0x1ecb5, 0x1ed00,
+ 0x1ed3e, 0x1edff,
+ 0x1ee04, 0x1ee04,
+ 0x1ee20, 0x1ee20,
+ 0x1ee23, 0x1ee23,
+ 0x1ee25, 0x1ee26,
+ 0x1ee28, 0x1ee28,
+ 0x1ee33, 0x1ee33,
+ 0x1ee38, 0x1ee38,
+ 0x1ee3a, 0x1ee3a,
+ 0x1ee3c, 0x1ee41,
+ 0x1ee43, 0x1ee46,
+ 0x1ee48, 0x1ee48,
+ 0x1ee4a, 0x1ee4a,
+ 0x1ee4c, 0x1ee4c,
+ 0x1ee50, 0x1ee50,
+ 0x1ee53, 0x1ee53,
+ 0x1ee55, 0x1ee56,
+ 0x1ee58, 0x1ee58,
+ 0x1ee5a, 0x1ee5a,
+ 0x1ee5c, 0x1ee5c,
+ 0x1ee5e, 0x1ee5e,
+ 0x1ee60, 0x1ee60,
+ 0x1ee63, 0x1ee63,
+ 0x1ee65, 0x1ee66,
+ 0x1ee6b, 0x1ee6b,
+ 0x1ee73, 0x1ee73,
+ 0x1ee78, 0x1ee78,
+ 0x1ee7d, 0x1ee7d,
+ 0x1ee7f, 0x1ee7f,
+ 0x1ee8a, 0x1ee8a,
+ 0x1ee9c, 0x1eea0,
+ 0x1eea4, 0x1eea4,
+ 0x1eeaa, 0x1eeaa,
+ 0x1eebc, 0x1eeef,
+ 0x1eef2, 0x1efff,
+ 0x1f02c, 0x1f02f,
+ 0x1f094, 0x1f09f,
+ 0x1f0af, 0x1f0b0,
+ 0x1f0c0, 0x1f0c0,
+ 0x1f0d0, 0x1f0d0,
+ 0x1f0f6, 0x1f0ff,
+ 0x1f1ae, 0x1f1e5,
+ 0x1f203, 0x1f20f,
+ 0x1f23c, 0x1f23f,
+ 0x1f249, 0x1f24f,
+ 0x1f252, 0x1f25f,
+ 0x1f266, 0x1f2ff,
+ 0x1f6d8, 0x1f6db,
+ 0x1f6ed, 0x1f6ef,
+ 0x1f6fd, 0x1f6ff,
+ 0x1f777, 0x1f77a,
+ 0x1f7da, 0x1f7df,
+ 0x1f7ec, 0x1f7ef,
+ 0x1f7f1, 0x1f7ff,
+ 0x1f80c, 0x1f80f,
+ 0x1f848, 0x1f84f,
+ 0x1f85a, 0x1f85f,
+ 0x1f888, 0x1f88f,
+ 0x1f8ae, 0x1f8af,
+ 0x1f8b2, 0x1f8ff,
+ 0x1fa54, 0x1fa5f,
+ 0x1fa6e, 0x1fa6f,
+ 0x1fa7d, 0x1fa7f,
+ 0x1fa89, 0x1fa8f,
+ 0x1fabe, 0x1fabe,
+ 0x1fac6, 0x1facd,
+ 0x1fadc, 0x1fadf,
+ 0x1fae9, 0x1faef,
+ 0x1faf9, 0x1faff,
+ 0x1fb93, 0x1fb93,
+ 0x1fbcb, 0x1fbef,
+ 0x1fbfa, 0x1ffff,
+ 0x2a6e0, 0x2a6ff,
+ 0x2b73a, 0x2b73f,
+ 0x2b81e, 0x2b81f,
+ 0x2cea2, 0x2ceaf,
+ 0x2ebe1, 0x2f7ff,
+ 0x2fa1e, 0x2ffff,
+ 0x3134b, 0x3134f,
+ 0x323b0, 0xe0000,
+ 0xe0002, 0xe001f,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0xeffff,
+ 0xffffe, 0xfffff,
+ 0x10fffe, 0x10ffff,
+}; /* CR_Cn */
+
+/* 'Co': General Category */
+static const OnigCodePoint CR_Co[] = {
+ 3,
+ 0xe000, 0xf8ff,
+ 0xf0000, 0xffffd,
+ 0x100000, 0x10fffd,
+}; /* CR_Co */
+
+/* 'Cs': General Category */
+static const OnigCodePoint CR_Cs[] = {
+ 1,
+ 0xd800, 0xdfff,
+}; /* CR_Cs */
+
+/* 'L': Major Category */
+static const OnigCodePoint CR_L[] = {
+ 659,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0370, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0620, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06e5, 0x06e6,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x07ca, 0x07ea,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x0800, 0x0815,
+ 0x081a, 0x081a,
+ 0x0824, 0x0824,
+ 0x0828, 0x0828,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x0971, 0x0980,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0af9, 0x0af9,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bd0, 0x0bd0,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c3d,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c61,
+ 0x0c80, 0x0c80,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0cf1, 0x0cf2,
+ 0x0d04, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d3d,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d56,
+ 0x0d5f, 0x0d61,
+ 0x0d7a, 0x0d7f,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e40, 0x0e46,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f88, 0x0f8c,
+ 0x1000, 0x102a,
+ 0x103f, 0x103f,
+ 0x1050, 0x1055,
+ 0x105a, 0x105d,
+ 0x1061, 0x1061,
+ 0x1065, 0x1066,
+ 0x106e, 0x1070,
+ 0x1075, 0x1081,
+ 0x108e, 0x108e,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16f1, 0x16f8,
+ 0x1700, 0x1711,
+ 0x171f, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1878,
+ 0x1880, 0x1884,
+ 0x1887, 0x18a8,
+ 0x18aa, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a16,
+ 0x1a20, 0x1a54,
+ 0x1aa7, 0x1aa7,
+ 0x1b05, 0x1b33,
+ 0x1b45, 0x1b4c,
+ 0x1b83, 0x1ba0,
+ 0x1bae, 0x1baf,
+ 0x1bba, 0x1be5,
+ 0x1c00, 0x1c23,
+ 0x1c4d, 0x1c4f,
+ 0x1c5a, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2183, 0x2184,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3006,
+ 0x3031, 0x3035,
+ 0x303b, 0x303c,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa61f,
+ 0xa62a, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa67f, 0xa69d,
+ 0xa6a0, 0xa6e5,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xa840, 0xa873,
+ 0xa882, 0xa8b3,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa8fe,
+ 0xa90a, 0xa925,
+ 0xa930, 0xa946,
+ 0xa960, 0xa97c,
+ 0xa984, 0xa9b2,
+ 0xa9cf, 0xa9cf,
+ 0xa9e0, 0xa9e4,
+ 0xa9e6, 0xa9ef,
+ 0xa9fa, 0xa9fe,
+ 0xaa00, 0xaa28,
+ 0xaa40, 0xaa42,
+ 0xaa44, 0xaa4b,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaa7a,
+ 0xaa7e, 0xaaaf,
+ 0xaab1, 0xaab1,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaabd,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaea,
+ 0xaaf2, 0xaaf4,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabe2,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x10340,
+ 0x10342, 0x10349,
+ 0x10350, 0x10375,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x10400, 0x1049d,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d23,
+ 0x10e80, 0x10ea9,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11003, 0x11037,
+ 0x11071, 0x11072,
+ 0x11075, 0x11075,
+ 0x11083, 0x110af,
+ 0x110d0, 0x110e8,
+ 0x11103, 0x11126,
+ 0x11144, 0x11144,
+ 0x11147, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11183, 0x111b2,
+ 0x111c1, 0x111c4,
+ 0x111da, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x1122b,
+ 0x1123f, 0x11240,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112de,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x1133d,
+ 0x11350, 0x11350,
+ 0x1135d, 0x11361,
+ 0x11400, 0x11434,
+ 0x11447, 0x1144a,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114af,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x11580, 0x115ae,
+ 0x115d8, 0x115db,
+ 0x11600, 0x1162f,
+ 0x11644, 0x11644,
+ 0x11680, 0x116aa,
+ 0x116b8, 0x116b8,
+ 0x11700, 0x1171a,
+ 0x11740, 0x11746,
+ 0x11800, 0x1182b,
+ 0x118a0, 0x118df,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x1192f,
+ 0x1193f, 0x1193f,
+ 0x11941, 0x11941,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d0,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e3,
+ 0x11a00, 0x11a00,
+ 0x11a0b, 0x11a32,
+ 0x11a3a, 0x11a3a,
+ 0x11a50, 0x11a50,
+ 0x11a5c, 0x11a89,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c2e,
+ 0x11c40, 0x11c40,
+ 0x11c72, 0x11c8f,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d30,
+ 0x11d46, 0x11d46,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d89,
+ 0x11d98, 0x11d98,
+ 0x11ee0, 0x11ef2,
+ 0x11f02, 0x11f02,
+ 0x11f04, 0x11f10,
+ 0x11f12, 0x11f33,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a70, 0x16abe,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b40, 0x16b43,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f50, 0x16f50,
+ 0x16f93, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e900, 0x1e943,
+ 0x1e94b, 0x1e94b,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_L */
+
+/* 'LC': General Category */
+static const OnigCodePoint CR_LC[] = {
+ 143,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00b5, 0x00b5,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x01ba,
+ 0x01bc, 0x01bf,
+ 0x01c4, 0x0293,
+ 0x0295, 0x02af,
+ 0x0370, 0x0373,
+ 0x0376, 0x0377,
+ 0x037b, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0560, 0x0588,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fd, 0x10ff,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1d00, 0x1d2b,
+ 0x1d6b, 0x1d77,
+ 0x1d79, 0x1d9a,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2134,
+ 0x2139, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2183, 0x2184,
+ 0x2c00, 0x2c7b,
+ 0x2c7e, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa640, 0xa66d,
+ 0xa680, 0xa69b,
+ 0xa722, 0xa76f,
+ 0xa771, 0xa787,
+ 0xa78b, 0xa78e,
+ 0xa790, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f5, 0xa7f6,
+ 0xa7fa, 0xa7fa,
+ 0xab30, 0xab5a,
+ 0xab60, 0xab68,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0x10400, 0x1044f,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x118a0, 0x118df,
+ 0x16e40, 0x16e7f,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df09,
+ 0x1df0b, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e900, 0x1e943,
+}; /* CR_LC */
+
+/* 'Ll': General Category */
+static const OnigCodePoint CR_Ll[] = {
+ 658,
+ 0x0061, 0x007a,
+ 0x00b5, 0x00b5,
+ 0x00df, 0x00f6,
+ 0x00f8, 0x00ff,
+ 0x0101, 0x0101,
+ 0x0103, 0x0103,
+ 0x0105, 0x0105,
+ 0x0107, 0x0107,
+ 0x0109, 0x0109,
+ 0x010b, 0x010b,
+ 0x010d, 0x010d,
+ 0x010f, 0x010f,
+ 0x0111, 0x0111,
+ 0x0113, 0x0113,
+ 0x0115, 0x0115,
+ 0x0117, 0x0117,
+ 0x0119, 0x0119,
+ 0x011b, 0x011b,
+ 0x011d, 0x011d,
+ 0x011f, 0x011f,
+ 0x0121, 0x0121,
+ 0x0123, 0x0123,
+ 0x0125, 0x0125,
+ 0x0127, 0x0127,
+ 0x0129, 0x0129,
+ 0x012b, 0x012b,
+ 0x012d, 0x012d,
+ 0x012f, 0x012f,
+ 0x0131, 0x0131,
+ 0x0133, 0x0133,
+ 0x0135, 0x0135,
+ 0x0137, 0x0138,
+ 0x013a, 0x013a,
+ 0x013c, 0x013c,
+ 0x013e, 0x013e,
+ 0x0140, 0x0140,
+ 0x0142, 0x0142,
+ 0x0144, 0x0144,
+ 0x0146, 0x0146,
+ 0x0148, 0x0149,
+ 0x014b, 0x014b,
+ 0x014d, 0x014d,
+ 0x014f, 0x014f,
+ 0x0151, 0x0151,
+ 0x0153, 0x0153,
+ 0x0155, 0x0155,
+ 0x0157, 0x0157,
+ 0x0159, 0x0159,
+ 0x015b, 0x015b,
+ 0x015d, 0x015d,
+ 0x015f, 0x015f,
+ 0x0161, 0x0161,
+ 0x0163, 0x0163,
+ 0x0165, 0x0165,
+ 0x0167, 0x0167,
+ 0x0169, 0x0169,
+ 0x016b, 0x016b,
+ 0x016d, 0x016d,
+ 0x016f, 0x016f,
+ 0x0171, 0x0171,
+ 0x0173, 0x0173,
+ 0x0175, 0x0175,
+ 0x0177, 0x0177,
+ 0x017a, 0x017a,
+ 0x017c, 0x017c,
+ 0x017e, 0x0180,
+ 0x0183, 0x0183,
+ 0x0185, 0x0185,
+ 0x0188, 0x0188,
+ 0x018c, 0x018d,
+ 0x0192, 0x0192,
+ 0x0195, 0x0195,
+ 0x0199, 0x019b,
+ 0x019e, 0x019e,
+ 0x01a1, 0x01a1,
+ 0x01a3, 0x01a3,
+ 0x01a5, 0x01a5,
+ 0x01a8, 0x01a8,
+ 0x01aa, 0x01ab,
+ 0x01ad, 0x01ad,
+ 0x01b0, 0x01b0,
+ 0x01b4, 0x01b4,
+ 0x01b6, 0x01b6,
+ 0x01b9, 0x01ba,
+ 0x01bd, 0x01bf,
+ 0x01c6, 0x01c6,
+ 0x01c9, 0x01c9,
+ 0x01cc, 0x01cc,
+ 0x01ce, 0x01ce,
+ 0x01d0, 0x01d0,
+ 0x01d2, 0x01d2,
+ 0x01d4, 0x01d4,
+ 0x01d6, 0x01d6,
+ 0x01d8, 0x01d8,
+ 0x01da, 0x01da,
+ 0x01dc, 0x01dd,
+ 0x01df, 0x01df,
+ 0x01e1, 0x01e1,
+ 0x01e3, 0x01e3,
+ 0x01e5, 0x01e5,
+ 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9,
+ 0x01eb, 0x01eb,
+ 0x01ed, 0x01ed,
+ 0x01ef, 0x01f0,
+ 0x01f3, 0x01f3,
+ 0x01f5, 0x01f5,
+ 0x01f9, 0x01f9,
+ 0x01fb, 0x01fb,
+ 0x01fd, 0x01fd,
+ 0x01ff, 0x01ff,
+ 0x0201, 0x0201,
+ 0x0203, 0x0203,
+ 0x0205, 0x0205,
+ 0x0207, 0x0207,
+ 0x0209, 0x0209,
+ 0x020b, 0x020b,
+ 0x020d, 0x020d,
+ 0x020f, 0x020f,
+ 0x0211, 0x0211,
+ 0x0213, 0x0213,
+ 0x0215, 0x0215,
+ 0x0217, 0x0217,
+ 0x0219, 0x0219,
+ 0x021b, 0x021b,
+ 0x021d, 0x021d,
+ 0x021f, 0x021f,
+ 0x0221, 0x0221,
+ 0x0223, 0x0223,
+ 0x0225, 0x0225,
+ 0x0227, 0x0227,
+ 0x0229, 0x0229,
+ 0x022b, 0x022b,
+ 0x022d, 0x022d,
+ 0x022f, 0x022f,
+ 0x0231, 0x0231,
+ 0x0233, 0x0239,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
+ 0x0242, 0x0242,
+ 0x0247, 0x0247,
+ 0x0249, 0x0249,
+ 0x024b, 0x024b,
+ 0x024d, 0x024d,
+ 0x024f, 0x0293,
+ 0x0295, 0x02af,
+ 0x0371, 0x0371,
+ 0x0373, 0x0373,
+ 0x0377, 0x0377,
+ 0x037b, 0x037d,
+ 0x0390, 0x0390,
+ 0x03ac, 0x03ce,
+ 0x03d0, 0x03d1,
+ 0x03d5, 0x03d7,
+ 0x03d9, 0x03d9,
+ 0x03db, 0x03db,
+ 0x03dd, 0x03dd,
+ 0x03df, 0x03df,
+ 0x03e1, 0x03e1,
+ 0x03e3, 0x03e3,
+ 0x03e5, 0x03e5,
+ 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9,
+ 0x03eb, 0x03eb,
+ 0x03ed, 0x03ed,
+ 0x03ef, 0x03f3,
+ 0x03f5, 0x03f5,
+ 0x03f8, 0x03f8,
+ 0x03fb, 0x03fc,
+ 0x0430, 0x045f,
+ 0x0461, 0x0461,
+ 0x0463, 0x0463,
+ 0x0465, 0x0465,
+ 0x0467, 0x0467,
+ 0x0469, 0x0469,
+ 0x046b, 0x046b,
+ 0x046d, 0x046d,
+ 0x046f, 0x046f,
+ 0x0471, 0x0471,
+ 0x0473, 0x0473,
+ 0x0475, 0x0475,
+ 0x0477, 0x0477,
+ 0x0479, 0x0479,
+ 0x047b, 0x047b,
+ 0x047d, 0x047d,
+ 0x047f, 0x047f,
+ 0x0481, 0x0481,
+ 0x048b, 0x048b,
+ 0x048d, 0x048d,
+ 0x048f, 0x048f,
+ 0x0491, 0x0491,
+ 0x0493, 0x0493,
+ 0x0495, 0x0495,
+ 0x0497, 0x0497,
+ 0x0499, 0x0499,
+ 0x049b, 0x049b,
+ 0x049d, 0x049d,
+ 0x049f, 0x049f,
+ 0x04a1, 0x04a1,
+ 0x04a3, 0x04a3,
+ 0x04a5, 0x04a5,
+ 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9,
+ 0x04ab, 0x04ab,
+ 0x04ad, 0x04ad,
+ 0x04af, 0x04af,
+ 0x04b1, 0x04b1,
+ 0x04b3, 0x04b3,
+ 0x04b5, 0x04b5,
+ 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9,
+ 0x04bb, 0x04bb,
+ 0x04bd, 0x04bd,
+ 0x04bf, 0x04bf,
+ 0x04c2, 0x04c2,
+ 0x04c4, 0x04c4,
+ 0x04c6, 0x04c6,
+ 0x04c8, 0x04c8,
+ 0x04ca, 0x04ca,
+ 0x04cc, 0x04cc,
+ 0x04ce, 0x04cf,
+ 0x04d1, 0x04d1,
+ 0x04d3, 0x04d3,
+ 0x04d5, 0x04d5,
+ 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9,
+ 0x04db, 0x04db,
+ 0x04dd, 0x04dd,
+ 0x04df, 0x04df,
+ 0x04e1, 0x04e1,
+ 0x04e3, 0x04e3,
+ 0x04e5, 0x04e5,
+ 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9,
+ 0x04eb, 0x04eb,
+ 0x04ed, 0x04ed,
+ 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1,
+ 0x04f3, 0x04f3,
+ 0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
+ 0x04f9, 0x04f9,
+ 0x04fb, 0x04fb,
+ 0x04fd, 0x04fd,
+ 0x04ff, 0x04ff,
+ 0x0501, 0x0501,
+ 0x0503, 0x0503,
+ 0x0505, 0x0505,
+ 0x0507, 0x0507,
+ 0x0509, 0x0509,
+ 0x050b, 0x050b,
+ 0x050d, 0x050d,
+ 0x050f, 0x050f,
+ 0x0511, 0x0511,
+ 0x0513, 0x0513,
+ 0x0515, 0x0515,
+ 0x0517, 0x0517,
+ 0x0519, 0x0519,
+ 0x051b, 0x051b,
+ 0x051d, 0x051d,
+ 0x051f, 0x051f,
+ 0x0521, 0x0521,
+ 0x0523, 0x0523,
+ 0x0525, 0x0525,
+ 0x0527, 0x0527,
+ 0x0529, 0x0529,
+ 0x052b, 0x052b,
+ 0x052d, 0x052d,
+ 0x052f, 0x052f,
+ 0x0560, 0x0588,
+ 0x10d0, 0x10fa,
+ 0x10fd, 0x10ff,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1d00, 0x1d2b,
+ 0x1d6b, 0x1d77,
+ 0x1d79, 0x1d9a,
+ 0x1e01, 0x1e01,
+ 0x1e03, 0x1e03,
+ 0x1e05, 0x1e05,
+ 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09,
+ 0x1e0b, 0x1e0b,
+ 0x1e0d, 0x1e0d,
+ 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11,
+ 0x1e13, 0x1e13,
+ 0x1e15, 0x1e15,
+ 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19,
+ 0x1e1b, 0x1e1b,
+ 0x1e1d, 0x1e1d,
+ 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21,
+ 0x1e23, 0x1e23,
+ 0x1e25, 0x1e25,
+ 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29,
+ 0x1e2b, 0x1e2b,
+ 0x1e2d, 0x1e2d,
+ 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31,
+ 0x1e33, 0x1e33,
+ 0x1e35, 0x1e35,
+ 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39,
+ 0x1e3b, 0x1e3b,
+ 0x1e3d, 0x1e3d,
+ 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41,
+ 0x1e43, 0x1e43,
+ 0x1e45, 0x1e45,
+ 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49,
+ 0x1e4b, 0x1e4b,
+ 0x1e4d, 0x1e4d,
+ 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51,
+ 0x1e53, 0x1e53,
+ 0x1e55, 0x1e55,
+ 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59,
+ 0x1e5b, 0x1e5b,
+ 0x1e5d, 0x1e5d,
+ 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61,
+ 0x1e63, 0x1e63,
+ 0x1e65, 0x1e65,
+ 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69,
+ 0x1e6b, 0x1e6b,
+ 0x1e6d, 0x1e6d,
+ 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71,
+ 0x1e73, 0x1e73,
+ 0x1e75, 0x1e75,
+ 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79,
+ 0x1e7b, 0x1e7b,
+ 0x1e7d, 0x1e7d,
+ 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81,
+ 0x1e83, 0x1e83,
+ 0x1e85, 0x1e85,
+ 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89,
+ 0x1e8b, 0x1e8b,
+ 0x1e8d, 0x1e8d,
+ 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91,
+ 0x1e93, 0x1e93,
+ 0x1e95, 0x1e9d,
+ 0x1e9f, 0x1e9f,
+ 0x1ea1, 0x1ea1,
+ 0x1ea3, 0x1ea3,
+ 0x1ea5, 0x1ea5,
+ 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9,
+ 0x1eab, 0x1eab,
+ 0x1ead, 0x1ead,
+ 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1,
+ 0x1eb3, 0x1eb3,
+ 0x1eb5, 0x1eb5,
+ 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9,
+ 0x1ebb, 0x1ebb,
+ 0x1ebd, 0x1ebd,
+ 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1,
+ 0x1ec3, 0x1ec3,
+ 0x1ec5, 0x1ec5,
+ 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9,
+ 0x1ecb, 0x1ecb,
+ 0x1ecd, 0x1ecd,
+ 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1,
+ 0x1ed3, 0x1ed3,
+ 0x1ed5, 0x1ed5,
+ 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9,
+ 0x1edb, 0x1edb,
+ 0x1edd, 0x1edd,
+ 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1,
+ 0x1ee3, 0x1ee3,
+ 0x1ee5, 0x1ee5,
+ 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9,
+ 0x1eeb, 0x1eeb,
+ 0x1eed, 0x1eed,
+ 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1,
+ 0x1ef3, 0x1ef3,
+ 0x1ef5, 0x1ef5,
+ 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9,
+ 0x1efb, 0x1efb,
+ 0x1efd, 0x1efd,
+ 0x1eff, 0x1f07,
+ 0x1f10, 0x1f15,
+ 0x1f20, 0x1f27,
+ 0x1f30, 0x1f37,
+ 0x1f40, 0x1f45,
+ 0x1f50, 0x1f57,
+ 0x1f60, 0x1f67,
+ 0x1f70, 0x1f7d,
+ 0x1f80, 0x1f87,
+ 0x1f90, 0x1f97,
+ 0x1fa0, 0x1fa7,
+ 0x1fb0, 0x1fb4,
+ 0x1fb6, 0x1fb7,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fc7,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fd7,
+ 0x1fe0, 0x1fe7,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ff7,
+ 0x210a, 0x210a,
+ 0x210e, 0x210f,
+ 0x2113, 0x2113,
+ 0x212f, 0x212f,
+ 0x2134, 0x2134,
+ 0x2139, 0x2139,
+ 0x213c, 0x213d,
+ 0x2146, 0x2149,
+ 0x214e, 0x214e,
+ 0x2184, 0x2184,
+ 0x2c30, 0x2c5f,
+ 0x2c61, 0x2c61,
+ 0x2c65, 0x2c66,
+ 0x2c68, 0x2c68,
+ 0x2c6a, 0x2c6a,
+ 0x2c6c, 0x2c6c,
+ 0x2c71, 0x2c71,
+ 0x2c73, 0x2c74,
+ 0x2c76, 0x2c7b,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce4,
+ 0x2cec, 0x2cec,
+ 0x2cee, 0x2cee,
+ 0x2cf3, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa641, 0xa641,
+ 0xa643, 0xa643,
+ 0xa645, 0xa645,
+ 0xa647, 0xa647,
+ 0xa649, 0xa649,
+ 0xa64b, 0xa64b,
+ 0xa64d, 0xa64d,
+ 0xa64f, 0xa64f,
+ 0xa651, 0xa651,
+ 0xa653, 0xa653,
+ 0xa655, 0xa655,
+ 0xa657, 0xa657,
+ 0xa659, 0xa659,
+ 0xa65b, 0xa65b,
+ 0xa65d, 0xa65d,
+ 0xa65f, 0xa65f,
+ 0xa661, 0xa661,
+ 0xa663, 0xa663,
+ 0xa665, 0xa665,
+ 0xa667, 0xa667,
+ 0xa669, 0xa669,
+ 0xa66b, 0xa66b,
+ 0xa66d, 0xa66d,
+ 0xa681, 0xa681,
+ 0xa683, 0xa683,
+ 0xa685, 0xa685,
+ 0xa687, 0xa687,
+ 0xa689, 0xa689,
+ 0xa68b, 0xa68b,
+ 0xa68d, 0xa68d,
+ 0xa68f, 0xa68f,
+ 0xa691, 0xa691,
+ 0xa693, 0xa693,
+ 0xa695, 0xa695,
+ 0xa697, 0xa697,
+ 0xa699, 0xa699,
+ 0xa69b, 0xa69b,
+ 0xa723, 0xa723,
+ 0xa725, 0xa725,
+ 0xa727, 0xa727,
+ 0xa729, 0xa729,
+ 0xa72b, 0xa72b,
+ 0xa72d, 0xa72d,
+ 0xa72f, 0xa731,
+ 0xa733, 0xa733,
+ 0xa735, 0xa735,
+ 0xa737, 0xa737,
+ 0xa739, 0xa739,
+ 0xa73b, 0xa73b,
+ 0xa73d, 0xa73d,
+ 0xa73f, 0xa73f,
+ 0xa741, 0xa741,
+ 0xa743, 0xa743,
+ 0xa745, 0xa745,
+ 0xa747, 0xa747,
+ 0xa749, 0xa749,
+ 0xa74b, 0xa74b,
+ 0xa74d, 0xa74d,
+ 0xa74f, 0xa74f,
+ 0xa751, 0xa751,
+ 0xa753, 0xa753,
+ 0xa755, 0xa755,
+ 0xa757, 0xa757,
+ 0xa759, 0xa759,
+ 0xa75b, 0xa75b,
+ 0xa75d, 0xa75d,
+ 0xa75f, 0xa75f,
+ 0xa761, 0xa761,
+ 0xa763, 0xa763,
+ 0xa765, 0xa765,
+ 0xa767, 0xa767,
+ 0xa769, 0xa769,
+ 0xa76b, 0xa76b,
+ 0xa76d, 0xa76d,
+ 0xa76f, 0xa76f,
+ 0xa771, 0xa778,
+ 0xa77a, 0xa77a,
+ 0xa77c, 0xa77c,
+ 0xa77f, 0xa77f,
+ 0xa781, 0xa781,
+ 0xa783, 0xa783,
+ 0xa785, 0xa785,
+ 0xa787, 0xa787,
+ 0xa78c, 0xa78c,
+ 0xa78e, 0xa78e,
+ 0xa791, 0xa791,
+ 0xa793, 0xa795,
+ 0xa797, 0xa797,
+ 0xa799, 0xa799,
+ 0xa79b, 0xa79b,
+ 0xa79d, 0xa79d,
+ 0xa79f, 0xa79f,
+ 0xa7a1, 0xa7a1,
+ 0xa7a3, 0xa7a3,
+ 0xa7a5, 0xa7a5,
+ 0xa7a7, 0xa7a7,
+ 0xa7a9, 0xa7a9,
+ 0xa7af, 0xa7af,
+ 0xa7b5, 0xa7b5,
+ 0xa7b7, 0xa7b7,
+ 0xa7b9, 0xa7b9,
+ 0xa7bb, 0xa7bb,
+ 0xa7bd, 0xa7bd,
+ 0xa7bf, 0xa7bf,
+ 0xa7c1, 0xa7c1,
+ 0xa7c3, 0xa7c3,
+ 0xa7c8, 0xa7c8,
+ 0xa7ca, 0xa7ca,
+ 0xa7d1, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d5,
+ 0xa7d7, 0xa7d7,
+ 0xa7d9, 0xa7d9,
+ 0xa7f6, 0xa7f6,
+ 0xa7fa, 0xa7fa,
+ 0xab30, 0xab5a,
+ 0xab60, 0xab68,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff41, 0xff5a,
+ 0x10428, 0x1044f,
+ 0x104d8, 0x104fb,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10cc0, 0x10cf2,
+ 0x118c0, 0x118df,
+ 0x16e60, 0x16e7f,
+ 0x1d41a, 0x1d433,
+ 0x1d44e, 0x1d454,
+ 0x1d456, 0x1d467,
+ 0x1d482, 0x1d49b,
+ 0x1d4b6, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d4cf,
+ 0x1d4ea, 0x1d503,
+ 0x1d51e, 0x1d537,
+ 0x1d552, 0x1d56b,
+ 0x1d586, 0x1d59f,
+ 0x1d5ba, 0x1d5d3,
+ 0x1d5ee, 0x1d607,
+ 0x1d622, 0x1d63b,
+ 0x1d656, 0x1d66f,
+ 0x1d68a, 0x1d6a5,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6e1,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d71b,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d755,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d78f,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7c9,
+ 0x1d7cb, 0x1d7cb,
+ 0x1df00, 0x1df09,
+ 0x1df0b, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e922, 0x1e943,
+}; /* CR_Ll */
+
+/* 'Lm': General Category */
+static const OnigCodePoint CR_Lm[] = {
+ 71,
+ 0x02b0, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0374, 0x0374,
+ 0x037a, 0x037a,
+ 0x0559, 0x0559,
+ 0x0640, 0x0640,
+ 0x06e5, 0x06e6,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x081a, 0x081a,
+ 0x0824, 0x0824,
+ 0x0828, 0x0828,
+ 0x08c9, 0x08c9,
+ 0x0971, 0x0971,
+ 0x0e46, 0x0e46,
+ 0x0ec6, 0x0ec6,
+ 0x10fc, 0x10fc,
+ 0x17d7, 0x17d7,
+ 0x1843, 0x1843,
+ 0x1aa7, 0x1aa7,
+ 0x1c78, 0x1c7d,
+ 0x1d2c, 0x1d6a,
+ 0x1d78, 0x1d78,
+ 0x1d9b, 0x1dbf,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2c7c, 0x2c7d,
+ 0x2d6f, 0x2d6f,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3005,
+ 0x3031, 0x3035,
+ 0x303b, 0x303b,
+ 0x309d, 0x309e,
+ 0x30fc, 0x30fe,
+ 0xa015, 0xa015,
+ 0xa4f8, 0xa4fd,
+ 0xa60c, 0xa60c,
+ 0xa67f, 0xa67f,
+ 0xa69c, 0xa69d,
+ 0xa717, 0xa71f,
+ 0xa770, 0xa770,
+ 0xa788, 0xa788,
+ 0xa7f2, 0xa7f4,
+ 0xa7f8, 0xa7f9,
+ 0xa9cf, 0xa9cf,
+ 0xa9e6, 0xa9e6,
+ 0xaa70, 0xaa70,
+ 0xaadd, 0xaadd,
+ 0xaaf3, 0xaaf4,
+ 0xab5c, 0xab5f,
+ 0xab69, 0xab69,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x16b40, 0x16b43,
+ 0x16f93, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1e030, 0x1e06d,
+ 0x1e137, 0x1e13d,
+ 0x1e4eb, 0x1e4eb,
+ 0x1e94b, 0x1e94b,
+}; /* CR_Lm */
+
+/* 'Lo': General Category */
+static const OnigCodePoint CR_Lo[] = {
+ 510,
+ 0x00aa, 0x00aa,
+ 0x00ba, 0x00ba,
+ 0x01bb, 0x01bb,
+ 0x01c0, 0x01c3,
+ 0x0294, 0x0294,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0620, 0x063f,
+ 0x0641, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x07ca, 0x07ea,
+ 0x0800, 0x0815,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c8,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x0972, 0x0980,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0af9, 0x0af9,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bd0, 0x0bd0,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c3d,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c61,
+ 0x0c80, 0x0c80,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0cf1, 0x0cf2,
+ 0x0d04, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d3d,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d56,
+ 0x0d5f, 0x0d61,
+ 0x0d7a, 0x0d7f,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e40, 0x0e45,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f88, 0x0f8c,
+ 0x1000, 0x102a,
+ 0x103f, 0x103f,
+ 0x1050, 0x1055,
+ 0x105a, 0x105d,
+ 0x1061, 0x1061,
+ 0x1065, 0x1066,
+ 0x106e, 0x1070,
+ 0x1075, 0x1081,
+ 0x108e, 0x108e,
+ 0x1100, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16f1, 0x16f8,
+ 0x1700, 0x1711,
+ 0x171f, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1842,
+ 0x1844, 0x1878,
+ 0x1880, 0x1884,
+ 0x1887, 0x18a8,
+ 0x18aa, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a16,
+ 0x1a20, 0x1a54,
+ 0x1b05, 0x1b33,
+ 0x1b45, 0x1b4c,
+ 0x1b83, 0x1ba0,
+ 0x1bae, 0x1baf,
+ 0x1bba, 0x1be5,
+ 0x1c00, 0x1c23,
+ 0x1c4d, 0x1c4f,
+ 0x1c5a, 0x1c77,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x2135, 0x2138,
+ 0x2d30, 0x2d67,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3006, 0x3006,
+ 0x303c, 0x303c,
+ 0x3041, 0x3096,
+ 0x309f, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30ff, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa014,
+ 0xa016, 0xa48c,
+ 0xa4d0, 0xa4f7,
+ 0xa500, 0xa60b,
+ 0xa610, 0xa61f,
+ 0xa62a, 0xa62b,
+ 0xa66e, 0xa66e,
+ 0xa6a0, 0xa6e5,
+ 0xa78f, 0xa78f,
+ 0xa7f7, 0xa7f7,
+ 0xa7fb, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xa840, 0xa873,
+ 0xa882, 0xa8b3,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa8fe,
+ 0xa90a, 0xa925,
+ 0xa930, 0xa946,
+ 0xa960, 0xa97c,
+ 0xa984, 0xa9b2,
+ 0xa9e0, 0xa9e4,
+ 0xa9e7, 0xa9ef,
+ 0xa9fa, 0xa9fe,
+ 0xaa00, 0xaa28,
+ 0xaa40, 0xaa42,
+ 0xaa44, 0xaa4b,
+ 0xaa60, 0xaa6f,
+ 0xaa71, 0xaa76,
+ 0xaa7a, 0xaa7a,
+ 0xaa7e, 0xaaaf,
+ 0xaab1, 0xaab1,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaabd,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadc,
+ 0xaae0, 0xaaea,
+ 0xaaf2, 0xaaf2,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xabc0, 0xabe2,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff66, 0xff6f,
+ 0xff71, 0xff9d,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x10340,
+ 0x10342, 0x10349,
+ 0x10350, 0x10375,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x10450, 0x1049d,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10d00, 0x10d23,
+ 0x10e80, 0x10ea9,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11003, 0x11037,
+ 0x11071, 0x11072,
+ 0x11075, 0x11075,
+ 0x11083, 0x110af,
+ 0x110d0, 0x110e8,
+ 0x11103, 0x11126,
+ 0x11144, 0x11144,
+ 0x11147, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11183, 0x111b2,
+ 0x111c1, 0x111c4,
+ 0x111da, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x1122b,
+ 0x1123f, 0x11240,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112de,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x1133d,
+ 0x11350, 0x11350,
+ 0x1135d, 0x11361,
+ 0x11400, 0x11434,
+ 0x11447, 0x1144a,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114af,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x11580, 0x115ae,
+ 0x115d8, 0x115db,
+ 0x11600, 0x1162f,
+ 0x11644, 0x11644,
+ 0x11680, 0x116aa,
+ 0x116b8, 0x116b8,
+ 0x11700, 0x1171a,
+ 0x11740, 0x11746,
+ 0x11800, 0x1182b,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x1192f,
+ 0x1193f, 0x1193f,
+ 0x11941, 0x11941,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d0,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e3,
+ 0x11a00, 0x11a00,
+ 0x11a0b, 0x11a32,
+ 0x11a3a, 0x11a3a,
+ 0x11a50, 0x11a50,
+ 0x11a5c, 0x11a89,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c2e,
+ 0x11c40, 0x11c40,
+ 0x11c72, 0x11c8f,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d30,
+ 0x11d46, 0x11d46,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d89,
+ 0x11d98, 0x11d98,
+ 0x11ee0, 0x11ef2,
+ 0x11f02, 0x11f02,
+ 0x11f04, 0x11f10,
+ 0x11f12, 0x11f33,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a70, 0x16abe,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16f00, 0x16f4a,
+ 0x16f50, 0x16f50,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1df0a, 0x1df0a,
+ 0x1e100, 0x1e12c,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e4d0, 0x1e4ea,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Lo */
+
+/* 'Lt': General Category */
+static const OnigCodePoint CR_Lt[] = {
+ 10,
+ 0x01c5, 0x01c5,
+ 0x01c8, 0x01c8,
+ 0x01cb, 0x01cb,
+ 0x01f2, 0x01f2,
+ 0x1f88, 0x1f8f,
+ 0x1f98, 0x1f9f,
+ 0x1fa8, 0x1faf,
+ 0x1fbc, 0x1fbc,
+ 0x1fcc, 0x1fcc,
+ 0x1ffc, 0x1ffc,
+}; /* CR_Lt */
+
+/* 'Lu': General Category */
+static const OnigCodePoint CR_Lu[] = {
+ 646,
+ 0x0041, 0x005a,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00de,
+ 0x0100, 0x0100,
+ 0x0102, 0x0102,
+ 0x0104, 0x0104,
+ 0x0106, 0x0106,
+ 0x0108, 0x0108,
+ 0x010a, 0x010a,
+ 0x010c, 0x010c,
+ 0x010e, 0x010e,
+ 0x0110, 0x0110,
+ 0x0112, 0x0112,
+ 0x0114, 0x0114,
+ 0x0116, 0x0116,
+ 0x0118, 0x0118,
+ 0x011a, 0x011a,
+ 0x011c, 0x011c,
+ 0x011e, 0x011e,
+ 0x0120, 0x0120,
+ 0x0122, 0x0122,
+ 0x0124, 0x0124,
+ 0x0126, 0x0126,
+ 0x0128, 0x0128,
+ 0x012a, 0x012a,
+ 0x012c, 0x012c,
+ 0x012e, 0x012e,
+ 0x0130, 0x0130,
+ 0x0132, 0x0132,
+ 0x0134, 0x0134,
+ 0x0136, 0x0136,
+ 0x0139, 0x0139,
+ 0x013b, 0x013b,
+ 0x013d, 0x013d,
+ 0x013f, 0x013f,
+ 0x0141, 0x0141,
+ 0x0143, 0x0143,
+ 0x0145, 0x0145,
+ 0x0147, 0x0147,
+ 0x014a, 0x014a,
+ 0x014c, 0x014c,
+ 0x014e, 0x014e,
+ 0x0150, 0x0150,
+ 0x0152, 0x0152,
+ 0x0154, 0x0154,
+ 0x0156, 0x0156,
+ 0x0158, 0x0158,
+ 0x015a, 0x015a,
+ 0x015c, 0x015c,
+ 0x015e, 0x015e,
+ 0x0160, 0x0160,
+ 0x0162, 0x0162,
+ 0x0164, 0x0164,
+ 0x0166, 0x0166,
+ 0x0168, 0x0168,
+ 0x016a, 0x016a,
+ 0x016c, 0x016c,
+ 0x016e, 0x016e,
+ 0x0170, 0x0170,
+ 0x0172, 0x0172,
+ 0x0174, 0x0174,
+ 0x0176, 0x0176,
+ 0x0178, 0x0179,
+ 0x017b, 0x017b,
+ 0x017d, 0x017d,
+ 0x0181, 0x0182,
+ 0x0184, 0x0184,
+ 0x0186, 0x0187,
+ 0x0189, 0x018b,
+ 0x018e, 0x0191,
+ 0x0193, 0x0194,
+ 0x0196, 0x0198,
+ 0x019c, 0x019d,
+ 0x019f, 0x01a0,
+ 0x01a2, 0x01a2,
+ 0x01a4, 0x01a4,
+ 0x01a6, 0x01a7,
+ 0x01a9, 0x01a9,
+ 0x01ac, 0x01ac,
+ 0x01ae, 0x01af,
+ 0x01b1, 0x01b3,
+ 0x01b5, 0x01b5,
+ 0x01b7, 0x01b8,
+ 0x01bc, 0x01bc,
+ 0x01c4, 0x01c4,
+ 0x01c7, 0x01c7,
+ 0x01ca, 0x01ca,
+ 0x01cd, 0x01cd,
+ 0x01cf, 0x01cf,
+ 0x01d1, 0x01d1,
+ 0x01d3, 0x01d3,
+ 0x01d5, 0x01d5,
+ 0x01d7, 0x01d7,
+ 0x01d9, 0x01d9,
+ 0x01db, 0x01db,
+ 0x01de, 0x01de,
+ 0x01e0, 0x01e0,
+ 0x01e2, 0x01e2,
+ 0x01e4, 0x01e4,
+ 0x01e6, 0x01e6,
+ 0x01e8, 0x01e8,
+ 0x01ea, 0x01ea,
+ 0x01ec, 0x01ec,
+ 0x01ee, 0x01ee,
+ 0x01f1, 0x01f1,
+ 0x01f4, 0x01f4,
+ 0x01f6, 0x01f8,
+ 0x01fa, 0x01fa,
+ 0x01fc, 0x01fc,
+ 0x01fe, 0x01fe,
+ 0x0200, 0x0200,
+ 0x0202, 0x0202,
+ 0x0204, 0x0204,
+ 0x0206, 0x0206,
+ 0x0208, 0x0208,
+ 0x020a, 0x020a,
+ 0x020c, 0x020c,
+ 0x020e, 0x020e,
+ 0x0210, 0x0210,
+ 0x0212, 0x0212,
+ 0x0214, 0x0214,
+ 0x0216, 0x0216,
+ 0x0218, 0x0218,
+ 0x021a, 0x021a,
+ 0x021c, 0x021c,
+ 0x021e, 0x021e,
+ 0x0220, 0x0220,
+ 0x0222, 0x0222,
+ 0x0224, 0x0224,
+ 0x0226, 0x0226,
+ 0x0228, 0x0228,
+ 0x022a, 0x022a,
+ 0x022c, 0x022c,
+ 0x022e, 0x022e,
+ 0x0230, 0x0230,
+ 0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
+ 0x0243, 0x0246,
+ 0x0248, 0x0248,
+ 0x024a, 0x024a,
+ 0x024c, 0x024c,
+ 0x024e, 0x024e,
+ 0x0370, 0x0370,
+ 0x0372, 0x0372,
+ 0x0376, 0x0376,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x038f,
+ 0x0391, 0x03a1,
+ 0x03a3, 0x03ab,
+ 0x03cf, 0x03cf,
+ 0x03d2, 0x03d4,
+ 0x03d8, 0x03d8,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03e2,
+ 0x03e4, 0x03e4,
+ 0x03e6, 0x03e6,
+ 0x03e8, 0x03e8,
+ 0x03ea, 0x03ea,
+ 0x03ec, 0x03ec,
+ 0x03ee, 0x03ee,
+ 0x03f4, 0x03f4,
+ 0x03f7, 0x03f7,
+ 0x03f9, 0x03fa,
+ 0x03fd, 0x042f,
+ 0x0460, 0x0460,
+ 0x0462, 0x0462,
+ 0x0464, 0x0464,
+ 0x0466, 0x0466,
+ 0x0468, 0x0468,
+ 0x046a, 0x046a,
+ 0x046c, 0x046c,
+ 0x046e, 0x046e,
+ 0x0470, 0x0470,
+ 0x0472, 0x0472,
+ 0x0474, 0x0474,
+ 0x0476, 0x0476,
+ 0x0478, 0x0478,
+ 0x047a, 0x047a,
+ 0x047c, 0x047c,
+ 0x047e, 0x047e,
+ 0x0480, 0x0480,
+ 0x048a, 0x048a,
+ 0x048c, 0x048c,
+ 0x048e, 0x048e,
+ 0x0490, 0x0490,
+ 0x0492, 0x0492,
+ 0x0494, 0x0494,
+ 0x0496, 0x0496,
+ 0x0498, 0x0498,
+ 0x049a, 0x049a,
+ 0x049c, 0x049c,
+ 0x049e, 0x049e,
+ 0x04a0, 0x04a0,
+ 0x04a2, 0x04a2,
+ 0x04a4, 0x04a4,
+ 0x04a6, 0x04a6,
+ 0x04a8, 0x04a8,
+ 0x04aa, 0x04aa,
+ 0x04ac, 0x04ac,
+ 0x04ae, 0x04ae,
+ 0x04b0, 0x04b0,
+ 0x04b2, 0x04b2,
+ 0x04b4, 0x04b4,
+ 0x04b6, 0x04b6,
+ 0x04b8, 0x04b8,
+ 0x04ba, 0x04ba,
+ 0x04bc, 0x04bc,
+ 0x04be, 0x04be,
+ 0x04c0, 0x04c1,
+ 0x04c3, 0x04c3,
+ 0x04c5, 0x04c5,
+ 0x04c7, 0x04c7,
+ 0x04c9, 0x04c9,
+ 0x04cb, 0x04cb,
+ 0x04cd, 0x04cd,
+ 0x04d0, 0x04d0,
+ 0x04d2, 0x04d2,
+ 0x04d4, 0x04d4,
+ 0x04d6, 0x04d6,
+ 0x04d8, 0x04d8,
+ 0x04da, 0x04da,
+ 0x04dc, 0x04dc,
+ 0x04de, 0x04de,
+ 0x04e0, 0x04e0,
+ 0x04e2, 0x04e2,
+ 0x04e4, 0x04e4,
+ 0x04e6, 0x04e6,
+ 0x04e8, 0x04e8,
+ 0x04ea, 0x04ea,
+ 0x04ec, 0x04ec,
+ 0x04ee, 0x04ee,
+ 0x04f0, 0x04f0,
+ 0x04f2, 0x04f2,
+ 0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
+ 0x04f8, 0x04f8,
+ 0x04fa, 0x04fa,
+ 0x04fc, 0x04fc,
+ 0x04fe, 0x04fe,
+ 0x0500, 0x0500,
+ 0x0502, 0x0502,
+ 0x0504, 0x0504,
+ 0x0506, 0x0506,
+ 0x0508, 0x0508,
+ 0x050a, 0x050a,
+ 0x050c, 0x050c,
+ 0x050e, 0x050e,
+ 0x0510, 0x0510,
+ 0x0512, 0x0512,
+ 0x0514, 0x0514,
+ 0x0516, 0x0516,
+ 0x0518, 0x0518,
+ 0x051a, 0x051a,
+ 0x051c, 0x051c,
+ 0x051e, 0x051e,
+ 0x0520, 0x0520,
+ 0x0522, 0x0522,
+ 0x0524, 0x0524,
+ 0x0526, 0x0526,
+ 0x0528, 0x0528,
+ 0x052a, 0x052a,
+ 0x052c, 0x052c,
+ 0x052e, 0x052e,
+ 0x0531, 0x0556,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x13a0, 0x13f5,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1e00, 0x1e00,
+ 0x1e02, 0x1e02,
+ 0x1e04, 0x1e04,
+ 0x1e06, 0x1e06,
+ 0x1e08, 0x1e08,
+ 0x1e0a, 0x1e0a,
+ 0x1e0c, 0x1e0c,
+ 0x1e0e, 0x1e0e,
+ 0x1e10, 0x1e10,
+ 0x1e12, 0x1e12,
+ 0x1e14, 0x1e14,
+ 0x1e16, 0x1e16,
+ 0x1e18, 0x1e18,
+ 0x1e1a, 0x1e1a,
+ 0x1e1c, 0x1e1c,
+ 0x1e1e, 0x1e1e,
+ 0x1e20, 0x1e20,
+ 0x1e22, 0x1e22,
+ 0x1e24, 0x1e24,
+ 0x1e26, 0x1e26,
+ 0x1e28, 0x1e28,
+ 0x1e2a, 0x1e2a,
+ 0x1e2c, 0x1e2c,
+ 0x1e2e, 0x1e2e,
+ 0x1e30, 0x1e30,
+ 0x1e32, 0x1e32,
+ 0x1e34, 0x1e34,
+ 0x1e36, 0x1e36,
+ 0x1e38, 0x1e38,
+ 0x1e3a, 0x1e3a,
+ 0x1e3c, 0x1e3c,
+ 0x1e3e, 0x1e3e,
+ 0x1e40, 0x1e40,
+ 0x1e42, 0x1e42,
+ 0x1e44, 0x1e44,
+ 0x1e46, 0x1e46,
+ 0x1e48, 0x1e48,
+ 0x1e4a, 0x1e4a,
+ 0x1e4c, 0x1e4c,
+ 0x1e4e, 0x1e4e,
+ 0x1e50, 0x1e50,
+ 0x1e52, 0x1e52,
+ 0x1e54, 0x1e54,
+ 0x1e56, 0x1e56,
+ 0x1e58, 0x1e58,
+ 0x1e5a, 0x1e5a,
+ 0x1e5c, 0x1e5c,
+ 0x1e5e, 0x1e5e,
+ 0x1e60, 0x1e60,
+ 0x1e62, 0x1e62,
+ 0x1e64, 0x1e64,
+ 0x1e66, 0x1e66,
+ 0x1e68, 0x1e68,
+ 0x1e6a, 0x1e6a,
+ 0x1e6c, 0x1e6c,
+ 0x1e6e, 0x1e6e,
+ 0x1e70, 0x1e70,
+ 0x1e72, 0x1e72,
+ 0x1e74, 0x1e74,
+ 0x1e76, 0x1e76,
+ 0x1e78, 0x1e78,
+ 0x1e7a, 0x1e7a,
+ 0x1e7c, 0x1e7c,
+ 0x1e7e, 0x1e7e,
+ 0x1e80, 0x1e80,
+ 0x1e82, 0x1e82,
+ 0x1e84, 0x1e84,
+ 0x1e86, 0x1e86,
+ 0x1e88, 0x1e88,
+ 0x1e8a, 0x1e8a,
+ 0x1e8c, 0x1e8c,
+ 0x1e8e, 0x1e8e,
+ 0x1e90, 0x1e90,
+ 0x1e92, 0x1e92,
+ 0x1e94, 0x1e94,
+ 0x1e9e, 0x1e9e,
+ 0x1ea0, 0x1ea0,
+ 0x1ea2, 0x1ea2,
+ 0x1ea4, 0x1ea4,
+ 0x1ea6, 0x1ea6,
+ 0x1ea8, 0x1ea8,
+ 0x1eaa, 0x1eaa,
+ 0x1eac, 0x1eac,
+ 0x1eae, 0x1eae,
+ 0x1eb0, 0x1eb0,
+ 0x1eb2, 0x1eb2,
+ 0x1eb4, 0x1eb4,
+ 0x1eb6, 0x1eb6,
+ 0x1eb8, 0x1eb8,
+ 0x1eba, 0x1eba,
+ 0x1ebc, 0x1ebc,
+ 0x1ebe, 0x1ebe,
+ 0x1ec0, 0x1ec0,
+ 0x1ec2, 0x1ec2,
+ 0x1ec4, 0x1ec4,
+ 0x1ec6, 0x1ec6,
+ 0x1ec8, 0x1ec8,
+ 0x1eca, 0x1eca,
+ 0x1ecc, 0x1ecc,
+ 0x1ece, 0x1ece,
+ 0x1ed0, 0x1ed0,
+ 0x1ed2, 0x1ed2,
+ 0x1ed4, 0x1ed4,
+ 0x1ed6, 0x1ed6,
+ 0x1ed8, 0x1ed8,
+ 0x1eda, 0x1eda,
+ 0x1edc, 0x1edc,
+ 0x1ede, 0x1ede,
+ 0x1ee0, 0x1ee0,
+ 0x1ee2, 0x1ee2,
+ 0x1ee4, 0x1ee4,
+ 0x1ee6, 0x1ee6,
+ 0x1ee8, 0x1ee8,
+ 0x1eea, 0x1eea,
+ 0x1eec, 0x1eec,
+ 0x1eee, 0x1eee,
+ 0x1ef0, 0x1ef0,
+ 0x1ef2, 0x1ef2,
+ 0x1ef4, 0x1ef4,
+ 0x1ef6, 0x1ef6,
+ 0x1ef8, 0x1ef8,
+ 0x1efa, 0x1efa,
+ 0x1efc, 0x1efc,
+ 0x1efe, 0x1efe,
+ 0x1f08, 0x1f0f,
+ 0x1f18, 0x1f1d,
+ 0x1f28, 0x1f2f,
+ 0x1f38, 0x1f3f,
+ 0x1f48, 0x1f4d,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f5f,
+ 0x1f68, 0x1f6f,
+ 0x1fb8, 0x1fbb,
+ 0x1fc8, 0x1fcb,
+ 0x1fd8, 0x1fdb,
+ 0x1fe8, 0x1fec,
+ 0x1ff8, 0x1ffb,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210b, 0x210d,
+ 0x2110, 0x2112,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x2130, 0x2133,
+ 0x213e, 0x213f,
+ 0x2145, 0x2145,
+ 0x2183, 0x2183,
+ 0x2c00, 0x2c2f,
+ 0x2c60, 0x2c60,
+ 0x2c62, 0x2c64,
+ 0x2c67, 0x2c67,
+ 0x2c69, 0x2c69,
+ 0x2c6b, 0x2c6b,
+ 0x2c6d, 0x2c70,
+ 0x2c72, 0x2c72,
+ 0x2c75, 0x2c75,
+ 0x2c7e, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
+ 0x2ceb, 0x2ceb,
+ 0x2ced, 0x2ced,
+ 0x2cf2, 0x2cf2,
+ 0xa640, 0xa640,
+ 0xa642, 0xa642,
+ 0xa644, 0xa644,
+ 0xa646, 0xa646,
+ 0xa648, 0xa648,
+ 0xa64a, 0xa64a,
+ 0xa64c, 0xa64c,
+ 0xa64e, 0xa64e,
+ 0xa650, 0xa650,
+ 0xa652, 0xa652,
+ 0xa654, 0xa654,
+ 0xa656, 0xa656,
+ 0xa658, 0xa658,
+ 0xa65a, 0xa65a,
+ 0xa65c, 0xa65c,
+ 0xa65e, 0xa65e,
+ 0xa660, 0xa660,
+ 0xa662, 0xa662,
+ 0xa664, 0xa664,
+ 0xa666, 0xa666,
+ 0xa668, 0xa668,
+ 0xa66a, 0xa66a,
+ 0xa66c, 0xa66c,
+ 0xa680, 0xa680,
+ 0xa682, 0xa682,
+ 0xa684, 0xa684,
+ 0xa686, 0xa686,
+ 0xa688, 0xa688,
+ 0xa68a, 0xa68a,
+ 0xa68c, 0xa68c,
+ 0xa68e, 0xa68e,
+ 0xa690, 0xa690,
+ 0xa692, 0xa692,
+ 0xa694, 0xa694,
+ 0xa696, 0xa696,
+ 0xa698, 0xa698,
+ 0xa69a, 0xa69a,
+ 0xa722, 0xa722,
+ 0xa724, 0xa724,
+ 0xa726, 0xa726,
+ 0xa728, 0xa728,
+ 0xa72a, 0xa72a,
+ 0xa72c, 0xa72c,
+ 0xa72e, 0xa72e,
+ 0xa732, 0xa732,
+ 0xa734, 0xa734,
+ 0xa736, 0xa736,
+ 0xa738, 0xa738,
+ 0xa73a, 0xa73a,
+ 0xa73c, 0xa73c,
+ 0xa73e, 0xa73e,
+ 0xa740, 0xa740,
+ 0xa742, 0xa742,
+ 0xa744, 0xa744,
+ 0xa746, 0xa746,
+ 0xa748, 0xa748,
+ 0xa74a, 0xa74a,
+ 0xa74c, 0xa74c,
+ 0xa74e, 0xa74e,
+ 0xa750, 0xa750,
+ 0xa752, 0xa752,
+ 0xa754, 0xa754,
+ 0xa756, 0xa756,
+ 0xa758, 0xa758,
+ 0xa75a, 0xa75a,
+ 0xa75c, 0xa75c,
+ 0xa75e, 0xa75e,
+ 0xa760, 0xa760,
+ 0xa762, 0xa762,
+ 0xa764, 0xa764,
+ 0xa766, 0xa766,
+ 0xa768, 0xa768,
+ 0xa76a, 0xa76a,
+ 0xa76c, 0xa76c,
+ 0xa76e, 0xa76e,
+ 0xa779, 0xa779,
+ 0xa77b, 0xa77b,
+ 0xa77d, 0xa77e,
+ 0xa780, 0xa780,
+ 0xa782, 0xa782,
+ 0xa784, 0xa784,
+ 0xa786, 0xa786,
+ 0xa78b, 0xa78b,
+ 0xa78d, 0xa78d,
+ 0xa790, 0xa790,
+ 0xa792, 0xa792,
+ 0xa796, 0xa796,
+ 0xa798, 0xa798,
+ 0xa79a, 0xa79a,
+ 0xa79c, 0xa79c,
+ 0xa79e, 0xa79e,
+ 0xa7a0, 0xa7a0,
+ 0xa7a2, 0xa7a2,
+ 0xa7a4, 0xa7a4,
+ 0xa7a6, 0xa7a6,
+ 0xa7a8, 0xa7a8,
+ 0xa7aa, 0xa7ae,
+ 0xa7b0, 0xa7b4,
+ 0xa7b6, 0xa7b6,
+ 0xa7b8, 0xa7b8,
+ 0xa7ba, 0xa7ba,
+ 0xa7bc, 0xa7bc,
+ 0xa7be, 0xa7be,
+ 0xa7c0, 0xa7c0,
+ 0xa7c2, 0xa7c2,
+ 0xa7c4, 0xa7c7,
+ 0xa7c9, 0xa7c9,
+ 0xa7d0, 0xa7d0,
+ 0xa7d6, 0xa7d6,
+ 0xa7d8, 0xa7d8,
+ 0xa7f5, 0xa7f5,
+ 0xff21, 0xff3a,
+ 0x10400, 0x10427,
+ 0x104b0, 0x104d3,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10c80, 0x10cb2,
+ 0x118a0, 0x118bf,
+ 0x16e40, 0x16e5f,
+ 0x1d400, 0x1d419,
+ 0x1d434, 0x1d44d,
+ 0x1d468, 0x1d481,
+ 0x1d49c, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b5,
+ 0x1d4d0, 0x1d4e9,
+ 0x1d504, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d538, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d56c, 0x1d585,
+ 0x1d5a0, 0x1d5b9,
+ 0x1d5d4, 0x1d5ed,
+ 0x1d608, 0x1d621,
+ 0x1d63c, 0x1d655,
+ 0x1d670, 0x1d689,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6e2, 0x1d6fa,
+ 0x1d71c, 0x1d734,
+ 0x1d756, 0x1d76e,
+ 0x1d790, 0x1d7a8,
+ 0x1d7ca, 0x1d7ca,
+ 0x1e900, 0x1e921,
+}; /* CR_Lu */
+
+/* 'M': Major Category */
+static const OnigCodePoint CR_M[] = {
+ 310,
+ 0x0300, 0x036f,
+ 0x0483, 0x0489,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x061a,
+ 0x064b, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06df, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f3,
+ 0x07fd, 0x07fd,
+ 0x0816, 0x0819,
+ 0x081b, 0x0823,
+ 0x0825, 0x0827,
+ 0x0829, 0x082d,
+ 0x0859, 0x085b,
+ 0x0898, 0x089f,
+ 0x08ca, 0x08e1,
+ 0x08e3, 0x0903,
+ 0x093a, 0x093c,
+ 0x093e, 0x094f,
+ 0x0951, 0x0957,
+ 0x0962, 0x0963,
+ 0x0981, 0x0983,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09e2, 0x09e3,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0abc, 0x0abc,
+ 0x0abe, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b3c, 0x0b3c,
+ 0x0b3e, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0c00, 0x0c04,
+ 0x0c3c, 0x0c3c,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c83,
+ 0x0cbc, 0x0cbc,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0ce2, 0x0ce3,
+ 0x0cf3, 0x0cf3,
+ 0x0d00, 0x0d03,
+ 0x0d3b, 0x0d3c,
+ 0x0d3e, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d83,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0ebc,
+ 0x0ec8, 0x0ece,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f3f,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102b, 0x103e,
+ 0x1056, 0x1059,
+ 0x105e, 0x1060,
+ 0x1062, 0x1064,
+ 0x1067, 0x106d,
+ 0x1071, 0x1074,
+ 0x1082, 0x108d,
+ 0x108f, 0x108f,
+ 0x109a, 0x109d,
+ 0x135d, 0x135f,
+ 0x1712, 0x1715,
+ 0x1732, 0x1734,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b4, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x180f, 0x180f,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1a17, 0x1a1b,
+ 0x1a55, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b04,
+ 0x1b34, 0x1b44,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1b82,
+ 0x1ba1, 0x1bad,
+ 0x1be6, 0x1bf3,
+ 0x1c24, 0x1c37,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf7, 0x1cf9,
+ 0x1dc0, 0x1dff,
+ 0x20d0, 0x20f0,
+ 0x2cef, 0x2cf1,
+ 0x2d7f, 0x2d7f,
+ 0x2de0, 0x2dff,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xa66f, 0xa672,
+ 0xa674, 0xa67d,
+ 0xa69e, 0xa69f,
+ 0xa6f0, 0xa6f1,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa823, 0xa827,
+ 0xa82c, 0xa82c,
+ 0xa880, 0xa881,
+ 0xa8b4, 0xa8c5,
+ 0xa8e0, 0xa8f1,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92d,
+ 0xa947, 0xa953,
+ 0xa980, 0xa983,
+ 0xa9b3, 0xa9c0,
+ 0xa9e5, 0xa9e5,
+ 0xaa29, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4d,
+ 0xaa7b, 0xaa7d,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabf,
+ 0xaac1, 0xaac1,
+ 0xaaeb, 0xaaef,
+ 0xaaf5, 0xaaf6,
+ 0xabe3, 0xabea,
+ 0xabec, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x10376, 0x1037a,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10ae5, 0x10ae6,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11000, 0x11002,
+ 0x11038, 0x11046,
+ 0x11070, 0x11070,
+ 0x11073, 0x11074,
+ 0x1107f, 0x11082,
+ 0x110b0, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x11100, 0x11102,
+ 0x11127, 0x11134,
+ 0x11145, 0x11146,
+ 0x11173, 0x11173,
+ 0x11180, 0x11182,
+ 0x111b3, 0x111c0,
+ 0x111c9, 0x111cc,
+ 0x111ce, 0x111cf,
+ 0x1122c, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112ea,
+ 0x11300, 0x11303,
+ 0x1133b, 0x1133c,
+ 0x1133e, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11357, 0x11357,
+ 0x11362, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11435, 0x11446,
+ 0x1145e, 0x1145e,
+ 0x114b0, 0x114c3,
+ 0x115af, 0x115b5,
+ 0x115b8, 0x115c0,
+ 0x115dc, 0x115dd,
+ 0x11630, 0x11640,
+ 0x116ab, 0x116b7,
+ 0x1171d, 0x1172b,
+ 0x1182c, 0x1183a,
+ 0x11930, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x1193e,
+ 0x11940, 0x11940,
+ 0x11942, 0x11943,
+ 0x119d1, 0x119d7,
+ 0x119da, 0x119e0,
+ 0x119e4, 0x119e4,
+ 0x11a01, 0x11a0a,
+ 0x11a33, 0x11a39,
+ 0x11a3b, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a51, 0x11a5b,
+ 0x11a8a, 0x11a99,
+ 0x11c2f, 0x11c36,
+ 0x11c38, 0x11c3f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d45,
+ 0x11d47, 0x11d47,
+ 0x11d8a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d97,
+ 0x11ef3, 0x11ef6,
+ 0x11f00, 0x11f01,
+ 0x11f03, 0x11f03,
+ 0x11f34, 0x11f3a,
+ 0x11f3e, 0x11f42,
+ 0x13440, 0x13440,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16f4f, 0x16f4f,
+ 0x16f51, 0x16f87,
+ 0x16f8f, 0x16f92,
+ 0x16fe4, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e08f, 0x1e08f,
+ 0x1e130, 0x1e136,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e4ec, 0x1e4ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e94a,
+ 0xe0100, 0xe01ef,
+}; /* CR_M */
+
+/* 'Mc': General Category */
+static const OnigCodePoint CR_Mc[] = {
+ 182,
+ 0x0903, 0x0903,
+ 0x093b, 0x093b,
+ 0x093e, 0x0940,
+ 0x0949, 0x094c,
+ 0x094e, 0x094f,
+ 0x0982, 0x0983,
+ 0x09be, 0x09c0,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09d7, 0x09d7,
+ 0x0a03, 0x0a03,
+ 0x0a3e, 0x0a40,
+ 0x0a83, 0x0a83,
+ 0x0abe, 0x0ac0,
+ 0x0ac9, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0b02, 0x0b03,
+ 0x0b3e, 0x0b3e,
+ 0x0b40, 0x0b40,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b57, 0x0b57,
+ 0x0bbe, 0x0bbf,
+ 0x0bc1, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd7, 0x0bd7,
+ 0x0c01, 0x0c03,
+ 0x0c41, 0x0c44,
+ 0x0c82, 0x0c83,
+ 0x0cbe, 0x0cbe,
+ 0x0cc0, 0x0cc4,
+ 0x0cc7, 0x0cc8,
+ 0x0cca, 0x0ccb,
+ 0x0cd5, 0x0cd6,
+ 0x0cf3, 0x0cf3,
+ 0x0d02, 0x0d03,
+ 0x0d3e, 0x0d40,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d57, 0x0d57,
+ 0x0d82, 0x0d83,
+ 0x0dcf, 0x0dd1,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0f3e, 0x0f3f,
+ 0x0f7f, 0x0f7f,
+ 0x102b, 0x102c,
+ 0x1031, 0x1031,
+ 0x1038, 0x1038,
+ 0x103b, 0x103c,
+ 0x1056, 0x1057,
+ 0x1062, 0x1064,
+ 0x1067, 0x106d,
+ 0x1083, 0x1084,
+ 0x1087, 0x108c,
+ 0x108f, 0x108f,
+ 0x109a, 0x109c,
+ 0x1715, 0x1715,
+ 0x1734, 0x1734,
+ 0x17b6, 0x17b6,
+ 0x17be, 0x17c5,
+ 0x17c7, 0x17c8,
+ 0x1923, 0x1926,
+ 0x1929, 0x192b,
+ 0x1930, 0x1931,
+ 0x1933, 0x1938,
+ 0x1a19, 0x1a1a,
+ 0x1a55, 0x1a55,
+ 0x1a57, 0x1a57,
+ 0x1a61, 0x1a61,
+ 0x1a63, 0x1a64,
+ 0x1a6d, 0x1a72,
+ 0x1b04, 0x1b04,
+ 0x1b35, 0x1b35,
+ 0x1b3b, 0x1b3b,
+ 0x1b3d, 0x1b41,
+ 0x1b43, 0x1b44,
+ 0x1b82, 0x1b82,
+ 0x1ba1, 0x1ba1,
+ 0x1ba6, 0x1ba7,
+ 0x1baa, 0x1baa,
+ 0x1be7, 0x1be7,
+ 0x1bea, 0x1bec,
+ 0x1bee, 0x1bee,
+ 0x1bf2, 0x1bf3,
+ 0x1c24, 0x1c2b,
+ 0x1c34, 0x1c35,
+ 0x1ce1, 0x1ce1,
+ 0x1cf7, 0x1cf7,
+ 0x302e, 0x302f,
+ 0xa823, 0xa824,
+ 0xa827, 0xa827,
+ 0xa880, 0xa881,
+ 0xa8b4, 0xa8c3,
+ 0xa952, 0xa953,
+ 0xa983, 0xa983,
+ 0xa9b4, 0xa9b5,
+ 0xa9ba, 0xa9bb,
+ 0xa9be, 0xa9c0,
+ 0xaa2f, 0xaa30,
+ 0xaa33, 0xaa34,
+ 0xaa4d, 0xaa4d,
+ 0xaa7b, 0xaa7b,
+ 0xaa7d, 0xaa7d,
+ 0xaaeb, 0xaaeb,
+ 0xaaee, 0xaaef,
+ 0xaaf5, 0xaaf5,
+ 0xabe3, 0xabe4,
+ 0xabe6, 0xabe7,
+ 0xabe9, 0xabea,
+ 0xabec, 0xabec,
+ 0x11000, 0x11000,
+ 0x11002, 0x11002,
+ 0x11082, 0x11082,
+ 0x110b0, 0x110b2,
+ 0x110b7, 0x110b8,
+ 0x1112c, 0x1112c,
+ 0x11145, 0x11146,
+ 0x11182, 0x11182,
+ 0x111b3, 0x111b5,
+ 0x111bf, 0x111c0,
+ 0x111ce, 0x111ce,
+ 0x1122c, 0x1122e,
+ 0x11232, 0x11233,
+ 0x11235, 0x11235,
+ 0x112e0, 0x112e2,
+ 0x11302, 0x11303,
+ 0x1133e, 0x1133f,
+ 0x11341, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11357, 0x11357,
+ 0x11362, 0x11363,
+ 0x11435, 0x11437,
+ 0x11440, 0x11441,
+ 0x11445, 0x11445,
+ 0x114b0, 0x114b2,
+ 0x114b9, 0x114b9,
+ 0x114bb, 0x114be,
+ 0x114c1, 0x114c1,
+ 0x115af, 0x115b1,
+ 0x115b8, 0x115bb,
+ 0x115be, 0x115be,
+ 0x11630, 0x11632,
+ 0x1163b, 0x1163c,
+ 0x1163e, 0x1163e,
+ 0x116ac, 0x116ac,
+ 0x116ae, 0x116af,
+ 0x116b6, 0x116b6,
+ 0x11720, 0x11721,
+ 0x11726, 0x11726,
+ 0x1182c, 0x1182e,
+ 0x11838, 0x11838,
+ 0x11930, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193d, 0x1193d,
+ 0x11940, 0x11940,
+ 0x11942, 0x11942,
+ 0x119d1, 0x119d3,
+ 0x119dc, 0x119df,
+ 0x119e4, 0x119e4,
+ 0x11a39, 0x11a39,
+ 0x11a57, 0x11a58,
+ 0x11a97, 0x11a97,
+ 0x11c2f, 0x11c2f,
+ 0x11c3e, 0x11c3e,
+ 0x11ca9, 0x11ca9,
+ 0x11cb1, 0x11cb1,
+ 0x11cb4, 0x11cb4,
+ 0x11d8a, 0x11d8e,
+ 0x11d93, 0x11d94,
+ 0x11d96, 0x11d96,
+ 0x11ef5, 0x11ef6,
+ 0x11f03, 0x11f03,
+ 0x11f34, 0x11f35,
+ 0x11f3e, 0x11f3f,
+ 0x11f41, 0x11f41,
+ 0x16f51, 0x16f87,
+ 0x16ff0, 0x16ff1,
+ 0x1d165, 0x1d166,
+ 0x1d16d, 0x1d172,
+}; /* CR_Mc */
+
+/* 'Me': General Category */
+static const OnigCodePoint CR_Me[] = {
+ 5,
+ 0x0488, 0x0489,
+ 0x1abe, 0x1abe,
+ 0x20dd, 0x20e0,
+ 0x20e2, 0x20e4,
+ 0xa670, 0xa672,
+}; /* CR_Me */
+
+/* 'Mn': General Category */
+static const OnigCodePoint CR_Mn[] = {
+ 346,
+ 0x0300, 0x036f,
+ 0x0483, 0x0487,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x061a,
+ 0x064b, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06df, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f3,
+ 0x07fd, 0x07fd,
+ 0x0816, 0x0819,
+ 0x081b, 0x0823,
+ 0x0825, 0x0827,
+ 0x0829, 0x082d,
+ 0x0859, 0x085b,
+ 0x0898, 0x089f,
+ 0x08ca, 0x08e1,
+ 0x08e3, 0x0902,
+ 0x093a, 0x093a,
+ 0x093c, 0x093c,
+ 0x0941, 0x0948,
+ 0x094d, 0x094d,
+ 0x0951, 0x0957,
+ 0x0962, 0x0963,
+ 0x0981, 0x0981,
+ 0x09bc, 0x09bc,
+ 0x09c1, 0x09c4,
+ 0x09cd, 0x09cd,
+ 0x09e2, 0x09e3,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a02,
+ 0x0a3c, 0x0a3c,
+ 0x0a41, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a82,
+ 0x0abc, 0x0abc,
+ 0x0ac1, 0x0ac5,
+ 0x0ac7, 0x0ac8,
+ 0x0acd, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0aff,
+ 0x0b01, 0x0b01,
+ 0x0b3c, 0x0b3c,
+ 0x0b3f, 0x0b3f,
+ 0x0b41, 0x0b44,
+ 0x0b4d, 0x0b4d,
+ 0x0b55, 0x0b56,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bc0, 0x0bc0,
+ 0x0bcd, 0x0bcd,
+ 0x0c00, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c3c, 0x0c3c,
+ 0x0c3e, 0x0c40,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c81,
+ 0x0cbc, 0x0cbc,
+ 0x0cbf, 0x0cbf,
+ 0x0cc6, 0x0cc6,
+ 0x0ccc, 0x0ccd,
+ 0x0ce2, 0x0ce3,
+ 0x0d00, 0x0d01,
+ 0x0d3b, 0x0d3c,
+ 0x0d41, 0x0d44,
+ 0x0d4d, 0x0d4d,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d81,
+ 0x0dca, 0x0dca,
+ 0x0dd2, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0ebc,
+ 0x0ec8, 0x0ece,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f71, 0x0f7e,
+ 0x0f80, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102d, 0x1030,
+ 0x1032, 0x1037,
+ 0x1039, 0x103a,
+ 0x103d, 0x103e,
+ 0x1058, 0x1059,
+ 0x105e, 0x1060,
+ 0x1071, 0x1074,
+ 0x1082, 0x1082,
+ 0x1085, 0x1086,
+ 0x108d, 0x108d,
+ 0x109d, 0x109d,
+ 0x135d, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1733,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b4, 0x17b5,
+ 0x17b7, 0x17bd,
+ 0x17c6, 0x17c6,
+ 0x17c9, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x180f, 0x180f,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x1922,
+ 0x1927, 0x1928,
+ 0x1932, 0x1932,
+ 0x1939, 0x193b,
+ 0x1a17, 0x1a18,
+ 0x1a1b, 0x1a1b,
+ 0x1a56, 0x1a56,
+ 0x1a58, 0x1a5e,
+ 0x1a60, 0x1a60,
+ 0x1a62, 0x1a62,
+ 0x1a65, 0x1a6c,
+ 0x1a73, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1ab0, 0x1abd,
+ 0x1abf, 0x1ace,
+ 0x1b00, 0x1b03,
+ 0x1b34, 0x1b34,
+ 0x1b36, 0x1b3a,
+ 0x1b3c, 0x1b3c,
+ 0x1b42, 0x1b42,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1b81,
+ 0x1ba2, 0x1ba5,
+ 0x1ba8, 0x1ba9,
+ 0x1bab, 0x1bad,
+ 0x1be6, 0x1be6,
+ 0x1be8, 0x1be9,
+ 0x1bed, 0x1bed,
+ 0x1bef, 0x1bf1,
+ 0x1c2c, 0x1c33,
+ 0x1c36, 0x1c37,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce0,
+ 0x1ce2, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf8, 0x1cf9,
+ 0x1dc0, 0x1dff,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20f0,
+ 0x2cef, 0x2cf1,
+ 0x2d7f, 0x2d7f,
+ 0x2de0, 0x2dff,
+ 0x302a, 0x302d,
+ 0x3099, 0x309a,
+ 0xa66f, 0xa66f,
+ 0xa674, 0xa67d,
+ 0xa69e, 0xa69f,
+ 0xa6f0, 0xa6f1,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa825, 0xa826,
+ 0xa82c, 0xa82c,
+ 0xa8c4, 0xa8c5,
+ 0xa8e0, 0xa8f1,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92d,
+ 0xa947, 0xa951,
+ 0xa980, 0xa982,
+ 0xa9b3, 0xa9b3,
+ 0xa9b6, 0xa9b9,
+ 0xa9bc, 0xa9bd,
+ 0xa9e5, 0xa9e5,
+ 0xaa29, 0xaa2e,
+ 0xaa31, 0xaa32,
+ 0xaa35, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4c,
+ 0xaa7c, 0xaa7c,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabf,
+ 0xaac1, 0xaac1,
+ 0xaaec, 0xaaed,
+ 0xaaf6, 0xaaf6,
+ 0xabe5, 0xabe5,
+ 0xabe8, 0xabe8,
+ 0xabed, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x10376, 0x1037a,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10ae5, 0x10ae6,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11001, 0x11001,
+ 0x11038, 0x11046,
+ 0x11070, 0x11070,
+ 0x11073, 0x11074,
+ 0x1107f, 0x11081,
+ 0x110b3, 0x110b6,
+ 0x110b9, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x11100, 0x11102,
+ 0x11127, 0x1112b,
+ 0x1112d, 0x11134,
+ 0x11173, 0x11173,
+ 0x11180, 0x11181,
+ 0x111b6, 0x111be,
+ 0x111c9, 0x111cc,
+ 0x111cf, 0x111cf,
+ 0x1122f, 0x11231,
+ 0x11234, 0x11234,
+ 0x11236, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112df,
+ 0x112e3, 0x112ea,
+ 0x11300, 0x11301,
+ 0x1133b, 0x1133c,
+ 0x11340, 0x11340,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11438, 0x1143f,
+ 0x11442, 0x11444,
+ 0x11446, 0x11446,
+ 0x1145e, 0x1145e,
+ 0x114b3, 0x114b8,
+ 0x114ba, 0x114ba,
+ 0x114bf, 0x114c0,
+ 0x114c2, 0x114c3,
+ 0x115b2, 0x115b5,
+ 0x115bc, 0x115bd,
+ 0x115bf, 0x115c0,
+ 0x115dc, 0x115dd,
+ 0x11633, 0x1163a,
+ 0x1163d, 0x1163d,
+ 0x1163f, 0x11640,
+ 0x116ab, 0x116ab,
+ 0x116ad, 0x116ad,
+ 0x116b0, 0x116b5,
+ 0x116b7, 0x116b7,
+ 0x1171d, 0x1171f,
+ 0x11722, 0x11725,
+ 0x11727, 0x1172b,
+ 0x1182f, 0x11837,
+ 0x11839, 0x1183a,
+ 0x1193b, 0x1193c,
+ 0x1193e, 0x1193e,
+ 0x11943, 0x11943,
+ 0x119d4, 0x119d7,
+ 0x119da, 0x119db,
+ 0x119e0, 0x119e0,
+ 0x11a01, 0x11a0a,
+ 0x11a33, 0x11a38,
+ 0x11a3b, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a51, 0x11a56,
+ 0x11a59, 0x11a5b,
+ 0x11a8a, 0x11a96,
+ 0x11a98, 0x11a99,
+ 0x11c30, 0x11c36,
+ 0x11c38, 0x11c3d,
+ 0x11c3f, 0x11c3f,
+ 0x11c92, 0x11ca7,
+ 0x11caa, 0x11cb0,
+ 0x11cb2, 0x11cb3,
+ 0x11cb5, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d45,
+ 0x11d47, 0x11d47,
+ 0x11d90, 0x11d91,
+ 0x11d95, 0x11d95,
+ 0x11d97, 0x11d97,
+ 0x11ef3, 0x11ef4,
+ 0x11f00, 0x11f01,
+ 0x11f36, 0x11f3a,
+ 0x11f40, 0x11f40,
+ 0x11f42, 0x11f42,
+ 0x13440, 0x13440,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16f4f, 0x16f4f,
+ 0x16f8f, 0x16f92,
+ 0x16fe4, 0x16fe4,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d167, 0x1d169,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e08f, 0x1e08f,
+ 0x1e130, 0x1e136,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e4ec, 0x1e4ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e94a,
+ 0xe0100, 0xe01ef,
+}; /* CR_Mn */
+
+/* 'N': Major Category */
+static const OnigCodePoint CR_N[] = {
+ 137,
+ 0x0030, 0x0039,
+ 0x00b2, 0x00b3,
+ 0x00b9, 0x00b9,
+ 0x00bc, 0x00be,
+ 0x0660, 0x0669,
+ 0x06f0, 0x06f9,
+ 0x07c0, 0x07c9,
+ 0x0966, 0x096f,
+ 0x09e6, 0x09ef,
+ 0x09f4, 0x09f9,
+ 0x0a66, 0x0a6f,
+ 0x0ae6, 0x0aef,
+ 0x0b66, 0x0b6f,
+ 0x0b72, 0x0b77,
+ 0x0be6, 0x0bf2,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7e,
+ 0x0ce6, 0x0cef,
+ 0x0d58, 0x0d5e,
+ 0x0d66, 0x0d78,
+ 0x0de6, 0x0def,
+ 0x0e50, 0x0e59,
+ 0x0ed0, 0x0ed9,
+ 0x0f20, 0x0f33,
+ 0x1040, 0x1049,
+ 0x1090, 0x1099,
+ 0x1369, 0x137c,
+ 0x16ee, 0x16f0,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1810, 0x1819,
+ 0x1946, 0x194f,
+ 0x19d0, 0x19da,
+ 0x1a80, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1b50, 0x1b59,
+ 0x1bb0, 0x1bb9,
+ 0x1c40, 0x1c49,
+ 0x1c50, 0x1c59,
+ 0x2070, 0x2070,
+ 0x2074, 0x2079,
+ 0x2080, 0x2089,
+ 0x2150, 0x2182,
+ 0x2185, 0x2189,
+ 0x2460, 0x249b,
+ 0x24ea, 0x24ff,
+ 0x2776, 0x2793,
+ 0x2cfd, 0x2cfd,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303a,
+ 0x3192, 0x3195,
+ 0x3220, 0x3229,
+ 0x3248, 0x324f,
+ 0x3251, 0x325f,
+ 0x3280, 0x3289,
+ 0x32b1, 0x32bf,
+ 0xa620, 0xa629,
+ 0xa6e6, 0xa6ef,
+ 0xa830, 0xa835,
+ 0xa8d0, 0xa8d9,
+ 0xa900, 0xa909,
+ 0xa9d0, 0xa9d9,
+ 0xa9f0, 0xa9f9,
+ 0xaa50, 0xaa59,
+ 0xabf0, 0xabf9,
+ 0xff10, 0xff19,
+ 0x10107, 0x10133,
+ 0x10140, 0x10178,
+ 0x1018a, 0x1018b,
+ 0x102e1, 0x102fb,
+ 0x10320, 0x10323,
+ 0x10341, 0x10341,
+ 0x1034a, 0x1034a,
+ 0x103d1, 0x103d5,
+ 0x104a0, 0x104a9,
+ 0x10858, 0x1085f,
+ 0x10879, 0x1087f,
+ 0x108a7, 0x108af,
+ 0x108fb, 0x108ff,
+ 0x10916, 0x1091b,
+ 0x109bc, 0x109bd,
+ 0x109c0, 0x109cf,
+ 0x109d2, 0x109ff,
+ 0x10a40, 0x10a48,
+ 0x10a7d, 0x10a7e,
+ 0x10a9d, 0x10a9f,
+ 0x10aeb, 0x10aef,
+ 0x10b58, 0x10b5f,
+ 0x10b78, 0x10b7f,
+ 0x10ba9, 0x10baf,
+ 0x10cfa, 0x10cff,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10f1d, 0x10f26,
+ 0x10f51, 0x10f54,
+ 0x10fc5, 0x10fcb,
+ 0x11052, 0x1106f,
+ 0x110f0, 0x110f9,
+ 0x11136, 0x1113f,
+ 0x111d0, 0x111d9,
+ 0x111e1, 0x111f4,
+ 0x112f0, 0x112f9,
+ 0x11450, 0x11459,
+ 0x114d0, 0x114d9,
+ 0x11650, 0x11659,
+ 0x116c0, 0x116c9,
+ 0x11730, 0x1173b,
+ 0x118e0, 0x118f2,
+ 0x11950, 0x11959,
+ 0x11c50, 0x11c6c,
+ 0x11d50, 0x11d59,
+ 0x11da0, 0x11da9,
+ 0x11f50, 0x11f59,
+ 0x11fc0, 0x11fd4,
+ 0x12400, 0x1246e,
+ 0x16a60, 0x16a69,
+ 0x16ac0, 0x16ac9,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16e80, 0x16e96,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d360, 0x1d378,
+ 0x1d7ce, 0x1d7ff,
+ 0x1e140, 0x1e149,
+ 0x1e2f0, 0x1e2f9,
+ 0x1e4f0, 0x1e4f9,
+ 0x1e8c7, 0x1e8cf,
+ 0x1e950, 0x1e959,
+ 0x1ec71, 0x1ecab,
+ 0x1ecad, 0x1ecaf,
+ 0x1ecb1, 0x1ecb4,
+ 0x1ed01, 0x1ed2d,
+ 0x1ed2f, 0x1ed3d,
+ 0x1f100, 0x1f10c,
+ 0x1fbf0, 0x1fbf9,
+}; /* CR_N */
+
+/* 'Nd': General Category */
+#define CR_Nd CR_Digit
+
+/* 'Nl': General Category */
+static const OnigCodePoint CR_Nl[] = {
+ 12,
+ 0x16ee, 0x16f0,
+ 0x2160, 0x2182,
+ 0x2185, 0x2188,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303a,
+ 0xa6e6, 0xa6ef,
+ 0x10140, 0x10174,
+ 0x10341, 0x10341,
+ 0x1034a, 0x1034a,
+ 0x103d1, 0x103d5,
+ 0x12400, 0x1246e,
+}; /* CR_Nl */
+
+/* 'No': General Category */
+static const OnigCodePoint CR_No[] = {
+ 72,
+ 0x00b2, 0x00b3,
+ 0x00b9, 0x00b9,
+ 0x00bc, 0x00be,
+ 0x09f4, 0x09f9,
+ 0x0b72, 0x0b77,
+ 0x0bf0, 0x0bf2,
+ 0x0c78, 0x0c7e,
+ 0x0d58, 0x0d5e,
+ 0x0d70, 0x0d78,
+ 0x0f2a, 0x0f33,
+ 0x1369, 0x137c,
+ 0x17f0, 0x17f9,
+ 0x19da, 0x19da,
+ 0x2070, 0x2070,
+ 0x2074, 0x2079,
+ 0x2080, 0x2089,
+ 0x2150, 0x215f,
+ 0x2189, 0x2189,
+ 0x2460, 0x249b,
+ 0x24ea, 0x24ff,
+ 0x2776, 0x2793,
+ 0x2cfd, 0x2cfd,
+ 0x3192, 0x3195,
+ 0x3220, 0x3229,
+ 0x3248, 0x324f,
+ 0x3251, 0x325f,
+ 0x3280, 0x3289,
+ 0x32b1, 0x32bf,
+ 0xa830, 0xa835,
+ 0x10107, 0x10133,
+ 0x10175, 0x10178,
+ 0x1018a, 0x1018b,
+ 0x102e1, 0x102fb,
+ 0x10320, 0x10323,
+ 0x10858, 0x1085f,
+ 0x10879, 0x1087f,
+ 0x108a7, 0x108af,
+ 0x108fb, 0x108ff,
+ 0x10916, 0x1091b,
+ 0x109bc, 0x109bd,
+ 0x109c0, 0x109cf,
+ 0x109d2, 0x109ff,
+ 0x10a40, 0x10a48,
+ 0x10a7d, 0x10a7e,
+ 0x10a9d, 0x10a9f,
+ 0x10aeb, 0x10aef,
+ 0x10b58, 0x10b5f,
+ 0x10b78, 0x10b7f,
+ 0x10ba9, 0x10baf,
+ 0x10cfa, 0x10cff,
+ 0x10e60, 0x10e7e,
+ 0x10f1d, 0x10f26,
+ 0x10f51, 0x10f54,
+ 0x10fc5, 0x10fcb,
+ 0x11052, 0x11065,
+ 0x111e1, 0x111f4,
+ 0x1173a, 0x1173b,
+ 0x118ea, 0x118f2,
+ 0x11c5a, 0x11c6c,
+ 0x11fc0, 0x11fd4,
+ 0x16b5b, 0x16b61,
+ 0x16e80, 0x16e96,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d360, 0x1d378,
+ 0x1e8c7, 0x1e8cf,
+ 0x1ec71, 0x1ecab,
+ 0x1ecad, 0x1ecaf,
+ 0x1ecb1, 0x1ecb4,
+ 0x1ed01, 0x1ed2d,
+ 0x1ed2f, 0x1ed3d,
+ 0x1f100, 0x1f10c,
+}; /* CR_No */
+
+/* 'P': Major Category */
+#define CR_P CR_Punct
+
+/* 'Pc': General Category */
+static const OnigCodePoint CR_Pc[] = {
+ 6,
+ 0x005f, 0x005f,
+ 0x203f, 0x2040,
+ 0x2054, 0x2054,
+ 0xfe33, 0xfe34,
+ 0xfe4d, 0xfe4f,
+ 0xff3f, 0xff3f,
+}; /* CR_Pc */
+
+/* 'Pd': General Category */
+static const OnigCodePoint CR_Pd[] = {
+ 19,
+ 0x002d, 0x002d,
+ 0x058a, 0x058a,
+ 0x05be, 0x05be,
+ 0x1400, 0x1400,
+ 0x1806, 0x1806,
+ 0x2010, 0x2015,
+ 0x2e17, 0x2e17,
+ 0x2e1a, 0x2e1a,
+ 0x2e3a, 0x2e3b,
+ 0x2e40, 0x2e40,
+ 0x2e5d, 0x2e5d,
+ 0x301c, 0x301c,
+ 0x3030, 0x3030,
+ 0x30a0, 0x30a0,
+ 0xfe31, 0xfe32,
+ 0xfe58, 0xfe58,
+ 0xfe63, 0xfe63,
+ 0xff0d, 0xff0d,
+ 0x10ead, 0x10ead,
+}; /* CR_Pd */
+
+/* 'Pe': General Category */
+static const OnigCodePoint CR_Pe[] = {
+ 76,
+ 0x0029, 0x0029,
+ 0x005d, 0x005d,
+ 0x007d, 0x007d,
+ 0x0f3b, 0x0f3b,
+ 0x0f3d, 0x0f3d,
+ 0x169c, 0x169c,
+ 0x2046, 0x2046,
+ 0x207e, 0x207e,
+ 0x208e, 0x208e,
+ 0x2309, 0x2309,
+ 0x230b, 0x230b,
+ 0x232a, 0x232a,
+ 0x2769, 0x2769,
+ 0x276b, 0x276b,
+ 0x276d, 0x276d,
+ 0x276f, 0x276f,
+ 0x2771, 0x2771,
+ 0x2773, 0x2773,
+ 0x2775, 0x2775,
+ 0x27c6, 0x27c6,
+ 0x27e7, 0x27e7,
+ 0x27e9, 0x27e9,
+ 0x27eb, 0x27eb,
+ 0x27ed, 0x27ed,
+ 0x27ef, 0x27ef,
+ 0x2984, 0x2984,
+ 0x2986, 0x2986,
+ 0x2988, 0x2988,
+ 0x298a, 0x298a,
+ 0x298c, 0x298c,
+ 0x298e, 0x298e,
+ 0x2990, 0x2990,
+ 0x2992, 0x2992,
+ 0x2994, 0x2994,
+ 0x2996, 0x2996,
+ 0x2998, 0x2998,
+ 0x29d9, 0x29d9,
+ 0x29db, 0x29db,
+ 0x29fd, 0x29fd,
+ 0x2e23, 0x2e23,
+ 0x2e25, 0x2e25,
+ 0x2e27, 0x2e27,
+ 0x2e29, 0x2e29,
+ 0x2e56, 0x2e56,
+ 0x2e58, 0x2e58,
+ 0x2e5a, 0x2e5a,
+ 0x2e5c, 0x2e5c,
+ 0x3009, 0x3009,
+ 0x300b, 0x300b,
+ 0x300d, 0x300d,
+ 0x300f, 0x300f,
+ 0x3011, 0x3011,
+ 0x3015, 0x3015,
+ 0x3017, 0x3017,
+ 0x3019, 0x3019,
+ 0x301b, 0x301b,
+ 0x301e, 0x301f,
+ 0xfd3e, 0xfd3e,
+ 0xfe18, 0xfe18,
+ 0xfe36, 0xfe36,
+ 0xfe38, 0xfe38,
+ 0xfe3a, 0xfe3a,
+ 0xfe3c, 0xfe3c,
+ 0xfe3e, 0xfe3e,
+ 0xfe40, 0xfe40,
+ 0xfe42, 0xfe42,
+ 0xfe44, 0xfe44,
+ 0xfe48, 0xfe48,
+ 0xfe5a, 0xfe5a,
+ 0xfe5c, 0xfe5c,
+ 0xfe5e, 0xfe5e,
+ 0xff09, 0xff09,
+ 0xff3d, 0xff3d,
+ 0xff5d, 0xff5d,
+ 0xff60, 0xff60,
+ 0xff63, 0xff63,
+}; /* CR_Pe */
+
+/* 'Pf': General Category */
+static const OnigCodePoint CR_Pf[] = {
+ 10,
+ 0x00bb, 0x00bb,
+ 0x2019, 0x2019,
+ 0x201d, 0x201d,
+ 0x203a, 0x203a,
+ 0x2e03, 0x2e03,
+ 0x2e05, 0x2e05,
+ 0x2e0a, 0x2e0a,
+ 0x2e0d, 0x2e0d,
+ 0x2e1d, 0x2e1d,
+ 0x2e21, 0x2e21,
+}; /* CR_Pf */
+
+/* 'Pi': General Category */
+static const OnigCodePoint CR_Pi[] = {
+ 11,
+ 0x00ab, 0x00ab,
+ 0x2018, 0x2018,
+ 0x201b, 0x201c,
+ 0x201f, 0x201f,
+ 0x2039, 0x2039,
+ 0x2e02, 0x2e02,
+ 0x2e04, 0x2e04,
+ 0x2e09, 0x2e09,
+ 0x2e0c, 0x2e0c,
+ 0x2e1c, 0x2e1c,
+ 0x2e20, 0x2e20,
+}; /* CR_Pi */
+
+/* 'Po': General Category */
+static const OnigCodePoint CR_Po[] = {
+ 187,
+ 0x0021, 0x0023,
+ 0x0025, 0x0027,
+ 0x002a, 0x002a,
+ 0x002c, 0x002c,
+ 0x002e, 0x002f,
+ 0x003a, 0x003b,
+ 0x003f, 0x0040,
+ 0x005c, 0x005c,
+ 0x00a1, 0x00a1,
+ 0x00a7, 0x00a7,
+ 0x00b6, 0x00b7,
+ 0x00bf, 0x00bf,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x055a, 0x055f,
+ 0x0589, 0x0589,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05f3, 0x05f4,
+ 0x0609, 0x060a,
+ 0x060c, 0x060d,
+ 0x061b, 0x061b,
+ 0x061d, 0x061f,
+ 0x066a, 0x066d,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070d,
+ 0x07f7, 0x07f9,
+ 0x0830, 0x083e,
+ 0x085e, 0x085e,
+ 0x0964, 0x0965,
+ 0x0970, 0x0970,
+ 0x09fd, 0x09fd,
+ 0x0a76, 0x0a76,
+ 0x0af0, 0x0af0,
+ 0x0c77, 0x0c77,
+ 0x0c84, 0x0c84,
+ 0x0df4, 0x0df4,
+ 0x0e4f, 0x0e4f,
+ 0x0e5a, 0x0e5b,
+ 0x0f04, 0x0f12,
+ 0x0f14, 0x0f14,
+ 0x0f85, 0x0f85,
+ 0x0fd0, 0x0fd4,
+ 0x0fd9, 0x0fda,
+ 0x104a, 0x104f,
+ 0x10fb, 0x10fb,
+ 0x1360, 0x1368,
+ 0x166e, 0x166e,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17d8, 0x17da,
+ 0x1800, 0x1805,
+ 0x1807, 0x180a,
+ 0x1944, 0x1945,
+ 0x1a1e, 0x1a1f,
+ 0x1aa0, 0x1aa6,
+ 0x1aa8, 0x1aad,
+ 0x1b5a, 0x1b60,
+ 0x1b7d, 0x1b7e,
+ 0x1bfc, 0x1bff,
+ 0x1c3b, 0x1c3f,
+ 0x1c7e, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd3, 0x1cd3,
+ 0x2016, 0x2017,
+ 0x2020, 0x2027,
+ 0x2030, 0x2038,
+ 0x203b, 0x203e,
+ 0x2041, 0x2043,
+ 0x2047, 0x2051,
+ 0x2053, 0x2053,
+ 0x2055, 0x205e,
+ 0x2cf9, 0x2cfc,
+ 0x2cfe, 0x2cff,
+ 0x2d70, 0x2d70,
+ 0x2e00, 0x2e01,
+ 0x2e06, 0x2e08,
+ 0x2e0b, 0x2e0b,
+ 0x2e0e, 0x2e16,
+ 0x2e18, 0x2e19,
+ 0x2e1b, 0x2e1b,
+ 0x2e1e, 0x2e1f,
+ 0x2e2a, 0x2e2e,
+ 0x2e30, 0x2e39,
+ 0x2e3c, 0x2e3f,
+ 0x2e41, 0x2e41,
+ 0x2e43, 0x2e4f,
+ 0x2e52, 0x2e54,
+ 0x3001, 0x3003,
+ 0x303d, 0x303d,
+ 0x30fb, 0x30fb,
+ 0xa4fe, 0xa4ff,
+ 0xa60d, 0xa60f,
+ 0xa673, 0xa673,
+ 0xa67e, 0xa67e,
+ 0xa6f2, 0xa6f7,
+ 0xa874, 0xa877,
+ 0xa8ce, 0xa8cf,
+ 0xa8f8, 0xa8fa,
+ 0xa8fc, 0xa8fc,
+ 0xa92e, 0xa92f,
+ 0xa95f, 0xa95f,
+ 0xa9c1, 0xa9cd,
+ 0xa9de, 0xa9df,
+ 0xaa5c, 0xaa5f,
+ 0xaade, 0xaadf,
+ 0xaaf0, 0xaaf1,
+ 0xabeb, 0xabeb,
+ 0xfe10, 0xfe16,
+ 0xfe19, 0xfe19,
+ 0xfe30, 0xfe30,
+ 0xfe45, 0xfe46,
+ 0xfe49, 0xfe4c,
+ 0xfe50, 0xfe52,
+ 0xfe54, 0xfe57,
+ 0xfe5f, 0xfe61,
+ 0xfe68, 0xfe68,
+ 0xfe6a, 0xfe6b,
+ 0xff01, 0xff03,
+ 0xff05, 0xff07,
+ 0xff0a, 0xff0a,
+ 0xff0c, 0xff0c,
+ 0xff0e, 0xff0f,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff20,
+ 0xff3c, 0xff3c,
+ 0xff61, 0xff61,
+ 0xff64, 0xff65,
+ 0x10100, 0x10102,
+ 0x1039f, 0x1039f,
+ 0x103d0, 0x103d0,
+ 0x1056f, 0x1056f,
+ 0x10857, 0x10857,
+ 0x1091f, 0x1091f,
+ 0x1093f, 0x1093f,
+ 0x10a50, 0x10a58,
+ 0x10a7f, 0x10a7f,
+ 0x10af0, 0x10af6,
+ 0x10b39, 0x10b3f,
+ 0x10b99, 0x10b9c,
+ 0x10f55, 0x10f59,
+ 0x10f86, 0x10f89,
+ 0x11047, 0x1104d,
+ 0x110bb, 0x110bc,
+ 0x110be, 0x110c1,
+ 0x11140, 0x11143,
+ 0x11174, 0x11175,
+ 0x111c5, 0x111c8,
+ 0x111cd, 0x111cd,
+ 0x111db, 0x111db,
+ 0x111dd, 0x111df,
+ 0x11238, 0x1123d,
+ 0x112a9, 0x112a9,
+ 0x1144b, 0x1144f,
+ 0x1145a, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x114c6, 0x114c6,
+ 0x115c1, 0x115d7,
+ 0x11641, 0x11643,
+ 0x11660, 0x1166c,
+ 0x116b9, 0x116b9,
+ 0x1173c, 0x1173e,
+ 0x1183b, 0x1183b,
+ 0x11944, 0x11946,
+ 0x119e2, 0x119e2,
+ 0x11a3f, 0x11a46,
+ 0x11a9a, 0x11a9c,
+ 0x11a9e, 0x11aa2,
+ 0x11b00, 0x11b09,
+ 0x11c41, 0x11c45,
+ 0x11c70, 0x11c71,
+ 0x11ef7, 0x11ef8,
+ 0x11f43, 0x11f4f,
+ 0x11fff, 0x11fff,
+ 0x12470, 0x12474,
+ 0x12ff1, 0x12ff2,
+ 0x16a6e, 0x16a6f,
+ 0x16af5, 0x16af5,
+ 0x16b37, 0x16b3b,
+ 0x16b44, 0x16b44,
+ 0x16e97, 0x16e9a,
+ 0x16fe2, 0x16fe2,
+ 0x1bc9f, 0x1bc9f,
+ 0x1da87, 0x1da8b,
+ 0x1e95e, 0x1e95f,
+}; /* CR_Po */
+
+/* 'Ps': General Category */
+static const OnigCodePoint CR_Ps[] = {
+ 79,
+ 0x0028, 0x0028,
+ 0x005b, 0x005b,
+ 0x007b, 0x007b,
+ 0x0f3a, 0x0f3a,
+ 0x0f3c, 0x0f3c,
+ 0x169b, 0x169b,
+ 0x201a, 0x201a,
+ 0x201e, 0x201e,
+ 0x2045, 0x2045,
+ 0x207d, 0x207d,
+ 0x208d, 0x208d,
+ 0x2308, 0x2308,
+ 0x230a, 0x230a,
+ 0x2329, 0x2329,
+ 0x2768, 0x2768,
+ 0x276a, 0x276a,
+ 0x276c, 0x276c,
+ 0x276e, 0x276e,
+ 0x2770, 0x2770,
+ 0x2772, 0x2772,
+ 0x2774, 0x2774,
+ 0x27c5, 0x27c5,
+ 0x27e6, 0x27e6,
+ 0x27e8, 0x27e8,
+ 0x27ea, 0x27ea,
+ 0x27ec, 0x27ec,
+ 0x27ee, 0x27ee,
+ 0x2983, 0x2983,
+ 0x2985, 0x2985,
+ 0x2987, 0x2987,
+ 0x2989, 0x2989,
+ 0x298b, 0x298b,
+ 0x298d, 0x298d,
+ 0x298f, 0x298f,
+ 0x2991, 0x2991,
+ 0x2993, 0x2993,
+ 0x2995, 0x2995,
+ 0x2997, 0x2997,
+ 0x29d8, 0x29d8,
+ 0x29da, 0x29da,
+ 0x29fc, 0x29fc,
+ 0x2e22, 0x2e22,
+ 0x2e24, 0x2e24,
+ 0x2e26, 0x2e26,
+ 0x2e28, 0x2e28,
+ 0x2e42, 0x2e42,
+ 0x2e55, 0x2e55,
+ 0x2e57, 0x2e57,
+ 0x2e59, 0x2e59,
+ 0x2e5b, 0x2e5b,
+ 0x3008, 0x3008,
+ 0x300a, 0x300a,
+ 0x300c, 0x300c,
+ 0x300e, 0x300e,
+ 0x3010, 0x3010,
+ 0x3014, 0x3014,
+ 0x3016, 0x3016,
+ 0x3018, 0x3018,
+ 0x301a, 0x301a,
+ 0x301d, 0x301d,
+ 0xfd3f, 0xfd3f,
+ 0xfe17, 0xfe17,
+ 0xfe35, 0xfe35,
+ 0xfe37, 0xfe37,
+ 0xfe39, 0xfe39,
+ 0xfe3b, 0xfe3b,
+ 0xfe3d, 0xfe3d,
+ 0xfe3f, 0xfe3f,
+ 0xfe41, 0xfe41,
+ 0xfe43, 0xfe43,
+ 0xfe47, 0xfe47,
+ 0xfe59, 0xfe59,
+ 0xfe5b, 0xfe5b,
+ 0xfe5d, 0xfe5d,
+ 0xff08, 0xff08,
+ 0xff3b, 0xff3b,
+ 0xff5b, 0xff5b,
+ 0xff5f, 0xff5f,
+ 0xff62, 0xff62,
+}; /* CR_Ps */
+
+/* 'S': Major Category */
+static const OnigCodePoint CR_S[] = {
+ 232,
+ 0x0024, 0x0024,
+ 0x002b, 0x002b,
+ 0x003c, 0x003e,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x007c, 0x007c,
+ 0x007e, 0x007e,
+ 0x00a2, 0x00a6,
+ 0x00a8, 0x00a9,
+ 0x00ac, 0x00ac,
+ 0x00ae, 0x00b1,
+ 0x00b4, 0x00b4,
+ 0x00b8, 0x00b8,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x02c2, 0x02c5,
+ 0x02d2, 0x02df,
+ 0x02e5, 0x02eb,
+ 0x02ed, 0x02ed,
+ 0x02ef, 0x02ff,
+ 0x0375, 0x0375,
+ 0x0384, 0x0385,
+ 0x03f6, 0x03f6,
+ 0x0482, 0x0482,
+ 0x058d, 0x058f,
+ 0x0606, 0x0608,
+ 0x060b, 0x060b,
+ 0x060e, 0x060f,
+ 0x06de, 0x06de,
+ 0x06e9, 0x06e9,
+ 0x06fd, 0x06fe,
+ 0x07f6, 0x07f6,
+ 0x07fe, 0x07ff,
+ 0x0888, 0x0888,
+ 0x09f2, 0x09f3,
+ 0x09fa, 0x09fb,
+ 0x0af1, 0x0af1,
+ 0x0b70, 0x0b70,
+ 0x0bf3, 0x0bfa,
+ 0x0c7f, 0x0c7f,
+ 0x0d4f, 0x0d4f,
+ 0x0d79, 0x0d79,
+ 0x0e3f, 0x0e3f,
+ 0x0f01, 0x0f03,
+ 0x0f13, 0x0f13,
+ 0x0f15, 0x0f17,
+ 0x0f1a, 0x0f1f,
+ 0x0f34, 0x0f34,
+ 0x0f36, 0x0f36,
+ 0x0f38, 0x0f38,
+ 0x0fbe, 0x0fc5,
+ 0x0fc7, 0x0fcc,
+ 0x0fce, 0x0fcf,
+ 0x0fd5, 0x0fd8,
+ 0x109e, 0x109f,
+ 0x1390, 0x1399,
+ 0x166d, 0x166d,
+ 0x17db, 0x17db,
+ 0x1940, 0x1940,
+ 0x19de, 0x19ff,
+ 0x1b61, 0x1b6a,
+ 0x1b74, 0x1b7c,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x2044, 0x2044,
+ 0x2052, 0x2052,
+ 0x207a, 0x207c,
+ 0x208a, 0x208c,
+ 0x20a0, 0x20c0,
+ 0x2100, 0x2101,
+ 0x2103, 0x2106,
+ 0x2108, 0x2109,
+ 0x2114, 0x2114,
+ 0x2116, 0x2118,
+ 0x211e, 0x2123,
+ 0x2125, 0x2125,
+ 0x2127, 0x2127,
+ 0x2129, 0x2129,
+ 0x212e, 0x212e,
+ 0x213a, 0x213b,
+ 0x2140, 0x2144,
+ 0x214a, 0x214d,
+ 0x214f, 0x214f,
+ 0x218a, 0x218b,
+ 0x2190, 0x2307,
+ 0x230c, 0x2328,
+ 0x232b, 0x2426,
+ 0x2440, 0x244a,
+ 0x249c, 0x24e9,
+ 0x2500, 0x2767,
+ 0x2794, 0x27c4,
+ 0x27c7, 0x27e5,
+ 0x27f0, 0x2982,
+ 0x2999, 0x29d7,
+ 0x29dc, 0x29fb,
+ 0x29fe, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2bff,
+ 0x2ce5, 0x2cea,
+ 0x2e50, 0x2e51,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3004, 0x3004,
+ 0x3012, 0x3013,
+ 0x3020, 0x3020,
+ 0x3036, 0x3037,
+ 0x303e, 0x303f,
+ 0x309b, 0x309c,
+ 0x3190, 0x3191,
+ 0x3196, 0x319f,
+ 0x31c0, 0x31e3,
+ 0x3200, 0x321e,
+ 0x322a, 0x3247,
+ 0x3250, 0x3250,
+ 0x3260, 0x327f,
+ 0x328a, 0x32b0,
+ 0x32c0, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa720, 0xa721,
+ 0xa789, 0xa78a,
+ 0xa828, 0xa82b,
+ 0xa836, 0xa839,
+ 0xaa77, 0xaa79,
+ 0xab5b, 0xab5b,
+ 0xab6a, 0xab6b,
+ 0xfb29, 0xfb29,
+ 0xfbb2, 0xfbc2,
+ 0xfd40, 0xfd4f,
+ 0xfdcf, 0xfdcf,
+ 0xfdfc, 0xfdff,
+ 0xfe62, 0xfe62,
+ 0xfe64, 0xfe66,
+ 0xfe69, 0xfe69,
+ 0xff04, 0xff04,
+ 0xff0b, 0xff0b,
+ 0xff1c, 0xff1e,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xff5c, 0xff5c,
+ 0xff5e, 0xff5e,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffc, 0xfffd,
+ 0x10137, 0x1013f,
+ 0x10179, 0x10189,
+ 0x1018c, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fc,
+ 0x10877, 0x10878,
+ 0x10ac8, 0x10ac8,
+ 0x1173f, 0x1173f,
+ 0x11fd5, 0x11ff1,
+ 0x16b3c, 0x16b3f,
+ 0x16b45, 0x16b45,
+ 0x1bc9c, 0x1bc9c,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d164,
+ 0x1d16a, 0x1d16c,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1ea,
+ 0x1d200, 0x1d241,
+ 0x1d245, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d6c1, 0x1d6c1,
+ 0x1d6db, 0x1d6db,
+ 0x1d6fb, 0x1d6fb,
+ 0x1d715, 0x1d715,
+ 0x1d735, 0x1d735,
+ 0x1d74f, 0x1d74f,
+ 0x1d76f, 0x1d76f,
+ 0x1d789, 0x1d789,
+ 0x1d7a9, 0x1d7a9,
+ 0x1d7c3, 0x1d7c3,
+ 0x1d800, 0x1d9ff,
+ 0x1da37, 0x1da3a,
+ 0x1da6d, 0x1da74,
+ 0x1da76, 0x1da83,
+ 0x1da85, 0x1da86,
+ 0x1e14f, 0x1e14f,
+ 0x1e2ff, 0x1e2ff,
+ 0x1ecac, 0x1ecac,
+ 0x1ecb0, 0x1ecb0,
+ 0x1ed2e, 0x1ed2e,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f10d, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+}; /* CR_S */
+
+/* 'Sc': General Category */
+static const OnigCodePoint CR_Sc[] = {
+ 21,
+ 0x0024, 0x0024,
+ 0x00a2, 0x00a5,
+ 0x058f, 0x058f,
+ 0x060b, 0x060b,
+ 0x07fe, 0x07ff,
+ 0x09f2, 0x09f3,
+ 0x09fb, 0x09fb,
+ 0x0af1, 0x0af1,
+ 0x0bf9, 0x0bf9,
+ 0x0e3f, 0x0e3f,
+ 0x17db, 0x17db,
+ 0x20a0, 0x20c0,
+ 0xa838, 0xa838,
+ 0xfdfc, 0xfdfc,
+ 0xfe69, 0xfe69,
+ 0xff04, 0xff04,
+ 0xffe0, 0xffe1,
+ 0xffe5, 0xffe6,
+ 0x11fdd, 0x11fe0,
+ 0x1e2ff, 0x1e2ff,
+ 0x1ecb0, 0x1ecb0,
+}; /* CR_Sc */
+
+/* 'Sk': General Category */
+static const OnigCodePoint CR_Sk[] = {
+ 31,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x00a8, 0x00a8,
+ 0x00af, 0x00af,
+ 0x00b4, 0x00b4,
+ 0x00b8, 0x00b8,
+ 0x02c2, 0x02c5,
+ 0x02d2, 0x02df,
+ 0x02e5, 0x02eb,
+ 0x02ed, 0x02ed,
+ 0x02ef, 0x02ff,
+ 0x0375, 0x0375,
+ 0x0384, 0x0385,
+ 0x0888, 0x0888,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x309b, 0x309c,
+ 0xa700, 0xa716,
+ 0xa720, 0xa721,
+ 0xa789, 0xa78a,
+ 0xab5b, 0xab5b,
+ 0xab6a, 0xab6b,
+ 0xfbb2, 0xfbc2,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xffe3, 0xffe3,
+ 0x1f3fb, 0x1f3ff,
+}; /* CR_Sk */
+
+/* 'Sm': General Category */
+static const OnigCodePoint CR_Sm[] = {
+ 64,
+ 0x002b, 0x002b,
+ 0x003c, 0x003e,
+ 0x007c, 0x007c,
+ 0x007e, 0x007e,
+ 0x00ac, 0x00ac,
+ 0x00b1, 0x00b1,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x03f6, 0x03f6,
+ 0x0606, 0x0608,
+ 0x2044, 0x2044,
+ 0x2052, 0x2052,
+ 0x207a, 0x207c,
+ 0x208a, 0x208c,
+ 0x2118, 0x2118,
+ 0x2140, 0x2144,
+ 0x214b, 0x214b,
+ 0x2190, 0x2194,
+ 0x219a, 0x219b,
+ 0x21a0, 0x21a0,
+ 0x21a3, 0x21a3,
+ 0x21a6, 0x21a6,
+ 0x21ae, 0x21ae,
+ 0x21ce, 0x21cf,
+ 0x21d2, 0x21d2,
+ 0x21d4, 0x21d4,
+ 0x21f4, 0x22ff,
+ 0x2320, 0x2321,
+ 0x237c, 0x237c,
+ 0x239b, 0x23b3,
+ 0x23dc, 0x23e1,
+ 0x25b7, 0x25b7,
+ 0x25c1, 0x25c1,
+ 0x25f8, 0x25ff,
+ 0x266f, 0x266f,
+ 0x27c0, 0x27c4,
+ 0x27c7, 0x27e5,
+ 0x27f0, 0x27ff,
+ 0x2900, 0x2982,
+ 0x2999, 0x29d7,
+ 0x29dc, 0x29fb,
+ 0x29fe, 0x2aff,
+ 0x2b30, 0x2b44,
+ 0x2b47, 0x2b4c,
+ 0xfb29, 0xfb29,
+ 0xfe62, 0xfe62,
+ 0xfe64, 0xfe66,
+ 0xff0b, 0xff0b,
+ 0xff1c, 0xff1e,
+ 0xff5c, 0xff5c,
+ 0xff5e, 0xff5e,
+ 0xffe2, 0xffe2,
+ 0xffe9, 0xffec,
+ 0x1d6c1, 0x1d6c1,
+ 0x1d6db, 0x1d6db,
+ 0x1d6fb, 0x1d6fb,
+ 0x1d715, 0x1d715,
+ 0x1d735, 0x1d735,
+ 0x1d74f, 0x1d74f,
+ 0x1d76f, 0x1d76f,
+ 0x1d789, 0x1d789,
+ 0x1d7a9, 0x1d7a9,
+ 0x1d7c3, 0x1d7c3,
+ 0x1eef0, 0x1eef1,
+}; /* CR_Sm */
+
+/* 'So': General Category */
+static const OnigCodePoint CR_So[] = {
+ 184,
+ 0x00a6, 0x00a6,
+ 0x00a9, 0x00a9,
+ 0x00ae, 0x00ae,
+ 0x00b0, 0x00b0,
+ 0x0482, 0x0482,
+ 0x058d, 0x058e,
+ 0x060e, 0x060f,
+ 0x06de, 0x06de,
+ 0x06e9, 0x06e9,
+ 0x06fd, 0x06fe,
+ 0x07f6, 0x07f6,
+ 0x09fa, 0x09fa,
+ 0x0b70, 0x0b70,
+ 0x0bf3, 0x0bf8,
+ 0x0bfa, 0x0bfa,
+ 0x0c7f, 0x0c7f,
+ 0x0d4f, 0x0d4f,
+ 0x0d79, 0x0d79,
+ 0x0f01, 0x0f03,
+ 0x0f13, 0x0f13,
+ 0x0f15, 0x0f17,
+ 0x0f1a, 0x0f1f,
+ 0x0f34, 0x0f34,
+ 0x0f36, 0x0f36,
+ 0x0f38, 0x0f38,
+ 0x0fbe, 0x0fc5,
+ 0x0fc7, 0x0fcc,
+ 0x0fce, 0x0fcf,
+ 0x0fd5, 0x0fd8,
+ 0x109e, 0x109f,
+ 0x1390, 0x1399,
+ 0x166d, 0x166d,
+ 0x1940, 0x1940,
+ 0x19de, 0x19ff,
+ 0x1b61, 0x1b6a,
+ 0x1b74, 0x1b7c,
+ 0x2100, 0x2101,
+ 0x2103, 0x2106,
+ 0x2108, 0x2109,
+ 0x2114, 0x2114,
+ 0x2116, 0x2117,
+ 0x211e, 0x2123,
+ 0x2125, 0x2125,
+ 0x2127, 0x2127,
+ 0x2129, 0x2129,
+ 0x212e, 0x212e,
+ 0x213a, 0x213b,
+ 0x214a, 0x214a,
+ 0x214c, 0x214d,
+ 0x214f, 0x214f,
+ 0x218a, 0x218b,
+ 0x2195, 0x2199,
+ 0x219c, 0x219f,
+ 0x21a1, 0x21a2,
+ 0x21a4, 0x21a5,
+ 0x21a7, 0x21ad,
+ 0x21af, 0x21cd,
+ 0x21d0, 0x21d1,
+ 0x21d3, 0x21d3,
+ 0x21d5, 0x21f3,
+ 0x2300, 0x2307,
+ 0x230c, 0x231f,
+ 0x2322, 0x2328,
+ 0x232b, 0x237b,
+ 0x237d, 0x239a,
+ 0x23b4, 0x23db,
+ 0x23e2, 0x2426,
+ 0x2440, 0x244a,
+ 0x249c, 0x24e9,
+ 0x2500, 0x25b6,
+ 0x25b8, 0x25c0,
+ 0x25c2, 0x25f7,
+ 0x2600, 0x266e,
+ 0x2670, 0x2767,
+ 0x2794, 0x27bf,
+ 0x2800, 0x28ff,
+ 0x2b00, 0x2b2f,
+ 0x2b45, 0x2b46,
+ 0x2b4d, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2bff,
+ 0x2ce5, 0x2cea,
+ 0x2e50, 0x2e51,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3004, 0x3004,
+ 0x3012, 0x3013,
+ 0x3020, 0x3020,
+ 0x3036, 0x3037,
+ 0x303e, 0x303f,
+ 0x3190, 0x3191,
+ 0x3196, 0x319f,
+ 0x31c0, 0x31e3,
+ 0x3200, 0x321e,
+ 0x322a, 0x3247,
+ 0x3250, 0x3250,
+ 0x3260, 0x327f,
+ 0x328a, 0x32b0,
+ 0x32c0, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa490, 0xa4c6,
+ 0xa828, 0xa82b,
+ 0xa836, 0xa837,
+ 0xa839, 0xa839,
+ 0xaa77, 0xaa79,
+ 0xfd40, 0xfd4f,
+ 0xfdcf, 0xfdcf,
+ 0xfdfd, 0xfdff,
+ 0xffe4, 0xffe4,
+ 0xffe8, 0xffe8,
+ 0xffed, 0xffee,
+ 0xfffc, 0xfffd,
+ 0x10137, 0x1013f,
+ 0x10179, 0x10189,
+ 0x1018c, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fc,
+ 0x10877, 0x10878,
+ 0x10ac8, 0x10ac8,
+ 0x1173f, 0x1173f,
+ 0x11fd5, 0x11fdc,
+ 0x11fe1, 0x11ff1,
+ 0x16b3c, 0x16b3f,
+ 0x16b45, 0x16b45,
+ 0x1bc9c, 0x1bc9c,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d164,
+ 0x1d16a, 0x1d16c,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1ea,
+ 0x1d200, 0x1d241,
+ 0x1d245, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d800, 0x1d9ff,
+ 0x1da37, 0x1da3a,
+ 0x1da6d, 0x1da74,
+ 0x1da76, 0x1da83,
+ 0x1da85, 0x1da86,
+ 0x1e14f, 0x1e14f,
+ 0x1ecac, 0x1ecac,
+ 0x1ed2e, 0x1ed2e,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f10d, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f3fa,
+ 0x1f400, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+}; /* CR_So */
+
+/* 'Z': Major Category */
+static const OnigCodePoint CR_Z[] = {
+ 8,
+ 0x0020, 0x0020,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x2000, 0x200a,
+ 0x2028, 0x2029,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000,
+}; /* CR_Z */
+
+/* 'Zl': General Category */
+static const OnigCodePoint CR_Zl[] = {
+ 1,
+ 0x2028, 0x2028,
+}; /* CR_Zl */
+
+/* 'Zp': General Category */
+static const OnigCodePoint CR_Zp[] = {
+ 1,
+ 0x2029, 0x2029,
+}; /* CR_Zp */
+
+/* 'Zs': General Category */
+static const OnigCodePoint CR_Zs[] = {
+ 7,
+ 0x0020, 0x0020,
+ 0x00a0, 0x00a0,
+ 0x1680, 0x1680,
+ 0x2000, 0x200a,
+ 0x202f, 0x202f,
+ 0x205f, 0x205f,
+ 0x3000, 0x3000,
+}; /* CR_Zs */
+
+/* 'Math': Derived Property */
+static const OnigCodePoint CR_Math[] = {
+ 138,
+ 0x002b, 0x002b,
+ 0x003c, 0x003e,
+ 0x005e, 0x005e,
+ 0x007c, 0x007c,
+ 0x007e, 0x007e,
+ 0x00ac, 0x00ac,
+ 0x00b1, 0x00b1,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x03d0, 0x03d2,
+ 0x03d5, 0x03d5,
+ 0x03f0, 0x03f1,
+ 0x03f4, 0x03f6,
+ 0x0606, 0x0608,
+ 0x2016, 0x2016,
+ 0x2032, 0x2034,
+ 0x2040, 0x2040,
+ 0x2044, 0x2044,
+ 0x2052, 0x2052,
+ 0x2061, 0x2064,
+ 0x207a, 0x207e,
+ 0x208a, 0x208e,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20e6,
+ 0x20eb, 0x20ef,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2118, 0x211d,
+ 0x2124, 0x2124,
+ 0x2128, 0x2129,
+ 0x212c, 0x212d,
+ 0x212f, 0x2131,
+ 0x2133, 0x2138,
+ 0x213c, 0x2149,
+ 0x214b, 0x214b,
+ 0x2190, 0x21a7,
+ 0x21a9, 0x21ae,
+ 0x21b0, 0x21b1,
+ 0x21b6, 0x21b7,
+ 0x21bc, 0x21db,
+ 0x21dd, 0x21dd,
+ 0x21e4, 0x21e5,
+ 0x21f4, 0x22ff,
+ 0x2308, 0x230b,
+ 0x2320, 0x2321,
+ 0x237c, 0x237c,
+ 0x239b, 0x23b5,
+ 0x23b7, 0x23b7,
+ 0x23d0, 0x23d0,
+ 0x23dc, 0x23e2,
+ 0x25a0, 0x25a1,
+ 0x25ae, 0x25b7,
+ 0x25bc, 0x25c1,
+ 0x25c6, 0x25c7,
+ 0x25ca, 0x25cb,
+ 0x25cf, 0x25d3,
+ 0x25e2, 0x25e2,
+ 0x25e4, 0x25e4,
+ 0x25e7, 0x25ec,
+ 0x25f8, 0x25ff,
+ 0x2605, 0x2606,
+ 0x2640, 0x2640,
+ 0x2642, 0x2642,
+ 0x2660, 0x2663,
+ 0x266d, 0x266f,
+ 0x27c0, 0x27ff,
+ 0x2900, 0x2aff,
+ 0x2b30, 0x2b44,
+ 0x2b47, 0x2b4c,
+ 0xfb29, 0xfb29,
+ 0xfe61, 0xfe66,
+ 0xfe68, 0xfe68,
+ 0xff0b, 0xff0b,
+ 0xff1c, 0xff1e,
+ 0xff3c, 0xff3c,
+ 0xff3e, 0xff3e,
+ 0xff5c, 0xff5c,
+ 0xff5e, 0xff5e,
+ 0xffe2, 0xffe2,
+ 0xffe9, 0xffec,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+}; /* CR_Math */
+
+/* 'Alphabetic': Derived Property */
+#define CR_Alphabetic CR_Alpha
+
+/* 'Lowercase': Derived Property */
+#define CR_Lowercase CR_Lower
+
+/* 'Uppercase': Derived Property */
+#define CR_Uppercase CR_Upper
+
+/* 'Cased': Derived Property */
+static const OnigCodePoint CR_Cased[] = {
+ 157,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x01ba,
+ 0x01bc, 0x01bf,
+ 0x01c4, 0x0293,
+ 0x0295, 0x02b8,
+ 0x02c0, 0x02c1,
+ 0x02e0, 0x02e4,
+ 0x0345, 0x0345,
+ 0x0370, 0x0373,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0560, 0x0588,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10ff,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x212d,
+ 0x212f, 0x2134,
+ 0x2139, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x217f,
+ 0x2183, 0x2184,
+ 0x24b6, 0x24e9,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa640, 0xa66d,
+ 0xa680, 0xa69d,
+ 0xa722, 0xa787,
+ 0xa78b, 0xa78e,
+ 0xa790, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa7f6,
+ 0xa7f8, 0xa7fa,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0x10400, 0x1044f,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10780, 0x10780,
+ 0x10783, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x118a0, 0x118df,
+ 0x16e40, 0x16e7f,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df09,
+ 0x1df0b, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e900, 0x1e943,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+}; /* CR_Cased */
+
+/* 'Case_Ignorable': Derived Property */
+static const OnigCodePoint CR_Case_Ignorable[] = {
+ 437,
+ 0x0027, 0x0027,
+ 0x002e, 0x002e,
+ 0x003a, 0x003a,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x00a8, 0x00a8,
+ 0x00ad, 0x00ad,
+ 0x00af, 0x00af,
+ 0x00b4, 0x00b4,
+ 0x00b7, 0x00b8,
+ 0x02b0, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x0384, 0x0385,
+ 0x0387, 0x0387,
+ 0x0483, 0x0489,
+ 0x0559, 0x0559,
+ 0x055f, 0x055f,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05f4, 0x05f4,
+ 0x0600, 0x0605,
+ 0x0610, 0x061a,
+ 0x061c, 0x061c,
+ 0x0640, 0x0640,
+ 0x064b, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dd,
+ 0x06df, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x070f, 0x070f,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x07fd, 0x07fd,
+ 0x0816, 0x082d,
+ 0x0859, 0x085b,
+ 0x0888, 0x0888,
+ 0x0890, 0x0891,
+ 0x0898, 0x089f,
+ 0x08c9, 0x0902,
+ 0x093a, 0x093a,
+ 0x093c, 0x093c,
+ 0x0941, 0x0948,
+ 0x094d, 0x094d,
+ 0x0951, 0x0957,
+ 0x0962, 0x0963,
+ 0x0971, 0x0971,
+ 0x0981, 0x0981,
+ 0x09bc, 0x09bc,
+ 0x09c1, 0x09c4,
+ 0x09cd, 0x09cd,
+ 0x09e2, 0x09e3,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a02,
+ 0x0a3c, 0x0a3c,
+ 0x0a41, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a82,
+ 0x0abc, 0x0abc,
+ 0x0ac1, 0x0ac5,
+ 0x0ac7, 0x0ac8,
+ 0x0acd, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0aff,
+ 0x0b01, 0x0b01,
+ 0x0b3c, 0x0b3c,
+ 0x0b3f, 0x0b3f,
+ 0x0b41, 0x0b44,
+ 0x0b4d, 0x0b4d,
+ 0x0b55, 0x0b56,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bc0, 0x0bc0,
+ 0x0bcd, 0x0bcd,
+ 0x0c00, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c3c, 0x0c3c,
+ 0x0c3e, 0x0c40,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c81,
+ 0x0cbc, 0x0cbc,
+ 0x0cbf, 0x0cbf,
+ 0x0cc6, 0x0cc6,
+ 0x0ccc, 0x0ccd,
+ 0x0ce2, 0x0ce3,
+ 0x0d00, 0x0d01,
+ 0x0d3b, 0x0d3c,
+ 0x0d41, 0x0d44,
+ 0x0d4d, 0x0d4d,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d81,
+ 0x0dca, 0x0dca,
+ 0x0dd2, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e46, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0ebc,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f71, 0x0f7e,
+ 0x0f80, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102d, 0x1030,
+ 0x1032, 0x1037,
+ 0x1039, 0x103a,
+ 0x103d, 0x103e,
+ 0x1058, 0x1059,
+ 0x105e, 0x1060,
+ 0x1071, 0x1074,
+ 0x1082, 0x1082,
+ 0x1085, 0x1086,
+ 0x108d, 0x108d,
+ 0x109d, 0x109d,
+ 0x10fc, 0x10fc,
+ 0x135d, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1733,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b4, 0x17b5,
+ 0x17b7, 0x17bd,
+ 0x17c6, 0x17c6,
+ 0x17c9, 0x17d3,
+ 0x17d7, 0x17d7,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180f,
+ 0x1843, 0x1843,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x1922,
+ 0x1927, 0x1928,
+ 0x1932, 0x1932,
+ 0x1939, 0x193b,
+ 0x1a17, 0x1a18,
+ 0x1a1b, 0x1a1b,
+ 0x1a56, 0x1a56,
+ 0x1a58, 0x1a5e,
+ 0x1a60, 0x1a60,
+ 0x1a62, 0x1a62,
+ 0x1a65, 0x1a6c,
+ 0x1a73, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1aa7, 0x1aa7,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b03,
+ 0x1b34, 0x1b34,
+ 0x1b36, 0x1b3a,
+ 0x1b3c, 0x1b3c,
+ 0x1b42, 0x1b42,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1b81,
+ 0x1ba2, 0x1ba5,
+ 0x1ba8, 0x1ba9,
+ 0x1bab, 0x1bad,
+ 0x1be6, 0x1be6,
+ 0x1be8, 0x1be9,
+ 0x1bed, 0x1bed,
+ 0x1bef, 0x1bf1,
+ 0x1c2c, 0x1c33,
+ 0x1c36, 0x1c37,
+ 0x1c78, 0x1c7d,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce0,
+ 0x1ce2, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf8, 0x1cf9,
+ 0x1d2c, 0x1d6a,
+ 0x1d78, 0x1d78,
+ 0x1d9b, 0x1dff,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x200b, 0x200f,
+ 0x2018, 0x2019,
+ 0x2024, 0x2024,
+ 0x2027, 0x2027,
+ 0x202a, 0x202e,
+ 0x2060, 0x2064,
+ 0x2066, 0x206f,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x20d0, 0x20f0,
+ 0x2c7c, 0x2c7d,
+ 0x2cef, 0x2cf1,
+ 0x2d6f, 0x2d6f,
+ 0x2d7f, 0x2d7f,
+ 0x2de0, 0x2dff,
+ 0x2e2f, 0x2e2f,
+ 0x3005, 0x3005,
+ 0x302a, 0x302d,
+ 0x3031, 0x3035,
+ 0x303b, 0x303b,
+ 0x3099, 0x309e,
+ 0x30fc, 0x30fe,
+ 0xa015, 0xa015,
+ 0xa4f8, 0xa4fd,
+ 0xa60c, 0xa60c,
+ 0xa66f, 0xa672,
+ 0xa674, 0xa67d,
+ 0xa67f, 0xa67f,
+ 0xa69c, 0xa69f,
+ 0xa6f0, 0xa6f1,
+ 0xa700, 0xa721,
+ 0xa770, 0xa770,
+ 0xa788, 0xa78a,
+ 0xa7f2, 0xa7f4,
+ 0xa7f8, 0xa7f9,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa825, 0xa826,
+ 0xa82c, 0xa82c,
+ 0xa8c4, 0xa8c5,
+ 0xa8e0, 0xa8f1,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92d,
+ 0xa947, 0xa951,
+ 0xa980, 0xa982,
+ 0xa9b3, 0xa9b3,
+ 0xa9b6, 0xa9b9,
+ 0xa9bc, 0xa9bd,
+ 0xa9cf, 0xa9cf,
+ 0xa9e5, 0xa9e6,
+ 0xaa29, 0xaa2e,
+ 0xaa31, 0xaa32,
+ 0xaa35, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4c,
+ 0xaa70, 0xaa70,
+ 0xaa7c, 0xaa7c,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabf,
+ 0xaac1, 0xaac1,
+ 0xaadd, 0xaadd,
+ 0xaaec, 0xaaed,
+ 0xaaf3, 0xaaf4,
+ 0xaaf6, 0xaaf6,
+ 0xab5b, 0xab5f,
+ 0xab69, 0xab6b,
+ 0xabe5, 0xabe5,
+ 0xabe8, 0xabe8,
+ 0xabed, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfbb2, 0xfbc2,
+ 0xfe00, 0xfe0f,
+ 0xfe13, 0xfe13,
+ 0xfe20, 0xfe2f,
+ 0xfe52, 0xfe52,
+ 0xfe55, 0xfe55,
+ 0xfeff, 0xfeff,
+ 0xff07, 0xff07,
+ 0xff0e, 0xff0e,
+ 0xff1a, 0xff1a,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f,
+ 0xffe3, 0xffe3,
+ 0xfff9, 0xfffb,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x10376, 0x1037a,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10ae5, 0x10ae6,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11001, 0x11001,
+ 0x11038, 0x11046,
+ 0x11070, 0x11070,
+ 0x11073, 0x11074,
+ 0x1107f, 0x11081,
+ 0x110b3, 0x110b6,
+ 0x110b9, 0x110ba,
+ 0x110bd, 0x110bd,
+ 0x110c2, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x11100, 0x11102,
+ 0x11127, 0x1112b,
+ 0x1112d, 0x11134,
+ 0x11173, 0x11173,
+ 0x11180, 0x11181,
+ 0x111b6, 0x111be,
+ 0x111c9, 0x111cc,
+ 0x111cf, 0x111cf,
+ 0x1122f, 0x11231,
+ 0x11234, 0x11234,
+ 0x11236, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112df,
+ 0x112e3, 0x112ea,
+ 0x11300, 0x11301,
+ 0x1133b, 0x1133c,
+ 0x11340, 0x11340,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11438, 0x1143f,
+ 0x11442, 0x11444,
+ 0x11446, 0x11446,
+ 0x1145e, 0x1145e,
+ 0x114b3, 0x114b8,
+ 0x114ba, 0x114ba,
+ 0x114bf, 0x114c0,
+ 0x114c2, 0x114c3,
+ 0x115b2, 0x115b5,
+ 0x115bc, 0x115bd,
+ 0x115bf, 0x115c0,
+ 0x115dc, 0x115dd,
+ 0x11633, 0x1163a,
+ 0x1163d, 0x1163d,
+ 0x1163f, 0x11640,
+ 0x116ab, 0x116ab,
+ 0x116ad, 0x116ad,
+ 0x116b0, 0x116b5,
+ 0x116b7, 0x116b7,
+ 0x1171d, 0x1171f,
+ 0x11722, 0x11725,
+ 0x11727, 0x1172b,
+ 0x1182f, 0x11837,
+ 0x11839, 0x1183a,
+ 0x1193b, 0x1193c,
+ 0x1193e, 0x1193e,
+ 0x11943, 0x11943,
+ 0x119d4, 0x119d7,
+ 0x119da, 0x119db,
+ 0x119e0, 0x119e0,
+ 0x11a01, 0x11a0a,
+ 0x11a33, 0x11a38,
+ 0x11a3b, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a51, 0x11a56,
+ 0x11a59, 0x11a5b,
+ 0x11a8a, 0x11a96,
+ 0x11a98, 0x11a99,
+ 0x11c30, 0x11c36,
+ 0x11c38, 0x11c3d,
+ 0x11c3f, 0x11c3f,
+ 0x11c92, 0x11ca7,
+ 0x11caa, 0x11cb0,
+ 0x11cb2, 0x11cb3,
+ 0x11cb5, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d45,
+ 0x11d47, 0x11d47,
+ 0x11d90, 0x11d91,
+ 0x11d95, 0x11d95,
+ 0x11d97, 0x11d97,
+ 0x11ef3, 0x11ef4,
+ 0x11f00, 0x11f01,
+ 0x11f36, 0x11f3a,
+ 0x11f40, 0x11f40,
+ 0x11f42, 0x11f42,
+ 0x13430, 0x13440,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16b40, 0x16b43,
+ 0x16f4f, 0x16f4f,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe4,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1bc9d, 0x1bc9e,
+ 0x1bca0, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d167, 0x1d169,
+ 0x1d173, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e130, 0x1e13d,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e4eb, 0x1e4ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e94b,
+ 0x1f3fb, 0x1f3ff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+}; /* CR_Case_Ignorable */
+
+/* 'Changes_When_Lowercased': Derived Property */
+static const OnigCodePoint CR_Changes_When_Lowercased[] = {
+ 609,
+ 0x0041, 0x005a,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00de,
+ 0x0100, 0x0100,
+ 0x0102, 0x0102,
+ 0x0104, 0x0104,
+ 0x0106, 0x0106,
+ 0x0108, 0x0108,
+ 0x010a, 0x010a,
+ 0x010c, 0x010c,
+ 0x010e, 0x010e,
+ 0x0110, 0x0110,
+ 0x0112, 0x0112,
+ 0x0114, 0x0114,
+ 0x0116, 0x0116,
+ 0x0118, 0x0118,
+ 0x011a, 0x011a,
+ 0x011c, 0x011c,
+ 0x011e, 0x011e,
+ 0x0120, 0x0120,
+ 0x0122, 0x0122,
+ 0x0124, 0x0124,
+ 0x0126, 0x0126,
+ 0x0128, 0x0128,
+ 0x012a, 0x012a,
+ 0x012c, 0x012c,
+ 0x012e, 0x012e,
+ 0x0130, 0x0130,
+ 0x0132, 0x0132,
+ 0x0134, 0x0134,
+ 0x0136, 0x0136,
+ 0x0139, 0x0139,
+ 0x013b, 0x013b,
+ 0x013d, 0x013d,
+ 0x013f, 0x013f,
+ 0x0141, 0x0141,
+ 0x0143, 0x0143,
+ 0x0145, 0x0145,
+ 0x0147, 0x0147,
+ 0x014a, 0x014a,
+ 0x014c, 0x014c,
+ 0x014e, 0x014e,
+ 0x0150, 0x0150,
+ 0x0152, 0x0152,
+ 0x0154, 0x0154,
+ 0x0156, 0x0156,
+ 0x0158, 0x0158,
+ 0x015a, 0x015a,
+ 0x015c, 0x015c,
+ 0x015e, 0x015e,
+ 0x0160, 0x0160,
+ 0x0162, 0x0162,
+ 0x0164, 0x0164,
+ 0x0166, 0x0166,
+ 0x0168, 0x0168,
+ 0x016a, 0x016a,
+ 0x016c, 0x016c,
+ 0x016e, 0x016e,
+ 0x0170, 0x0170,
+ 0x0172, 0x0172,
+ 0x0174, 0x0174,
+ 0x0176, 0x0176,
+ 0x0178, 0x0179,
+ 0x017b, 0x017b,
+ 0x017d, 0x017d,
+ 0x0181, 0x0182,
+ 0x0184, 0x0184,
+ 0x0186, 0x0187,
+ 0x0189, 0x018b,
+ 0x018e, 0x0191,
+ 0x0193, 0x0194,
+ 0x0196, 0x0198,
+ 0x019c, 0x019d,
+ 0x019f, 0x01a0,
+ 0x01a2, 0x01a2,
+ 0x01a4, 0x01a4,
+ 0x01a6, 0x01a7,
+ 0x01a9, 0x01a9,
+ 0x01ac, 0x01ac,
+ 0x01ae, 0x01af,
+ 0x01b1, 0x01b3,
+ 0x01b5, 0x01b5,
+ 0x01b7, 0x01b8,
+ 0x01bc, 0x01bc,
+ 0x01c4, 0x01c5,
+ 0x01c7, 0x01c8,
+ 0x01ca, 0x01cb,
+ 0x01cd, 0x01cd,
+ 0x01cf, 0x01cf,
+ 0x01d1, 0x01d1,
+ 0x01d3, 0x01d3,
+ 0x01d5, 0x01d5,
+ 0x01d7, 0x01d7,
+ 0x01d9, 0x01d9,
+ 0x01db, 0x01db,
+ 0x01de, 0x01de,
+ 0x01e0, 0x01e0,
+ 0x01e2, 0x01e2,
+ 0x01e4, 0x01e4,
+ 0x01e6, 0x01e6,
+ 0x01e8, 0x01e8,
+ 0x01ea, 0x01ea,
+ 0x01ec, 0x01ec,
+ 0x01ee, 0x01ee,
+ 0x01f1, 0x01f2,
+ 0x01f4, 0x01f4,
+ 0x01f6, 0x01f8,
+ 0x01fa, 0x01fa,
+ 0x01fc, 0x01fc,
+ 0x01fe, 0x01fe,
+ 0x0200, 0x0200,
+ 0x0202, 0x0202,
+ 0x0204, 0x0204,
+ 0x0206, 0x0206,
+ 0x0208, 0x0208,
+ 0x020a, 0x020a,
+ 0x020c, 0x020c,
+ 0x020e, 0x020e,
+ 0x0210, 0x0210,
+ 0x0212, 0x0212,
+ 0x0214, 0x0214,
+ 0x0216, 0x0216,
+ 0x0218, 0x0218,
+ 0x021a, 0x021a,
+ 0x021c, 0x021c,
+ 0x021e, 0x021e,
+ 0x0220, 0x0220,
+ 0x0222, 0x0222,
+ 0x0224, 0x0224,
+ 0x0226, 0x0226,
+ 0x0228, 0x0228,
+ 0x022a, 0x022a,
+ 0x022c, 0x022c,
+ 0x022e, 0x022e,
+ 0x0230, 0x0230,
+ 0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
+ 0x0243, 0x0246,
+ 0x0248, 0x0248,
+ 0x024a, 0x024a,
+ 0x024c, 0x024c,
+ 0x024e, 0x024e,
+ 0x0370, 0x0370,
+ 0x0372, 0x0372,
+ 0x0376, 0x0376,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x038f,
+ 0x0391, 0x03a1,
+ 0x03a3, 0x03ab,
+ 0x03cf, 0x03cf,
+ 0x03d8, 0x03d8,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03e2,
+ 0x03e4, 0x03e4,
+ 0x03e6, 0x03e6,
+ 0x03e8, 0x03e8,
+ 0x03ea, 0x03ea,
+ 0x03ec, 0x03ec,
+ 0x03ee, 0x03ee,
+ 0x03f4, 0x03f4,
+ 0x03f7, 0x03f7,
+ 0x03f9, 0x03fa,
+ 0x03fd, 0x042f,
+ 0x0460, 0x0460,
+ 0x0462, 0x0462,
+ 0x0464, 0x0464,
+ 0x0466, 0x0466,
+ 0x0468, 0x0468,
+ 0x046a, 0x046a,
+ 0x046c, 0x046c,
+ 0x046e, 0x046e,
+ 0x0470, 0x0470,
+ 0x0472, 0x0472,
+ 0x0474, 0x0474,
+ 0x0476, 0x0476,
+ 0x0478, 0x0478,
+ 0x047a, 0x047a,
+ 0x047c, 0x047c,
+ 0x047e, 0x047e,
+ 0x0480, 0x0480,
+ 0x048a, 0x048a,
+ 0x048c, 0x048c,
+ 0x048e, 0x048e,
+ 0x0490, 0x0490,
+ 0x0492, 0x0492,
+ 0x0494, 0x0494,
+ 0x0496, 0x0496,
+ 0x0498, 0x0498,
+ 0x049a, 0x049a,
+ 0x049c, 0x049c,
+ 0x049e, 0x049e,
+ 0x04a0, 0x04a0,
+ 0x04a2, 0x04a2,
+ 0x04a4, 0x04a4,
+ 0x04a6, 0x04a6,
+ 0x04a8, 0x04a8,
+ 0x04aa, 0x04aa,
+ 0x04ac, 0x04ac,
+ 0x04ae, 0x04ae,
+ 0x04b0, 0x04b0,
+ 0x04b2, 0x04b2,
+ 0x04b4, 0x04b4,
+ 0x04b6, 0x04b6,
+ 0x04b8, 0x04b8,
+ 0x04ba, 0x04ba,
+ 0x04bc, 0x04bc,
+ 0x04be, 0x04be,
+ 0x04c0, 0x04c1,
+ 0x04c3, 0x04c3,
+ 0x04c5, 0x04c5,
+ 0x04c7, 0x04c7,
+ 0x04c9, 0x04c9,
+ 0x04cb, 0x04cb,
+ 0x04cd, 0x04cd,
+ 0x04d0, 0x04d0,
+ 0x04d2, 0x04d2,
+ 0x04d4, 0x04d4,
+ 0x04d6, 0x04d6,
+ 0x04d8, 0x04d8,
+ 0x04da, 0x04da,
+ 0x04dc, 0x04dc,
+ 0x04de, 0x04de,
+ 0x04e0, 0x04e0,
+ 0x04e2, 0x04e2,
+ 0x04e4, 0x04e4,
+ 0x04e6, 0x04e6,
+ 0x04e8, 0x04e8,
+ 0x04ea, 0x04ea,
+ 0x04ec, 0x04ec,
+ 0x04ee, 0x04ee,
+ 0x04f0, 0x04f0,
+ 0x04f2, 0x04f2,
+ 0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
+ 0x04f8, 0x04f8,
+ 0x04fa, 0x04fa,
+ 0x04fc, 0x04fc,
+ 0x04fe, 0x04fe,
+ 0x0500, 0x0500,
+ 0x0502, 0x0502,
+ 0x0504, 0x0504,
+ 0x0506, 0x0506,
+ 0x0508, 0x0508,
+ 0x050a, 0x050a,
+ 0x050c, 0x050c,
+ 0x050e, 0x050e,
+ 0x0510, 0x0510,
+ 0x0512, 0x0512,
+ 0x0514, 0x0514,
+ 0x0516, 0x0516,
+ 0x0518, 0x0518,
+ 0x051a, 0x051a,
+ 0x051c, 0x051c,
+ 0x051e, 0x051e,
+ 0x0520, 0x0520,
+ 0x0522, 0x0522,
+ 0x0524, 0x0524,
+ 0x0526, 0x0526,
+ 0x0528, 0x0528,
+ 0x052a, 0x052a,
+ 0x052c, 0x052c,
+ 0x052e, 0x052e,
+ 0x0531, 0x0556,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x13a0, 0x13f5,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1e00, 0x1e00,
+ 0x1e02, 0x1e02,
+ 0x1e04, 0x1e04,
+ 0x1e06, 0x1e06,
+ 0x1e08, 0x1e08,
+ 0x1e0a, 0x1e0a,
+ 0x1e0c, 0x1e0c,
+ 0x1e0e, 0x1e0e,
+ 0x1e10, 0x1e10,
+ 0x1e12, 0x1e12,
+ 0x1e14, 0x1e14,
+ 0x1e16, 0x1e16,
+ 0x1e18, 0x1e18,
+ 0x1e1a, 0x1e1a,
+ 0x1e1c, 0x1e1c,
+ 0x1e1e, 0x1e1e,
+ 0x1e20, 0x1e20,
+ 0x1e22, 0x1e22,
+ 0x1e24, 0x1e24,
+ 0x1e26, 0x1e26,
+ 0x1e28, 0x1e28,
+ 0x1e2a, 0x1e2a,
+ 0x1e2c, 0x1e2c,
+ 0x1e2e, 0x1e2e,
+ 0x1e30, 0x1e30,
+ 0x1e32, 0x1e32,
+ 0x1e34, 0x1e34,
+ 0x1e36, 0x1e36,
+ 0x1e38, 0x1e38,
+ 0x1e3a, 0x1e3a,
+ 0x1e3c, 0x1e3c,
+ 0x1e3e, 0x1e3e,
+ 0x1e40, 0x1e40,
+ 0x1e42, 0x1e42,
+ 0x1e44, 0x1e44,
+ 0x1e46, 0x1e46,
+ 0x1e48, 0x1e48,
+ 0x1e4a, 0x1e4a,
+ 0x1e4c, 0x1e4c,
+ 0x1e4e, 0x1e4e,
+ 0x1e50, 0x1e50,
+ 0x1e52, 0x1e52,
+ 0x1e54, 0x1e54,
+ 0x1e56, 0x1e56,
+ 0x1e58, 0x1e58,
+ 0x1e5a, 0x1e5a,
+ 0x1e5c, 0x1e5c,
+ 0x1e5e, 0x1e5e,
+ 0x1e60, 0x1e60,
+ 0x1e62, 0x1e62,
+ 0x1e64, 0x1e64,
+ 0x1e66, 0x1e66,
+ 0x1e68, 0x1e68,
+ 0x1e6a, 0x1e6a,
+ 0x1e6c, 0x1e6c,
+ 0x1e6e, 0x1e6e,
+ 0x1e70, 0x1e70,
+ 0x1e72, 0x1e72,
+ 0x1e74, 0x1e74,
+ 0x1e76, 0x1e76,
+ 0x1e78, 0x1e78,
+ 0x1e7a, 0x1e7a,
+ 0x1e7c, 0x1e7c,
+ 0x1e7e, 0x1e7e,
+ 0x1e80, 0x1e80,
+ 0x1e82, 0x1e82,
+ 0x1e84, 0x1e84,
+ 0x1e86, 0x1e86,
+ 0x1e88, 0x1e88,
+ 0x1e8a, 0x1e8a,
+ 0x1e8c, 0x1e8c,
+ 0x1e8e, 0x1e8e,
+ 0x1e90, 0x1e90,
+ 0x1e92, 0x1e92,
+ 0x1e94, 0x1e94,
+ 0x1e9e, 0x1e9e,
+ 0x1ea0, 0x1ea0,
+ 0x1ea2, 0x1ea2,
+ 0x1ea4, 0x1ea4,
+ 0x1ea6, 0x1ea6,
+ 0x1ea8, 0x1ea8,
+ 0x1eaa, 0x1eaa,
+ 0x1eac, 0x1eac,
+ 0x1eae, 0x1eae,
+ 0x1eb0, 0x1eb0,
+ 0x1eb2, 0x1eb2,
+ 0x1eb4, 0x1eb4,
+ 0x1eb6, 0x1eb6,
+ 0x1eb8, 0x1eb8,
+ 0x1eba, 0x1eba,
+ 0x1ebc, 0x1ebc,
+ 0x1ebe, 0x1ebe,
+ 0x1ec0, 0x1ec0,
+ 0x1ec2, 0x1ec2,
+ 0x1ec4, 0x1ec4,
+ 0x1ec6, 0x1ec6,
+ 0x1ec8, 0x1ec8,
+ 0x1eca, 0x1eca,
+ 0x1ecc, 0x1ecc,
+ 0x1ece, 0x1ece,
+ 0x1ed0, 0x1ed0,
+ 0x1ed2, 0x1ed2,
+ 0x1ed4, 0x1ed4,
+ 0x1ed6, 0x1ed6,
+ 0x1ed8, 0x1ed8,
+ 0x1eda, 0x1eda,
+ 0x1edc, 0x1edc,
+ 0x1ede, 0x1ede,
+ 0x1ee0, 0x1ee0,
+ 0x1ee2, 0x1ee2,
+ 0x1ee4, 0x1ee4,
+ 0x1ee6, 0x1ee6,
+ 0x1ee8, 0x1ee8,
+ 0x1eea, 0x1eea,
+ 0x1eec, 0x1eec,
+ 0x1eee, 0x1eee,
+ 0x1ef0, 0x1ef0,
+ 0x1ef2, 0x1ef2,
+ 0x1ef4, 0x1ef4,
+ 0x1ef6, 0x1ef6,
+ 0x1ef8, 0x1ef8,
+ 0x1efa, 0x1efa,
+ 0x1efc, 0x1efc,
+ 0x1efe, 0x1efe,
+ 0x1f08, 0x1f0f,
+ 0x1f18, 0x1f1d,
+ 0x1f28, 0x1f2f,
+ 0x1f38, 0x1f3f,
+ 0x1f48, 0x1f4d,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f5f,
+ 0x1f68, 0x1f6f,
+ 0x1f88, 0x1f8f,
+ 0x1f98, 0x1f9f,
+ 0x1fa8, 0x1faf,
+ 0x1fb8, 0x1fbc,
+ 0x1fc8, 0x1fcc,
+ 0x1fd8, 0x1fdb,
+ 0x1fe8, 0x1fec,
+ 0x1ff8, 0x1ffc,
+ 0x2126, 0x2126,
+ 0x212a, 0x212b,
+ 0x2132, 0x2132,
+ 0x2160, 0x216f,
+ 0x2183, 0x2183,
+ 0x24b6, 0x24cf,
+ 0x2c00, 0x2c2f,
+ 0x2c60, 0x2c60,
+ 0x2c62, 0x2c64,
+ 0x2c67, 0x2c67,
+ 0x2c69, 0x2c69,
+ 0x2c6b, 0x2c6b,
+ 0x2c6d, 0x2c70,
+ 0x2c72, 0x2c72,
+ 0x2c75, 0x2c75,
+ 0x2c7e, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
+ 0x2ceb, 0x2ceb,
+ 0x2ced, 0x2ced,
+ 0x2cf2, 0x2cf2,
+ 0xa640, 0xa640,
+ 0xa642, 0xa642,
+ 0xa644, 0xa644,
+ 0xa646, 0xa646,
+ 0xa648, 0xa648,
+ 0xa64a, 0xa64a,
+ 0xa64c, 0xa64c,
+ 0xa64e, 0xa64e,
+ 0xa650, 0xa650,
+ 0xa652, 0xa652,
+ 0xa654, 0xa654,
+ 0xa656, 0xa656,
+ 0xa658, 0xa658,
+ 0xa65a, 0xa65a,
+ 0xa65c, 0xa65c,
+ 0xa65e, 0xa65e,
+ 0xa660, 0xa660,
+ 0xa662, 0xa662,
+ 0xa664, 0xa664,
+ 0xa666, 0xa666,
+ 0xa668, 0xa668,
+ 0xa66a, 0xa66a,
+ 0xa66c, 0xa66c,
+ 0xa680, 0xa680,
+ 0xa682, 0xa682,
+ 0xa684, 0xa684,
+ 0xa686, 0xa686,
+ 0xa688, 0xa688,
+ 0xa68a, 0xa68a,
+ 0xa68c, 0xa68c,
+ 0xa68e, 0xa68e,
+ 0xa690, 0xa690,
+ 0xa692, 0xa692,
+ 0xa694, 0xa694,
+ 0xa696, 0xa696,
+ 0xa698, 0xa698,
+ 0xa69a, 0xa69a,
+ 0xa722, 0xa722,
+ 0xa724, 0xa724,
+ 0xa726, 0xa726,
+ 0xa728, 0xa728,
+ 0xa72a, 0xa72a,
+ 0xa72c, 0xa72c,
+ 0xa72e, 0xa72e,
+ 0xa732, 0xa732,
+ 0xa734, 0xa734,
+ 0xa736, 0xa736,
+ 0xa738, 0xa738,
+ 0xa73a, 0xa73a,
+ 0xa73c, 0xa73c,
+ 0xa73e, 0xa73e,
+ 0xa740, 0xa740,
+ 0xa742, 0xa742,
+ 0xa744, 0xa744,
+ 0xa746, 0xa746,
+ 0xa748, 0xa748,
+ 0xa74a, 0xa74a,
+ 0xa74c, 0xa74c,
+ 0xa74e, 0xa74e,
+ 0xa750, 0xa750,
+ 0xa752, 0xa752,
+ 0xa754, 0xa754,
+ 0xa756, 0xa756,
+ 0xa758, 0xa758,
+ 0xa75a, 0xa75a,
+ 0xa75c, 0xa75c,
+ 0xa75e, 0xa75e,
+ 0xa760, 0xa760,
+ 0xa762, 0xa762,
+ 0xa764, 0xa764,
+ 0xa766, 0xa766,
+ 0xa768, 0xa768,
+ 0xa76a, 0xa76a,
+ 0xa76c, 0xa76c,
+ 0xa76e, 0xa76e,
+ 0xa779, 0xa779,
+ 0xa77b, 0xa77b,
+ 0xa77d, 0xa77e,
+ 0xa780, 0xa780,
+ 0xa782, 0xa782,
+ 0xa784, 0xa784,
+ 0xa786, 0xa786,
+ 0xa78b, 0xa78b,
+ 0xa78d, 0xa78d,
+ 0xa790, 0xa790,
+ 0xa792, 0xa792,
+ 0xa796, 0xa796,
+ 0xa798, 0xa798,
+ 0xa79a, 0xa79a,
+ 0xa79c, 0xa79c,
+ 0xa79e, 0xa79e,
+ 0xa7a0, 0xa7a0,
+ 0xa7a2, 0xa7a2,
+ 0xa7a4, 0xa7a4,
+ 0xa7a6, 0xa7a6,
+ 0xa7a8, 0xa7a8,
+ 0xa7aa, 0xa7ae,
+ 0xa7b0, 0xa7b4,
+ 0xa7b6, 0xa7b6,
+ 0xa7b8, 0xa7b8,
+ 0xa7ba, 0xa7ba,
+ 0xa7bc, 0xa7bc,
+ 0xa7be, 0xa7be,
+ 0xa7c0, 0xa7c0,
+ 0xa7c2, 0xa7c2,
+ 0xa7c4, 0xa7c7,
+ 0xa7c9, 0xa7c9,
+ 0xa7d0, 0xa7d0,
+ 0xa7d6, 0xa7d6,
+ 0xa7d8, 0xa7d8,
+ 0xa7f5, 0xa7f5,
+ 0xff21, 0xff3a,
+ 0x10400, 0x10427,
+ 0x104b0, 0x104d3,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10c80, 0x10cb2,
+ 0x118a0, 0x118bf,
+ 0x16e40, 0x16e5f,
+ 0x1e900, 0x1e921,
+}; /* CR_Changes_When_Lowercased */
+
+/* 'Changes_When_Uppercased': Derived Property */
+static const OnigCodePoint CR_Changes_When_Uppercased[] = {
+ 627,
+ 0x0061, 0x007a,
+ 0x00b5, 0x00b5,
+ 0x00df, 0x00f6,
+ 0x00f8, 0x00ff,
+ 0x0101, 0x0101,
+ 0x0103, 0x0103,
+ 0x0105, 0x0105,
+ 0x0107, 0x0107,
+ 0x0109, 0x0109,
+ 0x010b, 0x010b,
+ 0x010d, 0x010d,
+ 0x010f, 0x010f,
+ 0x0111, 0x0111,
+ 0x0113, 0x0113,
+ 0x0115, 0x0115,
+ 0x0117, 0x0117,
+ 0x0119, 0x0119,
+ 0x011b, 0x011b,
+ 0x011d, 0x011d,
+ 0x011f, 0x011f,
+ 0x0121, 0x0121,
+ 0x0123, 0x0123,
+ 0x0125, 0x0125,
+ 0x0127, 0x0127,
+ 0x0129, 0x0129,
+ 0x012b, 0x012b,
+ 0x012d, 0x012d,
+ 0x012f, 0x012f,
+ 0x0131, 0x0131,
+ 0x0133, 0x0133,
+ 0x0135, 0x0135,
+ 0x0137, 0x0137,
+ 0x013a, 0x013a,
+ 0x013c, 0x013c,
+ 0x013e, 0x013e,
+ 0x0140, 0x0140,
+ 0x0142, 0x0142,
+ 0x0144, 0x0144,
+ 0x0146, 0x0146,
+ 0x0148, 0x0149,
+ 0x014b, 0x014b,
+ 0x014d, 0x014d,
+ 0x014f, 0x014f,
+ 0x0151, 0x0151,
+ 0x0153, 0x0153,
+ 0x0155, 0x0155,
+ 0x0157, 0x0157,
+ 0x0159, 0x0159,
+ 0x015b, 0x015b,
+ 0x015d, 0x015d,
+ 0x015f, 0x015f,
+ 0x0161, 0x0161,
+ 0x0163, 0x0163,
+ 0x0165, 0x0165,
+ 0x0167, 0x0167,
+ 0x0169, 0x0169,
+ 0x016b, 0x016b,
+ 0x016d, 0x016d,
+ 0x016f, 0x016f,
+ 0x0171, 0x0171,
+ 0x0173, 0x0173,
+ 0x0175, 0x0175,
+ 0x0177, 0x0177,
+ 0x017a, 0x017a,
+ 0x017c, 0x017c,
+ 0x017e, 0x0180,
+ 0x0183, 0x0183,
+ 0x0185, 0x0185,
+ 0x0188, 0x0188,
+ 0x018c, 0x018c,
+ 0x0192, 0x0192,
+ 0x0195, 0x0195,
+ 0x0199, 0x019a,
+ 0x019e, 0x019e,
+ 0x01a1, 0x01a1,
+ 0x01a3, 0x01a3,
+ 0x01a5, 0x01a5,
+ 0x01a8, 0x01a8,
+ 0x01ad, 0x01ad,
+ 0x01b0, 0x01b0,
+ 0x01b4, 0x01b4,
+ 0x01b6, 0x01b6,
+ 0x01b9, 0x01b9,
+ 0x01bd, 0x01bd,
+ 0x01bf, 0x01bf,
+ 0x01c5, 0x01c6,
+ 0x01c8, 0x01c9,
+ 0x01cb, 0x01cc,
+ 0x01ce, 0x01ce,
+ 0x01d0, 0x01d0,
+ 0x01d2, 0x01d2,
+ 0x01d4, 0x01d4,
+ 0x01d6, 0x01d6,
+ 0x01d8, 0x01d8,
+ 0x01da, 0x01da,
+ 0x01dc, 0x01dd,
+ 0x01df, 0x01df,
+ 0x01e1, 0x01e1,
+ 0x01e3, 0x01e3,
+ 0x01e5, 0x01e5,
+ 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9,
+ 0x01eb, 0x01eb,
+ 0x01ed, 0x01ed,
+ 0x01ef, 0x01f0,
+ 0x01f2, 0x01f3,
+ 0x01f5, 0x01f5,
+ 0x01f9, 0x01f9,
+ 0x01fb, 0x01fb,
+ 0x01fd, 0x01fd,
+ 0x01ff, 0x01ff,
+ 0x0201, 0x0201,
+ 0x0203, 0x0203,
+ 0x0205, 0x0205,
+ 0x0207, 0x0207,
+ 0x0209, 0x0209,
+ 0x020b, 0x020b,
+ 0x020d, 0x020d,
+ 0x020f, 0x020f,
+ 0x0211, 0x0211,
+ 0x0213, 0x0213,
+ 0x0215, 0x0215,
+ 0x0217, 0x0217,
+ 0x0219, 0x0219,
+ 0x021b, 0x021b,
+ 0x021d, 0x021d,
+ 0x021f, 0x021f,
+ 0x0223, 0x0223,
+ 0x0225, 0x0225,
+ 0x0227, 0x0227,
+ 0x0229, 0x0229,
+ 0x022b, 0x022b,
+ 0x022d, 0x022d,
+ 0x022f, 0x022f,
+ 0x0231, 0x0231,
+ 0x0233, 0x0233,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
+ 0x0242, 0x0242,
+ 0x0247, 0x0247,
+ 0x0249, 0x0249,
+ 0x024b, 0x024b,
+ 0x024d, 0x024d,
+ 0x024f, 0x0254,
+ 0x0256, 0x0257,
+ 0x0259, 0x0259,
+ 0x025b, 0x025c,
+ 0x0260, 0x0261,
+ 0x0263, 0x0263,
+ 0x0265, 0x0266,
+ 0x0268, 0x026c,
+ 0x026f, 0x026f,
+ 0x0271, 0x0272,
+ 0x0275, 0x0275,
+ 0x027d, 0x027d,
+ 0x0280, 0x0280,
+ 0x0282, 0x0283,
+ 0x0287, 0x028c,
+ 0x0292, 0x0292,
+ 0x029d, 0x029e,
+ 0x0345, 0x0345,
+ 0x0371, 0x0371,
+ 0x0373, 0x0373,
+ 0x0377, 0x0377,
+ 0x037b, 0x037d,
+ 0x0390, 0x0390,
+ 0x03ac, 0x03ce,
+ 0x03d0, 0x03d1,
+ 0x03d5, 0x03d7,
+ 0x03d9, 0x03d9,
+ 0x03db, 0x03db,
+ 0x03dd, 0x03dd,
+ 0x03df, 0x03df,
+ 0x03e1, 0x03e1,
+ 0x03e3, 0x03e3,
+ 0x03e5, 0x03e5,
+ 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9,
+ 0x03eb, 0x03eb,
+ 0x03ed, 0x03ed,
+ 0x03ef, 0x03f3,
+ 0x03f5, 0x03f5,
+ 0x03f8, 0x03f8,
+ 0x03fb, 0x03fb,
+ 0x0430, 0x045f,
+ 0x0461, 0x0461,
+ 0x0463, 0x0463,
+ 0x0465, 0x0465,
+ 0x0467, 0x0467,
+ 0x0469, 0x0469,
+ 0x046b, 0x046b,
+ 0x046d, 0x046d,
+ 0x046f, 0x046f,
+ 0x0471, 0x0471,
+ 0x0473, 0x0473,
+ 0x0475, 0x0475,
+ 0x0477, 0x0477,
+ 0x0479, 0x0479,
+ 0x047b, 0x047b,
+ 0x047d, 0x047d,
+ 0x047f, 0x047f,
+ 0x0481, 0x0481,
+ 0x048b, 0x048b,
+ 0x048d, 0x048d,
+ 0x048f, 0x048f,
+ 0x0491, 0x0491,
+ 0x0493, 0x0493,
+ 0x0495, 0x0495,
+ 0x0497, 0x0497,
+ 0x0499, 0x0499,
+ 0x049b, 0x049b,
+ 0x049d, 0x049d,
+ 0x049f, 0x049f,
+ 0x04a1, 0x04a1,
+ 0x04a3, 0x04a3,
+ 0x04a5, 0x04a5,
+ 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9,
+ 0x04ab, 0x04ab,
+ 0x04ad, 0x04ad,
+ 0x04af, 0x04af,
+ 0x04b1, 0x04b1,
+ 0x04b3, 0x04b3,
+ 0x04b5, 0x04b5,
+ 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9,
+ 0x04bb, 0x04bb,
+ 0x04bd, 0x04bd,
+ 0x04bf, 0x04bf,
+ 0x04c2, 0x04c2,
+ 0x04c4, 0x04c4,
+ 0x04c6, 0x04c6,
+ 0x04c8, 0x04c8,
+ 0x04ca, 0x04ca,
+ 0x04cc, 0x04cc,
+ 0x04ce, 0x04cf,
+ 0x04d1, 0x04d1,
+ 0x04d3, 0x04d3,
+ 0x04d5, 0x04d5,
+ 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9,
+ 0x04db, 0x04db,
+ 0x04dd, 0x04dd,
+ 0x04df, 0x04df,
+ 0x04e1, 0x04e1,
+ 0x04e3, 0x04e3,
+ 0x04e5, 0x04e5,
+ 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9,
+ 0x04eb, 0x04eb,
+ 0x04ed, 0x04ed,
+ 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1,
+ 0x04f3, 0x04f3,
+ 0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
+ 0x04f9, 0x04f9,
+ 0x04fb, 0x04fb,
+ 0x04fd, 0x04fd,
+ 0x04ff, 0x04ff,
+ 0x0501, 0x0501,
+ 0x0503, 0x0503,
+ 0x0505, 0x0505,
+ 0x0507, 0x0507,
+ 0x0509, 0x0509,
+ 0x050b, 0x050b,
+ 0x050d, 0x050d,
+ 0x050f, 0x050f,
+ 0x0511, 0x0511,
+ 0x0513, 0x0513,
+ 0x0515, 0x0515,
+ 0x0517, 0x0517,
+ 0x0519, 0x0519,
+ 0x051b, 0x051b,
+ 0x051d, 0x051d,
+ 0x051f, 0x051f,
+ 0x0521, 0x0521,
+ 0x0523, 0x0523,
+ 0x0525, 0x0525,
+ 0x0527, 0x0527,
+ 0x0529, 0x0529,
+ 0x052b, 0x052b,
+ 0x052d, 0x052d,
+ 0x052f, 0x052f,
+ 0x0561, 0x0587,
+ 0x10d0, 0x10fa,
+ 0x10fd, 0x10ff,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1d79, 0x1d79,
+ 0x1d7d, 0x1d7d,
+ 0x1d8e, 0x1d8e,
+ 0x1e01, 0x1e01,
+ 0x1e03, 0x1e03,
+ 0x1e05, 0x1e05,
+ 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09,
+ 0x1e0b, 0x1e0b,
+ 0x1e0d, 0x1e0d,
+ 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11,
+ 0x1e13, 0x1e13,
+ 0x1e15, 0x1e15,
+ 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19,
+ 0x1e1b, 0x1e1b,
+ 0x1e1d, 0x1e1d,
+ 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21,
+ 0x1e23, 0x1e23,
+ 0x1e25, 0x1e25,
+ 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29,
+ 0x1e2b, 0x1e2b,
+ 0x1e2d, 0x1e2d,
+ 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31,
+ 0x1e33, 0x1e33,
+ 0x1e35, 0x1e35,
+ 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39,
+ 0x1e3b, 0x1e3b,
+ 0x1e3d, 0x1e3d,
+ 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41,
+ 0x1e43, 0x1e43,
+ 0x1e45, 0x1e45,
+ 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49,
+ 0x1e4b, 0x1e4b,
+ 0x1e4d, 0x1e4d,
+ 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51,
+ 0x1e53, 0x1e53,
+ 0x1e55, 0x1e55,
+ 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59,
+ 0x1e5b, 0x1e5b,
+ 0x1e5d, 0x1e5d,
+ 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61,
+ 0x1e63, 0x1e63,
+ 0x1e65, 0x1e65,
+ 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69,
+ 0x1e6b, 0x1e6b,
+ 0x1e6d, 0x1e6d,
+ 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71,
+ 0x1e73, 0x1e73,
+ 0x1e75, 0x1e75,
+ 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79,
+ 0x1e7b, 0x1e7b,
+ 0x1e7d, 0x1e7d,
+ 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81,
+ 0x1e83, 0x1e83,
+ 0x1e85, 0x1e85,
+ 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89,
+ 0x1e8b, 0x1e8b,
+ 0x1e8d, 0x1e8d,
+ 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91,
+ 0x1e93, 0x1e93,
+ 0x1e95, 0x1e9b,
+ 0x1ea1, 0x1ea1,
+ 0x1ea3, 0x1ea3,
+ 0x1ea5, 0x1ea5,
+ 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9,
+ 0x1eab, 0x1eab,
+ 0x1ead, 0x1ead,
+ 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1,
+ 0x1eb3, 0x1eb3,
+ 0x1eb5, 0x1eb5,
+ 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9,
+ 0x1ebb, 0x1ebb,
+ 0x1ebd, 0x1ebd,
+ 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1,
+ 0x1ec3, 0x1ec3,
+ 0x1ec5, 0x1ec5,
+ 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9,
+ 0x1ecb, 0x1ecb,
+ 0x1ecd, 0x1ecd,
+ 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1,
+ 0x1ed3, 0x1ed3,
+ 0x1ed5, 0x1ed5,
+ 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9,
+ 0x1edb, 0x1edb,
+ 0x1edd, 0x1edd,
+ 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1,
+ 0x1ee3, 0x1ee3,
+ 0x1ee5, 0x1ee5,
+ 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9,
+ 0x1eeb, 0x1eeb,
+ 0x1eed, 0x1eed,
+ 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1,
+ 0x1ef3, 0x1ef3,
+ 0x1ef5, 0x1ef5,
+ 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9,
+ 0x1efb, 0x1efb,
+ 0x1efd, 0x1efd,
+ 0x1eff, 0x1f07,
+ 0x1f10, 0x1f15,
+ 0x1f20, 0x1f27,
+ 0x1f30, 0x1f37,
+ 0x1f40, 0x1f45,
+ 0x1f50, 0x1f57,
+ 0x1f60, 0x1f67,
+ 0x1f70, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fb7,
+ 0x1fbc, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fc7,
+ 0x1fcc, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fd7,
+ 0x1fe0, 0x1fe7,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ff7,
+ 0x1ffc, 0x1ffc,
+ 0x214e, 0x214e,
+ 0x2170, 0x217f,
+ 0x2184, 0x2184,
+ 0x24d0, 0x24e9,
+ 0x2c30, 0x2c5f,
+ 0x2c61, 0x2c61,
+ 0x2c65, 0x2c66,
+ 0x2c68, 0x2c68,
+ 0x2c6a, 0x2c6a,
+ 0x2c6c, 0x2c6c,
+ 0x2c73, 0x2c73,
+ 0x2c76, 0x2c76,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce3,
+ 0x2cec, 0x2cec,
+ 0x2cee, 0x2cee,
+ 0x2cf3, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa641, 0xa641,
+ 0xa643, 0xa643,
+ 0xa645, 0xa645,
+ 0xa647, 0xa647,
+ 0xa649, 0xa649,
+ 0xa64b, 0xa64b,
+ 0xa64d, 0xa64d,
+ 0xa64f, 0xa64f,
+ 0xa651, 0xa651,
+ 0xa653, 0xa653,
+ 0xa655, 0xa655,
+ 0xa657, 0xa657,
+ 0xa659, 0xa659,
+ 0xa65b, 0xa65b,
+ 0xa65d, 0xa65d,
+ 0xa65f, 0xa65f,
+ 0xa661, 0xa661,
+ 0xa663, 0xa663,
+ 0xa665, 0xa665,
+ 0xa667, 0xa667,
+ 0xa669, 0xa669,
+ 0xa66b, 0xa66b,
+ 0xa66d, 0xa66d,
+ 0xa681, 0xa681,
+ 0xa683, 0xa683,
+ 0xa685, 0xa685,
+ 0xa687, 0xa687,
+ 0xa689, 0xa689,
+ 0xa68b, 0xa68b,
+ 0xa68d, 0xa68d,
+ 0xa68f, 0xa68f,
+ 0xa691, 0xa691,
+ 0xa693, 0xa693,
+ 0xa695, 0xa695,
+ 0xa697, 0xa697,
+ 0xa699, 0xa699,
+ 0xa69b, 0xa69b,
+ 0xa723, 0xa723,
+ 0xa725, 0xa725,
+ 0xa727, 0xa727,
+ 0xa729, 0xa729,
+ 0xa72b, 0xa72b,
+ 0xa72d, 0xa72d,
+ 0xa72f, 0xa72f,
+ 0xa733, 0xa733,
+ 0xa735, 0xa735,
+ 0xa737, 0xa737,
+ 0xa739, 0xa739,
+ 0xa73b, 0xa73b,
+ 0xa73d, 0xa73d,
+ 0xa73f, 0xa73f,
+ 0xa741, 0xa741,
+ 0xa743, 0xa743,
+ 0xa745, 0xa745,
+ 0xa747, 0xa747,
+ 0xa749, 0xa749,
+ 0xa74b, 0xa74b,
+ 0xa74d, 0xa74d,
+ 0xa74f, 0xa74f,
+ 0xa751, 0xa751,
+ 0xa753, 0xa753,
+ 0xa755, 0xa755,
+ 0xa757, 0xa757,
+ 0xa759, 0xa759,
+ 0xa75b, 0xa75b,
+ 0xa75d, 0xa75d,
+ 0xa75f, 0xa75f,
+ 0xa761, 0xa761,
+ 0xa763, 0xa763,
+ 0xa765, 0xa765,
+ 0xa767, 0xa767,
+ 0xa769, 0xa769,
+ 0xa76b, 0xa76b,
+ 0xa76d, 0xa76d,
+ 0xa76f, 0xa76f,
+ 0xa77a, 0xa77a,
+ 0xa77c, 0xa77c,
+ 0xa77f, 0xa77f,
+ 0xa781, 0xa781,
+ 0xa783, 0xa783,
+ 0xa785, 0xa785,
+ 0xa787, 0xa787,
+ 0xa78c, 0xa78c,
+ 0xa791, 0xa791,
+ 0xa793, 0xa794,
+ 0xa797, 0xa797,
+ 0xa799, 0xa799,
+ 0xa79b, 0xa79b,
+ 0xa79d, 0xa79d,
+ 0xa79f, 0xa79f,
+ 0xa7a1, 0xa7a1,
+ 0xa7a3, 0xa7a3,
+ 0xa7a5, 0xa7a5,
+ 0xa7a7, 0xa7a7,
+ 0xa7a9, 0xa7a9,
+ 0xa7b5, 0xa7b5,
+ 0xa7b7, 0xa7b7,
+ 0xa7b9, 0xa7b9,
+ 0xa7bb, 0xa7bb,
+ 0xa7bd, 0xa7bd,
+ 0xa7bf, 0xa7bf,
+ 0xa7c1, 0xa7c1,
+ 0xa7c3, 0xa7c3,
+ 0xa7c8, 0xa7c8,
+ 0xa7ca, 0xa7ca,
+ 0xa7d1, 0xa7d1,
+ 0xa7d7, 0xa7d7,
+ 0xa7d9, 0xa7d9,
+ 0xa7f6, 0xa7f6,
+ 0xab53, 0xab53,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff41, 0xff5a,
+ 0x10428, 0x1044f,
+ 0x104d8, 0x104fb,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10cc0, 0x10cf2,
+ 0x118c0, 0x118df,
+ 0x16e60, 0x16e7f,
+ 0x1e922, 0x1e943,
+}; /* CR_Changes_When_Uppercased */
+
+/* 'Changes_When_Titlecased': Derived Property */
+static const OnigCodePoint CR_Changes_When_Titlecased[] = {
+ 626,
+ 0x0061, 0x007a,
+ 0x00b5, 0x00b5,
+ 0x00df, 0x00f6,
+ 0x00f8, 0x00ff,
+ 0x0101, 0x0101,
+ 0x0103, 0x0103,
+ 0x0105, 0x0105,
+ 0x0107, 0x0107,
+ 0x0109, 0x0109,
+ 0x010b, 0x010b,
+ 0x010d, 0x010d,
+ 0x010f, 0x010f,
+ 0x0111, 0x0111,
+ 0x0113, 0x0113,
+ 0x0115, 0x0115,
+ 0x0117, 0x0117,
+ 0x0119, 0x0119,
+ 0x011b, 0x011b,
+ 0x011d, 0x011d,
+ 0x011f, 0x011f,
+ 0x0121, 0x0121,
+ 0x0123, 0x0123,
+ 0x0125, 0x0125,
+ 0x0127, 0x0127,
+ 0x0129, 0x0129,
+ 0x012b, 0x012b,
+ 0x012d, 0x012d,
+ 0x012f, 0x012f,
+ 0x0131, 0x0131,
+ 0x0133, 0x0133,
+ 0x0135, 0x0135,
+ 0x0137, 0x0137,
+ 0x013a, 0x013a,
+ 0x013c, 0x013c,
+ 0x013e, 0x013e,
+ 0x0140, 0x0140,
+ 0x0142, 0x0142,
+ 0x0144, 0x0144,
+ 0x0146, 0x0146,
+ 0x0148, 0x0149,
+ 0x014b, 0x014b,
+ 0x014d, 0x014d,
+ 0x014f, 0x014f,
+ 0x0151, 0x0151,
+ 0x0153, 0x0153,
+ 0x0155, 0x0155,
+ 0x0157, 0x0157,
+ 0x0159, 0x0159,
+ 0x015b, 0x015b,
+ 0x015d, 0x015d,
+ 0x015f, 0x015f,
+ 0x0161, 0x0161,
+ 0x0163, 0x0163,
+ 0x0165, 0x0165,
+ 0x0167, 0x0167,
+ 0x0169, 0x0169,
+ 0x016b, 0x016b,
+ 0x016d, 0x016d,
+ 0x016f, 0x016f,
+ 0x0171, 0x0171,
+ 0x0173, 0x0173,
+ 0x0175, 0x0175,
+ 0x0177, 0x0177,
+ 0x017a, 0x017a,
+ 0x017c, 0x017c,
+ 0x017e, 0x0180,
+ 0x0183, 0x0183,
+ 0x0185, 0x0185,
+ 0x0188, 0x0188,
+ 0x018c, 0x018c,
+ 0x0192, 0x0192,
+ 0x0195, 0x0195,
+ 0x0199, 0x019a,
+ 0x019e, 0x019e,
+ 0x01a1, 0x01a1,
+ 0x01a3, 0x01a3,
+ 0x01a5, 0x01a5,
+ 0x01a8, 0x01a8,
+ 0x01ad, 0x01ad,
+ 0x01b0, 0x01b0,
+ 0x01b4, 0x01b4,
+ 0x01b6, 0x01b6,
+ 0x01b9, 0x01b9,
+ 0x01bd, 0x01bd,
+ 0x01bf, 0x01bf,
+ 0x01c4, 0x01c4,
+ 0x01c6, 0x01c7,
+ 0x01c9, 0x01ca,
+ 0x01cc, 0x01cc,
+ 0x01ce, 0x01ce,
+ 0x01d0, 0x01d0,
+ 0x01d2, 0x01d2,
+ 0x01d4, 0x01d4,
+ 0x01d6, 0x01d6,
+ 0x01d8, 0x01d8,
+ 0x01da, 0x01da,
+ 0x01dc, 0x01dd,
+ 0x01df, 0x01df,
+ 0x01e1, 0x01e1,
+ 0x01e3, 0x01e3,
+ 0x01e5, 0x01e5,
+ 0x01e7, 0x01e7,
+ 0x01e9, 0x01e9,
+ 0x01eb, 0x01eb,
+ 0x01ed, 0x01ed,
+ 0x01ef, 0x01f1,
+ 0x01f3, 0x01f3,
+ 0x01f5, 0x01f5,
+ 0x01f9, 0x01f9,
+ 0x01fb, 0x01fb,
+ 0x01fd, 0x01fd,
+ 0x01ff, 0x01ff,
+ 0x0201, 0x0201,
+ 0x0203, 0x0203,
+ 0x0205, 0x0205,
+ 0x0207, 0x0207,
+ 0x0209, 0x0209,
+ 0x020b, 0x020b,
+ 0x020d, 0x020d,
+ 0x020f, 0x020f,
+ 0x0211, 0x0211,
+ 0x0213, 0x0213,
+ 0x0215, 0x0215,
+ 0x0217, 0x0217,
+ 0x0219, 0x0219,
+ 0x021b, 0x021b,
+ 0x021d, 0x021d,
+ 0x021f, 0x021f,
+ 0x0223, 0x0223,
+ 0x0225, 0x0225,
+ 0x0227, 0x0227,
+ 0x0229, 0x0229,
+ 0x022b, 0x022b,
+ 0x022d, 0x022d,
+ 0x022f, 0x022f,
+ 0x0231, 0x0231,
+ 0x0233, 0x0233,
+ 0x023c, 0x023c,
+ 0x023f, 0x0240,
+ 0x0242, 0x0242,
+ 0x0247, 0x0247,
+ 0x0249, 0x0249,
+ 0x024b, 0x024b,
+ 0x024d, 0x024d,
+ 0x024f, 0x0254,
+ 0x0256, 0x0257,
+ 0x0259, 0x0259,
+ 0x025b, 0x025c,
+ 0x0260, 0x0261,
+ 0x0263, 0x0263,
+ 0x0265, 0x0266,
+ 0x0268, 0x026c,
+ 0x026f, 0x026f,
+ 0x0271, 0x0272,
+ 0x0275, 0x0275,
+ 0x027d, 0x027d,
+ 0x0280, 0x0280,
+ 0x0282, 0x0283,
+ 0x0287, 0x028c,
+ 0x0292, 0x0292,
+ 0x029d, 0x029e,
+ 0x0345, 0x0345,
+ 0x0371, 0x0371,
+ 0x0373, 0x0373,
+ 0x0377, 0x0377,
+ 0x037b, 0x037d,
+ 0x0390, 0x0390,
+ 0x03ac, 0x03ce,
+ 0x03d0, 0x03d1,
+ 0x03d5, 0x03d7,
+ 0x03d9, 0x03d9,
+ 0x03db, 0x03db,
+ 0x03dd, 0x03dd,
+ 0x03df, 0x03df,
+ 0x03e1, 0x03e1,
+ 0x03e3, 0x03e3,
+ 0x03e5, 0x03e5,
+ 0x03e7, 0x03e7,
+ 0x03e9, 0x03e9,
+ 0x03eb, 0x03eb,
+ 0x03ed, 0x03ed,
+ 0x03ef, 0x03f3,
+ 0x03f5, 0x03f5,
+ 0x03f8, 0x03f8,
+ 0x03fb, 0x03fb,
+ 0x0430, 0x045f,
+ 0x0461, 0x0461,
+ 0x0463, 0x0463,
+ 0x0465, 0x0465,
+ 0x0467, 0x0467,
+ 0x0469, 0x0469,
+ 0x046b, 0x046b,
+ 0x046d, 0x046d,
+ 0x046f, 0x046f,
+ 0x0471, 0x0471,
+ 0x0473, 0x0473,
+ 0x0475, 0x0475,
+ 0x0477, 0x0477,
+ 0x0479, 0x0479,
+ 0x047b, 0x047b,
+ 0x047d, 0x047d,
+ 0x047f, 0x047f,
+ 0x0481, 0x0481,
+ 0x048b, 0x048b,
+ 0x048d, 0x048d,
+ 0x048f, 0x048f,
+ 0x0491, 0x0491,
+ 0x0493, 0x0493,
+ 0x0495, 0x0495,
+ 0x0497, 0x0497,
+ 0x0499, 0x0499,
+ 0x049b, 0x049b,
+ 0x049d, 0x049d,
+ 0x049f, 0x049f,
+ 0x04a1, 0x04a1,
+ 0x04a3, 0x04a3,
+ 0x04a5, 0x04a5,
+ 0x04a7, 0x04a7,
+ 0x04a9, 0x04a9,
+ 0x04ab, 0x04ab,
+ 0x04ad, 0x04ad,
+ 0x04af, 0x04af,
+ 0x04b1, 0x04b1,
+ 0x04b3, 0x04b3,
+ 0x04b5, 0x04b5,
+ 0x04b7, 0x04b7,
+ 0x04b9, 0x04b9,
+ 0x04bb, 0x04bb,
+ 0x04bd, 0x04bd,
+ 0x04bf, 0x04bf,
+ 0x04c2, 0x04c2,
+ 0x04c4, 0x04c4,
+ 0x04c6, 0x04c6,
+ 0x04c8, 0x04c8,
+ 0x04ca, 0x04ca,
+ 0x04cc, 0x04cc,
+ 0x04ce, 0x04cf,
+ 0x04d1, 0x04d1,
+ 0x04d3, 0x04d3,
+ 0x04d5, 0x04d5,
+ 0x04d7, 0x04d7,
+ 0x04d9, 0x04d9,
+ 0x04db, 0x04db,
+ 0x04dd, 0x04dd,
+ 0x04df, 0x04df,
+ 0x04e1, 0x04e1,
+ 0x04e3, 0x04e3,
+ 0x04e5, 0x04e5,
+ 0x04e7, 0x04e7,
+ 0x04e9, 0x04e9,
+ 0x04eb, 0x04eb,
+ 0x04ed, 0x04ed,
+ 0x04ef, 0x04ef,
+ 0x04f1, 0x04f1,
+ 0x04f3, 0x04f3,
+ 0x04f5, 0x04f5,
+ 0x04f7, 0x04f7,
+ 0x04f9, 0x04f9,
+ 0x04fb, 0x04fb,
+ 0x04fd, 0x04fd,
+ 0x04ff, 0x04ff,
+ 0x0501, 0x0501,
+ 0x0503, 0x0503,
+ 0x0505, 0x0505,
+ 0x0507, 0x0507,
+ 0x0509, 0x0509,
+ 0x050b, 0x050b,
+ 0x050d, 0x050d,
+ 0x050f, 0x050f,
+ 0x0511, 0x0511,
+ 0x0513, 0x0513,
+ 0x0515, 0x0515,
+ 0x0517, 0x0517,
+ 0x0519, 0x0519,
+ 0x051b, 0x051b,
+ 0x051d, 0x051d,
+ 0x051f, 0x051f,
+ 0x0521, 0x0521,
+ 0x0523, 0x0523,
+ 0x0525, 0x0525,
+ 0x0527, 0x0527,
+ 0x0529, 0x0529,
+ 0x052b, 0x052b,
+ 0x052d, 0x052d,
+ 0x052f, 0x052f,
+ 0x0561, 0x0587,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1d79, 0x1d79,
+ 0x1d7d, 0x1d7d,
+ 0x1d8e, 0x1d8e,
+ 0x1e01, 0x1e01,
+ 0x1e03, 0x1e03,
+ 0x1e05, 0x1e05,
+ 0x1e07, 0x1e07,
+ 0x1e09, 0x1e09,
+ 0x1e0b, 0x1e0b,
+ 0x1e0d, 0x1e0d,
+ 0x1e0f, 0x1e0f,
+ 0x1e11, 0x1e11,
+ 0x1e13, 0x1e13,
+ 0x1e15, 0x1e15,
+ 0x1e17, 0x1e17,
+ 0x1e19, 0x1e19,
+ 0x1e1b, 0x1e1b,
+ 0x1e1d, 0x1e1d,
+ 0x1e1f, 0x1e1f,
+ 0x1e21, 0x1e21,
+ 0x1e23, 0x1e23,
+ 0x1e25, 0x1e25,
+ 0x1e27, 0x1e27,
+ 0x1e29, 0x1e29,
+ 0x1e2b, 0x1e2b,
+ 0x1e2d, 0x1e2d,
+ 0x1e2f, 0x1e2f,
+ 0x1e31, 0x1e31,
+ 0x1e33, 0x1e33,
+ 0x1e35, 0x1e35,
+ 0x1e37, 0x1e37,
+ 0x1e39, 0x1e39,
+ 0x1e3b, 0x1e3b,
+ 0x1e3d, 0x1e3d,
+ 0x1e3f, 0x1e3f,
+ 0x1e41, 0x1e41,
+ 0x1e43, 0x1e43,
+ 0x1e45, 0x1e45,
+ 0x1e47, 0x1e47,
+ 0x1e49, 0x1e49,
+ 0x1e4b, 0x1e4b,
+ 0x1e4d, 0x1e4d,
+ 0x1e4f, 0x1e4f,
+ 0x1e51, 0x1e51,
+ 0x1e53, 0x1e53,
+ 0x1e55, 0x1e55,
+ 0x1e57, 0x1e57,
+ 0x1e59, 0x1e59,
+ 0x1e5b, 0x1e5b,
+ 0x1e5d, 0x1e5d,
+ 0x1e5f, 0x1e5f,
+ 0x1e61, 0x1e61,
+ 0x1e63, 0x1e63,
+ 0x1e65, 0x1e65,
+ 0x1e67, 0x1e67,
+ 0x1e69, 0x1e69,
+ 0x1e6b, 0x1e6b,
+ 0x1e6d, 0x1e6d,
+ 0x1e6f, 0x1e6f,
+ 0x1e71, 0x1e71,
+ 0x1e73, 0x1e73,
+ 0x1e75, 0x1e75,
+ 0x1e77, 0x1e77,
+ 0x1e79, 0x1e79,
+ 0x1e7b, 0x1e7b,
+ 0x1e7d, 0x1e7d,
+ 0x1e7f, 0x1e7f,
+ 0x1e81, 0x1e81,
+ 0x1e83, 0x1e83,
+ 0x1e85, 0x1e85,
+ 0x1e87, 0x1e87,
+ 0x1e89, 0x1e89,
+ 0x1e8b, 0x1e8b,
+ 0x1e8d, 0x1e8d,
+ 0x1e8f, 0x1e8f,
+ 0x1e91, 0x1e91,
+ 0x1e93, 0x1e93,
+ 0x1e95, 0x1e9b,
+ 0x1ea1, 0x1ea1,
+ 0x1ea3, 0x1ea3,
+ 0x1ea5, 0x1ea5,
+ 0x1ea7, 0x1ea7,
+ 0x1ea9, 0x1ea9,
+ 0x1eab, 0x1eab,
+ 0x1ead, 0x1ead,
+ 0x1eaf, 0x1eaf,
+ 0x1eb1, 0x1eb1,
+ 0x1eb3, 0x1eb3,
+ 0x1eb5, 0x1eb5,
+ 0x1eb7, 0x1eb7,
+ 0x1eb9, 0x1eb9,
+ 0x1ebb, 0x1ebb,
+ 0x1ebd, 0x1ebd,
+ 0x1ebf, 0x1ebf,
+ 0x1ec1, 0x1ec1,
+ 0x1ec3, 0x1ec3,
+ 0x1ec5, 0x1ec5,
+ 0x1ec7, 0x1ec7,
+ 0x1ec9, 0x1ec9,
+ 0x1ecb, 0x1ecb,
+ 0x1ecd, 0x1ecd,
+ 0x1ecf, 0x1ecf,
+ 0x1ed1, 0x1ed1,
+ 0x1ed3, 0x1ed3,
+ 0x1ed5, 0x1ed5,
+ 0x1ed7, 0x1ed7,
+ 0x1ed9, 0x1ed9,
+ 0x1edb, 0x1edb,
+ 0x1edd, 0x1edd,
+ 0x1edf, 0x1edf,
+ 0x1ee1, 0x1ee1,
+ 0x1ee3, 0x1ee3,
+ 0x1ee5, 0x1ee5,
+ 0x1ee7, 0x1ee7,
+ 0x1ee9, 0x1ee9,
+ 0x1eeb, 0x1eeb,
+ 0x1eed, 0x1eed,
+ 0x1eef, 0x1eef,
+ 0x1ef1, 0x1ef1,
+ 0x1ef3, 0x1ef3,
+ 0x1ef5, 0x1ef5,
+ 0x1ef7, 0x1ef7,
+ 0x1ef9, 0x1ef9,
+ 0x1efb, 0x1efb,
+ 0x1efd, 0x1efd,
+ 0x1eff, 0x1f07,
+ 0x1f10, 0x1f15,
+ 0x1f20, 0x1f27,
+ 0x1f30, 0x1f37,
+ 0x1f40, 0x1f45,
+ 0x1f50, 0x1f57,
+ 0x1f60, 0x1f67,
+ 0x1f70, 0x1f7d,
+ 0x1f80, 0x1f87,
+ 0x1f90, 0x1f97,
+ 0x1fa0, 0x1fa7,
+ 0x1fb0, 0x1fb4,
+ 0x1fb6, 0x1fb7,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fc7,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fd7,
+ 0x1fe0, 0x1fe7,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ff7,
+ 0x214e, 0x214e,
+ 0x2170, 0x217f,
+ 0x2184, 0x2184,
+ 0x24d0, 0x24e9,
+ 0x2c30, 0x2c5f,
+ 0x2c61, 0x2c61,
+ 0x2c65, 0x2c66,
+ 0x2c68, 0x2c68,
+ 0x2c6a, 0x2c6a,
+ 0x2c6c, 0x2c6c,
+ 0x2c73, 0x2c73,
+ 0x2c76, 0x2c76,
+ 0x2c81, 0x2c81,
+ 0x2c83, 0x2c83,
+ 0x2c85, 0x2c85,
+ 0x2c87, 0x2c87,
+ 0x2c89, 0x2c89,
+ 0x2c8b, 0x2c8b,
+ 0x2c8d, 0x2c8d,
+ 0x2c8f, 0x2c8f,
+ 0x2c91, 0x2c91,
+ 0x2c93, 0x2c93,
+ 0x2c95, 0x2c95,
+ 0x2c97, 0x2c97,
+ 0x2c99, 0x2c99,
+ 0x2c9b, 0x2c9b,
+ 0x2c9d, 0x2c9d,
+ 0x2c9f, 0x2c9f,
+ 0x2ca1, 0x2ca1,
+ 0x2ca3, 0x2ca3,
+ 0x2ca5, 0x2ca5,
+ 0x2ca7, 0x2ca7,
+ 0x2ca9, 0x2ca9,
+ 0x2cab, 0x2cab,
+ 0x2cad, 0x2cad,
+ 0x2caf, 0x2caf,
+ 0x2cb1, 0x2cb1,
+ 0x2cb3, 0x2cb3,
+ 0x2cb5, 0x2cb5,
+ 0x2cb7, 0x2cb7,
+ 0x2cb9, 0x2cb9,
+ 0x2cbb, 0x2cbb,
+ 0x2cbd, 0x2cbd,
+ 0x2cbf, 0x2cbf,
+ 0x2cc1, 0x2cc1,
+ 0x2cc3, 0x2cc3,
+ 0x2cc5, 0x2cc5,
+ 0x2cc7, 0x2cc7,
+ 0x2cc9, 0x2cc9,
+ 0x2ccb, 0x2ccb,
+ 0x2ccd, 0x2ccd,
+ 0x2ccf, 0x2ccf,
+ 0x2cd1, 0x2cd1,
+ 0x2cd3, 0x2cd3,
+ 0x2cd5, 0x2cd5,
+ 0x2cd7, 0x2cd7,
+ 0x2cd9, 0x2cd9,
+ 0x2cdb, 0x2cdb,
+ 0x2cdd, 0x2cdd,
+ 0x2cdf, 0x2cdf,
+ 0x2ce1, 0x2ce1,
+ 0x2ce3, 0x2ce3,
+ 0x2cec, 0x2cec,
+ 0x2cee, 0x2cee,
+ 0x2cf3, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa641, 0xa641,
+ 0xa643, 0xa643,
+ 0xa645, 0xa645,
+ 0xa647, 0xa647,
+ 0xa649, 0xa649,
+ 0xa64b, 0xa64b,
+ 0xa64d, 0xa64d,
+ 0xa64f, 0xa64f,
+ 0xa651, 0xa651,
+ 0xa653, 0xa653,
+ 0xa655, 0xa655,
+ 0xa657, 0xa657,
+ 0xa659, 0xa659,
+ 0xa65b, 0xa65b,
+ 0xa65d, 0xa65d,
+ 0xa65f, 0xa65f,
+ 0xa661, 0xa661,
+ 0xa663, 0xa663,
+ 0xa665, 0xa665,
+ 0xa667, 0xa667,
+ 0xa669, 0xa669,
+ 0xa66b, 0xa66b,
+ 0xa66d, 0xa66d,
+ 0xa681, 0xa681,
+ 0xa683, 0xa683,
+ 0xa685, 0xa685,
+ 0xa687, 0xa687,
+ 0xa689, 0xa689,
+ 0xa68b, 0xa68b,
+ 0xa68d, 0xa68d,
+ 0xa68f, 0xa68f,
+ 0xa691, 0xa691,
+ 0xa693, 0xa693,
+ 0xa695, 0xa695,
+ 0xa697, 0xa697,
+ 0xa699, 0xa699,
+ 0xa69b, 0xa69b,
+ 0xa723, 0xa723,
+ 0xa725, 0xa725,
+ 0xa727, 0xa727,
+ 0xa729, 0xa729,
+ 0xa72b, 0xa72b,
+ 0xa72d, 0xa72d,
+ 0xa72f, 0xa72f,
+ 0xa733, 0xa733,
+ 0xa735, 0xa735,
+ 0xa737, 0xa737,
+ 0xa739, 0xa739,
+ 0xa73b, 0xa73b,
+ 0xa73d, 0xa73d,
+ 0xa73f, 0xa73f,
+ 0xa741, 0xa741,
+ 0xa743, 0xa743,
+ 0xa745, 0xa745,
+ 0xa747, 0xa747,
+ 0xa749, 0xa749,
+ 0xa74b, 0xa74b,
+ 0xa74d, 0xa74d,
+ 0xa74f, 0xa74f,
+ 0xa751, 0xa751,
+ 0xa753, 0xa753,
+ 0xa755, 0xa755,
+ 0xa757, 0xa757,
+ 0xa759, 0xa759,
+ 0xa75b, 0xa75b,
+ 0xa75d, 0xa75d,
+ 0xa75f, 0xa75f,
+ 0xa761, 0xa761,
+ 0xa763, 0xa763,
+ 0xa765, 0xa765,
+ 0xa767, 0xa767,
+ 0xa769, 0xa769,
+ 0xa76b, 0xa76b,
+ 0xa76d, 0xa76d,
+ 0xa76f, 0xa76f,
+ 0xa77a, 0xa77a,
+ 0xa77c, 0xa77c,
+ 0xa77f, 0xa77f,
+ 0xa781, 0xa781,
+ 0xa783, 0xa783,
+ 0xa785, 0xa785,
+ 0xa787, 0xa787,
+ 0xa78c, 0xa78c,
+ 0xa791, 0xa791,
+ 0xa793, 0xa794,
+ 0xa797, 0xa797,
+ 0xa799, 0xa799,
+ 0xa79b, 0xa79b,
+ 0xa79d, 0xa79d,
+ 0xa79f, 0xa79f,
+ 0xa7a1, 0xa7a1,
+ 0xa7a3, 0xa7a3,
+ 0xa7a5, 0xa7a5,
+ 0xa7a7, 0xa7a7,
+ 0xa7a9, 0xa7a9,
+ 0xa7b5, 0xa7b5,
+ 0xa7b7, 0xa7b7,
+ 0xa7b9, 0xa7b9,
+ 0xa7bb, 0xa7bb,
+ 0xa7bd, 0xa7bd,
+ 0xa7bf, 0xa7bf,
+ 0xa7c1, 0xa7c1,
+ 0xa7c3, 0xa7c3,
+ 0xa7c8, 0xa7c8,
+ 0xa7ca, 0xa7ca,
+ 0xa7d1, 0xa7d1,
+ 0xa7d7, 0xa7d7,
+ 0xa7d9, 0xa7d9,
+ 0xa7f6, 0xa7f6,
+ 0xab53, 0xab53,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff41, 0xff5a,
+ 0x10428, 0x1044f,
+ 0x104d8, 0x104fb,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10cc0, 0x10cf2,
+ 0x118c0, 0x118df,
+ 0x16e60, 0x16e7f,
+ 0x1e922, 0x1e943,
+}; /* CR_Changes_When_Titlecased */
+
+/* 'Changes_When_Casefolded': Derived Property */
+static const OnigCodePoint CR_Changes_When_Casefolded[] = {
+ 622,
+ 0x0041, 0x005a,
+ 0x00b5, 0x00b5,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00df,
+ 0x0100, 0x0100,
+ 0x0102, 0x0102,
+ 0x0104, 0x0104,
+ 0x0106, 0x0106,
+ 0x0108, 0x0108,
+ 0x010a, 0x010a,
+ 0x010c, 0x010c,
+ 0x010e, 0x010e,
+ 0x0110, 0x0110,
+ 0x0112, 0x0112,
+ 0x0114, 0x0114,
+ 0x0116, 0x0116,
+ 0x0118, 0x0118,
+ 0x011a, 0x011a,
+ 0x011c, 0x011c,
+ 0x011e, 0x011e,
+ 0x0120, 0x0120,
+ 0x0122, 0x0122,
+ 0x0124, 0x0124,
+ 0x0126, 0x0126,
+ 0x0128, 0x0128,
+ 0x012a, 0x012a,
+ 0x012c, 0x012c,
+ 0x012e, 0x012e,
+ 0x0130, 0x0130,
+ 0x0132, 0x0132,
+ 0x0134, 0x0134,
+ 0x0136, 0x0136,
+ 0x0139, 0x0139,
+ 0x013b, 0x013b,
+ 0x013d, 0x013d,
+ 0x013f, 0x013f,
+ 0x0141, 0x0141,
+ 0x0143, 0x0143,
+ 0x0145, 0x0145,
+ 0x0147, 0x0147,
+ 0x0149, 0x014a,
+ 0x014c, 0x014c,
+ 0x014e, 0x014e,
+ 0x0150, 0x0150,
+ 0x0152, 0x0152,
+ 0x0154, 0x0154,
+ 0x0156, 0x0156,
+ 0x0158, 0x0158,
+ 0x015a, 0x015a,
+ 0x015c, 0x015c,
+ 0x015e, 0x015e,
+ 0x0160, 0x0160,
+ 0x0162, 0x0162,
+ 0x0164, 0x0164,
+ 0x0166, 0x0166,
+ 0x0168, 0x0168,
+ 0x016a, 0x016a,
+ 0x016c, 0x016c,
+ 0x016e, 0x016e,
+ 0x0170, 0x0170,
+ 0x0172, 0x0172,
+ 0x0174, 0x0174,
+ 0x0176, 0x0176,
+ 0x0178, 0x0179,
+ 0x017b, 0x017b,
+ 0x017d, 0x017d,
+ 0x017f, 0x017f,
+ 0x0181, 0x0182,
+ 0x0184, 0x0184,
+ 0x0186, 0x0187,
+ 0x0189, 0x018b,
+ 0x018e, 0x0191,
+ 0x0193, 0x0194,
+ 0x0196, 0x0198,
+ 0x019c, 0x019d,
+ 0x019f, 0x01a0,
+ 0x01a2, 0x01a2,
+ 0x01a4, 0x01a4,
+ 0x01a6, 0x01a7,
+ 0x01a9, 0x01a9,
+ 0x01ac, 0x01ac,
+ 0x01ae, 0x01af,
+ 0x01b1, 0x01b3,
+ 0x01b5, 0x01b5,
+ 0x01b7, 0x01b8,
+ 0x01bc, 0x01bc,
+ 0x01c4, 0x01c5,
+ 0x01c7, 0x01c8,
+ 0x01ca, 0x01cb,
+ 0x01cd, 0x01cd,
+ 0x01cf, 0x01cf,
+ 0x01d1, 0x01d1,
+ 0x01d3, 0x01d3,
+ 0x01d5, 0x01d5,
+ 0x01d7, 0x01d7,
+ 0x01d9, 0x01d9,
+ 0x01db, 0x01db,
+ 0x01de, 0x01de,
+ 0x01e0, 0x01e0,
+ 0x01e2, 0x01e2,
+ 0x01e4, 0x01e4,
+ 0x01e6, 0x01e6,
+ 0x01e8, 0x01e8,
+ 0x01ea, 0x01ea,
+ 0x01ec, 0x01ec,
+ 0x01ee, 0x01ee,
+ 0x01f1, 0x01f2,
+ 0x01f4, 0x01f4,
+ 0x01f6, 0x01f8,
+ 0x01fa, 0x01fa,
+ 0x01fc, 0x01fc,
+ 0x01fe, 0x01fe,
+ 0x0200, 0x0200,
+ 0x0202, 0x0202,
+ 0x0204, 0x0204,
+ 0x0206, 0x0206,
+ 0x0208, 0x0208,
+ 0x020a, 0x020a,
+ 0x020c, 0x020c,
+ 0x020e, 0x020e,
+ 0x0210, 0x0210,
+ 0x0212, 0x0212,
+ 0x0214, 0x0214,
+ 0x0216, 0x0216,
+ 0x0218, 0x0218,
+ 0x021a, 0x021a,
+ 0x021c, 0x021c,
+ 0x021e, 0x021e,
+ 0x0220, 0x0220,
+ 0x0222, 0x0222,
+ 0x0224, 0x0224,
+ 0x0226, 0x0226,
+ 0x0228, 0x0228,
+ 0x022a, 0x022a,
+ 0x022c, 0x022c,
+ 0x022e, 0x022e,
+ 0x0230, 0x0230,
+ 0x0232, 0x0232,
+ 0x023a, 0x023b,
+ 0x023d, 0x023e,
+ 0x0241, 0x0241,
+ 0x0243, 0x0246,
+ 0x0248, 0x0248,
+ 0x024a, 0x024a,
+ 0x024c, 0x024c,
+ 0x024e, 0x024e,
+ 0x0345, 0x0345,
+ 0x0370, 0x0370,
+ 0x0372, 0x0372,
+ 0x0376, 0x0376,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x038f,
+ 0x0391, 0x03a1,
+ 0x03a3, 0x03ab,
+ 0x03c2, 0x03c2,
+ 0x03cf, 0x03d1,
+ 0x03d5, 0x03d6,
+ 0x03d8, 0x03d8,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03e2,
+ 0x03e4, 0x03e4,
+ 0x03e6, 0x03e6,
+ 0x03e8, 0x03e8,
+ 0x03ea, 0x03ea,
+ 0x03ec, 0x03ec,
+ 0x03ee, 0x03ee,
+ 0x03f0, 0x03f1,
+ 0x03f4, 0x03f5,
+ 0x03f7, 0x03f7,
+ 0x03f9, 0x03fa,
+ 0x03fd, 0x042f,
+ 0x0460, 0x0460,
+ 0x0462, 0x0462,
+ 0x0464, 0x0464,
+ 0x0466, 0x0466,
+ 0x0468, 0x0468,
+ 0x046a, 0x046a,
+ 0x046c, 0x046c,
+ 0x046e, 0x046e,
+ 0x0470, 0x0470,
+ 0x0472, 0x0472,
+ 0x0474, 0x0474,
+ 0x0476, 0x0476,
+ 0x0478, 0x0478,
+ 0x047a, 0x047a,
+ 0x047c, 0x047c,
+ 0x047e, 0x047e,
+ 0x0480, 0x0480,
+ 0x048a, 0x048a,
+ 0x048c, 0x048c,
+ 0x048e, 0x048e,
+ 0x0490, 0x0490,
+ 0x0492, 0x0492,
+ 0x0494, 0x0494,
+ 0x0496, 0x0496,
+ 0x0498, 0x0498,
+ 0x049a, 0x049a,
+ 0x049c, 0x049c,
+ 0x049e, 0x049e,
+ 0x04a0, 0x04a0,
+ 0x04a2, 0x04a2,
+ 0x04a4, 0x04a4,
+ 0x04a6, 0x04a6,
+ 0x04a8, 0x04a8,
+ 0x04aa, 0x04aa,
+ 0x04ac, 0x04ac,
+ 0x04ae, 0x04ae,
+ 0x04b0, 0x04b0,
+ 0x04b2, 0x04b2,
+ 0x04b4, 0x04b4,
+ 0x04b6, 0x04b6,
+ 0x04b8, 0x04b8,
+ 0x04ba, 0x04ba,
+ 0x04bc, 0x04bc,
+ 0x04be, 0x04be,
+ 0x04c0, 0x04c1,
+ 0x04c3, 0x04c3,
+ 0x04c5, 0x04c5,
+ 0x04c7, 0x04c7,
+ 0x04c9, 0x04c9,
+ 0x04cb, 0x04cb,
+ 0x04cd, 0x04cd,
+ 0x04d0, 0x04d0,
+ 0x04d2, 0x04d2,
+ 0x04d4, 0x04d4,
+ 0x04d6, 0x04d6,
+ 0x04d8, 0x04d8,
+ 0x04da, 0x04da,
+ 0x04dc, 0x04dc,
+ 0x04de, 0x04de,
+ 0x04e0, 0x04e0,
+ 0x04e2, 0x04e2,
+ 0x04e4, 0x04e4,
+ 0x04e6, 0x04e6,
+ 0x04e8, 0x04e8,
+ 0x04ea, 0x04ea,
+ 0x04ec, 0x04ec,
+ 0x04ee, 0x04ee,
+ 0x04f0, 0x04f0,
+ 0x04f2, 0x04f2,
+ 0x04f4, 0x04f4,
+ 0x04f6, 0x04f6,
+ 0x04f8, 0x04f8,
+ 0x04fa, 0x04fa,
+ 0x04fc, 0x04fc,
+ 0x04fe, 0x04fe,
+ 0x0500, 0x0500,
+ 0x0502, 0x0502,
+ 0x0504, 0x0504,
+ 0x0506, 0x0506,
+ 0x0508, 0x0508,
+ 0x050a, 0x050a,
+ 0x050c, 0x050c,
+ 0x050e, 0x050e,
+ 0x0510, 0x0510,
+ 0x0512, 0x0512,
+ 0x0514, 0x0514,
+ 0x0516, 0x0516,
+ 0x0518, 0x0518,
+ 0x051a, 0x051a,
+ 0x051c, 0x051c,
+ 0x051e, 0x051e,
+ 0x0520, 0x0520,
+ 0x0522, 0x0522,
+ 0x0524, 0x0524,
+ 0x0526, 0x0526,
+ 0x0528, 0x0528,
+ 0x052a, 0x052a,
+ 0x052c, 0x052c,
+ 0x052e, 0x052e,
+ 0x0531, 0x0556,
+ 0x0587, 0x0587,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1e00, 0x1e00,
+ 0x1e02, 0x1e02,
+ 0x1e04, 0x1e04,
+ 0x1e06, 0x1e06,
+ 0x1e08, 0x1e08,
+ 0x1e0a, 0x1e0a,
+ 0x1e0c, 0x1e0c,
+ 0x1e0e, 0x1e0e,
+ 0x1e10, 0x1e10,
+ 0x1e12, 0x1e12,
+ 0x1e14, 0x1e14,
+ 0x1e16, 0x1e16,
+ 0x1e18, 0x1e18,
+ 0x1e1a, 0x1e1a,
+ 0x1e1c, 0x1e1c,
+ 0x1e1e, 0x1e1e,
+ 0x1e20, 0x1e20,
+ 0x1e22, 0x1e22,
+ 0x1e24, 0x1e24,
+ 0x1e26, 0x1e26,
+ 0x1e28, 0x1e28,
+ 0x1e2a, 0x1e2a,
+ 0x1e2c, 0x1e2c,
+ 0x1e2e, 0x1e2e,
+ 0x1e30, 0x1e30,
+ 0x1e32, 0x1e32,
+ 0x1e34, 0x1e34,
+ 0x1e36, 0x1e36,
+ 0x1e38, 0x1e38,
+ 0x1e3a, 0x1e3a,
+ 0x1e3c, 0x1e3c,
+ 0x1e3e, 0x1e3e,
+ 0x1e40, 0x1e40,
+ 0x1e42, 0x1e42,
+ 0x1e44, 0x1e44,
+ 0x1e46, 0x1e46,
+ 0x1e48, 0x1e48,
+ 0x1e4a, 0x1e4a,
+ 0x1e4c, 0x1e4c,
+ 0x1e4e, 0x1e4e,
+ 0x1e50, 0x1e50,
+ 0x1e52, 0x1e52,
+ 0x1e54, 0x1e54,
+ 0x1e56, 0x1e56,
+ 0x1e58, 0x1e58,
+ 0x1e5a, 0x1e5a,
+ 0x1e5c, 0x1e5c,
+ 0x1e5e, 0x1e5e,
+ 0x1e60, 0x1e60,
+ 0x1e62, 0x1e62,
+ 0x1e64, 0x1e64,
+ 0x1e66, 0x1e66,
+ 0x1e68, 0x1e68,
+ 0x1e6a, 0x1e6a,
+ 0x1e6c, 0x1e6c,
+ 0x1e6e, 0x1e6e,
+ 0x1e70, 0x1e70,
+ 0x1e72, 0x1e72,
+ 0x1e74, 0x1e74,
+ 0x1e76, 0x1e76,
+ 0x1e78, 0x1e78,
+ 0x1e7a, 0x1e7a,
+ 0x1e7c, 0x1e7c,
+ 0x1e7e, 0x1e7e,
+ 0x1e80, 0x1e80,
+ 0x1e82, 0x1e82,
+ 0x1e84, 0x1e84,
+ 0x1e86, 0x1e86,
+ 0x1e88, 0x1e88,
+ 0x1e8a, 0x1e8a,
+ 0x1e8c, 0x1e8c,
+ 0x1e8e, 0x1e8e,
+ 0x1e90, 0x1e90,
+ 0x1e92, 0x1e92,
+ 0x1e94, 0x1e94,
+ 0x1e9a, 0x1e9b,
+ 0x1e9e, 0x1e9e,
+ 0x1ea0, 0x1ea0,
+ 0x1ea2, 0x1ea2,
+ 0x1ea4, 0x1ea4,
+ 0x1ea6, 0x1ea6,
+ 0x1ea8, 0x1ea8,
+ 0x1eaa, 0x1eaa,
+ 0x1eac, 0x1eac,
+ 0x1eae, 0x1eae,
+ 0x1eb0, 0x1eb0,
+ 0x1eb2, 0x1eb2,
+ 0x1eb4, 0x1eb4,
+ 0x1eb6, 0x1eb6,
+ 0x1eb8, 0x1eb8,
+ 0x1eba, 0x1eba,
+ 0x1ebc, 0x1ebc,
+ 0x1ebe, 0x1ebe,
+ 0x1ec0, 0x1ec0,
+ 0x1ec2, 0x1ec2,
+ 0x1ec4, 0x1ec4,
+ 0x1ec6, 0x1ec6,
+ 0x1ec8, 0x1ec8,
+ 0x1eca, 0x1eca,
+ 0x1ecc, 0x1ecc,
+ 0x1ece, 0x1ece,
+ 0x1ed0, 0x1ed0,
+ 0x1ed2, 0x1ed2,
+ 0x1ed4, 0x1ed4,
+ 0x1ed6, 0x1ed6,
+ 0x1ed8, 0x1ed8,
+ 0x1eda, 0x1eda,
+ 0x1edc, 0x1edc,
+ 0x1ede, 0x1ede,
+ 0x1ee0, 0x1ee0,
+ 0x1ee2, 0x1ee2,
+ 0x1ee4, 0x1ee4,
+ 0x1ee6, 0x1ee6,
+ 0x1ee8, 0x1ee8,
+ 0x1eea, 0x1eea,
+ 0x1eec, 0x1eec,
+ 0x1eee, 0x1eee,
+ 0x1ef0, 0x1ef0,
+ 0x1ef2, 0x1ef2,
+ 0x1ef4, 0x1ef4,
+ 0x1ef6, 0x1ef6,
+ 0x1ef8, 0x1ef8,
+ 0x1efa, 0x1efa,
+ 0x1efc, 0x1efc,
+ 0x1efe, 0x1efe,
+ 0x1f08, 0x1f0f,
+ 0x1f18, 0x1f1d,
+ 0x1f28, 0x1f2f,
+ 0x1f38, 0x1f3f,
+ 0x1f48, 0x1f4d,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f5f,
+ 0x1f68, 0x1f6f,
+ 0x1f80, 0x1faf,
+ 0x1fb2, 0x1fb4,
+ 0x1fb7, 0x1fbc,
+ 0x1fc2, 0x1fc4,
+ 0x1fc7, 0x1fcc,
+ 0x1fd8, 0x1fdb,
+ 0x1fe8, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff7, 0x1ffc,
+ 0x2126, 0x2126,
+ 0x212a, 0x212b,
+ 0x2132, 0x2132,
+ 0x2160, 0x216f,
+ 0x2183, 0x2183,
+ 0x24b6, 0x24cf,
+ 0x2c00, 0x2c2f,
+ 0x2c60, 0x2c60,
+ 0x2c62, 0x2c64,
+ 0x2c67, 0x2c67,
+ 0x2c69, 0x2c69,
+ 0x2c6b, 0x2c6b,
+ 0x2c6d, 0x2c70,
+ 0x2c72, 0x2c72,
+ 0x2c75, 0x2c75,
+ 0x2c7e, 0x2c80,
+ 0x2c82, 0x2c82,
+ 0x2c84, 0x2c84,
+ 0x2c86, 0x2c86,
+ 0x2c88, 0x2c88,
+ 0x2c8a, 0x2c8a,
+ 0x2c8c, 0x2c8c,
+ 0x2c8e, 0x2c8e,
+ 0x2c90, 0x2c90,
+ 0x2c92, 0x2c92,
+ 0x2c94, 0x2c94,
+ 0x2c96, 0x2c96,
+ 0x2c98, 0x2c98,
+ 0x2c9a, 0x2c9a,
+ 0x2c9c, 0x2c9c,
+ 0x2c9e, 0x2c9e,
+ 0x2ca0, 0x2ca0,
+ 0x2ca2, 0x2ca2,
+ 0x2ca4, 0x2ca4,
+ 0x2ca6, 0x2ca6,
+ 0x2ca8, 0x2ca8,
+ 0x2caa, 0x2caa,
+ 0x2cac, 0x2cac,
+ 0x2cae, 0x2cae,
+ 0x2cb0, 0x2cb0,
+ 0x2cb2, 0x2cb2,
+ 0x2cb4, 0x2cb4,
+ 0x2cb6, 0x2cb6,
+ 0x2cb8, 0x2cb8,
+ 0x2cba, 0x2cba,
+ 0x2cbc, 0x2cbc,
+ 0x2cbe, 0x2cbe,
+ 0x2cc0, 0x2cc0,
+ 0x2cc2, 0x2cc2,
+ 0x2cc4, 0x2cc4,
+ 0x2cc6, 0x2cc6,
+ 0x2cc8, 0x2cc8,
+ 0x2cca, 0x2cca,
+ 0x2ccc, 0x2ccc,
+ 0x2cce, 0x2cce,
+ 0x2cd0, 0x2cd0,
+ 0x2cd2, 0x2cd2,
+ 0x2cd4, 0x2cd4,
+ 0x2cd6, 0x2cd6,
+ 0x2cd8, 0x2cd8,
+ 0x2cda, 0x2cda,
+ 0x2cdc, 0x2cdc,
+ 0x2cde, 0x2cde,
+ 0x2ce0, 0x2ce0,
+ 0x2ce2, 0x2ce2,
+ 0x2ceb, 0x2ceb,
+ 0x2ced, 0x2ced,
+ 0x2cf2, 0x2cf2,
+ 0xa640, 0xa640,
+ 0xa642, 0xa642,
+ 0xa644, 0xa644,
+ 0xa646, 0xa646,
+ 0xa648, 0xa648,
+ 0xa64a, 0xa64a,
+ 0xa64c, 0xa64c,
+ 0xa64e, 0xa64e,
+ 0xa650, 0xa650,
+ 0xa652, 0xa652,
+ 0xa654, 0xa654,
+ 0xa656, 0xa656,
+ 0xa658, 0xa658,
+ 0xa65a, 0xa65a,
+ 0xa65c, 0xa65c,
+ 0xa65e, 0xa65e,
+ 0xa660, 0xa660,
+ 0xa662, 0xa662,
+ 0xa664, 0xa664,
+ 0xa666, 0xa666,
+ 0xa668, 0xa668,
+ 0xa66a, 0xa66a,
+ 0xa66c, 0xa66c,
+ 0xa680, 0xa680,
+ 0xa682, 0xa682,
+ 0xa684, 0xa684,
+ 0xa686, 0xa686,
+ 0xa688, 0xa688,
+ 0xa68a, 0xa68a,
+ 0xa68c, 0xa68c,
+ 0xa68e, 0xa68e,
+ 0xa690, 0xa690,
+ 0xa692, 0xa692,
+ 0xa694, 0xa694,
+ 0xa696, 0xa696,
+ 0xa698, 0xa698,
+ 0xa69a, 0xa69a,
+ 0xa722, 0xa722,
+ 0xa724, 0xa724,
+ 0xa726, 0xa726,
+ 0xa728, 0xa728,
+ 0xa72a, 0xa72a,
+ 0xa72c, 0xa72c,
+ 0xa72e, 0xa72e,
+ 0xa732, 0xa732,
+ 0xa734, 0xa734,
+ 0xa736, 0xa736,
+ 0xa738, 0xa738,
+ 0xa73a, 0xa73a,
+ 0xa73c, 0xa73c,
+ 0xa73e, 0xa73e,
+ 0xa740, 0xa740,
+ 0xa742, 0xa742,
+ 0xa744, 0xa744,
+ 0xa746, 0xa746,
+ 0xa748, 0xa748,
+ 0xa74a, 0xa74a,
+ 0xa74c, 0xa74c,
+ 0xa74e, 0xa74e,
+ 0xa750, 0xa750,
+ 0xa752, 0xa752,
+ 0xa754, 0xa754,
+ 0xa756, 0xa756,
+ 0xa758, 0xa758,
+ 0xa75a, 0xa75a,
+ 0xa75c, 0xa75c,
+ 0xa75e, 0xa75e,
+ 0xa760, 0xa760,
+ 0xa762, 0xa762,
+ 0xa764, 0xa764,
+ 0xa766, 0xa766,
+ 0xa768, 0xa768,
+ 0xa76a, 0xa76a,
+ 0xa76c, 0xa76c,
+ 0xa76e, 0xa76e,
+ 0xa779, 0xa779,
+ 0xa77b, 0xa77b,
+ 0xa77d, 0xa77e,
+ 0xa780, 0xa780,
+ 0xa782, 0xa782,
+ 0xa784, 0xa784,
+ 0xa786, 0xa786,
+ 0xa78b, 0xa78b,
+ 0xa78d, 0xa78d,
+ 0xa790, 0xa790,
+ 0xa792, 0xa792,
+ 0xa796, 0xa796,
+ 0xa798, 0xa798,
+ 0xa79a, 0xa79a,
+ 0xa79c, 0xa79c,
+ 0xa79e, 0xa79e,
+ 0xa7a0, 0xa7a0,
+ 0xa7a2, 0xa7a2,
+ 0xa7a4, 0xa7a4,
+ 0xa7a6, 0xa7a6,
+ 0xa7a8, 0xa7a8,
+ 0xa7aa, 0xa7ae,
+ 0xa7b0, 0xa7b4,
+ 0xa7b6, 0xa7b6,
+ 0xa7b8, 0xa7b8,
+ 0xa7ba, 0xa7ba,
+ 0xa7bc, 0xa7bc,
+ 0xa7be, 0xa7be,
+ 0xa7c0, 0xa7c0,
+ 0xa7c2, 0xa7c2,
+ 0xa7c4, 0xa7c7,
+ 0xa7c9, 0xa7c9,
+ 0xa7d0, 0xa7d0,
+ 0xa7d6, 0xa7d6,
+ 0xa7d8, 0xa7d8,
+ 0xa7f5, 0xa7f5,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff21, 0xff3a,
+ 0x10400, 0x10427,
+ 0x104b0, 0x104d3,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10c80, 0x10cb2,
+ 0x118a0, 0x118bf,
+ 0x16e40, 0x16e5f,
+ 0x1e900, 0x1e921,
+}; /* CR_Changes_When_Casefolded */
+
+/* 'Changes_When_Casemapped': Derived Property */
+static const OnigCodePoint CR_Changes_When_Casemapped[] = {
+ 131,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00b5, 0x00b5,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x0137,
+ 0x0139, 0x018c,
+ 0x018e, 0x019a,
+ 0x019c, 0x01a9,
+ 0x01ac, 0x01b9,
+ 0x01bc, 0x01bd,
+ 0x01bf, 0x01bf,
+ 0x01c4, 0x0220,
+ 0x0222, 0x0233,
+ 0x023a, 0x0254,
+ 0x0256, 0x0257,
+ 0x0259, 0x0259,
+ 0x025b, 0x025c,
+ 0x0260, 0x0261,
+ 0x0263, 0x0263,
+ 0x0265, 0x0266,
+ 0x0268, 0x026c,
+ 0x026f, 0x026f,
+ 0x0271, 0x0272,
+ 0x0275, 0x0275,
+ 0x027d, 0x027d,
+ 0x0280, 0x0280,
+ 0x0282, 0x0283,
+ 0x0287, 0x028c,
+ 0x0292, 0x0292,
+ 0x029d, 0x029e,
+ 0x0345, 0x0345,
+ 0x0370, 0x0373,
+ 0x0376, 0x0377,
+ 0x037b, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03d1,
+ 0x03d5, 0x03f5,
+ 0x03f7, 0x03fb,
+ 0x03fd, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0561, 0x0587,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fd, 0x10ff,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1d79, 0x1d79,
+ 0x1d7d, 0x1d7d,
+ 0x1d8e, 0x1d8e,
+ 0x1e00, 0x1e9b,
+ 0x1e9e, 0x1e9e,
+ 0x1ea0, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2126, 0x2126,
+ 0x212a, 0x212b,
+ 0x2132, 0x2132,
+ 0x214e, 0x214e,
+ 0x2160, 0x217f,
+ 0x2183, 0x2184,
+ 0x24b6, 0x24e9,
+ 0x2c00, 0x2c70,
+ 0x2c72, 0x2c73,
+ 0x2c75, 0x2c76,
+ 0x2c7e, 0x2ce3,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0xa640, 0xa66d,
+ 0xa680, 0xa69b,
+ 0xa722, 0xa72f,
+ 0xa732, 0xa76f,
+ 0xa779, 0xa787,
+ 0xa78b, 0xa78d,
+ 0xa790, 0xa794,
+ 0xa796, 0xa7ae,
+ 0xa7b0, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d6, 0xa7d9,
+ 0xa7f5, 0xa7f6,
+ 0xab53, 0xab53,
+ 0xab70, 0xabbf,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0x10400, 0x1044f,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x118a0, 0x118df,
+ 0x16e40, 0x16e7f,
+ 0x1e900, 0x1e943,
+}; /* CR_Changes_When_Casemapped */
+
+/* 'ID_Start': Derived Property */
+static const OnigCodePoint CR_ID_Start[] = {
+ 659,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0370, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0620, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06e5, 0x06e6,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x07ca, 0x07ea,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x0800, 0x0815,
+ 0x081a, 0x081a,
+ 0x0824, 0x0824,
+ 0x0828, 0x0828,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x0971, 0x0980,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0af9, 0x0af9,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bd0, 0x0bd0,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c3d,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c61,
+ 0x0c80, 0x0c80,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0cf1, 0x0cf2,
+ 0x0d04, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d3d,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d56,
+ 0x0d5f, 0x0d61,
+ 0x0d7a, 0x0d7f,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e40, 0x0e46,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f88, 0x0f8c,
+ 0x1000, 0x102a,
+ 0x103f, 0x103f,
+ 0x1050, 0x1055,
+ 0x105a, 0x105d,
+ 0x1061, 0x1061,
+ 0x1065, 0x1066,
+ 0x106e, 0x1070,
+ 0x1075, 0x1081,
+ 0x108e, 0x108e,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1711,
+ 0x171f, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1878,
+ 0x1880, 0x18a8,
+ 0x18aa, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a16,
+ 0x1a20, 0x1a54,
+ 0x1aa7, 0x1aa7,
+ 0x1b05, 0x1b33,
+ 0x1b45, 0x1b4c,
+ 0x1b83, 0x1ba0,
+ 0x1bae, 0x1baf,
+ 0x1bba, 0x1be5,
+ 0x1c00, 0x1c23,
+ 0x1c4d, 0x1c4f,
+ 0x1c5a, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2118, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3005, 0x3007,
+ 0x3021, 0x3029,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x309b, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa61f,
+ 0xa62a, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa67f, 0xa69d,
+ 0xa6a0, 0xa6ef,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xa840, 0xa873,
+ 0xa882, 0xa8b3,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa8fe,
+ 0xa90a, 0xa925,
+ 0xa930, 0xa946,
+ 0xa960, 0xa97c,
+ 0xa984, 0xa9b2,
+ 0xa9cf, 0xa9cf,
+ 0xa9e0, 0xa9e4,
+ 0xa9e6, 0xa9ef,
+ 0xa9fa, 0xa9fe,
+ 0xaa00, 0xaa28,
+ 0xaa40, 0xaa42,
+ 0xaa44, 0xaa4b,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaa7a,
+ 0xaa7e, 0xaaaf,
+ 0xaab1, 0xaab1,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaabd,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaea,
+ 0xaaf2, 0xaaf4,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabe2,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x10375,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d23,
+ 0x10e80, 0x10ea9,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11003, 0x11037,
+ 0x11071, 0x11072,
+ 0x11075, 0x11075,
+ 0x11083, 0x110af,
+ 0x110d0, 0x110e8,
+ 0x11103, 0x11126,
+ 0x11144, 0x11144,
+ 0x11147, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11183, 0x111b2,
+ 0x111c1, 0x111c4,
+ 0x111da, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x1122b,
+ 0x1123f, 0x11240,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112de,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x1133d,
+ 0x11350, 0x11350,
+ 0x1135d, 0x11361,
+ 0x11400, 0x11434,
+ 0x11447, 0x1144a,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114af,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x11580, 0x115ae,
+ 0x115d8, 0x115db,
+ 0x11600, 0x1162f,
+ 0x11644, 0x11644,
+ 0x11680, 0x116aa,
+ 0x116b8, 0x116b8,
+ 0x11700, 0x1171a,
+ 0x11740, 0x11746,
+ 0x11800, 0x1182b,
+ 0x118a0, 0x118df,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x1192f,
+ 0x1193f, 0x1193f,
+ 0x11941, 0x11941,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d0,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e3,
+ 0x11a00, 0x11a00,
+ 0x11a0b, 0x11a32,
+ 0x11a3a, 0x11a3a,
+ 0x11a50, 0x11a50,
+ 0x11a5c, 0x11a89,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c2e,
+ 0x11c40, 0x11c40,
+ 0x11c72, 0x11c8f,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d30,
+ 0x11d46, 0x11d46,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d89,
+ 0x11d98, 0x11d98,
+ 0x11ee0, 0x11ef2,
+ 0x11f02, 0x11f02,
+ 0x11f04, 0x11f10,
+ 0x11f12, 0x11f33,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a70, 0x16abe,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b40, 0x16b43,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f50, 0x16f50,
+ 0x16f93, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e900, 0x1e943,
+ 0x1e94b, 0x1e94b,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_ID_Start */
+
+/* 'ID_Continue': Derived Property */
+static const OnigCodePoint CR_ID_Continue[] = {
+ 768,
+ 0x0030, 0x0039,
+ 0x0041, 0x005a,
+ 0x005f, 0x005f,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00b7, 0x00b7,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0300, 0x0374,
+ 0x0376, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x0483, 0x0487,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0610, 0x061a,
+ 0x0620, 0x0669,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06df, 0x06e8,
+ 0x06ea, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x07fd, 0x07fd,
+ 0x0800, 0x082d,
+ 0x0840, 0x085b,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x0898, 0x08e1,
+ 0x08e3, 0x0963,
+ 0x0966, 0x096f,
+ 0x0971, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b6f,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bef,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c80, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d54, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d66, 0x0d6f,
+ 0x0d7a, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e4e,
+ 0x0e50, 0x0e59,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f18, 0x0f19,
+ 0x0f20, 0x0f29,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x1000, 0x1049,
+ 0x1050, 0x109d,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x135f,
+ 0x1369, 0x1371,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1734,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17d3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x180b, 0x180d,
+ 0x180f, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1946, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x1a00, 0x1a1b,
+ 0x1a20, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa7, 0x1aa7,
+ 0x1ab0, 0x1abd,
+ 0x1abf, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b59,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1bf3,
+ 0x1c00, 0x1c37,
+ 0x1c40, 0x1c49,
+ 0x1c4d, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x203f, 0x2040,
+ 0x2054, 0x2054,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20f0,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2118, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2dff,
+ 0x3005, 0x3007,
+ 0x3021, 0x302f,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x3099, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa62b,
+ 0xa640, 0xa66f,
+ 0xa674, 0xa67d,
+ 0xa67f, 0xa6f1,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa827,
+ 0xa82c, 0xa82c,
+ 0xa840, 0xa873,
+ 0xa880, 0xa8c5,
+ 0xa8d0, 0xa8d9,
+ 0xa8e0, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa92d,
+ 0xa930, 0xa953,
+ 0xa960, 0xa97c,
+ 0xa980, 0xa9c0,
+ 0xa9cf, 0xa9d9,
+ 0xa9e0, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaef,
+ 0xaaf2, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabea,
+ 0xabec, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0xfe33, 0xfe34,
+ 0xfe4d, 0xfe4f,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff10, 0xff19,
+ 0xff21, 0xff3a,
+ 0xff3f, 0xff3f,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x101fd, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102e0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae6,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10eac,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f50,
+ 0x10f70, 0x10f85,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11046,
+ 0x11066, 0x11075,
+ 0x1107f, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x1113f,
+ 0x11144, 0x11147,
+ 0x11150, 0x11173,
+ 0x11176, 0x11176,
+ 0x11180, 0x111c4,
+ 0x111c9, 0x111cc,
+ 0x111ce, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x11237,
+ 0x1123e, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1144a,
+ 0x11450, 0x11459,
+ 0x1145e, 0x11461,
+ 0x11480, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115c0,
+ 0x115d8, 0x115dd,
+ 0x11600, 0x11640,
+ 0x11644, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11739,
+ 0x11740, 0x11746,
+ 0x11800, 0x1183a,
+ 0x118a0, 0x118e9,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11943,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e1,
+ 0x119e3, 0x119e4,
+ 0x11a00, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a50, 0x11a99,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c40,
+ 0x11c50, 0x11c59,
+ 0x11c72, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef6,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f42,
+ 0x11f50, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13440, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a70, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af4,
+ 0x16b00, 0x16b36,
+ 0x16b40, 0x16b43,
+ 0x16b50, 0x16b59,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0100, 0xe01ef,
+}; /* CR_ID_Continue */
+
+/* 'XID_Start': Derived Property */
+static const OnigCodePoint CR_XID_Start[] = {
+ 666,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0370, 0x0374,
+ 0x0376, 0x0377,
+ 0x037b, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0620, 0x064a,
+ 0x066e, 0x066f,
+ 0x0671, 0x06d3,
+ 0x06d5, 0x06d5,
+ 0x06e5, 0x06e6,
+ 0x06ee, 0x06ef,
+ 0x06fa, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x07ca, 0x07ea,
+ 0x07f4, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x0800, 0x0815,
+ 0x081a, 0x081a,
+ 0x0824, 0x0824,
+ 0x0828, 0x0828,
+ 0x0840, 0x0858,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x0904, 0x0939,
+ 0x093d, 0x093d,
+ 0x0950, 0x0950,
+ 0x0958, 0x0961,
+ 0x0971, 0x0980,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09f0, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a72, 0x0a74,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0abd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0af9, 0x0af9,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b71, 0x0b71,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bd0, 0x0bd0,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c3d,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c61,
+ 0x0c80, 0x0c80,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbd,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0cf1, 0x0cf2,
+ 0x0d04, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d3d,
+ 0x0d4e, 0x0d4e,
+ 0x0d54, 0x0d56,
+ 0x0d5f, 0x0d61,
+ 0x0d7a, 0x0d7f,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e32,
+ 0x0e40, 0x0e46,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb0,
+ 0x0eb2, 0x0eb2,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f40, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f88, 0x0f8c,
+ 0x1000, 0x102a,
+ 0x103f, 0x103f,
+ 0x1050, 0x1055,
+ 0x105a, 0x105d,
+ 0x1061, 0x1061,
+ 0x1065, 0x1066,
+ 0x106e, 0x1070,
+ 0x1075, 0x1081,
+ 0x108e, 0x108e,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1711,
+ 0x171f, 0x1731,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dc,
+ 0x1820, 0x1878,
+ 0x1880, 0x18a8,
+ 0x18aa, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x1a00, 0x1a16,
+ 0x1a20, 0x1a54,
+ 0x1aa7, 0x1aa7,
+ 0x1b05, 0x1b33,
+ 0x1b45, 0x1b4c,
+ 0x1b83, 0x1ba0,
+ 0x1bae, 0x1baf,
+ 0x1bba, 0x1be5,
+ 0x1c00, 0x1c23,
+ 0x1c4d, 0x1c4f,
+ 0x1c5a, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf6,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2118, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x3005, 0x3007,
+ 0x3021, 0x3029,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa61f,
+ 0xa62a, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa67f, 0xa69d,
+ 0xa6a0, 0xa6ef,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa822,
+ 0xa840, 0xa873,
+ 0xa882, 0xa8b3,
+ 0xa8f2, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa8fe,
+ 0xa90a, 0xa925,
+ 0xa930, 0xa946,
+ 0xa960, 0xa97c,
+ 0xa984, 0xa9b2,
+ 0xa9cf, 0xa9cf,
+ 0xa9e0, 0xa9e4,
+ 0xa9e6, 0xa9ef,
+ 0xa9fa, 0xa9fe,
+ 0xaa00, 0xaa28,
+ 0xaa40, 0xaa42,
+ 0xaa44, 0xaa4b,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaa7a,
+ 0xaa7e, 0xaaaf,
+ 0xaab1, 0xaab1,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaabd,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaea,
+ 0xaaf2, 0xaaf4,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabe2,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfc5d,
+ 0xfc64, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdf9,
+ 0xfe71, 0xfe71,
+ 0xfe73, 0xfe73,
+ 0xfe77, 0xfe77,
+ 0xfe79, 0xfe79,
+ 0xfe7b, 0xfe7b,
+ 0xfe7d, 0xfe7d,
+ 0xfe7f, 0xfefc,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0xff66, 0xff9d,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x10375,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae4,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d23,
+ 0x10e80, 0x10ea9,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f70, 0x10f81,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11003, 0x11037,
+ 0x11071, 0x11072,
+ 0x11075, 0x11075,
+ 0x11083, 0x110af,
+ 0x110d0, 0x110e8,
+ 0x11103, 0x11126,
+ 0x11144, 0x11144,
+ 0x11147, 0x11147,
+ 0x11150, 0x11172,
+ 0x11176, 0x11176,
+ 0x11183, 0x111b2,
+ 0x111c1, 0x111c4,
+ 0x111da, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x1122b,
+ 0x1123f, 0x11240,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112de,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x1133d,
+ 0x11350, 0x11350,
+ 0x1135d, 0x11361,
+ 0x11400, 0x11434,
+ 0x11447, 0x1144a,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114af,
+ 0x114c4, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x11580, 0x115ae,
+ 0x115d8, 0x115db,
+ 0x11600, 0x1162f,
+ 0x11644, 0x11644,
+ 0x11680, 0x116aa,
+ 0x116b8, 0x116b8,
+ 0x11700, 0x1171a,
+ 0x11740, 0x11746,
+ 0x11800, 0x1182b,
+ 0x118a0, 0x118df,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x1192f,
+ 0x1193f, 0x1193f,
+ 0x11941, 0x11941,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d0,
+ 0x119e1, 0x119e1,
+ 0x119e3, 0x119e3,
+ 0x11a00, 0x11a00,
+ 0x11a0b, 0x11a32,
+ 0x11a3a, 0x11a3a,
+ 0x11a50, 0x11a50,
+ 0x11a5c, 0x11a89,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c2e,
+ 0x11c40, 0x11c40,
+ 0x11c72, 0x11c8f,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d30,
+ 0x11d46, 0x11d46,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d89,
+ 0x11d98, 0x11d98,
+ 0x11ee0, 0x11ef2,
+ 0x11f02, 0x11f02,
+ 0x11f04, 0x11f10,
+ 0x11f12, 0x11f33,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a70, 0x16abe,
+ 0x16ad0, 0x16aed,
+ 0x16b00, 0x16b2f,
+ 0x16b40, 0x16b43,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f50, 0x16f50,
+ 0x16f93, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e900, 0x1e943,
+ 0x1e94b, 0x1e94b,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_XID_Start */
+
+/* 'XID_Continue': Derived Property */
+static const OnigCodePoint CR_XID_Continue[] = {
+ 775,
+ 0x0030, 0x0039,
+ 0x0041, 0x005a,
+ 0x005f, 0x005f,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00b5, 0x00b5,
+ 0x00b7, 0x00b7,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02c1,
+ 0x02c6, 0x02d1,
+ 0x02e0, 0x02e4,
+ 0x02ec, 0x02ec,
+ 0x02ee, 0x02ee,
+ 0x0300, 0x0374,
+ 0x0376, 0x0377,
+ 0x037b, 0x037d,
+ 0x037f, 0x037f,
+ 0x0386, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03f5,
+ 0x03f7, 0x0481,
+ 0x0483, 0x0487,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x0559,
+ 0x0560, 0x0588,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f2,
+ 0x0610, 0x061a,
+ 0x0620, 0x0669,
+ 0x066e, 0x06d3,
+ 0x06d5, 0x06dc,
+ 0x06df, 0x06e8,
+ 0x06ea, 0x06fc,
+ 0x06ff, 0x06ff,
+ 0x0710, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07f5,
+ 0x07fa, 0x07fa,
+ 0x07fd, 0x07fd,
+ 0x0800, 0x082d,
+ 0x0840, 0x085b,
+ 0x0860, 0x086a,
+ 0x0870, 0x0887,
+ 0x0889, 0x088e,
+ 0x0898, 0x08e1,
+ 0x08e3, 0x0963,
+ 0x0966, 0x096f,
+ 0x0971, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09f1,
+ 0x09fc, 0x09fc,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b6f,
+ 0x0b71, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bef,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c80, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d54, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d66, 0x0d6f,
+ 0x0d7a, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df3,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e4e,
+ 0x0e50, 0x0e59,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f00,
+ 0x0f18, 0x0f19,
+ 0x0f20, 0x0f29,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f84,
+ 0x0f86, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x1000, 0x1049,
+ 0x1050, 0x109d,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x135f,
+ 0x1369, 0x1371,
+ 0x1380, 0x138f,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1401, 0x166c,
+ 0x166f, 0x167f,
+ 0x1681, 0x169a,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1734,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17d3,
+ 0x17d7, 0x17d7,
+ 0x17dc, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x180b, 0x180d,
+ 0x180f, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1946, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x1a00, 0x1a1b,
+ 0x1a20, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa7, 0x1aa7,
+ 0x1ab0, 0x1abd,
+ 0x1abf, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b59,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1bf3,
+ 0x1c00, 0x1c37,
+ 0x1c40, 0x1c49,
+ 0x1c4d, 0x1c7d,
+ 0x1c80, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fbc,
+ 0x1fbe, 0x1fbe,
+ 0x1fc2, 0x1fc4,
+ 0x1fc6, 0x1fcc,
+ 0x1fd0, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fe0, 0x1fec,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffc,
+ 0x203f, 0x2040,
+ 0x2054, 0x2054,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20f0,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2118, 0x211d,
+ 0x2124, 0x2124,
+ 0x2126, 0x2126,
+ 0x2128, 0x2128,
+ 0x212a, 0x2139,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x2c00, 0x2ce4,
+ 0x2ceb, 0x2cf3,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d6f,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2dff,
+ 0x3005, 0x3007,
+ 0x3021, 0x302f,
+ 0x3031, 0x3035,
+ 0x3038, 0x303c,
+ 0x3041, 0x3096,
+ 0x3099, 0x309a,
+ 0x309d, 0x309f,
+ 0x30a1, 0x30fa,
+ 0x30fc, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x31a0, 0x31bf,
+ 0x31f0, 0x31ff,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0xa48c,
+ 0xa4d0, 0xa4fd,
+ 0xa500, 0xa60c,
+ 0xa610, 0xa62b,
+ 0xa640, 0xa66f,
+ 0xa674, 0xa67d,
+ 0xa67f, 0xa6f1,
+ 0xa717, 0xa71f,
+ 0xa722, 0xa788,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa827,
+ 0xa82c, 0xa82c,
+ 0xa840, 0xa873,
+ 0xa880, 0xa8c5,
+ 0xa8d0, 0xa8d9,
+ 0xa8e0, 0xa8f7,
+ 0xa8fb, 0xa8fb,
+ 0xa8fd, 0xa92d,
+ 0xa930, 0xa953,
+ 0xa960, 0xa97c,
+ 0xa980, 0xa9c0,
+ 0xa9cf, 0xa9d9,
+ 0xa9e0, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa60, 0xaa76,
+ 0xaa7a, 0xaac2,
+ 0xaadb, 0xaadd,
+ 0xaae0, 0xaaef,
+ 0xaaf2, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab69,
+ 0xab70, 0xabea,
+ 0xabec, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb28,
+ 0xfb2a, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfc5d,
+ 0xfc64, 0xfd3d,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdf9,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0xfe33, 0xfe34,
+ 0xfe4d, 0xfe4f,
+ 0xfe71, 0xfe71,
+ 0xfe73, 0xfe73,
+ 0xfe77, 0xfe77,
+ 0xfe79, 0xfe79,
+ 0xfe7b, 0xfe7b,
+ 0xfe7d, 0xfe7d,
+ 0xfe7f, 0xfefc,
+ 0xff10, 0xff19,
+ 0xff21, 0xff3a,
+ 0xff3f, 0xff3f,
+ 0xff41, 0xff5a,
+ 0xff66, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10140, 0x10174,
+ 0x101fd, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102e0,
+ 0x10300, 0x1031f,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103cf,
+ 0x103d1, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10860, 0x10876,
+ 0x10880, 0x1089e,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x10900, 0x10915,
+ 0x10920, 0x10939,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10a60, 0x10a7c,
+ 0x10a80, 0x10a9c,
+ 0x10ac0, 0x10ac7,
+ 0x10ac9, 0x10ae6,
+ 0x10b00, 0x10b35,
+ 0x10b40, 0x10b55,
+ 0x10b60, 0x10b72,
+ 0x10b80, 0x10b91,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10d00, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10eac,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f1c,
+ 0x10f27, 0x10f27,
+ 0x10f30, 0x10f50,
+ 0x10f70, 0x10f85,
+ 0x10fb0, 0x10fc4,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11046,
+ 0x11066, 0x11075,
+ 0x1107f, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x1113f,
+ 0x11144, 0x11147,
+ 0x11150, 0x11173,
+ 0x11176, 0x11176,
+ 0x11180, 0x111c4,
+ 0x111c9, 0x111cc,
+ 0x111ce, 0x111da,
+ 0x111dc, 0x111dc,
+ 0x11200, 0x11211,
+ 0x11213, 0x11237,
+ 0x1123e, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a8,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1144a,
+ 0x11450, 0x11459,
+ 0x1145e, 0x11461,
+ 0x11480, 0x114c5,
+ 0x114c7, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115c0,
+ 0x115d8, 0x115dd,
+ 0x11600, 0x11640,
+ 0x11644, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11739,
+ 0x11740, 0x11746,
+ 0x11800, 0x1183a,
+ 0x118a0, 0x118e9,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11943,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e1,
+ 0x119e3, 0x119e4,
+ 0x11a00, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a50, 0x11a99,
+ 0x11a9d, 0x11a9d,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c40,
+ 0x11c50, 0x11c59,
+ 0x11c72, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef6,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f42,
+ 0x11f50, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff0,
+ 0x13000, 0x1342f,
+ 0x13440, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a70, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af4,
+ 0x16b00, 0x16b36,
+ 0x16b40, 0x16b43,
+ 0x16b50, 0x16b59,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e7f,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14e,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+ 0xe0100, 0xe01ef,
+}; /* CR_XID_Continue */
+
+/* 'Default_Ignorable_Code_Point': Derived Property */
+static const OnigCodePoint CR_Default_Ignorable_Code_Point[] = {
+ 17,
+ 0x00ad, 0x00ad,
+ 0x034f, 0x034f,
+ 0x061c, 0x061c,
+ 0x115f, 0x1160,
+ 0x17b4, 0x17b5,
+ 0x180b, 0x180f,
+ 0x200b, 0x200f,
+ 0x202a, 0x202e,
+ 0x2060, 0x206f,
+ 0x3164, 0x3164,
+ 0xfe00, 0xfe0f,
+ 0xfeff, 0xfeff,
+ 0xffa0, 0xffa0,
+ 0xfff0, 0xfff8,
+ 0x1bca0, 0x1bca3,
+ 0x1d173, 0x1d17a,
+ 0xe0000, 0xe0fff,
+}; /* CR_Default_Ignorable_Code_Point */
+
+/* 'Grapheme_Extend': Derived Property */
+static const OnigCodePoint CR_Grapheme_Extend[] = {
+ 363,
+ 0x0300, 0x036f,
+ 0x0483, 0x0489,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x061a,
+ 0x064b, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06df, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f3,
+ 0x07fd, 0x07fd,
+ 0x0816, 0x0819,
+ 0x081b, 0x0823,
+ 0x0825, 0x0827,
+ 0x0829, 0x082d,
+ 0x0859, 0x085b,
+ 0x0898, 0x089f,
+ 0x08ca, 0x08e1,
+ 0x08e3, 0x0902,
+ 0x093a, 0x093a,
+ 0x093c, 0x093c,
+ 0x0941, 0x0948,
+ 0x094d, 0x094d,
+ 0x0951, 0x0957,
+ 0x0962, 0x0963,
+ 0x0981, 0x0981,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09be,
+ 0x09c1, 0x09c4,
+ 0x09cd, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09e2, 0x09e3,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a02,
+ 0x0a3c, 0x0a3c,
+ 0x0a41, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a82,
+ 0x0abc, 0x0abc,
+ 0x0ac1, 0x0ac5,
+ 0x0ac7, 0x0ac8,
+ 0x0acd, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0aff,
+ 0x0b01, 0x0b01,
+ 0x0b3c, 0x0b3c,
+ 0x0b3e, 0x0b3f,
+ 0x0b41, 0x0b44,
+ 0x0b4d, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bbe, 0x0bbe,
+ 0x0bc0, 0x0bc0,
+ 0x0bcd, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0c00, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c3c, 0x0c3c,
+ 0x0c3e, 0x0c40,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c81,
+ 0x0cbc, 0x0cbc,
+ 0x0cbf, 0x0cbf,
+ 0x0cc2, 0x0cc2,
+ 0x0cc6, 0x0cc6,
+ 0x0ccc, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0ce2, 0x0ce3,
+ 0x0d00, 0x0d01,
+ 0x0d3b, 0x0d3c,
+ 0x0d3e, 0x0d3e,
+ 0x0d41, 0x0d44,
+ 0x0d4d, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d81,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dcf,
+ 0x0dd2, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0ddf, 0x0ddf,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0ebc,
+ 0x0ec8, 0x0ece,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f71, 0x0f7e,
+ 0x0f80, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102d, 0x1030,
+ 0x1032, 0x1037,
+ 0x1039, 0x103a,
+ 0x103d, 0x103e,
+ 0x1058, 0x1059,
+ 0x105e, 0x1060,
+ 0x1071, 0x1074,
+ 0x1082, 0x1082,
+ 0x1085, 0x1086,
+ 0x108d, 0x108d,
+ 0x109d, 0x109d,
+ 0x135d, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1733,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b4, 0x17b5,
+ 0x17b7, 0x17bd,
+ 0x17c6, 0x17c6,
+ 0x17c9, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x180f, 0x180f,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x1922,
+ 0x1927, 0x1928,
+ 0x1932, 0x1932,
+ 0x1939, 0x193b,
+ 0x1a17, 0x1a18,
+ 0x1a1b, 0x1a1b,
+ 0x1a56, 0x1a56,
+ 0x1a58, 0x1a5e,
+ 0x1a60, 0x1a60,
+ 0x1a62, 0x1a62,
+ 0x1a65, 0x1a6c,
+ 0x1a73, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b03,
+ 0x1b34, 0x1b3a,
+ 0x1b3c, 0x1b3c,
+ 0x1b42, 0x1b42,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1b81,
+ 0x1ba2, 0x1ba5,
+ 0x1ba8, 0x1ba9,
+ 0x1bab, 0x1bad,
+ 0x1be6, 0x1be6,
+ 0x1be8, 0x1be9,
+ 0x1bed, 0x1bed,
+ 0x1bef, 0x1bf1,
+ 0x1c2c, 0x1c33,
+ 0x1c36, 0x1c37,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce0,
+ 0x1ce2, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf8, 0x1cf9,
+ 0x1dc0, 0x1dff,
+ 0x200c, 0x200c,
+ 0x20d0, 0x20f0,
+ 0x2cef, 0x2cf1,
+ 0x2d7f, 0x2d7f,
+ 0x2de0, 0x2dff,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xa66f, 0xa672,
+ 0xa674, 0xa67d,
+ 0xa69e, 0xa69f,
+ 0xa6f0, 0xa6f1,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa825, 0xa826,
+ 0xa82c, 0xa82c,
+ 0xa8c4, 0xa8c5,
+ 0xa8e0, 0xa8f1,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92d,
+ 0xa947, 0xa951,
+ 0xa980, 0xa982,
+ 0xa9b3, 0xa9b3,
+ 0xa9b6, 0xa9b9,
+ 0xa9bc, 0xa9bd,
+ 0xa9e5, 0xa9e5,
+ 0xaa29, 0xaa2e,
+ 0xaa31, 0xaa32,
+ 0xaa35, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4c,
+ 0xaa7c, 0xaa7c,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabf,
+ 0xaac1, 0xaac1,
+ 0xaaec, 0xaaed,
+ 0xaaf6, 0xaaf6,
+ 0xabe5, 0xabe5,
+ 0xabe8, 0xabe8,
+ 0xabed, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0xff9e, 0xff9f,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x10376, 0x1037a,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10ae5, 0x10ae6,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11001, 0x11001,
+ 0x11038, 0x11046,
+ 0x11070, 0x11070,
+ 0x11073, 0x11074,
+ 0x1107f, 0x11081,
+ 0x110b3, 0x110b6,
+ 0x110b9, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x11100, 0x11102,
+ 0x11127, 0x1112b,
+ 0x1112d, 0x11134,
+ 0x11173, 0x11173,
+ 0x11180, 0x11181,
+ 0x111b6, 0x111be,
+ 0x111c9, 0x111cc,
+ 0x111cf, 0x111cf,
+ 0x1122f, 0x11231,
+ 0x11234, 0x11234,
+ 0x11236, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112df,
+ 0x112e3, 0x112ea,
+ 0x11300, 0x11301,
+ 0x1133b, 0x1133c,
+ 0x1133e, 0x1133e,
+ 0x11340, 0x11340,
+ 0x11357, 0x11357,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11438, 0x1143f,
+ 0x11442, 0x11444,
+ 0x11446, 0x11446,
+ 0x1145e, 0x1145e,
+ 0x114b0, 0x114b0,
+ 0x114b3, 0x114b8,
+ 0x114ba, 0x114ba,
+ 0x114bd, 0x114bd,
+ 0x114bf, 0x114c0,
+ 0x114c2, 0x114c3,
+ 0x115af, 0x115af,
+ 0x115b2, 0x115b5,
+ 0x115bc, 0x115bd,
+ 0x115bf, 0x115c0,
+ 0x115dc, 0x115dd,
+ 0x11633, 0x1163a,
+ 0x1163d, 0x1163d,
+ 0x1163f, 0x11640,
+ 0x116ab, 0x116ab,
+ 0x116ad, 0x116ad,
+ 0x116b0, 0x116b5,
+ 0x116b7, 0x116b7,
+ 0x1171d, 0x1171f,
+ 0x11722, 0x11725,
+ 0x11727, 0x1172b,
+ 0x1182f, 0x11837,
+ 0x11839, 0x1183a,
+ 0x11930, 0x11930,
+ 0x1193b, 0x1193c,
+ 0x1193e, 0x1193e,
+ 0x11943, 0x11943,
+ 0x119d4, 0x119d7,
+ 0x119da, 0x119db,
+ 0x119e0, 0x119e0,
+ 0x11a01, 0x11a0a,
+ 0x11a33, 0x11a38,
+ 0x11a3b, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a51, 0x11a56,
+ 0x11a59, 0x11a5b,
+ 0x11a8a, 0x11a96,
+ 0x11a98, 0x11a99,
+ 0x11c30, 0x11c36,
+ 0x11c38, 0x11c3d,
+ 0x11c3f, 0x11c3f,
+ 0x11c92, 0x11ca7,
+ 0x11caa, 0x11cb0,
+ 0x11cb2, 0x11cb3,
+ 0x11cb5, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d45,
+ 0x11d47, 0x11d47,
+ 0x11d90, 0x11d91,
+ 0x11d95, 0x11d95,
+ 0x11d97, 0x11d97,
+ 0x11ef3, 0x11ef4,
+ 0x11f00, 0x11f01,
+ 0x11f36, 0x11f3a,
+ 0x11f40, 0x11f40,
+ 0x11f42, 0x11f42,
+ 0x13440, 0x13440,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16f4f, 0x16f4f,
+ 0x16f8f, 0x16f92,
+ 0x16fe4, 0x16fe4,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d165,
+ 0x1d167, 0x1d169,
+ 0x1d16e, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e08f, 0x1e08f,
+ 0x1e130, 0x1e136,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e4ec, 0x1e4ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e94a,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+}; /* CR_Grapheme_Extend */
+
+/* 'Grapheme_Base': Derived Property */
+static const OnigCodePoint CR_Grapheme_Base[] = {
+ 875,
+ 0x0020, 0x007e,
+ 0x00a0, 0x00ac,
+ 0x00ae, 0x02ff,
+ 0x0370, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0482,
+ 0x048a, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x05be, 0x05be,
+ 0x05c0, 0x05c0,
+ 0x05c3, 0x05c3,
+ 0x05c6, 0x05c6,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0606, 0x060f,
+ 0x061b, 0x061b,
+ 0x061d, 0x064a,
+ 0x0660, 0x066f,
+ 0x0671, 0x06d5,
+ 0x06de, 0x06de,
+ 0x06e5, 0x06e6,
+ 0x06e9, 0x06e9,
+ 0x06ee, 0x070d,
+ 0x0710, 0x0710,
+ 0x0712, 0x072f,
+ 0x074d, 0x07a5,
+ 0x07b1, 0x07b1,
+ 0x07c0, 0x07ea,
+ 0x07f4, 0x07fa,
+ 0x07fe, 0x0815,
+ 0x081a, 0x081a,
+ 0x0824, 0x0824,
+ 0x0828, 0x0828,
+ 0x0830, 0x083e,
+ 0x0840, 0x0858,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x08a0, 0x08c9,
+ 0x0903, 0x0939,
+ 0x093b, 0x093b,
+ 0x093d, 0x0940,
+ 0x0949, 0x094c,
+ 0x094e, 0x0950,
+ 0x0958, 0x0961,
+ 0x0964, 0x0980,
+ 0x0982, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bd, 0x09bd,
+ 0x09bf, 0x09c0,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09ce, 0x09ce,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e1,
+ 0x09e6, 0x09fd,
+ 0x0a03, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3e, 0x0a40,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a6f,
+ 0x0a72, 0x0a74,
+ 0x0a76, 0x0a76,
+ 0x0a83, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abd, 0x0ac0,
+ 0x0ac9, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae1,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0af9,
+ 0x0b02, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3d, 0x0b3d,
+ 0x0b40, 0x0b40,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b77,
+ 0x0b83, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbf, 0x0bbf,
+ 0x0bc1, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd0, 0x0bd0,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c3d,
+ 0x0c41, 0x0c44,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c80,
+ 0x0c82, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbd, 0x0cbe,
+ 0x0cc0, 0x0cc1,
+ 0x0cc3, 0x0cc4,
+ 0x0cc7, 0x0cc8,
+ 0x0cca, 0x0ccb,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d02, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d3d,
+ 0x0d3f, 0x0d40,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d4e, 0x0d4f,
+ 0x0d54, 0x0d56,
+ 0x0d58, 0x0d61,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dd0, 0x0dd1,
+ 0x0dd8, 0x0dde,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e30,
+ 0x0e32, 0x0e33,
+ 0x0e3f, 0x0e46,
+ 0x0e4f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0eb0,
+ 0x0eb2, 0x0eb3,
+ 0x0ebd, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f17,
+ 0x0f1a, 0x0f34,
+ 0x0f36, 0x0f36,
+ 0x0f38, 0x0f38,
+ 0x0f3a, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f7f, 0x0f7f,
+ 0x0f85, 0x0f85,
+ 0x0f88, 0x0f8c,
+ 0x0fbe, 0x0fc5,
+ 0x0fc7, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x102c,
+ 0x1031, 0x1031,
+ 0x1038, 0x1038,
+ 0x103b, 0x103c,
+ 0x103f, 0x1057,
+ 0x105a, 0x105d,
+ 0x1061, 0x1070,
+ 0x1075, 0x1081,
+ 0x1083, 0x1084,
+ 0x1087, 0x108c,
+ 0x108e, 0x109c,
+ 0x109e, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x1360, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1711,
+ 0x1715, 0x1715,
+ 0x171f, 0x1731,
+ 0x1734, 0x1736,
+ 0x1740, 0x1751,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1780, 0x17b3,
+ 0x17b6, 0x17b6,
+ 0x17be, 0x17c5,
+ 0x17c7, 0x17c8,
+ 0x17d4, 0x17dc,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180a,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x1884,
+ 0x1887, 0x18a8,
+ 0x18aa, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1923, 0x1926,
+ 0x1929, 0x192b,
+ 0x1930, 0x1931,
+ 0x1933, 0x1938,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a16,
+ 0x1a19, 0x1a1a,
+ 0x1a1e, 0x1a55,
+ 0x1a57, 0x1a57,
+ 0x1a61, 0x1a61,
+ 0x1a63, 0x1a64,
+ 0x1a6d, 0x1a72,
+ 0x1a80, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b04, 0x1b33,
+ 0x1b3b, 0x1b3b,
+ 0x1b3d, 0x1b41,
+ 0x1b43, 0x1b4c,
+ 0x1b50, 0x1b6a,
+ 0x1b74, 0x1b7e,
+ 0x1b82, 0x1ba1,
+ 0x1ba6, 0x1ba7,
+ 0x1baa, 0x1baa,
+ 0x1bae, 0x1be5,
+ 0x1be7, 0x1be7,
+ 0x1bea, 0x1bec,
+ 0x1bee, 0x1bee,
+ 0x1bf2, 0x1bf3,
+ 0x1bfc, 0x1c2b,
+ 0x1c34, 0x1c35,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd3, 0x1cd3,
+ 0x1ce1, 0x1ce1,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf7,
+ 0x1cfa, 0x1cfa,
+ 0x1d00, 0x1dbf,
+ 0x1e00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x200a,
+ 0x2010, 0x2027,
+ 0x202f, 0x205f,
+ 0x2070, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cee,
+ 0x2cf2, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x3029,
+ 0x3030, 0x303f,
+ 0x3041, 0x3096,
+ 0x309b, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa66e,
+ 0xa673, 0xa673,
+ 0xa67e, 0xa69d,
+ 0xa6a0, 0xa6ef,
+ 0xa6f2, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa801,
+ 0xa803, 0xa805,
+ 0xa807, 0xa80a,
+ 0xa80c, 0xa824,
+ 0xa827, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c3,
+ 0xa8ce, 0xa8d9,
+ 0xa8f2, 0xa8fe,
+ 0xa900, 0xa925,
+ 0xa92e, 0xa946,
+ 0xa952, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa983, 0xa9b2,
+ 0xa9b4, 0xa9b5,
+ 0xa9ba, 0xa9bb,
+ 0xa9be, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9e4,
+ 0xa9e6, 0xa9fe,
+ 0xaa00, 0xaa28,
+ 0xaa2f, 0xaa30,
+ 0xaa33, 0xaa34,
+ 0xaa40, 0xaa42,
+ 0xaa44, 0xaa4b,
+ 0xaa4d, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa7d, 0xaaaf,
+ 0xaab1, 0xaab1,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaabd,
+ 0xaac0, 0xaac0,
+ 0xaac2, 0xaac2,
+ 0xaadb, 0xaaeb,
+ 0xaaee, 0xaaf5,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabe4,
+ 0xabe6, 0xabe7,
+ 0xabe9, 0xabec,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb1d,
+ 0xfb1f, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfdcf,
+ 0xfdf0, 0xfdff,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xff01, 0xff9d,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffc, 0xfffd,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fc,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e1, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x10375,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a00,
+ 0x10a10, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a40, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae4,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d23,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10ead, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f45,
+ 0x10f51, 0x10f59,
+ 0x10f70, 0x10f81,
+ 0x10f86, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x11000,
+ 0x11002, 0x11037,
+ 0x11047, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x11071, 0x11072,
+ 0x11075, 0x11075,
+ 0x11082, 0x110b2,
+ 0x110b7, 0x110b8,
+ 0x110bb, 0x110bc,
+ 0x110be, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11103, 0x11126,
+ 0x1112c, 0x1112c,
+ 0x11136, 0x11147,
+ 0x11150, 0x11172,
+ 0x11174, 0x11176,
+ 0x11182, 0x111b5,
+ 0x111bf, 0x111c8,
+ 0x111cd, 0x111ce,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1122e,
+ 0x11232, 0x11233,
+ 0x11235, 0x11235,
+ 0x11238, 0x1123d,
+ 0x1123f, 0x11240,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112de,
+ 0x112e0, 0x112e2,
+ 0x112f0, 0x112f9,
+ 0x11302, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133d, 0x1133d,
+ 0x1133f, 0x1133f,
+ 0x11341, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x1135d, 0x11363,
+ 0x11400, 0x11437,
+ 0x11440, 0x11441,
+ 0x11445, 0x11445,
+ 0x11447, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x1145f, 0x11461,
+ 0x11480, 0x114af,
+ 0x114b1, 0x114b2,
+ 0x114b9, 0x114b9,
+ 0x114bb, 0x114bc,
+ 0x114be, 0x114be,
+ 0x114c1, 0x114c1,
+ 0x114c4, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115ae,
+ 0x115b0, 0x115b1,
+ 0x115b8, 0x115bb,
+ 0x115be, 0x115be,
+ 0x115c1, 0x115db,
+ 0x11600, 0x11632,
+ 0x1163b, 0x1163c,
+ 0x1163e, 0x1163e,
+ 0x11641, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116aa,
+ 0x116ac, 0x116ac,
+ 0x116ae, 0x116af,
+ 0x116b6, 0x116b6,
+ 0x116b8, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x11720, 0x11721,
+ 0x11726, 0x11726,
+ 0x11730, 0x11746,
+ 0x11800, 0x1182e,
+ 0x11838, 0x11838,
+ 0x1183b, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x1192f,
+ 0x11931, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193d, 0x1193d,
+ 0x1193f, 0x11942,
+ 0x11944, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d3,
+ 0x119dc, 0x119df,
+ 0x119e1, 0x119e4,
+ 0x11a00, 0x11a00,
+ 0x11a0b, 0x11a32,
+ 0x11a39, 0x11a3a,
+ 0x11a3f, 0x11a46,
+ 0x11a50, 0x11a50,
+ 0x11a57, 0x11a58,
+ 0x11a5c, 0x11a89,
+ 0x11a97, 0x11a97,
+ 0x11a9a, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11b00, 0x11b09,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c2f,
+ 0x11c3e, 0x11c3e,
+ 0x11c40, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11ca9, 0x11ca9,
+ 0x11cb1, 0x11cb1,
+ 0x11cb4, 0x11cb4,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d30,
+ 0x11d46, 0x11d46,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d93, 0x11d94,
+ 0x11d96, 0x11d96,
+ 0x11d98, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef2,
+ 0x11ef5, 0x11ef8,
+ 0x11f02, 0x11f10,
+ 0x11f12, 0x11f35,
+ 0x11f3e, 0x11f3f,
+ 0x11f41, 0x11f41,
+ 0x11f43, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x1342f,
+ 0x13441, 0x13446,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af5, 0x16af5,
+ 0x16b00, 0x16b2f,
+ 0x16b37, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f50, 0x16f87,
+ 0x16f93, 0x16f9f,
+ 0x16fe0, 0x16fe3,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bc9c,
+ 0x1bc9f, 0x1bc9f,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d164,
+ 0x1d166, 0x1d166,
+ 0x1d16a, 0x1d16d,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1ea,
+ 0x1d200, 0x1d241,
+ 0x1d245, 0x1d245,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d9ff,
+ 0x1da37, 0x1da3a,
+ 0x1da6d, 0x1da74,
+ 0x1da76, 0x1da83,
+ 0x1da85, 0x1da8b,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e030, 0x1e06d,
+ 0x1e100, 0x1e12c,
+ 0x1e137, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ad,
+ 0x1e2c0, 0x1e2eb,
+ 0x1e2f0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e4d0, 0x1e4eb,
+ 0x1e4f0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8cf,
+ 0x1e900, 0x1e943,
+ 0x1e94b, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Grapheme_Base */
+
+/* 'Grapheme_Link': Derived Property */
+static const OnigCodePoint CR_Grapheme_Link[] = {
+ 56,
+ 0x094d, 0x094d,
+ 0x09cd, 0x09cd,
+ 0x0a4d, 0x0a4d,
+ 0x0acd, 0x0acd,
+ 0x0b4d, 0x0b4d,
+ 0x0bcd, 0x0bcd,
+ 0x0c4d, 0x0c4d,
+ 0x0ccd, 0x0ccd,
+ 0x0d3b, 0x0d3c,
+ 0x0d4d, 0x0d4d,
+ 0x0dca, 0x0dca,
+ 0x0e3a, 0x0e3a,
+ 0x0eba, 0x0eba,
+ 0x0f84, 0x0f84,
+ 0x1039, 0x103a,
+ 0x1714, 0x1715,
+ 0x1734, 0x1734,
+ 0x17d2, 0x17d2,
+ 0x1a60, 0x1a60,
+ 0x1b44, 0x1b44,
+ 0x1baa, 0x1bab,
+ 0x1bf2, 0x1bf3,
+ 0x2d7f, 0x2d7f,
+ 0xa806, 0xa806,
+ 0xa82c, 0xa82c,
+ 0xa8c4, 0xa8c4,
+ 0xa953, 0xa953,
+ 0xa9c0, 0xa9c0,
+ 0xaaf6, 0xaaf6,
+ 0xabed, 0xabed,
+ 0x10a3f, 0x10a3f,
+ 0x11046, 0x11046,
+ 0x11070, 0x11070,
+ 0x1107f, 0x1107f,
+ 0x110b9, 0x110b9,
+ 0x11133, 0x11134,
+ 0x111c0, 0x111c0,
+ 0x11235, 0x11235,
+ 0x112ea, 0x112ea,
+ 0x1134d, 0x1134d,
+ 0x11442, 0x11442,
+ 0x114c2, 0x114c2,
+ 0x115bf, 0x115bf,
+ 0x1163f, 0x1163f,
+ 0x116b6, 0x116b6,
+ 0x1172b, 0x1172b,
+ 0x11839, 0x11839,
+ 0x1193d, 0x1193e,
+ 0x119e0, 0x119e0,
+ 0x11a34, 0x11a34,
+ 0x11a47, 0x11a47,
+ 0x11a99, 0x11a99,
+ 0x11c3f, 0x11c3f,
+ 0x11d44, 0x11d45,
+ 0x11d97, 0x11d97,
+ 0x11f41, 0x11f42,
+}; /* CR_Grapheme_Link */
+
+/* 'Common': Script */
+static const OnigCodePoint CR_Common[] = {
+ 173,
+ 0x0000, 0x0040,
+ 0x005b, 0x0060,
+ 0x007b, 0x00a9,
+ 0x00ab, 0x00b9,
+ 0x00bb, 0x00bf,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x02b9, 0x02df,
+ 0x02e5, 0x02e9,
+ 0x02ec, 0x02ff,
+ 0x0374, 0x0374,
+ 0x037e, 0x037e,
+ 0x0385, 0x0385,
+ 0x0387, 0x0387,
+ 0x0605, 0x0605,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0640, 0x0640,
+ 0x06dd, 0x06dd,
+ 0x08e2, 0x08e2,
+ 0x0964, 0x0965,
+ 0x0e3f, 0x0e3f,
+ 0x0fd5, 0x0fd8,
+ 0x10fb, 0x10fb,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x1802, 0x1803,
+ 0x1805, 0x1805,
+ 0x1cd3, 0x1cd3,
+ 0x1ce1, 0x1ce1,
+ 0x1ce9, 0x1cec,
+ 0x1cee, 0x1cf3,
+ 0x1cf5, 0x1cf7,
+ 0x1cfa, 0x1cfa,
+ 0x2000, 0x200b,
+ 0x200e, 0x2064,
+ 0x2066, 0x2070,
+ 0x2074, 0x207e,
+ 0x2080, 0x208e,
+ 0x20a0, 0x20c0,
+ 0x2100, 0x2125,
+ 0x2127, 0x2129,
+ 0x212c, 0x2131,
+ 0x2133, 0x214d,
+ 0x214f, 0x215f,
+ 0x2189, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x27ff,
+ 0x2900, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2bff,
+ 0x2e00, 0x2e5d,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x3004,
+ 0x3006, 0x3006,
+ 0x3008, 0x3020,
+ 0x3030, 0x3037,
+ 0x303c, 0x303f,
+ 0x309b, 0x309c,
+ 0x30a0, 0x30a0,
+ 0x30fb, 0x30fc,
+ 0x3190, 0x319f,
+ 0x31c0, 0x31e3,
+ 0x3220, 0x325f,
+ 0x327f, 0x32cf,
+ 0x32ff, 0x32ff,
+ 0x3358, 0x33ff,
+ 0x4dc0, 0x4dff,
+ 0xa700, 0xa721,
+ 0xa788, 0xa78a,
+ 0xa830, 0xa839,
+ 0xa92e, 0xa92e,
+ 0xa9cf, 0xa9cf,
+ 0xab5b, 0xab5b,
+ 0xab6a, 0xab6b,
+ 0xfd3e, 0xfd3f,
+ 0xfe10, 0xfe19,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff20,
+ 0xff3b, 0xff40,
+ 0xff5b, 0xff65,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xfffd,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1013f,
+ 0x10190, 0x1019c,
+ 0x101d0, 0x101fc,
+ 0x102e1, 0x102fb,
+ 0x1bca0, 0x1bca3,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d166,
+ 0x1d16a, 0x1d17a,
+ 0x1d183, 0x1d184,
+ 0x1d18c, 0x1d1a9,
+ 0x1d1ae, 0x1d1ea,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f1ff,
+ 0x1f201, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+}; /* CR_Common */
+
+/* 'Latin': Script */
+static const OnigCodePoint CR_Latin[] = {
+ 39,
+ 0x0041, 0x005a,
+ 0x0061, 0x007a,
+ 0x00aa, 0x00aa,
+ 0x00ba, 0x00ba,
+ 0x00c0, 0x00d6,
+ 0x00d8, 0x00f6,
+ 0x00f8, 0x02b8,
+ 0x02e0, 0x02e4,
+ 0x1d00, 0x1d25,
+ 0x1d2c, 0x1d5c,
+ 0x1d62, 0x1d65,
+ 0x1d6b, 0x1d77,
+ 0x1d79, 0x1dbe,
+ 0x1e00, 0x1eff,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x212a, 0x212b,
+ 0x2132, 0x2132,
+ 0x214e, 0x214e,
+ 0x2160, 0x2188,
+ 0x2c60, 0x2c7f,
+ 0xa722, 0xa787,
+ 0xa78b, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa7ff,
+ 0xab30, 0xab5a,
+ 0xab5c, 0xab64,
+ 0xab66, 0xab69,
+ 0xfb00, 0xfb06,
+ 0xff21, 0xff3a,
+ 0xff41, 0xff5a,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+}; /* CR_Latin */
+
+/* 'Greek': Script */
+static const OnigCodePoint CR_Greek[] = {
+ 36,
+ 0x0370, 0x0373,
+ 0x0375, 0x0377,
+ 0x037a, 0x037d,
+ 0x037f, 0x037f,
+ 0x0384, 0x0384,
+ 0x0386, 0x0386,
+ 0x0388, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03e1,
+ 0x03f0, 0x03ff,
+ 0x1d26, 0x1d2a,
+ 0x1d5d, 0x1d61,
+ 0x1d66, 0x1d6a,
+ 0x1dbf, 0x1dbf,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2126, 0x2126,
+ 0xab65, 0xab65,
+ 0x10140, 0x1018e,
+ 0x101a0, 0x101a0,
+ 0x1d200, 0x1d245,
+}; /* CR_Greek */
+
+/* 'Cyrillic': Script */
+static const OnigCodePoint CR_Cyrillic[] = {
+ 10,
+ 0x0400, 0x0484,
+ 0x0487, 0x052f,
+ 0x1c80, 0x1c88,
+ 0x1d2b, 0x1d2b,
+ 0x1d78, 0x1d78,
+ 0x2de0, 0x2dff,
+ 0xa640, 0xa69f,
+ 0xfe2e, 0xfe2f,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+}; /* CR_Cyrillic */
+
+/* 'Armenian': Script */
+static const OnigCodePoint CR_Armenian[] = {
+ 4,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0xfb13, 0xfb17,
+}; /* CR_Armenian */
+
+/* 'Hebrew': Script */
+static const OnigCodePoint CR_Hebrew[] = {
+ 9,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfb4f,
+}; /* CR_Hebrew */
+
+/* 'Arabic': Script */
+static const OnigCodePoint CR_Arabic[] = {
+ 58,
+ 0x0600, 0x0604,
+ 0x0606, 0x060b,
+ 0x060d, 0x061a,
+ 0x061c, 0x061e,
+ 0x0620, 0x063f,
+ 0x0641, 0x064a,
+ 0x0656, 0x066f,
+ 0x0671, 0x06dc,
+ 0x06de, 0x06ff,
+ 0x0750, 0x077f,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x08e1,
+ 0x08e3, 0x08ff,
+ 0xfb50, 0xfbc2,
+ 0xfbd3, 0xfd3d,
+ 0xfd40, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfdcf,
+ 0xfdf0, 0xfdff,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0x10e60, 0x10e7e,
+ 0x10efd, 0x10eff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+}; /* CR_Arabic */
+
+/* 'Syriac': Script */
+static const OnigCodePoint CR_Syriac[] = {
+ 4,
+ 0x0700, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x074f,
+ 0x0860, 0x086a,
+}; /* CR_Syriac */
+
+/* 'Thaana': Script */
+static const OnigCodePoint CR_Thaana[] = {
+ 1,
+ 0x0780, 0x07b1,
+}; /* CR_Thaana */
+
+/* 'Devanagari': Script */
+static const OnigCodePoint CR_Devanagari[] = {
+ 5,
+ 0x0900, 0x0950,
+ 0x0955, 0x0963,
+ 0x0966, 0x097f,
+ 0xa8e0, 0xa8ff,
+ 0x11b00, 0x11b09,
+}; /* CR_Devanagari */
+
+/* 'Bengali': Script */
+static const OnigCodePoint CR_Bengali[] = {
+ 14,
+ 0x0980, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+}; /* CR_Bengali */
+
+/* 'Gurmukhi': Script */
+static const OnigCodePoint CR_Gurmukhi[] = {
+ 16,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+}; /* CR_Gurmukhi */
+
+/* 'Gujarati': Script */
+static const OnigCodePoint CR_Gujarati[] = {
+ 14,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+}; /* CR_Gujarati */
+
+/* 'Oriya': Script */
+static const OnigCodePoint CR_Oriya[] = {
+ 14,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+}; /* CR_Oriya */
+
+/* 'Tamil': Script */
+static const OnigCodePoint CR_Tamil[] = {
+ 18,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x11fff,
+}; /* CR_Tamil */
+
+/* 'Telugu': Script */
+static const OnigCodePoint CR_Telugu[] = {
+ 13,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c7f,
+}; /* CR_Telugu */
+
+/* 'Kannada': Script */
+static const OnigCodePoint CR_Kannada[] = {
+ 13,
+ 0x0c80, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+}; /* CR_Kannada */
+
+/* 'Malayalam': Script */
+static const OnigCodePoint CR_Malayalam[] = {
+ 7,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+}; /* CR_Malayalam */
+
+/* 'Sinhala': Script */
+static const OnigCodePoint CR_Sinhala[] = {
+ 13,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x111e1, 0x111f4,
+}; /* CR_Sinhala */
+
+/* 'Thai': Script */
+static const OnigCodePoint CR_Thai[] = {
+ 2,
+ 0x0e01, 0x0e3a,
+ 0x0e40, 0x0e5b,
+}; /* CR_Thai */
+
+/* 'Lao': Script */
+static const OnigCodePoint CR_Lao[] = {
+ 11,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+}; /* CR_Lao */
+
+/* 'Tibetan': Script */
+static const OnigCodePoint CR_Tibetan[] = {
+ 7,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fd4,
+ 0x0fd9, 0x0fda,
+}; /* CR_Tibetan */
+
+/* 'Myanmar': Script */
+static const OnigCodePoint CR_Myanmar[] = {
+ 3,
+ 0x1000, 0x109f,
+ 0xa9e0, 0xa9fe,
+ 0xaa60, 0xaa7f,
+}; /* CR_Myanmar */
+
+/* 'Georgian': Script */
+static const OnigCodePoint CR_Georgian[] = {
+ 10,
+ 0x10a0, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x10fa,
+ 0x10fc, 0x10ff,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cbf,
+ 0x2d00, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+}; /* CR_Georgian */
+
+/* 'Hangul': Script */
+static const OnigCodePoint CR_Hangul[] = {
+ 14,
+ 0x1100, 0x11ff,
+ 0x302e, 0x302f,
+ 0x3131, 0x318e,
+ 0x3200, 0x321e,
+ 0x3260, 0x327e,
+ 0xa960, 0xa97c,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xffa0, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+}; /* CR_Hangul */
+
+/* 'Ethiopic': Script */
+static const OnigCodePoint CR_Ethiopic[] = {
+ 36,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+}; /* CR_Ethiopic */
+
+/* 'Cherokee': Script */
+static const OnigCodePoint CR_Cherokee[] = {
+ 3,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0xab70, 0xabbf,
+}; /* CR_Cherokee */
+
+/* 'Canadian_Aboriginal': Script */
+static const OnigCodePoint CR_Canadian_Aboriginal[] = {
+ 3,
+ 0x1400, 0x167f,
+ 0x18b0, 0x18f5,
+ 0x11ab0, 0x11abf,
+}; /* CR_Canadian_Aboriginal */
+
+/* 'Ogham': Script */
+static const OnigCodePoint CR_Ogham[] = {
+ 1,
+ 0x1680, 0x169c,
+}; /* CR_Ogham */
+
+/* 'Runic': Script */
+static const OnigCodePoint CR_Runic[] = {
+ 2,
+ 0x16a0, 0x16ea,
+ 0x16ee, 0x16f8,
+}; /* CR_Runic */
+
+/* 'Khmer': Script */
+static const OnigCodePoint CR_Khmer[] = {
+ 4,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x19e0, 0x19ff,
+}; /* CR_Khmer */
+
+/* 'Mongolian': Script */
+static const OnigCodePoint CR_Mongolian[] = {
+ 6,
+ 0x1800, 0x1801,
+ 0x1804, 0x1804,
+ 0x1806, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x11660, 0x1166c,
+}; /* CR_Mongolian */
+
+/* 'Hiragana': Script */
+static const OnigCodePoint CR_Hiragana[] = {
+ 6,
+ 0x3041, 0x3096,
+ 0x309d, 0x309f,
+ 0x1b001, 0x1b11f,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1f200, 0x1f200,
+}; /* CR_Hiragana */
+
+/* 'Katakana': Script */
+static const OnigCodePoint CR_Katakana[] = {
+ 14,
+ 0x30a1, 0x30fa,
+ 0x30fd, 0x30ff,
+ 0x31f0, 0x31ff,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3357,
+ 0xff66, 0xff6f,
+ 0xff71, 0xff9d,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b000,
+ 0x1b120, 0x1b122,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+}; /* CR_Katakana */
+
+/* 'Bopomofo': Script */
+static const OnigCodePoint CR_Bopomofo[] = {
+ 3,
+ 0x02ea, 0x02eb,
+ 0x3105, 0x312f,
+ 0x31a0, 0x31bf,
+}; /* CR_Bopomofo */
+
+/* 'Han': Script */
+static const OnigCodePoint CR_Han[] = {
+ 21,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x3005, 0x3005,
+ 0x3007, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303b,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0x9fff,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0x16fe2, 0x16fe3,
+ 0x16ff0, 0x16ff1,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Han */
+
+/* 'Yi': Script */
+static const OnigCodePoint CR_Yi[] = {
+ 2,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+}; /* CR_Yi */
+
+/* 'Old_Italic': Script */
+static const OnigCodePoint CR_Old_Italic[] = {
+ 2,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1032f,
+}; /* CR_Old_Italic */
+
+/* 'Gothic': Script */
+static const OnigCodePoint CR_Gothic[] = {
+ 1,
+ 0x10330, 0x1034a,
+}; /* CR_Gothic */
+
+/* 'Deseret': Script */
+static const OnigCodePoint CR_Deseret[] = {
+ 1,
+ 0x10400, 0x1044f,
+}; /* CR_Deseret */
+
+/* 'Inherited': Script */
+static const OnigCodePoint CR_Inherited[] = {
+ 29,
+ 0x0300, 0x036f,
+ 0x0485, 0x0486,
+ 0x064b, 0x0655,
+ 0x0670, 0x0670,
+ 0x0951, 0x0954,
+ 0x1ab0, 0x1ace,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce0,
+ 0x1ce2, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf8, 0x1cf9,
+ 0x1dc0, 0x1dff,
+ 0x200c, 0x200d,
+ 0x20d0, 0x20f0,
+ 0x302a, 0x302d,
+ 0x3099, 0x309a,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2d,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x1133b, 0x1133b,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d167, 0x1d169,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0xe0100, 0xe01ef,
+}; /* CR_Inherited */
+
+/* 'Tagalog': Script */
+static const OnigCodePoint CR_Tagalog[] = {
+ 2,
+ 0x1700, 0x1715,
+ 0x171f, 0x171f,
+}; /* CR_Tagalog */
+
+/* 'Hanunoo': Script */
+static const OnigCodePoint CR_Hanunoo[] = {
+ 1,
+ 0x1720, 0x1734,
+}; /* CR_Hanunoo */
+
+/* 'Buhid': Script */
+static const OnigCodePoint CR_Buhid[] = {
+ 1,
+ 0x1740, 0x1753,
+}; /* CR_Buhid */
+
+/* 'Tagbanwa': Script */
+static const OnigCodePoint CR_Tagbanwa[] = {
+ 3,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+}; /* CR_Tagbanwa */
+
+/* 'Limbu': Script */
+static const OnigCodePoint CR_Limbu[] = {
+ 5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x194f,
+}; /* CR_Limbu */
+
+/* 'Tai_Le': Script */
+static const OnigCodePoint CR_Tai_Le[] = {
+ 2,
+ 0x1950, 0x196d,
+ 0x1970, 0x1974,
+}; /* CR_Tai_Le */
+
+/* 'Linear_B': Script */
+static const OnigCodePoint CR_Linear_B[] = {
+ 7,
+ 0x10000, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+}; /* CR_Linear_B */
+
+/* 'Ugaritic': Script */
+static const OnigCodePoint CR_Ugaritic[] = {
+ 2,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x1039f,
+}; /* CR_Ugaritic */
+
+/* 'Shavian': Script */
+static const OnigCodePoint CR_Shavian[] = {
+ 1,
+ 0x10450, 0x1047f,
+}; /* CR_Shavian */
+
+/* 'Osmanya': Script */
+static const OnigCodePoint CR_Osmanya[] = {
+ 2,
+ 0x10480, 0x1049d,
+ 0x104a0, 0x104a9,
+}; /* CR_Osmanya */
+
+/* 'Cypriot': Script */
+static const OnigCodePoint CR_Cypriot[] = {
+ 6,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+}; /* CR_Cypriot */
+
+/* 'Braille': Script */
+static const OnigCodePoint CR_Braille[] = {
+ 1,
+ 0x2800, 0x28ff,
+}; /* CR_Braille */
+
+/* 'Buginese': Script */
+static const OnigCodePoint CR_Buginese[] = {
+ 2,
+ 0x1a00, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+}; /* CR_Buginese */
+
+/* 'Coptic': Script */
+static const OnigCodePoint CR_Coptic[] = {
+ 3,
+ 0x03e2, 0x03ef,
+ 0x2c80, 0x2cf3,
+ 0x2cf9, 0x2cff,
+}; /* CR_Coptic */
+
+/* 'New_Tai_Lue': Script */
+static const OnigCodePoint CR_New_Tai_Lue[] = {
+ 4,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x19df,
+}; /* CR_New_Tai_Lue */
+
+/* 'Glagolitic': Script */
+static const OnigCodePoint CR_Glagolitic[] = {
+ 6,
+ 0x2c00, 0x2c5f,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+}; /* CR_Glagolitic */
+
+/* 'Tifinagh': Script */
+static const OnigCodePoint CR_Tifinagh[] = {
+ 3,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d7f,
+}; /* CR_Tifinagh */
+
+/* 'Syloti_Nagri': Script */
+static const OnigCodePoint CR_Syloti_Nagri[] = {
+ 1,
+ 0xa800, 0xa82c,
+}; /* CR_Syloti_Nagri */
+
+/* 'Old_Persian': Script */
+static const OnigCodePoint CR_Old_Persian[] = {
+ 2,
+ 0x103a0, 0x103c3,
+ 0x103c8, 0x103d5,
+}; /* CR_Old_Persian */
+
+/* 'Kharoshthi': Script */
+static const OnigCodePoint CR_Kharoshthi[] = {
+ 8,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+}; /* CR_Kharoshthi */
+
+/* 'Balinese': Script */
+static const OnigCodePoint CR_Balinese[] = {
+ 2,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+}; /* CR_Balinese */
+
+/* 'Cuneiform': Script */
+static const OnigCodePoint CR_Cuneiform[] = {
+ 4,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+}; /* CR_Cuneiform */
+
+/* 'Phoenician': Script */
+static const OnigCodePoint CR_Phoenician[] = {
+ 2,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x1091f,
+}; /* CR_Phoenician */
+
+/* 'Phags_Pa': Script */
+static const OnigCodePoint CR_Phags_Pa[] = {
+ 1,
+ 0xa840, 0xa877,
+}; /* CR_Phags_Pa */
+
+/* 'Nko': Script */
+static const OnigCodePoint CR_Nko[] = {
+ 2,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x07ff,
+}; /* CR_Nko */
+
+/* 'Sundanese': Script */
+static const OnigCodePoint CR_Sundanese[] = {
+ 2,
+ 0x1b80, 0x1bbf,
+ 0x1cc0, 0x1cc7,
+}; /* CR_Sundanese */
+
+/* 'Lepcha': Script */
+static const OnigCodePoint CR_Lepcha[] = {
+ 3,
+ 0x1c00, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c4f,
+}; /* CR_Lepcha */
+
+/* 'Ol_Chiki': Script */
+static const OnigCodePoint CR_Ol_Chiki[] = {
+ 1,
+ 0x1c50, 0x1c7f,
+}; /* CR_Ol_Chiki */
+
+/* 'Vai': Script */
+static const OnigCodePoint CR_Vai[] = {
+ 1,
+ 0xa500, 0xa62b,
+}; /* CR_Vai */
+
+/* 'Saurashtra': Script */
+static const OnigCodePoint CR_Saurashtra[] = {
+ 2,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+}; /* CR_Saurashtra */
+
+/* 'Kayah_Li': Script */
+static const OnigCodePoint CR_Kayah_Li[] = {
+ 2,
+ 0xa900, 0xa92d,
+ 0xa92f, 0xa92f,
+}; /* CR_Kayah_Li */
+
+/* 'Rejang': Script */
+static const OnigCodePoint CR_Rejang[] = {
+ 2,
+ 0xa930, 0xa953,
+ 0xa95f, 0xa95f,
+}; /* CR_Rejang */
+
+/* 'Lycian': Script */
+static const OnigCodePoint CR_Lycian[] = {
+ 1,
+ 0x10280, 0x1029c,
+}; /* CR_Lycian */
+
+/* 'Carian': Script */
+static const OnigCodePoint CR_Carian[] = {
+ 1,
+ 0x102a0, 0x102d0,
+}; /* CR_Carian */
+
+/* 'Lydian': Script */
+static const OnigCodePoint CR_Lydian[] = {
+ 2,
+ 0x10920, 0x10939,
+ 0x1093f, 0x1093f,
+}; /* CR_Lydian */
+
+/* 'Cham': Script */
+static const OnigCodePoint CR_Cham[] = {
+ 4,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa5f,
+}; /* CR_Cham */
+
+/* 'Tai_Tham': Script */
+static const OnigCodePoint CR_Tai_Tham[] = {
+ 5,
+ 0x1a20, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+}; /* CR_Tai_Tham */
+
+/* 'Tai_Viet': Script */
+static const OnigCodePoint CR_Tai_Viet[] = {
+ 2,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaadf,
+}; /* CR_Tai_Viet */
+
+/* 'Avestan': Script */
+static const OnigCodePoint CR_Avestan[] = {
+ 2,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b3f,
+}; /* CR_Avestan */
+
+/* 'Egyptian_Hieroglyphs': Script */
+static const OnigCodePoint CR_Egyptian_Hieroglyphs[] = {
+ 1,
+ 0x13000, 0x13455,
+}; /* CR_Egyptian_Hieroglyphs */
+
+/* 'Samaritan': Script */
+static const OnigCodePoint CR_Samaritan[] = {
+ 2,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+}; /* CR_Samaritan */
+
+/* 'Lisu': Script */
+static const OnigCodePoint CR_Lisu[] = {
+ 2,
+ 0xa4d0, 0xa4ff,
+ 0x11fb0, 0x11fb0,
+}; /* CR_Lisu */
+
+/* 'Bamum': Script */
+static const OnigCodePoint CR_Bamum[] = {
+ 2,
+ 0xa6a0, 0xa6f7,
+ 0x16800, 0x16a38,
+}; /* CR_Bamum */
+
+/* 'Javanese': Script */
+static const OnigCodePoint CR_Javanese[] = {
+ 3,
+ 0xa980, 0xa9cd,
+ 0xa9d0, 0xa9d9,
+ 0xa9de, 0xa9df,
+}; /* CR_Javanese */
+
+/* 'Meetei_Mayek': Script */
+static const OnigCodePoint CR_Meetei_Mayek[] = {
+ 3,
+ 0xaae0, 0xaaf6,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+}; /* CR_Meetei_Mayek */
+
+/* 'Imperial_Aramaic': Script */
+static const OnigCodePoint CR_Imperial_Aramaic[] = {
+ 2,
+ 0x10840, 0x10855,
+ 0x10857, 0x1085f,
+}; /* CR_Imperial_Aramaic */
+
+/* 'Old_South_Arabian': Script */
+static const OnigCodePoint CR_Old_South_Arabian[] = {
+ 1,
+ 0x10a60, 0x10a7f,
+}; /* CR_Old_South_Arabian */
+
+/* 'Inscriptional_Parthian': Script */
+static const OnigCodePoint CR_Inscriptional_Parthian[] = {
+ 2,
+ 0x10b40, 0x10b55,
+ 0x10b58, 0x10b5f,
+}; /* CR_Inscriptional_Parthian */
+
+/* 'Inscriptional_Pahlavi': Script */
+static const OnigCodePoint CR_Inscriptional_Pahlavi[] = {
+ 2,
+ 0x10b60, 0x10b72,
+ 0x10b78, 0x10b7f,
+}; /* CR_Inscriptional_Pahlavi */
+
+/* 'Old_Turkic': Script */
+static const OnigCodePoint CR_Old_Turkic[] = {
+ 1,
+ 0x10c00, 0x10c48,
+}; /* CR_Old_Turkic */
+
+/* 'Kaithi': Script */
+static const OnigCodePoint CR_Kaithi[] = {
+ 2,
+ 0x11080, 0x110c2,
+ 0x110cd, 0x110cd,
+}; /* CR_Kaithi */
+
+/* 'Batak': Script */
+static const OnigCodePoint CR_Batak[] = {
+ 2,
+ 0x1bc0, 0x1bf3,
+ 0x1bfc, 0x1bff,
+}; /* CR_Batak */
+
+/* 'Brahmi': Script */
+static const OnigCodePoint CR_Brahmi[] = {
+ 3,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x1107f,
+}; /* CR_Brahmi */
+
+/* 'Mandaic': Script */
+static const OnigCodePoint CR_Mandaic[] = {
+ 2,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+}; /* CR_Mandaic */
+
+/* 'Chakma': Script */
+static const OnigCodePoint CR_Chakma[] = {
+ 2,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+}; /* CR_Chakma */
+
+/* 'Meroitic_Cursive': Script */
+static const OnigCodePoint CR_Meroitic_Cursive[] = {
+ 3,
+ 0x109a0, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x109ff,
+}; /* CR_Meroitic_Cursive */
+
+/* 'Meroitic_Hieroglyphs': Script */
+static const OnigCodePoint CR_Meroitic_Hieroglyphs[] = {
+ 1,
+ 0x10980, 0x1099f,
+}; /* CR_Meroitic_Hieroglyphs */
+
+/* 'Miao': Script */
+static const OnigCodePoint CR_Miao[] = {
+ 3,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+}; /* CR_Miao */
+
+/* 'Sharada': Script */
+static const OnigCodePoint CR_Sharada[] = {
+ 1,
+ 0x11180, 0x111df,
+}; /* CR_Sharada */
+
+/* 'Sora_Sompeng': Script */
+static const OnigCodePoint CR_Sora_Sompeng[] = {
+ 2,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+}; /* CR_Sora_Sompeng */
+
+/* 'Takri': Script */
+static const OnigCodePoint CR_Takri[] = {
+ 2,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+}; /* CR_Takri */
+
+/* 'Caucasian_Albanian': Script */
+static const OnigCodePoint CR_Caucasian_Albanian[] = {
+ 2,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+}; /* CR_Caucasian_Albanian */
+
+/* 'Bassa_Vah': Script */
+static const OnigCodePoint CR_Bassa_Vah[] = {
+ 2,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+}; /* CR_Bassa_Vah */
+
+/* 'Duployan': Script */
+static const OnigCodePoint CR_Duployan[] = {
+ 5,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bc9f,
+}; /* CR_Duployan */
+
+/* 'Elbasan': Script */
+static const OnigCodePoint CR_Elbasan[] = {
+ 1,
+ 0x10500, 0x10527,
+}; /* CR_Elbasan */
+
+/* 'Grantha': Script */
+static const OnigCodePoint CR_Grantha[] = {
+ 15,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133c, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+}; /* CR_Grantha */
+
+/* 'Pahawh_Hmong': Script */
+static const OnigCodePoint CR_Pahawh_Hmong[] = {
+ 5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+}; /* CR_Pahawh_Hmong */
+
+/* 'Khojki': Script */
+static const OnigCodePoint CR_Khojki[] = {
+ 2,
+ 0x11200, 0x11211,
+ 0x11213, 0x11241,
+}; /* CR_Khojki */
+
+/* 'Linear_A': Script */
+static const OnigCodePoint CR_Linear_A[] = {
+ 3,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+}; /* CR_Linear_A */
+
+/* 'Mahajani': Script */
+static const OnigCodePoint CR_Mahajani[] = {
+ 1,
+ 0x11150, 0x11176,
+}; /* CR_Mahajani */
+
+/* 'Manichaean': Script */
+static const OnigCodePoint CR_Manichaean[] = {
+ 2,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+}; /* CR_Manichaean */
+
+/* 'Mende_Kikakui': Script */
+static const OnigCodePoint CR_Mende_Kikakui[] = {
+ 2,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+}; /* CR_Mende_Kikakui */
+
+/* 'Modi': Script */
+static const OnigCodePoint CR_Modi[] = {
+ 2,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+}; /* CR_Modi */
+
+/* 'Mro': Script */
+static const OnigCodePoint CR_Mro[] = {
+ 3,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+}; /* CR_Mro */
+
+/* 'Old_North_Arabian': Script */
+static const OnigCodePoint CR_Old_North_Arabian[] = {
+ 1,
+ 0x10a80, 0x10a9f,
+}; /* CR_Old_North_Arabian */
+
+/* 'Nabataean': Script */
+static const OnigCodePoint CR_Nabataean[] = {
+ 2,
+ 0x10880, 0x1089e,
+ 0x108a7, 0x108af,
+}; /* CR_Nabataean */
+
+/* 'Palmyrene': Script */
+static const OnigCodePoint CR_Palmyrene[] = {
+ 1,
+ 0x10860, 0x1087f,
+}; /* CR_Palmyrene */
+
+/* 'Pau_Cin_Hau': Script */
+static const OnigCodePoint CR_Pau_Cin_Hau[] = {
+ 1,
+ 0x11ac0, 0x11af8,
+}; /* CR_Pau_Cin_Hau */
+
+/* 'Old_Permic': Script */
+static const OnigCodePoint CR_Old_Permic[] = {
+ 1,
+ 0x10350, 0x1037a,
+}; /* CR_Old_Permic */
+
+/* 'Psalter_Pahlavi': Script */
+static const OnigCodePoint CR_Psalter_Pahlavi[] = {
+ 3,
+ 0x10b80, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+}; /* CR_Psalter_Pahlavi */
+
+/* 'Siddham': Script */
+static const OnigCodePoint CR_Siddham[] = {
+ 2,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+}; /* CR_Siddham */
+
+/* 'Khudawadi': Script */
+static const OnigCodePoint CR_Khudawadi[] = {
+ 2,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+}; /* CR_Khudawadi */
+
+/* 'Tirhuta': Script */
+static const OnigCodePoint CR_Tirhuta[] = {
+ 2,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+}; /* CR_Tirhuta */
+
+/* 'Warang_Citi': Script */
+static const OnigCodePoint CR_Warang_Citi[] = {
+ 2,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+}; /* CR_Warang_Citi */
+
+/* 'Ahom': Script */
+static const OnigCodePoint CR_Ahom[] = {
+ 3,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+}; /* CR_Ahom */
+
+/* 'Anatolian_Hieroglyphs': Script */
+static const OnigCodePoint CR_Anatolian_Hieroglyphs[] = {
+ 1,
+ 0x14400, 0x14646,
+}; /* CR_Anatolian_Hieroglyphs */
+
+/* 'Hatran': Script */
+static const OnigCodePoint CR_Hatran[] = {
+ 3,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x108ff,
+}; /* CR_Hatran */
+
+/* 'Multani': Script */
+static const OnigCodePoint CR_Multani[] = {
+ 5,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+}; /* CR_Multani */
+
+/* 'Old_Hungarian': Script */
+static const OnigCodePoint CR_Old_Hungarian[] = {
+ 3,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10cff,
+}; /* CR_Old_Hungarian */
+
+/* 'SignWriting': Script */
+static const OnigCodePoint CR_SignWriting[] = {
+ 3,
+ 0x1d800, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+}; /* CR_SignWriting */
+
+/* 'Adlam': Script */
+static const OnigCodePoint CR_Adlam[] = {
+ 3,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+}; /* CR_Adlam */
+
+/* 'Bhaiksuki': Script */
+static const OnigCodePoint CR_Bhaiksuki[] = {
+ 4,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+}; /* CR_Bhaiksuki */
+
+/* 'Marchen': Script */
+static const OnigCodePoint CR_Marchen[] = {
+ 3,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+}; /* CR_Marchen */
+
+/* 'Newa': Script */
+static const OnigCodePoint CR_Newa[] = {
+ 2,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+}; /* CR_Newa */
+
+/* 'Osage': Script */
+static const OnigCodePoint CR_Osage[] = {
+ 2,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+}; /* CR_Osage */
+
+/* 'Tangut': Script */
+static const OnigCodePoint CR_Tangut[] = {
+ 4,
+ 0x16fe0, 0x16fe0,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18aff,
+ 0x18d00, 0x18d08,
+}; /* CR_Tangut */
+
+/* 'Masaram_Gondi': Script */
+static const OnigCodePoint CR_Masaram_Gondi[] = {
+ 7,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+}; /* CR_Masaram_Gondi */
+
+/* 'Nushu': Script */
+static const OnigCodePoint CR_Nushu[] = {
+ 2,
+ 0x16fe1, 0x16fe1,
+ 0x1b170, 0x1b2fb,
+}; /* CR_Nushu */
+
+/* 'Soyombo': Script */
+static const OnigCodePoint CR_Soyombo[] = {
+ 1,
+ 0x11a50, 0x11aa2,
+}; /* CR_Soyombo */
+
+/* 'Zanabazar_Square': Script */
+static const OnigCodePoint CR_Zanabazar_Square[] = {
+ 1,
+ 0x11a00, 0x11a47,
+}; /* CR_Zanabazar_Square */
+
+/* 'Dogra': Script */
+static const OnigCodePoint CR_Dogra[] = {
+ 1,
+ 0x11800, 0x1183b,
+}; /* CR_Dogra */
+
+/* 'Gunjala_Gondi': Script */
+static const OnigCodePoint CR_Gunjala_Gondi[] = {
+ 6,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+}; /* CR_Gunjala_Gondi */
+
+/* 'Makasar': Script */
+static const OnigCodePoint CR_Makasar[] = {
+ 1,
+ 0x11ee0, 0x11ef8,
+}; /* CR_Makasar */
+
+/* 'Medefaidrin': Script */
+static const OnigCodePoint CR_Medefaidrin[] = {
+ 1,
+ 0x16e40, 0x16e9a,
+}; /* CR_Medefaidrin */
+
+/* 'Hanifi_Rohingya': Script */
+static const OnigCodePoint CR_Hanifi_Rohingya[] = {
+ 2,
+ 0x10d00, 0x10d27,
+ 0x10d30, 0x10d39,
+}; /* CR_Hanifi_Rohingya */
+
+/* 'Sogdian': Script */
+static const OnigCodePoint CR_Sogdian[] = {
+ 1,
+ 0x10f30, 0x10f59,
+}; /* CR_Sogdian */
+
+/* 'Old_Sogdian': Script */
+static const OnigCodePoint CR_Old_Sogdian[] = {
+ 1,
+ 0x10f00, 0x10f27,
+}; /* CR_Old_Sogdian */
+
+/* 'Elymaic': Script */
+static const OnigCodePoint CR_Elymaic[] = {
+ 1,
+ 0x10fe0, 0x10ff6,
+}; /* CR_Elymaic */
+
+/* 'Nandinagari': Script */
+static const OnigCodePoint CR_Nandinagari[] = {
+ 3,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+}; /* CR_Nandinagari */
+
+/* 'Nyiakeng_Puachue_Hmong': Script */
+static const OnigCodePoint CR_Nyiakeng_Puachue_Hmong[] = {
+ 4,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+}; /* CR_Nyiakeng_Puachue_Hmong */
+
+/* 'Wancho': Script */
+static const OnigCodePoint CR_Wancho[] = {
+ 2,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+}; /* CR_Wancho */
+
+/* 'Chorasmian': Script */
+static const OnigCodePoint CR_Chorasmian[] = {
+ 1,
+ 0x10fb0, 0x10fcb,
+}; /* CR_Chorasmian */
+
+/* 'Dives_Akuru': Script */
+static const OnigCodePoint CR_Dives_Akuru[] = {
+ 8,
+ 0x11900, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+}; /* CR_Dives_Akuru */
+
+/* 'Khitan_Small_Script': Script */
+static const OnigCodePoint CR_Khitan_Small_Script[] = {
+ 2,
+ 0x16fe4, 0x16fe4,
+ 0x18b00, 0x18cd5,
+}; /* CR_Khitan_Small_Script */
+
+/* 'Yezidi': Script */
+static const OnigCodePoint CR_Yezidi[] = {
+ 3,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+}; /* CR_Yezidi */
+
+/* 'Cypro_Minoan': Script */
+static const OnigCodePoint CR_Cypro_Minoan[] = {
+ 1,
+ 0x12f90, 0x12ff2,
+}; /* CR_Cypro_Minoan */
+
+/* 'Old_Uyghur': Script */
+static const OnigCodePoint CR_Old_Uyghur[] = {
+ 1,
+ 0x10f70, 0x10f89,
+}; /* CR_Old_Uyghur */
+
+/* 'Tangsa': Script */
+static const OnigCodePoint CR_Tangsa[] = {
+ 2,
+ 0x16a70, 0x16abe,
+ 0x16ac0, 0x16ac9,
+}; /* CR_Tangsa */
+
+/* 'Toto': Script */
+static const OnigCodePoint CR_Toto[] = {
+ 1,
+ 0x1e290, 0x1e2ae,
+}; /* CR_Toto */
+
+/* 'Vithkuqi': Script */
+static const OnigCodePoint CR_Vithkuqi[] = {
+ 8,
+ 0x10570, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+}; /* CR_Vithkuqi */
+
+/* 'Kawi': Script */
+static const OnigCodePoint CR_Kawi[] = {
+ 3,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f59,
+}; /* CR_Kawi */
+
+/* 'Nag_Mundari': Script */
+static const OnigCodePoint CR_Nag_Mundari[] = {
+ 1,
+ 0x1e4d0, 0x1e4f9,
+}; /* CR_Nag_Mundari */
+
+/* 'White_Space': Binary Property */
+#define CR_White_Space CR_Space
+
+/* 'Bidi_Control': Binary Property */
+static const OnigCodePoint CR_Bidi_Control[] = {
+ 4,
+ 0x061c, 0x061c,
+ 0x200e, 0x200f,
+ 0x202a, 0x202e,
+ 0x2066, 0x2069,
+}; /* CR_Bidi_Control */
+
+/* 'Join_Control': Binary Property */
+static const OnigCodePoint CR_Join_Control[] = {
+ 1,
+ 0x200c, 0x200d,
+}; /* CR_Join_Control */
+
+/* 'Dash': Binary Property */
+static const OnigCodePoint CR_Dash[] = {
+ 23,
+ 0x002d, 0x002d,
+ 0x058a, 0x058a,
+ 0x05be, 0x05be,
+ 0x1400, 0x1400,
+ 0x1806, 0x1806,
+ 0x2010, 0x2015,
+ 0x2053, 0x2053,
+ 0x207b, 0x207b,
+ 0x208b, 0x208b,
+ 0x2212, 0x2212,
+ 0x2e17, 0x2e17,
+ 0x2e1a, 0x2e1a,
+ 0x2e3a, 0x2e3b,
+ 0x2e40, 0x2e40,
+ 0x2e5d, 0x2e5d,
+ 0x301c, 0x301c,
+ 0x3030, 0x3030,
+ 0x30a0, 0x30a0,
+ 0xfe31, 0xfe32,
+ 0xfe58, 0xfe58,
+ 0xfe63, 0xfe63,
+ 0xff0d, 0xff0d,
+ 0x10ead, 0x10ead,
+}; /* CR_Dash */
+
+/* 'Hyphen': Binary Property */
+static const OnigCodePoint CR_Hyphen[] = {
+ 10,
+ 0x002d, 0x002d,
+ 0x00ad, 0x00ad,
+ 0x058a, 0x058a,
+ 0x1806, 0x1806,
+ 0x2010, 0x2011,
+ 0x2e17, 0x2e17,
+ 0x30fb, 0x30fb,
+ 0xfe63, 0xfe63,
+ 0xff0d, 0xff0d,
+ 0xff65, 0xff65,
+}; /* CR_Hyphen */
+
+/* 'Quotation_Mark': Binary Property */
+static const OnigCodePoint CR_Quotation_Mark[] = {
+ 13,
+ 0x0022, 0x0022,
+ 0x0027, 0x0027,
+ 0x00ab, 0x00ab,
+ 0x00bb, 0x00bb,
+ 0x2018, 0x201f,
+ 0x2039, 0x203a,
+ 0x2e42, 0x2e42,
+ 0x300c, 0x300f,
+ 0x301d, 0x301f,
+ 0xfe41, 0xfe44,
+ 0xff02, 0xff02,
+ 0xff07, 0xff07,
+ 0xff62, 0xff63,
+}; /* CR_Quotation_Mark */
+
+/* 'Terminal_Punctuation': Binary Property */
+static const OnigCodePoint CR_Terminal_Punctuation[] = {
+ 108,
+ 0x0021, 0x0021,
+ 0x002c, 0x002c,
+ 0x002e, 0x002e,
+ 0x003a, 0x003b,
+ 0x003f, 0x003f,
+ 0x037e, 0x037e,
+ 0x0387, 0x0387,
+ 0x0589, 0x0589,
+ 0x05c3, 0x05c3,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061d, 0x061f,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x070a,
+ 0x070c, 0x070c,
+ 0x07f8, 0x07f9,
+ 0x0830, 0x083e,
+ 0x085e, 0x085e,
+ 0x0964, 0x0965,
+ 0x0e5a, 0x0e5b,
+ 0x0f08, 0x0f08,
+ 0x0f0d, 0x0f12,
+ 0x104a, 0x104b,
+ 0x1361, 0x1368,
+ 0x166e, 0x166e,
+ 0x16eb, 0x16ed,
+ 0x1735, 0x1736,
+ 0x17d4, 0x17d6,
+ 0x17da, 0x17da,
+ 0x1802, 0x1805,
+ 0x1808, 0x1809,
+ 0x1944, 0x1945,
+ 0x1aa8, 0x1aab,
+ 0x1b5a, 0x1b5b,
+ 0x1b5d, 0x1b5f,
+ 0x1b7d, 0x1b7e,
+ 0x1c3b, 0x1c3f,
+ 0x1c7e, 0x1c7f,
+ 0x203c, 0x203d,
+ 0x2047, 0x2049,
+ 0x2e2e, 0x2e2e,
+ 0x2e3c, 0x2e3c,
+ 0x2e41, 0x2e41,
+ 0x2e4c, 0x2e4c,
+ 0x2e4e, 0x2e4f,
+ 0x2e53, 0x2e54,
+ 0x3001, 0x3002,
+ 0xa4fe, 0xa4ff,
+ 0xa60d, 0xa60f,
+ 0xa6f3, 0xa6f7,
+ 0xa876, 0xa877,
+ 0xa8ce, 0xa8cf,
+ 0xa92f, 0xa92f,
+ 0xa9c7, 0xa9c9,
+ 0xaa5d, 0xaa5f,
+ 0xaadf, 0xaadf,
+ 0xaaf0, 0xaaf1,
+ 0xabeb, 0xabeb,
+ 0xfe50, 0xfe52,
+ 0xfe54, 0xfe57,
+ 0xff01, 0xff01,
+ 0xff0c, 0xff0c,
+ 0xff0e, 0xff0e,
+ 0xff1a, 0xff1b,
+ 0xff1f, 0xff1f,
+ 0xff61, 0xff61,
+ 0xff64, 0xff64,
+ 0x1039f, 0x1039f,
+ 0x103d0, 0x103d0,
+ 0x10857, 0x10857,
+ 0x1091f, 0x1091f,
+ 0x10a56, 0x10a57,
+ 0x10af0, 0x10af5,
+ 0x10b3a, 0x10b3f,
+ 0x10b99, 0x10b9c,
+ 0x10f55, 0x10f59,
+ 0x10f86, 0x10f89,
+ 0x11047, 0x1104d,
+ 0x110be, 0x110c1,
+ 0x11141, 0x11143,
+ 0x111c5, 0x111c6,
+ 0x111cd, 0x111cd,
+ 0x111de, 0x111df,
+ 0x11238, 0x1123c,
+ 0x112a9, 0x112a9,
+ 0x1144b, 0x1144d,
+ 0x1145a, 0x1145b,
+ 0x115c2, 0x115c5,
+ 0x115c9, 0x115d7,
+ 0x11641, 0x11642,
+ 0x1173c, 0x1173e,
+ 0x11944, 0x11944,
+ 0x11946, 0x11946,
+ 0x11a42, 0x11a43,
+ 0x11a9b, 0x11a9c,
+ 0x11aa1, 0x11aa2,
+ 0x11c41, 0x11c43,
+ 0x11c71, 0x11c71,
+ 0x11ef7, 0x11ef8,
+ 0x11f43, 0x11f44,
+ 0x12470, 0x12474,
+ 0x16a6e, 0x16a6f,
+ 0x16af5, 0x16af5,
+ 0x16b37, 0x16b39,
+ 0x16b44, 0x16b44,
+ 0x16e97, 0x16e98,
+ 0x1bc9f, 0x1bc9f,
+ 0x1da87, 0x1da8a,
+}; /* CR_Terminal_Punctuation */
+
+/* 'Other_Math': Binary Property */
+static const OnigCodePoint CR_Other_Math[] = {
+ 134,
+ 0x005e, 0x005e,
+ 0x03d0, 0x03d2,
+ 0x03d5, 0x03d5,
+ 0x03f0, 0x03f1,
+ 0x03f4, 0x03f5,
+ 0x2016, 0x2016,
+ 0x2032, 0x2034,
+ 0x2040, 0x2040,
+ 0x2061, 0x2064,
+ 0x207d, 0x207e,
+ 0x208d, 0x208e,
+ 0x20d0, 0x20dc,
+ 0x20e1, 0x20e1,
+ 0x20e5, 0x20e6,
+ 0x20eb, 0x20ef,
+ 0x2102, 0x2102,
+ 0x2107, 0x2107,
+ 0x210a, 0x2113,
+ 0x2115, 0x2115,
+ 0x2119, 0x211d,
+ 0x2124, 0x2124,
+ 0x2128, 0x2129,
+ 0x212c, 0x212d,
+ 0x212f, 0x2131,
+ 0x2133, 0x2138,
+ 0x213c, 0x213f,
+ 0x2145, 0x2149,
+ 0x2195, 0x2199,
+ 0x219c, 0x219f,
+ 0x21a1, 0x21a2,
+ 0x21a4, 0x21a5,
+ 0x21a7, 0x21a7,
+ 0x21a9, 0x21ad,
+ 0x21b0, 0x21b1,
+ 0x21b6, 0x21b7,
+ 0x21bc, 0x21cd,
+ 0x21d0, 0x21d1,
+ 0x21d3, 0x21d3,
+ 0x21d5, 0x21db,
+ 0x21dd, 0x21dd,
+ 0x21e4, 0x21e5,
+ 0x2308, 0x230b,
+ 0x23b4, 0x23b5,
+ 0x23b7, 0x23b7,
+ 0x23d0, 0x23d0,
+ 0x23e2, 0x23e2,
+ 0x25a0, 0x25a1,
+ 0x25ae, 0x25b6,
+ 0x25bc, 0x25c0,
+ 0x25c6, 0x25c7,
+ 0x25ca, 0x25cb,
+ 0x25cf, 0x25d3,
+ 0x25e2, 0x25e2,
+ 0x25e4, 0x25e4,
+ 0x25e7, 0x25ec,
+ 0x2605, 0x2606,
+ 0x2640, 0x2640,
+ 0x2642, 0x2642,
+ 0x2660, 0x2663,
+ 0x266d, 0x266e,
+ 0x27c5, 0x27c6,
+ 0x27e6, 0x27ef,
+ 0x2983, 0x2998,
+ 0x29d8, 0x29db,
+ 0x29fc, 0x29fd,
+ 0xfe61, 0xfe61,
+ 0xfe63, 0xfe63,
+ 0xfe68, 0xfe68,
+ 0xff3c, 0xff3c,
+ 0xff3e, 0xff3e,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d6c0,
+ 0x1d6c2, 0x1d6da,
+ 0x1d6dc, 0x1d6fa,
+ 0x1d6fc, 0x1d714,
+ 0x1d716, 0x1d734,
+ 0x1d736, 0x1d74e,
+ 0x1d750, 0x1d76e,
+ 0x1d770, 0x1d788,
+ 0x1d78a, 0x1d7a8,
+ 0x1d7aa, 0x1d7c2,
+ 0x1d7c4, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+}; /* CR_Other_Math */
+
+/* 'Hex_Digit': Binary Property */
+static const OnigCodePoint CR_Hex_Digit[] = {
+ 6,
+ 0x0030, 0x0039,
+ 0x0041, 0x0046,
+ 0x0061, 0x0066,
+ 0xff10, 0xff19,
+ 0xff21, 0xff26,
+ 0xff41, 0xff46,
+}; /* CR_Hex_Digit */
+
+/* 'ASCII_Hex_Digit': Binary Property */
+#define CR_ASCII_Hex_Digit CR_XDigit
+
+/* 'Other_Alphabetic': Binary Property */
+static const OnigCodePoint CR_Other_Alphabetic[] = {
+ 240,
+ 0x0345, 0x0345,
+ 0x05b0, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x061a,
+ 0x064b, 0x0657,
+ 0x0659, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06e1, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ed, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x073f,
+ 0x07a6, 0x07b0,
+ 0x0816, 0x0817,
+ 0x081b, 0x0823,
+ 0x0825, 0x0827,
+ 0x0829, 0x082c,
+ 0x08d4, 0x08df,
+ 0x08e3, 0x08e9,
+ 0x08f0, 0x0903,
+ 0x093a, 0x093b,
+ 0x093e, 0x094c,
+ 0x094e, 0x094f,
+ 0x0955, 0x0957,
+ 0x0962, 0x0963,
+ 0x0981, 0x0983,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x09d7, 0x09d7,
+ 0x09e2, 0x09e3,
+ 0x0a01, 0x0a03,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4c,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0abe, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0afc,
+ 0x0b01, 0x0b03,
+ 0x0b3e, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0b56, 0x0b57,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0bd7, 0x0bd7,
+ 0x0c00, 0x0c04,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4c,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c83,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccc,
+ 0x0cd5, 0x0cd6,
+ 0x0ce2, 0x0ce3,
+ 0x0cf3, 0x0cf3,
+ 0x0d00, 0x0d03,
+ 0x0d3e, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d57, 0x0d57,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d83,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df3,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e4d, 0x0e4d,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0eb9,
+ 0x0ebb, 0x0ebc,
+ 0x0ecd, 0x0ecd,
+ 0x0f71, 0x0f83,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x102b, 0x1036,
+ 0x1038, 0x1038,
+ 0x103b, 0x103e,
+ 0x1056, 0x1059,
+ 0x105e, 0x1060,
+ 0x1062, 0x1064,
+ 0x1067, 0x106d,
+ 0x1071, 0x1074,
+ 0x1082, 0x108d,
+ 0x108f, 0x108f,
+ 0x109a, 0x109d,
+ 0x1712, 0x1713,
+ 0x1732, 0x1733,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b6, 0x17c8,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x192b,
+ 0x1930, 0x1938,
+ 0x1a17, 0x1a1b,
+ 0x1a55, 0x1a5e,
+ 0x1a61, 0x1a74,
+ 0x1abf, 0x1ac0,
+ 0x1acc, 0x1ace,
+ 0x1b00, 0x1b04,
+ 0x1b35, 0x1b43,
+ 0x1b80, 0x1b82,
+ 0x1ba1, 0x1ba9,
+ 0x1bac, 0x1bad,
+ 0x1be7, 0x1bf1,
+ 0x1c24, 0x1c36,
+ 0x1de7, 0x1df4,
+ 0x24b6, 0x24e9,
+ 0x2de0, 0x2dff,
+ 0xa674, 0xa67b,
+ 0xa69e, 0xa69f,
+ 0xa802, 0xa802,
+ 0xa80b, 0xa80b,
+ 0xa823, 0xa827,
+ 0xa880, 0xa881,
+ 0xa8b4, 0xa8c3,
+ 0xa8c5, 0xa8c5,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92a,
+ 0xa947, 0xa952,
+ 0xa980, 0xa983,
+ 0xa9b4, 0xa9bf,
+ 0xa9e5, 0xa9e5,
+ 0xaa29, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4d,
+ 0xaa7b, 0xaa7d,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabe,
+ 0xaaeb, 0xaaef,
+ 0xaaf5, 0xaaf5,
+ 0xabe3, 0xabea,
+ 0xfb1e, 0xfb1e,
+ 0x10376, 0x1037a,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x11000, 0x11002,
+ 0x11038, 0x11045,
+ 0x11073, 0x11074,
+ 0x11080, 0x11082,
+ 0x110b0, 0x110b8,
+ 0x110c2, 0x110c2,
+ 0x11100, 0x11102,
+ 0x11127, 0x11132,
+ 0x11145, 0x11146,
+ 0x11180, 0x11182,
+ 0x111b3, 0x111bf,
+ 0x111ce, 0x111cf,
+ 0x1122c, 0x11234,
+ 0x11237, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112e8,
+ 0x11300, 0x11303,
+ 0x1133e, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134c,
+ 0x11357, 0x11357,
+ 0x11362, 0x11363,
+ 0x11435, 0x11441,
+ 0x11443, 0x11445,
+ 0x114b0, 0x114c1,
+ 0x115af, 0x115b5,
+ 0x115b8, 0x115be,
+ 0x115dc, 0x115dd,
+ 0x11630, 0x1163e,
+ 0x11640, 0x11640,
+ 0x116ab, 0x116b5,
+ 0x1171d, 0x1172a,
+ 0x1182c, 0x11838,
+ 0x11930, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x1193c,
+ 0x11940, 0x11940,
+ 0x11942, 0x11942,
+ 0x119d1, 0x119d7,
+ 0x119da, 0x119df,
+ 0x119e4, 0x119e4,
+ 0x11a01, 0x11a0a,
+ 0x11a35, 0x11a39,
+ 0x11a3b, 0x11a3e,
+ 0x11a51, 0x11a5b,
+ 0x11a8a, 0x11a97,
+ 0x11c2f, 0x11c36,
+ 0x11c38, 0x11c3e,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d41,
+ 0x11d43, 0x11d43,
+ 0x11d47, 0x11d47,
+ 0x11d8a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d96,
+ 0x11ef3, 0x11ef6,
+ 0x11f00, 0x11f01,
+ 0x11f03, 0x11f03,
+ 0x11f34, 0x11f3a,
+ 0x11f3e, 0x11f40,
+ 0x16f4f, 0x16f4f,
+ 0x16f51, 0x16f87,
+ 0x16f8f, 0x16f92,
+ 0x16ff0, 0x16ff1,
+ 0x1bc9e, 0x1bc9e,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e08f, 0x1e08f,
+ 0x1e947, 0x1e947,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+}; /* CR_Other_Alphabetic */
+
+/* 'Ideographic': Binary Property */
+static const OnigCodePoint CR_Ideographic[] = {
+ 20,
+ 0x3006, 0x3007,
+ 0x3021, 0x3029,
+ 0x3038, 0x303a,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0x9fff,
+ 0xf900, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0x16fe4, 0x16fe4,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1b170, 0x1b2fb,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Ideographic */
+
+/* 'Diacritic': Binary Property */
+static const OnigCodePoint CR_Diacritic[] = {
+ 195,
+ 0x005e, 0x005e,
+ 0x0060, 0x0060,
+ 0x00a8, 0x00a8,
+ 0x00af, 0x00af,
+ 0x00b4, 0x00b4,
+ 0x00b7, 0x00b8,
+ 0x02b0, 0x034e,
+ 0x0350, 0x0357,
+ 0x035d, 0x0362,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x0384, 0x0385,
+ 0x0483, 0x0487,
+ 0x0559, 0x0559,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c4,
+ 0x064b, 0x0652,
+ 0x0657, 0x0658,
+ 0x06df, 0x06e0,
+ 0x06e5, 0x06e6,
+ 0x06ea, 0x06ec,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f5,
+ 0x0818, 0x0819,
+ 0x0898, 0x089f,
+ 0x08c9, 0x08d2,
+ 0x08e3, 0x08fe,
+ 0x093c, 0x093c,
+ 0x094d, 0x094d,
+ 0x0951, 0x0954,
+ 0x0971, 0x0971,
+ 0x09bc, 0x09bc,
+ 0x09cd, 0x09cd,
+ 0x0a3c, 0x0a3c,
+ 0x0a4d, 0x0a4d,
+ 0x0abc, 0x0abc,
+ 0x0acd, 0x0acd,
+ 0x0afd, 0x0aff,
+ 0x0b3c, 0x0b3c,
+ 0x0b4d, 0x0b4d,
+ 0x0b55, 0x0b55,
+ 0x0bcd, 0x0bcd,
+ 0x0c3c, 0x0c3c,
+ 0x0c4d, 0x0c4d,
+ 0x0cbc, 0x0cbc,
+ 0x0ccd, 0x0ccd,
+ 0x0d3b, 0x0d3c,
+ 0x0d4d, 0x0d4d,
+ 0x0dca, 0x0dca,
+ 0x0e47, 0x0e4c,
+ 0x0e4e, 0x0e4e,
+ 0x0eba, 0x0eba,
+ 0x0ec8, 0x0ecc,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f3e, 0x0f3f,
+ 0x0f82, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0fc6, 0x0fc6,
+ 0x1037, 0x1037,
+ 0x1039, 0x103a,
+ 0x1063, 0x1064,
+ 0x1069, 0x106d,
+ 0x1087, 0x108d,
+ 0x108f, 0x108f,
+ 0x109a, 0x109b,
+ 0x135d, 0x135f,
+ 0x1714, 0x1715,
+ 0x17c9, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x1939, 0x193b,
+ 0x1a75, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1ab0, 0x1abe,
+ 0x1ac1, 0x1acb,
+ 0x1b34, 0x1b34,
+ 0x1b44, 0x1b44,
+ 0x1b6b, 0x1b73,
+ 0x1baa, 0x1bab,
+ 0x1c36, 0x1c37,
+ 0x1c78, 0x1c7d,
+ 0x1cd0, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf7, 0x1cf9,
+ 0x1d2c, 0x1d6a,
+ 0x1dc4, 0x1dcf,
+ 0x1df5, 0x1dff,
+ 0x1fbd, 0x1fbd,
+ 0x1fbf, 0x1fc1,
+ 0x1fcd, 0x1fcf,
+ 0x1fdd, 0x1fdf,
+ 0x1fed, 0x1fef,
+ 0x1ffd, 0x1ffe,
+ 0x2cef, 0x2cf1,
+ 0x2e2f, 0x2e2f,
+ 0x302a, 0x302f,
+ 0x3099, 0x309c,
+ 0x30fc, 0x30fc,
+ 0xa66f, 0xa66f,
+ 0xa67c, 0xa67d,
+ 0xa67f, 0xa67f,
+ 0xa69c, 0xa69d,
+ 0xa6f0, 0xa6f1,
+ 0xa700, 0xa721,
+ 0xa788, 0xa78a,
+ 0xa7f8, 0xa7f9,
+ 0xa8c4, 0xa8c4,
+ 0xa8e0, 0xa8f1,
+ 0xa92b, 0xa92e,
+ 0xa953, 0xa953,
+ 0xa9b3, 0xa9b3,
+ 0xa9c0, 0xa9c0,
+ 0xa9e5, 0xa9e5,
+ 0xaa7b, 0xaa7d,
+ 0xaabf, 0xaac2,
+ 0xaaf6, 0xaaf6,
+ 0xab5b, 0xab5f,
+ 0xab69, 0xab6b,
+ 0xabec, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfe20, 0xfe2f,
+ 0xff3e, 0xff3e,
+ 0xff40, 0xff40,
+ 0xff70, 0xff70,
+ 0xff9e, 0xff9f,
+ 0xffe3, 0xffe3,
+ 0x102e0, 0x102e0,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10ae5, 0x10ae6,
+ 0x10d22, 0x10d27,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11046, 0x11046,
+ 0x11070, 0x11070,
+ 0x110b9, 0x110ba,
+ 0x11133, 0x11134,
+ 0x11173, 0x11173,
+ 0x111c0, 0x111c0,
+ 0x111ca, 0x111cc,
+ 0x11235, 0x11236,
+ 0x112e9, 0x112ea,
+ 0x1133c, 0x1133c,
+ 0x1134d, 0x1134d,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11442, 0x11442,
+ 0x11446, 0x11446,
+ 0x114c2, 0x114c3,
+ 0x115bf, 0x115c0,
+ 0x1163f, 0x1163f,
+ 0x116b6, 0x116b7,
+ 0x1172b, 0x1172b,
+ 0x11839, 0x1183a,
+ 0x1193d, 0x1193e,
+ 0x11943, 0x11943,
+ 0x119e0, 0x119e0,
+ 0x11a34, 0x11a34,
+ 0x11a47, 0x11a47,
+ 0x11a99, 0x11a99,
+ 0x11c3f, 0x11c3f,
+ 0x11d42, 0x11d42,
+ 0x11d44, 0x11d45,
+ 0x11d97, 0x11d97,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16f8f, 0x16f9f,
+ 0x16ff0, 0x16ff1,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d167, 0x1d169,
+ 0x1d16d, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1e030, 0x1e06d,
+ 0x1e130, 0x1e136,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e946,
+ 0x1e948, 0x1e94a,
+}; /* CR_Diacritic */
+
+/* 'Extender': Binary Property */
+static const OnigCodePoint CR_Extender[] = {
+ 33,
+ 0x00b7, 0x00b7,
+ 0x02d0, 0x02d1,
+ 0x0640, 0x0640,
+ 0x07fa, 0x07fa,
+ 0x0b55, 0x0b55,
+ 0x0e46, 0x0e46,
+ 0x0ec6, 0x0ec6,
+ 0x180a, 0x180a,
+ 0x1843, 0x1843,
+ 0x1aa7, 0x1aa7,
+ 0x1c36, 0x1c36,
+ 0x1c7b, 0x1c7b,
+ 0x3005, 0x3005,
+ 0x3031, 0x3035,
+ 0x309d, 0x309e,
+ 0x30fc, 0x30fe,
+ 0xa015, 0xa015,
+ 0xa60c, 0xa60c,
+ 0xa9cf, 0xa9cf,
+ 0xa9e6, 0xa9e6,
+ 0xaa70, 0xaa70,
+ 0xaadd, 0xaadd,
+ 0xaaf3, 0xaaf4,
+ 0xff70, 0xff70,
+ 0x10781, 0x10782,
+ 0x1135d, 0x1135d,
+ 0x115c6, 0x115c8,
+ 0x11a98, 0x11a98,
+ 0x16b42, 0x16b43,
+ 0x16fe0, 0x16fe1,
+ 0x16fe3, 0x16fe3,
+ 0x1e13c, 0x1e13d,
+ 0x1e944, 0x1e946,
+}; /* CR_Extender */
+
+/* 'Other_Lowercase': Binary Property */
+static const OnigCodePoint CR_Other_Lowercase[] = {
+ 28,
+ 0x00aa, 0x00aa,
+ 0x00ba, 0x00ba,
+ 0x02b0, 0x02b8,
+ 0x02c0, 0x02c1,
+ 0x02e0, 0x02e4,
+ 0x0345, 0x0345,
+ 0x037a, 0x037a,
+ 0x10fc, 0x10fc,
+ 0x1d2c, 0x1d6a,
+ 0x1d78, 0x1d78,
+ 0x1d9b, 0x1dbf,
+ 0x2071, 0x2071,
+ 0x207f, 0x207f,
+ 0x2090, 0x209c,
+ 0x2170, 0x217f,
+ 0x24d0, 0x24e9,
+ 0x2c7c, 0x2c7d,
+ 0xa69c, 0xa69d,
+ 0xa770, 0xa770,
+ 0xa7f2, 0xa7f4,
+ 0xa7f8, 0xa7f9,
+ 0xab5c, 0xab5f,
+ 0xab69, 0xab69,
+ 0x10780, 0x10780,
+ 0x10783, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x1e030, 0x1e06d,
+}; /* CR_Other_Lowercase */
+
+/* 'Other_Uppercase': Binary Property */
+static const OnigCodePoint CR_Other_Uppercase[] = {
+ 5,
+ 0x2160, 0x216f,
+ 0x24b6, 0x24cf,
+ 0x1f130, 0x1f149,
+ 0x1f150, 0x1f169,
+ 0x1f170, 0x1f189,
+}; /* CR_Other_Uppercase */
+
+/* 'Noncharacter_Code_Point': Binary Property */
+static const OnigCodePoint CR_Noncharacter_Code_Point[] = {
+ 18,
+ 0xfdd0, 0xfdef,
+ 0xfffe, 0xffff,
+ 0x1fffe, 0x1ffff,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xefffe, 0xeffff,
+ 0xffffe, 0xfffff,
+ 0x10fffe, 0x10ffff,
+}; /* CR_Noncharacter_Code_Point */
+
+/* 'Other_Grapheme_Extend': Binary Property */
+static const OnigCodePoint CR_Other_Grapheme_Extend[] = {
+ 25,
+ 0x09be, 0x09be,
+ 0x09d7, 0x09d7,
+ 0x0b3e, 0x0b3e,
+ 0x0b57, 0x0b57,
+ 0x0bbe, 0x0bbe,
+ 0x0bd7, 0x0bd7,
+ 0x0cc2, 0x0cc2,
+ 0x0cd5, 0x0cd6,
+ 0x0d3e, 0x0d3e,
+ 0x0d57, 0x0d57,
+ 0x0dcf, 0x0dcf,
+ 0x0ddf, 0x0ddf,
+ 0x1b35, 0x1b35,
+ 0x200c, 0x200c,
+ 0x302e, 0x302f,
+ 0xff9e, 0xff9f,
+ 0x1133e, 0x1133e,
+ 0x11357, 0x11357,
+ 0x114b0, 0x114b0,
+ 0x114bd, 0x114bd,
+ 0x115af, 0x115af,
+ 0x11930, 0x11930,
+ 0x1d165, 0x1d165,
+ 0x1d16e, 0x1d172,
+ 0xe0020, 0xe007f,
+}; /* CR_Other_Grapheme_Extend */
+
+/* 'IDS_Binary_Operator': Binary Property */
+static const OnigCodePoint CR_IDS_Binary_Operator[] = {
+ 2,
+ 0x2ff0, 0x2ff1,
+ 0x2ff4, 0x2ffb,
+}; /* CR_IDS_Binary_Operator */
+
+/* 'IDS_Trinary_Operator': Binary Property */
+static const OnigCodePoint CR_IDS_Trinary_Operator[] = {
+ 1,
+ 0x2ff2, 0x2ff3,
+}; /* CR_IDS_Trinary_Operator */
+
+/* 'Radical': Binary Property */
+static const OnigCodePoint CR_Radical[] = {
+ 3,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+}; /* CR_Radical */
+
+/* 'Unified_Ideograph': Binary Property */
+static const OnigCodePoint CR_Unified_Ideograph[] = {
+ 16,
+ 0x3400, 0x4dbf,
+ 0x4e00, 0x9fff,
+ 0xfa0e, 0xfa0f,
+ 0xfa11, 0xfa11,
+ 0xfa13, 0xfa14,
+ 0xfa1f, 0xfa1f,
+ 0xfa21, 0xfa21,
+ 0xfa23, 0xfa24,
+ 0xfa27, 0xfa29,
+ 0x20000, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x30000, 0x3134a,
+ 0x31350, 0x323af,
+}; /* CR_Unified_Ideograph */
+
+/* 'Other_Default_Ignorable_Code_Point': Binary Property */
+static const OnigCodePoint CR_Other_Default_Ignorable_Code_Point[] = {
+ 11,
+ 0x034f, 0x034f,
+ 0x115f, 0x1160,
+ 0x17b4, 0x17b5,
+ 0x2065, 0x2065,
+ 0x3164, 0x3164,
+ 0xffa0, 0xffa0,
+ 0xfff0, 0xfff8,
+ 0xe0000, 0xe0000,
+ 0xe0002, 0xe001f,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0xe0fff,
+}; /* CR_Other_Default_Ignorable_Code_Point */
+
+/* 'Deprecated': Binary Property */
+static const OnigCodePoint CR_Deprecated[] = {
+ 8,
+ 0x0149, 0x0149,
+ 0x0673, 0x0673,
+ 0x0f77, 0x0f77,
+ 0x0f79, 0x0f79,
+ 0x17a3, 0x17a4,
+ 0x206a, 0x206f,
+ 0x2329, 0x232a,
+ 0xe0001, 0xe0001,
+}; /* CR_Deprecated */
+
+/* 'Soft_Dotted': Binary Property */
+static const OnigCodePoint CR_Soft_Dotted[] = {
+ 34,
+ 0x0069, 0x006a,
+ 0x012f, 0x012f,
+ 0x0249, 0x0249,
+ 0x0268, 0x0268,
+ 0x029d, 0x029d,
+ 0x02b2, 0x02b2,
+ 0x03f3, 0x03f3,
+ 0x0456, 0x0456,
+ 0x0458, 0x0458,
+ 0x1d62, 0x1d62,
+ 0x1d96, 0x1d96,
+ 0x1da4, 0x1da4,
+ 0x1da8, 0x1da8,
+ 0x1e2d, 0x1e2d,
+ 0x1ecb, 0x1ecb,
+ 0x2071, 0x2071,
+ 0x2148, 0x2149,
+ 0x2c7c, 0x2c7c,
+ 0x1d422, 0x1d423,
+ 0x1d456, 0x1d457,
+ 0x1d48a, 0x1d48b,
+ 0x1d4be, 0x1d4bf,
+ 0x1d4f2, 0x1d4f3,
+ 0x1d526, 0x1d527,
+ 0x1d55a, 0x1d55b,
+ 0x1d58e, 0x1d58f,
+ 0x1d5c2, 0x1d5c3,
+ 0x1d5f6, 0x1d5f7,
+ 0x1d62a, 0x1d62b,
+ 0x1d65e, 0x1d65f,
+ 0x1d692, 0x1d693,
+ 0x1df1a, 0x1df1a,
+ 0x1e04c, 0x1e04d,
+ 0x1e068, 0x1e068,
+}; /* CR_Soft_Dotted */
+
+/* 'Logical_Order_Exception': Binary Property */
+static const OnigCodePoint CR_Logical_Order_Exception[] = {
+ 7,
+ 0x0e40, 0x0e44,
+ 0x0ec0, 0x0ec4,
+ 0x19b5, 0x19b7,
+ 0x19ba, 0x19ba,
+ 0xaab5, 0xaab6,
+ 0xaab9, 0xaab9,
+ 0xaabb, 0xaabc,
+}; /* CR_Logical_Order_Exception */
+
+/* 'Other_ID_Start': Binary Property */
+static const OnigCodePoint CR_Other_ID_Start[] = {
+ 4,
+ 0x1885, 0x1886,
+ 0x2118, 0x2118,
+ 0x212e, 0x212e,
+ 0x309b, 0x309c,
+}; /* CR_Other_ID_Start */
+
+/* 'Other_ID_Continue': Binary Property */
+static const OnigCodePoint CR_Other_ID_Continue[] = {
+ 4,
+ 0x00b7, 0x00b7,
+ 0x0387, 0x0387,
+ 0x1369, 0x1371,
+ 0x19da, 0x19da,
+}; /* CR_Other_ID_Continue */
+
+/* 'Sentence_Terminal': Binary Property */
+static const OnigCodePoint CR_Sentence_Terminal[] = {
+ 80,
+ 0x0021, 0x0021,
+ 0x002e, 0x002e,
+ 0x003f, 0x003f,
+ 0x0589, 0x0589,
+ 0x061d, 0x061f,
+ 0x06d4, 0x06d4,
+ 0x0700, 0x0702,
+ 0x07f9, 0x07f9,
+ 0x0837, 0x0837,
+ 0x0839, 0x0839,
+ 0x083d, 0x083e,
+ 0x0964, 0x0965,
+ 0x104a, 0x104b,
+ 0x1362, 0x1362,
+ 0x1367, 0x1368,
+ 0x166e, 0x166e,
+ 0x1735, 0x1736,
+ 0x1803, 0x1803,
+ 0x1809, 0x1809,
+ 0x1944, 0x1945,
+ 0x1aa8, 0x1aab,
+ 0x1b5a, 0x1b5b,
+ 0x1b5e, 0x1b5f,
+ 0x1b7d, 0x1b7e,
+ 0x1c3b, 0x1c3c,
+ 0x1c7e, 0x1c7f,
+ 0x203c, 0x203d,
+ 0x2047, 0x2049,
+ 0x2e2e, 0x2e2e,
+ 0x2e3c, 0x2e3c,
+ 0x2e53, 0x2e54,
+ 0x3002, 0x3002,
+ 0xa4ff, 0xa4ff,
+ 0xa60e, 0xa60f,
+ 0xa6f3, 0xa6f3,
+ 0xa6f7, 0xa6f7,
+ 0xa876, 0xa877,
+ 0xa8ce, 0xa8cf,
+ 0xa92f, 0xa92f,
+ 0xa9c8, 0xa9c9,
+ 0xaa5d, 0xaa5f,
+ 0xaaf0, 0xaaf1,
+ 0xabeb, 0xabeb,
+ 0xfe52, 0xfe52,
+ 0xfe56, 0xfe57,
+ 0xff01, 0xff01,
+ 0xff0e, 0xff0e,
+ 0xff1f, 0xff1f,
+ 0xff61, 0xff61,
+ 0x10a56, 0x10a57,
+ 0x10f55, 0x10f59,
+ 0x10f86, 0x10f89,
+ 0x11047, 0x11048,
+ 0x110be, 0x110c1,
+ 0x11141, 0x11143,
+ 0x111c5, 0x111c6,
+ 0x111cd, 0x111cd,
+ 0x111de, 0x111df,
+ 0x11238, 0x11239,
+ 0x1123b, 0x1123c,
+ 0x112a9, 0x112a9,
+ 0x1144b, 0x1144c,
+ 0x115c2, 0x115c3,
+ 0x115c9, 0x115d7,
+ 0x11641, 0x11642,
+ 0x1173c, 0x1173e,
+ 0x11944, 0x11944,
+ 0x11946, 0x11946,
+ 0x11a42, 0x11a43,
+ 0x11a9b, 0x11a9c,
+ 0x11c41, 0x11c42,
+ 0x11ef7, 0x11ef8,
+ 0x11f43, 0x11f44,
+ 0x16a6e, 0x16a6f,
+ 0x16af5, 0x16af5,
+ 0x16b37, 0x16b38,
+ 0x16b44, 0x16b44,
+ 0x16e98, 0x16e98,
+ 0x1bc9f, 0x1bc9f,
+ 0x1da88, 0x1da88,
+}; /* CR_Sentence_Terminal */
+
+/* 'Variation_Selector': Binary Property */
+static const OnigCodePoint CR_Variation_Selector[] = {
+ 4,
+ 0x180b, 0x180d,
+ 0x180f, 0x180f,
+ 0xfe00, 0xfe0f,
+ 0xe0100, 0xe01ef,
+}; /* CR_Variation_Selector */
+
+/* 'Pattern_White_Space': Binary Property */
+static const OnigCodePoint CR_Pattern_White_Space[] = {
+ 5,
+ 0x0009, 0x000d,
+ 0x0020, 0x0020,
+ 0x0085, 0x0085,
+ 0x200e, 0x200f,
+ 0x2028, 0x2029,
+}; /* CR_Pattern_White_Space */
+
+/* 'Pattern_Syntax': Binary Property */
+static const OnigCodePoint CR_Pattern_Syntax[] = {
+ 28,
+ 0x0021, 0x002f,
+ 0x003a, 0x0040,
+ 0x005b, 0x005e,
+ 0x0060, 0x0060,
+ 0x007b, 0x007e,
+ 0x00a1, 0x00a7,
+ 0x00a9, 0x00a9,
+ 0x00ab, 0x00ac,
+ 0x00ae, 0x00ae,
+ 0x00b0, 0x00b1,
+ 0x00b6, 0x00b6,
+ 0x00bb, 0x00bb,
+ 0x00bf, 0x00bf,
+ 0x00d7, 0x00d7,
+ 0x00f7, 0x00f7,
+ 0x2010, 0x2027,
+ 0x2030, 0x203e,
+ 0x2041, 0x2053,
+ 0x2055, 0x205e,
+ 0x2190, 0x245f,
+ 0x2500, 0x2775,
+ 0x2794, 0x2bff,
+ 0x2e00, 0x2e7f,
+ 0x3001, 0x3003,
+ 0x3008, 0x3020,
+ 0x3030, 0x3030,
+ 0xfd3e, 0xfd3f,
+ 0xfe45, 0xfe46,
+}; /* CR_Pattern_Syntax */
+
+/* 'Prepended_Concatenation_Mark': Binary Property */
+static const OnigCodePoint CR_Prepended_Concatenation_Mark[] = {
+ 7,
+ 0x0600, 0x0605,
+ 0x06dd, 0x06dd,
+ 0x070f, 0x070f,
+ 0x0890, 0x0891,
+ 0x08e2, 0x08e2,
+ 0x110bd, 0x110bd,
+ 0x110cd, 0x110cd,
+}; /* CR_Prepended_Concatenation_Mark */
+
+/* 'Regional_Indicator': Binary Property */
+static const OnigCodePoint CR_Regional_Indicator[] = {
+ 1,
+ 0x1f1e6, 0x1f1ff,
+}; /* CR_Regional_Indicator */
+
+/* 'Emoji': Emoji */
+static const OnigCodePoint CR_Emoji[] = {
+ 151,
+ 0x0023, 0x0023,
+ 0x002a, 0x002a,
+ 0x0030, 0x0039,
+ 0x00a9, 0x00a9,
+ 0x00ae, 0x00ae,
+ 0x203c, 0x203c,
+ 0x2049, 0x2049,
+ 0x2122, 0x2122,
+ 0x2139, 0x2139,
+ 0x2194, 0x2199,
+ 0x21a9, 0x21aa,
+ 0x231a, 0x231b,
+ 0x2328, 0x2328,
+ 0x23cf, 0x23cf,
+ 0x23e9, 0x23f3,
+ 0x23f8, 0x23fa,
+ 0x24c2, 0x24c2,
+ 0x25aa, 0x25ab,
+ 0x25b6, 0x25b6,
+ 0x25c0, 0x25c0,
+ 0x25fb, 0x25fe,
+ 0x2600, 0x2604,
+ 0x260e, 0x260e,
+ 0x2611, 0x2611,
+ 0x2614, 0x2615,
+ 0x2618, 0x2618,
+ 0x261d, 0x261d,
+ 0x2620, 0x2620,
+ 0x2622, 0x2623,
+ 0x2626, 0x2626,
+ 0x262a, 0x262a,
+ 0x262e, 0x262f,
+ 0x2638, 0x263a,
+ 0x2640, 0x2640,
+ 0x2642, 0x2642,
+ 0x2648, 0x2653,
+ 0x265f, 0x2660,
+ 0x2663, 0x2663,
+ 0x2665, 0x2666,
+ 0x2668, 0x2668,
+ 0x267b, 0x267b,
+ 0x267e, 0x267f,
+ 0x2692, 0x2697,
+ 0x2699, 0x2699,
+ 0x269b, 0x269c,
+ 0x26a0, 0x26a1,
+ 0x26a7, 0x26a7,
+ 0x26aa, 0x26ab,
+ 0x26b0, 0x26b1,
+ 0x26bd, 0x26be,
+ 0x26c4, 0x26c5,
+ 0x26c8, 0x26c8,
+ 0x26ce, 0x26cf,
+ 0x26d1, 0x26d1,
+ 0x26d3, 0x26d4,
+ 0x26e9, 0x26ea,
+ 0x26f0, 0x26f5,
+ 0x26f7, 0x26fa,
+ 0x26fd, 0x26fd,
+ 0x2702, 0x2702,
+ 0x2705, 0x2705,
+ 0x2708, 0x270d,
+ 0x270f, 0x270f,
+ 0x2712, 0x2712,
+ 0x2714, 0x2714,
+ 0x2716, 0x2716,
+ 0x271d, 0x271d,
+ 0x2721, 0x2721,
+ 0x2728, 0x2728,
+ 0x2733, 0x2734,
+ 0x2744, 0x2744,
+ 0x2747, 0x2747,
+ 0x274c, 0x274c,
+ 0x274e, 0x274e,
+ 0x2753, 0x2755,
+ 0x2757, 0x2757,
+ 0x2763, 0x2764,
+ 0x2795, 0x2797,
+ 0x27a1, 0x27a1,
+ 0x27b0, 0x27b0,
+ 0x27bf, 0x27bf,
+ 0x2934, 0x2935,
+ 0x2b05, 0x2b07,
+ 0x2b1b, 0x2b1c,
+ 0x2b50, 0x2b50,
+ 0x2b55, 0x2b55,
+ 0x3030, 0x3030,
+ 0x303d, 0x303d,
+ 0x3297, 0x3297,
+ 0x3299, 0x3299,
+ 0x1f004, 0x1f004,
+ 0x1f0cf, 0x1f0cf,
+ 0x1f170, 0x1f171,
+ 0x1f17e, 0x1f17f,
+ 0x1f18e, 0x1f18e,
+ 0x1f191, 0x1f19a,
+ 0x1f1e6, 0x1f1ff,
+ 0x1f201, 0x1f202,
+ 0x1f21a, 0x1f21a,
+ 0x1f22f, 0x1f22f,
+ 0x1f232, 0x1f23a,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f321,
+ 0x1f324, 0x1f393,
+ 0x1f396, 0x1f397,
+ 0x1f399, 0x1f39b,
+ 0x1f39e, 0x1f3f0,
+ 0x1f3f3, 0x1f3f5,
+ 0x1f3f7, 0x1f4fd,
+ 0x1f4ff, 0x1f53d,
+ 0x1f549, 0x1f54e,
+ 0x1f550, 0x1f567,
+ 0x1f56f, 0x1f570,
+ 0x1f573, 0x1f57a,
+ 0x1f587, 0x1f587,
+ 0x1f58a, 0x1f58d,
+ 0x1f590, 0x1f590,
+ 0x1f595, 0x1f596,
+ 0x1f5a4, 0x1f5a5,
+ 0x1f5a8, 0x1f5a8,
+ 0x1f5b1, 0x1f5b2,
+ 0x1f5bc, 0x1f5bc,
+ 0x1f5c2, 0x1f5c4,
+ 0x1f5d1, 0x1f5d3,
+ 0x1f5dc, 0x1f5de,
+ 0x1f5e1, 0x1f5e1,
+ 0x1f5e3, 0x1f5e3,
+ 0x1f5e8, 0x1f5e8,
+ 0x1f5ef, 0x1f5ef,
+ 0x1f5f3, 0x1f5f3,
+ 0x1f5fa, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f6cb, 0x1f6d2,
+ 0x1f6d5, 0x1f6d7,
+ 0x1f6dc, 0x1f6e5,
+ 0x1f6e9, 0x1f6e9,
+ 0x1f6eb, 0x1f6ec,
+ 0x1f6f0, 0x1f6f0,
+ 0x1f6f3, 0x1f6fc,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f90c, 0x1f93a,
+ 0x1f93c, 0x1f945,
+ 0x1f947, 0x1f9ff,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+}; /* CR_Emoji */
+
+/* 'Emoji_Presentation': Emoji */
+static const OnigCodePoint CR_Emoji_Presentation[] = {
+ 81,
+ 0x231a, 0x231b,
+ 0x23e9, 0x23ec,
+ 0x23f0, 0x23f0,
+ 0x23f3, 0x23f3,
+ 0x25fd, 0x25fe,
+ 0x2614, 0x2615,
+ 0x2648, 0x2653,
+ 0x267f, 0x267f,
+ 0x2693, 0x2693,
+ 0x26a1, 0x26a1,
+ 0x26aa, 0x26ab,
+ 0x26bd, 0x26be,
+ 0x26c4, 0x26c5,
+ 0x26ce, 0x26ce,
+ 0x26d4, 0x26d4,
+ 0x26ea, 0x26ea,
+ 0x26f2, 0x26f3,
+ 0x26f5, 0x26f5,
+ 0x26fa, 0x26fa,
+ 0x26fd, 0x26fd,
+ 0x2705, 0x2705,
+ 0x270a, 0x270b,
+ 0x2728, 0x2728,
+ 0x274c, 0x274c,
+ 0x274e, 0x274e,
+ 0x2753, 0x2755,
+ 0x2757, 0x2757,
+ 0x2795, 0x2797,
+ 0x27b0, 0x27b0,
+ 0x27bf, 0x27bf,
+ 0x2b1b, 0x2b1c,
+ 0x2b50, 0x2b50,
+ 0x2b55, 0x2b55,
+ 0x1f004, 0x1f004,
+ 0x1f0cf, 0x1f0cf,
+ 0x1f18e, 0x1f18e,
+ 0x1f191, 0x1f19a,
+ 0x1f1e6, 0x1f1ff,
+ 0x1f201, 0x1f201,
+ 0x1f21a, 0x1f21a,
+ 0x1f22f, 0x1f22f,
+ 0x1f232, 0x1f236,
+ 0x1f238, 0x1f23a,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f320,
+ 0x1f32d, 0x1f335,
+ 0x1f337, 0x1f37c,
+ 0x1f37e, 0x1f393,
+ 0x1f3a0, 0x1f3ca,
+ 0x1f3cf, 0x1f3d3,
+ 0x1f3e0, 0x1f3f0,
+ 0x1f3f4, 0x1f3f4,
+ 0x1f3f8, 0x1f43e,
+ 0x1f440, 0x1f440,
+ 0x1f442, 0x1f4fc,
+ 0x1f4ff, 0x1f53d,
+ 0x1f54b, 0x1f54e,
+ 0x1f550, 0x1f567,
+ 0x1f57a, 0x1f57a,
+ 0x1f595, 0x1f596,
+ 0x1f5a4, 0x1f5a4,
+ 0x1f5fb, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f6cc, 0x1f6cc,
+ 0x1f6d0, 0x1f6d2,
+ 0x1f6d5, 0x1f6d7,
+ 0x1f6dc, 0x1f6df,
+ 0x1f6eb, 0x1f6ec,
+ 0x1f6f4, 0x1f6fc,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f90c, 0x1f93a,
+ 0x1f93c, 0x1f945,
+ 0x1f947, 0x1f9ff,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+}; /* CR_Emoji_Presentation */
+
+/* 'Emoji_Modifier': Emoji */
+static const OnigCodePoint CR_Emoji_Modifier[] = {
+ 1,
+ 0x1f3fb, 0x1f3ff,
+}; /* CR_Emoji_Modifier */
+
+/* 'Emoji_Modifier_Base': Emoji */
+static const OnigCodePoint CR_Emoji_Modifier_Base[] = {
+ 40,
+ 0x261d, 0x261d,
+ 0x26f9, 0x26f9,
+ 0x270a, 0x270d,
+ 0x1f385, 0x1f385,
+ 0x1f3c2, 0x1f3c4,
+ 0x1f3c7, 0x1f3c7,
+ 0x1f3ca, 0x1f3cc,
+ 0x1f442, 0x1f443,
+ 0x1f446, 0x1f450,
+ 0x1f466, 0x1f478,
+ 0x1f47c, 0x1f47c,
+ 0x1f481, 0x1f483,
+ 0x1f485, 0x1f487,
+ 0x1f48f, 0x1f48f,
+ 0x1f491, 0x1f491,
+ 0x1f4aa, 0x1f4aa,
+ 0x1f574, 0x1f575,
+ 0x1f57a, 0x1f57a,
+ 0x1f590, 0x1f590,
+ 0x1f595, 0x1f596,
+ 0x1f645, 0x1f647,
+ 0x1f64b, 0x1f64f,
+ 0x1f6a3, 0x1f6a3,
+ 0x1f6b4, 0x1f6b6,
+ 0x1f6c0, 0x1f6c0,
+ 0x1f6cc, 0x1f6cc,
+ 0x1f90c, 0x1f90c,
+ 0x1f90f, 0x1f90f,
+ 0x1f918, 0x1f91f,
+ 0x1f926, 0x1f926,
+ 0x1f930, 0x1f939,
+ 0x1f93c, 0x1f93e,
+ 0x1f977, 0x1f977,
+ 0x1f9b5, 0x1f9b6,
+ 0x1f9b8, 0x1f9b9,
+ 0x1f9bb, 0x1f9bb,
+ 0x1f9cd, 0x1f9cf,
+ 0x1f9d1, 0x1f9dd,
+ 0x1fac3, 0x1fac5,
+ 0x1faf0, 0x1faf8,
+}; /* CR_Emoji_Modifier_Base */
+
+/* 'Emoji_Component': Emoji */
+static const OnigCodePoint CR_Emoji_Component[] = {
+ 10,
+ 0x0023, 0x0023,
+ 0x002a, 0x002a,
+ 0x0030, 0x0039,
+ 0x200d, 0x200d,
+ 0x20e3, 0x20e3,
+ 0xfe0f, 0xfe0f,
+ 0x1f1e6, 0x1f1ff,
+ 0x1f3fb, 0x1f3ff,
+ 0x1f9b0, 0x1f9b3,
+ 0xe0020, 0xe007f,
+}; /* CR_Emoji_Component */
+
+/* 'Extended_Pictographic': Emoji */
+static const OnigCodePoint CR_Extended_Pictographic[] = {
+ 78,
+ 0x00a9, 0x00a9,
+ 0x00ae, 0x00ae,
+ 0x203c, 0x203c,
+ 0x2049, 0x2049,
+ 0x2122, 0x2122,
+ 0x2139, 0x2139,
+ 0x2194, 0x2199,
+ 0x21a9, 0x21aa,
+ 0x231a, 0x231b,
+ 0x2328, 0x2328,
+ 0x2388, 0x2388,
+ 0x23cf, 0x23cf,
+ 0x23e9, 0x23f3,
+ 0x23f8, 0x23fa,
+ 0x24c2, 0x24c2,
+ 0x25aa, 0x25ab,
+ 0x25b6, 0x25b6,
+ 0x25c0, 0x25c0,
+ 0x25fb, 0x25fe,
+ 0x2600, 0x2605,
+ 0x2607, 0x2612,
+ 0x2614, 0x2685,
+ 0x2690, 0x2705,
+ 0x2708, 0x2712,
+ 0x2714, 0x2714,
+ 0x2716, 0x2716,
+ 0x271d, 0x271d,
+ 0x2721, 0x2721,
+ 0x2728, 0x2728,
+ 0x2733, 0x2734,
+ 0x2744, 0x2744,
+ 0x2747, 0x2747,
+ 0x274c, 0x274c,
+ 0x274e, 0x274e,
+ 0x2753, 0x2755,
+ 0x2757, 0x2757,
+ 0x2763, 0x2767,
+ 0x2795, 0x2797,
+ 0x27a1, 0x27a1,
+ 0x27b0, 0x27b0,
+ 0x27bf, 0x27bf,
+ 0x2934, 0x2935,
+ 0x2b05, 0x2b07,
+ 0x2b1b, 0x2b1c,
+ 0x2b50, 0x2b50,
+ 0x2b55, 0x2b55,
+ 0x3030, 0x3030,
+ 0x303d, 0x303d,
+ 0x3297, 0x3297,
+ 0x3299, 0x3299,
+ 0x1f000, 0x1f0ff,
+ 0x1f10d, 0x1f10f,
+ 0x1f12f, 0x1f12f,
+ 0x1f16c, 0x1f171,
+ 0x1f17e, 0x1f17f,
+ 0x1f18e, 0x1f18e,
+ 0x1f191, 0x1f19a,
+ 0x1f1ad, 0x1f1e5,
+ 0x1f201, 0x1f20f,
+ 0x1f21a, 0x1f21a,
+ 0x1f22f, 0x1f22f,
+ 0x1f232, 0x1f23a,
+ 0x1f23c, 0x1f23f,
+ 0x1f249, 0x1f3fa,
+ 0x1f400, 0x1f53d,
+ 0x1f546, 0x1f64f,
+ 0x1f680, 0x1f6ff,
+ 0x1f774, 0x1f77f,
+ 0x1f7d5, 0x1f7ff,
+ 0x1f80c, 0x1f80f,
+ 0x1f848, 0x1f84f,
+ 0x1f85a, 0x1f85f,
+ 0x1f888, 0x1f88f,
+ 0x1f8ae, 0x1f8ff,
+ 0x1f90c, 0x1f93a,
+ 0x1f93c, 0x1f945,
+ 0x1f947, 0x1faff,
+ 0x1fc00, 0x1fffd,
+}; /* CR_Extended_Pictographic */
+
+/* 'Unknown': Script */
+static const OnigCodePoint CR_Unknown[] = {
+ 705,
+ 0x0378, 0x0379,
+ 0x0380, 0x0383,
+ 0x038b, 0x038b,
+ 0x038d, 0x038d,
+ 0x03a2, 0x03a2,
+ 0x0530, 0x0530,
+ 0x0557, 0x0558,
+ 0x058b, 0x058c,
+ 0x0590, 0x0590,
+ 0x05c8, 0x05cf,
+ 0x05eb, 0x05ee,
+ 0x05f5, 0x05ff,
+ 0x070e, 0x070e,
+ 0x074b, 0x074c,
+ 0x07b2, 0x07bf,
+ 0x07fb, 0x07fc,
+ 0x082e, 0x082f,
+ 0x083f, 0x083f,
+ 0x085c, 0x085d,
+ 0x085f, 0x085f,
+ 0x086b, 0x086f,
+ 0x088f, 0x088f,
+ 0x0892, 0x0897,
+ 0x0984, 0x0984,
+ 0x098d, 0x098e,
+ 0x0991, 0x0992,
+ 0x09a9, 0x09a9,
+ 0x09b1, 0x09b1,
+ 0x09b3, 0x09b5,
+ 0x09ba, 0x09bb,
+ 0x09c5, 0x09c6,
+ 0x09c9, 0x09ca,
+ 0x09cf, 0x09d6,
+ 0x09d8, 0x09db,
+ 0x09de, 0x09de,
+ 0x09e4, 0x09e5,
+ 0x09ff, 0x0a00,
+ 0x0a04, 0x0a04,
+ 0x0a0b, 0x0a0e,
+ 0x0a11, 0x0a12,
+ 0x0a29, 0x0a29,
+ 0x0a31, 0x0a31,
+ 0x0a34, 0x0a34,
+ 0x0a37, 0x0a37,
+ 0x0a3a, 0x0a3b,
+ 0x0a3d, 0x0a3d,
+ 0x0a43, 0x0a46,
+ 0x0a49, 0x0a4a,
+ 0x0a4e, 0x0a50,
+ 0x0a52, 0x0a58,
+ 0x0a5d, 0x0a5d,
+ 0x0a5f, 0x0a65,
+ 0x0a77, 0x0a80,
+ 0x0a84, 0x0a84,
+ 0x0a8e, 0x0a8e,
+ 0x0a92, 0x0a92,
+ 0x0aa9, 0x0aa9,
+ 0x0ab1, 0x0ab1,
+ 0x0ab4, 0x0ab4,
+ 0x0aba, 0x0abb,
+ 0x0ac6, 0x0ac6,
+ 0x0aca, 0x0aca,
+ 0x0ace, 0x0acf,
+ 0x0ad1, 0x0adf,
+ 0x0ae4, 0x0ae5,
+ 0x0af2, 0x0af8,
+ 0x0b00, 0x0b00,
+ 0x0b04, 0x0b04,
+ 0x0b0d, 0x0b0e,
+ 0x0b11, 0x0b12,
+ 0x0b29, 0x0b29,
+ 0x0b31, 0x0b31,
+ 0x0b34, 0x0b34,
+ 0x0b3a, 0x0b3b,
+ 0x0b45, 0x0b46,
+ 0x0b49, 0x0b4a,
+ 0x0b4e, 0x0b54,
+ 0x0b58, 0x0b5b,
+ 0x0b5e, 0x0b5e,
+ 0x0b64, 0x0b65,
+ 0x0b78, 0x0b81,
+ 0x0b84, 0x0b84,
+ 0x0b8b, 0x0b8d,
+ 0x0b91, 0x0b91,
+ 0x0b96, 0x0b98,
+ 0x0b9b, 0x0b9b,
+ 0x0b9d, 0x0b9d,
+ 0x0ba0, 0x0ba2,
+ 0x0ba5, 0x0ba7,
+ 0x0bab, 0x0bad,
+ 0x0bba, 0x0bbd,
+ 0x0bc3, 0x0bc5,
+ 0x0bc9, 0x0bc9,
+ 0x0bce, 0x0bcf,
+ 0x0bd1, 0x0bd6,
+ 0x0bd8, 0x0be5,
+ 0x0bfb, 0x0bff,
+ 0x0c0d, 0x0c0d,
+ 0x0c11, 0x0c11,
+ 0x0c29, 0x0c29,
+ 0x0c3a, 0x0c3b,
+ 0x0c45, 0x0c45,
+ 0x0c49, 0x0c49,
+ 0x0c4e, 0x0c54,
+ 0x0c57, 0x0c57,
+ 0x0c5b, 0x0c5c,
+ 0x0c5e, 0x0c5f,
+ 0x0c64, 0x0c65,
+ 0x0c70, 0x0c76,
+ 0x0c8d, 0x0c8d,
+ 0x0c91, 0x0c91,
+ 0x0ca9, 0x0ca9,
+ 0x0cb4, 0x0cb4,
+ 0x0cba, 0x0cbb,
+ 0x0cc5, 0x0cc5,
+ 0x0cc9, 0x0cc9,
+ 0x0cce, 0x0cd4,
+ 0x0cd7, 0x0cdc,
+ 0x0cdf, 0x0cdf,
+ 0x0ce4, 0x0ce5,
+ 0x0cf0, 0x0cf0,
+ 0x0cf4, 0x0cff,
+ 0x0d0d, 0x0d0d,
+ 0x0d11, 0x0d11,
+ 0x0d45, 0x0d45,
+ 0x0d49, 0x0d49,
+ 0x0d50, 0x0d53,
+ 0x0d64, 0x0d65,
+ 0x0d80, 0x0d80,
+ 0x0d84, 0x0d84,
+ 0x0d97, 0x0d99,
+ 0x0db2, 0x0db2,
+ 0x0dbc, 0x0dbc,
+ 0x0dbe, 0x0dbf,
+ 0x0dc7, 0x0dc9,
+ 0x0dcb, 0x0dce,
+ 0x0dd5, 0x0dd5,
+ 0x0dd7, 0x0dd7,
+ 0x0de0, 0x0de5,
+ 0x0df0, 0x0df1,
+ 0x0df5, 0x0e00,
+ 0x0e3b, 0x0e3e,
+ 0x0e5c, 0x0e80,
+ 0x0e83, 0x0e83,
+ 0x0e85, 0x0e85,
+ 0x0e8b, 0x0e8b,
+ 0x0ea4, 0x0ea4,
+ 0x0ea6, 0x0ea6,
+ 0x0ebe, 0x0ebf,
+ 0x0ec5, 0x0ec5,
+ 0x0ec7, 0x0ec7,
+ 0x0ecf, 0x0ecf,
+ 0x0eda, 0x0edb,
+ 0x0ee0, 0x0eff,
+ 0x0f48, 0x0f48,
+ 0x0f6d, 0x0f70,
+ 0x0f98, 0x0f98,
+ 0x0fbd, 0x0fbd,
+ 0x0fcd, 0x0fcd,
+ 0x0fdb, 0x0fff,
+ 0x10c6, 0x10c6,
+ 0x10c8, 0x10cc,
+ 0x10ce, 0x10cf,
+ 0x1249, 0x1249,
+ 0x124e, 0x124f,
+ 0x1257, 0x1257,
+ 0x1259, 0x1259,
+ 0x125e, 0x125f,
+ 0x1289, 0x1289,
+ 0x128e, 0x128f,
+ 0x12b1, 0x12b1,
+ 0x12b6, 0x12b7,
+ 0x12bf, 0x12bf,
+ 0x12c1, 0x12c1,
+ 0x12c6, 0x12c7,
+ 0x12d7, 0x12d7,
+ 0x1311, 0x1311,
+ 0x1316, 0x1317,
+ 0x135b, 0x135c,
+ 0x137d, 0x137f,
+ 0x139a, 0x139f,
+ 0x13f6, 0x13f7,
+ 0x13fe, 0x13ff,
+ 0x169d, 0x169f,
+ 0x16f9, 0x16ff,
+ 0x1716, 0x171e,
+ 0x1737, 0x173f,
+ 0x1754, 0x175f,
+ 0x176d, 0x176d,
+ 0x1771, 0x1771,
+ 0x1774, 0x177f,
+ 0x17de, 0x17df,
+ 0x17ea, 0x17ef,
+ 0x17fa, 0x17ff,
+ 0x181a, 0x181f,
+ 0x1879, 0x187f,
+ 0x18ab, 0x18af,
+ 0x18f6, 0x18ff,
+ 0x191f, 0x191f,
+ 0x192c, 0x192f,
+ 0x193c, 0x193f,
+ 0x1941, 0x1943,
+ 0x196e, 0x196f,
+ 0x1975, 0x197f,
+ 0x19ac, 0x19af,
+ 0x19ca, 0x19cf,
+ 0x19db, 0x19dd,
+ 0x1a1c, 0x1a1d,
+ 0x1a5f, 0x1a5f,
+ 0x1a7d, 0x1a7e,
+ 0x1a8a, 0x1a8f,
+ 0x1a9a, 0x1a9f,
+ 0x1aae, 0x1aaf,
+ 0x1acf, 0x1aff,
+ 0x1b4d, 0x1b4f,
+ 0x1b7f, 0x1b7f,
+ 0x1bf4, 0x1bfb,
+ 0x1c38, 0x1c3a,
+ 0x1c4a, 0x1c4c,
+ 0x1c89, 0x1c8f,
+ 0x1cbb, 0x1cbc,
+ 0x1cc8, 0x1ccf,
+ 0x1cfb, 0x1cff,
+ 0x1f16, 0x1f17,
+ 0x1f1e, 0x1f1f,
+ 0x1f46, 0x1f47,
+ 0x1f4e, 0x1f4f,
+ 0x1f58, 0x1f58,
+ 0x1f5a, 0x1f5a,
+ 0x1f5c, 0x1f5c,
+ 0x1f5e, 0x1f5e,
+ 0x1f7e, 0x1f7f,
+ 0x1fb5, 0x1fb5,
+ 0x1fc5, 0x1fc5,
+ 0x1fd4, 0x1fd5,
+ 0x1fdc, 0x1fdc,
+ 0x1ff0, 0x1ff1,
+ 0x1ff5, 0x1ff5,
+ 0x1fff, 0x1fff,
+ 0x2065, 0x2065,
+ 0x2072, 0x2073,
+ 0x208f, 0x208f,
+ 0x209d, 0x209f,
+ 0x20c1, 0x20cf,
+ 0x20f1, 0x20ff,
+ 0x218c, 0x218f,
+ 0x2427, 0x243f,
+ 0x244b, 0x245f,
+ 0x2b74, 0x2b75,
+ 0x2b96, 0x2b96,
+ 0x2cf4, 0x2cf8,
+ 0x2d26, 0x2d26,
+ 0x2d28, 0x2d2c,
+ 0x2d2e, 0x2d2f,
+ 0x2d68, 0x2d6e,
+ 0x2d71, 0x2d7e,
+ 0x2d97, 0x2d9f,
+ 0x2da7, 0x2da7,
+ 0x2daf, 0x2daf,
+ 0x2db7, 0x2db7,
+ 0x2dbf, 0x2dbf,
+ 0x2dc7, 0x2dc7,
+ 0x2dcf, 0x2dcf,
+ 0x2dd7, 0x2dd7,
+ 0x2ddf, 0x2ddf,
+ 0x2e5e, 0x2e7f,
+ 0x2e9a, 0x2e9a,
+ 0x2ef4, 0x2eff,
+ 0x2fd6, 0x2fef,
+ 0x2ffc, 0x2fff,
+ 0x3040, 0x3040,
+ 0x3097, 0x3098,
+ 0x3100, 0x3104,
+ 0x3130, 0x3130,
+ 0x318f, 0x318f,
+ 0x31e4, 0x31ef,
+ 0x321f, 0x321f,
+ 0xa48d, 0xa48f,
+ 0xa4c7, 0xa4cf,
+ 0xa62c, 0xa63f,
+ 0xa6f8, 0xa6ff,
+ 0xa7cb, 0xa7cf,
+ 0xa7d2, 0xa7d2,
+ 0xa7d4, 0xa7d4,
+ 0xa7da, 0xa7f1,
+ 0xa82d, 0xa82f,
+ 0xa83a, 0xa83f,
+ 0xa878, 0xa87f,
+ 0xa8c6, 0xa8cd,
+ 0xa8da, 0xa8df,
+ 0xa954, 0xa95e,
+ 0xa97d, 0xa97f,
+ 0xa9ce, 0xa9ce,
+ 0xa9da, 0xa9dd,
+ 0xa9ff, 0xa9ff,
+ 0xaa37, 0xaa3f,
+ 0xaa4e, 0xaa4f,
+ 0xaa5a, 0xaa5b,
+ 0xaac3, 0xaada,
+ 0xaaf7, 0xab00,
+ 0xab07, 0xab08,
+ 0xab0f, 0xab10,
+ 0xab17, 0xab1f,
+ 0xab27, 0xab27,
+ 0xab2f, 0xab2f,
+ 0xab6c, 0xab6f,
+ 0xabee, 0xabef,
+ 0xabfa, 0xabff,
+ 0xd7a4, 0xd7af,
+ 0xd7c7, 0xd7ca,
+ 0xd7fc, 0xf8ff,
+ 0xfa6e, 0xfa6f,
+ 0xfada, 0xfaff,
+ 0xfb07, 0xfb12,
+ 0xfb18, 0xfb1c,
+ 0xfb37, 0xfb37,
+ 0xfb3d, 0xfb3d,
+ 0xfb3f, 0xfb3f,
+ 0xfb42, 0xfb42,
+ 0xfb45, 0xfb45,
+ 0xfbc3, 0xfbd2,
+ 0xfd90, 0xfd91,
+ 0xfdc8, 0xfdce,
+ 0xfdd0, 0xfdef,
+ 0xfe1a, 0xfe1f,
+ 0xfe53, 0xfe53,
+ 0xfe67, 0xfe67,
+ 0xfe6c, 0xfe6f,
+ 0xfe75, 0xfe75,
+ 0xfefd, 0xfefe,
+ 0xff00, 0xff00,
+ 0xffbf, 0xffc1,
+ 0xffc8, 0xffc9,
+ 0xffd0, 0xffd1,
+ 0xffd8, 0xffd9,
+ 0xffdd, 0xffdf,
+ 0xffe7, 0xffe7,
+ 0xffef, 0xfff8,
+ 0xfffe, 0xffff,
+ 0x1000c, 0x1000c,
+ 0x10027, 0x10027,
+ 0x1003b, 0x1003b,
+ 0x1003e, 0x1003e,
+ 0x1004e, 0x1004f,
+ 0x1005e, 0x1007f,
+ 0x100fb, 0x100ff,
+ 0x10103, 0x10106,
+ 0x10134, 0x10136,
+ 0x1018f, 0x1018f,
+ 0x1019d, 0x1019f,
+ 0x101a1, 0x101cf,
+ 0x101fe, 0x1027f,
+ 0x1029d, 0x1029f,
+ 0x102d1, 0x102df,
+ 0x102fc, 0x102ff,
+ 0x10324, 0x1032c,
+ 0x1034b, 0x1034f,
+ 0x1037b, 0x1037f,
+ 0x1039e, 0x1039e,
+ 0x103c4, 0x103c7,
+ 0x103d6, 0x103ff,
+ 0x1049e, 0x1049f,
+ 0x104aa, 0x104af,
+ 0x104d4, 0x104d7,
+ 0x104fc, 0x104ff,
+ 0x10528, 0x1052f,
+ 0x10564, 0x1056e,
+ 0x1057b, 0x1057b,
+ 0x1058b, 0x1058b,
+ 0x10593, 0x10593,
+ 0x10596, 0x10596,
+ 0x105a2, 0x105a2,
+ 0x105b2, 0x105b2,
+ 0x105ba, 0x105ba,
+ 0x105bd, 0x105ff,
+ 0x10737, 0x1073f,
+ 0x10756, 0x1075f,
+ 0x10768, 0x1077f,
+ 0x10786, 0x10786,
+ 0x107b1, 0x107b1,
+ 0x107bb, 0x107ff,
+ 0x10806, 0x10807,
+ 0x10809, 0x10809,
+ 0x10836, 0x10836,
+ 0x10839, 0x1083b,
+ 0x1083d, 0x1083e,
+ 0x10856, 0x10856,
+ 0x1089f, 0x108a6,
+ 0x108b0, 0x108df,
+ 0x108f3, 0x108f3,
+ 0x108f6, 0x108fa,
+ 0x1091c, 0x1091e,
+ 0x1093a, 0x1093e,
+ 0x10940, 0x1097f,
+ 0x109b8, 0x109bb,
+ 0x109d0, 0x109d1,
+ 0x10a04, 0x10a04,
+ 0x10a07, 0x10a0b,
+ 0x10a14, 0x10a14,
+ 0x10a18, 0x10a18,
+ 0x10a36, 0x10a37,
+ 0x10a3b, 0x10a3e,
+ 0x10a49, 0x10a4f,
+ 0x10a59, 0x10a5f,
+ 0x10aa0, 0x10abf,
+ 0x10ae7, 0x10aea,
+ 0x10af7, 0x10aff,
+ 0x10b36, 0x10b38,
+ 0x10b56, 0x10b57,
+ 0x10b73, 0x10b77,
+ 0x10b92, 0x10b98,
+ 0x10b9d, 0x10ba8,
+ 0x10bb0, 0x10bff,
+ 0x10c49, 0x10c7f,
+ 0x10cb3, 0x10cbf,
+ 0x10cf3, 0x10cf9,
+ 0x10d28, 0x10d2f,
+ 0x10d3a, 0x10e5f,
+ 0x10e7f, 0x10e7f,
+ 0x10eaa, 0x10eaa,
+ 0x10eae, 0x10eaf,
+ 0x10eb2, 0x10efc,
+ 0x10f28, 0x10f2f,
+ 0x10f5a, 0x10f6f,
+ 0x10f8a, 0x10faf,
+ 0x10fcc, 0x10fdf,
+ 0x10ff7, 0x10fff,
+ 0x1104e, 0x11051,
+ 0x11076, 0x1107e,
+ 0x110c3, 0x110cc,
+ 0x110ce, 0x110cf,
+ 0x110e9, 0x110ef,
+ 0x110fa, 0x110ff,
+ 0x11135, 0x11135,
+ 0x11148, 0x1114f,
+ 0x11177, 0x1117f,
+ 0x111e0, 0x111e0,
+ 0x111f5, 0x111ff,
+ 0x11212, 0x11212,
+ 0x11242, 0x1127f,
+ 0x11287, 0x11287,
+ 0x11289, 0x11289,
+ 0x1128e, 0x1128e,
+ 0x1129e, 0x1129e,
+ 0x112aa, 0x112af,
+ 0x112eb, 0x112ef,
+ 0x112fa, 0x112ff,
+ 0x11304, 0x11304,
+ 0x1130d, 0x1130e,
+ 0x11311, 0x11312,
+ 0x11329, 0x11329,
+ 0x11331, 0x11331,
+ 0x11334, 0x11334,
+ 0x1133a, 0x1133a,
+ 0x11345, 0x11346,
+ 0x11349, 0x1134a,
+ 0x1134e, 0x1134f,
+ 0x11351, 0x11356,
+ 0x11358, 0x1135c,
+ 0x11364, 0x11365,
+ 0x1136d, 0x1136f,
+ 0x11375, 0x113ff,
+ 0x1145c, 0x1145c,
+ 0x11462, 0x1147f,
+ 0x114c8, 0x114cf,
+ 0x114da, 0x1157f,
+ 0x115b6, 0x115b7,
+ 0x115de, 0x115ff,
+ 0x11645, 0x1164f,
+ 0x1165a, 0x1165f,
+ 0x1166d, 0x1167f,
+ 0x116ba, 0x116bf,
+ 0x116ca, 0x116ff,
+ 0x1171b, 0x1171c,
+ 0x1172c, 0x1172f,
+ 0x11747, 0x117ff,
+ 0x1183c, 0x1189f,
+ 0x118f3, 0x118fe,
+ 0x11907, 0x11908,
+ 0x1190a, 0x1190b,
+ 0x11914, 0x11914,
+ 0x11917, 0x11917,
+ 0x11936, 0x11936,
+ 0x11939, 0x1193a,
+ 0x11947, 0x1194f,
+ 0x1195a, 0x1199f,
+ 0x119a8, 0x119a9,
+ 0x119d8, 0x119d9,
+ 0x119e5, 0x119ff,
+ 0x11a48, 0x11a4f,
+ 0x11aa3, 0x11aaf,
+ 0x11af9, 0x11aff,
+ 0x11b0a, 0x11bff,
+ 0x11c09, 0x11c09,
+ 0x11c37, 0x11c37,
+ 0x11c46, 0x11c4f,
+ 0x11c6d, 0x11c6f,
+ 0x11c90, 0x11c91,
+ 0x11ca8, 0x11ca8,
+ 0x11cb7, 0x11cff,
+ 0x11d07, 0x11d07,
+ 0x11d0a, 0x11d0a,
+ 0x11d37, 0x11d39,
+ 0x11d3b, 0x11d3b,
+ 0x11d3e, 0x11d3e,
+ 0x11d48, 0x11d4f,
+ 0x11d5a, 0x11d5f,
+ 0x11d66, 0x11d66,
+ 0x11d69, 0x11d69,
+ 0x11d8f, 0x11d8f,
+ 0x11d92, 0x11d92,
+ 0x11d99, 0x11d9f,
+ 0x11daa, 0x11edf,
+ 0x11ef9, 0x11eff,
+ 0x11f11, 0x11f11,
+ 0x11f3b, 0x11f3d,
+ 0x11f5a, 0x11faf,
+ 0x11fb1, 0x11fbf,
+ 0x11ff2, 0x11ffe,
+ 0x1239a, 0x123ff,
+ 0x1246f, 0x1246f,
+ 0x12475, 0x1247f,
+ 0x12544, 0x12f8f,
+ 0x12ff3, 0x12fff,
+ 0x13456, 0x143ff,
+ 0x14647, 0x167ff,
+ 0x16a39, 0x16a3f,
+ 0x16a5f, 0x16a5f,
+ 0x16a6a, 0x16a6d,
+ 0x16abf, 0x16abf,
+ 0x16aca, 0x16acf,
+ 0x16aee, 0x16aef,
+ 0x16af6, 0x16aff,
+ 0x16b46, 0x16b4f,
+ 0x16b5a, 0x16b5a,
+ 0x16b62, 0x16b62,
+ 0x16b78, 0x16b7c,
+ 0x16b90, 0x16e3f,
+ 0x16e9b, 0x16eff,
+ 0x16f4b, 0x16f4e,
+ 0x16f88, 0x16f8e,
+ 0x16fa0, 0x16fdf,
+ 0x16fe5, 0x16fef,
+ 0x16ff2, 0x16fff,
+ 0x187f8, 0x187ff,
+ 0x18cd6, 0x18cff,
+ 0x18d09, 0x1afef,
+ 0x1aff4, 0x1aff4,
+ 0x1affc, 0x1affc,
+ 0x1afff, 0x1afff,
+ 0x1b123, 0x1b131,
+ 0x1b133, 0x1b14f,
+ 0x1b153, 0x1b154,
+ 0x1b156, 0x1b163,
+ 0x1b168, 0x1b16f,
+ 0x1b2fc, 0x1bbff,
+ 0x1bc6b, 0x1bc6f,
+ 0x1bc7d, 0x1bc7f,
+ 0x1bc89, 0x1bc8f,
+ 0x1bc9a, 0x1bc9b,
+ 0x1bca4, 0x1ceff,
+ 0x1cf2e, 0x1cf2f,
+ 0x1cf47, 0x1cf4f,
+ 0x1cfc4, 0x1cfff,
+ 0x1d0f6, 0x1d0ff,
+ 0x1d127, 0x1d128,
+ 0x1d1eb, 0x1d1ff,
+ 0x1d246, 0x1d2bf,
+ 0x1d2d4, 0x1d2df,
+ 0x1d2f4, 0x1d2ff,
+ 0x1d357, 0x1d35f,
+ 0x1d379, 0x1d3ff,
+ 0x1d455, 0x1d455,
+ 0x1d49d, 0x1d49d,
+ 0x1d4a0, 0x1d4a1,
+ 0x1d4a3, 0x1d4a4,
+ 0x1d4a7, 0x1d4a8,
+ 0x1d4ad, 0x1d4ad,
+ 0x1d4ba, 0x1d4ba,
+ 0x1d4bc, 0x1d4bc,
+ 0x1d4c4, 0x1d4c4,
+ 0x1d506, 0x1d506,
+ 0x1d50b, 0x1d50c,
+ 0x1d515, 0x1d515,
+ 0x1d51d, 0x1d51d,
+ 0x1d53a, 0x1d53a,
+ 0x1d53f, 0x1d53f,
+ 0x1d545, 0x1d545,
+ 0x1d547, 0x1d549,
+ 0x1d551, 0x1d551,
+ 0x1d6a6, 0x1d6a7,
+ 0x1d7cc, 0x1d7cd,
+ 0x1da8c, 0x1da9a,
+ 0x1daa0, 0x1daa0,
+ 0x1dab0, 0x1deff,
+ 0x1df1f, 0x1df24,
+ 0x1df2b, 0x1dfff,
+ 0x1e007, 0x1e007,
+ 0x1e019, 0x1e01a,
+ 0x1e022, 0x1e022,
+ 0x1e025, 0x1e025,
+ 0x1e02b, 0x1e02f,
+ 0x1e06e, 0x1e08e,
+ 0x1e090, 0x1e0ff,
+ 0x1e12d, 0x1e12f,
+ 0x1e13e, 0x1e13f,
+ 0x1e14a, 0x1e14d,
+ 0x1e150, 0x1e28f,
+ 0x1e2af, 0x1e2bf,
+ 0x1e2fa, 0x1e2fe,
+ 0x1e300, 0x1e4cf,
+ 0x1e4fa, 0x1e7df,
+ 0x1e7e7, 0x1e7e7,
+ 0x1e7ec, 0x1e7ec,
+ 0x1e7ef, 0x1e7ef,
+ 0x1e7ff, 0x1e7ff,
+ 0x1e8c5, 0x1e8c6,
+ 0x1e8d7, 0x1e8ff,
+ 0x1e94c, 0x1e94f,
+ 0x1e95a, 0x1e95d,
+ 0x1e960, 0x1ec70,
+ 0x1ecb5, 0x1ed00,
+ 0x1ed3e, 0x1edff,
+ 0x1ee04, 0x1ee04,
+ 0x1ee20, 0x1ee20,
+ 0x1ee23, 0x1ee23,
+ 0x1ee25, 0x1ee26,
+ 0x1ee28, 0x1ee28,
+ 0x1ee33, 0x1ee33,
+ 0x1ee38, 0x1ee38,
+ 0x1ee3a, 0x1ee3a,
+ 0x1ee3c, 0x1ee41,
+ 0x1ee43, 0x1ee46,
+ 0x1ee48, 0x1ee48,
+ 0x1ee4a, 0x1ee4a,
+ 0x1ee4c, 0x1ee4c,
+ 0x1ee50, 0x1ee50,
+ 0x1ee53, 0x1ee53,
+ 0x1ee55, 0x1ee56,
+ 0x1ee58, 0x1ee58,
+ 0x1ee5a, 0x1ee5a,
+ 0x1ee5c, 0x1ee5c,
+ 0x1ee5e, 0x1ee5e,
+ 0x1ee60, 0x1ee60,
+ 0x1ee63, 0x1ee63,
+ 0x1ee65, 0x1ee66,
+ 0x1ee6b, 0x1ee6b,
+ 0x1ee73, 0x1ee73,
+ 0x1ee78, 0x1ee78,
+ 0x1ee7d, 0x1ee7d,
+ 0x1ee7f, 0x1ee7f,
+ 0x1ee8a, 0x1ee8a,
+ 0x1ee9c, 0x1eea0,
+ 0x1eea4, 0x1eea4,
+ 0x1eeaa, 0x1eeaa,
+ 0x1eebc, 0x1eeef,
+ 0x1eef2, 0x1efff,
+ 0x1f02c, 0x1f02f,
+ 0x1f094, 0x1f09f,
+ 0x1f0af, 0x1f0b0,
+ 0x1f0c0, 0x1f0c0,
+ 0x1f0d0, 0x1f0d0,
+ 0x1f0f6, 0x1f0ff,
+ 0x1f1ae, 0x1f1e5,
+ 0x1f203, 0x1f20f,
+ 0x1f23c, 0x1f23f,
+ 0x1f249, 0x1f24f,
+ 0x1f252, 0x1f25f,
+ 0x1f266, 0x1f2ff,
+ 0x1f6d8, 0x1f6db,
+ 0x1f6ed, 0x1f6ef,
+ 0x1f6fd, 0x1f6ff,
+ 0x1f777, 0x1f77a,
+ 0x1f7da, 0x1f7df,
+ 0x1f7ec, 0x1f7ef,
+ 0x1f7f1, 0x1f7ff,
+ 0x1f80c, 0x1f80f,
+ 0x1f848, 0x1f84f,
+ 0x1f85a, 0x1f85f,
+ 0x1f888, 0x1f88f,
+ 0x1f8ae, 0x1f8af,
+ 0x1f8b2, 0x1f8ff,
+ 0x1fa54, 0x1fa5f,
+ 0x1fa6e, 0x1fa6f,
+ 0x1fa7d, 0x1fa7f,
+ 0x1fa89, 0x1fa8f,
+ 0x1fabe, 0x1fabe,
+ 0x1fac6, 0x1facd,
+ 0x1fadc, 0x1fadf,
+ 0x1fae9, 0x1faef,
+ 0x1faf9, 0x1faff,
+ 0x1fb93, 0x1fb93,
+ 0x1fbcb, 0x1fbef,
+ 0x1fbfa, 0x1ffff,
+ 0x2a6e0, 0x2a6ff,
+ 0x2b73a, 0x2b73f,
+ 0x2b81e, 0x2b81f,
+ 0x2cea2, 0x2ceaf,
+ 0x2ebe1, 0x2f7ff,
+ 0x2fa1e, 0x2ffff,
+ 0x3134b, 0x3134f,
+ 0x323b0, 0xe0000,
+ 0xe0002, 0xe001f,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0x10ffff,
+}; /* CR_Unknown */
+
+#ifdef USE_UNICODE_AGE_PROPERTIES
+/* 'Age_1_1': Derived Age 1.1 */
+static const OnigCodePoint CR_Age_1_1[] = {
+ 288,
+ 0x0000, 0x01f5,
+ 0x01fa, 0x0217,
+ 0x0250, 0x02a8,
+ 0x02b0, 0x02de,
+ 0x02e0, 0x02e9,
+ 0x0300, 0x0345,
+ 0x0360, 0x0361,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03d6,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03f3,
+ 0x0401, 0x040c,
+ 0x040e, 0x044f,
+ 0x0451, 0x045c,
+ 0x045e, 0x0486,
+ 0x0490, 0x04c4,
+ 0x04c7, 0x04c8,
+ 0x04cb, 0x04cc,
+ 0x04d0, 0x04eb,
+ 0x04ee, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x0589,
+ 0x05b0, 0x05b9,
+ 0x05bb, 0x05c3,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0652,
+ 0x0660, 0x066d,
+ 0x0670, 0x06b7,
+ 0x06ba, 0x06be,
+ 0x06c0, 0x06ce,
+ 0x06d0, 0x06ed,
+ 0x06f0, 0x06f9,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f6,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1e00, 0x1e9a,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x202e,
+ 0x2030, 0x2046,
+ 0x206a, 0x2070,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20aa,
+ 0x20d0, 0x20e1,
+ 0x2100, 0x2138,
+ 0x2153, 0x2182,
+ 0x2190, 0x21ea,
+ 0x2200, 0x22f1,
+ 0x2300, 0x2300,
+ 0x2302, 0x237a,
+ 0x2400, 0x2424,
+ 0x2440, 0x244a,
+ 0x2460, 0x24ea,
+ 0x2500, 0x2595,
+ 0x25a0, 0x25ef,
+ 0x2600, 0x2613,
+ 0x261a, 0x266f,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2776, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x3000, 0x3037,
+ 0x303f, 0x303f,
+ 0x3041, 0x3094,
+ 0x3099, 0x309e,
+ 0x30a1, 0x30fe,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x319f,
+ 0x3200, 0x321c,
+ 0x3220, 0x3243,
+ 0x3260, 0x327b,
+ 0x327f, 0x32b0,
+ 0x32c0, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x4e00, 0x9fa5,
+ 0xe000, 0xfa2d,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1e, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe44,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe72,
+ 0xfe74, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff5e,
+ 0xff61, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffd, 0xffff,
+}; /* CR_Age_1_1 */
+
+/* 'Age_2_0': Derived Age 2.0 */
+static const OnigCodePoint CR_Age_2_0[] = {
+ 312,
+ 0x0000, 0x01f5,
+ 0x01fa, 0x0217,
+ 0x0250, 0x02a8,
+ 0x02b0, 0x02de,
+ 0x02e0, 0x02e9,
+ 0x0300, 0x0345,
+ 0x0360, 0x0361,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03d6,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03f3,
+ 0x0401, 0x040c,
+ 0x040e, 0x044f,
+ 0x0451, 0x045c,
+ 0x045e, 0x0486,
+ 0x0490, 0x04c4,
+ 0x04c7, 0x04c8,
+ 0x04cb, 0x04cc,
+ 0x04d0, 0x04eb,
+ 0x04ee, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x0589,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0652,
+ 0x0660, 0x066d,
+ 0x0670, 0x06b7,
+ 0x06ba, 0x06be,
+ 0x06c0, 0x06ce,
+ 0x06d0, 0x06ed,
+ 0x06f0, 0x06f9,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f69,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f95,
+ 0x0f97, 0x0f97,
+ 0x0f99, 0x0fad,
+ 0x0fb1, 0x0fb7,
+ 0x0fb9, 0x0fb9,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f6,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x202e,
+ 0x2030, 0x2046,
+ 0x206a, 0x2070,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20ab,
+ 0x20d0, 0x20e1,
+ 0x2100, 0x2138,
+ 0x2153, 0x2182,
+ 0x2190, 0x21ea,
+ 0x2200, 0x22f1,
+ 0x2300, 0x2300,
+ 0x2302, 0x237a,
+ 0x2400, 0x2424,
+ 0x2440, 0x244a,
+ 0x2460, 0x24ea,
+ 0x2500, 0x2595,
+ 0x25a0, 0x25ef,
+ 0x2600, 0x2613,
+ 0x261a, 0x266f,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2776, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x3000, 0x3037,
+ 0x303f, 0x303f,
+ 0x3041, 0x3094,
+ 0x3099, 0x309e,
+ 0x30a1, 0x30fe,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x319f,
+ 0x3200, 0x321c,
+ 0x3220, 0x3243,
+ 0x3260, 0x327b,
+ 0x327f, 0x32b0,
+ 0x32c0, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x4e00, 0x9fa5,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1e, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe44,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe72,
+ 0xfe74, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff5e,
+ 0xff61, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffd, 0xffff,
+ 0x1fffe, 0x1ffff,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_2_0 */
+
+/* 'Age_2_1': Derived Age 2.1 */
+static const OnigCodePoint CR_Age_2_1[] = {
+ 312,
+ 0x0000, 0x01f5,
+ 0x01fa, 0x0217,
+ 0x0250, 0x02a8,
+ 0x02b0, 0x02de,
+ 0x02e0, 0x02e9,
+ 0x0300, 0x0345,
+ 0x0360, 0x0361,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03d6,
+ 0x03da, 0x03da,
+ 0x03dc, 0x03dc,
+ 0x03de, 0x03de,
+ 0x03e0, 0x03e0,
+ 0x03e2, 0x03f3,
+ 0x0401, 0x040c,
+ 0x040e, 0x044f,
+ 0x0451, 0x045c,
+ 0x045e, 0x0486,
+ 0x0490, 0x04c4,
+ 0x04c7, 0x04c8,
+ 0x04cb, 0x04cc,
+ 0x04d0, 0x04eb,
+ 0x04ee, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x0589,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0652,
+ 0x0660, 0x066d,
+ 0x0670, 0x06b7,
+ 0x06ba, 0x06be,
+ 0x06c0, 0x06ce,
+ 0x06d0, 0x06ed,
+ 0x06f0, 0x06f9,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f69,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f95,
+ 0x0f97, 0x0f97,
+ 0x0f99, 0x0fad,
+ 0x0fb1, 0x0fb7,
+ 0x0fb9, 0x0fb9,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f6,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x202e,
+ 0x2030, 0x2046,
+ 0x206a, 0x2070,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20ac,
+ 0x20d0, 0x20e1,
+ 0x2100, 0x2138,
+ 0x2153, 0x2182,
+ 0x2190, 0x21ea,
+ 0x2200, 0x22f1,
+ 0x2300, 0x2300,
+ 0x2302, 0x237a,
+ 0x2400, 0x2424,
+ 0x2440, 0x244a,
+ 0x2460, 0x24ea,
+ 0x2500, 0x2595,
+ 0x25a0, 0x25ef,
+ 0x2600, 0x2613,
+ 0x261a, 0x266f,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2776, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x3000, 0x3037,
+ 0x303f, 0x303f,
+ 0x3041, 0x3094,
+ 0x3099, 0x309e,
+ 0x30a1, 0x30fe,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x319f,
+ 0x3200, 0x321c,
+ 0x3220, 0x3243,
+ 0x3260, 0x327b,
+ 0x327f, 0x32b0,
+ 0x32c0, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x4e00, 0x9fa5,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1e, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe44,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe72,
+ 0xfe74, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff5e,
+ 0xff61, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfffc, 0xffff,
+ 0x1fffe, 0x1ffff,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_2_1 */
+
+/* 'Age_3_0': Derived Age 3.0 */
+static const OnigCodePoint CR_Age_3_0[] = {
+ 369,
+ 0x0000, 0x021f,
+ 0x0222, 0x0233,
+ 0x0250, 0x02ad,
+ 0x02b0, 0x02ee,
+ 0x0300, 0x034e,
+ 0x0360, 0x0362,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03d7,
+ 0x03da, 0x03f3,
+ 0x0400, 0x0486,
+ 0x0488, 0x0489,
+ 0x048c, 0x04c4,
+ 0x04c7, 0x04c8,
+ 0x04cb, 0x04cc,
+ 0x04d0, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0655,
+ 0x0660, 0x066d,
+ 0x0670, 0x06ed,
+ 0x06f0, 0x06fe,
+ 0x0700, 0x070d,
+ 0x070f, 0x072c,
+ 0x0730, 0x074a,
+ 0x0780, 0x07b0,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f6,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1206,
+ 0x1208, 0x1246,
+ 0x1248, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1286,
+ 0x1288, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12ae,
+ 0x12b0, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12ce,
+ 0x12d0, 0x12d6,
+ 0x12d8, 0x12ee,
+ 0x12f0, 0x130e,
+ 0x1310, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x131e,
+ 0x1320, 0x1346,
+ 0x1348, 0x135a,
+ 0x1361, 0x137c,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1780, 0x17dc,
+ 0x17e0, 0x17e9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2046,
+ 0x2048, 0x204d,
+ 0x206a, 0x2070,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20af,
+ 0x20d0, 0x20e3,
+ 0x2100, 0x213a,
+ 0x2153, 0x2183,
+ 0x2190, 0x21f3,
+ 0x2200, 0x22f1,
+ 0x2300, 0x237b,
+ 0x237d, 0x239a,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x24ea,
+ 0x2500, 0x2595,
+ 0x25a0, 0x25f7,
+ 0x2600, 0x2613,
+ 0x2619, 0x2671,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2776, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x2800, 0x28ff,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303a,
+ 0x303e, 0x303f,
+ 0x3041, 0x3094,
+ 0x3099, 0x309e,
+ 0x30a1, 0x30fe,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x3200, 0x321c,
+ 0x3220, 0x3243,
+ 0x3260, 0x327b,
+ 0x327f, 0x32b0,
+ 0x32c0, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fa5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4a1,
+ 0xa4a4, 0xa4b3,
+ 0xa4b5, 0xa4c0,
+ 0xa4c2, 0xa4c4,
+ 0xa4c6, 0xa4c6,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdf0, 0xfdfb,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe44,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe72,
+ 0xfe74, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff5e,
+ 0xff61, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xffff,
+ 0x1fffe, 0x1ffff,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_3_0 */
+
+/* 'Age_3_1': Derived Age 3.1 */
+static const OnigCodePoint CR_Age_3_1[] = {
+ 402,
+ 0x0000, 0x021f,
+ 0x0222, 0x0233,
+ 0x0250, 0x02ad,
+ 0x02b0, 0x02ee,
+ 0x0300, 0x034e,
+ 0x0360, 0x0362,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03d7,
+ 0x03da, 0x03f5,
+ 0x0400, 0x0486,
+ 0x0488, 0x0489,
+ 0x048c, 0x04c4,
+ 0x04c7, 0x04c8,
+ 0x04cb, 0x04cc,
+ 0x04d0, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0655,
+ 0x0660, 0x066d,
+ 0x0670, 0x06ed,
+ 0x06f0, 0x06fe,
+ 0x0700, 0x070d,
+ 0x070f, 0x072c,
+ 0x0730, 0x074a,
+ 0x0780, 0x07b0,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f6,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1206,
+ 0x1208, 0x1246,
+ 0x1248, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1286,
+ 0x1288, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12ae,
+ 0x12b0, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12ce,
+ 0x12d0, 0x12d6,
+ 0x12d8, 0x12ee,
+ 0x12f0, 0x130e,
+ 0x1310, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x131e,
+ 0x1320, 0x1346,
+ 0x1348, 0x135a,
+ 0x1361, 0x137c,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1780, 0x17dc,
+ 0x17e0, 0x17e9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2046,
+ 0x2048, 0x204d,
+ 0x206a, 0x2070,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20af,
+ 0x20d0, 0x20e3,
+ 0x2100, 0x213a,
+ 0x2153, 0x2183,
+ 0x2190, 0x21f3,
+ 0x2200, 0x22f1,
+ 0x2300, 0x237b,
+ 0x237d, 0x239a,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x24ea,
+ 0x2500, 0x2595,
+ 0x25a0, 0x25f7,
+ 0x2600, 0x2613,
+ 0x2619, 0x2671,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2767,
+ 0x2776, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x2800, 0x28ff,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303a,
+ 0x303e, 0x303f,
+ 0x3041, 0x3094,
+ 0x3099, 0x309e,
+ 0x30a1, 0x30fe,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x3200, 0x321c,
+ 0x3220, 0x3243,
+ 0x3260, 0x327b,
+ 0x327f, 0x32b0,
+ 0x32c0, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fa5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4a1,
+ 0xa4a4, 0xa4b3,
+ 0xa4b5, 0xa4c0,
+ 0xa4c2, 0xa4c4,
+ 0xa4c6, 0xa4c6,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfb,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe44,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe72,
+ 0xfe74, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xff5e,
+ 0xff61, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xffff,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10400, 0x10425,
+ 0x10428, 0x1044d,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c0,
+ 0x1d4c2, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a3,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_3_1 */
+
+/* 'Age_3_2': Derived Age 3.2 */
+static const OnigCodePoint CR_Age_3_2[] = {
+ 397,
+ 0x0000, 0x0220,
+ 0x0222, 0x0233,
+ 0x0250, 0x02ad,
+ 0x02b0, 0x02ee,
+ 0x0300, 0x034f,
+ 0x0360, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03f6,
+ 0x0400, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x060c, 0x060c,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0655,
+ 0x0660, 0x06ed,
+ 0x06f0, 0x06fe,
+ 0x0700, 0x070d,
+ 0x070f, 0x072c,
+ 0x0730, 0x074a,
+ 0x0780, 0x07b1,
+ 0x0901, 0x0903,
+ 0x0905, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a02, 0x0a02,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8b,
+ 0x0a8d, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae0,
+ 0x0ae6, 0x0aef,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b36, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b70,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bf2,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbe, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f8,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1206,
+ 0x1208, 0x1246,
+ 0x1248, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1286,
+ 0x1288, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12ae,
+ 0x12b0, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12ce,
+ 0x12d0, 0x12d6,
+ 0x12d8, 0x12ee,
+ 0x12f0, 0x130e,
+ 0x1310, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x131e,
+ 0x1320, 0x1346,
+ 0x1348, 0x135a,
+ 0x1361, 0x137c,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dc,
+ 0x17e0, 0x17e9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2052,
+ 0x2057, 0x2057,
+ 0x205f, 0x2063,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20b1,
+ 0x20d0, 0x20ea,
+ 0x2100, 0x213a,
+ 0x213d, 0x214b,
+ 0x2153, 0x2183,
+ 0x2190, 0x23ce,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x24fe,
+ 0x2500, 0x2613,
+ 0x2616, 0x2617,
+ 0x2619, 0x267d,
+ 0x2680, 0x2689,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x2aff,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31f0, 0x321c,
+ 0x3220, 0x3243,
+ 0x3251, 0x327b,
+ 0x327f, 0x32cb,
+ 0x32d0, 0x32fe,
+ 0x3300, 0x3376,
+ 0x337b, 0x33dd,
+ 0x33e0, 0x33fe,
+ 0x3400, 0x4db5,
+ 0x4e00, 0x9fa5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfc,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe46,
+ 0xfe49, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0xffff,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10400, 0x10425,
+ 0x10428, 0x1044d,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c0,
+ 0x1d4c2, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a3,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_3_2 */
+
+/* 'Age_4_0': Derived Age 4.0 */
+static const OnigCodePoint CR_Age_4_0[] = {
+ 412,
+ 0x0000, 0x0236,
+ 0x0250, 0x0357,
+ 0x035d, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x03fb,
+ 0x0400, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f5,
+ 0x04f8, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05a1,
+ 0x05a3, 0x05b9,
+ 0x05bb, 0x05c4,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x060c, 0x0615,
+ 0x061b, 0x061b,
+ 0x061f, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x0658,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x074f,
+ 0x0780, 0x07b1,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb5,
+ 0x0bb7, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be7, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fcf,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10f8,
+ 0x10fb, 0x10fb,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1206,
+ 0x1208, 0x1246,
+ 0x1248, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1286,
+ 0x1288, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12ae,
+ 0x12b0, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12ce,
+ 0x12d0, 0x12d6,
+ 0x12d8, 0x12ee,
+ 0x12f0, 0x130e,
+ 0x1310, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x131e,
+ 0x1320, 0x1346,
+ 0x1348, 0x135a,
+ 0x1361, 0x137c,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x19e0, 0x19ff,
+ 0x1d00, 0x1d6b,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2054,
+ 0x2057, 0x2057,
+ 0x205f, 0x2063,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x20a0, 0x20b1,
+ 0x20d0, 0x20ea,
+ 0x2100, 0x213b,
+ 0x213d, 0x214b,
+ 0x2153, 0x2183,
+ 0x2190, 0x23d0,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2617,
+ 0x2619, 0x267d,
+ 0x2680, 0x2691,
+ 0x26a0, 0x26a1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x2b0d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31f0, 0x321e,
+ 0x3220, 0x3243,
+ 0x3250, 0x327d,
+ 0x327f, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fa5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1013f,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x1039f,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d300, 0x1d356,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a3,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_4_0 */
+
+/* 'Age_4_1': Derived Age 4.1 */
+static const OnigCodePoint CR_Age_4_1[] = {
+ 430,
+ 0x0000, 0x0241,
+ 0x0250, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037a,
+ 0x037e, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x0486,
+ 0x0488, 0x04ce,
+ 0x04d0, 0x04f9,
+ 0x0500, 0x050f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05b9,
+ 0x05bb, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x060b, 0x0615,
+ 0x061b, 0x061b,
+ 0x061e, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x065e,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x076d,
+ 0x0780, 0x07b1,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x097d, 0x097d,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce1,
+ 0x0ce6, 0x0cef,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fd1,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1d00, 0x1dc3,
+ 0x1e00, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2063,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20eb,
+ 0x2100, 0x214c,
+ 0x2153, 0x2183,
+ 0x2190, 0x23db,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b1,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27c6,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x2b13,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31c0, 0x31cf,
+ 0x31f0, 0x321e,
+ 0x3220, 0x3243,
+ 0x3250, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fbb,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa700, 0xa716,
+ 0xa800, 0xa82b,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7c9,
+ 0x1d7ce, 0x1d7ff,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_4_1 */
+
+/* 'Age_5_0': Derived Age 5.0 */
+static const OnigCodePoint CR_Age_5_0[] = {
+ 440,
+ 0x0000, 0x036f,
+ 0x0374, 0x0375,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x03ce,
+ 0x03d0, 0x0486,
+ 0x0488, 0x0513,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x060b, 0x0615,
+ 0x061b, 0x061b,
+ 0x061e, 0x061f,
+ 0x0621, 0x063a,
+ 0x0640, 0x065e,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x076d,
+ 0x0780, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0970,
+ 0x097b, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a74,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b43,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b61,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3e, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c60, 0x0c61,
+ 0x0c66, 0x0c6f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3e, 0x0d43,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d61,
+ 0x0d66, 0x0d6f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6a,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fcf, 0x0fd1,
+ 0x1000, 0x1021,
+ 0x1023, 0x1027,
+ 0x1029, 0x102a,
+ 0x102c, 0x1032,
+ 0x1036, 0x1039,
+ 0x1040, 0x1059,
+ 0x10a0, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18a9,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1d00, 0x1dca,
+ 0x1dfe, 0x1e9b,
+ 0x1ea0, 0x1ef9,
+ 0x1f00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2063,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20ef,
+ 0x2100, 0x214e,
+ 0x2153, 0x2184,
+ 0x2190, 0x23e7,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x269c,
+ 0x26a0, 0x26b2,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27ca,
+ 0x27d0, 0x27eb,
+ 0x27f0, 0x2b1a,
+ 0x2b20, 0x2b23,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2c6c,
+ 0x2c74, 0x2c77,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2e00, 0x2e17,
+ 0x2e1c, 0x2e1d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312c,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31c0, 0x31cf,
+ 0x31f0, 0x321e,
+ 0x3220, 0x3243,
+ 0x3250, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fbb,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa700, 0xa71a,
+ 0xa720, 0xa721,
+ 0xa800, 0xa82b,
+ 0xa840, 0xa877,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe23,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10900, 0x10919,
+ 0x1091f, 0x1091f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d12a, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_5_0 */
+
+/* 'Age_5_1': Derived Age 5.1 */
+static const OnigCodePoint CR_Age_5_1[] = {
+ 455,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0523,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x0606, 0x061b,
+ 0x061e, 0x061f,
+ 0x0621, 0x065e,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0901, 0x0939,
+ 0x093c, 0x094d,
+ 0x0950, 0x0954,
+ 0x0958, 0x0972,
+ 0x097b, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fa,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fd4,
+ 0x1000, 0x1099,
+ 0x109e, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1159,
+ 0x115f, 0x11a2,
+ 0x11a8, 0x11f9,
+ 0x1200, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1401, 0x1676,
+ 0x1680, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19a9,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19d9,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a1f,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1baa,
+ 0x1bae, 0x1bb9,
+ 0x1c00, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1d00, 0x1de6,
+ 0x1dfe, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b5,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x214f,
+ 0x2153, 0x2188,
+ 0x2190, 0x23e7,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x269d,
+ 0x26a0, 0x26bc,
+ 0x26c0, 0x26c3,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x2756,
+ 0x2758, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27ca,
+ 0x27cc, 0x27cc,
+ 0x27d0, 0x2b4c,
+ 0x2b50, 0x2b54,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2c6f,
+ 0x2c71, 0x2c7d,
+ 0x2c80, 0x2cea,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e30,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x3243,
+ 0x3250, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fc3,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa500, 0xa62b,
+ 0xa640, 0xa65f,
+ 0xa662, 0xa673,
+ 0xa67c, 0xa697,
+ 0xa700, 0xa78c,
+ 0xa7fb, 0xa82b,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa95f,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa5f,
+ 0xac00, 0xd7a3,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6a,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x1083f,
+ 0x10900, 0x10919,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1fffe, 0x2a6d6,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_5_1 */
+
+/* 'Age_5_2': Derived Age 5.2 */
+static const OnigCodePoint CR_Age_5_2[] = {
+ 495,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0525,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x0606, 0x061b,
+ 0x061e, 0x061f,
+ 0x0621, 0x065e,
+ 0x0660, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0900, 0x0939,
+ 0x093c, 0x094e,
+ 0x0950, 0x0955,
+ 0x0958, 0x0972,
+ 0x0979, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b71,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d28,
+ 0x0d2a, 0x0d39,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f8b,
+ 0x0f90, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fd8,
+ 0x1000, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135f, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1baa,
+ 0x1bae, 0x1bb9,
+ 0x1c00, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cd0, 0x1cf2,
+ 0x1d00, 0x1de6,
+ 0x1dfd, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x2094,
+ 0x20a0, 0x20b8,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23e8,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x26cd,
+ 0x26cf, 0x26e1,
+ 0x26e3, 0x26e3,
+ 0x26e8, 0x26ff,
+ 0x2701, 0x2704,
+ 0x2706, 0x2709,
+ 0x270c, 0x2727,
+ 0x2729, 0x274b,
+ 0x274d, 0x274d,
+ 0x274f, 0x2752,
+ 0x2756, 0x275e,
+ 0x2761, 0x2794,
+ 0x2798, 0x27af,
+ 0x27b1, 0x27be,
+ 0x27c0, 0x27ca,
+ 0x27cc, 0x27cc,
+ 0x27d0, 0x2b4c,
+ 0x2b50, 0x2b59,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf1,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d6f,
+ 0x2d80, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e31,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31b7,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcb,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa65f,
+ 0xa662, 0xa673,
+ 0xa67c, 0xa697,
+ 0xa6a0, 0xa6f7,
+ 0xa700, 0xa78c,
+ 0xa7fb, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9df,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaadf,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbb1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1085f,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a7f,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b7f,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11080, 0x110c1,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x13000, 0x1342e,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f100, 0x1f10a,
+ 0x1f110, 0x1f12e,
+ 0x1f131, 0x1f131,
+ 0x1f13d, 0x1f13d,
+ 0x1f13f, 0x1f13f,
+ 0x1f142, 0x1f142,
+ 0x1f146, 0x1f146,
+ 0x1f14a, 0x1f14e,
+ 0x1f157, 0x1f157,
+ 0x1f15f, 0x1f15f,
+ 0x1f179, 0x1f179,
+ 0x1f17b, 0x1f17c,
+ 0x1f17f, 0x1f17f,
+ 0x1f18a, 0x1f18d,
+ 0x1f190, 0x1f190,
+ 0x1f200, 0x1f200,
+ 0x1f210, 0x1f231,
+ 0x1f240, 0x1f248,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_5_2 */
+
+/* 'Age_6_0': Derived Age 6.0 */
+static const OnigCodePoint CR_Age_6_0[] = {
+ 511,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0527,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0603,
+ 0x0606, 0x061b,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0900, 0x0977,
+ 0x0979, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0aef,
+ 0x0af1, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edd,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10d0, 0x10fc,
+ 0x1100, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1baa,
+ 0x1bae, 0x1bb9,
+ 0x1bc0, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cd0, 0x1cf2,
+ 0x1d00, 0x1de6,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20b9,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23f3,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x26ff,
+ 0x2701, 0x27ca,
+ 0x27cc, 0x27cc,
+ 0x27ce, 0x2b4c,
+ 0x2b50, 0x2b59,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf1,
+ 0x2cf9, 0x2d25,
+ 0x2d30, 0x2d65,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e31,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcb,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa673,
+ 0xa67c, 0xa697,
+ 0xa6a0, 0xa6f7,
+ 0xa700, 0xa78e,
+ 0xa790, 0xa791,
+ 0xa7a0, 0xa7a9,
+ 0xa7fa, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9df,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaadf,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa2d,
+ 0xfa30, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1085f,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a7f,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b7f,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x11080, 0x110c1,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x13000, 0x1342e,
+ 0x16800, 0x16a38,
+ 0x1b000, 0x1b001,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0be,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0df,
+ 0x1f100, 0x1f10a,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f169,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f320,
+ 0x1f330, 0x1f335,
+ 0x1f337, 0x1f37c,
+ 0x1f380, 0x1f393,
+ 0x1f3a0, 0x1f3c4,
+ 0x1f3c6, 0x1f3ca,
+ 0x1f3e0, 0x1f3f0,
+ 0x1f400, 0x1f43e,
+ 0x1f440, 0x1f440,
+ 0x1f442, 0x1f4f7,
+ 0x1f4f9, 0x1f4fc,
+ 0x1f500, 0x1f53d,
+ 0x1f550, 0x1f567,
+ 0x1f5fb, 0x1f5ff,
+ 0x1f601, 0x1f610,
+ 0x1f612, 0x1f614,
+ 0x1f616, 0x1f616,
+ 0x1f618, 0x1f618,
+ 0x1f61a, 0x1f61a,
+ 0x1f61c, 0x1f61e,
+ 0x1f620, 0x1f625,
+ 0x1f628, 0x1f62b,
+ 0x1f62d, 0x1f62d,
+ 0x1f630, 0x1f633,
+ 0x1f635, 0x1f640,
+ 0x1f645, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f700, 0x1f773,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_6_0 */
+
+/* 'Age_6_1': Derived Age 6.1 */
+static const OnigCodePoint CR_Age_6_1[] = {
+ 549,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0527,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058f, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0604,
+ 0x0606, 0x061b,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08a0,
+ 0x08a2, 0x08ac,
+ 0x08e4, 0x08fe,
+ 0x0900, 0x0977,
+ 0x0979, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1d00, 0x1de6,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20b9,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23f3,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x26ff,
+ 0x2701, 0x2b4c,
+ 0x2b50, 0x2b59,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e3b,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcc,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa697,
+ 0xa69f, 0xa6f7,
+ 0xa700, 0xa78e,
+ 0xa790, 0xa793,
+ 0xa7a0, 0xa7aa,
+ 0xa7f8, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9df,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1085f,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a7f,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b7f,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x11080, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11180, 0x111c8,
+ 0x111d0, 0x111d9,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x13000, 0x1342e,
+ 0x16800, 0x16a38,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x1b000, 0x1b001,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0be,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0df,
+ 0x1f100, 0x1f10a,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f320,
+ 0x1f330, 0x1f335,
+ 0x1f337, 0x1f37c,
+ 0x1f380, 0x1f393,
+ 0x1f3a0, 0x1f3c4,
+ 0x1f3c6, 0x1f3ca,
+ 0x1f3e0, 0x1f3f0,
+ 0x1f400, 0x1f43e,
+ 0x1f440, 0x1f440,
+ 0x1f442, 0x1f4f7,
+ 0x1f4f9, 0x1f4fc,
+ 0x1f500, 0x1f53d,
+ 0x1f540, 0x1f543,
+ 0x1f550, 0x1f567,
+ 0x1f5fb, 0x1f640,
+ 0x1f645, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f700, 0x1f773,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_6_1 */
+
+/* 'Age_6_2': Derived Age 6.2 */
+static const OnigCodePoint CR_Age_6_2[] = {
+ 549,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0527,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058f, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0604,
+ 0x0606, 0x061b,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08a0,
+ 0x08a2, 0x08ac,
+ 0x08e4, 0x08fe,
+ 0x0900, 0x0977,
+ 0x0979, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1d00, 0x1de6,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x206a, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20ba,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23f3,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x26ff,
+ 0x2701, 0x2b4c,
+ 0x2b50, 0x2b59,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e3b,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcc,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa697,
+ 0xa69f, 0xa6f7,
+ 0xa700, 0xa78e,
+ 0xa790, 0xa793,
+ 0xa7a0, 0xa7aa,
+ 0xa7f8, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9df,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1085f,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a7f,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b7f,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x11080, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11180, 0x111c8,
+ 0x111d0, 0x111d9,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x13000, 0x1342e,
+ 0x16800, 0x16a38,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x1b000, 0x1b001,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0be,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0df,
+ 0x1f100, 0x1f10a,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f320,
+ 0x1f330, 0x1f335,
+ 0x1f337, 0x1f37c,
+ 0x1f380, 0x1f393,
+ 0x1f3a0, 0x1f3c4,
+ 0x1f3c6, 0x1f3ca,
+ 0x1f3e0, 0x1f3f0,
+ 0x1f400, 0x1f43e,
+ 0x1f440, 0x1f440,
+ 0x1f442, 0x1f4f7,
+ 0x1f4f9, 0x1f4fc,
+ 0x1f500, 0x1f53d,
+ 0x1f540, 0x1f543,
+ 0x1f550, 0x1f567,
+ 0x1f5fb, 0x1f640,
+ 0x1f645, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f700, 0x1f773,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_6_2 */
+
+/* 'Age_6_3': Derived Age 6.3 */
+static const OnigCodePoint CR_Age_6_3[] = {
+ 549,
+ 0x0000, 0x0377,
+ 0x037a, 0x037e,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x0527,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058f, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x0604,
+ 0x0606, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08a0,
+ 0x08a2, 0x08ac,
+ 0x08e4, 0x08fe,
+ 0x0900, 0x0977,
+ 0x0979, 0x097f,
+ 0x0981, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c01, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c33,
+ 0x0c35, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c82, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d02, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f0,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191c,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1d00, 0x1de6,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20ba,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23f3,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x26ff,
+ 0x2701, 0x2b4c,
+ 0x2b50, 0x2b59,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e3b,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcc,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa697,
+ 0xa69f, 0xa6f7,
+ 0xa700, 0xa78e,
+ 0xa790, 0xa793,
+ 0xa7a0, 0xa7aa,
+ 0xa7f8, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9df,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaa7b,
+ 0xaa80, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe26,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018a,
+ 0x10190, 0x1019b,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x10300, 0x1031e,
+ 0x10320, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1085f,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a7f,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b7f,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x11080, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11180, 0x111c8,
+ 0x111d0, 0x111d9,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x12000, 0x1236e,
+ 0x12400, 0x12462,
+ 0x12470, 0x12473,
+ 0x13000, 0x1342e,
+ 0x16800, 0x16a38,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x1b000, 0x1b001,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0be,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0df,
+ 0x1f100, 0x1f10a,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f320,
+ 0x1f330, 0x1f335,
+ 0x1f337, 0x1f37c,
+ 0x1f380, 0x1f393,
+ 0x1f3a0, 0x1f3c4,
+ 0x1f3c6, 0x1f3ca,
+ 0x1f3e0, 0x1f3f0,
+ 0x1f400, 0x1f43e,
+ 0x1f440, 0x1f440,
+ 0x1f442, 0x1f4f7,
+ 0x1f4f9, 0x1f4fc,
+ 0x1f500, 0x1f53d,
+ 0x1f540, 0x1f543,
+ 0x1f550, 0x1f567,
+ 0x1f5fb, 0x1f640,
+ 0x1f645, 0x1f64f,
+ 0x1f680, 0x1f6c5,
+ 0x1f700, 0x1f773,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_6_3 */
+
+/* 'Age_7_0': Derived Age 7.0 */
+static const OnigCodePoint CR_Age_7_0[] = {
+ 610,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08b2,
+ 0x08e4, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c59,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c81, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d01, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d60, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f4,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1cf8, 0x1cf9,
+ 0x1d00, 0x1df5,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bd,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x2189,
+ 0x2190, 0x23fa,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2bb9,
+ 0x2bbd, 0x2bc8,
+ 0x2bca, 0x2bd1,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e42,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fcc,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa69d,
+ 0xa69f, 0xa6f7,
+ 0xa700, 0xa78e,
+ 0xa790, 0xa7ad,
+ 0xa7b0, 0xa7b1,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fb,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab5f,
+ 0xab64, 0xab65,
+ 0xabc0, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe2d,
+ 0xfe30, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018c,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x10900, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109be, 0x109bf,
+ 0x10a00, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11150, 0x11176,
+ 0x11180, 0x111c8,
+ 0x111cd, 0x111cd,
+ 0x111d0, 0x111da,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123d,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11301, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133c, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115c9,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x11ac0, 0x11af8,
+ 0x12000, 0x12398,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x13000, 0x1342e,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x1b000, 0x1b001,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1dd,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1d7ff,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f32c,
+ 0x1f330, 0x1f37d,
+ 0x1f380, 0x1f3ce,
+ 0x1f3d4, 0x1f3f7,
+ 0x1f400, 0x1f4fe,
+ 0x1f500, 0x1f54a,
+ 0x1f550, 0x1f579,
+ 0x1f57b, 0x1f5a3,
+ 0x1f5a5, 0x1f642,
+ 0x1f645, 0x1f6cf,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6f3,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d4,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_7_0 */
+
+/* 'Age_8_0': Derived Age 8.0 */
+static const OnigCodePoint CR_Age_8_0[] = {
+ 623,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08b4,
+ 0x08e3, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0af9,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c7f,
+ 0x0c81, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d01, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4e,
+ 0x0d57, 0x0d57,
+ 0x0d5f, 0x0d63,
+ 0x0d66, 0x0d75,
+ 0x0d79, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c7f,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1cf8, 0x1cf9,
+ 0x1d00, 0x1df5,
+ 0x1dfc, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20be,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x23fa,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2bb9,
+ 0x2bbd, 0x2bc8,
+ 0x2bca, 0x2bd1,
+ 0x2bec, 0x2bef,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e42,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fd5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ad,
+ 0xa7b0, 0xa7b7,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c4,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fd,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab65,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018c,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10cff,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123d,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133c, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x11719,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x11ac0, 0x11af8,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x1b000, 0x1b001,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f19a,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23a,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f579,
+ 0x1f57b, 0x1f5a3,
+ 0x1f5a5, 0x1f6d0,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6f3,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d4,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f910, 0x1f918,
+ 0x1f980, 0x1f984,
+ 0x1f9c0, 0x1f9c0,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_8_0 */
+
+/* 'Age_9_0': Derived Age 9.0 */
+static const OnigCodePoint CR_Age_9_0[] = {
+ 648,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08bd,
+ 0x08d4, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fb,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0af9,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d01, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d3a,
+ 0x0d3d, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf6,
+ 0x1cf8, 0x1cf9,
+ 0x1d00, 0x1df5,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20be,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x23fe,
+ 0x2400, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2bb9,
+ 0x2bbd, 0x2bc8,
+ 0x2bca, 0x2bd1,
+ 0x2bec, 0x2bef,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e44,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312d,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fd5,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ae,
+ 0xa7b0, 0xa7b7,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fd,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab65,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x10330, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10cff,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133c, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x11459,
+ 0x1145b, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x11719,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe0,
+ 0x17000, 0x187ec,
+ 0x18800, 0x18af2,
+ 0x1b000, 0x1b001,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94a,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f1ac,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f300, 0x1f6d2,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6f6,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d4,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f910, 0x1f91e,
+ 0x1f920, 0x1f927,
+ 0x1f930, 0x1f930,
+ 0x1f933, 0x1f93e,
+ 0x1f940, 0x1f94b,
+ 0x1f950, 0x1f95e,
+ 0x1f980, 0x1f991,
+ 0x1f9c0, 0x1f9c0,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_9_0 */
+
+/* 'Age_10_0': Derived Age 10.0 */
+static const OnigCodePoint CR_Age_10_0[] = {
+ 659,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x055f,
+ 0x0561, 0x0587,
+ 0x0589, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05f0, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x0800, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08bd,
+ 0x08d4, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fd,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a75,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c03,
+ 0x0c05, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c83,
+ 0x0c85, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1877,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1cc0, 0x1cc7,
+ 0x1cd0, 0x1cf9,
+ 0x1d00, 0x1df9,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bf,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2bb9,
+ 0x2bbd, 0x2bc8,
+ 0x2bca, 0x2bd2,
+ 0x2bec, 0x2bef,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e49,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312e,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fea,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ae,
+ 0xa7b0, 0xa7b7,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa8fd,
+ 0xa900, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab65,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a33,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a47,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10cff,
+ 0x10e60, 0x10e7e,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11143,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133c, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x11459,
+ 0x1145b, 0x1145b,
+ 0x1145d, 0x1145d,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x11719,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11a83,
+ 0x11a86, 0x11a9c,
+ 0x11a9e, 0x11aa2,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x17000, 0x187ec,
+ 0x18800, 0x18af2,
+ 0x1b000, 0x1b11e,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d371,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94a,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f12e,
+ 0x1f130, 0x1f16b,
+ 0x1f170, 0x1f1ac,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d4,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6f8,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d4,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f900, 0x1f90b,
+ 0x1f910, 0x1f93e,
+ 0x1f940, 0x1f94c,
+ 0x1f950, 0x1f96b,
+ 0x1f980, 0x1f997,
+ 0x1f9c0, 0x1f9c0,
+ 0x1f9d0, 0x1f9e6,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_10_0 */
+
+/* 'Age_11_0': Derived Age 11.0 */
+static const OnigCodePoint CR_Age_11_0[] = {
+ 668,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08bd,
+ 0x08d3, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c78, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e87, 0x0e88,
+ 0x0e8a, 0x0e8a,
+ 0x0e8d, 0x0e8d,
+ 0x0e94, 0x0e97,
+ 0x0e99, 0x0e9f,
+ 0x0ea1, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ea7,
+ 0x0eaa, 0x0eab,
+ 0x0ead, 0x0eb9,
+ 0x0ebb, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cf9,
+ 0x1d00, 0x1df9,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bf,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2bc8,
+ 0x2bca, 0x2bfe,
+ 0x2c00, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e4e,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fef,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7b9,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab65,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11146,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x11459,
+ 0x1145b, 0x1145b,
+ 0x1145d, 0x1145e,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b7,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11a83,
+ 0x11a86, 0x11aa2,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x12000, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f44,
+ 0x16f50, 0x16f7e,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe1,
+ 0x17000, 0x187f1,
+ 0x18800, 0x18af2,
+ 0x1b000, 0x1b11e,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94a,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f16b,
+ 0x1f170, 0x1f1ac,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d4,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6f9,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d8,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f900, 0x1f90b,
+ 0x1f910, 0x1f93e,
+ 0x1f940, 0x1f970,
+ 0x1f973, 0x1f976,
+ 0x1f97a, 0x1f97a,
+ 0x1f97c, 0x1f9a2,
+ 0x1f9b0, 0x1f9b9,
+ 0x1f9c0, 0x1f9c2,
+ 0x1f9d0, 0x1f9ff,
+ 0x1fa60, 0x1fa6d,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_11_0 */
+
+/* 'Age_12_0': Derived Age 12.0 */
+static const OnigCodePoint CR_Age_12_0[] = {
+ 677,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08bd,
+ 0x08d3, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1df9,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bf,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e4f,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x32fe,
+ 0x3300, 0x4db5,
+ 0x4dc0, 0x9fef,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7bf,
+ 0xa7c2, 0xa7c6,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab67,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11146,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x11459,
+ 0x1145b, 0x1145b,
+ 0x1145d, 0x1145f,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x13430, 0x13438,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe3,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18af2,
+ 0x1b000, 0x1b11e,
+ 0x1b150, 0x1b152,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f16c,
+ 0x1f170, 0x1f1ac,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d5,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6fa,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d8,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f900, 0x1f90b,
+ 0x1f90d, 0x1f971,
+ 0x1f973, 0x1f976,
+ 0x1f97a, 0x1f9a2,
+ 0x1f9a5, 0x1f9aa,
+ 0x1f9ae, 0x1f9ca,
+ 0x1f9cd, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa73,
+ 0x1fa78, 0x1fa7a,
+ 0x1fa80, 0x1fa82,
+ 0x1fa90, 0x1fa95,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_12_0 */
+
+/* 'Age_12_1': Derived Age 12.1 */
+static const OnigCodePoint CR_Age_12_1[] = {
+ 676,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08bd,
+ 0x08d3, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b56, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d03,
+ 0x0d05, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d82, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1abe,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1df9,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bf,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b98, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e4f,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31ba,
+ 0x31c0, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x4db5,
+ 0x4dc0, 0x9fef,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7bf,
+ 0xa7c2, 0xa7c6,
+ 0xa7f7, 0xa82b,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab67,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019b,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11146,
+ 0x11150, 0x11176,
+ 0x11180, 0x111cd,
+ 0x111d0, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x11459,
+ 0x1145b, 0x1145b,
+ 0x1145d, 0x1145f,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x118ff,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x13430, 0x13438,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe3,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18af2,
+ 0x1b000, 0x1b11e,
+ 0x1b150, 0x1b152,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f10c,
+ 0x1f110, 0x1f16c,
+ 0x1f170, 0x1f1ac,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d5,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6fa,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d8,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f900, 0x1f90b,
+ 0x1f90d, 0x1f971,
+ 0x1f973, 0x1f976,
+ 0x1f97a, 0x1f9a2,
+ 0x1f9a5, 0x1f9aa,
+ 0x1f9ae, 0x1f9ca,
+ 0x1f9cd, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa73,
+ 0x1fa78, 0x1fa7a,
+ 0x1fa80, 0x1fa82,
+ 0x1fa90, 0x1fa95,
+ 0x1fffe, 0x2a6d6,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x2ffff,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_12_1 */
+
+/* 'Age_13_0': Derived Age 13.0 */
+static const OnigCodePoint CR_Age_13_0[] = {
+ 686,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x061c,
+ 0x061e, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x08a0, 0x08b4,
+ 0x08b6, 0x08c7,
+ 0x08d3, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3d, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cde, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x170c,
+ 0x170e, 0x1714,
+ 0x1720, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x180e,
+ 0x1810, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ac0,
+ 0x1b00, 0x1b4b,
+ 0x1b50, 0x1b7c,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1df9,
+ 0x1dfb, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20bf,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2c2e,
+ 0x2c30, 0x2c5e,
+ 0x2c60, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e52,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0x9ffc,
+ 0xa000, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7bf,
+ 0xa7c2, 0xa7ca,
+ 0xa7f5, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc1,
+ 0xfbd3, 0xfd3f,
+ 0xfd50, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdd0, 0xfdfd,
+ 0xfe00, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1056f,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x1106f,
+ 0x1107f, 0x110c1,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b8,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x1173f,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ac0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x13000, 0x1342e,
+ 0x13430, 0x13438,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16a6f,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1b000, 0x1b11e,
+ 0x1b150, 0x1b152,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1e8,
+ 0x1d200, 0x1d245,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6e0, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d8,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1f978,
+ 0x1f97a, 0x1f9cb,
+ 0x1f9cd, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa74,
+ 0x1fa78, 0x1fa7a,
+ 0x1fa80, 0x1fa86,
+ 0x1fa90, 0x1faa8,
+ 0x1fab0, 0x1fab6,
+ 0x1fac0, 0x1fac2,
+ 0x1fad0, 0x1fad6,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x1fffe, 0x2a6dd,
+ 0x2a700, 0x2b734,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x3134a,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_13_0 */
+
+/* 'Age_14_0': Derived Age 14.0 */
+static const OnigCodePoint CR_Age_14_0[] = {
+ 706,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf2,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ecd,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10f00, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10f70, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x1123e,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x1342e,
+ 0x13430, 0x13438,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b150, 0x1b152,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1ea,
+ 0x1d200, 0x1d245,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dd, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f773,
+ 0x1f780, 0x1f7d8,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa74,
+ 0x1fa78, 0x1fa7c,
+ 0x1fa80, 0x1fa86,
+ 0x1fa90, 0x1faac,
+ 0x1fab0, 0x1faba,
+ 0x1fac0, 0x1fac5,
+ 0x1fad0, 0x1fad9,
+ 0x1fae0, 0x1fae7,
+ 0x1faf0, 0x1faf6,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x1fffe, 0x2a6df,
+ 0x2a700, 0x2b738,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x3134a,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_14_0 */
+
+/* 'Age_15_0': Derived Age 15.0 */
+static const OnigCodePoint CR_Age_15_0[] = {
+ 715,
+ 0x0000, 0x0377,
+ 0x037a, 0x037f,
+ 0x0384, 0x038a,
+ 0x038c, 0x038c,
+ 0x038e, 0x03a1,
+ 0x03a3, 0x052f,
+ 0x0531, 0x0556,
+ 0x0559, 0x058a,
+ 0x058d, 0x058f,
+ 0x0591, 0x05c7,
+ 0x05d0, 0x05ea,
+ 0x05ef, 0x05f4,
+ 0x0600, 0x070d,
+ 0x070f, 0x074a,
+ 0x074d, 0x07b1,
+ 0x07c0, 0x07fa,
+ 0x07fd, 0x082d,
+ 0x0830, 0x083e,
+ 0x0840, 0x085b,
+ 0x085e, 0x085e,
+ 0x0860, 0x086a,
+ 0x0870, 0x088e,
+ 0x0890, 0x0891,
+ 0x0898, 0x0983,
+ 0x0985, 0x098c,
+ 0x098f, 0x0990,
+ 0x0993, 0x09a8,
+ 0x09aa, 0x09b0,
+ 0x09b2, 0x09b2,
+ 0x09b6, 0x09b9,
+ 0x09bc, 0x09c4,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09ce,
+ 0x09d7, 0x09d7,
+ 0x09dc, 0x09dd,
+ 0x09df, 0x09e3,
+ 0x09e6, 0x09fe,
+ 0x0a01, 0x0a03,
+ 0x0a05, 0x0a0a,
+ 0x0a0f, 0x0a10,
+ 0x0a13, 0x0a28,
+ 0x0a2a, 0x0a30,
+ 0x0a32, 0x0a33,
+ 0x0a35, 0x0a36,
+ 0x0a38, 0x0a39,
+ 0x0a3c, 0x0a3c,
+ 0x0a3e, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a59, 0x0a5c,
+ 0x0a5e, 0x0a5e,
+ 0x0a66, 0x0a76,
+ 0x0a81, 0x0a83,
+ 0x0a85, 0x0a8d,
+ 0x0a8f, 0x0a91,
+ 0x0a93, 0x0aa8,
+ 0x0aaa, 0x0ab0,
+ 0x0ab2, 0x0ab3,
+ 0x0ab5, 0x0ab9,
+ 0x0abc, 0x0ac5,
+ 0x0ac7, 0x0ac9,
+ 0x0acb, 0x0acd,
+ 0x0ad0, 0x0ad0,
+ 0x0ae0, 0x0ae3,
+ 0x0ae6, 0x0af1,
+ 0x0af9, 0x0aff,
+ 0x0b01, 0x0b03,
+ 0x0b05, 0x0b0c,
+ 0x0b0f, 0x0b10,
+ 0x0b13, 0x0b28,
+ 0x0b2a, 0x0b30,
+ 0x0b32, 0x0b33,
+ 0x0b35, 0x0b39,
+ 0x0b3c, 0x0b44,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b5c, 0x0b5d,
+ 0x0b5f, 0x0b63,
+ 0x0b66, 0x0b77,
+ 0x0b82, 0x0b83,
+ 0x0b85, 0x0b8a,
+ 0x0b8e, 0x0b90,
+ 0x0b92, 0x0b95,
+ 0x0b99, 0x0b9a,
+ 0x0b9c, 0x0b9c,
+ 0x0b9e, 0x0b9f,
+ 0x0ba3, 0x0ba4,
+ 0x0ba8, 0x0baa,
+ 0x0bae, 0x0bb9,
+ 0x0bbe, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcd,
+ 0x0bd0, 0x0bd0,
+ 0x0bd7, 0x0bd7,
+ 0x0be6, 0x0bfa,
+ 0x0c00, 0x0c0c,
+ 0x0c0e, 0x0c10,
+ 0x0c12, 0x0c28,
+ 0x0c2a, 0x0c39,
+ 0x0c3c, 0x0c44,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c58, 0x0c5a,
+ 0x0c5d, 0x0c5d,
+ 0x0c60, 0x0c63,
+ 0x0c66, 0x0c6f,
+ 0x0c77, 0x0c8c,
+ 0x0c8e, 0x0c90,
+ 0x0c92, 0x0ca8,
+ 0x0caa, 0x0cb3,
+ 0x0cb5, 0x0cb9,
+ 0x0cbc, 0x0cc4,
+ 0x0cc6, 0x0cc8,
+ 0x0cca, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0cdd, 0x0cde,
+ 0x0ce0, 0x0ce3,
+ 0x0ce6, 0x0cef,
+ 0x0cf1, 0x0cf3,
+ 0x0d00, 0x0d0c,
+ 0x0d0e, 0x0d10,
+ 0x0d12, 0x0d44,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4f,
+ 0x0d54, 0x0d63,
+ 0x0d66, 0x0d7f,
+ 0x0d81, 0x0d83,
+ 0x0d85, 0x0d96,
+ 0x0d9a, 0x0db1,
+ 0x0db3, 0x0dbb,
+ 0x0dbd, 0x0dbd,
+ 0x0dc0, 0x0dc6,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0dd8, 0x0ddf,
+ 0x0de6, 0x0def,
+ 0x0df2, 0x0df4,
+ 0x0e01, 0x0e3a,
+ 0x0e3f, 0x0e5b,
+ 0x0e81, 0x0e82,
+ 0x0e84, 0x0e84,
+ 0x0e86, 0x0e8a,
+ 0x0e8c, 0x0ea3,
+ 0x0ea5, 0x0ea5,
+ 0x0ea7, 0x0ebd,
+ 0x0ec0, 0x0ec4,
+ 0x0ec6, 0x0ec6,
+ 0x0ec8, 0x0ece,
+ 0x0ed0, 0x0ed9,
+ 0x0edc, 0x0edf,
+ 0x0f00, 0x0f47,
+ 0x0f49, 0x0f6c,
+ 0x0f71, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fbe, 0x0fcc,
+ 0x0fce, 0x0fda,
+ 0x1000, 0x10c5,
+ 0x10c7, 0x10c7,
+ 0x10cd, 0x10cd,
+ 0x10d0, 0x1248,
+ 0x124a, 0x124d,
+ 0x1250, 0x1256,
+ 0x1258, 0x1258,
+ 0x125a, 0x125d,
+ 0x1260, 0x1288,
+ 0x128a, 0x128d,
+ 0x1290, 0x12b0,
+ 0x12b2, 0x12b5,
+ 0x12b8, 0x12be,
+ 0x12c0, 0x12c0,
+ 0x12c2, 0x12c5,
+ 0x12c8, 0x12d6,
+ 0x12d8, 0x1310,
+ 0x1312, 0x1315,
+ 0x1318, 0x135a,
+ 0x135d, 0x137c,
+ 0x1380, 0x1399,
+ 0x13a0, 0x13f5,
+ 0x13f8, 0x13fd,
+ 0x1400, 0x169c,
+ 0x16a0, 0x16f8,
+ 0x1700, 0x1715,
+ 0x171f, 0x1736,
+ 0x1740, 0x1753,
+ 0x1760, 0x176c,
+ 0x176e, 0x1770,
+ 0x1772, 0x1773,
+ 0x1780, 0x17dd,
+ 0x17e0, 0x17e9,
+ 0x17f0, 0x17f9,
+ 0x1800, 0x1819,
+ 0x1820, 0x1878,
+ 0x1880, 0x18aa,
+ 0x18b0, 0x18f5,
+ 0x1900, 0x191e,
+ 0x1920, 0x192b,
+ 0x1930, 0x193b,
+ 0x1940, 0x1940,
+ 0x1944, 0x196d,
+ 0x1970, 0x1974,
+ 0x1980, 0x19ab,
+ 0x19b0, 0x19c9,
+ 0x19d0, 0x19da,
+ 0x19de, 0x1a1b,
+ 0x1a1e, 0x1a5e,
+ 0x1a60, 0x1a7c,
+ 0x1a7f, 0x1a89,
+ 0x1a90, 0x1a99,
+ 0x1aa0, 0x1aad,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b4c,
+ 0x1b50, 0x1b7e,
+ 0x1b80, 0x1bf3,
+ 0x1bfc, 0x1c37,
+ 0x1c3b, 0x1c49,
+ 0x1c4d, 0x1c88,
+ 0x1c90, 0x1cba,
+ 0x1cbd, 0x1cc7,
+ 0x1cd0, 0x1cfa,
+ 0x1d00, 0x1f15,
+ 0x1f18, 0x1f1d,
+ 0x1f20, 0x1f45,
+ 0x1f48, 0x1f4d,
+ 0x1f50, 0x1f57,
+ 0x1f59, 0x1f59,
+ 0x1f5b, 0x1f5b,
+ 0x1f5d, 0x1f5d,
+ 0x1f5f, 0x1f7d,
+ 0x1f80, 0x1fb4,
+ 0x1fb6, 0x1fc4,
+ 0x1fc6, 0x1fd3,
+ 0x1fd6, 0x1fdb,
+ 0x1fdd, 0x1fef,
+ 0x1ff2, 0x1ff4,
+ 0x1ff6, 0x1ffe,
+ 0x2000, 0x2064,
+ 0x2066, 0x2071,
+ 0x2074, 0x208e,
+ 0x2090, 0x209c,
+ 0x20a0, 0x20c0,
+ 0x20d0, 0x20f0,
+ 0x2100, 0x218b,
+ 0x2190, 0x2426,
+ 0x2440, 0x244a,
+ 0x2460, 0x2b73,
+ 0x2b76, 0x2b95,
+ 0x2b97, 0x2cf3,
+ 0x2cf9, 0x2d25,
+ 0x2d27, 0x2d27,
+ 0x2d2d, 0x2d2d,
+ 0x2d30, 0x2d67,
+ 0x2d6f, 0x2d70,
+ 0x2d7f, 0x2d96,
+ 0x2da0, 0x2da6,
+ 0x2da8, 0x2dae,
+ 0x2db0, 0x2db6,
+ 0x2db8, 0x2dbe,
+ 0x2dc0, 0x2dc6,
+ 0x2dc8, 0x2dce,
+ 0x2dd0, 0x2dd6,
+ 0x2dd8, 0x2dde,
+ 0x2de0, 0x2e5d,
+ 0x2e80, 0x2e99,
+ 0x2e9b, 0x2ef3,
+ 0x2f00, 0x2fd5,
+ 0x2ff0, 0x2ffb,
+ 0x3000, 0x303f,
+ 0x3041, 0x3096,
+ 0x3099, 0x30ff,
+ 0x3105, 0x312f,
+ 0x3131, 0x318e,
+ 0x3190, 0x31e3,
+ 0x31f0, 0x321e,
+ 0x3220, 0xa48c,
+ 0xa490, 0xa4c6,
+ 0xa4d0, 0xa62b,
+ 0xa640, 0xa6f7,
+ 0xa700, 0xa7ca,
+ 0xa7d0, 0xa7d1,
+ 0xa7d3, 0xa7d3,
+ 0xa7d5, 0xa7d9,
+ 0xa7f2, 0xa82c,
+ 0xa830, 0xa839,
+ 0xa840, 0xa877,
+ 0xa880, 0xa8c5,
+ 0xa8ce, 0xa8d9,
+ 0xa8e0, 0xa953,
+ 0xa95f, 0xa97c,
+ 0xa980, 0xa9cd,
+ 0xa9cf, 0xa9d9,
+ 0xa9de, 0xa9fe,
+ 0xaa00, 0xaa36,
+ 0xaa40, 0xaa4d,
+ 0xaa50, 0xaa59,
+ 0xaa5c, 0xaac2,
+ 0xaadb, 0xaaf6,
+ 0xab01, 0xab06,
+ 0xab09, 0xab0e,
+ 0xab11, 0xab16,
+ 0xab20, 0xab26,
+ 0xab28, 0xab2e,
+ 0xab30, 0xab6b,
+ 0xab70, 0xabed,
+ 0xabf0, 0xabf9,
+ 0xac00, 0xd7a3,
+ 0xd7b0, 0xd7c6,
+ 0xd7cb, 0xd7fb,
+ 0xd800, 0xfa6d,
+ 0xfa70, 0xfad9,
+ 0xfb00, 0xfb06,
+ 0xfb13, 0xfb17,
+ 0xfb1d, 0xfb36,
+ 0xfb38, 0xfb3c,
+ 0xfb3e, 0xfb3e,
+ 0xfb40, 0xfb41,
+ 0xfb43, 0xfb44,
+ 0xfb46, 0xfbc2,
+ 0xfbd3, 0xfd8f,
+ 0xfd92, 0xfdc7,
+ 0xfdcf, 0xfe19,
+ 0xfe20, 0xfe52,
+ 0xfe54, 0xfe66,
+ 0xfe68, 0xfe6b,
+ 0xfe70, 0xfe74,
+ 0xfe76, 0xfefc,
+ 0xfeff, 0xfeff,
+ 0xff01, 0xffbe,
+ 0xffc2, 0xffc7,
+ 0xffca, 0xffcf,
+ 0xffd2, 0xffd7,
+ 0xffda, 0xffdc,
+ 0xffe0, 0xffe6,
+ 0xffe8, 0xffee,
+ 0xfff9, 0x1000b,
+ 0x1000d, 0x10026,
+ 0x10028, 0x1003a,
+ 0x1003c, 0x1003d,
+ 0x1003f, 0x1004d,
+ 0x10050, 0x1005d,
+ 0x10080, 0x100fa,
+ 0x10100, 0x10102,
+ 0x10107, 0x10133,
+ 0x10137, 0x1018e,
+ 0x10190, 0x1019c,
+ 0x101a0, 0x101a0,
+ 0x101d0, 0x101fd,
+ 0x10280, 0x1029c,
+ 0x102a0, 0x102d0,
+ 0x102e0, 0x102fb,
+ 0x10300, 0x10323,
+ 0x1032d, 0x1034a,
+ 0x10350, 0x1037a,
+ 0x10380, 0x1039d,
+ 0x1039f, 0x103c3,
+ 0x103c8, 0x103d5,
+ 0x10400, 0x1049d,
+ 0x104a0, 0x104a9,
+ 0x104b0, 0x104d3,
+ 0x104d8, 0x104fb,
+ 0x10500, 0x10527,
+ 0x10530, 0x10563,
+ 0x1056f, 0x1057a,
+ 0x1057c, 0x1058a,
+ 0x1058c, 0x10592,
+ 0x10594, 0x10595,
+ 0x10597, 0x105a1,
+ 0x105a3, 0x105b1,
+ 0x105b3, 0x105b9,
+ 0x105bb, 0x105bc,
+ 0x10600, 0x10736,
+ 0x10740, 0x10755,
+ 0x10760, 0x10767,
+ 0x10780, 0x10785,
+ 0x10787, 0x107b0,
+ 0x107b2, 0x107ba,
+ 0x10800, 0x10805,
+ 0x10808, 0x10808,
+ 0x1080a, 0x10835,
+ 0x10837, 0x10838,
+ 0x1083c, 0x1083c,
+ 0x1083f, 0x10855,
+ 0x10857, 0x1089e,
+ 0x108a7, 0x108af,
+ 0x108e0, 0x108f2,
+ 0x108f4, 0x108f5,
+ 0x108fb, 0x1091b,
+ 0x1091f, 0x10939,
+ 0x1093f, 0x1093f,
+ 0x10980, 0x109b7,
+ 0x109bc, 0x109cf,
+ 0x109d2, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a13,
+ 0x10a15, 0x10a17,
+ 0x10a19, 0x10a35,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a48,
+ 0x10a50, 0x10a58,
+ 0x10a60, 0x10a9f,
+ 0x10ac0, 0x10ae6,
+ 0x10aeb, 0x10af6,
+ 0x10b00, 0x10b35,
+ 0x10b39, 0x10b55,
+ 0x10b58, 0x10b72,
+ 0x10b78, 0x10b91,
+ 0x10b99, 0x10b9c,
+ 0x10ba9, 0x10baf,
+ 0x10c00, 0x10c48,
+ 0x10c80, 0x10cb2,
+ 0x10cc0, 0x10cf2,
+ 0x10cfa, 0x10d27,
+ 0x10d30, 0x10d39,
+ 0x10e60, 0x10e7e,
+ 0x10e80, 0x10ea9,
+ 0x10eab, 0x10ead,
+ 0x10eb0, 0x10eb1,
+ 0x10efd, 0x10f27,
+ 0x10f30, 0x10f59,
+ 0x10f70, 0x10f89,
+ 0x10fb0, 0x10fcb,
+ 0x10fe0, 0x10ff6,
+ 0x11000, 0x1104d,
+ 0x11052, 0x11075,
+ 0x1107f, 0x110c2,
+ 0x110cd, 0x110cd,
+ 0x110d0, 0x110e8,
+ 0x110f0, 0x110f9,
+ 0x11100, 0x11134,
+ 0x11136, 0x11147,
+ 0x11150, 0x11176,
+ 0x11180, 0x111df,
+ 0x111e1, 0x111f4,
+ 0x11200, 0x11211,
+ 0x11213, 0x11241,
+ 0x11280, 0x11286,
+ 0x11288, 0x11288,
+ 0x1128a, 0x1128d,
+ 0x1128f, 0x1129d,
+ 0x1129f, 0x112a9,
+ 0x112b0, 0x112ea,
+ 0x112f0, 0x112f9,
+ 0x11300, 0x11303,
+ 0x11305, 0x1130c,
+ 0x1130f, 0x11310,
+ 0x11313, 0x11328,
+ 0x1132a, 0x11330,
+ 0x11332, 0x11333,
+ 0x11335, 0x11339,
+ 0x1133b, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11350, 0x11350,
+ 0x11357, 0x11357,
+ 0x1135d, 0x11363,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11400, 0x1145b,
+ 0x1145d, 0x11461,
+ 0x11480, 0x114c7,
+ 0x114d0, 0x114d9,
+ 0x11580, 0x115b5,
+ 0x115b8, 0x115dd,
+ 0x11600, 0x11644,
+ 0x11650, 0x11659,
+ 0x11660, 0x1166c,
+ 0x11680, 0x116b9,
+ 0x116c0, 0x116c9,
+ 0x11700, 0x1171a,
+ 0x1171d, 0x1172b,
+ 0x11730, 0x11746,
+ 0x11800, 0x1183b,
+ 0x118a0, 0x118f2,
+ 0x118ff, 0x11906,
+ 0x11909, 0x11909,
+ 0x1190c, 0x11913,
+ 0x11915, 0x11916,
+ 0x11918, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193b, 0x11946,
+ 0x11950, 0x11959,
+ 0x119a0, 0x119a7,
+ 0x119aa, 0x119d7,
+ 0x119da, 0x119e4,
+ 0x11a00, 0x11a47,
+ 0x11a50, 0x11aa2,
+ 0x11ab0, 0x11af8,
+ 0x11b00, 0x11b09,
+ 0x11c00, 0x11c08,
+ 0x11c0a, 0x11c36,
+ 0x11c38, 0x11c45,
+ 0x11c50, 0x11c6c,
+ 0x11c70, 0x11c8f,
+ 0x11c92, 0x11ca7,
+ 0x11ca9, 0x11cb6,
+ 0x11d00, 0x11d06,
+ 0x11d08, 0x11d09,
+ 0x11d0b, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d47,
+ 0x11d50, 0x11d59,
+ 0x11d60, 0x11d65,
+ 0x11d67, 0x11d68,
+ 0x11d6a, 0x11d8e,
+ 0x11d90, 0x11d91,
+ 0x11d93, 0x11d98,
+ 0x11da0, 0x11da9,
+ 0x11ee0, 0x11ef8,
+ 0x11f00, 0x11f10,
+ 0x11f12, 0x11f3a,
+ 0x11f3e, 0x11f59,
+ 0x11fb0, 0x11fb0,
+ 0x11fc0, 0x11ff1,
+ 0x11fff, 0x12399,
+ 0x12400, 0x1246e,
+ 0x12470, 0x12474,
+ 0x12480, 0x12543,
+ 0x12f90, 0x12ff2,
+ 0x13000, 0x13455,
+ 0x14400, 0x14646,
+ 0x16800, 0x16a38,
+ 0x16a40, 0x16a5e,
+ 0x16a60, 0x16a69,
+ 0x16a6e, 0x16abe,
+ 0x16ac0, 0x16ac9,
+ 0x16ad0, 0x16aed,
+ 0x16af0, 0x16af5,
+ 0x16b00, 0x16b45,
+ 0x16b50, 0x16b59,
+ 0x16b5b, 0x16b61,
+ 0x16b63, 0x16b77,
+ 0x16b7d, 0x16b8f,
+ 0x16e40, 0x16e9a,
+ 0x16f00, 0x16f4a,
+ 0x16f4f, 0x16f87,
+ 0x16f8f, 0x16f9f,
+ 0x16fe0, 0x16fe4,
+ 0x16ff0, 0x16ff1,
+ 0x17000, 0x187f7,
+ 0x18800, 0x18cd5,
+ 0x18d00, 0x18d08,
+ 0x1aff0, 0x1aff3,
+ 0x1aff5, 0x1affb,
+ 0x1affd, 0x1affe,
+ 0x1b000, 0x1b122,
+ 0x1b132, 0x1b132,
+ 0x1b150, 0x1b152,
+ 0x1b155, 0x1b155,
+ 0x1b164, 0x1b167,
+ 0x1b170, 0x1b2fb,
+ 0x1bc00, 0x1bc6a,
+ 0x1bc70, 0x1bc7c,
+ 0x1bc80, 0x1bc88,
+ 0x1bc90, 0x1bc99,
+ 0x1bc9c, 0x1bca3,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1cf50, 0x1cfc3,
+ 0x1d000, 0x1d0f5,
+ 0x1d100, 0x1d126,
+ 0x1d129, 0x1d1ea,
+ 0x1d200, 0x1d245,
+ 0x1d2c0, 0x1d2d3,
+ 0x1d2e0, 0x1d2f3,
+ 0x1d300, 0x1d356,
+ 0x1d360, 0x1d378,
+ 0x1d400, 0x1d454,
+ 0x1d456, 0x1d49c,
+ 0x1d49e, 0x1d49f,
+ 0x1d4a2, 0x1d4a2,
+ 0x1d4a5, 0x1d4a6,
+ 0x1d4a9, 0x1d4ac,
+ 0x1d4ae, 0x1d4b9,
+ 0x1d4bb, 0x1d4bb,
+ 0x1d4bd, 0x1d4c3,
+ 0x1d4c5, 0x1d505,
+ 0x1d507, 0x1d50a,
+ 0x1d50d, 0x1d514,
+ 0x1d516, 0x1d51c,
+ 0x1d51e, 0x1d539,
+ 0x1d53b, 0x1d53e,
+ 0x1d540, 0x1d544,
+ 0x1d546, 0x1d546,
+ 0x1d54a, 0x1d550,
+ 0x1d552, 0x1d6a5,
+ 0x1d6a8, 0x1d7cb,
+ 0x1d7ce, 0x1da8b,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1df00, 0x1df1e,
+ 0x1df25, 0x1df2a,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e030, 0x1e06d,
+ 0x1e08f, 0x1e08f,
+ 0x1e100, 0x1e12c,
+ 0x1e130, 0x1e13d,
+ 0x1e140, 0x1e149,
+ 0x1e14e, 0x1e14f,
+ 0x1e290, 0x1e2ae,
+ 0x1e2c0, 0x1e2f9,
+ 0x1e2ff, 0x1e2ff,
+ 0x1e4d0, 0x1e4f9,
+ 0x1e7e0, 0x1e7e6,
+ 0x1e7e8, 0x1e7eb,
+ 0x1e7ed, 0x1e7ee,
+ 0x1e7f0, 0x1e7fe,
+ 0x1e800, 0x1e8c4,
+ 0x1e8c7, 0x1e8d6,
+ 0x1e900, 0x1e94b,
+ 0x1e950, 0x1e959,
+ 0x1e95e, 0x1e95f,
+ 0x1ec71, 0x1ecb4,
+ 0x1ed01, 0x1ed3d,
+ 0x1ee00, 0x1ee03,
+ 0x1ee05, 0x1ee1f,
+ 0x1ee21, 0x1ee22,
+ 0x1ee24, 0x1ee24,
+ 0x1ee27, 0x1ee27,
+ 0x1ee29, 0x1ee32,
+ 0x1ee34, 0x1ee37,
+ 0x1ee39, 0x1ee39,
+ 0x1ee3b, 0x1ee3b,
+ 0x1ee42, 0x1ee42,
+ 0x1ee47, 0x1ee47,
+ 0x1ee49, 0x1ee49,
+ 0x1ee4b, 0x1ee4b,
+ 0x1ee4d, 0x1ee4f,
+ 0x1ee51, 0x1ee52,
+ 0x1ee54, 0x1ee54,
+ 0x1ee57, 0x1ee57,
+ 0x1ee59, 0x1ee59,
+ 0x1ee5b, 0x1ee5b,
+ 0x1ee5d, 0x1ee5d,
+ 0x1ee5f, 0x1ee5f,
+ 0x1ee61, 0x1ee62,
+ 0x1ee64, 0x1ee64,
+ 0x1ee67, 0x1ee6a,
+ 0x1ee6c, 0x1ee72,
+ 0x1ee74, 0x1ee77,
+ 0x1ee79, 0x1ee7c,
+ 0x1ee7e, 0x1ee7e,
+ 0x1ee80, 0x1ee89,
+ 0x1ee8b, 0x1ee9b,
+ 0x1eea1, 0x1eea3,
+ 0x1eea5, 0x1eea9,
+ 0x1eeab, 0x1eebb,
+ 0x1eef0, 0x1eef1,
+ 0x1f000, 0x1f02b,
+ 0x1f030, 0x1f093,
+ 0x1f0a0, 0x1f0ae,
+ 0x1f0b1, 0x1f0bf,
+ 0x1f0c1, 0x1f0cf,
+ 0x1f0d1, 0x1f0f5,
+ 0x1f100, 0x1f1ad,
+ 0x1f1e6, 0x1f202,
+ 0x1f210, 0x1f23b,
+ 0x1f240, 0x1f248,
+ 0x1f250, 0x1f251,
+ 0x1f260, 0x1f265,
+ 0x1f300, 0x1f6d7,
+ 0x1f6dc, 0x1f6ec,
+ 0x1f6f0, 0x1f6fc,
+ 0x1f700, 0x1f776,
+ 0x1f77b, 0x1f7d9,
+ 0x1f7e0, 0x1f7eb,
+ 0x1f7f0, 0x1f7f0,
+ 0x1f800, 0x1f80b,
+ 0x1f810, 0x1f847,
+ 0x1f850, 0x1f859,
+ 0x1f860, 0x1f887,
+ 0x1f890, 0x1f8ad,
+ 0x1f8b0, 0x1f8b1,
+ 0x1f900, 0x1fa53,
+ 0x1fa60, 0x1fa6d,
+ 0x1fa70, 0x1fa7c,
+ 0x1fa80, 0x1fa88,
+ 0x1fa90, 0x1fabd,
+ 0x1fabf, 0x1fac5,
+ 0x1face, 0x1fadb,
+ 0x1fae0, 0x1fae8,
+ 0x1faf0, 0x1faf8,
+ 0x1fb00, 0x1fb92,
+ 0x1fb94, 0x1fbca,
+ 0x1fbf0, 0x1fbf9,
+ 0x1fffe, 0x2a6df,
+ 0x2a700, 0x2b739,
+ 0x2b740, 0x2b81d,
+ 0x2b820, 0x2cea1,
+ 0x2ceb0, 0x2ebe0,
+ 0x2f800, 0x2fa1d,
+ 0x2fffe, 0x3134a,
+ 0x31350, 0x323af,
+ 0x3fffe, 0x3ffff,
+ 0x4fffe, 0x4ffff,
+ 0x5fffe, 0x5ffff,
+ 0x6fffe, 0x6ffff,
+ 0x7fffe, 0x7ffff,
+ 0x8fffe, 0x8ffff,
+ 0x9fffe, 0x9ffff,
+ 0xafffe, 0xaffff,
+ 0xbfffe, 0xbffff,
+ 0xcfffe, 0xcffff,
+ 0xdfffe, 0xdffff,
+ 0xe0001, 0xe0001,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+ 0xefffe, 0x10ffff,
+}; /* CR_Age_15_0 */
+
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+/* 'Grapheme_Cluster_Break_Prepend': Grapheme_Cluster_Break=Prepend */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_Prepend[] = {
+ 15,
+ 0x0600, 0x0605,
+ 0x06dd, 0x06dd,
+ 0x070f, 0x070f,
+ 0x0890, 0x0891,
+ 0x08e2, 0x08e2,
+ 0x0d4e, 0x0d4e,
+ 0x110bd, 0x110bd,
+ 0x110cd, 0x110cd,
+ 0x111c2, 0x111c3,
+ 0x1193f, 0x1193f,
+ 0x11941, 0x11941,
+ 0x11a3a, 0x11a3a,
+ 0x11a84, 0x11a89,
+ 0x11d46, 0x11d46,
+ 0x11f02, 0x11f02,
+}; /* CR_Grapheme_Cluster_Break_Prepend */
+
+/* 'Grapheme_Cluster_Break_CR': Grapheme_Cluster_Break=CR */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_CR[] = {
+ 1,
+ 0x000d, 0x000d,
+}; /* CR_Grapheme_Cluster_Break_CR */
+
+/* 'Grapheme_Cluster_Break_LF': Grapheme_Cluster_Break=LF */
+#define CR_Grapheme_Cluster_Break_LF CR_NEWLINE
+
+/* 'Grapheme_Cluster_Break_Control': Grapheme_Cluster_Break=Control */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_Control[] = {
+ 19,
+ 0x0000, 0x0009,
+ 0x000b, 0x000c,
+ 0x000e, 0x001f,
+ 0x007f, 0x009f,
+ 0x00ad, 0x00ad,
+ 0x061c, 0x061c,
+ 0x180e, 0x180e,
+ 0x200b, 0x200b,
+ 0x200e, 0x200f,
+ 0x2028, 0x202e,
+ 0x2060, 0x206f,
+ 0xfeff, 0xfeff,
+ 0xfff0, 0xfffb,
+ 0x13430, 0x1343f,
+ 0x1bca0, 0x1bca3,
+ 0x1d173, 0x1d17a,
+ 0xe0000, 0xe001f,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0xe0fff,
+}; /* CR_Grapheme_Cluster_Break_Control */
+
+/* 'Grapheme_Cluster_Break_Extend': Grapheme_Cluster_Break=Extend */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = {
+ 364,
+ 0x0300, 0x036f,
+ 0x0483, 0x0489,
+ 0x0591, 0x05bd,
+ 0x05bf, 0x05bf,
+ 0x05c1, 0x05c2,
+ 0x05c4, 0x05c5,
+ 0x05c7, 0x05c7,
+ 0x0610, 0x061a,
+ 0x064b, 0x065f,
+ 0x0670, 0x0670,
+ 0x06d6, 0x06dc,
+ 0x06df, 0x06e4,
+ 0x06e7, 0x06e8,
+ 0x06ea, 0x06ed,
+ 0x0711, 0x0711,
+ 0x0730, 0x074a,
+ 0x07a6, 0x07b0,
+ 0x07eb, 0x07f3,
+ 0x07fd, 0x07fd,
+ 0x0816, 0x0819,
+ 0x081b, 0x0823,
+ 0x0825, 0x0827,
+ 0x0829, 0x082d,
+ 0x0859, 0x085b,
+ 0x0898, 0x089f,
+ 0x08ca, 0x08e1,
+ 0x08e3, 0x0902,
+ 0x093a, 0x093a,
+ 0x093c, 0x093c,
+ 0x0941, 0x0948,
+ 0x094d, 0x094d,
+ 0x0951, 0x0957,
+ 0x0962, 0x0963,
+ 0x0981, 0x0981,
+ 0x09bc, 0x09bc,
+ 0x09be, 0x09be,
+ 0x09c1, 0x09c4,
+ 0x09cd, 0x09cd,
+ 0x09d7, 0x09d7,
+ 0x09e2, 0x09e3,
+ 0x09fe, 0x09fe,
+ 0x0a01, 0x0a02,
+ 0x0a3c, 0x0a3c,
+ 0x0a41, 0x0a42,
+ 0x0a47, 0x0a48,
+ 0x0a4b, 0x0a4d,
+ 0x0a51, 0x0a51,
+ 0x0a70, 0x0a71,
+ 0x0a75, 0x0a75,
+ 0x0a81, 0x0a82,
+ 0x0abc, 0x0abc,
+ 0x0ac1, 0x0ac5,
+ 0x0ac7, 0x0ac8,
+ 0x0acd, 0x0acd,
+ 0x0ae2, 0x0ae3,
+ 0x0afa, 0x0aff,
+ 0x0b01, 0x0b01,
+ 0x0b3c, 0x0b3c,
+ 0x0b3e, 0x0b3f,
+ 0x0b41, 0x0b44,
+ 0x0b4d, 0x0b4d,
+ 0x0b55, 0x0b57,
+ 0x0b62, 0x0b63,
+ 0x0b82, 0x0b82,
+ 0x0bbe, 0x0bbe,
+ 0x0bc0, 0x0bc0,
+ 0x0bcd, 0x0bcd,
+ 0x0bd7, 0x0bd7,
+ 0x0c00, 0x0c00,
+ 0x0c04, 0x0c04,
+ 0x0c3c, 0x0c3c,
+ 0x0c3e, 0x0c40,
+ 0x0c46, 0x0c48,
+ 0x0c4a, 0x0c4d,
+ 0x0c55, 0x0c56,
+ 0x0c62, 0x0c63,
+ 0x0c81, 0x0c81,
+ 0x0cbc, 0x0cbc,
+ 0x0cbf, 0x0cbf,
+ 0x0cc2, 0x0cc2,
+ 0x0cc6, 0x0cc6,
+ 0x0ccc, 0x0ccd,
+ 0x0cd5, 0x0cd6,
+ 0x0ce2, 0x0ce3,
+ 0x0d00, 0x0d01,
+ 0x0d3b, 0x0d3c,
+ 0x0d3e, 0x0d3e,
+ 0x0d41, 0x0d44,
+ 0x0d4d, 0x0d4d,
+ 0x0d57, 0x0d57,
+ 0x0d62, 0x0d63,
+ 0x0d81, 0x0d81,
+ 0x0dca, 0x0dca,
+ 0x0dcf, 0x0dcf,
+ 0x0dd2, 0x0dd4,
+ 0x0dd6, 0x0dd6,
+ 0x0ddf, 0x0ddf,
+ 0x0e31, 0x0e31,
+ 0x0e34, 0x0e3a,
+ 0x0e47, 0x0e4e,
+ 0x0eb1, 0x0eb1,
+ 0x0eb4, 0x0ebc,
+ 0x0ec8, 0x0ece,
+ 0x0f18, 0x0f19,
+ 0x0f35, 0x0f35,
+ 0x0f37, 0x0f37,
+ 0x0f39, 0x0f39,
+ 0x0f71, 0x0f7e,
+ 0x0f80, 0x0f84,
+ 0x0f86, 0x0f87,
+ 0x0f8d, 0x0f97,
+ 0x0f99, 0x0fbc,
+ 0x0fc6, 0x0fc6,
+ 0x102d, 0x1030,
+ 0x1032, 0x1037,
+ 0x1039, 0x103a,
+ 0x103d, 0x103e,
+ 0x1058, 0x1059,
+ 0x105e, 0x1060,
+ 0x1071, 0x1074,
+ 0x1082, 0x1082,
+ 0x1085, 0x1086,
+ 0x108d, 0x108d,
+ 0x109d, 0x109d,
+ 0x135d, 0x135f,
+ 0x1712, 0x1714,
+ 0x1732, 0x1733,
+ 0x1752, 0x1753,
+ 0x1772, 0x1773,
+ 0x17b4, 0x17b5,
+ 0x17b7, 0x17bd,
+ 0x17c6, 0x17c6,
+ 0x17c9, 0x17d3,
+ 0x17dd, 0x17dd,
+ 0x180b, 0x180d,
+ 0x180f, 0x180f,
+ 0x1885, 0x1886,
+ 0x18a9, 0x18a9,
+ 0x1920, 0x1922,
+ 0x1927, 0x1928,
+ 0x1932, 0x1932,
+ 0x1939, 0x193b,
+ 0x1a17, 0x1a18,
+ 0x1a1b, 0x1a1b,
+ 0x1a56, 0x1a56,
+ 0x1a58, 0x1a5e,
+ 0x1a60, 0x1a60,
+ 0x1a62, 0x1a62,
+ 0x1a65, 0x1a6c,
+ 0x1a73, 0x1a7c,
+ 0x1a7f, 0x1a7f,
+ 0x1ab0, 0x1ace,
+ 0x1b00, 0x1b03,
+ 0x1b34, 0x1b3a,
+ 0x1b3c, 0x1b3c,
+ 0x1b42, 0x1b42,
+ 0x1b6b, 0x1b73,
+ 0x1b80, 0x1b81,
+ 0x1ba2, 0x1ba5,
+ 0x1ba8, 0x1ba9,
+ 0x1bab, 0x1bad,
+ 0x1be6, 0x1be6,
+ 0x1be8, 0x1be9,
+ 0x1bed, 0x1bed,
+ 0x1bef, 0x1bf1,
+ 0x1c2c, 0x1c33,
+ 0x1c36, 0x1c37,
+ 0x1cd0, 0x1cd2,
+ 0x1cd4, 0x1ce0,
+ 0x1ce2, 0x1ce8,
+ 0x1ced, 0x1ced,
+ 0x1cf4, 0x1cf4,
+ 0x1cf8, 0x1cf9,
+ 0x1dc0, 0x1dff,
+ 0x200c, 0x200c,
+ 0x20d0, 0x20f0,
+ 0x2cef, 0x2cf1,
+ 0x2d7f, 0x2d7f,
+ 0x2de0, 0x2dff,
+ 0x302a, 0x302f,
+ 0x3099, 0x309a,
+ 0xa66f, 0xa672,
+ 0xa674, 0xa67d,
+ 0xa69e, 0xa69f,
+ 0xa6f0, 0xa6f1,
+ 0xa802, 0xa802,
+ 0xa806, 0xa806,
+ 0xa80b, 0xa80b,
+ 0xa825, 0xa826,
+ 0xa82c, 0xa82c,
+ 0xa8c4, 0xa8c5,
+ 0xa8e0, 0xa8f1,
+ 0xa8ff, 0xa8ff,
+ 0xa926, 0xa92d,
+ 0xa947, 0xa951,
+ 0xa980, 0xa982,
+ 0xa9b3, 0xa9b3,
+ 0xa9b6, 0xa9b9,
+ 0xa9bc, 0xa9bd,
+ 0xa9e5, 0xa9e5,
+ 0xaa29, 0xaa2e,
+ 0xaa31, 0xaa32,
+ 0xaa35, 0xaa36,
+ 0xaa43, 0xaa43,
+ 0xaa4c, 0xaa4c,
+ 0xaa7c, 0xaa7c,
+ 0xaab0, 0xaab0,
+ 0xaab2, 0xaab4,
+ 0xaab7, 0xaab8,
+ 0xaabe, 0xaabf,
+ 0xaac1, 0xaac1,
+ 0xaaec, 0xaaed,
+ 0xaaf6, 0xaaf6,
+ 0xabe5, 0xabe5,
+ 0xabe8, 0xabe8,
+ 0xabed, 0xabed,
+ 0xfb1e, 0xfb1e,
+ 0xfe00, 0xfe0f,
+ 0xfe20, 0xfe2f,
+ 0xff9e, 0xff9f,
+ 0x101fd, 0x101fd,
+ 0x102e0, 0x102e0,
+ 0x10376, 0x1037a,
+ 0x10a01, 0x10a03,
+ 0x10a05, 0x10a06,
+ 0x10a0c, 0x10a0f,
+ 0x10a38, 0x10a3a,
+ 0x10a3f, 0x10a3f,
+ 0x10ae5, 0x10ae6,
+ 0x10d24, 0x10d27,
+ 0x10eab, 0x10eac,
+ 0x10efd, 0x10eff,
+ 0x10f46, 0x10f50,
+ 0x10f82, 0x10f85,
+ 0x11001, 0x11001,
+ 0x11038, 0x11046,
+ 0x11070, 0x11070,
+ 0x11073, 0x11074,
+ 0x1107f, 0x11081,
+ 0x110b3, 0x110b6,
+ 0x110b9, 0x110ba,
+ 0x110c2, 0x110c2,
+ 0x11100, 0x11102,
+ 0x11127, 0x1112b,
+ 0x1112d, 0x11134,
+ 0x11173, 0x11173,
+ 0x11180, 0x11181,
+ 0x111b6, 0x111be,
+ 0x111c9, 0x111cc,
+ 0x111cf, 0x111cf,
+ 0x1122f, 0x11231,
+ 0x11234, 0x11234,
+ 0x11236, 0x11237,
+ 0x1123e, 0x1123e,
+ 0x11241, 0x11241,
+ 0x112df, 0x112df,
+ 0x112e3, 0x112ea,
+ 0x11300, 0x11301,
+ 0x1133b, 0x1133c,
+ 0x1133e, 0x1133e,
+ 0x11340, 0x11340,
+ 0x11357, 0x11357,
+ 0x11366, 0x1136c,
+ 0x11370, 0x11374,
+ 0x11438, 0x1143f,
+ 0x11442, 0x11444,
+ 0x11446, 0x11446,
+ 0x1145e, 0x1145e,
+ 0x114b0, 0x114b0,
+ 0x114b3, 0x114b8,
+ 0x114ba, 0x114ba,
+ 0x114bd, 0x114bd,
+ 0x114bf, 0x114c0,
+ 0x114c2, 0x114c3,
+ 0x115af, 0x115af,
+ 0x115b2, 0x115b5,
+ 0x115bc, 0x115bd,
+ 0x115bf, 0x115c0,
+ 0x115dc, 0x115dd,
+ 0x11633, 0x1163a,
+ 0x1163d, 0x1163d,
+ 0x1163f, 0x11640,
+ 0x116ab, 0x116ab,
+ 0x116ad, 0x116ad,
+ 0x116b0, 0x116b5,
+ 0x116b7, 0x116b7,
+ 0x1171d, 0x1171f,
+ 0x11722, 0x11725,
+ 0x11727, 0x1172b,
+ 0x1182f, 0x11837,
+ 0x11839, 0x1183a,
+ 0x11930, 0x11930,
+ 0x1193b, 0x1193c,
+ 0x1193e, 0x1193e,
+ 0x11943, 0x11943,
+ 0x119d4, 0x119d7,
+ 0x119da, 0x119db,
+ 0x119e0, 0x119e0,
+ 0x11a01, 0x11a0a,
+ 0x11a33, 0x11a38,
+ 0x11a3b, 0x11a3e,
+ 0x11a47, 0x11a47,
+ 0x11a51, 0x11a56,
+ 0x11a59, 0x11a5b,
+ 0x11a8a, 0x11a96,
+ 0x11a98, 0x11a99,
+ 0x11c30, 0x11c36,
+ 0x11c38, 0x11c3d,
+ 0x11c3f, 0x11c3f,
+ 0x11c92, 0x11ca7,
+ 0x11caa, 0x11cb0,
+ 0x11cb2, 0x11cb3,
+ 0x11cb5, 0x11cb6,
+ 0x11d31, 0x11d36,
+ 0x11d3a, 0x11d3a,
+ 0x11d3c, 0x11d3d,
+ 0x11d3f, 0x11d45,
+ 0x11d47, 0x11d47,
+ 0x11d90, 0x11d91,
+ 0x11d95, 0x11d95,
+ 0x11d97, 0x11d97,
+ 0x11ef3, 0x11ef4,
+ 0x11f00, 0x11f01,
+ 0x11f36, 0x11f3a,
+ 0x11f40, 0x11f40,
+ 0x11f42, 0x11f42,
+ 0x13440, 0x13440,
+ 0x13447, 0x13455,
+ 0x16af0, 0x16af4,
+ 0x16b30, 0x16b36,
+ 0x16f4f, 0x16f4f,
+ 0x16f8f, 0x16f92,
+ 0x16fe4, 0x16fe4,
+ 0x1bc9d, 0x1bc9e,
+ 0x1cf00, 0x1cf2d,
+ 0x1cf30, 0x1cf46,
+ 0x1d165, 0x1d165,
+ 0x1d167, 0x1d169,
+ 0x1d16e, 0x1d172,
+ 0x1d17b, 0x1d182,
+ 0x1d185, 0x1d18b,
+ 0x1d1aa, 0x1d1ad,
+ 0x1d242, 0x1d244,
+ 0x1da00, 0x1da36,
+ 0x1da3b, 0x1da6c,
+ 0x1da75, 0x1da75,
+ 0x1da84, 0x1da84,
+ 0x1da9b, 0x1da9f,
+ 0x1daa1, 0x1daaf,
+ 0x1e000, 0x1e006,
+ 0x1e008, 0x1e018,
+ 0x1e01b, 0x1e021,
+ 0x1e023, 0x1e024,
+ 0x1e026, 0x1e02a,
+ 0x1e08f, 0x1e08f,
+ 0x1e130, 0x1e136,
+ 0x1e2ae, 0x1e2ae,
+ 0x1e2ec, 0x1e2ef,
+ 0x1e4ec, 0x1e4ef,
+ 0x1e8d0, 0x1e8d6,
+ 0x1e944, 0x1e94a,
+ 0x1f3fb, 0x1f3ff,
+ 0xe0020, 0xe007f,
+ 0xe0100, 0xe01ef,
+}; /* CR_Grapheme_Cluster_Break_Extend */
+
+/* 'Grapheme_Cluster_Break_Regional_Indicator': Grapheme_Cluster_Break=Regional_Indicator */
+#define CR_Grapheme_Cluster_Break_Regional_Indicator CR_Regional_Indicator
+
+/* 'Grapheme_Cluster_Break_SpacingMark': Grapheme_Cluster_Break=SpacingMark */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = {
+ 165,
+ 0x0903, 0x0903,
+ 0x093b, 0x093b,
+ 0x093e, 0x0940,
+ 0x0949, 0x094c,
+ 0x094e, 0x094f,
+ 0x0982, 0x0983,
+ 0x09bf, 0x09c0,
+ 0x09c7, 0x09c8,
+ 0x09cb, 0x09cc,
+ 0x0a03, 0x0a03,
+ 0x0a3e, 0x0a40,
+ 0x0a83, 0x0a83,
+ 0x0abe, 0x0ac0,
+ 0x0ac9, 0x0ac9,
+ 0x0acb, 0x0acc,
+ 0x0b02, 0x0b03,
+ 0x0b40, 0x0b40,
+ 0x0b47, 0x0b48,
+ 0x0b4b, 0x0b4c,
+ 0x0bbf, 0x0bbf,
+ 0x0bc1, 0x0bc2,
+ 0x0bc6, 0x0bc8,
+ 0x0bca, 0x0bcc,
+ 0x0c01, 0x0c03,
+ 0x0c41, 0x0c44,
+ 0x0c82, 0x0c83,
+ 0x0cbe, 0x0cbe,
+ 0x0cc0, 0x0cc1,
+ 0x0cc3, 0x0cc4,
+ 0x0cc7, 0x0cc8,
+ 0x0cca, 0x0ccb,
+ 0x0cf3, 0x0cf3,
+ 0x0d02, 0x0d03,
+ 0x0d3f, 0x0d40,
+ 0x0d46, 0x0d48,
+ 0x0d4a, 0x0d4c,
+ 0x0d82, 0x0d83,
+ 0x0dd0, 0x0dd1,
+ 0x0dd8, 0x0dde,
+ 0x0df2, 0x0df3,
+ 0x0e33, 0x0e33,
+ 0x0eb3, 0x0eb3,
+ 0x0f3e, 0x0f3f,
+ 0x0f7f, 0x0f7f,
+ 0x1031, 0x1031,
+ 0x103b, 0x103c,
+ 0x1056, 0x1057,
+ 0x1084, 0x1084,
+ 0x1715, 0x1715,
+ 0x1734, 0x1734,
+ 0x17b6, 0x17b6,
+ 0x17be, 0x17c5,
+ 0x17c7, 0x17c8,
+ 0x1923, 0x1926,
+ 0x1929, 0x192b,
+ 0x1930, 0x1931,
+ 0x1933, 0x1938,
+ 0x1a19, 0x1a1a,
+ 0x1a55, 0x1a55,
+ 0x1a57, 0x1a57,
+ 0x1a6d, 0x1a72,
+ 0x1b04, 0x1b04,
+ 0x1b3b, 0x1b3b,
+ 0x1b3d, 0x1b41,
+ 0x1b43, 0x1b44,
+ 0x1b82, 0x1b82,
+ 0x1ba1, 0x1ba1,
+ 0x1ba6, 0x1ba7,
+ 0x1baa, 0x1baa,
+ 0x1be7, 0x1be7,
+ 0x1bea, 0x1bec,
+ 0x1bee, 0x1bee,
+ 0x1bf2, 0x1bf3,
+ 0x1c24, 0x1c2b,
+ 0x1c34, 0x1c35,
+ 0x1ce1, 0x1ce1,
+ 0x1cf7, 0x1cf7,
+ 0xa823, 0xa824,
+ 0xa827, 0xa827,
+ 0xa880, 0xa881,
+ 0xa8b4, 0xa8c3,
+ 0xa952, 0xa953,
+ 0xa983, 0xa983,
+ 0xa9b4, 0xa9b5,
+ 0xa9ba, 0xa9bb,
+ 0xa9be, 0xa9c0,
+ 0xaa2f, 0xaa30,
+ 0xaa33, 0xaa34,
+ 0xaa4d, 0xaa4d,
+ 0xaaeb, 0xaaeb,
+ 0xaaee, 0xaaef,
+ 0xaaf5, 0xaaf5,
+ 0xabe3, 0xabe4,
+ 0xabe6, 0xabe7,
+ 0xabe9, 0xabea,
+ 0xabec, 0xabec,
+ 0x11000, 0x11000,
+ 0x11002, 0x11002,
+ 0x11082, 0x11082,
+ 0x110b0, 0x110b2,
+ 0x110b7, 0x110b8,
+ 0x1112c, 0x1112c,
+ 0x11145, 0x11146,
+ 0x11182, 0x11182,
+ 0x111b3, 0x111b5,
+ 0x111bf, 0x111c0,
+ 0x111ce, 0x111ce,
+ 0x1122c, 0x1122e,
+ 0x11232, 0x11233,
+ 0x11235, 0x11235,
+ 0x112e0, 0x112e2,
+ 0x11302, 0x11303,
+ 0x1133f, 0x1133f,
+ 0x11341, 0x11344,
+ 0x11347, 0x11348,
+ 0x1134b, 0x1134d,
+ 0x11362, 0x11363,
+ 0x11435, 0x11437,
+ 0x11440, 0x11441,
+ 0x11445, 0x11445,
+ 0x114b1, 0x114b2,
+ 0x114b9, 0x114b9,
+ 0x114bb, 0x114bc,
+ 0x114be, 0x114be,
+ 0x114c1, 0x114c1,
+ 0x115b0, 0x115b1,
+ 0x115b8, 0x115bb,
+ 0x115be, 0x115be,
+ 0x11630, 0x11632,
+ 0x1163b, 0x1163c,
+ 0x1163e, 0x1163e,
+ 0x116ac, 0x116ac,
+ 0x116ae, 0x116af,
+ 0x116b6, 0x116b6,
+ 0x11726, 0x11726,
+ 0x1182c, 0x1182e,
+ 0x11838, 0x11838,
+ 0x11931, 0x11935,
+ 0x11937, 0x11938,
+ 0x1193d, 0x1193d,
+ 0x11940, 0x11940,
+ 0x11942, 0x11942,
+ 0x119d1, 0x119d3,
+ 0x119dc, 0x119df,
+ 0x119e4, 0x119e4,
+ 0x11a39, 0x11a39,
+ 0x11a57, 0x11a58,
+ 0x11a97, 0x11a97,
+ 0x11c2f, 0x11c2f,
+ 0x11c3e, 0x11c3e,
+ 0x11ca9, 0x11ca9,
+ 0x11cb1, 0x11cb1,
+ 0x11cb4, 0x11cb4,
+ 0x11d8a, 0x11d8e,
+ 0x11d93, 0x11d94,
+ 0x11d96, 0x11d96,
+ 0x11ef5, 0x11ef6,
+ 0x11f03, 0x11f03,
+ 0x11f34, 0x11f35,
+ 0x11f3e, 0x11f3f,
+ 0x11f41, 0x11f41,
+ 0x16f51, 0x16f87,
+ 0x16ff0, 0x16ff1,
+ 0x1d166, 0x1d166,
+ 0x1d16d, 0x1d16d,
+}; /* CR_Grapheme_Cluster_Break_SpacingMark */
+
+/* 'Grapheme_Cluster_Break_L': Grapheme_Cluster_Break=L */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_L[] = {
+ 2,
+ 0x1100, 0x115f,
+ 0xa960, 0xa97c,
+}; /* CR_Grapheme_Cluster_Break_L */
+
+/* 'Grapheme_Cluster_Break_V': Grapheme_Cluster_Break=V */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_V[] = {
+ 2,
+ 0x1160, 0x11a7,
+ 0xd7b0, 0xd7c6,
+}; /* CR_Grapheme_Cluster_Break_V */
+
+/* 'Grapheme_Cluster_Break_T': Grapheme_Cluster_Break=T */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_T[] = {
+ 2,
+ 0x11a8, 0x11ff,
+ 0xd7cb, 0xd7fb,
+}; /* CR_Grapheme_Cluster_Break_T */
+
+/* 'Grapheme_Cluster_Break_LV': Grapheme_Cluster_Break=LV */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_LV[] = {
+ 399,
+ 0xac00, 0xac00,
+ 0xac1c, 0xac1c,
+ 0xac38, 0xac38,
+ 0xac54, 0xac54,
+ 0xac70, 0xac70,
+ 0xac8c, 0xac8c,
+ 0xaca8, 0xaca8,
+ 0xacc4, 0xacc4,
+ 0xace0, 0xace0,
+ 0xacfc, 0xacfc,
+ 0xad18, 0xad18,
+ 0xad34, 0xad34,
+ 0xad50, 0xad50,
+ 0xad6c, 0xad6c,
+ 0xad88, 0xad88,
+ 0xada4, 0xada4,
+ 0xadc0, 0xadc0,
+ 0xaddc, 0xaddc,
+ 0xadf8, 0xadf8,
+ 0xae14, 0xae14,
+ 0xae30, 0xae30,
+ 0xae4c, 0xae4c,
+ 0xae68, 0xae68,
+ 0xae84, 0xae84,
+ 0xaea0, 0xaea0,
+ 0xaebc, 0xaebc,
+ 0xaed8, 0xaed8,
+ 0xaef4, 0xaef4,
+ 0xaf10, 0xaf10,
+ 0xaf2c, 0xaf2c,
+ 0xaf48, 0xaf48,
+ 0xaf64, 0xaf64,
+ 0xaf80, 0xaf80,
+ 0xaf9c, 0xaf9c,
+ 0xafb8, 0xafb8,
+ 0xafd4, 0xafd4,
+ 0xaff0, 0xaff0,
+ 0xb00c, 0xb00c,
+ 0xb028, 0xb028,
+ 0xb044, 0xb044,
+ 0xb060, 0xb060,
+ 0xb07c, 0xb07c,
+ 0xb098, 0xb098,
+ 0xb0b4, 0xb0b4,
+ 0xb0d0, 0xb0d0,
+ 0xb0ec, 0xb0ec,
+ 0xb108, 0xb108,
+ 0xb124, 0xb124,
+ 0xb140, 0xb140,
+ 0xb15c, 0xb15c,
+ 0xb178, 0xb178,
+ 0xb194, 0xb194,
+ 0xb1b0, 0xb1b0,
+ 0xb1cc, 0xb1cc,
+ 0xb1e8, 0xb1e8,
+ 0xb204, 0xb204,
+ 0xb220, 0xb220,
+ 0xb23c, 0xb23c,
+ 0xb258, 0xb258,
+ 0xb274, 0xb274,
+ 0xb290, 0xb290,
+ 0xb2ac, 0xb2ac,
+ 0xb2c8, 0xb2c8,
+ 0xb2e4, 0xb2e4,
+ 0xb300, 0xb300,
+ 0xb31c, 0xb31c,
+ 0xb338, 0xb338,
+ 0xb354, 0xb354,
+ 0xb370, 0xb370,
+ 0xb38c, 0xb38c,
+ 0xb3a8, 0xb3a8,
+ 0xb3c4, 0xb3c4,
+ 0xb3e0, 0xb3e0,
+ 0xb3fc, 0xb3fc,
+ 0xb418, 0xb418,
+ 0xb434, 0xb434,
+ 0xb450, 0xb450,
+ 0xb46c, 0xb46c,
+ 0xb488, 0xb488,
+ 0xb4a4, 0xb4a4,
+ 0xb4c0, 0xb4c0,
+ 0xb4dc, 0xb4dc,
+ 0xb4f8, 0xb4f8,
+ 0xb514, 0xb514,
+ 0xb530, 0xb530,
+ 0xb54c, 0xb54c,
+ 0xb568, 0xb568,
+ 0xb584, 0xb584,
+ 0xb5a0, 0xb5a0,
+ 0xb5bc, 0xb5bc,
+ 0xb5d8, 0xb5d8,
+ 0xb5f4, 0xb5f4,
+ 0xb610, 0xb610,
+ 0xb62c, 0xb62c,
+ 0xb648, 0xb648,
+ 0xb664, 0xb664,
+ 0xb680, 0xb680,
+ 0xb69c, 0xb69c,
+ 0xb6b8, 0xb6b8,
+ 0xb6d4, 0xb6d4,
+ 0xb6f0, 0xb6f0,
+ 0xb70c, 0xb70c,
+ 0xb728, 0xb728,
+ 0xb744, 0xb744,
+ 0xb760, 0xb760,
+ 0xb77c, 0xb77c,
+ 0xb798, 0xb798,
+ 0xb7b4, 0xb7b4,
+ 0xb7d0, 0xb7d0,
+ 0xb7ec, 0xb7ec,
+ 0xb808, 0xb808,
+ 0xb824, 0xb824,
+ 0xb840, 0xb840,
+ 0xb85c, 0xb85c,
+ 0xb878, 0xb878,
+ 0xb894, 0xb894,
+ 0xb8b0, 0xb8b0,
+ 0xb8cc, 0xb8cc,
+ 0xb8e8, 0xb8e8,
+ 0xb904, 0xb904,
+ 0xb920, 0xb920,
+ 0xb93c, 0xb93c,
+ 0xb958, 0xb958,
+ 0xb974, 0xb974,
+ 0xb990, 0xb990,
+ 0xb9ac, 0xb9ac,
+ 0xb9c8, 0xb9c8,
+ 0xb9e4, 0xb9e4,
+ 0xba00, 0xba00,
+ 0xba1c, 0xba1c,
+ 0xba38, 0xba38,
+ 0xba54, 0xba54,
+ 0xba70, 0xba70,
+ 0xba8c, 0xba8c,
+ 0xbaa8, 0xbaa8,
+ 0xbac4, 0xbac4,
+ 0xbae0, 0xbae0,
+ 0xbafc, 0xbafc,
+ 0xbb18, 0xbb18,
+ 0xbb34, 0xbb34,
+ 0xbb50, 0xbb50,
+ 0xbb6c, 0xbb6c,
+ 0xbb88, 0xbb88,
+ 0xbba4, 0xbba4,
+ 0xbbc0, 0xbbc0,
+ 0xbbdc, 0xbbdc,
+ 0xbbf8, 0xbbf8,
+ 0xbc14, 0xbc14,
+ 0xbc30, 0xbc30,
+ 0xbc4c, 0xbc4c,
+ 0xbc68, 0xbc68,
+ 0xbc84, 0xbc84,
+ 0xbca0, 0xbca0,
+ 0xbcbc, 0xbcbc,
+ 0xbcd8, 0xbcd8,
+ 0xbcf4, 0xbcf4,
+ 0xbd10, 0xbd10,
+ 0xbd2c, 0xbd2c,
+ 0xbd48, 0xbd48,
+ 0xbd64, 0xbd64,
+ 0xbd80, 0xbd80,
+ 0xbd9c, 0xbd9c,
+ 0xbdb8, 0xbdb8,
+ 0xbdd4, 0xbdd4,
+ 0xbdf0, 0xbdf0,
+ 0xbe0c, 0xbe0c,
+ 0xbe28, 0xbe28,
+ 0xbe44, 0xbe44,
+ 0xbe60, 0xbe60,
+ 0xbe7c, 0xbe7c,
+ 0xbe98, 0xbe98,
+ 0xbeb4, 0xbeb4,
+ 0xbed0, 0xbed0,
+ 0xbeec, 0xbeec,
+ 0xbf08, 0xbf08,
+ 0xbf24, 0xbf24,
+ 0xbf40, 0xbf40,
+ 0xbf5c, 0xbf5c,
+ 0xbf78, 0xbf78,
+ 0xbf94, 0xbf94,
+ 0xbfb0, 0xbfb0,
+ 0xbfcc, 0xbfcc,
+ 0xbfe8, 0xbfe8,
+ 0xc004, 0xc004,
+ 0xc020, 0xc020,
+ 0xc03c, 0xc03c,
+ 0xc058, 0xc058,
+ 0xc074, 0xc074,
+ 0xc090, 0xc090,
+ 0xc0ac, 0xc0ac,
+ 0xc0c8, 0xc0c8,
+ 0xc0e4, 0xc0e4,
+ 0xc100, 0xc100,
+ 0xc11c, 0xc11c,
+ 0xc138, 0xc138,
+ 0xc154, 0xc154,
+ 0xc170, 0xc170,
+ 0xc18c, 0xc18c,
+ 0xc1a8, 0xc1a8,
+ 0xc1c4, 0xc1c4,
+ 0xc1e0, 0xc1e0,
+ 0xc1fc, 0xc1fc,
+ 0xc218, 0xc218,
+ 0xc234, 0xc234,
+ 0xc250, 0xc250,
+ 0xc26c, 0xc26c,
+ 0xc288, 0xc288,
+ 0xc2a4, 0xc2a4,
+ 0xc2c0, 0xc2c0,
+ 0xc2dc, 0xc2dc,
+ 0xc2f8, 0xc2f8,
+ 0xc314, 0xc314,
+ 0xc330, 0xc330,
+ 0xc34c, 0xc34c,
+ 0xc368, 0xc368,
+ 0xc384, 0xc384,
+ 0xc3a0, 0xc3a0,
+ 0xc3bc, 0xc3bc,
+ 0xc3d8, 0xc3d8,
+ 0xc3f4, 0xc3f4,
+ 0xc410, 0xc410,
+ 0xc42c, 0xc42c,
+ 0xc448, 0xc448,
+ 0xc464, 0xc464,
+ 0xc480, 0xc480,
+ 0xc49c, 0xc49c,
+ 0xc4b8, 0xc4b8,
+ 0xc4d4, 0xc4d4,
+ 0xc4f0, 0xc4f0,
+ 0xc50c, 0xc50c,
+ 0xc528, 0xc528,
+ 0xc544, 0xc544,
+ 0xc560, 0xc560,
+ 0xc57c, 0xc57c,
+ 0xc598, 0xc598,
+ 0xc5b4, 0xc5b4,
+ 0xc5d0, 0xc5d0,
+ 0xc5ec, 0xc5ec,
+ 0xc608, 0xc608,
+ 0xc624, 0xc624,
+ 0xc640, 0xc640,
+ 0xc65c, 0xc65c,
+ 0xc678, 0xc678,
+ 0xc694, 0xc694,
+ 0xc6b0, 0xc6b0,
+ 0xc6cc, 0xc6cc,
+ 0xc6e8, 0xc6e8,
+ 0xc704, 0xc704,
+ 0xc720, 0xc720,
+ 0xc73c, 0xc73c,
+ 0xc758, 0xc758,
+ 0xc774, 0xc774,
+ 0xc790, 0xc790,
+ 0xc7ac, 0xc7ac,
+ 0xc7c8, 0xc7c8,
+ 0xc7e4, 0xc7e4,
+ 0xc800, 0xc800,
+ 0xc81c, 0xc81c,
+ 0xc838, 0xc838,
+ 0xc854, 0xc854,
+ 0xc870, 0xc870,
+ 0xc88c, 0xc88c,
+ 0xc8a8, 0xc8a8,
+ 0xc8c4, 0xc8c4,
+ 0xc8e0, 0xc8e0,
+ 0xc8fc, 0xc8fc,
+ 0xc918, 0xc918,
+ 0xc934, 0xc934,
+ 0xc950, 0xc950,
+ 0xc96c, 0xc96c,
+ 0xc988, 0xc988,
+ 0xc9a4, 0xc9a4,
+ 0xc9c0, 0xc9c0,
+ 0xc9dc, 0xc9dc,
+ 0xc9f8, 0xc9f8,
+ 0xca14, 0xca14,
+ 0xca30, 0xca30,
+ 0xca4c, 0xca4c,
+ 0xca68, 0xca68,
+ 0xca84, 0xca84,
+ 0xcaa0, 0xcaa0,
+ 0xcabc, 0xcabc,
+ 0xcad8, 0xcad8,
+ 0xcaf4, 0xcaf4,
+ 0xcb10, 0xcb10,
+ 0xcb2c, 0xcb2c,
+ 0xcb48, 0xcb48,
+ 0xcb64, 0xcb64,
+ 0xcb80, 0xcb80,
+ 0xcb9c, 0xcb9c,
+ 0xcbb8, 0xcbb8,
+ 0xcbd4, 0xcbd4,
+ 0xcbf0, 0xcbf0,
+ 0xcc0c, 0xcc0c,
+ 0xcc28, 0xcc28,
+ 0xcc44, 0xcc44,
+ 0xcc60, 0xcc60,
+ 0xcc7c, 0xcc7c,
+ 0xcc98, 0xcc98,
+ 0xccb4, 0xccb4,
+ 0xccd0, 0xccd0,
+ 0xccec, 0xccec,
+ 0xcd08, 0xcd08,
+ 0xcd24, 0xcd24,
+ 0xcd40, 0xcd40,
+ 0xcd5c, 0xcd5c,
+ 0xcd78, 0xcd78,
+ 0xcd94, 0xcd94,
+ 0xcdb0, 0xcdb0,
+ 0xcdcc, 0xcdcc,
+ 0xcde8, 0xcde8,
+ 0xce04, 0xce04,
+ 0xce20, 0xce20,
+ 0xce3c, 0xce3c,
+ 0xce58, 0xce58,
+ 0xce74, 0xce74,
+ 0xce90, 0xce90,
+ 0xceac, 0xceac,
+ 0xcec8, 0xcec8,
+ 0xcee4, 0xcee4,
+ 0xcf00, 0xcf00,
+ 0xcf1c, 0xcf1c,
+ 0xcf38, 0xcf38,
+ 0xcf54, 0xcf54,
+ 0xcf70, 0xcf70,
+ 0xcf8c, 0xcf8c,
+ 0xcfa8, 0xcfa8,
+ 0xcfc4, 0xcfc4,
+ 0xcfe0, 0xcfe0,
+ 0xcffc, 0xcffc,
+ 0xd018, 0xd018,
+ 0xd034, 0xd034,
+ 0xd050, 0xd050,
+ 0xd06c, 0xd06c,
+ 0xd088, 0xd088,
+ 0xd0a4, 0xd0a4,
+ 0xd0c0, 0xd0c0,
+ 0xd0dc, 0xd0dc,
+ 0xd0f8, 0xd0f8,
+ 0xd114, 0xd114,
+ 0xd130, 0xd130,
+ 0xd14c, 0xd14c,
+ 0xd168, 0xd168,
+ 0xd184, 0xd184,
+ 0xd1a0, 0xd1a0,
+ 0xd1bc, 0xd1bc,
+ 0xd1d8, 0xd1d8,
+ 0xd1f4, 0xd1f4,
+ 0xd210, 0xd210,
+ 0xd22c, 0xd22c,
+ 0xd248, 0xd248,
+ 0xd264, 0xd264,
+ 0xd280, 0xd280,
+ 0xd29c, 0xd29c,
+ 0xd2b8, 0xd2b8,
+ 0xd2d4, 0xd2d4,
+ 0xd2f0, 0xd2f0,
+ 0xd30c, 0xd30c,
+ 0xd328, 0xd328,
+ 0xd344, 0xd344,
+ 0xd360, 0xd360,
+ 0xd37c, 0xd37c,
+ 0xd398, 0xd398,
+ 0xd3b4, 0xd3b4,
+ 0xd3d0, 0xd3d0,
+ 0xd3ec, 0xd3ec,
+ 0xd408, 0xd408,
+ 0xd424, 0xd424,
+ 0xd440, 0xd440,
+ 0xd45c, 0xd45c,
+ 0xd478, 0xd478,
+ 0xd494, 0xd494,
+ 0xd4b0, 0xd4b0,
+ 0xd4cc, 0xd4cc,
+ 0xd4e8, 0xd4e8,
+ 0xd504, 0xd504,
+ 0xd520, 0xd520,
+ 0xd53c, 0xd53c,
+ 0xd558, 0xd558,
+ 0xd574, 0xd574,
+ 0xd590, 0xd590,
+ 0xd5ac, 0xd5ac,
+ 0xd5c8, 0xd5c8,
+ 0xd5e4, 0xd5e4,
+ 0xd600, 0xd600,
+ 0xd61c, 0xd61c,
+ 0xd638, 0xd638,
+ 0xd654, 0xd654,
+ 0xd670, 0xd670,
+ 0xd68c, 0xd68c,
+ 0xd6a8, 0xd6a8,
+ 0xd6c4, 0xd6c4,
+ 0xd6e0, 0xd6e0,
+ 0xd6fc, 0xd6fc,
+ 0xd718, 0xd718,
+ 0xd734, 0xd734,
+ 0xd750, 0xd750,
+ 0xd76c, 0xd76c,
+ 0xd788, 0xd788,
+}; /* CR_Grapheme_Cluster_Break_LV */
+
+/* 'Grapheme_Cluster_Break_LVT': Grapheme_Cluster_Break=LVT */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_LVT[] = {
+ 399,
+ 0xac01, 0xac1b,
+ 0xac1d, 0xac37,
+ 0xac39, 0xac53,
+ 0xac55, 0xac6f,
+ 0xac71, 0xac8b,
+ 0xac8d, 0xaca7,
+ 0xaca9, 0xacc3,
+ 0xacc5, 0xacdf,
+ 0xace1, 0xacfb,
+ 0xacfd, 0xad17,
+ 0xad19, 0xad33,
+ 0xad35, 0xad4f,
+ 0xad51, 0xad6b,
+ 0xad6d, 0xad87,
+ 0xad89, 0xada3,
+ 0xada5, 0xadbf,
+ 0xadc1, 0xaddb,
+ 0xaddd, 0xadf7,
+ 0xadf9, 0xae13,
+ 0xae15, 0xae2f,
+ 0xae31, 0xae4b,
+ 0xae4d, 0xae67,
+ 0xae69, 0xae83,
+ 0xae85, 0xae9f,
+ 0xaea1, 0xaebb,
+ 0xaebd, 0xaed7,
+ 0xaed9, 0xaef3,
+ 0xaef5, 0xaf0f,
+ 0xaf11, 0xaf2b,
+ 0xaf2d, 0xaf47,
+ 0xaf49, 0xaf63,
+ 0xaf65, 0xaf7f,
+ 0xaf81, 0xaf9b,
+ 0xaf9d, 0xafb7,
+ 0xafb9, 0xafd3,
+ 0xafd5, 0xafef,
+ 0xaff1, 0xb00b,
+ 0xb00d, 0xb027,
+ 0xb029, 0xb043,
+ 0xb045, 0xb05f,
+ 0xb061, 0xb07b,
+ 0xb07d, 0xb097,
+ 0xb099, 0xb0b3,
+ 0xb0b5, 0xb0cf,
+ 0xb0d1, 0xb0eb,
+ 0xb0ed, 0xb107,
+ 0xb109, 0xb123,
+ 0xb125, 0xb13f,
+ 0xb141, 0xb15b,
+ 0xb15d, 0xb177,
+ 0xb179, 0xb193,
+ 0xb195, 0xb1af,
+ 0xb1b1, 0xb1cb,
+ 0xb1cd, 0xb1e7,
+ 0xb1e9, 0xb203,
+ 0xb205, 0xb21f,
+ 0xb221, 0xb23b,
+ 0xb23d, 0xb257,
+ 0xb259, 0xb273,
+ 0xb275, 0xb28f,
+ 0xb291, 0xb2ab,
+ 0xb2ad, 0xb2c7,
+ 0xb2c9, 0xb2e3,
+ 0xb2e5, 0xb2ff,
+ 0xb301, 0xb31b,
+ 0xb31d, 0xb337,
+ 0xb339, 0xb353,
+ 0xb355, 0xb36f,
+ 0xb371, 0xb38b,
+ 0xb38d, 0xb3a7,
+ 0xb3a9, 0xb3c3,
+ 0xb3c5, 0xb3df,
+ 0xb3e1, 0xb3fb,
+ 0xb3fd, 0xb417,
+ 0xb419, 0xb433,
+ 0xb435, 0xb44f,
+ 0xb451, 0xb46b,
+ 0xb46d, 0xb487,
+ 0xb489, 0xb4a3,
+ 0xb4a5, 0xb4bf,
+ 0xb4c1, 0xb4db,
+ 0xb4dd, 0xb4f7,
+ 0xb4f9, 0xb513,
+ 0xb515, 0xb52f,
+ 0xb531, 0xb54b,
+ 0xb54d, 0xb567,
+ 0xb569, 0xb583,
+ 0xb585, 0xb59f,
+ 0xb5a1, 0xb5bb,
+ 0xb5bd, 0xb5d7,
+ 0xb5d9, 0xb5f3,
+ 0xb5f5, 0xb60f,
+ 0xb611, 0xb62b,
+ 0xb62d, 0xb647,
+ 0xb649, 0xb663,
+ 0xb665, 0xb67f,
+ 0xb681, 0xb69b,
+ 0xb69d, 0xb6b7,
+ 0xb6b9, 0xb6d3,
+ 0xb6d5, 0xb6ef,
+ 0xb6f1, 0xb70b,
+ 0xb70d, 0xb727,
+ 0xb729, 0xb743,
+ 0xb745, 0xb75f,
+ 0xb761, 0xb77b,
+ 0xb77d, 0xb797,
+ 0xb799, 0xb7b3,
+ 0xb7b5, 0xb7cf,
+ 0xb7d1, 0xb7eb,
+ 0xb7ed, 0xb807,
+ 0xb809, 0xb823,
+ 0xb825, 0xb83f,
+ 0xb841, 0xb85b,
+ 0xb85d, 0xb877,
+ 0xb879, 0xb893,
+ 0xb895, 0xb8af,
+ 0xb8b1, 0xb8cb,
+ 0xb8cd, 0xb8e7,
+ 0xb8e9, 0xb903,
+ 0xb905, 0xb91f,
+ 0xb921, 0xb93b,
+ 0xb93d, 0xb957,
+ 0xb959, 0xb973,
+ 0xb975, 0xb98f,
+ 0xb991, 0xb9ab,
+ 0xb9ad, 0xb9c7,
+ 0xb9c9, 0xb9e3,
+ 0xb9e5, 0xb9ff,
+ 0xba01, 0xba1b,
+ 0xba1d, 0xba37,
+ 0xba39, 0xba53,
+ 0xba55, 0xba6f,
+ 0xba71, 0xba8b,
+ 0xba8d, 0xbaa7,
+ 0xbaa9, 0xbac3,
+ 0xbac5, 0xbadf,
+ 0xbae1, 0xbafb,
+ 0xbafd, 0xbb17,
+ 0xbb19, 0xbb33,
+ 0xbb35, 0xbb4f,
+ 0xbb51, 0xbb6b,
+ 0xbb6d, 0xbb87,
+ 0xbb89, 0xbba3,
+ 0xbba5, 0xbbbf,
+ 0xbbc1, 0xbbdb,
+ 0xbbdd, 0xbbf7,
+ 0xbbf9, 0xbc13,
+ 0xbc15, 0xbc2f,
+ 0xbc31, 0xbc4b,
+ 0xbc4d, 0xbc67,
+ 0xbc69, 0xbc83,
+ 0xbc85, 0xbc9f,
+ 0xbca1, 0xbcbb,
+ 0xbcbd, 0xbcd7,
+ 0xbcd9, 0xbcf3,
+ 0xbcf5, 0xbd0f,
+ 0xbd11, 0xbd2b,
+ 0xbd2d, 0xbd47,
+ 0xbd49, 0xbd63,
+ 0xbd65, 0xbd7f,
+ 0xbd81, 0xbd9b,
+ 0xbd9d, 0xbdb7,
+ 0xbdb9, 0xbdd3,
+ 0xbdd5, 0xbdef,
+ 0xbdf1, 0xbe0b,
+ 0xbe0d, 0xbe27,
+ 0xbe29, 0xbe43,
+ 0xbe45, 0xbe5f,
+ 0xbe61, 0xbe7b,
+ 0xbe7d, 0xbe97,
+ 0xbe99, 0xbeb3,
+ 0xbeb5, 0xbecf,
+ 0xbed1, 0xbeeb,
+ 0xbeed, 0xbf07,
+ 0xbf09, 0xbf23,
+ 0xbf25, 0xbf3f,
+ 0xbf41, 0xbf5b,
+ 0xbf5d, 0xbf77,
+ 0xbf79, 0xbf93,
+ 0xbf95, 0xbfaf,
+ 0xbfb1, 0xbfcb,
+ 0xbfcd, 0xbfe7,
+ 0xbfe9, 0xc003,
+ 0xc005, 0xc01f,
+ 0xc021, 0xc03b,
+ 0xc03d, 0xc057,
+ 0xc059, 0xc073,
+ 0xc075, 0xc08f,
+ 0xc091, 0xc0ab,
+ 0xc0ad, 0xc0c7,
+ 0xc0c9, 0xc0e3,
+ 0xc0e5, 0xc0ff,
+ 0xc101, 0xc11b,
+ 0xc11d, 0xc137,
+ 0xc139, 0xc153,
+ 0xc155, 0xc16f,
+ 0xc171, 0xc18b,
+ 0xc18d, 0xc1a7,
+ 0xc1a9, 0xc1c3,
+ 0xc1c5, 0xc1df,
+ 0xc1e1, 0xc1fb,
+ 0xc1fd, 0xc217,
+ 0xc219, 0xc233,
+ 0xc235, 0xc24f,
+ 0xc251, 0xc26b,
+ 0xc26d, 0xc287,
+ 0xc289, 0xc2a3,
+ 0xc2a5, 0xc2bf,
+ 0xc2c1, 0xc2db,
+ 0xc2dd, 0xc2f7,
+ 0xc2f9, 0xc313,
+ 0xc315, 0xc32f,
+ 0xc331, 0xc34b,
+ 0xc34d, 0xc367,
+ 0xc369, 0xc383,
+ 0xc385, 0xc39f,
+ 0xc3a1, 0xc3bb,
+ 0xc3bd, 0xc3d7,
+ 0xc3d9, 0xc3f3,
+ 0xc3f5, 0xc40f,
+ 0xc411, 0xc42b,
+ 0xc42d, 0xc447,
+ 0xc449, 0xc463,
+ 0xc465, 0xc47f,
+ 0xc481, 0xc49b,
+ 0xc49d, 0xc4b7,
+ 0xc4b9, 0xc4d3,
+ 0xc4d5, 0xc4ef,
+ 0xc4f1, 0xc50b,
+ 0xc50d, 0xc527,
+ 0xc529, 0xc543,
+ 0xc545, 0xc55f,
+ 0xc561, 0xc57b,
+ 0xc57d, 0xc597,
+ 0xc599, 0xc5b3,
+ 0xc5b5, 0xc5cf,
+ 0xc5d1, 0xc5eb,
+ 0xc5ed, 0xc607,
+ 0xc609, 0xc623,
+ 0xc625, 0xc63f,
+ 0xc641, 0xc65b,
+ 0xc65d, 0xc677,
+ 0xc679, 0xc693,
+ 0xc695, 0xc6af,
+ 0xc6b1, 0xc6cb,
+ 0xc6cd, 0xc6e7,
+ 0xc6e9, 0xc703,
+ 0xc705, 0xc71f,
+ 0xc721, 0xc73b,
+ 0xc73d, 0xc757,
+ 0xc759, 0xc773,
+ 0xc775, 0xc78f,
+ 0xc791, 0xc7ab,
+ 0xc7ad, 0xc7c7,
+ 0xc7c9, 0xc7e3,
+ 0xc7e5, 0xc7ff,
+ 0xc801, 0xc81b,
+ 0xc81d, 0xc837,
+ 0xc839, 0xc853,
+ 0xc855, 0xc86f,
+ 0xc871, 0xc88b,
+ 0xc88d, 0xc8a7,
+ 0xc8a9, 0xc8c3,
+ 0xc8c5, 0xc8df,
+ 0xc8e1, 0xc8fb,
+ 0xc8fd, 0xc917,
+ 0xc919, 0xc933,
+ 0xc935, 0xc94f,
+ 0xc951, 0xc96b,
+ 0xc96d, 0xc987,
+ 0xc989, 0xc9a3,
+ 0xc9a5, 0xc9bf,
+ 0xc9c1, 0xc9db,
+ 0xc9dd, 0xc9f7,
+ 0xc9f9, 0xca13,
+ 0xca15, 0xca2f,
+ 0xca31, 0xca4b,
+ 0xca4d, 0xca67,
+ 0xca69, 0xca83,
+ 0xca85, 0xca9f,
+ 0xcaa1, 0xcabb,
+ 0xcabd, 0xcad7,
+ 0xcad9, 0xcaf3,
+ 0xcaf5, 0xcb0f,
+ 0xcb11, 0xcb2b,
+ 0xcb2d, 0xcb47,
+ 0xcb49, 0xcb63,
+ 0xcb65, 0xcb7f,
+ 0xcb81, 0xcb9b,
+ 0xcb9d, 0xcbb7,
+ 0xcbb9, 0xcbd3,
+ 0xcbd5, 0xcbef,
+ 0xcbf1, 0xcc0b,
+ 0xcc0d, 0xcc27,
+ 0xcc29, 0xcc43,
+ 0xcc45, 0xcc5f,
+ 0xcc61, 0xcc7b,
+ 0xcc7d, 0xcc97,
+ 0xcc99, 0xccb3,
+ 0xccb5, 0xcccf,
+ 0xccd1, 0xcceb,
+ 0xcced, 0xcd07,
+ 0xcd09, 0xcd23,
+ 0xcd25, 0xcd3f,
+ 0xcd41, 0xcd5b,
+ 0xcd5d, 0xcd77,
+ 0xcd79, 0xcd93,
+ 0xcd95, 0xcdaf,
+ 0xcdb1, 0xcdcb,
+ 0xcdcd, 0xcde7,
+ 0xcde9, 0xce03,
+ 0xce05, 0xce1f,
+ 0xce21, 0xce3b,
+ 0xce3d, 0xce57,
+ 0xce59, 0xce73,
+ 0xce75, 0xce8f,
+ 0xce91, 0xceab,
+ 0xcead, 0xcec7,
+ 0xcec9, 0xcee3,
+ 0xcee5, 0xceff,
+ 0xcf01, 0xcf1b,
+ 0xcf1d, 0xcf37,
+ 0xcf39, 0xcf53,
+ 0xcf55, 0xcf6f,
+ 0xcf71, 0xcf8b,
+ 0xcf8d, 0xcfa7,
+ 0xcfa9, 0xcfc3,
+ 0xcfc5, 0xcfdf,
+ 0xcfe1, 0xcffb,
+ 0xcffd, 0xd017,
+ 0xd019, 0xd033,
+ 0xd035, 0xd04f,
+ 0xd051, 0xd06b,
+ 0xd06d, 0xd087,
+ 0xd089, 0xd0a3,
+ 0xd0a5, 0xd0bf,
+ 0xd0c1, 0xd0db,
+ 0xd0dd, 0xd0f7,
+ 0xd0f9, 0xd113,
+ 0xd115, 0xd12f,
+ 0xd131, 0xd14b,
+ 0xd14d, 0xd167,
+ 0xd169, 0xd183,
+ 0xd185, 0xd19f,
+ 0xd1a1, 0xd1bb,
+ 0xd1bd, 0xd1d7,
+ 0xd1d9, 0xd1f3,
+ 0xd1f5, 0xd20f,
+ 0xd211, 0xd22b,
+ 0xd22d, 0xd247,
+ 0xd249, 0xd263,
+ 0xd265, 0xd27f,
+ 0xd281, 0xd29b,
+ 0xd29d, 0xd2b7,
+ 0xd2b9, 0xd2d3,
+ 0xd2d5, 0xd2ef,
+ 0xd2f1, 0xd30b,
+ 0xd30d, 0xd327,
+ 0xd329, 0xd343,
+ 0xd345, 0xd35f,
+ 0xd361, 0xd37b,
+ 0xd37d, 0xd397,
+ 0xd399, 0xd3b3,
+ 0xd3b5, 0xd3cf,
+ 0xd3d1, 0xd3eb,
+ 0xd3ed, 0xd407,
+ 0xd409, 0xd423,
+ 0xd425, 0xd43f,
+ 0xd441, 0xd45b,
+ 0xd45d, 0xd477,
+ 0xd479, 0xd493,
+ 0xd495, 0xd4af,
+ 0xd4b1, 0xd4cb,
+ 0xd4cd, 0xd4e7,
+ 0xd4e9, 0xd503,
+ 0xd505, 0xd51f,
+ 0xd521, 0xd53b,
+ 0xd53d, 0xd557,
+ 0xd559, 0xd573,
+ 0xd575, 0xd58f,
+ 0xd591, 0xd5ab,
+ 0xd5ad, 0xd5c7,
+ 0xd5c9, 0xd5e3,
+ 0xd5e5, 0xd5ff,
+ 0xd601, 0xd61b,
+ 0xd61d, 0xd637,
+ 0xd639, 0xd653,
+ 0xd655, 0xd66f,
+ 0xd671, 0xd68b,
+ 0xd68d, 0xd6a7,
+ 0xd6a9, 0xd6c3,
+ 0xd6c5, 0xd6df,
+ 0xd6e1, 0xd6fb,
+ 0xd6fd, 0xd717,
+ 0xd719, 0xd733,
+ 0xd735, 0xd74f,
+ 0xd751, 0xd76b,
+ 0xd76d, 0xd787,
+ 0xd789, 0xd7a3,
+}; /* CR_Grapheme_Cluster_Break_LVT */
+
+/* 'Grapheme_Cluster_Break_ZWJ': Grapheme_Cluster_Break=ZWJ */
+static const OnigCodePoint CR_Grapheme_Cluster_Break_ZWJ[] = {
+ 1,
+ 0x200d, 0x200d,
+}; /* CR_Grapheme_Cluster_Break_ZWJ */
+
+/* 'In_Basic_Latin': Block */
+#define CR_In_Basic_Latin CR_ASCII
+
+/* 'In_Latin_1_Supplement': Block */
+static const OnigCodePoint CR_In_Latin_1_Supplement[] = {
+ 1,
+ 0x0080, 0x00ff,
+}; /* CR_In_Latin_1_Supplement */
+
+/* 'In_Latin_Extended_A': Block */
+static const OnigCodePoint CR_In_Latin_Extended_A[] = {
+ 1,
+ 0x0100, 0x017f,
+}; /* CR_In_Latin_Extended_A */
+
+/* 'In_Latin_Extended_B': Block */
+static const OnigCodePoint CR_In_Latin_Extended_B[] = {
+ 1,
+ 0x0180, 0x024f,
+}; /* CR_In_Latin_Extended_B */
+
+/* 'In_IPA_Extensions': Block */
+static const OnigCodePoint CR_In_IPA_Extensions[] = {
+ 1,
+ 0x0250, 0x02af,
+}; /* CR_In_IPA_Extensions */
+
+/* 'In_Spacing_Modifier_Letters': Block */
+static const OnigCodePoint CR_In_Spacing_Modifier_Letters[] = {
+ 1,
+ 0x02b0, 0x02ff,
+}; /* CR_In_Spacing_Modifier_Letters */
+
+/* 'In_Combining_Diacritical_Marks': Block */
+static const OnigCodePoint CR_In_Combining_Diacritical_Marks[] = {
+ 1,
+ 0x0300, 0x036f,
+}; /* CR_In_Combining_Diacritical_Marks */
+
+/* 'In_Greek_and_Coptic': Block */
+static const OnigCodePoint CR_In_Greek_and_Coptic[] = {
+ 1,
+ 0x0370, 0x03ff,
+}; /* CR_In_Greek_and_Coptic */
+
+/* 'In_Cyrillic': Block */
+static const OnigCodePoint CR_In_Cyrillic[] = {
+ 1,
+ 0x0400, 0x04ff,
+}; /* CR_In_Cyrillic */
+
+/* 'In_Cyrillic_Supplement': Block */
+static const OnigCodePoint CR_In_Cyrillic_Supplement[] = {
+ 1,
+ 0x0500, 0x052f,
+}; /* CR_In_Cyrillic_Supplement */
+
+/* 'In_Armenian': Block */
+static const OnigCodePoint CR_In_Armenian[] = {
+ 1,
+ 0x0530, 0x058f,
+}; /* CR_In_Armenian */
+
+/* 'In_Hebrew': Block */
+static const OnigCodePoint CR_In_Hebrew[] = {
+ 1,
+ 0x0590, 0x05ff,
+}; /* CR_In_Hebrew */
+
+/* 'In_Arabic': Block */
+static const OnigCodePoint CR_In_Arabic[] = {
+ 1,
+ 0x0600, 0x06ff,
+}; /* CR_In_Arabic */
+
+/* 'In_Syriac': Block */
+static const OnigCodePoint CR_In_Syriac[] = {
+ 1,
+ 0x0700, 0x074f,
+}; /* CR_In_Syriac */
+
+/* 'In_Arabic_Supplement': Block */
+static const OnigCodePoint CR_In_Arabic_Supplement[] = {
+ 1,
+ 0x0750, 0x077f,
+}; /* CR_In_Arabic_Supplement */
+
+/* 'In_Thaana': Block */
+static const OnigCodePoint CR_In_Thaana[] = {
+ 1,
+ 0x0780, 0x07bf,
+}; /* CR_In_Thaana */
+
+/* 'In_NKo': Block */
+static const OnigCodePoint CR_In_NKo[] = {
+ 1,
+ 0x07c0, 0x07ff,
+}; /* CR_In_NKo */
+
+/* 'In_Samaritan': Block */
+static const OnigCodePoint CR_In_Samaritan[] = {
+ 1,
+ 0x0800, 0x083f,
+}; /* CR_In_Samaritan */
+
+/* 'In_Mandaic': Block */
+static const OnigCodePoint CR_In_Mandaic[] = {
+ 1,
+ 0x0840, 0x085f,
+}; /* CR_In_Mandaic */
+
+/* 'In_Syriac_Supplement': Block */
+static const OnigCodePoint CR_In_Syriac_Supplement[] = {
+ 1,
+ 0x0860, 0x086f,
+}; /* CR_In_Syriac_Supplement */
+
+/* 'In_Arabic_Extended_B': Block */
+static const OnigCodePoint CR_In_Arabic_Extended_B[] = {
+ 1,
+ 0x0870, 0x089f,
+}; /* CR_In_Arabic_Extended_B */
+
+/* 'In_Arabic_Extended_A': Block */
+static const OnigCodePoint CR_In_Arabic_Extended_A[] = {
+ 1,
+ 0x08a0, 0x08ff,
+}; /* CR_In_Arabic_Extended_A */
+
+/* 'In_Devanagari': Block */
+static const OnigCodePoint CR_In_Devanagari[] = {
+ 1,
+ 0x0900, 0x097f,
+}; /* CR_In_Devanagari */
+
+/* 'In_Bengali': Block */
+static const OnigCodePoint CR_In_Bengali[] = {
+ 1,
+ 0x0980, 0x09ff,
+}; /* CR_In_Bengali */
+
+/* 'In_Gurmukhi': Block */
+static const OnigCodePoint CR_In_Gurmukhi[] = {
+ 1,
+ 0x0a00, 0x0a7f,
+}; /* CR_In_Gurmukhi */
+
+/* 'In_Gujarati': Block */
+static const OnigCodePoint CR_In_Gujarati[] = {
+ 1,
+ 0x0a80, 0x0aff,
+}; /* CR_In_Gujarati */
+
+/* 'In_Oriya': Block */
+static const OnigCodePoint CR_In_Oriya[] = {
+ 1,
+ 0x0b00, 0x0b7f,
+}; /* CR_In_Oriya */
+
+/* 'In_Tamil': Block */
+static const OnigCodePoint CR_In_Tamil[] = {
+ 1,
+ 0x0b80, 0x0bff,
+}; /* CR_In_Tamil */
+
+/* 'In_Telugu': Block */
+static const OnigCodePoint CR_In_Telugu[] = {
+ 1,
+ 0x0c00, 0x0c7f,
+}; /* CR_In_Telugu */
+
+/* 'In_Kannada': Block */
+static const OnigCodePoint CR_In_Kannada[] = {
+ 1,
+ 0x0c80, 0x0cff,
+}; /* CR_In_Kannada */
+
+/* 'In_Malayalam': Block */
+static const OnigCodePoint CR_In_Malayalam[] = {
+ 1,
+ 0x0d00, 0x0d7f,
+}; /* CR_In_Malayalam */
+
+/* 'In_Sinhala': Block */
+static const OnigCodePoint CR_In_Sinhala[] = {
+ 1,
+ 0x0d80, 0x0dff,
+}; /* CR_In_Sinhala */
+
+/* 'In_Thai': Block */
+static const OnigCodePoint CR_In_Thai[] = {
+ 1,
+ 0x0e00, 0x0e7f,
+}; /* CR_In_Thai */
+
+/* 'In_Lao': Block */
+static const OnigCodePoint CR_In_Lao[] = {
+ 1,
+ 0x0e80, 0x0eff,
+}; /* CR_In_Lao */
+
+/* 'In_Tibetan': Block */
+static const OnigCodePoint CR_In_Tibetan[] = {
+ 1,
+ 0x0f00, 0x0fff,
+}; /* CR_In_Tibetan */
+
+/* 'In_Myanmar': Block */
+static const OnigCodePoint CR_In_Myanmar[] = {
+ 1,
+ 0x1000, 0x109f,
+}; /* CR_In_Myanmar */
+
+/* 'In_Georgian': Block */
+static const OnigCodePoint CR_In_Georgian[] = {
+ 1,
+ 0x10a0, 0x10ff,
+}; /* CR_In_Georgian */
+
+/* 'In_Hangul_Jamo': Block */
+static const OnigCodePoint CR_In_Hangul_Jamo[] = {
+ 1,
+ 0x1100, 0x11ff,
+}; /* CR_In_Hangul_Jamo */
+
+/* 'In_Ethiopic': Block */
+static const OnigCodePoint CR_In_Ethiopic[] = {
+ 1,
+ 0x1200, 0x137f,
+}; /* CR_In_Ethiopic */
+
+/* 'In_Ethiopic_Supplement': Block */
+static const OnigCodePoint CR_In_Ethiopic_Supplement[] = {
+ 1,
+ 0x1380, 0x139f,
+}; /* CR_In_Ethiopic_Supplement */
+
+/* 'In_Cherokee': Block */
+static const OnigCodePoint CR_In_Cherokee[] = {
+ 1,
+ 0x13a0, 0x13ff,
+}; /* CR_In_Cherokee */
+
+/* 'In_Unified_Canadian_Aboriginal_Syllabics': Block */
+static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics[] = {
+ 1,
+ 0x1400, 0x167f,
+}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics */
+
+/* 'In_Ogham': Block */
+static const OnigCodePoint CR_In_Ogham[] = {
+ 1,
+ 0x1680, 0x169f,
+}; /* CR_In_Ogham */
+
+/* 'In_Runic': Block */
+static const OnigCodePoint CR_In_Runic[] = {
+ 1,
+ 0x16a0, 0x16ff,
+}; /* CR_In_Runic */
+
+/* 'In_Tagalog': Block */
+static const OnigCodePoint CR_In_Tagalog[] = {
+ 1,
+ 0x1700, 0x171f,
+}; /* CR_In_Tagalog */
+
+/* 'In_Hanunoo': Block */
+static const OnigCodePoint CR_In_Hanunoo[] = {
+ 1,
+ 0x1720, 0x173f,
+}; /* CR_In_Hanunoo */
+
+/* 'In_Buhid': Block */
+static const OnigCodePoint CR_In_Buhid[] = {
+ 1,
+ 0x1740, 0x175f,
+}; /* CR_In_Buhid */
+
+/* 'In_Tagbanwa': Block */
+static const OnigCodePoint CR_In_Tagbanwa[] = {
+ 1,
+ 0x1760, 0x177f,
+}; /* CR_In_Tagbanwa */
+
+/* 'In_Khmer': Block */
+static const OnigCodePoint CR_In_Khmer[] = {
+ 1,
+ 0x1780, 0x17ff,
+}; /* CR_In_Khmer */
+
+/* 'In_Mongolian': Block */
+static const OnigCodePoint CR_In_Mongolian[] = {
+ 1,
+ 0x1800, 0x18af,
+}; /* CR_In_Mongolian */
+
+/* 'In_Unified_Canadian_Aboriginal_Syllabics_Extended': Block */
+static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended[] = {
+ 1,
+ 0x18b0, 0x18ff,
+}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended */
+
+/* 'In_Limbu': Block */
+static const OnigCodePoint CR_In_Limbu[] = {
+ 1,
+ 0x1900, 0x194f,
+}; /* CR_In_Limbu */
+
+/* 'In_Tai_Le': Block */
+static const OnigCodePoint CR_In_Tai_Le[] = {
+ 1,
+ 0x1950, 0x197f,
+}; /* CR_In_Tai_Le */
+
+/* 'In_New_Tai_Lue': Block */
+static const OnigCodePoint CR_In_New_Tai_Lue[] = {
+ 1,
+ 0x1980, 0x19df,
+}; /* CR_In_New_Tai_Lue */
+
+/* 'In_Khmer_Symbols': Block */
+static const OnigCodePoint CR_In_Khmer_Symbols[] = {
+ 1,
+ 0x19e0, 0x19ff,
+}; /* CR_In_Khmer_Symbols */
+
+/* 'In_Buginese': Block */
+static const OnigCodePoint CR_In_Buginese[] = {
+ 1,
+ 0x1a00, 0x1a1f,
+}; /* CR_In_Buginese */
+
+/* 'In_Tai_Tham': Block */
+static const OnigCodePoint CR_In_Tai_Tham[] = {
+ 1,
+ 0x1a20, 0x1aaf,
+}; /* CR_In_Tai_Tham */
+
+/* 'In_Combining_Diacritical_Marks_Extended': Block */
+static const OnigCodePoint CR_In_Combining_Diacritical_Marks_Extended[] = {
+ 1,
+ 0x1ab0, 0x1aff,
+}; /* CR_In_Combining_Diacritical_Marks_Extended */
+
+/* 'In_Balinese': Block */
+static const OnigCodePoint CR_In_Balinese[] = {
+ 1,
+ 0x1b00, 0x1b7f,
+}; /* CR_In_Balinese */
+
+/* 'In_Sundanese': Block */
+static const OnigCodePoint CR_In_Sundanese[] = {
+ 1,
+ 0x1b80, 0x1bbf,
+}; /* CR_In_Sundanese */
+
+/* 'In_Batak': Block */
+static const OnigCodePoint CR_In_Batak[] = {
+ 1,
+ 0x1bc0, 0x1bff,
+}; /* CR_In_Batak */
+
+/* 'In_Lepcha': Block */
+static const OnigCodePoint CR_In_Lepcha[] = {
+ 1,
+ 0x1c00, 0x1c4f,
+}; /* CR_In_Lepcha */
+
+/* 'In_Ol_Chiki': Block */
+#define CR_In_Ol_Chiki CR_Ol_Chiki
+
+/* 'In_Cyrillic_Extended_C': Block */
+static const OnigCodePoint CR_In_Cyrillic_Extended_C[] = {
+ 1,
+ 0x1c80, 0x1c8f,
+}; /* CR_In_Cyrillic_Extended_C */
+
+/* 'In_Georgian_Extended': Block */
+static const OnigCodePoint CR_In_Georgian_Extended[] = {
+ 1,
+ 0x1c90, 0x1cbf,
+}; /* CR_In_Georgian_Extended */
+
+/* 'In_Sundanese_Supplement': Block */
+static const OnigCodePoint CR_In_Sundanese_Supplement[] = {
+ 1,
+ 0x1cc0, 0x1ccf,
+}; /* CR_In_Sundanese_Supplement */
+
+/* 'In_Vedic_Extensions': Block */
+static const OnigCodePoint CR_In_Vedic_Extensions[] = {
+ 1,
+ 0x1cd0, 0x1cff,
+}; /* CR_In_Vedic_Extensions */
+
+/* 'In_Phonetic_Extensions': Block */
+static const OnigCodePoint CR_In_Phonetic_Extensions[] = {
+ 1,
+ 0x1d00, 0x1d7f,
+}; /* CR_In_Phonetic_Extensions */
+
+/* 'In_Phonetic_Extensions_Supplement': Block */
+static const OnigCodePoint CR_In_Phonetic_Extensions_Supplement[] = {
+ 1,
+ 0x1d80, 0x1dbf,
+}; /* CR_In_Phonetic_Extensions_Supplement */
+
+/* 'In_Combining_Diacritical_Marks_Supplement': Block */
+static const OnigCodePoint CR_In_Combining_Diacritical_Marks_Supplement[] = {
+ 1,
+ 0x1dc0, 0x1dff,
+}; /* CR_In_Combining_Diacritical_Marks_Supplement */
+
+/* 'In_Latin_Extended_Additional': Block */
+static const OnigCodePoint CR_In_Latin_Extended_Additional[] = {
+ 1,
+ 0x1e00, 0x1eff,
+}; /* CR_In_Latin_Extended_Additional */
+
+/* 'In_Greek_Extended': Block */
+static const OnigCodePoint CR_In_Greek_Extended[] = {
+ 1,
+ 0x1f00, 0x1fff,
+}; /* CR_In_Greek_Extended */
+
+/* 'In_General_Punctuation': Block */
+static const OnigCodePoint CR_In_General_Punctuation[] = {
+ 1,
+ 0x2000, 0x206f,
+}; /* CR_In_General_Punctuation */
+
+/* 'In_Superscripts_and_Subscripts': Block */
+static const OnigCodePoint CR_In_Superscripts_and_Subscripts[] = {
+ 1,
+ 0x2070, 0x209f,
+}; /* CR_In_Superscripts_and_Subscripts */
+
+/* 'In_Currency_Symbols': Block */
+static const OnigCodePoint CR_In_Currency_Symbols[] = {
+ 1,
+ 0x20a0, 0x20cf,
+}; /* CR_In_Currency_Symbols */
+
+/* 'In_Combining_Diacritical_Marks_for_Symbols': Block */
+static const OnigCodePoint CR_In_Combining_Diacritical_Marks_for_Symbols[] = {
+ 1,
+ 0x20d0, 0x20ff,
+}; /* CR_In_Combining_Diacritical_Marks_for_Symbols */
+
+/* 'In_Letterlike_Symbols': Block */
+static const OnigCodePoint CR_In_Letterlike_Symbols[] = {
+ 1,
+ 0x2100, 0x214f,
+}; /* CR_In_Letterlike_Symbols */
+
+/* 'In_Number_Forms': Block */
+static const OnigCodePoint CR_In_Number_Forms[] = {
+ 1,
+ 0x2150, 0x218f,
+}; /* CR_In_Number_Forms */
+
+/* 'In_Arrows': Block */
+static const OnigCodePoint CR_In_Arrows[] = {
+ 1,
+ 0x2190, 0x21ff,
+}; /* CR_In_Arrows */
+
+/* 'In_Mathematical_Operators': Block */
+static const OnigCodePoint CR_In_Mathematical_Operators[] = {
+ 1,
+ 0x2200, 0x22ff,
+}; /* CR_In_Mathematical_Operators */
+
+/* 'In_Miscellaneous_Technical': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Technical[] = {
+ 1,
+ 0x2300, 0x23ff,
+}; /* CR_In_Miscellaneous_Technical */
+
+/* 'In_Control_Pictures': Block */
+static const OnigCodePoint CR_In_Control_Pictures[] = {
+ 1,
+ 0x2400, 0x243f,
+}; /* CR_In_Control_Pictures */
+
+/* 'In_Optical_Character_Recognition': Block */
+static const OnigCodePoint CR_In_Optical_Character_Recognition[] = {
+ 1,
+ 0x2440, 0x245f,
+}; /* CR_In_Optical_Character_Recognition */
+
+/* 'In_Enclosed_Alphanumerics': Block */
+static const OnigCodePoint CR_In_Enclosed_Alphanumerics[] = {
+ 1,
+ 0x2460, 0x24ff,
+}; /* CR_In_Enclosed_Alphanumerics */
+
+/* 'In_Box_Drawing': Block */
+static const OnigCodePoint CR_In_Box_Drawing[] = {
+ 1,
+ 0x2500, 0x257f,
+}; /* CR_In_Box_Drawing */
+
+/* 'In_Block_Elements': Block */
+static const OnigCodePoint CR_In_Block_Elements[] = {
+ 1,
+ 0x2580, 0x259f,
+}; /* CR_In_Block_Elements */
+
+/* 'In_Geometric_Shapes': Block */
+static const OnigCodePoint CR_In_Geometric_Shapes[] = {
+ 1,
+ 0x25a0, 0x25ff,
+}; /* CR_In_Geometric_Shapes */
+
+/* 'In_Miscellaneous_Symbols': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Symbols[] = {
+ 1,
+ 0x2600, 0x26ff,
+}; /* CR_In_Miscellaneous_Symbols */
+
+/* 'In_Dingbats': Block */
+static const OnigCodePoint CR_In_Dingbats[] = {
+ 1,
+ 0x2700, 0x27bf,
+}; /* CR_In_Dingbats */
+
+/* 'In_Miscellaneous_Mathematical_Symbols_A': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Mathematical_Symbols_A[] = {
+ 1,
+ 0x27c0, 0x27ef,
+}; /* CR_In_Miscellaneous_Mathematical_Symbols_A */
+
+/* 'In_Supplemental_Arrows_A': Block */
+static const OnigCodePoint CR_In_Supplemental_Arrows_A[] = {
+ 1,
+ 0x27f0, 0x27ff,
+}; /* CR_In_Supplemental_Arrows_A */
+
+/* 'In_Braille_Patterns': Block */
+#define CR_In_Braille_Patterns CR_Braille
+
+/* 'In_Supplemental_Arrows_B': Block */
+static const OnigCodePoint CR_In_Supplemental_Arrows_B[] = {
+ 1,
+ 0x2900, 0x297f,
+}; /* CR_In_Supplemental_Arrows_B */
+
+/* 'In_Miscellaneous_Mathematical_Symbols_B': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Mathematical_Symbols_B[] = {
+ 1,
+ 0x2980, 0x29ff,
+}; /* CR_In_Miscellaneous_Mathematical_Symbols_B */
+
+/* 'In_Supplemental_Mathematical_Operators': Block */
+static const OnigCodePoint CR_In_Supplemental_Mathematical_Operators[] = {
+ 1,
+ 0x2a00, 0x2aff,
+}; /* CR_In_Supplemental_Mathematical_Operators */
+
+/* 'In_Miscellaneous_Symbols_and_Arrows': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Symbols_and_Arrows[] = {
+ 1,
+ 0x2b00, 0x2bff,
+}; /* CR_In_Miscellaneous_Symbols_and_Arrows */
+
+/* 'In_Glagolitic': Block */
+static const OnigCodePoint CR_In_Glagolitic[] = {
+ 1,
+ 0x2c00, 0x2c5f,
+}; /* CR_In_Glagolitic */
+
+/* 'In_Latin_Extended_C': Block */
+static const OnigCodePoint CR_In_Latin_Extended_C[] = {
+ 1,
+ 0x2c60, 0x2c7f,
+}; /* CR_In_Latin_Extended_C */
+
+/* 'In_Coptic': Block */
+static const OnigCodePoint CR_In_Coptic[] = {
+ 1,
+ 0x2c80, 0x2cff,
+}; /* CR_In_Coptic */
+
+/* 'In_Georgian_Supplement': Block */
+static const OnigCodePoint CR_In_Georgian_Supplement[] = {
+ 1,
+ 0x2d00, 0x2d2f,
+}; /* CR_In_Georgian_Supplement */
+
+/* 'In_Tifinagh': Block */
+static const OnigCodePoint CR_In_Tifinagh[] = {
+ 1,
+ 0x2d30, 0x2d7f,
+}; /* CR_In_Tifinagh */
+
+/* 'In_Ethiopic_Extended': Block */
+static const OnigCodePoint CR_In_Ethiopic_Extended[] = {
+ 1,
+ 0x2d80, 0x2ddf,
+}; /* CR_In_Ethiopic_Extended */
+
+/* 'In_Cyrillic_Extended_A': Block */
+static const OnigCodePoint CR_In_Cyrillic_Extended_A[] = {
+ 1,
+ 0x2de0, 0x2dff,
+}; /* CR_In_Cyrillic_Extended_A */
+
+/* 'In_Supplemental_Punctuation': Block */
+static const OnigCodePoint CR_In_Supplemental_Punctuation[] = {
+ 1,
+ 0x2e00, 0x2e7f,
+}; /* CR_In_Supplemental_Punctuation */
+
+/* 'In_CJK_Radicals_Supplement': Block */
+static const OnigCodePoint CR_In_CJK_Radicals_Supplement[] = {
+ 1,
+ 0x2e80, 0x2eff,
+}; /* CR_In_CJK_Radicals_Supplement */
+
+/* 'In_Kangxi_Radicals': Block */
+static const OnigCodePoint CR_In_Kangxi_Radicals[] = {
+ 1,
+ 0x2f00, 0x2fdf,
+}; /* CR_In_Kangxi_Radicals */
+
+/* 'In_Ideographic_Description_Characters': Block */
+static const OnigCodePoint CR_In_Ideographic_Description_Characters[] = {
+ 1,
+ 0x2ff0, 0x2fff,
+}; /* CR_In_Ideographic_Description_Characters */
+
+/* 'In_CJK_Symbols_and_Punctuation': Block */
+static const OnigCodePoint CR_In_CJK_Symbols_and_Punctuation[] = {
+ 1,
+ 0x3000, 0x303f,
+}; /* CR_In_CJK_Symbols_and_Punctuation */
+
+/* 'In_Hiragana': Block */
+static const OnigCodePoint CR_In_Hiragana[] = {
+ 1,
+ 0x3040, 0x309f,
+}; /* CR_In_Hiragana */
+
+/* 'In_Katakana': Block */
+static const OnigCodePoint CR_In_Katakana[] = {
+ 1,
+ 0x30a0, 0x30ff,
+}; /* CR_In_Katakana */
+
+/* 'In_Bopomofo': Block */
+static const OnigCodePoint CR_In_Bopomofo[] = {
+ 1,
+ 0x3100, 0x312f,
+}; /* CR_In_Bopomofo */
+
+/* 'In_Hangul_Compatibility_Jamo': Block */
+static const OnigCodePoint CR_In_Hangul_Compatibility_Jamo[] = {
+ 1,
+ 0x3130, 0x318f,
+}; /* CR_In_Hangul_Compatibility_Jamo */
+
+/* 'In_Kanbun': Block */
+static const OnigCodePoint CR_In_Kanbun[] = {
+ 1,
+ 0x3190, 0x319f,
+}; /* CR_In_Kanbun */
+
+/* 'In_Bopomofo_Extended': Block */
+static const OnigCodePoint CR_In_Bopomofo_Extended[] = {
+ 1,
+ 0x31a0, 0x31bf,
+}; /* CR_In_Bopomofo_Extended */
+
+/* 'In_CJK_Strokes': Block */
+static const OnigCodePoint CR_In_CJK_Strokes[] = {
+ 1,
+ 0x31c0, 0x31ef,
+}; /* CR_In_CJK_Strokes */
+
+/* 'In_Katakana_Phonetic_Extensions': Block */
+static const OnigCodePoint CR_In_Katakana_Phonetic_Extensions[] = {
+ 1,
+ 0x31f0, 0x31ff,
+}; /* CR_In_Katakana_Phonetic_Extensions */
+
+/* 'In_Enclosed_CJK_Letters_and_Months': Block */
+static const OnigCodePoint CR_In_Enclosed_CJK_Letters_and_Months[] = {
+ 1,
+ 0x3200, 0x32ff,
+}; /* CR_In_Enclosed_CJK_Letters_and_Months */
+
+/* 'In_CJK_Compatibility': Block */
+static const OnigCodePoint CR_In_CJK_Compatibility[] = {
+ 1,
+ 0x3300, 0x33ff,
+}; /* CR_In_CJK_Compatibility */
+
+/* 'In_CJK_Unified_Ideographs_Extension_A': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_A[] = {
+ 1,
+ 0x3400, 0x4dbf,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_A */
+
+/* 'In_Yijing_Hexagram_Symbols': Block */
+static const OnigCodePoint CR_In_Yijing_Hexagram_Symbols[] = {
+ 1,
+ 0x4dc0, 0x4dff,
+}; /* CR_In_Yijing_Hexagram_Symbols */
+
+/* 'In_CJK_Unified_Ideographs': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs[] = {
+ 1,
+ 0x4e00, 0x9fff,
+}; /* CR_In_CJK_Unified_Ideographs */
+
+/* 'In_Yi_Syllables': Block */
+static const OnigCodePoint CR_In_Yi_Syllables[] = {
+ 1,
+ 0xa000, 0xa48f,
+}; /* CR_In_Yi_Syllables */
+
+/* 'In_Yi_Radicals': Block */
+static const OnigCodePoint CR_In_Yi_Radicals[] = {
+ 1,
+ 0xa490, 0xa4cf,
+}; /* CR_In_Yi_Radicals */
+
+/* 'In_Lisu': Block */
+static const OnigCodePoint CR_In_Lisu[] = {
+ 1,
+ 0xa4d0, 0xa4ff,
+}; /* CR_In_Lisu */
+
+/* 'In_Vai': Block */
+static const OnigCodePoint CR_In_Vai[] = {
+ 1,
+ 0xa500, 0xa63f,
+}; /* CR_In_Vai */
+
+/* 'In_Cyrillic_Extended_B': Block */
+static const OnigCodePoint CR_In_Cyrillic_Extended_B[] = {
+ 1,
+ 0xa640, 0xa69f,
+}; /* CR_In_Cyrillic_Extended_B */
+
+/* 'In_Bamum': Block */
+static const OnigCodePoint CR_In_Bamum[] = {
+ 1,
+ 0xa6a0, 0xa6ff,
+}; /* CR_In_Bamum */
+
+/* 'In_Modifier_Tone_Letters': Block */
+static const OnigCodePoint CR_In_Modifier_Tone_Letters[] = {
+ 1,
+ 0xa700, 0xa71f,
+}; /* CR_In_Modifier_Tone_Letters */
+
+/* 'In_Latin_Extended_D': Block */
+static const OnigCodePoint CR_In_Latin_Extended_D[] = {
+ 1,
+ 0xa720, 0xa7ff,
+}; /* CR_In_Latin_Extended_D */
+
+/* 'In_Syloti_Nagri': Block */
+static const OnigCodePoint CR_In_Syloti_Nagri[] = {
+ 1,
+ 0xa800, 0xa82f,
+}; /* CR_In_Syloti_Nagri */
+
+/* 'In_Common_Indic_Number_Forms': Block */
+static const OnigCodePoint CR_In_Common_Indic_Number_Forms[] = {
+ 1,
+ 0xa830, 0xa83f,
+}; /* CR_In_Common_Indic_Number_Forms */
+
+/* 'In_Phags_pa': Block */
+static const OnigCodePoint CR_In_Phags_pa[] = {
+ 1,
+ 0xa840, 0xa87f,
+}; /* CR_In_Phags_pa */
+
+/* 'In_Saurashtra': Block */
+static const OnigCodePoint CR_In_Saurashtra[] = {
+ 1,
+ 0xa880, 0xa8df,
+}; /* CR_In_Saurashtra */
+
+/* 'In_Devanagari_Extended': Block */
+static const OnigCodePoint CR_In_Devanagari_Extended[] = {
+ 1,
+ 0xa8e0, 0xa8ff,
+}; /* CR_In_Devanagari_Extended */
+
+/* 'In_Kayah_Li': Block */
+static const OnigCodePoint CR_In_Kayah_Li[] = {
+ 1,
+ 0xa900, 0xa92f,
+}; /* CR_In_Kayah_Li */
+
+/* 'In_Rejang': Block */
+static const OnigCodePoint CR_In_Rejang[] = {
+ 1,
+ 0xa930, 0xa95f,
+}; /* CR_In_Rejang */
+
+/* 'In_Hangul_Jamo_Extended_A': Block */
+static const OnigCodePoint CR_In_Hangul_Jamo_Extended_A[] = {
+ 1,
+ 0xa960, 0xa97f,
+}; /* CR_In_Hangul_Jamo_Extended_A */
+
+/* 'In_Javanese': Block */
+static const OnigCodePoint CR_In_Javanese[] = {
+ 1,
+ 0xa980, 0xa9df,
+}; /* CR_In_Javanese */
+
+/* 'In_Myanmar_Extended_B': Block */
+static const OnigCodePoint CR_In_Myanmar_Extended_B[] = {
+ 1,
+ 0xa9e0, 0xa9ff,
+}; /* CR_In_Myanmar_Extended_B */
+
+/* 'In_Cham': Block */
+static const OnigCodePoint CR_In_Cham[] = {
+ 1,
+ 0xaa00, 0xaa5f,
+}; /* CR_In_Cham */
+
+/* 'In_Myanmar_Extended_A': Block */
+static const OnigCodePoint CR_In_Myanmar_Extended_A[] = {
+ 1,
+ 0xaa60, 0xaa7f,
+}; /* CR_In_Myanmar_Extended_A */
+
+/* 'In_Tai_Viet': Block */
+static const OnigCodePoint CR_In_Tai_Viet[] = {
+ 1,
+ 0xaa80, 0xaadf,
+}; /* CR_In_Tai_Viet */
+
+/* 'In_Meetei_Mayek_Extensions': Block */
+static const OnigCodePoint CR_In_Meetei_Mayek_Extensions[] = {
+ 1,
+ 0xaae0, 0xaaff,
+}; /* CR_In_Meetei_Mayek_Extensions */
+
+/* 'In_Ethiopic_Extended_A': Block */
+static const OnigCodePoint CR_In_Ethiopic_Extended_A[] = {
+ 1,
+ 0xab00, 0xab2f,
+}; /* CR_In_Ethiopic_Extended_A */
+
+/* 'In_Latin_Extended_E': Block */
+static const OnigCodePoint CR_In_Latin_Extended_E[] = {
+ 1,
+ 0xab30, 0xab6f,
+}; /* CR_In_Latin_Extended_E */
+
+/* 'In_Cherokee_Supplement': Block */
+static const OnigCodePoint CR_In_Cherokee_Supplement[] = {
+ 1,
+ 0xab70, 0xabbf,
+}; /* CR_In_Cherokee_Supplement */
+
+/* 'In_Meetei_Mayek': Block */
+static const OnigCodePoint CR_In_Meetei_Mayek[] = {
+ 1,
+ 0xabc0, 0xabff,
+}; /* CR_In_Meetei_Mayek */
+
+/* 'In_Hangul_Syllables': Block */
+static const OnigCodePoint CR_In_Hangul_Syllables[] = {
+ 1,
+ 0xac00, 0xd7af,
+}; /* CR_In_Hangul_Syllables */
+
+/* 'In_Hangul_Jamo_Extended_B': Block */
+static const OnigCodePoint CR_In_Hangul_Jamo_Extended_B[] = {
+ 1,
+ 0xd7b0, 0xd7ff,
+}; /* CR_In_Hangul_Jamo_Extended_B */
+
+/* 'In_High_Surrogates': Block */
+static const OnigCodePoint CR_In_High_Surrogates[] = {
+ 1,
+ 0xd800, 0xdb7f,
+}; /* CR_In_High_Surrogates */
+
+/* 'In_High_Private_Use_Surrogates': Block */
+static const OnigCodePoint CR_In_High_Private_Use_Surrogates[] = {
+ 1,
+ 0xdb80, 0xdbff,
+}; /* CR_In_High_Private_Use_Surrogates */
+
+/* 'In_Low_Surrogates': Block */
+static const OnigCodePoint CR_In_Low_Surrogates[] = {
+ 1,
+ 0xdc00, 0xdfff,
+}; /* CR_In_Low_Surrogates */
+
+/* 'In_Private_Use_Area': Block */
+static const OnigCodePoint CR_In_Private_Use_Area[] = {
+ 1,
+ 0xe000, 0xf8ff,
+}; /* CR_In_Private_Use_Area */
+
+/* 'In_CJK_Compatibility_Ideographs': Block */
+static const OnigCodePoint CR_In_CJK_Compatibility_Ideographs[] = {
+ 1,
+ 0xf900, 0xfaff,
+}; /* CR_In_CJK_Compatibility_Ideographs */
+
+/* 'In_Alphabetic_Presentation_Forms': Block */
+static const OnigCodePoint CR_In_Alphabetic_Presentation_Forms[] = {
+ 1,
+ 0xfb00, 0xfb4f,
+}; /* CR_In_Alphabetic_Presentation_Forms */
+
+/* 'In_Arabic_Presentation_Forms_A': Block */
+static const OnigCodePoint CR_In_Arabic_Presentation_Forms_A[] = {
+ 1,
+ 0xfb50, 0xfdff,
+}; /* CR_In_Arabic_Presentation_Forms_A */
+
+/* 'In_Variation_Selectors': Block */
+static const OnigCodePoint CR_In_Variation_Selectors[] = {
+ 1,
+ 0xfe00, 0xfe0f,
+}; /* CR_In_Variation_Selectors */
+
+/* 'In_Vertical_Forms': Block */
+static const OnigCodePoint CR_In_Vertical_Forms[] = {
+ 1,
+ 0xfe10, 0xfe1f,
+}; /* CR_In_Vertical_Forms */
+
+/* 'In_Combining_Half_Marks': Block */
+static const OnigCodePoint CR_In_Combining_Half_Marks[] = {
+ 1,
+ 0xfe20, 0xfe2f,
+}; /* CR_In_Combining_Half_Marks */
+
+/* 'In_CJK_Compatibility_Forms': Block */
+static const OnigCodePoint CR_In_CJK_Compatibility_Forms[] = {
+ 1,
+ 0xfe30, 0xfe4f,
+}; /* CR_In_CJK_Compatibility_Forms */
+
+/* 'In_Small_Form_Variants': Block */
+static const OnigCodePoint CR_In_Small_Form_Variants[] = {
+ 1,
+ 0xfe50, 0xfe6f,
+}; /* CR_In_Small_Form_Variants */
+
+/* 'In_Arabic_Presentation_Forms_B': Block */
+static const OnigCodePoint CR_In_Arabic_Presentation_Forms_B[] = {
+ 1,
+ 0xfe70, 0xfeff,
+}; /* CR_In_Arabic_Presentation_Forms_B */
+
+/* 'In_Halfwidth_and_Fullwidth_Forms': Block */
+static const OnigCodePoint CR_In_Halfwidth_and_Fullwidth_Forms[] = {
+ 1,
+ 0xff00, 0xffef,
+}; /* CR_In_Halfwidth_and_Fullwidth_Forms */
+
+/* 'In_Specials': Block */
+static const OnigCodePoint CR_In_Specials[] = {
+ 1,
+ 0xfff0, 0xffff,
+}; /* CR_In_Specials */
+
+/* 'In_Linear_B_Syllabary': Block */
+static const OnigCodePoint CR_In_Linear_B_Syllabary[] = {
+ 1,
+ 0x10000, 0x1007f,
+}; /* CR_In_Linear_B_Syllabary */
+
+/* 'In_Linear_B_Ideograms': Block */
+static const OnigCodePoint CR_In_Linear_B_Ideograms[] = {
+ 1,
+ 0x10080, 0x100ff,
+}; /* CR_In_Linear_B_Ideograms */
+
+/* 'In_Aegean_Numbers': Block */
+static const OnigCodePoint CR_In_Aegean_Numbers[] = {
+ 1,
+ 0x10100, 0x1013f,
+}; /* CR_In_Aegean_Numbers */
+
+/* 'In_Ancient_Greek_Numbers': Block */
+static const OnigCodePoint CR_In_Ancient_Greek_Numbers[] = {
+ 1,
+ 0x10140, 0x1018f,
+}; /* CR_In_Ancient_Greek_Numbers */
+
+/* 'In_Ancient_Symbols': Block */
+static const OnigCodePoint CR_In_Ancient_Symbols[] = {
+ 1,
+ 0x10190, 0x101cf,
+}; /* CR_In_Ancient_Symbols */
+
+/* 'In_Phaistos_Disc': Block */
+static const OnigCodePoint CR_In_Phaistos_Disc[] = {
+ 1,
+ 0x101d0, 0x101ff,
+}; /* CR_In_Phaistos_Disc */
+
+/* 'In_Lycian': Block */
+static const OnigCodePoint CR_In_Lycian[] = {
+ 1,
+ 0x10280, 0x1029f,
+}; /* CR_In_Lycian */
+
+/* 'In_Carian': Block */
+static const OnigCodePoint CR_In_Carian[] = {
+ 1,
+ 0x102a0, 0x102df,
+}; /* CR_In_Carian */
+
+/* 'In_Coptic_Epact_Numbers': Block */
+static const OnigCodePoint CR_In_Coptic_Epact_Numbers[] = {
+ 1,
+ 0x102e0, 0x102ff,
+}; /* CR_In_Coptic_Epact_Numbers */
+
+/* 'In_Old_Italic': Block */
+static const OnigCodePoint CR_In_Old_Italic[] = {
+ 1,
+ 0x10300, 0x1032f,
+}; /* CR_In_Old_Italic */
+
+/* 'In_Gothic': Block */
+static const OnigCodePoint CR_In_Gothic[] = {
+ 1,
+ 0x10330, 0x1034f,
+}; /* CR_In_Gothic */
+
+/* 'In_Old_Permic': Block */
+static const OnigCodePoint CR_In_Old_Permic[] = {
+ 1,
+ 0x10350, 0x1037f,
+}; /* CR_In_Old_Permic */
+
+/* 'In_Ugaritic': Block */
+static const OnigCodePoint CR_In_Ugaritic[] = {
+ 1,
+ 0x10380, 0x1039f,
+}; /* CR_In_Ugaritic */
+
+/* 'In_Old_Persian': Block */
+static const OnigCodePoint CR_In_Old_Persian[] = {
+ 1,
+ 0x103a0, 0x103df,
+}; /* CR_In_Old_Persian */
+
+/* 'In_Deseret': Block */
+#define CR_In_Deseret CR_Deseret
+
+/* 'In_Shavian': Block */
+#define CR_In_Shavian CR_Shavian
+
+/* 'In_Osmanya': Block */
+static const OnigCodePoint CR_In_Osmanya[] = {
+ 1,
+ 0x10480, 0x104af,
+}; /* CR_In_Osmanya */
+
+/* 'In_Osage': Block */
+static const OnigCodePoint CR_In_Osage[] = {
+ 1,
+ 0x104b0, 0x104ff,
+}; /* CR_In_Osage */
+
+/* 'In_Elbasan': Block */
+static const OnigCodePoint CR_In_Elbasan[] = {
+ 1,
+ 0x10500, 0x1052f,
+}; /* CR_In_Elbasan */
+
+/* 'In_Caucasian_Albanian': Block */
+static const OnigCodePoint CR_In_Caucasian_Albanian[] = {
+ 1,
+ 0x10530, 0x1056f,
+}; /* CR_In_Caucasian_Albanian */
+
+/* 'In_Vithkuqi': Block */
+static const OnigCodePoint CR_In_Vithkuqi[] = {
+ 1,
+ 0x10570, 0x105bf,
+}; /* CR_In_Vithkuqi */
+
+/* 'In_Linear_A': Block */
+static const OnigCodePoint CR_In_Linear_A[] = {
+ 1,
+ 0x10600, 0x1077f,
+}; /* CR_In_Linear_A */
+
+/* 'In_Latin_Extended_F': Block */
+static const OnigCodePoint CR_In_Latin_Extended_F[] = {
+ 1,
+ 0x10780, 0x107bf,
+}; /* CR_In_Latin_Extended_F */
+
+/* 'In_Cypriot_Syllabary': Block */
+static const OnigCodePoint CR_In_Cypriot_Syllabary[] = {
+ 1,
+ 0x10800, 0x1083f,
+}; /* CR_In_Cypriot_Syllabary */
+
+/* 'In_Imperial_Aramaic': Block */
+static const OnigCodePoint CR_In_Imperial_Aramaic[] = {
+ 1,
+ 0x10840, 0x1085f,
+}; /* CR_In_Imperial_Aramaic */
+
+/* 'In_Palmyrene': Block */
+#define CR_In_Palmyrene CR_Palmyrene
+
+/* 'In_Nabataean': Block */
+static const OnigCodePoint CR_In_Nabataean[] = {
+ 1,
+ 0x10880, 0x108af,
+}; /* CR_In_Nabataean */
+
+/* 'In_Hatran': Block */
+static const OnigCodePoint CR_In_Hatran[] = {
+ 1,
+ 0x108e0, 0x108ff,
+}; /* CR_In_Hatran */
+
+/* 'In_Phoenician': Block */
+static const OnigCodePoint CR_In_Phoenician[] = {
+ 1,
+ 0x10900, 0x1091f,
+}; /* CR_In_Phoenician */
+
+/* 'In_Lydian': Block */
+static const OnigCodePoint CR_In_Lydian[] = {
+ 1,
+ 0x10920, 0x1093f,
+}; /* CR_In_Lydian */
+
+/* 'In_Meroitic_Hieroglyphs': Block */
+#define CR_In_Meroitic_Hieroglyphs CR_Meroitic_Hieroglyphs
+
+/* 'In_Meroitic_Cursive': Block */
+static const OnigCodePoint CR_In_Meroitic_Cursive[] = {
+ 1,
+ 0x109a0, 0x109ff,
+}; /* CR_In_Meroitic_Cursive */
+
+/* 'In_Kharoshthi': Block */
+static const OnigCodePoint CR_In_Kharoshthi[] = {
+ 1,
+ 0x10a00, 0x10a5f,
+}; /* CR_In_Kharoshthi */
+
+/* 'In_Old_South_Arabian': Block */
+#define CR_In_Old_South_Arabian CR_Old_South_Arabian
+
+/* 'In_Old_North_Arabian': Block */
+#define CR_In_Old_North_Arabian CR_Old_North_Arabian
+
+/* 'In_Manichaean': Block */
+static const OnigCodePoint CR_In_Manichaean[] = {
+ 1,
+ 0x10ac0, 0x10aff,
+}; /* CR_In_Manichaean */
+
+/* 'In_Avestan': Block */
+static const OnigCodePoint CR_In_Avestan[] = {
+ 1,
+ 0x10b00, 0x10b3f,
+}; /* CR_In_Avestan */
+
+/* 'In_Inscriptional_Parthian': Block */
+static const OnigCodePoint CR_In_Inscriptional_Parthian[] = {
+ 1,
+ 0x10b40, 0x10b5f,
+}; /* CR_In_Inscriptional_Parthian */
+
+/* 'In_Inscriptional_Pahlavi': Block */
+static const OnigCodePoint CR_In_Inscriptional_Pahlavi[] = {
+ 1,
+ 0x10b60, 0x10b7f,
+}; /* CR_In_Inscriptional_Pahlavi */
+
+/* 'In_Psalter_Pahlavi': Block */
+static const OnigCodePoint CR_In_Psalter_Pahlavi[] = {
+ 1,
+ 0x10b80, 0x10baf,
+}; /* CR_In_Psalter_Pahlavi */
+
+/* 'In_Old_Turkic': Block */
+static const OnigCodePoint CR_In_Old_Turkic[] = {
+ 1,
+ 0x10c00, 0x10c4f,
+}; /* CR_In_Old_Turkic */
+
+/* 'In_Old_Hungarian': Block */
+static const OnigCodePoint CR_In_Old_Hungarian[] = {
+ 1,
+ 0x10c80, 0x10cff,
+}; /* CR_In_Old_Hungarian */
+
+/* 'In_Hanifi_Rohingya': Block */
+static const OnigCodePoint CR_In_Hanifi_Rohingya[] = {
+ 1,
+ 0x10d00, 0x10d3f,
+}; /* CR_In_Hanifi_Rohingya */
+
+/* 'In_Rumi_Numeral_Symbols': Block */
+static const OnigCodePoint CR_In_Rumi_Numeral_Symbols[] = {
+ 1,
+ 0x10e60, 0x10e7f,
+}; /* CR_In_Rumi_Numeral_Symbols */
+
+/* 'In_Yezidi': Block */
+static const OnigCodePoint CR_In_Yezidi[] = {
+ 1,
+ 0x10e80, 0x10ebf,
+}; /* CR_In_Yezidi */
+
+/* 'In_Arabic_Extended_C': Block */
+static const OnigCodePoint CR_In_Arabic_Extended_C[] = {
+ 1,
+ 0x10ec0, 0x10eff,
+}; /* CR_In_Arabic_Extended_C */
+
+/* 'In_Old_Sogdian': Block */
+static const OnigCodePoint CR_In_Old_Sogdian[] = {
+ 1,
+ 0x10f00, 0x10f2f,
+}; /* CR_In_Old_Sogdian */
+
+/* 'In_Sogdian': Block */
+static const OnigCodePoint CR_In_Sogdian[] = {
+ 1,
+ 0x10f30, 0x10f6f,
+}; /* CR_In_Sogdian */
+
+/* 'In_Old_Uyghur': Block */
+static const OnigCodePoint CR_In_Old_Uyghur[] = {
+ 1,
+ 0x10f70, 0x10faf,
+}; /* CR_In_Old_Uyghur */
+
+/* 'In_Chorasmian': Block */
+static const OnigCodePoint CR_In_Chorasmian[] = {
+ 1,
+ 0x10fb0, 0x10fdf,
+}; /* CR_In_Chorasmian */
+
+/* 'In_Elymaic': Block */
+static const OnigCodePoint CR_In_Elymaic[] = {
+ 1,
+ 0x10fe0, 0x10fff,
+}; /* CR_In_Elymaic */
+
+/* 'In_Brahmi': Block */
+static const OnigCodePoint CR_In_Brahmi[] = {
+ 1,
+ 0x11000, 0x1107f,
+}; /* CR_In_Brahmi */
+
+/* 'In_Kaithi': Block */
+static const OnigCodePoint CR_In_Kaithi[] = {
+ 1,
+ 0x11080, 0x110cf,
+}; /* CR_In_Kaithi */
+
+/* 'In_Sora_Sompeng': Block */
+static const OnigCodePoint CR_In_Sora_Sompeng[] = {
+ 1,
+ 0x110d0, 0x110ff,
+}; /* CR_In_Sora_Sompeng */
+
+/* 'In_Chakma': Block */
+static const OnigCodePoint CR_In_Chakma[] = {
+ 1,
+ 0x11100, 0x1114f,
+}; /* CR_In_Chakma */
+
+/* 'In_Mahajani': Block */
+static const OnigCodePoint CR_In_Mahajani[] = {
+ 1,
+ 0x11150, 0x1117f,
+}; /* CR_In_Mahajani */
+
+/* 'In_Sharada': Block */
+#define CR_In_Sharada CR_Sharada
+
+/* 'In_Sinhala_Archaic_Numbers': Block */
+static const OnigCodePoint CR_In_Sinhala_Archaic_Numbers[] = {
+ 1,
+ 0x111e0, 0x111ff,
+}; /* CR_In_Sinhala_Archaic_Numbers */
+
+/* 'In_Khojki': Block */
+static const OnigCodePoint CR_In_Khojki[] = {
+ 1,
+ 0x11200, 0x1124f,
+}; /* CR_In_Khojki */
+
+/* 'In_Multani': Block */
+static const OnigCodePoint CR_In_Multani[] = {
+ 1,
+ 0x11280, 0x112af,
+}; /* CR_In_Multani */
+
+/* 'In_Khudawadi': Block */
+static const OnigCodePoint CR_In_Khudawadi[] = {
+ 1,
+ 0x112b0, 0x112ff,
+}; /* CR_In_Khudawadi */
+
+/* 'In_Grantha': Block */
+static const OnigCodePoint CR_In_Grantha[] = {
+ 1,
+ 0x11300, 0x1137f,
+}; /* CR_In_Grantha */
+
+/* 'In_Newa': Block */
+static const OnigCodePoint CR_In_Newa[] = {
+ 1,
+ 0x11400, 0x1147f,
+}; /* CR_In_Newa */
+
+/* 'In_Tirhuta': Block */
+static const OnigCodePoint CR_In_Tirhuta[] = {
+ 1,
+ 0x11480, 0x114df,
+}; /* CR_In_Tirhuta */
+
+/* 'In_Siddham': Block */
+static const OnigCodePoint CR_In_Siddham[] = {
+ 1,
+ 0x11580, 0x115ff,
+}; /* CR_In_Siddham */
+
+/* 'In_Modi': Block */
+static const OnigCodePoint CR_In_Modi[] = {
+ 1,
+ 0x11600, 0x1165f,
+}; /* CR_In_Modi */
+
+/* 'In_Mongolian_Supplement': Block */
+static const OnigCodePoint CR_In_Mongolian_Supplement[] = {
+ 1,
+ 0x11660, 0x1167f,
+}; /* CR_In_Mongolian_Supplement */
+
+/* 'In_Takri': Block */
+static const OnigCodePoint CR_In_Takri[] = {
+ 1,
+ 0x11680, 0x116cf,
+}; /* CR_In_Takri */
+
+/* 'In_Ahom': Block */
+static const OnigCodePoint CR_In_Ahom[] = {
+ 1,
+ 0x11700, 0x1174f,
+}; /* CR_In_Ahom */
+
+/* 'In_Dogra': Block */
+static const OnigCodePoint CR_In_Dogra[] = {
+ 1,
+ 0x11800, 0x1184f,
+}; /* CR_In_Dogra */
+
+/* 'In_Warang_Citi': Block */
+static const OnigCodePoint CR_In_Warang_Citi[] = {
+ 1,
+ 0x118a0, 0x118ff,
+}; /* CR_In_Warang_Citi */
+
+/* 'In_Dives_Akuru': Block */
+static const OnigCodePoint CR_In_Dives_Akuru[] = {
+ 1,
+ 0x11900, 0x1195f,
+}; /* CR_In_Dives_Akuru */
+
+/* 'In_Nandinagari': Block */
+static const OnigCodePoint CR_In_Nandinagari[] = {
+ 1,
+ 0x119a0, 0x119ff,
+}; /* CR_In_Nandinagari */
+
+/* 'In_Zanabazar_Square': Block */
+static const OnigCodePoint CR_In_Zanabazar_Square[] = {
+ 1,
+ 0x11a00, 0x11a4f,
+}; /* CR_In_Zanabazar_Square */
+
+/* 'In_Soyombo': Block */
+static const OnigCodePoint CR_In_Soyombo[] = {
+ 1,
+ 0x11a50, 0x11aaf,
+}; /* CR_In_Soyombo */
+
+/* 'In_Unified_Canadian_Aboriginal_Syllabics_Extended_A': Block */
+static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A[] = {
+ 1,
+ 0x11ab0, 0x11abf,
+}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A */
+
+/* 'In_Pau_Cin_Hau': Block */
+static const OnigCodePoint CR_In_Pau_Cin_Hau[] = {
+ 1,
+ 0x11ac0, 0x11aff,
+}; /* CR_In_Pau_Cin_Hau */
+
+/* 'In_Devanagari_Extended_A': Block */
+static const OnigCodePoint CR_In_Devanagari_Extended_A[] = {
+ 1,
+ 0x11b00, 0x11b5f,
+}; /* CR_In_Devanagari_Extended_A */
+
+/* 'In_Bhaiksuki': Block */
+static const OnigCodePoint CR_In_Bhaiksuki[] = {
+ 1,
+ 0x11c00, 0x11c6f,
+}; /* CR_In_Bhaiksuki */
+
+/* 'In_Marchen': Block */
+static const OnigCodePoint CR_In_Marchen[] = {
+ 1,
+ 0x11c70, 0x11cbf,
+}; /* CR_In_Marchen */
+
+/* 'In_Masaram_Gondi': Block */
+static const OnigCodePoint CR_In_Masaram_Gondi[] = {
+ 1,
+ 0x11d00, 0x11d5f,
+}; /* CR_In_Masaram_Gondi */
+
+/* 'In_Gunjala_Gondi': Block */
+static const OnigCodePoint CR_In_Gunjala_Gondi[] = {
+ 1,
+ 0x11d60, 0x11daf,
+}; /* CR_In_Gunjala_Gondi */
+
+/* 'In_Makasar': Block */
+static const OnigCodePoint CR_In_Makasar[] = {
+ 1,
+ 0x11ee0, 0x11eff,
+}; /* CR_In_Makasar */
+
+/* 'In_Kawi': Block */
+static const OnigCodePoint CR_In_Kawi[] = {
+ 1,
+ 0x11f00, 0x11f5f,
+}; /* CR_In_Kawi */
+
+/* 'In_Lisu_Supplement': Block */
+static const OnigCodePoint CR_In_Lisu_Supplement[] = {
+ 1,
+ 0x11fb0, 0x11fbf,
+}; /* CR_In_Lisu_Supplement */
+
+/* 'In_Tamil_Supplement': Block */
+static const OnigCodePoint CR_In_Tamil_Supplement[] = {
+ 1,
+ 0x11fc0, 0x11fff,
+}; /* CR_In_Tamil_Supplement */
+
+/* 'In_Cuneiform': Block */
+static const OnigCodePoint CR_In_Cuneiform[] = {
+ 1,
+ 0x12000, 0x123ff,
+}; /* CR_In_Cuneiform */
+
+/* 'In_Cuneiform_Numbers_and_Punctuation': Block */
+static const OnigCodePoint CR_In_Cuneiform_Numbers_and_Punctuation[] = {
+ 1,
+ 0x12400, 0x1247f,
+}; /* CR_In_Cuneiform_Numbers_and_Punctuation */
+
+/* 'In_Early_Dynastic_Cuneiform': Block */
+static const OnigCodePoint CR_In_Early_Dynastic_Cuneiform[] = {
+ 1,
+ 0x12480, 0x1254f,
+}; /* CR_In_Early_Dynastic_Cuneiform */
+
+/* 'In_Cypro_Minoan': Block */
+static const OnigCodePoint CR_In_Cypro_Minoan[] = {
+ 1,
+ 0x12f90, 0x12fff,
+}; /* CR_In_Cypro_Minoan */
+
+/* 'In_Egyptian_Hieroglyphs': Block */
+static const OnigCodePoint CR_In_Egyptian_Hieroglyphs[] = {
+ 1,
+ 0x13000, 0x1342f,
+}; /* CR_In_Egyptian_Hieroglyphs */
+
+/* 'In_Egyptian_Hieroglyph_Format_Controls': Block */
+static const OnigCodePoint CR_In_Egyptian_Hieroglyph_Format_Controls[] = {
+ 1,
+ 0x13430, 0x1345f,
+}; /* CR_In_Egyptian_Hieroglyph_Format_Controls */
+
+/* 'In_Anatolian_Hieroglyphs': Block */
+static const OnigCodePoint CR_In_Anatolian_Hieroglyphs[] = {
+ 1,
+ 0x14400, 0x1467f,
+}; /* CR_In_Anatolian_Hieroglyphs */
+
+/* 'In_Bamum_Supplement': Block */
+static const OnigCodePoint CR_In_Bamum_Supplement[] = {
+ 1,
+ 0x16800, 0x16a3f,
+}; /* CR_In_Bamum_Supplement */
+
+/* 'In_Mro': Block */
+static const OnigCodePoint CR_In_Mro[] = {
+ 1,
+ 0x16a40, 0x16a6f,
+}; /* CR_In_Mro */
+
+/* 'In_Tangsa': Block */
+static const OnigCodePoint CR_In_Tangsa[] = {
+ 1,
+ 0x16a70, 0x16acf,
+}; /* CR_In_Tangsa */
+
+/* 'In_Bassa_Vah': Block */
+static const OnigCodePoint CR_In_Bassa_Vah[] = {
+ 1,
+ 0x16ad0, 0x16aff,
+}; /* CR_In_Bassa_Vah */
+
+/* 'In_Pahawh_Hmong': Block */
+static const OnigCodePoint CR_In_Pahawh_Hmong[] = {
+ 1,
+ 0x16b00, 0x16b8f,
+}; /* CR_In_Pahawh_Hmong */
+
+/* 'In_Medefaidrin': Block */
+static const OnigCodePoint CR_In_Medefaidrin[] = {
+ 1,
+ 0x16e40, 0x16e9f,
+}; /* CR_In_Medefaidrin */
+
+/* 'In_Miao': Block */
+static const OnigCodePoint CR_In_Miao[] = {
+ 1,
+ 0x16f00, 0x16f9f,
+}; /* CR_In_Miao */
+
+/* 'In_Ideographic_Symbols_and_Punctuation': Block */
+static const OnigCodePoint CR_In_Ideographic_Symbols_and_Punctuation[] = {
+ 1,
+ 0x16fe0, 0x16fff,
+}; /* CR_In_Ideographic_Symbols_and_Punctuation */
+
+/* 'In_Tangut': Block */
+static const OnigCodePoint CR_In_Tangut[] = {
+ 1,
+ 0x17000, 0x187ff,
+}; /* CR_In_Tangut */
+
+/* 'In_Tangut_Components': Block */
+static const OnigCodePoint CR_In_Tangut_Components[] = {
+ 1,
+ 0x18800, 0x18aff,
+}; /* CR_In_Tangut_Components */
+
+/* 'In_Khitan_Small_Script': Block */
+static const OnigCodePoint CR_In_Khitan_Small_Script[] = {
+ 1,
+ 0x18b00, 0x18cff,
+}; /* CR_In_Khitan_Small_Script */
+
+/* 'In_Tangut_Supplement': Block */
+static const OnigCodePoint CR_In_Tangut_Supplement[] = {
+ 1,
+ 0x18d00, 0x18d7f,
+}; /* CR_In_Tangut_Supplement */
+
+/* 'In_Kana_Extended_B': Block */
+static const OnigCodePoint CR_In_Kana_Extended_B[] = {
+ 1,
+ 0x1aff0, 0x1afff,
+}; /* CR_In_Kana_Extended_B */
+
+/* 'In_Kana_Supplement': Block */
+static const OnigCodePoint CR_In_Kana_Supplement[] = {
+ 1,
+ 0x1b000, 0x1b0ff,
+}; /* CR_In_Kana_Supplement */
+
+/* 'In_Kana_Extended_A': Block */
+static const OnigCodePoint CR_In_Kana_Extended_A[] = {
+ 1,
+ 0x1b100, 0x1b12f,
+}; /* CR_In_Kana_Extended_A */
+
+/* 'In_Small_Kana_Extension': Block */
+static const OnigCodePoint CR_In_Small_Kana_Extension[] = {
+ 1,
+ 0x1b130, 0x1b16f,
+}; /* CR_In_Small_Kana_Extension */
+
+/* 'In_Nushu': Block */
+static const OnigCodePoint CR_In_Nushu[] = {
+ 1,
+ 0x1b170, 0x1b2ff,
+}; /* CR_In_Nushu */
+
+/* 'In_Duployan': Block */
+static const OnigCodePoint CR_In_Duployan[] = {
+ 1,
+ 0x1bc00, 0x1bc9f,
+}; /* CR_In_Duployan */
+
+/* 'In_Shorthand_Format_Controls': Block */
+static const OnigCodePoint CR_In_Shorthand_Format_Controls[] = {
+ 1,
+ 0x1bca0, 0x1bcaf,
+}; /* CR_In_Shorthand_Format_Controls */
+
+/* 'In_Znamenny_Musical_Notation': Block */
+static const OnigCodePoint CR_In_Znamenny_Musical_Notation[] = {
+ 1,
+ 0x1cf00, 0x1cfcf,
+}; /* CR_In_Znamenny_Musical_Notation */
+
+/* 'In_Byzantine_Musical_Symbols': Block */
+static const OnigCodePoint CR_In_Byzantine_Musical_Symbols[] = {
+ 1,
+ 0x1d000, 0x1d0ff,
+}; /* CR_In_Byzantine_Musical_Symbols */
+
+/* 'In_Musical_Symbols': Block */
+static const OnigCodePoint CR_In_Musical_Symbols[] = {
+ 1,
+ 0x1d100, 0x1d1ff,
+}; /* CR_In_Musical_Symbols */
+
+/* 'In_Ancient_Greek_Musical_Notation': Block */
+static const OnigCodePoint CR_In_Ancient_Greek_Musical_Notation[] = {
+ 1,
+ 0x1d200, 0x1d24f,
+}; /* CR_In_Ancient_Greek_Musical_Notation */
+
+/* 'In_Kaktovik_Numerals': Block */
+static const OnigCodePoint CR_In_Kaktovik_Numerals[] = {
+ 1,
+ 0x1d2c0, 0x1d2df,
+}; /* CR_In_Kaktovik_Numerals */
+
+/* 'In_Mayan_Numerals': Block */
+static const OnigCodePoint CR_In_Mayan_Numerals[] = {
+ 1,
+ 0x1d2e0, 0x1d2ff,
+}; /* CR_In_Mayan_Numerals */
+
+/* 'In_Tai_Xuan_Jing_Symbols': Block */
+static const OnigCodePoint CR_In_Tai_Xuan_Jing_Symbols[] = {
+ 1,
+ 0x1d300, 0x1d35f,
+}; /* CR_In_Tai_Xuan_Jing_Symbols */
+
+/* 'In_Counting_Rod_Numerals': Block */
+static const OnigCodePoint CR_In_Counting_Rod_Numerals[] = {
+ 1,
+ 0x1d360, 0x1d37f,
+}; /* CR_In_Counting_Rod_Numerals */
+
+/* 'In_Mathematical_Alphanumeric_Symbols': Block */
+static const OnigCodePoint CR_In_Mathematical_Alphanumeric_Symbols[] = {
+ 1,
+ 0x1d400, 0x1d7ff,
+}; /* CR_In_Mathematical_Alphanumeric_Symbols */
+
+/* 'In_Sutton_SignWriting': Block */
+static const OnigCodePoint CR_In_Sutton_SignWriting[] = {
+ 1,
+ 0x1d800, 0x1daaf,
+}; /* CR_In_Sutton_SignWriting */
+
+/* 'In_Latin_Extended_G': Block */
+static const OnigCodePoint CR_In_Latin_Extended_G[] = {
+ 1,
+ 0x1df00, 0x1dfff,
+}; /* CR_In_Latin_Extended_G */
+
+/* 'In_Glagolitic_Supplement': Block */
+static const OnigCodePoint CR_In_Glagolitic_Supplement[] = {
+ 1,
+ 0x1e000, 0x1e02f,
+}; /* CR_In_Glagolitic_Supplement */
+
+/* 'In_Cyrillic_Extended_D': Block */
+static const OnigCodePoint CR_In_Cyrillic_Extended_D[] = {
+ 1,
+ 0x1e030, 0x1e08f,
+}; /* CR_In_Cyrillic_Extended_D */
+
+/* 'In_Nyiakeng_Puachue_Hmong': Block */
+static const OnigCodePoint CR_In_Nyiakeng_Puachue_Hmong[] = {
+ 1,
+ 0x1e100, 0x1e14f,
+}; /* CR_In_Nyiakeng_Puachue_Hmong */
+
+/* 'In_Toto': Block */
+static const OnigCodePoint CR_In_Toto[] = {
+ 1,
+ 0x1e290, 0x1e2bf,
+}; /* CR_In_Toto */
+
+/* 'In_Wancho': Block */
+static const OnigCodePoint CR_In_Wancho[] = {
+ 1,
+ 0x1e2c0, 0x1e2ff,
+}; /* CR_In_Wancho */
+
+/* 'In_Nag_Mundari': Block */
+static const OnigCodePoint CR_In_Nag_Mundari[] = {
+ 1,
+ 0x1e4d0, 0x1e4ff,
+}; /* CR_In_Nag_Mundari */
+
+/* 'In_Ethiopic_Extended_B': Block */
+static const OnigCodePoint CR_In_Ethiopic_Extended_B[] = {
+ 1,
+ 0x1e7e0, 0x1e7ff,
+}; /* CR_In_Ethiopic_Extended_B */
+
+/* 'In_Mende_Kikakui': Block */
+static const OnigCodePoint CR_In_Mende_Kikakui[] = {
+ 1,
+ 0x1e800, 0x1e8df,
+}; /* CR_In_Mende_Kikakui */
+
+/* 'In_Adlam': Block */
+static const OnigCodePoint CR_In_Adlam[] = {
+ 1,
+ 0x1e900, 0x1e95f,
+}; /* CR_In_Adlam */
+
+/* 'In_Indic_Siyaq_Numbers': Block */
+static const OnigCodePoint CR_In_Indic_Siyaq_Numbers[] = {
+ 1,
+ 0x1ec70, 0x1ecbf,
+}; /* CR_In_Indic_Siyaq_Numbers */
+
+/* 'In_Ottoman_Siyaq_Numbers': Block */
+static const OnigCodePoint CR_In_Ottoman_Siyaq_Numbers[] = {
+ 1,
+ 0x1ed00, 0x1ed4f,
+}; /* CR_In_Ottoman_Siyaq_Numbers */
+
+/* 'In_Arabic_Mathematical_Alphabetic_Symbols': Block */
+static const OnigCodePoint CR_In_Arabic_Mathematical_Alphabetic_Symbols[] = {
+ 1,
+ 0x1ee00, 0x1eeff,
+}; /* CR_In_Arabic_Mathematical_Alphabetic_Symbols */
+
+/* 'In_Mahjong_Tiles': Block */
+static const OnigCodePoint CR_In_Mahjong_Tiles[] = {
+ 1,
+ 0x1f000, 0x1f02f,
+}; /* CR_In_Mahjong_Tiles */
+
+/* 'In_Domino_Tiles': Block */
+static const OnigCodePoint CR_In_Domino_Tiles[] = {
+ 1,
+ 0x1f030, 0x1f09f,
+}; /* CR_In_Domino_Tiles */
+
+/* 'In_Playing_Cards': Block */
+static const OnigCodePoint CR_In_Playing_Cards[] = {
+ 1,
+ 0x1f0a0, 0x1f0ff,
+}; /* CR_In_Playing_Cards */
+
+/* 'In_Enclosed_Alphanumeric_Supplement': Block */
+static const OnigCodePoint CR_In_Enclosed_Alphanumeric_Supplement[] = {
+ 1,
+ 0x1f100, 0x1f1ff,
+}; /* CR_In_Enclosed_Alphanumeric_Supplement */
+
+/* 'In_Enclosed_Ideographic_Supplement': Block */
+static const OnigCodePoint CR_In_Enclosed_Ideographic_Supplement[] = {
+ 1,
+ 0x1f200, 0x1f2ff,
+}; /* CR_In_Enclosed_Ideographic_Supplement */
+
+/* 'In_Miscellaneous_Symbols_and_Pictographs': Block */
+static const OnigCodePoint CR_In_Miscellaneous_Symbols_and_Pictographs[] = {
+ 1,
+ 0x1f300, 0x1f5ff,
+}; /* CR_In_Miscellaneous_Symbols_and_Pictographs */
+
+/* 'In_Emoticons': Block */
+static const OnigCodePoint CR_In_Emoticons[] = {
+ 1,
+ 0x1f600, 0x1f64f,
+}; /* CR_In_Emoticons */
+
+/* 'In_Ornamental_Dingbats': Block */
+static const OnigCodePoint CR_In_Ornamental_Dingbats[] = {
+ 1,
+ 0x1f650, 0x1f67f,
+}; /* CR_In_Ornamental_Dingbats */
+
+/* 'In_Transport_and_Map_Symbols': Block */
+static const OnigCodePoint CR_In_Transport_and_Map_Symbols[] = {
+ 1,
+ 0x1f680, 0x1f6ff,
+}; /* CR_In_Transport_and_Map_Symbols */
+
+/* 'In_Alchemical_Symbols': Block */
+static const OnigCodePoint CR_In_Alchemical_Symbols[] = {
+ 1,
+ 0x1f700, 0x1f77f,
+}; /* CR_In_Alchemical_Symbols */
+
+/* 'In_Geometric_Shapes_Extended': Block */
+static const OnigCodePoint CR_In_Geometric_Shapes_Extended[] = {
+ 1,
+ 0x1f780, 0x1f7ff,
+}; /* CR_In_Geometric_Shapes_Extended */
+
+/* 'In_Supplemental_Arrows_C': Block */
+static const OnigCodePoint CR_In_Supplemental_Arrows_C[] = {
+ 1,
+ 0x1f800, 0x1f8ff,
+}; /* CR_In_Supplemental_Arrows_C */
+
+/* 'In_Supplemental_Symbols_and_Pictographs': Block */
+static const OnigCodePoint CR_In_Supplemental_Symbols_and_Pictographs[] = {
+ 1,
+ 0x1f900, 0x1f9ff,
+}; /* CR_In_Supplemental_Symbols_and_Pictographs */
+
+/* 'In_Chess_Symbols': Block */
+static const OnigCodePoint CR_In_Chess_Symbols[] = {
+ 1,
+ 0x1fa00, 0x1fa6f,
+}; /* CR_In_Chess_Symbols */
+
+/* 'In_Symbols_and_Pictographs_Extended_A': Block */
+static const OnigCodePoint CR_In_Symbols_and_Pictographs_Extended_A[] = {
+ 1,
+ 0x1fa70, 0x1faff,
+}; /* CR_In_Symbols_and_Pictographs_Extended_A */
+
+/* 'In_Symbols_for_Legacy_Computing': Block */
+static const OnigCodePoint CR_In_Symbols_for_Legacy_Computing[] = {
+ 1,
+ 0x1fb00, 0x1fbff,
+}; /* CR_In_Symbols_for_Legacy_Computing */
+
+/* 'In_CJK_Unified_Ideographs_Extension_B': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_B[] = {
+ 1,
+ 0x20000, 0x2a6df,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_B */
+
+/* 'In_CJK_Unified_Ideographs_Extension_C': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_C[] = {
+ 1,
+ 0x2a700, 0x2b73f,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_C */
+
+/* 'In_CJK_Unified_Ideographs_Extension_D': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_D[] = {
+ 1,
+ 0x2b740, 0x2b81f,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_D */
+
+/* 'In_CJK_Unified_Ideographs_Extension_E': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_E[] = {
+ 1,
+ 0x2b820, 0x2ceaf,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_E */
+
+/* 'In_CJK_Unified_Ideographs_Extension_F': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_F[] = {
+ 1,
+ 0x2ceb0, 0x2ebef,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_F */
+
+/* 'In_CJK_Compatibility_Ideographs_Supplement': Block */
+static const OnigCodePoint CR_In_CJK_Compatibility_Ideographs_Supplement[] = {
+ 1,
+ 0x2f800, 0x2fa1f,
+}; /* CR_In_CJK_Compatibility_Ideographs_Supplement */
+
+/* 'In_CJK_Unified_Ideographs_Extension_G': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_G[] = {
+ 1,
+ 0x30000, 0x3134f,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_G */
+
+/* 'In_CJK_Unified_Ideographs_Extension_H': Block */
+static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_H[] = {
+ 1,
+ 0x31350, 0x323af,
+}; /* CR_In_CJK_Unified_Ideographs_Extension_H */
+
+/* 'In_Tags': Block */
+static const OnigCodePoint CR_In_Tags[] = {
+ 1,
+ 0xe0000, 0xe007f,
+}; /* CR_In_Tags */
+
+/* 'In_Variation_Selectors_Supplement': Block */
+static const OnigCodePoint CR_In_Variation_Selectors_Supplement[] = {
+ 1,
+ 0xe0100, 0xe01ef,
+}; /* CR_In_Variation_Selectors_Supplement */
+
+/* 'In_Supplementary_Private_Use_Area_A': Block */
+static const OnigCodePoint CR_In_Supplementary_Private_Use_Area_A[] = {
+ 1,
+ 0xf0000, 0xfffff,
+}; /* CR_In_Supplementary_Private_Use_Area_A */
+
+/* 'In_Supplementary_Private_Use_Area_B': Block */
+static const OnigCodePoint CR_In_Supplementary_Private_Use_Area_B[] = {
+ 1,
+ 0x100000, 0x10ffff,
+}; /* CR_In_Supplementary_Private_Use_Area_B */
+
+/* 'In_No_Block': Block */
+static const OnigCodePoint CR_In_No_Block[] = {
+ 51,
+ 0x2fe0, 0x2fef,
+ 0x10200, 0x1027f,
+ 0x103e0, 0x103ff,
+ 0x105c0, 0x105ff,
+ 0x107c0, 0x107ff,
+ 0x108b0, 0x108df,
+ 0x10940, 0x1097f,
+ 0x10aa0, 0x10abf,
+ 0x10bb0, 0x10bff,
+ 0x10c50, 0x10c7f,
+ 0x10d40, 0x10e5f,
+ 0x11250, 0x1127f,
+ 0x11380, 0x113ff,
+ 0x114e0, 0x1157f,
+ 0x116d0, 0x116ff,
+ 0x11750, 0x117ff,
+ 0x11850, 0x1189f,
+ 0x11960, 0x1199f,
+ 0x11b60, 0x11bff,
+ 0x11cc0, 0x11cff,
+ 0x11db0, 0x11edf,
+ 0x11f60, 0x11faf,
+ 0x12550, 0x12f8f,
+ 0x13460, 0x143ff,
+ 0x14680, 0x167ff,
+ 0x16b90, 0x16e3f,
+ 0x16ea0, 0x16eff,
+ 0x16fa0, 0x16fdf,
+ 0x18d80, 0x1afef,
+ 0x1b300, 0x1bbff,
+ 0x1bcb0, 0x1ceff,
+ 0x1cfd0, 0x1cfff,
+ 0x1d250, 0x1d2bf,
+ 0x1d380, 0x1d3ff,
+ 0x1dab0, 0x1deff,
+ 0x1e090, 0x1e0ff,
+ 0x1e150, 0x1e28f,
+ 0x1e300, 0x1e4cf,
+ 0x1e500, 0x1e7df,
+ 0x1e8e0, 0x1e8ff,
+ 0x1e960, 0x1ec6f,
+ 0x1ecc0, 0x1ecff,
+ 0x1ed50, 0x1edff,
+ 0x1ef00, 0x1efff,
+ 0x1fc00, 0x1ffff,
+ 0x2a6e0, 0x2a6ff,
+ 0x2ebf0, 0x2f7ff,
+ 0x2fa20, 0x2ffff,
+ 0x323b0, 0xdffff,
+ 0xe0080, 0xe00ff,
+ 0xe01f0, 0xeffff,
+}; /* CR_In_No_Block */
+
+#endif /* USE_UNICODE_PROPERTIES */
+static const OnigCodePoint* const CodeRanges[] = {
+ CR_NEWLINE,
+ CR_Alpha,
+ CR_Blank,
+ CR_Cntrl,
+ CR_Digit,
+ CR_Graph,
+ CR_Lower,
+ CR_Print,
+ CR_XPosixPunct,
+ CR_Space,
+ CR_Upper,
+ CR_XDigit,
+ CR_Word,
+ CR_Alnum,
+ CR_ASCII,
+ CR_Punct,
+#ifdef USE_UNICODE_PROPERTIES
+ CR_Any,
+ CR_Assigned,
+ CR_C,
+ CR_Cc,
+ CR_Cf,
+ CR_Cn,
+ CR_Co,
+ CR_Cs,
+ CR_L,
+ CR_LC,
+ CR_Ll,
+ CR_Lm,
+ CR_Lo,
+ CR_Lt,
+ CR_Lu,
+ CR_M,
+ CR_Mc,
+ CR_Me,
+ CR_Mn,
+ CR_N,
+ CR_Nd,
+ CR_Nl,
+ CR_No,
+ CR_P,
+ CR_Pc,
+ CR_Pd,
+ CR_Pe,
+ CR_Pf,
+ CR_Pi,
+ CR_Po,
+ CR_Ps,
+ CR_S,
+ CR_Sc,
+ CR_Sk,
+ CR_Sm,
+ CR_So,
+ CR_Z,
+ CR_Zl,
+ CR_Zp,
+ CR_Zs,
+ CR_Math,
+ CR_Alphabetic,
+ CR_Lowercase,
+ CR_Uppercase,
+ CR_Cased,
+ CR_Case_Ignorable,
+ CR_Changes_When_Lowercased,
+ CR_Changes_When_Uppercased,
+ CR_Changes_When_Titlecased,
+ CR_Changes_When_Casefolded,
+ CR_Changes_When_Casemapped,
+ CR_ID_Start,
+ CR_ID_Continue,
+ CR_XID_Start,
+ CR_XID_Continue,
+ CR_Default_Ignorable_Code_Point,
+ CR_Grapheme_Extend,
+ CR_Grapheme_Base,
+ CR_Grapheme_Link,
+ CR_Common,
+ CR_Latin,
+ CR_Greek,
+ CR_Cyrillic,
+ CR_Armenian,
+ CR_Hebrew,
+ CR_Arabic,
+ CR_Syriac,
+ CR_Thaana,
+ CR_Devanagari,
+ CR_Bengali,
+ CR_Gurmukhi,
+ CR_Gujarati,
+ CR_Oriya,
+ CR_Tamil,
+ CR_Telugu,
+ CR_Kannada,
+ CR_Malayalam,
+ CR_Sinhala,
+ CR_Thai,
+ CR_Lao,
+ CR_Tibetan,
+ CR_Myanmar,
+ CR_Georgian,
+ CR_Hangul,
+ CR_Ethiopic,
+ CR_Cherokee,
+ CR_Canadian_Aboriginal,
+ CR_Ogham,
+ CR_Runic,
+ CR_Khmer,
+ CR_Mongolian,
+ CR_Hiragana,
+ CR_Katakana,
+ CR_Bopomofo,
+ CR_Han,
+ CR_Yi,
+ CR_Old_Italic,
+ CR_Gothic,
+ CR_Deseret,
+ CR_Inherited,
+ CR_Tagalog,
+ CR_Hanunoo,
+ CR_Buhid,
+ CR_Tagbanwa,
+ CR_Limbu,
+ CR_Tai_Le,
+ CR_Linear_B,
+ CR_Ugaritic,
+ CR_Shavian,
+ CR_Osmanya,
+ CR_Cypriot,
+ CR_Braille,
+ CR_Buginese,
+ CR_Coptic,
+ CR_New_Tai_Lue,
+ CR_Glagolitic,
+ CR_Tifinagh,
+ CR_Syloti_Nagri,
+ CR_Old_Persian,
+ CR_Kharoshthi,
+ CR_Balinese,
+ CR_Cuneiform,
+ CR_Phoenician,
+ CR_Phags_Pa,
+ CR_Nko,
+ CR_Sundanese,
+ CR_Lepcha,
+ CR_Ol_Chiki,
+ CR_Vai,
+ CR_Saurashtra,
+ CR_Kayah_Li,
+ CR_Rejang,
+ CR_Lycian,
+ CR_Carian,
+ CR_Lydian,
+ CR_Cham,
+ CR_Tai_Tham,
+ CR_Tai_Viet,
+ CR_Avestan,
+ CR_Egyptian_Hieroglyphs,
+ CR_Samaritan,
+ CR_Lisu,
+ CR_Bamum,
+ CR_Javanese,
+ CR_Meetei_Mayek,
+ CR_Imperial_Aramaic,
+ CR_Old_South_Arabian,
+ CR_Inscriptional_Parthian,
+ CR_Inscriptional_Pahlavi,
+ CR_Old_Turkic,
+ CR_Kaithi,
+ CR_Batak,
+ CR_Brahmi,
+ CR_Mandaic,
+ CR_Chakma,
+ CR_Meroitic_Cursive,
+ CR_Meroitic_Hieroglyphs,
+ CR_Miao,
+ CR_Sharada,
+ CR_Sora_Sompeng,
+ CR_Takri,
+ CR_Caucasian_Albanian,
+ CR_Bassa_Vah,
+ CR_Duployan,
+ CR_Elbasan,
+ CR_Grantha,
+ CR_Pahawh_Hmong,
+ CR_Khojki,
+ CR_Linear_A,
+ CR_Mahajani,
+ CR_Manichaean,
+ CR_Mende_Kikakui,
+ CR_Modi,
+ CR_Mro,
+ CR_Old_North_Arabian,
+ CR_Nabataean,
+ CR_Palmyrene,
+ CR_Pau_Cin_Hau,
+ CR_Old_Permic,
+ CR_Psalter_Pahlavi,
+ CR_Siddham,
+ CR_Khudawadi,
+ CR_Tirhuta,
+ CR_Warang_Citi,
+ CR_Ahom,
+ CR_Anatolian_Hieroglyphs,
+ CR_Hatran,
+ CR_Multani,
+ CR_Old_Hungarian,
+ CR_SignWriting,
+ CR_Adlam,
+ CR_Bhaiksuki,
+ CR_Marchen,
+ CR_Newa,
+ CR_Osage,
+ CR_Tangut,
+ CR_Masaram_Gondi,
+ CR_Nushu,
+ CR_Soyombo,
+ CR_Zanabazar_Square,
+ CR_Dogra,
+ CR_Gunjala_Gondi,
+ CR_Makasar,
+ CR_Medefaidrin,
+ CR_Hanifi_Rohingya,
+ CR_Sogdian,
+ CR_Old_Sogdian,
+ CR_Elymaic,
+ CR_Nandinagari,
+ CR_Nyiakeng_Puachue_Hmong,
+ CR_Wancho,
+ CR_Chorasmian,
+ CR_Dives_Akuru,
+ CR_Khitan_Small_Script,
+ CR_Yezidi,
+ CR_Cypro_Minoan,
+ CR_Old_Uyghur,
+ CR_Tangsa,
+ CR_Toto,
+ CR_Vithkuqi,
+ CR_Kawi,
+ CR_Nag_Mundari,
+ CR_White_Space,
+ CR_Bidi_Control,
+ CR_Join_Control,
+ CR_Dash,
+ CR_Hyphen,
+ CR_Quotation_Mark,
+ CR_Terminal_Punctuation,
+ CR_Other_Math,
+ CR_Hex_Digit,
+ CR_ASCII_Hex_Digit,
+ CR_Other_Alphabetic,
+ CR_Ideographic,
+ CR_Diacritic,
+ CR_Extender,
+ CR_Other_Lowercase,
+ CR_Other_Uppercase,
+ CR_Noncharacter_Code_Point,
+ CR_Other_Grapheme_Extend,
+ CR_IDS_Binary_Operator,
+ CR_IDS_Trinary_Operator,
+ CR_Radical,
+ CR_Unified_Ideograph,
+ CR_Other_Default_Ignorable_Code_Point,
+ CR_Deprecated,
+ CR_Soft_Dotted,
+ CR_Logical_Order_Exception,
+ CR_Other_ID_Start,
+ CR_Other_ID_Continue,
+ CR_Sentence_Terminal,
+ CR_Variation_Selector,
+ CR_Pattern_White_Space,
+ CR_Pattern_Syntax,
+ CR_Prepended_Concatenation_Mark,
+ CR_Regional_Indicator,
+ CR_Emoji,
+ CR_Emoji_Presentation,
+ CR_Emoji_Modifier,
+ CR_Emoji_Modifier_Base,
+ CR_Emoji_Component,
+ CR_Extended_Pictographic,
+ CR_Unknown,
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ CR_Age_1_1,
+ CR_Age_2_0,
+ CR_Age_2_1,
+ CR_Age_3_0,
+ CR_Age_3_1,
+ CR_Age_3_2,
+ CR_Age_4_0,
+ CR_Age_4_1,
+ CR_Age_5_0,
+ CR_Age_5_1,
+ CR_Age_5_2,
+ CR_Age_6_0,
+ CR_Age_6_1,
+ CR_Age_6_2,
+ CR_Age_6_3,
+ CR_Age_7_0,
+ CR_Age_8_0,
+ CR_Age_9_0,
+ CR_Age_10_0,
+ CR_Age_11_0,
+ CR_Age_12_0,
+ CR_Age_12_1,
+ CR_Age_13_0,
+ CR_Age_14_0,
+ CR_Age_15_0,
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ CR_Grapheme_Cluster_Break_Prepend,
+ CR_Grapheme_Cluster_Break_CR,
+ CR_Grapheme_Cluster_Break_LF,
+ CR_Grapheme_Cluster_Break_Control,
+ CR_Grapheme_Cluster_Break_Extend,
+ CR_Grapheme_Cluster_Break_Regional_Indicator,
+ CR_Grapheme_Cluster_Break_SpacingMark,
+ CR_Grapheme_Cluster_Break_L,
+ CR_Grapheme_Cluster_Break_V,
+ CR_Grapheme_Cluster_Break_T,
+ CR_Grapheme_Cluster_Break_LV,
+ CR_Grapheme_Cluster_Break_LVT,
+ CR_Grapheme_Cluster_Break_ZWJ,
+ CR_In_Basic_Latin,
+ CR_In_Latin_1_Supplement,
+ CR_In_Latin_Extended_A,
+ CR_In_Latin_Extended_B,
+ CR_In_IPA_Extensions,
+ CR_In_Spacing_Modifier_Letters,
+ CR_In_Combining_Diacritical_Marks,
+ CR_In_Greek_and_Coptic,
+ CR_In_Cyrillic,
+ CR_In_Cyrillic_Supplement,
+ CR_In_Armenian,
+ CR_In_Hebrew,
+ CR_In_Arabic,
+ CR_In_Syriac,
+ CR_In_Arabic_Supplement,
+ CR_In_Thaana,
+ CR_In_NKo,
+ CR_In_Samaritan,
+ CR_In_Mandaic,
+ CR_In_Syriac_Supplement,
+ CR_In_Arabic_Extended_B,
+ CR_In_Arabic_Extended_A,
+ CR_In_Devanagari,
+ CR_In_Bengali,
+ CR_In_Gurmukhi,
+ CR_In_Gujarati,
+ CR_In_Oriya,
+ CR_In_Tamil,
+ CR_In_Telugu,
+ CR_In_Kannada,
+ CR_In_Malayalam,
+ CR_In_Sinhala,
+ CR_In_Thai,
+ CR_In_Lao,
+ CR_In_Tibetan,
+ CR_In_Myanmar,
+ CR_In_Georgian,
+ CR_In_Hangul_Jamo,
+ CR_In_Ethiopic,
+ CR_In_Ethiopic_Supplement,
+ CR_In_Cherokee,
+ CR_In_Unified_Canadian_Aboriginal_Syllabics,
+ CR_In_Ogham,
+ CR_In_Runic,
+ CR_In_Tagalog,
+ CR_In_Hanunoo,
+ CR_In_Buhid,
+ CR_In_Tagbanwa,
+ CR_In_Khmer,
+ CR_In_Mongolian,
+ CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended,
+ CR_In_Limbu,
+ CR_In_Tai_Le,
+ CR_In_New_Tai_Lue,
+ CR_In_Khmer_Symbols,
+ CR_In_Buginese,
+ CR_In_Tai_Tham,
+ CR_In_Combining_Diacritical_Marks_Extended,
+ CR_In_Balinese,
+ CR_In_Sundanese,
+ CR_In_Batak,
+ CR_In_Lepcha,
+ CR_In_Ol_Chiki,
+ CR_In_Cyrillic_Extended_C,
+ CR_In_Georgian_Extended,
+ CR_In_Sundanese_Supplement,
+ CR_In_Vedic_Extensions,
+ CR_In_Phonetic_Extensions,
+ CR_In_Phonetic_Extensions_Supplement,
+ CR_In_Combining_Diacritical_Marks_Supplement,
+ CR_In_Latin_Extended_Additional,
+ CR_In_Greek_Extended,
+ CR_In_General_Punctuation,
+ CR_In_Superscripts_and_Subscripts,
+ CR_In_Currency_Symbols,
+ CR_In_Combining_Diacritical_Marks_for_Symbols,
+ CR_In_Letterlike_Symbols,
+ CR_In_Number_Forms,
+ CR_In_Arrows,
+ CR_In_Mathematical_Operators,
+ CR_In_Miscellaneous_Technical,
+ CR_In_Control_Pictures,
+ CR_In_Optical_Character_Recognition,
+ CR_In_Enclosed_Alphanumerics,
+ CR_In_Box_Drawing,
+ CR_In_Block_Elements,
+ CR_In_Geometric_Shapes,
+ CR_In_Miscellaneous_Symbols,
+ CR_In_Dingbats,
+ CR_In_Miscellaneous_Mathematical_Symbols_A,
+ CR_In_Supplemental_Arrows_A,
+ CR_In_Braille_Patterns,
+ CR_In_Supplemental_Arrows_B,
+ CR_In_Miscellaneous_Mathematical_Symbols_B,
+ CR_In_Supplemental_Mathematical_Operators,
+ CR_In_Miscellaneous_Symbols_and_Arrows,
+ CR_In_Glagolitic,
+ CR_In_Latin_Extended_C,
+ CR_In_Coptic,
+ CR_In_Georgian_Supplement,
+ CR_In_Tifinagh,
+ CR_In_Ethiopic_Extended,
+ CR_In_Cyrillic_Extended_A,
+ CR_In_Supplemental_Punctuation,
+ CR_In_CJK_Radicals_Supplement,
+ CR_In_Kangxi_Radicals,
+ CR_In_Ideographic_Description_Characters,
+ CR_In_CJK_Symbols_and_Punctuation,
+ CR_In_Hiragana,
+ CR_In_Katakana,
+ CR_In_Bopomofo,
+ CR_In_Hangul_Compatibility_Jamo,
+ CR_In_Kanbun,
+ CR_In_Bopomofo_Extended,
+ CR_In_CJK_Strokes,
+ CR_In_Katakana_Phonetic_Extensions,
+ CR_In_Enclosed_CJK_Letters_and_Months,
+ CR_In_CJK_Compatibility,
+ CR_In_CJK_Unified_Ideographs_Extension_A,
+ CR_In_Yijing_Hexagram_Symbols,
+ CR_In_CJK_Unified_Ideographs,
+ CR_In_Yi_Syllables,
+ CR_In_Yi_Radicals,
+ CR_In_Lisu,
+ CR_In_Vai,
+ CR_In_Cyrillic_Extended_B,
+ CR_In_Bamum,
+ CR_In_Modifier_Tone_Letters,
+ CR_In_Latin_Extended_D,
+ CR_In_Syloti_Nagri,
+ CR_In_Common_Indic_Number_Forms,
+ CR_In_Phags_pa,
+ CR_In_Saurashtra,
+ CR_In_Devanagari_Extended,
+ CR_In_Kayah_Li,
+ CR_In_Rejang,
+ CR_In_Hangul_Jamo_Extended_A,
+ CR_In_Javanese,
+ CR_In_Myanmar_Extended_B,
+ CR_In_Cham,
+ CR_In_Myanmar_Extended_A,
+ CR_In_Tai_Viet,
+ CR_In_Meetei_Mayek_Extensions,
+ CR_In_Ethiopic_Extended_A,
+ CR_In_Latin_Extended_E,
+ CR_In_Cherokee_Supplement,
+ CR_In_Meetei_Mayek,
+ CR_In_Hangul_Syllables,
+ CR_In_Hangul_Jamo_Extended_B,
+ CR_In_High_Surrogates,
+ CR_In_High_Private_Use_Surrogates,
+ CR_In_Low_Surrogates,
+ CR_In_Private_Use_Area,
+ CR_In_CJK_Compatibility_Ideographs,
+ CR_In_Alphabetic_Presentation_Forms,
+ CR_In_Arabic_Presentation_Forms_A,
+ CR_In_Variation_Selectors,
+ CR_In_Vertical_Forms,
+ CR_In_Combining_Half_Marks,
+ CR_In_CJK_Compatibility_Forms,
+ CR_In_Small_Form_Variants,
+ CR_In_Arabic_Presentation_Forms_B,
+ CR_In_Halfwidth_and_Fullwidth_Forms,
+ CR_In_Specials,
+ CR_In_Linear_B_Syllabary,
+ CR_In_Linear_B_Ideograms,
+ CR_In_Aegean_Numbers,
+ CR_In_Ancient_Greek_Numbers,
+ CR_In_Ancient_Symbols,
+ CR_In_Phaistos_Disc,
+ CR_In_Lycian,
+ CR_In_Carian,
+ CR_In_Coptic_Epact_Numbers,
+ CR_In_Old_Italic,
+ CR_In_Gothic,
+ CR_In_Old_Permic,
+ CR_In_Ugaritic,
+ CR_In_Old_Persian,
+ CR_In_Deseret,
+ CR_In_Shavian,
+ CR_In_Osmanya,
+ CR_In_Osage,
+ CR_In_Elbasan,
+ CR_In_Caucasian_Albanian,
+ CR_In_Vithkuqi,
+ CR_In_Linear_A,
+ CR_In_Latin_Extended_F,
+ CR_In_Cypriot_Syllabary,
+ CR_In_Imperial_Aramaic,
+ CR_In_Palmyrene,
+ CR_In_Nabataean,
+ CR_In_Hatran,
+ CR_In_Phoenician,
+ CR_In_Lydian,
+ CR_In_Meroitic_Hieroglyphs,
+ CR_In_Meroitic_Cursive,
+ CR_In_Kharoshthi,
+ CR_In_Old_South_Arabian,
+ CR_In_Old_North_Arabian,
+ CR_In_Manichaean,
+ CR_In_Avestan,
+ CR_In_Inscriptional_Parthian,
+ CR_In_Inscriptional_Pahlavi,
+ CR_In_Psalter_Pahlavi,
+ CR_In_Old_Turkic,
+ CR_In_Old_Hungarian,
+ CR_In_Hanifi_Rohingya,
+ CR_In_Rumi_Numeral_Symbols,
+ CR_In_Yezidi,
+ CR_In_Arabic_Extended_C,
+ CR_In_Old_Sogdian,
+ CR_In_Sogdian,
+ CR_In_Old_Uyghur,
+ CR_In_Chorasmian,
+ CR_In_Elymaic,
+ CR_In_Brahmi,
+ CR_In_Kaithi,
+ CR_In_Sora_Sompeng,
+ CR_In_Chakma,
+ CR_In_Mahajani,
+ CR_In_Sharada,
+ CR_In_Sinhala_Archaic_Numbers,
+ CR_In_Khojki,
+ CR_In_Multani,
+ CR_In_Khudawadi,
+ CR_In_Grantha,
+ CR_In_Newa,
+ CR_In_Tirhuta,
+ CR_In_Siddham,
+ CR_In_Modi,
+ CR_In_Mongolian_Supplement,
+ CR_In_Takri,
+ CR_In_Ahom,
+ CR_In_Dogra,
+ CR_In_Warang_Citi,
+ CR_In_Dives_Akuru,
+ CR_In_Nandinagari,
+ CR_In_Zanabazar_Square,
+ CR_In_Soyombo,
+ CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A,
+ CR_In_Pau_Cin_Hau,
+ CR_In_Devanagari_Extended_A,
+ CR_In_Bhaiksuki,
+ CR_In_Marchen,
+ CR_In_Masaram_Gondi,
+ CR_In_Gunjala_Gondi,
+ CR_In_Makasar,
+ CR_In_Kawi,
+ CR_In_Lisu_Supplement,
+ CR_In_Tamil_Supplement,
+ CR_In_Cuneiform,
+ CR_In_Cuneiform_Numbers_and_Punctuation,
+ CR_In_Early_Dynastic_Cuneiform,
+ CR_In_Cypro_Minoan,
+ CR_In_Egyptian_Hieroglyphs,
+ CR_In_Egyptian_Hieroglyph_Format_Controls,
+ CR_In_Anatolian_Hieroglyphs,
+ CR_In_Bamum_Supplement,
+ CR_In_Mro,
+ CR_In_Tangsa,
+ CR_In_Bassa_Vah,
+ CR_In_Pahawh_Hmong,
+ CR_In_Medefaidrin,
+ CR_In_Miao,
+ CR_In_Ideographic_Symbols_and_Punctuation,
+ CR_In_Tangut,
+ CR_In_Tangut_Components,
+ CR_In_Khitan_Small_Script,
+ CR_In_Tangut_Supplement,
+ CR_In_Kana_Extended_B,
+ CR_In_Kana_Supplement,
+ CR_In_Kana_Extended_A,
+ CR_In_Small_Kana_Extension,
+ CR_In_Nushu,
+ CR_In_Duployan,
+ CR_In_Shorthand_Format_Controls,
+ CR_In_Znamenny_Musical_Notation,
+ CR_In_Byzantine_Musical_Symbols,
+ CR_In_Musical_Symbols,
+ CR_In_Ancient_Greek_Musical_Notation,
+ CR_In_Kaktovik_Numerals,
+ CR_In_Mayan_Numerals,
+ CR_In_Tai_Xuan_Jing_Symbols,
+ CR_In_Counting_Rod_Numerals,
+ CR_In_Mathematical_Alphanumeric_Symbols,
+ CR_In_Sutton_SignWriting,
+ CR_In_Latin_Extended_G,
+ CR_In_Glagolitic_Supplement,
+ CR_In_Cyrillic_Extended_D,
+ CR_In_Nyiakeng_Puachue_Hmong,
+ CR_In_Toto,
+ CR_In_Wancho,
+ CR_In_Nag_Mundari,
+ CR_In_Ethiopic_Extended_B,
+ CR_In_Mende_Kikakui,
+ CR_In_Adlam,
+ CR_In_Indic_Siyaq_Numbers,
+ CR_In_Ottoman_Siyaq_Numbers,
+ CR_In_Arabic_Mathematical_Alphabetic_Symbols,
+ CR_In_Mahjong_Tiles,
+ CR_In_Domino_Tiles,
+ CR_In_Playing_Cards,
+ CR_In_Enclosed_Alphanumeric_Supplement,
+ CR_In_Enclosed_Ideographic_Supplement,
+ CR_In_Miscellaneous_Symbols_and_Pictographs,
+ CR_In_Emoticons,
+ CR_In_Ornamental_Dingbats,
+ CR_In_Transport_and_Map_Symbols,
+ CR_In_Alchemical_Symbols,
+ CR_In_Geometric_Shapes_Extended,
+ CR_In_Supplemental_Arrows_C,
+ CR_In_Supplemental_Symbols_and_Pictographs,
+ CR_In_Chess_Symbols,
+ CR_In_Symbols_and_Pictographs_Extended_A,
+ CR_In_Symbols_for_Legacy_Computing,
+ CR_In_CJK_Unified_Ideographs_Extension_B,
+ CR_In_CJK_Unified_Ideographs_Extension_C,
+ CR_In_CJK_Unified_Ideographs_Extension_D,
+ CR_In_CJK_Unified_Ideographs_Extension_E,
+ CR_In_CJK_Unified_Ideographs_Extension_F,
+ CR_In_CJK_Compatibility_Ideographs_Supplement,
+ CR_In_CJK_Unified_Ideographs_Extension_G,
+ CR_In_CJK_Unified_Ideographs_Extension_H,
+ CR_In_Tags,
+ CR_In_Variation_Selectors_Supplement,
+ CR_In_Supplementary_Private_Use_Area_A,
+ CR_In_Supplementary_Private_Use_Area_B,
+ CR_In_No_Block,
+#endif /* USE_UNICODE_PROPERTIES */
+};
+struct uniname2ctype_struct {
+ short name;
+ unsigned short ctype;
+};
+#define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
+
+static const struct uniname2ctype_struct *uniname2ctype_p(register const char *str, register size_t len);
+
+#ifndef USE_UNICODE_PROPERTIES
+#define TOTAL_KEYWORDS 15
+#define MIN_WORD_LENGTH 4
+#define MAX_WORD_LENGTH 11
+#define MIN_HASH_VALUE 6
+#define MAX_HASH_VALUE 20
+/* maximum key range = 15, duplicates = 0 */
+#else /* USE_UNICODE_PROPERTIES */
+#ifndef USE_UNICODE_AGE_PROPERTIES
+#define TOTAL_KEYWORDS 866
+#else /* USE_UNICODE_AGE_PROPERTIES */
+#define TOTAL_KEYWORDS 891
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+#define MIN_WORD_LENGTH 1
+#define MAX_WORD_LENGTH 45
+#define MIN_HASH_VALUE 11
+#define MAX_HASH_VALUE 6098
+/* maximum key range = 6088, duplicates = 0 */
+#endif /* USE_UNICODE_PROPERTIES */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+uniname2ctype_hash (register const char *str, register size_t len)
+{
+#ifndef USE_UNICODE_PROPERTIES
+ static const unsigned char asso_values[] =
+#else /* USE_UNICODE_PROPERTIES */
+ static const unsigned short asso_values[] =
+#endif /* USE_UNICODE_PROPERTIES */
+ {
+#ifndef USE_UNICODE_PROPERTIES
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 3, 12, 5,
+ 4, 21, 21, 10, 21, 1, 21, 21, 11, 21,
+ 2, 1, 1, 21, 1, 7, 4, 6, 21, 1,
+ 4, 21, 21, 21, 21, 21, 21, 21
+#else /* USE_UNICODE_PROPERTIES */
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ 6099, 6099, 6099, 6099, 6099, 6099, 12, 6099, 3, 1,
+ 4, 8, 32, 26, 14, 17, 10, 7, 6099, 6099,
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099,
+ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 1, 1425, 113,
+ 437, 37, 1086, 1071, 1051, 4, 1984, 9, 500, 88,
+ 8, 18, 1371, 1287, 54, 203, 310, 619, 1958, 603,
+ 275, 1624, 44, 1, 22, 6099, 6099, 6099, 6099, 6099
+#endif /* USE_UNICODE_PROPERTIES */
+ };
+#ifndef USE_UNICODE_PROPERTIES
+ return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
+#else /* USE_UNICODE_PROPERTIES */
+ register unsigned int hval = (unsigned int)len;
+
+ switch (hval)
+ {
+ default:
+ hval += asso_values[(unsigned char)str[15]];
+ /*FALLTHROUGH*/
+ case 15:
+ case 14:
+ case 13:
+ case 12:
+ hval += asso_values[(unsigned char)str[11]];
+ /*FALLTHROUGH*/
+ case 11:
+ case 10:
+ case 9:
+ case 8:
+ case 7:
+ case 6:
+ hval += asso_values[(unsigned char)str[5]];
+ /*FALLTHROUGH*/
+ case 5:
+ hval += asso_values[(unsigned char)str[4]];
+ /*FALLTHROUGH*/
+ case 4:
+ case 3:
+ hval += asso_values[(unsigned char)str[2]];
+ /*FALLTHROUGH*/
+ case 2:
+ hval += asso_values[(unsigned char)str[1]];
+ /*FALLTHROUGH*/
+ case 1:
+ hval += asso_values[(unsigned char)str[0]+2];
+ break;
+ }
+ return hval + asso_values[(unsigned char)str[len - 1]];
+#endif /* USE_UNICODE_PROPERTIES */
+}
+
+struct uniname2ctype_pool_t
+ {
+#ifndef USE_UNICODE_PROPERTIES
+ char uniname2ctype_pool_str6[sizeof("word")];
+ char uniname2ctype_pool_str7[sizeof("print")];
+ char uniname2ctype_pool_str8[sizeof("punct")];
+ char uniname2ctype_pool_str9[sizeof("alpha")];
+ char uniname2ctype_pool_str10[sizeof("alnum")];
+ char uniname2ctype_pool_str11[sizeof("xdigit")];
+ char uniname2ctype_pool_str12[sizeof("upper")];
+ char uniname2ctype_pool_str13[sizeof("ascii")];
+ char uniname2ctype_pool_str14[sizeof("cntrl")];
+ char uniname2ctype_pool_str15[sizeof("space")];
+ char uniname2ctype_pool_str16[sizeof("xposixpunct")];
+ char uniname2ctype_pool_str17[sizeof("lower")];
+ char uniname2ctype_pool_str18[sizeof("graph")];
+ char uniname2ctype_pool_str19[sizeof("digit")];
+ char uniname2ctype_pool_str20[sizeof("blank")];
+#else /* USE_UNICODE_PROPERTIES */
+ char uniname2ctype_pool_str11[sizeof("yi")];
+ char uniname2ctype_pool_str17[sizeof("yiii")];
+ char uniname2ctype_pool_str22[sizeof("lana")];
+ char uniname2ctype_pool_str25[sizeof("lina")];
+ char uniname2ctype_pool_str33[sizeof("maka")];
+ char uniname2ctype_pool_str35[sizeof("mani")];
+ char uniname2ctype_pool_str36[sizeof("mn")];
+ char uniname2ctype_pool_str45[sizeof("miao")];
+ char uniname2ctype_pool_str46[sizeof("lo")];
+ char uniname2ctype_pool_str47[sizeof("ci")];
+ char uniname2ctype_pool_str48[sizeof("lao")];
+ char uniname2ctype_pool_str49[sizeof("laoo")];
+ char uniname2ctype_pool_str52[sizeof("inkannada")];
+ char uniname2ctype_pool_str55[sizeof("cn")];
+ char uniname2ctype_pool_str64[sizeof("pi")];
+ char uniname2ctype_pool_str66[sizeof("innko")];
+ char uniname2ctype_pool_str67[sizeof("z")];
+ char uniname2ctype_pool_str71[sizeof("gran")];
+ char uniname2ctype_pool_str75[sizeof("co")];
+ char uniname2ctype_pool_str83[sizeof("lineara")];
+ char uniname2ctype_pool_str86[sizeof("mark")];
+ char uniname2ctype_pool_str90[sizeof("yezi")];
+ char uniname2ctype_pool_str92[sizeof("po")];
+ char uniname2ctype_pool_str94[sizeof("me")];
+ char uniname2ctype_pool_str100[sizeof("cari")];
+ char uniname2ctype_pool_str101[sizeof("inkharoshthi")];
+ char uniname2ctype_pool_str102[sizeof("kana")];
+ char uniname2ctype_pool_str103[sizeof("loe")];
+ char uniname2ctype_pool_str107[sizeof("m")];
+ char uniname2ctype_pool_str108[sizeof("grek")];
+ char uniname2ctype_pool_str111[sizeof("mro")];
+ char uniname2ctype_pool_str112[sizeof("mroo")];
+ char uniname2ctype_pool_str115[sizeof("carian")];
+ char uniname2ctype_pool_str117[sizeof("geor")];
+ char uniname2ctype_pool_str118[sizeof("greek")];
+ char uniname2ctype_pool_str122[sizeof("gonm")];
+ char uniname2ctype_pool_str129[sizeof("mendekikakui")];
+ char uniname2ctype_pool_str130[sizeof("pe")];
+ char uniname2ctype_pool_str131[sizeof("mero")];
+ char uniname2ctype_pool_str134[sizeof("inosmanya")];
+ char uniname2ctype_pool_str139[sizeof("cakm")];
+ char uniname2ctype_pool_str145[sizeof("inmanichaean")];
+ char uniname2ctype_pool_str146[sizeof("inmro")];
+ char uniname2ctype_pool_str148[sizeof("inmiao")];
+ char uniname2ctype_pool_str149[sizeof("inchakma")];
+ char uniname2ctype_pool_str151[sizeof("c")];
+ char uniname2ctype_pool_str152[sizeof("mandaic")];
+ char uniname2ctype_pool_str153[sizeof("meeteimayek")];
+ char uniname2ctype_pool_str158[sizeof("zzzz")];
+ char uniname2ctype_pool_str161[sizeof("inarmenian")];
+ char uniname2ctype_pool_str177[sizeof("inmyanmar")];
+ char uniname2ctype_pool_str178[sizeof("inmakasar")];
+ char uniname2ctype_pool_str183[sizeof("common")];
+ char uniname2ctype_pool_str186[sizeof("lm")];
+ char uniname2ctype_pool_str190[sizeof("marc")];
+ char uniname2ctype_pool_str203[sizeof("inrunic")];
+ char uniname2ctype_pool_str204[sizeof("incarian")];
+ char uniname2ctype_pool_str210[sizeof("inideographicsymbolsandpunctuation")];
+ char uniname2ctype_pool_str212[sizeof("inkhmer")];
+ char uniname2ctype_pool_str213[sizeof("qaai")];
+ char uniname2ctype_pool_str218[sizeof("inahom")];
+ char uniname2ctype_pool_str226[sizeof("merc")];
+ char uniname2ctype_pool_str230[sizeof("inchorasmian")];
+ char uniname2ctype_pool_str231[sizeof("combiningmark")];
+ char uniname2ctype_pool_str236[sizeof("lc")];
+ char uniname2ctype_pool_str237[sizeof("perm")];
+ char uniname2ctype_pool_str246[sizeof("mc")];
+ char uniname2ctype_pool_str250[sizeof("connectorpunctuation")];
+ char uniname2ctype_pool_str253[sizeof("cans")];
+ char uniname2ctype_pool_str260[sizeof("incuneiformnumbersandpunctuation")];
+ char uniname2ctype_pool_str263[sizeof("armi")];
+ char uniname2ctype_pool_str265[sizeof("cc")];
+ char uniname2ctype_pool_str267[sizeof("armn")];
+ char uniname2ctype_pool_str268[sizeof("incherokee")];
+ char uniname2ctype_pool_str270[sizeof("prependedconcatenationmark")];
+ char uniname2ctype_pool_str274[sizeof("incuneiform")];
+ char uniname2ctype_pool_str275[sizeof("inavestan")];
+ char uniname2ctype_pool_str281[sizeof("inipaextensions")];
+ char uniname2ctype_pool_str282[sizeof("pc")];
+ char uniname2ctype_pool_str283[sizeof("armenian")];
+ char uniname2ctype_pool_str285[sizeof("insharada")];
+ char uniname2ctype_pool_str287[sizeof("vai")];
+ char uniname2ctype_pool_str288[sizeof("vaii")];
+ char uniname2ctype_pool_str289[sizeof("inmarchen")];
+ char uniname2ctype_pool_str293[sizeof("makasar")];
+ char uniname2ctype_pool_str297[sizeof("masaramgondi")];
+ char uniname2ctype_pool_str301[sizeof("inarrows")];
+ char uniname2ctype_pool_str311[sizeof("incyrillic")];
+ char uniname2ctype_pool_str313[sizeof("incham")];
+ char uniname2ctype_pool_str315[sizeof("qmark")];
+ char uniname2ctype_pool_str320[sizeof("ri")];
+ char uniname2ctype_pool_str322[sizeof("qaac")];
+ char uniname2ctype_pool_str328[sizeof("insamaritan")];
+ char uniname2ctype_pool_str331[sizeof("latn")];
+ char uniname2ctype_pool_str335[sizeof("inmasaramgondi")];
+ char uniname2ctype_pool_str338[sizeof("inthaana")];
+ char uniname2ctype_pool_str340[sizeof("latin")];
+ char uniname2ctype_pool_str342[sizeof("inthai")];
+ char uniname2ctype_pool_str345[sizeof("lineseparator")];
+ char uniname2ctype_pool_str346[sizeof("pcm")];
+ char uniname2ctype_pool_str348[sizeof("inkatakana")];
+ char uniname2ctype_pool_str352[sizeof("inkaithi")];
+ char uniname2ctype_pool_str362[sizeof("inscriptionalparthian")];
+ char uniname2ctype_pool_str366[sizeof("initialpunctuation")];
+ char uniname2ctype_pool_str373[sizeof("mtei")];
+ char uniname2ctype_pool_str381[sizeof("inzanabazarsquare")];
+ char uniname2ctype_pool_str386[sizeof("inkhmersymbols")];
+ char uniname2ctype_pool_str399[sizeof("insyriac")];
+ char uniname2ctype_pool_str401[sizeof("intakri")];
+ char uniname2ctype_pool_str404[sizeof("arabic")];
+ char uniname2ctype_pool_str418[sizeof("katakana")];
+ char uniname2ctype_pool_str426[sizeof("prti")];
+ char uniname2ctype_pool_str430[sizeof("zs")];
+ char uniname2ctype_pool_str442[sizeof("ascii")];
+ char uniname2ctype_pool_str445[sizeof("cs")];
+ char uniname2ctype_pool_str462[sizeof("ps")];
+ char uniname2ctype_pool_str468[sizeof("mand")];
+ char uniname2ctype_pool_str470[sizeof("privateuse")];
+ char uniname2ctype_pool_str475[sizeof("inruminumeralsymbols")];
+ char uniname2ctype_pool_str480[sizeof("inmyanmarextendeda")];
+ char uniname2ctype_pool_str481[sizeof("modi")];
+ char uniname2ctype_pool_str486[sizeof("incjkcompatibilityforms")];
+ char uniname2ctype_pool_str488[sizeof("inkanaextendeda")];
+ char uniname2ctype_pool_str491[sizeof("incjkcompatibilityideographs")];
+ char uniname2ctype_pool_str500[sizeof("brai")];
+ char uniname2ctype_pool_str504[sizeof("mend")];
+ char uniname2ctype_pool_str505[sizeof("ideo")];
+ char uniname2ctype_pool_str506[sizeof("letter")];
+ char uniname2ctype_pool_str509[sizeof("l")];
+ char uniname2ctype_pool_str511[sizeof("inmeeteimayek")];
+ char uniname2ctype_pool_str520[sizeof("inideographicdescriptioncharacters")];
+ char uniname2ctype_pool_str533[sizeof("yezidi")];
+ char uniname2ctype_pool_str538[sizeof("knda")];
+ char uniname2ctype_pool_str541[sizeof("innandinagari")];
+ char uniname2ctype_pool_str543[sizeof("kannada")];
+ char uniname2ctype_pool_str556[sizeof("inmodi")];
+ char uniname2ctype_pool_str558[sizeof("inlao")];
+ char uniname2ctype_pool_str559[sizeof("xidcontinue")];
+ char uniname2ctype_pool_str560[sizeof("inoldnortharabian")];
+ char uniname2ctype_pool_str565[sizeof("intransportandmapsymbols")];
+ char uniname2ctype_pool_str566[sizeof("letternumber")];
+ char uniname2ctype_pool_str568[sizeof("gothic")];
+ char uniname2ctype_pool_str572[sizeof("inlineara")];
+ char uniname2ctype_pool_str577[sizeof("inmendekikakui")];
+ char uniname2ctype_pool_str579[sizeof("mongolian")];
+ char uniname2ctype_pool_str582[sizeof("inmiscellaneousmathematicalsymbolsa")];
+ char uniname2ctype_pool_str583[sizeof("inspecials")];
+ char uniname2ctype_pool_str590[sizeof("grlink")];
+ char uniname2ctype_pool_str594[sizeof("brahmi")];
+ char uniname2ctype_pool_str596[sizeof("inemoticons")];
+ char uniname2ctype_pool_str597[sizeof("kali")];
+ char uniname2ctype_pool_str600[sizeof("inolditalic")];
+ char uniname2ctype_pool_str602[sizeof("xidc")];
+ char uniname2ctype_pool_str604[sizeof("inmedefaidrin")];
+ char uniname2ctype_pool_str605[sizeof("inchesssymbols")];
+ char uniname2ctype_pool_str608[sizeof("incjkcompatibilityideographssupplement")];
+ char uniname2ctype_pool_str609[sizeof("kits")];
+ char uniname2ctype_pool_str614[sizeof("inadlam")];
+ char uniname2ctype_pool_str624[sizeof("psalterpahlavi")];
+ char uniname2ctype_pool_str625[sizeof("incommonindicnumberforms")];
+ char uniname2ctype_pool_str630[sizeof("lt")];
+ char uniname2ctype_pool_str636[sizeof("innewa")];
+ char uniname2ctype_pool_str639[sizeof("sk")];
+ char uniname2ctype_pool_str642[sizeof("control")];
+ char uniname2ctype_pool_str643[sizeof("inkawi")];
+ char uniname2ctype_pool_str645[sizeof("inancientsymbols")];
+ char uniname2ctype_pool_str647[sizeof("palm")];
+ char uniname2ctype_pool_str650[sizeof("inlycian")];
+ char uniname2ctype_pool_str657[sizeof("so")];
+ char uniname2ctype_pool_str660[sizeof("patternwhitespace")];
+ char uniname2ctype_pool_str672[sizeof("inmandaic")];
+ char uniname2ctype_pool_str675[sizeof("idc")];
+ char uniname2ctype_pool_str678[sizeof("meroiticcursive")];
+ char uniname2ctype_pool_str679[sizeof("intoto")];
+ char uniname2ctype_pool_str683[sizeof("vs")];
+ char uniname2ctype_pool_str692[sizeof("xids")];
+ char uniname2ctype_pool_str695[sizeof("inwarangciti")];
+ char uniname2ctype_pool_str696[sizeof("sora")];
+ char uniname2ctype_pool_str697[sizeof("inopticalcharacterrecognition")];
+ char uniname2ctype_pool_str700[sizeof("kawi")];
+ char uniname2ctype_pool_str703[sizeof("inoldsogdian")];
+ char uniname2ctype_pool_str705[sizeof("inmalayalam")];
+ char uniname2ctype_pool_str707[sizeof("bamum")];
+ char uniname2ctype_pool_str708[sizeof("inkanasupplement")];
+ char uniname2ctype_pool_str713[sizeof("insundanese")];
+ char uniname2ctype_pool_str720[sizeof("grext")];
+ char uniname2ctype_pool_str737[sizeof("print")];
+ char uniname2ctype_pool_str738[sizeof("intaitham")];
+ char uniname2ctype_pool_str742[sizeof("lower")];
+ char uniname2ctype_pool_str745[sizeof("patternsyntax")];
+ char uniname2ctype_pool_str753[sizeof("joinc")];
+ char uniname2ctype_pool_str755[sizeof("inoldsoutharabian")];
+ char uniname2ctype_pool_str760[sizeof("incjkstrokes")];
+ char uniname2ctype_pool_str761[sizeof("batk")];
+ char uniname2ctype_pool_str766[sizeof("samr")];
+ char uniname2ctype_pool_str767[sizeof("inwancho")];
+ char uniname2ctype_pool_str771[sizeof("batak")];
+ char uniname2ctype_pool_str776[sizeof("patws")];
+ char uniname2ctype_pool_str783[sizeof("samaritan")];
+ char uniname2ctype_pool_str787[sizeof("idsbinaryoperator")];
+ char uniname2ctype_pool_str791[sizeof("pauc")];
+ char uniname2ctype_pool_str794[sizeof("insmallkanaextension")];
+ char uniname2ctype_pool_str797[sizeof("sm")];
+ char uniname2ctype_pool_str799[sizeof("indominotiles")];
+ char uniname2ctype_pool_str802[sizeof("alnum")];
+ char uniname2ctype_pool_str803[sizeof("inznamennymusicalnotation")];
+ char uniname2ctype_pool_str809[sizeof("insylotinagri")];
+ char uniname2ctype_pool_str814[sizeof("inugaritic")];
+ char uniname2ctype_pool_str818[sizeof("incontrolpictures")];
+ char uniname2ctype_pool_str821[sizeof("inlinearbideograms")];
+ char uniname2ctype_pool_str822[sizeof("inmusicalsymbols")];
+ char uniname2ctype_pool_str823[sizeof("s")];
+ char uniname2ctype_pool_str824[sizeof("ital")];
+ char uniname2ctype_pool_str825[sizeof("inmodifiertoneletters")];
+ char uniname2ctype_pool_str828[sizeof("inancientgreekmusicalnotation")];
+ char uniname2ctype_pool_str838[sizeof("lisu")];
+ char uniname2ctype_pool_str842[sizeof("lowercase")];
+ char uniname2ctype_pool_str845[sizeof("cwcm")];
+ char uniname2ctype_pool_str847[sizeof("sc")];
+ char uniname2ctype_pool_str848[sizeof("bass")];
+ char uniname2ctype_pool_str855[sizeof("ids")];
+ char uniname2ctype_pool_str857[sizeof("inlatinextendeda")];
+ char uniname2ctype_pool_str875[sizeof("intaile")];
+ char uniname2ctype_pool_str886[sizeof("inmiscellaneoussymbols")];
+ char uniname2ctype_pool_str895[sizeof("inmiscellaneoussymbolsandarrows")];
+ char uniname2ctype_pool_str898[sizeof("incaucasianalbanian")];
+ char uniname2ctype_pool_str900[sizeof("inmiscellaneoussymbolsandpictographs")];
+ char uniname2ctype_pool_str906[sizeof("inoldturkic")];
+ char uniname2ctype_pool_str907[sizeof("insaurashtra")];
+ char uniname2ctype_pool_str920[sizeof("incyrillicextendeda")];
+ char uniname2ctype_pool_str924[sizeof("idcontinue")];
+ char uniname2ctype_pool_str925[sizeof("intaixuanjingsymbols")];
+ char uniname2ctype_pool_str926[sizeof("intamil")];
+ char uniname2ctype_pool_str928[sizeof("inmultani")];
+ char uniname2ctype_pool_str929[sizeof("inlatinextendede")];
+ char uniname2ctype_pool_str930[sizeof("pd")];
+ char uniname2ctype_pool_str946[sizeof("bali")];
+ char uniname2ctype_pool_str961[sizeof("blank")];
+ char uniname2ctype_pool_str963[sizeof("idst")];
+ char uniname2ctype_pool_str974[sizeof("inlydian")];
+ char uniname2ctype_pool_str986[sizeof("innewtailue")];
+ char uniname2ctype_pool_str994[sizeof("bengali")];
+ char uniname2ctype_pool_str995[sizeof("runr")];
+ char uniname2ctype_pool_str1010[sizeof("ll")];
+ char uniname2ctype_pool_str1013[sizeof("indeseret")];
+ char uniname2ctype_pool_str1015[sizeof("inancientgreeknumbers")];
+ char uniname2ctype_pool_str1021[sizeof("idstart")];
+ char uniname2ctype_pool_str1024[sizeof("zl")];
+ char uniname2ctype_pool_str1025[sizeof("inmeeteimayekextensions")];
+ char uniname2ctype_pool_str1028[sizeof("balinese")];
+ char uniname2ctype_pool_str1032[sizeof("incyrillicextendedc")];
+ char uniname2ctype_pool_str1035[sizeof("inspacingmodifierletters")];
+ char uniname2ctype_pool_str1036[sizeof("inearlydynasticcuneiform")];
+ char uniname2ctype_pool_str1049[sizeof("plrd")];
+ char uniname2ctype_pool_str1067[sizeof("canadianaboriginal")];
+ char uniname2ctype_pool_str1072[sizeof("sind")];
+ char uniname2ctype_pool_str1081[sizeof("inlatinextendedc")];
+ char uniname2ctype_pool_str1085[sizeof("uideo")];
+ char uniname2ctype_pool_str1087[sizeof("incountingrodnumerals")];
+ char uniname2ctype_pool_str1089[sizeof("zinh")];
+ char uniname2ctype_pool_str1095[sizeof("dia")];
+ char uniname2ctype_pool_str1096[sizeof("di")];
+ char uniname2ctype_pool_str1097[sizeof("inkhudawadi")];
+ char uniname2ctype_pool_str1102[sizeof("inhanifirohingya")];
+ char uniname2ctype_pool_str1104[sizeof("diak")];
+ char uniname2ctype_pool_str1105[sizeof("gong")];
+ char uniname2ctype_pool_str1107[sizeof("ingrantha")];
+ char uniname2ctype_pool_str1109[sizeof("bidic")];
+ char uniname2ctype_pool_str1114[sizeof("xidstart")];
+ char uniname2ctype_pool_str1115[sizeof("xdigit")];
+ char uniname2ctype_pool_str1119[sizeof("mong")];
+ char uniname2ctype_pool_str1120[sizeof("cased")];
+ char uniname2ctype_pool_str1134[sizeof("inhiragana")];
+ char uniname2ctype_pool_str1140[sizeof("sinhala")];
+ char uniname2ctype_pool_str1142[sizeof("adlm")];
+ char uniname2ctype_pool_str1145[sizeof("xsux")];
+ char uniname2ctype_pool_str1146[sizeof("glagolitic")];
+ char uniname2ctype_pool_str1147[sizeof("sterm")];
+ char uniname2ctype_pool_str1149[sizeof("bamu")];
+ char uniname2ctype_pool_str1150[sizeof("georgian")];
+ char uniname2ctype_pool_str1151[sizeof("inosage")];
+ char uniname2ctype_pool_str1152[sizeof("gunjalagondi")];
+ char uniname2ctype_pool_str1153[sizeof("phoenician")];
+ char uniname2ctype_pool_str1156[sizeof("inolduyghur")];
+ char uniname2ctype_pool_str1157[sizeof("multani")];
+ char uniname2ctype_pool_str1158[sizeof("kaithi")];
+ char uniname2ctype_pool_str1164[sizeof("joincontrol")];
+ char uniname2ctype_pool_str1168[sizeof("runic")];
+ char uniname2ctype_pool_str1170[sizeof("ingeneralpunctuation")];
+ char uniname2ctype_pool_str1171[sizeof("inmahajani")];
+ char uniname2ctype_pool_str1174[sizeof("incyrillicsupplement")];
+ char uniname2ctype_pool_str1175[sizeof("lowercaseletter")];
+ char uniname2ctype_pool_str1176[sizeof("marchen")];
+ char uniname2ctype_pool_str1177[sizeof("graphemelink")];
+ char uniname2ctype_pool_str1178[sizeof("ingeorgian")];
+ char uniname2ctype_pool_str1180[sizeof("khojki")];
+ char uniname2ctype_pool_str1181[sizeof("cham")];
+ char uniname2ctype_pool_str1182[sizeof("inogham")];
+ char uniname2ctype_pool_str1183[sizeof("cher")];
+ char uniname2ctype_pool_str1185[sizeof("chakma")];
+ char uniname2ctype_pool_str1186[sizeof("inkaktoviknumerals")];
+ char uniname2ctype_pool_str1190[sizeof("emoji")];
+ char uniname2ctype_pool_str1191[sizeof("insiddham")];
+ char uniname2ctype_pool_str1197[sizeof("cherokee")];
+ char uniname2ctype_pool_str1198[sizeof("khar")];
+ char uniname2ctype_pool_str1203[sizeof("inmongolian")];
+ char uniname2ctype_pool_str1204[sizeof("innagmundari")];
+ char uniname2ctype_pool_str1207[sizeof("incherokeesupplement")];
+ char uniname2ctype_pool_str1209[sizeof("manichaean")];
+ char uniname2ctype_pool_str1212[sizeof("inolchiki")];
+ char uniname2ctype_pool_str1223[sizeof("inkhitansmallscript")];
+ char uniname2ctype_pool_str1227[sizeof("quotationmark")];
+ char uniname2ctype_pool_str1229[sizeof("vithkuqi")];
+ char uniname2ctype_pool_str1230[sizeof("variationselector")];
+ char uniname2ctype_pool_str1231[sizeof("adlam")];
+ char uniname2ctype_pool_str1232[sizeof("inethiopic")];
+ char uniname2ctype_pool_str1233[sizeof("graphemebase")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1234[sizeof("age=11.0")];
+ char uniname2ctype_pool_str1235[sizeof("age=12.1")];
+ char uniname2ctype_pool_str1236[sizeof("age=10.0")];
+ char uniname2ctype_pool_str1237[sizeof("age=12.0")];
+ char uniname2ctype_pool_str1241[sizeof("age=13.0")];
+ char uniname2ctype_pool_str1242[sizeof("age=1.1")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1243[sizeof("casedletter")];
+ char uniname2ctype_pool_str1244[sizeof("ingurmukhi")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1245[sizeof("age=2.1")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1246[sizeof("incjkunifiedideographsextensiona")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1247[sizeof("age=2.0")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1248[sizeof("lu")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1249[sizeof("age=3.1")];
+ char uniname2ctype_pool_str1250[sizeof("age=9.0")];
+ char uniname2ctype_pool_str1251[sizeof("age=3.0")];
+ char uniname2ctype_pool_str1252[sizeof("age=3.2")];
+ char uniname2ctype_pool_str1253[sizeof("age=8.0")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1254[sizeof("intamilsupplement")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1255[sizeof("age=6.1")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1256[sizeof("unknown")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1257[sizeof("age=6.0")];
+ char uniname2ctype_pool_str1258[sizeof("age=6.2")];
+ char uniname2ctype_pool_str1259[sizeof("age=15.0")];
+ char uniname2ctype_pool_str1260[sizeof("age=7.0")];
+ char uniname2ctype_pool_str1262[sizeof("age=6.3")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1263[sizeof("cwt")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1265[sizeof("age=14.0")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1266[sizeof("unassigned")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1267[sizeof("age=5.1")];
+ char uniname2ctype_pool_str1269[sizeof("age=5.0")];
+ char uniname2ctype_pool_str1270[sizeof("age=5.2")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1271[sizeof("diacritic")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1273[sizeof("age=4.1")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1274[sizeof("ahom")];
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ char uniname2ctype_pool_str1275[sizeof("age=4.0")];
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ char uniname2ctype_pool_str1282[sizeof("incjkunifiedideographsextensione")];
+ char uniname2ctype_pool_str1285[sizeof("khmr")];
+ char uniname2ctype_pool_str1289[sizeof("insinhala")];
+ char uniname2ctype_pool_str1292[sizeof("inmiscellaneoustechnical")];
+ char uniname2ctype_pool_str1297[sizeof("saur")];
+ char uniname2ctype_pool_str1300[sizeof("guru")];
+ char uniname2ctype_pool_str1301[sizeof("sundanese")];
+ char uniname2ctype_pool_str1306[sizeof("punct")];
+ char uniname2ctype_pool_str1314[sizeof("paucinhau")];
+ char uniname2ctype_pool_str1317[sizeof("gurmukhi")];
+ char uniname2ctype_pool_str1328[sizeof("chorasmian")];
+ char uniname2ctype_pool_str1331[sizeof("logicalorderexception")];
+ char uniname2ctype_pool_str1340[sizeof("khmer")];
+ char uniname2ctype_pool_str1343[sizeof("limbu")];
+ char uniname2ctype_pool_str1349[sizeof("chrs")];
+ char uniname2ctype_pool_str1352[sizeof("oriya")];
+ char uniname2ctype_pool_str1354[sizeof("inscriptionalpahlavi")];
+ char uniname2ctype_pool_str1356[sizeof("incyrillicextendedd")];
+ char uniname2ctype_pool_str1358[sizeof("incjkunifiedideographsextensionc")];
+ char uniname2ctype_pool_str1360[sizeof("cntrl")];
+ char uniname2ctype_pool_str1365[sizeof("inlatinextendedadditional")];
+ char uniname2ctype_pool_str1367[sizeof("insorasompeng")];
+ char uniname2ctype_pool_str1369[sizeof("radical")];
+ char uniname2ctype_pool_str1373[sizeof("emojimodifier")];
+ char uniname2ctype_pool_str1375[sizeof("kharoshthi")];
+ char uniname2ctype_pool_str1380[sizeof("n")];
+ char uniname2ctype_pool_str1384[sizeof("math")];
+ char uniname2ctype_pool_str1387[sizeof("goth")];
+ char uniname2ctype_pool_str1392[sizeof("phnx")];
+ char uniname2ctype_pool_str1400[sizeof("anatolianhieroglyphs")];
+ char uniname2ctype_pool_str1401[sizeof("inenclosedalphanumerics")];
+ char uniname2ctype_pool_str1407[sizeof("nandinagari")];
+ char uniname2ctype_pool_str1409[sizeof("no")];
+ char uniname2ctype_pool_str1415[sizeof("intangsa")];
+ char uniname2ctype_pool_str1419[sizeof("nko")];
+ char uniname2ctype_pool_str1420[sizeof("nkoo")];
+ char uniname2ctype_pool_str1422[sizeof("ingreekandcoptic")];
+ char uniname2ctype_pool_str1426[sizeof("p")];
+ char uniname2ctype_pool_str1428[sizeof("grantha")];
+ char uniname2ctype_pool_str1429[sizeof("decimalnumber")];
+ char uniname2ctype_pool_str1438[sizeof("incjkunifiedideographs")];
+ char uniname2ctype_pool_str1442[sizeof("intirhuta")];
+ char uniname2ctype_pool_str1448[sizeof("inhatran")];
+ char uniname2ctype_pool_str1449[sizeof("linb")];
+ char uniname2ctype_pool_str1451[sizeof("mult")];
+ char uniname2ctype_pool_str1454[sizeof("saurashtra")];
+ char uniname2ctype_pool_str1457[sizeof("kthi")];
+ char uniname2ctype_pool_str1460[sizeof("zanb")];
+ char uniname2ctype_pool_str1462[sizeof("inbhaiksuki")];
+ char uniname2ctype_pool_str1470[sizeof("innabataean")];
+ char uniname2ctype_pool_str1471[sizeof("inphoenician")];
+ char uniname2ctype_pool_str1474[sizeof("xpeo")];
+ char uniname2ctype_pool_str1475[sizeof("inkanbun")];
+ char uniname2ctype_pool_str1476[sizeof("inmeroitichieroglyphs")];
+ char uniname2ctype_pool_str1480[sizeof("ahex")];
+ char uniname2ctype_pool_str1489[sizeof("enclosingmark")];
+ char uniname2ctype_pool_str1495[sizeof("sd")];
+ char uniname2ctype_pool_str1497[sizeof("inelbasan")];
+ char uniname2ctype_pool_str1499[sizeof("inenclosedideographicsupplement")];
+ char uniname2ctype_pool_str1501[sizeof("sidd")];
+ char uniname2ctype_pool_str1507[sizeof("linearb")];
+ char uniname2ctype_pool_str1508[sizeof("cpmn")];
+ char uniname2ctype_pool_str1517[sizeof("inenclosedalphanumericsupplement")];
+ char uniname2ctype_pool_str1520[sizeof("bidicontrol")];
+ char uniname2ctype_pool_str1524[sizeof("inphaistosdisc")];
+ char uniname2ctype_pool_str1529[sizeof("limb")];
+ char uniname2ctype_pool_str1531[sizeof("inkangxiradicals")];
+ char uniname2ctype_pool_str1533[sizeof("lepc")];
+ char uniname2ctype_pool_str1536[sizeof("braille")];
+ char uniname2ctype_pool_str1537[sizeof("regionalindicator")];
+ char uniname2ctype_pool_str1542[sizeof("inlowsurrogates")];
+ char uniname2ctype_pool_str1547[sizeof("brah")];
+ char uniname2ctype_pool_str1549[sizeof("inoldhungarian")];
+ char uniname2ctype_pool_str1557[sizeof("beng")];
+ char uniname2ctype_pool_str1563[sizeof("emojimodifierbase")];
+ char uniname2ctype_pool_str1565[sizeof("inarabic")];
+ char uniname2ctype_pool_str1570[sizeof("osage")];
+ char uniname2ctype_pool_str1572[sizeof("inherited")];
+ char uniname2ctype_pool_str1577[sizeof("incyprominoan")];
+ char uniname2ctype_pool_str1580[sizeof("glag")];
+ char uniname2ctype_pool_str1582[sizeof("medf")];
+ char uniname2ctype_pool_str1583[sizeof("osma")];
+ char uniname2ctype_pool_str1587[sizeof("indogra")];
+ char uniname2ctype_pool_str1597[sizeof("arab")];
+ char uniname2ctype_pool_str1598[sizeof("medefaidrin")];
+ char uniname2ctype_pool_str1607[sizeof("inshorthandformatcontrols")];
+ char uniname2ctype_pool_str1613[sizeof("phli")];
+ char uniname2ctype_pool_str1617[sizeof("inimperialaramaic")];
+ char uniname2ctype_pool_str1618[sizeof("emod")];
+ char uniname2ctype_pool_str1622[sizeof("ingreekextended")];
+ char uniname2ctype_pool_str1623[sizeof("inanatolianhieroglyphs")];
+ char uniname2ctype_pool_str1629[sizeof("punctuation")];
+ char uniname2ctype_pool_str1635[sizeof("graphemeextend")];
+ char uniname2ctype_pool_str1643[sizeof("cwl")];
+ char uniname2ctype_pool_str1644[sizeof("vith")];
+ char uniname2ctype_pool_str1654[sizeof("ingeometricshapes")];
+ char uniname2ctype_pool_str1655[sizeof("emojicomponent")];
+ char uniname2ctype_pool_str1657[sizeof("dsrt")];
+ char uniname2ctype_pool_str1662[sizeof("coptic")];
+ char uniname2ctype_pool_str1664[sizeof("inkayahli")];
+ char uniname2ctype_pool_str1671[sizeof("inoriya")];
+ char uniname2ctype_pool_str1675[sizeof("inarabicpresentationformsa")];
+ char uniname2ctype_pool_str1677[sizeof("inbasiclatin")];
+ char uniname2ctype_pool_str1682[sizeof("incjkunifiedideographsextensiond")];
+ char uniname2ctype_pool_str1684[sizeof("wara")];
+ char uniname2ctype_pool_str1686[sizeof("sinh")];
+ char uniname2ctype_pool_str1687[sizeof("sund")];
+ char uniname2ctype_pool_str1691[sizeof("shavian")];
+ char uniname2ctype_pool_str1699[sizeof("insundanesesupplement")];
+ char uniname2ctype_pool_str1701[sizeof("inyezidi")];
+ char uniname2ctype_pool_str1704[sizeof("bhks")];
+ char uniname2ctype_pool_str1714[sizeof("bhaiksuki")];
+ char uniname2ctype_pool_str1722[sizeof("inhanunoo")];
+ char uniname2ctype_pool_str1724[sizeof("intangut")];
+ char uniname2ctype_pool_str1728[sizeof("sogdian")];
+ char uniname2ctype_pool_str1729[sizeof("inlatinextendedd")];
+ char uniname2ctype_pool_str1730[sizeof("sogo")];
+ char uniname2ctype_pool_str1731[sizeof("insinhalaarchaicnumbers")];
+ char uniname2ctype_pool_str1732[sizeof("ideographic")];
+ char uniname2ctype_pool_str1733[sizeof("ugar")];
+ char uniname2ctype_pool_str1734[sizeof("deseret")];
+ char uniname2ctype_pool_str1735[sizeof("odi")];
+ char uniname2ctype_pool_str1740[sizeof("copt")];
+ char uniname2ctype_pool_str1742[sizeof("imperialaramaic")];
+ char uniname2ctype_pool_str1745[sizeof("insogdian")];
+ char uniname2ctype_pool_str1746[sizeof("indingbats")];
+ char uniname2ctype_pool_str1750[sizeof("format")];
+ char uniname2ctype_pool_str1752[sizeof("ininscriptionalpahlavi")];
+ char uniname2ctype_pool_str1753[sizeof("lyci")];
+ char uniname2ctype_pool_str1757[sizeof("ininscriptionalparthian")];
+ char uniname2ctype_pool_str1766[sizeof("grbase")];
+ char uniname2ctype_pool_str1768[sizeof("lycian")];
+ char uniname2ctype_pool_str1769[sizeof("inbatak")];
+ char uniname2ctype_pool_str1776[sizeof("cprt")];
+ char uniname2ctype_pool_str1781[sizeof("inunifiedcanadianaboriginalsyllabicsextendeda")];
+ char uniname2ctype_pool_str1788[sizeof("mymr")];
+ char uniname2ctype_pool_str1793[sizeof("myanmar")];
+ char uniname2ctype_pool_str1806[sizeof("intibetan")];
+ char uniname2ctype_pool_str1810[sizeof("intags")];
+ char uniname2ctype_pool_str1811[sizeof("asciihexdigit")];
+ char uniname2ctype_pool_str1813[sizeof("sentenceterminal")];
+ char uniname2ctype_pool_str1821[sizeof("nand")];
+ char uniname2ctype_pool_str1828[sizeof("inblockelements")];
+ char uniname2ctype_pool_str1838[sizeof("inornamentaldingbats")];
+ char uniname2ctype_pool_str1841[sizeof("inethiopicextendeda")];
+ char uniname2ctype_pool_str1842[sizeof("innumberforms")];
+ char uniname2ctype_pool_str1843[sizeof("cwcf")];
+ char uniname2ctype_pool_str1845[sizeof("oidc")];
+ char uniname2ctype_pool_str1848[sizeof("bopo")];
+ char uniname2ctype_pool_str1851[sizeof("cuneiform")];
+ char uniname2ctype_pool_str1866[sizeof("caseignorable")];
+ char uniname2ctype_pool_str1871[sizeof("inoldpersian")];
+ char uniname2ctype_pool_str1881[sizeof("cwu")];
+ char uniname2ctype_pool_str1888[sizeof("inelymaic")];
+ char uniname2ctype_pool_str1889[sizeof("insoyombo")];
+ char uniname2ctype_pool_str1896[sizeof("ingeometricshapesextended")];
+ char uniname2ctype_pool_str1902[sizeof("incjkcompatibility")];
+ char uniname2ctype_pool_str1904[sizeof("inmyanmarextendedb")];
+ char uniname2ctype_pool_str1905[sizeof("innushu")];
+ char uniname2ctype_pool_str1912[sizeof("inkanaextendedb")];
+ char uniname2ctype_pool_str1913[sizeof("olck")];
+ char uniname2ctype_pool_str1916[sizeof("inbyzantinemusicalsymbols")];
+ char uniname2ctype_pool_str1924[sizeof("olchiki")];
+ char uniname2ctype_pool_str1929[sizeof("inkatakanaphoneticextensions")];
+ char uniname2ctype_pool_str1932[sizeof("incoptic")];
+ char uniname2ctype_pool_str1935[sizeof("oids")];
+ char uniname2ctype_pool_str1936[sizeof("inarabicextendeda")];
+ char uniname2ctype_pool_str1941[sizeof("modifierletter")];
+ char uniname2ctype_pool_str1950[sizeof("incjksymbolsandpunctuation")];
+ char uniname2ctype_pool_str1956[sizeof("olower")];
+ char uniname2ctype_pool_str1958[sizeof("bopomofo")];
+ char uniname2ctype_pool_str1964[sizeof("inlisu")];
+ char uniname2ctype_pool_str1967[sizeof("inoldpermic")];
+ char uniname2ctype_pool_str1968[sizeof("innoblock")];
+ char uniname2ctype_pool_str1969[sizeof("ext")];
+ char uniname2ctype_pool_str1974[sizeof("inunifiedcanadianaboriginalsyllabics")];
+ char uniname2ctype_pool_str1981[sizeof("takri")];
+ char uniname2ctype_pool_str1985[sizeof("inbraillepatterns")];
+ char uniname2ctype_pool_str1988[sizeof("invai")];
+ char uniname2ctype_pool_str1991[sizeof("alpha")];
+ char uniname2ctype_pool_str1993[sizeof("inbalinese")];
+ char uniname2ctype_pool_str1994[sizeof("sorasompeng")];
+ char uniname2ctype_pool_str1996[sizeof("closepunctuation")];
+ char uniname2ctype_pool_str2001[sizeof("hani")];
+ char uniname2ctype_pool_str2002[sizeof("inmayannumerals")];
+ char uniname2ctype_pool_str2004[sizeof("han")];
+ char uniname2ctype_pool_str2006[sizeof("inmiscellaneousmathematicalsymbolsb")];
+ char uniname2ctype_pool_str2010[sizeof("inlepcha")];
+ char uniname2ctype_pool_str2011[sizeof("patsyn")];
+ char uniname2ctype_pool_str2012[sizeof("inlisusupplement")];
+ char uniname2ctype_pool_str2014[sizeof("insyriacsupplement")];
+ char uniname2ctype_pool_str2015[sizeof("hano")];
+ char uniname2ctype_pool_str2016[sizeof("newa")];
+ char uniname2ctype_pool_str2023[sizeof("spacingmark")];
+ char uniname2ctype_pool_str2024[sizeof("inpalmyrene")];
+ char uniname2ctype_pool_str2026[sizeof("takr")];
+ char uniname2ctype_pool_str2033[sizeof("xposixpunct")];
+ char uniname2ctype_pool_str2040[sizeof("inkhojki")];
+ char uniname2ctype_pool_str2042[sizeof("taile")];
+ char uniname2ctype_pool_str2043[sizeof("assigned")];
+ char uniname2ctype_pool_str2044[sizeof("hanunoo")];
+ char uniname2ctype_pool_str2047[sizeof("hira")];
+ char uniname2ctype_pool_str2048[sizeof("inarabicextendedc")];
+ char uniname2ctype_pool_str2062[sizeof("newtailue")];
+ char uniname2ctype_pool_str2070[sizeof("space")];
+ char uniname2ctype_pool_str2073[sizeof("intelugu")];
+ char uniname2ctype_pool_str2077[sizeof("lydi")];
+ char uniname2ctype_pool_str2078[sizeof("idsb")];
+ char uniname2ctype_pool_str2090[sizeof("extpict")];
+ char uniname2ctype_pool_str2092[sizeof("lydian")];
+ char uniname2ctype_pool_str2095[sizeof("inethiopicsupplement")];
+ char uniname2ctype_pool_str2103[sizeof("sarb")];
+ char uniname2ctype_pool_str2110[sizeof("ugaritic")];
+ char uniname2ctype_pool_str2114[sizeof("inyiradicals")];
+ char uniname2ctype_pool_str2115[sizeof("inphoneticextensions")];
+ char uniname2ctype_pool_str2117[sizeof("sharada")];
+ char uniname2ctype_pool_str2128[sizeof("zanabazarsquare")];
+ char uniname2ctype_pool_str2135[sizeof("bugi")];
+ char uniname2ctype_pool_str2137[sizeof("word")];
+ char uniname2ctype_pool_str2141[sizeof("term")];
+ char uniname2ctype_pool_str2145[sizeof("separator")];
+ char uniname2ctype_pool_str2146[sizeof("ingeorgiansupplement")];
+ char uniname2ctype_pool_str2149[sizeof("sogd")];
+ char uniname2ctype_pool_str2163[sizeof("extender")];
+ char uniname2ctype_pool_str2165[sizeof("shrd")];
+ char uniname2ctype_pool_str2166[sizeof("graph")];
+ char uniname2ctype_pool_str2174[sizeof("tnsa")];
+ char uniname2ctype_pool_str2178[sizeof("tangsa")];
+ char uniname2ctype_pool_str2181[sizeof("phag")];
+ char uniname2ctype_pool_str2182[sizeof("dogra")];
+ char uniname2ctype_pool_str2195[sizeof("inhanguljamo")];
+ char uniname2ctype_pool_str2196[sizeof("inshavian")];
+ char uniname2ctype_pool_str2207[sizeof("siddham")];
+ char uniname2ctype_pool_str2211[sizeof("cf")];
+ char uniname2ctype_pool_str2216[sizeof("inunifiedcanadianaboriginalsyllabicsextended")];
+ char uniname2ctype_pool_str2217[sizeof("buginese")];
+ char uniname2ctype_pool_str2218[sizeof("inmongoliansupplement")];
+ char uniname2ctype_pool_str2219[sizeof("cyrl")];
+ char uniname2ctype_pool_str2224[sizeof("inhanguljamoextendeda")];
+ char uniname2ctype_pool_str2228[sizeof("pf")];
+ char uniname2ctype_pool_str2229[sizeof("number")];
+ char uniname2ctype_pool_str2232[sizeof("inphoneticextensionssupplement")];
+ char uniname2ctype_pool_str2233[sizeof("dogr")];
+ char uniname2ctype_pool_str2234[sizeof("mlym")];
+ char uniname2ctype_pool_str2235[sizeof("incopticepactnumbers")];
+ char uniname2ctype_pool_str2241[sizeof("malayalam")];
+ char uniname2ctype_pool_str2244[sizeof("inbamum")];
+ char uniname2ctype_pool_str2247[sizeof("nd")];
+ char uniname2ctype_pool_str2248[sizeof("insuttonsignwriting")];
+ char uniname2ctype_pool_str2276[sizeof("inethiopicextended")];
+ char uniname2ctype_pool_str2278[sizeof("shaw")];
+ char uniname2ctype_pool_str2279[sizeof("palmyrene")];
+ char uniname2ctype_pool_str2283[sizeof("soyo")];
+ char uniname2ctype_pool_str2296[sizeof("incjkunifiedideographsextensionh")];
+ char uniname2ctype_pool_str2305[sizeof("sgnw")];
+ char uniname2ctype_pool_str2308[sizeof("toto")];
+ char uniname2ctype_pool_str2312[sizeof("caucasianalbanian")];
+ char uniname2ctype_pool_str2315[sizeof("inmathematicalalphanumericsymbols")];
+ char uniname2ctype_pool_str2316[sizeof("incjkunifiedideographsextensiong")];
+ char uniname2ctype_pool_str2318[sizeof("hatran")];
+ char uniname2ctype_pool_str2321[sizeof("taiviet")];
+ char uniname2ctype_pool_str2323[sizeof("meroitichieroglyphs")];
+ char uniname2ctype_pool_str2327[sizeof("ingeorgianextended")];
+ char uniname2ctype_pool_str2331[sizeof("incjkunifiedideographsextensionf")];
+ char uniname2ctype_pool_str2333[sizeof("oldpersian")];
+ char uniname2ctype_pool_str2343[sizeof("induployan")];
+ char uniname2ctype_pool_str2344[sizeof("incyrillicextendedb")];
+ char uniname2ctype_pool_str2345[sizeof("dash")];
+ char uniname2ctype_pool_str2353[sizeof("hatr")];
+ char uniname2ctype_pool_str2361[sizeof("innyiakengpuachuehmong")];
+ char uniname2ctype_pool_str2364[sizeof("incombiningdiacriticalmarks")];
+ char uniname2ctype_pool_str2373[sizeof("nl")];
+ char uniname2ctype_pool_str2374[sizeof("incombiningdiacriticalmarksforsymbols")];
+ char uniname2ctype_pool_str2375[sizeof("khudawadi")];
+ char uniname2ctype_pool_str2397[sizeof("incjkradicalssupplement")];
+ char uniname2ctype_pool_str2398[sizeof("inglagolitic")];
+ char uniname2ctype_pool_str2405[sizeof("orkh")];
+ char uniname2ctype_pool_str2414[sizeof("syrc")];
+ char uniname2ctype_pool_str2427[sizeof("surrogate")];
+ char uniname2ctype_pool_str2433[sizeof("indevanagari")];
+ char uniname2ctype_pool_str2434[sizeof("avestan")];
+ char uniname2ctype_pool_str2437[sizeof("oldpermic")];
+ char uniname2ctype_pool_str2440[sizeof("ethi")];
+ char uniname2ctype_pool_str2451[sizeof("ogam")];
+ char uniname2ctype_pool_str2454[sizeof("rohg")];
+ char uniname2ctype_pool_str2460[sizeof("idstrinaryoperator")];
+ char uniname2ctype_pool_str2464[sizeof("java")];
+ char uniname2ctype_pool_str2470[sizeof("inphagspa")];
+ char uniname2ctype_pool_str2475[sizeof("lepcha")];
+ char uniname2ctype_pool_str2476[sizeof("indevanagariextendeda")];
+ char uniname2ctype_pool_str2478[sizeof("intifinagh")];
+ char uniname2ctype_pool_str2479[sizeof("intagalog")];
+ char uniname2ctype_pool_str2481[sizeof("incombiningdiacriticalmarkssupplement")];
+ char uniname2ctype_pool_str2500[sizeof("tale")];
+ char uniname2ctype_pool_str2506[sizeof("inbrahmi")];
+ char uniname2ctype_pool_str2511[sizeof("terminalpunctuation")];
+ char uniname2ctype_pool_str2513[sizeof("insymbolsandpictographsextendeda")];
+ char uniname2ctype_pool_str2530[sizeof("syriac")];
+ char uniname2ctype_pool_str2534[sizeof("inbengali")];
+ char uniname2ctype_pool_str2535[sizeof("nagm")];
+ char uniname2ctype_pool_str2545[sizeof("extendedpictographic")];
+ char uniname2ctype_pool_str2548[sizeof("buhd")];
+ char uniname2ctype_pool_str2549[sizeof("javanese")];
+ char uniname2ctype_pool_str2551[sizeof("taml")];
+ char uniname2ctype_pool_str2564[sizeof("inbuginese")];
+ char uniname2ctype_pool_str2567[sizeof("inlatin1supplement")];
+ char uniname2ctype_pool_str2570[sizeof("ingothic")];
+ char uniname2ctype_pool_str2572[sizeof("invariationselectors")];
+ char uniname2ctype_pool_str2574[sizeof("hex")];
+ char uniname2ctype_pool_str2575[sizeof("inverticalforms")];
+ char uniname2ctype_pool_str2576[sizeof("ebase")];
+ char uniname2ctype_pool_str2582[sizeof("incurrencysymbols")];
+ char uniname2ctype_pool_str2588[sizeof("avst")];
+ char uniname2ctype_pool_str2602[sizeof("osge")];
+ char uniname2ctype_pool_str2606[sizeof("incombiningdiacriticalmarksextended")];
+ char uniname2ctype_pool_str2608[sizeof("intaiviet")];
+ char uniname2ctype_pool_str2609[sizeof("spaceseparator")];
+ char uniname2ctype_pool_str2625[sizeof("softdotted")];
+ char uniname2ctype_pool_str2648[sizeof("nchar")];
+ char uniname2ctype_pool_str2652[sizeof("invedicextensions")];
+ char uniname2ctype_pool_str2656[sizeof("inlimbu")];
+ char uniname2ctype_pool_str2657[sizeof("olditalic")];
+ char uniname2ctype_pool_str2665[sizeof("gujr")];
+ char uniname2ctype_pool_str2666[sizeof("mathsymbol")];
+ char uniname2ctype_pool_str2670[sizeof("incjkunifiedideographsextensionb")];
+ char uniname2ctype_pool_str2674[sizeof("gujarati")];
+ char uniname2ctype_pool_str2688[sizeof("phagspa")];
+ char uniname2ctype_pool_str2689[sizeof("invariationselectorssupplement")];
+ char uniname2ctype_pool_str2694[sizeof("currencysymbol")];
+ char uniname2ctype_pool_str2705[sizeof("inlinearbsyllabary")];
+ char uniname2ctype_pool_str2726[sizeof("wancho")];
+ char uniname2ctype_pool_str2750[sizeof("inpaucinhau")];
+ char uniname2ctype_pool_str2761[sizeof("other")];
+ char uniname2ctype_pool_str2762[sizeof("otheridcontinue")];
+ char uniname2ctype_pool_str2765[sizeof("sylo")];
+ char uniname2ctype_pool_str2766[sizeof("zp")];
+ char uniname2ctype_pool_str2769[sizeof("inaegeannumbers")];
+ char uniname2ctype_pool_str2772[sizeof("warangciti")];
+ char uniname2ctype_pool_str2775[sizeof("othernumber")];
+ char uniname2ctype_pool_str2786[sizeof("digit")];
+ char uniname2ctype_pool_str2793[sizeof("nonspacingmark")];
+ char uniname2ctype_pool_str2801[sizeof("titlecaseletter")];
+ char uniname2ctype_pool_str2808[sizeof("inmeroiticcursive")];
+ char uniname2ctype_pool_str2810[sizeof("wcho")];
+ char uniname2ctype_pool_str2816[sizeof("graphemeclusterbreak=spacingmark")];
+ char uniname2ctype_pool_str2821[sizeof("inletterlikesymbols")];
+ char uniname2ctype_pool_str2830[sizeof("inottomansiyaqnumbers")];
+ char uniname2ctype_pool_str2834[sizeof("intagbanwa")];
+ char uniname2ctype_pool_str2836[sizeof("cyrillic")];
+ char uniname2ctype_pool_str2847[sizeof("oalpha")];
+ char uniname2ctype_pool_str2852[sizeof("graphemeclusterbreak=cr")];
+ char uniname2ctype_pool_str2855[sizeof("narb")];
+ char uniname2ctype_pool_str2856[sizeof("changeswhencasemapped")];
+ char uniname2ctype_pool_str2859[sizeof("inbopomofo")];
+ char uniname2ctype_pool_str2867[sizeof("graphemeclusterbreak=regionalindicator")];
+ char uniname2ctype_pool_str2868[sizeof("otheralphabetic")];
+ char uniname2ctype_pool_str2871[sizeof("noncharactercodepoint")];
+ char uniname2ctype_pool_str2879[sizeof("oldhungarian")];
+ char uniname2ctype_pool_str2886[sizeof("insymbolsforlegacycomputing")];
+ char uniname2ctype_pool_str2902[sizeof("insmallformvariants")];
+ char uniname2ctype_pool_str2904[sizeof("inhangulsyllables")];
+ char uniname2ctype_pool_str2905[sizeof("emojipresentation")];
+ char uniname2ctype_pool_str2907[sizeof("epres")];
+ char uniname2ctype_pool_str2909[sizeof("inbassavah")];
+ char uniname2ctype_pool_str2911[sizeof("indevanagariextended")];
+ char uniname2ctype_pool_str2941[sizeof("inbuhid")];
+ char uniname2ctype_pool_str2953[sizeof("tirhuta")];
+ char uniname2ctype_pool_str2964[sizeof("inpsalterpahlavi")];
+ char uniname2ctype_pool_str2966[sizeof("whitespace")];
+ char uniname2ctype_pool_str2967[sizeof("finalpunctuation")];
+ char uniname2ctype_pool_str2970[sizeof("orya")];
+ char uniname2ctype_pool_str2980[sizeof("phlp")];
+ char uniname2ctype_pool_str2984[sizeof("inbamumsupplement")];
+ char uniname2ctype_pool_str2986[sizeof("buhid")];
+ char uniname2ctype_pool_str2987[sizeof("paragraphseparator")];
+ char uniname2ctype_pool_str2988[sizeof("inalphabeticpresentationforms")];
+ char uniname2ctype_pool_str2997[sizeof("inlatinextendedg")];
+ char uniname2ctype_pool_str3001[sizeof("elba")];
+ char uniname2ctype_pool_str3002[sizeof("changeswhentitlecased")];
+ char uniname2ctype_pool_str3005[sizeof("incombininghalfmarks")];
+ char uniname2ctype_pool_str3006[sizeof("intangutcomponents")];
+ char uniname2ctype_pool_str3015[sizeof("thaa")];
+ char uniname2ctype_pool_str3018[sizeof("thai")];
+ char uniname2ctype_pool_str3019[sizeof("oldturkic")];
+ char uniname2ctype_pool_str3026[sizeof("thaana")];
+ char uniname2ctype_pool_str3027[sizeof("inlatinextendedf")];
+ char uniname2ctype_pool_str3035[sizeof("ougr")];
+ char uniname2ctype_pool_str3042[sizeof("tang")];
+ char uniname2ctype_pool_str3045[sizeof("inarabicmathematicalalphabeticsymbols")];
+ char uniname2ctype_pool_str3048[sizeof("tagbanwa")];
+ char uniname2ctype_pool_str3052[sizeof("tamil")];
+ char uniname2ctype_pool_str3053[sizeof("khitansmallscript")];
+ char uniname2ctype_pool_str3058[sizeof("mahj")];
+ char uniname2ctype_pool_str3067[sizeof("mahajani")];
+ char uniname2ctype_pool_str3068[sizeof("hang")];
+ char uniname2ctype_pool_str3071[sizeof("tirh")];
+ char uniname2ctype_pool_str3072[sizeof("sylotinagri")];
+ char uniname2ctype_pool_str3082[sizeof("talu")];
+ char uniname2ctype_pool_str3084[sizeof("nagmundari")];
+ char uniname2ctype_pool_str3086[sizeof("deva")];
+ char uniname2ctype_pool_str3087[sizeof("ingujarati")];
+ char uniname2ctype_pool_str3091[sizeof("deprecated")];
+ char uniname2ctype_pool_str3099[sizeof("inarabicpresentationformsb")];
+ char uniname2ctype_pool_str3104[sizeof("devanagari")];
+ char uniname2ctype_pool_str3106[sizeof("ingunjalagondi")];
+ char uniname2ctype_pool_str3107[sizeof("graphemeclusterbreak=t")];
+ char uniname2ctype_pool_str3109[sizeof("graphemeclusterbreak=lvt")];
+ char uniname2ctype_pool_str3110[sizeof("taitham")];
+ char uniname2ctype_pool_str3111[sizeof("nbat")];
+ char uniname2ctype_pool_str3118[sizeof("telu")];
+ char uniname2ctype_pool_str3123[sizeof("hiragana")];
+ char uniname2ctype_pool_str3125[sizeof("nabataean")];
+ char uniname2ctype_pool_str3135[sizeof("inrejang")];
+ char uniname2ctype_pool_str3142[sizeof("intangutsupplement")];
+ char uniname2ctype_pool_str3145[sizeof("khoj")];
+ char uniname2ctype_pool_str3155[sizeof("hmng")];
+ char uniname2ctype_pool_str3157[sizeof("cyprominoan")];
+ char uniname2ctype_pool_str3158[sizeof("inhebrew")];
+ char uniname2ctype_pool_str3176[sizeof("inmathematicaloperators")];
+ char uniname2ctype_pool_str3180[sizeof("inarabicsupplement")];
+ char uniname2ctype_pool_str3193[sizeof("inenclosedcjklettersandmonths")];
+ char uniname2ctype_pool_str3209[sizeof("changeswhenlowercased")];
+ char uniname2ctype_pool_str3212[sizeof("tangut")];
+ char uniname2ctype_pool_str3215[sizeof("elbasan")];
+ char uniname2ctype_pool_str3218[sizeof("osmanya")];
+ char uniname2ctype_pool_str3237[sizeof("insuperscriptsandsubscripts")];
+ char uniname2ctype_pool_str3239[sizeof("graphemeclusterbreak=extend")];
+ char uniname2ctype_pool_str3240[sizeof("graphemeclusterbreak=prepend")];
+ char uniname2ctype_pool_str3248[sizeof("nshu")];
+ char uniname2ctype_pool_str3254[sizeof("otherlowercase")];
+ char uniname2ctype_pool_str3265[sizeof("inethiopicextendedb")];
+ char uniname2ctype_pool_str3267[sizeof("otherletter")];
+ char uniname2ctype_pool_str3275[sizeof("kayahli")];
+ char uniname2ctype_pool_str3284[sizeof("inplayingcards")];
+ char uniname2ctype_pool_str3287[sizeof("elym")];
+ char uniname2ctype_pool_str3297[sizeof("graphemeclusterbreak=l")];
+ char uniname2ctype_pool_str3303[sizeof("graphemeclusterbreak=control")];
+ char uniname2ctype_pool_str3313[sizeof("ogrext")];
+ char uniname2ctype_pool_str3320[sizeof("elymaic")];
+ char uniname2ctype_pool_str3328[sizeof("changeswhenuppercased")];
+ char uniname2ctype_pool_str3329[sizeof("inalchemicalsymbols")];
+ char uniname2ctype_pool_str3331[sizeof("oldsogdian")];
+ char uniname2ctype_pool_str3338[sizeof("otheridstart")];
+ char uniname2ctype_pool_str3348[sizeof("insupplementalarrowsa")];
+ char uniname2ctype_pool_str3350[sizeof("invithkuqi")];
+ char uniname2ctype_pool_str3355[sizeof("symbol")];
+ char uniname2ctype_pool_str3360[sizeof("inarabicextendedb")];
+ char uniname2ctype_pool_str3371[sizeof("cypriot")];
+ char uniname2ctype_pool_str3372[sizeof("any")];
+ char uniname2ctype_pool_str3373[sizeof("otheruppercase")];
+ char uniname2ctype_pool_str3377[sizeof("rjng")];
+ char uniname2ctype_pool_str3391[sizeof("wspace")];
+ char uniname2ctype_pool_str3396[sizeof("inindicsiyaqnumbers")];
+ char uniname2ctype_pool_str3405[sizeof("inprivateusearea")];
+ char uniname2ctype_pool_str3416[sizeof("othersymbol")];
+ char uniname2ctype_pool_str3428[sizeof("oupper")];
+ char uniname2ctype_pool_str3433[sizeof("signwriting")];
+ char uniname2ctype_pool_str3436[sizeof("nushu")];
+ char uniname2ctype_pool_str3455[sizeof("hmnp")];
+ char uniname2ctype_pool_str3458[sizeof("upper")];
+ char uniname2ctype_pool_str3460[sizeof("insupplementalarrowsc")];
+ char uniname2ctype_pool_str3483[sizeof("omath")];
+ char uniname2ctype_pool_str3502[sizeof("modifiersymbol")];
+ char uniname2ctype_pool_str3504[sizeof("hebr")];
+ char uniname2ctype_pool_str3505[sizeof("inhalfwidthandfullwidthforms")];
+ char uniname2ctype_pool_str3511[sizeof("insupplementalmathematicaloperators")];
+ char uniname2ctype_pool_str3532[sizeof("inpahawhhmong")];
+ char uniname2ctype_pool_str3533[sizeof("alphabetic")];
+ char uniname2ctype_pool_str3558[sizeof("uppercase")];
+ char uniname2ctype_pool_str3580[sizeof("dupl")];
+ char uniname2ctype_pool_str3590[sizeof("ogham")];
+ char uniname2ctype_pool_str3613[sizeof("dashpunctuation")];
+ char uniname2ctype_pool_str3618[sizeof("hangul")];
+ char uniname2ctype_pool_str3648[sizeof("inhanguljamoextendedb")];
+ char uniname2ctype_pool_str3659[sizeof("bassavah")];
+ char uniname2ctype_pool_str3664[sizeof("aghb")];
+ char uniname2ctype_pool_str3686[sizeof("hung")];
+ char uniname2ctype_pool_str3689[sizeof("hexdigit")];
+ char uniname2ctype_pool_str3698[sizeof("incypriotsyllabary")];
+ char uniname2ctype_pool_str3699[sizeof("indivesakuru")];
+ char uniname2ctype_pool_str3701[sizeof("tibt")];
+ char uniname2ctype_pool_str3705[sizeof("inlatinextendedb")];
+ char uniname2ctype_pool_str3710[sizeof("hluw")];
+ char uniname2ctype_pool_str3713[sizeof("tibetan")];
+ char uniname2ctype_pool_str3721[sizeof("inyisyllables")];
+ char uniname2ctype_pool_str3744[sizeof("oldnortharabian")];
+ char uniname2ctype_pool_str3754[sizeof("defaultignorablecodepoint")];
+ char uniname2ctype_pool_str3766[sizeof("inhighprivateusesurrogates")];
+ char uniname2ctype_pool_str3799[sizeof("soyombo")];
+ char uniname2ctype_pool_str3807[sizeof("otherdefaultignorablecodepoint")];
+ char uniname2ctype_pool_str3842[sizeof("pahawhhmong")];
+ char uniname2ctype_pool_str3845[sizeof("unifiedideograph")];
+ char uniname2ctype_pool_str3850[sizeof("othermath")];
+ char uniname2ctype_pool_str3854[sizeof("changeswhencasefolded")];
+ char uniname2ctype_pool_str3857[sizeof("inmahjongtiles")];
+ char uniname2ctype_pool_str3868[sizeof("dep")];
+ char uniname2ctype_pool_str3881[sizeof("divesakuru")];
+ char uniname2ctype_pool_str3884[sizeof("graphemeclusterbreak=lf")];
+ char uniname2ctype_pool_str3891[sizeof("uppercaseletter")];
+ char uniname2ctype_pool_str3924[sizeof("insupplementalpunctuation")];
+ char uniname2ctype_pool_str3942[sizeof("ethiopic")];
+ char uniname2ctype_pool_str3944[sizeof("inyijinghexagramsymbols")];
+ char uniname2ctype_pool_str3949[sizeof("ecomp")];
+ char uniname2ctype_pool_str3976[sizeof("inglagoliticsupplement")];
+ char uniname2ctype_pool_str3998[sizeof("inbopomofoextended")];
+ char uniname2ctype_pool_str4007[sizeof("injavanese")];
+ char uniname2ctype_pool_str4106[sizeof("otherpunctuation")];
+ char uniname2ctype_pool_str4116[sizeof("tifinagh")];
+ char uniname2ctype_pool_str4127[sizeof("tfng")];
+ char uniname2ctype_pool_str4169[sizeof("hanifirohingya")];
+ char uniname2ctype_pool_str4231[sizeof("tavt")];
+ char uniname2ctype_pool_str4308[sizeof("inboxdrawing")];
+ char uniname2ctype_pool_str4309[sizeof("oldsoutharabian")];
+ char uniname2ctype_pool_str4348[sizeof("inegyptianhieroglyphs")];
+ char uniname2ctype_pool_str4361[sizeof("inegyptianhieroglyphformatcontrols")];
+ char uniname2ctype_pool_str4459[sizeof("tagb")];
+ char uniname2ctype_pool_str4487[sizeof("rejang")];
+ char uniname2ctype_pool_str4604[sizeof("tglg")];
+ char uniname2ctype_pool_str4626[sizeof("tagalog")];
+ char uniname2ctype_pool_str4627[sizeof("othergraphemeextend")];
+ char uniname2ctype_pool_str4674[sizeof("insupplementaryprivateuseareaa")];
+ char uniname2ctype_pool_str4683[sizeof("inhighsurrogates")];
+ char uniname2ctype_pool_str4695[sizeof("hebrew")];
+ char uniname2ctype_pool_str4734[sizeof("duployan")];
+ char uniname2ctype_pool_str4755[sizeof("graphemeclusterbreak=v")];
+ char uniname2ctype_pool_str4756[sizeof("graphemeclusterbreak=lv")];
+ char uniname2ctype_pool_str4772[sizeof("insupplementalarrowsb")];
+ char uniname2ctype_pool_str4783[sizeof("graphemeclusterbreak=zwj")];
+ char uniname2ctype_pool_str4810[sizeof("telugu")];
+ char uniname2ctype_pool_str4898[sizeof("zyyy")];
+ char uniname2ctype_pool_str4982[sizeof("olduyghur")];
+ char uniname2ctype_pool_str4986[sizeof("inhangulcompatibilityjamo")];
+ char uniname2ctype_pool_str5018[sizeof("openpunctuation")];
+ char uniname2ctype_pool_str5038[sizeof("hyphen")];
+ char uniname2ctype_pool_str5134[sizeof("insupplementalsymbolsandpictographs")];
+ char uniname2ctype_pool_str5141[sizeof("egyp")];
+ char uniname2ctype_pool_str5300[sizeof("nyiakengpuachuehmong")];
+ char uniname2ctype_pool_str5980[sizeof("egyptianhieroglyphs")];
+ char uniname2ctype_pool_str6098[sizeof("insupplementaryprivateuseareab")];
+#endif /* USE_UNICODE_PROPERTIES */
+ };
+static const struct uniname2ctype_pool_t uniname2ctype_pool_contents =
+ {
+#ifndef USE_UNICODE_PROPERTIES
+ "word",
+#else /* USE_UNICODE_PROPERTIES */
+ "yi",
+ "yiii",
+ "lana",
+ "lina",
+ "maka",
+ "mani",
+ "mn",
+ "miao",
+ "lo",
+ "ci",
+ "lao",
+ "laoo",
+ "inkannada",
+ "cn",
+ "pi",
+ "innko",
+ "z",
+ "gran",
+ "co",
+ "lineara",
+ "mark",
+ "yezi",
+ "po",
+ "me",
+ "cari",
+ "inkharoshthi",
+ "kana",
+ "loe",
+ "m",
+ "grek",
+ "mro",
+ "mroo",
+ "carian",
+ "geor",
+ "greek",
+ "gonm",
+ "mendekikakui",
+ "pe",
+ "mero",
+ "inosmanya",
+ "cakm",
+ "inmanichaean",
+ "inmro",
+ "inmiao",
+ "inchakma",
+ "c",
+ "mandaic",
+ "meeteimayek",
+ "zzzz",
+ "inarmenian",
+ "inmyanmar",
+ "inmakasar",
+ "common",
+ "lm",
+ "marc",
+ "inrunic",
+ "incarian",
+ "inideographicsymbolsandpunctuation",
+ "inkhmer",
+ "qaai",
+ "inahom",
+ "merc",
+ "inchorasmian",
+ "combiningmark",
+ "lc",
+ "perm",
+ "mc",
+ "connectorpunctuation",
+ "cans",
+ "incuneiformnumbersandpunctuation",
+ "armi",
+ "cc",
+ "armn",
+ "incherokee",
+ "prependedconcatenationmark",
+ "incuneiform",
+ "inavestan",
+ "inipaextensions",
+ "pc",
+ "armenian",
+ "insharada",
+ "vai",
+ "vaii",
+ "inmarchen",
+ "makasar",
+ "masaramgondi",
+ "inarrows",
+ "incyrillic",
+ "incham",
+ "qmark",
+ "ri",
+ "qaac",
+ "insamaritan",
+ "latn",
+ "inmasaramgondi",
+ "inthaana",
+ "latin",
+ "inthai",
+ "lineseparator",
+ "pcm",
+ "inkatakana",
+ "inkaithi",
+ "inscriptionalparthian",
+ "initialpunctuation",
+ "mtei",
+ "inzanabazarsquare",
+ "inkhmersymbols",
+ "insyriac",
+ "intakri",
+ "arabic",
+ "katakana",
+ "prti",
+ "zs",
+ "ascii",
+ "cs",
+ "ps",
+ "mand",
+ "privateuse",
+ "inruminumeralsymbols",
+ "inmyanmarextendeda",
+ "modi",
+ "incjkcompatibilityforms",
+ "inkanaextendeda",
+ "incjkcompatibilityideographs",
+ "brai",
+ "mend",
+ "ideo",
+ "letter",
+ "l",
+ "inmeeteimayek",
+ "inideographicdescriptioncharacters",
+ "yezidi",
+ "knda",
+ "innandinagari",
+ "kannada",
+ "inmodi",
+ "inlao",
+ "xidcontinue",
+ "inoldnortharabian",
+ "intransportandmapsymbols",
+ "letternumber",
+ "gothic",
+ "inlineara",
+ "inmendekikakui",
+ "mongolian",
+ "inmiscellaneousmathematicalsymbolsa",
+ "inspecials",
+ "grlink",
+ "brahmi",
+ "inemoticons",
+ "kali",
+ "inolditalic",
+ "xidc",
+ "inmedefaidrin",
+ "inchesssymbols",
+ "incjkcompatibilityideographssupplement",
+ "kits",
+ "inadlam",
+ "psalterpahlavi",
+ "incommonindicnumberforms",
+ "lt",
+ "innewa",
+ "sk",
+ "control",
+ "inkawi",
+ "inancientsymbols",
+ "palm",
+ "inlycian",
+ "so",
+ "patternwhitespace",
+ "inmandaic",
+ "idc",
+ "meroiticcursive",
+ "intoto",
+ "vs",
+ "xids",
+ "inwarangciti",
+ "sora",
+ "inopticalcharacterrecognition",
+ "kawi",
+ "inoldsogdian",
+ "inmalayalam",
+ "bamum",
+ "inkanasupplement",
+ "insundanese",
+ "grext",
+#endif /* USE_UNICODE_PROPERTIES */
+ "print",
+#ifndef USE_UNICODE_PROPERTIES
+ "punct",
+ "alpha",
+#else /* USE_UNICODE_PROPERTIES */
+ "intaitham",
+ "lower",
+ "patternsyntax",
+ "joinc",
+ "inoldsoutharabian",
+ "incjkstrokes",
+ "batk",
+ "samr",
+ "inwancho",
+ "batak",
+ "patws",
+ "samaritan",
+ "idsbinaryoperator",
+ "pauc",
+ "insmallkanaextension",
+ "sm",
+ "indominotiles",
+#endif /* USE_UNICODE_PROPERTIES */
+ "alnum",
+#ifdef USE_UNICODE_PROPERTIES
+ "inznamennymusicalnotation",
+ "insylotinagri",
+ "inugaritic",
+ "incontrolpictures",
+ "inlinearbideograms",
+ "inmusicalsymbols",
+ "s",
+ "ital",
+ "inmodifiertoneletters",
+ "inancientgreekmusicalnotation",
+ "lisu",
+ "lowercase",
+ "cwcm",
+ "sc",
+ "bass",
+ "ids",
+ "inlatinextendeda",
+ "intaile",
+ "inmiscellaneoussymbols",
+ "inmiscellaneoussymbolsandarrows",
+ "incaucasianalbanian",
+ "inmiscellaneoussymbolsandpictographs",
+ "inoldturkic",
+ "insaurashtra",
+ "incyrillicextendeda",
+ "idcontinue",
+ "intaixuanjingsymbols",
+ "intamil",
+ "inmultani",
+ "inlatinextendede",
+ "pd",
+ "bali",
+ "blank",
+ "idst",
+ "inlydian",
+ "innewtailue",
+ "bengali",
+ "runr",
+ "ll",
+ "indeseret",
+ "inancientgreeknumbers",
+ "idstart",
+ "zl",
+ "inmeeteimayekextensions",
+ "balinese",
+ "incyrillicextendedc",
+ "inspacingmodifierletters",
+ "inearlydynasticcuneiform",
+ "plrd",
+ "canadianaboriginal",
+ "sind",
+ "inlatinextendedc",
+ "uideo",
+ "incountingrodnumerals",
+ "zinh",
+ "dia",
+ "di",
+ "inkhudawadi",
+ "inhanifirohingya",
+ "diak",
+ "gong",
+ "ingrantha",
+ "bidic",
+ "xidstart",
+#endif /* USE_UNICODE_PROPERTIES */
+ "xdigit",
+#ifndef USE_UNICODE_PROPERTIES
+ "upper",
+ "ascii",
+#else /* USE_UNICODE_PROPERTIES */
+ "mong",
+ "cased",
+ "inhiragana",
+ "sinhala",
+ "adlm",
+ "xsux",
+ "glagolitic",
+ "sterm",
+ "bamu",
+ "georgian",
+ "inosage",
+ "gunjalagondi",
+ "phoenician",
+ "inolduyghur",
+ "multani",
+ "kaithi",
+ "joincontrol",
+ "runic",
+ "ingeneralpunctuation",
+ "inmahajani",
+ "incyrillicsupplement",
+ "lowercaseletter",
+ "marchen",
+ "graphemelink",
+ "ingeorgian",
+ "khojki",
+ "cham",
+ "inogham",
+ "cher",
+ "chakma",
+ "inkaktoviknumerals",
+ "emoji",
+ "insiddham",
+ "cherokee",
+ "khar",
+ "inmongolian",
+ "innagmundari",
+ "incherokeesupplement",
+ "manichaean",
+ "inolchiki",
+ "inkhitansmallscript",
+ "quotationmark",
+ "vithkuqi",
+ "variationselector",
+ "adlam",
+ "inethiopic",
+ "graphemebase",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=11.0",
+ "age=12.1",
+ "age=10.0",
+ "age=12.0",
+ "age=13.0",
+ "age=1.1",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "casedletter",
+ "ingurmukhi",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=2.1",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "incjkunifiedideographsextensiona",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=2.0",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "lu",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=3.1",
+ "age=9.0",
+ "age=3.0",
+ "age=3.2",
+ "age=8.0",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "intamilsupplement",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=6.1",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "unknown",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=6.0",
+ "age=6.2",
+ "age=15.0",
+ "age=7.0",
+ "age=6.3",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "cwt",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=14.0",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "unassigned",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=5.1",
+ "age=5.0",
+ "age=5.2",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "diacritic",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=4.1",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "ahom",
+#ifdef USE_UNICODE_AGE_PROPERTIES
+ "age=4.0",
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ "incjkunifiedideographsextensione",
+ "khmr",
+ "insinhala",
+ "inmiscellaneoustechnical",
+ "saur",
+ "guru",
+ "sundanese",
+ "punct",
+ "paucinhau",
+ "gurmukhi",
+ "chorasmian",
+ "logicalorderexception",
+ "khmer",
+ "limbu",
+ "chrs",
+ "oriya",
+ "inscriptionalpahlavi",
+ "incyrillicextendedd",
+ "incjkunifiedideographsextensionc",
+#endif /* USE_UNICODE_PROPERTIES */
+ "cntrl",
+#ifndef USE_UNICODE_PROPERTIES
+ "space",
+#else /* USE_UNICODE_PROPERTIES */
+ "inlatinextendedadditional",
+ "insorasompeng",
+ "radical",
+ "emojimodifier",
+ "kharoshthi",
+ "n",
+ "math",
+ "goth",
+ "phnx",
+ "anatolianhieroglyphs",
+ "inenclosedalphanumerics",
+ "nandinagari",
+ "no",
+ "intangsa",
+ "nko",
+ "nkoo",
+ "ingreekandcoptic",
+ "p",
+ "grantha",
+ "decimalnumber",
+ "incjkunifiedideographs",
+ "intirhuta",
+ "inhatran",
+ "linb",
+ "mult",
+ "saurashtra",
+ "kthi",
+ "zanb",
+ "inbhaiksuki",
+ "innabataean",
+ "inphoenician",
+ "xpeo",
+ "inkanbun",
+ "inmeroitichieroglyphs",
+ "ahex",
+ "enclosingmark",
+ "sd",
+ "inelbasan",
+ "inenclosedideographicsupplement",
+ "sidd",
+ "linearb",
+ "cpmn",
+ "inenclosedalphanumericsupplement",
+ "bidicontrol",
+ "inphaistosdisc",
+ "limb",
+ "inkangxiradicals",
+ "lepc",
+ "braille",
+ "regionalindicator",
+ "inlowsurrogates",
+ "brah",
+ "inoldhungarian",
+ "beng",
+ "emojimodifierbase",
+ "inarabic",
+ "osage",
+ "inherited",
+ "incyprominoan",
+ "glag",
+ "medf",
+ "osma",
+ "indogra",
+ "arab",
+ "medefaidrin",
+ "inshorthandformatcontrols",
+ "phli",
+ "inimperialaramaic",
+ "emod",
+ "ingreekextended",
+ "inanatolianhieroglyphs",
+ "punctuation",
+ "graphemeextend",
+ "cwl",
+ "vith",
+ "ingeometricshapes",
+ "emojicomponent",
+ "dsrt",
+ "coptic",
+ "inkayahli",
+ "inoriya",
+ "inarabicpresentationformsa",
+ "inbasiclatin",
+ "incjkunifiedideographsextensiond",
+ "wara",
+ "sinh",
+ "sund",
+ "shavian",
+ "insundanesesupplement",
+ "inyezidi",
+ "bhks",
+ "bhaiksuki",
+ "inhanunoo",
+ "intangut",
+ "sogdian",
+ "inlatinextendedd",
+ "sogo",
+ "insinhalaarchaicnumbers",
+ "ideographic",
+ "ugar",
+ "deseret",
+ "odi",
+ "copt",
+ "imperialaramaic",
+ "insogdian",
+ "indingbats",
+ "format",
+ "ininscriptionalpahlavi",
+ "lyci",
+ "ininscriptionalparthian",
+ "grbase",
+ "lycian",
+ "inbatak",
+ "cprt",
+ "inunifiedcanadianaboriginalsyllabicsextendeda",
+ "mymr",
+ "myanmar",
+ "intibetan",
+ "intags",
+ "asciihexdigit",
+ "sentenceterminal",
+ "nand",
+ "inblockelements",
+ "inornamentaldingbats",
+ "inethiopicextendeda",
+ "innumberforms",
+ "cwcf",
+ "oidc",
+ "bopo",
+ "cuneiform",
+ "caseignorable",
+ "inoldpersian",
+ "cwu",
+ "inelymaic",
+ "insoyombo",
+ "ingeometricshapesextended",
+ "incjkcompatibility",
+ "inmyanmarextendedb",
+ "innushu",
+ "inkanaextendedb",
+ "olck",
+ "inbyzantinemusicalsymbols",
+ "olchiki",
+ "inkatakanaphoneticextensions",
+ "incoptic",
+ "oids",
+ "inarabicextendeda",
+ "modifierletter",
+ "incjksymbolsandpunctuation",
+ "olower",
+ "bopomofo",
+ "inlisu",
+ "inoldpermic",
+ "innoblock",
+ "ext",
+ "inunifiedcanadianaboriginalsyllabics",
+ "takri",
+ "inbraillepatterns",
+ "invai",
+ "alpha",
+ "inbalinese",
+ "sorasompeng",
+ "closepunctuation",
+ "hani",
+ "inmayannumerals",
+ "han",
+ "inmiscellaneousmathematicalsymbolsb",
+ "inlepcha",
+ "patsyn",
+ "inlisusupplement",
+ "insyriacsupplement",
+ "hano",
+ "newa",
+ "spacingmark",
+ "inpalmyrene",
+ "takr",
+#endif /* USE_UNICODE_PROPERTIES */
+ "xposixpunct",
+#ifndef USE_UNICODE_PROPERTIES
+ "lower",
+#else /* USE_UNICODE_PROPERTIES */
+ "inkhojki",
+ "taile",
+ "assigned",
+ "hanunoo",
+ "hira",
+ "inarabicextendedc",
+ "newtailue",
+ "space",
+ "intelugu",
+ "lydi",
+ "idsb",
+ "extpict",
+ "lydian",
+ "inethiopicsupplement",
+ "sarb",
+ "ugaritic",
+ "inyiradicals",
+ "inphoneticextensions",
+ "sharada",
+ "zanabazarsquare",
+ "bugi",
+ "word",
+ "term",
+ "separator",
+ "ingeorgiansupplement",
+ "sogd",
+ "extender",
+ "shrd",
+#endif /* USE_UNICODE_PROPERTIES */
+ "graph",
+#ifdef USE_UNICODE_PROPERTIES
+ "tnsa",
+ "tangsa",
+ "phag",
+ "dogra",
+ "inhanguljamo",
+ "inshavian",
+ "siddham",
+ "cf",
+ "inunifiedcanadianaboriginalsyllabicsextended",
+ "buginese",
+ "inmongoliansupplement",
+ "cyrl",
+ "inhanguljamoextendeda",
+ "pf",
+ "number",
+ "inphoneticextensionssupplement",
+ "dogr",
+ "mlym",
+ "incopticepactnumbers",
+ "malayalam",
+ "inbamum",
+ "nd",
+ "insuttonsignwriting",
+ "inethiopicextended",
+ "shaw",
+ "palmyrene",
+ "soyo",
+ "incjkunifiedideographsextensionh",
+ "sgnw",
+ "toto",
+ "caucasianalbanian",
+ "inmathematicalalphanumericsymbols",
+ "incjkunifiedideographsextensiong",
+ "hatran",
+ "taiviet",
+ "meroitichieroglyphs",
+ "ingeorgianextended",
+ "incjkunifiedideographsextensionf",
+ "oldpersian",
+ "induployan",
+ "incyrillicextendedb",
+ "dash",
+ "hatr",
+ "innyiakengpuachuehmong",
+ "incombiningdiacriticalmarks",
+ "nl",
+ "incombiningdiacriticalmarksforsymbols",
+ "khudawadi",
+ "incjkradicalssupplement",
+ "inglagolitic",
+ "orkh",
+ "syrc",
+ "surrogate",
+ "indevanagari",
+ "avestan",
+ "oldpermic",
+ "ethi",
+ "ogam",
+ "rohg",
+ "idstrinaryoperator",
+ "java",
+ "inphagspa",
+ "lepcha",
+ "indevanagariextendeda",
+ "intifinagh",
+ "intagalog",
+ "incombiningdiacriticalmarkssupplement",
+ "tale",
+ "inbrahmi",
+ "terminalpunctuation",
+ "insymbolsandpictographsextendeda",
+ "syriac",
+ "inbengali",
+ "nagm",
+ "extendedpictographic",
+ "buhd",
+ "javanese",
+ "taml",
+ "inbuginese",
+ "inlatin1supplement",
+ "ingothic",
+ "invariationselectors",
+ "hex",
+ "inverticalforms",
+ "ebase",
+ "incurrencysymbols",
+ "avst",
+ "osge",
+ "incombiningdiacriticalmarksextended",
+ "intaiviet",
+ "spaceseparator",
+ "softdotted",
+ "nchar",
+ "invedicextensions",
+ "inlimbu",
+ "olditalic",
+ "gujr",
+ "mathsymbol",
+ "incjkunifiedideographsextensionb",
+ "gujarati",
+ "phagspa",
+ "invariationselectorssupplement",
+ "currencysymbol",
+ "inlinearbsyllabary",
+ "wancho",
+ "inpaucinhau",
+ "other",
+ "otheridcontinue",
+ "sylo",
+ "zp",
+ "inaegeannumbers",
+ "warangciti",
+ "othernumber",
+#endif /* USE_UNICODE_PROPERTIES */
+ "digit",
+#ifndef USE_UNICODE_PROPERTIES
+ "blank"
+#else /* USE_UNICODE_PROPERTIES */
+ "nonspacingmark",
+ "titlecaseletter",
+ "inmeroiticcursive",
+ "wcho",
+ "graphemeclusterbreak=spacingmark",
+ "inletterlikesymbols",
+ "inottomansiyaqnumbers",
+ "intagbanwa",
+ "cyrillic",
+ "oalpha",
+ "graphemeclusterbreak=cr",
+ "narb",
+ "changeswhencasemapped",
+ "inbopomofo",
+ "graphemeclusterbreak=regionalindicator",
+ "otheralphabetic",
+ "noncharactercodepoint",
+ "oldhungarian",
+ "insymbolsforlegacycomputing",
+ "insmallformvariants",
+ "inhangulsyllables",
+ "emojipresentation",
+ "epres",
+ "inbassavah",
+ "indevanagariextended",
+ "inbuhid",
+ "tirhuta",
+ "inpsalterpahlavi",
+ "whitespace",
+ "finalpunctuation",
+ "orya",
+ "phlp",
+ "inbamumsupplement",
+ "buhid",
+ "paragraphseparator",
+ "inalphabeticpresentationforms",
+ "inlatinextendedg",
+ "elba",
+ "changeswhentitlecased",
+ "incombininghalfmarks",
+ "intangutcomponents",
+ "thaa",
+ "thai",
+ "oldturkic",
+ "thaana",
+ "inlatinextendedf",
+ "ougr",
+ "tang",
+ "inarabicmathematicalalphabeticsymbols",
+ "tagbanwa",
+ "tamil",
+ "khitansmallscript",
+ "mahj",
+ "mahajani",
+ "hang",
+ "tirh",
+ "sylotinagri",
+ "talu",
+ "nagmundari",
+ "deva",
+ "ingujarati",
+ "deprecated",
+ "inarabicpresentationformsb",
+ "devanagari",
+ "ingunjalagondi",
+ "graphemeclusterbreak=t",
+ "graphemeclusterbreak=lvt",
+ "taitham",
+ "nbat",
+ "telu",
+ "hiragana",
+ "nabataean",
+ "inrejang",
+ "intangutsupplement",
+ "khoj",
+ "hmng",
+ "cyprominoan",
+ "inhebrew",
+ "inmathematicaloperators",
+ "inarabicsupplement",
+ "inenclosedcjklettersandmonths",
+ "changeswhenlowercased",
+ "tangut",
+ "elbasan",
+ "osmanya",
+ "insuperscriptsandsubscripts",
+ "graphemeclusterbreak=extend",
+ "graphemeclusterbreak=prepend",
+ "nshu",
+ "otherlowercase",
+ "inethiopicextendedb",
+ "otherletter",
+ "kayahli",
+ "inplayingcards",
+ "elym",
+ "graphemeclusterbreak=l",
+ "graphemeclusterbreak=control",
+ "ogrext",
+ "elymaic",
+ "changeswhenuppercased",
+ "inalchemicalsymbols",
+ "oldsogdian",
+ "otheridstart",
+ "insupplementalarrowsa",
+ "invithkuqi",
+ "symbol",
+ "inarabicextendedb",
+ "cypriot",
+ "any",
+ "otheruppercase",
+ "rjng",
+ "wspace",
+ "inindicsiyaqnumbers",
+ "inprivateusearea",
+ "othersymbol",
+ "oupper",
+ "signwriting",
+ "nushu",
+ "hmnp",
+ "upper",
+ "insupplementalarrowsc",
+ "omath",
+ "modifiersymbol",
+ "hebr",
+ "inhalfwidthandfullwidthforms",
+ "insupplementalmathematicaloperators",
+ "inpahawhhmong",
+ "alphabetic",
+ "uppercase",
+ "dupl",
+ "ogham",
+ "dashpunctuation",
+ "hangul",
+ "inhanguljamoextendedb",
+ "bassavah",
+ "aghb",
+ "hung",
+ "hexdigit",
+ "incypriotsyllabary",
+ "indivesakuru",
+ "tibt",
+ "inlatinextendedb",
+ "hluw",
+ "tibetan",
+ "inyisyllables",
+ "oldnortharabian",
+ "defaultignorablecodepoint",
+ "inhighprivateusesurrogates",
+ "soyombo",
+ "otherdefaultignorablecodepoint",
+ "pahawhhmong",
+ "unifiedideograph",
+ "othermath",
+ "changeswhencasefolded",
+ "inmahjongtiles",
+ "dep",
+ "divesakuru",
+ "graphemeclusterbreak=lf",
+ "uppercaseletter",
+ "insupplementalpunctuation",
+ "ethiopic",
+ "inyijinghexagramsymbols",
+ "ecomp",
+ "inglagoliticsupplement",
+ "inbopomofoextended",
+ "injavanese",
+ "otherpunctuation",
+ "tifinagh",
+ "tfng",
+ "hanifirohingya",
+ "tavt",
+ "inboxdrawing",
+ "oldsoutharabian",
+ "inegyptianhieroglyphs",
+ "inegyptianhieroglyphformatcontrols",
+ "tagb",
+ "rejang",
+ "tglg",
+ "tagalog",
+ "othergraphemeextend",
+ "insupplementaryprivateuseareaa",
+ "inhighsurrogates",
+ "hebrew",
+ "duployan",
+ "graphemeclusterbreak=v",
+ "graphemeclusterbreak=lv",
+ "insupplementalarrowsb",
+ "graphemeclusterbreak=zwj",
+ "telugu",
+ "zyyy",
+ "olduyghur",
+ "inhangulcompatibilityjamo",
+ "openpunctuation",
+ "hyphen",
+ "insupplementalsymbolsandpictographs",
+ "egyp",
+ "nyiakengpuachuehmong",
+ "egyptianhieroglyphs",
+ "insupplementaryprivateuseareab"
+#endif /* USE_UNICODE_PROPERTIES */
+ };
+#define uniname2ctype_pool ((const char *) &uniname2ctype_pool_contents)
+const struct uniname2ctype_struct *
+uniname2ctype_p (register const char *str, register size_t len)
+{
+ static const struct uniname2ctype_struct wordlist[] =
+ {
+#ifdef USE_UNICODE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str11), 111},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str17), 111},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str22), 152},
+ {-1}, {-1},
+ {uniname2ctype_offset(str25), 184},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str33), 218},
+ {-1},
+ {uniname2ctype_offset(str35), 186},
+ {uniname2ctype_offset(str36), 34},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str45), 173},
+ {uniname2ctype_offset(str46), 28},
+ {uniname2ctype_offset(str47), 61},
+ {uniname2ctype_offset(str48), 95},
+ {uniname2ctype_offset(str49), 95},
+ {-1}, {-1},
+ {uniname2ctype_offset(str52), 346},
+ {-1}, {-1},
+ {uniname2ctype_offset(str55), 21},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str64), 44},
+ {-1},
+ {uniname2ctype_offset(str66), 333},
+ {uniname2ctype_offset(str67), 52},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str71), 181},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str75), 22},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str83), 184},
+ {-1}, {-1},
+ {uniname2ctype_offset(str86), 31},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str90), 230},
+ {-1},
+ {uniname2ctype_offset(str92), 45},
+ {-1},
+ {uniname2ctype_offset(str94), 33},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str100), 149},
+ {uniname2ctype_offset(str101), 513},
+ {uniname2ctype_offset(str102), 108},
+ {uniname2ctype_offset(str103), 263},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str107), 31},
+ {uniname2ctype_offset(str108), 77},
+ {-1}, {-1},
+ {uniname2ctype_offset(str111), 189},
+ {uniname2ctype_offset(str112), 189},
+ {-1}, {-1},
+ {uniname2ctype_offset(str115), 149},
+ {-1},
+ {uniname2ctype_offset(str117), 98},
+ {uniname2ctype_offset(str118), 77},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str122), 212},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str129), 187},
+ {uniname2ctype_offset(str130), 42},
+ {uniname2ctype_offset(str131), 172},
+ {-1}, {-1},
+ {uniname2ctype_offset(str134), 497},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str139), 170},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str145), 516},
+ {uniname2ctype_offset(str146), 575},
+ {-1},
+ {uniname2ctype_offset(str148), 580},
+ {uniname2ctype_offset(str149), 535},
+ {-1},
+ {uniname2ctype_offset(str151), 18},
+ {uniname2ctype_offset(str152), 169},
+ {uniname2ctype_offset(str153), 160},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str158), 278},
+ {-1}, {-1},
+ {uniname2ctype_offset(str161), 327},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str177), 352},
+ {uniname2ctype_offset(str178), 563},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str183), 75},
+ {-1}, {-1},
+ {uniname2ctype_offset(str186), 27},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str190), 208},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str203), 360},
+ {uniname2ctype_offset(str204), 488},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str210), 581},
+ {-1},
+ {uniname2ctype_offset(str212), 365},
+ {uniname2ctype_offset(str213), 115},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str218), 549},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str226), 171},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str230), 530},
+ {uniname2ctype_offset(str231), 31},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str236), 25},
+ {uniname2ctype_offset(str237), 194},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str246), 32},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str250), 40},
+ {-1}, {-1},
+ {uniname2ctype_offset(str253), 102},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str260), 568},
+ {-1}, {-1},
+ {uniname2ctype_offset(str263), 161},
+ {-1},
+ {uniname2ctype_offset(str265), 19},
+ {-1},
+ {uniname2ctype_offset(str267), 79},
+ {uniname2ctype_offset(str268), 357},
+ {-1},
+ {uniname2ctype_offset(str270), 270},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str274), 567},
+ {uniname2ctype_offset(str275), 517},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str281), 321},
+ {uniname2ctype_offset(str282), 40},
+ {uniname2ctype_offset(str283), 79},
+ {-1},
+ {uniname2ctype_offset(str285), 537},
+ {-1},
+ {uniname2ctype_offset(str287), 144},
+ {uniname2ctype_offset(str288), 144},
+ {uniname2ctype_offset(str289), 560},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str293), 218},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str297), 212},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str301), 395},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str311), 325},
+ {-1},
+ {uniname2ctype_offset(str313), 456},
+ {-1},
+ {uniname2ctype_offset(str315), 243},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str320), 271},
+ {-1},
+ {uniname2ctype_offset(str322), 129},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str328), 334},
+ {-1}, {-1},
+ {uniname2ctype_offset(str331), 76},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str335), 561},
+ {-1}, {-1},
+ {uniname2ctype_offset(str338), 332},
+ {-1},
+ {uniname2ctype_offset(str340), 76},
+ {-1},
+ {uniname2ctype_offset(str342), 349},
+ {-1}, {-1},
+ {uniname2ctype_offset(str345), 53},
+ {uniname2ctype_offset(str346), 270},
+ {-1},
+ {uniname2ctype_offset(str348), 426},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str352), 533},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str362), 163},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str366), 44},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str373), 160},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str381), 554},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str386), 371},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str399), 330},
+ {-1},
+ {uniname2ctype_offset(str401), 548},
+ {-1}, {-1},
+ {uniname2ctype_offset(str404), 81},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str418), 108},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str426), 163},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str430), 55},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str442), 14},
+ {-1}, {-1},
+ {uniname2ctype_offset(str445), 23},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str462), 46},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str468), 169},
+ {-1},
+ {uniname2ctype_offset(str470), 22},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str475), 524},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str480), 457},
+ {uniname2ctype_offset(str481), 188},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str486), 476},
+ {-1},
+ {uniname2ctype_offset(str488), 588},
+ {-1}, {-1},
+ {uniname2ctype_offset(str491), 470},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str500), 127},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str504), 187},
+ {uniname2ctype_offset(str505), 249},
+ {uniname2ctype_offset(str506), 24},
+ {-1}, {-1},
+ {uniname2ctype_offset(str509), 24},
+ {-1},
+ {uniname2ctype_offset(str511), 463},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str520), 423},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str533), 230},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str538), 91},
+ {-1}, {-1},
+ {uniname2ctype_offset(str541), 553},
+ {-1},
+ {uniname2ctype_offset(str543), 91},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str556), 546},
+ {-1},
+ {uniname2ctype_offset(str558), 350},
+ {uniname2ctype_offset(str559), 70},
+ {uniname2ctype_offset(str560), 515},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str565), 624},
+ {uniname2ctype_offset(str566), 37},
+ {-1},
+ {uniname2ctype_offset(str568), 113},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str572), 502},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str577), 611},
+ {-1},
+ {uniname2ctype_offset(str579), 106},
+ {-1}, {-1},
+ {uniname2ctype_offset(str582), 406},
+ {uniname2ctype_offset(str583), 480},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str590), 74},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str594), 168},
+ {-1},
+ {uniname2ctype_offset(str596), 622},
+ {uniname2ctype_offset(str597), 146},
+ {-1}, {-1},
+ {uniname2ctype_offset(str600), 490},
+ {-1},
+ {uniname2ctype_offset(str602), 70},
+ {-1},
+ {uniname2ctype_offset(str604), 579},
+ {uniname2ctype_offset(str605), 629},
+ {-1}, {-1},
+ {uniname2ctype_offset(str608), 637},
+ {uniname2ctype_offset(str609), 229},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str614), 612},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str624), 195},
+ {uniname2ctype_offset(str625), 447},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str630), 29},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str636), 543},
+ {-1}, {-1},
+ {uniname2ctype_offset(str639), 49},
+ {-1}, {-1},
+ {uniname2ctype_offset(str642), 19},
+ {uniname2ctype_offset(str643), 564},
+ {-1},
+ {uniname2ctype_offset(str645), 485},
+ {-1},
+ {uniname2ctype_offset(str647), 192},
+ {-1}, {-1},
+ {uniname2ctype_offset(str650), 487},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str657), 51},
+ {-1}, {-1},
+ {uniname2ctype_offset(str660), 268},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str672), 335},
+ {-1}, {-1},
+ {uniname2ctype_offset(str675), 68},
+ {-1}, {-1},
+ {uniname2ctype_offset(str678), 171},
+ {uniname2ctype_offset(str679), 607},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str683), 267},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str692), 69},
+ {-1}, {-1},
+ {uniname2ctype_offset(str695), 551},
+ {uniname2ctype_offset(str696), 175},
+ {uniname2ctype_offset(str697), 399},
+ {-1}, {-1},
+ {uniname2ctype_offset(str700), 236},
+ {-1}, {-1},
+ {uniname2ctype_offset(str703), 527},
+ {-1},
+ {uniname2ctype_offset(str705), 347},
+ {-1},
+ {uniname2ctype_offset(str707), 158},
+ {uniname2ctype_offset(str708), 587},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str713), 376},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str720), 72},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str737), 7},
+ {uniname2ctype_offset(str738), 373},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str742), 6},
+ {-1}, {-1},
+ {uniname2ctype_offset(str745), 269},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str753), 240},
+ {-1},
+ {uniname2ctype_offset(str755), 514},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str760), 431},
+ {uniname2ctype_offset(str761), 167},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str766), 156},
+ {uniname2ctype_offset(str767), 608},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str771), 167},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str776), 268},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str783), 156},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str787), 256},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str791), 193},
+ {-1}, {-1},
+ {uniname2ctype_offset(str794), 589},
+ {-1}, {-1},
+ {uniname2ctype_offset(str797), 50},
+ {-1},
+ {uniname2ctype_offset(str799), 617},
+ {-1}, {-1},
+ {uniname2ctype_offset(str802), 13},
+ {uniname2ctype_offset(str803), 593},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str809), 446},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str814), 493},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str818), 398},
+ {-1}, {-1},
+ {uniname2ctype_offset(str821), 482},
+ {uniname2ctype_offset(str822), 595},
+ {uniname2ctype_offset(str823), 47},
+ {uniname2ctype_offset(str824), 112},
+ {uniname2ctype_offset(str825), 444},
+ {-1}, {-1},
+ {uniname2ctype_offset(str828), 596},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str838), 157},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str842), 58},
+ {-1}, {-1},
+ {uniname2ctype_offset(str845), 66},
+ {-1},
+ {uniname2ctype_offset(str847), 48},
+ {uniname2ctype_offset(str848), 178},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str855), 67},
+ {-1},
+ {uniname2ctype_offset(str857), 319},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str875), 369},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str886), 404},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str895), 412},
+ {-1}, {-1},
+ {uniname2ctype_offset(str898), 500},
+ {-1},
+ {uniname2ctype_offset(str900), 621},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str906), 521},
+ {uniname2ctype_offset(str907), 449},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str920), 419},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str924), 68},
+ {uniname2ctype_offset(str925), 599},
+ {uniname2ctype_offset(str926), 344},
+ {-1},
+ {uniname2ctype_offset(str928), 540},
+ {uniname2ctype_offset(str929), 461},
+ {uniname2ctype_offset(str930), 41},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str946), 136},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str961), 2},
+ {-1},
+ {uniname2ctype_offset(str963), 257},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str974), 510},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str986), 370},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str994), 85},
+ {uniname2ctype_offset(str995), 104},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1010), 26},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1013), 495},
+ {-1},
+ {uniname2ctype_offset(str1015), 484},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1021), 67},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1024), 53},
+ {uniname2ctype_offset(str1025), 459},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1028), 136},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1032), 380},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1035), 322},
+ {uniname2ctype_offset(str1036), 569},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1049), 173},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1067), 102},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1072), 197},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1081), 414},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1085), 259},
+ {-1},
+ {uniname2ctype_offset(str1087), 600},
+ {-1},
+ {uniname2ctype_offset(str1089), 115},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1095), 250},
+ {uniname2ctype_offset(str1096), 71},
+ {uniname2ctype_offset(str1097), 541},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1102), 523},
+ {-1},
+ {uniname2ctype_offset(str1104), 228},
+ {uniname2ctype_offset(str1105), 217},
+ {-1},
+ {uniname2ctype_offset(str1107), 542},
+ {-1},
+ {uniname2ctype_offset(str1109), 239},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1114), 69},
+ {uniname2ctype_offset(str1115), 11},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1119), 106},
+ {uniname2ctype_offset(str1120), 60},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1134), 425},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1140), 93},
+ {-1},
+ {uniname2ctype_offset(str1142), 206},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1145), 137},
+ {uniname2ctype_offset(str1146), 131},
+ {uniname2ctype_offset(str1147), 266},
+ {-1},
+ {uniname2ctype_offset(str1149), 158},
+ {uniname2ctype_offset(str1150), 98},
+ {uniname2ctype_offset(str1151), 498},
+ {uniname2ctype_offset(str1152), 217},
+ {uniname2ctype_offset(str1153), 138},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1156), 529},
+ {uniname2ctype_offset(str1157), 203},
+ {uniname2ctype_offset(str1158), 166},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1164), 240},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1168), 104},
+ {-1},
+ {uniname2ctype_offset(str1170), 389},
+ {uniname2ctype_offset(str1171), 536},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1174), 326},
+ {uniname2ctype_offset(str1175), 26},
+ {uniname2ctype_offset(str1176), 208},
+ {uniname2ctype_offset(str1177), 74},
+ {uniname2ctype_offset(str1178), 353},
+ {-1},
+ {uniname2ctype_offset(str1180), 183},
+ {uniname2ctype_offset(str1181), 151},
+ {uniname2ctype_offset(str1182), 359},
+ {uniname2ctype_offset(str1183), 101},
+ {-1},
+ {uniname2ctype_offset(str1185), 170},
+ {uniname2ctype_offset(str1186), 597},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1190), 272},
+ {uniname2ctype_offset(str1191), 545},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1197), 101},
+ {uniname2ctype_offset(str1198), 135},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1203), 366},
+ {uniname2ctype_offset(str1204), 609},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1207), 462},
+ {-1},
+ {uniname2ctype_offset(str1209), 186},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1212), 379},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str1223), 584},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1227), 243},
+ {-1},
+ {uniname2ctype_offset(str1229), 235},
+ {uniname2ctype_offset(str1230), 267},
+ {uniname2ctype_offset(str1231), 206},
+ {uniname2ctype_offset(str1232), 355},
+ {uniname2ctype_offset(str1233), 73},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1234), 298},
+ {uniname2ctype_offset(str1235), 300},
+ {uniname2ctype_offset(str1236), 297},
+ {uniname2ctype_offset(str1237), 299},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1241), 301},
+ {uniname2ctype_offset(str1242), 279},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1243), 25},
+ {uniname2ctype_offset(str1244), 341},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1245), 281},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1246), 435},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1247), 280},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1248), 30},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1249), 283},
+ {uniname2ctype_offset(str1250), 296},
+ {uniname2ctype_offset(str1251), 282},
+ {uniname2ctype_offset(str1252), 284},
+ {uniname2ctype_offset(str1253), 295},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1254), 566},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1255), 291},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1256), 278},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1257), 290},
+ {uniname2ctype_offset(str1258), 292},
+ {uniname2ctype_offset(str1259), 303},
+ {uniname2ctype_offset(str1260), 294},
+ {-1},
+ {uniname2ctype_offset(str1262), 293},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1263), 64},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {-1},
+ {uniname2ctype_offset(str1265), 302},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1266), 21},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1267), 288},
+ {-1},
+ {uniname2ctype_offset(str1269), 287},
+ {uniname2ctype_offset(str1270), 289},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1271), 250},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {-1},
+ {uniname2ctype_offset(str1273), 286},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1274), 200},
+#ifndef USE_UNICODE_AGE_PROPERTIES
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#else /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1275), 285},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#endif /* USE_UNICODE_AGE_PROPERTIES */
+ {uniname2ctype_offset(str1282), 635},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1285), 105},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1289), 348},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1292), 397},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1297), 145},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1300), 86},
+ {uniname2ctype_offset(str1301), 141},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1306), 15},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1314), 193},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1317), 86},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str1328), 227},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1331), 263},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1340), 105},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1343), 120},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1349), 227},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1352), 88},
+ {-1},
+ {uniname2ctype_offset(str1354), 164},
+ {-1},
+ {uniname2ctype_offset(str1356), 605},
+ {-1},
+ {uniname2ctype_offset(str1358), 633},
+ {-1},
+ {uniname2ctype_offset(str1360), 3},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1365), 387},
+ {-1},
+ {uniname2ctype_offset(str1367), 534},
+ {-1},
+ {uniname2ctype_offset(str1369), 258},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1373), 274},
+ {-1},
+ {uniname2ctype_offset(str1375), 135},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1380), 35},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1384), 56},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1387), 113},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1392), 138},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1400), 201},
+ {uniname2ctype_offset(str1401), 400},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1407), 224},
+ {-1},
+ {uniname2ctype_offset(str1409), 38},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1415), 576},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1419), 140},
+ {uniname2ctype_offset(str1420), 140},
+ {-1},
+ {uniname2ctype_offset(str1422), 324},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1426), 39},
+ {-1},
+ {uniname2ctype_offset(str1428), 181},
+ {uniname2ctype_offset(str1429), 36},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1438), 437},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1442), 544},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1448), 508},
+ {uniname2ctype_offset(str1449), 122},
+ {-1},
+ {uniname2ctype_offset(str1451), 203},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1454), 145},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1457), 166},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1460), 215},
+ {-1},
+ {uniname2ctype_offset(str1462), 559},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1470), 507},
+ {uniname2ctype_offset(str1471), 509},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1474), 134},
+ {uniname2ctype_offset(str1475), 429},
+ {uniname2ctype_offset(str1476), 511},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1480), 247},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1489), 33},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1495), 262},
+ {-1},
+ {uniname2ctype_offset(str1497), 499},
+ {-1},
+ {uniname2ctype_offset(str1499), 620},
+ {-1},
+ {uniname2ctype_offset(str1501), 196},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1507), 122},
+ {uniname2ctype_offset(str1508), 231},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1517), 619},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1520), 239},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1524), 486},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1529), 120},
+ {-1},
+ {uniname2ctype_offset(str1531), 422},
+ {-1},
+ {uniname2ctype_offset(str1533), 142},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1536), 127},
+ {uniname2ctype_offset(str1537), 271},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1542), 468},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1547), 168},
+ {-1},
+ {uniname2ctype_offset(str1549), 522},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1557), 85},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1563), 275},
+ {-1},
+ {uniname2ctype_offset(str1565), 329},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1570), 210},
+ {-1},
+ {uniname2ctype_offset(str1572), 115},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1577), 570},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1580), 131},
+ {-1},
+ {uniname2ctype_offset(str1582), 219},
+ {uniname2ctype_offset(str1583), 125},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1587), 550},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1597), 81},
+ {uniname2ctype_offset(str1598), 219},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1607), 592},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1613), 164},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1617), 505},
+ {uniname2ctype_offset(str1618), 274},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1622), 388},
+ {uniname2ctype_offset(str1623), 573},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1629), 39},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1635), 72},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1643), 62},
+ {uniname2ctype_offset(str1644), 235},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1654), 403},
+ {uniname2ctype_offset(str1655), 276},
+ {-1},
+ {uniname2ctype_offset(str1657), 114},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1662), 129},
+ {-1},
+ {uniname2ctype_offset(str1664), 451},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1671), 343},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1675), 472},
+ {-1},
+ {uniname2ctype_offset(str1677), 317},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1682), 634},
+ {-1},
+ {uniname2ctype_offset(str1684), 199},
+ {-1},
+ {uniname2ctype_offset(str1686), 93},
+ {uniname2ctype_offset(str1687), 141},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1691), 124},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1699), 382},
+ {-1},
+ {uniname2ctype_offset(str1701), 525},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1704), 207},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1714), 207},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1722), 362},
+ {-1},
+ {uniname2ctype_offset(str1724), 582},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1728), 221},
+ {uniname2ctype_offset(str1729), 445},
+ {uniname2ctype_offset(str1730), 222},
+ {uniname2ctype_offset(str1731), 538},
+ {uniname2ctype_offset(str1732), 249},
+ {uniname2ctype_offset(str1733), 123},
+ {uniname2ctype_offset(str1734), 114},
+ {uniname2ctype_offset(str1735), 260},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1740), 129},
+ {-1},
+ {uniname2ctype_offset(str1742), 161},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1745), 528},
+ {uniname2ctype_offset(str1746), 405},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1750), 20},
+ {-1},
+ {uniname2ctype_offset(str1752), 519},
+ {uniname2ctype_offset(str1753), 148},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1757), 518},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1766), 73},
+ {-1},
+ {uniname2ctype_offset(str1768), 148},
+ {uniname2ctype_offset(str1769), 377},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1776), 126},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1781), 556},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1788), 97},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1793), 97},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1806), 351},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1810), 640},
+ {uniname2ctype_offset(str1811), 247},
+ {-1},
+ {uniname2ctype_offset(str1813), 266},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1821), 224},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1828), 402},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1838), 623},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1841), 460},
+ {uniname2ctype_offset(str1842), 394},
+ {uniname2ctype_offset(str1843), 65},
+ {-1},
+ {uniname2ctype_offset(str1845), 265},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1848), 109},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1851), 137},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1866), 61},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1871), 494},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1881), 63},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1888), 531},
+ {uniname2ctype_offset(str1889), 555},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1896), 626},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1902), 434},
+ {-1},
+ {uniname2ctype_offset(str1904), 455},
+ {uniname2ctype_offset(str1905), 590},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1912), 586},
+ {uniname2ctype_offset(str1913), 143},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1916), 594},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1924), 143},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1929), 432},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1932), 415},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1935), 264},
+ {uniname2ctype_offset(str1936), 338},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1941), 27},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1950), 424},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1956), 252},
+ {-1},
+ {uniname2ctype_offset(str1958), 109},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1964), 440},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1967), 492},
+ {uniname2ctype_offset(str1968), 644},
+ {uniname2ctype_offset(str1969), 251},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1974), 358},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1981), 176},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str1985), 408},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1988), 441},
+ {-1}, {-1},
+ {uniname2ctype_offset(str1991), 1},
+ {-1},
+ {uniname2ctype_offset(str1993), 375},
+ {uniname2ctype_offset(str1994), 175},
+ {-1},
+ {uniname2ctype_offset(str1996), 42},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2001), 110},
+ {uniname2ctype_offset(str2002), 598},
+ {-1},
+ {uniname2ctype_offset(str2004), 110},
+ {-1},
+ {uniname2ctype_offset(str2006), 410},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2010), 378},
+ {uniname2ctype_offset(str2011), 269},
+ {uniname2ctype_offset(str2012), 565},
+ {-1},
+ {uniname2ctype_offset(str2014), 336},
+ {uniname2ctype_offset(str2015), 117},
+ {uniname2ctype_offset(str2016), 209},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2023), 32},
+ {uniname2ctype_offset(str2024), 506},
+ {-1},
+ {uniname2ctype_offset(str2026), 176},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2033), 8},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2040), 539},
+ {-1},
+ {uniname2ctype_offset(str2042), 121},
+ {uniname2ctype_offset(str2043), 17},
+ {uniname2ctype_offset(str2044), 117},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2047), 107},
+ {uniname2ctype_offset(str2048), 526},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2062), 130},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2070), 9},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2073), 345},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2077), 150},
+ {uniname2ctype_offset(str2078), 256},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2090), 277},
+ {-1},
+ {uniname2ctype_offset(str2092), 150},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2095), 356},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2103), 162},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2110), 123},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2114), 439},
+ {uniname2ctype_offset(str2115), 384},
+ {-1},
+ {uniname2ctype_offset(str2117), 174},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2128), 215},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2135), 128},
+ {-1},
+ {uniname2ctype_offset(str2137), 12},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2141), 244},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2145), 52},
+ {uniname2ctype_offset(str2146), 416},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2149), 221},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2163), 251},
+ {-1},
+ {uniname2ctype_offset(str2165), 174},
+ {uniname2ctype_offset(str2166), 5},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2174), 233},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2178), 233},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2181), 139},
+ {uniname2ctype_offset(str2182), 216},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2195), 354},
+ {uniname2ctype_offset(str2196), 496},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2207), 196},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2211), 20},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2216), 367},
+ {uniname2ctype_offset(str2217), 128},
+ {uniname2ctype_offset(str2218), 547},
+ {uniname2ctype_offset(str2219), 78},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2224), 453},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2228), 43},
+ {uniname2ctype_offset(str2229), 35},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2232), 385},
+ {uniname2ctype_offset(str2233), 216},
+ {uniname2ctype_offset(str2234), 92},
+ {uniname2ctype_offset(str2235), 489},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2241), 92},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2244), 443},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2247), 36},
+ {uniname2ctype_offset(str2248), 602},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2276), 418},
+ {-1},
+ {uniname2ctype_offset(str2278), 124},
+ {uniname2ctype_offset(str2279), 192},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2283), 214},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2296), 639},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2305), 205},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2308), 234},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2312), 177},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2315), 601},
+ {uniname2ctype_offset(str2316), 638},
+ {-1},
+ {uniname2ctype_offset(str2318), 202},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2321), 153},
+ {-1},
+ {uniname2ctype_offset(str2323), 172},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2327), 381},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2331), 636},
+ {-1},
+ {uniname2ctype_offset(str2333), 134},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2343), 591},
+ {uniname2ctype_offset(str2344), 442},
+ {uniname2ctype_offset(str2345), 241},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2353), 202},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2361), 606},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2364), 323},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2373), 37},
+ {uniname2ctype_offset(str2374), 392},
+ {uniname2ctype_offset(str2375), 197},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2397), 421},
+ {uniname2ctype_offset(str2398), 413},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2405), 165},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2414), 82},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2427), 23},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2433), 339},
+ {uniname2ctype_offset(str2434), 154},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2437), 194},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2440), 100},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2451), 103},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2454), 220},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2460), 257},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2464), 159},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2470), 448},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2475), 142},
+ {uniname2ctype_offset(str2476), 558},
+ {-1},
+ {uniname2ctype_offset(str2478), 417},
+ {uniname2ctype_offset(str2479), 361},
+ {-1},
+ {uniname2ctype_offset(str2481), 386},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2500), 121},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2506), 532},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2511), 244},
+ {-1},
+ {uniname2ctype_offset(str2513), 630},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2530), 82},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2534), 340},
+ {uniname2ctype_offset(str2535), 237},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2545), 277},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2548), 118},
+ {uniname2ctype_offset(str2549), 159},
+ {-1},
+ {uniname2ctype_offset(str2551), 89},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2564), 372},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2567), 318},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2570), 491},
+ {-1},
+ {uniname2ctype_offset(str2572), 473},
+ {-1},
+ {uniname2ctype_offset(str2574), 246},
+ {uniname2ctype_offset(str2575), 474},
+ {uniname2ctype_offset(str2576), 275},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2582), 391},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2588), 154},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2602), 210},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2606), 374},
+ {-1},
+ {uniname2ctype_offset(str2608), 458},
+ {uniname2ctype_offset(str2609), 55},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2625), 262},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2648), 254},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2652), 383},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2656), 368},
+ {uniname2ctype_offset(str2657), 112},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2665), 87},
+ {uniname2ctype_offset(str2666), 50},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2670), 632},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2674), 87},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2688), 139},
+ {uniname2ctype_offset(str2689), 641},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2694), 48},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2705), 481},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2726), 226},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2750), 557},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2761), 18},
+ {uniname2ctype_offset(str2762), 265},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2765), 133},
+ {uniname2ctype_offset(str2766), 54},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2769), 483},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2772), 199},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2775), 38},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2786), 4},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2793), 34},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2801), 29},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2808), 512},
+ {-1},
+ {uniname2ctype_offset(str2810), 226},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2816), 310},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2821), 393},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2830), 614},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2834), 364},
+ {-1},
+ {uniname2ctype_offset(str2836), 78},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2847), 248},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2852), 305},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2855), 190},
+ {uniname2ctype_offset(str2856), 66},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2859), 427},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2867), 309},
+ {uniname2ctype_offset(str2868), 248},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2871), 254},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2879), 204},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2886), 631},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2902), 477},
+ {-1},
+ {uniname2ctype_offset(str2904), 464},
+ {uniname2ctype_offset(str2905), 273},
+ {-1},
+ {uniname2ctype_offset(str2907), 273},
+ {-1},
+ {uniname2ctype_offset(str2909), 577},
+ {-1},
+ {uniname2ctype_offset(str2911), 450},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2941), 363},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2953), 198},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str2964), 520},
+ {-1},
+ {uniname2ctype_offset(str2966), 238},
+ {uniname2ctype_offset(str2967), 43},
+ {-1}, {-1},
+ {uniname2ctype_offset(str2970), 88},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2980), 195},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2984), 574},
+ {-1},
+ {uniname2ctype_offset(str2986), 118},
+ {uniname2ctype_offset(str2987), 54},
+ {uniname2ctype_offset(str2988), 471},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str2997), 603},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3001), 180},
+ {uniname2ctype_offset(str3002), 64},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3005), 475},
+ {uniname2ctype_offset(str3006), 583},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3015), 83},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3018), 94},
+ {uniname2ctype_offset(str3019), 165},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3026), 83},
+ {uniname2ctype_offset(str3027), 503},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3035), 232},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3042), 211},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3045), 615},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3048), 119},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3052), 89},
+ {uniname2ctype_offset(str3053), 229},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3058), 185},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3067), 185},
+ {uniname2ctype_offset(str3068), 99},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3071), 198},
+ {uniname2ctype_offset(str3072), 133},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3082), 130},
+ {-1},
+ {uniname2ctype_offset(str3084), 237},
+ {-1},
+ {uniname2ctype_offset(str3086), 84},
+ {uniname2ctype_offset(str3087), 342},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3091), 261},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3099), 478},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3104), 84},
+ {-1},
+ {uniname2ctype_offset(str3106), 562},
+ {uniname2ctype_offset(str3107), 313},
+ {-1},
+ {uniname2ctype_offset(str3109), 315},
+ {uniname2ctype_offset(str3110), 152},
+ {uniname2ctype_offset(str3111), 191},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3118), 90},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3123), 107},
+ {-1},
+ {uniname2ctype_offset(str3125), 191},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3135), 452},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3142), 585},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3145), 183},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3155), 182},
+ {-1},
+ {uniname2ctype_offset(str3157), 231},
+ {uniname2ctype_offset(str3158), 328},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3176), 396},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3180), 331},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3193), 433},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3209), 62},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3212), 211},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3215), 180},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3218), 125},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3237), 390},
+ {-1},
+ {uniname2ctype_offset(str3239), 308},
+ {uniname2ctype_offset(str3240), 304},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3248), 213},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3254), 252},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str3265), 610},
+ {-1},
+ {uniname2ctype_offset(str3267), 28},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3275), 146},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3284), 618},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3287), 223},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3297), 311},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3303), 307},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3313), 255},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3320), 223},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3328), 63},
+ {uniname2ctype_offset(str3329), 625},
+ {-1},
+ {uniname2ctype_offset(str3331), 222},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3338), 264},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3348), 407},
+ {-1},
+ {uniname2ctype_offset(str3350), 501},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3355), 47},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3360), 337},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str3371), 126},
+ {uniname2ctype_offset(str3372), 16},
+ {uniname2ctype_offset(str3373), 253},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3377), 147},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3391), 238},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3396), 613},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3405), 469},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str3416), 51},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3428), 253},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3433), 205},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3436), 213},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3455), 225},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3458), 10},
+ {-1},
+ {uniname2ctype_offset(str3460), 627},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3483), 245},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3502), 49},
+ {-1},
+ {uniname2ctype_offset(str3504), 80},
+ {uniname2ctype_offset(str3505), 479},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3511), 411},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3532), 578},
+ {uniname2ctype_offset(str3533), 57},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3558), 59},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3580), 179},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3590), 103},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3613), 41},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3618), 99},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3648), 465},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str3659), 178},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3664), 177},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3686), 204},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3689), 246},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3698), 504},
+ {uniname2ctype_offset(str3699), 552},
+ {-1},
+ {uniname2ctype_offset(str3701), 96},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3705), 320},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3710), 201},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3713), 96},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3721), 438},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3744), 190},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3754), 71},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3766), 467},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3799), 214},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3807), 260},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3842), 182},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3845), 259},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3850), 245},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3854), 65},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3857), 616},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str3868), 261},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3881), 228},
+ {-1}, {-1},
+ {uniname2ctype_offset(str3884), 306},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3891), 30},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3924), 420},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3942), 100},
+ {-1},
+ {uniname2ctype_offset(str3944), 436},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3949), 276},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3976), 604},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str3998), 430},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4007), 454},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4106), 45},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4116), 132},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str4127), 132},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4169), 220},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4231), 153},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4308), 401},
+ {uniname2ctype_offset(str4309), 162},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str4348), 571},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4361), 572},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4459), 119},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4487), 147},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4604), 116},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4626), 116},
+ {uniname2ctype_offset(str4627), 255},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str4674), 642},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4683), 466},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str4695), 80},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str4734), 179},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str4755), 312},
+ {uniname2ctype_offset(str4756), 314},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4772), 409},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str4783), 316},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4810), 90},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4898), 75},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1},
+ {uniname2ctype_offset(str4982), 232},
+ {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str4986), 428},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str5018), 46},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1},
+ {uniname2ctype_offset(str5038), 242},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str5134), 628},
+#endif /* USE_UNICODE_PROPERTIES */
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#ifndef USE_UNICODE_PROPERTIES
+ {uniname2ctype_offset(str6), 12},
+ {uniname2ctype_offset(str7), 7},
+ {uniname2ctype_offset(str8), 15},
+ {uniname2ctype_offset(str9), 1},
+ {uniname2ctype_offset(str10), 13},
+ {uniname2ctype_offset(str11), 11},
+ {uniname2ctype_offset(str12), 10},
+ {uniname2ctype_offset(str13), 14},
+ {uniname2ctype_offset(str14), 3},
+ {uniname2ctype_offset(str15), 9},
+ {uniname2ctype_offset(str16), 8},
+ {uniname2ctype_offset(str17), 6},
+ {uniname2ctype_offset(str18), 5},
+ {uniname2ctype_offset(str19), 4},
+ {uniname2ctype_offset(str20), 2}
+#else /* USE_UNICODE_PROPERTIES */
+ {uniname2ctype_offset(str5141), 155},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str5300), 225},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str5980), 155},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+ {uniname2ctype_offset(str6098), 643}
+#endif /* USE_UNICODE_PROPERTIES */
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ register unsigned int key = uniname2ctype_hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register int o = wordlist[key].name;
+ if (o >= 0)
+ {
+ register const char *s = o + uniname2ctype_pool;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return &wordlist[key];
+ }
+ }
+ }
+ return 0;
+}
+
+static int
+uniname2ctype(const UChar *name, unsigned int len)
+{
+ const struct uniname2ctype_struct *p = uniname2ctype_p((const char *)name, len);
+ if (p) return p->ctype;
+ return -1;
+}
+#if defined ONIG_UNICODE_VERSION_STRING && !( \
+ ONIG_UNICODE_VERSION_MAJOR == 15 && \
+ ONIG_UNICODE_VERSION_MINOR == 0 && \
+ ONIG_UNICODE_VERSION_TEENY == 0 && \
+ 1)
+# error ONIG_UNICODE_VERSION_STRING mismatch
+#endif
+#define ONIG_UNICODE_VERSION_STRING "15.0.0"
+#define ONIG_UNICODE_VERSION_MAJOR 15
+#define ONIG_UNICODE_VERSION_MINOR 0
+#define ONIG_UNICODE_VERSION_TEENY 0
+#if defined ONIG_UNICODE_EMOJI_VERSION_STRING && !( \
+ ONIG_UNICODE_EMOJI_VERSION_MAJOR == 15 && \
+ ONIG_UNICODE_EMOJI_VERSION_MINOR == 0 && \
+ 1)
+# error ONIG_UNICODE_EMOJI_VERSION_STRING mismatch
+#endif
+#define ONIG_UNICODE_EMOJI_VERSION_STRING "15.0"
+#define ONIG_UNICODE_EMOJI_VERSION_MAJOR 15
+#define ONIG_UNICODE_EMOJI_VERSION_MINOR 0
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
deleted file mode 100755
index 362d6ebfd9..0000000000
--- a/enc/unicode/case-folding.rb
+++ /dev/null
@@ -1,418 +0,0 @@
-#!/usr/bin/ruby
-require 'stringio'
-
-# Usage (for case folding only):
-# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
-# $ ruby case-folding.rb CaseFolding.txt -o casefold.h
-# or (for case folding and case mapping):
-# $ wget http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
-# $ wget http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
-# $ wget http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt
-# $ ruby case-folding.rb -m . -o casefold.h
-# using -d or --debug will include UTF-8 characters in comments for debugging
-
-class CaseFolding
- module Util
- module_function
-
- def hex_seq(v)
- v.map { |i| "0x%04x" % i }.join(", ")
- end
-
- def print_table_1(dest, type, mapping_data, data)
- for k, v in data = data.sort
- sk = (Array === k and k.length > 1) ? "{#{hex_seq(k)}}" : ("0x%04x" % k)
- if type=='CaseUnfold_11' and v.length>1
- # reorder CaseUnfold_11 entries to avoid special treatment for U+03B9/U+03BC/U+A64B
- item = mapping_data.map("%04X" % k[0])
- upper = item.upper if item
- v = v.sort_by { |i| ("%04X"%i) == upper ? 0 : 1 }
- end
- ck = @debug ? ' /* ' + Array(k).pack("U*") + ' */' : ''
- cv = @debug ? ' /* ' + Array(v).map{|c|[c].pack("U*")}.join(", ") + ' */' : ''
- dest.print(" {#{sk}#{ck}, {#{v.length}#{mapping_data.flags(k, type, v)}, {#{hex_seq(v)}#{cv}}}},\n")
- end
- data
- end
-
- def print_table(dest, type, mapping_data, data)
- dest.print("static const #{type}_Type #{type}_Table[] = {\n")
- i = 0
- ret = data.inject([]) do |a, (n, d)|
- dest.print("#define #{n} (*(#{type}_Type (*)[#{d.size}])(#{type}_Table+#{i}))\n")
- i += d.size
- a.concat(print_table_1(dest, type, mapping_data, d))
- end
- dest.print("};\n\n")
- ret
- end
- end
-
- include Util
-
- attr_reader :fold, :fold_locale, :unfold, :unfold_locale, :version
-
- def load(filename)
- pattern = /([0-9A-F]{4,6}); ([CFT]); ([0-9A-F]{4,6})(?: ([0-9A-F]{4,6}))?(?: ([0-9A-F]{4,6}))?;/
-
- @fold = fold = {}
- @unfold = unfold = [{}, {}, {}]
- @debug = false
- @version = nil
- turkic = []
-
- IO.foreach(filename, mode: "rb") do |line|
- @version ||= line[/-([0-9.]+).txt/, 1]
- next unless res = pattern.match(line)
- ch_from = res[1].to_i(16)
-
- if res[2] == 'T'
- # Turkic case folding
- turkic << ch_from
- next
- end
-
- # store folding data
- ch_to = res[3..6].inject([]) do |a, i|
- break a unless i
- a << i.to_i(16)
- end
- fold[ch_from] = ch_to
-
- # store unfolding data
- i = ch_to.length - 1
- (unfold[i][ch_to] ||= []) << ch_from
- end
-
- # move locale dependent data to (un)fold_locale
- @fold_locale = fold_locale = {}
- @unfold_locale = unfold_locale = [{}, {}]
- for ch_from in turkic
- key = fold[ch_from]
- i = key.length - 1
- unfold_locale[i][i == 0 ? key[0] : key] = unfold[i].delete(key)
- fold_locale[ch_from] = fold.delete(ch_from)
- end
- self
- end
-
- def range_check(code)
- "#{code} <= MAX_CODE_VALUE && #{code} >= MIN_CODE_VALUE"
- end
-
- def lookup_hash(key, type, data)
- hash = "onigenc_unicode_#{key}_hash"
- lookup = "onigenc_unicode_#{key}_lookup"
- arity = Array(data[0][0]).size
- gperf = %W"gperf -7 -k#{[*1..(arity*3)].join(',')} -F,-1 -c -j1 -i1 -t -T -E -C -H #{hash} -N #{lookup} -n"
- argname = arity > 1 ? "codes" : "code"
- argdecl = "const OnigCodePoint #{arity > 1 ? "*": ""}#{argname}"
- n = 7
- m = (1 << n) - 1
- min, max = data.map {|c, *|c}.flatten.minmax
- src = IO.popen(gperf, "r+") {|f|
- f << "short\n%%\n"
- data.each_with_index {|(k, _), i|
- k = Array(k)
- ks = k.map {|j| [(j >> n*2) & m, (j >> n) & m, (j) & m]}.flatten.map {|c| "\\x%.2x" % c}.join("")
- f.printf "\"%s\", ::::/*%s*/ %d\n", ks, k.map {|c| "0x%.4x" % c}.join(","), i
- }
- f << "%%\n"
- f.close_write
- f.read
- }
- src.sub!(/^(#{hash})\s*\(.*?\).*?\n\{\n(.*)^\}/m) {
- name = $1
- body = $2
- body.gsub!(/\(unsigned char\)str\[(\d+)\]/, "bits_#{arity > 1 ? 'at' : 'of'}(#{argname}, \\1)")
- "#{name}(#{argdecl})\n{\n#{body}}"
- }
- src.sub!(/const short *\*\n^(#{lookup})\s*\(.*?\).*?\n\{\n(.*)^\}/m) {
- name = $1
- body = $2
- body.sub!(/\benum\s+\{(\n[ \t]+)/, "\\&MIN_CODE_VALUE = 0x#{min.to_s(16)},\\1""MAX_CODE_VALUE = 0x#{max.to_s(16)},\\1")
- body.gsub!(/(#{hash})\s*\(.*?\)/, "\\1(#{argname})")
- body.gsub!(/\{"",-1}/, "-1")
- body.gsub!(/\{"(?:[^"]|\\")+", *::::(.*)\}/, '\1')
- body.sub!(/(\s+if\s)\(len\b.*\)/) do
- "#$1(" <<
- (arity > 1 ? (0...arity).map {|i| range_check("#{argname}[#{i}]")}.join(" &&\n ") : range_check(argname)) <<
- ")"
- end
- v = nil
- body.sub!(/(if\s*\(.*MAX_HASH_VALUE.*\)\n([ \t]*))\{(.*?)\n\2\}/m) {
- pre = $1
- indent = $2
- s = $3
- s.sub!(/const char *\* *(\w+)( *= *wordlist\[\w+\]).\w+/, 'short \1 = wordlist[key]')
- v = $1
- s.sub!(/\bif *\(.*\)/, "if (#{v} >= 0 && code#{arity}_equal(#{argname}, #{key}_Table[#{v}].from))")
- "#{pre}{#{s}\n#{indent}}"
- }
- body.sub!(/\b(return\s+&)([^;]+);/, '\1'"#{key}_Table[#{v}].to;")
- "static const #{type} *\n#{name}(#{argdecl})\n{\n#{body}}"
- }
- src
- end
-
- def display(dest, mapping_data)
- # print the header
- dest.print("/* DO NOT EDIT THIS FILE. */\n")
- dest.print("/* Generated by enc/unicode/case-folding.rb */\n\n")
-
- versions = version.scan(/\d+/)
- dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")
- %w[MAJOR MINOR TEENY].zip(versions) do |n, v|
- dest.print(" ONIG_UNICODE_VERSION_#{n} == #{v} && \\\n")
- end
- dest.print(" 1)\n")
- dest.print("# error ONIG_UNICODE_VERSION_STRING mismatch\n")
- dest.print("#endif\n")
- dest.print("#define ONIG_UNICODE_VERSION_STRING #{version.dump}\n")
- %w[MAJOR MINOR TEENY].zip(versions) do |n, v|
- dest.print("#define ONIG_UNICODE_VERSION_#{n} #{v}\n")
- end
- dest.print("\n")
-
- # print folding data
-
- # CaseFold + CaseFold_Locale
- name = "CaseFold_11"
- data = print_table(dest, name, mapping_data, "CaseFold"=>fold, "CaseFold_Locale"=>fold_locale)
- dest.print lookup_hash(name, "CodePointList3", data)
-
- # print unfolding data
-
- # CaseUnfold_11 + CaseUnfold_11_Locale
- name = "CaseUnfold_11"
- data = print_table(dest, name, mapping_data, name=>unfold[0], "#{name}_Locale"=>unfold_locale[0])
- dest.print lookup_hash(name, "CodePointList3", data)
-
- # CaseUnfold_12 + CaseUnfold_12_Locale
- name = "CaseUnfold_12"
- data = print_table(dest, name, mapping_data, name=>unfold[1], "#{name}_Locale"=>unfold_locale[1])
- dest.print lookup_hash(name, "CodePointList2", data)
-
- # CaseUnfold_13
- name = "CaseUnfold_13"
- data = print_table(dest, name, mapping_data, name=>unfold[2])
- dest.print lookup_hash(name, "CodePointList2", data)
-
- # TitleCase
- dest.print mapping_data.specials_output
- end
-
- def debug!
- @debug = true
- end
-
- def self.load(*args)
- new.load(*args)
- end
-end
-
-class MapItem
- attr_accessor :upper, :lower, :title, :code
-
- def initialize(code, upper, lower, title)
- @code = code
- @upper = upper unless upper == ''
- @lower = lower unless lower == ''
- @title = title unless title == ''
- end
-end
-
-class CaseMapping
- attr_reader :filename, :version
-
- def initialize(mapping_directory)
- @mappings = {}
- @specials = []
- @specials_length = 0
- @version = nil
- IO.foreach(File.join(mapping_directory, 'UnicodeData.txt'), mode: "rb") do |line|
- next if line =~ /^</
- code, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11, upper, lower, title = line.chomp.split ';'
- unless upper and lower and title and (upper+lower+title)==''
- @mappings[code] = MapItem.new(code, upper, lower, title)
- end
- end
-
- @filename = File.join(mapping_directory, 'SpecialCasing.txt')
- IO.foreach(@filename, mode: "rb") do |line|
- @version ||= line[/-([0-9.]+).txt/, 1]
- line.chomp!
- line, comment = line.split(/ *#/)
- next if not line or line == ''
- code, lower, title, upper, conditions = line.split(/ *; */)
- unless conditions
- item = @mappings[code]
- item.lower = lower
- item.title = title
- item.upper = upper
- end
- end
- end
-
- def map (from)
- @mappings[from]
- end
-
- def flags(from, type, to)
- # types: CaseFold_11, CaseUnfold_11, CaseUnfold_12, CaseUnfold_13
- flags = ""
- from = Array(from).map {|i| "%04X" % i}.join(" ")
- to = Array(to).map {|i| "%04X" % i}.join(" ")
- item = map(from)
- specials = []
- case type
- when 'CaseFold_11'
- flags += '|F'
- if item
- flags += '|U' if to==item.upper
- flags += '|D' if to==item.lower
- unless item.upper == item.title
- if item.code == item.title
- flags += '|IT'
- swap = case item.code
- when '01C5' then '0064 017D'
- when '01C8' then '006C 004A'
- when '01CB' then '006E 004A'
- when '01F2' then '0064 005A'
- else # Greek
- to.split(' ').first + ' 0399'
- end
- specials << swap
- else
- flags += '|ST'
- specials << item.title
- end
- end
- unless item.lower.nil? or item.lower==from or item.lower==to
- specials << item.lower
- flags += '|SL'
- end
- unless item.upper.nil? or item.upper==from or item.upper==to
- specials << item.upper
- flags += '|SU'
- end
- end
- when 'CaseUnfold_11'
- to = to.split(/ /)
- if item
- case to.first
- when item.upper then flags += '|U'
- when item.lower then flags += '|D'
- else
- raise "Unpredicted case 0 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
- end
- unless item.upper == item.title
- if item.code == item.title
- flags += '|IT' # was unpredicted case 1
- elsif item.title==to[1]
- flags += '|ST'
- else
- raise "Unpredicted case 2 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
- end
- end
- end
- end
- unless specials.empty?
- flags += "|I(#{@specials_length})"
- @specials_length += specials.map { |s| s.split(/ /).length }.reduce(:+)
- @specials << specials
- end
- flags
- end
-
- def debug!
- @debug = true
- end
-
- def specials_output
- "static const OnigCodePoint CaseMappingSpecials[] = {\n" +
- @specials.map do |sps|
- ' ' + sps.map do |sp|
- chars = sp.split(/ /)
- ct = ' /* ' + Array(chars).map{|c|[c.to_i(16)].pack("U*")}.join(", ") + ' */' if @debug
- " L(#{chars.length})|#{chars.map {|c| "0x"+c }.join(', ')}#{ct},"
- end.join + "\n"
- end.join + "};\n"
- end
-
- def self.load(*args)
- new(*args)
- end
-end
-
-class CaseMappingDummy
- def flags(from, type, to)
- ""
- end
-
- def titlecase_output() '' end
- def debug!() end
-end
-
-if $0 == __FILE__
- require 'optparse'
- dest = nil
- mapping_directory = nil
- mapping_data = nil
- debug = false
- fold_1 = false
- ARGV.options do |opt|
- opt.banner << " [INPUT]"
- opt.on("--output-file=FILE", "-o", "output to the FILE instead of STDOUT") {|output|
- dest = (output unless output == '-')
- }
- opt.on('--mapping-data-directory=DIRECTORY', '-m', 'data DIRECTORY of mapping files') { |directory|
- mapping_directory = directory
- }
- opt.on('--debug', '-d') {
- debug = true
- }
- opt.parse!
- abort(opt.to_s) if ARGV.size > 1
- end
- if mapping_directory
- if ARGV[0]
- warn "Either specify directory or individual file, but not both."
- exit
- end
- filename = File.join(mapping_directory, 'CaseFolding.txt')
- mapping_data = CaseMapping.load(mapping_directory)
- end
- filename ||= ARGV[0] || 'CaseFolding.txt'
- data = CaseFolding.load(filename)
- if mapping_data and data.version != mapping_data.version
- abort "Unicode data version mismatch\n" \
- " #{filename} = #{data.version}\n" \
- " #{mapping_data.filename} = #{mapping_data.version}"
- end
- mapping_data ||= CaseMappingDummy.new
-
- if debug
- data.debug!
- mapping_data.debug!
- end
- f = StringIO.new
- begin
- data.display(f, mapping_data)
- rescue Errno::ENOENT => e
- raise unless /gperf/ =~ e.message
- warn e.message
- abort unless dest
- File.utime(nil, nil, dest) # assume existing file is OK
- exit
- else
- s = f.string
- end
- if dest
- open(dest, "wb") do |file|
- file.print(s)
- end
- else
- STDOUT.print(s)
- end
-end
diff --git a/enc/utf_16_32.h b/enc/utf_16_32.h
index 9f9216d8ff..4d669019bf 100644
--- a/enc/utf_16_32.h
+++ b/enc/utf_16_32.h
@@ -1,5 +1,5 @@
#include "regenc.h"
/* dummy for unsupported, stateful encoding */
-#define ENC_DUMMY_UNICODE(name) ENC_REPLICATE(name, name "BE")
+#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
ENC_DUMMY_UNICODE("UTF-16");
ENC_DUMMY_UNICODE("UTF-32");
diff --git a/enc/windows_1250.c b/enc/windows_1250.c
index d2cf7b16bc..daf23e9d1e 100644
--- a/enc/windows_1250.c
+++ b/enc/windows_1250.c
@@ -266,6 +266,6 @@ OnigEncodingDefine(windows_1250, Windows_1250) = {
* MIBenum: 2251
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1250.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1250
+ * Link: https://en.wikipedia.org/wiki/Windows-1250
*/
ENC_ALIAS("CP1250", "Windows-1250")
diff --git a/enc/windows_1251.c b/enc/windows_1251.c
index fcd0f1015d..6c892c1b8c 100644
--- a/enc/windows_1251.c
+++ b/enc/windows_1251.c
@@ -248,6 +248,6 @@ OnigEncodingDefine(windows_1251, Windows_1251) = {
* MIBenum: 2251
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1251.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1251
+ * Link: https://en.wikipedia.org/wiki/Windows-1251
*/
ENC_ALIAS("CP1251", "Windows-1251")
diff --git a/enc/windows_1252.c b/enc/windows_1252.c
index 5f90c15601..b685878d3f 100644
--- a/enc/windows_1252.c
+++ b/enc/windows_1252.c
@@ -255,6 +255,6 @@ OnigEncodingDefine(windows_1252, Windows_1252) = {
* MIBenum: 2251
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1252
+ * Link: https://en.wikipedia.org/wiki/Windows-1252
*/
ENC_ALIAS("CP1252", "Windows-1252")
diff --git a/enc/windows_1253.c b/enc/windows_1253.c
index 9e9c63a581..b2a43581c3 100644
--- a/enc/windows_1253.c
+++ b/enc/windows_1253.c
@@ -32,7 +32,7 @@
* MIBenum: 2253
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1253.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1253
+ * Link: https://en.wikipedia.org/wiki/Windows-1253
*/
#include "regenc.h"
diff --git a/enc/windows_1254.c b/enc/windows_1254.c
index 9ae66978a2..5e6d92d3d2 100644
--- a/enc/windows_1254.c
+++ b/enc/windows_1254.c
@@ -32,7 +32,7 @@
* MIBenum: 2254
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1254.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1254
+ * Link: https://en.wikipedia.org/wiki/Windows-1254
*/
#include "regenc.h"
diff --git a/enc/windows_1257.c b/enc/windows_1257.c
index 936a94ac76..ada03b72bf 100644
--- a/enc/windows_1257.c
+++ b/enc/windows_1257.c
@@ -35,7 +35,7 @@
* MIBenum: 2257
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/sbcs/1257.mspx
- * Link: http://en.wikipedia.org/wiki/Windows-1257
+ * Link: https://en.wikipedia.org/wiki/Windows-1257
*/
#define ENC_CP1252_TO_LOWER_CASE(c) EncCP1252_ToLowerCaseTable[c]
diff --git a/enc/windows_31j.c b/enc/windows_31j.c
index e3a468f414..1eb859596a 100644
--- a/enc/windows_31j.c
+++ b/enc/windows_31j.c
@@ -57,7 +57,7 @@ OnigEncodingDefine(windows_31j, Windows_31J) = {
* MIBenum: 2024
* Link: http://www.iana.org/assignments/character-sets
* Link: http://www.microsoft.com/globaldev/reference/dbcs/932.mspx
- * Link: http://ja.wikipedia.org/wiki/Windows-31J
+ * Link: https://ja.wikipedia.org/wiki/Windows-31J
* Link: http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/windows-932-2000.ucm
*
* Windows Standard Character Set and its mapping to Unicode by Microsoft.
diff --git a/encindex.h b/encindex.h
index 658b60a9fd..e6ddb1b0c2 100644
--- a/encindex.h
+++ b/encindex.h
@@ -1,3 +1,5 @@
+#ifndef RUBY_ENCINDEX_H
+#define RUBY_ENCINDEX_H 1
/**********************************************************************
encindex.h -
@@ -9,8 +11,7 @@
**********************************************************************/
-#ifndef RUBY_ENCINDEX_H
-#define RUBY_ENCINDEX_H 1
+#include "ruby/encoding.h" /* rb_ascii8bit_encindex etc. */
#if defined(__cplusplus)
extern "C" {
#if 0
@@ -19,7 +20,7 @@ extern "C" {
#endif
enum ruby_preserved_encindex {
- RUBY_ENCINDEX_ASCII,
+ RUBY_ENCINDEX_ASCII_8BIT,
RUBY_ENCINDEX_UTF_8,
RUBY_ENCINDEX_US_ASCII,
@@ -39,7 +40,7 @@ enum ruby_preserved_encindex {
RUBY_ENCINDEX_BUILTIN_MAX
};
-#define ENCINDEX_ASCII RUBY_ENCINDEX_ASCII
+#define ENCINDEX_ASCII_8BIT RUBY_ENCINDEX_ASCII_8BIT
#define ENCINDEX_UTF_8 RUBY_ENCINDEX_UTF_8
#define ENCINDEX_US_ASCII RUBY_ENCINDEX_US_ASCII
#define ENCINDEX_UTF_16BE RUBY_ENCINDEX_UTF_16BE
@@ -53,7 +54,7 @@ enum ruby_preserved_encindex {
#define ENCINDEX_Windows_31J RUBY_ENCINDEX_Windows_31J
#define ENCINDEX_BUILTIN_MAX RUBY_ENCINDEX_BUILTIN_MAX
-#define rb_ascii8bit_encindex() RUBY_ENCINDEX_ASCII
+#define rb_ascii8bit_encindex() RUBY_ENCINDEX_ASCII_8BIT
#define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
#define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
diff --git a/encoding.c b/encoding.c
index 69015cc8fd..2f4b47bdfa 100644
--- a/encoding.c
+++ b/encoding.c
@@ -9,14 +9,26 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "internal.h"
+#include "ruby/internal/config.h"
+
+#include <ctype.h>
+
#include "encindex.h"
+#include "internal.h"
+#include "internal/enc.h"
+#include "internal/encoding.h"
+#include "internal/error.h"
+#include "internal/inits.h"
+#include "internal/load.h"
+#include "internal/object.h"
+#include "internal/string.h"
+#include "internal/vm.h"
#include "regenc.h"
-#include <ctype.h>
+#include "ruby/encoding.h"
#include "ruby/util.h"
-
#include "ruby_assert.h"
+#include "vm_sync.h"
+
#ifndef ENC_DEBUG
#define ENC_DEBUG 0
#endif
@@ -38,12 +50,13 @@ void rb_encdb_declare(const char *name);
int rb_encdb_replicate(const char *name, const char *orig);
int rb_encdb_dummy(const char *name);
int rb_encdb_alias(const char *alias, const char *orig);
-void rb_encdb_set_unicode(int index);
#pragma GCC visibility pop
#endif
static ID id_encoding;
VALUE rb_cEncoding;
+
+#define ENCODING_LIST_CAPA 256
static VALUE rb_encoding_list;
struct rb_encoding_entry {
@@ -52,12 +65,26 @@ struct rb_encoding_entry {
rb_encoding *base;
};
-static struct {
- struct rb_encoding_entry *list;
+static struct enc_table {
+ struct rb_encoding_entry list[ENCODING_LIST_CAPA];
int count;
- int size;
st_table *names;
-} enc_table;
+} global_enc_table;
+
+static rb_encoding *global_enc_ascii,
+ *global_enc_utf_8,
+ *global_enc_us_ascii;
+
+#define GLOBAL_ENC_TABLE_ENTER(enc_table) struct enc_table *enc_table = &global_enc_table; RB_VM_LOCK_ENTER()
+#define GLOBAL_ENC_TABLE_LEAVE() RB_VM_LOCK_LEAVE()
+#define GLOBAL_ENC_TABLE_EVAL(enc_table, expr) do { \
+ GLOBAL_ENC_TABLE_ENTER(enc_table); \
+ { \
+ expr; \
+ } \
+ GLOBAL_ENC_TABLE_LEAVE(); \
+} while (0)
+
#define ENC_DUMMY_FLAG (1<<24)
#define ENC_INDEX_MASK (~(~0U<<24))
@@ -72,10 +99,6 @@ static struct {
#define ENCODING_NAMELEN_MAX 63
#define valid_encoding_name_p(name) ((name) && strlen(name) <= ENCODING_NAMELEN_MAX)
-#define enc_autoload_p(enc) (!rb_enc_mbmaxlen(enc))
-
-static int load_encoding(const char *name);
-
static const rb_data_type_t encoding_data_type = {
"encoding",
{0, 0, 0,},
@@ -94,22 +117,47 @@ rb_data_is_encoding(VALUE obj)
static VALUE
enc_new(rb_encoding *encoding)
{
- return TypedData_Wrap_Struct(rb_cEncoding, &encoding_data_type, (void *)encoding);
+ VALUE enc = TypedData_Wrap_Struct(rb_cEncoding, &encoding_data_type, (void *)encoding);
+ rb_obj_freeze(enc);
+ FL_SET_RAW(enc, RUBY_FL_SHAREABLE);
+ return enc;
+}
+
+static void
+enc_list_update(int index, rb_raw_encoding *encoding)
+{
+ RUBY_ASSERT(index < ENCODING_LIST_CAPA);
+
+ VALUE list = rb_encoding_list;
+ if (list && NIL_P(rb_ary_entry(list, index))) {
+ /* initialize encoding data */
+ rb_ary_store(list, index, enc_new(encoding));
+ }
}
static VALUE
-rb_enc_from_encoding_index(int idx)
+enc_list_lookup(int idx)
{
- VALUE list, enc;
+ VALUE list, enc = Qnil;
- if (!(list = rb_encoding_list)) {
- rb_bug("rb_enc_from_encoding_index(%d): no rb_encoding_list", idx);
+ if (idx < ENCODING_LIST_CAPA) {
+ list = rb_encoding_list;
+ RUBY_ASSERT(list);
+ enc = rb_ary_entry(list, idx);
}
- enc = rb_ary_entry(list, idx);
+
if (NIL_P(enc)) {
- rb_bug("rb_enc_from_encoding_index(%d): not created yet", idx);
+ rb_bug("rb_enc_from_encoding_index(%d): not created yet", idx);
+ }
+ else {
+ return enc;
}
- return enc;
+}
+
+static VALUE
+rb_enc_from_encoding_index(int idx)
+{
+ return enc_list_lookup(idx);
}
VALUE
@@ -133,16 +181,14 @@ rb_enc_dummy_p(rb_encoding *enc)
return ENC_DUMMY_P(enc) != 0;
}
-static int enc_autoload(rb_encoding *);
-
static int
check_encoding(rb_encoding *enc)
{
int index = rb_enc_to_index(enc);
if (rb_enc_from_index(index) != enc)
- return -1;
- if (enc_autoload_p(enc)) {
- index = enc_autoload(enc);
+ return -1;
+ if (rb_enc_autoload_p(enc)) {
+ index = rb_enc_autoload(enc);
}
return index;
}
@@ -151,7 +197,7 @@ static int
enc_check_encoding(VALUE obj)
{
if (!is_obj_encoding(obj)) {
- return -1;
+ return -1;
}
return check_encoding(RDATA(obj)->data);
}
@@ -161,7 +207,7 @@ static void
not_encoding(VALUE enc)
{
rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected Encoding)",
- rb_obj_class(enc));
+ rb_obj_class(enc));
}
static rb_encoding *
@@ -169,7 +215,7 @@ must_encoding(VALUE enc)
{
int index = enc_check_encoding(enc);
if (index < 0) {
- not_encoding(enc);
+ not_encoding(enc);
}
return DATA_PTR(enc);
}
@@ -179,16 +225,16 @@ must_encindex(int index)
{
rb_encoding *enc = rb_enc_from_index(index);
if (!enc) {
- rb_raise(rb_eEncodingError, "encoding index out of bound: %d",
- index);
+ rb_raise(rb_eEncodingError, "encoding index out of bound: %d",
+ index);
}
if (ENC_TO_ENCINDEX(enc) != (int)(index & ENC_INDEX_MASK)) {
- rb_raise(rb_eEncodingError, "wrong encoding index %d for %s (expected %d)",
- index, rb_enc_name(enc), ENC_TO_ENCINDEX(enc));
+ rb_raise(rb_eEncodingError, "wrong encoding index %d for %s (expected %d)",
+ index, rb_enc_name(enc), ENC_TO_ENCINDEX(enc));
}
- if (enc_autoload_p(enc) && enc_autoload(enc) == -1) {
- rb_loaderror("failed to load encoding (%s)",
- rb_enc_name(enc));
+ if (rb_enc_autoload_p(enc) && rb_enc_autoload(enc) == -1) {
+ rb_loaderror("failed to load encoding (%s)",
+ rb_enc_name(enc));
}
return enc;
}
@@ -197,31 +243,45 @@ int
rb_to_encoding_index(VALUE enc)
{
int idx;
+ const char *name;
idx = enc_check_encoding(enc);
if (idx >= 0) {
- return idx;
+ return idx;
}
else if (NIL_P(enc = rb_check_string_type(enc))) {
- return -1;
+ return -1;
}
if (!rb_enc_asciicompat(rb_enc_get(enc))) {
- return -1;
+ return -1;
+ }
+ if (!(name = rb_str_to_cstr(enc))) {
+ return -1;
}
- return rb_enc_find_index(StringValueCStr(enc));
+ return rb_enc_find_index(name);
+}
+
+static const char *
+name_for_encoding(volatile VALUE *enc)
+{
+ VALUE name = StringValue(*enc);
+ const char *n;
+
+ if (!rb_enc_asciicompat(rb_enc_get(name))) {
+ rb_raise(rb_eArgError, "invalid encoding name (non ASCII)");
+ }
+ if (!(n = rb_str_to_cstr(name))) {
+ rb_raise(rb_eArgError, "invalid encoding name (NUL byte)");
+ }
+ return n;
}
/* Returns encoding index or UNSPECIFIED_ENCODING */
static int
str_find_encindex(VALUE enc)
{
- int idx;
-
- StringValue(enc);
- if (!rb_enc_asciicompat(rb_enc_get(enc))) {
- rb_raise(rb_eArgError, "invalid name encoding (non ASCII)");
- }
- idx = rb_enc_find_index(StringValueCStr(enc));
+ int idx = rb_enc_find_index(name_for_encoding(&enc));
+ RB_GC_GUARD(enc);
return idx;
}
@@ -230,7 +290,7 @@ str_to_encindex(VALUE enc)
{
int idx = str_find_encindex(enc);
if (idx < 0) {
- rb_raise(rb_eArgError, "unknown encoding name - %"PRIsVALUE, enc);
+ rb_raise(rb_eArgError, "unknown encoding name - %"PRIsVALUE, enc);
}
return idx;
}
@@ -259,117 +319,148 @@ rb_find_encoding(VALUE enc)
}
static int
-enc_table_expand(int newsize)
+enc_table_expand(struct enc_table *enc_table, int newsize)
{
- struct rb_encoding_entry *ent;
- int count = newsize;
-
- if (enc_table.size >= newsize) return newsize;
- newsize = (newsize + 7) / 8 * 8;
- ent = REALLOC_N(enc_table.list, struct rb_encoding_entry, newsize);
- memset(ent + enc_table.size, 0, sizeof(*ent)*(newsize - enc_table.size));
- enc_table.list = ent;
- enc_table.size = newsize;
- return count;
+ if (newsize > ENCODING_LIST_CAPA) {
+ rb_raise(rb_eEncodingError, "too many encoding (> %d)", ENCODING_LIST_CAPA);
+ }
+ return newsize;
}
static int
-enc_register_at(int index, const char *name, rb_encoding *base_encoding)
+enc_register_at(struct enc_table *enc_table, int index, const char *name, rb_encoding *base_encoding)
{
- struct rb_encoding_entry *ent = &enc_table.list[index];
+ struct rb_encoding_entry *ent = &enc_table->list[index];
rb_raw_encoding *encoding;
- VALUE list;
if (!valid_encoding_name_p(name)) return -1;
if (!ent->name) {
- ent->name = name = strdup(name);
+ ent->name = name = strdup(name);
}
else if (STRCASECMP(name, ent->name)) {
- return -1;
+ return -1;
}
encoding = (rb_raw_encoding *)ent->enc;
if (!encoding) {
- encoding = xmalloc(sizeof(rb_encoding));
+ encoding = xmalloc(sizeof(rb_encoding));
}
if (base_encoding) {
- *encoding = *base_encoding;
+ *encoding = *base_encoding;
}
else {
- memset(encoding, 0, sizeof(*ent->enc));
+ memset(encoding, 0, sizeof(*ent->enc));
}
encoding->name = name;
encoding->ruby_encoding_index = index;
ent->enc = encoding;
- st_insert(enc_table.names, (st_data_t)name, (st_data_t)index);
- list = rb_encoding_list;
- if (list && NIL_P(rb_ary_entry(list, index))) {
- /* initialize encoding data */
- rb_ary_store(list, index, enc_new(encoding));
- }
+ st_insert(enc_table->names, (st_data_t)name, (st_data_t)index);
+
+ enc_list_update(index, encoding);
return index;
}
static int
-enc_register(const char *name, rb_encoding *encoding)
+enc_register(struct enc_table *enc_table, const char *name, rb_encoding *encoding)
{
- int index = enc_table.count;
+ int index = enc_table->count;
- if ((index = enc_table_expand(index + 1)) < 0) return -1;
- enc_table.count = index;
- return enc_register_at(index - 1, name, encoding);
+ enc_table->count = enc_table_expand(enc_table, index + 1);
+ return enc_register_at(enc_table, index, name, encoding);
}
static void set_encoding_const(const char *, rb_encoding *);
-int rb_enc_registered(const char *name);
+static int enc_registered(struct enc_table *enc_table, const char *name);
+
+static rb_encoding *
+enc_from_index(struct enc_table *enc_table, int index)
+{
+ if (UNLIKELY(index < 0 || enc_table->count <= (index &= ENC_INDEX_MASK))) {
+ return 0;
+ }
+ return enc_table->list[index].enc;
+}
+
+rb_encoding *
+rb_enc_from_index(int index)
+{
+ return enc_from_index(&global_enc_table, index);
+}
int
rb_enc_register(const char *name, rb_encoding *encoding)
{
- int index = rb_enc_registered(name);
+ int index;
+
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ index = enc_registered(enc_table, name);
+
+ if (index >= 0) {
+ rb_encoding *oldenc = enc_from_index(enc_table, index);
+ if (STRCASECMP(name, rb_enc_name(oldenc))) {
+ index = enc_register(enc_table, name, encoding);
+ }
+ else if (rb_enc_autoload_p(oldenc) || !ENC_DUMMY_P(oldenc)) {
+ enc_register_at(enc_table, index, name, encoding);
+ }
+ else {
+ rb_raise(rb_eArgError, "encoding %s is already registered", name);
+ }
+ }
+ else {
+ index = enc_register(enc_table, name, encoding);
+ set_encoding_const(name, rb_enc_from_index(index));
+ }
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
+ return index;
+}
- if (index >= 0) {
- rb_encoding *oldenc = rb_enc_from_index(index);
- if (STRCASECMP(name, rb_enc_name(oldenc))) {
- index = enc_register(name, encoding);
- }
- else if (enc_autoload_p(oldenc) || !ENC_DUMMY_P(oldenc)) {
- enc_register_at(index, name, encoding);
- }
- else {
- rb_raise(rb_eArgError, "encoding %s is already registered", name);
- }
- }
- else {
- index = enc_register(name, encoding);
- set_encoding_const(name, rb_enc_from_index(index));
+int
+enc_registered(struct enc_table *enc_table, const char *name)
+{
+ st_data_t idx = 0;
+
+ if (!name) return -1;
+ if (!enc_table->names) return -1;
+ if (st_lookup(enc_table->names, (st_data_t)name, &idx)) {
+ return (int)idx;
}
- return index;
+ return -1;
}
void
rb_encdb_declare(const char *name)
{
- int idx = rb_enc_registered(name);
- if (idx < 0) {
- idx = enc_register(name, 0);
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ int idx = enc_registered(enc_table, name);
+ if (idx < 0) {
+ idx = enc_register(enc_table, name, 0);
+ }
+ set_encoding_const(name, rb_enc_from_index(idx));
}
- set_encoding_const(name, rb_enc_from_index(idx));
+ GLOBAL_ENC_TABLE_LEAVE();
}
static void
-enc_check_duplication(const char *name)
+enc_check_addable(struct enc_table *enc_table, const char *name)
{
- if (rb_enc_registered(name) >= 0) {
- rb_raise(rb_eArgError, "encoding %s is already registered", name);
+ if (enc_registered(enc_table, name) >= 0) {
+ rb_raise(rb_eArgError, "encoding %s is already registered", name);
+ }
+ else if (!valid_encoding_name_p(name)) {
+ rb_raise(rb_eArgError, "invalid encoding name: %s", name);
}
}
static rb_encoding*
-set_base_encoding(int index, rb_encoding *base)
+set_base_encoding(struct enc_table *enc_table, int index, rb_encoding *base)
{
- rb_encoding *enc = enc_table.list[index].enc;
+ rb_encoding *enc = enc_table->list[index].enc;
- enc_table.list[index].base = base;
+ ASSUME(enc);
+ enc_table->list[index].base = base;
if (ENC_DUMMY_P(base)) ENC_SET_DUMMY((rb_raw_encoding *)enc);
return enc;
}
@@ -381,9 +472,13 @@ set_base_encoding(int index, rb_encoding *base)
void
rb_enc_set_base(const char *name, const char *orig)
{
- int idx = rb_enc_registered(name);
- int origidx = rb_enc_registered(orig);
- set_base_encoding(idx, rb_enc_from_index(origidx));
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ int idx = enc_registered(enc_table, name);
+ int origidx = enc_registered(enc_table, orig);
+ set_base_encoding(enc_table, idx, rb_enc_from_index(origidx));
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
}
/* for encdb.h
@@ -392,24 +487,35 @@ rb_enc_set_base(const char *name, const char *orig)
int
rb_enc_set_dummy(int index)
{
- rb_encoding *enc = enc_table.list[index].enc;
-
+ rb_encoding *enc = global_enc_table.list[index].enc;
ENC_SET_DUMMY((rb_raw_encoding *)enc);
return index;
}
-int
-rb_enc_replicate(const char *name, rb_encoding *encoding)
+static int
+enc_replicate(struct enc_table *enc_table, const char *name, rb_encoding *encoding)
{
int idx;
- enc_check_duplication(name);
- idx = enc_register(name, encoding);
- set_base_encoding(idx, encoding);
+ enc_check_addable(enc_table, name);
+ idx = enc_register(enc_table, name, encoding);
+ if (idx < 0) rb_raise(rb_eArgError, "invalid encoding name: %s", name);
+ set_base_encoding(enc_table, idx, encoding);
set_encoding_const(name, rb_enc_from_index(idx));
return idx;
}
+int
+rb_enc_replicate(const char *name, rb_encoding *encoding)
+{
+ int r;
+
+ GLOBAL_ENC_TABLE_EVAL(enc_table,
+ r = enc_replicate(enc_table, name, encoding));
+
+ return r;
+}
+
/*
* call-seq:
* enc.replicate(name) -> encoding
@@ -420,25 +526,28 @@ rb_enc_replicate(const char *name, rb_encoding *encoding)
*
*/
static VALUE
-enc_replicate(VALUE encoding, VALUE name)
+enc_replicate_m(VALUE encoding, VALUE name)
{
- return rb_enc_from_encoding_index(
- rb_enc_replicate(StringValueCStr(name),
- rb_to_encoding(encoding)));
+ int idx;
+ rb_warn_deprecated_to_remove("3.3", "Encoding#replicate", "the original encoding");
+
+ idx = rb_enc_replicate(name_for_encoding(&name), rb_to_encoding(encoding));
+ RB_GC_GUARD(name);
+ return rb_enc_from_encoding_index(idx);
}
static int
-enc_replicate_with_index(const char *name, rb_encoding *origenc, int idx)
+enc_replicate_with_index(struct enc_table *enc_table, const char *name, rb_encoding *origenc, int idx)
{
if (idx < 0) {
- idx = enc_register(name, origenc);
+ idx = enc_register(enc_table, name, origenc);
}
else {
- idx = enc_register_at(idx, name, origenc);
+ idx = enc_register_at(enc_table, idx, name, origenc);
}
if (idx >= 0) {
- set_base_encoding(idx, origenc);
- set_encoding_const(name, rb_enc_from_index(idx));
+ set_base_encoding(enc_table, idx, origenc);
+ set_encoding_const(name, rb_enc_from_index(idx));
}
else {
rb_raise(rb_eArgError, "failed to replicate encoding");
@@ -449,33 +558,54 @@ enc_replicate_with_index(const char *name, rb_encoding *origenc, int idx)
int
rb_encdb_replicate(const char *name, const char *orig)
{
- int origidx = rb_enc_registered(orig);
- int idx = rb_enc_registered(name);
+ int r;
- if (origidx < 0) {
- origidx = enc_register(orig, 0);
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ int origidx = enc_registered(enc_table, orig);
+ int idx = enc_registered(enc_table, name);
+
+ if (origidx < 0) {
+ origidx = enc_register(enc_table, orig, 0);
+ }
+ r = enc_replicate_with_index(enc_table, name, rb_enc_from_index(origidx), idx);
}
- return enc_replicate_with_index(name, rb_enc_from_index(origidx), idx);
+ GLOBAL_ENC_TABLE_LEAVE();
+
+ return r;
}
int
rb_define_dummy_encoding(const char *name)
{
- int index = rb_enc_replicate(name, rb_ascii8bit_encoding());
- rb_encoding *enc = enc_table.list[index].enc;
+ int index;
+
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ index = enc_replicate(enc_table, name, rb_ascii8bit_encoding());
+ rb_encoding *enc = enc_table->list[index].enc;
+ ENC_SET_DUMMY((rb_raw_encoding *)enc);
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
- ENC_SET_DUMMY((rb_raw_encoding *)enc);
return index;
}
int
rb_encdb_dummy(const char *name)
{
- int index = enc_replicate_with_index(name, rb_ascii8bit_encoding(),
- rb_enc_registered(name));
- rb_encoding *enc = enc_table.list[index].enc;
+ int index;
+
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ index = enc_replicate_with_index(enc_table, name,
+ rb_ascii8bit_encoding(),
+ enc_registered(enc_table, name));
+ rb_encoding *enc = enc_table->list[index].enc;
+ ENC_SET_DUMMY((rb_raw_encoding *)enc);
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
- ENC_SET_DUMMY((rb_raw_encoding *)enc);
return index;
}
@@ -495,7 +625,7 @@ rb_encdb_dummy(const char *name)
static VALUE
enc_dummy_p(VALUE enc)
{
- return ENC_DUMMY_P(must_encoding(enc)) ? Qtrue : Qfalse;
+ return RBOOL(ENC_DUMMY_P(must_encoding(enc)));
}
/*
@@ -511,7 +641,7 @@ enc_dummy_p(VALUE enc)
static VALUE
enc_ascii_compatible_p(VALUE enc)
{
- return rb_enc_asciicompat(must_encoding(enc)) ? Qtrue : Qfalse;
+ return RBOOL(rb_enc_asciicompat(must_encoding(enc)));
}
/*
@@ -534,63 +664,78 @@ enc_dup_name(st_data_t name)
* else returns NULL.
*/
static int
-enc_alias_internal(const char *alias, int idx)
+enc_alias_internal(struct enc_table *enc_table, const char *alias, int idx)
{
- return st_insert2(enc_table.names, (st_data_t)alias, (st_data_t)idx,
- enc_dup_name);
+ return st_insert2(enc_table->names, (st_data_t)alias, (st_data_t)idx,
+ enc_dup_name);
}
static int
-enc_alias(const char *alias, int idx)
+enc_alias(struct enc_table *enc_table, const char *alias, int idx)
{
if (!valid_encoding_name_p(alias)) return -1;
- if (!enc_alias_internal(alias, idx))
- set_encoding_const(alias, rb_enc_from_index(idx));
+ if (!enc_alias_internal(enc_table, alias, idx))
+ set_encoding_const(alias, enc_from_index(enc_table, idx));
return idx;
}
int
rb_enc_alias(const char *alias, const char *orig)
{
- int idx;
+ int idx, r;
- enc_check_duplication(alias);
- if ((idx = rb_enc_find_index(orig)) < 0) {
- return -1;
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ enc_check_addable(enc_table, alias);
+ if ((idx = rb_enc_find_index(orig)) < 0) {
+ r = -1;
+ }
+ else {
+ r = enc_alias(enc_table, alias, idx);
+ }
}
- return enc_alias(alias, idx);
+ GLOBAL_ENC_TABLE_LEAVE();
+
+ return r;
}
int
rb_encdb_alias(const char *alias, const char *orig)
{
- int idx = rb_enc_registered(orig);
+ int r;
- if (idx < 0) {
- idx = enc_register(orig, 0);
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ int idx = enc_registered(enc_table, orig);
+
+ if (idx < 0) {
+ idx = enc_register(enc_table, orig, 0);
+ }
+ r = enc_alias(enc_table, alias, idx);
}
- return enc_alias(alias, idx);
-}
+ GLOBAL_ENC_TABLE_LEAVE();
-void
-rb_encdb_set_unicode(int index)
-{
- ((rb_raw_encoding *)rb_enc_from_index(index))->flags |= ONIGENC_FLAG_UNICODE;
+ return r;
}
-void
-rb_enc_init(void)
+static void
+rb_enc_init(struct enc_table *enc_table)
{
- enc_table_expand(ENCODING_COUNT + 1);
- if (!enc_table.names) {
- enc_table.names = st_init_strcasetable();
+ enc_table_expand(enc_table, ENCODING_COUNT + 1);
+ if (!enc_table->names) {
+ enc_table->names = st_init_strcasetable_with_size(ENCODING_LIST_CAPA);
}
-#define ENC_REGISTER(enc) enc_register_at(ENCINDEX_##enc, rb_enc_name(&OnigEncoding##enc), &OnigEncoding##enc)
- ENC_REGISTER(ASCII);
+#define OnigEncodingASCII_8BIT OnigEncodingASCII
+#define ENC_REGISTER(enc) enc_register_at(enc_table, ENCINDEX_##enc, rb_enc_name(&OnigEncoding##enc), &OnigEncoding##enc)
+ ENC_REGISTER(ASCII_8BIT);
ENC_REGISTER(UTF_8);
ENC_REGISTER(US_ASCII);
+ global_enc_ascii = enc_table->list[ENCINDEX_ASCII_8BIT].enc;
+ global_enc_utf_8 = enc_table->list[ENCINDEX_UTF_8].enc;
+ global_enc_us_ascii = enc_table->list[ENCINDEX_US_ASCII].enc;
#undef ENC_REGISTER
-#define ENCDB_REGISTER(name, enc) enc_register_at(ENCINDEX_##enc, name, NULL)
+#undef OnigEncodingASCII_8BIT
+#define ENCDB_REGISTER(name, enc) enc_register_at(enc_table, ENCINDEX_##enc, name, NULL)
ENCDB_REGISTER("UTF-16BE", UTF_16BE);
ENCDB_REGISTER("UTF-16LE", UTF_16LE);
ENCDB_REGISTER("UTF-32BE", UTF_32BE);
@@ -602,16 +747,7 @@ rb_enc_init(void)
ENCDB_REGISTER("EUC-JP", EUC_JP);
ENCDB_REGISTER("Windows-31J", Windows_31J);
#undef ENCDB_REGISTER
- enc_table.count = ENCINDEX_BUILTIN_MAX;
-}
-
-rb_encoding *
-rb_enc_from_index(int index)
-{
- if (UNLIKELY(index < 0 || enc_table.count <= (index &= ENC_INDEX_MASK))) {
- return 0;
- }
- return enc_table.list[index].enc;
+ enc_table->count = ENCINDEX_BUILTIN_MAX;
}
rb_encoding *
@@ -620,24 +756,12 @@ rb_enc_get_from_index(int index)
return must_encindex(index);
}
-int
-rb_enc_registered(const char *name)
-{
- st_data_t idx = 0;
-
- if (!name) return -1;
- if (!enc_table.list) return -1;
- if (st_lookup(enc_table.names, (st_data_t)name, &idx)) {
- return (int)idx;
- }
- return -1;
-}
+int rb_require_internal_silent(VALUE fname);
static int
load_encoding(const char *name)
{
VALUE enclib = rb_sprintf("enc/%s.so", name);
- VALUE verbose = ruby_verbose;
VALUE debug = ruby_debug;
VALUE errinfo;
char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib) - 3;
@@ -645,45 +769,65 @@ load_encoding(const char *name)
int idx;
while (s < e) {
- if (!ISALNUM(*s)) *s = '_';
- else if (ISUPPER(*s)) *s = (char)TOLOWER(*s);
- ++s;
+ if (!ISALNUM(*s)) *s = '_';
+ else if (ISUPPER(*s)) *s = (char)TOLOWER(*s);
+ ++s;
}
enclib = rb_fstring(enclib);
- ruby_verbose = Qfalse;
ruby_debug = Qfalse;
errinfo = rb_errinfo();
- loaded = rb_require_internal(enclib);
- ruby_verbose = verbose;
+ loaded = rb_require_internal_silent(enclib);
ruby_debug = debug;
rb_set_errinfo(errinfo);
- if (loaded < 0 || 1 < loaded) return -1;
- if ((idx = rb_enc_registered(name)) < 0) return -1;
- if (enc_autoload_p(enc_table.list[idx].enc)) return -1;
+
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ if (loaded < 0 || 1 < loaded) {
+ idx = -1;
+ }
+ else if ((idx = enc_registered(enc_table, name)) < 0) {
+ idx = -1;
+ }
+ else if (rb_enc_autoload_p(enc_table->list[idx].enc)) {
+ idx = -1;
+ }
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
+
return idx;
}
static int
-enc_autoload(rb_encoding *enc)
+enc_autoload_body(struct enc_table *enc_table, rb_encoding *enc)
{
- int i;
- rb_encoding *base = enc_table.list[ENC_TO_ENCINDEX(enc)].base;
+ rb_encoding *base = enc_table->list[ENC_TO_ENCINDEX(enc)].base;
if (base) {
- i = 0;
- do {
- if (i >= enc_table.count) return -1;
- } while (enc_table.list[i].enc != base && (++i, 1));
- if (enc_autoload_p(base)) {
- if (enc_autoload(base) < 0) return -1;
- }
- i = enc->ruby_encoding_index;
- enc_register_at(i & ENC_INDEX_MASK, rb_enc_name(enc), base);
- ((rb_raw_encoding *)enc)->ruby_encoding_index = i;
- i &= ENC_INDEX_MASK;
+ int i = 0;
+ do {
+ if (i >= enc_table->count) return -1;
+ } while (enc_table->list[i].enc != base && (++i, 1));
+ if (rb_enc_autoload_p(base)) {
+ if (rb_enc_autoload(base) < 0) return -1;
+ }
+ i = enc->ruby_encoding_index;
+ enc_register_at(enc_table, i & ENC_INDEX_MASK, rb_enc_name(enc), base);
+ ((rb_raw_encoding *)enc)->ruby_encoding_index = i;
+ i &= ENC_INDEX_MASK;
+ return i;
}
else {
- i = load_encoding(rb_enc_name(enc));
+ return -2;
+ }
+}
+
+int
+rb_enc_autoload(rb_encoding *enc)
+{
+ int i;
+ GLOBAL_ENC_TABLE_EVAL(enc_table, i = enc_autoload_body(enc_table, enc));
+ if (i == -2) {
+ i = load_encoding(rb_enc_name(enc));
}
return i;
}
@@ -692,23 +836,23 @@ enc_autoload(rb_encoding *enc)
int
rb_enc_find_index(const char *name)
{
- int i = rb_enc_registered(name);
+ int i = enc_registered(&global_enc_table, name);
rb_encoding *enc;
if (i < 0) {
- i = load_encoding(name);
+ i = load_encoding(name);
}
else if (!(enc = rb_enc_from_index(i))) {
- if (i != UNSPECIFIED_ENCODING) {
- rb_raise(rb_eArgError, "encoding %s is not registered", name);
- }
+ if (i != UNSPECIFIED_ENCODING) {
+ rb_raise(rb_eArgError, "encoding %s is not registered", name);
+ }
}
- else if (enc_autoload_p(enc)) {
- if (enc_autoload(enc) < 0) {
- rb_warn("failed to load encoding (%s); use ASCII-8BIT instead",
- name);
- return 0;
- }
+ else if (rb_enc_autoload_p(enc)) {
+ if (rb_enc_autoload(enc) < 0) {
+ rb_warn("failed to load encoding (%s); use ASCII-8BIT instead",
+ name);
+ return 0;
+ }
}
return i;
}
@@ -741,11 +885,11 @@ enc_capable(VALUE obj)
case T_REGEXP:
case T_FILE:
case T_SYMBOL:
- return TRUE;
+ return TRUE;
case T_DATA:
- if (is_data_encoding(obj)) return TRUE;
+ if (is_data_encoding(obj)) return TRUE;
default:
- return FALSE;
+ return FALSE;
}
}
@@ -767,10 +911,20 @@ enc_get_index_str(VALUE str)
{
int i = ENCODING_GET_INLINED(str);
if (i == ENCODING_INLINE_MAX) {
- VALUE iv;
-
- iv = rb_ivar_get(str, rb_id_encoding());
- i = NUM2INT(iv);
+ VALUE iv;
+
+#if 0
+ iv = rb_ivar_get(str, rb_id_encoding());
+ i = NUM2INT(iv);
+#else
+ /*
+ * Tentatively, assume ASCII-8BIT, if encoding index instance
+ * variable is not found. This can happen when freeing after
+ * all instance variables are removed in `obj_free`.
+ */
+ iv = rb_attr_get(str, rb_id_encoding());
+ i = NIL_P(iv) ? ENCINDEX_ASCII_8BIT : NUM2INT(iv);
+#endif
}
return i;
}
@@ -782,31 +936,31 @@ rb_enc_get_index(VALUE obj)
VALUE tmp;
if (SPECIAL_CONST_P(obj)) {
- if (!SYMBOL_P(obj)) return -1;
- obj = rb_sym2str(obj);
+ if (!SYMBOL_P(obj)) return -1;
+ obj = rb_sym2str(obj);
}
switch (BUILTIN_TYPE(obj)) {
case T_STRING:
case T_SYMBOL:
case T_REGEXP:
- i = enc_get_index_str(obj);
- break;
+ i = enc_get_index_str(obj);
+ break;
case T_FILE:
- tmp = rb_funcallv(obj, rb_intern("internal_encoding"), 0, 0);
- if (NIL_P(tmp)) {
- tmp = rb_funcallv(obj, rb_intern("external_encoding"), 0, 0);
- }
- if (is_obj_encoding(tmp)) {
- i = enc_check_encoding(tmp);
- }
- break;
+ tmp = rb_funcallv(obj, rb_intern("internal_encoding"), 0, 0);
+ if (NIL_P(tmp)) {
+ tmp = rb_funcallv(obj, rb_intern("external_encoding"), 0, 0);
+ }
+ if (is_obj_encoding(tmp)) {
+ i = enc_check_encoding(tmp);
+ }
+ break;
case T_DATA:
- if (is_data_encoding(obj)) {
- i = enc_check_encoding(obj);
- }
- break;
+ if (is_data_encoding(obj)) {
+ i = enc_check_encoding(obj);
+ }
+ break;
default:
- break;
+ break;
}
return i;
}
@@ -819,8 +973,8 @@ enc_set_index(VALUE obj, int idx)
}
if (idx < ENCODING_INLINE_MAX) {
- ENCODING_SET_INLINED(obj, idx);
- return;
+ ENCODING_SET_INLINED(obj, idx);
+ return;
}
ENCODING_SET_INLINED(obj, ENCODING_INLINE_MAX);
rb_ivar_set(obj, rb_id_encoding(), INT2NUM(idx));
@@ -844,19 +998,19 @@ rb_enc_associate_index(VALUE obj, int idx)
rb_check_frozen(obj);
oldidx = rb_enc_get_index(obj);
if (oldidx == idx)
- return obj;
+ return obj;
if (SPECIAL_CONST_P(obj)) {
- rb_raise(rb_eArgError, "cannot set encoding");
+ rb_raise(rb_eArgError, "cannot set encoding");
}
enc = must_encindex(idx);
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
- !rb_enc_asciicompat(enc)) {
- ENC_CODERANGE_CLEAR(obj);
+ !rb_enc_asciicompat(enc)) {
+ ENC_CODERANGE_CLEAR(obj);
}
termlen = rb_enc_mbminlen(enc);
oldtermlen = rb_enc_mbminlen(rb_enc_from_index(oldidx));
if (oldtermlen != termlen && RB_TYPE_P(obj, T_STRING)) {
- rb_str_change_terminator_length(obj, oldtermlen, termlen);
+ rb_str_change_terminator_length(obj, oldtermlen, termlen);
}
enc_set_index(obj, idx);
return obj;
@@ -874,28 +1028,30 @@ rb_enc_get(VALUE obj)
return rb_enc_from_index(rb_enc_get_index(obj));
}
+static rb_encoding*
+rb_encoding_check(rb_encoding* enc, VALUE str1, VALUE str2)
+{
+ if (!enc)
+ rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s",
+ rb_enc_name(rb_enc_get(str1)),
+ rb_enc_name(rb_enc_get(str2)));
+ return enc;
+}
+
static rb_encoding* enc_compatible_str(VALUE str1, VALUE str2);
rb_encoding*
rb_enc_check_str(VALUE str1, VALUE str2)
{
rb_encoding *enc = enc_compatible_str(MUST_STRING(str1), MUST_STRING(str2));
- if (!enc)
- rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s",
- rb_enc_name(rb_enc_get(str1)),
- rb_enc_name(rb_enc_get(str2)));
- return enc;
+ return rb_encoding_check(enc, str1, str2);
}
rb_encoding*
rb_enc_check(VALUE str1, VALUE str2)
{
rb_encoding *enc = rb_enc_compatible(str1, str2);
- if (!enc)
- rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s",
- rb_enc_name(rb_enc_get(str1)),
- rb_enc_name(rb_enc_get(str2)));
- return enc;
+ return rb_encoding_check(enc, str1, str2);
}
static rb_encoding*
@@ -907,48 +1063,48 @@ enc_compatible_latter(VALUE str1, VALUE str2, int idx1, int idx2)
isstr2 = RB_TYPE_P(str2, T_STRING);
if (isstr2 && RSTRING_LEN(str2) == 0)
- return enc1;
+ return enc1;
isstr1 = RB_TYPE_P(str1, T_STRING);
- if (isstr1 && RSTRING_LEN(str1) == 0)
- return (rb_enc_asciicompat(enc1) && rb_enc_str_asciionly_p(str2)) ? enc1 : enc2;
+ if (isstr1 && isstr2 && RSTRING_LEN(str1) == 0)
+ return (rb_enc_asciicompat(enc1) && rb_enc_str_asciionly_p(str2)) ? enc1 : enc2;
if (!rb_enc_asciicompat(enc1) || !rb_enc_asciicompat(enc2)) {
- return 0;
+ return 0;
}
/* objects whose encoding is the same of contents */
if (!isstr2 && idx2 == ENCINDEX_US_ASCII)
- return enc1;
+ return enc1;
if (!isstr1 && idx1 == ENCINDEX_US_ASCII)
- return enc2;
+ return enc2;
if (!isstr1) {
- VALUE tmp = str1;
- int idx0 = idx1;
- str1 = str2;
- str2 = tmp;
- idx1 = idx2;
- idx2 = idx0;
- idx0 = isstr1;
- isstr1 = isstr2;
- isstr2 = idx0;
+ VALUE tmp = str1;
+ int idx0 = idx1;
+ str1 = str2;
+ str2 = tmp;
+ idx1 = idx2;
+ idx2 = idx0;
+ idx0 = isstr1;
+ isstr1 = isstr2;
+ isstr2 = idx0;
}
if (isstr1) {
- int cr1, cr2;
-
- cr1 = rb_enc_str_coderange(str1);
- if (isstr2) {
- cr2 = rb_enc_str_coderange(str2);
- if (cr1 != cr2) {
- /* may need to handle ENC_CODERANGE_BROKEN */
- if (cr1 == ENC_CODERANGE_7BIT) return enc2;
- if (cr2 == ENC_CODERANGE_7BIT) return enc1;
- }
- if (cr2 == ENC_CODERANGE_7BIT) {
- return enc1;
- }
- }
- if (cr1 == ENC_CODERANGE_7BIT)
- return enc2;
+ int cr1, cr2;
+
+ cr1 = rb_enc_str_coderange(str1);
+ if (isstr2) {
+ cr2 = rb_enc_str_coderange(str2);
+ if (cr1 != cr2) {
+ /* may need to handle ENC_CODERANGE_BROKEN */
+ if (cr1 == ENC_CODERANGE_7BIT) return enc2;
+ if (cr2 == ENC_CODERANGE_7BIT) return enc1;
+ }
+ if (cr2 == ENC_CODERANGE_7BIT) {
+ return enc1;
+ }
+ }
+ if (cr1 == ENC_CODERANGE_7BIT)
+ return enc2;
}
return 0;
}
@@ -963,10 +1119,10 @@ enc_compatible_str(VALUE str1, VALUE str2)
return 0;
if (idx1 == idx2) {
- return rb_enc_from_index(idx1);
+ return rb_enc_from_index(idx1);
}
else {
- return enc_compatible_latter(str1, str2, idx1, idx2);
+ return enc_compatible_latter(str1, str2, idx1, idx2);
}
}
@@ -980,7 +1136,7 @@ rb_enc_compatible(VALUE str1, VALUE str2)
return 0;
if (idx1 == idx2) {
- return rb_enc_from_index(idx1);
+ return rb_enc_from_index(idx1);
}
return enc_compatible_latter(str1, str2, idx1, idx2);
@@ -1005,7 +1161,7 @@ rb_obj_encoding(VALUE obj)
{
int idx = rb_enc_get_index(obj);
if (idx < 0) {
- rb_raise(rb_eTypeError, "unknown encoding");
+ rb_raise(rb_eTypeError, "unknown encoding");
}
return rb_enc_from_encoding_index(idx & ENC_INDEX_MASK);
}
@@ -1072,36 +1228,22 @@ rb_enc_codepoint_len(const char *p, const char *e, int *len_p, rb_encoding *enc)
rb_raise(rb_eArgError, "empty string");
r = rb_enc_precise_mbclen(p, e, enc);
if (!MBCLEN_CHARFOUND_P(r)) {
- rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
+ rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
}
if (len_p) *len_p = MBCLEN_CHARFOUND_LEN(r);
return rb_enc_mbc_to_codepoint(p, e, enc);
}
-#undef rb_enc_codepoint
-unsigned int
-rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
-{
- return rb_enc_codepoint_len(p, e, 0, enc);
-}
-
int
rb_enc_codelen(int c, rb_encoding *enc)
{
int n = ONIGENC_CODE_TO_MBCLEN(enc,c);
if (n == 0) {
- rb_raise(rb_eArgError, "invalid codepoint 0x%x in %s", c, rb_enc_name(enc));
+ rb_raise(rb_eArgError, "invalid codepoint 0x%x in %s", c, rb_enc_name(enc));
}
return n;
}
-#undef rb_enc_code_to_mbclen
-int
-rb_enc_code_to_mbclen(int code, rb_encoding *enc)
-{
- return ONIGENC_CODE_TO_MBCLEN(enc, code);
-}
-
int
rb_enc_toupper(int c, rb_encoding *enc)
{
@@ -1129,16 +1271,16 @@ enc_inspect(VALUE self)
rb_encoding *enc;
if (!is_data_encoding(self)) {
- not_encoding(self);
+ not_encoding(self);
}
if (!(enc = DATA_PTR(self)) || rb_enc_from_index(rb_enc_to_index(enc)) != enc) {
- rb_raise(rb_eTypeError, "broken Encoding");
+ rb_raise(rb_eTypeError, "broken Encoding");
}
return rb_enc_sprintf(rb_usascii_encoding(),
- "#<%"PRIsVALUE":%s%s%s>", rb_obj_class(self),
- rb_enc_name(enc),
- (ENC_DUMMY_P(enc) ? " (dummy)" : ""),
- enc_autoload_p(enc) ? " (autoload)" : "");
+ "#<%"PRIsVALUE":%s%s%s>", rb_obj_class(self),
+ rb_enc_name(enc),
+ (ENC_DUMMY_P(enc) ? " (dummy)" : ""),
+ rb_enc_autoload_p(enc) ? " (autoload)" : "");
}
/*
@@ -1162,8 +1304,8 @@ enc_names_i(st_data_t name, st_data_t idx, st_data_t args)
VALUE *arg = (VALUE *)args;
if ((int)idx == (int)arg[0]) {
- VALUE str = rb_fstring_cstr((char *)name);
- rb_ary_push(arg[1], str);
+ VALUE str = rb_fstring_cstr((char *)name);
+ rb_ary_push(arg[1], str);
}
return ST_CONTINUE;
}
@@ -1183,7 +1325,7 @@ enc_names(VALUE self)
args[0] = (VALUE)rb_to_encoding_index(self);
args[1] = rb_ary_new2(0);
- st_foreach(enc_table.names, enc_names_i, (st_data_t)args);
+ st_foreach(global_enc_table.names, enc_names_i, (st_data_t)args);
return args[1];
}
@@ -1240,7 +1382,7 @@ enc_find(VALUE klass, VALUE enc)
{
int idx;
if (is_obj_encoding(enc))
- return enc;
+ return enc;
idx = str_to_encindex(enc);
if (idx == UNSPECIFIED_ENCODING) return Qnil;
return rb_enc_from_encoding_index(idx);
@@ -1282,12 +1424,13 @@ enc_compatible_p(VALUE klass, VALUE str1, VALUE str2)
return rb_enc_from_encoding(enc);
}
+NORETURN(static VALUE enc_s_alloc(VALUE klass));
/* :nodoc: */
static VALUE
enc_s_alloc(VALUE klass)
{
rb_undefined_alloc(klass);
- return Qnil;
+ UNREACHABLE_RETURN(Qnil);
}
/* :nodoc: */
@@ -1315,19 +1458,19 @@ enc_m_loader(VALUE klass, VALUE str)
rb_encoding *
rb_ascii8bit_encoding(void)
{
- return enc_table.list[ENCINDEX_ASCII].enc;
+ return global_enc_ascii;
}
int
rb_ascii8bit_encindex(void)
{
- return ENCINDEX_ASCII;
+ return ENCINDEX_ASCII_8BIT;
}
rb_encoding *
rb_utf8_encoding(void)
{
- return enc_table.list[ENCINDEX_UTF_8].enc;
+ return global_enc_utf_8;
}
int
@@ -1339,7 +1482,7 @@ rb_utf8_encindex(void)
rb_encoding *
rb_usascii_encoding(void)
{
- return enc_table.list[ENCINDEX_US_ASCII].enc;
+ return global_enc_us_ascii;
}
int
@@ -1355,14 +1498,18 @@ rb_locale_encindex(void)
{
int idx = rb_locale_charmap_index();
- if (idx < 0) idx = ENCINDEX_ASCII;
+ if (idx < 0) idx = ENCINDEX_UTF_8;
- if (rb_enc_registered("locale") < 0) {
+ if (enc_registered(&global_enc_table, "locale") < 0) {
# if defined _WIN32
- void Init_w32_codepage(void);
- Init_w32_codepage();
+ void Init_w32_codepage(void);
+ Init_w32_codepage();
# endif
- enc_alias_internal("locale", idx);
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ enc_alias_internal(enc_table, "locale", idx);
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
}
return idx;
@@ -1377,9 +1524,8 @@ rb_locale_encoding(void)
int
rb_filesystem_encindex(void)
{
- int idx = rb_enc_registered("filesystem");
- if (idx < 0)
- idx = ENCINDEX_ASCII;
+ int idx = enc_registered(&global_enc_table, "filesystem");
+ if (idx < 0) idx = ENCINDEX_ASCII_8BIT;
return idx;
}
@@ -1402,23 +1548,35 @@ enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const cha
int overridden = FALSE;
if (def->index != -2)
- /* Already set */
- overridden = TRUE;
-
- if (NIL_P(encoding)) {
- def->index = -1;
- def->enc = 0;
- st_insert(enc_table.names, (st_data_t)strdup(name),
- (st_data_t)UNSPECIFIED_ENCODING);
- }
- else {
- def->index = rb_enc_to_index(rb_to_encoding(encoding));
- def->enc = 0;
- enc_alias_internal(name, def->index);
- }
-
- if (def == &default_external)
- enc_alias_internal("filesystem", Init_enc_set_filesystem_encoding());
+ /* Already set */
+ overridden = TRUE;
+
+ GLOBAL_ENC_TABLE_ENTER(enc_table);
+ {
+ if (NIL_P(encoding)) {
+ def->index = -1;
+ def->enc = 0;
+ char *name_dup = strdup(name);
+
+ st_data_t existing_name = (st_data_t)name_dup;
+ if (st_delete(enc_table->names, &existing_name, NULL)) {
+ xfree((void *)existing_name);
+ }
+
+ st_insert(enc_table->names, (st_data_t)name_dup,
+ (st_data_t)UNSPECIFIED_ENCODING);
+ }
+ else {
+ def->index = rb_enc_to_index(rb_to_encoding(encoding));
+ def->enc = 0;
+ enc_alias_internal(enc_table, name, def->index);
+ }
+
+ if (def == &default_external) {
+ enc_alias_internal(enc_table, "filesystem", Init_enc_set_filesystem_encoding());
+ }
+ }
+ GLOBAL_ENC_TABLE_LEAVE();
return overridden;
}
@@ -1465,9 +1623,11 @@ rb_enc_default_external(void)
* encoding may not be valid. Be sure to check String#valid_encoding?.
*
* File data written to disk will be transcoded to the default external
- * encoding when written.
+ * encoding when written, if default_internal is not nil.
*
- * The default external encoding is initialized by the locale or -E option.
+ * The default external encoding is initialized by the -E option.
+ * If -E isn't set, it is initialized to UTF-8 on Windows and the locale on
+ * other operating systems.
*/
static VALUE
get_default_external(VALUE klass)
@@ -1550,8 +1710,7 @@ rb_enc_default_internal(void)
* The script encoding (__ENCODING__), not default_internal, is used as the
* encoding of created strings.
*
- * Encoding::default_internal is initialized by the source file's
- * internal_encoding or -E option.
+ * Encoding::default_internal is initialized with -E option or nil otherwise.
*/
static VALUE
get_default_internal(VALUE klass)
@@ -1596,45 +1755,45 @@ set_encoding_const(const char *name, rb_encoding *enc)
if (ISDIGIT(*s)) return;
if (ISUPPER(*s)) {
- hasupper = 1;
- while (*++s && (ISALNUM(*s) || *s == '_')) {
- if (ISLOWER(*s)) haslower = 1;
- }
+ hasupper = 1;
+ while (*++s && (ISALNUM(*s) || *s == '_')) {
+ if (ISLOWER(*s)) haslower = 1;
+ }
}
if (!*s) {
- if (s - name > ENCODING_NAMELEN_MAX) return;
- valid = 1;
- rb_define_const(rb_cEncoding, name, encoding);
+ if (s - name > ENCODING_NAMELEN_MAX) return;
+ valid = 1;
+ rb_define_const(rb_cEncoding, name, encoding);
}
if (!valid || haslower) {
- size_t len = s - name;
- if (len > ENCODING_NAMELEN_MAX) return;
- if (!haslower || !hasupper) {
- do {
- if (ISLOWER(*s)) haslower = 1;
- if (ISUPPER(*s)) hasupper = 1;
- } while (*++s && (!haslower || !hasupper));
- len = s - name;
- }
- len += strlen(s);
- if (len++ > ENCODING_NAMELEN_MAX) return;
- MEMCPY(s = ALLOCA_N(char, len), name, char, len);
- name = s;
- if (!valid) {
- if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
- for (; *s; ++s) {
- if (!ISALNUM(*s)) *s = '_';
- }
- if (hasupper) {
- rb_define_const(rb_cEncoding, name, encoding);
- }
- }
- if (haslower) {
- for (s = (char *)name; *s; ++s) {
- if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
- }
- rb_define_const(rb_cEncoding, name, encoding);
- }
+ size_t len = s - name;
+ if (len > ENCODING_NAMELEN_MAX) return;
+ if (!haslower || !hasupper) {
+ do {
+ if (ISLOWER(*s)) haslower = 1;
+ if (ISUPPER(*s)) hasupper = 1;
+ } while (*++s && (!haslower || !hasupper));
+ len = s - name;
+ }
+ len += strlen(s);
+ if (len++ > ENCODING_NAMELEN_MAX) return;
+ MEMCPY(s = ALLOCA_N(char, len), name, char, len);
+ name = s;
+ if (!valid) {
+ if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
+ for (; *s; ++s) {
+ if (!ISALNUM(*s)) *s = '_';
+ }
+ if (hasupper) {
+ rb_define_const(rb_cEncoding, name, encoding);
+ }
+ }
+ if (haslower) {
+ for (s = (char *)name; *s; ++s) {
+ if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
+ }
+ rb_define_const(rb_cEncoding, name, encoding);
+ }
}
}
@@ -1664,8 +1823,8 @@ rb_enc_name_list_i(st_data_t name, st_data_t idx, st_data_t arg)
static VALUE
rb_enc_name_list(VALUE klass)
{
- VALUE ary = rb_ary_new2(enc_table.names->num_entries);
- st_foreach(enc_table.names, rb_enc_name_list_i, (st_data_t)ary);
+ VALUE ary = rb_ary_new2(global_enc_table.names->num_entries);
+ st_foreach(global_enc_table.names, rb_enc_name_list_i, (st_data_t)ary);
return ary;
}
@@ -1678,14 +1837,14 @@ rb_enc_aliases_enc_i(st_data_t name, st_data_t orig, st_data_t arg)
VALUE key, str = rb_ary_entry(ary, idx);
if (NIL_P(str)) {
- rb_encoding *enc = rb_enc_from_index(idx);
+ rb_encoding *enc = rb_enc_from_index(idx);
- if (!enc) return ST_CONTINUE;
- if (STRCASECMP((char*)name, rb_enc_name(enc)) == 0) {
- return ST_CONTINUE;
- }
- str = rb_fstring_cstr(rb_enc_name(enc));
- rb_ary_store(ary, idx, str);
+ if (!enc) return ST_CONTINUE;
+ if (STRCASECMP((char*)name, rb_enc_name(enc)) == 0) {
+ return ST_CONTINUE;
+ }
+ str = rb_fstring_cstr(rb_enc_name(enc));
+ rb_ary_store(ary, idx, str);
}
key = rb_fstring_cstr((char *)name);
rb_hash_aset(aliases, key, str);
@@ -1710,216 +1869,46 @@ rb_enc_aliases(VALUE klass)
VALUE aliases[2];
aliases[0] = rb_hash_new();
aliases[1] = rb_ary_new();
- st_foreach(enc_table.names, rb_enc_aliases_enc_i, (st_data_t)aliases);
+
+ st_foreach(global_enc_table.names, rb_enc_aliases_enc_i, (st_data_t)aliases);
+
return aliases[0];
}
/*
- * An Encoding instance represents a character encoding usable in Ruby. It is
- * defined as a constant under the Encoding namespace. It has a name and
- * optionally, aliases:
- *
- * Encoding::ISO_8859_1.name
- * #=> "ISO-8859-1"
- *
- * Encoding::ISO_8859_1.names
- * #=> ["ISO-8859-1", "ISO8859-1"]
- *
- * Ruby methods dealing with encodings return or accept Encoding instances as
- * arguments (when a method accepts an Encoding instance as an argument, it
- * can be passed an Encoding name or alias instead).
- *
- * "some string".encoding
- * #=> #<Encoding:UTF-8>
- *
- * string = "some string".encode(Encoding::ISO_8859_1)
- * #=> "some string"
- * string.encoding
- * #=> #<Encoding:ISO-8859-1>
- *
- * "some string".encode "ISO-8859-1"
- * #=> "some string"
- *
- * Encoding::ASCII_8BIT is a special encoding that is usually used for
- * a byte string, not a character string. But as the name insists, its
- * characters in the range of ASCII are considered as ASCII
- * characters. This is useful when you use ASCII-8BIT characters with
- * other ASCII compatible characters.
- *
- * == Changing an encoding
+ * An \Encoding instance represents a character encoding usable in Ruby.
+ * It is defined as a constant under the \Encoding namespace.
+ * It has a name and, optionally, aliases:
*
- * The associated Encoding of a String can be changed in two different ways.
- *
- * First, it is possible to set the Encoding of a string to a new Encoding
- * without changing the internal byte representation of the string, with
- * String#force_encoding. This is how you can tell Ruby the correct encoding
- * of a string.
- *
- * string
- * #=> "R\xC3\xA9sum\xC3\xA9"
- * string.encoding
- * #=> #<Encoding:ISO-8859-1>
- * string.force_encoding(Encoding::UTF_8)
- * #=> "R\u00E9sum\u00E9"
- *
- * Second, it is possible to transcode a string, i.e. translate its internal
- * byte representation to another encoding. Its associated encoding is also
- * set to the other encoding. See String#encode for the various forms of
- * transcoding, and the Encoding::Converter class for additional control over
- * the transcoding process.
- *
- * string
- * #=> "R\u00E9sum\u00E9"
- * string.encoding
- * #=> #<Encoding:UTF-8>
- * string = string.encode!(Encoding::ISO_8859_1)
- * #=> "R\xE9sum\xE9"
- * string.encoding
- * #=> #<Encoding::ISO-8859-1>
- *
- * == Script encoding
- *
- * All Ruby script code has an associated Encoding which any String literal
- * created in the source code will be associated to.
- *
- * The default script encoding is Encoding::UTF_8 after v2.0, but it
- * can be changed by a magic comment on the first line of the source
- * code file (or second line, if there is a shebang line on the
- * first). The comment must contain the word <code>coding</code> or
- * <code>encoding</code>, followed by a colon, space and the Encoding
- * name or alias:
- *
- * # encoding: UTF-8
- *
- * "some string".encoding
- * #=> #<Encoding:UTF-8>
- *
- * The <code>__ENCODING__</code> keyword returns the script encoding of the file
- * which the keyword is written:
- *
- * # encoding: ISO-8859-1
- *
- * __ENCODING__
- * #=> #<Encoding:ISO-8859-1>
+ * Encoding::US_ASCII.name # => "US-ASCII"
+ * Encoding::US_ASCII.names # => ["US-ASCII", "ASCII", "ANSI_X3.4-1968", "646"]
*
- * <code>ruby -K</code> will change the default locale encoding, but this is
- * not recommended. Ruby source files should declare its script encoding by a
- * magic comment even when they only depend on US-ASCII strings or regular
- * expressions.
+ * A Ruby method that accepts an encoding as an argument will accept:
*
- * == Locale encoding
+ * - An \Encoding object.
+ * - The name of an encoding.
+ * - An alias for an encoding name.
*
- * The default encoding of the environment. Usually derived from locale.
+ * These are equivalent:
*
- * see Encoding.locale_charmap, Encoding.find('locale')
+ * 'foo'.encode(Encoding::US_ASCII) # Encoding object.
+ * 'foo'.encode('US-ASCII') # Encoding name.
+ * 'foo'.encode('ASCII') # Encoding alias.
*
- * == Filesystem encoding
+ * For a full discussion of encodings and their uses,
+ * see {the Encodings document}[rdoc-ref:encodings.rdoc].
*
- * The default encoding of strings from the filesystem of the environment.
- * This is used for strings of file names or paths.
- *
- * see Encoding.find('filesystem')
- *
- * == External encoding
- *
- * Each IO object has an external encoding which indicates the encoding that
- * Ruby will use to read its data. By default Ruby sets the external encoding
- * of an IO object to the default external encoding. The default external
- * encoding is set by locale encoding or the interpreter <code>-E</code> option.
- * Encoding.default_external returns the current value of the external
- * encoding.
- *
- * ENV["LANG"]
- * #=> "UTF-8"
- * Encoding.default_external
- * #=> #<Encoding:UTF-8>
- *
- * $ ruby -E ISO-8859-1 -e "p Encoding.default_external"
- * #<Encoding:ISO-8859-1>
- *
- * $ LANG=C ruby -e 'p Encoding.default_external'
- * #<Encoding:US-ASCII>
- *
- * The default external encoding may also be set through
- * Encoding.default_external=, but you should not do this as strings created
- * before and after the change will have inconsistent encodings. Instead use
- * <code>ruby -E</code> to invoke ruby with the correct external encoding.
- *
- * When you know that the actual encoding of the data of an IO object is not
- * the default external encoding, you can reset its external encoding with
- * IO#set_encoding or set it at IO object creation (see IO.new options).
- *
- * == Internal encoding
- *
- * To process the data of an IO object which has an encoding different
- * from its external encoding, you can set its internal encoding. Ruby will use
- * this internal encoding to transcode the data when it is read from the IO
- * object.
- *
- * Conversely, when data is written to the IO object it is transcoded from the
- * internal encoding to the external encoding of the IO object.
- *
- * The internal encoding of an IO object can be set with
- * IO#set_encoding or at IO object creation (see IO.new options).
- *
- * The internal encoding is optional and when not set, the Ruby default
- * internal encoding is used. If not explicitly set this default internal
- * encoding is +nil+ meaning that by default, no transcoding occurs.
- *
- * The default internal encoding can be set with the interpreter option
- * <code>-E</code>. Encoding.default_internal returns the current internal
- * encoding.
- *
- * $ ruby -e 'p Encoding.default_internal'
- * nil
- *
- * $ ruby -E ISO-8859-1:UTF-8 -e "p [Encoding.default_external, \
- * Encoding.default_internal]"
- * [#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>]
- *
- * The default internal encoding may also be set through
- * Encoding.default_internal=, but you should not do this as strings created
- * before and after the change will have inconsistent encodings. Instead use
- * <code>ruby -E</code> to invoke ruby with the correct internal encoding.
- *
- * == IO encoding example
- *
- * In the following example a UTF-8 encoded string "R\u00E9sum\u00E9" is transcoded for
- * output to ISO-8859-1 encoding, then read back in and transcoded to UTF-8:
- *
- * string = "R\u00E9sum\u00E9"
- *
- * open("transcoded.txt", "w:ISO-8859-1") do |io|
- * io.write(string)
- * end
- *
- * puts "raw text:"
- * p File.binread("transcoded.txt")
- * puts
- *
- * open("transcoded.txt", "r:ISO-8859-1:UTF-8") do |io|
- * puts "transcoded text:"
- * p io.read
- * end
- *
- * While writing the file, the internal encoding is not specified as it is
- * only necessary for reading. While reading the file both the internal and
- * external encoding must be specified to obtain the correct result.
- *
- * $ ruby t.rb
- * raw text:
- * "R\xE9sum\xE9"
- *
- * transcoded text:
- * "R\u00E9sum\u00E9"
+ * Encoding::ASCII_8BIT is a special-purpose encoding that is usually used for
+ * a string of bytes, not a string of characters.
+ * But as the name indicates, its characters in the ASCII range
+ * are considered as ASCII characters.
+ * This is useful when you use other ASCII-compatible encodings.
*
*/
void
Init_Encoding(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
VALUE list;
int i;
@@ -1932,7 +1921,7 @@ Init_Encoding(void)
rb_define_method(rb_cEncoding, "names", enc_names, 0);
rb_define_method(rb_cEncoding, "dummy?", enc_dummy_p, 0);
rb_define_method(rb_cEncoding, "ascii_compatible?", enc_ascii_compatible_p, 0);
- rb_define_method(rb_cEncoding, "replicate", enc_replicate, 1);
+ rb_define_method(rb_cEncoding, "replicate", enc_replicate_m, 1);
rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0);
rb_define_singleton_method(rb_cEncoding, "name_list", rb_enc_name_list, 0);
rb_define_singleton_method(rb_cEncoding, "aliases", rb_enc_aliases, 0);
@@ -1948,22 +1937,23 @@ Init_Encoding(void)
rb_define_singleton_method(rb_cEncoding, "default_internal=", set_default_internal, 1);
rb_define_singleton_method(rb_cEncoding, "locale_charmap", rb_locale_charmap, 0); /* in localeinit.c */
- list = rb_ary_new2(enc_table.count);
+ struct enc_table *enc_table = &global_enc_table;
+
+ list = rb_encoding_list = rb_ary_new2(ENCODING_LIST_CAPA);
RBASIC_CLEAR_CLASS(list);
- rb_encoding_list = list;
rb_gc_register_mark_object(list);
- for (i = 0; i < enc_table.count; ++i) {
- rb_ary_push(list, enc_new(enc_table.list[i].enc));
+ for (i = 0; i < enc_table->count; ++i) {
+ rb_ary_push(list, enc_new(enc_table->list[i].enc));
}
- rb_marshal_define_compat(rb_cEncoding, Qnil, NULL, enc_m_loader);
+ rb_marshal_define_compat(rb_cEncoding, Qnil, 0, enc_m_loader);
}
void
Init_encodings(void)
{
- rb_enc_init();
+ rb_enc_init(&global_enc_table);
}
/* locale insensitive ctype functions */
@@ -1971,5 +1961,5 @@ Init_encodings(void)
void
rb_enc_foreach_name(int (*func)(st_data_t name, st_data_t idx, st_data_t arg), st_data_t arg)
{
- st_foreach(enc_table.names, func, arg);
+ st_foreach(global_enc_table.names, func, arg);
}
diff --git a/enum.c b/enum.c
index cc77964ff9..b3c715e0a1 100644
--- a/enum.c
+++ b/enum.c
@@ -9,17 +9,37 @@
**********************************************************************/
-#include "ruby/encoding.h"
+#include "id.h"
#include "internal.h"
+#include "internal/compar.h"
+#include "internal/enum.h"
+#include "internal/hash.h"
+#include "internal/imemo.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/proc.h"
+#include "internal/rational.h"
+#include "internal/re.h"
#include "ruby/util.h"
-#include "id.h"
+#include "ruby_assert.h"
#include "symbol.h"
-#include <assert.h>
-
VALUE rb_mEnumerable;
static ID id_next;
+static ID id__alone;
+static ID id__separator;
+static ID id_chunk_categorize;
+static ID id_chunk_enumerable;
+static ID id_sliceafter_enum;
+static ID id_sliceafter_pat;
+static ID id_sliceafter_pred;
+static ID id_slicebefore_enumerable;
+static ID id_slicebefore_sep_pat;
+static ID id_slicebefore_sep_pred;
+static ID id_slicewhen_enum;
+static ID id_slicewhen_inverted;
+static ID id_slicewhen_pred;
#define id_div idDiv
#define id_each idEach
@@ -45,9 +65,9 @@ static VALUE
enum_yield(int argc, VALUE ary)
{
if (argc > 1)
- return rb_yield_force_blockarg(ary);
+ return rb_yield_force_blockarg(ary);
if (argc == 1)
- return rb_yield(ary);
+ return rb_yield(ary);
return rb_yield_values2(0, 0);
}
@@ -57,9 +77,9 @@ enum_yield_array(VALUE ary)
long len = RARRAY_LEN(ary);
if (len > 1)
- return rb_yield_force_blockarg(ary);
+ return rb_yield_force_blockarg(ary);
if (len == 1)
- return rb_yield(RARRAY_AREF(ary, 0));
+ return rb_yield(RARRAY_AREF(ary, 0));
return rb_yield_values2(0, 0);
}
@@ -70,7 +90,23 @@ grep_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
if (RTEST(rb_funcallv(memo->v1, id_eqq, 1, &i)) == RTEST(memo->u3.value)) {
- rb_ary_push(memo->v2, i);
+ rb_ary_push(memo->v2, i);
+ }
+ return Qnil;
+}
+
+static VALUE
+grep_regexp_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+{
+ struct MEMO *memo = MEMO_CAST(args);
+ VALUE converted_element, match;
+ ENUM_WANT_SVALUE();
+
+ /* In case element can't be converted to a Symbol or String: not a match (don't raise) */
+ converted_element = SYMBOL_P(i) ? i : rb_check_string_type(i);
+ match = NIL_P(converted_element) ? Qfalse : rb_reg_match_p(memo->v1, i, 0);
+ if (match == memo->u3.value) {
+ rb_ary_push(memo->v2, i);
}
return Qnil;
}
@@ -82,64 +118,93 @@ grep_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
if (RTEST(rb_funcallv(memo->v1, id_eqq, 1, &i)) == RTEST(memo->u3.value)) {
- rb_ary_push(memo->v2, enum_yield(argc, i));
+ rb_ary_push(memo->v2, enum_yield(argc, i));
}
return Qnil;
}
+static VALUE
+enum_grep0(VALUE obj, VALUE pat, VALUE test)
+{
+ VALUE ary = rb_ary_new();
+ struct MEMO *memo = MEMO_NEW(pat, ary, test);
+ rb_block_call_func_t fn;
+ if (rb_block_given_p()) {
+ fn = grep_iter_i;
+ }
+ else if (RB_TYPE_P(pat, T_REGEXP) &&
+ LIKELY(rb_method_basic_definition_p(CLASS_OF(pat), idEqq))) {
+ fn = grep_regexp_i;
+ }
+ else {
+ fn = grep_i;
+ }
+ rb_block_call(obj, id_each, 0, 0, fn, (VALUE)memo);
+
+ return ary;
+}
+
/*
- * call-seq:
- * enum.grep(pattern) -> array
- * enum.grep(pattern) { |obj| block } -> array
+ * call-seq:
+ * grep(pattern) -> array
+ * grep(pattern) {|element| ... } -> array
+ *
+ * Returns an array of objects based elements of +self+ that match the given pattern.
+ *
+ * With no block given, returns an array containing each element
+ * for which <tt>pattern === element</tt> is +true+:
*
- * Returns an array of every element in <i>enum</i> for which
- * <code>Pattern === element</code>. If the optional <em>block</em> is
- * supplied, each matching element is passed to it, and the block's
- * result is stored in the output array.
+ * a = ['foo', 'bar', 'car', 'moo']
+ * a.grep(/ar/) # => ["bar", "car"]
+ * (1..10).grep(3..8) # => [3, 4, 5, 6, 7, 8]
+ * ['a', 'b', 0, 1].grep(Integer) # => [0, 1]
*
- * (1..100).grep 38..44 #=> [38, 39, 40, 41, 42, 43, 44]
- * c = IO.constants
- * c.grep(/SEEK/) #=> [:SEEK_SET, :SEEK_CUR, :SEEK_END]
- * res = c.grep(/SEEK/) { |v| IO.const_get(v) }
- * res #=> [0, 1, 2]
+ * With a block given,
+ * calls the block with each matching element and returns an array containing each
+ * object returned by the block:
*
+ * a = ['foo', 'bar', 'car', 'moo']
+ * a.grep(/ar/) {|element| element.upcase } # => ["BAR", "CAR"]
+ *
+ * Related: #grep_v.
*/
static VALUE
enum_grep(VALUE obj, VALUE pat)
{
- VALUE ary = rb_ary_new();
- struct MEMO *memo = MEMO_NEW(pat, ary, Qtrue);
-
- rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)memo);
-
- return ary;
+ return enum_grep0(obj, pat, Qtrue);
}
/*
- * call-seq:
- * enum.grep_v(pattern) -> array
- * enum.grep_v(pattern) { |obj| block } -> array
+ * call-seq:
+ * grep_v(pattern) -> array
+ * grep_v(pattern) {|element| ... } -> array
*
- * Inverted version of Enumerable#grep.
- * Returns an array of every element in <i>enum</i> for which
- * not <code>Pattern === element</code>.
+ * Returns an array of objects based on elements of +self+
+ * that <em>don't</em> match the given pattern.
*
- * (1..10).grep_v 2..5 #=> [1, 6, 7, 8, 9, 10]
- * res =(1..10).grep_v(2..5) { |v| v * 2 }
- * res #=> [2, 12, 14, 16, 18, 20]
+ * With no block given, returns an array containing each element
+ * for which <tt>pattern === element</tt> is +false+:
*
+ * a = ['foo', 'bar', 'car', 'moo']
+ * a.grep_v(/ar/) # => ["foo", "moo"]
+ * (1..10).grep_v(3..8) # => [1, 2, 9, 10]
+ * ['a', 'b', 0, 1].grep_v(Integer) # => ["a", "b"]
+ *
+ * With a block given,
+ * calls the block with each non-matching element and returns an array containing each
+ * object returned by the block:
+ *
+ * a = ['foo', 'bar', 'car', 'moo']
+ * a.grep_v(/ar/) {|element| element.upcase } # => ["FOO", "MOO"]
+ *
+ * Related: #grep.
*/
static VALUE
enum_grep_v(VALUE obj, VALUE pat)
{
- VALUE ary = rb_ary_new();
- struct MEMO *memo = MEMO_NEW(pat, ary, Qfalse);
-
- rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)memo);
-
- return ary;
+ return enum_grep0(obj, pat, Qfalse);
}
#define COUNT_BIGNUM IMEMO_FL_USER0
@@ -149,13 +214,13 @@ static void
imemo_count_up(struct MEMO *memo)
{
if (memo->flags & COUNT_BIGNUM) {
- MEMO_V3_SET(memo, rb_int_succ(memo->u3.value));
+ MEMO_V3_SET(memo, rb_int_succ(memo->u3.value));
}
else if (++memo->u3.cnt == 0) {
- /* overflow */
- unsigned long buf[2] = {0, 1};
- MEMO_V3_SET(memo, rb_big_unpack(buf, 2));
- memo->flags |= COUNT_BIGNUM;
+ /* overflow */
+ unsigned long buf[2] = {0, 1};
+ MEMO_V3_SET(memo, rb_big_unpack(buf, 2));
+ memo->flags |= COUNT_BIGNUM;
}
}
@@ -163,10 +228,10 @@ static VALUE
imemo_count_value(struct MEMO *memo)
{
if (memo->flags & COUNT_BIGNUM) {
- return memo->u3.value;
+ return memo->u3.value;
}
else {
- return ULONG2NUM(memo->u3.cnt);
+ return ULONG2NUM(memo->u3.cnt);
}
}
@@ -178,7 +243,7 @@ count_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
ENUM_WANT_SVALUE();
if (rb_equal(i, memo->v1)) {
- imemo_count_up(memo);
+ imemo_count_up(memo);
}
return Qnil;
}
@@ -189,7 +254,7 @@ count_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
struct MEMO *memo = MEMO_CAST(memop);
if (RTEST(rb_yield_values2(argc, argv))) {
- imemo_count_up(memo);
+ imemo_count_up(memo);
}
return Qnil;
}
@@ -204,20 +269,28 @@ count_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
}
/*
- * call-seq:
- * enum.count -> int
- * enum.count(item) -> int
- * enum.count { |obj| block } -> int
+ * call-seq:
+ * count -> integer
+ * count(object) -> integer
+ * count {|element| ... } -> integer
+ *
+ * Returns the count of elements, based on an argument or block criterion, if given.
+ *
+ * With no argument and no block given, returns the number of elements:
+ *
+ * [0, 1, 2].count # => 3
+ * {foo: 0, bar: 1, baz: 2}.count # => 3
+ *
+ * With argument +object+ given,
+ * returns the number of elements that are <tt>==</tt> to +object+:
+ *
+ * [0, 1, 2, 1].count(1) # => 2
*
- * Returns the number of items in +enum+ through enumeration.
- * If an argument is given, the number of items in +enum+ that
- * are equal to +item+ are counted. If a block is given, it
- * counts the number of elements yielding a true value.
+ * With a block given, calls the block with each element
+ * and returns the number of elements for which the block returns a truthy value:
*
- * ary = [1, 2, 4, 2]
- * ary.count #=> 4
- * ary.count(2) #=> 2
- * ary.count{ |x| x%2==0 } #=> 3
+ * [0, 1, 2, 3].count {|element| element < 2} # => 2
+ * {foo: 0, bar: 1, baz: 2}.count {|key, value| value < 2} # => 2
*
*/
@@ -229,18 +302,18 @@ enum_count(int argc, VALUE *argv, VALUE obj)
rb_block_call_func *func;
if (argc == 0) {
- if (rb_block_given_p()) {
- func = count_iter_i;
- }
- else {
- func = count_all_i;
- }
+ if (rb_block_given_p()) {
+ func = count_iter_i;
+ }
+ else {
+ func = count_all_i;
+ }
}
else {
- rb_scan_args(argc, argv, "1", &item);
- if (rb_block_given_p()) {
- rb_warn("given block not used");
- }
+ rb_scan_args(argc, argv, "1", &item);
+ if (rb_block_given_p()) {
+ rb_warn("given block not used");
+ }
func = count_i;
}
@@ -255,40 +328,35 @@ find_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
ENUM_WANT_SVALUE();
if (RTEST(enum_yield(argc, i))) {
- struct MEMO *memo = MEMO_CAST(memop);
- MEMO_V1_SET(memo, i);
- memo->u3.cnt = 1;
- rb_iter_break();
+ struct MEMO *memo = MEMO_CAST(memop);
+ MEMO_V1_SET(memo, i);
+ memo->u3.cnt = 1;
+ rb_iter_break();
}
return Qnil;
}
/*
- * call-seq:
- * enum.detect(ifnone = nil) { |obj| block } -> obj or nil
- * enum.find(ifnone = nil) { |obj| block } -> obj or nil
- * enum.detect(ifnone = nil) -> an_enumerator
- * enum.find(ifnone = nil) -> an_enumerator
+ * call-seq:
+ * find(if_none_proc = nil) {|element| ... } -> object or nil
+ * find(if_none_proc = nil) -> enumerator
+ *
+ * Returns the first element for which the block returns a truthy value.
*
- * Passes each entry in <i>enum</i> to <em>block</em>. Returns the
- * first for which <em>block</em> is not false. If no
- * object matches, calls <i>ifnone</i> and returns its result when it
- * is specified, or returns <code>nil</code> otherwise.
+ * With a block given, calls the block with successive elements of the collection;
+ * returns the first element for which the block returns a truthy value:
*
- * If no block is given, an enumerator is returned instead.
+ * (0..9).find {|element| element > 2} # => 3
*
- * (1..100).detect #=> #<Enumerator: 1..100:detect>
- * (1..100).find #=> #<Enumerator: 1..100:find>
+ * If no such element is found, calls +if_none_proc+ and returns its return value.
*
- * (1..10).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
- * (1..10).find { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
- * (1..10).detect(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0
- * (1..10).find(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0
- * (1..100).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> 35
- * (1..100).find { |i| i % 5 == 0 && i % 7 == 0 } #=> 35
+ * (0..9).find(proc {false}) {|element| element > 12} # => false
+ * {foo: 0, bar: 1, baz: 2}.find {|key, value| key.start_with?('b') } # => [:bar, 1]
+ * {foo: 0, bar: 1, baz: 2}.find(proc {[]}) {|key, value| key.start_with?('c') } # => []
+ *
+ * With no block given, returns an \Enumerator.
*
*/
-
static VALUE
enum_find(int argc, VALUE *argv, VALUE obj)
{
@@ -300,10 +368,10 @@ enum_find(int argc, VALUE *argv, VALUE obj)
memo = MEMO_NEW(Qundef, 0, 0);
rb_block_call(obj, id_each, 0, 0, find_i, (VALUE)memo);
if (memo->u3.cnt) {
- return memo->v1;
+ return memo->v1;
}
if (!NIL_P(if_none)) {
- return rb_funcallv(if_none, id_call, 0, 0);
+ return rb_funcallv(if_none, id_call, 0, 0);
}
return Qnil;
}
@@ -316,8 +384,8 @@ find_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
ENUM_WANT_SVALUE();
if (rb_equal(i, memo->v2)) {
- MEMO_V1_SET(memo, imemo_count_value(memo));
- rb_iter_break();
+ MEMO_V1_SET(memo, imemo_count_value(memo));
+ rb_iter_break();
}
imemo_count_up(memo);
return Qnil;
@@ -329,29 +397,34 @@ find_index_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
struct MEMO *memo = MEMO_CAST(memop);
if (RTEST(rb_yield_values2(argc, argv))) {
- MEMO_V1_SET(memo, imemo_count_value(memo));
- rb_iter_break();
+ MEMO_V1_SET(memo, imemo_count_value(memo));
+ rb_iter_break();
}
imemo_count_up(memo);
return Qnil;
}
/*
- * call-seq:
- * enum.find_index(value) -> int or nil
- * enum.find_index { |obj| block } -> int or nil
- * enum.find_index -> an_enumerator
+ * call-seq:
+ * find_index(object) -> integer or nil
+ * find_index {|element| ... } -> integer or nil
+ * find_index -> enumerator
+ *
+ * Returns the index of the first element that meets a specified criterion,
+ * or +nil+ if no such element is found.
+ *
+ * With argument +object+ given,
+ * returns the index of the first element that is <tt>==</tt> +object+:
+ *
+ * ['a', 'b', 'c', 'b'].find_index('b') # => 1
*
- * Compares each entry in <i>enum</i> with <em>value</em> or passes
- * to <em>block</em>. Returns the index for the first for which the
- * evaluated value is non-false. If no object matches, returns
- * <code>nil</code>
+ * With a block given, calls the block with successive elements;
+ * returns the first element for which the block returns a truthy value:
*
- * If neither block nor argument is given, an enumerator is returned instead.
+ * ['a', 'b', 'c', 'b'].find_index {|element| element.start_with?('b') } # => 1
+ * {foo: 0, bar: 1, baz: 2}.find_index {|key, value| value > 1 } # => 2
*
- * (1..10).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
- * (1..100).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> 34
- * (1..100).find_index(50) #=> 49
+ * With no argument and no block given, returns an \Enumerator.
*
*/
@@ -367,10 +440,10 @@ enum_find_index(int argc, VALUE *argv, VALUE obj)
func = find_index_iter_i;
}
else {
- rb_scan_args(argc, argv, "1", &condition_value);
- if (rb_block_given_p()) {
- rb_warn("given block not used");
- }
+ rb_scan_args(argc, argv, "1", &condition_value);
+ if (rb_block_given_p()) {
+ rb_warn("given block not used");
+ }
func = find_index_i;
}
@@ -385,7 +458,7 @@ find_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
ENUM_WANT_SVALUE();
if (RTEST(enum_yield(argc, i))) {
- rb_ary_push(ary, i);
+ rb_ary_push(ary, i);
}
return Qnil;
}
@@ -415,32 +488,23 @@ enum_size_over_p(VALUE obj, long n)
}
/*
- * call-seq:
- * enum.find_all { |obj| block } -> array
- * enum.select { |obj| block } -> array
- * enum.filter { |obj| block } -> array
- * enum.find_all -> an_enumerator
- * enum.select -> an_enumerator
- * enum.filter -> an_enumerator
- *
- * Returns an array containing all elements of +enum+
- * for which the given +block+ returns a true value.
- *
- * The <i>find_all</i> and <i>select</i> methods are aliases.
- * There is no performance benefit to either.
- *
- * If no block is given, an Enumerator is returned instead.
+ * call-seq:
+ * select {|element| ... } -> array
+ * select -> enumerator
*
+ * Returns an array containing elements selected by the block.
*
- * (1..10).find_all { |i| i % 3 == 0 } #=> [3, 6, 9]
+ * With a block given, calls the block with successive elements;
+ * returns an array of those elements for which the block returns a truthy value:
*
- * [1,2,3,4,5].select { |num| num.even? } #=> [2, 4]
+ * (0..9).select {|element| element % 3 == 0 } # => [0, 3, 6, 9]
+ * a = {foo: 0, bar: 1, baz: 2}.select {|key, value| key.start_with?('b') }
+ * a # => {:bar=>1, :baz=>2}
*
- * [:foo, :bar].filter { |x| x == :foo } #=> [:foo]
+ * With no block given, returns an \Enumerator.
*
- * See also Enumerable#reject, Enumerable#grep.
+ * Related: #reject.
*/
-
static VALUE
enum_find_all(VALUE obj)
{
@@ -467,17 +531,19 @@ filter_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
}
/*
- * call-seq:
- * enum.filter_map { |obj| block } -> array
- * enum.filter_map -> an_enumerator
+ * call-seq:
+ * filter_map {|element| ... } -> array
+ * filter_map -> enumerator
*
- * Returns a new array containing the truthy results (everything except
- * +false+ or +nil+) of running the +block+ for every element in +enum+.
+ * Returns an array containing truthy elements returned by the block.
*
- * If no block is given, an Enumerator is returned instead.
+ * With a block given, calls the block with successive elements;
+ * returns an array containing each truthy value returned by the block:
*
+ * (0..9).filter_map {|i| i * 2 if i.even? } # => [0, 4, 8, 12, 16]
+ * {foo: 0, bar: 1, baz: 2}.filter_map {|key, value| key if value.even? } # => [:foo, :baz]
*
- * (1..10).filter_map { |i| i * 2 if i.even? } #=> [4, 8, 12, 16, 20]
+ * When no block given, returns an \Enumerator.
*
*/
static VALUE
@@ -500,26 +566,27 @@ reject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
ENUM_WANT_SVALUE();
if (!RTEST(enum_yield(argc, i))) {
- rb_ary_push(ary, i);
+ rb_ary_push(ary, i);
}
return Qnil;
}
/*
- * call-seq:
- * enum.reject { |obj| block } -> array
- * enum.reject -> an_enumerator
+ * call-seq:
+ * reject {|element| ... } -> array
+ * reject -> enumerator
*
- * Returns an array for all elements of +enum+ for which the given
- * +block+ returns <code>false</code>.
+ * Returns an array of objects rejected by the block.
*
- * If no block is given, an Enumerator is returned instead.
+ * With a block given, calls the block with successive elements;
+ * returns an array of those elements for which the block returns +nil+ or +false+:
*
- * (1..10).reject { |i| i % 3 == 0 } #=> [1, 2, 4, 5, 7, 8, 10]
+ * (0..9).reject {|i| i * 2 if i.even? } # => [1, 3, 5, 7, 9]
+ * {foo: 0, bar: 1, baz: 2}.reject {|key, value| key if value.odd? } # => {:foo=>0, :baz=>2}
*
- * [1, 2, 3, 4, 5].reject { |num| num.even? } #=> [1, 3, 5]
+ * When no block given, returns an \Enumerator.
*
- * See also Enumerable#find_all.
+ * Related: #select.
*/
static VALUE
@@ -552,22 +619,21 @@ collect_all(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
}
/*
- * call-seq:
- * enum.collect { |obj| block } -> array
- * enum.map { |obj| block } -> array
- * enum.collect -> an_enumerator
- * enum.map -> an_enumerator
+ * call-seq:
+ * map {|element| ... } -> array
+ * map -> enumerator
+ *
+ * Returns an array of objects returned by the block.
*
- * Returns a new array with the results of running <em>block</em> once
- * for every element in <i>enum</i>.
+ * With a block given, calls the block with successive elements;
+ * returns an array of the objects returned by the block:
*
- * If no block is given, an enumerator is returned instead.
+ * (0..4).map {|i| i*i } # => [0, 1, 4, 9, 16]
+ * {foo: 0, bar: 1, baz: 2}.map {|key, value| value*2} # => [0, 2, 4]
*
- * (1..4).map { |i| i*i } #=> [1, 4, 9, 16]
- * (1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"]
+ * With no block given, returns an \Enumerator.
*
*/
-
static VALUE
enum_collect(VALUE obj)
{
@@ -592,31 +658,33 @@ flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
tmp = rb_check_array_type(i);
if (NIL_P(tmp)) {
- rb_ary_push(ary, i);
+ rb_ary_push(ary, i);
}
else {
- rb_ary_concat(ary, tmp);
+ rb_ary_concat(ary, tmp);
}
return Qnil;
}
/*
- * call-seq:
- * enum.flat_map { |obj| block } -> array
- * enum.collect_concat { |obj| block } -> array
- * enum.flat_map -> an_enumerator
- * enum.collect_concat -> an_enumerator
+ * call-seq:
+ * flat_map {|element| ... } -> array
+ * flat_map -> enumerator
+ *
+ * Returns an array of flattened objects returned by the block.
*
- * Returns a new array with the concatenated results of running
- * <em>block</em> once for every element in <i>enum</i>.
+ * With a block given, calls the block with successive elements;
+ * returns a flattened array of objects returned by the block:
*
- * If no block is given, an enumerator is returned instead.
+ * [0, 1, 2, 3].flat_map {|element| -element } # => [0, -1, -2, -3]
+ * [0, 1, 2, 3].flat_map {|element| [element, -element] } # => [0, 0, 1, -1, 2, -2, 3, -3]
+ * [[0, 1], [2, 3]].flat_map {|e| e + [100] } # => [0, 1, 100, 2, 3, 100]
+ * {foo: 0, bar: 1, baz: 2}.flat_map {|key, value| [key, value] } # => [:foo, 0, :bar, 1, :baz, 2]
*
- * [1, 2, 3, 4].flat_map { |e| [e, -e] } #=> [1, -1, 2, -2, 3, -3, 4, -4]
- * [[1, 2], [3, 4]].flat_map { |e| e + [100] } #=> [1, 2, 100, 3, 4, 100]
+ * With no block given, returns an \Enumerator.
*
+ * Alias: #collect_concat.
*/
-
static VALUE
enum_flat_map(VALUE obj)
{
@@ -632,36 +700,38 @@ enum_flat_map(VALUE obj)
/*
* call-seq:
- * enum.to_a(*args) -> array
- * enum.entries(*args) -> array
+ * to_a -> array
*
- * Returns an array containing the items in <i>enum</i>.
+ * Returns an array containing the items in +self+:
*
- * (1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
- * { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]
+ * (0..4).to_a # => [0, 1, 2, 3, 4]
*
- * require 'prime'
- * Prime.entries 10 #=> [2, 3, 5, 7]
+ * Enumerable#entries is an alias for Enumerable#to_a.
*/
static VALUE
enum_to_a(int argc, VALUE *argv, VALUE obj)
{
VALUE ary = rb_ary_new();
- rb_block_call(obj, id_each, argc, argv, collect_all, ary);
+ rb_block_call_kw(obj, id_each, argc, argv, collect_all, ary, RB_PASS_CALLED_KEYWORDS);
return ary;
}
static VALUE
-enum_hashify(VALUE obj, int argc, const VALUE *argv, rb_block_call_func *iter)
+enum_hashify_into(VALUE obj, int argc, const VALUE *argv, rb_block_call_func *iter, VALUE hash)
{
- VALUE hash = rb_hash_new();
rb_block_call(obj, id_each, argc, argv, iter, hash);
return hash;
}
static VALUE
+enum_hashify(VALUE obj, int argc, const VALUE *argv, rb_block_call_func *iter)
+{
+ return enum_hashify_into(obj, argc, argv, iter, rb_hash_new());
+}
+
+static VALUE
enum_to_h_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
{
ENUM_WANT_SVALUE();
@@ -676,20 +746,23 @@ enum_to_h_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
/*
* call-seq:
- * enum.to_h(*args) -> hash
- * enum.to_h(*args) {...} -> hash
+ * to_h -> hash
+ * to_h {|element| ... } -> hash
*
- * Returns the result of interpreting <i>enum</i> as a list of
- * <tt>[key, value]</tt> pairs.
+ * When +self+ consists of 2-element arrays,
+ * returns a hash each of whose entries is the key-value pair
+ * formed from one of those arrays:
*
- * %i[hello world].each_with_index.to_h
- * # => {:hello => 0, :world => 1}
+ * [[:foo, 0], [:bar, 1], [:baz, 2]].to_h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * If a block is given, the results of the block on each element of
- * the enum will be used as pairs.
+ * When a block is given, the block is called with each element of +self+;
+ * the block should return a 2-element array which becomes a key-value pair
+ * in the returned hash:
*
- * (1..5).to_h {|x| [x, x ** 2]}
- * #=> {1=>1, 2=>4, 3=>9, 4=>16, 5=>25}
+ * (0..3).to_h {|i| [i, i ** 2]} # => {0=>0, 1=>1, 2=>4, 3=>9}
+ *
+ * Raises an exception if an element of +self+ is not a 2-element array,
+ * and a block is not passed.
*/
static VALUE
@@ -706,11 +779,11 @@ inject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
ENUM_WANT_SVALUE();
- if (memo->v1 == Qundef) {
- MEMO_V1_SET(memo, i);
+ if (UNDEF_P(memo->v1)) {
+ MEMO_V1_SET(memo, i);
}
else {
- MEMO_V1_SET(memo, rb_yield_values(2, memo->v1, i));
+ MEMO_V1_SET(memo, rb_yield_values(2, memo->v1, i));
}
return Qnil;
}
@@ -723,18 +796,18 @@ inject_op_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
ENUM_WANT_SVALUE();
- if (memo->v1 == Qundef) {
- MEMO_V1_SET(memo, i);
+ if (UNDEF_P(memo->v1)) {
+ MEMO_V1_SET(memo, i);
}
else if (SYMBOL_P(name = memo->u3.value)) {
- const ID mid = SYM2ID(name);
- MEMO_V1_SET(memo, rb_funcallv(memo->v1, mid, 1, &i));
+ const ID mid = SYM2ID(name);
+ MEMO_V1_SET(memo, rb_funcallv_public(memo->v1, mid, 1, &i));
}
else {
- VALUE args[2];
- args[0] = name;
- args[1] = i;
- MEMO_V1_SET(memo, rb_f_send(numberof(args), args, memo->v1));
+ VALUE args[2];
+ args[0] = name;
+ args[1] = i;
+ MEMO_V1_SET(memo, rb_f_send(numberof(args), args, memo->v1));
}
return Qnil;
}
@@ -747,9 +820,9 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op)
long i, n;
if (RARRAY_LEN(ary) == 0)
- return init == Qundef ? Qnil : init;
+ return UNDEF_P(init) ? Qnil : init;
- if (init == Qundef) {
+ if (UNDEF_P(init)) {
v = RARRAY_AREF(ary, 0);
i = 1;
if (RARRAY_LEN(ary) == 1)
@@ -762,20 +835,20 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op)
id = SYM2ID(op);
if (id == idPLUS) {
- if (RB_INTEGER_TYPE_P(v) &&
- rb_method_basic_definition_p(rb_cInteger, idPLUS) &&
- rb_obj_respond_to(v, idPLUS, FALSE)) {
+ if (RB_INTEGER_TYPE_P(v) &&
+ rb_method_basic_definition_p(rb_cInteger, idPLUS) &&
+ rb_obj_respond_to(v, idPLUS, FALSE)) {
n = 0;
for (; i < RARRAY_LEN(ary); i++) {
e = RARRAY_AREF(ary, i);
if (FIXNUM_P(e)) {
n += FIX2LONG(e); /* should not overflow long type */
if (!FIXABLE(n)) {
- v = rb_big_plus(ULONG2NUM(n), v);
+ v = rb_big_plus(LONG2NUM(n), v);
n = 0;
}
}
- else if (RB_TYPE_P(e, T_BIGNUM))
+ else if (RB_BIGNUM_TYPE_P(e))
v = rb_big_plus(e, v);
else
goto not_integer;
@@ -798,48 +871,136 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op)
/*
* call-seq:
- * enum.inject(initial, sym) -> obj
- * enum.inject(sym) -> obj
- * enum.inject(initial) { |memo, obj| block } -> obj
- * enum.inject { |memo, obj| block } -> obj
- * enum.reduce(initial, sym) -> obj
- * enum.reduce(sym) -> obj
- * enum.reduce(initial) { |memo, obj| block } -> obj
- * enum.reduce { |memo, obj| block } -> obj
- *
- * Combines all elements of <i>enum</i> by applying a binary
- * operation, specified by a block or a symbol that names a
- * method or operator.
- *
- * The <i>inject</i> and <i>reduce</i> methods are aliases. There
- * is no performance benefit to either.
- *
- * If you specify a block, then for each element in <i>enum</i>
- * the block is passed an accumulator value (<i>memo</i>) and the element.
- * If you specify a symbol instead, then each element in the collection
- * will be passed to the named method of <i>memo</i>.
- * In either case, the result becomes the new value for <i>memo</i>.
- * At the end of the iteration, the final value of <i>memo</i> is the
- * return value for the method.
- *
- * If you do not explicitly specify an <i>initial</i> value for <i>memo</i>,
- * then the first element of collection is used as the initial value
- * of <i>memo</i>.
- *
- *
- * # Sum some numbers
- * (5..10).reduce(:+) #=> 45
- * # Same using a block and inject
- * (5..10).inject { |sum, n| sum + n } #=> 45
- * # Multiply some numbers
- * (5..10).reduce(1, :*) #=> 151200
- * # Same using a block
- * (5..10).inject(1) { |product, n| product * n } #=> 151200
- * # find the longest word
- * longest = %w{ cat sheep bear }.inject do |memo, word|
- * memo.length > word.length ? memo : word
- * end
- * longest #=> "sheep"
+ * inject(symbol) -> object
+ * inject(initial_operand, symbol) -> object
+ * inject {|memo, operand| ... } -> object
+ * inject(initial_operand) {|memo, operand| ... } -> object
+ *
+ * Returns an object formed from operands via either:
+ *
+ * - A method named by +symbol+.
+ * - A block to which each operand is passed.
+ *
+ * With method-name argument +symbol+,
+ * combines operands using the method:
+ *
+ * # Sum, without initial_operand.
+ * (1..4).inject(:+) # => 10
+ * # Sum, with initial_operand.
+ * (1..4).inject(10, :+) # => 20
+ *
+ * With a block, passes each operand to the block:
+ *
+ * # Sum of squares, without initial_operand.
+ * (1..4).inject {|sum, n| sum + n*n } # => 30
+ * # Sum of squares, with initial_operand.
+ * (1..4).inject(2) {|sum, n| sum + n*n } # => 32
+ *
+ * <b>Operands</b>
+ *
+ * If argument +initial_operand+ is not given,
+ * the operands for +inject+ are simply the elements of +self+.
+ * Example calls and their operands:
+ *
+ * - <tt>(1..4).inject(:+)</tt>:: <tt>[1, 2, 3, 4]</tt>.
+ * - <tt>(1...4).inject(:+)</tt>:: <tt>[1, 2, 3]</tt>.
+ * - <tt>('a'..'d').inject(:+)</tt>:: <tt>['a', 'b', 'c', 'd']</tt>.
+ * - <tt>('a'...'d').inject(:+)</tt>:: <tt>['a', 'b', 'c']</tt>.
+ *
+ * Examples with first operand (which is <tt>self.first</tt>) of various types:
+ *
+ * # Integer.
+ * (1..4).inject(:+) # => 10
+ * # Float.
+ * [1.0, 2, 3, 4].inject(:+) # => 10.0
+ * # Character.
+ * ('a'..'d').inject(:+) # => "abcd"
+ * # Complex.
+ * [Complex(1, 2), 3, 4].inject(:+) # => (8+2i)
+ *
+ * If argument +initial_operand+ is given,
+ * the operands for +inject+ are that value plus the elements of +self+.
+ * Example calls their operands:
+ *
+ * - <tt>(1..4).inject(10, :+)</tt>:: <tt>[10, 1, 2, 3, 4]</tt>.
+ * - <tt>(1...4).inject(10, :+)</tt>:: <tt>[10, 1, 2, 3]</tt>.
+ * - <tt>('a'..'d').inject('e', :+)</tt>:: <tt>['e', 'a', 'b', 'c', 'd']</tt>.
+ * - <tt>('a'...'d').inject('e', :+)</tt>:: <tt>['e', 'a', 'b', 'c']</tt>.
+ *
+ * Examples with +initial_operand+ of various types:
+ *
+ * # Integer.
+ * (1..4).inject(2, :+) # => 12
+ * # Float.
+ * (1..4).inject(2.0, :+) # => 12.0
+ * # String.
+ * ('a'..'d').inject('foo', :+) # => "fooabcd"
+ * # Array.
+ * %w[a b c].inject(['x'], :push) # => ["x", "a", "b", "c"]
+ * # Complex.
+ * (1..4).inject(Complex(2, 2), :+) # => (12+2i)
+ *
+ * <b>Combination by Given \Method</b>
+ *
+ * If the method-name argument +symbol+ is given,
+ * the operands are combined by that method:
+ *
+ * - The first and second operands are combined.
+ * - That result is combined with the third operand.
+ * - That result is combined with the fourth operand.
+ * - And so on.
+ *
+ * The return value from +inject+ is the result of the last combination.
+ *
+ * This call to +inject+ computes the sum of the operands:
+ *
+ * (1..4).inject(:+) # => 10
+ *
+ * Examples with various methods:
+ *
+ * # Integer addition.
+ * (1..4).inject(:+) # => 10
+ * # Integer multiplication.
+ * (1..4).inject(:*) # => 24
+ * # Character range concatenation.
+ * ('a'..'d').inject('', :+) # => "abcd"
+ * # String array concatenation.
+ * %w[foo bar baz].inject('', :+) # => "foobarbaz"
+ * # Hash update.
+ * h = [{foo: 0, bar: 1}, {baz: 2}, {bat: 3}].inject(:update)
+ * h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3}
+ * # Hash conversion to nested arrays.
+ * h = {foo: 0, bar: 1}.inject([], :push)
+ * h # => [[:foo, 0], [:bar, 1]]
+ *
+ * <b>Combination by Given Block</b>
+ *
+ * If a block is given, the operands are passed to the block:
+ *
+ * - The first call passes the first and second operands.
+ * - The second call passes the result of the first call,
+ * along with the third operand.
+ * - The third call passes the result of the second call,
+ * along with the fourth operand.
+ * - And so on.
+ *
+ * The return value from +inject+ is the return value from the last block call.
+ *
+ * This call to +inject+ gives a block
+ * that writes the memo and element, and also sums the elements:
+ *
+ * (1..4).inject do |memo, element|
+ * p "Memo: #{memo}; element: #{element}"
+ * memo + element
+ * end # => 10
+ *
+ * Output:
+ *
+ * "Memo: 1; element: 2"
+ * "Memo: 3; element: 3"
+ * "Memo: 6; element: 4"
+ *
+ * Enumerable#reduce is an alias for Enumerable#inject.
*
*/
static VALUE
@@ -849,28 +1010,36 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
VALUE init, op;
rb_block_call_func *iter = inject_i;
ID id;
+ int num_args;
+
+ if (rb_block_given_p()) {
+ num_args = rb_scan_args(argc, argv, "02", &init, &op);
+ }
+ else {
+ num_args = rb_scan_args(argc, argv, "11", &init, &op);
+ }
- switch (rb_scan_args(argc, argv, "02", &init, &op)) {
+ switch (num_args) {
case 0:
- init = Qundef;
- break;
+ init = Qundef;
+ break;
case 1:
- if (rb_block_given_p()) {
- break;
- }
- id = rb_check_id(&init);
- op = id ? ID2SYM(id) : init;
- init = Qundef;
- iter = inject_op_i;
- break;
+ if (rb_block_given_p()) {
+ break;
+ }
+ id = rb_check_id(&init);
+ op = id ? ID2SYM(id) : init;
+ init = Qundef;
+ iter = inject_op_i;
+ break;
case 2:
- if (rb_block_given_p()) {
- rb_warning("given block not used");
- }
- id = rb_check_id(&op);
- if (id) op = ID2SYM(id);
- iter = inject_op_i;
- break;
+ if (rb_block_given_p()) {
+ rb_warning("given block not used");
+ }
+ id = rb_check_id(&op);
+ if (id) op = ID2SYM(id);
+ iter = inject_op_i;
+ break;
}
if (iter == inject_op_i &&
@@ -882,7 +1051,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
memo = MEMO_NEW(init, Qnil, op);
rb_block_call(obj, id_each, 0, 0, iter, (VALUE)memo);
- if (memo->v1 == Qundef) return Qnil;
+ if (UNDEF_P(memo->v1)) return Qnil;
return memo->v1;
}
@@ -894,10 +1063,10 @@ partition_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arys))
ENUM_WANT_SVALUE();
if (RTEST(enum_yield(argc, i))) {
- ary = memo->v1;
+ ary = memo->v1;
}
else {
- ary = memo->v2;
+ ary = memo->v2;
}
rb_ary_push(ary, i);
return Qnil;
@@ -905,16 +1074,29 @@ partition_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arys))
/*
* call-seq:
- * enum.partition { |obj| block } -> [ true_array, false_array ]
- * enum.partition -> an_enumerator
+ * partition {|element| ... } -> [true_array, false_array]
+ * partition -> enumerator
+ *
+ * With a block given, returns an array of two arrays:
*
- * Returns two arrays, the first containing the elements of
- * <i>enum</i> for which the block evaluates to true, the second
- * containing the rest.
+ * - The first having those elements for which the block returns a truthy value.
+ * - The other having all other elements.
*
- * If no block is given, an enumerator is returned instead.
+ * Examples:
*
- * (1..6).partition { |v| v.even? } #=> [[2, 4, 6], [1, 3, 5]]
+ * p = (1..4).partition {|i| i.even? }
+ * p # => [[2, 4], [1, 3]]
+ * p = ('a'..'d').partition {|c| c < 'c' }
+ * p # => [["a", "b"], ["c", "d"]]
+ * h = {foo: 0, bar: 1, baz: 2, bat: 3}
+ * p = h.partition {|key, value| key.start_with?('b') }
+ * p # => [[[:bar, 1], [:baz, 2], [:bat, 3]], [[:foo, 0]]]
+ * p = h.partition {|key, value| value < 2 }
+ * p # => [[[:foo, 0], [:bar, 1]], [[:baz, 2], [:bat, 3]]]
+ *
+ * With no block given, returns an Enumerator.
+ *
+ * Related: Enumerable#group_by.
*
*/
@@ -942,27 +1124,34 @@ group_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
group = enum_yield(argc, i);
values = rb_hash_aref(hash, group);
if (!RB_TYPE_P(values, T_ARRAY)) {
- values = rb_ary_new3(1, i);
- rb_hash_aset(hash, group, values);
+ values = rb_ary_new3(1, i);
+ rb_hash_aset(hash, group, values);
}
else {
- rb_ary_push(values, i);
+ rb_ary_push(values, i);
}
return Qnil;
}
/*
* call-seq:
- * enum.group_by { |obj| block } -> a_hash
- * enum.group_by -> an_enumerator
+ * group_by {|element| ... } -> hash
+ * group_by -> enumerator
+ *
+ * With a block given returns a hash:
*
- * Groups the collection by result of the block. Returns a hash where the
- * keys are the evaluated result from the block and the values are
- * arrays of elements in the collection that correspond to the key.
+ * - Each key is a return value from the block.
+ * - Each value is an array of those elements for which the block returned that key.
*
- * If no block is given an enumerator is returned.
+ * Examples:
*
- * (1..6).group_by { |i| i%3 } #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
+ * g = (1..6).group_by {|i| i%3 }
+ * g # => {1=>[1, 4], 2=>[2, 5], 0=>[3, 6]}
+ * h = {foo: 0, bar: 1, baz: 0, bat: 1}
+ * g = h.group_by {|key, value| value }
+ * g # => {0=>[[:foo, 0], [:baz, 0]], 1=>[[:bar, 1], [:bat, 1]]}
+ *
+ * With no block given, returns an Enumerator.
*
*/
@@ -974,47 +1163,86 @@ enum_group_by(VALUE obj)
return enum_hashify(obj, 0, 0, group_by_i);
}
-static void
-tally_up(VALUE hash, VALUE group)
+static int
+tally_up(st_data_t *group, st_data_t *value, st_data_t arg, int existing)
{
- VALUE tally = rb_hash_aref(hash, group);
- if (NIL_P(tally)) {
+ VALUE tally = (VALUE)*value;
+ VALUE hash = (VALUE)arg;
+ if (!existing) {
tally = INT2FIX(1);
}
else if (FIXNUM_P(tally) && tally < INT2FIX(FIXNUM_MAX)) {
tally += INT2FIX(1) & ~FIXNUM_FLAG;
}
else {
+ Check_Type(tally, T_BIGNUM);
tally = rb_big_plus(tally, INT2FIX(1));
+ RB_OBJ_WRITTEN(hash, Qundef, tally);
}
- rb_hash_aset(hash, group, tally);
+ *value = (st_data_t)tally;
+ if (!SPECIAL_CONST_P(*group)) RB_OBJ_WRITTEN(hash, Qundef, *group);
+ return ST_CONTINUE;
+}
+
+static VALUE
+rb_enum_tally_up(VALUE hash, VALUE group)
+{
+ rb_hash_stlike_update(hash, group, tally_up, (st_data_t)hash);
+ return hash;
}
static VALUE
tally_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
{
ENUM_WANT_SVALUE();
- tally_up(hash, i);
+ rb_enum_tally_up(hash, i);
return Qnil;
}
/*
* call-seq:
- * enum.tally -> a_hash
+ * tally -> new_hash
+ * tally(hash) -> hash
+ *
+ * Returns a hash containing the counts of equal elements:
+ *
+ * - Each key is an element of +self+.
+ * - Each value is the number elements equal to that key.
+ *
+ * With no argument:
+ *
+ * %w[a b c b c a c b].tally # => {"a"=>2, "b"=>3, "c"=>3}
+ *
+ * With a hash argument, that hash is used for the tally (instead of a new hash),
+ * and is returned;
+ * this may be useful for accumulating tallies across multiple enumerables:
*
- * Tallies the collection, i.e., counts the occurrences of each element.
- * Returns a hash with the elements of the collection as keys and the
- * corresponding counts as values.
+ * hash = {}
+ * hash = %w[a c d b c a].tally(hash)
+ * hash # => {"a"=>2, "c"=>2, "d"=>1, "b"=>1}
+ * hash = %w[b a z].tally(hash)
+ * hash # => {"a"=>3, "c"=>2, "d"=>1, "b"=>2, "z"=>1}
+ * hash = %w[b a m].tally(hash)
+ * hash # => {"a"=>4, "c"=>2, "d"=>1, "b"=>3, "z"=>1, "m"=> 1}
*
- * ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1}
*/
static VALUE
-enum_tally(VALUE obj)
+enum_tally(int argc, VALUE *argv, VALUE obj)
{
- return enum_hashify(obj, 0, 0, tally_i);
+ VALUE hash;
+ if (rb_check_arity(argc, 0, 1)) {
+ hash = rb_to_hash_type(argv[0]);
+ rb_check_frozen(hash);
+ }
+ else {
+ hash = rb_hash_new();
+ }
+
+ return enum_hashify_into(obj, 0, 0, tally_i, hash);
}
+NORETURN(static VALUE first_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, params)));
static VALUE
first_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, params))
{
@@ -1031,18 +1259,26 @@ static VALUE enum_take(VALUE obj, VALUE n);
/*
* call-seq:
- * enum.first -> obj or nil
- * enum.first(n) -> an_array
+ * first -> element or nil
+ * first(n) -> array
+ *
+ * Returns the first element or elements.
+ *
+ * With no argument, returns the first element, or +nil+ if there is none:
+ *
+ * (1..4).first # => 1
+ * %w[a b c].first # => "a"
+ * {foo: 1, bar: 1, baz: 2}.first # => [:foo, 1]
+ * [].first # => nil
*
- * Returns the first element, or the first +n+ elements, of the enumerable.
- * If the enumerable is empty, the first form returns <code>nil</code>, and the
- * second form returns an empty array.
+ * With integer argument +n+, returns an array
+ * containing the first +n+ elements that exist:
*
- * %w[foo bar baz].first #=> "foo"
- * %w[foo bar baz].first(2) #=> ["foo", "bar"]
- * %w[foo bar baz].first(10) #=> ["foo", "bar", "baz"]
- * [].first #=> nil
- * [].first(10) #=> []
+ * (1..4).first(2) # => [1, 2]
+ * %w[a b c d].first(3) # => ["a", "b", "c"]
+ * %w[a b c d].first(50) # => ["a", "b", "c", "d"]
+ * {foo: 1, bar: 1, baz: 2}.first(2) # => [[:foo, 1], [:bar, 1]]
+ * [].first(2) # => []
*
*/
@@ -1052,37 +1288,44 @@ enum_first(int argc, VALUE *argv, VALUE obj)
struct MEMO *memo;
rb_check_arity(argc, 0, 1);
if (argc > 0) {
- return enum_take(obj, argv[0]);
+ return enum_take(obj, argv[0]);
}
else {
- memo = MEMO_NEW(Qnil, 0, 0);
- rb_block_call(obj, id_each, 0, 0, first_i, (VALUE)memo);
- return memo->v1;
+ memo = MEMO_NEW(Qnil, 0, 0);
+ rb_block_call(obj, id_each, 0, 0, first_i, (VALUE)memo);
+ return memo->v1;
}
}
-
/*
* call-seq:
- * enum.sort -> array
- * enum.sort { |a, b| block } -> array
+ * sort -> array
+ * sort {|a, b| ... } -> array
+ *
+ * Returns an array containing the sorted elements of +self+.
+ * The ordering of equal elements is indeterminate and may be unstable.
*
- * Returns an array containing the items in <i>enum</i> sorted.
+ * With no block given, the sort compares
+ * using the elements' own method <tt><=></tt>:
*
- * Comparisons for the sort will be done using the items' own
- * <code><=></code> operator or using an optional code block.
+ * %w[b c a d].sort # => ["a", "b", "c", "d"]
+ * {foo: 0, bar: 1, baz: 2}.sort # => [[:bar, 1], [:baz, 2], [:foo, 0]]
*
- * The block must implement a comparison between +a+ and +b+ and return
- * an integer less than 0 when +b+ follows +a+, +0+ when +a+ and +b+
- * are equivalent, or an integer greater than 0 when +a+ follows +b+.
+ * With a block given, comparisons in the block determine the ordering.
+ * The block is called with two elements +a+ and +b+, and must return:
*
- * The result is not guaranteed to be stable. When the comparison of two
- * elements returns +0+, the order of the elements is unpredictable.
+ * - A negative integer if <tt>a < b</tt>.
+ * - Zero if <tt>a == b</tt>.
+ * - A positive integer if <tt>a > b</tt>.
*
- * %w(rhea kea flea).sort #=> ["flea", "kea", "rhea"]
- * (1..10).sort { |a, b| b <=> a } #=> [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
+ * Examples:
*
- * See also Enumerable#sort_by. It implements a Schwartzian transform
+ * a = %w[b c a d]
+ * a.sort {|a, b| b <=> a } # => ["d", "c", "b", "a"]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.sort {|a, b| b <=> a } # => [[:foo, 0], [:baz, 2], [:bar, 1]]
+ *
+ * See also #sort_by. It implements a Schwartzian transform
* which is useful when key computation or comparison is expensive.
*/
@@ -1111,18 +1354,18 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
v = enum_yield(argc, i);
if (RBASIC(ary)->klass) {
- rb_raise(rb_eRuntimeError, "sort_by reentered");
+ rb_raise(rb_eRuntimeError, "sort_by reentered");
}
if (RARRAY_LEN(data->buf) != SORT_BY_BUFSIZE*2) {
- rb_raise(rb_eRuntimeError, "sort_by reentered");
+ rb_raise(rb_eRuntimeError, "sort_by reentered");
}
RARRAY_ASET(data->buf, data->n*2, v);
RARRAY_ASET(data->buf, data->n*2+1, i);
data->n++;
if (data->n == SORT_BY_BUFSIZE) {
- rb_ary_concat(ary, data->buf);
- data->n = 0;
+ rb_ary_concat(ary, data->buf);
+ data->n = 0;
}
return Qnil;
}
@@ -1130,36 +1373,39 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
static int
sort_by_cmp(const void *ap, const void *bp, void *data)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
VALUE a;
VALUE b;
VALUE ary = (VALUE)data;
if (RBASIC(ary)->klass) {
- rb_raise(rb_eRuntimeError, "sort_by reentered");
+ rb_raise(rb_eRuntimeError, "sort_by reentered");
}
a = *(VALUE *)ap;
b = *(VALUE *)bp;
- return OPTIMIZED_CMP(a, b, cmp_opt);
+ return OPTIMIZED_CMP(a, b);
}
/*
* call-seq:
- * enum.sort_by { |obj| block } -> array
- * enum.sort_by -> an_enumerator
+ * sort_by {|element| ... } -> array
+ * sort_by -> enumerator
*
- * Sorts <i>enum</i> using a set of keys generated by mapping the
- * values in <i>enum</i> through the given block.
+ * With a block given, returns an array of elements of +self+,
+ * sorted according to the value returned by the block for each element.
+ * The ordering of equal elements is indeterminate and may be unstable.
*
- * The result is not guaranteed to be stable. When two keys are equal,
- * the order of the corresponding elements is unpredictable.
+ * Examples:
*
- * If no block is given, an enumerator is returned instead.
+ * a = %w[xx xxx x xxxx]
+ * a.sort_by {|s| s.size } # => ["x", "xx", "xxx", "xxxx"]
+ * a.sort_by {|s| -s.size } # => ["xxxx", "xxx", "xx", "x"]
+ * h = {foo: 2, bar: 1, baz: 0}
+ * h.sort_by{|key, value| value } # => [[:baz, 0], [:bar, 1], [:foo, 2]]
+ * h.sort_by{|key, value| key } # => [[:bar, 1], [:baz, 0], [:foo, 2]]
*
- * %w{apple pear fig}.sort_by { |word| word.length }
- * #=> ["fig", "pear", "apple"]
+ * With no block given, returns an Enumerator.
*
* The current implementation of #sort_by generates an array of
* tuples containing the original collection element and the mapped
@@ -1234,13 +1480,13 @@ enum_sort_by(VALUE obj)
RETURN_SIZED_ENUMERATOR(obj, 0, 0, enum_size);
if (RB_TYPE_P(obj, T_ARRAY) && RARRAY_LEN(obj) <= LONG_MAX/2) {
- ary = rb_ary_new2(RARRAY_LEN(obj)*2);
+ ary = rb_ary_new2(RARRAY_LEN(obj)*2);
}
else {
- ary = rb_ary_new();
+ ary = rb_ary_new();
}
RBASIC_CLEAR_CLASS(ary);
- buf = rb_ary_tmp_new(SORT_BY_BUFSIZE*2);
+ buf = rb_ary_hidden_new(SORT_BY_BUFSIZE*2);
rb_ary_store(buf, SORT_BY_BUFSIZE*2-1, Qnil);
memo = MEMO_NEW(0, 0, 0);
data = (struct sort_by_data *)&memo->v1;
@@ -1251,8 +1497,8 @@ enum_sort_by(VALUE obj)
ary = data->ary;
buf = data->buf;
if (data->n) {
- rb_ary_resize(buf, data->n*2);
- rb_ary_concat(ary, buf);
+ rb_ary_resize(buf, data->n*2);
+ rb_ary_concat(ary, buf);
}
if (RARRAY_LEN(ary) > 2) {
RARRAY_PTR_USE(ary, ptr,
@@ -1260,10 +1506,10 @@ enum_sort_by(VALUE obj)
sort_by_cmp, (void *)ary));
}
if (RBASIC(ary)->klass) {
- rb_raise(rb_eRuntimeError, "sort_by reentered");
+ rb_raise(rb_eRuntimeError, "sort_by reentered");
}
for (i=1; i<RARRAY_LEN(ary); i+=2) {
- RARRAY_ASET(ary, i/2, RARRAY_AREF(ary, i));
+ RARRAY_ASET(ary, i/2, RARRAY_AREF(ary, i));
}
rb_ary_resize(ary, RARRAY_LEN(ary)/2);
RBASIC_SET_CLASS_RAW(ary, rb_cArray);
@@ -1309,33 +1555,52 @@ enum_##name##_func(VALUE result, struct MEMO *memo)
DEFINE_ENUMFUNCS(all)
{
if (!RTEST(result)) {
- MEMO_V1_SET(memo, Qfalse);
- rb_iter_break();
+ MEMO_V1_SET(memo, Qfalse);
+ rb_iter_break();
}
return Qnil;
}
/*
* call-seq:
- * enum.all? [{ |obj| block } ] -> true or false
- * enum.all?(pattern) -> true or false
- *
- * Passes each element of the collection to the given block. The method
- * returns <code>true</code> if the block never returns
- * <code>false</code> or <code>nil</code>. If the block is not given,
- * Ruby adds an implicit block of <code>{ |obj| obj }</code> which will
- * cause #all? to return +true+ when none of the collection members are
- * +false+ or +nil+.
- *
- * If instead a pattern is supplied, the method returns whether
- * <code>pattern === element</code> for every collection member.
- *
- * %w[ant bear cat].all? { |word| word.length >= 3 } #=> true
- * %w[ant bear cat].all? { |word| word.length >= 4 } #=> false
- * %w[ant bear cat].all?(/t/) #=> false
- * [1, 2i, 3.14].all?(Numeric) #=> true
- * [nil, true, 99].all? #=> false
- * [].all? #=> true
+ * all? -> true or false
+ * all?(pattern) -> true or false
+ * all? {|element| ... } -> true or false
+ *
+ * Returns whether every element meets a given criterion.
+ *
+ * With no argument and no block,
+ * returns whether every element is truthy:
+ *
+ * (1..4).all? # => true
+ * %w[a b c d].all? # => true
+ * [1, 2, nil].all? # => false
+ * ['a','b', false].all? # => false
+ * [].all? # => true
+ *
+ * With argument +pattern+ and no block,
+ * returns whether for each element +element+,
+ * <tt>pattern === element</tt>:
+ *
+ * (1..4).all?(Integer) # => true
+ * (1..4).all?(Numeric) # => true
+ * (1..4).all?(Float) # => false
+ * %w[bar baz bat bam].all?(/ba/) # => true
+ * %w[bar baz bat bam].all?(/bar/) # => false
+ * %w[bar baz bat bam].all?('ba') # => false
+ * {foo: 0, bar: 1, baz: 2}.all?(Array) # => true
+ * {foo: 0, bar: 1, baz: 2}.all?(Hash) # => false
+ * [].all?(Integer) # => true
+ *
+ * With a block given, returns whether the block returns a truthy value
+ * for every element:
+ *
+ * (1..4).all? {|element| element < 5 } # => true
+ * (1..4).all? {|element| element < 4 } # => false
+ * {foo: 0, bar: 1, baz: 2}.all? {|key, value| value < 3 } # => true
+ * {foo: 0, bar: 1, baz: 2}.all? {|key, value| value < 2 } # => false
+ *
+ * Related: #any?, #none? #one?.
*
*/
@@ -1351,34 +1616,52 @@ enum_all(int argc, VALUE *argv, VALUE obj)
DEFINE_ENUMFUNCS(any)
{
if (RTEST(result)) {
- MEMO_V1_SET(memo, Qtrue);
- rb_iter_break();
+ MEMO_V1_SET(memo, Qtrue);
+ rb_iter_break();
}
return Qnil;
}
/*
* call-seq:
- * enum.any? [{ |obj| block }] -> true or false
- * enum.any?(pattern) -> true or false
- *
- * Passes each element of the collection to the given block. The method
- * returns <code>true</code> if the block ever returns a value other
- * than <code>false</code> or <code>nil</code>. If the block is not
- * given, Ruby adds an implicit block of <code>{ |obj| obj }</code> that
- * will cause #any? to return +true+ if at least one of the collection
- * members is not +false+ or +nil+.
- *
- * If instead a pattern is supplied, the method returns whether
- * <code>pattern === element</code> for any collection member.
- *
- * %w[ant bear cat].any? { |word| word.length >= 3 } #=> true
- * %w[ant bear cat].any? { |word| word.length >= 4 } #=> true
- * %w[ant bear cat].any?(/d/) #=> false
- * [nil, true, 99].any?(Integer) #=> true
- * [nil, true, 99].any? #=> true
- * [].any? #=> false
+ * any? -> true or false
+ * any?(pattern) -> true or false
+ * any? {|element| ... } -> true or false
+ *
+ * Returns whether any element meets a given criterion.
+ *
+ * With no argument and no block,
+ * returns whether any element is truthy:
*
+ * (1..4).any? # => true
+ * %w[a b c d].any? # => true
+ * [1, false, nil].any? # => true
+ * [].any? # => false
+ *
+ * With argument +pattern+ and no block,
+ * returns whether for any element +element+,
+ * <tt>pattern === element</tt>:
+ *
+ * [nil, false, 0].any?(Integer) # => true
+ * [nil, false, 0].any?(Numeric) # => true
+ * [nil, false, 0].any?(Float) # => false
+ * %w[bar baz bat bam].any?(/m/) # => true
+ * %w[bar baz bat bam].any?(/foo/) # => false
+ * %w[bar baz bat bam].any?('ba') # => false
+ * {foo: 0, bar: 1, baz: 2}.any?(Array) # => true
+ * {foo: 0, bar: 1, baz: 2}.any?(Hash) # => false
+ * [].any?(Integer) # => false
+ *
+ * With a block given, returns whether the block returns a truthy value
+ * for any element:
+ *
+ * (1..4).any? {|element| element < 2 } # => true
+ * (1..4).any? {|element| element < 1 } # => false
+ * {foo: 0, bar: 1, baz: 2}.any? {|key, value| value < 1 } # => true
+ * {foo: 0, bar: 1, baz: 2}.any? {|key, value| value < 0 } # => false
+ *
+ *
+ * Related: #all?, #none?, #one?.
*/
static VALUE
@@ -1393,13 +1676,13 @@ enum_any(int argc, VALUE *argv, VALUE obj)
DEFINE_ENUMFUNCS(one)
{
if (RTEST(result)) {
- if (memo->v1 == Qundef) {
- MEMO_V1_SET(memo, Qtrue);
- }
- else if (memo->v1 == Qtrue) {
- MEMO_V1_SET(memo, Qfalse);
- rb_iter_break();
- }
+ if (UNDEF_P(memo->v1)) {
+ MEMO_V1_SET(memo, Qtrue);
+ }
+ else if (memo->v1 == Qtrue) {
+ MEMO_V1_SET(memo, Qfalse);
+ rb_iter_break();
+ }
}
return Qnil;
}
@@ -1429,11 +1712,10 @@ cmpint_reenter_check(struct nmin_data *data, VALUE val)
static int
nmin_cmp(const void *ap, const void *bp, void *_data)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
struct nmin_data *data = (struct nmin_data *)_data;
VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
#define rb_cmpint(cmp, a, b) rb_cmpint(cmpint_reenter_check(data, (cmp)), a, b)
- return OPTIMIZED_CMP(a, b, cmp_opt);
+ return OPTIMIZED_CMP(a, b);
#undef rb_cmpint
}
@@ -1461,7 +1743,7 @@ nmin_filter(struct nmin_data *data)
long i, j;
if (data->curlen <= data->n)
- return;
+ return;
n = data->n;
beg = RARRAY_PTR(data->buf);
@@ -1481,46 +1763,46 @@ nmin_filter(struct nmin_data *data)
} while (0)
while (1) {
- long pivot_index = left + (right-left)/2;
- long num_pivots = 1;
-
- SWAP(pivot_index, right);
- pivot_index = right;
-
- store_index = left;
- i = left;
- while (i <= right-num_pivots) {
- int c = data->cmpfunc(GETPTR(i), GETPTR(pivot_index), data);
- if (data->rev)
- c = -c;
- if (c == 0) {
- SWAP(i, right-num_pivots);
- num_pivots++;
- continue;
- }
- if (c < 0) {
- SWAP(i, store_index);
- store_index++;
- }
- i++;
- }
- j = store_index;
- for (i = right; right-num_pivots < i; i--) {
- if (i <= j)
- break;
- SWAP(j, i);
- j++;
- }
-
- if (store_index <= n && n <= store_index+num_pivots)
- break;
-
- if (n < store_index) {
- right = store_index-1;
- }
- else {
- left = store_index+num_pivots;
- }
+ long pivot_index = left + (right-left)/2;
+ long num_pivots = 1;
+
+ SWAP(pivot_index, right);
+ pivot_index = right;
+
+ store_index = left;
+ i = left;
+ while (i <= right-num_pivots) {
+ int c = data->cmpfunc(GETPTR(i), GETPTR(pivot_index), data);
+ if (data->rev)
+ c = -c;
+ if (c == 0) {
+ SWAP(i, right-num_pivots);
+ num_pivots++;
+ continue;
+ }
+ if (c < 0) {
+ SWAP(i, store_index);
+ store_index++;
+ }
+ i++;
+ }
+ j = store_index;
+ for (i = right; right-num_pivots < i; i--) {
+ if (i <= j)
+ break;
+ SWAP(j, i);
+ j++;
+ }
+
+ if (store_index <= n && n <= store_index+num_pivots)
+ break;
+
+ if (n < store_index) {
+ right = store_index-1;
+ }
+ else {
+ left = store_index+num_pivots;
+ }
}
#undef GETPTR
#undef SWAP
@@ -1539,11 +1821,11 @@ nmin_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
ENUM_WANT_SVALUE();
if (data->by)
- cmpv = enum_yield(argc, i);
+ cmpv = enum_yield(argc, i);
else
- cmpv = i;
+ cmpv = i;
- if (data->limit != Qundef) {
+ if (!UNDEF_P(data->limit)) {
int c = data->cmpfunc(&cmpv, &data->limit, data);
if (data->rev)
c = -c;
@@ -1552,13 +1834,13 @@ nmin_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
}
if (data->by)
- rb_ary_push(data->buf, cmpv);
+ rb_ary_push(data->buf, cmpv);
rb_ary_push(data->buf, i);
data->curlen++;
if (data->curlen == data->bufmax) {
- nmin_filter(data);
+ nmin_filter(data);
}
return Qnil;
@@ -1579,28 +1861,28 @@ rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
rb_raise(rb_eArgError, "too big size");
data.bufmax = data.n * 4;
data.curlen = 0;
- data.buf = rb_ary_tmp_new(data.bufmax * (by ? 2 : 1));
+ data.buf = rb_ary_hidden_new(data.bufmax * (by ? 2 : 1));
data.limit = Qundef;
data.cmpfunc = by ? nmin_cmp :
rb_block_given_p() ? nmin_block_cmp :
- nmin_cmp;
+ nmin_cmp;
data.rev = rev;
data.by = by;
if (ary) {
- long i;
- for (i = 0; i < RARRAY_LEN(obj); i++) {
- VALUE args[1];
- args[0] = RARRAY_AREF(obj, i);
+ long i;
+ for (i = 0; i < RARRAY_LEN(obj); i++) {
+ VALUE args[1];
+ args[0] = RARRAY_AREF(obj, i);
nmin_i(obj, (VALUE)&data, 1, args, Qundef);
- }
+ }
}
else {
- rb_block_call(obj, id_each, 0, 0, nmin_i, (VALUE)&data);
+ rb_block_call(obj, id_each, 0, 0, nmin_i, (VALUE)&data);
}
nmin_filter(&data);
result = data.buf;
if (by) {
- long i;
+ long i;
RARRAY_PTR_USE(result, ptr, {
ruby_qsort(ptr,
RARRAY_LEN(result)/2,
@@ -1610,7 +1892,7 @@ rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
ptr[i/2] = ptr[i];
}
});
- rb_ary_resize(result, RARRAY_LEN(result)/2);
+ rb_ary_resize(result, RARRAY_LEN(result)/2);
}
else {
RARRAY_PTR_USE(result, ptr, {
@@ -1628,26 +1910,45 @@ rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
/*
* call-seq:
- * enum.one? [{ |obj| block }] -> true or false
- * enum.one?(pattern) -> true or false
- *
- * Passes each element of the collection to the given block. The method
- * returns <code>true</code> if the block returns <code>true</code>
- * exactly once. If the block is not given, <code>one?</code> will return
- * <code>true</code> only if exactly one of the collection members is
- * true.
- *
- * If instead a pattern is supplied, the method returns whether
- * <code>pattern === element</code> for exactly one collection member.
- *
- * %w{ant bear cat}.one? { |word| word.length == 4 } #=> true
- * %w{ant bear cat}.one? { |word| word.length > 4 } #=> false
- * %w{ant bear cat}.one? { |word| word.length < 4 } #=> false
- * %w{ant bear cat}.one?(/t/) #=> false
- * [ nil, true, 99 ].one? #=> false
- * [ nil, true, false ].one? #=> true
- * [ nil, true, 99 ].one?(Integer) #=> true
- * [].one? #=> false
+ * one? -> true or false
+ * one?(pattern) -> true or false
+ * one? {|element| ... } -> true or false
+ *
+ * Returns whether exactly one element meets a given criterion.
+ *
+ * With no argument and no block,
+ * returns whether exactly one element is truthy:
+ *
+ * (1..1).one? # => true
+ * [1, nil, false].one? # => true
+ * (1..4).one? # => false
+ * {foo: 0}.one? # => true
+ * {foo: 0, bar: 1}.one? # => false
+ * [].one? # => false
+ *
+ * With argument +pattern+ and no block,
+ * returns whether for exactly one element +element+,
+ * <tt>pattern === element</tt>:
+ *
+ * [nil, false, 0].one?(Integer) # => true
+ * [nil, false, 0].one?(Numeric) # => true
+ * [nil, false, 0].one?(Float) # => false
+ * %w[bar baz bat bam].one?(/m/) # => true
+ * %w[bar baz bat bam].one?(/foo/) # => false
+ * %w[bar baz bat bam].one?('ba') # => false
+ * {foo: 0, bar: 1, baz: 2}.one?(Array) # => false
+ * {foo: 0}.one?(Array) # => true
+ * [].one?(Integer) # => false
+ *
+ * With a block given, returns whether the block returns a truthy value
+ * for exactly one element:
+ *
+ * (1..4).one? {|element| element < 2 } # => true
+ * (1..4).one? {|element| element < 1 } # => false
+ * {foo: 0, bar: 1, baz: 2}.one? {|key, value| value < 1 } # => true
+ * {foo: 0, bar: 1, baz: 2}.one? {|key, value| value < 2 } # => false
+ *
+ * Related: #none?, #all?, #any?.
*
*/
static VALUE
@@ -1659,40 +1960,58 @@ enum_one(int argc, VALUE *argv, VALUE obj)
WARN_UNUSED_BLOCK(argc);
rb_block_call(obj, id_each, 0, 0, ENUMFUNC(one), (VALUE)memo);
result = memo->v1;
- if (result == Qundef) return Qfalse;
+ if (UNDEF_P(result)) return Qfalse;
return result;
}
DEFINE_ENUMFUNCS(none)
{
if (RTEST(result)) {
- MEMO_V1_SET(memo, Qfalse);
- rb_iter_break();
+ MEMO_V1_SET(memo, Qfalse);
+ rb_iter_break();
}
return Qnil;
}
/*
* call-seq:
- * enum.none? [{ |obj| block }] -> true or false
- * enum.none?(pattern) -> true or false
- *
- * Passes each element of the collection to the given block. The method
- * returns <code>true</code> if the block never returns <code>true</code>
- * for all elements. If the block is not given, <code>none?</code> will return
- * <code>true</code> only if none of the collection members is true.
- *
- * If instead a pattern is supplied, the method returns whether
- * <code>pattern === element</code> for none of the collection members.
- *
- * %w{ant bear cat}.none? { |word| word.length == 5 } #=> true
- * %w{ant bear cat}.none? { |word| word.length >= 4 } #=> false
- * %w{ant bear cat}.none?(/d/) #=> true
- * [1, 3.14, 42].none?(Float) #=> false
- * [].none? #=> true
- * [nil].none? #=> true
- * [nil, false].none? #=> true
- * [nil, false, true].none? #=> false
+ * none? -> true or false
+ * none?(pattern) -> true or false
+ * none? {|element| ... } -> true or false
+ *
+ * Returns whether no element meets a given criterion.
+ *
+ * With no argument and no block,
+ * returns whether no element is truthy:
+ *
+ * (1..4).none? # => false
+ * [nil, false].none? # => true
+ * {foo: 0}.none? # => false
+ * {foo: 0, bar: 1}.none? # => false
+ * [].none? # => true
+ *
+ * With argument +pattern+ and no block,
+ * returns whether for no element +element+,
+ * <tt>pattern === element</tt>:
+ *
+ * [nil, false, 1.1].none?(Integer) # => true
+ * %w[bar baz bat bam].none?(/m/) # => false
+ * %w[bar baz bat bam].none?(/foo/) # => true
+ * %w[bar baz bat bam].none?('ba') # => true
+ * {foo: 0, bar: 1, baz: 2}.none?(Hash) # => true
+ * {foo: 0}.none?(Array) # => false
+ * [].none?(Integer) # => true
+ *
+ * With a block given, returns whether the block returns a truthy value
+ * for no element:
+ *
+ * (1..4).none? {|element| element < 1 } # => true
+ * (1..4).none? {|element| element < 2 } # => false
+ * {foo: 0, bar: 1, baz: 2}.none? {|key, value| value < 0 } # => true
+ * {foo: 0, bar: 1, baz: 2}.none? {|key, value| value < 1 } # => false
+ *
+ * Related: #one?, #all?, #any?.
+ *
*/
static VALUE
enum_none(int argc, VALUE *argv, VALUE obj)
@@ -1706,7 +2025,6 @@ enum_none(int argc, VALUE *argv, VALUE obj)
struct min_t {
VALUE min;
- struct cmp_opt_data cmp_opt;
};
static VALUE
@@ -1716,13 +2034,13 @@ min_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
- if (memo->min == Qundef) {
- memo->min = i;
+ if (UNDEF_P(memo->min)) {
+ memo->min = i;
}
else {
- if (OPTIMIZED_CMP(i, memo->min, memo->cmp_opt) < 0) {
- memo->min = i;
- }
+ if (OPTIMIZED_CMP(i, memo->min) < 0) {
+ memo->min = i;
+ }
}
return Qnil;
}
@@ -1735,14 +2053,14 @@ min_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
- if (memo->min == Qundef) {
- memo->min = i;
+ if (UNDEF_P(memo->min)) {
+ memo->min = i;
}
else {
- cmp = rb_yield_values(2, i, memo->min);
- if (rb_cmpint(cmp, i, memo->min) < 0) {
- memo->min = i;
- }
+ cmp = rb_yield_values(2, i, memo->min);
+ if (rb_cmpint(cmp, i, memo->min) < 0) {
+ memo->min = i;
+ }
}
return Qnil;
}
@@ -1750,33 +2068,66 @@ min_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
/*
* call-seq:
- * enum.min -> obj
- * enum.min { |a, b| block } -> obj
- * enum.min(n) -> array
- * enum.min(n) { |a, b| block } -> array
- *
- * Returns the object in _enum_ with the minimum value. The
- * first form assumes all objects implement Comparable;
- * the second uses the block to return <em>a <=> b</em>.
- *
- * a = %w(albatross dog horse)
- * a.min #=> "albatross"
- * a.min { |a, b| a.length <=> b.length } #=> "dog"
- *
- * If the +n+ argument is given, minimum +n+ elements are returned
- * as a sorted array.
- *
- * a = %w[albatross dog horse]
- * a.min(2) #=> ["albatross", "dog"]
- * a.min(2) {|a, b| a.length <=> b.length } #=> ["dog", "horse"]
- * [5, 1, 3, 4, 2].min(3) #=> [1, 2, 3]
+ * min -> element
+ * min(n) -> array
+ * min {|a, b| ... } -> element
+ * min(n) {|a, b| ... } -> array
+ *
+ * Returns the element with the minimum element according to a given criterion.
+ * The ordering of equal elements is indeterminate and may be unstable.
+ *
+ * With no argument and no block, returns the minimum element,
+ * using the elements' own method <tt><=></tt> for comparison:
+ *
+ * (1..4).min # => 1
+ * (-4..-1).min # => -4
+ * %w[d c b a].min # => "a"
+ * {foo: 0, bar: 1, baz: 2}.min # => [:bar, 1]
+ * [].min # => nil
+ *
+ * With positive integer argument +n+ given, and no block,
+ * returns an array containing the first +n+ minimum elements that exist:
+ *
+ * (1..4).min(2) # => [1, 2]
+ * (-4..-1).min(2) # => [-4, -3]
+ * %w[d c b a].min(2) # => ["a", "b"]
+ * {foo: 0, bar: 1, baz: 2}.min(2) # => [[:bar, 1], [:baz, 2]]
+ * [].min(2) # => []
+ *
+ * With a block given, the block determines the minimum elements.
+ * The block is called with two elements +a+ and +b+, and must return:
+ *
+ * - A negative integer if <tt>a < b</tt>.
+ * - Zero if <tt>a == b</tt>.
+ * - A positive integer if <tt>a > b</tt>.
+ *
+ * With a block given and no argument,
+ * returns the minimum element as determined by the block:
+ *
+ * %w[xxx x xxxx xx].min {|a, b| a.size <=> b.size } # => "x"
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.min {|pair1, pair2| pair1[1] <=> pair2[1] } # => [:foo, 0]
+ * [].min {|a, b| a <=> b } # => nil
+ *
+ * With a block given and positive integer argument +n+ given,
+ * returns an array containing the first +n+ minimum elements that exist,
+ * as determined by the block.
+ *
+ * %w[xxx x xxxx xx].min(2) {|a, b| a.size <=> b.size } # => ["x", "xx"]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.min(2) {|pair1, pair2| pair1[1] <=> pair2[1] }
+ * # => [[:foo, 0], [:bar, 1]]
+ * [].min(2) {|a, b| a <=> b } # => []
+ *
+ * Related: #min_by, #minmax, #max.
+ *
*/
static VALUE
enum_min(int argc, VALUE *argv, VALUE obj)
{
VALUE memo;
- struct min_t *m = NEW_CMP_OPT_MEMO(struct min_t, memo);
+ struct min_t *m = NEW_MEMO_FOR(struct min_t, memo);
VALUE result;
VALUE num;
@@ -1784,22 +2135,19 @@ enum_min(int argc, VALUE *argv, VALUE obj)
return rb_nmin_run(obj, num, 0, 0, 0);
m->min = Qundef;
- m->cmp_opt.opt_methods = 0;
- m->cmp_opt.opt_inited = 0;
if (rb_block_given_p()) {
- rb_block_call(obj, id_each, 0, 0, min_ii, memo);
+ rb_block_call(obj, id_each, 0, 0, min_ii, memo);
}
else {
- rb_block_call(obj, id_each, 0, 0, min_i, memo);
+ rb_block_call(obj, id_each, 0, 0, min_i, memo);
}
result = m->min;
- if (result == Qundef) return Qnil;
+ if (UNDEF_P(result)) return Qnil;
return result;
}
struct max_t {
VALUE max;
- struct cmp_opt_data cmp_opt;
};
static VALUE
@@ -1809,13 +2157,13 @@ max_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
- if (memo->max == Qundef) {
- memo->max = i;
+ if (UNDEF_P(memo->max)) {
+ memo->max = i;
}
else {
- if (OPTIMIZED_CMP(i, memo->max, memo->cmp_opt) > 0) {
- memo->max = i;
- }
+ if (OPTIMIZED_CMP(i, memo->max) > 0) {
+ memo->max = i;
+ }
}
return Qnil;
}
@@ -1828,47 +2176,80 @@ max_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
- if (memo->max == Qundef) {
- memo->max = i;
+ if (UNDEF_P(memo->max)) {
+ memo->max = i;
}
else {
- cmp = rb_yield_values(2, i, memo->max);
- if (rb_cmpint(cmp, i, memo->max) > 0) {
- memo->max = i;
- }
+ cmp = rb_yield_values(2, i, memo->max);
+ if (rb_cmpint(cmp, i, memo->max) > 0) {
+ memo->max = i;
+ }
}
return Qnil;
}
/*
* call-seq:
- * enum.max -> obj
- * enum.max { |a, b| block } -> obj
- * enum.max(n) -> array
- * enum.max(n) { |a, b| block } -> array
- *
- * Returns the object in _enum_ with the maximum value. The
- * first form assumes all objects implement Comparable;
- * the second uses the block to return <em>a <=> b</em>.
- *
- * a = %w(albatross dog horse)
- * a.max #=> "horse"
- * a.max { |a, b| a.length <=> b.length } #=> "albatross"
- *
- * If the +n+ argument is given, maximum +n+ elements are returned
- * as an array, sorted in descending order.
- *
- * a = %w[albatross dog horse]
- * a.max(2) #=> ["horse", "dog"]
- * a.max(2) {|a, b| a.length <=> b.length } #=> ["albatross", "horse"]
- * [5, 1, 3, 4, 2].max(3) #=> [5, 4, 3]
+ * max -> element
+ * max(n) -> array
+ * max {|a, b| ... } -> element
+ * max(n) {|a, b| ... } -> array
+ *
+ * Returns the element with the maximum element according to a given criterion.
+ * The ordering of equal elements is indeterminate and may be unstable.
+ *
+ * With no argument and no block, returns the maximum element,
+ * using the elements' own method <tt><=></tt> for comparison:
+ *
+ * (1..4).max # => 4
+ * (-4..-1).max # => -1
+ * %w[d c b a].max # => "d"
+ * {foo: 0, bar: 1, baz: 2}.max # => [:foo, 0]
+ * [].max # => nil
+ *
+ * With positive integer argument +n+ given, and no block,
+ * returns an array containing the first +n+ maximum elements that exist:
+ *
+ * (1..4).max(2) # => [4, 3]
+ * (-4..-1).max(2) # => [-1, -2]
+ * %w[d c b a].max(2) # => ["d", "c"]
+ * {foo: 0, bar: 1, baz: 2}.max(2) # => [[:foo, 0], [:baz, 2]]
+ * [].max(2) # => []
+ *
+ * With a block given, the block determines the maximum elements.
+ * The block is called with two elements +a+ and +b+, and must return:
+ *
+ * - A negative integer if <tt>a < b</tt>.
+ * - Zero if <tt>a == b</tt>.
+ * - A positive integer if <tt>a > b</tt>.
+ *
+ * With a block given and no argument,
+ * returns the maximum element as determined by the block:
+ *
+ * %w[xxx x xxxx xx].max {|a, b| a.size <=> b.size } # => "xxxx"
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.max {|pair1, pair2| pair1[1] <=> pair2[1] } # => [:baz, 2]
+ * [].max {|a, b| a <=> b } # => nil
+ *
+ * With a block given and positive integer argument +n+ given,
+ * returns an array containing the first +n+ maximum elements that exist,
+ * as determined by the block.
+ *
+ * %w[xxx x xxxx xx].max(2) {|a, b| a.size <=> b.size } # => ["xxxx", "xxx"]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.max(2) {|pair1, pair2| pair1[1] <=> pair2[1] }
+ * # => [[:baz, 2], [:bar, 1]]
+ * [].max(2) {|a, b| a <=> b } # => []
+ *
+ * Related: #min, #minmax, #max_by.
+ *
*/
static VALUE
enum_max(int argc, VALUE *argv, VALUE obj)
{
VALUE memo;
- struct max_t *m = NEW_CMP_OPT_MEMO(struct max_t, memo);
+ struct max_t *m = NEW_MEMO_FOR(struct max_t, memo);
VALUE result;
VALUE num;
@@ -1876,16 +2257,14 @@ enum_max(int argc, VALUE *argv, VALUE obj)
return rb_nmin_run(obj, num, 0, 1, 0);
m->max = Qundef;
- m->cmp_opt.opt_methods = 0;
- m->cmp_opt.opt_inited = 0;
if (rb_block_given_p()) {
- rb_block_call(obj, id_each, 0, 0, max_ii, (VALUE)memo);
+ rb_block_call(obj, id_each, 0, 0, max_ii, (VALUE)memo);
}
else {
- rb_block_call(obj, id_each, 0, 0, max_i, (VALUE)memo);
+ rb_block_call(obj, id_each, 0, 0, max_i, (VALUE)memo);
}
result = m->max;
- if (result == Qundef) return Qnil;
+ if (UNDEF_P(result)) return Qnil;
return result;
}
@@ -1893,7 +2272,6 @@ struct minmax_t {
VALUE min;
VALUE max;
VALUE last;
- struct cmp_opt_data cmp_opt;
};
static void
@@ -1901,19 +2279,19 @@ minmax_i_update(VALUE i, VALUE j, struct minmax_t *memo)
{
int n;
- if (memo->min == Qundef) {
- memo->min = i;
- memo->max = j;
+ if (UNDEF_P(memo->min)) {
+ memo->min = i;
+ memo->max = j;
}
else {
- n = OPTIMIZED_CMP(i, memo->min, memo->cmp_opt);
- if (n < 0) {
- memo->min = i;
- }
- n = OPTIMIZED_CMP(j, memo->max, memo->cmp_opt);
- if (n > 0) {
- memo->max = j;
- }
+ n = OPTIMIZED_CMP(i, memo->min);
+ if (n < 0) {
+ memo->min = i;
+ }
+ n = OPTIMIZED_CMP(j, memo->max);
+ if (n > 0) {
+ memo->max = j;
+ }
}
}
@@ -1926,14 +2304,14 @@ minmax_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
ENUM_WANT_SVALUE();
- if (memo->last == Qundef) {
+ if (UNDEF_P(memo->last)) {
memo->last = i;
return Qnil;
}
j = memo->last;
memo->last = Qundef;
- n = OPTIMIZED_CMP(j, i, memo->cmp_opt);
+ n = OPTIMIZED_CMP(j, i);
if (n == 0)
i = j;
else if (n < 0) {
@@ -1953,19 +2331,19 @@ minmax_ii_update(VALUE i, VALUE j, struct minmax_t *memo)
{
int n;
- if (memo->min == Qundef) {
- memo->min = i;
- memo->max = j;
+ if (UNDEF_P(memo->min)) {
+ memo->min = i;
+ memo->max = j;
}
else {
- n = rb_cmpint(rb_yield_values(2, i, memo->min), i, memo->min);
- if (n < 0) {
- memo->min = i;
- }
- n = rb_cmpint(rb_yield_values(2, j, memo->max), j, memo->max);
- if (n > 0) {
- memo->max = j;
- }
+ n = rb_cmpint(rb_yield_values(2, i, memo->min), i, memo->min);
+ if (n < 0) {
+ memo->min = i;
+ }
+ n = rb_cmpint(rb_yield_values(2, j, memo->max), j, memo->max);
+ if (n > 0) {
+ memo->max = j;
+ }
}
}
@@ -1978,7 +2356,7 @@ minmax_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
ENUM_WANT_SVALUE();
- if (memo->last == Qundef) {
+ if (UNDEF_P(memo->last)) {
memo->last = i;
return Qnil;
}
@@ -2002,41 +2380,55 @@ minmax_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
/*
* call-seq:
- * enum.minmax -> [min, max]
- * enum.minmax { |a, b| block } -> [min, max]
+ * minmax -> [minimum, maximum]
+ * minmax {|a, b| ... } -> [minimum, maximum]
+ *
+ * Returns a 2-element array containing the minimum and maximum elements
+ * according to a given criterion.
+ * The ordering of equal elements is indeterminate and may be unstable.
*
- * Returns a two element array which contains the minimum and the
- * maximum value in the enumerable. The first form assumes all
- * objects implement Comparable; the second uses the
- * block to return <em>a <=> b</em>.
+ * With no argument and no block, returns the minimum and maximum elements,
+ * using the elements' own method <tt><=></tt> for comparison:
+ *
+ * (1..4).minmax # => [1, 4]
+ * (-4..-1).minmax # => [-4, -1]
+ * %w[d c b a].minmax # => ["a", "d"]
+ * {foo: 0, bar: 1, baz: 2}.minmax # => [[:bar, 1], [:foo, 0]]
+ * [].minmax # => [nil, nil]
+ *
+ * With a block given, returns the minimum and maximum elements
+ * as determined by the block:
+ *
+ * %w[xxx x xxxx xx].minmax {|a, b| a.size <=> b.size } # => ["x", "xxxx"]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.minmax {|pair1, pair2| pair1[1] <=> pair2[1] }
+ * # => [[:foo, 0], [:baz, 2]]
+ * [].minmax {|a, b| a <=> b } # => [nil, nil]
+ *
+ * Related: #min, #max, #minmax_by.
*
- * a = %w(albatross dog horse)
- * a.minmax #=> ["albatross", "horse"]
- * a.minmax { |a, b| a.length <=> b.length } #=> ["dog", "albatross"]
*/
static VALUE
enum_minmax(VALUE obj)
{
VALUE memo;
- struct minmax_t *m = NEW_CMP_OPT_MEMO(struct minmax_t, memo);
+ struct minmax_t *m = NEW_MEMO_FOR(struct minmax_t, memo);
m->min = Qundef;
m->last = Qundef;
- m->cmp_opt.opt_methods = 0;
- m->cmp_opt.opt_inited = 0;
if (rb_block_given_p()) {
- rb_block_call(obj, id_each, 0, 0, minmax_ii, memo);
- if (m->last != Qundef)
- minmax_ii_update(m->last, m->last, m);
+ rb_block_call(obj, id_each, 0, 0, minmax_ii, memo);
+ if (!UNDEF_P(m->last))
+ minmax_ii_update(m->last, m->last, m);
}
else {
- rb_block_call(obj, id_each, 0, 0, minmax_i, memo);
- if (m->last != Qundef)
- minmax_i_update(m->last, m->last, m);
+ rb_block_call(obj, id_each, 0, 0, minmax_i, memo);
+ if (!UNDEF_P(m->last))
+ minmax_i_update(m->last, m->last, m);
}
- if (m->min != Qundef) {
- return rb_assoc_new(m->min, m->max);
+ if (!UNDEF_P(m->min)) {
+ return rb_assoc_new(m->min, m->max);
}
return rb_assoc_new(Qnil, Qnil);
}
@@ -2044,45 +2436,57 @@ enum_minmax(VALUE obj)
static VALUE
min_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
struct MEMO *memo = MEMO_CAST(args);
VALUE v;
ENUM_WANT_SVALUE();
v = enum_yield(argc, i);
- if (memo->v1 == Qundef) {
- MEMO_V1_SET(memo, v);
- MEMO_V2_SET(memo, i);
+ if (UNDEF_P(memo->v1)) {
+ MEMO_V1_SET(memo, v);
+ MEMO_V2_SET(memo, i);
}
- else if (OPTIMIZED_CMP(v, memo->v1, cmp_opt) < 0) {
- MEMO_V1_SET(memo, v);
- MEMO_V2_SET(memo, i);
+ else if (OPTIMIZED_CMP(v, memo->v1) < 0) {
+ MEMO_V1_SET(memo, v);
+ MEMO_V2_SET(memo, i);
}
return Qnil;
}
/*
* call-seq:
- * enum.min_by {|obj| block } -> obj
- * enum.min_by -> an_enumerator
- * enum.min_by(n) {|obj| block } -> array
- * enum.min_by(n) -> an_enumerator
+ * min_by {|element| ... } -> element
+ * min_by(n) {|element| ... } -> array
+ * min_by -> enumerator
+ * min_by(n) -> enumerator
+ *
+ * Returns the elements for which the block returns the minimum values.
+ *
+ * With a block given and no argument,
+ * returns the element for which the block returns the minimum value:
+ *
+ * (1..4).min_by {|element| -element } # => 4
+ * %w[a b c d].min_by {|element| -element.ord } # => "d"
+ * {foo: 0, bar: 1, baz: 2}.min_by {|key, value| -value } # => [:baz, 2]
+ * [].min_by {|element| -element } # => nil
*
- * Returns the object in <i>enum</i> that gives the minimum
- * value from the given block.
+ * With a block given and positive integer argument +n+ given,
+ * returns an array containing the +n+ elements
+ * for which the block returns minimum values:
*
- * If no block is given, an enumerator is returned instead.
+ * (1..4).min_by(2) {|element| -element }
+ * # => [4, 3]
+ * %w[a b c d].min_by(2) {|element| -element.ord }
+ * # => ["d", "c"]
+ * {foo: 0, bar: 1, baz: 2}.min_by(2) {|key, value| -value }
+ * # => [[:baz, 2], [:bar, 1]]
+ * [].min_by(2) {|element| -element }
+ * # => []
*
- * a = %w(albatross dog horse)
- * a.min_by { |x| x.length } #=> "dog"
+ * Returns an Enumerator if no block is given.
*
- * If the +n+ argument is given, minimum +n+ elements are returned
- * as an array. These +n+ elements are sorted by the value from the
- * given block.
+ * Related: #min, #minmax, #max_by.
*
- * a = %w[albatross dog horse]
- * p a.min_by(2) {|x| x.length } #=> ["dog", "horse"]
*/
static VALUE
@@ -2106,89 +2510,56 @@ enum_min_by(int argc, VALUE *argv, VALUE obj)
static VALUE
max_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
struct MEMO *memo = MEMO_CAST(args);
VALUE v;
ENUM_WANT_SVALUE();
v = enum_yield(argc, i);
- if (memo->v1 == Qundef) {
- MEMO_V1_SET(memo, v);
- MEMO_V2_SET(memo, i);
+ if (UNDEF_P(memo->v1)) {
+ MEMO_V1_SET(memo, v);
+ MEMO_V2_SET(memo, i);
}
- else if (OPTIMIZED_CMP(v, memo->v1, cmp_opt) > 0) {
- MEMO_V1_SET(memo, v);
- MEMO_V2_SET(memo, i);
+ else if (OPTIMIZED_CMP(v, memo->v1) > 0) {
+ MEMO_V1_SET(memo, v);
+ MEMO_V2_SET(memo, i);
}
return Qnil;
}
/*
* call-seq:
- * enum.max_by {|obj| block } -> obj
- * enum.max_by -> an_enumerator
- * enum.max_by(n) {|obj| block } -> obj
- * enum.max_by(n) -> an_enumerator
- *
- * Returns the object in <i>enum</i> that gives the maximum
- * value from the given block.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * a = %w(albatross dog horse)
- * a.max_by { |x| x.length } #=> "albatross"
- *
- * If the +n+ argument is given, maximum +n+ elements are returned
- * as an array. These +n+ elements are sorted by the value from the
- * given block, in descending order.
- *
- * a = %w[albatross dog horse]
- * a.max_by(2) {|x| x.length } #=> ["albatross", "horse"]
- *
- * enum.max_by(n) can be used to implement weighted random sampling.
- * Following example implements and use Enumerable#wsample.
- *
- * module Enumerable
- * # weighted random sampling.
- * #
- * # Pavlos S. Efraimidis, Paul G. Spirakis
- * # Weighted random sampling with a reservoir
- * # Information Processing Letters
- * # Volume 97, Issue 5 (16 March 2006)
- * def wsample(n)
- * self.max_by(n) {|v| rand ** (1.0/yield(v)) }
- * end
- * end
- * e = (-20..20).to_a*10000
- * a = e.wsample(20000) {|x|
- * Math.exp(-(x/5.0)**2) # normal distribution
- * }
- * # a is 20000 samples from e.
- * p a.length #=> 20000
- * h = a.group_by {|x| x }
- * -10.upto(10) {|x| puts "*" * (h[x].length/30.0).to_i if h[x] }
- * #=> *
- * # ***
- * # ******
- * # ***********
- * # ******************
- * # *****************************
- * # *****************************************
- * # ****************************************************
- * # ***************************************************************
- * # ********************************************************************
- * # ***********************************************************************
- * # ***********************************************************************
- * # **************************************************************
- * # ****************************************************
- * # ***************************************
- * # ***************************
- * # ******************
- * # ***********
- * # *******
- * # ***
- * # *
+ * max_by {|element| ... } -> element
+ * max_by(n) {|element| ... } -> array
+ * max_by -> enumerator
+ * max_by(n) -> enumerator
+ *
+ * Returns the elements for which the block returns the maximum values.
+ *
+ * With a block given and no argument,
+ * returns the element for which the block returns the maximum value:
+ *
+ * (1..4).max_by {|element| -element } # => 1
+ * %w[a b c d].max_by {|element| -element.ord } # => "a"
+ * {foo: 0, bar: 1, baz: 2}.max_by {|key, value| -value } # => [:foo, 0]
+ * [].max_by {|element| -element } # => nil
+ *
+ * With a block given and positive integer argument +n+ given,
+ * returns an array containing the +n+ elements
+ * for which the block returns maximum values:
+ *
+ * (1..4).max_by(2) {|element| -element }
+ * # => [1, 2]
+ * %w[a b c d].max_by(2) {|element| -element.ord }
+ * # => ["a", "b"]
+ * {foo: 0, bar: 1, baz: 2}.max_by(2) {|key, value| -value }
+ * # => [[:foo, 0], [:bar, 1]]
+ * [].max_by(2) {|element| -element }
+ * # => []
+ *
+ * Returns an Enumerator if no block is given.
+ *
+ * Related: #max, #minmax, #min_by.
*
*/
@@ -2222,30 +2593,27 @@ struct minmax_by_t {
static void
minmax_by_i_update(VALUE v1, VALUE v2, VALUE i1, VALUE i2, struct minmax_by_t *memo)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
-
- if (memo->min_bv == Qundef) {
- memo->min_bv = v1;
- memo->max_bv = v2;
- memo->min = i1;
- memo->max = i2;
+ if (UNDEF_P(memo->min_bv)) {
+ memo->min_bv = v1;
+ memo->max_bv = v2;
+ memo->min = i1;
+ memo->max = i2;
}
else {
- if (OPTIMIZED_CMP(v1, memo->min_bv, cmp_opt) < 0) {
- memo->min_bv = v1;
- memo->min = i1;
- }
- if (OPTIMIZED_CMP(v2, memo->max_bv, cmp_opt) > 0) {
- memo->max_bv = v2;
- memo->max = i2;
- }
+ if (OPTIMIZED_CMP(v1, memo->min_bv) < 0) {
+ memo->min_bv = v1;
+ memo->min = i1;
+ }
+ if (OPTIMIZED_CMP(v2, memo->max_bv) > 0) {
+ memo->max_bv = v2;
+ memo->max = i2;
+ }
}
}
static VALUE
minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
struct minmax_by_t *memo = MEMO_FOR(struct minmax_by_t, _memo);
VALUE vi, vj, j;
int n;
@@ -2254,7 +2622,7 @@ minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
vi = enum_yield(argc, i);
- if (memo->last_bv == Qundef) {
+ if (UNDEF_P(memo->last_bv)) {
memo->last_bv = vi;
memo->last = i;
return Qnil;
@@ -2263,7 +2631,7 @@ minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
j = memo->last;
memo->last_bv = Qundef;
- n = OPTIMIZED_CMP(vj, vi, cmp_opt);
+ n = OPTIMIZED_CMP(vj, vi);
if (n == 0) {
i = j;
vi = vj;
@@ -2285,17 +2653,25 @@ minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
/*
* call-seq:
- * enum.minmax_by { |obj| block } -> [min, max]
- * enum.minmax_by -> an_enumerator
+ * minmax_by {|element| ... } -> [minimum, maximum]
+ * minmax_by -> enumerator
+ *
+ * Returns a 2-element array containing the elements
+ * for which the block returns minimum and maximum values:
+ *
+ * (1..4).minmax_by {|element| -element }
+ * # => [4, 1]
+ * %w[a b c d].minmax_by {|element| -element.ord }
+ * # => ["d", "a"]
+ * {foo: 0, bar: 1, baz: 2}.minmax_by {|key, value| -value }
+ * # => [[:baz, 2], [:foo, 0]]
+ * [].minmax_by {|element| -element }
+ * # => [nil, nil]
*
- * Returns a two element array containing the objects in
- * <i>enum</i> that correspond to the minimum and maximum values respectively
- * from the given block.
+ * Returns an Enumerator if no block is given.
*
- * If no block is given, an enumerator is returned instead.
+ * Related: #max_by, #minmax, #min_by.
*
- * a = %w(albatross dog horse)
- * a.minmax_by { |x| x.length } #=> ["dog", "albatross"]
*/
static VALUE
@@ -2313,7 +2689,7 @@ enum_minmax_by(VALUE obj)
m->last_bv = Qundef;
m->last = Qundef;
rb_block_call(obj, id_each, 0, 0, minmax_by_i, memo);
- if (m->last_bv != Qundef)
+ if (!UNDEF_P(m->last_bv))
minmax_by_i_update(m->last_bv, m->last_bv, m->last, m->last, m);
m = MEMO_FOR(struct minmax_by_t, memo);
return rb_assoc_new(m->min, m->max);
@@ -2325,24 +2701,28 @@ member_i(RB_BLOCK_CALL_FUNC_ARGLIST(iter, args))
struct MEMO *memo = MEMO_CAST(args);
if (rb_equal(rb_enum_values_pack(argc, argv), memo->v1)) {
- MEMO_V2_SET(memo, Qtrue);
- rb_iter_break();
+ MEMO_V2_SET(memo, Qtrue);
+ rb_iter_break();
}
return Qnil;
}
/*
* call-seq:
- * enum.include?(obj) -> true or false
- * enum.member?(obj) -> true or false
+ * include?(object) -> true or false
*
- * Returns <code>true</code> if any member of <i>enum</i> equals
- * <i>obj</i>. Equality is tested using <code>==</code>.
+ * Returns whether for any element <tt>object == element</tt>:
*
- * (1..10).include? 5 #=> true
- * (1..10).include? 15 #=> false
- * (1..10).member? 5 #=> true
- * (1..10).member? 15 #=> false
+ * (1..4).include?(2) # => true
+ * (1..4).include?(5) # => false
+ * (1..4).include?('2') # => false
+ * %w[a b c d].include?('b') # => true
+ * %w[a b c d].include?('2') # => false
+ * {foo: 0, bar: 1, baz: 2}.include?(:foo) # => true
+ * {foo: 0, bar: 1, baz: 2}.include?('foo') # => false
+ * {foo: 0, bar: 1, baz: 2}.include?(0) # => false
+ *
+ * Enumerable#member? is an alias for Enumerable#include?.
*
*/
@@ -2367,20 +2747,28 @@ each_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo))
/*
* call-seq:
- * enum.each_with_index(*args) { |obj, i| block } -> enum
- * enum.each_with_index(*args) -> an_enumerator
+ * each_with_index(*args) {|element, i| ..... } -> self
+ * each_with_index(*args) -> enumerator
*
- * Calls <em>block</em> with two arguments, the item and its index,
- * for each item in <i>enum</i>. Given arguments are passed through
- * to #each().
+ * With a block given, calls the block with each element and its index;
+ * returns +self+:
*
- * If no block is given, an enumerator is returned instead.
+ * h = {}
+ * (1..4).each_with_index {|element, i| h[element] = i } # => 1..4
+ * h # => {1=>0, 2=>1, 3=>2, 4=>3}
*
- * hash = Hash.new
- * %w(cat dog wombat).each_with_index { |item, index|
- * hash[item] = index
- * }
- * hash #=> {"cat"=>0, "dog"=>1, "wombat"=>2}
+ * h = {}
+ * %w[a b c d].each_with_index {|element, i| h[element] = i }
+ * # => ["a", "b", "c", "d"]
+ * h # => {"a"=>0, "b"=>1, "c"=>2, "d"=>3}
+ *
+ * a = []
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.each_with_index {|element, i| a.push([i, element]) }
+ * # => {:foo=>0, :bar=>1, :baz=>2}
+ * a # => [[0, [:foo, 0]], [1, [:bar, 1]], [2, [:baz, 2]]]
+ *
+ * With no block given, returns an Enumerator.
*
*/
@@ -2399,20 +2787,28 @@ enum_each_with_index(int argc, VALUE *argv, VALUE obj)
/*
* call-seq:
- * enum.reverse_each(*args) { |item| block } -> enum
- * enum.reverse_each(*args) -> an_enumerator
+ * reverse_each(*args) {|element| ... } -> self
+ * reverse_each(*args) -> enumerator
*
- * Builds a temporary array and traverses that array in reverse order.
+ * With a block given, calls the block with each element,
+ * but in reverse order; returns +self+:
*
- * If no block is given, an enumerator is returned instead.
+ * a = []
+ * (1..4).reverse_each {|element| a.push(-element) } # => 1..4
+ * a # => [-4, -3, -2, -1]
*
- * (1..3).reverse_each { |v| p v }
+ * a = []
+ * %w[a b c d].reverse_each {|element| a.push(element) }
+ * # => ["a", "b", "c", "d"]
+ * a # => ["d", "c", "b", "a"]
*
- * produces:
+ * a = []
+ * h.reverse_each {|element| a.push(element) }
+ * # => {:foo=>0, :bar=>1, :baz=>2}
+ * a # => [[:baz, 2], [:bar, 1], [:foo, 0]]
+ *
+ * With no block given, returns an Enumerator.
*
- * 3
- * 2
- * 1
*/
static VALUE
@@ -2449,30 +2845,39 @@ each_val_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
/*
* call-seq:
- * enum.each_entry { |obj| block } -> enum
- * enum.each_entry -> an_enumerator
- *
- * Calls <i>block</i> once for each element in +self+, passing that
- * element as a parameter, converting multiple values from yield to an
- * array.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * class Foo
- * include Enumerable
- * def each
- * yield 1
- * yield 1, 2
- * yield
- * end
- * end
- * Foo.new.each_entry{ |o| p o }
+ * each_entry(*args) {|element| ... } -> self
+ * each_entry(*args) -> enumerator
+ *
+ * Calls the given block with each element,
+ * converting multiple values from yield to an array; returns +self+:
+ *
+ * a = []
+ * (1..4).each_entry {|element| a.push(element) } # => 1..4
+ * a # => [1, 2, 3, 4]
+ *
+ * a = []
+ * h = {foo: 0, bar: 1, baz:2}
+ * h.each_entry {|element| a.push(element) }
+ * # => {:foo=>0, :bar=>1, :baz=>2}
+ * a # => [[:foo, 0], [:bar, 1], [:baz, 2]]
+ *
+ * class Foo
+ * include Enumerable
+ * def each
+ * yield 1
+ * yield 1, 2
+ * yield
+ * end
+ * end
+ * Foo.new.each_entry {|yielded| p yielded }
*
- * produces:
+ * Output:
*
- * 1
- * [1, 2]
- * nil
+ * 1
+ * [1, 2]
+ * nil
+ *
+ * With no block given, returns an Enumerator.
*
*/
@@ -2514,14 +2919,14 @@ each_slice_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, m))
rb_ary_push(ary, i);
if (RARRAY_LEN(ary) == size) {
- v = rb_yield(ary);
+ v = rb_yield(ary);
- if (memo->v2) {
- MEMO_V1_SET(memo, rb_ary_new2(size));
- }
- else {
- rb_ary_clear(ary);
- }
+ if (memo->v2) {
+ MEMO_V1_SET(memo, rb_ary_new2(size));
+ }
+ else {
+ rb_ary_clear(ary);
+ }
}
return v;
@@ -2537,7 +2942,7 @@ enum_each_slice_size(VALUE obj, VALUE args, VALUE eobj)
if (slice_size <= 0) rb_raise(rb_eArgError, "invalid slice size");
size = enum_size(obj, 0, 0);
- if (size == Qnil) return Qnil;
+ if (NIL_P(size)) return Qnil;
if (RB_FLOAT_TYPE_P(size) && RTEST(rb_funcall(size, infinite_p, 0))) {
return size;
}
@@ -2548,18 +2953,22 @@ enum_each_slice_size(VALUE obj, VALUE args, VALUE eobj)
/*
* call-seq:
- * enum.each_slice(n) { ... } -> nil
- * enum.each_slice(n) -> an_enumerator
+ * each_slice(n) { ... } -> self
+ * each_slice(n) -> enumerator
*
- * Iterates the given block for each slice of <n> elements. If no
- * block is given, returns an enumerator.
+ * Calls the block with each successive disjoint +n+-tuple of elements;
+ * returns +self+:
*
- * (1..10).each_slice(3) { |a| p a }
- * # outputs below
- * [1, 2, 3]
- * [4, 5, 6]
- * [7, 8, 9]
- * [10]
+ * a = []
+ * (1..10).each_slice(3) {|tuple| a.push(tuple) }
+ * a # => [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]
+ *
+ * a = []
+ * h = {foo: 0, bar: 1, baz: 2, bat: 3, bam: 4}
+ * h.each_slice(2) {|tuple| a.push(tuple) }
+ * a # => [[[:foo, 0], [:bar, 1]], [[:baz, 2], [:bat, 3]], [[:bam, 4]]]
+ *
+ * With no block given, returns an Enumerator.
*
*/
static VALUE
@@ -2580,7 +2989,7 @@ enum_each_slice(VALUE obj, VALUE n)
ary = memo->v1;
if (RARRAY_LEN(ary) > 0) rb_yield(ary);
- return Qnil;
+ return obj;
}
static VALUE
@@ -2593,14 +3002,14 @@ each_cons_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
if (RARRAY_LEN(ary) == size) {
- rb_ary_shift(ary);
+ rb_ary_shift(ary);
}
rb_ary_push(ary, i);
if (RARRAY_LEN(ary) == size) {
- if (memo->v2) {
- ary = rb_ary_dup(ary);
- }
- v = rb_yield(ary);
+ if (memo->v2) {
+ ary = rb_ary_dup(ary);
+ }
+ v = rb_yield(ary);
}
return v;
}
@@ -2608,38 +3017,36 @@ each_cons_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
static VALUE
enum_each_cons_size(VALUE obj, VALUE args, VALUE eobj)
{
- struct cmp_opt_data cmp_opt = { 0, 0 };
const VALUE zero = LONG2FIX(0);
VALUE n, size;
long cons_size = NUM2LONG(RARRAY_AREF(args, 0));
if (cons_size <= 0) rb_raise(rb_eArgError, "invalid size");
size = enum_size(obj, 0, 0);
- if (size == Qnil) return Qnil;
+ if (NIL_P(size)) return Qnil;
n = add_int(size, 1 - cons_size);
- return (OPTIMIZED_CMP(n, zero, cmp_opt) == -1) ? zero : n;
+ return (OPTIMIZED_CMP(n, zero) == -1) ? zero : n;
}
/*
* call-seq:
- * enum.each_cons(n) { ... } -> nil
- * enum.each_cons(n) -> an_enumerator
- *
- * Iterates the given block for each array of consecutive <n>
- * elements. If no block is given, returns an enumerator.
- *
- * e.g.:
- * (1..10).each_cons(3) { |a| p a }
- * # outputs below
- * [1, 2, 3]
- * [2, 3, 4]
- * [3, 4, 5]
- * [4, 5, 6]
- * [5, 6, 7]
- * [6, 7, 8]
- * [7, 8, 9]
- * [8, 9, 10]
+ * each_cons(n) { ... } -> self
+ * each_cons(n) -> enumerator
+ *
+ * Calls the block with each successive overlapped +n+-tuple of elements;
+ * returns +self+:
+ *
+ * a = []
+ * (1..5).each_cons(3) {|element| a.push(element) }
+ * a # => [[1, 2, 3], [2, 3, 4], [3, 4, 5]]
+ *
+ * a = []
+ * h = {foo: 0, bar: 1, baz: 2, bam: 3}
+ * h.each_cons(2) {|element| a.push(element) }
+ * a # => [[[:foo, 0], [:bar, 1]], [[:bar, 1], [:baz, 2]], [[:baz, 2], [:bam, 3]]]
+ *
+ * With no block given, returns an Enumerator.
*
*/
static VALUE
@@ -2652,11 +3059,11 @@ enum_each_cons(VALUE obj, VALUE n)
if (size <= 0) rb_raise(rb_eArgError, "invalid size");
RETURN_SIZED_ENUMERATOR(obj, 1, &n, enum_each_cons_size);
arity = rb_block_arity();
- if (enum_size_over_p(obj, size)) return Qnil;
+ if (enum_size_over_p(obj, size)) return obj;
memo = MEMO_NEW(rb_ary_new2(size), dont_recycle_block_arg(arity), size);
rb_block_call(obj, id_each, 0, 0, each_cons_i, (VALUE)memo);
- return Qnil;
+ return obj;
}
static VALUE
@@ -2668,16 +3075,19 @@ each_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo))
/*
* call-seq:
- * enum.each_with_object(obj) { |(*args), memo_obj| ... } -> obj
- * enum.each_with_object(obj) -> an_enumerator
+ * each_with_object(object) { |(*args), memo_object| ... } -> object
+ * each_with_object(object) -> enumerator
+ *
+ * Calls the block once for each element, passing both the element
+ * and the given object:
*
- * Iterates the given block for each element with an arbitrary
- * object given, and returns the initially given object.
+ * (1..4).each_with_object([]) {|i, a| a.push(i**2) }
+ * # => [1, 4, 9, 16]
*
- * If no block is given, returns an enumerator.
+ * {foo: 0, bar: 1, baz: 2}.each_with_object({}) {|(k, v), h| h[v] = k }
+ * # => {0=>:foo, 1=>:bar, 2=>:baz}
*
- * evens = (1..10).each_with_object([]) { |i, a| a << i*2 }
- * #=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
+ * With no block given, returns an Enumerator.
*
*/
static VALUE
@@ -2703,20 +3113,20 @@ zip_ary(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
rb_ary_store(tmp, 0, rb_enum_values_pack(argc, argv));
for (i=0; i<RARRAY_LEN(args); i++) {
- VALUE e = RARRAY_AREF(args, i);
+ VALUE e = RARRAY_AREF(args, i);
- if (RARRAY_LEN(e) <= n) {
- rb_ary_push(tmp, Qnil);
- }
- else {
- rb_ary_push(tmp, RARRAY_AREF(e, n));
- }
+ if (RARRAY_LEN(e) <= n) {
+ rb_ary_push(tmp, Qnil);
+ }
+ else {
+ rb_ary_push(tmp, RARRAY_AREF(e, n));
+ }
}
if (NIL_P(result)) {
- enum_yield_array(tmp);
+ enum_yield_array(tmp);
}
else {
- rb_ary_push(result, tmp);
+ rb_ary_push(result, tmp);
}
RB_GC_GUARD(args);
@@ -2750,26 +3160,26 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
rb_ary_store(tmp, 0, rb_enum_values_pack(argc, argv));
for (i=0; i<RARRAY_LEN(args); i++) {
- if (NIL_P(RARRAY_AREF(args, i))) {
- rb_ary_push(tmp, Qnil);
- }
- else {
- VALUE v[2];
-
- v[1] = RARRAY_AREF(args, i);
- rb_rescue2(call_next, (VALUE)v, call_stop, (VALUE)v, rb_eStopIteration, (VALUE)0);
- if (v[0] == Qundef) {
- RARRAY_ASET(args, i, Qnil);
- v[0] = Qnil;
- }
- rb_ary_push(tmp, v[0]);
- }
+ if (NIL_P(RARRAY_AREF(args, i))) {
+ rb_ary_push(tmp, Qnil);
+ }
+ else {
+ VALUE v[2];
+
+ v[1] = RARRAY_AREF(args, i);
+ rb_rescue2(call_next, (VALUE)v, call_stop, (VALUE)v, rb_eStopIteration, (VALUE)0);
+ if (UNDEF_P(v[0])) {
+ RARRAY_ASET(args, i, Qnil);
+ v[0] = Qnil;
+ }
+ rb_ary_push(tmp, v[0]);
+ }
}
if (NIL_P(result)) {
- enum_yield_array(tmp);
+ enum_yield_array(tmp);
}
else {
- rb_ary_push(result, tmp);
+ rb_ary_push(result, tmp);
}
RB_GC_GUARD(args);
@@ -2779,29 +3189,68 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
/*
* call-seq:
- * enum.zip(arg, ...) -> an_array_of_array
- * enum.zip(arg, ...) { |arr| block } -> nil
- *
- * Takes one element from <i>enum</i> and merges corresponding
- * elements from each <i>args</i>. This generates a sequence of
- * <em>n</em>-element arrays, where <em>n</em> is one more than the
- * count of arguments. The length of the resulting sequence will be
- * <code>enum#size</code>. If the size of any argument is less than
- * <code>enum#size</code>, <code>nil</code> values are supplied. If
- * a block is given, it is invoked for each output array, otherwise
- * an array of arrays is returned.
- *
- * a = [ 4, 5, 6 ]
- * b = [ 7, 8, 9 ]
- *
- * a.zip(b) #=> [[4, 7], [5, 8], [6, 9]]
- * [1, 2, 3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
- * [1, 2].zip(a, b) #=> [[1, 4, 7], [2, 5, 8]]
- * a.zip([1, 2], [8]) #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]
- *
- * c = []
- * a.zip(b) { |x, y| c << x + y } #=> nil
- * c #=> [11, 13, 15]
+ * zip(*other_enums) -> array
+ * zip(*other_enums) {|array| ... } -> nil
+ *
+ * With no block given, returns a new array +new_array+ of size self.size
+ * whose elements are arrays.
+ * Each nested array <tt>new_array[n]</tt>
+ * is of size <tt>other_enums.size+1</tt>, and contains:
+ *
+ * - The +n+-th element of self.
+ * - The +n+-th element of each of the +other_enums+.
+ *
+ * If all +other_enums+ and self are the same size,
+ * all elements are included in the result, and there is no +nil+-filling:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3]
+ * c = [:c0, :c1, :c2, :c3]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]]
+ *
+ * f = {foo: 0, bar: 1, baz: 2}
+ * g = {goo: 3, gar: 4, gaz: 5}
+ * h = {hoo: 6, har: 7, haz: 8}
+ * d = f.zip(g, h)
+ * d # => [
+ * # [[:foo, 0], [:goo, 3], [:hoo, 6]],
+ * # [[:bar, 1], [:gar, 4], [:har, 7]],
+ * # [[:baz, 2], [:gaz, 5], [:haz, 8]]
+ * # ]
+ *
+ * If any enumerable in other_enums is smaller than self,
+ * fills to <tt>self.size</tt> with +nil+:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2]
+ * c = [:c0, :c1]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, nil], [:a3, nil, nil]]
+ *
+ * If any enumerable in other_enums is larger than self,
+ * its trailing elements are ignored:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3, :b4]
+ * c = [:c0, :c1, :c2, :c3, :c4, :c5]
+ * d = a.zip(b, c)
+ * d # => [[:a0, :b0, :c0], [:a1, :b1, :c1], [:a2, :b2, :c2], [:a3, :b3, :c3]]
+ *
+ * When a block is given, calls the block with each of the sub-arrays
+ * (formed as above); returns nil:
+ *
+ * a = [:a0, :a1, :a2, :a3]
+ * b = [:b0, :b1, :b2, :b3]
+ * c = [:c0, :c1, :c2, :c3]
+ * a.zip(b, c) {|sub_array| p sub_array} # => nil
+ *
+ * Output:
+ *
+ * [:a0, :b0, :c0]
+ * [:a1, :b1, :c1]
+ * [:a2, :b2, :c2]
+ * [:a3, :b3, :c3]
*
*/
@@ -2817,26 +3266,26 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
argv = RARRAY_PTR(args);
for (i=0; i<argc; i++) {
- VALUE ary = rb_check_array_type(argv[i]);
- if (NIL_P(ary)) {
- allary = FALSE;
- break;
- }
- argv[i] = ary;
+ VALUE ary = rb_check_array_type(argv[i]);
+ if (NIL_P(ary)) {
+ allary = FALSE;
+ break;
+ }
+ argv[i] = ary;
}
if (!allary) {
- static const VALUE sym_each = STATIC_ID2SYM(id_each);
- CONST_ID(conv, "to_enum");
- for (i=0; i<argc; i++) {
- if (!rb_respond_to(argv[i], id_each)) {
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
- rb_obj_class(argv[i]));
+ static const VALUE sym_each = STATIC_ID2SYM(id_each);
+ CONST_ID(conv, "to_enum");
+ for (i=0; i<argc; i++) {
+ if (!rb_respond_to(argv[i], id_each)) {
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
+ rb_obj_class(argv[i]));
}
- argv[i] = rb_funcallv(argv[i], conv, 1, &sym_each);
- }
+ argv[i] = rb_funcallv(argv[i], conv, 1, &sym_each);
+ }
}
if (!rb_block_given_p()) {
- result = rb_ary_new();
+ result = rb_ary_new();
}
/* TODO: use NODE_DOT2 as memo(v, v, -) */
@@ -2857,13 +3306,16 @@ take_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
/*
* call-seq:
- * enum.take(n) -> array
+ * take(n) -> array
+ *
+ * For non-negative integer +n+, returns the first +n+ elements:
*
- * Returns first n elements from <i>enum</i>.
+ * r = (1..4)
+ * r.take(2) # => [1, 2]
+ * r.take(0) # => []
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.take(3) #=> [1, 2, 3]
- * a.take(30) #=> [1, 2, 3, 4, 5, 0]
+ * h = {foo: 0, bar: 1, baz: 2, bat: 3}
+ * h.take(2) # => [[:foo, 0], [:bar, 1]]
*
*/
@@ -2875,7 +3327,7 @@ enum_take(VALUE obj, VALUE n)
long len = NUM2LONG(n);
if (len < 0) {
- rb_raise(rb_eArgError, "attempt to take negative size");
+ rb_raise(rb_eArgError, "attempt to take negative size");
}
if (len == 0) return rb_ary_new2(0);
@@ -2896,16 +3348,20 @@ take_while_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
/*
* call-seq:
- * enum.take_while { |obj| block } -> array
- * enum.take_while -> an_enumerator
+ * take_while {|element| ... } -> array
+ * take_while -> enumerator
+ *
+ * Calls the block with successive elements as long as the block
+ * returns a truthy value;
+ * returns an array of all elements up to that point:
*
- * Passes elements to the block until the block returns +nil+ or +false+,
- * then stops iterating and returns an array of all prior elements.
*
- * If no block is given, an enumerator is returned instead.
+ * (1..4).take_while{|i| i < 3 } # => [1, 2]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.take_while{|element| key, value = *element; value < 2 }
+ * # => [[:foo, 0], [:bar, 1]]
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.take_while { |i| i < 3 } #=> [1, 2]
+ * With no block given, returns an Enumerator.
*
*/
@@ -2925,23 +3381,30 @@ drop_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
{
struct MEMO *memo = MEMO_CAST(args);
if (memo->u3.cnt == 0) {
- rb_ary_push(memo->v1, rb_enum_values_pack(argc, argv));
+ rb_ary_push(memo->v1, rb_enum_values_pack(argc, argv));
}
else {
- memo->u3.cnt--;
+ memo->u3.cnt--;
}
return Qnil;
}
/*
* call-seq:
- * enum.drop(n) -> array
+ * drop(n) -> array
*
- * Drops first n elements from <i>enum</i>, and returns rest elements
- * in an array.
+ * For positive integer +n+, returns an array containing
+ * all but the first +n+ elements:
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.drop(3) #=> [4, 5, 0]
+ * r = (1..4)
+ * r.drop(3) # => [4]
+ * r.drop(2) # => [3, 4]
+ * r.drop(1) # => [2, 3, 4]
+ * r.drop(0) # => [1, 2, 3, 4]
+ * r.drop(50) # => []
+ *
+ * h = {foo: 0, bar: 1, baz: 2, bat: 3}
+ * h.drop(2) # => [[:baz, 2], [:bat, 3]]
*
*/
@@ -2953,7 +3416,7 @@ enum_drop(VALUE obj, VALUE n)
long len = NUM2LONG(n);
if (len < 0) {
- rb_raise(rb_eArgError, "attempt to drop negative size");
+ rb_raise(rb_eArgError, "attempt to drop negative size");
}
result = rb_ary_new();
@@ -2970,27 +3433,30 @@ drop_while_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
ENUM_WANT_SVALUE();
if (!memo->u3.state && !RTEST(enum_yield(argc, i))) {
- memo->u3.state = TRUE;
+ memo->u3.state = TRUE;
}
if (memo->u3.state) {
- rb_ary_push(memo->v1, i);
+ rb_ary_push(memo->v1, i);
}
return Qnil;
}
/*
* call-seq:
- * enum.drop_while { |obj| block } -> array
- * enum.drop_while -> an_enumerator
+ * drop_while {|element| ... } -> array
+ * drop_while -> enumerator
+ *
+ * Calls the block with successive elements as long as the block
+ * returns a truthy value;
+ * returns an array of all elements after that point:
*
- * Drops elements up to, but not including, the first element for
- * which the block returns +nil+ or +false+ and returns an array
- * containing the remaining elements.
*
- * If no block is given, an enumerator is returned instead.
+ * (1..4).drop_while{|i| i < 3 } # => [3, 4]
+ * h = {foo: 0, bar: 1, baz: 2}
+ * a = h.drop_while{|element| key, value = *element; value < 2 }
+ * a # => [[:baz, 2]]
*
- * a = [1, 2, 3, 4, 5, 0]
- * a.drop_while { |i| i < 3 } #=> [3, 4, 5, 0]
+ * With no block given, returns an Enumerator.
*
*/
@@ -3025,8 +3491,8 @@ enum_cycle_size(VALUE self, VALUE args, VALUE eobj)
VALUE size;
if (args && (RARRAY_LEN(args) > 0)) {
- n = RARRAY_AREF(args, 0);
- if (!NIL_P(n)) mul = NUM2LONG(n);
+ n = RARRAY_AREF(args, 0);
+ if (!NIL_P(n)) mul = NUM2LONG(n);
}
size = enum_size(self, args, 0);
@@ -3040,22 +3506,28 @@ enum_cycle_size(VALUE self, VALUE args, VALUE eobj)
/*
* call-seq:
- * enum.cycle(n=nil) { |obj| block } -> nil
- * enum.cycle(n=nil) -> an_enumerator
+ * cycle(n = nil) {|element| ...} -> nil
+ * cycle(n = nil) -> enumerator
*
- * Calls <i>block</i> for each element of <i>enum</i> repeatedly _n_
- * times or forever if none or +nil+ is given. If a non-positive
- * number is given or the collection is empty, does nothing. Returns
- * +nil+ if the loop has finished without getting interrupted.
+ * When called with positive integer argument +n+ and a block,
+ * calls the block with each element, then does so again,
+ * until it has done so +n+ times; returns +nil+:
*
- * Enumerable#cycle saves elements in an internal array so changes
- * to <i>enum</i> after the first pass have no effect.
+ * a = []
+ * (1..4).cycle(3) {|element| a.push(element) } # => nil
+ * a # => [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
+ * a = []
+ * ('a'..'d').cycle(2) {|element| a.push(element) }
+ * a # => ["a", "b", "c", "d", "a", "b", "c", "d"]
+ * a = []
+ * {foo: 0, bar: 1, baz: 2}.cycle(2) {|element| a.push(element) }
+ * a # => [[:foo, 0], [:bar, 1], [:baz, 2], [:foo, 0], [:bar, 1], [:baz, 2]]
*
- * If no block is given, an enumerator is returned instead.
+ * If count is zero or negative, does not call the block.
*
- * a = ["a", "b", "c"]
- * a.cycle { |x| puts x } # print, a, b, c, a, b, c,.. forever.
- * a.cycle(2) { |x| puts x } # print, a, b, c, a, b, c.
+ * When called with a block and +n+ is +nil+, cycles forever.
+ *
+ * When no block is given, returns an Enumerator.
*
*/
@@ -3083,7 +3555,7 @@ enum_cycle(int argc, VALUE *argv, VALUE obj)
if (len == 0) return Qnil;
while (n < 0 || 0 < --n) {
for (i=0; i<len; i++) {
- enum_yield_array(RARRAY_AREF(ary, i));
+ enum_yield_array(RARRAY_AREF(ary, i));
}
}
return Qnil;
@@ -3101,8 +3573,8 @@ chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
{
struct chunk_arg *argp = MEMO_FOR(struct chunk_arg, _argp);
VALUE v, s;
- VALUE alone = ID2SYM(rb_intern("_alone"));
- VALUE separator = ID2SYM(rb_intern("_separator"));
+ VALUE alone = ID2SYM(id__alone);
+ VALUE separator = ID2SYM(id__separator);
ENUM_WANT_SVALUE();
@@ -3110,22 +3582,22 @@ chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
if (v == alone) {
if (!NIL_P(argp->prev_value)) {
- s = rb_assoc_new(argp->prev_value, argp->prev_elts);
+ s = rb_assoc_new(argp->prev_value, argp->prev_elts);
rb_funcallv(argp->yielder, id_lshift, 1, &s);
argp->prev_value = argp->prev_elts = Qnil;
}
- v = rb_assoc_new(v, rb_ary_new3(1, i));
+ v = rb_assoc_new(v, rb_ary_new3(1, i));
rb_funcallv(argp->yielder, id_lshift, 1, &v);
}
else if (NIL_P(v) || v == separator) {
if (!NIL_P(argp->prev_value)) {
- v = rb_assoc_new(argp->prev_value, argp->prev_elts);
+ v = rb_assoc_new(argp->prev_value, argp->prev_elts);
rb_funcallv(argp->yielder, id_lshift, 1, &v);
argp->prev_value = argp->prev_elts = Qnil;
}
}
else if (SYMBOL_P(v) && (s = rb_sym2str(v), RSTRING_PTR(s)[0] == '_')) {
- rb_raise(rb_eRuntimeError, "symbols beginning with an underscore are reserved");
+ rb_raise(rb_eRuntimeError, "symbols beginning with an underscore are reserved");
}
else {
if (NIL_P(argp->prev_value)) {
@@ -3137,7 +3609,7 @@ chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
rb_ary_push(argp->prev_elts, i);
}
else {
- s = rb_assoc_new(argp->prev_value, argp->prev_elts);
+ s = rb_assoc_new(argp->prev_value, argp->prev_elts);
rb_funcallv(argp->yielder, id_lshift, 1, &s);
argp->prev_value = v;
argp->prev_elts = rb_ary_new3(1, i);
@@ -3154,8 +3626,8 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
VALUE arg;
struct chunk_arg *memo = NEW_MEMO_FOR(struct chunk_arg, arg);
- enumerable = rb_ivar_get(enumerator, rb_intern("chunk_enumerable"));
- memo->categorize = rb_ivar_get(enumerator, rb_intern("chunk_categorize"));
+ enumerable = rb_ivar_get(enumerator, id_chunk_enumerable);
+ memo->categorize = rb_ivar_get(enumerator, id_chunk_categorize);
memo->prev_value = Qnil;
memo->prev_elts = Qnil;
memo->yielder = yielder;
@@ -3163,58 +3635,86 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
rb_block_call(enumerable, id_each, 0, 0, chunk_ii, arg);
memo = MEMO_FOR(struct chunk_arg, arg);
if (!NIL_P(memo->prev_elts)) {
- arg = rb_assoc_new(memo->prev_value, memo->prev_elts);
- rb_funcallv(memo->yielder, id_lshift, 1, &arg);
+ arg = rb_assoc_new(memo->prev_value, memo->prev_elts);
+ rb_funcallv(memo->yielder, id_lshift, 1, &arg);
}
return Qnil;
}
/*
* call-seq:
- * enum.chunk { |elt| ... } -> an_enumerator
+ * chunk {|array| ... } -> enumerator
*
- * Enumerates over the items, chunking them together based on the return
- * value of the block.
+ * Each element in the returned enumerator is a 2-element array consisting of:
*
- * Consecutive elements which return the same block value are chunked together.
+ * - A value returned by the block.
+ * - An array ("chunk") containing the element for which that value was returned,
+ * and all following elements for which the block returned the same value:
*
- * For example, consecutive even numbers and odd numbers can be
- * chunked as follows.
+ * So that:
*
- * [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5].chunk { |n|
- * n.even?
- * }.each { |even, ary|
- * p [even, ary]
- * }
- * #=> [false, [3, 1]]
- * # [true, [4]]
- * # [false, [1, 5, 9]]
- * # [true, [2, 6]]
- * # [false, [5, 3, 5]]
+ * - Each block return value that is different from its predecessor
+ * begins a new chunk.
+ * - Each block return value that is the same as its predecessor
+ * continues the same chunk.
+ *
+ * Example:
+ *
+ * e = (0..10).chunk {|i| (i / 3).floor } # => #<Enumerator: ...>
+ * # The enumerator elements.
+ * e.next # => [0, [0, 1, 2]]
+ * e.next # => [1, [3, 4, 5]]
+ * e.next # => [2, [6, 7, 8]]
+ * e.next # => [3, [9, 10]]
+ *
+ * \Method +chunk+ is especially useful for an enumerable that is already sorted.
+ * This example counts words for each initial letter in a large array of words:
*
- * This method is especially useful for sorted series of elements.
- * The following example counts words for each initial letter.
+ * # Get sorted words from a web page.
+ * url = 'https://raw.githubusercontent.com/eneko/data-repository/master/data/words.txt'
+ * words = URI::open(url).readlines
+ * # Make chunks, one for each letter.
+ * e = words.chunk {|word| word.upcase[0] } # => #<Enumerator: ...>
+ * # Display 'A' through 'F'.
+ * e.each {|c, words| p [c, words.length]; break if c == 'F' }
*
- * open("/usr/share/dict/words", "r:iso-8859-1") { |f|
- * f.chunk { |line| line.ord }.each { |ch, lines| p [ch.chr, lines.length] }
+ * Output:
+ *
+ * ["A", 17096]
+ * ["B", 11070]
+ * ["C", 19901]
+ * ["D", 10896]
+ * ["E", 8736]
+ * ["F", 6860]
+ *
+ * You can use the special symbol <tt>:_alone</tt> to force an element
+ * into its own separate chuck:
+ *
+ * a = [0, 0, 1, 1]
+ * e = a.chunk{|i| i.even? ? :_alone : true }
+ * e.to_a # => [[:_alone, [0]], [:_alone, [0]], [true, [1, 1]]]
+ *
+ * For example, you can put each line that contains a URL into its own chunk:
+ *
+ * pattern = /http/
+ * open(filename) { |f|
+ * f.chunk { |line| line =~ pattern ? :_alone : true }.each { |key, lines|
+ * pp lines
+ * }
* }
- * #=> ["\n", 1]
- * # ["A", 1327]
- * # ["B", 1372]
- * # ["C", 1507]
- * # ["D", 791]
- * # ...
*
- * The following key values have special meaning:
- * - +nil+ and +:_separator+ specifies that the elements should be dropped.
- * - +:_alone+ specifies that the element should be chunked by itself.
+ * You can use the special symbol <tt>:_separator</tt> or +nil+
+ * to force an element to be ignored (not included in any chunk):
*
- * Any other symbols that begin with an underscore will raise an error:
+ * a = [0, 0, -1, 1, 1]
+ * e = a.chunk{|i| i < 0 ? :_separator : true }
+ * e.to_a # => [[true, [0, 0]], [true, [1, 1]]]
*
- * items.chunk { |item| :_underscore }
- * #=> RuntimeError: symbols beginning with an underscore are reserved
+ * Note that the separator does end the chunk:
*
- * +nil+ and +:_separator+ can be used to ignore some elements.
+ * a = [0, 0, -1, 1, -1, 1]
+ * e = a.chunk{|i| i < 0 ? :_separator : true }
+ * e.to_a # => [[true, [0, 0]], [true, [1]], [true, [1]]]
*
* For example, the sequence of hyphens in svn log can be eliminated as follows:
*
@@ -3244,18 +3744,6 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* pp lines
* }
*
- * +:_alone+ can be used to force items into their own chunk.
- * For example, you can put lines that contain a URL by themselves,
- * and chunk the rest of the lines together, like this:
- *
- * pattern = /http/
- * open(filename) { |f|
- * f.chunk { |line| line =~ pattern ? :_alone : true }.each { |key, lines|
- * pp lines
- * }
- * }
- *
- * If no block is given, an enumerator to `chunk` is returned instead.
*/
static VALUE
enum_chunk(VALUE enumerable)
@@ -3265,8 +3753,8 @@ enum_chunk(VALUE enumerable)
RETURN_SIZED_ENUMERATOR(enumerable, 0, 0, enum_size);
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("chunk_enumerable"), enumerable);
- rb_ivar_set(enumerator, rb_intern("chunk_categorize"), rb_block_proc());
+ rb_ivar_set(enumerator, id_chunk_enumerable, enumerable);
+ rb_ivar_set(enumerator, id_chunk_categorize, rb_block_proc());
rb_block_call(enumerator, idInitialize, 0, 0, chunk_i, enumerator);
return enumerator;
}
@@ -3313,9 +3801,9 @@ slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
VALUE arg;
struct slicebefore_arg *memo = NEW_MEMO_FOR(struct slicebefore_arg, arg);
- enumerable = rb_ivar_get(enumerator, rb_intern("slicebefore_enumerable"));
- memo->sep_pred = rb_attr_get(enumerator, rb_intern("slicebefore_sep_pred"));
- memo->sep_pat = NIL_P(memo->sep_pred) ? rb_ivar_get(enumerator, rb_intern("slicebefore_sep_pat")) : Qnil;
+ enumerable = rb_ivar_get(enumerator, id_slicebefore_enumerable);
+ memo->sep_pred = rb_attr_get(enumerator, id_slicebefore_sep_pred);
+ memo->sep_pat = NIL_P(memo->sep_pred) ? rb_ivar_get(enumerator, id_slicebefore_sep_pat) : Qnil;
memo->prev_elts = Qnil;
memo->yielder = yielder;
@@ -3328,24 +3816,41 @@ slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
/*
* call-seq:
- * enum.slice_before(pattern) -> an_enumerator
- * enum.slice_before { |elt| bool } -> an_enumerator
+ * slice_before(pattern) -> enumerator
+ * slice_before {|elt| ... } -> enumerator
*
- * Creates an enumerator for each chunked elements.
- * The beginnings of chunks are defined by _pattern_ and the block.
-
- * If <code>_pattern_ === _elt_</code> returns <code>true</code> or the block
- * returns <code>true</code> for the element, the element is beginning of a
- * chunk.
-
- * The <code>===</code> and _block_ is called from the first element to the last
- * element of _enum_. The result for the first element is ignored.
-
- * The result enumerator yields the chunked elements as an array.
- * So +each+ method can be called as follows:
+ * With argument +pattern+, returns an enumerator that uses the pattern
+ * to partition elements into arrays ("slices").
+ * An element begins a new slice if <tt>element === pattern</tt>
+ * (or if it is the first element).
*
- * enum.slice_before(pattern).each { |ary| ... }
- * enum.slice_before { |elt| bool }.each { |ary| ... }
+ * a = %w[foo bar fop for baz fob fog bam foy]
+ * e = a.slice_before(/ba/) # => #<Enumerator: ...>
+ * e.each {|array| p array }
+ *
+ * Output:
+ *
+ * ["foo"]
+ * ["bar", "fop", "for"]
+ * ["baz", "fob", "fog"]
+ * ["bam", "foy"]
+ *
+ * With a block, returns an enumerator that uses the block
+ * to partition elements into arrays.
+ * An element begins a new slice if its block return is a truthy value
+ * (or if it is the first element):
+ *
+ * e = (1..20).slice_before {|i| i % 4 == 2 } # => #<Enumerator: ...>
+ * e.each {|array| p array }
+ *
+ * Output:
+ *
+ * [1]
+ * [2, 3, 4, 5]
+ * [6, 7, 8, 9]
+ * [10, 11, 12, 13]
+ * [14, 15, 16, 17]
+ * [18, 19, 20]
*
* Other methods of the Enumerator class and Enumerable module,
* such as +to_a+, +map+, etc., are also usable.
@@ -3363,7 +3868,6 @@ slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* f.slice_before { |line| /\A\S/ === line }.each { |e| pp e }
* }
*
- *
* "svn proplist -R" produces multiline output for each file.
* They can be chunked as follows:
*
@@ -3479,15 +3983,15 @@ enum_slice_before(int argc, VALUE *argv, VALUE enumerable)
if (argc != 0)
rb_error_arity(argc, 0, 0);
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("slicebefore_sep_pred"), rb_block_proc());
+ rb_ivar_set(enumerator, id_slicebefore_sep_pred, rb_block_proc());
}
else {
VALUE sep_pat;
rb_scan_args(argc, argv, "1", &sep_pat);
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("slicebefore_sep_pat"), sep_pat);
+ rb_ivar_set(enumerator, id_slicebefore_sep_pat, sep_pat);
}
- rb_ivar_set(enumerator, rb_intern("slicebefore_enumerable"), enumerable);
+ rb_ivar_set(enumerator, id_slicebefore_enumerable, enumerable);
rb_block_call(enumerator, idInitialize, 0, 0, slicebefore_i, enumerator);
return enumerator;
}
@@ -3543,9 +4047,9 @@ sliceafter_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
VALUE arg;
struct sliceafter_arg *memo = NEW_MEMO_FOR(struct sliceafter_arg, arg);
- enumerable = rb_ivar_get(enumerator, rb_intern("sliceafter_enum"));
- memo->pat = rb_ivar_get(enumerator, rb_intern("sliceafter_pat"));
- memo->pred = rb_attr_get(enumerator, rb_intern("sliceafter_pred"));
+ enumerable = rb_ivar_get(enumerator, id_sliceafter_enum);
+ memo->pat = rb_ivar_get(enumerator, id_sliceafter_pat);
+ memo->pred = rb_attr_get(enumerator, id_sliceafter_pred);
memo->prev_elts = Qnil;
memo->yielder = yielder;
@@ -3608,9 +4112,9 @@ enum_slice_after(int argc, VALUE *argv, VALUE enumerable)
}
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("sliceafter_enum"), enumerable);
- rb_ivar_set(enumerator, rb_intern("sliceafter_pat"), pat);
- rb_ivar_set(enumerator, rb_intern("sliceafter_pred"), pred);
+ rb_ivar_set(enumerator, id_sliceafter_enum, enumerable);
+ rb_ivar_set(enumerator, id_sliceafter_pat, pat);
+ rb_ivar_set(enumerator, id_sliceafter_pred, pred);
rb_block_call(enumerator, idInitialize, 0, 0, sliceafter_i, enumerator);
return enumerator;
@@ -3634,15 +4138,15 @@ slicewhen_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
ENUM_WANT_SVALUE();
- if (memo->prev_elt == Qundef) {
+ if (UNDEF_P(memo->prev_elt)) {
/* The first element */
memo->prev_elt = i;
memo->prev_elts = rb_ary_new3(1, i);
}
else {
- VALUE args[2];
- args[0] = memo->prev_elt;
- args[1] = i;
+ VALUE args[2];
+ args[0] = memo->prev_elt;
+ args[1] = i;
split_p = RTEST(rb_funcallv(memo->pred, id_call, 2, args));
UPDATE_MEMO;
@@ -3671,14 +4175,14 @@ slicewhen_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
VALUE enumerable;
VALUE arg;
struct slicewhen_arg *memo =
- NEW_PARTIAL_MEMO_FOR(struct slicewhen_arg, arg, inverted);
+ NEW_PARTIAL_MEMO_FOR(struct slicewhen_arg, arg, inverted);
- enumerable = rb_ivar_get(enumerator, rb_intern("slicewhen_enum"));
- memo->pred = rb_attr_get(enumerator, rb_intern("slicewhen_pred"));
+ enumerable = rb_ivar_get(enumerator, id_slicewhen_enum);
+ memo->pred = rb_attr_get(enumerator, id_slicewhen_pred);
memo->prev_elt = Qundef;
memo->prev_elts = Qnil;
memo->yielder = yielder;
- memo->inverted = RTEST(rb_attr_get(enumerator, rb_intern("slicewhen_inverted")));
+ memo->inverted = RTEST(rb_attr_get(enumerator, id_slicewhen_inverted));
rb_block_call(enumerable, id_each, 0, 0, slicewhen_ii, arg);
memo = MEMO_FOR(struct slicewhen_arg, arg);
@@ -3694,7 +4198,7 @@ slicewhen_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* Creates an enumerator for each chunked elements.
* The beginnings of chunks are defined by the block.
*
- * This method split each chunk using adjacent elements,
+ * This method splits each chunk using adjacent elements,
* _elt_before_ and _elt_after_,
* in the receiver enumerator.
* This method split chunks between _elt_before_ and _elt_after_ where
@@ -3758,9 +4262,9 @@ enum_slice_when(VALUE enumerable)
pred = rb_block_proc();
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("slicewhen_enum"), enumerable);
- rb_ivar_set(enumerator, rb_intern("slicewhen_pred"), pred);
- rb_ivar_set(enumerator, rb_intern("slicewhen_inverted"), Qfalse);
+ rb_ivar_set(enumerator, id_slicewhen_enum, enumerable);
+ rb_ivar_set(enumerator, id_slicewhen_pred, pred);
+ rb_ivar_set(enumerator, id_slicewhen_inverted, Qfalse);
rb_block_call(enumerator, idInitialize, 0, 0, slicewhen_i, enumerator);
return enumerator;
@@ -3773,7 +4277,7 @@ enum_slice_when(VALUE enumerable)
* Creates an enumerator for each chunked elements.
* The beginnings of chunks are defined by the block.
*
- * This method split each chunk using adjacent elements,
+ * This method splits each chunk using adjacent elements,
* _elt_before_ and _elt_after_,
* in the receiver enumerator.
* This method split chunks between _elt_before_ and _elt_after_ where
@@ -3824,9 +4328,9 @@ enum_chunk_while(VALUE enumerable)
pred = rb_block_proc();
enumerator = rb_obj_alloc(rb_cEnumerator);
- rb_ivar_set(enumerator, rb_intern("slicewhen_enum"), enumerable);
- rb_ivar_set(enumerator, rb_intern("slicewhen_pred"), pred);
- rb_ivar_set(enumerator, rb_intern("slicewhen_inverted"), Qtrue);
+ rb_ivar_set(enumerator, id_slicewhen_enum, enumerable);
+ rb_ivar_set(enumerator, id_slicewhen_pred, pred);
+ rb_ivar_set(enumerator, id_slicewhen_inverted, Qtrue);
rb_block_call(enumerator, idInitialize, 0, 0, slicewhen_i, enumerator);
return enumerator;
@@ -3841,122 +4345,141 @@ struct enum_sum_memo {
};
static void
-sum_iter(VALUE i, struct enum_sum_memo *memo)
+sum_iter_normalize_memo(struct enum_sum_memo *memo)
{
- const int unused = (assert(memo != NULL), 0);
+ assert(FIXABLE(memo->n));
+ memo->v = rb_fix_plus(LONG2FIX(memo->n), memo->v);
+ memo->n = 0;
- long n = memo->n;
- VALUE v = memo->v;
- VALUE r = memo->r;
- double f = memo->f;
- double c = memo->c;
+ switch (TYPE(memo->r)) {
+ case T_RATIONAL: memo->v = rb_rational_plus(memo->r, memo->v); break;
+ case T_UNDEF: break;
+ default: UNREACHABLE; /* or ...? */
+ }
+ memo->r = Qundef;
+}
- if (memo->block_given)
- i = rb_yield(i);
+static void
+sum_iter_fixnum(VALUE i, struct enum_sum_memo *memo)
+{
+ memo->n += FIX2LONG(i); /* should not overflow long type */
+ if (! FIXABLE(memo->n)) {
+ memo->v = rb_big_plus(LONG2NUM(memo->n), memo->v);
+ memo->n = 0;
+ }
+}
- if (memo->float_value)
- goto float_value;
+static void
+sum_iter_bignum(VALUE i, struct enum_sum_memo *memo)
+{
+ memo->v = rb_big_plus(i, memo->v);
+}
- if (FIXNUM_P(v) || RB_TYPE_P(v, T_BIGNUM) || RB_TYPE_P(v, T_RATIONAL)) {
- if (FIXNUM_P(i)) {
- n += FIX2LONG(i); /* should not overflow long type */
- if (!FIXABLE(n)) {
- v = rb_big_plus(LONG2NUM(n), v);
- n = 0;
- }
- }
- else if (RB_TYPE_P(i, T_BIGNUM))
- v = rb_big_plus(i, v);
- else if (RB_TYPE_P(i, T_RATIONAL)) {
- if (r == Qundef)
- r = i;
- else
- r = rb_rational_plus(r, i);
- }
- else {
- if (n != 0) {
- v = rb_fix_plus(LONG2FIX(n), v);
- n = 0;
- }
- if (r != Qundef) {
- /* r can be an Integer when mathn is loaded */
- if (FIXNUM_P(r))
- v = rb_fix_plus(r, v);
- else if (RB_TYPE_P(r, T_BIGNUM))
- v = rb_big_plus(r, v);
- else
- v = rb_rational_plus(r, v);
- r = Qundef;
- }
- if (RB_FLOAT_TYPE_P(i)) {
- f = NUM2DBL(v);
- c = 0.0;
- memo->float_value = 1;
- goto float_value;
- }
- else
- goto some_value;
- }
+static void
+sum_iter_rational(VALUE i, struct enum_sum_memo *memo)
+{
+ if (UNDEF_P(memo->r)) {
+ memo->r = i;
}
- else if (RB_FLOAT_TYPE_P(v)) {
- /*
- * Kahan-Babuska balancing compensated summation algorithm
- * See http://link.springer.com/article/10.1007/s00607-005-0139-x
- */
- double x, t;
-
- float_value:
- if (RB_FLOAT_TYPE_P(i))
- x = RFLOAT_VALUE(i);
- else if (FIXNUM_P(i))
- x = FIX2LONG(i);
- else if (RB_TYPE_P(i, T_BIGNUM))
- x = rb_big2dbl(i);
- else if (RB_TYPE_P(i, T_RATIONAL))
- x = rb_num2dbl(i);
- else {
- v = DBL2NUM(f);
- memo->float_value = 0;
- goto some_value;
- }
+ else {
+ memo->r = rb_rational_plus(memo->r, i);
+ }
+}
- if (isnan(f)) return;
- if (isnan(x)) {
- memo->v = i;
- memo->f = x;
- return;
- }
- if (isinf(x)) {
- if (isinf(f) && signbit(x) != signbit(f)) {
- memo->f = NAN;
- memo->v = DBL2NUM(f);
- }
- else {
- memo->f = x;
- memo->v = i;
- }
- return;
+static void
+sum_iter_some_value(VALUE i, struct enum_sum_memo *memo)
+{
+ memo->v = rb_funcallv(memo->v, idPLUS, 1, &i);
+}
+
+static void
+sum_iter_Kahan_Babuska(VALUE i, struct enum_sum_memo *memo)
+{
+ /*
+ * Kahan-Babuska balancing compensated summation algorithm
+ * See https://link.springer.com/article/10.1007/s00607-005-0139-x
+ */
+ double x;
+
+ switch (TYPE(i)) {
+ case T_FLOAT: x = RFLOAT_VALUE(i); break;
+ case T_FIXNUM: x = FIX2LONG(i); break;
+ case T_BIGNUM: x = rb_big2dbl(i); break;
+ case T_RATIONAL: x = rb_num2dbl(i); break;
+ default:
+ memo->v = DBL2NUM(memo->f);
+ memo->float_value = 0;
+ sum_iter_some_value(i, memo);
+ return;
+ }
+
+ double f = memo->f;
+
+ if (isnan(f)) {
+ return;
+ }
+ else if (! isfinite(x)) {
+ if (isinf(x) && isinf(f) && signbit(x) != signbit(f)) {
+ i = DBL2NUM(f);
+ x = nan("");
}
- if (isinf(f)) return;
+ memo->v = i;
+ memo->f = x;
+ return;
+ }
+ else if (isinf(f)) {
+ return;
+ }
- t = f + x;
- if (fabs(f) >= fabs(x))
- c += ((f - t) + x);
- else
- c += ((x - t) + f);
- f = t;
+ double c = memo->c;
+ double t = f + x;
+
+ if (fabs(f) >= fabs(x)) {
+ c += ((f - t) + x);
}
else {
- some_value:
- v = rb_funcallv(v, idPLUS, 1, &i);
+ c += ((x - t) + f);
}
+ f = t;
- memo->v = v;
- memo->n = n;
- memo->r = r;
memo->f = f;
memo->c = c;
- (void)unused;
+}
+
+static void
+sum_iter(VALUE i, struct enum_sum_memo *memo)
+{
+ assert(memo != NULL);
+ if (memo->block_given) {
+ i = rb_yield(i);
+ }
+
+ if (memo->float_value) {
+ sum_iter_Kahan_Babuska(i, memo);
+ }
+ else switch (TYPE(memo->v)) {
+ default: sum_iter_some_value(i, memo); return;
+ case T_FLOAT:
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_RATIONAL:
+ switch (TYPE(i)) {
+ case T_FIXNUM: sum_iter_fixnum(i, memo); return;
+ case T_BIGNUM: sum_iter_bignum(i, memo); return;
+ case T_RATIONAL: sum_iter_rational(i, memo); return;
+ case T_FLOAT:
+ sum_iter_normalize_memo(memo);
+ memo->f = NUM2DBL(memo->v);
+ memo->c = 0.0;
+ memo->float_value = 1;
+ sum_iter_Kahan_Babuska(i, memo);
+ return;
+ default:
+ sum_iter_normalize_memo(memo);
+ sum_iter_some_value(i, memo);
+ return;
+ }
+ }
}
static VALUE
@@ -4005,36 +4528,35 @@ int_range_sum(VALUE beg, VALUE end, int excl, VALUE init)
}
/*
- * call-seq:
- * enum.sum(init=0) -> number
- * enum.sum(init=0) {|e| expr } -> number
- *
- * Returns the sum of elements in an Enumerable.
+ * call-seq:
+ * sum(initial_value = 0) -> number
+ * sum(initial_value = 0) {|element| ... } -> object
*
- * If a block is given, the block is applied to each element
- * before addition.
+ * With no block given,
+ * returns the sum of +initial_value+ and the elements:
*
- * If <i>enum</i> is empty, it returns <i>init</i>.
+ * (1..100).sum # => 5050
+ * (1..100).sum(1) # => 5051
+ * ('a'..'d').sum('foo') # => "fooabcd"
*
- * For example:
+ * Generally, the sum is computed using methods <tt>+</tt> and +each+;
+ * for performance optimizations, those methods may not be used,
+ * and so any redefinition of those methods may not have effect here.
*
- * { 1 => 10, 2 => 20 }.sum {|k, v| k * v } #=> 50
- * (1..10).sum #=> 55
- * (1..10).sum {|v| v * 2 } #=> 110
- * ('a'..'z').sum #=> TypeError
+ * One such optimization: When possible, computes using Gauss's summation
+ * formula <em>n(n+1)/2</em>:
*
- * This method can be used for non-numeric objects by
- * explicit <i>init</i> argument.
+ * 100 * (100 + 1) / 2 # => 5050
*
- * { 1 => 10, 2 => 20 }.sum([]) #=> [1, 10, 2, 20]
- * "a\nb\nc".each_line.lazy.map(&:chomp).sum("") #=> "abc"
+ * With a block given, calls the block with each element;
+ * returns the sum of +initial_value+ and the block return values:
*
- * If the method is applied to an Integer range without a block,
- * the sum is not done by iteration, but instead using Gauss's summation
- * formula.
+ * (1..4).sum {|i| i*i } # => 30
+ * (1..4).sum(100) {|i| i*i } # => 130
+ * h = {a: 0, b: 1, c: 2, d: 3, e: 4, f: 5}
+ * h.sum {|key, value| value.odd? ? value : 0 } # => 9
+ * ('a'..'f').sum('x') {|c| c < 'd' ? c : '' } # => "xabc"
*
- * Enumerable#sum method may not respect method redefinition of "+"
- * methods such as Integer#+, or "each" methods such as Range#each.
*/
static VALUE
enum_sum(int argc, VALUE* argv, VALUE obj)
@@ -4059,8 +4581,8 @@ enum_sum(int argc, VALUE* argv, VALUE obj)
if (RTEST(rb_range_values(obj, &beg, &end, &excl))) {
if (!memo.block_given && !memo.float_value &&
- (FIXNUM_P(beg) || RB_TYPE_P(beg, T_BIGNUM)) &&
- (FIXNUM_P(end) || RB_TYPE_P(end, T_BIGNUM))) {
+ (FIXNUM_P(beg) || RB_BIGNUM_TYPE_P(beg)) &&
+ (FIXNUM_P(end) || RB_BIGNUM_TYPE_P(end))) {
return int_range_sum(beg, end, excl, memo.v);
}
}
@@ -4077,14 +4599,8 @@ enum_sum(int argc, VALUE* argv, VALUE obj)
else {
if (memo.n != 0)
memo.v = rb_fix_plus(LONG2FIX(memo.n), memo.v);
- if (memo.r != Qundef) {
- /* r can be an Integer when mathn is loaded */
- if (FIXNUM_P(memo.r))
- memo.v = rb_fix_plus(memo.r, memo.v);
- else if (RB_TYPE_P(memo.r, T_BIGNUM))
- memo.v = rb_big_plus(memo.r, memo.v);
- else
- memo.v = rb_rational_plus(memo.r, memo.v);
+ if (!UNDEF_P(memo.r)) {
+ memo.v = rb_rational_plus(memo.r, memo.v);
}
return memo.v;
}
@@ -4108,12 +4624,23 @@ uniq_iter(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
/*
* call-seq:
- * enum.uniq -> new_ary
- * enum.uniq { |item| ... } -> new_ary
+ * uniq -> array
+ * uniq {|element| ... } -> array
+ *
+ * With no block, returns a new array containing only unique elements;
+ * the array has no two elements +e0+ and +e1+ such that <tt>e0.eql?(e1)</tt>:
*
- * Returns a new array by removing duplicate values in +self+.
+ * %w[a b c c b a a b c].uniq # => ["a", "b", "c"]
+ * [0, 1, 2, 2, 1, 0, 0, 1, 2].uniq # => [0, 1, 2]
+ *
+ * With a block, returns a new array containing only for which the block
+ * returns a unique value:
+ *
+ * a = [0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1]
+ * a.uniq {|i| i.even? ? i : 0 } # => [0, 2, 4]
+ * a = %w[a b c d e e d c b a a b c d e]
+ a.uniq {|c| c < 'c' } # => ["a", "c"]
*
- * See also Array#uniq.
*/
static VALUE
@@ -4121,7 +4648,7 @@ enum_uniq(VALUE obj)
{
VALUE hash, ret;
rb_block_call_func *const func =
- rb_block_given_p() ? uniq_iter : uniq_func;
+ rb_block_given_p() ? uniq_iter : uniq_func;
hash = rb_obj_hide(rb_hash_new());
rb_block_call(obj, id_each, 0, 0, func, hash);
@@ -4130,22 +4657,216 @@ enum_uniq(VALUE obj)
return ret;
}
+static VALUE
+compact_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+{
+ ENUM_WANT_SVALUE();
+
+ if (!NIL_P(i)) {
+ rb_ary_push(ary, i);
+ }
+ return Qnil;
+}
+
/*
- * The Enumerable mixin provides collection classes with several
- * traversal and searching methods, and with the ability to sort. The
- * class must provide a method #each, which yields
- * successive members of the collection. If Enumerable#max, #min, or
- * #sort is used, the objects in the collection must also implement a
- * meaningful <code><=></code> operator, as these methods rely on an
- * ordering between members of the collection.
+ * call-seq:
+ * compact -> array
+ *
+ * Returns an array of all non-+nil+ elements:
+ *
+ * a = [nil, 0, nil, 'a', false, nil, false, nil, 'a', nil, 0, nil]
+ * a.compact # => [0, "a", false, false, "a", 0]
+ *
+ */
+
+static VALUE
+enum_compact(VALUE obj)
+{
+ VALUE ary;
+
+ ary = rb_ary_new();
+ rb_block_call(obj, id_each, 0, 0, compact_i, ary);
+
+ return ary;
+}
+
+
+/*
+ * == What's Here
+ *
+ * \Module \Enumerable provides methods that are useful to a collection class for:
+ *
+ * - {Querying}[rdoc-ref:Enumerable@Methods+for+Querying]
+ * - {Fetching}[rdoc-ref:Enumerable@Methods+for+Fetching]
+ * - {Searching}[rdoc-ref:Enumerable@Methods+for+Searching]
+ * - {Sorting}[rdoc-ref:Enumerable@Methods+for+Sorting]
+ * - {Iterating}[rdoc-ref:Enumerable@Methods+for+Iterating]
+ * - {And more....}[rdoc-ref:Enumerable@Other+Methods]
+ *
+ * === Methods for Querying
+ *
+ * These methods return information about the \Enumerable other than the elements themselves:
+ *
+ * - #include?, #member?: Returns +true+ if <tt>self == object</tt>, +false+ otherwise.
+ * - #all?: Returns +true+ if all elements meet a specified criterion; +false+ otherwise.
+ * - #any?: Returns +true+ if any element meets a specified criterion; +false+ otherwise.
+ * - #none?: Returns +true+ if no element meets a specified criterion; +false+ otherwise.
+ * - #one?: Returns +true+ if exactly one element meets a specified criterion; +false+ otherwise.
+ * - #count: Returns the count of elements,
+ * based on an argument or block criterion, if given.
+ * - #tally: Returns a new \Hash containing the counts of occurrences of each element.
+ *
+ * === Methods for Fetching
+ *
+ * These methods return entries from the \Enumerable, without modifying it:
+ *
+ * <i>Leading, trailing, or all elements</i>:
+ *
+ * - #entries, #to_a: Returns all elements.
+ * - #first: Returns the first element or leading elements.
+ * - #take: Returns a specified number of leading elements.
+ * - #drop: Returns a specified number of trailing elements.
+ * - #take_while: Returns leading elements as specified by the given block.
+ * - #drop_while: Returns trailing elements as specified by the given block.
+ *
+ * <i>Minimum and maximum value elements</i>:
+ *
+ * - #min: Returns the elements whose values are smallest among the elements,
+ * as determined by <tt><=></tt> or a given block.
+ * - #max: Returns the elements whose values are largest among the elements,
+ * as determined by <tt><=></tt> or a given block.
+ * - #minmax: Returns a 2-element \Array containing the smallest and largest elements.
+ * - #min_by: Returns the smallest element, as determined by the given block.
+ * - #max_by: Returns the largest element, as determined by the given block.
+ * - #minmax_by: Returns the smallest and largest elements, as determined by the given block.
+ *
+ * <i>Groups, slices, and partitions</i>:
+ *
+ * - #group_by: Returns a \Hash that partitions the elements into groups.
+ * - #partition: Returns elements partitioned into two new Arrays, as determined by the given block.
+ * - #slice_after: Returns a new \Enumerator whose entries are a partition of +self+,
+ based either on a given +object+ or a given block.
+ * - #slice_before: Returns a new \Enumerator whose entries are a partition of +self+,
+ based either on a given +object+ or a given block.
+ * - #slice_when: Returns a new \Enumerator whose entries are a partition of +self+
+ based on the given block.
+ * - #chunk: Returns elements organized into chunks as specified by the given block.
+ * - #chunk_while: Returns elements organized into chunks as specified by the given block.
+ *
+ * === Methods for Searching and Filtering
+ *
+ * These methods return elements that meet a specified criterion:
+ *
+ * - #find, #detect: Returns an element selected by the block.
+ * - #find_all, #filter, #select: Returns elements selected by the block.
+ * - #find_index: Returns the index of an element selected by a given object or block.
+ * - #reject: Returns elements not rejected by the block.
+ * - #uniq: Returns elements that are not duplicates.
+ *
+ * === Methods for Sorting
+ *
+ * These methods return elements in sorted order:
+ *
+ * - #sort: Returns the elements, sorted by <tt><=></tt> or the given block.
+ * - #sort_by: Returns the elements, sorted by the given block.
+ *
+ * === Methods for Iterating
+ *
+ * - #each_entry: Calls the block with each successive element
+ * (slightly different from #each).
+ * - #each_with_index: Calls the block with each successive element and its index.
+ * - #each_with_object: Calls the block with each successive element and a given object.
+ * - #each_slice: Calls the block with successive non-overlapping slices.
+ * - #each_cons: Calls the block with successive overlapping slices.
+ * (different from #each_slice).
+ * - #reverse_each: Calls the block with each successive element, in reverse order.
+ *
+ * === Other Methods
+ *
+ * - #map, #collect: Returns objects returned by the block.
+ * - #filter_map: Returns truthy objects returned by the block.
+ * - #flat_map, #collect_concat: Returns flattened objects returned by the block.
+ * - #grep: Returns elements selected by a given object
+ * or objects returned by a given block.
+ * - #grep_v: Returns elements selected by a given object
+ * or objects returned by a given block.
+ * - #reduce, #inject: Returns the object formed by combining all elements.
+ * - #sum: Returns the sum of the elements, using method <tt>+</tt>.
+ * - #zip: Combines each element with elements from other enumerables;
+ * returns the n-tuples or calls the block with each.
+ * - #cycle: Calls the block with each element, cycling repeatedly.
+ *
+ * == Usage
+ *
+ * To use module \Enumerable in a collection class:
+ *
+ * - Include it:
+ *
+ * include Enumerable
+ *
+ * - Implement method <tt>#each</tt>
+ * which must yield successive elements of the collection.
+ * The method will be called by almost any \Enumerable method.
+ *
+ * Example:
+ *
+ * class Foo
+ * include Enumerable
+ * def each
+ * yield 1
+ * yield 1, 2
+ * yield
+ * end
+ * end
+ * Foo.new.each_entry{ |element| p element }
+ *
+ * Output:
+ *
+ * 1
+ * [1, 2]
+ * nil
+ *
+ * == \Enumerable in Ruby Classes
+ *
+ * These Ruby core classes include (or extend) \Enumerable:
+ *
+ * - ARGF
+ * - Array
+ * - Dir
+ * - Enumerator
+ * - ENV (extends)
+ * - Hash
+ * - IO
+ * - Range
+ * - Struct
+ *
+ * These Ruby standard library classes include \Enumerable:
+ *
+ * - CSV
+ * - CSV::Table
+ * - CSV::Row
+ * - Set
+ *
+ * Virtually all methods in \Enumerable call method +#each+ in the including class:
+ *
+ * - <tt>Hash#each</tt> yields the next key-value pair as a 2-element \Array.
+ * - <tt>Struct#each</tt> yields the next name-value pair as a 2-element \Array.
+ * - For the other classes above, +#each+ yields the next object from the collection.
+ *
+ * == About the Examples
+ *
+ * The example code snippets for the \Enumerable methods:
+ *
+ * - Always show the use of one or more \Array-like classes (often \Array itself).
+ * - Sometimes show the use of a \Hash-like class.
+ * For some methods, though, the usage would not make sense,
+ * and so it is not shown. Example: #tally would find exactly one of each \Hash entry.
+ *
*/
void
Init_Enumerable(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
rb_mEnumerable = rb_define_module("Enumerable");
rb_define_method(rb_mEnumerable, "to_a", enum_to_a, -1);
@@ -4173,7 +4894,7 @@ Init_Enumerable(void)
rb_define_method(rb_mEnumerable, "reduce", enum_inject, -1);
rb_define_method(rb_mEnumerable, "partition", enum_partition, 0);
rb_define_method(rb_mEnumerable, "group_by", enum_group_by, 0);
- rb_define_method(rb_mEnumerable, "tally", enum_tally, 0);
+ rb_define_method(rb_mEnumerable, "tally", enum_tally, -1);
rb_define_method(rb_mEnumerable, "first", enum_first, -1);
rb_define_method(rb_mEnumerable, "all?", enum_all, -1);
rb_define_method(rb_mEnumerable, "any?", enum_any, -1);
@@ -4206,6 +4927,20 @@ Init_Enumerable(void)
rb_define_method(rb_mEnumerable, "chunk_while", enum_chunk_while, 0);
rb_define_method(rb_mEnumerable, "sum", enum_sum, -1);
rb_define_method(rb_mEnumerable, "uniq", enum_uniq, 0);
-
- id_next = rb_intern("next");
+ rb_define_method(rb_mEnumerable, "compact", enum_compact, 0);
+
+ id__alone = rb_intern_const("_alone");
+ id__separator = rb_intern_const("_separator");
+ id_chunk_categorize = rb_intern_const("chunk_categorize");
+ id_chunk_enumerable = rb_intern_const("chunk_enumerable");
+ id_next = rb_intern_const("next");
+ id_sliceafter_enum = rb_intern_const("sliceafter_enum");
+ id_sliceafter_pat = rb_intern_const("sliceafter_pat");
+ id_sliceafter_pred = rb_intern_const("sliceafter_pred");
+ id_slicebefore_enumerable = rb_intern_const("slicebefore_enumerable");
+ id_slicebefore_sep_pat = rb_intern_const("slicebefore_sep_pat");
+ id_slicebefore_sep_pred = rb_intern_const("slicebefore_sep_pred");
+ id_slicewhen_enum = rb_intern_const("slicewhen_enum");
+ id_slicewhen_inverted = rb_intern_const("slicewhen_inverted");
+ id_slicewhen_pred = rb_intern_const("slicewhen_pred");
}
diff --git a/enumerator.c b/enumerator.c
index 9d0547da05..d587b63d32 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -12,14 +12,24 @@
************************************************/
-#include "ruby/ruby.h"
-#include "internal.h"
-#include "id.h"
+#include "ruby/internal/config.h"
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
+#include "id.h"
+#include "internal.h"
+#include "internal/class.h"
+#include "internal/enumerator.h"
+#include "internal/error.h"
+#include "internal/hash.h"
+#include "internal/imemo.h"
+#include "internal/numeric.h"
+#include "internal/range.h"
+#include "internal/rational.h"
+#include "ruby/ruby.h"
+
/*
* Document-class: Enumerator
*
@@ -63,6 +73,8 @@
* puts %w[foo bar baz].map.with_index { |w, i| "#{i}:#{w}" }
* # => ["0:foo", "1:bar", "2:baz"]
*
+ * == External Iteration
+ *
* An Enumerator can also be used as an external iterator.
* For example, Enumerator#next returns the next value of the iterator
* or raises StopIteration if the Enumerator is at the end.
@@ -73,7 +85,44 @@
* puts e.next # => 3
* puts e.next # raises StopIteration
*
- * You can use this to implement an internal iterator as follows:
+ * +next+, +next_values+, +peek+ and +peek_values+ are the only methods
+ * which use external iteration (and Array#zip(Enumerable-not-Array) which uses +next+).
+ *
+ * These methods do not affect other internal enumeration methods,
+ * unless the underlying iteration method itself has side-effect, e.g. IO#each_line.
+ *
+ * External iteration differs *significantly* from internal iteration
+ * due to using a Fiber:
+ * - The Fiber adds some overhead compared to internal enumeration.
+ * - The stacktrace will only include the stack from the Enumerator, not above.
+ * - Fiber-local variables are *not* inherited inside the Enumerator Fiber,
+ * which instead starts with no Fiber-local variables.
+ * - Fiber storage variables *are* inherited and are designed
+ * to handle Enumerator Fibers. Assigning to a Fiber storage variable
+ * only affects the current Fiber, so if you want to change state
+ * in the caller Fiber of the Enumerator Fiber, you need to use an
+ * extra indirection (e.g., use some object in the Fiber storage
+ * variable and mutate some ivar of it).
+ *
+ * Concretely:
+ * Thread.current[:fiber_local] = 1
+ * Fiber[:storage_var] = 1
+ * e = Enumerator.new do |y|
+ * p Thread.current[:fiber_local] # for external iteration: nil, for internal iteration: 1
+ * p Fiber[:storage_var] # => 1, inherited
+ * Fiber[:storage_var] += 1
+ * y << 42
+ * end
+ *
+ * p e.next # => 42
+ * p Fiber[:storage_var] # => 1 (it ran in a different Fiber)
+ *
+ * e.each { p _1 }
+ * p Fiber[:storage_var] # => 2 (it ran in the same Fiber/"stack" as the current Fiber)
+ *
+ * == Convert External Iteration to Internal Iteration
+ *
+ * You can use an external iterator to implement an internal iterator as follows:
*
* def ext_each(e)
* while true
@@ -108,14 +157,17 @@
*/
VALUE rb_cEnumerator;
static VALUE rb_cLazy;
-static ID id_rewind, id_new, id_to_enum;
+static ID id_rewind, id_new, id_to_enum, id_each_entry;
static ID id_next, id_result, id_receiver, id_arguments, id_memo, id_method, id_force;
static ID id_begin, id_end, id_step, id_exclude_end;
static VALUE sym_each, sym_cycle, sym_yield;
static VALUE lazy_use_super_method;
+extern ID ruby_static_id_cause;
+
#define id_call idCall
+#define id_cause ruby_static_id_cause
#define id_each idEach
#define id_eqq idEqq
#define id_initialize idInitialize
@@ -156,9 +208,11 @@ struct producer {
typedef struct MEMO *lazyenum_proc_func(VALUE, struct MEMO *, VALUE, long);
typedef VALUE lazyenum_size_func(VALUE, VALUE);
+typedef int lazyenum_precheck_func(VALUE proc_entry);
typedef struct {
lazyenum_proc_func *proc;
lazyenum_size_func *size;
+ lazyenum_precheck_func *precheck;
} lazyenum_funcs;
struct proc_entry {
@@ -177,6 +231,12 @@ struct enum_chain {
long pos;
};
+static VALUE rb_cEnumProduct;
+
+struct enum_product {
+ VALUE enums;
+};
+
VALUE rb_cArithSeq;
/*
@@ -223,9 +283,9 @@ enumerator_memsize(const void *p)
static const rb_data_type_t enumerator_data_type = {
"enumerator",
{
- enumerator_mark,
- enumerator_free,
- enumerator_memsize,
+ enumerator_mark,
+ enumerator_free,
+ enumerator_memsize,
enumerator_compact,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
@@ -237,8 +297,8 @@ enumerator_ptr(VALUE obj)
struct enumerator *ptr;
TypedData_Get_Struct(obj, struct enumerator, &enumerator_data_type, ptr);
- if (!ptr || ptr->obj == Qundef) {
- rb_raise(rb_eArgError, "uninitialized enumerator");
+ if (!ptr || UNDEF_P(ptr->obj)) {
+ rb_raise(rb_eArgError, "uninitialized enumerator");
}
return ptr;
}
@@ -270,9 +330,9 @@ proc_entry_memsize(const void *p)
static const rb_data_type_t proc_entry_data_type = {
"proc_entry",
{
- proc_entry_mark,
- proc_entry_free,
- proc_entry_memsize,
+ proc_entry_mark,
+ proc_entry_free,
+ proc_entry_memsize,
proc_entry_compact,
},
};
@@ -354,12 +414,12 @@ obj_to_enum(int argc, VALUE *argv, VALUE obj)
VALUE enumerator, meth = sym_each;
if (argc > 0) {
- --argc;
- meth = *argv++;
+ --argc;
+ meth = *argv++;
}
enumerator = rb_enumeratorize_with_size(obj, meth, argc, argv, 0);
if (rb_block_given_p()) {
- enumerator_ptr(enumerator)->size = rb_block_proc();
+ enumerator_ptr(enumerator)->size = rb_block_proc();
}
return enumerator;
}
@@ -376,8 +436,6 @@ enumerator_allocate(VALUE klass)
return enum_obj;
}
-#define PASS_KW_SPLAT (rb_empty_keyword_given_p() ? RB_PASS_EMPTY_KEYWORDS : rb_keyword_given_p())
-
static VALUE
enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, VALUE size, int kw_splat)
{
@@ -387,7 +445,7 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, const VALUE *ar
TypedData_Get_Struct(enum_obj, struct enumerator, &enumerator_data_type, ptr);
if (!ptr) {
- rb_raise(rb_eArgError, "unallocated enumerator");
+ rb_raise(rb_eArgError, "unallocated enumerator");
}
ptr->obj = obj;
@@ -405,15 +463,31 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, const VALUE *ar
return enum_obj;
}
+static VALUE
+convert_to_feasible_size_value(VALUE obj)
+{
+ if (NIL_P(obj)) {
+ return obj;
+ }
+ else if (rb_respond_to(obj, id_call)) {
+ return obj;
+ }
+ else if (RB_FLOAT_TYPE_P(obj) && RFLOAT_VALUE(obj) == HUGE_VAL) {
+ return obj;
+ }
+ else {
+ return rb_to_int(obj);
+ }
+}
+
/*
* call-seq:
* Enumerator.new(size = nil) { |yielder| ... }
- * Enumerator.new(obj, method = :each, *args)
*
* Creates a new Enumerator object, which can be used as an
* Enumerable.
*
- * In the first form, iteration is defined by the given block, in
+ * Iteration is defined by the given block, in
* which a "yielder" object, given as block parameter, can be used to
* yield a value by calling the +yield+ method (aliased as <code><<</code>):
*
@@ -430,52 +504,16 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, const VALUE *ar
* The optional parameter can be used to specify how to calculate the size
* in a lazy fashion (see Enumerator#size). It can either be a value or
* a callable object.
- *
- * In the deprecated second form, a generated Enumerator iterates over the
- * given object using the given method with the given arguments passed.
- *
- * Use of this form is discouraged. Use Object#enum_for or Object#to_enum
- * instead.
- *
- * e = Enumerator.new(ObjectSpace, :each_object)
- * #-> ObjectSpace.enum_for(:each_object)
- *
- * e.select { |obj| obj.is_a?(Class) } # => array of all classes
- *
*/
static VALUE
enumerator_initialize(int argc, VALUE *argv, VALUE obj)
{
- VALUE recv, meth = sym_each;
- VALUE size = Qnil;
- int kw_splat = 0;
+ VALUE iter = rb_block_proc();
+ VALUE recv = generator_init(generator_allocate(rb_cGenerator), iter);
+ VALUE arg0 = rb_check_arity(argc, 0, 1) ? argv[0] : Qnil;
+ VALUE size = convert_to_feasible_size_value(arg0);
- if (rb_block_given_p()) {
- rb_check_arity(argc, 0, 1);
- recv = generator_init(generator_allocate(rb_cGenerator), rb_block_proc());
- if (argc) {
- if (NIL_P(argv[0]) || rb_respond_to(argv[0], id_call) ||
- (RB_TYPE_P(argv[0], T_FLOAT) && RFLOAT_VALUE(argv[0]) == HUGE_VAL)) {
- size = argv[0];
- }
- else {
- size = rb_to_int(argv[0]);
- }
- argc = 0;
- }
- }
- else {
- rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
- rb_warn_deprecated("Enumerator.new without a block", "Object#to_enum");
- recv = *argv++;
- if (--argc) {
- meth = *argv++;
- --argc;
- }
- kw_splat = PASS_KW_SPLAT;
- }
-
- return enumerator_init(obj, recv, meth, argc, argv, 0, size, kw_splat);
+ return enumerator_init(obj, recv, sym_each, 0, 0, 0, size, false);
}
/* :nodoc: */
@@ -487,14 +525,14 @@ enumerator_init_copy(VALUE obj, VALUE orig)
if (!OBJ_INIT_COPY(obj, orig)) return obj;
ptr0 = enumerator_ptr(orig);
if (ptr0->fib) {
- /* Fibers cannot be copied */
- rb_raise(rb_eTypeError, "can't copy execution context");
+ /* Fibers cannot be copied */
+ rb_raise(rb_eTypeError, "can't copy execution context");
}
TypedData_Get_Struct(obj, struct enumerator, &enumerator_data_type, ptr1);
if (!ptr1) {
- rb_raise(rb_eArgError, "unallocated enumerator");
+ rb_raise(rb_eArgError, "unallocated enumerator");
}
ptr1->obj = ptr0->obj;
@@ -518,31 +556,29 @@ rb_enumeratorize(VALUE obj, VALUE meth, int argc, const VALUE *argv)
return rb_enumeratorize_with_size(obj, meth, argc, argv, 0);
}
-static VALUE
-lazy_to_enum_i(VALUE self, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, int kw_splat);
+static VALUE lazy_to_enum_i(VALUE self, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, int kw_splat);
+static int lazy_precheck(VALUE procs);
VALUE
-rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn)
+rb_enumeratorize_with_size_kw(VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, int kw_splat)
{
- /* Similar effect as calling obj.to_enum, i.e. dispatching to either
- Kernel#to_enum vs Lazy#to_enum */
- if (RTEST(rb_obj_is_kind_of(obj, rb_cLazy)))
- return lazy_to_enum_i(obj, meth, argc, argv, size_fn, PASS_KW_SPLAT);
- else
- return enumerator_init(enumerator_allocate(rb_cEnumerator),
- obj, meth, argc, argv, size_fn, Qnil, PASS_KW_SPLAT);
+ VALUE base_class = rb_cEnumerator;
+
+ if (RTEST(rb_obj_is_kind_of(obj, rb_cLazy))) {
+ base_class = rb_cLazy;
+ }
+ else if (RTEST(rb_obj_is_kind_of(obj, rb_cEnumChain))) {
+ obj = enumerator_init(enumerator_allocate(rb_cEnumerator), obj, sym_each, 0, 0, 0, Qnil, false);
+ }
+
+ return enumerator_init(enumerator_allocate(base_class),
+ obj, meth, argc, argv, size_fn, Qnil, kw_splat);
}
VALUE
-rb_enumeratorize_with_size_kw(VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn, int kw_splat)
+rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *size_fn)
{
- /* Similar effect as calling obj.to_enum, i.e. dispatching to either
- Kernel#to_enum vs Lazy#to_enum */
- if (RTEST(rb_obj_is_kind_of(obj, rb_cLazy)))
- return lazy_to_enum_i(obj, meth, argc, argv, size_fn, kw_splat);
- else
- return enumerator_init(enumerator_allocate(rb_cEnumerator),
- obj, meth, argc, argv, size_fn, Qnil, kw_splat);
+ return rb_enumeratorize_with_size_kw(obj, meth, argc, argv, size_fn, rb_keyword_given_p());
}
static VALUE
@@ -554,8 +590,8 @@ enumerator_block_call(VALUE obj, rb_block_call_func *func, VALUE arg)
ID meth = e->meth;
if (e->args) {
- argc = RARRAY_LENINT(e->args);
- argv = RARRAY_CONST_PTR(e->args);
+ argc = RARRAY_LENINT(e->args);
+ argv = RARRAY_CONST_PTR(e->args);
}
return rb_block_call_kw(e->obj, meth, argc, argv, func, arg, e->kw_splat);
}
@@ -599,25 +635,29 @@ enumerator_block_call(VALUE obj, rb_block_call_func *func, VALUE arg)
static VALUE
enumerator_each(int argc, VALUE *argv, VALUE obj)
{
+ struct enumerator *e = enumerator_ptr(obj);
+
if (argc > 0) {
- struct enumerator *e = enumerator_ptr(obj = rb_obj_dup(obj));
- VALUE args = e->args;
- if (args) {
+ VALUE args = (e = enumerator_ptr(obj = rb_obj_dup(obj)))->args;
+ if (args) {
#if SIZEOF_INT < SIZEOF_LONG
- /* check int range overflow */
- rb_long2int(RARRAY_LEN(args) + argc);
+ /* check int range overflow */
+ rb_long2int(RARRAY_LEN(args) + argc);
#endif
- args = rb_ary_dup(args);
- rb_ary_cat(args, argv, argc);
- }
- else {
- args = rb_ary_new4(argc, argv);
- }
- e->args = args;
+ args = rb_ary_dup(args);
+ rb_ary_cat(args, argv, argc);
+ }
+ else {
+ args = rb_ary_new4(argc, argv);
+ }
+ e->args = args;
e->size = Qnil;
e->size_fn = 0;
}
if (!rb_block_given_p()) return obj;
+
+ if (!lazy_precheck(e->procs)) return Qnil;
+
return enumerator_block_call(obj, 0, obj);
}
@@ -629,7 +669,7 @@ enumerator_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
MEMO_V1_SET(memo, rb_int_succ(idx));
if (argc <= 1)
- return rb_yield_values(2, val, idx);
+ return rb_yield_values(2, val, idx);
return rb_yield_values(2, rb_ary_new4(argc, argv), idx);
}
@@ -686,7 +726,7 @@ static VALUE
enumerator_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memo))
{
if (argc <= 1)
- return rb_yield_values(2, val, memo);
+ return rb_yield_values(2, val, memo);
return rb_yield_values(2, rb_ary_new4(argc, argv), memo);
}
@@ -716,9 +756,9 @@ enumerator_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memo))
* puts "#{string}: #{x}"
* end
*
- * # => foo:0
- * # => foo:1
- * # => foo:2
+ * # => foo: 0
+ * # => foo: 1
+ * # => foo: 2
*/
static VALUE
enumerator_with_object(VALUE obj, VALUE memo)
@@ -736,7 +776,7 @@ next_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, obj))
VALUE feedvalue = Qnil;
VALUE args = rb_ary_new4(argc, argv);
rb_fiber_yield(1, &args);
- if (e->feedvalue != Qundef) {
+ if (!UNDEF_P(e->feedvalue)) {
feedvalue = e->feedvalue;
e->feedvalue = Qundef;
}
@@ -770,22 +810,30 @@ get_next_values(VALUE obj, struct enumerator *e)
{
VALUE curr, vs;
- if (e->stop_exc)
- rb_exc_raise(e->stop_exc);
+ if (e->stop_exc) {
+ VALUE exc = e->stop_exc;
+ VALUE result = rb_attr_get(exc, id_result);
+ VALUE mesg = rb_attr_get(exc, idMesg);
+ if (!NIL_P(mesg)) mesg = rb_str_dup(mesg);
+ VALUE stop_exc = rb_exc_new_str(rb_eStopIteration, mesg);
+ rb_ivar_set(stop_exc, id_cause, exc);
+ rb_ivar_set(stop_exc, id_result, result);
+ rb_exc_raise(stop_exc);
+ }
curr = rb_fiber_current();
if (!e->fib || !rb_fiber_alive_p(e->fib)) {
- next_init(obj, e);
+ next_init(obj, e);
}
vs = rb_fiber_resume(e->fib, 1, &curr);
if (e->stop_exc) {
- e->fib = 0;
- e->dst = Qnil;
- e->lookahead = Qundef;
- e->feedvalue = Qundef;
- rb_exc_raise(e->stop_exc);
+ e->fib = 0;
+ e->dst = Qnil;
+ e->lookahead = Qundef;
+ e->feedvalue = Qundef;
+ rb_exc_raise(e->stop_exc);
}
return vs;
}
@@ -798,6 +846,8 @@ get_next_values(VALUE obj, struct enumerator *e)
* internal position forward. When the position reached at the end,
* StopIteration is raised.
*
+ * See class-level notes about external iterators.
+ *
* This method can be used to distinguish <code>yield</code> and <code>yield
* nil</code>.
*
@@ -831,10 +881,6 @@ get_next_values(VALUE obj, struct enumerator *e)
* # yield nil [nil] nil
* # yield [1, 2] [[1, 2]] [1, 2]
*
- * Note that +next_values+ does not affect other non-external enumeration
- * methods unless underlying iteration method itself has side-effect, e.g.
- * IO#each_line.
- *
*/
static VALUE
@@ -843,7 +889,7 @@ enumerator_next_values(VALUE obj)
struct enumerator *e = enumerator_ptr(obj);
VALUE vs;
- if (e->lookahead != Qundef) {
+ if (!UNDEF_P(e->lookahead)) {
vs = e->lookahead;
e->lookahead = Qundef;
return vs;
@@ -888,9 +934,7 @@ ary2sv(VALUE args, int dup)
* p e.next #=> 3
* p e.next #raises StopIteration
*
- * Note that enumeration sequence by +next+ does not affect other non-external
- * enumeration methods, unless the underlying iteration methods itself has
- * side-effect, e.g. IO#each_line.
+ * See class-level notes about external iterators.
*
*/
@@ -906,7 +950,7 @@ enumerator_peek_values(VALUE obj)
{
struct enumerator *e = enumerator_ptr(obj);
- if (e->lookahead == Qundef) {
+ if (UNDEF_P(e->lookahead)) {
e->lookahead = get_next_values(obj, e);
}
return e->lookahead;
@@ -920,6 +964,8 @@ enumerator_peek_values(VALUE obj)
* doesn't move the internal position forward. If the position is already at
* the end, StopIteration is raised.
*
+ * See class-level notes about external iterators.
+ *
* === Example
*
* o = Object.new
@@ -954,6 +1000,8 @@ enumerator_peek_values_m(VALUE obj)
* position forward. If the position is already at the end, StopIteration
* is raised.
*
+ * See class-level notes about external iterators.
+ *
* === Example
*
* a = [1,2,3]
@@ -1026,8 +1074,8 @@ enumerator_feed(VALUE obj, VALUE v)
{
struct enumerator *e = enumerator_ptr(obj);
- if (e->feedvalue != Qundef) {
- rb_raise(rb_eTypeError, "feed value already set");
+ if (!UNDEF_P(e->feedvalue)) {
+ rb_raise(rb_eTypeError, "feed value already set");
}
e->feedvalue = v;
@@ -1071,37 +1119,37 @@ inspect_enumerator(VALUE obj, VALUE dummy, int recur)
cname = rb_obj_class(obj);
- if (!e || e->obj == Qundef) {
- return rb_sprintf("#<%"PRIsVALUE": uninitialized>", rb_class_path(cname));
+ if (!e || UNDEF_P(e->obj)) {
+ return rb_sprintf("#<%"PRIsVALUE": uninitialized>", rb_class_path(cname));
}
if (recur) {
- str = rb_sprintf("#<%"PRIsVALUE": ...>", rb_class_path(cname));
- return str;
+ str = rb_sprintf("#<%"PRIsVALUE": ...>", rb_class_path(cname));
+ return str;
}
if (e->procs) {
- long i;
-
- eobj = generator_ptr(e->obj)->obj;
- /* In case procs chained enumerator traversing all proc entries manually */
- if (rb_obj_class(eobj) == cname) {
- str = rb_inspect(eobj);
- }
- else {
- str = rb_sprintf("#<%"PRIsVALUE": %+"PRIsVALUE">", rb_class_path(cname), eobj);
- }
- for (i = 0; i < RARRAY_LEN(e->procs); i++) {
- str = rb_sprintf("#<%"PRIsVALUE": %"PRIsVALUE, cname, str);
- append_method(RARRAY_AREF(e->procs, i), str, e->meth, e->args);
- rb_str_buf_cat2(str, ">");
- }
- return str;
+ long i;
+
+ eobj = generator_ptr(e->obj)->obj;
+ /* In case procs chained enumerator traversing all proc entries manually */
+ if (rb_obj_class(eobj) == cname) {
+ str = rb_inspect(eobj);
+ }
+ else {
+ str = rb_sprintf("#<%"PRIsVALUE": %+"PRIsVALUE">", rb_class_path(cname), eobj);
+ }
+ for (i = 0; i < RARRAY_LEN(e->procs); i++) {
+ str = rb_sprintf("#<%"PRIsVALUE": %"PRIsVALUE, cname, str);
+ append_method(RARRAY_AREF(e->procs, i), str, e->meth, e->args);
+ rb_str_buf_cat2(str, ">");
+ }
+ return str;
}
eobj = rb_attr_get(obj, id_receiver);
if (NIL_P(eobj)) {
- eobj = e->obj;
+ eobj = e->obj;
}
/* (1..100).each_cons(2) => "#<Enumerator: 1..100:each_cons(2)>" */
@@ -1136,48 +1184,48 @@ append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args)
method = rb_attr_get(obj, id_method);
if (method != Qfalse) {
- if (!NIL_P(method)) {
- Check_Type(method, T_SYMBOL);
- method = rb_sym2str(method);
- }
- else {
- method = rb_id2str(default_method);
- }
- rb_str_buf_cat2(str, ":");
- rb_str_buf_append(str, method);
+ if (!NIL_P(method)) {
+ Check_Type(method, T_SYMBOL);
+ method = rb_sym2str(method);
+ }
+ else {
+ method = rb_id2str(default_method);
+ }
+ rb_str_buf_cat2(str, ":");
+ rb_str_buf_append(str, method);
}
eargs = rb_attr_get(obj, id_arguments);
if (NIL_P(eargs)) {
- eargs = default_args;
+ eargs = default_args;
}
if (eargs != Qfalse) {
- long argc = RARRAY_LEN(eargs);
- const VALUE *argv = RARRAY_CONST_PTR(eargs); /* WB: no new reference */
+ long argc = RARRAY_LEN(eargs);
+ const VALUE *argv = RARRAY_CONST_PTR(eargs); /* WB: no new reference */
- if (argc > 0) {
- VALUE kwds = Qnil;
+ if (argc > 0) {
+ VALUE kwds = Qnil;
- rb_str_buf_cat2(str, "(");
+ rb_str_buf_cat2(str, "(");
if (RB_TYPE_P(argv[argc-1], T_HASH) && !RHASH_EMPTY_P(argv[argc-1])) {
- int all_key = TRUE;
- rb_hash_foreach(argv[argc-1], key_symbol_p, (VALUE)&all_key);
- if (all_key) kwds = argv[--argc];
- }
+ int all_key = TRUE;
+ rb_hash_foreach(argv[argc-1], key_symbol_p, (VALUE)&all_key);
+ if (all_key) kwds = argv[--argc];
+ }
- while (argc--) {
- VALUE arg = *argv++;
+ while (argc--) {
+ VALUE arg = *argv++;
- rb_str_append(str, rb_inspect(arg));
- rb_str_buf_cat2(str, ", ");
- }
- if (!NIL_P(kwds)) {
- rb_hash_foreach(kwds, kwd_append, str);
- }
- rb_str_set_len(str, RSTRING_LEN(str)-2);
- rb_str_buf_cat2(str, ")");
- }
+ rb_str_append(str, rb_inspect(arg));
+ rb_str_buf_cat2(str, ", ");
+ }
+ if (!NIL_P(kwds)) {
+ rb_hash_foreach(kwds, kwd_append, str);
+ }
+ rb_str_set_len(str, RSTRING_LEN(str)-2);
+ rb_str_buf_cat2(str, ")");
+ }
}
return str;
@@ -1216,31 +1264,31 @@ enumerator_size(VALUE obj)
VALUE size;
if (e->procs) {
- struct generator *g = generator_ptr(e->obj);
- VALUE receiver = rb_check_funcall(g->obj, id_size, 0, 0);
- long i = 0;
-
- for (i = 0; i < RARRAY_LEN(e->procs); i++) {
- VALUE proc = RARRAY_AREF(e->procs, i);
- struct proc_entry *entry = proc_entry_ptr(proc);
- lazyenum_size_func *size_fn = entry->fn->size;
- if (!size_fn) {
- return Qnil;
- }
- receiver = (*size_fn)(proc, receiver);
- }
- return receiver;
+ struct generator *g = generator_ptr(e->obj);
+ VALUE receiver = rb_check_funcall(g->obj, id_size, 0, 0);
+ long i = 0;
+
+ for (i = 0; i < RARRAY_LEN(e->procs); i++) {
+ VALUE proc = RARRAY_AREF(e->procs, i);
+ struct proc_entry *entry = proc_entry_ptr(proc);
+ lazyenum_size_func *size_fn = entry->fn->size;
+ if (!size_fn) {
+ return Qnil;
+ }
+ receiver = (*size_fn)(proc, receiver);
+ }
+ return receiver;
}
if (e->size_fn) {
- return (*e->size_fn)(e->obj, e->args, obj);
+ return (*e->size_fn)(e->obj, e->args, obj);
}
if (e->args) {
- argc = (int)RARRAY_LEN(e->args);
- argv = RARRAY_CONST_PTR(e->args);
+ argc = (int)RARRAY_LEN(e->args);
+ argv = RARRAY_CONST_PTR(e->args);
}
size = rb_check_funcall_kw(e->size, id_call, argc, argv, e->kw_splat);
- if (size != Qundef) return size;
+ if (!UNDEF_P(size)) return size;
return e->size;
}
@@ -1272,9 +1320,9 @@ yielder_memsize(const void *p)
static const rb_data_type_t yielder_data_type = {
"yielder",
{
- yielder_mark,
- yielder_free,
- yielder_memsize,
+ yielder_mark,
+ yielder_free,
+ yielder_memsize,
yielder_compact,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
@@ -1286,8 +1334,8 @@ yielder_ptr(VALUE obj)
struct yielder *ptr;
TypedData_Get_Struct(obj, struct yielder, &yielder_data_type, ptr);
- if (!ptr || ptr->proc == Qundef) {
- rb_raise(rb_eArgError, "uninitialized yielder");
+ if (!ptr || UNDEF_P(ptr->proc)) {
+ rb_raise(rb_eArgError, "uninitialized yielder");
}
return ptr;
}
@@ -1313,7 +1361,7 @@ yielder_init(VALUE obj, VALUE proc)
TypedData_Get_Struct(obj, struct yielder, &yielder_data_type, ptr);
if (!ptr) {
- rb_raise(rb_eArgError, "unallocated yielder");
+ rb_raise(rb_eArgError, "unallocated yielder");
}
ptr->proc = proc;
@@ -1351,7 +1399,7 @@ yielder_yield_push(VALUE obj, VALUE arg)
}
/*
- * Returns a Proc object that takes an argument and yields it.
+ * Returns a Proc object that takes arguments and yields them.
*
* This method is implemented so that a Yielder object can be directly
* passed to another method as a block argument.
@@ -1412,9 +1460,9 @@ generator_memsize(const void *p)
static const rb_data_type_t generator_data_type = {
"generator",
{
- generator_mark,
- generator_free,
- generator_memsize,
+ generator_mark,
+ generator_free,
+ generator_memsize,
generator_compact,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
@@ -1426,8 +1474,8 @@ generator_ptr(VALUE obj)
struct generator *ptr;
TypedData_Get_Struct(obj, struct generator, &generator_data_type, ptr);
- if (!ptr || ptr->proc == Qundef) {
- rb_raise(rb_eArgError, "uninitialized generator");
+ if (!ptr || UNDEF_P(ptr->proc)) {
+ rb_raise(rb_eArgError, "uninitialized generator");
}
return ptr;
}
@@ -1454,7 +1502,7 @@ generator_init(VALUE obj, VALUE proc)
TypedData_Get_Struct(obj, struct generator, &generator_data_type, ptr);
if (!ptr) {
- rb_raise(rb_eArgError, "unallocated generator");
+ rb_raise(rb_eArgError, "unallocated generator");
}
ptr->proc = proc;
@@ -1469,21 +1517,21 @@ generator_initialize(int argc, VALUE *argv, VALUE obj)
VALUE proc;
if (argc == 0) {
- rb_need_block();
+ rb_need_block();
- proc = rb_block_proc();
+ proc = rb_block_proc();
}
else {
- rb_scan_args(argc, argv, "1", &proc);
+ rb_scan_args(argc, argv, "1", &proc);
- if (!rb_obj_is_proc(proc))
- rb_raise(rb_eTypeError,
- "wrong argument type %"PRIsVALUE" (expected Proc)",
- rb_obj_class(proc));
+ if (!rb_obj_is_proc(proc))
+ rb_raise(rb_eTypeError,
+ "wrong argument type %"PRIsVALUE" (expected Proc)",
+ rb_obj_class(proc));
- if (rb_block_given_p()) {
- rb_warn("given block not used");
- }
+ if (rb_block_given_p()) {
+ rb_warn("given block not used");
+ }
}
return generator_init(obj, proc);
@@ -1502,7 +1550,7 @@ generator_init_copy(VALUE obj, VALUE orig)
TypedData_Get_Struct(obj, struct generator, &generator_data_type, ptr1);
if (!ptr1) {
- rb_raise(rb_eArgError, "unallocated generator");
+ rb_raise(rb_eArgError, "unallocated generator");
}
ptr1->proc = ptr0->proc;
@@ -1519,7 +1567,7 @@ generator_each(int argc, VALUE *argv, VALUE obj)
rb_ary_push(args, yielder_new());
if (argc > 0) {
- rb_ary_cat(args, argv, argc);
+ rb_ary_cat(args, argv, argc);
}
return rb_proc_call_kw(ptr->proc, args, RB_PASS_CALLED_KEYWORDS);
@@ -1530,7 +1578,7 @@ static VALUE
enum_size(VALUE self)
{
VALUE r = rb_check_funcall(self, id_size, 0, 0);
- return (r == Qundef) ? Qnil : r;
+ return UNDEF_P(r) ? Qnil : r;
}
static VALUE
@@ -1539,41 +1587,31 @@ lazyenum_size(VALUE self, VALUE args, VALUE eobj)
return enum_size(self);
}
-static VALUE
-lazy_size(VALUE self)
-{
- return enum_size(rb_ivar_get(self, id_receiver));
-}
-
-static VALUE
-lazy_receiver_size(VALUE generator, VALUE args, VALUE lazy)
-{
- return lazy_size(lazy);
-}
+#define lazy_receiver_size lazy_map_size
static VALUE
lazy_init_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
{
VALUE result;
if (argc == 1) {
- VALUE args[2];
- args[0] = m;
- args[1] = val;
- result = rb_yield_values2(2, args);
+ VALUE args[2];
+ args[0] = m;
+ args[1] = val;
+ result = rb_yield_values2(2, args);
}
else {
- VALUE args;
- int len = rb_long2int((long)argc + 1);
- VALUE *nargv = ALLOCV_N(VALUE, args, len);
-
- nargv[0] = m;
- if (argc > 0) {
- MEMCPY(nargv + 1, argv, VALUE, argc);
- }
- result = rb_yield_values2(len, nargv);
- ALLOCV_END(args);
- }
- if (result == Qundef) rb_iter_break();
+ VALUE args;
+ int len = rb_long2int((long)argc + 1);
+ VALUE *nargv = ALLOCV_N(VALUE, args, len);
+
+ nargv[0] = m;
+ if (argc > 0) {
+ MEMCPY(nargv + 1, argv, VALUE, argc);
+ }
+ result = rb_yield_values2(len, nargv);
+ ALLOCV_END(args);
+ }
+ if (UNDEF_P(result)) rb_iter_break();
return Qnil;
}
@@ -1591,37 +1629,60 @@ lazy_init_block_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
#define LAZY_MEMO_BREAK_P(memo) ((memo)->memo_flags & LAZY_MEMO_BREAK)
#define LAZY_MEMO_PACKED_P(memo) ((memo)->memo_flags & LAZY_MEMO_PACKED)
#define LAZY_MEMO_SET_BREAK(memo) ((memo)->memo_flags |= LAZY_MEMO_BREAK)
+#define LAZY_MEMO_RESET_BREAK(memo) ((memo)->memo_flags &= ~LAZY_MEMO_BREAK)
#define LAZY_MEMO_SET_VALUE(memo, value) MEMO_V2_SET(memo, value)
#define LAZY_MEMO_SET_PACKED(memo) ((memo)->memo_flags |= LAZY_MEMO_PACKED)
#define LAZY_MEMO_RESET_PACKED(memo) ((memo)->memo_flags &= ~LAZY_MEMO_PACKED)
+static VALUE lazy_yielder_result(struct MEMO *result, VALUE yielder, VALUE procs_array, VALUE memos, long i);
+
static VALUE
lazy_init_yielder(RB_BLOCK_CALL_FUNC_ARGLIST(_, m))
{
VALUE yielder = RARRAY_AREF(m, 0);
VALUE procs_array = RARRAY_AREF(m, 1);
VALUE memos = rb_attr_get(yielder, id_memo);
- long i = 0;
struct MEMO *result;
- int cont = 1;
- result = MEMO_NEW(Qnil, rb_enum_values_pack(argc, argv),
- argc > 1 ? LAZY_MEMO_PACKED : 0);
+ result = MEMO_NEW(m, rb_enum_values_pack(argc, argv),
+ argc > 1 ? LAZY_MEMO_PACKED : 0);
+ return lazy_yielder_result(result, yielder, procs_array, memos, 0);
+}
+
+static VALUE
+lazy_yielder_yield(struct MEMO *result, long memo_index, int argc, const VALUE *argv)
+{
+ VALUE m = result->v1;
+ VALUE yielder = RARRAY_AREF(m, 0);
+ VALUE procs_array = RARRAY_AREF(m, 1);
+ VALUE memos = rb_attr_get(yielder, id_memo);
+ LAZY_MEMO_SET_VALUE(result, rb_enum_values_pack(argc, argv));
+ if (argc > 1)
+ LAZY_MEMO_SET_PACKED(result);
+ else
+ LAZY_MEMO_RESET_PACKED(result);
+ return lazy_yielder_result(result, yielder, procs_array, memos, memo_index);
+}
+
+static VALUE
+lazy_yielder_result(struct MEMO *result, VALUE yielder, VALUE procs_array, VALUE memos, long i)
+{
+ int cont = 1;
- for (i = 0; i < RARRAY_LEN(procs_array); i++) {
- VALUE proc = RARRAY_AREF(procs_array, i);
- struct proc_entry *entry = proc_entry_ptr(proc);
- if (!(*entry->fn->proc)(proc, result, memos, i)) {
- cont = 0;
- break;
- }
+ for (; i < RARRAY_LEN(procs_array); i++) {
+ VALUE proc = RARRAY_AREF(procs_array, i);
+ struct proc_entry *entry = proc_entry_ptr(proc);
+ if (!(*entry->fn->proc)(proc, result, memos, i)) {
+ cont = 0;
+ break;
+ }
}
if (cont) {
- rb_funcall2(yielder, idLTLT, 1, &(result->memo_value));
+ rb_funcall2(yielder, idLTLT, 1, &(result->memo_value));
}
if (LAZY_MEMO_BREAK_P(result)) {
- rb_iter_break();
+ rb_iter_break();
}
return result->memo_value;
}
@@ -1633,7 +1694,7 @@ lazy_init_block(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
rb_ivar_set(val, id_memo, rb_ary_new2(RARRAY_LEN(procs)));
rb_block_call(RARRAY_AREF(m, 0), id_each, 0, 0,
- lazy_init_yielder, rb_ary_new3(2, val, procs));
+ lazy_init_yielder, rb_ary_new3(2, val, procs));
return Qnil;
}
@@ -1646,17 +1707,17 @@ lazy_generator_init(VALUE enumerator, VALUE procs)
struct enumerator *e = enumerator_ptr(enumerator);
if (RARRAY_LEN(procs) > 0) {
- struct generator *old_gen_ptr = generator_ptr(e->obj);
- obj = old_gen_ptr->obj;
+ struct generator *old_gen_ptr = generator_ptr(e->obj);
+ obj = old_gen_ptr->obj;
}
else {
- obj = enumerator;
+ obj = enumerator;
}
generator = generator_allocate(rb_cGenerator);
rb_block_call(generator, id_initialize, 0, 0,
- lazy_init_block, rb_ary_new3(2, obj, procs));
+ lazy_init_block, rb_ary_new3(2, obj, procs));
gen_ptr = generator_ptr(generator);
gen_ptr->obj = obj;
@@ -1664,6 +1725,22 @@ lazy_generator_init(VALUE enumerator, VALUE procs)
return generator;
}
+static int
+lazy_precheck(VALUE procs)
+{
+ if (RTEST(procs)) {
+ long num_procs = RARRAY_LEN(procs), i = num_procs;
+ while (i-- > 0) {
+ VALUE proc = RARRAY_AREF(procs, i);
+ struct proc_entry *entry = proc_entry_ptr(proc);
+ lazyenum_precheck_func *precheck = entry->fn->precheck;
+ if (precheck && !precheck(proc)) return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
/*
* Document-class: Enumerator::Lazy
*
@@ -1703,13 +1780,13 @@ lazy_generator_init(VALUE enumerator, VALUE procs)
*
* # This will fetch all URLs before selecting
* # necessary data
- * URLS.map { |u| JSON.parse(open(u).read) }
+ * URLS.map { |u| JSON.parse(URI.open(u).read) }
* .select { |data| data.key?('stats') }
* .first(5)
*
* # This will fetch URLs one-by-one, only till
* # there is enough data to satisfy the condition
- * URLS.lazy.map { |u| JSON.parse(open(u).read) }
+ * URLS.lazy.map { |u| JSON.parse(URI.open(u).read) }
* .select { |data| data.key?('stats') }
* .first(5)
*
@@ -1761,11 +1838,11 @@ lazy_initialize(int argc, VALUE *argv, VALUE self)
rb_check_arity(argc, 1, 2);
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy new without a block");
+ rb_raise(rb_eArgError, "tried to call lazy new without a block");
}
obj = argv[0];
if (argc > 1) {
- size = argv[1];
+ size = argv[1];
}
generator = generator_allocate(rb_cGenerator);
rb_block_call(generator, id_initialize, 0, 0, lazy_init_block_i, obj);
@@ -1784,7 +1861,8 @@ lazy_initialize(int argc, VALUE *argv, VALUE self)
* Expands +lazy+ enumerator to an array.
* See Enumerable#to_a.
*/
-static VALUE lazy_to_a(VALUE self)
+static VALUE
+lazy_to_a(VALUE self)
{
}
#endif
@@ -1795,14 +1873,15 @@ lazy_set_args(VALUE lazy, VALUE args)
ID id = rb_frame_this_func();
rb_ivar_set(lazy, id_method, ID2SYM(id));
if (NIL_P(args)) {
- /* Qfalse indicates that the arguments are empty */
- rb_ivar_set(lazy, id_arguments, Qfalse);
+ /* Qfalse indicates that the arguments are empty */
+ rb_ivar_set(lazy, id_arguments, Qfalse);
}
else {
- rb_ivar_set(lazy, id_arguments, args);
+ rb_ivar_set(lazy, id_arguments, args);
}
}
+#if 0
static VALUE
lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
{
@@ -1811,10 +1890,11 @@ lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
e->size_fn = size_fn;
return lazy;
}
+#endif
static VALUE
lazy_add_method(VALUE obj, int argc, VALUE *argv, VALUE args, VALUE memo,
- const lazyenum_funcs *fn)
+ const lazyenum_funcs *fn)
{
struct enumerator *new_e;
VALUE new_obj;
@@ -1823,9 +1903,9 @@ lazy_add_method(VALUE obj, int argc, VALUE *argv, VALUE args, VALUE memo,
struct enumerator *e = enumerator_ptr(obj);
struct proc_entry *entry;
VALUE entry_obj = TypedData_Make_Struct(rb_cObject, struct proc_entry,
- &proc_entry_data_type, entry);
+ &proc_entry_data_type, entry);
if (rb_block_given_p()) {
- entry->proc = rb_block_proc();
+ entry->proc = rb_block_proc();
}
entry->fn = fn;
entry->memo = args;
@@ -1842,11 +1922,11 @@ lazy_add_method(VALUE obj, int argc, VALUE *argv, VALUE args, VALUE memo,
new_e->procs = new_procs;
if (argc > 0) {
- new_e->meth = rb_to_id(*argv++);
- --argc;
+ new_e->meth = rb_to_id(*argv++);
+ --argc;
}
else {
- new_e->meth = id_each;
+ new_e->meth = id_each;
}
new_e->args = rb_ary_new4(argc, argv);
return new_obj;
@@ -1884,7 +1964,7 @@ lazy_add_method(VALUE obj, int argc, VALUE *argv, VALUE args, VALUE memo,
static VALUE
enumerable_lazy(VALUE obj)
{
- VALUE result = lazy_to_enum_i(obj, sym_each, 0, 0, lazyenum_size, PASS_KW_SPLAT);
+ VALUE result = lazy_to_enum_i(obj, sym_each, 0, 0, lazyenum_size, rb_keyword_given_p());
/* Qfalse indicates that the Enumerator::Lazy has no method name */
rb_ivar_set(result, id_method, Qfalse);
return result;
@@ -1926,15 +2006,15 @@ lazy_to_enum(int argc, VALUE *argv, VALUE self)
VALUE lazy, meth = sym_each, super_meth;
if (argc > 0) {
- --argc;
- meth = *argv++;
+ --argc;
+ meth = *argv++;
}
if (RTEST((super_meth = rb_hash_aref(lazy_use_super_method, meth)))) {
meth = super_meth;
}
- lazy = lazy_to_enum_i(self, meth, argc, argv, 0, PASS_KW_SPLAT);
+ lazy = lazy_to_enum_i(self, meth, argc, argv, 0, rb_keyword_given_p());
if (rb_block_given_p()) {
- enumerator_ptr(lazy)->size = rb_block_proc();
+ enumerator_ptr(lazy)->size = rb_block_proc();
}
return lazy;
}
@@ -1973,9 +2053,9 @@ lazyenum_yield_values(VALUE proc_entry, struct MEMO *result)
int argc = 1;
const VALUE *argv = &result->memo_value;
if (LAZY_MEMO_PACKED_P(result)) {
- const VALUE args = *argv;
- argc = RARRAY_LENINT(args);
- argv = RARRAY_CONST_PTR(args);
+ const VALUE args = *argv;
+ argc = RARRAY_LENINT(args);
+ argv = RARRAY_CONST_PTR(args);
}
return rb_proc_call_with_block(entry->proc, argc, argv, Qnil);
}
@@ -2016,64 +2096,64 @@ static VALUE
lazy_map(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy map without a block");
+ rb_raise(rb_eArgError, "tried to call lazy map without a block");
}
return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_map_funcs);
}
+struct flat_map_i_arg {
+ struct MEMO *result;
+ long index;
+};
+
static VALUE
-lazy_flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, yielder))
+lazy_flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, y))
{
- VALUE arg = rb_enum_values_pack(argc, argv);
+ struct flat_map_i_arg *arg = (struct flat_map_i_arg *)y;
- return rb_funcallv(yielder, idLTLT, 1, &arg);
+ return lazy_yielder_yield(arg->result, arg->index, argc, argv);
}
-static VALUE
-lazy_flat_map_each(VALUE obj, VALUE yielder)
+static struct MEMO *
+lazy_flat_map_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_index)
{
- rb_block_call(obj, id_each, 0, 0, lazy_flat_map_i, yielder);
- return Qnil;
-}
+ VALUE value = lazyenum_yield_values(proc_entry, result);
+ VALUE ary = 0;
+ const long proc_index = memo_index + 1;
+ int break_p = LAZY_MEMO_BREAK_P(result);
-static VALUE
-lazy_flat_map_to_ary(VALUE obj, VALUE yielder)
-{
- VALUE ary = rb_check_array_type(obj);
- if (NIL_P(ary)) {
- rb_funcall(yielder, idLTLT, 1, obj);
+ if (RB_TYPE_P(value, T_ARRAY)) {
+ ary = value;
}
- else {
- long i;
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_funcall(yielder, idLTLT, 1, RARRAY_AREF(ary, i));
- }
+ else if (rb_respond_to(value, id_force) && rb_respond_to(value, id_each)) {
+ struct flat_map_i_arg arg = {.result = result, .index = proc_index};
+ LAZY_MEMO_RESET_BREAK(result);
+ rb_block_call(value, id_each, 0, 0, lazy_flat_map_i, (VALUE)&arg);
+ if (break_p) LAZY_MEMO_SET_BREAK(result);
+ return 0;
}
- return Qnil;
-}
-static VALUE
-lazy_flat_map_proc(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
-{
- VALUE result = rb_yield_values2(argc - 1, &argv[1]);
- if (RB_TYPE_P(result, T_ARRAY)) {
- long i;
- for (i = 0; i < RARRAY_LEN(result); i++) {
- rb_funcall(argv[0], idLTLT, 1, RARRAY_AREF(result, i));
- }
- }
- else {
- if (rb_respond_to(result, id_force) && rb_respond_to(result, id_each)) {
- lazy_flat_map_each(result, argv[0]);
- }
- else {
- lazy_flat_map_to_ary(result, argv[0]);
- }
+ if (ary || !NIL_P(ary = rb_check_array_type(value))) {
+ long i;
+ LAZY_MEMO_RESET_BREAK(result);
+ for (i = 0; i + 1 < RARRAY_LEN(ary); i++) {
+ const VALUE argv = RARRAY_AREF(ary, i);
+ lazy_yielder_yield(result, proc_index, 1, &argv);
+ }
+ if (break_p) LAZY_MEMO_SET_BREAK(result);
+ if (i >= RARRAY_LEN(ary)) return 0;
+ value = RARRAY_AREF(ary, i);
}
- return Qnil;
+ LAZY_MEMO_SET_VALUE(result, value);
+ LAZY_MEMO_RESET_PACKED(result);
+ return result;
}
+static const lazyenum_funcs lazy_flat_map_funcs = {
+ lazy_flat_map_proc, 0,
+};
+
/*
* call-seq:
* lazy.collect_concat { |obj| block } -> a_lazy_enumerator
@@ -2101,12 +2181,10 @@ static VALUE
lazy_flat_map(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy flat_map without a block");
+ rb_raise(rb_eArgError, "tried to call lazy flat_map without a block");
}
- return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
- lazy_flat_map_proc, 0),
- Qnil, 0);
+ return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_flat_map_funcs);
}
static struct MEMO *
@@ -2133,7 +2211,7 @@ static VALUE
lazy_select(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy select without a block");
+ rb_raise(rb_eArgError, "tried to call lazy select without a block");
}
return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_select_funcs);
@@ -2196,7 +2274,7 @@ static VALUE
lazy_reject(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy reject without a block");
+ rb_raise(rb_eArgError, "tried to call lazy reject without a block");
}
return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_reject_funcs);
@@ -2245,7 +2323,7 @@ static VALUE
lazy_grep(VALUE obj, VALUE pattern)
{
const lazyenum_funcs *const funcs = rb_block_given_p() ?
- &lazy_grep_iter_funcs : &lazy_grep_funcs;
+ &lazy_grep_iter_funcs : &lazy_grep_funcs;
return lazy_add_method(obj, 0, 0, pattern, rb_ary_new3(1, pattern), funcs);
}
@@ -2308,58 +2386,59 @@ next_stopped(VALUE obj, VALUE _)
return Qnil;
}
-static VALUE
-lazy_zip_arrays_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, arrays))
+static struct MEMO *
+lazy_zip_arrays_func(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_index)
{
- VALUE yielder, ary, memo;
- long i, count;
-
- yielder = argv[0];
- memo = rb_attr_get(yielder, id_memo);
- count = NIL_P(memo) ? 0 : NUM2LONG(memo);
+ struct proc_entry *entry = proc_entry_ptr(proc_entry);
+ VALUE ary, arrays = entry->memo;
+ VALUE memo = rb_ary_entry(memos, memo_index);
+ long i, count = NIL_P(memo) ? 0 : NUM2LONG(memo);
ary = rb_ary_new2(RARRAY_LEN(arrays) + 1);
- rb_ary_push(ary, argv[1]);
+ rb_ary_push(ary, result->memo_value);
for (i = 0; i < RARRAY_LEN(arrays); i++) {
- rb_ary_push(ary, rb_ary_entry(RARRAY_AREF(arrays, i), count));
+ rb_ary_push(ary, rb_ary_entry(RARRAY_AREF(arrays, i), count));
}
- rb_funcall(yielder, idLTLT, 1, ary);
- rb_ivar_set(yielder, id_memo, LONG2NUM(++count));
- return Qnil;
+ LAZY_MEMO_SET_VALUE(result, ary);
+ LAZY_MEMO_SET_PACKED(result);
+ rb_ary_store(memos, memo_index, LONG2NUM(++count));
+ return result;
}
-static VALUE
-lazy_zip_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, zip_args))
+static struct MEMO *
+lazy_zip_func(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_index)
{
- VALUE yielder, ary, arg, v;
+ struct proc_entry *entry = proc_entry_ptr(proc_entry);
+ VALUE arg = rb_ary_entry(memos, memo_index);
+ VALUE zip_args = entry->memo;
+ VALUE ary, v;
long i;
- yielder = argv[0];
- arg = rb_attr_get(yielder, id_memo);
if (NIL_P(arg)) {
- arg = rb_ary_new2(RARRAY_LEN(zip_args));
- for (i = 0; i < RARRAY_LEN(zip_args); i++) {
- rb_ary_push(arg, rb_funcall(RARRAY_AREF(zip_args, i), id_to_enum, 0));
- }
- rb_ivar_set(yielder, id_memo, arg);
+ arg = rb_ary_new2(RARRAY_LEN(zip_args));
+ for (i = 0; i < RARRAY_LEN(zip_args); i++) {
+ rb_ary_push(arg, rb_funcall(RARRAY_AREF(zip_args, i), id_to_enum, 0));
+ }
+ rb_ary_store(memos, memo_index, arg);
}
ary = rb_ary_new2(RARRAY_LEN(arg) + 1);
- v = Qnil;
- if (--argc > 0) {
- ++argv;
- v = argc > 1 ? rb_ary_new_from_values(argc, argv) : *argv;
- }
- rb_ary_push(ary, v);
+ rb_ary_push(ary, result->memo_value);
for (i = 0; i < RARRAY_LEN(arg); i++) {
- v = rb_rescue2(call_next, RARRAY_AREF(arg, i), next_stopped, 0,
- rb_eStopIteration, (VALUE)0);
- rb_ary_push(ary, v);
+ v = rb_rescue2(call_next, RARRAY_AREF(arg, i), next_stopped, 0,
+ rb_eStopIteration, (VALUE)0);
+ rb_ary_push(ary, v);
}
- rb_funcall(yielder, idLTLT, 1, ary);
- return Qnil;
+ LAZY_MEMO_SET_VALUE(result, ary);
+ LAZY_MEMO_SET_PACKED(result);
+ return result;
}
+static const lazyenum_funcs lazy_zip_funcs[] = {
+ {lazy_zip_func, lazy_receiver_size,},
+ {lazy_zip_arrays_func, lazy_receiver_size,},
+};
+
/*
* call-seq:
* lazy.zip(arg, ...) -> lazy_enumerator
@@ -2373,32 +2452,30 @@ lazy_zip(int argc, VALUE *argv, VALUE obj)
{
VALUE ary, v;
long i;
- rb_block_call_func *func = lazy_zip_arrays_func;
+ const lazyenum_funcs *funcs = &lazy_zip_funcs[1];
if (rb_block_given_p()) {
- return rb_call_super(argc, argv);
+ return rb_call_super(argc, argv);
}
ary = rb_ary_new2(argc);
for (i = 0; i < argc; i++) {
- v = rb_check_array_type(argv[i]);
- if (NIL_P(v)) {
- for (; i < argc; i++) {
- if (!rb_respond_to(argv[i], id_each)) {
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
- rb_obj_class(argv[i]));
- }
- }
- ary = rb_ary_new4(argc, argv);
- func = lazy_zip_func;
- break;
- }
- rb_ary_push(ary, v);
- }
-
- return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
- func, ary),
- ary, lazy_receiver_size);
+ v = rb_check_array_type(argv[i]);
+ if (NIL_P(v)) {
+ for (; i < argc; i++) {
+ if (!rb_respond_to(argv[i], id_each)) {
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
+ rb_obj_class(argv[i]));
+ }
+ }
+ ary = rb_ary_new4(argc, argv);
+ funcs = &lazy_zip_funcs[0];
+ break;
+ }
+ rb_ary_push(ary, v);
+ }
+
+ return lazy_add_method(obj, 0, 0, ary, ary, funcs);
}
static struct MEMO *
@@ -2409,17 +2486,12 @@ lazy_take_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_ind
VALUE memo = rb_ary_entry(memos, memo_index);
if (NIL_P(memo)) {
- memo = entry->memo;
+ memo = entry->memo;
}
remain = NUM2LONG(memo);
- if (remain == 0) {
- LAZY_MEMO_SET_BREAK(result);
- }
- else {
- if (--remain == 0) LAZY_MEMO_SET_BREAK(result);
- rb_ary_store(memos, memo_index, LONG2NUM(remain));
- }
+ if (--remain == 0) LAZY_MEMO_SET_BREAK(result);
+ rb_ary_store(memos, memo_index, LONG2NUM(remain));
return result;
}
@@ -2428,12 +2500,19 @@ lazy_take_size(VALUE entry, VALUE receiver)
{
long len = NUM2LONG(RARRAY_AREF(rb_ivar_get(entry, id_arguments), 0));
if (NIL_P(receiver) || (FIXNUM_P(receiver) && FIX2LONG(receiver) < len))
- return receiver;
+ return receiver;
return LONG2NUM(len);
}
+static int
+lazy_take_precheck(VALUE proc_entry)
+{
+ struct proc_entry *entry = proc_entry_ptr(proc_entry);
+ return entry->memo != INT2FIX(0);
+}
+
static const lazyenum_funcs lazy_take_funcs = {
- lazy_take_proc, lazy_take_size,
+ lazy_take_proc, lazy_take_size, lazy_take_precheck,
};
/*
@@ -2447,20 +2526,14 @@ static VALUE
lazy_take(VALUE obj, VALUE n)
{
long len = NUM2LONG(n);
- int argc = 0;
- VALUE argv[2];
if (len < 0) {
- rb_raise(rb_eArgError, "attempt to take negative size");
+ rb_raise(rb_eArgError, "attempt to take negative size");
}
- if (len == 0) {
- argv[0] = sym_cycle;
- argv[1] = INT2NUM(0);
- argc = 2;
- }
+ n = LONG2NUM(len); /* no more conversion */
- return lazy_add_method(obj, argc, argv, n, rb_ary_new3(1, n), &lazy_take_funcs);
+ return lazy_add_method(obj, 0, 0, n, rb_ary_new3(1, n), &lazy_take_funcs);
}
static struct MEMO *
@@ -2468,8 +2541,8 @@ lazy_take_while_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long me
{
VALUE take = lazyenum_yield_values(proc_entry, result);
if (!RTEST(take)) {
- LAZY_MEMO_SET_BREAK(result);
- return 0;
+ LAZY_MEMO_SET_BREAK(result);
+ return 0;
}
return result;
}
@@ -2489,7 +2562,7 @@ static VALUE
lazy_take_while(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy take_while without a block");
+ rb_raise(rb_eArgError, "tried to call lazy take_while without a block");
}
return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_take_while_funcs);
@@ -2500,10 +2573,10 @@ lazy_drop_size(VALUE proc_entry, VALUE receiver)
{
long len = NUM2LONG(RARRAY_AREF(rb_ivar_get(proc_entry, id_arguments), 0));
if (NIL_P(receiver))
- return receiver;
+ return receiver;
if (FIXNUM_P(receiver)) {
- len = FIX2LONG(receiver) - len;
- return LONG2FIX(len < 0 ? 0 : len);
+ len = FIX2LONG(receiver) - len;
+ return LONG2FIX(len < 0 ? 0 : len);
}
return rb_funcall(receiver, '-', 1, LONG2NUM(len));
}
@@ -2516,13 +2589,13 @@ lazy_drop_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_ind
VALUE memo = rb_ary_entry(memos, memo_index);
if (NIL_P(memo)) {
- memo = entry->memo;
+ memo = entry->memo;
}
remain = NUM2LONG(memo);
if (remain > 0) {
- --remain;
- rb_ary_store(memos, memo_index, LONG2NUM(remain));
- return 0;
+ --remain;
+ rb_ary_store(memos, memo_index, LONG2NUM(remain));
+ return 0;
}
return result;
@@ -2548,7 +2621,7 @@ lazy_drop(VALUE obj, VALUE n)
argv[1] = n;
if (len < 0) {
- rb_raise(rb_eArgError, "attempt to drop negative size");
+ rb_raise(rb_eArgError, "attempt to drop negative size");
}
return lazy_add_method(obj, 2, argv, n, rb_ary_new3(1, n), &lazy_drop_funcs);
@@ -2561,13 +2634,13 @@ lazy_drop_while_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long me
VALUE memo = rb_ary_entry(memos, memo_index);
if (NIL_P(memo)) {
- memo = entry->memo;
+ memo = entry->memo;
}
if (!RTEST(memo)) {
- VALUE drop = lazyenum_yield_values(proc_entry, result);
- if (RTEST(drop)) return 0;
- rb_ary_store(memos, memo_index, Qtrue);
+ VALUE drop = lazyenum_yield_values(proc_entry, result);
+ if (RTEST(drop)) return 0;
+ rb_ary_store(memos, memo_index, Qtrue);
}
return result;
}
@@ -2587,7 +2660,7 @@ static VALUE
lazy_drop_while(VALUE obj)
{
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy drop_while without a block");
+ rb_raise(rb_eArgError, "tried to call lazy drop_while without a block");
}
return lazy_add_method(obj, 0, 0, Qfalse, Qnil, &lazy_drop_while_funcs);
@@ -2647,6 +2720,30 @@ lazy_uniq(VALUE obj)
}
static struct MEMO *
+lazy_compact_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_index)
+{
+ if (NIL_P(result->memo_value)) return 0;
+ return result;
+}
+
+static const lazyenum_funcs lazy_compact_funcs = {
+ lazy_compact_proc, 0,
+};
+
+/*
+ * call-seq:
+ * lazy.compact -> lazy_enumerator
+ *
+ * Like Enumerable#compact, but chains operation to be lazy-evaluated.
+ */
+
+static VALUE
+lazy_compact(VALUE obj)
+{
+ return lazy_add_method(obj, 0, 0, Qnil, Qnil, &lazy_compact_funcs);
+}
+
+static struct MEMO *
lazy_with_index_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long memo_index)
{
struct proc_entry *entry = proc_entry_ptr(proc_entry);
@@ -2662,7 +2759,8 @@ lazy_with_index_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long me
if (entry->proc) {
rb_proc_call_with_block(entry->proc, 2, argv, Qnil);
LAZY_MEMO_RESET_PACKED(result);
- } else {
+ }
+ else {
LAZY_MEMO_SET_VALUE(result, rb_ary_new_from_values(2, argv));
LAZY_MEMO_SET_PACKED(result);
}
@@ -2670,8 +2768,14 @@ lazy_with_index_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long me
return result;
}
+static VALUE
+lazy_with_index_size(VALUE proc, VALUE receiver)
+{
+ return receiver;
+}
+
static const lazyenum_funcs lazy_with_index_funcs = {
- lazy_with_index_proc, 0,
+ lazy_with_index_proc, lazy_with_index_size,
};
/*
@@ -2679,7 +2783,8 @@ static const lazyenum_funcs lazy_with_index_funcs = {
* lazy.with_index(offset = 0) {|(*args), idx| block }
* lazy.with_index(offset = 0)
*
- * If a block is given, iterates the given block for each element
+ * If a block is given, returns a lazy enumerator that will
+ * iterate over the given block for each element
* with an index, which starts from +offset+, and returns a
* lazy enumerator that yields the same values (without the index).
*
@@ -2710,7 +2815,8 @@ lazy_with_index(int argc, VALUE *argv, VALUE obj)
*
* Like Enumerable#chunk, but chains operation to be lazy-evaluated.
*/
-static VALUE lazy_chunk(VALUE self)
+static VALUE
+lazy_chunk(VALUE self)
{
}
@@ -2720,7 +2826,8 @@ static VALUE lazy_chunk(VALUE self)
*
* Like Enumerable#chunk_while, but chains operation to be lazy-evaluated.
*/
-static VALUE lazy_chunk_while(VALUE self)
+static VALUE
+lazy_chunk_while(VALUE self)
{
}
@@ -2731,7 +2838,8 @@ static VALUE lazy_chunk_while(VALUE self)
*
* Like Enumerable#slice_after, but chains operation to be lazy-evaluated.
*/
-static VALUE lazy_slice_after(VALUE self)
+static VALUE
+lazy_slice_after(VALUE self)
{
}
@@ -2742,7 +2850,8 @@ static VALUE lazy_slice_after(VALUE self)
*
* Like Enumerable#slice_before, but chains operation to be lazy-evaluated.
*/
-static VALUE lazy_slice_before(VALUE self)
+static VALUE
+lazy_slice_before(VALUE self)
{
}
@@ -2752,7 +2861,8 @@ static VALUE lazy_slice_before(VALUE self)
*
* Like Enumerable#slice_when, but chains operation to be lazy-evaluated.
*/
-static VALUE lazy_slice_when(VALUE self)
+static VALUE
+lazy_slice_when(VALUE self)
{
}
# endif
@@ -2874,7 +2984,7 @@ producer_ptr(VALUE obj)
struct producer *ptr;
TypedData_Get_Struct(obj, struct producer, &producer_data_type, ptr);
- if (!ptr || ptr->proc == Qundef) {
+ if (!ptr || UNDEF_P(ptr->proc)) {
rb_raise(rb_eArgError, "uninitialized producer");
}
return ptr;
@@ -2917,6 +3027,8 @@ producer_each_stop(VALUE dummy, VALUE exc)
return rb_attr_get(exc, id_result);
}
+NORETURN(static VALUE producer_each_i(VALUE obj));
+
static VALUE
producer_each_i(VALUE obj)
{
@@ -2927,9 +3039,10 @@ producer_each_i(VALUE obj)
init = ptr->init;
proc = ptr->proc;
- if (init == Qundef) {
+ if (UNDEF_P(init)) {
curr = Qnil;
- } else {
+ }
+ else {
rb_yield(init);
curr = init;
}
@@ -2939,7 +3052,7 @@ producer_each_i(VALUE obj)
rb_yield(curr);
}
- return Qnil;
+ UNREACHABLE_RETURN(Qnil);
}
/* :nodoc: */
@@ -2978,7 +3091,7 @@ producer_size(VALUE obj, VALUE args, VALUE eobj)
* enclosing_section = ancestors.find { |n| n.type == :section }
*
* Using ::produce together with Enumerable methods like Enumerable#detect,
- * Enumerable#slice, Enumerable#take_while can provide Enumerator-based alternatives
+ * Enumerable#slice_after, Enumerable#take_while can provide Enumerator-based alternatives
* for +while+ and +until+ cycles:
*
* # Find next Tuesday
@@ -3057,7 +3170,7 @@ enum_chain_ptr(VALUE obj)
struct enum_chain *ptr;
TypedData_Get_Struct(obj, struct enum_chain, &enum_chain_data_type, ptr);
- if (!ptr || ptr->enums == Qundef) {
+ if (!ptr || UNDEF_P(ptr->enums)) {
rb_raise(rb_eArgError, "uninitialized chain");
}
return ptr;
@@ -3104,6 +3217,21 @@ enum_chain_initialize(VALUE obj, VALUE enums)
return obj;
}
+static VALUE
+new_enum_chain(VALUE enums)
+{
+ long i;
+ VALUE obj = enum_chain_initialize(enum_chain_allocate(rb_cEnumChain), enums);
+
+ for (i = 0; i < RARRAY_LEN(enums); i++) {
+ if (RTEST(rb_obj_is_kind_of(RARRAY_AREF(enums, i), rb_cLazy))) {
+ return enumerable_lazy(obj);
+ }
+ }
+
+ return obj;
+}
+
/* :nodoc: */
static VALUE
enum_chain_init_copy(VALUE obj, VALUE orig)
@@ -3132,7 +3260,7 @@ enum_chain_total_size(VALUE enums)
for (i = 0; i < RARRAY_LEN(enums); i++) {
VALUE size = enum_size(RARRAY_AREF(enums, i));
- if (NIL_P(size) || (RB_TYPE_P(size, T_FLOAT) && isinf(NUM2DBL(size)))) {
+ if (NIL_P(size) || (RB_FLOAT_TYPE_P(size) && isinf(NUM2DBL(size)))) {
return size;
}
if (!RB_INTEGER_TYPE_P(size)) {
@@ -3235,7 +3363,7 @@ inspect_enum_chain(VALUE obj, VALUE dummy, int recur)
TypedData_Get_Struct(obj, struct enum_chain, &enum_chain_data_type, ptr);
- if (!ptr || ptr->enums == Qundef) {
+ if (!ptr || UNDEF_P(ptr->enums)) {
return rb_sprintf("#<%"PRIsVALUE": uninitialized>", rb_class_path(klass));
}
@@ -3273,8 +3401,7 @@ enum_chain(int argc, VALUE *argv, VALUE obj)
{
VALUE enums = rb_ary_new_from_values(1, &obj);
rb_ary_cat(enums, argv, argc);
-
- return enum_chain_initialize(enum_chain_allocate(rb_cEnumChain), enums);
+ return new_enum_chain(enums);
}
/*
@@ -3290,9 +3417,357 @@ enum_chain(int argc, VALUE *argv, VALUE obj)
static VALUE
enumerator_plus(VALUE obj, VALUE eobj)
{
- VALUE enums = rb_ary_new_from_args(2, obj, eobj);
+ return new_enum_chain(rb_ary_new_from_args(2, obj, eobj));
+}
+
+/*
+ * Document-class: Enumerator::Product
+ *
+ * Enumerator::Product generates a Cartesian product of any number of
+ * enumerable objects. Iterating over the product of enumerable
+ * objects is roughly equivalent to nested each_entry loops where the
+ * loop for the rightmost object is put innermost.
+ *
+ * innings = Enumerator::Product.new(1..9, ['top', 'bottom'])
+ *
+ * innings.each do |i, h|
+ * p [i, h]
+ * end
+ * # [1, "top"]
+ * # [1, "bottom"]
+ * # [2, "top"]
+ * # [2, "bottom"]
+ * # [3, "top"]
+ * # [3, "bottom"]
+ * # ...
+ * # [9, "top"]
+ * # [9, "bottom"]
+ *
+ * The method used against each enumerable object is `each_entry`
+ * instead of `each` so that the product of N enumerable objects
+ * yields an array of exactly N elements in each iteration.
+ *
+ * When no enumerator is given, it calls a given block once yielding
+ * an empty argument list.
+ *
+ * This type of objects can be created by Enumerator.product.
+ */
+
+static void
+enum_product_mark(void *p)
+{
+ struct enum_product *ptr = p;
+ rb_gc_mark_movable(ptr->enums);
+}
+
+static void
+enum_product_compact(void *p)
+{
+ struct enum_product *ptr = p;
+ ptr->enums = rb_gc_location(ptr->enums);
+}
+
+#define enum_product_free RUBY_TYPED_DEFAULT_FREE
+
+static size_t
+enum_product_memsize(const void *p)
+{
+ return sizeof(struct enum_product);
+}
+
+static const rb_data_type_t enum_product_data_type = {
+ "product",
+ {
+ enum_product_mark,
+ enum_product_free,
+ enum_product_memsize,
+ enum_product_compact,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static struct enum_product *
+enum_product_ptr(VALUE obj)
+{
+ struct enum_product *ptr;
+
+ TypedData_Get_Struct(obj, struct enum_product, &enum_product_data_type, ptr);
+ if (!ptr || UNDEF_P(ptr->enums)) {
+ rb_raise(rb_eArgError, "uninitialized product");
+ }
+ return ptr;
+}
+
+/* :nodoc: */
+static VALUE
+enum_product_allocate(VALUE klass)
+{
+ struct enum_product *ptr;
+ VALUE obj;
+
+ obj = TypedData_Make_Struct(klass, struct enum_product, &enum_product_data_type, ptr);
+ ptr->enums = Qundef;
+
+ return obj;
+}
+
+/*
+ * call-seq:
+ * Enumerator::Product.new(*enums) -> enum
+ *
+ * Generates a new enumerator object that generates a Cartesian
+ * product of given enumerable objects.
+ *
+ * e = Enumerator::Product.new(1..3, [4, 5])
+ * e.to_a #=> [[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]]
+ * e.size #=> 6
+ */
+static VALUE
+enum_product_initialize(int argc, VALUE *argv, VALUE obj)
+{
+ struct enum_product *ptr;
+ VALUE enums = Qnil, options = Qnil;
+
+ rb_scan_args(argc, argv, "*:", &enums, &options);
+
+ if (!NIL_P(options) && !RHASH_EMPTY_P(options)) {
+ rb_exc_raise(rb_keyword_error_new("unknown", rb_hash_keys(options)));
+ }
+
+ rb_check_frozen(obj);
+ TypedData_Get_Struct(obj, struct enum_product, &enum_product_data_type, ptr);
+
+ if (!ptr) rb_raise(rb_eArgError, "unallocated product");
+
+ ptr->enums = rb_obj_freeze(enums);
+
+ return obj;
+}
+
+/* :nodoc: */
+static VALUE
+enum_product_init_copy(VALUE obj, VALUE orig)
+{
+ struct enum_product *ptr0, *ptr1;
+
+ if (!OBJ_INIT_COPY(obj, orig)) return obj;
+ ptr0 = enum_product_ptr(orig);
+
+ TypedData_Get_Struct(obj, struct enum_product, &enum_product_data_type, ptr1);
+
+ if (!ptr1) rb_raise(rb_eArgError, "unallocated product");
+
+ ptr1->enums = ptr0->enums;
+
+ return obj;
+}
+
+static VALUE
+enum_product_total_size(VALUE enums)
+{
+ VALUE total = INT2FIX(1);
+ long i;
+
+ for (i = 0; i < RARRAY_LEN(enums); i++) {
+ VALUE size = enum_size(RARRAY_AREF(enums, i));
+
+ if (NIL_P(size) || (RB_TYPE_P(size, T_FLOAT) && isinf(NUM2DBL(size)))) {
+ return size;
+ }
+ if (!RB_INTEGER_TYPE_P(size)) {
+ return Qnil;
+ }
+
+ total = rb_funcall(total, '*', 1, size);
+ }
+
+ return total;
+}
+
+/*
+ * call-seq:
+ * obj.size -> int, Float::INFINITY or nil
+ *
+ * Returns the total size of the enumerator product calculated by
+ * multiplying the sizes of enumerables in the product. If any of the
+ * enumerables reports its size as nil or Float::INFINITY, that value
+ * is returned as the size.
+ */
+static VALUE
+enum_product_size(VALUE obj)
+{
+ return enum_product_total_size(enum_product_ptr(obj)->enums);
+}
- return enum_chain_initialize(enum_chain_allocate(rb_cEnumChain), enums);
+static VALUE
+enum_product_enum_size(VALUE obj, VALUE args, VALUE eobj)
+{
+ return enum_product_size(obj);
+}
+
+struct product_state {
+ VALUE obj;
+ VALUE block;
+ int argc;
+ VALUE *argv;
+ int index;
+};
+
+static VALUE product_each(VALUE, struct product_state *);
+
+static VALUE
+product_each_i(RB_BLOCK_CALL_FUNC_ARGLIST(value, state))
+{
+ struct product_state *pstate = (struct product_state *)state;
+ pstate->argv[pstate->index++] = value;
+
+ VALUE val = product_each(pstate->obj, pstate);
+ pstate->index--;
+ return val;
+}
+
+static VALUE
+product_each(VALUE obj, struct product_state *pstate)
+{
+ struct enum_product *ptr = enum_product_ptr(obj);
+ VALUE enums = ptr->enums;
+
+ if (pstate->index < pstate->argc) {
+ VALUE eobj = RARRAY_AREF(enums, pstate->index);
+
+ rb_block_call(eobj, id_each_entry, 0, NULL, product_each_i, (VALUE)pstate);
+ }
+ else {
+ rb_funcall(pstate->block, id_call, 1, rb_ary_new_from_values(pstate->argc, pstate->argv));
+ }
+
+ return obj;
+}
+
+static VALUE
+enum_product_run(VALUE obj, VALUE block)
+{
+ struct enum_product *ptr = enum_product_ptr(obj);
+ int argc = RARRAY_LENINT(ptr->enums);
+ struct product_state state = {
+ .obj = obj,
+ .block = block,
+ .index = 0,
+ .argc = argc,
+ .argv = ALLOCA_N(VALUE, argc),
+ };
+
+ return product_each(obj, &state);
+}
+
+/*
+ * call-seq:
+ * obj.each { |...| ... } -> obj
+ * obj.each -> enumerator
+ *
+ * Iterates over the elements of the first enumerable by calling the
+ * "each_entry" method on it with the given arguments, then proceeds
+ * to the following enumerables in sequence until all of the
+ * enumerables are exhausted.
+ *
+ * If no block is given, returns an enumerator. Otherwise, returns self.
+ */
+static VALUE
+enum_product_each(VALUE obj)
+{
+ RETURN_SIZED_ENUMERATOR(obj, 0, 0, enum_product_enum_size);
+
+ return enum_product_run(obj, rb_block_proc());
+}
+
+/*
+ * call-seq:
+ * obj.rewind -> obj
+ *
+ * Rewinds the product enumerator by calling the "rewind" method on
+ * each enumerable in reverse order. Each call is performed only if
+ * the enumerable responds to the method.
+ */
+static VALUE
+enum_product_rewind(VALUE obj)
+{
+ struct enum_product *ptr = enum_product_ptr(obj);
+ VALUE enums = ptr->enums;
+ long i;
+
+ for (i = 0; i < RARRAY_LEN(enums); i++) {
+ rb_check_funcall(RARRAY_AREF(enums, i), id_rewind, 0, 0);
+ }
+
+ return obj;
+}
+
+static VALUE
+inspect_enum_product(VALUE obj, VALUE dummy, int recur)
+{
+ VALUE klass = rb_obj_class(obj);
+ struct enum_product *ptr;
+
+ TypedData_Get_Struct(obj, struct enum_product, &enum_product_data_type, ptr);
+
+ if (!ptr || UNDEF_P(ptr->enums)) {
+ return rb_sprintf("#<%"PRIsVALUE": uninitialized>", rb_class_path(klass));
+ }
+
+ if (recur) {
+ return rb_sprintf("#<%"PRIsVALUE": ...>", rb_class_path(klass));
+ }
+
+ return rb_sprintf("#<%"PRIsVALUE": %+"PRIsVALUE">", rb_class_path(klass), ptr->enums);
+}
+
+/*
+ * call-seq:
+ * obj.inspect -> string
+ *
+ * Returns a printable version of the product enumerator.
+ */
+static VALUE
+enum_product_inspect(VALUE obj)
+{
+ return rb_exec_recursive(inspect_enum_product, obj, 0);
+}
+
+/*
+ * call-seq:
+ * Enumerator.product(*enums) -> enumerator
+ * Enumerator.product(*enums) { |elts| ... } -> enumerator
+ *
+ * Generates a new enumerator object that generates a Cartesian
+ * product of given enumerable objects. This is equivalent to
+ * Enumerator::Product.new.
+ *
+ * e = Enumerator.product(1..3, [4, 5])
+ * e.to_a #=> [[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]]
+ * e.size #=> 6
+ *
+ * When a block is given, calls the block with each N-element array
+ * generated and returns +nil+.
+ */
+static VALUE
+enumerator_s_product(int argc, VALUE *argv, VALUE klass)
+{
+ VALUE enums = Qnil, options = Qnil, block = Qnil;
+
+ rb_scan_args(argc, argv, "*:&", &enums, &options, &block);
+
+ if (!NIL_P(options) && !RHASH_EMPTY_P(options)) {
+ rb_exc_raise(rb_keyword_error_new("unknown", rb_hash_keys(options)));
+ }
+
+ VALUE obj = enum_product_initialize(argc, argv, enum_product_allocate(rb_cEnumProduct));
+
+ if (!NIL_P(block)) {
+ enum_product_run(obj, block);
+ return Qnil;
+ }
+
+ return obj;
}
/*
@@ -3302,6 +3777,9 @@ enumerator_plus(VALUE obj, VALUE eobj)
* that is a representation of sequences of numbers with common difference.
* Instances of this class can be generated by the Range#step and Numeric#step
* methods.
+ *
+ * The class can be used for slicing Array (see Array#slice) or custom
+ * collections.
*/
VALUE
@@ -3310,11 +3788,11 @@ rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
VALUE beg, VALUE end, VALUE step, int excl)
{
VALUE aseq = enumerator_init(enumerator_allocate(rb_cArithSeq),
- obj, meth, argc, argv, size_fn, Qnil, PASS_KW_SPLAT);
+ obj, meth, argc, argv, size_fn, Qnil, rb_keyword_given_p());
rb_ivar_set(aseq, id_begin, beg);
rb_ivar_set(aseq, id_end, end);
rb_ivar_set(aseq, id_step, step);
- rb_ivar_set(aseq, id_exclude_end, excl ? Qtrue : Qfalse);
+ rb_ivar_set(aseq, id_exclude_end, RBOOL(excl));
return aseq;
}
@@ -3380,17 +3858,60 @@ rb_arithmetic_sequence_extract(VALUE obj, rb_arithmetic_sequence_components_t *c
component->exclude_end = arith_seq_exclude_end_p(obj);
return 1;
}
- else if (rb_obj_is_kind_of(obj, rb_cRange)) {
- component->begin = RANGE_BEG(obj);
- component->end = RANGE_END(obj);
+ else if (rb_range_values(obj, &component->begin, &component->end, &component->exclude_end)) {
component->step = INT2FIX(1);
- component->exclude_end = RTEST(RANGE_EXCL(obj));
return 1;
}
return 0;
}
+VALUE
+rb_arithmetic_sequence_beg_len_step(VALUE obj, long *begp, long *lenp, long *stepp, long len, int err)
+{
+ RBIMPL_NONNULL_ARG(begp);
+ RBIMPL_NONNULL_ARG(lenp);
+ RBIMPL_NONNULL_ARG(stepp);
+
+ rb_arithmetic_sequence_components_t aseq;
+ if (!rb_arithmetic_sequence_extract(obj, &aseq)) {
+ return Qfalse;
+ }
+
+ long step = NIL_P(aseq.step) ? 1 : NUM2LONG(aseq.step);
+ *stepp = step;
+
+ if (step < 0) {
+ if (aseq.exclude_end && !NIL_P(aseq.end)) {
+ /* Handle exclusion before range reversal */
+ aseq.end = LONG2NUM(NUM2LONG(aseq.end) + 1);
+
+ /* Don't exclude the previous beginning */
+ aseq.exclude_end = 0;
+ }
+ VALUE tmp = aseq.begin;
+ aseq.begin = aseq.end;
+ aseq.end = tmp;
+ }
+
+ if (err == 0 && (step < -1 || step > 1)) {
+ if (rb_range_component_beg_len(aseq.begin, aseq.end, aseq.exclude_end, begp, lenp, len, 1) == Qtrue) {
+ if (*begp > len)
+ goto out_of_range;
+ if (*lenp > len)
+ goto out_of_range;
+ return Qtrue;
+ }
+ }
+ else {
+ return rb_range_component_beg_len(aseq.begin, aseq.end, aseq.exclude_end, begp, lenp, len, err);
+ }
+
+ out_of_range:
+ rb_raise(rb_eRangeError, "%+"PRIsVALUE" out of range", obj);
+ return Qnil;
+}
+
/*
* call-seq:
* aseq.first -> num or nil
@@ -3535,6 +4056,88 @@ arith_seq_first(int argc, VALUE *argv, VALUE self)
return rb_call_super(argc, argv);
}
+static inline VALUE
+num_plus(VALUE a, VALUE b)
+{
+ if (RB_INTEGER_TYPE_P(a)) {
+ return rb_int_plus(a, b);
+ }
+ else if (RB_FLOAT_TYPE_P(a)) {
+ return rb_float_plus(a, b);
+ }
+ else if (RB_TYPE_P(a, T_RATIONAL)) {
+ return rb_rational_plus(a, b);
+ }
+ else {
+ return rb_funcallv(a, '+', 1, &b);
+ }
+}
+
+static inline VALUE
+num_minus(VALUE a, VALUE b)
+{
+ if (RB_INTEGER_TYPE_P(a)) {
+ return rb_int_minus(a, b);
+ }
+ else if (RB_FLOAT_TYPE_P(a)) {
+ return rb_float_minus(a, b);
+ }
+ else if (RB_TYPE_P(a, T_RATIONAL)) {
+ return rb_rational_minus(a, b);
+ }
+ else {
+ return rb_funcallv(a, '-', 1, &b);
+ }
+}
+
+static inline VALUE
+num_mul(VALUE a, VALUE b)
+{
+ if (RB_INTEGER_TYPE_P(a)) {
+ return rb_int_mul(a, b);
+ }
+ else if (RB_FLOAT_TYPE_P(a)) {
+ return rb_float_mul(a, b);
+ }
+ else if (RB_TYPE_P(a, T_RATIONAL)) {
+ return rb_rational_mul(a, b);
+ }
+ else {
+ return rb_funcallv(a, '*', 1, &b);
+ }
+}
+
+static inline VALUE
+num_idiv(VALUE a, VALUE b)
+{
+ VALUE q;
+ if (RB_INTEGER_TYPE_P(a)) {
+ q = rb_int_idiv(a, b);
+ }
+ else if (RB_FLOAT_TYPE_P(a)) {
+ q = rb_float_div(a, b);
+ }
+ else if (RB_TYPE_P(a, T_RATIONAL)) {
+ q = rb_rational_div(a, b);
+ }
+ else {
+ q = rb_funcallv(a, idDiv, 1, &b);
+ }
+
+ if (RB_INTEGER_TYPE_P(q)) {
+ return q;
+ }
+ else if (RB_FLOAT_TYPE_P(q)) {
+ return rb_float_floor(q, 0);
+ }
+ else if (RB_TYPE_P(q, T_RATIONAL)) {
+ return rb_rational_floor(q, 0);
+ }
+ else {
+ return rb_funcall(q, rb_intern("floor"), 0);
+ }
+}
+
/*
* call-seq:
* aseq.last -> num or nil
@@ -3559,7 +4162,7 @@ arith_seq_last(int argc, VALUE *argv, VALUE self)
b = arith_seq_begin(self);
s = arith_seq_step(self);
- len_1 = rb_int_idiv(rb_int_minus(e, b), s);
+ len_1 = num_idiv(num_minus(e, b), s);
if (rb_num_negative_int_p(len_1)) {
if (argc == 0) {
return Qnil;
@@ -3567,9 +4170,9 @@ arith_seq_last(int argc, VALUE *argv, VALUE self)
return rb_ary_new_capa(0);
}
- last = rb_int_plus(b, rb_int_mul(s, len_1));
+ last = num_plus(b, num_mul(s, len_1));
if ((last_is_adjusted = arith_seq_exclude_end_p(self) && rb_equal(last, e))) {
- last = rb_int_minus(last, s);
+ last = num_minus(last, s);
}
if (argc == 0) {
@@ -3778,57 +4381,28 @@ arith_seq_each(VALUE self)
return self;
}
- len_1 = rb_int_idiv(rb_int_minus(e, c), s);
- last = rb_int_plus(c, rb_int_mul(s, len_1));
+ len_1 = num_idiv(num_minus(e, c), s);
+ last = num_plus(c, num_mul(s, len_1));
if (x && rb_equal(last, e)) {
- last = rb_int_minus(last, s);
+ last = num_minus(last, s);
}
if (rb_num_negative_int_p(s)) {
while (NUM_GE(c, last)) {
rb_yield(c);
- c = rb_int_plus(c, s);
+ c = num_plus(c, s);
}
}
else {
while (NUM_GE(last, c)) {
rb_yield(c);
- c = rb_int_plus(c, s);
+ c = num_plus(c, s);
}
}
return self;
}
-static double
-arith_seq_float_step_size(double beg, double end, double step, int excl)
-{
- double const epsilon = DBL_EPSILON;
- double n, err;
-
- if (step == 0) {
- return HUGE_VAL;
- }
- n = (end - beg) / step;
- err = (fabs(beg) + fabs(end) + fabs(end - beg)) / fabs(step) * epsilon;
- if (isinf(step)) {
- return step > 0 ? beg <= end : beg >= end;
- }
- if (err > 0.5) err = 0.5;
- if (excl) {
- if (n <= 0) return 0;
- if (n < 1)
- n = 0;
- else
- n = floor(n - err);
- }
- else {
- if (n < 0) return 0;
- n = floor(n + err);
- }
- return n + 1;
-}
-
/*
* call-seq:
* aseq.size -> num or nil
@@ -3862,9 +4436,9 @@ arith_seq_size(VALUE self)
ee = NUM2DBL(e);
}
- n = arith_seq_float_step_size(NUM2DBL(b), ee, NUM2DBL(s), x);
+ n = ruby_float_step_size(NUM2DBL(b), ee, NUM2DBL(s), x);
if (isinf(n)) return DBL2NUM(n);
- if (POSFIXABLE(n)) return LONG2FIX(n);
+ if (POSFIXABLE(n)) return LONG2FIX((long)n);
return rb_dbl2big(n);
}
@@ -3896,10 +4470,11 @@ arith_seq_size(VALUE self)
return len;
}
+#define sym(name) ID2SYM(rb_intern_const(name))
void
InitVM_Enumerator(void)
{
- ID id_private = rb_intern("private");
+ ID id_private = rb_intern_const("private");
rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
@@ -3949,23 +4524,23 @@ InitVM_Enumerator(void)
rb_define_alias(rb_cLazy, "_enumerable_uniq", "uniq");
rb_define_private_method(rb_cLazy, "_enumerable_with_index", enumerator_with_index, -1);
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_map")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_collect")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_flat_map")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_collect_concat")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_select")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_find_all")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_filter")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_filter_map")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_reject")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_grep")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_grep_v")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_zip")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_take")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_take_while")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_drop")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_drop_while")));
- rb_funcall(rb_cLazy, id_private, 1, ID2SYM(rb_intern("_enumerable_uniq")));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_map"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_collect"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_flat_map"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_collect_concat"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_select"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_find_all"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_filter"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_filter_map"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_reject"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_grep"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_grep_v"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_zip"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_take"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_take_while"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_drop"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_drop_while"));
+ rb_funcall(rb_cLazy, id_private, 1, sym("_enumerable_uniq"));
rb_define_method(rb_cLazy, "initialize", lazy_initialize, -1);
rb_define_method(rb_cLazy, "to_enum", lazy_to_enum, -1);
@@ -3994,27 +4569,28 @@ InitVM_Enumerator(void)
rb_define_method(rb_cLazy, "slice_when", lazy_super, -1);
rb_define_method(rb_cLazy, "chunk_while", lazy_super, -1);
rb_define_method(rb_cLazy, "uniq", lazy_uniq, 0);
+ rb_define_method(rb_cLazy, "compact", lazy_compact, 0);
rb_define_method(rb_cLazy, "with_index", lazy_with_index, -1);
lazy_use_super_method = rb_hash_new_with_size(18);
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("map")), ID2SYM(rb_intern("_enumerable_map")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("collect")), ID2SYM(rb_intern("_enumerable_collect")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("flat_map")), ID2SYM(rb_intern("_enumerable_flat_map")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("collect_concat")), ID2SYM(rb_intern("_enumerable_collect_concat")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("select")), ID2SYM(rb_intern("_enumerable_select")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("find_all")), ID2SYM(rb_intern("_enumerable_find_all")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("filter")), ID2SYM(rb_intern("_enumerable_filter")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("filter_map")), ID2SYM(rb_intern("_enumerable_filter_map")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("reject")), ID2SYM(rb_intern("_enumerable_reject")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("grep")), ID2SYM(rb_intern("_enumerable_grep")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("grep_v")), ID2SYM(rb_intern("_enumerable_grep_v")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("zip")), ID2SYM(rb_intern("_enumerable_zip")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("take")), ID2SYM(rb_intern("_enumerable_take")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("take_while")), ID2SYM(rb_intern("_enumerable_take_while")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("drop")), ID2SYM(rb_intern("_enumerable_drop")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("drop_while")), ID2SYM(rb_intern("_enumerable_drop_while")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("uniq")), ID2SYM(rb_intern("_enumerable_uniq")));
- rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("with_index")), ID2SYM(rb_intern("_enumerable_with_index")));
+ rb_hash_aset(lazy_use_super_method, sym("map"), sym("_enumerable_map"));
+ rb_hash_aset(lazy_use_super_method, sym("collect"), sym("_enumerable_collect"));
+ rb_hash_aset(lazy_use_super_method, sym("flat_map"), sym("_enumerable_flat_map"));
+ rb_hash_aset(lazy_use_super_method, sym("collect_concat"), sym("_enumerable_collect_concat"));
+ rb_hash_aset(lazy_use_super_method, sym("select"), sym("_enumerable_select"));
+ rb_hash_aset(lazy_use_super_method, sym("find_all"), sym("_enumerable_find_all"));
+ rb_hash_aset(lazy_use_super_method, sym("filter"), sym("_enumerable_filter"));
+ rb_hash_aset(lazy_use_super_method, sym("filter_map"), sym("_enumerable_filter_map"));
+ rb_hash_aset(lazy_use_super_method, sym("reject"), sym("_enumerable_reject"));
+ rb_hash_aset(lazy_use_super_method, sym("grep"), sym("_enumerable_grep"));
+ rb_hash_aset(lazy_use_super_method, sym("grep_v"), sym("_enumerable_grep_v"));
+ rb_hash_aset(lazy_use_super_method, sym("zip"), sym("_enumerable_zip"));
+ rb_hash_aset(lazy_use_super_method, sym("take"), sym("_enumerable_take"));
+ rb_hash_aset(lazy_use_super_method, sym("take_while"), sym("_enumerable_take_while"));
+ rb_hash_aset(lazy_use_super_method, sym("drop"), sym("_enumerable_drop"));
+ rb_hash_aset(lazy_use_super_method, sym("drop_while"), sym("_enumerable_drop_while"));
+ rb_hash_aset(lazy_use_super_method, sym("uniq"), sym("_enumerable_uniq"));
+ rb_hash_aset(lazy_use_super_method, sym("with_index"), sym("_enumerable_with_index"));
rb_obj_freeze(lazy_use_super_method);
rb_gc_register_mark_object(lazy_use_super_method);
@@ -4062,6 +4638,27 @@ InitVM_Enumerator(void)
rb_define_method(rb_cEnumChain, "size", enum_chain_size, 0);
rb_define_method(rb_cEnumChain, "rewind", enum_chain_rewind, 0);
rb_define_method(rb_cEnumChain, "inspect", enum_chain_inspect, 0);
+ rb_undef_method(rb_cEnumChain, "feed");
+ rb_undef_method(rb_cEnumChain, "next");
+ rb_undef_method(rb_cEnumChain, "next_values");
+ rb_undef_method(rb_cEnumChain, "peek");
+ rb_undef_method(rb_cEnumChain, "peek_values");
+
+ /* Product */
+ rb_cEnumProduct = rb_define_class_under(rb_cEnumerator, "Product", rb_cEnumerator);
+ rb_define_alloc_func(rb_cEnumProduct, enum_product_allocate);
+ rb_define_method(rb_cEnumProduct, "initialize", enum_product_initialize, -1);
+ rb_define_method(rb_cEnumProduct, "initialize_copy", enum_product_init_copy, 1);
+ rb_define_method(rb_cEnumProduct, "each", enum_product_each, 0);
+ rb_define_method(rb_cEnumProduct, "size", enum_product_size, 0);
+ rb_define_method(rb_cEnumProduct, "rewind", enum_product_rewind, 0);
+ rb_define_method(rb_cEnumProduct, "inspect", enum_product_inspect, 0);
+ rb_undef_method(rb_cEnumProduct, "feed");
+ rb_undef_method(rb_cEnumProduct, "next");
+ rb_undef_method(rb_cEnumProduct, "next_values");
+ rb_undef_method(rb_cEnumProduct, "peek");
+ rb_undef_method(rb_cEnumProduct, "peek_values");
+ rb_define_singleton_method(rb_cEnumerator, "product", enumerator_s_product, -1);
/* ArithmeticSequence */
rb_cArithSeq = rb_define_class_under(rb_cEnumerator, "ArithmeticSequence", rb_cEnumerator);
@@ -4083,28 +4680,29 @@ InitVM_Enumerator(void)
rb_provide("enumerator.so"); /* for backward compatibility */
}
+#undef sym
-#undef rb_intern
void
Init_Enumerator(void)
{
- id_rewind = rb_intern("rewind");
- id_new = rb_intern("new");
- id_next = rb_intern("next");
- id_result = rb_intern("result");
- id_receiver = rb_intern("receiver");
- id_arguments = rb_intern("arguments");
- id_memo = rb_intern("memo");
- id_method = rb_intern("method");
- id_force = rb_intern("force");
- id_to_enum = rb_intern("to_enum");
- id_begin = rb_intern("begin");
- id_end = rb_intern("end");
- id_step = rb_intern("step");
- id_exclude_end = rb_intern("exclude_end");
+ id_rewind = rb_intern_const("rewind");
+ id_new = rb_intern_const("new");
+ id_next = rb_intern_const("next");
+ id_result = rb_intern_const("result");
+ id_receiver = rb_intern_const("receiver");
+ id_arguments = rb_intern_const("arguments");
+ id_memo = rb_intern_const("memo");
+ id_method = rb_intern_const("method");
+ id_force = rb_intern_const("force");
+ id_to_enum = rb_intern_const("to_enum");
+ id_each_entry = rb_intern_const("each_entry");
+ id_begin = rb_intern_const("begin");
+ id_end = rb_intern_const("end");
+ id_step = rb_intern_const("step");
+ id_exclude_end = rb_intern_const("exclude_end");
sym_each = ID2SYM(id_each);
- sym_cycle = ID2SYM(rb_intern("cycle"));
- sym_yield = ID2SYM(rb_intern("yield"));
+ sym_cycle = ID2SYM(rb_intern_const("cycle"));
+ sym_yield = ID2SYM(rb_intern_const("yield"));
InitVM(Enumerator);
}
diff --git a/error.c b/error.c
index 9557d8552b..726f57a4c0 100644
--- a/error.c
+++ b/error.c
@@ -9,29 +9,44 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "ruby/st.h"
-#include "internal.h"
-#include "ruby_assert.h"
-#include "vm_core.h"
-#include "builtin.h"
+#include "ruby/internal/config.h"
-#include <stdio.h>
+#include <errno.h>
#include <stdarg.h>
+#include <stdio.h>
+
#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+# include <stdlib.h>
#endif
-#include <errno.h>
+
#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
#endif
#if defined __APPLE__
# include <AvailabilityMacros.h>
#endif
+#include "internal.h"
+#include "internal/error.h"
+#include "internal/eval.h"
+#include "internal/hash.h"
+#include "internal/io.h"
+#include "internal/load.h"
+#include "internal/object.h"
+#include "internal/string.h"
+#include "internal/symbol.h"
+#include "internal/thread.h"
+#include "internal/variable.h"
+#include "ruby/encoding.h"
+#include "ruby/st.h"
+#include "ruby_assert.h"
+#include "vm_core.h"
+
+#include "builtin.h"
+
/*!
- * \defgroup exception Exception handlings
+ * \addtogroup exception
* \{
*/
@@ -51,6 +66,7 @@ VALUE rb_iseqw_local_variables(VALUE iseqval);
VALUE rb_iseqw_new(const rb_iseq_t *);
int rb_str_end_with_asciichar(VALUE str, int c);
+long rb_backtrace_length_limit = -1;
VALUE rb_eEAGAIN;
VALUE rb_eEWOULDBLOCK;
VALUE rb_eEINPROGRESS;
@@ -58,8 +74,16 @@ static VALUE rb_mWarning;
static VALUE rb_cWarningBuffer;
static ID id_warn;
+static ID id_category;
+static ID id_deprecated;
+static ID id_experimental;
+static VALUE sym_category;
+static VALUE sym_highlight;
+static struct {
+ st_table *id2enum, *enum2id;
+} warning_categories;
-extern const char ruby_description[];
+extern const char *rb_dynamic_description;
static const char *
rb_strerrno(int err)
@@ -76,59 +100,56 @@ static int
err_position_0(char *buf, long len, const char *file, int line)
{
if (!file) {
- return 0;
+ return 0;
}
else if (line == 0) {
- return snprintf(buf, len, "%s: ", file);
+ return snprintf(buf, len, "%s: ", file);
}
else {
- return snprintf(buf, len, "%s:%d: ", file, line);
+ return snprintf(buf, len, "%s:%d: ", file, line);
}
}
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 5, 0)
static VALUE
err_vcatf(VALUE str, const char *pre, const char *file, int line,
- const char *fmt, va_list args)
+ const char *fmt, va_list args)
{
if (file) {
- rb_str_cat2(str, file);
- if (line) rb_str_catf(str, ":%d", line);
- rb_str_cat2(str, ": ");
+ rb_str_cat2(str, file);
+ if (line) rb_str_catf(str, ":%d", line);
+ rb_str_cat2(str, ": ");
}
if (pre) rb_str_cat2(str, pre);
rb_str_vcatf(str, fmt, args);
return str;
}
+static VALUE syntax_error_with_path(VALUE, VALUE, VALUE*, rb_encoding*);
+
VALUE
rb_syntax_error_append(VALUE exc, VALUE file, int line, int column,
- rb_encoding *enc, const char *fmt, va_list args)
+ rb_encoding *enc, const char *fmt, va_list args)
{
const char *fn = NIL_P(file) ? NULL : RSTRING_PTR(file);
if (!exc) {
- VALUE mesg = rb_enc_str_new(0, 0, enc);
- err_vcatf(mesg, NULL, fn, line, fmt, args);
- rb_str_cat2(mesg, "\n");
- rb_write_error_str(mesg);
+ VALUE mesg = rb_enc_str_new(0, 0, enc);
+ err_vcatf(mesg, NULL, fn, line, fmt, args);
+ rb_str_cat2(mesg, "\n");
+ rb_write_error_str(mesg);
}
else {
- VALUE mesg;
- if (NIL_P(exc)) {
- mesg = rb_enc_str_new(0, 0, enc);
- exc = rb_class_new_instance(1, &mesg, rb_eSyntaxError);
- }
- else {
- mesg = rb_attr_get(exc, idMesg);
- if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
- rb_str_cat_cstr(mesg, "\n");
- }
- err_vcatf(mesg, NULL, fn, line, fmt, args);
+ VALUE mesg;
+ exc = syntax_error_with_path(exc, file, &mesg, enc);
+ err_vcatf(mesg, NULL, fn, line, fmt, args);
}
return exc;
}
-static unsigned int warning_disabled_categories;
+static unsigned int warning_disabled_categories = (
+ 1U << RB_WARN_CATEGORY_DEPRECATED |
+ 0);
static unsigned int
rb_warning_category_mask(VALUE category)
@@ -139,18 +160,24 @@ rb_warning_category_mask(VALUE category)
rb_warning_category_t
rb_warning_category_from_name(VALUE category)
{
- rb_warning_category_t cat = RB_WARN_CATEGORY_NONE;
+ st_data_t cat_value;
+ ID cat_id;
Check_Type(category, T_SYMBOL);
- if (category == ID2SYM(rb_intern("deprecated"))) {
- cat = RB_WARN_CATEGORY_DEPRECATED;
- }
- else if (category == ID2SYM(rb_intern("experimental"))) {
- cat = RB_WARN_CATEGORY_EXPERIMENTAL;
- }
- else {
+ if (!(cat_id = rb_check_id(&category)) ||
+ !st_lookup(warning_categories.id2enum, cat_id, &cat_value)) {
rb_raise(rb_eArgError, "unknown category: %"PRIsVALUE, category);
}
- return cat;
+ return (rb_warning_category_t)cat_value;
+}
+
+static VALUE
+rb_warning_category_to_name(rb_warning_category_t category)
+{
+ st_data_t id;
+ if (!st_lookup(warning_categories.enum2id, category, &id)) {
+ rb_raise(rb_eArgError, "invalid category: %d", (int)category);
+ }
+ return id ? ID2SYM(id) : Qnil;
}
void
@@ -167,7 +194,7 @@ rb_warning_category_enabled_p(rb_warning_category_t category)
}
/*
- * call-seq
+ * call-seq:
* Warning[category] -> true or false
*
* Returns the flag to show the warning messages for +category+.
@@ -187,13 +214,11 @@ static VALUE
rb_warning_s_aref(VALUE mod, VALUE category)
{
rb_warning_category_t cat = rb_warning_category_from_name(category);
- if (rb_warning_category_enabled_p(cat))
- return Qtrue;
- return Qfalse;
+ return RBOOL(rb_warning_category_enabled_p(cat));
}
/*
- * call-seq
+ * call-seq:
* Warning[category] = flag -> flag
*
* Sets the warning flags for +category+.
@@ -215,17 +240,31 @@ rb_warning_s_aset(VALUE mod, VALUE category, VALUE flag)
/*
* call-seq:
- * warn(msg) -> nil
+ * warn(msg, category: nil) -> nil
*
* Writes warning message +msg+ to $stderr. This method is called by
- * Ruby for all emitted warnings.
+ * Ruby for all emitted warnings. A +category+ may be included with
+ * the warning.
+ *
+ * See the documentation of the Warning module for how to customize this.
*/
static VALUE
-rb_warning_s_warn(VALUE mod, VALUE str)
+rb_warning_s_warn(int argc, VALUE *argv, VALUE mod)
{
+ VALUE str;
+ VALUE opt;
+ VALUE category = Qnil;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ if (!NIL_P(opt)) rb_get_kwargs(opt, &id_category, 0, 1, &category);
+
Check_Type(str, T_STRING);
rb_must_asciicompat(str);
+ if (!NIL_P(category)) {
+ rb_warning_category_t cat = rb_warning_category_from_name(category);
+ if (!rb_warning_category_enabled_p(cat)) return Qnil;
+ }
rb_write_error_str(str);
return Qnil;
}
@@ -238,11 +277,30 @@ rb_warning_s_warn(VALUE mod, VALUE str)
* Warning.warn is called for all warnings issued by Ruby.
* By default, warnings are printed to $stderr.
*
- * By overriding Warning.warn, you can change how warnings are
- * handled by Ruby, either filtering some warnings, and/or outputting
- * warnings somewhere other than $stderr. When Warning.warn is
- * overridden, super can be called to get the default behavior of
- * printing the warning to $stderr.
+ * Changing the behavior of Warning.warn is useful to customize how warnings are
+ * handled by Ruby, for instance by filtering some warnings, and/or outputting
+ * warnings somewhere other than $stderr.
+ *
+ * If you want to change the behavior of Warning.warn you should use
+ * +Warning.extend(MyNewModuleWithWarnMethod)+ and you can use `super`
+ * to get the default behavior of printing the warning to $stderr.
+ *
+ * Example:
+ * module MyWarningFilter
+ * def warn(message, category: nil, **kwargs)
+ * if /some warning I want to ignore/.match?(message)
+ * # ignore
+ * else
+ * super
+ * end
+ * end
+ * end
+ * Warning.extend MyWarningFilter
+ *
+ * You should never redefine Warning#warn (the instance method), as that will
+ * then no longer provide a way to use the default behavior.
+ *
+ * The +warning+ gem provides convenient ways to customize Warning.warn.
*/
static VALUE
@@ -251,12 +309,40 @@ rb_warning_warn(VALUE mod, VALUE str)
return rb_funcallv(mod, id_warn, 1, &str);
}
+
+static int
+rb_warning_warn_arity(void)
+{
+ const rb_method_entry_t *me = rb_method_entry(rb_singleton_class(rb_mWarning), id_warn);
+ return me ? rb_method_entry_arity(me) : 1;
+}
+
+static VALUE
+rb_warn_category(VALUE str, VALUE category)
+{
+ if (RUBY_DEBUG && !NIL_P(category)) {
+ rb_warning_category_from_name(category);
+ }
+
+ if (rb_warning_warn_arity() == 1) {
+ return rb_warning_warn(rb_mWarning, str);
+ }
+ else {
+ VALUE args[2];
+ args[0] = str;
+ args[1] = rb_hash_new();
+ rb_hash_aset(args[1], sym_category, category);
+ return rb_funcallv_kw(rb_mWarning, id_warn, 2, args, RB_PASS_KEYWORDS);
+ }
+}
+
static void
rb_write_warning_str(VALUE str)
{
rb_warning_warn(rb_mWarning, str);
}
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 0)
static VALUE
warn_vsprintf(rb_encoding *enc, const char *file, int line, const char *fmt, va_list args)
{
@@ -266,35 +352,45 @@ warn_vsprintf(rb_encoding *enc, const char *file, int line, const char *fmt, va_
return rb_str_cat2(str, "\n");
}
+#define with_warn_vsprintf(file, line, fmt) \
+ VALUE str; \
+ va_list args; \
+ va_start(args, fmt); \
+ str = warn_vsprintf(NULL, file, line, fmt, args); \
+ va_end(args);
+
void
rb_compile_warn(const char *file, int line, const char *fmt, ...)
{
- VALUE str;
- va_list args;
-
- if (NIL_P(ruby_verbose)) return;
-
- va_start(args, fmt);
- str = warn_vsprintf(NULL, file, line, fmt, args);
- va_end(args);
- rb_write_warning_str(str);
+ if (!NIL_P(ruby_verbose)) {
+ with_warn_vsprintf(file, line, fmt) {
+ rb_write_warning_str(str);
+ }
+ }
}
/* rb_compile_warning() reports only in verbose mode */
void
rb_compile_warning(const char *file, int line, const char *fmt, ...)
{
- VALUE str;
- va_list args;
-
- if (!RTEST(ruby_verbose)) return;
+ if (RTEST(ruby_verbose)) {
+ with_warn_vsprintf(file, line, fmt) {
+ rb_write_warning_str(str);
+ }
+ }
+}
- va_start(args, fmt);
- str = warn_vsprintf(NULL, file, line, fmt, args);
- va_end(args);
- rb_write_warning_str(str);
+void
+rb_category_compile_warn(rb_warning_category_t category, const char *file, int line, const char *fmt, ...)
+{
+ if (!NIL_P(ruby_verbose)) {
+ with_warn_vsprintf(file, line, fmt) {
+ rb_warn_category(str, rb_warning_category_to_name(category));
+ }
+ }
}
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
static VALUE
warning_string(rb_encoding *enc, const char *fmt, va_list args)
{
@@ -304,8 +400,10 @@ warning_string(rb_encoding *enc, const char *fmt, va_list args)
}
#define with_warning_string(mesg, enc, fmt) \
+ with_warning_string_from(mesg, enc, fmt, fmt)
+#define with_warning_string_from(mesg, enc, fmt, last_arg) \
VALUE mesg; \
- va_list args; va_start(args, fmt); \
+ va_list args; va_start(args, last_arg); \
mesg = warning_string(enc, fmt, args); \
va_end(args);
@@ -313,9 +411,19 @@ void
rb_warn(const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- with_warning_string(mesg, 0, fmt) {
- rb_write_warning_str(mesg);
- }
+ with_warning_string(mesg, 0, fmt) {
+ rb_write_warning_str(mesg);
+ }
+ }
+}
+
+void
+rb_category_warn(rb_warning_category_t category, const char *fmt, ...)
+{
+ if (!NIL_P(ruby_verbose) && rb_warning_category_enabled_p(category)) {
+ with_warning_string(mesg, 0, fmt) {
+ rb_warn_category(mesg, rb_warning_category_to_name(category));
+ }
}
}
@@ -323,9 +431,9 @@ void
rb_enc_warn(rb_encoding *enc, const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- with_warning_string(mesg, enc, fmt) {
- rb_write_warning_str(mesg);
- }
+ with_warning_string(mesg, enc, fmt) {
+ rb_write_warning_str(mesg);
+ }
}
}
@@ -334,9 +442,20 @@ void
rb_warning(const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- with_warning_string(mesg, 0, fmt) {
- rb_write_warning_str(mesg);
- }
+ with_warning_string(mesg, 0, fmt) {
+ rb_write_warning_str(mesg);
+ }
+ }
+}
+
+/* rb_category_warning() reports only in verbose mode */
+void
+rb_category_warning(rb_warning_category_t category, const char *fmt, ...)
+{
+ if (RTEST(ruby_verbose) && rb_warning_category_enabled_p(category)) {
+ with_warning_string(mesg, 0, fmt) {
+ rb_warn_category(mesg, rb_warning_category_to_name(category));
+ }
}
}
@@ -353,34 +472,59 @@ void
rb_enc_warning(rb_encoding *enc, const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- with_warning_string(mesg, enc, fmt) {
- rb_write_warning_str(mesg);
- }
+ with_warning_string(mesg, enc, fmt) {
+ rb_write_warning_str(mesg);
+ }
}
}
#endif
-void
-rb_warn_deprecated(const char *fmt, const char *suggest, ...)
+static bool
+deprecation_warning_enabled(void)
+{
+ if (NIL_P(ruby_verbose)) return false;
+ if (!rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) return false;
+ return true;
+}
+
+static void
+warn_deprecated(VALUE mesg, const char *removal, const char *suggest)
{
- if (NIL_P(ruby_verbose)) return;
- if (!rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) return;
- va_list args;
- va_start(args, suggest);
- VALUE mesg = warning_string(0, fmt, args);
- va_end(args);
rb_str_set_len(mesg, RSTRING_LEN(mesg) - 1);
rb_str_cat_cstr(mesg, " is deprecated");
+ if (removal) {
+ rb_str_catf(mesg, " and will be removed in Ruby %s", removal);
+ }
if (suggest) rb_str_catf(mesg, "; use %s instead", suggest);
rb_str_cat_cstr(mesg, "\n");
- rb_write_warning_str(mesg);
+ rb_warn_category(mesg, ID2SYM(id_deprecated));
+}
+
+void
+rb_warn_deprecated(const char *fmt, const char *suggest, ...)
+{
+ if (!deprecation_warning_enabled()) return;
+
+ with_warning_string_from(mesg, 0, fmt, suggest) {
+ warn_deprecated(mesg, NULL, suggest);
+ }
+}
+
+void
+rb_warn_deprecated_to_remove(const char *removal, const char *fmt, const char *suggest, ...)
+{
+ if (!deprecation_warning_enabled()) return;
+
+ with_warning_string_from(mesg, 0, fmt, suggest) {
+ warn_deprecated(mesg, removal, suggest);
+ }
}
static inline int
end_with_asciichar(VALUE str, int c)
{
return RB_TYPE_P(str, T_STRING) &&
- rb_str_end_with_asciichar(str, c);
+ rb_str_end_with_asciichar(str, c);
}
/* :nodoc: */
@@ -388,14 +532,15 @@ static VALUE
warning_write(int argc, VALUE *argv, VALUE buf)
{
while (argc-- > 0) {
- rb_str_append(buf, *argv++);
+ rb_str_append(buf, *argv++);
}
return buf;
}
-VALUE rb_ec_backtrace_location_ary(rb_execution_context_t *ec, long lev, long n);
+VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, bool skip_internal);
+
static VALUE
-rb_warn_m(rb_execution_context_t *ec, VALUE exc, VALUE msgs, VALUE uplevel)
+rb_warn_m(rb_execution_context_t *ec, VALUE exc, VALUE msgs, VALUE uplevel, VALUE category)
{
VALUE location = Qnil;
int argc = RARRAY_LENINT(msgs);
@@ -408,36 +553,42 @@ rb_warn_m(rb_execution_context_t *ec, VALUE exc, VALUE msgs, VALUE uplevel)
if (lev < 0) {
rb_raise(rb_eArgError, "negative level (%ld)", lev);
}
- location = rb_ec_backtrace_location_ary(ec, lev + 1, 1);
+ location = rb_ec_backtrace_location_ary(ec, lev + 1, 1, TRUE);
if (!NIL_P(location)) {
location = rb_ary_entry(location, 0);
}
- }
- if (argc > 1 || !NIL_P(uplevel) || !end_with_asciichar(str, '\n')) {
- VALUE path;
- if (NIL_P(uplevel)) {
- str = rb_str_tmp_new(0);
- }
- else if (NIL_P(location) ||
- NIL_P(path = rb_funcall(location, rb_intern("path"), 0))) {
- str = rb_str_new_cstr("warning: ");
- }
- else {
- str = rb_sprintf("%s:%ld: warning: ",
- rb_string_value_ptr(&path),
- NUM2LONG(rb_funcall(location, rb_intern("lineno"), 0)));
- }
- RBASIC_SET_CLASS(str, rb_cWarningBuffer);
- rb_io_puts(argc, argv, str);
- RBASIC_SET_CLASS(str, rb_cString);
- }
- if (exc == rb_mWarning) {
- rb_must_asciicompat(str);
- rb_write_error_str(str);
- }
- else {
- rb_write_warning_str(str);
- }
+ }
+ if (argc > 1 || !NIL_P(uplevel) || !end_with_asciichar(str, '\n')) {
+ VALUE path;
+ if (NIL_P(uplevel)) {
+ str = rb_str_tmp_new(0);
+ }
+ else if (NIL_P(location) ||
+ NIL_P(path = rb_funcall(location, rb_intern("path"), 0))) {
+ str = rb_str_new_cstr("warning: ");
+ }
+ else {
+ str = rb_sprintf("%s:%ld: warning: ",
+ rb_string_value_ptr(&path),
+ NUM2LONG(rb_funcall(location, rb_intern("lineno"), 0)));
+ }
+ RBASIC_SET_CLASS(str, rb_cWarningBuffer);
+ rb_io_puts(argc, argv, str);
+ RBASIC_SET_CLASS(str, rb_cString);
+ }
+
+ if (!NIL_P(category)) {
+ category = rb_to_symbol_type(category);
+ rb_warning_category_from_name(category);
+ }
+
+ if (exc == rb_mWarning) {
+ rb_must_asciicompat(str);
+ rb_write_error_str(str);
+ }
+ else {
+ rb_warn_category(str, category);
+ }
}
return Qnil;
}
@@ -456,7 +607,7 @@ rb_bug_reporter_add(void (*func)(FILE *, void *), void *data)
{
struct bug_reporters *reporter;
if (bug_reporters_size >= MAX_BUG_REPORTERS) {
- return 0; /* failed to register */
+ return 0; /* failed to register */
}
reporter = &bug_reporters[bug_reporters_size++];
reporter->func = func;
@@ -475,7 +626,7 @@ bug_report_file(const char *file, int line)
int len = err_position_0(buf, sizeof(buf), file, line);
if ((ssize_t)fwrite(buf, 1, len, out) == (ssize_t)len ||
- (ssize_t)fwrite(buf, 1, len, (out = stdout)) == (ssize_t)len) {
+ (ssize_t)fwrite(buf, 1, len, (out = stdout)) == (ssize_t)len) {
return out;
}
@@ -492,40 +643,45 @@ bug_important_message(FILE *out, const char *const msg, size_t len)
if (!len) return;
if (isatty(fileno(out))) {
- static const char red[] = "\033[;31;1;7m";
- static const char green[] = "\033[;32;7m";
- static const char reset[] = "\033[m";
- const char *e = strchr(p, '\n');
- const int w = (int)(e - p);
- do {
- int i = (int)(e - p);
- fputs(*p == ' ' ? green : red, out);
- fwrite(p, 1, e - p, out);
- for (; i < w; ++i) fputc(' ', out);
- fputs(reset, out);
- fputc('\n', out);
- } while ((p = e + 1) < endmsg && (e = strchr(p, '\n')) != 0 && e > p + 1);
+ static const char red[] = "\033[;31;1;7m";
+ static const char green[] = "\033[;32;7m";
+ static const char reset[] = "\033[m";
+ const char *e = strchr(p, '\n');
+ const int w = (int)(e - p);
+ do {
+ int i = (int)(e - p);
+ fputs(*p == ' ' ? green : red, out);
+ fwrite(p, 1, e - p, out);
+ for (; i < w; ++i) fputc(' ', out);
+ fputs(reset, out);
+ fputc('\n', out);
+ } while ((p = e + 1) < endmsg && (e = strchr(p, '\n')) != 0 && e > p + 1);
}
fwrite(p, 1, endmsg - p, out);
}
+#undef CRASH_REPORTER_MAY_BE_CREATED
+#if defined(__APPLE__) && \
+ (!defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 || defined(__POWERPC__)) /* 10.6 PPC case */
+# define CRASH_REPORTER_MAY_BE_CREATED
+#endif
static void
preface_dump(FILE *out)
{
#if defined __APPLE__
static const char msg[] = ""
- "-- Crash Report log information "
- "--------------------------------------------\n"
- " See Crash Report log file under the one of following:\n"
-# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
- " * ~/Library/Logs/CrashReporter\n"
- " * /Library/Logs/CrashReporter\n"
+ "-- Crash Report log information "
+ "--------------------------------------------\n"
+ " See Crash Report log file in one of the following locations:\n"
+# ifdef CRASH_REPORTER_MAY_BE_CREATED
+ " * ~/Library/Logs/CrashReporter\n"
+ " * /Library/Logs/CrashReporter\n"
# endif
- " * ~/Library/Logs/DiagnosticReports\n"
- " * /Library/Logs/DiagnosticReports\n"
- " for more details.\n"
- "Don't forget to include the above Crash Report log file in bug reports.\n"
- "\n";
+ " * ~/Library/Logs/DiagnosticReports\n"
+ " * /Library/Logs/DiagnosticReports\n"
+ " for more details.\n"
+ "Don't forget to include the above Crash Report log file in bug reports.\n"
+ "\n";
const size_t msglen = sizeof(msg) - 1;
#else
const char *msg = NULL;
@@ -539,15 +695,15 @@ postscript_dump(FILE *out)
{
#if defined __APPLE__
static const char msg[] = ""
- "[IMPORTANT]"
- /*" ------------------------------------------------"*/
- "\n""Don't forget to include the Crash Report log file under\n"
-# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
- "CrashReporter or "
+ "[IMPORTANT]"
+ /*" ------------------------------------------------"*/
+ "\n""Don't forget to include the Crash Report log file under\n"
+# ifdef CRASH_REPORTER_MAY_BE_CREATED
+ "CrashReporter or "
# endif
- "DiagnosticReports directory in bug reports.\n"
- /*"------------------------------------------------------------\n"*/
- "\n";
+ "DiagnosticReports directory in bug reports.\n"
+ /*"------------------------------------------------------------\n"*/
+ "\n";
const size_t msglen = sizeof(msg) - 1;
#else
const char *msg = NULL;
@@ -556,6 +712,7 @@ postscript_dump(FILE *out)
bug_important_message(out, msg, msglen);
}
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
static void
bug_report_begin_valist(FILE *out, const char *fmt, va_list args)
{
@@ -564,20 +721,9 @@ bug_report_begin_valist(FILE *out, const char *fmt, va_list args)
fputs("[BUG] ", out);
vsnprintf(buf, sizeof(buf), fmt, args);
fputs(buf, out);
- snprintf(buf, sizeof(buf), "\n%s\n\n", ruby_description);
+ snprintf(buf, sizeof(buf), "\n%s\n\n", rb_dynamic_description);
fputs(buf, out);
preface_dump(out);
-
-#if RUBY_DEVEL
- const char *cmd = getenv("RUBY_ON_BUG");
- if (cmd) {
- snprintf(buf, sizeof(buf), "%s %"PRI_PIDT_PREFIX"d", cmd, getpid());
- int r = system(buf);
- if (r == -1) {
- snprintf(buf, sizeof(buf), "Launching RUBY_ON_BUG command failed.");
- }
- }
-#endif
}
#define bug_report_begin(out, fmt) do { \
@@ -592,11 +738,11 @@ bug_report_end(FILE *out)
{
/* call additional bug reporters */
{
- int i;
- for (i=0; i<bug_reporters_size; i++) {
- struct bug_reporters *reporter = &bug_reporters[i];
- (*reporter->func)(out, reporter->data);
- }
+ int i;
+ for (i=0; i<bug_reporters_size; i++) {
+ struct bug_reporters *reporter = &bug_reporters[i];
+ (*reporter->func)(out, reporter->data);
+ }
}
postscript_dump(out);
}
@@ -604,18 +750,18 @@ bug_report_end(FILE *out)
#define report_bug(file, line, fmt, ctx) do { \
FILE *out = bug_report_file(file, line); \
if (out) { \
- bug_report_begin(out, fmt); \
- rb_vm_bugreport(ctx); \
- bug_report_end(out); \
+ bug_report_begin(out, fmt); \
+ rb_vm_bugreport(ctx); \
+ bug_report_end(out); \
} \
} while (0) \
#define report_bug_valist(file, line, fmt, ctx, args) do { \
FILE *out = bug_report_file(file, line); \
if (out) { \
- bug_report_begin_valist(out, fmt, args); \
- rb_vm_bugreport(ctx); \
- bug_report_end(out); \
+ bug_report_begin_valist(out, fmt, args); \
+ rb_vm_bugreport(ctx); \
+ bug_report_end(out); \
} \
} while (0) \
@@ -630,18 +776,27 @@ die(void)
abort();
}
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
void
-rb_bug(const char *fmt, ...)
+rb_bug_without_die(const char *fmt, va_list args)
{
const char *file = NULL;
int line = 0;
if (GET_EC()) {
- file = rb_source_location_cstr(&line);
+ file = rb_source_location_cstr(&line);
}
- report_bug(file, line, fmt, NULL);
+ report_bug_valist(file, line, fmt, NULL, args);
+}
+void
+rb_bug(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ rb_bug_without_die(fmt, args);
+ va_end(args);
die();
}
@@ -652,7 +807,7 @@ rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const voi
int line = 0;
if (GET_EC()) {
- file = rb_source_location_cstr(&line);
+ file = rb_source_location_cstr(&line);
}
report_bug(file, line, fmt, ctx);
@@ -692,17 +847,17 @@ rb_async_bug_errno(const char *mesg, int errno_arg)
WRITE_CONST(2, "\n");
if (errno_arg == 0) {
- WRITE_CONST(2, "errno == 0 (NOERROR)\n");
+ WRITE_CONST(2, "errno == 0 (NOERROR)\n");
}
else {
- const char *errno_str = rb_strerrno(errno_arg);
+ const char *errno_str = rb_strerrno(errno_arg);
- if (!errno_str)
- errno_str = "undefined errno";
- write_or_abort(2, errno_str, strlen(errno_str));
+ if (!errno_str)
+ errno_str = "undefined errno";
+ write_or_abort(2, errno_str, strlen(errno_str));
}
WRITE_CONST(2, "\n\n");
- write_or_abort(2, ruby_description, strlen(ruby_description));
+ write_or_abort(2, rb_dynamic_description, strlen(rb_dynamic_description));
abort();
}
@@ -718,7 +873,7 @@ rb_assert_failure(const char *file, int line, const char *name, const char *expr
FILE *out = stderr;
fprintf(out, "Assertion Failed: %s:%d:", file, line);
if (name) fprintf(out, "%s:", name);
- fprintf(out, "%s\n%s\n\n", expr, ruby_description);
+ fprintf(out, "%s\n%s\n\n", expr, rb_dynamic_description);
preface_dump(out);
rb_vm_bugreport(NULL);
bug_report_end(out);
@@ -736,7 +891,7 @@ static const char builtin_types[][10] = {
"Array",
"Hash",
"Struct",
- "Bignum",
+ "Integer",
"File",
"Data", /* internal use: wrapped C pointers */
"MatchData", /* data of $~ */
@@ -747,14 +902,14 @@ static const char builtin_types[][10] = {
"true",
"false",
"Symbol", /* :symbol */
- "Fixnum",
+ "Integer",
"undef", /* internal use: #undef; should not happen */
"", /* 0x17 */
"", /* 0x18 */
"", /* 0x19 */
- "Memo", /* internal use: general memo */
- "Node", /* internal use: syntax tree node */
- "iClass", /* internal use: mixed-in module holder */
+ "<Memo>", /* internal use: general memo */
+ "<Node>", /* internal use: syntax tree node */
+ "<iClass>", /* internal use: mixed-in module holder */
};
const char *
@@ -767,28 +922,39 @@ rb_builtin_type_name(int t)
return 0;
}
+static VALUE
+displaying_class_of(VALUE x)
+{
+ switch (x) {
+ case Qfalse: return rb_fstring_cstr("false");
+ case Qnil: return rb_fstring_cstr("nil");
+ case Qtrue: return rb_fstring_cstr("true");
+ default: return rb_obj_class(x);
+ }
+}
+
static const char *
builtin_class_name(VALUE x)
{
const char *etype;
if (NIL_P(x)) {
- etype = "nil";
+ etype = "nil";
}
else if (FIXNUM_P(x)) {
- etype = "Integer";
+ etype = "Integer";
}
else if (SYMBOL_P(x)) {
- etype = "Symbol";
+ etype = "Symbol";
}
else if (RB_TYPE_P(x, T_TRUE)) {
- etype = "true";
+ etype = "true";
}
else if (RB_TYPE_P(x, T_FALSE)) {
- etype = "false";
+ etype = "false";
}
else {
- etype = NULL;
+ etype = NULL;
}
return etype;
}
@@ -799,12 +965,12 @@ rb_builtin_class_name(VALUE x)
const char *etype = builtin_class_name(x);
if (!etype) {
- etype = rb_obj_classname(x);
+ etype = rb_obj_classname(x);
}
return etype;
}
-NORETURN(static void unexpected_type(VALUE, int, int));
+COLDFUNC NORETURN(static void unexpected_type(VALUE, int, int));
#define UNDEF_LEAKED "undef leaked to the Ruby space"
static void
@@ -814,21 +980,16 @@ unexpected_type(VALUE x, int xt, int t)
VALUE mesg, exc = rb_eFatal;
if (tname) {
- const char *cname = builtin_class_name(x);
- if (cname)
- mesg = rb_sprintf("wrong argument type %s (expected %s)",
- cname, tname);
- else
- mesg = rb_sprintf("wrong argument type %"PRIsVALUE" (expected %s)",
- rb_obj_class(x), tname);
- exc = rb_eTypeError;
+ mesg = rb_sprintf("wrong argument type %"PRIsVALUE" (expected %s)",
+ displaying_class_of(x), tname);
+ exc = rb_eTypeError;
}
else if (xt > T_MASK && xt <= 0x3f) {
- mesg = rb_sprintf("unknown type 0x%x (0x%x given, probably comes"
- " from extension library for ruby 1.8)", t, xt);
+ mesg = rb_sprintf("unknown type 0x%x (0x%x given, probably comes"
+ " from extension library for ruby 1.8)", t, xt);
}
else {
- mesg = rb_sprintf("unknown type 0x%x (0x%x given)", t, xt);
+ mesg = rb_sprintf("unknown type 0x%x (0x%x given)", t, xt);
}
rb_exc_raise(rb_exc_new_str(exc, mesg));
}
@@ -838,21 +999,29 @@ rb_check_type(VALUE x, int t)
{
int xt;
- if (x == Qundef) {
- rb_bug(UNDEF_LEAKED);
+ if (RB_UNLIKELY(UNDEF_P(x))) {
+ rb_bug(UNDEF_LEAKED);
}
xt = TYPE(x);
- if (xt != t || (xt == T_DATA && RTYPEDDATA_P(x))) {
- unexpected_type(x, xt, t);
+ if (xt != t || (xt == T_DATA && rbimpl_rtypeddata_p(x))) {
+ /*
+ * Typed data is not simple `T_DATA`, but in a sense an
+ * extension of `struct RVALUE`, which are incompatible with
+ * each other except when inherited.
+ *
+ * So it is not enough to just check `T_DATA`, it must be
+ * identified by its `type` using `Check_TypedStruct` instead.
+ */
+ unexpected_type(x, xt, t);
}
}
void
rb_unexpected_type(VALUE x, int t)
{
- if (x == Qundef) {
- rb_bug(UNDEF_LEAKED);
+ if (RB_UNLIKELY(UNDEF_P(x))) {
+ rb_bug(UNDEF_LEAKED);
}
unexpected_type(x, TYPE(x), t);
@@ -862,8 +1031,8 @@ int
rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent)
{
while (child) {
- if (child == parent) return 1;
- child = child->parent;
+ if (child == parent) return 1;
+ child = child->parent;
}
return 0;
}
@@ -872,8 +1041,8 @@ int
rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type)
{
if (!RB_TYPE_P(obj, T_DATA) ||
- !RTYPEDDATA_P(obj) || !rb_typeddata_inherited_p(RTYPEDDATA_TYPE(obj), data_type)) {
- return 0;
+ !RTYPEDDATA_P(obj) || !rb_typeddata_inherited_p(RTYPEDDATA_TYPE(obj), data_type)) {
+ return 0;
}
return 1;
}
@@ -888,26 +1057,26 @@ rb_typeddata_is_instance_of(VALUE obj, const rb_data_type_t *data_type)
void *
rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type)
{
- const char *etype;
+ VALUE actual;
if (!RB_TYPE_P(obj, T_DATA)) {
- wrong_type:
- etype = builtin_class_name(obj);
- if (!etype)
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected %s)",
- rb_obj_class(obj), data_type->wrap_struct_name);
- wrong_datatype:
- rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
- etype, data_type->wrap_struct_name);
- }
- if (!RTYPEDDATA_P(obj)) {
- goto wrong_type;
+ actual = displaying_class_of(obj);
+ }
+ else if (!RTYPEDDATA_P(obj)) {
+ actual = displaying_class_of(obj);
}
else if (!rb_typeddata_inherited_p(RTYPEDDATA_TYPE(obj), data_type)) {
- etype = RTYPEDDATA_TYPE(obj)->wrap_struct_name;
- goto wrong_datatype;
+ const char *name = RTYPEDDATA_TYPE(obj)->wrap_struct_name;
+ actual = rb_str_new_cstr(name); /* or rb_fstring_cstr? not sure... */
}
- return DATA_PTR(obj);
+ else {
+ return DATA_PTR(obj);
+ }
+
+ const char *expected = data_type->wrap_struct_name;
+ rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected %s)",
+ actual, expected);
+ UNREACHABLE_RETURN(NULL);
}
/* exception classes */
@@ -933,6 +1102,7 @@ VALUE rb_eNotImpError;
VALUE rb_eNoMemError;
VALUE rb_cNameErrorMesg;
VALUE rb_eNoMatchingPatternError;
+VALUE rb_eNoMatchingPatternKeyError;
VALUE rb_eScriptError;
VALUE rb_eSyntaxError;
@@ -944,8 +1114,8 @@ static VALUE rb_eNOERROR;
ID ruby_static_id_cause;
#define id_cause ruby_static_id_cause
-static ID id_message, id_backtrace;
-static ID id_key, id_args, id_Errno, id_errno, id_i_path;
+static ID id_message, id_detailed_message, id_backtrace;
+static ID id_key, id_matchee, id_args, id_Errno, id_errno, id_i_path;
static ID id_receiver, id_recv, id_iseq, id_local_variables;
static ID id_private_call_p, id_top, id_bottom;
#define id_bt idBt
@@ -986,7 +1156,8 @@ exc_init(VALUE exc, VALUE mesg)
/*
* call-seq:
- * Exception.new(msg = nil) -> exception
+ * Exception.new(msg = nil) -> exception
+ * Exception.exception(msg = nil) -> exception
*
* Construct a new Exception object, optionally passing in
* a message.
@@ -1005,7 +1176,7 @@ exc_initialize(int argc, VALUE *argv, VALUE exc)
* Document-method: exception
*
* call-seq:
- * exc.exception(string) -> an_exception or exc
+ * exc.exception([string]) -> an_exception or exc
*
* With no argument, or if the argument is the same as the receiver,
* return the receiver. Otherwise, create a new
@@ -1045,13 +1216,28 @@ exc_to_s(VALUE exc)
}
/* FIXME: Include eval_error.c */
-void rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE highlight, VALUE reverse);
+void rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE opt, VALUE highlight, VALUE reverse);
VALUE
rb_get_message(VALUE exc)
{
VALUE e = rb_check_funcall(exc, id_message, 0, 0);
- if (e == Qundef) return Qnil;
+ if (UNDEF_P(e)) return Qnil;
+ if (!RB_TYPE_P(e, T_STRING)) e = rb_check_string_type(e);
+ return e;
+}
+
+VALUE
+rb_get_detailed_message(VALUE exc, VALUE opt)
+{
+ VALUE e;
+ if (NIL_P(opt)) {
+ e = rb_check_funcall(exc, id_detailed_message, 0, 0);
+ }
+ else {
+ e = rb_check_funcall_kw(exc, id_detailed_message, 1, &opt, 1);
+ }
+ if (UNDEF_P(e)) return Qnil;
if (!RB_TYPE_P(e, T_STRING)) e = rb_check_string_type(e);
return e;
}
@@ -1065,7 +1251,57 @@ rb_get_message(VALUE exc)
static VALUE
exc_s_to_tty_p(VALUE self)
{
- return rb_stderr_tty_p() ? Qtrue : Qfalse;
+ return RBOOL(rb_stderr_tty_p());
+}
+
+static VALUE
+check_highlight_keyword(VALUE opt, int auto_tty_detect)
+{
+ VALUE highlight = Qnil;
+
+ if (!NIL_P(opt)) {
+ highlight = rb_hash_lookup(opt, sym_highlight);
+
+ switch (highlight) {
+ default:
+ rb_bool_expected(highlight, "highlight", TRUE);
+ UNREACHABLE;
+ case Qtrue: case Qfalse: case Qnil: break;
+ }
+ }
+
+ if (NIL_P(highlight)) {
+ highlight = RBOOL(auto_tty_detect && rb_stderr_tty_p());
+ }
+
+ return highlight;
+}
+
+static VALUE
+check_order_keyword(VALUE opt)
+{
+ VALUE order = Qnil;
+
+ if (!NIL_P(opt)) {
+ static VALUE kw_order;
+ if (!kw_order) kw_order = ID2SYM(rb_intern_const("order"));
+
+ order = rb_hash_lookup(opt, kw_order);
+
+ if (order != Qnil) {
+ ID id = rb_check_id(&order);
+ if (id == id_bottom) order = Qtrue;
+ else if (id == id_top) order = Qfalse;
+ else {
+ rb_raise(rb_eArgError, "expected :top or :bottom as "
+ "order: %+"PRIsVALUE, order);
+ }
+ }
+ }
+
+ if (NIL_P(order)) order = Qfalse;
+
+ return order;
}
/*
@@ -1090,44 +1326,23 @@ static VALUE
exc_full_message(int argc, VALUE *argv, VALUE exc)
{
VALUE opt, str, emesg, errat;
- enum {kw_highlight, kw_order, kw_max_};
- static ID kw[kw_max_];
- VALUE args[kw_max_] = {Qnil, Qnil};
+ VALUE highlight, order;
rb_scan_args(argc, argv, "0:", &opt);
- if (!NIL_P(opt)) {
- if (!kw[0]) {
-#define INIT_KW(n) kw[kw_##n] = rb_intern_const(#n)
- INIT_KW(highlight);
- INIT_KW(order);
-#undef INIT_KW
- }
- rb_get_kwargs(opt, kw, 0, kw_max_, args);
- switch (args[kw_highlight]) {
- default:
- rb_raise(rb_eArgError, "expected true or false as "
- "highlight: %+"PRIsVALUE, args[kw_highlight]);
- case Qundef: args[kw_highlight] = Qnil; break;
- case Qtrue: case Qfalse: case Qnil: break;
- }
- if (args[kw_order] == Qundef) {
- args[kw_order] = Qnil;
- }
- else {
- ID id = rb_check_id(&args[kw_order]);
- if (id == id_bottom) args[kw_order] = Qtrue;
- else if (id == id_top) args[kw_order] = Qfalse;
- else {
- rb_raise(rb_eArgError, "expected :top or :bottom as "
- "order: %+"PRIsVALUE, args[kw_order]);
- }
- }
+
+ highlight = check_highlight_keyword(opt, 1);
+ order = check_order_keyword(opt);
+
+ {
+ if (NIL_P(opt)) opt = rb_hash_new();
+ rb_hash_aset(opt, sym_highlight, highlight);
}
+
str = rb_str_new2("");
errat = rb_get_backtrace(exc);
- emesg = rb_get_message(exc);
+ emesg = rb_get_detailed_message(exc, opt);
- rb_error_write(exc, emesg, errat, str, args[kw_highlight], args[kw_order]);
+ rb_error_write(exc, emesg, errat, str, opt, highlight, order);
return str;
}
@@ -1147,6 +1362,60 @@ exc_message(VALUE exc)
/*
* call-seq:
+ * exception.detailed_message(highlight: bool, **opt) -> string
+ *
+ * Processes a string returned by #message.
+ *
+ * It may add the class name of the exception to the end of the first line.
+ * Also, when +highlight+ keyword is true, it adds ANSI escape sequences to
+ * make the message bold.
+ *
+ * If you override this method, it must be tolerant for unknown keyword
+ * arguments. All keyword arguments passed to #full_message are delegated
+ * to this method.
+ *
+ * This method is overridden by did_you_mean and error_highlight to add
+ * their information.
+ *
+ * A user-defined exception class can also define their own
+ * +detailed_message+ method to add supplemental information.
+ * When +highlight+ is true, it can return a string containing escape
+ * sequences, but use widely-supported ones. It is recommended to limit
+ * the following codes:
+ *
+ * - Reset (+\e[0m+)
+ * - Bold (+\e[1m+)
+ * - Underline (+\e[4m+)
+ * - Foreground color except white and black
+ * - Red (+\e[31m+)
+ * - Green (+\e[32m+)
+ * - Yellow (+\e[33m+)
+ * - Blue (+\e[34m+)
+ * - Magenta (+\e[35m+)
+ * - Cyan (+\e[36m+)
+ *
+ * Use escape sequences carefully even if +highlight+ is true.
+ * Do not use escape sequences to express essential information;
+ * the message should be readable even if all escape sequences are
+ * ignored.
+ */
+
+static VALUE
+exc_detailed_message(int argc, VALUE *argv, VALUE exc)
+{
+ VALUE opt;
+
+ rb_scan_args(argc, argv, "0:", &opt);
+
+ VALUE highlight = check_highlight_keyword(opt, 0);
+
+ extern VALUE rb_decorate_message(const VALUE eclass, const VALUE emesg, int highlight);
+
+ return rb_decorate_message(CLASS_OF(exc), rb_get_message(exc), RTEST(highlight));
+}
+
+/*
+ * call-seq:
* exception.inspect -> string
*
* Return this exception's class name and message.
@@ -1166,8 +1435,15 @@ exc_inspect(VALUE exc)
str = rb_str_buf_new2("#<");
klass = rb_class_name(klass);
rb_str_buf_append(str, klass);
- rb_str_buf_cat(str, ": ", 2);
- rb_str_buf_append(str, exc);
+
+ if (RTEST(rb_str_include(exc, rb_str_new2("\n")))) {
+ rb_str_catf(str, ":%+"PRIsVALUE, exc);
+ }
+ else {
+ rb_str_buf_cat(str, ": ", 2);
+ rb_str_buf_append(str, exc);
+ }
+
rb_str_buf_cat(str, ">", 1);
return str;
@@ -1216,8 +1492,8 @@ exc_backtrace(VALUE exc)
obj = rb_attr_get(exc, id_bt);
if (rb_backtrace_p(obj)) {
- obj = rb_backtrace_to_str_ary(obj);
- /* rb_ivar_set(exc, id_bt, obj); */
+ obj = rb_backtrace_to_str_ary(obj);
+ /* rb_ivar_set(exc, id_bt, obj); */
}
return obj;
@@ -1231,16 +1507,16 @@ rb_get_backtrace(VALUE exc)
ID mid = id_backtrace;
VALUE info;
if (rb_method_basic_definition_p(CLASS_OF(exc), id_backtrace)) {
- VALUE klass = rb_eException;
- rb_execution_context_t *ec = GET_EC();
- if (NIL_P(exc))
- return Qnil;
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_CALL, exc, mid, mid, klass, Qundef);
- info = exc_backtrace(exc);
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_RETURN, exc, mid, mid, klass, info);
+ VALUE klass = rb_eException;
+ rb_execution_context_t *ec = GET_EC();
+ if (NIL_P(exc))
+ return Qnil;
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_CALL, exc, mid, mid, klass, Qundef);
+ info = exc_backtrace(exc);
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_RETURN, exc, mid, mid, klass, info);
}
else {
- info = rb_funcallv(exc, mid, 0, 0);
+ info = rb_funcallv(exc, mid, 0, 0);
}
if (NIL_P(info)) return Qnil;
return rb_check_backtrace(info);
@@ -1263,7 +1539,7 @@ exc_backtrace_locations(VALUE exc)
obj = rb_attr_get(exc, id_bt_locations);
if (!NIL_P(obj)) {
- obj = rb_backtrace_to_location_ary(obj);
+ obj = rb_backtrace_to_location_ary(obj);
}
return obj;
}
@@ -1275,17 +1551,17 @@ rb_check_backtrace(VALUE bt)
static const char err[] = "backtrace must be Array of String";
if (!NIL_P(bt)) {
- if (RB_TYPE_P(bt, T_STRING)) return rb_ary_new3(1, bt);
- if (rb_backtrace_p(bt)) return bt;
- if (!RB_TYPE_P(bt, T_ARRAY)) {
- rb_raise(rb_eTypeError, err);
- }
- for (i=0;i<RARRAY_LEN(bt);i++) {
- VALUE e = RARRAY_AREF(bt, i);
- if (!RB_TYPE_P(e, T_STRING)) {
- rb_raise(rb_eTypeError, err);
- }
- }
+ if (RB_TYPE_P(bt, T_STRING)) return rb_ary_new3(1, bt);
+ if (rb_backtrace_p(bt)) return bt;
+ if (!RB_TYPE_P(bt, T_ARRAY)) {
+ rb_raise(rb_eTypeError, err);
+ }
+ for (i=0;i<RARRAY_LEN(bt);i++) {
+ VALUE e = RARRAY_AREF(bt, i);
+ if (!RB_TYPE_P(e, T_STRING)) {
+ rb_raise(rb_eTypeError, err);
+ }
+ }
}
return bt;
}
@@ -1350,29 +1626,27 @@ exc_equal(VALUE exc, VALUE obj)
if (exc == obj) return Qtrue;
if (rb_obj_class(exc) != rb_obj_class(obj)) {
- int state;
-
- obj = rb_protect(try_convert_to_exception, obj, &state);
- if (state || obj == Qundef) {
- rb_set_errinfo(Qnil);
- return Qfalse;
- }
- if (rb_obj_class(exc) != rb_obj_class(obj)) return Qfalse;
- mesg = rb_check_funcall(obj, id_message, 0, 0);
- if (mesg == Qundef) return Qfalse;
- backtrace = rb_check_funcall(obj, id_backtrace, 0, 0);
- if (backtrace == Qundef) return Qfalse;
+ int state;
+
+ obj = rb_protect(try_convert_to_exception, obj, &state);
+ if (state || UNDEF_P(obj)) {
+ rb_set_errinfo(Qnil);
+ return Qfalse;
+ }
+ if (rb_obj_class(exc) != rb_obj_class(obj)) return Qfalse;
+ mesg = rb_check_funcall(obj, id_message, 0, 0);
+ if (UNDEF_P(mesg)) return Qfalse;
+ backtrace = rb_check_funcall(obj, id_backtrace, 0, 0);
+ if (UNDEF_P(backtrace)) return Qfalse;
}
else {
- mesg = rb_attr_get(obj, id_mesg);
- backtrace = exc_backtrace(obj);
+ mesg = rb_attr_get(obj, id_mesg);
+ backtrace = exc_backtrace(obj);
}
if (!rb_equal(rb_attr_get(exc, id_mesg), mesg))
- return Qfalse;
- if (!rb_equal(exc_backtrace(exc), backtrace))
- return Qfalse;
- return Qtrue;
+ return Qfalse;
+ return rb_equal(exc_backtrace(exc), backtrace);
}
/*
@@ -1392,37 +1666,37 @@ exit_initialize(int argc, VALUE *argv, VALUE exc)
{
VALUE status;
if (argc > 0) {
- status = *argv;
-
- switch (status) {
- case Qtrue:
- status = INT2FIX(EXIT_SUCCESS);
- ++argv;
- --argc;
- break;
- case Qfalse:
- status = INT2FIX(EXIT_FAILURE);
- ++argv;
- --argc;
- break;
- default:
- status = rb_check_to_int(status);
- if (NIL_P(status)) {
- status = INT2FIX(EXIT_SUCCESS);
- }
- else {
+ status = *argv;
+
+ switch (status) {
+ case Qtrue:
+ status = INT2FIX(EXIT_SUCCESS);
+ ++argv;
+ --argc;
+ break;
+ case Qfalse:
+ status = INT2FIX(EXIT_FAILURE);
+ ++argv;
+ --argc;
+ break;
+ default:
+ status = rb_check_to_int(status);
+ if (NIL_P(status)) {
+ status = INT2FIX(EXIT_SUCCESS);
+ }
+ else {
#if EXIT_SUCCESS != 0
- if (status == INT2FIX(0))
- status = INT2FIX(EXIT_SUCCESS);
+ if (status == INT2FIX(0))
+ status = INT2FIX(EXIT_SUCCESS);
#endif
- ++argv;
- --argc;
- }
- break;
- }
+ ++argv;
+ --argc;
+ }
+ break;
+ }
}
else {
- status = INT2FIX(EXIT_SUCCESS);
+ status = INT2FIX(EXIT_SUCCESS);
}
rb_call_super(argc, argv);
rb_ivar_set(exc, id_status, status);
@@ -1458,18 +1732,15 @@ exit_success_p(VALUE exc)
int status;
if (NIL_P(status_val))
- return Qtrue;
+ return Qtrue;
status = NUM2INT(status_val);
- if (WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS)
- return Qtrue;
-
- return Qfalse;
+ return RBOOL(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS);
}
static VALUE
err_init_recv(VALUE exc, VALUE recv)
{
- if (recv != Qundef) rb_ivar_set(exc, id_recv, recv);
+ if (!UNDEF_P(recv)) rb_ivar_set(exc, id_recv, recv);
return exc;
}
@@ -1547,7 +1818,9 @@ name_err_init_attr(VALUE exc, VALUE recv, VALUE method)
cfp = rb_vm_get_ruby_level_next_cfp(ec, cfp);
rb_ivar_set(exc, id_name, method);
err_init_recv(exc, recv);
- if (cfp) rb_ivar_set(exc, id_iseq, rb_iseqw_new(cfp->iseq));
+ if (cfp && VM_FRAME_TYPE(cfp) != VM_FRAME_MAGIC_DUMMY) {
+ rb_ivar_set(exc, id_iseq, rb_iseqw_new(cfp->iseq));
+ }
return exc;
}
@@ -1624,10 +1897,10 @@ name_err_local_variables(VALUE self)
VALUE vars = rb_attr_get(self, id_local_variables);
if (NIL_P(vars)) {
- VALUE iseqw = rb_attr_get(self, id_iseq);
- if (!NIL_P(iseqw)) vars = rb_iseqw_local_variables(iseqw);
- if (NIL_P(vars)) vars = rb_ary_new();
- rb_ivar_set(self, id_local_variables, vars);
+ VALUE iseqw = rb_attr_get(self, id_iseq);
+ if (!NIL_P(iseqw)) vars = rb_iseqw_local_variables(iseqw);
+ if (NIL_P(vars)) vars = rb_ary_new();
+ rb_ivar_set(self, id_local_variables, vars);
}
return vars;
}
@@ -1636,7 +1909,7 @@ static VALUE
nometh_err_init_attr(VALUE exc, VALUE args, int priv)
{
rb_ivar_set(exc, id_args, args);
- rb_ivar_set(exc, id_private_call_p, priv ? Qtrue : Qfalse);
+ rb_ivar_set(exc, id_private_call_p, RBOOL(priv));
return exc;
}
@@ -1703,18 +1976,18 @@ name_err_mesg_memsize(const void *p)
static const rb_data_type_t name_err_mesg_data_type = {
"name_err_mesg",
{
- name_err_mesg_mark,
- name_err_mesg_free,
- name_err_mesg_memsize,
+ name_err_mesg_mark,
+ name_err_mesg_free,
+ name_err_mesg_memsize,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
/* :nodoc: */
static VALUE
-rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method)
+rb_name_err_mesg_init(VALUE klass, VALUE mesg, VALUE recv, VALUE method)
{
- VALUE result = TypedData_Wrap_Struct(rb_cNameErrorMesg, &name_err_mesg_data_type, 0);
+ VALUE result = TypedData_Wrap_Struct(klass, &name_err_mesg_data_type, 0);
VALUE *ptr = ALLOC_N(VALUE, NAME_ERR_MESG_COUNT);
ptr[NAME_ERR_MESG__MESG] = mesg;
@@ -1726,6 +1999,35 @@ rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method)
/* :nodoc: */
static VALUE
+rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method)
+{
+ return rb_name_err_mesg_init(rb_cNameErrorMesg, mesg, recv, method);
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_alloc(VALUE klass)
+{
+ return rb_name_err_mesg_init(klass, Qnil, Qnil, Qnil);
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_init_copy(VALUE obj1, VALUE obj2)
+{
+ VALUE *ptr1, *ptr2;
+
+ if (obj1 == obj2) return obj1;
+ rb_obj_init_copy(obj1, obj2);
+
+ TypedData_Get_Struct(obj1, VALUE, &name_err_mesg_data_type, ptr1);
+ TypedData_Get_Struct(obj2, VALUE, &name_err_mesg_data_type, ptr2);
+ MEMCPY(ptr1, ptr2, VALUE, NAME_ERR_MESG_COUNT);
+ return obj1;
+}
+
+/* :nodoc: */
+static VALUE
name_err_mesg_equal(VALUE obj1, VALUE obj2)
{
VALUE *ptr1, *ptr2;
@@ -1733,19 +2035,30 @@ name_err_mesg_equal(VALUE obj1, VALUE obj2)
if (obj1 == obj2) return Qtrue;
if (rb_obj_class(obj2) != rb_cNameErrorMesg)
- return Qfalse;
+ return Qfalse;
TypedData_Get_Struct(obj1, VALUE, &name_err_mesg_data_type, ptr1);
TypedData_Get_Struct(obj2, VALUE, &name_err_mesg_data_type, ptr2);
for (i=0; i<NAME_ERR_MESG_COUNT; i++) {
- if (!rb_equal(ptr1[i], ptr2[i]))
- return Qfalse;
+ if (!rb_equal(ptr1[i], ptr2[i]))
+ return Qfalse;
}
return Qtrue;
}
/* :nodoc: */
static VALUE
+name_err_mesg_receiver_name(VALUE obj)
+{
+ if (RB_SPECIAL_CONST_P(obj)) return Qundef;
+ if (RB_BUILTIN_TYPE(obj) == T_MODULE || RB_BUILTIN_TYPE(obj) == T_CLASS) {
+ return rb_check_funcall(obj, rb_intern("name"), 0, 0);
+ }
+ return Qundef;
+}
+
+/* :nodoc: */
+static VALUE
name_err_mesg_to_str(VALUE obj)
{
VALUE *ptr, mesg;
@@ -1754,45 +2067,49 @@ name_err_mesg_to_str(VALUE obj)
mesg = ptr[NAME_ERR_MESG__MESG];
if (NIL_P(mesg)) return Qnil;
else {
- struct RString s_str, d_str;
- VALUE c, s, d = 0, args[4];
- int state = 0, singleton = 0;
- rb_encoding *usascii = rb_usascii_encoding();
+ struct RString s_str, d_str;
+ VALUE c, s, d = 0, args[4];
+ int state = 0, singleton = 0;
+ rb_encoding *usascii = rb_usascii_encoding();
#define FAKE_CSTR(v, str) rb_setup_fake_str((v), (str), rb_strlen_lit(str), usascii)
- obj = ptr[NAME_ERR_MESG__RECV];
- switch (obj) {
- case Qnil:
- d = FAKE_CSTR(&d_str, "nil");
- break;
- case Qtrue:
- d = FAKE_CSTR(&d_str, "true");
- break;
- case Qfalse:
- d = FAKE_CSTR(&d_str, "false");
- break;
- default:
- d = rb_protect(rb_inspect, obj, &state);
- if (state)
- rb_set_errinfo(Qnil);
- if (NIL_P(d) || RSTRING_LEN(d) > 65) {
- d = rb_any_to_s(obj);
- }
- singleton = (RSTRING_LEN(d) > 0 && RSTRING_PTR(d)[0] == '#');
- break;
- }
- if (!singleton) {
- s = FAKE_CSTR(&s_str, ":");
- c = rb_class_name(CLASS_OF(obj));
- }
- else {
- c = s = FAKE_CSTR(&s_str, "");
- }
+ obj = ptr[NAME_ERR_MESG__RECV];
+ switch (obj) {
+ case Qnil:
+ d = FAKE_CSTR(&d_str, "nil");
+ break;
+ case Qtrue:
+ d = FAKE_CSTR(&d_str, "true");
+ break;
+ case Qfalse:
+ d = FAKE_CSTR(&d_str, "false");
+ break;
+ default:
+ d = rb_protect(name_err_mesg_receiver_name, obj, &state);
+ if (state || NIL_OR_UNDEF_P(d))
+ d = rb_protect(rb_inspect, obj, &state);
+ if (state) {
+ rb_set_errinfo(Qnil);
+ }
+ d = rb_check_string_type(d);
+ if (NIL_P(d)) {
+ d = rb_any_to_s(obj);
+ }
+ singleton = (RSTRING_LEN(d) > 0 && RSTRING_PTR(d)[0] == '#');
+ break;
+ }
+ if (!singleton) {
+ s = FAKE_CSTR(&s_str, ":");
+ c = rb_class_name(CLASS_OF(obj));
+ }
+ else {
+ c = s = FAKE_CSTR(&s_str, "");
+ }
args[0] = rb_obj_as_string(ptr[NAME_ERR_MESG__NAME]);
- args[1] = d;
- args[2] = s;
- args[3] = c;
- mesg = rb_str_format(4, args, mesg);
+ args[1] = d;
+ args[2] = s;
+ args[3] = c;
+ mesg = rb_str_format(4, args, mesg);
}
return mesg;
}
@@ -1824,11 +2141,11 @@ name_err_receiver(VALUE self)
VALUE *ptr, recv, mesg;
recv = rb_ivar_lookup(self, id_recv, Qundef);
- if (recv != Qundef) return recv;
+ if (!UNDEF_P(recv)) return recv;
mesg = rb_attr_get(self, id_mesg);
if (!rb_typeddata_is_kind_of(mesg, &name_err_mesg_data_type)) {
- rb_raise(rb_eArgError, "no receiver is available");
+ rb_raise(rb_eArgError, "no receiver is available");
}
ptr = DATA_PTR(mesg);
return ptr[NAME_ERR_MESG__RECV];
@@ -1882,7 +2199,7 @@ key_err_receiver(VALUE self)
VALUE recv;
recv = rb_ivar_lookup(self, id_receiver, Qundef);
- if (recv != Qundef) return recv;
+ if (!UNDEF_P(recv)) return recv;
rb_raise(rb_eArgError, "no receiver is available");
}
@@ -1899,7 +2216,7 @@ key_err_key(VALUE self)
VALUE key;
key = rb_ivar_lookup(self, id_key, Qundef);
- if (key != Qundef) return key;
+ if (!UNDEF_P(key)) return key;
rb_raise(rb_eArgError, "no key is available");
}
@@ -1930,17 +2247,17 @@ key_err_initialize(int argc, VALUE *argv, VALUE self)
rb_call_super(rb_scan_args(argc, argv, "01:", NULL, &options), argv);
if (!NIL_P(options)) {
- ID keywords[2];
- VALUE values[numberof(keywords)];
- int i;
- keywords[0] = id_receiver;
- keywords[1] = id_key;
- rb_get_kwargs(options, keywords, 0, numberof(values), values);
- for (i = 0; i < numberof(values); ++i) {
- if (values[i] != Qundef) {
- rb_ivar_set(self, keywords[i], values[i]);
- }
- }
+ ID keywords[2];
+ VALUE values[numberof(keywords)];
+ int i;
+ keywords[0] = id_receiver;
+ keywords[1] = id_key;
+ rb_get_kwargs(options, keywords, 0, numberof(values), values);
+ for (i = 0; i < numberof(values); ++i) {
+ if (!UNDEF_P(values[i])) {
+ rb_ivar_set(self, keywords[i], values[i]);
+ }
+ }
}
return self;
@@ -1948,6 +2265,73 @@ key_err_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
+ * no_matching_pattern_key_error.matchee -> object
+ *
+ * Return the matchee associated with this NoMatchingPatternKeyError exception.
+ */
+
+static VALUE
+no_matching_pattern_key_err_matchee(VALUE self)
+{
+ VALUE matchee;
+
+ matchee = rb_ivar_lookup(self, id_matchee, Qundef);
+ if (!UNDEF_P(matchee)) return matchee;
+ rb_raise(rb_eArgError, "no matchee is available");
+}
+
+/*
+ * call-seq:
+ * no_matching_pattern_key_error.key -> object
+ *
+ * Return the key caused this NoMatchingPatternKeyError exception.
+ */
+
+static VALUE
+no_matching_pattern_key_err_key(VALUE self)
+{
+ VALUE key;
+
+ key = rb_ivar_lookup(self, id_key, Qundef);
+ if (!UNDEF_P(key)) return key;
+ rb_raise(rb_eArgError, "no key is available");
+}
+
+/*
+ * call-seq:
+ * NoMatchingPatternKeyError.new(message=nil, matchee: nil, key: nil) -> no_matching_pattern_key_error
+ *
+ * Construct a new +NoMatchingPatternKeyError+ exception with the given message,
+ * matchee and key.
+ */
+
+static VALUE
+no_matching_pattern_key_err_initialize(int argc, VALUE *argv, VALUE self)
+{
+ VALUE options;
+
+ rb_call_super(rb_scan_args(argc, argv, "01:", NULL, &options), argv);
+
+ if (!NIL_P(options)) {
+ ID keywords[2];
+ VALUE values[numberof(keywords)];
+ int i;
+ keywords[0] = id_matchee;
+ keywords[1] = id_key;
+ rb_get_kwargs(options, keywords, 0, numberof(values), values);
+ for (i = 0; i < numberof(values); ++i) {
+ if (!UNDEF_P(values[i])) {
+ rb_ivar_set(self, keywords[i], values[i]);
+ }
+ }
+ }
+
+ return self;
+}
+
+
+/*
+ * call-seq:
* SyntaxError.new([msg]) -> syntax_error
*
* Construct a SyntaxError exception.
@@ -1958,13 +2342,32 @@ syntax_error_initialize(int argc, VALUE *argv, VALUE self)
{
VALUE mesg;
if (argc == 0) {
- mesg = rb_fstring_lit("compile error");
- argc = 1;
- argv = &mesg;
+ mesg = rb_fstring_lit("compile error");
+ argc = 1;
+ argv = &mesg;
}
return rb_call_super(argc, argv);
}
+static VALUE
+syntax_error_with_path(VALUE exc, VALUE path, VALUE *mesg, rb_encoding *enc)
+{
+ if (NIL_P(exc)) {
+ *mesg = rb_enc_str_new(0, 0, enc);
+ exc = rb_class_new_instance(1, mesg, rb_eSyntaxError);
+ rb_ivar_set(exc, id_i_path, path);
+ }
+ else {
+ if (rb_attr_get(exc, id_i_path) != path) {
+ rb_raise(rb_eArgError, "SyntaxError#path changed");
+ }
+ VALUE s = *mesg = rb_attr_get(exc, idMesg);
+ if (RSTRING_LEN(s) > 0 && *(RSTRING_END(s)-1) != '\n')
+ rb_str_cat_cstr(s, "\n");
+ }
+ return exc;
+}
+
/*
* Document-module: Errno
*
@@ -2003,30 +2406,30 @@ set_syserr(int n, const char *name)
st_data_t error;
if (!st_lookup(syserr_tbl, n, &error)) {
- error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
+ error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
- /* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
- switch (n) {
- case EAGAIN:
- rb_eEAGAIN = error;
+ /* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
+ switch (n) {
+ case EAGAIN:
+ rb_eEAGAIN = error;
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- break;
- case EWOULDBLOCK:
+ break;
+ case EWOULDBLOCK:
#endif
- rb_eEWOULDBLOCK = error;
- break;
- case EINPROGRESS:
- rb_eEINPROGRESS = error;
- break;
- }
+ rb_eEWOULDBLOCK = error;
+ break;
+ case EINPROGRESS:
+ rb_eEINPROGRESS = error;
+ break;
+ }
- rb_define_const(error, "Errno", INT2NUM(n));
- st_add_direct(syserr_tbl, n, error);
+ rb_define_const(error, "Errno", INT2NUM(n));
+ st_add_direct(syserr_tbl, n, error);
}
else {
- rb_define_const(rb_mErrno, name, error);
+ rb_define_const(rb_mErrno, name, error);
}
return error;
}
@@ -2037,10 +2440,10 @@ get_syserr(int n)
st_data_t error;
if (!st_lookup(syserr_tbl, n, &error)) {
- char name[8]; /* some Windows' errno have 5 digits. */
+ char name[8]; /* some Windows' errno have 5 digits. */
- snprintf(name, sizeof(name), "E%03d", n);
- error = set_syserr(n, name);
+ snprintf(name, sizeof(name), "E%03d", n);
+ error = set_syserr(n, name);
}
return error;
}
@@ -2058,41 +2461,38 @@ get_syserr(int n)
static VALUE
syserr_initialize(int argc, VALUE *argv, VALUE self)
{
-#if !defined(_WIN32)
- char *strerror();
-#endif
const char *err;
VALUE mesg, error, func, errmsg;
VALUE klass = rb_obj_class(self);
if (klass == rb_eSystemCallError) {
- st_data_t data = (st_data_t)klass;
- rb_scan_args(argc, argv, "12", &mesg, &error, &func);
- if (argc == 1 && FIXNUM_P(mesg)) {
- error = mesg; mesg = Qnil;
- }
- if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &data)) {
- klass = (VALUE)data;
- /* change class */
- if (!RB_TYPE_P(self, T_OBJECT)) { /* insurance to avoid type crash */
- rb_raise(rb_eTypeError, "invalid instance type");
- }
- RBASIC_SET_CLASS(self, klass);
- }
+ st_data_t data = (st_data_t)klass;
+ rb_scan_args(argc, argv, "12", &mesg, &error, &func);
+ if (argc == 1 && FIXNUM_P(mesg)) {
+ error = mesg; mesg = Qnil;
+ }
+ if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &data)) {
+ klass = (VALUE)data;
+ /* change class */
+ if (!RB_TYPE_P(self, T_OBJECT)) { /* insurance to avoid type crash */
+ rb_raise(rb_eTypeError, "invalid instance type");
+ }
+ RBASIC_SET_CLASS(self, klass);
+ }
}
else {
- rb_scan_args(argc, argv, "02", &mesg, &func);
- error = rb_const_get(klass, id_Errno);
+ rb_scan_args(argc, argv, "02", &mesg, &func);
+ error = rb_const_get(klass, id_Errno);
}
if (!NIL_P(error)) err = strerror(NUM2INT(error));
else err = "unknown error";
errmsg = rb_enc_str_new_cstr(err, rb_locale_encoding());
if (!NIL_P(mesg)) {
- VALUE str = StringValue(mesg);
+ VALUE str = StringValue(mesg);
- if (!NIL_P(func)) rb_str_catf(errmsg, " @ %"PRIsVALUE, func);
- rb_str_catf(errmsg, " - %"PRIsVALUE, str);
+ if (!NIL_P(func)) rb_str_catf(errmsg, " @ %"PRIsVALUE, func);
+ rb_str_catf(errmsg, " - %"PRIsVALUE, str);
}
mesg = errmsg;
@@ -2128,18 +2528,16 @@ syserr_eqq(VALUE self, VALUE exc)
VALUE num, e;
if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) {
- if (!rb_respond_to(exc, id_errno)) return Qfalse;
+ if (!rb_respond_to(exc, id_errno)) return Qfalse;
}
else if (self == rb_eSystemCallError) return Qtrue;
num = rb_attr_get(exc, id_errno);
if (NIL_P(num)) {
- num = rb_funcallv(exc, id_errno, 0, 0);
+ num = rb_funcallv(exc, id_errno, 0, 0);
}
e = rb_const_get(self, id_Errno);
- if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
- return Qtrue;
- return Qfalse;
+ return RBOOL(FIXNUM_P(num) ? num == e : rb_equal(num, e));
}
@@ -2444,6 +2842,8 @@ syserr_eqq(VALUE self, VALUE exc)
*/
/*
+ * Document-class: Exception
+ *
* \Class Exception and its subclasses are used to communicate between
* Kernel#raise and +rescue+ statements in <code>begin ... end</code> blocks.
*
@@ -2538,10 +2938,60 @@ syserr_eqq(VALUE self, VALUE exc)
* * fatal
*/
+static VALUE
+exception_alloc(VALUE klass)
+{
+ return rb_class_allocate_instance(klass);
+}
+
+static VALUE
+exception_dumper(VALUE exc)
+{
+ // TODO: Currently, the instance variables "bt" and "bt_locations"
+ // refers to the same object (Array of String). But "bt_locations"
+ // should have an Array of Thread::Backtrace::Locations.
+
+ return exc;
+}
+
+static int
+ivar_copy_i(st_data_t key, st_data_t val, st_data_t exc)
+{
+ rb_ivar_set((VALUE) exc, (ID) key, (VALUE) val);
+ return ST_CONTINUE;
+}
+
+void rb_exc_check_circular_cause(VALUE exc);
+
+static VALUE
+exception_loader(VALUE exc, VALUE obj)
+{
+ // The loader function of rb_marshal_define_compat seems to be called for two events:
+ // one is for fixup (r_fixup_compat), the other is for TYPE_USERDEF.
+ // In the former case, the first argument is an instance of Exception (because
+ // we pass rb_eException to rb_marshal_define_compat). In the latter case, the first
+ // argument is a class object (see TYPE_USERDEF case in r_object0).
+ // We want to copy all instance variables (but "bt_locations") from obj to exc.
+ // But we do not want to do so in the second case, so the following branch is for that.
+ if (RB_TYPE_P(exc, T_CLASS)) return obj; // maybe called from Marshal's TYPE_USERDEF
+
+ rb_ivar_foreach(obj, ivar_copy_i, exc);
+
+ rb_exc_check_circular_cause(exc);
+
+ if (rb_attr_get(exc, id_bt) == rb_attr_get(exc, id_bt_locations)) {
+ rb_ivar_set(exc, id_bt_locations, Qnil);
+ }
+
+ return exc;
+}
+
void
Init_Exception(void)
{
rb_eException = rb_define_class("Exception", rb_cObject);
+ rb_define_alloc_func(rb_eException, exception_alloc);
+ rb_marshal_define_compat(rb_eException, rb_eException, exception_dumper, exception_loader);
rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_define_singleton_method(rb_eException, "to_tty?", exc_s_to_tty_p, 0);
rb_define_method(rb_eException, "exception", exc_exception, -1);
@@ -2549,6 +2999,7 @@ Init_Exception(void)
rb_define_method(rb_eException, "==", exc_equal, 1);
rb_define_method(rb_eException, "to_s", exc_to_s, 0);
rb_define_method(rb_eException, "message", exc_message, 0);
+ rb_define_method(rb_eException, "detailed_message", exc_detailed_message, -1);
rb_define_method(rb_eException, "full_message", exc_full_message, -1);
rb_define_method(rb_eException, "inspect", exc_inspect, 0);
rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
@@ -2579,9 +3030,16 @@ Init_Exception(void)
rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
rb_define_method(rb_eSyntaxError, "initialize", syntax_error_initialize, -1);
+ /* RDoc will use literal name value while parsing rb_attr,
+ * and will render `idPath` as an attribute name without this trick */
+ ID path = idPath;
+
+ /* the path failed to parse */
+ rb_attr(rb_eSyntaxError, path, TRUE, FALSE, FALSE);
+
rb_eLoadError = rb_define_class("LoadError", rb_eScriptError);
/* the path failed to load */
- rb_attr(rb_eLoadError, rb_intern_const("path"), 1, 0, Qfalse);
+ rb_attr(rb_eLoadError, path, TRUE, FALSE, FALSE);
rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
@@ -2590,7 +3048,9 @@ Init_Exception(void)
rb_define_method(rb_eNameError, "name", name_err_name, 0);
rb_define_method(rb_eNameError, "receiver", name_err_receiver, 0);
rb_define_method(rb_eNameError, "local_variables", name_err_local_variables, 0);
- rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cData);
+ rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cObject);
+ rb_define_alloc_func(rb_cNameErrorMesg, name_err_mesg_alloc);
+ rb_define_method(rb_cNameErrorMesg, "initialize_copy", name_err_mesg_init_copy, 1);
rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_dump, 1);
@@ -2608,7 +3068,11 @@ Init_Exception(void)
rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError);
rb_eEncCompatError = rb_define_class_under(rb_cEncoding, "CompatibilityError", rb_eEncodingError);
- rb_eNoMatchingPatternError = rb_define_class("NoMatchingPatternError", rb_eRuntimeError);
+ rb_eNoMatchingPatternError = rb_define_class("NoMatchingPatternError", rb_eStandardError);
+ rb_eNoMatchingPatternKeyError = rb_define_class("NoMatchingPatternKeyError", rb_eNoMatchingPatternError);
+ rb_define_method(rb_eNoMatchingPatternKeyError, "initialize", no_matching_pattern_key_err_initialize, -1);
+ rb_define_method(rb_eNoMatchingPatternKeyError, "matchee", no_matching_pattern_key_err_matchee, 0);
+ rb_define_method(rb_eNoMatchingPatternKeyError, "key", no_matching_pattern_key_err_key, 0);
syserr_tbl = st_init_numtable();
rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
@@ -2621,7 +3085,7 @@ Init_Exception(void)
rb_mWarning = rb_define_module("Warning");
rb_define_singleton_method(rb_mWarning, "[]", rb_warning_s_aref, 1);
rb_define_singleton_method(rb_mWarning, "[]=", rb_warning_s_aset, 2);
- rb_define_method(rb_mWarning, "warn", rb_warning_s_warn, 1);
+ rb_define_method(rb_mWarning, "warn", rb_warning_s_warn, -1);
rb_extend_object(rb_mWarning, rb_mWarning);
/* :nodoc: */
@@ -2630,8 +3094,10 @@ Init_Exception(void)
id_cause = rb_intern_const("cause");
id_message = rb_intern_const("message");
+ id_detailed_message = rb_intern_const("detailed_message");
id_backtrace = rb_intern_const("backtrace");
id_key = rb_intern_const("key");
+ id_matchee = rb_intern_const("matchee");
id_args = rb_intern_const("args");
id_receiver = rb_intern_const("receiver");
id_private_call_p = rb_intern_const("private_call?");
@@ -2640,10 +3106,25 @@ Init_Exception(void)
id_errno = rb_intern_const("errno");
id_i_path = rb_intern_const("@path");
id_warn = rb_intern_const("warn");
+ id_category = rb_intern_const("category");
+ id_deprecated = rb_intern_const("deprecated");
+ id_experimental = rb_intern_const("experimental");
id_top = rb_intern_const("top");
id_bottom = rb_intern_const("bottom");
id_iseq = rb_make_internal_id();
id_recv = rb_make_internal_id();
+
+ sym_category = ID2SYM(id_category);
+ sym_highlight = ID2SYM(rb_intern_const("highlight"));
+
+ warning_categories.id2enum = rb_init_identtable();
+ st_add_direct(warning_categories.id2enum, id_deprecated, RB_WARN_CATEGORY_DEPRECATED);
+ st_add_direct(warning_categories.id2enum, id_experimental, RB_WARN_CATEGORY_EXPERIMENTAL);
+
+ warning_categories.enum2id = rb_init_identtable();
+ st_add_direct(warning_categories.enum2id, RB_WARN_CATEGORY_NONE, 0);
+ st_add_direct(warning_categories.enum2id, RB_WARN_CATEGORY_DEPRECATED, id_deprecated);
+ st_add_direct(warning_categories.enum2id, RB_WARN_CATEGORY_EXPERIMENTAL, id_experimental);
}
void
@@ -2712,8 +3193,8 @@ void
rb_notimplement(void)
{
rb_raise(rb_eNotImpError,
- "%"PRIsVALUE"() function is unimplemented on this machine",
- rb_id2str(rb_frame_this_func()));
+ "%"PRIsVALUE"() function is unimplemented on this machine",
+ rb_id2str(rb_frame_this_func()));
}
void
@@ -2744,7 +3225,7 @@ make_errno_exc(const char *mesg)
errno = 0;
if (n == 0) {
- rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
+ rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
}
return rb_syserr_new(n, mesg);
}
@@ -2757,8 +3238,8 @@ make_errno_exc_str(VALUE mesg)
errno = 0;
if (!mesg) mesg = Qnil;
if (n == 0) {
- const char *s = !NIL_P(mesg) ? RSTRING_PTR(mesg) : "";
- rb_bug("rb_sys_fail_str(%s) - errno == 0", s);
+ const char *s = !NIL_P(mesg) ? RSTRING_PTR(mesg) : "";
+ rb_bug("rb_sys_fail_str(%s) - errno == 0", s);
}
return rb_syserr_new_str(n, mesg);
}
@@ -2814,51 +3295,62 @@ rb_sys_fail_path_in(const char *func_name, VALUE path)
void
rb_syserr_fail_path_in(const char *func_name, int n, VALUE path)
{
+ rb_exc_raise(rb_syserr_new_path_in(func_name, n, path));
+}
+
+VALUE
+rb_syserr_new_path_in(const char *func_name, int n, VALUE path)
+{
VALUE args[2];
if (!path) path = Qnil;
if (n == 0) {
- const char *s = !NIL_P(path) ? RSTRING_PTR(path) : "";
- if (!func_name) func_name = "(null)";
- rb_bug("rb_sys_fail_path_in(%s, %s) - errno == 0",
- func_name, s);
+ const char *s = !NIL_P(path) ? RSTRING_PTR(path) : "";
+ if (!func_name) func_name = "(null)";
+ rb_bug("rb_sys_fail_path_in(%s, %s) - errno == 0",
+ func_name, s);
}
args[0] = path;
args[1] = rb_str_new_cstr(func_name);
- rb_exc_raise(rb_class_new_instance(2, args, get_syserr(n)));
+ return rb_class_new_instance(2, args, get_syserr(n));
}
#endif
+NORETURN(static void rb_mod_exc_raise(VALUE exc, VALUE mod));
+
+static void
+rb_mod_exc_raise(VALUE exc, VALUE mod)
+{
+ rb_extend_object(exc, mod);
+ rb_exc_raise(exc);
+}
+
void
rb_mod_sys_fail(VALUE mod, const char *mesg)
{
VALUE exc = make_errno_exc(mesg);
- rb_extend_object(exc, mod);
- rb_exc_raise(exc);
+ rb_mod_exc_raise(exc, mod);
}
void
rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
{
VALUE exc = make_errno_exc_str(mesg);
- rb_extend_object(exc, mod);
- rb_exc_raise(exc);
+ rb_mod_exc_raise(exc, mod);
}
void
rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
{
VALUE exc = rb_syserr_new(e, mesg);
- rb_extend_object(exc, mod);
- rb_exc_raise(exc);
+ rb_mod_exc_raise(exc, mod);
}
void
rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
{
VALUE exc = rb_syserr_new_str(e, mesg);
- rb_extend_object(exc, mod);
- rb_exc_raise(exc);
+ rb_mod_exc_raise(exc, mod);
}
static void
@@ -2874,11 +3366,11 @@ void
rb_sys_warn(const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- int errno_save = errno;
- with_warning_string(mesg, 0, fmt) {
- syserr_warning(mesg, errno_save);
- }
- errno = errno_save;
+ int errno_save = errno;
+ with_warning_string(mesg, 0, fmt) {
+ syserr_warning(mesg, errno_save);
+ }
+ errno = errno_save;
}
}
@@ -2886,9 +3378,9 @@ void
rb_syserr_warn(int err, const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- with_warning_string(mesg, 0, fmt) {
- syserr_warning(mesg, err);
- }
+ with_warning_string(mesg, 0, fmt) {
+ syserr_warning(mesg, err);
+ }
}
}
@@ -2896,11 +3388,11 @@ void
rb_sys_enc_warn(rb_encoding *enc, const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- int errno_save = errno;
- with_warning_string(mesg, enc, fmt) {
- syserr_warning(mesg, errno_save);
- }
- errno = errno_save;
+ int errno_save = errno;
+ with_warning_string(mesg, enc, fmt) {
+ syserr_warning(mesg, errno_save);
+ }
+ errno = errno_save;
}
}
@@ -2908,9 +3400,9 @@ void
rb_syserr_enc_warn(int err, rb_encoding *enc, const char *fmt, ...)
{
if (!NIL_P(ruby_verbose)) {
- with_warning_string(mesg, enc, fmt) {
- syserr_warning(mesg, err);
- }
+ with_warning_string(mesg, enc, fmt) {
+ syserr_warning(mesg, err);
+ }
}
}
#endif
@@ -2919,11 +3411,11 @@ void
rb_sys_warning(const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- int errno_save = errno;
- with_warning_string(mesg, 0, fmt) {
- syserr_warning(mesg, errno_save);
- }
- errno = errno_save;
+ int errno_save = errno;
+ with_warning_string(mesg, 0, fmt) {
+ syserr_warning(mesg, errno_save);
+ }
+ errno = errno_save;
}
}
@@ -2932,9 +3424,9 @@ void
rb_syserr_warning(int err, const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- with_warning_string(mesg, 0, fmt) {
- syserr_warning(mesg, err);
- }
+ with_warning_string(mesg, 0, fmt) {
+ syserr_warning(mesg, err);
+ }
}
}
#endif
@@ -2943,11 +3435,11 @@ void
rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- int errno_save = errno;
- with_warning_string(mesg, enc, fmt) {
- syserr_warning(mesg, errno_save);
- }
- errno = errno_save;
+ int errno_save = errno;
+ with_warning_string(mesg, enc, fmt) {
+ syserr_warning(mesg, errno_save);
+ }
+ errno = errno_save;
}
}
@@ -2955,9 +3447,9 @@ void
rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...)
{
if (RTEST(ruby_verbose)) {
- with_warning_string(mesg, enc, fmt) {
- syserr_warning(mesg, err);
- }
+ with_warning_string(mesg, enc, fmt) {
+ syserr_warning(mesg, err);
+ }
}
}
@@ -3015,8 +3507,8 @@ rb_error_frozen_object(VALUE frozen_obj)
rb_exec_recursive(inspect_frozen_obj, frozen_obj, mesg);
if (!NIL_P(debug_info = rb_attr_get(frozen_obj, created_info))) {
- VALUE path = rb_ary_entry(debug_info, 0);
- VALUE line = rb_ary_entry(debug_info, 1);
+ VALUE path = rb_ary_entry(debug_info, 0);
+ VALUE line = rb_ary_entry(debug_info, 1);
rb_str_catf(mesg, ", created at %"PRIsVALUE":%"PRIsVALUE, path, line);
}
@@ -3031,19 +3523,6 @@ rb_check_frozen(VALUE obj)
}
void
-rb_error_untrusted(VALUE obj)
-{
- rb_warning("rb_error_untrusted is deprecated and will be removed in Ruby 3.2.");
-}
-
-#undef rb_check_trusted
-void
-rb_check_trusted(VALUE obj)
-{
- rb_warning("rb_check_trusted is deprecated and will be removed in Ruby 3.2.");
-}
-
-void
rb_check_copyable(VALUE obj, VALUE orig)
{
if (!FL_ABLE(obj)) return;
@@ -3064,12 +3543,6 @@ Init_syserr(void)
#include "warning.rbinc"
-void
-Init_warning(void)
-{
- load_warning();
-}
-
/*!
* \}
*/
diff --git a/eval.c b/eval.c
index f2fde81e19..a61dfb1289 100644
--- a/eval.c
+++ b/eval.c
@@ -11,23 +11,39 @@
**********************************************************************/
-#include "internal.h"
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
#include "eval_intern.h"
-#include "iseq.h"
#include "gc.h"
-#include "ruby/vm.h"
-#include "vm_core.h"
+#include "internal.h"
+#include "internal/class.h"
+#include "internal/cont.h"
+#include "internal/error.h"
+#include "internal/eval.h"
+#include "internal/hash.h"
+#include "internal/inits.h"
+#include "internal/io.h"
+#include "internal/object.h"
+#include "internal/thread.h"
+#include "internal/variable.h"
+#include "ruby/fiber/scheduler.h"
+#include "iseq.h"
#include "mjit.h"
#include "probes.h"
#include "probes_helper.h"
-#ifdef HAVE_SYS_PRCTL_H
-#include <sys/prctl.h>
-#endif
+#include "ruby/vm.h"
+#include "vm_core.h"
+#include "ractor_core.h"
-NORETURN(void rb_raise_jump(VALUE, VALUE));
+NORETURN(static void rb_raise_jump(VALUE, VALUE));
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
+void rb_ec_clear_all_trace_func(const rb_execution_context_t *ec);
-static int rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex);
+static int rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex);
static int rb_ec_exec_node(rb_execution_context_t *ec, void *n);
VALUE rb_eLocalJumpError;
@@ -46,18 +62,13 @@ extern ID ruby_static_id_cause;
(!SPECIAL_CONST_P(obj) && \
(BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE))
-/*!
- * Initializes the VM and builtin libraries.
- * @retval 0 if succeeded.
- * @retval non-zero an error occurred.
- */
int
ruby_setup(void)
{
enum ruby_tag_type state;
if (GET_VM())
- return 0;
+ return 0;
ruby_init_stack((void *)&state);
@@ -75,41 +86,28 @@ ruby_setup(void)
EC_PUSH_TAG(GET_EC());
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- rb_call_inits();
- ruby_prog_init();
- GET_VM()->running = 1;
+ rb_call_inits();
+ ruby_prog_init();
+ GET_VM()->running = 1;
}
EC_POP_TAG();
return state;
}
-/*!
- * Calls ruby_setup() and check error.
- *
- * Prints errors and calls exit(3) if an error occurred.
- */
void
ruby_init(void)
{
int state = ruby_setup();
if (state) {
- if (RTEST(ruby_debug))
- error_print(GET_EC());
- exit(EXIT_FAILURE);
+ if (RTEST(ruby_debug)) {
+ rb_execution_context_t *ec = GET_EC();
+ rb_ec_error_print(ec, ec->errinfo);
+ }
+ exit(EXIT_FAILURE);
}
}
-/*! Processes command line arguments and compiles the Ruby source to execute.
- *
- * This function does:
- * \li Processes the given command line flags and arguments for ruby(1)
- * \li compiles the source code from the given argument, -e or stdin, and
- * \li returns the compiled source as an opaque pointer to an internal data structure
- *
- * @return an opaque pointer to the compiled source or an internal special value.
- * @sa ruby_executable_node().
- */
void *
ruby_options(int argc, char **argv)
{
@@ -120,27 +118,46 @@ ruby_options(int argc, char **argv)
ruby_init_stack((void *)&iseq);
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- SAVE_ROOT_JMPBUF(GET_THREAD(), iseq = ruby_process_options(argc, argv));
+ SAVE_ROOT_JMPBUF(GET_THREAD(), iseq = ruby_process_options(argc, argv));
}
else {
rb_ec_clear_current_thread_trace_func(ec);
- state = error_handle(ec, state);
- iseq = (void *)INT2FIX(state);
+ int exitcode = error_handle(ec, ec->errinfo, state);
+ ec->errinfo = Qnil; /* just been handled */
+ iseq = (void *)INT2FIX(exitcode);
}
EC_POP_TAG();
return iseq;
}
static void
+rb_ec_fiber_scheduler_finalize(rb_execution_context_t *ec)
+{
+ enum ruby_tag_type state;
+
+ EC_PUSH_TAG(ec);
+ if ((state = EC_EXEC_TAG()) == TAG_NONE) {
+ rb_fiber_scheduler_set(Qnil);
+ }
+ else {
+ state = error_handle(ec, ec->errinfo, state);
+ }
+ EC_POP_TAG();
+}
+
+static void
rb_ec_teardown(rb_execution_context_t *ec)
{
+ // If the user code defined a scheduler for the top level thread, run it:
+ rb_ec_fiber_scheduler_finalize(ec);
+
EC_PUSH_TAG(ec);
if (EC_EXEC_TAG() == TAG_NONE) {
rb_vm_trap_exit(rb_ec_vm_ptr(ec));
}
EC_POP_TAG();
rb_ec_exec_end_proc(ec);
- rb_ec_clear_current_thread_trace_func(ec);
+ rb_ec_clear_all_trace_func(ec);
}
static void
@@ -151,13 +168,6 @@ rb_ec_finalize(rb_execution_context_t *ec)
rb_objspace_call_finalizer(rb_ec_vm_ptr(ec)->objspace);
}
-/** Runs the VM finalization processes.
- *
- * <code>END{}</code> and procs registered by <code>Kernel.#at_exit</code> are
- * executed here. See the Ruby language spec for more details.
- *
- * @note This function is allowed to raise an exception if an error occurred.
- */
void
ruby_finalize(void)
{
@@ -166,100 +176,102 @@ ruby_finalize(void)
rb_ec_finalize(ec);
}
-/** Destructs the VM.
- *
- * Runs the VM finalization processes as well as ruby_finalize(), and frees
- * resources used by the VM.
- *
- * @param ex Default value to the return value.
- * @return If an error occurred returns a non-zero. If otherwise, returns the
- * given ex.
- * @note This function does not raise any exception.
- */
int
-ruby_cleanup(volatile int ex)
+ruby_cleanup(int ex)
{
- return rb_ec_cleanup(GET_EC(), ex);
+ return rb_ec_cleanup(GET_EC(), (enum ruby_tag_type)ex);
}
static int
-rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex)
+rb_ec_cleanup(rb_execution_context_t *ec, enum ruby_tag_type ex)
{
int state;
- volatile VALUE errs[2] = { Qundef, Qundef };
- int nerr;
+ volatile VALUE save_error = Qundef;
+ volatile int sysex = EXIT_SUCCESS;
+ volatile int signaled = 0;
rb_thread_t *th = rb_ec_thread_ptr(ec);
rb_thread_t *const volatile th0 = th;
- volatile int sysex = EXIT_SUCCESS;
volatile int step = 0;
+ volatile VALUE message = Qnil;
+ VALUE buf;
rb_threadptr_interrupt(th);
rb_threadptr_check_signal(th);
+
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- th = th0;
SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(ec); });
step_0: step++;
- th = th0;
- errs[1] = ec->errinfo;
+ save_error = ec->errinfo;
if (THROW_DATA_P(ec->errinfo)) ec->errinfo = Qnil;
- ruby_init_stack(&errs[STACK_UPPER(errs, 0, 1)]);
+ ruby_init_stack(&message);
+ /* exits with failure but silently when an exception raised
+ * here */
SAVE_ROOT_JMPBUF(th, rb_ec_teardown(ec));
step_1: step++;
- th = th0;
- /* protect from Thread#raise */
- th->status = THREAD_KILLED;
+ VALUE err = ec->errinfo;
+ volatile int mode0 = 0, mode1 = 0;
+ if (err != save_error && !NIL_P(err)) {
+ mode0 = exiting_split(err, &sysex, &signaled);
+ }
- errs[0] = ec->errinfo;
- SAVE_ROOT_JMPBUF(th, rb_thread_terminate_all());
- }
- else {
- switch (step) {
- case 0: goto step_0;
- case 1: goto step_1;
- }
- if (ex == 0) ex = state;
- }
- th = th0;
- ec->errinfo = errs[1];
- sysex = error_handle(ec, ex);
+ /* exceptions after here will be ignored */
+
+ /* build error message including causes */
+ err = ATOMIC_VALUE_EXCHANGE(save_error, Qnil);
- state = 0;
- for (nerr = 0; nerr < numberof(errs); ++nerr) {
- VALUE err = ATOMIC_VALUE_EXCHANGE(errs[nerr], Qnil);
+ if (!NIL_P(err) && !THROW_DATA_P(err)) {
+ mode1 = exiting_split(err, (mode0 & EXITING_WITH_STATUS) ? NULL : &sysex, &signaled);
+ if (mode1 & EXITING_WITH_MESSAGE) {
+ buf = rb_str_new(NULL, 0);
+ SAVE_ROOT_JMPBUF(th, rb_ec_error_print_detailed(ec, err, buf, Qundef));
+ message = buf;
+ }
+ }
- if (!RTEST(err)) continue;
+ step_2: step++;
+ /* protect from Thread#raise */
+ th->status = THREAD_KILLED;
- /* ec->errinfo contains a NODE while break'ing */
- if (THROW_DATA_P(err)) continue;
+ SAVE_ROOT_JMPBUF(th, rb_ractor_terminate_all());
- if (rb_obj_is_kind_of(err, rb_eSystemExit)) {
- sysex = sysexit_status(err);
- break;
- }
- else if (rb_obj_is_kind_of(err, rb_eSignal)) {
- VALUE sig = rb_ivar_get(err, id_signo);
- state = NUM2INT(sig);
- break;
- }
- else if (sysex == EXIT_SUCCESS) {
- sysex = EXIT_FAILURE;
- }
+ step_3: step++;
+ if (!NIL_P(buf = message)) {
+ warn_print_str(buf);
+ }
+ else if (!NIL_OR_UNDEF_P(err = save_error) ||
+ (ex != TAG_NONE && !((mode0|mode1) & EXITING_WITH_STATUS))) {
+ sysex = error_handle(ec, err, ex);
+ }
+ }
+ else {
+ th = th0;
+ switch (step) {
+ case 0: goto step_0;
+ case 1: goto step_1;
+ case 2: goto step_2;
+ case 3: goto step_3;
+ }
}
- mjit_finish(true); // We still need ISeqs here.
+ mjit_finish(true); // We still need ISeqs here, so it's before rb_ec_finalize().
rb_ec_finalize(ec);
/* unlock again if finalizer took mutexes. */
rb_threadptr_unlock_all_locking_mutexes(th);
+ th = th0;
EC_POP_TAG();
+ th = th0;
rb_thread_stop_timer_thread();
ruby_vm_destruct(th->vm);
- if (state) ruby_default_signal(state);
+ // For YJIT, call this after ruby_vm_destruct() frees jit_cont for the root fiber.
+ rb_jit_cont_finish();
+
+ if (signaled) ruby_default_signal(signaled);
return sysex;
}
@@ -274,33 +286,20 @@ rb_ec_exec_node(rb_execution_context_t *ec, void *n)
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
rb_thread_t *const th = rb_ec_thread_ptr(ec);
- SAVE_ROOT_JMPBUF(th, {
- rb_iseq_eval_main(iseq);
- });
+ SAVE_ROOT_JMPBUF(th, {
+ rb_iseq_eval_main(iseq);
+ });
}
EC_POP_TAG();
return state;
}
-/*! Calls ruby_cleanup() and exits the process */
void
ruby_stop(int ex)
{
exit(ruby_cleanup(ex));
}
-/*! Checks the return value of ruby_options().
- * @param n return value of ruby_options().
- * @param status pointer to the exit status of this process.
- *
- * ruby_options() sometimes returns a special value to indicate this process
- * should immediately exit. This function checks if the case. Also stores the
- * exit status that the caller have to pass to exit(3) into
- * <code>*status</code>.
- *
- * @retval non-zero if the given opaque pointer is actually a compiled source.
- * @retval 0 if the given value is such a special value.
- */
int
ruby_executable_node(void *n, int *status)
{
@@ -311,31 +310,26 @@ ruby_executable_node(void *n, int *status)
case Qtrue: s = EXIT_SUCCESS; break;
case Qfalse: s = EXIT_FAILURE; break;
default:
- if (!FIXNUM_P(v)) return TRUE;
- s = FIX2INT(v);
+ if (!FIXNUM_P(v)) return TRUE;
+ s = FIX2INT(v);
}
if (status) *status = s;
return FALSE;
}
-/*! Runs the given compiled source and exits this process.
- * @retval 0 if successfully run the source
- * @retval non-zero if an error occurred.
-*/
int
ruby_run_node(void *n)
{
rb_execution_context_t *ec = GET_EC();
int status;
if (!ruby_executable_node(n, &status)) {
- rb_ec_cleanup(ec, 0);
- return status;
+ rb_ec_cleanup(ec, (NIL_P(ec->errinfo) ? TAG_NONE : TAG_RAISE));
+ return status;
}
ruby_init_stack((void *)&status);
return rb_ec_cleanup(ec, rb_ec_exec_node(ec, n));
}
-/*! Runs the given compiled source */
int
ruby_exec_node(void *n)
{
@@ -365,12 +359,12 @@ rb_mod_nesting(VALUE _)
const rb_cref_t *cref = rb_vm_cref();
while (cref && CREF_NEXT(cref)) {
- VALUE klass = CREF_CLASS(cref);
- if (!CREF_PUSHED_BY_EVAL(cref) &&
- !NIL_P(klass)) {
- rb_ary_push(ary, klass);
- }
- cref = CREF_NEXT(cref);
+ VALUE klass = CREF_CLASS(cref);
+ if (!CREF_PUSHED_BY_EVAL(cref) &&
+ !NIL_P(klass)) {
+ rb_ary_push(ary, klass);
+ }
+ cref = CREF_NEXT(cref);
}
return ary;
}
@@ -406,23 +400,23 @@ rb_mod_s_constants(int argc, VALUE *argv, VALUE mod)
void *data = 0;
if (argc > 0 || mod != rb_cModule) {
- return rb_mod_constants(argc, argv, mod);
+ return rb_mod_constants(argc, argv, mod);
}
while (cref) {
- klass = CREF_CLASS(cref);
- if (!CREF_PUSHED_BY_EVAL(cref) &&
- !NIL_P(klass)) {
- data = rb_mod_const_at(CREF_CLASS(cref), data);
- if (!cbase) {
- cbase = klass;
- }
- }
- cref = CREF_NEXT(cref);
+ klass = CREF_CLASS(cref);
+ if (!CREF_PUSHED_BY_EVAL(cref) &&
+ !NIL_P(klass)) {
+ data = rb_mod_const_at(CREF_CLASS(cref), data);
+ if (!cbase) {
+ cbase = klass;
+ }
+ }
+ cref = CREF_NEXT(cref);
}
if (cbase) {
- data = rb_mod_const_of(cbase, data);
+ data = rb_mod_const_of(cbase, data);
}
return rb_const_list(data);
}
@@ -437,40 +431,45 @@ void
rb_class_modify_check(VALUE klass)
{
if (SPECIAL_CONST_P(klass)) {
- noclass:
- Check_Type(klass, T_CLASS);
+ Check_Type(klass, T_CLASS);
+ }
+ if (RB_TYPE_P(klass, T_MODULE)) {
+ rb_module_set_initialized(klass);
}
if (OBJ_FROZEN(klass)) {
- const char *desc;
-
- if (FL_TEST(klass, FL_SINGLETON)) {
- desc = "object";
- klass = rb_ivar_get(klass, id__attached__);
- if (!SPECIAL_CONST_P(klass)) {
- switch (BUILTIN_TYPE(klass)) {
- case T_MODULE:
- case T_ICLASS:
- desc = "Module";
- break;
- case T_CLASS:
- desc = "Class";
- break;
- }
- }
- }
- else {
- switch (BUILTIN_TYPE(klass)) {
- case T_MODULE:
- case T_ICLASS:
- desc = "module";
- break;
- case T_CLASS:
- desc = "class";
- break;
- default:
- goto noclass;
- }
- }
+ const char *desc;
+
+ if (FL_TEST(klass, FL_SINGLETON)) {
+ desc = "object";
+ klass = rb_ivar_get(klass, id__attached__);
+ if (!SPECIAL_CONST_P(klass)) {
+ switch (BUILTIN_TYPE(klass)) {
+ case T_MODULE:
+ case T_ICLASS:
+ desc = "Module";
+ break;
+ case T_CLASS:
+ desc = "Class";
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else {
+ switch (BUILTIN_TYPE(klass)) {
+ case T_MODULE:
+ case T_ICLASS:
+ desc = "module";
+ break;
+ case T_CLASS:
+ desc = "class";
+ break;
+ default:
+ Check_Type(klass, T_CLASS);
+ UNREACHABLE;
+ }
+ }
rb_frozen_error_raise(klass, "can't modify frozen %s: %"PRIsVALUE, desc, klass);
}
}
@@ -484,23 +483,23 @@ exc_setup_cause(VALUE exc, VALUE cause)
{
#if OPT_SUPPORT_JOKE
if (NIL_P(cause)) {
- ID id_true_cause;
- CONST_ID(id_true_cause, "true_cause");
-
- cause = rb_attr_get(rb_eFatal, id_true_cause);
- if (NIL_P(cause)) {
- cause = rb_exc_new_cstr(rb_eFatal, "because using such Ruby");
- rb_ivar_set(cause, id_cause, INT2FIX(42)); /* the answer */
- OBJ_FREEZE(cause);
- rb_ivar_set(rb_eFatal, id_true_cause, cause);
- }
+ ID id_true_cause;
+ CONST_ID(id_true_cause, "true_cause");
+
+ cause = rb_attr_get(rb_eFatal, id_true_cause);
+ if (NIL_P(cause)) {
+ cause = rb_exc_new_cstr(rb_eFatal, "because using such Ruby");
+ rb_ivar_set(cause, id_cause, INT2FIX(42)); /* the answer */
+ OBJ_FREEZE(cause);
+ rb_ivar_set(rb_eFatal, id_true_cause, cause);
+ }
}
#endif
if (!NIL_P(cause) && cause != exc) {
- rb_ivar_set(exc, id_cause, cause);
- if (!rb_ivar_defined(cause, id_cause)) {
- rb_ivar_set(cause, id_cause, Qnil);
- }
+ rb_ivar_set(exc, id_cause, cause);
+ if (!rb_ivar_defined(cause, id_cause)) {
+ rb_ivar_set(cause, id_cause, Qnil);
+ }
}
return exc;
}
@@ -512,23 +511,23 @@ exc_setup_message(const rb_execution_context_t *ec, VALUE mesg, VALUE *cause)
int nocircular = 0;
if (NIL_P(mesg)) {
- mesg = ec->errinfo;
- if (INTERNAL_EXCEPTION_P(mesg)) EC_JUMP_TAG(ec, TAG_FATAL);
- nocause = 1;
+ mesg = ec->errinfo;
+ if (INTERNAL_EXCEPTION_P(mesg)) EC_JUMP_TAG(ec, TAG_FATAL);
+ nocause = 1;
}
if (NIL_P(mesg)) {
- mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
- nocause = 0;
+ mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
+ nocause = 0;
nocircular = 1;
}
- if (*cause == Qundef) {
- if (nocause) {
- *cause = Qnil;
+ if (UNDEF_P(*cause)) {
+ if (nocause) {
+ *cause = Qnil;
nocircular = 1;
- }
- else if (!rb_ivar_defined(mesg, id_cause)) {
- *cause = get_ec_errinfo(ec);
- }
+ }
+ else if (!rb_ivar_defined(mesg, id_cause)) {
+ *cause = get_ec_errinfo(ec);
+ }
else {
nocircular = 1;
}
@@ -537,13 +536,17 @@ exc_setup_message(const rb_execution_context_t *ec, VALUE mesg, VALUE *cause)
rb_raise(rb_eTypeError, "exception object expected");
}
- if (!nocircular && !NIL_P(*cause) && *cause != Qundef && *cause != mesg) {
+ if (!nocircular && !NIL_P(*cause) && !UNDEF_P(*cause) && *cause != mesg) {
+#if 0 /* maybe critical for some cases */
+ rb_exc_check_circular_cause(*cause);
+#else
VALUE c = *cause;
while (!NIL_P(c = rb_attr_get(c, id_cause))) {
if (c == mesg) {
rb_raise(rb_eArgError, "circular causes");
}
}
+#endif
}
return mesg;
}
@@ -556,92 +559,99 @@ setup_exception(rb_execution_context_t *ec, int tag, volatile VALUE mesg, VALUE
const char *file = rb_source_location_cstr(&line);
const char *const volatile file0 = file;
- if ((file && !NIL_P(mesg)) || (cause != Qundef)) {
- volatile int state = 0;
-
- EC_PUSH_TAG(ec);
- if (EC_EXEC_TAG() == TAG_NONE && !(state = rb_ec_set_raised(ec))) {
- VALUE bt = rb_get_backtrace(mesg);
- if (!NIL_P(bt) || cause == Qundef) {
- if (OBJ_FROZEN(mesg)) {
- mesg = rb_obj_dup(mesg);
- }
- }
- if (cause != Qundef && !THROW_DATA_P(cause)) {
- exc_setup_cause(mesg, cause);
- }
- if (NIL_P(bt)) {
- VALUE at = rb_ec_backtrace_object(ec);
- rb_ivar_set(mesg, idBt_locations, at);
- set_backtrace(mesg, at);
- }
- rb_ec_reset_raised(ec);
- }
- EC_POP_TAG();
+ if ((file && !NIL_P(mesg)) || !UNDEF_P(cause)) {
+ volatile int state = 0;
+
+ EC_PUSH_TAG(ec);
+ if (EC_EXEC_TAG() == TAG_NONE && !(state = rb_ec_set_raised(ec))) {
+ VALUE bt = rb_get_backtrace(mesg);
+ if (!NIL_P(bt) || UNDEF_P(cause)) {
+ if (OBJ_FROZEN(mesg)) {
+ mesg = rb_obj_dup(mesg);
+ }
+ }
+ if (!UNDEF_P(cause) && !THROW_DATA_P(cause)) {
+ exc_setup_cause(mesg, cause);
+ }
+ if (NIL_P(bt)) {
+ VALUE at = rb_ec_backtrace_object(ec);
+ rb_ivar_set(mesg, idBt_locations, at);
+ set_backtrace(mesg, at);
+ }
+ rb_ec_reset_raised(ec);
+ }
+ EC_POP_TAG();
file = file0;
- if (state) goto fatal;
+ if (state) goto fatal;
}
if (!NIL_P(mesg)) {
- ec->errinfo = mesg;
+ ec->errinfo = mesg;
}
if (RTEST(ruby_debug) && !NIL_P(e = ec->errinfo) &&
- !rb_obj_is_kind_of(e, rb_eSystemExit)) {
- enum ruby_tag_type state;
-
- mesg = e;
- EC_PUSH_TAG(ec);
- if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- ec->errinfo = Qnil;
- e = rb_obj_as_string(mesg);
- ec->errinfo = mesg;
- if (file && line) {
- e = rb_sprintf("Exception `%"PRIsVALUE"' at %s:%d - %"PRIsVALUE"\n",
- rb_obj_class(mesg), file, line, e);
- }
- else if (file) {
- e = rb_sprintf("Exception `%"PRIsVALUE"' at %s - %"PRIsVALUE"\n",
- rb_obj_class(mesg), file, e);
- }
- else {
- e = rb_sprintf("Exception `%"PRIsVALUE"' - %"PRIsVALUE"\n",
- rb_obj_class(mesg), e);
- }
- warn_print_str(e);
- }
- EC_POP_TAG();
- if (state == TAG_FATAL && ec->errinfo == exception_error) {
- ec->errinfo = mesg;
- }
- else if (state) {
- rb_ec_reset_raised(ec);
- EC_JUMP_TAG(ec, state);
- }
+ !rb_obj_is_kind_of(e, rb_eSystemExit)) {
+ enum ruby_tag_type state;
+
+ mesg = e;
+ EC_PUSH_TAG(ec);
+ if ((state = EC_EXEC_TAG()) == TAG_NONE) {
+ ec->errinfo = Qnil;
+ e = rb_obj_as_string(mesg);
+ ec->errinfo = mesg;
+ if (file && line) {
+ e = rb_sprintf("Exception `%"PRIsVALUE"' at %s:%d - %"PRIsVALUE"\n",
+ rb_obj_class(mesg), file, line, e);
+ }
+ else if (file) {
+ e = rb_sprintf("Exception `%"PRIsVALUE"' at %s - %"PRIsVALUE"\n",
+ rb_obj_class(mesg), file, e);
+ }
+ else {
+ e = rb_sprintf("Exception `%"PRIsVALUE"' - %"PRIsVALUE"\n",
+ rb_obj_class(mesg), e);
+ }
+ warn_print_str(e);
+ }
+ EC_POP_TAG();
+ if (state == TAG_FATAL && ec->errinfo == exception_error) {
+ ec->errinfo = mesg;
+ }
+ else if (state) {
+ rb_ec_reset_raised(ec);
+ EC_JUMP_TAG(ec, state);
+ }
}
if (rb_ec_set_raised(ec)) {
- fatal:
- ec->errinfo = exception_error;
- rb_ec_reset_raised(ec);
- EC_JUMP_TAG(ec, TAG_FATAL);
+ goto fatal;
}
if (tag != TAG_FATAL) {
- RUBY_DTRACE_HOOK(RAISE, rb_obj_classname(ec->errinfo));
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_RAISE, ec->cfp->self, 0, 0, 0, mesg);
+ RUBY_DTRACE_HOOK(RAISE, rb_obj_classname(ec->errinfo));
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_RAISE, ec->cfp->self, 0, 0, 0, mesg);
}
+ return;
+
+ fatal:
+ ec->errinfo = exception_error;
+ rb_ec_reset_raised(ec);
+ EC_JUMP_TAG(ec, TAG_FATAL);
}
/*! \private */
void
rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause)
{
- if (cause == Qundef) {
- cause = get_ec_errinfo(ec);
+ if (UNDEF_P(cause)) {
+ cause = get_ec_errinfo(ec);
}
if (cause != mesg) {
- rb_ivar_set(mesg, id_cause, cause);
+ if (THROW_DATA_P(cause)) {
+ cause = Qnil;
+ }
+
+ rb_ivar_set(mesg, id_cause, cause);
}
}
@@ -656,6 +666,17 @@ rb_longjmp(rb_execution_context_t *ec, int tag, volatile VALUE mesg, VALUE cause
static VALUE make_exception(int argc, const VALUE *argv, int isstr);
+NORETURN(static void rb_exc_exception(VALUE mesg, int tag, VALUE cause));
+
+static void
+rb_exc_exception(VALUE mesg, int tag, VALUE cause)
+{
+ if (!NIL_P(mesg)) {
+ mesg = make_exception(1, &mesg, FALSE);
+ }
+ rb_longjmp(GET_EC(), tag, mesg, cause);
+}
+
/*!
* Raises an exception in the current thread.
* \param[in] mesg an Exception class or an \c Exception object.
@@ -666,10 +687,7 @@ static VALUE make_exception(int argc, const VALUE *argv, int isstr);
void
rb_exc_raise(VALUE mesg)
{
- if (!NIL_P(mesg)) {
- mesg = make_exception(1, &mesg, FALSE);
- }
- rb_longjmp(GET_EC(), TAG_RAISE, mesg, Qundef);
+ rb_exc_exception(mesg, TAG_RAISE, Qundef);
}
/*!
@@ -682,16 +700,9 @@ rb_exc_raise(VALUE mesg)
void
rb_exc_fatal(VALUE mesg)
{
- if (!NIL_P(mesg)) {
- mesg = make_exception(1, &mesg, FALSE);
- }
- rb_longjmp(GET_EC(), TAG_FATAL, mesg, Qnil);
+ rb_exc_exception(mesg, TAG_FATAL, Qnil);
}
-/*!
- * Raises an \c Interrupt exception.
- * \ingroup exception
- */
void
rb_interrupt(void)
{
@@ -701,23 +712,24 @@ rb_interrupt(void)
enum {raise_opt_cause, raise_max_opt}; /*< \private */
static int
-extract_raise_opts(int argc, const VALUE *argv, VALUE *opts)
+extract_raise_opts(int argc, VALUE *argv, VALUE *opts)
{
int i;
if (argc > 0) {
- VALUE opt = argv[argc-1];
- if (RB_TYPE_P(opt, T_HASH)) {
- if (!RHASH_EMPTY_P(opt)) {
- ID keywords[1];
- CONST_ID(keywords[0], "cause");
- rb_get_kwargs(opt, keywords, 0, -1-raise_max_opt, opts);
- if (RHASH_EMPTY_P(opt)) --argc;
- return argc;
- }
- }
+ VALUE opt;
+ argc = rb_scan_args(argc, argv, "*:", NULL, &opt);
+ if (!NIL_P(opt)) {
+ if (!RHASH_EMPTY_P(opt)) {
+ ID keywords[1];
+ CONST_ID(keywords[0], "cause");
+ rb_get_kwargs(opt, keywords, 0, -1-raise_max_opt, opts);
+ if (!RHASH_EMPTY_P(opt)) argv[argc++] = opt;
+ return argc;
+ }
+ }
}
for (i = 0; i < raise_max_opt; ++i) {
- opts[i] = Qundef;
+ opts[i] = Qundef;
}
return argc;
}
@@ -730,7 +742,7 @@ rb_f_raise(int argc, VALUE *argv)
argc = extract_raise_opts(argc, argv, opts);
if (argc == 0) {
- if (*cause != Qundef) {
+ if (!UNDEF_P(*cause)) {
rb_raise(rb_eArgError, "only cause is given with no arguments");
}
err = get_errinfo();
@@ -783,69 +795,42 @@ static VALUE
make_exception(int argc, const VALUE *argv, int isstr)
{
VALUE mesg, exc;
- int n;
mesg = Qnil;
switch (argc) {
case 0:
- break;
+ return Qnil;
case 1:
- exc = argv[0];
- if (NIL_P(exc))
- break;
- if (isstr) {
- mesg = rb_check_string_type(exc);
- if (!NIL_P(mesg)) {
- mesg = rb_exc_new3(rb_eRuntimeError, mesg);
- break;
- }
- }
- n = 0;
- goto exception_call;
+ exc = argv[0];
+ if (isstr &&! NIL_P(exc)) {
+ mesg = rb_check_string_type(exc);
+ if (!NIL_P(mesg)) {
+ return rb_exc_new3(rb_eRuntimeError, mesg);
+ }
+ }
case 2:
case 3:
- exc = argv[0];
- n = 1;
- exception_call:
- mesg = rb_check_funcall(exc, idException, n, argv+1);
- if (mesg == Qundef) {
- rb_raise(rb_eTypeError, "exception class/object expected");
- }
- break;
+ break;
default:
rb_error_arity(argc, 0, 3);
}
- if (argc > 0) {
- if (!rb_obj_is_kind_of(mesg, rb_eException))
- rb_raise(rb_eTypeError, "exception object expected");
- if (argc > 2)
- set_backtrace(mesg, argv[2]);
+ if (NIL_P(mesg)) {
+ mesg = rb_check_funcall(argv[0], idException, argc != 1, &argv[1]);
+ }
+ if (UNDEF_P(mesg)) {
+ rb_raise(rb_eTypeError, "exception class/object expected");
+ }
+ if (!rb_obj_is_kind_of(mesg, rb_eException)) {
+ rb_raise(rb_eTypeError, "exception object expected");
+ }
+ if (argc == 3) {
+ set_backtrace(mesg, argv[2]);
}
return mesg;
}
-/*!
- * Make an \c Exception object from the list of arguments in a manner
- * similar to \c Kernel\#raise.
- *
- * \param[in] argc the number of arguments
- * \param[in] argv a pointer to the array of arguments.
- *
- * The first form of this function takes a \c String argument. Then
- * it returns a \c RuntimeError whose error message is the given value.
- *
- * The second from of this function takes an \c Exception object. Then
- * it just returns the given value.
- *
- * The last form takes an exception class, an optional error message and
- * an optional array of backtrace. Then it passes the optional arguments
- * to \c #exception method of the exception class.
- *
- * \return the exception object, or \c Qnil if \c argc is 0.
- * \ingroup exception
- */
VALUE
rb_make_exception(int argc, const VALUE *argv)
{
@@ -853,9 +838,8 @@ rb_make_exception(int argc, const VALUE *argv)
}
/*! \private
- * \todo can be static?
*/
-void
+static void
rb_raise_jump(VALUE mesg, VALUE cause)
{
rb_execution_context_t *ec = GET_EC();
@@ -871,36 +855,23 @@ rb_raise_jump(VALUE mesg, VALUE cause)
rb_longjmp(ec, TAG_RAISE, mesg, cause);
}
-/*!
- * Continues the exception caught by rb_protect() and rb_eval_string_protect().
- *
- * This function never return to the caller.
- * \param[in] the value of \c *state which the protect function has set to the
- * their last parameter.
- * \ingroup exception
- */
void
rb_jump_tag(int tag)
{
if (UNLIKELY(tag < TAG_RETURN || tag > TAG_FATAL)) {
- unknown_longjmp_status(tag);
+ unknown_longjmp_status(tag);
}
EC_JUMP_TAG(GET_EC(), tag);
}
-/*! Determines if the current method is given a block.
- * \retval zero if not given
- * \retval non-zero if given
- * \ingroup defmethod
- */
int
rb_block_given_p(void)
{
if (rb_vm_frame_block_handler(GET_EC()->cfp) == VM_BLOCK_HANDLER_NONE) {
- return FALSE;
+ return FALSE;
}
else {
- return TRUE;
+ return TRUE;
}
}
@@ -912,51 +883,16 @@ rb_keyword_given_p(void)
return rb_vm_cframe_keyword_p(GET_EC()->cfp);
}
-/* -- Remove In 3.0 -- */
-int rb_vm_cframe_empty_keyword_p(const rb_control_frame_t *cfp);
-int
-rb_empty_keyword_given_p(void)
-{
- return rb_vm_cframe_empty_keyword_p(GET_EC()->cfp);
-}
-
VALUE rb_eThreadError;
-/*! Declares that the current method needs a block.
- *
- * Raises a \c LocalJumpError if not given a block.
- * \ingroup defmethod
- */
void
rb_need_block(void)
{
if (!rb_block_given_p()) {
- rb_vm_localjump_error("no block given", Qnil, 0);
+ rb_vm_localjump_error("no block given", Qnil, 0);
}
}
-/*! An equivalent of \c rescue clause.
- *
- * Equivalent to <code>begin .. rescue err_type .. end</code>
- *
- * \param[in] b_proc a function which potentially raises an exception.
- * \param[in] data1 the argument of \a b_proc
- * \param[in] r_proc a function which rescues an exception in \a b_proc.
- * \param[in] data2 the first argument of \a r_proc
- * \param[in] ... 1 or more exception classes. Must be terminated by \c (VALUE)0.
- *
- * First it calls the function \a b_proc, with \a data1 as the argument.
- * When \a b_proc raises an exception, it calls \a r_proc with \a data2 and
- * the exception object if the exception is a kind of one of the given
- * exception classes.
- *
- * \return the return value of \a b_proc if no exception occurs,
- * or the return value of \a r_proc if otherwise.
- * \sa rb_rescue
- * \sa rb_ensure
- * \sa rb_protect
- * \ingroup exception
- */
VALUE
rb_rescue2(VALUE (* b_proc) (VALUE), VALUE data1,
VALUE (* r_proc) (VALUE, VALUE), VALUE data2, ...)
@@ -968,10 +904,6 @@ rb_rescue2(VALUE (* b_proc) (VALUE), VALUE data1,
return ret;
}
-/*!
- * \copydoc rb_rescue2
- * \param[in] args exception classes, terminated by 0.
- */
VALUE
rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1,
VALUE (* r_proc) (VALUE, VALUE), VALUE data2,
@@ -986,87 +918,60 @@ rb_vrescue2(VALUE (* b_proc) (VALUE), VALUE data1,
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
retry_entry:
- result = (*b_proc) (data1);
+ result = (*b_proc) (data1);
}
else if (result) {
- /* escape from r_proc */
- if (state == TAG_RETRY) {
- state = 0;
- ec->errinfo = Qnil;
- result = Qfalse;
- goto retry_entry;
- }
+ /* escape from r_proc */
+ if (state == TAG_RETRY) {
+ state = TAG_NONE;
+ ec->errinfo = Qnil;
+ result = Qfalse;
+ goto retry_entry;
+ }
}
else {
- rb_vm_rewind_cfp(ec, cfp);
-
- if (state == TAG_RAISE) {
- int handle = FALSE;
- VALUE eclass;
-
- while ((eclass = va_arg(args, VALUE)) != 0) {
- if (rb_obj_is_kind_of(ec->errinfo, eclass)) {
- handle = TRUE;
- break;
- }
- }
-
- if (handle) {
- result = Qnil;
- state = 0;
- if (r_proc) {
- result = (*r_proc) (data2, ec->errinfo);
- }
- ec->errinfo = e_info;
- }
- }
+ rb_vm_rewind_cfp(ec, cfp);
+
+ if (state == TAG_RAISE) {
+ int handle = FALSE;
+ VALUE eclass;
+ va_list ap;
+
+ result = Qnil;
+ /* reuses args when raised again after retrying in r_proc */
+ va_copy(ap, args);
+ while ((eclass = va_arg(ap, VALUE)) != 0) {
+ if (rb_obj_is_kind_of(ec->errinfo, eclass)) {
+ handle = TRUE;
+ break;
+ }
+ }
+ va_end(ap);
+
+ if (handle) {
+ state = TAG_NONE;
+ if (r_proc) {
+ result = (*r_proc) (data2, ec->errinfo);
+ }
+ ec->errinfo = e_info;
+ }
+ }
}
EC_POP_TAG();
if (state)
- EC_JUMP_TAG(ec, state);
+ EC_JUMP_TAG(ec, state);
return result;
}
-/*! An equivalent of \c rescue clause.
- *
- * Equivalent to <code>begin .. rescue .. end</code>.
- *
- * It is same as
- * \code{cpp}
- * rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
- * \endcode
- *
- * \sa rb_rescue2
- * \sa rb_ensure
- * \sa rb_protect
- * \ingroup exception
- */
VALUE
rb_rescue(VALUE (* b_proc)(VALUE), VALUE data1,
VALUE (* r_proc)(VALUE, VALUE), VALUE data2)
{
return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError,
- (VALUE)0);
+ (VALUE)0);
}
-/*! Protects a function call from potential global escapes from the function.
- *
- * Such global escapes include exceptions, \c Kernel\#throw, \c break in
- * an iterator, for example.
- * It first calls the function func with arg as the argument.
- * If no exception occurred during func, it returns the result of func and
- * *state is zero.
- * Otherwise, it returns Qnil and sets *state to nonzero.
- * If state is NULL, it is not set in both cases.
- *
- * You have to clear the error info with rb_set_errinfo(Qnil) when
- * ignoring the caught exception.
- * \ingroup exception
- * \sa rb_rescue
- * \sa rb_rescue2
- * \sa rb_ensure
- */
VALUE
rb_protect(VALUE (* proc) (VALUE), VALUE data, int *pstate)
{
@@ -1074,42 +979,20 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int *pstate)
volatile enum ruby_tag_type state;
rb_execution_context_t * volatile ec = GET_EC();
rb_control_frame_t *volatile cfp = ec->cfp;
- struct rb_vm_protect_tag protect_tag;
- rb_jmpbuf_t org_jmpbuf;
-
- protect_tag.prev = ec->protect_tag;
EC_PUSH_TAG(ec);
- ec->protect_tag = &protect_tag;
- MEMCPY(&org_jmpbuf, &rb_ec_thread_ptr(ec)->root_jmpbuf, rb_jmpbuf_t, 1);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- SAVE_ROOT_JMPBUF(rb_ec_thread_ptr(ec), result = (*proc) (data));
+ SAVE_ROOT_JMPBUF(rb_ec_thread_ptr(ec), result = (*proc) (data));
}
else {
- rb_vm_rewind_cfp(ec, cfp);
+ rb_vm_rewind_cfp(ec, cfp);
}
- MEMCPY(&rb_ec_thread_ptr(ec)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
- ec->protect_tag = protect_tag.prev;
EC_POP_TAG();
if (pstate != NULL) *pstate = state;
return result;
}
-/*!
- * An equivalent to \c ensure clause.
- *
- * Equivalent to <code>begin .. ensure .. end</code>.
- *
- * Calls the function \a b_proc with \a data1 as the argument,
- * then calls \a e_proc with \a data2 when execution terminated.
- * \return The return value of \a b_proc if no exception occurred,
- * or \c Qnil if otherwise.
- * \sa rb_rescue
- * \sa rb_rescue2
- * \sa rb_protect
- * \ingroup exception
- */
VALUE
rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2)
{
@@ -1125,18 +1008,18 @@ rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE dat
ec->ensure_list = &ensure_list;
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
- result = (*b_proc) (data1);
+ result = (*b_proc) (data1);
}
EC_POP_TAG();
errinfo = ec->errinfo;
if (!NIL_P(errinfo) && !RB_TYPE_P(errinfo, T_OBJECT)) {
- ec->errinfo = Qnil;
+ ec->errinfo = Qnil;
}
ec->ensure_list=ensure_list.next;
(*ensure_list.entry.e_proc)(ensure_list.entry.data2);
ec->errinfo = errinfo;
if (state)
- EC_JUMP_TAG(ec, state);
+ EC_JUMP_TAG(ec, state);
return result;
}
@@ -1146,10 +1029,10 @@ frame_func_id(const rb_control_frame_t *cfp)
const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
if (me) {
- return me->def->original_id;
+ return me->def->original_id;
}
else {
- return 0;
+ return 0;
}
}
@@ -1159,42 +1042,19 @@ frame_called_id(rb_control_frame_t *cfp)
const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
if (me) {
- return me->called_id;
+ return me->called_id;
}
else {
- return 0;
+ return 0;
}
}
-/*!
- * The original name of the current method.
- *
- * The function returns the original name of the method even if
- * an alias of the method is called.
- * The function can also return 0 if it is not in a method. This
- * case can happen in a toplevel of a source file, for example.
- *
- * \returns the ID of the name or 0
- * \sa rb_frame_callee
- * \ingroup defmethod
- */
ID
rb_frame_this_func(void)
{
return frame_func_id(GET_EC()->cfp);
}
-/*!
- * The name of the current method.
- *
- * The function returns the alias if an alias of the method is called.
- * The function can also return 0 if it is not in a method. This
- * case can happen in a toplevel of a source file, for example.
- *
- * \returns the ID of the name or 0.
- * \sa rb_frame_this_func
- * \ingroup defmethod
- */
ID
rb_frame_callee(void)
{
@@ -1242,8 +1102,8 @@ rb_frame_last_func(void)
ID mid;
while (!(mid = frame_func_id(cfp)) &&
- (cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp),
- !RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)));
+ (cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp),
+ !RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)));
return mid;
}
@@ -1263,7 +1123,7 @@ static VALUE
rb_mod_append_features(VALUE module, VALUE include)
{
if (!CLASS_OR_MODULE_P(include)) {
- Check_Type(include, T_CLASS);
+ Check_Type(include, T_CLASS);
}
rb_include_module(include, module);
@@ -1286,12 +1146,20 @@ rb_mod_include(int argc, VALUE *argv, VALUE module)
CONST_ID(id_append_features, "append_features");
CONST_ID(id_included, "included");
+ if (BUILTIN_TYPE(module) == T_MODULE && FL_TEST(module, RMODULE_IS_REFINEMENT)) {
+ rb_raise(rb_eTypeError, "Refinement#include has been removed");
+ }
+
rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
- for (i = 0; i < argc; i++)
- Check_Type(argv[i], T_MODULE);
+ for (i = 0; i < argc; i++) {
+ Check_Type(argv[i], T_MODULE);
+ if (FL_TEST(argv[i], RMODULE_IS_REFINEMENT)) {
+ rb_raise(rb_eTypeError, "Cannot include refinement");
+ }
+ }
while (argc--) {
- rb_funcall(argv[argc], id_append_features, 1, module);
- rb_funcall(argv[argc], id_included, 1, module);
+ rb_funcall(argv[argc], id_append_features, 1, module);
+ rb_funcall(argv[argc], id_included, 1, module);
}
return module;
}
@@ -1312,7 +1180,7 @@ static VALUE
rb_mod_prepend_features(VALUE module, VALUE prepend)
{
if (!CLASS_OR_MODULE_P(prepend)) {
- Check_Type(prepend, T_CLASS);
+ Check_Type(prepend, T_CLASS);
}
rb_prepend_module(prepend, module);
@@ -1332,15 +1200,23 @@ rb_mod_prepend(int argc, VALUE *argv, VALUE module)
int i;
ID id_prepend_features, id_prepended;
+ if (BUILTIN_TYPE(module) == T_MODULE && FL_TEST(module, RMODULE_IS_REFINEMENT)) {
+ rb_raise(rb_eTypeError, "Refinement#prepend has been removed");
+ }
+
CONST_ID(id_prepend_features, "prepend_features");
CONST_ID(id_prepended, "prepended");
rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
- for (i = 0; i < argc; i++)
- Check_Type(argv[i], T_MODULE);
+ for (i = 0; i < argc; i++) {
+ Check_Type(argv[i], T_MODULE);
+ if (FL_TEST(argv[i], RMODULE_IS_REFINEMENT)) {
+ rb_raise(rb_eTypeError, "Cannot prepend refinement");
+ }
+ }
while (argc--) {
- rb_funcall(argv[argc], id_prepend_features, 1, module);
- rb_funcall(argv[argc], id_prepended, 1, module);
+ rb_funcall(argv[argc], id_prepend_features, 1, module);
+ rb_funcall(argv[argc], id_prepended, 1, module);
}
return module;
}
@@ -1349,9 +1225,9 @@ static void
ensure_class_or_module(VALUE obj)
{
if (!RB_TYPE_P(obj, T_CLASS) && !RB_TYPE_P(obj, T_MODULE)) {
- rb_raise(rb_eTypeError,
- "wrong argument type %"PRIsVALUE" (expected Class or Module)",
- rb_obj_class(obj));
+ rb_raise(rb_eTypeError,
+ "wrong argument type %"PRIsVALUE" (expected Class or Module)",
+ rb_obj_class(obj));
}
}
@@ -1368,19 +1244,18 @@ static VALUE
refinement_superclass(VALUE superclass)
{
if (RB_TYPE_P(superclass, T_MODULE)) {
- /* FIXME: Should ancestors of superclass be used here? */
- return rb_include_class_new(superclass, rb_cBasicObject);
+ /* FIXME: Should ancestors of superclass be used here? */
+ return rb_include_class_new(RCLASS_ORIGIN(superclass), rb_cBasicObject);
}
else {
- return superclass;
+ return superclass;
}
}
/*!
* \private
- * \todo can be static?
*/
-void
+static void
rb_using_refinement(rb_cref_t *cref, VALUE klass, VALUE module)
{
VALUE iclass, c, superclass = klass;
@@ -1388,36 +1263,33 @@ rb_using_refinement(rb_cref_t *cref, VALUE klass, VALUE module)
ensure_class_or_module(klass);
Check_Type(module, T_MODULE);
if (NIL_P(CREF_REFINEMENTS(cref))) {
- CREF_REFINEMENTS_SET(cref, hidden_identity_hash_new());
+ CREF_REFINEMENTS_SET(cref, hidden_identity_hash_new());
}
else {
- if (CREF_OMOD_SHARED(cref)) {
- CREF_REFINEMENTS_SET(cref, rb_hash_dup(CREF_REFINEMENTS(cref)));
- CREF_OMOD_SHARED_UNSET(cref);
- }
- if (!NIL_P(c = rb_hash_lookup(CREF_REFINEMENTS(cref), klass))) {
- superclass = c;
- while (c && RB_TYPE_P(c, T_ICLASS)) {
- if (RBASIC(c)->klass == module) {
- /* already used refinement */
- return;
- }
- c = RCLASS_SUPER(c);
- }
- }
- }
- FL_SET(module, RMODULE_IS_OVERLAID);
+ if (CREF_OMOD_SHARED(cref)) {
+ CREF_REFINEMENTS_SET(cref, rb_hash_dup(CREF_REFINEMENTS(cref)));
+ CREF_OMOD_SHARED_UNSET(cref);
+ }
+ if (!NIL_P(c = rb_hash_lookup(CREF_REFINEMENTS(cref), klass))) {
+ superclass = c;
+ while (c && RB_TYPE_P(c, T_ICLASS)) {
+ if (RBASIC(c)->klass == module) {
+ /* already used refinement */
+ return;
+ }
+ c = RCLASS_SUPER(c);
+ }
+ }
+ }
superclass = refinement_superclass(superclass);
c = iclass = rb_include_class_new(module, superclass);
RB_OBJ_WRITE(c, &RCLASS_REFINED_CLASS(c), klass);
- RCLASS_M_TBL(OBJ_WB_UNPROTECT(c)) =
- RCLASS_M_TBL(OBJ_WB_UNPROTECT(module)); /* TODO: check unprotecting */
+ RCLASS_M_TBL(c) = RCLASS_M_TBL(module);
module = RCLASS_SUPER(module);
while (module && module != klass) {
- FL_SET(module, RMODULE_IS_OVERLAID);
- c = RCLASS_SET_SUPER(c, rb_include_class_new(module, RCLASS_SUPER(c)));
+ c = RCLASS_SET_SUPER(c, rb_include_class_new(module, RCLASS_SUPER(c)));
RB_OBJ_WRITE(c, &RCLASS_REFINED_CLASS(c), klass);
module = RCLASS_SUPER(module);
}
@@ -1441,21 +1313,21 @@ using_module_recursive(const rb_cref_t *cref, VALUE klass)
super = RCLASS_SUPER(klass);
if (super) {
- using_module_recursive(cref, super);
+ using_module_recursive(cref, super);
}
switch (BUILTIN_TYPE(klass)) {
case T_MODULE:
- module = klass;
- break;
+ module = klass;
+ break;
case T_ICLASS:
- module = RBASIC(klass)->klass;
- break;
+ module = RBASIC(klass)->klass;
+ break;
default:
- rb_raise(rb_eTypeError, "wrong argument type %s (expected Module)",
- rb_obj_classname(klass));
- break;
+ rb_raise(rb_eTypeError, "wrong argument type %s (expected Module)",
+ rb_obj_classname(klass));
+ break;
}
CONST_ID(id_refinements, "__refinements__");
refinements = rb_attr_get(module, id_refinements);
@@ -1465,17 +1337,21 @@ using_module_recursive(const rb_cref_t *cref, VALUE klass)
/*!
* \private
- * \todo can be static?
*/
-void
+static void
rb_using_module(const rb_cref_t *cref, VALUE module)
{
Check_Type(module, T_MODULE);
using_module_recursive(cref, module);
- rb_clear_method_cache_by_class(rb_cObject);
+ rb_clear_method_cache_all();
}
-/*! \private */
+/*
+ * call-seq:
+ * refined_class -> class
+ *
+ * Return the class refined by the receiver.
+ */
VALUE
rb_refinement_module_get_refined_class(VALUE module)
{
@@ -1487,30 +1363,28 @@ rb_refinement_module_get_refined_class(VALUE module)
static void
add_activated_refinement(VALUE activated_refinements,
- VALUE klass, VALUE refinement)
+ VALUE klass, VALUE refinement)
{
VALUE iclass, c, superclass = klass;
if (!NIL_P(c = rb_hash_lookup(activated_refinements, klass))) {
- superclass = c;
- while (c && RB_TYPE_P(c, T_ICLASS)) {
- if (RBASIC(c)->klass == refinement) {
- /* already used refinement */
- return;
- }
- c = RCLASS_SUPER(c);
- }
- }
- FL_SET(refinement, RMODULE_IS_OVERLAID);
+ superclass = c;
+ while (c && RB_TYPE_P(c, T_ICLASS)) {
+ if (RBASIC(c)->klass == refinement) {
+ /* already used refinement */
+ return;
+ }
+ c = RCLASS_SUPER(c);
+ }
+ }
superclass = refinement_superclass(superclass);
c = iclass = rb_include_class_new(refinement, superclass);
RB_OBJ_WRITE(c, &RCLASS_REFINED_CLASS(c), klass);
refinement = RCLASS_SUPER(refinement);
while (refinement && refinement != klass) {
- FL_SET(refinement, RMODULE_IS_OVERLAID);
- c = RCLASS_SET_SUPER(c, rb_include_class_new(refinement, RCLASS_SUPER(c)));
+ c = RCLASS_SET_SUPER(c, rb_include_class_new(refinement, RCLASS_SUPER(c)));
RB_OBJ_WRITE(c, &RCLASS_REFINED_CLASS(c), klass);
- refinement = RCLASS_SUPER(refinement);
+ refinement = RCLASS_SUPER(refinement);
}
rb_hash_aset(activated_refinements, klass, iclass);
}
@@ -1535,41 +1409,39 @@ rb_mod_refine(VALUE module, VALUE klass)
VALUE block_handler = rb_vm_frame_block_handler(th->ec->cfp);
if (block_handler == VM_BLOCK_HANDLER_NONE) {
- rb_raise(rb_eArgError, "no block given");
+ rb_raise(rb_eArgError, "no block given");
}
if (vm_block_handler_type(block_handler) != block_handler_type_iseq) {
- rb_raise(rb_eArgError, "can't pass a Proc as a block to Module#refine");
+ rb_raise(rb_eArgError, "can't pass a Proc as a block to Module#refine");
}
ensure_class_or_module(klass);
- if (RB_TYPE_P(klass, T_MODULE)) {
- FL_SET(klass, RCLASS_REFINED_BY_ANY);
- }
CONST_ID(id_refinements, "__refinements__");
refinements = rb_attr_get(module, id_refinements);
if (NIL_P(refinements)) {
- refinements = hidden_identity_hash_new();
- rb_ivar_set(module, id_refinements, refinements);
+ refinements = hidden_identity_hash_new();
+ rb_ivar_set(module, id_refinements, refinements);
}
CONST_ID(id_activated_refinements, "__activated_refinements__");
activated_refinements = rb_attr_get(module, id_activated_refinements);
if (NIL_P(activated_refinements)) {
- activated_refinements = hidden_identity_hash_new();
- rb_ivar_set(module, id_activated_refinements,
- activated_refinements);
+ activated_refinements = hidden_identity_hash_new();
+ rb_ivar_set(module, id_activated_refinements,
+ activated_refinements);
}
refinement = rb_hash_lookup(refinements, klass);
if (NIL_P(refinement)) {
- VALUE superclass = refinement_superclass(klass);
- refinement = rb_module_new();
- RCLASS_SET_SUPER(refinement, superclass);
- FL_SET(refinement, RMODULE_IS_REFINEMENT);
- CONST_ID(id_refined_class, "__refined_class__");
- rb_ivar_set(refinement, id_refined_class, klass);
- CONST_ID(id_defined_at, "__defined_at__");
- rb_ivar_set(refinement, id_defined_at, module);
- rb_hash_aset(refinements, klass, refinement);
- add_activated_refinement(activated_refinements, klass, refinement);
+ VALUE superclass = refinement_superclass(klass);
+ refinement = rb_refinement_new();
+ RCLASS_SET_SUPER(refinement, superclass);
+ RUBY_ASSERT(BUILTIN_TYPE(refinement) == T_MODULE);
+ FL_SET(refinement, RMODULE_IS_REFINEMENT);
+ CONST_ID(id_refined_class, "__refined_class__");
+ rb_ivar_set(refinement, id_refined_class, klass);
+ CONST_ID(id_defined_at, "__defined_at__");
+ rb_ivar_set(refinement, id_defined_at, module);
+ rb_hash_aset(refinements, klass, refinement);
+ add_activated_refinement(activated_refinements, klass, refinement);
}
rb_yield_refine_block(refinement, activated_refinements);
return refinement;
@@ -1581,7 +1453,7 @@ ignored_block(VALUE module, const char *klass)
const char *anon = "";
Check_Type(module, T_MODULE);
if (!RTEST(rb_search_class_path(module))) {
- anon = ", maybe for Module.new";
+ anon = ", maybe for Module.new";
}
rb_warn("%s""using doesn't call the given block""%s.", klass, anon);
}
@@ -1600,27 +1472,62 @@ mod_using(VALUE self, VALUE module)
rb_control_frame_t *prev_cfp = previous_frame(GET_EC());
if (prev_frame_func()) {
- rb_raise(rb_eRuntimeError,
- "Module#using is not permitted in methods");
+ rb_raise(rb_eRuntimeError,
+ "Module#using is not permitted in methods");
}
if (prev_cfp && prev_cfp->self != self) {
- rb_raise(rb_eRuntimeError, "Module#using is not called on self");
+ rb_raise(rb_eRuntimeError, "Module#using is not called on self");
}
if (rb_block_given_p()) {
- ignored_block(module, "Module#");
+ ignored_block(module, "Module#");
}
rb_using_module(rb_vm_cref_replace_with_duplicated_cref(), module);
return self;
}
+
+/*
+ * call-seq:
+ * refinements -> array
+ *
+ * Returns an array of modules defined within the receiver.
+ *
+ * module A
+ * refine Integer do
+ * end
+ *
+ * refine String do
+ * end
+ * end
+ *
+ * p A.refinements
+ *
+ * <em>produces:</em>
+ *
+ * [#<refinement:Integer@A>, #<refinement:String@A>]
+ */
+static VALUE
+mod_refinements(VALUE self)
+{
+ ID id_refinements;
+ VALUE refinements;
+
+ CONST_ID(id_refinements, "__refinements__");
+ refinements = rb_attr_get(self, id_refinements);
+ if (NIL_P(refinements)) {
+ return rb_ary_new();
+ }
+ return rb_hash_values(refinements);
+}
+
static int
used_modules_i(VALUE _, VALUE mod, VALUE ary)
{
ID id_defined_at;
CONST_ID(id_defined_at, "__defined_at__");
- while (FL_TEST(rb_class_of(mod), RMODULE_IS_REFINEMENT)) {
- rb_ary_push(ary, rb_attr_get(rb_class_of(mod), id_defined_at));
- mod = RCLASS_SUPER(mod);
+ while (BUILTIN_TYPE(rb_class_of(mod)) == T_MODULE && FL_TEST(rb_class_of(mod), RMODULE_IS_REFINEMENT)) {
+ rb_ary_push(ary, rb_attr_get(rb_class_of(mod), id_defined_at));
+ mod = RCLASS_SUPER(mod);
}
return ST_CONTINUE;
}
@@ -1657,30 +1564,122 @@ rb_mod_s_used_modules(VALUE _)
VALUE ary = rb_ary_new();
while (cref) {
- if (!NIL_P(CREF_REFINEMENTS(cref))) {
- rb_hash_foreach(CREF_REFINEMENTS(cref), used_modules_i, ary);
- }
- cref = CREF_NEXT(cref);
+ if (!NIL_P(CREF_REFINEMENTS(cref))) {
+ rb_hash_foreach(CREF_REFINEMENTS(cref), used_modules_i, ary);
+ }
+ cref = CREF_NEXT(cref);
}
return rb_funcall(ary, rb_intern("uniq"), 0);
}
-/*!
- * Calls \c #initialize method of \a obj with the given arguments.
+static int
+used_refinements_i(VALUE _, VALUE mod, VALUE ary)
+{
+ while (BUILTIN_TYPE(rb_class_of(mod)) == T_MODULE && FL_TEST(rb_class_of(mod), RMODULE_IS_REFINEMENT)) {
+ rb_ary_push(ary, rb_class_of(mod));
+ mod = RCLASS_SUPER(mod);
+ }
+ return ST_CONTINUE;
+}
+
+/*
+ * call-seq:
+ * used_refinements -> array
*
- * It also forwards the given block to \c #initialize if given.
+ * Returns an array of all modules used in the current scope. The ordering
+ * of modules in the resulting array is not defined.
*
- * \param[in] obj the receiver object
- * \param[in] argc the number of arguments
- * \param[in] argv a pointer to the array of arguments
- * \ingroup object
+ * module A
+ * refine Object do
+ * end
+ * end
+ *
+ * module B
+ * refine Object do
+ * end
+ * end
+ *
+ * using A
+ * using B
+ * p Module.used_refinements
+ *
+ * <em>produces:</em>
+ *
+ * [#<refinement:Object@B>, #<refinement:Object@A>]
*/
+static VALUE
+rb_mod_s_used_refinements(VALUE _)
+{
+ const rb_cref_t *cref = rb_vm_cref();
+ VALUE ary = rb_ary_new();
+
+ while (cref) {
+ if (!NIL_P(CREF_REFINEMENTS(cref))) {
+ rb_hash_foreach(CREF_REFINEMENTS(cref), used_refinements_i, ary);
+ }
+ cref = CREF_NEXT(cref);
+ }
+
+ return ary;
+}
+
+struct refinement_import_methods_arg {
+ rb_cref_t *cref;
+ VALUE refinement;
+ VALUE module;
+};
+
+/* vm.c */
+rb_cref_t *rb_vm_cref_dup_without_refinements(const rb_cref_t *cref);
+
+static enum rb_id_table_iterator_result
+refinement_import_methods_i(ID key, VALUE value, void *data)
+{
+ const rb_method_entry_t *me = (const rb_method_entry_t *)value;
+ struct refinement_import_methods_arg *arg = (struct refinement_import_methods_arg *)data;
+
+ if (me->def->type != VM_METHOD_TYPE_ISEQ) {
+ rb_raise(rb_eArgError, "Can't import method which is not defined with Ruby code: %"PRIsVALUE"#%"PRIsVALUE, rb_class_path(arg->module), rb_id2str(key));
+ }
+ rb_cref_t *new_cref = rb_vm_cref_dup_without_refinements(me->def->body.iseq.cref);
+ CREF_REFINEMENTS_SET(new_cref, CREF_REFINEMENTS(arg->cref));
+ rb_add_method_iseq(arg->refinement, key, me->def->body.iseq.iseqptr, new_cref, METHOD_ENTRY_VISI(me));
+ return ID_TABLE_CONTINUE;
+}
+
+/*
+ * Note: docs for the method are in class.c
+ */
+
+static VALUE
+refinement_import_methods(int argc, VALUE *argv, VALUE refinement)
+{
+ int i;
+ struct refinement_import_methods_arg arg;
+
+ rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
+ for (i = 0; i < argc; i++) {
+ Check_Type(argv[i], T_MODULE);
+ if (RCLASS_SUPER(argv[i])) {
+ rb_warn("%"PRIsVALUE" has ancestors, but Refinement#import_methods doesn't import their methods", rb_class_path(argv[i]));
+ }
+ }
+ arg.cref = rb_vm_cref_replace_with_duplicated_cref();
+ arg.refinement = refinement;
+ for (i = 0; i < argc; i++) {
+ arg.module = argv[i];
+ struct rb_id_table *m_tbl = RCLASS_M_TBL(argv[i]);
+ if (!m_tbl) continue;
+ rb_id_table_foreach(m_tbl, refinement_import_methods_i, &arg);
+ }
+ return refinement;
+}
+
void
rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
{
- PASS_PASSED_BLOCK_HANDLER();
- rb_funcallv_kw(obj, idInitialize, argc, argv, RB_NO_KEYWORDS);
+ rb_obj_call_init_kw(obj, argc, argv, RB_NO_KEYWORDS);
}
void
@@ -1690,12 +1689,6 @@ rb_obj_call_init_kw(VALUE obj, int argc, const VALUE *argv, int kw_splat)
rb_funcallv_kw(obj, idInitialize, argc, argv, kw_splat);
}
-/*!
- * Extend the object with the module.
- *
- * Same as \c Module\#extend_object.
- * \ingroup class
- */
void
rb_extend_object(VALUE obj, VALUE module)
{
@@ -1771,15 +1764,29 @@ rb_obj_extend(int argc, VALUE *argv, VALUE obj)
CONST_ID(id_extended, "extended");
rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
- for (i = 0; i < argc; i++)
- Check_Type(argv[i], T_MODULE);
+ for (i = 0; i < argc; i++) {
+ Check_Type(argv[i], T_MODULE);
+ if (FL_TEST(argv[i], RMODULE_IS_REFINEMENT)) {
+ rb_raise(rb_eTypeError, "Cannot extend object with refinement");
+ }
+ }
while (argc--) {
- rb_funcall(argv[argc], id_extend_object, 1, obj);
- rb_funcall(argv[argc], id_extended, 1, obj);
+ rb_funcall(argv[argc], id_extend_object, 1, obj);
+ rb_funcall(argv[argc], id_extended, 1, obj);
}
return obj;
}
+VALUE
+rb_top_main_class(const char *method)
+{
+ VALUE klass = GET_THREAD()->top_wrapper;
+
+ if (!klass) return rb_cObject;
+ rb_warning("main.%s in the wrapped load is effective only in wrapper module", method);
+ return klass;
+}
+
/*
* call-seq:
* include(module, ...) -> self
@@ -1792,13 +1799,7 @@ rb_obj_extend(int argc, VALUE *argv, VALUE obj)
static VALUE
top_include(int argc, VALUE *argv, VALUE self)
{
- rb_thread_t *th = GET_THREAD();
-
- if (th->top_wrapper) {
- rb_warning("main.include in the wrapped load is effective only in wrapper module");
- return rb_mod_include(argc, argv, th->top_wrapper);
- }
- return rb_mod_include(argc, argv, rb_cObject);
+ return rb_mod_include(argc, argv, rb_top_main_class("include"));
}
/*
@@ -1812,14 +1813,16 @@ top_include(int argc, VALUE *argv, VALUE self)
static VALUE
top_using(VALUE self, VALUE module)
{
- const rb_cref_t *cref = rb_vm_cref();
+ const rb_cref_t *cref = CREF_NEXT(rb_vm_cref());;
rb_control_frame_t *prev_cfp = previous_frame(GET_EC());
+ rb_thread_t *th = GET_THREAD();
- if (CREF_NEXT(cref) || (prev_cfp && rb_vm_frame_method_entry(prev_cfp))) {
- rb_raise(rb_eRuntimeError, "main.using is permitted only at toplevel");
+ if ((th->top_wrapper ? CREF_NEXT(cref) : cref) ||
+ (prev_cfp && rb_vm_frame_method_entry(prev_cfp))) {
+ rb_raise(rb_eRuntimeError, "main.using is permitted only at toplevel");
}
if (rb_block_given_p()) {
- ignored_block(module, "main.");
+ ignored_block(module, "main.");
}
rb_using_module(rb_vm_cref_replace_with_duplicated_cref(), module);
return self;
@@ -1832,17 +1835,17 @@ errinfo_place(const rb_execution_context_t *ec)
const rb_control_frame_t *end_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
while (RUBY_VM_VALID_CONTROL_FRAME_P(cfp, end_cfp)) {
- if (VM_FRAME_RUBYFRAME_P(cfp)) {
- if (cfp->iseq->body->type == ISEQ_TYPE_RESCUE) {
- return &cfp->ep[VM_ENV_INDEX_LAST_LVAR];
- }
- else if (cfp->iseq->body->type == ISEQ_TYPE_ENSURE &&
- !THROW_DATA_P(cfp->ep[VM_ENV_INDEX_LAST_LVAR]) &&
- !FIXNUM_P(cfp->ep[VM_ENV_INDEX_LAST_LVAR])) {
- return &cfp->ep[VM_ENV_INDEX_LAST_LVAR];
- }
- }
- cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
+ if (VM_FRAME_RUBYFRAME_P(cfp)) {
+ if (ISEQ_BODY(cfp->iseq)->type == ISEQ_TYPE_RESCUE) {
+ return &cfp->ep[VM_ENV_INDEX_LAST_LVAR];
+ }
+ else if (ISEQ_BODY(cfp->iseq)->type == ISEQ_TYPE_ENSURE &&
+ !THROW_DATA_P(cfp->ep[VM_ENV_INDEX_LAST_LVAR]) &&
+ !FIXNUM_P(cfp->ep[VM_ENV_INDEX_LAST_LVAR])) {
+ return &cfp->ep[VM_ENV_INDEX_LAST_LVAR];
+ }
+ }
+ cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
return 0;
}
@@ -1852,10 +1855,10 @@ rb_ec_get_errinfo(const rb_execution_context_t *ec)
{
const VALUE *ptr = errinfo_place(ec);
if (ptr) {
- return *ptr;
+ return *ptr;
}
else {
- return ec->errinfo;
+ return ec->errinfo;
}
}
@@ -1871,31 +1874,17 @@ errinfo_getter(ID id, VALUE *_)
return get_errinfo();
}
-/*! The current exception in the current thread.
- *
- * Same as \c $! in Ruby.
- * \return the current exception or \c Qnil
- * \ingroup exception
- */
VALUE
rb_errinfo(void)
{
return GET_EC()->errinfo;
}
-/*! Sets the current exception (\c $!) to the given value
- *
- * \param[in] err an \c Exception object or \c Qnil.
- * \exception TypeError if \a err is neither an exception nor \c nil.
- * \note this function does not raise the exception.
- * Use \c rb_raise() when you want to raise.
- * \ingroup exception
- */
void
rb_set_errinfo(VALUE err)
{
if (!NIL_P(err) && !rb_obj_is_kind_of(err, rb_eException)) {
- rb_raise(rb_eTypeError, "assigning non-exception to $!");
+ rb_raise(rb_eTypeError, "assigning non-exception to $!");
}
GET_EC()->errinfo = err;
}
@@ -1905,10 +1894,10 @@ errat_getter(ID id, VALUE *_)
{
VALUE err = get_errinfo();
if (!NIL_P(err)) {
- return rb_get_backtrace(err);
+ return rb_get_backtrace(err);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -1917,7 +1906,7 @@ errat_setter(VALUE val, ID id, VALUE *var)
{
VALUE err = get_errinfo();
if (NIL_P(err)) {
- rb_raise(rb_eArgError, "$! not set");
+ rb_raise(rb_eArgError, "$! not set");
}
set_backtrace(err, val);
}
@@ -1938,10 +1927,10 @@ rb_f_method_name(VALUE _)
ID fname = prev_frame_func(); /* need *method* ID */
if (fname) {
- return ID2SYM(fname);
+ return ID2SYM(fname);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -1960,10 +1949,10 @@ rb_f_callee_name(VALUE _)
ID fname = prev_frame_callee(); /* need *callee* ID */
if (fname) {
- return ID2SYM(fname);
+ return ID2SYM(fname);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -1982,7 +1971,7 @@ f_current_dirname(VALUE _)
{
VALUE base = rb_current_realfilepath();
if (NIL_P(base)) {
- return Qnil;
+ return Qnil;
}
base = rb_file_dirname(base);
return base;
@@ -1992,7 +1981,10 @@ f_current_dirname(VALUE _)
* call-seq:
* global_variables -> array
*
- * Returns an array of the names of global variables.
+ * Returns an array of the names of global variables. This includes
+ * special regexp global variables such as <tt>$~</tt> and <tt>$+</tt>,
+ * but does not include the numbered regexp global variables (<tt>$1</tt>,
+ * <tt>$2</tt>, etc.).
*
* global_variables.grep /std/ #=> [:$stdin, :$stdout, :$stderr]
*/
@@ -2054,6 +2046,9 @@ Init_eval(void)
rb_define_virtual_variable("$@", errat_getter, errat_setter);
rb_define_virtual_variable("$!", errinfo_getter, 0);
+ rb_gvar_ractor_local("$@");
+ rb_gvar_ractor_local("$!");
+
rb_define_global_function("raise", f_raise, -1);
rb_define_global_function("fail", f_raise, -1);
@@ -2071,9 +2066,17 @@ Init_eval(void)
rb_define_private_method(rb_cModule, "prepend_features", rb_mod_prepend_features, 1);
rb_define_private_method(rb_cModule, "refine", rb_mod_refine, 1);
rb_define_private_method(rb_cModule, "using", mod_using, 1);
+ rb_define_method(rb_cModule, "refinements", mod_refinements, 0);
rb_define_singleton_method(rb_cModule, "used_modules",
- rb_mod_s_used_modules, 0);
+ rb_mod_s_used_modules, 0);
+ rb_define_singleton_method(rb_cModule, "used_refinements",
+ rb_mod_s_used_refinements, 0);
rb_undef_method(rb_cClass, "refine");
+ rb_define_private_method(rb_cRefinement, "import_methods", refinement_import_methods, -1);
+ rb_define_method(rb_cRefinement, "refined_class", rb_refinement_module_get_refined_class, 0);
+ rb_undef_method(rb_cRefinement, "append_features");
+ rb_undef_method(rb_cRefinement, "prepend_features");
+ rb_undef_method(rb_cRefinement, "extend_object");
rb_undef_method(rb_cClass, "module_function");
@@ -2084,9 +2087,9 @@ Init_eval(void)
rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, -1);
rb_define_private_method(rb_singleton_class(rb_vm_top_self()),
- "include", top_include, -1);
+ "include", top_include, -1);
rb_define_private_method(rb_singleton_class(rb_vm_top_self()),
- "using", top_using, 1);
+ "using", top_using, 1);
rb_define_method(rb_mKernel, "extend", rb_obj_extend, -1);
diff --git a/eval_error.c b/eval_error.c
index 847072ab98..9806683000 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -10,8 +10,8 @@
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
#define warn_print(x) RB_GNUC_EXTENSION_BLOCK( \
(__builtin_constant_p(x)) ? \
- rb_write_error2((x), (long)strlen(x)) : \
- rb_write_error(x) \
+ rb_write_error2((x), (long)strlen(x)) : \
+ rb_write_error(x) \
)
#else
#define warn_print(x) rb_write_error(x)
@@ -29,7 +29,7 @@ error_pos(const VALUE str)
{
VALUE pos = error_pos_str();
if (!NIL_P(pos)) {
- write_warn_str(str, pos);
+ write_warn_str(str, pos);
}
}
@@ -40,18 +40,18 @@ error_pos_str(void)
VALUE sourcefile = rb_source_location(&sourceline);
if (!NIL_P(sourcefile)) {
- ID caller_name;
- if (sourceline == 0) {
- return rb_sprintf("%"PRIsVALUE": ", sourcefile);
- }
- else if ((caller_name = rb_frame_callee()) != 0) {
- return rb_sprintf("%"PRIsVALUE":%d:in `%"PRIsVALUE"': ",
- sourcefile, sourceline,
- rb_id2str(caller_name));
- }
- else {
- return rb_sprintf("%"PRIsVALUE":%d: ", sourcefile, sourceline);
- }
+ ID caller_name;
+ if (sourceline == 0) {
+ return rb_sprintf("%"PRIsVALUE": ", sourcefile);
+ }
+ else if ((caller_name = rb_frame_callee()) != 0) {
+ return rb_sprintf("%"PRIsVALUE":%d:in `%"PRIsVALUE"': ",
+ sourcefile, sourceline,
+ rb_id2str(caller_name));
+ }
+ else {
+ return rb_sprintf("%"PRIsVALUE":%d: ", sourcefile, sourceline);
+ }
}
return Qnil;
}
@@ -62,62 +62,15 @@ set_backtrace(VALUE info, VALUE bt)
ID set_backtrace = rb_intern("set_backtrace");
if (rb_backtrace_p(bt)) {
- if (rb_method_basic_definition_p(CLASS_OF(info), set_backtrace)) {
- rb_exc_set_backtrace(info, bt);
- return;
- }
- else {
- bt = rb_backtrace_to_str_ary(bt);
- }
- }
- rb_check_funcall(info, set_backtrace, 1, &bt);
-}
-
-static void
-error_print(rb_execution_context_t *ec)
-{
- rb_ec_error_print(ec, ec->errinfo);
-}
-
-static void
-write_warnq(VALUE out, VALUE str, const char *ptr, long len)
-{
- if (NIL_P(out)) {
- const char *beg = ptr;
- const long olen = len;
- for (; len > 0; --len, ++ptr) {
- unsigned char c = *ptr;
- switch (c) {
- case '\n': case '\t': continue;
- }
- if (rb_iscntrl(c)) {
- char buf[5];
- const char *cc = 0;
- if (ptr > beg) rb_write_error2(beg, ptr - beg);
- beg = ptr + 1;
- cc = ruby_escaped_char(c);
- if (cc) {
- rb_write_error2(cc, strlen(cc));
- }
- else {
- rb_write_error2(buf, snprintf(buf, sizeof(buf), "\\x%02X", c));
- }
- }
- else if (c == '\\') {
- rb_write_error2(beg, ptr - beg + 1);
- beg = ptr;
- }
+ if (rb_method_basic_definition_p(CLASS_OF(info), set_backtrace)) {
+ rb_exc_set_backtrace(info, bt);
+ return;
}
- if (ptr > beg) {
- if (beg == RSTRING_PTR(str) && olen == RSTRING_LEN(str))
- rb_write_error_str(str);
- else
- rb_write_error2(beg, ptr - beg);
+ else {
+ bt = rb_backtrace_to_str_ary(bt);
}
}
- else {
- rb_str_cat(out, ptr, len);
- }
+ rb_check_funcall(info, set_backtrace, 1, &bt);
}
#define CSI_BEGIN "\033["
@@ -130,137 +83,178 @@ static const char reset[] = CSI_BEGIN""CSI_SGR;
static void
print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VALUE str, int highlight)
{
- const char *einfo = "";
long elen = 0;
VALUE mesg;
- if (emesg != Qundef) {
- if (NIL_P(errat) || RARRAY_LEN(errat) == 0 ||
- NIL_P(mesg = RARRAY_AREF(errat, 0))) {
- error_pos(str);
- }
- else {
- write_warn_str(str, mesg);
- write_warn(str, ": ");
- }
-
- if (!NIL_P(emesg)) {
- einfo = RSTRING_PTR(emesg);
- elen = RSTRING_LEN(emesg);
- }
+ if (NIL_P(errat) || RARRAY_LEN(errat) == 0 ||
+ NIL_P(mesg = RARRAY_AREF(errat, 0))) {
+ error_pos(str);
+ }
+ else {
+ write_warn_str(str, mesg);
+ write_warn(str, ": ");
+ }
+
+ if (!NIL_P(emesg)) {
+ elen = RSTRING_LEN(emesg);
+ }
+
+ if (eclass == rb_eRuntimeError && elen == 0) {
+ if (highlight) write_warn(str, underline);
+ write_warn(str, "unhandled exception");
+ if (highlight) write_warn(str, reset);
+ write_warn2(str, "\n", 1);
+ }
+ else {
+ VALUE epath;
+
+ epath = rb_class_name(eclass);
+ if (elen == 0) {
+ if (highlight) write_warn(str, underline);
+ write_warn_str(str, epath);
+ if (highlight) write_warn(str, reset);
+ write_warn(str, "\n");
+ }
+ else {
+ write_warn_str(str, emesg);
+ write_warn(str, "\n");
+ }
}
+}
+
+VALUE
+rb_decorate_message(const VALUE eclass, const VALUE emesg, int highlight)
+{
+ const char *einfo = "";
+ long elen = 0;
+ VALUE str = rb_str_new2("");
+
+ if (!NIL_P(emesg)) {
+ einfo = RSTRING_PTR(emesg);
+ elen = RSTRING_LEN(emesg);
+ }
if (eclass == rb_eRuntimeError && elen == 0) {
- if (highlight) write_warn(str, underline);
- write_warn(str, "unhandled exception");
- if (highlight) write_warn(str, reset);
- write_warn2(str, "\n", 1);
+ if (highlight) write_warn(str, underline);
+ write_warn(str, "unhandled exception");
+ if (highlight) write_warn(str, reset);
}
else {
- VALUE epath;
-
- epath = rb_class_name(eclass);
- if (elen == 0) {
- if (highlight) write_warn(str, underline);
- write_warn_str(str, epath);
- if (highlight) write_warn(str, reset);
- write_warn(str, "\n");
- }
- else {
+ VALUE epath;
+
+ epath = rb_class_name(eclass);
+ if (elen == 0) {
+ if (highlight) write_warn(str, underline);
+ write_warn_str(str, epath);
+ if (highlight) write_warn(str, reset);
+ }
+ else {
/* emesg is a String instance */
- const char *tail = 0;
+ const char *tail = 0;
if (highlight) write_warn(str, bold);
- if (RSTRING_PTR(epath)[0] == '#')
- epath = 0;
- if ((tail = memchr(einfo, '\n', elen)) != 0) {
- write_warnq(str, emesg, einfo, tail - einfo);
- tail++; /* skip newline */
- }
- else {
- write_warnq(str, emesg, einfo, elen);
- }
- if (epath) {
- write_warn(str, " (");
- if (highlight) write_warn(str, underline);
+ if (RSTRING_PTR(epath)[0] == '#')
+ epath = 0;
+ if ((tail = memchr(einfo, '\n', elen)) != 0) {
+ write_warn2(str, einfo, tail - einfo);
+ tail++; /* skip newline */
+ }
+ else {
+ write_warn_str(str, emesg);
+ }
+ if (epath) {
+ write_warn(str, " (");
+ if (highlight) write_warn(str, underline);
write_warn_str(str, epath);
- if (highlight) {
- write_warn(str, reset);
- write_warn(str, bold);
- }
- write_warn2(str, ")", 1);
- if (highlight) write_warn(str, reset);
- write_warn2(str, "\n", 1);
- }
- if (tail && einfo+elen > tail) {
- if (!highlight) {
- write_warnq(str, emesg, tail, einfo+elen-tail);
- if (einfo[elen-1] != '\n') write_warn2(str, "\n", 1);
- }
- else {
- elen -= tail - einfo;
- einfo = tail;
- while (elen > 0) {
- tail = memchr(einfo, '\n', elen);
- if (!tail || tail > einfo) {
- write_warn(str, bold);
- write_warnq(str, emesg, einfo, tail ? tail-einfo : elen);
- write_warn(str, reset);
- if (!tail) {
- write_warn2(str, "\n", 1);
- break;
- }
- }
- elen -= tail - einfo;
- einfo = tail;
- do ++tail; while (tail < einfo+elen && *tail == '\n');
- write_warnq(str, emesg, einfo, tail-einfo);
- elen -= tail - einfo;
- einfo = tail;
- }
- }
- }
- else if (!epath) {
- write_warn2(str, "\n", 1);
- }
- }
+ if (highlight) {
+ write_warn(str, reset);
+ write_warn(str, bold);
+ }
+ write_warn2(str, ")", 1);
+ if (highlight) write_warn(str, reset);
+ }
+ if (tail && einfo+elen > tail) {
+ if (!highlight) {
+ write_warn2(str, "\n", 1);
+ write_warn2(str, tail, einfo+elen-tail);
+ }
+ else {
+ elen -= tail - einfo;
+ einfo = tail;
+ write_warn2(str, "\n", 1);
+ while (elen > 0) {
+ tail = memchr(einfo, '\n', elen);
+ if (!tail || tail > einfo) {
+ write_warn(str, bold);
+ write_warn2(str, einfo, tail ? tail-einfo : elen);
+ write_warn(str, reset);
+ if (!tail) {
+ break;
+ }
+ }
+ elen -= tail - einfo;
+ einfo = tail;
+ do ++tail; while (tail < einfo+elen && *tail == '\n');
+ write_warn2(str, einfo, tail-einfo);
+ elen -= tail - einfo;
+ einfo = tail;
+ }
+ }
+ }
+ }
}
+
+ return str;
}
static void
-print_backtrace(const VALUE eclass, const VALUE errat, const VALUE str, int reverse)
+print_backtrace(const VALUE eclass, const VALUE errat, const VALUE str, int reverse, long backtrace_limit)
{
if (!NIL_P(errat)) {
- long i;
- long len = RARRAY_LEN(errat);
- int skip = eclass == rb_eSysStackError;
- const int threshold = 1000000000;
+ long i;
+ long len = RARRAY_LEN(errat);
+ const int threshold = 1000000000;
int width = (len <= 1) ? INT_MIN : ((int)log10((double)(len > threshold ?
- ((len - 1) / threshold) :
- len - 1)) +
- (len < threshold ? 0 : 9) + 1);
-
-#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
-#define TRACE_HEAD 8
-#define TRACE_TAIL 5
-
- for (i = 1; i < len; i++) {
- VALUE line = RARRAY_AREF(errat, reverse ? len - i : i);
- if (RB_TYPE_P(line, T_STRING)) {
- VALUE bt = rb_str_new_cstr("\t");
- if (reverse) rb_str_catf(bt, "%*ld: ", width, len - i);
- write_warn_str(str, rb_str_catf(bt, "from %"PRIsVALUE"\n", line));
- }
- if (skip && i == TRACE_HEAD && len > TRACE_MAX) {
- write_warn_str(str, rb_sprintf("\t ... %ld levels...\n",
- len - TRACE_HEAD - TRACE_TAIL));
- i = len - TRACE_TAIL;
- }
- }
+ ((len - 1) / threshold) :
+ len - 1)) +
+ (len < threshold ? 0 : 9) + 1);
+
+ long skip_start = -1, skip_len = 0;
+
+ // skip for stackoverflow
+ if (eclass == rb_eSysStackError) {
+ long trace_head = 9;
+ long trace_tail = 4;
+ long trace_max = trace_head + trace_tail + 5;
+ if (len > trace_max) {
+ skip_start = trace_head;
+ skip_len = len - trace_max + 5;
+ }
+ }
+
+ // skip for explicit limit
+ if (backtrace_limit >= 0 && len > backtrace_limit + 2) {
+ skip_start = backtrace_limit + 1;
+ skip_len = len - skip_start;
+ }
+
+ for (i = 1; i < len; i++) {
+ if (i == skip_start) {
+ write_warn_str(str, rb_sprintf("\t ... %ld levels...\n", skip_len));
+ i += skip_len;
+ if (i >= len) break;
+ }
+ VALUE line = RARRAY_AREF(errat, reverse ? len - i : i);
+ if (RB_TYPE_P(line, T_STRING)) {
+ VALUE bt = rb_str_new_cstr("\t");
+ if (reverse) rb_str_catf(bt, "%*ld: ", width, len - i);
+ write_warn_str(str, rb_str_catf(bt, "from %"PRIsVALUE"\n", line));
+ }
+ }
}
}
-VALUE rb_get_message(VALUE exc);
+VALUE rb_get_detailed_message(VALUE exc, VALUE opt);
static int
shown_cause_p(VALUE cause, VALUE *shown_causes)
@@ -275,105 +269,126 @@ shown_cause_p(VALUE cause, VALUE *shown_causes)
}
static void
-show_cause(VALUE errinfo, VALUE str, VALUE highlight, VALUE reverse, VALUE *shown_causes)
+show_cause(VALUE errinfo, VALUE str, VALUE opt, VALUE highlight, VALUE reverse, long backtrace_limit, VALUE *shown_causes)
{
VALUE cause = rb_attr_get(errinfo, id_cause);
if (!NIL_P(cause) && rb_obj_is_kind_of(cause, rb_eException) &&
!shown_cause_p(cause, shown_causes)) {
volatile VALUE eclass = CLASS_OF(cause);
VALUE errat = rb_get_backtrace(cause);
- VALUE emesg = rb_get_message(cause);
+ VALUE emesg = rb_get_detailed_message(cause, opt);
if (reverse) {
- show_cause(cause, str, highlight, reverse, shown_causes);
- print_backtrace(eclass, errat, str, TRUE);
- print_errinfo(eclass, errat, emesg, str, highlight!=0);
+ show_cause(cause, str, opt, highlight, reverse, backtrace_limit, shown_causes);
+ print_backtrace(eclass, errat, str, TRUE, backtrace_limit);
+ print_errinfo(eclass, errat, emesg, str, RTEST(highlight));
}
else {
- print_errinfo(eclass, errat, emesg, str, highlight!=0);
- print_backtrace(eclass, errat, str, FALSE);
- show_cause(cause, str, highlight, reverse, shown_causes);
+ print_errinfo(eclass, errat, emesg, str, RTEST(highlight));
+ print_backtrace(eclass, errat, str, FALSE, backtrace_limit);
+ show_cause(cause, str, opt, highlight, reverse, backtrace_limit, shown_causes);
}
}
}
void
-rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE highlight, VALUE reverse)
+rb_exc_check_circular_cause(VALUE exc)
+{
+ VALUE cause = exc, shown_causes = 0;
+ do {
+ if (shown_cause_p(cause, &shown_causes)) {
+ rb_raise(rb_eArgError, "circular causes");
+ }
+ } while (!NIL_P(cause = rb_attr_get(cause, id_cause)));
+}
+
+void
+rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE opt, VALUE highlight, VALUE reverse)
{
volatile VALUE eclass;
VALUE shown_causes = 0;
+ long backtrace_limit = rb_backtrace_length_limit;
if (NIL_P(errinfo))
- return;
+ return;
- if (errat == Qundef) {
- errat = Qnil;
+ if (UNDEF_P(errat)) {
+ errat = Qnil;
}
eclass = CLASS_OF(errinfo);
- if (NIL_P(reverse) || NIL_P(highlight)) {
- VALUE tty = (VALUE)rb_stderr_tty_p();
- if (NIL_P(reverse)) reverse = tty;
- if (NIL_P(highlight)) highlight = tty;
- }
if (reverse) {
- static const char traceback[] = "Traceback "
- "(most recent call last):\n";
- const int bold_part = rb_strlen_lit("Traceback");
- char buff[sizeof(traceback)+sizeof(bold)+sizeof(reset)-2], *p = buff;
- const char *msg = traceback;
- long len = sizeof(traceback) - 1;
- if (highlight) {
+ static const char traceback[] = "Traceback "
+ "(most recent call last):\n";
+ const int bold_part = rb_strlen_lit("Traceback");
+ char buff[sizeof(traceback)+sizeof(bold)+sizeof(reset)-2], *p = buff;
+ const char *msg = traceback;
+ long len = sizeof(traceback) - 1;
+ if (RTEST(highlight)) {
#define APPEND(s, l) (memcpy(p, s, l), p += (l))
- APPEND(bold, sizeof(bold)-1);
- APPEND(traceback, bold_part);
- APPEND(reset, sizeof(reset)-1);
- APPEND(traceback + bold_part, sizeof(traceback)-bold_part-1);
+ APPEND(bold, sizeof(bold)-1);
+ APPEND(traceback, bold_part);
+ APPEND(reset, sizeof(reset)-1);
+ APPEND(traceback + bold_part, sizeof(traceback)-bold_part-1);
#undef APPEND
- len = p - (msg = buff);
- }
- write_warn2(str, msg, len);
- show_cause(errinfo, str, highlight, reverse, &shown_causes);
- print_backtrace(eclass, errat, str, TRUE);
- print_errinfo(eclass, errat, emesg, str, highlight!=0);
+ len = p - (msg = buff);
+ }
+ write_warn2(str, msg, len);
+ show_cause(errinfo, str, opt, highlight, reverse, backtrace_limit, &shown_causes);
+ print_backtrace(eclass, errat, str, TRUE, backtrace_limit);
+ print_errinfo(eclass, errat, emesg, str, RTEST(highlight));
}
else {
- print_errinfo(eclass, errat, emesg, str, highlight!=0);
- print_backtrace(eclass, errat, str, FALSE);
- show_cause(errinfo, str, highlight, reverse, &shown_causes);
+ print_errinfo(eclass, errat, emesg, str, RTEST(highlight));
+ print_backtrace(eclass, errat, str, FALSE, backtrace_limit);
+ show_cause(errinfo, str, opt, highlight, reverse, backtrace_limit, &shown_causes);
}
}
-void
-rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo)
+static void
+rb_ec_error_print_detailed(rb_execution_context_t *const ec, const VALUE errinfo, const VALUE str, VALUE emesg0)
{
volatile uint8_t raised_flag = ec->raised_flag;
volatile VALUE errat = Qundef;
- volatile VALUE emesg = Qundef;
+ volatile bool written = false;
+ volatile VALUE emesg = emesg0;
+
+ VALUE opt = rb_hash_new();
+ VALUE highlight = rb_stderr_tty_p() ? Qtrue : Qfalse;
+ rb_hash_aset(opt, ID2SYM(rb_intern_const("highlight")), highlight);
if (NIL_P(errinfo))
- return;
+ return;
rb_ec_raised_clear(ec);
EC_PUSH_TAG(ec);
if (EC_EXEC_TAG() == TAG_NONE) {
- errat = rb_get_backtrace(errinfo);
+ errat = rb_get_backtrace(errinfo);
}
- if (emesg == Qundef) {
- emesg = Qnil;
- emesg = rb_get_message(errinfo);
+ if (UNDEF_P(emesg)) {
+ emesg = Qnil;
+ emesg = rb_get_detailed_message(errinfo, opt);
}
- rb_error_write(errinfo, emesg, errat, Qnil, Qnil, Qnil);
+ if (!written) {
+ written = true;
+ rb_error_write(errinfo, emesg, errat, str, opt, highlight, Qfalse);
+ }
EC_POP_TAG();
ec->errinfo = errinfo;
rb_ec_raised_set(ec, raised_flag);
}
+void
+rb_ec_error_print(rb_execution_context_t *volatile ec, volatile VALUE errinfo)
+{
+ rb_ec_error_print_detailed(ec, errinfo, Qnil, Qundef);
+}
+
#define undef_mesg_for(v, k) rb_fstring_lit("undefined"v" method `%1$s' for "k" `%2$s'")
#define undef_mesg(v) ( \
- is_mod ? \
- undef_mesg_for(v, "module") : \
- undef_mesg_for(v, "class"))
+ is_mod ? \
+ undef_mesg_for(v, "module") : \
+ undef_mesg_for(v, "class"))
void
rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
@@ -399,9 +414,9 @@ rb_print_undef_str(VALUE klass, VALUE name)
#define inaccessible_mesg_for(v, k) rb_fstring_lit("method `%1$s' for "k" `%2$s' is "v)
#define inaccessible_mesg(v) ( \
- is_mod ? \
- inaccessible_mesg_for(v, "module") : \
- inaccessible_mesg_for(v, "class"))
+ is_mod ? \
+ inaccessible_mesg_for(v, "module") : \
+ inaccessible_mesg_for(v, "class"))
void
rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
@@ -411,8 +426,8 @@ rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
switch (visi & METHOD_VISI_MASK) {
case METHOD_VISI_UNDEF:
case METHOD_VISI_PUBLIC: mesg = inaccessible_mesg(""); break;
- case METHOD_VISI_PRIVATE: mesg = inaccessible_mesg(" private"); break;
- case METHOD_VISI_PROTECTED: mesg = inaccessible_mesg(" protected"); break;
+ case METHOD_VISI_PRIVATE: mesg = inaccessible_mesg("private"); break;
+ case METHOD_VISI_PROTECTED: mesg = inaccessible_mesg("protected"); break;
default: UNREACHABLE;
}
rb_name_err_raise_str(mesg, klass, ID2SYM(id));
@@ -425,66 +440,109 @@ sysexit_status(VALUE err)
return NUM2INT(st);
}
+enum {
+ EXITING_WITH_MESSAGE = 1,
+ EXITING_WITH_STATUS = 2,
+ EXITING_WITH_SIGNAL = 4
+};
+static int
+exiting_split(VALUE errinfo, volatile int *exitcode, volatile int *sigstatus)
+{
+ int ex = EXIT_SUCCESS;
+ VALUE signo;
+ int sig = 0;
+ int result = 0;
+
+ if (NIL_P(errinfo)) return 0;
+
+ if (THROW_DATA_P(errinfo)) {
+ int throw_state = ((const struct vm_throw_data *)errinfo)->throw_state;
+ ex = throw_state & VM_THROW_STATE_MASK;
+ result |= EXITING_WITH_STATUS;
+ }
+ else if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) {
+ ex = sysexit_status(errinfo);
+ result |= EXITING_WITH_STATUS;
+ }
+ else if (rb_obj_is_kind_of(errinfo, rb_eSignal)) {
+ signo = rb_ivar_get(errinfo, id_signo);
+ sig = FIX2INT(signo);
+ result |= EXITING_WITH_SIGNAL;
+ /* no message when exiting by signal */
+ if (signo == INT2FIX(SIGSEGV) || !rb_obj_is_instance_of(errinfo, rb_eSignal))
+ /* except for SEGV and subclasses */
+ result |= EXITING_WITH_MESSAGE;
+ }
+ else if (rb_obj_is_kind_of(errinfo, rb_eSystemCallError) &&
+ FIXNUM_P(signo = rb_attr_get(errinfo, id_signo))) {
+ sig = FIX2INT(signo);
+ result |= EXITING_WITH_SIGNAL;
+ /* no message when exiting by error to be mapped to signal */
+ }
+ else {
+ ex = EXIT_FAILURE;
+ result |= EXITING_WITH_STATUS | EXITING_WITH_MESSAGE;
+ }
+
+ if (exitcode && (result & EXITING_WITH_STATUS))
+ *exitcode = ex;
+ if (sigstatus && (result & EXITING_WITH_SIGNAL))
+ *sigstatus = sig;
+
+ return result;
+}
+
#define unknown_longjmp_status(status) \
rb_bug("Unknown longjmp status %d", status)
static int
-error_handle(rb_execution_context_t *ec, int ex)
+error_handle(rb_execution_context_t *ec, VALUE errinfo, enum ruby_tag_type ex)
{
int status = EXIT_FAILURE;
if (rb_ec_set_raised(ec))
- return EXIT_FAILURE;
+ return EXIT_FAILURE;
switch (ex & TAG_MASK) {
case 0:
- status = EXIT_SUCCESS;
- break;
+ status = EXIT_SUCCESS;
+ break;
case TAG_RETURN:
- error_pos(Qnil);
- warn_print("unexpected return\n");
- break;
+ error_pos(Qnil);
+ warn_print("unexpected return\n");
+ break;
case TAG_NEXT:
- error_pos(Qnil);
- warn_print("unexpected next\n");
- break;
+ error_pos(Qnil);
+ warn_print("unexpected next\n");
+ break;
case TAG_BREAK:
- error_pos(Qnil);
- warn_print("unexpected break\n");
- break;
+ error_pos(Qnil);
+ warn_print("unexpected break\n");
+ break;
case TAG_REDO:
- error_pos(Qnil);
- warn_print("unexpected redo\n");
- break;
+ error_pos(Qnil);
+ warn_print("unexpected redo\n");
+ break;
case TAG_RETRY:
- error_pos(Qnil);
- warn_print("retry outside of rescue clause\n");
- break;
+ error_pos(Qnil);
+ warn_print("retry outside of rescue clause\n");
+ break;
case TAG_THROW:
- /* TODO: fix me */
- error_pos(Qnil);
- warn_print("unexpected throw\n");
- break;
- case TAG_RAISE: {
- VALUE errinfo = ec->errinfo;
- if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) {
- status = sysexit_status(errinfo);
- }
- else if (rb_obj_is_instance_of(errinfo, rb_eSignal) &&
- rb_ivar_get(errinfo, id_signo) != INT2FIX(SIGSEGV)) {
- /* no message when exiting by signal */
- }
- else {
- rb_ec_error_print(ec, errinfo);
- }
- break;
- }
+ /* TODO: fix me */
+ error_pos(Qnil);
+ warn_print("unexpected throw\n");
+ break;
+ case TAG_RAISE:
+ if (!(exiting_split(errinfo, &status, NULL) & EXITING_WITH_MESSAGE)) {
+ break;
+ }
+ /* fallthrough */
case TAG_FATAL:
- error_print(ec);
- break;
+ rb_ec_error_print(ec, errinfo);
+ break;
default:
- unknown_longjmp_status(ex);
- break;
+ unknown_longjmp_status(ex);
+ break;
}
rb_ec_reset_raised(ec);
return status;
diff --git a/eval_intern.h b/eval_intern.h
index aa07ce30ed..6cbaa51361 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -33,7 +33,11 @@ pass_passed_block_handler(rb_execution_context_t *ec)
#endif
#include <stdio.h>
-#include <setjmp.h>
+#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
+# include "wasm/setjmp.h"
+#else
+# include <setjmp.h>
+#endif
#ifdef __APPLE__
# ifdef HAVE_CRT_EXTERNS_H
@@ -91,40 +95,12 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval
#include <sys/stat.h>
-#ifdef _MSC_VER
-#define SAVE_ROOT_JMPBUF_BEFORE_STMT \
- __try {
-#define SAVE_ROOT_JMPBUF_AFTER_STMT \
- } \
- __except (GetExceptionCode() == EXCEPTION_STACK_OVERFLOW ? \
- (rb_ec_raised_set(GET_EC(), RAISED_STACKOVERFLOW), \
- raise(SIGSEGV), \
- EXCEPTION_EXECUTE_HANDLER) : \
- EXCEPTION_CONTINUE_SEARCH) { \
- /* never reaches here */ \
- }
-#elif defined(__MINGW32__)
-LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
-#define SAVE_ROOT_JMPBUF_BEFORE_STMT \
- do { \
- PVOID _handler = AddVectoredExceptionHandler(1, rb_w32_stack_overflow_handler);
-
-#define SAVE_ROOT_JMPBUF_AFTER_STMT \
- RemoveVectoredExceptionHandler(_handler); \
- } while (0);
-#else
-#define SAVE_ROOT_JMPBUF_BEFORE_STMT
-#define SAVE_ROOT_JMPBUF_AFTER_STMT
-#endif
#define SAVE_ROOT_JMPBUF(th, stmt) do \
- if (ruby_setjmp((th)->root_jmpbuf) == 0) { \
- SAVE_ROOT_JMPBUF_BEFORE_STMT \
+ if (true) { \
stmt; \
- SAVE_ROOT_JMPBUF_AFTER_STMT \
} \
- else { \
- rb_fiber_start(); \
+ else if (th) { /* suppress unused-variable warning */ \
} while (0)
#define EC_PUSH_TAG(ec) do { \
@@ -132,7 +108,8 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
struct rb_vm_tag _tag; \
_tag.state = TAG_NONE; \
_tag.tag = Qundef; \
- _tag.prev = _ec->tag;
+ _tag.prev = _ec->tag; \
+ _tag.lock_rec = rb_ec_vm_lock_rec(_ec); \
#define EC_POP_TAG() \
_ec->tag = _tag.prev; \
@@ -143,7 +120,7 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
-#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || __clang__
+#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || defined __clang__
/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings.
* This macro also prevents Clang from dumping core in EC_EXEC_TAG().
* (I confirmed Clang 4.0.1 and 5.0.0.)
@@ -157,12 +134,23 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
# define VAR_NOCLOBBERED(var) var
#endif
+static inline void
+rb_ec_vm_lock_rec_check(const rb_execution_context_t *ec, unsigned int recorded_lock_rec)
+{
+ unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
+ if (current_lock_rec != recorded_lock_rec) {
+ rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
+ }
+}
+
/* clear ec->tag->state, and return the value */
static inline int
rb_ec_tag_state(const rb_execution_context_t *ec)
{
- enum ruby_tag_type state = ec->tag->state;
- ec->tag->state = TAG_NONE;
+ struct rb_vm_tag *tag = ec->tag;
+ enum ruby_tag_type state = tag->state;
+ tag->state = TAG_NONE;
+ rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
return state;
}
@@ -189,11 +177,30 @@ rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
+#define CREF_FL_SINGLETON IMEMO_FL_USER3
+
+static inline int CREF_SINGLETON(const rb_cref_t *cref);
static inline VALUE
CREF_CLASS(const rb_cref_t *cref)
{
- return cref->klass;
+ if (CREF_SINGLETON(cref)) {
+ return CLASS_OF(cref->klass_or_self);
+ }
+ else {
+ return cref->klass_or_self;
+ }
+}
+
+static inline VALUE
+CREF_CLASS_FOR_DEFINITION(const rb_cref_t *cref)
+{
+ if (CREF_SINGLETON(cref)) {
+ return rb_singleton_class(cref->klass_or_self);
+ }
+ else {
+ return cref->klass_or_self;
+ }
}
static inline rb_cref_t *
@@ -233,6 +240,18 @@ CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
}
static inline int
+CREF_SINGLETON(const rb_cref_t *cref)
+{
+ return cref->flags & CREF_FL_SINGLETON;
+}
+
+static inline void
+CREF_SINGLETON_SET(rb_cref_t *cref)
+{
+ cref->flags |= CREF_FL_SINGLETON;
+}
+
+static inline int
CREF_OMOD_SHARED(const rb_cref_t *cref)
{
return cref->flags & CREF_FL_OMOD_SHARED;
@@ -268,7 +287,7 @@ VALUE rb_make_exception(int argc, const VALUE *argv);
NORETURN(void rb_method_name_error(VALUE, VALUE));
-NORETURN(void rb_fiber_start(void));
+NORETURN(void rb_fiber_start(rb_fiber_t*));
NORETURN(void rb_print_undef(VALUE, ID, rb_method_visibility_t));
NORETURN(void rb_print_undef_str(VALUE, VALUE));
@@ -281,17 +300,25 @@ rb_cref_t *rb_vm_cref(void);
rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
void rb_vm_set_progname(VALUE filename);
-void rb_thread_terminate_all(void);
VALUE rb_vm_cbase(void);
/* vm_backtrace.c */
VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
-VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n);
+VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, bool skip_internal);
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
# ifdef HAVE_MBLEN
-# define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
+# define CharNext(p) rb_char_next(p)
+static inline char *
+rb_char_next(const char *p)
+{
+ if (p) {
+ int len = mblen(p, RUBY_MBCHAR_MAXSIZE);
+ p += len > 0 ? len : 1;
+ }
+ return (char *)p;
+}
# else
# define CharNext(p) ((p) + 1)
# endif
@@ -302,9 +329,9 @@ static inline void
translit_char(char *p, int from, int to)
{
while (*p) {
- if ((unsigned char)*p == from)
- *p = to;
- p = CharNext(p);
+ if ((unsigned char)*p == from)
+ *p = to;
+ p = CharNext(p);
}
}
#endif
diff --git a/eval_jump.c b/eval_jump.c
index 75d4ad0207..e8e74f4e70 100644
--- a/eval_jump.c
+++ b/eval_jump.c
@@ -40,7 +40,7 @@ rb_f_at_exit(VALUE _)
VALUE proc;
if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "called without a block");
+ rb_raise(rb_eArgError, "called without a block");
}
proc = rb_block_proc();
rb_set_end_proc(rb_call_end_proc, proc);
@@ -48,7 +48,7 @@ rb_f_at_exit(VALUE _)
}
struct end_proc_data {
- void (*func) ();
+ void (*func) (VALUE);
VALUE data;
struct end_proc_data *next;
};
@@ -63,10 +63,10 @@ rb_set_end_proc(void (*func)(VALUE), VALUE data)
rb_thread_t *th = GET_THREAD();
if (th->top_wrapper) {
- list = &ephemeral_end_procs;
+ list = &ephemeral_end_procs;
}
else {
- list = &end_procs;
+ list = &end_procs;
}
link->next = *list;
link->func = func;
@@ -81,13 +81,13 @@ rb_mark_end_proc(void)
link = end_procs;
while (link) {
- rb_gc_mark(link->data);
- link = link->next;
+ rb_gc_mark(link->data);
+ link = link->next;
}
link = ephemeral_end_procs;
while (link) {
- rb_gc_mark(link->data);
- link = link->next;
+ rb_gc_mark(link->data);
+ link = link->next;
}
}
@@ -99,11 +99,11 @@ exec_end_procs_chain(struct end_proc_data *volatile *procs, VALUE *errp)
VALUE errinfo = *errp;
while ((link = *procs) != 0) {
- *procs = link->next;
- endproc = *link;
- xfree(link);
- (*endproc.func) (endproc.data);
- *errp = errinfo;
+ *procs = link->next;
+ endproc = *link;
+ xfree(link);
+ (*endproc.func) (endproc.data);
+ *errp = errinfo;
}
}
@@ -116,15 +116,15 @@ rb_ec_exec_end_proc(rb_execution_context_t * ec)
EC_PUSH_TAG(ec);
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
again:
- exec_end_procs_chain(&ephemeral_end_procs, &ec->errinfo);
- exec_end_procs_chain(&end_procs, &ec->errinfo);
+ exec_end_procs_chain(&ephemeral_end_procs, &ec->errinfo);
+ exec_end_procs_chain(&end_procs, &ec->errinfo);
}
else {
- EC_TMPPOP_TAG();
- error_handle(ec, state);
- if (!NIL_P(ec->errinfo)) errinfo = ec->errinfo;
- EC_REPUSH_TAG();
- goto again;
+ EC_TMPPOP_TAG();
+ error_handle(ec, ec->errinfo, state);
+ if (!NIL_P(ec->errinfo)) errinfo = ec->errinfo;
+ EC_REPUSH_TAG();
+ goto again;
}
EC_POP_TAG();
diff --git a/ext/-test-/RUBY_ALIGNOF/c.c b/ext/-test-/RUBY_ALIGNOF/c.c
new file mode 100644
index 0000000000..7a9f7cb498
--- /dev/null
+++ b/ext/-test-/RUBY_ALIGNOF/c.c
@@ -0,0 +1,15 @@
+#include "ruby.h"
+#include <stddef.h>
+
+struct T {
+ char _;
+ double t;
+};
+
+RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(struct T, t));
+
+void
+Init_RUBY_ALIGNOF(void)
+{
+ // Windows linker mandates this symbol to exist.
+}
diff --git a/ext/-test-/RUBY_ALIGNOF/cpp.cpp b/ext/-test-/RUBY_ALIGNOF/cpp.cpp
new file mode 100644
index 0000000000..ed76d49b9f
--- /dev/null
+++ b/ext/-test-/RUBY_ALIGNOF/cpp.cpp
@@ -0,0 +1,9 @@
+#include "ruby.h"
+#include <cstddef>
+
+struct T {
+ char _;
+ double t;
+};
+
+RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(T, t));
diff --git a/ext/-test-/RUBY_ALIGNOF/depend b/ext/-test-/RUBY_ALIGNOF/depend
new file mode 100644
index 0000000000..21ef8c6dd0
--- /dev/null
+++ b/ext/-test-/RUBY_ALIGNOF/depend
@@ -0,0 +1,162 @@
+# AUTOGENERATED DEPENDENCIES START
+c.o: $(RUBY_EXTCONF_H)
+c.o: $(arch_hdrdir)/ruby/config.h
+c.o: $(hdrdir)/ruby.h
+c.o: $(hdrdir)/ruby/assert.h
+c.o: $(hdrdir)/ruby/backward.h
+c.o: $(hdrdir)/ruby/backward/2/assume.h
+c.o: $(hdrdir)/ruby/backward/2/attributes.h
+c.o: $(hdrdir)/ruby/backward/2/bool.h
+c.o: $(hdrdir)/ruby/backward/2/inttypes.h
+c.o: $(hdrdir)/ruby/backward/2/limits.h
+c.o: $(hdrdir)/ruby/backward/2/long_long.h
+c.o: $(hdrdir)/ruby/backward/2/stdalign.h
+c.o: $(hdrdir)/ruby/backward/2/stdarg.h
+c.o: $(hdrdir)/ruby/defines.h
+c.o: $(hdrdir)/ruby/intern.h
+c.o: $(hdrdir)/ruby/internal/abi.h
+c.o: $(hdrdir)/ruby/internal/anyargs.h
+c.o: $(hdrdir)/ruby/internal/arithmetic.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+c.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+c.o: $(hdrdir)/ruby/internal/assume.h
+c.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+c.o: $(hdrdir)/ruby/internal/attr/artificial.h
+c.o: $(hdrdir)/ruby/internal/attr/cold.h
+c.o: $(hdrdir)/ruby/internal/attr/const.h
+c.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+c.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+c.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+c.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+c.o: $(hdrdir)/ruby/internal/attr/error.h
+c.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+c.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+c.o: $(hdrdir)/ruby/internal/attr/format.h
+c.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+c.o: $(hdrdir)/ruby/internal/attr/noalias.h
+c.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+c.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+c.o: $(hdrdir)/ruby/internal/attr/noinline.h
+c.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+c.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+c.o: $(hdrdir)/ruby/internal/attr/pure.h
+c.o: $(hdrdir)/ruby/internal/attr/restrict.h
+c.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+c.o: $(hdrdir)/ruby/internal/attr/warning.h
+c.o: $(hdrdir)/ruby/internal/attr/weakref.h
+c.o: $(hdrdir)/ruby/internal/cast.h
+c.o: $(hdrdir)/ruby/internal/compiler_is.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+c.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+c.o: $(hdrdir)/ruby/internal/compiler_since.h
+c.o: $(hdrdir)/ruby/internal/config.h
+c.o: $(hdrdir)/ruby/internal/constant_p.h
+c.o: $(hdrdir)/ruby/internal/core.h
+c.o: $(hdrdir)/ruby/internal/core/rarray.h
+c.o: $(hdrdir)/ruby/internal/core/rbasic.h
+c.o: $(hdrdir)/ruby/internal/core/rbignum.h
+c.o: $(hdrdir)/ruby/internal/core/rclass.h
+c.o: $(hdrdir)/ruby/internal/core/rdata.h
+c.o: $(hdrdir)/ruby/internal/core/rfile.h
+c.o: $(hdrdir)/ruby/internal/core/rhash.h
+c.o: $(hdrdir)/ruby/internal/core/robject.h
+c.o: $(hdrdir)/ruby/internal/core/rregexp.h
+c.o: $(hdrdir)/ruby/internal/core/rstring.h
+c.o: $(hdrdir)/ruby/internal/core/rstruct.h
+c.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+c.o: $(hdrdir)/ruby/internal/ctype.h
+c.o: $(hdrdir)/ruby/internal/dllexport.h
+c.o: $(hdrdir)/ruby/internal/dosish.h
+c.o: $(hdrdir)/ruby/internal/error.h
+c.o: $(hdrdir)/ruby/internal/eval.h
+c.o: $(hdrdir)/ruby/internal/event.h
+c.o: $(hdrdir)/ruby/internal/fl_type.h
+c.o: $(hdrdir)/ruby/internal/gc.h
+c.o: $(hdrdir)/ruby/internal/glob.h
+c.o: $(hdrdir)/ruby/internal/globals.h
+c.o: $(hdrdir)/ruby/internal/has/attribute.h
+c.o: $(hdrdir)/ruby/internal/has/builtin.h
+c.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+c.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+c.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+c.o: $(hdrdir)/ruby/internal/has/extension.h
+c.o: $(hdrdir)/ruby/internal/has/feature.h
+c.o: $(hdrdir)/ruby/internal/has/warning.h
+c.o: $(hdrdir)/ruby/internal/intern/array.h
+c.o: $(hdrdir)/ruby/internal/intern/bignum.h
+c.o: $(hdrdir)/ruby/internal/intern/class.h
+c.o: $(hdrdir)/ruby/internal/intern/compar.h
+c.o: $(hdrdir)/ruby/internal/intern/complex.h
+c.o: $(hdrdir)/ruby/internal/intern/cont.h
+c.o: $(hdrdir)/ruby/internal/intern/dir.h
+c.o: $(hdrdir)/ruby/internal/intern/enum.h
+c.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+c.o: $(hdrdir)/ruby/internal/intern/error.h
+c.o: $(hdrdir)/ruby/internal/intern/eval.h
+c.o: $(hdrdir)/ruby/internal/intern/file.h
+c.o: $(hdrdir)/ruby/internal/intern/gc.h
+c.o: $(hdrdir)/ruby/internal/intern/hash.h
+c.o: $(hdrdir)/ruby/internal/intern/io.h
+c.o: $(hdrdir)/ruby/internal/intern/load.h
+c.o: $(hdrdir)/ruby/internal/intern/marshal.h
+c.o: $(hdrdir)/ruby/internal/intern/numeric.h
+c.o: $(hdrdir)/ruby/internal/intern/object.h
+c.o: $(hdrdir)/ruby/internal/intern/parse.h
+c.o: $(hdrdir)/ruby/internal/intern/proc.h
+c.o: $(hdrdir)/ruby/internal/intern/process.h
+c.o: $(hdrdir)/ruby/internal/intern/random.h
+c.o: $(hdrdir)/ruby/internal/intern/range.h
+c.o: $(hdrdir)/ruby/internal/intern/rational.h
+c.o: $(hdrdir)/ruby/internal/intern/re.h
+c.o: $(hdrdir)/ruby/internal/intern/ruby.h
+c.o: $(hdrdir)/ruby/internal/intern/select.h
+c.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+c.o: $(hdrdir)/ruby/internal/intern/signal.h
+c.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+c.o: $(hdrdir)/ruby/internal/intern/string.h
+c.o: $(hdrdir)/ruby/internal/intern/struct.h
+c.o: $(hdrdir)/ruby/internal/intern/thread.h
+c.o: $(hdrdir)/ruby/internal/intern/time.h
+c.o: $(hdrdir)/ruby/internal/intern/variable.h
+c.o: $(hdrdir)/ruby/internal/intern/vm.h
+c.o: $(hdrdir)/ruby/internal/interpreter.h
+c.o: $(hdrdir)/ruby/internal/iterator.h
+c.o: $(hdrdir)/ruby/internal/memory.h
+c.o: $(hdrdir)/ruby/internal/method.h
+c.o: $(hdrdir)/ruby/internal/module.h
+c.o: $(hdrdir)/ruby/internal/newobj.h
+c.o: $(hdrdir)/ruby/internal/rgengc.h
+c.o: $(hdrdir)/ruby/internal/scan_args.h
+c.o: $(hdrdir)/ruby/internal/special_consts.h
+c.o: $(hdrdir)/ruby/internal/static_assert.h
+c.o: $(hdrdir)/ruby/internal/stdalign.h
+c.o: $(hdrdir)/ruby/internal/stdbool.h
+c.o: $(hdrdir)/ruby/internal/symbol.h
+c.o: $(hdrdir)/ruby/internal/value.h
+c.o: $(hdrdir)/ruby/internal/value_type.h
+c.o: $(hdrdir)/ruby/internal/variable.h
+c.o: $(hdrdir)/ruby/internal/warning_push.h
+c.o: $(hdrdir)/ruby/internal/xmalloc.h
+c.o: $(hdrdir)/ruby/missing.h
+c.o: $(hdrdir)/ruby/ruby.h
+c.o: $(hdrdir)/ruby/st.h
+c.o: $(hdrdir)/ruby/subst.h
+c.o: c.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/RUBY_ALIGNOF/extconf.rb b/ext/-test-/RUBY_ALIGNOF/extconf.rb
new file mode 100644
index 0000000000..98a370e987
--- /dev/null
+++ b/ext/-test-/RUBY_ALIGNOF/extconf.rb
@@ -0,0 +1,6 @@
+# frozen_string_literal: false
+$objs = %W"c.#$OBJEXT"
+
+$objs << "cpp.#$OBJEXT" if MakeMakefile['C++'].have_devel?
+
+create_makefile("-test-/RUBY_ALIGNOF")
diff --git a/ext/-test-/abi/abi.c b/ext/-test-/abi/abi.c
new file mode 100644
index 0000000000..923e0f67b8
--- /dev/null
+++ b/ext/-test-/abi/abi.c
@@ -0,0 +1,11 @@
+#include <limits.h>
+
+unsigned long long
+ruby_abi_version(void)
+{
+ return ULONG_MAX;
+}
+
+void
+Init_abi(void)
+{}
diff --git a/ext/-test-/abi/extconf.rb b/ext/-test-/abi/extconf.rb
new file mode 100644
index 0000000000..3b090b7553
--- /dev/null
+++ b/ext/-test-/abi/extconf.rb
@@ -0,0 +1,4 @@
+# frozen_string_literal: false
+return unless RUBY_PATCHLEVEL < 0
+require_relative "../auto_ext.rb"
+auto_ext(inc: true)
diff --git a/ext/-test-/arith_seq/beg_len_step/beg_len_step.c b/ext/-test-/arith_seq/beg_len_step/beg_len_step.c
new file mode 100644
index 0000000000..40c8cbee82
--- /dev/null
+++ b/ext/-test-/arith_seq/beg_len_step/beg_len_step.c
@@ -0,0 +1,19 @@
+#include "ruby/ruby.h"
+
+static VALUE
+arith_seq_s_beg_len_step(VALUE mod, VALUE obj, VALUE len, VALUE err)
+{
+ VALUE r;
+ long beg, len2, step;
+
+ r = rb_arithmetic_sequence_beg_len_step(obj, &beg, &len2, &step, NUM2LONG(len), NUM2INT(err));
+
+ return rb_ary_new_from_args(4, r, LONG2NUM(beg), LONG2NUM(len2), LONG2NUM(step));
+}
+
+void
+Init_beg_len_step(void)
+{
+ VALUE cArithSeq = rb_path2class("Enumerator::ArithmeticSequence");
+ rb_define_singleton_method(cArithSeq, "__beg_len_step__", arith_seq_s_beg_len_step, 3);
+}
diff --git a/ext/-test-/arith_seq/beg_len_step/depend b/ext/-test-/arith_seq/beg_len_step/depend
new file mode 100644
index 0000000000..36a2c4c71b
--- /dev/null
+++ b/ext/-test-/arith_seq/beg_len_step/depend
@@ -0,0 +1,161 @@
+# AUTOGENERATED DEPENDENCIES START
+beg_len_step.o: $(RUBY_EXTCONF_H)
+beg_len_step.o: $(arch_hdrdir)/ruby/config.h
+beg_len_step.o: $(hdrdir)/ruby/assert.h
+beg_len_step.o: $(hdrdir)/ruby/backward.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/assume.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/attributes.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/bool.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/inttypes.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/limits.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/long_long.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/stdalign.h
+beg_len_step.o: $(hdrdir)/ruby/backward/2/stdarg.h
+beg_len_step.o: $(hdrdir)/ruby/defines.h
+beg_len_step.o: $(hdrdir)/ruby/intern.h
+beg_len_step.o: $(hdrdir)/ruby/internal/abi.h
+beg_len_step.o: $(hdrdir)/ruby/internal/anyargs.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+beg_len_step.o: $(hdrdir)/ruby/internal/assume.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/artificial.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/cold.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/const.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/error.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/format.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/noalias.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/noinline.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/pure.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/restrict.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/warning.h
+beg_len_step.o: $(hdrdir)/ruby/internal/attr/weakref.h
+beg_len_step.o: $(hdrdir)/ruby/internal/cast.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+beg_len_step.o: $(hdrdir)/ruby/internal/compiler_since.h
+beg_len_step.o: $(hdrdir)/ruby/internal/config.h
+beg_len_step.o: $(hdrdir)/ruby/internal/constant_p.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rarray.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rbasic.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rbignum.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rclass.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rdata.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rfile.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rhash.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/robject.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rregexp.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rstring.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rstruct.h
+beg_len_step.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+beg_len_step.o: $(hdrdir)/ruby/internal/ctype.h
+beg_len_step.o: $(hdrdir)/ruby/internal/dllexport.h
+beg_len_step.o: $(hdrdir)/ruby/internal/dosish.h
+beg_len_step.o: $(hdrdir)/ruby/internal/error.h
+beg_len_step.o: $(hdrdir)/ruby/internal/eval.h
+beg_len_step.o: $(hdrdir)/ruby/internal/event.h
+beg_len_step.o: $(hdrdir)/ruby/internal/fl_type.h
+beg_len_step.o: $(hdrdir)/ruby/internal/gc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/glob.h
+beg_len_step.o: $(hdrdir)/ruby/internal/globals.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/attribute.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/builtin.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/extension.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/feature.h
+beg_len_step.o: $(hdrdir)/ruby/internal/has/warning.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/array.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/bignum.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/class.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/compar.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/complex.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/cont.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/dir.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/enum.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/error.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/eval.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/file.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/gc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/hash.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/io.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/load.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/marshal.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/numeric.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/object.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/parse.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/proc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/process.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/random.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/range.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/rational.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/re.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/ruby.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/select.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/signal.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/string.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/struct.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/thread.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/time.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/variable.h
+beg_len_step.o: $(hdrdir)/ruby/internal/intern/vm.h
+beg_len_step.o: $(hdrdir)/ruby/internal/interpreter.h
+beg_len_step.o: $(hdrdir)/ruby/internal/iterator.h
+beg_len_step.o: $(hdrdir)/ruby/internal/memory.h
+beg_len_step.o: $(hdrdir)/ruby/internal/method.h
+beg_len_step.o: $(hdrdir)/ruby/internal/module.h
+beg_len_step.o: $(hdrdir)/ruby/internal/newobj.h
+beg_len_step.o: $(hdrdir)/ruby/internal/rgengc.h
+beg_len_step.o: $(hdrdir)/ruby/internal/scan_args.h
+beg_len_step.o: $(hdrdir)/ruby/internal/special_consts.h
+beg_len_step.o: $(hdrdir)/ruby/internal/static_assert.h
+beg_len_step.o: $(hdrdir)/ruby/internal/stdalign.h
+beg_len_step.o: $(hdrdir)/ruby/internal/stdbool.h
+beg_len_step.o: $(hdrdir)/ruby/internal/symbol.h
+beg_len_step.o: $(hdrdir)/ruby/internal/value.h
+beg_len_step.o: $(hdrdir)/ruby/internal/value_type.h
+beg_len_step.o: $(hdrdir)/ruby/internal/variable.h
+beg_len_step.o: $(hdrdir)/ruby/internal/warning_push.h
+beg_len_step.o: $(hdrdir)/ruby/internal/xmalloc.h
+beg_len_step.o: $(hdrdir)/ruby/missing.h
+beg_len_step.o: $(hdrdir)/ruby/ruby.h
+beg_len_step.o: $(hdrdir)/ruby/st.h
+beg_len_step.o: $(hdrdir)/ruby/subst.h
+beg_len_step.o: beg_len_step.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/arith_seq/beg_len_step/extconf.rb b/ext/-test-/arith_seq/beg_len_step/extconf.rb
new file mode 100644
index 0000000000..e72b3ad01f
--- /dev/null
+++ b/ext/-test-/arith_seq/beg_len_step/extconf.rb
@@ -0,0 +1,2 @@
+# frozen_string_literal: false
+create_makefile("-test-/arith_seq/beg_len_step")
diff --git a/ext/-test-/arith_seq/extract/depend b/ext/-test-/arith_seq/extract/depend
index bb0719941f..57cbaa9a0c 100644
--- a/ext/-test-/arith_seq/extract/depend
+++ b/ext/-test-/arith_seq/extract/depend
@@ -3,8 +3,156 @@ extract.o: $(RUBY_EXTCONF_H)
extract.o: $(arch_hdrdir)/ruby/config.h
extract.o: $(hdrdir)/ruby/assert.h
extract.o: $(hdrdir)/ruby/backward.h
+extract.o: $(hdrdir)/ruby/backward/2/assume.h
+extract.o: $(hdrdir)/ruby/backward/2/attributes.h
+extract.o: $(hdrdir)/ruby/backward/2/bool.h
+extract.o: $(hdrdir)/ruby/backward/2/inttypes.h
+extract.o: $(hdrdir)/ruby/backward/2/limits.h
+extract.o: $(hdrdir)/ruby/backward/2/long_long.h
+extract.o: $(hdrdir)/ruby/backward/2/stdalign.h
+extract.o: $(hdrdir)/ruby/backward/2/stdarg.h
extract.o: $(hdrdir)/ruby/defines.h
extract.o: $(hdrdir)/ruby/intern.h
+extract.o: $(hdrdir)/ruby/internal/abi.h
+extract.o: $(hdrdir)/ruby/internal/anyargs.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+extract.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+extract.o: $(hdrdir)/ruby/internal/assume.h
+extract.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+extract.o: $(hdrdir)/ruby/internal/attr/artificial.h
+extract.o: $(hdrdir)/ruby/internal/attr/cold.h
+extract.o: $(hdrdir)/ruby/internal/attr/const.h
+extract.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+extract.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+extract.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+extract.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+extract.o: $(hdrdir)/ruby/internal/attr/error.h
+extract.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+extract.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+extract.o: $(hdrdir)/ruby/internal/attr/format.h
+extract.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+extract.o: $(hdrdir)/ruby/internal/attr/noalias.h
+extract.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+extract.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+extract.o: $(hdrdir)/ruby/internal/attr/noinline.h
+extract.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+extract.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+extract.o: $(hdrdir)/ruby/internal/attr/pure.h
+extract.o: $(hdrdir)/ruby/internal/attr/restrict.h
+extract.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+extract.o: $(hdrdir)/ruby/internal/attr/warning.h
+extract.o: $(hdrdir)/ruby/internal/attr/weakref.h
+extract.o: $(hdrdir)/ruby/internal/cast.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+extract.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+extract.o: $(hdrdir)/ruby/internal/compiler_since.h
+extract.o: $(hdrdir)/ruby/internal/config.h
+extract.o: $(hdrdir)/ruby/internal/constant_p.h
+extract.o: $(hdrdir)/ruby/internal/core.h
+extract.o: $(hdrdir)/ruby/internal/core/rarray.h
+extract.o: $(hdrdir)/ruby/internal/core/rbasic.h
+extract.o: $(hdrdir)/ruby/internal/core/rbignum.h
+extract.o: $(hdrdir)/ruby/internal/core/rclass.h
+extract.o: $(hdrdir)/ruby/internal/core/rdata.h
+extract.o: $(hdrdir)/ruby/internal/core/rfile.h
+extract.o: $(hdrdir)/ruby/internal/core/rhash.h
+extract.o: $(hdrdir)/ruby/internal/core/robject.h
+extract.o: $(hdrdir)/ruby/internal/core/rregexp.h
+extract.o: $(hdrdir)/ruby/internal/core/rstring.h
+extract.o: $(hdrdir)/ruby/internal/core/rstruct.h
+extract.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+extract.o: $(hdrdir)/ruby/internal/ctype.h
+extract.o: $(hdrdir)/ruby/internal/dllexport.h
+extract.o: $(hdrdir)/ruby/internal/dosish.h
+extract.o: $(hdrdir)/ruby/internal/error.h
+extract.o: $(hdrdir)/ruby/internal/eval.h
+extract.o: $(hdrdir)/ruby/internal/event.h
+extract.o: $(hdrdir)/ruby/internal/fl_type.h
+extract.o: $(hdrdir)/ruby/internal/gc.h
+extract.o: $(hdrdir)/ruby/internal/glob.h
+extract.o: $(hdrdir)/ruby/internal/globals.h
+extract.o: $(hdrdir)/ruby/internal/has/attribute.h
+extract.o: $(hdrdir)/ruby/internal/has/builtin.h
+extract.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+extract.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+extract.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+extract.o: $(hdrdir)/ruby/internal/has/extension.h
+extract.o: $(hdrdir)/ruby/internal/has/feature.h
+extract.o: $(hdrdir)/ruby/internal/has/warning.h
+extract.o: $(hdrdir)/ruby/internal/intern/array.h
+extract.o: $(hdrdir)/ruby/internal/intern/bignum.h
+extract.o: $(hdrdir)/ruby/internal/intern/class.h
+extract.o: $(hdrdir)/ruby/internal/intern/compar.h
+extract.o: $(hdrdir)/ruby/internal/intern/complex.h
+extract.o: $(hdrdir)/ruby/internal/intern/cont.h
+extract.o: $(hdrdir)/ruby/internal/intern/dir.h
+extract.o: $(hdrdir)/ruby/internal/intern/enum.h
+extract.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+extract.o: $(hdrdir)/ruby/internal/intern/error.h
+extract.o: $(hdrdir)/ruby/internal/intern/eval.h
+extract.o: $(hdrdir)/ruby/internal/intern/file.h
+extract.o: $(hdrdir)/ruby/internal/intern/gc.h
+extract.o: $(hdrdir)/ruby/internal/intern/hash.h
+extract.o: $(hdrdir)/ruby/internal/intern/io.h
+extract.o: $(hdrdir)/ruby/internal/intern/load.h
+extract.o: $(hdrdir)/ruby/internal/intern/marshal.h
+extract.o: $(hdrdir)/ruby/internal/intern/numeric.h
+extract.o: $(hdrdir)/ruby/internal/intern/object.h
+extract.o: $(hdrdir)/ruby/internal/intern/parse.h
+extract.o: $(hdrdir)/ruby/internal/intern/proc.h
+extract.o: $(hdrdir)/ruby/internal/intern/process.h
+extract.o: $(hdrdir)/ruby/internal/intern/random.h
+extract.o: $(hdrdir)/ruby/internal/intern/range.h
+extract.o: $(hdrdir)/ruby/internal/intern/rational.h
+extract.o: $(hdrdir)/ruby/internal/intern/re.h
+extract.o: $(hdrdir)/ruby/internal/intern/ruby.h
+extract.o: $(hdrdir)/ruby/internal/intern/select.h
+extract.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+extract.o: $(hdrdir)/ruby/internal/intern/signal.h
+extract.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+extract.o: $(hdrdir)/ruby/internal/intern/string.h
+extract.o: $(hdrdir)/ruby/internal/intern/struct.h
+extract.o: $(hdrdir)/ruby/internal/intern/thread.h
+extract.o: $(hdrdir)/ruby/internal/intern/time.h
+extract.o: $(hdrdir)/ruby/internal/intern/variable.h
+extract.o: $(hdrdir)/ruby/internal/intern/vm.h
+extract.o: $(hdrdir)/ruby/internal/interpreter.h
+extract.o: $(hdrdir)/ruby/internal/iterator.h
+extract.o: $(hdrdir)/ruby/internal/memory.h
+extract.o: $(hdrdir)/ruby/internal/method.h
+extract.o: $(hdrdir)/ruby/internal/module.h
+extract.o: $(hdrdir)/ruby/internal/newobj.h
+extract.o: $(hdrdir)/ruby/internal/rgengc.h
+extract.o: $(hdrdir)/ruby/internal/scan_args.h
+extract.o: $(hdrdir)/ruby/internal/special_consts.h
+extract.o: $(hdrdir)/ruby/internal/static_assert.h
+extract.o: $(hdrdir)/ruby/internal/stdalign.h
+extract.o: $(hdrdir)/ruby/internal/stdbool.h
+extract.o: $(hdrdir)/ruby/internal/symbol.h
+extract.o: $(hdrdir)/ruby/internal/value.h
+extract.o: $(hdrdir)/ruby/internal/value_type.h
+extract.o: $(hdrdir)/ruby/internal/variable.h
+extract.o: $(hdrdir)/ruby/internal/warning_push.h
+extract.o: $(hdrdir)/ruby/internal/xmalloc.h
extract.o: $(hdrdir)/ruby/missing.h
extract.o: $(hdrdir)/ruby/ruby.h
extract.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/array/concat/depend b/ext/-test-/array/concat/depend
new file mode 100644
index 0000000000..79c833738e
--- /dev/null
+++ b/ext/-test-/array/concat/depend
@@ -0,0 +1,162 @@
+# AUTOGENERATED DEPENDENCIES START
+to_ary_concat.o: $(RUBY_EXTCONF_H)
+to_ary_concat.o: $(arch_hdrdir)/ruby/config.h
+to_ary_concat.o: $(hdrdir)/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/assert.h
+to_ary_concat.o: $(hdrdir)/ruby/backward.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/assume.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/attributes.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/bool.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/limits.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/long_long.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+to_ary_concat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+to_ary_concat.o: $(hdrdir)/ruby/defines.h
+to_ary_concat.o: $(hdrdir)/ruby/intern.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/abi.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/anyargs.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/assume.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/cold.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/const.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/format.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/pure.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/warning.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/cast.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/compiler_since.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/config.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/constant_p.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rarray.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rclass.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rdata.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rfile.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rhash.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/robject.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rstring.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/ctype.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/dllexport.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/dosish.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/eval.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/event.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/fl_type.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/gc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/glob.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/globals.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/builtin.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/extension.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/feature.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/has/warning.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/array.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/class.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/compar.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/complex.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/cont.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/dir.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/enum.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/error.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/eval.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/file.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/gc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/hash.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/io.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/load.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/object.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/parse.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/proc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/process.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/random.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/range.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/rational.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/re.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/select.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/signal.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/string.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/struct.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/thread.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/time.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/variable.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/intern/vm.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/interpreter.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/iterator.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/memory.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/method.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/module.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/newobj.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/rgengc.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/scan_args.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/special_consts.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/static_assert.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/stdalign.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/stdbool.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/symbol.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/value.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/value_type.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/variable.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/warning_push.h
+to_ary_concat.o: $(hdrdir)/ruby/internal/xmalloc.h
+to_ary_concat.o: $(hdrdir)/ruby/missing.h
+to_ary_concat.o: $(hdrdir)/ruby/ruby.h
+to_ary_concat.o: $(hdrdir)/ruby/st.h
+to_ary_concat.o: $(hdrdir)/ruby/subst.h
+to_ary_concat.o: to_ary_concat.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/array/concat/extconf.rb b/ext/-test-/array/concat/extconf.rb
new file mode 100644
index 0000000000..cdd79126c9
--- /dev/null
+++ b/ext/-test-/array/concat/extconf.rb
@@ -0,0 +1,2 @@
+# frozen_string_literal: false
+create_makefile("-test-/array/to_ary_concat")
diff --git a/ext/-test-/array/concat/to_ary_concat.c b/ext/-test-/array/concat/to_ary_concat.c
new file mode 100644
index 0000000000..07a96d3907
--- /dev/null
+++ b/ext/-test-/array/concat/to_ary_concat.c
@@ -0,0 +1,38 @@
+#include "ruby.h"
+
+// Bar
+
+typedef struct {
+ int dummy;
+} Bar;
+
+static rb_data_type_t Bar_type = {
+ "Bar",
+ {NULL, RUBY_TYPED_DEFAULT_FREE, NULL },
+};
+
+static VALUE
+Bar_alloc(VALUE klass)
+{
+ return TypedData_Wrap_Struct(klass, &Bar_type, NULL);
+}
+
+static VALUE
+Bar_to_ary(VALUE _self)
+{
+ VALUE ary = rb_ary_new2(2);
+ VALUE foo = rb_ary_new2(0);
+ rb_ary_push(ary, foo);
+ rb_ary_push(ary, foo);
+ rb_ary_push(ary, foo);
+ return ary;
+}
+
+void
+Init_to_ary_concat(void)
+{
+ VALUE mBug = rb_define_module("Bug");
+ VALUE bar = rb_define_class_under(mBug, "Bar", rb_cObject);
+ rb_define_alloc_func(bar, Bar_alloc);
+ rb_define_method(bar, "to_ary", Bar_to_ary, 0);
+}
diff --git a/ext/-test-/array/resize/depend b/ext/-test-/array/resize/depend
index a03cc47d51..49e0f346d3 100644
--- a/ext/-test-/array/resize/depend
+++ b/ext/-test-/array/resize/depend
@@ -3,8 +3,156 @@ resize.o: $(RUBY_EXTCONF_H)
resize.o: $(arch_hdrdir)/ruby/config.h
resize.o: $(hdrdir)/ruby/assert.h
resize.o: $(hdrdir)/ruby/backward.h
+resize.o: $(hdrdir)/ruby/backward/2/assume.h
+resize.o: $(hdrdir)/ruby/backward/2/attributes.h
+resize.o: $(hdrdir)/ruby/backward/2/bool.h
+resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
+resize.o: $(hdrdir)/ruby/backward/2/limits.h
+resize.o: $(hdrdir)/ruby/backward/2/long_long.h
+resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
+resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
resize.o: $(hdrdir)/ruby/defines.h
resize.o: $(hdrdir)/ruby/intern.h
+resize.o: $(hdrdir)/ruby/internal/abi.h
+resize.o: $(hdrdir)/ruby/internal/anyargs.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+resize.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+resize.o: $(hdrdir)/ruby/internal/assume.h
+resize.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+resize.o: $(hdrdir)/ruby/internal/attr/artificial.h
+resize.o: $(hdrdir)/ruby/internal/attr/cold.h
+resize.o: $(hdrdir)/ruby/internal/attr/const.h
+resize.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+resize.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+resize.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+resize.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+resize.o: $(hdrdir)/ruby/internal/attr/error.h
+resize.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+resize.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+resize.o: $(hdrdir)/ruby/internal/attr/format.h
+resize.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+resize.o: $(hdrdir)/ruby/internal/attr/noalias.h
+resize.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+resize.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+resize.o: $(hdrdir)/ruby/internal/attr/noinline.h
+resize.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+resize.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+resize.o: $(hdrdir)/ruby/internal/attr/pure.h
+resize.o: $(hdrdir)/ruby/internal/attr/restrict.h
+resize.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+resize.o: $(hdrdir)/ruby/internal/attr/warning.h
+resize.o: $(hdrdir)/ruby/internal/attr/weakref.h
+resize.o: $(hdrdir)/ruby/internal/cast.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+resize.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+resize.o: $(hdrdir)/ruby/internal/compiler_since.h
+resize.o: $(hdrdir)/ruby/internal/config.h
+resize.o: $(hdrdir)/ruby/internal/constant_p.h
+resize.o: $(hdrdir)/ruby/internal/core.h
+resize.o: $(hdrdir)/ruby/internal/core/rarray.h
+resize.o: $(hdrdir)/ruby/internal/core/rbasic.h
+resize.o: $(hdrdir)/ruby/internal/core/rbignum.h
+resize.o: $(hdrdir)/ruby/internal/core/rclass.h
+resize.o: $(hdrdir)/ruby/internal/core/rdata.h
+resize.o: $(hdrdir)/ruby/internal/core/rfile.h
+resize.o: $(hdrdir)/ruby/internal/core/rhash.h
+resize.o: $(hdrdir)/ruby/internal/core/robject.h
+resize.o: $(hdrdir)/ruby/internal/core/rregexp.h
+resize.o: $(hdrdir)/ruby/internal/core/rstring.h
+resize.o: $(hdrdir)/ruby/internal/core/rstruct.h
+resize.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+resize.o: $(hdrdir)/ruby/internal/ctype.h
+resize.o: $(hdrdir)/ruby/internal/dllexport.h
+resize.o: $(hdrdir)/ruby/internal/dosish.h
+resize.o: $(hdrdir)/ruby/internal/error.h
+resize.o: $(hdrdir)/ruby/internal/eval.h
+resize.o: $(hdrdir)/ruby/internal/event.h
+resize.o: $(hdrdir)/ruby/internal/fl_type.h
+resize.o: $(hdrdir)/ruby/internal/gc.h
+resize.o: $(hdrdir)/ruby/internal/glob.h
+resize.o: $(hdrdir)/ruby/internal/globals.h
+resize.o: $(hdrdir)/ruby/internal/has/attribute.h
+resize.o: $(hdrdir)/ruby/internal/has/builtin.h
+resize.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+resize.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+resize.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+resize.o: $(hdrdir)/ruby/internal/has/extension.h
+resize.o: $(hdrdir)/ruby/internal/has/feature.h
+resize.o: $(hdrdir)/ruby/internal/has/warning.h
+resize.o: $(hdrdir)/ruby/internal/intern/array.h
+resize.o: $(hdrdir)/ruby/internal/intern/bignum.h
+resize.o: $(hdrdir)/ruby/internal/intern/class.h
+resize.o: $(hdrdir)/ruby/internal/intern/compar.h
+resize.o: $(hdrdir)/ruby/internal/intern/complex.h
+resize.o: $(hdrdir)/ruby/internal/intern/cont.h
+resize.o: $(hdrdir)/ruby/internal/intern/dir.h
+resize.o: $(hdrdir)/ruby/internal/intern/enum.h
+resize.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+resize.o: $(hdrdir)/ruby/internal/intern/error.h
+resize.o: $(hdrdir)/ruby/internal/intern/eval.h
+resize.o: $(hdrdir)/ruby/internal/intern/file.h
+resize.o: $(hdrdir)/ruby/internal/intern/gc.h
+resize.o: $(hdrdir)/ruby/internal/intern/hash.h
+resize.o: $(hdrdir)/ruby/internal/intern/io.h
+resize.o: $(hdrdir)/ruby/internal/intern/load.h
+resize.o: $(hdrdir)/ruby/internal/intern/marshal.h
+resize.o: $(hdrdir)/ruby/internal/intern/numeric.h
+resize.o: $(hdrdir)/ruby/internal/intern/object.h
+resize.o: $(hdrdir)/ruby/internal/intern/parse.h
+resize.o: $(hdrdir)/ruby/internal/intern/proc.h
+resize.o: $(hdrdir)/ruby/internal/intern/process.h
+resize.o: $(hdrdir)/ruby/internal/intern/random.h
+resize.o: $(hdrdir)/ruby/internal/intern/range.h
+resize.o: $(hdrdir)/ruby/internal/intern/rational.h
+resize.o: $(hdrdir)/ruby/internal/intern/re.h
+resize.o: $(hdrdir)/ruby/internal/intern/ruby.h
+resize.o: $(hdrdir)/ruby/internal/intern/select.h
+resize.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+resize.o: $(hdrdir)/ruby/internal/intern/signal.h
+resize.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+resize.o: $(hdrdir)/ruby/internal/intern/string.h
+resize.o: $(hdrdir)/ruby/internal/intern/struct.h
+resize.o: $(hdrdir)/ruby/internal/intern/thread.h
+resize.o: $(hdrdir)/ruby/internal/intern/time.h
+resize.o: $(hdrdir)/ruby/internal/intern/variable.h
+resize.o: $(hdrdir)/ruby/internal/intern/vm.h
+resize.o: $(hdrdir)/ruby/internal/interpreter.h
+resize.o: $(hdrdir)/ruby/internal/iterator.h
+resize.o: $(hdrdir)/ruby/internal/memory.h
+resize.o: $(hdrdir)/ruby/internal/method.h
+resize.o: $(hdrdir)/ruby/internal/module.h
+resize.o: $(hdrdir)/ruby/internal/newobj.h
+resize.o: $(hdrdir)/ruby/internal/rgengc.h
+resize.o: $(hdrdir)/ruby/internal/scan_args.h
+resize.o: $(hdrdir)/ruby/internal/special_consts.h
+resize.o: $(hdrdir)/ruby/internal/static_assert.h
+resize.o: $(hdrdir)/ruby/internal/stdalign.h
+resize.o: $(hdrdir)/ruby/internal/stdbool.h
+resize.o: $(hdrdir)/ruby/internal/symbol.h
+resize.o: $(hdrdir)/ruby/internal/value.h
+resize.o: $(hdrdir)/ruby/internal/value_type.h
+resize.o: $(hdrdir)/ruby/internal/variable.h
+resize.o: $(hdrdir)/ruby/internal/warning_push.h
+resize.o: $(hdrdir)/ruby/internal/xmalloc.h
resize.o: $(hdrdir)/ruby/missing.h
resize.o: $(hdrdir)/ruby/ruby.h
resize.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/array/resize/resize.c b/ext/-test-/array/resize/resize.c
index 08bcee3e7a..cfe910ebed 100644
--- a/ext/-test-/array/resize/resize.c
+++ b/ext/-test-/array/resize/resize.c
@@ -1,7 +1,7 @@
#include "ruby/ruby.h"
static VALUE
-ary_resize(VALUE ary, VALUE len)
+ary_resize(VALUE klass, VALUE ary, VALUE len)
{
rb_ary_resize(ary, NUM2LONG(len));
return ary;
@@ -10,5 +10,7 @@ ary_resize(VALUE ary, VALUE len)
void
Init_resize(void)
{
- rb_define_method(rb_cArray, "__resize__", ary_resize, 1);
+ VALUE mBug = rb_define_module("Bug");
+ VALUE klass = rb_define_class_under(mBug, "Array", rb_cObject);
+ rb_define_singleton_method(klass, "__resize__", ary_resize, 2);
}
diff --git a/ext/-test-/auto_ext.rb b/ext/-test-/auto_ext.rb
index 71606a9dd1..58c49c177b 100644
--- a/ext/-test-/auto_ext.rb
+++ b/ext/-test-/auto_ext.rb
@@ -6,5 +6,6 @@ def auto_ext(feat = $0[%r[/ext/(-test-/.*)/extconf.rb\z], 1], inc: false)
inits.delete("init")
inits.map! {|s|"X(#{s})"}
$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
+ create_header
create_makefile(feat)
end
diff --git a/ext/-test-/bignum/big2str.c b/ext/-test-/bignum/big2str.c
index ec4bde2915..255e8ad729 100644
--- a/ext/-test-/bignum/big2str.c
+++ b/ext/-test-/bignum/big2str.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
big(VALUE x)
@@ -12,7 +12,7 @@ big(VALUE x)
}
static VALUE
-big2str_generic(VALUE x, VALUE vbase)
+big2str_generic(VALUE klass, VALUE x, VALUE vbase)
{
int base = NUM2INT(vbase);
if (base < 2 || 36 < base)
@@ -23,7 +23,7 @@ big2str_generic(VALUE x, VALUE vbase)
#define POW2_P(x) (((x)&((x)-1))==0)
static VALUE
-big2str_poweroftwo(VALUE x, VALUE vbase)
+big2str_poweroftwo(VALUE klass, VALUE x, VALUE vbase)
{
int base = NUM2INT(vbase);
if (base < 2 || 36 < base || !POW2_P(base))
@@ -33,7 +33,7 @@ big2str_poweroftwo(VALUE x, VALUE vbase)
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
-big2str_gmp(VALUE x, VALUE vbase)
+big2str_gmp(VALUE klass, VALUE x, VALUE vbase)
{
int base = NUM2INT(vbase);
if (base < 2 || 36 < base)
@@ -47,7 +47,7 @@ big2str_gmp(VALUE x, VALUE vbase)
void
Init_big2str(VALUE klass)
{
- rb_define_method(rb_cInteger, "big2str_generic", big2str_generic, 1);
- rb_define_method(rb_cInteger, "big2str_poweroftwo", big2str_poweroftwo, 1);
- rb_define_method(rb_cInteger, "big2str_gmp", big2str_gmp, 1);
+ rb_define_singleton_method(klass, "big2str_generic", big2str_generic, 2);
+ rb_define_singleton_method(klass, "big2str_poweroftwo", big2str_poweroftwo, 2);
+ rb_define_singleton_method(klass, "big2str_gmp", big2str_gmp, 2);
}
diff --git a/ext/-test-/bignum/bigzero.c b/ext/-test-/bignum/bigzero.c
index 35117db7ae..e2bfebcd3e 100644
--- a/ext/-test-/bignum/bigzero.c
+++ b/ext/-test-/bignum/bigzero.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
bug_big_zero(VALUE self, VALUE length)
diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend
index 38c9f6114e..d4072fb35c 100644
--- a/ext/-test-/bignum/depend
+++ b/ext/-test-/bignum/depend
@@ -1,50 +1,639 @@
# AUTOGENERATED DEPENDENCIES START
big2str.o: $(RUBY_EXTCONF_H)
big2str.o: $(arch_hdrdir)/ruby/config.h
-big2str.o: $(hdrdir)/ruby.h
big2str.o: $(hdrdir)/ruby/assert.h
big2str.o: $(hdrdir)/ruby/backward.h
+big2str.o: $(hdrdir)/ruby/backward/2/assume.h
+big2str.o: $(hdrdir)/ruby/backward/2/attributes.h
+big2str.o: $(hdrdir)/ruby/backward/2/bool.h
+big2str.o: $(hdrdir)/ruby/backward/2/inttypes.h
+big2str.o: $(hdrdir)/ruby/backward/2/limits.h
+big2str.o: $(hdrdir)/ruby/backward/2/long_long.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdalign.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdarg.h
big2str.o: $(hdrdir)/ruby/defines.h
big2str.o: $(hdrdir)/ruby/intern.h
+big2str.o: $(hdrdir)/ruby/internal/abi.h
+big2str.o: $(hdrdir)/ruby/internal/anyargs.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+big2str.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+big2str.o: $(hdrdir)/ruby/internal/assume.h
+big2str.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+big2str.o: $(hdrdir)/ruby/internal/attr/artificial.h
+big2str.o: $(hdrdir)/ruby/internal/attr/cold.h
+big2str.o: $(hdrdir)/ruby/internal/attr/const.h
+big2str.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+big2str.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+big2str.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+big2str.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+big2str.o: $(hdrdir)/ruby/internal/attr/error.h
+big2str.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+big2str.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+big2str.o: $(hdrdir)/ruby/internal/attr/format.h
+big2str.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+big2str.o: $(hdrdir)/ruby/internal/attr/noalias.h
+big2str.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+big2str.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+big2str.o: $(hdrdir)/ruby/internal/attr/noinline.h
+big2str.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+big2str.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+big2str.o: $(hdrdir)/ruby/internal/attr/pure.h
+big2str.o: $(hdrdir)/ruby/internal/attr/restrict.h
+big2str.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+big2str.o: $(hdrdir)/ruby/internal/attr/warning.h
+big2str.o: $(hdrdir)/ruby/internal/attr/weakref.h
+big2str.o: $(hdrdir)/ruby/internal/cast.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+big2str.o: $(hdrdir)/ruby/internal/compiler_since.h
+big2str.o: $(hdrdir)/ruby/internal/config.h
+big2str.o: $(hdrdir)/ruby/internal/constant_p.h
+big2str.o: $(hdrdir)/ruby/internal/core.h
+big2str.o: $(hdrdir)/ruby/internal/core/rarray.h
+big2str.o: $(hdrdir)/ruby/internal/core/rbasic.h
+big2str.o: $(hdrdir)/ruby/internal/core/rbignum.h
+big2str.o: $(hdrdir)/ruby/internal/core/rclass.h
+big2str.o: $(hdrdir)/ruby/internal/core/rdata.h
+big2str.o: $(hdrdir)/ruby/internal/core/rfile.h
+big2str.o: $(hdrdir)/ruby/internal/core/rhash.h
+big2str.o: $(hdrdir)/ruby/internal/core/robject.h
+big2str.o: $(hdrdir)/ruby/internal/core/rregexp.h
+big2str.o: $(hdrdir)/ruby/internal/core/rstring.h
+big2str.o: $(hdrdir)/ruby/internal/core/rstruct.h
+big2str.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+big2str.o: $(hdrdir)/ruby/internal/ctype.h
+big2str.o: $(hdrdir)/ruby/internal/dllexport.h
+big2str.o: $(hdrdir)/ruby/internal/dosish.h
+big2str.o: $(hdrdir)/ruby/internal/error.h
+big2str.o: $(hdrdir)/ruby/internal/eval.h
+big2str.o: $(hdrdir)/ruby/internal/event.h
+big2str.o: $(hdrdir)/ruby/internal/fl_type.h
+big2str.o: $(hdrdir)/ruby/internal/gc.h
+big2str.o: $(hdrdir)/ruby/internal/glob.h
+big2str.o: $(hdrdir)/ruby/internal/globals.h
+big2str.o: $(hdrdir)/ruby/internal/has/attribute.h
+big2str.o: $(hdrdir)/ruby/internal/has/builtin.h
+big2str.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+big2str.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+big2str.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+big2str.o: $(hdrdir)/ruby/internal/has/extension.h
+big2str.o: $(hdrdir)/ruby/internal/has/feature.h
+big2str.o: $(hdrdir)/ruby/internal/has/warning.h
+big2str.o: $(hdrdir)/ruby/internal/intern/array.h
+big2str.o: $(hdrdir)/ruby/internal/intern/bignum.h
+big2str.o: $(hdrdir)/ruby/internal/intern/class.h
+big2str.o: $(hdrdir)/ruby/internal/intern/compar.h
+big2str.o: $(hdrdir)/ruby/internal/intern/complex.h
+big2str.o: $(hdrdir)/ruby/internal/intern/cont.h
+big2str.o: $(hdrdir)/ruby/internal/intern/dir.h
+big2str.o: $(hdrdir)/ruby/internal/intern/enum.h
+big2str.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+big2str.o: $(hdrdir)/ruby/internal/intern/error.h
+big2str.o: $(hdrdir)/ruby/internal/intern/eval.h
+big2str.o: $(hdrdir)/ruby/internal/intern/file.h
+big2str.o: $(hdrdir)/ruby/internal/intern/gc.h
+big2str.o: $(hdrdir)/ruby/internal/intern/hash.h
+big2str.o: $(hdrdir)/ruby/internal/intern/io.h
+big2str.o: $(hdrdir)/ruby/internal/intern/load.h
+big2str.o: $(hdrdir)/ruby/internal/intern/marshal.h
+big2str.o: $(hdrdir)/ruby/internal/intern/numeric.h
+big2str.o: $(hdrdir)/ruby/internal/intern/object.h
+big2str.o: $(hdrdir)/ruby/internal/intern/parse.h
+big2str.o: $(hdrdir)/ruby/internal/intern/proc.h
+big2str.o: $(hdrdir)/ruby/internal/intern/process.h
+big2str.o: $(hdrdir)/ruby/internal/intern/random.h
+big2str.o: $(hdrdir)/ruby/internal/intern/range.h
+big2str.o: $(hdrdir)/ruby/internal/intern/rational.h
+big2str.o: $(hdrdir)/ruby/internal/intern/re.h
+big2str.o: $(hdrdir)/ruby/internal/intern/ruby.h
+big2str.o: $(hdrdir)/ruby/internal/intern/select.h
+big2str.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+big2str.o: $(hdrdir)/ruby/internal/intern/signal.h
+big2str.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+big2str.o: $(hdrdir)/ruby/internal/intern/string.h
+big2str.o: $(hdrdir)/ruby/internal/intern/struct.h
+big2str.o: $(hdrdir)/ruby/internal/intern/thread.h
+big2str.o: $(hdrdir)/ruby/internal/intern/time.h
+big2str.o: $(hdrdir)/ruby/internal/intern/variable.h
+big2str.o: $(hdrdir)/ruby/internal/intern/vm.h
+big2str.o: $(hdrdir)/ruby/internal/interpreter.h
+big2str.o: $(hdrdir)/ruby/internal/iterator.h
+big2str.o: $(hdrdir)/ruby/internal/memory.h
+big2str.o: $(hdrdir)/ruby/internal/method.h
+big2str.o: $(hdrdir)/ruby/internal/module.h
+big2str.o: $(hdrdir)/ruby/internal/newobj.h
+big2str.o: $(hdrdir)/ruby/internal/rgengc.h
+big2str.o: $(hdrdir)/ruby/internal/scan_args.h
+big2str.o: $(hdrdir)/ruby/internal/special_consts.h
+big2str.o: $(hdrdir)/ruby/internal/static_assert.h
+big2str.o: $(hdrdir)/ruby/internal/stdalign.h
+big2str.o: $(hdrdir)/ruby/internal/stdbool.h
+big2str.o: $(hdrdir)/ruby/internal/symbol.h
+big2str.o: $(hdrdir)/ruby/internal/value.h
+big2str.o: $(hdrdir)/ruby/internal/value_type.h
+big2str.o: $(hdrdir)/ruby/internal/variable.h
+big2str.o: $(hdrdir)/ruby/internal/warning_push.h
+big2str.o: $(hdrdir)/ruby/internal/xmalloc.h
big2str.o: $(hdrdir)/ruby/missing.h
big2str.o: $(hdrdir)/ruby/ruby.h
big2str.o: $(hdrdir)/ruby/st.h
big2str.o: $(hdrdir)/ruby/subst.h
-big2str.o: $(top_srcdir)/internal.h
+big2str.o: $(top_srcdir)/internal/bignum.h
big2str.o: big2str.c
bigzero.o: $(RUBY_EXTCONF_H)
bigzero.o: $(arch_hdrdir)/ruby/config.h
-bigzero.o: $(hdrdir)/ruby.h
bigzero.o: $(hdrdir)/ruby/assert.h
bigzero.o: $(hdrdir)/ruby/backward.h
+bigzero.o: $(hdrdir)/ruby/backward/2/assume.h
+bigzero.o: $(hdrdir)/ruby/backward/2/attributes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/bool.h
+bigzero.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/limits.h
+bigzero.o: $(hdrdir)/ruby/backward/2/long_long.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdarg.h
bigzero.o: $(hdrdir)/ruby/defines.h
bigzero.o: $(hdrdir)/ruby/intern.h
+bigzero.o: $(hdrdir)/ruby/internal/abi.h
+bigzero.o: $(hdrdir)/ruby/internal/anyargs.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bigzero.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bigzero.o: $(hdrdir)/ruby/internal/assume.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/cold.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/const.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/error.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/format.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/pure.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/warning.h
+bigzero.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bigzero.o: $(hdrdir)/ruby/internal/cast.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bigzero.o: $(hdrdir)/ruby/internal/compiler_since.h
+bigzero.o: $(hdrdir)/ruby/internal/config.h
+bigzero.o: $(hdrdir)/ruby/internal/constant_p.h
+bigzero.o: $(hdrdir)/ruby/internal/core.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rarray.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rclass.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rdata.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rfile.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rhash.h
+bigzero.o: $(hdrdir)/ruby/internal/core/robject.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rstring.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bigzero.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bigzero.o: $(hdrdir)/ruby/internal/ctype.h
+bigzero.o: $(hdrdir)/ruby/internal/dllexport.h
+bigzero.o: $(hdrdir)/ruby/internal/dosish.h
+bigzero.o: $(hdrdir)/ruby/internal/error.h
+bigzero.o: $(hdrdir)/ruby/internal/eval.h
+bigzero.o: $(hdrdir)/ruby/internal/event.h
+bigzero.o: $(hdrdir)/ruby/internal/fl_type.h
+bigzero.o: $(hdrdir)/ruby/internal/gc.h
+bigzero.o: $(hdrdir)/ruby/internal/glob.h
+bigzero.o: $(hdrdir)/ruby/internal/globals.h
+bigzero.o: $(hdrdir)/ruby/internal/has/attribute.h
+bigzero.o: $(hdrdir)/ruby/internal/has/builtin.h
+bigzero.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bigzero.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bigzero.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bigzero.o: $(hdrdir)/ruby/internal/has/extension.h
+bigzero.o: $(hdrdir)/ruby/internal/has/feature.h
+bigzero.o: $(hdrdir)/ruby/internal/has/warning.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/array.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/class.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/compar.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/complex.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/cont.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/dir.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/enum.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/error.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/eval.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/file.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/gc.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/hash.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/io.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/load.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/object.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/parse.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/proc.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/process.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/random.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/range.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/rational.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/re.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/select.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/signal.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/string.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/struct.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/thread.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/time.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/variable.h
+bigzero.o: $(hdrdir)/ruby/internal/intern/vm.h
+bigzero.o: $(hdrdir)/ruby/internal/interpreter.h
+bigzero.o: $(hdrdir)/ruby/internal/iterator.h
+bigzero.o: $(hdrdir)/ruby/internal/memory.h
+bigzero.o: $(hdrdir)/ruby/internal/method.h
+bigzero.o: $(hdrdir)/ruby/internal/module.h
+bigzero.o: $(hdrdir)/ruby/internal/newobj.h
+bigzero.o: $(hdrdir)/ruby/internal/rgengc.h
+bigzero.o: $(hdrdir)/ruby/internal/scan_args.h
+bigzero.o: $(hdrdir)/ruby/internal/special_consts.h
+bigzero.o: $(hdrdir)/ruby/internal/static_assert.h
+bigzero.o: $(hdrdir)/ruby/internal/stdalign.h
+bigzero.o: $(hdrdir)/ruby/internal/stdbool.h
+bigzero.o: $(hdrdir)/ruby/internal/symbol.h
+bigzero.o: $(hdrdir)/ruby/internal/value.h
+bigzero.o: $(hdrdir)/ruby/internal/value_type.h
+bigzero.o: $(hdrdir)/ruby/internal/variable.h
+bigzero.o: $(hdrdir)/ruby/internal/warning_push.h
+bigzero.o: $(hdrdir)/ruby/internal/xmalloc.h
bigzero.o: $(hdrdir)/ruby/missing.h
bigzero.o: $(hdrdir)/ruby/ruby.h
bigzero.o: $(hdrdir)/ruby/st.h
bigzero.o: $(hdrdir)/ruby/subst.h
-bigzero.o: $(top_srcdir)/internal.h
+bigzero.o: $(top_srcdir)/internal/bignum.h
bigzero.o: bigzero.c
div.o: $(RUBY_EXTCONF_H)
div.o: $(arch_hdrdir)/ruby/config.h
-div.o: $(hdrdir)/ruby.h
div.o: $(hdrdir)/ruby/assert.h
div.o: $(hdrdir)/ruby/backward.h
+div.o: $(hdrdir)/ruby/backward/2/assume.h
+div.o: $(hdrdir)/ruby/backward/2/attributes.h
+div.o: $(hdrdir)/ruby/backward/2/bool.h
+div.o: $(hdrdir)/ruby/backward/2/inttypes.h
+div.o: $(hdrdir)/ruby/backward/2/limits.h
+div.o: $(hdrdir)/ruby/backward/2/long_long.h
+div.o: $(hdrdir)/ruby/backward/2/stdalign.h
+div.o: $(hdrdir)/ruby/backward/2/stdarg.h
div.o: $(hdrdir)/ruby/defines.h
div.o: $(hdrdir)/ruby/intern.h
+div.o: $(hdrdir)/ruby/internal/abi.h
+div.o: $(hdrdir)/ruby/internal/anyargs.h
+div.o: $(hdrdir)/ruby/internal/arithmetic.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+div.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+div.o: $(hdrdir)/ruby/internal/assume.h
+div.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+div.o: $(hdrdir)/ruby/internal/attr/artificial.h
+div.o: $(hdrdir)/ruby/internal/attr/cold.h
+div.o: $(hdrdir)/ruby/internal/attr/const.h
+div.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+div.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+div.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+div.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+div.o: $(hdrdir)/ruby/internal/attr/error.h
+div.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+div.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+div.o: $(hdrdir)/ruby/internal/attr/format.h
+div.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+div.o: $(hdrdir)/ruby/internal/attr/noalias.h
+div.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+div.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+div.o: $(hdrdir)/ruby/internal/attr/noinline.h
+div.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+div.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+div.o: $(hdrdir)/ruby/internal/attr/pure.h
+div.o: $(hdrdir)/ruby/internal/attr/restrict.h
+div.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+div.o: $(hdrdir)/ruby/internal/attr/warning.h
+div.o: $(hdrdir)/ruby/internal/attr/weakref.h
+div.o: $(hdrdir)/ruby/internal/cast.h
+div.o: $(hdrdir)/ruby/internal/compiler_is.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+div.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+div.o: $(hdrdir)/ruby/internal/compiler_since.h
+div.o: $(hdrdir)/ruby/internal/config.h
+div.o: $(hdrdir)/ruby/internal/constant_p.h
+div.o: $(hdrdir)/ruby/internal/core.h
+div.o: $(hdrdir)/ruby/internal/core/rarray.h
+div.o: $(hdrdir)/ruby/internal/core/rbasic.h
+div.o: $(hdrdir)/ruby/internal/core/rbignum.h
+div.o: $(hdrdir)/ruby/internal/core/rclass.h
+div.o: $(hdrdir)/ruby/internal/core/rdata.h
+div.o: $(hdrdir)/ruby/internal/core/rfile.h
+div.o: $(hdrdir)/ruby/internal/core/rhash.h
+div.o: $(hdrdir)/ruby/internal/core/robject.h
+div.o: $(hdrdir)/ruby/internal/core/rregexp.h
+div.o: $(hdrdir)/ruby/internal/core/rstring.h
+div.o: $(hdrdir)/ruby/internal/core/rstruct.h
+div.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+div.o: $(hdrdir)/ruby/internal/ctype.h
+div.o: $(hdrdir)/ruby/internal/dllexport.h
+div.o: $(hdrdir)/ruby/internal/dosish.h
+div.o: $(hdrdir)/ruby/internal/error.h
+div.o: $(hdrdir)/ruby/internal/eval.h
+div.o: $(hdrdir)/ruby/internal/event.h
+div.o: $(hdrdir)/ruby/internal/fl_type.h
+div.o: $(hdrdir)/ruby/internal/gc.h
+div.o: $(hdrdir)/ruby/internal/glob.h
+div.o: $(hdrdir)/ruby/internal/globals.h
+div.o: $(hdrdir)/ruby/internal/has/attribute.h
+div.o: $(hdrdir)/ruby/internal/has/builtin.h
+div.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+div.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+div.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+div.o: $(hdrdir)/ruby/internal/has/extension.h
+div.o: $(hdrdir)/ruby/internal/has/feature.h
+div.o: $(hdrdir)/ruby/internal/has/warning.h
+div.o: $(hdrdir)/ruby/internal/intern/array.h
+div.o: $(hdrdir)/ruby/internal/intern/bignum.h
+div.o: $(hdrdir)/ruby/internal/intern/class.h
+div.o: $(hdrdir)/ruby/internal/intern/compar.h
+div.o: $(hdrdir)/ruby/internal/intern/complex.h
+div.o: $(hdrdir)/ruby/internal/intern/cont.h
+div.o: $(hdrdir)/ruby/internal/intern/dir.h
+div.o: $(hdrdir)/ruby/internal/intern/enum.h
+div.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+div.o: $(hdrdir)/ruby/internal/intern/error.h
+div.o: $(hdrdir)/ruby/internal/intern/eval.h
+div.o: $(hdrdir)/ruby/internal/intern/file.h
+div.o: $(hdrdir)/ruby/internal/intern/gc.h
+div.o: $(hdrdir)/ruby/internal/intern/hash.h
+div.o: $(hdrdir)/ruby/internal/intern/io.h
+div.o: $(hdrdir)/ruby/internal/intern/load.h
+div.o: $(hdrdir)/ruby/internal/intern/marshal.h
+div.o: $(hdrdir)/ruby/internal/intern/numeric.h
+div.o: $(hdrdir)/ruby/internal/intern/object.h
+div.o: $(hdrdir)/ruby/internal/intern/parse.h
+div.o: $(hdrdir)/ruby/internal/intern/proc.h
+div.o: $(hdrdir)/ruby/internal/intern/process.h
+div.o: $(hdrdir)/ruby/internal/intern/random.h
+div.o: $(hdrdir)/ruby/internal/intern/range.h
+div.o: $(hdrdir)/ruby/internal/intern/rational.h
+div.o: $(hdrdir)/ruby/internal/intern/re.h
+div.o: $(hdrdir)/ruby/internal/intern/ruby.h
+div.o: $(hdrdir)/ruby/internal/intern/select.h
+div.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+div.o: $(hdrdir)/ruby/internal/intern/signal.h
+div.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+div.o: $(hdrdir)/ruby/internal/intern/string.h
+div.o: $(hdrdir)/ruby/internal/intern/struct.h
+div.o: $(hdrdir)/ruby/internal/intern/thread.h
+div.o: $(hdrdir)/ruby/internal/intern/time.h
+div.o: $(hdrdir)/ruby/internal/intern/variable.h
+div.o: $(hdrdir)/ruby/internal/intern/vm.h
+div.o: $(hdrdir)/ruby/internal/interpreter.h
+div.o: $(hdrdir)/ruby/internal/iterator.h
+div.o: $(hdrdir)/ruby/internal/memory.h
+div.o: $(hdrdir)/ruby/internal/method.h
+div.o: $(hdrdir)/ruby/internal/module.h
+div.o: $(hdrdir)/ruby/internal/newobj.h
+div.o: $(hdrdir)/ruby/internal/rgengc.h
+div.o: $(hdrdir)/ruby/internal/scan_args.h
+div.o: $(hdrdir)/ruby/internal/special_consts.h
+div.o: $(hdrdir)/ruby/internal/static_assert.h
+div.o: $(hdrdir)/ruby/internal/stdalign.h
+div.o: $(hdrdir)/ruby/internal/stdbool.h
+div.o: $(hdrdir)/ruby/internal/symbol.h
+div.o: $(hdrdir)/ruby/internal/value.h
+div.o: $(hdrdir)/ruby/internal/value_type.h
+div.o: $(hdrdir)/ruby/internal/variable.h
+div.o: $(hdrdir)/ruby/internal/warning_push.h
+div.o: $(hdrdir)/ruby/internal/xmalloc.h
div.o: $(hdrdir)/ruby/missing.h
div.o: $(hdrdir)/ruby/ruby.h
div.o: $(hdrdir)/ruby/st.h
div.o: $(hdrdir)/ruby/subst.h
-div.o: $(top_srcdir)/internal.h
+div.o: $(top_srcdir)/internal/bignum.h
div.o: div.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -52,41 +641,482 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: init.c
intpack.o: $(RUBY_EXTCONF_H)
intpack.o: $(arch_hdrdir)/ruby/config.h
-intpack.o: $(hdrdir)/ruby.h
intpack.o: $(hdrdir)/ruby/assert.h
intpack.o: $(hdrdir)/ruby/backward.h
+intpack.o: $(hdrdir)/ruby/backward/2/assume.h
+intpack.o: $(hdrdir)/ruby/backward/2/attributes.h
+intpack.o: $(hdrdir)/ruby/backward/2/bool.h
+intpack.o: $(hdrdir)/ruby/backward/2/inttypes.h
+intpack.o: $(hdrdir)/ruby/backward/2/limits.h
+intpack.o: $(hdrdir)/ruby/backward/2/long_long.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdalign.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdarg.h
intpack.o: $(hdrdir)/ruby/defines.h
intpack.o: $(hdrdir)/ruby/intern.h
+intpack.o: $(hdrdir)/ruby/internal/abi.h
+intpack.o: $(hdrdir)/ruby/internal/anyargs.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+intpack.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+intpack.o: $(hdrdir)/ruby/internal/assume.h
+intpack.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+intpack.o: $(hdrdir)/ruby/internal/attr/artificial.h
+intpack.o: $(hdrdir)/ruby/internal/attr/cold.h
+intpack.o: $(hdrdir)/ruby/internal/attr/const.h
+intpack.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+intpack.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+intpack.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+intpack.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+intpack.o: $(hdrdir)/ruby/internal/attr/error.h
+intpack.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+intpack.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+intpack.o: $(hdrdir)/ruby/internal/attr/format.h
+intpack.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+intpack.o: $(hdrdir)/ruby/internal/attr/noalias.h
+intpack.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+intpack.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+intpack.o: $(hdrdir)/ruby/internal/attr/noinline.h
+intpack.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+intpack.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+intpack.o: $(hdrdir)/ruby/internal/attr/pure.h
+intpack.o: $(hdrdir)/ruby/internal/attr/restrict.h
+intpack.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+intpack.o: $(hdrdir)/ruby/internal/attr/warning.h
+intpack.o: $(hdrdir)/ruby/internal/attr/weakref.h
+intpack.o: $(hdrdir)/ruby/internal/cast.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+intpack.o: $(hdrdir)/ruby/internal/compiler_since.h
+intpack.o: $(hdrdir)/ruby/internal/config.h
+intpack.o: $(hdrdir)/ruby/internal/constant_p.h
+intpack.o: $(hdrdir)/ruby/internal/core.h
+intpack.o: $(hdrdir)/ruby/internal/core/rarray.h
+intpack.o: $(hdrdir)/ruby/internal/core/rbasic.h
+intpack.o: $(hdrdir)/ruby/internal/core/rbignum.h
+intpack.o: $(hdrdir)/ruby/internal/core/rclass.h
+intpack.o: $(hdrdir)/ruby/internal/core/rdata.h
+intpack.o: $(hdrdir)/ruby/internal/core/rfile.h
+intpack.o: $(hdrdir)/ruby/internal/core/rhash.h
+intpack.o: $(hdrdir)/ruby/internal/core/robject.h
+intpack.o: $(hdrdir)/ruby/internal/core/rregexp.h
+intpack.o: $(hdrdir)/ruby/internal/core/rstring.h
+intpack.o: $(hdrdir)/ruby/internal/core/rstruct.h
+intpack.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+intpack.o: $(hdrdir)/ruby/internal/ctype.h
+intpack.o: $(hdrdir)/ruby/internal/dllexport.h
+intpack.o: $(hdrdir)/ruby/internal/dosish.h
+intpack.o: $(hdrdir)/ruby/internal/error.h
+intpack.o: $(hdrdir)/ruby/internal/eval.h
+intpack.o: $(hdrdir)/ruby/internal/event.h
+intpack.o: $(hdrdir)/ruby/internal/fl_type.h
+intpack.o: $(hdrdir)/ruby/internal/gc.h
+intpack.o: $(hdrdir)/ruby/internal/glob.h
+intpack.o: $(hdrdir)/ruby/internal/globals.h
+intpack.o: $(hdrdir)/ruby/internal/has/attribute.h
+intpack.o: $(hdrdir)/ruby/internal/has/builtin.h
+intpack.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+intpack.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+intpack.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+intpack.o: $(hdrdir)/ruby/internal/has/extension.h
+intpack.o: $(hdrdir)/ruby/internal/has/feature.h
+intpack.o: $(hdrdir)/ruby/internal/has/warning.h
+intpack.o: $(hdrdir)/ruby/internal/intern/array.h
+intpack.o: $(hdrdir)/ruby/internal/intern/bignum.h
+intpack.o: $(hdrdir)/ruby/internal/intern/class.h
+intpack.o: $(hdrdir)/ruby/internal/intern/compar.h
+intpack.o: $(hdrdir)/ruby/internal/intern/complex.h
+intpack.o: $(hdrdir)/ruby/internal/intern/cont.h
+intpack.o: $(hdrdir)/ruby/internal/intern/dir.h
+intpack.o: $(hdrdir)/ruby/internal/intern/enum.h
+intpack.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+intpack.o: $(hdrdir)/ruby/internal/intern/error.h
+intpack.o: $(hdrdir)/ruby/internal/intern/eval.h
+intpack.o: $(hdrdir)/ruby/internal/intern/file.h
+intpack.o: $(hdrdir)/ruby/internal/intern/gc.h
+intpack.o: $(hdrdir)/ruby/internal/intern/hash.h
+intpack.o: $(hdrdir)/ruby/internal/intern/io.h
+intpack.o: $(hdrdir)/ruby/internal/intern/load.h
+intpack.o: $(hdrdir)/ruby/internal/intern/marshal.h
+intpack.o: $(hdrdir)/ruby/internal/intern/numeric.h
+intpack.o: $(hdrdir)/ruby/internal/intern/object.h
+intpack.o: $(hdrdir)/ruby/internal/intern/parse.h
+intpack.o: $(hdrdir)/ruby/internal/intern/proc.h
+intpack.o: $(hdrdir)/ruby/internal/intern/process.h
+intpack.o: $(hdrdir)/ruby/internal/intern/random.h
+intpack.o: $(hdrdir)/ruby/internal/intern/range.h
+intpack.o: $(hdrdir)/ruby/internal/intern/rational.h
+intpack.o: $(hdrdir)/ruby/internal/intern/re.h
+intpack.o: $(hdrdir)/ruby/internal/intern/ruby.h
+intpack.o: $(hdrdir)/ruby/internal/intern/select.h
+intpack.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+intpack.o: $(hdrdir)/ruby/internal/intern/signal.h
+intpack.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+intpack.o: $(hdrdir)/ruby/internal/intern/string.h
+intpack.o: $(hdrdir)/ruby/internal/intern/struct.h
+intpack.o: $(hdrdir)/ruby/internal/intern/thread.h
+intpack.o: $(hdrdir)/ruby/internal/intern/time.h
+intpack.o: $(hdrdir)/ruby/internal/intern/variable.h
+intpack.o: $(hdrdir)/ruby/internal/intern/vm.h
+intpack.o: $(hdrdir)/ruby/internal/interpreter.h
+intpack.o: $(hdrdir)/ruby/internal/iterator.h
+intpack.o: $(hdrdir)/ruby/internal/memory.h
+intpack.o: $(hdrdir)/ruby/internal/method.h
+intpack.o: $(hdrdir)/ruby/internal/module.h
+intpack.o: $(hdrdir)/ruby/internal/newobj.h
+intpack.o: $(hdrdir)/ruby/internal/rgengc.h
+intpack.o: $(hdrdir)/ruby/internal/scan_args.h
+intpack.o: $(hdrdir)/ruby/internal/special_consts.h
+intpack.o: $(hdrdir)/ruby/internal/static_assert.h
+intpack.o: $(hdrdir)/ruby/internal/stdalign.h
+intpack.o: $(hdrdir)/ruby/internal/stdbool.h
+intpack.o: $(hdrdir)/ruby/internal/symbol.h
+intpack.o: $(hdrdir)/ruby/internal/value.h
+intpack.o: $(hdrdir)/ruby/internal/value_type.h
+intpack.o: $(hdrdir)/ruby/internal/variable.h
+intpack.o: $(hdrdir)/ruby/internal/warning_push.h
+intpack.o: $(hdrdir)/ruby/internal/xmalloc.h
intpack.o: $(hdrdir)/ruby/missing.h
intpack.o: $(hdrdir)/ruby/ruby.h
intpack.o: $(hdrdir)/ruby/st.h
intpack.o: $(hdrdir)/ruby/subst.h
-intpack.o: $(top_srcdir)/internal.h
+intpack.o: $(top_srcdir)/internal/bignum.h
intpack.o: intpack.c
mul.o: $(RUBY_EXTCONF_H)
mul.o: $(arch_hdrdir)/ruby/config.h
-mul.o: $(hdrdir)/ruby.h
mul.o: $(hdrdir)/ruby/assert.h
mul.o: $(hdrdir)/ruby/backward.h
+mul.o: $(hdrdir)/ruby/backward/2/assume.h
+mul.o: $(hdrdir)/ruby/backward/2/attributes.h
+mul.o: $(hdrdir)/ruby/backward/2/bool.h
+mul.o: $(hdrdir)/ruby/backward/2/inttypes.h
+mul.o: $(hdrdir)/ruby/backward/2/limits.h
+mul.o: $(hdrdir)/ruby/backward/2/long_long.h
+mul.o: $(hdrdir)/ruby/backward/2/stdalign.h
+mul.o: $(hdrdir)/ruby/backward/2/stdarg.h
mul.o: $(hdrdir)/ruby/defines.h
mul.o: $(hdrdir)/ruby/intern.h
+mul.o: $(hdrdir)/ruby/internal/abi.h
+mul.o: $(hdrdir)/ruby/internal/anyargs.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+mul.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+mul.o: $(hdrdir)/ruby/internal/assume.h
+mul.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+mul.o: $(hdrdir)/ruby/internal/attr/artificial.h
+mul.o: $(hdrdir)/ruby/internal/attr/cold.h
+mul.o: $(hdrdir)/ruby/internal/attr/const.h
+mul.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+mul.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+mul.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+mul.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+mul.o: $(hdrdir)/ruby/internal/attr/error.h
+mul.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+mul.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+mul.o: $(hdrdir)/ruby/internal/attr/format.h
+mul.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+mul.o: $(hdrdir)/ruby/internal/attr/noalias.h
+mul.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+mul.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+mul.o: $(hdrdir)/ruby/internal/attr/noinline.h
+mul.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+mul.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+mul.o: $(hdrdir)/ruby/internal/attr/pure.h
+mul.o: $(hdrdir)/ruby/internal/attr/restrict.h
+mul.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+mul.o: $(hdrdir)/ruby/internal/attr/warning.h
+mul.o: $(hdrdir)/ruby/internal/attr/weakref.h
+mul.o: $(hdrdir)/ruby/internal/cast.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+mul.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+mul.o: $(hdrdir)/ruby/internal/compiler_since.h
+mul.o: $(hdrdir)/ruby/internal/config.h
+mul.o: $(hdrdir)/ruby/internal/constant_p.h
+mul.o: $(hdrdir)/ruby/internal/core.h
+mul.o: $(hdrdir)/ruby/internal/core/rarray.h
+mul.o: $(hdrdir)/ruby/internal/core/rbasic.h
+mul.o: $(hdrdir)/ruby/internal/core/rbignum.h
+mul.o: $(hdrdir)/ruby/internal/core/rclass.h
+mul.o: $(hdrdir)/ruby/internal/core/rdata.h
+mul.o: $(hdrdir)/ruby/internal/core/rfile.h
+mul.o: $(hdrdir)/ruby/internal/core/rhash.h
+mul.o: $(hdrdir)/ruby/internal/core/robject.h
+mul.o: $(hdrdir)/ruby/internal/core/rregexp.h
+mul.o: $(hdrdir)/ruby/internal/core/rstring.h
+mul.o: $(hdrdir)/ruby/internal/core/rstruct.h
+mul.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+mul.o: $(hdrdir)/ruby/internal/ctype.h
+mul.o: $(hdrdir)/ruby/internal/dllexport.h
+mul.o: $(hdrdir)/ruby/internal/dosish.h
+mul.o: $(hdrdir)/ruby/internal/error.h
+mul.o: $(hdrdir)/ruby/internal/eval.h
+mul.o: $(hdrdir)/ruby/internal/event.h
+mul.o: $(hdrdir)/ruby/internal/fl_type.h
+mul.o: $(hdrdir)/ruby/internal/gc.h
+mul.o: $(hdrdir)/ruby/internal/glob.h
+mul.o: $(hdrdir)/ruby/internal/globals.h
+mul.o: $(hdrdir)/ruby/internal/has/attribute.h
+mul.o: $(hdrdir)/ruby/internal/has/builtin.h
+mul.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+mul.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+mul.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+mul.o: $(hdrdir)/ruby/internal/has/extension.h
+mul.o: $(hdrdir)/ruby/internal/has/feature.h
+mul.o: $(hdrdir)/ruby/internal/has/warning.h
+mul.o: $(hdrdir)/ruby/internal/intern/array.h
+mul.o: $(hdrdir)/ruby/internal/intern/bignum.h
+mul.o: $(hdrdir)/ruby/internal/intern/class.h
+mul.o: $(hdrdir)/ruby/internal/intern/compar.h
+mul.o: $(hdrdir)/ruby/internal/intern/complex.h
+mul.o: $(hdrdir)/ruby/internal/intern/cont.h
+mul.o: $(hdrdir)/ruby/internal/intern/dir.h
+mul.o: $(hdrdir)/ruby/internal/intern/enum.h
+mul.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+mul.o: $(hdrdir)/ruby/internal/intern/error.h
+mul.o: $(hdrdir)/ruby/internal/intern/eval.h
+mul.o: $(hdrdir)/ruby/internal/intern/file.h
+mul.o: $(hdrdir)/ruby/internal/intern/gc.h
+mul.o: $(hdrdir)/ruby/internal/intern/hash.h
+mul.o: $(hdrdir)/ruby/internal/intern/io.h
+mul.o: $(hdrdir)/ruby/internal/intern/load.h
+mul.o: $(hdrdir)/ruby/internal/intern/marshal.h
+mul.o: $(hdrdir)/ruby/internal/intern/numeric.h
+mul.o: $(hdrdir)/ruby/internal/intern/object.h
+mul.o: $(hdrdir)/ruby/internal/intern/parse.h
+mul.o: $(hdrdir)/ruby/internal/intern/proc.h
+mul.o: $(hdrdir)/ruby/internal/intern/process.h
+mul.o: $(hdrdir)/ruby/internal/intern/random.h
+mul.o: $(hdrdir)/ruby/internal/intern/range.h
+mul.o: $(hdrdir)/ruby/internal/intern/rational.h
+mul.o: $(hdrdir)/ruby/internal/intern/re.h
+mul.o: $(hdrdir)/ruby/internal/intern/ruby.h
+mul.o: $(hdrdir)/ruby/internal/intern/select.h
+mul.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+mul.o: $(hdrdir)/ruby/internal/intern/signal.h
+mul.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+mul.o: $(hdrdir)/ruby/internal/intern/string.h
+mul.o: $(hdrdir)/ruby/internal/intern/struct.h
+mul.o: $(hdrdir)/ruby/internal/intern/thread.h
+mul.o: $(hdrdir)/ruby/internal/intern/time.h
+mul.o: $(hdrdir)/ruby/internal/intern/variable.h
+mul.o: $(hdrdir)/ruby/internal/intern/vm.h
+mul.o: $(hdrdir)/ruby/internal/interpreter.h
+mul.o: $(hdrdir)/ruby/internal/iterator.h
+mul.o: $(hdrdir)/ruby/internal/memory.h
+mul.o: $(hdrdir)/ruby/internal/method.h
+mul.o: $(hdrdir)/ruby/internal/module.h
+mul.o: $(hdrdir)/ruby/internal/newobj.h
+mul.o: $(hdrdir)/ruby/internal/rgengc.h
+mul.o: $(hdrdir)/ruby/internal/scan_args.h
+mul.o: $(hdrdir)/ruby/internal/special_consts.h
+mul.o: $(hdrdir)/ruby/internal/static_assert.h
+mul.o: $(hdrdir)/ruby/internal/stdalign.h
+mul.o: $(hdrdir)/ruby/internal/stdbool.h
+mul.o: $(hdrdir)/ruby/internal/symbol.h
+mul.o: $(hdrdir)/ruby/internal/value.h
+mul.o: $(hdrdir)/ruby/internal/value_type.h
+mul.o: $(hdrdir)/ruby/internal/variable.h
+mul.o: $(hdrdir)/ruby/internal/warning_push.h
+mul.o: $(hdrdir)/ruby/internal/xmalloc.h
mul.o: $(hdrdir)/ruby/missing.h
mul.o: $(hdrdir)/ruby/ruby.h
mul.o: $(hdrdir)/ruby/st.h
mul.o: $(hdrdir)/ruby/subst.h
-mul.o: $(top_srcdir)/internal.h
+mul.o: $(top_srcdir)/internal/bignum.h
mul.o: mul.c
str2big.o: $(RUBY_EXTCONF_H)
str2big.o: $(arch_hdrdir)/ruby/config.h
-str2big.o: $(hdrdir)/ruby.h
str2big.o: $(hdrdir)/ruby/assert.h
str2big.o: $(hdrdir)/ruby/backward.h
+str2big.o: $(hdrdir)/ruby/backward/2/assume.h
+str2big.o: $(hdrdir)/ruby/backward/2/attributes.h
+str2big.o: $(hdrdir)/ruby/backward/2/bool.h
+str2big.o: $(hdrdir)/ruby/backward/2/inttypes.h
+str2big.o: $(hdrdir)/ruby/backward/2/limits.h
+str2big.o: $(hdrdir)/ruby/backward/2/long_long.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdalign.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdarg.h
str2big.o: $(hdrdir)/ruby/defines.h
str2big.o: $(hdrdir)/ruby/intern.h
+str2big.o: $(hdrdir)/ruby/internal/abi.h
+str2big.o: $(hdrdir)/ruby/internal/anyargs.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+str2big.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+str2big.o: $(hdrdir)/ruby/internal/assume.h
+str2big.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+str2big.o: $(hdrdir)/ruby/internal/attr/artificial.h
+str2big.o: $(hdrdir)/ruby/internal/attr/cold.h
+str2big.o: $(hdrdir)/ruby/internal/attr/const.h
+str2big.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+str2big.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+str2big.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+str2big.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+str2big.o: $(hdrdir)/ruby/internal/attr/error.h
+str2big.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+str2big.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+str2big.o: $(hdrdir)/ruby/internal/attr/format.h
+str2big.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+str2big.o: $(hdrdir)/ruby/internal/attr/noalias.h
+str2big.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+str2big.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+str2big.o: $(hdrdir)/ruby/internal/attr/noinline.h
+str2big.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+str2big.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+str2big.o: $(hdrdir)/ruby/internal/attr/pure.h
+str2big.o: $(hdrdir)/ruby/internal/attr/restrict.h
+str2big.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+str2big.o: $(hdrdir)/ruby/internal/attr/warning.h
+str2big.o: $(hdrdir)/ruby/internal/attr/weakref.h
+str2big.o: $(hdrdir)/ruby/internal/cast.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+str2big.o: $(hdrdir)/ruby/internal/compiler_since.h
+str2big.o: $(hdrdir)/ruby/internal/config.h
+str2big.o: $(hdrdir)/ruby/internal/constant_p.h
+str2big.o: $(hdrdir)/ruby/internal/core.h
+str2big.o: $(hdrdir)/ruby/internal/core/rarray.h
+str2big.o: $(hdrdir)/ruby/internal/core/rbasic.h
+str2big.o: $(hdrdir)/ruby/internal/core/rbignum.h
+str2big.o: $(hdrdir)/ruby/internal/core/rclass.h
+str2big.o: $(hdrdir)/ruby/internal/core/rdata.h
+str2big.o: $(hdrdir)/ruby/internal/core/rfile.h
+str2big.o: $(hdrdir)/ruby/internal/core/rhash.h
+str2big.o: $(hdrdir)/ruby/internal/core/robject.h
+str2big.o: $(hdrdir)/ruby/internal/core/rregexp.h
+str2big.o: $(hdrdir)/ruby/internal/core/rstring.h
+str2big.o: $(hdrdir)/ruby/internal/core/rstruct.h
+str2big.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+str2big.o: $(hdrdir)/ruby/internal/ctype.h
+str2big.o: $(hdrdir)/ruby/internal/dllexport.h
+str2big.o: $(hdrdir)/ruby/internal/dosish.h
+str2big.o: $(hdrdir)/ruby/internal/error.h
+str2big.o: $(hdrdir)/ruby/internal/eval.h
+str2big.o: $(hdrdir)/ruby/internal/event.h
+str2big.o: $(hdrdir)/ruby/internal/fl_type.h
+str2big.o: $(hdrdir)/ruby/internal/gc.h
+str2big.o: $(hdrdir)/ruby/internal/glob.h
+str2big.o: $(hdrdir)/ruby/internal/globals.h
+str2big.o: $(hdrdir)/ruby/internal/has/attribute.h
+str2big.o: $(hdrdir)/ruby/internal/has/builtin.h
+str2big.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+str2big.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+str2big.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+str2big.o: $(hdrdir)/ruby/internal/has/extension.h
+str2big.o: $(hdrdir)/ruby/internal/has/feature.h
+str2big.o: $(hdrdir)/ruby/internal/has/warning.h
+str2big.o: $(hdrdir)/ruby/internal/intern/array.h
+str2big.o: $(hdrdir)/ruby/internal/intern/bignum.h
+str2big.o: $(hdrdir)/ruby/internal/intern/class.h
+str2big.o: $(hdrdir)/ruby/internal/intern/compar.h
+str2big.o: $(hdrdir)/ruby/internal/intern/complex.h
+str2big.o: $(hdrdir)/ruby/internal/intern/cont.h
+str2big.o: $(hdrdir)/ruby/internal/intern/dir.h
+str2big.o: $(hdrdir)/ruby/internal/intern/enum.h
+str2big.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+str2big.o: $(hdrdir)/ruby/internal/intern/error.h
+str2big.o: $(hdrdir)/ruby/internal/intern/eval.h
+str2big.o: $(hdrdir)/ruby/internal/intern/file.h
+str2big.o: $(hdrdir)/ruby/internal/intern/gc.h
+str2big.o: $(hdrdir)/ruby/internal/intern/hash.h
+str2big.o: $(hdrdir)/ruby/internal/intern/io.h
+str2big.o: $(hdrdir)/ruby/internal/intern/load.h
+str2big.o: $(hdrdir)/ruby/internal/intern/marshal.h
+str2big.o: $(hdrdir)/ruby/internal/intern/numeric.h
+str2big.o: $(hdrdir)/ruby/internal/intern/object.h
+str2big.o: $(hdrdir)/ruby/internal/intern/parse.h
+str2big.o: $(hdrdir)/ruby/internal/intern/proc.h
+str2big.o: $(hdrdir)/ruby/internal/intern/process.h
+str2big.o: $(hdrdir)/ruby/internal/intern/random.h
+str2big.o: $(hdrdir)/ruby/internal/intern/range.h
+str2big.o: $(hdrdir)/ruby/internal/intern/rational.h
+str2big.o: $(hdrdir)/ruby/internal/intern/re.h
+str2big.o: $(hdrdir)/ruby/internal/intern/ruby.h
+str2big.o: $(hdrdir)/ruby/internal/intern/select.h
+str2big.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+str2big.o: $(hdrdir)/ruby/internal/intern/signal.h
+str2big.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+str2big.o: $(hdrdir)/ruby/internal/intern/string.h
+str2big.o: $(hdrdir)/ruby/internal/intern/struct.h
+str2big.o: $(hdrdir)/ruby/internal/intern/thread.h
+str2big.o: $(hdrdir)/ruby/internal/intern/time.h
+str2big.o: $(hdrdir)/ruby/internal/intern/variable.h
+str2big.o: $(hdrdir)/ruby/internal/intern/vm.h
+str2big.o: $(hdrdir)/ruby/internal/interpreter.h
+str2big.o: $(hdrdir)/ruby/internal/iterator.h
+str2big.o: $(hdrdir)/ruby/internal/memory.h
+str2big.o: $(hdrdir)/ruby/internal/method.h
+str2big.o: $(hdrdir)/ruby/internal/module.h
+str2big.o: $(hdrdir)/ruby/internal/newobj.h
+str2big.o: $(hdrdir)/ruby/internal/rgengc.h
+str2big.o: $(hdrdir)/ruby/internal/scan_args.h
+str2big.o: $(hdrdir)/ruby/internal/special_consts.h
+str2big.o: $(hdrdir)/ruby/internal/static_assert.h
+str2big.o: $(hdrdir)/ruby/internal/stdalign.h
+str2big.o: $(hdrdir)/ruby/internal/stdbool.h
+str2big.o: $(hdrdir)/ruby/internal/symbol.h
+str2big.o: $(hdrdir)/ruby/internal/value.h
+str2big.o: $(hdrdir)/ruby/internal/value_type.h
+str2big.o: $(hdrdir)/ruby/internal/variable.h
+str2big.o: $(hdrdir)/ruby/internal/warning_push.h
+str2big.o: $(hdrdir)/ruby/internal/xmalloc.h
str2big.o: $(hdrdir)/ruby/missing.h
str2big.o: $(hdrdir)/ruby/ruby.h
str2big.o: $(hdrdir)/ruby/st.h
str2big.o: $(hdrdir)/ruby/subst.h
-str2big.o: $(top_srcdir)/internal.h
+str2big.o: $(top_srcdir)/internal/bignum.h
str2big.o: str2big.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/bignum/div.c b/ext/-test-/bignum/div.c
index a1db21dc30..85ee0677fa 100644
--- a/ext/-test-/bignum/div.c
+++ b/ext/-test-/bignum/div.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
big(VALUE x)
@@ -12,14 +12,14 @@ big(VALUE x)
}
static VALUE
-divrem_normal(VALUE x, VALUE y)
+divrem_normal(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_divrem_normal(big(x), big(y)));
}
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
-divrem_gmp(VALUE x, VALUE y)
+divrem_gmp(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_divrem_gmp(big(x), big(y)));
}
@@ -30,6 +30,6 @@ divrem_gmp(VALUE x, VALUE y)
void
Init_div(VALUE klass)
{
- rb_define_method(rb_cInteger, "big_divrem_normal", divrem_normal, 1);
- rb_define_method(rb_cInteger, "big_divrem_gmp", divrem_gmp, 1);
+ rb_define_singleton_method(klass, "big_divrem_normal", divrem_normal, 2);
+ rb_define_singleton_method(klass, "big_divrem_gmp", divrem_gmp, 2);
}
diff --git a/ext/-test-/bignum/intpack.c b/ext/-test-/bignum/intpack.c
index 2d19442cf2..d5591505e5 100644
--- a/ext/-test-/bignum/intpack.c
+++ b/ext/-test-/bignum/intpack.c
@@ -1,7 +1,7 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
-rb_integer_pack_raw_m(VALUE val, VALUE buf, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
+rb_integer_pack_raw_m(VALUE klass, VALUE val, VALUE buf, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
{
int sign;
size_t numwords = 0;
@@ -17,7 +17,7 @@ rb_integer_pack_raw_m(VALUE val, VALUE buf, VALUE numwords_arg, VALUE wordsize_a
}
static VALUE
-rb_integer_pack_m(VALUE val, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
+rb_integer_pack_m(VALUE klass, VALUE val, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
{
int sign;
size_t numwords = NUM2SIZET(numwords_arg);
@@ -45,7 +45,7 @@ rb_integer_unpack_m(VALUE klass, VALUE buf, VALUE numwords, VALUE wordsize, VALU
}
static VALUE
-rb_integer_test_numbits_2comp_without_sign(VALUE val)
+rb_integer_test_numbits_2comp_without_sign(VALUE klass, VALUE val)
{
size_t size;
int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
@@ -54,7 +54,7 @@ rb_integer_test_numbits_2comp_without_sign(VALUE val)
}
static VALUE
-rb_integer_test_numbytes_2comp_with_sign(VALUE val)
+rb_integer_test_numbytes_2comp_with_sign(VALUE klass, VALUE val)
{
int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
int nlz_bits;
@@ -67,21 +67,21 @@ rb_integer_test_numbytes_2comp_with_sign(VALUE val)
void
Init_intpack(VALUE klass)
{
- rb_define_method(rb_cInteger, "test_pack_raw", rb_integer_pack_raw_m, 5);
- rb_define_method(rb_cInteger, "test_pack", rb_integer_pack_m, 4);
- rb_define_singleton_method(rb_cInteger, "test_unpack", rb_integer_unpack_m, 5);
- rb_define_const(rb_cInteger, "INTEGER_PACK_MSWORD_FIRST", INT2NUM(INTEGER_PACK_MSWORD_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LSWORD_FIRST", INT2NUM(INTEGER_PACK_LSWORD_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_MSBYTE_FIRST", INT2NUM(INTEGER_PACK_MSBYTE_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LSBYTE_FIRST", INT2NUM(INTEGER_PACK_LSBYTE_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_NATIVE_BYTE_ORDER", INT2NUM(INTEGER_PACK_NATIVE_BYTE_ORDER));
- rb_define_const(rb_cInteger, "INTEGER_PACK_2COMP", INT2NUM(INTEGER_PACK_2COMP));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LITTLE_ENDIAN", INT2NUM(INTEGER_PACK_LITTLE_ENDIAN));
- rb_define_const(rb_cInteger, "INTEGER_PACK_BIG_ENDIAN", INT2NUM(INTEGER_PACK_BIG_ENDIAN));
- rb_define_const(rb_cInteger, "INTEGER_PACK_FORCE_BIGNUM", INT2NUM(INTEGER_PACK_FORCE_BIGNUM));
- rb_define_const(rb_cInteger, "INTEGER_PACK_NEGATIVE", INT2NUM(INTEGER_PACK_NEGATIVE));
- rb_define_const(rb_cInteger, "INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION", INT2NUM(INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION));
+ rb_define_singleton_method(klass, "test_pack_raw", rb_integer_pack_raw_m, 6);
+ rb_define_singleton_method(klass, "test_pack", rb_integer_pack_m, 5);
+ rb_define_singleton_method(klass, "test_unpack", rb_integer_unpack_m, 5);
+ rb_define_const(klass, "INTEGER_PACK_MSWORD_FIRST", INT2NUM(INTEGER_PACK_MSWORD_FIRST));
+ rb_define_const(klass, "INTEGER_PACK_LSWORD_FIRST", INT2NUM(INTEGER_PACK_LSWORD_FIRST));
+ rb_define_const(klass, "INTEGER_PACK_MSBYTE_FIRST", INT2NUM(INTEGER_PACK_MSBYTE_FIRST));
+ rb_define_const(klass, "INTEGER_PACK_LSBYTE_FIRST", INT2NUM(INTEGER_PACK_LSBYTE_FIRST));
+ rb_define_const(klass, "INTEGER_PACK_NATIVE_BYTE_ORDER", INT2NUM(INTEGER_PACK_NATIVE_BYTE_ORDER));
+ rb_define_const(klass, "INTEGER_PACK_2COMP", INT2NUM(INTEGER_PACK_2COMP));
+ rb_define_const(klass, "INTEGER_PACK_LITTLE_ENDIAN", INT2NUM(INTEGER_PACK_LITTLE_ENDIAN));
+ rb_define_const(klass, "INTEGER_PACK_BIG_ENDIAN", INT2NUM(INTEGER_PACK_BIG_ENDIAN));
+ rb_define_const(klass, "INTEGER_PACK_FORCE_BIGNUM", INT2NUM(INTEGER_PACK_FORCE_BIGNUM));
+ rb_define_const(klass, "INTEGER_PACK_NEGATIVE", INT2NUM(INTEGER_PACK_NEGATIVE));
+ rb_define_const(klass, "INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION", INT2NUM(INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION));
- rb_define_method(rb_cInteger, "test_numbits_2comp_without_sign", rb_integer_test_numbits_2comp_without_sign, 0);
- rb_define_method(rb_cInteger, "test_numbytes_2comp_with_sign", rb_integer_test_numbytes_2comp_with_sign, 0);
+ rb_define_singleton_method(klass, "test_numbits_2comp_without_sign", rb_integer_test_numbits_2comp_without_sign, 1);
+ rb_define_singleton_method(klass, "test_numbytes_2comp_with_sign", rb_integer_test_numbytes_2comp_with_sign, 1);
}
diff --git a/ext/-test-/bignum/mul.c b/ext/-test-/bignum/mul.c
index b922f34437..05ba103c44 100644
--- a/ext/-test-/bignum/mul.c
+++ b/ext/-test-/bignum/mul.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
big(VALUE x)
@@ -12,38 +12,38 @@ big(VALUE x)
}
static VALUE
-mul_normal(VALUE x, VALUE y)
+mul_normal(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_mul_normal(big(x), big(y)));
}
static VALUE
-sq_fast(VALUE x)
+sq_fast(VALUE klass, VALUE x)
{
return rb_big_norm(rb_big_sq_fast(big(x)));
}
static VALUE
-mul_balance(VALUE x, VALUE y)
+mul_balance(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_mul_balance(big(x), big(y)));
}
static VALUE
-mul_karatsuba(VALUE x, VALUE y)
+mul_karatsuba(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_mul_karatsuba(big(x), big(y)));
}
static VALUE
-mul_toom3(VALUE x, VALUE y)
+mul_toom3(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_mul_toom3(big(x), big(y)));
}
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
-mul_gmp(VALUE x, VALUE y)
+mul_gmp(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_big_mul_gmp(big(x), big(y)));
}
@@ -54,12 +54,12 @@ mul_gmp(VALUE x, VALUE y)
void
Init_mul(VALUE klass)
{
- rb_define_const(rb_cInteger, "SIZEOF_BDIGIT", INT2NUM(SIZEOF_BDIGIT));
- rb_define_const(rb_cInteger, "BITSPERDIG", INT2NUM(SIZEOF_BDIGIT * CHAR_BIT));
- rb_define_method(rb_cInteger, "big_mul_normal", mul_normal, 1);
- rb_define_method(rb_cInteger, "big_sq_fast", sq_fast, 0);
- rb_define_method(rb_cInteger, "big_mul_balance", mul_balance, 1);
- rb_define_method(rb_cInteger, "big_mul_karatsuba", mul_karatsuba, 1);
- rb_define_method(rb_cInteger, "big_mul_toom3", mul_toom3, 1);
- rb_define_method(rb_cInteger, "big_mul_gmp", mul_gmp, 1);
+ rb_define_const(klass, "SIZEOF_BDIGIT", INT2NUM(SIZEOF_BDIGIT));
+ rb_define_const(klass, "BITSPERDIG", INT2NUM(SIZEOF_BDIGIT * CHAR_BIT));
+ rb_define_singleton_method(klass, "big_mul_normal", mul_normal, 2);
+ rb_define_singleton_method(klass, "big_sq_fast", sq_fast, 1);
+ rb_define_singleton_method(klass, "big_mul_balance", mul_balance, 2);
+ rb_define_singleton_method(klass, "big_mul_karatsuba", mul_karatsuba, 2);
+ rb_define_singleton_method(klass, "big_mul_toom3", mul_toom3, 2);
+ rb_define_singleton_method(klass, "big_mul_gmp", mul_gmp, 2);
}
diff --git a/ext/-test-/bignum/str2big.c b/ext/-test-/bignum/str2big.c
index bc79ef0329..337cf8fb6d 100644
--- a/ext/-test-/bignum/str2big.c
+++ b/ext/-test-/bignum/str2big.c
@@ -1,26 +1,26 @@
-#include "internal.h"
+#include "internal/bignum.h"
static VALUE
-str2big_poweroftwo(VALUE str, VALUE vbase, VALUE badcheck)
+str2big_poweroftwo(VALUE klass, VALUE str, VALUE vbase, VALUE badcheck)
{
return rb_str2big_poweroftwo(str, NUM2INT(vbase), RTEST(badcheck));
}
static VALUE
-str2big_normal(VALUE str, VALUE vbase, VALUE badcheck)
+str2big_normal(VALUE klass, VALUE str, VALUE vbase, VALUE badcheck)
{
return rb_str2big_normal(str, NUM2INT(vbase), RTEST(badcheck));
}
static VALUE
-str2big_karatsuba(VALUE str, VALUE vbase, VALUE badcheck)
+str2big_karatsuba(VALUE klass, VALUE str, VALUE vbase, VALUE badcheck)
{
return rb_str2big_karatsuba(str, NUM2INT(vbase), RTEST(badcheck));
}
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
-str2big_gmp(VALUE str, VALUE vbase, VALUE badcheck)
+str2big_gmp(VALUE klass, VALUE str, VALUE vbase, VALUE badcheck)
{
return rb_str2big_gmp(str, NUM2INT(vbase), RTEST(badcheck));
}
@@ -31,8 +31,8 @@ str2big_gmp(VALUE str, VALUE vbase, VALUE badcheck)
void
Init_str2big(VALUE klass)
{
- rb_define_method(rb_cString, "str2big_poweroftwo", str2big_poweroftwo, 2);
- rb_define_method(rb_cString, "str2big_normal", str2big_normal, 2);
- rb_define_method(rb_cString, "str2big_karatsuba", str2big_karatsuba, 2);
- rb_define_method(rb_cString, "str2big_gmp", str2big_gmp, 2);
+ rb_define_singleton_method(klass, "str2big_poweroftwo", str2big_poweroftwo, 3);
+ rb_define_singleton_method(klass, "str2big_normal", str2big_normal, 3);
+ rb_define_singleton_method(klass, "str2big_karatsuba", str2big_karatsuba, 3);
+ rb_define_singleton_method(klass, "str2big_gmp", str2big_gmp, 3);
}
diff --git a/ext/-test-/bug-14834/depend b/ext/-test-/bug-14834/depend
index 5206f995be..7bac8409e8 100644
--- a/ext/-test-/bug-14834/depend
+++ b/ext/-test-/bug-14834/depend
@@ -3,9 +3,157 @@ bug-14384.o: $(RUBY_EXTCONF_H)
bug-14384.o: $(arch_hdrdir)/ruby/config.h
bug-14384.o: $(hdrdir)/ruby/assert.h
bug-14384.o: $(hdrdir)/ruby/backward.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/assume.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/bool.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/limits.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdarg.h
bug-14384.o: $(hdrdir)/ruby/debug.h
bug-14384.o: $(hdrdir)/ruby/defines.h
bug-14384.o: $(hdrdir)/ruby/intern.h
+bug-14384.o: $(hdrdir)/ruby/internal/abi.h
+bug-14384.o: $(hdrdir)/ruby/internal/anyargs.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bug-14384.o: $(hdrdir)/ruby/internal/assume.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/cold.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/const.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/error.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/format.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/pure.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/warning.h
+bug-14384.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bug-14384.o: $(hdrdir)/ruby/internal/cast.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bug-14384.o: $(hdrdir)/ruby/internal/compiler_since.h
+bug-14384.o: $(hdrdir)/ruby/internal/config.h
+bug-14384.o: $(hdrdir)/ruby/internal/constant_p.h
+bug-14384.o: $(hdrdir)/ruby/internal/core.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rarray.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rclass.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rdata.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rfile.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rhash.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/robject.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rstring.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bug-14384.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bug-14384.o: $(hdrdir)/ruby/internal/ctype.h
+bug-14384.o: $(hdrdir)/ruby/internal/dllexport.h
+bug-14384.o: $(hdrdir)/ruby/internal/dosish.h
+bug-14384.o: $(hdrdir)/ruby/internal/error.h
+bug-14384.o: $(hdrdir)/ruby/internal/eval.h
+bug-14384.o: $(hdrdir)/ruby/internal/event.h
+bug-14384.o: $(hdrdir)/ruby/internal/fl_type.h
+bug-14384.o: $(hdrdir)/ruby/internal/gc.h
+bug-14384.o: $(hdrdir)/ruby/internal/glob.h
+bug-14384.o: $(hdrdir)/ruby/internal/globals.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/attribute.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/builtin.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/extension.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/feature.h
+bug-14384.o: $(hdrdir)/ruby/internal/has/warning.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/array.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/class.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/compar.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/complex.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/cont.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/dir.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/enum.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/error.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/eval.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/file.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/gc.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/hash.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/io.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/load.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/object.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/parse.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/proc.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/process.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/random.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/range.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/rational.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/re.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/select.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/signal.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/string.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/struct.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/thread.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/time.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/variable.h
+bug-14384.o: $(hdrdir)/ruby/internal/intern/vm.h
+bug-14384.o: $(hdrdir)/ruby/internal/interpreter.h
+bug-14384.o: $(hdrdir)/ruby/internal/iterator.h
+bug-14384.o: $(hdrdir)/ruby/internal/memory.h
+bug-14384.o: $(hdrdir)/ruby/internal/method.h
+bug-14384.o: $(hdrdir)/ruby/internal/module.h
+bug-14384.o: $(hdrdir)/ruby/internal/newobj.h
+bug-14384.o: $(hdrdir)/ruby/internal/rgengc.h
+bug-14384.o: $(hdrdir)/ruby/internal/scan_args.h
+bug-14384.o: $(hdrdir)/ruby/internal/special_consts.h
+bug-14384.o: $(hdrdir)/ruby/internal/static_assert.h
+bug-14384.o: $(hdrdir)/ruby/internal/stdalign.h
+bug-14384.o: $(hdrdir)/ruby/internal/stdbool.h
+bug-14384.o: $(hdrdir)/ruby/internal/symbol.h
+bug-14384.o: $(hdrdir)/ruby/internal/value.h
+bug-14384.o: $(hdrdir)/ruby/internal/value_type.h
+bug-14384.o: $(hdrdir)/ruby/internal/variable.h
+bug-14384.o: $(hdrdir)/ruby/internal/warning_push.h
+bug-14384.o: $(hdrdir)/ruby/internal/xmalloc.h
bug-14384.o: $(hdrdir)/ruby/missing.h
bug-14384.o: $(hdrdir)/ruby/ruby.h
bug-14384.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-3571/depend b/ext/-test-/bug-3571/depend
index 74911f0af4..2303f47594 100644
--- a/ext/-test-/bug-3571/depend
+++ b/ext/-test-/bug-3571/depend
@@ -4,8 +4,156 @@ bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
bug.o: $(hdrdir)/ruby/assert.h
bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
bug.o: $(hdrdir)/ruby/defines.h
bug.o: $(hdrdir)/ruby/intern.h
+bug.o: $(hdrdir)/ruby/internal/abi.h
+bug.o: $(hdrdir)/ruby/internal/anyargs.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bug.o: $(hdrdir)/ruby/internal/assume.h
+bug.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bug.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bug.o: $(hdrdir)/ruby/internal/attr/cold.h
+bug.o: $(hdrdir)/ruby/internal/attr/const.h
+bug.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bug.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bug.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bug.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bug.o: $(hdrdir)/ruby/internal/attr/error.h
+bug.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bug.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/format.h
+bug.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bug.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bug.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bug.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bug.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bug.o: $(hdrdir)/ruby/internal/attr/pure.h
+bug.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bug.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/warning.h
+bug.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bug.o: $(hdrdir)/ruby/internal/cast.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bug.o: $(hdrdir)/ruby/internal/compiler_since.h
+bug.o: $(hdrdir)/ruby/internal/config.h
+bug.o: $(hdrdir)/ruby/internal/constant_p.h
+bug.o: $(hdrdir)/ruby/internal/core.h
+bug.o: $(hdrdir)/ruby/internal/core/rarray.h
+bug.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bug.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bug.o: $(hdrdir)/ruby/internal/core/rclass.h
+bug.o: $(hdrdir)/ruby/internal/core/rdata.h
+bug.o: $(hdrdir)/ruby/internal/core/rfile.h
+bug.o: $(hdrdir)/ruby/internal/core/rhash.h
+bug.o: $(hdrdir)/ruby/internal/core/robject.h
+bug.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bug.o: $(hdrdir)/ruby/internal/core/rstring.h
+bug.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bug.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bug.o: $(hdrdir)/ruby/internal/ctype.h
+bug.o: $(hdrdir)/ruby/internal/dllexport.h
+bug.o: $(hdrdir)/ruby/internal/dosish.h
+bug.o: $(hdrdir)/ruby/internal/error.h
+bug.o: $(hdrdir)/ruby/internal/eval.h
+bug.o: $(hdrdir)/ruby/internal/event.h
+bug.o: $(hdrdir)/ruby/internal/fl_type.h
+bug.o: $(hdrdir)/ruby/internal/gc.h
+bug.o: $(hdrdir)/ruby/internal/glob.h
+bug.o: $(hdrdir)/ruby/internal/globals.h
+bug.o: $(hdrdir)/ruby/internal/has/attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/builtin.h
+bug.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/extension.h
+bug.o: $(hdrdir)/ruby/internal/has/feature.h
+bug.o: $(hdrdir)/ruby/internal/has/warning.h
+bug.o: $(hdrdir)/ruby/internal/intern/array.h
+bug.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bug.o: $(hdrdir)/ruby/internal/intern/class.h
+bug.o: $(hdrdir)/ruby/internal/intern/compar.h
+bug.o: $(hdrdir)/ruby/internal/intern/complex.h
+bug.o: $(hdrdir)/ruby/internal/intern/cont.h
+bug.o: $(hdrdir)/ruby/internal/intern/dir.h
+bug.o: $(hdrdir)/ruby/internal/intern/enum.h
+bug.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bug.o: $(hdrdir)/ruby/internal/intern/error.h
+bug.o: $(hdrdir)/ruby/internal/intern/eval.h
+bug.o: $(hdrdir)/ruby/internal/intern/file.h
+bug.o: $(hdrdir)/ruby/internal/intern/gc.h
+bug.o: $(hdrdir)/ruby/internal/intern/hash.h
+bug.o: $(hdrdir)/ruby/internal/intern/io.h
+bug.o: $(hdrdir)/ruby/internal/intern/load.h
+bug.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bug.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bug.o: $(hdrdir)/ruby/internal/intern/object.h
+bug.o: $(hdrdir)/ruby/internal/intern/parse.h
+bug.o: $(hdrdir)/ruby/internal/intern/proc.h
+bug.o: $(hdrdir)/ruby/internal/intern/process.h
+bug.o: $(hdrdir)/ruby/internal/intern/random.h
+bug.o: $(hdrdir)/ruby/internal/intern/range.h
+bug.o: $(hdrdir)/ruby/internal/intern/rational.h
+bug.o: $(hdrdir)/ruby/internal/intern/re.h
+bug.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bug.o: $(hdrdir)/ruby/internal/intern/select.h
+bug.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bug.o: $(hdrdir)/ruby/internal/intern/signal.h
+bug.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bug.o: $(hdrdir)/ruby/internal/intern/string.h
+bug.o: $(hdrdir)/ruby/internal/intern/struct.h
+bug.o: $(hdrdir)/ruby/internal/intern/thread.h
+bug.o: $(hdrdir)/ruby/internal/intern/time.h
+bug.o: $(hdrdir)/ruby/internal/intern/variable.h
+bug.o: $(hdrdir)/ruby/internal/intern/vm.h
+bug.o: $(hdrdir)/ruby/internal/interpreter.h
+bug.o: $(hdrdir)/ruby/internal/iterator.h
+bug.o: $(hdrdir)/ruby/internal/memory.h
+bug.o: $(hdrdir)/ruby/internal/method.h
+bug.o: $(hdrdir)/ruby/internal/module.h
+bug.o: $(hdrdir)/ruby/internal/newobj.h
+bug.o: $(hdrdir)/ruby/internal/rgengc.h
+bug.o: $(hdrdir)/ruby/internal/scan_args.h
+bug.o: $(hdrdir)/ruby/internal/special_consts.h
+bug.o: $(hdrdir)/ruby/internal/static_assert.h
+bug.o: $(hdrdir)/ruby/internal/stdalign.h
+bug.o: $(hdrdir)/ruby/internal/stdbool.h
+bug.o: $(hdrdir)/ruby/internal/symbol.h
+bug.o: $(hdrdir)/ruby/internal/value.h
+bug.o: $(hdrdir)/ruby/internal/value_type.h
+bug.o: $(hdrdir)/ruby/internal/variable.h
+bug.o: $(hdrdir)/ruby/internal/warning_push.h
+bug.o: $(hdrdir)/ruby/internal/xmalloc.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-5832/depend b/ext/-test-/bug-5832/depend
index 74911f0af4..2303f47594 100644
--- a/ext/-test-/bug-5832/depend
+++ b/ext/-test-/bug-5832/depend
@@ -4,8 +4,156 @@ bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
bug.o: $(hdrdir)/ruby/assert.h
bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
bug.o: $(hdrdir)/ruby/defines.h
bug.o: $(hdrdir)/ruby/intern.h
+bug.o: $(hdrdir)/ruby/internal/abi.h
+bug.o: $(hdrdir)/ruby/internal/anyargs.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bug.o: $(hdrdir)/ruby/internal/assume.h
+bug.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bug.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bug.o: $(hdrdir)/ruby/internal/attr/cold.h
+bug.o: $(hdrdir)/ruby/internal/attr/const.h
+bug.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bug.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bug.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bug.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bug.o: $(hdrdir)/ruby/internal/attr/error.h
+bug.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bug.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/format.h
+bug.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bug.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bug.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bug.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bug.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bug.o: $(hdrdir)/ruby/internal/attr/pure.h
+bug.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bug.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/warning.h
+bug.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bug.o: $(hdrdir)/ruby/internal/cast.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bug.o: $(hdrdir)/ruby/internal/compiler_since.h
+bug.o: $(hdrdir)/ruby/internal/config.h
+bug.o: $(hdrdir)/ruby/internal/constant_p.h
+bug.o: $(hdrdir)/ruby/internal/core.h
+bug.o: $(hdrdir)/ruby/internal/core/rarray.h
+bug.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bug.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bug.o: $(hdrdir)/ruby/internal/core/rclass.h
+bug.o: $(hdrdir)/ruby/internal/core/rdata.h
+bug.o: $(hdrdir)/ruby/internal/core/rfile.h
+bug.o: $(hdrdir)/ruby/internal/core/rhash.h
+bug.o: $(hdrdir)/ruby/internal/core/robject.h
+bug.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bug.o: $(hdrdir)/ruby/internal/core/rstring.h
+bug.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bug.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bug.o: $(hdrdir)/ruby/internal/ctype.h
+bug.o: $(hdrdir)/ruby/internal/dllexport.h
+bug.o: $(hdrdir)/ruby/internal/dosish.h
+bug.o: $(hdrdir)/ruby/internal/error.h
+bug.o: $(hdrdir)/ruby/internal/eval.h
+bug.o: $(hdrdir)/ruby/internal/event.h
+bug.o: $(hdrdir)/ruby/internal/fl_type.h
+bug.o: $(hdrdir)/ruby/internal/gc.h
+bug.o: $(hdrdir)/ruby/internal/glob.h
+bug.o: $(hdrdir)/ruby/internal/globals.h
+bug.o: $(hdrdir)/ruby/internal/has/attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/builtin.h
+bug.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/extension.h
+bug.o: $(hdrdir)/ruby/internal/has/feature.h
+bug.o: $(hdrdir)/ruby/internal/has/warning.h
+bug.o: $(hdrdir)/ruby/internal/intern/array.h
+bug.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bug.o: $(hdrdir)/ruby/internal/intern/class.h
+bug.o: $(hdrdir)/ruby/internal/intern/compar.h
+bug.o: $(hdrdir)/ruby/internal/intern/complex.h
+bug.o: $(hdrdir)/ruby/internal/intern/cont.h
+bug.o: $(hdrdir)/ruby/internal/intern/dir.h
+bug.o: $(hdrdir)/ruby/internal/intern/enum.h
+bug.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bug.o: $(hdrdir)/ruby/internal/intern/error.h
+bug.o: $(hdrdir)/ruby/internal/intern/eval.h
+bug.o: $(hdrdir)/ruby/internal/intern/file.h
+bug.o: $(hdrdir)/ruby/internal/intern/gc.h
+bug.o: $(hdrdir)/ruby/internal/intern/hash.h
+bug.o: $(hdrdir)/ruby/internal/intern/io.h
+bug.o: $(hdrdir)/ruby/internal/intern/load.h
+bug.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bug.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bug.o: $(hdrdir)/ruby/internal/intern/object.h
+bug.o: $(hdrdir)/ruby/internal/intern/parse.h
+bug.o: $(hdrdir)/ruby/internal/intern/proc.h
+bug.o: $(hdrdir)/ruby/internal/intern/process.h
+bug.o: $(hdrdir)/ruby/internal/intern/random.h
+bug.o: $(hdrdir)/ruby/internal/intern/range.h
+bug.o: $(hdrdir)/ruby/internal/intern/rational.h
+bug.o: $(hdrdir)/ruby/internal/intern/re.h
+bug.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bug.o: $(hdrdir)/ruby/internal/intern/select.h
+bug.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bug.o: $(hdrdir)/ruby/internal/intern/signal.h
+bug.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bug.o: $(hdrdir)/ruby/internal/intern/string.h
+bug.o: $(hdrdir)/ruby/internal/intern/struct.h
+bug.o: $(hdrdir)/ruby/internal/intern/thread.h
+bug.o: $(hdrdir)/ruby/internal/intern/time.h
+bug.o: $(hdrdir)/ruby/internal/intern/variable.h
+bug.o: $(hdrdir)/ruby/internal/intern/vm.h
+bug.o: $(hdrdir)/ruby/internal/interpreter.h
+bug.o: $(hdrdir)/ruby/internal/iterator.h
+bug.o: $(hdrdir)/ruby/internal/memory.h
+bug.o: $(hdrdir)/ruby/internal/method.h
+bug.o: $(hdrdir)/ruby/internal/module.h
+bug.o: $(hdrdir)/ruby/internal/newobj.h
+bug.o: $(hdrdir)/ruby/internal/rgengc.h
+bug.o: $(hdrdir)/ruby/internal/scan_args.h
+bug.o: $(hdrdir)/ruby/internal/special_consts.h
+bug.o: $(hdrdir)/ruby/internal/static_assert.h
+bug.o: $(hdrdir)/ruby/internal/stdalign.h
+bug.o: $(hdrdir)/ruby/internal/stdbool.h
+bug.o: $(hdrdir)/ruby/internal/symbol.h
+bug.o: $(hdrdir)/ruby/internal/value.h
+bug.o: $(hdrdir)/ruby/internal/value_type.h
+bug.o: $(hdrdir)/ruby/internal/variable.h
+bug.o: $(hdrdir)/ruby/internal/warning_push.h
+bug.o: $(hdrdir)/ruby/internal/xmalloc.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug_reporter/depend b/ext/-test-/bug_reporter/depend
index 62bac03566..603dd53ebf 100644
--- a/ext/-test-/bug_reporter/depend
+++ b/ext/-test-/bug_reporter/depend
@@ -4,8 +4,156 @@ bug_reporter.o: $(arch_hdrdir)/ruby/config.h
bug_reporter.o: $(hdrdir)/ruby.h
bug_reporter.o: $(hdrdir)/ruby/assert.h
bug_reporter.o: $(hdrdir)/ruby/backward.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/assume.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/bool.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/limits.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdarg.h
bug_reporter.o: $(hdrdir)/ruby/defines.h
bug_reporter.o: $(hdrdir)/ruby/intern.h
+bug_reporter.o: $(hdrdir)/ruby/internal/abi.h
+bug_reporter.o: $(hdrdir)/ruby/internal/anyargs.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bug_reporter.o: $(hdrdir)/ruby/internal/assume.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/cold.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/const.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/error.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/format.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/pure.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/warning.h
+bug_reporter.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bug_reporter.o: $(hdrdir)/ruby/internal/cast.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bug_reporter.o: $(hdrdir)/ruby/internal/compiler_since.h
+bug_reporter.o: $(hdrdir)/ruby/internal/config.h
+bug_reporter.o: $(hdrdir)/ruby/internal/constant_p.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rarray.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rclass.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rdata.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rfile.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rhash.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/robject.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rstring.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bug_reporter.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bug_reporter.o: $(hdrdir)/ruby/internal/ctype.h
+bug_reporter.o: $(hdrdir)/ruby/internal/dllexport.h
+bug_reporter.o: $(hdrdir)/ruby/internal/dosish.h
+bug_reporter.o: $(hdrdir)/ruby/internal/error.h
+bug_reporter.o: $(hdrdir)/ruby/internal/eval.h
+bug_reporter.o: $(hdrdir)/ruby/internal/event.h
+bug_reporter.o: $(hdrdir)/ruby/internal/fl_type.h
+bug_reporter.o: $(hdrdir)/ruby/internal/gc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/glob.h
+bug_reporter.o: $(hdrdir)/ruby/internal/globals.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/attribute.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/builtin.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/extension.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/feature.h
+bug_reporter.o: $(hdrdir)/ruby/internal/has/warning.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/array.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/class.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/compar.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/complex.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/cont.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/dir.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/enum.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/error.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/eval.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/file.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/gc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/hash.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/io.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/load.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/object.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/parse.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/proc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/process.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/random.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/range.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/rational.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/re.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/select.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/signal.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/string.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/struct.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/thread.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/time.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/variable.h
+bug_reporter.o: $(hdrdir)/ruby/internal/intern/vm.h
+bug_reporter.o: $(hdrdir)/ruby/internal/interpreter.h
+bug_reporter.o: $(hdrdir)/ruby/internal/iterator.h
+bug_reporter.o: $(hdrdir)/ruby/internal/memory.h
+bug_reporter.o: $(hdrdir)/ruby/internal/method.h
+bug_reporter.o: $(hdrdir)/ruby/internal/module.h
+bug_reporter.o: $(hdrdir)/ruby/internal/newobj.h
+bug_reporter.o: $(hdrdir)/ruby/internal/rgengc.h
+bug_reporter.o: $(hdrdir)/ruby/internal/scan_args.h
+bug_reporter.o: $(hdrdir)/ruby/internal/special_consts.h
+bug_reporter.o: $(hdrdir)/ruby/internal/static_assert.h
+bug_reporter.o: $(hdrdir)/ruby/internal/stdalign.h
+bug_reporter.o: $(hdrdir)/ruby/internal/stdbool.h
+bug_reporter.o: $(hdrdir)/ruby/internal/symbol.h
+bug_reporter.o: $(hdrdir)/ruby/internal/value.h
+bug_reporter.o: $(hdrdir)/ruby/internal/value_type.h
+bug_reporter.o: $(hdrdir)/ruby/internal/variable.h
+bug_reporter.o: $(hdrdir)/ruby/internal/warning_push.h
+bug_reporter.o: $(hdrdir)/ruby/internal/xmalloc.h
bug_reporter.o: $(hdrdir)/ruby/missing.h
bug_reporter.o: $(hdrdir)/ruby/ruby.h
bug_reporter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/class/depend b/ext/-test-/class/depend
index 451256cc75..a615eacd74 100644
--- a/ext/-test-/class/depend
+++ b/ext/-test-/class/depend
@@ -3,8 +3,156 @@ class2name.o: $(RUBY_EXTCONF_H)
class2name.o: $(arch_hdrdir)/ruby/config.h
class2name.o: $(hdrdir)/ruby/assert.h
class2name.o: $(hdrdir)/ruby/backward.h
+class2name.o: $(hdrdir)/ruby/backward/2/assume.h
+class2name.o: $(hdrdir)/ruby/backward/2/attributes.h
+class2name.o: $(hdrdir)/ruby/backward/2/bool.h
+class2name.o: $(hdrdir)/ruby/backward/2/inttypes.h
+class2name.o: $(hdrdir)/ruby/backward/2/limits.h
+class2name.o: $(hdrdir)/ruby/backward/2/long_long.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdalign.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdarg.h
class2name.o: $(hdrdir)/ruby/defines.h
class2name.o: $(hdrdir)/ruby/intern.h
+class2name.o: $(hdrdir)/ruby/internal/abi.h
+class2name.o: $(hdrdir)/ruby/internal/anyargs.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+class2name.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+class2name.o: $(hdrdir)/ruby/internal/assume.h
+class2name.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+class2name.o: $(hdrdir)/ruby/internal/attr/artificial.h
+class2name.o: $(hdrdir)/ruby/internal/attr/cold.h
+class2name.o: $(hdrdir)/ruby/internal/attr/const.h
+class2name.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+class2name.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+class2name.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+class2name.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+class2name.o: $(hdrdir)/ruby/internal/attr/error.h
+class2name.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+class2name.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+class2name.o: $(hdrdir)/ruby/internal/attr/format.h
+class2name.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+class2name.o: $(hdrdir)/ruby/internal/attr/noalias.h
+class2name.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+class2name.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+class2name.o: $(hdrdir)/ruby/internal/attr/noinline.h
+class2name.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+class2name.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+class2name.o: $(hdrdir)/ruby/internal/attr/pure.h
+class2name.o: $(hdrdir)/ruby/internal/attr/restrict.h
+class2name.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+class2name.o: $(hdrdir)/ruby/internal/attr/warning.h
+class2name.o: $(hdrdir)/ruby/internal/attr/weakref.h
+class2name.o: $(hdrdir)/ruby/internal/cast.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+class2name.o: $(hdrdir)/ruby/internal/compiler_since.h
+class2name.o: $(hdrdir)/ruby/internal/config.h
+class2name.o: $(hdrdir)/ruby/internal/constant_p.h
+class2name.o: $(hdrdir)/ruby/internal/core.h
+class2name.o: $(hdrdir)/ruby/internal/core/rarray.h
+class2name.o: $(hdrdir)/ruby/internal/core/rbasic.h
+class2name.o: $(hdrdir)/ruby/internal/core/rbignum.h
+class2name.o: $(hdrdir)/ruby/internal/core/rclass.h
+class2name.o: $(hdrdir)/ruby/internal/core/rdata.h
+class2name.o: $(hdrdir)/ruby/internal/core/rfile.h
+class2name.o: $(hdrdir)/ruby/internal/core/rhash.h
+class2name.o: $(hdrdir)/ruby/internal/core/robject.h
+class2name.o: $(hdrdir)/ruby/internal/core/rregexp.h
+class2name.o: $(hdrdir)/ruby/internal/core/rstring.h
+class2name.o: $(hdrdir)/ruby/internal/core/rstruct.h
+class2name.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+class2name.o: $(hdrdir)/ruby/internal/ctype.h
+class2name.o: $(hdrdir)/ruby/internal/dllexport.h
+class2name.o: $(hdrdir)/ruby/internal/dosish.h
+class2name.o: $(hdrdir)/ruby/internal/error.h
+class2name.o: $(hdrdir)/ruby/internal/eval.h
+class2name.o: $(hdrdir)/ruby/internal/event.h
+class2name.o: $(hdrdir)/ruby/internal/fl_type.h
+class2name.o: $(hdrdir)/ruby/internal/gc.h
+class2name.o: $(hdrdir)/ruby/internal/glob.h
+class2name.o: $(hdrdir)/ruby/internal/globals.h
+class2name.o: $(hdrdir)/ruby/internal/has/attribute.h
+class2name.o: $(hdrdir)/ruby/internal/has/builtin.h
+class2name.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+class2name.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+class2name.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+class2name.o: $(hdrdir)/ruby/internal/has/extension.h
+class2name.o: $(hdrdir)/ruby/internal/has/feature.h
+class2name.o: $(hdrdir)/ruby/internal/has/warning.h
+class2name.o: $(hdrdir)/ruby/internal/intern/array.h
+class2name.o: $(hdrdir)/ruby/internal/intern/bignum.h
+class2name.o: $(hdrdir)/ruby/internal/intern/class.h
+class2name.o: $(hdrdir)/ruby/internal/intern/compar.h
+class2name.o: $(hdrdir)/ruby/internal/intern/complex.h
+class2name.o: $(hdrdir)/ruby/internal/intern/cont.h
+class2name.o: $(hdrdir)/ruby/internal/intern/dir.h
+class2name.o: $(hdrdir)/ruby/internal/intern/enum.h
+class2name.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+class2name.o: $(hdrdir)/ruby/internal/intern/error.h
+class2name.o: $(hdrdir)/ruby/internal/intern/eval.h
+class2name.o: $(hdrdir)/ruby/internal/intern/file.h
+class2name.o: $(hdrdir)/ruby/internal/intern/gc.h
+class2name.o: $(hdrdir)/ruby/internal/intern/hash.h
+class2name.o: $(hdrdir)/ruby/internal/intern/io.h
+class2name.o: $(hdrdir)/ruby/internal/intern/load.h
+class2name.o: $(hdrdir)/ruby/internal/intern/marshal.h
+class2name.o: $(hdrdir)/ruby/internal/intern/numeric.h
+class2name.o: $(hdrdir)/ruby/internal/intern/object.h
+class2name.o: $(hdrdir)/ruby/internal/intern/parse.h
+class2name.o: $(hdrdir)/ruby/internal/intern/proc.h
+class2name.o: $(hdrdir)/ruby/internal/intern/process.h
+class2name.o: $(hdrdir)/ruby/internal/intern/random.h
+class2name.o: $(hdrdir)/ruby/internal/intern/range.h
+class2name.o: $(hdrdir)/ruby/internal/intern/rational.h
+class2name.o: $(hdrdir)/ruby/internal/intern/re.h
+class2name.o: $(hdrdir)/ruby/internal/intern/ruby.h
+class2name.o: $(hdrdir)/ruby/internal/intern/select.h
+class2name.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+class2name.o: $(hdrdir)/ruby/internal/intern/signal.h
+class2name.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+class2name.o: $(hdrdir)/ruby/internal/intern/string.h
+class2name.o: $(hdrdir)/ruby/internal/intern/struct.h
+class2name.o: $(hdrdir)/ruby/internal/intern/thread.h
+class2name.o: $(hdrdir)/ruby/internal/intern/time.h
+class2name.o: $(hdrdir)/ruby/internal/intern/variable.h
+class2name.o: $(hdrdir)/ruby/internal/intern/vm.h
+class2name.o: $(hdrdir)/ruby/internal/interpreter.h
+class2name.o: $(hdrdir)/ruby/internal/iterator.h
+class2name.o: $(hdrdir)/ruby/internal/memory.h
+class2name.o: $(hdrdir)/ruby/internal/method.h
+class2name.o: $(hdrdir)/ruby/internal/module.h
+class2name.o: $(hdrdir)/ruby/internal/newobj.h
+class2name.o: $(hdrdir)/ruby/internal/rgengc.h
+class2name.o: $(hdrdir)/ruby/internal/scan_args.h
+class2name.o: $(hdrdir)/ruby/internal/special_consts.h
+class2name.o: $(hdrdir)/ruby/internal/static_assert.h
+class2name.o: $(hdrdir)/ruby/internal/stdalign.h
+class2name.o: $(hdrdir)/ruby/internal/stdbool.h
+class2name.o: $(hdrdir)/ruby/internal/symbol.h
+class2name.o: $(hdrdir)/ruby/internal/value.h
+class2name.o: $(hdrdir)/ruby/internal/value_type.h
+class2name.o: $(hdrdir)/ruby/internal/variable.h
+class2name.o: $(hdrdir)/ruby/internal/warning_push.h
+class2name.o: $(hdrdir)/ruby/internal/xmalloc.h
class2name.o: $(hdrdir)/ruby/missing.h
class2name.o: $(hdrdir)/ruby/ruby.h
class2name.o: $(hdrdir)/ruby/st.h
@@ -15,8 +163,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/cxxanyargs/cxxanyargs.cpp b/ext/-test-/cxxanyargs/cxxanyargs.cpp
index efe35fa359..eded13e2ee 100644
--- a/ext/-test-/cxxanyargs/cxxanyargs.cpp
+++ b/ext/-test-/cxxanyargs/cxxanyargs.cpp
@@ -5,12 +5,18 @@
#elif defined(_MSC_VER)
#pragma warning(disable : 4996)
+#elif defined(__INTEL_COMPILER)
+#pragma warning(disable : 1786)
+
#elif defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#elif defined(__SUNPRO_CC)
+#pragma error_messages (off,symdeprecated)
+
#else
// :FIXME: improve here for your compiler.
@@ -36,6 +42,18 @@ namespace test_rb_define_virtual_variable {
RUBY_METHOD_FUNC(getter),
reinterpret_cast<void(*)(ANYARGS)>(setter)); // old
rb_define_virtual_variable("test", getter, setter); // new
+
+#ifdef HAVE_NULLPTR
+ rb_define_virtual_variable("test", nullptr, reinterpret_cast<void(*)(ANYARGS)>(setter));
+ rb_define_virtual_variable("test", nullptr, setter);
+
+ rb_define_virtual_variable("test", RUBY_METHOD_FUNC(getter), nullptr);
+ rb_define_virtual_variable("test", getter, nullptr);
+
+ // It doesn't make any sense for both function pointers be nullptr at
+ // the same time.
+#endif
+
return self;
}
}
@@ -62,6 +80,18 @@ struct test_rb_define_hooked_variable {
RUBY_METHOD_FUNC(getter),
reinterpret_cast<void(*)(ANYARGS)>(setter)); // old
rb_define_hooked_variable("test", &v, getter, setter); // new
+
+#ifdef HAVE_NULLPTR
+ rb_define_hooked_variable("test", &v, nullptr, reinterpret_cast<void(*)(ANYARGS)>(setter));
+ rb_define_hooked_variable("test", &v, nullptr, setter);
+
+ rb_define_hooked_variable("test", &v, RUBY_METHOD_FUNC(getter), nullptr);
+ rb_define_hooked_variable("test", &v, getter, nullptr);
+
+ // It doesn't make any sense for both function pointers be nullptr at
+ // the same time.
+#endif
+
return self;
}
};
@@ -83,6 +113,10 @@ namespace test_rb_iterate {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ rb_iterate(iter, self, nullptr, self);
+#endif
+
rb_iterate(iter, self, RUBY_METHOD_FUNC(block), self); // old
return rb_iterate(iter, self, block, self); // new
}
@@ -100,6 +134,11 @@ namespace test_rb_block_call {
{
const ID mid = rb_intern("each");
const VALUE argv[] = { Qundef };
+
+#ifdef HAVE_NULLPTR
+ rb_block_call(self, mid, 0, argv, nullptr, self);
+#endif
+
rb_block_call(self, mid, 0, argv, RUBY_METHOD_FUNC(block), self); // old
return rb_block_call(self, mid, 0, argv, block, self); // new
}
@@ -121,6 +160,11 @@ namespace test_rb_rescue {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ rb_rescue(RUBY_METHOD_FUNC(begin), self, nullptr, self);
+ rb_rescue(begin, self, nullptr, self);
+#endif
+
rb_rescue(RUBY_METHOD_FUNC(begin), self, RUBY_METHOD_FUNC(rescue), self); // old
return rb_rescue(begin, self, rescue, self); // new
}
@@ -142,9 +186,14 @@ namespace test_rb_rescue2 {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ rb_rescue2(RUBY_METHOD_FUNC(begin), self, nullptr, self, rb_eStandardError, rb_eFatal, (VALUE)0);
+ rb_rescue2(begin, self, nullptr, self, rb_eStandardError, rb_eFatal, (VALUE)0);
+#endif
+
rb_rescue2(RUBY_METHOD_FUNC(begin), self, RUBY_METHOD_FUNC(rescue), self,
- rb_eStandardError, rb_eFatal, 0); // old
- return rb_rescue2(begin, self, rescue, self, rb_eStandardError, rb_eFatal, 0); // new
+ rb_eStandardError, rb_eFatal, (VALUE)0); // old
+ return rb_rescue2(begin, self, rescue, self, rb_eStandardError, rb_eFatal, (VALUE)0); // new
}
}
@@ -164,6 +213,11 @@ namespace test_rb_ensure {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ rb_ensure(RUBY_METHOD_FUNC(begin), self, nullptr, self);
+ rb_ensure(begin, self, nullptr, self);
+#endif
+
rb_ensure(RUBY_METHOD_FUNC(begin), self, RUBY_METHOD_FUNC(ensure), self); // old
return rb_ensure(begin, self, ensure, self); // new
}
@@ -180,6 +234,11 @@ namespace test_rb_catch {
test(VALUE self)
{
static const char *zero = 0;
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a catcher.
+#endif
+
rb_catch(zero, RUBY_METHOD_FUNC(catcher), self); // old
return rb_catch(zero, catcher, self); // new
}
@@ -195,6 +254,10 @@ namespace test_rb_catch_obj {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a catcher.
+#endif
+
rb_catch_obj(self, RUBY_METHOD_FUNC(catcher), self); // old
return rb_catch_obj(self, catcher, self); // new
}
@@ -210,6 +273,10 @@ namespace test_rb_fiber_new {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a fiber.
+#endif
+
rb_fiber_new(RUBY_METHOD_FUNC(fiber), self); // old
return rb_fiber_new(fiber, self); // new
}
@@ -225,6 +292,10 @@ namespace test_rb_proc_new {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a proc.
+#endif
+
rb_fiber_new(RUBY_METHOD_FUNC(proc), self); // old
return rb_fiber_new(proc, self); // new
}
@@ -244,6 +315,11 @@ struct test_rb_thread_create {
test(VALUE self)
{
v = self;
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a thread.
+#endif
+
rb_thread_create(RUBY_METHOD_FUNC(thread), &v); // old
return rb_thread_create(thread, &v); // new
}
@@ -262,6 +338,11 @@ namespace test_st_foreach {
{
st_data_t data = 0;
st_table *st = st_init_numtable();
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as an iterator.
+#endif
+
st_foreach(st, reinterpret_cast<int(*)(ANYARGS)>(iter), data); // old
st_foreach(st, iter, data); // new
return self;
@@ -280,6 +361,11 @@ namespace test_st_foreach_check {
{
st_data_t data = 0;
st_table *st = st_init_numtable();
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as an iterator.
+#endif
+
st_foreach_check(st, reinterpret_cast<int(*)(ANYARGS)>(iter), data, data); // old
st_foreach_check(st, iter, data, data); // new
return self;
@@ -298,6 +384,11 @@ namespace test_st_foreach_safe {
{
st_data_t data = 0;
st_table *st = st_init_numtable();
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as an iterator.
+#endif
+
st_foreach_safe(st, reinterpret_cast<int(*)(ANYARGS)>(iter), data); // old
st_foreach_safe(st, iter, data); // new
return self;
@@ -315,6 +406,11 @@ namespace test_rb_hash_foreach {
test(VALUE self)
{
VALUE h = rb_hash_new();
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as an iterator.
+#endif
+
rb_hash_foreach(h, reinterpret_cast<int(*)(ANYARGS)>(iter), self); // old
rb_hash_foreach(h, iter, self); // new
return self;
@@ -331,6 +427,10 @@ namespace test_rb_ivar_foreach {
VALUE
test(VALUE self)
{
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as an iterator.
+#endif
+
rb_ivar_foreach(self, reinterpret_cast<int(*)(ANYARGS)>(iter), self); // old
rb_ivar_foreach(self, iter, self); // new
return self;
@@ -362,6 +462,12 @@ namespace test_rb_define_method {
return Qnil;
}
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
VALUE
test(VALUE self)
{
@@ -370,18 +476,102 @@ namespace test_rb_define_method {
rb_define_method(self, "m2", m2, 2);
rb_define_method(self, "ma", ma, -2);
rb_define_method(self, "mv", mv, -1);
+ rb_define_method(self, "mc", mc, -1);
// Cast by RUBY_METHOD_FUNC
rb_define_method(self, "m1", RUBY_METHOD_FUNC(m1), 1);
rb_define_method(self, "m2", RUBY_METHOD_FUNC(m2), 2);
rb_define_method(self, "ma", RUBY_METHOD_FUNC(ma), -2);
rb_define_method(self, "mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_method(self, "mc", RUBY_METHOD_FUNC(mc), -1);
// Explicit cast instead of RUBY_METHOD_FUNC
rb_define_method(self, "m1", (VALUE (*)(...))(m1), 1);
rb_define_method(self, "m2", (VALUE (*)(...))(m2), 2);
rb_define_method(self, "ma", (VALUE (*)(...))(ma), -2);
rb_define_method(self, "mv", (VALUE (*)(...))(mv), -1);
+ rb_define_method(self, "mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_method(self, "m1", rb_f_notimplement, 1);
+ rb_define_method(self, "m2", rb_f_notimplement, 2);
+ rb_define_method(self, "ma", rb_f_notimplement, -2);
+ rb_define_method(self, "mv", rb_f_notimplement, -1);
+ rb_define_method(self, "mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
+
+ return self;
+ }
+}
+
+namespace test_rb_define_method_id {
+ static VALUE
+ m1(VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ m2(VALUE, VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ ma(VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ mv(int, VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
+ VALUE
+ test(VALUE self)
+ {
+ // No cast
+ rb_define_method_id(self, rb_intern("m1"), m1, 1);
+ rb_define_method_id(self, rb_intern("m2"), m2, 2);
+ rb_define_method_id(self, rb_intern("ma"), ma, -2);
+ rb_define_method_id(self, rb_intern("mv"), mv, -1);
+ rb_define_method_id(self, rb_intern("mc"), mc, -1);
+
+ // Cast by RUBY_METHOD_FUNC
+ rb_define_method_id(self, rb_intern("m1"), RUBY_METHOD_FUNC(m1), 1);
+ rb_define_method_id(self, rb_intern("m2"), RUBY_METHOD_FUNC(m2), 2);
+ rb_define_method_id(self, rb_intern("ma"), RUBY_METHOD_FUNC(ma), -2);
+ rb_define_method_id(self, rb_intern("mv"), RUBY_METHOD_FUNC(mv), -1);
+ rb_define_method_id(self, rb_intern("mc"), RUBY_METHOD_FUNC(mc), -1);
+
+ // Explicit cast instead of RUBY_METHOD_FUNC
+ rb_define_method_id(self, rb_intern("m1"), (VALUE (*)(...))(m1), 1);
+ rb_define_method_id(self, rb_intern("m2"), (VALUE (*)(...))(m2), 2);
+ rb_define_method_id(self, rb_intern("ma"), (VALUE (*)(...))(ma), -2);
+ rb_define_method_id(self, rb_intern("mv"), (VALUE (*)(...))(mv), -1);
+ rb_define_method_id(self, rb_intern("mc"), (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_method_id(self, rb_intern("m1"), rb_f_notimplement, 1);
+ rb_define_method_id(self, rb_intern("m2"), rb_f_notimplement, 2);
+ rb_define_method_id(self, rb_intern("ma"), rb_f_notimplement, -2);
+ rb_define_method_id(self, rb_intern("mv"), rb_f_notimplement, -1);
+ rb_define_method_id(self, rb_intern("mc"), rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
return self;
}
@@ -412,6 +602,12 @@ namespace test_rb_define_module_function {
return Qnil;
}
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
VALUE
test(VALUE self)
{
@@ -420,18 +616,32 @@ namespace test_rb_define_module_function {
rb_define_module_function(self, "m2", m2, 2);
rb_define_module_function(self, "ma", ma, -2);
rb_define_module_function(self, "mv", mv, -1);
+ rb_define_module_function(self, "mc", mc, -1);
// Cast by RUBY_METHOD_FUNC
rb_define_module_function(self, "m1", RUBY_METHOD_FUNC(m1), 1);
rb_define_module_function(self, "m2", RUBY_METHOD_FUNC(m2), 2);
rb_define_module_function(self, "ma", RUBY_METHOD_FUNC(ma), -2);
rb_define_module_function(self, "mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_module_function(self, "mc", RUBY_METHOD_FUNC(mc), -1);
// Explicit cast instead of RUBY_METHOD_FUNC
rb_define_module_function(self, "m1", (VALUE (*)(...))(m1), 1);
rb_define_module_function(self, "m2", (VALUE (*)(...))(m2), 2);
rb_define_module_function(self, "ma", (VALUE (*)(...))(ma), -2);
rb_define_module_function(self, "mv", (VALUE (*)(...))(mv), -1);
+ rb_define_module_function(self, "mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_module_function(self, "m1", rb_f_notimplement, 1);
+ rb_define_module_function(self, "m2", rb_f_notimplement, 2);
+ rb_define_module_function(self, "ma", rb_f_notimplement, -2);
+ rb_define_module_function(self, "mv", rb_f_notimplement, -1);
+ rb_define_module_function(self, "mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
return self;
}
@@ -462,6 +672,12 @@ namespace test_rb_define_singleton_method {
return Qnil;
}
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
VALUE
test(VALUE self)
{
@@ -470,18 +686,32 @@ namespace test_rb_define_singleton_method {
rb_define_singleton_method(self, "m2", m2, 2);
rb_define_singleton_method(self, "ma", ma, -2);
rb_define_singleton_method(self, "mv", mv, -1);
+ rb_define_singleton_method(self, "mc", mc, -1);
// Cast by RUBY_METHOD_FUNC
rb_define_singleton_method(self, "m1", RUBY_METHOD_FUNC(m1), 1);
rb_define_singleton_method(self, "m2", RUBY_METHOD_FUNC(m2), 2);
rb_define_singleton_method(self, "ma", RUBY_METHOD_FUNC(ma), -2);
rb_define_singleton_method(self, "mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_singleton_method(self, "mc", RUBY_METHOD_FUNC(mc), -1);
// Explicit cast instead of RUBY_METHOD_FUNC
rb_define_singleton_method(self, "m1", (VALUE (*)(...))(m1), 1);
rb_define_singleton_method(self, "m2", (VALUE (*)(...))(m2), 2);
rb_define_singleton_method(self, "ma", (VALUE (*)(...))(ma), -2);
rb_define_singleton_method(self, "mv", (VALUE (*)(...))(mv), -1);
+ rb_define_singleton_method(self, "mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_singleton_method(self, "m1", rb_f_notimplement, 1);
+ rb_define_singleton_method(self, "m2", rb_f_notimplement, 2);
+ rb_define_singleton_method(self, "ma", rb_f_notimplement, -2);
+ rb_define_singleton_method(self, "mv", rb_f_notimplement, -1);
+ rb_define_singleton_method(self, "mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
return self;
}
@@ -512,6 +742,12 @@ namespace test_rb_define_protected_method {
return Qnil;
}
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
VALUE
test(VALUE self)
{
@@ -520,18 +756,32 @@ namespace test_rb_define_protected_method {
rb_define_protected_method(self, "m2", m2, 2);
rb_define_protected_method(self, "ma", ma, -2);
rb_define_protected_method(self, "mv", mv, -1);
+ rb_define_protected_method(self, "mc", mc, -1);
// Cast by RUBY_METHOD_FUNC
rb_define_protected_method(self, "m1", RUBY_METHOD_FUNC(m1), 1);
rb_define_protected_method(self, "m2", RUBY_METHOD_FUNC(m2), 2);
rb_define_protected_method(self, "ma", RUBY_METHOD_FUNC(ma), -2);
rb_define_protected_method(self, "mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_protected_method(self, "mc", RUBY_METHOD_FUNC(mc), -1);
// Explicit cast instead of RUBY_METHOD_FUNC
rb_define_protected_method(self, "m1", (VALUE (*)(...))(m1), 1);
rb_define_protected_method(self, "m2", (VALUE (*)(...))(m2), 2);
rb_define_protected_method(self, "ma", (VALUE (*)(...))(ma), -2);
rb_define_protected_method(self, "mv", (VALUE (*)(...))(mv), -1);
+ rb_define_protected_method(self, "mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_protected_method(self, "m1", rb_f_notimplement, 1);
+ rb_define_protected_method(self, "m2", rb_f_notimplement, 2);
+ rb_define_protected_method(self, "ma", rb_f_notimplement, -2);
+ rb_define_protected_method(self, "mv", rb_f_notimplement, -1);
+ rb_define_protected_method(self, "mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
return self;
}
@@ -562,6 +812,12 @@ namespace test_rb_define_private_method {
return Qnil;
}
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
VALUE
test(VALUE self)
{
@@ -570,18 +826,102 @@ namespace test_rb_define_private_method {
rb_define_private_method(self, "m2", m2, 2);
rb_define_private_method(self, "ma", ma, -2);
rb_define_private_method(self, "mv", mv, -1);
+ rb_define_private_method(self, "mc", mc, -1);
// Cast by RUBY_METHOD_FUNC
rb_define_private_method(self, "m1", RUBY_METHOD_FUNC(m1), 1);
rb_define_private_method(self, "m2", RUBY_METHOD_FUNC(m2), 2);
rb_define_private_method(self, "ma", RUBY_METHOD_FUNC(ma), -2);
rb_define_private_method(self, "mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_private_method(self, "mc", RUBY_METHOD_FUNC(mc), -1);
// Explicit cast instead of RUBY_METHOD_FUNC
rb_define_private_method(self, "m1", (VALUE (*)(...))(m1), 1);
rb_define_private_method(self, "m2", (VALUE (*)(...))(m2), 2);
rb_define_private_method(self, "ma", (VALUE (*)(...))(ma), -2);
rb_define_private_method(self, "mv", (VALUE (*)(...))(mv), -1);
+ rb_define_private_method(self, "mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_private_method(self, "m1", rb_f_notimplement, 1);
+ rb_define_private_method(self, "m2", rb_f_notimplement, 2);
+ rb_define_private_method(self, "ma", rb_f_notimplement, -2);
+ rb_define_private_method(self, "mv", rb_f_notimplement, -1);
+ rb_define_private_method(self, "mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
+
+ return self;
+ }
+}
+
+namespace test_rb_define_global_function {
+ static VALUE
+ m1(VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ m2(VALUE, VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ ma(VALUE, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ mv(int, VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
+ static VALUE
+ mc(int, const VALUE*, VALUE)
+ {
+ return Qnil;
+ }
+
+ VALUE
+ test(VALUE self)
+ {
+ // No cast
+ rb_define_global_function("m1", m1, 1);
+ rb_define_global_function("m2", m2, 2);
+ rb_define_global_function("ma", ma, -2);
+ rb_define_global_function("mv", mv, -1);
+ rb_define_global_function("mc", mc, -1);
+
+ // Cast by RUBY_METHOD_FUNC
+ rb_define_global_function("m1", RUBY_METHOD_FUNC(m1), 1);
+ rb_define_global_function("m2", RUBY_METHOD_FUNC(m2), 2);
+ rb_define_global_function("ma", RUBY_METHOD_FUNC(ma), -2);
+ rb_define_global_function("mv", RUBY_METHOD_FUNC(mv), -1);
+ rb_define_global_function("mc", RUBY_METHOD_FUNC(mc), -1);
+
+ // Explicit cast instead of RUBY_METHOD_FUNC
+ rb_define_global_function("m1", (VALUE (*)(...))(m1), 1);
+ rb_define_global_function("m2", (VALUE (*)(...))(m2), 2);
+ rb_define_global_function("ma", (VALUE (*)(...))(ma), -2);
+ rb_define_global_function("mv", (VALUE (*)(...))(mv), -1);
+ rb_define_global_function("mc", (VALUE (*)(...))(mc), -1);
+
+ // rb_f_notimplement
+ rb_define_global_function("m1", rb_f_notimplement, 1);
+ rb_define_global_function("m2", rb_f_notimplement, 2);
+ rb_define_global_function("ma", rb_f_notimplement, -2);
+ rb_define_global_function("mv", rb_f_notimplement, -1);
+ rb_define_global_function("mc", rb_f_notimplement, -1);
+
+#ifdef HAVE_NULLPTR
+ // It doesn't make any sense at all to pass nullptr as a method.
+#endif
return self;
}
@@ -612,8 +952,10 @@ Init_cxxanyargs(void)
test(rb_hash_foreach);
test(rb_ivar_foreach);
test(rb_define_method);
+ test(rb_define_method_id);
test(rb_define_module_function);
test(rb_define_singleton_method);
test(rb_define_protected_method);
test(rb_define_private_method);
+ test(rb_define_global_function);
}
diff --git a/ext/-test-/cxxanyargs/depend b/ext/-test-/cxxanyargs/depend
index 02113b6c26..fc3d8e45d9 100644
--- a/ext/-test-/cxxanyargs/depend
+++ b/ext/-test-/cxxanyargs/depend
@@ -6,20 +6,8 @@ $(TARGET_SO) $(STATIC_LIB): $(FAILURES:.cpp=.failed)
$(Q)$(RUBY) -rfileutils \
-e "t = ARGV.shift" \
-e "err = IO.popen(ARGV, err:[:child, :out], &:read)" \
- -e "abort err unless /rb_define_method/ =~ err" \
+ -e "abort err unless /rb_define_method/ =~ err.b" \
-e "File.write(t, err)" $@ $(MAKE) $(*F).o
# AUTOGENERATED DEPENDENCIES START
-cxxanyargs.o: $(RUBY_EXTCONF_H)
-cxxanyargs.o: $(arch_hdrdir)/ruby/config.h
-cxxanyargs.o: $(hdrdir)/ruby/assert.h
-cxxanyargs.o: $(hdrdir)/ruby/backward.h
-cxxanyargs.o: $(hdrdir)/ruby/backward/cxxanyargs.hpp
-cxxanyargs.o: $(hdrdir)/ruby/defines.h
-cxxanyargs.o: $(hdrdir)/ruby/intern.h
-cxxanyargs.o: $(hdrdir)/ruby/missing.h
-cxxanyargs.o: $(hdrdir)/ruby/ruby.h
-cxxanyargs.o: $(hdrdir)/ruby/st.h
-cxxanyargs.o: $(hdrdir)/ruby/subst.h
-cxxanyargs.o: cxxanyargs.cpp
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/cxxanyargs/extconf.rb b/ext/-test-/cxxanyargs/extconf.rb
index d2a740b989..9749f42068 100644
--- a/ext/-test-/cxxanyargs/extconf.rb
+++ b/ext/-test-/cxxanyargs/extconf.rb
@@ -2,12 +2,23 @@
cxx = MakeMakefile["C++"]
-ok = cxx.try_compile(<<~'begin', "") do |x|
+# #### have_devel hack ####
+# cxx.try_compile tries to detect compilers, but the try_compile below is
+# trying to detect a compiler in a different way. We need to prevent the
+# default detection routine.
+
+cxx.instance_variable_set(:'@have_devel', true)
+
+ok = cxx.try_link(<<~'begin', "") do |x|
#include "ruby/config.h"
+ #ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
+ # include RUBY_ALTERNATIVE_MALLOC_HEADER
+ #endif
+
namespace {
- typedef int conftest[SIZEOF_LONG == sizeof(long) ? 1 : -1];
- typedef int conftest[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
+ typedef int conftest1[SIZEOF_LONG == sizeof(long) ? 1 : -1];
+ typedef int conftest2[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
}
int
@@ -21,11 +32,15 @@ begin
x.sub! %<#include "ruby.h">, ''
end
+cxx.instance_variable_set(:'@have_devel', ok)
+
if ok
$srcs = %w[cxxanyargs.cpp]
failures = Dir.glob($srcdir + "/failure*.cpp").map {|n| File.basename(n)}
$cleanfiles << "$(FAILURES:.cpp=.failed)"
create_makefile("-test-/cxxanyargs") do |mk|
mk << "FAILURES #{['=', failures].join(' ')}\n"
+ mk << ".IGNORE: $(FAILURES:.cpp=.o)\n" unless $mswin
+ mk
end
end
diff --git a/ext/-test-/debug/depend b/ext/-test-/debug/depend
index 662ed87510..c3a0c278aa 100644
--- a/ext/-test-/debug/depend
+++ b/ext/-test-/debug/depend
@@ -4,8 +4,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -15,9 +163,157 @@ inspector.o: $(RUBY_EXTCONF_H)
inspector.o: $(arch_hdrdir)/ruby/config.h
inspector.o: $(hdrdir)/ruby/assert.h
inspector.o: $(hdrdir)/ruby/backward.h
+inspector.o: $(hdrdir)/ruby/backward/2/assume.h
+inspector.o: $(hdrdir)/ruby/backward/2/attributes.h
+inspector.o: $(hdrdir)/ruby/backward/2/bool.h
+inspector.o: $(hdrdir)/ruby/backward/2/inttypes.h
+inspector.o: $(hdrdir)/ruby/backward/2/limits.h
+inspector.o: $(hdrdir)/ruby/backward/2/long_long.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdalign.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdarg.h
inspector.o: $(hdrdir)/ruby/debug.h
inspector.o: $(hdrdir)/ruby/defines.h
inspector.o: $(hdrdir)/ruby/intern.h
+inspector.o: $(hdrdir)/ruby/internal/abi.h
+inspector.o: $(hdrdir)/ruby/internal/anyargs.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+inspector.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+inspector.o: $(hdrdir)/ruby/internal/assume.h
+inspector.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+inspector.o: $(hdrdir)/ruby/internal/attr/artificial.h
+inspector.o: $(hdrdir)/ruby/internal/attr/cold.h
+inspector.o: $(hdrdir)/ruby/internal/attr/const.h
+inspector.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+inspector.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+inspector.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+inspector.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+inspector.o: $(hdrdir)/ruby/internal/attr/error.h
+inspector.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+inspector.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+inspector.o: $(hdrdir)/ruby/internal/attr/format.h
+inspector.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+inspector.o: $(hdrdir)/ruby/internal/attr/noalias.h
+inspector.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+inspector.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+inspector.o: $(hdrdir)/ruby/internal/attr/noinline.h
+inspector.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+inspector.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+inspector.o: $(hdrdir)/ruby/internal/attr/pure.h
+inspector.o: $(hdrdir)/ruby/internal/attr/restrict.h
+inspector.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+inspector.o: $(hdrdir)/ruby/internal/attr/warning.h
+inspector.o: $(hdrdir)/ruby/internal/attr/weakref.h
+inspector.o: $(hdrdir)/ruby/internal/cast.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+inspector.o: $(hdrdir)/ruby/internal/compiler_since.h
+inspector.o: $(hdrdir)/ruby/internal/config.h
+inspector.o: $(hdrdir)/ruby/internal/constant_p.h
+inspector.o: $(hdrdir)/ruby/internal/core.h
+inspector.o: $(hdrdir)/ruby/internal/core/rarray.h
+inspector.o: $(hdrdir)/ruby/internal/core/rbasic.h
+inspector.o: $(hdrdir)/ruby/internal/core/rbignum.h
+inspector.o: $(hdrdir)/ruby/internal/core/rclass.h
+inspector.o: $(hdrdir)/ruby/internal/core/rdata.h
+inspector.o: $(hdrdir)/ruby/internal/core/rfile.h
+inspector.o: $(hdrdir)/ruby/internal/core/rhash.h
+inspector.o: $(hdrdir)/ruby/internal/core/robject.h
+inspector.o: $(hdrdir)/ruby/internal/core/rregexp.h
+inspector.o: $(hdrdir)/ruby/internal/core/rstring.h
+inspector.o: $(hdrdir)/ruby/internal/core/rstruct.h
+inspector.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+inspector.o: $(hdrdir)/ruby/internal/ctype.h
+inspector.o: $(hdrdir)/ruby/internal/dllexport.h
+inspector.o: $(hdrdir)/ruby/internal/dosish.h
+inspector.o: $(hdrdir)/ruby/internal/error.h
+inspector.o: $(hdrdir)/ruby/internal/eval.h
+inspector.o: $(hdrdir)/ruby/internal/event.h
+inspector.o: $(hdrdir)/ruby/internal/fl_type.h
+inspector.o: $(hdrdir)/ruby/internal/gc.h
+inspector.o: $(hdrdir)/ruby/internal/glob.h
+inspector.o: $(hdrdir)/ruby/internal/globals.h
+inspector.o: $(hdrdir)/ruby/internal/has/attribute.h
+inspector.o: $(hdrdir)/ruby/internal/has/builtin.h
+inspector.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+inspector.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+inspector.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+inspector.o: $(hdrdir)/ruby/internal/has/extension.h
+inspector.o: $(hdrdir)/ruby/internal/has/feature.h
+inspector.o: $(hdrdir)/ruby/internal/has/warning.h
+inspector.o: $(hdrdir)/ruby/internal/intern/array.h
+inspector.o: $(hdrdir)/ruby/internal/intern/bignum.h
+inspector.o: $(hdrdir)/ruby/internal/intern/class.h
+inspector.o: $(hdrdir)/ruby/internal/intern/compar.h
+inspector.o: $(hdrdir)/ruby/internal/intern/complex.h
+inspector.o: $(hdrdir)/ruby/internal/intern/cont.h
+inspector.o: $(hdrdir)/ruby/internal/intern/dir.h
+inspector.o: $(hdrdir)/ruby/internal/intern/enum.h
+inspector.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+inspector.o: $(hdrdir)/ruby/internal/intern/error.h
+inspector.o: $(hdrdir)/ruby/internal/intern/eval.h
+inspector.o: $(hdrdir)/ruby/internal/intern/file.h
+inspector.o: $(hdrdir)/ruby/internal/intern/gc.h
+inspector.o: $(hdrdir)/ruby/internal/intern/hash.h
+inspector.o: $(hdrdir)/ruby/internal/intern/io.h
+inspector.o: $(hdrdir)/ruby/internal/intern/load.h
+inspector.o: $(hdrdir)/ruby/internal/intern/marshal.h
+inspector.o: $(hdrdir)/ruby/internal/intern/numeric.h
+inspector.o: $(hdrdir)/ruby/internal/intern/object.h
+inspector.o: $(hdrdir)/ruby/internal/intern/parse.h
+inspector.o: $(hdrdir)/ruby/internal/intern/proc.h
+inspector.o: $(hdrdir)/ruby/internal/intern/process.h
+inspector.o: $(hdrdir)/ruby/internal/intern/random.h
+inspector.o: $(hdrdir)/ruby/internal/intern/range.h
+inspector.o: $(hdrdir)/ruby/internal/intern/rational.h
+inspector.o: $(hdrdir)/ruby/internal/intern/re.h
+inspector.o: $(hdrdir)/ruby/internal/intern/ruby.h
+inspector.o: $(hdrdir)/ruby/internal/intern/select.h
+inspector.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+inspector.o: $(hdrdir)/ruby/internal/intern/signal.h
+inspector.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+inspector.o: $(hdrdir)/ruby/internal/intern/string.h
+inspector.o: $(hdrdir)/ruby/internal/intern/struct.h
+inspector.o: $(hdrdir)/ruby/internal/intern/thread.h
+inspector.o: $(hdrdir)/ruby/internal/intern/time.h
+inspector.o: $(hdrdir)/ruby/internal/intern/variable.h
+inspector.o: $(hdrdir)/ruby/internal/intern/vm.h
+inspector.o: $(hdrdir)/ruby/internal/interpreter.h
+inspector.o: $(hdrdir)/ruby/internal/iterator.h
+inspector.o: $(hdrdir)/ruby/internal/memory.h
+inspector.o: $(hdrdir)/ruby/internal/method.h
+inspector.o: $(hdrdir)/ruby/internal/module.h
+inspector.o: $(hdrdir)/ruby/internal/newobj.h
+inspector.o: $(hdrdir)/ruby/internal/rgengc.h
+inspector.o: $(hdrdir)/ruby/internal/scan_args.h
+inspector.o: $(hdrdir)/ruby/internal/special_consts.h
+inspector.o: $(hdrdir)/ruby/internal/static_assert.h
+inspector.o: $(hdrdir)/ruby/internal/stdalign.h
+inspector.o: $(hdrdir)/ruby/internal/stdbool.h
+inspector.o: $(hdrdir)/ruby/internal/symbol.h
+inspector.o: $(hdrdir)/ruby/internal/value.h
+inspector.o: $(hdrdir)/ruby/internal/value_type.h
+inspector.o: $(hdrdir)/ruby/internal/variable.h
+inspector.o: $(hdrdir)/ruby/internal/warning_push.h
+inspector.o: $(hdrdir)/ruby/internal/xmalloc.h
inspector.o: $(hdrdir)/ruby/missing.h
inspector.o: $(hdrdir)/ruby/ruby.h
inspector.o: $(hdrdir)/ruby/st.h
@@ -27,9 +323,157 @@ profile_frames.o: $(RUBY_EXTCONF_H)
profile_frames.o: $(arch_hdrdir)/ruby/config.h
profile_frames.o: $(hdrdir)/ruby/assert.h
profile_frames.o: $(hdrdir)/ruby/backward.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/assume.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/attributes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/bool.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/inttypes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/limits.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/long_long.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdalign.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdarg.h
profile_frames.o: $(hdrdir)/ruby/debug.h
profile_frames.o: $(hdrdir)/ruby/defines.h
profile_frames.o: $(hdrdir)/ruby/intern.h
+profile_frames.o: $(hdrdir)/ruby/internal/abi.h
+profile_frames.o: $(hdrdir)/ruby/internal/anyargs.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+profile_frames.o: $(hdrdir)/ruby/internal/assume.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/artificial.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/cold.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/const.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/error.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/format.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/noalias.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/noinline.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/pure.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/restrict.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/warning.h
+profile_frames.o: $(hdrdir)/ruby/internal/attr/weakref.h
+profile_frames.o: $(hdrdir)/ruby/internal/cast.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+profile_frames.o: $(hdrdir)/ruby/internal/compiler_since.h
+profile_frames.o: $(hdrdir)/ruby/internal/config.h
+profile_frames.o: $(hdrdir)/ruby/internal/constant_p.h
+profile_frames.o: $(hdrdir)/ruby/internal/core.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rarray.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rbasic.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rbignum.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rclass.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rdata.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rfile.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rhash.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/robject.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rregexp.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rstring.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rstruct.h
+profile_frames.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+profile_frames.o: $(hdrdir)/ruby/internal/ctype.h
+profile_frames.o: $(hdrdir)/ruby/internal/dllexport.h
+profile_frames.o: $(hdrdir)/ruby/internal/dosish.h
+profile_frames.o: $(hdrdir)/ruby/internal/error.h
+profile_frames.o: $(hdrdir)/ruby/internal/eval.h
+profile_frames.o: $(hdrdir)/ruby/internal/event.h
+profile_frames.o: $(hdrdir)/ruby/internal/fl_type.h
+profile_frames.o: $(hdrdir)/ruby/internal/gc.h
+profile_frames.o: $(hdrdir)/ruby/internal/glob.h
+profile_frames.o: $(hdrdir)/ruby/internal/globals.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/attribute.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/builtin.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/extension.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/feature.h
+profile_frames.o: $(hdrdir)/ruby/internal/has/warning.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/array.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/bignum.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/class.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/compar.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/complex.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/cont.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/dir.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/enum.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/error.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/eval.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/file.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/gc.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/hash.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/io.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/load.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/marshal.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/numeric.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/object.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/parse.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/proc.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/process.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/random.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/range.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/rational.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/re.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/ruby.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/select.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/signal.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/string.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/struct.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/thread.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/time.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/variable.h
+profile_frames.o: $(hdrdir)/ruby/internal/intern/vm.h
+profile_frames.o: $(hdrdir)/ruby/internal/interpreter.h
+profile_frames.o: $(hdrdir)/ruby/internal/iterator.h
+profile_frames.o: $(hdrdir)/ruby/internal/memory.h
+profile_frames.o: $(hdrdir)/ruby/internal/method.h
+profile_frames.o: $(hdrdir)/ruby/internal/module.h
+profile_frames.o: $(hdrdir)/ruby/internal/newobj.h
+profile_frames.o: $(hdrdir)/ruby/internal/rgengc.h
+profile_frames.o: $(hdrdir)/ruby/internal/scan_args.h
+profile_frames.o: $(hdrdir)/ruby/internal/special_consts.h
+profile_frames.o: $(hdrdir)/ruby/internal/static_assert.h
+profile_frames.o: $(hdrdir)/ruby/internal/stdalign.h
+profile_frames.o: $(hdrdir)/ruby/internal/stdbool.h
+profile_frames.o: $(hdrdir)/ruby/internal/symbol.h
+profile_frames.o: $(hdrdir)/ruby/internal/value.h
+profile_frames.o: $(hdrdir)/ruby/internal/value_type.h
+profile_frames.o: $(hdrdir)/ruby/internal/variable.h
+profile_frames.o: $(hdrdir)/ruby/internal/warning_push.h
+profile_frames.o: $(hdrdir)/ruby/internal/xmalloc.h
profile_frames.o: $(hdrdir)/ruby/missing.h
profile_frames.o: $(hdrdir)/ruby/ruby.h
profile_frames.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/debug/inspector.c b/ext/-test-/debug/inspector.c
index f0c58e59f9..25f9d894d3 100644
--- a/ext/-test-/debug/inspector.c
+++ b/ext/-test-/debug/inspector.c
@@ -8,13 +8,13 @@ callback(const rb_debug_inspector_t *dbg_context, void *data)
long i, len = RARRAY_LEN(locs);
VALUE binds = rb_ary_new();
for (i = 0; i < len; ++i) {
- VALUE entry = rb_ary_new();
- rb_ary_push(binds, entry);
- rb_ary_push(entry, rb_debug_inspector_frame_self_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_binding_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_class_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_iseq_get(dbg_context, i));
- rb_ary_push(entry, rb_ary_entry(locs, i));
+ VALUE entry = rb_ary_new();
+ rb_ary_push(binds, entry);
+ rb_ary_push(entry, rb_debug_inspector_frame_self_get(dbg_context, i));
+ rb_ary_push(entry, rb_debug_inspector_frame_binding_get(dbg_context, i));
+ rb_ary_push(entry, rb_debug_inspector_frame_class_get(dbg_context, i));
+ rb_ary_push(entry, rb_debug_inspector_frame_iseq_get(dbg_context, i));
+ rb_ary_push(entry, rb_ary_entry(locs, i));
}
return binds;
}
diff --git a/ext/-test-/debug/profile_frames.c b/ext/-test-/debug/profile_frames.c
index 1656ff7d4b..d2bba7d183 100644
--- a/ext/-test-/debug/profile_frames.c
+++ b/ext/-test-/debug/profile_frames.c
@@ -18,19 +18,20 @@ profile_frames(VALUE self, VALUE start_v, VALUE num_v)
collected_size = rb_profile_frames(start, buff_size, buff, lines);
for (i=0; i<collected_size; i++) {
- VALUE ary = rb_ary_new();
- rb_ary_push(ary, rb_profile_frame_path(buff[i]));
- rb_ary_push(ary, rb_profile_frame_absolute_path(buff[i]));
- rb_ary_push(ary, rb_profile_frame_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_base_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_full_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_first_lineno(buff[i]));
- rb_ary_push(ary, rb_profile_frame_classpath(buff[i]));
- rb_ary_push(ary, rb_profile_frame_singleton_method_p(buff[i]));
- rb_ary_push(ary, rb_profile_frame_method_name(buff[i]));
- rb_ary_push(ary, rb_profile_frame_qualified_method_name(buff[i]));
-
- rb_ary_push(result, ary);
+ VALUE ary = rb_ary_new();
+ rb_ary_push(ary, rb_profile_frame_path(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_absolute_path(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_label(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_base_label(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_full_label(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_first_lineno(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_classpath(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_singleton_method_p(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_method_name(buff[i]));
+ rb_ary_push(ary, rb_profile_frame_qualified_method_name(buff[i]));
+ rb_ary_push(ary, INT2NUM(lines[i]));
+
+ rb_ary_push(result, ary);
}
return result;
diff --git a/ext/-test-/dln/empty/depend b/ext/-test-/dln/empty/depend
index 99151fa055..e16082a7dc 100644
--- a/ext/-test-/dln/empty/depend
+++ b/ext/-test-/dln/empty/depend
@@ -1,3 +1,162 @@
# AUTOGENERATED DEPENDENCIES START
+empty.o: $(RUBY_EXTCONF_H)
+empty.o: $(arch_hdrdir)/ruby/config.h
+empty.o: $(hdrdir)/ruby.h
+empty.o: $(hdrdir)/ruby/assert.h
+empty.o: $(hdrdir)/ruby/backward.h
+empty.o: $(hdrdir)/ruby/backward/2/assume.h
+empty.o: $(hdrdir)/ruby/backward/2/attributes.h
+empty.o: $(hdrdir)/ruby/backward/2/bool.h
+empty.o: $(hdrdir)/ruby/backward/2/inttypes.h
+empty.o: $(hdrdir)/ruby/backward/2/limits.h
+empty.o: $(hdrdir)/ruby/backward/2/long_long.h
+empty.o: $(hdrdir)/ruby/backward/2/stdalign.h
+empty.o: $(hdrdir)/ruby/backward/2/stdarg.h
+empty.o: $(hdrdir)/ruby/defines.h
+empty.o: $(hdrdir)/ruby/intern.h
+empty.o: $(hdrdir)/ruby/internal/abi.h
+empty.o: $(hdrdir)/ruby/internal/anyargs.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+empty.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+empty.o: $(hdrdir)/ruby/internal/assume.h
+empty.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+empty.o: $(hdrdir)/ruby/internal/attr/artificial.h
+empty.o: $(hdrdir)/ruby/internal/attr/cold.h
+empty.o: $(hdrdir)/ruby/internal/attr/const.h
+empty.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+empty.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+empty.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+empty.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+empty.o: $(hdrdir)/ruby/internal/attr/error.h
+empty.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+empty.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+empty.o: $(hdrdir)/ruby/internal/attr/format.h
+empty.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+empty.o: $(hdrdir)/ruby/internal/attr/noalias.h
+empty.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+empty.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+empty.o: $(hdrdir)/ruby/internal/attr/noinline.h
+empty.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+empty.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+empty.o: $(hdrdir)/ruby/internal/attr/pure.h
+empty.o: $(hdrdir)/ruby/internal/attr/restrict.h
+empty.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+empty.o: $(hdrdir)/ruby/internal/attr/warning.h
+empty.o: $(hdrdir)/ruby/internal/attr/weakref.h
+empty.o: $(hdrdir)/ruby/internal/cast.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+empty.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+empty.o: $(hdrdir)/ruby/internal/compiler_since.h
+empty.o: $(hdrdir)/ruby/internal/config.h
+empty.o: $(hdrdir)/ruby/internal/constant_p.h
+empty.o: $(hdrdir)/ruby/internal/core.h
+empty.o: $(hdrdir)/ruby/internal/core/rarray.h
+empty.o: $(hdrdir)/ruby/internal/core/rbasic.h
+empty.o: $(hdrdir)/ruby/internal/core/rbignum.h
+empty.o: $(hdrdir)/ruby/internal/core/rclass.h
+empty.o: $(hdrdir)/ruby/internal/core/rdata.h
+empty.o: $(hdrdir)/ruby/internal/core/rfile.h
+empty.o: $(hdrdir)/ruby/internal/core/rhash.h
+empty.o: $(hdrdir)/ruby/internal/core/robject.h
+empty.o: $(hdrdir)/ruby/internal/core/rregexp.h
+empty.o: $(hdrdir)/ruby/internal/core/rstring.h
+empty.o: $(hdrdir)/ruby/internal/core/rstruct.h
+empty.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+empty.o: $(hdrdir)/ruby/internal/ctype.h
+empty.o: $(hdrdir)/ruby/internal/dllexport.h
+empty.o: $(hdrdir)/ruby/internal/dosish.h
+empty.o: $(hdrdir)/ruby/internal/error.h
+empty.o: $(hdrdir)/ruby/internal/eval.h
+empty.o: $(hdrdir)/ruby/internal/event.h
+empty.o: $(hdrdir)/ruby/internal/fl_type.h
+empty.o: $(hdrdir)/ruby/internal/gc.h
+empty.o: $(hdrdir)/ruby/internal/glob.h
+empty.o: $(hdrdir)/ruby/internal/globals.h
+empty.o: $(hdrdir)/ruby/internal/has/attribute.h
+empty.o: $(hdrdir)/ruby/internal/has/builtin.h
+empty.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+empty.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+empty.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+empty.o: $(hdrdir)/ruby/internal/has/extension.h
+empty.o: $(hdrdir)/ruby/internal/has/feature.h
+empty.o: $(hdrdir)/ruby/internal/has/warning.h
+empty.o: $(hdrdir)/ruby/internal/intern/array.h
+empty.o: $(hdrdir)/ruby/internal/intern/bignum.h
+empty.o: $(hdrdir)/ruby/internal/intern/class.h
+empty.o: $(hdrdir)/ruby/internal/intern/compar.h
+empty.o: $(hdrdir)/ruby/internal/intern/complex.h
+empty.o: $(hdrdir)/ruby/internal/intern/cont.h
+empty.o: $(hdrdir)/ruby/internal/intern/dir.h
+empty.o: $(hdrdir)/ruby/internal/intern/enum.h
+empty.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+empty.o: $(hdrdir)/ruby/internal/intern/error.h
+empty.o: $(hdrdir)/ruby/internal/intern/eval.h
+empty.o: $(hdrdir)/ruby/internal/intern/file.h
+empty.o: $(hdrdir)/ruby/internal/intern/gc.h
+empty.o: $(hdrdir)/ruby/internal/intern/hash.h
+empty.o: $(hdrdir)/ruby/internal/intern/io.h
+empty.o: $(hdrdir)/ruby/internal/intern/load.h
+empty.o: $(hdrdir)/ruby/internal/intern/marshal.h
+empty.o: $(hdrdir)/ruby/internal/intern/numeric.h
+empty.o: $(hdrdir)/ruby/internal/intern/object.h
+empty.o: $(hdrdir)/ruby/internal/intern/parse.h
+empty.o: $(hdrdir)/ruby/internal/intern/proc.h
+empty.o: $(hdrdir)/ruby/internal/intern/process.h
+empty.o: $(hdrdir)/ruby/internal/intern/random.h
+empty.o: $(hdrdir)/ruby/internal/intern/range.h
+empty.o: $(hdrdir)/ruby/internal/intern/rational.h
+empty.o: $(hdrdir)/ruby/internal/intern/re.h
+empty.o: $(hdrdir)/ruby/internal/intern/ruby.h
+empty.o: $(hdrdir)/ruby/internal/intern/select.h
+empty.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+empty.o: $(hdrdir)/ruby/internal/intern/signal.h
+empty.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+empty.o: $(hdrdir)/ruby/internal/intern/string.h
+empty.o: $(hdrdir)/ruby/internal/intern/struct.h
+empty.o: $(hdrdir)/ruby/internal/intern/thread.h
+empty.o: $(hdrdir)/ruby/internal/intern/time.h
+empty.o: $(hdrdir)/ruby/internal/intern/variable.h
+empty.o: $(hdrdir)/ruby/internal/intern/vm.h
+empty.o: $(hdrdir)/ruby/internal/interpreter.h
+empty.o: $(hdrdir)/ruby/internal/iterator.h
+empty.o: $(hdrdir)/ruby/internal/memory.h
+empty.o: $(hdrdir)/ruby/internal/method.h
+empty.o: $(hdrdir)/ruby/internal/module.h
+empty.o: $(hdrdir)/ruby/internal/newobj.h
+empty.o: $(hdrdir)/ruby/internal/rgengc.h
+empty.o: $(hdrdir)/ruby/internal/scan_args.h
+empty.o: $(hdrdir)/ruby/internal/special_consts.h
+empty.o: $(hdrdir)/ruby/internal/static_assert.h
+empty.o: $(hdrdir)/ruby/internal/stdalign.h
+empty.o: $(hdrdir)/ruby/internal/stdbool.h
+empty.o: $(hdrdir)/ruby/internal/symbol.h
+empty.o: $(hdrdir)/ruby/internal/value.h
+empty.o: $(hdrdir)/ruby/internal/value_type.h
+empty.o: $(hdrdir)/ruby/internal/variable.h
+empty.o: $(hdrdir)/ruby/internal/warning_push.h
+empty.o: $(hdrdir)/ruby/internal/xmalloc.h
+empty.o: $(hdrdir)/ruby/missing.h
+empty.o: $(hdrdir)/ruby/ruby.h
+empty.o: $(hdrdir)/ruby/st.h
+empty.o: $(hdrdir)/ruby/subst.h
empty.o: empty.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/dln/empty/empty.c b/ext/-test-/dln/empty/empty.c
index c4f94f1644..2b4fd42cd2 100644
--- a/ext/-test-/dln/empty/empty.c
+++ b/ext/-test-/dln/empty/empty.c
@@ -1,3 +1,5 @@
+#include "ruby.h"
+
void
Init_empty(void)
{
diff --git a/ext/-test-/econv/append.c b/ext/-test-/econv/append.c
new file mode 100644
index 0000000000..724cd136c0
--- /dev/null
+++ b/ext/-test-/econv/append.c
@@ -0,0 +1,15 @@
+#include "ruby/ruby.h"
+#include "ruby/encoding.h"
+
+static VALUE
+econv_append(VALUE self, VALUE src, VALUE dst)
+{
+ rb_econv_t *ec = DATA_PTR(self);
+ return rb_econv_str_append(ec, src, dst, 0);
+}
+
+void
+Init_econv_append(VALUE klass)
+{
+ rb_define_method(klass, "append", econv_append, 2);
+}
diff --git a/ext/-test-/econv/extconf.rb b/ext/-test-/econv/extconf.rb
new file mode 100644
index 0000000000..d786b15db9
--- /dev/null
+++ b/ext/-test-/econv/extconf.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: false
+require_relative "../auto_ext.rb"
+auto_ext(inc: true)
diff --git a/ext/-test-/econv/init.c b/ext/-test-/econv/init.c
new file mode 100644
index 0000000000..9772ebe71c
--- /dev/null
+++ b/ext/-test-/econv/init.c
@@ -0,0 +1,11 @@
+#include "ruby.h"
+
+#define init(n) {void Init_econv_##n(VALUE klass); Init_econv_##n(klass);}
+
+void
+Init_econv(void)
+{
+ VALUE mBug = rb_define_module("Bug");
+ VALUE klass = rb_define_class_under(mBug, "EConv", rb_path2class("Encoding::Converter"));
+ TEST_INIT_FUNCS(init);
+}
diff --git a/ext/-test-/enumerator_kw/depend b/ext/-test-/enumerator_kw/depend
index b7489eaf73..14a9557e41 100644
--- a/ext/-test-/enumerator_kw/depend
+++ b/ext/-test-/enumerator_kw/depend
@@ -4,8 +4,156 @@ enumerator_kw.o: $(arch_hdrdir)/ruby/config.h
enumerator_kw.o: $(hdrdir)/ruby.h
enumerator_kw.o: $(hdrdir)/ruby/assert.h
enumerator_kw.o: $(hdrdir)/ruby/backward.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
enumerator_kw.o: $(hdrdir)/ruby/defines.h
enumerator_kw.o: $(hdrdir)/ruby/intern.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/abi.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/anyargs.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/assume.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/artificial.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/cold.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/const.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/error.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/format.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/noalias.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/noinline.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/pure.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/restrict.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/warning.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/attr/weakref.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/cast.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/compiler_since.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/config.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/constant_p.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rarray.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rbasic.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rbignum.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rclass.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rdata.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rfile.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rhash.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/robject.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rregexp.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rstring.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rstruct.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/ctype.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/dllexport.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/dosish.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/error.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/eval.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/event.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/fl_type.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/gc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/glob.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/globals.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/attribute.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/builtin.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/extension.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/feature.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/has/warning.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/array.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/bignum.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/class.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/compar.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/complex.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/cont.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/dir.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/enum.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/error.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/eval.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/file.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/gc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/hash.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/io.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/load.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/marshal.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/numeric.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/object.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/parse.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/proc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/process.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/random.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/range.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/rational.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/re.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/ruby.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/select.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/signal.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/string.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/struct.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/thread.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/time.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/variable.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/intern/vm.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/interpreter.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/iterator.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/memory.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/method.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/module.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/newobj.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/rgengc.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/scan_args.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/special_consts.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/static_assert.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/stdalign.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/stdbool.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/symbol.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/value.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/value_type.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/variable.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/warning_push.h
+enumerator_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
enumerator_kw.o: $(hdrdir)/ruby/missing.h
enumerator_kw.o: $(hdrdir)/ruby/ruby.h
enumerator_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/enumerator_kw/enumerator_kw.c b/ext/-test-/enumerator_kw/enumerator_kw.c
index 947d2b37e6..9104c51869 100644
--- a/ext/-test-/enumerator_kw/enumerator_kw.c
+++ b/ext/-test-/enumerator_kw/enumerator_kw.c
@@ -14,7 +14,8 @@ enumerator_kw(int argc, VALUE *argv, VALUE self)
}
void
-Init_enumerator_kw(void) {
+Init_enumerator_kw(void)
+{
VALUE module = rb_define_module("Bug");
module = rb_define_module_under(module, "EnumeratorKw");
rb_define_method(module, "m", enumerator_kw, -1);
diff --git a/ext/-test-/eval/eval.c b/ext/-test-/eval/eval.c
new file mode 100644
index 0000000000..983468fc34
--- /dev/null
+++ b/ext/-test-/eval/eval.c
@@ -0,0 +1,13 @@
+#include "ruby/ruby.h"
+
+static VALUE
+eval_string(VALUE self, VALUE str)
+{
+ return rb_eval_string(StringValueCStr(str));
+}
+
+void
+Init_eval(void)
+{
+ rb_define_global_function("rb_eval_string", eval_string, 1);
+}
diff --git a/ext/-test-/eval/extconf.rb b/ext/-test-/eval/extconf.rb
new file mode 100644
index 0000000000..cdbf6a8597
--- /dev/null
+++ b/ext/-test-/eval/extconf.rb
@@ -0,0 +1,2 @@
+require 'mkmf'
+create_makefile('-test-/eval')
diff --git a/ext/-test-/exception/depend b/ext/-test-/exception/depend
index d0958de9b8..e00f0b279d 100644
--- a/ext/-test-/exception/depend
+++ b/ext/-test-/exception/depend
@@ -3,8 +3,156 @@ dataerror.o: $(RUBY_EXTCONF_H)
dataerror.o: $(arch_hdrdir)/ruby/config.h
dataerror.o: $(hdrdir)/ruby/assert.h
dataerror.o: $(hdrdir)/ruby/backward.h
+dataerror.o: $(hdrdir)/ruby/backward/2/assume.h
+dataerror.o: $(hdrdir)/ruby/backward/2/attributes.h
+dataerror.o: $(hdrdir)/ruby/backward/2/bool.h
+dataerror.o: $(hdrdir)/ruby/backward/2/inttypes.h
+dataerror.o: $(hdrdir)/ruby/backward/2/limits.h
+dataerror.o: $(hdrdir)/ruby/backward/2/long_long.h
+dataerror.o: $(hdrdir)/ruby/backward/2/stdalign.h
+dataerror.o: $(hdrdir)/ruby/backward/2/stdarg.h
dataerror.o: $(hdrdir)/ruby/defines.h
dataerror.o: $(hdrdir)/ruby/intern.h
+dataerror.o: $(hdrdir)/ruby/internal/abi.h
+dataerror.o: $(hdrdir)/ruby/internal/anyargs.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+dataerror.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+dataerror.o: $(hdrdir)/ruby/internal/assume.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/artificial.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/cold.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/const.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/error.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/format.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/noalias.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/noinline.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/pure.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/restrict.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/warning.h
+dataerror.o: $(hdrdir)/ruby/internal/attr/weakref.h
+dataerror.o: $(hdrdir)/ruby/internal/cast.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+dataerror.o: $(hdrdir)/ruby/internal/compiler_since.h
+dataerror.o: $(hdrdir)/ruby/internal/config.h
+dataerror.o: $(hdrdir)/ruby/internal/constant_p.h
+dataerror.o: $(hdrdir)/ruby/internal/core.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rarray.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rbasic.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rbignum.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rclass.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rdata.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rfile.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rhash.h
+dataerror.o: $(hdrdir)/ruby/internal/core/robject.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rregexp.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rstring.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rstruct.h
+dataerror.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+dataerror.o: $(hdrdir)/ruby/internal/ctype.h
+dataerror.o: $(hdrdir)/ruby/internal/dllexport.h
+dataerror.o: $(hdrdir)/ruby/internal/dosish.h
+dataerror.o: $(hdrdir)/ruby/internal/error.h
+dataerror.o: $(hdrdir)/ruby/internal/eval.h
+dataerror.o: $(hdrdir)/ruby/internal/event.h
+dataerror.o: $(hdrdir)/ruby/internal/fl_type.h
+dataerror.o: $(hdrdir)/ruby/internal/gc.h
+dataerror.o: $(hdrdir)/ruby/internal/glob.h
+dataerror.o: $(hdrdir)/ruby/internal/globals.h
+dataerror.o: $(hdrdir)/ruby/internal/has/attribute.h
+dataerror.o: $(hdrdir)/ruby/internal/has/builtin.h
+dataerror.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+dataerror.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+dataerror.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+dataerror.o: $(hdrdir)/ruby/internal/has/extension.h
+dataerror.o: $(hdrdir)/ruby/internal/has/feature.h
+dataerror.o: $(hdrdir)/ruby/internal/has/warning.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/array.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/bignum.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/class.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/compar.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/complex.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/cont.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/dir.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/enum.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/error.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/eval.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/file.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/gc.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/hash.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/io.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/load.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/marshal.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/numeric.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/object.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/parse.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/proc.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/process.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/random.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/range.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/rational.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/re.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/ruby.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/select.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/signal.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/string.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/struct.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/thread.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/time.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/variable.h
+dataerror.o: $(hdrdir)/ruby/internal/intern/vm.h
+dataerror.o: $(hdrdir)/ruby/internal/interpreter.h
+dataerror.o: $(hdrdir)/ruby/internal/iterator.h
+dataerror.o: $(hdrdir)/ruby/internal/memory.h
+dataerror.o: $(hdrdir)/ruby/internal/method.h
+dataerror.o: $(hdrdir)/ruby/internal/module.h
+dataerror.o: $(hdrdir)/ruby/internal/newobj.h
+dataerror.o: $(hdrdir)/ruby/internal/rgengc.h
+dataerror.o: $(hdrdir)/ruby/internal/scan_args.h
+dataerror.o: $(hdrdir)/ruby/internal/special_consts.h
+dataerror.o: $(hdrdir)/ruby/internal/static_assert.h
+dataerror.o: $(hdrdir)/ruby/internal/stdalign.h
+dataerror.o: $(hdrdir)/ruby/internal/stdbool.h
+dataerror.o: $(hdrdir)/ruby/internal/symbol.h
+dataerror.o: $(hdrdir)/ruby/internal/value.h
+dataerror.o: $(hdrdir)/ruby/internal/value_type.h
+dataerror.o: $(hdrdir)/ruby/internal/variable.h
+dataerror.o: $(hdrdir)/ruby/internal/warning_push.h
+dataerror.o: $(hdrdir)/ruby/internal/xmalloc.h
dataerror.o: $(hdrdir)/ruby/missing.h
dataerror.o: $(hdrdir)/ruby/ruby.h
dataerror.o: $(hdrdir)/ruby/st.h
@@ -15,9 +163,166 @@ enc_raise.o: $(arch_hdrdir)/ruby/config.h
enc_raise.o: $(hdrdir)/ruby.h
enc_raise.o: $(hdrdir)/ruby/assert.h
enc_raise.o: $(hdrdir)/ruby/backward.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/assume.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/attributes.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/bool.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/limits.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/long_long.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enc_raise.o: $(hdrdir)/ruby/backward/2/stdarg.h
enc_raise.o: $(hdrdir)/ruby/defines.h
enc_raise.o: $(hdrdir)/ruby/encoding.h
enc_raise.o: $(hdrdir)/ruby/intern.h
+enc_raise.o: $(hdrdir)/ruby/internal/abi.h
+enc_raise.o: $(hdrdir)/ruby/internal/anyargs.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+enc_raise.o: $(hdrdir)/ruby/internal/assume.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/artificial.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/cold.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/const.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/error.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/format.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/noalias.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/noinline.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/pure.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/restrict.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/warning.h
+enc_raise.o: $(hdrdir)/ruby/internal/attr/weakref.h
+enc_raise.o: $(hdrdir)/ruby/internal/cast.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+enc_raise.o: $(hdrdir)/ruby/internal/compiler_since.h
+enc_raise.o: $(hdrdir)/ruby/internal/config.h
+enc_raise.o: $(hdrdir)/ruby/internal/constant_p.h
+enc_raise.o: $(hdrdir)/ruby/internal/core.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rarray.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rbasic.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rbignum.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rclass.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rdata.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rfile.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rhash.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/robject.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rregexp.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rstring.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rstruct.h
+enc_raise.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+enc_raise.o: $(hdrdir)/ruby/internal/ctype.h
+enc_raise.o: $(hdrdir)/ruby/internal/dllexport.h
+enc_raise.o: $(hdrdir)/ruby/internal/dosish.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/re.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/string.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+enc_raise.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+enc_raise.o: $(hdrdir)/ruby/internal/error.h
+enc_raise.o: $(hdrdir)/ruby/internal/eval.h
+enc_raise.o: $(hdrdir)/ruby/internal/event.h
+enc_raise.o: $(hdrdir)/ruby/internal/fl_type.h
+enc_raise.o: $(hdrdir)/ruby/internal/gc.h
+enc_raise.o: $(hdrdir)/ruby/internal/glob.h
+enc_raise.o: $(hdrdir)/ruby/internal/globals.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/attribute.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/builtin.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/extension.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/feature.h
+enc_raise.o: $(hdrdir)/ruby/internal/has/warning.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/array.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/bignum.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/class.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/compar.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/complex.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/cont.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/dir.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/enum.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/error.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/eval.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/file.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/gc.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/hash.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/io.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/load.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/marshal.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/numeric.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/object.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/parse.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/proc.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/process.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/random.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/range.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/rational.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/re.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/ruby.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/select.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/signal.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/string.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/struct.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/thread.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/time.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/variable.h
+enc_raise.o: $(hdrdir)/ruby/internal/intern/vm.h
+enc_raise.o: $(hdrdir)/ruby/internal/interpreter.h
+enc_raise.o: $(hdrdir)/ruby/internal/iterator.h
+enc_raise.o: $(hdrdir)/ruby/internal/memory.h
+enc_raise.o: $(hdrdir)/ruby/internal/method.h
+enc_raise.o: $(hdrdir)/ruby/internal/module.h
+enc_raise.o: $(hdrdir)/ruby/internal/newobj.h
+enc_raise.o: $(hdrdir)/ruby/internal/rgengc.h
+enc_raise.o: $(hdrdir)/ruby/internal/scan_args.h
+enc_raise.o: $(hdrdir)/ruby/internal/special_consts.h
+enc_raise.o: $(hdrdir)/ruby/internal/static_assert.h
+enc_raise.o: $(hdrdir)/ruby/internal/stdalign.h
+enc_raise.o: $(hdrdir)/ruby/internal/stdbool.h
+enc_raise.o: $(hdrdir)/ruby/internal/symbol.h
+enc_raise.o: $(hdrdir)/ruby/internal/value.h
+enc_raise.o: $(hdrdir)/ruby/internal/value_type.h
+enc_raise.o: $(hdrdir)/ruby/internal/variable.h
+enc_raise.o: $(hdrdir)/ruby/internal/warning_push.h
+enc_raise.o: $(hdrdir)/ruby/internal/xmalloc.h
enc_raise.o: $(hdrdir)/ruby/missing.h
enc_raise.o: $(hdrdir)/ruby/onigmo.h
enc_raise.o: $(hdrdir)/ruby/oniguruma.h
@@ -30,8 +335,156 @@ ensured.o: $(arch_hdrdir)/ruby/config.h
ensured.o: $(hdrdir)/ruby.h
ensured.o: $(hdrdir)/ruby/assert.h
ensured.o: $(hdrdir)/ruby/backward.h
+ensured.o: $(hdrdir)/ruby/backward/2/assume.h
+ensured.o: $(hdrdir)/ruby/backward/2/attributes.h
+ensured.o: $(hdrdir)/ruby/backward/2/bool.h
+ensured.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ensured.o: $(hdrdir)/ruby/backward/2/limits.h
+ensured.o: $(hdrdir)/ruby/backward/2/long_long.h
+ensured.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ensured.o: $(hdrdir)/ruby/backward/2/stdarg.h
ensured.o: $(hdrdir)/ruby/defines.h
ensured.o: $(hdrdir)/ruby/intern.h
+ensured.o: $(hdrdir)/ruby/internal/abi.h
+ensured.o: $(hdrdir)/ruby/internal/anyargs.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ensured.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ensured.o: $(hdrdir)/ruby/internal/assume.h
+ensured.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ensured.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ensured.o: $(hdrdir)/ruby/internal/attr/cold.h
+ensured.o: $(hdrdir)/ruby/internal/attr/const.h
+ensured.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ensured.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ensured.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ensured.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ensured.o: $(hdrdir)/ruby/internal/attr/error.h
+ensured.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ensured.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ensured.o: $(hdrdir)/ruby/internal/attr/format.h
+ensured.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ensured.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ensured.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ensured.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ensured.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ensured.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ensured.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ensured.o: $(hdrdir)/ruby/internal/attr/pure.h
+ensured.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ensured.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ensured.o: $(hdrdir)/ruby/internal/attr/warning.h
+ensured.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ensured.o: $(hdrdir)/ruby/internal/cast.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ensured.o: $(hdrdir)/ruby/internal/compiler_since.h
+ensured.o: $(hdrdir)/ruby/internal/config.h
+ensured.o: $(hdrdir)/ruby/internal/constant_p.h
+ensured.o: $(hdrdir)/ruby/internal/core.h
+ensured.o: $(hdrdir)/ruby/internal/core/rarray.h
+ensured.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ensured.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ensured.o: $(hdrdir)/ruby/internal/core/rclass.h
+ensured.o: $(hdrdir)/ruby/internal/core/rdata.h
+ensured.o: $(hdrdir)/ruby/internal/core/rfile.h
+ensured.o: $(hdrdir)/ruby/internal/core/rhash.h
+ensured.o: $(hdrdir)/ruby/internal/core/robject.h
+ensured.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ensured.o: $(hdrdir)/ruby/internal/core/rstring.h
+ensured.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ensured.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ensured.o: $(hdrdir)/ruby/internal/ctype.h
+ensured.o: $(hdrdir)/ruby/internal/dllexport.h
+ensured.o: $(hdrdir)/ruby/internal/dosish.h
+ensured.o: $(hdrdir)/ruby/internal/error.h
+ensured.o: $(hdrdir)/ruby/internal/eval.h
+ensured.o: $(hdrdir)/ruby/internal/event.h
+ensured.o: $(hdrdir)/ruby/internal/fl_type.h
+ensured.o: $(hdrdir)/ruby/internal/gc.h
+ensured.o: $(hdrdir)/ruby/internal/glob.h
+ensured.o: $(hdrdir)/ruby/internal/globals.h
+ensured.o: $(hdrdir)/ruby/internal/has/attribute.h
+ensured.o: $(hdrdir)/ruby/internal/has/builtin.h
+ensured.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ensured.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ensured.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ensured.o: $(hdrdir)/ruby/internal/has/extension.h
+ensured.o: $(hdrdir)/ruby/internal/has/feature.h
+ensured.o: $(hdrdir)/ruby/internal/has/warning.h
+ensured.o: $(hdrdir)/ruby/internal/intern/array.h
+ensured.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ensured.o: $(hdrdir)/ruby/internal/intern/class.h
+ensured.o: $(hdrdir)/ruby/internal/intern/compar.h
+ensured.o: $(hdrdir)/ruby/internal/intern/complex.h
+ensured.o: $(hdrdir)/ruby/internal/intern/cont.h
+ensured.o: $(hdrdir)/ruby/internal/intern/dir.h
+ensured.o: $(hdrdir)/ruby/internal/intern/enum.h
+ensured.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ensured.o: $(hdrdir)/ruby/internal/intern/error.h
+ensured.o: $(hdrdir)/ruby/internal/intern/eval.h
+ensured.o: $(hdrdir)/ruby/internal/intern/file.h
+ensured.o: $(hdrdir)/ruby/internal/intern/gc.h
+ensured.o: $(hdrdir)/ruby/internal/intern/hash.h
+ensured.o: $(hdrdir)/ruby/internal/intern/io.h
+ensured.o: $(hdrdir)/ruby/internal/intern/load.h
+ensured.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ensured.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ensured.o: $(hdrdir)/ruby/internal/intern/object.h
+ensured.o: $(hdrdir)/ruby/internal/intern/parse.h
+ensured.o: $(hdrdir)/ruby/internal/intern/proc.h
+ensured.o: $(hdrdir)/ruby/internal/intern/process.h
+ensured.o: $(hdrdir)/ruby/internal/intern/random.h
+ensured.o: $(hdrdir)/ruby/internal/intern/range.h
+ensured.o: $(hdrdir)/ruby/internal/intern/rational.h
+ensured.o: $(hdrdir)/ruby/internal/intern/re.h
+ensured.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ensured.o: $(hdrdir)/ruby/internal/intern/select.h
+ensured.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ensured.o: $(hdrdir)/ruby/internal/intern/signal.h
+ensured.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ensured.o: $(hdrdir)/ruby/internal/intern/string.h
+ensured.o: $(hdrdir)/ruby/internal/intern/struct.h
+ensured.o: $(hdrdir)/ruby/internal/intern/thread.h
+ensured.o: $(hdrdir)/ruby/internal/intern/time.h
+ensured.o: $(hdrdir)/ruby/internal/intern/variable.h
+ensured.o: $(hdrdir)/ruby/internal/intern/vm.h
+ensured.o: $(hdrdir)/ruby/internal/interpreter.h
+ensured.o: $(hdrdir)/ruby/internal/iterator.h
+ensured.o: $(hdrdir)/ruby/internal/memory.h
+ensured.o: $(hdrdir)/ruby/internal/method.h
+ensured.o: $(hdrdir)/ruby/internal/module.h
+ensured.o: $(hdrdir)/ruby/internal/newobj.h
+ensured.o: $(hdrdir)/ruby/internal/rgengc.h
+ensured.o: $(hdrdir)/ruby/internal/scan_args.h
+ensured.o: $(hdrdir)/ruby/internal/special_consts.h
+ensured.o: $(hdrdir)/ruby/internal/static_assert.h
+ensured.o: $(hdrdir)/ruby/internal/stdalign.h
+ensured.o: $(hdrdir)/ruby/internal/stdbool.h
+ensured.o: $(hdrdir)/ruby/internal/symbol.h
+ensured.o: $(hdrdir)/ruby/internal/value.h
+ensured.o: $(hdrdir)/ruby/internal/value_type.h
+ensured.o: $(hdrdir)/ruby/internal/variable.h
+ensured.o: $(hdrdir)/ruby/internal/warning_push.h
+ensured.o: $(hdrdir)/ruby/internal/xmalloc.h
ensured.o: $(hdrdir)/ruby/missing.h
ensured.o: $(hdrdir)/ruby/ruby.h
ensured.o: $(hdrdir)/ruby/st.h
@@ -42,8 +495,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/fatal/depend b/ext/-test-/fatal/depend
index c74360fdf9..5b1adb6607 100644
--- a/ext/-test-/fatal/depend
+++ b/ext/-test-/fatal/depend
@@ -4,8 +4,156 @@ rb_fatal.o: $(arch_hdrdir)/ruby/config.h
rb_fatal.o: $(hdrdir)/ruby.h
rb_fatal.o: $(hdrdir)/ruby/assert.h
rb_fatal.o: $(hdrdir)/ruby/backward.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdarg.h
rb_fatal.o: $(hdrdir)/ruby/defines.h
rb_fatal.o: $(hdrdir)/ruby/intern.h
+rb_fatal.o: $(hdrdir)/ruby/internal/abi.h
+rb_fatal.o: $(hdrdir)/ruby/internal/anyargs.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rb_fatal.o: $(hdrdir)/ruby/internal/assume.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/cold.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/const.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/error.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/format.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/pure.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/warning.h
+rb_fatal.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rb_fatal.o: $(hdrdir)/ruby/internal/cast.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rb_fatal.o: $(hdrdir)/ruby/internal/compiler_since.h
+rb_fatal.o: $(hdrdir)/ruby/internal/config.h
+rb_fatal.o: $(hdrdir)/ruby/internal/constant_p.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rarray.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rclass.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rdata.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rfile.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rhash.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/robject.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rstring.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rb_fatal.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rb_fatal.o: $(hdrdir)/ruby/internal/ctype.h
+rb_fatal.o: $(hdrdir)/ruby/internal/dllexport.h
+rb_fatal.o: $(hdrdir)/ruby/internal/dosish.h
+rb_fatal.o: $(hdrdir)/ruby/internal/error.h
+rb_fatal.o: $(hdrdir)/ruby/internal/eval.h
+rb_fatal.o: $(hdrdir)/ruby/internal/event.h
+rb_fatal.o: $(hdrdir)/ruby/internal/fl_type.h
+rb_fatal.o: $(hdrdir)/ruby/internal/gc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/glob.h
+rb_fatal.o: $(hdrdir)/ruby/internal/globals.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/attribute.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/builtin.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/extension.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/feature.h
+rb_fatal.o: $(hdrdir)/ruby/internal/has/warning.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/array.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/class.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/compar.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/complex.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/cont.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/dir.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/enum.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/error.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/eval.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/file.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/gc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/hash.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/io.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/load.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/object.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/parse.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/proc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/process.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/random.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/range.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/rational.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/re.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/select.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/signal.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/string.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/struct.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/thread.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/time.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/variable.h
+rb_fatal.o: $(hdrdir)/ruby/internal/intern/vm.h
+rb_fatal.o: $(hdrdir)/ruby/internal/interpreter.h
+rb_fatal.o: $(hdrdir)/ruby/internal/iterator.h
+rb_fatal.o: $(hdrdir)/ruby/internal/memory.h
+rb_fatal.o: $(hdrdir)/ruby/internal/method.h
+rb_fatal.o: $(hdrdir)/ruby/internal/module.h
+rb_fatal.o: $(hdrdir)/ruby/internal/newobj.h
+rb_fatal.o: $(hdrdir)/ruby/internal/rgengc.h
+rb_fatal.o: $(hdrdir)/ruby/internal/scan_args.h
+rb_fatal.o: $(hdrdir)/ruby/internal/special_consts.h
+rb_fatal.o: $(hdrdir)/ruby/internal/static_assert.h
+rb_fatal.o: $(hdrdir)/ruby/internal/stdalign.h
+rb_fatal.o: $(hdrdir)/ruby/internal/stdbool.h
+rb_fatal.o: $(hdrdir)/ruby/internal/symbol.h
+rb_fatal.o: $(hdrdir)/ruby/internal/value.h
+rb_fatal.o: $(hdrdir)/ruby/internal/value_type.h
+rb_fatal.o: $(hdrdir)/ruby/internal/variable.h
+rb_fatal.o: $(hdrdir)/ruby/internal/warning_push.h
+rb_fatal.o: $(hdrdir)/ruby/internal/xmalloc.h
rb_fatal.o: $(hdrdir)/ruby/missing.h
rb_fatal.o: $(hdrdir)/ruby/ruby.h
rb_fatal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/fatal/rb_fatal.c b/ext/-test-/fatal/rb_fatal.c
index 71aef4658a..eedbc51f8b 100644
--- a/ext/-test-/fatal/rb_fatal.c
+++ b/ext/-test-/fatal/rb_fatal.c
@@ -15,5 +15,6 @@ ruby_fatal(VALUE obj, VALUE msg)
void
Init_rb_fatal(void)
{
- rb_define_method(rb_mKernel, "rb_fatal", ruby_fatal, 1);
+ VALUE mBug = rb_define_module("Bug");
+ rb_define_singleton_method(mBug, "rb_fatal", ruby_fatal, 1);
}
diff --git a/ext/-test-/file/depend b/ext/-test-/file/depend
index afdf116a9d..f0fffc2485 100644
--- a/ext/-test-/file/depend
+++ b/ext/-test-/file/depend
@@ -3,9 +3,166 @@ fs.o: $(RUBY_EXTCONF_H)
fs.o: $(arch_hdrdir)/ruby/config.h
fs.o: $(hdrdir)/ruby/assert.h
fs.o: $(hdrdir)/ruby/backward.h
+fs.o: $(hdrdir)/ruby/backward/2/assume.h
+fs.o: $(hdrdir)/ruby/backward/2/attributes.h
+fs.o: $(hdrdir)/ruby/backward/2/bool.h
+fs.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fs.o: $(hdrdir)/ruby/backward/2/limits.h
+fs.o: $(hdrdir)/ruby/backward/2/long_long.h
+fs.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fs.o: $(hdrdir)/ruby/backward/2/stdarg.h
fs.o: $(hdrdir)/ruby/defines.h
fs.o: $(hdrdir)/ruby/encoding.h
fs.o: $(hdrdir)/ruby/intern.h
+fs.o: $(hdrdir)/ruby/internal/abi.h
+fs.o: $(hdrdir)/ruby/internal/anyargs.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+fs.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+fs.o: $(hdrdir)/ruby/internal/assume.h
+fs.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+fs.o: $(hdrdir)/ruby/internal/attr/artificial.h
+fs.o: $(hdrdir)/ruby/internal/attr/cold.h
+fs.o: $(hdrdir)/ruby/internal/attr/const.h
+fs.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+fs.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+fs.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+fs.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+fs.o: $(hdrdir)/ruby/internal/attr/error.h
+fs.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+fs.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+fs.o: $(hdrdir)/ruby/internal/attr/format.h
+fs.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+fs.o: $(hdrdir)/ruby/internal/attr/noalias.h
+fs.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+fs.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+fs.o: $(hdrdir)/ruby/internal/attr/noinline.h
+fs.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+fs.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+fs.o: $(hdrdir)/ruby/internal/attr/pure.h
+fs.o: $(hdrdir)/ruby/internal/attr/restrict.h
+fs.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+fs.o: $(hdrdir)/ruby/internal/attr/warning.h
+fs.o: $(hdrdir)/ruby/internal/attr/weakref.h
+fs.o: $(hdrdir)/ruby/internal/cast.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+fs.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+fs.o: $(hdrdir)/ruby/internal/compiler_since.h
+fs.o: $(hdrdir)/ruby/internal/config.h
+fs.o: $(hdrdir)/ruby/internal/constant_p.h
+fs.o: $(hdrdir)/ruby/internal/core.h
+fs.o: $(hdrdir)/ruby/internal/core/rarray.h
+fs.o: $(hdrdir)/ruby/internal/core/rbasic.h
+fs.o: $(hdrdir)/ruby/internal/core/rbignum.h
+fs.o: $(hdrdir)/ruby/internal/core/rclass.h
+fs.o: $(hdrdir)/ruby/internal/core/rdata.h
+fs.o: $(hdrdir)/ruby/internal/core/rfile.h
+fs.o: $(hdrdir)/ruby/internal/core/rhash.h
+fs.o: $(hdrdir)/ruby/internal/core/robject.h
+fs.o: $(hdrdir)/ruby/internal/core/rregexp.h
+fs.o: $(hdrdir)/ruby/internal/core/rstring.h
+fs.o: $(hdrdir)/ruby/internal/core/rstruct.h
+fs.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+fs.o: $(hdrdir)/ruby/internal/ctype.h
+fs.o: $(hdrdir)/ruby/internal/dllexport.h
+fs.o: $(hdrdir)/ruby/internal/dosish.h
+fs.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+fs.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+fs.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+fs.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+fs.o: $(hdrdir)/ruby/internal/encoding/re.h
+fs.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+fs.o: $(hdrdir)/ruby/internal/encoding/string.h
+fs.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+fs.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+fs.o: $(hdrdir)/ruby/internal/error.h
+fs.o: $(hdrdir)/ruby/internal/eval.h
+fs.o: $(hdrdir)/ruby/internal/event.h
+fs.o: $(hdrdir)/ruby/internal/fl_type.h
+fs.o: $(hdrdir)/ruby/internal/gc.h
+fs.o: $(hdrdir)/ruby/internal/glob.h
+fs.o: $(hdrdir)/ruby/internal/globals.h
+fs.o: $(hdrdir)/ruby/internal/has/attribute.h
+fs.o: $(hdrdir)/ruby/internal/has/builtin.h
+fs.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+fs.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+fs.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+fs.o: $(hdrdir)/ruby/internal/has/extension.h
+fs.o: $(hdrdir)/ruby/internal/has/feature.h
+fs.o: $(hdrdir)/ruby/internal/has/warning.h
+fs.o: $(hdrdir)/ruby/internal/intern/array.h
+fs.o: $(hdrdir)/ruby/internal/intern/bignum.h
+fs.o: $(hdrdir)/ruby/internal/intern/class.h
+fs.o: $(hdrdir)/ruby/internal/intern/compar.h
+fs.o: $(hdrdir)/ruby/internal/intern/complex.h
+fs.o: $(hdrdir)/ruby/internal/intern/cont.h
+fs.o: $(hdrdir)/ruby/internal/intern/dir.h
+fs.o: $(hdrdir)/ruby/internal/intern/enum.h
+fs.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+fs.o: $(hdrdir)/ruby/internal/intern/error.h
+fs.o: $(hdrdir)/ruby/internal/intern/eval.h
+fs.o: $(hdrdir)/ruby/internal/intern/file.h
+fs.o: $(hdrdir)/ruby/internal/intern/gc.h
+fs.o: $(hdrdir)/ruby/internal/intern/hash.h
+fs.o: $(hdrdir)/ruby/internal/intern/io.h
+fs.o: $(hdrdir)/ruby/internal/intern/load.h
+fs.o: $(hdrdir)/ruby/internal/intern/marshal.h
+fs.o: $(hdrdir)/ruby/internal/intern/numeric.h
+fs.o: $(hdrdir)/ruby/internal/intern/object.h
+fs.o: $(hdrdir)/ruby/internal/intern/parse.h
+fs.o: $(hdrdir)/ruby/internal/intern/proc.h
+fs.o: $(hdrdir)/ruby/internal/intern/process.h
+fs.o: $(hdrdir)/ruby/internal/intern/random.h
+fs.o: $(hdrdir)/ruby/internal/intern/range.h
+fs.o: $(hdrdir)/ruby/internal/intern/rational.h
+fs.o: $(hdrdir)/ruby/internal/intern/re.h
+fs.o: $(hdrdir)/ruby/internal/intern/ruby.h
+fs.o: $(hdrdir)/ruby/internal/intern/select.h
+fs.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+fs.o: $(hdrdir)/ruby/internal/intern/signal.h
+fs.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+fs.o: $(hdrdir)/ruby/internal/intern/string.h
+fs.o: $(hdrdir)/ruby/internal/intern/struct.h
+fs.o: $(hdrdir)/ruby/internal/intern/thread.h
+fs.o: $(hdrdir)/ruby/internal/intern/time.h
+fs.o: $(hdrdir)/ruby/internal/intern/variable.h
+fs.o: $(hdrdir)/ruby/internal/intern/vm.h
+fs.o: $(hdrdir)/ruby/internal/interpreter.h
+fs.o: $(hdrdir)/ruby/internal/iterator.h
+fs.o: $(hdrdir)/ruby/internal/memory.h
+fs.o: $(hdrdir)/ruby/internal/method.h
+fs.o: $(hdrdir)/ruby/internal/module.h
+fs.o: $(hdrdir)/ruby/internal/newobj.h
+fs.o: $(hdrdir)/ruby/internal/rgengc.h
+fs.o: $(hdrdir)/ruby/internal/scan_args.h
+fs.o: $(hdrdir)/ruby/internal/special_consts.h
+fs.o: $(hdrdir)/ruby/internal/static_assert.h
+fs.o: $(hdrdir)/ruby/internal/stdalign.h
+fs.o: $(hdrdir)/ruby/internal/stdbool.h
+fs.o: $(hdrdir)/ruby/internal/symbol.h
+fs.o: $(hdrdir)/ruby/internal/value.h
+fs.o: $(hdrdir)/ruby/internal/value_type.h
+fs.o: $(hdrdir)/ruby/internal/variable.h
+fs.o: $(hdrdir)/ruby/internal/warning_push.h
+fs.o: $(hdrdir)/ruby/internal/xmalloc.h
fs.o: $(hdrdir)/ruby/io.h
fs.o: $(hdrdir)/ruby/missing.h
fs.o: $(hdrdir)/ruby/onigmo.h
@@ -19,8 +176,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -30,9 +335,166 @@ stat.o: $(RUBY_EXTCONF_H)
stat.o: $(arch_hdrdir)/ruby/config.h
stat.o: $(hdrdir)/ruby/assert.h
stat.o: $(hdrdir)/ruby/backward.h
+stat.o: $(hdrdir)/ruby/backward/2/assume.h
+stat.o: $(hdrdir)/ruby/backward/2/attributes.h
+stat.o: $(hdrdir)/ruby/backward/2/bool.h
+stat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+stat.o: $(hdrdir)/ruby/backward/2/limits.h
+stat.o: $(hdrdir)/ruby/backward/2/long_long.h
+stat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+stat.o: $(hdrdir)/ruby/backward/2/stdarg.h
stat.o: $(hdrdir)/ruby/defines.h
stat.o: $(hdrdir)/ruby/encoding.h
stat.o: $(hdrdir)/ruby/intern.h
+stat.o: $(hdrdir)/ruby/internal/abi.h
+stat.o: $(hdrdir)/ruby/internal/anyargs.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+stat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+stat.o: $(hdrdir)/ruby/internal/assume.h
+stat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+stat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+stat.o: $(hdrdir)/ruby/internal/attr/cold.h
+stat.o: $(hdrdir)/ruby/internal/attr/const.h
+stat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+stat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+stat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+stat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+stat.o: $(hdrdir)/ruby/internal/attr/error.h
+stat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+stat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+stat.o: $(hdrdir)/ruby/internal/attr/format.h
+stat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+stat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+stat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+stat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+stat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+stat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+stat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+stat.o: $(hdrdir)/ruby/internal/attr/pure.h
+stat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+stat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+stat.o: $(hdrdir)/ruby/internal/attr/warning.h
+stat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+stat.o: $(hdrdir)/ruby/internal/cast.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+stat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+stat.o: $(hdrdir)/ruby/internal/compiler_since.h
+stat.o: $(hdrdir)/ruby/internal/config.h
+stat.o: $(hdrdir)/ruby/internal/constant_p.h
+stat.o: $(hdrdir)/ruby/internal/core.h
+stat.o: $(hdrdir)/ruby/internal/core/rarray.h
+stat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+stat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+stat.o: $(hdrdir)/ruby/internal/core/rclass.h
+stat.o: $(hdrdir)/ruby/internal/core/rdata.h
+stat.o: $(hdrdir)/ruby/internal/core/rfile.h
+stat.o: $(hdrdir)/ruby/internal/core/rhash.h
+stat.o: $(hdrdir)/ruby/internal/core/robject.h
+stat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+stat.o: $(hdrdir)/ruby/internal/core/rstring.h
+stat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+stat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+stat.o: $(hdrdir)/ruby/internal/ctype.h
+stat.o: $(hdrdir)/ruby/internal/dllexport.h
+stat.o: $(hdrdir)/ruby/internal/dosish.h
+stat.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+stat.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+stat.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+stat.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+stat.o: $(hdrdir)/ruby/internal/encoding/re.h
+stat.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+stat.o: $(hdrdir)/ruby/internal/encoding/string.h
+stat.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+stat.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+stat.o: $(hdrdir)/ruby/internal/error.h
+stat.o: $(hdrdir)/ruby/internal/eval.h
+stat.o: $(hdrdir)/ruby/internal/event.h
+stat.o: $(hdrdir)/ruby/internal/fl_type.h
+stat.o: $(hdrdir)/ruby/internal/gc.h
+stat.o: $(hdrdir)/ruby/internal/glob.h
+stat.o: $(hdrdir)/ruby/internal/globals.h
+stat.o: $(hdrdir)/ruby/internal/has/attribute.h
+stat.o: $(hdrdir)/ruby/internal/has/builtin.h
+stat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+stat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+stat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+stat.o: $(hdrdir)/ruby/internal/has/extension.h
+stat.o: $(hdrdir)/ruby/internal/has/feature.h
+stat.o: $(hdrdir)/ruby/internal/has/warning.h
+stat.o: $(hdrdir)/ruby/internal/intern/array.h
+stat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+stat.o: $(hdrdir)/ruby/internal/intern/class.h
+stat.o: $(hdrdir)/ruby/internal/intern/compar.h
+stat.o: $(hdrdir)/ruby/internal/intern/complex.h
+stat.o: $(hdrdir)/ruby/internal/intern/cont.h
+stat.o: $(hdrdir)/ruby/internal/intern/dir.h
+stat.o: $(hdrdir)/ruby/internal/intern/enum.h
+stat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+stat.o: $(hdrdir)/ruby/internal/intern/error.h
+stat.o: $(hdrdir)/ruby/internal/intern/eval.h
+stat.o: $(hdrdir)/ruby/internal/intern/file.h
+stat.o: $(hdrdir)/ruby/internal/intern/gc.h
+stat.o: $(hdrdir)/ruby/internal/intern/hash.h
+stat.o: $(hdrdir)/ruby/internal/intern/io.h
+stat.o: $(hdrdir)/ruby/internal/intern/load.h
+stat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+stat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+stat.o: $(hdrdir)/ruby/internal/intern/object.h
+stat.o: $(hdrdir)/ruby/internal/intern/parse.h
+stat.o: $(hdrdir)/ruby/internal/intern/proc.h
+stat.o: $(hdrdir)/ruby/internal/intern/process.h
+stat.o: $(hdrdir)/ruby/internal/intern/random.h
+stat.o: $(hdrdir)/ruby/internal/intern/range.h
+stat.o: $(hdrdir)/ruby/internal/intern/rational.h
+stat.o: $(hdrdir)/ruby/internal/intern/re.h
+stat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+stat.o: $(hdrdir)/ruby/internal/intern/select.h
+stat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+stat.o: $(hdrdir)/ruby/internal/intern/signal.h
+stat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+stat.o: $(hdrdir)/ruby/internal/intern/string.h
+stat.o: $(hdrdir)/ruby/internal/intern/struct.h
+stat.o: $(hdrdir)/ruby/internal/intern/thread.h
+stat.o: $(hdrdir)/ruby/internal/intern/time.h
+stat.o: $(hdrdir)/ruby/internal/intern/variable.h
+stat.o: $(hdrdir)/ruby/internal/intern/vm.h
+stat.o: $(hdrdir)/ruby/internal/interpreter.h
+stat.o: $(hdrdir)/ruby/internal/iterator.h
+stat.o: $(hdrdir)/ruby/internal/memory.h
+stat.o: $(hdrdir)/ruby/internal/method.h
+stat.o: $(hdrdir)/ruby/internal/module.h
+stat.o: $(hdrdir)/ruby/internal/newobj.h
+stat.o: $(hdrdir)/ruby/internal/rgengc.h
+stat.o: $(hdrdir)/ruby/internal/scan_args.h
+stat.o: $(hdrdir)/ruby/internal/special_consts.h
+stat.o: $(hdrdir)/ruby/internal/static_assert.h
+stat.o: $(hdrdir)/ruby/internal/stdalign.h
+stat.o: $(hdrdir)/ruby/internal/stdbool.h
+stat.o: $(hdrdir)/ruby/internal/symbol.h
+stat.o: $(hdrdir)/ruby/internal/value.h
+stat.o: $(hdrdir)/ruby/internal/value_type.h
+stat.o: $(hdrdir)/ruby/internal/variable.h
+stat.o: $(hdrdir)/ruby/internal/warning_push.h
+stat.o: $(hdrdir)/ruby/internal/xmalloc.h
stat.o: $(hdrdir)/ruby/io.h
stat.o: $(hdrdir)/ruby/missing.h
stat.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c
index 63d2356d76..eb17e9768e 100644
--- a/ext/-test-/file/fs.c
+++ b/ext/-test-/file/fs.c
@@ -28,7 +28,7 @@ typedef struct statvfs statfs_t;
# if defined HAVE_STRUCT_STATVFS_F_TYPE
# define HAVE_STRUCT_STATFS_T_F_TYPE 1
# endif
-#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */
+#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, Solaris */
typedef struct statvfs statfs_t;
# define STATFS(f, s) statvfs((f), (s))
# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
@@ -54,24 +54,24 @@ get_fsname(VALUE self, VALUE str)
FilePathValue(str);
str = rb_str_encode_ospath(str);
if (STATFS(StringValueCStr(str), &st) == -1) {
- rb_sys_fail_str(str);
+ rb_sys_fail_str(str);
}
# ifdef HAVE_STRUCT_STATFS_T_F_FSTYPENAME
if (st.f_fstypename[0])
- return CSTR(st.f_fstypename);
+ return CSTR(st.f_fstypename);
# endif
# ifdef HAVE_STRUCT_STATFS_T_F_TYPE
switch (st.f_type) {
case 0x9123683E: /* BTRFS_SUPER_MAGIC */
- return CSTR("btrfs");
+ return CSTR("btrfs");
case 0x7461636f: /* OCFS2_SUPER_MAGIC */
- return CSTR("ocfs");
+ return CSTR("ocfs");
case 0xEF53: /* EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC */
- return CSTR("ext4");
+ return CSTR("ext4");
case 0x58465342: /* XFS_SUPER_MAGIC */
- return CSTR("xfs");
+ return CSTR("xfs");
case 0x01021994: /* TMPFS_MAGIC */
- return CSTR("tmpfs");
+ return CSTR("tmpfs");
}
# endif
#endif
diff --git a/ext/-test-/float/depend b/ext/-test-/float/depend
index 6007bd3c0b..9391a445a3 100644
--- a/ext/-test-/float/depend
+++ b/ext/-test-/float/depend
@@ -7,8 +7,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -19,8 +167,156 @@ nextafter.o: $(arch_hdrdir)/ruby/config.h
nextafter.o: $(hdrdir)/ruby.h
nextafter.o: $(hdrdir)/ruby/assert.h
nextafter.o: $(hdrdir)/ruby/backward.h
+nextafter.o: $(hdrdir)/ruby/backward/2/assume.h
+nextafter.o: $(hdrdir)/ruby/backward/2/attributes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/bool.h
+nextafter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/limits.h
+nextafter.o: $(hdrdir)/ruby/backward/2/long_long.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdarg.h
nextafter.o: $(hdrdir)/ruby/defines.h
nextafter.o: $(hdrdir)/ruby/intern.h
+nextafter.o: $(hdrdir)/ruby/internal/abi.h
+nextafter.o: $(hdrdir)/ruby/internal/anyargs.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+nextafter.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+nextafter.o: $(hdrdir)/ruby/internal/assume.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/artificial.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/cold.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/const.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/error.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/format.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/noalias.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/noinline.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/pure.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/restrict.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/warning.h
+nextafter.o: $(hdrdir)/ruby/internal/attr/weakref.h
+nextafter.o: $(hdrdir)/ruby/internal/cast.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+nextafter.o: $(hdrdir)/ruby/internal/compiler_since.h
+nextafter.o: $(hdrdir)/ruby/internal/config.h
+nextafter.o: $(hdrdir)/ruby/internal/constant_p.h
+nextafter.o: $(hdrdir)/ruby/internal/core.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rarray.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rbasic.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rbignum.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rclass.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rdata.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rfile.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rhash.h
+nextafter.o: $(hdrdir)/ruby/internal/core/robject.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rregexp.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rstring.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rstruct.h
+nextafter.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+nextafter.o: $(hdrdir)/ruby/internal/ctype.h
+nextafter.o: $(hdrdir)/ruby/internal/dllexport.h
+nextafter.o: $(hdrdir)/ruby/internal/dosish.h
+nextafter.o: $(hdrdir)/ruby/internal/error.h
+nextafter.o: $(hdrdir)/ruby/internal/eval.h
+nextafter.o: $(hdrdir)/ruby/internal/event.h
+nextafter.o: $(hdrdir)/ruby/internal/fl_type.h
+nextafter.o: $(hdrdir)/ruby/internal/gc.h
+nextafter.o: $(hdrdir)/ruby/internal/glob.h
+nextafter.o: $(hdrdir)/ruby/internal/globals.h
+nextafter.o: $(hdrdir)/ruby/internal/has/attribute.h
+nextafter.o: $(hdrdir)/ruby/internal/has/builtin.h
+nextafter.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+nextafter.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+nextafter.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+nextafter.o: $(hdrdir)/ruby/internal/has/extension.h
+nextafter.o: $(hdrdir)/ruby/internal/has/feature.h
+nextafter.o: $(hdrdir)/ruby/internal/has/warning.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/array.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/bignum.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/class.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/compar.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/complex.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/cont.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/dir.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/enum.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/error.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/eval.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/file.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/gc.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/hash.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/io.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/load.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/marshal.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/numeric.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/object.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/parse.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/proc.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/process.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/random.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/range.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/rational.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/re.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/ruby.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/select.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/signal.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/string.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/struct.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/thread.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/time.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/variable.h
+nextafter.o: $(hdrdir)/ruby/internal/intern/vm.h
+nextafter.o: $(hdrdir)/ruby/internal/interpreter.h
+nextafter.o: $(hdrdir)/ruby/internal/iterator.h
+nextafter.o: $(hdrdir)/ruby/internal/memory.h
+nextafter.o: $(hdrdir)/ruby/internal/method.h
+nextafter.o: $(hdrdir)/ruby/internal/module.h
+nextafter.o: $(hdrdir)/ruby/internal/newobj.h
+nextafter.o: $(hdrdir)/ruby/internal/rgengc.h
+nextafter.o: $(hdrdir)/ruby/internal/scan_args.h
+nextafter.o: $(hdrdir)/ruby/internal/special_consts.h
+nextafter.o: $(hdrdir)/ruby/internal/static_assert.h
+nextafter.o: $(hdrdir)/ruby/internal/stdalign.h
+nextafter.o: $(hdrdir)/ruby/internal/stdbool.h
+nextafter.o: $(hdrdir)/ruby/internal/symbol.h
+nextafter.o: $(hdrdir)/ruby/internal/value.h
+nextafter.o: $(hdrdir)/ruby/internal/value_type.h
+nextafter.o: $(hdrdir)/ruby/internal/variable.h
+nextafter.o: $(hdrdir)/ruby/internal/warning_push.h
+nextafter.o: $(hdrdir)/ruby/internal/xmalloc.h
nextafter.o: $(hdrdir)/ruby/missing.h
nextafter.o: $(hdrdir)/ruby/ruby.h
nextafter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/funcall/depend b/ext/-test-/funcall/depend
index a5f43a8046..24e8c54bd9 100644
--- a/ext/-test-/funcall/depend
+++ b/ext/-test-/funcall/depend
@@ -4,8 +4,156 @@ funcall.o: $(arch_hdrdir)/ruby/config.h
funcall.o: $(hdrdir)/ruby.h
funcall.o: $(hdrdir)/ruby/assert.h
funcall.o: $(hdrdir)/ruby/backward.h
+funcall.o: $(hdrdir)/ruby/backward/2/assume.h
+funcall.o: $(hdrdir)/ruby/backward/2/attributes.h
+funcall.o: $(hdrdir)/ruby/backward/2/bool.h
+funcall.o: $(hdrdir)/ruby/backward/2/inttypes.h
+funcall.o: $(hdrdir)/ruby/backward/2/limits.h
+funcall.o: $(hdrdir)/ruby/backward/2/long_long.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdalign.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdarg.h
funcall.o: $(hdrdir)/ruby/defines.h
funcall.o: $(hdrdir)/ruby/intern.h
+funcall.o: $(hdrdir)/ruby/internal/abi.h
+funcall.o: $(hdrdir)/ruby/internal/anyargs.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+funcall.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+funcall.o: $(hdrdir)/ruby/internal/assume.h
+funcall.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+funcall.o: $(hdrdir)/ruby/internal/attr/artificial.h
+funcall.o: $(hdrdir)/ruby/internal/attr/cold.h
+funcall.o: $(hdrdir)/ruby/internal/attr/const.h
+funcall.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+funcall.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+funcall.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+funcall.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+funcall.o: $(hdrdir)/ruby/internal/attr/error.h
+funcall.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+funcall.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+funcall.o: $(hdrdir)/ruby/internal/attr/format.h
+funcall.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+funcall.o: $(hdrdir)/ruby/internal/attr/noalias.h
+funcall.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+funcall.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+funcall.o: $(hdrdir)/ruby/internal/attr/noinline.h
+funcall.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+funcall.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+funcall.o: $(hdrdir)/ruby/internal/attr/pure.h
+funcall.o: $(hdrdir)/ruby/internal/attr/restrict.h
+funcall.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+funcall.o: $(hdrdir)/ruby/internal/attr/warning.h
+funcall.o: $(hdrdir)/ruby/internal/attr/weakref.h
+funcall.o: $(hdrdir)/ruby/internal/cast.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+funcall.o: $(hdrdir)/ruby/internal/compiler_since.h
+funcall.o: $(hdrdir)/ruby/internal/config.h
+funcall.o: $(hdrdir)/ruby/internal/constant_p.h
+funcall.o: $(hdrdir)/ruby/internal/core.h
+funcall.o: $(hdrdir)/ruby/internal/core/rarray.h
+funcall.o: $(hdrdir)/ruby/internal/core/rbasic.h
+funcall.o: $(hdrdir)/ruby/internal/core/rbignum.h
+funcall.o: $(hdrdir)/ruby/internal/core/rclass.h
+funcall.o: $(hdrdir)/ruby/internal/core/rdata.h
+funcall.o: $(hdrdir)/ruby/internal/core/rfile.h
+funcall.o: $(hdrdir)/ruby/internal/core/rhash.h
+funcall.o: $(hdrdir)/ruby/internal/core/robject.h
+funcall.o: $(hdrdir)/ruby/internal/core/rregexp.h
+funcall.o: $(hdrdir)/ruby/internal/core/rstring.h
+funcall.o: $(hdrdir)/ruby/internal/core/rstruct.h
+funcall.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+funcall.o: $(hdrdir)/ruby/internal/ctype.h
+funcall.o: $(hdrdir)/ruby/internal/dllexport.h
+funcall.o: $(hdrdir)/ruby/internal/dosish.h
+funcall.o: $(hdrdir)/ruby/internal/error.h
+funcall.o: $(hdrdir)/ruby/internal/eval.h
+funcall.o: $(hdrdir)/ruby/internal/event.h
+funcall.o: $(hdrdir)/ruby/internal/fl_type.h
+funcall.o: $(hdrdir)/ruby/internal/gc.h
+funcall.o: $(hdrdir)/ruby/internal/glob.h
+funcall.o: $(hdrdir)/ruby/internal/globals.h
+funcall.o: $(hdrdir)/ruby/internal/has/attribute.h
+funcall.o: $(hdrdir)/ruby/internal/has/builtin.h
+funcall.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+funcall.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+funcall.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+funcall.o: $(hdrdir)/ruby/internal/has/extension.h
+funcall.o: $(hdrdir)/ruby/internal/has/feature.h
+funcall.o: $(hdrdir)/ruby/internal/has/warning.h
+funcall.o: $(hdrdir)/ruby/internal/intern/array.h
+funcall.o: $(hdrdir)/ruby/internal/intern/bignum.h
+funcall.o: $(hdrdir)/ruby/internal/intern/class.h
+funcall.o: $(hdrdir)/ruby/internal/intern/compar.h
+funcall.o: $(hdrdir)/ruby/internal/intern/complex.h
+funcall.o: $(hdrdir)/ruby/internal/intern/cont.h
+funcall.o: $(hdrdir)/ruby/internal/intern/dir.h
+funcall.o: $(hdrdir)/ruby/internal/intern/enum.h
+funcall.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+funcall.o: $(hdrdir)/ruby/internal/intern/error.h
+funcall.o: $(hdrdir)/ruby/internal/intern/eval.h
+funcall.o: $(hdrdir)/ruby/internal/intern/file.h
+funcall.o: $(hdrdir)/ruby/internal/intern/gc.h
+funcall.o: $(hdrdir)/ruby/internal/intern/hash.h
+funcall.o: $(hdrdir)/ruby/internal/intern/io.h
+funcall.o: $(hdrdir)/ruby/internal/intern/load.h
+funcall.o: $(hdrdir)/ruby/internal/intern/marshal.h
+funcall.o: $(hdrdir)/ruby/internal/intern/numeric.h
+funcall.o: $(hdrdir)/ruby/internal/intern/object.h
+funcall.o: $(hdrdir)/ruby/internal/intern/parse.h
+funcall.o: $(hdrdir)/ruby/internal/intern/proc.h
+funcall.o: $(hdrdir)/ruby/internal/intern/process.h
+funcall.o: $(hdrdir)/ruby/internal/intern/random.h
+funcall.o: $(hdrdir)/ruby/internal/intern/range.h
+funcall.o: $(hdrdir)/ruby/internal/intern/rational.h
+funcall.o: $(hdrdir)/ruby/internal/intern/re.h
+funcall.o: $(hdrdir)/ruby/internal/intern/ruby.h
+funcall.o: $(hdrdir)/ruby/internal/intern/select.h
+funcall.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+funcall.o: $(hdrdir)/ruby/internal/intern/signal.h
+funcall.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+funcall.o: $(hdrdir)/ruby/internal/intern/string.h
+funcall.o: $(hdrdir)/ruby/internal/intern/struct.h
+funcall.o: $(hdrdir)/ruby/internal/intern/thread.h
+funcall.o: $(hdrdir)/ruby/internal/intern/time.h
+funcall.o: $(hdrdir)/ruby/internal/intern/variable.h
+funcall.o: $(hdrdir)/ruby/internal/intern/vm.h
+funcall.o: $(hdrdir)/ruby/internal/interpreter.h
+funcall.o: $(hdrdir)/ruby/internal/iterator.h
+funcall.o: $(hdrdir)/ruby/internal/memory.h
+funcall.o: $(hdrdir)/ruby/internal/method.h
+funcall.o: $(hdrdir)/ruby/internal/module.h
+funcall.o: $(hdrdir)/ruby/internal/newobj.h
+funcall.o: $(hdrdir)/ruby/internal/rgengc.h
+funcall.o: $(hdrdir)/ruby/internal/scan_args.h
+funcall.o: $(hdrdir)/ruby/internal/special_consts.h
+funcall.o: $(hdrdir)/ruby/internal/static_assert.h
+funcall.o: $(hdrdir)/ruby/internal/stdalign.h
+funcall.o: $(hdrdir)/ruby/internal/stdbool.h
+funcall.o: $(hdrdir)/ruby/internal/symbol.h
+funcall.o: $(hdrdir)/ruby/internal/value.h
+funcall.o: $(hdrdir)/ruby/internal/value_type.h
+funcall.o: $(hdrdir)/ruby/internal/variable.h
+funcall.o: $(hdrdir)/ruby/internal/warning_push.h
+funcall.o: $(hdrdir)/ruby/internal/xmalloc.h
funcall.o: $(hdrdir)/ruby/missing.h
funcall.o: $(hdrdir)/ruby/ruby.h
funcall.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/funcall/funcall.c b/ext/-test-/funcall/funcall.c
index 43521bf2e9..a68d6de255 100644
--- a/ext/-test-/funcall/funcall.c
+++ b/ext/-test-/funcall/funcall.c
@@ -47,17 +47,17 @@ Init_funcall(void)
VALUE cRelay = rb_define_module_under(cTestFuncall, "Relay");
rb_define_singleton_method(cRelay,
- "with_funcall2",
- with_funcall2,
- -1);
+ "with_funcall2",
+ with_funcall2,
+ -1);
rb_define_singleton_method(cRelay,
"with_funcall_passing_block_kw",
with_funcall_passing_block_kw,
-1);
rb_define_singleton_method(cRelay,
- "with_funcall_passing_block",
- with_funcall_passing_block,
- -1);
+ "with_funcall_passing_block",
+ with_funcall_passing_block,
+ -1);
rb_define_singleton_method(cRelay,
"with_funcallv_public_kw",
with_funcallv_public_kw,
diff --git a/ext/-test-/gvl/call_without_gvl/call_without_gvl.c b/ext/-test-/gvl/call_without_gvl/call_without_gvl.c
index d77c2f323e..97946e925d 100644
--- a/ext/-test-/gvl/call_without_gvl/call_without_gvl.c
+++ b/ext/-test-/gvl/call_without_gvl/call_without_gvl.c
@@ -17,14 +17,14 @@ thread_runnable_sleep(VALUE thread, VALUE timeout)
struct timeval timeval;
if (NIL_P(timeout)) {
- rb_raise(rb_eArgError, "timeout must be non nil");
+ rb_raise(rb_eArgError, "timeout must be non nil");
}
timeval = rb_time_interval(timeout);
rb_thread_call_without_gvl(native_sleep_callback, &timeval, RUBY_UBF_IO, NULL);
- return thread;
+ return Qnil;
}
struct loop_ctl {
@@ -65,12 +65,14 @@ thread_ubf_async_safe(VALUE thread, VALUE notify_fd)
ctl.stop = 0;
rb_nogvl(do_loop, &ctl, stop_set, &ctl, RB_NOGVL_UBF_ASYNC_SAFE);
- return thread;
+ return Qnil;
}
void
Init_call_without_gvl(void)
{
- rb_define_method(rb_cThread, "__runnable_sleep__", thread_runnable_sleep, 1);
- rb_define_method(rb_cThread, "__ubf_async_safe__", thread_ubf_async_safe, 1);
+ VALUE mBug = rb_define_module("Bug");
+ VALUE klass = rb_define_module_under(mBug, "Thread");
+ rb_define_singleton_method(klass, "runnable_sleep", thread_runnable_sleep, 1);
+ rb_define_singleton_method(klass, "ubf_async_safe", thread_ubf_async_safe, 1);
}
diff --git a/ext/-test-/gvl/call_without_gvl/depend b/ext/-test-/gvl/call_without_gvl/depend
index 3d4253b977..cd184aa01c 100644
--- a/ext/-test-/gvl/call_without_gvl/depend
+++ b/ext/-test-/gvl/call_without_gvl/depend
@@ -3,8 +3,156 @@ call_without_gvl.o: $(RUBY_EXTCONF_H)
call_without_gvl.o: $(arch_hdrdir)/ruby/config.h
call_without_gvl.o: $(hdrdir)/ruby/assert.h
call_without_gvl.o: $(hdrdir)/ruby/backward.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/assume.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/attributes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/bool.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/limits.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/long_long.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdarg.h
call_without_gvl.o: $(hdrdir)/ruby/defines.h
call_without_gvl.o: $(hdrdir)/ruby/intern.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/abi.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/anyargs.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/assume.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/artificial.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/cold.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/const.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/error.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/format.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/noalias.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/noinline.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/pure.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/restrict.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/warning.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/attr/weakref.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/cast.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/compiler_since.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/config.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/constant_p.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rarray.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rbasic.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rbignum.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rclass.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rdata.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rfile.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rhash.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/robject.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rregexp.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rstring.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rstruct.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/ctype.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/dllexport.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/dosish.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/error.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/eval.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/event.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/fl_type.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/gc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/glob.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/globals.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/attribute.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/builtin.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/extension.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/feature.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/has/warning.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/array.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/bignum.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/class.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/compar.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/complex.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/cont.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/dir.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/enum.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/error.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/eval.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/file.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/gc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/hash.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/io.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/load.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/marshal.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/numeric.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/object.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/parse.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/proc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/process.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/random.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/range.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/rational.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/re.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/ruby.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/select.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/signal.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/string.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/struct.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/thread.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/time.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/variable.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/intern/vm.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/interpreter.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/iterator.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/memory.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/method.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/module.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/newobj.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/rgengc.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/scan_args.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/special_consts.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/static_assert.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/stdalign.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/stdbool.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/symbol.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/value.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/value_type.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/variable.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/warning_push.h
+call_without_gvl.o: $(hdrdir)/ruby/internal/xmalloc.h
call_without_gvl.o: $(hdrdir)/ruby/missing.h
call_without_gvl.o: $(hdrdir)/ruby/ruby.h
call_without_gvl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/hash/depend b/ext/-test-/hash/depend
index 5e2b8056c8..a8bc47e640 100644
--- a/ext/-test-/hash/depend
+++ b/ext/-test-/hash/depend
@@ -4,8 +4,156 @@ delete.o: $(arch_hdrdir)/ruby/config.h
delete.o: $(hdrdir)/ruby.h
delete.o: $(hdrdir)/ruby/assert.h
delete.o: $(hdrdir)/ruby/backward.h
+delete.o: $(hdrdir)/ruby/backward/2/assume.h
+delete.o: $(hdrdir)/ruby/backward/2/attributes.h
+delete.o: $(hdrdir)/ruby/backward/2/bool.h
+delete.o: $(hdrdir)/ruby/backward/2/inttypes.h
+delete.o: $(hdrdir)/ruby/backward/2/limits.h
+delete.o: $(hdrdir)/ruby/backward/2/long_long.h
+delete.o: $(hdrdir)/ruby/backward/2/stdalign.h
+delete.o: $(hdrdir)/ruby/backward/2/stdarg.h
delete.o: $(hdrdir)/ruby/defines.h
delete.o: $(hdrdir)/ruby/intern.h
+delete.o: $(hdrdir)/ruby/internal/abi.h
+delete.o: $(hdrdir)/ruby/internal/anyargs.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+delete.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+delete.o: $(hdrdir)/ruby/internal/assume.h
+delete.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+delete.o: $(hdrdir)/ruby/internal/attr/artificial.h
+delete.o: $(hdrdir)/ruby/internal/attr/cold.h
+delete.o: $(hdrdir)/ruby/internal/attr/const.h
+delete.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+delete.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+delete.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+delete.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+delete.o: $(hdrdir)/ruby/internal/attr/error.h
+delete.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+delete.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+delete.o: $(hdrdir)/ruby/internal/attr/format.h
+delete.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+delete.o: $(hdrdir)/ruby/internal/attr/noalias.h
+delete.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+delete.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+delete.o: $(hdrdir)/ruby/internal/attr/noinline.h
+delete.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+delete.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+delete.o: $(hdrdir)/ruby/internal/attr/pure.h
+delete.o: $(hdrdir)/ruby/internal/attr/restrict.h
+delete.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+delete.o: $(hdrdir)/ruby/internal/attr/warning.h
+delete.o: $(hdrdir)/ruby/internal/attr/weakref.h
+delete.o: $(hdrdir)/ruby/internal/cast.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+delete.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+delete.o: $(hdrdir)/ruby/internal/compiler_since.h
+delete.o: $(hdrdir)/ruby/internal/config.h
+delete.o: $(hdrdir)/ruby/internal/constant_p.h
+delete.o: $(hdrdir)/ruby/internal/core.h
+delete.o: $(hdrdir)/ruby/internal/core/rarray.h
+delete.o: $(hdrdir)/ruby/internal/core/rbasic.h
+delete.o: $(hdrdir)/ruby/internal/core/rbignum.h
+delete.o: $(hdrdir)/ruby/internal/core/rclass.h
+delete.o: $(hdrdir)/ruby/internal/core/rdata.h
+delete.o: $(hdrdir)/ruby/internal/core/rfile.h
+delete.o: $(hdrdir)/ruby/internal/core/rhash.h
+delete.o: $(hdrdir)/ruby/internal/core/robject.h
+delete.o: $(hdrdir)/ruby/internal/core/rregexp.h
+delete.o: $(hdrdir)/ruby/internal/core/rstring.h
+delete.o: $(hdrdir)/ruby/internal/core/rstruct.h
+delete.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+delete.o: $(hdrdir)/ruby/internal/ctype.h
+delete.o: $(hdrdir)/ruby/internal/dllexport.h
+delete.o: $(hdrdir)/ruby/internal/dosish.h
+delete.o: $(hdrdir)/ruby/internal/error.h
+delete.o: $(hdrdir)/ruby/internal/eval.h
+delete.o: $(hdrdir)/ruby/internal/event.h
+delete.o: $(hdrdir)/ruby/internal/fl_type.h
+delete.o: $(hdrdir)/ruby/internal/gc.h
+delete.o: $(hdrdir)/ruby/internal/glob.h
+delete.o: $(hdrdir)/ruby/internal/globals.h
+delete.o: $(hdrdir)/ruby/internal/has/attribute.h
+delete.o: $(hdrdir)/ruby/internal/has/builtin.h
+delete.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+delete.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+delete.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+delete.o: $(hdrdir)/ruby/internal/has/extension.h
+delete.o: $(hdrdir)/ruby/internal/has/feature.h
+delete.o: $(hdrdir)/ruby/internal/has/warning.h
+delete.o: $(hdrdir)/ruby/internal/intern/array.h
+delete.o: $(hdrdir)/ruby/internal/intern/bignum.h
+delete.o: $(hdrdir)/ruby/internal/intern/class.h
+delete.o: $(hdrdir)/ruby/internal/intern/compar.h
+delete.o: $(hdrdir)/ruby/internal/intern/complex.h
+delete.o: $(hdrdir)/ruby/internal/intern/cont.h
+delete.o: $(hdrdir)/ruby/internal/intern/dir.h
+delete.o: $(hdrdir)/ruby/internal/intern/enum.h
+delete.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+delete.o: $(hdrdir)/ruby/internal/intern/error.h
+delete.o: $(hdrdir)/ruby/internal/intern/eval.h
+delete.o: $(hdrdir)/ruby/internal/intern/file.h
+delete.o: $(hdrdir)/ruby/internal/intern/gc.h
+delete.o: $(hdrdir)/ruby/internal/intern/hash.h
+delete.o: $(hdrdir)/ruby/internal/intern/io.h
+delete.o: $(hdrdir)/ruby/internal/intern/load.h
+delete.o: $(hdrdir)/ruby/internal/intern/marshal.h
+delete.o: $(hdrdir)/ruby/internal/intern/numeric.h
+delete.o: $(hdrdir)/ruby/internal/intern/object.h
+delete.o: $(hdrdir)/ruby/internal/intern/parse.h
+delete.o: $(hdrdir)/ruby/internal/intern/proc.h
+delete.o: $(hdrdir)/ruby/internal/intern/process.h
+delete.o: $(hdrdir)/ruby/internal/intern/random.h
+delete.o: $(hdrdir)/ruby/internal/intern/range.h
+delete.o: $(hdrdir)/ruby/internal/intern/rational.h
+delete.o: $(hdrdir)/ruby/internal/intern/re.h
+delete.o: $(hdrdir)/ruby/internal/intern/ruby.h
+delete.o: $(hdrdir)/ruby/internal/intern/select.h
+delete.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+delete.o: $(hdrdir)/ruby/internal/intern/signal.h
+delete.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+delete.o: $(hdrdir)/ruby/internal/intern/string.h
+delete.o: $(hdrdir)/ruby/internal/intern/struct.h
+delete.o: $(hdrdir)/ruby/internal/intern/thread.h
+delete.o: $(hdrdir)/ruby/internal/intern/time.h
+delete.o: $(hdrdir)/ruby/internal/intern/variable.h
+delete.o: $(hdrdir)/ruby/internal/intern/vm.h
+delete.o: $(hdrdir)/ruby/internal/interpreter.h
+delete.o: $(hdrdir)/ruby/internal/iterator.h
+delete.o: $(hdrdir)/ruby/internal/memory.h
+delete.o: $(hdrdir)/ruby/internal/method.h
+delete.o: $(hdrdir)/ruby/internal/module.h
+delete.o: $(hdrdir)/ruby/internal/newobj.h
+delete.o: $(hdrdir)/ruby/internal/rgengc.h
+delete.o: $(hdrdir)/ruby/internal/scan_args.h
+delete.o: $(hdrdir)/ruby/internal/special_consts.h
+delete.o: $(hdrdir)/ruby/internal/static_assert.h
+delete.o: $(hdrdir)/ruby/internal/stdalign.h
+delete.o: $(hdrdir)/ruby/internal/stdbool.h
+delete.o: $(hdrdir)/ruby/internal/symbol.h
+delete.o: $(hdrdir)/ruby/internal/value.h
+delete.o: $(hdrdir)/ruby/internal/value_type.h
+delete.o: $(hdrdir)/ruby/internal/variable.h
+delete.o: $(hdrdir)/ruby/internal/warning_push.h
+delete.o: $(hdrdir)/ruby/internal/xmalloc.h
delete.o: $(hdrdir)/ruby/missing.h
delete.o: $(hdrdir)/ruby/ruby.h
delete.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/integer/core_ext.c b/ext/-test-/integer/core_ext.c
index 510ba4a1e6..e364aa4b40 100644
--- a/ext/-test-/integer/core_ext.c
+++ b/ext/-test-/integer/core_ext.c
@@ -1,19 +1,19 @@
-#include "internal.h"
+#include "internal/numeric.h"
static VALUE
-int_bignum_p(VALUE self)
+int_bignum_p(VALUE klass, VALUE self)
{
return RB_TYPE_P(self, T_BIGNUM) ? Qtrue : Qfalse;
}
static VALUE
-int_fixnum_p(VALUE self)
+int_fixnum_p(VALUE klass, VALUE self)
{
return FIXNUM_P(self) ? Qtrue : Qfalse;
}
static VALUE
-rb_int_to_bignum(VALUE x)
+rb_int_to_bignum(VALUE klass, VALUE x)
{
if (FIXNUM_P(x))
x = rb_int2big(FIX2LONG(x));
@@ -21,7 +21,7 @@ rb_int_to_bignum(VALUE x)
}
static VALUE
-positive_pow(VALUE x, VALUE y)
+positive_pow(VALUE klass, VALUE x, VALUE y)
{
return rb_int_positive_pow(NUM2LONG(x), NUM2ULONG(y));
}
@@ -29,8 +29,8 @@ positive_pow(VALUE x, VALUE y)
void
Init_core_ext(VALUE klass)
{
- rb_define_method(rb_cInteger, "bignum?", int_bignum_p, 0);
- rb_define_method(rb_cInteger, "fixnum?", int_fixnum_p, 0);
- rb_define_method(rb_cInteger, "to_bignum", rb_int_to_bignum, 0);
- rb_define_method(rb_cInteger, "positive_pow", positive_pow, 1);
+ rb_define_singleton_method(klass, "bignum?", int_bignum_p, 1);
+ rb_define_singleton_method(klass, "fixnum?", int_fixnum_p, 1);
+ rb_define_singleton_method(klass, "to_bignum", rb_int_to_bignum, 1);
+ rb_define_singleton_method(klass, "positive_pow", positive_pow, 2);
}
diff --git a/ext/-test-/integer/depend b/ext/-test-/integer/depend
index 5c9d581389..b12159f308 100644
--- a/ext/-test-/integer/depend
+++ b/ext/-test-/integer/depend
@@ -1,24 +1,327 @@
# AUTOGENERATED DEPENDENCIES START
core_ext.o: $(RUBY_EXTCONF_H)
core_ext.o: $(arch_hdrdir)/ruby/config.h
-core_ext.o: $(hdrdir)/ruby.h
core_ext.o: $(hdrdir)/ruby/assert.h
core_ext.o: $(hdrdir)/ruby/backward.h
+core_ext.o: $(hdrdir)/ruby/backward/2/assume.h
+core_ext.o: $(hdrdir)/ruby/backward/2/attributes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/bool.h
+core_ext.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+core_ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/limits.h
+core_ext.o: $(hdrdir)/ruby/backward/2/long_long.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
core_ext.o: $(hdrdir)/ruby/defines.h
core_ext.o: $(hdrdir)/ruby/intern.h
+core_ext.o: $(hdrdir)/ruby/internal/abi.h
+core_ext.o: $(hdrdir)/ruby/internal/anyargs.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+core_ext.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+core_ext.o: $(hdrdir)/ruby/internal/assume.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/artificial.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/cold.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/const.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/error.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/format.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/noalias.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/noinline.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/pure.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/restrict.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/warning.h
+core_ext.o: $(hdrdir)/ruby/internal/attr/weakref.h
+core_ext.o: $(hdrdir)/ruby/internal/cast.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+core_ext.o: $(hdrdir)/ruby/internal/compiler_since.h
+core_ext.o: $(hdrdir)/ruby/internal/config.h
+core_ext.o: $(hdrdir)/ruby/internal/constant_p.h
+core_ext.o: $(hdrdir)/ruby/internal/core.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rarray.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rbasic.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rbignum.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rclass.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rdata.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rfile.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rhash.h
+core_ext.o: $(hdrdir)/ruby/internal/core/robject.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rregexp.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rstring.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rstruct.h
+core_ext.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+core_ext.o: $(hdrdir)/ruby/internal/ctype.h
+core_ext.o: $(hdrdir)/ruby/internal/dllexport.h
+core_ext.o: $(hdrdir)/ruby/internal/dosish.h
+core_ext.o: $(hdrdir)/ruby/internal/error.h
+core_ext.o: $(hdrdir)/ruby/internal/eval.h
+core_ext.o: $(hdrdir)/ruby/internal/event.h
+core_ext.o: $(hdrdir)/ruby/internal/fl_type.h
+core_ext.o: $(hdrdir)/ruby/internal/gc.h
+core_ext.o: $(hdrdir)/ruby/internal/glob.h
+core_ext.o: $(hdrdir)/ruby/internal/globals.h
+core_ext.o: $(hdrdir)/ruby/internal/has/attribute.h
+core_ext.o: $(hdrdir)/ruby/internal/has/builtin.h
+core_ext.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+core_ext.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+core_ext.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+core_ext.o: $(hdrdir)/ruby/internal/has/extension.h
+core_ext.o: $(hdrdir)/ruby/internal/has/feature.h
+core_ext.o: $(hdrdir)/ruby/internal/has/warning.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/array.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/bignum.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/class.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/compar.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/complex.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/cont.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/dir.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/enum.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/error.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/eval.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/file.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/gc.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/hash.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/io.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/load.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/marshal.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/numeric.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/object.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/parse.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/proc.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/process.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/random.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/range.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/rational.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/re.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/ruby.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/select.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/signal.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/string.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/struct.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/thread.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/time.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/variable.h
+core_ext.o: $(hdrdir)/ruby/internal/intern/vm.h
+core_ext.o: $(hdrdir)/ruby/internal/interpreter.h
+core_ext.o: $(hdrdir)/ruby/internal/iterator.h
+core_ext.o: $(hdrdir)/ruby/internal/memory.h
+core_ext.o: $(hdrdir)/ruby/internal/method.h
+core_ext.o: $(hdrdir)/ruby/internal/module.h
+core_ext.o: $(hdrdir)/ruby/internal/newobj.h
+core_ext.o: $(hdrdir)/ruby/internal/rgengc.h
+core_ext.o: $(hdrdir)/ruby/internal/scan_args.h
+core_ext.o: $(hdrdir)/ruby/internal/special_consts.h
+core_ext.o: $(hdrdir)/ruby/internal/static_assert.h
+core_ext.o: $(hdrdir)/ruby/internal/stdalign.h
+core_ext.o: $(hdrdir)/ruby/internal/stdbool.h
+core_ext.o: $(hdrdir)/ruby/internal/symbol.h
+core_ext.o: $(hdrdir)/ruby/internal/value.h
+core_ext.o: $(hdrdir)/ruby/internal/value_type.h
+core_ext.o: $(hdrdir)/ruby/internal/variable.h
+core_ext.o: $(hdrdir)/ruby/internal/warning_push.h
+core_ext.o: $(hdrdir)/ruby/internal/xmalloc.h
core_ext.o: $(hdrdir)/ruby/missing.h
core_ext.o: $(hdrdir)/ruby/ruby.h
core_ext.o: $(hdrdir)/ruby/st.h
core_ext.o: $(hdrdir)/ruby/subst.h
-core_ext.o: $(top_srcdir)/internal.h
+core_ext.o: $(top_srcdir)/internal/bignum.h
+core_ext.o: $(top_srcdir)/internal/bits.h
+core_ext.o: $(top_srcdir)/internal/compilers.h
+core_ext.o: $(top_srcdir)/internal/fixnum.h
+core_ext.o: $(top_srcdir)/internal/numeric.h
+core_ext.o: $(top_srcdir)/internal/serial.h
+core_ext.o: $(top_srcdir)/internal/static_assert.h
+core_ext.o: $(top_srcdir)/internal/vm.h
core_ext.o: core_ext.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -29,8 +332,156 @@ my_integer.o: $(arch_hdrdir)/ruby/config.h
my_integer.o: $(hdrdir)/ruby.h
my_integer.o: $(hdrdir)/ruby/assert.h
my_integer.o: $(hdrdir)/ruby/backward.h
+my_integer.o: $(hdrdir)/ruby/backward/2/assume.h
+my_integer.o: $(hdrdir)/ruby/backward/2/attributes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/bool.h
+my_integer.o: $(hdrdir)/ruby/backward/2/inttypes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/limits.h
+my_integer.o: $(hdrdir)/ruby/backward/2/long_long.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdalign.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdarg.h
my_integer.o: $(hdrdir)/ruby/defines.h
my_integer.o: $(hdrdir)/ruby/intern.h
+my_integer.o: $(hdrdir)/ruby/internal/abi.h
+my_integer.o: $(hdrdir)/ruby/internal/anyargs.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+my_integer.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+my_integer.o: $(hdrdir)/ruby/internal/assume.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/artificial.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/cold.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/const.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/error.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/format.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/noalias.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/noinline.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/pure.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/restrict.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/warning.h
+my_integer.o: $(hdrdir)/ruby/internal/attr/weakref.h
+my_integer.o: $(hdrdir)/ruby/internal/cast.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+my_integer.o: $(hdrdir)/ruby/internal/compiler_since.h
+my_integer.o: $(hdrdir)/ruby/internal/config.h
+my_integer.o: $(hdrdir)/ruby/internal/constant_p.h
+my_integer.o: $(hdrdir)/ruby/internal/core.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rarray.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rbasic.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rbignum.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rclass.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rdata.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rfile.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rhash.h
+my_integer.o: $(hdrdir)/ruby/internal/core/robject.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rregexp.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rstring.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rstruct.h
+my_integer.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+my_integer.o: $(hdrdir)/ruby/internal/ctype.h
+my_integer.o: $(hdrdir)/ruby/internal/dllexport.h
+my_integer.o: $(hdrdir)/ruby/internal/dosish.h
+my_integer.o: $(hdrdir)/ruby/internal/error.h
+my_integer.o: $(hdrdir)/ruby/internal/eval.h
+my_integer.o: $(hdrdir)/ruby/internal/event.h
+my_integer.o: $(hdrdir)/ruby/internal/fl_type.h
+my_integer.o: $(hdrdir)/ruby/internal/gc.h
+my_integer.o: $(hdrdir)/ruby/internal/glob.h
+my_integer.o: $(hdrdir)/ruby/internal/globals.h
+my_integer.o: $(hdrdir)/ruby/internal/has/attribute.h
+my_integer.o: $(hdrdir)/ruby/internal/has/builtin.h
+my_integer.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+my_integer.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+my_integer.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+my_integer.o: $(hdrdir)/ruby/internal/has/extension.h
+my_integer.o: $(hdrdir)/ruby/internal/has/feature.h
+my_integer.o: $(hdrdir)/ruby/internal/has/warning.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/array.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/bignum.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/class.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/compar.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/complex.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/cont.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/dir.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/enum.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/error.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/eval.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/file.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/gc.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/hash.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/io.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/load.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/marshal.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/numeric.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/object.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/parse.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/proc.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/process.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/random.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/range.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/rational.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/re.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/ruby.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/select.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/signal.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/string.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/struct.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/thread.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/time.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/variable.h
+my_integer.o: $(hdrdir)/ruby/internal/intern/vm.h
+my_integer.o: $(hdrdir)/ruby/internal/interpreter.h
+my_integer.o: $(hdrdir)/ruby/internal/iterator.h
+my_integer.o: $(hdrdir)/ruby/internal/memory.h
+my_integer.o: $(hdrdir)/ruby/internal/method.h
+my_integer.o: $(hdrdir)/ruby/internal/module.h
+my_integer.o: $(hdrdir)/ruby/internal/newobj.h
+my_integer.o: $(hdrdir)/ruby/internal/rgengc.h
+my_integer.o: $(hdrdir)/ruby/internal/scan_args.h
+my_integer.o: $(hdrdir)/ruby/internal/special_consts.h
+my_integer.o: $(hdrdir)/ruby/internal/static_assert.h
+my_integer.o: $(hdrdir)/ruby/internal/stdalign.h
+my_integer.o: $(hdrdir)/ruby/internal/stdbool.h
+my_integer.o: $(hdrdir)/ruby/internal/symbol.h
+my_integer.o: $(hdrdir)/ruby/internal/value.h
+my_integer.o: $(hdrdir)/ruby/internal/value_type.h
+my_integer.o: $(hdrdir)/ruby/internal/variable.h
+my_integer.o: $(hdrdir)/ruby/internal/warning_push.h
+my_integer.o: $(hdrdir)/ruby/internal/xmalloc.h
my_integer.o: $(hdrdir)/ruby/missing.h
my_integer.o: $(hdrdir)/ruby/ruby.h
my_integer.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iseq_load/depend b/ext/-test-/iseq_load/depend
index ac549546ec..308956550c 100644
--- a/ext/-test-/iseq_load/depend
+++ b/ext/-test-/iseq_load/depend
@@ -4,8 +4,156 @@ iseq_load.o: $(arch_hdrdir)/ruby/config.h
iseq_load.o: $(hdrdir)/ruby.h
iseq_load.o: $(hdrdir)/ruby/assert.h
iseq_load.o: $(hdrdir)/ruby/backward.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/assume.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/attributes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/bool.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/inttypes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/limits.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/long_long.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdalign.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdarg.h
iseq_load.o: $(hdrdir)/ruby/defines.h
iseq_load.o: $(hdrdir)/ruby/intern.h
+iseq_load.o: $(hdrdir)/ruby/internal/abi.h
+iseq_load.o: $(hdrdir)/ruby/internal/anyargs.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+iseq_load.o: $(hdrdir)/ruby/internal/assume.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/artificial.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/cold.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/const.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/error.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/format.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/noalias.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/noinline.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/pure.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/restrict.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/warning.h
+iseq_load.o: $(hdrdir)/ruby/internal/attr/weakref.h
+iseq_load.o: $(hdrdir)/ruby/internal/cast.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+iseq_load.o: $(hdrdir)/ruby/internal/compiler_since.h
+iseq_load.o: $(hdrdir)/ruby/internal/config.h
+iseq_load.o: $(hdrdir)/ruby/internal/constant_p.h
+iseq_load.o: $(hdrdir)/ruby/internal/core.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rarray.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rbasic.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rbignum.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rclass.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rdata.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rfile.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rhash.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/robject.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rregexp.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rstring.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rstruct.h
+iseq_load.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+iseq_load.o: $(hdrdir)/ruby/internal/ctype.h
+iseq_load.o: $(hdrdir)/ruby/internal/dllexport.h
+iseq_load.o: $(hdrdir)/ruby/internal/dosish.h
+iseq_load.o: $(hdrdir)/ruby/internal/error.h
+iseq_load.o: $(hdrdir)/ruby/internal/eval.h
+iseq_load.o: $(hdrdir)/ruby/internal/event.h
+iseq_load.o: $(hdrdir)/ruby/internal/fl_type.h
+iseq_load.o: $(hdrdir)/ruby/internal/gc.h
+iseq_load.o: $(hdrdir)/ruby/internal/glob.h
+iseq_load.o: $(hdrdir)/ruby/internal/globals.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/attribute.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/builtin.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/extension.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/feature.h
+iseq_load.o: $(hdrdir)/ruby/internal/has/warning.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/array.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/bignum.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/class.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/compar.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/complex.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/cont.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/dir.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/enum.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/error.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/eval.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/file.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/gc.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/hash.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/io.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/load.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/marshal.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/numeric.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/object.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/parse.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/proc.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/process.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/random.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/range.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/rational.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/re.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/ruby.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/select.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/signal.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/string.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/struct.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/thread.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/time.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/variable.h
+iseq_load.o: $(hdrdir)/ruby/internal/intern/vm.h
+iseq_load.o: $(hdrdir)/ruby/internal/interpreter.h
+iseq_load.o: $(hdrdir)/ruby/internal/iterator.h
+iseq_load.o: $(hdrdir)/ruby/internal/memory.h
+iseq_load.o: $(hdrdir)/ruby/internal/method.h
+iseq_load.o: $(hdrdir)/ruby/internal/module.h
+iseq_load.o: $(hdrdir)/ruby/internal/newobj.h
+iseq_load.o: $(hdrdir)/ruby/internal/rgengc.h
+iseq_load.o: $(hdrdir)/ruby/internal/scan_args.h
+iseq_load.o: $(hdrdir)/ruby/internal/special_consts.h
+iseq_load.o: $(hdrdir)/ruby/internal/static_assert.h
+iseq_load.o: $(hdrdir)/ruby/internal/stdalign.h
+iseq_load.o: $(hdrdir)/ruby/internal/stdbool.h
+iseq_load.o: $(hdrdir)/ruby/internal/symbol.h
+iseq_load.o: $(hdrdir)/ruby/internal/value.h
+iseq_load.o: $(hdrdir)/ruby/internal/value_type.h
+iseq_load.o: $(hdrdir)/ruby/internal/variable.h
+iseq_load.o: $(hdrdir)/ruby/internal/warning_push.h
+iseq_load.o: $(hdrdir)/ruby/internal/xmalloc.h
iseq_load.o: $(hdrdir)/ruby/missing.h
iseq_load.o: $(hdrdir)/ruby/ruby.h
iseq_load.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iter/depend b/ext/-test-/iter/depend
index 5e754950c1..d14c164cd4 100644
--- a/ext/-test-/iter/depend
+++ b/ext/-test-/iter/depend
@@ -4,8 +4,156 @@ break.o: $(arch_hdrdir)/ruby/config.h
break.o: $(hdrdir)/ruby.h
break.o: $(hdrdir)/ruby/assert.h
break.o: $(hdrdir)/ruby/backward.h
+break.o: $(hdrdir)/ruby/backward/2/assume.h
+break.o: $(hdrdir)/ruby/backward/2/attributes.h
+break.o: $(hdrdir)/ruby/backward/2/bool.h
+break.o: $(hdrdir)/ruby/backward/2/inttypes.h
+break.o: $(hdrdir)/ruby/backward/2/limits.h
+break.o: $(hdrdir)/ruby/backward/2/long_long.h
+break.o: $(hdrdir)/ruby/backward/2/stdalign.h
+break.o: $(hdrdir)/ruby/backward/2/stdarg.h
break.o: $(hdrdir)/ruby/defines.h
break.o: $(hdrdir)/ruby/intern.h
+break.o: $(hdrdir)/ruby/internal/abi.h
+break.o: $(hdrdir)/ruby/internal/anyargs.h
+break.o: $(hdrdir)/ruby/internal/arithmetic.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+break.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+break.o: $(hdrdir)/ruby/internal/assume.h
+break.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+break.o: $(hdrdir)/ruby/internal/attr/artificial.h
+break.o: $(hdrdir)/ruby/internal/attr/cold.h
+break.o: $(hdrdir)/ruby/internal/attr/const.h
+break.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+break.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+break.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+break.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+break.o: $(hdrdir)/ruby/internal/attr/error.h
+break.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+break.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+break.o: $(hdrdir)/ruby/internal/attr/format.h
+break.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+break.o: $(hdrdir)/ruby/internal/attr/noalias.h
+break.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+break.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+break.o: $(hdrdir)/ruby/internal/attr/noinline.h
+break.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+break.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+break.o: $(hdrdir)/ruby/internal/attr/pure.h
+break.o: $(hdrdir)/ruby/internal/attr/restrict.h
+break.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+break.o: $(hdrdir)/ruby/internal/attr/warning.h
+break.o: $(hdrdir)/ruby/internal/attr/weakref.h
+break.o: $(hdrdir)/ruby/internal/cast.h
+break.o: $(hdrdir)/ruby/internal/compiler_is.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+break.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+break.o: $(hdrdir)/ruby/internal/compiler_since.h
+break.o: $(hdrdir)/ruby/internal/config.h
+break.o: $(hdrdir)/ruby/internal/constant_p.h
+break.o: $(hdrdir)/ruby/internal/core.h
+break.o: $(hdrdir)/ruby/internal/core/rarray.h
+break.o: $(hdrdir)/ruby/internal/core/rbasic.h
+break.o: $(hdrdir)/ruby/internal/core/rbignum.h
+break.o: $(hdrdir)/ruby/internal/core/rclass.h
+break.o: $(hdrdir)/ruby/internal/core/rdata.h
+break.o: $(hdrdir)/ruby/internal/core/rfile.h
+break.o: $(hdrdir)/ruby/internal/core/rhash.h
+break.o: $(hdrdir)/ruby/internal/core/robject.h
+break.o: $(hdrdir)/ruby/internal/core/rregexp.h
+break.o: $(hdrdir)/ruby/internal/core/rstring.h
+break.o: $(hdrdir)/ruby/internal/core/rstruct.h
+break.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+break.o: $(hdrdir)/ruby/internal/ctype.h
+break.o: $(hdrdir)/ruby/internal/dllexport.h
+break.o: $(hdrdir)/ruby/internal/dosish.h
+break.o: $(hdrdir)/ruby/internal/error.h
+break.o: $(hdrdir)/ruby/internal/eval.h
+break.o: $(hdrdir)/ruby/internal/event.h
+break.o: $(hdrdir)/ruby/internal/fl_type.h
+break.o: $(hdrdir)/ruby/internal/gc.h
+break.o: $(hdrdir)/ruby/internal/glob.h
+break.o: $(hdrdir)/ruby/internal/globals.h
+break.o: $(hdrdir)/ruby/internal/has/attribute.h
+break.o: $(hdrdir)/ruby/internal/has/builtin.h
+break.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+break.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+break.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+break.o: $(hdrdir)/ruby/internal/has/extension.h
+break.o: $(hdrdir)/ruby/internal/has/feature.h
+break.o: $(hdrdir)/ruby/internal/has/warning.h
+break.o: $(hdrdir)/ruby/internal/intern/array.h
+break.o: $(hdrdir)/ruby/internal/intern/bignum.h
+break.o: $(hdrdir)/ruby/internal/intern/class.h
+break.o: $(hdrdir)/ruby/internal/intern/compar.h
+break.o: $(hdrdir)/ruby/internal/intern/complex.h
+break.o: $(hdrdir)/ruby/internal/intern/cont.h
+break.o: $(hdrdir)/ruby/internal/intern/dir.h
+break.o: $(hdrdir)/ruby/internal/intern/enum.h
+break.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+break.o: $(hdrdir)/ruby/internal/intern/error.h
+break.o: $(hdrdir)/ruby/internal/intern/eval.h
+break.o: $(hdrdir)/ruby/internal/intern/file.h
+break.o: $(hdrdir)/ruby/internal/intern/gc.h
+break.o: $(hdrdir)/ruby/internal/intern/hash.h
+break.o: $(hdrdir)/ruby/internal/intern/io.h
+break.o: $(hdrdir)/ruby/internal/intern/load.h
+break.o: $(hdrdir)/ruby/internal/intern/marshal.h
+break.o: $(hdrdir)/ruby/internal/intern/numeric.h
+break.o: $(hdrdir)/ruby/internal/intern/object.h
+break.o: $(hdrdir)/ruby/internal/intern/parse.h
+break.o: $(hdrdir)/ruby/internal/intern/proc.h
+break.o: $(hdrdir)/ruby/internal/intern/process.h
+break.o: $(hdrdir)/ruby/internal/intern/random.h
+break.o: $(hdrdir)/ruby/internal/intern/range.h
+break.o: $(hdrdir)/ruby/internal/intern/rational.h
+break.o: $(hdrdir)/ruby/internal/intern/re.h
+break.o: $(hdrdir)/ruby/internal/intern/ruby.h
+break.o: $(hdrdir)/ruby/internal/intern/select.h
+break.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+break.o: $(hdrdir)/ruby/internal/intern/signal.h
+break.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+break.o: $(hdrdir)/ruby/internal/intern/string.h
+break.o: $(hdrdir)/ruby/internal/intern/struct.h
+break.o: $(hdrdir)/ruby/internal/intern/thread.h
+break.o: $(hdrdir)/ruby/internal/intern/time.h
+break.o: $(hdrdir)/ruby/internal/intern/variable.h
+break.o: $(hdrdir)/ruby/internal/intern/vm.h
+break.o: $(hdrdir)/ruby/internal/interpreter.h
+break.o: $(hdrdir)/ruby/internal/iterator.h
+break.o: $(hdrdir)/ruby/internal/memory.h
+break.o: $(hdrdir)/ruby/internal/method.h
+break.o: $(hdrdir)/ruby/internal/module.h
+break.o: $(hdrdir)/ruby/internal/newobj.h
+break.o: $(hdrdir)/ruby/internal/rgengc.h
+break.o: $(hdrdir)/ruby/internal/scan_args.h
+break.o: $(hdrdir)/ruby/internal/special_consts.h
+break.o: $(hdrdir)/ruby/internal/static_assert.h
+break.o: $(hdrdir)/ruby/internal/stdalign.h
+break.o: $(hdrdir)/ruby/internal/stdbool.h
+break.o: $(hdrdir)/ruby/internal/symbol.h
+break.o: $(hdrdir)/ruby/internal/value.h
+break.o: $(hdrdir)/ruby/internal/value_type.h
+break.o: $(hdrdir)/ruby/internal/variable.h
+break.o: $(hdrdir)/ruby/internal/warning_push.h
+break.o: $(hdrdir)/ruby/internal/xmalloc.h
break.o: $(hdrdir)/ruby/missing.h
break.o: $(hdrdir)/ruby/ruby.h
break.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -28,8 +324,156 @@ yield.o: $(arch_hdrdir)/ruby/config.h
yield.o: $(hdrdir)/ruby.h
yield.o: $(hdrdir)/ruby/assert.h
yield.o: $(hdrdir)/ruby/backward.h
+yield.o: $(hdrdir)/ruby/backward/2/assume.h
+yield.o: $(hdrdir)/ruby/backward/2/attributes.h
+yield.o: $(hdrdir)/ruby/backward/2/bool.h
+yield.o: $(hdrdir)/ruby/backward/2/inttypes.h
+yield.o: $(hdrdir)/ruby/backward/2/limits.h
+yield.o: $(hdrdir)/ruby/backward/2/long_long.h
+yield.o: $(hdrdir)/ruby/backward/2/stdalign.h
+yield.o: $(hdrdir)/ruby/backward/2/stdarg.h
yield.o: $(hdrdir)/ruby/defines.h
yield.o: $(hdrdir)/ruby/intern.h
+yield.o: $(hdrdir)/ruby/internal/abi.h
+yield.o: $(hdrdir)/ruby/internal/anyargs.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+yield.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+yield.o: $(hdrdir)/ruby/internal/assume.h
+yield.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+yield.o: $(hdrdir)/ruby/internal/attr/artificial.h
+yield.o: $(hdrdir)/ruby/internal/attr/cold.h
+yield.o: $(hdrdir)/ruby/internal/attr/const.h
+yield.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+yield.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+yield.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+yield.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+yield.o: $(hdrdir)/ruby/internal/attr/error.h
+yield.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+yield.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+yield.o: $(hdrdir)/ruby/internal/attr/format.h
+yield.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+yield.o: $(hdrdir)/ruby/internal/attr/noalias.h
+yield.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+yield.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+yield.o: $(hdrdir)/ruby/internal/attr/noinline.h
+yield.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+yield.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+yield.o: $(hdrdir)/ruby/internal/attr/pure.h
+yield.o: $(hdrdir)/ruby/internal/attr/restrict.h
+yield.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+yield.o: $(hdrdir)/ruby/internal/attr/warning.h
+yield.o: $(hdrdir)/ruby/internal/attr/weakref.h
+yield.o: $(hdrdir)/ruby/internal/cast.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+yield.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+yield.o: $(hdrdir)/ruby/internal/compiler_since.h
+yield.o: $(hdrdir)/ruby/internal/config.h
+yield.o: $(hdrdir)/ruby/internal/constant_p.h
+yield.o: $(hdrdir)/ruby/internal/core.h
+yield.o: $(hdrdir)/ruby/internal/core/rarray.h
+yield.o: $(hdrdir)/ruby/internal/core/rbasic.h
+yield.o: $(hdrdir)/ruby/internal/core/rbignum.h
+yield.o: $(hdrdir)/ruby/internal/core/rclass.h
+yield.o: $(hdrdir)/ruby/internal/core/rdata.h
+yield.o: $(hdrdir)/ruby/internal/core/rfile.h
+yield.o: $(hdrdir)/ruby/internal/core/rhash.h
+yield.o: $(hdrdir)/ruby/internal/core/robject.h
+yield.o: $(hdrdir)/ruby/internal/core/rregexp.h
+yield.o: $(hdrdir)/ruby/internal/core/rstring.h
+yield.o: $(hdrdir)/ruby/internal/core/rstruct.h
+yield.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+yield.o: $(hdrdir)/ruby/internal/ctype.h
+yield.o: $(hdrdir)/ruby/internal/dllexport.h
+yield.o: $(hdrdir)/ruby/internal/dosish.h
+yield.o: $(hdrdir)/ruby/internal/error.h
+yield.o: $(hdrdir)/ruby/internal/eval.h
+yield.o: $(hdrdir)/ruby/internal/event.h
+yield.o: $(hdrdir)/ruby/internal/fl_type.h
+yield.o: $(hdrdir)/ruby/internal/gc.h
+yield.o: $(hdrdir)/ruby/internal/glob.h
+yield.o: $(hdrdir)/ruby/internal/globals.h
+yield.o: $(hdrdir)/ruby/internal/has/attribute.h
+yield.o: $(hdrdir)/ruby/internal/has/builtin.h
+yield.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+yield.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+yield.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+yield.o: $(hdrdir)/ruby/internal/has/extension.h
+yield.o: $(hdrdir)/ruby/internal/has/feature.h
+yield.o: $(hdrdir)/ruby/internal/has/warning.h
+yield.o: $(hdrdir)/ruby/internal/intern/array.h
+yield.o: $(hdrdir)/ruby/internal/intern/bignum.h
+yield.o: $(hdrdir)/ruby/internal/intern/class.h
+yield.o: $(hdrdir)/ruby/internal/intern/compar.h
+yield.o: $(hdrdir)/ruby/internal/intern/complex.h
+yield.o: $(hdrdir)/ruby/internal/intern/cont.h
+yield.o: $(hdrdir)/ruby/internal/intern/dir.h
+yield.o: $(hdrdir)/ruby/internal/intern/enum.h
+yield.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+yield.o: $(hdrdir)/ruby/internal/intern/error.h
+yield.o: $(hdrdir)/ruby/internal/intern/eval.h
+yield.o: $(hdrdir)/ruby/internal/intern/file.h
+yield.o: $(hdrdir)/ruby/internal/intern/gc.h
+yield.o: $(hdrdir)/ruby/internal/intern/hash.h
+yield.o: $(hdrdir)/ruby/internal/intern/io.h
+yield.o: $(hdrdir)/ruby/internal/intern/load.h
+yield.o: $(hdrdir)/ruby/internal/intern/marshal.h
+yield.o: $(hdrdir)/ruby/internal/intern/numeric.h
+yield.o: $(hdrdir)/ruby/internal/intern/object.h
+yield.o: $(hdrdir)/ruby/internal/intern/parse.h
+yield.o: $(hdrdir)/ruby/internal/intern/proc.h
+yield.o: $(hdrdir)/ruby/internal/intern/process.h
+yield.o: $(hdrdir)/ruby/internal/intern/random.h
+yield.o: $(hdrdir)/ruby/internal/intern/range.h
+yield.o: $(hdrdir)/ruby/internal/intern/rational.h
+yield.o: $(hdrdir)/ruby/internal/intern/re.h
+yield.o: $(hdrdir)/ruby/internal/intern/ruby.h
+yield.o: $(hdrdir)/ruby/internal/intern/select.h
+yield.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+yield.o: $(hdrdir)/ruby/internal/intern/signal.h
+yield.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+yield.o: $(hdrdir)/ruby/internal/intern/string.h
+yield.o: $(hdrdir)/ruby/internal/intern/struct.h
+yield.o: $(hdrdir)/ruby/internal/intern/thread.h
+yield.o: $(hdrdir)/ruby/internal/intern/time.h
+yield.o: $(hdrdir)/ruby/internal/intern/variable.h
+yield.o: $(hdrdir)/ruby/internal/intern/vm.h
+yield.o: $(hdrdir)/ruby/internal/interpreter.h
+yield.o: $(hdrdir)/ruby/internal/iterator.h
+yield.o: $(hdrdir)/ruby/internal/memory.h
+yield.o: $(hdrdir)/ruby/internal/method.h
+yield.o: $(hdrdir)/ruby/internal/module.h
+yield.o: $(hdrdir)/ruby/internal/newobj.h
+yield.o: $(hdrdir)/ruby/internal/rgengc.h
+yield.o: $(hdrdir)/ruby/internal/scan_args.h
+yield.o: $(hdrdir)/ruby/internal/special_consts.h
+yield.o: $(hdrdir)/ruby/internal/static_assert.h
+yield.o: $(hdrdir)/ruby/internal/stdalign.h
+yield.o: $(hdrdir)/ruby/internal/stdbool.h
+yield.o: $(hdrdir)/ruby/internal/symbol.h
+yield.o: $(hdrdir)/ruby/internal/value.h
+yield.o: $(hdrdir)/ruby/internal/value_type.h
+yield.o: $(hdrdir)/ruby/internal/variable.h
+yield.o: $(hdrdir)/ruby/internal/warning_push.h
+yield.o: $(hdrdir)/ruby/internal/xmalloc.h
yield.o: $(hdrdir)/ruby/missing.h
yield.o: $(hdrdir)/ruby/ruby.h
yield.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/load/dot.dot/depend b/ext/-test-/load/dot.dot/depend
index a0445e288b..d8b8937c3c 100644
--- a/ext/-test-/load/dot.dot/depend
+++ b/ext/-test-/load/dot.dot/depend
@@ -1,3 +1,162 @@
# AUTOGENERATED DEPENDENCIES START
+dot.dot.o: $(RUBY_EXTCONF_H)
+dot.dot.o: $(arch_hdrdir)/ruby/config.h
+dot.dot.o: $(hdrdir)/ruby.h
+dot.dot.o: $(hdrdir)/ruby/assert.h
+dot.dot.o: $(hdrdir)/ruby/backward.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/assume.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/attributes.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/bool.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/inttypes.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/limits.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/long_long.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/stdalign.h
+dot.dot.o: $(hdrdir)/ruby/backward/2/stdarg.h
+dot.dot.o: $(hdrdir)/ruby/defines.h
+dot.dot.o: $(hdrdir)/ruby/intern.h
+dot.dot.o: $(hdrdir)/ruby/internal/abi.h
+dot.dot.o: $(hdrdir)/ruby/internal/anyargs.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+dot.dot.o: $(hdrdir)/ruby/internal/assume.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/artificial.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/cold.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/const.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/error.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/format.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/noalias.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/noinline.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/pure.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/restrict.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/warning.h
+dot.dot.o: $(hdrdir)/ruby/internal/attr/weakref.h
+dot.dot.o: $(hdrdir)/ruby/internal/cast.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+dot.dot.o: $(hdrdir)/ruby/internal/compiler_since.h
+dot.dot.o: $(hdrdir)/ruby/internal/config.h
+dot.dot.o: $(hdrdir)/ruby/internal/constant_p.h
+dot.dot.o: $(hdrdir)/ruby/internal/core.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rarray.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rbasic.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rbignum.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rclass.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rdata.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rfile.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rhash.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/robject.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rregexp.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rstring.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rstruct.h
+dot.dot.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+dot.dot.o: $(hdrdir)/ruby/internal/ctype.h
+dot.dot.o: $(hdrdir)/ruby/internal/dllexport.h
+dot.dot.o: $(hdrdir)/ruby/internal/dosish.h
+dot.dot.o: $(hdrdir)/ruby/internal/error.h
+dot.dot.o: $(hdrdir)/ruby/internal/eval.h
+dot.dot.o: $(hdrdir)/ruby/internal/event.h
+dot.dot.o: $(hdrdir)/ruby/internal/fl_type.h
+dot.dot.o: $(hdrdir)/ruby/internal/gc.h
+dot.dot.o: $(hdrdir)/ruby/internal/glob.h
+dot.dot.o: $(hdrdir)/ruby/internal/globals.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/attribute.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/builtin.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/extension.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/feature.h
+dot.dot.o: $(hdrdir)/ruby/internal/has/warning.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/array.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/bignum.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/class.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/compar.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/complex.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/cont.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/dir.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/enum.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/error.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/eval.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/file.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/gc.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/hash.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/io.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/load.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/marshal.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/numeric.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/object.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/parse.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/proc.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/process.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/random.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/range.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/rational.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/re.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/ruby.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/select.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/signal.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/string.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/struct.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/thread.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/time.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/variable.h
+dot.dot.o: $(hdrdir)/ruby/internal/intern/vm.h
+dot.dot.o: $(hdrdir)/ruby/internal/interpreter.h
+dot.dot.o: $(hdrdir)/ruby/internal/iterator.h
+dot.dot.o: $(hdrdir)/ruby/internal/memory.h
+dot.dot.o: $(hdrdir)/ruby/internal/method.h
+dot.dot.o: $(hdrdir)/ruby/internal/module.h
+dot.dot.o: $(hdrdir)/ruby/internal/newobj.h
+dot.dot.o: $(hdrdir)/ruby/internal/rgengc.h
+dot.dot.o: $(hdrdir)/ruby/internal/scan_args.h
+dot.dot.o: $(hdrdir)/ruby/internal/special_consts.h
+dot.dot.o: $(hdrdir)/ruby/internal/static_assert.h
+dot.dot.o: $(hdrdir)/ruby/internal/stdalign.h
+dot.dot.o: $(hdrdir)/ruby/internal/stdbool.h
+dot.dot.o: $(hdrdir)/ruby/internal/symbol.h
+dot.dot.o: $(hdrdir)/ruby/internal/value.h
+dot.dot.o: $(hdrdir)/ruby/internal/value_type.h
+dot.dot.o: $(hdrdir)/ruby/internal/variable.h
+dot.dot.o: $(hdrdir)/ruby/internal/warning_push.h
+dot.dot.o: $(hdrdir)/ruby/internal/xmalloc.h
+dot.dot.o: $(hdrdir)/ruby/missing.h
+dot.dot.o: $(hdrdir)/ruby/ruby.h
+dot.dot.o: $(hdrdir)/ruby/st.h
+dot.dot.o: $(hdrdir)/ruby/subst.h
dot.dot.o: dot.dot.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/load/dot.dot/dot.dot.c b/ext/-test-/load/dot.dot/dot.dot.c
index 936d28931a..ce7563bf8d 100644
--- a/ext/-test-/load/dot.dot/dot.dot.c
+++ b/ext/-test-/load/dot.dot/dot.dot.c
@@ -1 +1,3 @@
+#include "ruby.h"
+
void Init_dot(void) {}
diff --git a/ext/-test-/load/protect/depend b/ext/-test-/load/protect/depend
index b62393f1cb..dd4ee71b62 100644
--- a/ext/-test-/load/protect/depend
+++ b/ext/-test-/load/protect/depend
@@ -4,8 +4,156 @@ protect.o: $(arch_hdrdir)/ruby/config.h
protect.o: $(hdrdir)/ruby.h
protect.o: $(hdrdir)/ruby/assert.h
protect.o: $(hdrdir)/ruby/backward.h
+protect.o: $(hdrdir)/ruby/backward/2/assume.h
+protect.o: $(hdrdir)/ruby/backward/2/attributes.h
+protect.o: $(hdrdir)/ruby/backward/2/bool.h
+protect.o: $(hdrdir)/ruby/backward/2/inttypes.h
+protect.o: $(hdrdir)/ruby/backward/2/limits.h
+protect.o: $(hdrdir)/ruby/backward/2/long_long.h
+protect.o: $(hdrdir)/ruby/backward/2/stdalign.h
+protect.o: $(hdrdir)/ruby/backward/2/stdarg.h
protect.o: $(hdrdir)/ruby/defines.h
protect.o: $(hdrdir)/ruby/intern.h
+protect.o: $(hdrdir)/ruby/internal/abi.h
+protect.o: $(hdrdir)/ruby/internal/anyargs.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+protect.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+protect.o: $(hdrdir)/ruby/internal/assume.h
+protect.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+protect.o: $(hdrdir)/ruby/internal/attr/artificial.h
+protect.o: $(hdrdir)/ruby/internal/attr/cold.h
+protect.o: $(hdrdir)/ruby/internal/attr/const.h
+protect.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+protect.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+protect.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+protect.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+protect.o: $(hdrdir)/ruby/internal/attr/error.h
+protect.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+protect.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+protect.o: $(hdrdir)/ruby/internal/attr/format.h
+protect.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+protect.o: $(hdrdir)/ruby/internal/attr/noalias.h
+protect.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+protect.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+protect.o: $(hdrdir)/ruby/internal/attr/noinline.h
+protect.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+protect.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+protect.o: $(hdrdir)/ruby/internal/attr/pure.h
+protect.o: $(hdrdir)/ruby/internal/attr/restrict.h
+protect.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+protect.o: $(hdrdir)/ruby/internal/attr/warning.h
+protect.o: $(hdrdir)/ruby/internal/attr/weakref.h
+protect.o: $(hdrdir)/ruby/internal/cast.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+protect.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+protect.o: $(hdrdir)/ruby/internal/compiler_since.h
+protect.o: $(hdrdir)/ruby/internal/config.h
+protect.o: $(hdrdir)/ruby/internal/constant_p.h
+protect.o: $(hdrdir)/ruby/internal/core.h
+protect.o: $(hdrdir)/ruby/internal/core/rarray.h
+protect.o: $(hdrdir)/ruby/internal/core/rbasic.h
+protect.o: $(hdrdir)/ruby/internal/core/rbignum.h
+protect.o: $(hdrdir)/ruby/internal/core/rclass.h
+protect.o: $(hdrdir)/ruby/internal/core/rdata.h
+protect.o: $(hdrdir)/ruby/internal/core/rfile.h
+protect.o: $(hdrdir)/ruby/internal/core/rhash.h
+protect.o: $(hdrdir)/ruby/internal/core/robject.h
+protect.o: $(hdrdir)/ruby/internal/core/rregexp.h
+protect.o: $(hdrdir)/ruby/internal/core/rstring.h
+protect.o: $(hdrdir)/ruby/internal/core/rstruct.h
+protect.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+protect.o: $(hdrdir)/ruby/internal/ctype.h
+protect.o: $(hdrdir)/ruby/internal/dllexport.h
+protect.o: $(hdrdir)/ruby/internal/dosish.h
+protect.o: $(hdrdir)/ruby/internal/error.h
+protect.o: $(hdrdir)/ruby/internal/eval.h
+protect.o: $(hdrdir)/ruby/internal/event.h
+protect.o: $(hdrdir)/ruby/internal/fl_type.h
+protect.o: $(hdrdir)/ruby/internal/gc.h
+protect.o: $(hdrdir)/ruby/internal/glob.h
+protect.o: $(hdrdir)/ruby/internal/globals.h
+protect.o: $(hdrdir)/ruby/internal/has/attribute.h
+protect.o: $(hdrdir)/ruby/internal/has/builtin.h
+protect.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+protect.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+protect.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+protect.o: $(hdrdir)/ruby/internal/has/extension.h
+protect.o: $(hdrdir)/ruby/internal/has/feature.h
+protect.o: $(hdrdir)/ruby/internal/has/warning.h
+protect.o: $(hdrdir)/ruby/internal/intern/array.h
+protect.o: $(hdrdir)/ruby/internal/intern/bignum.h
+protect.o: $(hdrdir)/ruby/internal/intern/class.h
+protect.o: $(hdrdir)/ruby/internal/intern/compar.h
+protect.o: $(hdrdir)/ruby/internal/intern/complex.h
+protect.o: $(hdrdir)/ruby/internal/intern/cont.h
+protect.o: $(hdrdir)/ruby/internal/intern/dir.h
+protect.o: $(hdrdir)/ruby/internal/intern/enum.h
+protect.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+protect.o: $(hdrdir)/ruby/internal/intern/error.h
+protect.o: $(hdrdir)/ruby/internal/intern/eval.h
+protect.o: $(hdrdir)/ruby/internal/intern/file.h
+protect.o: $(hdrdir)/ruby/internal/intern/gc.h
+protect.o: $(hdrdir)/ruby/internal/intern/hash.h
+protect.o: $(hdrdir)/ruby/internal/intern/io.h
+protect.o: $(hdrdir)/ruby/internal/intern/load.h
+protect.o: $(hdrdir)/ruby/internal/intern/marshal.h
+protect.o: $(hdrdir)/ruby/internal/intern/numeric.h
+protect.o: $(hdrdir)/ruby/internal/intern/object.h
+protect.o: $(hdrdir)/ruby/internal/intern/parse.h
+protect.o: $(hdrdir)/ruby/internal/intern/proc.h
+protect.o: $(hdrdir)/ruby/internal/intern/process.h
+protect.o: $(hdrdir)/ruby/internal/intern/random.h
+protect.o: $(hdrdir)/ruby/internal/intern/range.h
+protect.o: $(hdrdir)/ruby/internal/intern/rational.h
+protect.o: $(hdrdir)/ruby/internal/intern/re.h
+protect.o: $(hdrdir)/ruby/internal/intern/ruby.h
+protect.o: $(hdrdir)/ruby/internal/intern/select.h
+protect.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+protect.o: $(hdrdir)/ruby/internal/intern/signal.h
+protect.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+protect.o: $(hdrdir)/ruby/internal/intern/string.h
+protect.o: $(hdrdir)/ruby/internal/intern/struct.h
+protect.o: $(hdrdir)/ruby/internal/intern/thread.h
+protect.o: $(hdrdir)/ruby/internal/intern/time.h
+protect.o: $(hdrdir)/ruby/internal/intern/variable.h
+protect.o: $(hdrdir)/ruby/internal/intern/vm.h
+protect.o: $(hdrdir)/ruby/internal/interpreter.h
+protect.o: $(hdrdir)/ruby/internal/iterator.h
+protect.o: $(hdrdir)/ruby/internal/memory.h
+protect.o: $(hdrdir)/ruby/internal/method.h
+protect.o: $(hdrdir)/ruby/internal/module.h
+protect.o: $(hdrdir)/ruby/internal/newobj.h
+protect.o: $(hdrdir)/ruby/internal/rgengc.h
+protect.o: $(hdrdir)/ruby/internal/scan_args.h
+protect.o: $(hdrdir)/ruby/internal/special_consts.h
+protect.o: $(hdrdir)/ruby/internal/static_assert.h
+protect.o: $(hdrdir)/ruby/internal/stdalign.h
+protect.o: $(hdrdir)/ruby/internal/stdbool.h
+protect.o: $(hdrdir)/ruby/internal/symbol.h
+protect.o: $(hdrdir)/ruby/internal/value.h
+protect.o: $(hdrdir)/ruby/internal/value_type.h
+protect.o: $(hdrdir)/ruby/internal/variable.h
+protect.o: $(hdrdir)/ruby/internal/warning_push.h
+protect.o: $(hdrdir)/ruby/internal/xmalloc.h
protect.o: $(hdrdir)/ruby/missing.h
protect.o: $(hdrdir)/ruby/ruby.h
protect.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/compat/depend b/ext/-test-/marshal/compat/depend
index f159506960..2c3ecf1ab9 100644
--- a/ext/-test-/marshal/compat/depend
+++ b/ext/-test-/marshal/compat/depend
@@ -4,8 +4,156 @@ usrcompat.o: $(arch_hdrdir)/ruby/config.h
usrcompat.o: $(hdrdir)/ruby.h
usrcompat.o: $(hdrdir)/ruby/assert.h
usrcompat.o: $(hdrdir)/ruby/backward.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/assume.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/bool.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/limits.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdarg.h
usrcompat.o: $(hdrdir)/ruby/defines.h
usrcompat.o: $(hdrdir)/ruby/intern.h
+usrcompat.o: $(hdrdir)/ruby/internal/abi.h
+usrcompat.o: $(hdrdir)/ruby/internal/anyargs.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+usrcompat.o: $(hdrdir)/ruby/internal/assume.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/cold.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/const.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/error.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/format.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/pure.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/warning.h
+usrcompat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+usrcompat.o: $(hdrdir)/ruby/internal/cast.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+usrcompat.o: $(hdrdir)/ruby/internal/compiler_since.h
+usrcompat.o: $(hdrdir)/ruby/internal/config.h
+usrcompat.o: $(hdrdir)/ruby/internal/constant_p.h
+usrcompat.o: $(hdrdir)/ruby/internal/core.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rarray.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rclass.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rdata.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rfile.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rhash.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/robject.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rstring.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+usrcompat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+usrcompat.o: $(hdrdir)/ruby/internal/ctype.h
+usrcompat.o: $(hdrdir)/ruby/internal/dllexport.h
+usrcompat.o: $(hdrdir)/ruby/internal/dosish.h
+usrcompat.o: $(hdrdir)/ruby/internal/error.h
+usrcompat.o: $(hdrdir)/ruby/internal/eval.h
+usrcompat.o: $(hdrdir)/ruby/internal/event.h
+usrcompat.o: $(hdrdir)/ruby/internal/fl_type.h
+usrcompat.o: $(hdrdir)/ruby/internal/gc.h
+usrcompat.o: $(hdrdir)/ruby/internal/glob.h
+usrcompat.o: $(hdrdir)/ruby/internal/globals.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/attribute.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/builtin.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/extension.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/feature.h
+usrcompat.o: $(hdrdir)/ruby/internal/has/warning.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/array.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/class.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/compar.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/complex.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/cont.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/dir.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/enum.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/error.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/eval.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/file.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/gc.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/hash.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/io.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/load.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/object.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/parse.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/proc.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/process.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/random.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/range.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/rational.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/re.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/select.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/signal.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/string.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/struct.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/thread.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/time.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/variable.h
+usrcompat.o: $(hdrdir)/ruby/internal/intern/vm.h
+usrcompat.o: $(hdrdir)/ruby/internal/interpreter.h
+usrcompat.o: $(hdrdir)/ruby/internal/iterator.h
+usrcompat.o: $(hdrdir)/ruby/internal/memory.h
+usrcompat.o: $(hdrdir)/ruby/internal/method.h
+usrcompat.o: $(hdrdir)/ruby/internal/module.h
+usrcompat.o: $(hdrdir)/ruby/internal/newobj.h
+usrcompat.o: $(hdrdir)/ruby/internal/rgengc.h
+usrcompat.o: $(hdrdir)/ruby/internal/scan_args.h
+usrcompat.o: $(hdrdir)/ruby/internal/special_consts.h
+usrcompat.o: $(hdrdir)/ruby/internal/static_assert.h
+usrcompat.o: $(hdrdir)/ruby/internal/stdalign.h
+usrcompat.o: $(hdrdir)/ruby/internal/stdbool.h
+usrcompat.o: $(hdrdir)/ruby/internal/symbol.h
+usrcompat.o: $(hdrdir)/ruby/internal/value.h
+usrcompat.o: $(hdrdir)/ruby/internal/value_type.h
+usrcompat.o: $(hdrdir)/ruby/internal/variable.h
+usrcompat.o: $(hdrdir)/ruby/internal/warning_push.h
+usrcompat.o: $(hdrdir)/ruby/internal/xmalloc.h
usrcompat.o: $(hdrdir)/ruby/missing.h
usrcompat.o: $(hdrdir)/ruby/ruby.h
usrcompat.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/internal_ivar/depend b/ext/-test-/marshal/internal_ivar/depend
index f280347c01..cacb54a1a7 100644
--- a/ext/-test-/marshal/internal_ivar/depend
+++ b/ext/-test-/marshal/internal_ivar/depend
@@ -4,8 +4,156 @@ internal_ivar.o: $(arch_hdrdir)/ruby/config.h
internal_ivar.o: $(hdrdir)/ruby.h
internal_ivar.o: $(hdrdir)/ruby/assert.h
internal_ivar.o: $(hdrdir)/ruby/backward.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/assume.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/attributes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/bool.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/inttypes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/limits.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/long_long.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdalign.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdarg.h
internal_ivar.o: $(hdrdir)/ruby/defines.h
internal_ivar.o: $(hdrdir)/ruby/intern.h
+internal_ivar.o: $(hdrdir)/ruby/internal/abi.h
+internal_ivar.o: $(hdrdir)/ruby/internal/anyargs.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+internal_ivar.o: $(hdrdir)/ruby/internal/assume.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/artificial.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/cold.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/const.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/error.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/format.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/noalias.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/noinline.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/pure.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/restrict.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/warning.h
+internal_ivar.o: $(hdrdir)/ruby/internal/attr/weakref.h
+internal_ivar.o: $(hdrdir)/ruby/internal/cast.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+internal_ivar.o: $(hdrdir)/ruby/internal/compiler_since.h
+internal_ivar.o: $(hdrdir)/ruby/internal/config.h
+internal_ivar.o: $(hdrdir)/ruby/internal/constant_p.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rarray.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rbasic.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rbignum.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rclass.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rdata.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rfile.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rhash.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/robject.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rregexp.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rstring.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rstruct.h
+internal_ivar.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+internal_ivar.o: $(hdrdir)/ruby/internal/ctype.h
+internal_ivar.o: $(hdrdir)/ruby/internal/dllexport.h
+internal_ivar.o: $(hdrdir)/ruby/internal/dosish.h
+internal_ivar.o: $(hdrdir)/ruby/internal/error.h
+internal_ivar.o: $(hdrdir)/ruby/internal/eval.h
+internal_ivar.o: $(hdrdir)/ruby/internal/event.h
+internal_ivar.o: $(hdrdir)/ruby/internal/fl_type.h
+internal_ivar.o: $(hdrdir)/ruby/internal/gc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/glob.h
+internal_ivar.o: $(hdrdir)/ruby/internal/globals.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/attribute.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/builtin.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/extension.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/feature.h
+internal_ivar.o: $(hdrdir)/ruby/internal/has/warning.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/array.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/bignum.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/class.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/compar.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/complex.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/cont.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/dir.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/enum.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/error.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/eval.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/file.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/gc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/hash.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/io.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/load.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/marshal.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/numeric.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/object.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/parse.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/proc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/process.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/random.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/range.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/rational.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/re.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/ruby.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/select.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/signal.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/string.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/struct.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/thread.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/time.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/variable.h
+internal_ivar.o: $(hdrdir)/ruby/internal/intern/vm.h
+internal_ivar.o: $(hdrdir)/ruby/internal/interpreter.h
+internal_ivar.o: $(hdrdir)/ruby/internal/iterator.h
+internal_ivar.o: $(hdrdir)/ruby/internal/memory.h
+internal_ivar.o: $(hdrdir)/ruby/internal/method.h
+internal_ivar.o: $(hdrdir)/ruby/internal/module.h
+internal_ivar.o: $(hdrdir)/ruby/internal/newobj.h
+internal_ivar.o: $(hdrdir)/ruby/internal/rgengc.h
+internal_ivar.o: $(hdrdir)/ruby/internal/scan_args.h
+internal_ivar.o: $(hdrdir)/ruby/internal/special_consts.h
+internal_ivar.o: $(hdrdir)/ruby/internal/static_assert.h
+internal_ivar.o: $(hdrdir)/ruby/internal/stdalign.h
+internal_ivar.o: $(hdrdir)/ruby/internal/stdbool.h
+internal_ivar.o: $(hdrdir)/ruby/internal/symbol.h
+internal_ivar.o: $(hdrdir)/ruby/internal/value.h
+internal_ivar.o: $(hdrdir)/ruby/internal/value_type.h
+internal_ivar.o: $(hdrdir)/ruby/internal/variable.h
+internal_ivar.o: $(hdrdir)/ruby/internal/warning_push.h
+internal_ivar.o: $(hdrdir)/ruby/internal/xmalloc.h
internal_ivar.o: $(hdrdir)/ruby/missing.h
internal_ivar.o: $(hdrdir)/ruby/ruby.h
internal_ivar.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/internal_ivar/internal_ivar.c b/ext/-test-/marshal/internal_ivar/internal_ivar.c
index de0cf711aa..b2188f737a 100644
--- a/ext/-test-/marshal/internal_ivar/internal_ivar.c
+++ b/ext/-test-/marshal/internal_ivar/internal_ivar.c
@@ -36,10 +36,7 @@ Init_internal_ivar(void)
VALUE newclass = rb_define_class_under(mMarshal, "InternalIVar", rb_cObject);
id_normal_ivar = rb_intern_const("normal");
-#if 0
- /* leave id_internal_ivar being 0 */
- id_internal_ivar = rb_make_internal_id();
-#endif
+ id_internal_ivar = rb_intern_const("K");
id_encoding_short = rb_intern_const("E");
rb_define_method(newclass, "initialize", init, 3);
rb_define_method(newclass, "normal", get_normal, 0);
diff --git a/ext/-test-/marshal/usr/depend b/ext/-test-/marshal/usr/depend
index 21c0c2d744..717101cbcf 100644
--- a/ext/-test-/marshal/usr/depend
+++ b/ext/-test-/marshal/usr/depend
@@ -4,8 +4,156 @@ usrmarshal.o: $(arch_hdrdir)/ruby/config.h
usrmarshal.o: $(hdrdir)/ruby.h
usrmarshal.o: $(hdrdir)/ruby/assert.h
usrmarshal.o: $(hdrdir)/ruby/backward.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/assume.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/bool.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/limits.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdarg.h
usrmarshal.o: $(hdrdir)/ruby/defines.h
usrmarshal.o: $(hdrdir)/ruby/intern.h
+usrmarshal.o: $(hdrdir)/ruby/internal/abi.h
+usrmarshal.o: $(hdrdir)/ruby/internal/anyargs.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+usrmarshal.o: $(hdrdir)/ruby/internal/assume.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/artificial.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/cold.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/const.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/error.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/format.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/noalias.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/noinline.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/pure.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/restrict.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/warning.h
+usrmarshal.o: $(hdrdir)/ruby/internal/attr/weakref.h
+usrmarshal.o: $(hdrdir)/ruby/internal/cast.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+usrmarshal.o: $(hdrdir)/ruby/internal/compiler_since.h
+usrmarshal.o: $(hdrdir)/ruby/internal/config.h
+usrmarshal.o: $(hdrdir)/ruby/internal/constant_p.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rarray.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rbasic.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rbignum.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rclass.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rdata.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rfile.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rhash.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/robject.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rregexp.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rstring.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rstruct.h
+usrmarshal.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+usrmarshal.o: $(hdrdir)/ruby/internal/ctype.h
+usrmarshal.o: $(hdrdir)/ruby/internal/dllexport.h
+usrmarshal.o: $(hdrdir)/ruby/internal/dosish.h
+usrmarshal.o: $(hdrdir)/ruby/internal/error.h
+usrmarshal.o: $(hdrdir)/ruby/internal/eval.h
+usrmarshal.o: $(hdrdir)/ruby/internal/event.h
+usrmarshal.o: $(hdrdir)/ruby/internal/fl_type.h
+usrmarshal.o: $(hdrdir)/ruby/internal/gc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/glob.h
+usrmarshal.o: $(hdrdir)/ruby/internal/globals.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/attribute.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/builtin.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/extension.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/feature.h
+usrmarshal.o: $(hdrdir)/ruby/internal/has/warning.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/array.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/bignum.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/class.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/compar.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/complex.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/cont.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/dir.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/enum.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/error.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/eval.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/file.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/gc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/hash.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/io.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/load.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/marshal.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/numeric.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/object.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/parse.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/proc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/process.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/random.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/range.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/rational.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/re.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/ruby.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/select.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/signal.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/string.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/struct.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/thread.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/time.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/variable.h
+usrmarshal.o: $(hdrdir)/ruby/internal/intern/vm.h
+usrmarshal.o: $(hdrdir)/ruby/internal/interpreter.h
+usrmarshal.o: $(hdrdir)/ruby/internal/iterator.h
+usrmarshal.o: $(hdrdir)/ruby/internal/memory.h
+usrmarshal.o: $(hdrdir)/ruby/internal/method.h
+usrmarshal.o: $(hdrdir)/ruby/internal/module.h
+usrmarshal.o: $(hdrdir)/ruby/internal/newobj.h
+usrmarshal.o: $(hdrdir)/ruby/internal/rgengc.h
+usrmarshal.o: $(hdrdir)/ruby/internal/scan_args.h
+usrmarshal.o: $(hdrdir)/ruby/internal/special_consts.h
+usrmarshal.o: $(hdrdir)/ruby/internal/static_assert.h
+usrmarshal.o: $(hdrdir)/ruby/internal/stdalign.h
+usrmarshal.o: $(hdrdir)/ruby/internal/stdbool.h
+usrmarshal.o: $(hdrdir)/ruby/internal/symbol.h
+usrmarshal.o: $(hdrdir)/ruby/internal/value.h
+usrmarshal.o: $(hdrdir)/ruby/internal/value_type.h
+usrmarshal.o: $(hdrdir)/ruby/internal/variable.h
+usrmarshal.o: $(hdrdir)/ruby/internal/warning_push.h
+usrmarshal.o: $(hdrdir)/ruby/internal/xmalloc.h
usrmarshal.o: $(hdrdir)/ruby/missing.h
usrmarshal.o: $(hdrdir)/ruby/ruby.h
usrmarshal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/memory_status/depend b/ext/-test-/memory_status/depend
index 657ef59c35..a65fe66ae3 100644
--- a/ext/-test-/memory_status/depend
+++ b/ext/-test-/memory_status/depend
@@ -4,8 +4,156 @@ memory_status.o: $(arch_hdrdir)/ruby/config.h
memory_status.o: $(hdrdir)/ruby.h
memory_status.o: $(hdrdir)/ruby/assert.h
memory_status.o: $(hdrdir)/ruby/backward.h
+memory_status.o: $(hdrdir)/ruby/backward/2/assume.h
+memory_status.o: $(hdrdir)/ruby/backward/2/attributes.h
+memory_status.o: $(hdrdir)/ruby/backward/2/bool.h
+memory_status.o: $(hdrdir)/ruby/backward/2/inttypes.h
+memory_status.o: $(hdrdir)/ruby/backward/2/limits.h
+memory_status.o: $(hdrdir)/ruby/backward/2/long_long.h
+memory_status.o: $(hdrdir)/ruby/backward/2/stdalign.h
+memory_status.o: $(hdrdir)/ruby/backward/2/stdarg.h
memory_status.o: $(hdrdir)/ruby/defines.h
memory_status.o: $(hdrdir)/ruby/intern.h
+memory_status.o: $(hdrdir)/ruby/internal/abi.h
+memory_status.o: $(hdrdir)/ruby/internal/anyargs.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+memory_status.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+memory_status.o: $(hdrdir)/ruby/internal/assume.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/artificial.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/cold.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/const.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/error.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/format.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/noalias.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/noinline.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/pure.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/restrict.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/warning.h
+memory_status.o: $(hdrdir)/ruby/internal/attr/weakref.h
+memory_status.o: $(hdrdir)/ruby/internal/cast.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+memory_status.o: $(hdrdir)/ruby/internal/compiler_since.h
+memory_status.o: $(hdrdir)/ruby/internal/config.h
+memory_status.o: $(hdrdir)/ruby/internal/constant_p.h
+memory_status.o: $(hdrdir)/ruby/internal/core.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rarray.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rbasic.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rbignum.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rclass.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rdata.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rfile.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rhash.h
+memory_status.o: $(hdrdir)/ruby/internal/core/robject.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rregexp.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rstring.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rstruct.h
+memory_status.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+memory_status.o: $(hdrdir)/ruby/internal/ctype.h
+memory_status.o: $(hdrdir)/ruby/internal/dllexport.h
+memory_status.o: $(hdrdir)/ruby/internal/dosish.h
+memory_status.o: $(hdrdir)/ruby/internal/error.h
+memory_status.o: $(hdrdir)/ruby/internal/eval.h
+memory_status.o: $(hdrdir)/ruby/internal/event.h
+memory_status.o: $(hdrdir)/ruby/internal/fl_type.h
+memory_status.o: $(hdrdir)/ruby/internal/gc.h
+memory_status.o: $(hdrdir)/ruby/internal/glob.h
+memory_status.o: $(hdrdir)/ruby/internal/globals.h
+memory_status.o: $(hdrdir)/ruby/internal/has/attribute.h
+memory_status.o: $(hdrdir)/ruby/internal/has/builtin.h
+memory_status.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+memory_status.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+memory_status.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+memory_status.o: $(hdrdir)/ruby/internal/has/extension.h
+memory_status.o: $(hdrdir)/ruby/internal/has/feature.h
+memory_status.o: $(hdrdir)/ruby/internal/has/warning.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/array.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/bignum.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/class.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/compar.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/complex.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/cont.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/dir.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/enum.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/error.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/eval.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/file.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/gc.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/hash.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/io.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/load.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/marshal.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/numeric.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/object.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/parse.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/proc.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/process.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/random.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/range.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/rational.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/re.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/ruby.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/select.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/signal.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/string.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/struct.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/thread.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/time.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/variable.h
+memory_status.o: $(hdrdir)/ruby/internal/intern/vm.h
+memory_status.o: $(hdrdir)/ruby/internal/interpreter.h
+memory_status.o: $(hdrdir)/ruby/internal/iterator.h
+memory_status.o: $(hdrdir)/ruby/internal/memory.h
+memory_status.o: $(hdrdir)/ruby/internal/method.h
+memory_status.o: $(hdrdir)/ruby/internal/module.h
+memory_status.o: $(hdrdir)/ruby/internal/newobj.h
+memory_status.o: $(hdrdir)/ruby/internal/rgengc.h
+memory_status.o: $(hdrdir)/ruby/internal/scan_args.h
+memory_status.o: $(hdrdir)/ruby/internal/special_consts.h
+memory_status.o: $(hdrdir)/ruby/internal/static_assert.h
+memory_status.o: $(hdrdir)/ruby/internal/stdalign.h
+memory_status.o: $(hdrdir)/ruby/internal/stdbool.h
+memory_status.o: $(hdrdir)/ruby/internal/symbol.h
+memory_status.o: $(hdrdir)/ruby/internal/value.h
+memory_status.o: $(hdrdir)/ruby/internal/value_type.h
+memory_status.o: $(hdrdir)/ruby/internal/variable.h
+memory_status.o: $(hdrdir)/ruby/internal/warning_push.h
+memory_status.o: $(hdrdir)/ruby/internal/xmalloc.h
memory_status.o: $(hdrdir)/ruby/missing.h
memory_status.o: $(hdrdir)/ruby/ruby.h
memory_status.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/memory_status/memory_status.c b/ext/-test-/memory_status/memory_status.c
index 5775fa56f3..f124c97ca1 100644
--- a/ext/-test-/memory_status/memory_status.c
+++ b/ext/-test-/memory_status/memory_status.c
@@ -10,11 +10,15 @@
static VALUE cMemoryStatus;
+#undef HAVE_RSS
+#undef HAVE_PEAK
+
static VALUE
read_status(VALUE self)
{
VALUE size = INT2FIX(0);
#if defined __APPLE__
+# define HAVE_RSS 1
VALUE rss;
kern_return_t error;
# if defined MACH_TASK_BASIC_INFO
@@ -30,7 +34,7 @@ read_status(VALUE self)
taskinfo.virtual_size = 0;
taskinfo.resident_size = 0;
error = task_info(mach_task_self(), flavor,
- (task_info_t)&taskinfo, &out_count);
+ (task_info_t)&taskinfo, &out_count);
if (error != KERN_SUCCESS) return Qnil;
#ifndef ULL2NUM
/* "long long" does not exist here, use size_t instead. */
@@ -40,14 +44,20 @@ read_status(VALUE self)
rss = ULL2NUM(taskinfo.resident_size);
rb_struct_aset(self, INT2FIX(1), rss);
#elif defined _WIN32
- VALUE peak;
+# define HAVE_RSS 1
+# define HAVE_PEAK 1
+ VALUE rss, peak;
PROCESS_MEMORY_COUNTERS c;
c.cb = sizeof(c);
if (!GetProcessMemoryInfo(GetCurrentProcess(), &c, c.cb))
- return Qnil;
+ return Qnil;
size = SIZET2NUM(c.PagefileUsage);
+ rss = SIZET2NUM(c.WorkingSetSize);
peak = SIZET2NUM(c.PeakWorkingSetSize);
- rb_struct_aset(self, INT2FIX(1), peak);
+ rb_struct_aset(self, INT2FIX(2), peak);
+#endif
+#ifdef HAVE_RSS
+ rb_struct_aset(self, INT2FIX(1), rss);
#endif
rb_struct_aset(self, INT2FIX(0), size);
return self;
@@ -58,12 +68,13 @@ Init_memory_status(void)
{
VALUE mMemory = rb_define_module("Memory");
cMemoryStatus =
- rb_struct_define_under(mMemory, "Status", "size",
-#if defined __APPLE__
- "rss",
-#elif defined _WIN32
- "peak",
+ rb_struct_define_under(mMemory, "Status", "size",
+#ifdef HAVE_RSS
+ "rss",
+#endif
+#ifdef HAVE_PEAK
+ "peak",
#endif
- (char *)NULL);
+ (char *)NULL);
rb_define_method(cMemoryStatus, "_update", read_status, 0);
}
diff --git a/ext/-test-/memory_view/depend b/ext/-test-/memory_view/depend
new file mode 100644
index 0000000000..7ce2d0374c
--- /dev/null
+++ b/ext/-test-/memory_view/depend
@@ -0,0 +1,163 @@
+# AUTOGENERATED DEPENDENCIES START
+memory_view.o: $(RUBY_EXTCONF_H)
+memory_view.o: $(arch_hdrdir)/ruby/config.h
+memory_view.o: $(hdrdir)/ruby.h
+memory_view.o: $(hdrdir)/ruby/assert.h
+memory_view.o: $(hdrdir)/ruby/backward.h
+memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
+memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
+memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
+memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
+memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
+memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
+memory_view.o: $(hdrdir)/ruby/backward/2/stdalign.h
+memory_view.o: $(hdrdir)/ruby/backward/2/stdarg.h
+memory_view.o: $(hdrdir)/ruby/defines.h
+memory_view.o: $(hdrdir)/ruby/intern.h
+memory_view.o: $(hdrdir)/ruby/internal/abi.h
+memory_view.o: $(hdrdir)/ruby/internal/anyargs.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/assume.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/artificial.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/cold.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/const.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/error.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/format.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noalias.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noinline.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/pure.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/restrict.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/warning.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/weakref.h
+memory_view.o: $(hdrdir)/ruby/internal/cast.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_since.h
+memory_view.o: $(hdrdir)/ruby/internal/config.h
+memory_view.o: $(hdrdir)/ruby/internal/constant_p.h
+memory_view.o: $(hdrdir)/ruby/internal/core.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rarray.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rbasic.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rbignum.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rclass.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rdata.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rfile.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rhash.h
+memory_view.o: $(hdrdir)/ruby/internal/core/robject.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rregexp.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rstring.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rstruct.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+memory_view.o: $(hdrdir)/ruby/internal/ctype.h
+memory_view.o: $(hdrdir)/ruby/internal/dllexport.h
+memory_view.o: $(hdrdir)/ruby/internal/dosish.h
+memory_view.o: $(hdrdir)/ruby/internal/error.h
+memory_view.o: $(hdrdir)/ruby/internal/eval.h
+memory_view.o: $(hdrdir)/ruby/internal/event.h
+memory_view.o: $(hdrdir)/ruby/internal/fl_type.h
+memory_view.o: $(hdrdir)/ruby/internal/gc.h
+memory_view.o: $(hdrdir)/ruby/internal/glob.h
+memory_view.o: $(hdrdir)/ruby/internal/globals.h
+memory_view.o: $(hdrdir)/ruby/internal/has/attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/builtin.h
+memory_view.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/extension.h
+memory_view.o: $(hdrdir)/ruby/internal/has/feature.h
+memory_view.o: $(hdrdir)/ruby/internal/has/warning.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/array.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/bignum.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/class.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/compar.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/complex.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/cont.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/dir.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/enum.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/error.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/eval.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/file.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/gc.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/hash.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/io.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/load.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/marshal.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/numeric.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/object.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/parse.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/proc.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/process.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/random.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/range.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/rational.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/re.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/ruby.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/select.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/signal.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/string.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/struct.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/thread.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/time.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/variable.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/vm.h
+memory_view.o: $(hdrdir)/ruby/internal/interpreter.h
+memory_view.o: $(hdrdir)/ruby/internal/iterator.h
+memory_view.o: $(hdrdir)/ruby/internal/memory.h
+memory_view.o: $(hdrdir)/ruby/internal/method.h
+memory_view.o: $(hdrdir)/ruby/internal/module.h
+memory_view.o: $(hdrdir)/ruby/internal/newobj.h
+memory_view.o: $(hdrdir)/ruby/internal/rgengc.h
+memory_view.o: $(hdrdir)/ruby/internal/scan_args.h
+memory_view.o: $(hdrdir)/ruby/internal/special_consts.h
+memory_view.o: $(hdrdir)/ruby/internal/static_assert.h
+memory_view.o: $(hdrdir)/ruby/internal/stdalign.h
+memory_view.o: $(hdrdir)/ruby/internal/stdbool.h
+memory_view.o: $(hdrdir)/ruby/internal/symbol.h
+memory_view.o: $(hdrdir)/ruby/internal/value.h
+memory_view.o: $(hdrdir)/ruby/internal/value_type.h
+memory_view.o: $(hdrdir)/ruby/internal/variable.h
+memory_view.o: $(hdrdir)/ruby/internal/warning_push.h
+memory_view.o: $(hdrdir)/ruby/internal/xmalloc.h
+memory_view.o: $(hdrdir)/ruby/memory_view.h
+memory_view.o: $(hdrdir)/ruby/missing.h
+memory_view.o: $(hdrdir)/ruby/ruby.h
+memory_view.o: $(hdrdir)/ruby/st.h
+memory_view.o: $(hdrdir)/ruby/subst.h
+memory_view.o: memory_view.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/memory_view/extconf.rb b/ext/-test-/memory_view/extconf.rb
new file mode 100644
index 0000000000..123b80b8d0
--- /dev/null
+++ b/ext/-test-/memory_view/extconf.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: false
+require "mkmf"
+
+require_relative "../auto_ext.rb"
+auto_ext(inc: true)
diff --git a/ext/-test-/memory_view/memory_view.c b/ext/-test-/memory_view/memory_view.c
new file mode 100644
index 0000000000..c1df0353cf
--- /dev/null
+++ b/ext/-test-/memory_view/memory_view.c
@@ -0,0 +1,450 @@
+#include "ruby.h"
+
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+#include "ruby/memory_view.h"
+
+#define STRUCT_ALIGNOF(T, result) do { \
+ (result) = RUBY_ALIGNOF(T); \
+} while(0)
+
+static ID id_str;
+static VALUE sym_format;
+static VALUE sym_native_size_p;
+static VALUE sym_offset;
+static VALUE sym_size;
+static VALUE sym_repeat;
+static VALUE sym_obj;
+static VALUE sym_byte_size;
+static VALUE sym_readonly;
+static VALUE sym_format;
+static VALUE sym_item_size;
+static VALUE sym_ndim;
+static VALUE sym_shape;
+static VALUE sym_strides;
+static VALUE sym_sub_offsets;
+static VALUE sym_endianness;
+static VALUE sym_little_endian;
+static VALUE sym_big_endian;
+
+static bool
+exportable_string_get_memory_view(VALUE obj, rb_memory_view_t *view, int flags)
+{
+ VALUE str = rb_ivar_get(obj, id_str);
+ rb_memory_view_init_as_byte_array(view, obj, RSTRING_PTR(str), RSTRING_LEN(str), true);
+ return true;
+}
+
+static bool
+exportable_string_memory_view_available_p(VALUE obj)
+{
+ VALUE str = rb_ivar_get(obj, id_str);
+ return !NIL_P(str);
+}
+
+static const rb_memory_view_entry_t exportable_string_memory_view_entry = {
+ exportable_string_get_memory_view,
+ NULL,
+ exportable_string_memory_view_available_p
+};
+
+static VALUE
+memory_view_available_p(VALUE mod, VALUE obj)
+{
+ return rb_memory_view_available_p(obj) ? Qtrue : Qfalse;
+}
+
+static VALUE
+memory_view_register(VALUE mod, VALUE obj)
+{
+ return rb_memory_view_register(obj, &exportable_string_memory_view_entry) ? Qtrue : Qfalse;
+}
+
+static VALUE
+memory_view_item_size_from_format(VALUE mod, VALUE format)
+{
+ const char *c_str = NULL;
+ if (!NIL_P(format))
+ c_str = StringValueCStr(format);
+ const char *err = NULL;
+ ssize_t item_size = rb_memory_view_item_size_from_format(c_str, &err);
+ if (!err)
+ return rb_assoc_new(SSIZET2NUM(item_size), Qnil);
+ else
+ return rb_assoc_new(SSIZET2NUM(item_size), rb_str_new_cstr(err));
+}
+
+static VALUE
+memory_view_parse_item_format(VALUE mod, VALUE format)
+{
+ const char *c_str = NULL;
+ if (!NIL_P(format))
+ c_str = StringValueCStr(format);
+ const char *err = NULL;
+
+ rb_memory_view_item_component_t *members;
+ size_t n_members;
+ ssize_t item_size = rb_memory_view_parse_item_format(c_str, &members, &n_members, &err);
+
+ VALUE result = rb_ary_new_capa(3);
+ rb_ary_push(result, SSIZET2NUM(item_size));
+
+ if (!err) {
+ VALUE ary = rb_ary_new_capa((long)n_members);
+ size_t i;
+ for (i = 0; i < n_members; ++i) {
+ VALUE member = rb_hash_new();
+ rb_hash_aset(member, sym_format, rb_str_new(&members[i].format, 1));
+ rb_hash_aset(member, sym_native_size_p, members[i].native_size_p ? Qtrue : Qfalse);
+ rb_hash_aset(member, sym_endianness, members[i].little_endian_p ? sym_little_endian : sym_big_endian);
+ rb_hash_aset(member, sym_offset, SSIZET2NUM(members[i].offset));
+ rb_hash_aset(member, sym_size, SSIZET2NUM(members[i].size));
+ rb_hash_aset(member, sym_repeat, SSIZET2NUM(members[i].repeat));
+ rb_ary_push(ary, member);
+ }
+ xfree(members);
+ rb_ary_push(result, ary);
+ rb_ary_push(result, Qnil);
+ }
+ else {
+ rb_ary_push(result, Qnil); // members
+ rb_ary_push(result, rb_str_new_cstr(err));
+ }
+
+ return result;
+}
+
+static VALUE
+memory_view_get_memory_view_info(VALUE mod, VALUE obj)
+{
+ rb_memory_view_t view;
+
+ if (!rb_memory_view_get(obj, &view, 0)) {
+ return Qnil;
+ }
+
+ VALUE hash = rb_hash_new();
+ rb_hash_aset(hash, sym_obj, view.obj);
+ rb_hash_aset(hash, sym_byte_size, SSIZET2NUM(view.byte_size));
+ rb_hash_aset(hash, sym_readonly, view.readonly ? Qtrue : Qfalse);
+ rb_hash_aset(hash, sym_format, view.format ? rb_str_new_cstr(view.format) : Qnil);
+ rb_hash_aset(hash, sym_item_size, SSIZET2NUM(view.item_size));
+ rb_hash_aset(hash, sym_ndim, SSIZET2NUM(view.ndim));
+
+ if (view.shape) {
+ VALUE shape = rb_ary_new_capa(view.ndim);
+ rb_hash_aset(hash, sym_shape, shape);
+ }
+ else {
+ rb_hash_aset(hash, sym_shape, Qnil);
+ }
+
+ if (view.strides) {
+ VALUE strides = rb_ary_new_capa(view.ndim);
+ rb_hash_aset(hash, sym_strides, strides);
+ }
+ else {
+ rb_hash_aset(hash, sym_strides, Qnil);
+ }
+
+ if (view.sub_offsets) {
+ VALUE sub_offsets = rb_ary_new_capa(view.ndim);
+ rb_hash_aset(hash, sym_sub_offsets, sub_offsets);
+ }
+ else {
+ rb_hash_aset(hash, sym_sub_offsets, Qnil);
+ }
+
+ rb_memory_view_release(&view);
+
+ return hash;
+}
+
+static VALUE
+memory_view_fill_contiguous_strides(VALUE mod, VALUE ndim_v, VALUE item_size_v, VALUE shape_v, VALUE row_major_p)
+{
+ ssize_t i, ndim = NUM2SSIZET(ndim_v);
+
+ Check_Type(shape_v, T_ARRAY);
+ ssize_t *shape = ALLOC_N(ssize_t, ndim);
+ for (i = 0; i < ndim; ++i) {
+ shape[i] = NUM2SSIZET(RARRAY_AREF(shape_v, i));
+ }
+
+ ssize_t *strides = ALLOC_N(ssize_t, ndim);
+ rb_memory_view_fill_contiguous_strides(ndim, NUM2SSIZET(item_size_v), shape, RTEST(row_major_p), strides);
+
+ VALUE result = rb_ary_new_capa(ndim);
+ for (i = 0; i < ndim; ++i) {
+ rb_ary_push(result, SSIZET2NUM(strides[i]));
+ }
+
+ xfree(strides);
+ xfree(shape);
+
+ return result;
+}
+
+static VALUE
+memory_view_get_ref_count(VALUE obj)
+{
+ if (rb_memory_view_exported_object_registry == Qundef) {
+ return Qnil;
+ }
+
+ st_table *table;
+ TypedData_Get_Struct(rb_memory_view_exported_object_registry, st_table,
+ &rb_memory_view_exported_object_registry_data_type,
+ table);
+
+ st_data_t count;
+ if (st_lookup(table, (st_data_t)obj, &count)) {
+ return ULL2NUM(count);
+ }
+
+ return Qnil;
+}
+
+static VALUE
+memory_view_ref_count_while_exporting_i(VALUE obj, long n)
+{
+ if (n == 0) {
+ return memory_view_get_ref_count(obj);
+ }
+
+ rb_memory_view_t view;
+ if (!rb_memory_view_get(obj, &view, 0)) {
+ return Qnil;
+ }
+
+ VALUE ref_count = memory_view_ref_count_while_exporting_i(obj, n-1);
+ rb_memory_view_release(&view);
+
+ return ref_count;
+}
+
+static VALUE
+memory_view_ref_count_while_exporting(VALUE mod, VALUE obj, VALUE n)
+{
+ Check_Type(n, T_FIXNUM);
+ return memory_view_ref_count_while_exporting_i(obj, FIX2LONG(n));
+}
+
+static VALUE
+memory_view_extract_item_members(VALUE mod, VALUE str, VALUE format)
+{
+ StringValue(str);
+ StringValue(format);
+
+ rb_memory_view_item_component_t *members;
+ size_t n_members;
+ const char *err = NULL;
+ (void)rb_memory_view_parse_item_format(RSTRING_PTR(format), &members, &n_members, &err);
+ if (err != NULL) {
+ rb_raise(rb_eArgError, "Unable to parse item format");
+ }
+
+ VALUE item = rb_memory_view_extract_item_members(RSTRING_PTR(str), members, n_members);
+ xfree(members);
+
+ return item;
+}
+
+static VALUE
+expstr_initialize(VALUE obj, VALUE s)
+{
+ if (!NIL_P(s)) {
+ Check_Type(s, T_STRING);
+ }
+ rb_ivar_set(obj, id_str, s);
+ return Qnil;
+}
+
+static bool
+mdview_get_memory_view(VALUE obj, rb_memory_view_t *view, int flags)
+{
+ VALUE buf_v = rb_ivar_get(obj, id_str);
+ VALUE format_v = rb_ivar_get(obj, SYM2ID(sym_format));
+ VALUE shape_v = rb_ivar_get(obj, SYM2ID(sym_shape));
+ VALUE strides_v = rb_ivar_get(obj, SYM2ID(sym_strides));
+
+ const char *err;
+ const ssize_t item_size = rb_memory_view_item_size_from_format(RSTRING_PTR(format_v), &err);
+ if (item_size < 0) {
+ return false;
+ }
+
+ ssize_t ndim = RARRAY_LEN(shape_v);
+ if (!NIL_P(strides_v) && RARRAY_LEN(strides_v) != ndim) {
+ rb_raise(rb_eArgError, "strides has an invalid dimension");
+ }
+
+ ssize_t *shape = ALLOC_N(ssize_t, ndim);
+ ssize_t *strides = ALLOC_N(ssize_t, ndim);
+ ssize_t i;
+ if (!NIL_P(strides_v)) {
+ for (i = 0; i < ndim; ++i) {
+ shape[i] = NUM2SSIZET(RARRAY_AREF(shape_v, i));
+ strides[i] = NUM2SSIZET(RARRAY_AREF(strides_v, i));
+ }
+ }
+ else {
+ for (i = 0; i < ndim; ++i) {
+ shape[i] = NUM2SSIZET(RARRAY_AREF(shape_v, i));
+ }
+
+ i = ndim - 1;
+ strides[i] = item_size;
+ for (; i > 0; --i) {
+ strides[i-1] = strides[i] * shape[i];
+ }
+ }
+
+ rb_memory_view_init_as_byte_array(view, obj, RSTRING_PTR(buf_v), RSTRING_LEN(buf_v), true);
+ view->format = RSTRING_PTR(format_v);
+ view->item_size = item_size;
+ view->ndim = ndim;
+ view->shape = shape;
+ view->strides = strides;
+ view->sub_offsets = NULL;
+
+ return true;
+}
+
+static bool
+mdview_release_memory_view(VALUE obj, rb_memory_view_t *view)
+{
+ if (view->shape) xfree((void *)view->shape);
+ if (view->strides) xfree((void *)view->strides);
+
+ return true;
+}
+
+static bool
+mdview_memory_view_available_p(VALUE obj)
+{
+ return true;
+}
+
+static const rb_memory_view_entry_t mdview_memory_view_entry = {
+ mdview_get_memory_view,
+ mdview_release_memory_view,
+ mdview_memory_view_available_p
+};
+
+static VALUE
+mdview_initialize(VALUE obj, VALUE buf, VALUE format, VALUE shape, VALUE strides)
+{
+ Check_Type(buf, T_STRING);
+ StringValue(format);
+ Check_Type(shape, T_ARRAY);
+ if (!NIL_P(strides)) Check_Type(strides, T_ARRAY);
+
+ rb_ivar_set(obj, id_str, buf);
+ rb_ivar_set(obj, SYM2ID(sym_format), format);
+ rb_ivar_set(obj, SYM2ID(sym_shape), shape);
+ rb_ivar_set(obj, SYM2ID(sym_strides), strides);
+ return Qnil;
+}
+
+static VALUE
+mdview_aref(VALUE obj, VALUE indices_v)
+{
+ Check_Type(indices_v, T_ARRAY);
+
+ rb_memory_view_t view;
+ if (!rb_memory_view_get(obj, &view, 0)) {
+ rb_raise(rb_eRuntimeError, "rb_memory_view_get: failed");
+ }
+
+ if (RARRAY_LEN(indices_v) != view.ndim) {
+ rb_raise(rb_eKeyError, "Indices has an invalid dimension");
+ }
+
+ VALUE buf_indices;
+ ssize_t *indices = ALLOCV_N(ssize_t, buf_indices, view.ndim);
+
+ ssize_t i;
+ for (i = 0; i < view.ndim; ++i) {
+ indices[i] = NUM2SSIZET(RARRAY_AREF(indices_v, i));
+ }
+
+ VALUE result = rb_memory_view_get_item(&view, indices);
+ ALLOCV_END(buf_indices);
+ rb_memory_view_release(&view);
+
+ return result;
+}
+
+#endif /* HAVE_RUBY_MEMORY_VIEW_H */
+
+void
+Init_memory_view(void)
+{
+ rb_ext_ractor_safe(true);
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+ VALUE mMemoryViewTestUtils = rb_define_module("MemoryViewTestUtils");
+
+ rb_define_module_function(mMemoryViewTestUtils, "available?", memory_view_available_p, 1);
+ rb_define_module_function(mMemoryViewTestUtils, "register", memory_view_register, 1);
+ rb_define_module_function(mMemoryViewTestUtils, "item_size_from_format", memory_view_item_size_from_format, 1);
+ rb_define_module_function(mMemoryViewTestUtils, "parse_item_format", memory_view_parse_item_format, 1);
+ rb_define_module_function(mMemoryViewTestUtils, "get_memory_view_info", memory_view_get_memory_view_info, 1);
+ rb_define_module_function(mMemoryViewTestUtils, "fill_contiguous_strides", memory_view_fill_contiguous_strides, 4);
+ rb_define_module_function(mMemoryViewTestUtils, "ref_count_while_exporting", memory_view_ref_count_while_exporting, 2);
+ rb_define_module_function(mMemoryViewTestUtils, "extract_item_members", memory_view_extract_item_members, 2);
+
+ VALUE cExportableString = rb_define_class_under(mMemoryViewTestUtils, "ExportableString", rb_cObject);
+ rb_define_method(cExportableString, "initialize", expstr_initialize, 1);
+ rb_memory_view_register(cExportableString, &exportable_string_memory_view_entry);
+
+ VALUE cMDView = rb_define_class_under(mMemoryViewTestUtils, "MultiDimensionalView", rb_cObject);
+ rb_define_method(cMDView, "initialize", mdview_initialize, 4);
+ rb_define_method(cMDView, "[]", mdview_aref, 1);
+ rb_memory_view_register(cMDView, &mdview_memory_view_entry);
+
+ id_str = rb_intern_const("__str__");
+ sym_format = ID2SYM(rb_intern_const("format"));
+ sym_native_size_p = ID2SYM(rb_intern_const("native_size_p"));
+ sym_offset = ID2SYM(rb_intern_const("offset"));
+ sym_size = ID2SYM(rb_intern_const("size"));
+ sym_repeat = ID2SYM(rb_intern_const("repeat"));
+ sym_obj = ID2SYM(rb_intern_const("obj"));
+ sym_byte_size = ID2SYM(rb_intern_const("byte_size"));
+ sym_readonly = ID2SYM(rb_intern_const("readonly"));
+ sym_format = ID2SYM(rb_intern_const("format"));
+ sym_item_size = ID2SYM(rb_intern_const("item_size"));
+ sym_ndim = ID2SYM(rb_intern_const("ndim"));
+ sym_shape = ID2SYM(rb_intern_const("shape"));
+ sym_strides = ID2SYM(rb_intern_const("strides"));
+ sym_sub_offsets = ID2SYM(rb_intern_const("sub_offsets"));
+ sym_endianness = ID2SYM(rb_intern_const("endianness"));
+ sym_little_endian = ID2SYM(rb_intern_const("little_endian"));
+ sym_big_endian = ID2SYM(rb_intern_const("big_endian"));
+
+#ifdef WORDS_BIGENDIAN
+ rb_const_set(mMemoryViewTestUtils, rb_intern_const("NATIVE_ENDIAN"), sym_big_endian);
+#else
+ rb_const_set(mMemoryViewTestUtils, rb_intern_const("NATIVE_ENDIAN"), sym_little_endian);
+#endif
+
+#define DEF_ALIGNMENT_CONST(type, TYPE) do { \
+ int alignment; \
+ STRUCT_ALIGNOF(type, alignment); \
+ rb_const_set(mMemoryViewTestUtils, rb_intern_const(#TYPE "_ALIGNMENT"), INT2FIX(alignment)); \
+} while(0)
+
+ DEF_ALIGNMENT_CONST(short, SHORT);
+ DEF_ALIGNMENT_CONST(int, INT);
+ DEF_ALIGNMENT_CONST(long, LONG);
+ DEF_ALIGNMENT_CONST(LONG_LONG, LONG_LONG);
+ DEF_ALIGNMENT_CONST(int16_t, INT16);
+ DEF_ALIGNMENT_CONST(int32_t, INT32);
+ DEF_ALIGNMENT_CONST(int64_t, INT64);
+ DEF_ALIGNMENT_CONST(intptr_t, INTPTR);
+ DEF_ALIGNMENT_CONST(float, FLOAT);
+ DEF_ALIGNMENT_CONST(double, DOUBLE);
+
+#undef DEF_ALIGNMENT_CONST
+
+#endif /* HAVE_RUBY_MEMORY_VIEW_H */
+}
diff --git a/ext/-test-/method/depend b/ext/-test-/method/depend
index 028d97e1a9..85cf4d174a 100644
--- a/ext/-test-/method/depend
+++ b/ext/-test-/method/depend
@@ -4,8 +4,156 @@ arity.o: $(arch_hdrdir)/ruby/config.h
arity.o: $(hdrdir)/ruby.h
arity.o: $(hdrdir)/ruby/assert.h
arity.o: $(hdrdir)/ruby/backward.h
+arity.o: $(hdrdir)/ruby/backward/2/assume.h
+arity.o: $(hdrdir)/ruby/backward/2/attributes.h
+arity.o: $(hdrdir)/ruby/backward/2/bool.h
+arity.o: $(hdrdir)/ruby/backward/2/inttypes.h
+arity.o: $(hdrdir)/ruby/backward/2/limits.h
+arity.o: $(hdrdir)/ruby/backward/2/long_long.h
+arity.o: $(hdrdir)/ruby/backward/2/stdalign.h
+arity.o: $(hdrdir)/ruby/backward/2/stdarg.h
arity.o: $(hdrdir)/ruby/defines.h
arity.o: $(hdrdir)/ruby/intern.h
+arity.o: $(hdrdir)/ruby/internal/abi.h
+arity.o: $(hdrdir)/ruby/internal/anyargs.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+arity.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+arity.o: $(hdrdir)/ruby/internal/assume.h
+arity.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+arity.o: $(hdrdir)/ruby/internal/attr/artificial.h
+arity.o: $(hdrdir)/ruby/internal/attr/cold.h
+arity.o: $(hdrdir)/ruby/internal/attr/const.h
+arity.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+arity.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+arity.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+arity.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+arity.o: $(hdrdir)/ruby/internal/attr/error.h
+arity.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+arity.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+arity.o: $(hdrdir)/ruby/internal/attr/format.h
+arity.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+arity.o: $(hdrdir)/ruby/internal/attr/noalias.h
+arity.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+arity.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+arity.o: $(hdrdir)/ruby/internal/attr/noinline.h
+arity.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+arity.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+arity.o: $(hdrdir)/ruby/internal/attr/pure.h
+arity.o: $(hdrdir)/ruby/internal/attr/restrict.h
+arity.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+arity.o: $(hdrdir)/ruby/internal/attr/warning.h
+arity.o: $(hdrdir)/ruby/internal/attr/weakref.h
+arity.o: $(hdrdir)/ruby/internal/cast.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+arity.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+arity.o: $(hdrdir)/ruby/internal/compiler_since.h
+arity.o: $(hdrdir)/ruby/internal/config.h
+arity.o: $(hdrdir)/ruby/internal/constant_p.h
+arity.o: $(hdrdir)/ruby/internal/core.h
+arity.o: $(hdrdir)/ruby/internal/core/rarray.h
+arity.o: $(hdrdir)/ruby/internal/core/rbasic.h
+arity.o: $(hdrdir)/ruby/internal/core/rbignum.h
+arity.o: $(hdrdir)/ruby/internal/core/rclass.h
+arity.o: $(hdrdir)/ruby/internal/core/rdata.h
+arity.o: $(hdrdir)/ruby/internal/core/rfile.h
+arity.o: $(hdrdir)/ruby/internal/core/rhash.h
+arity.o: $(hdrdir)/ruby/internal/core/robject.h
+arity.o: $(hdrdir)/ruby/internal/core/rregexp.h
+arity.o: $(hdrdir)/ruby/internal/core/rstring.h
+arity.o: $(hdrdir)/ruby/internal/core/rstruct.h
+arity.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+arity.o: $(hdrdir)/ruby/internal/ctype.h
+arity.o: $(hdrdir)/ruby/internal/dllexport.h
+arity.o: $(hdrdir)/ruby/internal/dosish.h
+arity.o: $(hdrdir)/ruby/internal/error.h
+arity.o: $(hdrdir)/ruby/internal/eval.h
+arity.o: $(hdrdir)/ruby/internal/event.h
+arity.o: $(hdrdir)/ruby/internal/fl_type.h
+arity.o: $(hdrdir)/ruby/internal/gc.h
+arity.o: $(hdrdir)/ruby/internal/glob.h
+arity.o: $(hdrdir)/ruby/internal/globals.h
+arity.o: $(hdrdir)/ruby/internal/has/attribute.h
+arity.o: $(hdrdir)/ruby/internal/has/builtin.h
+arity.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+arity.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+arity.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+arity.o: $(hdrdir)/ruby/internal/has/extension.h
+arity.o: $(hdrdir)/ruby/internal/has/feature.h
+arity.o: $(hdrdir)/ruby/internal/has/warning.h
+arity.o: $(hdrdir)/ruby/internal/intern/array.h
+arity.o: $(hdrdir)/ruby/internal/intern/bignum.h
+arity.o: $(hdrdir)/ruby/internal/intern/class.h
+arity.o: $(hdrdir)/ruby/internal/intern/compar.h
+arity.o: $(hdrdir)/ruby/internal/intern/complex.h
+arity.o: $(hdrdir)/ruby/internal/intern/cont.h
+arity.o: $(hdrdir)/ruby/internal/intern/dir.h
+arity.o: $(hdrdir)/ruby/internal/intern/enum.h
+arity.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+arity.o: $(hdrdir)/ruby/internal/intern/error.h
+arity.o: $(hdrdir)/ruby/internal/intern/eval.h
+arity.o: $(hdrdir)/ruby/internal/intern/file.h
+arity.o: $(hdrdir)/ruby/internal/intern/gc.h
+arity.o: $(hdrdir)/ruby/internal/intern/hash.h
+arity.o: $(hdrdir)/ruby/internal/intern/io.h
+arity.o: $(hdrdir)/ruby/internal/intern/load.h
+arity.o: $(hdrdir)/ruby/internal/intern/marshal.h
+arity.o: $(hdrdir)/ruby/internal/intern/numeric.h
+arity.o: $(hdrdir)/ruby/internal/intern/object.h
+arity.o: $(hdrdir)/ruby/internal/intern/parse.h
+arity.o: $(hdrdir)/ruby/internal/intern/proc.h
+arity.o: $(hdrdir)/ruby/internal/intern/process.h
+arity.o: $(hdrdir)/ruby/internal/intern/random.h
+arity.o: $(hdrdir)/ruby/internal/intern/range.h
+arity.o: $(hdrdir)/ruby/internal/intern/rational.h
+arity.o: $(hdrdir)/ruby/internal/intern/re.h
+arity.o: $(hdrdir)/ruby/internal/intern/ruby.h
+arity.o: $(hdrdir)/ruby/internal/intern/select.h
+arity.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+arity.o: $(hdrdir)/ruby/internal/intern/signal.h
+arity.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+arity.o: $(hdrdir)/ruby/internal/intern/string.h
+arity.o: $(hdrdir)/ruby/internal/intern/struct.h
+arity.o: $(hdrdir)/ruby/internal/intern/thread.h
+arity.o: $(hdrdir)/ruby/internal/intern/time.h
+arity.o: $(hdrdir)/ruby/internal/intern/variable.h
+arity.o: $(hdrdir)/ruby/internal/intern/vm.h
+arity.o: $(hdrdir)/ruby/internal/interpreter.h
+arity.o: $(hdrdir)/ruby/internal/iterator.h
+arity.o: $(hdrdir)/ruby/internal/memory.h
+arity.o: $(hdrdir)/ruby/internal/method.h
+arity.o: $(hdrdir)/ruby/internal/module.h
+arity.o: $(hdrdir)/ruby/internal/newobj.h
+arity.o: $(hdrdir)/ruby/internal/rgengc.h
+arity.o: $(hdrdir)/ruby/internal/scan_args.h
+arity.o: $(hdrdir)/ruby/internal/special_consts.h
+arity.o: $(hdrdir)/ruby/internal/static_assert.h
+arity.o: $(hdrdir)/ruby/internal/stdalign.h
+arity.o: $(hdrdir)/ruby/internal/stdbool.h
+arity.o: $(hdrdir)/ruby/internal/symbol.h
+arity.o: $(hdrdir)/ruby/internal/value.h
+arity.o: $(hdrdir)/ruby/internal/value_type.h
+arity.o: $(hdrdir)/ruby/internal/variable.h
+arity.o: $(hdrdir)/ruby/internal/warning_push.h
+arity.o: $(hdrdir)/ruby/internal/xmalloc.h
arity.o: $(hdrdir)/ruby/missing.h
arity.o: $(hdrdir)/ruby/ruby.h
arity.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/notimplement/depend b/ext/-test-/notimplement/depend
index 74911f0af4..2303f47594 100644
--- a/ext/-test-/notimplement/depend
+++ b/ext/-test-/notimplement/depend
@@ -4,8 +4,156 @@ bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
bug.o: $(hdrdir)/ruby/assert.h
bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
bug.o: $(hdrdir)/ruby/defines.h
bug.o: $(hdrdir)/ruby/intern.h
+bug.o: $(hdrdir)/ruby/internal/abi.h
+bug.o: $(hdrdir)/ruby/internal/anyargs.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bug.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bug.o: $(hdrdir)/ruby/internal/assume.h
+bug.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bug.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bug.o: $(hdrdir)/ruby/internal/attr/cold.h
+bug.o: $(hdrdir)/ruby/internal/attr/const.h
+bug.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bug.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bug.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bug.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bug.o: $(hdrdir)/ruby/internal/attr/error.h
+bug.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bug.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/format.h
+bug.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bug.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bug.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bug.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bug.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bug.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bug.o: $(hdrdir)/ruby/internal/attr/pure.h
+bug.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bug.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bug.o: $(hdrdir)/ruby/internal/attr/warning.h
+bug.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bug.o: $(hdrdir)/ruby/internal/cast.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bug.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bug.o: $(hdrdir)/ruby/internal/compiler_since.h
+bug.o: $(hdrdir)/ruby/internal/config.h
+bug.o: $(hdrdir)/ruby/internal/constant_p.h
+bug.o: $(hdrdir)/ruby/internal/core.h
+bug.o: $(hdrdir)/ruby/internal/core/rarray.h
+bug.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bug.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bug.o: $(hdrdir)/ruby/internal/core/rclass.h
+bug.o: $(hdrdir)/ruby/internal/core/rdata.h
+bug.o: $(hdrdir)/ruby/internal/core/rfile.h
+bug.o: $(hdrdir)/ruby/internal/core/rhash.h
+bug.o: $(hdrdir)/ruby/internal/core/robject.h
+bug.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bug.o: $(hdrdir)/ruby/internal/core/rstring.h
+bug.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bug.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bug.o: $(hdrdir)/ruby/internal/ctype.h
+bug.o: $(hdrdir)/ruby/internal/dllexport.h
+bug.o: $(hdrdir)/ruby/internal/dosish.h
+bug.o: $(hdrdir)/ruby/internal/error.h
+bug.o: $(hdrdir)/ruby/internal/eval.h
+bug.o: $(hdrdir)/ruby/internal/event.h
+bug.o: $(hdrdir)/ruby/internal/fl_type.h
+bug.o: $(hdrdir)/ruby/internal/gc.h
+bug.o: $(hdrdir)/ruby/internal/glob.h
+bug.o: $(hdrdir)/ruby/internal/globals.h
+bug.o: $(hdrdir)/ruby/internal/has/attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/builtin.h
+bug.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bug.o: $(hdrdir)/ruby/internal/has/extension.h
+bug.o: $(hdrdir)/ruby/internal/has/feature.h
+bug.o: $(hdrdir)/ruby/internal/has/warning.h
+bug.o: $(hdrdir)/ruby/internal/intern/array.h
+bug.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bug.o: $(hdrdir)/ruby/internal/intern/class.h
+bug.o: $(hdrdir)/ruby/internal/intern/compar.h
+bug.o: $(hdrdir)/ruby/internal/intern/complex.h
+bug.o: $(hdrdir)/ruby/internal/intern/cont.h
+bug.o: $(hdrdir)/ruby/internal/intern/dir.h
+bug.o: $(hdrdir)/ruby/internal/intern/enum.h
+bug.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bug.o: $(hdrdir)/ruby/internal/intern/error.h
+bug.o: $(hdrdir)/ruby/internal/intern/eval.h
+bug.o: $(hdrdir)/ruby/internal/intern/file.h
+bug.o: $(hdrdir)/ruby/internal/intern/gc.h
+bug.o: $(hdrdir)/ruby/internal/intern/hash.h
+bug.o: $(hdrdir)/ruby/internal/intern/io.h
+bug.o: $(hdrdir)/ruby/internal/intern/load.h
+bug.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bug.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bug.o: $(hdrdir)/ruby/internal/intern/object.h
+bug.o: $(hdrdir)/ruby/internal/intern/parse.h
+bug.o: $(hdrdir)/ruby/internal/intern/proc.h
+bug.o: $(hdrdir)/ruby/internal/intern/process.h
+bug.o: $(hdrdir)/ruby/internal/intern/random.h
+bug.o: $(hdrdir)/ruby/internal/intern/range.h
+bug.o: $(hdrdir)/ruby/internal/intern/rational.h
+bug.o: $(hdrdir)/ruby/internal/intern/re.h
+bug.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bug.o: $(hdrdir)/ruby/internal/intern/select.h
+bug.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bug.o: $(hdrdir)/ruby/internal/intern/signal.h
+bug.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bug.o: $(hdrdir)/ruby/internal/intern/string.h
+bug.o: $(hdrdir)/ruby/internal/intern/struct.h
+bug.o: $(hdrdir)/ruby/internal/intern/thread.h
+bug.o: $(hdrdir)/ruby/internal/intern/time.h
+bug.o: $(hdrdir)/ruby/internal/intern/variable.h
+bug.o: $(hdrdir)/ruby/internal/intern/vm.h
+bug.o: $(hdrdir)/ruby/internal/interpreter.h
+bug.o: $(hdrdir)/ruby/internal/iterator.h
+bug.o: $(hdrdir)/ruby/internal/memory.h
+bug.o: $(hdrdir)/ruby/internal/method.h
+bug.o: $(hdrdir)/ruby/internal/module.h
+bug.o: $(hdrdir)/ruby/internal/newobj.h
+bug.o: $(hdrdir)/ruby/internal/rgengc.h
+bug.o: $(hdrdir)/ruby/internal/scan_args.h
+bug.o: $(hdrdir)/ruby/internal/special_consts.h
+bug.o: $(hdrdir)/ruby/internal/static_assert.h
+bug.o: $(hdrdir)/ruby/internal/stdalign.h
+bug.o: $(hdrdir)/ruby/internal/stdbool.h
+bug.o: $(hdrdir)/ruby/internal/symbol.h
+bug.o: $(hdrdir)/ruby/internal/value.h
+bug.o: $(hdrdir)/ruby/internal/value_type.h
+bug.o: $(hdrdir)/ruby/internal/variable.h
+bug.o: $(hdrdir)/ruby/internal/warning_push.h
+bug.o: $(hdrdir)/ruby/internal/xmalloc.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/num2int/depend b/ext/-test-/num2int/depend
index 76b69de851..a3283838dd 100644
--- a/ext/-test-/num2int/depend
+++ b/ext/-test-/num2int/depend
@@ -4,8 +4,156 @@ num2int.o: $(arch_hdrdir)/ruby/config.h
num2int.o: $(hdrdir)/ruby.h
num2int.o: $(hdrdir)/ruby/assert.h
num2int.o: $(hdrdir)/ruby/backward.h
+num2int.o: $(hdrdir)/ruby/backward/2/assume.h
+num2int.o: $(hdrdir)/ruby/backward/2/attributes.h
+num2int.o: $(hdrdir)/ruby/backward/2/bool.h
+num2int.o: $(hdrdir)/ruby/backward/2/inttypes.h
+num2int.o: $(hdrdir)/ruby/backward/2/limits.h
+num2int.o: $(hdrdir)/ruby/backward/2/long_long.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdalign.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdarg.h
num2int.o: $(hdrdir)/ruby/defines.h
num2int.o: $(hdrdir)/ruby/intern.h
+num2int.o: $(hdrdir)/ruby/internal/abi.h
+num2int.o: $(hdrdir)/ruby/internal/anyargs.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+num2int.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+num2int.o: $(hdrdir)/ruby/internal/assume.h
+num2int.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+num2int.o: $(hdrdir)/ruby/internal/attr/artificial.h
+num2int.o: $(hdrdir)/ruby/internal/attr/cold.h
+num2int.o: $(hdrdir)/ruby/internal/attr/const.h
+num2int.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+num2int.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+num2int.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+num2int.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+num2int.o: $(hdrdir)/ruby/internal/attr/error.h
+num2int.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+num2int.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+num2int.o: $(hdrdir)/ruby/internal/attr/format.h
+num2int.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+num2int.o: $(hdrdir)/ruby/internal/attr/noalias.h
+num2int.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+num2int.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+num2int.o: $(hdrdir)/ruby/internal/attr/noinline.h
+num2int.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+num2int.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+num2int.o: $(hdrdir)/ruby/internal/attr/pure.h
+num2int.o: $(hdrdir)/ruby/internal/attr/restrict.h
+num2int.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+num2int.o: $(hdrdir)/ruby/internal/attr/warning.h
+num2int.o: $(hdrdir)/ruby/internal/attr/weakref.h
+num2int.o: $(hdrdir)/ruby/internal/cast.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+num2int.o: $(hdrdir)/ruby/internal/compiler_since.h
+num2int.o: $(hdrdir)/ruby/internal/config.h
+num2int.o: $(hdrdir)/ruby/internal/constant_p.h
+num2int.o: $(hdrdir)/ruby/internal/core.h
+num2int.o: $(hdrdir)/ruby/internal/core/rarray.h
+num2int.o: $(hdrdir)/ruby/internal/core/rbasic.h
+num2int.o: $(hdrdir)/ruby/internal/core/rbignum.h
+num2int.o: $(hdrdir)/ruby/internal/core/rclass.h
+num2int.o: $(hdrdir)/ruby/internal/core/rdata.h
+num2int.o: $(hdrdir)/ruby/internal/core/rfile.h
+num2int.o: $(hdrdir)/ruby/internal/core/rhash.h
+num2int.o: $(hdrdir)/ruby/internal/core/robject.h
+num2int.o: $(hdrdir)/ruby/internal/core/rregexp.h
+num2int.o: $(hdrdir)/ruby/internal/core/rstring.h
+num2int.o: $(hdrdir)/ruby/internal/core/rstruct.h
+num2int.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+num2int.o: $(hdrdir)/ruby/internal/ctype.h
+num2int.o: $(hdrdir)/ruby/internal/dllexport.h
+num2int.o: $(hdrdir)/ruby/internal/dosish.h
+num2int.o: $(hdrdir)/ruby/internal/error.h
+num2int.o: $(hdrdir)/ruby/internal/eval.h
+num2int.o: $(hdrdir)/ruby/internal/event.h
+num2int.o: $(hdrdir)/ruby/internal/fl_type.h
+num2int.o: $(hdrdir)/ruby/internal/gc.h
+num2int.o: $(hdrdir)/ruby/internal/glob.h
+num2int.o: $(hdrdir)/ruby/internal/globals.h
+num2int.o: $(hdrdir)/ruby/internal/has/attribute.h
+num2int.o: $(hdrdir)/ruby/internal/has/builtin.h
+num2int.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+num2int.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+num2int.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+num2int.o: $(hdrdir)/ruby/internal/has/extension.h
+num2int.o: $(hdrdir)/ruby/internal/has/feature.h
+num2int.o: $(hdrdir)/ruby/internal/has/warning.h
+num2int.o: $(hdrdir)/ruby/internal/intern/array.h
+num2int.o: $(hdrdir)/ruby/internal/intern/bignum.h
+num2int.o: $(hdrdir)/ruby/internal/intern/class.h
+num2int.o: $(hdrdir)/ruby/internal/intern/compar.h
+num2int.o: $(hdrdir)/ruby/internal/intern/complex.h
+num2int.o: $(hdrdir)/ruby/internal/intern/cont.h
+num2int.o: $(hdrdir)/ruby/internal/intern/dir.h
+num2int.o: $(hdrdir)/ruby/internal/intern/enum.h
+num2int.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+num2int.o: $(hdrdir)/ruby/internal/intern/error.h
+num2int.o: $(hdrdir)/ruby/internal/intern/eval.h
+num2int.o: $(hdrdir)/ruby/internal/intern/file.h
+num2int.o: $(hdrdir)/ruby/internal/intern/gc.h
+num2int.o: $(hdrdir)/ruby/internal/intern/hash.h
+num2int.o: $(hdrdir)/ruby/internal/intern/io.h
+num2int.o: $(hdrdir)/ruby/internal/intern/load.h
+num2int.o: $(hdrdir)/ruby/internal/intern/marshal.h
+num2int.o: $(hdrdir)/ruby/internal/intern/numeric.h
+num2int.o: $(hdrdir)/ruby/internal/intern/object.h
+num2int.o: $(hdrdir)/ruby/internal/intern/parse.h
+num2int.o: $(hdrdir)/ruby/internal/intern/proc.h
+num2int.o: $(hdrdir)/ruby/internal/intern/process.h
+num2int.o: $(hdrdir)/ruby/internal/intern/random.h
+num2int.o: $(hdrdir)/ruby/internal/intern/range.h
+num2int.o: $(hdrdir)/ruby/internal/intern/rational.h
+num2int.o: $(hdrdir)/ruby/internal/intern/re.h
+num2int.o: $(hdrdir)/ruby/internal/intern/ruby.h
+num2int.o: $(hdrdir)/ruby/internal/intern/select.h
+num2int.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+num2int.o: $(hdrdir)/ruby/internal/intern/signal.h
+num2int.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+num2int.o: $(hdrdir)/ruby/internal/intern/string.h
+num2int.o: $(hdrdir)/ruby/internal/intern/struct.h
+num2int.o: $(hdrdir)/ruby/internal/intern/thread.h
+num2int.o: $(hdrdir)/ruby/internal/intern/time.h
+num2int.o: $(hdrdir)/ruby/internal/intern/variable.h
+num2int.o: $(hdrdir)/ruby/internal/intern/vm.h
+num2int.o: $(hdrdir)/ruby/internal/interpreter.h
+num2int.o: $(hdrdir)/ruby/internal/iterator.h
+num2int.o: $(hdrdir)/ruby/internal/memory.h
+num2int.o: $(hdrdir)/ruby/internal/method.h
+num2int.o: $(hdrdir)/ruby/internal/module.h
+num2int.o: $(hdrdir)/ruby/internal/newobj.h
+num2int.o: $(hdrdir)/ruby/internal/rgengc.h
+num2int.o: $(hdrdir)/ruby/internal/scan_args.h
+num2int.o: $(hdrdir)/ruby/internal/special_consts.h
+num2int.o: $(hdrdir)/ruby/internal/static_assert.h
+num2int.o: $(hdrdir)/ruby/internal/stdalign.h
+num2int.o: $(hdrdir)/ruby/internal/stdbool.h
+num2int.o: $(hdrdir)/ruby/internal/symbol.h
+num2int.o: $(hdrdir)/ruby/internal/value.h
+num2int.o: $(hdrdir)/ruby/internal/value_type.h
+num2int.o: $(hdrdir)/ruby/internal/variable.h
+num2int.o: $(hdrdir)/ruby/internal/warning_push.h
+num2int.o: $(hdrdir)/ruby/internal/xmalloc.h
num2int.o: $(hdrdir)/ruby/missing.h
num2int.o: $(hdrdir)/ruby/ruby.h
num2int.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/num2int/num2int.c b/ext/-test-/num2int/num2int.c
index 3aec3ccf3b..63a441fda6 100644
--- a/ext/-test-/num2int/num2int.c
+++ b/ext/-test-/num2int/num2int.c
@@ -4,7 +4,7 @@ static VALUE
test_num2short(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%d", NUM2SHORT(num));
+ snprintf(buf, sizeof(buf), "%d", NUM2SHORT(num));
return rb_str_new_cstr(buf);
}
@@ -12,7 +12,7 @@ static VALUE
test_num2ushort(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%u", NUM2USHORT(num));
+ snprintf(buf, sizeof(buf), "%u", NUM2USHORT(num));
return rb_str_new_cstr(buf);
}
@@ -20,7 +20,7 @@ static VALUE
test_num2int(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%d", NUM2INT(num));
+ snprintf(buf, sizeof(buf), "%d", NUM2INT(num));
return rb_str_new_cstr(buf);
}
@@ -28,7 +28,7 @@ static VALUE
test_num2uint(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%u", NUM2UINT(num));
+ snprintf(buf, sizeof(buf), "%u", NUM2UINT(num));
return rb_str_new_cstr(buf);
}
@@ -36,7 +36,7 @@ static VALUE
test_num2long(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%ld", NUM2LONG(num));
+ snprintf(buf, sizeof(buf), "%ld", NUM2LONG(num));
return rb_str_new_cstr(buf);
}
@@ -44,7 +44,7 @@ static VALUE
test_num2ulong(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%lu", NUM2ULONG(num));
+ snprintf(buf, sizeof(buf), "%lu", NUM2ULONG(num));
return rb_str_new_cstr(buf);
}
@@ -53,7 +53,7 @@ static VALUE
test_num2ll(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
+ snprintf(buf, sizeof(buf), "%"PRI_LL_PREFIX"d", NUM2LL(num));
return rb_str_new_cstr(buf);
}
@@ -61,7 +61,7 @@ static VALUE
test_num2ull(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%"PRI_LL_PREFIX"u", NUM2ULL(num));
+ snprintf(buf, sizeof(buf), "%"PRI_LL_PREFIX"u", NUM2ULL(num));
return rb_str_new_cstr(buf);
}
#endif
@@ -70,7 +70,7 @@ static VALUE
test_fix2short(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%d", FIX2SHORT(num));
+ snprintf(buf, sizeof(buf), "%d", FIX2SHORT(num));
return rb_str_new_cstr(buf);
}
@@ -78,7 +78,7 @@ static VALUE
test_fix2int(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%d", FIX2INT(num));
+ snprintf(buf, sizeof(buf), "%d", FIX2INT(num));
return rb_str_new_cstr(buf);
}
@@ -86,7 +86,7 @@ static VALUE
test_fix2uint(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%u", FIX2UINT(num));
+ snprintf(buf, sizeof(buf), "%u", FIX2UINT(num));
return rb_str_new_cstr(buf);
}
@@ -94,7 +94,7 @@ static VALUE
test_fix2long(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%ld", FIX2LONG(num));
+ snprintf(buf, sizeof(buf), "%ld", FIX2LONG(num));
return rb_str_new_cstr(buf);
}
@@ -102,7 +102,7 @@ static VALUE
test_fix2ulong(VALUE obj, VALUE num)
{
char buf[128];
- sprintf(buf, "%lu", FIX2ULONG(num));
+ snprintf(buf, sizeof(buf), "%lu", FIX2ULONG(num));
return rb_str_new_cstr(buf);
}
diff --git a/ext/-test-/path_to_class/depend b/ext/-test-/path_to_class/depend
index 9a7f7d0176..17f8e957c3 100644
--- a/ext/-test-/path_to_class/depend
+++ b/ext/-test-/path_to_class/depend
@@ -4,8 +4,156 @@ path_to_class.o: $(arch_hdrdir)/ruby/config.h
path_to_class.o: $(hdrdir)/ruby.h
path_to_class.o: $(hdrdir)/ruby/assert.h
path_to_class.o: $(hdrdir)/ruby/backward.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/assume.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/attributes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/bool.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/inttypes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/limits.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/long_long.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdalign.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdarg.h
path_to_class.o: $(hdrdir)/ruby/defines.h
path_to_class.o: $(hdrdir)/ruby/intern.h
+path_to_class.o: $(hdrdir)/ruby/internal/abi.h
+path_to_class.o: $(hdrdir)/ruby/internal/anyargs.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+path_to_class.o: $(hdrdir)/ruby/internal/assume.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/artificial.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/cold.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/const.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/error.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/format.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/noalias.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/noinline.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/pure.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/restrict.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/warning.h
+path_to_class.o: $(hdrdir)/ruby/internal/attr/weakref.h
+path_to_class.o: $(hdrdir)/ruby/internal/cast.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+path_to_class.o: $(hdrdir)/ruby/internal/compiler_since.h
+path_to_class.o: $(hdrdir)/ruby/internal/config.h
+path_to_class.o: $(hdrdir)/ruby/internal/constant_p.h
+path_to_class.o: $(hdrdir)/ruby/internal/core.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rarray.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rbasic.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rbignum.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rclass.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rdata.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rfile.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rhash.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/robject.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rregexp.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rstring.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rstruct.h
+path_to_class.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+path_to_class.o: $(hdrdir)/ruby/internal/ctype.h
+path_to_class.o: $(hdrdir)/ruby/internal/dllexport.h
+path_to_class.o: $(hdrdir)/ruby/internal/dosish.h
+path_to_class.o: $(hdrdir)/ruby/internal/error.h
+path_to_class.o: $(hdrdir)/ruby/internal/eval.h
+path_to_class.o: $(hdrdir)/ruby/internal/event.h
+path_to_class.o: $(hdrdir)/ruby/internal/fl_type.h
+path_to_class.o: $(hdrdir)/ruby/internal/gc.h
+path_to_class.o: $(hdrdir)/ruby/internal/glob.h
+path_to_class.o: $(hdrdir)/ruby/internal/globals.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/attribute.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/builtin.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/extension.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/feature.h
+path_to_class.o: $(hdrdir)/ruby/internal/has/warning.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/array.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/bignum.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/class.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/compar.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/complex.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/cont.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/dir.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/enum.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/error.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/eval.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/file.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/gc.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/hash.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/io.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/load.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/marshal.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/numeric.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/object.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/parse.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/proc.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/process.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/random.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/range.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/rational.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/re.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/ruby.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/select.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/signal.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/string.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/struct.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/thread.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/time.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/variable.h
+path_to_class.o: $(hdrdir)/ruby/internal/intern/vm.h
+path_to_class.o: $(hdrdir)/ruby/internal/interpreter.h
+path_to_class.o: $(hdrdir)/ruby/internal/iterator.h
+path_to_class.o: $(hdrdir)/ruby/internal/memory.h
+path_to_class.o: $(hdrdir)/ruby/internal/method.h
+path_to_class.o: $(hdrdir)/ruby/internal/module.h
+path_to_class.o: $(hdrdir)/ruby/internal/newobj.h
+path_to_class.o: $(hdrdir)/ruby/internal/rgengc.h
+path_to_class.o: $(hdrdir)/ruby/internal/scan_args.h
+path_to_class.o: $(hdrdir)/ruby/internal/special_consts.h
+path_to_class.o: $(hdrdir)/ruby/internal/static_assert.h
+path_to_class.o: $(hdrdir)/ruby/internal/stdalign.h
+path_to_class.o: $(hdrdir)/ruby/internal/stdbool.h
+path_to_class.o: $(hdrdir)/ruby/internal/symbol.h
+path_to_class.o: $(hdrdir)/ruby/internal/value.h
+path_to_class.o: $(hdrdir)/ruby/internal/value_type.h
+path_to_class.o: $(hdrdir)/ruby/internal/variable.h
+path_to_class.o: $(hdrdir)/ruby/internal/warning_push.h
+path_to_class.o: $(hdrdir)/ruby/internal/xmalloc.h
path_to_class.o: $(hdrdir)/ruby/missing.h
path_to_class.o: $(hdrdir)/ruby/ruby.h
path_to_class.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/popen_deadlock/depend b/ext/-test-/popen_deadlock/depend
index 4c3f3853fd..22da87f2fe 100644
--- a/ext/-test-/popen_deadlock/depend
+++ b/ext/-test-/popen_deadlock/depend
@@ -3,8 +3,157 @@ infinite_loop_dlsym.o: $(RUBY_EXTCONF_H)
infinite_loop_dlsym.o: $(arch_hdrdir)/ruby/config.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/assert.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/backward.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/assume.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/attributes.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/bool.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/inttypes.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/limits.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/long_long.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/stdalign.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/backward/2/stdarg.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/defines.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/intern.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/abi.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/anyargs.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/assume.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/artificial.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/cold.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/const.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/error.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/format.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/noalias.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/noinline.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/pure.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/restrict.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/warning.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/attr/weakref.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/cast.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/compiler_since.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/config.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/constant_p.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rarray.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rbasic.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rbignum.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rclass.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rdata.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rfile.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rhash.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/robject.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rregexp.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rstring.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rstruct.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/ctype.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/dllexport.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/dosish.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/error.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/eval.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/event.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/fl_type.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/gc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/glob.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/globals.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/attribute.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/builtin.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/extension.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/feature.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/has/warning.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/array.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/bignum.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/class.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/compar.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/complex.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/cont.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/dir.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/enum.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/error.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/eval.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/file.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/gc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/hash.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/io.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/load.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/marshal.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/numeric.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/object.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/parse.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/proc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/process.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/random.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/range.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/rational.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/re.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/ruby.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/select.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/signal.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/string.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/struct.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/thread.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/time.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/variable.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/intern/vm.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/interpreter.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/iterator.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/memory.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/method.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/module.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/newobj.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/rgengc.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/scan_args.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/special_consts.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/static_assert.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/stdalign.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/stdbool.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/symbol.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/value.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/value_type.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/variable.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/warning_push.h
+infinite_loop_dlsym.o: $(hdrdir)/ruby/internal/xmalloc.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/missing.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/ruby.h
infinite_loop_dlsym.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/popen_deadlock/extconf.rb b/ext/-test-/popen_deadlock/extconf.rb
index 24a7d79931..6b6ee7a6b8 100644
--- a/ext/-test-/popen_deadlock/extconf.rb
+++ b/ext/-test-/popen_deadlock/extconf.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: false
case RUBY_PLATFORM
when /solaris/i, /linux/i
+ $LDFLAGS << " -ldl"
create_makefile("-test-/popen_deadlock/infinite_loop_dlsym")
end
diff --git a/ext/-test-/postponed_job/depend b/ext/-test-/postponed_job/depend
index 998e2dcc9e..35aca7f2b0 100644
--- a/ext/-test-/postponed_job/depend
+++ b/ext/-test-/postponed_job/depend
@@ -4,9 +4,157 @@ postponed_job.o: $(arch_hdrdir)/ruby/config.h
postponed_job.o: $(hdrdir)/ruby.h
postponed_job.o: $(hdrdir)/ruby/assert.h
postponed_job.o: $(hdrdir)/ruby/backward.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/assume.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/attributes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/bool.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/inttypes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/limits.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/long_long.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdalign.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdarg.h
postponed_job.o: $(hdrdir)/ruby/debug.h
postponed_job.o: $(hdrdir)/ruby/defines.h
postponed_job.o: $(hdrdir)/ruby/intern.h
+postponed_job.o: $(hdrdir)/ruby/internal/abi.h
+postponed_job.o: $(hdrdir)/ruby/internal/anyargs.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+postponed_job.o: $(hdrdir)/ruby/internal/assume.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/artificial.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/cold.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/const.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/error.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/format.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/noalias.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/noinline.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/pure.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/restrict.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/warning.h
+postponed_job.o: $(hdrdir)/ruby/internal/attr/weakref.h
+postponed_job.o: $(hdrdir)/ruby/internal/cast.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+postponed_job.o: $(hdrdir)/ruby/internal/compiler_since.h
+postponed_job.o: $(hdrdir)/ruby/internal/config.h
+postponed_job.o: $(hdrdir)/ruby/internal/constant_p.h
+postponed_job.o: $(hdrdir)/ruby/internal/core.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rarray.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rbasic.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rbignum.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rclass.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rdata.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rfile.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rhash.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/robject.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rregexp.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rstring.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rstruct.h
+postponed_job.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+postponed_job.o: $(hdrdir)/ruby/internal/ctype.h
+postponed_job.o: $(hdrdir)/ruby/internal/dllexport.h
+postponed_job.o: $(hdrdir)/ruby/internal/dosish.h
+postponed_job.o: $(hdrdir)/ruby/internal/error.h
+postponed_job.o: $(hdrdir)/ruby/internal/eval.h
+postponed_job.o: $(hdrdir)/ruby/internal/event.h
+postponed_job.o: $(hdrdir)/ruby/internal/fl_type.h
+postponed_job.o: $(hdrdir)/ruby/internal/gc.h
+postponed_job.o: $(hdrdir)/ruby/internal/glob.h
+postponed_job.o: $(hdrdir)/ruby/internal/globals.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/attribute.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/builtin.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/extension.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/feature.h
+postponed_job.o: $(hdrdir)/ruby/internal/has/warning.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/array.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/bignum.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/class.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/compar.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/complex.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/cont.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/dir.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/enum.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/error.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/eval.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/file.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/gc.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/hash.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/io.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/load.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/marshal.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/numeric.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/object.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/parse.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/proc.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/process.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/random.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/range.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/rational.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/re.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/ruby.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/select.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/signal.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/string.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/struct.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/thread.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/time.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/variable.h
+postponed_job.o: $(hdrdir)/ruby/internal/intern/vm.h
+postponed_job.o: $(hdrdir)/ruby/internal/interpreter.h
+postponed_job.o: $(hdrdir)/ruby/internal/iterator.h
+postponed_job.o: $(hdrdir)/ruby/internal/memory.h
+postponed_job.o: $(hdrdir)/ruby/internal/method.h
+postponed_job.o: $(hdrdir)/ruby/internal/module.h
+postponed_job.o: $(hdrdir)/ruby/internal/newobj.h
+postponed_job.o: $(hdrdir)/ruby/internal/rgengc.h
+postponed_job.o: $(hdrdir)/ruby/internal/scan_args.h
+postponed_job.o: $(hdrdir)/ruby/internal/special_consts.h
+postponed_job.o: $(hdrdir)/ruby/internal/static_assert.h
+postponed_job.o: $(hdrdir)/ruby/internal/stdalign.h
+postponed_job.o: $(hdrdir)/ruby/internal/stdbool.h
+postponed_job.o: $(hdrdir)/ruby/internal/symbol.h
+postponed_job.o: $(hdrdir)/ruby/internal/value.h
+postponed_job.o: $(hdrdir)/ruby/internal/value_type.h
+postponed_job.o: $(hdrdir)/ruby/internal/variable.h
+postponed_job.o: $(hdrdir)/ruby/internal/warning_push.h
+postponed_job.o: $(hdrdir)/ruby/internal/xmalloc.h
postponed_job.o: $(hdrdir)/ruby/missing.h
postponed_job.o: $(hdrdir)/ruby/ruby.h
postponed_job.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/postponed_job/postponed_job.c b/ext/-test-/postponed_job/postponed_job.c
index d8684d475a..fa57bef6f5 100644
--- a/ext/-test-/postponed_job/postponed_job.c
+++ b/ext/-test-/postponed_job/postponed_job.c
@@ -58,6 +58,34 @@ pjob_call_direct(VALUE self, VALUE obj)
return self;
}
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+
+static void *
+pjob_register_in_c_thread_i(void *obj)
+{
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ return NULL;
+}
+
+static VALUE
+pjob_register_in_c_thread(VALUE self, VALUE obj)
+{
+ pthread_t thread;
+ if (pthread_create(&thread, NULL, pjob_register_in_c_thread_i, (void *)obj)) {
+ return Qfalse;
+ }
+
+ if (pthread_join(thread, NULL)) {
+ return Qfalse;
+ }
+
+ return Qtrue;
+}
+#endif
+
void
Init_postponed_job(VALUE self)
{
@@ -65,5 +93,8 @@ Init_postponed_job(VALUE self)
rb_define_module_function(mBug, "postponed_job_register", pjob_register, 1);
rb_define_module_function(mBug, "postponed_job_register_one", pjob_register_one, 1);
rb_define_module_function(mBug, "postponed_job_call_direct", pjob_call_direct, 1);
+#ifdef HAVE_PTHREAD_H
+ rb_define_module_function(mBug, "postponed_job_register_in_c_thread", pjob_register_in_c_thread, 1);
+#endif
}
diff --git a/ext/-test-/printf/depend b/ext/-test-/printf/depend
index 7860797f50..6dfe1fe03d 100644
--- a/ext/-test-/printf/depend
+++ b/ext/-test-/printf/depend
@@ -4,9 +4,166 @@ printf.o: $(arch_hdrdir)/ruby/config.h
printf.o: $(hdrdir)/ruby.h
printf.o: $(hdrdir)/ruby/assert.h
printf.o: $(hdrdir)/ruby/backward.h
+printf.o: $(hdrdir)/ruby/backward/2/assume.h
+printf.o: $(hdrdir)/ruby/backward/2/attributes.h
+printf.o: $(hdrdir)/ruby/backward/2/bool.h
+printf.o: $(hdrdir)/ruby/backward/2/inttypes.h
+printf.o: $(hdrdir)/ruby/backward/2/limits.h
+printf.o: $(hdrdir)/ruby/backward/2/long_long.h
+printf.o: $(hdrdir)/ruby/backward/2/stdalign.h
+printf.o: $(hdrdir)/ruby/backward/2/stdarg.h
printf.o: $(hdrdir)/ruby/defines.h
printf.o: $(hdrdir)/ruby/encoding.h
printf.o: $(hdrdir)/ruby/intern.h
+printf.o: $(hdrdir)/ruby/internal/abi.h
+printf.o: $(hdrdir)/ruby/internal/anyargs.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+printf.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+printf.o: $(hdrdir)/ruby/internal/assume.h
+printf.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+printf.o: $(hdrdir)/ruby/internal/attr/artificial.h
+printf.o: $(hdrdir)/ruby/internal/attr/cold.h
+printf.o: $(hdrdir)/ruby/internal/attr/const.h
+printf.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+printf.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+printf.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+printf.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+printf.o: $(hdrdir)/ruby/internal/attr/error.h
+printf.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+printf.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+printf.o: $(hdrdir)/ruby/internal/attr/format.h
+printf.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+printf.o: $(hdrdir)/ruby/internal/attr/noalias.h
+printf.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+printf.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+printf.o: $(hdrdir)/ruby/internal/attr/noinline.h
+printf.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+printf.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+printf.o: $(hdrdir)/ruby/internal/attr/pure.h
+printf.o: $(hdrdir)/ruby/internal/attr/restrict.h
+printf.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+printf.o: $(hdrdir)/ruby/internal/attr/warning.h
+printf.o: $(hdrdir)/ruby/internal/attr/weakref.h
+printf.o: $(hdrdir)/ruby/internal/cast.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+printf.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+printf.o: $(hdrdir)/ruby/internal/compiler_since.h
+printf.o: $(hdrdir)/ruby/internal/config.h
+printf.o: $(hdrdir)/ruby/internal/constant_p.h
+printf.o: $(hdrdir)/ruby/internal/core.h
+printf.o: $(hdrdir)/ruby/internal/core/rarray.h
+printf.o: $(hdrdir)/ruby/internal/core/rbasic.h
+printf.o: $(hdrdir)/ruby/internal/core/rbignum.h
+printf.o: $(hdrdir)/ruby/internal/core/rclass.h
+printf.o: $(hdrdir)/ruby/internal/core/rdata.h
+printf.o: $(hdrdir)/ruby/internal/core/rfile.h
+printf.o: $(hdrdir)/ruby/internal/core/rhash.h
+printf.o: $(hdrdir)/ruby/internal/core/robject.h
+printf.o: $(hdrdir)/ruby/internal/core/rregexp.h
+printf.o: $(hdrdir)/ruby/internal/core/rstring.h
+printf.o: $(hdrdir)/ruby/internal/core/rstruct.h
+printf.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+printf.o: $(hdrdir)/ruby/internal/ctype.h
+printf.o: $(hdrdir)/ruby/internal/dllexport.h
+printf.o: $(hdrdir)/ruby/internal/dosish.h
+printf.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+printf.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+printf.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+printf.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+printf.o: $(hdrdir)/ruby/internal/encoding/re.h
+printf.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+printf.o: $(hdrdir)/ruby/internal/encoding/string.h
+printf.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+printf.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+printf.o: $(hdrdir)/ruby/internal/error.h
+printf.o: $(hdrdir)/ruby/internal/eval.h
+printf.o: $(hdrdir)/ruby/internal/event.h
+printf.o: $(hdrdir)/ruby/internal/fl_type.h
+printf.o: $(hdrdir)/ruby/internal/gc.h
+printf.o: $(hdrdir)/ruby/internal/glob.h
+printf.o: $(hdrdir)/ruby/internal/globals.h
+printf.o: $(hdrdir)/ruby/internal/has/attribute.h
+printf.o: $(hdrdir)/ruby/internal/has/builtin.h
+printf.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+printf.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+printf.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+printf.o: $(hdrdir)/ruby/internal/has/extension.h
+printf.o: $(hdrdir)/ruby/internal/has/feature.h
+printf.o: $(hdrdir)/ruby/internal/has/warning.h
+printf.o: $(hdrdir)/ruby/internal/intern/array.h
+printf.o: $(hdrdir)/ruby/internal/intern/bignum.h
+printf.o: $(hdrdir)/ruby/internal/intern/class.h
+printf.o: $(hdrdir)/ruby/internal/intern/compar.h
+printf.o: $(hdrdir)/ruby/internal/intern/complex.h
+printf.o: $(hdrdir)/ruby/internal/intern/cont.h
+printf.o: $(hdrdir)/ruby/internal/intern/dir.h
+printf.o: $(hdrdir)/ruby/internal/intern/enum.h
+printf.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+printf.o: $(hdrdir)/ruby/internal/intern/error.h
+printf.o: $(hdrdir)/ruby/internal/intern/eval.h
+printf.o: $(hdrdir)/ruby/internal/intern/file.h
+printf.o: $(hdrdir)/ruby/internal/intern/gc.h
+printf.o: $(hdrdir)/ruby/internal/intern/hash.h
+printf.o: $(hdrdir)/ruby/internal/intern/io.h
+printf.o: $(hdrdir)/ruby/internal/intern/load.h
+printf.o: $(hdrdir)/ruby/internal/intern/marshal.h
+printf.o: $(hdrdir)/ruby/internal/intern/numeric.h
+printf.o: $(hdrdir)/ruby/internal/intern/object.h
+printf.o: $(hdrdir)/ruby/internal/intern/parse.h
+printf.o: $(hdrdir)/ruby/internal/intern/proc.h
+printf.o: $(hdrdir)/ruby/internal/intern/process.h
+printf.o: $(hdrdir)/ruby/internal/intern/random.h
+printf.o: $(hdrdir)/ruby/internal/intern/range.h
+printf.o: $(hdrdir)/ruby/internal/intern/rational.h
+printf.o: $(hdrdir)/ruby/internal/intern/re.h
+printf.o: $(hdrdir)/ruby/internal/intern/ruby.h
+printf.o: $(hdrdir)/ruby/internal/intern/select.h
+printf.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+printf.o: $(hdrdir)/ruby/internal/intern/signal.h
+printf.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+printf.o: $(hdrdir)/ruby/internal/intern/string.h
+printf.o: $(hdrdir)/ruby/internal/intern/struct.h
+printf.o: $(hdrdir)/ruby/internal/intern/thread.h
+printf.o: $(hdrdir)/ruby/internal/intern/time.h
+printf.o: $(hdrdir)/ruby/internal/intern/variable.h
+printf.o: $(hdrdir)/ruby/internal/intern/vm.h
+printf.o: $(hdrdir)/ruby/internal/interpreter.h
+printf.o: $(hdrdir)/ruby/internal/iterator.h
+printf.o: $(hdrdir)/ruby/internal/memory.h
+printf.o: $(hdrdir)/ruby/internal/method.h
+printf.o: $(hdrdir)/ruby/internal/module.h
+printf.o: $(hdrdir)/ruby/internal/newobj.h
+printf.o: $(hdrdir)/ruby/internal/rgengc.h
+printf.o: $(hdrdir)/ruby/internal/scan_args.h
+printf.o: $(hdrdir)/ruby/internal/special_consts.h
+printf.o: $(hdrdir)/ruby/internal/static_assert.h
+printf.o: $(hdrdir)/ruby/internal/stdalign.h
+printf.o: $(hdrdir)/ruby/internal/stdbool.h
+printf.o: $(hdrdir)/ruby/internal/symbol.h
+printf.o: $(hdrdir)/ruby/internal/value.h
+printf.o: $(hdrdir)/ruby/internal/value_type.h
+printf.o: $(hdrdir)/ruby/internal/variable.h
+printf.o: $(hdrdir)/ruby/internal/warning_push.h
+printf.o: $(hdrdir)/ruby/internal/xmalloc.h
printf.o: $(hdrdir)/ruby/missing.h
printf.o: $(hdrdir)/ruby/onigmo.h
printf.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c
index e793bb7a48..889c0d9f0d 100644
--- a/ext/-test-/printf/printf.c
+++ b/ext/-test-/printf/printf.c
@@ -25,7 +25,7 @@ uint_to_str(char *p, char *e, unsigned int x)
char *e0 = e;
if (e <= p) return p;
do {
- *--e = x % 10 + '0';
+ *--e = x % 10 + '0';
} while ((x /= 10) != 0 && e > p);
memmove(p, e, e0 - e);
return p + (e0 - e);
@@ -44,48 +44,48 @@ printf_test_call(int argc, VALUE *argv, VALUE self)
if (RSTRING_LEN(type) != 1) rb_raise(rb_eArgError, "wrong length(%ld)", RSTRING_LEN(type));
switch (cnv = RSTRING_PTR(type)[0]) {
case 'd': case 'x': case 'o': case 'X':
- n = NUM2INT(num);
- break;
+ n = NUM2INT(num);
+ break;
case 's':
- s = StringValueCStr(num);
- break;
+ s = StringValueCStr(num);
+ break;
default: rb_raise(rb_eArgError, "wrong conversion(%c)", cnv);
}
*p++ = '%';
if (!NIL_P(opt)) {
- VALUE v;
- Check_Type(opt, T_HASH);
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("space"))))) {
- *p++ = ' ';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("hash"))))) {
- *p++ = '#';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("plus"))))) {
- *p++ = '+';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("minus"))))) {
- *p++ = '-';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("zero"))))) {
- *p++ = '0';
- }
- if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
- p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
- }
- if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
- *p++ = '.';
- if (FIXNUM_P(v))
- p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
- }
+ VALUE v;
+ Check_Type(opt, T_HASH);
+ if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("space"))))) {
+ *p++ = ' ';
+ }
+ if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("hash"))))) {
+ *p++ = '#';
+ }
+ if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("plus"))))) {
+ *p++ = '+';
+ }
+ if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("minus"))))) {
+ *p++ = '-';
+ }
+ if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("zero"))))) {
+ *p++ = '0';
+ }
+ if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
+ p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
+ }
+ if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
+ *p++ = '.';
+ if (FIXNUM_P(v))
+ p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
+ }
}
*p++ = cnv;
*p++ = '\0';
if (cnv == 's') {
- result = rb_enc_sprintf(rb_usascii_encoding(), format, s);
+ result = rb_enc_sprintf(rb_usascii_encoding(), format, s);
}
else {
- result = rb_enc_sprintf(rb_usascii_encoding(), format, n);
+ result = rb_enc_sprintf(rb_usascii_encoding(), format, n);
}
return rb_assoc_new(result, rb_usascii_str_new_cstr(format));
}
diff --git a/ext/-test-/proc/depend b/ext/-test-/proc/depend
index 5946e4ca0d..e3f1cf6ce9 100644
--- a/ext/-test-/proc/depend
+++ b/ext/-test-/proc/depend
@@ -4,8 +4,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ receiver.o: $(arch_hdrdir)/ruby/config.h
receiver.o: $(hdrdir)/ruby.h
receiver.o: $(hdrdir)/ruby/assert.h
receiver.o: $(hdrdir)/ruby/backward.h
+receiver.o: $(hdrdir)/ruby/backward/2/assume.h
+receiver.o: $(hdrdir)/ruby/backward/2/attributes.h
+receiver.o: $(hdrdir)/ruby/backward/2/bool.h
+receiver.o: $(hdrdir)/ruby/backward/2/inttypes.h
+receiver.o: $(hdrdir)/ruby/backward/2/limits.h
+receiver.o: $(hdrdir)/ruby/backward/2/long_long.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdalign.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdarg.h
receiver.o: $(hdrdir)/ruby/defines.h
receiver.o: $(hdrdir)/ruby/intern.h
+receiver.o: $(hdrdir)/ruby/internal/abi.h
+receiver.o: $(hdrdir)/ruby/internal/anyargs.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+receiver.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+receiver.o: $(hdrdir)/ruby/internal/assume.h
+receiver.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+receiver.o: $(hdrdir)/ruby/internal/attr/artificial.h
+receiver.o: $(hdrdir)/ruby/internal/attr/cold.h
+receiver.o: $(hdrdir)/ruby/internal/attr/const.h
+receiver.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+receiver.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+receiver.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+receiver.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+receiver.o: $(hdrdir)/ruby/internal/attr/error.h
+receiver.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+receiver.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+receiver.o: $(hdrdir)/ruby/internal/attr/format.h
+receiver.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+receiver.o: $(hdrdir)/ruby/internal/attr/noalias.h
+receiver.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+receiver.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+receiver.o: $(hdrdir)/ruby/internal/attr/noinline.h
+receiver.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+receiver.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+receiver.o: $(hdrdir)/ruby/internal/attr/pure.h
+receiver.o: $(hdrdir)/ruby/internal/attr/restrict.h
+receiver.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+receiver.o: $(hdrdir)/ruby/internal/attr/warning.h
+receiver.o: $(hdrdir)/ruby/internal/attr/weakref.h
+receiver.o: $(hdrdir)/ruby/internal/cast.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+receiver.o: $(hdrdir)/ruby/internal/compiler_since.h
+receiver.o: $(hdrdir)/ruby/internal/config.h
+receiver.o: $(hdrdir)/ruby/internal/constant_p.h
+receiver.o: $(hdrdir)/ruby/internal/core.h
+receiver.o: $(hdrdir)/ruby/internal/core/rarray.h
+receiver.o: $(hdrdir)/ruby/internal/core/rbasic.h
+receiver.o: $(hdrdir)/ruby/internal/core/rbignum.h
+receiver.o: $(hdrdir)/ruby/internal/core/rclass.h
+receiver.o: $(hdrdir)/ruby/internal/core/rdata.h
+receiver.o: $(hdrdir)/ruby/internal/core/rfile.h
+receiver.o: $(hdrdir)/ruby/internal/core/rhash.h
+receiver.o: $(hdrdir)/ruby/internal/core/robject.h
+receiver.o: $(hdrdir)/ruby/internal/core/rregexp.h
+receiver.o: $(hdrdir)/ruby/internal/core/rstring.h
+receiver.o: $(hdrdir)/ruby/internal/core/rstruct.h
+receiver.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+receiver.o: $(hdrdir)/ruby/internal/ctype.h
+receiver.o: $(hdrdir)/ruby/internal/dllexport.h
+receiver.o: $(hdrdir)/ruby/internal/dosish.h
+receiver.o: $(hdrdir)/ruby/internal/error.h
+receiver.o: $(hdrdir)/ruby/internal/eval.h
+receiver.o: $(hdrdir)/ruby/internal/event.h
+receiver.o: $(hdrdir)/ruby/internal/fl_type.h
+receiver.o: $(hdrdir)/ruby/internal/gc.h
+receiver.o: $(hdrdir)/ruby/internal/glob.h
+receiver.o: $(hdrdir)/ruby/internal/globals.h
+receiver.o: $(hdrdir)/ruby/internal/has/attribute.h
+receiver.o: $(hdrdir)/ruby/internal/has/builtin.h
+receiver.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+receiver.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+receiver.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+receiver.o: $(hdrdir)/ruby/internal/has/extension.h
+receiver.o: $(hdrdir)/ruby/internal/has/feature.h
+receiver.o: $(hdrdir)/ruby/internal/has/warning.h
+receiver.o: $(hdrdir)/ruby/internal/intern/array.h
+receiver.o: $(hdrdir)/ruby/internal/intern/bignum.h
+receiver.o: $(hdrdir)/ruby/internal/intern/class.h
+receiver.o: $(hdrdir)/ruby/internal/intern/compar.h
+receiver.o: $(hdrdir)/ruby/internal/intern/complex.h
+receiver.o: $(hdrdir)/ruby/internal/intern/cont.h
+receiver.o: $(hdrdir)/ruby/internal/intern/dir.h
+receiver.o: $(hdrdir)/ruby/internal/intern/enum.h
+receiver.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+receiver.o: $(hdrdir)/ruby/internal/intern/error.h
+receiver.o: $(hdrdir)/ruby/internal/intern/eval.h
+receiver.o: $(hdrdir)/ruby/internal/intern/file.h
+receiver.o: $(hdrdir)/ruby/internal/intern/gc.h
+receiver.o: $(hdrdir)/ruby/internal/intern/hash.h
+receiver.o: $(hdrdir)/ruby/internal/intern/io.h
+receiver.o: $(hdrdir)/ruby/internal/intern/load.h
+receiver.o: $(hdrdir)/ruby/internal/intern/marshal.h
+receiver.o: $(hdrdir)/ruby/internal/intern/numeric.h
+receiver.o: $(hdrdir)/ruby/internal/intern/object.h
+receiver.o: $(hdrdir)/ruby/internal/intern/parse.h
+receiver.o: $(hdrdir)/ruby/internal/intern/proc.h
+receiver.o: $(hdrdir)/ruby/internal/intern/process.h
+receiver.o: $(hdrdir)/ruby/internal/intern/random.h
+receiver.o: $(hdrdir)/ruby/internal/intern/range.h
+receiver.o: $(hdrdir)/ruby/internal/intern/rational.h
+receiver.o: $(hdrdir)/ruby/internal/intern/re.h
+receiver.o: $(hdrdir)/ruby/internal/intern/ruby.h
+receiver.o: $(hdrdir)/ruby/internal/intern/select.h
+receiver.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+receiver.o: $(hdrdir)/ruby/internal/intern/signal.h
+receiver.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+receiver.o: $(hdrdir)/ruby/internal/intern/string.h
+receiver.o: $(hdrdir)/ruby/internal/intern/struct.h
+receiver.o: $(hdrdir)/ruby/internal/intern/thread.h
+receiver.o: $(hdrdir)/ruby/internal/intern/time.h
+receiver.o: $(hdrdir)/ruby/internal/intern/variable.h
+receiver.o: $(hdrdir)/ruby/internal/intern/vm.h
+receiver.o: $(hdrdir)/ruby/internal/interpreter.h
+receiver.o: $(hdrdir)/ruby/internal/iterator.h
+receiver.o: $(hdrdir)/ruby/internal/memory.h
+receiver.o: $(hdrdir)/ruby/internal/method.h
+receiver.o: $(hdrdir)/ruby/internal/module.h
+receiver.o: $(hdrdir)/ruby/internal/newobj.h
+receiver.o: $(hdrdir)/ruby/internal/rgengc.h
+receiver.o: $(hdrdir)/ruby/internal/scan_args.h
+receiver.o: $(hdrdir)/ruby/internal/special_consts.h
+receiver.o: $(hdrdir)/ruby/internal/static_assert.h
+receiver.o: $(hdrdir)/ruby/internal/stdalign.h
+receiver.o: $(hdrdir)/ruby/internal/stdbool.h
+receiver.o: $(hdrdir)/ruby/internal/symbol.h
+receiver.o: $(hdrdir)/ruby/internal/value.h
+receiver.o: $(hdrdir)/ruby/internal/value_type.h
+receiver.o: $(hdrdir)/ruby/internal/variable.h
+receiver.o: $(hdrdir)/ruby/internal/warning_push.h
+receiver.o: $(hdrdir)/ruby/internal/xmalloc.h
receiver.o: $(hdrdir)/ruby/missing.h
receiver.o: $(hdrdir)/ruby/ruby.h
receiver.o: $(hdrdir)/ruby/st.h
@@ -28,8 +324,156 @@ super.o: $(arch_hdrdir)/ruby/config.h
super.o: $(hdrdir)/ruby.h
super.o: $(hdrdir)/ruby/assert.h
super.o: $(hdrdir)/ruby/backward.h
+super.o: $(hdrdir)/ruby/backward/2/assume.h
+super.o: $(hdrdir)/ruby/backward/2/attributes.h
+super.o: $(hdrdir)/ruby/backward/2/bool.h
+super.o: $(hdrdir)/ruby/backward/2/inttypes.h
+super.o: $(hdrdir)/ruby/backward/2/limits.h
+super.o: $(hdrdir)/ruby/backward/2/long_long.h
+super.o: $(hdrdir)/ruby/backward/2/stdalign.h
+super.o: $(hdrdir)/ruby/backward/2/stdarg.h
super.o: $(hdrdir)/ruby/defines.h
super.o: $(hdrdir)/ruby/intern.h
+super.o: $(hdrdir)/ruby/internal/abi.h
+super.o: $(hdrdir)/ruby/internal/anyargs.h
+super.o: $(hdrdir)/ruby/internal/arithmetic.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+super.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+super.o: $(hdrdir)/ruby/internal/assume.h
+super.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+super.o: $(hdrdir)/ruby/internal/attr/artificial.h
+super.o: $(hdrdir)/ruby/internal/attr/cold.h
+super.o: $(hdrdir)/ruby/internal/attr/const.h
+super.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+super.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+super.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+super.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+super.o: $(hdrdir)/ruby/internal/attr/error.h
+super.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+super.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+super.o: $(hdrdir)/ruby/internal/attr/format.h
+super.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+super.o: $(hdrdir)/ruby/internal/attr/noalias.h
+super.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+super.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+super.o: $(hdrdir)/ruby/internal/attr/noinline.h
+super.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+super.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+super.o: $(hdrdir)/ruby/internal/attr/pure.h
+super.o: $(hdrdir)/ruby/internal/attr/restrict.h
+super.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+super.o: $(hdrdir)/ruby/internal/attr/warning.h
+super.o: $(hdrdir)/ruby/internal/attr/weakref.h
+super.o: $(hdrdir)/ruby/internal/cast.h
+super.o: $(hdrdir)/ruby/internal/compiler_is.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+super.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+super.o: $(hdrdir)/ruby/internal/compiler_since.h
+super.o: $(hdrdir)/ruby/internal/config.h
+super.o: $(hdrdir)/ruby/internal/constant_p.h
+super.o: $(hdrdir)/ruby/internal/core.h
+super.o: $(hdrdir)/ruby/internal/core/rarray.h
+super.o: $(hdrdir)/ruby/internal/core/rbasic.h
+super.o: $(hdrdir)/ruby/internal/core/rbignum.h
+super.o: $(hdrdir)/ruby/internal/core/rclass.h
+super.o: $(hdrdir)/ruby/internal/core/rdata.h
+super.o: $(hdrdir)/ruby/internal/core/rfile.h
+super.o: $(hdrdir)/ruby/internal/core/rhash.h
+super.o: $(hdrdir)/ruby/internal/core/robject.h
+super.o: $(hdrdir)/ruby/internal/core/rregexp.h
+super.o: $(hdrdir)/ruby/internal/core/rstring.h
+super.o: $(hdrdir)/ruby/internal/core/rstruct.h
+super.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+super.o: $(hdrdir)/ruby/internal/ctype.h
+super.o: $(hdrdir)/ruby/internal/dllexport.h
+super.o: $(hdrdir)/ruby/internal/dosish.h
+super.o: $(hdrdir)/ruby/internal/error.h
+super.o: $(hdrdir)/ruby/internal/eval.h
+super.o: $(hdrdir)/ruby/internal/event.h
+super.o: $(hdrdir)/ruby/internal/fl_type.h
+super.o: $(hdrdir)/ruby/internal/gc.h
+super.o: $(hdrdir)/ruby/internal/glob.h
+super.o: $(hdrdir)/ruby/internal/globals.h
+super.o: $(hdrdir)/ruby/internal/has/attribute.h
+super.o: $(hdrdir)/ruby/internal/has/builtin.h
+super.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+super.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+super.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+super.o: $(hdrdir)/ruby/internal/has/extension.h
+super.o: $(hdrdir)/ruby/internal/has/feature.h
+super.o: $(hdrdir)/ruby/internal/has/warning.h
+super.o: $(hdrdir)/ruby/internal/intern/array.h
+super.o: $(hdrdir)/ruby/internal/intern/bignum.h
+super.o: $(hdrdir)/ruby/internal/intern/class.h
+super.o: $(hdrdir)/ruby/internal/intern/compar.h
+super.o: $(hdrdir)/ruby/internal/intern/complex.h
+super.o: $(hdrdir)/ruby/internal/intern/cont.h
+super.o: $(hdrdir)/ruby/internal/intern/dir.h
+super.o: $(hdrdir)/ruby/internal/intern/enum.h
+super.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+super.o: $(hdrdir)/ruby/internal/intern/error.h
+super.o: $(hdrdir)/ruby/internal/intern/eval.h
+super.o: $(hdrdir)/ruby/internal/intern/file.h
+super.o: $(hdrdir)/ruby/internal/intern/gc.h
+super.o: $(hdrdir)/ruby/internal/intern/hash.h
+super.o: $(hdrdir)/ruby/internal/intern/io.h
+super.o: $(hdrdir)/ruby/internal/intern/load.h
+super.o: $(hdrdir)/ruby/internal/intern/marshal.h
+super.o: $(hdrdir)/ruby/internal/intern/numeric.h
+super.o: $(hdrdir)/ruby/internal/intern/object.h
+super.o: $(hdrdir)/ruby/internal/intern/parse.h
+super.o: $(hdrdir)/ruby/internal/intern/proc.h
+super.o: $(hdrdir)/ruby/internal/intern/process.h
+super.o: $(hdrdir)/ruby/internal/intern/random.h
+super.o: $(hdrdir)/ruby/internal/intern/range.h
+super.o: $(hdrdir)/ruby/internal/intern/rational.h
+super.o: $(hdrdir)/ruby/internal/intern/re.h
+super.o: $(hdrdir)/ruby/internal/intern/ruby.h
+super.o: $(hdrdir)/ruby/internal/intern/select.h
+super.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+super.o: $(hdrdir)/ruby/internal/intern/signal.h
+super.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+super.o: $(hdrdir)/ruby/internal/intern/string.h
+super.o: $(hdrdir)/ruby/internal/intern/struct.h
+super.o: $(hdrdir)/ruby/internal/intern/thread.h
+super.o: $(hdrdir)/ruby/internal/intern/time.h
+super.o: $(hdrdir)/ruby/internal/intern/variable.h
+super.o: $(hdrdir)/ruby/internal/intern/vm.h
+super.o: $(hdrdir)/ruby/internal/interpreter.h
+super.o: $(hdrdir)/ruby/internal/iterator.h
+super.o: $(hdrdir)/ruby/internal/memory.h
+super.o: $(hdrdir)/ruby/internal/method.h
+super.o: $(hdrdir)/ruby/internal/module.h
+super.o: $(hdrdir)/ruby/internal/newobj.h
+super.o: $(hdrdir)/ruby/internal/rgengc.h
+super.o: $(hdrdir)/ruby/internal/scan_args.h
+super.o: $(hdrdir)/ruby/internal/special_consts.h
+super.o: $(hdrdir)/ruby/internal/static_assert.h
+super.o: $(hdrdir)/ruby/internal/stdalign.h
+super.o: $(hdrdir)/ruby/internal/stdbool.h
+super.o: $(hdrdir)/ruby/internal/symbol.h
+super.o: $(hdrdir)/ruby/internal/value.h
+super.o: $(hdrdir)/ruby/internal/value_type.h
+super.o: $(hdrdir)/ruby/internal/variable.h
+super.o: $(hdrdir)/ruby/internal/warning_push.h
+super.o: $(hdrdir)/ruby/internal/xmalloc.h
super.o: $(hdrdir)/ruby/missing.h
super.o: $(hdrdir)/ruby/ruby.h
super.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/proc/super.c b/ext/-test-/proc/super.c
index dbe8af08f1..816520e1df 100644
--- a/ext/-test-/proc/super.c
+++ b/ext/-test-/proc/super.c
@@ -9,7 +9,7 @@ bug_proc_call_super(RB_BLOCK_CALL_FUNC_ARGLIST(yieldarg, procarg))
args[1] = procarg;
ret = rb_call_super(2, args);
if (!NIL_P(blockarg)) {
- ret = rb_proc_call(blockarg, ret);
+ ret = rb_proc_call(blockarg, ret);
}
return ret;
}
diff --git a/ext/-test-/random/bad_version.c b/ext/-test-/random/bad_version.c
new file mode 100644
index 0000000000..dae63a6d19
--- /dev/null
+++ b/ext/-test-/random/bad_version.c
@@ -0,0 +1,135 @@
+#include "ruby/random.h"
+
+#if RUBY_RANDOM_INTERFACE_VERSION_MAJOR < RUBY_RANDOM_INTERFACE_VERSION_MAJOR_MAX
+# define DEFINE_VERSION_MAX 1
+#else
+# define DEFINE_VERSION_MAX 0
+#endif
+
+NORETURN(static void must_not_reach(void));
+static void
+must_not_reach(void)
+{
+ rb_raise(rb_eTypeError, "must not reach");
+}
+
+NORETURN(static void bad_version_init(rb_random_t *, const uint32_t *, size_t));
+static void
+bad_version_init(rb_random_t *rnd, const uint32_t *buf, size_t len)
+{
+ must_not_reach();
+}
+
+NORETURN(static void bad_version_init_int32(rb_random_t *, uint32_t));
+RB_RANDOM_DEFINE_INIT_INT32_FUNC(bad_version)
+
+NORETURN(static void bad_version_get_bytes(rb_random_t *, void *, size_t));
+static void
+bad_version_get_bytes(rb_random_t *rnd, void *p, size_t n)
+{
+ must_not_reach();
+}
+
+NORETURN(static uint32_t bad_version_get_int32(rb_random_t *));
+static uint32_t
+bad_version_get_int32(rb_random_t *rnd)
+{
+ must_not_reach();
+ UNREACHABLE_RETURN(0);
+}
+
+static VALUE
+bad_version_alloc(VALUE klass, const rb_data_type_t *type)
+{
+ rb_random_t *rnd;
+ VALUE obj = TypedData_Make_Struct(klass, rb_random_t, type, rnd);
+ rb_random_base_init(rnd);
+ return obj;
+}
+
+/* version 0 */
+static const rb_random_interface_t random_version_zero_if;
+
+static rb_random_data_type_t version_zero_type = {
+ "random/version_zero",
+ {
+ rb_random_mark,
+ RUBY_TYPED_DEFAULT_FREE,
+ },
+ RB_RANDOM_PARENT,
+ (void *)&random_version_zero_if,
+ RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static VALUE
+version_zero_alloc(VALUE klass)
+{
+ return bad_version_alloc(klass, &version_zero_type);
+}
+
+static void
+init_version_zero(VALUE mod, VALUE base)
+{
+ VALUE c = rb_define_class_under(mod, "VersionZero", base);
+ rb_define_alloc_func(c, version_zero_alloc);
+ RB_RANDOM_DATA_INIT_PARENT(version_zero_type);
+}
+
+#if DEFINE_VERSION_MAX
+/* version max */
+static const rb_random_interface_t random_version_max_if;
+static rb_random_data_type_t version_max_type = {
+ "random/version_max",
+ {
+ rb_random_mark,
+ RUBY_TYPED_DEFAULT_FREE,
+ },
+ RB_RANDOM_PARENT,
+ (void *)&random_version_max_if,
+ RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static VALUE
+version_max_alloc(VALUE klass)
+{
+ return bad_version_alloc(klass, &version_max_type);
+}
+
+static void
+init_version_max(VALUE mod, VALUE base)
+{
+ VALUE c = rb_define_class_under(mod, "VersionMax", base);
+ rb_define_alloc_func(c, version_max_alloc);
+ RB_RANDOM_DATA_INIT_PARENT(version_max_type);
+}
+#else
+static void
+init_version_max(mod, base)
+{
+}
+#endif
+
+void
+Init_random_bad_version(VALUE mod, VALUE base)
+{
+ init_version_zero(mod, base);
+ init_version_max(mod, base);
+}
+
+#undef RUBY_RANDOM_INTERFACE_VERSION_MAJOR
+
+#define RUBY_RANDOM_INTERFACE_VERSION_MAJOR 0
+static const rb_random_interface_t random_version_zero_if = {
+ 0,
+ RB_RANDOM_INTERFACE_DEFINE(bad_version)
+};
+#undef RUBY_RANDOM_INTERFACE_VERSION_MAJOR
+
+#if DEFINE_VERSION_MAX
+#define RUBY_RANDOM_INTERFACE_VERSION_MAJOR RUBY_RANDOM_INTERFACE_VERSION_MAJOR_MAX
+static const rb_random_interface_t random_version_max_if = {
+ 0,
+ RB_RANDOM_INTERFACE_DEFINE(bad_version)
+};
+#undef RUBY_RANDOM_INTERFACE_VERSION_MAJOR
+#endif
diff --git a/ext/-test-/random/depend b/ext/-test-/random/depend
new file mode 100644
index 0000000000..f2cbf7fc14
--- /dev/null
+++ b/ext/-test-/random/depend
@@ -0,0 +1,482 @@
+# AUTOGENERATED DEPENDENCIES START
+bad_version.o: $(RUBY_EXTCONF_H)
+bad_version.o: $(arch_hdrdir)/ruby/config.h
+bad_version.o: $(hdrdir)/ruby/assert.h
+bad_version.o: $(hdrdir)/ruby/backward.h
+bad_version.o: $(hdrdir)/ruby/backward/2/assume.h
+bad_version.o: $(hdrdir)/ruby/backward/2/attributes.h
+bad_version.o: $(hdrdir)/ruby/backward/2/bool.h
+bad_version.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bad_version.o: $(hdrdir)/ruby/backward/2/limits.h
+bad_version.o: $(hdrdir)/ruby/backward/2/long_long.h
+bad_version.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bad_version.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bad_version.o: $(hdrdir)/ruby/defines.h
+bad_version.o: $(hdrdir)/ruby/intern.h
+bad_version.o: $(hdrdir)/ruby/internal/abi.h
+bad_version.o: $(hdrdir)/ruby/internal/anyargs.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bad_version.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bad_version.o: $(hdrdir)/ruby/internal/assume.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/cold.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/const.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/error.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/format.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/pure.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/warning.h
+bad_version.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bad_version.o: $(hdrdir)/ruby/internal/cast.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bad_version.o: $(hdrdir)/ruby/internal/compiler_since.h
+bad_version.o: $(hdrdir)/ruby/internal/config.h
+bad_version.o: $(hdrdir)/ruby/internal/constant_p.h
+bad_version.o: $(hdrdir)/ruby/internal/core.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rarray.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rclass.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rdata.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rfile.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rhash.h
+bad_version.o: $(hdrdir)/ruby/internal/core/robject.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rstring.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bad_version.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bad_version.o: $(hdrdir)/ruby/internal/ctype.h
+bad_version.o: $(hdrdir)/ruby/internal/dllexport.h
+bad_version.o: $(hdrdir)/ruby/internal/dosish.h
+bad_version.o: $(hdrdir)/ruby/internal/error.h
+bad_version.o: $(hdrdir)/ruby/internal/eval.h
+bad_version.o: $(hdrdir)/ruby/internal/event.h
+bad_version.o: $(hdrdir)/ruby/internal/fl_type.h
+bad_version.o: $(hdrdir)/ruby/internal/gc.h
+bad_version.o: $(hdrdir)/ruby/internal/glob.h
+bad_version.o: $(hdrdir)/ruby/internal/globals.h
+bad_version.o: $(hdrdir)/ruby/internal/has/attribute.h
+bad_version.o: $(hdrdir)/ruby/internal/has/builtin.h
+bad_version.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bad_version.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bad_version.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bad_version.o: $(hdrdir)/ruby/internal/has/extension.h
+bad_version.o: $(hdrdir)/ruby/internal/has/feature.h
+bad_version.o: $(hdrdir)/ruby/internal/has/warning.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/array.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/class.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/compar.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/complex.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/cont.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/dir.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/enum.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/error.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/eval.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/file.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/gc.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/hash.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/io.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/load.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/object.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/parse.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/proc.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/process.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/random.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/range.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/rational.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/re.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/select.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/signal.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/string.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/struct.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/thread.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/time.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/variable.h
+bad_version.o: $(hdrdir)/ruby/internal/intern/vm.h
+bad_version.o: $(hdrdir)/ruby/internal/interpreter.h
+bad_version.o: $(hdrdir)/ruby/internal/iterator.h
+bad_version.o: $(hdrdir)/ruby/internal/memory.h
+bad_version.o: $(hdrdir)/ruby/internal/method.h
+bad_version.o: $(hdrdir)/ruby/internal/module.h
+bad_version.o: $(hdrdir)/ruby/internal/newobj.h
+bad_version.o: $(hdrdir)/ruby/internal/rgengc.h
+bad_version.o: $(hdrdir)/ruby/internal/scan_args.h
+bad_version.o: $(hdrdir)/ruby/internal/special_consts.h
+bad_version.o: $(hdrdir)/ruby/internal/static_assert.h
+bad_version.o: $(hdrdir)/ruby/internal/stdalign.h
+bad_version.o: $(hdrdir)/ruby/internal/stdbool.h
+bad_version.o: $(hdrdir)/ruby/internal/symbol.h
+bad_version.o: $(hdrdir)/ruby/internal/value.h
+bad_version.o: $(hdrdir)/ruby/internal/value_type.h
+bad_version.o: $(hdrdir)/ruby/internal/variable.h
+bad_version.o: $(hdrdir)/ruby/internal/warning_push.h
+bad_version.o: $(hdrdir)/ruby/internal/xmalloc.h
+bad_version.o: $(hdrdir)/ruby/missing.h
+bad_version.o: $(hdrdir)/ruby/random.h
+bad_version.o: $(hdrdir)/ruby/ruby.h
+bad_version.o: $(hdrdir)/ruby/st.h
+bad_version.o: $(hdrdir)/ruby/subst.h
+bad_version.o: bad_version.c
+init.o: $(RUBY_EXTCONF_H)
+init.o: $(arch_hdrdir)/ruby/config.h
+init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
+init.o: $(hdrdir)/ruby/missing.h
+init.o: $(hdrdir)/ruby/ruby.h
+init.o: $(hdrdir)/ruby/st.h
+init.o: $(hdrdir)/ruby/subst.h
+init.o: init.c
+loop.o: $(RUBY_EXTCONF_H)
+loop.o: $(arch_hdrdir)/ruby/config.h
+loop.o: $(hdrdir)/ruby/assert.h
+loop.o: $(hdrdir)/ruby/backward.h
+loop.o: $(hdrdir)/ruby/backward/2/assume.h
+loop.o: $(hdrdir)/ruby/backward/2/attributes.h
+loop.o: $(hdrdir)/ruby/backward/2/bool.h
+loop.o: $(hdrdir)/ruby/backward/2/inttypes.h
+loop.o: $(hdrdir)/ruby/backward/2/limits.h
+loop.o: $(hdrdir)/ruby/backward/2/long_long.h
+loop.o: $(hdrdir)/ruby/backward/2/stdalign.h
+loop.o: $(hdrdir)/ruby/backward/2/stdarg.h
+loop.o: $(hdrdir)/ruby/defines.h
+loop.o: $(hdrdir)/ruby/intern.h
+loop.o: $(hdrdir)/ruby/internal/abi.h
+loop.o: $(hdrdir)/ruby/internal/anyargs.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+loop.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+loop.o: $(hdrdir)/ruby/internal/assume.h
+loop.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+loop.o: $(hdrdir)/ruby/internal/attr/artificial.h
+loop.o: $(hdrdir)/ruby/internal/attr/cold.h
+loop.o: $(hdrdir)/ruby/internal/attr/const.h
+loop.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+loop.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+loop.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+loop.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+loop.o: $(hdrdir)/ruby/internal/attr/error.h
+loop.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+loop.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+loop.o: $(hdrdir)/ruby/internal/attr/format.h
+loop.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+loop.o: $(hdrdir)/ruby/internal/attr/noalias.h
+loop.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+loop.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+loop.o: $(hdrdir)/ruby/internal/attr/noinline.h
+loop.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+loop.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+loop.o: $(hdrdir)/ruby/internal/attr/pure.h
+loop.o: $(hdrdir)/ruby/internal/attr/restrict.h
+loop.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+loop.o: $(hdrdir)/ruby/internal/attr/warning.h
+loop.o: $(hdrdir)/ruby/internal/attr/weakref.h
+loop.o: $(hdrdir)/ruby/internal/cast.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+loop.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+loop.o: $(hdrdir)/ruby/internal/compiler_since.h
+loop.o: $(hdrdir)/ruby/internal/config.h
+loop.o: $(hdrdir)/ruby/internal/constant_p.h
+loop.o: $(hdrdir)/ruby/internal/core.h
+loop.o: $(hdrdir)/ruby/internal/core/rarray.h
+loop.o: $(hdrdir)/ruby/internal/core/rbasic.h
+loop.o: $(hdrdir)/ruby/internal/core/rbignum.h
+loop.o: $(hdrdir)/ruby/internal/core/rclass.h
+loop.o: $(hdrdir)/ruby/internal/core/rdata.h
+loop.o: $(hdrdir)/ruby/internal/core/rfile.h
+loop.o: $(hdrdir)/ruby/internal/core/rhash.h
+loop.o: $(hdrdir)/ruby/internal/core/robject.h
+loop.o: $(hdrdir)/ruby/internal/core/rregexp.h
+loop.o: $(hdrdir)/ruby/internal/core/rstring.h
+loop.o: $(hdrdir)/ruby/internal/core/rstruct.h
+loop.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+loop.o: $(hdrdir)/ruby/internal/ctype.h
+loop.o: $(hdrdir)/ruby/internal/dllexport.h
+loop.o: $(hdrdir)/ruby/internal/dosish.h
+loop.o: $(hdrdir)/ruby/internal/error.h
+loop.o: $(hdrdir)/ruby/internal/eval.h
+loop.o: $(hdrdir)/ruby/internal/event.h
+loop.o: $(hdrdir)/ruby/internal/fl_type.h
+loop.o: $(hdrdir)/ruby/internal/gc.h
+loop.o: $(hdrdir)/ruby/internal/glob.h
+loop.o: $(hdrdir)/ruby/internal/globals.h
+loop.o: $(hdrdir)/ruby/internal/has/attribute.h
+loop.o: $(hdrdir)/ruby/internal/has/builtin.h
+loop.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+loop.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+loop.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+loop.o: $(hdrdir)/ruby/internal/has/extension.h
+loop.o: $(hdrdir)/ruby/internal/has/feature.h
+loop.o: $(hdrdir)/ruby/internal/has/warning.h
+loop.o: $(hdrdir)/ruby/internal/intern/array.h
+loop.o: $(hdrdir)/ruby/internal/intern/bignum.h
+loop.o: $(hdrdir)/ruby/internal/intern/class.h
+loop.o: $(hdrdir)/ruby/internal/intern/compar.h
+loop.o: $(hdrdir)/ruby/internal/intern/complex.h
+loop.o: $(hdrdir)/ruby/internal/intern/cont.h
+loop.o: $(hdrdir)/ruby/internal/intern/dir.h
+loop.o: $(hdrdir)/ruby/internal/intern/enum.h
+loop.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+loop.o: $(hdrdir)/ruby/internal/intern/error.h
+loop.o: $(hdrdir)/ruby/internal/intern/eval.h
+loop.o: $(hdrdir)/ruby/internal/intern/file.h
+loop.o: $(hdrdir)/ruby/internal/intern/gc.h
+loop.o: $(hdrdir)/ruby/internal/intern/hash.h
+loop.o: $(hdrdir)/ruby/internal/intern/io.h
+loop.o: $(hdrdir)/ruby/internal/intern/load.h
+loop.o: $(hdrdir)/ruby/internal/intern/marshal.h
+loop.o: $(hdrdir)/ruby/internal/intern/numeric.h
+loop.o: $(hdrdir)/ruby/internal/intern/object.h
+loop.o: $(hdrdir)/ruby/internal/intern/parse.h
+loop.o: $(hdrdir)/ruby/internal/intern/proc.h
+loop.o: $(hdrdir)/ruby/internal/intern/process.h
+loop.o: $(hdrdir)/ruby/internal/intern/random.h
+loop.o: $(hdrdir)/ruby/internal/intern/range.h
+loop.o: $(hdrdir)/ruby/internal/intern/rational.h
+loop.o: $(hdrdir)/ruby/internal/intern/re.h
+loop.o: $(hdrdir)/ruby/internal/intern/ruby.h
+loop.o: $(hdrdir)/ruby/internal/intern/select.h
+loop.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+loop.o: $(hdrdir)/ruby/internal/intern/signal.h
+loop.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+loop.o: $(hdrdir)/ruby/internal/intern/string.h
+loop.o: $(hdrdir)/ruby/internal/intern/struct.h
+loop.o: $(hdrdir)/ruby/internal/intern/thread.h
+loop.o: $(hdrdir)/ruby/internal/intern/time.h
+loop.o: $(hdrdir)/ruby/internal/intern/variable.h
+loop.o: $(hdrdir)/ruby/internal/intern/vm.h
+loop.o: $(hdrdir)/ruby/internal/interpreter.h
+loop.o: $(hdrdir)/ruby/internal/iterator.h
+loop.o: $(hdrdir)/ruby/internal/memory.h
+loop.o: $(hdrdir)/ruby/internal/method.h
+loop.o: $(hdrdir)/ruby/internal/module.h
+loop.o: $(hdrdir)/ruby/internal/newobj.h
+loop.o: $(hdrdir)/ruby/internal/rgengc.h
+loop.o: $(hdrdir)/ruby/internal/scan_args.h
+loop.o: $(hdrdir)/ruby/internal/special_consts.h
+loop.o: $(hdrdir)/ruby/internal/static_assert.h
+loop.o: $(hdrdir)/ruby/internal/stdalign.h
+loop.o: $(hdrdir)/ruby/internal/stdbool.h
+loop.o: $(hdrdir)/ruby/internal/symbol.h
+loop.o: $(hdrdir)/ruby/internal/value.h
+loop.o: $(hdrdir)/ruby/internal/value_type.h
+loop.o: $(hdrdir)/ruby/internal/variable.h
+loop.o: $(hdrdir)/ruby/internal/warning_push.h
+loop.o: $(hdrdir)/ruby/internal/xmalloc.h
+loop.o: $(hdrdir)/ruby/missing.h
+loop.o: $(hdrdir)/ruby/random.h
+loop.o: $(hdrdir)/ruby/ruby.h
+loop.o: $(hdrdir)/ruby/st.h
+loop.o: $(hdrdir)/ruby/subst.h
+loop.o: loop.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/random/extconf.rb b/ext/-test-/random/extconf.rb
new file mode 100644
index 0000000000..d786b15db9
--- /dev/null
+++ b/ext/-test-/random/extconf.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: false
+require_relative "../auto_ext.rb"
+auto_ext(inc: true)
diff --git a/ext/-test-/random/init.c b/ext/-test-/random/init.c
new file mode 100644
index 0000000000..320cba0ad6
--- /dev/null
+++ b/ext/-test-/random/init.c
@@ -0,0 +1,11 @@
+#include "ruby.h"
+
+#define init(n) {void Init_random_##n(VALUE mod, VALUE base); Init_random_##n(mod, base);}
+
+void
+Init_random(void)
+{
+ VALUE base = rb_const_get(rb_cRandom, rb_intern_const("Base"));
+ VALUE mod = rb_define_module_under(rb_define_module("Bug"), "Random");
+ TEST_INIT_FUNCS(init);
+}
diff --git a/ext/-test-/random/loop.c b/ext/-test-/random/loop.c
new file mode 100644
index 0000000000..b789ab1d01
--- /dev/null
+++ b/ext/-test-/random/loop.c
@@ -0,0 +1,111 @@
+#include "ruby/random.h"
+
+static const uint32_t max_seeds = 1024;
+
+typedef struct {
+ rb_random_t base;
+ uint32_t num, idx, *buf;
+} rand_loop_t;
+
+RB_RANDOM_INTERFACE_DECLARE_WITH_REAL(loop);
+static const rb_random_interface_t random_loop_if = {
+ 32,
+ RB_RANDOM_INTERFACE_DEFINE_WITH_REAL(loop)
+};
+
+RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop)
+static size_t
+random_loop_memsize(const void *ptr)
+{
+ const rand_loop_t *r = ptr;
+ return sizeof(*r) + r->num * sizeof(r->buf[0]);
+}
+
+static rb_random_data_type_t random_loop_type = {
+ "random/loop",
+ {
+ rb_random_mark,
+ RUBY_TYPED_DEFAULT_FREE,
+ random_loop_memsize,
+ },
+ RB_RANDOM_PARENT,
+ (void *)&random_loop_if,
+ RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+
+static VALUE
+loop_alloc(VALUE klass)
+{
+ rand_loop_t *rnd;
+ VALUE obj = TypedData_Make_Struct(klass, rand_loop_t, &random_loop_type, rnd);
+ rb_random_base_init(&rnd->base);
+ return obj;
+}
+
+static void
+loop_init(rb_random_t *rnd, const uint32_t *buf, size_t len)
+{
+ rand_loop_t *r = (rand_loop_t *)rnd;
+
+ if (len > max_seeds) len = max_seeds;
+
+ REALLOC_N(r->buf, uint32_t, len);
+ MEMCPY(r->buf, buf, uint32_t, (r->num = (uint32_t)len));
+}
+
+static void
+loop_get_bytes(rb_random_t *rnd, void *p, size_t n)
+{
+ uint8_t *buf = p;
+ while (n > 0) {
+ uint32_t x = loop_get_int32(rnd);
+ switch (n % 4) {
+ case 0:
+ *buf++ = (uint8_t)x;
+ n--;
+ /* FALLTHROUGH */
+ case 3:
+ *buf++ = (uint8_t)x;
+ n--;
+ /* FALLTHROUGH */
+ case 2:
+ *buf++ = (uint8_t)x;
+ n--;
+ /* FALLTHROUGH */
+ case 1:
+ *buf++ = (uint8_t)x;
+ n--;
+ }
+ }
+}
+
+static uint32_t
+loop_get_int32(rb_random_t *rnd)
+{
+ rand_loop_t *r = (rand_loop_t *)rnd;
+ if (r->idx < r->num) {
+ uint32_t x = r->buf[r->idx++];
+ if (r->idx >= r->num) r->idx = 0;
+ return x;
+ }
+ else if (r->num) {
+ return r->buf[r->idx = 0];
+ }
+ return 0;
+}
+
+static double
+loop_get_real(rb_random_t *rnd, int excl)
+{
+ uint32_t a = loop_get_int32(rnd);
+ return ldexp(a, -16);
+}
+
+void
+Init_random_loop(VALUE mod, VALUE base)
+{
+ VALUE c = rb_define_class_under(mod, "Loop", base);
+ rb_define_alloc_func(c, loop_alloc);
+ RB_RANDOM_DATA_INIT_PARENT(random_loop_type);
+}
diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend
index 39e65933f3..ce977821b8 100644
--- a/ext/-test-/rational/depend
+++ b/ext/-test-/rational/depend
@@ -5,15 +5,175 @@ rat.o: rat.c $(top_srcdir)/internal.h
# AUTOGENERATED DEPENDENCIES START
rat.o: $(RUBY_EXTCONF_H)
rat.o: $(arch_hdrdir)/ruby/config.h
-rat.o: $(hdrdir)/ruby.h
rat.o: $(hdrdir)/ruby/assert.h
rat.o: $(hdrdir)/ruby/backward.h
+rat.o: $(hdrdir)/ruby/backward/2/assume.h
+rat.o: $(hdrdir)/ruby/backward/2/attributes.h
+rat.o: $(hdrdir)/ruby/backward/2/bool.h
+rat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+rat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rat.o: $(hdrdir)/ruby/backward/2/limits.h
+rat.o: $(hdrdir)/ruby/backward/2/long_long.h
+rat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rat.o: $(hdrdir)/ruby/backward/2/stdarg.h
rat.o: $(hdrdir)/ruby/defines.h
rat.o: $(hdrdir)/ruby/intern.h
+rat.o: $(hdrdir)/ruby/internal/abi.h
+rat.o: $(hdrdir)/ruby/internal/anyargs.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rat.o: $(hdrdir)/ruby/internal/assume.h
+rat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rat.o: $(hdrdir)/ruby/internal/attr/cold.h
+rat.o: $(hdrdir)/ruby/internal/attr/const.h
+rat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rat.o: $(hdrdir)/ruby/internal/attr/error.h
+rat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rat.o: $(hdrdir)/ruby/internal/attr/format.h
+rat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rat.o: $(hdrdir)/ruby/internal/attr/pure.h
+rat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rat.o: $(hdrdir)/ruby/internal/attr/warning.h
+rat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rat.o: $(hdrdir)/ruby/internal/cast.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rat.o: $(hdrdir)/ruby/internal/compiler_since.h
+rat.o: $(hdrdir)/ruby/internal/config.h
+rat.o: $(hdrdir)/ruby/internal/constant_p.h
+rat.o: $(hdrdir)/ruby/internal/core.h
+rat.o: $(hdrdir)/ruby/internal/core/rarray.h
+rat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rat.o: $(hdrdir)/ruby/internal/core/rclass.h
+rat.o: $(hdrdir)/ruby/internal/core/rdata.h
+rat.o: $(hdrdir)/ruby/internal/core/rfile.h
+rat.o: $(hdrdir)/ruby/internal/core/rhash.h
+rat.o: $(hdrdir)/ruby/internal/core/robject.h
+rat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rat.o: $(hdrdir)/ruby/internal/core/rstring.h
+rat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rat.o: $(hdrdir)/ruby/internal/ctype.h
+rat.o: $(hdrdir)/ruby/internal/dllexport.h
+rat.o: $(hdrdir)/ruby/internal/dosish.h
+rat.o: $(hdrdir)/ruby/internal/error.h
+rat.o: $(hdrdir)/ruby/internal/eval.h
+rat.o: $(hdrdir)/ruby/internal/event.h
+rat.o: $(hdrdir)/ruby/internal/fl_type.h
+rat.o: $(hdrdir)/ruby/internal/gc.h
+rat.o: $(hdrdir)/ruby/internal/glob.h
+rat.o: $(hdrdir)/ruby/internal/globals.h
+rat.o: $(hdrdir)/ruby/internal/has/attribute.h
+rat.o: $(hdrdir)/ruby/internal/has/builtin.h
+rat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rat.o: $(hdrdir)/ruby/internal/has/extension.h
+rat.o: $(hdrdir)/ruby/internal/has/feature.h
+rat.o: $(hdrdir)/ruby/internal/has/warning.h
+rat.o: $(hdrdir)/ruby/internal/intern/array.h
+rat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rat.o: $(hdrdir)/ruby/internal/intern/class.h
+rat.o: $(hdrdir)/ruby/internal/intern/compar.h
+rat.o: $(hdrdir)/ruby/internal/intern/complex.h
+rat.o: $(hdrdir)/ruby/internal/intern/cont.h
+rat.o: $(hdrdir)/ruby/internal/intern/dir.h
+rat.o: $(hdrdir)/ruby/internal/intern/enum.h
+rat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rat.o: $(hdrdir)/ruby/internal/intern/error.h
+rat.o: $(hdrdir)/ruby/internal/intern/eval.h
+rat.o: $(hdrdir)/ruby/internal/intern/file.h
+rat.o: $(hdrdir)/ruby/internal/intern/gc.h
+rat.o: $(hdrdir)/ruby/internal/intern/hash.h
+rat.o: $(hdrdir)/ruby/internal/intern/io.h
+rat.o: $(hdrdir)/ruby/internal/intern/load.h
+rat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rat.o: $(hdrdir)/ruby/internal/intern/object.h
+rat.o: $(hdrdir)/ruby/internal/intern/parse.h
+rat.o: $(hdrdir)/ruby/internal/intern/proc.h
+rat.o: $(hdrdir)/ruby/internal/intern/process.h
+rat.o: $(hdrdir)/ruby/internal/intern/random.h
+rat.o: $(hdrdir)/ruby/internal/intern/range.h
+rat.o: $(hdrdir)/ruby/internal/intern/rational.h
+rat.o: $(hdrdir)/ruby/internal/intern/re.h
+rat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rat.o: $(hdrdir)/ruby/internal/intern/select.h
+rat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rat.o: $(hdrdir)/ruby/internal/intern/signal.h
+rat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rat.o: $(hdrdir)/ruby/internal/intern/string.h
+rat.o: $(hdrdir)/ruby/internal/intern/struct.h
+rat.o: $(hdrdir)/ruby/internal/intern/thread.h
+rat.o: $(hdrdir)/ruby/internal/intern/time.h
+rat.o: $(hdrdir)/ruby/internal/intern/variable.h
+rat.o: $(hdrdir)/ruby/internal/intern/vm.h
+rat.o: $(hdrdir)/ruby/internal/interpreter.h
+rat.o: $(hdrdir)/ruby/internal/iterator.h
+rat.o: $(hdrdir)/ruby/internal/memory.h
+rat.o: $(hdrdir)/ruby/internal/method.h
+rat.o: $(hdrdir)/ruby/internal/module.h
+rat.o: $(hdrdir)/ruby/internal/newobj.h
+rat.o: $(hdrdir)/ruby/internal/rgengc.h
+rat.o: $(hdrdir)/ruby/internal/scan_args.h
+rat.o: $(hdrdir)/ruby/internal/special_consts.h
+rat.o: $(hdrdir)/ruby/internal/static_assert.h
+rat.o: $(hdrdir)/ruby/internal/stdalign.h
+rat.o: $(hdrdir)/ruby/internal/stdbool.h
+rat.o: $(hdrdir)/ruby/internal/symbol.h
+rat.o: $(hdrdir)/ruby/internal/value.h
+rat.o: $(hdrdir)/ruby/internal/value_type.h
+rat.o: $(hdrdir)/ruby/internal/variable.h
+rat.o: $(hdrdir)/ruby/internal/warning_push.h
+rat.o: $(hdrdir)/ruby/internal/xmalloc.h
rat.o: $(hdrdir)/ruby/missing.h
rat.o: $(hdrdir)/ruby/ruby.h
rat.o: $(hdrdir)/ruby/st.h
rat.o: $(hdrdir)/ruby/subst.h
-rat.o: $(top_srcdir)/internal.h
+rat.o: $(top_srcdir)/internal/bignum.h
+rat.o: $(top_srcdir)/internal/bits.h
+rat.o: $(top_srcdir)/internal/compilers.h
+rat.o: $(top_srcdir)/internal/fixnum.h
+rat.o: $(top_srcdir)/internal/gc.h
+rat.o: $(top_srcdir)/internal/numeric.h
+rat.o: $(top_srcdir)/internal/rational.h
+rat.o: $(top_srcdir)/internal/serial.h
+rat.o: $(top_srcdir)/internal/static_assert.h
+rat.o: $(top_srcdir)/internal/vm.h
+rat.o: $(top_srcdir)/internal/warnings.h
+rat.o: $(top_srcdir)/ruby_assert.h
+rat.o: $(top_srcdir)/shape.h
rat.o: rat.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/rational/rat.c b/ext/-test-/rational/rat.c
index 772546fca8..6489fe3d7c 100644
--- a/ext/-test-/rational/rat.c
+++ b/ext/-test-/rational/rat.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/rational.h"
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
@@ -14,14 +14,14 @@ big(VALUE x)
#endif
static VALUE
-gcd_normal(VALUE x, VALUE y)
+gcd_normal(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_gcd_normal(rb_to_int(x), rb_to_int(y)));
}
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
static VALUE
-gcd_gmp(VALUE x, VALUE y)
+gcd_gmp(VALUE klass, VALUE x, VALUE y)
{
return rb_big_norm(rb_gcd_gmp(big(x), big(y)));
}
@@ -29,9 +29,20 @@ gcd_gmp(VALUE x, VALUE y)
#define gcd_gmp rb_f_notimplement
#endif
+static VALUE
+s_rational_raw(VALUE klass, VALUE x, VALUE y)
+{
+ return rb_rational_raw(x, y);
+}
+
void
-Init_rational(VALUE klass)
+Init_rational(void)
{
- rb_define_method(rb_cInteger, "gcd_normal", gcd_normal, 1);
- rb_define_method(rb_cInteger, "gcd_gmp", gcd_gmp, 1);
+ VALUE mBug = rb_define_module("Bug");
+ VALUE klass = rb_define_module_under(mBug, "Rational");
+
+ rb_define_singleton_method(klass, "gcd_normal", gcd_normal, 2);
+ rb_define_singleton_method(klass, "gcd_gmp", gcd_gmp, 2);
+
+ rb_define_singleton_method(klass, "raw", s_rational_raw, 2);
}
diff --git a/ext/-test-/rb_call_super_kw/depend b/ext/-test-/rb_call_super_kw/depend
index f65dcf9694..3512a081c9 100644
--- a/ext/-test-/rb_call_super_kw/depend
+++ b/ext/-test-/rb_call_super_kw/depend
@@ -4,8 +4,156 @@ rb_call_super_kw.o: $(arch_hdrdir)/ruby/config.h
rb_call_super_kw.o: $(hdrdir)/ruby.h
rb_call_super_kw.o: $(hdrdir)/ruby/assert.h
rb_call_super_kw.o: $(hdrdir)/ruby/backward.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
rb_call_super_kw.o: $(hdrdir)/ruby/defines.h
rb_call_super_kw.o: $(hdrdir)/ruby/intern.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/abi.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/anyargs.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/assume.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/cold.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/const.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/error.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/format.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/pure.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/warning.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/cast.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/compiler_since.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/config.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/constant_p.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rarray.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rclass.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rdata.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rfile.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rhash.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/robject.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rstring.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/ctype.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/dllexport.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/dosish.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/error.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/eval.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/event.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/fl_type.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/gc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/glob.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/globals.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/attribute.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/builtin.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/extension.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/feature.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/has/warning.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/array.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/class.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/compar.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/complex.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/cont.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/dir.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/enum.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/error.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/eval.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/file.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/gc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/hash.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/io.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/load.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/object.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/parse.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/proc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/process.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/random.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/range.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/rational.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/re.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/select.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/signal.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/string.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/struct.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/thread.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/time.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/variable.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/intern/vm.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/interpreter.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/iterator.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/memory.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/method.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/module.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/newobj.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/rgengc.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/scan_args.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/special_consts.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/static_assert.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/stdalign.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/stdbool.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/symbol.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/value.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/value_type.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/variable.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/warning_push.h
+rb_call_super_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
rb_call_super_kw.o: $(hdrdir)/ruby/missing.h
rb_call_super_kw.o: $(hdrdir)/ruby/ruby.h
rb_call_super_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/rb_call_super_kw/rb_call_super_kw.c b/ext/-test-/rb_call_super_kw/rb_call_super_kw.c
index 7f094545d2..61681ed733 100644
--- a/ext/-test-/rb_call_super_kw/rb_call_super_kw.c
+++ b/ext/-test-/rb_call_super_kw/rb_call_super_kw.c
@@ -7,7 +7,8 @@ rb_call_super_kw_m(int argc, VALUE *argv, VALUE self)
}
void
-Init_rb_call_super_kw(void) {
+Init_rb_call_super_kw(void)
+{
VALUE module = rb_define_module("Bug");
module = rb_define_module_under(module, "RbCallSuperKw");
rb_define_method(module, "m", rb_call_super_kw_m, -1);
diff --git a/ext/-test-/recursion/depend b/ext/-test-/recursion/depend
index bf8005724a..e499f95e73 100644
--- a/ext/-test-/recursion/depend
+++ b/ext/-test-/recursion/depend
@@ -4,8 +4,156 @@ recursion.o: $(arch_hdrdir)/ruby/config.h
recursion.o: $(hdrdir)/ruby.h
recursion.o: $(hdrdir)/ruby/assert.h
recursion.o: $(hdrdir)/ruby/backward.h
+recursion.o: $(hdrdir)/ruby/backward/2/assume.h
+recursion.o: $(hdrdir)/ruby/backward/2/attributes.h
+recursion.o: $(hdrdir)/ruby/backward/2/bool.h
+recursion.o: $(hdrdir)/ruby/backward/2/inttypes.h
+recursion.o: $(hdrdir)/ruby/backward/2/limits.h
+recursion.o: $(hdrdir)/ruby/backward/2/long_long.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdalign.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdarg.h
recursion.o: $(hdrdir)/ruby/defines.h
recursion.o: $(hdrdir)/ruby/intern.h
+recursion.o: $(hdrdir)/ruby/internal/abi.h
+recursion.o: $(hdrdir)/ruby/internal/anyargs.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+recursion.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+recursion.o: $(hdrdir)/ruby/internal/assume.h
+recursion.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+recursion.o: $(hdrdir)/ruby/internal/attr/artificial.h
+recursion.o: $(hdrdir)/ruby/internal/attr/cold.h
+recursion.o: $(hdrdir)/ruby/internal/attr/const.h
+recursion.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+recursion.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+recursion.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+recursion.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+recursion.o: $(hdrdir)/ruby/internal/attr/error.h
+recursion.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+recursion.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+recursion.o: $(hdrdir)/ruby/internal/attr/format.h
+recursion.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+recursion.o: $(hdrdir)/ruby/internal/attr/noalias.h
+recursion.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+recursion.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+recursion.o: $(hdrdir)/ruby/internal/attr/noinline.h
+recursion.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+recursion.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+recursion.o: $(hdrdir)/ruby/internal/attr/pure.h
+recursion.o: $(hdrdir)/ruby/internal/attr/restrict.h
+recursion.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+recursion.o: $(hdrdir)/ruby/internal/attr/warning.h
+recursion.o: $(hdrdir)/ruby/internal/attr/weakref.h
+recursion.o: $(hdrdir)/ruby/internal/cast.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+recursion.o: $(hdrdir)/ruby/internal/compiler_since.h
+recursion.o: $(hdrdir)/ruby/internal/config.h
+recursion.o: $(hdrdir)/ruby/internal/constant_p.h
+recursion.o: $(hdrdir)/ruby/internal/core.h
+recursion.o: $(hdrdir)/ruby/internal/core/rarray.h
+recursion.o: $(hdrdir)/ruby/internal/core/rbasic.h
+recursion.o: $(hdrdir)/ruby/internal/core/rbignum.h
+recursion.o: $(hdrdir)/ruby/internal/core/rclass.h
+recursion.o: $(hdrdir)/ruby/internal/core/rdata.h
+recursion.o: $(hdrdir)/ruby/internal/core/rfile.h
+recursion.o: $(hdrdir)/ruby/internal/core/rhash.h
+recursion.o: $(hdrdir)/ruby/internal/core/robject.h
+recursion.o: $(hdrdir)/ruby/internal/core/rregexp.h
+recursion.o: $(hdrdir)/ruby/internal/core/rstring.h
+recursion.o: $(hdrdir)/ruby/internal/core/rstruct.h
+recursion.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+recursion.o: $(hdrdir)/ruby/internal/ctype.h
+recursion.o: $(hdrdir)/ruby/internal/dllexport.h
+recursion.o: $(hdrdir)/ruby/internal/dosish.h
+recursion.o: $(hdrdir)/ruby/internal/error.h
+recursion.o: $(hdrdir)/ruby/internal/eval.h
+recursion.o: $(hdrdir)/ruby/internal/event.h
+recursion.o: $(hdrdir)/ruby/internal/fl_type.h
+recursion.o: $(hdrdir)/ruby/internal/gc.h
+recursion.o: $(hdrdir)/ruby/internal/glob.h
+recursion.o: $(hdrdir)/ruby/internal/globals.h
+recursion.o: $(hdrdir)/ruby/internal/has/attribute.h
+recursion.o: $(hdrdir)/ruby/internal/has/builtin.h
+recursion.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+recursion.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+recursion.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+recursion.o: $(hdrdir)/ruby/internal/has/extension.h
+recursion.o: $(hdrdir)/ruby/internal/has/feature.h
+recursion.o: $(hdrdir)/ruby/internal/has/warning.h
+recursion.o: $(hdrdir)/ruby/internal/intern/array.h
+recursion.o: $(hdrdir)/ruby/internal/intern/bignum.h
+recursion.o: $(hdrdir)/ruby/internal/intern/class.h
+recursion.o: $(hdrdir)/ruby/internal/intern/compar.h
+recursion.o: $(hdrdir)/ruby/internal/intern/complex.h
+recursion.o: $(hdrdir)/ruby/internal/intern/cont.h
+recursion.o: $(hdrdir)/ruby/internal/intern/dir.h
+recursion.o: $(hdrdir)/ruby/internal/intern/enum.h
+recursion.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+recursion.o: $(hdrdir)/ruby/internal/intern/error.h
+recursion.o: $(hdrdir)/ruby/internal/intern/eval.h
+recursion.o: $(hdrdir)/ruby/internal/intern/file.h
+recursion.o: $(hdrdir)/ruby/internal/intern/gc.h
+recursion.o: $(hdrdir)/ruby/internal/intern/hash.h
+recursion.o: $(hdrdir)/ruby/internal/intern/io.h
+recursion.o: $(hdrdir)/ruby/internal/intern/load.h
+recursion.o: $(hdrdir)/ruby/internal/intern/marshal.h
+recursion.o: $(hdrdir)/ruby/internal/intern/numeric.h
+recursion.o: $(hdrdir)/ruby/internal/intern/object.h
+recursion.o: $(hdrdir)/ruby/internal/intern/parse.h
+recursion.o: $(hdrdir)/ruby/internal/intern/proc.h
+recursion.o: $(hdrdir)/ruby/internal/intern/process.h
+recursion.o: $(hdrdir)/ruby/internal/intern/random.h
+recursion.o: $(hdrdir)/ruby/internal/intern/range.h
+recursion.o: $(hdrdir)/ruby/internal/intern/rational.h
+recursion.o: $(hdrdir)/ruby/internal/intern/re.h
+recursion.o: $(hdrdir)/ruby/internal/intern/ruby.h
+recursion.o: $(hdrdir)/ruby/internal/intern/select.h
+recursion.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+recursion.o: $(hdrdir)/ruby/internal/intern/signal.h
+recursion.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+recursion.o: $(hdrdir)/ruby/internal/intern/string.h
+recursion.o: $(hdrdir)/ruby/internal/intern/struct.h
+recursion.o: $(hdrdir)/ruby/internal/intern/thread.h
+recursion.o: $(hdrdir)/ruby/internal/intern/time.h
+recursion.o: $(hdrdir)/ruby/internal/intern/variable.h
+recursion.o: $(hdrdir)/ruby/internal/intern/vm.h
+recursion.o: $(hdrdir)/ruby/internal/interpreter.h
+recursion.o: $(hdrdir)/ruby/internal/iterator.h
+recursion.o: $(hdrdir)/ruby/internal/memory.h
+recursion.o: $(hdrdir)/ruby/internal/method.h
+recursion.o: $(hdrdir)/ruby/internal/module.h
+recursion.o: $(hdrdir)/ruby/internal/newobj.h
+recursion.o: $(hdrdir)/ruby/internal/rgengc.h
+recursion.o: $(hdrdir)/ruby/internal/scan_args.h
+recursion.o: $(hdrdir)/ruby/internal/special_consts.h
+recursion.o: $(hdrdir)/ruby/internal/static_assert.h
+recursion.o: $(hdrdir)/ruby/internal/stdalign.h
+recursion.o: $(hdrdir)/ruby/internal/stdbool.h
+recursion.o: $(hdrdir)/ruby/internal/symbol.h
+recursion.o: $(hdrdir)/ruby/internal/value.h
+recursion.o: $(hdrdir)/ruby/internal/value_type.h
+recursion.o: $(hdrdir)/ruby/internal/variable.h
+recursion.o: $(hdrdir)/ruby/internal/warning_push.h
+recursion.o: $(hdrdir)/ruby/internal/xmalloc.h
recursion.o: $(hdrdir)/ruby/missing.h
recursion.o: $(hdrdir)/ruby/ruby.h
recursion.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/regexp/depend b/ext/-test-/regexp/depend
index 7c88e1235c..fa431e013a 100644
--- a/ext/-test-/regexp/depend
+++ b/ext/-test-/regexp/depend
@@ -4,8 +4,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ parse_depth_limit.o: $(arch_hdrdir)/ruby/config.h
parse_depth_limit.o: $(hdrdir)/ruby.h
parse_depth_limit.o: $(hdrdir)/ruby/assert.h
parse_depth_limit.o: $(hdrdir)/ruby/backward.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/assume.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/attributes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/bool.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/limits.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/long_long.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdarg.h
parse_depth_limit.o: $(hdrdir)/ruby/defines.h
parse_depth_limit.o: $(hdrdir)/ruby/intern.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/abi.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/anyargs.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/assume.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/artificial.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/cold.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/const.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/error.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/format.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/noalias.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/noinline.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/pure.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/restrict.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/warning.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/attr/weakref.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/cast.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/compiler_since.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/config.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/constant_p.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rarray.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rbasic.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rbignum.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rclass.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rdata.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rfile.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rhash.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/robject.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rregexp.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rstring.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rstruct.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/ctype.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/dllexport.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/dosish.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/error.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/eval.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/event.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/fl_type.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/gc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/glob.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/globals.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/attribute.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/builtin.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/extension.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/feature.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/has/warning.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/array.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/bignum.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/class.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/compar.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/complex.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/cont.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/dir.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/enum.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/error.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/eval.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/file.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/gc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/hash.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/io.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/load.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/marshal.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/numeric.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/object.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/parse.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/proc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/process.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/random.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/range.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/rational.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/re.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/ruby.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/select.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/signal.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/string.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/struct.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/thread.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/time.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/variable.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/intern/vm.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/interpreter.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/iterator.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/memory.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/method.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/module.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/newobj.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/rgengc.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/scan_args.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/special_consts.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/static_assert.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/stdalign.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/stdbool.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/symbol.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/value.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/value_type.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/variable.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/warning_push.h
+parse_depth_limit.o: $(hdrdir)/ruby/internal/xmalloc.h
parse_depth_limit.o: $(hdrdir)/ruby/missing.h
parse_depth_limit.o: $(hdrdir)/ruby/onigmo.h
parse_depth_limit.o: $(hdrdir)/ruby/ruby.h
diff --git a/ext/-test-/scan_args/depend b/ext/-test-/scan_args/depend
index c230961ae3..2194936b04 100644
--- a/ext/-test-/scan_args/depend
+++ b/ext/-test-/scan_args/depend
@@ -4,8 +4,156 @@ scan_args.o: $(arch_hdrdir)/ruby/config.h
scan_args.o: $(hdrdir)/ruby.h
scan_args.o: $(hdrdir)/ruby/assert.h
scan_args.o: $(hdrdir)/ruby/backward.h
+scan_args.o: $(hdrdir)/ruby/backward/2/assume.h
+scan_args.o: $(hdrdir)/ruby/backward/2/attributes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/bool.h
+scan_args.o: $(hdrdir)/ruby/backward/2/inttypes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/limits.h
+scan_args.o: $(hdrdir)/ruby/backward/2/long_long.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdalign.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdarg.h
scan_args.o: $(hdrdir)/ruby/defines.h
scan_args.o: $(hdrdir)/ruby/intern.h
+scan_args.o: $(hdrdir)/ruby/internal/abi.h
+scan_args.o: $(hdrdir)/ruby/internal/anyargs.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+scan_args.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+scan_args.o: $(hdrdir)/ruby/internal/assume.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/artificial.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/cold.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/const.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/error.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/format.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/noalias.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/noinline.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/pure.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/restrict.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/warning.h
+scan_args.o: $(hdrdir)/ruby/internal/attr/weakref.h
+scan_args.o: $(hdrdir)/ruby/internal/cast.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+scan_args.o: $(hdrdir)/ruby/internal/compiler_since.h
+scan_args.o: $(hdrdir)/ruby/internal/config.h
+scan_args.o: $(hdrdir)/ruby/internal/constant_p.h
+scan_args.o: $(hdrdir)/ruby/internal/core.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rarray.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rbasic.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rbignum.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rclass.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rdata.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rfile.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rhash.h
+scan_args.o: $(hdrdir)/ruby/internal/core/robject.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rregexp.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rstring.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rstruct.h
+scan_args.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+scan_args.o: $(hdrdir)/ruby/internal/ctype.h
+scan_args.o: $(hdrdir)/ruby/internal/dllexport.h
+scan_args.o: $(hdrdir)/ruby/internal/dosish.h
+scan_args.o: $(hdrdir)/ruby/internal/error.h
+scan_args.o: $(hdrdir)/ruby/internal/eval.h
+scan_args.o: $(hdrdir)/ruby/internal/event.h
+scan_args.o: $(hdrdir)/ruby/internal/fl_type.h
+scan_args.o: $(hdrdir)/ruby/internal/gc.h
+scan_args.o: $(hdrdir)/ruby/internal/glob.h
+scan_args.o: $(hdrdir)/ruby/internal/globals.h
+scan_args.o: $(hdrdir)/ruby/internal/has/attribute.h
+scan_args.o: $(hdrdir)/ruby/internal/has/builtin.h
+scan_args.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+scan_args.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+scan_args.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+scan_args.o: $(hdrdir)/ruby/internal/has/extension.h
+scan_args.o: $(hdrdir)/ruby/internal/has/feature.h
+scan_args.o: $(hdrdir)/ruby/internal/has/warning.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/array.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/bignum.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/class.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/compar.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/complex.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/cont.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/dir.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/enum.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/error.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/eval.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/file.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/gc.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/hash.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/io.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/load.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/marshal.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/numeric.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/object.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/parse.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/proc.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/process.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/random.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/range.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/rational.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/re.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/ruby.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/select.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/signal.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/string.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/struct.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/thread.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/time.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/variable.h
+scan_args.o: $(hdrdir)/ruby/internal/intern/vm.h
+scan_args.o: $(hdrdir)/ruby/internal/interpreter.h
+scan_args.o: $(hdrdir)/ruby/internal/iterator.h
+scan_args.o: $(hdrdir)/ruby/internal/memory.h
+scan_args.o: $(hdrdir)/ruby/internal/method.h
+scan_args.o: $(hdrdir)/ruby/internal/module.h
+scan_args.o: $(hdrdir)/ruby/internal/newobj.h
+scan_args.o: $(hdrdir)/ruby/internal/rgengc.h
+scan_args.o: $(hdrdir)/ruby/internal/scan_args.h
+scan_args.o: $(hdrdir)/ruby/internal/special_consts.h
+scan_args.o: $(hdrdir)/ruby/internal/static_assert.h
+scan_args.o: $(hdrdir)/ruby/internal/stdalign.h
+scan_args.o: $(hdrdir)/ruby/internal/stdbool.h
+scan_args.o: $(hdrdir)/ruby/internal/symbol.h
+scan_args.o: $(hdrdir)/ruby/internal/value.h
+scan_args.o: $(hdrdir)/ruby/internal/value_type.h
+scan_args.o: $(hdrdir)/ruby/internal/variable.h
+scan_args.o: $(hdrdir)/ruby/internal/warning_push.h
+scan_args.o: $(hdrdir)/ruby/internal/xmalloc.h
scan_args.o: $(hdrdir)/ruby/missing.h
scan_args.o: $(hdrdir)/ruby/ruby.h
scan_args.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/scan_args/scan_args.c b/ext/-test-/scan_args/scan_args.c
index 9c374da66f..8696aad3c7 100644
--- a/ext/-test-/scan_args/scan_args.c
+++ b/ext/-test-/scan_args/scan_args.c
@@ -260,15 +260,6 @@ scan_args_k_lead_opt_hash(int argc, VALUE *argv, VALUE self)
}
static VALUE
-scan_args_e_lead_opt_hash(int argc, VALUE *argv, VALUE self)
-{
- VALUE args[4];
- int n = rb_scan_args_kw(RB_SCAN_ARGS_EMPTY_KEYWORDS, argc, argv, "11:", args+1, args+2, args+3);
- args[0] = INT2NUM(n);
- return rb_ary_new_from_values(numberof(args), args);
-}
-
-static VALUE
scan_args_n_lead_opt_hash(int argc, VALUE *argv, VALUE self)
{
VALUE args[4];
@@ -310,6 +301,5 @@ Init_scan_args(void)
rb_define_singleton_method(module, "opt_var_trail_hash", scan_args_opt_var_trail_hash, -1);
rb_define_singleton_method(module, "lead_opt_var_trail_hash", scan_args_lead_opt_var_trail_hash, -1);
rb_define_singleton_method(module, "k_lead_opt_hash", scan_args_k_lead_opt_hash, -1);
- rb_define_singleton_method(module, "e_lead_opt_hash", scan_args_e_lead_opt_hash, -1);
rb_define_singleton_method(module, "n_lead_opt_hash", scan_args_n_lead_opt_hash, -1);
}
diff --git a/ext/-test-/st/foreach/depend b/ext/-test-/st/foreach/depend
index 42d3909f49..0464ee3c53 100644
--- a/ext/-test-/st/foreach/depend
+++ b/ext/-test-/st/foreach/depend
@@ -4,8 +4,156 @@ foreach.o: $(arch_hdrdir)/ruby/config.h
foreach.o: $(hdrdir)/ruby.h
foreach.o: $(hdrdir)/ruby/assert.h
foreach.o: $(hdrdir)/ruby/backward.h
+foreach.o: $(hdrdir)/ruby/backward/2/assume.h
+foreach.o: $(hdrdir)/ruby/backward/2/attributes.h
+foreach.o: $(hdrdir)/ruby/backward/2/bool.h
+foreach.o: $(hdrdir)/ruby/backward/2/inttypes.h
+foreach.o: $(hdrdir)/ruby/backward/2/limits.h
+foreach.o: $(hdrdir)/ruby/backward/2/long_long.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdalign.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdarg.h
foreach.o: $(hdrdir)/ruby/defines.h
foreach.o: $(hdrdir)/ruby/intern.h
+foreach.o: $(hdrdir)/ruby/internal/abi.h
+foreach.o: $(hdrdir)/ruby/internal/anyargs.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+foreach.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+foreach.o: $(hdrdir)/ruby/internal/assume.h
+foreach.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+foreach.o: $(hdrdir)/ruby/internal/attr/artificial.h
+foreach.o: $(hdrdir)/ruby/internal/attr/cold.h
+foreach.o: $(hdrdir)/ruby/internal/attr/const.h
+foreach.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+foreach.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+foreach.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+foreach.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+foreach.o: $(hdrdir)/ruby/internal/attr/error.h
+foreach.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+foreach.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+foreach.o: $(hdrdir)/ruby/internal/attr/format.h
+foreach.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+foreach.o: $(hdrdir)/ruby/internal/attr/noalias.h
+foreach.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+foreach.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+foreach.o: $(hdrdir)/ruby/internal/attr/noinline.h
+foreach.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+foreach.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+foreach.o: $(hdrdir)/ruby/internal/attr/pure.h
+foreach.o: $(hdrdir)/ruby/internal/attr/restrict.h
+foreach.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+foreach.o: $(hdrdir)/ruby/internal/attr/warning.h
+foreach.o: $(hdrdir)/ruby/internal/attr/weakref.h
+foreach.o: $(hdrdir)/ruby/internal/cast.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+foreach.o: $(hdrdir)/ruby/internal/compiler_since.h
+foreach.o: $(hdrdir)/ruby/internal/config.h
+foreach.o: $(hdrdir)/ruby/internal/constant_p.h
+foreach.o: $(hdrdir)/ruby/internal/core.h
+foreach.o: $(hdrdir)/ruby/internal/core/rarray.h
+foreach.o: $(hdrdir)/ruby/internal/core/rbasic.h
+foreach.o: $(hdrdir)/ruby/internal/core/rbignum.h
+foreach.o: $(hdrdir)/ruby/internal/core/rclass.h
+foreach.o: $(hdrdir)/ruby/internal/core/rdata.h
+foreach.o: $(hdrdir)/ruby/internal/core/rfile.h
+foreach.o: $(hdrdir)/ruby/internal/core/rhash.h
+foreach.o: $(hdrdir)/ruby/internal/core/robject.h
+foreach.o: $(hdrdir)/ruby/internal/core/rregexp.h
+foreach.o: $(hdrdir)/ruby/internal/core/rstring.h
+foreach.o: $(hdrdir)/ruby/internal/core/rstruct.h
+foreach.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+foreach.o: $(hdrdir)/ruby/internal/ctype.h
+foreach.o: $(hdrdir)/ruby/internal/dllexport.h
+foreach.o: $(hdrdir)/ruby/internal/dosish.h
+foreach.o: $(hdrdir)/ruby/internal/error.h
+foreach.o: $(hdrdir)/ruby/internal/eval.h
+foreach.o: $(hdrdir)/ruby/internal/event.h
+foreach.o: $(hdrdir)/ruby/internal/fl_type.h
+foreach.o: $(hdrdir)/ruby/internal/gc.h
+foreach.o: $(hdrdir)/ruby/internal/glob.h
+foreach.o: $(hdrdir)/ruby/internal/globals.h
+foreach.o: $(hdrdir)/ruby/internal/has/attribute.h
+foreach.o: $(hdrdir)/ruby/internal/has/builtin.h
+foreach.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+foreach.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+foreach.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+foreach.o: $(hdrdir)/ruby/internal/has/extension.h
+foreach.o: $(hdrdir)/ruby/internal/has/feature.h
+foreach.o: $(hdrdir)/ruby/internal/has/warning.h
+foreach.o: $(hdrdir)/ruby/internal/intern/array.h
+foreach.o: $(hdrdir)/ruby/internal/intern/bignum.h
+foreach.o: $(hdrdir)/ruby/internal/intern/class.h
+foreach.o: $(hdrdir)/ruby/internal/intern/compar.h
+foreach.o: $(hdrdir)/ruby/internal/intern/complex.h
+foreach.o: $(hdrdir)/ruby/internal/intern/cont.h
+foreach.o: $(hdrdir)/ruby/internal/intern/dir.h
+foreach.o: $(hdrdir)/ruby/internal/intern/enum.h
+foreach.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+foreach.o: $(hdrdir)/ruby/internal/intern/error.h
+foreach.o: $(hdrdir)/ruby/internal/intern/eval.h
+foreach.o: $(hdrdir)/ruby/internal/intern/file.h
+foreach.o: $(hdrdir)/ruby/internal/intern/gc.h
+foreach.o: $(hdrdir)/ruby/internal/intern/hash.h
+foreach.o: $(hdrdir)/ruby/internal/intern/io.h
+foreach.o: $(hdrdir)/ruby/internal/intern/load.h
+foreach.o: $(hdrdir)/ruby/internal/intern/marshal.h
+foreach.o: $(hdrdir)/ruby/internal/intern/numeric.h
+foreach.o: $(hdrdir)/ruby/internal/intern/object.h
+foreach.o: $(hdrdir)/ruby/internal/intern/parse.h
+foreach.o: $(hdrdir)/ruby/internal/intern/proc.h
+foreach.o: $(hdrdir)/ruby/internal/intern/process.h
+foreach.o: $(hdrdir)/ruby/internal/intern/random.h
+foreach.o: $(hdrdir)/ruby/internal/intern/range.h
+foreach.o: $(hdrdir)/ruby/internal/intern/rational.h
+foreach.o: $(hdrdir)/ruby/internal/intern/re.h
+foreach.o: $(hdrdir)/ruby/internal/intern/ruby.h
+foreach.o: $(hdrdir)/ruby/internal/intern/select.h
+foreach.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+foreach.o: $(hdrdir)/ruby/internal/intern/signal.h
+foreach.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+foreach.o: $(hdrdir)/ruby/internal/intern/string.h
+foreach.o: $(hdrdir)/ruby/internal/intern/struct.h
+foreach.o: $(hdrdir)/ruby/internal/intern/thread.h
+foreach.o: $(hdrdir)/ruby/internal/intern/time.h
+foreach.o: $(hdrdir)/ruby/internal/intern/variable.h
+foreach.o: $(hdrdir)/ruby/internal/intern/vm.h
+foreach.o: $(hdrdir)/ruby/internal/interpreter.h
+foreach.o: $(hdrdir)/ruby/internal/iterator.h
+foreach.o: $(hdrdir)/ruby/internal/memory.h
+foreach.o: $(hdrdir)/ruby/internal/method.h
+foreach.o: $(hdrdir)/ruby/internal/module.h
+foreach.o: $(hdrdir)/ruby/internal/newobj.h
+foreach.o: $(hdrdir)/ruby/internal/rgengc.h
+foreach.o: $(hdrdir)/ruby/internal/scan_args.h
+foreach.o: $(hdrdir)/ruby/internal/special_consts.h
+foreach.o: $(hdrdir)/ruby/internal/static_assert.h
+foreach.o: $(hdrdir)/ruby/internal/stdalign.h
+foreach.o: $(hdrdir)/ruby/internal/stdbool.h
+foreach.o: $(hdrdir)/ruby/internal/symbol.h
+foreach.o: $(hdrdir)/ruby/internal/value.h
+foreach.o: $(hdrdir)/ruby/internal/value_type.h
+foreach.o: $(hdrdir)/ruby/internal/variable.h
+foreach.o: $(hdrdir)/ruby/internal/warning_push.h
+foreach.o: $(hdrdir)/ruby/internal/xmalloc.h
foreach.o: $(hdrdir)/ruby/missing.h
foreach.o: $(hdrdir)/ruby/ruby.h
foreach.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/foreach/foreach.c b/ext/-test-/st/foreach/foreach.c
index 27ac18046f..cde49fb26d 100644
--- a/ext/-test-/st/foreach/foreach.c
+++ b/ext/-test-/st/foreach/foreach.c
@@ -12,22 +12,22 @@ static void
force_unpack_check(struct checker *c, st_data_t key, st_data_t val)
{
if (c->nr == 0) {
- st_data_t i;
+ st_data_t i;
- if (c->tbl->bins != NULL) rb_bug("should be packed\n");
+ if (c->tbl->bins != NULL) rb_bug("should be packed\n");
- /* force unpacking during iteration: */
- for (i = 1; i < expect_size; i++)
- st_add_direct(c->tbl, i, i);
+ /* force unpacking during iteration: */
+ for (i = 1; i < expect_size; i++)
+ st_add_direct(c->tbl, i, i);
- if (c->tbl->bins == NULL) rb_bug("should be unpacked\n");
+ if (c->tbl->bins == NULL) rb_bug("should be unpacked\n");
}
if (key != c->nr) {
- rb_bug("unexpected key: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)key, (VALUE)c->nr);
+ rb_bug("unexpected key: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)key, (VALUE)c->nr);
}
if (val != c->nr) {
- rb_bug("unexpected val: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)val, (VALUE)c->nr);
+ rb_bug("unexpected val: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)val, (VALUE)c->nr);
}
c->nr++;
@@ -39,34 +39,34 @@ unp_fec_i(st_data_t key, st_data_t val, st_data_t args, int error)
struct checker *c = (struct checker *)args;
if (error) {
- if (c->test == ID2SYM(rb_intern("delete2")))
- return ST_STOP;
+ if (c->test == ID2SYM(rb_intern("delete2")))
+ return ST_STOP;
- rb_bug("unexpected error");
+ rb_bug("unexpected error");
}
force_unpack_check(c, key, val);
if (c->test == ID2SYM(rb_intern("check"))) {
- return ST_CHECK;
+ return ST_CHECK;
}
if (c->test == ID2SYM(rb_intern("delete1"))) {
- if (c->nr == 1) return ST_DELETE;
- return ST_CHECK;
+ if (c->nr == 1) return ST_DELETE;
+ return ST_CHECK;
}
if (c->test == ID2SYM(rb_intern("delete2"))) {
- if (c->nr == 1) {
- st_data_t k = 0;
- st_data_t v;
-
- if (!st_delete(c->tbl, &k, &v)) {
- rb_bug("failed to delete\n");
- }
- if (v != 0) {
- rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
- }
- }
- return ST_CHECK;
+ if (c->nr == 1) {
+ st_data_t k = 0;
+ st_data_t v;
+
+ if (!st_delete(c->tbl, &k, &v)) {
+ rb_bug("failed to delete\n");
+ }
+ if (v != 0) {
+ rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
+ }
+ }
+ return ST_CHECK;
}
rb_raise(rb_eArgError, "unexpected arg: %+"PRIsVALUE, c->test);
@@ -89,13 +89,13 @@ unp_fec(VALUE self, VALUE test)
st_foreach_check(tbl, unp_fec_i, (st_data_t)&c, -1);
if (c.test == ID2SYM(rb_intern("delete2"))) {
- if (c.nr != 1) {
- rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
- }
+ if (c.nr != 1) {
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
+ }
}
else if (c.nr != expect_size) {
- rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE")\n",
- (VALUE)c.nr, (VALUE)expect_size);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE")\n",
+ (VALUE)c.nr, (VALUE)expect_size);
}
if (tbl->bins == NULL) rb_bug("should be unpacked\n");
@@ -112,22 +112,22 @@ unp_fe_i(st_data_t key, st_data_t val, st_data_t args)
force_unpack_check(c, key, val);
if (c->test == ID2SYM(rb_intern("unpacked"))) {
- return ST_CONTINUE;
+ return ST_CONTINUE;
}
else if (c->test == ID2SYM(rb_intern("unpack_delete"))) {
- if (c->nr == 1) {
- st_data_t k = 0;
- st_data_t v;
-
- if (!st_delete(c->tbl, &k, &v)) {
- rb_bug("failed to delete\n");
- }
- if (v != 0) {
- rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
- }
- return ST_CONTINUE;
- }
- rb_bug("should never get here\n");
+ if (c->nr == 1) {
+ st_data_t k = 0;
+ st_data_t v;
+
+ if (!st_delete(c->tbl, &k, &v)) {
+ rb_bug("failed to delete\n");
+ }
+ if (v != 0) {
+ rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v);
+ }
+ return ST_CONTINUE;
+ }
+ rb_bug("should never get here\n");
}
rb_raise(rb_eArgError, "unexpected arg: %+"PRIsVALUE, c->test);
@@ -150,13 +150,13 @@ unp_fe(VALUE self, VALUE test)
st_foreach(tbl, unp_fe_i, (st_data_t)&c);
if (c.test == ID2SYM(rb_intern("unpack_delete"))) {
- if (c.nr != 1) {
- rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
- }
+ if (c.nr != 1) {
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr);
+ }
}
else if (c.nr != expect_size) {
- rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE"o)\n",
- (VALUE)c.nr, (VALUE)expect_size);
+ rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE"o)\n",
+ (VALUE)c.nr, (VALUE)expect_size);
}
if (tbl->bins == NULL) rb_bug("should be unpacked\n");
diff --git a/ext/-test-/st/numhash/depend b/ext/-test-/st/numhash/depend
index 98dcef881b..9665ed6e39 100644
--- a/ext/-test-/st/numhash/depend
+++ b/ext/-test-/st/numhash/depend
@@ -4,8 +4,156 @@ numhash.o: $(arch_hdrdir)/ruby/config.h
numhash.o: $(hdrdir)/ruby.h
numhash.o: $(hdrdir)/ruby/assert.h
numhash.o: $(hdrdir)/ruby/backward.h
+numhash.o: $(hdrdir)/ruby/backward/2/assume.h
+numhash.o: $(hdrdir)/ruby/backward/2/attributes.h
+numhash.o: $(hdrdir)/ruby/backward/2/bool.h
+numhash.o: $(hdrdir)/ruby/backward/2/inttypes.h
+numhash.o: $(hdrdir)/ruby/backward/2/limits.h
+numhash.o: $(hdrdir)/ruby/backward/2/long_long.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdalign.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdarg.h
numhash.o: $(hdrdir)/ruby/defines.h
numhash.o: $(hdrdir)/ruby/intern.h
+numhash.o: $(hdrdir)/ruby/internal/abi.h
+numhash.o: $(hdrdir)/ruby/internal/anyargs.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+numhash.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+numhash.o: $(hdrdir)/ruby/internal/assume.h
+numhash.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+numhash.o: $(hdrdir)/ruby/internal/attr/artificial.h
+numhash.o: $(hdrdir)/ruby/internal/attr/cold.h
+numhash.o: $(hdrdir)/ruby/internal/attr/const.h
+numhash.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+numhash.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+numhash.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+numhash.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+numhash.o: $(hdrdir)/ruby/internal/attr/error.h
+numhash.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+numhash.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+numhash.o: $(hdrdir)/ruby/internal/attr/format.h
+numhash.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+numhash.o: $(hdrdir)/ruby/internal/attr/noalias.h
+numhash.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+numhash.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+numhash.o: $(hdrdir)/ruby/internal/attr/noinline.h
+numhash.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+numhash.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+numhash.o: $(hdrdir)/ruby/internal/attr/pure.h
+numhash.o: $(hdrdir)/ruby/internal/attr/restrict.h
+numhash.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+numhash.o: $(hdrdir)/ruby/internal/attr/warning.h
+numhash.o: $(hdrdir)/ruby/internal/attr/weakref.h
+numhash.o: $(hdrdir)/ruby/internal/cast.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+numhash.o: $(hdrdir)/ruby/internal/compiler_since.h
+numhash.o: $(hdrdir)/ruby/internal/config.h
+numhash.o: $(hdrdir)/ruby/internal/constant_p.h
+numhash.o: $(hdrdir)/ruby/internal/core.h
+numhash.o: $(hdrdir)/ruby/internal/core/rarray.h
+numhash.o: $(hdrdir)/ruby/internal/core/rbasic.h
+numhash.o: $(hdrdir)/ruby/internal/core/rbignum.h
+numhash.o: $(hdrdir)/ruby/internal/core/rclass.h
+numhash.o: $(hdrdir)/ruby/internal/core/rdata.h
+numhash.o: $(hdrdir)/ruby/internal/core/rfile.h
+numhash.o: $(hdrdir)/ruby/internal/core/rhash.h
+numhash.o: $(hdrdir)/ruby/internal/core/robject.h
+numhash.o: $(hdrdir)/ruby/internal/core/rregexp.h
+numhash.o: $(hdrdir)/ruby/internal/core/rstring.h
+numhash.o: $(hdrdir)/ruby/internal/core/rstruct.h
+numhash.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+numhash.o: $(hdrdir)/ruby/internal/ctype.h
+numhash.o: $(hdrdir)/ruby/internal/dllexport.h
+numhash.o: $(hdrdir)/ruby/internal/dosish.h
+numhash.o: $(hdrdir)/ruby/internal/error.h
+numhash.o: $(hdrdir)/ruby/internal/eval.h
+numhash.o: $(hdrdir)/ruby/internal/event.h
+numhash.o: $(hdrdir)/ruby/internal/fl_type.h
+numhash.o: $(hdrdir)/ruby/internal/gc.h
+numhash.o: $(hdrdir)/ruby/internal/glob.h
+numhash.o: $(hdrdir)/ruby/internal/globals.h
+numhash.o: $(hdrdir)/ruby/internal/has/attribute.h
+numhash.o: $(hdrdir)/ruby/internal/has/builtin.h
+numhash.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+numhash.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+numhash.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+numhash.o: $(hdrdir)/ruby/internal/has/extension.h
+numhash.o: $(hdrdir)/ruby/internal/has/feature.h
+numhash.o: $(hdrdir)/ruby/internal/has/warning.h
+numhash.o: $(hdrdir)/ruby/internal/intern/array.h
+numhash.o: $(hdrdir)/ruby/internal/intern/bignum.h
+numhash.o: $(hdrdir)/ruby/internal/intern/class.h
+numhash.o: $(hdrdir)/ruby/internal/intern/compar.h
+numhash.o: $(hdrdir)/ruby/internal/intern/complex.h
+numhash.o: $(hdrdir)/ruby/internal/intern/cont.h
+numhash.o: $(hdrdir)/ruby/internal/intern/dir.h
+numhash.o: $(hdrdir)/ruby/internal/intern/enum.h
+numhash.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+numhash.o: $(hdrdir)/ruby/internal/intern/error.h
+numhash.o: $(hdrdir)/ruby/internal/intern/eval.h
+numhash.o: $(hdrdir)/ruby/internal/intern/file.h
+numhash.o: $(hdrdir)/ruby/internal/intern/gc.h
+numhash.o: $(hdrdir)/ruby/internal/intern/hash.h
+numhash.o: $(hdrdir)/ruby/internal/intern/io.h
+numhash.o: $(hdrdir)/ruby/internal/intern/load.h
+numhash.o: $(hdrdir)/ruby/internal/intern/marshal.h
+numhash.o: $(hdrdir)/ruby/internal/intern/numeric.h
+numhash.o: $(hdrdir)/ruby/internal/intern/object.h
+numhash.o: $(hdrdir)/ruby/internal/intern/parse.h
+numhash.o: $(hdrdir)/ruby/internal/intern/proc.h
+numhash.o: $(hdrdir)/ruby/internal/intern/process.h
+numhash.o: $(hdrdir)/ruby/internal/intern/random.h
+numhash.o: $(hdrdir)/ruby/internal/intern/range.h
+numhash.o: $(hdrdir)/ruby/internal/intern/rational.h
+numhash.o: $(hdrdir)/ruby/internal/intern/re.h
+numhash.o: $(hdrdir)/ruby/internal/intern/ruby.h
+numhash.o: $(hdrdir)/ruby/internal/intern/select.h
+numhash.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+numhash.o: $(hdrdir)/ruby/internal/intern/signal.h
+numhash.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+numhash.o: $(hdrdir)/ruby/internal/intern/string.h
+numhash.o: $(hdrdir)/ruby/internal/intern/struct.h
+numhash.o: $(hdrdir)/ruby/internal/intern/thread.h
+numhash.o: $(hdrdir)/ruby/internal/intern/time.h
+numhash.o: $(hdrdir)/ruby/internal/intern/variable.h
+numhash.o: $(hdrdir)/ruby/internal/intern/vm.h
+numhash.o: $(hdrdir)/ruby/internal/interpreter.h
+numhash.o: $(hdrdir)/ruby/internal/iterator.h
+numhash.o: $(hdrdir)/ruby/internal/memory.h
+numhash.o: $(hdrdir)/ruby/internal/method.h
+numhash.o: $(hdrdir)/ruby/internal/module.h
+numhash.o: $(hdrdir)/ruby/internal/newobj.h
+numhash.o: $(hdrdir)/ruby/internal/rgengc.h
+numhash.o: $(hdrdir)/ruby/internal/scan_args.h
+numhash.o: $(hdrdir)/ruby/internal/special_consts.h
+numhash.o: $(hdrdir)/ruby/internal/static_assert.h
+numhash.o: $(hdrdir)/ruby/internal/stdalign.h
+numhash.o: $(hdrdir)/ruby/internal/stdbool.h
+numhash.o: $(hdrdir)/ruby/internal/symbol.h
+numhash.o: $(hdrdir)/ruby/internal/value.h
+numhash.o: $(hdrdir)/ruby/internal/value_type.h
+numhash.o: $(hdrdir)/ruby/internal/variable.h
+numhash.o: $(hdrdir)/ruby/internal/warning_push.h
+numhash.o: $(hdrdir)/ruby/internal/xmalloc.h
numhash.o: $(hdrdir)/ruby/missing.h
numhash.o: $(hdrdir)/ruby/ruby.h
numhash.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/numhash/numhash.c b/ext/-test-/st/numhash/numhash.c
index 71eeed4910..7e8d5d9fe2 100644
--- a/ext/-test-/st/numhash/numhash.c
+++ b/ext/-test-/st/numhash/numhash.c
@@ -42,7 +42,7 @@ numhash_aref(VALUE self, VALUE key)
st_table *tbl = (st_table *)Check_TypedStruct(self, &numhash_type);
if (!SPECIAL_CONST_P(key)) rb_raise(rb_eArgError, "not a special const");
if (st_lookup(tbl, (st_data_t)key, &data))
- return (VALUE)data;
+ return (VALUE)data;
return Qnil;
}
@@ -79,12 +79,12 @@ update_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)*key, (VALUE)*value);
switch (ret) {
case Qfalse:
- return ST_STOP;
+ return ST_STOP;
case Qnil:
- return ST_DELETE;
+ return ST_DELETE;
default:
- *value = ret;
- return ST_CONTINUE;
+ *value = ret;
+ return ST_CONTINUE;
}
}
@@ -93,9 +93,9 @@ numhash_update(VALUE self, VALUE key)
{
st_table *table = (st_table *)Check_TypedStruct(self, &numhash_type);
if (st_update(table, (st_data_t)key, update_func, 0))
- return Qtrue;
+ return Qtrue;
else
- return Qfalse;
+ return Qfalse;
}
#if SIZEOF_LONG == SIZEOF_VOIDP
@@ -117,7 +117,7 @@ numhash_delete_safe(VALUE self, VALUE key)
st_table *table = (st_table *)Check_TypedStruct(self, &numhash_type);
st_data_t val, k = (st_data_t)key;
if (st_delete_safe(table, &k, &val, (st_data_t)self)) {
- return val;
+ return val;
}
return Qnil;
}
@@ -125,7 +125,7 @@ numhash_delete_safe(VALUE self, VALUE key)
void
Init_numhash(void)
{
- VALUE st = rb_define_class_under(rb_define_module("Bug"), "StNumHash", rb_cData);
+ VALUE st = rb_define_class_under(rb_define_module("Bug"), "StNumHash", rb_cObject);
rb_define_alloc_func(st, numhash_alloc);
rb_define_method(st, "initialize", numhash_init, 0);
rb_define_method(st, "[]", numhash_aref, 1);
diff --git a/ext/-test-/st/update/depend b/ext/-test-/st/update/depend
index 241e6f9e6d..01960df965 100644
--- a/ext/-test-/st/update/depend
+++ b/ext/-test-/st/update/depend
@@ -4,8 +4,156 @@ update.o: $(arch_hdrdir)/ruby/config.h
update.o: $(hdrdir)/ruby.h
update.o: $(hdrdir)/ruby/assert.h
update.o: $(hdrdir)/ruby/backward.h
+update.o: $(hdrdir)/ruby/backward/2/assume.h
+update.o: $(hdrdir)/ruby/backward/2/attributes.h
+update.o: $(hdrdir)/ruby/backward/2/bool.h
+update.o: $(hdrdir)/ruby/backward/2/inttypes.h
+update.o: $(hdrdir)/ruby/backward/2/limits.h
+update.o: $(hdrdir)/ruby/backward/2/long_long.h
+update.o: $(hdrdir)/ruby/backward/2/stdalign.h
+update.o: $(hdrdir)/ruby/backward/2/stdarg.h
update.o: $(hdrdir)/ruby/defines.h
update.o: $(hdrdir)/ruby/intern.h
+update.o: $(hdrdir)/ruby/internal/abi.h
+update.o: $(hdrdir)/ruby/internal/anyargs.h
+update.o: $(hdrdir)/ruby/internal/arithmetic.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+update.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+update.o: $(hdrdir)/ruby/internal/assume.h
+update.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+update.o: $(hdrdir)/ruby/internal/attr/artificial.h
+update.o: $(hdrdir)/ruby/internal/attr/cold.h
+update.o: $(hdrdir)/ruby/internal/attr/const.h
+update.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+update.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+update.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+update.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+update.o: $(hdrdir)/ruby/internal/attr/error.h
+update.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+update.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+update.o: $(hdrdir)/ruby/internal/attr/format.h
+update.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+update.o: $(hdrdir)/ruby/internal/attr/noalias.h
+update.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+update.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+update.o: $(hdrdir)/ruby/internal/attr/noinline.h
+update.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+update.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+update.o: $(hdrdir)/ruby/internal/attr/pure.h
+update.o: $(hdrdir)/ruby/internal/attr/restrict.h
+update.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+update.o: $(hdrdir)/ruby/internal/attr/warning.h
+update.o: $(hdrdir)/ruby/internal/attr/weakref.h
+update.o: $(hdrdir)/ruby/internal/cast.h
+update.o: $(hdrdir)/ruby/internal/compiler_is.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+update.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+update.o: $(hdrdir)/ruby/internal/compiler_since.h
+update.o: $(hdrdir)/ruby/internal/config.h
+update.o: $(hdrdir)/ruby/internal/constant_p.h
+update.o: $(hdrdir)/ruby/internal/core.h
+update.o: $(hdrdir)/ruby/internal/core/rarray.h
+update.o: $(hdrdir)/ruby/internal/core/rbasic.h
+update.o: $(hdrdir)/ruby/internal/core/rbignum.h
+update.o: $(hdrdir)/ruby/internal/core/rclass.h
+update.o: $(hdrdir)/ruby/internal/core/rdata.h
+update.o: $(hdrdir)/ruby/internal/core/rfile.h
+update.o: $(hdrdir)/ruby/internal/core/rhash.h
+update.o: $(hdrdir)/ruby/internal/core/robject.h
+update.o: $(hdrdir)/ruby/internal/core/rregexp.h
+update.o: $(hdrdir)/ruby/internal/core/rstring.h
+update.o: $(hdrdir)/ruby/internal/core/rstruct.h
+update.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+update.o: $(hdrdir)/ruby/internal/ctype.h
+update.o: $(hdrdir)/ruby/internal/dllexport.h
+update.o: $(hdrdir)/ruby/internal/dosish.h
+update.o: $(hdrdir)/ruby/internal/error.h
+update.o: $(hdrdir)/ruby/internal/eval.h
+update.o: $(hdrdir)/ruby/internal/event.h
+update.o: $(hdrdir)/ruby/internal/fl_type.h
+update.o: $(hdrdir)/ruby/internal/gc.h
+update.o: $(hdrdir)/ruby/internal/glob.h
+update.o: $(hdrdir)/ruby/internal/globals.h
+update.o: $(hdrdir)/ruby/internal/has/attribute.h
+update.o: $(hdrdir)/ruby/internal/has/builtin.h
+update.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+update.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+update.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+update.o: $(hdrdir)/ruby/internal/has/extension.h
+update.o: $(hdrdir)/ruby/internal/has/feature.h
+update.o: $(hdrdir)/ruby/internal/has/warning.h
+update.o: $(hdrdir)/ruby/internal/intern/array.h
+update.o: $(hdrdir)/ruby/internal/intern/bignum.h
+update.o: $(hdrdir)/ruby/internal/intern/class.h
+update.o: $(hdrdir)/ruby/internal/intern/compar.h
+update.o: $(hdrdir)/ruby/internal/intern/complex.h
+update.o: $(hdrdir)/ruby/internal/intern/cont.h
+update.o: $(hdrdir)/ruby/internal/intern/dir.h
+update.o: $(hdrdir)/ruby/internal/intern/enum.h
+update.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+update.o: $(hdrdir)/ruby/internal/intern/error.h
+update.o: $(hdrdir)/ruby/internal/intern/eval.h
+update.o: $(hdrdir)/ruby/internal/intern/file.h
+update.o: $(hdrdir)/ruby/internal/intern/gc.h
+update.o: $(hdrdir)/ruby/internal/intern/hash.h
+update.o: $(hdrdir)/ruby/internal/intern/io.h
+update.o: $(hdrdir)/ruby/internal/intern/load.h
+update.o: $(hdrdir)/ruby/internal/intern/marshal.h
+update.o: $(hdrdir)/ruby/internal/intern/numeric.h
+update.o: $(hdrdir)/ruby/internal/intern/object.h
+update.o: $(hdrdir)/ruby/internal/intern/parse.h
+update.o: $(hdrdir)/ruby/internal/intern/proc.h
+update.o: $(hdrdir)/ruby/internal/intern/process.h
+update.o: $(hdrdir)/ruby/internal/intern/random.h
+update.o: $(hdrdir)/ruby/internal/intern/range.h
+update.o: $(hdrdir)/ruby/internal/intern/rational.h
+update.o: $(hdrdir)/ruby/internal/intern/re.h
+update.o: $(hdrdir)/ruby/internal/intern/ruby.h
+update.o: $(hdrdir)/ruby/internal/intern/select.h
+update.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+update.o: $(hdrdir)/ruby/internal/intern/signal.h
+update.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+update.o: $(hdrdir)/ruby/internal/intern/string.h
+update.o: $(hdrdir)/ruby/internal/intern/struct.h
+update.o: $(hdrdir)/ruby/internal/intern/thread.h
+update.o: $(hdrdir)/ruby/internal/intern/time.h
+update.o: $(hdrdir)/ruby/internal/intern/variable.h
+update.o: $(hdrdir)/ruby/internal/intern/vm.h
+update.o: $(hdrdir)/ruby/internal/interpreter.h
+update.o: $(hdrdir)/ruby/internal/iterator.h
+update.o: $(hdrdir)/ruby/internal/memory.h
+update.o: $(hdrdir)/ruby/internal/method.h
+update.o: $(hdrdir)/ruby/internal/module.h
+update.o: $(hdrdir)/ruby/internal/newobj.h
+update.o: $(hdrdir)/ruby/internal/rgengc.h
+update.o: $(hdrdir)/ruby/internal/scan_args.h
+update.o: $(hdrdir)/ruby/internal/special_consts.h
+update.o: $(hdrdir)/ruby/internal/static_assert.h
+update.o: $(hdrdir)/ruby/internal/stdalign.h
+update.o: $(hdrdir)/ruby/internal/stdbool.h
+update.o: $(hdrdir)/ruby/internal/symbol.h
+update.o: $(hdrdir)/ruby/internal/value.h
+update.o: $(hdrdir)/ruby/internal/value_type.h
+update.o: $(hdrdir)/ruby/internal/variable.h
+update.o: $(hdrdir)/ruby/internal/warning_push.h
+update.o: $(hdrdir)/ruby/internal/xmalloc.h
update.o: $(hdrdir)/ruby/missing.h
update.o: $(hdrdir)/ruby/ruby.h
update.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/update/update.c b/ext/-test-/st/update/update.c
index 979ad3e334..ea7fab12e1 100644
--- a/ext/-test-/st/update/update.c
+++ b/ext/-test-/st/update/update.c
@@ -7,12 +7,12 @@ update_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)*key, (VALUE)*value);
switch (ret) {
case Qfalse:
- return ST_STOP;
+ return ST_STOP;
case Qnil:
- return ST_DELETE;
+ return ST_DELETE;
default:
- *value = ret;
- return ST_CONTINUE;
+ *value = ret;
+ return ST_CONTINUE;
}
}
@@ -20,9 +20,9 @@ static VALUE
test_st_update(VALUE self, VALUE key)
{
if (st_update(RHASH_TBL(self), (st_data_t)key, update_func, 0))
- return Qtrue;
+ return Qtrue;
else
- return Qfalse;
+ return Qfalse;
}
void
diff --git a/ext/-test-/string/capacity.c b/ext/-test-/string/capacity.c
index f5277bf4e6..33b2023fd3 100644
--- a/ext/-test-/string/capacity.c
+++ b/ext/-test-/string/capacity.c
@@ -1,13 +1,14 @@
#include "ruby.h"
-#include "internal.h"
+#include "internal/string.h"
static VALUE
bug_str_capacity(VALUE klass, VALUE str)
{
- return
- STR_EMBED_P(str) ? INT2FIX(RSTRING_EMBED_LEN_MAX) : \
- STR_SHARED_P(str) ? INT2FIX(0) : \
- LONG2FIX(RSTRING(str)->as.heap.aux.capa);
+ if (!STR_EMBED_P(str) && STR_SHARED_P(str)) {
+ return INT2FIX(0);
+ }
+
+ return LONG2FIX(rb_str_capacity(str));
}
void
diff --git a/ext/-test-/string/coderange.c b/ext/-test-/string/coderange.c
index 1342ce20da..4197ecca9f 100644
--- a/ext/-test-/string/coderange.c
+++ b/ext/-test-/string/coderange.c
@@ -8,13 +8,13 @@ coderange_int2sym(int coderange)
{
switch (coderange) {
case ENC_CODERANGE_7BIT:
- return sym_7bit;
+ return sym_7bit;
case ENC_CODERANGE_VALID:
- return sym_valid;
+ return sym_valid;
case ENC_CODERANGE_UNKNOWN:
- return sym_unknown;
+ return sym_unknown;
case ENC_CODERANGE_BROKEN:
- return sym_broken;
+ return sym_broken;
}
rb_bug("wrong condition of coderange");
UNREACHABLE_RETURN(Qnil);
@@ -38,10 +38,10 @@ str_coderange_scan(VALUE str)
void
Init_string_coderange(VALUE klass)
{
- sym_7bit = ID2SYM(rb_intern("7bit"));
- sym_valid = ID2SYM(rb_intern("valid"));
- sym_unknown = ID2SYM(rb_intern("unknown"));
- sym_broken = ID2SYM(rb_intern("broken"));
+ sym_7bit = ID2SYM(rb_intern_const("7bit"));
+ sym_valid = ID2SYM(rb_intern_const("valid"));
+ sym_unknown = ID2SYM(rb_intern_const("unknown"));
+ sym_broken = ID2SYM(rb_intern_const("broken"));
rb_define_method(klass, "coderange", str_coderange, 0);
rb_define_method(klass, "coderange_scan", str_coderange_scan, 0);
}
diff --git a/ext/-test-/string/cstr.c b/ext/-test-/string/cstr.c
index 71eafdb703..468ee7a3b1 100644
--- a/ext/-test-/string/cstr.c
+++ b/ext/-test-/string/cstr.c
@@ -1,5 +1,6 @@
-#include "ruby/encoding.h"
#include "internal.h"
+#include "internal/string.h"
+#include "ruby/encoding.h"
static VALUE
bug_str_cstr_term(VALUE str)
@@ -41,11 +42,11 @@ bug_str_cstr_term_char(VALUE str)
len = rb_enc_mbminlen(enc);
c = rb_enc_precise_mbclen(s, s + len, enc);
if (!MBCLEN_CHARFOUND_P(c)) {
- c = (unsigned char)*s;
+ c = (unsigned char)*s;
}
else {
- c = rb_enc_mbc_to_codepoint(s, s + len, enc);
- if (!c) return Qnil;
+ c = rb_enc_mbc_to_codepoint(s, s + len, enc);
+ if (!c) return Qnil;
}
return rb_enc_uint_chr((unsigned int)c, enc);
}
@@ -61,13 +62,17 @@ bug_str_unterminated_substring(VALUE str, VALUE vbeg, VALUE vlen)
if (RSTRING_LEN(str) < beg + len) rb_raise(rb_eIndexError, "end: %ld", beg + len);
str = rb_str_new_shared(str);
if (STR_EMBED_P(str)) {
- RSTRING(str)->basic.flags &= ~RSTRING_EMBED_LEN_MASK;
- RSTRING(str)->basic.flags |= len << RSTRING_EMBED_LEN_SHIFT;
- memmove(RSTRING(str)->as.ary, RSTRING(str)->as.ary + beg, len);
+#if USE_RVARGC
+ RSTRING(str)->as.embed.len = (short)len;
+#else
+ RSTRING(str)->basic.flags &= ~RSTRING_EMBED_LEN_MASK;
+ RSTRING(str)->basic.flags |= len << RSTRING_EMBED_LEN_SHIFT;
+#endif
+ memmove(RSTRING(str)->as.embed.ary, RSTRING(str)->as.embed.ary + beg, len);
}
else {
- RSTRING(str)->as.heap.ptr += beg;
- RSTRING(str)->as.heap.len = len;
+ RSTRING(str)->as.heap.ptr += beg;
+ RSTRING(str)->as.heap.len = len;
}
return str;
}
@@ -99,7 +104,7 @@ bug_str_s_cstr_term_char(VALUE self, VALUE str)
const int term_fill_len = (termlen);\
*term_fill_ptr = '\0';\
if (UNLIKELY(term_fill_len > 1))\
- memset(term_fill_ptr, 0, term_fill_len);\
+ memset(term_fill_ptr, 0, term_fill_len);\
} while (0)
static VALUE
@@ -111,7 +116,11 @@ bug_str_s_cstr_noembed(VALUE self, VALUE str)
Check_Type(str, T_STRING);
FL_SET((str2), STR_NOEMBED);
memcpy(buf, RSTRING_PTR(str), capacity);
+#if USE_RVARGC
+ RBASIC(str2)->flags &= ~(STR_SHARED | FL_USER5 | FL_USER6);
+#else
RBASIC(str2)->flags &= ~RSTRING_EMBED_LEN_MASK;
+#endif
RSTRING(str2)->as.heap.aux.capa = capacity;
RSTRING(str2)->as.heap.ptr = buf;
RSTRING(str2)->as.heap.len = RSTRING_LEN(str);
diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend
index f6888b5da7..773231047e 100644
--- a/ext/-test-/string/depend
+++ b/ext/-test-/string/depend
@@ -4,21 +4,340 @@ capacity.o: $(arch_hdrdir)/ruby/config.h
capacity.o: $(hdrdir)/ruby.h
capacity.o: $(hdrdir)/ruby/assert.h
capacity.o: $(hdrdir)/ruby/backward.h
+capacity.o: $(hdrdir)/ruby/backward/2/assume.h
+capacity.o: $(hdrdir)/ruby/backward/2/attributes.h
+capacity.o: $(hdrdir)/ruby/backward/2/bool.h
+capacity.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+capacity.o: $(hdrdir)/ruby/backward/2/inttypes.h
+capacity.o: $(hdrdir)/ruby/backward/2/limits.h
+capacity.o: $(hdrdir)/ruby/backward/2/long_long.h
+capacity.o: $(hdrdir)/ruby/backward/2/stdalign.h
+capacity.o: $(hdrdir)/ruby/backward/2/stdarg.h
capacity.o: $(hdrdir)/ruby/defines.h
+capacity.o: $(hdrdir)/ruby/encoding.h
capacity.o: $(hdrdir)/ruby/intern.h
+capacity.o: $(hdrdir)/ruby/internal/abi.h
+capacity.o: $(hdrdir)/ruby/internal/anyargs.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+capacity.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+capacity.o: $(hdrdir)/ruby/internal/assume.h
+capacity.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+capacity.o: $(hdrdir)/ruby/internal/attr/artificial.h
+capacity.o: $(hdrdir)/ruby/internal/attr/cold.h
+capacity.o: $(hdrdir)/ruby/internal/attr/const.h
+capacity.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+capacity.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+capacity.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+capacity.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+capacity.o: $(hdrdir)/ruby/internal/attr/error.h
+capacity.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+capacity.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+capacity.o: $(hdrdir)/ruby/internal/attr/format.h
+capacity.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+capacity.o: $(hdrdir)/ruby/internal/attr/noalias.h
+capacity.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+capacity.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+capacity.o: $(hdrdir)/ruby/internal/attr/noinline.h
+capacity.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+capacity.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+capacity.o: $(hdrdir)/ruby/internal/attr/pure.h
+capacity.o: $(hdrdir)/ruby/internal/attr/restrict.h
+capacity.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+capacity.o: $(hdrdir)/ruby/internal/attr/warning.h
+capacity.o: $(hdrdir)/ruby/internal/attr/weakref.h
+capacity.o: $(hdrdir)/ruby/internal/cast.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+capacity.o: $(hdrdir)/ruby/internal/compiler_since.h
+capacity.o: $(hdrdir)/ruby/internal/config.h
+capacity.o: $(hdrdir)/ruby/internal/constant_p.h
+capacity.o: $(hdrdir)/ruby/internal/core.h
+capacity.o: $(hdrdir)/ruby/internal/core/rarray.h
+capacity.o: $(hdrdir)/ruby/internal/core/rbasic.h
+capacity.o: $(hdrdir)/ruby/internal/core/rbignum.h
+capacity.o: $(hdrdir)/ruby/internal/core/rclass.h
+capacity.o: $(hdrdir)/ruby/internal/core/rdata.h
+capacity.o: $(hdrdir)/ruby/internal/core/rfile.h
+capacity.o: $(hdrdir)/ruby/internal/core/rhash.h
+capacity.o: $(hdrdir)/ruby/internal/core/robject.h
+capacity.o: $(hdrdir)/ruby/internal/core/rregexp.h
+capacity.o: $(hdrdir)/ruby/internal/core/rstring.h
+capacity.o: $(hdrdir)/ruby/internal/core/rstruct.h
+capacity.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+capacity.o: $(hdrdir)/ruby/internal/ctype.h
+capacity.o: $(hdrdir)/ruby/internal/dllexport.h
+capacity.o: $(hdrdir)/ruby/internal/dosish.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/re.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/string.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+capacity.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+capacity.o: $(hdrdir)/ruby/internal/error.h
+capacity.o: $(hdrdir)/ruby/internal/eval.h
+capacity.o: $(hdrdir)/ruby/internal/event.h
+capacity.o: $(hdrdir)/ruby/internal/fl_type.h
+capacity.o: $(hdrdir)/ruby/internal/gc.h
+capacity.o: $(hdrdir)/ruby/internal/glob.h
+capacity.o: $(hdrdir)/ruby/internal/globals.h
+capacity.o: $(hdrdir)/ruby/internal/has/attribute.h
+capacity.o: $(hdrdir)/ruby/internal/has/builtin.h
+capacity.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+capacity.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+capacity.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+capacity.o: $(hdrdir)/ruby/internal/has/extension.h
+capacity.o: $(hdrdir)/ruby/internal/has/feature.h
+capacity.o: $(hdrdir)/ruby/internal/has/warning.h
+capacity.o: $(hdrdir)/ruby/internal/intern/array.h
+capacity.o: $(hdrdir)/ruby/internal/intern/bignum.h
+capacity.o: $(hdrdir)/ruby/internal/intern/class.h
+capacity.o: $(hdrdir)/ruby/internal/intern/compar.h
+capacity.o: $(hdrdir)/ruby/internal/intern/complex.h
+capacity.o: $(hdrdir)/ruby/internal/intern/cont.h
+capacity.o: $(hdrdir)/ruby/internal/intern/dir.h
+capacity.o: $(hdrdir)/ruby/internal/intern/enum.h
+capacity.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+capacity.o: $(hdrdir)/ruby/internal/intern/error.h
+capacity.o: $(hdrdir)/ruby/internal/intern/eval.h
+capacity.o: $(hdrdir)/ruby/internal/intern/file.h
+capacity.o: $(hdrdir)/ruby/internal/intern/gc.h
+capacity.o: $(hdrdir)/ruby/internal/intern/hash.h
+capacity.o: $(hdrdir)/ruby/internal/intern/io.h
+capacity.o: $(hdrdir)/ruby/internal/intern/load.h
+capacity.o: $(hdrdir)/ruby/internal/intern/marshal.h
+capacity.o: $(hdrdir)/ruby/internal/intern/numeric.h
+capacity.o: $(hdrdir)/ruby/internal/intern/object.h
+capacity.o: $(hdrdir)/ruby/internal/intern/parse.h
+capacity.o: $(hdrdir)/ruby/internal/intern/proc.h
+capacity.o: $(hdrdir)/ruby/internal/intern/process.h
+capacity.o: $(hdrdir)/ruby/internal/intern/random.h
+capacity.o: $(hdrdir)/ruby/internal/intern/range.h
+capacity.o: $(hdrdir)/ruby/internal/intern/rational.h
+capacity.o: $(hdrdir)/ruby/internal/intern/re.h
+capacity.o: $(hdrdir)/ruby/internal/intern/ruby.h
+capacity.o: $(hdrdir)/ruby/internal/intern/select.h
+capacity.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+capacity.o: $(hdrdir)/ruby/internal/intern/signal.h
+capacity.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+capacity.o: $(hdrdir)/ruby/internal/intern/string.h
+capacity.o: $(hdrdir)/ruby/internal/intern/struct.h
+capacity.o: $(hdrdir)/ruby/internal/intern/thread.h
+capacity.o: $(hdrdir)/ruby/internal/intern/time.h
+capacity.o: $(hdrdir)/ruby/internal/intern/variable.h
+capacity.o: $(hdrdir)/ruby/internal/intern/vm.h
+capacity.o: $(hdrdir)/ruby/internal/interpreter.h
+capacity.o: $(hdrdir)/ruby/internal/iterator.h
+capacity.o: $(hdrdir)/ruby/internal/memory.h
+capacity.o: $(hdrdir)/ruby/internal/method.h
+capacity.o: $(hdrdir)/ruby/internal/module.h
+capacity.o: $(hdrdir)/ruby/internal/newobj.h
+capacity.o: $(hdrdir)/ruby/internal/rgengc.h
+capacity.o: $(hdrdir)/ruby/internal/scan_args.h
+capacity.o: $(hdrdir)/ruby/internal/special_consts.h
+capacity.o: $(hdrdir)/ruby/internal/static_assert.h
+capacity.o: $(hdrdir)/ruby/internal/stdalign.h
+capacity.o: $(hdrdir)/ruby/internal/stdbool.h
+capacity.o: $(hdrdir)/ruby/internal/symbol.h
+capacity.o: $(hdrdir)/ruby/internal/value.h
+capacity.o: $(hdrdir)/ruby/internal/value_type.h
+capacity.o: $(hdrdir)/ruby/internal/variable.h
+capacity.o: $(hdrdir)/ruby/internal/warning_push.h
+capacity.o: $(hdrdir)/ruby/internal/xmalloc.h
capacity.o: $(hdrdir)/ruby/missing.h
+capacity.o: $(hdrdir)/ruby/onigmo.h
+capacity.o: $(hdrdir)/ruby/oniguruma.h
capacity.o: $(hdrdir)/ruby/ruby.h
capacity.o: $(hdrdir)/ruby/st.h
capacity.o: $(hdrdir)/ruby/subst.h
-capacity.o: $(top_srcdir)/internal.h
+capacity.o: $(top_srcdir)/internal/compilers.h
+capacity.o: $(top_srcdir)/internal/string.h
capacity.o: capacity.c
coderange.o: $(RUBY_EXTCONF_H)
coderange.o: $(arch_hdrdir)/ruby/config.h
coderange.o: $(hdrdir)/ruby/assert.h
coderange.o: $(hdrdir)/ruby/backward.h
+coderange.o: $(hdrdir)/ruby/backward/2/assume.h
+coderange.o: $(hdrdir)/ruby/backward/2/attributes.h
+coderange.o: $(hdrdir)/ruby/backward/2/bool.h
+coderange.o: $(hdrdir)/ruby/backward/2/inttypes.h
+coderange.o: $(hdrdir)/ruby/backward/2/limits.h
+coderange.o: $(hdrdir)/ruby/backward/2/long_long.h
+coderange.o: $(hdrdir)/ruby/backward/2/stdalign.h
+coderange.o: $(hdrdir)/ruby/backward/2/stdarg.h
coderange.o: $(hdrdir)/ruby/defines.h
coderange.o: $(hdrdir)/ruby/encoding.h
coderange.o: $(hdrdir)/ruby/intern.h
+coderange.o: $(hdrdir)/ruby/internal/abi.h
+coderange.o: $(hdrdir)/ruby/internal/anyargs.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+coderange.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+coderange.o: $(hdrdir)/ruby/internal/assume.h
+coderange.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+coderange.o: $(hdrdir)/ruby/internal/attr/artificial.h
+coderange.o: $(hdrdir)/ruby/internal/attr/cold.h
+coderange.o: $(hdrdir)/ruby/internal/attr/const.h
+coderange.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+coderange.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+coderange.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+coderange.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+coderange.o: $(hdrdir)/ruby/internal/attr/error.h
+coderange.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+coderange.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+coderange.o: $(hdrdir)/ruby/internal/attr/format.h
+coderange.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+coderange.o: $(hdrdir)/ruby/internal/attr/noalias.h
+coderange.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+coderange.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+coderange.o: $(hdrdir)/ruby/internal/attr/noinline.h
+coderange.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+coderange.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+coderange.o: $(hdrdir)/ruby/internal/attr/pure.h
+coderange.o: $(hdrdir)/ruby/internal/attr/restrict.h
+coderange.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+coderange.o: $(hdrdir)/ruby/internal/attr/warning.h
+coderange.o: $(hdrdir)/ruby/internal/attr/weakref.h
+coderange.o: $(hdrdir)/ruby/internal/cast.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+coderange.o: $(hdrdir)/ruby/internal/compiler_since.h
+coderange.o: $(hdrdir)/ruby/internal/config.h
+coderange.o: $(hdrdir)/ruby/internal/constant_p.h
+coderange.o: $(hdrdir)/ruby/internal/core.h
+coderange.o: $(hdrdir)/ruby/internal/core/rarray.h
+coderange.o: $(hdrdir)/ruby/internal/core/rbasic.h
+coderange.o: $(hdrdir)/ruby/internal/core/rbignum.h
+coderange.o: $(hdrdir)/ruby/internal/core/rclass.h
+coderange.o: $(hdrdir)/ruby/internal/core/rdata.h
+coderange.o: $(hdrdir)/ruby/internal/core/rfile.h
+coderange.o: $(hdrdir)/ruby/internal/core/rhash.h
+coderange.o: $(hdrdir)/ruby/internal/core/robject.h
+coderange.o: $(hdrdir)/ruby/internal/core/rregexp.h
+coderange.o: $(hdrdir)/ruby/internal/core/rstring.h
+coderange.o: $(hdrdir)/ruby/internal/core/rstruct.h
+coderange.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+coderange.o: $(hdrdir)/ruby/internal/ctype.h
+coderange.o: $(hdrdir)/ruby/internal/dllexport.h
+coderange.o: $(hdrdir)/ruby/internal/dosish.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/re.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/string.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+coderange.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+coderange.o: $(hdrdir)/ruby/internal/error.h
+coderange.o: $(hdrdir)/ruby/internal/eval.h
+coderange.o: $(hdrdir)/ruby/internal/event.h
+coderange.o: $(hdrdir)/ruby/internal/fl_type.h
+coderange.o: $(hdrdir)/ruby/internal/gc.h
+coderange.o: $(hdrdir)/ruby/internal/glob.h
+coderange.o: $(hdrdir)/ruby/internal/globals.h
+coderange.o: $(hdrdir)/ruby/internal/has/attribute.h
+coderange.o: $(hdrdir)/ruby/internal/has/builtin.h
+coderange.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+coderange.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+coderange.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+coderange.o: $(hdrdir)/ruby/internal/has/extension.h
+coderange.o: $(hdrdir)/ruby/internal/has/feature.h
+coderange.o: $(hdrdir)/ruby/internal/has/warning.h
+coderange.o: $(hdrdir)/ruby/internal/intern/array.h
+coderange.o: $(hdrdir)/ruby/internal/intern/bignum.h
+coderange.o: $(hdrdir)/ruby/internal/intern/class.h
+coderange.o: $(hdrdir)/ruby/internal/intern/compar.h
+coderange.o: $(hdrdir)/ruby/internal/intern/complex.h
+coderange.o: $(hdrdir)/ruby/internal/intern/cont.h
+coderange.o: $(hdrdir)/ruby/internal/intern/dir.h
+coderange.o: $(hdrdir)/ruby/internal/intern/enum.h
+coderange.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+coderange.o: $(hdrdir)/ruby/internal/intern/error.h
+coderange.o: $(hdrdir)/ruby/internal/intern/eval.h
+coderange.o: $(hdrdir)/ruby/internal/intern/file.h
+coderange.o: $(hdrdir)/ruby/internal/intern/gc.h
+coderange.o: $(hdrdir)/ruby/internal/intern/hash.h
+coderange.o: $(hdrdir)/ruby/internal/intern/io.h
+coderange.o: $(hdrdir)/ruby/internal/intern/load.h
+coderange.o: $(hdrdir)/ruby/internal/intern/marshal.h
+coderange.o: $(hdrdir)/ruby/internal/intern/numeric.h
+coderange.o: $(hdrdir)/ruby/internal/intern/object.h
+coderange.o: $(hdrdir)/ruby/internal/intern/parse.h
+coderange.o: $(hdrdir)/ruby/internal/intern/proc.h
+coderange.o: $(hdrdir)/ruby/internal/intern/process.h
+coderange.o: $(hdrdir)/ruby/internal/intern/random.h
+coderange.o: $(hdrdir)/ruby/internal/intern/range.h
+coderange.o: $(hdrdir)/ruby/internal/intern/rational.h
+coderange.o: $(hdrdir)/ruby/internal/intern/re.h
+coderange.o: $(hdrdir)/ruby/internal/intern/ruby.h
+coderange.o: $(hdrdir)/ruby/internal/intern/select.h
+coderange.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+coderange.o: $(hdrdir)/ruby/internal/intern/signal.h
+coderange.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+coderange.o: $(hdrdir)/ruby/internal/intern/string.h
+coderange.o: $(hdrdir)/ruby/internal/intern/struct.h
+coderange.o: $(hdrdir)/ruby/internal/intern/thread.h
+coderange.o: $(hdrdir)/ruby/internal/intern/time.h
+coderange.o: $(hdrdir)/ruby/internal/intern/variable.h
+coderange.o: $(hdrdir)/ruby/internal/intern/vm.h
+coderange.o: $(hdrdir)/ruby/internal/interpreter.h
+coderange.o: $(hdrdir)/ruby/internal/iterator.h
+coderange.o: $(hdrdir)/ruby/internal/memory.h
+coderange.o: $(hdrdir)/ruby/internal/method.h
+coderange.o: $(hdrdir)/ruby/internal/module.h
+coderange.o: $(hdrdir)/ruby/internal/newobj.h
+coderange.o: $(hdrdir)/ruby/internal/rgengc.h
+coderange.o: $(hdrdir)/ruby/internal/scan_args.h
+coderange.o: $(hdrdir)/ruby/internal/special_consts.h
+coderange.o: $(hdrdir)/ruby/internal/static_assert.h
+coderange.o: $(hdrdir)/ruby/internal/stdalign.h
+coderange.o: $(hdrdir)/ruby/internal/stdbool.h
+coderange.o: $(hdrdir)/ruby/internal/symbol.h
+coderange.o: $(hdrdir)/ruby/internal/value.h
+coderange.o: $(hdrdir)/ruby/internal/value_type.h
+coderange.o: $(hdrdir)/ruby/internal/variable.h
+coderange.o: $(hdrdir)/ruby/internal/warning_push.h
+coderange.o: $(hdrdir)/ruby/internal/xmalloc.h
coderange.o: $(hdrdir)/ruby/missing.h
coderange.o: $(hdrdir)/ruby/onigmo.h
coderange.o: $(hdrdir)/ruby/oniguruma.h
@@ -28,12 +347,169 @@ coderange.o: $(hdrdir)/ruby/subst.h
coderange.o: coderange.c
cstr.o: $(RUBY_EXTCONF_H)
cstr.o: $(arch_hdrdir)/ruby/config.h
-cstr.o: $(hdrdir)/ruby.h
cstr.o: $(hdrdir)/ruby/assert.h
cstr.o: $(hdrdir)/ruby/backward.h
+cstr.o: $(hdrdir)/ruby/backward/2/assume.h
+cstr.o: $(hdrdir)/ruby/backward/2/attributes.h
+cstr.o: $(hdrdir)/ruby/backward/2/bool.h
+cstr.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+cstr.o: $(hdrdir)/ruby/backward/2/inttypes.h
+cstr.o: $(hdrdir)/ruby/backward/2/limits.h
+cstr.o: $(hdrdir)/ruby/backward/2/long_long.h
+cstr.o: $(hdrdir)/ruby/backward/2/stdalign.h
+cstr.o: $(hdrdir)/ruby/backward/2/stdarg.h
cstr.o: $(hdrdir)/ruby/defines.h
cstr.o: $(hdrdir)/ruby/encoding.h
cstr.o: $(hdrdir)/ruby/intern.h
+cstr.o: $(hdrdir)/ruby/internal/abi.h
+cstr.o: $(hdrdir)/ruby/internal/anyargs.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+cstr.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+cstr.o: $(hdrdir)/ruby/internal/assume.h
+cstr.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+cstr.o: $(hdrdir)/ruby/internal/attr/artificial.h
+cstr.o: $(hdrdir)/ruby/internal/attr/cold.h
+cstr.o: $(hdrdir)/ruby/internal/attr/const.h
+cstr.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+cstr.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+cstr.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+cstr.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+cstr.o: $(hdrdir)/ruby/internal/attr/error.h
+cstr.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+cstr.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+cstr.o: $(hdrdir)/ruby/internal/attr/format.h
+cstr.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+cstr.o: $(hdrdir)/ruby/internal/attr/noalias.h
+cstr.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+cstr.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+cstr.o: $(hdrdir)/ruby/internal/attr/noinline.h
+cstr.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+cstr.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+cstr.o: $(hdrdir)/ruby/internal/attr/pure.h
+cstr.o: $(hdrdir)/ruby/internal/attr/restrict.h
+cstr.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+cstr.o: $(hdrdir)/ruby/internal/attr/warning.h
+cstr.o: $(hdrdir)/ruby/internal/attr/weakref.h
+cstr.o: $(hdrdir)/ruby/internal/cast.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+cstr.o: $(hdrdir)/ruby/internal/compiler_since.h
+cstr.o: $(hdrdir)/ruby/internal/config.h
+cstr.o: $(hdrdir)/ruby/internal/constant_p.h
+cstr.o: $(hdrdir)/ruby/internal/core.h
+cstr.o: $(hdrdir)/ruby/internal/core/rarray.h
+cstr.o: $(hdrdir)/ruby/internal/core/rbasic.h
+cstr.o: $(hdrdir)/ruby/internal/core/rbignum.h
+cstr.o: $(hdrdir)/ruby/internal/core/rclass.h
+cstr.o: $(hdrdir)/ruby/internal/core/rdata.h
+cstr.o: $(hdrdir)/ruby/internal/core/rfile.h
+cstr.o: $(hdrdir)/ruby/internal/core/rhash.h
+cstr.o: $(hdrdir)/ruby/internal/core/robject.h
+cstr.o: $(hdrdir)/ruby/internal/core/rregexp.h
+cstr.o: $(hdrdir)/ruby/internal/core/rstring.h
+cstr.o: $(hdrdir)/ruby/internal/core/rstruct.h
+cstr.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+cstr.o: $(hdrdir)/ruby/internal/ctype.h
+cstr.o: $(hdrdir)/ruby/internal/dllexport.h
+cstr.o: $(hdrdir)/ruby/internal/dosish.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/re.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/string.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+cstr.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+cstr.o: $(hdrdir)/ruby/internal/error.h
+cstr.o: $(hdrdir)/ruby/internal/eval.h
+cstr.o: $(hdrdir)/ruby/internal/event.h
+cstr.o: $(hdrdir)/ruby/internal/fl_type.h
+cstr.o: $(hdrdir)/ruby/internal/gc.h
+cstr.o: $(hdrdir)/ruby/internal/glob.h
+cstr.o: $(hdrdir)/ruby/internal/globals.h
+cstr.o: $(hdrdir)/ruby/internal/has/attribute.h
+cstr.o: $(hdrdir)/ruby/internal/has/builtin.h
+cstr.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+cstr.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+cstr.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+cstr.o: $(hdrdir)/ruby/internal/has/extension.h
+cstr.o: $(hdrdir)/ruby/internal/has/feature.h
+cstr.o: $(hdrdir)/ruby/internal/has/warning.h
+cstr.o: $(hdrdir)/ruby/internal/intern/array.h
+cstr.o: $(hdrdir)/ruby/internal/intern/bignum.h
+cstr.o: $(hdrdir)/ruby/internal/intern/class.h
+cstr.o: $(hdrdir)/ruby/internal/intern/compar.h
+cstr.o: $(hdrdir)/ruby/internal/intern/complex.h
+cstr.o: $(hdrdir)/ruby/internal/intern/cont.h
+cstr.o: $(hdrdir)/ruby/internal/intern/dir.h
+cstr.o: $(hdrdir)/ruby/internal/intern/enum.h
+cstr.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+cstr.o: $(hdrdir)/ruby/internal/intern/error.h
+cstr.o: $(hdrdir)/ruby/internal/intern/eval.h
+cstr.o: $(hdrdir)/ruby/internal/intern/file.h
+cstr.o: $(hdrdir)/ruby/internal/intern/gc.h
+cstr.o: $(hdrdir)/ruby/internal/intern/hash.h
+cstr.o: $(hdrdir)/ruby/internal/intern/io.h
+cstr.o: $(hdrdir)/ruby/internal/intern/load.h
+cstr.o: $(hdrdir)/ruby/internal/intern/marshal.h
+cstr.o: $(hdrdir)/ruby/internal/intern/numeric.h
+cstr.o: $(hdrdir)/ruby/internal/intern/object.h
+cstr.o: $(hdrdir)/ruby/internal/intern/parse.h
+cstr.o: $(hdrdir)/ruby/internal/intern/proc.h
+cstr.o: $(hdrdir)/ruby/internal/intern/process.h
+cstr.o: $(hdrdir)/ruby/internal/intern/random.h
+cstr.o: $(hdrdir)/ruby/internal/intern/range.h
+cstr.o: $(hdrdir)/ruby/internal/intern/rational.h
+cstr.o: $(hdrdir)/ruby/internal/intern/re.h
+cstr.o: $(hdrdir)/ruby/internal/intern/ruby.h
+cstr.o: $(hdrdir)/ruby/internal/intern/select.h
+cstr.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+cstr.o: $(hdrdir)/ruby/internal/intern/signal.h
+cstr.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+cstr.o: $(hdrdir)/ruby/internal/intern/string.h
+cstr.o: $(hdrdir)/ruby/internal/intern/struct.h
+cstr.o: $(hdrdir)/ruby/internal/intern/thread.h
+cstr.o: $(hdrdir)/ruby/internal/intern/time.h
+cstr.o: $(hdrdir)/ruby/internal/intern/variable.h
+cstr.o: $(hdrdir)/ruby/internal/intern/vm.h
+cstr.o: $(hdrdir)/ruby/internal/interpreter.h
+cstr.o: $(hdrdir)/ruby/internal/iterator.h
+cstr.o: $(hdrdir)/ruby/internal/memory.h
+cstr.o: $(hdrdir)/ruby/internal/method.h
+cstr.o: $(hdrdir)/ruby/internal/module.h
+cstr.o: $(hdrdir)/ruby/internal/newobj.h
+cstr.o: $(hdrdir)/ruby/internal/rgengc.h
+cstr.o: $(hdrdir)/ruby/internal/scan_args.h
+cstr.o: $(hdrdir)/ruby/internal/special_consts.h
+cstr.o: $(hdrdir)/ruby/internal/static_assert.h
+cstr.o: $(hdrdir)/ruby/internal/stdalign.h
+cstr.o: $(hdrdir)/ruby/internal/stdbool.h
+cstr.o: $(hdrdir)/ruby/internal/symbol.h
+cstr.o: $(hdrdir)/ruby/internal/value.h
+cstr.o: $(hdrdir)/ruby/internal/value_type.h
+cstr.o: $(hdrdir)/ruby/internal/variable.h
+cstr.o: $(hdrdir)/ruby/internal/warning_push.h
+cstr.o: $(hdrdir)/ruby/internal/xmalloc.h
cstr.o: $(hdrdir)/ruby/missing.h
cstr.o: $(hdrdir)/ruby/onigmo.h
cstr.o: $(hdrdir)/ruby/oniguruma.h
@@ -41,14 +517,164 @@ cstr.o: $(hdrdir)/ruby/ruby.h
cstr.o: $(hdrdir)/ruby/st.h
cstr.o: $(hdrdir)/ruby/subst.h
cstr.o: $(top_srcdir)/internal.h
+cstr.o: $(top_srcdir)/internal/compilers.h
+cstr.o: $(top_srcdir)/internal/string.h
cstr.o: cstr.c
ellipsize.o: $(RUBY_EXTCONF_H)
ellipsize.o: $(arch_hdrdir)/ruby/config.h
ellipsize.o: $(hdrdir)/ruby.h
ellipsize.o: $(hdrdir)/ruby/assert.h
ellipsize.o: $(hdrdir)/ruby/backward.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/assume.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/attributes.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/bool.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/limits.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/long_long.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ellipsize.o: $(hdrdir)/ruby/backward/2/stdarg.h
ellipsize.o: $(hdrdir)/ruby/defines.h
ellipsize.o: $(hdrdir)/ruby/intern.h
+ellipsize.o: $(hdrdir)/ruby/internal/abi.h
+ellipsize.o: $(hdrdir)/ruby/internal/anyargs.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ellipsize.o: $(hdrdir)/ruby/internal/assume.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/cold.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/const.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/error.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/format.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/pure.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/warning.h
+ellipsize.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ellipsize.o: $(hdrdir)/ruby/internal/cast.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ellipsize.o: $(hdrdir)/ruby/internal/compiler_since.h
+ellipsize.o: $(hdrdir)/ruby/internal/config.h
+ellipsize.o: $(hdrdir)/ruby/internal/constant_p.h
+ellipsize.o: $(hdrdir)/ruby/internal/core.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rarray.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rclass.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rdata.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rfile.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rhash.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/robject.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rstring.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ellipsize.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ellipsize.o: $(hdrdir)/ruby/internal/ctype.h
+ellipsize.o: $(hdrdir)/ruby/internal/dllexport.h
+ellipsize.o: $(hdrdir)/ruby/internal/dosish.h
+ellipsize.o: $(hdrdir)/ruby/internal/error.h
+ellipsize.o: $(hdrdir)/ruby/internal/eval.h
+ellipsize.o: $(hdrdir)/ruby/internal/event.h
+ellipsize.o: $(hdrdir)/ruby/internal/fl_type.h
+ellipsize.o: $(hdrdir)/ruby/internal/gc.h
+ellipsize.o: $(hdrdir)/ruby/internal/glob.h
+ellipsize.o: $(hdrdir)/ruby/internal/globals.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/attribute.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/builtin.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/extension.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/feature.h
+ellipsize.o: $(hdrdir)/ruby/internal/has/warning.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/array.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/class.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/compar.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/complex.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/cont.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/dir.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/enum.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/error.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/eval.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/file.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/gc.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/hash.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/io.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/load.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/object.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/parse.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/proc.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/process.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/random.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/range.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/rational.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/re.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/select.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/signal.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/string.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/struct.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/thread.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/time.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/variable.h
+ellipsize.o: $(hdrdir)/ruby/internal/intern/vm.h
+ellipsize.o: $(hdrdir)/ruby/internal/interpreter.h
+ellipsize.o: $(hdrdir)/ruby/internal/iterator.h
+ellipsize.o: $(hdrdir)/ruby/internal/memory.h
+ellipsize.o: $(hdrdir)/ruby/internal/method.h
+ellipsize.o: $(hdrdir)/ruby/internal/module.h
+ellipsize.o: $(hdrdir)/ruby/internal/newobj.h
+ellipsize.o: $(hdrdir)/ruby/internal/rgengc.h
+ellipsize.o: $(hdrdir)/ruby/internal/scan_args.h
+ellipsize.o: $(hdrdir)/ruby/internal/special_consts.h
+ellipsize.o: $(hdrdir)/ruby/internal/static_assert.h
+ellipsize.o: $(hdrdir)/ruby/internal/stdalign.h
+ellipsize.o: $(hdrdir)/ruby/internal/stdbool.h
+ellipsize.o: $(hdrdir)/ruby/internal/symbol.h
+ellipsize.o: $(hdrdir)/ruby/internal/value.h
+ellipsize.o: $(hdrdir)/ruby/internal/value_type.h
+ellipsize.o: $(hdrdir)/ruby/internal/variable.h
+ellipsize.o: $(hdrdir)/ruby/internal/warning_push.h
+ellipsize.o: $(hdrdir)/ruby/internal/xmalloc.h
ellipsize.o: $(hdrdir)/ruby/missing.h
ellipsize.o: $(hdrdir)/ruby/ruby.h
ellipsize.o: $(hdrdir)/ruby/st.h
@@ -59,9 +685,166 @@ enc_associate.o: $(arch_hdrdir)/ruby/config.h
enc_associate.o: $(hdrdir)/ruby.h
enc_associate.o: $(hdrdir)/ruby/assert.h
enc_associate.o: $(hdrdir)/ruby/backward.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/assume.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/attributes.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/bool.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/limits.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/long_long.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enc_associate.o: $(hdrdir)/ruby/backward/2/stdarg.h
enc_associate.o: $(hdrdir)/ruby/defines.h
enc_associate.o: $(hdrdir)/ruby/encoding.h
enc_associate.o: $(hdrdir)/ruby/intern.h
+enc_associate.o: $(hdrdir)/ruby/internal/abi.h
+enc_associate.o: $(hdrdir)/ruby/internal/anyargs.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+enc_associate.o: $(hdrdir)/ruby/internal/assume.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/artificial.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/cold.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/const.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/error.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/format.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/noalias.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/noinline.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/pure.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/restrict.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/warning.h
+enc_associate.o: $(hdrdir)/ruby/internal/attr/weakref.h
+enc_associate.o: $(hdrdir)/ruby/internal/cast.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+enc_associate.o: $(hdrdir)/ruby/internal/compiler_since.h
+enc_associate.o: $(hdrdir)/ruby/internal/config.h
+enc_associate.o: $(hdrdir)/ruby/internal/constant_p.h
+enc_associate.o: $(hdrdir)/ruby/internal/core.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rarray.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rbasic.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rbignum.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rclass.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rdata.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rfile.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rhash.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/robject.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rregexp.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rstring.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rstruct.h
+enc_associate.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+enc_associate.o: $(hdrdir)/ruby/internal/ctype.h
+enc_associate.o: $(hdrdir)/ruby/internal/dllexport.h
+enc_associate.o: $(hdrdir)/ruby/internal/dosish.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/re.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/string.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+enc_associate.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+enc_associate.o: $(hdrdir)/ruby/internal/error.h
+enc_associate.o: $(hdrdir)/ruby/internal/eval.h
+enc_associate.o: $(hdrdir)/ruby/internal/event.h
+enc_associate.o: $(hdrdir)/ruby/internal/fl_type.h
+enc_associate.o: $(hdrdir)/ruby/internal/gc.h
+enc_associate.o: $(hdrdir)/ruby/internal/glob.h
+enc_associate.o: $(hdrdir)/ruby/internal/globals.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/attribute.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/builtin.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/extension.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/feature.h
+enc_associate.o: $(hdrdir)/ruby/internal/has/warning.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/array.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/bignum.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/class.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/compar.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/complex.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/cont.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/dir.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/enum.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/error.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/eval.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/file.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/gc.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/hash.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/io.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/load.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/marshal.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/numeric.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/object.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/parse.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/proc.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/process.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/random.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/range.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/rational.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/re.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/ruby.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/select.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/signal.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/string.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/struct.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/thread.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/time.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/variable.h
+enc_associate.o: $(hdrdir)/ruby/internal/intern/vm.h
+enc_associate.o: $(hdrdir)/ruby/internal/interpreter.h
+enc_associate.o: $(hdrdir)/ruby/internal/iterator.h
+enc_associate.o: $(hdrdir)/ruby/internal/memory.h
+enc_associate.o: $(hdrdir)/ruby/internal/method.h
+enc_associate.o: $(hdrdir)/ruby/internal/module.h
+enc_associate.o: $(hdrdir)/ruby/internal/newobj.h
+enc_associate.o: $(hdrdir)/ruby/internal/rgengc.h
+enc_associate.o: $(hdrdir)/ruby/internal/scan_args.h
+enc_associate.o: $(hdrdir)/ruby/internal/special_consts.h
+enc_associate.o: $(hdrdir)/ruby/internal/static_assert.h
+enc_associate.o: $(hdrdir)/ruby/internal/stdalign.h
+enc_associate.o: $(hdrdir)/ruby/internal/stdbool.h
+enc_associate.o: $(hdrdir)/ruby/internal/symbol.h
+enc_associate.o: $(hdrdir)/ruby/internal/value.h
+enc_associate.o: $(hdrdir)/ruby/internal/value_type.h
+enc_associate.o: $(hdrdir)/ruby/internal/variable.h
+enc_associate.o: $(hdrdir)/ruby/internal/warning_push.h
+enc_associate.o: $(hdrdir)/ruby/internal/xmalloc.h
enc_associate.o: $(hdrdir)/ruby/missing.h
enc_associate.o: $(hdrdir)/ruby/onigmo.h
enc_associate.o: $(hdrdir)/ruby/oniguruma.h
@@ -73,9 +856,166 @@ enc_str_buf_cat.o: $(RUBY_EXTCONF_H)
enc_str_buf_cat.o: $(arch_hdrdir)/ruby/config.h
enc_str_buf_cat.o: $(hdrdir)/ruby/assert.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/assume.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/attributes.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/bool.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/limits.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/long_long.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/stdarg.h
enc_str_buf_cat.o: $(hdrdir)/ruby/defines.h
enc_str_buf_cat.o: $(hdrdir)/ruby/encoding.h
enc_str_buf_cat.o: $(hdrdir)/ruby/intern.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/abi.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/anyargs.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/assume.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/artificial.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/cold.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/const.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/error.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/format.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/noalias.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/noinline.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/pure.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/restrict.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/warning.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/attr/weakref.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/cast.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/compiler_since.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/config.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/constant_p.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rarray.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rbasic.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rbignum.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rclass.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rdata.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rfile.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rhash.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/robject.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rregexp.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rstring.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rstruct.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/ctype.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/dllexport.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/dosish.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/re.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/string.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/error.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/eval.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/event.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/fl_type.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/gc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/glob.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/globals.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/attribute.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/builtin.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/extension.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/feature.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/has/warning.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/array.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/bignum.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/class.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/compar.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/complex.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/cont.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/dir.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/enum.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/error.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/eval.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/file.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/gc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/hash.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/io.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/load.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/marshal.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/numeric.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/object.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/parse.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/proc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/process.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/random.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/range.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/rational.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/re.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/ruby.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/select.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/signal.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/string.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/struct.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/thread.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/time.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/variable.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/intern/vm.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/interpreter.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/iterator.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/memory.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/method.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/module.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/newobj.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/rgengc.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/scan_args.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/special_consts.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/static_assert.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/stdalign.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/stdbool.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/symbol.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/value.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/value_type.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/variable.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/warning_push.h
+enc_str_buf_cat.o: $(hdrdir)/ruby/internal/xmalloc.h
enc_str_buf_cat.o: $(hdrdir)/ruby/missing.h
enc_str_buf_cat.o: $(hdrdir)/ruby/onigmo.h
enc_str_buf_cat.o: $(hdrdir)/ruby/oniguruma.h
@@ -88,9 +1028,169 @@ fstring.o: $(arch_hdrdir)/ruby/config.h
fstring.o: $(hdrdir)/ruby.h
fstring.o: $(hdrdir)/ruby/assert.h
fstring.o: $(hdrdir)/ruby/backward.h
+fstring.o: $(hdrdir)/ruby/backward/2/assume.h
+fstring.o: $(hdrdir)/ruby/backward/2/attributes.h
+fstring.o: $(hdrdir)/ruby/backward/2/bool.h
+fstring.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fstring.o: $(hdrdir)/ruby/backward/2/limits.h
+fstring.o: $(hdrdir)/ruby/backward/2/long_long.h
+fstring.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fstring.o: $(hdrdir)/ruby/backward/2/stdarg.h
fstring.o: $(hdrdir)/ruby/defines.h
+fstring.o: $(hdrdir)/ruby/encoding.h
fstring.o: $(hdrdir)/ruby/intern.h
+fstring.o: $(hdrdir)/ruby/internal/abi.h
+fstring.o: $(hdrdir)/ruby/internal/anyargs.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+fstring.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+fstring.o: $(hdrdir)/ruby/internal/assume.h
+fstring.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+fstring.o: $(hdrdir)/ruby/internal/attr/artificial.h
+fstring.o: $(hdrdir)/ruby/internal/attr/cold.h
+fstring.o: $(hdrdir)/ruby/internal/attr/const.h
+fstring.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+fstring.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+fstring.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+fstring.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+fstring.o: $(hdrdir)/ruby/internal/attr/error.h
+fstring.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+fstring.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+fstring.o: $(hdrdir)/ruby/internal/attr/format.h
+fstring.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+fstring.o: $(hdrdir)/ruby/internal/attr/noalias.h
+fstring.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+fstring.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+fstring.o: $(hdrdir)/ruby/internal/attr/noinline.h
+fstring.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+fstring.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+fstring.o: $(hdrdir)/ruby/internal/attr/pure.h
+fstring.o: $(hdrdir)/ruby/internal/attr/restrict.h
+fstring.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+fstring.o: $(hdrdir)/ruby/internal/attr/warning.h
+fstring.o: $(hdrdir)/ruby/internal/attr/weakref.h
+fstring.o: $(hdrdir)/ruby/internal/cast.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+fstring.o: $(hdrdir)/ruby/internal/compiler_since.h
+fstring.o: $(hdrdir)/ruby/internal/config.h
+fstring.o: $(hdrdir)/ruby/internal/constant_p.h
+fstring.o: $(hdrdir)/ruby/internal/core.h
+fstring.o: $(hdrdir)/ruby/internal/core/rarray.h
+fstring.o: $(hdrdir)/ruby/internal/core/rbasic.h
+fstring.o: $(hdrdir)/ruby/internal/core/rbignum.h
+fstring.o: $(hdrdir)/ruby/internal/core/rclass.h
+fstring.o: $(hdrdir)/ruby/internal/core/rdata.h
+fstring.o: $(hdrdir)/ruby/internal/core/rfile.h
+fstring.o: $(hdrdir)/ruby/internal/core/rhash.h
+fstring.o: $(hdrdir)/ruby/internal/core/robject.h
+fstring.o: $(hdrdir)/ruby/internal/core/rregexp.h
+fstring.o: $(hdrdir)/ruby/internal/core/rstring.h
+fstring.o: $(hdrdir)/ruby/internal/core/rstruct.h
+fstring.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+fstring.o: $(hdrdir)/ruby/internal/ctype.h
+fstring.o: $(hdrdir)/ruby/internal/dllexport.h
+fstring.o: $(hdrdir)/ruby/internal/dosish.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/re.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/string.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+fstring.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+fstring.o: $(hdrdir)/ruby/internal/error.h
+fstring.o: $(hdrdir)/ruby/internal/eval.h
+fstring.o: $(hdrdir)/ruby/internal/event.h
+fstring.o: $(hdrdir)/ruby/internal/fl_type.h
+fstring.o: $(hdrdir)/ruby/internal/gc.h
+fstring.o: $(hdrdir)/ruby/internal/glob.h
+fstring.o: $(hdrdir)/ruby/internal/globals.h
+fstring.o: $(hdrdir)/ruby/internal/has/attribute.h
+fstring.o: $(hdrdir)/ruby/internal/has/builtin.h
+fstring.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+fstring.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+fstring.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+fstring.o: $(hdrdir)/ruby/internal/has/extension.h
+fstring.o: $(hdrdir)/ruby/internal/has/feature.h
+fstring.o: $(hdrdir)/ruby/internal/has/warning.h
+fstring.o: $(hdrdir)/ruby/internal/intern/array.h
+fstring.o: $(hdrdir)/ruby/internal/intern/bignum.h
+fstring.o: $(hdrdir)/ruby/internal/intern/class.h
+fstring.o: $(hdrdir)/ruby/internal/intern/compar.h
+fstring.o: $(hdrdir)/ruby/internal/intern/complex.h
+fstring.o: $(hdrdir)/ruby/internal/intern/cont.h
+fstring.o: $(hdrdir)/ruby/internal/intern/dir.h
+fstring.o: $(hdrdir)/ruby/internal/intern/enum.h
+fstring.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+fstring.o: $(hdrdir)/ruby/internal/intern/error.h
+fstring.o: $(hdrdir)/ruby/internal/intern/eval.h
+fstring.o: $(hdrdir)/ruby/internal/intern/file.h
+fstring.o: $(hdrdir)/ruby/internal/intern/gc.h
+fstring.o: $(hdrdir)/ruby/internal/intern/hash.h
+fstring.o: $(hdrdir)/ruby/internal/intern/io.h
+fstring.o: $(hdrdir)/ruby/internal/intern/load.h
+fstring.o: $(hdrdir)/ruby/internal/intern/marshal.h
+fstring.o: $(hdrdir)/ruby/internal/intern/numeric.h
+fstring.o: $(hdrdir)/ruby/internal/intern/object.h
+fstring.o: $(hdrdir)/ruby/internal/intern/parse.h
+fstring.o: $(hdrdir)/ruby/internal/intern/proc.h
+fstring.o: $(hdrdir)/ruby/internal/intern/process.h
+fstring.o: $(hdrdir)/ruby/internal/intern/random.h
+fstring.o: $(hdrdir)/ruby/internal/intern/range.h
+fstring.o: $(hdrdir)/ruby/internal/intern/rational.h
+fstring.o: $(hdrdir)/ruby/internal/intern/re.h
+fstring.o: $(hdrdir)/ruby/internal/intern/ruby.h
+fstring.o: $(hdrdir)/ruby/internal/intern/select.h
+fstring.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+fstring.o: $(hdrdir)/ruby/internal/intern/signal.h
+fstring.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+fstring.o: $(hdrdir)/ruby/internal/intern/string.h
+fstring.o: $(hdrdir)/ruby/internal/intern/struct.h
+fstring.o: $(hdrdir)/ruby/internal/intern/thread.h
+fstring.o: $(hdrdir)/ruby/internal/intern/time.h
+fstring.o: $(hdrdir)/ruby/internal/intern/variable.h
+fstring.o: $(hdrdir)/ruby/internal/intern/vm.h
+fstring.o: $(hdrdir)/ruby/internal/interpreter.h
+fstring.o: $(hdrdir)/ruby/internal/iterator.h
+fstring.o: $(hdrdir)/ruby/internal/memory.h
+fstring.o: $(hdrdir)/ruby/internal/method.h
+fstring.o: $(hdrdir)/ruby/internal/module.h
+fstring.o: $(hdrdir)/ruby/internal/newobj.h
+fstring.o: $(hdrdir)/ruby/internal/rgengc.h
+fstring.o: $(hdrdir)/ruby/internal/scan_args.h
+fstring.o: $(hdrdir)/ruby/internal/special_consts.h
+fstring.o: $(hdrdir)/ruby/internal/static_assert.h
+fstring.o: $(hdrdir)/ruby/internal/stdalign.h
+fstring.o: $(hdrdir)/ruby/internal/stdbool.h
+fstring.o: $(hdrdir)/ruby/internal/symbol.h
+fstring.o: $(hdrdir)/ruby/internal/value.h
+fstring.o: $(hdrdir)/ruby/internal/value_type.h
+fstring.o: $(hdrdir)/ruby/internal/variable.h
+fstring.o: $(hdrdir)/ruby/internal/warning_push.h
+fstring.o: $(hdrdir)/ruby/internal/xmalloc.h
fstring.o: $(hdrdir)/ruby/missing.h
+fstring.o: $(hdrdir)/ruby/onigmo.h
+fstring.o: $(hdrdir)/ruby/oniguruma.h
fstring.o: $(hdrdir)/ruby/ruby.h
fstring.o: $(hdrdir)/ruby/st.h
fstring.o: $(hdrdir)/ruby/subst.h
@@ -100,8 +1200,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -112,8 +1360,156 @@ modify.o: $(arch_hdrdir)/ruby/config.h
modify.o: $(hdrdir)/ruby.h
modify.o: $(hdrdir)/ruby/assert.h
modify.o: $(hdrdir)/ruby/backward.h
+modify.o: $(hdrdir)/ruby/backward/2/assume.h
+modify.o: $(hdrdir)/ruby/backward/2/attributes.h
+modify.o: $(hdrdir)/ruby/backward/2/bool.h
+modify.o: $(hdrdir)/ruby/backward/2/inttypes.h
+modify.o: $(hdrdir)/ruby/backward/2/limits.h
+modify.o: $(hdrdir)/ruby/backward/2/long_long.h
+modify.o: $(hdrdir)/ruby/backward/2/stdalign.h
+modify.o: $(hdrdir)/ruby/backward/2/stdarg.h
modify.o: $(hdrdir)/ruby/defines.h
modify.o: $(hdrdir)/ruby/intern.h
+modify.o: $(hdrdir)/ruby/internal/abi.h
+modify.o: $(hdrdir)/ruby/internal/anyargs.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+modify.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+modify.o: $(hdrdir)/ruby/internal/assume.h
+modify.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+modify.o: $(hdrdir)/ruby/internal/attr/artificial.h
+modify.o: $(hdrdir)/ruby/internal/attr/cold.h
+modify.o: $(hdrdir)/ruby/internal/attr/const.h
+modify.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+modify.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+modify.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+modify.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+modify.o: $(hdrdir)/ruby/internal/attr/error.h
+modify.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+modify.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+modify.o: $(hdrdir)/ruby/internal/attr/format.h
+modify.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+modify.o: $(hdrdir)/ruby/internal/attr/noalias.h
+modify.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+modify.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+modify.o: $(hdrdir)/ruby/internal/attr/noinline.h
+modify.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+modify.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+modify.o: $(hdrdir)/ruby/internal/attr/pure.h
+modify.o: $(hdrdir)/ruby/internal/attr/restrict.h
+modify.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+modify.o: $(hdrdir)/ruby/internal/attr/warning.h
+modify.o: $(hdrdir)/ruby/internal/attr/weakref.h
+modify.o: $(hdrdir)/ruby/internal/cast.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+modify.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+modify.o: $(hdrdir)/ruby/internal/compiler_since.h
+modify.o: $(hdrdir)/ruby/internal/config.h
+modify.o: $(hdrdir)/ruby/internal/constant_p.h
+modify.o: $(hdrdir)/ruby/internal/core.h
+modify.o: $(hdrdir)/ruby/internal/core/rarray.h
+modify.o: $(hdrdir)/ruby/internal/core/rbasic.h
+modify.o: $(hdrdir)/ruby/internal/core/rbignum.h
+modify.o: $(hdrdir)/ruby/internal/core/rclass.h
+modify.o: $(hdrdir)/ruby/internal/core/rdata.h
+modify.o: $(hdrdir)/ruby/internal/core/rfile.h
+modify.o: $(hdrdir)/ruby/internal/core/rhash.h
+modify.o: $(hdrdir)/ruby/internal/core/robject.h
+modify.o: $(hdrdir)/ruby/internal/core/rregexp.h
+modify.o: $(hdrdir)/ruby/internal/core/rstring.h
+modify.o: $(hdrdir)/ruby/internal/core/rstruct.h
+modify.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+modify.o: $(hdrdir)/ruby/internal/ctype.h
+modify.o: $(hdrdir)/ruby/internal/dllexport.h
+modify.o: $(hdrdir)/ruby/internal/dosish.h
+modify.o: $(hdrdir)/ruby/internal/error.h
+modify.o: $(hdrdir)/ruby/internal/eval.h
+modify.o: $(hdrdir)/ruby/internal/event.h
+modify.o: $(hdrdir)/ruby/internal/fl_type.h
+modify.o: $(hdrdir)/ruby/internal/gc.h
+modify.o: $(hdrdir)/ruby/internal/glob.h
+modify.o: $(hdrdir)/ruby/internal/globals.h
+modify.o: $(hdrdir)/ruby/internal/has/attribute.h
+modify.o: $(hdrdir)/ruby/internal/has/builtin.h
+modify.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+modify.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+modify.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+modify.o: $(hdrdir)/ruby/internal/has/extension.h
+modify.o: $(hdrdir)/ruby/internal/has/feature.h
+modify.o: $(hdrdir)/ruby/internal/has/warning.h
+modify.o: $(hdrdir)/ruby/internal/intern/array.h
+modify.o: $(hdrdir)/ruby/internal/intern/bignum.h
+modify.o: $(hdrdir)/ruby/internal/intern/class.h
+modify.o: $(hdrdir)/ruby/internal/intern/compar.h
+modify.o: $(hdrdir)/ruby/internal/intern/complex.h
+modify.o: $(hdrdir)/ruby/internal/intern/cont.h
+modify.o: $(hdrdir)/ruby/internal/intern/dir.h
+modify.o: $(hdrdir)/ruby/internal/intern/enum.h
+modify.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+modify.o: $(hdrdir)/ruby/internal/intern/error.h
+modify.o: $(hdrdir)/ruby/internal/intern/eval.h
+modify.o: $(hdrdir)/ruby/internal/intern/file.h
+modify.o: $(hdrdir)/ruby/internal/intern/gc.h
+modify.o: $(hdrdir)/ruby/internal/intern/hash.h
+modify.o: $(hdrdir)/ruby/internal/intern/io.h
+modify.o: $(hdrdir)/ruby/internal/intern/load.h
+modify.o: $(hdrdir)/ruby/internal/intern/marshal.h
+modify.o: $(hdrdir)/ruby/internal/intern/numeric.h
+modify.o: $(hdrdir)/ruby/internal/intern/object.h
+modify.o: $(hdrdir)/ruby/internal/intern/parse.h
+modify.o: $(hdrdir)/ruby/internal/intern/proc.h
+modify.o: $(hdrdir)/ruby/internal/intern/process.h
+modify.o: $(hdrdir)/ruby/internal/intern/random.h
+modify.o: $(hdrdir)/ruby/internal/intern/range.h
+modify.o: $(hdrdir)/ruby/internal/intern/rational.h
+modify.o: $(hdrdir)/ruby/internal/intern/re.h
+modify.o: $(hdrdir)/ruby/internal/intern/ruby.h
+modify.o: $(hdrdir)/ruby/internal/intern/select.h
+modify.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+modify.o: $(hdrdir)/ruby/internal/intern/signal.h
+modify.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+modify.o: $(hdrdir)/ruby/internal/intern/string.h
+modify.o: $(hdrdir)/ruby/internal/intern/struct.h
+modify.o: $(hdrdir)/ruby/internal/intern/thread.h
+modify.o: $(hdrdir)/ruby/internal/intern/time.h
+modify.o: $(hdrdir)/ruby/internal/intern/variable.h
+modify.o: $(hdrdir)/ruby/internal/intern/vm.h
+modify.o: $(hdrdir)/ruby/internal/interpreter.h
+modify.o: $(hdrdir)/ruby/internal/iterator.h
+modify.o: $(hdrdir)/ruby/internal/memory.h
+modify.o: $(hdrdir)/ruby/internal/method.h
+modify.o: $(hdrdir)/ruby/internal/module.h
+modify.o: $(hdrdir)/ruby/internal/newobj.h
+modify.o: $(hdrdir)/ruby/internal/rgengc.h
+modify.o: $(hdrdir)/ruby/internal/scan_args.h
+modify.o: $(hdrdir)/ruby/internal/special_consts.h
+modify.o: $(hdrdir)/ruby/internal/static_assert.h
+modify.o: $(hdrdir)/ruby/internal/stdalign.h
+modify.o: $(hdrdir)/ruby/internal/stdbool.h
+modify.o: $(hdrdir)/ruby/internal/symbol.h
+modify.o: $(hdrdir)/ruby/internal/value.h
+modify.o: $(hdrdir)/ruby/internal/value_type.h
+modify.o: $(hdrdir)/ruby/internal/variable.h
+modify.o: $(hdrdir)/ruby/internal/warning_push.h
+modify.o: $(hdrdir)/ruby/internal/xmalloc.h
modify.o: $(hdrdir)/ruby/missing.h
modify.o: $(hdrdir)/ruby/ruby.h
modify.o: $(hdrdir)/ruby/st.h
@@ -124,9 +1520,166 @@ new.o: $(arch_hdrdir)/ruby/config.h
new.o: $(hdrdir)/ruby.h
new.o: $(hdrdir)/ruby/assert.h
new.o: $(hdrdir)/ruby/backward.h
+new.o: $(hdrdir)/ruby/backward/2/assume.h
+new.o: $(hdrdir)/ruby/backward/2/attributes.h
+new.o: $(hdrdir)/ruby/backward/2/bool.h
+new.o: $(hdrdir)/ruby/backward/2/inttypes.h
+new.o: $(hdrdir)/ruby/backward/2/limits.h
+new.o: $(hdrdir)/ruby/backward/2/long_long.h
+new.o: $(hdrdir)/ruby/backward/2/stdalign.h
+new.o: $(hdrdir)/ruby/backward/2/stdarg.h
new.o: $(hdrdir)/ruby/defines.h
new.o: $(hdrdir)/ruby/encoding.h
new.o: $(hdrdir)/ruby/intern.h
+new.o: $(hdrdir)/ruby/internal/abi.h
+new.o: $(hdrdir)/ruby/internal/anyargs.h
+new.o: $(hdrdir)/ruby/internal/arithmetic.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+new.o: $(hdrdir)/ruby/internal/assume.h
+new.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+new.o: $(hdrdir)/ruby/internal/attr/artificial.h
+new.o: $(hdrdir)/ruby/internal/attr/cold.h
+new.o: $(hdrdir)/ruby/internal/attr/const.h
+new.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+new.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+new.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+new.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+new.o: $(hdrdir)/ruby/internal/attr/error.h
+new.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+new.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+new.o: $(hdrdir)/ruby/internal/attr/format.h
+new.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+new.o: $(hdrdir)/ruby/internal/attr/noalias.h
+new.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+new.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+new.o: $(hdrdir)/ruby/internal/attr/noinline.h
+new.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+new.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+new.o: $(hdrdir)/ruby/internal/attr/pure.h
+new.o: $(hdrdir)/ruby/internal/attr/restrict.h
+new.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+new.o: $(hdrdir)/ruby/internal/attr/warning.h
+new.o: $(hdrdir)/ruby/internal/attr/weakref.h
+new.o: $(hdrdir)/ruby/internal/cast.h
+new.o: $(hdrdir)/ruby/internal/compiler_is.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+new.o: $(hdrdir)/ruby/internal/compiler_since.h
+new.o: $(hdrdir)/ruby/internal/config.h
+new.o: $(hdrdir)/ruby/internal/constant_p.h
+new.o: $(hdrdir)/ruby/internal/core.h
+new.o: $(hdrdir)/ruby/internal/core/rarray.h
+new.o: $(hdrdir)/ruby/internal/core/rbasic.h
+new.o: $(hdrdir)/ruby/internal/core/rbignum.h
+new.o: $(hdrdir)/ruby/internal/core/rclass.h
+new.o: $(hdrdir)/ruby/internal/core/rdata.h
+new.o: $(hdrdir)/ruby/internal/core/rfile.h
+new.o: $(hdrdir)/ruby/internal/core/rhash.h
+new.o: $(hdrdir)/ruby/internal/core/robject.h
+new.o: $(hdrdir)/ruby/internal/core/rregexp.h
+new.o: $(hdrdir)/ruby/internal/core/rstring.h
+new.o: $(hdrdir)/ruby/internal/core/rstruct.h
+new.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+new.o: $(hdrdir)/ruby/internal/ctype.h
+new.o: $(hdrdir)/ruby/internal/dllexport.h
+new.o: $(hdrdir)/ruby/internal/dosish.h
+new.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+new.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+new.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+new.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+new.o: $(hdrdir)/ruby/internal/encoding/re.h
+new.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+new.o: $(hdrdir)/ruby/internal/encoding/string.h
+new.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+new.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+new.o: $(hdrdir)/ruby/internal/error.h
+new.o: $(hdrdir)/ruby/internal/eval.h
+new.o: $(hdrdir)/ruby/internal/event.h
+new.o: $(hdrdir)/ruby/internal/fl_type.h
+new.o: $(hdrdir)/ruby/internal/gc.h
+new.o: $(hdrdir)/ruby/internal/glob.h
+new.o: $(hdrdir)/ruby/internal/globals.h
+new.o: $(hdrdir)/ruby/internal/has/attribute.h
+new.o: $(hdrdir)/ruby/internal/has/builtin.h
+new.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/extension.h
+new.o: $(hdrdir)/ruby/internal/has/feature.h
+new.o: $(hdrdir)/ruby/internal/has/warning.h
+new.o: $(hdrdir)/ruby/internal/intern/array.h
+new.o: $(hdrdir)/ruby/internal/intern/bignum.h
+new.o: $(hdrdir)/ruby/internal/intern/class.h
+new.o: $(hdrdir)/ruby/internal/intern/compar.h
+new.o: $(hdrdir)/ruby/internal/intern/complex.h
+new.o: $(hdrdir)/ruby/internal/intern/cont.h
+new.o: $(hdrdir)/ruby/internal/intern/dir.h
+new.o: $(hdrdir)/ruby/internal/intern/enum.h
+new.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+new.o: $(hdrdir)/ruby/internal/intern/error.h
+new.o: $(hdrdir)/ruby/internal/intern/eval.h
+new.o: $(hdrdir)/ruby/internal/intern/file.h
+new.o: $(hdrdir)/ruby/internal/intern/gc.h
+new.o: $(hdrdir)/ruby/internal/intern/hash.h
+new.o: $(hdrdir)/ruby/internal/intern/io.h
+new.o: $(hdrdir)/ruby/internal/intern/load.h
+new.o: $(hdrdir)/ruby/internal/intern/marshal.h
+new.o: $(hdrdir)/ruby/internal/intern/numeric.h
+new.o: $(hdrdir)/ruby/internal/intern/object.h
+new.o: $(hdrdir)/ruby/internal/intern/parse.h
+new.o: $(hdrdir)/ruby/internal/intern/proc.h
+new.o: $(hdrdir)/ruby/internal/intern/process.h
+new.o: $(hdrdir)/ruby/internal/intern/random.h
+new.o: $(hdrdir)/ruby/internal/intern/range.h
+new.o: $(hdrdir)/ruby/internal/intern/rational.h
+new.o: $(hdrdir)/ruby/internal/intern/re.h
+new.o: $(hdrdir)/ruby/internal/intern/ruby.h
+new.o: $(hdrdir)/ruby/internal/intern/select.h
+new.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+new.o: $(hdrdir)/ruby/internal/intern/signal.h
+new.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+new.o: $(hdrdir)/ruby/internal/intern/string.h
+new.o: $(hdrdir)/ruby/internal/intern/struct.h
+new.o: $(hdrdir)/ruby/internal/intern/thread.h
+new.o: $(hdrdir)/ruby/internal/intern/time.h
+new.o: $(hdrdir)/ruby/internal/intern/variable.h
+new.o: $(hdrdir)/ruby/internal/intern/vm.h
+new.o: $(hdrdir)/ruby/internal/interpreter.h
+new.o: $(hdrdir)/ruby/internal/iterator.h
+new.o: $(hdrdir)/ruby/internal/memory.h
+new.o: $(hdrdir)/ruby/internal/method.h
+new.o: $(hdrdir)/ruby/internal/module.h
+new.o: $(hdrdir)/ruby/internal/newobj.h
+new.o: $(hdrdir)/ruby/internal/rgengc.h
+new.o: $(hdrdir)/ruby/internal/scan_args.h
+new.o: $(hdrdir)/ruby/internal/special_consts.h
+new.o: $(hdrdir)/ruby/internal/static_assert.h
+new.o: $(hdrdir)/ruby/internal/stdalign.h
+new.o: $(hdrdir)/ruby/internal/stdbool.h
+new.o: $(hdrdir)/ruby/internal/symbol.h
+new.o: $(hdrdir)/ruby/internal/value.h
+new.o: $(hdrdir)/ruby/internal/value_type.h
+new.o: $(hdrdir)/ruby/internal/variable.h
+new.o: $(hdrdir)/ruby/internal/warning_push.h
+new.o: $(hdrdir)/ruby/internal/xmalloc.h
new.o: $(hdrdir)/ruby/missing.h
new.o: $(hdrdir)/ruby/onigmo.h
new.o: $(hdrdir)/ruby/oniguruma.h
@@ -139,8 +1692,156 @@ nofree.o: $(arch_hdrdir)/ruby/config.h
nofree.o: $(hdrdir)/ruby.h
nofree.o: $(hdrdir)/ruby/assert.h
nofree.o: $(hdrdir)/ruby/backward.h
+nofree.o: $(hdrdir)/ruby/backward/2/assume.h
+nofree.o: $(hdrdir)/ruby/backward/2/attributes.h
+nofree.o: $(hdrdir)/ruby/backward/2/bool.h
+nofree.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nofree.o: $(hdrdir)/ruby/backward/2/limits.h
+nofree.o: $(hdrdir)/ruby/backward/2/long_long.h
+nofree.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nofree.o: $(hdrdir)/ruby/backward/2/stdarg.h
nofree.o: $(hdrdir)/ruby/defines.h
nofree.o: $(hdrdir)/ruby/intern.h
+nofree.o: $(hdrdir)/ruby/internal/abi.h
+nofree.o: $(hdrdir)/ruby/internal/anyargs.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+nofree.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+nofree.o: $(hdrdir)/ruby/internal/assume.h
+nofree.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+nofree.o: $(hdrdir)/ruby/internal/attr/artificial.h
+nofree.o: $(hdrdir)/ruby/internal/attr/cold.h
+nofree.o: $(hdrdir)/ruby/internal/attr/const.h
+nofree.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+nofree.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+nofree.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+nofree.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+nofree.o: $(hdrdir)/ruby/internal/attr/error.h
+nofree.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+nofree.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+nofree.o: $(hdrdir)/ruby/internal/attr/format.h
+nofree.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+nofree.o: $(hdrdir)/ruby/internal/attr/noalias.h
+nofree.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+nofree.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+nofree.o: $(hdrdir)/ruby/internal/attr/noinline.h
+nofree.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+nofree.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+nofree.o: $(hdrdir)/ruby/internal/attr/pure.h
+nofree.o: $(hdrdir)/ruby/internal/attr/restrict.h
+nofree.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+nofree.o: $(hdrdir)/ruby/internal/attr/warning.h
+nofree.o: $(hdrdir)/ruby/internal/attr/weakref.h
+nofree.o: $(hdrdir)/ruby/internal/cast.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+nofree.o: $(hdrdir)/ruby/internal/compiler_since.h
+nofree.o: $(hdrdir)/ruby/internal/config.h
+nofree.o: $(hdrdir)/ruby/internal/constant_p.h
+nofree.o: $(hdrdir)/ruby/internal/core.h
+nofree.o: $(hdrdir)/ruby/internal/core/rarray.h
+nofree.o: $(hdrdir)/ruby/internal/core/rbasic.h
+nofree.o: $(hdrdir)/ruby/internal/core/rbignum.h
+nofree.o: $(hdrdir)/ruby/internal/core/rclass.h
+nofree.o: $(hdrdir)/ruby/internal/core/rdata.h
+nofree.o: $(hdrdir)/ruby/internal/core/rfile.h
+nofree.o: $(hdrdir)/ruby/internal/core/rhash.h
+nofree.o: $(hdrdir)/ruby/internal/core/robject.h
+nofree.o: $(hdrdir)/ruby/internal/core/rregexp.h
+nofree.o: $(hdrdir)/ruby/internal/core/rstring.h
+nofree.o: $(hdrdir)/ruby/internal/core/rstruct.h
+nofree.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+nofree.o: $(hdrdir)/ruby/internal/ctype.h
+nofree.o: $(hdrdir)/ruby/internal/dllexport.h
+nofree.o: $(hdrdir)/ruby/internal/dosish.h
+nofree.o: $(hdrdir)/ruby/internal/error.h
+nofree.o: $(hdrdir)/ruby/internal/eval.h
+nofree.o: $(hdrdir)/ruby/internal/event.h
+nofree.o: $(hdrdir)/ruby/internal/fl_type.h
+nofree.o: $(hdrdir)/ruby/internal/gc.h
+nofree.o: $(hdrdir)/ruby/internal/glob.h
+nofree.o: $(hdrdir)/ruby/internal/globals.h
+nofree.o: $(hdrdir)/ruby/internal/has/attribute.h
+nofree.o: $(hdrdir)/ruby/internal/has/builtin.h
+nofree.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+nofree.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+nofree.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+nofree.o: $(hdrdir)/ruby/internal/has/extension.h
+nofree.o: $(hdrdir)/ruby/internal/has/feature.h
+nofree.o: $(hdrdir)/ruby/internal/has/warning.h
+nofree.o: $(hdrdir)/ruby/internal/intern/array.h
+nofree.o: $(hdrdir)/ruby/internal/intern/bignum.h
+nofree.o: $(hdrdir)/ruby/internal/intern/class.h
+nofree.o: $(hdrdir)/ruby/internal/intern/compar.h
+nofree.o: $(hdrdir)/ruby/internal/intern/complex.h
+nofree.o: $(hdrdir)/ruby/internal/intern/cont.h
+nofree.o: $(hdrdir)/ruby/internal/intern/dir.h
+nofree.o: $(hdrdir)/ruby/internal/intern/enum.h
+nofree.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+nofree.o: $(hdrdir)/ruby/internal/intern/error.h
+nofree.o: $(hdrdir)/ruby/internal/intern/eval.h
+nofree.o: $(hdrdir)/ruby/internal/intern/file.h
+nofree.o: $(hdrdir)/ruby/internal/intern/gc.h
+nofree.o: $(hdrdir)/ruby/internal/intern/hash.h
+nofree.o: $(hdrdir)/ruby/internal/intern/io.h
+nofree.o: $(hdrdir)/ruby/internal/intern/load.h
+nofree.o: $(hdrdir)/ruby/internal/intern/marshal.h
+nofree.o: $(hdrdir)/ruby/internal/intern/numeric.h
+nofree.o: $(hdrdir)/ruby/internal/intern/object.h
+nofree.o: $(hdrdir)/ruby/internal/intern/parse.h
+nofree.o: $(hdrdir)/ruby/internal/intern/proc.h
+nofree.o: $(hdrdir)/ruby/internal/intern/process.h
+nofree.o: $(hdrdir)/ruby/internal/intern/random.h
+nofree.o: $(hdrdir)/ruby/internal/intern/range.h
+nofree.o: $(hdrdir)/ruby/internal/intern/rational.h
+nofree.o: $(hdrdir)/ruby/internal/intern/re.h
+nofree.o: $(hdrdir)/ruby/internal/intern/ruby.h
+nofree.o: $(hdrdir)/ruby/internal/intern/select.h
+nofree.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+nofree.o: $(hdrdir)/ruby/internal/intern/signal.h
+nofree.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+nofree.o: $(hdrdir)/ruby/internal/intern/string.h
+nofree.o: $(hdrdir)/ruby/internal/intern/struct.h
+nofree.o: $(hdrdir)/ruby/internal/intern/thread.h
+nofree.o: $(hdrdir)/ruby/internal/intern/time.h
+nofree.o: $(hdrdir)/ruby/internal/intern/variable.h
+nofree.o: $(hdrdir)/ruby/internal/intern/vm.h
+nofree.o: $(hdrdir)/ruby/internal/interpreter.h
+nofree.o: $(hdrdir)/ruby/internal/iterator.h
+nofree.o: $(hdrdir)/ruby/internal/memory.h
+nofree.o: $(hdrdir)/ruby/internal/method.h
+nofree.o: $(hdrdir)/ruby/internal/module.h
+nofree.o: $(hdrdir)/ruby/internal/newobj.h
+nofree.o: $(hdrdir)/ruby/internal/rgengc.h
+nofree.o: $(hdrdir)/ruby/internal/scan_args.h
+nofree.o: $(hdrdir)/ruby/internal/special_consts.h
+nofree.o: $(hdrdir)/ruby/internal/static_assert.h
+nofree.o: $(hdrdir)/ruby/internal/stdalign.h
+nofree.o: $(hdrdir)/ruby/internal/stdbool.h
+nofree.o: $(hdrdir)/ruby/internal/symbol.h
+nofree.o: $(hdrdir)/ruby/internal/value.h
+nofree.o: $(hdrdir)/ruby/internal/value_type.h
+nofree.o: $(hdrdir)/ruby/internal/variable.h
+nofree.o: $(hdrdir)/ruby/internal/warning_push.h
+nofree.o: $(hdrdir)/ruby/internal/xmalloc.h
nofree.o: $(hdrdir)/ruby/missing.h
nofree.o: $(hdrdir)/ruby/ruby.h
nofree.o: $(hdrdir)/ruby/st.h
@@ -148,25 +1849,341 @@ nofree.o: $(hdrdir)/ruby/subst.h
nofree.o: nofree.c
normalize.o: $(RUBY_EXTCONF_H)
normalize.o: $(arch_hdrdir)/ruby/config.h
-normalize.o: $(hdrdir)/ruby.h
normalize.o: $(hdrdir)/ruby/assert.h
normalize.o: $(hdrdir)/ruby/backward.h
+normalize.o: $(hdrdir)/ruby/backward/2/assume.h
+normalize.o: $(hdrdir)/ruby/backward/2/attributes.h
+normalize.o: $(hdrdir)/ruby/backward/2/bool.h
+normalize.o: $(hdrdir)/ruby/backward/2/inttypes.h
+normalize.o: $(hdrdir)/ruby/backward/2/limits.h
+normalize.o: $(hdrdir)/ruby/backward/2/long_long.h
+normalize.o: $(hdrdir)/ruby/backward/2/stdalign.h
+normalize.o: $(hdrdir)/ruby/backward/2/stdarg.h
normalize.o: $(hdrdir)/ruby/defines.h
+normalize.o: $(hdrdir)/ruby/encoding.h
normalize.o: $(hdrdir)/ruby/intern.h
+normalize.o: $(hdrdir)/ruby/internal/abi.h
+normalize.o: $(hdrdir)/ruby/internal/anyargs.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+normalize.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+normalize.o: $(hdrdir)/ruby/internal/assume.h
+normalize.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+normalize.o: $(hdrdir)/ruby/internal/attr/artificial.h
+normalize.o: $(hdrdir)/ruby/internal/attr/cold.h
+normalize.o: $(hdrdir)/ruby/internal/attr/const.h
+normalize.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+normalize.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+normalize.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+normalize.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+normalize.o: $(hdrdir)/ruby/internal/attr/error.h
+normalize.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+normalize.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+normalize.o: $(hdrdir)/ruby/internal/attr/format.h
+normalize.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+normalize.o: $(hdrdir)/ruby/internal/attr/noalias.h
+normalize.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+normalize.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+normalize.o: $(hdrdir)/ruby/internal/attr/noinline.h
+normalize.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+normalize.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+normalize.o: $(hdrdir)/ruby/internal/attr/pure.h
+normalize.o: $(hdrdir)/ruby/internal/attr/restrict.h
+normalize.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+normalize.o: $(hdrdir)/ruby/internal/attr/warning.h
+normalize.o: $(hdrdir)/ruby/internal/attr/weakref.h
+normalize.o: $(hdrdir)/ruby/internal/cast.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+normalize.o: $(hdrdir)/ruby/internal/compiler_since.h
+normalize.o: $(hdrdir)/ruby/internal/config.h
+normalize.o: $(hdrdir)/ruby/internal/constant_p.h
+normalize.o: $(hdrdir)/ruby/internal/core.h
+normalize.o: $(hdrdir)/ruby/internal/core/rarray.h
+normalize.o: $(hdrdir)/ruby/internal/core/rbasic.h
+normalize.o: $(hdrdir)/ruby/internal/core/rbignum.h
+normalize.o: $(hdrdir)/ruby/internal/core/rclass.h
+normalize.o: $(hdrdir)/ruby/internal/core/rdata.h
+normalize.o: $(hdrdir)/ruby/internal/core/rfile.h
+normalize.o: $(hdrdir)/ruby/internal/core/rhash.h
+normalize.o: $(hdrdir)/ruby/internal/core/robject.h
+normalize.o: $(hdrdir)/ruby/internal/core/rregexp.h
+normalize.o: $(hdrdir)/ruby/internal/core/rstring.h
+normalize.o: $(hdrdir)/ruby/internal/core/rstruct.h
+normalize.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+normalize.o: $(hdrdir)/ruby/internal/ctype.h
+normalize.o: $(hdrdir)/ruby/internal/dllexport.h
+normalize.o: $(hdrdir)/ruby/internal/dosish.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/re.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/string.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+normalize.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+normalize.o: $(hdrdir)/ruby/internal/error.h
+normalize.o: $(hdrdir)/ruby/internal/eval.h
+normalize.o: $(hdrdir)/ruby/internal/event.h
+normalize.o: $(hdrdir)/ruby/internal/fl_type.h
+normalize.o: $(hdrdir)/ruby/internal/gc.h
+normalize.o: $(hdrdir)/ruby/internal/glob.h
+normalize.o: $(hdrdir)/ruby/internal/globals.h
+normalize.o: $(hdrdir)/ruby/internal/has/attribute.h
+normalize.o: $(hdrdir)/ruby/internal/has/builtin.h
+normalize.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+normalize.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+normalize.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+normalize.o: $(hdrdir)/ruby/internal/has/extension.h
+normalize.o: $(hdrdir)/ruby/internal/has/feature.h
+normalize.o: $(hdrdir)/ruby/internal/has/warning.h
+normalize.o: $(hdrdir)/ruby/internal/intern/array.h
+normalize.o: $(hdrdir)/ruby/internal/intern/bignum.h
+normalize.o: $(hdrdir)/ruby/internal/intern/class.h
+normalize.o: $(hdrdir)/ruby/internal/intern/compar.h
+normalize.o: $(hdrdir)/ruby/internal/intern/complex.h
+normalize.o: $(hdrdir)/ruby/internal/intern/cont.h
+normalize.o: $(hdrdir)/ruby/internal/intern/dir.h
+normalize.o: $(hdrdir)/ruby/internal/intern/enum.h
+normalize.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+normalize.o: $(hdrdir)/ruby/internal/intern/error.h
+normalize.o: $(hdrdir)/ruby/internal/intern/eval.h
+normalize.o: $(hdrdir)/ruby/internal/intern/file.h
+normalize.o: $(hdrdir)/ruby/internal/intern/gc.h
+normalize.o: $(hdrdir)/ruby/internal/intern/hash.h
+normalize.o: $(hdrdir)/ruby/internal/intern/io.h
+normalize.o: $(hdrdir)/ruby/internal/intern/load.h
+normalize.o: $(hdrdir)/ruby/internal/intern/marshal.h
+normalize.o: $(hdrdir)/ruby/internal/intern/numeric.h
+normalize.o: $(hdrdir)/ruby/internal/intern/object.h
+normalize.o: $(hdrdir)/ruby/internal/intern/parse.h
+normalize.o: $(hdrdir)/ruby/internal/intern/proc.h
+normalize.o: $(hdrdir)/ruby/internal/intern/process.h
+normalize.o: $(hdrdir)/ruby/internal/intern/random.h
+normalize.o: $(hdrdir)/ruby/internal/intern/range.h
+normalize.o: $(hdrdir)/ruby/internal/intern/rational.h
+normalize.o: $(hdrdir)/ruby/internal/intern/re.h
+normalize.o: $(hdrdir)/ruby/internal/intern/ruby.h
+normalize.o: $(hdrdir)/ruby/internal/intern/select.h
+normalize.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+normalize.o: $(hdrdir)/ruby/internal/intern/signal.h
+normalize.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+normalize.o: $(hdrdir)/ruby/internal/intern/string.h
+normalize.o: $(hdrdir)/ruby/internal/intern/struct.h
+normalize.o: $(hdrdir)/ruby/internal/intern/thread.h
+normalize.o: $(hdrdir)/ruby/internal/intern/time.h
+normalize.o: $(hdrdir)/ruby/internal/intern/variable.h
+normalize.o: $(hdrdir)/ruby/internal/intern/vm.h
+normalize.o: $(hdrdir)/ruby/internal/interpreter.h
+normalize.o: $(hdrdir)/ruby/internal/iterator.h
+normalize.o: $(hdrdir)/ruby/internal/memory.h
+normalize.o: $(hdrdir)/ruby/internal/method.h
+normalize.o: $(hdrdir)/ruby/internal/module.h
+normalize.o: $(hdrdir)/ruby/internal/newobj.h
+normalize.o: $(hdrdir)/ruby/internal/rgengc.h
+normalize.o: $(hdrdir)/ruby/internal/scan_args.h
+normalize.o: $(hdrdir)/ruby/internal/special_consts.h
+normalize.o: $(hdrdir)/ruby/internal/static_assert.h
+normalize.o: $(hdrdir)/ruby/internal/stdalign.h
+normalize.o: $(hdrdir)/ruby/internal/stdbool.h
+normalize.o: $(hdrdir)/ruby/internal/symbol.h
+normalize.o: $(hdrdir)/ruby/internal/value.h
+normalize.o: $(hdrdir)/ruby/internal/value_type.h
+normalize.o: $(hdrdir)/ruby/internal/variable.h
+normalize.o: $(hdrdir)/ruby/internal/warning_push.h
+normalize.o: $(hdrdir)/ruby/internal/xmalloc.h
normalize.o: $(hdrdir)/ruby/missing.h
+normalize.o: $(hdrdir)/ruby/onigmo.h
+normalize.o: $(hdrdir)/ruby/oniguruma.h
normalize.o: $(hdrdir)/ruby/ruby.h
normalize.o: $(hdrdir)/ruby/st.h
normalize.o: $(hdrdir)/ruby/subst.h
-normalize.o: $(top_srcdir)/internal.h
+normalize.o: $(top_srcdir)/internal/file.h
normalize.o: normalize.c
qsort.o: $(RUBY_EXTCONF_H)
qsort.o: $(arch_hdrdir)/ruby/config.h
qsort.o: $(hdrdir)/ruby.h
qsort.o: $(hdrdir)/ruby/assert.h
qsort.o: $(hdrdir)/ruby/backward.h
+qsort.o: $(hdrdir)/ruby/backward/2/assume.h
+qsort.o: $(hdrdir)/ruby/backward/2/attributes.h
+qsort.o: $(hdrdir)/ruby/backward/2/bool.h
+qsort.o: $(hdrdir)/ruby/backward/2/inttypes.h
+qsort.o: $(hdrdir)/ruby/backward/2/limits.h
+qsort.o: $(hdrdir)/ruby/backward/2/long_long.h
+qsort.o: $(hdrdir)/ruby/backward/2/stdalign.h
+qsort.o: $(hdrdir)/ruby/backward/2/stdarg.h
qsort.o: $(hdrdir)/ruby/defines.h
qsort.o: $(hdrdir)/ruby/encoding.h
qsort.o: $(hdrdir)/ruby/intern.h
+qsort.o: $(hdrdir)/ruby/internal/abi.h
+qsort.o: $(hdrdir)/ruby/internal/anyargs.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+qsort.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+qsort.o: $(hdrdir)/ruby/internal/assume.h
+qsort.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+qsort.o: $(hdrdir)/ruby/internal/attr/artificial.h
+qsort.o: $(hdrdir)/ruby/internal/attr/cold.h
+qsort.o: $(hdrdir)/ruby/internal/attr/const.h
+qsort.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+qsort.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+qsort.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+qsort.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+qsort.o: $(hdrdir)/ruby/internal/attr/error.h
+qsort.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+qsort.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+qsort.o: $(hdrdir)/ruby/internal/attr/format.h
+qsort.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+qsort.o: $(hdrdir)/ruby/internal/attr/noalias.h
+qsort.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+qsort.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+qsort.o: $(hdrdir)/ruby/internal/attr/noinline.h
+qsort.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+qsort.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+qsort.o: $(hdrdir)/ruby/internal/attr/pure.h
+qsort.o: $(hdrdir)/ruby/internal/attr/restrict.h
+qsort.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+qsort.o: $(hdrdir)/ruby/internal/attr/warning.h
+qsort.o: $(hdrdir)/ruby/internal/attr/weakref.h
+qsort.o: $(hdrdir)/ruby/internal/cast.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+qsort.o: $(hdrdir)/ruby/internal/compiler_since.h
+qsort.o: $(hdrdir)/ruby/internal/config.h
+qsort.o: $(hdrdir)/ruby/internal/constant_p.h
+qsort.o: $(hdrdir)/ruby/internal/core.h
+qsort.o: $(hdrdir)/ruby/internal/core/rarray.h
+qsort.o: $(hdrdir)/ruby/internal/core/rbasic.h
+qsort.o: $(hdrdir)/ruby/internal/core/rbignum.h
+qsort.o: $(hdrdir)/ruby/internal/core/rclass.h
+qsort.o: $(hdrdir)/ruby/internal/core/rdata.h
+qsort.o: $(hdrdir)/ruby/internal/core/rfile.h
+qsort.o: $(hdrdir)/ruby/internal/core/rhash.h
+qsort.o: $(hdrdir)/ruby/internal/core/robject.h
+qsort.o: $(hdrdir)/ruby/internal/core/rregexp.h
+qsort.o: $(hdrdir)/ruby/internal/core/rstring.h
+qsort.o: $(hdrdir)/ruby/internal/core/rstruct.h
+qsort.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+qsort.o: $(hdrdir)/ruby/internal/ctype.h
+qsort.o: $(hdrdir)/ruby/internal/dllexport.h
+qsort.o: $(hdrdir)/ruby/internal/dosish.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/re.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/string.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+qsort.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+qsort.o: $(hdrdir)/ruby/internal/error.h
+qsort.o: $(hdrdir)/ruby/internal/eval.h
+qsort.o: $(hdrdir)/ruby/internal/event.h
+qsort.o: $(hdrdir)/ruby/internal/fl_type.h
+qsort.o: $(hdrdir)/ruby/internal/gc.h
+qsort.o: $(hdrdir)/ruby/internal/glob.h
+qsort.o: $(hdrdir)/ruby/internal/globals.h
+qsort.o: $(hdrdir)/ruby/internal/has/attribute.h
+qsort.o: $(hdrdir)/ruby/internal/has/builtin.h
+qsort.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+qsort.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+qsort.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+qsort.o: $(hdrdir)/ruby/internal/has/extension.h
+qsort.o: $(hdrdir)/ruby/internal/has/feature.h
+qsort.o: $(hdrdir)/ruby/internal/has/warning.h
+qsort.o: $(hdrdir)/ruby/internal/intern/array.h
+qsort.o: $(hdrdir)/ruby/internal/intern/bignum.h
+qsort.o: $(hdrdir)/ruby/internal/intern/class.h
+qsort.o: $(hdrdir)/ruby/internal/intern/compar.h
+qsort.o: $(hdrdir)/ruby/internal/intern/complex.h
+qsort.o: $(hdrdir)/ruby/internal/intern/cont.h
+qsort.o: $(hdrdir)/ruby/internal/intern/dir.h
+qsort.o: $(hdrdir)/ruby/internal/intern/enum.h
+qsort.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+qsort.o: $(hdrdir)/ruby/internal/intern/error.h
+qsort.o: $(hdrdir)/ruby/internal/intern/eval.h
+qsort.o: $(hdrdir)/ruby/internal/intern/file.h
+qsort.o: $(hdrdir)/ruby/internal/intern/gc.h
+qsort.o: $(hdrdir)/ruby/internal/intern/hash.h
+qsort.o: $(hdrdir)/ruby/internal/intern/io.h
+qsort.o: $(hdrdir)/ruby/internal/intern/load.h
+qsort.o: $(hdrdir)/ruby/internal/intern/marshal.h
+qsort.o: $(hdrdir)/ruby/internal/intern/numeric.h
+qsort.o: $(hdrdir)/ruby/internal/intern/object.h
+qsort.o: $(hdrdir)/ruby/internal/intern/parse.h
+qsort.o: $(hdrdir)/ruby/internal/intern/proc.h
+qsort.o: $(hdrdir)/ruby/internal/intern/process.h
+qsort.o: $(hdrdir)/ruby/internal/intern/random.h
+qsort.o: $(hdrdir)/ruby/internal/intern/range.h
+qsort.o: $(hdrdir)/ruby/internal/intern/rational.h
+qsort.o: $(hdrdir)/ruby/internal/intern/re.h
+qsort.o: $(hdrdir)/ruby/internal/intern/ruby.h
+qsort.o: $(hdrdir)/ruby/internal/intern/select.h
+qsort.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+qsort.o: $(hdrdir)/ruby/internal/intern/signal.h
+qsort.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+qsort.o: $(hdrdir)/ruby/internal/intern/string.h
+qsort.o: $(hdrdir)/ruby/internal/intern/struct.h
+qsort.o: $(hdrdir)/ruby/internal/intern/thread.h
+qsort.o: $(hdrdir)/ruby/internal/intern/time.h
+qsort.o: $(hdrdir)/ruby/internal/intern/variable.h
+qsort.o: $(hdrdir)/ruby/internal/intern/vm.h
+qsort.o: $(hdrdir)/ruby/internal/interpreter.h
+qsort.o: $(hdrdir)/ruby/internal/iterator.h
+qsort.o: $(hdrdir)/ruby/internal/memory.h
+qsort.o: $(hdrdir)/ruby/internal/method.h
+qsort.o: $(hdrdir)/ruby/internal/module.h
+qsort.o: $(hdrdir)/ruby/internal/newobj.h
+qsort.o: $(hdrdir)/ruby/internal/rgengc.h
+qsort.o: $(hdrdir)/ruby/internal/scan_args.h
+qsort.o: $(hdrdir)/ruby/internal/special_consts.h
+qsort.o: $(hdrdir)/ruby/internal/static_assert.h
+qsort.o: $(hdrdir)/ruby/internal/stdalign.h
+qsort.o: $(hdrdir)/ruby/internal/stdbool.h
+qsort.o: $(hdrdir)/ruby/internal/symbol.h
+qsort.o: $(hdrdir)/ruby/internal/value.h
+qsort.o: $(hdrdir)/ruby/internal/value_type.h
+qsort.o: $(hdrdir)/ruby/internal/variable.h
+qsort.o: $(hdrdir)/ruby/internal/warning_push.h
+qsort.o: $(hdrdir)/ruby/internal/xmalloc.h
qsort.o: $(hdrdir)/ruby/missing.h
qsort.o: $(hdrdir)/ruby/onigmo.h
qsort.o: $(hdrdir)/ruby/oniguruma.h
@@ -175,13 +2192,321 @@ qsort.o: $(hdrdir)/ruby/st.h
qsort.o: $(hdrdir)/ruby/subst.h
qsort.o: $(hdrdir)/ruby/util.h
qsort.o: qsort.c
+rb_interned_str.o: $(RUBY_EXTCONF_H)
+rb_interned_str.o: $(arch_hdrdir)/ruby/config.h
+rb_interned_str.o: $(hdrdir)/ruby.h
+rb_interned_str.o: $(hdrdir)/ruby/assert.h
+rb_interned_str.o: $(hdrdir)/ruby/backward.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_interned_str.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rb_interned_str.o: $(hdrdir)/ruby/defines.h
+rb_interned_str.o: $(hdrdir)/ruby/intern.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/abi.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/anyargs.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/assume.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/cold.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/const.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/error.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/format.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/pure.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/warning.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/cast.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/compiler_since.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/config.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/constant_p.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rarray.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rclass.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rdata.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rfile.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rhash.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/robject.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rstring.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/ctype.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/dllexport.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/dosish.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/error.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/eval.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/event.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/fl_type.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/gc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/glob.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/globals.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/attribute.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/builtin.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/extension.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/feature.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/has/warning.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/array.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/class.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/compar.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/complex.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/cont.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/dir.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/enum.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/error.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/eval.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/file.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/gc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/hash.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/io.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/load.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/object.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/parse.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/proc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/process.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/random.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/range.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/rational.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/re.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/select.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/signal.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/string.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/struct.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/thread.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/time.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/variable.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/intern/vm.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/interpreter.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/iterator.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/memory.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/method.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/module.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/newobj.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/rgengc.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/scan_args.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/special_consts.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/static_assert.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/stdalign.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/stdbool.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/symbol.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/value.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/value_type.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/variable.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/warning_push.h
+rb_interned_str.o: $(hdrdir)/ruby/internal/xmalloc.h
+rb_interned_str.o: $(hdrdir)/ruby/missing.h
+rb_interned_str.o: $(hdrdir)/ruby/ruby.h
+rb_interned_str.o: $(hdrdir)/ruby/st.h
+rb_interned_str.o: $(hdrdir)/ruby/subst.h
+rb_interned_str.o: rb_interned_str.c
rb_str_dup.o: $(RUBY_EXTCONF_H)
rb_str_dup.o: $(arch_hdrdir)/ruby/config.h
rb_str_dup.o: $(hdrdir)/ruby.h
rb_str_dup.o: $(hdrdir)/ruby/assert.h
rb_str_dup.o: $(hdrdir)/ruby/backward.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_str_dup.o: $(hdrdir)/ruby/backward/2/stdarg.h
rb_str_dup.o: $(hdrdir)/ruby/defines.h
rb_str_dup.o: $(hdrdir)/ruby/intern.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/abi.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/anyargs.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/assume.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/cold.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/const.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/error.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/format.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/pure.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/warning.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/cast.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/compiler_since.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/config.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/constant_p.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rarray.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rclass.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rdata.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rfile.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rhash.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/robject.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rstring.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/ctype.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/dllexport.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/dosish.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/error.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/eval.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/event.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/fl_type.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/gc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/glob.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/globals.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/attribute.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/builtin.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/extension.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/feature.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/has/warning.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/array.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/class.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/compar.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/complex.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/cont.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/dir.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/enum.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/error.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/eval.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/file.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/gc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/hash.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/io.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/load.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/object.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/parse.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/proc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/process.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/random.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/range.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/rational.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/re.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/select.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/signal.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/string.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/struct.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/thread.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/time.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/variable.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/intern/vm.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/interpreter.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/iterator.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/memory.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/method.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/module.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/newobj.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/rgengc.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/scan_args.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/special_consts.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/static_assert.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/stdalign.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/stdbool.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/symbol.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/value.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/value_type.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/variable.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/warning_push.h
+rb_str_dup.o: $(hdrdir)/ruby/internal/xmalloc.h
rb_str_dup.o: $(hdrdir)/ruby/missing.h
rb_str_dup.o: $(hdrdir)/ruby/ruby.h
rb_str_dup.o: $(hdrdir)/ruby/st.h
@@ -192,8 +2517,156 @@ set_len.o: $(arch_hdrdir)/ruby/config.h
set_len.o: $(hdrdir)/ruby.h
set_len.o: $(hdrdir)/ruby/assert.h
set_len.o: $(hdrdir)/ruby/backward.h
+set_len.o: $(hdrdir)/ruby/backward/2/assume.h
+set_len.o: $(hdrdir)/ruby/backward/2/attributes.h
+set_len.o: $(hdrdir)/ruby/backward/2/bool.h
+set_len.o: $(hdrdir)/ruby/backward/2/inttypes.h
+set_len.o: $(hdrdir)/ruby/backward/2/limits.h
+set_len.o: $(hdrdir)/ruby/backward/2/long_long.h
+set_len.o: $(hdrdir)/ruby/backward/2/stdalign.h
+set_len.o: $(hdrdir)/ruby/backward/2/stdarg.h
set_len.o: $(hdrdir)/ruby/defines.h
set_len.o: $(hdrdir)/ruby/intern.h
+set_len.o: $(hdrdir)/ruby/internal/abi.h
+set_len.o: $(hdrdir)/ruby/internal/anyargs.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+set_len.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+set_len.o: $(hdrdir)/ruby/internal/assume.h
+set_len.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+set_len.o: $(hdrdir)/ruby/internal/attr/artificial.h
+set_len.o: $(hdrdir)/ruby/internal/attr/cold.h
+set_len.o: $(hdrdir)/ruby/internal/attr/const.h
+set_len.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+set_len.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+set_len.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+set_len.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+set_len.o: $(hdrdir)/ruby/internal/attr/error.h
+set_len.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+set_len.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+set_len.o: $(hdrdir)/ruby/internal/attr/format.h
+set_len.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+set_len.o: $(hdrdir)/ruby/internal/attr/noalias.h
+set_len.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+set_len.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+set_len.o: $(hdrdir)/ruby/internal/attr/noinline.h
+set_len.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+set_len.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+set_len.o: $(hdrdir)/ruby/internal/attr/pure.h
+set_len.o: $(hdrdir)/ruby/internal/attr/restrict.h
+set_len.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+set_len.o: $(hdrdir)/ruby/internal/attr/warning.h
+set_len.o: $(hdrdir)/ruby/internal/attr/weakref.h
+set_len.o: $(hdrdir)/ruby/internal/cast.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+set_len.o: $(hdrdir)/ruby/internal/compiler_since.h
+set_len.o: $(hdrdir)/ruby/internal/config.h
+set_len.o: $(hdrdir)/ruby/internal/constant_p.h
+set_len.o: $(hdrdir)/ruby/internal/core.h
+set_len.o: $(hdrdir)/ruby/internal/core/rarray.h
+set_len.o: $(hdrdir)/ruby/internal/core/rbasic.h
+set_len.o: $(hdrdir)/ruby/internal/core/rbignum.h
+set_len.o: $(hdrdir)/ruby/internal/core/rclass.h
+set_len.o: $(hdrdir)/ruby/internal/core/rdata.h
+set_len.o: $(hdrdir)/ruby/internal/core/rfile.h
+set_len.o: $(hdrdir)/ruby/internal/core/rhash.h
+set_len.o: $(hdrdir)/ruby/internal/core/robject.h
+set_len.o: $(hdrdir)/ruby/internal/core/rregexp.h
+set_len.o: $(hdrdir)/ruby/internal/core/rstring.h
+set_len.o: $(hdrdir)/ruby/internal/core/rstruct.h
+set_len.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+set_len.o: $(hdrdir)/ruby/internal/ctype.h
+set_len.o: $(hdrdir)/ruby/internal/dllexport.h
+set_len.o: $(hdrdir)/ruby/internal/dosish.h
+set_len.o: $(hdrdir)/ruby/internal/error.h
+set_len.o: $(hdrdir)/ruby/internal/eval.h
+set_len.o: $(hdrdir)/ruby/internal/event.h
+set_len.o: $(hdrdir)/ruby/internal/fl_type.h
+set_len.o: $(hdrdir)/ruby/internal/gc.h
+set_len.o: $(hdrdir)/ruby/internal/glob.h
+set_len.o: $(hdrdir)/ruby/internal/globals.h
+set_len.o: $(hdrdir)/ruby/internal/has/attribute.h
+set_len.o: $(hdrdir)/ruby/internal/has/builtin.h
+set_len.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+set_len.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+set_len.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+set_len.o: $(hdrdir)/ruby/internal/has/extension.h
+set_len.o: $(hdrdir)/ruby/internal/has/feature.h
+set_len.o: $(hdrdir)/ruby/internal/has/warning.h
+set_len.o: $(hdrdir)/ruby/internal/intern/array.h
+set_len.o: $(hdrdir)/ruby/internal/intern/bignum.h
+set_len.o: $(hdrdir)/ruby/internal/intern/class.h
+set_len.o: $(hdrdir)/ruby/internal/intern/compar.h
+set_len.o: $(hdrdir)/ruby/internal/intern/complex.h
+set_len.o: $(hdrdir)/ruby/internal/intern/cont.h
+set_len.o: $(hdrdir)/ruby/internal/intern/dir.h
+set_len.o: $(hdrdir)/ruby/internal/intern/enum.h
+set_len.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+set_len.o: $(hdrdir)/ruby/internal/intern/error.h
+set_len.o: $(hdrdir)/ruby/internal/intern/eval.h
+set_len.o: $(hdrdir)/ruby/internal/intern/file.h
+set_len.o: $(hdrdir)/ruby/internal/intern/gc.h
+set_len.o: $(hdrdir)/ruby/internal/intern/hash.h
+set_len.o: $(hdrdir)/ruby/internal/intern/io.h
+set_len.o: $(hdrdir)/ruby/internal/intern/load.h
+set_len.o: $(hdrdir)/ruby/internal/intern/marshal.h
+set_len.o: $(hdrdir)/ruby/internal/intern/numeric.h
+set_len.o: $(hdrdir)/ruby/internal/intern/object.h
+set_len.o: $(hdrdir)/ruby/internal/intern/parse.h
+set_len.o: $(hdrdir)/ruby/internal/intern/proc.h
+set_len.o: $(hdrdir)/ruby/internal/intern/process.h
+set_len.o: $(hdrdir)/ruby/internal/intern/random.h
+set_len.o: $(hdrdir)/ruby/internal/intern/range.h
+set_len.o: $(hdrdir)/ruby/internal/intern/rational.h
+set_len.o: $(hdrdir)/ruby/internal/intern/re.h
+set_len.o: $(hdrdir)/ruby/internal/intern/ruby.h
+set_len.o: $(hdrdir)/ruby/internal/intern/select.h
+set_len.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+set_len.o: $(hdrdir)/ruby/internal/intern/signal.h
+set_len.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+set_len.o: $(hdrdir)/ruby/internal/intern/string.h
+set_len.o: $(hdrdir)/ruby/internal/intern/struct.h
+set_len.o: $(hdrdir)/ruby/internal/intern/thread.h
+set_len.o: $(hdrdir)/ruby/internal/intern/time.h
+set_len.o: $(hdrdir)/ruby/internal/intern/variable.h
+set_len.o: $(hdrdir)/ruby/internal/intern/vm.h
+set_len.o: $(hdrdir)/ruby/internal/interpreter.h
+set_len.o: $(hdrdir)/ruby/internal/iterator.h
+set_len.o: $(hdrdir)/ruby/internal/memory.h
+set_len.o: $(hdrdir)/ruby/internal/method.h
+set_len.o: $(hdrdir)/ruby/internal/module.h
+set_len.o: $(hdrdir)/ruby/internal/newobj.h
+set_len.o: $(hdrdir)/ruby/internal/rgengc.h
+set_len.o: $(hdrdir)/ruby/internal/scan_args.h
+set_len.o: $(hdrdir)/ruby/internal/special_consts.h
+set_len.o: $(hdrdir)/ruby/internal/static_assert.h
+set_len.o: $(hdrdir)/ruby/internal/stdalign.h
+set_len.o: $(hdrdir)/ruby/internal/stdbool.h
+set_len.o: $(hdrdir)/ruby/internal/symbol.h
+set_len.o: $(hdrdir)/ruby/internal/value.h
+set_len.o: $(hdrdir)/ruby/internal/value_type.h
+set_len.o: $(hdrdir)/ruby/internal/variable.h
+set_len.o: $(hdrdir)/ruby/internal/warning_push.h
+set_len.o: $(hdrdir)/ruby/internal/xmalloc.h
set_len.o: $(hdrdir)/ruby/missing.h
set_len.o: $(hdrdir)/ruby/ruby.h
set_len.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/string/enc_str_buf_cat.c b/ext/-test-/string/enc_str_buf_cat.c
index 9ac4a298be..4c1b262e1e 100644
--- a/ext/-test-/string/enc_str_buf_cat.c
+++ b/ext/-test-/string/enc_str_buf_cat.c
@@ -7,8 +7,22 @@ enc_str_buf_cat(VALUE str, VALUE str2)
return rb_enc_str_buf_cat(str, RSTRING_PTR(str2), RSTRING_LEN(str2), rb_enc_get(str2));
}
+static VALUE
+str_conv_enc_opts(VALUE str, VALUE from, VALUE to, VALUE ecflags, VALUE ecopts)
+{
+ rb_encoding *from_enc = NIL_P(from) ? NULL : rb_to_encoding(from);
+ rb_encoding *to_enc = NIL_P(to) ? NULL : rb_to_encoding(to);
+ int flags = NUM2INT(ecflags);
+ if (!NIL_P(ecopts)) {
+ Check_Type(ecopts, T_HASH);
+ OBJ_FREEZE(ecopts);
+ }
+ return rb_str_conv_enc_opts(str, from_enc, to_enc, flags, ecopts);
+}
+
void
Init_string_enc_str_buf_cat(VALUE klass)
{
rb_define_method(klass, "enc_str_buf_cat", enc_str_buf_cat, 1);
+ rb_define_method(klass, "str_conv_enc_opts", str_conv_enc_opts, 4);
}
diff --git a/ext/-test-/string/fstring.c b/ext/-test-/string/fstring.c
index 30120b42f6..64f079251d 100644
--- a/ext/-test-/string/fstring.c
+++ b/ext/-test-/string/fstring.c
@@ -1,4 +1,5 @@
#include "ruby.h"
+#include "ruby/encoding.h"
VALUE rb_fstring(VALUE str);
@@ -8,8 +9,22 @@ bug_s_fstring(VALUE self, VALUE str)
return rb_fstring(str);
}
+VALUE
+bug_s_rb_enc_interned_str(VALUE self, VALUE encoding)
+{
+ return rb_enc_interned_str("foo", 3, NIL_P(encoding) ? NULL : RDATA(encoding)->data);
+}
+
+VALUE
+bug_s_rb_enc_str_new(VALUE self, VALUE encoding)
+{
+ return rb_enc_str_new("foo", 3, NIL_P(encoding) ? NULL : RDATA(encoding)->data);
+}
+
void
Init_string_fstring(VALUE klass)
{
rb_define_singleton_method(klass, "fstring", bug_s_fstring, 1);
+ rb_define_singleton_method(klass, "rb_enc_interned_str", bug_s_rb_enc_interned_str, 1);
+ rb_define_singleton_method(klass, "rb_enc_str_new", bug_s_rb_enc_str_new, 1);
}
diff --git a/ext/-test-/string/normalize.c b/ext/-test-/string/normalize.c
index 0ba1797631..a069288ee8 100644
--- a/ext/-test-/string/normalize.c
+++ b/ext/-test-/string/normalize.c
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "internal/file.h"
#ifdef __APPLE__
static VALUE
diff --git a/ext/-test-/string/qsort.c b/ext/-test-/string/qsort.c
index fb7ea3d8cb..4a641e74e3 100644
--- a/ext/-test-/string/qsort.c
+++ b/ext/-test-/string/qsort.c
@@ -35,22 +35,22 @@ bug_str_qsort_bang(int argc, VALUE *argv, VALUE str)
rb_scan_args(argc, argv, "03", &beg, &len, &size);
l = RSTRING_LEN(str);
if (!NIL_P(beg) && (b = NUM2INT(beg)) < 0 && (b += l) < 0) {
- rb_raise(rb_eArgError, "out of bounds");
+ rb_raise(rb_eArgError, "out of bounds");
}
if (!NIL_P(size) && (s = NUM2INT(size)) < 0) {
- rb_raise(rb_eArgError, "negative size");
+ rb_raise(rb_eArgError, "negative size");
}
if (NIL_P(len) ||
- (((n = NUM2INT(len)) < 0) ?
- (rb_raise(rb_eArgError, "negative length"), 0) :
- (b + n * s > l))) {
- n = (l - b) / s;
+ (((n = NUM2INT(len)) < 0) ?
+ (rb_raise(rb_eArgError, "negative length"), 0) :
+ (b + n * s > l))) {
+ n = (l - b) / s;
}
rb_str_modify(str);
d.enc = rb_enc_get(str);
d.elsize = s;
ruby_qsort(RSTRING_PTR(str) + b, n, s,
- rb_block_given_p() ? cmp_1 : cmp_2, &d);
+ rb_block_given_p() ? cmp_1 : cmp_2, &d);
return str;
}
diff --git a/ext/-test-/string/rb_interned_str.c b/ext/-test-/string/rb_interned_str.c
new file mode 100644
index 0000000000..47643ec249
--- /dev/null
+++ b/ext/-test-/string/rb_interned_str.c
@@ -0,0 +1,14 @@
+#include "ruby.h"
+
+static VALUE
+bug_rb_interned_str_dup(VALUE self, VALUE str)
+{
+ Check_Type(str, T_STRING);
+ return rb_interned_str(RSTRING_PTR(str), RSTRING_LEN(str));
+}
+
+void
+Init_string_rb_interned_str(VALUE klass)
+{
+ rb_define_singleton_method(klass, "rb_interned_str_dup", bug_rb_interned_str_dup, 1);
+}
diff --git a/ext/-test-/string/set_len.c b/ext/-test-/string/set_len.c
index 219cea404c..049da2cdb5 100644
--- a/ext/-test-/string/set_len.c
+++ b/ext/-test-/string/set_len.c
@@ -7,8 +7,18 @@ bug_str_set_len(VALUE str, VALUE len)
return str;
}
+static VALUE
+bug_str_append(VALUE str, VALUE addendum)
+{
+ StringValue(addendum);
+ rb_str_modify_expand(str, RSTRING_LEN(addendum));
+ memcpy(RSTRING_END(str), RSTRING_PTR(addendum), RSTRING_LEN(addendum));
+ return str;
+}
+
void
Init_string_set_len(VALUE klass)
{
rb_define_method(klass, "set_len", bug_str_set_len, 1);
+ rb_define_method(klass, "append", bug_str_append, 1);
}
diff --git a/ext/-test-/struct/depend b/ext/-test-/struct/depend
index 552daf0ac5..920a065216 100644
--- a/ext/-test-/struct/depend
+++ b/ext/-test-/struct/depend
@@ -4,8 +4,156 @@ duplicate.o: $(arch_hdrdir)/ruby/config.h
duplicate.o: $(hdrdir)/ruby.h
duplicate.o: $(hdrdir)/ruby/assert.h
duplicate.o: $(hdrdir)/ruby/backward.h
+duplicate.o: $(hdrdir)/ruby/backward/2/assume.h
+duplicate.o: $(hdrdir)/ruby/backward/2/attributes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/bool.h
+duplicate.o: $(hdrdir)/ruby/backward/2/inttypes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/limits.h
+duplicate.o: $(hdrdir)/ruby/backward/2/long_long.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdalign.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdarg.h
duplicate.o: $(hdrdir)/ruby/defines.h
duplicate.o: $(hdrdir)/ruby/intern.h
+duplicate.o: $(hdrdir)/ruby/internal/abi.h
+duplicate.o: $(hdrdir)/ruby/internal/anyargs.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+duplicate.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+duplicate.o: $(hdrdir)/ruby/internal/assume.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/artificial.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/cold.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/const.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/error.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/format.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/noalias.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/noinline.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/pure.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/restrict.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/warning.h
+duplicate.o: $(hdrdir)/ruby/internal/attr/weakref.h
+duplicate.o: $(hdrdir)/ruby/internal/cast.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+duplicate.o: $(hdrdir)/ruby/internal/compiler_since.h
+duplicate.o: $(hdrdir)/ruby/internal/config.h
+duplicate.o: $(hdrdir)/ruby/internal/constant_p.h
+duplicate.o: $(hdrdir)/ruby/internal/core.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rarray.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rbasic.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rbignum.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rclass.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rdata.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rfile.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rhash.h
+duplicate.o: $(hdrdir)/ruby/internal/core/robject.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rregexp.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rstring.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rstruct.h
+duplicate.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+duplicate.o: $(hdrdir)/ruby/internal/ctype.h
+duplicate.o: $(hdrdir)/ruby/internal/dllexport.h
+duplicate.o: $(hdrdir)/ruby/internal/dosish.h
+duplicate.o: $(hdrdir)/ruby/internal/error.h
+duplicate.o: $(hdrdir)/ruby/internal/eval.h
+duplicate.o: $(hdrdir)/ruby/internal/event.h
+duplicate.o: $(hdrdir)/ruby/internal/fl_type.h
+duplicate.o: $(hdrdir)/ruby/internal/gc.h
+duplicate.o: $(hdrdir)/ruby/internal/glob.h
+duplicate.o: $(hdrdir)/ruby/internal/globals.h
+duplicate.o: $(hdrdir)/ruby/internal/has/attribute.h
+duplicate.o: $(hdrdir)/ruby/internal/has/builtin.h
+duplicate.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+duplicate.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+duplicate.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+duplicate.o: $(hdrdir)/ruby/internal/has/extension.h
+duplicate.o: $(hdrdir)/ruby/internal/has/feature.h
+duplicate.o: $(hdrdir)/ruby/internal/has/warning.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/array.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/bignum.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/class.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/compar.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/complex.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/cont.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/dir.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/enum.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/error.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/eval.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/file.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/gc.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/hash.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/io.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/load.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/marshal.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/numeric.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/object.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/parse.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/proc.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/process.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/random.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/range.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/rational.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/re.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/ruby.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/select.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/signal.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/string.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/struct.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/thread.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/time.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/variable.h
+duplicate.o: $(hdrdir)/ruby/internal/intern/vm.h
+duplicate.o: $(hdrdir)/ruby/internal/interpreter.h
+duplicate.o: $(hdrdir)/ruby/internal/iterator.h
+duplicate.o: $(hdrdir)/ruby/internal/memory.h
+duplicate.o: $(hdrdir)/ruby/internal/method.h
+duplicate.o: $(hdrdir)/ruby/internal/module.h
+duplicate.o: $(hdrdir)/ruby/internal/newobj.h
+duplicate.o: $(hdrdir)/ruby/internal/rgengc.h
+duplicate.o: $(hdrdir)/ruby/internal/scan_args.h
+duplicate.o: $(hdrdir)/ruby/internal/special_consts.h
+duplicate.o: $(hdrdir)/ruby/internal/static_assert.h
+duplicate.o: $(hdrdir)/ruby/internal/stdalign.h
+duplicate.o: $(hdrdir)/ruby/internal/stdbool.h
+duplicate.o: $(hdrdir)/ruby/internal/symbol.h
+duplicate.o: $(hdrdir)/ruby/internal/value.h
+duplicate.o: $(hdrdir)/ruby/internal/value_type.h
+duplicate.o: $(hdrdir)/ruby/internal/variable.h
+duplicate.o: $(hdrdir)/ruby/internal/warning_push.h
+duplicate.o: $(hdrdir)/ruby/internal/xmalloc.h
duplicate.o: $(hdrdir)/ruby/missing.h
duplicate.o: $(hdrdir)/ruby/ruby.h
duplicate.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -28,8 +324,156 @@ len.o: $(arch_hdrdir)/ruby/config.h
len.o: $(hdrdir)/ruby.h
len.o: $(hdrdir)/ruby/assert.h
len.o: $(hdrdir)/ruby/backward.h
+len.o: $(hdrdir)/ruby/backward/2/assume.h
+len.o: $(hdrdir)/ruby/backward/2/attributes.h
+len.o: $(hdrdir)/ruby/backward/2/bool.h
+len.o: $(hdrdir)/ruby/backward/2/inttypes.h
+len.o: $(hdrdir)/ruby/backward/2/limits.h
+len.o: $(hdrdir)/ruby/backward/2/long_long.h
+len.o: $(hdrdir)/ruby/backward/2/stdalign.h
+len.o: $(hdrdir)/ruby/backward/2/stdarg.h
len.o: $(hdrdir)/ruby/defines.h
len.o: $(hdrdir)/ruby/intern.h
+len.o: $(hdrdir)/ruby/internal/abi.h
+len.o: $(hdrdir)/ruby/internal/anyargs.h
+len.o: $(hdrdir)/ruby/internal/arithmetic.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+len.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+len.o: $(hdrdir)/ruby/internal/assume.h
+len.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+len.o: $(hdrdir)/ruby/internal/attr/artificial.h
+len.o: $(hdrdir)/ruby/internal/attr/cold.h
+len.o: $(hdrdir)/ruby/internal/attr/const.h
+len.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+len.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+len.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+len.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+len.o: $(hdrdir)/ruby/internal/attr/error.h
+len.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+len.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+len.o: $(hdrdir)/ruby/internal/attr/format.h
+len.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+len.o: $(hdrdir)/ruby/internal/attr/noalias.h
+len.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+len.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+len.o: $(hdrdir)/ruby/internal/attr/noinline.h
+len.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+len.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+len.o: $(hdrdir)/ruby/internal/attr/pure.h
+len.o: $(hdrdir)/ruby/internal/attr/restrict.h
+len.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+len.o: $(hdrdir)/ruby/internal/attr/warning.h
+len.o: $(hdrdir)/ruby/internal/attr/weakref.h
+len.o: $(hdrdir)/ruby/internal/cast.h
+len.o: $(hdrdir)/ruby/internal/compiler_is.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+len.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+len.o: $(hdrdir)/ruby/internal/compiler_since.h
+len.o: $(hdrdir)/ruby/internal/config.h
+len.o: $(hdrdir)/ruby/internal/constant_p.h
+len.o: $(hdrdir)/ruby/internal/core.h
+len.o: $(hdrdir)/ruby/internal/core/rarray.h
+len.o: $(hdrdir)/ruby/internal/core/rbasic.h
+len.o: $(hdrdir)/ruby/internal/core/rbignum.h
+len.o: $(hdrdir)/ruby/internal/core/rclass.h
+len.o: $(hdrdir)/ruby/internal/core/rdata.h
+len.o: $(hdrdir)/ruby/internal/core/rfile.h
+len.o: $(hdrdir)/ruby/internal/core/rhash.h
+len.o: $(hdrdir)/ruby/internal/core/robject.h
+len.o: $(hdrdir)/ruby/internal/core/rregexp.h
+len.o: $(hdrdir)/ruby/internal/core/rstring.h
+len.o: $(hdrdir)/ruby/internal/core/rstruct.h
+len.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+len.o: $(hdrdir)/ruby/internal/ctype.h
+len.o: $(hdrdir)/ruby/internal/dllexport.h
+len.o: $(hdrdir)/ruby/internal/dosish.h
+len.o: $(hdrdir)/ruby/internal/error.h
+len.o: $(hdrdir)/ruby/internal/eval.h
+len.o: $(hdrdir)/ruby/internal/event.h
+len.o: $(hdrdir)/ruby/internal/fl_type.h
+len.o: $(hdrdir)/ruby/internal/gc.h
+len.o: $(hdrdir)/ruby/internal/glob.h
+len.o: $(hdrdir)/ruby/internal/globals.h
+len.o: $(hdrdir)/ruby/internal/has/attribute.h
+len.o: $(hdrdir)/ruby/internal/has/builtin.h
+len.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+len.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+len.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+len.o: $(hdrdir)/ruby/internal/has/extension.h
+len.o: $(hdrdir)/ruby/internal/has/feature.h
+len.o: $(hdrdir)/ruby/internal/has/warning.h
+len.o: $(hdrdir)/ruby/internal/intern/array.h
+len.o: $(hdrdir)/ruby/internal/intern/bignum.h
+len.o: $(hdrdir)/ruby/internal/intern/class.h
+len.o: $(hdrdir)/ruby/internal/intern/compar.h
+len.o: $(hdrdir)/ruby/internal/intern/complex.h
+len.o: $(hdrdir)/ruby/internal/intern/cont.h
+len.o: $(hdrdir)/ruby/internal/intern/dir.h
+len.o: $(hdrdir)/ruby/internal/intern/enum.h
+len.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+len.o: $(hdrdir)/ruby/internal/intern/error.h
+len.o: $(hdrdir)/ruby/internal/intern/eval.h
+len.o: $(hdrdir)/ruby/internal/intern/file.h
+len.o: $(hdrdir)/ruby/internal/intern/gc.h
+len.o: $(hdrdir)/ruby/internal/intern/hash.h
+len.o: $(hdrdir)/ruby/internal/intern/io.h
+len.o: $(hdrdir)/ruby/internal/intern/load.h
+len.o: $(hdrdir)/ruby/internal/intern/marshal.h
+len.o: $(hdrdir)/ruby/internal/intern/numeric.h
+len.o: $(hdrdir)/ruby/internal/intern/object.h
+len.o: $(hdrdir)/ruby/internal/intern/parse.h
+len.o: $(hdrdir)/ruby/internal/intern/proc.h
+len.o: $(hdrdir)/ruby/internal/intern/process.h
+len.o: $(hdrdir)/ruby/internal/intern/random.h
+len.o: $(hdrdir)/ruby/internal/intern/range.h
+len.o: $(hdrdir)/ruby/internal/intern/rational.h
+len.o: $(hdrdir)/ruby/internal/intern/re.h
+len.o: $(hdrdir)/ruby/internal/intern/ruby.h
+len.o: $(hdrdir)/ruby/internal/intern/select.h
+len.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+len.o: $(hdrdir)/ruby/internal/intern/signal.h
+len.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+len.o: $(hdrdir)/ruby/internal/intern/string.h
+len.o: $(hdrdir)/ruby/internal/intern/struct.h
+len.o: $(hdrdir)/ruby/internal/intern/thread.h
+len.o: $(hdrdir)/ruby/internal/intern/time.h
+len.o: $(hdrdir)/ruby/internal/intern/variable.h
+len.o: $(hdrdir)/ruby/internal/intern/vm.h
+len.o: $(hdrdir)/ruby/internal/interpreter.h
+len.o: $(hdrdir)/ruby/internal/iterator.h
+len.o: $(hdrdir)/ruby/internal/memory.h
+len.o: $(hdrdir)/ruby/internal/method.h
+len.o: $(hdrdir)/ruby/internal/module.h
+len.o: $(hdrdir)/ruby/internal/newobj.h
+len.o: $(hdrdir)/ruby/internal/rgengc.h
+len.o: $(hdrdir)/ruby/internal/scan_args.h
+len.o: $(hdrdir)/ruby/internal/special_consts.h
+len.o: $(hdrdir)/ruby/internal/static_assert.h
+len.o: $(hdrdir)/ruby/internal/stdalign.h
+len.o: $(hdrdir)/ruby/internal/stdbool.h
+len.o: $(hdrdir)/ruby/internal/symbol.h
+len.o: $(hdrdir)/ruby/internal/value.h
+len.o: $(hdrdir)/ruby/internal/value_type.h
+len.o: $(hdrdir)/ruby/internal/variable.h
+len.o: $(hdrdir)/ruby/internal/warning_push.h
+len.o: $(hdrdir)/ruby/internal/xmalloc.h
len.o: $(hdrdir)/ruby/missing.h
len.o: $(hdrdir)/ruby/ruby.h
len.o: $(hdrdir)/ruby/st.h
@@ -40,8 +484,156 @@ member.o: $(arch_hdrdir)/ruby/config.h
member.o: $(hdrdir)/ruby.h
member.o: $(hdrdir)/ruby/assert.h
member.o: $(hdrdir)/ruby/backward.h
+member.o: $(hdrdir)/ruby/backward/2/assume.h
+member.o: $(hdrdir)/ruby/backward/2/attributes.h
+member.o: $(hdrdir)/ruby/backward/2/bool.h
+member.o: $(hdrdir)/ruby/backward/2/inttypes.h
+member.o: $(hdrdir)/ruby/backward/2/limits.h
+member.o: $(hdrdir)/ruby/backward/2/long_long.h
+member.o: $(hdrdir)/ruby/backward/2/stdalign.h
+member.o: $(hdrdir)/ruby/backward/2/stdarg.h
member.o: $(hdrdir)/ruby/defines.h
member.o: $(hdrdir)/ruby/intern.h
+member.o: $(hdrdir)/ruby/internal/abi.h
+member.o: $(hdrdir)/ruby/internal/anyargs.h
+member.o: $(hdrdir)/ruby/internal/arithmetic.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+member.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+member.o: $(hdrdir)/ruby/internal/assume.h
+member.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+member.o: $(hdrdir)/ruby/internal/attr/artificial.h
+member.o: $(hdrdir)/ruby/internal/attr/cold.h
+member.o: $(hdrdir)/ruby/internal/attr/const.h
+member.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+member.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+member.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+member.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+member.o: $(hdrdir)/ruby/internal/attr/error.h
+member.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+member.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+member.o: $(hdrdir)/ruby/internal/attr/format.h
+member.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+member.o: $(hdrdir)/ruby/internal/attr/noalias.h
+member.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+member.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+member.o: $(hdrdir)/ruby/internal/attr/noinline.h
+member.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+member.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+member.o: $(hdrdir)/ruby/internal/attr/pure.h
+member.o: $(hdrdir)/ruby/internal/attr/restrict.h
+member.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+member.o: $(hdrdir)/ruby/internal/attr/warning.h
+member.o: $(hdrdir)/ruby/internal/attr/weakref.h
+member.o: $(hdrdir)/ruby/internal/cast.h
+member.o: $(hdrdir)/ruby/internal/compiler_is.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+member.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+member.o: $(hdrdir)/ruby/internal/compiler_since.h
+member.o: $(hdrdir)/ruby/internal/config.h
+member.o: $(hdrdir)/ruby/internal/constant_p.h
+member.o: $(hdrdir)/ruby/internal/core.h
+member.o: $(hdrdir)/ruby/internal/core/rarray.h
+member.o: $(hdrdir)/ruby/internal/core/rbasic.h
+member.o: $(hdrdir)/ruby/internal/core/rbignum.h
+member.o: $(hdrdir)/ruby/internal/core/rclass.h
+member.o: $(hdrdir)/ruby/internal/core/rdata.h
+member.o: $(hdrdir)/ruby/internal/core/rfile.h
+member.o: $(hdrdir)/ruby/internal/core/rhash.h
+member.o: $(hdrdir)/ruby/internal/core/robject.h
+member.o: $(hdrdir)/ruby/internal/core/rregexp.h
+member.o: $(hdrdir)/ruby/internal/core/rstring.h
+member.o: $(hdrdir)/ruby/internal/core/rstruct.h
+member.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+member.o: $(hdrdir)/ruby/internal/ctype.h
+member.o: $(hdrdir)/ruby/internal/dllexport.h
+member.o: $(hdrdir)/ruby/internal/dosish.h
+member.o: $(hdrdir)/ruby/internal/error.h
+member.o: $(hdrdir)/ruby/internal/eval.h
+member.o: $(hdrdir)/ruby/internal/event.h
+member.o: $(hdrdir)/ruby/internal/fl_type.h
+member.o: $(hdrdir)/ruby/internal/gc.h
+member.o: $(hdrdir)/ruby/internal/glob.h
+member.o: $(hdrdir)/ruby/internal/globals.h
+member.o: $(hdrdir)/ruby/internal/has/attribute.h
+member.o: $(hdrdir)/ruby/internal/has/builtin.h
+member.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+member.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+member.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+member.o: $(hdrdir)/ruby/internal/has/extension.h
+member.o: $(hdrdir)/ruby/internal/has/feature.h
+member.o: $(hdrdir)/ruby/internal/has/warning.h
+member.o: $(hdrdir)/ruby/internal/intern/array.h
+member.o: $(hdrdir)/ruby/internal/intern/bignum.h
+member.o: $(hdrdir)/ruby/internal/intern/class.h
+member.o: $(hdrdir)/ruby/internal/intern/compar.h
+member.o: $(hdrdir)/ruby/internal/intern/complex.h
+member.o: $(hdrdir)/ruby/internal/intern/cont.h
+member.o: $(hdrdir)/ruby/internal/intern/dir.h
+member.o: $(hdrdir)/ruby/internal/intern/enum.h
+member.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+member.o: $(hdrdir)/ruby/internal/intern/error.h
+member.o: $(hdrdir)/ruby/internal/intern/eval.h
+member.o: $(hdrdir)/ruby/internal/intern/file.h
+member.o: $(hdrdir)/ruby/internal/intern/gc.h
+member.o: $(hdrdir)/ruby/internal/intern/hash.h
+member.o: $(hdrdir)/ruby/internal/intern/io.h
+member.o: $(hdrdir)/ruby/internal/intern/load.h
+member.o: $(hdrdir)/ruby/internal/intern/marshal.h
+member.o: $(hdrdir)/ruby/internal/intern/numeric.h
+member.o: $(hdrdir)/ruby/internal/intern/object.h
+member.o: $(hdrdir)/ruby/internal/intern/parse.h
+member.o: $(hdrdir)/ruby/internal/intern/proc.h
+member.o: $(hdrdir)/ruby/internal/intern/process.h
+member.o: $(hdrdir)/ruby/internal/intern/random.h
+member.o: $(hdrdir)/ruby/internal/intern/range.h
+member.o: $(hdrdir)/ruby/internal/intern/rational.h
+member.o: $(hdrdir)/ruby/internal/intern/re.h
+member.o: $(hdrdir)/ruby/internal/intern/ruby.h
+member.o: $(hdrdir)/ruby/internal/intern/select.h
+member.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+member.o: $(hdrdir)/ruby/internal/intern/signal.h
+member.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+member.o: $(hdrdir)/ruby/internal/intern/string.h
+member.o: $(hdrdir)/ruby/internal/intern/struct.h
+member.o: $(hdrdir)/ruby/internal/intern/thread.h
+member.o: $(hdrdir)/ruby/internal/intern/time.h
+member.o: $(hdrdir)/ruby/internal/intern/variable.h
+member.o: $(hdrdir)/ruby/internal/intern/vm.h
+member.o: $(hdrdir)/ruby/internal/interpreter.h
+member.o: $(hdrdir)/ruby/internal/iterator.h
+member.o: $(hdrdir)/ruby/internal/memory.h
+member.o: $(hdrdir)/ruby/internal/method.h
+member.o: $(hdrdir)/ruby/internal/module.h
+member.o: $(hdrdir)/ruby/internal/newobj.h
+member.o: $(hdrdir)/ruby/internal/rgengc.h
+member.o: $(hdrdir)/ruby/internal/scan_args.h
+member.o: $(hdrdir)/ruby/internal/special_consts.h
+member.o: $(hdrdir)/ruby/internal/static_assert.h
+member.o: $(hdrdir)/ruby/internal/stdalign.h
+member.o: $(hdrdir)/ruby/internal/stdbool.h
+member.o: $(hdrdir)/ruby/internal/symbol.h
+member.o: $(hdrdir)/ruby/internal/value.h
+member.o: $(hdrdir)/ruby/internal/value_type.h
+member.o: $(hdrdir)/ruby/internal/variable.h
+member.o: $(hdrdir)/ruby/internal/warning_push.h
+member.o: $(hdrdir)/ruby/internal/xmalloc.h
member.o: $(hdrdir)/ruby/missing.h
member.o: $(hdrdir)/ruby/ruby.h
member.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/struct/member.c b/ext/-test-/struct/member.c
index 1d404039b4..f5400fe477 100644
--- a/ext/-test-/struct/member.c
+++ b/ext/-test-/struct/member.c
@@ -6,7 +6,7 @@ bug_struct_get(VALUE obj, VALUE name)
ID id = rb_check_id(&name);
if (!id) {
- rb_name_error_str(name, "`%"PRIsVALUE"' is not a struct member", name);
+ rb_name_error_str(name, "`%"PRIsVALUE"' is not a struct member", name);
}
return rb_struct_getmember(obj, id);
}
diff --git a/ext/-test-/symbol/depend b/ext/-test-/symbol/depend
index bccb4afc15..b94e4ce821 100644
--- a/ext/-test-/symbol/depend
+++ b/ext/-test-/symbol/depend
@@ -4,8 +4,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -16,8 +164,156 @@ type.o: $(arch_hdrdir)/ruby/config.h
type.o: $(hdrdir)/ruby.h
type.o: $(hdrdir)/ruby/assert.h
type.o: $(hdrdir)/ruby/backward.h
+type.o: $(hdrdir)/ruby/backward/2/assume.h
+type.o: $(hdrdir)/ruby/backward/2/attributes.h
+type.o: $(hdrdir)/ruby/backward/2/bool.h
+type.o: $(hdrdir)/ruby/backward/2/inttypes.h
+type.o: $(hdrdir)/ruby/backward/2/limits.h
+type.o: $(hdrdir)/ruby/backward/2/long_long.h
+type.o: $(hdrdir)/ruby/backward/2/stdalign.h
+type.o: $(hdrdir)/ruby/backward/2/stdarg.h
type.o: $(hdrdir)/ruby/defines.h
type.o: $(hdrdir)/ruby/intern.h
+type.o: $(hdrdir)/ruby/internal/abi.h
+type.o: $(hdrdir)/ruby/internal/anyargs.h
+type.o: $(hdrdir)/ruby/internal/arithmetic.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+type.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+type.o: $(hdrdir)/ruby/internal/assume.h
+type.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+type.o: $(hdrdir)/ruby/internal/attr/artificial.h
+type.o: $(hdrdir)/ruby/internal/attr/cold.h
+type.o: $(hdrdir)/ruby/internal/attr/const.h
+type.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+type.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+type.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+type.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+type.o: $(hdrdir)/ruby/internal/attr/error.h
+type.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+type.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+type.o: $(hdrdir)/ruby/internal/attr/format.h
+type.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+type.o: $(hdrdir)/ruby/internal/attr/noalias.h
+type.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+type.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+type.o: $(hdrdir)/ruby/internal/attr/noinline.h
+type.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+type.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+type.o: $(hdrdir)/ruby/internal/attr/pure.h
+type.o: $(hdrdir)/ruby/internal/attr/restrict.h
+type.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+type.o: $(hdrdir)/ruby/internal/attr/warning.h
+type.o: $(hdrdir)/ruby/internal/attr/weakref.h
+type.o: $(hdrdir)/ruby/internal/cast.h
+type.o: $(hdrdir)/ruby/internal/compiler_is.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+type.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+type.o: $(hdrdir)/ruby/internal/compiler_since.h
+type.o: $(hdrdir)/ruby/internal/config.h
+type.o: $(hdrdir)/ruby/internal/constant_p.h
+type.o: $(hdrdir)/ruby/internal/core.h
+type.o: $(hdrdir)/ruby/internal/core/rarray.h
+type.o: $(hdrdir)/ruby/internal/core/rbasic.h
+type.o: $(hdrdir)/ruby/internal/core/rbignum.h
+type.o: $(hdrdir)/ruby/internal/core/rclass.h
+type.o: $(hdrdir)/ruby/internal/core/rdata.h
+type.o: $(hdrdir)/ruby/internal/core/rfile.h
+type.o: $(hdrdir)/ruby/internal/core/rhash.h
+type.o: $(hdrdir)/ruby/internal/core/robject.h
+type.o: $(hdrdir)/ruby/internal/core/rregexp.h
+type.o: $(hdrdir)/ruby/internal/core/rstring.h
+type.o: $(hdrdir)/ruby/internal/core/rstruct.h
+type.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+type.o: $(hdrdir)/ruby/internal/ctype.h
+type.o: $(hdrdir)/ruby/internal/dllexport.h
+type.o: $(hdrdir)/ruby/internal/dosish.h
+type.o: $(hdrdir)/ruby/internal/error.h
+type.o: $(hdrdir)/ruby/internal/eval.h
+type.o: $(hdrdir)/ruby/internal/event.h
+type.o: $(hdrdir)/ruby/internal/fl_type.h
+type.o: $(hdrdir)/ruby/internal/gc.h
+type.o: $(hdrdir)/ruby/internal/glob.h
+type.o: $(hdrdir)/ruby/internal/globals.h
+type.o: $(hdrdir)/ruby/internal/has/attribute.h
+type.o: $(hdrdir)/ruby/internal/has/builtin.h
+type.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+type.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+type.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+type.o: $(hdrdir)/ruby/internal/has/extension.h
+type.o: $(hdrdir)/ruby/internal/has/feature.h
+type.o: $(hdrdir)/ruby/internal/has/warning.h
+type.o: $(hdrdir)/ruby/internal/intern/array.h
+type.o: $(hdrdir)/ruby/internal/intern/bignum.h
+type.o: $(hdrdir)/ruby/internal/intern/class.h
+type.o: $(hdrdir)/ruby/internal/intern/compar.h
+type.o: $(hdrdir)/ruby/internal/intern/complex.h
+type.o: $(hdrdir)/ruby/internal/intern/cont.h
+type.o: $(hdrdir)/ruby/internal/intern/dir.h
+type.o: $(hdrdir)/ruby/internal/intern/enum.h
+type.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+type.o: $(hdrdir)/ruby/internal/intern/error.h
+type.o: $(hdrdir)/ruby/internal/intern/eval.h
+type.o: $(hdrdir)/ruby/internal/intern/file.h
+type.o: $(hdrdir)/ruby/internal/intern/gc.h
+type.o: $(hdrdir)/ruby/internal/intern/hash.h
+type.o: $(hdrdir)/ruby/internal/intern/io.h
+type.o: $(hdrdir)/ruby/internal/intern/load.h
+type.o: $(hdrdir)/ruby/internal/intern/marshal.h
+type.o: $(hdrdir)/ruby/internal/intern/numeric.h
+type.o: $(hdrdir)/ruby/internal/intern/object.h
+type.o: $(hdrdir)/ruby/internal/intern/parse.h
+type.o: $(hdrdir)/ruby/internal/intern/proc.h
+type.o: $(hdrdir)/ruby/internal/intern/process.h
+type.o: $(hdrdir)/ruby/internal/intern/random.h
+type.o: $(hdrdir)/ruby/internal/intern/range.h
+type.o: $(hdrdir)/ruby/internal/intern/rational.h
+type.o: $(hdrdir)/ruby/internal/intern/re.h
+type.o: $(hdrdir)/ruby/internal/intern/ruby.h
+type.o: $(hdrdir)/ruby/internal/intern/select.h
+type.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+type.o: $(hdrdir)/ruby/internal/intern/signal.h
+type.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+type.o: $(hdrdir)/ruby/internal/intern/string.h
+type.o: $(hdrdir)/ruby/internal/intern/struct.h
+type.o: $(hdrdir)/ruby/internal/intern/thread.h
+type.o: $(hdrdir)/ruby/internal/intern/time.h
+type.o: $(hdrdir)/ruby/internal/intern/variable.h
+type.o: $(hdrdir)/ruby/internal/intern/vm.h
+type.o: $(hdrdir)/ruby/internal/interpreter.h
+type.o: $(hdrdir)/ruby/internal/iterator.h
+type.o: $(hdrdir)/ruby/internal/memory.h
+type.o: $(hdrdir)/ruby/internal/method.h
+type.o: $(hdrdir)/ruby/internal/module.h
+type.o: $(hdrdir)/ruby/internal/newobj.h
+type.o: $(hdrdir)/ruby/internal/rgengc.h
+type.o: $(hdrdir)/ruby/internal/scan_args.h
+type.o: $(hdrdir)/ruby/internal/special_consts.h
+type.o: $(hdrdir)/ruby/internal/static_assert.h
+type.o: $(hdrdir)/ruby/internal/stdalign.h
+type.o: $(hdrdir)/ruby/internal/stdbool.h
+type.o: $(hdrdir)/ruby/internal/symbol.h
+type.o: $(hdrdir)/ruby/internal/value.h
+type.o: $(hdrdir)/ruby/internal/value_type.h
+type.o: $(hdrdir)/ruby/internal/variable.h
+type.o: $(hdrdir)/ruby/internal/warning_push.h
+type.o: $(hdrdir)/ruby/internal/xmalloc.h
type.o: $(hdrdir)/ruby/missing.h
type.o: $(hdrdir)/ruby/ruby.h
type.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/symbol/type.c b/ext/-test-/symbol/type.c
index e51e09eb26..8d0e647340 100644
--- a/ext/-test-/symbol/type.c
+++ b/ext/-test-/symbol/type.c
@@ -2,12 +2,12 @@
#ifdef HAVE_RB_IS_CONST_NAME
# define get_symbol_type(type, t, name) do { \
- ID id = rb_check_id(&name); \
- t = (id ? rb_is_##type##_id(id) : rb_is_##type##_name(name)); \
+ ID id = rb_check_id(&name); \
+ t = (id ? rb_is_##type##_id(id) : rb_is_##type##_name(name)); \
} while (0)
#else
# define get_symbol_type(type, t, name) do { \
- t = rb_is_##type##_id(rb_to_id(name)); \
+ t = rb_is_##type##_id(rb_to_id(name)); \
} while (0)
#endif
diff --git a/ext/-test-/thread/instrumentation/depend b/ext/-test-/thread/instrumentation/depend
new file mode 100644
index 0000000000..e2fcd060d8
--- /dev/null
+++ b/ext/-test-/thread/instrumentation/depend
@@ -0,0 +1,164 @@
+# AUTOGENERATED DEPENDENCIES START
+instrumentation.o: $(RUBY_EXTCONF_H)
+instrumentation.o: $(arch_hdrdir)/ruby/config.h
+instrumentation.o: $(hdrdir)/ruby/assert.h
+instrumentation.o: $(hdrdir)/ruby/atomic.h
+instrumentation.o: $(hdrdir)/ruby/backward.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/assume.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/attributes.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/bool.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/inttypes.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/limits.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/long_long.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/stdalign.h
+instrumentation.o: $(hdrdir)/ruby/backward/2/stdarg.h
+instrumentation.o: $(hdrdir)/ruby/defines.h
+instrumentation.o: $(hdrdir)/ruby/intern.h
+instrumentation.o: $(hdrdir)/ruby/internal/abi.h
+instrumentation.o: $(hdrdir)/ruby/internal/anyargs.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+instrumentation.o: $(hdrdir)/ruby/internal/assume.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/artificial.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/cold.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/const.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/error.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/format.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/noalias.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/noinline.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/pure.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/restrict.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/warning.h
+instrumentation.o: $(hdrdir)/ruby/internal/attr/weakref.h
+instrumentation.o: $(hdrdir)/ruby/internal/cast.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+instrumentation.o: $(hdrdir)/ruby/internal/compiler_since.h
+instrumentation.o: $(hdrdir)/ruby/internal/config.h
+instrumentation.o: $(hdrdir)/ruby/internal/constant_p.h
+instrumentation.o: $(hdrdir)/ruby/internal/core.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rarray.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rbasic.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rbignum.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rclass.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rdata.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rfile.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rhash.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/robject.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rregexp.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rstring.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rstruct.h
+instrumentation.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+instrumentation.o: $(hdrdir)/ruby/internal/ctype.h
+instrumentation.o: $(hdrdir)/ruby/internal/dllexport.h
+instrumentation.o: $(hdrdir)/ruby/internal/dosish.h
+instrumentation.o: $(hdrdir)/ruby/internal/error.h
+instrumentation.o: $(hdrdir)/ruby/internal/eval.h
+instrumentation.o: $(hdrdir)/ruby/internal/event.h
+instrumentation.o: $(hdrdir)/ruby/internal/fl_type.h
+instrumentation.o: $(hdrdir)/ruby/internal/gc.h
+instrumentation.o: $(hdrdir)/ruby/internal/glob.h
+instrumentation.o: $(hdrdir)/ruby/internal/globals.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/attribute.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/builtin.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/extension.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/feature.h
+instrumentation.o: $(hdrdir)/ruby/internal/has/warning.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/array.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/bignum.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/class.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/compar.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/complex.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/cont.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/dir.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/enum.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/error.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/eval.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/file.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/gc.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/hash.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/io.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/load.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/marshal.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/numeric.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/object.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/parse.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/proc.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/process.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/random.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/range.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/rational.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/re.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/ruby.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/select.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/signal.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/string.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/struct.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/thread.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/time.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/variable.h
+instrumentation.o: $(hdrdir)/ruby/internal/intern/vm.h
+instrumentation.o: $(hdrdir)/ruby/internal/interpreter.h
+instrumentation.o: $(hdrdir)/ruby/internal/iterator.h
+instrumentation.o: $(hdrdir)/ruby/internal/memory.h
+instrumentation.o: $(hdrdir)/ruby/internal/method.h
+instrumentation.o: $(hdrdir)/ruby/internal/module.h
+instrumentation.o: $(hdrdir)/ruby/internal/newobj.h
+instrumentation.o: $(hdrdir)/ruby/internal/rgengc.h
+instrumentation.o: $(hdrdir)/ruby/internal/scan_args.h
+instrumentation.o: $(hdrdir)/ruby/internal/special_consts.h
+instrumentation.o: $(hdrdir)/ruby/internal/static_assert.h
+instrumentation.o: $(hdrdir)/ruby/internal/stdalign.h
+instrumentation.o: $(hdrdir)/ruby/internal/stdbool.h
+instrumentation.o: $(hdrdir)/ruby/internal/symbol.h
+instrumentation.o: $(hdrdir)/ruby/internal/value.h
+instrumentation.o: $(hdrdir)/ruby/internal/value_type.h
+instrumentation.o: $(hdrdir)/ruby/internal/variable.h
+instrumentation.o: $(hdrdir)/ruby/internal/warning_push.h
+instrumentation.o: $(hdrdir)/ruby/internal/xmalloc.h
+instrumentation.o: $(hdrdir)/ruby/missing.h
+instrumentation.o: $(hdrdir)/ruby/ruby.h
+instrumentation.o: $(hdrdir)/ruby/st.h
+instrumentation.o: $(hdrdir)/ruby/subst.h
+instrumentation.o: $(hdrdir)/ruby/thread.h
+instrumentation.o: $(hdrdir)/ruby/thread_native.h
+instrumentation.o: instrumentation.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/thread/instrumentation/extconf.rb b/ext/-test-/thread/instrumentation/extconf.rb
new file mode 100644
index 0000000000..a48ba3c045
--- /dev/null
+++ b/ext/-test-/thread/instrumentation/extconf.rb
@@ -0,0 +1,2 @@
+# frozen_string_literal: false
+create_makefile("-test-/thread/instrumentation")
diff --git a/ext/-test-/thread/instrumentation/instrumentation.c b/ext/-test-/thread/instrumentation/instrumentation.c
new file mode 100644
index 0000000000..d2a2c2740b
--- /dev/null
+++ b/ext/-test-/thread/instrumentation/instrumentation.c
@@ -0,0 +1,141 @@
+#include "ruby/ruby.h"
+#include "ruby/atomic.h"
+#include "ruby/thread.h"
+
+static rb_atomic_t started_count = 0;
+static rb_atomic_t ready_count = 0;
+static rb_atomic_t resumed_count = 0;
+static rb_atomic_t suspended_count = 0;
+static rb_atomic_t exited_count = 0;
+
+#if __STDC_VERSION__ >= 201112
+ #define RB_THREAD_LOCAL_SPECIFIER _Thread_local
+#elif defined(__GNUC__) && !defined(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)
+ /* note that ICC (linux) and Clang are covered by __GNUC__ */
+ #define RB_THREAD_LOCAL_SPECIFIER __thread
+#else
+ #define RB_THREAD_LOCAL_SPECIFIER
+#endif
+
+static RB_THREAD_LOCAL_SPECIFIER unsigned int local_ready_count = 0;
+static RB_THREAD_LOCAL_SPECIFIER unsigned int local_resumed_count = 0;
+static RB_THREAD_LOCAL_SPECIFIER unsigned int local_suspended_count = 0;
+
+static void
+ex_callback(rb_event_flag_t event, const rb_internal_thread_event_data_t *event_data, void *user_data)
+{
+ switch (event) {
+ case RUBY_INTERNAL_THREAD_EVENT_STARTED:
+ RUBY_ATOMIC_INC(started_count);
+ break;
+ case RUBY_INTERNAL_THREAD_EVENT_READY:
+ RUBY_ATOMIC_INC(ready_count);
+ local_ready_count++;
+ break;
+ case RUBY_INTERNAL_THREAD_EVENT_RESUMED:
+ RUBY_ATOMIC_INC(resumed_count);
+ local_resumed_count++;
+ break;
+ case RUBY_INTERNAL_THREAD_EVENT_SUSPENDED:
+ RUBY_ATOMIC_INC(suspended_count);
+ local_suspended_count++;
+ break;
+ case RUBY_INTERNAL_THREAD_EVENT_EXITED:
+ RUBY_ATOMIC_INC(exited_count);
+ break;
+ }
+}
+
+static rb_internal_thread_event_hook_t * single_hook = NULL;
+
+static VALUE
+thread_counters(VALUE thread)
+{
+ VALUE array = rb_ary_new2(5);
+ rb_ary_push(array, UINT2NUM(started_count));
+ rb_ary_push(array, UINT2NUM(ready_count));
+ rb_ary_push(array, UINT2NUM(resumed_count));
+ rb_ary_push(array, UINT2NUM(suspended_count));
+ rb_ary_push(array, UINT2NUM(exited_count));
+ return array;
+}
+
+static VALUE
+thread_local_counters(VALUE thread)
+{
+ VALUE array = rb_ary_new2(3);
+ rb_ary_push(array, UINT2NUM(local_ready_count));
+ rb_ary_push(array, UINT2NUM(local_resumed_count));
+ rb_ary_push(array, UINT2NUM(local_suspended_count));
+ return array;
+}
+
+static VALUE
+thread_reset_counters(VALUE thread)
+{
+ RUBY_ATOMIC_SET(started_count, 0);
+ RUBY_ATOMIC_SET(ready_count, 0);
+ RUBY_ATOMIC_SET(resumed_count, 0);
+ RUBY_ATOMIC_SET(suspended_count, 0);
+ RUBY_ATOMIC_SET(exited_count, 0);
+ local_ready_count = 0;
+ local_resumed_count = 0;
+ local_suspended_count = 0;
+ return Qtrue;
+}
+
+static VALUE
+thread_register_callback(VALUE thread)
+{
+ single_hook = rb_internal_thread_add_event_hook(
+ ex_callback,
+ RUBY_INTERNAL_THREAD_EVENT_STARTED |
+ RUBY_INTERNAL_THREAD_EVENT_READY |
+ RUBY_INTERNAL_THREAD_EVENT_RESUMED |
+ RUBY_INTERNAL_THREAD_EVENT_SUSPENDED |
+ RUBY_INTERNAL_THREAD_EVENT_EXITED,
+ NULL
+ );
+
+ return Qnil;
+}
+
+static VALUE
+thread_unregister_callback(VALUE thread)
+{
+ if (single_hook) {
+ rb_internal_thread_remove_event_hook(single_hook);
+ single_hook = NULL;
+ }
+
+ return Qnil;
+}
+
+static VALUE
+thread_register_and_unregister_callback(VALUE thread)
+{
+ rb_internal_thread_event_hook_t * hooks[5];
+ for (int i = 0; i < 5; i++) {
+ hooks[i] = rb_internal_thread_add_event_hook(ex_callback, RUBY_INTERNAL_THREAD_EVENT_READY, NULL);
+ }
+
+ if (!rb_internal_thread_remove_event_hook(hooks[4])) return Qfalse;
+ if (!rb_internal_thread_remove_event_hook(hooks[0])) return Qfalse;
+ if (!rb_internal_thread_remove_event_hook(hooks[3])) return Qfalse;
+ if (!rb_internal_thread_remove_event_hook(hooks[2])) return Qfalse;
+ if (!rb_internal_thread_remove_event_hook(hooks[1])) return Qfalse;
+ return Qtrue;
+}
+
+void
+Init_instrumentation(void)
+{
+ VALUE mBug = rb_define_module("Bug");
+ VALUE klass = rb_define_module_under(mBug, "ThreadInstrumentation");
+ rb_define_singleton_method(klass, "counters", thread_counters, 0);
+ rb_define_singleton_method(klass, "local_counters", thread_local_counters, 0);
+ rb_define_singleton_method(klass, "reset_counters", thread_reset_counters, 0);
+ rb_define_singleton_method(klass, "register_callback", thread_register_callback, 0);
+ rb_define_singleton_method(klass, "unregister_callback", thread_unregister_callback, 0);
+ rb_define_singleton_method(klass, "register_and_unregister_callbacks", thread_register_and_unregister_callback, 0);
+}
diff --git a/ext/-test-/thread_fd/depend b/ext/-test-/thread_fd/depend
new file mode 100644
index 0000000000..ecf738108a
--- /dev/null
+++ b/ext/-test-/thread_fd/depend
@@ -0,0 +1,161 @@
+# AUTOGENERATED DEPENDENCIES START
+thread_fd.o: $(RUBY_EXTCONF_H)
+thread_fd.o: $(arch_hdrdir)/ruby/config.h
+thread_fd.o: $(hdrdir)/ruby/assert.h
+thread_fd.o: $(hdrdir)/ruby/backward.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/assume.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/bool.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/limits.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
+thread_fd.o: $(hdrdir)/ruby/defines.h
+thread_fd.o: $(hdrdir)/ruby/intern.h
+thread_fd.o: $(hdrdir)/ruby/internal/abi.h
+thread_fd.o: $(hdrdir)/ruby/internal/anyargs.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+thread_fd.o: $(hdrdir)/ruby/internal/assume.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/artificial.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/cold.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/const.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/error.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/format.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/noalias.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/noinline.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/pure.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/restrict.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/warning.h
+thread_fd.o: $(hdrdir)/ruby/internal/attr/weakref.h
+thread_fd.o: $(hdrdir)/ruby/internal/cast.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+thread_fd.o: $(hdrdir)/ruby/internal/compiler_since.h
+thread_fd.o: $(hdrdir)/ruby/internal/config.h
+thread_fd.o: $(hdrdir)/ruby/internal/constant_p.h
+thread_fd.o: $(hdrdir)/ruby/internal/core.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rarray.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rbasic.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rbignum.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rclass.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rdata.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rfile.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rhash.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/robject.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rregexp.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rstring.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rstruct.h
+thread_fd.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+thread_fd.o: $(hdrdir)/ruby/internal/ctype.h
+thread_fd.o: $(hdrdir)/ruby/internal/dllexport.h
+thread_fd.o: $(hdrdir)/ruby/internal/dosish.h
+thread_fd.o: $(hdrdir)/ruby/internal/error.h
+thread_fd.o: $(hdrdir)/ruby/internal/eval.h
+thread_fd.o: $(hdrdir)/ruby/internal/event.h
+thread_fd.o: $(hdrdir)/ruby/internal/fl_type.h
+thread_fd.o: $(hdrdir)/ruby/internal/gc.h
+thread_fd.o: $(hdrdir)/ruby/internal/glob.h
+thread_fd.o: $(hdrdir)/ruby/internal/globals.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/attribute.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/builtin.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/extension.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/feature.h
+thread_fd.o: $(hdrdir)/ruby/internal/has/warning.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/array.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/bignum.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/class.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/compar.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/complex.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/cont.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/dir.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/enum.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/error.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/eval.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/file.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/gc.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/hash.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/io.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/load.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/marshal.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/numeric.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/object.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/parse.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/proc.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/process.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/random.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/range.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/rational.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/re.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/ruby.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/select.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/signal.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/string.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/struct.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/thread.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/time.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/variable.h
+thread_fd.o: $(hdrdir)/ruby/internal/intern/vm.h
+thread_fd.o: $(hdrdir)/ruby/internal/interpreter.h
+thread_fd.o: $(hdrdir)/ruby/internal/iterator.h
+thread_fd.o: $(hdrdir)/ruby/internal/memory.h
+thread_fd.o: $(hdrdir)/ruby/internal/method.h
+thread_fd.o: $(hdrdir)/ruby/internal/module.h
+thread_fd.o: $(hdrdir)/ruby/internal/newobj.h
+thread_fd.o: $(hdrdir)/ruby/internal/rgengc.h
+thread_fd.o: $(hdrdir)/ruby/internal/scan_args.h
+thread_fd.o: $(hdrdir)/ruby/internal/special_consts.h
+thread_fd.o: $(hdrdir)/ruby/internal/static_assert.h
+thread_fd.o: $(hdrdir)/ruby/internal/stdalign.h
+thread_fd.o: $(hdrdir)/ruby/internal/stdbool.h
+thread_fd.o: $(hdrdir)/ruby/internal/symbol.h
+thread_fd.o: $(hdrdir)/ruby/internal/value.h
+thread_fd.o: $(hdrdir)/ruby/internal/value_type.h
+thread_fd.o: $(hdrdir)/ruby/internal/variable.h
+thread_fd.o: $(hdrdir)/ruby/internal/warning_push.h
+thread_fd.o: $(hdrdir)/ruby/internal/xmalloc.h
+thread_fd.o: $(hdrdir)/ruby/missing.h
+thread_fd.o: $(hdrdir)/ruby/ruby.h
+thread_fd.o: $(hdrdir)/ruby/st.h
+thread_fd.o: $(hdrdir)/ruby/subst.h
+thread_fd.o: thread_fd.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/thread_fd/extconf.rb b/ext/-test-/thread_fd/extconf.rb
new file mode 100644
index 0000000000..a8bbe9d169
--- /dev/null
+++ b/ext/-test-/thread_fd/extconf.rb
@@ -0,0 +1,2 @@
+# frozen_string_literal: true
+create_makefile('-test-/thread_fd')
diff --git a/ext/-test-/thread_fd/thread_fd.c b/ext/-test-/thread_fd/thread_fd.c
new file mode 100644
index 0000000000..042b799dc8
--- /dev/null
+++ b/ext/-test-/thread_fd/thread_fd.c
@@ -0,0 +1,30 @@
+#include "ruby/ruby.h"
+
+static VALUE
+thread_fd_close(VALUE ign, VALUE fd)
+{
+ rb_thread_fd_close(NUM2INT(fd));
+ return Qnil;
+}
+
+static VALUE
+thread_fd_wait(VALUE ign, VALUE fd)
+{
+ int ret = rb_thread_wait_fd(NUM2INT(fd));
+ return INT2NUM(ret);
+}
+
+static VALUE
+thread_fd_writable(VALUE ign, VALUE fd)
+{
+ int ret = rb_thread_fd_writable(NUM2INT(fd));
+ return INT2NUM(ret);
+}
+
+void
+Init_thread_fd(void)
+{
+ rb_define_singleton_method(rb_cIO, "thread_fd_close", thread_fd_close, 1);
+ rb_define_singleton_method(rb_cIO, "thread_fd_wait", thread_fd_wait, 1);
+ rb_define_singleton_method(rb_cIO, "thread_fd_writable", thread_fd_writable, 1);
+}
diff --git a/ext/-test-/thread_fd_close/depend b/ext/-test-/thread_fd_close/depend
deleted file mode 100644
index 8c49c2d4fe..0000000000
--- a/ext/-test-/thread_fd_close/depend
+++ /dev/null
@@ -1,13 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-thread_fd_close.o: $(RUBY_EXTCONF_H)
-thread_fd_close.o: $(arch_hdrdir)/ruby/config.h
-thread_fd_close.o: $(hdrdir)/ruby/assert.h
-thread_fd_close.o: $(hdrdir)/ruby/backward.h
-thread_fd_close.o: $(hdrdir)/ruby/defines.h
-thread_fd_close.o: $(hdrdir)/ruby/intern.h
-thread_fd_close.o: $(hdrdir)/ruby/missing.h
-thread_fd_close.o: $(hdrdir)/ruby/ruby.h
-thread_fd_close.o: $(hdrdir)/ruby/st.h
-thread_fd_close.o: $(hdrdir)/ruby/subst.h
-thread_fd_close.o: thread_fd_close.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/thread_fd_close/extconf.rb b/ext/-test-/thread_fd_close/extconf.rb
deleted file mode 100644
index 0d9694539c..0000000000
--- a/ext/-test-/thread_fd_close/extconf.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# frozen_string_literal: true
-create_makefile('-test-/thread_fd_close')
diff --git a/ext/-test-/thread_fd_close/thread_fd_close.c b/ext/-test-/thread_fd_close/thread_fd_close.c
deleted file mode 100644
index 4fd967c5b3..0000000000
--- a/ext/-test-/thread_fd_close/thread_fd_close.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "ruby/ruby.h"
-
-static VALUE
-thread_fd_close(VALUE ign, VALUE fd)
-{
- rb_thread_fd_close(NUM2INT(fd));
- return Qnil;
-}
-
-void
-Init_thread_fd_close(void)
-{
- rb_define_singleton_method(rb_cIO, "thread_fd_close", thread_fd_close, 1);
-}
diff --git a/ext/-test-/time/depend b/ext/-test-/time/depend
index 2f4b8d1f13..b7d1a2b114 100644
--- a/ext/-test-/time/depend
+++ b/ext/-test-/time/depend
@@ -4,8 +4,156 @@ init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -16,20 +164,321 @@ leap_second.o: $(arch_hdrdir)/ruby/config.h
leap_second.o: $(hdrdir)/ruby.h
leap_second.o: $(hdrdir)/ruby/assert.h
leap_second.o: $(hdrdir)/ruby/backward.h
+leap_second.o: $(hdrdir)/ruby/backward/2/assume.h
+leap_second.o: $(hdrdir)/ruby/backward/2/attributes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/bool.h
+leap_second.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+leap_second.o: $(hdrdir)/ruby/backward/2/inttypes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/limits.h
+leap_second.o: $(hdrdir)/ruby/backward/2/long_long.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdalign.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdarg.h
leap_second.o: $(hdrdir)/ruby/defines.h
leap_second.o: $(hdrdir)/ruby/intern.h
+leap_second.o: $(hdrdir)/ruby/internal/abi.h
+leap_second.o: $(hdrdir)/ruby/internal/anyargs.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+leap_second.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+leap_second.o: $(hdrdir)/ruby/internal/assume.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/artificial.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/cold.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/const.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/error.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/format.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/noalias.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/noinline.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/pure.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/restrict.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/warning.h
+leap_second.o: $(hdrdir)/ruby/internal/attr/weakref.h
+leap_second.o: $(hdrdir)/ruby/internal/cast.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+leap_second.o: $(hdrdir)/ruby/internal/compiler_since.h
+leap_second.o: $(hdrdir)/ruby/internal/config.h
+leap_second.o: $(hdrdir)/ruby/internal/constant_p.h
+leap_second.o: $(hdrdir)/ruby/internal/core.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rarray.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rbasic.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rbignum.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rclass.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rdata.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rfile.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rhash.h
+leap_second.o: $(hdrdir)/ruby/internal/core/robject.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rregexp.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rstring.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rstruct.h
+leap_second.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+leap_second.o: $(hdrdir)/ruby/internal/ctype.h
+leap_second.o: $(hdrdir)/ruby/internal/dllexport.h
+leap_second.o: $(hdrdir)/ruby/internal/dosish.h
+leap_second.o: $(hdrdir)/ruby/internal/error.h
+leap_second.o: $(hdrdir)/ruby/internal/eval.h
+leap_second.o: $(hdrdir)/ruby/internal/event.h
+leap_second.o: $(hdrdir)/ruby/internal/fl_type.h
+leap_second.o: $(hdrdir)/ruby/internal/gc.h
+leap_second.o: $(hdrdir)/ruby/internal/glob.h
+leap_second.o: $(hdrdir)/ruby/internal/globals.h
+leap_second.o: $(hdrdir)/ruby/internal/has/attribute.h
+leap_second.o: $(hdrdir)/ruby/internal/has/builtin.h
+leap_second.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+leap_second.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+leap_second.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+leap_second.o: $(hdrdir)/ruby/internal/has/extension.h
+leap_second.o: $(hdrdir)/ruby/internal/has/feature.h
+leap_second.o: $(hdrdir)/ruby/internal/has/warning.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/array.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/bignum.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/class.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/compar.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/complex.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/cont.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/dir.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/enum.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/error.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/eval.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/file.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/gc.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/hash.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/io.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/load.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/marshal.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/numeric.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/object.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/parse.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/proc.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/process.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/random.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/range.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/rational.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/re.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/ruby.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/select.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/signal.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/string.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/struct.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/thread.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/time.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/variable.h
+leap_second.o: $(hdrdir)/ruby/internal/intern/vm.h
+leap_second.o: $(hdrdir)/ruby/internal/interpreter.h
+leap_second.o: $(hdrdir)/ruby/internal/iterator.h
+leap_second.o: $(hdrdir)/ruby/internal/memory.h
+leap_second.o: $(hdrdir)/ruby/internal/method.h
+leap_second.o: $(hdrdir)/ruby/internal/module.h
+leap_second.o: $(hdrdir)/ruby/internal/newobj.h
+leap_second.o: $(hdrdir)/ruby/internal/rgengc.h
+leap_second.o: $(hdrdir)/ruby/internal/scan_args.h
+leap_second.o: $(hdrdir)/ruby/internal/special_consts.h
+leap_second.o: $(hdrdir)/ruby/internal/static_assert.h
+leap_second.o: $(hdrdir)/ruby/internal/stdalign.h
+leap_second.o: $(hdrdir)/ruby/internal/stdbool.h
+leap_second.o: $(hdrdir)/ruby/internal/symbol.h
+leap_second.o: $(hdrdir)/ruby/internal/value.h
+leap_second.o: $(hdrdir)/ruby/internal/value_type.h
+leap_second.o: $(hdrdir)/ruby/internal/variable.h
+leap_second.o: $(hdrdir)/ruby/internal/warning_push.h
+leap_second.o: $(hdrdir)/ruby/internal/xmalloc.h
leap_second.o: $(hdrdir)/ruby/missing.h
leap_second.o: $(hdrdir)/ruby/ruby.h
leap_second.o: $(hdrdir)/ruby/st.h
leap_second.o: $(hdrdir)/ruby/subst.h
+leap_second.o: $(top_srcdir)/internal/bits.h
+leap_second.o: $(top_srcdir)/internal/compilers.h
+leap_second.o: $(top_srcdir)/internal/static_assert.h
+leap_second.o: $(top_srcdir)/internal/time.h
leap_second.o: leap_second.c
new.o: $(RUBY_EXTCONF_H)
new.o: $(arch_hdrdir)/ruby/config.h
new.o: $(hdrdir)/ruby.h
new.o: $(hdrdir)/ruby/assert.h
new.o: $(hdrdir)/ruby/backward.h
+new.o: $(hdrdir)/ruby/backward/2/assume.h
+new.o: $(hdrdir)/ruby/backward/2/attributes.h
+new.o: $(hdrdir)/ruby/backward/2/bool.h
+new.o: $(hdrdir)/ruby/backward/2/inttypes.h
+new.o: $(hdrdir)/ruby/backward/2/limits.h
+new.o: $(hdrdir)/ruby/backward/2/long_long.h
+new.o: $(hdrdir)/ruby/backward/2/stdalign.h
+new.o: $(hdrdir)/ruby/backward/2/stdarg.h
new.o: $(hdrdir)/ruby/defines.h
new.o: $(hdrdir)/ruby/intern.h
+new.o: $(hdrdir)/ruby/internal/abi.h
+new.o: $(hdrdir)/ruby/internal/anyargs.h
+new.o: $(hdrdir)/ruby/internal/arithmetic.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+new.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+new.o: $(hdrdir)/ruby/internal/assume.h
+new.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+new.o: $(hdrdir)/ruby/internal/attr/artificial.h
+new.o: $(hdrdir)/ruby/internal/attr/cold.h
+new.o: $(hdrdir)/ruby/internal/attr/const.h
+new.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+new.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+new.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+new.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+new.o: $(hdrdir)/ruby/internal/attr/error.h
+new.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+new.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+new.o: $(hdrdir)/ruby/internal/attr/format.h
+new.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+new.o: $(hdrdir)/ruby/internal/attr/noalias.h
+new.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+new.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+new.o: $(hdrdir)/ruby/internal/attr/noinline.h
+new.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+new.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+new.o: $(hdrdir)/ruby/internal/attr/pure.h
+new.o: $(hdrdir)/ruby/internal/attr/restrict.h
+new.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+new.o: $(hdrdir)/ruby/internal/attr/warning.h
+new.o: $(hdrdir)/ruby/internal/attr/weakref.h
+new.o: $(hdrdir)/ruby/internal/cast.h
+new.o: $(hdrdir)/ruby/internal/compiler_is.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+new.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+new.o: $(hdrdir)/ruby/internal/compiler_since.h
+new.o: $(hdrdir)/ruby/internal/config.h
+new.o: $(hdrdir)/ruby/internal/constant_p.h
+new.o: $(hdrdir)/ruby/internal/core.h
+new.o: $(hdrdir)/ruby/internal/core/rarray.h
+new.o: $(hdrdir)/ruby/internal/core/rbasic.h
+new.o: $(hdrdir)/ruby/internal/core/rbignum.h
+new.o: $(hdrdir)/ruby/internal/core/rclass.h
+new.o: $(hdrdir)/ruby/internal/core/rdata.h
+new.o: $(hdrdir)/ruby/internal/core/rfile.h
+new.o: $(hdrdir)/ruby/internal/core/rhash.h
+new.o: $(hdrdir)/ruby/internal/core/robject.h
+new.o: $(hdrdir)/ruby/internal/core/rregexp.h
+new.o: $(hdrdir)/ruby/internal/core/rstring.h
+new.o: $(hdrdir)/ruby/internal/core/rstruct.h
+new.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+new.o: $(hdrdir)/ruby/internal/ctype.h
+new.o: $(hdrdir)/ruby/internal/dllexport.h
+new.o: $(hdrdir)/ruby/internal/dosish.h
+new.o: $(hdrdir)/ruby/internal/error.h
+new.o: $(hdrdir)/ruby/internal/eval.h
+new.o: $(hdrdir)/ruby/internal/event.h
+new.o: $(hdrdir)/ruby/internal/fl_type.h
+new.o: $(hdrdir)/ruby/internal/gc.h
+new.o: $(hdrdir)/ruby/internal/glob.h
+new.o: $(hdrdir)/ruby/internal/globals.h
+new.o: $(hdrdir)/ruby/internal/has/attribute.h
+new.o: $(hdrdir)/ruby/internal/has/builtin.h
+new.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+new.o: $(hdrdir)/ruby/internal/has/extension.h
+new.o: $(hdrdir)/ruby/internal/has/feature.h
+new.o: $(hdrdir)/ruby/internal/has/warning.h
+new.o: $(hdrdir)/ruby/internal/intern/array.h
+new.o: $(hdrdir)/ruby/internal/intern/bignum.h
+new.o: $(hdrdir)/ruby/internal/intern/class.h
+new.o: $(hdrdir)/ruby/internal/intern/compar.h
+new.o: $(hdrdir)/ruby/internal/intern/complex.h
+new.o: $(hdrdir)/ruby/internal/intern/cont.h
+new.o: $(hdrdir)/ruby/internal/intern/dir.h
+new.o: $(hdrdir)/ruby/internal/intern/enum.h
+new.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+new.o: $(hdrdir)/ruby/internal/intern/error.h
+new.o: $(hdrdir)/ruby/internal/intern/eval.h
+new.o: $(hdrdir)/ruby/internal/intern/file.h
+new.o: $(hdrdir)/ruby/internal/intern/gc.h
+new.o: $(hdrdir)/ruby/internal/intern/hash.h
+new.o: $(hdrdir)/ruby/internal/intern/io.h
+new.o: $(hdrdir)/ruby/internal/intern/load.h
+new.o: $(hdrdir)/ruby/internal/intern/marshal.h
+new.o: $(hdrdir)/ruby/internal/intern/numeric.h
+new.o: $(hdrdir)/ruby/internal/intern/object.h
+new.o: $(hdrdir)/ruby/internal/intern/parse.h
+new.o: $(hdrdir)/ruby/internal/intern/proc.h
+new.o: $(hdrdir)/ruby/internal/intern/process.h
+new.o: $(hdrdir)/ruby/internal/intern/random.h
+new.o: $(hdrdir)/ruby/internal/intern/range.h
+new.o: $(hdrdir)/ruby/internal/intern/rational.h
+new.o: $(hdrdir)/ruby/internal/intern/re.h
+new.o: $(hdrdir)/ruby/internal/intern/ruby.h
+new.o: $(hdrdir)/ruby/internal/intern/select.h
+new.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+new.o: $(hdrdir)/ruby/internal/intern/signal.h
+new.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+new.o: $(hdrdir)/ruby/internal/intern/string.h
+new.o: $(hdrdir)/ruby/internal/intern/struct.h
+new.o: $(hdrdir)/ruby/internal/intern/thread.h
+new.o: $(hdrdir)/ruby/internal/intern/time.h
+new.o: $(hdrdir)/ruby/internal/intern/variable.h
+new.o: $(hdrdir)/ruby/internal/intern/vm.h
+new.o: $(hdrdir)/ruby/internal/interpreter.h
+new.o: $(hdrdir)/ruby/internal/iterator.h
+new.o: $(hdrdir)/ruby/internal/memory.h
+new.o: $(hdrdir)/ruby/internal/method.h
+new.o: $(hdrdir)/ruby/internal/module.h
+new.o: $(hdrdir)/ruby/internal/newobj.h
+new.o: $(hdrdir)/ruby/internal/rgengc.h
+new.o: $(hdrdir)/ruby/internal/scan_args.h
+new.o: $(hdrdir)/ruby/internal/special_consts.h
+new.o: $(hdrdir)/ruby/internal/static_assert.h
+new.o: $(hdrdir)/ruby/internal/stdalign.h
+new.o: $(hdrdir)/ruby/internal/stdbool.h
+new.o: $(hdrdir)/ruby/internal/symbol.h
+new.o: $(hdrdir)/ruby/internal/value.h
+new.o: $(hdrdir)/ruby/internal/value_type.h
+new.o: $(hdrdir)/ruby/internal/variable.h
+new.o: $(hdrdir)/ruby/internal/warning_push.h
+new.o: $(hdrdir)/ruby/internal/xmalloc.h
new.o: $(hdrdir)/ruby/missing.h
new.o: $(hdrdir)/ruby/ruby.h
new.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/time/leap_second.c b/ext/-test-/time/leap_second.c
index 7eed421b73..ee7011fa97 100644
--- a/ext/-test-/time/leap_second.c
+++ b/ext/-test-/time/leap_second.c
@@ -1,6 +1,6 @@
#include "ruby.h"
+#include "internal/time.h"
-void ruby_reset_leap_second_info(void);
static VALUE
bug_time_s_reset_leap_second_info(VALUE klass)
{
diff --git a/ext/-test-/tracepoint/depend b/ext/-test-/tracepoint/depend
index b811df4472..8e2aa7eab6 100644
--- a/ext/-test-/tracepoint/depend
+++ b/ext/-test-/tracepoint/depend
@@ -3,9 +3,157 @@ gc_hook.o: $(RUBY_EXTCONF_H)
gc_hook.o: $(arch_hdrdir)/ruby/config.h
gc_hook.o: $(hdrdir)/ruby/assert.h
gc_hook.o: $(hdrdir)/ruby/backward.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/assume.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/attributes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/bool.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/inttypes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/limits.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/long_long.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdalign.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdarg.h
gc_hook.o: $(hdrdir)/ruby/debug.h
gc_hook.o: $(hdrdir)/ruby/defines.h
gc_hook.o: $(hdrdir)/ruby/intern.h
+gc_hook.o: $(hdrdir)/ruby/internal/abi.h
+gc_hook.o: $(hdrdir)/ruby/internal/anyargs.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+gc_hook.o: $(hdrdir)/ruby/internal/assume.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/artificial.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/cold.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/const.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/error.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/format.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/noalias.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/noinline.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/pure.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/restrict.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/warning.h
+gc_hook.o: $(hdrdir)/ruby/internal/attr/weakref.h
+gc_hook.o: $(hdrdir)/ruby/internal/cast.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+gc_hook.o: $(hdrdir)/ruby/internal/compiler_since.h
+gc_hook.o: $(hdrdir)/ruby/internal/config.h
+gc_hook.o: $(hdrdir)/ruby/internal/constant_p.h
+gc_hook.o: $(hdrdir)/ruby/internal/core.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rarray.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rbasic.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rbignum.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rclass.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rdata.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rfile.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rhash.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/robject.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rregexp.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rstring.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rstruct.h
+gc_hook.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+gc_hook.o: $(hdrdir)/ruby/internal/ctype.h
+gc_hook.o: $(hdrdir)/ruby/internal/dllexport.h
+gc_hook.o: $(hdrdir)/ruby/internal/dosish.h
+gc_hook.o: $(hdrdir)/ruby/internal/error.h
+gc_hook.o: $(hdrdir)/ruby/internal/eval.h
+gc_hook.o: $(hdrdir)/ruby/internal/event.h
+gc_hook.o: $(hdrdir)/ruby/internal/fl_type.h
+gc_hook.o: $(hdrdir)/ruby/internal/gc.h
+gc_hook.o: $(hdrdir)/ruby/internal/glob.h
+gc_hook.o: $(hdrdir)/ruby/internal/globals.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/attribute.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/builtin.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/extension.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/feature.h
+gc_hook.o: $(hdrdir)/ruby/internal/has/warning.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/array.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/bignum.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/class.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/compar.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/complex.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/cont.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/dir.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/enum.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/error.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/eval.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/file.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/gc.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/hash.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/io.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/load.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/marshal.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/numeric.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/object.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/parse.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/proc.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/process.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/random.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/range.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/rational.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/re.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/ruby.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/select.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/signal.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/string.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/struct.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/thread.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/time.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/variable.h
+gc_hook.o: $(hdrdir)/ruby/internal/intern/vm.h
+gc_hook.o: $(hdrdir)/ruby/internal/interpreter.h
+gc_hook.o: $(hdrdir)/ruby/internal/iterator.h
+gc_hook.o: $(hdrdir)/ruby/internal/memory.h
+gc_hook.o: $(hdrdir)/ruby/internal/method.h
+gc_hook.o: $(hdrdir)/ruby/internal/module.h
+gc_hook.o: $(hdrdir)/ruby/internal/newobj.h
+gc_hook.o: $(hdrdir)/ruby/internal/rgengc.h
+gc_hook.o: $(hdrdir)/ruby/internal/scan_args.h
+gc_hook.o: $(hdrdir)/ruby/internal/special_consts.h
+gc_hook.o: $(hdrdir)/ruby/internal/static_assert.h
+gc_hook.o: $(hdrdir)/ruby/internal/stdalign.h
+gc_hook.o: $(hdrdir)/ruby/internal/stdbool.h
+gc_hook.o: $(hdrdir)/ruby/internal/symbol.h
+gc_hook.o: $(hdrdir)/ruby/internal/value.h
+gc_hook.o: $(hdrdir)/ruby/internal/value_type.h
+gc_hook.o: $(hdrdir)/ruby/internal/variable.h
+gc_hook.o: $(hdrdir)/ruby/internal/warning_push.h
+gc_hook.o: $(hdrdir)/ruby/internal/xmalloc.h
gc_hook.o: $(hdrdir)/ruby/missing.h
gc_hook.o: $(hdrdir)/ruby/ruby.h
gc_hook.o: $(hdrdir)/ruby/st.h
@@ -15,9 +163,157 @@ tracepoint.o: $(RUBY_EXTCONF_H)
tracepoint.o: $(arch_hdrdir)/ruby/config.h
tracepoint.o: $(hdrdir)/ruby/assert.h
tracepoint.o: $(hdrdir)/ruby/backward.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/assume.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/attributes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/bool.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/inttypes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/limits.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/long_long.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdalign.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdarg.h
tracepoint.o: $(hdrdir)/ruby/debug.h
tracepoint.o: $(hdrdir)/ruby/defines.h
tracepoint.o: $(hdrdir)/ruby/intern.h
+tracepoint.o: $(hdrdir)/ruby/internal/abi.h
+tracepoint.o: $(hdrdir)/ruby/internal/anyargs.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+tracepoint.o: $(hdrdir)/ruby/internal/assume.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/artificial.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/cold.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/const.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/error.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/format.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/noalias.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/noinline.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/pure.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/restrict.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/warning.h
+tracepoint.o: $(hdrdir)/ruby/internal/attr/weakref.h
+tracepoint.o: $(hdrdir)/ruby/internal/cast.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+tracepoint.o: $(hdrdir)/ruby/internal/compiler_since.h
+tracepoint.o: $(hdrdir)/ruby/internal/config.h
+tracepoint.o: $(hdrdir)/ruby/internal/constant_p.h
+tracepoint.o: $(hdrdir)/ruby/internal/core.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rarray.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rbasic.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rbignum.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rclass.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rdata.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rfile.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rhash.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/robject.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rregexp.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rstring.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rstruct.h
+tracepoint.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+tracepoint.o: $(hdrdir)/ruby/internal/ctype.h
+tracepoint.o: $(hdrdir)/ruby/internal/dllexport.h
+tracepoint.o: $(hdrdir)/ruby/internal/dosish.h
+tracepoint.o: $(hdrdir)/ruby/internal/error.h
+tracepoint.o: $(hdrdir)/ruby/internal/eval.h
+tracepoint.o: $(hdrdir)/ruby/internal/event.h
+tracepoint.o: $(hdrdir)/ruby/internal/fl_type.h
+tracepoint.o: $(hdrdir)/ruby/internal/gc.h
+tracepoint.o: $(hdrdir)/ruby/internal/glob.h
+tracepoint.o: $(hdrdir)/ruby/internal/globals.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/attribute.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/builtin.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/extension.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/feature.h
+tracepoint.o: $(hdrdir)/ruby/internal/has/warning.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/array.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/bignum.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/class.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/compar.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/complex.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/cont.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/dir.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/enum.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/error.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/eval.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/file.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/gc.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/hash.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/io.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/load.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/marshal.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/numeric.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/object.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/parse.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/proc.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/process.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/random.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/range.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/rational.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/re.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/ruby.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/select.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/signal.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/string.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/struct.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/thread.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/time.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/variable.h
+tracepoint.o: $(hdrdir)/ruby/internal/intern/vm.h
+tracepoint.o: $(hdrdir)/ruby/internal/interpreter.h
+tracepoint.o: $(hdrdir)/ruby/internal/iterator.h
+tracepoint.o: $(hdrdir)/ruby/internal/memory.h
+tracepoint.o: $(hdrdir)/ruby/internal/method.h
+tracepoint.o: $(hdrdir)/ruby/internal/module.h
+tracepoint.o: $(hdrdir)/ruby/internal/newobj.h
+tracepoint.o: $(hdrdir)/ruby/internal/rgengc.h
+tracepoint.o: $(hdrdir)/ruby/internal/scan_args.h
+tracepoint.o: $(hdrdir)/ruby/internal/special_consts.h
+tracepoint.o: $(hdrdir)/ruby/internal/static_assert.h
+tracepoint.o: $(hdrdir)/ruby/internal/stdalign.h
+tracepoint.o: $(hdrdir)/ruby/internal/stdbool.h
+tracepoint.o: $(hdrdir)/ruby/internal/symbol.h
+tracepoint.o: $(hdrdir)/ruby/internal/value.h
+tracepoint.o: $(hdrdir)/ruby/internal/value_type.h
+tracepoint.o: $(hdrdir)/ruby/internal/variable.h
+tracepoint.o: $(hdrdir)/ruby/internal/warning_push.h
+tracepoint.o: $(hdrdir)/ruby/internal/xmalloc.h
tracepoint.o: $(hdrdir)/ruby/missing.h
tracepoint.o: $(hdrdir)/ruby/ruby.h
tracepoint.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/tracepoint/gc_hook.c b/ext/-test-/tracepoint/gc_hook.c
index 2e695a9fba..a3f4e7f68a 100644
--- a/ext/-test-/tracepoint/gc_hook.c
+++ b/ext/-test-/tracepoint/gc_hook.c
@@ -28,12 +28,12 @@ static void
gc_start_end_i(VALUE tpval, void *data)
{
if (0) {
- rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
- fprintf(stderr, "trace: %s\n", rb_tracearg_event_flag(tparg) == RUBY_INTERNAL_EVENT_GC_START ? "gc_start" : "gc_end");
+ rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
+ fprintf(stderr, "trace: %s\n", rb_tracearg_event_flag(tparg) == RUBY_INTERNAL_EVENT_GC_START ? "gc_start" : "gc_end");
}
if (invoking == 0) {
- rb_postponed_job_register(0, invoke_proc, data);
+ rb_postponed_job_register(0, invoke_proc, data);
}
}
@@ -42,25 +42,22 @@ set_gc_hook(VALUE module, VALUE proc, rb_event_flag_t event, const char *tp_str,
{
VALUE tpval;
ID tp_key = rb_intern(tp_str);
- ID proc_key = rb_intern(proc_str);
/* disable previous keys */
if (rb_ivar_defined(module, tp_key) != 0 &&
- RTEST(tpval = rb_ivar_get(module, tp_key))) {
- rb_tracepoint_disable(tpval);
- rb_ivar_set(module, tp_key, Qnil);
- rb_ivar_set(module, proc_key, Qnil);
+ RTEST(tpval = rb_ivar_get(module, tp_key))) {
+ rb_tracepoint_disable(tpval);
+ rb_ivar_set(module, tp_key, Qnil);
}
if (RTEST(proc)) {
- if (!rb_obj_is_proc(proc)) {
- rb_raise(rb_eTypeError, "trace_func needs to be Proc");
- }
+ if (!rb_obj_is_proc(proc)) {
+ rb_raise(rb_eTypeError, "trace_func needs to be Proc");
+ }
- tpval = rb_tracepoint_new(0, event, gc_start_end_i, (void *)proc);
- rb_ivar_set(module, tp_key, tpval);
- rb_ivar_set(module, proc_key, proc); /* GC guard */
- rb_tracepoint_enable(tpval);
+ tpval = rb_tracepoint_new(0, event, gc_start_end_i, (void *)proc);
+ rb_ivar_set(module, tp_key, tpval);
+ rb_tracepoint_enable(tpval);
}
return proc;
@@ -70,11 +67,19 @@ static VALUE
set_after_gc_start(VALUE module, VALUE proc)
{
return set_gc_hook(module, proc, RUBY_INTERNAL_EVENT_GC_START,
- "__set_after_gc_start_tpval__", "__set_after_gc_start_proc__");
+ "__set_after_gc_start_tpval__", "__set_after_gc_start_proc__");
+}
+
+static VALUE
+start_after_gc_exit(VALUE module, VALUE proc)
+{
+ return set_gc_hook(module, proc, RUBY_INTERNAL_EVENT_GC_EXIT,
+ "__set_after_gc_exit_tpval__", "__set_after_gc_exit_proc__");
}
void
Init_gc_hook(VALUE module)
{
rb_define_module_function(module, "after_gc_start_hook=", set_after_gc_start, 1);
+ rb_define_module_function(module, "after_gc_exit_hook=", start_after_gc_exit, 1);
}
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
index aa8c212f99..2826cc038c 100644
--- a/ext/-test-/tracepoint/tracepoint.c
+++ b/ext/-test-/tracepoint/tracepoint.c
@@ -21,35 +21,35 @@ tracepoint_track_objspace_events_i(VALUE tpval, void *data)
switch (rb_tracearg_event_flag(tparg)) {
case RUBY_INTERNAL_EVENT_NEWOBJ:
- {
- VALUE obj = rb_tracearg_object(tparg);
- if (track->objects_count < objects_max)
- track->objects[track->objects_count++] = obj;
- track->newobj_count++;
- break;
- }
+ {
+ VALUE obj = rb_tracearg_object(tparg);
+ if (track->objects_count < objects_max)
+ track->objects[track->objects_count++] = obj;
+ track->newobj_count++;
+ break;
+ }
case RUBY_INTERNAL_EVENT_FREEOBJ:
- {
- track->free_count++;
- break;
- }
+ {
+ track->free_count++;
+ break;
+ }
case RUBY_INTERNAL_EVENT_GC_START:
- {
- track->gc_start_count++;
- break;
- }
+ {
+ track->gc_start_count++;
+ break;
+ }
case RUBY_INTERNAL_EVENT_GC_END_MARK:
- {
- track->gc_end_mark_count++;
- break;
- }
+ {
+ track->gc_end_mark_count++;
+ break;
+ }
case RUBY_INTERNAL_EVENT_GC_END_SWEEP:
- {
- track->gc_end_sweep_count++;
- break;
- }
+ {
+ track->gc_end_sweep_count++;
+ break;
+ }
default:
- rb_raise(rb_eRuntimeError, "unknown event");
+ rb_raise(rb_eRuntimeError, "unknown event");
}
}
@@ -58,9 +58,9 @@ tracepoint_track_objspace_events(VALUE self)
{
struct tracepoint_track track = {0, 0, 0, 0, 0,};
VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREEOBJ |
- RUBY_INTERNAL_EVENT_GC_START | RUBY_INTERNAL_EVENT_GC_END_MARK |
- RUBY_INTERNAL_EVENT_GC_END_SWEEP,
- tracepoint_track_objspace_events_i, &track);
+ RUBY_INTERNAL_EVENT_GC_START | RUBY_INTERNAL_EVENT_GC_END_MARK |
+ RUBY_INTERNAL_EVENT_GC_END_SWEEP,
+ tracepoint_track_objspace_events_i, &track);
VALUE result = rb_ary_new();
rb_tracepoint_enable(tpval);
diff --git a/ext/-test-/typeddata/depend b/ext/-test-/typeddata/depend
index e0dd0653a8..02f6de6e20 100644
--- a/ext/-test-/typeddata/depend
+++ b/ext/-test-/typeddata/depend
@@ -4,8 +4,156 @@ typeddata.o: $(arch_hdrdir)/ruby/config.h
typeddata.o: $(hdrdir)/ruby.h
typeddata.o: $(hdrdir)/ruby/assert.h
typeddata.o: $(hdrdir)/ruby/backward.h
+typeddata.o: $(hdrdir)/ruby/backward/2/assume.h
+typeddata.o: $(hdrdir)/ruby/backward/2/attributes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/bool.h
+typeddata.o: $(hdrdir)/ruby/backward/2/inttypes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/limits.h
+typeddata.o: $(hdrdir)/ruby/backward/2/long_long.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdalign.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdarg.h
typeddata.o: $(hdrdir)/ruby/defines.h
typeddata.o: $(hdrdir)/ruby/intern.h
+typeddata.o: $(hdrdir)/ruby/internal/abi.h
+typeddata.o: $(hdrdir)/ruby/internal/anyargs.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+typeddata.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+typeddata.o: $(hdrdir)/ruby/internal/assume.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/artificial.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/cold.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/const.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/error.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/format.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/noalias.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/noinline.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/pure.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/restrict.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/warning.h
+typeddata.o: $(hdrdir)/ruby/internal/attr/weakref.h
+typeddata.o: $(hdrdir)/ruby/internal/cast.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+typeddata.o: $(hdrdir)/ruby/internal/compiler_since.h
+typeddata.o: $(hdrdir)/ruby/internal/config.h
+typeddata.o: $(hdrdir)/ruby/internal/constant_p.h
+typeddata.o: $(hdrdir)/ruby/internal/core.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rarray.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rbasic.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rbignum.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rclass.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rdata.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rfile.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rhash.h
+typeddata.o: $(hdrdir)/ruby/internal/core/robject.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rregexp.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rstring.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rstruct.h
+typeddata.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+typeddata.o: $(hdrdir)/ruby/internal/ctype.h
+typeddata.o: $(hdrdir)/ruby/internal/dllexport.h
+typeddata.o: $(hdrdir)/ruby/internal/dosish.h
+typeddata.o: $(hdrdir)/ruby/internal/error.h
+typeddata.o: $(hdrdir)/ruby/internal/eval.h
+typeddata.o: $(hdrdir)/ruby/internal/event.h
+typeddata.o: $(hdrdir)/ruby/internal/fl_type.h
+typeddata.o: $(hdrdir)/ruby/internal/gc.h
+typeddata.o: $(hdrdir)/ruby/internal/glob.h
+typeddata.o: $(hdrdir)/ruby/internal/globals.h
+typeddata.o: $(hdrdir)/ruby/internal/has/attribute.h
+typeddata.o: $(hdrdir)/ruby/internal/has/builtin.h
+typeddata.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+typeddata.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+typeddata.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+typeddata.o: $(hdrdir)/ruby/internal/has/extension.h
+typeddata.o: $(hdrdir)/ruby/internal/has/feature.h
+typeddata.o: $(hdrdir)/ruby/internal/has/warning.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/array.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/bignum.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/class.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/compar.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/complex.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/cont.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/dir.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/enum.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/error.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/eval.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/file.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/gc.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/hash.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/io.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/load.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/marshal.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/numeric.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/object.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/parse.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/proc.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/process.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/random.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/range.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/rational.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/re.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/ruby.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/select.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/signal.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/string.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/struct.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/thread.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/time.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/variable.h
+typeddata.o: $(hdrdir)/ruby/internal/intern/vm.h
+typeddata.o: $(hdrdir)/ruby/internal/interpreter.h
+typeddata.o: $(hdrdir)/ruby/internal/iterator.h
+typeddata.o: $(hdrdir)/ruby/internal/memory.h
+typeddata.o: $(hdrdir)/ruby/internal/method.h
+typeddata.o: $(hdrdir)/ruby/internal/module.h
+typeddata.o: $(hdrdir)/ruby/internal/newobj.h
+typeddata.o: $(hdrdir)/ruby/internal/rgengc.h
+typeddata.o: $(hdrdir)/ruby/internal/scan_args.h
+typeddata.o: $(hdrdir)/ruby/internal/special_consts.h
+typeddata.o: $(hdrdir)/ruby/internal/static_assert.h
+typeddata.o: $(hdrdir)/ruby/internal/stdalign.h
+typeddata.o: $(hdrdir)/ruby/internal/stdbool.h
+typeddata.o: $(hdrdir)/ruby/internal/symbol.h
+typeddata.o: $(hdrdir)/ruby/internal/value.h
+typeddata.o: $(hdrdir)/ruby/internal/value_type.h
+typeddata.o: $(hdrdir)/ruby/internal/variable.h
+typeddata.o: $(hdrdir)/ruby/internal/warning_push.h
+typeddata.o: $(hdrdir)/ruby/internal/xmalloc.h
typeddata.o: $(hdrdir)/ruby/missing.h
typeddata.o: $(hdrdir)/ruby/ruby.h
typeddata.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/typeddata/typeddata.c b/ext/-test-/typeddata/typeddata.c
index ae060960cd..cf3178fd18 100644
--- a/ext/-test-/typeddata/typeddata.c
+++ b/ext/-test-/typeddata/typeddata.c
@@ -2,7 +2,7 @@
static const rb_data_type_t test_data = {
"typed_data",
- {NULL, ruby_xfree, NULL},
+ {0, ruby_xfree, 0},
NULL, NULL,
0/* deferred free */,
};
@@ -27,7 +27,7 @@ test_make(VALUE klass, VALUE num)
unsigned long i, n = NUM2UINT(num);
for (i = 0; i < n; i++) {
- test_alloc(klass);
+ test_alloc(klass);
}
return Qnil;
@@ -37,7 +37,7 @@ void
Init_typeddata(void)
{
VALUE mBug = rb_define_module("Bug");
- VALUE klass = rb_define_class_under(mBug, "TypedData", rb_cData);
+ VALUE klass = rb_define_class_under(mBug, "TypedData", rb_cObject);
rb_define_alloc_func(klass, test_alloc);
rb_define_singleton_method(klass, "check", test_check, 1);
rb_define_singleton_method(klass, "make", test_make, 1);
diff --git a/ext/-test-/vm/at_exit.c b/ext/-test-/vm/at_exit.c
index 6cfbfafa9e..efc439b26a 100644
--- a/ext/-test-/vm/at_exit.c
+++ b/ext/-test-/vm/at_exit.c
@@ -23,14 +23,14 @@ register_at_exit(VALUE self, VALUE t)
{
switch (t) {
case Qtrue:
- ruby_vm_at_exit(print_begin);
- break;
+ ruby_vm_at_exit(print_begin);
+ break;
case Qfalse:
- ruby_vm_at_exit(print_end);
- break;
+ ruby_vm_at_exit(print_end);
+ break;
default:
- ruby_vm_at_exit(do_nothing);
- break;
+ ruby_vm_at_exit(do_nothing);
+ break;
}
return self;
}
diff --git a/ext/-test-/vm/depend b/ext/-test-/vm/depend
index 0f85d69bb0..7f110d48eb 100644
--- a/ext/-test-/vm/depend
+++ b/ext/-test-/vm/depend
@@ -3,8 +3,156 @@ at_exit.o: $(RUBY_EXTCONF_H)
at_exit.o: $(arch_hdrdir)/ruby/config.h
at_exit.o: $(hdrdir)/ruby/assert.h
at_exit.o: $(hdrdir)/ruby/backward.h
+at_exit.o: $(hdrdir)/ruby/backward/2/assume.h
+at_exit.o: $(hdrdir)/ruby/backward/2/attributes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/bool.h
+at_exit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/limits.h
+at_exit.o: $(hdrdir)/ruby/backward/2/long_long.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdarg.h
at_exit.o: $(hdrdir)/ruby/defines.h
at_exit.o: $(hdrdir)/ruby/intern.h
+at_exit.o: $(hdrdir)/ruby/internal/abi.h
+at_exit.o: $(hdrdir)/ruby/internal/anyargs.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+at_exit.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+at_exit.o: $(hdrdir)/ruby/internal/assume.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/artificial.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/cold.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/const.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/error.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/format.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/noalias.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/noinline.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/pure.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/restrict.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/warning.h
+at_exit.o: $(hdrdir)/ruby/internal/attr/weakref.h
+at_exit.o: $(hdrdir)/ruby/internal/cast.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+at_exit.o: $(hdrdir)/ruby/internal/compiler_since.h
+at_exit.o: $(hdrdir)/ruby/internal/config.h
+at_exit.o: $(hdrdir)/ruby/internal/constant_p.h
+at_exit.o: $(hdrdir)/ruby/internal/core.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rarray.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rbasic.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rbignum.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rclass.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rdata.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rfile.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rhash.h
+at_exit.o: $(hdrdir)/ruby/internal/core/robject.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rregexp.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rstring.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rstruct.h
+at_exit.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+at_exit.o: $(hdrdir)/ruby/internal/ctype.h
+at_exit.o: $(hdrdir)/ruby/internal/dllexport.h
+at_exit.o: $(hdrdir)/ruby/internal/dosish.h
+at_exit.o: $(hdrdir)/ruby/internal/error.h
+at_exit.o: $(hdrdir)/ruby/internal/eval.h
+at_exit.o: $(hdrdir)/ruby/internal/event.h
+at_exit.o: $(hdrdir)/ruby/internal/fl_type.h
+at_exit.o: $(hdrdir)/ruby/internal/gc.h
+at_exit.o: $(hdrdir)/ruby/internal/glob.h
+at_exit.o: $(hdrdir)/ruby/internal/globals.h
+at_exit.o: $(hdrdir)/ruby/internal/has/attribute.h
+at_exit.o: $(hdrdir)/ruby/internal/has/builtin.h
+at_exit.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+at_exit.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+at_exit.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+at_exit.o: $(hdrdir)/ruby/internal/has/extension.h
+at_exit.o: $(hdrdir)/ruby/internal/has/feature.h
+at_exit.o: $(hdrdir)/ruby/internal/has/warning.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/array.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/bignum.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/class.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/compar.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/complex.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/cont.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/dir.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/enum.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/error.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/eval.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/file.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/gc.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/hash.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/io.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/load.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/marshal.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/numeric.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/object.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/parse.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/proc.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/process.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/random.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/range.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/rational.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/re.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/ruby.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/select.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/signal.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/string.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/struct.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/thread.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/time.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/variable.h
+at_exit.o: $(hdrdir)/ruby/internal/intern/vm.h
+at_exit.o: $(hdrdir)/ruby/internal/interpreter.h
+at_exit.o: $(hdrdir)/ruby/internal/iterator.h
+at_exit.o: $(hdrdir)/ruby/internal/memory.h
+at_exit.o: $(hdrdir)/ruby/internal/method.h
+at_exit.o: $(hdrdir)/ruby/internal/module.h
+at_exit.o: $(hdrdir)/ruby/internal/newobj.h
+at_exit.o: $(hdrdir)/ruby/internal/rgengc.h
+at_exit.o: $(hdrdir)/ruby/internal/scan_args.h
+at_exit.o: $(hdrdir)/ruby/internal/special_consts.h
+at_exit.o: $(hdrdir)/ruby/internal/static_assert.h
+at_exit.o: $(hdrdir)/ruby/internal/stdalign.h
+at_exit.o: $(hdrdir)/ruby/internal/stdbool.h
+at_exit.o: $(hdrdir)/ruby/internal/symbol.h
+at_exit.o: $(hdrdir)/ruby/internal/value.h
+at_exit.o: $(hdrdir)/ruby/internal/value_type.h
+at_exit.o: $(hdrdir)/ruby/internal/variable.h
+at_exit.o: $(hdrdir)/ruby/internal/warning_push.h
+at_exit.o: $(hdrdir)/ruby/internal/xmalloc.h
at_exit.o: $(hdrdir)/ruby/missing.h
at_exit.o: $(hdrdir)/ruby/ruby.h
at_exit.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/wait/depend b/ext/-test-/wait/depend
new file mode 100644
index 0000000000..e71bda9968
--- /dev/null
+++ b/ext/-test-/wait/depend
@@ -0,0 +1,174 @@
+# AUTOGENERATED DEPENDENCIES START
+wait.o: $(RUBY_EXTCONF_H)
+wait.o: $(arch_hdrdir)/ruby/config.h
+wait.o: $(hdrdir)/ruby/assert.h
+wait.o: $(hdrdir)/ruby/backward.h
+wait.o: $(hdrdir)/ruby/backward/2/assume.h
+wait.o: $(hdrdir)/ruby/backward/2/attributes.h
+wait.o: $(hdrdir)/ruby/backward/2/bool.h
+wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
+wait.o: $(hdrdir)/ruby/backward/2/limits.h
+wait.o: $(hdrdir)/ruby/backward/2/long_long.h
+wait.o: $(hdrdir)/ruby/backward/2/stdalign.h
+wait.o: $(hdrdir)/ruby/backward/2/stdarg.h
+wait.o: $(hdrdir)/ruby/defines.h
+wait.o: $(hdrdir)/ruby/encoding.h
+wait.o: $(hdrdir)/ruby/intern.h
+wait.o: $(hdrdir)/ruby/internal/abi.h
+wait.o: $(hdrdir)/ruby/internal/anyargs.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+wait.o: $(hdrdir)/ruby/internal/assume.h
+wait.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+wait.o: $(hdrdir)/ruby/internal/attr/artificial.h
+wait.o: $(hdrdir)/ruby/internal/attr/cold.h
+wait.o: $(hdrdir)/ruby/internal/attr/const.h
+wait.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+wait.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+wait.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+wait.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+wait.o: $(hdrdir)/ruby/internal/attr/error.h
+wait.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+wait.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+wait.o: $(hdrdir)/ruby/internal/attr/format.h
+wait.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+wait.o: $(hdrdir)/ruby/internal/attr/noalias.h
+wait.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+wait.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+wait.o: $(hdrdir)/ruby/internal/attr/noinline.h
+wait.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+wait.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+wait.o: $(hdrdir)/ruby/internal/attr/pure.h
+wait.o: $(hdrdir)/ruby/internal/attr/restrict.h
+wait.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+wait.o: $(hdrdir)/ruby/internal/attr/warning.h
+wait.o: $(hdrdir)/ruby/internal/attr/weakref.h
+wait.o: $(hdrdir)/ruby/internal/cast.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+wait.o: $(hdrdir)/ruby/internal/compiler_since.h
+wait.o: $(hdrdir)/ruby/internal/config.h
+wait.o: $(hdrdir)/ruby/internal/constant_p.h
+wait.o: $(hdrdir)/ruby/internal/core.h
+wait.o: $(hdrdir)/ruby/internal/core/rarray.h
+wait.o: $(hdrdir)/ruby/internal/core/rbasic.h
+wait.o: $(hdrdir)/ruby/internal/core/rbignum.h
+wait.o: $(hdrdir)/ruby/internal/core/rclass.h
+wait.o: $(hdrdir)/ruby/internal/core/rdata.h
+wait.o: $(hdrdir)/ruby/internal/core/rfile.h
+wait.o: $(hdrdir)/ruby/internal/core/rhash.h
+wait.o: $(hdrdir)/ruby/internal/core/robject.h
+wait.o: $(hdrdir)/ruby/internal/core/rregexp.h
+wait.o: $(hdrdir)/ruby/internal/core/rstring.h
+wait.o: $(hdrdir)/ruby/internal/core/rstruct.h
+wait.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+wait.o: $(hdrdir)/ruby/internal/ctype.h
+wait.o: $(hdrdir)/ruby/internal/dllexport.h
+wait.o: $(hdrdir)/ruby/internal/dosish.h
+wait.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+wait.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+wait.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+wait.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+wait.o: $(hdrdir)/ruby/internal/encoding/re.h
+wait.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+wait.o: $(hdrdir)/ruby/internal/encoding/string.h
+wait.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+wait.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+wait.o: $(hdrdir)/ruby/internal/error.h
+wait.o: $(hdrdir)/ruby/internal/eval.h
+wait.o: $(hdrdir)/ruby/internal/event.h
+wait.o: $(hdrdir)/ruby/internal/fl_type.h
+wait.o: $(hdrdir)/ruby/internal/gc.h
+wait.o: $(hdrdir)/ruby/internal/glob.h
+wait.o: $(hdrdir)/ruby/internal/globals.h
+wait.o: $(hdrdir)/ruby/internal/has/attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/builtin.h
+wait.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/extension.h
+wait.o: $(hdrdir)/ruby/internal/has/feature.h
+wait.o: $(hdrdir)/ruby/internal/has/warning.h
+wait.o: $(hdrdir)/ruby/internal/intern/array.h
+wait.o: $(hdrdir)/ruby/internal/intern/bignum.h
+wait.o: $(hdrdir)/ruby/internal/intern/class.h
+wait.o: $(hdrdir)/ruby/internal/intern/compar.h
+wait.o: $(hdrdir)/ruby/internal/intern/complex.h
+wait.o: $(hdrdir)/ruby/internal/intern/cont.h
+wait.o: $(hdrdir)/ruby/internal/intern/dir.h
+wait.o: $(hdrdir)/ruby/internal/intern/enum.h
+wait.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+wait.o: $(hdrdir)/ruby/internal/intern/error.h
+wait.o: $(hdrdir)/ruby/internal/intern/eval.h
+wait.o: $(hdrdir)/ruby/internal/intern/file.h
+wait.o: $(hdrdir)/ruby/internal/intern/gc.h
+wait.o: $(hdrdir)/ruby/internal/intern/hash.h
+wait.o: $(hdrdir)/ruby/internal/intern/io.h
+wait.o: $(hdrdir)/ruby/internal/intern/load.h
+wait.o: $(hdrdir)/ruby/internal/intern/marshal.h
+wait.o: $(hdrdir)/ruby/internal/intern/numeric.h
+wait.o: $(hdrdir)/ruby/internal/intern/object.h
+wait.o: $(hdrdir)/ruby/internal/intern/parse.h
+wait.o: $(hdrdir)/ruby/internal/intern/proc.h
+wait.o: $(hdrdir)/ruby/internal/intern/process.h
+wait.o: $(hdrdir)/ruby/internal/intern/random.h
+wait.o: $(hdrdir)/ruby/internal/intern/range.h
+wait.o: $(hdrdir)/ruby/internal/intern/rational.h
+wait.o: $(hdrdir)/ruby/internal/intern/re.h
+wait.o: $(hdrdir)/ruby/internal/intern/ruby.h
+wait.o: $(hdrdir)/ruby/internal/intern/select.h
+wait.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+wait.o: $(hdrdir)/ruby/internal/intern/signal.h
+wait.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+wait.o: $(hdrdir)/ruby/internal/intern/string.h
+wait.o: $(hdrdir)/ruby/internal/intern/struct.h
+wait.o: $(hdrdir)/ruby/internal/intern/thread.h
+wait.o: $(hdrdir)/ruby/internal/intern/time.h
+wait.o: $(hdrdir)/ruby/internal/intern/variable.h
+wait.o: $(hdrdir)/ruby/internal/intern/vm.h
+wait.o: $(hdrdir)/ruby/internal/interpreter.h
+wait.o: $(hdrdir)/ruby/internal/iterator.h
+wait.o: $(hdrdir)/ruby/internal/memory.h
+wait.o: $(hdrdir)/ruby/internal/method.h
+wait.o: $(hdrdir)/ruby/internal/module.h
+wait.o: $(hdrdir)/ruby/internal/newobj.h
+wait.o: $(hdrdir)/ruby/internal/rgengc.h
+wait.o: $(hdrdir)/ruby/internal/scan_args.h
+wait.o: $(hdrdir)/ruby/internal/special_consts.h
+wait.o: $(hdrdir)/ruby/internal/static_assert.h
+wait.o: $(hdrdir)/ruby/internal/stdalign.h
+wait.o: $(hdrdir)/ruby/internal/stdbool.h
+wait.o: $(hdrdir)/ruby/internal/symbol.h
+wait.o: $(hdrdir)/ruby/internal/value.h
+wait.o: $(hdrdir)/ruby/internal/value_type.h
+wait.o: $(hdrdir)/ruby/internal/variable.h
+wait.o: $(hdrdir)/ruby/internal/warning_push.h
+wait.o: $(hdrdir)/ruby/internal/xmalloc.h
+wait.o: $(hdrdir)/ruby/io.h
+wait.o: $(hdrdir)/ruby/missing.h
+wait.o: $(hdrdir)/ruby/onigmo.h
+wait.o: $(hdrdir)/ruby/oniguruma.h
+wait.o: $(hdrdir)/ruby/ruby.h
+wait.o: $(hdrdir)/ruby/st.h
+wait.o: $(hdrdir)/ruby/subst.h
+wait.o: wait.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/wait/extconf.rb b/ext/-test-/wait/extconf.rb
new file mode 100644
index 0000000000..92787876ad
--- /dev/null
+++ b/ext/-test-/wait/extconf.rb
@@ -0,0 +1,2 @@
+# frozen_string_literal: false
+create_makefile("-test-/wait")
diff --git a/ext/-test-/wait/wait.c b/ext/-test-/wait/wait.c
new file mode 100644
index 0000000000..b73ee35809
--- /dev/null
+++ b/ext/-test-/wait/wait.c
@@ -0,0 +1,39 @@
+#include "ruby/ruby.h"
+#include "ruby/io.h"
+
+static VALUE
+io_wait(VALUE klass, VALUE io, VALUE events, VALUE timeout)
+{
+ return rb_io_wait(io, events, timeout);
+}
+
+static VALUE
+io_maybe_wait(VALUE klass, VALUE error, VALUE io, VALUE events, VALUE timeout)
+{
+ return rb_io_maybe_wait(RB_NUM2INT(error), io, events, timeout);
+}
+
+static VALUE
+io_maybe_wait_readable(VALUE klass, VALUE error, VALUE io, VALUE timeout)
+{
+ return RB_INT2NUM(
+ rb_io_maybe_wait_readable(RB_NUM2INT(error), io, timeout)
+ );
+}
+
+static VALUE
+io_maybe_wait_writable(VALUE klass, VALUE error, VALUE io, VALUE timeout)
+{
+ return RB_INT2NUM(
+ rb_io_maybe_wait_writable(RB_NUM2INT(error), io, timeout)
+ );
+}
+
+void
+Init_wait(void)
+{
+ rb_define_singleton_method(rb_cIO, "io_wait", io_wait, 3);
+ rb_define_singleton_method(rb_cIO, "io_maybe_wait", io_maybe_wait, 4);
+ rb_define_singleton_method(rb_cIO, "io_maybe_wait_readable", io_maybe_wait_readable, 3);
+ rb_define_singleton_method(rb_cIO, "io_maybe_wait_writable", io_maybe_wait_writable, 3);
+}
diff --git a/ext/-test-/wait_for_single_fd/depend b/ext/-test-/wait_for_single_fd/depend
deleted file mode 100644
index 8549fca781..0000000000
--- a/ext/-test-/wait_for_single_fd/depend
+++ /dev/null
@@ -1,17 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-wait_for_single_fd.o: $(RUBY_EXTCONF_H)
-wait_for_single_fd.o: $(arch_hdrdir)/ruby/config.h
-wait_for_single_fd.o: $(hdrdir)/ruby/assert.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward.h
-wait_for_single_fd.o: $(hdrdir)/ruby/defines.h
-wait_for_single_fd.o: $(hdrdir)/ruby/encoding.h
-wait_for_single_fd.o: $(hdrdir)/ruby/intern.h
-wait_for_single_fd.o: $(hdrdir)/ruby/io.h
-wait_for_single_fd.o: $(hdrdir)/ruby/missing.h
-wait_for_single_fd.o: $(hdrdir)/ruby/onigmo.h
-wait_for_single_fd.o: $(hdrdir)/ruby/oniguruma.h
-wait_for_single_fd.o: $(hdrdir)/ruby/ruby.h
-wait_for_single_fd.o: $(hdrdir)/ruby/st.h
-wait_for_single_fd.o: $(hdrdir)/ruby/subst.h
-wait_for_single_fd.o: wait_for_single_fd.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/wait_for_single_fd/extconf.rb b/ext/-test-/wait_for_single_fd/extconf.rb
deleted file mode 100644
index 2a976c8f4b..0000000000
--- a/ext/-test-/wait_for_single_fd/extconf.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# frozen_string_literal: false
-headers = %w(sys/types.h sys/time.h sys/event.h).select { |h| have_header(h) }
-have_func('kqueue', headers)
-create_makefile("-test-/wait_for_single_fd")
diff --git a/ext/-test-/wait_for_single_fd/wait_for_single_fd.c b/ext/-test-/wait_for_single_fd/wait_for_single_fd.c
deleted file mode 100644
index b8a33979bc..0000000000
--- a/ext/-test-/wait_for_single_fd/wait_for_single_fd.c
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/io.h"
-
-static VALUE
-wait_for_single_fd(VALUE ign, VALUE fd, VALUE events, VALUE timeout)
-{
- struct timeval tv;
- struct timeval *tvp = NULL;
- int rc;
-
- if (!NIL_P(timeout)) {
- tv = rb_time_timeval(timeout);
- tvp = &tv;
- }
-
- rc = rb_wait_for_single_fd(NUM2INT(fd), NUM2INT(events), tvp);
- if (rc == -1)
- rb_sys_fail("rb_wait_for_single_fd");
- return INT2NUM(rc);
-}
-
-#ifdef HAVE_KQUEUE
-/* ensure rb_wait_for_single_fd works on kqueue descriptors */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/event.h>
-static VALUE
-kqueue_test_wait(VALUE klass)
-{
- int kqfd = -1;
- int p[2] = { -1, -1 };
- struct timeval tv = { 0, 0 };
- const struct timespec ts = { 1, 0 };
- struct kevent kev;
- const char *msg;
- VALUE ret = Qfalse;
- int e = 0;
- int n;
-
- msg = "pipe";
- if (rb_cloexec_pipe(p) < 0) goto err;
-
- msg = "kqueue";
- kqfd = kqueue();
- if (kqfd < 0) goto err;
-
- n = rb_wait_for_single_fd(kqfd, RB_WAITFD_IN, &tv);
- if (n != 0) {
- msg = "spurious wakeup";
- errno = 0;
- goto err;
- }
-
- msg = "write";
- if (write(p[1], "", 1) < 0) goto err;
-
- EV_SET(&kev, p[0], EVFILT_READ, EV_ADD, 0, 0, 0);
-
- msg = "kevent";
- n = kevent(kqfd, &kev, 1, &kev, 1, &ts);
- if (n < 0) goto err;
- msg = NULL;
- if (n == 1) {
- n = rb_wait_for_single_fd(kqfd, RB_WAITFD_IN, &tv);
- ret = INT2NUM(n);
- }
- else {
- rb_warn("kevent did not return readiness");
- }
-err:
- if (msg) e = errno;
- if (p[0] >= 0) close(p[0]);
- if (p[1] >= 0) close(p[1]);
- if (kqfd >= 0) close(kqfd);
- if (msg) {
- if (e) rb_syserr_fail(e, msg);
- rb_raise(rb_eRuntimeError, "%s", msg);
- }
- return ret;
-}
-#endif /* HAVE_KQUEUE */
-
-void
-Init_wait_for_single_fd(void)
-{
- rb_define_const(rb_cObject, "RB_WAITFD_IN", INT2NUM(RB_WAITFD_IN));
- rb_define_const(rb_cObject, "RB_WAITFD_OUT", INT2NUM(RB_WAITFD_OUT));
- rb_define_const(rb_cObject, "RB_WAITFD_PRI", INT2NUM(RB_WAITFD_PRI));
- rb_define_singleton_method(rb_cIO, "wait_for_single_fd",
- wait_for_single_fd, 3);
-#ifdef HAVE_KQUEUE
- rb_define_singleton_method(rb_cIO, "kqueue_test_wait", kqueue_test_wait, 0);
-#endif
-}
diff --git a/ext/-test-/win32/console/attribute.c b/ext/-test-/win32/console/attribute.c
index a5f80fcaff..b43ba23a5c 100644
--- a/ext/-test-/win32/console/attribute.c
+++ b/ext/-test-/win32/console/attribute.c
@@ -13,23 +13,23 @@ io_handle(VALUE io)
}
static VALUE
-console_info(VALUE io)
+console_info(VALUE klass, VALUE io)
{
HANDLE h = io_handle(io);
CONSOLE_SCREEN_BUFFER_INFO csbi;
if (!GetConsoleScreenBufferInfo(h, &csbi))
- rb_syserr_fail(rb_w32_map_errno(GetLastError()), "not console");
+ rb_syserr_fail(rb_w32_map_errno(GetLastError()), "not console");
return rb_struct_new(rb_cConsoleScreenBufferInfo,
- INT2FIX(csbi.dwSize.X),
- INT2FIX(csbi.dwSize.Y),
- INT2FIX(csbi.dwCursorPosition.X),
- INT2FIX(csbi.dwCursorPosition.Y),
- INT2FIX(csbi.wAttributes));
+ INT2FIX(csbi.dwSize.X),
+ INT2FIX(csbi.dwSize.Y),
+ INT2FIX(csbi.dwCursorPosition.X),
+ INT2FIX(csbi.dwCursorPosition.Y),
+ INT2FIX(csbi.wAttributes));
}
static VALUE
-console_set_attribute(VALUE io, VALUE attr)
+console_set_attribute(VALUE klass, VALUE io, VALUE attr)
{
HANDLE h = io_handle(io);
@@ -44,11 +44,11 @@ void
Init_attribute(VALUE m)
{
rb_cConsoleScreenBufferInfo = rb_struct_define_under(m, "ConsoleScreenBufferInfo",
- "size_x", "size_y",
- "cur_x", "cur_y",
- "attr", NULL);
- rb_define_method(rb_cIO, "console_info", console_info, 0);
- rb_define_method(rb_cIO, "console_attribute", console_set_attribute, 1);
+ "size_x", "size_y",
+ "cur_x", "cur_y",
+ "attr", NULL);
+ rb_define_singleton_method(m, "console_info", console_info, 1);
+ rb_define_singleton_method(m, "console_attribute", console_set_attribute, 2);
rb_define_const(m, "FOREGROUND_MASK", INT2FIX(FOREGROUND_MASK));
rb_define_const(m, "FOREGROUND_BLUE", INT2FIX(FOREGROUND_BLUE));
diff --git a/ext/-test-/win32/fd_setsize/fd_setsize.c b/ext/-test-/win32/fd_setsize/fd_setsize.c
index 8da8b1eaa0..e29114a0ca 100644
--- a/ext/-test-/win32/fd_setsize/fd_setsize.c
+++ b/ext/-test-/win32/fd_setsize/fd_setsize.c
@@ -37,11 +37,11 @@ test_fdset(VALUE self)
FD_ZERO(&set);
for (i = 0; i < FD_SETSIZE * 2; i++) {
- int sd = socket(AF_INET, SOCK_DGRAM, 0);
- FD_SET(sd, &set);
- if (set.fd_count > FD_SETSIZE) {
- return Qfalse;
- }
+ int sd = socket(AF_INET, SOCK_DGRAM, 0);
+ FD_SET(sd, &set);
+ if (set.fd_count > FD_SETSIZE) {
+ return Qfalse;
+ }
}
return Qtrue;
}
diff --git a/ext/.document b/ext/.document
index 6a491576a1..aeb40c60fb 100644
--- a/ext/.document
+++ b/ext/.document
@@ -2,9 +2,15 @@
bigdecimal/bigdecimal.c
bigdecimal/lib
+cgi/escape/escape.c
continuation/continuation.c
coverage/coverage.c
+coverage/lib
date/date_core.c
+date/date_parse.c
+date/date_strftime.c
+date/date_strptime.c
+date/lib
dbm/dbm.c
digest/bubblebabble/bubblebabble.c
digest/digest.c
@@ -13,6 +19,7 @@ digest/md5/md5init.c
digest/rmd160/rmd160init.c
digest/sha1/sha1init.c
digest/sha2/sha2init.c
+digest/sha2/lib
etc/etc.c
fcntl/fcntl.c
fiber/fiber.c
@@ -20,21 +27,26 @@ fiddle/closure.c
fiddle/conversions.c
fiddle/fiddle.c
fiddle/function.c
+fiddle/pinned.c
fiddle/pointer.c
fiddle/handle.c
fiddle/lib
gdbm/gdbm.c
io/console/console.c
+io/console/lib
io/nonblock/nonblock.c
io/wait/wait.c
json/generator/generator.c
json/lib
json/parser/parser.c
+monitor/lib
+monitor/monitor.c
nkf/lib
nkf/nkf.c
objspace/objspace.c
objspace/objspace_dump.c
objspace/object_tracing.c
+objspace/lib
openssl/lib
openssl/ossl.c
openssl/ossl_asn1.c
@@ -58,6 +70,7 @@ openssl/ossl_pkey_rsa.c
openssl/ossl_rand.c
openssl/ossl_ssl.c
openssl/ossl_ssl_session.c
+openssl/ossl_ts.c
openssl/ossl_x509.c
openssl/ossl_x509attr.c
openssl/ossl_x509cert.c
@@ -78,14 +91,16 @@ psych/psych_yaml_tree.c
pty/lib
pty/pty.c
racc/cparse/cparse.c
+rbconfig/sizeof/*.c
readline/readline.c
ripper/lib
-sdbm/init.c
socket
stringio/stringio.c
strscan/strscan.c
syslog/syslog.c
syslog/lib
+win32/lib
+win32/resolv/*.c
win32ole/lib
win32ole/*.c
zlib/zlib.c
diff --git a/ext/Setup b/ext/Setup
index ac79c86f84..0376e2fc6c 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -33,7 +33,6 @@
#rbconfig/sizeof
#readline
#ripper
-#sdbm
#socket
#stringio
#strscan
diff --git a/ext/Setup.atheos b/ext/Setup.atheos
index 90a7d01348..3f6263b1e2 100644
--- a/ext/Setup.atheos
+++ b/ext/Setup.atheos
@@ -20,7 +20,6 @@ pty
racc/parse
readline
ripper
-sdbm
socket
stringio
strscan
diff --git a/ext/Setup.nt b/ext/Setup.nt
index fb5989b87f..dc36aa8688 100644
--- a/ext/Setup.nt
+++ b/ext/Setup.nt
@@ -21,7 +21,6 @@ nkf
racc/cparse
#readline
#ripper
-sdbm
socket
stringio
strscan
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 7ac883730d..d6ea35c615 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -7,13 +7,12 @@
*/
/* #define BIGDECIMAL_DEBUG 1 */
-#ifdef BIGDECIMAL_DEBUG
-# define BIGDECIMAL_ENABLE_VPRINT 1
-#endif
+
#include "bigdecimal.h"
#include "ruby/util.h"
#ifndef BIGDECIMAL_DEBUG
+# undef NDEBUG
# define NDEBUG
#endif
#include <assert.h>
@@ -24,20 +23,16 @@
#include <string.h>
#include <errno.h>
#include <math.h>
-#include "math.h"
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
+#include "bits.h"
+#include "static_assert.h"
+
/* #define ENABLE_NUMERIC_STRING */
-#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
- (a) == 0 ? 0 : \
- (a) == -1 ? (b) < -(max) : \
- (a) > 0 ? \
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
#define SIGNED_VALUE_MAX INTPTR_MAX
#define SIGNED_VALUE_MIN INTPTR_MIN
#define MUL_OVERFLOW_SIGNED_VALUE_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, SIGNED_VALUE_MIN, SIGNED_VALUE_MAX)
@@ -64,21 +59,30 @@ static ID id_to_r;
static ID id_eq;
static ID id_half;
+#define RBD_NUM_ROUNDING_MODES 11
+
+static struct {
+ ID id;
+ uint8_t mode;
+} rbd_rounding_modes[RBD_NUM_ROUNDING_MODES];
+
/* MACRO's to guard objects from GC by keeping them in stack */
+#ifdef RBIMPL_ATTR_MAYBE_UNUSED
+#define ENTER(n) RBIMPL_ATTR_MAYBE_UNUSED() volatile VALUE vStack[n];int iStack=0
+#else
#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0
+#endif
#define PUSH(x) (vStack[iStack++] = (VALUE)(x))
#define SAVE(p) PUSH((p)->obj)
#define GUARD_OBJ(p,y) ((p)=(y), SAVE(p))
-#define BASE_FIG RMPD_COMPONENT_FIGURES
-#define BASE RMPD_BASE
+#define BASE_FIG BIGDECIMAL_COMPONENT_FIGURES
+#define BASE BIGDECIMAL_BASE
#define HALF_BASE (BASE/2)
#define BASE1 (BASE/10)
-#ifndef DBLE_FIG
-#define DBLE_FIG (DBL_DIG+1) /* figure of double */
-#endif
+#define LOG10_2 0.3010299956639812
#ifndef RRATIONAL_ZERO_P
# define RRATIONAL_ZERO_P(x) (FIXNUM_P(rb_rational_num(x)) && \
@@ -103,32 +107,162 @@ static ID id_half;
# define RB_OBJ_STRING(obj) StringValueCStr(obj)
#endif
-#ifndef HAVE_RB_RATIONAL_NUM
-static inline VALUE
-rb_rational_num(VALUE rat)
+#ifndef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x
+#endif
+
+#define BIGDECIMAL_POSITIVE_P(bd) ((bd)->sign > 0)
+#define BIGDECIMAL_NEGATIVE_P(bd) ((bd)->sign < 0)
+
+/*
+ * ================== Memory allocation ============================
+ */
+
+#ifdef BIGDECIMAL_DEBUG
+static size_t rbd_allocation_count = 0; /* Memory allocation counter */
+static inline void
+atomic_allocation_count_inc(void)
+{
+ RUBY_ATOMIC_SIZE_INC(rbd_allocation_count);
+}
+static inline void
+atomic_allocation_count_dec_nounderflow(void)
+{
+ if (rbd_allocation_count == 0) return;
+ RUBY_ATOMIC_SIZE_DEC(rbd_allocation_count);
+}
+static void
+check_allocation_count_nonzero(void)
{
-#ifdef HAVE_TYPE_STRUCT_RRATIONAL
- return RRATIONAL(rat)->num;
+ if (rbd_allocation_count != 0) return;
+ rb_bug("[bigdecimal][rbd_free_struct] Too many memory free calls");
+}
#else
- return rb_funcall(rat, rb_intern("numerator"), 0);
-#endif
+# define atomic_allocation_count_inc() /* nothing */
+# define atomic_allocation_count_dec_nounderflow() /* nothing */
+# define check_allocation_count_nonzero() /* nothing */
+#endif /* BIGDECIMAL_DEBUG */
+
+PUREFUNC(static inline size_t rbd_struct_size(size_t const));
+
+static inline size_t
+rbd_struct_size(size_t const internal_digits)
+{
+ size_t const frac_len = (internal_digits == 0) ? 1 : internal_digits;
+ return offsetof(Real, frac) + frac_len * sizeof(DECDIG);
}
-#endif
-#ifndef HAVE_RB_RATIONAL_DEN
-static inline VALUE
-rb_rational_den(VALUE rat)
+static inline Real *
+rbd_allocate_struct(size_t const internal_digits)
{
-#ifdef HAVE_TYPE_STRUCT_RRATIONAL
- return RRATIONAL(rat)->den;
-#else
- return rb_funcall(rat, rb_intern("denominator"), 0);
-#endif
+ size_t const size = rbd_struct_size(internal_digits);
+ Real *real = ruby_xcalloc(1, size);
+ atomic_allocation_count_inc();
+ real->MaxPrec = internal_digits;
+ return real;
}
-#endif
-#define BIGDECIMAL_POSITIVE_P(bd) ((bd)->sign > 0)
-#define BIGDECIMAL_NEGATIVE_P(bd) ((bd)->sign < 0)
+static size_t
+rbd_calculate_internal_digits(size_t const digits, bool limit_precision)
+{
+ size_t const len = roomof(digits, BASE_FIG);
+ if (limit_precision) {
+ size_t const prec_limit = VpGetPrecLimit();
+ if (prec_limit > 0) {
+ /* NOTE: 2 more digits for rounding and division */
+ size_t const max_len = roomof(prec_limit, BASE_FIG) + 2;
+ if (len > max_len)
+ return max_len;
+ }
+ }
+
+ return len;
+}
+
+static inline Real *
+rbd_allocate_struct_decimal_digits(size_t const decimal_digits, bool limit_precision)
+{
+ size_t const internal_digits = rbd_calculate_internal_digits(decimal_digits, limit_precision);
+ return rbd_allocate_struct(internal_digits);
+}
+
+static VALUE BigDecimal_wrap_struct(VALUE obj, Real *vp);
+
+static Real *
+rbd_reallocate_struct(Real *real, size_t const internal_digits)
+{
+ size_t const size = rbd_struct_size(internal_digits);
+ VALUE obj = real ? real->obj : 0;
+ Real *new_real = (Real *)ruby_xrealloc(real, size);
+ new_real->MaxPrec = internal_digits;
+ if (obj) {
+ new_real->obj = 0;
+ BigDecimal_wrap_struct(obj, new_real);
+ }
+ return new_real;
+}
+
+static void
+rbd_free_struct(Real *real)
+{
+ if (real != NULL) {
+ check_allocation_count_nonzero();
+ ruby_xfree(real);
+ atomic_allocation_count_dec_nounderflow();
+ }
+}
+
+#define NewZero rbd_allocate_struct_zero
+static Real *
+rbd_allocate_struct_zero(int sign, size_t const digits, bool limit_precision)
+{
+ Real *real = rbd_allocate_struct_decimal_digits(digits, limit_precision);
+ VpSetZero(real, sign);
+ return real;
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_limited(int sign, size_t const digits));
+#define NewZeroLimited rbd_allocate_struct_zero_limited
+static inline Real *
+rbd_allocate_struct_zero_limited(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_zero(sign, digits, true);
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_nolimit(int sign, size_t const digits));
+#define NewZeroNolimit rbd_allocate_struct_zero_nolimit
+static inline Real *
+rbd_allocate_struct_zero_nolimit(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_zero(sign, digits, false);
+}
+
+#define NewOne rbd_allocate_struct_one
+static Real *
+rbd_allocate_struct_one(int sign, size_t const digits, bool limit_precision)
+{
+ Real *real = rbd_allocate_struct_decimal_digits(digits, limit_precision);
+ VpSetOne(real);
+ if (sign < 0)
+ VpSetSign(real, VP_SIGN_NEGATIVE_FINITE);
+ return real;
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_limited(int sign, size_t const digits));
+#define NewOneLimited rbd_allocate_struct_one_limited
+static inline Real *
+rbd_allocate_struct_one_limited(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_one(sign, digits, true);
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_nolimit(int sign, size_t const digits));
+#define NewOneNolimit rbd_allocate_struct_one_nolimit
+static inline Real *
+rbd_allocate_struct_one_nolimit(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_one(sign, digits, false);
+}
/*
* ================== Ruby Interface part ==========================
@@ -140,58 +274,107 @@ rb_rational_den(VALUE rat)
*/
static unsigned short VpGetException(void);
static void VpSetException(unsigned short f);
-static void VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v);
+static void VpCheckException(Real *p, bool always);
+static VALUE VpCheckGetValue(Real *p);
+static void VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v);
static int VpLimitRound(Real *c, size_t ixDigit);
static Real *VpCopy(Real *pv, Real const* const x);
-
-#ifdef BIGDECIMAL_ENABLE_VPRINT
static int VPrint(FILE *fp,const char *cntl_chr,Real *a);
-#endif
/*
* **** BigDecimal part ****
*/
+static VALUE BigDecimal_nan(void);
+static VALUE BigDecimal_positive_infinity(void);
+static VALUE BigDecimal_negative_infinity(void);
+static VALUE BigDecimal_positive_zero(void);
+static VALUE BigDecimal_negative_zero(void);
+
static void
BigDecimal_delete(void *pv)
{
- VpFree(pv);
+ rbd_free_struct(pv);
}
static size_t
BigDecimal_memsize(const void *ptr)
{
const Real *pv = ptr;
- return (sizeof(*pv) + pv->MaxPrec * sizeof(BDIGIT));
+ return (sizeof(*pv) + pv->MaxPrec * sizeof(DECDIG));
}
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+# undef RUBY_TYPED_FROZEN_SHAREABLE
+# define RUBY_TYPED_FROZEN_SHAREABLE 0
+#endif
+
static const rb_data_type_t BigDecimal_data_type = {
"BigDecimal",
{ 0, BigDecimal_delete, BigDecimal_memsize, },
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
- 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE
#endif
};
-static inline int
-is_kind_of_BigDecimal(VALUE const v)
+static Real *
+rbd_allocate_struct_zero_wrap_klass(VALUE klass, int sign, size_t const digits, bool limit_precision)
{
- return rb_typeddata_is_kind_of(v, &BigDecimal_data_type);
+ Real *real = rbd_allocate_struct_zero(sign, digits, limit_precision);
+ if (real != NULL) {
+ VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0);
+ BigDecimal_wrap_struct(obj, real);
+ }
+ return real;
}
-static VALUE
-ToValue(Real *p)
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_limited_wrap(int sign, size_t const digits));
+#define NewZeroWrapLimited rbd_allocate_struct_zero_limited_wrap
+static inline Real *
+rbd_allocate_struct_zero_limited_wrap(int sign, size_t const digits)
{
- if (VpIsNaN(p)) {
- VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'(Not a Number)", 0);
- }
- else if (VpIsPosInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 0);
- }
- else if (VpIsNegInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", 0);
+ return rbd_allocate_struct_zero_wrap_klass(rb_cBigDecimal, sign, digits, true);
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_zero_nolimit_wrap(int sign, size_t const digits));
+#define NewZeroWrapNolimit rbd_allocate_struct_zero_nolimit_wrap
+static inline Real *
+rbd_allocate_struct_zero_nolimit_wrap(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_zero_wrap_klass(rb_cBigDecimal, sign, digits, false);
+}
+
+static Real *
+rbd_allocate_struct_one_wrap_klass(VALUE klass, int sign, size_t const digits, bool limit_precision)
+{
+ Real *real = rbd_allocate_struct_one(sign, digits, limit_precision);
+ if (real != NULL) {
+ VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0);
+ BigDecimal_wrap_struct(obj, real);
}
- return p->obj;
+ return real;
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_limited_wrap(int sign, size_t const digits));
+#define NewOneWrapLimited rbd_allocate_struct_one_limited_wrap
+static inline Real *
+rbd_allocate_struct_one_limited_wrap(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_one_wrap_klass(rb_cBigDecimal, sign, digits, true);
+}
+
+MAYBE_UNUSED(static inline Real * rbd_allocate_struct_one_nolimit_wrap(int sign, size_t const digits));
+#define NewOneWrapNolimit rbd_allocate_struct_one_nolimit_wrap
+static inline Real *
+rbd_allocate_struct_one_nolimit_wrap(int sign, size_t const digits)
+{
+ return rbd_allocate_struct_one_wrap_klass(rb_cBigDecimal, sign, digits, false);
+}
+
+static inline int
+is_kind_of_BigDecimal(VALUE const v)
+{
+ return rb_typeddata_is_kind_of(v, &BigDecimal_data_type);
}
NORETURN(static void cannot_be_coerced_into_BigDecimal(VALUE, VALUE));
@@ -213,126 +396,101 @@ cannot_be_coerced_into_BigDecimal(VALUE exc_class, VALUE v)
}
static inline VALUE BigDecimal_div2(VALUE, VALUE, VALUE);
+static VALUE rb_inum_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception);
+static VALUE rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception);
+static VALUE rb_rational_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception);
+static VALUE rb_cstr_convert_to_BigDecimal(const char *c_str, size_t digs, int raise_exception);
+static VALUE rb_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception);
static Real*
GetVpValueWithPrec(VALUE v, long prec, int must)
{
- ENTER(1);
- Real *pv;
- VALUE num, bg;
- char szD[128];
- VALUE orig = Qundef;
- double d;
+ const size_t digs = prec < 0 ? SIZE_MAX : (size_t)prec;
-again:
switch(TYPE(v)) {
case T_FLOAT:
- if (prec < 0) goto unable_to_coerce_without_prec;
- if (prec > DBL_DIG+1) goto SomeOneMayDoIt;
- d = RFLOAT_VALUE(v);
- if (!isfinite(d)) {
- pv = VpCreateRbObject(1, NULL);
- VpDtoV(pv, d);
- return pv;
- }
- if (d != 0.0) {
- v = rb_funcall(v, id_to_r, 0);
- goto again;
- }
- if (1/d < 0.0) {
- return VpCreateRbObject(prec, "-0");
- }
- return VpCreateRbObject(prec, "0");
+ v = rb_float_convert_to_BigDecimal(v, digs, must);
+ break;
case T_RATIONAL:
- if (prec < 0) goto unable_to_coerce_without_prec;
-
- if (orig == Qundef ? (orig = v, 1) : orig != v) {
- num = rb_rational_num(v);
- pv = GetVpValueWithPrec(num, -1, must);
- if (pv == NULL) goto SomeOneMayDoIt;
-
- v = BigDecimal_div2(ToValue(pv), rb_rational_den(v), LONG2NUM(prec));
- goto again;
- }
-
- v = orig;
- goto SomeOneMayDoIt;
+ v = rb_rational_convert_to_BigDecimal(v, digs, must);
+ break;
case T_DATA:
- if (is_kind_of_BigDecimal(v)) {
- pv = DATA_PTR(v);
- return pv;
- }
- else {
- goto SomeOneMayDoIt;
- }
- break;
+ if (!is_kind_of_BigDecimal(v)) {
+ goto SomeOneMayDoIt;
+ }
+ break;
- case T_FIXNUM:
- sprintf(szD, "%ld", FIX2LONG(v));
- return VpCreateRbObject(VpBaseFig() * 2 + 1, szD);
+ case T_FIXNUM: {
+ char szD[128];
+ snprintf(szD, 128, "%ld", FIX2LONG(v));
+ v = rb_cstr_convert_to_BigDecimal(szD, VpBaseFig() * 2 + 1, must);
+ break;
+ }
#ifdef ENABLE_NUMERIC_STRING
- case T_STRING:
- StringValueCStr(v);
- return VpCreateRbObject(RSTRING_LEN(v) + VpBaseFig() + 1,
- RSTRING_PTR(v));
+ case T_STRING: {
+ const char *c_str = StringValueCStr(v);
+ v = rb_cstr_convert_to_BigDecimal(c_str, RSTRING_LEN(v) + VpBaseFig() + 1, must);
+ break;
+ }
#endif /* ENABLE_NUMERIC_STRING */
- case T_BIGNUM:
- bg = rb_big2str(v, 10);
- PUSH(bg);
- return VpCreateRbObject(strlen(RSTRING_PTR(bg)) + VpBaseFig() + 1,
- RSTRING_PTR(bg));
+ case T_BIGNUM: {
+ VALUE bg = rb_big2str(v, 10);
+ v = rb_cstr_convert_to_BigDecimal(RSTRING_PTR(bg), RSTRING_LEN(bg) + VpBaseFig() + 1, must);
+ RB_GC_GUARD(bg);
+ break;
+ }
+
default:
goto SomeOneMayDoIt;
}
+ Real *vp;
+ TypedData_Get_Struct(v, Real, &BigDecimal_data_type, vp);
+ return vp;
+
SomeOneMayDoIt:
if (must) {
cannot_be_coerced_into_BigDecimal(rb_eTypeError, v);
}
return NULL; /* NULL means to coerce */
-
-unable_to_coerce_without_prec:
- if (must) {
- rb_raise(rb_eArgError,
- "%"PRIsVALUE" can't be coerced into BigDecimal without a precision",
- RB_OBJ_CLASSNAME(v));
- }
- return NULL;
}
-static Real*
+static inline Real*
GetVpValue(VALUE v, int must)
{
return GetVpValueWithPrec(v, -1, must);
}
/* call-seq:
- * BigDecimal.double_fig
+ * BigDecimal.double_fig -> integer
+ *
+ * Returns the number of digits a Float object is allowed to have;
+ * the result is system-dependent:
+ *
+ * BigDecimal.double_fig # => 16
*
- * The BigDecimal.double_fig class method returns the number of digits a
- * Float number is allowed to have. The result depends upon the CPU and OS
- * in use.
*/
-static VALUE
+static inline VALUE
BigDecimal_double_fig(VALUE self)
{
return INT2FIX(VpDblFig());
}
/* call-seq:
- * big_decimal.precs -> array
+ * precs -> array
*
- * Returns an Array of two Integer values.
+ * Returns an Array of two Integer values that represent platform-dependent
+ * internal storage properties.
*
- * The first value is the current number of significant digits in the
- * BigDecimal. The second value is the maximum number of significant digits
- * for the BigDecimal.
+ * This method is deprecated and will be removed in the future.
+ * Instead, use BigDecimal#n_significant_digits for obtaining the number of
+ * significant digits in scientific notation, and BigDecimal#precision for
+ * obtaining the number of digits in decimal notation.
*
- * BigDecimal('5').precs #=> [9, 18]
*/
static VALUE
@@ -342,19 +500,251 @@ BigDecimal_prec(VALUE self)
Real *p;
VALUE obj;
+ rb_category_warn(RB_WARN_CATEGORY_DEPRECATED,
+ "BigDecimal#precs is deprecated and will be removed in the future; "
+ "use BigDecimal#precision instead.");
+
GUARD_OBJ(p, GetVpValue(self, 1));
- obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
- INT2NUM(p->MaxPrec*VpBaseFig()));
+ obj = rb_assoc_new(SIZET2NUM(p->Prec*VpBaseFig()),
+ SIZET2NUM(p->MaxPrec*VpBaseFig()));
return obj;
}
+static void
+BigDecimal_count_precision_and_scale(VALUE self, ssize_t *out_precision, ssize_t *out_scale)
+{
+ ENTER(1);
+
+ if (out_precision == NULL && out_scale == NULL)
+ return;
+
+ Real *p;
+ GUARD_OBJ(p, GetVpValue(self, 1));
+ if (VpIsZero(p) || !VpIsDef(p)) {
+ zero:
+ if (out_precision) *out_precision = 0;
+ if (out_scale) *out_scale = 0;
+ return;
+ }
+
+ DECDIG x;
+
+ ssize_t n = p->Prec; /* The length of frac without zeros. */
+ while (n > 0 && p->frac[n-1] == 0) --n;
+ if (n == 0) goto zero;
+
+ int nlz = BASE_FIG;
+ for (x = p->frac[0]; x > 0; x /= 10) --nlz;
+
+ int ntz = 0;
+ for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz;
+
+ /*
+ * Calculate the precision and the scale
+ * -------------------------------------
+ *
+ * The most significant digit is frac[0], and the least significant digit
+ * is frac[Prec-1]. When the exponent is zero, the decimal point is
+ * located just before frac[0].
+ *
+ * When the exponent is negative, the decimal point moves to leftward.
+ * In this case, the precision can be calculated by
+ *
+ * precision = BASE_FIG * (-exponent + n) - ntz,
+ *
+ * and the scale is the same as precision.
+ *
+ * 0 . 0000 0000 | frac[0] ... frac[n-1] |
+ * |<----------| exponent == -2 |
+ * |---------------------------------->| precision
+ * |---------------------------------->| scale
+ *
+ *
+ * Conversely, when the exponent is positive, the decimal point moves to
+ * rightward. In this case, the scale equals to
+ *
+ * BASE_FIG * (n - exponent) - ntz.
+ *
+ * the precision equals to
+ *
+ * scale + BASE_FIG * exponent - nlz.
+ *
+ * | frac[0] frac[1] . frac[2] ... frac[n-1] |
+ * |---------------->| exponent == 2 |
+ * | |---------------------->| scale
+ * |---------------------------------------->| precision
+ */
+
+ ssize_t ex = p->exponent;
+
+ /* Count the number of decimal digits before frac[1]. */
+ ssize_t n_digits_head = BASE_FIG;
+ if (ex < 0) {
+ n_digits_head += (-ex) * BASE_FIG; /* The number of leading zeros before frac[0]. */
+ ex = 0;
+ }
+ else if (ex > 0) {
+ /* Count the number of decimal digits without the leading zeros in
+ * the most significant digit in the integral part.
+ */
+ n_digits_head -= nlz; /* Make the number of digits */
+ }
+
+ if (out_precision) {
+ ssize_t precision = n_digits_head;
+
+ /* Count the number of decimal digits after frac[0]. */
+ if (ex > (ssize_t)n) {
+ /* In this case the number is an integer with some trailing zeros. */
+ precision += (ex - 1) * BASE_FIG;
+ }
+ else if (n > 0) {
+ precision += (n - 1) * BASE_FIG;
+
+ if (ex < (ssize_t)n) {
+ precision -= ntz;
+ }
+ }
+
+ *out_precision = precision;
+ }
+
+ if (out_scale) {
+ ssize_t scale = 0;
+
+ if (p->exponent < 0) {
+ scale = n_digits_head + (n - 1) * BASE_FIG - ntz;
+ }
+ else if (n > p->exponent) {
+ scale = (n - p->exponent) * BASE_FIG - ntz;
+ }
+
+ *out_scale = scale;
+ }
+}
+
+/*
+ * call-seq:
+ * precision -> integer
+ *
+ * Returns the number of decimal digits in +self+:
+ *
+ * BigDecimal("0").precision # => 0
+ * BigDecimal("1").precision # => 1
+ * BigDecimal("1.1").precision # => 2
+ * BigDecimal("3.1415").precision # => 5
+ * BigDecimal("-1e20").precision # => 21
+ * BigDecimal("1e-20").precision # => 20
+ * BigDecimal("Infinity").precision # => 0
+ * BigDecimal("-Infinity").precision # => 0
+ * BigDecimal("NaN").precision # => 0
+ *
+ */
+static VALUE
+BigDecimal_precision(VALUE self)
+{
+ ssize_t precision;
+ BigDecimal_count_precision_and_scale(self, &precision, NULL);
+ return SSIZET2NUM(precision);
+}
+
+/*
+ * call-seq:
+ * scale -> integer
+ *
+ * Returns the number of decimal digits following the decimal digits in +self+.
+ *
+ * BigDecimal("0").scale # => 0
+ * BigDecimal("1").scale # => 1
+ * BigDecimal("1.1").scale # => 1
+ * BigDecimal("3.1415").scale # => 4
+ * BigDecimal("-1e20").precision # => 0
+ * BigDecimal("1e-20").precision # => 20
+ * BigDecimal("Infinity").scale # => 0
+ * BigDecimal("-Infinity").scale # => 0
+ * BigDecimal("NaN").scale # => 0
+ */
+static VALUE
+BigDecimal_scale(VALUE self)
+{
+ ssize_t scale;
+ BigDecimal_count_precision_and_scale(self, NULL, &scale);
+ return SSIZET2NUM(scale);
+}
+
+/*
+ * call-seq:
+ * precision_scale -> [integer, integer]
+ *
+ * Returns a 2-length array; the first item is the result of
+ * BigDecimal#precision and the second one is of BigDecimal#scale.
+ *
+ * See BigDecimal#precision.
+ * See BigDecimal#scale.
+ */
+static VALUE
+BigDecimal_precision_scale(VALUE self)
+{
+ ssize_t precision, scale;
+ BigDecimal_count_precision_and_scale(self, &precision, &scale);
+ return rb_assoc_new(SSIZET2NUM(precision), SSIZET2NUM(scale));
+}
+
+/*
+ * call-seq:
+ * n_significant_digits -> integer
+ *
+ * Returns the number of decimal significant digits in +self+.
+ *
+ * BigDecimal("0").n_significant_digits # => 0
+ * BigDecimal("1").n_significant_digits # => 1
+ * BigDecimal("1.1").n_significant_digits # => 2
+ * BigDecimal("3.1415").n_significant_digits # => 5
+ * BigDecimal("-1e20").n_significant_digits # => 1
+ * BigDecimal("1e-20").n_significant_digits # => 1
+ * BigDecimal("Infinity").n_significant_digits # => 0
+ * BigDecimal("-Infinity").n_significant_digits # => 0
+ * BigDecimal("NaN").n_significant_digits # => 0
+ */
+static VALUE
+BigDecimal_n_significant_digits(VALUE self)
+{
+ ENTER(1);
+
+ Real *p;
+ GUARD_OBJ(p, GetVpValue(self, 1));
+ if (VpIsZero(p) || !VpIsDef(p)) {
+ return INT2FIX(0);
+ }
+
+ ssize_t n = p->Prec; /* The length of frac without trailing zeros. */
+ for (n = p->Prec; n > 0 && p->frac[n-1] == 0; --n);
+ if (n == 0) return INT2FIX(0);
+
+ DECDIG x;
+ int nlz = BASE_FIG;
+ for (x = p->frac[0]; x > 0; x /= 10) --nlz;
+
+ int ntz = 0;
+ for (x = p->frac[n-1]; x > 0 && x % 10 == 0; x /= 10) ++ntz;
+
+ ssize_t n_significant_digits = BASE_FIG*n - nlz - ntz;
+ return SSIZET2NUM(n_significant_digits);
+}
+
/*
- * call-seq: hash
+ * call-seq:
+ * hash -> integer
+ *
+ * Returns the integer hash value for +self+.
*
- * Creates a hash for this BigDecimal.
+ * Two instances of \BigDecimal have the same hash value if and only if
+ * they have equal:
+ *
+ * - Sign.
+ * - Fractional part.
+ * - Exponent.
*
- * Two BigDecimals with equal sign,
- * fractional part and exponent have the same hash.
*/
static VALUE
BigDecimal_hash(VALUE self)
@@ -367,23 +757,23 @@ BigDecimal_hash(VALUE self)
hash = (st_index_t)p->sign;
/* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */
if(hash == 2 || hash == (st_index_t)-2) {
- hash ^= rb_memhash(p->frac, sizeof(BDIGIT)*p->Prec);
- hash += p->exponent;
+ hash ^= rb_memhash(p->frac, sizeof(DECDIG)*p->Prec);
+ hash += p->exponent;
}
return ST2FIX(hash);
}
/*
- * call-seq: _dump
+ * call-seq:
+ * _dump -> string
*
- * Method used to provide marshalling support.
+ * Returns a string representing the marshalling of +self+.
+ * See module Marshal.
*
- * inf = BigDecimal('Infinity')
- * #=> Infinity
- * BigDecimal._load(inf._dump)
- * #=> Infinity
+ * inf = BigDecimal('Infinity') # => Infinity
+ * dumped = inf._dump # => "9:Infinity"
+ * BigDecimal._load(dumped) # => Infinity
*
- * See the Marshal module.
*/
static VALUE
BigDecimal_dump(int argc, VALUE *argv, VALUE self)
@@ -393,13 +783,15 @@ BigDecimal_dump(int argc, VALUE *argv, VALUE self)
char *psz;
VALUE dummy;
volatile VALUE dump;
+ size_t len;
rb_scan_args(argc, argv, "01", &dummy);
GUARD_OBJ(vp,GetVpValue(self, 1));
dump = rb_str_new(0, VpNumOfChars(vp, "E")+50);
psz = RSTRING_PTR(dump);
- sprintf(psz, "%"PRIuSIZE":", VpMaxPrec(vp)*VpBaseFig());
- VpToString(vp, psz+strlen(psz), 0, 0);
+ snprintf(psz, RSTRING_LEN(dump), "%"PRIuSIZE":", VpMaxPrec(vp)*VpBaseFig());
+ len = strlen(psz);
+ VpToString(vp, psz+len, RSTRING_LEN(dump)-len, 0, 0);
rb_str_resize(dump, strlen(psz));
return dump;
}
@@ -425,12 +817,12 @@ BigDecimal_load(VALUE self, VALUE str)
m = m*10 + (unsigned long)(ch-'0');
}
if (m > VpBaseFig()) m -= VpBaseFig();
- GUARD_OBJ(pv, VpNewRbClass(m, (char *)pch, self));
+ GUARD_OBJ(pv, VpNewRbClass(m, (char *)pch, self, true, true));
m /= VpBaseFig();
if (m && pv->MaxPrec > m) {
pv->MaxPrec = m+1;
}
- return ToValue(pv);
+ return VpCheckGetValue(pv);
}
static unsigned short
@@ -443,18 +835,19 @@ check_rounding_mode_option(VALUE const opts)
assert(RB_TYPE_P(opts, T_HASH));
if (NIL_P(opts))
- goto noopt;
+ goto no_opt;
mode = rb_hash_lookup2(opts, ID2SYM(id_half), Qundef);
if (mode == Qundef || NIL_P(mode))
- goto noopt;
+ goto no_opt;
if (SYMBOL_P(mode))
mode = rb_sym2str(mode);
else if (!RB_TYPE_P(mode, T_STRING)) {
- VALUE str_mode = rb_check_string_type(mode);
- if (NIL_P(str_mode)) goto invalid;
- mode = str_mode;
+ VALUE str_mode = rb_check_string_type(mode);
+ if (NIL_P(str_mode))
+ goto invalid;
+ mode = str_mode;
}
s = RSTRING_PTR(mode);
l = RSTRING_LEN(mode);
@@ -472,13 +865,11 @@ check_rounding_mode_option(VALUE const opts)
default:
break;
}
+
invalid:
- if (NIL_P(mode))
- rb_raise(rb_eArgError, "invalid rounding mode: nil");
- else
- rb_raise(rb_eArgError, "invalid rounding mode: %"PRIsVALUE, mode);
+ rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", mode);
- noopt:
+ no_opt:
return VpGetRoundMode();
}
@@ -487,72 +878,185 @@ check_rounding_mode(VALUE const v)
{
unsigned short sw;
ID id;
- switch (TYPE(v)) {
- case T_SYMBOL:
- id = SYM2ID(v);
- if (id == id_up)
- return VP_ROUND_UP;
- if (id == id_down || id == id_truncate)
- return VP_ROUND_DOWN;
- if (id == id_half_up || id == id_default)
- return VP_ROUND_HALF_UP;
- if (id == id_half_down)
- return VP_ROUND_HALF_DOWN;
- if (id == id_half_even || id == id_banker)
- return VP_ROUND_HALF_EVEN;
- if (id == id_ceiling || id == id_ceil)
- return VP_ROUND_CEIL;
- if (id == id_floor)
- return VP_ROUND_FLOOR;
- rb_raise(rb_eArgError, "invalid rounding mode");
-
- default:
- break;
+ if (RB_TYPE_P(v, T_SYMBOL)) {
+ int i;
+ id = SYM2ID(v);
+ for (i = 0; i < RBD_NUM_ROUNDING_MODES; ++i) {
+ if (rbd_rounding_modes[i].id == id) {
+ return rbd_rounding_modes[i].mode;
+ }
+ }
+ rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", v);
}
-
- sw = NUM2USHORT(v);
- if (!VpIsRoundMode(sw)) {
- rb_raise(rb_eArgError, "invalid rounding mode");
+ else {
+ sw = NUM2USHORT(v);
+ if (!VpIsRoundMode(sw)) {
+ rb_raise(rb_eArgError, "invalid rounding mode (%"PRIsVALUE")", v);
+ }
+ return sw;
}
- return sw;
}
-/* call-seq:
- * BigDecimal.mode(mode, value)
- *
- * Controls handling of arithmetic exceptions and rounding. If no value
- * is supplied, the current value is returned.
- *
- * Six values of the mode parameter control the handling of arithmetic
- * exceptions:
- *
- * BigDecimal::EXCEPTION_NaN
- * BigDecimal::EXCEPTION_INFINITY
- * BigDecimal::EXCEPTION_UNDERFLOW
- * BigDecimal::EXCEPTION_OVERFLOW
- * BigDecimal::EXCEPTION_ZERODIVIDE
- * BigDecimal::EXCEPTION_ALL
- *
- * For each mode parameter above, if the value set is false, computation
- * continues after an arithmetic exception of the appropriate type.
- * When computation continues, results are as follows:
- *
- * EXCEPTION_NaN:: NaN
- * EXCEPTION_INFINITY:: +Infinity or -Infinity
- * EXCEPTION_UNDERFLOW:: 0
- * EXCEPTION_OVERFLOW:: +Infinity or -Infinity
- * EXCEPTION_ZERODIVIDE:: +Infinity or -Infinity
- *
- * One value of the mode parameter controls the rounding of numeric values:
- * BigDecimal::ROUND_MODE. The values it can take are:
- *
- * ROUND_UP, :up:: round away from zero
- * ROUND_DOWN, :down, :truncate:: round towards zero (truncate)
- * ROUND_HALF_UP, :half_up, :default:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round away from zero. (default)
- * ROUND_HALF_DOWN, :half_down:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards zero.
- * ROUND_HALF_EVEN, :half_even, :banker:: round towards the nearest neighbor, unless both neighbors are equidistant, in which case round towards the even neighbor (Banker's rounding)
- * ROUND_CEILING, :ceiling, :ceil:: round towards positive infinity (ceil)
- * ROUND_FLOOR, :floor:: round towards negative infinity (floor)
+/* call-seq:
+ * BigDecimal.mode(mode, setting = nil) -> integer
+ *
+ * Returns an integer representing the mode settings
+ * for exception handling and rounding.
+ *
+ * These modes control exception handling:
+ *
+ * - \BigDecimal::EXCEPTION_NaN.
+ * - \BigDecimal::EXCEPTION_INFINITY.
+ * - \BigDecimal::EXCEPTION_UNDERFLOW.
+ * - \BigDecimal::EXCEPTION_OVERFLOW.
+ * - \BigDecimal::EXCEPTION_ZERODIVIDE.
+ * - \BigDecimal::EXCEPTION_ALL.
+ *
+ * Values for +setting+ for exception handling:
+ *
+ * - +true+: sets the given +mode+ to +true+.
+ * - +false+: sets the given +mode+ to +false+.
+ * - +nil+: does not modify the mode settings.
+ *
+ * You can use method BigDecimal.save_exception_mode
+ * to temporarily change, and then automatically restore, exception modes.
+ *
+ * For clarity, some examples below begin by setting all
+ * exception modes to +false+.
+ *
+ * This mode controls the way rounding is to be performed:
+ *
+ * - \BigDecimal::ROUND_MODE
+ *
+ * You can use method BigDecimal.save_rounding_mode
+ * to temporarily change, and then automatically restore, the rounding mode.
+ *
+ * <b>NaNs</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_NaN controls behavior
+ * when a \BigDecimal NaN is created.
+ *
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('NaN')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal('NaN') # => NaN
+ * BigDecimal.mode(BigDecimal::EXCEPTION_NaN, true) # => 2
+ * BigDecimal('NaN') # Raises FloatDomainError
+ *
+ * <b>Infinities</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_INFINITY controls behavior
+ * when a \BigDecimal Infinity or -Infinity is created.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal('Infinity') # => Infinity
+ * BigDecimal('-Infinity') # => -Infinity
+ * BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, true) # => 1
+ * BigDecimal('Infinity') # Raises FloatDomainError
+ * BigDecimal('-Infinity') # Raises FloatDomainError
+ *
+ * <b>Underflow</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_UNDERFLOW controls behavior
+ * when a \BigDecimal underflow occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('0')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * def flow_under
+ * x = BigDecimal('0.1')
+ * 100.times { x *= x }
+ * end
+ * flow_under # => 100
+ * BigDecimal.mode(BigDecimal::EXCEPTION_UNDERFLOW, true) # => 4
+ * flow_under # Raises FloatDomainError
+ *
+ * <b>Overflow</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_OVERFLOW controls behavior
+ * when a \BigDecimal overflow occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * def flow_over
+ * x = BigDecimal('10')
+ * 100.times { x *= x }
+ * end
+ * flow_over # => 100
+ * BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, true) # => 1
+ * flow_over # Raises FloatDomainError
+ *
+ * <b>Zero Division</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_ZERODIVIDE controls behavior
+ * when a zero-division occurs.
+ * Settings:
+ *
+ * - +false+ (default): Returns <tt>BigDecimal('Infinity')</tt>
+ * or <tt>BigDecimal('-Infinity')</tt>.
+ * - +true+: Raises FloatDomainError.
+ *
+ * Examples:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * one = BigDecimal('1')
+ * zero = BigDecimal('0')
+ * one / zero # => Infinity
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, true) # => 16
+ * one / zero # Raises FloatDomainError
+ *
+ * <b>All Exceptions</b>
+ *
+ * Mode \BigDecimal::EXCEPTION_ALL controls all of the above:
+ *
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, false) # => 0
+ * BigDecimal.mode(BigDecimal::EXCEPTION_ALL, true) # => 23
+ *
+ * <b>Rounding</b>
+ *
+ * Mode \BigDecimal::ROUND_MODE controls the way rounding is to be performed;
+ * its +setting+ values are:
+ *
+ * - +ROUND_UP+: Round away from zero.
+ * Aliased as +:up+.
+ * - +ROUND_DOWN+: Round toward zero.
+ * Aliased as +:down+ and +:truncate+.
+ * - +ROUND_HALF_UP+: Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round away from zero.
+ * Aliased as +:half_up+ and +:default+.
+ * - +ROUND_HALF_DOWN+: Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round toward zero.
+ * Aliased as +:half_down+.
+ * - +ROUND_HALF_EVEN+ (Banker's rounding): Round toward the nearest neighbor;
+ * if the neighbors are equidistant, round toward the even neighbor.
+ * Aliased as +:half_even+ and +:banker+.
+ * - +ROUND_CEILING+: Round toward positive infinity.
+ * Aliased as +:ceiling+ and +:ceil+.
+ * - +ROUND_FLOOR+: Round toward negative infinity.
+ * Aliased as +:floor:+.
*
*/
static VALUE
@@ -629,49 +1133,70 @@ GetAddSubPrec(Real *a, Real *b)
return mx;
}
-static SIGNED_VALUE
-GetPrecisionInt(VALUE v)
+static inline SIGNED_VALUE
+check_int_precision(VALUE v)
{
SIGNED_VALUE n;
- n = NUM2INT(v);
+#if SIZEOF_VALUE <= SIZEOF_LONG
+ n = (SIGNED_VALUE)NUM2LONG(v);
+#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG
+ n = (SIGNED_VALUE)NUM2LL(v);
+#else
+# error SIZEOF_VALUE is too large
+#endif
if (n < 0) {
rb_raise(rb_eArgError, "negative precision");
}
return n;
}
+static VALUE
+BigDecimal_wrap_struct(VALUE obj, Real *vp)
+{
+ assert(is_kind_of_BigDecimal(obj));
+ assert(vp != NULL);
+
+ if (vp->obj == obj && RTYPEDDATA_DATA(obj) == vp)
+ return obj;
+
+ assert(RTYPEDDATA_DATA(obj) == NULL);
+ assert(vp->obj == 0);
+
+ RTYPEDDATA_DATA(obj) = vp;
+ vp->obj = obj;
+ RB_OBJ_FREEZE(obj);
+ return obj;
+}
+
VP_EXPORT Real *
-VpNewRbClass(size_t mx, const char *str, VALUE klass)
+VpNewRbClass(size_t mx, const char *str, VALUE klass, bool strict_p, bool raise_exception)
{
VALUE obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, 0);
- Real *pv = VpAlloc(mx, str, 1, 1);
- RTYPEDDATA_DATA(obj) = pv;
- pv->obj = obj;
- RB_OBJ_FREEZE(obj);
+ Real *pv = VpAlloc(mx, str, strict_p, raise_exception);
+ if (!pv)
+ return NULL;
+ BigDecimal_wrap_struct(obj, pv);
return pv;
}
VP_EXPORT Real *
-VpCreateRbObject(size_t mx, const char *str)
+VpCreateRbObject(size_t mx, const char *str, bool raise_exception)
{
- return VpNewRbClass(mx, str, rb_cBigDecimal);
+ return VpNewRbClass(mx, str, rb_cBigDecimal, true, raise_exception);
}
-#define VpAllocReal(prec) (Real *)VpMemAlloc(offsetof(Real, frac) + (prec) * sizeof(BDIGIT))
-#define VpReallocReal(ptr, prec) (Real *)VpMemRealloc((ptr), offsetof(Real, frac) + (prec) * sizeof(BDIGIT))
-
static Real *
VpCopy(Real *pv, Real const* const x)
{
assert(x != NULL);
- pv = VpReallocReal(pv, x->MaxPrec);
+ pv = rbd_reallocate_struct(pv, x->MaxPrec);
pv->MaxPrec = x->MaxPrec;
pv->Prec = x->Prec;
pv->exponent = x->exponent;
pv->sign = x->sign;
pv->flag = x->flag;
- MEMCPY(pv->frac, x->frac, BDIGIT, pv->MaxPrec);
+ MEMCPY(pv->frac, x->frac, DECDIG, pv->MaxPrec);
return pv;
}
@@ -710,15 +1235,7 @@ BigDecimal_IsFinite(VALUE self)
static void
BigDecimal_check_num(Real *p)
{
- if (VpIsNaN(p)) {
- VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'(Not a Number)", 1);
- }
- else if (VpIsPosInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 1);
- }
- else if (VpIsNegInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", 1);
- }
+ VpCheckException(p, true);
}
static VALUE BigDecimal_split(VALUE self);
@@ -741,7 +1258,7 @@ BigDecimal_to_i(VALUE self)
if (e <= 0) return INT2FIX(0);
nf = VpBaseFig();
if (e <= nf) {
- return LONG2NUM((long)(VpGetSign(p) * (BDIGIT_DBL_SIGNED)p->frac[0]));
+ return LONG2NUM((long)(VpGetSign(p) * (DECDIG_DBL_SIGNED)p->frac[0]));
}
else {
VALUE a = BigDecimal_split(self);
@@ -794,7 +1311,7 @@ BigDecimal_to_f(VALUE self)
str = rb_str_new(0, VpNumOfChars(p, "E"));
buf = RSTRING_PTR(str);
- VpToString(p, buf, 0, 0);
+ VpToString(p, buf, RSTRING_LEN(str), 0, 0);
errno = 0;
d = strtod(buf, 0);
if (errno == ERANGE) {
@@ -875,8 +1392,8 @@ BigDecimal_coerce(VALUE self, VALUE other)
Real *b;
if (RB_TYPE_P(other, T_FLOAT)) {
- GUARD_OBJ(b, GetVpValueWithPrec(other, DBL_DIG+1, 1));
- obj = rb_assoc_new(ToValue(b), self);
+ GUARD_OBJ(b, GetVpValueWithPrec(other, 0, 1));
+ obj = rb_assoc_new(VpCheckGetValue(b), self);
}
else {
if (RB_TYPE_P(other, T_RATIONAL)) {
@@ -893,12 +1410,14 @@ BigDecimal_coerce(VALUE self, VALUE other)
}
/*
- * call-seq:
- * +big_decimal -> big_decimal
+ * call-seq:
+ * +big_decimal -> self
+ *
+ * Returns +self+:
*
- * Return self.
+ * +BigDecimal(5) # => 0.5e1
+ * +BigDecimal(-5) # => -0.5e1
*
- * +BigDecimal('5') #=> 0.5e1
*/
static VALUE
@@ -908,22 +1427,21 @@ BigDecimal_uplus(VALUE self)
}
/*
- * Document-method: BigDecimal#add
- * Document-method: BigDecimal#+
+ * call-seq:
+ * self + value -> bigdecimal
*
- * call-seq:
- * add(value, digits)
+ * Returns the \BigDecimal sum of +self+ and +value+:
*
- * Add the specified value.
+ * b = BigDecimal('111111.111') # => 0.111111111e6
+ * b + 2 # => 0.111113111e6
+ * b + 2.0 # => 0.111113111e6
+ * b + Rational(2, 1) # => 0.111113111e6
+ * b + Complex(2, 0) # => (0.111113111e6+0i)
*
- * e.g.
- * c = a.add(b,n)
- * c = a + b
+ * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision].
*
- * digits:: If specified and less than the number of significant digits of the
- * result, the result is rounded to that number of digits, according
- * to BigDecimal.mode.
*/
+
static VALUE
BigDecimal_add(VALUE self, VALUE r)
{
@@ -933,7 +1451,7 @@ BigDecimal_add(VALUE self, VALUE r)
GUARD_OBJ(a, GetVpValue(self, 1));
if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ b = GetVpValueWithPrec(r, 0, 1);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
@@ -950,36 +1468,33 @@ BigDecimal_add(VALUE self, VALUE r)
mx = GetAddSubPrec(a, b);
if (mx == (size_t)-1L) {
- GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
- VpAddSub(c, a, b, 1);
+ GUARD_OBJ(c, NewZeroWrapLimited(1, VpBaseFig() + 1));
+ VpAddSub(c, a, b, 1);
}
else {
- GUARD_OBJ(c, VpCreateRbObject(mx * (VpBaseFig() + 1), "0"));
- if(!mx) {
- VpSetInf(c, VpGetSign(a));
- }
- else {
- VpAddSub(c, a, b, 1);
- }
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx * (VpBaseFig() + 1)));
+ if (!mx) {
+ VpSetInf(c, VpGetSign(a));
+ }
+ else {
+ VpAddSub(c, a, b, 1);
+ }
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
- /* call-seq:
- * a - b -> bigdecimal
- *
- * Subtract the specified value.
+ /* call-seq:
+ * self - value -> bigdecimal
*
- * e.g.
- * c = a - b
+ * Returns the \BigDecimal difference of +self+ and +value+:
*
- * The precision of the result value depends on the type of +b+.
+ * b = BigDecimal('333333.333') # => 0.333333333e6
+ * b - 2 # => 0.333331333e6
+ * b - 2.0 # => 0.333331333e6
+ * b - Rational(2, 1) # => 0.333331333e6
+ * b - Complex(2, 0) # => (0.333331333e6+0i)
*
- * If +b+ is a Float, the precision of the result is Float::DIG+1.
- *
- * If +b+ is a BigDecimal, the precision of the result is +b+'s precision of
- * internal representation from platform. So, it's return value is platform
- * dependent.
+ * See the {Note About Precision}[BigDecimal.html#class-BigDecimal-label-A+Note+About+Precision].
*
*/
static VALUE
@@ -991,7 +1506,7 @@ BigDecimal_sub(VALUE self, VALUE r)
GUARD_OBJ(a, GetVpValue(self,1));
if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ b = GetVpValueWithPrec(r, 0, 1);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
@@ -1008,19 +1523,19 @@ BigDecimal_sub(VALUE self, VALUE r)
mx = GetAddSubPrec(a,b);
if (mx == (size_t)-1L) {
- GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
- VpAddSub(c, a, b, -1);
+ GUARD_OBJ(c, NewZeroWrapLimited(1, VpBaseFig() + 1));
+ VpAddSub(c, a, b, -1);
}
else {
- GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
- if (!mx) {
- VpSetInf(c,VpGetSign(a));
- }
- else {
- VpAddSub(c, a, b, -1);
- }
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx *(VpBaseFig() + 1)));
+ if (!mx) {
+ VpSetInf(c,VpGetSign(a));
+ }
+ else {
+ VpAddSub(c, a, b, -1);
+ }
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
static VALUE
@@ -1041,7 +1556,7 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
break;
case T_FLOAT:
- GUARD_OBJ(b, GetVpValueWithPrec(r, DBL_DIG+1, 0));
+ GUARD_OBJ(b, GetVpValueWithPrec(r, 0, 0));
break;
case T_RATIONAL:
@@ -1158,12 +1673,19 @@ BigDecimal_eq(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '=');
}
-/* call-seq:
- * a < b
+/* call-seq:
+ * self < other -> true or false
+ *
+ * Returns +true+ if +self+ is less than +other+, +false+ otherwise:
+ *
+ * b = BigDecimal('1.5') # => 0.15e1
+ * b < 2 # => true
+ * b < 2.0 # => true
+ * b < Rational(2, 1) # => true
+ * b < 1.5 # => false
*
- * Returns true if a is less than b.
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_lt(VALUE self, VALUE r)
@@ -1171,12 +1693,20 @@ BigDecimal_lt(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '<');
}
-/* call-seq:
- * a <= b
+/* call-seq:
+ * self <= other -> true or false
+ *
+ * Returns +true+ if +self+ is less or equal to than +other+, +false+ otherwise:
+ *
+ * b = BigDecimal('1.5') # => 0.15e1
+ * b <= 2 # => true
+ * b <= 2.0 # => true
+ * b <= Rational(2, 1) # => true
+ * b <= 1.5 # => true
+ * b < 1 # => false
*
- * Returns true if a is less than or equal to b.
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_le(VALUE self, VALUE r)
@@ -1184,12 +1714,19 @@ BigDecimal_le(VALUE self, VALUE r)
return BigDecimalCmp(self, r, 'L');
}
-/* call-seq:
- * a > b
+/* call-seq:
+ * self > other -> true or false
+ *
+ * Returns +true+ if +self+ is greater than +other+, +false+ otherwise:
*
- * Returns true if a is greater than b.
+ * b = BigDecimal('1.5')
+ * b > 1 # => true
+ * b > 1.0 # => true
+ * b > Rational(1, 1) # => true
+ * b > 2 # => false
+ *
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce).
*/
static VALUE
BigDecimal_gt(VALUE self, VALUE r)
@@ -1197,12 +1734,20 @@ BigDecimal_gt(VALUE self, VALUE r)
return BigDecimalCmp(self, r, '>');
}
-/* call-seq:
- * a >= b
+/* call-seq:
+ * self >= other -> true or false
+ *
+ * Returns +true+ if +self+ is greater than or equal to +other+, +false+ otherwise:
*
- * Returns true if a is greater than or equal to b.
+ * b = BigDecimal('1.5')
+ * b >= 1 # => true
+ * b >= 1.0 # => true
+ * b >= Rational(1, 1) # => true
+ * b >= 1.5 # => true
+ * b > 2 # => false
+ *
+ * Raises an exception if the comparison cannot be made.
*
- * Values may be coerced to perform the comparison (see ==, BigDecimal#coerce)
*/
static VALUE
BigDecimal_ge(VALUE self, VALUE r)
@@ -1212,11 +1757,14 @@ BigDecimal_ge(VALUE self, VALUE r)
/*
* call-seq:
- * -big_decimal -> big_decimal
+ * -self -> bigdecimal
+ *
+ * Returns the \BigDecimal negation of self:
*
- * Return the negation of self.
+ * b0 = BigDecimal('1.5')
+ * b1 = -b0 # => -0.15e1
+ * b2 = -b1 # => 0.15e1
*
- * -BigDecimal('5') #=> -0.5e1
*/
static VALUE
@@ -1225,26 +1773,11 @@ BigDecimal_neg(VALUE self)
ENTER(5);
Real *c, *a;
GUARD_OBJ(a, GetVpValue(self, 1));
- GUARD_OBJ(c, VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, a->Prec *(VpBaseFig() + 1)));
VpAsgn(c, a, -1);
- return ToValue(c);
+ return VpCheckGetValue(c);
}
- /*
- * Document-method: BigDecimal#mult
- *
- * call-seq: mult(value, digits)
- *
- * Multiply by the specified value.
- *
- * e.g.
- * c = a.mult(b,n)
- * c = a * b
- *
- * digits:: If specified and less than the number of significant digits of the
- * result, the result is rounded to that number of digits, according
- * to BigDecimal.mode.
- */
static VALUE
BigDecimal_mult(VALUE self, VALUE r)
{
@@ -1254,7 +1787,7 @@ BigDecimal_mult(VALUE self, VALUE r)
GUARD_OBJ(a, GetVpValue(self, 1));
if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ b = GetVpValueWithPrec(r, 0, 1);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
@@ -1267,52 +1800,72 @@ BigDecimal_mult(VALUE self, VALUE r)
SAVE(b);
mx = a->Prec + b->Prec;
- GUARD_OBJ(c, VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx * (VpBaseFig() + 1)));
VpMult(c, a, b);
- return ToValue(c);
+ return VpCheckGetValue(c);
}
static VALUE
-BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
+BigDecimal_divide(VALUE self, VALUE r, Real **c, Real **res, Real **div)
/* For c = self.div(r): with round operation */
{
ENTER(5);
Real *a, *b;
+ ssize_t a_prec, b_prec;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ TypedData_Get_Struct(self, Real, &BigDecimal_data_type, a);
+ SAVE(a);
+
+ VALUE rr = r;
+ if (is_kind_of_BigDecimal(rr)) {
+ /* do nothing */
+ }
+ else if (RB_INTEGER_TYPE_P(r)) {
+ rr = rb_inum_convert_to_BigDecimal(r, 0, true);
+ }
+ else if (RB_TYPE_P(r, T_FLOAT)) {
+ rr = rb_float_convert_to_BigDecimal(r, 0, true);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r, 0);
+ rr = rb_rational_convert_to_BigDecimal(r, a->Prec*BASE_FIG, true);
}
- if (!b) return DoSomeOne(self, r, '/');
- SAVE(b);
+ if (!is_kind_of_BigDecimal(rr)) {
+ return DoSomeOne(self, r, '/');
+ }
+ TypedData_Get_Struct(rr, Real, &BigDecimal_data_type, b);
+ SAVE(b);
*div = b;
- mx = a->Prec + vabs(a->exponent);
- if (mx < b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
- mx++; /* NOTE: An additional digit is needed for the compatibility to
- the version 1.2.1 and the former. */
- mx = (mx + 1) * VpBaseFig();
- GUARD_OBJ((*c), VpCreateRbObject(mx, "#0"));
- GUARD_OBJ((*res), VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+
+ BigDecimal_count_precision_and_scale(self, &a_prec, NULL);
+ BigDecimal_count_precision_and_scale(rr, &b_prec, NULL);
+ mx = (a_prec > b_prec) ? a_prec : b_prec;
+ mx *= 2;
+
+ if (2*BIGDECIMAL_DOUBLE_FIGURES > mx)
+ mx = 2*BIGDECIMAL_DOUBLE_FIGURES;
+
+ GUARD_OBJ((*c), NewZeroWrapNolimit(1, mx + 2*BASE_FIG));
+ GUARD_OBJ((*res), NewZeroWrapNolimit(1, (mx + 1)*2 + 2*BASE_FIG));
VpDivd(*c, *res, a, b);
+
return Qnil;
}
+static VALUE BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod);
+
/* call-seq:
- * a / b -> bigdecimal
- * quo(value) -> bigdecimal
+ * a / b -> bigdecimal
*
* Divide by the specified value.
*
+ * The result precision will be the precision of the larger operand,
+ * but its minimum is 2*Float::DIG.
+ *
* See BigDecimal#div.
+ * See BigDecimal#quo.
*/
static VALUE
BigDecimal_div(VALUE self, VALUE r)
@@ -1320,7 +1873,7 @@ BigDecimal_div(VALUE self, VALUE r)
{
ENTER(5);
Real *c=NULL, *res=NULL, *div = NULL;
- r = BigDecimal_divide(&c, &res, &div, self, r);
+ r = BigDecimal_divide(self, r, &c, &res, &div);
if (!NIL_P(r)) return r; /* coerced by other */
SAVE(c); SAVE(res); SAVE(div);
/* a/b = c + r/b */
@@ -1329,9 +1882,48 @@ BigDecimal_div(VALUE self, VALUE r)
*/
/* Round */
if (VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
- VpInternalRound(c, 0, c->frac[c->Prec-1], (BDIGIT)(VpBaseVal() * (BDIGIT_DBL)res->frac[0] / div->frac[0]));
+ VpInternalRound(c, 0, c->frac[c->Prec-1], (DECDIG)(VpBaseVal() * (DECDIG_DBL)res->frac[0] / div->frac[0]));
+ }
+ return VpCheckGetValue(c);
+}
+
+static VALUE BigDecimal_round(int argc, VALUE *argv, VALUE self);
+
+/* call-seq:
+ * quo(value) -> bigdecimal
+ * quo(value, digits) -> bigdecimal
+ *
+ * Divide by the specified value.
+ *
+ * digits:: If specified and less than the number of significant digits of
+ * the result, the result is rounded to the given number of digits,
+ * according to the rounding mode indicated by BigDecimal.mode.
+ *
+ * If digits is 0 or omitted, the result is the same as for the
+ * / operator.
+ *
+ * See BigDecimal#/.
+ * See BigDecimal#div.
+ */
+static VALUE
+BigDecimal_quo(int argc, VALUE *argv, VALUE self)
+{
+ VALUE value, digits, result;
+ SIGNED_VALUE n = -1;
+
+ argc = rb_scan_args(argc, argv, "11", &value, &digits);
+ if (argc > 1) {
+ n = check_int_precision(digits);
+ }
+
+ if (n > 0) {
+ result = BigDecimal_div2(self, value, digits);
}
- return ToValue(c);
+ else {
+ result = BigDecimal_div(self, value);
+ }
+
+ return result;
}
/*
@@ -1344,77 +1936,106 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
ENTER(8);
Real *c=NULL, *d=NULL, *res=NULL;
Real *a, *b;
+ ssize_t a_prec, b_prec;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ TypedData_Get_Struct(self, Real, &BigDecimal_data_type, a);
+ SAVE(a);
+
+ VALUE rr = r;
+ if (is_kind_of_BigDecimal(rr)) {
+ /* do nothing */
+ }
+ else if (RB_INTEGER_TYPE_P(r)) {
+ rr = rb_inum_convert_to_BigDecimal(r, 0, true);
+ }
+ else if (RB_TYPE_P(r, T_FLOAT)) {
+ rr = rb_float_convert_to_BigDecimal(r, 0, true);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
+ rr = rb_rational_convert_to_BigDecimal(r, a->Prec*BASE_FIG, true);
}
- else {
- b = GetVpValue(r, 0);
+
+ if (!is_kind_of_BigDecimal(rr)) {
+ return Qfalse;
}
- if (!b) return Qfalse;
+ TypedData_Get_Struct(rr, Real, &BigDecimal_data_type, b);
SAVE(b);
if (VpIsNaN(a) || VpIsNaN(b)) goto NaN;
if (VpIsInf(a) && VpIsInf(b)) goto NaN;
if (VpIsZero(b)) {
- rb_raise(rb_eZeroDivError, "divided by 0");
+ rb_raise(rb_eZeroDivError, "divided by 0");
}
if (VpIsInf(a)) {
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- VpSetInf(d, (SIGNED_VALUE)(VpGetSign(a) == VpGetSign(b) ? 1 : -1));
- GUARD_OBJ(c, VpCreateRbObject(1, "NaN"));
- *div = d;
- *mod = c;
- return Qtrue;
+ if (VpGetSign(a) == VpGetSign(b)) {
+ VALUE inf = BigDecimal_positive_infinity();
+ TypedData_Get_Struct(inf, Real, &BigDecimal_data_type, *div);
+ }
+ else {
+ VALUE inf = BigDecimal_negative_infinity();
+ TypedData_Get_Struct(inf, Real, &BigDecimal_data_type, *div);
+ }
+ VALUE nan = BigDecimal_nan();
+ TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *mod);
+ return Qtrue;
}
if (VpIsInf(b)) {
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- *div = d;
- *mod = a;
- return Qtrue;
+ VALUE zero = BigDecimal_positive_zero();
+ TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *div);
+ *mod = a;
+ return Qtrue;
}
if (VpIsZero(a)) {
- GUARD_OBJ(c, VpCreateRbObject(1, "0"));
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- *div = d;
- *mod = c;
- return Qtrue;
- }
-
- mx = a->Prec + vabs(a->exponent);
- if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
- mx = (mx + 1) * VpBaseFig();
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+ VALUE zero = BigDecimal_positive_zero();
+ TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *div);
+ TypedData_Get_Struct(zero, Real, &BigDecimal_data_type, *mod);
+ return Qtrue;
+ }
+
+ BigDecimal_count_precision_and_scale(self, &a_prec, NULL);
+ BigDecimal_count_precision_and_scale(rr, &b_prec, NULL);
+
+ mx = (a_prec > b_prec) ? a_prec : b_prec;
+ mx *= 2;
+
+ if (2*BIGDECIMAL_DOUBLE_FIGURES > mx)
+ mx = 2*BIGDECIMAL_DOUBLE_FIGURES;
+
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx + 2*BASE_FIG));
+ GUARD_OBJ(res, NewZeroWrapNolimit(1, mx*2 + 2*BASE_FIG));
VpDivd(c, res, a, b);
- mx = c->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(d, VpCreateRbObject(mx, "0"));
+
+ mx = c->Prec * BASE_FIG;
+ GUARD_OBJ(d, NewZeroWrapLimited(1, mx));
VpActiveRound(d, c, VP_ROUND_DOWN, 0);
+
VpMult(res, d, b);
VpAddSub(c, a, res, -1);
+
if (!VpIsZero(c) && (VpGetSign(a) * VpGetSign(b) < 0)) {
- VpAddSub(res, d, VpOne(), -1);
- GUARD_OBJ(d, VpCreateRbObject(GetAddSubPrec(c, b)*(VpBaseFig() + 1), "0"));
- VpAddSub(d, c, b, 1);
- *div = res;
- *mod = d;
- } else {
- *div = d;
- *mod = c;
+ /* result adjustment for negative case */
+ res = rbd_reallocate_struct(res, d->MaxPrec);
+ res->MaxPrec = d->MaxPrec;
+ VpAddSub(res, d, VpOne(), -1);
+ GUARD_OBJ(d, NewZeroWrapLimited(1, GetAddSubPrec(c, b) * 2*BASE_FIG));
+ VpAddSub(d, c, b, 1);
+ *div = res;
+ *mod = d;
+ }
+ else {
+ *div = d;
+ *mod = c;
}
return Qtrue;
-NaN:
- GUARD_OBJ(c, VpCreateRbObject(1, "NaN"));
- GUARD_OBJ(d, VpCreateRbObject(1, "NaN"));
- *div = d;
- *mod = c;
+ NaN:
+ {
+ VALUE nan = BigDecimal_nan();
+ TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *div);
+ TypedData_Get_Struct(nan, Real, &BigDecimal_data_type, *mod);
+ }
return Qtrue;
}
@@ -1434,7 +2055,7 @@ BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
if (BigDecimal_DoDivmod(self, r, &div, &mod)) {
SAVE(div); SAVE(mod);
- return ToValue(mod);
+ return VpCheckGetValue(mod);
}
return DoSomeOne(self, r, '%');
}
@@ -1449,7 +2070,7 @@ BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
GUARD_OBJ(a, GetVpValue(self, 1));
if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
+ b = GetVpValueWithPrec(r, 0, 1);
}
else if (RB_TYPE_P(r, T_RATIONAL)) {
b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
@@ -1462,17 +2083,17 @@ BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
SAVE(b);
mx = (a->MaxPrec + b->MaxPrec) *VpBaseFig();
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
- GUARD_OBJ(rr, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
- GUARD_OBJ(ff, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
+ GUARD_OBJ(res, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1)));
+ GUARD_OBJ(rr, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1)));
+ GUARD_OBJ(ff, NewZeroWrapNolimit(1, (mx+1) * 2 + (VpBaseFig() + 1)));
VpDivd(c, res, a, b);
mx = c->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(d, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(f, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(d, NewZeroWrapLimited(1, mx));
+ GUARD_OBJ(f, NewZeroWrapLimited(1, mx));
VpActiveRound(d, c, VP_ROUND_DOWN, 0); /* 0: round off */
@@ -1499,7 +2120,7 @@ BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
Real *d, *rv = 0;
f = BigDecimal_divremain(self, r, &d, &rv);
if (!NIL_P(f)) return f;
- return ToValue(rv);
+ return VpCheckGetValue(rv);
}
/* call-seq:
@@ -1532,13 +2153,14 @@ BigDecimal_divmod(VALUE self, VALUE r)
if (BigDecimal_DoDivmod(self, r, &div, &mod)) {
SAVE(div); SAVE(mod);
- return rb_assoc_new(ToValue(div), ToValue(mod));
+ return rb_assoc_new(VpCheckGetValue(div), VpCheckGetValue(mod));
}
return DoSomeOne(self,r,rb_intern("divmod"));
}
/*
- * See BigDecimal#quo
+ * Do the same manner as Float#div when n is nil.
+ * Do the same manner as BigDecimal#quo when n is 0.
*/
static inline VALUE
BigDecimal_div2(VALUE self, VALUE b, VALUE n)
@@ -1550,13 +2172,13 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
Real *div = NULL;
Real *mod;
if (BigDecimal_DoDivmod(self, b, &div, &mod)) {
- return BigDecimal_to_i(ToValue(div));
+ return BigDecimal_to_i(VpCheckGetValue(div));
}
return DoSomeOne(self, b, rb_intern("div"));
}
/* div in BigDecimal sense */
- ix = GetPrecisionInt(n);
+ ix = check_int_precision(n);
if (ix == 0) {
return BigDecimal_div(self, b);
}
@@ -1564,18 +2186,25 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
Real *res = NULL;
Real *av = NULL, *bv = NULL, *cv = NULL;
size_t mx = ix + VpBaseFig()*2;
+ size_t b_prec = ix;
size_t pl = VpSetPrecLimit(0);
- GUARD_OBJ(cv, VpCreateRbObject(mx + VpBaseFig(), "0"));
+ GUARD_OBJ(cv, NewZeroWrapLimited(1, mx + VpBaseFig()));
GUARD_OBJ(av, GetVpValue(self, 1));
- GUARD_OBJ(bv, GetVpValue(b, 1));
+ /* TODO: I want to refactor this precision control for a float value later
+ * by introducing an implicit conversion function instead of
+ * GetVpValueWithPrec. */
+ if (RB_FLOAT_TYPE_P(b) && b_prec > BIGDECIMAL_DOUBLE_FIGURES) {
+ b_prec = BIGDECIMAL_DOUBLE_FIGURES;
+ }
+ GUARD_OBJ(bv, GetVpValueWithPrec(b, b_prec, 1));
mx = av->Prec + bv->Prec + 2;
if (mx <= cv->MaxPrec) mx = cv->MaxPrec + 1;
- GUARD_OBJ(res, VpCreateRbObject((mx * 2 + 2)*VpBaseFig(), "#0"));
+ GUARD_OBJ(res, NewZeroWrapNolimit(1, (mx * 2 + 2)*VpBaseFig()));
VpDivd(cv, res, av, bv);
VpSetPrecLimit(pl);
VpLeftRound(cv, VpGetRoundMode(), ix);
- return ToValue(cv);
+ return VpCheckGetValue(cv);
}
}
@@ -1583,6 +2212,7 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
* Document-method: BigDecimal#div
*
* call-seq:
+ * div(value) -> integer
* div(value, digits) -> bigdecimal or integer
*
* Divide by the specified value.
@@ -1597,6 +2227,9 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
* If digits is not specified, the result is an integer,
* by analogy with Float#div; see also BigDecimal#divmod.
*
+ * See BigDecimal#/.
+ * See BigDecimal#quo.
+ *
* Examples:
*
* a = BigDecimal("4")
@@ -1620,12 +2253,37 @@ BigDecimal_div3(int argc, VALUE *argv, VALUE self)
return BigDecimal_div2(self, b, n);
}
+ /*
+ * call-seq:
+ * add(value, ndigits) -> new_bigdecimal
+ *
+ * Returns the \BigDecimal sum of +self+ and +value+
+ * with a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is less than the number of significant digits
+ * in the sum, the sum is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
+ *
+ * Examples:
+ *
+ * # Set the rounding mode.
+ * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up)
+ * b = BigDecimal('111111.111')
+ * b.add(1, 0) # => 0.111112111e6
+ * b.add(1, 3) # => 0.111e6
+ * b.add(1, 6) # => 0.111112e6
+ * b.add(1, 15) # => 0.111112111e6
+ * b.add(1.0, 15) # => 0.111112111e6
+ * b.add(Rational(1, 1), 15) # => 0.111112111e6
+ *
+ */
+
static VALUE
BigDecimal_add2(VALUE self, VALUE b, VALUE n)
{
ENTER(2);
Real *cv;
- SIGNED_VALUE mx = GetPrecisionInt(n);
+ SIGNED_VALUE mx = check_int_precision(n);
if (mx == 0) return BigDecimal_add(self, b);
else {
size_t pl = VpSetPrecLimit(0);
@@ -1633,7 +2291,7 @@ BigDecimal_add2(VALUE self, VALUE b, VALUE n)
VpSetPrecLimit(pl);
GUARD_OBJ(cv, GetVpValue(c, 1));
VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ return VpCheckGetValue(cv);
}
}
@@ -1655,7 +2313,7 @@ BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
{
ENTER(2);
Real *cv;
- SIGNED_VALUE mx = GetPrecisionInt(n);
+ SIGNED_VALUE mx = check_int_precision(n);
if (mx == 0) return BigDecimal_sub(self, b);
else {
size_t pl = VpSetPrecLimit(0);
@@ -1663,17 +2321,42 @@ BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
VpSetPrecLimit(pl);
GUARD_OBJ(cv, GetVpValue(c, 1));
VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ return VpCheckGetValue(cv);
}
}
+ /*
+ * call-seq:
+ * mult(other, ndigits) -> bigdecimal
+ *
+ * Returns the \BigDecimal product of +self+ and +value+
+ * with a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is less than the number of significant digits
+ * in the sum, the sum is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
+ *
+ * Examples:
+ *
+ * # Set the rounding mode.
+ * BigDecimal.mode(BigDecimal::ROUND_MODE, :half_up)
+ * b = BigDecimal('555555.555')
+ * b.mult(3, 0) # => 0.1666666665e7
+ * b.mult(3, 3) # => 0.167e7
+ * b.mult(3, 6) # => 0.166667e7
+ * b.mult(3, 15) # => 0.1666666665e7
+ * b.mult(3.0, 0) # => 0.1666666665e7
+ * b.mult(Rational(3, 1), 0) # => 0.1666666665e7
+ * b.mult(Complex(3, 0), 0) # => (0.1666666665e7+0.0i)
+ *
+ */
static VALUE
BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
{
ENTER(2);
Real *cv;
- SIGNED_VALUE mx = GetPrecisionInt(n);
+ SIGNED_VALUE mx = check_int_precision(n);
if (mx == 0) return BigDecimal_mult(self, b);
else {
size_t pl = VpSetPrecLimit(0);
@@ -1681,18 +2364,19 @@ BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
VpSetPrecLimit(pl);
GUARD_OBJ(cv, GetVpValue(c, 1));
VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ return VpCheckGetValue(cv);
}
}
/*
* call-seq:
- * big_decimal.abs -> big_decimal
+ * abs -> bigdecimal
+ *
+ * Returns the \BigDecimal absolute value of +self+:
*
- * Returns the absolute value, as a BigDecimal.
+ * BigDecimal('5').abs # => 0.5e1
+ * BigDecimal('-3').abs # => 0.3e1
*
- * BigDecimal('5').abs #=> 0.5e1
- * BigDecimal('-3').abs #=> 0.3e1
*/
static VALUE
@@ -1704,10 +2388,10 @@ BigDecimal_abs(VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpAsgn(c, a, 1);
VpChangeSign(c, 1);
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -1727,11 +2411,12 @@ BigDecimal_sqrt(VALUE self, VALUE nFig)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- n = GetPrecisionInt(nFig) + VpDblFig() + BASE_FIG;
+ n = check_int_precision(nFig);
+ n += VpDblFig() + VpBaseFig();
if (mx <= n) mx = n;
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpSqrt(c, a);
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* Return the integer part of the number, as a BigDecimal.
@@ -1745,9 +2430,9 @@ BigDecimal_fix(VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpActiveRound(c, a, VP_ROUND_DOWN, 0); /* 0: round off */
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -1767,10 +2452,10 @@ BigDecimal_fix(VALUE self)
* more than that many digits.
*
* If n is specified and negative, at least that many digits to the left of the
- * decimal point will be 0 in the result.
+ * decimal point will be 0 in the result, and return value will be an Integer.
*
* BigDecimal('3.14159').round(3) #=> 3.142
- * BigDecimal('13345.234').round(-2) #=> 13300.0
+ * BigDecimal('13345.234').round(-2) #=> 13300
*
* The value of the optional mode argument can be used to determine how
* rounding is performed; see BigDecimal.mode.
@@ -1783,6 +2468,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
int iLoc = 0;
VALUE vLoc;
VALUE vRound;
+ int round_to_int = 0;
size_t mx, pl;
unsigned short sw = VpGetRoundMode();
@@ -1790,6 +2476,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
switch (rb_scan_args(argc, argv, "02", &vLoc, &vRound)) {
case 0:
iLoc = 0;
+ round_to_int = 1;
break;
case 1:
if (RB_TYPE_P(vLoc, T_HASH)) {
@@ -1797,6 +2484,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
}
else {
iLoc = NUM2INT(vLoc);
+ if (iLoc < 1) round_to_int = 1;
}
break;
case 2:
@@ -1815,13 +2503,13 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
pl = VpSetPrecLimit(0);
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpSetPrecLimit(pl);
VpActiveRound(c, a, sw, iLoc);
- if (argc == 0) {
- return BigDecimal_to_i(ToValue(c));
+ if (round_to_int) {
+ return BigDecimal_to_i(VpCheckGetValue(c));
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -1861,13 +2549,13 @@ BigDecimal_truncate(int argc, VALUE *argv, VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpSetPrecLimit(pl);
VpActiveRound(c, a, VP_ROUND_DOWN, iLoc); /* 0: truncate */
if (argc == 0) {
- return BigDecimal_to_i(ToValue(c));
+ return BigDecimal_to_i(VpCheckGetValue(c));
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* Return the fractional part of the number, as a BigDecimal.
@@ -1881,9 +2569,9 @@ BigDecimal_frac(VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpFrac(c, a);
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -1921,16 +2609,16 @@ BigDecimal_floor(int argc, VALUE *argv, VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpSetPrecLimit(pl);
VpActiveRound(c, a, VP_ROUND_FLOOR, iLoc);
#ifdef BIGDECIMAL_DEBUG
VPrint(stderr, "floor: c=%\n", c);
#endif
if (argc == 0) {
- return BigDecimal_to_i(ToValue(c));
+ return BigDecimal_to_i(VpCheckGetValue(c));
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -1967,13 +2655,13 @@ BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
GUARD_OBJ(a, GetVpValue(self, 1));
mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c, NewZeroWrapLimited(1, mx));
VpSetPrecLimit(pl);
VpActiveRound(c, a, VP_ROUND_CEIL, iLoc);
if (argc == 0) {
- return BigDecimal_to_i(ToValue(c));
+ return BigDecimal_to_i(VpCheckGetValue(c));
}
- return ToValue(c);
+ return VpCheckGetValue(c);
}
/* call-seq:
@@ -2067,14 +2755,14 @@ BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
nc += (nc + mc - 1) / mc + 1;
}
- str = rb_str_new(0, nc);
+ str = rb_usascii_str_new(0, nc);
psz = RSTRING_PTR(str);
if (fmt) {
- VpToFString(vp, psz, mc, fPlus);
+ VpToFString(vp, psz, RSTRING_LEN(str), mc, fPlus);
}
else {
- VpToString (vp, psz, mc, fPlus);
+ VpToString (vp, psz, RSTRING_LEN(str), mc, fPlus);
}
rb_str_resize(str, strlen(psz));
return str;
@@ -2116,7 +2804,7 @@ BigDecimal_split(VALUE self)
GUARD_OBJ(vp, GetVpValue(self, 1));
str = rb_str_new(0, VpNumOfChars(vp, "E"));
psz1 = RSTRING_PTR(str);
- VpSzMantissa(vp, psz1);
+ VpSzMantissa(vp, psz1, RSTRING_LEN(str));
s = 1;
if(psz1[0] == '-') {
size_t len = strlen(psz1 + 1);
@@ -2132,7 +2820,7 @@ BigDecimal_split(VALUE self)
rb_ary_push(obj, str);
rb_str_resize(str, strlen(psz1));
rb_ary_push(obj, INT2FIX(10));
- rb_ary_push(obj, INT2NUM(e));
+ rb_ary_push(obj, SSIZET2NUM(e));
return obj;
}
@@ -2145,7 +2833,7 @@ static VALUE
BigDecimal_exponent(VALUE self)
{
ssize_t e = VpExponent10(GetVpValue(self, 1));
- return INT2NUM(e);
+ return SSIZET2NUM(e);
}
/* Returns a string representation of self.
@@ -2165,7 +2853,7 @@ BigDecimal_inspect(VALUE self)
nc = VpNumOfChars(vp, "E");
str = rb_str_new(0, nc);
- VpToString(vp, RSTRING_PTR(str), 0, 0);
+ VpToString(vp, RSTRING_PTR(str), RSTRING_LEN(str), 0, 0);
rb_str_resize(str, strlen(RSTRING_PTR(str)));
return str;
}
@@ -2269,13 +2957,13 @@ is_even(VALUE x)
}
static VALUE
-rmpd_power_by_big_decimal(Real const* x, Real const* exp, ssize_t const n)
+bigdecimal_power_by_bigdecimal(Real const* x, Real const* exp, ssize_t const n)
{
VALUE log_x, multiplied, y;
volatile VALUE obj = exp->obj;
if (VpIsZero(exp)) {
- return ToValue(VpCreateRbObject(n, "1"));
+ return VpCheckGetValue(NewOneWrapLimited(1, n));
}
log_x = BigMath_log(x->obj, SSIZET2NUM(n+1));
@@ -2313,10 +3001,10 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
n = NIL_P(prec) ? (ssize_t)(x->Prec*VpBaseFig()) : NUM2SSIZET(prec);
if (VpIsNaN(x)) {
- y = VpCreateRbObject(n, "0");
- RB_GC_GUARD(y->obj);
- VpSetNaN(y);
- return ToValue(y);
+ y = NewZeroWrapLimited(1, n);
+ VpSetNaN(y);
+ RB_GC_GUARD(y->obj);
+ return VpCheckGetValue(y);
}
retry:
@@ -2338,7 +3026,10 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
}
goto retry;
}
- exp = GetVpValueWithPrec(vexp, DBL_DIG+1, 1);
+ if (NIL_P(prec)) {
+ n += BIGDECIMAL_DOUBLE_FIGURES;
+ }
+ exp = GetVpValueWithPrec(vexp, 0, 1);
break;
case T_RATIONAL:
@@ -2353,6 +3044,9 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
goto retry;
}
exp = GetVpValueWithPrec(vexp, n, 1);
+ if (NIL_P(prec)) {
+ n += n;
+ }
break;
case T_DATA:
@@ -2363,6 +3057,10 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
vexp = BigDecimal_to_i(vexp);
goto retry;
}
+ if (NIL_P(prec)) {
+ GUARD_OBJ(y, GetVpValue(vexp, 1));
+ n += y->Prec*VpBaseFig();
+ }
exp = DATA_PTR(vexp);
break;
}
@@ -2374,136 +3072,126 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
}
if (VpIsZero(x)) {
- if (is_negative(vexp)) {
- y = VpCreateRbObject(n, "#0");
- RB_GC_GUARD(y->obj);
- if (BIGDECIMAL_NEGATIVE_P(x)) {
- if (is_integer(vexp)) {
- if (is_even(vexp)) {
- /* (-0) ** (-even_integer) -> Infinity */
- VpSetPosInf(y);
- }
- else {
- /* (-0) ** (-odd_integer) -> -Infinity */
- VpSetNegInf(y);
- }
- }
- else {
- /* (-0) ** (-non_integer) -> Infinity */
- VpSetPosInf(y);
- }
- }
- else {
- /* (+0) ** (-num) -> Infinity */
- VpSetPosInf(y);
- }
- return ToValue(y);
- }
- else if (is_zero(vexp)) {
- return ToValue(VpCreateRbObject(n, "1"));
- }
- else {
- return ToValue(VpCreateRbObject(n, "0"));
- }
+ if (is_negative(vexp)) {
+ y = NewZeroWrapNolimit(1, n);
+ if (BIGDECIMAL_NEGATIVE_P(x)) {
+ if (is_integer(vexp)) {
+ if (is_even(vexp)) {
+ /* (-0) ** (-even_integer) -> Infinity */
+ VpSetPosInf(y);
+ }
+ else {
+ /* (-0) ** (-odd_integer) -> -Infinity */
+ VpSetNegInf(y);
+ }
+ }
+ else {
+ /* (-0) ** (-non_integer) -> Infinity */
+ VpSetPosInf(y);
+ }
+ }
+ else {
+ /* (+0) ** (-num) -> Infinity */
+ VpSetPosInf(y);
+ }
+ RB_GC_GUARD(y->obj);
+ return VpCheckGetValue(y);
+ }
+ else if (is_zero(vexp)) {
+ return VpCheckGetValue(NewOneWrapLimited(1, n));
+ }
+ else {
+ return VpCheckGetValue(NewZeroWrapLimited(1, n));
+ }
}
if (is_zero(vexp)) {
- return ToValue(VpCreateRbObject(n, "1"));
+ return VpCheckGetValue(NewOneWrapLimited(1, n));
}
else if (is_one(vexp)) {
- return self;
+ return self;
}
if (VpIsInf(x)) {
- if (is_negative(vexp)) {
- if (BIGDECIMAL_NEGATIVE_P(x)) {
- if (is_integer(vexp)) {
- if (is_even(vexp)) {
- /* (-Infinity) ** (-even_integer) -> +0 */
- return ToValue(VpCreateRbObject(n, "0"));
- }
- else {
- /* (-Infinity) ** (-odd_integer) -> -0 */
- return ToValue(VpCreateRbObject(n, "-0"));
- }
- }
- else {
- /* (-Infinity) ** (-non_integer) -> -0 */
- return ToValue(VpCreateRbObject(n, "-0"));
- }
- }
- else {
- return ToValue(VpCreateRbObject(n, "0"));
- }
- }
- else {
- y = VpCreateRbObject(n, "0");
- if (BIGDECIMAL_NEGATIVE_P(x)) {
- if (is_integer(vexp)) {
- if (is_even(vexp)) {
- VpSetPosInf(y);
- }
- else {
- VpSetNegInf(y);
- }
- }
- else {
- /* TODO: support complex */
- rb_raise(rb_eMathDomainError,
- "a non-integral exponent for a negative base");
- }
- }
- else {
- VpSetPosInf(y);
- }
- return ToValue(y);
- }
+ if (is_negative(vexp)) {
+ if (BIGDECIMAL_NEGATIVE_P(x)) {
+ if (is_integer(vexp)) {
+ if (is_even(vexp)) {
+ /* (-Infinity) ** (-even_integer) -> +0 */
+ return VpCheckGetValue(NewZeroWrapLimited(1, n));
+ }
+ else {
+ /* (-Infinity) ** (-odd_integer) -> -0 */
+ return VpCheckGetValue(NewZeroWrapLimited(-1, n));
+ }
+ }
+ else {
+ /* (-Infinity) ** (-non_integer) -> -0 */
+ return VpCheckGetValue(NewZeroWrapLimited(-1, n));
+ }
+ }
+ else {
+ return VpCheckGetValue(NewZeroWrapLimited(1, n));
+ }
+ }
+ else {
+ y = NewZeroWrapLimited(1, n);
+ if (BIGDECIMAL_NEGATIVE_P(x)) {
+ if (is_integer(vexp)) {
+ if (is_even(vexp)) {
+ VpSetPosInf(y);
+ }
+ else {
+ VpSetNegInf(y);
+ }
+ }
+ else {
+ /* TODO: support complex */
+ rb_raise(rb_eMathDomainError,
+ "a non-integral exponent for a negative base");
+ }
+ }
+ else {
+ VpSetPosInf(y);
+ }
+ return VpCheckGetValue(y);
+ }
}
if (exp != NULL) {
- return rmpd_power_by_big_decimal(x, exp, n);
+ return bigdecimal_power_by_bigdecimal(x, exp, n);
}
else if (RB_TYPE_P(vexp, T_BIGNUM)) {
- VALUE abs_value = BigDecimal_abs(self);
- if (is_one(abs_value)) {
- return ToValue(VpCreateRbObject(n, "1"));
- }
- else if (RTEST(rb_funcall(abs_value, '<', 1, INT2FIX(1)))) {
- if (is_negative(vexp)) {
- y = VpCreateRbObject(n, "0");
- if (is_even(vexp)) {
- VpSetInf(y, VpGetSign(x));
- }
- else {
- VpSetInf(y, -VpGetSign(x));
- }
- return ToValue(y);
- }
- else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) {
- return ToValue(VpCreateRbObject(n, "-0"));
- }
- else {
- return ToValue(VpCreateRbObject(n, "0"));
- }
- }
- else {
- if (is_positive(vexp)) {
- y = VpCreateRbObject(n, "0");
- if (is_even(vexp)) {
- VpSetInf(y, VpGetSign(x));
- }
- else {
- VpSetInf(y, -VpGetSign(x));
- }
- return ToValue(y);
- }
- else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) {
- return ToValue(VpCreateRbObject(n, "-0"));
- }
- else {
- return ToValue(VpCreateRbObject(n, "0"));
- }
- }
+ VALUE abs_value = BigDecimal_abs(self);
+ if (is_one(abs_value)) {
+ return VpCheckGetValue(NewOneWrapLimited(1, n));
+ }
+ else if (RTEST(rb_funcall(abs_value, '<', 1, INT2FIX(1)))) {
+ if (is_negative(vexp)) {
+ y = NewZeroWrapLimited(1, n);
+ VpSetInf(y, (is_even(vexp) ? 1 : -1) * VpGetSign(x));
+ return VpCheckGetValue(y);
+ }
+ else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) {
+ return VpCheckGetValue(NewZeroWrapLimited(-1, n));
+ }
+ else {
+ return VpCheckGetValue(NewZeroWrapLimited(1, n));
+ }
+ }
+ else {
+ if (is_positive(vexp)) {
+ y = NewZeroWrapLimited(1, n);
+ VpSetInf(y, (is_even(vexp) ? 1 : -1) * VpGetSign(x));
+ return VpCheckGetValue(y);
+ }
+ else if (BIGDECIMAL_NEGATIVE_P(x) && is_even(vexp)) {
+ return VpCheckGetValue(NewZeroWrapLimited(-1, n));
+ }
+ else {
+ return VpCheckGetValue(NewZeroWrapLimited(1, n));
+ }
+ }
}
int_exp = FIX2LONG(vexp);
@@ -2512,25 +3200,31 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
if (ma == 0) ma = 1;
if (VpIsDef(x)) {
- mp = x->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(y, VpCreateRbObject(mp * (ma + 1), "0"));
+ mp = x->Prec * (VpBaseFig() + 1);
+ GUARD_OBJ(y, NewZeroWrapLimited(1, mp * (ma + 1)));
}
else {
- GUARD_OBJ(y, VpCreateRbObject(1, "0"));
+ GUARD_OBJ(y, NewZeroWrapLimited(1, 1));
}
- VpPower(y, x, int_exp);
+ VpPowerByInt(y, x, int_exp);
if (!NIL_P(prec) && VpIsDef(y)) {
- VpMidRound(y, VpGetRoundMode(), n);
+ VpMidRound(y, VpGetRoundMode(), n);
}
- return ToValue(y);
+ return VpCheckGetValue(y);
}
-/* call-seq:
- * a ** n -> bigdecimal
+/* call-seq:
+ * self ** other -> bigdecimal
*
- * Returns the value raised to the power of n.
+ * Returns the \BigDecimal value of +self+ raised to power +other+:
+ *
+ * b = BigDecimal('3.14')
+ * b ** 2 # => 0.98596e1
+ * b ** 2.0 # => 0.98596e1
+ * b ** Rational(2, 1) # => 0.98596e1
+ *
+ * Related: BigDecimal#power.
*
- * See BigDecimal#power.
*/
static VALUE
BigDecimal_power_op(VALUE self, VALUE exp)
@@ -2584,169 +3278,486 @@ opts_exception_p(VALUE opts)
}
#endif
-static Real *
-VpNewVarArg(int argc, VALUE *argv)
+static VALUE
+check_exception(VALUE bd)
{
- size_t mf;
- VALUE opts = Qnil;
- VALUE nFig;
- VALUE iniValue;
- double d;
- int exc;
+ assert(is_kind_of_BigDecimal(bd));
- argc = rb_scan_args(argc, argv, "11:", &iniValue, &nFig, &opts);
- exc = opts_exception_p(opts);
+ Real *vp;
+ TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp);
+ VpCheckGetValue(vp); /* VpCheckGetValue performs exception check */
+
+ return bd;
+}
- if (argc == 1) {
- mf = 0;
+static VALUE
+rb_uint64_convert_to_BigDecimal(uint64_t uval, RB_UNUSED_VAR(size_t digs), int raise_exception)
+{
+ VALUE obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, 0);
+
+ Real *vp;
+ if (uval == 0) {
+ vp = rbd_allocate_struct(1);
+ vp->MaxPrec = 1;
+ vp->Prec = 1;
+ vp->exponent = 1;
+ VpSetZero(vp, 1);
+ vp->frac[0] = 0;
+ }
+ else if (uval < BASE) {
+ vp = rbd_allocate_struct(1);
+ vp->MaxPrec = 1;
+ vp->Prec = 1;
+ vp->exponent = 1;
+ VpSetSign(vp, 1);
+ vp->frac[0] = (DECDIG)uval;
}
else {
- /* expand GetPrecisionInt for exception suppression */
- ssize_t n = NUM2INT(nFig);
- if (n < 0) {
- if (!exc) {
- return NULL;
+ DECDIG buf[BIGDECIMAL_INT64_MAX_LENGTH] = {0,};
+ DECDIG r = uval % BASE;
+ size_t len = 0, ntz = 0;
+ if (r == 0) {
+ // Count and skip trailing zeros
+ for (; r == 0 && uval > 0; ++ntz) {
+ uval /= BASE;
+ r = uval % BASE;
}
- rb_raise(rb_eArgError, "negative precision");
}
- mf = (size_t)n;
- }
-
- if (SPECIAL_CONST_P(iniValue)) {
- switch (iniValue) {
- case Qnil:
- if (!exc) return NULL;
- rb_raise(rb_eTypeError, "can't convert nil into BigDecimal");
- case Qtrue:
- if (!exc) return NULL;
- rb_raise(rb_eTypeError, "can't convert true into BigDecimal");
- case Qfalse:
- if (!exc) return NULL;
- rb_raise(rb_eTypeError, "can't convert false into BigDecimal");
- default:
- break;
+ for (; uval > 0; ++len) {
+ // Store digits
+ buf[BIGDECIMAL_INT64_MAX_LENGTH - len - 1] = r;
+ uval /= BASE;
+ r = uval % BASE;
}
+
+ const size_t exp = len + ntz;
+ vp = rbd_allocate_struct(len);
+ vp->MaxPrec = len;
+ vp->Prec = len;
+ vp->exponent = exp;
+ VpSetSign(vp, 1);
+ MEMCPY(vp->frac, buf + BIGDECIMAL_INT64_MAX_LENGTH - len, DECDIG, len);
}
- switch (TYPE(iniValue)) {
- case T_DATA:
- if (is_kind_of_BigDecimal(iniValue)) {
- return DATA_PTR(iniValue);
- }
- break;
+ return BigDecimal_wrap_struct(obj, vp);
+}
- case T_FIXNUM:
- /* fall through */
- case T_BIGNUM:
- return GetVpValue(iniValue, 1);
+static VALUE
+rb_int64_convert_to_BigDecimal(int64_t ival, size_t digs, int raise_exception)
+{
+ const uint64_t uval = (ival < 0) ? (((uint64_t)-(ival+1))+1) : (uint64_t)ival;
+ VALUE bd = rb_uint64_convert_to_BigDecimal(uval, digs, raise_exception);
+ if (ival < 0) {
+ Real *vp;
+ TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp);
+ VpSetSign(vp, -1);
+ }
+ return bd;
+}
- case T_FLOAT:
- d = RFLOAT_VALUE(iniValue);
- if (!isfinite(d)) {
- Real *pv = VpCreateRbObject(1, NULL);
- VpDtoV(pv, d);
- return pv;
+static VALUE
+rb_big_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_exception)
+{
+ assert(RB_TYPE_P(val, T_BIGNUM));
+
+ int leading_zeros;
+ size_t size = rb_absint_size(val, &leading_zeros);
+ int sign = FIX2INT(rb_big_cmp(val, INT2FIX(0)));
+ if (sign < 0 && leading_zeros == 0) {
+ size += 1;
+ }
+ if (size <= sizeof(long)) {
+ if (sign < 0) {
+ return rb_int64_convert_to_BigDecimal(NUM2LONG(val), digs, raise_exception);
}
- if (mf > DBL_DIG+1) {
- if (!exc) {
- return NULL;
- }
- rb_raise(rb_eArgError, "precision too large.");
- }
- /* fall through */
- case T_RATIONAL:
- if (NIL_P(nFig)) {
- if (!exc) {
- return NULL;
- }
- rb_raise(rb_eArgError,
- "can't omit precision for a %"PRIsVALUE".",
- RB_OBJ_CLASSNAME(iniValue));
- }
- return GetVpValueWithPrec(iniValue, mf, 1);
+ else {
+ return rb_uint64_convert_to_BigDecimal(NUM2ULONG(val), digs, raise_exception);
+ }
+ }
+#if defined(SIZEOF_LONG_LONG) && SIZEOF_LONG < SIZEOF_LONG_LONG
+ else if (size <= sizeof(LONG_LONG)) {
+ if (sign < 0) {
+ return rb_int64_convert_to_BigDecimal(NUM2LL(val), digs, raise_exception);
+ }
+ else {
+ return rb_uint64_convert_to_BigDecimal(NUM2ULL(val), digs, raise_exception);
+ }
+ }
+#endif
+ else {
+ VALUE str = rb_big2str(val, 10);
+ Real *vp = VpCreateRbObject(RSTRING_LEN(str) + BASE_FIG + 1,
+ RSTRING_PTR(str), true);
+ RB_GC_GUARD(str);
+ return check_exception(vp->obj);
+ }
+}
+
+static VALUE
+rb_inum_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_exception)
+{
+ assert(RB_INTEGER_TYPE_P(val));
+ if (FIXNUM_P(val)) {
+ return rb_int64_convert_to_BigDecimal(FIX2LONG(val), digs, raise_exception);
+ }
+ else {
+ return rb_big_convert_to_BigDecimal(val, digs, raise_exception);
+ }
+}
+
+static VALUE
+rb_float_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
+{
+ assert(RB_FLOAT_TYPE_P(val));
+
+ double d = RFLOAT_VALUE(val);
+
+ if (isnan(d)) {
+ VALUE obj = BigDecimal_nan();
+ return check_exception(obj);
+ }
+ else if (isinf(d)) {
+ VALUE obj;
+ if (d > 0) {
+ obj = BigDecimal_positive_infinity();
+ }
+ else {
+ obj = BigDecimal_negative_infinity();
+ }
+ return check_exception(obj);
+ }
+ else if (d == 0.0) {
+ if (1/d < 0.0) {
+ return BigDecimal_negative_zero();
+ }
+ else {
+ return BigDecimal_positive_zero();
+ }
+ }
+
+ if (digs == SIZE_MAX) {
+ if (!raise_exception)
+ return Qnil;
+ rb_raise(rb_eArgError,
+ "can't omit precision for a %"PRIsVALUE".",
+ CLASS_OF(val));
+ }
+ else if (digs > BIGDECIMAL_DOUBLE_FIGURES) {
+ if (!raise_exception)
+ return Qnil;
+ rb_raise(rb_eArgError, "precision too large.");
+ }
+
+ /* Use the same logic in flo_to_s to convert a float to a decimal string */
+ char buf[BIGDECIMAL_DOUBLE_FIGURES + BASE_FIG + 2 + 1]; /* sizeof(buf) == 28 in the typical case */
+ int decpt, negative_p;
+ char *e;
+ const int mode = digs == 0 ? 0 : 2;
+ char *p = BigDecimal_dtoa(d, mode, (int)digs, &decpt, &negative_p, &e);
+ int len10 = (int)(e - p);
+ if (len10 > BIGDECIMAL_DOUBLE_FIGURES) {
+ /* TODO: Presumably, rounding should be done here. */
+ len10 = BIGDECIMAL_DOUBLE_FIGURES;
+ }
+ memcpy(buf, p, len10);
+ xfree(p);
+
+ VALUE inum;
+ size_t RB_UNUSED_VAR(prec) = 0;
+ SIGNED_VALUE exp = 0;
+ if (decpt > 0) {
+ if (decpt < len10) {
+ /*
+ * len10 |---------------|
+ * : |-------| frac_len10 = len10 - decpt
+ * decpt |-------| |--| ntz10 = BASE_FIG - frac_len10 % BASE_FIG
+ * : : :
+ * 00 dd dddd.dddd dd 00
+ * prec |-----.----.----.-----| prec = exp + roomof(frac_len, BASE_FIG)
+ * exp |-----.----| exp = roomof(decpt, BASE_FIG)
+ */
+ const size_t frac_len10 = len10 - decpt;
+ const size_t ntz10 = BASE_FIG - frac_len10 % BASE_FIG;
+ memset(buf + len10, '0', ntz10);
+ buf[len10 + ntz10] = '\0';
+ inum = rb_cstr_to_inum(buf, 10, false);
+
+ exp = roomof(decpt, BASE_FIG);
+ prec = exp + roomof(frac_len10, BASE_FIG);
+ }
+ else {
+ /*
+ * decpt |-----------------------|
+ * len10 |----------| :
+ * : |------------| exp10
+ * : : :
+ * 00 dd dddd dd 00 0000 0000.0
+ * : : : :
+ * : |--| ntz10 = exp10 % BASE_FIG
+ * prec |-----.----.-----| :
+ * : |----.----| exp10 / BASE_FIG
+ * exp |-----.----.-----.----.----|
+ */
+ const size_t exp10 = decpt - len10;
+ const size_t ntz10 = exp10 % BASE_FIG;
+
+ memset(buf + len10, '0', ntz10);
+ buf[len10 + ntz10] = '\0';
+ inum = rb_cstr_to_inum(buf, 10, false);
+
+ prec = roomof(len10 + ntz10, BASE_FIG);
+ exp = prec + exp10 / BASE_FIG;
+ }
+ }
+ else if (decpt == 0) {
+ /*
+ * len10 |------------|
+ * : :
+ * 0.dddd dddd dd 00
+ * : : :
+ * : |--| ntz10 = prec * BASE_FIG - len10
+ * prec |----.----.-----| roomof(len10, BASE_FIG)
+ */
+ prec = roomof(len10, BASE_FIG);
+ const size_t ntz10 = prec * BASE_FIG - len10;
+
+ memset(buf + len10, '0', ntz10);
+ buf[len10 + ntz10] = '\0';
+ inum = rb_cstr_to_inum(buf, 10, false);
+ }
+ else {
+ /*
+ * len10 |---------------|
+ * : :
+ * decpt |-------| |--| ntz10 = prec * BASE_FIG - nlz10 - len10
+ * : : :
+ * 0.0000 00 dd dddd dddd dd 00
+ * : : :
+ * nlz10 |--| : decpt % BASE_FIG
+ * prec |-----.----.----.-----| roomof(decpt + len10, BASE_FIG) - exp
+ * exp |----| decpt / BASE_FIG
+ */
+ decpt = -decpt;
+
+ const size_t nlz10 = decpt % BASE_FIG;
+ exp = decpt / BASE_FIG;
+ prec = roomof(decpt + len10, BASE_FIG) - exp;
+ const size_t ntz10 = prec * BASE_FIG - nlz10 - len10;
+
+ if (nlz10 > 0) {
+ memmove(buf + nlz10, buf, len10);
+ memset(buf, '0', nlz10);
+ }
+ memset(buf + nlz10 + len10, '0', ntz10);
+ buf[nlz10 + len10 + ntz10] = '\0';
+ inum = rb_cstr_to_inum(buf, 10, false);
+
+ exp = -exp;
+ }
+
+ VALUE bd = rb_inum_convert_to_BigDecimal(inum, SIZE_MAX, raise_exception);
+ Real *vp;
+ TypedData_Get_Struct(bd, Real, &BigDecimal_data_type, vp);
+ assert(vp->Prec == prec);
+ vp->exponent = exp;
+
+ if (negative_p) VpSetSign(vp, -1);
+ return bd;
+}
+
+static VALUE
+rb_rational_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
+{
+ assert(RB_TYPE_P(val, T_RATIONAL));
+
+ if (digs == SIZE_MAX) {
+ if (!raise_exception)
+ return Qnil;
+ rb_raise(rb_eArgError,
+ "can't omit precision for a %"PRIsVALUE".",
+ CLASS_OF(val));
+ }
+
+ VALUE num = rb_inum_convert_to_BigDecimal(rb_rational_num(val), 0, raise_exception);
+ VALUE d = BigDecimal_div2(num, rb_rational_den(val), SIZET2NUM(digs));
+ return d;
+}
+
+static VALUE
+rb_cstr_convert_to_BigDecimal(const char *c_str, size_t digs, int raise_exception)
+{
+ if (digs == SIZE_MAX)
+ digs = 0;
+
+ Real *vp = VpCreateRbObject(digs, c_str, raise_exception);
+ if (!vp)
+ return Qnil;
+ return VpCheckGetValue(vp);
+}
+
+static inline VALUE
+rb_str_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
+{
+ const char *c_str = StringValueCStr(val);
+ return rb_cstr_convert_to_BigDecimal(c_str, digs, raise_exception);
+}
+
+static VALUE
+rb_convert_to_BigDecimal(VALUE val, size_t digs, int raise_exception)
+{
+ switch (val) {
+ case Qnil:
+ case Qtrue:
+ case Qfalse:
+ if (raise_exception) {
+ const char *cname = NIL_P(val) ? "nil" :
+ val == Qtrue ? "true" :
+ val == Qfalse ? "false" :
+ NULL;
+ rb_raise(rb_eTypeError,
+ "can't convert %s into BigDecimal", cname);
+ }
+ return Qnil;
- case T_STRING:
- /* fall through */
default:
- break;
+ break;
+ }
+
+ if (is_kind_of_BigDecimal(val)) {
+ if (digs == SIZE_MAX)
+ return check_exception(val);
+
+ Real *vp;
+ TypedData_Get_Struct(val, Real, &BigDecimal_data_type, vp);
+
+ VALUE copy = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, 0);
+ vp = VpCopy(NULL, vp);
+ /* TODO: rounding */
+ BigDecimal_wrap_struct(copy, vp);
+ return VpCheckGetValue(vp);
+ }
+ else if (RB_INTEGER_TYPE_P(val)) {
+ return rb_inum_convert_to_BigDecimal(val, digs, raise_exception);
+ }
+ else if (RB_FLOAT_TYPE_P(val)) {
+ return rb_float_convert_to_BigDecimal(val, digs, raise_exception);
+ }
+ else if (RB_TYPE_P(val, T_RATIONAL)) {
+ return rb_rational_convert_to_BigDecimal(val, digs, raise_exception);
+ }
+ else if (RB_TYPE_P(val, T_COMPLEX)) {
+ VALUE im = rb_complex_imag(val);
+ if (!is_zero(im)) {
+ /* TODO: handle raise_exception */
+ rb_raise(rb_eArgError,
+ "Unable to make a BigDecimal from non-zero imaginary number");
+ }
+ return rb_convert_to_BigDecimal(rb_complex_real(val), digs, raise_exception);
}
- /* TODO: support to_d */
- if (!exc) {
- iniValue = rb_check_convert_type(iniValue, T_STRING, "String", "to_str");
- if (NIL_P(iniValue)) return NULL;
+ else if (RB_TYPE_P(val, T_STRING)) {
+ return rb_str_convert_to_BigDecimal(val, digs, raise_exception);
}
- StringValueCStr(iniValue);
- return VpAlloc(mf, RSTRING_PTR(iniValue), 1, exc);
+
+ /* TODO: chheck to_d */
+ /* TODO: chheck to_int */
+
+ VALUE str = rb_check_convert_type(val, T_STRING, "String", "to_str");
+ if (!RB_TYPE_P(str, T_STRING)) {
+ if (raise_exception) {
+ rb_raise(rb_eTypeError,
+ "can't convert %"PRIsVALUE" into BigDecimal", rb_obj_class(val));
+ }
+ return Qnil;
+ }
+ return rb_str_convert_to_BigDecimal(str, digs, raise_exception);
}
-/* call-seq:
- * BigDecimal(initial, digits, exception: true)
+/* call-seq:
+ * BigDecimal(value, exception: true) -> bigdecimal
+ * BigDecimal(value, ndigits, exception: true) -> bigdecimal
+ *
+ * Returns the \BigDecimal converted from +value+
+ * with a precision of +ndigits+ decimal digits.
*
- * Create a new BigDecimal object.
+ * When +ndigits+ is less than the number of significant digits
+ * in the value, the result is rounded to that number of digits,
+ * according to the current rounding mode; see BigDecimal.mode.
*
- * initial:: The initial value, as an Integer, a Float, a Rational,
- * a BigDecimal, or a String.
+ * When +ndigits+ is 0, the number of digits to correctly represent a float number
+ * is determined automatically.
*
- * If it is a String, spaces are ignored and unrecognized characters
- * terminate the value.
+ * Returns +value+ converted to a \BigDecimal, depending on the type of +value+:
*
- * digits:: The number of significant digits, as an Integer. If omitted or 0,
- * the number of significant digits is determined from the initial
- * value.
+ * - Integer, Float, Rational, Complex, or BigDecimal: converted directly:
*
- * The actual number of significant digits used in computation is
- * usually larger than the specified number.
+ * # Integer, Complex, or BigDecimal value does not require ndigits; ignored if given.
+ * BigDecimal(2) # => 0.2e1
+ * BigDecimal(Complex(2, 0)) # => 0.2e1
+ * BigDecimal(BigDecimal(2)) # => 0.2e1
+ * # Float or Rational value requires ndigits.
+ * BigDecimal(2.0, 0) # => 0.2e1
+ * BigDecimal(Rational(2, 1), 0) # => 0.2e1
*
- * exception:: Whether an exception should be raised on invalid arguments.
- * +true+ by default, if passed +false+, just returns +nil+
- * for invalid.
+ * - String: converted by parsing if it contains an integer or floating-point literal;
+ * leading and trailing whitespace is ignored:
*
+ * # String does not require ndigits; ignored if given.
+ * BigDecimal('2') # => 0.2e1
+ * BigDecimal('2.0') # => 0.2e1
+ * BigDecimal('0.2e1') # => 0.2e1
+ * BigDecimal(' 2.0 ') # => 0.2e1
*
- * ==== Exceptions
+ * - Other type that responds to method <tt>:to_str</tt>:
+ * first converted to a string, then converted to a \BigDecimal, as above.
*
- * TypeError:: If the +initial+ type is neither Integer, Float,
- * Rational, nor BigDecimal, this exception is raised.
+ * - Other type:
*
- * TypeError:: If the +digits+ is not an Integer, this exception is raised.
+ * - Raises an exception if keyword argument +exception+ is +true+.
+ * - Returns +nil+ if keyword argument +exception+ is +true+.
*
- * ArgumentError:: If +initial+ is a Float, and the +digits+ is larger than
- * Float::DIG + 1, this exception is raised.
+ * Raises an exception if +value+ evaluates to a Float
+ * and +digits+ is larger than Float::DIG + 1.
*
- * ArgumentError:: If the +initial+ is a Float or Rational, and the +digits+
- * value is omitted, this exception is raised.
*/
static VALUE
f_BigDecimal(int argc, VALUE *argv, VALUE self)
{
- ENTER(1);
- Real *pv;
- VALUE obj;
-
- if (argc > 0 && CLASS_OF(argv[0]) == rb_cBigDecimal) {
- if (argc == 1 || (argc == 2 && RB_TYPE_P(argv[1], T_HASH))) return argv[0];
+ VALUE val, digs_v, opts = Qnil;
+ argc = rb_scan_args(argc, argv, "11:", &val, &digs_v, &opts);
+ int exception = opts_exception_p(opts);
+
+ size_t digs = SIZE_MAX; /* this means digs is omitted */
+ if (argc > 1) {
+ digs_v = rb_to_int(digs_v);
+ if (FIXNUM_P(digs_v)) {
+ long n = FIX2LONG(digs_v);
+ if (n < 0)
+ goto negative_digs;
+ digs = (size_t)n;
+ }
+ else {
+ if (RBIGNUM_NEGATIVE_P(digs_v)) {
+ negative_digs:
+ if (!exception)
+ return Qnil;
+ rb_raise(rb_eArgError, "negative precision");
+ }
+ digs = NUM2SIZET(digs_v);
+ }
}
- obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, 0);
- pv = VpNewVarArg(argc, argv);
- if (pv == NULL) return Qnil;
- SAVE(pv);
- if (ToValue(pv)) pv = VpCopy(NULL, pv);
- RTYPEDDATA_DATA(obj) = pv;
- RB_OBJ_FREEZE(obj);
- return pv->obj = obj;
+
+ return rb_convert_to_BigDecimal(val, digs, exception);
}
static VALUE
BigDecimal_s_interpret_loosely(VALUE klass, VALUE str)
{
- ENTER(1);
- char const *c_str;
- Real *pv;
-
- c_str = StringValueCStr(str);
- GUARD_OBJ(pv, VpAlloc(0, c_str, 0, 1));
- pv->obj = TypedData_Wrap_Struct(klass, &BigDecimal_data_type, pv);
- RB_OBJ_FREEZE(pv->obj);
- return pv->obj;
+ char const *c_str = StringValueCStr(str);
+ Real *vp = VpNewRbClass(0, c_str, klass, false, true);
+ if (!vp)
+ return Qnil;
+ else
+ return VpCheckGetValue(vp);
}
/* call-seq:
@@ -2765,7 +3776,7 @@ static VALUE
BigDecimal_limit(int argc, VALUE *argv, VALUE self)
{
VALUE nFig;
- VALUE nCur = INT2NUM(VpGetPrecLimit());
+ VALUE nCur = SIZET2NUM(VpGetPrecLimit());
if (rb_scan_args(argc, argv, "01", &nFig) == 1) {
int nf;
@@ -2781,8 +3792,10 @@ BigDecimal_limit(int argc, VALUE *argv, VALUE self)
/* Returns the sign of the value.
*
- * Returns a positive value if > 0, a negative value if < 0, and a
- * zero if == 0.
+ * Returns a positive value if > 0, a negative value if < 0.
+ * It behaves the same with zeros -
+ * it returns a positive value for a positive zero (BigDecimal('0')) and
+ * a negative value for a negative zero (BigDecimal('-0')).
*
* The specific value returned indicates the type and sign of the BigDecimal,
* as follows:
@@ -2930,7 +3943,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
infinite = isinf(flo);
nan = isnan(flo);
if (!infinite && !nan) {
- vx = GetVpValueWithPrec(x, DBL_DIG+1, 0);
+ vx = GetVpValueWithPrec(x, 0, 0);
}
break;
@@ -2943,29 +3956,27 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
}
if (infinite) {
if (negative) {
- return ToValue(GetVpValueWithPrec(INT2FIX(0), prec, 1));
+ return VpCheckGetValue(GetVpValueWithPrec(INT2FIX(0), prec, 1));
}
else {
- Real* vy;
- vy = VpCreateRbObject(prec, "#0");
+ Real* vy = NewZeroWrapNolimit(1, prec);
VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE);
RB_GC_GUARD(vy->obj);
- return ToValue(vy);
+ return VpCheckGetValue(vy);
}
}
else if (nan) {
- Real* vy;
- vy = VpCreateRbObject(prec, "#0");
- VpSetNaN(vy);
- RB_GC_GUARD(vy->obj);
- return ToValue(vy);
+ Real* vy = NewZeroWrapNolimit(1, prec);
+ VpSetNaN(vy);
+ RB_GC_GUARD(vy->obj);
+ return VpCheckGetValue(vy);
}
else if (vx == NULL) {
cannot_be_coerced_into_BigDecimal(rb_eArgError, x);
}
x = vx->obj;
- n = prec + rmpd_double_figures();
+ n = prec + BIGDECIMAL_DOUBLE_FIGURES;
negative = BIGDECIMAL_NEGATIVE_P(vx);
if (negative) {
VALUE x_zero = INT2NUM(1);
@@ -2975,7 +3986,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
VpSetSign(vx, 1);
}
- one = ToValue(VpCreateRbObject(1, "1"));
+ one = VpCheckGetValue(NewOneWrapLimited(1, 1));
y = one;
d = y;
i = 1;
@@ -2990,8 +4001,8 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
if (m <= 0) {
break;
}
- else if ((size_t)m < rmpd_double_figures()) {
- m = rmpd_double_figures();
+ else if ((size_t)m < BIGDECIMAL_DOUBLE_FIGURES) {
+ m = BIGDECIMAL_DOUBLE_FIGURES;
}
d = BigDecimal_mult(d, x); /* d <- d * x */
@@ -3083,7 +4094,7 @@ get_vp_value:
infinite = isinf(flo);
nan = isnan(flo);
if (!zero && !negative && !infinite && !nan) {
- vx = GetVpValueWithPrec(x, DBL_DIG+1, 1);
+ vx = GetVpValueWithPrec(x, 0, 1);
}
break;
@@ -3102,18 +4113,16 @@ get_vp_value:
break;
}
if (infinite && !negative) {
- Real* vy;
- vy = VpCreateRbObject(prec, "#0");
+ Real *vy = NewZeroWrapNolimit(1, prec);
RB_GC_GUARD(vy->obj);
VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE);
- return ToValue(vy);
+ return VpCheckGetValue(vy);
}
else if (nan) {
- Real* vy;
- vy = VpCreateRbObject(prec, "#0");
+ Real* vy = NewZeroWrapNolimit(1, prec);
RB_GC_GUARD(vy->obj);
VpSetNaN(vy);
- return ToValue(vy);
+ return VpCheckGetValue(vy);
}
else if (zero || negative) {
rb_raise(rb_eMathDomainError,
@@ -3122,18 +4131,18 @@ get_vp_value:
else if (vx == NULL) {
cannot_be_coerced_into_BigDecimal(rb_eArgError, x);
}
- x = ToValue(vx);
+ x = VpCheckGetValue(vx);
- RB_GC_GUARD(one) = ToValue(VpCreateRbObject(1, "1"));
- RB_GC_GUARD(two) = ToValue(VpCreateRbObject(1, "2"));
+ RB_GC_GUARD(one) = VpCheckGetValue(NewOneWrapLimited(1, 1));
+ RB_GC_GUARD(two) = VpCheckGetValue(VpCreateRbObject(1, "2", true));
- n = prec + rmpd_double_figures();
+ n = prec + BIGDECIMAL_DOUBLE_FIGURES;
RB_GC_GUARD(vn) = SSIZET2NUM(n);
expo = VpExponent10(vx);
if (expo < 0 || expo >= 3) {
char buf[DECIMAL_SIZE_OF_BITS(SIZEOF_VALUE * CHAR_BIT) + 4];
snprintf(buf, sizeof(buf), "1E%"PRIdVALUE, -expo);
- x = BigDecimal_mult2(x, ToValue(VpCreateRbObject(1, buf)), vn);
+ x = BigDecimal_mult2(x, VpCheckGetValue(VpCreateRbObject(1, buf, true)), vn);
}
else {
expo = 0;
@@ -3151,8 +4160,8 @@ get_vp_value:
if (m <= 0) {
break;
}
- else if ((size_t)m < rmpd_double_figures()) {
- m = rmpd_double_figures();
+ else if ((size_t)m < BIGDECIMAL_DOUBLE_FIGURES) {
+ m = BIGDECIMAL_DOUBLE_FIGURES;
}
x = BigDecimal_mult2(x2, x, vn);
@@ -3165,7 +4174,7 @@ get_vp_value:
if (expo != 0) {
VALUE log10, vexpo, dy;
log10 = BigMath_s_log(klass, INT2FIX(10), vprec);
- vexpo = ToValue(GetVpValue(SSIZET2NUM(expo), 1));
+ vexpo = VpCheckGetValue(GetVpValue(SSIZET2NUM(expo), 1));
dy = BigDecimal_mult(log10, vexpo);
y = BigDecimal_add(y, dy);
}
@@ -3173,6 +4182,46 @@ get_vp_value:
return y;
}
+static VALUE BIGDECIMAL_NAN = Qnil;
+
+static VALUE
+BigDecimal_nan(void)
+{
+ return BIGDECIMAL_NAN;
+}
+
+static VALUE BIGDECIMAL_POSITIVE_INFINITY = Qnil;
+
+static VALUE
+BigDecimal_positive_infinity(void)
+{
+ return BIGDECIMAL_POSITIVE_INFINITY;
+}
+
+static VALUE BIGDECIMAL_NEGATIVE_INFINITY = Qnil;
+
+static VALUE
+BigDecimal_negative_infinity(void)
+{
+ return BIGDECIMAL_NEGATIVE_INFINITY;
+}
+
+static VALUE BIGDECIMAL_POSITIVE_ZERO = Qnil;
+
+static VALUE
+BigDecimal_positive_zero(void)
+{
+ return BIGDECIMAL_POSITIVE_ZERO;
+}
+
+static VALUE BIGDECIMAL_NEGATIVE_ZERO = Qnil;
+
+static VALUE
+BigDecimal_negative_zero(void)
+{
+ return BIGDECIMAL_NEGATIVE_ZERO;
+}
+
/* Document-class: BigDecimal
* BigDecimal provides arbitrary-precision floating point decimal arithmetic.
*
@@ -3216,6 +4265,18 @@ get_vp_value:
*
* (1.2 - 1.0) == 0.2 #=> false
*
+ * == A Note About Precision
+ *
+ * For a calculation using a \BigDecimal and another +value+,
+ * the precision of the result depends on the type of +value+:
+ *
+ * - If +value+ is a \Float,
+ * the precision is Float::DIG + 1.
+ * - If +value+ is a \Rational, the precision is larger than Float::DIG + 1.
+ * - If +value+ is a \BigDecimal, the precision is +value+'s precision in the
+ * internal representation, which is platform-dependent.
+ * - If +value+ is other object, the precision is determined by the result of +BigDecimal(value)+.
+ *
* == Special features of accurate decimal arithmetic
*
* Because BigDecimal is more accurate than normal binary floating point
@@ -3301,6 +4362,9 @@ get_vp_value:
void
Init_bigdecimal(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
VALUE arg;
id_BigDecimal_exception_mode = rb_intern_const("BigDecimal.exception_mode");
@@ -3317,7 +4381,7 @@ Init_bigdecimal(void)
rb_define_global_function("BigDecimal", f_BigDecimal, -1);
/* Class methods */
- rb_undef_method(CLASS_OF(rb_cBigDecimal), "allocate");
+ rb_undef_alloc_func(rb_cBigDecimal);
rb_undef_method(CLASS_OF(rb_cBigDecimal), "new");
rb_define_singleton_method(rb_cBigDecimal, "interpret_loosely", BigDecimal_s_interpret_loosely, 1);
rb_define_singleton_method(rb_cBigDecimal, "mode", BigDecimal_mode, -1);
@@ -3441,17 +4505,41 @@ Init_bigdecimal(void)
/* -3: Indicates that a value is negative and infinite. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE", INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
- arg = rb_str_new2("+Infinity");
+ /* Positive zero value. */
+ arg = rb_str_new2("+0");
+ BIGDECIMAL_POSITIVE_ZERO = f_BigDecimal(1, &arg, rb_cBigDecimal);
+ rb_gc_register_mark_object(BIGDECIMAL_POSITIVE_ZERO);
+
+ /* Negative zero value. */
+ arg = rb_str_new2("-0");
+ BIGDECIMAL_NEGATIVE_ZERO = f_BigDecimal(1, &arg, rb_cBigDecimal);
+ rb_gc_register_mark_object(BIGDECIMAL_NEGATIVE_ZERO);
+
/* Positive infinity value. */
- rb_define_const(rb_cBigDecimal, "INFINITY", f_BigDecimal(1, &arg, rb_cBigDecimal));
- arg = rb_str_new2("NaN");
+ arg = rb_str_new2("+Infinity");
+ BIGDECIMAL_POSITIVE_INFINITY = f_BigDecimal(1, &arg, rb_cBigDecimal);
+ rb_gc_register_mark_object(BIGDECIMAL_POSITIVE_INFINITY);
+
+ /* Negative infinity value. */
+ arg = rb_str_new2("-Infinity");
+ BIGDECIMAL_NEGATIVE_INFINITY = f_BigDecimal(1, &arg, rb_cBigDecimal);
+ rb_gc_register_mark_object(BIGDECIMAL_NEGATIVE_INFINITY);
+
/* 'Not a Number' value. */
- rb_define_const(rb_cBigDecimal, "NAN", f_BigDecimal(1, &arg, rb_cBigDecimal));
+ arg = rb_str_new2("NaN");
+ BIGDECIMAL_NAN = f_BigDecimal(1, &arg, rb_cBigDecimal);
+ rb_gc_register_mark_object(BIGDECIMAL_NAN);
+ /* Special value constants */
+ rb_define_const(rb_cBigDecimal, "INFINITY", BIGDECIMAL_POSITIVE_INFINITY);
+ rb_define_const(rb_cBigDecimal, "NAN", BIGDECIMAL_NAN);
/* instance methods */
- rb_define_method(rb_cBigDecimal, "initialize_copy", BigDecimal_initialize_copy, 1);
rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0);
+ rb_define_method(rb_cBigDecimal, "precision", BigDecimal_precision, 0);
+ rb_define_method(rb_cBigDecimal, "scale", BigDecimal_scale, 0);
+ rb_define_method(rb_cBigDecimal, "precision_scale", BigDecimal_precision_scale, 0);
+ rb_define_method(rb_cBigDecimal, "n_significant_digits", BigDecimal_n_significant_digits, 0);
rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2);
@@ -3469,7 +4557,7 @@ Init_bigdecimal(void)
rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0);
rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);
rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
- rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);
+ rb_define_method(rb_cBigDecimal, "quo", BigDecimal_quo, -1);
rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);
rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1);
@@ -3510,20 +4598,31 @@ Init_bigdecimal(void)
rb_define_singleton_method(rb_mBigMath, "exp", BigMath_s_exp, 2);
rb_define_singleton_method(rb_mBigMath, "log", BigMath_s_log, 2);
- id_up = rb_intern_const("up");
- id_down = rb_intern_const("down");
- id_truncate = rb_intern_const("truncate");
- id_half_up = rb_intern_const("half_up");
- id_default = rb_intern_const("default");
- id_half_down = rb_intern_const("half_down");
- id_half_even = rb_intern_const("half_even");
- id_banker = rb_intern_const("banker");
- id_ceiling = rb_intern_const("ceiling");
- id_ceil = rb_intern_const("ceil");
- id_floor = rb_intern_const("floor");
+#define ROUNDING_MODE(i, name, value) \
+ id_##name = rb_intern_const(#name); \
+ rbd_rounding_modes[i].id = id_##name; \
+ rbd_rounding_modes[i].mode = value;
+
+ ROUNDING_MODE(0, up, RBD_ROUND_UP);
+ ROUNDING_MODE(1, down, RBD_ROUND_DOWN);
+ ROUNDING_MODE(2, half_up, RBD_ROUND_HALF_UP);
+ ROUNDING_MODE(3, half_down, RBD_ROUND_HALF_DOWN);
+ ROUNDING_MODE(4, ceil, RBD_ROUND_CEIL);
+ ROUNDING_MODE(5, floor, RBD_ROUND_FLOOR);
+ ROUNDING_MODE(6, half_even, RBD_ROUND_HALF_EVEN);
+
+ ROUNDING_MODE(7, default, RBD_ROUND_DEFAULT);
+ ROUNDING_MODE(8, truncate, RBD_ROUND_TRUNCATE);
+ ROUNDING_MODE(9, banker, RBD_ROUND_BANKER);
+ ROUNDING_MODE(10, ceiling, RBD_ROUND_CEILING);
+
+#undef ROUNDING_MODE
+
id_to_r = rb_intern_const("to_r");
id_eq = rb_intern_const("==");
id_half = rb_intern_const("half");
+
+ (void)VPrint; /* suppress unused warning */
}
/*
@@ -3543,7 +4642,7 @@ static int gfCheckVal = 1; /* Value checking flag in VpNmlz() */
#endif /* BIGDECIMAL_DEBUG */
static Real *VpConstOne; /* constant 1.0 */
-static Real *VpPt5; /* constant 0.5 */
+static Real *VpConstPt5; /* constant 0.5 */
#define maxnr 100UL /* Maximum iterations for calculating sqrt. */
/* used in VpSqrt() */
@@ -3560,65 +4659,25 @@ enum op_sw {
static int VpIsDefOP(Real *c, Real *a, Real *b, enum op_sw sw);
static int AddExponent(Real *a, SIGNED_VALUE n);
-static BDIGIT VpAddAbs(Real *a,Real *b,Real *c);
-static BDIGIT VpSubAbs(Real *a,Real *b,Real *c);
-static size_t VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv);
+static DECDIG VpAddAbs(Real *a,Real *b,Real *c);
+static DECDIG VpSubAbs(Real *a,Real *b,Real *c);
+static size_t VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, DECDIG *av, DECDIG *bv);
static int VpNmlz(Real *a);
static void VpFormatSt(char *psz, size_t fFmt);
static int VpRdup(Real *m, size_t ind_m);
#ifdef BIGDECIMAL_DEBUG
+# ifdef HAVE_RB_EXT_RACTOR_SAFE
+# error Need to make rewiting gnAlloc atomic
+# endif
static int gnAlloc = 0; /* Memory allocation counter */
#endif /* BIGDECIMAL_DEBUG */
-VP_EXPORT void *
-VpMemAlloc(size_t mb)
-{
- void *p = xmalloc(mb);
- if (!p) {
- VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
- }
- memset(p, 0, mb);
-#ifdef BIGDECIMAL_DEBUG
- gnAlloc++; /* Count allocation call */
-#endif /* BIGDECIMAL_DEBUG */
- return p;
-}
-
-VP_EXPORT void *
-VpMemRealloc(void *ptr, size_t mb)
-{
- void *p = xrealloc(ptr, mb);
- if (!p) {
- VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
- }
- return p;
-}
-
-VP_EXPORT void
-VpFree(Real *pv)
-{
- if (pv != NULL) {
- xfree(pv);
-#ifdef BIGDECIMAL_DEBUG
- gnAlloc--; /* Decrement allocation count */
- if (gnAlloc == 0) {
- printf(" *************** All memories allocated freed ****************\n");
- /*getchar();*/
- }
- if (gnAlloc < 0) {
- printf(" ??????????? Too many memory free calls(%d) ?????????????\n", gnAlloc);
- /*getchar();*/
- }
-#endif /* BIGDECIMAL_DEBUG */
- }
-}
-
/*
* EXCEPTION Handling.
*/
-#define rmpd_set_thread_local_exception_mode(mode) \
+#define bigdecimal_set_thread_local_exception_mode(mode) \
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_exception_mode, \
@@ -3634,8 +4693,8 @@ VpGetException (void)
);
if (NIL_P(vmode)) {
- rmpd_set_thread_local_exception_mode(RMPD_EXCEPTION_MODE_DEFAULT);
- return RMPD_EXCEPTION_MODE_DEFAULT;
+ bigdecimal_set_thread_local_exception_mode(BIGDECIMAL_EXCEPTION_MODE_DEFAULT);
+ return BIGDECIMAL_EXCEPTION_MODE_DEFAULT;
}
return NUM2USHORT(vmode);
@@ -3644,20 +4703,41 @@ VpGetException (void)
static void
VpSetException(unsigned short f)
{
- rmpd_set_thread_local_exception_mode(f);
+ bigdecimal_set_thread_local_exception_mode(f);
+}
+
+static void
+VpCheckException(Real *p, bool always)
+{
+ if (VpIsNaN(p)) {
+ VpException(VP_EXCEPTION_NaN, "Computation results in 'NaN' (Not a Number)", always);
+ }
+ else if (VpIsPosInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY, "Computation results in 'Infinity'", always);
+ }
+ else if (VpIsNegInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY, "Computation results in '-Infinity'", always);
+ }
+}
+
+static VALUE
+VpCheckGetValue(Real *p)
+{
+ VpCheckException(p, false);
+ return p->obj;
}
/*
* Precision limit.
*/
-#define rmpd_set_thread_local_precision_limit(limit) \
+#define bigdecimal_set_thread_local_precision_limit(limit) \
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_precision_limit, \
SIZET2NUM(limit) \
)
-#define RMPD_PRECISION_LIMIT_DEFAULT ((size_t)0)
+#define BIGDECIMAL_PRECISION_LIMIT_DEFAULT ((size_t)0)
/* These 2 functions added at v1.1.7 */
VP_EXPORT size_t
@@ -3669,8 +4749,8 @@ VpGetPrecLimit(void)
);
if (NIL_P(vlimit)) {
- rmpd_set_thread_local_precision_limit(RMPD_PRECISION_LIMIT_DEFAULT);
- return RMPD_PRECISION_LIMIT_DEFAULT;
+ bigdecimal_set_thread_local_precision_limit(BIGDECIMAL_PRECISION_LIMIT_DEFAULT);
+ return BIGDECIMAL_PRECISION_LIMIT_DEFAULT;
}
return NUM2SIZET(vlimit);
@@ -3680,7 +4760,7 @@ VP_EXPORT size_t
VpSetPrecLimit(size_t n)
{
size_t const s = VpGetPrecLimit();
- rmpd_set_thread_local_precision_limit(n);
+ bigdecimal_set_thread_local_precision_limit(n);
return s;
}
@@ -3688,7 +4768,7 @@ VpSetPrecLimit(size_t n)
* Rounding mode.
*/
-#define rmpd_set_thread_local_rounding_mode(mode) \
+#define bigdecimal_set_thread_local_rounding_mode(mode) \
rb_thread_local_aset( \
rb_thread_current(), \
id_BigDecimal_rounding_mode, \
@@ -3704,8 +4784,8 @@ VpGetRoundMode(void)
);
if (NIL_P(vmode)) {
- rmpd_set_thread_local_rounding_mode(RMPD_ROUNDING_MODE_DEFAULT);
- return RMPD_ROUNDING_MODE_DEFAULT;
+ bigdecimal_set_thread_local_rounding_mode(BIGDECIMAL_ROUNDING_MODE_DEFAULT);
+ return BIGDECIMAL_ROUNDING_MODE_DEFAULT;
}
return NUM2USHORT(vmode);
@@ -3733,7 +4813,7 @@ VP_EXPORT unsigned short
VpSetRoundMode(unsigned short n)
{
if (VpIsRoundMode(n)) {
- rmpd_set_thread_local_rounding_mode(n);
+ bigdecimal_set_thread_local_rounding_mode(n);
return n;
}
@@ -3810,7 +4890,7 @@ VpException(unsigned short f, const char *str,int always)
{
unsigned short const exception_mode = VpGetException();
- if (f == VP_EXCEPTION_OP || f == VP_EXCEPTION_MEMORY) always = 1;
+ if (f == VP_EXCEPTION_OP) always = 1;
if (always || (exception_mode & f)) {
switch(f) {
@@ -3822,7 +4902,6 @@ VpException(unsigned short f, const char *str,int always)
case VP_EXCEPTION_OP:
rb_raise(rb_eFloatDomainError, "%s", str);
break;
- case VP_EXCEPTION_MEMORY:
default:
rb_fatal("%s", str);
}
@@ -3971,20 +5050,24 @@ VpNumOfChars(Real *vp,const char *pszFmt)
* that BASE is as large as possible satisfying the
* relation MaxVal <= BASE*(BASE+1). Where the value
* MaxVal is the largest value which can be represented
- * by one BDIGIT word in the computer used.
+ * by one DECDIG word in the computer used.
*
* [Returns]
- * 1+DBL_DIG ... OK
+ * BIGDECIMAL_DOUBLE_FIGURES ... OK
*/
VP_EXPORT size_t
-VpInit(BDIGIT BaseVal)
+VpInit(DECDIG BaseVal)
{
/* Setup +/- Inf NaN -0 */
VpGetDoubleNegZero();
- /* Allocates Vp constants. */
- VpConstOne = VpAlloc(1UL, "1", 1, 1);
- VpPt5 = VpAlloc(1UL, ".5", 1, 1);
+ /* Const 1.0 */
+ VpConstOne = NewOneNolimit(1, 1);
+
+ /* Const 0.5 */
+ VpConstPt5 = NewOneNolimit(1, 1);
+ VpConstPt5->exponent = 0;
+ VpConstPt5->frac[0] = 5*BASE1;
#ifdef BIGDECIMAL_DEBUG
gnAlloc = 0;
@@ -3992,16 +5075,16 @@ VpInit(BDIGIT BaseVal)
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
- printf("VpInit: BaseVal = %"PRIuBDIGIT"\n", BaseVal);
- printf("\tBASE = %"PRIuBDIGIT"\n", BASE);
- printf("\tHALF_BASE = %"PRIuBDIGIT"\n", HALF_BASE);
- printf("\tBASE1 = %"PRIuBDIGIT"\n", BASE1);
- printf("\tBASE_FIG = %u\n", BASE_FIG);
- printf("\tDBLE_FIG = %d\n", DBLE_FIG);
+ printf("VpInit: BaseVal = %"PRIuDECDIG"\n", BaseVal);
+ printf("\tBASE = %"PRIuDECDIG"\n", BASE);
+ printf("\tHALF_BASE = %"PRIuDECDIG"\n", HALF_BASE);
+ printf("\tBASE1 = %"PRIuDECDIG"\n", BASE1);
+ printf("\tBASE_FIG = %u\n", BASE_FIG);
+ printf("\tBIGDECIMAL_DOUBLE_FIGURES = %d\n", BIGDECIMAL_DOUBLE_FIGURES);
}
#endif /* BIGDECIMAL_DEBUG */
- return rmpd_double_figures();
+ return BIGDECIMAL_DOUBLE_FIGURES;
}
VP_EXPORT Real *
@@ -4049,7 +5132,7 @@ overflow:
}
Real *
-rmpd_parse_special_string(const char *str)
+bigdecimal_parse_special_string(const char *str)
{
static const struct {
const char *str;
@@ -4073,7 +5156,7 @@ rmpd_parse_special_string(const char *str)
p = str + table[i].len;
while (*p && ISSPACE(*p)) ++p;
if (*p == '\0') {
- Real *vp = VpAllocReal(1);
+ Real *vp = rbd_allocate_struct(1);
vp->MaxPrec = 1;
switch (table[i].sign) {
default:
@@ -4097,11 +5180,11 @@ rmpd_parse_special_string(const char *str)
/*
* Allocates variable.
* [Input]
- * mx ... allocation unit, if zero then mx is determined by szVal.
- * The mx is the number of effective digits can to be stored.
- * szVal ... value assigned(char). If szVal==NULL,then zero is assumed.
- * If szVal[0]=='#' then Max. Prec. will not be considered(1.1.7),
- * full precision specified by szVal is allocated.
+ * mx ... The number of decimal digits to be allocated, if zero then mx is determined by szVal.
+ * The mx will be the number of significant digits can to be stored.
+ * szVal ... The value assigned(char). If szVal==NULL, then zero is assumed.
+ * If szVal[0]=='#' then MaxPrec is not affected by the precision limit
+ * so that the full precision specified by szVal is allocated.
*
* [Returns]
* Pointer to the newly allocated variable, or
@@ -4112,49 +5195,40 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
{
const char *orig_szVal = szVal;
size_t i, j, ni, ipf, nf, ipe, ne, dot_seen, exp_seen, nalloc;
+ size_t len;
char v, *psz;
int sign=1;
Real *vp = NULL;
- size_t mf = VpGetPrecLimit();
VALUE buf;
- mx = (mx + BASE_FIG - 1) / BASE_FIG; /* Determine allocation unit. */
- if (mx == 0) ++mx;
-
- if (szVal) {
- /* Skipping leading spaces */
- while (ISSPACE(*szVal)) szVal++;
-
- /* Processing the leading one `#` */
- if (*szVal != '#') {
- if (mf) {
- mf = (mf + BASE_FIG - 1) / BASE_FIG + 2; /* Needs 1 more for div */
- if (mx > mf) {
- mx = mf;
- }
- }
- }
- else {
- ++szVal;
- }
- }
- else {
+ if (szVal == NULL) {
return_zero:
/* necessary to be able to store */
/* at least mx digits. */
/* szVal==NULL ==> allocate zero value. */
- vp = VpAllocReal(mx);
- /* xmalloc() alway returns(or throw interruption) */
- vp->MaxPrec = mx; /* set max precision */
+ vp = rbd_allocate_struct(mx);
+ vp->MaxPrec = rbd_calculate_internal_digits(mx, false); /* Must false */
VpSetZero(vp, 1); /* initialize vp to zero. */
return vp;
}
+ /* Skipping leading spaces */
+ while (ISSPACE(*szVal)) szVal++;
+
/* Check on Inf & NaN */
- if ((vp = rmpd_parse_special_string(szVal)) != NULL) {
+ if ((vp = bigdecimal_parse_special_string(szVal)) != NULL) {
return vp;
}
+ /* Processing the leading one `#` */
+ if (*szVal != '#') {
+ len = rbd_calculate_internal_digits(mx, true);
+ }
+ else {
+ len = rbd_calculate_internal_digits(mx, false);
+ ++szVal;
+ }
+
/* Scanning digits */
/* A buffer for keeping scanned digits */
@@ -4316,12 +5390,11 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
nalloc = (ni + nf + BASE_FIG - 1) / BASE_FIG + 1; /* set effective allocation */
/* units for szVal[] */
- if (mx == 0) mx = 1;
- nalloc = Max(nalloc, mx);
- mx = nalloc;
- vp = VpAllocReal(mx);
- /* xmalloc() alway returns(or throw interruption) */
- vp->MaxPrec = mx; /* set max precision */
+ if (len == 0) len = 1;
+ nalloc = Max(nalloc, len);
+ len = nalloc;
+ vp = rbd_allocate_struct(len);
+ vp->MaxPrec = len; /* set max precision */
VpSetZero(vp, sign);
VpCtoV(vp, psz, ni, psz + ipf, nf, psz + ipe, ne);
rb_str_resize(buf, 0);
@@ -4359,7 +5432,7 @@ VpAsgn(Real *c, Real *a, int isw)
VpSetSign(c, isw * VpGetSign(a)); /* set sign */
n = (a->Prec < c->MaxPrec) ? (a->Prec) : (c->MaxPrec);
c->Prec = n;
- memcpy(c->frac, a->frac, n * sizeof(BDIGIT));
+ memcpy(c->frac, a->frac, n * sizeof(DECDIG));
/* Needs round ? */
if (isw != 10) {
/* Not in ActiveRound */
@@ -4390,7 +5463,7 @@ VpAddSub(Real *c, Real *a, Real *b, int operation)
short sw, isw;
Real *a_ptr, *b_ptr;
size_t n, na, nb, i;
- BDIGIT mrv;
+ DECDIG mrv;
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
@@ -4518,7 +5591,7 @@ end_if:
* a and b assuming abs(a)>abs(b).
* c = abs(a) + abs(b) ; where |a|>=|b|
*/
-static BDIGIT
+static DECDIG
VpAddAbs(Real *a, Real *b, Real *c)
{
size_t word_shift;
@@ -4528,7 +5601,7 @@ VpAddAbs(Real *a, Real *b, Real *c)
size_t a_pos;
size_t b_pos, b_pos_with_word_shift;
size_t c_pos;
- BDIGIT av, bv, carry, mrv;
+ DECDIG av, bv, carry, mrv;
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
@@ -4613,7 +5686,7 @@ Exit:
/*
* c = abs(a) - abs(b)
*/
-static BDIGIT
+static DECDIG
VpSubAbs(Real *a, Real *b, Real *c)
{
size_t word_shift;
@@ -4623,7 +5696,7 @@ VpSubAbs(Real *a, Real *b, Real *c)
size_t a_pos;
size_t b_pos, b_pos_with_word_shift;
size_t c_pos;
- BDIGIT av, bv, borrow, mrv;
+ DECDIG av, bv, borrow, mrv;
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
@@ -4730,7 +5803,7 @@ Exit:
* c_pos = |
*/
static size_t
-VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv)
+VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, DECDIG *av, DECDIG *bv)
{
size_t left_word, right_word, word_shift;
@@ -4845,8 +5918,8 @@ VpMult(Real *c, Real *a, Real *b)
size_t MxIndA, MxIndB, MxIndAB, MxIndC;
size_t ind_c, i, ii, nc;
size_t ind_as, ind_ae, ind_bs;
- BDIGIT carry;
- BDIGIT_DBL s;
+ DECDIG carry;
+ DECDIG_DBL s;
Real *w;
#ifdef BIGDECIMAL_DEBUG
@@ -4886,7 +5959,7 @@ VpMult(Real *c, Real *a, Real *b)
if (MxIndC < MxIndAB) { /* The Max. prec. of c < Prec(a)+Prec(b) */
w = c;
- c = VpAlloc((size_t)((MxIndAB + 1) * BASE_FIG), "#0", 1, 1);
+ c = NewZeroNolimit(1, (size_t)((MxIndAB + 1) * BASE_FIG));
MxIndC = MxIndAB;
}
@@ -4894,13 +5967,13 @@ VpMult(Real *c, Real *a, Real *b)
c->exponent = a->exponent; /* set exponent */
if (!AddExponent(c, b->exponent)) {
- if (w) VpFree(c);
- return 0;
+ if (w) rbd_free_struct(c);
+ return 0;
}
VpSetSign(c, VpGetSign(a) * VpGetSign(b)); /* set sign */
carry = 0;
nc = ind_c = MxIndAB;
- memset(c->frac, 0, (nc + 1) * sizeof(BDIGIT)); /* Initialize c */
+ memset(c->frac, 0, (nc + 1) * sizeof(DECDIG)); /* Initialize c */
c->Prec = nc + 1; /* set precision */
for (nc = 0; nc < MxIndAB; ++nc, --ind_c) {
if (nc < MxIndB) { /* The left triangle of the Fig. */
@@ -4920,15 +5993,15 @@ VpMult(Real *c, Real *a, Real *b)
}
for (i = ind_as; i <= ind_ae; ++i) {
- s = (BDIGIT_DBL)a->frac[i] * b->frac[ind_bs--];
- carry = (BDIGIT)(s / BASE);
- s -= (BDIGIT_DBL)carry * BASE;
- c->frac[ind_c] += (BDIGIT)s;
- if (c->frac[ind_c] >= BASE) {
- s = c->frac[ind_c] / BASE;
- carry += (BDIGIT)s;
- c->frac[ind_c] -= (BDIGIT)(s * BASE);
- }
+ s = (DECDIG_DBL)a->frac[i] * b->frac[ind_bs--];
+ carry = (DECDIG)(s / BASE);
+ s -= (DECDIG_DBL)carry * BASE;
+ c->frac[ind_c] += (DECDIG)s;
+ if (c->frac[ind_c] >= BASE) {
+ s = c->frac[ind_c] / BASE;
+ carry += (DECDIG)s;
+ c->frac[ind_c] -= (DECDIG)(s * BASE);
+ }
if (carry) {
ii = ind_c;
while (ii-- > 0) {
@@ -4945,10 +6018,10 @@ VpMult(Real *c, Real *a, Real *b)
}
}
if (w != NULL) { /* free work variable */
- VpNmlz(c);
- VpAsgn(w, c, 1);
- VpFree(c);
- c = w;
+ VpNmlz(c);
+ VpAsgn(w, c, 1);
+ rbd_free_struct(c);
+ c = w;
}
else {
VpLimitRound(c,0);
@@ -4974,9 +6047,9 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
size_t word_a, word_b, word_c, word_r;
size_t i, n, ind_a, ind_b, ind_c, ind_r;
size_t nLoop;
- BDIGIT_DBL q, b1, b1p1, b1b2, b1b2p1, r1r2;
- BDIGIT borrow, borrow1, borrow2;
- BDIGIT_DBL qb;
+ DECDIG_DBL q, b1, b1p1, b1b2, b1b2p1, r1r2;
+ DECDIG borrow, borrow1, borrow2;
+ DECDIG_DBL qb;
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
@@ -5013,18 +6086,17 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
word_c = c->MaxPrec;
word_r = r->MaxPrec;
- ind_c = 0;
- ind_r = 1;
-
if (word_a >= word_r) goto space_error;
+ ind_r = 1;
r->frac[0] = 0;
while (ind_r <= word_a) {
r->frac[ind_r] = a->frac[ind_r - 1];
++ind_r;
}
-
while (ind_r < word_r) r->frac[ind_r++] = 0;
+
+ ind_c = 0;
while (ind_c < word_c) c->frac[ind_c++] = 0;
/* initial procedure */
@@ -5048,7 +6120,7 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
++ind_c;
continue;
}
- r1r2 = (BDIGIT_DBL)r->frac[ind_c] * BASE + r->frac[ind_c + 1];
+ r1r2 = (DECDIG_DBL)r->frac[ind_c] * BASE + r->frac[ind_c + 1];
if (r1r2 == b1b2) {
/* The first two word digits is the same */
ind_b = 2;
@@ -5085,17 +6157,17 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
/* The first two word digits is not the same, */
/* then compare magnitude, and divide actually. */
if (r1r2 >= b1b2p1) {
- q = r1r2 / b1b2p1; /* q == (BDIGIT)q */
- c->frac[ind_c] += (BDIGIT)q;
- ind_r = b->Prec + ind_c - 1;
- goto sub_mult;
+ q = r1r2 / b1b2p1; /* q == (DECDIG)q */
+ c->frac[ind_c] += (DECDIG)q;
+ ind_r = b->Prec + ind_c - 1;
+ goto sub_mult;
}
div_b1p1:
- if (ind_c + 1 >= word_c) goto out_side;
- q = r1r2 / b1p1; /* q == (BDIGIT)q */
- c->frac[ind_c + 1] += (BDIGIT)q;
- ind_r = b->Prec + ind_c;
+ if (ind_c + 1 >= word_c) goto out_side;
+ q = r1r2 / b1p1; /* q == (DECDIG)q */
+ c->frac[ind_c + 1] += (DECDIG)q;
+ ind_r = b->Prec + ind_c;
sub_mult:
borrow1 = borrow2 = 0;
@@ -5107,16 +6179,16 @@ sub_mult:
qb = q * b->frac[ind_b];
if (qb < BASE) borrow1 = 0;
else {
- borrow1 = (BDIGIT)(qb / BASE);
- qb -= (BDIGIT_DBL)borrow1 * BASE; /* get qb < BASE */
+ borrow1 = (DECDIG)(qb / BASE);
+ qb -= (DECDIG_DBL)borrow1 * BASE; /* get qb < BASE */
}
if(r->frac[ind_r] < qb) {
- r->frac[ind_r] += (BDIGIT)(BASE - qb);
- borrow2 = borrow2 + borrow1 + 1;
+ r->frac[ind_r] += (DECDIG)(BASE - qb);
+ borrow2 = borrow2 + borrow1 + 1;
}
else {
- r->frac[ind_r] -= (BDIGIT)qb;
- borrow2 += borrow1;
+ r->frac[ind_r] -= (DECDIG)qb;
+ borrow2 += borrow1;
}
if (borrow2) {
if(r->frac[ind_r - 1] < borrow2) {
@@ -5198,9 +6270,9 @@ VpNmlz(Real *a)
i = 0;
while (a->frac[i] == 0) ++i; /* skip the first few zeros */
if (i) {
- a->Prec -= i;
- if (!AddExponent(a, -(SIGNED_VALUE)i)) return 0;
- memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(BDIGIT));
+ a->Prec -= i;
+ if (!AddExponent(a, -(SIGNED_VALUE)i)) return 0;
+ memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(DECDIG));
}
return 1;
}
@@ -5318,12 +6390,11 @@ Exit:
* Note: % must not appear more than once
* a ... VP variable to be printed
*/
-#ifdef BIGDECIMAL_ENABLE_VPRINT
static int
VPrint(FILE *fp, const char *cntl_chr, Real *a)
{
size_t i, j, nc, nd, ZeroSup, sep = 10;
- BDIGIT m, e, nn;
+ DECDIG m, e, nn;
j = 0;
nd = nc = 0; /* nd : number of digits in fraction part(every 10 digits, */
@@ -5331,95 +6402,94 @@ VPrint(FILE *fp, const char *cntl_chr, Real *a)
/* nc : number of characters printed */
ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */
while (*(cntl_chr + j)) {
- if (*(cntl_chr + j) == '%' && *(cntl_chr + j + 1) != '%') {
- nc = 0;
- if (VpIsNaN(a)) {
- fprintf(fp, SZ_NaN);
- nc += 8;
- }
- else if (VpIsPosInf(a)) {
- fprintf(fp, SZ_INF);
- nc += 8;
- }
- else if (VpIsNegInf(a)) {
- fprintf(fp, SZ_NINF);
- nc += 9;
- }
- else if (!VpIsZero(a)) {
- if (BIGDECIMAL_NEGATIVE_P(a)) {
- fprintf(fp, "-");
- ++nc;
- }
- nc += fprintf(fp, "0.");
- switch (*(cntl_chr + j + 1)) {
- default:
- break;
+ if (*(cntl_chr + j) == '%' && *(cntl_chr + j + 1) != '%') {
+ nc = 0;
+ if (VpIsNaN(a)) {
+ fprintf(fp, SZ_NaN);
+ nc += 8;
+ }
+ else if (VpIsPosInf(a)) {
+ fprintf(fp, SZ_INF);
+ nc += 8;
+ }
+ else if (VpIsNegInf(a)) {
+ fprintf(fp, SZ_NINF);
+ nc += 9;
+ }
+ else if (!VpIsZero(a)) {
+ if (BIGDECIMAL_NEGATIVE_P(a)) {
+ fprintf(fp, "-");
+ ++nc;
+ }
+ nc += fprintf(fp, "0.");
+ switch (*(cntl_chr + j + 1)) {
+ default:
+ break;
- case '0': case 'z':
- ZeroSup = 0;
- ++j;
- sep = cntl_chr[j] == 'z' ? RMPD_COMPONENT_FIGURES : 10;
- break;
- }
- for (i = 0; i < a->Prec; ++i) {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- nc += fprintf(fp, "%lu", (unsigned long)nn); /* The leading zero(s) */
- /* as 0.00xx will not */
- /* be printed. */
- ++nd;
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- if (nd >= sep) { /* print ' ' after every 10 digits */
- nd = 0;
- nc += fprintf(fp, " ");
- }
- e = e - nn * m;
- m /= 10;
- }
- }
- nc += fprintf(fp, "E%"PRIdSIZE, VpExponent10(a));
- nc += fprintf(fp, " (%"PRIdVALUE", %lu, %lu)", a->exponent, a->Prec, a->MaxPrec);
- }
- else {
- nc += fprintf(fp, "0.0");
- }
- }
- else {
- ++nc;
- if (*(cntl_chr + j) == '\\') {
- switch (*(cntl_chr + j + 1)) {
- case 'n':
- fprintf(fp, "\n");
- ++j;
- break;
- case 't':
- fprintf(fp, "\t");
- ++j;
- break;
- case 'b':
- fprintf(fp, "\n");
- ++j;
- break;
- default:
- fprintf(fp, "%c", *(cntl_chr + j));
- break;
- }
- }
- else {
- fprintf(fp, "%c", *(cntl_chr + j));
- if (*(cntl_chr + j) == '%') ++j;
- }
- }
- j++;
+ case '0': case 'z':
+ ZeroSup = 0;
+ ++j;
+ sep = cntl_chr[j] == 'z' ? BIGDECIMAL_COMPONENT_FIGURES : 10;
+ break;
+ }
+ for (i = 0; i < a->Prec; ++i) {
+ m = BASE1;
+ e = a->frac[i];
+ while (m) {
+ nn = e / m;
+ if (!ZeroSup || nn) {
+ nc += fprintf(fp, "%lu", (unsigned long)nn); /* The leading zero(s) */
+ /* as 0.00xx will not */
+ /* be printed. */
+ ++nd;
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ if (nd >= sep) { /* print ' ' after every 10 digits */
+ nd = 0;
+ nc += fprintf(fp, " ");
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ nc += fprintf(fp, "E%"PRIdSIZE, VpExponent10(a));
+ nc += fprintf(fp, " (%"PRIdVALUE", %lu, %lu)", a->exponent, a->Prec, a->MaxPrec);
+ }
+ else {
+ nc += fprintf(fp, "0.0");
+ }
+ }
+ else {
+ ++nc;
+ if (*(cntl_chr + j) == '\\') {
+ switch (*(cntl_chr + j + 1)) {
+ case 'n':
+ fprintf(fp, "\n");
+ ++j;
+ break;
+ case 't':
+ fprintf(fp, "\t");
+ ++j;
+ break;
+ case 'b':
+ fprintf(fp, "\n");
+ ++j;
+ break;
+ default:
+ fprintf(fp, "%c", *(cntl_chr + j));
+ break;
+ }
+ }
+ else {
+ fprintf(fp, "%c", *(cntl_chr + j));
+ if (*(cntl_chr + j) == '%') ++j;
+ }
+ }
+ j++;
}
return (int)nc;
}
-#endif
static void
VpFormatSt(char *psz, size_t fFmt)
@@ -5464,188 +6534,254 @@ VpExponent10(Real *a)
}
VP_EXPORT void
-VpSzMantissa(Real *a,char *psz)
+VpSzMantissa(Real *a, char *buf, size_t buflen)
{
size_t i, n, ZeroSup;
- BDIGIT_DBL m, e, nn;
+ DECDIG_DBL m, e, nn;
if (VpIsNaN(a)) {
- sprintf(psz, SZ_NaN);
- return;
+ snprintf(buf, buflen, SZ_NaN);
+ return;
}
if (VpIsPosInf(a)) {
- sprintf(psz, SZ_INF);
+ snprintf(buf, buflen, SZ_INF);
return;
}
if (VpIsNegInf(a)) {
- sprintf(psz, SZ_NINF);
+ snprintf(buf, buflen, SZ_NINF);
return;
}
ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */
if (!VpIsZero(a)) {
- if (BIGDECIMAL_NEGATIVE_P(a)) *psz++ = '-';
- n = a->Prec;
- for (i = 0; i < n; ++i) {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- sprintf(psz, "%lu", (unsigned long)nn); /* The leading zero(s) */
- psz += strlen(psz);
- /* as 0.00xx will be ignored. */
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- e = e - nn * m;
- m /= 10;
- }
- }
- *psz = 0;
- while (psz[-1] == '0') *(--psz) = 0;
+ if (BIGDECIMAL_NEGATIVE_P(a)) *buf++ = '-';
+ n = a->Prec;
+ for (i = 0; i < n; ++i) {
+ m = BASE1;
+ e = a->frac[i];
+ while (m) {
+ nn = e / m;
+ if (!ZeroSup || nn) {
+ snprintf(buf, buflen, "%lu", (unsigned long)nn); /* The leading zero(s) */
+ buf += strlen(buf);
+ /* as 0.00xx will be ignored. */
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ *buf = 0;
+ while (buf[-1] == '0') *(--buf) = 0;
}
else {
- if (VpIsPosZero(a)) sprintf(psz, "0");
- else sprintf(psz, "-0");
+ if (VpIsPosZero(a)) snprintf(buf, buflen, "0");
+ else snprintf(buf, buflen, "-0");
}
}
VP_EXPORT int
-VpToSpecialString(Real *a,char *psz,int fPlus)
+VpToSpecialString(Real *a, char *buf, size_t buflen, int fPlus)
/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */
{
if (VpIsNaN(a)) {
- sprintf(psz,SZ_NaN);
- return 1;
+ snprintf(buf, buflen, SZ_NaN);
+ return 1;
}
if (VpIsPosInf(a)) {
- if (fPlus == 1) {
- *psz++ = ' ';
- }
- else if (fPlus == 2) {
- *psz++ = '+';
- }
- sprintf(psz, SZ_INF);
- return 1;
+ if (fPlus == 1) {
+ *buf++ = ' ';
+ }
+ else if (fPlus == 2) {
+ *buf++ = '+';
+ }
+ snprintf(buf, buflen, SZ_INF);
+ return 1;
}
if (VpIsNegInf(a)) {
- sprintf(psz, SZ_NINF);
- return 1;
+ snprintf(buf, buflen, SZ_NINF);
+ return 1;
}
if (VpIsZero(a)) {
- if (VpIsPosZero(a)) {
- if (fPlus == 1) sprintf(psz, " 0.0");
- else if (fPlus == 2) sprintf(psz, "+0.0");
- else sprintf(psz, "0.0");
- }
- else sprintf(psz, "-0.0");
- return 1;
+ if (VpIsPosZero(a)) {
+ if (fPlus == 1) snprintf(buf, buflen, " 0.0");
+ else if (fPlus == 2) snprintf(buf, buflen, "+0.0");
+ else snprintf(buf, buflen, "0.0");
+ }
+ else snprintf(buf, buflen, "-0.0");
+ return 1;
}
return 0;
}
VP_EXPORT void
-VpToString(Real *a, char *psz, size_t fFmt, int fPlus)
+VpToString(Real *a, char *buf, size_t buflen, size_t fFmt, int fPlus)
/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */
{
size_t i, n, ZeroSup;
- BDIGIT shift, m, e, nn;
- char *pszSav = psz;
+ DECDIG shift, m, e, nn;
+ char *p = buf;
+ size_t plen = buflen;
ssize_t ex;
- if (VpToSpecialString(a, psz, fPlus)) return;
+ if (VpToSpecialString(a, buf, buflen, fPlus)) return;
ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */
- if (BIGDECIMAL_NEGATIVE_P(a)) *psz++ = '-';
- else if (fPlus == 1) *psz++ = ' ';
- else if (fPlus == 2) *psz++ = '+';
+#define ADVANCE(n) do { \
+ if (plen < n) goto overflow; \
+ p += n; \
+ plen -= n; \
+} while (0)
+
+ if (BIGDECIMAL_NEGATIVE_P(a)) {
+ *p = '-';
+ ADVANCE(1);
+ }
+ else if (fPlus == 1) {
+ *p = ' ';
+ ADVANCE(1);
+ }
+ else if (fPlus == 2) {
+ *p = '+';
+ ADVANCE(1);
+ }
+
+ *p = '0'; ADVANCE(1);
+ *p = '.'; ADVANCE(1);
- *psz++ = '0';
- *psz++ = '.';
n = a->Prec;
for (i = 0; i < n; ++i) {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- sprintf(psz, "%lu", (unsigned long)nn); /* The reading zero(s) */
- psz += strlen(psz);
- /* as 0.00xx will be ignored. */
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- e = e - nn * m;
- m /= 10;
- }
+ m = BASE1;
+ e = a->frac[i];
+ while (m) {
+ nn = e / m;
+ if (!ZeroSup || nn) {
+ /* The reading zero(s) */
+ size_t n = (size_t)snprintf(p, plen, "%lu", (unsigned long)nn);
+ if (n > plen) goto overflow;
+ ADVANCE(n);
+ /* as 0.00xx will be ignored. */
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
}
+
ex = a->exponent * (ssize_t)BASE_FIG;
shift = BASE1;
while (a->frac[0] / shift == 0) {
- --ex;
- shift /= 10;
+ --ex;
+ shift /= 10;
}
- while (psz[-1] == '0') {
- *(--psz) = 0;
+ while (p - 1 > buf && p[-1] == '0') {
+ *(--p) = '\0';
+ ++plen;
}
- sprintf(psz, "e%"PRIdSIZE, ex);
- if (fFmt) VpFormatSt(pszSav, fFmt);
+ snprintf(p, plen, "e%"PRIdSIZE, ex);
+ if (fFmt) VpFormatSt(buf, fFmt);
+
+ overflow:
+ return;
+#undef ADVANCE
}
VP_EXPORT void
-VpToFString(Real *a, char *psz, size_t fFmt, int fPlus)
+VpToFString(Real *a, char *buf, size_t buflen, size_t fFmt, int fPlus)
/* fPlus = 0: default, 1: set ' ' before digits, 2: set '+' before digits. */
{
size_t i, n;
- BDIGIT m, e, nn;
- char *pszSav = psz;
+ DECDIG m, e, nn;
+ char *p = buf;
+ size_t plen = buflen;
ssize_t ex;
- if (VpToSpecialString(a, psz, fPlus)) return;
+ if (VpToSpecialString(a, buf, buflen, fPlus)) return;
+
+#define ADVANCE(n) do { \
+ if (plen < n) goto overflow; \
+ p += n; \
+ plen -= n; \
+} while (0)
- if (BIGDECIMAL_NEGATIVE_P(a)) *psz++ = '-';
- else if (fPlus == 1) *psz++ = ' ';
- else if (fPlus == 2) *psz++ = '+';
+
+ if (BIGDECIMAL_NEGATIVE_P(a)) {
+ *p = '-';
+ ADVANCE(1);
+ }
+ else if (fPlus == 1) {
+ *p = ' ';
+ ADVANCE(1);
+ }
+ else if (fPlus == 2) {
+ *p = '+';
+ ADVANCE(1);
+ }
n = a->Prec;
ex = a->exponent;
if (ex <= 0) {
- *psz++ = '0';*psz++ = '.';
- while (ex < 0) {
- for (i=0; i < BASE_FIG; ++i) *psz++ = '0';
- ++ex;
- }
- ex = -1;
+ *p = '0'; ADVANCE(1);
+ *p = '.'; ADVANCE(1);
+ while (ex < 0) {
+ for (i=0; i < BASE_FIG; ++i) {
+ *p = '0'; ADVANCE(1);
+ }
+ ++ex;
+ }
+ ex = -1;
}
for (i = 0; i < n; ++i) {
- --ex;
- if (i == 0 && ex >= 0) {
- sprintf(psz, "%lu", (unsigned long)a->frac[i]);
- psz += strlen(psz);
- }
- else {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- *psz++ = (char)(nn + '0');
- e = e - nn * m;
- m /= 10;
- }
- }
- if (ex == 0) *psz++ = '.';
+ --ex;
+ if (i == 0 && ex >= 0) {
+ size_t n = snprintf(p, plen, "%lu", (unsigned long)a->frac[i]);
+ if (n > plen) goto overflow;
+ ADVANCE(n);
+ }
+ else {
+ m = BASE1;
+ e = a->frac[i];
+ while (m) {
+ nn = e / m;
+ *p = (char)(nn + '0');
+ ADVANCE(1);
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ if (ex == 0) {
+ *p = '.';
+ ADVANCE(1);
+ }
}
while (--ex>=0) {
- m = BASE;
- while (m /= 10) *psz++ = '0';
- if (ex == 0) *psz++ = '.';
+ m = BASE;
+ while (m /= 10) {
+ *p = '0';
+ ADVANCE(1);
+ }
+ if (ex == 0) {
+ *p = '.';
+ ADVANCE(1);
+ }
+ }
+
+ *p = '\0';
+ while (p - 1 > buf && p[-1] == '0') {
+ *(--p) = '\0';
+ ++plen;
}
- *psz = 0;
- while (psz[-1] == '0') *(--psz) = 0;
- if (psz[-1] == '.') sprintf(psz, "0");
- if (fFmt) VpFormatSt(pszSav, fFmt);
+ if (p - 1 > buf && p[-1] == '.') {
+ snprintf(p, plen, "0");
+ }
+ if (fFmt) VpFormatSt(buf, fFmt);
+
+ overflow:
+ return;
+#undef ADVANCE
}
/*
@@ -5673,7 +6809,7 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
me = ne;
signe = 1;
exponent_overflow = 0;
- memset(a->frac, 0, ma * sizeof(BDIGIT));
+ memset(a->frac, 0, ma * sizeof(DECDIG));
if (ne > 0) {
i = 0;
if (exp_chr[0] == '-') {
@@ -5810,7 +6946,7 @@ Final:
* [Output]
* *d ... fraction part of m(d = 0.xxxxxxx). where # of 'x's is fig.
* *e ... exponent of m.
- * DBLE_FIG ... Number of digits in a double variable.
+ * BIGDECIMAL_DOUBLE_FIGURES ... Number of digits in a double variable.
*
* m -> d*10**e, 0<d<BASE
* [Returns]
@@ -5857,7 +6993,7 @@ VpVtoD(double *d, SIGNED_VALUE *e, Real *m)
goto Exit;
}
/* Normal number */
- fig = (DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
+ fig = roomof(BIGDECIMAL_DOUBLE_FIGURES, BASE_FIG);
ind_m = 0;
mm = Min(fig, m->Prec);
*d = 0.0;
@@ -5874,7 +7010,7 @@ Exit:
if (gfDebug) {
VPrint(stdout, " VpVtoD: m=%\n", m);
printf(" d=%e * 10 **%ld\n", *d, *e);
- printf(" DBLE_FIG = %d\n", DBLE_FIG);
+ printf(" BIGDECIMAL_DOUBLE_FIGURES = %d\n", BIGDECIMAL_DOUBLE_FIGURES);
}
#endif /*BIGDECIMAL_DEBUG */
return f;
@@ -5888,7 +7024,7 @@ VpDtoV(Real *m, double d)
{
size_t ind_m, mm;
SIGNED_VALUE ne;
- BDIGIT i;
+ DECDIG i;
double val, val2;
if (isnan(d)) {
@@ -5923,12 +7059,12 @@ VpDtoV(Real *m, double d)
/* Now val = 0.xxxxx*BASE**ne */
mm = m->MaxPrec;
- memset(m->frac, 0, mm * sizeof(BDIGIT));
+ memset(m->frac, 0, mm * sizeof(DECDIG));
for (ind_m = 0; val > 0.0 && ind_m < mm; ind_m++) {
- val *= (double)BASE;
- i = (BDIGIT)val;
- val -= (double)i;
- m->frac[ind_m] = i;
+ val *= (double)BASE;
+ i = (DECDIG)val;
+ val -= (double)i;
+ m->frac[ind_m] = i;
}
if (ind_m >= mm) ind_m = mm - 1;
VpSetSign(m, (d > 0.0) ? 1 : -1);
@@ -5936,7 +7072,7 @@ VpDtoV(Real *m, double d)
m->exponent = ne;
VpInternalRound(m, 0, (m->Prec > 0) ? m->frac[m->Prec-1] : 0,
- (BDIGIT)(val*(double)BASE));
+ (DECDIG)(val*(double)BASE));
Exit:
#ifdef BIGDECIMAL_DEBUG
@@ -6054,8 +7190,9 @@ VpSqrt(Real *y, Real *x)
if (x->MaxPrec > (size_t)n) n = (ssize_t)x->MaxPrec;
/* allocate temporally variables */
- f = VpAlloc(y->MaxPrec * (BASE_FIG + 2), "#1", 1, 1);
- r = VpAlloc((n + n) * (BASE_FIG + 2), "#1", 1, 1);
+ /* TODO: reconsider MaxPrec of f and r */
+ f = NewOneNolimit(1, y->MaxPrec * (BASE_FIG + 2));
+ r = NewOneNolimit(1, (n + n) * (BASE_FIG + 2));
nr = 0;
y_prec = y->MaxPrec;
@@ -6075,21 +7212,26 @@ VpSqrt(Real *y, Real *x)
}
VpDtoV(y, sqrt(val)); /* y <- sqrt(val) */
y->exponent += n;
- n = (SIGNED_VALUE)((DBLE_FIG + BASE_FIG - 1) / BASE_FIG);
+ n = (SIGNED_VALUE)roomof(BIGDECIMAL_DOUBLE_FIGURES, BASE_FIG);
y->MaxPrec = Min((size_t)n , y_prec);
f->MaxPrec = y->MaxPrec + 1;
n = (SIGNED_VALUE)(y_prec * BASE_FIG);
if (n < (SIGNED_VALUE)maxnr) n = (SIGNED_VALUE)maxnr;
+
+ /*
+ * Perform: y_{n+1} = (y_n - x/y_n) / 2
+ */
do {
- y->MaxPrec *= 2;
- if (y->MaxPrec > y_prec) y->MaxPrec = y_prec;
- f->MaxPrec = y->MaxPrec;
- VpDivd(f, r, x, y); /* f = x/y */
- VpAddSub(r, f, y, -1); /* r = f - y */
- VpMult(f, VpPt5, r); /* f = 0.5*r */
- if (VpIsZero(f)) goto converge;
- VpAddSub(r, f, y, 1); /* r = y + f */
- VpAsgn(y, r, 1); /* y = r */
+ y->MaxPrec *= 2;
+ if (y->MaxPrec > y_prec) y->MaxPrec = y_prec;
+ f->MaxPrec = y->MaxPrec;
+ VpDivd(f, r, x, y); /* f = x/y */
+ VpAddSub(r, f, y, -1); /* r = f - y */
+ VpMult(f, VpConstPt5, r); /* f = 0.5*r */
+ if (VpIsZero(f))
+ goto converge;
+ VpAddSub(r, f, y, 1); /* r = y + f */
+ VpAsgn(y, r, 1); /* y = r */
} while (++nr < n);
#ifdef BIGDECIMAL_DEBUG
@@ -6114,8 +7256,8 @@ converge:
y->MaxPrec = y_prec;
Exit:
- VpFree(f);
- VpFree(r);
+ rbd_free_struct(f);
+ rbd_free_struct(r);
return 1;
}
@@ -6132,8 +7274,8 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
/* exptoadd: number of digits needed to compensate negative nf */
int fracf, fracf_1further;
ssize_t n,i,ix,ioffset, exptoadd;
- BDIGIT v, shifter;
- BDIGIT div;
+ DECDIG v, shifter;
+ DECDIG div;
nf += y->exponent * (ssize_t)BASE_FIG;
exptoadd=0;
@@ -6155,8 +7297,8 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
n = (ssize_t)BASE_FIG - ioffset - 1;
for (shifter = 1, i = 0; i < n; ++i) shifter *= 10;
- /* so the representation used (in y->frac) is an array of BDIGIT, where
- each BDIGIT contains a value between 0 and BASE-1, consisting of BASE_FIG
+ /* so the representation used (in y->frac) is an array of DECDIG, where
+ each DECDIG contains a value between 0 and BASE-1, consisting of BASE_FIG
decimal places.
(that numbers of decimal places are typed as ssize_t is somewhat confusing)
@@ -6164,10 +7306,10 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
nf is now position (in decimal places) of the digit from the start of
the array.
- ix is the position (in BDIGITS) of the BDIGIT containing the decimal digit,
+ ix is the position (in DECDIGs) of the DECDIG containing the decimal digit,
from the start of the array.
- v is the value of this BDIGIT
+ v is the value of this DECDIG
ioffset is the number of extra decimal places along of this decimal digit
within v.
@@ -6193,7 +7335,7 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
now fracf_1further is whether any of the remaining digits within v are non-zero
*/
- /* now check all the remaining BDIGITS for zero-ness a whole BDIGIT at a time.
+ /* now check all the remaining DECDIGs for zero-ness a whole DECDIG at a time.
if we spot any non-zeroness, that means that we found a positive digit under
rounding position, and we also found a positive digit under one further than
the rounding position, so both searches (to see if any such non-zero digit exists)
@@ -6212,7 +7354,7 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
now v = the first digit under the rounding position */
/* drop digits after pointed digit */
- memset(y->frac + ix + 1, 0, (y->Prec - (ix + 1)) * sizeof(BDIGIT));
+ memset(y->frac + ix + 1, 0, (y->Prec - (ix + 1)) * sizeof(DECDIG));
switch (f) {
case VP_ROUND_DOWN: /* Truncate */
@@ -6240,11 +7382,11 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
}
else {
if (ioffset == 0) {
- /* v is the first decimal digit of its BDIGIT;
- need to grab the previous BDIGIT if present
- to check for evenness of the previous decimal
- digit (which is same as that of the BDIGIT since
- base 10 has a factor of 2) */
+ /* v is the first decimal digit of its DECDIG;
+ need to grab the previous DECDIG if present
+ to check for evenness of the previous decimal
+ digit (which is same as that of the DECDIG since
+ base 10 has a factor of 2) */
if (ix && (y->frac[ix-1] % 2)) ++div;
}
else {
@@ -6292,7 +7434,7 @@ VpLeftRound(Real *y, unsigned short f, ssize_t nf)
* Round from the left hand side of the digits.
*/
{
- BDIGIT v;
+ DECDIG v;
if (!VpHasVal(y)) return 0; /* Unable to round */
v = y->frac[0];
nf -= VpExponent(y) * (ssize_t)BASE_FIG;
@@ -6323,7 +7465,7 @@ VpLimitRound(Real *c, size_t ixDigit)
/* If I understand correctly, this is only ever used to round off the final decimal
digit of precision */
static void
-VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v)
+VpInternalRound(Real *c, size_t ixDigit, DECDIG vPrev, DECDIG v)
{
int f = 0;
@@ -6373,7 +7515,7 @@ VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v)
static int
VpRdup(Real *m, size_t ind_m)
{
- BDIGIT carry;
+ DECDIG carry;
if (!ind_m) ind_m = m->Prec;
@@ -6445,7 +7587,7 @@ Exit:
* y = x ** n
*/
VP_EXPORT int
-VpPower(Real *y, Real *x, SIGNED_VALUE n)
+VpPowerByInt(Real *y, Real *x, SIGNED_VALUE n)
{
size_t s, ss;
ssize_t sign;
@@ -6506,9 +7648,10 @@ VpPower(Real *y, Real *x, SIGNED_VALUE n)
}
/* Allocate working variables */
+ /* TODO: reconsider MaxPrec of w1 and w2 */
+ w1 = NewZeroNolimit(1, (y->MaxPrec + 2) * BASE_FIG);
+ w2 = NewZeroNolimit(1, (w1->MaxPrec * 2 + 1) * BASE_FIG);
- w1 = VpAlloc((y->MaxPrec + 2) * BASE_FIG, "#0", 1, 1);
- w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0", 1, 1);
/* calculation start */
VpAsgn(y, x, 1);
@@ -6532,13 +7675,13 @@ VpPower(Real *y, Real *x, SIGNED_VALUE n)
Exit:
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
- VPrint(stdout, "VpPower y=%\n", y);
- VPrint(stdout, "VpPower x=%\n", x);
+ VPrint(stdout, "VpPowerByInt y=%\n", y);
+ VPrint(stdout, "VpPowerByInt x=%\n", x);
printf(" n=%"PRIdVALUE"\n", n);
}
#endif /* BIGDECIMAL_DEBUG */
- VpFree(w2);
- VpFree(w1);
+ rbd_free_struct(w2);
+ rbd_free_struct(w1);
return 1;
}
@@ -6568,12 +7711,12 @@ VpVarCheck(Real * v)
}
for (i = 0; i < v->Prec; ++i) {
if (v->frac[i] >= BASE) {
- printf("ERROR(VpVarCheck): Illegal fraction\n");
- printf(" Frac[%"PRIuSIZE"]=%"PRIuBDIGIT"\n", i, v->frac[i]);
- printf(" Prec. =%"PRIuSIZE"\n", v->Prec);
- printf(" Exp. =%"PRIdVALUE"\n", v->exponent);
- printf(" BASE =%"PRIuBDIGIT"\n", BASE);
- return 3;
+ printf("ERROR(VpVarCheck): Illegal fraction\n");
+ printf(" Frac[%"PRIuSIZE"]=%"PRIuDECDIG"\n", i, v->frac[i]);
+ printf(" Prec. =%"PRIuSIZE"\n", v->Prec);
+ printf(" Exp. =%"PRIdVALUE"\n", v->exponent);
+ printf(" BASE =%"PRIuDECDIG"\n", BASE);
+ return 3;
}
}
return 0;
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index 53dbe91147..d215757188 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,17 +1,15 @@
# coding: utf-8
-bigdecimal_version = '2.0.0.dev'
-
Gem::Specification.new do |s|
s.name = "bigdecimal"
- s.version = bigdecimal_version
+ s.version = "3.1.3"
s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
s.email = ["mrkn@mrkn.jp"]
s.summary = "Arbitrary-precision decimal floating-point number library."
s.description = "This library provides arbitrary-precision decimal floating-point number class."
s.homepage = "https://github.com/ruby/bigdecimal"
- s.license = "ruby"
+ s.licenses = ["Ruby", "bsd-2-clause"]
s.require_paths = %w[lib]
s.extensions = %w[ext/bigdecimal/extconf.rb]
@@ -19,6 +17,12 @@ Gem::Specification.new do |s|
bigdecimal.gemspec
ext/bigdecimal/bigdecimal.c
ext/bigdecimal/bigdecimal.h
+ ext/bigdecimal/bits.h
+ ext/bigdecimal/feature.h
+ ext/bigdecimal/missing.c
+ ext/bigdecimal/missing.h
+ ext/bigdecimal/missing/dtoa.c
+ ext/bigdecimal/static_assert.h
lib/bigdecimal.rb
lib/bigdecimal/jacobian.rb
lib/bigdecimal/ludcmp.rb
@@ -30,10 +34,5 @@ Gem::Specification.new do |s|
sample/pi.rb
]
- s.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
-
- s.add_development_dependency "rake", "~> 10.0"
- s.add_development_dependency "rake-compiler", ">= 0.9"
- s.add_development_dependency "minitest", "< 5.0.0"
- s.add_development_dependency "pry"
+ s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
end
diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h
index e3eae06e67..54fed811fb 100644
--- a/ext/bigdecimal/bigdecimal.h
+++ b/ext/bigdecimal/bigdecimal.h
@@ -10,62 +10,74 @@
#define RUBY_BIG_DECIMAL_H 1
#define RUBY_NO_OLD_COMPATIBILITY
-
#include "ruby/ruby.h"
-#include <float.h>
-
-#ifndef RB_UNUSED_VAR
-# ifdef __GNUC__
-# define RB_UNUSED_VAR(x) x __attribute__ ((unused))
-# else
-# define RB_UNUSED_VAR(x) x
-# endif
-#endif
+#include "missing.h"
-#ifndef UNREACHABLE
-# define UNREACHABLE /* unreachable */
+#ifdef HAVE_FLOAT_H
+# include <float.h>
#endif
-#undef BDIGIT
-#undef SIZEOF_BDIGITS
-#undef BDIGIT_DBL
-#undef BDIGIT_DBL_SIGNED
-#undef PRI_BDIGIT_PREFIX
-#undef PRI_BDIGIT_DBL_PREFIX
-
#ifdef HAVE_INT64_T
-# define BDIGIT uint32_t
-# define BDIGIT_DBL uint64_t
-# define BDIGIT_DBL_SIGNED int64_t
-# define SIZEOF_BDIGITS 4
-# define PRI_BDIGIT_PREFIX ""
+# define DECDIG uint32_t
+# define DECDIG_DBL uint64_t
+# define DECDIG_DBL_SIGNED int64_t
+# define SIZEOF_DECDIG 4
+# define PRI_DECDIG_PREFIX ""
# ifdef PRI_LL_PREFIX
-# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
+# define PRI_DECDIG_DBL_PREFIX PRI_LL_PREFIX
# else
-# define PRI_BDIGIT_DBL_PREFIX "l"
+# define PRI_DECDIG_DBL_PREFIX "l"
# endif
#else
-# define BDIGIT uint16_t
-# define BDIGIT_DBL uint32_t
-# define BDIGIT_DBL_SIGNED int32_t
-# define SIZEOF_BDIGITS 2
-# define PRI_BDIGIT_PREFIX "h"
-# define PRI_BDIGIT_DBL_PREFIX ""
+# define DECDIG uint16_t
+# define DECDIG_DBL uint32_t
+# define DECDIG_DBL_SIGNED int32_t
+# define SIZEOF_DECDIG 2
+# define PRI_DECDIG_PREFIX "h"
+# define PRI_DECDIG_DBL_PREFIX ""
#endif
-#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
-#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
-#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
-#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
-#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
-#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
+#define PRIdDECDIG PRI_DECDIG_PREFIX"d"
+#define PRIiDECDIG PRI_DECDIG_PREFIX"i"
+#define PRIoDECDIG PRI_DECDIG_PREFIX"o"
+#define PRIuDECDIG PRI_DECDIG_PREFIX"u"
+#define PRIxDECDIG PRI_DECDIG_PREFIX"x"
+#define PRIXDECDIG PRI_DECDIG_PREFIX"X"
+
+#define PRIdDECDIG_DBL PRI_DECDIG_DBL_PREFIX"d"
+#define PRIiDECDIG_DBL PRI_DECDIG_DBL_PREFIX"i"
+#define PRIoDECDIG_DBL PRI_DECDIG_DBL_PREFIX"o"
+#define PRIuDECDIG_DBL PRI_DECDIG_DBL_PREFIX"u"
+#define PRIxDECDIG_DBL PRI_DECDIG_DBL_PREFIX"x"
+#define PRIXDECDIG_DBL PRI_DECDIG_DBL_PREFIX"X"
+
+#if SIZEOF_DECDIG == 4
+# define BIGDECIMAL_BASE ((DECDIG)1000000000U)
+# define BIGDECIMAL_COMPONENT_FIGURES 9
+/*
+ * The number of components required for a 64-bit integer.
+ *
+ * INT64_MAX: 9_223372036_854775807
+ * UINT64_MAX: 18_446744073_709551615
+ */
+# define BIGDECIMAL_INT64_MAX_LENGTH 3
+
+#elif SIZEOF_DECDIG == 2
+# define BIGDECIMAL_BASE ((DECDIG)10000U)
+# define BIGDECIMAL_COMPONENT_FIGURES 4
+/*
+ * The number of components required for a 64-bit integer.
+ *
+ * INT64_MAX: 922_3372_0368_5477_5807
+ * UINT64_MAX: 1844_6744_0737_0955_1615
+ */
+# define BIGDECIMAL_INT64_MAX_LENGTH 5
+
+#else
+# error Unknown size of DECDIG
+#endif
-#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
-#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
-#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
-#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
-#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
-#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
+#define BIGDECIMAL_DOUBLE_FIGURES (1+DBL_DIG)
#if defined(__cplusplus)
extern "C" {
@@ -74,111 +86,8 @@ extern "C" {
#endif
#endif
-#ifndef HAVE_LABS
-static inline long
-labs(long const x)
-{
- if (x < 0) return -x;
- return x;
-}
-#endif
-
-#ifndef HAVE_LLABS
-static inline LONG_LONG
-llabs(LONG_LONG const x)
-{
- if (x < 0) return -x;
- return x;
-}
-#endif
-
-#ifndef HAVE_FINITE
-static int
-finite(double)
-{
- return !isnan(n) && !isinf(n);
-}
-#endif
-
-#ifndef isfinite
-# ifndef HAVE_ISFINITE
-# define HAVE_ISFINITE 1
-# define isfinite(x) finite(x)
-# endif
-#endif
-
-#ifndef FIX_CONST_VALUE_PTR
-# if defined(__fcc__) || defined(__fcc_version) || \
- defined(__FCC__) || defined(__FCC_VERSION)
-/* workaround for old version of Fujitsu C Compiler (fcc) */
-# define FIX_CONST_VALUE_PTR(x) ((const VALUE *)(x))
-# else
-# define FIX_CONST_VALUE_PTR(x) (x)
-# endif
-#endif
-
-#ifndef HAVE_RB_ARRAY_CONST_PTR
-static inline const VALUE *
-rb_array_const_ptr(VALUE a)
-{
- return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
- RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
-}
-#endif
-
-#ifndef RARRAY_CONST_PTR
-# define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
-#endif
-
-#ifndef RARRAY_AREF
-# define RARRAY_AREF(a, i) (RARRAY_CONST_PTR(a)[i])
-#endif
-
-#ifndef HAVE_RB_SYM2STR
-static inline VALUE
-rb_sym2str(VALUE sym)
-{
- return rb_id2str(SYM2ID(sym));
-}
-#endif
-
-#ifndef ST2FIX
-# undef RB_ST2FIX
-# define RB_ST2FIX(h) LONG2FIX((long)(h))
-# define ST2FIX(h) RB_ST2FIX(h)
-#endif
-
-#ifdef vabs
-# undef vabs
-#endif
-#if SIZEOF_VALUE <= SIZEOF_INT
-# define vabs abs
-#elif SIZEOF_VALUE <= SIZEOF_LONG
-# define vabs labs
-#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG
-# define vabs llabs
-#endif
-
extern VALUE rb_cBigDecimal;
-#if 0 || SIZEOF_BDIGITS >= 16
-# define RMPD_COMPONENT_FIGURES 38
-# define RMPD_BASE ((BDIGIT)100000000000000000000000000000000000000U)
-#elif SIZEOF_BDIGITS >= 8
-# define RMPD_COMPONENT_FIGURES 19
-# define RMPD_BASE ((BDIGIT)10000000000000000000U)
-#elif SIZEOF_BDIGITS >= 4
-# define RMPD_COMPONENT_FIGURES 9
-# define RMPD_BASE ((BDIGIT)1000000000U)
-#elif SIZEOF_BDIGITS >= 2
-# define RMPD_COMPONENT_FIGURES 4
-# define RMPD_BASE ((BDIGIT)10000U)
-#else
-# define RMPD_COMPONENT_FIGURES 2
-# define RMPD_BASE ((BDIGIT)100U)
-#endif
-
-
/*
* NaN & Infinity
*/
@@ -193,7 +102,7 @@ extern VALUE rb_cBigDecimal;
*/
#define VP_EXPORT static
-/* Exception codes */
+/* Exception mode */
#define VP_EXCEPTION_ALL ((unsigned short)0x00FF)
#define VP_EXCEPTION_INFINITY ((unsigned short)0x0001)
#define VP_EXCEPTION_NaN ((unsigned short)0x0002)
@@ -203,22 +112,39 @@ extern VALUE rb_cBigDecimal;
/* Following 2 exceptions can't controlled by user */
#define VP_EXCEPTION_OP ((unsigned short)0x0020)
-#define VP_EXCEPTION_MEMORY ((unsigned short)0x0040)
-#define RMPD_EXCEPTION_MODE_DEFAULT 0U
+#define BIGDECIMAL_EXCEPTION_MODE_DEFAULT 0U
-/* Computation mode */
+/* This is used in BigDecimal#mode */
#define VP_ROUND_MODE ((unsigned short)0x0100)
-#define VP_ROUND_UP 1
-#define VP_ROUND_DOWN 2
-#define VP_ROUND_HALF_UP 3
-#define VP_ROUND_HALF_DOWN 4
-#define VP_ROUND_CEIL 5
-#define VP_ROUND_FLOOR 6
-#define VP_ROUND_HALF_EVEN 7
-
-#define RMPD_ROUNDING_MODE_DEFAULT VP_ROUND_HALF_UP
+/* Rounding mode */
+#define VP_ROUND_UP RBD_ROUND_UP
+#define VP_ROUND_DOWN RBD_ROUND_DOWN
+#define VP_ROUND_HALF_UP RBD_ROUND_HALF_UP
+#define VP_ROUND_HALF_DOWN RBD_ROUND_HALF_DOWN
+#define VP_ROUND_CEIL RBD_ROUND_CEIL
+#define VP_ROUND_FLOOR RBD_ROUND_FLOOR
+#define VP_ROUND_HALF_EVEN RBD_ROUND_HALF_EVEN
+
+enum rbd_rounding_mode {
+ RBD_ROUND_UP = 1,
+ RBD_ROUND_DOWN = 2,
+ RBD_ROUND_HALF_UP = 3,
+ RBD_ROUND_HALF_DOWN = 4,
+ RBD_ROUND_CEIL = 5,
+ RBD_ROUND_FLOOR = 6,
+ RBD_ROUND_HALF_EVEN = 7,
+
+ RBD_ROUND_DEFAULT = RBD_ROUND_HALF_UP,
+ RBD_ROUND_TRUNCATE = RBD_ROUND_DOWN,
+ RBD_ROUND_BANKER = RBD_ROUND_HALF_EVEN,
+ RBD_ROUND_CEILING = RBD_ROUND_CEIL
+};
+
+#define BIGDECIMAL_ROUNDING_MODE_DEFAULT VP_ROUND_HALF_UP
+
+/* Sign flag */
#define VP_SIGN_NaN 0 /* NaN */
#define VP_SIGN_POSITIVE_ZERO 1 /* Positive zero */
#define VP_SIGN_NEGATIVE_ZERO -1 /* Negative zero */
@@ -227,6 +153,7 @@ extern VALUE rb_cBigDecimal;
#define VP_SIGN_POSITIVE_INFINITE 3 /* Positive infinite number */
#define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */
+/* The size of fraction part array */
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#define FLEXIBLE_ARRAY_SIZE /* */
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
@@ -259,7 +186,7 @@ typedef struct {
* -3 : Negative infinite number
*/
short flag; /* Not used in vp_routines,space for user. */
- BDIGIT frac[FLEXIBLE_ARRAY_SIZE]; /* Array of fraction part. */
+ DECDIG frac[FLEXIBLE_ARRAY_SIZE]; /* Array of fraction part. */
} Real;
/*
@@ -268,21 +195,13 @@ typedef struct {
* ------------------
*/
-VP_EXPORT Real *
-VpNewRbClass(size_t mx, char const *str, VALUE klass);
-
-VP_EXPORT Real *VpCreateRbObject(size_t mx,const char *str);
+VP_EXPORT Real *VpNewRbClass(size_t mx, char const *str, VALUE klass, bool strict_p, bool raise_exception);
-static inline BDIGIT
-rmpd_base_value(void) { return RMPD_BASE; }
-static inline size_t
-rmpd_component_figures(void) { return RMPD_COMPONENT_FIGURES; }
-static inline size_t
-rmpd_double_figures(void) { return 1+DBL_DIG; }
+VP_EXPORT Real *VpCreateRbObject(size_t mx, const char *str, bool raise_exception);
-#define VpBaseFig() rmpd_component_figures()
-#define VpDblFig() rmpd_double_figures()
-#define VpBaseVal() rmpd_base_value()
+#define VpBaseFig() BIGDECIMAL_COMPONENT_FIGURES
+#define VpDblFig() BIGDECIMAL_DOUBLE_FIGURES
+#define VpBaseVal() BIGDECIMAL_BASE
/* Zero,Inf,NaN (isinf(),isnan() used to check) */
VP_EXPORT double VpGetDoubleNaN(void);
@@ -304,10 +223,7 @@ VP_EXPORT int VpException(unsigned short f,const char *str,int always);
VP_EXPORT int VpIsNegDoubleZero(double v);
#endif
VP_EXPORT size_t VpNumOfChars(Real *vp,const char *pszFmt);
-VP_EXPORT size_t VpInit(BDIGIT BaseVal);
-VP_EXPORT void *VpMemAlloc(size_t mb);
-VP_EXPORT void *VpMemRealloc(void *ptr, size_t mb);
-VP_EXPORT void VpFree(Real *pv);
+VP_EXPORT size_t VpInit(DECDIG BaseVal);
VP_EXPORT Real *VpAlloc(size_t mx, const char *szVal, int strict_p, int exc);
VP_EXPORT size_t VpAsgn(Real *c, Real *a, int isw);
VP_EXPORT size_t VpAddSub(Real *c,Real *a,Real *b,int operation);
@@ -315,10 +231,10 @@ VP_EXPORT size_t VpMult(Real *c,Real *a,Real *b);
VP_EXPORT size_t VpDivd(Real *c,Real *r,Real *a,Real *b);
VP_EXPORT int VpComp(Real *a,Real *b);
VP_EXPORT ssize_t VpExponent10(Real *a);
-VP_EXPORT void VpSzMantissa(Real *a,char *psz);
-VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
-VP_EXPORT void VpToString(Real *a, char *psz, size_t fFmt, int fPlus);
-VP_EXPORT void VpToFString(Real *a, char *psz, size_t fFmt, int fPlus);
+VP_EXPORT void VpSzMantissa(Real *a, char *buf, size_t bufsize);
+VP_EXPORT int VpToSpecialString(Real *a, char *buf, size_t bufsize, int fPlus);
+VP_EXPORT void VpToString(Real *a, char *buf, size_t bufsize, size_t fFmt, int fPlus);
+VP_EXPORT void VpToFString(Real *a, char *buf, size_t bufsize, size_t fFmt, int fPlus);
VP_EXPORT int VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, const char *exp_chr, size_t ne);
VP_EXPORT int VpVtoD(double *d, SIGNED_VALUE *e, Real *m);
VP_EXPORT void VpDtoV(Real *m,double d);
@@ -330,7 +246,8 @@ VP_EXPORT int VpActiveRound(Real *y, Real *x, unsigned short f, ssize_t il);
VP_EXPORT int VpMidRound(Real *y, unsigned short f, ssize_t nf);
VP_EXPORT int VpLeftRound(Real *y, unsigned short f, ssize_t nf);
VP_EXPORT void VpFrac(Real *y, Real *x);
-VP_EXPORT int VpPower(Real *y, Real *x, SIGNED_VALUE n);
+VP_EXPORT int VpPowerByInt(Real *y, Real *x, SIGNED_VALUE n);
+#define VpPower VpPowerByInt
/* VP constants */
VP_EXPORT Real *VpOne(void);
diff --git a/ext/bigdecimal/bits.h b/ext/bigdecimal/bits.h
new file mode 100644
index 0000000000..6e1e4776e3
--- /dev/null
+++ b/ext/bigdecimal/bits.h
@@ -0,0 +1,141 @@
+#ifndef BIGDECIMAL_BITS_H
+#define BIGDECIMAL_BITS_H
+
+#include "feature.h"
+#include "static_assert.h"
+
+#if defined(__x86_64__) && defined(HAVE_X86INTRIN_H)
+# include <x86intrin.h> /* for _lzcnt_u64, etc. */
+#elif defined(_MSC_VER) && defined(HAVE_INTRIN_H)
+# include <intrin.h> /* for the following intrinsics */
+#endif
+
+#if defined(_MSC_VER) && defined(__AVX2__)
+# pragma intrinsic(__lzcnt)
+# pragma intrinsic(__lzcnt64)
+#endif
+
+#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
+#define roomof(x, y) (((x) + (y) - 1) / (y))
+#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
+
+#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
+ (a) == 0 ? 0 : \
+ (a) == -1 ? (b) < -(max) : \
+ (a) > 0 ? \
+ ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
+ ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
+
+#ifdef HAVE_UINT128_T
+# define bit_length(x) \
+ (unsigned int) \
+ (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
+ sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : \
+ 128 - nlz_int128((uint128_t)(x)))
+#else
+# define bit_length(x) \
+ (unsigned int) \
+ (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
+ 64 - nlz_int64((uint64_t)(x)))
+#endif
+
+static inline unsigned nlz_int32(uint32_t x);
+static inline unsigned nlz_int64(uint64_t x);
+#ifdef HAVE_UINT128_T
+static inline unsigned nlz_int128(uint128_t x);
+#endif
+
+static inline unsigned int
+nlz_int32(uint32_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX2__) && defined(HAVE___LZCNT)
+ /* Note: It seems there is no such thing like __LZCNT__ predefined in MSVC.
+ * AMD CPUs have had this instruction for decades (since K10) but for
+ * Intel, Haswell is the oldest one. We need to use __AVX2__ for maximum
+ * safety. */
+ return (unsigned int)__lzcnt(x);
+
+#elif defined(__x86_64__) && defined(__LZCNT__) && defined(HAVE__LZCNT_U32)
+ return (unsigned int)_lzcnt_u32(x);
+
+#elif defined(_MSC_VER) && defined(HAVE__BITSCANREVERSE)
+ unsigned long r;
+ return _BitScanReverse(&r, x) ? (31 - (int)r) : 32;
+
+#elif __has_builtin(__builtin_clz)
+ STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32);
+ return x ? (unsigned int)__builtin_clz(x) : 32;
+
+#else
+ uint32_t y;
+ unsigned n = 32;
+ y = x >> 16; if (y) {n -= 16; x = y;}
+ y = x >> 8; if (y) {n -= 8; x = y;}
+ y = x >> 4; if (y) {n -= 4; x = y;}
+ y = x >> 2; if (y) {n -= 2; x = y;}
+ y = x >> 1; if (y) {return n - 2;}
+ return (unsigned int)(n - x);
+#endif
+}
+
+static inline unsigned int
+nlz_int64(uint64_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX2__) && defined(HAVE___LZCNT64)
+ return (unsigned int)__lzcnt64(x);
+
+#elif defined(__x86_64__) && defined(__LZCNT__) && defined(HAVE__LZCNT_U64)
+ return (unsigned int)_lzcnt_u64(x);
+
+#elif defined(_WIN64) && defined(_MSC_VER) && defined(HAVE__BITSCANREVERSE64)
+ unsigned long r;
+ return _BitScanReverse64(&r, x) ? (63u - (unsigned int)r) : 64;
+
+#elif __has_builtin(__builtin_clzl) && __has_builtin(__builtin_clzll) && !(defined(__sun) && defined(__sparc))
+ if (x == 0) {
+ return 64;
+ }
+ else if (sizeof(long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_clzl((unsigned long)x);
+ }
+ else if (sizeof(long long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_clzll((unsigned long long)x);
+ }
+ else {
+ /* :FIXME: Is there a way to make this branch a compile-time error? */
+ __builtin_unreachable();
+ }
+
+#else
+ uint64_t y;
+ unsigned int n = 64;
+ y = x >> 32; if (y) {n -= 32; x = y;}
+ y = x >> 16; if (y) {n -= 16; x = y;}
+ y = x >> 8; if (y) {n -= 8; x = y;}
+ y = x >> 4; if (y) {n -= 4; x = y;}
+ y = x >> 2; if (y) {n -= 2; x = y;}
+ y = x >> 1; if (y) {return n - 2;}
+ return (unsigned int)(n - x);
+
+#endif
+}
+
+#ifdef HAVE_UINT128_T
+static inline unsigned int
+nlz_int128(uint128_t x)
+{
+ uint64_t y = (uint64_t)(x >> 64);
+
+ if (x == 0) {
+ return 128;
+ }
+ else if (y == 0) {
+ return (unsigned int)nlz_int64(x) + 64;
+ }
+ else {
+ return (unsigned int)nlz_int64(y);
+ }
+}
+#endif
+
+#endif /* BIGDECIMAL_BITS_H */
diff --git a/ext/bigdecimal/depend b/ext/bigdecimal/depend
index ffd61b8960..ee892162f2 100644
--- a/ext/bigdecimal/depend
+++ b/ext/bigdecimal/depend
@@ -5,8 +5,156 @@ Makefile: $(BIGDECIMAL_RB)
bigdecimal.o: $(RUBY_EXTCONF_H)
bigdecimal.o: $(arch_hdrdir)/ruby/config.h
bigdecimal.o: $(hdrdir)/ruby/assert.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/assume.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/attributes.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/bool.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/limits.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/long_long.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bigdecimal.o: $(hdrdir)/ruby/backward/2/stdarg.h
bigdecimal.o: $(hdrdir)/ruby/defines.h
bigdecimal.o: $(hdrdir)/ruby/intern.h
+bigdecimal.o: $(hdrdir)/ruby/internal/abi.h
+bigdecimal.o: $(hdrdir)/ruby/internal/anyargs.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bigdecimal.o: $(hdrdir)/ruby/internal/assume.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/cold.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/const.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/error.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/format.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/pure.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/warning.h
+bigdecimal.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bigdecimal.o: $(hdrdir)/ruby/internal/cast.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bigdecimal.o: $(hdrdir)/ruby/internal/compiler_since.h
+bigdecimal.o: $(hdrdir)/ruby/internal/config.h
+bigdecimal.o: $(hdrdir)/ruby/internal/constant_p.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rarray.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rclass.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rdata.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rfile.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rhash.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/robject.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rstring.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bigdecimal.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bigdecimal.o: $(hdrdir)/ruby/internal/ctype.h
+bigdecimal.o: $(hdrdir)/ruby/internal/dllexport.h
+bigdecimal.o: $(hdrdir)/ruby/internal/dosish.h
+bigdecimal.o: $(hdrdir)/ruby/internal/error.h
+bigdecimal.o: $(hdrdir)/ruby/internal/eval.h
+bigdecimal.o: $(hdrdir)/ruby/internal/event.h
+bigdecimal.o: $(hdrdir)/ruby/internal/fl_type.h
+bigdecimal.o: $(hdrdir)/ruby/internal/gc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/glob.h
+bigdecimal.o: $(hdrdir)/ruby/internal/globals.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/attribute.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/builtin.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/extension.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/feature.h
+bigdecimal.o: $(hdrdir)/ruby/internal/has/warning.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/array.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/class.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/compar.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/complex.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/cont.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/dir.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/enum.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/error.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/eval.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/file.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/gc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/hash.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/io.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/load.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/object.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/parse.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/proc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/process.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/random.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/range.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/rational.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/re.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/select.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/signal.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/string.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/struct.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/thread.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/time.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/variable.h
+bigdecimal.o: $(hdrdir)/ruby/internal/intern/vm.h
+bigdecimal.o: $(hdrdir)/ruby/internal/interpreter.h
+bigdecimal.o: $(hdrdir)/ruby/internal/iterator.h
+bigdecimal.o: $(hdrdir)/ruby/internal/memory.h
+bigdecimal.o: $(hdrdir)/ruby/internal/method.h
+bigdecimal.o: $(hdrdir)/ruby/internal/module.h
+bigdecimal.o: $(hdrdir)/ruby/internal/newobj.h
+bigdecimal.o: $(hdrdir)/ruby/internal/rgengc.h
+bigdecimal.o: $(hdrdir)/ruby/internal/scan_args.h
+bigdecimal.o: $(hdrdir)/ruby/internal/special_consts.h
+bigdecimal.o: $(hdrdir)/ruby/internal/static_assert.h
+bigdecimal.o: $(hdrdir)/ruby/internal/stdalign.h
+bigdecimal.o: $(hdrdir)/ruby/internal/stdbool.h
+bigdecimal.o: $(hdrdir)/ruby/internal/symbol.h
+bigdecimal.o: $(hdrdir)/ruby/internal/value.h
+bigdecimal.o: $(hdrdir)/ruby/internal/value_type.h
+bigdecimal.o: $(hdrdir)/ruby/internal/variable.h
+bigdecimal.o: $(hdrdir)/ruby/internal/warning_push.h
+bigdecimal.o: $(hdrdir)/ruby/internal/xmalloc.h
bigdecimal.o: $(hdrdir)/ruby/missing.h
bigdecimal.o: $(hdrdir)/ruby/ruby.h
bigdecimal.o: $(hdrdir)/ruby/st.h
@@ -14,4 +162,169 @@ bigdecimal.o: $(hdrdir)/ruby/subst.h
bigdecimal.o: $(hdrdir)/ruby/util.h
bigdecimal.o: bigdecimal.c
bigdecimal.o: bigdecimal.h
+bigdecimal.o: bits.h
+bigdecimal.o: feature.h
+bigdecimal.o: missing.h
+bigdecimal.o: static_assert.h
+missing.o: $(RUBY_EXTCONF_H)
+missing.o: $(arch_hdrdir)/ruby/config.h
+missing.o: $(hdrdir)/ruby/assert.h
+missing.o: $(hdrdir)/ruby/atomic.h
+missing.o: $(hdrdir)/ruby/backward.h
+missing.o: $(hdrdir)/ruby/backward/2/assume.h
+missing.o: $(hdrdir)/ruby/backward/2/attributes.h
+missing.o: $(hdrdir)/ruby/backward/2/bool.h
+missing.o: $(hdrdir)/ruby/backward/2/inttypes.h
+missing.o: $(hdrdir)/ruby/backward/2/limits.h
+missing.o: $(hdrdir)/ruby/backward/2/long_long.h
+missing.o: $(hdrdir)/ruby/backward/2/stdalign.h
+missing.o: $(hdrdir)/ruby/backward/2/stdarg.h
+missing.o: $(hdrdir)/ruby/defines.h
+missing.o: $(hdrdir)/ruby/intern.h
+missing.o: $(hdrdir)/ruby/internal/abi.h
+missing.o: $(hdrdir)/ruby/internal/anyargs.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+missing.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+missing.o: $(hdrdir)/ruby/internal/assume.h
+missing.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+missing.o: $(hdrdir)/ruby/internal/attr/artificial.h
+missing.o: $(hdrdir)/ruby/internal/attr/cold.h
+missing.o: $(hdrdir)/ruby/internal/attr/const.h
+missing.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+missing.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+missing.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+missing.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+missing.o: $(hdrdir)/ruby/internal/attr/error.h
+missing.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+missing.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+missing.o: $(hdrdir)/ruby/internal/attr/format.h
+missing.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+missing.o: $(hdrdir)/ruby/internal/attr/noalias.h
+missing.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+missing.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+missing.o: $(hdrdir)/ruby/internal/attr/noinline.h
+missing.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+missing.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+missing.o: $(hdrdir)/ruby/internal/attr/pure.h
+missing.o: $(hdrdir)/ruby/internal/attr/restrict.h
+missing.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+missing.o: $(hdrdir)/ruby/internal/attr/warning.h
+missing.o: $(hdrdir)/ruby/internal/attr/weakref.h
+missing.o: $(hdrdir)/ruby/internal/cast.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+missing.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+missing.o: $(hdrdir)/ruby/internal/compiler_since.h
+missing.o: $(hdrdir)/ruby/internal/config.h
+missing.o: $(hdrdir)/ruby/internal/constant_p.h
+missing.o: $(hdrdir)/ruby/internal/core.h
+missing.o: $(hdrdir)/ruby/internal/core/rarray.h
+missing.o: $(hdrdir)/ruby/internal/core/rbasic.h
+missing.o: $(hdrdir)/ruby/internal/core/rbignum.h
+missing.o: $(hdrdir)/ruby/internal/core/rclass.h
+missing.o: $(hdrdir)/ruby/internal/core/rdata.h
+missing.o: $(hdrdir)/ruby/internal/core/rfile.h
+missing.o: $(hdrdir)/ruby/internal/core/rhash.h
+missing.o: $(hdrdir)/ruby/internal/core/robject.h
+missing.o: $(hdrdir)/ruby/internal/core/rregexp.h
+missing.o: $(hdrdir)/ruby/internal/core/rstring.h
+missing.o: $(hdrdir)/ruby/internal/core/rstruct.h
+missing.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+missing.o: $(hdrdir)/ruby/internal/ctype.h
+missing.o: $(hdrdir)/ruby/internal/dllexport.h
+missing.o: $(hdrdir)/ruby/internal/dosish.h
+missing.o: $(hdrdir)/ruby/internal/error.h
+missing.o: $(hdrdir)/ruby/internal/eval.h
+missing.o: $(hdrdir)/ruby/internal/event.h
+missing.o: $(hdrdir)/ruby/internal/fl_type.h
+missing.o: $(hdrdir)/ruby/internal/gc.h
+missing.o: $(hdrdir)/ruby/internal/glob.h
+missing.o: $(hdrdir)/ruby/internal/globals.h
+missing.o: $(hdrdir)/ruby/internal/has/attribute.h
+missing.o: $(hdrdir)/ruby/internal/has/builtin.h
+missing.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+missing.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+missing.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+missing.o: $(hdrdir)/ruby/internal/has/extension.h
+missing.o: $(hdrdir)/ruby/internal/has/feature.h
+missing.o: $(hdrdir)/ruby/internal/has/warning.h
+missing.o: $(hdrdir)/ruby/internal/intern/array.h
+missing.o: $(hdrdir)/ruby/internal/intern/bignum.h
+missing.o: $(hdrdir)/ruby/internal/intern/class.h
+missing.o: $(hdrdir)/ruby/internal/intern/compar.h
+missing.o: $(hdrdir)/ruby/internal/intern/complex.h
+missing.o: $(hdrdir)/ruby/internal/intern/cont.h
+missing.o: $(hdrdir)/ruby/internal/intern/dir.h
+missing.o: $(hdrdir)/ruby/internal/intern/enum.h
+missing.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+missing.o: $(hdrdir)/ruby/internal/intern/error.h
+missing.o: $(hdrdir)/ruby/internal/intern/eval.h
+missing.o: $(hdrdir)/ruby/internal/intern/file.h
+missing.o: $(hdrdir)/ruby/internal/intern/gc.h
+missing.o: $(hdrdir)/ruby/internal/intern/hash.h
+missing.o: $(hdrdir)/ruby/internal/intern/io.h
+missing.o: $(hdrdir)/ruby/internal/intern/load.h
+missing.o: $(hdrdir)/ruby/internal/intern/marshal.h
+missing.o: $(hdrdir)/ruby/internal/intern/numeric.h
+missing.o: $(hdrdir)/ruby/internal/intern/object.h
+missing.o: $(hdrdir)/ruby/internal/intern/parse.h
+missing.o: $(hdrdir)/ruby/internal/intern/proc.h
+missing.o: $(hdrdir)/ruby/internal/intern/process.h
+missing.o: $(hdrdir)/ruby/internal/intern/random.h
+missing.o: $(hdrdir)/ruby/internal/intern/range.h
+missing.o: $(hdrdir)/ruby/internal/intern/rational.h
+missing.o: $(hdrdir)/ruby/internal/intern/re.h
+missing.o: $(hdrdir)/ruby/internal/intern/ruby.h
+missing.o: $(hdrdir)/ruby/internal/intern/select.h
+missing.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+missing.o: $(hdrdir)/ruby/internal/intern/signal.h
+missing.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+missing.o: $(hdrdir)/ruby/internal/intern/string.h
+missing.o: $(hdrdir)/ruby/internal/intern/struct.h
+missing.o: $(hdrdir)/ruby/internal/intern/thread.h
+missing.o: $(hdrdir)/ruby/internal/intern/time.h
+missing.o: $(hdrdir)/ruby/internal/intern/variable.h
+missing.o: $(hdrdir)/ruby/internal/intern/vm.h
+missing.o: $(hdrdir)/ruby/internal/interpreter.h
+missing.o: $(hdrdir)/ruby/internal/iterator.h
+missing.o: $(hdrdir)/ruby/internal/memory.h
+missing.o: $(hdrdir)/ruby/internal/method.h
+missing.o: $(hdrdir)/ruby/internal/module.h
+missing.o: $(hdrdir)/ruby/internal/newobj.h
+missing.o: $(hdrdir)/ruby/internal/rgengc.h
+missing.o: $(hdrdir)/ruby/internal/scan_args.h
+missing.o: $(hdrdir)/ruby/internal/special_consts.h
+missing.o: $(hdrdir)/ruby/internal/static_assert.h
+missing.o: $(hdrdir)/ruby/internal/stdalign.h
+missing.o: $(hdrdir)/ruby/internal/stdbool.h
+missing.o: $(hdrdir)/ruby/internal/symbol.h
+missing.o: $(hdrdir)/ruby/internal/value.h
+missing.o: $(hdrdir)/ruby/internal/value_type.h
+missing.o: $(hdrdir)/ruby/internal/variable.h
+missing.o: $(hdrdir)/ruby/internal/warning_push.h
+missing.o: $(hdrdir)/ruby/internal/xmalloc.h
+missing.o: $(hdrdir)/ruby/missing.h
+missing.o: $(hdrdir)/ruby/ruby.h
+missing.o: $(hdrdir)/ruby/st.h
+missing.o: $(hdrdir)/ruby/subst.h
+missing.o: missing.c
+missing.o: missing/dtoa.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb
index b4098fdacf..17e7905dd6 100644
--- a/ext/bigdecimal/extconf.rb
+++ b/ext/bigdecimal/extconf.rb
@@ -3,10 +3,7 @@ require 'mkmf'
def check_bigdecimal_version(gemspec_path)
message "checking RUBY_BIGDECIMAL_VERSION... "
-
- bigdecimal_version =
- IO.readlines(gemspec_path)
- .grep(/\Abigdecimal_version\s+=\s+/)[0][/\'([^\']+)\'/, 1]
+ bigdecimal_version = File.read(gemspec_path).match(/^\s*s\.version\s+=\s+['"]([^'"]+)['"]\s*$/)[1]
version_components = bigdecimal_version.split('.')
bigdecimal_version = version_components[0, 3].join('.')
@@ -16,6 +13,20 @@ def check_bigdecimal_version(gemspec_path)
message "#{bigdecimal_version}\n"
end
+def have_builtin_func(name, check_expr, opt = "", &b)
+ checking_for checking_message(name.funcall_style, nil, opt) do
+ if try_compile(<<SRC, opt, &b)
+int foo;
+int main() { #{check_expr}; return 0; }
+SRC
+ $defs.push(format("-DHAVE_BUILTIN_%s", name.tr_cpp))
+ true
+ else
+ false
+ end
+ end
+end
+
gemspec_name = gemspec_path = nil
unless ['', '../../'].any? {|dir|
gemspec_name = "#{dir}bigdecimal.gemspec"
@@ -28,17 +39,41 @@ end
check_bigdecimal_version(gemspec_path)
+have_builtin_func("__builtin_clz", "__builtin_clz(0)")
+have_builtin_func("__builtin_clzl", "__builtin_clzl(0)")
+have_builtin_func("__builtin_clzll", "__builtin_clzll(0)")
+
+have_header("float.h")
+have_header("math.h")
+have_header("stdbool.h")
+have_header("stdlib.h")
+
+have_header("x86intrin.h")
+have_func("_lzcnt_u32", "x86intrin.h")
+have_func("_lzcnt_u64", "x86intrin.h")
+
+have_header("intrin.h")
+have_func("__lzcnt", "intrin.h")
+have_func("__lzcnt64", "intrin.h")
+have_func("_BitScanReverse", "intrin.h")
+have_func("_BitScanReverse64", "intrin.h")
+
have_func("labs", "stdlib.h")
have_func("llabs", "stdlib.h")
have_func("finite", "math.h")
have_func("isfinite", "math.h")
-have_type("struct RRational", "ruby.h")
+have_header("ruby/atomic.h")
+have_header("ruby/internal/has/builtin.h")
+have_header("ruby/internal/static_assert.h")
+
have_func("rb_rational_num", "ruby.h")
have_func("rb_rational_den", "ruby.h")
-have_func("rb_array_const_ptr", "ruby.h")
-have_func("rb_sym2str", "ruby.h")
+have_func("rb_complex_real", "ruby.h")
+have_func("rb_complex_imag", "ruby.h")
have_func("rb_opts_exception_p", "ruby.h")
+have_func("rb_category_warn", "ruby.h")
+have_const("RB_WARN_CATEGORY_DEPRECATED", "ruby.h")
if File.file?(File.expand_path('../lib/bigdecimal.rb', __FILE__))
bigdecimal_rb = "$(srcdir)/lib/bigdecimal.rb"
diff --git a/ext/bigdecimal/feature.h b/ext/bigdecimal/feature.h
new file mode 100644
index 0000000000..f628514500
--- /dev/null
+++ b/ext/bigdecimal/feature.h
@@ -0,0 +1,68 @@
+#ifndef BIGDECIMAL_HAS_FEATURE_H
+#define BIGDECIMAL_HAS_FEATURE_H
+
+/* ======== __has_feature ======== */
+
+#ifndef __has_feature
+# define __has_feature(_) 0
+#endif
+
+/* ======== __has_extension ======== */
+
+#ifndef __has_extension
+# define __has_extension __has_feature
+#endif
+
+/* ======== __has_builtin ======== */
+
+#ifdef HAVE_RUBY_INTERNAL_HAS_BUILTIN_H
+# include <ruby/internal/has/builtin.h>
+#endif
+
+#ifdef RBIMPL_HAS_BUILTIN
+# define BIGDECIMAL_HAS_BUILTIN(...) RBIMPL_HAS_BUILTIN(__VA_ARGS__)
+
+#else
+# /* The following section is copied from CRuby's builtin.h */
+#
+# ifdef __has_builtin
+# if defined(__INTEL_COMPILER)
+# /* :TODO: Intel C Compiler has __has_builtin (since 19.1 maybe?), and is
+# * reportedly broken. We have to skip them. However the situation can
+# * change. They might improve someday. We need to revisit here later. */
+# elif defined(__GNUC__) && ! __has_builtin(__builtin_alloca)
+# /* FreeBSD's <sys/cdefs.h> defines its own *broken* version of
+# * __has_builtin. Cygwin copied that content to be a victim of the
+# * broken-ness. We don't take them into account. */
+# else
+# define HAVE___HAS_BUILTIN 1
+# endif
+# endif
+#
+# if defined(HAVE___HAS_BUILTIN)
+# define BIGDECIMAL_HAS_BUILTIN(_) __has_builtin(_)
+#
+# elif defined(__GNUC__)
+# define BIGDECIMAL_HAS_BUILTIN(_) BIGDECIMAL_HAS_BUILTIN_ ## _
+# if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 6))
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clz 1
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl 1
+# else
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clz 0
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl 0
+# endif
+# elif defined(_MSC_VER)
+# define BIGDECIMAL_HAS_BUILTIN(_) 0
+#
+# else
+# define BIGDECIMAL_HAS_BUILTIN(_) BIGDECIMAL_HAS_BUILTIN_ ## _
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ
+# define BIGDECIMAL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL
+# endif
+#endif /* RBIMPL_HAS_BUILTIN */
+
+#ifndef __has_builtin
+# define __has_builtin(...) BIGDECIMAL_HAS_BUILTIN(__VA_ARGS__)
+#endif
+
+#endif /* BIGDECIMAL_HAS_FEATURE_H */
diff --git a/ext/bigdecimal/lib/bigdecimal/jacobian.rb b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
index 5e29304299..4448024c74 100644
--- a/ext/bigdecimal/lib/bigdecimal/jacobian.rb
+++ b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
@@ -42,8 +42,8 @@ module Jacobian
end
- # Computes the derivative of f[i] at x[i].
- # fx is the value of f at x.
+ # Computes the derivative of +f[i]+ at +x[i]+.
+ # +fx+ is the value of +f+ at +x+.
def dfdxi(f,fx,x,i)
nRetry = 0
n = x.size
@@ -75,7 +75,7 @@ module Jacobian
deriv
end
- # Computes the Jacobian of f at x. fx is the value of f at x.
+ # Computes the Jacobian of +f+ at +x+. +fx+ is the value of +f+ at +x+.
def jacobian(f,fx,x)
n = x.size
dfdx = Array.new(n*n)
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb
index 4ece8347bd..ad92f7cfe6 100644
--- a/ext/bigdecimal/lib/bigdecimal/util.rb
+++ b/ext/bigdecimal/lib/bigdecimal/util.rb
@@ -33,17 +33,21 @@ class Float < Numeric
#
# Returns the value of +float+ as a BigDecimal.
# The +precision+ parameter is used to determine the number of
- # significant digits for the result (the default is Float::DIG).
+ # significant digits for the result. When +precision+ is set to +0+,
+ # the number of digits to represent the float being converted is determined
+ # automatically.
+ # The default +precision+ is +0+.
#
# require 'bigdecimal'
# require 'bigdecimal/util'
#
# 0.5.to_d # => 0.5e0
+ # 1.234.to_d # => 0.1234e1
# 1.234.to_d(2) # => 0.12e1
#
# See also BigDecimal::new.
#
- def to_d(precision=Float::DIG)
+ def to_d(precision=0)
BigDecimal(self, precision)
end
end
@@ -131,6 +135,39 @@ class Rational < Numeric
end
+class Complex < Numeric
+ # call-seq:
+ # cmp.to_d -> bigdecimal
+ # cmp.to_d(precision) -> bigdecimal
+ #
+ # Returns the value as a BigDecimal.
+ #
+ # The +precision+ parameter is required for a rational complex number.
+ # This parameter is used to determine the number of significant digits
+ # for the result.
+ #
+ # require 'bigdecimal'
+ # require 'bigdecimal/util'
+ #
+ # Complex(0.1234567, 0).to_d(4) # => 0.1235e0
+ # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
+ #
+ # See also BigDecimal::new.
+ #
+ def to_d(*args)
+ BigDecimal(self) unless self.imag.zero? # to raise eerror
+
+ if args.length == 0
+ case self.real
+ when Rational
+ BigDecimal(self.real) # to raise error
+ end
+ end
+ self.real.to_d(*args)
+ end
+end
+
+
class NilClass
# call-seq:
# nil.to_d -> bigdecimal
diff --git a/ext/bigdecimal/missing.c b/ext/bigdecimal/missing.c
new file mode 100644
index 0000000000..703232d92f
--- /dev/null
+++ b/ext/bigdecimal/missing.c
@@ -0,0 +1,27 @@
+#include <ruby/ruby.h>
+
+#ifdef HAVE_RUBY_ATOMIC_H
+# include <ruby/atomic.h>
+#endif
+
+#ifdef RUBY_ATOMIC_PTR_CAS
+# define ATOMIC_PTR_CAS(var, old, new) RUBY_ATOMIC_PTR_CAS(var, old, new)
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+/* GCC warns about unknown sanitizer, which is annoying. */
+# undef NO_SANITIZE
+# define NO_SANITIZE(x, y) \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
+ __attribute__((__no_sanitize__(x))) y; \
+ _Pragma("GCC diagnostic pop")
+#endif
+
+#undef strtod
+#define strtod BigDecimal_strtod
+#undef dtoa
+#define dtoa BigDecimal_dtoa
+#undef hdtoa
+#define hdtoa BigDecimal_hdtoa
+#include "missing/dtoa.c"
diff --git a/ext/bigdecimal/missing.h b/ext/bigdecimal/missing.h
new file mode 100644
index 0000000000..325554b5f5
--- /dev/null
+++ b/ext/bigdecimal/missing.h
@@ -0,0 +1,196 @@
+#ifndef MISSING_H
+#define MISSING_H 1
+
+#if defined(__cplusplus)
+extern "C" {
+#if 0
+} /* satisfy cc-mode */
+#endif
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_MATH_H
+# include <math.h>
+#endif
+
+#ifndef RB_UNUSED_VAR
+# if defined(_MSC_VER) && _MSC_VER >= 1911
+# define RB_UNUSED_VAR(x) x [[maybe_unused]]
+
+# elif defined(__has_cpp_attribute) && __has_cpp_attribute(maybe_unused)
+# define RB_UNUSED_VAR(x) x [[maybe_unused]]
+
+# elif defined(__has_c_attribute) && __has_c_attribute(maybe_unused)
+# define RB_UNUSED_VAR(x) x [[maybe_unused]]
+
+# elif defined(__GNUC__)
+# define RB_UNUSED_VAR(x) x __attribute__ ((unused))
+
+# else
+# define RB_UNUSED_VAR(x) x
+# endif
+#endif /* RB_UNUSED_VAR */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1310
+# define HAVE___ASSUME 1
+
+#elif defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1300
+# define HAVE___ASSUME 1
+#endif
+
+#ifndef UNREACHABLE
+# if __has_builtin(__builtin_unreachable)
+# define UNREACHABLE __builtin_unreachable()
+
+# elif defined(HAVE___ASSUME)
+# define UNREACHABLE __assume(0)
+
+# else
+# define UNREACHABLE /* unreachable */
+# endif
+#endif /* UNREACHABLE */
+
+/* bool */
+
+#if defined(__bool_true_false_are_defined)
+# /* Take that. */
+
+#elif defined(HAVE_STDBOOL_H)
+# include <stdbool.h>
+
+#else
+typedef unsigned char _Bool;
+# define bool _Bool
+# define true ((_Bool)+1)
+# define false ((_Bool)-1)
+# define __bool_true_false_are_defined
+#endif
+
+/* abs */
+
+#ifndef HAVE_LABS
+static inline long
+labs(long const x)
+{
+ if (x < 0) return -x;
+ return x;
+}
+#endif
+
+#ifndef HAVE_LLABS
+static inline LONG_LONG
+llabs(LONG_LONG const x)
+{
+ if (x < 0) return -x;
+ return x;
+}
+#endif
+
+#ifdef vabs
+# undef vabs
+#endif
+#if SIZEOF_VALUE <= SIZEOF_INT
+# define vabs abs
+#elif SIZEOF_VALUE <= SIZEOF_LONG
+# define vabs labs
+#elif SIZEOF_VALUE <= SIZEOF_LONG_LONG
+# define vabs llabs
+#endif
+
+/* finite */
+
+#ifndef HAVE_FINITE
+static int
+finite(double)
+{
+ return !isnan(n) && !isinf(n);
+}
+#endif
+
+#ifndef isfinite
+# ifndef HAVE_ISFINITE
+# define HAVE_ISFINITE 1
+# define isfinite(x) finite(x)
+# endif
+#endif
+
+/* dtoa */
+char *BigDecimal_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
+
+/* rational */
+
+#ifndef HAVE_RB_RATIONAL_NUM
+static inline VALUE
+rb_rational_num(VALUE rat)
+{
+#ifdef RRATIONAL
+ return RRATIONAL(rat)->num;
+#else
+ return rb_funcall(rat, rb_intern("numerator"), 0);
+#endif
+}
+#endif
+
+#ifndef HAVE_RB_RATIONAL_DEN
+static inline VALUE
+rb_rational_den(VALUE rat)
+{
+#ifdef RRATIONAL
+ return RRATIONAL(rat)->den;
+#else
+ return rb_funcall(rat, rb_intern("denominator"), 0);
+#endif
+}
+#endif
+
+/* complex */
+
+#ifndef HAVE_RB_COMPLEX_REAL
+static inline VALUE
+rb_complex_real(VALUE cmp)
+{
+#ifdef RCOMPLEX
+ return RCOMPLEX(cmp)->real;
+#else
+ return rb_funcall(cmp, rb_intern("real"), 0);
+#endif
+}
+#endif
+
+#ifndef HAVE_RB_COMPLEX_IMAG
+static inline VALUE
+rb_complex_imag(VALUE cmp)
+{
+# ifdef RCOMPLEX
+ return RCOMPLEX(cmp)->imag;
+# else
+ return rb_funcall(cmp, rb_intern("imag"), 0);
+# endif
+}
+#endif
+
+/* st */
+
+#ifndef ST2FIX
+# undef RB_ST2FIX
+# define RB_ST2FIX(h) LONG2FIX((long)(h))
+# define ST2FIX(h) RB_ST2FIX(h)
+#endif
+
+/* warning */
+
+#if !defined(HAVE_RB_CATEGORY_WARN) || !defined(HAVE_CONST_RB_WARN_CATEGORY_DEPRECATED)
+# define rb_category_warn(category, ...) rb_warn(__VA_ARGS__)
+#endif
+
+#if defined(__cplusplus)
+#if 0
+{ /* satisfy cc-mode */
+#endif
+} /* extern "C" { */
+#endif
+
+#endif /* MISSING_H */
diff --git a/ext/bigdecimal/missing/dtoa.c b/ext/bigdecimal/missing/dtoa.c
new file mode 100644
index 0000000000..41b0a221d1
--- /dev/null
+++ b/ext/bigdecimal/missing/dtoa.c
@@ -0,0 +1,3462 @@
+/****************************************************************
+ *
+ * The author of this software is David M. Gay.
+ *
+ * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose without fee is hereby granted, provided that this entire notice
+ * is included in all copies of any software which is or includes a copy
+ * or modification of this software and in all copies of the supporting
+ * documentation for such software.
+ *
+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+ *
+ ***************************************************************/
+
+/* Please send bug reports to David M. Gay (dmg at acm dot org,
+ * with " at " changed at "@" and " dot " changed to "."). */
+
+/* On a machine with IEEE extended-precision registers, it is
+ * necessary to specify double-precision (53-bit) rounding precision
+ * before invoking strtod or dtoa. If the machine uses (the equivalent
+ * of) Intel 80x87 arithmetic, the call
+ * _control87(PC_53, MCW_PC);
+ * does this with many compilers. Whether this or another call is
+ * appropriate depends on the compiler; for this to work, it may be
+ * necessary to #include "float.h" or another system-dependent header
+ * file.
+ */
+
+/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
+ *
+ * This strtod returns a nearest machine number to the input decimal
+ * string (or sets errno to ERANGE). With IEEE arithmetic, ties are
+ * broken by the IEEE round-even rule. Otherwise ties are broken by
+ * biased rounding (add half and chop).
+ *
+ * Inspired loosely by William D. Clinger's paper "How to Read Floating
+ * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
+ *
+ * Modifications:
+ *
+ * 1. We only require IEEE, IBM, or VAX double-precision
+ * arithmetic (not IEEE double-extended).
+ * 2. We get by with floating-point arithmetic in a case that
+ * Clinger missed -- when we're computing d * 10^n
+ * for a small integer d and the integer n is not too
+ * much larger than 22 (the maximum integer k for which
+ * we can represent 10^k exactly), we may be able to
+ * compute (d*10^k) * 10^(e-k) with just one roundoff.
+ * 3. Rather than a bit-at-a-time adjustment of the binary
+ * result in the hard case, we use floating-point
+ * arithmetic to determine the adjustment to within
+ * one bit; only in really hard cases do we need to
+ * compute a second residual.
+ * 4. Because of 3., we don't need a large table of powers of 10
+ * for ten-to-e (just some small tables, e.g. of 10^k
+ * for 0 <= k <= 22).
+ */
+
+/*
+ * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least
+ * significant byte has the lowest address.
+ * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most
+ * significant byte has the lowest address.
+ * #define Long int on machines with 32-bit ints and 64-bit longs.
+ * #define IBM for IBM mainframe-style floating-point arithmetic.
+ * #define VAX for VAX-style floating-point arithmetic (D_floating).
+ * #define No_leftright to omit left-right logic in fast floating-point
+ * computation of dtoa.
+ * #define Honor_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
+ * and strtod and dtoa should round accordingly.
+ * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
+ * and Honor_FLT_ROUNDS is not #defined.
+ * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
+ * that use extended-precision instructions to compute rounded
+ * products and quotients) with IBM.
+ * #define ROUND_BIASED for IEEE-format with biased rounding.
+ * #define Inaccurate_Divide for IEEE-format with correctly rounded
+ * products but inaccurate quotients, e.g., for Intel i860.
+ * #define NO_LONG_LONG on machines that do not have a "long long"
+ * integer type (of >= 64 bits). On such machines, you can
+ * #define Just_16 to store 16 bits per 32-bit Long when doing
+ * high-precision integer arithmetic. Whether this speeds things
+ * up or slows things down depends on the machine and the number
+ * being converted. If long long is available and the name is
+ * something other than "long long", #define Llong to be the name,
+ * and if "unsigned Llong" does not work as an unsigned version of
+ * Llong, #define #ULLong to be the corresponding unsigned type.
+ * #define KR_headers for old-style C function headers.
+ * #define Bad_float_h if your system lacks a float.h or if it does not
+ * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
+ * FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
+ * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
+ * if memory is available and otherwise does something you deem
+ * appropriate. If MALLOC is undefined, malloc will be invoked
+ * directly -- and assumed always to succeed.
+ * #define Omit_Private_Memory to omit logic (added Jan. 1998) for making
+ * memory allocations from a private pool of memory when possible.
+ * When used, the private pool is PRIVATE_MEM bytes long: 2304 bytes,
+ * unless #defined to be a different length. This default length
+ * suffices to get rid of MALLOC calls except for unusual cases,
+ * such as decimal-to-binary conversion of a very long string of
+ * digits. The longest string dtoa can return is about 751 bytes
+ * long. For conversions by strtod of strings of 800 digits and
+ * all dtoa conversions in single-threaded executions with 8-byte
+ * pointers, PRIVATE_MEM >= 7400 appears to suffice; with 4-byte
+ * pointers, PRIVATE_MEM >= 7112 appears adequate.
+ * #define INFNAN_CHECK on IEEE systems to cause strtod to check for
+ * Infinity and NaN (case insensitively). On some systems (e.g.,
+ * some HP systems), it may be necessary to #define NAN_WORD0
+ * appropriately -- to the most significant word of a quiet NaN.
+ * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.)
+ * When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined,
+ * strtod also accepts (case insensitively) strings of the form
+ * NaN(x), where x is a string of hexadecimal digits and spaces;
+ * if there is only one string of hexadecimal digits, it is taken
+ * for the 52 fraction bits of the resulting NaN; if there are two
+ * or more strings of hex digits, the first is for the high 20 bits,
+ * the second and subsequent for the low 32 bits, with intervening
+ * white space ignored; but if this results in none of the 52
+ * fraction bits being on (an IEEE Infinity symbol), then NAN_WORD0
+ * and NAN_WORD1 are used instead.
+ * #define MULTIPLE_THREADS if the system offers preemptively scheduled
+ * multiple threads. In this case, you must provide (or suitably
+ * #define) two locks, acquired by ACQUIRE_DTOA_LOCK(n) and freed
+ * by FREE_DTOA_LOCK(n) for n = 0 or 1. (The second lock, accessed
+ * in pow5mult, ensures lazy evaluation of only one copy of high
+ * powers of 5; omitting this lock would introduce a small
+ * probability of wasting memory, but would otherwise be harmless.)
+ * You must also invoke freedtoa(s) to free the value s returned by
+ * dtoa. You may do so whether or not MULTIPLE_THREADS is #defined.
+ * #define NO_IEEE_Scale to disable new (Feb. 1997) logic in strtod that
+ * avoids underflows on inputs whose result does not underflow.
+ * If you #define NO_IEEE_Scale on a machine that uses IEEE-format
+ * floating-point numbers and flushes underflows to zero rather
+ * than implementing gradual underflow, then you must also #define
+ * Sudden_Underflow.
+ * #define YES_ALIAS to permit aliasing certain double values with
+ * arrays of ULongs. This leads to slightly better code with
+ * some compilers and was always used prior to 19990916, but it
+ * is not strictly legal and can cause trouble with aggressively
+ * optimizing compilers (e.g., gcc 2.95.1 under -O2).
+ * #define USE_LOCALE to use the current locale's decimal_point value.
+ * #define SET_INEXACT if IEEE arithmetic is being used and extra
+ * computation should be done to set the inexact flag when the
+ * result is inexact and avoid setting inexact when the result
+ * is exact. In this case, dtoa.c must be compiled in
+ * an environment, perhaps provided by #include "dtoa.c" in a
+ * suitable wrapper, that defines two functions,
+ * int get_inexact(void);
+ * void clear_inexact(void);
+ * such that get_inexact() returns a nonzero value if the
+ * inexact bit is already set, and clear_inexact() sets the
+ * inexact bit to 0. When SET_INEXACT is #defined, strtod
+ * also does extra computations to set the underflow and overflow
+ * flags when appropriate (i.e., when the result is tiny and
+ * inexact or when it is a numeric value rounded to +-infinity).
+ * #define NO_ERRNO if strtod should not assign errno = ERANGE when
+ * the result overflows to +-Infinity or underflows to 0.
+ */
+
+#ifdef WORDS_BIGENDIAN
+#define IEEE_BIG_ENDIAN
+#else
+#define IEEE_LITTLE_ENDIAN
+#endif
+
+#ifdef __vax__
+#define VAX
+#undef IEEE_BIG_ENDIAN
+#undef IEEE_LITTLE_ENDIAN
+#endif
+
+#if defined(__arm__) && !defined(__VFP_FP__)
+#define IEEE_BIG_ENDIAN
+#undef IEEE_LITTLE_ENDIAN
+#endif
+
+#undef Long
+#undef ULong
+
+#include <limits.h>
+
+#if (INT_MAX >> 30) && !(INT_MAX >> 31)
+#define Long int
+#define ULong unsigned int
+#elif (LONG_MAX >> 30) && !(LONG_MAX >> 31)
+#define Long long int
+#define ULong unsigned long int
+#else
+#error No 32bit integer
+#endif
+
+#if HAVE_LONG_LONG
+#define Llong LONG_LONG
+#else
+#define NO_LONG_LONG
+#endif
+
+#ifdef DEBUG
+#include <stdio.h>
+#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(EXIT_FAILURE);}
+#endif
+
+#ifndef ISDIGIT
+#include <ctype.h>
+#define ISDIGIT(c) isdigit(c)
+#endif
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef USE_LOCALE
+#include <locale.h>
+#endif
+
+#ifdef MALLOC
+extern void *MALLOC(size_t);
+#else
+#define MALLOC xmalloc
+#endif
+#ifdef FREE
+extern void FREE(void*);
+#else
+#define FREE xfree
+#endif
+#ifndef NO_SANITIZE
+#define NO_SANITIZE(x, y) y
+#endif
+
+#ifndef Omit_Private_Memory
+#ifndef PRIVATE_MEM
+#define PRIVATE_MEM 2304
+#endif
+#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double))
+static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
+#endif
+
+#undef IEEE_Arith
+#undef Avoid_Underflow
+#ifdef IEEE_BIG_ENDIAN
+#define IEEE_Arith
+#endif
+#ifdef IEEE_LITTLE_ENDIAN
+#define IEEE_Arith
+#endif
+
+#ifdef Bad_float_h
+
+#ifdef IEEE_Arith
+#define DBL_DIG 15
+#define DBL_MAX_10_EXP 308
+#define DBL_MAX_EXP 1024
+#define FLT_RADIX 2
+#endif /*IEEE_Arith*/
+
+#ifdef IBM
+#define DBL_DIG 16
+#define DBL_MAX_10_EXP 75
+#define DBL_MAX_EXP 63
+#define FLT_RADIX 16
+#define DBL_MAX 7.2370055773322621e+75
+#endif
+
+#ifdef VAX
+#define DBL_DIG 16
+#define DBL_MAX_10_EXP 38
+#define DBL_MAX_EXP 127
+#define FLT_RADIX 2
+#define DBL_MAX 1.7014118346046923e+38
+#endif
+
+#ifndef LONG_MAX
+#define LONG_MAX 2147483647
+#endif
+
+#else /* ifndef Bad_float_h */
+#include <float.h>
+#endif /* Bad_float_h */
+
+#include <math.h>
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+} /* satisfy cc-mode */
+#endif
+#endif
+
+#ifndef hexdigit
+static const char hexdigit[] = "0123456789abcdef0123456789ABCDEF";
+#endif
+
+#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + defined(IBM) != 1
+Exactly one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined.
+#endif
+
+typedef union { double d; ULong L[2]; } U;
+
+#ifdef YES_ALIAS
+typedef double double_u;
+# define dval(x) (x)
+# ifdef IEEE_LITTLE_ENDIAN
+# define word0(x) (((ULong *)&(x))[1])
+# define word1(x) (((ULong *)&(x))[0])
+# else
+# define word0(x) (((ULong *)&(x))[0])
+# define word1(x) (((ULong *)&(x))[1])
+# endif
+#else
+typedef U double_u;
+# ifdef IEEE_LITTLE_ENDIAN
+# define word0(x) ((x).L[1])
+# define word1(x) ((x).L[0])
+# else
+# define word0(x) ((x).L[0])
+# define word1(x) ((x).L[1])
+# endif
+# define dval(x) ((x).d)
+#endif
+
+/* The following definition of Storeinc is appropriate for MIPS processors.
+ * An alternative that might be better on some machines is
+ * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
+ */
+#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm__)
+#define Storeinc(a,b,c) (((unsigned short *)(a))[1] = (unsigned short)(b), \
+((unsigned short *)(a))[0] = (unsigned short)(c), (a)++)
+#else
+#define Storeinc(a,b,c) (((unsigned short *)(a))[0] = (unsigned short)(b), \
+((unsigned short *)(a))[1] = (unsigned short)(c), (a)++)
+#endif
+
+/* #define P DBL_MANT_DIG */
+/* Ten_pmax = floor(P*log(2)/log(5)) */
+/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
+/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
+/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
+
+#ifdef IEEE_Arith
+#define Exp_shift 20
+#define Exp_shift1 20
+#define Exp_msk1 0x100000
+#define Exp_msk11 0x100000
+#define Exp_mask 0x7ff00000
+#define P 53
+#define Bias 1023
+#define Emin (-1022)
+#define Exp_1 0x3ff00000
+#define Exp_11 0x3ff00000
+#define Ebits 11
+#define Frac_mask 0xfffff
+#define Frac_mask1 0xfffff
+#define Ten_pmax 22
+#define Bletch 0x10
+#define Bndry_mask 0xfffff
+#define Bndry_mask1 0xfffff
+#define LSB 1
+#define Sign_bit 0x80000000
+#define Log2P 1
+#define Tiny0 0
+#define Tiny1 1
+#define Quick_max 14
+#define Int_max 14
+#ifndef NO_IEEE_Scale
+#define Avoid_Underflow
+#ifdef Flush_Denorm /* debugging option */
+#undef Sudden_Underflow
+#endif
+#endif
+
+#ifndef Flt_Rounds
+#ifdef FLT_ROUNDS
+#define Flt_Rounds FLT_ROUNDS
+#else
+#define Flt_Rounds 1
+#endif
+#endif /*Flt_Rounds*/
+
+#ifdef Honor_FLT_ROUNDS
+#define Rounding rounding
+#undef Check_FLT_ROUNDS
+#define Check_FLT_ROUNDS
+#else
+#define Rounding Flt_Rounds
+#endif
+
+#else /* ifndef IEEE_Arith */
+#undef Check_FLT_ROUNDS
+#undef Honor_FLT_ROUNDS
+#undef SET_INEXACT
+#undef Sudden_Underflow
+#define Sudden_Underflow
+#ifdef IBM
+#undef Flt_Rounds
+#define Flt_Rounds 0
+#define Exp_shift 24
+#define Exp_shift1 24
+#define Exp_msk1 0x1000000
+#define Exp_msk11 0x1000000
+#define Exp_mask 0x7f000000
+#define P 14
+#define Bias 65
+#define Exp_1 0x41000000
+#define Exp_11 0x41000000
+#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */
+#define Frac_mask 0xffffff
+#define Frac_mask1 0xffffff
+#define Bletch 4
+#define Ten_pmax 22
+#define Bndry_mask 0xefffff
+#define Bndry_mask1 0xffffff
+#define LSB 1
+#define Sign_bit 0x80000000
+#define Log2P 4
+#define Tiny0 0x100000
+#define Tiny1 0
+#define Quick_max 14
+#define Int_max 15
+#else /* VAX */
+#undef Flt_Rounds
+#define Flt_Rounds 1
+#define Exp_shift 23
+#define Exp_shift1 7
+#define Exp_msk1 0x80
+#define Exp_msk11 0x800000
+#define Exp_mask 0x7f80
+#define P 56
+#define Bias 129
+#define Exp_1 0x40800000
+#define Exp_11 0x4080
+#define Ebits 8
+#define Frac_mask 0x7fffff
+#define Frac_mask1 0xffff007f
+#define Ten_pmax 24
+#define Bletch 2
+#define Bndry_mask 0xffff007f
+#define Bndry_mask1 0xffff007f
+#define LSB 0x10000
+#define Sign_bit 0x8000
+#define Log2P 1
+#define Tiny0 0x80
+#define Tiny1 0
+#define Quick_max 15
+#define Int_max 15
+#endif /* IBM, VAX */
+#endif /* IEEE_Arith */
+
+#ifndef IEEE_Arith
+#define ROUND_BIASED
+#endif
+
+#ifdef RND_PRODQUOT
+#define rounded_product(a,b) ((a) = rnd_prod((a), (b)))
+#define rounded_quotient(a,b) ((a) = rnd_quot((a), (b)))
+extern double rnd_prod(double, double), rnd_quot(double, double);
+#else
+#define rounded_product(a,b) ((a) *= (b))
+#define rounded_quotient(a,b) ((a) /= (b))
+#endif
+
+#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
+#define Big1 0xffffffff
+
+#ifndef Pack_32
+#define Pack_32
+#endif
+
+#define FFFFFFFF 0xffffffffUL
+
+#ifdef NO_LONG_LONG
+#undef ULLong
+#ifdef Just_16
+#undef Pack_32
+/* When Pack_32 is not defined, we store 16 bits per 32-bit Long.
+ * This makes some inner loops simpler and sometimes saves work
+ * during multiplications, but it often seems to make things slightly
+ * slower. Hence the default is now to store 32 bits per Long.
+ */
+#endif
+#else /* long long available */
+#ifndef Llong
+#define Llong long long
+#endif
+#ifndef ULLong
+#define ULLong unsigned Llong
+#endif
+#endif /* NO_LONG_LONG */
+
+#define MULTIPLE_THREADS 1
+
+#ifndef MULTIPLE_THREADS
+#define ACQUIRE_DTOA_LOCK(n) /*nothing*/
+#define FREE_DTOA_LOCK(n) /*nothing*/
+#else
+#define ACQUIRE_DTOA_LOCK(n) /*unused right now*/
+#define FREE_DTOA_LOCK(n) /*unused right now*/
+#endif
+
+#ifndef ATOMIC_PTR_CAS
+#define ATOMIC_PTR_CAS(var, old, new) ((var) = (new), (old))
+#endif
+#ifndef LIKELY
+#define LIKELY(x) (x)
+#endif
+#ifndef UNLIKELY
+#define UNLIKELY(x) (x)
+#endif
+#ifndef ASSUME
+#define ASSUME(x) (void)(x)
+#endif
+
+#define Kmax 15
+
+struct Bigint {
+ struct Bigint *next;
+ int k, maxwds, sign, wds;
+ ULong x[1];
+};
+
+typedef struct Bigint Bigint;
+
+static Bigint *freelist[Kmax+1];
+
+static Bigint *
+Balloc(int k)
+{
+ int x;
+ Bigint *rv;
+#ifndef Omit_Private_Memory
+ size_t len;
+#endif
+
+ rv = 0;
+ ACQUIRE_DTOA_LOCK(0);
+ if (k <= Kmax) {
+ rv = freelist[k];
+ while (rv) {
+ Bigint *rvn = rv;
+ rv = ATOMIC_PTR_CAS(freelist[k], rv, rv->next);
+ if (LIKELY(rvn == rv)) {
+ ASSUME(rv);
+ break;
+ }
+ }
+ }
+ if (!rv) {
+ x = 1 << k;
+#ifdef Omit_Private_Memory
+ rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(ULong));
+#else
+ len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
+ /sizeof(double);
+ if (k <= Kmax) {
+ double *pnext = pmem_next;
+ while (pnext - private_mem + len <= PRIVATE_mem) {
+ double *p = pnext;
+ pnext = ATOMIC_PTR_CAS(pmem_next, pnext, pnext + len);
+ if (LIKELY(p == pnext)) {
+ rv = (Bigint*)pnext;
+ ASSUME(rv);
+ break;
+ }
+ }
+ }
+ if (!rv)
+ rv = (Bigint*)MALLOC(len*sizeof(double));
+#endif
+ rv->k = k;
+ rv->maxwds = x;
+ }
+ FREE_DTOA_LOCK(0);
+ rv->sign = rv->wds = 0;
+ return rv;
+}
+
+static void
+Bfree(Bigint *v)
+{
+ Bigint *vn;
+ if (v) {
+ if (v->k > Kmax) {
+ FREE(v);
+ return;
+ }
+ ACQUIRE_DTOA_LOCK(0);
+ do {
+ vn = v->next = freelist[v->k];
+ } while (UNLIKELY(ATOMIC_PTR_CAS(freelist[v->k], vn, v) != vn));
+ FREE_DTOA_LOCK(0);
+ }
+}
+
+#define Bcopy(x,y) memcpy((char *)&(x)->sign, (char *)&(y)->sign, \
+(y)->wds*sizeof(Long) + 2*sizeof(int))
+
+static Bigint *
+multadd(Bigint *b, int m, int a) /* multiply by m and add a */
+{
+ int i, wds;
+ ULong *x;
+#ifdef ULLong
+ ULLong carry, y;
+#else
+ ULong carry, y;
+#ifdef Pack_32
+ ULong xi, z;
+#endif
+#endif
+ Bigint *b1;
+
+ wds = b->wds;
+ x = b->x;
+ i = 0;
+ carry = a;
+ do {
+#ifdef ULLong
+ y = *x * (ULLong)m + carry;
+ carry = y >> 32;
+ *x++ = (ULong)(y & FFFFFFFF);
+#else
+#ifdef Pack_32
+ xi = *x;
+ y = (xi & 0xffff) * m + carry;
+ z = (xi >> 16) * m + (y >> 16);
+ carry = z >> 16;
+ *x++ = (z << 16) + (y & 0xffff);
+#else
+ y = *x * m + carry;
+ carry = y >> 16;
+ *x++ = y & 0xffff;
+#endif
+#endif
+ } while (++i < wds);
+ if (carry) {
+ if (wds >= b->maxwds) {
+ b1 = Balloc(b->k+1);
+ Bcopy(b1, b);
+ Bfree(b);
+ b = b1;
+ }
+ b->x[wds++] = (ULong)carry;
+ b->wds = wds;
+ }
+ return b;
+}
+
+static Bigint *
+s2b(const char *s, int nd0, int nd, ULong y9)
+{
+ Bigint *b;
+ int i, k;
+ Long x, y;
+
+ x = (nd + 8) / 9;
+ for (k = 0, y = 1; x > y; y <<= 1, k++) ;
+#ifdef Pack_32
+ b = Balloc(k);
+ b->x[0] = y9;
+ b->wds = 1;
+#else
+ b = Balloc(k+1);
+ b->x[0] = y9 & 0xffff;
+ b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
+#endif
+
+ i = 9;
+ if (9 < nd0) {
+ s += 9;
+ do {
+ b = multadd(b, 10, *s++ - '0');
+ } while (++i < nd0);
+ s++;
+ }
+ else
+ s += 10;
+ for (; i < nd; i++)
+ b = multadd(b, 10, *s++ - '0');
+ return b;
+}
+
+static int
+hi0bits(register ULong x)
+{
+ register int k = 0;
+
+ if (!(x & 0xffff0000)) {
+ k = 16;
+ x <<= 16;
+ }
+ if (!(x & 0xff000000)) {
+ k += 8;
+ x <<= 8;
+ }
+ if (!(x & 0xf0000000)) {
+ k += 4;
+ x <<= 4;
+ }
+ if (!(x & 0xc0000000)) {
+ k += 2;
+ x <<= 2;
+ }
+ if (!(x & 0x80000000)) {
+ k++;
+ if (!(x & 0x40000000))
+ return 32;
+ }
+ return k;
+}
+
+static int
+lo0bits(ULong *y)
+{
+ register int k;
+ register ULong x = *y;
+
+ if (x & 7) {
+ if (x & 1)
+ return 0;
+ if (x & 2) {
+ *y = x >> 1;
+ return 1;
+ }
+ *y = x >> 2;
+ return 2;
+ }
+ k = 0;
+ if (!(x & 0xffff)) {
+ k = 16;
+ x >>= 16;
+ }
+ if (!(x & 0xff)) {
+ k += 8;
+ x >>= 8;
+ }
+ if (!(x & 0xf)) {
+ k += 4;
+ x >>= 4;
+ }
+ if (!(x & 0x3)) {
+ k += 2;
+ x >>= 2;
+ }
+ if (!(x & 1)) {
+ k++;
+ x >>= 1;
+ if (!x)
+ return 32;
+ }
+ *y = x;
+ return k;
+}
+
+static Bigint *
+i2b(int i)
+{
+ Bigint *b;
+
+ b = Balloc(1);
+ b->x[0] = i;
+ b->wds = 1;
+ return b;
+}
+
+static Bigint *
+mult(Bigint *a, Bigint *b)
+{
+ Bigint *c;
+ int k, wa, wb, wc;
+ ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
+ ULong y;
+#ifdef ULLong
+ ULLong carry, z;
+#else
+ ULong carry, z;
+#ifdef Pack_32
+ ULong z2;
+#endif
+#endif
+
+ if (a->wds < b->wds) {
+ c = a;
+ a = b;
+ b = c;
+ }
+ k = a->k;
+ wa = a->wds;
+ wb = b->wds;
+ wc = wa + wb;
+ if (wc > a->maxwds)
+ k++;
+ c = Balloc(k);
+ for (x = c->x, xa = x + wc; x < xa; x++)
+ *x = 0;
+ xa = a->x;
+ xae = xa + wa;
+ xb = b->x;
+ xbe = xb + wb;
+ xc0 = c->x;
+#ifdef ULLong
+ for (; xb < xbe; xc0++) {
+ if ((y = *xb++) != 0) {
+ x = xa;
+ xc = xc0;
+ carry = 0;
+ do {
+ z = *x++ * (ULLong)y + *xc + carry;
+ carry = z >> 32;
+ *xc++ = (ULong)(z & FFFFFFFF);
+ } while (x < xae);
+ *xc = (ULong)carry;
+ }
+ }
+#else
+#ifdef Pack_32
+ for (; xb < xbe; xb++, xc0++) {
+ if ((y = *xb & 0xffff) != 0) {
+ x = xa;
+ xc = xc0;
+ carry = 0;
+ do {
+ z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
+ carry = z >> 16;
+ z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
+ carry = z2 >> 16;
+ Storeinc(xc, z2, z);
+ } while (x < xae);
+ *xc = (ULong)carry;
+ }
+ if ((y = *xb >> 16) != 0) {
+ x = xa;
+ xc = xc0;
+ carry = 0;
+ z2 = *xc;
+ do {
+ z = (*x & 0xffff) * y + (*xc >> 16) + carry;
+ carry = z >> 16;
+ Storeinc(xc, z, z2);
+ z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
+ carry = z2 >> 16;
+ } while (x < xae);
+ *xc = z2;
+ }
+ }
+#else
+ for (; xb < xbe; xc0++) {
+ if (y = *xb++) {
+ x = xa;
+ xc = xc0;
+ carry = 0;
+ do {
+ z = *x++ * y + *xc + carry;
+ carry = z >> 16;
+ *xc++ = z & 0xffff;
+ } while (x < xae);
+ *xc = (ULong)carry;
+ }
+ }
+#endif
+#endif
+ for (xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
+ c->wds = wc;
+ return c;
+}
+
+static Bigint *p5s;
+
+static Bigint *
+pow5mult(Bigint *b, int k)
+{
+ Bigint *b1, *p5, *p51;
+ Bigint *p5tmp;
+ int i;
+ static const int p05[3] = { 5, 25, 125 };
+
+ if ((i = k & 3) != 0)
+ b = multadd(b, p05[i-1], 0);
+
+ if (!(k >>= 2))
+ return b;
+ if (!(p5 = p5s)) {
+ /* first time */
+ ACQUIRE_DTOA_LOCK(1);
+ if (!(p5 = p5s)) {
+ p5 = i2b(625);
+ p5->next = 0;
+ p5tmp = ATOMIC_PTR_CAS(p5s, NULL, p5);
+ if (UNLIKELY(p5tmp)) {
+ Bfree(p5);
+ p5 = p5tmp;
+ }
+ }
+ FREE_DTOA_LOCK(1);
+ }
+ for (;;) {
+ if (k & 1) {
+ b1 = mult(b, p5);
+ Bfree(b);
+ b = b1;
+ }
+ if (!(k >>= 1))
+ break;
+ if (!(p51 = p5->next)) {
+ ACQUIRE_DTOA_LOCK(1);
+ if (!(p51 = p5->next)) {
+ p51 = mult(p5,p5);
+ p51->next = 0;
+ p5tmp = ATOMIC_PTR_CAS(p5->next, NULL, p51);
+ if (UNLIKELY(p5tmp)) {
+ Bfree(p51);
+ p51 = p5tmp;
+ }
+ }
+ FREE_DTOA_LOCK(1);
+ }
+ p5 = p51;
+ }
+ return b;
+}
+
+static Bigint *
+lshift(Bigint *b, int k)
+{
+ int i, k1, n, n1;
+ Bigint *b1;
+ ULong *x, *x1, *xe, z;
+
+#ifdef Pack_32
+ n = k >> 5;
+#else
+ n = k >> 4;
+#endif
+ k1 = b->k;
+ n1 = n + b->wds + 1;
+ for (i = b->maxwds; n1 > i; i <<= 1)
+ k1++;
+ b1 = Balloc(k1);
+ x1 = b1->x;
+ for (i = 0; i < n; i++)
+ *x1++ = 0;
+ x = b->x;
+ xe = x + b->wds;
+#ifdef Pack_32
+ if (k &= 0x1f) {
+ k1 = 32 - k;
+ z = 0;
+ do {
+ *x1++ = *x << k | z;
+ z = *x++ >> k1;
+ } while (x < xe);
+ if ((*x1 = z) != 0)
+ ++n1;
+ }
+#else
+ if (k &= 0xf) {
+ k1 = 16 - k;
+ z = 0;
+ do {
+ *x1++ = *x << k & 0xffff | z;
+ z = *x++ >> k1;
+ } while (x < xe);
+ if (*x1 = z)
+ ++n1;
+ }
+#endif
+ else
+ do {
+ *x1++ = *x++;
+ } while (x < xe);
+ b1->wds = n1 - 1;
+ Bfree(b);
+ return b1;
+}
+
+static int
+cmp(Bigint *a, Bigint *b)
+{
+ ULong *xa, *xa0, *xb, *xb0;
+ int i, j;
+
+ i = a->wds;
+ j = b->wds;
+#ifdef DEBUG
+ if (i > 1 && !a->x[i-1])
+ Bug("cmp called with a->x[a->wds-1] == 0");
+ if (j > 1 && !b->x[j-1])
+ Bug("cmp called with b->x[b->wds-1] == 0");
+#endif
+ if (i -= j)
+ return i;
+ xa0 = a->x;
+ xa = xa0 + j;
+ xb0 = b->x;
+ xb = xb0 + j;
+ for (;;) {
+ if (*--xa != *--xb)
+ return *xa < *xb ? -1 : 1;
+ if (xa <= xa0)
+ break;
+ }
+ return 0;
+}
+
+NO_SANITIZE("unsigned-integer-overflow", static Bigint * diff(Bigint *a, Bigint *b));
+static Bigint *
+diff(Bigint *a, Bigint *b)
+{
+ Bigint *c;
+ int i, wa, wb;
+ ULong *xa, *xae, *xb, *xbe, *xc;
+#ifdef ULLong
+ ULLong borrow, y;
+#else
+ ULong borrow, y;
+#ifdef Pack_32
+ ULong z;
+#endif
+#endif
+
+ i = cmp(a,b);
+ if (!i) {
+ c = Balloc(0);
+ c->wds = 1;
+ c->x[0] = 0;
+ return c;
+ }
+ if (i < 0) {
+ c = a;
+ a = b;
+ b = c;
+ i = 1;
+ }
+ else
+ i = 0;
+ c = Balloc(a->k);
+ c->sign = i;
+ wa = a->wds;
+ xa = a->x;
+ xae = xa + wa;
+ wb = b->wds;
+ xb = b->x;
+ xbe = xb + wb;
+ xc = c->x;
+ borrow = 0;
+#ifdef ULLong
+ do {
+ y = (ULLong)*xa++ - *xb++ - borrow;
+ borrow = y >> 32 & (ULong)1;
+ *xc++ = (ULong)(y & FFFFFFFF);
+ } while (xb < xbe);
+ while (xa < xae) {
+ y = *xa++ - borrow;
+ borrow = y >> 32 & (ULong)1;
+ *xc++ = (ULong)(y & FFFFFFFF);
+ }
+#else
+#ifdef Pack_32
+ do {
+ y = (*xa & 0xffff) - (*xb & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ z = (*xa++ >> 16) - (*xb++ >> 16) - borrow;
+ borrow = (z & 0x10000) >> 16;
+ Storeinc(xc, z, y);
+ } while (xb < xbe);
+ while (xa < xae) {
+ y = (*xa & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ z = (*xa++ >> 16) - borrow;
+ borrow = (z & 0x10000) >> 16;
+ Storeinc(xc, z, y);
+ }
+#else
+ do {
+ y = *xa++ - *xb++ - borrow;
+ borrow = (y & 0x10000) >> 16;
+ *xc++ = y & 0xffff;
+ } while (xb < xbe);
+ while (xa < xae) {
+ y = *xa++ - borrow;
+ borrow = (y & 0x10000) >> 16;
+ *xc++ = y & 0xffff;
+ }
+#endif
+#endif
+ while (!*--xc)
+ wa--;
+ c->wds = wa;
+ return c;
+}
+
+static double
+ulp(double x_)
+{
+ register Long L;
+ double_u x, a;
+ dval(x) = x_;
+
+ L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
+#ifndef Avoid_Underflow
+#ifndef Sudden_Underflow
+ if (L > 0) {
+#endif
+#endif
+#ifdef IBM
+ L |= Exp_msk1 >> 4;
+#endif
+ word0(a) = L;
+ word1(a) = 0;
+#ifndef Avoid_Underflow
+#ifndef Sudden_Underflow
+ }
+ else {
+ L = -L >> Exp_shift;
+ if (L < Exp_shift) {
+ word0(a) = 0x80000 >> L;
+ word1(a) = 0;
+ }
+ else {
+ word0(a) = 0;
+ L -= Exp_shift;
+ word1(a) = L >= 31 ? 1 : 1 << 31 - L;
+ }
+ }
+#endif
+#endif
+ return dval(a);
+}
+
+static double
+b2d(Bigint *a, int *e)
+{
+ ULong *xa, *xa0, w, y, z;
+ int k;
+ double_u d;
+#ifdef VAX
+ ULong d0, d1;
+#else
+#define d0 word0(d)
+#define d1 word1(d)
+#endif
+
+ xa0 = a->x;
+ xa = xa0 + a->wds;
+ y = *--xa;
+#ifdef DEBUG
+ if (!y) Bug("zero y in b2d");
+#endif
+ k = hi0bits(y);
+ *e = 32 - k;
+#ifdef Pack_32
+ if (k < Ebits) {
+ d0 = Exp_1 | y >> (Ebits - k);
+ w = xa > xa0 ? *--xa : 0;
+ d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
+ goto ret_d;
+ }
+ z = xa > xa0 ? *--xa : 0;
+ if (k -= Ebits) {
+ d0 = Exp_1 | y << k | z >> (32 - k);
+ y = xa > xa0 ? *--xa : 0;
+ d1 = z << k | y >> (32 - k);
+ }
+ else {
+ d0 = Exp_1 | y;
+ d1 = z;
+ }
+#else
+ if (k < Ebits + 16) {
+ z = xa > xa0 ? *--xa : 0;
+ d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
+ w = xa > xa0 ? *--xa : 0;
+ y = xa > xa0 ? *--xa : 0;
+ d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
+ goto ret_d;
+ }
+ z = xa > xa0 ? *--xa : 0;
+ w = xa > xa0 ? *--xa : 0;
+ k -= Ebits + 16;
+ d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
+ y = xa > xa0 ? *--xa : 0;
+ d1 = w << k + 16 | y << k;
+#endif
+ret_d:
+#ifdef VAX
+ word0(d) = d0 >> 16 | d0 << 16;
+ word1(d) = d1 >> 16 | d1 << 16;
+#else
+#undef d0
+#undef d1
+#endif
+ return dval(d);
+}
+
+static Bigint *
+d2b(double d_, int *e, int *bits)
+{
+ double_u d;
+ Bigint *b;
+ int de, k;
+ ULong *x, y, z;
+#ifndef Sudden_Underflow
+ int i;
+#endif
+#ifdef VAX
+ ULong d0, d1;
+#endif
+ dval(d) = d_;
+#ifdef VAX
+ d0 = word0(d) >> 16 | word0(d) << 16;
+ d1 = word1(d) >> 16 | word1(d) << 16;
+#else
+#define d0 word0(d)
+#define d1 word1(d)
+#endif
+
+#ifdef Pack_32
+ b = Balloc(1);
+#else
+ b = Balloc(2);
+#endif
+ x = b->x;
+
+ z = d0 & Frac_mask;
+ d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
+#ifdef Sudden_Underflow
+ de = (int)(d0 >> Exp_shift);
+#ifndef IBM
+ z |= Exp_msk11;
+#endif
+#else
+ if ((de = (int)(d0 >> Exp_shift)) != 0)
+ z |= Exp_msk1;
+#endif
+#ifdef Pack_32
+ if ((y = d1) != 0) {
+ if ((k = lo0bits(&y)) != 0) {
+ x[0] = y | z << (32 - k);
+ z >>= k;
+ }
+ else
+ x[0] = y;
+#ifndef Sudden_Underflow
+ i =
+#endif
+ b->wds = (x[1] = z) ? 2 : 1;
+ }
+ else {
+#ifdef DEBUG
+ if (!z)
+ Bug("Zero passed to d2b");
+#endif
+ k = lo0bits(&z);
+ x[0] = z;
+#ifndef Sudden_Underflow
+ i =
+#endif
+ b->wds = 1;
+ k += 32;
+ }
+#else
+ if (y = d1) {
+ if (k = lo0bits(&y))
+ if (k >= 16) {
+ x[0] = y | z << 32 - k & 0xffff;
+ x[1] = z >> k - 16 & 0xffff;
+ x[2] = z >> k;
+ i = 2;
+ }
+ else {
+ x[0] = y & 0xffff;
+ x[1] = y >> 16 | z << 16 - k & 0xffff;
+ x[2] = z >> k & 0xffff;
+ x[3] = z >> k+16;
+ i = 3;
+ }
+ else {
+ x[0] = y & 0xffff;
+ x[1] = y >> 16;
+ x[2] = z & 0xffff;
+ x[3] = z >> 16;
+ i = 3;
+ }
+ }
+ else {
+#ifdef DEBUG
+ if (!z)
+ Bug("Zero passed to d2b");
+#endif
+ k = lo0bits(&z);
+ if (k >= 16) {
+ x[0] = z;
+ i = 0;
+ }
+ else {
+ x[0] = z & 0xffff;
+ x[1] = z >> 16;
+ i = 1;
+ }
+ k += 32;
+ }
+ while (!x[i])
+ --i;
+ b->wds = i + 1;
+#endif
+#ifndef Sudden_Underflow
+ if (de) {
+#endif
+#ifdef IBM
+ *e = (de - Bias - (P-1) << 2) + k;
+ *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
+#else
+ *e = de - Bias - (P-1) + k;
+ *bits = P - k;
+#endif
+#ifndef Sudden_Underflow
+ }
+ else {
+ *e = de - Bias - (P-1) + 1 + k;
+#ifdef Pack_32
+ *bits = 32*i - hi0bits(x[i-1]);
+#else
+ *bits = (i+2)*16 - hi0bits(x[i]);
+#endif
+ }
+#endif
+ return b;
+}
+#undef d0
+#undef d1
+
+static double
+ratio(Bigint *a, Bigint *b)
+{
+ double_u da, db;
+ int k, ka, kb;
+
+ dval(da) = b2d(a, &ka);
+ dval(db) = b2d(b, &kb);
+#ifdef Pack_32
+ k = ka - kb + 32*(a->wds - b->wds);
+#else
+ k = ka - kb + 16*(a->wds - b->wds);
+#endif
+#ifdef IBM
+ if (k > 0) {
+ word0(da) += (k >> 2)*Exp_msk1;
+ if (k &= 3)
+ dval(da) *= 1 << k;
+ }
+ else {
+ k = -k;
+ word0(db) += (k >> 2)*Exp_msk1;
+ if (k &= 3)
+ dval(db) *= 1 << k;
+ }
+#else
+ if (k > 0)
+ word0(da) += k*Exp_msk1;
+ else {
+ k = -k;
+ word0(db) += k*Exp_msk1;
+ }
+#endif
+ return dval(da) / dval(db);
+}
+
+static const double
+tens[] = {
+ 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
+ 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
+ 1e20, 1e21, 1e22
+#ifdef VAX
+ , 1e23, 1e24
+#endif
+};
+
+static const double
+#ifdef IEEE_Arith
+bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
+static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
+#ifdef Avoid_Underflow
+ 9007199254740992.*9007199254740992.e-256
+ /* = 2^106 * 1e-53 */
+#else
+ 1e-256
+#endif
+};
+/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */
+/* flag unnecessarily. It leads to a song and dance at the end of strtod. */
+#define Scale_Bit 0x10
+#define n_bigtens 5
+#else
+#ifdef IBM
+bigtens[] = { 1e16, 1e32, 1e64 };
+static const double tinytens[] = { 1e-16, 1e-32, 1e-64 };
+#define n_bigtens 3
+#else
+bigtens[] = { 1e16, 1e32 };
+static const double tinytens[] = { 1e-16, 1e-32 };
+#define n_bigtens 2
+#endif
+#endif
+
+#ifndef IEEE_Arith
+#undef INFNAN_CHECK
+#endif
+
+#ifdef INFNAN_CHECK
+
+#ifndef NAN_WORD0
+#define NAN_WORD0 0x7ff80000
+#endif
+
+#ifndef NAN_WORD1
+#define NAN_WORD1 0
+#endif
+
+static int
+match(const char **sp, char *t)
+{
+ int c, d;
+ const char *s = *sp;
+
+ while (d = *t++) {
+ if ((c = *++s) >= 'A' && c <= 'Z')
+ c += 'a' - 'A';
+ if (c != d)
+ return 0;
+ }
+ *sp = s + 1;
+ return 1;
+}
+
+#ifndef No_Hex_NaN
+static void
+hexnan(double *rvp, const char **sp)
+{
+ ULong c, x[2];
+ const char *s;
+ int havedig, udx0, xshift;
+
+ x[0] = x[1] = 0;
+ havedig = xshift = 0;
+ udx0 = 1;
+ s = *sp;
+ while (c = *(const unsigned char*)++s) {
+ if (c >= '0' && c <= '9')
+ c -= '0';
+ else if (c >= 'a' && c <= 'f')
+ c += 10 - 'a';
+ else if (c >= 'A' && c <= 'F')
+ c += 10 - 'A';
+ else if (c <= ' ') {
+ if (udx0 && havedig) {
+ udx0 = 0;
+ xshift = 1;
+ }
+ continue;
+ }
+ else if (/*(*/ c == ')' && havedig) {
+ *sp = s + 1;
+ break;
+ }
+ else
+ return; /* invalid form: don't change *sp */
+ havedig = 1;
+ if (xshift) {
+ xshift = 0;
+ x[0] = x[1];
+ x[1] = 0;
+ }
+ if (udx0)
+ x[0] = (x[0] << 4) | (x[1] >> 28);
+ x[1] = (x[1] << 4) | c;
+ }
+ if ((x[0] &= 0xfffff) || x[1]) {
+ word0(*rvp) = Exp_mask | x[0];
+ word1(*rvp) = x[1];
+ }
+}
+#endif /*No_Hex_NaN*/
+#endif /* INFNAN_CHECK */
+
+NO_SANITIZE("unsigned-integer-overflow", double strtod(const char *s00, char **se));
+double
+strtod(const char *s00, char **se)
+{
+#ifdef Avoid_Underflow
+ int scale;
+#endif
+ int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
+ e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
+ const char *s, *s0, *s1;
+ double aadj, adj;
+ double_u aadj1, rv, rv0;
+ Long L;
+ ULong y, z;
+ Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
+#ifdef SET_INEXACT
+ int inexact, oldinexact;
+#endif
+#ifdef Honor_FLT_ROUNDS
+ int rounding;
+#endif
+#ifdef USE_LOCALE
+ const char *s2;
+#endif
+
+ errno = 0;
+ sign = nz0 = nz = 0;
+ dval(rv) = 0.;
+ for (s = s00;;s++)
+ switch (*s) {
+ case '-':
+ sign = 1;
+ /* no break */
+ case '+':
+ if (*++s)
+ goto break2;
+ /* no break */
+ case 0:
+ goto ret0;
+ case '\t':
+ case '\n':
+ case '\v':
+ case '\f':
+ case '\r':
+ case ' ':
+ continue;
+ default:
+ goto break2;
+ }
+break2:
+ if (*s == '0') {
+ if (s[1] == 'x' || s[1] == 'X') {
+ s0 = ++s;
+ adj = 0;
+ aadj = 1.0;
+ nd0 = -4;
+
+ if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0;
+ if (*s == '0') {
+ while (*++s == '0');
+ s1 = strchr(hexdigit, *s);
+ }
+ if (s1 != NULL) {
+ do {
+ adj += aadj * ((s1 - hexdigit) & 15);
+ nd0 += 4;
+ aadj /= 16;
+ } while (*++s && (s1 = strchr(hexdigit, *s)));
+ }
+
+ if (*s == '.') {
+ dsign = 1;
+ if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0;
+ if (nd0 < 0) {
+ while (*s == '0') {
+ s++;
+ nd0 -= 4;
+ }
+ }
+ for (; *s && (s1 = strchr(hexdigit, *s)); ++s) {
+ adj += aadj * ((s1 - hexdigit) & 15);
+ if ((aadj /= 16) == 0.0) {
+ while (strchr(hexdigit, *++s));
+ break;
+ }
+ }
+ }
+ else {
+ dsign = 0;
+ }
+
+ if (*s == 'P' || *s == 'p') {
+ dsign = 0x2C - *++s; /* +: 2B, -: 2D */
+ if (abs(dsign) == 1) s++;
+ else dsign = 1;
+
+ nd = 0;
+ c = *s;
+ if (c < '0' || '9' < c) goto ret0;
+ do {
+ nd *= 10;
+ nd += c;
+ nd -= '0';
+ c = *++s;
+ /* Float("0x0."+("0"*267)+"1fp2095") */
+ if (nd + dsign * nd0 > 2095) {
+ while ('0' <= c && c <= '9') c = *++s;
+ break;
+ }
+ } while ('0' <= c && c <= '9');
+ nd0 += nd * dsign;
+ }
+ else {
+ if (dsign) goto ret0;
+ }
+ dval(rv) = ldexp(adj, nd0);
+ goto ret;
+ }
+ nz0 = 1;
+ while (*++s == '0') ;
+ if (!*s)
+ goto ret;
+ }
+ s0 = s;
+ y = z = 0;
+ for (nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
+ if (nd < 9)
+ y = 10*y + c - '0';
+ else if (nd < DBL_DIG + 2)
+ z = 10*z + c - '0';
+ nd0 = nd;
+#ifdef USE_LOCALE
+ s1 = localeconv()->decimal_point;
+ if (c == *s1) {
+ c = '.';
+ if (*++s1) {
+ s2 = s;
+ for (;;) {
+ if (*++s2 != *s1) {
+ c = 0;
+ break;
+ }
+ if (!*++s1) {
+ s = s2;
+ break;
+ }
+ }
+ }
+ }
+#endif
+ if (c == '.') {
+ if (!ISDIGIT(s[1]))
+ goto dig_done;
+ c = *++s;
+ if (!nd) {
+ for (; c == '0'; c = *++s)
+ nz++;
+ if (c > '0' && c <= '9') {
+ s0 = s;
+ nf += nz;
+ nz = 0;
+ goto have_dig;
+ }
+ goto dig_done;
+ }
+ for (; c >= '0' && c <= '9'; c = *++s) {
+have_dig:
+ nz++;
+ if (nd > DBL_DIG * 4) {
+ continue;
+ }
+ if (c -= '0') {
+ nf += nz;
+ for (i = 1; i < nz; i++)
+ if (nd++ < 9)
+ y *= 10;
+ else if (nd <= DBL_DIG + 2)
+ z *= 10;
+ if (nd++ < 9)
+ y = 10*y + c;
+ else if (nd <= DBL_DIG + 2)
+ z = 10*z + c;
+ nz = 0;
+ }
+ }
+ }
+dig_done:
+ e = 0;
+ if (c == 'e' || c == 'E') {
+ if (!nd && !nz && !nz0) {
+ goto ret0;
+ }
+ s00 = s;
+ esign = 0;
+ switch (c = *++s) {
+ case '-':
+ esign = 1;
+ case '+':
+ c = *++s;
+ }
+ if (c >= '0' && c <= '9') {
+ while (c == '0')
+ c = *++s;
+ if (c > '0' && c <= '9') {
+ L = c - '0';
+ s1 = s;
+ while ((c = *++s) >= '0' && c <= '9')
+ L = 10*L + c - '0';
+ if (s - s1 > 8 || L > 19999)
+ /* Avoid confusion from exponents
+ * so large that e might overflow.
+ */
+ e = 19999; /* safe for 16 bit ints */
+ else
+ e = (int)L;
+ if (esign)
+ e = -e;
+ }
+ else
+ e = 0;
+ }
+ else
+ s = s00;
+ }
+ if (!nd) {
+ if (!nz && !nz0) {
+#ifdef INFNAN_CHECK
+ /* Check for Nan and Infinity */
+ switch (c) {
+ case 'i':
+ case 'I':
+ if (match(&s,"nf")) {
+ --s;
+ if (!match(&s,"inity"))
+ ++s;
+ word0(rv) = 0x7ff00000;
+ word1(rv) = 0;
+ goto ret;
+ }
+ break;
+ case 'n':
+ case 'N':
+ if (match(&s, "an")) {
+ word0(rv) = NAN_WORD0;
+ word1(rv) = NAN_WORD1;
+#ifndef No_Hex_NaN
+ if (*s == '(') /*)*/
+ hexnan(&rv, &s);
+#endif
+ goto ret;
+ }
+ }
+#endif /* INFNAN_CHECK */
+ret0:
+ s = s00;
+ sign = 0;
+ }
+ goto ret;
+ }
+ e1 = e -= nf;
+
+ /* Now we have nd0 digits, starting at s0, followed by a
+ * decimal point, followed by nd-nd0 digits. The number we're
+ * after is the integer represented by those digits times
+ * 10**e */
+
+ if (!nd0)
+ nd0 = nd;
+ k = nd < DBL_DIG + 2 ? nd : DBL_DIG + 2;
+ dval(rv) = y;
+ if (k > 9) {
+#ifdef SET_INEXACT
+ if (k > DBL_DIG)
+ oldinexact = get_inexact();
+#endif
+ dval(rv) = tens[k - 9] * dval(rv) + z;
+ }
+ bd0 = bb = bd = bs = delta = 0;
+ if (nd <= DBL_DIG
+#ifndef RND_PRODQUOT
+#ifndef Honor_FLT_ROUNDS
+ && Flt_Rounds == 1
+#endif
+#endif
+ ) {
+ if (!e)
+ goto ret;
+ if (e > 0) {
+ if (e <= Ten_pmax) {
+#ifdef VAX
+ goto vax_ovfl_check;
+#else
+#ifdef Honor_FLT_ROUNDS
+ /* round correctly FLT_ROUNDS = 2 or 3 */
+ if (sign) {
+ dval(rv) = -dval(rv);
+ sign = 0;
+ }
+#endif
+ /* rv = */ rounded_product(dval(rv), tens[e]);
+ goto ret;
+#endif
+ }
+ i = DBL_DIG - nd;
+ if (e <= Ten_pmax + i) {
+ /* A fancier test would sometimes let us do
+ * this for larger i values.
+ */
+#ifdef Honor_FLT_ROUNDS
+ /* round correctly FLT_ROUNDS = 2 or 3 */
+ if (sign) {
+ dval(rv) = -dval(rv);
+ sign = 0;
+ }
+#endif
+ e -= i;
+ dval(rv) *= tens[i];
+#ifdef VAX
+ /* VAX exponent range is so narrow we must
+ * worry about overflow here...
+ */
+vax_ovfl_check:
+ word0(rv) -= P*Exp_msk1;
+ /* rv = */ rounded_product(dval(rv), tens[e]);
+ if ((word0(rv) & Exp_mask)
+ > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
+ goto ovfl;
+ word0(rv) += P*Exp_msk1;
+#else
+ /* rv = */ rounded_product(dval(rv), tens[e]);
+#endif
+ goto ret;
+ }
+ }
+#ifndef Inaccurate_Divide
+ else if (e >= -Ten_pmax) {
+#ifdef Honor_FLT_ROUNDS
+ /* round correctly FLT_ROUNDS = 2 or 3 */
+ if (sign) {
+ dval(rv) = -dval(rv);
+ sign = 0;
+ }
+#endif
+ /* rv = */ rounded_quotient(dval(rv), tens[-e]);
+ goto ret;
+ }
+#endif
+ }
+ e1 += nd - k;
+
+#ifdef IEEE_Arith
+#ifdef SET_INEXACT
+ inexact = 1;
+ if (k <= DBL_DIG)
+ oldinexact = get_inexact();
+#endif
+#ifdef Avoid_Underflow
+ scale = 0;
+#endif
+#ifdef Honor_FLT_ROUNDS
+ if ((rounding = Flt_Rounds) >= 2) {
+ if (sign)
+ rounding = rounding == 2 ? 0 : 2;
+ else
+ if (rounding != 2)
+ rounding = 0;
+ }
+#endif
+#endif /*IEEE_Arith*/
+
+ /* Get starting approximation = rv * 10**e1 */
+
+ if (e1 > 0) {
+ if ((i = e1 & 15) != 0)
+ dval(rv) *= tens[i];
+ if (e1 &= ~15) {
+ if (e1 > DBL_MAX_10_EXP) {
+ovfl:
+#ifndef NO_ERRNO
+ errno = ERANGE;
+#endif
+ /* Can't trust HUGE_VAL */
+#ifdef IEEE_Arith
+#ifdef Honor_FLT_ROUNDS
+ switch (rounding) {
+ case 0: /* toward 0 */
+ case 3: /* toward -infinity */
+ word0(rv) = Big0;
+ word1(rv) = Big1;
+ break;
+ default:
+ word0(rv) = Exp_mask;
+ word1(rv) = 0;
+ }
+#else /*Honor_FLT_ROUNDS*/
+ word0(rv) = Exp_mask;
+ word1(rv) = 0;
+#endif /*Honor_FLT_ROUNDS*/
+#ifdef SET_INEXACT
+ /* set overflow bit */
+ dval(rv0) = 1e300;
+ dval(rv0) *= dval(rv0);
+#endif
+#else /*IEEE_Arith*/
+ word0(rv) = Big0;
+ word1(rv) = Big1;
+#endif /*IEEE_Arith*/
+ if (bd0)
+ goto retfree;
+ goto ret;
+ }
+ e1 >>= 4;
+ for (j = 0; e1 > 1; j++, e1 >>= 1)
+ if (e1 & 1)
+ dval(rv) *= bigtens[j];
+ /* The last multiplication could overflow. */
+ word0(rv) -= P*Exp_msk1;
+ dval(rv) *= bigtens[j];
+ if ((z = word0(rv) & Exp_mask)
+ > Exp_msk1*(DBL_MAX_EXP+Bias-P))
+ goto ovfl;
+ if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) {
+ /* set to largest number */
+ /* (Can't trust DBL_MAX) */
+ word0(rv) = Big0;
+ word1(rv) = Big1;
+ }
+ else
+ word0(rv) += P*Exp_msk1;
+ }
+ }
+ else if (e1 < 0) {
+ e1 = -e1;
+ if ((i = e1 & 15) != 0)
+ dval(rv) /= tens[i];
+ if (e1 >>= 4) {
+ if (e1 >= 1 << n_bigtens)
+ goto undfl;
+#ifdef Avoid_Underflow
+ if (e1 & Scale_Bit)
+ scale = 2*P;
+ for (j = 0; e1 > 0; j++, e1 >>= 1)
+ if (e1 & 1)
+ dval(rv) *= tinytens[j];
+ if (scale && (j = 2*P + 1 - ((word0(rv) & Exp_mask)
+ >> Exp_shift)) > 0) {
+ /* scaled rv is denormal; zap j low bits */
+ if (j >= 32) {
+ word1(rv) = 0;
+ if (j >= 53)
+ word0(rv) = (P+2)*Exp_msk1;
+ else
+ word0(rv) &= 0xffffffff << (j-32);
+ }
+ else
+ word1(rv) &= 0xffffffff << j;
+ }
+#else
+ for (j = 0; e1 > 1; j++, e1 >>= 1)
+ if (e1 & 1)
+ dval(rv) *= tinytens[j];
+ /* The last multiplication could underflow. */
+ dval(rv0) = dval(rv);
+ dval(rv) *= tinytens[j];
+ if (!dval(rv)) {
+ dval(rv) = 2.*dval(rv0);
+ dval(rv) *= tinytens[j];
+#endif
+ if (!dval(rv)) {
+undfl:
+ dval(rv) = 0.;
+#ifndef NO_ERRNO
+ errno = ERANGE;
+#endif
+ if (bd0)
+ goto retfree;
+ goto ret;
+ }
+#ifndef Avoid_Underflow
+ word0(rv) = Tiny0;
+ word1(rv) = Tiny1;
+ /* The refinement below will clean
+ * this approximation up.
+ */
+ }
+#endif
+ }
+ }
+
+ /* Now the hard part -- adjusting rv to the correct value.*/
+
+ /* Put digits into bd: true value = bd * 10^e */
+
+ bd0 = s2b(s0, nd0, nd, y);
+
+ for (;;) {
+ bd = Balloc(bd0->k);
+ Bcopy(bd, bd0);
+ bb = d2b(dval(rv), &bbe, &bbbits); /* rv = bb * 2^bbe */
+ bs = i2b(1);
+
+ if (e >= 0) {
+ bb2 = bb5 = 0;
+ bd2 = bd5 = e;
+ }
+ else {
+ bb2 = bb5 = -e;
+ bd2 = bd5 = 0;
+ }
+ if (bbe >= 0)
+ bb2 += bbe;
+ else
+ bd2 -= bbe;
+ bs2 = bb2;
+#ifdef Honor_FLT_ROUNDS
+ if (rounding != 1)
+ bs2++;
+#endif
+#ifdef Avoid_Underflow
+ j = bbe - scale;
+ i = j + bbbits - 1; /* logb(rv) */
+ if (i < Emin) /* denormal */
+ j += P - Emin;
+ else
+ j = P + 1 - bbbits;
+#else /*Avoid_Underflow*/
+#ifdef Sudden_Underflow
+#ifdef IBM
+ j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3);
+#else
+ j = P + 1 - bbbits;
+#endif
+#else /*Sudden_Underflow*/
+ j = bbe;
+ i = j + bbbits - 1; /* logb(rv) */
+ if (i < Emin) /* denormal */
+ j += P - Emin;
+ else
+ j = P + 1 - bbbits;
+#endif /*Sudden_Underflow*/
+#endif /*Avoid_Underflow*/
+ bb2 += j;
+ bd2 += j;
+#ifdef Avoid_Underflow
+ bd2 += scale;
+#endif
+ i = bb2 < bd2 ? bb2 : bd2;
+ if (i > bs2)
+ i = bs2;
+ if (i > 0) {
+ bb2 -= i;
+ bd2 -= i;
+ bs2 -= i;
+ }
+ if (bb5 > 0) {
+ bs = pow5mult(bs, bb5);
+ bb1 = mult(bs, bb);
+ Bfree(bb);
+ bb = bb1;
+ }
+ if (bb2 > 0)
+ bb = lshift(bb, bb2);
+ if (bd5 > 0)
+ bd = pow5mult(bd, bd5);
+ if (bd2 > 0)
+ bd = lshift(bd, bd2);
+ if (bs2 > 0)
+ bs = lshift(bs, bs2);
+ delta = diff(bb, bd);
+ dsign = delta->sign;
+ delta->sign = 0;
+ i = cmp(delta, bs);
+#ifdef Honor_FLT_ROUNDS
+ if (rounding != 1) {
+ if (i < 0) {
+ /* Error is less than an ulp */
+ if (!delta->x[0] && delta->wds <= 1) {
+ /* exact */
+#ifdef SET_INEXACT
+ inexact = 0;
+#endif
+ break;
+ }
+ if (rounding) {
+ if (dsign) {
+ adj = 1.;
+ goto apply_adj;
+ }
+ }
+ else if (!dsign) {
+ adj = -1.;
+ if (!word1(rv)
+ && !(word0(rv) & Frac_mask)) {
+ y = word0(rv) & Exp_mask;
+#ifdef Avoid_Underflow
+ if (!scale || y > 2*P*Exp_msk1)
+#else
+ if (y)
+#endif
+ {
+ delta = lshift(delta,Log2P);
+ if (cmp(delta, bs) <= 0)
+ adj = -0.5;
+ }
+ }
+apply_adj:
+#ifdef Avoid_Underflow
+ if (scale && (y = word0(rv) & Exp_mask)
+ <= 2*P*Exp_msk1)
+ word0(adj) += (2*P+1)*Exp_msk1 - y;
+#else
+#ifdef Sudden_Underflow
+ if ((word0(rv) & Exp_mask) <=
+ P*Exp_msk1) {
+ word0(rv) += P*Exp_msk1;
+ dval(rv) += adj*ulp(dval(rv));
+ word0(rv) -= P*Exp_msk1;
+ }
+ else
+#endif /*Sudden_Underflow*/
+#endif /*Avoid_Underflow*/
+ dval(rv) += adj*ulp(dval(rv));
+ }
+ break;
+ }
+ adj = ratio(delta, bs);
+ if (adj < 1.)
+ adj = 1.;
+ if (adj <= 0x7ffffffe) {
+ /* adj = rounding ? ceil(adj) : floor(adj); */
+ y = adj;
+ if (y != adj) {
+ if (!((rounding>>1) ^ dsign))
+ y++;
+ adj = y;
+ }
+ }
+#ifdef Avoid_Underflow
+ if (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1)
+ word0(adj) += (2*P+1)*Exp_msk1 - y;
+#else
+#ifdef Sudden_Underflow
+ if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
+ word0(rv) += P*Exp_msk1;
+ adj *= ulp(dval(rv));
+ if (dsign)
+ dval(rv) += adj;
+ else
+ dval(rv) -= adj;
+ word0(rv) -= P*Exp_msk1;
+ goto cont;
+ }
+#endif /*Sudden_Underflow*/
+#endif /*Avoid_Underflow*/
+ adj *= ulp(dval(rv));
+ if (dsign)
+ dval(rv) += adj;
+ else
+ dval(rv) -= adj;
+ goto cont;
+ }
+#endif /*Honor_FLT_ROUNDS*/
+
+ if (i < 0) {
+ /* Error is less than half an ulp -- check for
+ * special case of mantissa a power of two.
+ */
+ if (dsign || word1(rv) || word0(rv) & Bndry_mask
+#ifdef IEEE_Arith
+#ifdef Avoid_Underflow
+ || (word0(rv) & Exp_mask) <= (2*P+1)*Exp_msk1
+#else
+ || (word0(rv) & Exp_mask) <= Exp_msk1
+#endif
+#endif
+ ) {
+#ifdef SET_INEXACT
+ if (!delta->x[0] && delta->wds <= 1)
+ inexact = 0;
+#endif
+ break;
+ }
+ if (!delta->x[0] && delta->wds <= 1) {
+ /* exact result */
+#ifdef SET_INEXACT
+ inexact = 0;
+#endif
+ break;
+ }
+ delta = lshift(delta,Log2P);
+ if (cmp(delta, bs) > 0)
+ goto drop_down;
+ break;
+ }
+ if (i == 0) {
+ /* exactly half-way between */
+ if (dsign) {
+ if ((word0(rv) & Bndry_mask1) == Bndry_mask1
+ && word1(rv) == (
+#ifdef Avoid_Underflow
+ (scale && (y = word0(rv) & Exp_mask) <= 2*P*Exp_msk1)
+ ? (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) :
+#endif
+ 0xffffffff)) {
+ /*boundary case -- increment exponent*/
+ word0(rv) = (word0(rv) & Exp_mask)
+ + Exp_msk1
+#ifdef IBM
+ | Exp_msk1 >> 4
+#endif
+ ;
+ word1(rv) = 0;
+#ifdef Avoid_Underflow
+ dsign = 0;
+#endif
+ break;
+ }
+ }
+ else if (!(word0(rv) & Bndry_mask) && !word1(rv)) {
+drop_down:
+ /* boundary case -- decrement exponent */
+#ifdef Sudden_Underflow /*{{*/
+ L = word0(rv) & Exp_mask;
+#ifdef IBM
+ if (L < Exp_msk1)
+#else
+#ifdef Avoid_Underflow
+ if (L <= (scale ? (2*P+1)*Exp_msk1 : Exp_msk1))
+#else
+ if (L <= Exp_msk1)
+#endif /*Avoid_Underflow*/
+#endif /*IBM*/
+ goto undfl;
+ L -= Exp_msk1;
+#else /*Sudden_Underflow}{*/
+#ifdef Avoid_Underflow
+ if (scale) {
+ L = word0(rv) & Exp_mask;
+ if (L <= (2*P+1)*Exp_msk1) {
+ if (L > (P+2)*Exp_msk1)
+ /* round even ==> */
+ /* accept rv */
+ break;
+ /* rv = smallest denormal */
+ goto undfl;
+ }
+ }
+#endif /*Avoid_Underflow*/
+ L = (word0(rv) & Exp_mask) - Exp_msk1;
+#endif /*Sudden_Underflow}}*/
+ word0(rv) = L | Bndry_mask1;
+ word1(rv) = 0xffffffff;
+#ifdef IBM
+ goto cont;
+#else
+ break;
+#endif
+ }
+#ifndef ROUND_BIASED
+ if (!(word1(rv) & LSB))
+ break;
+#endif
+ if (dsign)
+ dval(rv) += ulp(dval(rv));
+#ifndef ROUND_BIASED
+ else {
+ dval(rv) -= ulp(dval(rv));
+#ifndef Sudden_Underflow
+ if (!dval(rv))
+ goto undfl;
+#endif
+ }
+#ifdef Avoid_Underflow
+ dsign = 1 - dsign;
+#endif
+#endif
+ break;
+ }
+ if ((aadj = ratio(delta, bs)) <= 2.) {
+ if (dsign)
+ aadj = dval(aadj1) = 1.;
+ else if (word1(rv) || word0(rv) & Bndry_mask) {
+#ifndef Sudden_Underflow
+ if (word1(rv) == Tiny1 && !word0(rv))
+ goto undfl;
+#endif
+ aadj = 1.;
+ dval(aadj1) = -1.;
+ }
+ else {
+ /* special case -- power of FLT_RADIX to be */
+ /* rounded down... */
+
+ if (aadj < 2./FLT_RADIX)
+ aadj = 1./FLT_RADIX;
+ else
+ aadj *= 0.5;
+ dval(aadj1) = -aadj;
+ }
+ }
+ else {
+ aadj *= 0.5;
+ dval(aadj1) = dsign ? aadj : -aadj;
+#ifdef Check_FLT_ROUNDS
+ switch (Rounding) {
+ case 2: /* towards +infinity */
+ dval(aadj1) -= 0.5;
+ break;
+ case 0: /* towards 0 */
+ case 3: /* towards -infinity */
+ dval(aadj1) += 0.5;
+ }
+#else
+ if (Flt_Rounds == 0)
+ dval(aadj1) += 0.5;
+#endif /*Check_FLT_ROUNDS*/
+ }
+ y = word0(rv) & Exp_mask;
+
+ /* Check for overflow */
+
+ if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
+ dval(rv0) = dval(rv);
+ word0(rv) -= P*Exp_msk1;
+ adj = dval(aadj1) * ulp(dval(rv));
+ dval(rv) += adj;
+ if ((word0(rv) & Exp_mask) >=
+ Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
+ if (word0(rv0) == Big0 && word1(rv0) == Big1)
+ goto ovfl;
+ word0(rv) = Big0;
+ word1(rv) = Big1;
+ goto cont;
+ }
+ else
+ word0(rv) += P*Exp_msk1;
+ }
+ else {
+#ifdef Avoid_Underflow
+ if (scale && y <= 2*P*Exp_msk1) {
+ if (aadj <= 0x7fffffff) {
+ if ((z = (int)aadj) <= 0)
+ z = 1;
+ aadj = z;
+ dval(aadj1) = dsign ? aadj : -aadj;
+ }
+ word0(aadj1) += (2*P+1)*Exp_msk1 - y;
+ }
+ adj = dval(aadj1) * ulp(dval(rv));
+ dval(rv) += adj;
+#else
+#ifdef Sudden_Underflow
+ if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
+ dval(rv0) = dval(rv);
+ word0(rv) += P*Exp_msk1;
+ adj = dval(aadj1) * ulp(dval(rv));
+ dval(rv) += adj;
+#ifdef IBM
+ if ((word0(rv) & Exp_mask) < P*Exp_msk1)
+#else
+ if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
+#endif
+ {
+ if (word0(rv0) == Tiny0 && word1(rv0) == Tiny1)
+ goto undfl;
+ word0(rv) = Tiny0;
+ word1(rv) = Tiny1;
+ goto cont;
+ }
+ else
+ word0(rv) -= P*Exp_msk1;
+ }
+ else {
+ adj = dval(aadj1) * ulp(dval(rv));
+ dval(rv) += adj;
+ }
+#else /*Sudden_Underflow*/
+ /* Compute adj so that the IEEE rounding rules will
+ * correctly round rv + adj in some half-way cases.
+ * If rv * ulp(rv) is denormalized (i.e.,
+ * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid
+ * trouble from bits lost to denormalization;
+ * example: 1.2e-307 .
+ */
+ if (y <= (P-1)*Exp_msk1 && aadj > 1.) {
+ dval(aadj1) = (double)(int)(aadj + 0.5);
+ if (!dsign)
+ dval(aadj1) = -dval(aadj1);
+ }
+ adj = dval(aadj1) * ulp(dval(rv));
+ dval(rv) += adj;
+#endif /*Sudden_Underflow*/
+#endif /*Avoid_Underflow*/
+ }
+ z = word0(rv) & Exp_mask;
+#ifndef SET_INEXACT
+#ifdef Avoid_Underflow
+ if (!scale)
+#endif
+ if (y == z) {
+ /* Can we stop now? */
+ L = (Long)aadj;
+ aadj -= L;
+ /* The tolerances below are conservative. */
+ if (dsign || word1(rv) || word0(rv) & Bndry_mask) {
+ if (aadj < .4999999 || aadj > .5000001)
+ break;
+ }
+ else if (aadj < .4999999/FLT_RADIX)
+ break;
+ }
+#endif
+cont:
+ Bfree(bb);
+ Bfree(bd);
+ Bfree(bs);
+ Bfree(delta);
+ }
+#ifdef SET_INEXACT
+ if (inexact) {
+ if (!oldinexact) {
+ word0(rv0) = Exp_1 + (70 << Exp_shift);
+ word1(rv0) = 0;
+ dval(rv0) += 1.;
+ }
+ }
+ else if (!oldinexact)
+ clear_inexact();
+#endif
+#ifdef Avoid_Underflow
+ if (scale) {
+ word0(rv0) = Exp_1 - 2*P*Exp_msk1;
+ word1(rv0) = 0;
+ dval(rv) *= dval(rv0);
+#ifndef NO_ERRNO
+ /* try to avoid the bug of testing an 8087 register value */
+ if (word0(rv) == 0 && word1(rv) == 0)
+ errno = ERANGE;
+#endif
+ }
+#endif /* Avoid_Underflow */
+#ifdef SET_INEXACT
+ if (inexact && !(word0(rv) & Exp_mask)) {
+ /* set underflow bit */
+ dval(rv0) = 1e-300;
+ dval(rv0) *= dval(rv0);
+ }
+#endif
+retfree:
+ Bfree(bb);
+ Bfree(bd);
+ Bfree(bs);
+ Bfree(bd0);
+ Bfree(delta);
+ret:
+ if (se)
+ *se = (char *)s;
+ return sign ? -dval(rv) : dval(rv);
+}
+
+NO_SANITIZE("unsigned-integer-overflow", static int quorem(Bigint *b, Bigint *S));
+static int
+quorem(Bigint *b, Bigint *S)
+{
+ int n;
+ ULong *bx, *bxe, q, *sx, *sxe;
+#ifdef ULLong
+ ULLong borrow, carry, y, ys;
+#else
+ ULong borrow, carry, y, ys;
+#ifdef Pack_32
+ ULong si, z, zs;
+#endif
+#endif
+
+ n = S->wds;
+#ifdef DEBUG
+ /*debug*/ if (b->wds > n)
+ /*debug*/ Bug("oversize b in quorem");
+#endif
+ if (b->wds < n)
+ return 0;
+ sx = S->x;
+ sxe = sx + --n;
+ bx = b->x;
+ bxe = bx + n;
+ q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
+#ifdef DEBUG
+ /*debug*/ if (q > 9)
+ /*debug*/ Bug("oversized quotient in quorem");
+#endif
+ if (q) {
+ borrow = 0;
+ carry = 0;
+ do {
+#ifdef ULLong
+ ys = *sx++ * (ULLong)q + carry;
+ carry = ys >> 32;
+ y = *bx - (ys & FFFFFFFF) - borrow;
+ borrow = y >> 32 & (ULong)1;
+ *bx++ = (ULong)(y & FFFFFFFF);
+#else
+#ifdef Pack_32
+ si = *sx++;
+ ys = (si & 0xffff) * q + carry;
+ zs = (si >> 16) * q + (ys >> 16);
+ carry = zs >> 16;
+ y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ z = (*bx >> 16) - (zs & 0xffff) - borrow;
+ borrow = (z & 0x10000) >> 16;
+ Storeinc(bx, z, y);
+#else
+ ys = *sx++ * q + carry;
+ carry = ys >> 16;
+ y = *bx - (ys & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ *bx++ = y & 0xffff;
+#endif
+#endif
+ } while (sx <= sxe);
+ if (!*bxe) {
+ bx = b->x;
+ while (--bxe > bx && !*bxe)
+ --n;
+ b->wds = n;
+ }
+ }
+ if (cmp(b, S) >= 0) {
+ q++;
+ borrow = 0;
+ carry = 0;
+ bx = b->x;
+ sx = S->x;
+ do {
+#ifdef ULLong
+ ys = *sx++ + carry;
+ carry = ys >> 32;
+ y = *bx - (ys & FFFFFFFF) - borrow;
+ borrow = y >> 32 & (ULong)1;
+ *bx++ = (ULong)(y & FFFFFFFF);
+#else
+#ifdef Pack_32
+ si = *sx++;
+ ys = (si & 0xffff) + carry;
+ zs = (si >> 16) + (ys >> 16);
+ carry = zs >> 16;
+ y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ z = (*bx >> 16) - (zs & 0xffff) - borrow;
+ borrow = (z & 0x10000) >> 16;
+ Storeinc(bx, z, y);
+#else
+ ys = *sx++ + carry;
+ carry = ys >> 16;
+ y = *bx - (ys & 0xffff) - borrow;
+ borrow = (y & 0x10000) >> 16;
+ *bx++ = y & 0xffff;
+#endif
+#endif
+ } while (sx <= sxe);
+ bx = b->x;
+ bxe = bx + n;
+ if (!*bxe) {
+ while (--bxe > bx && !*bxe)
+ --n;
+ b->wds = n;
+ }
+ }
+ return q;
+}
+
+#ifndef MULTIPLE_THREADS
+static char *dtoa_result;
+#endif
+
+#ifndef MULTIPLE_THREADS
+static char *
+rv_alloc(int i)
+{
+ return dtoa_result = MALLOC(i);
+}
+#else
+#define rv_alloc(i) MALLOC(i)
+#endif
+
+static char *
+nrv_alloc(const char *s, char **rve, size_t n)
+{
+ char *rv, *t;
+
+ t = rv = rv_alloc(n);
+ while ((*t = *s++) != 0) t++;
+ if (rve)
+ *rve = t;
+ return rv;
+}
+
+#define rv_strdup(s, rve) nrv_alloc((s), (rve), strlen(s)+1)
+
+#ifndef MULTIPLE_THREADS
+/* freedtoa(s) must be used to free values s returned by dtoa
+ * when MULTIPLE_THREADS is #defined. It should be used in all cases,
+ * but for consistency with earlier versions of dtoa, it is optional
+ * when MULTIPLE_THREADS is not defined.
+ */
+
+static void
+freedtoa(char *s)
+{
+ FREE(s);
+}
+#endif
+
+static const char INFSTR[] = "Infinity";
+static const char NANSTR[] = "NaN";
+static const char ZEROSTR[] = "0";
+
+/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
+ *
+ * Inspired by "How to Print Floating-Point Numbers Accurately" by
+ * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126].
+ *
+ * Modifications:
+ * 1. Rather than iterating, we use a simple numeric overestimate
+ * to determine k = floor(log10(d)). We scale relevant
+ * quantities using O(log2(k)) rather than O(k) multiplications.
+ * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
+ * try to generate digits strictly left to right. Instead, we
+ * compute with fewer bits and propagate the carry if necessary
+ * when rounding the final digit up. This is often faster.
+ * 3. Under the assumption that input will be rounded nearest,
+ * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
+ * That is, we allow equality in stopping tests when the
+ * round-nearest rule will give the same floating-point value
+ * as would satisfaction of the stopping test with strict
+ * inequality.
+ * 4. We remove common factors of powers of 2 from relevant
+ * quantities.
+ * 5. When converting floating-point integers less than 1e16,
+ * we use floating-point arithmetic rather than resorting
+ * to multiple-precision integers.
+ * 6. When asked to produce fewer than 15 digits, we first try
+ * to get by with floating-point arithmetic; we resort to
+ * multiple-precision integer arithmetic only if we cannot
+ * guarantee that the floating-point calculation has given
+ * the correctly rounded result. For k requested digits and
+ * "uniformly" distributed input, the probability is
+ * something like 10^(k-15) that we must resort to the Long
+ * calculation.
+ */
+
+char *
+dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve)
+{
+ /* Arguments ndigits, decpt, sign are similar to those
+ of ecvt and fcvt; trailing zeros are suppressed from
+ the returned string. If not null, *rve is set to point
+ to the end of the return value. If d is +-Infinity or NaN,
+ then *decpt is set to 9999.
+
+ mode:
+ 0 ==> shortest string that yields d when read in
+ and rounded to nearest.
+ 1 ==> like 0, but with Steele & White stopping rule;
+ e.g. with IEEE P754 arithmetic , mode 0 gives
+ 1e23 whereas mode 1 gives 9.999999999999999e22.
+ 2 ==> max(1,ndigits) significant digits. This gives a
+ return value similar to that of ecvt, except
+ that trailing zeros are suppressed.
+ 3 ==> through ndigits past the decimal point. This
+ gives a return value similar to that from fcvt,
+ except that trailing zeros are suppressed, and
+ ndigits can be negative.
+ 4,5 ==> similar to 2 and 3, respectively, but (in
+ round-nearest mode) with the tests of mode 0 to
+ possibly return a shorter string that rounds to d.
+ With IEEE arithmetic and compilation with
+ -DHonor_FLT_ROUNDS, modes 4 and 5 behave the same
+ as modes 2 and 3 when FLT_ROUNDS != 1.
+ 6-9 ==> Debugging modes similar to mode - 4: don't try
+ fast floating-point estimate (if applicable).
+
+ Values of mode other than 0-9 are treated as mode 0.
+
+ Sufficient space is allocated to the return value
+ to hold the suppressed trailing zeros.
+ */
+
+ int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
+ j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
+ spec_case, try_quick, half = 0;
+ Long L;
+#ifndef Sudden_Underflow
+ int denorm;
+ ULong x;
+#endif
+ Bigint *b, *b1, *delta, *mlo = 0, *mhi = 0, *S;
+ double ds;
+ double_u d, d2, eps;
+ char *s, *s0;
+#ifdef Honor_FLT_ROUNDS
+ int rounding;
+#endif
+#ifdef SET_INEXACT
+ int inexact, oldinexact;
+#endif
+
+ dval(d) = d_;
+
+#ifndef MULTIPLE_THREADS
+ if (dtoa_result) {
+ freedtoa(dtoa_result);
+ dtoa_result = 0;
+ }
+#endif
+
+ if (word0(d) & Sign_bit) {
+ /* set sign for everything, including 0's and NaNs */
+ *sign = 1;
+ word0(d) &= ~Sign_bit; /* clear sign bit */
+ }
+ else
+ *sign = 0;
+
+#if defined(IEEE_Arith) + defined(VAX)
+#ifdef IEEE_Arith
+ if ((word0(d) & Exp_mask) == Exp_mask)
+#else
+ if (word0(d) == 0x8000)
+#endif
+ {
+ /* Infinity or NaN */
+ *decpt = 9999;
+#ifdef IEEE_Arith
+ if (!word1(d) && !(word0(d) & 0xfffff))
+ return rv_strdup(INFSTR, rve);
+#endif
+ return rv_strdup(NANSTR, rve);
+ }
+#endif
+#ifdef IBM
+ dval(d) += 0; /* normalize */
+#endif
+ if (!dval(d)) {
+ *decpt = 1;
+ return rv_strdup(ZEROSTR, rve);
+ }
+
+#ifdef SET_INEXACT
+ try_quick = oldinexact = get_inexact();
+ inexact = 1;
+#endif
+#ifdef Honor_FLT_ROUNDS
+ if ((rounding = Flt_Rounds) >= 2) {
+ if (*sign)
+ rounding = rounding == 2 ? 0 : 2;
+ else
+ if (rounding != 2)
+ rounding = 0;
+ }
+#endif
+
+ b = d2b(dval(d), &be, &bbits);
+#ifdef Sudden_Underflow
+ i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
+#else
+ if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) {
+#endif
+ dval(d2) = dval(d);
+ word0(d2) &= Frac_mask1;
+ word0(d2) |= Exp_11;
+#ifdef IBM
+ if (j = 11 - hi0bits(word0(d2) & Frac_mask))
+ dval(d2) /= 1 << j;
+#endif
+
+ /* log(x) ~=~ log(1.5) + (x-1.5)/1.5
+ * log10(x) = log(x) / log(10)
+ * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
+ * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
+ *
+ * This suggests computing an approximation k to log10(d) by
+ *
+ * k = (i - Bias)*0.301029995663981
+ * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
+ *
+ * We want k to be too large rather than too small.
+ * The error in the first-order Taylor series approximation
+ * is in our favor, so we just round up the constant enough
+ * to compensate for any error in the multiplication of
+ * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
+ * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
+ * adding 1e-13 to the constant term more than suffices.
+ * Hence we adjust the constant term to 0.1760912590558.
+ * (We could get a more accurate k by invoking log10,
+ * but this is probably not worthwhile.)
+ */
+
+ i -= Bias;
+#ifdef IBM
+ i <<= 2;
+ i += j;
+#endif
+#ifndef Sudden_Underflow
+ denorm = 0;
+ }
+ else {
+ /* d is denormalized */
+
+ i = bbits + be + (Bias + (P-1) - 1);
+ x = i > 32 ? word0(d) << (64 - i) | word1(d) >> (i - 32)
+ : word1(d) << (32 - i);
+ dval(d2) = x;
+ word0(d2) -= 31*Exp_msk1; /* adjust exponent */
+ i -= (Bias + (P-1) - 1) + 1;
+ denorm = 1;
+ }
+#endif
+ ds = (dval(d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
+ k = (int)ds;
+ if (ds < 0. && ds != k)
+ k--; /* want k = floor(ds) */
+ k_check = 1;
+ if (k >= 0 && k <= Ten_pmax) {
+ if (dval(d) < tens[k])
+ k--;
+ k_check = 0;
+ }
+ j = bbits - i - 1;
+ if (j >= 0) {
+ b2 = 0;
+ s2 = j;
+ }
+ else {
+ b2 = -j;
+ s2 = 0;
+ }
+ if (k >= 0) {
+ b5 = 0;
+ s5 = k;
+ s2 += k;
+ }
+ else {
+ b2 -= k;
+ b5 = -k;
+ s5 = 0;
+ }
+ if (mode < 0 || mode > 9)
+ mode = 0;
+
+#ifndef SET_INEXACT
+#ifdef Check_FLT_ROUNDS
+ try_quick = Rounding == 1;
+#else
+ try_quick = 1;
+#endif
+#endif /*SET_INEXACT*/
+
+ if (mode > 5) {
+ mode -= 4;
+ try_quick = 0;
+ }
+ leftright = 1;
+ ilim = ilim1 = -1;
+ switch (mode) {
+ case 0:
+ case 1:
+ i = 18;
+ ndigits = 0;
+ break;
+ case 2:
+ leftright = 0;
+ /* no break */
+ case 4:
+ if (ndigits <= 0)
+ ndigits = 1;
+ ilim = ilim1 = i = ndigits;
+ break;
+ case 3:
+ leftright = 0;
+ /* no break */
+ case 5:
+ i = ndigits + k + 1;
+ ilim = i;
+ ilim1 = i - 1;
+ if (i <= 0)
+ i = 1;
+ }
+ s = s0 = rv_alloc(i+1);
+
+#ifdef Honor_FLT_ROUNDS
+ if (mode > 1 && rounding != 1)
+ leftright = 0;
+#endif
+
+ if (ilim >= 0 && ilim <= Quick_max && try_quick) {
+
+ /* Try to get by with floating-point arithmetic. */
+
+ i = 0;
+ dval(d2) = dval(d);
+ k0 = k;
+ ilim0 = ilim;
+ ieps = 2; /* conservative */
+ if (k > 0) {
+ ds = tens[k&0xf];
+ j = k >> 4;
+ if (j & Bletch) {
+ /* prevent overflows */
+ j &= Bletch - 1;
+ dval(d) /= bigtens[n_bigtens-1];
+ ieps++;
+ }
+ for (; j; j >>= 1, i++)
+ if (j & 1) {
+ ieps++;
+ ds *= bigtens[i];
+ }
+ dval(d) /= ds;
+ }
+ else if ((j1 = -k) != 0) {
+ dval(d) *= tens[j1 & 0xf];
+ for (j = j1 >> 4; j; j >>= 1, i++)
+ if (j & 1) {
+ ieps++;
+ dval(d) *= bigtens[i];
+ }
+ }
+ if (k_check && dval(d) < 1. && ilim > 0) {
+ if (ilim1 <= 0)
+ goto fast_failed;
+ ilim = ilim1;
+ k--;
+ dval(d) *= 10.;
+ ieps++;
+ }
+ dval(eps) = ieps*dval(d) + 7.;
+ word0(eps) -= (P-1)*Exp_msk1;
+ if (ilim == 0) {
+ S = mhi = 0;
+ dval(d) -= 5.;
+ if (dval(d) > dval(eps))
+ goto one_digit;
+ if (dval(d) < -dval(eps))
+ goto no_digits;
+ goto fast_failed;
+ }
+#ifndef No_leftright
+ if (leftright) {
+ /* Use Steele & White method of only
+ * generating digits needed.
+ */
+ dval(eps) = 0.5/tens[ilim-1] - dval(eps);
+ for (i = 0;;) {
+ L = (int)dval(d);
+ dval(d) -= L;
+ *s++ = '0' + (int)L;
+ if (dval(d) < dval(eps))
+ goto ret1;
+ if (1. - dval(d) < dval(eps))
+ goto bump_up;
+ if (++i >= ilim)
+ break;
+ dval(eps) *= 10.;
+ dval(d) *= 10.;
+ }
+ }
+ else {
+#endif
+ /* Generate ilim digits, then fix them up. */
+ dval(eps) *= tens[ilim-1];
+ for (i = 1;; i++, dval(d) *= 10.) {
+ L = (Long)(dval(d));
+ if (!(dval(d) -= L))
+ ilim = i;
+ *s++ = '0' + (int)L;
+ if (i == ilim) {
+ if (dval(d) > 0.5 + dval(eps))
+ goto bump_up;
+ else if (dval(d) < 0.5 - dval(eps)) {
+ while (*--s == '0') ;
+ s++;
+ goto ret1;
+ }
+ half = 1;
+ if ((*(s-1) - '0') & 1) {
+ goto bump_up;
+ }
+ break;
+ }
+ }
+#ifndef No_leftright
+ }
+#endif
+fast_failed:
+ s = s0;
+ dval(d) = dval(d2);
+ k = k0;
+ ilim = ilim0;
+ }
+
+ /* Do we have a "small" integer? */
+
+ if (be >= 0 && k <= Int_max) {
+ /* Yes. */
+ ds = tens[k];
+ if (ndigits < 0 && ilim <= 0) {
+ S = mhi = 0;
+ if (ilim < 0 || dval(d) <= 5*ds)
+ goto no_digits;
+ goto one_digit;
+ }
+ for (i = 1;; i++, dval(d) *= 10.) {
+ L = (Long)(dval(d) / ds);
+ dval(d) -= L*ds;
+#ifdef Check_FLT_ROUNDS
+ /* If FLT_ROUNDS == 2, L will usually be high by 1 */
+ if (dval(d) < 0) {
+ L--;
+ dval(d) += ds;
+ }
+#endif
+ *s++ = '0' + (int)L;
+ if (!dval(d)) {
+#ifdef SET_INEXACT
+ inexact = 0;
+#endif
+ break;
+ }
+ if (i == ilim) {
+#ifdef Honor_FLT_ROUNDS
+ if (mode > 1)
+ switch (rounding) {
+ case 0: goto ret1;
+ case 2: goto bump_up;
+ }
+#endif
+ dval(d) += dval(d);
+ if (dval(d) > ds || (dval(d) == ds && (L & 1))) {
+bump_up:
+ while (*--s == '9')
+ if (s == s0) {
+ k++;
+ *s = '0';
+ break;
+ }
+ ++*s++;
+ }
+ break;
+ }
+ }
+ goto ret1;
+ }
+
+ m2 = b2;
+ m5 = b5;
+ if (leftright) {
+ i =
+#ifndef Sudden_Underflow
+ denorm ? be + (Bias + (P-1) - 1 + 1) :
+#endif
+#ifdef IBM
+ 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
+#else
+ 1 + P - bbits;
+#endif
+ b2 += i;
+ s2 += i;
+ mhi = i2b(1);
+ }
+ if (m2 > 0 && s2 > 0) {
+ i = m2 < s2 ? m2 : s2;
+ b2 -= i;
+ m2 -= i;
+ s2 -= i;
+ }
+ if (b5 > 0) {
+ if (leftright) {
+ if (m5 > 0) {
+ mhi = pow5mult(mhi, m5);
+ b1 = mult(mhi, b);
+ Bfree(b);
+ b = b1;
+ }
+ if ((j = b5 - m5) != 0)
+ b = pow5mult(b, j);
+ }
+ else
+ b = pow5mult(b, b5);
+ }
+ S = i2b(1);
+ if (s5 > 0)
+ S = pow5mult(S, s5);
+
+ /* Check for special case that d is a normalized power of 2. */
+
+ spec_case = 0;
+ if ((mode < 2 || leftright)
+#ifdef Honor_FLT_ROUNDS
+ && rounding == 1
+#endif
+ ) {
+ if (!word1(d) && !(word0(d) & Bndry_mask)
+#ifndef Sudden_Underflow
+ && word0(d) & (Exp_mask & ~Exp_msk1)
+#endif
+ ) {
+ /* The special case */
+ b2 += Log2P;
+ s2 += Log2P;
+ spec_case = 1;
+ }
+ }
+
+ /* Arrange for convenient computation of quotients:
+ * shift left if necessary so divisor has 4 leading 0 bits.
+ *
+ * Perhaps we should just compute leading 28 bits of S once
+ * and for all and pass them and a shift to quorem, so it
+ * can do shifts and ors to compute the numerator for q.
+ */
+#ifdef Pack_32
+ if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0)
+ i = 32 - i;
+#else
+ if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) != 0)
+ i = 16 - i;
+#endif
+ if (i > 4) {
+ i -= 4;
+ b2 += i;
+ m2 += i;
+ s2 += i;
+ }
+ else if (i < 4) {
+ i += 28;
+ b2 += i;
+ m2 += i;
+ s2 += i;
+ }
+ if (b2 > 0)
+ b = lshift(b, b2);
+ if (s2 > 0)
+ S = lshift(S, s2);
+ if (k_check) {
+ if (cmp(b,S) < 0) {
+ k--;
+ b = multadd(b, 10, 0); /* we botched the k estimate */
+ if (leftright)
+ mhi = multadd(mhi, 10, 0);
+ ilim = ilim1;
+ }
+ }
+ if (ilim <= 0 && (mode == 3 || mode == 5)) {
+ if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
+ /* no digits, fcvt style */
+no_digits:
+ k = -1 - ndigits;
+ goto ret;
+ }
+one_digit:
+ *s++ = '1';
+ k++;
+ goto ret;
+ }
+ if (leftright) {
+ if (m2 > 0)
+ mhi = lshift(mhi, m2);
+
+ /* Compute mlo -- check for special case
+ * that d is a normalized power of 2.
+ */
+
+ mlo = mhi;
+ if (spec_case) {
+ mhi = Balloc(mhi->k);
+ Bcopy(mhi, mlo);
+ mhi = lshift(mhi, Log2P);
+ }
+
+ for (i = 1;;i++) {
+ dig = quorem(b,S) + '0';
+ /* Do we yet have the shortest decimal string
+ * that will round to d?
+ */
+ j = cmp(b, mlo);
+ delta = diff(S, mhi);
+ j1 = delta->sign ? 1 : cmp(b, delta);
+ Bfree(delta);
+#ifndef ROUND_BIASED
+ if (j1 == 0 && mode != 1 && !(word1(d) & 1)
+#ifdef Honor_FLT_ROUNDS
+ && rounding >= 1
+#endif
+ ) {
+ if (dig == '9')
+ goto round_9_up;
+ if (j > 0)
+ dig++;
+#ifdef SET_INEXACT
+ else if (!b->x[0] && b->wds <= 1)
+ inexact = 0;
+#endif
+ *s++ = dig;
+ goto ret;
+ }
+#endif
+ if (j < 0 || (j == 0 && mode != 1
+#ifndef ROUND_BIASED
+ && !(word1(d) & 1)
+#endif
+ )) {
+ if (!b->x[0] && b->wds <= 1) {
+#ifdef SET_INEXACT
+ inexact = 0;
+#endif
+ goto accept_dig;
+ }
+#ifdef Honor_FLT_ROUNDS
+ if (mode > 1)
+ switch (rounding) {
+ case 0: goto accept_dig;
+ case 2: goto keep_dig;
+ }
+#endif /*Honor_FLT_ROUNDS*/
+ if (j1 > 0) {
+ b = lshift(b, 1);
+ j1 = cmp(b, S);
+ if ((j1 > 0 || (j1 == 0 && (dig & 1))) && dig++ == '9')
+ goto round_9_up;
+ }
+accept_dig:
+ *s++ = dig;
+ goto ret;
+ }
+ if (j1 > 0) {
+#ifdef Honor_FLT_ROUNDS
+ if (!rounding)
+ goto accept_dig;
+#endif
+ if (dig == '9') { /* possible if i == 1 */
+round_9_up:
+ *s++ = '9';
+ goto roundoff;
+ }
+ *s++ = dig + 1;
+ goto ret;
+ }
+#ifdef Honor_FLT_ROUNDS
+keep_dig:
+#endif
+ *s++ = dig;
+ if (i == ilim)
+ break;
+ b = multadd(b, 10, 0);
+ if (mlo == mhi)
+ mlo = mhi = multadd(mhi, 10, 0);
+ else {
+ mlo = multadd(mlo, 10, 0);
+ mhi = multadd(mhi, 10, 0);
+ }
+ }
+ }
+ else
+ for (i = 1;; i++) {
+ *s++ = dig = quorem(b,S) + '0';
+ if (!b->x[0] && b->wds <= 1) {
+#ifdef SET_INEXACT
+ inexact = 0;
+#endif
+ goto ret;
+ }
+ if (i >= ilim)
+ break;
+ b = multadd(b, 10, 0);
+ }
+
+ /* Round off last digit */
+
+#ifdef Honor_FLT_ROUNDS
+ switch (rounding) {
+ case 0: goto trimzeros;
+ case 2: goto roundoff;
+ }
+#endif
+ b = lshift(b, 1);
+ j = cmp(b, S);
+ if (j > 0 || (j == 0 && (dig & 1))) {
+ roundoff:
+ while (*--s == '9')
+ if (s == s0) {
+ k++;
+ *s++ = '1';
+ goto ret;
+ }
+ if (!half || (*s - '0') & 1)
+ ++*s;
+ }
+ else {
+ while (*--s == '0') ;
+ }
+ s++;
+ret:
+ Bfree(S);
+ if (mhi) {
+ if (mlo && mlo != mhi)
+ Bfree(mlo);
+ Bfree(mhi);
+ }
+ret1:
+#ifdef SET_INEXACT
+ if (inexact) {
+ if (!oldinexact) {
+ word0(d) = Exp_1 + (70 << Exp_shift);
+ word1(d) = 0;
+ dval(d) += 1.;
+ }
+ }
+ else if (!oldinexact)
+ clear_inexact();
+#endif
+ Bfree(b);
+ *s = 0;
+ *decpt = k + 1;
+ if (rve)
+ *rve = s;
+ return s0;
+}
+
+/*-
+ * Copyright (c) 2004-2008 David Schultz <das@FreeBSD.ORG>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#define DBL_MANH_SIZE 20
+#define DBL_MANL_SIZE 32
+#define DBL_ADJ (DBL_MAX_EXP - 2)
+#define SIGFIGS ((DBL_MANT_DIG + 3) / 4 + 1)
+#define dexp_get(u) ((int)(word0(u) >> Exp_shift) & ~Exp_msk1)
+#define dexp_set(u,v) (word0(u) = (((int)(word0(u)) & ~Exp_mask) | ((v) << Exp_shift)))
+#define dmanh_get(u) ((uint32_t)(word0(u) & Frac_mask))
+#define dmanl_get(u) ((uint32_t)word1(u))
+
+
+/*
+ * This procedure converts a double-precision number in IEEE format
+ * into a string of hexadecimal digits and an exponent of 2. Its
+ * behavior is bug-for-bug compatible with dtoa() in mode 2, with the
+ * following exceptions:
+ *
+ * - An ndigits < 0 causes it to use as many digits as necessary to
+ * represent the number exactly.
+ * - The additional xdigs argument should point to either the string
+ * "0123456789ABCDEF" or the string "0123456789abcdef", depending on
+ * which case is desired.
+ * - This routine does not repeat dtoa's mistake of setting decpt
+ * to 9999 in the case of an infinity or NaN. INT_MAX is used
+ * for this purpose instead.
+ *
+ * Note that the C99 standard does not specify what the leading digit
+ * should be for non-zero numbers. For instance, 0x1.3p3 is the same
+ * as 0x2.6p2 is the same as 0x4.cp3. This implementation always makes
+ * the leading digit a 1. This ensures that the exponent printed is the
+ * actual base-2 exponent, i.e., ilogb(d).
+ *
+ * Inputs: d, xdigs, ndigits
+ * Outputs: decpt, sign, rve
+ */
+char *
+hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve)
+{
+ U u;
+ char *s, *s0;
+ int bufsize;
+ uint32_t manh, manl;
+
+ u.d = d;
+ if (word0(u) & Sign_bit) {
+ /* set sign for everything, including 0's and NaNs */
+ *sign = 1;
+ word0(u) &= ~Sign_bit; /* clear sign bit */
+ }
+ else
+ *sign = 0;
+
+ if (isinf(d)) { /* FP_INFINITE */
+ *decpt = INT_MAX;
+ return rv_strdup(INFSTR, rve);
+ }
+ else if (isnan(d)) { /* FP_NAN */
+ *decpt = INT_MAX;
+ return rv_strdup(NANSTR, rve);
+ }
+ else if (d == 0.0) { /* FP_ZERO */
+ *decpt = 1;
+ return rv_strdup(ZEROSTR, rve);
+ }
+ else if (dexp_get(u)) { /* FP_NORMAL */
+ *decpt = dexp_get(u) - DBL_ADJ;
+ }
+ else { /* FP_SUBNORMAL */
+ u.d *= 5.363123171977039e+154 /* 0x1p514 */;
+ *decpt = dexp_get(u) - (514 + DBL_ADJ);
+ }
+
+ if (ndigits == 0) /* dtoa() compatibility */
+ ndigits = 1;
+
+ /*
+ * If ndigits < 0, we are expected to auto-size, so we allocate
+ * enough space for all the digits.
+ */
+ bufsize = (ndigits > 0) ? ndigits : SIGFIGS;
+ s0 = rv_alloc(bufsize+1);
+
+ /* Round to the desired number of digits. */
+ if (SIGFIGS > ndigits && ndigits > 0) {
+ float redux = 1.0f;
+ int offset = 4 * ndigits + DBL_MAX_EXP - 4 - DBL_MANT_DIG;
+ dexp_set(u, offset);
+ u.d += redux;
+ u.d -= redux;
+ *decpt += dexp_get(u) - offset;
+ }
+
+ manh = dmanh_get(u);
+ manl = dmanl_get(u);
+ *s0 = '1';
+ for (s = s0 + 1; s < s0 + bufsize; s++) {
+ *s = xdigs[(manh >> (DBL_MANH_SIZE - 4)) & 0xf];
+ manh = (manh << 4) | (manl >> (DBL_MANL_SIZE - 4));
+ manl <<= 4;
+ }
+
+ /* If ndigits < 0, we are expected to auto-size the precision. */
+ if (ndigits < 0) {
+ for (ndigits = SIGFIGS; s0[ndigits - 1] == '0'; ndigits--)
+ ;
+ }
+
+ s = s0 + ndigits;
+ *s = '\0';
+ if (rve != NULL)
+ *rve = s;
+ return (s0);
+}
+
+#ifdef __cplusplus
+#if 0
+{ /* satisfy cc-mode */
+#endif
+}
+#endif
diff --git a/ext/bigdecimal/static_assert.h b/ext/bigdecimal/static_assert.h
new file mode 100644
index 0000000000..9295729bf6
--- /dev/null
+++ b/ext/bigdecimal/static_assert.h
@@ -0,0 +1,54 @@
+#ifndef BIGDECIMAL_STATIC_ASSERT_H
+#define BIGDECIMAL_STATIC_ASSERT_H
+
+#include "feature.h"
+
+#ifdef HAVE_RUBY_INTERNAL_STATIC_ASSERT_H
+# include <ruby/internal/static_assert.h>
+#endif
+
+#ifdef RBIMPL_STATIC_ASSERT
+# define STATIC_ASSERT RBIMPL_STATIC_ASSERT
+#endif
+
+#ifndef STATIC_ASSERT
+# /* The following section is copied from CRuby's static_assert.h */
+
+# if defined(__cplusplus) && defined(__cpp_static_assert)
+# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
+# define BIGDECIMAL_STATIC_ASSERT0 static_assert
+
+# elif defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER >= 1600
+# define BIGDECIMAL_STATIC_ASSERT0 static_assert
+
+# elif defined(__INTEL_CXX11_MODE__)
+# define BIGDECIMAL_STATIC_ASSERT0 static_assert
+
+# elif defined(__cplusplus) && __cplusplus >= 201103L
+# define BIGDECIMAL_STATIC_ASSERT0 static_assert
+
+# elif defined(__cplusplus) && __has_extension(cxx_static_assert)
+# define BIGDECIMAL_STATIC_ASSERT0 __extension__ static_assert
+
+# elif defined(__STDC_VERSION__) && __has_extension(c_static_assert)
+# define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert
+
+# elif defined(__STDC_VERSION__) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+# define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert
+#endif
+
+# if defined(__DOXYGEN__)
+# define STATIC_ASSERT static_assert
+
+# elif defined(BIGDECIMAL_STATIC_ASSERT0)
+# define STATIC_ASSERT(name, expr) \
+ BIGDECIMAL_STATIC_ASSERT0(expr, #name ": " #expr)
+
+# else
+# define STATIC_ASSERT(name, expr) \
+ typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
+# endif
+#endif /* STATIC_ASSERT */
+
+
+#endif /* BIGDECIMAL_STATIC_ASSERT_H */
diff --git a/ext/bigdecimal/util/depend b/ext/bigdecimal/util/depend
deleted file mode 100644
index 96b6a7fea0..0000000000
--- a/ext/bigdecimal/util/depend
+++ /dev/null
@@ -1,14 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-util.o: $(RUBY_EXTCONF_H)
-util.o: $(arch_hdrdir)/ruby/config.h
-util.o: $(hdrdir)/ruby.h
-util.o: $(hdrdir)/ruby/assert.h
-util.o: $(hdrdir)/ruby/backward.h
-util.o: $(hdrdir)/ruby/defines.h
-util.o: $(hdrdir)/ruby/intern.h
-util.o: $(hdrdir)/ruby/missing.h
-util.o: $(hdrdir)/ruby/ruby.h
-util.o: $(hdrdir)/ruby/st.h
-util.o: $(hdrdir)/ruby/subst.h
-util.o: util.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/cgi/escape/depend b/ext/cgi/escape/depend
index 8d4736616f..e3904d0695 100644
--- a/ext/cgi/escape/depend
+++ b/ext/cgi/escape/depend
@@ -4,9 +4,166 @@ escape.o: $(arch_hdrdir)/ruby/config.h
escape.o: $(hdrdir)/ruby.h
escape.o: $(hdrdir)/ruby/assert.h
escape.o: $(hdrdir)/ruby/backward.h
+escape.o: $(hdrdir)/ruby/backward/2/assume.h
+escape.o: $(hdrdir)/ruby/backward/2/attributes.h
+escape.o: $(hdrdir)/ruby/backward/2/bool.h
+escape.o: $(hdrdir)/ruby/backward/2/inttypes.h
+escape.o: $(hdrdir)/ruby/backward/2/limits.h
+escape.o: $(hdrdir)/ruby/backward/2/long_long.h
+escape.o: $(hdrdir)/ruby/backward/2/stdalign.h
+escape.o: $(hdrdir)/ruby/backward/2/stdarg.h
escape.o: $(hdrdir)/ruby/defines.h
escape.o: $(hdrdir)/ruby/encoding.h
escape.o: $(hdrdir)/ruby/intern.h
+escape.o: $(hdrdir)/ruby/internal/abi.h
+escape.o: $(hdrdir)/ruby/internal/anyargs.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+escape.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+escape.o: $(hdrdir)/ruby/internal/assume.h
+escape.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+escape.o: $(hdrdir)/ruby/internal/attr/artificial.h
+escape.o: $(hdrdir)/ruby/internal/attr/cold.h
+escape.o: $(hdrdir)/ruby/internal/attr/const.h
+escape.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+escape.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+escape.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+escape.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+escape.o: $(hdrdir)/ruby/internal/attr/error.h
+escape.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+escape.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+escape.o: $(hdrdir)/ruby/internal/attr/format.h
+escape.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+escape.o: $(hdrdir)/ruby/internal/attr/noalias.h
+escape.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+escape.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+escape.o: $(hdrdir)/ruby/internal/attr/noinline.h
+escape.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+escape.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+escape.o: $(hdrdir)/ruby/internal/attr/pure.h
+escape.o: $(hdrdir)/ruby/internal/attr/restrict.h
+escape.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+escape.o: $(hdrdir)/ruby/internal/attr/warning.h
+escape.o: $(hdrdir)/ruby/internal/attr/weakref.h
+escape.o: $(hdrdir)/ruby/internal/cast.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+escape.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+escape.o: $(hdrdir)/ruby/internal/compiler_since.h
+escape.o: $(hdrdir)/ruby/internal/config.h
+escape.o: $(hdrdir)/ruby/internal/constant_p.h
+escape.o: $(hdrdir)/ruby/internal/core.h
+escape.o: $(hdrdir)/ruby/internal/core/rarray.h
+escape.o: $(hdrdir)/ruby/internal/core/rbasic.h
+escape.o: $(hdrdir)/ruby/internal/core/rbignum.h
+escape.o: $(hdrdir)/ruby/internal/core/rclass.h
+escape.o: $(hdrdir)/ruby/internal/core/rdata.h
+escape.o: $(hdrdir)/ruby/internal/core/rfile.h
+escape.o: $(hdrdir)/ruby/internal/core/rhash.h
+escape.o: $(hdrdir)/ruby/internal/core/robject.h
+escape.o: $(hdrdir)/ruby/internal/core/rregexp.h
+escape.o: $(hdrdir)/ruby/internal/core/rstring.h
+escape.o: $(hdrdir)/ruby/internal/core/rstruct.h
+escape.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+escape.o: $(hdrdir)/ruby/internal/ctype.h
+escape.o: $(hdrdir)/ruby/internal/dllexport.h
+escape.o: $(hdrdir)/ruby/internal/dosish.h
+escape.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+escape.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+escape.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+escape.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+escape.o: $(hdrdir)/ruby/internal/encoding/re.h
+escape.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+escape.o: $(hdrdir)/ruby/internal/encoding/string.h
+escape.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+escape.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+escape.o: $(hdrdir)/ruby/internal/error.h
+escape.o: $(hdrdir)/ruby/internal/eval.h
+escape.o: $(hdrdir)/ruby/internal/event.h
+escape.o: $(hdrdir)/ruby/internal/fl_type.h
+escape.o: $(hdrdir)/ruby/internal/gc.h
+escape.o: $(hdrdir)/ruby/internal/glob.h
+escape.o: $(hdrdir)/ruby/internal/globals.h
+escape.o: $(hdrdir)/ruby/internal/has/attribute.h
+escape.o: $(hdrdir)/ruby/internal/has/builtin.h
+escape.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+escape.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+escape.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+escape.o: $(hdrdir)/ruby/internal/has/extension.h
+escape.o: $(hdrdir)/ruby/internal/has/feature.h
+escape.o: $(hdrdir)/ruby/internal/has/warning.h
+escape.o: $(hdrdir)/ruby/internal/intern/array.h
+escape.o: $(hdrdir)/ruby/internal/intern/bignum.h
+escape.o: $(hdrdir)/ruby/internal/intern/class.h
+escape.o: $(hdrdir)/ruby/internal/intern/compar.h
+escape.o: $(hdrdir)/ruby/internal/intern/complex.h
+escape.o: $(hdrdir)/ruby/internal/intern/cont.h
+escape.o: $(hdrdir)/ruby/internal/intern/dir.h
+escape.o: $(hdrdir)/ruby/internal/intern/enum.h
+escape.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+escape.o: $(hdrdir)/ruby/internal/intern/error.h
+escape.o: $(hdrdir)/ruby/internal/intern/eval.h
+escape.o: $(hdrdir)/ruby/internal/intern/file.h
+escape.o: $(hdrdir)/ruby/internal/intern/gc.h
+escape.o: $(hdrdir)/ruby/internal/intern/hash.h
+escape.o: $(hdrdir)/ruby/internal/intern/io.h
+escape.o: $(hdrdir)/ruby/internal/intern/load.h
+escape.o: $(hdrdir)/ruby/internal/intern/marshal.h
+escape.o: $(hdrdir)/ruby/internal/intern/numeric.h
+escape.o: $(hdrdir)/ruby/internal/intern/object.h
+escape.o: $(hdrdir)/ruby/internal/intern/parse.h
+escape.o: $(hdrdir)/ruby/internal/intern/proc.h
+escape.o: $(hdrdir)/ruby/internal/intern/process.h
+escape.o: $(hdrdir)/ruby/internal/intern/random.h
+escape.o: $(hdrdir)/ruby/internal/intern/range.h
+escape.o: $(hdrdir)/ruby/internal/intern/rational.h
+escape.o: $(hdrdir)/ruby/internal/intern/re.h
+escape.o: $(hdrdir)/ruby/internal/intern/ruby.h
+escape.o: $(hdrdir)/ruby/internal/intern/select.h
+escape.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+escape.o: $(hdrdir)/ruby/internal/intern/signal.h
+escape.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+escape.o: $(hdrdir)/ruby/internal/intern/string.h
+escape.o: $(hdrdir)/ruby/internal/intern/struct.h
+escape.o: $(hdrdir)/ruby/internal/intern/thread.h
+escape.o: $(hdrdir)/ruby/internal/intern/time.h
+escape.o: $(hdrdir)/ruby/internal/intern/variable.h
+escape.o: $(hdrdir)/ruby/internal/intern/vm.h
+escape.o: $(hdrdir)/ruby/internal/interpreter.h
+escape.o: $(hdrdir)/ruby/internal/iterator.h
+escape.o: $(hdrdir)/ruby/internal/memory.h
+escape.o: $(hdrdir)/ruby/internal/method.h
+escape.o: $(hdrdir)/ruby/internal/module.h
+escape.o: $(hdrdir)/ruby/internal/newobj.h
+escape.o: $(hdrdir)/ruby/internal/rgengc.h
+escape.o: $(hdrdir)/ruby/internal/scan_args.h
+escape.o: $(hdrdir)/ruby/internal/special_consts.h
+escape.o: $(hdrdir)/ruby/internal/static_assert.h
+escape.o: $(hdrdir)/ruby/internal/stdalign.h
+escape.o: $(hdrdir)/ruby/internal/stdbool.h
+escape.o: $(hdrdir)/ruby/internal/symbol.h
+escape.o: $(hdrdir)/ruby/internal/value.h
+escape.o: $(hdrdir)/ruby/internal/value_type.h
+escape.o: $(hdrdir)/ruby/internal/variable.h
+escape.o: $(hdrdir)/ruby/internal/warning_push.h
+escape.o: $(hdrdir)/ruby/internal/xmalloc.h
escape.o: $(hdrdir)/ruby/missing.h
escape.o: $(hdrdir)/ruby/onigmo.h
escape.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/cgi/escape/escape.c b/ext/cgi/escape/escape.c
index 47188819cd..c5b76de596 100644
--- a/ext/cgi/escape/escape.c
+++ b/ext/cgi/escape/escape.c
@@ -32,11 +32,21 @@ preserve_original_state(VALUE orig, VALUE dest)
rb_enc_associate(dest, rb_enc_get(orig));
}
+static inline long
+escaped_length(VALUE str)
+{
+ const long len = RSTRING_LEN(str);
+ if (len >= LONG_MAX / HTML_ESCAPE_MAX_LEN) {
+ ruby_malloc_size_overflow(len, HTML_ESCAPE_MAX_LEN);
+ }
+ return len * HTML_ESCAPE_MAX_LEN;
+}
+
static VALUE
optimized_escape_html(VALUE str)
{
VALUE vbuf;
- char *buf = ALLOCV_N(char, vbuf, RSTRING_LEN(str) * HTML_ESCAPE_MAX_LEN);
+ char *buf = ALLOCV_N(char, vbuf, escaped_length(str));
const char *cstr = RSTRING_PTR(str);
const char *end = cstr + RSTRING_LEN(str);
@@ -71,8 +81,8 @@ optimized_unescape_html(VALUE str)
enum {UNICODE_MAX = 0x10ffff};
rb_encoding *enc = rb_enc_get(str);
unsigned long charlimit = (strcasecmp(rb_enc_name(enc), "UTF-8") == 0 ? UNICODE_MAX :
- strcasecmp(rb_enc_name(enc), "ISO-8859-1") == 0 ? 256 :
- 128);
+ strcasecmp(rb_enc_name(enc), "ISO-8859-1") == 0 ? 256 :
+ 128);
long i, len, beg = 0;
size_t clen, plen;
int overflow;
@@ -84,89 +94,89 @@ optimized_unescape_html(VALUE str)
cstr = RSTRING_PTR(str);
for (i = 0; i < len; i++) {
- unsigned long cc;
- char c = cstr[i];
- if (c != '&') continue;
- plen = i - beg;
- if (++i >= len) break;
- c = (unsigned char)cstr[i];
+ unsigned long cc;
+ char c = cstr[i];
+ if (c != '&') continue;
+ plen = i - beg;
+ if (++i >= len) break;
+ c = (unsigned char)cstr[i];
#define MATCH(s) (len - i >= (int)rb_strlen_lit(s) && \
- memcmp(&cstr[i], s, rb_strlen_lit(s)) == 0 && \
- (i += rb_strlen_lit(s) - 1, 1))
- switch (c) {
- case 'a':
- ++i;
- if (MATCH("pos;")) {
- c = '\'';
- }
- else if (MATCH("mp;")) {
- c = '&';
- }
- else continue;
- break;
- case 'q':
- ++i;
- if (MATCH("uot;")) {
- c = '"';
- }
- else continue;
- break;
- case 'g':
- ++i;
- if (MATCH("t;")) {
- c = '>';
- }
- else continue;
- break;
- case 'l':
- ++i;
- if (MATCH("t;")) {
- c = '<';
- }
- else continue;
- break;
- case '#':
- if (len - ++i >= 2 && ISDIGIT(cstr[i])) {
- cc = ruby_scan_digits(&cstr[i], len-i, 10, &clen, &overflow);
- }
- else if ((cstr[i] == 'x' || cstr[i] == 'X') && len - ++i >= 2 && ISXDIGIT(cstr[i])) {
- cc = ruby_scan_digits(&cstr[i], len-i, 16, &clen, &overflow);
- }
- else continue;
- i += clen;
- if (overflow || cc >= charlimit || cstr[i] != ';') continue;
- if (!dest) {
- dest = rb_str_buf_new(len);
- }
- rb_str_cat(dest, cstr + beg, plen);
- if (charlimit > 256) {
- rb_str_cat(dest, buf, rb_enc_mbcput((OnigCodePoint)cc, buf, enc));
- }
- else {
- c = (unsigned char)cc;
- rb_str_cat(dest, &c, 1);
- }
- beg = i + 1;
- continue;
- default:
- --i;
- continue;
- }
- if (!dest) {
- dest = rb_str_buf_new(len);
- }
- rb_str_cat(dest, cstr + beg, plen);
- rb_str_cat(dest, &c, 1);
- beg = i + 1;
+ memcmp(&cstr[i], s, rb_strlen_lit(s)) == 0 && \
+ (i += rb_strlen_lit(s) - 1, 1))
+ switch (c) {
+ case 'a':
+ ++i;
+ if (MATCH("pos;")) {
+ c = '\'';
+ }
+ else if (MATCH("mp;")) {
+ c = '&';
+ }
+ else continue;
+ break;
+ case 'q':
+ ++i;
+ if (MATCH("uot;")) {
+ c = '"';
+ }
+ else continue;
+ break;
+ case 'g':
+ ++i;
+ if (MATCH("t;")) {
+ c = '>';
+ }
+ else continue;
+ break;
+ case 'l':
+ ++i;
+ if (MATCH("t;")) {
+ c = '<';
+ }
+ else continue;
+ break;
+ case '#':
+ if (len - ++i >= 2 && ISDIGIT(cstr[i])) {
+ cc = ruby_scan_digits(&cstr[i], len-i, 10, &clen, &overflow);
+ }
+ else if ((cstr[i] == 'x' || cstr[i] == 'X') && len - ++i >= 2 && ISXDIGIT(cstr[i])) {
+ cc = ruby_scan_digits(&cstr[i], len-i, 16, &clen, &overflow);
+ }
+ else continue;
+ i += clen;
+ if (overflow || cc >= charlimit || cstr[i] != ';') continue;
+ if (!dest) {
+ dest = rb_str_buf_new(len);
+ }
+ rb_str_cat(dest, cstr + beg, plen);
+ if (charlimit > 256) {
+ rb_str_cat(dest, buf, rb_enc_mbcput((OnigCodePoint)cc, buf, enc));
+ }
+ else {
+ c = (unsigned char)cc;
+ rb_str_cat(dest, &c, 1);
+ }
+ beg = i + 1;
+ continue;
+ default:
+ --i;
+ continue;
+ }
+ if (!dest) {
+ dest = rb_str_buf_new(len);
+ }
+ rb_str_cat(dest, cstr + beg, plen);
+ rb_str_cat(dest, &c, 1);
+ beg = i + 1;
}
if (dest) {
- rb_str_cat(dest, cstr + beg, len - beg);
- preserve_original_state(str, dest);
- return dest;
+ rb_str_cat(dest, cstr + beg, len - beg);
+ preserve_original_state(str, dest);
+ return dest;
}
else {
- return rb_str_dup(str);
+ return rb_str_dup(str);
}
}
@@ -190,7 +200,7 @@ url_unreserved_char(unsigned char c)
}
static VALUE
-optimized_escape(VALUE str)
+optimized_escape(VALUE str, int plus_escape)
{
long i, len, beg = 0;
VALUE dest = 0;
@@ -201,38 +211,38 @@ optimized_escape(VALUE str)
cstr = RSTRING_PTR(str);
for (i = 0; i < len; ++i) {
- const unsigned char c = (unsigned char)cstr[i];
- if (!url_unreserved_char(c)) {
- if (!dest) {
- dest = rb_str_buf_new(len);
- }
-
- rb_str_cat(dest, cstr + beg, i - beg);
- beg = i + 1;
-
- if (c == ' ') {
- rb_str_cat_cstr(dest, "+");
- }
- else {
- buf[1] = upper_hexdigits[(c >> 4) & 0xf];
- buf[2] = upper_hexdigits[c & 0xf];
- rb_str_cat(dest, buf, 3);
- }
- }
+ const unsigned char c = (unsigned char)cstr[i];
+ if (!url_unreserved_char(c)) {
+ if (!dest) {
+ dest = rb_str_buf_new(len);
+ }
+
+ rb_str_cat(dest, cstr + beg, i - beg);
+ beg = i + 1;
+
+ if (plus_escape && c == ' ') {
+ rb_str_cat_cstr(dest, "+");
+ }
+ else {
+ buf[1] = upper_hexdigits[(c >> 4) & 0xf];
+ buf[2] = upper_hexdigits[c & 0xf];
+ rb_str_cat(dest, buf, 3);
+ }
+ }
}
if (dest) {
- rb_str_cat(dest, cstr + beg, len - beg);
- preserve_original_state(str, dest);
- return dest;
+ rb_str_cat(dest, cstr + beg, len - beg);
+ preserve_original_state(str, dest);
+ return dest;
}
else {
- return rb_str_dup(str);
+ return rb_str_dup(str);
}
}
static VALUE
-optimized_unescape(VALUE str, VALUE encoding)
+optimized_unescape(VALUE str, VALUE encoding, int unescape_plus)
{
long i, len, beg = 0;
VALUE dest = 0;
@@ -244,52 +254,52 @@ optimized_unescape(VALUE str, VALUE encoding)
cstr = RSTRING_PTR(str);
for (i = 0; i < len; ++i) {
- char buf[1];
- const char c = cstr[i];
- int clen = 0;
- if (c == '%') {
- if (i + 3 > len) break;
- if (!ISXDIGIT(cstr[i+1])) continue;
- if (!ISXDIGIT(cstr[i+2])) continue;
- buf[0] = ((char_to_number(cstr[i+1]) << 4)
- | char_to_number(cstr[i+2]));
- clen = 2;
- }
- else if (c == '+') {
- buf[0] = ' ';
- }
- else {
- continue;
- }
-
- if (!dest) {
- dest = rb_str_buf_new(len);
- }
-
- rb_str_cat(dest, cstr + beg, i - beg);
- i += clen;
- beg = i + 1;
-
- rb_str_cat(dest, buf, 1);
+ char buf[1];
+ const char c = cstr[i];
+ int clen = 0;
+ if (c == '%') {
+ if (i + 3 > len) break;
+ if (!ISXDIGIT(cstr[i+1])) continue;
+ if (!ISXDIGIT(cstr[i+2])) continue;
+ buf[0] = ((char_to_number(cstr[i+1]) << 4)
+ | char_to_number(cstr[i+2]));
+ clen = 2;
+ }
+ else if (unescape_plus && c == '+') {
+ buf[0] = ' ';
+ }
+ else {
+ continue;
+ }
+
+ if (!dest) {
+ dest = rb_str_buf_new(len);
+ }
+
+ rb_str_cat(dest, cstr + beg, i - beg);
+ i += clen;
+ beg = i + 1;
+
+ rb_str_cat(dest, buf, 1);
}
if (dest) {
- rb_str_cat(dest, cstr + beg, len - beg);
- preserve_original_state(str, dest);
- cr = ENC_CODERANGE_UNKNOWN;
+ rb_str_cat(dest, cstr + beg, len - beg);
+ preserve_original_state(str, dest);
+ cr = ENC_CODERANGE_UNKNOWN;
}
else {
- dest = rb_str_dup(str);
- cr = ENC_CODERANGE(str);
+ dest = rb_str_dup(str);
+ cr = ENC_CODERANGE(str);
}
origenc = rb_enc_get_index(str);
if (origenc != encidx) {
- rb_enc_associate_index(dest, encidx);
- if (!ENC_CODERANGE_CLEAN_P(rb_enc_str_coderange(dest))) {
- rb_enc_associate_index(dest, origenc);
- if (cr != ENC_CODERANGE_UNKNOWN)
- ENC_CODERANGE_SET(dest, cr);
- }
+ rb_enc_associate_index(dest, encidx);
+ if (!ENC_CODERANGE_CLEAN_P(rb_enc_str_coderange(dest))) {
+ rb_enc_associate_index(dest, origenc);
+ if (cr != ENC_CODERANGE_UNKNOWN)
+ ENC_CODERANGE_SET(dest, cr);
+ }
}
return dest;
}
@@ -307,10 +317,10 @@ cgiesc_escape_html(VALUE self, VALUE str)
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
- return optimized_escape_html(str);
+ return optimized_escape_html(str);
}
else {
- return rb_call_super(1, &str);
+ return rb_call_super(1, &str);
}
}
@@ -327,10 +337,10 @@ cgiesc_unescape_html(VALUE self, VALUE str)
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
- return optimized_unescape_html(str);
+ return optimized_unescape_html(str);
}
else {
- return rb_call_super(1, &str);
+ return rb_call_super(1, &str);
}
}
@@ -338,7 +348,7 @@ cgiesc_unescape_html(VALUE self, VALUE str)
* call-seq:
* CGI.escape(string) -> string
*
- * Returns URL-escaped string.
+ * Returns URL-escaped string (+application/x-www-form-urlencoded+).
*
*/
static VALUE
@@ -347,10 +357,10 @@ cgiesc_escape(VALUE self, VALUE str)
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
- return optimized_escape(str);
+ return optimized_escape(str, 1);
}
else {
- return rb_call_super(1, &str);
+ return rb_call_super(1, &str);
}
}
@@ -358,7 +368,7 @@ static VALUE
accept_charset(int argc, VALUE *argv, VALUE self)
{
if (argc > 0)
- return argv[0];
+ return argv[0];
return rb_cvar_get(CLASS_OF(self), id_accept_charset);
}
@@ -366,7 +376,7 @@ accept_charset(int argc, VALUE *argv, VALUE self)
* call-seq:
* CGI.unescape(string, encoding=@@accept_charset) -> string
*
- * Returns URL-unescaped string.
+ * Returns URL-unescaped string (+application/x-www-form-urlencoded+).
*
*/
static VALUE
@@ -377,17 +387,64 @@ cgiesc_unescape(int argc, VALUE *argv, VALUE self)
StringValue(str);
if (rb_enc_str_asciicompat_p(str)) {
- VALUE enc = accept_charset(argc-1, argv+1, self);
- return optimized_unescape(str, enc);
+ VALUE enc = accept_charset(argc-1, argv+1, self);
+ return optimized_unescape(str, enc, 1);
}
else {
- return rb_call_super(argc, argv);
+ return rb_call_super(argc, argv);
+ }
+}
+
+/*
+ * call-seq:
+ * CGI.escapeURIComponent(string) -> string
+ *
+ * Returns URL-escaped string following RFC 3986.
+ *
+ */
+static VALUE
+cgiesc_escape_uri_component(VALUE self, VALUE str)
+{
+ StringValue(str);
+
+ if (rb_enc_str_asciicompat_p(str)) {
+ return optimized_escape(str, 0);
+ }
+ else {
+ return rb_call_super(1, &str);
+ }
+}
+
+/*
+ * call-seq:
+ * CGI.unescapeURIComponent(string, encoding=@@accept_charset) -> string
+ *
+ * Returns URL-unescaped string following RFC 3986.
+ *
+ */
+static VALUE
+cgiesc_unescape_uri_component(int argc, VALUE *argv, VALUE self)
+{
+ VALUE str = (rb_check_arity(argc, 1, 2), argv[0]);
+
+ StringValue(str);
+
+ if (rb_enc_str_asciicompat_p(str)) {
+ VALUE enc = accept_charset(argc-1, argv+1, self);
+ return optimized_unescape(str, enc, 0);
+ }
+ else {
+ return rb_call_super(argc, argv);
}
}
void
Init_escape(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
id_accept_charset = rb_intern_const("@@accept_charset");
InitVM(escape);
}
@@ -400,6 +457,8 @@ InitVM_escape(void)
rb_mUtil = rb_define_module_under(rb_cCGI, "Util");
rb_define_method(rb_mEscape, "escapeHTML", cgiesc_escape_html, 1);
rb_define_method(rb_mEscape, "unescapeHTML", cgiesc_unescape_html, 1);
+ rb_define_method(rb_mEscape, "escapeURIComponent", cgiesc_escape_uri_component, 1);
+ rb_define_method(rb_mEscape, "unescapeURIComponent", cgiesc_unescape_uri_component, -1);
rb_define_method(rb_mEscape, "escape", cgiesc_escape, 1);
rb_define_method(rb_mEscape, "unescape", cgiesc_unescape, -1);
rb_prepend_module(rb_mUtil, rb_mEscape);
diff --git a/ext/continuation/depend b/ext/continuation/depend
index 08844aa6bb..81218f9965 100644
--- a/ext/continuation/depend
+++ b/ext/continuation/depend
@@ -3,8 +3,156 @@ continuation.o: $(RUBY_EXTCONF_H)
continuation.o: $(arch_hdrdir)/ruby/config.h
continuation.o: $(hdrdir)/ruby/assert.h
continuation.o: $(hdrdir)/ruby/backward.h
+continuation.o: $(hdrdir)/ruby/backward/2/assume.h
+continuation.o: $(hdrdir)/ruby/backward/2/attributes.h
+continuation.o: $(hdrdir)/ruby/backward/2/bool.h
+continuation.o: $(hdrdir)/ruby/backward/2/inttypes.h
+continuation.o: $(hdrdir)/ruby/backward/2/limits.h
+continuation.o: $(hdrdir)/ruby/backward/2/long_long.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdalign.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdarg.h
continuation.o: $(hdrdir)/ruby/defines.h
continuation.o: $(hdrdir)/ruby/intern.h
+continuation.o: $(hdrdir)/ruby/internal/abi.h
+continuation.o: $(hdrdir)/ruby/internal/anyargs.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+continuation.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+continuation.o: $(hdrdir)/ruby/internal/assume.h
+continuation.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+continuation.o: $(hdrdir)/ruby/internal/attr/artificial.h
+continuation.o: $(hdrdir)/ruby/internal/attr/cold.h
+continuation.o: $(hdrdir)/ruby/internal/attr/const.h
+continuation.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+continuation.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+continuation.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+continuation.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+continuation.o: $(hdrdir)/ruby/internal/attr/error.h
+continuation.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+continuation.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+continuation.o: $(hdrdir)/ruby/internal/attr/format.h
+continuation.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+continuation.o: $(hdrdir)/ruby/internal/attr/noalias.h
+continuation.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+continuation.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+continuation.o: $(hdrdir)/ruby/internal/attr/noinline.h
+continuation.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+continuation.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+continuation.o: $(hdrdir)/ruby/internal/attr/pure.h
+continuation.o: $(hdrdir)/ruby/internal/attr/restrict.h
+continuation.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+continuation.o: $(hdrdir)/ruby/internal/attr/warning.h
+continuation.o: $(hdrdir)/ruby/internal/attr/weakref.h
+continuation.o: $(hdrdir)/ruby/internal/cast.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+continuation.o: $(hdrdir)/ruby/internal/compiler_since.h
+continuation.o: $(hdrdir)/ruby/internal/config.h
+continuation.o: $(hdrdir)/ruby/internal/constant_p.h
+continuation.o: $(hdrdir)/ruby/internal/core.h
+continuation.o: $(hdrdir)/ruby/internal/core/rarray.h
+continuation.o: $(hdrdir)/ruby/internal/core/rbasic.h
+continuation.o: $(hdrdir)/ruby/internal/core/rbignum.h
+continuation.o: $(hdrdir)/ruby/internal/core/rclass.h
+continuation.o: $(hdrdir)/ruby/internal/core/rdata.h
+continuation.o: $(hdrdir)/ruby/internal/core/rfile.h
+continuation.o: $(hdrdir)/ruby/internal/core/rhash.h
+continuation.o: $(hdrdir)/ruby/internal/core/robject.h
+continuation.o: $(hdrdir)/ruby/internal/core/rregexp.h
+continuation.o: $(hdrdir)/ruby/internal/core/rstring.h
+continuation.o: $(hdrdir)/ruby/internal/core/rstruct.h
+continuation.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+continuation.o: $(hdrdir)/ruby/internal/ctype.h
+continuation.o: $(hdrdir)/ruby/internal/dllexport.h
+continuation.o: $(hdrdir)/ruby/internal/dosish.h
+continuation.o: $(hdrdir)/ruby/internal/error.h
+continuation.o: $(hdrdir)/ruby/internal/eval.h
+continuation.o: $(hdrdir)/ruby/internal/event.h
+continuation.o: $(hdrdir)/ruby/internal/fl_type.h
+continuation.o: $(hdrdir)/ruby/internal/gc.h
+continuation.o: $(hdrdir)/ruby/internal/glob.h
+continuation.o: $(hdrdir)/ruby/internal/globals.h
+continuation.o: $(hdrdir)/ruby/internal/has/attribute.h
+continuation.o: $(hdrdir)/ruby/internal/has/builtin.h
+continuation.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+continuation.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+continuation.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+continuation.o: $(hdrdir)/ruby/internal/has/extension.h
+continuation.o: $(hdrdir)/ruby/internal/has/feature.h
+continuation.o: $(hdrdir)/ruby/internal/has/warning.h
+continuation.o: $(hdrdir)/ruby/internal/intern/array.h
+continuation.o: $(hdrdir)/ruby/internal/intern/bignum.h
+continuation.o: $(hdrdir)/ruby/internal/intern/class.h
+continuation.o: $(hdrdir)/ruby/internal/intern/compar.h
+continuation.o: $(hdrdir)/ruby/internal/intern/complex.h
+continuation.o: $(hdrdir)/ruby/internal/intern/cont.h
+continuation.o: $(hdrdir)/ruby/internal/intern/dir.h
+continuation.o: $(hdrdir)/ruby/internal/intern/enum.h
+continuation.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+continuation.o: $(hdrdir)/ruby/internal/intern/error.h
+continuation.o: $(hdrdir)/ruby/internal/intern/eval.h
+continuation.o: $(hdrdir)/ruby/internal/intern/file.h
+continuation.o: $(hdrdir)/ruby/internal/intern/gc.h
+continuation.o: $(hdrdir)/ruby/internal/intern/hash.h
+continuation.o: $(hdrdir)/ruby/internal/intern/io.h
+continuation.o: $(hdrdir)/ruby/internal/intern/load.h
+continuation.o: $(hdrdir)/ruby/internal/intern/marshal.h
+continuation.o: $(hdrdir)/ruby/internal/intern/numeric.h
+continuation.o: $(hdrdir)/ruby/internal/intern/object.h
+continuation.o: $(hdrdir)/ruby/internal/intern/parse.h
+continuation.o: $(hdrdir)/ruby/internal/intern/proc.h
+continuation.o: $(hdrdir)/ruby/internal/intern/process.h
+continuation.o: $(hdrdir)/ruby/internal/intern/random.h
+continuation.o: $(hdrdir)/ruby/internal/intern/range.h
+continuation.o: $(hdrdir)/ruby/internal/intern/rational.h
+continuation.o: $(hdrdir)/ruby/internal/intern/re.h
+continuation.o: $(hdrdir)/ruby/internal/intern/ruby.h
+continuation.o: $(hdrdir)/ruby/internal/intern/select.h
+continuation.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+continuation.o: $(hdrdir)/ruby/internal/intern/signal.h
+continuation.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+continuation.o: $(hdrdir)/ruby/internal/intern/string.h
+continuation.o: $(hdrdir)/ruby/internal/intern/struct.h
+continuation.o: $(hdrdir)/ruby/internal/intern/thread.h
+continuation.o: $(hdrdir)/ruby/internal/intern/time.h
+continuation.o: $(hdrdir)/ruby/internal/intern/variable.h
+continuation.o: $(hdrdir)/ruby/internal/intern/vm.h
+continuation.o: $(hdrdir)/ruby/internal/interpreter.h
+continuation.o: $(hdrdir)/ruby/internal/iterator.h
+continuation.o: $(hdrdir)/ruby/internal/memory.h
+continuation.o: $(hdrdir)/ruby/internal/method.h
+continuation.o: $(hdrdir)/ruby/internal/module.h
+continuation.o: $(hdrdir)/ruby/internal/newobj.h
+continuation.o: $(hdrdir)/ruby/internal/rgengc.h
+continuation.o: $(hdrdir)/ruby/internal/scan_args.h
+continuation.o: $(hdrdir)/ruby/internal/special_consts.h
+continuation.o: $(hdrdir)/ruby/internal/static_assert.h
+continuation.o: $(hdrdir)/ruby/internal/stdalign.h
+continuation.o: $(hdrdir)/ruby/internal/stdbool.h
+continuation.o: $(hdrdir)/ruby/internal/symbol.h
+continuation.o: $(hdrdir)/ruby/internal/value.h
+continuation.o: $(hdrdir)/ruby/internal/value_type.h
+continuation.o: $(hdrdir)/ruby/internal/variable.h
+continuation.o: $(hdrdir)/ruby/internal/warning_push.h
+continuation.o: $(hdrdir)/ruby/internal/xmalloc.h
continuation.o: $(hdrdir)/ruby/missing.h
continuation.o: $(hdrdir)/ruby/ruby.h
continuation.o: $(hdrdir)/ruby/st.h
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index 8503c9d6c6..4578de54e4 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -8,102 +8,222 @@
************************************************/
+#include "gc.h"
+#include "internal/hash.h"
+#include "internal/thread.h"
+#include "internal/sanitizers.h"
#include "ruby.h"
#include "vm_core.h"
-#include "gc.h"
+static enum {
+ IDLE,
+ SUSPENDED,
+ RUNNING
+} current_state = IDLE;
static int current_mode;
static VALUE me2counter = Qnil;
/*
+ * call-seq: Coverage.supported?(mode) -> true or false
+ *
+ * Returns true if coverage measurement is supported for the given mode.
+ *
+ * The mode should be one of the following symbols:
+ * +:lines+, +:branches+, +:methods+, +:eval+.
+ *
+ * Example:
+ *
+ * Coverage.supported?(:lines) #=> true
+ * Coverage.supported?(:all) #=> false
+ */
+static VALUE
+rb_coverage_supported(VALUE self, VALUE _mode)
+{
+ ID mode = RB_SYM2ID(_mode);
+
+ return RBOOL(
+ mode == rb_intern("lines") ||
+ mode == rb_intern("branches") ||
+ mode == rb_intern("methods") ||
+ mode == rb_intern("eval")
+ );
+}
+
+/*
* call-seq:
- * Coverage.start => nil
+ * Coverage.setup => nil
+ * Coverage.setup(:all) => nil
+ * Coverage.setup(lines: bool, branches: bool, methods: bool, eval: bool) => nil
+ * Coverage.setup(oneshot_lines: true) => nil
+ *
+ * Set up the coverage measurement.
*
- * Enables coverage measurement.
+ * Note that this method does not start the measurement itself.
+ * Use Coverage.resume to start the measurement.
+ *
+ * You may want to use Coverage.start to setup and then start the measurement.
*/
static VALUE
-rb_coverage_start(int argc, VALUE *argv, VALUE klass)
+rb_coverage_setup(int argc, VALUE *argv, VALUE klass)
{
VALUE coverages, opt;
int mode;
+ if (current_state != IDLE) {
+ rb_raise(rb_eRuntimeError, "coverage measurement is already setup");
+ }
+
rb_scan_args(argc, argv, "01", &opt);
if (argc == 0) {
- mode = 0; /* compatible mode */
+ mode = 0; /* compatible mode */
}
else if (opt == ID2SYM(rb_intern("all"))) {
- mode = COVERAGE_TARGET_LINES | COVERAGE_TARGET_BRANCHES | COVERAGE_TARGET_METHODS;
+ mode = COVERAGE_TARGET_LINES | COVERAGE_TARGET_BRANCHES | COVERAGE_TARGET_METHODS | COVERAGE_TARGET_EVAL;
}
else {
- mode = 0;
- opt = rb_convert_type(opt, T_HASH, "Hash", "to_hash");
-
- if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("lines")))))
- mode |= COVERAGE_TARGET_LINES;
- if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("branches")))))
- mode |= COVERAGE_TARGET_BRANCHES;
- if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("methods")))))
- mode |= COVERAGE_TARGET_METHODS;
+ mode = 0;
+ opt = rb_convert_type(opt, T_HASH, "Hash", "to_hash");
+
+ if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("lines")))))
+ mode |= COVERAGE_TARGET_LINES;
+ if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("branches")))))
+ mode |= COVERAGE_TARGET_BRANCHES;
+ if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("methods")))))
+ mode |= COVERAGE_TARGET_METHODS;
if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("oneshot_lines"))))) {
if (mode & COVERAGE_TARGET_LINES)
rb_raise(rb_eRuntimeError, "cannot enable lines and oneshot_lines simultaneously");
mode |= COVERAGE_TARGET_LINES;
mode |= COVERAGE_TARGET_ONESHOT_LINES;
}
+ if (RTEST(rb_hash_lookup(opt, ID2SYM(rb_intern("eval")))))
+ mode |= COVERAGE_TARGET_EVAL;
}
if (mode & COVERAGE_TARGET_METHODS) {
me2counter = rb_ident_hash_new();
}
else {
- me2counter = Qnil;
+ me2counter = Qnil;
}
coverages = rb_get_coverages();
if (!RTEST(coverages)) {
- coverages = rb_hash_new();
- rb_obj_hide(coverages);
- current_mode = mode;
- if (mode == 0) mode = COVERAGE_TARGET_LINES;
- rb_set_coverages(coverages, mode, me2counter);
+ coverages = rb_hash_new();
+ rb_obj_hide(coverages);
+ current_mode = mode;
+ if (mode == 0) mode = COVERAGE_TARGET_LINES;
+ rb_set_coverages(coverages, mode, me2counter);
+ current_state = SUSPENDED;
}
else if (current_mode != mode) {
- rb_raise(rb_eRuntimeError, "cannot change the measuring target during coverage measurement");
+ rb_raise(rb_eRuntimeError, "cannot change the measuring target during coverage measurement");
+ }
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * Coverage.resume => nil
+ *
+ * Start/resume the coverage measurement.
+ *
+ * Caveat: Currently, only process-global coverage measurement is supported.
+ * You cannot measure per-thread coverage. If your process has multiple thread,
+ * using Coverage.resume/suspend to capture code coverage executed from only
+ * a limited code block, may yield misleading results.
+ */
+VALUE
+rb_coverage_resume(VALUE klass)
+{
+ if (current_state == IDLE) {
+ rb_raise(rb_eRuntimeError, "coverage measurement is not set up yet");
+ }
+ if (current_state == RUNNING) {
+ rb_raise(rb_eRuntimeError, "coverage measurement is already running");
}
+ rb_resume_coverages();
+ current_state = RUNNING;
return Qnil;
}
+/*
+ * call-seq:
+ * Coverage.start => nil
+ * Coverage.start(:all) => nil
+ * Coverage.start(lines: bool, branches: bool, methods: bool, eval: bool) => nil
+ * Coverage.start(oneshot_lines: true) => nil
+ *
+ * Enables the coverage measurement.
+ * See the documentation of Coverage class in detail.
+ * This is equivalent to Coverage.setup and Coverage.resume.
+ */
+static VALUE
+rb_coverage_start(int argc, VALUE *argv, VALUE klass)
+{
+ rb_coverage_setup(argc, argv, klass);
+ rb_coverage_resume(klass);
+ return Qnil;
+}
+
+struct branch_coverage_result_builder
+{
+ int id;
+ VALUE result;
+ VALUE children;
+ VALUE counters;
+};
+
+static int
+branch_coverage_ii(VALUE _key, VALUE branch, VALUE v)
+{
+ struct branch_coverage_result_builder *b = (struct branch_coverage_result_builder *) v;
+
+ VALUE target_label = RARRAY_AREF(branch, 0);
+ VALUE target_first_lineno = RARRAY_AREF(branch, 1);
+ VALUE target_first_column = RARRAY_AREF(branch, 2);
+ VALUE target_last_lineno = RARRAY_AREF(branch, 3);
+ VALUE target_last_column = RARRAY_AREF(branch, 4);
+ long counter_idx = FIX2LONG(RARRAY_AREF(branch, 5));
+ rb_hash_aset(b->children, rb_ary_new_from_args(6, target_label, LONG2FIX(b->id++), target_first_lineno, target_first_column, target_last_lineno, target_last_column), RARRAY_AREF(b->counters, counter_idx));
+
+ return ST_CONTINUE;
+}
+
+static int
+branch_coverage_i(VALUE _key, VALUE branch_base, VALUE v)
+{
+ struct branch_coverage_result_builder *b = (struct branch_coverage_result_builder *) v;
+
+ VALUE base_type = RARRAY_AREF(branch_base, 0);
+ VALUE base_first_lineno = RARRAY_AREF(branch_base, 1);
+ VALUE base_first_column = RARRAY_AREF(branch_base, 2);
+ VALUE base_last_lineno = RARRAY_AREF(branch_base, 3);
+ VALUE base_last_column = RARRAY_AREF(branch_base, 4);
+ VALUE branches = RARRAY_AREF(branch_base, 5);
+ VALUE children = rb_hash_new();
+ rb_hash_aset(b->result, rb_ary_new_from_args(6, base_type, LONG2FIX(b->id++), base_first_lineno, base_first_column, base_last_lineno, base_last_column), children);
+ b->children = children;
+ rb_hash_foreach(branches, branch_coverage_ii, v);
+
+ return ST_CONTINUE;
+}
+
static VALUE
branch_coverage(VALUE branches)
{
- VALUE ret = rb_hash_new();
- VALUE structure = rb_ary_dup(RARRAY_AREF(branches, 0));
- VALUE counters = rb_ary_dup(RARRAY_AREF(branches, 1));
- int i, j;
- long id = 0;
-
- for (i = 0; i < RARRAY_LEN(structure); i++) {
- VALUE branches = RARRAY_AREF(structure, i);
- VALUE base_type = RARRAY_AREF(branches, 0);
- VALUE base_first_lineno = RARRAY_AREF(branches, 1);
- VALUE base_first_column = RARRAY_AREF(branches, 2);
- VALUE base_last_lineno = RARRAY_AREF(branches, 3);
- VALUE base_last_column = RARRAY_AREF(branches, 4);
- VALUE children = rb_hash_new();
- rb_hash_aset(ret, rb_ary_new_from_args(6, base_type, LONG2FIX(id++), base_first_lineno, base_first_column, base_last_lineno, base_last_column), children);
- for (j = 5; j < RARRAY_LEN(branches); j += 6) {
- VALUE target_label = RARRAY_AREF(branches, j);
- VALUE target_first_lineno = RARRAY_AREF(branches, j + 1);
- VALUE target_first_column = RARRAY_AREF(branches, j + 2);
- VALUE target_last_lineno = RARRAY_AREF(branches, j + 3);
- VALUE target_last_column = RARRAY_AREF(branches, j + 4);
- int idx = FIX2INT(RARRAY_AREF(branches, j + 5));
- rb_hash_aset(children, rb_ary_new_from_args(6, target_label, LONG2FIX(id++), target_first_lineno, target_first_column, target_last_lineno, target_last_column), RARRAY_AREF(counters, idx));
- }
- }
+ VALUE structure = RARRAY_AREF(branches, 0);
+
+ struct branch_coverage_result_builder b;
+ b.id = 0;
+ b.result = rb_hash_new();
+ b.counters = RARRAY_AREF(branches, 1);
- return ret;
+ rb_hash_foreach(structure, branch_coverage_i, (VALUE)&b);
+
+ return b.result;
}
static int
@@ -122,45 +242,52 @@ method_coverage_i(void *vstart, void *vend, size_t stride, void *data)
VALUE ncoverages = *(VALUE*)data, v;
for (v = (VALUE)vstart; v != (VALUE)vend; v += stride) {
- if (RB_TYPE_P(v, T_IMEMO) && imemo_type(v) == imemo_ment) {
- const rb_method_entry_t *me = (rb_method_entry_t *) v;
- VALUE path, first_lineno, first_column, last_lineno, last_column;
- VALUE data[5], ncoverage, methods;
- VALUE methods_id = ID2SYM(rb_intern("methods"));
- VALUE klass;
- const rb_method_entry_t *me2 = rb_resolve_me_location(me, data);
- if (me != me2) continue;
- klass = me->owner;
- if (RB_TYPE_P(klass, T_ICLASS)) {
- rb_bug("T_ICLASS");
- }
- path = data[0];
- first_lineno = data[1];
- first_column = data[2];
- last_lineno = data[3];
- last_column = data[4];
- if (FIX2LONG(first_lineno) <= 0) continue;
- ncoverage = rb_hash_aref(ncoverages, path);
- if (NIL_P(ncoverage)) continue;
- methods = rb_hash_aref(ncoverage, methods_id);
-
- {
- VALUE method_id = ID2SYM(me->def->original_id);
- VALUE rcount = rb_hash_aref(me2counter, (VALUE) me);
- VALUE key = rb_ary_new_from_args(6, klass, method_id, first_lineno, first_column, last_lineno, last_column);
- VALUE rcount2 = rb_hash_aref(methods, key);
-
- if (NIL_P(rcount)) rcount = LONG2FIX(0);
- if (NIL_P(rcount2)) rcount2 = LONG2FIX(0);
- if (!POSFIXABLE(FIX2LONG(rcount) + FIX2LONG(rcount2))) {
- rcount = LONG2FIX(FIXNUM_MAX);
- }
- else {
- rcount = LONG2FIX(FIX2LONG(rcount) + FIX2LONG(rcount2));
- }
- rb_hash_aset(methods, key, rcount);
- }
- }
+ void *poisoned = asan_poisoned_object_p(v);
+ asan_unpoison_object(v, false);
+
+ if (RB_TYPE_P(v, T_IMEMO) && imemo_type(v) == imemo_ment) {
+ const rb_method_entry_t *me = (rb_method_entry_t *) v;
+ VALUE path, first_lineno, first_column, last_lineno, last_column;
+ VALUE data[5], ncoverage, methods;
+ VALUE methods_id = ID2SYM(rb_intern("methods"));
+ VALUE klass;
+ const rb_method_entry_t *me2 = rb_resolve_me_location(me, data);
+ if (me != me2) continue;
+ klass = me->owner;
+ if (RB_TYPE_P(klass, T_ICLASS)) {
+ rb_bug("T_ICLASS");
+ }
+ path = data[0];
+ first_lineno = data[1];
+ first_column = data[2];
+ last_lineno = data[3];
+ last_column = data[4];
+ if (FIX2LONG(first_lineno) <= 0) continue;
+ ncoverage = rb_hash_aref(ncoverages, path);
+ if (NIL_P(ncoverage)) continue;
+ methods = rb_hash_aref(ncoverage, methods_id);
+
+ {
+ VALUE method_id = ID2SYM(me->def->original_id);
+ VALUE rcount = rb_hash_aref(me2counter, (VALUE) me);
+ VALUE key = rb_ary_new_from_args(6, klass, method_id, first_lineno, first_column, last_lineno, last_column);
+ VALUE rcount2 = rb_hash_aref(methods, key);
+
+ if (NIL_P(rcount)) rcount = LONG2FIX(0);
+ if (NIL_P(rcount2)) rcount2 = LONG2FIX(0);
+ if (!POSFIXABLE(FIX2LONG(rcount) + FIX2LONG(rcount2))) {
+ rcount = LONG2FIX(FIXNUM_MAX);
+ }
+ else {
+ rcount = LONG2FIX(FIX2LONG(rcount) + FIX2LONG(rcount2));
+ }
+ rb_hash_aset(methods, key, rcount);
+ }
+ }
+
+ if (poisoned) {
+ asan_poison_object(v);
+ }
}
return 0;
}
@@ -172,32 +299,32 @@ coverage_peek_result_i(st_data_t key, st_data_t val, st_data_t h)
VALUE coverage = (VALUE)val;
VALUE coverages = (VALUE)h;
if (current_mode == 0) {
- /* compatible mode */
- VALUE lines = rb_ary_dup(RARRAY_AREF(coverage, COVERAGE_INDEX_LINES));
- rb_ary_freeze(lines);
- coverage = lines;
+ /* compatible mode */
+ VALUE lines = rb_ary_dup(RARRAY_AREF(coverage, COVERAGE_INDEX_LINES));
+ rb_ary_freeze(lines);
+ coverage = lines;
}
else {
- VALUE h = rb_hash_new();
+ VALUE h = rb_hash_new();
- if (current_mode & COVERAGE_TARGET_LINES) {
- VALUE lines = RARRAY_AREF(coverage, COVERAGE_INDEX_LINES);
+ if (current_mode & COVERAGE_TARGET_LINES) {
+ VALUE lines = RARRAY_AREF(coverage, COVERAGE_INDEX_LINES);
const char *kw = (current_mode & COVERAGE_TARGET_ONESHOT_LINES) ? "oneshot_lines" : "lines";
- lines = rb_ary_dup(lines);
- rb_ary_freeze(lines);
+ lines = rb_ary_dup(lines);
+ rb_ary_freeze(lines);
rb_hash_aset(h, ID2SYM(rb_intern(kw)), lines);
- }
+ }
- if (current_mode & COVERAGE_TARGET_BRANCHES) {
- VALUE branches = RARRAY_AREF(coverage, COVERAGE_INDEX_BRANCHES);
- rb_hash_aset(h, ID2SYM(rb_intern("branches")), branch_coverage(branches));
- }
+ if (current_mode & COVERAGE_TARGET_BRANCHES) {
+ VALUE branches = RARRAY_AREF(coverage, COVERAGE_INDEX_BRANCHES);
+ rb_hash_aset(h, ID2SYM(rb_intern("branches")), branch_coverage(branches));
+ }
- if (current_mode & COVERAGE_TARGET_METHODS) {
- rb_hash_aset(h, ID2SYM(rb_intern("methods")), rb_hash_new());
- }
+ if (current_mode & COVERAGE_TARGET_METHODS) {
+ rb_hash_aset(h, ID2SYM(rb_intern("methods")), rb_hash_new());
+ }
- coverage = h;
+ coverage = h;
}
rb_hash_aset(coverages, path, coverage);
@@ -222,12 +349,13 @@ rb_coverage_peek_result(VALUE klass)
VALUE coverages = rb_get_coverages();
VALUE ncoverages = rb_hash_new();
if (!RTEST(coverages)) {
- rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
+ rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
}
- st_foreach(RHASH_TBL(coverages), coverage_peek_result_i, ncoverages);
+ OBJ_WB_UNPROTECT(coverages);
+ st_foreach(RHASH_TBL_RAW(coverages), coverage_peek_result_i, ncoverages);
if (current_mode & COVERAGE_TARGET_METHODS) {
- rb_objspace_each_objects(method_coverage_i, &ncoverages);
+ rb_objspace_each_objects(method_coverage_i, &ncoverages);
}
rb_hash_freeze(ncoverages);
@@ -243,6 +371,24 @@ clear_me2counter_i(VALUE key, VALUE value, VALUE unused)
}
/*
+ * call-seq:
+ * Coverage.suspend => nil
+ *
+ * Suspend the coverage measurement.
+ * You can use Coverage.resume to restart the measurement.
+ */
+VALUE
+rb_coverage_suspend(VALUE klass)
+{
+ if (current_state != RUNNING) {
+ rb_raise(rb_eRuntimeError, "coverage measurement is not running");
+ }
+ rb_suspend_coverages();
+ current_state = SUSPENDED;
+ return Qnil;
+}
+
+/*
* call-seq:
* Coverage.result(stop: true, clear: true) => hash
*
@@ -257,6 +403,10 @@ rb_coverage_result(int argc, VALUE *argv, VALUE klass)
VALUE opt;
int stop = 1, clear = 1;
+ if (current_state == IDLE) {
+ rb_raise(rb_eRuntimeError, "coverage measurement is not enabled");
+ }
+
rb_scan_args(argc, argv, "01", &opt);
if (argc == 1) {
@@ -275,8 +425,12 @@ rb_coverage_result(int argc, VALUE *argv, VALUE klass)
if (!NIL_P(me2counter)) rb_hash_foreach(me2counter, clear_me2counter_i, Qnil);
}
if (stop) {
+ if (current_state == RUNNING) {
+ rb_coverage_suspend(klass);
+ }
rb_reset_coverages();
me2counter = Qnil;
+ current_state = IDLE;
}
return ncoverages;
}
@@ -284,6 +438,23 @@ rb_coverage_result(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
+ * Coverage.state => :idle, :suspended, :running
+ *
+ * Returns the state of the coverage measurement.
+ */
+static VALUE
+rb_coverage_state(VALUE klass)
+{
+ switch (current_state) {
+ case IDLE: return ID2SYM(rb_intern("idle"));
+ case SUSPENDED: return ID2SYM(rb_intern("suspended"));
+ case RUNNING: return ID2SYM(rb_intern("running"));
+ }
+ return Qnil;
+}
+
+/*
+ * call-seq:
* Coverage.running? => bool
*
* Returns true if coverage stats are currently being collected (after
@@ -292,13 +463,15 @@ rb_coverage_result(int argc, VALUE *argv, VALUE klass)
static VALUE
rb_coverage_running(VALUE klass)
{
- VALUE coverages = rb_get_coverages();
- return RTEST(coverages) ? Qtrue : Qfalse;
+ return current_state == RUNNING ? Qtrue : Qfalse;
}
/* Coverage provides coverage measurement feature for Ruby.
* This feature is experimental, so these APIs may be changed in future.
*
+ * Caveat: Currently, only process-global coverage measurement is supported.
+ * You cannot measure per-thread coverage.
+ *
* = Usage
*
* 1. require "coverage"
@@ -309,7 +482,7 @@ rb_coverage_running(VALUE klass)
* number of line execution by the interpreter. A +nil+ value means
* coverage is disabled for this line (lines like +else+ and +end+).
*
- * = Example
+ * = Examples
*
* [foo.rb]
* s = 0
@@ -328,14 +501,131 @@ rb_coverage_running(VALUE klass)
* Coverage.start
* require "foo.rb"
* p Coverage.result #=> {"foo.rb"=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]}
+ *
+ * == Lines Coverage
+ *
+ * If a coverage mode is not explicitly specified when starting coverage, lines
+ * coverage is what will run. It reports the number of line executions for each
+ * line.
+ *
+ * require "coverage"
+ * Coverage.start(lines: true)
+ * require "foo.rb"
+ * p Coverage.result #=> {"foo.rb"=>{:lines=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]}}
+ *
+ * The value of the lines coverage result is an array containing how many times
+ * each line was executed. Order in this array is important. For example, the
+ * first item in this array, at index 0, reports how many times line 1 of this
+ * file was executed while coverage was run (which, in this example, is one
+ * time).
+ *
+ * A +nil+ value means coverage is disabled for this line (lines like +else+
+ * and +end+).
+ *
+ * == Oneshot Lines Coverage
+ *
+ * Oneshot lines coverage tracks and reports on the executed lines while
+ * coverage is running. It will not report how many times a line was executed,
+ * only that it was executed.
+ *
+ * require "coverage"
+ * Coverage.start(oneshot_lines: true)
+ * require "foo.rb"
+ * p Coverage.result #=> {"foo.rb"=>{:oneshot_lines=>[1, 2, 3, 6, 7]}}
+ *
+ * The value of the oneshot lines coverage result is an array containing the
+ * line numbers that were executed.
+ *
+ * == Branches Coverage
+ *
+ * Branches coverage reports how many times each branch within each conditional
+ * was executed.
+ *
+ * require "coverage"
+ * Coverage.start(branches: true)
+ * require "foo.rb"
+ * p Coverage.result #=> {"foo.rb"=>{:branches=>{[:if, 0, 6, 0, 10, 3]=>{[:then, 1, 7, 2, 7, 7]=>1, [:else, 2, 9, 2, 9, 7]=>0}}}}
+ *
+ * Each entry within the branches hash is a conditional, the value of which is
+ * another hash where each entry is a branch in that conditional. The values
+ * are the number of times the method was executed, and the keys are identifying
+ * information about the branch.
+ *
+ * The information that makes up each key identifying branches or conditionals
+ * is the following, from left to right:
+ *
+ * 1. A label for the type of branch or conditional.
+ * 2. A unique identifier.
+ * 3. The starting line number it appears on in the file.
+ * 4. The starting column number it appears on in the file.
+ * 5. The ending line number it appears on in the file.
+ * 6. The ending column number it appears on in the file.
+ *
+ * == Methods Coverage
+ *
+ * Methods coverage reports how many times each method was executed.
+ *
+ * [foo_method.rb]
+ * class Greeter
+ * def greet
+ * "welcome!"
+ * end
+ * end
+ *
+ * def hello
+ * "Hi"
+ * end
+ *
+ * hello()
+ * Greeter.new.greet()
+ * [EOF]
+ *
+ * require "coverage"
+ * Coverage.start(methods: true)
+ * require "foo_method.rb"
+ * p Coverage.result #=> {"foo_method.rb"=>{:methods=>{[Object, :hello, 7, 0, 9, 3]=>1, [Greeter, :greet, 2, 2, 4, 5]=>1}}}
+ *
+ * Each entry within the methods hash represents a method. The values in this
+ * hash are the number of times the method was executed, and the keys are
+ * identifying information about the method.
+ *
+ * The information that makes up each key identifying a method is the following,
+ * from left to right:
+ *
+ * 1. The class.
+ * 2. The method name.
+ * 3. The starting line number the method appears on in the file.
+ * 4. The starting column number the method appears on in the file.
+ * 5. The ending line number the method appears on in the file.
+ * 6. The ending column number the method appears on in the file.
+ *
+ * == All Coverage Modes
+ *
+ * You can also run all modes of coverage simultaneously with this shortcut.
+ * Note that running all coverage modes does not run both lines and oneshot
+ * lines. Those modes cannot be run simultaneously. Lines coverage is run in
+ * this case, because you can still use it to determine whether or not a line
+ * was executed.
+ *
+ * require "coverage"
+ * Coverage.start(:all)
+ * require "foo.rb"
+ * p Coverage.result #=> {"foo.rb"=>{:lines=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil], :branches=>{[:if, 0, 6, 0, 10, 3]=>{[:then, 1, 7, 2, 7, 7]=>1, [:else, 2, 9, 2, 9, 7]=>0}}, :methods=>{}}}
*/
void
Init_coverage(void)
{
VALUE rb_mCoverage = rb_define_module("Coverage");
+
+ rb_define_singleton_method(rb_mCoverage, "supported?", rb_coverage_supported, 1);
+
+ rb_define_module_function(rb_mCoverage, "setup", rb_coverage_setup, -1);
rb_define_module_function(rb_mCoverage, "start", rb_coverage_start, -1);
+ rb_define_module_function(rb_mCoverage, "resume", rb_coverage_resume, 0);
+ rb_define_module_function(rb_mCoverage, "suspend", rb_coverage_suspend, 0);
rb_define_module_function(rb_mCoverage, "result", rb_coverage_result, -1);
rb_define_module_function(rb_mCoverage, "peek_result", rb_coverage_peek_result, 0);
+ rb_define_module_function(rb_mCoverage, "state", rb_coverage_state, 0);
rb_define_module_function(rb_mCoverage, "running?", rb_coverage_running, 0);
rb_global_variable(&me2counter);
}
diff --git a/ext/coverage/depend b/ext/coverage/depend
index 20b76be04c..e7fab16484 100644
--- a/ext/coverage/depend
+++ b/ext/coverage/depend
@@ -3,9 +3,159 @@ coverage.o: $(RUBY_EXTCONF_H)
coverage.o: $(arch_hdrdir)/ruby/config.h
coverage.o: $(hdrdir)/ruby.h
coverage.o: $(hdrdir)/ruby/assert.h
+coverage.o: $(hdrdir)/ruby/atomic.h
coverage.o: $(hdrdir)/ruby/backward.h
+coverage.o: $(hdrdir)/ruby/backward/2/assume.h
+coverage.o: $(hdrdir)/ruby/backward/2/attributes.h
+coverage.o: $(hdrdir)/ruby/backward/2/bool.h
+coverage.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+coverage.o: $(hdrdir)/ruby/backward/2/inttypes.h
+coverage.o: $(hdrdir)/ruby/backward/2/limits.h
+coverage.o: $(hdrdir)/ruby/backward/2/long_long.h
+coverage.o: $(hdrdir)/ruby/backward/2/stdalign.h
+coverage.o: $(hdrdir)/ruby/backward/2/stdarg.h
coverage.o: $(hdrdir)/ruby/defines.h
coverage.o: $(hdrdir)/ruby/intern.h
+coverage.o: $(hdrdir)/ruby/internal/abi.h
+coverage.o: $(hdrdir)/ruby/internal/anyargs.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+coverage.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+coverage.o: $(hdrdir)/ruby/internal/assume.h
+coverage.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+coverage.o: $(hdrdir)/ruby/internal/attr/artificial.h
+coverage.o: $(hdrdir)/ruby/internal/attr/cold.h
+coverage.o: $(hdrdir)/ruby/internal/attr/const.h
+coverage.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+coverage.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+coverage.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+coverage.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+coverage.o: $(hdrdir)/ruby/internal/attr/error.h
+coverage.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+coverage.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+coverage.o: $(hdrdir)/ruby/internal/attr/format.h
+coverage.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+coverage.o: $(hdrdir)/ruby/internal/attr/noalias.h
+coverage.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+coverage.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+coverage.o: $(hdrdir)/ruby/internal/attr/noinline.h
+coverage.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+coverage.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+coverage.o: $(hdrdir)/ruby/internal/attr/pure.h
+coverage.o: $(hdrdir)/ruby/internal/attr/restrict.h
+coverage.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+coverage.o: $(hdrdir)/ruby/internal/attr/warning.h
+coverage.o: $(hdrdir)/ruby/internal/attr/weakref.h
+coverage.o: $(hdrdir)/ruby/internal/cast.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+coverage.o: $(hdrdir)/ruby/internal/compiler_since.h
+coverage.o: $(hdrdir)/ruby/internal/config.h
+coverage.o: $(hdrdir)/ruby/internal/constant_p.h
+coverage.o: $(hdrdir)/ruby/internal/core.h
+coverage.o: $(hdrdir)/ruby/internal/core/rarray.h
+coverage.o: $(hdrdir)/ruby/internal/core/rbasic.h
+coverage.o: $(hdrdir)/ruby/internal/core/rbignum.h
+coverage.o: $(hdrdir)/ruby/internal/core/rclass.h
+coverage.o: $(hdrdir)/ruby/internal/core/rdata.h
+coverage.o: $(hdrdir)/ruby/internal/core/rfile.h
+coverage.o: $(hdrdir)/ruby/internal/core/rhash.h
+coverage.o: $(hdrdir)/ruby/internal/core/robject.h
+coverage.o: $(hdrdir)/ruby/internal/core/rregexp.h
+coverage.o: $(hdrdir)/ruby/internal/core/rstring.h
+coverage.o: $(hdrdir)/ruby/internal/core/rstruct.h
+coverage.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+coverage.o: $(hdrdir)/ruby/internal/ctype.h
+coverage.o: $(hdrdir)/ruby/internal/dllexport.h
+coverage.o: $(hdrdir)/ruby/internal/dosish.h
+coverage.o: $(hdrdir)/ruby/internal/error.h
+coverage.o: $(hdrdir)/ruby/internal/eval.h
+coverage.o: $(hdrdir)/ruby/internal/event.h
+coverage.o: $(hdrdir)/ruby/internal/fl_type.h
+coverage.o: $(hdrdir)/ruby/internal/gc.h
+coverage.o: $(hdrdir)/ruby/internal/glob.h
+coverage.o: $(hdrdir)/ruby/internal/globals.h
+coverage.o: $(hdrdir)/ruby/internal/has/attribute.h
+coverage.o: $(hdrdir)/ruby/internal/has/builtin.h
+coverage.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+coverage.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+coverage.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+coverage.o: $(hdrdir)/ruby/internal/has/extension.h
+coverage.o: $(hdrdir)/ruby/internal/has/feature.h
+coverage.o: $(hdrdir)/ruby/internal/has/warning.h
+coverage.o: $(hdrdir)/ruby/internal/intern/array.h
+coverage.o: $(hdrdir)/ruby/internal/intern/bignum.h
+coverage.o: $(hdrdir)/ruby/internal/intern/class.h
+coverage.o: $(hdrdir)/ruby/internal/intern/compar.h
+coverage.o: $(hdrdir)/ruby/internal/intern/complex.h
+coverage.o: $(hdrdir)/ruby/internal/intern/cont.h
+coverage.o: $(hdrdir)/ruby/internal/intern/dir.h
+coverage.o: $(hdrdir)/ruby/internal/intern/enum.h
+coverage.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+coverage.o: $(hdrdir)/ruby/internal/intern/error.h
+coverage.o: $(hdrdir)/ruby/internal/intern/eval.h
+coverage.o: $(hdrdir)/ruby/internal/intern/file.h
+coverage.o: $(hdrdir)/ruby/internal/intern/gc.h
+coverage.o: $(hdrdir)/ruby/internal/intern/hash.h
+coverage.o: $(hdrdir)/ruby/internal/intern/io.h
+coverage.o: $(hdrdir)/ruby/internal/intern/load.h
+coverage.o: $(hdrdir)/ruby/internal/intern/marshal.h
+coverage.o: $(hdrdir)/ruby/internal/intern/numeric.h
+coverage.o: $(hdrdir)/ruby/internal/intern/object.h
+coverage.o: $(hdrdir)/ruby/internal/intern/parse.h
+coverage.o: $(hdrdir)/ruby/internal/intern/proc.h
+coverage.o: $(hdrdir)/ruby/internal/intern/process.h
+coverage.o: $(hdrdir)/ruby/internal/intern/random.h
+coverage.o: $(hdrdir)/ruby/internal/intern/range.h
+coverage.o: $(hdrdir)/ruby/internal/intern/rational.h
+coverage.o: $(hdrdir)/ruby/internal/intern/re.h
+coverage.o: $(hdrdir)/ruby/internal/intern/ruby.h
+coverage.o: $(hdrdir)/ruby/internal/intern/select.h
+coverage.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+coverage.o: $(hdrdir)/ruby/internal/intern/signal.h
+coverage.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+coverage.o: $(hdrdir)/ruby/internal/intern/string.h
+coverage.o: $(hdrdir)/ruby/internal/intern/struct.h
+coverage.o: $(hdrdir)/ruby/internal/intern/thread.h
+coverage.o: $(hdrdir)/ruby/internal/intern/time.h
+coverage.o: $(hdrdir)/ruby/internal/intern/variable.h
+coverage.o: $(hdrdir)/ruby/internal/intern/vm.h
+coverage.o: $(hdrdir)/ruby/internal/interpreter.h
+coverage.o: $(hdrdir)/ruby/internal/iterator.h
+coverage.o: $(hdrdir)/ruby/internal/memory.h
+coverage.o: $(hdrdir)/ruby/internal/method.h
+coverage.o: $(hdrdir)/ruby/internal/module.h
+coverage.o: $(hdrdir)/ruby/internal/newobj.h
+coverage.o: $(hdrdir)/ruby/internal/rgengc.h
+coverage.o: $(hdrdir)/ruby/internal/scan_args.h
+coverage.o: $(hdrdir)/ruby/internal/special_consts.h
+coverage.o: $(hdrdir)/ruby/internal/static_assert.h
+coverage.o: $(hdrdir)/ruby/internal/stdalign.h
+coverage.o: $(hdrdir)/ruby/internal/stdbool.h
+coverage.o: $(hdrdir)/ruby/internal/symbol.h
+coverage.o: $(hdrdir)/ruby/internal/value.h
+coverage.o: $(hdrdir)/ruby/internal/value_type.h
+coverage.o: $(hdrdir)/ruby/internal/variable.h
+coverage.o: $(hdrdir)/ruby/internal/warning_push.h
+coverage.o: $(hdrdir)/ruby/internal/xmalloc.h
coverage.o: $(hdrdir)/ruby/missing.h
coverage.o: $(hdrdir)/ruby/ruby.h
coverage.o: $(hdrdir)/ruby/st.h
@@ -15,12 +165,28 @@ coverage.o: $(top_srcdir)/ccan/check_type/check_type.h
coverage.o: $(top_srcdir)/ccan/container_of/container_of.h
coverage.o: $(top_srcdir)/ccan/list/list.h
coverage.o: $(top_srcdir)/ccan/str/str.h
+coverage.o: $(top_srcdir)/constant.h
coverage.o: $(top_srcdir)/gc.h
+coverage.o: $(top_srcdir)/id_table.h
coverage.o: $(top_srcdir)/internal.h
+coverage.o: $(top_srcdir)/internal/array.h
+coverage.o: $(top_srcdir)/internal/basic_operators.h
+coverage.o: $(top_srcdir)/internal/compilers.h
+coverage.o: $(top_srcdir)/internal/gc.h
+coverage.o: $(top_srcdir)/internal/hash.h
+coverage.o: $(top_srcdir)/internal/imemo.h
+coverage.o: $(top_srcdir)/internal/sanitizers.h
+coverage.o: $(top_srcdir)/internal/serial.h
+coverage.o: $(top_srcdir)/internal/static_assert.h
+coverage.o: $(top_srcdir)/internal/thread.h
+coverage.o: $(top_srcdir)/internal/variable.h
+coverage.o: $(top_srcdir)/internal/vm.h
+coverage.o: $(top_srcdir)/internal/warnings.h
coverage.o: $(top_srcdir)/method.h
coverage.o: $(top_srcdir)/node.h
coverage.o: $(top_srcdir)/ruby_assert.h
coverage.o: $(top_srcdir)/ruby_atomic.h
+coverage.o: $(top_srcdir)/shape.h
coverage.o: $(top_srcdir)/thread_pthread.h
coverage.o: $(top_srcdir)/vm_core.h
coverage.o: $(top_srcdir)/vm_opts.h
diff --git a/ext/date/date.gemspec b/ext/date/date.gemspec
index bd323b7a06..660353ebc5 100644
--- a/ext/date/date.gemspec
+++ b/ext/date/date.gemspec
@@ -1,21 +1,34 @@
# frozen_string_literal: true
+
+version = File.foreach(File.expand_path("../lib/date.rb", __FILE__)).find do |line|
+ /^\s*VERSION\s*=\s*["'](.*)["']/ =~ line and break $1
+end
+
Gem::Specification.new do |s|
s.name = "date"
- s.version = '3.0.0'
+ s.version = version
s.summary = "A subclass of Object includes Comparable module for handling dates."
s.description = "A subclass of Object includes Comparable module for handling dates."
- s.require_path = %w{lib}
- s.files = [
- "lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
- "ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
- "ext/date/zonetab.h", "ext/date/zonetab.list"
- ]
- s.extensions = "ext/date/extconf.rb"
- s.required_ruby_version = ">= 2.4.0"
+ if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
+ s.platform = 'java'
+ # No files shipped, no require path, no-op for now on JRuby
+ else
+ s.require_path = %w{lib}
+
+ s.files = [
+ "README.md",
+ "lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
+ "ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
+ "ext/date/zonetab.h", "ext/date/zonetab.list"
+ ]
+ s.extensions = "ext/date/extconf.rb"
+ end
+
+ s.required_ruby_version = ">= 2.6.0"
s.authors = ["Tadayoshi Funaba"]
s.email = [nil]
s.homepage = "https://github.com/ruby/date"
- s.license = "BSD-2-Clause"
+ s.licenses = ["Ruby", "BSD-2-Clause"]
end
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index ccac90a32e..21367c0ddf 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -11,6 +11,7 @@
#include <sys/time.h>
#endif
+#undef NDEBUG
#define NDEBUG
#include <assert.h>
@@ -26,6 +27,10 @@ static VALUE eDateError;
static VALUE half_days_in_day, day_in_nanoseconds;
static double positive_inf, negative_inf;
+// used by deconstruct_keys
+static VALUE sym_year, sym_month, sym_day, sym_yday, sym_wday;
+static VALUE sym_hour, sym_min, sym_sec, sym_sec_fraction, sym_zone;
+
#define f_boolcast(x) ((x) ? Qtrue : Qfalse)
#define f_abs(x) rb_funcall(x, rb_intern("abs"), 0)
@@ -52,12 +57,15 @@ static double positive_inf, negative_inf;
#define f_add3(x,y,z) f_add(f_add(x, y), z)
#define f_sub3(x,y,z) f_sub(f_sub(x, y), z)
+#define f_frozen_ary(...) rb_obj_freeze(rb_ary_new3(__VA_ARGS__))
+
static VALUE date_initialize(int argc, VALUE *argv, VALUE self);
static VALUE datetime_initialize(int argc, VALUE *argv, VALUE self);
#define RETURN_FALSE_UNLESS_NUMERIC(obj) if(!RTEST(rb_obj_is_kind_of((obj), rb_cNumeric))) return Qfalse
inline static void
-check_numeric(VALUE obj, const char* field) {
+check_numeric(VALUE obj, const char* field)
+{
if(!RTEST(rb_obj_is_kind_of(obj, rb_cNumeric))) {
rb_raise(rb_eTypeError, "invalid %s (not numeric)", field);
}
@@ -462,6 +470,7 @@ c_find_ldoy(int y, double sg, int *rjd, int *ns)
}
#ifndef NDEBUG
+/* :nodoc: */
static int
c_find_fdom(int y, int m, double sg, int *rjd, int *ns)
{
@@ -618,6 +627,7 @@ c_jd_to_weeknum(int jd, int f, double sg, int *ry, int *rw, int *rd)
}
#ifndef NDEBUG
+/* :nodoc: */
static void
c_nth_kday_to_jd(int y, int m, int n, int k, double sg, int *rjd, int *ns)
{
@@ -643,6 +653,7 @@ c_jd_to_wday(int jd)
}
#ifndef NDEBUG
+/* :nodoc: */
static void
c_jd_to_nth_kday(int jd, double sg, int *ry, int *rm, int *rn, int *rk)
{
@@ -755,6 +766,8 @@ c_valid_civil_p(int y, int m, int d, double sg,
if (m < 0)
m += 13;
+ if (m < 1 || m > 12)
+ return 0;
if (d < 0) {
if (!c_find_ldom(y, m, sg, rjd, ns))
return 0;
@@ -819,6 +832,7 @@ c_valid_weeknum_p(int y, int w, int d, int f, double sg,
}
#ifndef NDEBUG
+/* :nodoc: */
static int
c_valid_nth_kday_p(int y, int m, int n, int k, double sg,
int *rm, int *rn, int *rk, int *rjd, int *ns)
@@ -960,6 +974,7 @@ ns_to_day(VALUE n)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
ms_to_sec(VALUE m)
{
@@ -978,6 +993,7 @@ ns_to_sec(VALUE n)
}
#ifndef NDEBUG
+/* :nodoc: */
inline static VALUE
ins_to_day(int n)
{
@@ -1013,6 +1029,7 @@ day_to_sec(VALUE d)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
day_to_ns(VALUE d)
{
@@ -1037,6 +1054,7 @@ sec_to_ns(VALUE s)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
isec_to_ns(int s)
{
@@ -1063,6 +1081,7 @@ div_df(VALUE d, VALUE *f)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
div_sf(VALUE s, VALUE *f)
{
@@ -1497,6 +1516,7 @@ m_df(union DateData *x)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
m_df_in_day(union DateData *x)
{
@@ -1994,6 +2014,7 @@ expect_numeric(VALUE x)
}
#ifndef NDEBUG
+/* :nodoc: */
static void
civil_to_jd(VALUE y, int m, int d, double sg,
VALUE *nth, int *ry,
@@ -2306,6 +2327,7 @@ valid_weeknum_p(VALUE y, int w, int d, int f, double sg,
}
#ifndef NDEBUG
+/* :nodoc: */
static int
valid_nth_kday_p(VALUE y, int m, int n, int k, double sg,
VALUE *nth, int *ry,
@@ -2443,6 +2465,7 @@ valid_jd_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s__valid_jd_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2463,13 +2486,16 @@ date_s__valid_jd_p(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.valid_jd?(jd[, start=Date::ITALY]) -> bool
+ * Date.valid_jd?(jd, start = Date::ITALY) -> true
*
- * Just returns true. It's nonsense, but is for symmetry.
+ * Implemented for compatibility;
+ * returns +true+ unless +jd+ is invalid (i.e., not a Numeric).
*
- * Date.valid_jd?(2451944) #=> true
+ * Date.valid_jd?(2451944) # => true
*
- * See also ::jd.
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * Related: Date.jd.
*/
static VALUE
date_s_valid_jd_p(int argc, VALUE *argv, VALUE klass)
@@ -2529,6 +2555,7 @@ valid_civil_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s__valid_civil_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2551,18 +2578,20 @@ date_s__valid_civil_p(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.valid_civil?(year, month, mday[, start=Date::ITALY]) -> bool
- * Date.valid_date?(year, month, mday[, start=Date::ITALY]) -> bool
+ * Date.valid_civil?(year, month, mday, start = Date::ITALY) -> true or false
+ *
+ * Returns +true+ if the arguments define a valid ordinal date,
+ * +false+ otherwise:
*
- * Returns true if the given calendar date is valid, and false if not.
- * Valid in this context is whether the arguments passed to this
- * method would be accepted by ::new.
+ * Date.valid_date?(2001, 2, 3) # => true
+ * Date.valid_date?(2001, 2, 29) # => false
+ * Date.valid_date?(2001, 2, -1) # => true
*
- * Date.valid_date?(2001,2,3) #=> true
- * Date.valid_date?(2001,2,29) #=> false
- * Date.valid_date?(2001,2,-1) #=> true
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * See also ::jd and ::civil.
+ * Date.valid_date? is an alias for Date.valid_civil?.
+ *
+ * Related: Date.jd, Date.new.
*/
static VALUE
date_s_valid_civil_p(int argc, VALUE *argv, VALUE klass)
@@ -2618,6 +2647,7 @@ valid_ordinal_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s__valid_ordinal_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2639,14 +2669,17 @@ date_s__valid_ordinal_p(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.valid_ordinal?(year, yday[, start=Date::ITALY]) -> bool
+ * Date.valid_ordinal?(year, yday, start = Date::ITALY) -> true or false
+ *
+ * Returns +true+ if the arguments define a valid ordinal date,
+ * +false+ otherwise:
*
- * Returns true if the given ordinal date is valid, and false if not.
+ * Date.valid_ordinal?(2001, 34) # => true
+ * Date.valid_ordinal?(2001, 366) # => false
*
- * Date.valid_ordinal?(2001,34) #=> true
- * Date.valid_ordinal?(2001,366) #=> false
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * See also ::jd and ::ordinal.
+ * Related: Date.jd, Date.ordinal.
*/
static VALUE
date_s_valid_ordinal_p(int argc, VALUE *argv, VALUE klass)
@@ -2701,6 +2734,7 @@ valid_commercial_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s__valid_commercial_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2723,14 +2757,19 @@ date_s__valid_commercial_p(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.valid_commercial?(cwyear, cweek, cwday[, start=Date::ITALY]) -> bool
+ * Date.valid_commercial?(cwyear, cweek, cwday, start = Date::ITALY) -> true or false
+ *
+ * Returns +true+ if the arguments define a valid commercial date,
+ * +false+ otherwise:
+ *
+ * Date.valid_commercial?(2001, 5, 6) # => true
+ * Date.valid_commercial?(2001, 5, 8) # => false
*
- * Returns true if the given week date is valid, and false if not.
+ * See Date.commercial.
*
- * Date.valid_commercial?(2001,5,6) #=> true
- * Date.valid_commercial?(2001,5,8) #=> false
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * See also ::jd and ::commercial.
+ * Related: Date.jd, Date.commercial.
*/
static VALUE
date_s_valid_commercial_p(int argc, VALUE *argv, VALUE klass)
@@ -2757,6 +2796,7 @@ date_s_valid_commercial_p(int argc, VALUE *argv, VALUE klass)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
valid_weeknum_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
{
@@ -2788,6 +2828,7 @@ valid_weeknum_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
}
+/* :nodoc: */
static VALUE
date_s__valid_weeknum_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2808,6 +2849,7 @@ date_s__valid_weeknum_p(int argc, VALUE *argv, VALUE klass)
return valid_weeknum_sub(5, argv2, klass, 1);
}
+/* :nodoc: */
static VALUE
date_s_valid_weeknum_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2859,6 +2901,7 @@ valid_nth_kday_sub(int argc, VALUE *argv, VALUE klass, int need_jd)
}
}
+/* :nodoc: */
static VALUE
date_s__valid_nth_kday_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2879,6 +2922,7 @@ date_s__valid_nth_kday_p(int argc, VALUE *argv, VALUE klass)
return valid_nth_kday_sub(5, argv2, klass, 1);
}
+/* :nodoc: */
static VALUE
date_s_valid_nth_kday_p(int argc, VALUE *argv, VALUE klass)
{
@@ -2901,6 +2945,7 @@ date_s_valid_nth_kday_p(int argc, VALUE *argv, VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static VALUE
date_s_zone_to_diff(VALUE klass, VALUE str)
{
@@ -2910,13 +2955,15 @@ date_s_zone_to_diff(VALUE klass, VALUE str)
/*
* call-seq:
- * Date.julian_leap?(year) -> bool
+ * Date.julian_leap?(year) -> true or false
*
- * Returns true if the given year is a leap year of the proleptic
- * Julian calendar.
+ * Returns +true+ if the given year is a leap year
+ * in the {proleptic Julian calendar}[https://en.wikipedia.org/wiki/Proleptic_Julian_calendar], +false+ otherwise:
*
- * Date.julian_leap?(1900) #=> true
- * Date.julian_leap?(1901) #=> false
+ * Date.julian_leap?(1900) # => true
+ * Date.julian_leap?(1901) # => false
+ *
+ * Related: Date.gregorian_leap?.
*/
static VALUE
date_s_julian_leap_p(VALUE klass, VALUE y)
@@ -2931,14 +2978,17 @@ date_s_julian_leap_p(VALUE klass, VALUE y)
/*
* call-seq:
- * Date.gregorian_leap?(year) -> bool
- * Date.leap?(year) -> bool
+ * Date.gregorian_leap?(year) -> true or false
+ *
+ * Returns +true+ if the given year is a leap year
+ * in the {proleptic Gregorian calendar}[https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar], +false+ otherwise:
+ *
+ * Date.gregorian_leap?(2000) # => true
+ * Date.gregorian_leap?(2001) # => false
*
- * Returns true if the given year is a leap year of the proleptic
- * Gregorian calendar.
+ * Date.leap? is an alias for Date.gregorian_leap?.
*
- * Date.gregorian_leap?(1900) #=> false
- * Date.gregorian_leap?(2000) #=> true
+ * Related: Date.julian_leap?.
*/
static VALUE
date_s_gregorian_leap_p(VALUE klass, VALUE y)
@@ -2970,11 +3020,15 @@ d_lite_memsize(const void *ptr)
return complex_dat_p(dat) ? sizeof(struct ComplexDateData) : sizeof(struct SimpleDateData);
}
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+# define RUBY_TYPED_FROZEN_SHAREABLE 0
+#endif
+
static const rb_data_type_t d_lite_type = {
"Date",
{d_lite_gc_mark, RUBY_TYPED_DEFAULT_FREE, d_lite_memsize,},
0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY|RUBY_TYPED_WB_PROTECTED,
+ RUBY_TYPED_FREE_IMMEDIATELY|RUBY_TYPED_WB_PROTECTED|RUBY_TYPED_FROZEN_SHAREABLE,
};
inline static VALUE
@@ -3087,6 +3141,7 @@ old_to_new(VALUE ajd, VALUE of, VALUE sg,
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s_new_bang(int argc, VALUE *argv, VALUE klass)
{
@@ -3274,16 +3329,29 @@ static VALUE d_lite_plus(VALUE, VALUE);
/*
* call-seq:
- * Date.jd([jd=0[, start=Date::ITALY]]) -> date
+ * Date.jd(jd = 0, start = Date::ITALY) -> date
+ *
+ * Returns a new \Date object formed from the arguments:
+ *
+ * Date.jd(2451944).to_s # => "2001-02-03"
+ * Date.jd(2451945).to_s # => "2001-02-04"
+ * Date.jd(0).to_s # => "-4712-01-01"
+ *
+ * The returned date is:
*
- * Creates a date object denoting the given chronological Julian day
- * number.
+ * - Gregorian, if the argument is greater than or equal to +start+:
*
- * Date.jd(2451944) #=> #<Date: 2001-02-03 ...>
- * Date.jd(2451945) #=> #<Date: 2001-02-04 ...>
- * Date.jd(0) #=> #<Date: -4712-01-01 ...>
+ * Date::ITALY # => 2299161
+ * Date.jd(Date::ITALY).gregorian? # => true
+ * Date.jd(Date::ITALY + 1).gregorian? # => true
*
- * See also ::new.
+ * - Julian, otherwise
+ *
+ * Date.jd(Date::ITALY - 1).julian? # => true
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * Related: Date.new.
*/
static VALUE
date_s_jd(int argc, VALUE *argv, VALUE klass)
@@ -3322,19 +3390,33 @@ date_s_jd(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.ordinal([year=-4712[, yday=1[, start=Date::ITALY]]]) -> date
+ * Date.ordinal(year = -4712, yday = 1, start = Date::ITALY) -> date
+ *
+ * Returns a new \Date object formed fom the arguments.
+ *
+ * With no arguments, returns the date for January 1, -4712:
+ *
+ * Date.ordinal.to_s # => "-4712-01-01"
*
- * Creates a date object denoting the given ordinal date.
+ * With argument +year+, returns the date for January 1 of that year:
*
- * The day of year should be a negative or a positive number (as a
- * relative day from the end of year when negative). It should not be
- * zero.
+ * Date.ordinal(2001).to_s # => "2001-01-01"
+ * Date.ordinal(-2001).to_s # => "-2001-01-01"
*
- * Date.ordinal(2001) #=> #<Date: 2001-01-01 ...>
- * Date.ordinal(2001,34) #=> #<Date: 2001-02-03 ...>
- * Date.ordinal(2001,-1) #=> #<Date: 2001-12-31 ...>
+ * With positive argument +yday+ == +n+,
+ * returns the date for the +nth+ day of the given year:
*
- * See also ::jd and ::new.
+ * Date.ordinal(2001, 14).to_s # => "2001-01-14"
+ *
+ * With negative argument +yday+, counts backward from the end of the year:
+ *
+ * Date.ordinal(2001, -14).to_s # => "2001-12-18"
+ *
+ * Raises an exception if +yday+ is zero or out of range.
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * Related: Date.jd, Date.new.
*/
static VALUE
date_s_ordinal(int argc, VALUE *argv, VALUE klass)
@@ -3382,29 +3464,7 @@ date_s_ordinal(int argc, VALUE *argv, VALUE klass)
}
/*
- * call-seq:
- * Date.civil([year=-4712[, month=1[, mday=1[, start=Date::ITALY]]]]) -> date
- * Date.new([year=-4712[, month=1[, mday=1[, start=Date::ITALY]]]]) -> date
- *
- * Creates a date object denoting the given calendar date.
- *
- * In this class, BCE years are counted astronomically. Thus, the
- * year before the year 1 is the year zero, and the year preceding the
- * year zero is the year -1. The month and the day of month should be
- * a negative or a positive number (as a relative month/day from the
- * end of year/month when negative). They should not be zero.
- *
- * The last argument should be a Julian day number which denotes the
- * day of calendar reform. Date::ITALY (2299161=1582-10-15),
- * Date::ENGLAND (2361222=1752-09-14), Date::GREGORIAN (the proleptic
- * Gregorian calendar) and Date::JULIAN (the proleptic Julian
- * calendar) can be specified as a day of calendar reform.
- *
- * Date.new(2001) #=> #<Date: 2001-01-01 ...>
- * Date.new(2001,2,3) #=> #<Date: 2001-02-03 ...>
- * Date.new(2001,2,-1) #=> #<Date: 2001-02-28 ...>
- *
- * See also ::jd.
+ * Same as Date.new.
*/
static VALUE
date_s_civil(int argc, VALUE *argv, VALUE klass)
@@ -3412,6 +3472,31 @@ date_s_civil(int argc, VALUE *argv, VALUE klass)
return date_initialize(argc, argv, d_lite_s_alloc_simple(klass));
}
+/*
+ * call-seq:
+ * Date.new(year = -4712, month = 1, mday = 1, start = Date::ITALY) -> date
+ *
+ * Returns a new \Date object constructed from the given arguments:
+ *
+ * Date.new(2022).to_s # => "2022-01-01"
+ * Date.new(2022, 2).to_s # => "2022-02-01"
+ * Date.new(2022, 2, 4).to_s # => "2022-02-04"
+ *
+ * Argument +month+ should be in range (1..12) or range (-12..-1);
+ * when the argument is negative, counts backward from the end of the year:
+ *
+ * Date.new(2022, -11, 4).to_s # => "2022-02-04"
+ *
+ * Argument +mday+ should be in range (1..n) or range (-n..-1)
+ * where +n+ is the number of days in the month;
+ * when the argument is negative, counts backward from the end of the month.
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * Date.civil is an alias for Date.new.
+ *
+ * Related: Date.jd.
+ */
static VALUE
date_initialize(int argc, VALUE *argv, VALUE self)
{
@@ -3476,19 +3561,47 @@ date_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * Date.commercial([cwyear=-4712[, cweek=1[, cwday=1[, start=Date::ITALY]]]]) -> date
+ * Date.commercial(cwyear = -4712, cweek = 1, cwday = 1, start = Date::ITALY) -> date
+ *
+ * Returns a new \Date object constructed from the arguments.
+ *
+ * Argument +cwyear+ gives the year, and should be an integer.
*
- * Creates a date object denoting the given week date.
+ * Argument +cweek+ gives the index of the week within the year,
+ * and should be in range (1..53) or (-53..-1);
+ * in some years, 53 or -53 will be out-of-range;
+ * if negative, counts backward from the end of the year:
*
- * The week and the day of week should be a negative or a positive
- * number (as a relative week/day from the end of year/week when
- * negative). They should not be zero.
+ * Date.commercial(2022, 1, 1).to_s # => "2022-01-03"
+ * Date.commercial(2022, 52, 1).to_s # => "2022-12-26"
*
- * Date.commercial(2001) #=> #<Date: 2001-01-01 ...>
- * Date.commercial(2002) #=> #<Date: 2001-12-31 ...>
- * Date.commercial(2001,5,6) #=> #<Date: 2001-02-03 ...>
+ * Argument +cwday+ gives the indes of the weekday within the week,
+ * and should be in range (1..7) or (-7..-1);
+ * 1 or -7 is Monday;
+ * if negative, counts backward from the end of the week:
*
- * See also ::jd and ::new.
+ * Date.commercial(2022, 1, 1).to_s # => "2022-01-03"
+ * Date.commercial(2022, 1, -7).to_s # => "2022-01-03"
+ *
+ * When +cweek+ is 1:
+ *
+ * - If January 1 is a Friday, Saturday, or Sunday,
+ * the first week begins in the week after:
+ *
+ * Date::ABBR_DAYNAMES[Date.new(2023, 1, 1).wday] # => "Sun"
+ * Date.commercial(2023, 1, 1).to_s # => "2023-01-02"
+ Date.commercial(2023, 1, 7).to_s # => "2023-01-08"
+ *
+ * - Otherwise, the first week is the week of January 1,
+ * which may mean some of the days fall on the year before:
+ *
+ * Date::ABBR_DAYNAMES[Date.new(2020, 1, 1).wday] # => "Wed"
+ * Date.commercial(2020, 1, 1).to_s # => "2019-12-30"
+ Date.commercial(2020, 1, 7).to_s # => "2020-01-05"
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * Related: Date.jd, Date.new, Date.ordinal.
*/
static VALUE
date_s_commercial(int argc, VALUE *argv, VALUE klass)
@@ -3540,6 +3653,7 @@ date_s_commercial(int argc, VALUE *argv, VALUE klass)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
date_s_weeknum(int argc, VALUE *argv, VALUE klass)
{
@@ -3589,6 +3703,7 @@ date_s_weeknum(int argc, VALUE *argv, VALUE klass)
return ret;
}
+/* :nodoc: */
static VALUE
date_s_nth_kday(int argc, VALUE *argv, VALUE klass)
{
@@ -3663,11 +3778,14 @@ static void set_sg(union DateData *, double);
/*
* call-seq:
- * Date.today([start=Date::ITALY]) -> date
+ * Date.today(start = Date::ITALY) -> date
*
- * Creates a date object denoting the present day.
+ * Returns a new \Date object constructed from the present date:
+ *
+ * Date.today.to_s # => "2022-07-06"
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * Date.today #=> #<Date: 2011-06-11 ...>
*/
static VALUE
date_s_today(int argc, VALUE *argv, VALUE klass)
@@ -3766,89 +3884,89 @@ rt_complete_frags(VALUE klass, VALUE hash)
VALUE k, a, d;
if (NIL_P(tab)) {
- tab = rb_ary_new3(11,
- rb_ary_new3(2,
+ tab = f_frozen_ary(11,
+ f_frozen_ary(2,
sym("time"),
- rb_ary_new3(3,
+ f_frozen_ary(3,
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
Qnil,
- rb_ary_new3(1,
+ f_frozen_ary(1,
sym("jd"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("ordinal"),
- rb_ary_new3(5,
+ f_frozen_ary(5,
sym("year"),
sym("yday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("civil"),
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("year"),
sym("mon"),
sym("mday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("commercial"),
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("cwyear"),
sym("cweek"),
sym("cwday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("wday"),
- rb_ary_new3(4,
+ f_frozen_ary(4,
sym("wday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("wnum0"),
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("year"),
sym("wnum0"),
sym("wday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
sym("wnum1"),
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("year"),
sym("wnum1"),
sym("wday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
Qnil,
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("cwyear"),
sym("cweek"),
sym("wday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
Qnil,
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("year"),
sym("wnum0"),
sym("cwday"),
sym("hour"),
sym("min"),
sym("sec"))),
- rb_ary_new3(2,
+ f_frozen_ary(2,
Qnil,
- rb_ary_new3(6,
+ f_frozen_ary(6,
sym("year"),
sym("wnum1"),
sym("cwday"),
@@ -4258,16 +4376,20 @@ date_s__strptime_internal(int argc, VALUE *argv, VALUE klass,
/*
* call-seq:
- * Date._strptime(string[, format='%F']) -> hash
+ * Date._strptime(string, format = '%F') -> hash
*
- * Parses the given representation of date and time with the given
- * template, and returns a hash of parsed elements. _strptime does
- * not support specification of flags and width unlike strftime.
+ * Returns a hash of values parsed from +string+
+ * according to the given +format+:
*
- * Date._strptime('2001-02-03', '%Y-%m-%d')
- * #=> {:year=>2001, :mon=>2, :mday=>3}
+ * Date._strptime('2001-02-03', '%Y-%m-%d') # => {:year=>2001, :mon=>2, :mday=>3}
*
- * See also strptime(3) and #strftime.
+ * For other formats, see
+ * {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc].
+ * (Unlike Date.strftime, does not support flags and width.)
+ *
+ * See also {strptime(3)}[https://man7.org/linux/man-pages/man3/strptime.3.html].
+ *
+ * Related: Date.strptime (returns a \Date object).
*/
static VALUE
date_s__strptime(int argc, VALUE *argv, VALUE klass)
@@ -4277,21 +4399,28 @@ date_s__strptime(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.strptime([string='-4712-01-01'[, format='%F'[, start=Date::ITALY]]]) -> date
+ * Date.strptime(string = '-4712-01-01', format = '%F', start = Date::ITALY) -> date
*
- * Parses the given representation of date and time with the given
- * template, and creates a date object. strptime does not support
- * specification of flags and width unlike strftime.
+ * Returns a new \Date object with values parsed from +string+,
+ * according to the given +format+:
*
- * Date.strptime('2001-02-03', '%Y-%m-%d') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('03-02-2001', '%d-%m-%Y') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('2001-034', '%Y-%j') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('2001-W05-6', '%G-W%V-%u') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('2001 04 6', '%Y %U %w') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('2001 05 6', '%Y %W %u') #=> #<Date: 2001-02-03 ...>
- * Date.strptime('sat3feb01', '%a%d%b%y') #=> #<Date: 2001-02-03 ...>
+ * Date.strptime('2001-02-03', '%Y-%m-%d') # => #<Date: 2001-02-03>
+ * Date.strptime('03-02-2001', '%d-%m-%Y') # => #<Date: 2001-02-03>
+ * Date.strptime('2001-034', '%Y-%j') # => #<Date: 2001-02-03>
+ * Date.strptime('2001-W05-6', '%G-W%V-%u') # => #<Date: 2001-02-03>
+ * Date.strptime('2001 04 6', '%Y %U %w') # => #<Date: 2001-02-03>
+ * Date.strptime('2001 05 6', '%Y %W %u') # => #<Date: 2001-02-03>
+ * Date.strptime('sat3feb01', '%a%d%b%y') # => #<Date: 2001-02-03>
*
- * See also strptime(3) and #strftime.
+ * For other formats, see
+ * {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc].
+ * (Unlike Date.strftime, does not support flags and width.)
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ *
+ * See also {strptime(3)}[https://man7.org/linux/man-pages/man3/strptime.3.html].
+ *
+ * Related: Date._strptime (returns a hash).
*/
static VALUE
date_s_strptime(int argc, VALUE *argv, VALUE klass)
@@ -4321,12 +4450,49 @@ date_s_strptime(int argc, VALUE *argv, VALUE klass)
VALUE date__parse(VALUE str, VALUE comp);
+static size_t
+get_limit(VALUE opt)
+{
+ if (!NIL_P(opt)) {
+ VALUE limit = rb_hash_aref(opt, ID2SYM(rb_intern("limit")));
+ if (NIL_P(limit)) return SIZE_MAX;
+ return NUM2SIZET(limit);
+ }
+ return 128;
+}
+
+#ifndef HAVE_RB_CATEGORY_WARN
+#define rb_category_warn(category, fmt) rb_warn(fmt)
+#endif
+
+static void
+check_limit(VALUE str, VALUE opt)
+{
+ size_t slen, limit;
+ if (NIL_P(str)) return;
+ if (SYMBOL_P(str)) {
+ rb_category_warn(RB_WARN_CATEGORY_DEPRECATED,
+ "The ability to parse Symbol is an unintentional bug and is deprecated");
+ str = rb_sym2str(str);
+ }
+
+ StringValue(str);
+ slen = RSTRING_LEN(str);
+ limit = get_limit(opt);
+ if (slen > limit) {
+ rb_raise(rb_eArgError,
+ "string length (%"PRI_SIZE_PREFIX"u) exceeds the limit %"PRI_SIZE_PREFIX"u", slen, limit);
+ }
+}
+
static VALUE
date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
{
- VALUE vstr, vcomp, hash;
+ VALUE vstr, vcomp, hash, opt;
- rb_scan_args(argc, argv, "11", &vstr, &vcomp);
+ rb_scan_args(argc, argv, "11:", &vstr, &vcomp, &opt);
+ if (!NIL_P(opt)) argc--;
+ check_limit(vstr, opt);
StringValue(vstr);
if (!rb_enc_str_asciicompat_p(vstr))
rb_raise(rb_eArgError,
@@ -4341,17 +4507,32 @@ date_s__parse_internal(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date._parse(string[, comp=true]) -> hash
+ * Date._parse(string, comp = true, limit: 128) -> hash
*
- * Parses the given representation of date and time, and returns a
- * hash of parsed elements. This method does not function as a
- * validator.
+ * <b>Note</b>:
+ * This method recognizes many forms in +string+,
+ * but it is not a validator.
+ * For formats, see
+ * {"Specialized Format Strings" in Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings]
*
- * If the optional second argument is true and the detected year is in
- * the range "00" to "99", considers the year a 2-digit form and makes
- * it full.
+ * If +string+ does not specify a valid date,
+ * the result is unpredictable;
+ * consider using Date._strptime instead.
+ *
+ * Returns a hash of values parsed from +string+:
+ *
+ * Date._parse('2001-02-03') # => {:year=>2001, :mon=>2, :mday=>3}
+ *
+ * If +comp+ is +true+ and the given year is in the range <tt>(0..99)</tt>,
+ * the current century is supplied;
+ * otherwise, the year is taken as given:
*
- * Date._parse('2001-02-03') #=> {:year=>2001, :mon=>2, :mday=>3}
+ * Date._parse('01-02-03', true) # => {:year=>2001, :mon=>2, :mday=>3}
+ * Date._parse('01-02-03', false) # => {:year=>1, :mon=>2, :mday=>3}
+ *
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date.parse(returns a \Date object).
*/
static VALUE
date_s__parse(int argc, VALUE *argv, VALUE klass)
@@ -4361,25 +4542,44 @@ date_s__parse(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * Date.parse(string='-4712-01-01'[, comp=true[, start=Date::ITALY]]) -> date
+ * Date.parse(string = '-4712-01-01', comp = true, start = Date::ITALY, limit: 128) -> date
*
- * Parses the given representation of date and time, and creates a
- * date object. This method does not function as a validator.
+ * <b>Note</b>:
+ * This method recognizes many forms in +string+,
+ * but it is not a validator.
+ * For formats, see
+ * {"Specialized Format Strings" in Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings]
+ * If +string+ does not specify a valid date,
+ * the result is unpredictable;
+ * consider using Date._strptime instead.
*
- * If the optional second argument is true and the detected year is in
- * the range "00" to "99", considers the year a 2-digit form and makes
- * it full.
+ * Returns a new \Date object with values parsed from +string+:
+ *
+ * Date.parse('2001-02-03') # => #<Date: 2001-02-03>
+ * Date.parse('20010203') # => #<Date: 2001-02-03>
+ * Date.parse('3rd Feb 2001') # => #<Date: 2001-02-03>
+ *
+ * If +comp+ is +true+ and the given year is in the range <tt>(0..99)</tt>,
+ * the current century is supplied;
+ * otherwise, the year is taken as given:
*
- * Date.parse('2001-02-03') #=> #<Date: 2001-02-03 ...>
- * Date.parse('20010203') #=> #<Date: 2001-02-03 ...>
- * Date.parse('3rd Feb 2001') #=> #<Date: 2001-02-03 ...>
+ * Date.parse('01-02-03', true) # => #<Date: 2001-02-03>
+ * Date.parse('01-02-03', false) # => #<Date: 0001-02-03>
+ *
+ * See:
+ *
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date._parse (returns a hash).
*/
static VALUE
date_s_parse(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, comp, sg;
+ VALUE str, comp, sg, opt;
- rb_scan_args(argc, argv, "03", &str, &comp, &sg);
+ rb_scan_args(argc, argv, "03:", &str, &comp, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4391,11 +4591,12 @@ date_s_parse(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE argv2[2], hash;
-
- argv2[0] = str;
- argv2[1] = comp;
- hash = date_s__parse(2, argv2, klass);
+ int argc2 = 2;
+ VALUE argv2[3], hash;
+ argv2[0] = str;
+ argv2[1] = comp;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__parse(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
@@ -4409,33 +4610,56 @@ VALUE date__jisx0301(VALUE);
/*
* call-seq:
- * Date._iso8601(string) -> hash
+ * Date._iso8601(string, limit: 128) -> hash
*
- * Returns a hash of parsed elements.
+ * Returns a hash of values parsed from +string+, which should contain
+ * an {ISO 8601 formatted date}[rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.iso8601 # => "2001-02-03"
+ * Date._iso8601(s) # => {:mday=>3, :year=>2001, :mon=>2}
+ *
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date.iso8601 (returns a \Date object).
*/
static VALUE
-date_s__iso8601(VALUE klass, VALUE str)
+date_s__iso8601(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__iso8601(str);
}
/*
* call-seq:
- * Date.iso8601(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.iso8601(string = '-4712-01-01', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some typical ISO 8601 formats.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should contain
+ * an {ISO 8601 formatted date}[rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications]:
*
- * Date.iso8601('2001-02-03') #=> #<Date: 2001-02-03 ...>
- * Date.iso8601('20010203') #=> #<Date: 2001-02-03 ...>
- * Date.iso8601('2001-W05-6') #=> #<Date: 2001-02-03 ...>
+ * d = Date.new(2001, 2, 3)
+ * s = d.iso8601 # => "2001-02-03"
+ * Date.iso8601(s) # => #<Date: 2001-02-03>
+ *
+ * See:
+ *
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date._iso8601 (returns a hash).
*/
static VALUE
date_s_iso8601(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4445,38 +4669,68 @@ date_s_iso8601(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__iso8601(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__iso8601(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._rfc3339(string) -> hash
+ * Date._rfc3339(string, limit: 128) -> hash
+ *
+ * Returns a hash of values parsed from +string+, which should be a valid
+ * {RFC 3339 format}[rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
+ * Date._rfc3339(s)
+ * # => {:year=>2001, :mon=>2, :mday=>3, :hour=>0, :min=>0, :sec=>0, :zone=>"+00:00", :offset=>0}
+ *
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
*
- * Returns a hash of parsed elements.
+ * Related: Date.rfc3339 (returns a \Date object).
*/
static VALUE
-date_s__rfc3339(VALUE klass, VALUE str)
+date_s__rfc3339(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__rfc3339(str);
}
/*
* call-seq:
- * Date.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> date
+ * Date.rfc3339(string = '-4712-01-01T00:00:00+00:00', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some typical RFC 3339 formats.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should be a valid
+ * {RFC 3339 format}[rdoc-ref:strftime_formatting.rdoc@RFC+3339+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
+ * Date.rfc3339(s) # => #<Date: 2001-02-03>
+ *
+ * See:
+ *
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
*
- * Date.rfc3339('2001-02-03T04:05:06+07:00') #=> #<Date: 2001-02-03 ...>
+ * Related: Date._rfc3339 (returns a hash).
*/
static VALUE
date_s_rfc3339(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4486,38 +4740,66 @@ date_s_rfc3339(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc3339(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__rfc3339(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._xmlschema(string) -> hash
+ * Date._xmlschema(string, limit: 128) -> hash
*
- * Returns a hash of parsed elements.
+ * Returns a hash of values parsed from +string+, which should be a valid
+ * XML date format:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.xmlschema # => "2001-02-03"
+ * Date._xmlschema(s) # => {:year=>2001, :mon=>2, :mday=>3}
+ *
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date.xmlschema (returns a \Date object).
*/
static VALUE
-date_s__xmlschema(VALUE klass, VALUE str)
+date_s__xmlschema(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__xmlschema(str);
}
/*
* call-seq:
- * Date.xmlschema(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.xmlschema(string = '-4712-01-01', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some typical XML Schema formats.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should be a valid XML date format:
*
- * Date.xmlschema('2001-02-03') #=> #<Date: 2001-02-03 ...>
+ * d = Date.new(2001, 2, 3)
+ * s = d.xmlschema # => "2001-02-03"
+ * Date.xmlschema(s) # => #<Date: 2001-02-03>
+ *
+ * See:
+ *
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date._xmlschema (returns a hash).
*/
static VALUE
date_s_xmlschema(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4527,41 +4809,71 @@ date_s_xmlschema(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__xmlschema(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__xmlschema(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._rfc2822(string) -> hash
- * Date._rfc822(string) -> hash
+ * Date._rfc2822(string, limit: 128) -> hash
+ *
+ * Returns a hash of values parsed from +string+, which should be a valid
+ * {RFC 2822 date format}[rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
+ * Date._rfc2822(s)
+ * # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"+0000", :offset=>0}
+ *
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
*
- * Returns a hash of parsed elements.
+ * Date._rfc822 is an alias for Date._rfc2822.
+ *
+ * Related: Date.rfc2822 (returns a \Date object).
*/
static VALUE
-date_s__rfc2822(VALUE klass, VALUE str)
+date_s__rfc2822(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__rfc2822(str);
}
/*
* call-seq:
- * Date.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> date
- * Date.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> date
+ * Date.rfc2822(string = 'Mon, 1 Jan -4712 00:00:00 +0000', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some typical RFC 2822 formats.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should be a valid
+ * {RFC 2822 date format}[rdoc-ref:strftime_formatting.rdoc@RFC+2822+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
+ * Date.rfc2822(s) # => #<Date: 2001-02-03>
+ *
+ * See:
*
- * Date.rfc2822('Sat, 3 Feb 2001 00:00:00 +0000')
- * #=> #<Date: 2001-02-03 ...>
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Date.rfc822 is an alias for Date.rfc2822.
+ *
+ * Related: Date._rfc2822 (returns a hash).
*/
static VALUE
date_s_rfc2822(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
switch (argc) {
case 0:
@@ -4571,39 +4883,65 @@ date_s_rfc2822(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc2822(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__rfc2822(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._httpdate(string) -> hash
+ * Date._httpdate(string, limit: 128) -> hash
+ *
+ * Returns a hash of values parsed from +string+, which should be a valid
+ * {HTTP date format}[rdoc-ref:strftime_formatting.rdoc@HTTP+Format]:
*
- * Returns a hash of parsed elements.
+ * d = Date.new(2001, 2, 3)
+ * s = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
+ * Date._httpdate(s)
+ * # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"GMT", :offset=>0}
+ *
+ * Related: Date.httpdate (returns a \Date object).
*/
static VALUE
-date_s__httpdate(VALUE klass, VALUE str)
+date_s__httpdate(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__httpdate(str);
}
/*
* call-seq:
- * Date.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=Date::ITALY]) -> date
+ * Date.httpdate(string = 'Mon, 01 Jan -4712 00:00:00 GMT', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some RFC 2616 format.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should be a valid
+ * {HTTP date format}[rdoc-ref:strftime_formatting.rdoc@HTTP+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ s = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
+ Date.httpdate(s) # => #<Date: 2001-02-03>
+ *
+ * See:
*
- * Date.httpdate('Sat, 03 Feb 2001 00:00:00 GMT')
- * #=> #<Date: 2001-02-03 ...>
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date._httpdate (returns a hash).
*/
static VALUE
date_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
switch (argc) {
case 0:
@@ -4613,42 +4951,70 @@ date_s_httpdate(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__httpdate(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__httpdate(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * Date._jisx0301(string) -> hash
+ * Date._jisx0301(string, limit: 128) -> hash
+ *
+ * Returns a hash of values parsed from +string+, which should be a valid
+ * {JIS X 0301 date format}[rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format]:
+ *
+ * d = Date.new(2001, 2, 3)
+ * s = d.jisx0301 # => "H13.02.03"
+ * Date._jisx0301(s) # => {:year=>2001, :mon=>2, :mday=>3}
*
- * Returns a hash of parsed elements.
+ * See argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date.jisx0301 (returns a \Date object).
*/
static VALUE
-date_s__jisx0301(VALUE klass, VALUE str)
+date_s__jisx0301(int argc, VALUE *argv, VALUE klass)
{
+ VALUE str, opt;
+
+ rb_scan_args(argc, argv, "1:", &str, &opt);
+ check_limit(str, opt);
+
return date__jisx0301(str);
}
/*
* call-seq:
- * Date.jisx0301(string='-4712-01-01'[, start=Date::ITALY]) -> date
+ * Date.jisx0301(string = '-4712-01-01', start = Date::ITALY, limit: 128) -> date
*
- * Creates a new Date object by parsing from a string according to
- * some typical JIS X 0301 formats.
+ * Returns a new \Date object with values parsed from +string+,
+ * which should be a valid {JIS X 0301 format}[rdoc-ref:strftime_formatting.rdoc@JIS+X+0301+Format]:
*
- * Date.jisx0301('H13.02.03') #=> #<Date: 2001-02-03 ...>
+ * d = Date.new(2001, 2, 3)
+ * s = d.jisx0301 # => "H13.02.03"
+ * Date.jisx0301(s) # => #<Date: 2001-02-03>
*
* For no-era year, legacy format, Heisei is assumed.
*
- * Date.jisx0301('13.02.03') #=> #<Date: 2001-02-03 ...>
+ * Date.jisx0301('13.02.03') # => #<Date: 2001-02-03>
+ *
+ * See:
+ *
+ * - Argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
+ * - Argument {limit}[rdoc-ref:Date@Argument+limit].
+ *
+ * Related: Date._jisx0301 (returns a hash).
*/
static VALUE
date_s_jisx0301(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -4658,7 +5024,11 @@ date_s_jisx0301(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__jisx0301(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ if (!NIL_P(opt)) argv2[argc2++] = opt;
+ hash = date_s__jisx0301(argc2, argv2, klass);
return d_new_by_frags(klass, hash, sg);
}
}
@@ -4828,6 +5198,7 @@ d_lite_initialize_copy(VALUE copy, VALUE date)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
d_lite_fill(VALUE self)
{
@@ -4917,12 +5288,15 @@ d_lite_mjd(VALUE self)
/*
* call-seq:
- * d.ld -> integer
+ * ld -> integer
*
- * Returns the Lilian day number. This is a whole number, which is
- * adjusted by the offset as the local time.
+ * Returns the
+ * {Lilian day number}[https://en.wikipedia.org/wiki/Lilian_date],
+ * which is the number of days since the beginning of the Gregorian
+ * calendar, October 15, 1582.
+ *
+ * Date.new(2001, 2, 3).ld # => 152784
*
- * Date.new(2001,2,3).ld #=> 152784
*/
static VALUE
d_lite_ld(VALUE self)
@@ -4933,12 +5307,13 @@ d_lite_ld(VALUE self)
/*
* call-seq:
- * d.year -> integer
+ * year -> integer
+ *
+ * Returns the year:
*
- * Returns the year.
+ * Date.new(2001, 2, 3).year # => 2001
+ * (Date.new(1, 1, 1) - 1).year # => 0
*
- * Date.new(2001,2,3).year #=> 2001
- * (Date.new(1,1,1) - 1).year #=> 0
*/
static VALUE
d_lite_year(VALUE self)
@@ -4949,11 +5324,12 @@ d_lite_year(VALUE self)
/*
* call-seq:
- * d.yday -> fixnum
+ * yday -> integer
+ *
+ * Returns the day of the year, in range (1..366):
*
- * Returns the day of the year (1-366).
+ * Date.new(2001, 2, 3).yday # => 34
*
- * Date.new(2001,2,3).yday #=> 34
*/
static VALUE
d_lite_yday(VALUE self)
@@ -4964,12 +5340,13 @@ d_lite_yday(VALUE self)
/*
* call-seq:
- * d.mon -> fixnum
- * d.month -> fixnum
+ * mon -> integer
*
- * Returns the month (1-12).
+ * Returns the month in range (1..12):
*
- * Date.new(2001,2,3).mon #=> 2
+ * Date.new(2001, 2, 3).mon # => 2
+ *
+ * Date#month is an alias for Date#mon.
*/
static VALUE
d_lite_mon(VALUE self)
@@ -4980,12 +5357,13 @@ d_lite_mon(VALUE self)
/*
* call-seq:
- * d.mday -> fixnum
- * d.day -> fixnum
+ * mday -> integer
+ *
+ * Returns the day of the month in range (1..31):
*
- * Returns the day of the month (1-31).
+ * Date.new(2001, 2, 3).mday # => 3
*
- * Date.new(2001,2,3).mday #=> 3
+ * Date#day is an alias for Date#mday.
*/
static VALUE
d_lite_mday(VALUE self)
@@ -4996,11 +5374,12 @@ d_lite_mday(VALUE self)
/*
* call-seq:
- * d.day_fraction -> rational
+ * day_fraction -> rational
+ *
+ * Returns the fractional part of the day in range (Rational(0, 1)...Rational(1, 1)):
*
- * Returns the fractional part of the day.
+ * DateTime.new(2001,2,3,12).day_fraction # => (1/2)
*
- * DateTime.new(2001,2,3,12).day_fraction #=> (1/2)
*/
static VALUE
d_lite_day_fraction(VALUE self)
@@ -5013,12 +5392,14 @@ d_lite_day_fraction(VALUE self)
/*
* call-seq:
- * d.cwyear -> integer
+ * cwyear -> integer
*
- * Returns the calendar week based year.
+ * Returns commercial-date year for +self+
+ * (see Date.commercial):
+ *
+ * Date.new(2001, 2, 3).cwyear # => 2001
+ * Date.new(2000, 1, 1).cwyear # => 1999
*
- * Date.new(2001,2,3).cwyear #=> 2001
- * Date.new(2000,1,1).cwyear #=> 1999
*/
static VALUE
d_lite_cwyear(VALUE self)
@@ -5029,11 +5410,13 @@ d_lite_cwyear(VALUE self)
/*
* call-seq:
- * d.cweek -> fixnum
+ * cweek -> integer
+ *
+ * Returns commercial-date week index for +self+
+ * (see Date.commercial):
*
- * Returns the calendar week number (1-53).
+ * Date.new(2001, 2, 3).cweek # => 5
*
- * Date.new(2001,2,3).cweek #=> 5
*/
static VALUE
d_lite_cweek(VALUE self)
@@ -5044,11 +5427,14 @@ d_lite_cweek(VALUE self)
/*
* call-seq:
- * d.cwday -> fixnum
+ * cwday -> integer
+ *
+ * Returns the commercial-date weekday index for +self+
+ * (see Date.commercial);
+ * 1 is Monday:
*
- * Returns the day of calendar week (1-7, Monday is 1).
+ * Date.new(2001, 2, 3).cwday # => 6
*
- * Date.new(2001,2,3).cwday #=> 6
*/
static VALUE
d_lite_cwday(VALUE self)
@@ -5058,6 +5444,7 @@ d_lite_cwday(VALUE self)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
d_lite_wnum0(VALUE self)
{
@@ -5065,6 +5452,7 @@ d_lite_wnum0(VALUE self)
return INT2FIX(m_wnum0(dat));
}
+/* :nodoc: */
static VALUE
d_lite_wnum1(VALUE self)
{
@@ -5075,11 +5463,12 @@ d_lite_wnum1(VALUE self)
/*
* call-seq:
- * d.wday -> fixnum
+ * wday -> integer
+ *
+ * Returns the day of week in range (0..6); Sunday is 0:
*
- * Returns the day of week (0-6, Sunday is zero).
+ * Date.new(2001, 2, 3).wday # => 6
*
- * Date.new(2001,2,3).wday #=> 6
*/
static VALUE
d_lite_wday(VALUE self)
@@ -5090,9 +5479,9 @@ d_lite_wday(VALUE self)
/*
* call-seq:
- * d.sunday? -> bool
+ * sunday? -> true or false
*
- * Returns true if the date is Sunday.
+ * Returns +true+ if +self+ is a Sunday, +false+ otherwise.
*/
static VALUE
d_lite_sunday_p(VALUE self)
@@ -5103,9 +5492,9 @@ d_lite_sunday_p(VALUE self)
/*
* call-seq:
- * d.monday? -> bool
+ * monday? -> true or false
*
- * Returns true if the date is Monday.
+ * Returns +true+ if +self+ is a Monday, +false+ otherwise.
*/
static VALUE
d_lite_monday_p(VALUE self)
@@ -5116,9 +5505,9 @@ d_lite_monday_p(VALUE self)
/*
* call-seq:
- * d.tuesday? -> bool
+ * tuesday? -> true or false
*
- * Returns true if the date is Tuesday.
+ * Returns +true+ if +self+ is a Tuesday, +false+ otherwise.
*/
static VALUE
d_lite_tuesday_p(VALUE self)
@@ -5129,9 +5518,9 @@ d_lite_tuesday_p(VALUE self)
/*
* call-seq:
- * d.wednesday? -> bool
+ * wednesday? -> true or false
*
- * Returns true if the date is Wednesday.
+ * Returns +true+ if +self+ is a Wednesday, +false+ otherwise.
*/
static VALUE
d_lite_wednesday_p(VALUE self)
@@ -5142,9 +5531,9 @@ d_lite_wednesday_p(VALUE self)
/*
* call-seq:
- * d.thursday? -> bool
+ * thursday? -> true or false
*
- * Returns true if the date is Thursday.
+ * Returns +true+ if +self+ is a Thursday, +false+ otherwise.
*/
static VALUE
d_lite_thursday_p(VALUE self)
@@ -5155,9 +5544,9 @@ d_lite_thursday_p(VALUE self)
/*
* call-seq:
- * d.friday? -> bool
+ * friday? -> true or false
*
- * Returns true if the date is Friday.
+ * Returns +true+ if +self+ is a Friday, +false+ otherwise.
*/
static VALUE
d_lite_friday_p(VALUE self)
@@ -5168,9 +5557,9 @@ d_lite_friday_p(VALUE self)
/*
* call-seq:
- * d.saturday? -> bool
+ * saturday? -> true or false
*
- * Returns true if the date is Saturday.
+ * Returns +true+ if +self+ is a Saturday, +false+ otherwise.
*/
static VALUE
d_lite_saturday_p(VALUE self)
@@ -5180,6 +5569,7 @@ d_lite_saturday_p(VALUE self)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
d_lite_nth_kday_p(VALUE self, VALUE n, VALUE k)
{
@@ -5201,11 +5591,12 @@ d_lite_nth_kday_p(VALUE self, VALUE n, VALUE k)
/*
* call-seq:
- * d.hour -> fixnum
+ * hour -> integer
+ *
+ * Returns the hour in range (0..23):
*
- * Returns the hour (0-23).
+ * DateTime.new(2001, 2, 3, 4, 5, 6).hour # => 4
*
- * DateTime.new(2001,2,3,4,5,6).hour #=> 4
*/
static VALUE
d_lite_hour(VALUE self)
@@ -5216,12 +5607,13 @@ d_lite_hour(VALUE self)
/*
* call-seq:
- * d.min -> fixnum
- * d.minute -> fixnum
+ * min -> integer
+ *
+ * Returns the minute in range (0..59):
*
- * Returns the minute (0-59).
+ * DateTime.new(2001, 2, 3, 4, 5, 6).min # => 5
*
- * DateTime.new(2001,2,3,4,5,6).min #=> 5
+ * Date#minute is an alias for Date#min.
*/
static VALUE
d_lite_min(VALUE self)
@@ -5232,12 +5624,13 @@ d_lite_min(VALUE self)
/*
* call-seq:
- * d.sec -> fixnum
- * d.second -> fixnum
+ * sec -> integer
*
- * Returns the second (0-59).
+ * Returns the second in range (0..59):
*
- * DateTime.new(2001,2,3,4,5,6).sec #=> 6
+ * DateTime.new(2001, 2, 3, 4, 5, 6).sec # => 6
+ *
+ * Date#second is an alias for Date#sec.
*/
static VALUE
d_lite_sec(VALUE self)
@@ -5248,12 +5641,14 @@ d_lite_sec(VALUE self)
/*
* call-seq:
- * d.sec_fraction -> rational
- * d.second_fraction -> rational
+ * sec_fraction -> rational
+ *
+ * Returns the fractional part of the second in range
+ * (Rational(0, 1)...Rational(1, 1)):
*
- * Returns the fractional part of the second.
+ * DateTime.new(2001, 2, 3, 4, 5, 6.5).sec_fraction # => (1/2)
*
- * DateTime.new(2001,2,3,4,5,6.5).sec_fraction #=> (1/2)
+ * Date#second_fraction is an alias for Date#sec_fraction.
*/
static VALUE
d_lite_sec_fraction(VALUE self)
@@ -5294,12 +5689,14 @@ d_lite_zone(VALUE self)
/*
* call-seq:
- * d.julian? -> bool
+ * d.julian? -> true or false
+ *
+ * Returns +true+ if the date is before the date of calendar reform,
+ * +false+ otherwise:
*
- * Returns true if the date is before the day of calendar reform.
+ * (Date.new(1582, 10, 15) - 1).julian? # => true
+ * Date.new(1582, 10, 15).julian? # => false
*
- * Date.new(1582,10,15).julian? #=> false
- * (Date.new(1582,10,15) - 1).julian? #=> true
*/
static VALUE
d_lite_julian_p(VALUE self)
@@ -5310,12 +5707,14 @@ d_lite_julian_p(VALUE self)
/*
* call-seq:
- * d.gregorian? -> bool
+ * gregorian? -> true or false
*
- * Returns true if the date is on or after the day of calendar reform.
+ * Returns +true+ if the date is on or after
+ * the date of calendar reform, +false+ otherwise:
+ *
+ * Date.new(1582, 10, 15).gregorian? # => true
+ * (Date.new(1582, 10, 15) - 1).gregorian? # => false
*
- * Date.new(1582,10,15).gregorian? #=> true
- * (Date.new(1582,10,15) - 1).gregorian? #=> false
*/
static VALUE
d_lite_gregorian_p(VALUE self)
@@ -5326,12 +5725,13 @@ d_lite_gregorian_p(VALUE self)
/*
* call-seq:
- * d.leap? -> bool
+ * leap? -> true or false
+ *
+ * Returns +true+ if the year is a leap year, +false+ otherwise:
*
- * Returns true if the year is a leap year.
+ * Date.new(2000).leap? # => true
+ * Date.new(2001).leap? # => false
*
- * Date.new(2000).leap? #=> true
- * Date.new(2001).leap? #=> false
*/
static VALUE
d_lite_leap_p(VALUE self)
@@ -5350,12 +5750,25 @@ d_lite_leap_p(VALUE self)
/*
* call-seq:
- * d.start -> float
+ * start -> float
+ *
+ * Returns the Julian start date for calendar reform;
+ * if not an infinity, the returned value is suitable
+ * for passing to Date#jd:
*
- * Returns the Julian day number denoting the day of calendar reform.
+ * d = Date.new(2001, 2, 3, Date::ITALY)
+ * s = d.start # => 2299161.0
+ * Date.jd(s).to_s # => "1582-10-15"
+ *
+ * d = Date.new(2001, 2, 3, Date::ENGLAND)
+ * s = d.start # => 2361222.0
+ * Date.jd(s).to_s # => "1752-09-14"
+ *
+ * Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
+ * Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * Date.new(2001,2,3).start #=> 2299161.0
- * Date.new(2001,2,3,Date::GREGORIAN).start #=> -Infinity
*/
static VALUE
d_lite_start(VALUE self)
@@ -5420,12 +5833,17 @@ dup_obj_with_new_start(VALUE obj, double sg)
/*
* call-seq:
- * d.new_start([start=Date::ITALY]) -> date
+ * new_start(start = Date::ITALY]) -> new_date
*
- * Duplicates self and resets its day of calendar reform.
+ * Returns a copy of +self+ with the given +start+ value:
+ *
+ * d0 = Date.new(2000, 2, 3)
+ * d0.julian? # => false
+ * d1 = d0.new_start(Date::JULIAN)
+ * d1.julian? # => true
+ *
+ * See argument {start}[rdoc-ref:calendars.rdoc@Argument+start].
*
- * d = Date.new(1582,10,15)
- * d.new_start(Date::JULIAN) #=> #<Date: 1582-10-05 ...>
*/
static VALUE
d_lite_new_start(int argc, VALUE *argv, VALUE self)
@@ -5444,9 +5862,10 @@ d_lite_new_start(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.italy -> date
+ * italy -> new_date
+ *
+ * Equivalent to Date#new_start with argument Date::ITALY.
*
- * This method is equivalent to new_start(Date::ITALY).
*/
static VALUE
d_lite_italy(VALUE self)
@@ -5456,9 +5875,9 @@ d_lite_italy(VALUE self)
/*
* call-seq:
- * d.england -> date
+ * england -> new_date
*
- * This method is equivalent to new_start(Date::ENGLAND).
+ * Equivalent to Date#new_start with argument Date::ENGLAND.
*/
static VALUE
d_lite_england(VALUE self)
@@ -5468,9 +5887,9 @@ d_lite_england(VALUE self)
/*
* call-seq:
- * d.julian -> date
+ * julian -> new_date
*
- * This method is equivalent to new_start(Date::JULIAN).
+ * Equivalent to Date#new_start with argument Date::JULIAN.
*/
static VALUE
d_lite_julian(VALUE self)
@@ -5480,9 +5899,9 @@ d_lite_julian(VALUE self)
/*
* call-seq:
- * d.gregorian -> date
+ * gregorian -> new_date
*
- * This method is equivalent to new_start(Date::GREGORIAN).
+ * Equivalent to Date#new_start with argument Date::GREGORIAN.
*/
static VALUE
d_lite_gregorian(VALUE self)
@@ -5963,9 +6382,9 @@ d_lite_minus(VALUE self, VALUE other)
/*
* call-seq:
- * d.next_day([n=1]) -> date
+ * next_day(n = 1) -> new_date
*
- * This method is equivalent to d + n.
+ * Equivalent to Date#+ with argument +n+.
*/
static VALUE
d_lite_next_day(int argc, VALUE *argv, VALUE self)
@@ -5980,9 +6399,9 @@ d_lite_next_day(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.prev_day([n=1]) -> date
+ * prev_day(n = 1) -> new_date
*
- * This method is equivalent to d - n.
+ * Equivalent to Date#- with argument +n+.
*/
static VALUE
d_lite_prev_day(int argc, VALUE *argv, VALUE self)
@@ -5997,10 +6416,15 @@ d_lite_prev_day(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.succ -> date
- * d.next -> date
+ * d.next -> new_date
*
- * Returns a date object denoting the following day.
+ * Returns a new \Date object representing the following day:
+ *
+ * d = Date.new(2001, 2, 3)
+ * d.to_s # => "2001-02-03"
+ * d.next.to_s # => "2001-02-04"
+ *
+ * Date#succ is an alias for Date#next.
*/
static VALUE
d_lite_next(VALUE self)
@@ -6010,26 +6434,30 @@ d_lite_next(VALUE self)
/*
* call-seq:
- * d >> n -> date
+ * d >> n -> new_date
+ *
+ * Returns a new \Date object representing the date
+ * +n+ months later; +n+ should be a numeric:
*
- * Returns a date object pointing +n+ months after self.
- * The argument +n+ should be a numeric value.
+ * (Date.new(2001, 2, 3) >> 1).to_s # => "2001-03-03"
+ * (Date.new(2001, 2, 3) >> -2).to_s # => "2000-12-03"
*
- * Date.new(2001,2,3) >> 1 #=> #<Date: 2001-03-03 ...>
- * Date.new(2001,2,3) >> -2 #=> #<Date: 2000-12-03 ...>
+ * When the same day does not exist for the new month,
+ * the last day of that month is used instead:
*
- * When the same day does not exist for the corresponding month,
- * the last day of the month is used instead:
+ * (Date.new(2001, 1, 31) >> 1).to_s # => "2001-02-28"
+ * (Date.new(2001, 1, 31) >> -4).to_s # => "2000-09-30"
*
- * Date.new(2001,1,28) >> 1 #=> #<Date: 2001-02-28 ...>
- * Date.new(2001,1,31) >> 1 #=> #<Date: 2001-02-28 ...>
+ * This results in the following, possibly unexpected, behaviors:
*
- * This also results in the following, possibly unexpected, behavior:
+ * d0 = Date.new(2001, 1, 31)
+ * d1 = d0 >> 1 # => #<Date: 2001-02-28>
+ * d2 = d1 >> 1 # => #<Date: 2001-03-28>
*
- * Date.new(2001,1,31) >> 2 #=> #<Date: 2001-03-31 ...>
- * Date.new(2001,1,31) >> 1 >> 1 #=> #<Date: 2001-03-28 ...>
+ * d0 = Date.new(2001, 1, 31)
+ * d1 = d0 >> 1 # => #<Date: 2001-02-28>
+ * d2 = d1 >> -1 # => #<Date: 2001-01-28>
*
- * Date.new(2001,1,31) >> 1 >> -1 #=> #<Date: 2001-01-28 ...>
*/
static VALUE
d_lite_rshift(VALUE self, VALUE other)
@@ -6074,24 +6502,28 @@ d_lite_rshift(VALUE self, VALUE other)
* call-seq:
* d << n -> date
*
- * Returns a date object pointing +n+ months before self.
- * The argument +n+ should be a numeric value.
+ * Returns a new \Date object representing the date
+ * +n+ months earlier; +n+ should be a numeric:
*
- * Date.new(2001,2,3) << 1 #=> #<Date: 2001-01-03 ...>
- * Date.new(2001,2,3) << -2 #=> #<Date: 2001-04-03 ...>
+ * (Date.new(2001, 2, 3) << 1).to_s # => "2001-01-03"
+ * (Date.new(2001, 2, 3) << -2).to_s # => "2001-04-03"
*
- * When the same day does not exist for the corresponding month,
- * the last day of the month is used instead:
+ * When the same day does not exist for the new month,
+ * the last day of that month is used instead:
*
- * Date.new(2001,3,28) << 1 #=> #<Date: 2001-02-28 ...>
- * Date.new(2001,3,31) << 1 #=> #<Date: 2001-02-28 ...>
+ * (Date.new(2001, 3, 31) << 1).to_s # => "2001-02-28"
+ * (Date.new(2001, 3, 31) << -6).to_s # => "2001-09-30"
*
- * This also results in the following, possibly unexpected, behavior:
+ * This results in the following, possibly unexpected, behaviors:
*
- * Date.new(2001,3,31) << 2 #=> #<Date: 2001-01-31 ...>
- * Date.new(2001,3,31) << 1 << 1 #=> #<Date: 2001-01-28 ...>
+ * d0 = Date.new(2001, 3, 31)
+ * d0 << 2 # => #<Date: 2001-01-31>
+ * d0 << 1 << 1 # => #<Date: 2001-01-28>
+ *
+ * d0 = Date.new(2001, 3, 31)
+ * d1 = d0 << 1 # => #<Date: 2001-02-28>
+ * d2 = d1 << -1 # => #<Date: 2001-03-28>
*
- * Date.new(2001,3,31) << 1 << -1 #=> #<Date: 2001-03-28 ...>
*/
static VALUE
d_lite_lshift(VALUE self, VALUE other)
@@ -6102,11 +6534,9 @@ d_lite_lshift(VALUE self, VALUE other)
/*
* call-seq:
- * d.next_month([n=1]) -> date
- *
- * This method is equivalent to d >> n.
+ * next_month(n = 1) -> new_date
*
- * See Date#>> for examples.
+ * Equivalent to #>> with argument +n+.
*/
static VALUE
d_lite_next_month(int argc, VALUE *argv, VALUE self)
@@ -6121,11 +6551,9 @@ d_lite_next_month(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.prev_month([n=1]) -> date
- *
- * This method is equivalent to d << n.
+ * prev_month(n = 1) -> new_date
*
- * See Date#<< for examples.
+ * Equivalent to #<< with argument +n+.
*/
static VALUE
d_lite_prev_month(int argc, VALUE *argv, VALUE self)
@@ -6140,15 +6568,9 @@ d_lite_prev_month(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.next_year([n=1]) -> date
+ * next_year(n = 1) -> new_date
*
- * This method is equivalent to d >> (n * 12).
- *
- * Date.new(2001,2,3).next_year #=> #<Date: 2002-02-03 ...>
- * Date.new(2008,2,29).next_year #=> #<Date: 2009-02-28 ...>
- * Date.new(2008,2,29).next_year(4) #=> #<Date: 2012-02-29 ...>
- *
- * See also Date#>>.
+ * Equivalent to #>> with argument <tt>n * 12</tt>.
*/
static VALUE
d_lite_next_year(int argc, VALUE *argv, VALUE self)
@@ -6163,15 +6585,9 @@ d_lite_next_year(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.prev_year([n=1]) -> date
- *
- * This method is equivalent to d << (n * 12).
+ * prev_year(n = 1) -> new_date
*
- * Date.new(2001,2,3).prev_year #=> #<Date: 2000-02-03 ...>
- * Date.new(2008,2,29).prev_year #=> #<Date: 2007-02-28 ...>
- * Date.new(2008,2,29).prev_year(4) #=> #<Date: 2004-02-29 ...>
- *
- * See also Date#<<.
+ * Equivalent to #<< with argument <tt>n * 12</tt>.
*/
static VALUE
d_lite_prev_year(int argc, VALUE *argv, VALUE self)
@@ -6188,14 +6604,33 @@ static VALUE d_lite_cmp(VALUE, VALUE);
/*
* call-seq:
- * d.step(limit[, step=1]) -> enumerator
- * d.step(limit[, step=1]){|date| ...} -> self
+ * step(limit, step = 1){|date| ... } -> self
+ *
+ * Calls the block with specified dates;
+ * returns +self+.
+ *
+ * - The first +date+ is +self+.
+ * - Each successive +date+ is <tt>date + step</tt>,
+ * where +step+ is the numeric step size in days.
+ * - The last date is the last one that is before or equal to +limit+,
+ * which should be a \Date object.
*
- * Iterates evaluation of the given block, which takes a date object.
- * The limit should be a date object.
+ * Example:
*
- * Date.new(2001).step(Date.new(2001,-1,-1)).select{|d| d.sunday?}.size
- * #=> 52
+ * limit = Date.new(2001, 12, 31)
+ * Date.new(2001).step(limit){|date| p date.to_s if date.mday == 31 }
+ *
+ * Output:
+ *
+ * "2001-01-31"
+ * "2001-03-31"
+ * "2001-05-31"
+ * "2001-07-31"
+ * "2001-08-31"
+ * "2001-10-31"
+ * "2001-12-31"
+ *
+ * Returns an Enumerator if no block is given.
*/
static VALUE
d_lite_step(int argc, VALUE *argv, VALUE self)
@@ -6238,10 +6673,9 @@ d_lite_step(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.upto(max) -> enumerator
- * d.upto(max){|date| ...} -> self
+ * upto(max){|date| ... } -> self
*
- * This method is equivalent to step(max, 1){|date| ...}.
+ * Equivalent to #step with arguments +max+ and +1+.
*/
static VALUE
d_lite_upto(VALUE self, VALUE max)
@@ -6260,10 +6694,9 @@ d_lite_upto(VALUE self, VALUE max)
/*
* call-seq:
- * d.downto(min) -> enumerator
- * d.downto(min){|date| ...} -> self
+ * downto(min){|date| ... } -> self
*
- * This method is equivalent to step(min, -1){|date| ...}.
+ * Equivalent to #step with arguments +min+ and <tt>-1</tt>.
*/
static VALUE
d_lite_downto(VALUE self, VALUE min)
@@ -6351,19 +6784,43 @@ cmp_dd(VALUE self, VALUE other)
/*
* call-seq:
- * d <=> other -> -1, 0, +1 or nil
+ * self <=> other -> -1, 0, 1 or nil
+ *
+ * Compares +self+ and +other+, returning:
+ *
+ * - <tt>-1</tt> if +other+ is larger.
+ * - <tt>0</tt> if the two are equal.
+ * - <tt>1</tt> if +other+ is smaller.
+ * - +nil+ if the two are incomparable.
+ *
+ * Argument +other+ may be:
*
- * Compares the two dates and returns -1, zero, 1 or nil. The other
- * should be a date object or a numeric value as an astronomical
- * Julian day number.
+ * - Another \Date object:
*
- * Date.new(2001,2,3) <=> Date.new(2001,2,4) #=> -1
- * Date.new(2001,2,3) <=> Date.new(2001,2,3) #=> 0
- * Date.new(2001,2,3) <=> Date.new(2001,2,2) #=> 1
- * Date.new(2001,2,3) <=> Object.new #=> nil
- * Date.new(2001,2,3) <=> Rational(4903887,2) #=> 0
+ * d = Date.new(2022, 7, 27) # => #<Date: 2022-07-27 ((2459788j,0s,0n),+0s,2299161j)>
+ * prev_date = d.prev_day # => #<Date: 2022-07-26 ((2459787j,0s,0n),+0s,2299161j)>
+ * next_date = d.next_day # => #<Date: 2022-07-28 ((2459789j,0s,0n),+0s,2299161j)>
+ * d <=> next_date # => -1
+ * d <=> d # => 0
+ * d <=> prev_date # => 1
+ *
+ * - A DateTime object:
+ *
+ * d <=> DateTime.new(2022, 7, 26) # => 1
+ * d <=> DateTime.new(2022, 7, 27) # => 0
+ * d <=> DateTime.new(2022, 7, 28) # => -1
+ *
+ * - A numeric (compares <tt>self.ajd</tt> to +other+):
+ *
+ * d <=> 2459788 # => -1
+ * d <=> 2459787 # => 1
+ * d <=> 2459786 # => 1
+ * d <=> d.ajd # => 0
+ *
+ * - Any other object:
+ *
+ * d <=> Object.new # => nil
*
- * See also Comparable.
*/
static VALUE
d_lite_cmp(VALUE self, VALUE other)
@@ -6423,20 +6880,39 @@ equal_gen(VALUE self, VALUE other)
/*
* call-seq:
- * d === other -> bool
- *
- * Returns true if they are the same day.
- *
- * Date.new(2001,2,3) === Date.new(2001,2,3)
- * #=> true
- * Date.new(2001,2,3) === Date.new(2001,2,4)
- * #=> false
- * DateTime.new(2001,2,3) === DateTime.new(2001,2,3,12)
- * #=> true
- * DateTime.new(2001,2,3) === DateTime.new(2001,2,3,0,0,0,'+24:00')
- * #=> true
- * DateTime.new(2001,2,3) === DateTime.new(2001,2,4,0,0,0,'+24:00')
- * #=> false
+ * self === other -> true, false, or nil.
+ *
+ * Returns +true+ if +self+ and +other+ represent the same date,
+ * +false+ if not, +nil+ if the two are not comparable.
+ *
+ * Argument +other+ may be:
+ *
+ * - Another \Date object:
+ *
+ * d = Date.new(2022, 7, 27) # => #<Date: 2022-07-27 ((2459788j,0s,0n),+0s,2299161j)>
+ * prev_date = d.prev_day # => #<Date: 2022-07-26 ((2459787j,0s,0n),+0s,2299161j)>
+ * next_date = d.next_day # => #<Date: 2022-07-28 ((2459789j,0s,0n),+0s,2299161j)>
+ * d === prev_date # => false
+ * d === d # => true
+ * d === next_date # => false
+ *
+ * - A DateTime object:
+ *
+ * d === DateTime.new(2022, 7, 26) # => false
+ * d === DateTime.new(2022, 7, 27) # => true
+ * d === DateTime.new(2022, 7, 28) # => false
+ *
+ * - A numeric (compares <tt>self.jd</tt> to +other+):
+ *
+ * d === 2459788 # => true
+ * d === 2459787 # => false
+ * d === 2459786 # => false
+ * d === d.jd # => true
+ *
+ * - An object not comparable:
+ *
+ * d === Object.new # => nil
+ *
*/
static VALUE
d_lite_equal(VALUE self, VALUE other)
@@ -6499,12 +6975,14 @@ static VALUE strftimev(const char *, VALUE,
/*
* call-seq:
- * d.to_s -> string
+ * to_s -> string
*
- * Returns a string in an ISO 8601 format. (This method doesn't use the
- * expanded representations.)
+ * Returns a string representation of the date in +self+
+ * in {ISO 8601 extended date format}[rdoc-ref:strftime_formatting.rdoc@ISO+8601+Format+Specifications]
+ * (<tt>'%Y-%m-%d'</tt>):
+ *
+ * Date.new(2001, 2, 3).to_s # => "2001-02-03"
*
- * Date.new(2001,2,3).to_s #=> "2001-02-03"
*/
static VALUE
d_lite_to_s(VALUE self)
@@ -6513,6 +6991,7 @@ d_lite_to_s(VALUE self)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
mk_inspect_raw(union DateData *x, VALUE klass)
{
@@ -6562,6 +7041,7 @@ mk_inspect_raw(union DateData *x, VALUE klass)
}
}
+/* :nodoc: */
static VALUE
d_lite_inspect_raw(VALUE self)
{
@@ -6583,14 +7063,13 @@ mk_inspect(union DateData *x, VALUE klass, VALUE to_s)
/*
* call-seq:
- * d.inspect -> string
+ * inspect -> string
+ *
+ * Returns a string representation of +self+:
*
- * Returns the value as a string for inspection.
+ * Date.new(2001, 2, 3).inspect
+ * # => "#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>"
*
- * Date.new(2001,2,3).inspect
- * #=> "#<Date: 2001-02-03>"
- * DateTime.new(2001,2,3,4,5,6,'-7').inspect
- * #=> "#<DateTime: 2001-02-03T04:05:06-07:00>"
*/
static VALUE
d_lite_inspect(VALUE self)
@@ -6772,180 +7251,16 @@ date_strftime_internal(int argc, VALUE *argv, VALUE self,
/*
* call-seq:
- * d.strftime([format='%F']) -> string
- *
- * Formats date according to the directives in the given format
- * string.
- * The directives begin with a percent (%) character.
- * Any text not listed as a directive will be passed through to the
- * output string.
- *
- * A directive consists of a percent (%) character,
- * zero or more flags, an optional minimum field width,
- * an optional modifier, and a conversion specifier
- * as follows.
- *
- * %<flags><width><modifier><conversion>
- *
- * Flags:
- * - don't pad a numerical output.
- * _ use spaces for padding.
- * 0 use zeros for padding.
- * ^ upcase the result string.
- * # change case.
- *
- * The minimum field width specifies the minimum width.
- *
- * The modifiers are "E", "O", ":", "::" and ":::".
- * "E" and "O" are ignored. No effect to result currently.
- *
- * Format directives:
- *
- * Date (Year, Month, Day):
- * %Y - Year with century (can be negative, 4 digits at least)
- * -0001, 0000, 1995, 2009, 14292, etc.
- * %C - year / 100 (round down. 20 in 2009)
- * %y - year % 100 (00..99)
- *
- * %m - Month of the year, zero-padded (01..12)
- * %_m blank-padded ( 1..12)
- * %-m no-padded (1..12)
- * %B - The full month name (``January'')
- * %^B uppercased (``JANUARY'')
- * %b - The abbreviated month name (``Jan'')
- * %^b uppercased (``JAN'')
- * %h - Equivalent to %b
- *
- * %d - Day of the month, zero-padded (01..31)
- * %-d no-padded (1..31)
- * %e - Day of the month, blank-padded ( 1..31)
- *
- * %j - Day of the year (001..366)
- *
- * Time (Hour, Minute, Second, Subsecond):
- * %H - Hour of the day, 24-hour clock, zero-padded (00..23)
- * %k - Hour of the day, 24-hour clock, blank-padded ( 0..23)
- * %I - Hour of the day, 12-hour clock, zero-padded (01..12)
- * %l - Hour of the day, 12-hour clock, blank-padded ( 1..12)
- * %P - Meridian indicator, lowercase (``am'' or ``pm'')
- * %p - Meridian indicator, uppercase (``AM'' or ``PM'')
- *
- * %M - Minute of the hour (00..59)
- *
- * %S - Second of the minute (00..60)
- *
- * %L - Millisecond of the second (000..999)
- * %N - Fractional seconds digits, default is 9 digits (nanosecond)
- * %3N millisecond (3 digits) %15N femtosecond (15 digits)
- * %6N microsecond (6 digits) %18N attosecond (18 digits)
- * %9N nanosecond (9 digits) %21N zeptosecond (21 digits)
- * %12N picosecond (12 digits) %24N yoctosecond (24 digits)
- *
- * Time zone:
- * %z - Time zone as hour and minute offset from UTC (e.g. +0900)
- * %:z - hour and minute offset from UTC with a colon (e.g. +09:00)
- * %::z - hour, minute and second offset from UTC (e.g. +09:00:00)
- * %:::z - hour, minute and second offset from UTC
- * (e.g. +09, +09:30, +09:30:30)
- * %Z - Equivalent to %:z (e.g. +09:00)
- *
- * Weekday:
- * %A - The full weekday name (``Sunday'')
- * %^A uppercased (``SUNDAY'')
- * %a - The abbreviated name (``Sun'')
- * %^a uppercased (``SUN'')
- * %u - Day of the week (Monday is 1, 1..7)
- * %w - Day of the week (Sunday is 0, 0..6)
- *
- * ISO 8601 week-based year and week number:
- * The week 1 of YYYY starts with a Monday and includes YYYY-01-04.
- * The days in the year before the first week are in the last week of
- * the previous year.
- * %G - The week-based year
- * %g - The last 2 digits of the week-based year (00..99)
- * %V - Week number of the week-based year (01..53)
- *
- * Week number:
- * The week 1 of YYYY starts with a Sunday or Monday (according to %U
- * or %W). The days in the year before the first week are in week 0.
- * %U - Week number of the year. The week starts with Sunday. (00..53)
- * %W - Week number of the year. The week starts with Monday. (00..53)
- *
- * Seconds since the Unix Epoch:
- * %s - Number of seconds since 1970-01-01 00:00:00 UTC.
- * %Q - Number of milliseconds since 1970-01-01 00:00:00 UTC.
- *
- * Literal string:
- * %n - Newline character (\n)
- * %t - Tab character (\t)
- * %% - Literal ``%'' character
- *
- * Combination:
- * %c - date and time (%a %b %e %T %Y)
- * %D - Date (%m/%d/%y)
- * %F - The ISO 8601 date format (%Y-%m-%d)
- * %v - VMS date (%e-%b-%Y)
- * %x - Same as %D
- * %X - Same as %T
- * %r - 12-hour time (%I:%M:%S %p)
- * %R - 24-hour time (%H:%M)
- * %T - 24-hour time (%H:%M:%S)
- * %+ - date(1) (%a %b %e %H:%M:%S %Z %Y)
- *
- * This method is similar to the strftime() function defined in ISO C
- * and POSIX.
- * Several directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z)
- * are locale dependent in the function.
- * However, this method is locale independent.
- * So, the result may differ even if the same format string is used in other
- * systems such as C.
- * It is good practice to avoid %x and %X because there are corresponding
- * locale independent representations, %D and %T.
- *
- * Examples:
- *
- * d = DateTime.new(2007,11,19,8,37,48,"-06:00")
- * #=> #<DateTime: 2007-11-19T08:37:48-0600 ...>
- * d.strftime("Printed on %m/%d/%Y") #=> "Printed on 11/19/2007"
- * d.strftime("at %I:%M%p") #=> "at 08:37AM"
- *
- * Various ISO 8601 formats:
- * %Y%m%d => 20071119 Calendar date (basic)
- * %F => 2007-11-19 Calendar date (extended)
- * %Y-%m => 2007-11 Calendar date, reduced accuracy, specific month
- * %Y => 2007 Calendar date, reduced accuracy, specific year
- * %C => 20 Calendar date, reduced accuracy, specific century
- * %Y%j => 2007323 Ordinal date (basic)
- * %Y-%j => 2007-323 Ordinal date (extended)
- * %GW%V%u => 2007W471 Week date (basic)
- * %G-W%V-%u => 2007-W47-1 Week date (extended)
- * %GW%V => 2007W47 Week date, reduced accuracy, specific week (basic)
- * %G-W%V => 2007-W47 Week date, reduced accuracy, specific week (extended)
- * %H%M%S => 083748 Local time (basic)
- * %T => 08:37:48 Local time (extended)
- * %H%M => 0837 Local time, reduced accuracy, specific minute (basic)
- * %H:%M => 08:37 Local time, reduced accuracy, specific minute (extended)
- * %H => 08 Local time, reduced accuracy, specific hour
- * %H%M%S,%L => 083748,000 Local time with decimal fraction, comma as decimal sign (basic)
- * %T,%L => 08:37:48,000 Local time with decimal fraction, comma as decimal sign (extended)
- * %H%M%S.%L => 083748.000 Local time with decimal fraction, full stop as decimal sign (basic)
- * %T.%L => 08:37:48.000 Local time with decimal fraction, full stop as decimal sign (extended)
- * %H%M%S%z => 083748-0600 Local time and the difference from UTC (basic)
- * %T%:z => 08:37:48-06:00 Local time and the difference from UTC (extended)
- * %Y%m%dT%H%M%S%z => 20071119T083748-0600 Date and time of day for calendar date (basic)
- * %FT%T%:z => 2007-11-19T08:37:48-06:00 Date and time of day for calendar date (extended)
- * %Y%jT%H%M%S%z => 2007323T083748-0600 Date and time of day for ordinal date (basic)
- * %Y-%jT%T%:z => 2007-323T08:37:48-06:00 Date and time of day for ordinal date (extended)
- * %GW%V%uT%H%M%S%z => 2007W471T083748-0600 Date and time of day for week date (basic)
- * %G-W%V-%uT%T%:z => 2007-W47-1T08:37:48-06:00 Date and time of day for week date (extended)
- * %Y%m%dT%H%M => 20071119T0837 Calendar date and local time (basic)
- * %FT%R => 2007-11-19T08:37 Calendar date and local time (extended)
- * %Y%jT%H%MZ => 2007323T0837Z Ordinal date and UTC of day (basic)
- * %Y-%jT%RZ => 2007-323T08:37Z Ordinal date and UTC of day (extended)
- * %GW%V%uT%H%M%z => 2007W471T0837-0600 Week date and local time and difference from UTC (basic)
- * %G-W%V-%uT%R%:z => 2007-W47-1T08:37-06:00 Week date and local time and difference from UTC (extended)
- *
- * See also strftime(3) and ::strptime.
+ * strftime(format = '%F') -> string
+ *
+ * Returns a string representation of the date in +self+,
+ * formatted according the given +format+:
+ *
+ * Date.new(2001, 2, 3).strftime # => "2001-02-03"
+ *
+ * For other formats, see
+ * {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc].
+ *
*/
static VALUE
d_lite_strftime(int argc, VALUE *argv, VALUE self)
@@ -6973,13 +7288,17 @@ strftimev(const char *fmt, VALUE self,
/*
* call-seq:
- * d.asctime -> string
- * d.ctime -> string
+ * asctime -> string
*
- * Returns a string in asctime(3) format (but without "\n\0" at the
- * end). This method is equivalent to strftime('%c').
+ * Equivalent to #strftime with argument <tt>'%a %b %e %T %Y'</tt>
+ * (or its {shorthand form}[rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers]
+ * <tt>'%c'</tt>):
*
- * See also asctime(3) or ctime(3).
+ * Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
+ *
+ * See {asctime}[https://linux.die.net/man/3/asctime].
+ *
+ * Date#ctime is an alias for Date#asctime.
*/
static VALUE
d_lite_asctime(VALUE self)
@@ -6989,10 +7308,15 @@ d_lite_asctime(VALUE self)
/*
* call-seq:
- * d.iso8601 -> string
- * d.xmlschema -> string
+ * iso8601 -> string
+ *
+ * Equivalent to #strftime with argument <tt>'%Y-%m-%d'</tt>
+ * (or its {shorthand form}[rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers]
+ * <tt>'%F'</tt>);
*
- * This method is equivalent to strftime('%F').
+ * Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
+ *
+ * Date#xmlschema is an alias for Date#iso8601.
*/
static VALUE
d_lite_iso8601(VALUE self)
@@ -7002,9 +7326,13 @@ d_lite_iso8601(VALUE self)
/*
* call-seq:
- * d.rfc3339 -> string
+ * rfc3339 -> string
+ *
+ * Equivalent to #strftime with argument <tt>'%FT%T%:z'</tt>;
+ * see {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc]:
+ *
+ * Date.new(2001, 2, 3).rfc3339 # => "2001-02-03T00:00:00+00:00"
*
- * This method is equivalent to strftime('%FT%T%:z').
*/
static VALUE
d_lite_rfc3339(VALUE self)
@@ -7014,10 +7342,14 @@ d_lite_rfc3339(VALUE self)
/*
* call-seq:
- * d.rfc2822 -> string
- * d.rfc822 -> string
+ * rfc2822 -> string
+ *
+ * Equivalent to #strftime with argument <tt>'%a, %-d %b %Y %T %z'</tt>;
+ * see {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc]:
+ *
+ * Date.new(2001, 2, 3).rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
*
- * This method is equivalent to strftime('%a, %-d %b %Y %T %z').
+ * Date#rfc822 is an alias for Date#rfc2822.
*/
static VALUE
d_lite_rfc2822(VALUE self)
@@ -7027,10 +7359,13 @@ d_lite_rfc2822(VALUE self)
/*
* call-seq:
- * d.httpdate -> string
+ * httpdate -> string
+ *
+ * Equivalent to #strftime with argument <tt>'%a, %d %b %Y %T GMT'</tt>;
+ * see {Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc]:
+ *
+ * Date.new(2001, 2, 3).httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
*
- * This method is equivalent to strftime('%a, %d %b %Y %T GMT').
- * See also RFC 2616.
*/
static VALUE
d_lite_httpdate(VALUE self)
@@ -7081,11 +7416,13 @@ jisx0301_date_format(char *fmt, size_t size, VALUE jd, VALUE y)
/*
* call-seq:
- * d.jisx0301 -> string
+ * jisx0301 -> string
*
- * Returns a string in a JIS X 0301 format.
+ * Returns a string representation of the date in +self+
+ * in JIS X 0301 format.
+ *
+ * Date.new(2001, 2, 3).jisx0301 # => "H13.02.03"
*
- * Date.new(2001,2,3).jisx0301 #=> "H13.02.03"
*/
static VALUE
d_lite_jisx0301(VALUE self)
@@ -7100,7 +7437,98 @@ d_lite_jisx0301(VALUE self)
return strftimev(fmt, self, set_tmx);
}
+static VALUE
+deconstruct_keys(VALUE self, VALUE keys, int is_datetime)
+{
+ VALUE h = rb_hash_new();
+ long i;
+
+ get_d1(self);
+
+ if (NIL_P(keys)) {
+ rb_hash_aset(h, sym_year, m_real_year(dat));
+ rb_hash_aset(h, sym_month, INT2FIX(m_mon(dat)));
+ rb_hash_aset(h, sym_day, INT2FIX(m_mday(dat)));
+ rb_hash_aset(h, sym_yday, INT2FIX(m_yday(dat)));
+ rb_hash_aset(h, sym_wday, INT2FIX(m_wday(dat)));
+ if (is_datetime) {
+ rb_hash_aset(h, sym_hour, INT2FIX(m_hour(dat)));
+ rb_hash_aset(h, sym_min, INT2FIX(m_min(dat)));
+ rb_hash_aset(h, sym_sec, INT2FIX(m_sec(dat)));
+ rb_hash_aset(h, sym_sec_fraction, m_sf_in_sec(dat));
+ rb_hash_aset(h, sym_zone, m_zone(dat));
+ }
+
+ return h;
+ }
+ if (!RB_TYPE_P(keys, T_ARRAY)) {
+ rb_raise(rb_eTypeError,
+ "wrong argument type %"PRIsVALUE" (expected Array or nil)",
+ rb_obj_class(keys));
+
+ }
+
+ for (i=0; i<RARRAY_LEN(keys); i++) {
+ VALUE key = RARRAY_AREF(keys, i);
+
+ if (sym_year == key) rb_hash_aset(h, key, m_real_year(dat));
+ if (sym_month == key) rb_hash_aset(h, key, INT2FIX(m_mon(dat)));
+ if (sym_day == key) rb_hash_aset(h, key, INT2FIX(m_mday(dat)));
+ if (sym_yday == key) rb_hash_aset(h, key, INT2FIX(m_yday(dat)));
+ if (sym_wday == key) rb_hash_aset(h, key, INT2FIX(m_wday(dat)));
+ if (is_datetime) {
+ if (sym_hour == key) rb_hash_aset(h, key, INT2FIX(m_hour(dat)));
+ if (sym_min == key) rb_hash_aset(h, key, INT2FIX(m_min(dat)));
+ if (sym_sec == key) rb_hash_aset(h, key, INT2FIX(m_sec(dat)));
+ if (sym_sec_fraction == key) rb_hash_aset(h, key, m_sf_in_sec(dat));
+ if (sym_zone == key) rb_hash_aset(h, key, m_zone(dat));
+ }
+ }
+ return h;
+}
+
+/*
+ * call-seq:
+ * deconstruct_keys(array_of_names_or_nil) -> hash
+ *
+ * Returns a hash of the name/value pairs, to use in pattern matching.
+ * Possible keys are: <tt>:year</tt>, <tt>:month</tt>, <tt>:day</tt>,
+ * <tt>:wday</tt>, <tt>:yday</tt>.
+ *
+ * Possible usages:
+ *
+ * d = Date.new(2022, 10, 5)
+ *
+ * if d in wday: 3, day: ..7 # uses deconstruct_keys underneath
+ * puts "first Wednesday of the month"
+ * end
+ * #=> prints "first Wednesday of the month"
+ *
+ * case d
+ * in year: ...2022
+ * puts "too old"
+ * in month: ..9
+ * puts "quarter 1-3"
+ * in wday: 1..5, month:
+ * puts "working day in month #{month}"
+ * end
+ * #=> prints "working day in month 10"
+ *
+ * Note that deconstruction by pattern can also be combined with class check:
+ *
+ * if d in Date(wday: 3, day: ..7)
+ * puts "first Wednesday of the month"
+ * end
+ *
+ */
+static VALUE
+d_lite_deconstruct_keys(VALUE self, VALUE keys)
+{
+ return deconstruct_keys(self, keys, /* is_datetime=false */ 0);
+}
+
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
d_lite_marshal_dump_old(VALUE self)
{
@@ -7201,11 +7629,14 @@ d_lite_marshal_load(VALUE self, VALUE a)
if (simple_dat_p(dat)) {
if (df || !f_zero_p(sf) || of) {
- rb_raise(rb_eArgError,
- "cannot load complex into simple");
+ /* loading a fractional date; promote to complex */
+ dat = ruby_xrealloc(dat, sizeof(struct ComplexDateData));
+ RTYPEDDATA(self)->data = dat;
+ goto complex_data;
}
set_to_simple(self, &dat->s, nth, jd, sg, 0, 0, 0, HAVE_JD);
} else {
+ complex_data:
set_to_complex(self, &dat->c, nth, jd, df, sf, of, sg,
0, 0, 0, 0, 0, 0,
HAVE_JD | HAVE_DF);
@@ -7385,17 +7816,7 @@ datetime_s_ordinal(int argc, VALUE *argv, VALUE klass)
}
/*
- * call-seq:
- * DateTime.civil([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime
- * DateTime.new([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) -> datetime
- *
- * Creates a DateTime object denoting the given calendar date.
- *
- * DateTime.new(2001,2,3) #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...>
- * DateTime.new(2001,2,3,4,5,6,'+7')
- * #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
- * DateTime.new(2001,-11,-26,-20,-55,-54,'+7')
- * #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ * Same as DateTime.new.
*/
static VALUE
datetime_s_civil(int argc, VALUE *argv, VALUE klass)
@@ -7585,6 +8006,7 @@ datetime_s_commercial(int argc, VALUE *argv, VALUE klass)
}
#ifndef NDEBUG
+/* :nodoc: */
static VALUE
datetime_s_weeknum(int argc, VALUE *argv, VALUE klass)
{
@@ -7654,6 +8076,7 @@ datetime_s_weeknum(int argc, VALUE *argv, VALUE klass)
return ret;
}
+/* :nodoc: */
static VALUE
datetime_s_nth_kday(int argc, VALUE *argv, VALUE klass)
{
@@ -7778,7 +8201,7 @@ datetime_s_now(int argc, VALUE *argv, VALUE klass)
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
of = tm.tm_gmtoff;
#elif defined(HAVE_TIMEZONE)
-#ifdef HAVE_ALTZONE
+#if defined(HAVE_ALTZONE) && !defined(_AIX)
of = (long)-((tm.tm_isdst > 0) ? altzone : timezone);
#else
of = (long)-timezone;
@@ -7994,10 +8417,15 @@ datetime_s_strptime(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * DateTime.parse(string='-4712-01-01T00:00:00+00:00'[, comp=true[, start=Date::ITALY]]) -> datetime
+ * DateTime.parse(string='-4712-01-01T00:00:00+00:00'[, comp=true[, start=Date::ITALY]], limit: 128) -> datetime
*
* Parses the given representation of date and time, and creates a
- * DateTime object. This method does not function as a validator.
+ * DateTime object.
+ *
+ * This method *does* *not* function as a validator. If the input
+ * string does not match valid formats strictly, you may get a cryptic
+ * result. Should consider to use DateTime.strptime instead of this
+ * method as possible.
*
* If the optional second argument is true and the detected year is in
* the range "00" to "99", makes it full.
@@ -8008,13 +8436,18 @@ datetime_s_strptime(int argc, VALUE *argv, VALUE klass)
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
* DateTime.parse('3rd Feb 2001 04:05:06 PM')
* #=> #<DateTime: 2001-02-03T16:05:06+00:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_parse(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, comp, sg;
+ VALUE str, comp, sg, opt;
- rb_scan_args(argc, argv, "03", &str, &comp, &sg);
+ rb_scan_args(argc, argv, "03:", &str, &comp, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8026,18 +8459,20 @@ datetime_s_parse(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE argv2[2], hash;
-
- argv2[0] = str;
- argv2[1] = comp;
- hash = date_s__parse(2, argv2, klass);
+ int argc2 = 2;
+ VALUE argv2[3], hash;
+ argv2[0] = str;
+ argv2[1] = comp;
+ argv2[2] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__parse(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical ISO 8601 formats.
@@ -8048,13 +8483,18 @@ datetime_s_parse(int argc, VALUE *argv, VALUE klass)
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
* DateTime.iso8601('2001-W05-6T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8064,27 +8504,37 @@ datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__iso8601(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2--;
+ hash = date_s__iso8601(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.rfc3339(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical RFC 3339 formats.
*
* DateTime.rfc3339('2001-02-03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8094,27 +8544,37 @@ datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc3339(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__rfc3339(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.xmlschema(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.xmlschema(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical XML Schema formats.
*
* DateTime.xmlschema('2001-02-03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8124,28 +8584,38 @@ datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__xmlschema(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__xmlschema(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> datetime
- * DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY]) -> datetime
+ * DateTime.rfc2822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime
+ * DateTime.rfc822(string='Mon, 1 Jan -4712 00:00:00 +0000'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical RFC 2822 formats.
*
* DateTime.rfc2822('Sat, 3 Feb 2001 04:05:06 +0700')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8155,7 +8625,12 @@ datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__rfc2822(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__rfc2822(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
@@ -8169,13 +8644,18 @@ datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
*
* DateTime.httpdate('Sat, 03 Feb 2001 04:05:06 GMT')
* #=> #<DateTime: 2001-02-03T04:05:06+00:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8185,14 +8665,19 @@ datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__httpdate(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__httpdate(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
/*
* call-seq:
- * DateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY]) -> datetime
+ * DateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) -> datetime
*
* Creates a new DateTime object by parsing from a string according to
* some typical JIS X 0301 formats.
@@ -8204,13 +8689,18 @@ datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
*
* DateTime.jisx0301('13.02.03T04:05:06+07:00')
* #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
+ *
+ * Raise an ArgumentError when the string length is longer than _limit_.
+ * You can stop this check by passing <code>limit: nil</code>, but note
+ * that it may take a long time to parse.
*/
static VALUE
datetime_s_jisx0301(int argc, VALUE *argv, VALUE klass)
{
- VALUE str, sg;
+ VALUE str, sg, opt;
- rb_scan_args(argc, argv, "02", &str, &sg);
+ rb_scan_args(argc, argv, "02:", &str, &sg, &opt);
+ if (!NIL_P(opt)) argc--;
switch (argc) {
case 0:
@@ -8220,7 +8710,12 @@ datetime_s_jisx0301(int argc, VALUE *argv, VALUE klass)
}
{
- VALUE hash = date_s__jisx0301(klass, str);
+ int argc2 = 1;
+ VALUE argv2[2], hash;
+ argv2[0] = str;
+ argv2[1] = opt;
+ if (!NIL_P(opt)) argc2++;
+ hash = date_s__jisx0301(argc2, argv2, klass);
return dt_new_by_frags(klass, hash, sg);
}
}
@@ -8243,181 +8738,16 @@ dt_lite_to_s(VALUE self)
/*
* call-seq:
- * dt.strftime([format='%FT%T%:z']) -> string
- *
- * Formats date according to the directives in the given format
- * string.
- * The directives begin with a percent (%) character.
- * Any text not listed as a directive will be passed through to the
- * output string.
- *
- * A directive consists of a percent (%) character,
- * zero or more flags, an optional minimum field width,
- * an optional modifier, and a conversion specifier
- * as follows.
- *
- * %<flags><width><modifier><conversion>
- *
- * Flags:
- * - don't pad a numerical output.
- * _ use spaces for padding.
- * 0 use zeros for padding.
- * ^ upcase the result string.
- * # change case.
- * : use colons for %z.
- *
- * The minimum field width specifies the minimum width.
- *
- * The modifiers are "E" and "O".
- * They are ignored.
- *
- * Format directives:
- *
- * Date (Year, Month, Day):
- * %Y - Year with century (can be negative, 4 digits at least)
- * -0001, 0000, 1995, 2009, 14292, etc.
- * %C - year / 100 (round down. 20 in 2009)
- * %y - year % 100 (00..99)
- *
- * %m - Month of the year, zero-padded (01..12)
- * %_m blank-padded ( 1..12)
- * %-m no-padded (1..12)
- * %B - The full month name (``January'')
- * %^B uppercased (``JANUARY'')
- * %b - The abbreviated month name (``Jan'')
- * %^b uppercased (``JAN'')
- * %h - Equivalent to %b
- *
- * %d - Day of the month, zero-padded (01..31)
- * %-d no-padded (1..31)
- * %e - Day of the month, blank-padded ( 1..31)
- *
- * %j - Day of the year (001..366)
- *
- * Time (Hour, Minute, Second, Subsecond):
- * %H - Hour of the day, 24-hour clock, zero-padded (00..23)
- * %k - Hour of the day, 24-hour clock, blank-padded ( 0..23)
- * %I - Hour of the day, 12-hour clock, zero-padded (01..12)
- * %l - Hour of the day, 12-hour clock, blank-padded ( 1..12)
- * %P - Meridian indicator, lowercase (``am'' or ``pm'')
- * %p - Meridian indicator, uppercase (``AM'' or ``PM'')
- *
- * %M - Minute of the hour (00..59)
- *
- * %S - Second of the minute (00..60)
- *
- * %L - Millisecond of the second (000..999)
- * %N - Fractional seconds digits, default is 9 digits (nanosecond)
- * %3N millisecond (3 digits) %15N femtosecond (15 digits)
- * %6N microsecond (6 digits) %18N attosecond (18 digits)
- * %9N nanosecond (9 digits) %21N zeptosecond (21 digits)
- * %12N picosecond (12 digits) %24N yoctosecond (24 digits)
- *
- * Time zone:
- * %z - Time zone as hour and minute offset from UTC (e.g. +0900)
- * %:z - hour and minute offset from UTC with a colon (e.g. +09:00)
- * %::z - hour, minute and second offset from UTC (e.g. +09:00:00)
- * %:::z - hour, minute and second offset from UTC
- * (e.g. +09, +09:30, +09:30:30)
- * %Z - Equivalent to %:z (e.g. +09:00)
- *
- * Weekday:
- * %A - The full weekday name (``Sunday'')
- * %^A uppercased (``SUNDAY'')
- * %a - The abbreviated name (``Sun'')
- * %^a uppercased (``SUN'')
- * %u - Day of the week (Monday is 1, 1..7)
- * %w - Day of the week (Sunday is 0, 0..6)
- *
- * ISO 8601 week-based year and week number:
- * The week 1 of YYYY starts with a Monday and includes YYYY-01-04.
- * The days in the year before the first week are in the last week of
- * the previous year.
- * %G - The week-based year
- * %g - The last 2 digits of the week-based year (00..99)
- * %V - Week number of the week-based year (01..53)
- *
- * Week number:
- * The week 1 of YYYY starts with a Sunday or Monday (according to %U
- * or %W). The days in the year before the first week are in week 0.
- * %U - Week number of the year. The week starts with Sunday. (00..53)
- * %W - Week number of the year. The week starts with Monday. (00..53)
- *
- * Seconds since the Unix Epoch:
- * %s - Number of seconds since 1970-01-01 00:00:00 UTC.
- * %Q - Number of milliseconds since 1970-01-01 00:00:00 UTC.
- *
- * Literal string:
- * %n - Newline character (\n)
- * %t - Tab character (\t)
- * %% - Literal ``%'' character
- *
- * Combination:
- * %c - date and time (%a %b %e %T %Y)
- * %D - Date (%m/%d/%y)
- * %F - The ISO 8601 date format (%Y-%m-%d)
- * %v - VMS date (%e-%b-%Y)
- * %x - Same as %D
- * %X - Same as %T
- * %r - 12-hour time (%I:%M:%S %p)
- * %R - 24-hour time (%H:%M)
- * %T - 24-hour time (%H:%M:%S)
- * %+ - date(1) (%a %b %e %H:%M:%S %Z %Y)
- *
- * This method is similar to the strftime() function defined in ISO C
- * and POSIX.
- * Several directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z)
- * are locale dependent in the function.
- * However, this method is locale independent.
- * So, the result may differ even if the same format string is used in other
- * systems such as C.
- * It is good practice to avoid %x and %X because there are corresponding
- * locale independent representations, %D and %T.
- *
- * Examples:
- *
- * d = DateTime.new(2007,11,19,8,37,48,"-06:00")
- * #=> #<DateTime: 2007-11-19T08:37:48-0600 ...>
- * d.strftime("Printed on %m/%d/%Y") #=> "Printed on 11/19/2007"
- * d.strftime("at %I:%M%p") #=> "at 08:37AM"
- *
- * Various ISO 8601 formats:
- * %Y%m%d => 20071119 Calendar date (basic)
- * %F => 2007-11-19 Calendar date (extended)
- * %Y-%m => 2007-11 Calendar date, reduced accuracy, specific month
- * %Y => 2007 Calendar date, reduced accuracy, specific year
- * %C => 20 Calendar date, reduced accuracy, specific century
- * %Y%j => 2007323 Ordinal date (basic)
- * %Y-%j => 2007-323 Ordinal date (extended)
- * %GW%V%u => 2007W471 Week date (basic)
- * %G-W%V-%u => 2007-W47-1 Week date (extended)
- * %GW%V => 2007W47 Week date, reduced accuracy, specific week (basic)
- * %G-W%V => 2007-W47 Week date, reduced accuracy, specific week (extended)
- * %H%M%S => 083748 Local time (basic)
- * %T => 08:37:48 Local time (extended)
- * %H%M => 0837 Local time, reduced accuracy, specific minute (basic)
- * %H:%M => 08:37 Local time, reduced accuracy, specific minute (extended)
- * %H => 08 Local time, reduced accuracy, specific hour
- * %H%M%S,%L => 083748,000 Local time with decimal fraction, comma as decimal sign (basic)
- * %T,%L => 08:37:48,000 Local time with decimal fraction, comma as decimal sign (extended)
- * %H%M%S.%L => 083748.000 Local time with decimal fraction, full stop as decimal sign (basic)
- * %T.%L => 08:37:48.000 Local time with decimal fraction, full stop as decimal sign (extended)
- * %H%M%S%z => 083748-0600 Local time and the difference from UTC (basic)
- * %T%:z => 08:37:48-06:00 Local time and the difference from UTC (extended)
- * %Y%m%dT%H%M%S%z => 20071119T083748-0600 Date and time of day for calendar date (basic)
- * %FT%T%:z => 2007-11-19T08:37:48-06:00 Date and time of day for calendar date (extended)
- * %Y%jT%H%M%S%z => 2007323T083748-0600 Date and time of day for ordinal date (basic)
- * %Y-%jT%T%:z => 2007-323T08:37:48-06:00 Date and time of day for ordinal date (extended)
- * %GW%V%uT%H%M%S%z => 2007W471T083748-0600 Date and time of day for week date (basic)
- * %G-W%V-%uT%T%:z => 2007-W47-1T08:37:48-06:00 Date and time of day for week date (extended)
- * %Y%m%dT%H%M => 20071119T0837 Calendar date and local time (basic)
- * %FT%R => 2007-11-19T08:37 Calendar date and local time (extended)
- * %Y%jT%H%MZ => 2007323T0837Z Ordinal date and UTC of day (basic)
- * %Y-%jT%RZ => 2007-323T08:37Z Ordinal date and UTC of day (extended)
- * %GW%V%uT%H%M%z => 2007W471T0837-0600 Week date and local time and difference from UTC (basic)
- * %G-W%V-%uT%R%:z => 2007-W47-1T08:37-06:00 Week date and local time and difference from UTC (extended)
- *
- * See also strftime(3) and ::strptime.
+ * strftime(format = '%FT%T%:z') -> string
+ *
+ * Returns a string representation of +self+,
+ * formatted according the given +format:
+ *
+ * DateTime.now.strftime # => "2022-07-01T11:03:19-05:00"
+ *
+ * For other formats, see
+ * {Formats for Dates and Times}[doc/strftime_formatting.rdoc].
+ *
*/
static VALUE
dt_lite_strftime(int argc, VALUE *argv, VALUE self)
@@ -8505,6 +8835,47 @@ dt_lite_jisx0301(int argc, VALUE *argv, VALUE self)
iso8601_timediv(self, n));
}
+/*
+ * call-seq:
+ * deconstruct_keys(array_of_names_or_nil) -> hash
+ *
+ * Returns a hash of the name/value pairs, to use in pattern matching.
+ * Possible keys are: <tt>:year</tt>, <tt>:month</tt>, <tt>:day</tt>,
+ * <tt>:wday</tt>, <tt>:yday</tt>, <tt>:hour</tt>, <tt>:min</tt>,
+ * <tt>:sec</tt>, <tt>:sec_fraction</tt>, <tt>:zone</tt>.
+ *
+ * Possible usages:
+ *
+ * dt = DateTime.new(2022, 10, 5, 13, 30)
+ *
+ * if d in wday: 1..5, hour: 10..18 # uses deconstruct_keys underneath
+ * puts "Working time"
+ * end
+ * #=> prints "Working time"
+ *
+ * case dt
+ * in year: ...2022
+ * puts "too old"
+ * in month: ..9
+ * puts "quarter 1-3"
+ * in wday: 1..5, month:
+ * puts "working day in month #{month}"
+ * end
+ * #=> prints "working day in month 10"
+ *
+ * Note that deconstruction by pattern can also be combined with class check:
+ *
+ * if d in DateTime(wday: 1..5, hour: 10..18, day: ..7)
+ * puts "Working time, first week of the month"
+ * end
+ *
+ */
+static VALUE
+dt_lite_deconstruct_keys(VALUE self, VALUE keys)
+{
+ return deconstruct_keys(self, keys, /* is_datetime=true */ 1);
+}
+
/* conversions */
#define f_subsec(x) rb_funcall(x, rb_intern("subsec"), 0)
@@ -8583,7 +8954,7 @@ time_to_datetime(VALUE self)
ret = d_complex_new_internal(cDateTime,
nth, 0,
0, sf,
- of, DEFAULT_SG,
+ of, GREGORIAN,
ry, m, d,
h, min, s,
HAVE_CIVIL | HAVE_TIME);
@@ -8596,10 +8967,15 @@ time_to_datetime(VALUE self)
/*
* call-seq:
- * d.to_time -> time
+ * to_time -> time
+ *
+ * Returns a new Time object with the same value as +self+;
+ * if +self+ is a Julian date, derives its Gregorian date
+ * for conversion to the \Time object:
+ *
+ * Date.new(2001, 2, 3).to_time # => 2001-02-03 00:00:00 -0600
+ * Date.new(2001, 2, 3, Date::JULIAN).to_time # => 2001-02-16 00:00:00 -0600
*
- * Returns a Time object which denotes self. If self is a julian date,
- * convert it to a gregorian date before converting it to Time.
*/
static VALUE
date_to_time(VALUE self)
@@ -8620,9 +8996,9 @@ date_to_time(VALUE self)
/*
* call-seq:
- * d.to_date -> self
+ * to_date -> self
*
- * Returns self.
+ * Returns +self+.
*/
static VALUE
date_to_date(VALUE self)
@@ -8634,7 +9010,10 @@ date_to_date(VALUE self)
* call-seq:
* d.to_datetime -> datetime
*
- * Returns a DateTime object which denotes self.
+ * Returns a DateTime whose value is the same as +self+:
+ *
+ * Date.new(2001, 2, 3).to_datetime # => #<DateTime: 2001-02-03T00:00:00+00:00>
+ *
*/
static VALUE
date_to_datetime(VALUE self)
@@ -8679,12 +9058,17 @@ date_to_datetime(VALUE self)
static VALUE
datetime_to_time(VALUE self)
{
- volatile VALUE dup = dup_obj(self);
+ get_d1(self);
+
+ if (m_julian_p(dat)) {
+ self = d_lite_gregorian(self);
+ get_d1a(self);
+ dat = adat;
+ }
+
{
VALUE t;
- get_d1(dup);
-
t = rb_funcall(rb_cTime,
rb_intern("new"),
7,
@@ -8752,6 +9136,7 @@ datetime_to_datetime(VALUE self)
#define MIN_JD -327
#define MAX_JD 366963925
+/* :nodoc: */
static int
test_civil(int from, int to, double sg)
{
@@ -8772,6 +9157,7 @@ test_civil(int from, int to, double sg)
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_civil(VALUE klass)
{
@@ -8792,6 +9178,7 @@ date_s_test_civil(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static int
test_ordinal(int from, int to, double sg)
{
@@ -8812,6 +9199,7 @@ test_ordinal(int from, int to, double sg)
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_ordinal(VALUE klass)
{
@@ -8832,6 +9220,7 @@ date_s_test_ordinal(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static int
test_commercial(int from, int to, double sg)
{
@@ -8852,6 +9241,7 @@ test_commercial(int from, int to, double sg)
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_commercial(VALUE klass)
{
@@ -8872,6 +9262,7 @@ date_s_test_commercial(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static int
test_weeknum(int from, int to, int f, double sg)
{
@@ -8892,6 +9283,7 @@ test_weeknum(int from, int to, int f, double sg)
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_weeknum(VALUE klass)
{
@@ -8916,6 +9308,7 @@ date_s_test_weeknum(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static int
test_nth_kday(int from, int to, double sg)
{
@@ -8936,6 +9329,7 @@ test_nth_kday(int from, int to, double sg)
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_nth_kday(VALUE klass)
{
@@ -8956,6 +9350,7 @@ date_s_test_nth_kday(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static int
test_unit_v2v(VALUE i,
VALUE (* conv1)(VALUE),
@@ -8967,6 +9362,7 @@ test_unit_v2v(VALUE i,
return f_eqeq_p(o, i);
}
+/* :nodoc: */
static int
test_unit_v2v_iter2(VALUE (* conv1)(VALUE),
VALUE (* conv2)(VALUE))
@@ -8998,6 +9394,7 @@ test_unit_v2v_iter2(VALUE (* conv1)(VALUE),
return 1;
}
+/* :nodoc: */
static int
test_unit_v2v_iter(VALUE (* conv1)(VALUE),
VALUE (* conv2)(VALUE))
@@ -9009,6 +9406,7 @@ test_unit_v2v_iter(VALUE (* conv1)(VALUE),
return 1;
}
+/* :nodoc: */
static VALUE
date_s_test_unit_conv(VALUE klass)
{
@@ -9023,6 +9421,7 @@ date_s_test_unit_conv(VALUE klass)
return Qtrue;
}
+/* :nodoc: */
static VALUE
date_s_test_all(VALUE klass)
{
@@ -9089,6 +9488,7 @@ mk_ary_of_str(long len, const char *a[])
return o;
}
+/* :nodoc: */
static VALUE
d_lite_zero(VALUE x)
{
@@ -9098,13 +9498,24 @@ d_lite_zero(VALUE x)
void
Init_date_core(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
- id_cmp = rb_intern("<=>");
- id_le_p = rb_intern("<=");
- id_ge_p = rb_intern(">=");
- id_eqeq_p = rb_intern("==");
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
+ RB_EXT_RACTOR_SAFE(true);
+ #endif
+ id_cmp = rb_intern_const("<=>");
+ id_le_p = rb_intern_const("<=");
+ id_ge_p = rb_intern_const(">=");
+ id_eqeq_p = rb_intern_const("==");
+
+ sym_year = ID2SYM(rb_intern_const("year"));
+ sym_month = ID2SYM(rb_intern_const("month"));
+ sym_yday = ID2SYM(rb_intern_const("yday"));
+ sym_wday = ID2SYM(rb_intern_const("wday"));
+ sym_day = ID2SYM(rb_intern_const("day"));
+ sym_hour = ID2SYM(rb_intern_const("hour"));
+ sym_min = ID2SYM(rb_intern_const("min"));
+ sym_sec = ID2SYM(rb_intern_const("sec"));
+ sym_sec_fraction = ID2SYM(rb_intern_const("sec_fraction"));
+ sym_zone = ID2SYM(rb_intern_const("zone"));
half_days_in_day = rb_rational_new2(INT2FIX(1), INT2FIX(2));
@@ -9126,152 +9537,81 @@ Init_date_core(void)
negative_inf = -INFINITY;
/*
- * date and datetime class - Tadayoshi Funaba 1998-2011
- *
- * 'date' provides two classes: Date and DateTime.
- *
- * == Terms and Definitions
+ * \Class \Date provides methods for storing and manipulating
+ * calendar dates.
*
- * Some terms and definitions are based on ISO 8601 and JIS X 0301.
+ * Consider using
+ * {class Time}[rdoc-ref:Time]
+ * instead of class \Date if:
*
- * === Calendar Date
+ * - You need both dates and times; \Date handles only dates.
+ * - You need only Gregorian dates (and not Julian dates);
+ * see {Julian and Gregorian Calendars}[rdoc-ref:calendars.rdoc].
*
- * The calendar date is a particular day of a calendar year,
- * identified by its ordinal number within a calendar month within
- * that year.
+ * A \Date object, once created, is immutable, and cannot be modified.
*
- * In those classes, this is so-called "civil".
+ * == Creating a \Date
*
- * === Ordinal Date
+ * You can create a date for the current date, using Date.today:
*
- * The ordinal date is a particular day of a calendar year identified
- * by its ordinal number within the year.
+ * Date.today # => #<Date: 1999-12-31>
*
- * In those classes, this is so-called "ordinal".
+ * You can create a specific date from various combinations of arguments:
*
- * === Week Date
+ * - Date.new takes integer year, month, and day-of-month:
*
- * The week date is a date identified by calendar week and day numbers.
+ * Date.new(1999, 12, 31) # => #<Date: 1999-12-31>
*
- * The calendar week is a seven day period within a calendar year,
- * starting on a Monday and identified by its ordinal number within
- * the year; the first calendar week of the year is the one that
- * includes the first Thursday of that year. In the Gregorian
- * calendar, this is equivalent to the week which includes January 4.
+ * - Date.ordinal takes integer year and day-of-year:
*
- * In those classes, this is so-called "commercial".
+ * Date.ordinal(1999, 365) # => #<Date: 1999-12-31>
*
- * === Julian Day Number
+ * - Date.jd takes integer Julian day:
*
- * The Julian day number is in elapsed days since noon (Greenwich Mean
- * Time) on January 1, 4713 BCE (in the Julian calendar).
+ * Date.jd(2451544) # => #<Date: 1999-12-31>
*
- * In this document, the astronomical Julian day number is the same as
- * the original Julian day number. And the chronological Julian day
- * number is a variation of the Julian day number. Its days begin at
- * midnight on local time.
+ * - Date.commercial takes integer commercial data (year, week, day-of-week):
*
- * In this document, when the term "Julian day number" simply appears,
- * it just refers to "chronological Julian day number", not the
- * original.
+ * Date.commercial(1999, 52, 5) # => #<Date: 1999-12-31>
*
- * In those classes, those are so-called "ajd" and "jd".
+ * - Date.parse takes a string, which it parses heuristically:
*
- * === Modified Julian Day Number
+ * Date.parse('1999-12-31') # => #<Date: 1999-12-31>
+ * Date.parse('31-12-1999') # => #<Date: 1999-12-31>
+ * Date.parse('1999-365') # => #<Date: 1999-12-31>
+ * Date.parse('1999-W52-5') # => #<Date: 1999-12-31>
*
- * The modified Julian day number is in elapsed days since midnight
- * (Coordinated Universal Time) on November 17, 1858 CE (in the
- * Gregorian calendar).
+ * - Date.strptime takes a date string and a format string,
+ * then parses the date string according to the format string:
*
- * In this document, the astronomical modified Julian day number is
- * the same as the original modified Julian day number. And the
- * chronological modified Julian day number is a variation of the
- * modified Julian day number. Its days begin at midnight on local
- * time.
+ * Date.strptime('1999-12-31', '%Y-%m-%d') # => #<Date: 1999-12-31>
+ * Date.strptime('31-12-1999', '%d-%m-%Y') # => #<Date: 1999-12-31>
+ * Date.strptime('1999-365', '%Y-%j') # => #<Date: 1999-12-31>
+ * Date.strptime('1999-W52-5', '%G-W%V-%u') # => #<Date: 1999-12-31>
+ * Date.strptime('1999 52 5', '%Y %U %w') # => #<Date: 1999-12-31>
+ * Date.strptime('1999 52 5', '%Y %W %u') # => #<Date: 1999-12-31>
+ * Date.strptime('fri31dec99', '%a%d%b%y') # => #<Date: 1999-12-31>
*
- * In this document, when the term "modified Julian day number" simply
- * appears, it just refers to "chronological modified Julian day
- * number", not the original.
- *
- * In those classes, those are so-called "amjd" and "mjd".
- *
- * == Date
- *
- * A subclass of Object that includes the Comparable module and
- * easily handles date.
- *
- * A Date object is created with Date::new, Date::jd, Date::ordinal,
- * Date::commercial, Date::parse, Date::strptime, Date::today,
- * Time#to_date, etc.
- *
- * require 'date'
+ * See also the specialized methods in
+ * {"Specialized Format Strings" in Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings]
*
- * Date.new(2001,2,3)
- * #=> #<Date: 2001-02-03 ...>
- * Date.jd(2451944)
- * #=> #<Date: 2001-02-03 ...>
- * Date.ordinal(2001,34)
- * #=> #<Date: 2001-02-03 ...>
- * Date.commercial(2001,5,6)
- * #=> #<Date: 2001-02-03 ...>
- * Date.parse('2001-02-03')
- * #=> #<Date: 2001-02-03 ...>
- * Date.strptime('03-02-2001', '%d-%m-%Y')
- * #=> #<Date: 2001-02-03 ...>
- * Time.new(2001,2,3).to_date
- * #=> #<Date: 2001-02-03 ...>
+ * == Argument +limit+
*
- * All date objects are immutable; hence cannot modify themselves.
+ * Certain singleton methods in \Date that parse string arguments
+ * also take optional keyword argument +limit+,
+ * which can limit the length of the string argument.
*
- * The concept of a date object can be represented as a tuple
- * of the day count, the offset and the day of calendar reform.
+ * When +limit+ is:
*
- * The day count denotes the absolute position of a temporal
- * dimension. The offset is relative adjustment, which determines
- * decoded local time with the day count. The day of calendar
- * reform denotes the start day of the new style. The old style
- * of the West is the Julian calendar which was adopted by
- * Caesar. The new style is the Gregorian calendar, which is the
- * current civil calendar of many countries.
- *
- * The day count is virtually the astronomical Julian day number.
- * The offset in this class is usually zero, and cannot be
- * specified directly.
- *
- * A Date object can be created with an optional argument,
- * the day of calendar reform as a Julian day number, which
- * should be 2298874 to 2426355 or negative/positive infinity.
- * The default value is +Date::ITALY+ (2299161=1582-10-15).
- * See also sample/cal.rb.
- *
- * $ ruby sample/cal.rb -c it 10 1582
- * October 1582
- * S M Tu W Th F S
- * 1 2 3 4 15 16
- * 17 18 19 20 21 22 23
- * 24 25 26 27 28 29 30
- * 31
- *
- * $ ruby sample/cal.rb -c gb 9 1752
- * September 1752
- * S M Tu W Th F S
- * 1 2 14 15 16
- * 17 18 19 20 21 22 23
- * 24 25 26 27 28 29 30
- *
- * A Date object has various methods. See each reference.
- *
- * d = Date.parse('3rd Feb 2001')
- * #=> #<Date: 2001-02-03 ...>
- * d.year #=> 2001
- * d.mon #=> 2
- * d.mday #=> 3
- * d.wday #=> 6
- * d += 1 #=> #<Date: 2001-02-04 ...>
- * d.strftime('%a %d %b %Y') #=> "Sun 04 Feb 2001"
+ * - Non-negative:
+ * raises ArgumentError if the string length is greater than _limit_.
+ * - Other numeric or +nil+: ignores +limit+.
+ * - Other non-numeric: raises TypeError.
*
*/
cDate = rb_define_class("Date", rb_cObject);
+
+ /* Exception for invalid date/time */
eDateError = rb_define_class_under(cDate, "Error", rb_eArgError);
rb_include_module(cDate, rb_mComparable);
@@ -9379,19 +9719,19 @@ Init_date_core(void)
rb_define_singleton_method(cDate, "strptime", date_s_strptime, -1);
rb_define_singleton_method(cDate, "_parse", date_s__parse, -1);
rb_define_singleton_method(cDate, "parse", date_s_parse, -1);
- rb_define_singleton_method(cDate, "_iso8601", date_s__iso8601, 1);
+ rb_define_singleton_method(cDate, "_iso8601", date_s__iso8601, -1);
rb_define_singleton_method(cDate, "iso8601", date_s_iso8601, -1);
- rb_define_singleton_method(cDate, "_rfc3339", date_s__rfc3339, 1);
+ rb_define_singleton_method(cDate, "_rfc3339", date_s__rfc3339, -1);
rb_define_singleton_method(cDate, "rfc3339", date_s_rfc3339, -1);
- rb_define_singleton_method(cDate, "_xmlschema", date_s__xmlschema, 1);
+ rb_define_singleton_method(cDate, "_xmlschema", date_s__xmlschema, -1);
rb_define_singleton_method(cDate, "xmlschema", date_s_xmlschema, -1);
- rb_define_singleton_method(cDate, "_rfc2822", date_s__rfc2822, 1);
- rb_define_singleton_method(cDate, "_rfc822", date_s__rfc2822, 1);
+ rb_define_singleton_method(cDate, "_rfc2822", date_s__rfc2822, -1);
+ rb_define_singleton_method(cDate, "_rfc822", date_s__rfc2822, -1);
rb_define_singleton_method(cDate, "rfc2822", date_s_rfc2822, -1);
rb_define_singleton_method(cDate, "rfc822", date_s_rfc2822, -1);
- rb_define_singleton_method(cDate, "_httpdate", date_s__httpdate, 1);
+ rb_define_singleton_method(cDate, "_httpdate", date_s__httpdate, -1);
rb_define_singleton_method(cDate, "httpdate", date_s_httpdate, -1);
- rb_define_singleton_method(cDate, "_jisx0301", date_s__jisx0301, 1);
+ rb_define_singleton_method(cDate, "_jisx0301", date_s__jisx0301, -1);
rb_define_singleton_method(cDate, "jisx0301", date_s_jisx0301, -1);
rb_define_method(cDate, "initialize", date_initialize, -1);
@@ -9498,6 +9838,8 @@ Init_date_core(void)
rb_define_method(cDate, "httpdate", d_lite_httpdate, 0);
rb_define_method(cDate, "jisx0301", d_lite_jisx0301, 0);
+ rb_define_method(cDate, "deconstruct_keys", d_lite_deconstruct_keys, 1);
+
#ifndef NDEBUG
rb_define_method(cDate, "marshal_dump_old", d_lite_marshal_dump_old, 0);
#endif
@@ -9511,6 +9853,8 @@ Init_date_core(void)
* A subclass of Date that easily handles date, hour, minute, second,
* and offset.
*
+ * DateTime class is considered deprecated. Use Time class.
+ *
* DateTime does not consider any leap seconds, does not track
* any summer time rules.
*
@@ -9571,18 +9915,18 @@ Init_date_core(void)
* === When should you use DateTime and when should you use Time?
*
* It's a common misconception that
- * {William Shakespeare}[http://en.wikipedia.org/wiki/William_Shakespeare]
+ * {William Shakespeare}[https://en.wikipedia.org/wiki/William_Shakespeare]
* and
- * {Miguel de Cervantes}[http://en.wikipedia.org/wiki/Miguel_de_Cervantes]
+ * {Miguel de Cervantes}[https://en.wikipedia.org/wiki/Miguel_de_Cervantes]
* died on the same day in history -
* so much so that UNESCO named April 23 as
- * {World Book Day because of this fact}[http://en.wikipedia.org/wiki/World_Book_Day].
+ * {World Book Day because of this fact}[https://en.wikipedia.org/wiki/World_Book_Day].
* However, because England hadn't yet adopted the
- * {Gregorian Calendar Reform}[http://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform]
- * (and wouldn't until {1752}[http://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750])
+ * {Gregorian Calendar Reform}[https://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform]
+ * (and wouldn't until {1752}[https://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750])
* their deaths are actually 10 days apart.
* Since Ruby's Time class implements a
- * {proleptic Gregorian calendar}[http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar]
+ * {proleptic Gregorian calendar}[https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar]
* and has no concept of calendar reform there's no way
* to express this with Time objects. This is where DateTime steps in:
*
@@ -9626,7 +9970,7 @@ Init_date_core(void)
* #=> Fri, 04 May 1753 00:00:00 +0000
*
* As you can see, if we're accurately tracking the number of
- * {solar years}[http://en.wikipedia.org/wiki/Tropical_year]
+ * {solar years}[https://en.wikipedia.org/wiki/Tropical_year]
* since Shakespeare's birthday then the correct anniversary date
* would be the 4th May and not the 23rd April.
*
@@ -9638,10 +9982,10 @@ Init_date_core(void)
* making the same mistakes as UNESCO. If you also have to deal
* with timezones then best of luck - just bear in mind that
* you'll probably be dealing with
- * {local solar times}[http://en.wikipedia.org/wiki/Solar_time],
+ * {local solar times}[https://en.wikipedia.org/wiki/Solar_time],
* since it wasn't until the 19th century that the introduction
* of the railways necessitated the need for
- * {Standard Time}[http://en.wikipedia.org/wiki/Standard_time#Great_Britain]
+ * {Standard Time}[https://en.wikipedia.org/wiki/Standard_time#Great_Britain]
* and eventually timezones.
*/
@@ -9706,6 +10050,8 @@ Init_date_core(void)
rb_define_method(cDateTime, "rfc3339", dt_lite_rfc3339, -1);
rb_define_method(cDateTime, "jisx0301", dt_lite_jisx0301, -1);
+ rb_define_method(cDateTime, "deconstruct_keys", dt_lite_deconstruct_keys, 1);
+
/* conversions */
rb_define_method(rb_cTime, "to_time", time_to_time, 0);
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 519f29cbcb..c6f26ecb91 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -70,7 +70,7 @@ static size_t
digit_span(const char *s, const char *e)
{
size_t i = 0;
- while (s + i < e && isdigit(s[i])) i++;
+ while (s + i < e && isdigit((unsigned char)s[i])) i++;
return i;
}
@@ -110,7 +110,7 @@ s3e(VALUE hash, VALUE y, VALUE m, VALUE d, int bc)
s = RSTRING_PTR(y);
ep = RSTRING_END(y);
- while (s < ep && !issign(*s) && !isdigit(*s))
+ while (s < ep && !issign(*s) && !isdigit((unsigned char)*s))
s++;
if (s >= ep) goto no_date;
bp = s;
@@ -162,7 +162,7 @@ s3e(VALUE hash, VALUE y, VALUE m, VALUE d, int bc)
s = RSTRING_PTR(y);
ep = RSTRING_END(y);
- while (s < ep && !issign(*s) && !isdigit(*s))
+ while (s < ep && !issign(*s) && !isdigit((unsigned char)*s))
s++;
if (s >= ep) goto no_year;
bp = s;
@@ -199,7 +199,7 @@ s3e(VALUE hash, VALUE y, VALUE m, VALUE d, int bc)
s = RSTRING_PTR(m);
ep = RSTRING_END(m);
- while (s < ep && !isdigit(*s))
+ while (s < ep && !isdigit((unsigned char)*s))
s++;
if (s >= ep) goto no_month;
bp = s;
@@ -225,7 +225,7 @@ s3e(VALUE hash, VALUE y, VALUE m, VALUE d, int bc)
s = RSTRING_PTR(d);
ep = RSTRING_END(d);
- while (s < ep && !isdigit(*s))
+ while (s < ep && !isdigit((unsigned char)*s))
s++;
if (s >= ep) goto no_mday;
bp = s;
@@ -253,6 +253,8 @@ s3e(VALUE hash, VALUE y, VALUE m, VALUE d, int bc)
#define ABBR_DAYS "sun|mon|tue|wed|thu|fri|sat"
#define ABBR_MONTHS "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec"
+#define NUMBER "(?<!\\d)\\d"
+
#ifdef TIGHT_PARSER
#define VALID_DAYS "(?:" DAYS ")" "|(?:tues|wednes|thurs|thur|" ABBR_DAYS ")\\.?"
#define VALID_MONTHS "(?:" MONTHS ")" "|(?:sept|" ABBR_MONTHS ")\\.?"
@@ -276,6 +278,7 @@ regcomp(const char *source, long len, int opt)
VALUE pat;
pat = rb_reg_new(source, len, opt);
+ rb_obj_freeze(pat);
rb_gc_register_mark_object(pat);
return pat;
}
@@ -364,9 +367,9 @@ static int
str_end_with_word(const char *s, long l, const char *w)
{
int n = (int)strlen(w);
- if (l <= n || !isspace(s[l - n - 1])) return 0;
+ if (l <= n || !isspace((unsigned char)s[l - n - 1])) return 0;
if (strncasecmp(&s[l - n], w, n)) return 0;
- do ++n; while (l > n && isspace(s[l - n - 1]));
+ do ++n; while (l > n && isspace((unsigned char)s[l - n - 1]));
return n;
}
@@ -376,7 +379,7 @@ shrunk_size(const char *s, long l)
long i, ni;
int sp = 0;
for (i = ni = 0; i < l; ++i) {
- if (!isspace(s[i])) {
+ if (!isspace((unsigned char)s[i])) {
if (sp) ni++;
sp = 0;
ni++;
@@ -394,7 +397,7 @@ shrink_space(char *d, const char *s, long l)
long i, ni;
int sp = 0;
for (i = ni = 0; i < l; ++i) {
- if (!isspace(s[i])) {
+ if (!isspace((unsigned char)s[i])) {
if (sp) d[ni++] = ' ';
sp = 0;
d[ni++] = s[i];
@@ -410,7 +413,6 @@ VALUE
date_zone_to_diff(VALUE str)
{
VALUE offset = Qnil;
- VALUE vbuf = 0;
long l = RSTRING_LEN(str);
const char *s = RSTRING_PTR(str);
@@ -436,16 +438,26 @@ date_zone_to_diff(VALUE str)
l -= w;
dst = 1;
}
+
{
+ const char *zn = s;
long sl = shrunk_size(s, l);
+ char shrunk_buff[MAX_WORD_LENGTH]; /* no terminator to be added */
+ const struct zone *z = 0;
+
+ if (sl <= 0) {
+ sl = l;
+ }
+ else if (sl <= MAX_WORD_LENGTH) {
+ char *d = shrunk_buff;
+ sl = shrink_space(d, s, l);
+ zn = d;
+ }
+
if (sl > 0 && sl <= MAX_WORD_LENGTH) {
- char *d = ALLOCV_N(char, vbuf, sl);
- l = shrink_space(d, s, l);
- s = d;
+ z = zonetab(zn, (unsigned int)sl);
}
- }
- if (l > 0 && l <= MAX_WORD_LENGTH) {
- const struct zone *z = zonetab(s, (unsigned int)l);
+
if (z) {
int d = z->offset;
if (dst)
@@ -454,6 +466,7 @@ date_zone_to_diff(VALUE str)
goto ok;
}
}
+
{
char *p;
int sign = 0;
@@ -470,27 +483,53 @@ date_zone_to_diff(VALUE str)
s++;
l--;
+#define out_of_range(v, min, max) ((v) < (min) || (max) < (v))
hour = STRTOUL(s, &p, 10);
if (*p == ':') {
+ if (out_of_range(hour, 0, 23)) return Qnil;
s = ++p;
min = STRTOUL(s, &p, 10);
+ if (out_of_range(min, 0, 59)) return Qnil;
if (*p == ':') {
s = ++p;
sec = STRTOUL(s, &p, 10);
+ if (out_of_range(sec, 0, 59)) return Qnil;
}
- goto num;
}
- if (*p == ',' || *p == '.') {
- char *e = 0;
- p++;
- min = STRTOUL(p, &e, 10) * 3600;
+ else if (*p == ',' || *p == '.') {
+ /* fractional hour */
+ size_t n;
+ int ov;
+ /* no over precision for offset; 10**-7 hour = 0.36
+ * milliseconds should be enough. */
+ const size_t max_digits = 7; /* 36 * 10**7 < 32-bit FIXNUM_MAX */
+
+ if (out_of_range(hour, 0, 23)) return Qnil;
+
+ n = (s + l) - ++p;
+ if (n > max_digits) n = max_digits;
+ sec = ruby_scan_digits(p, n, 10, &n, &ov);
+ if ((p += n) < s + l && *p >= ('5' + !(sec & 1)) && *p <= '9') {
+ /* round half to even */
+ sec++;
+ }
+ sec *= 36;
if (sign) {
hour = -hour;
- min = -min;
+ sec = -sec;
+ }
+ if (n <= 2) {
+ /* HH.nn or HH.n */
+ if (n == 1) sec *= 10;
+ offset = INT2FIX(sec + hour * 3600);
+ }
+ else {
+ VALUE denom = rb_int_positive_pow(10, (int)(n - 2));
+ offset = f_add(rb_rational_new(INT2FIX(sec), denom), INT2FIX(hour * 3600));
+ if (rb_rational_den(offset) == INT2FIX(1)) {
+ offset = rb_rational_num(offset);
+ }
}
- offset = rb_rational_new(INT2FIX(min),
- rb_int_positive_pow(10, (int)(e - p)));
- offset = f_add(INT2FIX(hour * 3600), offset);
goto ok;
}
else if (l > 2) {
@@ -503,18 +542,16 @@ date_zone_to_diff(VALUE str)
min = ruby_scan_digits(&s[2 - l % 2], 2, 10, &n, &ov);
if (l >= 5)
sec = ruby_scan_digits(&s[4 - l % 2], 2, 10, &n, &ov);
- goto num;
}
- num:
sec += min * 60 + hour * 3600;
if (sign) sec = -sec;
offset = INT2FIX(sec);
+#undef out_of_range
}
}
}
RB_GC_GUARD(str);
ok:
- ALLOCV_END(vbuf);
return offset;
}
@@ -651,24 +688,27 @@ parse_time(VALUE str, VALUE hash)
{
static const char pat_source[] =
"("
+ "" NUMBER "+\\s*"
"(?:"
- "\\d+\\s*:\\s*\\d+"
"(?:"
+ ":\\s*\\d+"
+ "(?:"
#ifndef TIGHT_PARSER
- "\\s*:\\s*\\d+(?:[,.]\\d*)?"
+ "\\s*:\\s*\\d+(?:[,.]\\d*)?"
#else
- "\\s*:\\s*\\d+(?:[,.]\\d+)?"
+ "\\s*:\\s*\\d+(?:[,.]\\d+)?"
#endif
+ ")?"
+ "|"
+ "h(?:\\s*\\d+m?(?:\\s*\\d+s?)?)?"
+ ")"
+ "(?:"
+ "\\s*"
+ "[ap](?:m\\b|\\.m\\.)"
")?"
"|"
- "\\d+\\s*h(?:\\s*\\d+m?(?:\\s*\\d+s?)?)?"
- ")"
- "(?:"
- "\\s*"
"[ap](?:m\\b|\\.m\\.)"
- ")?"
- "|"
- "\\d+\\s*[ap](?:m\\b|\\.m\\.)"
+ ")"
")"
"(?:"
"\\s*"
@@ -690,6 +730,9 @@ parse_time(VALUE str, VALUE hash)
#endif
}
+#define BEGIN_ERA "\\b"
+#define END_ERA "(?!(?<!\\.)[a-z])"
+
#ifdef TIGHT_PARSER
static int
parse_era1_cb(VALUE m, VALUE hash)
@@ -701,7 +744,7 @@ static int
parse_era1(VALUE str, VALUE hash)
{
static const char pat_source[] =
- "(a(?:d|\\.d\\.))";
+ BEGIN_ERA "(a(?:d\\b|\\.d\\.))" END_ERA;
static VALUE pat = Qnil;
REGCOMP_I(pat);
@@ -723,8 +766,9 @@ parse_era2_cb(VALUE m, VALUE hash)
static int
parse_era2(VALUE str, VALUE hash)
{
- static const char pat_source[] =
- "(c(?:e|\\.e\\.)|b(?:ce|\\.c\\.e\\.)|b(?:c|\\.c\\.))";
+ static const char pat_source[] = BEGIN_ERA
+ "(c(?:e\\b|\\.e\\.)|b(?:ce\\b|\\.c\\.e\\.)|b(?:c\\b|\\.c\\.))"
+ END_ERA;
static VALUE pat = Qnil;
REGCOMP_I(pat);
@@ -754,8 +798,8 @@ check_year_width(VALUE y)
l = RSTRING_LEN(y);
if (l < 2) return 0;
s = RSTRING_PTR(y);
- if (!isdigit(s[1])) return 0;
- return (l == 2 || !isdigit(s[2]));
+ if (!isdigit((unsigned char)s[1])) return 0;
+ return (l == 2 || !isdigit((unsigned char)s[2]));
}
static int
@@ -828,7 +872,7 @@ parse_eu(VALUE str, VALUE hash)
FPW_COM FPT_COM
#endif
#ifndef TIGHT_PARSER
- "('?\\d+)[^-\\d\\s]*"
+ "('?" NUMBER "+)[^-\\d\\s]*"
#else
"(\\d+)(?:(?:st|nd|rd|th)\\b)?"
#endif
@@ -841,7 +885,11 @@ parse_eu(VALUE str, VALUE hash)
"(?:"
"\\s*"
#ifndef TIGHT_PARSER
- "(c(?:e|\\.e\\.)|b(?:ce|\\.c\\.e\\.)|a(?:d|\\.d\\.)|b(?:c|\\.c\\.))?"
+ "(?:"
+ BEGIN_ERA
+ "(c(?:e|\\.e\\.)|b(?:ce|\\.c\\.e\\.)|a(?:d|\\.d\\.)|b(?:c|\\.c\\.))"
+ END_ERA
+ ")?"
"\\s*"
"('?-?\\d+(?:(?:st|nd|rd|th)\\b)?)"
#else
@@ -918,8 +966,8 @@ parse_us(VALUE str, VALUE hash)
COM_FPT
#endif
"(?:"
- "\\s*,?"
- "\\s*"
+ "\\s*+,?"
+ "\\s*+"
#ifndef TIGHT_PARSER
"(c(?:e|\\.e\\.)|b(?:ce|\\.c\\.e\\.)|a(?:d|\\.d\\.)|b(?:c|\\.c\\.))?"
"\\s*"
@@ -966,7 +1014,7 @@ parse_iso(VALUE str, VALUE hash)
{
static const char pat_source[] =
#ifndef TIGHT_PARSER
- "('?[-+]?\\d+)-(\\d+)-('?-?\\d+)"
+ "('?[-+]?" NUMBER "+)-(\\d+)-('?-?\\d+)"
#else
BOS
FPW_COM FPT_COM
@@ -1320,7 +1368,7 @@ parse_vms11(VALUE str, VALUE hash)
{
static const char pat_source[] =
#ifndef TIGHT_PARSER
- "('?-?\\d+)-(" ABBR_MONTHS ")[^-/.]*"
+ "('?-?" NUMBER "+)-(" ABBR_MONTHS ")[^-/.]*"
"-('?-?\\d+)"
#else
BOS
@@ -1415,7 +1463,7 @@ parse_sla(VALUE str, VALUE hash)
{
static const char pat_source[] =
#ifndef TIGHT_PARSER
- "('?-?\\d+)/\\s*('?\\d+)(?:\\D\\s*('?-?\\d+))?"
+ "('?-?" NUMBER "+)/\\s*('?\\d+)(?:\\D\\s*('?-?\\d+))?"
#else
BOS
FPW_COM FPT_COM
@@ -1523,7 +1571,7 @@ parse_dot(VALUE str, VALUE hash)
{
static const char pat_source[] =
#ifndef TIGHT_PARSER
- "('?-?\\d+)\\.\\s*('?\\d+)\\.\\s*('?-?\\d+)"
+ "('?-?" NUMBER "+)\\.\\s*('?\\d+)\\.\\s*('?-?\\d+)"
#else
BOS
FPW_COM FPT_COM
@@ -1683,7 +1731,7 @@ parse_mday(VALUE str, VALUE hash)
{
static const char pat_source[] =
#ifndef TIGHT_PARSER
- "(\\d+)(st|nd|rd|th)\\b"
+ "(" NUMBER "+)(st|nd|rd|th)\\b"
#else
BOS
FPW_COM FPT_COM
@@ -1921,7 +1969,7 @@ parse_ddd(VALUE str, VALUE hash)
#ifdef TIGHT_PARSER
BOS
#endif
- "([-+]?)(\\d{2,14})"
+ "([-+]?)(" NUMBER "{2,14})"
"(?:"
"\\s*"
"t?"
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index 9d8167b612..d7f28989d6 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -393,7 +393,7 @@ date_strftime_with_tmx(char *s, const size_t maxsize, const char *format,
continue;
case 'v':
- STRFTIME("%e-%b-%Y");
+ STRFTIME("%e-%^b-%Y");
continue;
case 'w': /* weekday, Sunday == 0, 0 - 6 */
diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c
index 26d9fd11bf..f731629df1 100644
--- a/ext/date/date_strptime.c
+++ b/ext/date/date_strptime.c
@@ -10,28 +10,15 @@
static const char *day_names[] = {
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday",
- "Sun", "Mon", "Tue", "Wed",
- "Thu", "Fri", "Sat"
};
+static const int ABBREVIATED_DAY_NAME_LENGTH = 3;
static const char *month_names[] = {
"January", "February", "March", "April",
"May", "June", "July", "August", "September",
"October", "November", "December",
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-static const char *merid_names[] = {
- "am", "pm",
- "a.m.", "p.m."
-};
-
-static const char *extz_pats[] = {
- ":z",
- "::z",
- ":::z"
};
+static const int ABBREVIATED_MONTH_NAME_LENGTH = 3;
#define sizeof_array(o) (sizeof o / sizeof o[0])
@@ -75,7 +62,7 @@ num_pattern_p(const char *s)
#define NUM_PATTERN_P() num_pattern_p(&fmt[fi + 1])
static long
-read_digits(const char *s, VALUE *n, size_t width)
+read_digits(const char *s, size_t slen, VALUE *n, size_t width)
{
size_t l;
@@ -83,7 +70,7 @@ read_digits(const char *s, VALUE *n, size_t width)
return 0;
l = 0;
- while (ISDIGIT(s[l])) {
+ while (l < slen && ISDIGIT(s[l])) {
if (++l == width) break;
}
@@ -131,7 +118,7 @@ do { \
#define READ_DIGITS(n,w) \
do { \
size_t l; \
- l = read_digits(&str[si], &n, w); \
+ l = read_digits(&str[si], slen - si, &n, w); \
if (l == 0) \
fail(); \
si += l; \
@@ -161,6 +148,12 @@ do { \
VALUE date_zone_to_diff(VALUE);
+static inline int
+head_match_p(size_t len, const char *name, const char *str, size_t slen, size_t si)
+{
+ return slen - si >= len && strncasecmp(name, &str[si], len) == 0;
+}
+
static size_t
date__strptime_internal(const char *str, size_t slen,
const char *fmt, size_t flen, VALUE hash)
@@ -168,9 +161,18 @@ date__strptime_internal(const char *str, size_t slen,
size_t si, fi;
int c;
+#define HEAD_MATCH_P(len, name) head_match_p(len, name, str, slen, si)
si = fi = 0;
while (fi < flen) {
+ if (isspace((unsigned char)fmt[fi])) {
+ while (si < slen && isspace((unsigned char)str[si]))
+ si++;
+ while (++fi < flen && isspace((unsigned char)fmt[fi]));
+ continue;
+ }
+
+ if (si >= slen) fail();
switch (fmt[fi]) {
case '%':
@@ -194,12 +196,11 @@ date__strptime_internal(const char *str, size_t slen,
{
int i;
- for (i = 0; i < (int)sizeof_array(extz_pats); i++)
- if (strncmp(extz_pats[i], &fmt[fi],
- strlen(extz_pats[i])) == 0) {
- fi += i;
- goto again;
- }
+ for (i = 1; i < 3 && fi + i < flen && fmt[fi+i] == ':'; ++i);
+ if (fmt[fi+i] == 'z') {
+ fi += i - 1;
+ goto again;
+ }
fail();
}
@@ -209,10 +210,12 @@ date__strptime_internal(const char *str, size_t slen,
int i;
for (i = 0; i < (int)sizeof_array(day_names); i++) {
- size_t l = strlen(day_names[i]);
- if (strncasecmp(day_names[i], &str[si], l) == 0) {
+ const char *day_name = day_names[i];
+ size_t l = strlen(day_name);
+ if (HEAD_MATCH_P(l, day_name) ||
+ HEAD_MATCH_P(l = ABBREVIATED_DAY_NAME_LENGTH, day_name)) {
si += l;
- set_hash("wday", INT2FIX(i % 7));
+ set_hash("wday", INT2FIX(i));
goto matched;
}
}
@@ -225,10 +228,12 @@ date__strptime_internal(const char *str, size_t slen,
int i;
for (i = 0; i < (int)sizeof_array(month_names); i++) {
- size_t l = strlen(month_names[i]);
- if (strncasecmp(month_names[i], &str[si], l) == 0) {
+ const char *month_name = month_names[i];
+ size_t l = strlen(month_name);
+ if (HEAD_MATCH_P(l, month_name) ||
+ HEAD_MATCH_P(l = ABBREVIATED_MONTH_NAME_LENGTH, month_name)) {
si += l;
- set_hash("mon", INT2FIX((i % 12) + 1));
+ set_hash("mon", INT2FIX(i + 1));
goto matched;
}
}
@@ -402,18 +407,19 @@ date__strptime_internal(const char *str, size_t slen,
case 'P':
case 'p':
+ if (slen - si < 2) fail();
{
- int i;
-
- for (i = 0; i < 4; i++) {
- size_t l = strlen(merid_names[i]);
- if (strncasecmp(merid_names[i], &str[si], l) == 0) {
- si += l;
- set_hash("_merid", INT2FIX((i % 2) == 0 ? 0 : 12));
- goto matched;
- }
+ char c = str[si];
+ const int hour = (c == 'P' || c == 'p') ? 12 : 0;
+ if (!hour && !(c == 'A' || c == 'a')) fail();
+ if ((c = str[si+1]) == '.') {
+ if (slen - si < 4 || str[si+3] != '.') fail();
+ c = str[si += 2];
}
- fail();
+ if (!(c == 'M' || c == 'm')) fail();
+ si += 2;
+ set_hash("_merid", INT2FIX(hour));
+ goto matched;
}
case 'Q':
@@ -581,12 +587,13 @@ date__strptime_internal(const char *str, size_t slen,
if (NIL_P(pat)) {
pat = rb_reg_new(pat_source, sizeof pat_source - 1,
ONIG_OPTION_IGNORECASE);
+ rb_obj_freeze(pat);
rb_gc_register_mark_object(pat);
}
b = rb_backref_get();
rb_match_busy(b);
- m = f_match(pat, rb_usascii_str_new2(&str[si]));
+ m = f_match(pat, rb_usascii_str_new(&str[si], slen - si));
if (!NIL_P(m)) {
VALUE s, l, o;
@@ -618,22 +625,13 @@ date__strptime_internal(const char *str, size_t slen,
if (str[si] != '%')
fail();
si++;
- if (fi < flen)
- if (str[si] != fmt[fi])
+ if (fi < flen) {
+ if (si >= slen || str[si] != fmt[fi])
fail();
- si++;
+ si++;
+ }
goto matched;
}
- case ' ':
- case '\t':
- case '\n':
- case '\v':
- case '\f':
- case '\r':
- while (isspace((unsigned char)str[si]))
- si++;
- fi++;
- break;
default:
ordinal:
if (str[si] != fmt[fi])
diff --git a/ext/date/depend b/ext/date/depend
index 28847bef13..3f550cd0a7 100644
--- a/ext/date/depend
+++ b/ext/date/depend
@@ -4,9 +4,166 @@ date_core.o: $(arch_hdrdir)/ruby/config.h
date_core.o: $(hdrdir)/ruby.h
date_core.o: $(hdrdir)/ruby/assert.h
date_core.o: $(hdrdir)/ruby/backward.h
+date_core.o: $(hdrdir)/ruby/backward/2/assume.h
+date_core.o: $(hdrdir)/ruby/backward/2/attributes.h
+date_core.o: $(hdrdir)/ruby/backward/2/bool.h
+date_core.o: $(hdrdir)/ruby/backward/2/inttypes.h
+date_core.o: $(hdrdir)/ruby/backward/2/limits.h
+date_core.o: $(hdrdir)/ruby/backward/2/long_long.h
+date_core.o: $(hdrdir)/ruby/backward/2/stdalign.h
+date_core.o: $(hdrdir)/ruby/backward/2/stdarg.h
date_core.o: $(hdrdir)/ruby/defines.h
date_core.o: $(hdrdir)/ruby/encoding.h
date_core.o: $(hdrdir)/ruby/intern.h
+date_core.o: $(hdrdir)/ruby/internal/abi.h
+date_core.o: $(hdrdir)/ruby/internal/anyargs.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+date_core.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+date_core.o: $(hdrdir)/ruby/internal/assume.h
+date_core.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+date_core.o: $(hdrdir)/ruby/internal/attr/artificial.h
+date_core.o: $(hdrdir)/ruby/internal/attr/cold.h
+date_core.o: $(hdrdir)/ruby/internal/attr/const.h
+date_core.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+date_core.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+date_core.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+date_core.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+date_core.o: $(hdrdir)/ruby/internal/attr/error.h
+date_core.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+date_core.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+date_core.o: $(hdrdir)/ruby/internal/attr/format.h
+date_core.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+date_core.o: $(hdrdir)/ruby/internal/attr/noalias.h
+date_core.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+date_core.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+date_core.o: $(hdrdir)/ruby/internal/attr/noinline.h
+date_core.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+date_core.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+date_core.o: $(hdrdir)/ruby/internal/attr/pure.h
+date_core.o: $(hdrdir)/ruby/internal/attr/restrict.h
+date_core.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+date_core.o: $(hdrdir)/ruby/internal/attr/warning.h
+date_core.o: $(hdrdir)/ruby/internal/attr/weakref.h
+date_core.o: $(hdrdir)/ruby/internal/cast.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+date_core.o: $(hdrdir)/ruby/internal/compiler_since.h
+date_core.o: $(hdrdir)/ruby/internal/config.h
+date_core.o: $(hdrdir)/ruby/internal/constant_p.h
+date_core.o: $(hdrdir)/ruby/internal/core.h
+date_core.o: $(hdrdir)/ruby/internal/core/rarray.h
+date_core.o: $(hdrdir)/ruby/internal/core/rbasic.h
+date_core.o: $(hdrdir)/ruby/internal/core/rbignum.h
+date_core.o: $(hdrdir)/ruby/internal/core/rclass.h
+date_core.o: $(hdrdir)/ruby/internal/core/rdata.h
+date_core.o: $(hdrdir)/ruby/internal/core/rfile.h
+date_core.o: $(hdrdir)/ruby/internal/core/rhash.h
+date_core.o: $(hdrdir)/ruby/internal/core/robject.h
+date_core.o: $(hdrdir)/ruby/internal/core/rregexp.h
+date_core.o: $(hdrdir)/ruby/internal/core/rstring.h
+date_core.o: $(hdrdir)/ruby/internal/core/rstruct.h
+date_core.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+date_core.o: $(hdrdir)/ruby/internal/ctype.h
+date_core.o: $(hdrdir)/ruby/internal/dllexport.h
+date_core.o: $(hdrdir)/ruby/internal/dosish.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/re.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/string.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+date_core.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+date_core.o: $(hdrdir)/ruby/internal/error.h
+date_core.o: $(hdrdir)/ruby/internal/eval.h
+date_core.o: $(hdrdir)/ruby/internal/event.h
+date_core.o: $(hdrdir)/ruby/internal/fl_type.h
+date_core.o: $(hdrdir)/ruby/internal/gc.h
+date_core.o: $(hdrdir)/ruby/internal/glob.h
+date_core.o: $(hdrdir)/ruby/internal/globals.h
+date_core.o: $(hdrdir)/ruby/internal/has/attribute.h
+date_core.o: $(hdrdir)/ruby/internal/has/builtin.h
+date_core.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+date_core.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+date_core.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+date_core.o: $(hdrdir)/ruby/internal/has/extension.h
+date_core.o: $(hdrdir)/ruby/internal/has/feature.h
+date_core.o: $(hdrdir)/ruby/internal/has/warning.h
+date_core.o: $(hdrdir)/ruby/internal/intern/array.h
+date_core.o: $(hdrdir)/ruby/internal/intern/bignum.h
+date_core.o: $(hdrdir)/ruby/internal/intern/class.h
+date_core.o: $(hdrdir)/ruby/internal/intern/compar.h
+date_core.o: $(hdrdir)/ruby/internal/intern/complex.h
+date_core.o: $(hdrdir)/ruby/internal/intern/cont.h
+date_core.o: $(hdrdir)/ruby/internal/intern/dir.h
+date_core.o: $(hdrdir)/ruby/internal/intern/enum.h
+date_core.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+date_core.o: $(hdrdir)/ruby/internal/intern/error.h
+date_core.o: $(hdrdir)/ruby/internal/intern/eval.h
+date_core.o: $(hdrdir)/ruby/internal/intern/file.h
+date_core.o: $(hdrdir)/ruby/internal/intern/gc.h
+date_core.o: $(hdrdir)/ruby/internal/intern/hash.h
+date_core.o: $(hdrdir)/ruby/internal/intern/io.h
+date_core.o: $(hdrdir)/ruby/internal/intern/load.h
+date_core.o: $(hdrdir)/ruby/internal/intern/marshal.h
+date_core.o: $(hdrdir)/ruby/internal/intern/numeric.h
+date_core.o: $(hdrdir)/ruby/internal/intern/object.h
+date_core.o: $(hdrdir)/ruby/internal/intern/parse.h
+date_core.o: $(hdrdir)/ruby/internal/intern/proc.h
+date_core.o: $(hdrdir)/ruby/internal/intern/process.h
+date_core.o: $(hdrdir)/ruby/internal/intern/random.h
+date_core.o: $(hdrdir)/ruby/internal/intern/range.h
+date_core.o: $(hdrdir)/ruby/internal/intern/rational.h
+date_core.o: $(hdrdir)/ruby/internal/intern/re.h
+date_core.o: $(hdrdir)/ruby/internal/intern/ruby.h
+date_core.o: $(hdrdir)/ruby/internal/intern/select.h
+date_core.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+date_core.o: $(hdrdir)/ruby/internal/intern/signal.h
+date_core.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+date_core.o: $(hdrdir)/ruby/internal/intern/string.h
+date_core.o: $(hdrdir)/ruby/internal/intern/struct.h
+date_core.o: $(hdrdir)/ruby/internal/intern/thread.h
+date_core.o: $(hdrdir)/ruby/internal/intern/time.h
+date_core.o: $(hdrdir)/ruby/internal/intern/variable.h
+date_core.o: $(hdrdir)/ruby/internal/intern/vm.h
+date_core.o: $(hdrdir)/ruby/internal/interpreter.h
+date_core.o: $(hdrdir)/ruby/internal/iterator.h
+date_core.o: $(hdrdir)/ruby/internal/memory.h
+date_core.o: $(hdrdir)/ruby/internal/method.h
+date_core.o: $(hdrdir)/ruby/internal/module.h
+date_core.o: $(hdrdir)/ruby/internal/newobj.h
+date_core.o: $(hdrdir)/ruby/internal/rgengc.h
+date_core.o: $(hdrdir)/ruby/internal/scan_args.h
+date_core.o: $(hdrdir)/ruby/internal/special_consts.h
+date_core.o: $(hdrdir)/ruby/internal/static_assert.h
+date_core.o: $(hdrdir)/ruby/internal/stdalign.h
+date_core.o: $(hdrdir)/ruby/internal/stdbool.h
+date_core.o: $(hdrdir)/ruby/internal/symbol.h
+date_core.o: $(hdrdir)/ruby/internal/value.h
+date_core.o: $(hdrdir)/ruby/internal/value_type.h
+date_core.o: $(hdrdir)/ruby/internal/variable.h
+date_core.o: $(hdrdir)/ruby/internal/warning_push.h
+date_core.o: $(hdrdir)/ruby/internal/xmalloc.h
date_core.o: $(hdrdir)/ruby/missing.h
date_core.o: $(hdrdir)/ruby/onigmo.h
date_core.o: $(hdrdir)/ruby/oniguruma.h
@@ -21,9 +178,167 @@ date_parse.o: $(arch_hdrdir)/ruby/config.h
date_parse.o: $(hdrdir)/ruby.h
date_parse.o: $(hdrdir)/ruby/assert.h
date_parse.o: $(hdrdir)/ruby/backward.h
+date_parse.o: $(hdrdir)/ruby/backward/2/assume.h
+date_parse.o: $(hdrdir)/ruby/backward/2/attributes.h
+date_parse.o: $(hdrdir)/ruby/backward/2/bool.h
+date_parse.o: $(hdrdir)/ruby/backward/2/inttypes.h
+date_parse.o: $(hdrdir)/ruby/backward/2/limits.h
+date_parse.o: $(hdrdir)/ruby/backward/2/long_long.h
+date_parse.o: $(hdrdir)/ruby/backward/2/stdalign.h
+date_parse.o: $(hdrdir)/ruby/backward/2/stdarg.h
date_parse.o: $(hdrdir)/ruby/defines.h
date_parse.o: $(hdrdir)/ruby/encoding.h
date_parse.o: $(hdrdir)/ruby/intern.h
+date_parse.o: $(hdrdir)/ruby/internal/abi.h
+date_parse.o: $(hdrdir)/ruby/internal/anyargs.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+date_parse.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+date_parse.o: $(hdrdir)/ruby/internal/assume.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/artificial.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/cold.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/const.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/error.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/format.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/noalias.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/noinline.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/pure.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/restrict.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/warning.h
+date_parse.o: $(hdrdir)/ruby/internal/attr/weakref.h
+date_parse.o: $(hdrdir)/ruby/internal/cast.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+date_parse.o: $(hdrdir)/ruby/internal/compiler_since.h
+date_parse.o: $(hdrdir)/ruby/internal/config.h
+date_parse.o: $(hdrdir)/ruby/internal/constant_p.h
+date_parse.o: $(hdrdir)/ruby/internal/core.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rarray.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rbasic.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rbignum.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rclass.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rdata.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rfile.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rhash.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rmatch.h
+date_parse.o: $(hdrdir)/ruby/internal/core/robject.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rregexp.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rstring.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rstruct.h
+date_parse.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+date_parse.o: $(hdrdir)/ruby/internal/ctype.h
+date_parse.o: $(hdrdir)/ruby/internal/dllexport.h
+date_parse.o: $(hdrdir)/ruby/internal/dosish.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/re.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/string.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+date_parse.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+date_parse.o: $(hdrdir)/ruby/internal/error.h
+date_parse.o: $(hdrdir)/ruby/internal/eval.h
+date_parse.o: $(hdrdir)/ruby/internal/event.h
+date_parse.o: $(hdrdir)/ruby/internal/fl_type.h
+date_parse.o: $(hdrdir)/ruby/internal/gc.h
+date_parse.o: $(hdrdir)/ruby/internal/glob.h
+date_parse.o: $(hdrdir)/ruby/internal/globals.h
+date_parse.o: $(hdrdir)/ruby/internal/has/attribute.h
+date_parse.o: $(hdrdir)/ruby/internal/has/builtin.h
+date_parse.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+date_parse.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+date_parse.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+date_parse.o: $(hdrdir)/ruby/internal/has/extension.h
+date_parse.o: $(hdrdir)/ruby/internal/has/feature.h
+date_parse.o: $(hdrdir)/ruby/internal/has/warning.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/array.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/bignum.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/class.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/compar.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/complex.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/cont.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/dir.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/enum.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/error.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/eval.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/file.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/gc.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/hash.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/io.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/load.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/marshal.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/numeric.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/object.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/parse.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/proc.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/process.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/random.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/range.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/rational.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/re.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/ruby.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/select.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/signal.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/string.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/struct.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/thread.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/time.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/variable.h
+date_parse.o: $(hdrdir)/ruby/internal/intern/vm.h
+date_parse.o: $(hdrdir)/ruby/internal/interpreter.h
+date_parse.o: $(hdrdir)/ruby/internal/iterator.h
+date_parse.o: $(hdrdir)/ruby/internal/memory.h
+date_parse.o: $(hdrdir)/ruby/internal/method.h
+date_parse.o: $(hdrdir)/ruby/internal/module.h
+date_parse.o: $(hdrdir)/ruby/internal/newobj.h
+date_parse.o: $(hdrdir)/ruby/internal/rgengc.h
+date_parse.o: $(hdrdir)/ruby/internal/scan_args.h
+date_parse.o: $(hdrdir)/ruby/internal/special_consts.h
+date_parse.o: $(hdrdir)/ruby/internal/static_assert.h
+date_parse.o: $(hdrdir)/ruby/internal/stdalign.h
+date_parse.o: $(hdrdir)/ruby/internal/stdbool.h
+date_parse.o: $(hdrdir)/ruby/internal/symbol.h
+date_parse.o: $(hdrdir)/ruby/internal/value.h
+date_parse.o: $(hdrdir)/ruby/internal/value_type.h
+date_parse.o: $(hdrdir)/ruby/internal/variable.h
+date_parse.o: $(hdrdir)/ruby/internal/warning_push.h
+date_parse.o: $(hdrdir)/ruby/internal/xmalloc.h
date_parse.o: $(hdrdir)/ruby/missing.h
date_parse.o: $(hdrdir)/ruby/onigmo.h
date_parse.o: $(hdrdir)/ruby/oniguruma.h
@@ -39,8 +354,156 @@ date_strftime.o: $(RUBY_EXTCONF_H)
date_strftime.o: $(arch_hdrdir)/ruby/config.h
date_strftime.o: $(hdrdir)/ruby/assert.h
date_strftime.o: $(hdrdir)/ruby/backward.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/assume.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/attributes.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/bool.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/inttypes.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/limits.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/long_long.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/stdalign.h
+date_strftime.o: $(hdrdir)/ruby/backward/2/stdarg.h
date_strftime.o: $(hdrdir)/ruby/defines.h
date_strftime.o: $(hdrdir)/ruby/intern.h
+date_strftime.o: $(hdrdir)/ruby/internal/abi.h
+date_strftime.o: $(hdrdir)/ruby/internal/anyargs.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+date_strftime.o: $(hdrdir)/ruby/internal/assume.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/artificial.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/cold.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/const.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/error.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/format.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/noalias.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/noinline.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/pure.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/restrict.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/warning.h
+date_strftime.o: $(hdrdir)/ruby/internal/attr/weakref.h
+date_strftime.o: $(hdrdir)/ruby/internal/cast.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+date_strftime.o: $(hdrdir)/ruby/internal/compiler_since.h
+date_strftime.o: $(hdrdir)/ruby/internal/config.h
+date_strftime.o: $(hdrdir)/ruby/internal/constant_p.h
+date_strftime.o: $(hdrdir)/ruby/internal/core.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rarray.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rbasic.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rbignum.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rclass.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rdata.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rfile.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rhash.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/robject.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rregexp.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rstring.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rstruct.h
+date_strftime.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+date_strftime.o: $(hdrdir)/ruby/internal/ctype.h
+date_strftime.o: $(hdrdir)/ruby/internal/dllexport.h
+date_strftime.o: $(hdrdir)/ruby/internal/dosish.h
+date_strftime.o: $(hdrdir)/ruby/internal/error.h
+date_strftime.o: $(hdrdir)/ruby/internal/eval.h
+date_strftime.o: $(hdrdir)/ruby/internal/event.h
+date_strftime.o: $(hdrdir)/ruby/internal/fl_type.h
+date_strftime.o: $(hdrdir)/ruby/internal/gc.h
+date_strftime.o: $(hdrdir)/ruby/internal/glob.h
+date_strftime.o: $(hdrdir)/ruby/internal/globals.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/attribute.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/builtin.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/extension.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/feature.h
+date_strftime.o: $(hdrdir)/ruby/internal/has/warning.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/array.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/bignum.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/class.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/compar.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/complex.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/cont.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/dir.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/enum.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/error.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/eval.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/file.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/gc.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/hash.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/io.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/load.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/marshal.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/numeric.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/object.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/parse.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/proc.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/process.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/random.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/range.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/rational.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/re.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/ruby.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/select.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/signal.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/string.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/struct.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/thread.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/time.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/variable.h
+date_strftime.o: $(hdrdir)/ruby/internal/intern/vm.h
+date_strftime.o: $(hdrdir)/ruby/internal/interpreter.h
+date_strftime.o: $(hdrdir)/ruby/internal/iterator.h
+date_strftime.o: $(hdrdir)/ruby/internal/memory.h
+date_strftime.o: $(hdrdir)/ruby/internal/method.h
+date_strftime.o: $(hdrdir)/ruby/internal/module.h
+date_strftime.o: $(hdrdir)/ruby/internal/newobj.h
+date_strftime.o: $(hdrdir)/ruby/internal/rgengc.h
+date_strftime.o: $(hdrdir)/ruby/internal/scan_args.h
+date_strftime.o: $(hdrdir)/ruby/internal/special_consts.h
+date_strftime.o: $(hdrdir)/ruby/internal/static_assert.h
+date_strftime.o: $(hdrdir)/ruby/internal/stdalign.h
+date_strftime.o: $(hdrdir)/ruby/internal/stdbool.h
+date_strftime.o: $(hdrdir)/ruby/internal/symbol.h
+date_strftime.o: $(hdrdir)/ruby/internal/value.h
+date_strftime.o: $(hdrdir)/ruby/internal/value_type.h
+date_strftime.o: $(hdrdir)/ruby/internal/variable.h
+date_strftime.o: $(hdrdir)/ruby/internal/warning_push.h
+date_strftime.o: $(hdrdir)/ruby/internal/xmalloc.h
date_strftime.o: $(hdrdir)/ruby/missing.h
date_strftime.o: $(hdrdir)/ruby/ruby.h
date_strftime.o: $(hdrdir)/ruby/st.h
@@ -52,9 +515,167 @@ date_strptime.o: $(arch_hdrdir)/ruby/config.h
date_strptime.o: $(hdrdir)/ruby.h
date_strptime.o: $(hdrdir)/ruby/assert.h
date_strptime.o: $(hdrdir)/ruby/backward.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/assume.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/attributes.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/bool.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/inttypes.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/limits.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/long_long.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/stdalign.h
+date_strptime.o: $(hdrdir)/ruby/backward/2/stdarg.h
date_strptime.o: $(hdrdir)/ruby/defines.h
date_strptime.o: $(hdrdir)/ruby/encoding.h
date_strptime.o: $(hdrdir)/ruby/intern.h
+date_strptime.o: $(hdrdir)/ruby/internal/abi.h
+date_strptime.o: $(hdrdir)/ruby/internal/anyargs.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+date_strptime.o: $(hdrdir)/ruby/internal/assume.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/artificial.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/cold.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/const.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/error.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/format.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/noalias.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/noinline.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/pure.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/restrict.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/warning.h
+date_strptime.o: $(hdrdir)/ruby/internal/attr/weakref.h
+date_strptime.o: $(hdrdir)/ruby/internal/cast.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+date_strptime.o: $(hdrdir)/ruby/internal/compiler_since.h
+date_strptime.o: $(hdrdir)/ruby/internal/config.h
+date_strptime.o: $(hdrdir)/ruby/internal/constant_p.h
+date_strptime.o: $(hdrdir)/ruby/internal/core.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rarray.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rbasic.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rbignum.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rclass.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rdata.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rfile.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rhash.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rmatch.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/robject.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rregexp.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rstring.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rstruct.h
+date_strptime.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+date_strptime.o: $(hdrdir)/ruby/internal/ctype.h
+date_strptime.o: $(hdrdir)/ruby/internal/dllexport.h
+date_strptime.o: $(hdrdir)/ruby/internal/dosish.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/re.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/string.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+date_strptime.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+date_strptime.o: $(hdrdir)/ruby/internal/error.h
+date_strptime.o: $(hdrdir)/ruby/internal/eval.h
+date_strptime.o: $(hdrdir)/ruby/internal/event.h
+date_strptime.o: $(hdrdir)/ruby/internal/fl_type.h
+date_strptime.o: $(hdrdir)/ruby/internal/gc.h
+date_strptime.o: $(hdrdir)/ruby/internal/glob.h
+date_strptime.o: $(hdrdir)/ruby/internal/globals.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/attribute.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/builtin.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/extension.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/feature.h
+date_strptime.o: $(hdrdir)/ruby/internal/has/warning.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/array.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/bignum.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/class.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/compar.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/complex.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/cont.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/dir.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/enum.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/error.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/eval.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/file.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/gc.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/hash.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/io.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/load.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/marshal.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/numeric.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/object.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/parse.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/proc.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/process.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/random.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/range.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/rational.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/re.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/ruby.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/select.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/signal.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/string.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/struct.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/thread.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/time.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/variable.h
+date_strptime.o: $(hdrdir)/ruby/internal/intern/vm.h
+date_strptime.o: $(hdrdir)/ruby/internal/interpreter.h
+date_strptime.o: $(hdrdir)/ruby/internal/iterator.h
+date_strptime.o: $(hdrdir)/ruby/internal/memory.h
+date_strptime.o: $(hdrdir)/ruby/internal/method.h
+date_strptime.o: $(hdrdir)/ruby/internal/module.h
+date_strptime.o: $(hdrdir)/ruby/internal/newobj.h
+date_strptime.o: $(hdrdir)/ruby/internal/rgengc.h
+date_strptime.o: $(hdrdir)/ruby/internal/scan_args.h
+date_strptime.o: $(hdrdir)/ruby/internal/special_consts.h
+date_strptime.o: $(hdrdir)/ruby/internal/static_assert.h
+date_strptime.o: $(hdrdir)/ruby/internal/stdalign.h
+date_strptime.o: $(hdrdir)/ruby/internal/stdbool.h
+date_strptime.o: $(hdrdir)/ruby/internal/symbol.h
+date_strptime.o: $(hdrdir)/ruby/internal/value.h
+date_strptime.o: $(hdrdir)/ruby/internal/value_type.h
+date_strptime.o: $(hdrdir)/ruby/internal/variable.h
+date_strptime.o: $(hdrdir)/ruby/internal/warning_push.h
+date_strptime.o: $(hdrdir)/ruby/internal/xmalloc.h
date_strptime.o: $(hdrdir)/ruby/missing.h
date_strptime.o: $(hdrdir)/ruby/onigmo.h
date_strptime.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/date/extconf.rb b/ext/date/extconf.rb
index 8938df13b3..358f64173a 100644
--- a/ext/date/extconf.rb
+++ b/ext/date/extconf.rb
@@ -3,7 +3,10 @@ require 'mkmf'
config_string("strict_warnflags") {|w| $warnflags += " #{w}"}
-have_var("timezone", "time.h")
-have_var("altzone", "time.h")
+have_func("rb_category_warn")
+with_werror("", {:werror => true}) do |opt, |
+ have_var("timezone", "time.h", opt)
+ have_var("altzone", "time.h", opt)
+end
create_makefile('date_core')
diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb
index b72b4157f2..a9fe3ce4b0 100644
--- a/ext/date/lib/date.rb
+++ b/ext/date/lib/date.rb
@@ -4,15 +4,18 @@
require 'date_core'
class Date
+ VERSION = "3.3.3" # :nodoc:
+ # call-seq:
+ # infinite? -> false
+ #
+ # Returns +false+
def infinite?
false
end
class Infinity < Numeric # :nodoc:
- include Comparable
-
def initialize(d=1) @d = d <=> 0 end
def d() @d end
@@ -32,6 +35,8 @@ class Date
def <=>(other)
case other
when Infinity; return d <=> other.d
+ when Float::INFINITY; return d <=> 1
+ when -Float::INFINITY; return d <=> -1
when Numeric; return d
else
begin
diff --git a/ext/date/prereq.mk b/ext/date/prereq.mk
index fa371e0d47..cee7685975 100644
--- a/ext/date/prereq.mk
+++ b/ext/date/prereq.mk
@@ -9,4 +9,11 @@ zonetab.h: zonetab.list
.PHONY: update-zonetab
update-zonetab:
- $(RUBY) -C $(srcdir) update-abbr.rb
+ $(RUBY) -C $(srcdir) update-abbr
+
+.PHONY: update-nothing
+update-nothing:
+
+update = nothing
+
+zonetab.list: update-$(update)
diff --git a/ext/date/update-abbr b/ext/date/update-abbr
index e5f6a78c82..7fe9734e6d 100644
--- a/ext/date/update-abbr
+++ b/ext/date/update-abbr
@@ -2,7 +2,7 @@
require 'nokogiri'
require 'open-uri'
-doc = Nokogiri::HTML(URI.open('https://www.timeanddate.com/time/zones/'))
+doc = Nokogiri::HTML(URI.open(ARGV[0] || 'https://www.timeanddate.com/time/zones/'))
h = {}
@@ -26,9 +26,26 @@ end
h.delete_if{|_,v| !v}
lines = File.readlines('zonetab.list')
-lines.select{|l| l.include?(',')}.
- map{|l| l.split(',', 2)[0]}.
- each{|a| h.delete(a)}
+lines.map! do |l|
+ if (sep = /^%%/ =~ l)...(sep = /^%%/ =~ l) and !sep
+ z, o = l.split(/,\s*/, 2)
+ o.strip!
+ if ho = h.delete(z) and ho != eval(o)
+ warn "offset of #{z}: #{o} -> #{ho}"
+ l = l.sub(/,\s*\K.*/) {
+ if o.include?("*")
+ o1, o2 = ho.abs.divmod(3600)
+ o1 = "#{o1}*3600"
+ o1 = "(#{o1}+#{o2})" if o2 != 0
+ ho < 0 ? "-#{o1}" : o1
+ else
+ ho.to_s
+ end
+ }
+ end
+ end
+ l
+end
lines.insert(-2, h.sort.map{|k,v| "#{k},#{v}\n"})
lines.flatten!
diff --git a/ext/date/zonetab.h b/ext/date/zonetab.h
index 379f78e1b8..7ced9e0308 100644
--- a/ext/date/zonetab.h
+++ b/ext/date/zonetab.h
@@ -36,7 +36,7 @@ struct zone {
int name;
int offset;
};
-static const struct zone *zonetab();
+static const struct zone *zonetab(register const char *str, register size_t len);
#line 9 "zonetab.list"
struct zone;
@@ -49,7 +49,7 @@ struct zone;
#ifndef GPERF_DOWNCASE
#define GPERF_DOWNCASE 1
-static unsigned char gperf_downcase[256] =
+static const unsigned char gperf_downcase[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -846,7 +846,7 @@ zonetab (register const char *str, register size_t len)
{gperf_offsetof(stringpool, 22), 3*3600},
{-1},
#line 101 "zonetab.list"
- {gperf_offsetof(stringpool, 24),10*3600},
+ {gperf_offsetof(stringpool, 24),-6*3600},
#line 217 "zonetab.list"
{gperf_offsetof(stringpool, 25),-18000},
#line 19 "zonetab.list"
@@ -875,7 +875,7 @@ zonetab (register const char *str, register size_t len)
#line 79 "zonetab.list"
{gperf_offsetof(stringpool, 38), 2*3600},
#line 65 "zonetab.list"
- {gperf_offsetof(stringpool, 39),-10*3600},
+ {gperf_offsetof(stringpool, 39),2*3600},
{-1},
#line 202 "zonetab.list"
{gperf_offsetof(stringpool, 41),28800},
@@ -998,7 +998,7 @@ zonetab (register const char *str, register size_t len)
#line 148 "zonetab.list"
{gperf_offsetof(stringpool, 107), -25200},
#line 96 "zonetab.list"
- {gperf_offsetof(stringpool, 108), 8*3600},
+ {gperf_offsetof(stringpool, 108), (6*3600+1800)},
#line 42 "zonetab.list"
{gperf_offsetof(stringpool, 109), -10*3600},
#line 31 "zonetab.list"
@@ -1017,11 +1017,11 @@ zonetab (register const char *str, register size_t len)
{gperf_offsetof(stringpool, 117), 1*3600},
{-1},
#line 95 "zonetab.list"
- {gperf_offsetof(stringpool, 119), 7*3600},
+ {gperf_offsetof(stringpool, 119), 2*3600},
#line 313 "zonetab.list"
{gperf_offsetof(stringpool, 120),43200},
#line 55 "zonetab.list"
- {gperf_offsetof(stringpool, 121), -(3*3600+1800)},
+ {gperf_offsetof(stringpool, 121), -(2*3600+1800)},
#line 184 "zonetab.list"
{gperf_offsetof(stringpool, 122),31500},
#line 204 "zonetab.list"
@@ -1168,7 +1168,7 @@ zonetab (register const char *str, register size_t len)
#line 299 "zonetab.list"
{gperf_offsetof(stringpool, 206),50400},
#line 85 "zonetab.list"
- {gperf_offsetof(stringpool, 207), 2*3600},
+ {gperf_offsetof(stringpool, 207), -11*3600},
{-1},
#line 142 "zonetab.list"
{gperf_offsetof(stringpool, 209), 19800},
@@ -1371,7 +1371,7 @@ zonetab (register const char *str, register size_t len)
{gperf_offsetof(stringpool, 324), 8*3600},
{-1},
#line 50 "zonetab.list"
- {gperf_offsetof(stringpool, 326), -(2*3600+1800)},
+ {gperf_offsetof(stringpool, 326), -(1*3600+1800)},
#line 285 "zonetab.list"
{gperf_offsetof(stringpool, 327),-10800},
{-1}, {-1},
diff --git a/ext/date/zonetab.list b/ext/date/zonetab.list
index 0618546eb0..748aec1d8a 100644
--- a/ext/date/zonetab.list
+++ b/ext/date/zonetab.list
@@ -3,7 +3,7 @@ struct zone {
int name;
int offset;
};
-static const struct zone *zonetab();
+static const struct zone *zonetab(register const char *str, register size_t len);
%}
struct zone;
@@ -47,12 +47,12 @@ utc, 0*3600
wet, 0*3600
at, -2*3600
brst,-2*3600
-ndt, -(2*3600+1800)
+ndt, -(1*3600+1800)
art, -3*3600
adt, -3*3600
brt, -3*3600
clst,-3*3600
-nst, -(3*3600+1800)
+nst, -(2*3600+1800)
ast, -4*3600
clt, -4*3600
akdt,-8*3600
@@ -62,7 +62,7 @@ hadt,-9*3600
hdt, -9*3600
yst, -9*3600
ahst,-10*3600
-cat,-10*3600
+cat,2*3600
hast,-10*3600
hst,-10*3600
nt, -11*3600
@@ -82,7 +82,7 @@ fst, 2*3600
mest, 2*3600
mesz, 2*3600
sast, 2*3600
-sst, 2*3600
+sst, -11*3600
bt, 3*3600
eat, 3*3600
eest, 3*3600
@@ -92,13 +92,13 @@ zp4, 4*3600
zp5, 5*3600
ist, (5*3600+1800)
zp6, 6*3600
-wast, 7*3600
-cct, 8*3600
+wast, 2*3600
+cct, (6*3600+1800)
sgt, 8*3600
wadt, 8*3600
jst, 9*3600
kst, 9*3600
-east,10*3600
+east,-6*3600
gst, 10*3600
eadt,11*3600
idle,12*3600
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
deleted file mode 100644
index bc1d527735..0000000000
--- a/ext/dbm/dbm.c
+++ /dev/null
@@ -1,1156 +0,0 @@
-/************************************************
-
- dbm.c -
-
- $Author$
- created at: Mon Jan 24 15:59:52 JST 1994
-
- Copyright (C) 1995-2001 Yukihiro Matsumoto
-
-************************************************/
-
-#include "ruby.h"
-
-#ifdef HAVE_CDEFS_H
-# include <cdefs.h>
-#endif
-#ifdef HAVE_SYS_CDEFS_H
-# include <sys/cdefs.h>
-#endif
-#include DBM_HDR
-#include <fcntl.h>
-#include <errno.h>
-
-#define DSIZE_TYPE TYPEOF_DATUM_DSIZE
-#if SIZEOF_DATUM_DSIZE > SIZEOF_INT
-# define RSTRING_DSIZE(s) RSTRING_LEN(s)
-# define TOO_LONG(n) ((void)(n),0)
-#else
-# define RSTRING_DSIZE(s) RSTRING_LENINT(s)
-# define TOO_LONG(n) ((long)(+(DSIZE_TYPE)(n)) != (n))
-#endif
-
-static VALUE rb_cDBM, rb_eDBMError;
-
-#define RUBY_DBM_RW_BIT 0x20000000
-
-struct dbmdata {
- long di_size;
- DBM *di_dbm;
-};
-
-NORETURN(static void closed_dbm(void));
-
-static void
-closed_dbm(void)
-{
- rb_raise(rb_eDBMError, "closed DBM file");
-}
-
-#define GetDBM(obj, dbmp) do {\
- TypedData_Get_Struct((obj), struct dbmdata, &dbm_type, (dbmp));\
- if ((dbmp)->di_dbm == 0) closed_dbm();\
-} while (0)
-
-#define GetDBM2(obj, dbmp, dbm) do {\
- GetDBM((obj), (dbmp));\
- (dbm) = (dbmp)->di_dbm;\
-} while (0)
-
-static void
-free_dbm(void *ptr)
-{
- struct dbmdata *dbmp = ptr;
- if (dbmp->di_dbm)
- dbm_close(dbmp->di_dbm);
- xfree(dbmp);
-}
-
-static size_t
-memsize_dbm(const void *ptr)
-{
- const struct dbmdata *dbmp = ptr;
- size_t size = sizeof(*dbmp);
- if (dbmp->di_dbm)
- size += DBM_SIZEOF_DBM;
- return size;
-}
-
-static const rb_data_type_t dbm_type = {
- "dbm",
- {0, free_dbm, memsize_dbm,},
- 0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY,
-};
-
-/*
- * call-seq:
- * dbm.close
- *
- * Closes the database.
- */
-static VALUE
-fdbm_close(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- GetDBM(obj, dbmp);
- dbm_close(dbmp->di_dbm);
- dbmp->di_dbm = 0;
-
- return Qnil;
-}
-
-/*
- * call-seq:
- * dbm.closed? -> true or false
- *
- * Returns true if the database is closed, false otherwise.
- */
-static VALUE
-fdbm_closed(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- TypedData_Get_Struct(obj, struct dbmdata, &dbm_type, dbmp);
- if (dbmp->di_dbm == 0)
- return Qtrue;
-
- return Qfalse;
-}
-
-static VALUE
-fdbm_alloc(VALUE klass)
-{
- struct dbmdata *dbmp;
-
- return TypedData_Make_Struct(klass, struct dbmdata, &dbm_type, dbmp);
-}
-
-/*
- * call-seq:
- * DBM.new(filename[, mode[, flags]]) -> dbm
- *
- * Open a dbm database with the specified name, which can include a directory
- * path. Any file extensions needed will be supplied automatically by the dbm
- * library. For example, Berkeley DB appends '.db', and GNU gdbm uses two
- * physical files with extensions '.dir' and '.pag'.
- *
- * The mode should be an integer, as for Unix chmod.
- *
- * Flags should be one of READER, WRITER, WRCREAT or NEWDB.
- */
-static VALUE
-fdbm_initialize(int argc, VALUE *argv, VALUE obj)
-{
- VALUE file, vmode, vflags;
- DBM *dbm;
- struct dbmdata *dbmp;
- int mode, flags = 0;
-
- TypedData_Get_Struct(obj, struct dbmdata, &dbm_type, dbmp);
- if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
- mode = 0666; /* default value */
- }
- else if (NIL_P(vmode)) {
- mode = -1; /* return nil if DB not exist */
- }
- else {
- mode = NUM2INT(vmode);
- }
-
- if (!NIL_P(vflags))
- flags = NUM2INT(vflags);
-
- FilePathValue(file);
-
- /*
- * Note:
- * gdbm 1.10 works with O_CLOEXEC. gdbm 1.9.1 silently ignore it.
- */
-#ifndef O_CLOEXEC
-# define O_CLOEXEC 0
-#endif
-
- if (flags & RUBY_DBM_RW_BIT) {
- flags &= ~RUBY_DBM_RW_BIT;
- dbm = dbm_open(RSTRING_PTR(file), flags|O_CLOEXEC, mode);
- }
- else {
- dbm = 0;
- if (mode >= 0) {
- dbm = dbm_open(RSTRING_PTR(file), O_RDWR|O_CREAT|O_CLOEXEC, mode);
- }
- if (!dbm) {
- dbm = dbm_open(RSTRING_PTR(file), O_RDWR|O_CLOEXEC, 0);
- }
- if (!dbm) {
- dbm = dbm_open(RSTRING_PTR(file), O_RDONLY|O_CLOEXEC, 0);
- }
- }
-
- if (dbm) {
- /*
- * History of dbm_pagfno() and dbm_dirfno() in ndbm and its compatibles.
- * (dbm_pagfno() and dbm_dirfno() is not standardized.)
- *
- * 1986: 4.3BSD provides ndbm.
- * It provides dbm_pagfno() and dbm_dirfno() as macros.
- * 1991: gdbm-1.5 provides them as functions.
- * They returns a same descriptor.
- * (Earlier releases may have the functions too.)
- * 1991: Net/2 provides Berkeley DB.
- * It doesn't provide dbm_pagfno() and dbm_dirfno().
- * 1992: 4.4BSD Alpha provides Berkeley DB with dbm_dirfno() as a function.
- * dbm_pagfno() is a macro as DBM_PAGFNO_NOT_AVAILABLE.
- * 1997: Berkeley DB 2.0 is released by Sleepycat Software, Inc.
- * It defines dbm_pagfno() and dbm_dirfno() as macros.
- * 2011: gdbm-1.9 creates a separate dir file.
- * dbm_pagfno() and dbm_dirfno() returns different descriptors.
- */
-#if defined(HAVE_DBM_PAGFNO)
- rb_fd_fix_cloexec(dbm_pagfno(dbm));
-#endif
-#if defined(HAVE_DBM_DIRFNO)
- rb_fd_fix_cloexec(dbm_dirfno(dbm));
-#endif
-
-#if defined(RUBYDBM_DB_HEADER) && defined(HAVE_TYPE_DBC)
- /* Disable Berkeley DB error messages such as:
- * DB->put: attempt to modify a read-only database */
- ((DBC*)dbm)->dbp->set_errfile(((DBC*)dbm)->dbp, NULL);
-#endif
- }
-
- if (!dbm) {
- if (mode == -1) return Qnil;
- rb_sys_fail_str(file);
- }
-
- if (dbmp->di_dbm)
- dbm_close(dbmp->di_dbm);
- dbmp->di_dbm = dbm;
- dbmp->di_size = -1;
-
- return obj;
-}
-
-/*
- * call-seq:
- * DBM.open(filename[, mode[, flags]]) -> dbm
- * DBM.open(filename[, mode[, flags]]) {|dbm| block}
- *
- * Open a dbm database and yields it if a block is given. See also
- * <code>DBM.new</code>.
- */
-static VALUE
-fdbm_s_open(int argc, VALUE *argv, VALUE klass)
-{
- VALUE obj = fdbm_alloc(klass);
-
- if (NIL_P(fdbm_initialize(argc, argv, obj))) {
- return Qnil;
- }
-
- if (rb_block_given_p()) {
- return rb_ensure(rb_yield, obj, fdbm_close, obj);
- }
-
- return obj;
-}
-
-static VALUE
-fdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone)
-{
- datum key, value;
- struct dbmdata *dbmp;
- DBM *dbm;
- long len;
-
- ExportStringValue(keystr);
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) goto not_found;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (DSIZE_TYPE)len;
-
- GetDBM2(obj, dbmp, dbm);
- value = dbm_fetch(dbm, key);
- if (value.dptr == 0) {
- not_found:
- if (NIL_P(ifnone) && rb_block_given_p()) {
- keystr = rb_str_dup(keystr);
- return rb_yield(keystr);
- }
- return ifnone;
- }
- return rb_str_new(value.dptr, value.dsize);
-}
-
-/*
- * call-seq:
- * dbm[key] -> string value or nil
- *
- * Return a value from the database by locating the key string
- * provided. If the key is not found, returns nil.
- */
-static VALUE
-fdbm_aref(VALUE obj, VALUE keystr)
-{
- return fdbm_fetch(obj, keystr, Qnil);
-}
-
-/*
- * call-seq:
- * dbm.fetch(key[, ifnone]) -> value
- *
- * Return a value from the database by locating the key string
- * provided. If the key is not found, returns +ifnone+. If +ifnone+
- * is not given, raises IndexError.
- */
-static VALUE
-fdbm_fetch_m(int argc, VALUE *argv, VALUE obj)
-{
- VALUE keystr, valstr, ifnone;
-
- rb_scan_args(argc, argv, "11", &keystr, &ifnone);
- valstr = fdbm_fetch(obj, keystr, ifnone);
- if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
- rb_raise(rb_eIndexError, "key not found");
-
- return valstr;
-}
-
-/*
- * call-seq:
- * dbm.key(value) -> string
- *
- * Returns the key for the specified value.
- */
-static VALUE
-fdbm_key(VALUE obj, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- long len;
-
- ExportStringValue(valstr);
- len = RSTRING_LEN(valstr);
- if (TOO_LONG(len)) return Qnil;
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- if ((long)val.dsize == RSTRING_LEN(valstr) &&
- memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0) {
- return rb_str_new(key.dptr, key.dsize);
- }
- }
- return Qnil;
-}
-
-/* :nodoc: */
-static VALUE
-fdbm_index(VALUE hash, VALUE value)
-{
- rb_warn("DBM#index is deprecated; use DBM#key");
- return fdbm_key(hash, value);
-}
-
-/*
- * call-seq:
- * dbm.select {|key, value| block} -> array
- *
- * Returns a new array consisting of the [key, value] pairs for which the code
- * block returns true.
- */
-static VALUE
-fdbm_select(VALUE obj)
-{
- VALUE new = rb_ary_new();
- datum key, val;
- DBM *dbm;
- struct dbmdata *dbmp;
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- VALUE assoc, v;
- val = dbm_fetch(dbm, key);
- assoc = rb_assoc_new(rb_str_new(key.dptr, key.dsize),
- rb_str_new(val.dptr, val.dsize));
- v = rb_yield(assoc);
- if (RTEST(v)) {
- rb_ary_push(new, assoc);
- }
- GetDBM2(obj, dbmp, dbm);
- }
-
- return new;
-}
-
-/*
- * call-seq:
- * dbm.values_at(key, ...) -> Array
- *
- * Returns an array containing the values associated with the given keys.
- */
-static VALUE
-fdbm_values_at(int argc, VALUE *argv, VALUE obj)
-{
- VALUE new = rb_ary_new2(argc);
- int i;
-
- for (i=0; i<argc; i++) {
- rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
- }
-
- return new;
-}
-
-static void
-fdbm_modify(VALUE obj)
-{
- if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
-}
-
-/*
- * call-seq:
- * dbm.delete(key)
- *
- * Deletes an entry from the database.
- */
-static VALUE
-fdbm_delete(VALUE obj, VALUE keystr)
-{
- datum key, value;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE valstr;
- long len;
-
- fdbm_modify(obj);
- ExportStringValue(keystr);
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) goto not_found;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (DSIZE_TYPE)len;
-
- GetDBM2(obj, dbmp, dbm);
-
- value = dbm_fetch(dbm, key);
- if (value.dptr == 0) {
- not_found:
- if (rb_block_given_p()) return rb_yield(keystr);
- return Qnil;
- }
-
- /* need to save value before dbm_delete() */
- valstr = rb_str_new(value.dptr, value.dsize);
-
- if (dbm_delete(dbm, key)) {
- dbmp->di_size = -1;
- rb_raise(rb_eDBMError, "dbm_delete failed");
- }
- else if (dbmp->di_size >= 0) {
- dbmp->di_size--;
- }
- return valstr;
-}
-
-/*
- * call-seq:
- * dbm.shift() -> [key, value]
- *
- * Removes a [key, value] pair from the database, and returns it.
- * If the database is empty, returns nil.
- * The order in which values are removed/returned is not guaranteed.
- */
-static VALUE
-fdbm_shift(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
-
- key = dbm_firstkey(dbm);
- if (!key.dptr) return Qnil;
- val = dbm_fetch(dbm, key);
- keystr = rb_str_new(key.dptr, key.dsize);
- valstr = rb_str_new(val.dptr, val.dsize);
- dbm_delete(dbm, key);
-
- return rb_assoc_new(keystr, valstr);
-}
-
-/*
- * call-seq:
- * dbm.reject! {|key, value| block} -> self
- * dbm.delete_if {|key, value| block} -> self
- *
- * Deletes all entries for which the code block returns true.
- * Returns self.
- */
-static VALUE
-fdbm_delete_if(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
- VALUE ret, ary = rb_ary_tmp_new(0);
- int status = 0;
- long i, n;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- n = dbmp->di_size;
- dbmp->di_size = -1;
-
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- keystr = rb_str_new(key.dptr, key.dsize);
- OBJ_FREEZE(keystr);
- valstr = rb_str_new(val.dptr, val.dsize);
- ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
- if (status != 0) break;
- if (RTEST(ret)) rb_ary_push(ary, keystr);
- GetDBM2(obj, dbmp, dbm);
- }
-
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- keystr = RARRAY_AREF(ary, i);
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (DSIZE_TYPE)RSTRING_LEN(keystr);
- if (dbm_delete(dbm, key)) {
- rb_raise(rb_eDBMError, "dbm_delete failed");
- }
- }
- if (status) rb_jump_tag(status);
- if (n > 0) dbmp->di_size = n - RARRAY_LEN(ary);
- rb_ary_clear(ary);
-
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.clear
- *
- * Deletes all data from the database.
- */
-static VALUE
-fdbm_clear(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
- while (key = dbm_firstkey(dbm), key.dptr) {
- if (dbm_delete(dbm, key)) {
- rb_raise(rb_eDBMError, "dbm_delete failed");
- }
- }
- dbmp->di_size = 0;
-
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.invert -> hash
- *
- * Returns a Hash (not a DBM database) created by using each value in the
- * database as a key, with the corresponding key as its value.
- */
-static VALUE
-fdbm_invert(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
- VALUE hash = rb_hash_new();
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- keystr = rb_str_new(key.dptr, key.dsize);
- valstr = rb_str_new(val.dptr, val.dsize);
- rb_hash_aset(hash, valstr, keystr);
- }
- return hash;
-}
-
-static VALUE fdbm_store(VALUE,VALUE,VALUE);
-
-static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
-{
- const VALUE *ptr;
- Check_Type(pair, T_ARRAY);
- if (RARRAY_LEN(pair) < 2) {
- rb_raise(rb_eArgError, "pair must be [key, value]");
- }
- ptr = RARRAY_CONST_PTR(pair);
- fdbm_store(dbm, ptr[0], ptr[1]);
- return Qnil;
-}
-
-/*
- * call-seq:
- * dbm.update(obj)
- *
- * Updates the database with multiple values from the specified object.
- * Takes any object which implements the each_pair method, including
- * Hash and DBM objects.
- */
-static VALUE
-fdbm_update(VALUE obj, VALUE other)
-{
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.replace(obj)
- *
- * Replaces the contents of the database with the contents of the specified
- * object. Takes any object which implements the each_pair method, including
- * Hash and DBM objects.
- */
-static VALUE
-fdbm_replace(VALUE obj, VALUE other)
-{
- fdbm_clear(obj);
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.store(key, value) -> value
- * dbm[key] = value
- *
- * Stores the specified string value in the database, indexed via the
- * string key provided.
- */
-static VALUE
-fdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- fdbm_modify(obj);
- keystr = rb_obj_as_string(keystr);
- valstr = rb_obj_as_string(valstr);
-
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_DSIZE(keystr);
-
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_DSIZE(valstr);
-
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
- if (dbm_store(dbm, key, val, DBM_REPLACE)) {
- dbm_clearerr(dbm);
- if (errno == EPERM) rb_sys_fail(0);
- rb_raise(rb_eDBMError, "dbm_store failed");
- }
-
- return valstr;
-}
-
-/*
- * call-seq:
- * dbm.length -> integer
- * dbm.size -> integer
- *
- * Returns the number of entries in the database.
- */
-static VALUE
-fdbm_length(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
- int i = 0;
-
- GetDBM2(obj, dbmp, dbm);
- if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
-
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- i++;
- }
- dbmp->di_size = i;
-
- return INT2FIX(i);
-}
-
-/*
- * call-seq:
- * dbm.empty?
- *
- * Returns true if the database is empty, false otherwise.
- */
-static VALUE
-fdbm_empty_p(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- GetDBM2(obj, dbmp, dbm);
- if (dbmp->di_size < 0) {
- dbm = dbmp->di_dbm;
-
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- return Qfalse;
- }
- }
- else {
- if (dbmp->di_size)
- return Qfalse;
- }
- return Qtrue;
-}
-
-/*
- * call-seq:
- * dbm.each_value {|value| block} -> self
- *
- * Calls the block once for each value string in the database. Returns self.
- */
-static VALUE
-fdbm_each_value(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- rb_yield(rb_str_new(val.dptr, val.dsize));
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.each_key {|key| block} -> self
- *
- * Calls the block once for each key string in the database. Returns self.
- */
-static VALUE
-fdbm_each_key(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- rb_yield(rb_str_new(key.dptr, key.dsize));
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.each_pair {|key,value| block} -> self
- *
- * Calls the block once for each [key, value] pair in the database.
- * Returns self.
- */
-static VALUE
-fdbm_each_pair(VALUE obj)
-{
- datum key, val;
- DBM *dbm;
- struct dbmdata *dbmp;
- VALUE keystr, valstr;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
-
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- keystr = rb_str_new(key.dptr, key.dsize);
- valstr = rb_str_new(val.dptr, val.dsize);
- rb_yield(rb_assoc_new(keystr, valstr));
- GetDBM2(obj, dbmp, dbm);
- }
-
- return obj;
-}
-
-/*
- * call-seq:
- * dbm.keys -> array
- *
- * Returns an array of all the string keys in the database.
- */
-static VALUE
-fdbm_keys(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
-
- ary = rb_ary_new();
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- rb_ary_push(ary, rb_str_new(key.dptr, key.dsize));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * dbm.values -> array
- *
- * Returns an array of all the string values in the database.
- */
-static VALUE
-fdbm_values(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- rb_ary_push(ary, rb_str_new(val.dptr, val.dsize));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * dbm.include?(key) -> boolean
- * dbm.has_key?(key) -> boolean
- * dbm.member?(key) -> boolean
- * dbm.key?(key) -> boolean
- *
- * Returns true if the database contains the specified key, false otherwise.
- */
-static VALUE
-fdbm_has_key(VALUE obj, VALUE keystr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- long len;
-
- ExportStringValue(keystr);
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) return Qfalse;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (DSIZE_TYPE)len;
-
- GetDBM2(obj, dbmp, dbm);
- val = dbm_fetch(dbm, key);
- if (val.dptr) return Qtrue;
- return Qfalse;
-}
-
-/*
- * call-seq:
- * dbm.has_value?(value) -> boolean
- * dbm.value?(value) -> boolean
- *
- * Returns true if the database contains the specified string value, false
- * otherwise.
- */
-static VALUE
-fdbm_has_value(VALUE obj, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- long len;
-
- ExportStringValue(valstr);
- len = RSTRING_LEN(valstr);
- if (TOO_LONG(len)) return Qfalse;
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = (DSIZE_TYPE)len;
-
- GetDBM2(obj, dbmp, dbm);
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- if ((DSIZE_TYPE)val.dsize == (DSIZE_TYPE)RSTRING_LEN(valstr) &&
- memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0)
- return Qtrue;
- }
- return Qfalse;
-}
-
-/*
- * call-seq:
- * dbm.to_a -> array
- *
- * Converts the contents of the database to an array of [key, value] arrays,
- * and returns it.
- */
-static VALUE
-fdbm_to_a(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- rb_ary_push(ary, rb_assoc_new(rb_str_new(key.dptr, key.dsize),
- rb_str_new(val.dptr, val.dsize)));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * dbm.to_hash -> hash
- *
- * Converts the contents of the database to an in-memory Hash object, and
- * returns it.
- */
-static VALUE
-fdbm_to_hash(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE hash;
-
- GetDBM2(obj, dbmp, dbm);
- hash = rb_hash_new();
- for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
- val = dbm_fetch(dbm, key);
- rb_hash_aset(hash, rb_str_new(key.dptr, key.dsize),
- rb_str_new(val.dptr, val.dsize));
- }
-
- return hash;
-}
-
-/*
- * call-seq:
- * dbm.reject {|key,value| block} -> Hash
- *
- * Converts the contents of the database to an in-memory Hash, then calls
- * Hash#reject with the specified code block, returning a new Hash.
- */
-static VALUE
-fdbm_reject(VALUE obj)
-{
- return rb_hash_delete_if(fdbm_to_hash(obj));
-}
-
-/*
- * == Introduction
- *
- * The DBM class provides a wrapper to a Unix-style
- * {dbm}[http://en.wikipedia.org/wiki/Dbm] or Database Manager library.
- *
- * Dbm databases do not have tables or columns; they are simple key-value
- * data stores, like a Ruby Hash except not resident in RAM. Keys and values
- * must be strings.
- *
- * The exact library used depends on how Ruby was compiled. It could be any
- * of the following:
- *
- * - The original ndbm library is released in 4.3BSD.
- * It is based on dbm library in Unix Version 7 but has different API to
- * support multiple databases in a process.
- * - {Berkeley DB}[http://en.wikipedia.org/wiki/Berkeley_DB] versions
- * 1 thru 6, also known as BDB and Sleepycat DB, now owned by Oracle
- * Corporation.
- * - Berkeley DB 1.x, still found in 4.4BSD derivatives (FreeBSD, OpenBSD, etc).
- * - {gdbm}[http://www.gnu.org/software/gdbm/], the GNU implementation of dbm.
- * - {qdbm}[http://fallabs.com/qdbm/index.html], another open source
- * reimplementation of dbm.
- *
- * All of these dbm implementations have their own Ruby interfaces
- * available, which provide richer (but varying) APIs.
- *
- * == Cautions
- *
- * Before you decide to use DBM, there are some issues you should consider:
- *
- * - Each implementation of dbm has its own file format. Generally, dbm
- * libraries will not read each other's files. This makes dbm files
- * a bad choice for data exchange.
- *
- * - Even running the same OS and the same dbm implementation, the database
- * file format may depend on the CPU architecture. For example, files may
- * not be portable between PowerPC and 386, or between 32 and 64 bit Linux.
- *
- * - Different versions of Berkeley DB use different file formats. A change to
- * the OS may therefore break DBM access to existing files.
- *
- * - Data size limits vary between implementations. Original Berkeley DB was
- * limited to 2GB of data. Dbm libraries also sometimes limit the total
- * size of a key/value pair, and the total size of all the keys that hash
- * to the same value. These limits can be as little as 512 bytes. That said,
- * gdbm and recent versions of Berkeley DB do away with these limits.
- *
- * Given the above cautions, DBM is not a good choice for long term storage of
- * important data. It is probably best used as a fast and easy alternative
- * to a Hash for processing large amounts of data.
- *
- * == Example
- *
- * require 'dbm'
- * db = DBM.open('rfcs', 0666, DBM::WRCREAT)
- * db['822'] = 'Standard for the Format of ARPA Internet Text Messages'
- * db['1123'] = 'Requirements for Internet Hosts - Application and Support'
- * db['3068'] = 'An Anycast Prefix for 6to4 Relay Routers'
- * puts db['822']
- */
-void
-Init_dbm(void)
-{
- rb_cDBM = rb_define_class("DBM", rb_cObject);
- /* Document-class: DBMError
- * Exception class used to return errors from the dbm library.
- */
- rb_eDBMError = rb_define_class("DBMError", rb_eStandardError);
- rb_include_module(rb_cDBM, rb_mEnumerable);
-
- rb_define_alloc_func(rb_cDBM, fdbm_alloc);
- rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1);
-
- rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);
- rb_define_method(rb_cDBM, "close", fdbm_close, 0);
- rb_define_method(rb_cDBM, "closed?", fdbm_closed, 0);
- rb_define_method(rb_cDBM, "[]", fdbm_aref, 1);
- rb_define_method(rb_cDBM, "fetch", fdbm_fetch_m, -1);
- rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
- rb_define_method(rb_cDBM, "store", fdbm_store, 2);
- rb_define_method(rb_cDBM, "index", fdbm_index, 1);
- rb_define_method(rb_cDBM, "key", fdbm_key, 1);
- rb_define_method(rb_cDBM, "select", fdbm_select, 0);
- rb_define_method(rb_cDBM, "values_at", fdbm_values_at, -1);
- rb_define_method(rb_cDBM, "length", fdbm_length, 0);
- rb_define_method(rb_cDBM, "size", fdbm_length, 0);
- rb_define_method(rb_cDBM, "empty?", fdbm_empty_p, 0);
- rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
- rb_define_method(rb_cDBM, "each_value", fdbm_each_value, 0);
- rb_define_method(rb_cDBM, "each_key", fdbm_each_key, 0);
- rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0);
- rb_define_method(rb_cDBM, "keys", fdbm_keys, 0);
- rb_define_method(rb_cDBM, "values", fdbm_values, 0);
- rb_define_method(rb_cDBM, "shift", fdbm_shift, 0);
- rb_define_method(rb_cDBM, "delete", fdbm_delete, 1);
- rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
- rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);
- rb_define_method(rb_cDBM, "reject", fdbm_reject, 0);
- rb_define_method(rb_cDBM, "clear", fdbm_clear, 0);
- rb_define_method(rb_cDBM, "invert", fdbm_invert, 0);
- rb_define_method(rb_cDBM, "update", fdbm_update, 1);
- rb_define_method(rb_cDBM, "replace", fdbm_replace, 1);
-
- rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
- rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
- rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
- rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
- rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);
- rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);
-
- rb_define_method(rb_cDBM, "to_a", fdbm_to_a, 0);
- rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);
-
- /* Indicates that dbm_open() should open the database in read-only mode */
- rb_define_const(rb_cDBM, "READER", INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
-
- /* Indicates that dbm_open() should open the database in read/write mode */
- rb_define_const(rb_cDBM, "WRITER", INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
-
- /* Indicates that dbm_open() should open the database in read/write mode,
- * and create it if it does not already exist
- */
- rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
-
- /* Indicates that dbm_open() should open the database in read/write mode,
- * create it if it does not already exist, and delete all contents if it
- * does already exist.
- */
- rb_define_const(rb_cDBM, "NEWDB", INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
-
- {
- VALUE version;
-#if defined(_DBM_IOERR)
- version = rb_str_new2("ndbm (4.3BSD)");
-#elif defined(RUBYDBM_GDBM_HEADER)
-# if defined(HAVE_DECLARED_LIBVAR_GDBM_VERSION)
- /* since gdbm 1.9 */
- version = rb_str_new2(gdbm_version);
-# elif defined(HAVE_UNDECLARED_LIBVAR_GDBM_VERSION)
- /* ndbm.h doesn't declare gdbm_version until gdbm 1.8.3.
- * See extconf.rb for more information. */
- RUBY_EXTERN char *gdbm_version;
- version = rb_str_new2(gdbm_version);
-# else
- version = rb_str_new2("GDBM (unknown)");
-# endif
-#elif defined(RUBYDBM_DB_HEADER)
-# if defined(HAVE_DB_VERSION)
- /* The version of the dbm library, if using Berkeley DB */
- version = rb_str_new2(db_version(NULL, NULL, NULL));
-# else
- version = rb_str_new2("Berkeley DB (unknown)");
-# endif
-#elif defined(_RELIC_H)
-# if defined(HAVE_DPVERSION)
- version = rb_sprintf("QDBM %s", dpversion);
-# else
- version = rb_str_new2("QDBM (unknown)");
-# endif
-#else
- version = rb_str_new2("ndbm (unknown)");
-#endif
- /*
- * Identifies ndbm library version.
- *
- * Examples:
- *
- * - "ndbm (4.3BSD)"
- * - "Berkeley DB 4.8.30: (April 9, 2010)"
- * - "Berkeley DB (unknown)" (4.4BSD, maybe)
- * - "GDBM version 1.8.3. 10/15/2002 (built Jul 1 2011 12:32:45)"
- * - "QDBM 1.8.78"
- *
- */
- rb_define_const(rb_cDBM, "VERSION", version);
- }
-}
diff --git a/ext/dbm/dbm.gemspec b/ext/dbm/dbm.gemspec
deleted file mode 100644
index 9de425b521..0000000000
--- a/ext/dbm/dbm.gemspec
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-Gem::Specification.new do |s|
- s.name = "dbm"
- s.version = '1.1.0'
- s.summary = "Provides a wrapper for the UNIX-style Database Manager Library"
- s.description = "Provides a wrapper for the UNIX-style Database Manager Library"
-
- s.require_path = %w{lib}
- s.files = %w{ext/dbm/extconf.rb ext/dbm/dbm.c}
- s.extensions = %w{ext/dbm/extconf.rb}
- s.required_ruby_version = ">= 2.3.0"
-
- s.authors = ["Yukihiro Matsumoto"]
- s.email = ["matz@ruby-lang.org"]
- s.homepage = "https://github.com/ruby/dbm"
- s.license = "BSD-2-Clause"
-
- s.add_development_dependency "rake-compiler"
- s.add_development_dependency "test-unit"
-end
diff --git a/ext/dbm/depend b/ext/dbm/depend
deleted file mode 100644
index 192527a8eb..0000000000
--- a/ext/dbm/depend
+++ /dev/null
@@ -1,14 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-dbm.o: $(RUBY_EXTCONF_H)
-dbm.o: $(arch_hdrdir)/ruby/config.h
-dbm.o: $(hdrdir)/ruby.h
-dbm.o: $(hdrdir)/ruby/assert.h
-dbm.o: $(hdrdir)/ruby/backward.h
-dbm.o: $(hdrdir)/ruby/defines.h
-dbm.o: $(hdrdir)/ruby/intern.h
-dbm.o: $(hdrdir)/ruby/missing.h
-dbm.o: $(hdrdir)/ruby/ruby.h
-dbm.o: $(hdrdir)/ruby/st.h
-dbm.o: $(hdrdir)/ruby/subst.h
-dbm.o: dbm.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
deleted file mode 100644
index c9a5518bf6..0000000000
--- a/ext/dbm/extconf.rb
+++ /dev/null
@@ -1,292 +0,0 @@
-# frozen_string_literal: true
-# configure option:
-# --with-dbm-type=COMMA-SEPARATED-NDBM-TYPES
-#
-# ndbm type:
-# libc ndbm compatible library in libc.
-# db Berkeley DB (libdb)
-# db2 Berkeley DB (libdb2)
-# db1 Berkeley DB (libdb1)
-# db6 Berkeley DB (libdb6)
-# db5 Berkeley DB (libdb5)
-# db4 Berkeley DB (libdb4)
-# db3 Berkeley DB (libdb3)
-# gdbm_compat GDBM since 1.8.1 (libgdbm_compat)
-# gdbm GDBM until 1.8.0 (libgdbm)
-# qdbm QDBM (libqdbm)
-# ndbm Some legacy OS may have libndbm.
-
-# :stopdoc:
-require 'mkmf'
-
-dir_config("dbm")
-
-if dblib = with_config("dbm-type", nil)
- dblib = dblib.split(/[ ,]+/)
-else
- dblib = %w(libc db db2 db1 db6 db5 db4 db3 gdbm_compat gdbm qdbm)
-end
-
-headers = {
- "libc" => ["ndbm.h"], # 4.3BSD original ndbm, Berkeley DB 1 in 4.4BSD libc.
- "db" => ["db.h"],
- "db1" => ["db1/ndbm.h", "db1.h", "ndbm.h"],
- "db2" => ["db2/db.h", "db2.h", "db.h"],
- "db3" => ["db3/db.h", "db3.h", "db.h"],
- "db4" => ["db4/db.h", "db4.h", "db.h"],
- "db5" => ["db5/db.h", "db5.h", "db.h"],
- "db6" => ["db6/db.h", "db6.h", "db.h"],
- "gdbm_compat" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM since 1.8.1
- "gdbm" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM until 1.8.0
- "qdbm" => ["qdbm/relic.h", "relic.h"],
-}
-
-class << headers
- attr_accessor :found
- attr_accessor :defs
-end
-headers.found = []
-headers.defs = nil
-
-def headers.db_check(db, hdr)
- old_libs = $libs.dup
- old_defs = $defs.dup
- result = db_check2(db, hdr)
- if !result
- $libs = old_libs
- $defs = old_defs
- end
- result
-end
-
-def have_declared_libvar(var, headers = nil, opt = "", &b)
- checking_for checking_message([*var].compact.join(' '), headers, opt) do
- try_declared_libvar(var, headers, opt, &b)
- end
-end
-
-def try_declared_libvar(var, headers = nil, opt = "", &b)
- if try_link(<<"SRC", opt, &b)
-#{cpp_include(headers)}
-/*top*/
-int main(int argc, char *argv[]) {
- void *conftest_var = &#{var};
- return 0;
-}
-SRC
- $defs.push(format("-DHAVE_DECLARED_LIBVAR_%s", var.tr_cpp))
- true
- else
- false
- end
-end
-
-def have_undeclared_libvar(var, headers = nil, opt = "", &b)
- checking_for checking_message([*var].compact.join(' '), headers, opt) do
- try_undeclared_libvar(var, headers, opt, &b)
- end
-end
-
-def try_undeclared_libvar(var, headers = nil, opt = "", &b)
- var, type = *var
- if try_link(<<"SRC", opt, &b)
-#{cpp_include(headers)}
-/*top*/
-int main(int argc, char *argv[]) {
- typedef #{type || 'int'} conftest_type;
- extern conftest_type #{var};
- conftest_type *conftest_var = &#{var};
- return 0;
-}
-SRC
- $defs.push(format("-DHAVE_UNDECLARED_LIBVAR_%s", var.tr_cpp))
- true
- else
- false
- end
-end
-
-def have_empty_macro_dbm_clearerr(headers = nil, opt = "", &b)
- checking_for checking_message('empty macro of dbm_clearerr(foobarbaz)',
- headers, opt) do
- try_toplevel('dbm_clearerr(foobarbaz)', headers, opt, &b)
- end
-end
-
-def try_toplevel(src, headers = nil, opt = "", &b)
- if try_compile(<<"SRC", opt, &b)
-#{cpp_include(headers)}
-/*top*/
-#{src}
-SRC
- true
- else
- false
- end
-end
-
-
-def headers.db_check2(db, hdr)
- $defs.push(%{-DRUBYDBM_DBM_HEADER='"#{hdr}"'})
- $defs.push(%{-DRUBYDBM_DBM_TYPE='"#{db}"'})
-
- hsearch = nil
-
- case db
- when /^db[2-6]?$/
- hsearch = "-DDB_DBM_HSEARCH"
- when "gdbm_compat"
- have_library("gdbm") or return false
- end
-
- if !have_type("DBM", hdr, hsearch)
- return false
- end
-
- # 'libc' means ndbm is provided by libc.
- # 4.3BSD original ndbm is contained in libc.
- # 4.4BSD (and its derivatives such as NetBSD) contains Berkeley DB 1 in libc.
- if !(db == 'libc' ? have_func('dbm_open("", 0, 0)', hdr, hsearch) :
- have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch))
- return false
- end
-
- # Skip a mismatch of Berkeley DB's ndbm.h and old GDBM library.
- #
- # dbm_clearerr() should be available for any ndbm implementation.
- # It is available since the original (4.3BSD) ndbm and standardized by POSIX.
- #
- # However "can't resolve symbol 'dbm_clearerr'" problem may be caused by
- # header/library mismatch: Berkeley DB ndbm.h and GDBM library until 1.8.3.
- # GDBM (until 1.8.3) provides dbm_clearerr() as a empty macro in the header
- # and the library don't provide dbm_clearerr().
- # Berkeley DB provides dbm_clearerr() as a usual function.
- # So Berkeley DB header with GDBM library causes the problem.
- #
- if !have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
- return false
- end
-
- # Berkeley DB's ndbm.h (since 1.85 at least) defines DBM_SUFFIX.
- # Note that _DB_H_ is not defined on Mac OS X because
- # it uses Berkeley DB 1 but ndbm.h doesn't include db.h.
- have_db_header = have_macro('DBM_SUFFIX', hdr, hsearch)
-
- # Old GDBM's ndbm.h, until 1.8.3, defines dbm_clearerr as a macro which
- # expands to no tokens.
- have_gdbm_header1 = have_empty_macro_dbm_clearerr(hdr, hsearch)
-
- # Recent GDBM's ndbm.h, since 1.9, includes gdbm.h and it defines _GDBM_H_.
- # ndbm compatibility layer of GDBM is provided by libgdbm (until 1.8.0)
- # and libgdbm_compat (since 1.8.1).
- have_gdbm_header2 = have_macro('_GDBM_H_', hdr, hsearch)
-
- # 4.3BSD's ndbm.h defines _DBM_IOERR.
- # The original ndbm is provided by libc in 4.3BSD.
- have_ndbm_header = have_macro('_DBM_IOERR', hdr, hsearch)
-
- # GDBM provides ndbm functions in libgdbm_compat since GDBM 1.8.1.
- # GDBM's ndbm.h defines _GDBM_H_ since GDBM 1.9.
- # If _GDBM_H_ is defined, 'gdbm_compat' is required and reject 'gdbm'.
- if have_gdbm_header2 && db == 'gdbm'
- return false
- end
-
- if have_db_header
- $defs.push('-DRUBYDBM_DB_HEADER')
- end
-
- have_gdbm_header = have_gdbm_header1 | have_gdbm_header2
- if have_gdbm_header
- $defs.push('-DRUBYDBM_GDBM_HEADER')
- end
-
- # ndbm.h is provided by the original (4.3BSD) ndbm,
- # Berkeley DB 1 in libc of 4.4BSD and
- # ndbm compatibility layer of GDBM.
- # So, try to check header/library mismatch.
- #
- # Several (possibly historical) distributions provides libndbm.
- # It may be Berkeley DB, GDBM or 4.3BSD ndbm.
- # So mismatch check is not performed for that.
- # Note that libndbm is searched only when --with-dbm-type=ndbm is
- # given for configure.
- #
- if hdr == 'ndbm.h' && db != 'libc' && db != 'ndbm'
- if /\Adb\d?\z/ !~ db && have_db_header
- return false
- end
-
- if /\Agdbm/ !~ db && have_gdbm_header
- return false
- end
-
- if have_ndbm_header
- return false
- end
- end
-
- # Berkeley DB
- have_func('db_version((int *)0, (int *)0, (int *)0)', hdr, hsearch)
-
- # GDBM
- have_gdbm_version = have_declared_libvar("gdbm_version", hdr, hsearch)
- # gdbm_version is available since very old version (GDBM 1.5 at least).
- # However it is not declared by ndbm.h until GDBM 1.8.3.
- # We can't include both ndbm.h and gdbm.h because they both define datum type.
- # ndbm.h includes gdbm.h and gdbm_version is declared since GDBM 1.9.
- have_gdbm_version |= have_undeclared_libvar(["gdbm_version", "char *"], hdr, hsearch)
-
- # QDBM
- have_var("dpversion", hdr, hsearch)
-
- # detect mismatch between GDBM header and other library.
- # If GDBM header is included, GDBM library should be linked.
- if have_gdbm_header && !have_gdbm_version
- return false
- end
-
- # DBC type is required to disable error messages by Berkeley DB 2 or later.
- if have_db_header
- have_type("DBC", hdr, hsearch)
- end
-
- if hsearch
- $defs << hsearch
- @defs = hsearch
- end
- $defs << '-DDBM_HDR="<'+hdr+'>"'
- @found << hdr
-
- puts "header: #{hdr}"
- puts "library: #{db}"
-
- true
-end
-
-if dblib.any? {|db| headers.fetch(db, ["ndbm.h"]).any? {|hdr| headers.db_check(db, hdr) } }
- have_header("cdefs.h")
- have_header("sys/cdefs.h")
- have_func("dbm_pagfno((DBM *)0)", headers.found, headers.defs)
- have_func("dbm_dirfno((DBM *)0)", headers.found, headers.defs)
- convertible_int("datum.dsize", headers.found, headers.defs)
- checking_for("sizeof(DBM) is available") {
- if try_compile(<<SRC)
-#ifdef HAVE_CDEFS_H
-# include <cdefs.h>
-#endif
-#ifdef HAVE_SYS_CDEFS_H
-# include <sys/cdefs.h>
-#endif
-#include DBM_HDR
-
-const int sizeof_DBM = (int)sizeof(DBM);
-SRC
- $defs << '-DDBM_SIZEOF_DBM=sizeof(DBM)'
- else
- $defs << '-DDBM_SIZEOF_DBM=0'
- end
- }
- create_makefile("dbm")
-end
-# :startdoc:
diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c
index 6557e43c9d..358ab416b9 100644
--- a/ext/digest/bubblebabble/bubblebabble.c
+++ b/ext/digest/bubblebabble/bubblebabble.c
@@ -37,7 +37,7 @@ bubblebabble_str_new(VALUE str_digest)
digest_len = RSTRING_LEN(str_digest);
if ((LONG_MAX - 2) / 3 < (digest_len | 1)) {
- rb_raise(rb_eRuntimeError, "digest string too long");
+ rb_raise(rb_eRuntimeError, "digest string too long");
}
str = rb_str_new(0, (digest_len | 1) * 3 + 2);
diff --git a/ext/digest/bubblebabble/depend b/ext/digest/bubblebabble/depend
index e7e2a8889d..38f5ddb1e2 100644
--- a/ext/digest/bubblebabble/depend
+++ b/ext/digest/bubblebabble/depend
@@ -4,8 +4,156 @@ bubblebabble.o: $(arch_hdrdir)/ruby/config.h
bubblebabble.o: $(hdrdir)/ruby.h
bubblebabble.o: $(hdrdir)/ruby/assert.h
bubblebabble.o: $(hdrdir)/ruby/backward.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/assume.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/attributes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/bool.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/limits.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/long_long.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdarg.h
bubblebabble.o: $(hdrdir)/ruby/defines.h
bubblebabble.o: $(hdrdir)/ruby/intern.h
+bubblebabble.o: $(hdrdir)/ruby/internal/abi.h
+bubblebabble.o: $(hdrdir)/ruby/internal/anyargs.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+bubblebabble.o: $(hdrdir)/ruby/internal/assume.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/artificial.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/cold.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/const.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/error.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/format.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/noalias.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/noinline.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/pure.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/restrict.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/warning.h
+bubblebabble.o: $(hdrdir)/ruby/internal/attr/weakref.h
+bubblebabble.o: $(hdrdir)/ruby/internal/cast.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+bubblebabble.o: $(hdrdir)/ruby/internal/compiler_since.h
+bubblebabble.o: $(hdrdir)/ruby/internal/config.h
+bubblebabble.o: $(hdrdir)/ruby/internal/constant_p.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rarray.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rbasic.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rbignum.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rclass.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rdata.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rfile.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rhash.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/robject.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rregexp.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rstring.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rstruct.h
+bubblebabble.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+bubblebabble.o: $(hdrdir)/ruby/internal/ctype.h
+bubblebabble.o: $(hdrdir)/ruby/internal/dllexport.h
+bubblebabble.o: $(hdrdir)/ruby/internal/dosish.h
+bubblebabble.o: $(hdrdir)/ruby/internal/error.h
+bubblebabble.o: $(hdrdir)/ruby/internal/eval.h
+bubblebabble.o: $(hdrdir)/ruby/internal/event.h
+bubblebabble.o: $(hdrdir)/ruby/internal/fl_type.h
+bubblebabble.o: $(hdrdir)/ruby/internal/gc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/glob.h
+bubblebabble.o: $(hdrdir)/ruby/internal/globals.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/attribute.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/builtin.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/extension.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/feature.h
+bubblebabble.o: $(hdrdir)/ruby/internal/has/warning.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/array.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/bignum.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/class.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/compar.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/complex.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/cont.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/dir.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/enum.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/error.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/eval.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/file.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/gc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/hash.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/io.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/load.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/marshal.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/numeric.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/object.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/parse.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/proc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/process.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/random.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/range.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/rational.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/re.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/ruby.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/select.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/signal.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/string.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/struct.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/thread.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/time.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/variable.h
+bubblebabble.o: $(hdrdir)/ruby/internal/intern/vm.h
+bubblebabble.o: $(hdrdir)/ruby/internal/interpreter.h
+bubblebabble.o: $(hdrdir)/ruby/internal/iterator.h
+bubblebabble.o: $(hdrdir)/ruby/internal/memory.h
+bubblebabble.o: $(hdrdir)/ruby/internal/method.h
+bubblebabble.o: $(hdrdir)/ruby/internal/module.h
+bubblebabble.o: $(hdrdir)/ruby/internal/newobj.h
+bubblebabble.o: $(hdrdir)/ruby/internal/rgengc.h
+bubblebabble.o: $(hdrdir)/ruby/internal/scan_args.h
+bubblebabble.o: $(hdrdir)/ruby/internal/special_consts.h
+bubblebabble.o: $(hdrdir)/ruby/internal/static_assert.h
+bubblebabble.o: $(hdrdir)/ruby/internal/stdalign.h
+bubblebabble.o: $(hdrdir)/ruby/internal/stdbool.h
+bubblebabble.o: $(hdrdir)/ruby/internal/symbol.h
+bubblebabble.o: $(hdrdir)/ruby/internal/value.h
+bubblebabble.o: $(hdrdir)/ruby/internal/value_type.h
+bubblebabble.o: $(hdrdir)/ruby/internal/variable.h
+bubblebabble.o: $(hdrdir)/ruby/internal/warning_push.h
+bubblebabble.o: $(hdrdir)/ruby/internal/xmalloc.h
bubblebabble.o: $(hdrdir)/ruby/missing.h
bubblebabble.o: $(hdrdir)/ruby/ruby.h
bubblebabble.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/bubblebabble/extconf.rb b/ext/digest/bubblebabble/extconf.rb
index 21feed57fb..8fb001c61d 100644
--- a/ext/digest/bubblebabble/extconf.rb
+++ b/ext/digest/bubblebabble/extconf.rb
@@ -1,6 +1,4 @@
# frozen_string_literal: false
require 'mkmf'
-$defs << "-DHAVE_CONFIG_H"
-
create_makefile('digest/bubblebabble')
diff --git a/ext/digest/depend b/ext/digest/depend
index 87c39c8b8d..5a84fd53ec 100644
--- a/ext/digest/depend
+++ b/ext/digest/depend
@@ -4,8 +4,156 @@ digest.o: $(arch_hdrdir)/ruby/config.h
digest.o: $(hdrdir)/ruby.h
digest.o: $(hdrdir)/ruby/assert.h
digest.o: $(hdrdir)/ruby/backward.h
+digest.o: $(hdrdir)/ruby/backward/2/assume.h
+digest.o: $(hdrdir)/ruby/backward/2/attributes.h
+digest.o: $(hdrdir)/ruby/backward/2/bool.h
+digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
+digest.o: $(hdrdir)/ruby/backward/2/limits.h
+digest.o: $(hdrdir)/ruby/backward/2/long_long.h
+digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
+digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
digest.o: $(hdrdir)/ruby/defines.h
digest.o: $(hdrdir)/ruby/intern.h
+digest.o: $(hdrdir)/ruby/internal/abi.h
+digest.o: $(hdrdir)/ruby/internal/anyargs.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+digest.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+digest.o: $(hdrdir)/ruby/internal/assume.h
+digest.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+digest.o: $(hdrdir)/ruby/internal/attr/artificial.h
+digest.o: $(hdrdir)/ruby/internal/attr/cold.h
+digest.o: $(hdrdir)/ruby/internal/attr/const.h
+digest.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+digest.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+digest.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+digest.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+digest.o: $(hdrdir)/ruby/internal/attr/error.h
+digest.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+digest.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+digest.o: $(hdrdir)/ruby/internal/attr/format.h
+digest.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+digest.o: $(hdrdir)/ruby/internal/attr/noalias.h
+digest.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+digest.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+digest.o: $(hdrdir)/ruby/internal/attr/noinline.h
+digest.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+digest.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+digest.o: $(hdrdir)/ruby/internal/attr/pure.h
+digest.o: $(hdrdir)/ruby/internal/attr/restrict.h
+digest.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+digest.o: $(hdrdir)/ruby/internal/attr/warning.h
+digest.o: $(hdrdir)/ruby/internal/attr/weakref.h
+digest.o: $(hdrdir)/ruby/internal/cast.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+digest.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+digest.o: $(hdrdir)/ruby/internal/compiler_since.h
+digest.o: $(hdrdir)/ruby/internal/config.h
+digest.o: $(hdrdir)/ruby/internal/constant_p.h
+digest.o: $(hdrdir)/ruby/internal/core.h
+digest.o: $(hdrdir)/ruby/internal/core/rarray.h
+digest.o: $(hdrdir)/ruby/internal/core/rbasic.h
+digest.o: $(hdrdir)/ruby/internal/core/rbignum.h
+digest.o: $(hdrdir)/ruby/internal/core/rclass.h
+digest.o: $(hdrdir)/ruby/internal/core/rdata.h
+digest.o: $(hdrdir)/ruby/internal/core/rfile.h
+digest.o: $(hdrdir)/ruby/internal/core/rhash.h
+digest.o: $(hdrdir)/ruby/internal/core/robject.h
+digest.o: $(hdrdir)/ruby/internal/core/rregexp.h
+digest.o: $(hdrdir)/ruby/internal/core/rstring.h
+digest.o: $(hdrdir)/ruby/internal/core/rstruct.h
+digest.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+digest.o: $(hdrdir)/ruby/internal/ctype.h
+digest.o: $(hdrdir)/ruby/internal/dllexport.h
+digest.o: $(hdrdir)/ruby/internal/dosish.h
+digest.o: $(hdrdir)/ruby/internal/error.h
+digest.o: $(hdrdir)/ruby/internal/eval.h
+digest.o: $(hdrdir)/ruby/internal/event.h
+digest.o: $(hdrdir)/ruby/internal/fl_type.h
+digest.o: $(hdrdir)/ruby/internal/gc.h
+digest.o: $(hdrdir)/ruby/internal/glob.h
+digest.o: $(hdrdir)/ruby/internal/globals.h
+digest.o: $(hdrdir)/ruby/internal/has/attribute.h
+digest.o: $(hdrdir)/ruby/internal/has/builtin.h
+digest.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+digest.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+digest.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+digest.o: $(hdrdir)/ruby/internal/has/extension.h
+digest.o: $(hdrdir)/ruby/internal/has/feature.h
+digest.o: $(hdrdir)/ruby/internal/has/warning.h
+digest.o: $(hdrdir)/ruby/internal/intern/array.h
+digest.o: $(hdrdir)/ruby/internal/intern/bignum.h
+digest.o: $(hdrdir)/ruby/internal/intern/class.h
+digest.o: $(hdrdir)/ruby/internal/intern/compar.h
+digest.o: $(hdrdir)/ruby/internal/intern/complex.h
+digest.o: $(hdrdir)/ruby/internal/intern/cont.h
+digest.o: $(hdrdir)/ruby/internal/intern/dir.h
+digest.o: $(hdrdir)/ruby/internal/intern/enum.h
+digest.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+digest.o: $(hdrdir)/ruby/internal/intern/error.h
+digest.o: $(hdrdir)/ruby/internal/intern/eval.h
+digest.o: $(hdrdir)/ruby/internal/intern/file.h
+digest.o: $(hdrdir)/ruby/internal/intern/gc.h
+digest.o: $(hdrdir)/ruby/internal/intern/hash.h
+digest.o: $(hdrdir)/ruby/internal/intern/io.h
+digest.o: $(hdrdir)/ruby/internal/intern/load.h
+digest.o: $(hdrdir)/ruby/internal/intern/marshal.h
+digest.o: $(hdrdir)/ruby/internal/intern/numeric.h
+digest.o: $(hdrdir)/ruby/internal/intern/object.h
+digest.o: $(hdrdir)/ruby/internal/intern/parse.h
+digest.o: $(hdrdir)/ruby/internal/intern/proc.h
+digest.o: $(hdrdir)/ruby/internal/intern/process.h
+digest.o: $(hdrdir)/ruby/internal/intern/random.h
+digest.o: $(hdrdir)/ruby/internal/intern/range.h
+digest.o: $(hdrdir)/ruby/internal/intern/rational.h
+digest.o: $(hdrdir)/ruby/internal/intern/re.h
+digest.o: $(hdrdir)/ruby/internal/intern/ruby.h
+digest.o: $(hdrdir)/ruby/internal/intern/select.h
+digest.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+digest.o: $(hdrdir)/ruby/internal/intern/signal.h
+digest.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+digest.o: $(hdrdir)/ruby/internal/intern/string.h
+digest.o: $(hdrdir)/ruby/internal/intern/struct.h
+digest.o: $(hdrdir)/ruby/internal/intern/thread.h
+digest.o: $(hdrdir)/ruby/internal/intern/time.h
+digest.o: $(hdrdir)/ruby/internal/intern/variable.h
+digest.o: $(hdrdir)/ruby/internal/intern/vm.h
+digest.o: $(hdrdir)/ruby/internal/interpreter.h
+digest.o: $(hdrdir)/ruby/internal/iterator.h
+digest.o: $(hdrdir)/ruby/internal/memory.h
+digest.o: $(hdrdir)/ruby/internal/method.h
+digest.o: $(hdrdir)/ruby/internal/module.h
+digest.o: $(hdrdir)/ruby/internal/newobj.h
+digest.o: $(hdrdir)/ruby/internal/rgengc.h
+digest.o: $(hdrdir)/ruby/internal/scan_args.h
+digest.o: $(hdrdir)/ruby/internal/special_consts.h
+digest.o: $(hdrdir)/ruby/internal/static_assert.h
+digest.o: $(hdrdir)/ruby/internal/stdalign.h
+digest.o: $(hdrdir)/ruby/internal/stdbool.h
+digest.o: $(hdrdir)/ruby/internal/symbol.h
+digest.o: $(hdrdir)/ruby/internal/value.h
+digest.o: $(hdrdir)/ruby/internal/value_type.h
+digest.o: $(hdrdir)/ruby/internal/variable.h
+digest.o: $(hdrdir)/ruby/internal/warning_push.h
+digest.o: $(hdrdir)/ruby/internal/xmalloc.h
digest.o: $(hdrdir)/ruby/missing.h
digest.o: $(hdrdir)/ruby/ruby.h
digest.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index a59f880ac7..68837a674c 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -154,7 +154,7 @@ static void
rb_digest_instance_method_unimpl(VALUE self, const char *method)
{
rb_raise(rb_eRuntimeError, "%s does not implement %s()",
- rb_obj_classname(self), method);
+ rb_obj_classname(self), method);
}
/*
@@ -383,8 +383,8 @@ rb_digest_instance_equal(VALUE self, VALUE other)
StringValue(str2);
if (RSTRING_LEN(str1) == RSTRING_LEN(str2) &&
- rb_str_cmp(str1, str2) == 0) {
- return Qtrue;
+ rb_str_cmp(str1, str2) == 0) {
+ return Qtrue;
}
return Qfalse;
}
@@ -406,7 +406,7 @@ rb_digest_instance_digest_length(VALUE self)
/* never blindly assume that #digest() returns a string */
StringValue(digest);
- return INT2NUM(RSTRING_LEN(digest));
+ return LONG2NUM(RSTRING_LEN(digest));
}
/*
@@ -602,7 +602,7 @@ static inline void
algo_init(const rb_digest_metadata_t *algo, void *pctx)
{
if (algo->init_func(pctx) != 1) {
- rb_raise(rb_eRuntimeError, "Digest initialization failed.");
+ rb_raise(rb_eRuntimeError, "Digest initialization failed.");
}
}
@@ -614,7 +614,7 @@ rb_digest_base_alloc(VALUE klass)
void *pctx;
if (klass == rb_cDigest_Base) {
- rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
+ rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
}
algo = get_digest_base_metadata(klass);
@@ -639,7 +639,7 @@ rb_digest_base_copy(VALUE copy, VALUE obj)
algo = get_digest_obj_metadata(copy);
if (algo != get_digest_obj_metadata(obj))
- rb_raise(rb_eTypeError, "different algorithms");
+ rb_raise(rb_eTypeError, "different algorithms");
TypedData_Get_Struct(obj, void, &digest_type, pctx1);
TypedData_Get_Struct(copy, void, &digest_type, pctx2);
@@ -725,7 +725,7 @@ rb_digest_base_digest_length(VALUE self)
algo = get_digest_obj_metadata(self);
- return INT2NUM(algo->digest_len);
+ return SIZET2NUM(algo->digest_len);
}
/*
@@ -740,7 +740,7 @@ rb_digest_base_block_length(VALUE self)
algo = get_digest_obj_metadata(self);
- return INT2NUM(algo->block_len);
+ return SIZET2NUM(algo->block_len);
}
void
@@ -765,6 +765,10 @@ InitVM_digest(void)
*/
rb_mDigest = rb_define_module("Digest");
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
/* module functions */
rb_define_module_function(rb_mDigest, "hexencode", rb_digest_s_hexencode, 1);
diff --git a/ext/digest/digest.gemspec b/ext/digest/digest.gemspec
new file mode 100644
index 0000000000..4a01c5fde1
--- /dev/null
+++ b/ext/digest/digest.gemspec
@@ -0,0 +1,44 @@
+# coding: utf-8
+# frozen_string_literal: true
+
+Gem::Specification.new do |spec|
+ version_module = Module.new do
+ version_rb = File.join(__dir__, "lib/digest/version.rb")
+ module_eval(File.read(version_rb), version_rb)
+ end
+
+ spec.name = "digest"
+ spec.version = version_module::Digest::VERSION
+ spec.authors = ["Akinori MUSHA"]
+ spec.email = ["knu@idaemons.org"]
+
+ spec.summary = %q{Provides a framework for message digest libraries.}
+ spec.description = %q{Provides a framework for message digest libraries.}
+ spec.homepage = "https://github.com/ruby/digest"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.files = [
+ "LICENSE.txt",
+ "README.md",
+ *Dir["lib/digest{.rb,/**/*.rb}"],
+ ]
+
+ spec.required_ruby_version = ">= 2.5.0"
+
+ spec.bindir = "exe"
+ spec.executables = []
+
+ if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
+ spec.platform = 'java'
+
+ spec.files += Dir["ext/java/**/*.{rb,java}", "lib/digest.jar"]
+ spec.require_paths = %w[lib ext/java/org/jruby/ext/digest/lib]
+ else
+ spec.extensions = Dir["ext/digest/**/extconf.rb"]
+
+ spec.files += Dir["ext/digest/**/{*.{rb,c,h,sh},depend}"]
+ spec.require_paths = %w[lib]
+ end
+
+ spec.metadata["msys2_mingw_dependencies"] = "openssl"
+end
diff --git a/ext/digest/digest.h b/ext/digest/digest.h
index 4b6954089f..8a4c5b7e4e 100644
--- a/ext/digest/digest.h
+++ b/ext/digest/digest.h
@@ -38,7 +38,7 @@ rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \
const unsigned int stride = 16384; \
\
for (; size > stride; size -= stride, ptr += stride) { \
- name##_Update(ctx, ptr, stride); \
+ name##_Update(ctx, ptr, stride); \
} \
if (size > 0) name##_Update(ctx, ptr, size); \
}
@@ -62,3 +62,11 @@ rb_id_metadata(void)
{
return rb_intern_const("metadata");
}
+
+static inline VALUE
+rb_digest_make_metadata(const rb_digest_metadata_t *meta)
+{
+#undef RUBY_UNTYPED_DATA_WARNING
+#define RUBY_UNTYPED_DATA_WARNING 0
+ return rb_obj_freeze(Data_Wrap_Struct(0, 0, 0, (void *)meta));
+}
diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb
index 915b61877f..36a7d75289 100644
--- a/ext/digest/digest_conf.rb
+++ b/ext/digest/digest_conf.rb
@@ -1,60 +1,9 @@
# frozen_string_literal: false
-# Copy from ext/openssl/extconf.rb
-def find_openssl_library
- if $mswin || $mingw
- # required for static OpenSSL libraries
- have_library("gdi32") # OpenSSL <= 1.0.2 (for RAND_screen())
- have_library("crypt32")
- end
-
- return false unless have_header("openssl/ssl.h")
-
- ret = have_library("crypto", "CRYPTO_malloc") &&
- have_library("ssl", "SSL_new")
- return ret if ret
-
- if $mswin
- # OpenSSL >= 1.1.0: libcrypto.lib and libssl.lib.
- if have_library("libcrypto", "CRYPTO_malloc") &&
- have_library("libssl", "SSL_new")
- return true
- end
-
- # OpenSSL <= 1.0.2: libeay32.lib and ssleay32.lib.
- if have_library("libeay32", "CRYPTO_malloc") &&
- have_library("ssleay32", "SSL_new")
- return true
- end
-
- # LibreSSL: libcrypto-##.lib and libssl-##.lib, where ## is the ABI version
- # number. We have to find the version number out by scanning libpath.
- libpath = $LIBPATH.dup
- libpath |= ENV["LIB"].split(File::PATH_SEPARATOR)
- libpath.map! { |d| d.tr(File::ALT_SEPARATOR, File::SEPARATOR) }
-
- ret = [
- ["crypto", "CRYPTO_malloc"],
- ["ssl", "SSL_new"]
- ].all? do |base, func|
- result = false
- libs = ["lib#{base}-[0-9][0-9]", "lib#{base}-[0-9][0-9][0-9]"]
- libs = Dir.glob(libs.map{|l| libpath.map{|d| File.join(d, l + ".*")}}.flatten).map{|path| File.basename(path, ".*")}.uniq
- libs.each do |lib|
- result = have_library(lib, func)
- break if result
- end
- result
- end
- return ret if ret
- end
- return false
-end
-
-def digest_conf(name, hdr = name, funcs = nil, types = nil)
+def digest_conf(name)
unless with_config("bundled-#{name}")
cc = with_config("common-digest")
- if cc == true or /\b#{name}\b/ =~ cc
+ if cc != false or /\b#{name}\b/ =~ cc
if File.exist?("#$srcdir/#{name}cc.h") and
have_header("CommonCrypto/CommonDigest.h")
$defs << "-D#{name.upcase}_USE_COMMONDIGEST"
@@ -62,22 +11,6 @@ def digest_conf(name, hdr = name, funcs = nil, types = nil)
return :commondigest
end
end
-
- dir_config("openssl")
- pkg_config("openssl")
- require File.expand_path('../../openssl/deprecation', __FILE__)
- if find_openssl_library
- funcs ||= name.upcase
- funcs = Array(funcs)
- types ||= funcs
- hdr = "openssl/#{hdr}.h"
- if funcs.all? {|func| OpenSSL.check_func("#{func}_Transform", hdr)} &&
- types.all? {|type| have_type("#{type}_CTX", hdr)}
- $defs << "-D#{name.upcase}_USE_OPENSSL"
- $headers << "#{name}ossl.h"
- return :ossl
- end
- end
end
$objs << "#{name}.#{$OBJEXT}"
return
diff --git a/ext/digest/extconf.rb b/ext/digest/extconf.rb
index a8c68850a2..0e5f08d794 100644
--- a/ext/digest/extconf.rb
+++ b/ext/digest/extconf.rb
@@ -6,6 +6,6 @@ require "mkmf"
$INSTALLFILES = {
"digest.h" => "$(HDRDIR)"
-}
+} if $extmk
create_makefile("digest")
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index ba0637af32..e995adb450 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -1,5 +1,19 @@
# frozen_string_literal: false
-require 'digest.so'
+
+if defined?(Digest) &&
+ /\A(?:2\.|3\.0\.[0-2]\z)/.match?(RUBY_VERSION) &&
+ caller_locations.any? { |l|
+ %r{/(rubygems/gem_runner|bundler/cli)\.rb}.match?(l.path)
+ }
+ # Before Ruby 3.0.3/3.1.0, the gem and bundle commands used to load
+ # the digest library before loading additionally installed gems, so
+ # you will get constant redefinition warnings and unexpected
+ # implementation overwriting if we proceed here. Avoid that.
+ return
+end
+
+require 'digest/version'
+require 'digest/loader'
module Digest
# A mutex for Digest().
@@ -8,7 +22,7 @@ module Digest
def self.const_missing(name) # :nodoc:
case name
when :SHA256, :SHA384, :SHA512
- lib = 'digest/sha2.so'
+ lib = 'digest/sha2'
else
lib = File.join('digest', name.to_s.downcase)
end
diff --git a/ext/digest/lib/digest/loader.rb b/ext/digest/lib/digest/loader.rb
new file mode 100644
index 0000000000..6b989e07be
--- /dev/null
+++ b/ext/digest/lib/digest/loader.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+require 'digest.so'
diff --git a/ext/digest/lib/digest/version.rb b/ext/digest/lib/digest/version.rb
new file mode 100644
index 0000000000..42fd7acf6e
--- /dev/null
+++ b/ext/digest/lib/digest/version.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+module Digest
+ VERSION = "3.1.1"
+end
diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend
index abfd8de6a5..ea1ceec7fd 100644
--- a/ext/digest/md5/depend
+++ b/ext/digest/md5/depend
@@ -2,18 +2,330 @@ md5.o: md5.c md5.h $(srcdir)/../defs.h
md5init.o: $(LOCAL_HDRS)
# AUTOGENERATED DEPENDENCIES START
+md5.o: $(RUBY_EXTCONF_H)
+md5.o: $(arch_hdrdir)/ruby/config.h
+md5.o: $(hdrdir)/ruby.h
+md5.o: $(hdrdir)/ruby/assert.h
+md5.o: $(hdrdir)/ruby/backward.h
+md5.o: $(hdrdir)/ruby/backward/2/assume.h
+md5.o: $(hdrdir)/ruby/backward/2/attributes.h
+md5.o: $(hdrdir)/ruby/backward/2/bool.h
+md5.o: $(hdrdir)/ruby/backward/2/inttypes.h
+md5.o: $(hdrdir)/ruby/backward/2/limits.h
+md5.o: $(hdrdir)/ruby/backward/2/long_long.h
+md5.o: $(hdrdir)/ruby/backward/2/stdalign.h
+md5.o: $(hdrdir)/ruby/backward/2/stdarg.h
+md5.o: $(hdrdir)/ruby/defines.h
+md5.o: $(hdrdir)/ruby/intern.h
+md5.o: $(hdrdir)/ruby/internal/abi.h
+md5.o: $(hdrdir)/ruby/internal/anyargs.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+md5.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+md5.o: $(hdrdir)/ruby/internal/assume.h
+md5.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+md5.o: $(hdrdir)/ruby/internal/attr/artificial.h
+md5.o: $(hdrdir)/ruby/internal/attr/cold.h
+md5.o: $(hdrdir)/ruby/internal/attr/const.h
+md5.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+md5.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+md5.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+md5.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+md5.o: $(hdrdir)/ruby/internal/attr/error.h
+md5.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+md5.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+md5.o: $(hdrdir)/ruby/internal/attr/format.h
+md5.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+md5.o: $(hdrdir)/ruby/internal/attr/noalias.h
+md5.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+md5.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+md5.o: $(hdrdir)/ruby/internal/attr/noinline.h
+md5.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+md5.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+md5.o: $(hdrdir)/ruby/internal/attr/pure.h
+md5.o: $(hdrdir)/ruby/internal/attr/restrict.h
+md5.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+md5.o: $(hdrdir)/ruby/internal/attr/warning.h
+md5.o: $(hdrdir)/ruby/internal/attr/weakref.h
+md5.o: $(hdrdir)/ruby/internal/cast.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+md5.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+md5.o: $(hdrdir)/ruby/internal/compiler_since.h
+md5.o: $(hdrdir)/ruby/internal/config.h
+md5.o: $(hdrdir)/ruby/internal/constant_p.h
+md5.o: $(hdrdir)/ruby/internal/core.h
+md5.o: $(hdrdir)/ruby/internal/core/rarray.h
+md5.o: $(hdrdir)/ruby/internal/core/rbasic.h
+md5.o: $(hdrdir)/ruby/internal/core/rbignum.h
+md5.o: $(hdrdir)/ruby/internal/core/rclass.h
+md5.o: $(hdrdir)/ruby/internal/core/rdata.h
+md5.o: $(hdrdir)/ruby/internal/core/rfile.h
+md5.o: $(hdrdir)/ruby/internal/core/rhash.h
+md5.o: $(hdrdir)/ruby/internal/core/robject.h
+md5.o: $(hdrdir)/ruby/internal/core/rregexp.h
+md5.o: $(hdrdir)/ruby/internal/core/rstring.h
+md5.o: $(hdrdir)/ruby/internal/core/rstruct.h
+md5.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+md5.o: $(hdrdir)/ruby/internal/ctype.h
+md5.o: $(hdrdir)/ruby/internal/dllexport.h
+md5.o: $(hdrdir)/ruby/internal/dosish.h
+md5.o: $(hdrdir)/ruby/internal/error.h
+md5.o: $(hdrdir)/ruby/internal/eval.h
+md5.o: $(hdrdir)/ruby/internal/event.h
+md5.o: $(hdrdir)/ruby/internal/fl_type.h
+md5.o: $(hdrdir)/ruby/internal/gc.h
+md5.o: $(hdrdir)/ruby/internal/glob.h
+md5.o: $(hdrdir)/ruby/internal/globals.h
+md5.o: $(hdrdir)/ruby/internal/has/attribute.h
+md5.o: $(hdrdir)/ruby/internal/has/builtin.h
+md5.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+md5.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+md5.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+md5.o: $(hdrdir)/ruby/internal/has/extension.h
+md5.o: $(hdrdir)/ruby/internal/has/feature.h
+md5.o: $(hdrdir)/ruby/internal/has/warning.h
+md5.o: $(hdrdir)/ruby/internal/intern/array.h
+md5.o: $(hdrdir)/ruby/internal/intern/bignum.h
+md5.o: $(hdrdir)/ruby/internal/intern/class.h
+md5.o: $(hdrdir)/ruby/internal/intern/compar.h
+md5.o: $(hdrdir)/ruby/internal/intern/complex.h
+md5.o: $(hdrdir)/ruby/internal/intern/cont.h
+md5.o: $(hdrdir)/ruby/internal/intern/dir.h
+md5.o: $(hdrdir)/ruby/internal/intern/enum.h
+md5.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+md5.o: $(hdrdir)/ruby/internal/intern/error.h
+md5.o: $(hdrdir)/ruby/internal/intern/eval.h
+md5.o: $(hdrdir)/ruby/internal/intern/file.h
+md5.o: $(hdrdir)/ruby/internal/intern/gc.h
+md5.o: $(hdrdir)/ruby/internal/intern/hash.h
+md5.o: $(hdrdir)/ruby/internal/intern/io.h
+md5.o: $(hdrdir)/ruby/internal/intern/load.h
+md5.o: $(hdrdir)/ruby/internal/intern/marshal.h
+md5.o: $(hdrdir)/ruby/internal/intern/numeric.h
+md5.o: $(hdrdir)/ruby/internal/intern/object.h
+md5.o: $(hdrdir)/ruby/internal/intern/parse.h
+md5.o: $(hdrdir)/ruby/internal/intern/proc.h
+md5.o: $(hdrdir)/ruby/internal/intern/process.h
+md5.o: $(hdrdir)/ruby/internal/intern/random.h
+md5.o: $(hdrdir)/ruby/internal/intern/range.h
+md5.o: $(hdrdir)/ruby/internal/intern/rational.h
+md5.o: $(hdrdir)/ruby/internal/intern/re.h
+md5.o: $(hdrdir)/ruby/internal/intern/ruby.h
+md5.o: $(hdrdir)/ruby/internal/intern/select.h
+md5.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+md5.o: $(hdrdir)/ruby/internal/intern/signal.h
+md5.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+md5.o: $(hdrdir)/ruby/internal/intern/string.h
+md5.o: $(hdrdir)/ruby/internal/intern/struct.h
+md5.o: $(hdrdir)/ruby/internal/intern/thread.h
+md5.o: $(hdrdir)/ruby/internal/intern/time.h
+md5.o: $(hdrdir)/ruby/internal/intern/variable.h
+md5.o: $(hdrdir)/ruby/internal/intern/vm.h
+md5.o: $(hdrdir)/ruby/internal/interpreter.h
+md5.o: $(hdrdir)/ruby/internal/iterator.h
+md5.o: $(hdrdir)/ruby/internal/memory.h
+md5.o: $(hdrdir)/ruby/internal/method.h
+md5.o: $(hdrdir)/ruby/internal/module.h
+md5.o: $(hdrdir)/ruby/internal/newobj.h
+md5.o: $(hdrdir)/ruby/internal/rgengc.h
+md5.o: $(hdrdir)/ruby/internal/scan_args.h
+md5.o: $(hdrdir)/ruby/internal/special_consts.h
+md5.o: $(hdrdir)/ruby/internal/static_assert.h
+md5.o: $(hdrdir)/ruby/internal/stdalign.h
+md5.o: $(hdrdir)/ruby/internal/stdbool.h
+md5.o: $(hdrdir)/ruby/internal/symbol.h
+md5.o: $(hdrdir)/ruby/internal/value.h
+md5.o: $(hdrdir)/ruby/internal/value_type.h
+md5.o: $(hdrdir)/ruby/internal/variable.h
+md5.o: $(hdrdir)/ruby/internal/warning_push.h
+md5.o: $(hdrdir)/ruby/internal/xmalloc.h
+md5.o: $(hdrdir)/ruby/missing.h
+md5.o: $(hdrdir)/ruby/ruby.h
+md5.o: $(hdrdir)/ruby/st.h
+md5.o: $(hdrdir)/ruby/subst.h
+md5.o: $(srcdir)/../defs.h
+md5.o: md5.c
+md5.o: md5.h
md5init.o: $(RUBY_EXTCONF_H)
md5init.o: $(arch_hdrdir)/ruby/config.h
md5init.o: $(hdrdir)/ruby.h
md5init.o: $(hdrdir)/ruby/assert.h
md5init.o: $(hdrdir)/ruby/backward.h
+md5init.o: $(hdrdir)/ruby/backward/2/assume.h
+md5init.o: $(hdrdir)/ruby/backward/2/attributes.h
+md5init.o: $(hdrdir)/ruby/backward/2/bool.h
+md5init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+md5init.o: $(hdrdir)/ruby/backward/2/limits.h
+md5init.o: $(hdrdir)/ruby/backward/2/long_long.h
+md5init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+md5init.o: $(hdrdir)/ruby/backward/2/stdarg.h
md5init.o: $(hdrdir)/ruby/defines.h
md5init.o: $(hdrdir)/ruby/intern.h
+md5init.o: $(hdrdir)/ruby/internal/abi.h
+md5init.o: $(hdrdir)/ruby/internal/anyargs.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+md5init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+md5init.o: $(hdrdir)/ruby/internal/assume.h
+md5init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+md5init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+md5init.o: $(hdrdir)/ruby/internal/attr/cold.h
+md5init.o: $(hdrdir)/ruby/internal/attr/const.h
+md5init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+md5init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+md5init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+md5init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+md5init.o: $(hdrdir)/ruby/internal/attr/error.h
+md5init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+md5init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+md5init.o: $(hdrdir)/ruby/internal/attr/format.h
+md5init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+md5init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+md5init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+md5init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+md5init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+md5init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+md5init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+md5init.o: $(hdrdir)/ruby/internal/attr/pure.h
+md5init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+md5init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+md5init.o: $(hdrdir)/ruby/internal/attr/warning.h
+md5init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+md5init.o: $(hdrdir)/ruby/internal/cast.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+md5init.o: $(hdrdir)/ruby/internal/compiler_since.h
+md5init.o: $(hdrdir)/ruby/internal/config.h
+md5init.o: $(hdrdir)/ruby/internal/constant_p.h
+md5init.o: $(hdrdir)/ruby/internal/core.h
+md5init.o: $(hdrdir)/ruby/internal/core/rarray.h
+md5init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+md5init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+md5init.o: $(hdrdir)/ruby/internal/core/rclass.h
+md5init.o: $(hdrdir)/ruby/internal/core/rdata.h
+md5init.o: $(hdrdir)/ruby/internal/core/rfile.h
+md5init.o: $(hdrdir)/ruby/internal/core/rhash.h
+md5init.o: $(hdrdir)/ruby/internal/core/robject.h
+md5init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+md5init.o: $(hdrdir)/ruby/internal/core/rstring.h
+md5init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+md5init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+md5init.o: $(hdrdir)/ruby/internal/ctype.h
+md5init.o: $(hdrdir)/ruby/internal/dllexport.h
+md5init.o: $(hdrdir)/ruby/internal/dosish.h
+md5init.o: $(hdrdir)/ruby/internal/error.h
+md5init.o: $(hdrdir)/ruby/internal/eval.h
+md5init.o: $(hdrdir)/ruby/internal/event.h
+md5init.o: $(hdrdir)/ruby/internal/fl_type.h
+md5init.o: $(hdrdir)/ruby/internal/gc.h
+md5init.o: $(hdrdir)/ruby/internal/glob.h
+md5init.o: $(hdrdir)/ruby/internal/globals.h
+md5init.o: $(hdrdir)/ruby/internal/has/attribute.h
+md5init.o: $(hdrdir)/ruby/internal/has/builtin.h
+md5init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+md5init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+md5init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+md5init.o: $(hdrdir)/ruby/internal/has/extension.h
+md5init.o: $(hdrdir)/ruby/internal/has/feature.h
+md5init.o: $(hdrdir)/ruby/internal/has/warning.h
+md5init.o: $(hdrdir)/ruby/internal/intern/array.h
+md5init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+md5init.o: $(hdrdir)/ruby/internal/intern/class.h
+md5init.o: $(hdrdir)/ruby/internal/intern/compar.h
+md5init.o: $(hdrdir)/ruby/internal/intern/complex.h
+md5init.o: $(hdrdir)/ruby/internal/intern/cont.h
+md5init.o: $(hdrdir)/ruby/internal/intern/dir.h
+md5init.o: $(hdrdir)/ruby/internal/intern/enum.h
+md5init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+md5init.o: $(hdrdir)/ruby/internal/intern/error.h
+md5init.o: $(hdrdir)/ruby/internal/intern/eval.h
+md5init.o: $(hdrdir)/ruby/internal/intern/file.h
+md5init.o: $(hdrdir)/ruby/internal/intern/gc.h
+md5init.o: $(hdrdir)/ruby/internal/intern/hash.h
+md5init.o: $(hdrdir)/ruby/internal/intern/io.h
+md5init.o: $(hdrdir)/ruby/internal/intern/load.h
+md5init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+md5init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+md5init.o: $(hdrdir)/ruby/internal/intern/object.h
+md5init.o: $(hdrdir)/ruby/internal/intern/parse.h
+md5init.o: $(hdrdir)/ruby/internal/intern/proc.h
+md5init.o: $(hdrdir)/ruby/internal/intern/process.h
+md5init.o: $(hdrdir)/ruby/internal/intern/random.h
+md5init.o: $(hdrdir)/ruby/internal/intern/range.h
+md5init.o: $(hdrdir)/ruby/internal/intern/rational.h
+md5init.o: $(hdrdir)/ruby/internal/intern/re.h
+md5init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+md5init.o: $(hdrdir)/ruby/internal/intern/select.h
+md5init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+md5init.o: $(hdrdir)/ruby/internal/intern/signal.h
+md5init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+md5init.o: $(hdrdir)/ruby/internal/intern/string.h
+md5init.o: $(hdrdir)/ruby/internal/intern/struct.h
+md5init.o: $(hdrdir)/ruby/internal/intern/thread.h
+md5init.o: $(hdrdir)/ruby/internal/intern/time.h
+md5init.o: $(hdrdir)/ruby/internal/intern/variable.h
+md5init.o: $(hdrdir)/ruby/internal/intern/vm.h
+md5init.o: $(hdrdir)/ruby/internal/interpreter.h
+md5init.o: $(hdrdir)/ruby/internal/iterator.h
+md5init.o: $(hdrdir)/ruby/internal/memory.h
+md5init.o: $(hdrdir)/ruby/internal/method.h
+md5init.o: $(hdrdir)/ruby/internal/module.h
+md5init.o: $(hdrdir)/ruby/internal/newobj.h
+md5init.o: $(hdrdir)/ruby/internal/rgengc.h
+md5init.o: $(hdrdir)/ruby/internal/scan_args.h
+md5init.o: $(hdrdir)/ruby/internal/special_consts.h
+md5init.o: $(hdrdir)/ruby/internal/static_assert.h
+md5init.o: $(hdrdir)/ruby/internal/stdalign.h
+md5init.o: $(hdrdir)/ruby/internal/stdbool.h
+md5init.o: $(hdrdir)/ruby/internal/symbol.h
+md5init.o: $(hdrdir)/ruby/internal/value.h
+md5init.o: $(hdrdir)/ruby/internal/value_type.h
+md5init.o: $(hdrdir)/ruby/internal/variable.h
+md5init.o: $(hdrdir)/ruby/internal/warning_push.h
+md5init.o: $(hdrdir)/ruby/internal/xmalloc.h
md5init.o: $(hdrdir)/ruby/missing.h
md5init.o: $(hdrdir)/ruby/ruby.h
md5init.o: $(hdrdir)/ruby/st.h
md5init.o: $(hdrdir)/ruby/subst.h
+md5init.o: $(srcdir)/../defs.h
md5init.o: $(srcdir)/../digest.h
+md5init.o: md5.h
+md5init.o: md5cc.h
md5init.o: md5init.c
-md5init.o: md5ossl.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/digest/md5/extconf.rb b/ext/digest/md5/extconf.rb
index dead9a228b..01658e1b60 100644
--- a/ext/digest/md5/extconf.rb
+++ b/ext/digest/md5/extconf.rb
@@ -6,8 +6,6 @@
require "mkmf"
require File.expand_path("../../digest_conf", __FILE__)
-$defs << "-DHAVE_CONFIG_H"
-
$objs = [ "md5init.#{$OBJEXT}" ]
digest_conf("md5")
diff --git a/ext/digest/md5/md5.c b/ext/digest/md5/md5.c
index 19fe54a693..3a7fe2cdad 100644
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -225,7 +225,7 @@ md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
uint32_t xbuf[16];
const uint32_t *X;
- if (!((data - (const uint8_t *)0) & 3)) {
+ if (!(((uintptr_t)data) & 3)) {
/* data are properly aligned */
X = (const uint32_t *)data;
} else {
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c
index dafd38a29c..52cba78bf1 100644
--- a/ext/digest/md5/md5init.c
+++ b/ext/digest/md5/md5init.c
@@ -3,9 +3,7 @@
#include <ruby/ruby.h>
#include "../digest.h"
-#if defined(MD5_USE_OPENSSL)
-#include "md5ossl.h"
-#elif defined(MD5_USE_COMMONDIGEST)
+#if defined(MD5_USE_COMMONDIGEST)
#include "md5cc.h"
#else
#include "md5.h"
@@ -59,8 +57,5 @@ Init_md5(void)
cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base);
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
- rb_iv_set(cDigest_MD5, "metadata",
- Data_Wrap_Struct(0, 0, 0, (void *)&md5));
+ rb_iv_set(cDigest_MD5, "metadata", rb_digest_make_metadata(&md5));
}
diff --git a/ext/digest/md5/md5ossl.h b/ext/digest/md5/md5ossl.h
deleted file mode 100644
index 94aa7ae77b..0000000000
--- a/ext/digest/md5/md5ossl.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* $Id$ */
-
-#ifndef MD5OSSL_H_INCLUDED
-#define MD5OSSL_H_INCLUDED
-
-#include <stddef.h>
-#include <openssl/md5.h>
-
-#define MD5_BLOCK_LENGTH MD5_CBLOCK
-
-static DEFINE_FINISH_FUNC_FROM_FINAL(MD5)
-#undef MD5_Finish
-#define MD5_Finish rb_digest_MD5_finish
-
-#endif
diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend
index 07c406a7d2..3a0ed72732 100644
--- a/ext/digest/rmd160/depend
+++ b/ext/digest/rmd160/depend
@@ -2,18 +2,329 @@ rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h
rmd160init.o: $(LOCAL_HDRS)
# AUTOGENERATED DEPENDENCIES START
+rmd160.o: $(RUBY_EXTCONF_H)
+rmd160.o: $(arch_hdrdir)/ruby/config.h
+rmd160.o: $(hdrdir)/ruby.h
+rmd160.o: $(hdrdir)/ruby/assert.h
+rmd160.o: $(hdrdir)/ruby/backward.h
+rmd160.o: $(hdrdir)/ruby/backward/2/assume.h
+rmd160.o: $(hdrdir)/ruby/backward/2/attributes.h
+rmd160.o: $(hdrdir)/ruby/backward/2/bool.h
+rmd160.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rmd160.o: $(hdrdir)/ruby/backward/2/limits.h
+rmd160.o: $(hdrdir)/ruby/backward/2/long_long.h
+rmd160.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rmd160.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rmd160.o: $(hdrdir)/ruby/defines.h
+rmd160.o: $(hdrdir)/ruby/intern.h
+rmd160.o: $(hdrdir)/ruby/internal/abi.h
+rmd160.o: $(hdrdir)/ruby/internal/anyargs.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rmd160.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rmd160.o: $(hdrdir)/ruby/internal/assume.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/cold.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/const.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/error.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/format.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/pure.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/warning.h
+rmd160.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rmd160.o: $(hdrdir)/ruby/internal/cast.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rmd160.o: $(hdrdir)/ruby/internal/compiler_since.h
+rmd160.o: $(hdrdir)/ruby/internal/config.h
+rmd160.o: $(hdrdir)/ruby/internal/constant_p.h
+rmd160.o: $(hdrdir)/ruby/internal/core.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rarray.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rclass.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rdata.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rfile.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rhash.h
+rmd160.o: $(hdrdir)/ruby/internal/core/robject.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rstring.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rmd160.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rmd160.o: $(hdrdir)/ruby/internal/ctype.h
+rmd160.o: $(hdrdir)/ruby/internal/dllexport.h
+rmd160.o: $(hdrdir)/ruby/internal/dosish.h
+rmd160.o: $(hdrdir)/ruby/internal/error.h
+rmd160.o: $(hdrdir)/ruby/internal/eval.h
+rmd160.o: $(hdrdir)/ruby/internal/event.h
+rmd160.o: $(hdrdir)/ruby/internal/fl_type.h
+rmd160.o: $(hdrdir)/ruby/internal/gc.h
+rmd160.o: $(hdrdir)/ruby/internal/glob.h
+rmd160.o: $(hdrdir)/ruby/internal/globals.h
+rmd160.o: $(hdrdir)/ruby/internal/has/attribute.h
+rmd160.o: $(hdrdir)/ruby/internal/has/builtin.h
+rmd160.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rmd160.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rmd160.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rmd160.o: $(hdrdir)/ruby/internal/has/extension.h
+rmd160.o: $(hdrdir)/ruby/internal/has/feature.h
+rmd160.o: $(hdrdir)/ruby/internal/has/warning.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/array.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/class.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/compar.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/complex.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/cont.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/dir.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/enum.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/error.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/eval.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/file.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/gc.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/hash.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/io.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/load.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/object.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/parse.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/proc.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/process.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/random.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/range.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/rational.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/re.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/select.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/signal.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/string.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/struct.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/thread.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/time.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/variable.h
+rmd160.o: $(hdrdir)/ruby/internal/intern/vm.h
+rmd160.o: $(hdrdir)/ruby/internal/interpreter.h
+rmd160.o: $(hdrdir)/ruby/internal/iterator.h
+rmd160.o: $(hdrdir)/ruby/internal/memory.h
+rmd160.o: $(hdrdir)/ruby/internal/method.h
+rmd160.o: $(hdrdir)/ruby/internal/module.h
+rmd160.o: $(hdrdir)/ruby/internal/newobj.h
+rmd160.o: $(hdrdir)/ruby/internal/rgengc.h
+rmd160.o: $(hdrdir)/ruby/internal/scan_args.h
+rmd160.o: $(hdrdir)/ruby/internal/special_consts.h
+rmd160.o: $(hdrdir)/ruby/internal/static_assert.h
+rmd160.o: $(hdrdir)/ruby/internal/stdalign.h
+rmd160.o: $(hdrdir)/ruby/internal/stdbool.h
+rmd160.o: $(hdrdir)/ruby/internal/symbol.h
+rmd160.o: $(hdrdir)/ruby/internal/value.h
+rmd160.o: $(hdrdir)/ruby/internal/value_type.h
+rmd160.o: $(hdrdir)/ruby/internal/variable.h
+rmd160.o: $(hdrdir)/ruby/internal/warning_push.h
+rmd160.o: $(hdrdir)/ruby/internal/xmalloc.h
+rmd160.o: $(hdrdir)/ruby/missing.h
+rmd160.o: $(hdrdir)/ruby/ruby.h
+rmd160.o: $(hdrdir)/ruby/st.h
+rmd160.o: $(hdrdir)/ruby/subst.h
+rmd160.o: $(srcdir)/../defs.h
+rmd160.o: rmd160.c
+rmd160.o: rmd160.h
rmd160init.o: $(RUBY_EXTCONF_H)
rmd160init.o: $(arch_hdrdir)/ruby/config.h
rmd160init.o: $(hdrdir)/ruby.h
rmd160init.o: $(hdrdir)/ruby/assert.h
rmd160init.o: $(hdrdir)/ruby/backward.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/assume.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/attributes.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/bool.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/limits.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/long_long.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rmd160init.o: $(hdrdir)/ruby/backward/2/stdarg.h
rmd160init.o: $(hdrdir)/ruby/defines.h
rmd160init.o: $(hdrdir)/ruby/intern.h
+rmd160init.o: $(hdrdir)/ruby/internal/abi.h
+rmd160init.o: $(hdrdir)/ruby/internal/anyargs.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+rmd160init.o: $(hdrdir)/ruby/internal/assume.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/cold.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/const.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/error.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/format.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/pure.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/warning.h
+rmd160init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+rmd160init.o: $(hdrdir)/ruby/internal/cast.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+rmd160init.o: $(hdrdir)/ruby/internal/compiler_since.h
+rmd160init.o: $(hdrdir)/ruby/internal/config.h
+rmd160init.o: $(hdrdir)/ruby/internal/constant_p.h
+rmd160init.o: $(hdrdir)/ruby/internal/core.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rarray.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rclass.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rdata.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rfile.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rhash.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/robject.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rstring.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+rmd160init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+rmd160init.o: $(hdrdir)/ruby/internal/ctype.h
+rmd160init.o: $(hdrdir)/ruby/internal/dllexport.h
+rmd160init.o: $(hdrdir)/ruby/internal/dosish.h
+rmd160init.o: $(hdrdir)/ruby/internal/error.h
+rmd160init.o: $(hdrdir)/ruby/internal/eval.h
+rmd160init.o: $(hdrdir)/ruby/internal/event.h
+rmd160init.o: $(hdrdir)/ruby/internal/fl_type.h
+rmd160init.o: $(hdrdir)/ruby/internal/gc.h
+rmd160init.o: $(hdrdir)/ruby/internal/glob.h
+rmd160init.o: $(hdrdir)/ruby/internal/globals.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/attribute.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/builtin.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/extension.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/feature.h
+rmd160init.o: $(hdrdir)/ruby/internal/has/warning.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/array.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/class.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/compar.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/complex.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/cont.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/dir.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/enum.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/error.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/eval.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/file.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/gc.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/hash.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/io.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/load.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/object.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/parse.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/proc.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/process.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/random.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/range.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/rational.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/re.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/select.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/signal.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/string.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/struct.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/thread.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/time.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/variable.h
+rmd160init.o: $(hdrdir)/ruby/internal/intern/vm.h
+rmd160init.o: $(hdrdir)/ruby/internal/interpreter.h
+rmd160init.o: $(hdrdir)/ruby/internal/iterator.h
+rmd160init.o: $(hdrdir)/ruby/internal/memory.h
+rmd160init.o: $(hdrdir)/ruby/internal/method.h
+rmd160init.o: $(hdrdir)/ruby/internal/module.h
+rmd160init.o: $(hdrdir)/ruby/internal/newobj.h
+rmd160init.o: $(hdrdir)/ruby/internal/rgengc.h
+rmd160init.o: $(hdrdir)/ruby/internal/scan_args.h
+rmd160init.o: $(hdrdir)/ruby/internal/special_consts.h
+rmd160init.o: $(hdrdir)/ruby/internal/static_assert.h
+rmd160init.o: $(hdrdir)/ruby/internal/stdalign.h
+rmd160init.o: $(hdrdir)/ruby/internal/stdbool.h
+rmd160init.o: $(hdrdir)/ruby/internal/symbol.h
+rmd160init.o: $(hdrdir)/ruby/internal/value.h
+rmd160init.o: $(hdrdir)/ruby/internal/value_type.h
+rmd160init.o: $(hdrdir)/ruby/internal/variable.h
+rmd160init.o: $(hdrdir)/ruby/internal/warning_push.h
+rmd160init.o: $(hdrdir)/ruby/internal/xmalloc.h
rmd160init.o: $(hdrdir)/ruby/missing.h
rmd160init.o: $(hdrdir)/ruby/ruby.h
rmd160init.o: $(hdrdir)/ruby/st.h
rmd160init.o: $(hdrdir)/ruby/subst.h
+rmd160init.o: $(srcdir)/../defs.h
rmd160init.o: $(srcdir)/../digest.h
+rmd160init.o: rmd160.h
rmd160init.o: rmd160init.c
-rmd160init.o: rmd160ossl.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb
index a02ba56169..8b894da0c8 100644
--- a/ext/digest/rmd160/extconf.rb
+++ b/ext/digest/rmd160/extconf.rb
@@ -6,11 +6,13 @@
require "mkmf"
require File.expand_path("../../digest_conf", __FILE__)
-$defs << "-DNDEBUG" << "-DHAVE_CONFIG_H"
+if try_static_assert("RUBY_API_VERSION_MAJOR < 3", "ruby/version.h")
+ $defs << "-DNDEBUG"
+end
$objs = [ "rmd160init.#{$OBJEXT}" ]
-digest_conf("rmd160", "ripemd", "RIPEMD160")
+digest_conf("rmd160")
have_header("sys/cdefs.h")
diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c
index a2c0a023c0..2ae81ec4d6 100644
--- a/ext/digest/rmd160/rmd160init.c
+++ b/ext/digest/rmd160/rmd160init.c
@@ -3,11 +3,7 @@
#include <ruby/ruby.h>
#include "../digest.h"
-#if defined(RMD160_USE_OPENSSL)
-#include "rmd160ossl.h"
-#else
#include "rmd160.h"
-#endif
static const rb_digest_metadata_t rmd160 = {
RUBY_DIGEST_API_VERSION,
@@ -57,8 +53,5 @@ Init_rmd160(void)
cDigest_RMD160 = rb_define_class_under(mDigest, "RMD160", cDigest_Base);
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
- rb_iv_set(cDigest_RMD160, "metadata",
- Data_Wrap_Struct(0, 0, 0, (void *)&rmd160));
+ rb_iv_set(cDigest_RMD160, "metadata", rb_digest_make_metadata(&rmd160));
}
diff --git a/ext/digest/rmd160/rmd160ossl.h b/ext/digest/rmd160/rmd160ossl.h
deleted file mode 100644
index e6bf5ea8d0..0000000000
--- a/ext/digest/rmd160/rmd160ossl.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* $Id$ */
-
-#ifndef RMD160OSSL_H_INCLUDED
-#define RMD160OSSL_H_INCLUDED
-
-#include <stddef.h>
-#include <openssl/ripemd.h>
-
-#define RMD160_CTX RIPEMD160_CTX
-
-#define RMD160_Init RIPEMD160_Init
-#define RMD160_Update RIPEMD160_Update
-
-#define RMD160_BLOCK_LENGTH RIPEMD160_CBLOCK
-#define RMD160_DIGEST_LENGTH RIPEMD160_DIGEST_LENGTH
-
-static DEFINE_FINISH_FUNC_FROM_FINAL(RIPEMD160)
-#define RMD160_Finish rb_digest_RIPEMD160_finish
-
-#endif
diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend
index bc9e216eed..48aaef158b 100644
--- a/ext/digest/sha1/depend
+++ b/ext/digest/sha1/depend
@@ -2,18 +2,330 @@ sha1.o: sha1.c sha1.h $(srcdir)/../defs.h
sha1init.o: $(LOCAL_HDRS)
# AUTOGENERATED DEPENDENCIES START
+sha1.o: $(RUBY_EXTCONF_H)
+sha1.o: $(arch_hdrdir)/ruby/config.h
+sha1.o: $(hdrdir)/ruby.h
+sha1.o: $(hdrdir)/ruby/assert.h
+sha1.o: $(hdrdir)/ruby/backward.h
+sha1.o: $(hdrdir)/ruby/backward/2/assume.h
+sha1.o: $(hdrdir)/ruby/backward/2/attributes.h
+sha1.o: $(hdrdir)/ruby/backward/2/bool.h
+sha1.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sha1.o: $(hdrdir)/ruby/backward/2/limits.h
+sha1.o: $(hdrdir)/ruby/backward/2/long_long.h
+sha1.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sha1.o: $(hdrdir)/ruby/backward/2/stdarg.h
+sha1.o: $(hdrdir)/ruby/defines.h
+sha1.o: $(hdrdir)/ruby/intern.h
+sha1.o: $(hdrdir)/ruby/internal/abi.h
+sha1.o: $(hdrdir)/ruby/internal/anyargs.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sha1.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sha1.o: $(hdrdir)/ruby/internal/assume.h
+sha1.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sha1.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sha1.o: $(hdrdir)/ruby/internal/attr/cold.h
+sha1.o: $(hdrdir)/ruby/internal/attr/const.h
+sha1.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sha1.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sha1.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sha1.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sha1.o: $(hdrdir)/ruby/internal/attr/error.h
+sha1.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sha1.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sha1.o: $(hdrdir)/ruby/internal/attr/format.h
+sha1.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sha1.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sha1.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sha1.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sha1.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sha1.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sha1.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sha1.o: $(hdrdir)/ruby/internal/attr/pure.h
+sha1.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sha1.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sha1.o: $(hdrdir)/ruby/internal/attr/warning.h
+sha1.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sha1.o: $(hdrdir)/ruby/internal/cast.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sha1.o: $(hdrdir)/ruby/internal/compiler_since.h
+sha1.o: $(hdrdir)/ruby/internal/config.h
+sha1.o: $(hdrdir)/ruby/internal/constant_p.h
+sha1.o: $(hdrdir)/ruby/internal/core.h
+sha1.o: $(hdrdir)/ruby/internal/core/rarray.h
+sha1.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sha1.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sha1.o: $(hdrdir)/ruby/internal/core/rclass.h
+sha1.o: $(hdrdir)/ruby/internal/core/rdata.h
+sha1.o: $(hdrdir)/ruby/internal/core/rfile.h
+sha1.o: $(hdrdir)/ruby/internal/core/rhash.h
+sha1.o: $(hdrdir)/ruby/internal/core/robject.h
+sha1.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sha1.o: $(hdrdir)/ruby/internal/core/rstring.h
+sha1.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sha1.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sha1.o: $(hdrdir)/ruby/internal/ctype.h
+sha1.o: $(hdrdir)/ruby/internal/dllexport.h
+sha1.o: $(hdrdir)/ruby/internal/dosish.h
+sha1.o: $(hdrdir)/ruby/internal/error.h
+sha1.o: $(hdrdir)/ruby/internal/eval.h
+sha1.o: $(hdrdir)/ruby/internal/event.h
+sha1.o: $(hdrdir)/ruby/internal/fl_type.h
+sha1.o: $(hdrdir)/ruby/internal/gc.h
+sha1.o: $(hdrdir)/ruby/internal/glob.h
+sha1.o: $(hdrdir)/ruby/internal/globals.h
+sha1.o: $(hdrdir)/ruby/internal/has/attribute.h
+sha1.o: $(hdrdir)/ruby/internal/has/builtin.h
+sha1.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sha1.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sha1.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sha1.o: $(hdrdir)/ruby/internal/has/extension.h
+sha1.o: $(hdrdir)/ruby/internal/has/feature.h
+sha1.o: $(hdrdir)/ruby/internal/has/warning.h
+sha1.o: $(hdrdir)/ruby/internal/intern/array.h
+sha1.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sha1.o: $(hdrdir)/ruby/internal/intern/class.h
+sha1.o: $(hdrdir)/ruby/internal/intern/compar.h
+sha1.o: $(hdrdir)/ruby/internal/intern/complex.h
+sha1.o: $(hdrdir)/ruby/internal/intern/cont.h
+sha1.o: $(hdrdir)/ruby/internal/intern/dir.h
+sha1.o: $(hdrdir)/ruby/internal/intern/enum.h
+sha1.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sha1.o: $(hdrdir)/ruby/internal/intern/error.h
+sha1.o: $(hdrdir)/ruby/internal/intern/eval.h
+sha1.o: $(hdrdir)/ruby/internal/intern/file.h
+sha1.o: $(hdrdir)/ruby/internal/intern/gc.h
+sha1.o: $(hdrdir)/ruby/internal/intern/hash.h
+sha1.o: $(hdrdir)/ruby/internal/intern/io.h
+sha1.o: $(hdrdir)/ruby/internal/intern/load.h
+sha1.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sha1.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sha1.o: $(hdrdir)/ruby/internal/intern/object.h
+sha1.o: $(hdrdir)/ruby/internal/intern/parse.h
+sha1.o: $(hdrdir)/ruby/internal/intern/proc.h
+sha1.o: $(hdrdir)/ruby/internal/intern/process.h
+sha1.o: $(hdrdir)/ruby/internal/intern/random.h
+sha1.o: $(hdrdir)/ruby/internal/intern/range.h
+sha1.o: $(hdrdir)/ruby/internal/intern/rational.h
+sha1.o: $(hdrdir)/ruby/internal/intern/re.h
+sha1.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sha1.o: $(hdrdir)/ruby/internal/intern/select.h
+sha1.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sha1.o: $(hdrdir)/ruby/internal/intern/signal.h
+sha1.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sha1.o: $(hdrdir)/ruby/internal/intern/string.h
+sha1.o: $(hdrdir)/ruby/internal/intern/struct.h
+sha1.o: $(hdrdir)/ruby/internal/intern/thread.h
+sha1.o: $(hdrdir)/ruby/internal/intern/time.h
+sha1.o: $(hdrdir)/ruby/internal/intern/variable.h
+sha1.o: $(hdrdir)/ruby/internal/intern/vm.h
+sha1.o: $(hdrdir)/ruby/internal/interpreter.h
+sha1.o: $(hdrdir)/ruby/internal/iterator.h
+sha1.o: $(hdrdir)/ruby/internal/memory.h
+sha1.o: $(hdrdir)/ruby/internal/method.h
+sha1.o: $(hdrdir)/ruby/internal/module.h
+sha1.o: $(hdrdir)/ruby/internal/newobj.h
+sha1.o: $(hdrdir)/ruby/internal/rgengc.h
+sha1.o: $(hdrdir)/ruby/internal/scan_args.h
+sha1.o: $(hdrdir)/ruby/internal/special_consts.h
+sha1.o: $(hdrdir)/ruby/internal/static_assert.h
+sha1.o: $(hdrdir)/ruby/internal/stdalign.h
+sha1.o: $(hdrdir)/ruby/internal/stdbool.h
+sha1.o: $(hdrdir)/ruby/internal/symbol.h
+sha1.o: $(hdrdir)/ruby/internal/value.h
+sha1.o: $(hdrdir)/ruby/internal/value_type.h
+sha1.o: $(hdrdir)/ruby/internal/variable.h
+sha1.o: $(hdrdir)/ruby/internal/warning_push.h
+sha1.o: $(hdrdir)/ruby/internal/xmalloc.h
+sha1.o: $(hdrdir)/ruby/missing.h
+sha1.o: $(hdrdir)/ruby/ruby.h
+sha1.o: $(hdrdir)/ruby/st.h
+sha1.o: $(hdrdir)/ruby/subst.h
+sha1.o: $(srcdir)/../defs.h
+sha1.o: sha1.c
+sha1.o: sha1.h
sha1init.o: $(RUBY_EXTCONF_H)
sha1init.o: $(arch_hdrdir)/ruby/config.h
sha1init.o: $(hdrdir)/ruby.h
sha1init.o: $(hdrdir)/ruby/assert.h
sha1init.o: $(hdrdir)/ruby/backward.h
+sha1init.o: $(hdrdir)/ruby/backward/2/assume.h
+sha1init.o: $(hdrdir)/ruby/backward/2/attributes.h
+sha1init.o: $(hdrdir)/ruby/backward/2/bool.h
+sha1init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sha1init.o: $(hdrdir)/ruby/backward/2/limits.h
+sha1init.o: $(hdrdir)/ruby/backward/2/long_long.h
+sha1init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sha1init.o: $(hdrdir)/ruby/backward/2/stdarg.h
sha1init.o: $(hdrdir)/ruby/defines.h
sha1init.o: $(hdrdir)/ruby/intern.h
+sha1init.o: $(hdrdir)/ruby/internal/abi.h
+sha1init.o: $(hdrdir)/ruby/internal/anyargs.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sha1init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sha1init.o: $(hdrdir)/ruby/internal/assume.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/cold.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/const.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/error.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/format.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/pure.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/warning.h
+sha1init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sha1init.o: $(hdrdir)/ruby/internal/cast.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sha1init.o: $(hdrdir)/ruby/internal/compiler_since.h
+sha1init.o: $(hdrdir)/ruby/internal/config.h
+sha1init.o: $(hdrdir)/ruby/internal/constant_p.h
+sha1init.o: $(hdrdir)/ruby/internal/core.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rarray.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rclass.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rdata.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rfile.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rhash.h
+sha1init.o: $(hdrdir)/ruby/internal/core/robject.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rstring.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sha1init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sha1init.o: $(hdrdir)/ruby/internal/ctype.h
+sha1init.o: $(hdrdir)/ruby/internal/dllexport.h
+sha1init.o: $(hdrdir)/ruby/internal/dosish.h
+sha1init.o: $(hdrdir)/ruby/internal/error.h
+sha1init.o: $(hdrdir)/ruby/internal/eval.h
+sha1init.o: $(hdrdir)/ruby/internal/event.h
+sha1init.o: $(hdrdir)/ruby/internal/fl_type.h
+sha1init.o: $(hdrdir)/ruby/internal/gc.h
+sha1init.o: $(hdrdir)/ruby/internal/glob.h
+sha1init.o: $(hdrdir)/ruby/internal/globals.h
+sha1init.o: $(hdrdir)/ruby/internal/has/attribute.h
+sha1init.o: $(hdrdir)/ruby/internal/has/builtin.h
+sha1init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sha1init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sha1init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sha1init.o: $(hdrdir)/ruby/internal/has/extension.h
+sha1init.o: $(hdrdir)/ruby/internal/has/feature.h
+sha1init.o: $(hdrdir)/ruby/internal/has/warning.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/array.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/class.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/compar.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/complex.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/cont.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/dir.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/enum.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/error.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/eval.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/file.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/gc.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/hash.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/io.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/load.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/object.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/parse.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/proc.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/process.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/random.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/range.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/rational.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/re.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/select.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/signal.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/string.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/struct.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/thread.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/time.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/variable.h
+sha1init.o: $(hdrdir)/ruby/internal/intern/vm.h
+sha1init.o: $(hdrdir)/ruby/internal/interpreter.h
+sha1init.o: $(hdrdir)/ruby/internal/iterator.h
+sha1init.o: $(hdrdir)/ruby/internal/memory.h
+sha1init.o: $(hdrdir)/ruby/internal/method.h
+sha1init.o: $(hdrdir)/ruby/internal/module.h
+sha1init.o: $(hdrdir)/ruby/internal/newobj.h
+sha1init.o: $(hdrdir)/ruby/internal/rgengc.h
+sha1init.o: $(hdrdir)/ruby/internal/scan_args.h
+sha1init.o: $(hdrdir)/ruby/internal/special_consts.h
+sha1init.o: $(hdrdir)/ruby/internal/static_assert.h
+sha1init.o: $(hdrdir)/ruby/internal/stdalign.h
+sha1init.o: $(hdrdir)/ruby/internal/stdbool.h
+sha1init.o: $(hdrdir)/ruby/internal/symbol.h
+sha1init.o: $(hdrdir)/ruby/internal/value.h
+sha1init.o: $(hdrdir)/ruby/internal/value_type.h
+sha1init.o: $(hdrdir)/ruby/internal/variable.h
+sha1init.o: $(hdrdir)/ruby/internal/warning_push.h
+sha1init.o: $(hdrdir)/ruby/internal/xmalloc.h
sha1init.o: $(hdrdir)/ruby/missing.h
sha1init.o: $(hdrdir)/ruby/ruby.h
sha1init.o: $(hdrdir)/ruby/st.h
sha1init.o: $(hdrdir)/ruby/subst.h
+sha1init.o: $(srcdir)/../defs.h
sha1init.o: $(srcdir)/../digest.h
+sha1init.o: sha1.h
+sha1init.o: sha1cc.h
sha1init.o: sha1init.c
-sha1init.o: sha1ossl.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/digest/sha1/extconf.rb b/ext/digest/sha1/extconf.rb
index 0ff4158bef..7582cd9ab5 100644
--- a/ext/digest/sha1/extconf.rb
+++ b/ext/digest/sha1/extconf.rb
@@ -6,11 +6,9 @@
require "mkmf"
require File.expand_path("../../digest_conf", __FILE__)
-$defs << "-DHAVE_CONFIG_H"
-
$objs = [ "sha1init.#{$OBJEXT}" ]
-digest_conf("sha1", "sha", nil, %w[SHA])
+digest_conf("sha1")
have_header("sys/cdefs.h")
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index 3adf424b1d..f7047bc6d3 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -3,9 +3,7 @@
#include <ruby/ruby.h>
#include "../digest.h"
-#if defined(SHA1_USE_OPENSSL)
-#include "sha1ossl.h"
-#elif defined(SHA1_USE_COMMONDIGEST)
+#if defined(SHA1_USE_COMMONDIGEST)
#include "sha1cc.h"
#else
#include "sha1.h"
@@ -61,8 +59,5 @@ Init_sha1(void)
cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
- rb_iv_set(cDigest_SHA1, "metadata",
- Data_Wrap_Struct(0, 0, 0, (void *)&sha1));
+ rb_iv_set(cDigest_SHA1, "metadata", rb_digest_make_metadata(&sha1));
}
diff --git a/ext/digest/sha1/sha1ossl.h b/ext/digest/sha1/sha1ossl.h
deleted file mode 100644
index 599efe9a2f..0000000000
--- a/ext/digest/sha1/sha1ossl.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $Id$ */
-
-#ifndef SHA1OSSL_H_INCLUDED
-#define SHA1OSSL_H_INCLUDED
-
-#include <stddef.h>
-#include <openssl/sha.h>
-
-#define SHA1_CTX SHA_CTX
-
-#ifdef SHA_BLOCK_LENGTH
-#define SHA1_BLOCK_LENGTH SHA_BLOCK_LENGTH
-#else
-#define SHA1_BLOCK_LENGTH SHA_CBLOCK
-#endif
-#define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH
-
-static DEFINE_FINISH_FUNC_FROM_FINAL(SHA1)
-#undef SHA1_Finish
-#define SHA1_Finish rb_digest_SHA1_finish
-
-#endif
diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend
index 8946d44f31..47a859068c 100644
--- a/ext/digest/sha2/depend
+++ b/ext/digest/sha2/depend
@@ -2,18 +2,329 @@ sha2.o: sha2.c sha2.h $(srcdir)/../defs.h
sha2init.o: $(LOCAL_HDRS)
# AUTOGENERATED DEPENDENCIES START
+sha2.o: $(RUBY_EXTCONF_H)
+sha2.o: $(arch_hdrdir)/ruby/config.h
+sha2.o: $(hdrdir)/ruby.h
+sha2.o: $(hdrdir)/ruby/assert.h
+sha2.o: $(hdrdir)/ruby/backward.h
+sha2.o: $(hdrdir)/ruby/backward/2/assume.h
+sha2.o: $(hdrdir)/ruby/backward/2/attributes.h
+sha2.o: $(hdrdir)/ruby/backward/2/bool.h
+sha2.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sha2.o: $(hdrdir)/ruby/backward/2/limits.h
+sha2.o: $(hdrdir)/ruby/backward/2/long_long.h
+sha2.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sha2.o: $(hdrdir)/ruby/backward/2/stdarg.h
+sha2.o: $(hdrdir)/ruby/defines.h
+sha2.o: $(hdrdir)/ruby/intern.h
+sha2.o: $(hdrdir)/ruby/internal/abi.h
+sha2.o: $(hdrdir)/ruby/internal/anyargs.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sha2.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sha2.o: $(hdrdir)/ruby/internal/assume.h
+sha2.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sha2.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sha2.o: $(hdrdir)/ruby/internal/attr/cold.h
+sha2.o: $(hdrdir)/ruby/internal/attr/const.h
+sha2.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sha2.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sha2.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sha2.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sha2.o: $(hdrdir)/ruby/internal/attr/error.h
+sha2.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sha2.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sha2.o: $(hdrdir)/ruby/internal/attr/format.h
+sha2.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sha2.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sha2.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sha2.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sha2.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sha2.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sha2.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sha2.o: $(hdrdir)/ruby/internal/attr/pure.h
+sha2.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sha2.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sha2.o: $(hdrdir)/ruby/internal/attr/warning.h
+sha2.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sha2.o: $(hdrdir)/ruby/internal/cast.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sha2.o: $(hdrdir)/ruby/internal/compiler_since.h
+sha2.o: $(hdrdir)/ruby/internal/config.h
+sha2.o: $(hdrdir)/ruby/internal/constant_p.h
+sha2.o: $(hdrdir)/ruby/internal/core.h
+sha2.o: $(hdrdir)/ruby/internal/core/rarray.h
+sha2.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sha2.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sha2.o: $(hdrdir)/ruby/internal/core/rclass.h
+sha2.o: $(hdrdir)/ruby/internal/core/rdata.h
+sha2.o: $(hdrdir)/ruby/internal/core/rfile.h
+sha2.o: $(hdrdir)/ruby/internal/core/rhash.h
+sha2.o: $(hdrdir)/ruby/internal/core/robject.h
+sha2.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sha2.o: $(hdrdir)/ruby/internal/core/rstring.h
+sha2.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sha2.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sha2.o: $(hdrdir)/ruby/internal/ctype.h
+sha2.o: $(hdrdir)/ruby/internal/dllexport.h
+sha2.o: $(hdrdir)/ruby/internal/dosish.h
+sha2.o: $(hdrdir)/ruby/internal/error.h
+sha2.o: $(hdrdir)/ruby/internal/eval.h
+sha2.o: $(hdrdir)/ruby/internal/event.h
+sha2.o: $(hdrdir)/ruby/internal/fl_type.h
+sha2.o: $(hdrdir)/ruby/internal/gc.h
+sha2.o: $(hdrdir)/ruby/internal/glob.h
+sha2.o: $(hdrdir)/ruby/internal/globals.h
+sha2.o: $(hdrdir)/ruby/internal/has/attribute.h
+sha2.o: $(hdrdir)/ruby/internal/has/builtin.h
+sha2.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sha2.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sha2.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sha2.o: $(hdrdir)/ruby/internal/has/extension.h
+sha2.o: $(hdrdir)/ruby/internal/has/feature.h
+sha2.o: $(hdrdir)/ruby/internal/has/warning.h
+sha2.o: $(hdrdir)/ruby/internal/intern/array.h
+sha2.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sha2.o: $(hdrdir)/ruby/internal/intern/class.h
+sha2.o: $(hdrdir)/ruby/internal/intern/compar.h
+sha2.o: $(hdrdir)/ruby/internal/intern/complex.h
+sha2.o: $(hdrdir)/ruby/internal/intern/cont.h
+sha2.o: $(hdrdir)/ruby/internal/intern/dir.h
+sha2.o: $(hdrdir)/ruby/internal/intern/enum.h
+sha2.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sha2.o: $(hdrdir)/ruby/internal/intern/error.h
+sha2.o: $(hdrdir)/ruby/internal/intern/eval.h
+sha2.o: $(hdrdir)/ruby/internal/intern/file.h
+sha2.o: $(hdrdir)/ruby/internal/intern/gc.h
+sha2.o: $(hdrdir)/ruby/internal/intern/hash.h
+sha2.o: $(hdrdir)/ruby/internal/intern/io.h
+sha2.o: $(hdrdir)/ruby/internal/intern/load.h
+sha2.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sha2.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sha2.o: $(hdrdir)/ruby/internal/intern/object.h
+sha2.o: $(hdrdir)/ruby/internal/intern/parse.h
+sha2.o: $(hdrdir)/ruby/internal/intern/proc.h
+sha2.o: $(hdrdir)/ruby/internal/intern/process.h
+sha2.o: $(hdrdir)/ruby/internal/intern/random.h
+sha2.o: $(hdrdir)/ruby/internal/intern/range.h
+sha2.o: $(hdrdir)/ruby/internal/intern/rational.h
+sha2.o: $(hdrdir)/ruby/internal/intern/re.h
+sha2.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sha2.o: $(hdrdir)/ruby/internal/intern/select.h
+sha2.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sha2.o: $(hdrdir)/ruby/internal/intern/signal.h
+sha2.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sha2.o: $(hdrdir)/ruby/internal/intern/string.h
+sha2.o: $(hdrdir)/ruby/internal/intern/struct.h
+sha2.o: $(hdrdir)/ruby/internal/intern/thread.h
+sha2.o: $(hdrdir)/ruby/internal/intern/time.h
+sha2.o: $(hdrdir)/ruby/internal/intern/variable.h
+sha2.o: $(hdrdir)/ruby/internal/intern/vm.h
+sha2.o: $(hdrdir)/ruby/internal/interpreter.h
+sha2.o: $(hdrdir)/ruby/internal/iterator.h
+sha2.o: $(hdrdir)/ruby/internal/memory.h
+sha2.o: $(hdrdir)/ruby/internal/method.h
+sha2.o: $(hdrdir)/ruby/internal/module.h
+sha2.o: $(hdrdir)/ruby/internal/newobj.h
+sha2.o: $(hdrdir)/ruby/internal/rgengc.h
+sha2.o: $(hdrdir)/ruby/internal/scan_args.h
+sha2.o: $(hdrdir)/ruby/internal/special_consts.h
+sha2.o: $(hdrdir)/ruby/internal/static_assert.h
+sha2.o: $(hdrdir)/ruby/internal/stdalign.h
+sha2.o: $(hdrdir)/ruby/internal/stdbool.h
+sha2.o: $(hdrdir)/ruby/internal/symbol.h
+sha2.o: $(hdrdir)/ruby/internal/value.h
+sha2.o: $(hdrdir)/ruby/internal/value_type.h
+sha2.o: $(hdrdir)/ruby/internal/variable.h
+sha2.o: $(hdrdir)/ruby/internal/warning_push.h
+sha2.o: $(hdrdir)/ruby/internal/xmalloc.h
+sha2.o: $(hdrdir)/ruby/missing.h
+sha2.o: $(hdrdir)/ruby/ruby.h
+sha2.o: $(hdrdir)/ruby/st.h
+sha2.o: $(hdrdir)/ruby/subst.h
+sha2.o: $(srcdir)/../defs.h
+sha2.o: sha2.c
+sha2.o: sha2.h
sha2init.o: $(RUBY_EXTCONF_H)
sha2init.o: $(arch_hdrdir)/ruby/config.h
sha2init.o: $(hdrdir)/ruby.h
sha2init.o: $(hdrdir)/ruby/assert.h
sha2init.o: $(hdrdir)/ruby/backward.h
+sha2init.o: $(hdrdir)/ruby/backward/2/assume.h
+sha2init.o: $(hdrdir)/ruby/backward/2/attributes.h
+sha2init.o: $(hdrdir)/ruby/backward/2/bool.h
+sha2init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sha2init.o: $(hdrdir)/ruby/backward/2/limits.h
+sha2init.o: $(hdrdir)/ruby/backward/2/long_long.h
+sha2init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sha2init.o: $(hdrdir)/ruby/backward/2/stdarg.h
sha2init.o: $(hdrdir)/ruby/defines.h
sha2init.o: $(hdrdir)/ruby/intern.h
+sha2init.o: $(hdrdir)/ruby/internal/abi.h
+sha2init.o: $(hdrdir)/ruby/internal/anyargs.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sha2init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sha2init.o: $(hdrdir)/ruby/internal/assume.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/cold.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/const.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/error.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/format.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/pure.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/warning.h
+sha2init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sha2init.o: $(hdrdir)/ruby/internal/cast.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sha2init.o: $(hdrdir)/ruby/internal/compiler_since.h
+sha2init.o: $(hdrdir)/ruby/internal/config.h
+sha2init.o: $(hdrdir)/ruby/internal/constant_p.h
+sha2init.o: $(hdrdir)/ruby/internal/core.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rarray.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rclass.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rdata.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rfile.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rhash.h
+sha2init.o: $(hdrdir)/ruby/internal/core/robject.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rstring.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sha2init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sha2init.o: $(hdrdir)/ruby/internal/ctype.h
+sha2init.o: $(hdrdir)/ruby/internal/dllexport.h
+sha2init.o: $(hdrdir)/ruby/internal/dosish.h
+sha2init.o: $(hdrdir)/ruby/internal/error.h
+sha2init.o: $(hdrdir)/ruby/internal/eval.h
+sha2init.o: $(hdrdir)/ruby/internal/event.h
+sha2init.o: $(hdrdir)/ruby/internal/fl_type.h
+sha2init.o: $(hdrdir)/ruby/internal/gc.h
+sha2init.o: $(hdrdir)/ruby/internal/glob.h
+sha2init.o: $(hdrdir)/ruby/internal/globals.h
+sha2init.o: $(hdrdir)/ruby/internal/has/attribute.h
+sha2init.o: $(hdrdir)/ruby/internal/has/builtin.h
+sha2init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sha2init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sha2init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sha2init.o: $(hdrdir)/ruby/internal/has/extension.h
+sha2init.o: $(hdrdir)/ruby/internal/has/feature.h
+sha2init.o: $(hdrdir)/ruby/internal/has/warning.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/array.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/class.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/compar.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/complex.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/cont.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/dir.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/enum.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/error.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/eval.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/file.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/gc.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/hash.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/io.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/load.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/object.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/parse.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/proc.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/process.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/random.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/range.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/rational.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/re.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/select.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/signal.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/string.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/struct.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/thread.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/time.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/variable.h
+sha2init.o: $(hdrdir)/ruby/internal/intern/vm.h
+sha2init.o: $(hdrdir)/ruby/internal/interpreter.h
+sha2init.o: $(hdrdir)/ruby/internal/iterator.h
+sha2init.o: $(hdrdir)/ruby/internal/memory.h
+sha2init.o: $(hdrdir)/ruby/internal/method.h
+sha2init.o: $(hdrdir)/ruby/internal/module.h
+sha2init.o: $(hdrdir)/ruby/internal/newobj.h
+sha2init.o: $(hdrdir)/ruby/internal/rgengc.h
+sha2init.o: $(hdrdir)/ruby/internal/scan_args.h
+sha2init.o: $(hdrdir)/ruby/internal/special_consts.h
+sha2init.o: $(hdrdir)/ruby/internal/static_assert.h
+sha2init.o: $(hdrdir)/ruby/internal/stdalign.h
+sha2init.o: $(hdrdir)/ruby/internal/stdbool.h
+sha2init.o: $(hdrdir)/ruby/internal/symbol.h
+sha2init.o: $(hdrdir)/ruby/internal/value.h
+sha2init.o: $(hdrdir)/ruby/internal/value_type.h
+sha2init.o: $(hdrdir)/ruby/internal/variable.h
+sha2init.o: $(hdrdir)/ruby/internal/warning_push.h
+sha2init.o: $(hdrdir)/ruby/internal/xmalloc.h
sha2init.o: $(hdrdir)/ruby/missing.h
sha2init.o: $(hdrdir)/ruby/ruby.h
sha2init.o: $(hdrdir)/ruby/st.h
sha2init.o: $(hdrdir)/ruby/subst.h
sha2init.o: $(srcdir)/../digest.h
+sha2init.o: sha2.h
+sha2init.o: sha2cc.h
sha2init.o: sha2init.c
-sha2init.o: sha2ossl.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index 5c7f76c7f3..3b772675e1 100644
--- a/ext/digest/sha2/extconf.rb
+++ b/ext/digest/sha2/extconf.rb
@@ -6,11 +6,9 @@
require "mkmf"
require File.expand_path("../../digest_conf", __FILE__)
-$defs << "-DHAVE_CONFIG_H"
-
$objs = [ "sha2init.#{$OBJEXT}" ]
-unless digest_conf("sha2", "sha", %w[SHA256 SHA512])
+unless digest_conf("sha2")
have_type("u_int8_t")
end
diff --git a/ext/digest/sha2/lib/sha2.rb b/ext/digest/sha2/lib/sha2.rb
index 61a0734850..f17593a206 100644
--- a/ext/digest/sha2/lib/sha2.rb
+++ b/ext/digest/sha2/lib/sha2.rb
@@ -11,7 +11,7 @@
# $Id$
require 'digest'
-require 'digest/sha2.so'
+require 'digest/sha2/loader'
module Digest
#
diff --git a/ext/digest/sha2/lib/sha2/loader.rb b/ext/digest/sha2/lib/sha2/loader.rb
new file mode 100644
index 0000000000..7d6d04a59c
--- /dev/null
+++ b/ext/digest/sha2/lib/sha2/loader.rb
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+require 'digest/sha2.so'
diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c
index c86eab37a0..21d5acbe96 100644
--- a/ext/digest/sha2/sha2.c
+++ b/ext/digest/sha2/sha2.c
@@ -94,7 +94,7 @@
/*
* Define the followingsha2_* types to types of the correct length on
- * the native archtecture. Most BSD systems and Linux define u_intXX_t
+ * the native architecture. Most BSD systems and Linux define u_intXX_t
* types. Machines with very recent ANSI C headers, can use the
* uintXX_t definintions from inttypes.h by defining SHA2_USE_INTTYPES_H
* during compile or in the sha.h header file.
@@ -128,7 +128,7 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
-#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__)
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(__IBMC__)
#define ULL(number) number##ULL
#else
#define ULL(number) (uint64_t)(number)
@@ -575,7 +575,7 @@ void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
usedspace = freespace = 0;
}
-int SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
+int SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) {
sha2_word32 *d = (sha2_word32*)digest;
unsigned int usedspace;
@@ -640,7 +640,7 @@ int SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
return 1;
}
-char *SHA256_End(SHA256_CTX* context, char buffer[]) {
+char *SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest;
int i;
@@ -943,7 +943,7 @@ void SHA512_Last(SHA512_CTX* context) {
SHA512_Transform(context, (sha2_word64*)context->buffer);
}
-int SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
+int SHA512_Final(sha2_byte digest[SHA512_DIGEST_LENGTH], SHA512_CTX* context) {
sha2_word64 *d = (sha2_word64*)digest;
/* Sanity check: */
@@ -973,7 +973,7 @@ int SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
return 1;
}
-char *SHA512_End(SHA512_CTX* context, char buffer[]) {
+char *SHA512_End(SHA512_CTX* context, char buffer[SHA512_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA512_DIGEST_LENGTH], *d = digest;
int i;
@@ -1019,7 +1019,7 @@ void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
SHA512_Update((SHA512_CTX*)context, data, len);
}
-int SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
+int SHA384_Final(sha2_byte digest[SHA384_DIGEST_LENGTH], SHA384_CTX* context) {
sha2_word64 *d = (sha2_word64*)digest;
/* Sanity check: */
@@ -1049,7 +1049,7 @@ int SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
return 1;
}
-char *SHA384_End(SHA384_CTX* context, char buffer[]) {
+char *SHA384_End(SHA384_CTX* context, char buffer[SHA384_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA384_DIGEST_LENGTH], *d = digest;
int i;
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index 7d211784a3..94cccf3feb 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -3,9 +3,7 @@
#include <ruby/ruby.h>
#include "../digest.h"
-#if defined(SHA2_USE_OPENSSL)
-#include "sha2ossl.h"
-#elif defined(SHA2_USE_COMMONDIGEST)
+#if defined(SHA2_USE_COMMONDIGEST)
#include "sha2cc.h"
#else
#include "sha2.h"
@@ -49,9 +47,7 @@ Init_sha2(void)
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \
- Data_Wrap_Struct(0, 0, 0, (void *)&sha##bitlen));
+ rb_digest_make_metadata(&sha##bitlen));
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}
diff --git a/ext/digest/sha2/sha2ossl.h b/ext/digest/sha2/sha2ossl.h
deleted file mode 100644
index 8dd0530107..0000000000
--- a/ext/digest/sha2/sha2ossl.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef SHA2OSSL_H_INCLUDED
-#define SHA2OSSL_H_INCLUDED
-
-#include <stddef.h>
-#include <openssl/sha.h>
-
-#define SHA256_BLOCK_LENGTH SHA256_CBLOCK
-#define SHA384_BLOCK_LENGTH SHA512_CBLOCK
-#define SHA512_BLOCK_LENGTH SHA512_CBLOCK
-
-#ifndef __DragonFly__
-#define SHA384_Final SHA512_Final
-#endif
-
-typedef SHA512_CTX SHA384_CTX;
-
-#undef SHA256_Finish
-#undef SHA384_Finish
-#undef SHA512_Finish
-#define SHA256_Finish rb_digest_SHA256_finish
-#define SHA384_Finish rb_digest_SHA384_finish
-#define SHA512_Finish rb_digest_SHA512_finish
-static DEFINE_FINISH_FUNC_FROM_FINAL(SHA256)
-static DEFINE_FINISH_FUNC_FROM_FINAL(SHA384)
-static DEFINE_FINISH_FUNC_FROM_FINAL(SHA512)
-
-#endif
diff --git a/ext/erb/escape/escape.c b/ext/erb/escape/escape.c
new file mode 100644
index 0000000000..67b2d1ef34
--- /dev/null
+++ b/ext/erb/escape/escape.c
@@ -0,0 +1,95 @@
+#include "ruby.h"
+#include "ruby/encoding.h"
+
+static VALUE rb_cERB, rb_mEscape, rb_cCGI;
+static ID id_escapeHTML;
+
+#define HTML_ESCAPE_MAX_LEN 6
+
+static const struct {
+ uint8_t len;
+ char str[HTML_ESCAPE_MAX_LEN+1];
+} html_escape_table[UCHAR_MAX+1] = {
+#define HTML_ESCAPE(c, str) [c] = {rb_strlen_lit(str), str}
+ HTML_ESCAPE('\'', "&#39;"),
+ HTML_ESCAPE('&', "&amp;"),
+ HTML_ESCAPE('"', "&quot;"),
+ HTML_ESCAPE('<', "&lt;"),
+ HTML_ESCAPE('>', "&gt;"),
+#undef HTML_ESCAPE
+};
+
+static inline void
+preserve_original_state(VALUE orig, VALUE dest)
+{
+ rb_enc_associate(dest, rb_enc_get(orig));
+}
+
+static inline long
+escaped_length(VALUE str)
+{
+ const long len = RSTRING_LEN(str);
+ if (len >= LONG_MAX / HTML_ESCAPE_MAX_LEN) {
+ ruby_malloc_size_overflow(len, HTML_ESCAPE_MAX_LEN);
+ }
+ return len * HTML_ESCAPE_MAX_LEN;
+}
+
+static VALUE
+optimized_escape_html(VALUE str)
+{
+ VALUE vbuf;
+ char *buf = ALLOCV_N(char, vbuf, escaped_length(str));
+ const char *cstr = RSTRING_PTR(str);
+ const char *end = cstr + RSTRING_LEN(str);
+
+ char *dest = buf;
+ while (cstr < end) {
+ const unsigned char c = *cstr++;
+ uint8_t len = html_escape_table[c].len;
+ if (len) {
+ memcpy(dest, html_escape_table[c].str, len);
+ dest += len;
+ }
+ else {
+ *dest++ = c;
+ }
+ }
+
+ VALUE escaped = str;
+ if (RSTRING_LEN(str) < (dest - buf)) {
+ escaped = rb_str_new(buf, dest - buf);
+ preserve_original_state(str, escaped);
+ }
+ ALLOCV_END(vbuf);
+ return escaped;
+}
+
+// ERB::Util.html_escape is different from CGI.escapeHTML in the following two parts:
+// * ERB::Util.html_escape converts an argument with #to_s first (only if it's not T_STRING)
+// * ERB::Util.html_escape does not allocate a new string when nothing needs to be escaped
+static VALUE
+erb_escape_html(VALUE self, VALUE str)
+{
+ if (!RB_TYPE_P(str, T_STRING)) {
+ str = rb_convert_type(str, T_STRING, "String", "to_s");
+ }
+
+ if (rb_enc_str_asciicompat_p(str)) {
+ return optimized_escape_html(str);
+ }
+ else {
+ return rb_funcall(rb_cCGI, id_escapeHTML, 1, str);
+ }
+}
+
+void
+Init_escape(void)
+{
+ rb_cERB = rb_define_class("ERB", rb_cObject);
+ rb_mEscape = rb_define_module_under(rb_cERB, "Escape");
+ rb_define_module_function(rb_mEscape, "html_escape", erb_escape_html, 1);
+
+ rb_cCGI = rb_define_class("CGI", rb_cObject);
+ id_escapeHTML = rb_intern("escapeHTML");
+}
diff --git a/ext/erb/escape/extconf.rb b/ext/erb/escape/extconf.rb
new file mode 100644
index 0000000000..c1002548ad
--- /dev/null
+++ b/ext/erb/escape/extconf.rb
@@ -0,0 +1,7 @@
+require 'mkmf'
+
+if RUBY_ENGINE == 'truffleruby'
+ File.write('Makefile', dummy_makefile($srcdir).join)
+else
+ create_makefile 'erb/escape'
+end
diff --git a/ext/etc/depend b/ext/etc/depend
index 99e812c7e4..a541db6db6 100644
--- a/ext/etc/depend
+++ b/ext/etc/depend
@@ -7,10 +7,168 @@ etc.o: $(RUBY_EXTCONF_H)
etc.o: $(arch_hdrdir)/ruby/config.h
etc.o: $(hdrdir)/ruby.h
etc.o: $(hdrdir)/ruby/assert.h
+etc.o: $(hdrdir)/ruby/atomic.h
etc.o: $(hdrdir)/ruby/backward.h
+etc.o: $(hdrdir)/ruby/backward/2/assume.h
+etc.o: $(hdrdir)/ruby/backward/2/attributes.h
+etc.o: $(hdrdir)/ruby/backward/2/bool.h
+etc.o: $(hdrdir)/ruby/backward/2/inttypes.h
+etc.o: $(hdrdir)/ruby/backward/2/limits.h
+etc.o: $(hdrdir)/ruby/backward/2/long_long.h
+etc.o: $(hdrdir)/ruby/backward/2/stdalign.h
+etc.o: $(hdrdir)/ruby/backward/2/stdarg.h
etc.o: $(hdrdir)/ruby/defines.h
etc.o: $(hdrdir)/ruby/encoding.h
etc.o: $(hdrdir)/ruby/intern.h
+etc.o: $(hdrdir)/ruby/internal/abi.h
+etc.o: $(hdrdir)/ruby/internal/anyargs.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+etc.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+etc.o: $(hdrdir)/ruby/internal/assume.h
+etc.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+etc.o: $(hdrdir)/ruby/internal/attr/artificial.h
+etc.o: $(hdrdir)/ruby/internal/attr/cold.h
+etc.o: $(hdrdir)/ruby/internal/attr/const.h
+etc.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+etc.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+etc.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+etc.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+etc.o: $(hdrdir)/ruby/internal/attr/error.h
+etc.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+etc.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+etc.o: $(hdrdir)/ruby/internal/attr/format.h
+etc.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+etc.o: $(hdrdir)/ruby/internal/attr/noalias.h
+etc.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+etc.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+etc.o: $(hdrdir)/ruby/internal/attr/noinline.h
+etc.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+etc.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+etc.o: $(hdrdir)/ruby/internal/attr/pure.h
+etc.o: $(hdrdir)/ruby/internal/attr/restrict.h
+etc.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+etc.o: $(hdrdir)/ruby/internal/attr/warning.h
+etc.o: $(hdrdir)/ruby/internal/attr/weakref.h
+etc.o: $(hdrdir)/ruby/internal/cast.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+etc.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+etc.o: $(hdrdir)/ruby/internal/compiler_since.h
+etc.o: $(hdrdir)/ruby/internal/config.h
+etc.o: $(hdrdir)/ruby/internal/constant_p.h
+etc.o: $(hdrdir)/ruby/internal/core.h
+etc.o: $(hdrdir)/ruby/internal/core/rarray.h
+etc.o: $(hdrdir)/ruby/internal/core/rbasic.h
+etc.o: $(hdrdir)/ruby/internal/core/rbignum.h
+etc.o: $(hdrdir)/ruby/internal/core/rclass.h
+etc.o: $(hdrdir)/ruby/internal/core/rdata.h
+etc.o: $(hdrdir)/ruby/internal/core/rfile.h
+etc.o: $(hdrdir)/ruby/internal/core/rhash.h
+etc.o: $(hdrdir)/ruby/internal/core/robject.h
+etc.o: $(hdrdir)/ruby/internal/core/rregexp.h
+etc.o: $(hdrdir)/ruby/internal/core/rstring.h
+etc.o: $(hdrdir)/ruby/internal/core/rstruct.h
+etc.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+etc.o: $(hdrdir)/ruby/internal/ctype.h
+etc.o: $(hdrdir)/ruby/internal/dllexport.h
+etc.o: $(hdrdir)/ruby/internal/dosish.h
+etc.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+etc.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+etc.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+etc.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+etc.o: $(hdrdir)/ruby/internal/encoding/re.h
+etc.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+etc.o: $(hdrdir)/ruby/internal/encoding/string.h
+etc.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+etc.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+etc.o: $(hdrdir)/ruby/internal/error.h
+etc.o: $(hdrdir)/ruby/internal/eval.h
+etc.o: $(hdrdir)/ruby/internal/event.h
+etc.o: $(hdrdir)/ruby/internal/fl_type.h
+etc.o: $(hdrdir)/ruby/internal/gc.h
+etc.o: $(hdrdir)/ruby/internal/glob.h
+etc.o: $(hdrdir)/ruby/internal/globals.h
+etc.o: $(hdrdir)/ruby/internal/has/attribute.h
+etc.o: $(hdrdir)/ruby/internal/has/builtin.h
+etc.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+etc.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+etc.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+etc.o: $(hdrdir)/ruby/internal/has/extension.h
+etc.o: $(hdrdir)/ruby/internal/has/feature.h
+etc.o: $(hdrdir)/ruby/internal/has/warning.h
+etc.o: $(hdrdir)/ruby/internal/intern/array.h
+etc.o: $(hdrdir)/ruby/internal/intern/bignum.h
+etc.o: $(hdrdir)/ruby/internal/intern/class.h
+etc.o: $(hdrdir)/ruby/internal/intern/compar.h
+etc.o: $(hdrdir)/ruby/internal/intern/complex.h
+etc.o: $(hdrdir)/ruby/internal/intern/cont.h
+etc.o: $(hdrdir)/ruby/internal/intern/dir.h
+etc.o: $(hdrdir)/ruby/internal/intern/enum.h
+etc.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+etc.o: $(hdrdir)/ruby/internal/intern/error.h
+etc.o: $(hdrdir)/ruby/internal/intern/eval.h
+etc.o: $(hdrdir)/ruby/internal/intern/file.h
+etc.o: $(hdrdir)/ruby/internal/intern/gc.h
+etc.o: $(hdrdir)/ruby/internal/intern/hash.h
+etc.o: $(hdrdir)/ruby/internal/intern/io.h
+etc.o: $(hdrdir)/ruby/internal/intern/load.h
+etc.o: $(hdrdir)/ruby/internal/intern/marshal.h
+etc.o: $(hdrdir)/ruby/internal/intern/numeric.h
+etc.o: $(hdrdir)/ruby/internal/intern/object.h
+etc.o: $(hdrdir)/ruby/internal/intern/parse.h
+etc.o: $(hdrdir)/ruby/internal/intern/proc.h
+etc.o: $(hdrdir)/ruby/internal/intern/process.h
+etc.o: $(hdrdir)/ruby/internal/intern/random.h
+etc.o: $(hdrdir)/ruby/internal/intern/range.h
+etc.o: $(hdrdir)/ruby/internal/intern/rational.h
+etc.o: $(hdrdir)/ruby/internal/intern/re.h
+etc.o: $(hdrdir)/ruby/internal/intern/ruby.h
+etc.o: $(hdrdir)/ruby/internal/intern/select.h
+etc.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+etc.o: $(hdrdir)/ruby/internal/intern/signal.h
+etc.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+etc.o: $(hdrdir)/ruby/internal/intern/string.h
+etc.o: $(hdrdir)/ruby/internal/intern/struct.h
+etc.o: $(hdrdir)/ruby/internal/intern/thread.h
+etc.o: $(hdrdir)/ruby/internal/intern/time.h
+etc.o: $(hdrdir)/ruby/internal/intern/variable.h
+etc.o: $(hdrdir)/ruby/internal/intern/vm.h
+etc.o: $(hdrdir)/ruby/internal/interpreter.h
+etc.o: $(hdrdir)/ruby/internal/iterator.h
+etc.o: $(hdrdir)/ruby/internal/memory.h
+etc.o: $(hdrdir)/ruby/internal/method.h
+etc.o: $(hdrdir)/ruby/internal/module.h
+etc.o: $(hdrdir)/ruby/internal/newobj.h
+etc.o: $(hdrdir)/ruby/internal/rgengc.h
+etc.o: $(hdrdir)/ruby/internal/scan_args.h
+etc.o: $(hdrdir)/ruby/internal/special_consts.h
+etc.o: $(hdrdir)/ruby/internal/static_assert.h
+etc.o: $(hdrdir)/ruby/internal/stdalign.h
+etc.o: $(hdrdir)/ruby/internal/stdbool.h
+etc.o: $(hdrdir)/ruby/internal/symbol.h
+etc.o: $(hdrdir)/ruby/internal/value.h
+etc.o: $(hdrdir)/ruby/internal/value_type.h
+etc.o: $(hdrdir)/ruby/internal/variable.h
+etc.o: $(hdrdir)/ruby/internal/warning_push.h
+etc.o: $(hdrdir)/ruby/internal/xmalloc.h
etc.o: $(hdrdir)/ruby/io.h
etc.o: $(hdrdir)/ruby/missing.h
etc.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 2f3fbb737b..6c7145b40b 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -47,15 +47,42 @@ static VALUE sGroup;
#define HAVE_UNAME 1
#endif
-#ifndef _WIN32
-char *getenv();
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
#endif
char *getlogin();
-#define RUBY_ETC_VERSION "1.1.0"
+#define RUBY_ETC_VERSION "1.4.2"
+
+#ifdef HAVE_RB_DEPRECATE_CONSTANT
+void rb_deprecate_constant(VALUE mod, const char *name);
+#else
+# define rb_deprecate_constant(mod,name) ((void)(mod),(void)(name))
+#endif
#include "constdefs.h"
+#ifdef HAVE_RUBY_ATOMIC_H
+# include "ruby/atomic.h"
+#else
+typedef int rb_atomic_t;
+# define RUBY_ATOMIC_CAS(var, oldval, newval) \
+ ((var) == (oldval) ? ((var) = (newval), (oldval)) : (var))
+# define RUBY_ATOMIC_EXCHANGE(var, newval) \
+ atomic_exchange(&var, newval)
+static inline rb_atomic_t
+atomic_exchange(volatile rb_atomic_t *var, rb_atomic_t newval)
+{
+ rb_atomic_t oldval = *var;
+ *var = newval;
+ return oldval;
+}
+#endif
+
/* call-seq:
* getlogin -> String
*
@@ -119,6 +146,12 @@ safe_setup_filesystem_str(const char *str)
#endif
#ifdef HAVE_GETPWENT
+# ifdef __APPLE__
+# define PW_TIME2VAL(t) INT2NUM((int)(t))
+# else
+# define PW_TIME2VAL(t) TIMET2NUM(t)
+# endif
+
static VALUE
setup_passwd(struct passwd *pwd)
{
@@ -136,7 +169,7 @@ setup_passwd(struct passwd *pwd)
safe_setup_filesystem_str(pwd->pw_dir),
safe_setup_filesystem_str(pwd->pw_shell),
#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
- INT2NUM(pwd->pw_change),
+ PW_TIME2VAL(pwd->pw_change),
#endif
#ifdef HAVE_STRUCT_PASSWD_PW_QUOTA
INT2NUM(pwd->pw_quota),
@@ -151,7 +184,7 @@ setup_passwd(struct passwd *pwd)
safe_setup_locale_str(pwd->pw_comment),
#endif
#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
- INT2NUM(pwd->pw_expire),
+ PW_TIME2VAL(pwd->pw_expire),
#endif
0 /*dummy*/
);
@@ -161,7 +194,8 @@ setup_passwd(struct passwd *pwd)
/* call-seq:
* getpwuid(uid) -> Passwd
*
- * Returns the /etc/passwd information for the user with the given integer +uid+.
+ * Returns the <tt>/etc/passwd</tt> information for the user with the given
+ * integer +uid+.
*
* The information is returned as a Passwd struct.
*
@@ -200,8 +234,8 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
/* call-seq:
* getpwnam(name) -> Passwd
*
- * Returns the /etc/passwd information for the user with specified login
- * +name+.
+ * Returns the <tt>/etc/passwd</tt> information for the user with specified
+ * login +name+.
*
* The information is returned as a Passwd struct.
*
@@ -228,12 +262,14 @@ etc_getpwnam(VALUE obj, VALUE nam)
}
#ifdef HAVE_GETPWENT
-static int passwd_blocking = 0;
+static rb_atomic_t passwd_blocking;
static VALUE
passwd_ensure(VALUE _)
{
endpwent();
- passwd_blocking = (int)Qfalse;
+ if (RUBY_ATOMIC_EXCHANGE(passwd_blocking, 0) != 1) {
+ rb_raise(rb_eRuntimeError, "unexpected passwd_blocking");
+ }
return Qnil;
}
@@ -252,10 +288,9 @@ passwd_iterate(VALUE _)
static void
each_passwd(void)
{
- if (passwd_blocking) {
+ if (RUBY_ATOMIC_CAS(passwd_blocking, 0, 1)) {
rb_raise(rb_eRuntimeError, "parallel passwd iteration");
}
- passwd_blocking = (int)Qtrue;
rb_ensure(passwd_iterate, 0, passwd_ensure, 0);
}
#endif
@@ -265,7 +300,7 @@ each_passwd(void)
* Etc.passwd -> Passwd
*
* Provides a convenient Ruby iterator which executes a block for each entry
- * in the /etc/passwd file.
+ * in the <tt>/etc/passwd</tt> file.
*
* The code block is passed an Passwd struct.
*
@@ -300,13 +335,14 @@ etc_passwd(VALUE obj)
* Etc::Passwd.each { |struct| block } -> Passwd
* Etc::Passwd.each -> Enumerator
*
- * Iterates for each entry in the /etc/passwd file if a block is given.
+ * Iterates for each entry in the <tt>/etc/passwd</tt> file if a block is
+ * given.
*
* If no block is given, returns the Enumerator.
*
* The code block is passed an Passwd struct.
*
- * See ::getpwent above for details.
+ * See Etc.getpwent above for details.
*
* Example:
*
@@ -330,8 +366,8 @@ etc_each_passwd(VALUE obj)
return obj;
}
-/* Resets the process of reading the /etc/passwd file, so that the next call
- * to ::getpwent will return the first entry again.
+/* Resets the process of reading the <tt>/etc/passwd</tt> file, so that the
+ * next call to ::getpwent will return the first entry again.
*/
static VALUE
etc_setpwent(VALUE obj)
@@ -342,8 +378,8 @@ etc_setpwent(VALUE obj)
return Qnil;
}
-/* Ends the process of scanning through the /etc/passwd file begun with
- * ::getpwent, and closes the file.
+/* Ends the process of scanning through the <tt>/etc/passwd</tt> file begun
+ * with ::getpwent, and closes the file.
*/
static VALUE
etc_endpwent(VALUE obj)
@@ -354,7 +390,7 @@ etc_endpwent(VALUE obj)
return Qnil;
}
-/* Returns an entry from the /etc/passwd file.
+/* Returns an entry from the <tt>/etc/passwd</tt> file.
*
* The first time it is called it opens the file and returns the first entry;
* each successive call returns the next entry, or +nil+ if the end of the file
@@ -405,7 +441,7 @@ setup_group(struct group *grp)
* getgrgid(group_id) -> Group
*
* Returns information about the group with specified integer +group_id+,
- * as found in /etc/group.
+ * as found in <tt>/etc/group</tt>.
*
* The information is returned as a Group struct.
*
@@ -443,7 +479,7 @@ etc_getgrgid(int argc, VALUE *argv, VALUE obj)
* getgrnam(name) -> Group
*
* Returns information about the group with specified +name+, as found in
- * /etc/group.
+ * <tt>/etc/group</tt>.
*
* The information is returned as a Group struct.
*
@@ -471,12 +507,14 @@ etc_getgrnam(VALUE obj, VALUE nam)
}
#ifdef HAVE_GETGRENT
-static int group_blocking = 0;
+static rb_atomic_t group_blocking;
static VALUE
group_ensure(VALUE _)
{
endgrent();
- group_blocking = (int)Qfalse;
+ if (RUBY_ATOMIC_EXCHANGE(group_blocking, 0) != 1) {
+ rb_raise(rb_eRuntimeError, "unexpected group_blocking");
+ }
return Qnil;
}
@@ -496,16 +534,15 @@ group_iterate(VALUE _)
static void
each_group(void)
{
- if (group_blocking) {
+ if (RUBY_ATOMIC_CAS(group_blocking, 0, 1)) {
rb_raise(rb_eRuntimeError, "parallel group iteration");
}
- group_blocking = (int)Qtrue;
rb_ensure(group_iterate, 0, group_ensure, 0);
}
#endif
/* Provides a convenient Ruby iterator which executes a block for each entry
- * in the /etc/group file.
+ * in the <tt>/etc/group</tt> file.
*
* The code block is passed an Group struct.
*
@@ -541,7 +578,8 @@ etc_group(VALUE obj)
* Etc::Group.each { |group| block } -> obj
* Etc::Group.each -> Enumerator
*
- * Iterates for each entry in the /etc/group file if a block is given.
+ * Iterates for each entry in the <tt>/etc/group</tt> file if a block is
+ * given.
*
* If no block is given, returns the Enumerator.
*
@@ -568,8 +606,8 @@ etc_each_group(VALUE obj)
}
#endif
-/* Resets the process of reading the /etc/group file, so that the next call
- * to ::getgrent will return the first entry again.
+/* Resets the process of reading the <tt>/etc/group</tt> file, so that the
+ * next call to ::getgrent will return the first entry again.
*/
static VALUE
etc_setgrent(VALUE obj)
@@ -580,8 +618,8 @@ etc_setgrent(VALUE obj)
return Qnil;
}
-/* Ends the process of scanning through the /etc/group file begun by
- * ::getgrent, and closes the file.
+/* Ends the process of scanning through the <tt>/etc/group</tt> file begun
+ * by ::getgrent, and closes the file.
*/
static VALUE
etc_endgrent(VALUE obj)
@@ -592,7 +630,7 @@ etc_endgrent(VALUE obj)
return Qnil;
}
-/* Returns an entry from the /etc/group file.
+/* Returns an entry from the <tt>/etc/group</tt> file.
*
* The first time it is called it opens the file and returns the first entry;
* each successive call returns the next entry, or +nil+ if the end of the file
@@ -626,9 +664,11 @@ VALUE rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc);
/*
* Returns system configuration directory.
*
- * This is typically "/etc", but is modified by the prefix used when Ruby was
- * compiled. For example, if Ruby is built and installed in /usr/local,
- * returns "/usr/local/etc" on other platforms than Windows.
+ * This is typically <code>"/etc"</code>, but is modified by the prefix used
+ * when Ruby was compiled. For example, if Ruby is built and installed in
+ * <tt>/usr/local</tt>, returns <code>"/usr/local/etc"</code> on other
+ * platforms than Windows.
+ *
* On Windows, this always returns the directory provided by the system.
*/
static VALUE
@@ -926,11 +966,13 @@ io_pathconf(VALUE io, VALUE arg)
static int
etc_nprocessors_affin(void)
{
- cpu_set_t *cpuset;
+ cpu_set_t *cpuset, cpuset_buff[1024 / sizeof(cpu_set_t)];
size_t size;
int ret;
int n;
+ CPU_ZERO_S(sizeof(cpuset_buff), cpuset_buff);
+
/*
* XXX:
* man page says CPU_ALLOC takes number of cpus. But it is not accurate
@@ -949,13 +991,12 @@ etc_nprocessors_affin(void)
*/
for (n=64; n <= 16384; n *= 2) {
size = CPU_ALLOC_SIZE(n);
- if (size >= 1024) {
+ if (size >= sizeof(cpuset_buff)) {
cpuset = xcalloc(1, size);
if (!cpuset)
return -1;
} else {
- cpuset = alloca(size);
- CPU_ZERO_S(size, cpuset);
+ cpuset = cpuset_buff;
}
ret = sched_getaffinity(0, size, cpuset);
@@ -964,10 +1005,10 @@ etc_nprocessors_affin(void)
ret = CPU_COUNT_S(size, cpuset);
}
- if (size >= 1024) {
+ if (size >= sizeof(cpuset_buff)) {
xfree(cpuset);
}
- if (ret > 0) {
+ if (ret > 0 || errno != EINVAL) {
return ret;
}
}
@@ -1035,11 +1076,12 @@ etc_nprocessors(VALUE obj)
/*
* The Etc module provides access to information typically stored in
- * files in the /etc directory on Unix systems.
+ * files in the <tt>/etc</tt> directory on Unix systems.
*
* The information accessible consists of the information found in the
- * /etc/passwd and /etc/group files, plus information about the system's
- * temporary directory (/tmp) and configuration directory (/etc).
+ * <tt>/etc/passwd</tt> and <tt>/etc/group</tt> files, plus information
+ * about the system's temporary directory (<tt>/tmp</tt>) and configuration
+ * directory (<tt>/etc</tt>).
*
* The Etc module provides a more reliable way to access information about
* the logged in user than environment variables such as +$USER+.
@@ -1064,6 +1106,9 @@ Init_etc(void)
{
VALUE mEtc;
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ RB_EXT_RACTOR_SAFE(true);
+#endif
mEtc = rb_define_module("Etc");
rb_define_const(mEtc, "VERSION", rb_str_new_cstr(RUBY_ETC_VERSION));
init_constants(mEtc);
@@ -1123,16 +1168,18 @@ Init_etc(void)
#endif
NULL);
#if 0
- /* Define-const: Passwd
+ /*
+ * Passwd is a placeholder Struct for user database on Unix systems.
*
- * Passwd is a Struct that contains the following members:
+ * === The struct contains the following members
*
* name::
* contains the short login name of the user as a String.
* passwd::
* contains the encrypted password of the user as a String.
- * an 'x' is returned if shadow passwords are in use. An '*' is returned
- * if the user cannot log in using a password.
+ * an <code>'x'</code> is returned if shadow passwords are in
+ * use. An <code>'*'</code> is returned if the user cannot
+ * log in using a password.
* uid::
* contains the integer user ID (uid) of the user.
* gid::
@@ -1142,29 +1189,27 @@ Init_etc(void)
* shell::
* contains the path to the login shell of the user as a String.
*
- * === The following members below are optional, and must be compiled with special flags:
+ * === The following members below are system-dependent
*
* gecos::
* contains a longer String description of the user, such as
* a full name. Some Unix systems provide structured information in the
* gecos field, but this is system-dependent.
- * must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+
* change::
- * password change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+
+ * password change time(integer).
* quota::
- * quota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+
+ * quota value(integer).
* age::
- * password age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+
+ * password age(integer).
* class::
- * user access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+
+ * user access class(string).
* comment::
- * comment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+
+ * comment(string).
* expire::
- * account expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+
+ * account expiration time(integer).
*/
- rb_define_const(mEtc, "Passwd", sPasswd);
+ sPasswd = rb_define_class_under(mEtc, "Passwd", rb_cStruct);
#endif
- rb_define_const(rb_cStruct, "Passwd", sPasswd); /* deprecated name */
rb_extend_object(sPasswd, rb_mEnumerable);
rb_define_singleton_method(sPasswd, "each", etc_each_passwd, 0);
@@ -1176,30 +1221,27 @@ Init_etc(void)
"gid", "mem", NULL);
#if 0
- /* Define-const: Group
- *
- * Group is a Struct that is only available when compiled with +HAVE_GETGRENT+.
+ /*
+ * Group is a placeholder Struct for user group database on Unix systems.
*
- * The struct contains the following members:
+ * === The struct contains the following members
*
* name::
* contains the name of the group as a String.
* passwd::
- * contains the encrypted password as a String. An 'x' is
+ * contains the encrypted password as a String. An <code>'x'</code> is
* returned if password access to the group is not available; an empty
* string is returned if no password is needed to obtain membership of
* the group.
- *
- * Must be compiled with +HAVE_STRUCT_GROUP_GR_PASSWD+.
+ * This is system-dependent.
* gid::
* contains the group's numeric ID as an integer.
* mem::
* is an Array of Strings containing the short login names of the
* members of the group.
*/
- rb_define_const(mEtc, "Group", sGroup);
+ sGroup = rb_define_class_under(mEtc, "Group", rb_cStruct);
#endif
- rb_define_const(rb_cStruct, "Group", sGroup); /* deprecated name */
rb_extend_object(sGroup, rb_mEnumerable);
rb_define_singleton_method(sGroup, "each", etc_each_group, 0);
#endif
diff --git a/ext/etc/etc.gemspec b/ext/etc/etc.gemspec
index f28016925f..98c6d66faa 100644
--- a/ext/etc/etc.gemspec
+++ b/ext/etc/etc.gemspec
@@ -20,26 +20,24 @@ Gem::Specification.new do |spec|
spec.summary = %q{Provides access to information typically stored in UNIX /etc directory.}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/etc"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ changelogs = Dir.glob("logs/ChangeLog-[1-9]*[^~]", base: __dir__)
spec.files = %w[
LICENSE.txt
README.md
+ ChangeLog
ext/etc/constdefs.h
ext/etc/etc.c
ext/etc/extconf.rb
ext/etc/mkconstants.rb
- stub/etc.rb
test/etc/test_etc.rb
- ]
+ ] + changelogs
+ spec.rdoc_options = ["--main", "README.md"]
+ spec.extra_rdoc_files = spec.files.grep_v(/\.{rb,[ch]}\z/)
spec.bindir = "exe"
spec.require_paths = ["lib"]
spec.extensions = %w{ext/etc/extconf.rb}
- spec.required_ruby_version = ">= 2.3.0"
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "rake-compiler"
- spec.add_development_dependency "test-unit"
+ spec.required_ruby_version = ">= 2.6.0"
end
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb
index 435fbe7f3d..159b1614b7 100644
--- a/ext/etc/extconf.rb
+++ b/ext/etc/extconf.rb
@@ -47,6 +47,9 @@ if !File.exist?("#{srcdir}/depend")
%x[#{RbConfig.ruby} #{srcdir}/mkconstants.rb -o #{srcdir}/constdefs.h]
end
+# TODO: remove when dropping 2.7 support, as exported since 3.0
+have_func('rb_deprecate_constant(Qnil, "None")')
+
$distcleanfiles << "constdefs.h"
create_makefile("etc")
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 80a0a1208d..4e77a7167b 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -2,6 +2,9 @@
# -*- mode: ruby; coding: us-ascii -*-
# frozen_string_literal: false
+module Gem; end # only needs Gem::Platform
+require 'rubygems/platform'
+
# :stopdoc:
$extension = nil
$extstatic = nil
@@ -34,6 +37,7 @@ require 'rbconfig'
$topdir = "."
$top_srcdir = srcdir
+inplace = File.identical?($top_srcdir, $topdir)
$" << "mkmf.rb"
load File.expand_path("lib/mkmf.rb", srcdir)
@@ -62,12 +66,17 @@ end
def atomic_write_open(filename)
filename_new = filename + ".new.#$$"
- open(filename_new, "wb") do |f|
+ clean = false
+ File.open(filename_new, "wbx") do |f|
+ clean = true
yield f
end
if File.binread(filename_new) != (File.binread(filename) rescue nil)
File.rename(filename_new, filename)
- else
+ clean = false
+ end
+ensure
+ if clean
File.unlink(filename_new)
end
end
@@ -127,6 +136,14 @@ def extract_makefile(makefile, keep = true)
true
end
+def create_makefile(target, srcprefix = nil)
+ if $static and target.include?("/")
+ base = File.basename(target)
+ $defs << "-DInit_#{base}=Init_#{target.tr('/', '_')}"
+ end
+ super
+end
+
def extmake(target, basedir = 'ext', maybestatic = true)
FileUtils.mkpath target unless File.directory?(target)
begin
@@ -135,7 +152,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
d = target
until (d = File.dirname(d)) == '.'
if File.exist?("#{$top_srcdir}/#{basedir}/#{d}/extconf.rb")
- parent = (/^all:\s*install/ =~ IO.read("#{d}/Makefile") rescue false)
+ parent = (/^all:\s*install/ =~ File.read("#{d}/Makefile") rescue false)
break
end
end
@@ -146,7 +163,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
top_srcdir = $top_srcdir
topdir = $topdir
hdrdir = $hdrdir
- prefix = "../" * (target.count("/")+1)
+ prefix = "../" * (basedir.count("/")+target.count("/")+1)
$top_srcdir = relative_from(top_srcdir, prefix)
$hdrdir = relative_from(hdrdir, prefix)
$topdir = prefix + $topdir
@@ -154,8 +171,6 @@ def extmake(target, basedir = 'ext', maybestatic = true)
$mdir = target
$srcdir = File.join($top_srcdir, basedir, $mdir)
$preload = nil
- $objs = []
- $srcs = []
$extso = []
makefile = "./Makefile"
static = $static
@@ -189,7 +204,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
begin
$extconf_h = nil
ok &&= extract_makefile(makefile)
- old_objs = $objs
+ old_objs = $objs || []
old_cleanfiles = $distcleanfiles | $cleanfiles
conf = ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb"].find {|f| File.exist?(f)}
if (!ok || ($extconf_h && !File.exist?($extconf_h)) ||
@@ -252,6 +267,8 @@ def extmake(target, basedir = 'ext', maybestatic = true)
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
args += ["DESTDIR=" + relative_from($destdir, "../"+prefix)]
end
+ $objs ||= []
+ $srcs ||= []
if $static and ok and !$objs.empty? and !noinstall
args += ["static"]
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]
@@ -408,8 +425,10 @@ if CROSS_COMPILING
$ruby = $mflags.defined?("MINIRUBY") || CONFIG['MINIRUBY']
elsif sep = config_string('BUILD_FILE_SEPARATOR')
$ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT
-else
+elsif CONFIG['EXTSTATIC']
$ruby = '$(topdir)/miniruby' + EXEEXT
+else
+ $ruby = '$(topdir)/ruby' + EXEEXT
end
$ruby = [$ruby]
$ruby << "-I'$(topdir)'"
@@ -421,6 +440,7 @@ end
topruby = $ruby
$ruby = topruby.join(' ')
$mflags << "ruby=#$ruby"
+$builtruby = '$(topdir)/miniruby' + EXEEXT # Must be an executable path
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
@@ -435,9 +455,8 @@ if $extstatic
end
for dir in ["ext", File::join($top_srcdir, "ext")]
setup = File::join(dir, CONFIG['setup'])
- if File.file? setup
- f = open(setup)
- while line = f.gets()
+ if (f = File.stat(setup) and f.file? rescue next)
+ File.foreach(setup) do |line|
line.chomp!
line.sub!(/#.*$/, '')
next if /^\s*$/ =~ line
@@ -454,16 +473,16 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
end
MTIMES << f.mtime
$setup = setup
- f.close
break
end
end unless $extstatic
@gemname = nil
-if ARGV[0]
- ext_prefix, exts = ARGV.shift.split('/', 2)
+if exts = ARGV.shift
+ ext_prefix = exts[%r[\A(?>\.bundle/)?[^/]+(?:/(?=(.+)?)|\z)]]
+ exts = $1
$extension = [exts] if exts
- if ext_prefix == 'gems'
+ if ext_prefix.start_with?('.')
@gemname = exts
elsif exts
$static_ext.delete_if {|t, *| !File.fnmatch(t, exts)}
@@ -515,14 +534,22 @@ cond = proc {|ext, *|
exts.delete_if {|d| File.fnmatch?("-*", d)}
end
end
-ext_prefix = File.basename(ext_prefix)
+ext_prefix = ext_prefix[$top_srcdir.size+1..-2]
+@ext_prefix = ext_prefix
+@inplace = inplace
extend Module.new {
+
def timestamp_file(name, target_prefix = nil)
if @gemname and name == '$(TARGET_SO_DIR)'
- name = "$(arch)/gems/#{@gemname}#{target_prefix}"
+ gem = true
+ name = "$(gem_platform)/$(ruby_version)/gems/#{@gemname}#{target_prefix}"
end
- super.sub(%r[/\.extout\.(?:-\.)?], '/.')
+ path = super.sub(%r[/\.extout\.(?:-\.)?], '/.')
+ if gem
+ nil while path.sub!(%r[/\.(gem_platform|ruby_version)\.-(?=\.)], '/$(\1)/')
+ end
+ path
end
def configuration(srcdir)
@@ -530,28 +557,81 @@ extend Module.new {
end
def create_makefile(*args, &block)
- return super unless @gemname
+ unless @gemname
+ if $static and (target = args.first).include?("/")
+ base = File.basename(target)
+ $defs << "-DInit_#{base}=Init_#{target.tr('/', '_')}"
+ end
+ return super
+ end
super(*args) do |conf|
conf.find do |s|
+ s.sub!(%r(^(srcdir *= *)\$\(top_srcdir\)/\.bundle/gems/[^/]+(?=/))) {
+ "gem_#{$&}\n" "#{$1}$(gem_srcdir)"
+ }
+ s.sub!(/^(TIMESTAMP_DIR *= *)\$\(extout\)/) {
+ "TARGET_TOPDIR = $(topdir)/.bundle\n" "#{$1}$(TARGET_TOPDIR)"
+ }
s.sub!(/^(TARGET_SO_DIR *= *)\$\(RUBYARCHDIR\)/) {
- "TARGET_GEM_DIR = $(extout)/gems/$(arch)/#{@gemname}\n"\
+ "TARGET_GEM_DIR = $(TARGET_TOPDIR)/extensions/$(gem_platform)"\
+ "/$(ruby_version)#{$enable_shared ? '' : '-static'}/#{@gemname}\n"\
"#{$1}$(TARGET_GEM_DIR)$(target_prefix)"
}
end
- conf.any? {|s| /^TARGET *= *\S/ =~ s} and conf << %{
+
+ gemlib = File.directory?("#{$top_srcdir}/#{@ext_prefix}/#{@gemname}/lib")
+ if conf.any? {|s| /^TARGET *= *\S/ =~ s}
+ conf << %{
+gem_platform = #{Gem::Platform.local}
# default target
all:
+gem = #{@gemname}
+
build_complete = $(TARGET_GEM_DIR)/gem.build_complete
install-so: build_complete
+clean-so:: clean-build_complete
+
build_complete: $(build_complete)
$(build_complete): $(TARGET_SO)
$(Q) $(TOUCH) $@
-clean-so::
+clean-build_complete:
-$(Q)$(RM) $(build_complete)
+
+install: gemspec
+clean: clean-gemspec
+
+gemspec = $(TARGET_TOPDIR)/specifications/$(gem).gemspec
+$(gemspec): $(gem_srcdir)/.bundled.$(gem).gemspec
+ $(Q) $(MAKEDIRS) $(@D)
+ $(Q) $(COPY) $(gem_srcdir)/.bundled.$(gem).gemspec $@
+
+gemspec: $(gemspec)
+
+clean-gemspec:
+ -$(Q)$(RM) $(gemspec)
}
+
+ if gemlib
+ conf << %{
+install-rb: gemlib
+clean-rb:: clean-gemlib
+
+LN_S = #{config_string('LN_S')}
+CP_R = #{config_string('CP')} -r
+
+gemlib = $(TARGET_TOPDIR)/gems/$(gem)/lib
+gemlib:#{%{ $(gemlib)\n$(gemlib): $(gem_srcdir)/lib} if $nmake}
+ $(Q) #{@inplace ? '$(NULLCMD) ' : ''}$(RUBY) $(top_srcdir)/tool/ln_sr.rb -q -f -T $(gem_srcdir)/lib $(gemlib)
+
+clean-gemlib:
+ $(Q) $(#{@inplace ? 'NULLCMD' : 'RM_RF'}) $(gemlib)
+}
+ end
+ end
+
conf
end
end
@@ -634,7 +714,7 @@ rubies = []
end
}
-Dir.chdir ".."
+Dir.chdir dir
unless $destdir.to_s.empty?
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
end
@@ -647,11 +727,14 @@ FileUtils.makedirs(File.dirname($command_output))
begin
atomic_write_open($command_output) do |mf|
mf.puts "V = 0"
+ mf.puts "V0 = $(V:0=)"
mf.puts "Q1 = $(V:1=)"
mf.puts "Q = $(Q1:0=@)"
mf.puts "ECHO1 = $(V:1=@:)"
mf.puts "ECHO = $(ECHO1:0=@echo)"
mf.puts "MFLAGS = -$(MAKEFLAGS)" if $nmake
+ mf.puts "override MFLAGS := $(filter-out -j%,$(MFLAGS))" if $gnumake
+ mf.puts "ext_build_dir = #{File.dirname($command_output)}"
mf.puts
def mf.macro(name, values, max = 70)
@@ -694,6 +777,7 @@ begin
mf.macro "SUBMAKEOPTS", submakeopts
mf.macro "NOTE_MESG", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb skip]
mf.macro "NOTE_NAME", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb fail]
+ %w[RM RMDIRS RMDIR RMALL].each {|w| mf.macro w, [RbConfig::CONFIG[w]]}
mf.puts
targets = %w[all install static install-so install-rb clean distclean realclean]
targets.each do |tgt|
@@ -728,16 +812,20 @@ begin
exts.each do |d|
d = d[0..-2]
t = "#{d}#{tgt}"
- if /^(dist|real)?clean$/ =~ tgt
+ if clean = /^(dist|real)?clean$/.match(tgt)
deps = exts.select {|e|e.start_with?(d)}.map {|e|"#{e[0..-2]}#{tgt}"} - [t]
- pd = ' ' + deps.join(' ') unless deps.empty?
+ pd = [' clean-local', *deps].join(' ')
else
pext = File.dirname(d)
pd = " #{pext}/#{tgt}" if exts.include?("#{pext}/.")
end
mf.puts "#{t}:#{pd}\n\t$(Q)#{submake} $(MFLAGS) V=$(V) $(@F)"
+ if clean and clean.begin(1)
+ mf.puts "\t$(Q)$(RM) $(ext_build_dir)/exts.mk\n\t$(Q)$(RMDIRS) -p $(@D)"
+ end
end
end
+ mf.puts "\n""clean-local:\n\t$(Q)$(RM) $(ext_build_dir)/*~ $(ext_build_dir)/*.bak $(ext_build_dir)/core"
mf.puts "\n""extso:\n"
mf.puts "\t@echo EXTSO=$(EXTSO)"
diff --git a/ext/fcntl/depend b/ext/fcntl/depend
index 60d6be6b89..718de62e26 100644
--- a/ext/fcntl/depend
+++ b/ext/fcntl/depend
@@ -4,8 +4,156 @@ fcntl.o: $(arch_hdrdir)/ruby/config.h
fcntl.o: $(hdrdir)/ruby.h
fcntl.o: $(hdrdir)/ruby/assert.h
fcntl.o: $(hdrdir)/ruby/backward.h
+fcntl.o: $(hdrdir)/ruby/backward/2/assume.h
+fcntl.o: $(hdrdir)/ruby/backward/2/attributes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/bool.h
+fcntl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/limits.h
+fcntl.o: $(hdrdir)/ruby/backward/2/long_long.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdarg.h
fcntl.o: $(hdrdir)/ruby/defines.h
fcntl.o: $(hdrdir)/ruby/intern.h
+fcntl.o: $(hdrdir)/ruby/internal/abi.h
+fcntl.o: $(hdrdir)/ruby/internal/anyargs.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+fcntl.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+fcntl.o: $(hdrdir)/ruby/internal/assume.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/artificial.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/cold.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/const.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/error.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/format.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/noalias.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/noinline.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/pure.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/restrict.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/warning.h
+fcntl.o: $(hdrdir)/ruby/internal/attr/weakref.h
+fcntl.o: $(hdrdir)/ruby/internal/cast.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+fcntl.o: $(hdrdir)/ruby/internal/compiler_since.h
+fcntl.o: $(hdrdir)/ruby/internal/config.h
+fcntl.o: $(hdrdir)/ruby/internal/constant_p.h
+fcntl.o: $(hdrdir)/ruby/internal/core.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rarray.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rbasic.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rbignum.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rclass.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rdata.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rfile.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rhash.h
+fcntl.o: $(hdrdir)/ruby/internal/core/robject.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rregexp.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rstring.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rstruct.h
+fcntl.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+fcntl.o: $(hdrdir)/ruby/internal/ctype.h
+fcntl.o: $(hdrdir)/ruby/internal/dllexport.h
+fcntl.o: $(hdrdir)/ruby/internal/dosish.h
+fcntl.o: $(hdrdir)/ruby/internal/error.h
+fcntl.o: $(hdrdir)/ruby/internal/eval.h
+fcntl.o: $(hdrdir)/ruby/internal/event.h
+fcntl.o: $(hdrdir)/ruby/internal/fl_type.h
+fcntl.o: $(hdrdir)/ruby/internal/gc.h
+fcntl.o: $(hdrdir)/ruby/internal/glob.h
+fcntl.o: $(hdrdir)/ruby/internal/globals.h
+fcntl.o: $(hdrdir)/ruby/internal/has/attribute.h
+fcntl.o: $(hdrdir)/ruby/internal/has/builtin.h
+fcntl.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+fcntl.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+fcntl.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+fcntl.o: $(hdrdir)/ruby/internal/has/extension.h
+fcntl.o: $(hdrdir)/ruby/internal/has/feature.h
+fcntl.o: $(hdrdir)/ruby/internal/has/warning.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/array.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/bignum.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/class.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/compar.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/complex.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/cont.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/dir.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/enum.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/error.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/eval.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/file.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/gc.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/hash.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/io.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/load.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/marshal.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/numeric.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/object.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/parse.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/proc.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/process.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/random.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/range.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/rational.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/re.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/ruby.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/select.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/signal.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/string.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/struct.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/thread.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/time.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/variable.h
+fcntl.o: $(hdrdir)/ruby/internal/intern/vm.h
+fcntl.o: $(hdrdir)/ruby/internal/interpreter.h
+fcntl.o: $(hdrdir)/ruby/internal/iterator.h
+fcntl.o: $(hdrdir)/ruby/internal/memory.h
+fcntl.o: $(hdrdir)/ruby/internal/method.h
+fcntl.o: $(hdrdir)/ruby/internal/module.h
+fcntl.o: $(hdrdir)/ruby/internal/newobj.h
+fcntl.o: $(hdrdir)/ruby/internal/rgengc.h
+fcntl.o: $(hdrdir)/ruby/internal/scan_args.h
+fcntl.o: $(hdrdir)/ruby/internal/special_consts.h
+fcntl.o: $(hdrdir)/ruby/internal/static_assert.h
+fcntl.o: $(hdrdir)/ruby/internal/stdalign.h
+fcntl.o: $(hdrdir)/ruby/internal/stdbool.h
+fcntl.o: $(hdrdir)/ruby/internal/symbol.h
+fcntl.o: $(hdrdir)/ruby/internal/value.h
+fcntl.o: $(hdrdir)/ruby/internal/value_type.h
+fcntl.o: $(hdrdir)/ruby/internal/variable.h
+fcntl.o: $(hdrdir)/ruby/internal/warning_push.h
+fcntl.o: $(hdrdir)/ruby/internal/xmalloc.h
fcntl.o: $(hdrdir)/ruby/missing.h
fcntl.o: $(hdrdir)/ruby/ruby.h
fcntl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index c93694c431..3bccc41e4c 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -159,6 +159,20 @@ Init_fcntl(void)
*/
rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
#endif
+#ifdef F_SETPIPE_SZ
+ /* Document-const: F_SETPIPE_SZ
+ *
+ * Change the capacity of the pipe referred to by fd to be at least arg bytes.
+ */
+ rb_define_const(mFcntl, "F_SETPIPE_SZ", INT2NUM(F_SETPIPE_SZ));
+#endif
+#ifdef F_GETPIPE_SZ
+ /* Document-const: F_GETPIPE_SZ
+ *
+ * Return (as the function result) the capacity of the pipe referred to by fd.
+ */
+ rb_define_const(mFcntl, "F_GETPIPE_SZ", INT2NUM(F_GETPIPE_SZ));
+#endif
#ifdef O_CREAT
/* Document-const: O_CREAT
*
@@ -242,4 +256,21 @@ Init_fcntl(void)
*/
rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
#endif
+#ifdef F_DUP2FD
+ /* Document-const: F_DUP2FD
+ *
+ * It is a FreeBSD specific constant and equivalent
+ * to dup2 call.
+ */
+ rb_define_const(mFcntl, "F_DUP2FD", INT2NUM(F_DUP2FD));
+#endif
+#ifdef F_DUP2FD_CLOEXEC
+ /* Document-const: F_DUP2FD_CLOEXEC
+ *
+ * It is a FreeBSD specific constant and acts
+ * similarly as F_DUP2FD but set the FD_CLOEXEC
+ * flag in addition.
+ */
+ rb_define_const(mFcntl, "F_DUP2FD_CLOEXEC", INT2NUM(F_DUP2FD_CLOEXEC));
+#endif
}
diff --git a/ext/fcntl/fcntl.gemspec b/ext/fcntl/fcntl.gemspec
index 0e3194fbdc..09d3fc2568 100644
--- a/ext/fcntl/fcntl.gemspec
+++ b/ext/fcntl/fcntl.gemspec
@@ -3,14 +3,14 @@
Gem::Specification.new do |spec|
spec.name = "fcntl"
- spec.version = "1.0.0"
+ spec.version = "1.0.2"
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = "Loads constants defined in the OS fcntl.h C header file"
spec.description = "Loads constants defined in the OS fcntl.h C header file"
spec.homepage = "https://github.com/ruby/fcntl"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.files = ["ext/fcntl/extconf.rb", "ext/fcntl/fcntl.c"]
spec.bindir = "exe"
@@ -18,8 +18,4 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.extensions = "ext/fcntl/extconf.rb"
spec.required_ruby_version = ">= 2.3.0"
-
- spec.add_development_dependency "bundler", "~> 1.14"
- spec.add_development_dependency "rake", "~> 12"
- spec.add_development_dependency "rake-compiler"
end
diff --git a/ext/fiber/depend b/ext/fiber/depend
deleted file mode 100644
index 675263b95c..0000000000
--- a/ext/fiber/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-fiber.o: fiber.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/fiber/extconf.rb b/ext/fiber/extconf.rb
deleted file mode 100644
index 7f11e0dafa..0000000000
--- a/ext/fiber/extconf.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# frozen_string_literal: false
-require 'mkmf'
-create_makefile('fiber')
-
diff --git a/ext/fiber/fiber.c b/ext/fiber/fiber.c
deleted file mode 100644
index 12fcaad73b..0000000000
--- a/ext/fiber/fiber.c
+++ /dev/null
@@ -1,8 +0,0 @@
-
-void ruby_Init_Fiber_as_Coroutine(void);
-
-void
-Init_fiber(void)
-{
- ruby_Init_Fiber_as_Coroutine();
-}
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 1a80b2b02a..892f522a62 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -13,11 +13,12 @@ typedef struct {
ffi_type **argv;
} fiddle_closure;
-#if defined(USE_FFI_CLOSURE_ALLOC)
-#elif defined(__OpenBSD__) || defined(__APPLE__) || defined(__linux__)
+#if defined(__OpenBSD__)
# define USE_FFI_CLOSURE_ALLOC 0
-#elif defined(RUBY_LIBFFI_MODVERSION) && RUBY_LIBFFI_MODVERSION < 3000005 && \
- (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64))
+#endif
+
+#if defined(USE_FFI_CLOSURE_ALLOC)
+#elif !defined(HAVE_FFI_CLOSURE_ALLOC)
# define USE_FFI_CLOSURE_ALLOC 0
#else
# define USE_FFI_CLOSURE_ALLOC 1
@@ -55,6 +56,8 @@ closure_memsize(const void * ptr)
const rb_data_type_t closure_data_type = {
"fiddle/closure",
{0, dealloc, closure_memsize,},
+ 0, 0,
+ RUBY_TYPED_FREE_IMMEDIATELY,
};
struct callback_args {
@@ -89,7 +92,7 @@ with_gvl_callback(void *ptr)
case TYPE_INT:
rb_ary_push(params, INT2NUM(*(int *)x->args[i]));
break;
- case -TYPE_INT:
+ case TYPE_UINT:
rb_ary_push(params, UINT2NUM(*(unsigned int *)x->args[i]));
break;
case TYPE_VOIDP:
@@ -100,19 +103,19 @@ with_gvl_callback(void *ptr)
case TYPE_LONG:
rb_ary_push(params, LONG2NUM(*(long *)x->args[i]));
break;
- case -TYPE_LONG:
+ case TYPE_ULONG:
rb_ary_push(params, ULONG2NUM(*(unsigned long *)x->args[i]));
break;
case TYPE_CHAR:
rb_ary_push(params, INT2NUM(*(signed char *)x->args[i]));
break;
- case -TYPE_CHAR:
+ case TYPE_UCHAR:
rb_ary_push(params, UINT2NUM(*(unsigned char *)x->args[i]));
break;
case TYPE_SHORT:
rb_ary_push(params, INT2NUM(*(signed short *)x->args[i]));
break;
- case -TYPE_SHORT:
+ case TYPE_USHORT:
rb_ary_push(params, UINT2NUM(*(unsigned short *)x->args[i]));
break;
case TYPE_DOUBLE:
@@ -125,10 +128,14 @@ with_gvl_callback(void *ptr)
case TYPE_LONG_LONG:
rb_ary_push(params, LL2NUM(*(LONG_LONG *)x->args[i]));
break;
- case -TYPE_LONG_LONG:
+ case TYPE_ULONG_LONG:
rb_ary_push(params, ULL2NUM(*(unsigned LONG_LONG *)x->args[i]));
break;
#endif
+ case TYPE_CONST_STRING:
+ rb_ary_push(params,
+ rb_str_new_cstr(*((const char **)(x->args[i]))));
+ break;
default:
rb_raise(rb_eRuntimeError, "closure args: %d", type);
}
@@ -144,7 +151,7 @@ with_gvl_callback(void *ptr)
case TYPE_LONG:
*(long *)x->resp = NUM2LONG(ret);
break;
- case -TYPE_LONG:
+ case TYPE_ULONG:
*(unsigned long *)x->resp = NUM2ULONG(ret);
break;
case TYPE_CHAR:
@@ -152,9 +159,9 @@ with_gvl_callback(void *ptr)
case TYPE_INT:
*(ffi_sarg *)x->resp = NUM2INT(ret);
break;
- case -TYPE_CHAR:
- case -TYPE_SHORT:
- case -TYPE_INT:
+ case TYPE_UCHAR:
+ case TYPE_USHORT:
+ case TYPE_UINT:
*(ffi_arg *)x->resp = NUM2UINT(ret);
break;
case TYPE_VOIDP:
@@ -170,10 +177,14 @@ with_gvl_callback(void *ptr)
case TYPE_LONG_LONG:
*(LONG_LONG *)x->resp = NUM2LL(ret);
break;
- case -TYPE_LONG_LONG:
+ case TYPE_ULONG_LONG:
*(unsigned LONG_LONG *)x->resp = NUM2ULL(ret);
break;
#endif
+ case TYPE_CONST_STRING:
+ /* Dangerous. Callback must keep reference of the String. */
+ *((const char **)(x->resp)) = StringValueCStr(ret);
+ break;
default:
rb_raise(rb_eRuntimeError, "closure retval: %d", type);
}
@@ -215,11 +226,30 @@ allocate(VALUE klass)
return i;
}
+static fiddle_closure *
+get_raw(VALUE self)
+{
+ fiddle_closure *closure;
+ TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, closure);
+ if (!closure) {
+ rb_raise(rb_eArgError, "already freed: %+"PRIsVALUE, self);
+ }
+ return closure;
+}
+
+typedef struct {
+ VALUE self;
+ int argc;
+ VALUE *argv;
+} initialize_data;
+
static VALUE
-initialize(int rbargc, VALUE argv[], VALUE self)
+initialize_body(VALUE user_data)
{
+ initialize_data *data = (initialize_data *)user_data;
VALUE ret;
VALUE args;
+ VALUE normalized_args;
VALUE abi;
fiddle_closure * cl;
ffi_cif * cif;
@@ -227,65 +257,107 @@ initialize(int rbargc, VALUE argv[], VALUE self)
ffi_status result;
int i, argc;
- if (2 == rb_scan_args(rbargc, argv, "21", &ret, &args, &abi))
- abi = INT2NUM(FFI_DEFAULT_ABI);
+ if (2 == rb_scan_args(data->argc, data->argv, "21", &ret, &args, &abi))
+ abi = INT2NUM(FFI_DEFAULT_ABI);
Check_Type(args, T_ARRAY);
argc = RARRAY_LENINT(args);
- TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, cl);
+ TypedData_Get_Struct(data->self, fiddle_closure, &closure_data_type, cl);
cl->argv = (ffi_type **)xcalloc(argc + 1, sizeof(ffi_type *));
+ normalized_args = rb_ary_new_capa(argc);
for (i = 0; i < argc; i++) {
- int type = NUM2INT(RARRAY_AREF(args, i));
- cl->argv[i] = INT2FFI_TYPE(type);
+ VALUE arg = rb_fiddle_type_ensure(RARRAY_AREF(args, i));
+ rb_ary_push(normalized_args, arg);
+ cl->argv[i] = rb_fiddle_int_to_ffi_type(NUM2INT(arg));
}
cl->argv[argc] = NULL;
- rb_iv_set(self, "@ctype", ret);
- rb_iv_set(self, "@args", args);
+ ret = rb_fiddle_type_ensure(ret);
+ rb_iv_set(data->self, "@ctype", ret);
+ rb_iv_set(data->self, "@args", normalized_args);
cif = &cl->cif;
pcl = cl->pcl;
- result = ffi_prep_cif(cif, NUM2INT(abi), argc,
- INT2FFI_TYPE(NUM2INT(ret)),
- cl->argv);
+ result = ffi_prep_cif(cif,
+ NUM2INT(abi),
+ argc,
+ rb_fiddle_int_to_ffi_type(NUM2INT(ret)),
+ cl->argv);
- if (FFI_OK != result)
- rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
+ if (FFI_OK != result) {
+ rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
+ }
#if USE_FFI_CLOSURE_ALLOC
result = ffi_prep_closure_loc(pcl, cif, callback,
- (void *)self, cl->code);
+ (void *)(data->self), cl->code);
#else
- result = ffi_prep_closure(pcl, cif, callback, (void *)self);
+ result = ffi_prep_closure(pcl, cif, callback, (void *)(data->self));
cl->code = (void *)pcl;
i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC);
if (i) {
- rb_sys_fail("mprotect");
+ rb_sys_fail("mprotect");
}
#endif
- if (FFI_OK != result)
- rb_raise(rb_eRuntimeError, "error prepping closure %d", result);
+ if (FFI_OK != result) {
+ rb_raise(rb_eRuntimeError, "error prepping closure %d", result);
+ }
- return self;
+ return data->self;
}
static VALUE
-to_i(VALUE self)
+initialize_rescue(VALUE user_data, VALUE exception)
{
- fiddle_closure * cl;
- void *code;
+ initialize_data *data = (initialize_data *)user_data;
+ dealloc(RTYPEDDATA_DATA(data->self));
+ RTYPEDDATA_DATA(data->self) = NULL;
+ rb_exc_raise(exception);
+ return data->self;
+}
- TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, cl);
+static VALUE
+initialize(int argc, VALUE *argv, VALUE self)
+{
+ initialize_data data;
+ data.self = self;
+ data.argc = argc;
+ data.argv = argv;
+ return rb_rescue(initialize_body, (VALUE)&data,
+ initialize_rescue, (VALUE)&data);
+}
- code = cl->code;
+static VALUE
+to_i(VALUE self)
+{
+ fiddle_closure *closure = get_raw(self);
+ return PTR2NUM(closure->code);
+}
+
+static VALUE
+closure_free(VALUE self)
+{
+ fiddle_closure *closure;
+ TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, closure);
+ if (closure) {
+ dealloc(closure);
+ RTYPEDDATA_DATA(self) = NULL;
+ }
+ return RUBY_Qnil;
+}
- return PTR2NUM(code);
+static VALUE
+closure_freed_p(VALUE self)
+{
+ fiddle_closure *closure;
+ TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, closure);
+ return closure ? RUBY_Qfalse : RUBY_Qtrue;
}
void
@@ -338,8 +410,24 @@ Init_fiddle_closure(void)
/*
* Document-method: to_i
*
- * Returns the memory address for this closure
+ * Returns the memory address for this closure.
*/
rb_define_method(cFiddleClosure, "to_i", to_i, 0);
+
+ /*
+ * Document-method: free
+ *
+ * Free this closure explicitly. You can't use this closure anymore.
+ *
+ * If this closure is already freed, this does nothing.
+ */
+ rb_define_method(cFiddleClosure, "free", closure_free, 0);
+
+ /*
+ * Document-method: freed?
+ *
+ * Whether this closure was freed explicitly.
+ */
+ rb_define_method(cFiddleClosure, "freed?", closure_freed_p, 0);
}
/* vim: set noet sw=4 sts=4 */
diff --git a/ext/fiddle/conversions.c b/ext/fiddle/conversions.c
index d40ddc1f38..3b70f7de4c 100644
--- a/ext/fiddle/conversions.c
+++ b/ext/fiddle/conversions.c
@@ -1,7 +1,159 @@
#include <fiddle.h>
+VALUE
+rb_fiddle_type_ensure(VALUE type)
+{
+ VALUE original_type = type;
+
+ if (!RB_SYMBOL_P(type)) {
+ VALUE type_string = rb_check_string_type(type);
+ if (!NIL_P(type_string)) {
+ type = rb_to_symbol(type_string);
+ }
+ }
+
+ if (RB_SYMBOL_P(type)) {
+ ID type_id = rb_sym2id(type);
+ ID void_id;
+ ID voidp_id;
+ ID char_id;
+ ID short_id;
+ ID int_id;
+ ID long_id;
+#ifdef TYPE_LONG_LONG
+ ID long_long_id;
+#endif
+#ifdef TYPE_INT8_T
+ ID int8_t_id;
+#endif
+#ifdef TYPE_INT16_T
+ ID int16_t_id;
+#endif
+#ifdef TYPE_INT32_T
+ ID int32_t_id;
+#endif
+#ifdef TYPE_INT64_T
+ ID int64_t_id;
+#endif
+ ID float_id;
+ ID double_id;
+ ID variadic_id;
+ ID const_string_id;
+ ID size_t_id;
+ ID ssize_t_id;
+ ID ptrdiff_t_id;
+ ID intptr_t_id;
+ ID uintptr_t_id;
+ RUBY_CONST_ID(void_id, "void");
+ RUBY_CONST_ID(voidp_id, "voidp");
+ RUBY_CONST_ID(char_id, "char");
+ RUBY_CONST_ID(short_id, "short");
+ RUBY_CONST_ID(int_id, "int");
+ RUBY_CONST_ID(long_id, "long");
+#ifdef TYPE_LONG_LONG
+ RUBY_CONST_ID(long_long_id, "long_long");
+#endif
+#ifdef TYPE_INT8_T
+ RUBY_CONST_ID(int8_t_id, "int8_t");
+#endif
+#ifdef TYPE_INT16_T
+ RUBY_CONST_ID(int16_t_id, "int16_t");
+#endif
+#ifdef TYPE_INT32_T
+ RUBY_CONST_ID(int32_t_id, "int32_t");
+#endif
+#ifdef TYPE_INT64_T
+ RUBY_CONST_ID(int64_t_id, "int64_t");
+#endif
+ RUBY_CONST_ID(float_id, "float");
+ RUBY_CONST_ID(double_id, "double");
+ RUBY_CONST_ID(variadic_id, "variadic");
+ RUBY_CONST_ID(const_string_id, "const_string");
+ RUBY_CONST_ID(size_t_id, "size_t");
+ RUBY_CONST_ID(ssize_t_id, "ssize_t");
+ RUBY_CONST_ID(ptrdiff_t_id, "ptrdiff_t");
+ RUBY_CONST_ID(intptr_t_id, "intptr_t");
+ RUBY_CONST_ID(uintptr_t_id, "uintptr_t");
+ if (type_id == void_id) {
+ return INT2NUM(TYPE_VOID);
+ }
+ else if (type_id == voidp_id) {
+ return INT2NUM(TYPE_VOIDP);
+ }
+ else if (type_id == char_id) {
+ return INT2NUM(TYPE_CHAR);
+ }
+ else if (type_id == short_id) {
+ return INT2NUM(TYPE_SHORT);
+ }
+ else if (type_id == int_id) {
+ return INT2NUM(TYPE_INT);
+ }
+ else if (type_id == long_id) {
+ return INT2NUM(TYPE_LONG);
+ }
+#ifdef TYPE_LONG_LONG
+ else if (type_id == long_long_id) {
+ return INT2NUM(TYPE_LONG_LONG);
+ }
+#endif
+#ifdef TYPE_INT8_T
+ else if (type_id == int8_t_id) {
+ return INT2NUM(TYPE_INT8_T);
+ }
+#endif
+#ifdef TYPE_INT16_T
+ else if (type_id == int16_t_id) {
+ return INT2NUM(TYPE_INT16_T);
+ }
+#endif
+#ifdef TYPE_INT32_T
+ else if (type_id == int32_t_id) {
+ return INT2NUM(TYPE_INT32_T);
+ }
+#endif
+#ifdef TYPE_INT64_T
+ else if (type_id == int64_t_id) {
+ return INT2NUM(TYPE_INT64_T);
+ }
+#endif
+ else if (type_id == float_id) {
+ return INT2NUM(TYPE_FLOAT);
+ }
+ else if (type_id == double_id) {
+ return INT2NUM(TYPE_DOUBLE);
+ }
+ else if (type_id == variadic_id) {
+ return INT2NUM(TYPE_VARIADIC);
+ }
+ else if (type_id == const_string_id) {
+ return INT2NUM(TYPE_CONST_STRING);
+ }
+ else if (type_id == size_t_id) {
+ return INT2NUM(TYPE_SIZE_T);
+ }
+ else if (type_id == ssize_t_id) {
+ return INT2NUM(TYPE_SSIZE_T);
+ }
+ else if (type_id == ptrdiff_t_id) {
+ return INT2NUM(TYPE_PTRDIFF_T);
+ }
+ else if (type_id == intptr_t_id) {
+ return INT2NUM(TYPE_INTPTR_T);
+ }
+ else if (type_id == uintptr_t_id) {
+ return INT2NUM(TYPE_UINTPTR_T);
+ }
+ else {
+ type = original_type;
+ }
+ }
+
+ return rb_to_int(type);
+}
+
ffi_type *
-int_to_ffi_type(int type)
+rb_fiddle_int_to_ffi_type(int type)
{
int signed_p = 1;
@@ -33,66 +185,90 @@ int_to_ffi_type(int type)
return &ffi_type_float;
case TYPE_DOUBLE:
return &ffi_type_double;
+ case TYPE_CONST_STRING:
+ return &ffi_type_pointer;
default:
rb_raise(rb_eRuntimeError, "unknown type %d", type);
}
return &ffi_type_pointer;
}
+ffi_type *
+int_to_ffi_type(int type)
+{
+ return rb_fiddle_int_to_ffi_type(type);
+}
+
void
-value_to_generic(int type, VALUE src, fiddle_generic * dst)
+rb_fiddle_value_to_generic(int type, VALUE *src, fiddle_generic *dst)
{
switch (type) {
case TYPE_VOID:
break;
case TYPE_VOIDP:
- dst->pointer = NUM2PTR(rb_Integer(src));
+ dst->pointer = NUM2PTR(rb_Integer(*src));
break;
case TYPE_CHAR:
- dst->schar = (signed char)NUM2INT(src);
+ dst->schar = (signed char)NUM2INT(*src);
break;
- case -TYPE_CHAR:
- dst->uchar = (unsigned char)NUM2UINT(src);
+ case TYPE_UCHAR:
+ dst->uchar = (unsigned char)NUM2UINT(*src);
break;
case TYPE_SHORT:
- dst->sshort = (unsigned short)NUM2INT(src);
+ dst->sshort = (unsigned short)NUM2INT(*src);
break;
- case -TYPE_SHORT:
- dst->sshort = (signed short)NUM2UINT(src);
+ case TYPE_USHORT:
+ dst->sshort = (signed short)NUM2UINT(*src);
break;
case TYPE_INT:
- dst->sint = NUM2INT(src);
+ dst->sint = NUM2INT(*src);
break;
- case -TYPE_INT:
- dst->uint = NUM2UINT(src);
+ case TYPE_UINT:
+ dst->uint = NUM2UINT(*src);
break;
case TYPE_LONG:
- dst->slong = NUM2LONG(src);
+ dst->slong = NUM2LONG(*src);
break;
- case -TYPE_LONG:
- dst->ulong = NUM2ULONG(src);
+ case TYPE_ULONG:
+ dst->ulong = NUM2ULONG(*src);
break;
#if HAVE_LONG_LONG
case TYPE_LONG_LONG:
- dst->slong_long = NUM2LL(src);
+ dst->slong_long = NUM2LL(*src);
break;
- case -TYPE_LONG_LONG:
- dst->ulong_long = NUM2ULL(src);
+ case TYPE_ULONG_LONG:
+ dst->ulong_long = NUM2ULL(*src);
break;
#endif
case TYPE_FLOAT:
- dst->ffloat = (float)NUM2DBL(src);
+ dst->ffloat = (float)NUM2DBL(*src);
break;
case TYPE_DOUBLE:
- dst->ddouble = NUM2DBL(src);
+ dst->ddouble = NUM2DBL(*src);
+ break;
+ case TYPE_CONST_STRING:
+ if (NIL_P(*src)) {
+ dst->pointer = NULL;
+ }
+ else {
+ dst->pointer = rb_string_value_cstr(src);
+ }
break;
default:
rb_raise(rb_eRuntimeError, "unknown type %d", type);
}
}
+void
+value_to_generic(int type, VALUE src, fiddle_generic *dst)
+{
+ /* src isn't safe from GC when type is TYPE_CONST_STRING and src
+ * isn't String. */
+ rb_fiddle_value_to_generic(type, &src, dst);
+}
+
VALUE
-generic_to_value(VALUE rettype, fiddle_generic retval)
+rb_fiddle_generic_to_value(VALUE rettype, fiddle_generic retval)
{
int type = NUM2INT(rettype);
VALUE cPointer;
@@ -107,30 +283,37 @@ generic_to_value(VALUE rettype, fiddle_generic retval)
PTR2NUM((void *)retval.pointer));
case TYPE_CHAR:
return INT2NUM((signed char)retval.fffi_sarg);
- case -TYPE_CHAR:
+ case TYPE_UCHAR:
return INT2NUM((unsigned char)retval.fffi_arg);
case TYPE_SHORT:
return INT2NUM((signed short)retval.fffi_sarg);
- case -TYPE_SHORT:
+ case TYPE_USHORT:
return INT2NUM((unsigned short)retval.fffi_arg);
case TYPE_INT:
return INT2NUM((signed int)retval.fffi_sarg);
- case -TYPE_INT:
+ case TYPE_UINT:
return UINT2NUM((unsigned int)retval.fffi_arg);
case TYPE_LONG:
return LONG2NUM(retval.slong);
- case -TYPE_LONG:
+ case TYPE_ULONG:
return ULONG2NUM(retval.ulong);
#if HAVE_LONG_LONG
case TYPE_LONG_LONG:
return LL2NUM(retval.slong_long);
- case -TYPE_LONG_LONG:
+ case TYPE_ULONG_LONG:
return ULL2NUM(retval.ulong_long);
#endif
case TYPE_FLOAT:
return rb_float_new(retval.ffloat);
case TYPE_DOUBLE:
return rb_float_new(retval.ddouble);
+ case TYPE_CONST_STRING:
+ if (retval.pointer) {
+ return rb_str_new_cstr(retval.pointer);
+ }
+ else {
+ return Qnil;
+ }
default:
rb_raise(rb_eRuntimeError, "unknown type %d", type);
}
@@ -138,4 +321,10 @@ generic_to_value(VALUE rettype, fiddle_generic retval)
UNREACHABLE;
}
+VALUE
+generic_to_value(VALUE rettype, fiddle_generic retval)
+{
+ return rb_fiddle_generic_to_value(rettype, retval);
+}
+
/* vim: set noet sw=4 sts=4 */
diff --git a/ext/fiddle/conversions.h b/ext/fiddle/conversions.h
index cbc610bad2..c7c12a9234 100644
--- a/ext/fiddle/conversions.h
+++ b/ext/fiddle/conversions.h
@@ -24,13 +24,22 @@ typedef union
void * pointer; /* ffi_type_pointer */
} fiddle_generic;
+VALUE rb_fiddle_type_ensure(VALUE type);
+ffi_type * rb_fiddle_int_to_ffi_type(int type);
+void rb_fiddle_value_to_generic(int type, VALUE *src, fiddle_generic *dst);
+VALUE rb_fiddle_generic_to_value(VALUE rettype, fiddle_generic retval);
+
+/* Deprecated. Use rb_fiddle_*() version. */
ffi_type * int_to_ffi_type(int type);
-void value_to_generic(int type, VALUE src, fiddle_generic * dst);
+void value_to_generic(int type, VALUE src, fiddle_generic *dst);
VALUE generic_to_value(VALUE rettype, fiddle_generic retval);
-#define VALUE2GENERIC(_type, _src, _dst) value_to_generic((_type), (_src), (_dst))
-#define INT2FFI_TYPE(_type) int_to_ffi_type(_type)
-#define GENERIC2VALUE(_type, _retval) generic_to_value((_type), (_retval))
+#define VALUE2GENERIC(_type, _src, _dst) \
+ rb_fiddle_value_to_generic((_type), &(_src), (_dst))
+#define INT2FFI_TYPE(_type) \
+ rb_fiddle_int_to_ffi_type(_type)
+#define GENERIC2VALUE(_type, _retval) \
+ rb_fiddle_generic_to_value((_type), (_retval))
#if SIZEOF_VOIDP == SIZEOF_LONG
# define PTR2NUM(x) (LONG2NUM((long)(x)))
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
index 5ed745fa0f..d6a053f05b 100644
--- a/ext/fiddle/depend
+++ b/ext/fiddle/depend
@@ -57,8 +57,156 @@ closure.o: $(arch_hdrdir)/ruby/config.h
closure.o: $(hdrdir)/ruby.h
closure.o: $(hdrdir)/ruby/assert.h
closure.o: $(hdrdir)/ruby/backward.h
+closure.o: $(hdrdir)/ruby/backward/2/assume.h
+closure.o: $(hdrdir)/ruby/backward/2/attributes.h
+closure.o: $(hdrdir)/ruby/backward/2/bool.h
+closure.o: $(hdrdir)/ruby/backward/2/inttypes.h
+closure.o: $(hdrdir)/ruby/backward/2/limits.h
+closure.o: $(hdrdir)/ruby/backward/2/long_long.h
+closure.o: $(hdrdir)/ruby/backward/2/stdalign.h
+closure.o: $(hdrdir)/ruby/backward/2/stdarg.h
closure.o: $(hdrdir)/ruby/defines.h
closure.o: $(hdrdir)/ruby/intern.h
+closure.o: $(hdrdir)/ruby/internal/abi.h
+closure.o: $(hdrdir)/ruby/internal/anyargs.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+closure.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+closure.o: $(hdrdir)/ruby/internal/assume.h
+closure.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+closure.o: $(hdrdir)/ruby/internal/attr/artificial.h
+closure.o: $(hdrdir)/ruby/internal/attr/cold.h
+closure.o: $(hdrdir)/ruby/internal/attr/const.h
+closure.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+closure.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+closure.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+closure.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+closure.o: $(hdrdir)/ruby/internal/attr/error.h
+closure.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+closure.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+closure.o: $(hdrdir)/ruby/internal/attr/format.h
+closure.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+closure.o: $(hdrdir)/ruby/internal/attr/noalias.h
+closure.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+closure.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+closure.o: $(hdrdir)/ruby/internal/attr/noinline.h
+closure.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+closure.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+closure.o: $(hdrdir)/ruby/internal/attr/pure.h
+closure.o: $(hdrdir)/ruby/internal/attr/restrict.h
+closure.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+closure.o: $(hdrdir)/ruby/internal/attr/warning.h
+closure.o: $(hdrdir)/ruby/internal/attr/weakref.h
+closure.o: $(hdrdir)/ruby/internal/cast.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+closure.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+closure.o: $(hdrdir)/ruby/internal/compiler_since.h
+closure.o: $(hdrdir)/ruby/internal/config.h
+closure.o: $(hdrdir)/ruby/internal/constant_p.h
+closure.o: $(hdrdir)/ruby/internal/core.h
+closure.o: $(hdrdir)/ruby/internal/core/rarray.h
+closure.o: $(hdrdir)/ruby/internal/core/rbasic.h
+closure.o: $(hdrdir)/ruby/internal/core/rbignum.h
+closure.o: $(hdrdir)/ruby/internal/core/rclass.h
+closure.o: $(hdrdir)/ruby/internal/core/rdata.h
+closure.o: $(hdrdir)/ruby/internal/core/rfile.h
+closure.o: $(hdrdir)/ruby/internal/core/rhash.h
+closure.o: $(hdrdir)/ruby/internal/core/robject.h
+closure.o: $(hdrdir)/ruby/internal/core/rregexp.h
+closure.o: $(hdrdir)/ruby/internal/core/rstring.h
+closure.o: $(hdrdir)/ruby/internal/core/rstruct.h
+closure.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+closure.o: $(hdrdir)/ruby/internal/ctype.h
+closure.o: $(hdrdir)/ruby/internal/dllexport.h
+closure.o: $(hdrdir)/ruby/internal/dosish.h
+closure.o: $(hdrdir)/ruby/internal/error.h
+closure.o: $(hdrdir)/ruby/internal/eval.h
+closure.o: $(hdrdir)/ruby/internal/event.h
+closure.o: $(hdrdir)/ruby/internal/fl_type.h
+closure.o: $(hdrdir)/ruby/internal/gc.h
+closure.o: $(hdrdir)/ruby/internal/glob.h
+closure.o: $(hdrdir)/ruby/internal/globals.h
+closure.o: $(hdrdir)/ruby/internal/has/attribute.h
+closure.o: $(hdrdir)/ruby/internal/has/builtin.h
+closure.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+closure.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+closure.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+closure.o: $(hdrdir)/ruby/internal/has/extension.h
+closure.o: $(hdrdir)/ruby/internal/has/feature.h
+closure.o: $(hdrdir)/ruby/internal/has/warning.h
+closure.o: $(hdrdir)/ruby/internal/intern/array.h
+closure.o: $(hdrdir)/ruby/internal/intern/bignum.h
+closure.o: $(hdrdir)/ruby/internal/intern/class.h
+closure.o: $(hdrdir)/ruby/internal/intern/compar.h
+closure.o: $(hdrdir)/ruby/internal/intern/complex.h
+closure.o: $(hdrdir)/ruby/internal/intern/cont.h
+closure.o: $(hdrdir)/ruby/internal/intern/dir.h
+closure.o: $(hdrdir)/ruby/internal/intern/enum.h
+closure.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+closure.o: $(hdrdir)/ruby/internal/intern/error.h
+closure.o: $(hdrdir)/ruby/internal/intern/eval.h
+closure.o: $(hdrdir)/ruby/internal/intern/file.h
+closure.o: $(hdrdir)/ruby/internal/intern/gc.h
+closure.o: $(hdrdir)/ruby/internal/intern/hash.h
+closure.o: $(hdrdir)/ruby/internal/intern/io.h
+closure.o: $(hdrdir)/ruby/internal/intern/load.h
+closure.o: $(hdrdir)/ruby/internal/intern/marshal.h
+closure.o: $(hdrdir)/ruby/internal/intern/numeric.h
+closure.o: $(hdrdir)/ruby/internal/intern/object.h
+closure.o: $(hdrdir)/ruby/internal/intern/parse.h
+closure.o: $(hdrdir)/ruby/internal/intern/proc.h
+closure.o: $(hdrdir)/ruby/internal/intern/process.h
+closure.o: $(hdrdir)/ruby/internal/intern/random.h
+closure.o: $(hdrdir)/ruby/internal/intern/range.h
+closure.o: $(hdrdir)/ruby/internal/intern/rational.h
+closure.o: $(hdrdir)/ruby/internal/intern/re.h
+closure.o: $(hdrdir)/ruby/internal/intern/ruby.h
+closure.o: $(hdrdir)/ruby/internal/intern/select.h
+closure.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+closure.o: $(hdrdir)/ruby/internal/intern/signal.h
+closure.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+closure.o: $(hdrdir)/ruby/internal/intern/string.h
+closure.o: $(hdrdir)/ruby/internal/intern/struct.h
+closure.o: $(hdrdir)/ruby/internal/intern/thread.h
+closure.o: $(hdrdir)/ruby/internal/intern/time.h
+closure.o: $(hdrdir)/ruby/internal/intern/variable.h
+closure.o: $(hdrdir)/ruby/internal/intern/vm.h
+closure.o: $(hdrdir)/ruby/internal/interpreter.h
+closure.o: $(hdrdir)/ruby/internal/iterator.h
+closure.o: $(hdrdir)/ruby/internal/memory.h
+closure.o: $(hdrdir)/ruby/internal/method.h
+closure.o: $(hdrdir)/ruby/internal/module.h
+closure.o: $(hdrdir)/ruby/internal/newobj.h
+closure.o: $(hdrdir)/ruby/internal/rgengc.h
+closure.o: $(hdrdir)/ruby/internal/scan_args.h
+closure.o: $(hdrdir)/ruby/internal/special_consts.h
+closure.o: $(hdrdir)/ruby/internal/static_assert.h
+closure.o: $(hdrdir)/ruby/internal/stdalign.h
+closure.o: $(hdrdir)/ruby/internal/stdbool.h
+closure.o: $(hdrdir)/ruby/internal/symbol.h
+closure.o: $(hdrdir)/ruby/internal/value.h
+closure.o: $(hdrdir)/ruby/internal/value_type.h
+closure.o: $(hdrdir)/ruby/internal/variable.h
+closure.o: $(hdrdir)/ruby/internal/warning_push.h
+closure.o: $(hdrdir)/ruby/internal/xmalloc.h
closure.o: $(hdrdir)/ruby/missing.h
closure.o: $(hdrdir)/ruby/ruby.h
closure.o: $(hdrdir)/ruby/st.h
@@ -74,8 +222,156 @@ conversions.o: $(arch_hdrdir)/ruby/config.h
conversions.o: $(hdrdir)/ruby.h
conversions.o: $(hdrdir)/ruby/assert.h
conversions.o: $(hdrdir)/ruby/backward.h
+conversions.o: $(hdrdir)/ruby/backward/2/assume.h
+conversions.o: $(hdrdir)/ruby/backward/2/attributes.h
+conversions.o: $(hdrdir)/ruby/backward/2/bool.h
+conversions.o: $(hdrdir)/ruby/backward/2/inttypes.h
+conversions.o: $(hdrdir)/ruby/backward/2/limits.h
+conversions.o: $(hdrdir)/ruby/backward/2/long_long.h
+conversions.o: $(hdrdir)/ruby/backward/2/stdalign.h
+conversions.o: $(hdrdir)/ruby/backward/2/stdarg.h
conversions.o: $(hdrdir)/ruby/defines.h
conversions.o: $(hdrdir)/ruby/intern.h
+conversions.o: $(hdrdir)/ruby/internal/abi.h
+conversions.o: $(hdrdir)/ruby/internal/anyargs.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+conversions.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+conversions.o: $(hdrdir)/ruby/internal/assume.h
+conversions.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+conversions.o: $(hdrdir)/ruby/internal/attr/artificial.h
+conversions.o: $(hdrdir)/ruby/internal/attr/cold.h
+conversions.o: $(hdrdir)/ruby/internal/attr/const.h
+conversions.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+conversions.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+conversions.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+conversions.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+conversions.o: $(hdrdir)/ruby/internal/attr/error.h
+conversions.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+conversions.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+conversions.o: $(hdrdir)/ruby/internal/attr/format.h
+conversions.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+conversions.o: $(hdrdir)/ruby/internal/attr/noalias.h
+conversions.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+conversions.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+conversions.o: $(hdrdir)/ruby/internal/attr/noinline.h
+conversions.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+conversions.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+conversions.o: $(hdrdir)/ruby/internal/attr/pure.h
+conversions.o: $(hdrdir)/ruby/internal/attr/restrict.h
+conversions.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+conversions.o: $(hdrdir)/ruby/internal/attr/warning.h
+conversions.o: $(hdrdir)/ruby/internal/attr/weakref.h
+conversions.o: $(hdrdir)/ruby/internal/cast.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+conversions.o: $(hdrdir)/ruby/internal/compiler_since.h
+conversions.o: $(hdrdir)/ruby/internal/config.h
+conversions.o: $(hdrdir)/ruby/internal/constant_p.h
+conversions.o: $(hdrdir)/ruby/internal/core.h
+conversions.o: $(hdrdir)/ruby/internal/core/rarray.h
+conversions.o: $(hdrdir)/ruby/internal/core/rbasic.h
+conversions.o: $(hdrdir)/ruby/internal/core/rbignum.h
+conversions.o: $(hdrdir)/ruby/internal/core/rclass.h
+conversions.o: $(hdrdir)/ruby/internal/core/rdata.h
+conversions.o: $(hdrdir)/ruby/internal/core/rfile.h
+conversions.o: $(hdrdir)/ruby/internal/core/rhash.h
+conversions.o: $(hdrdir)/ruby/internal/core/robject.h
+conversions.o: $(hdrdir)/ruby/internal/core/rregexp.h
+conversions.o: $(hdrdir)/ruby/internal/core/rstring.h
+conversions.o: $(hdrdir)/ruby/internal/core/rstruct.h
+conversions.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+conversions.o: $(hdrdir)/ruby/internal/ctype.h
+conversions.o: $(hdrdir)/ruby/internal/dllexport.h
+conversions.o: $(hdrdir)/ruby/internal/dosish.h
+conversions.o: $(hdrdir)/ruby/internal/error.h
+conversions.o: $(hdrdir)/ruby/internal/eval.h
+conversions.o: $(hdrdir)/ruby/internal/event.h
+conversions.o: $(hdrdir)/ruby/internal/fl_type.h
+conversions.o: $(hdrdir)/ruby/internal/gc.h
+conversions.o: $(hdrdir)/ruby/internal/glob.h
+conversions.o: $(hdrdir)/ruby/internal/globals.h
+conversions.o: $(hdrdir)/ruby/internal/has/attribute.h
+conversions.o: $(hdrdir)/ruby/internal/has/builtin.h
+conversions.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+conversions.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+conversions.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+conversions.o: $(hdrdir)/ruby/internal/has/extension.h
+conversions.o: $(hdrdir)/ruby/internal/has/feature.h
+conversions.o: $(hdrdir)/ruby/internal/has/warning.h
+conversions.o: $(hdrdir)/ruby/internal/intern/array.h
+conversions.o: $(hdrdir)/ruby/internal/intern/bignum.h
+conversions.o: $(hdrdir)/ruby/internal/intern/class.h
+conversions.o: $(hdrdir)/ruby/internal/intern/compar.h
+conversions.o: $(hdrdir)/ruby/internal/intern/complex.h
+conversions.o: $(hdrdir)/ruby/internal/intern/cont.h
+conversions.o: $(hdrdir)/ruby/internal/intern/dir.h
+conversions.o: $(hdrdir)/ruby/internal/intern/enum.h
+conversions.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+conversions.o: $(hdrdir)/ruby/internal/intern/error.h
+conversions.o: $(hdrdir)/ruby/internal/intern/eval.h
+conversions.o: $(hdrdir)/ruby/internal/intern/file.h
+conversions.o: $(hdrdir)/ruby/internal/intern/gc.h
+conversions.o: $(hdrdir)/ruby/internal/intern/hash.h
+conversions.o: $(hdrdir)/ruby/internal/intern/io.h
+conversions.o: $(hdrdir)/ruby/internal/intern/load.h
+conversions.o: $(hdrdir)/ruby/internal/intern/marshal.h
+conversions.o: $(hdrdir)/ruby/internal/intern/numeric.h
+conversions.o: $(hdrdir)/ruby/internal/intern/object.h
+conversions.o: $(hdrdir)/ruby/internal/intern/parse.h
+conversions.o: $(hdrdir)/ruby/internal/intern/proc.h
+conversions.o: $(hdrdir)/ruby/internal/intern/process.h
+conversions.o: $(hdrdir)/ruby/internal/intern/random.h
+conversions.o: $(hdrdir)/ruby/internal/intern/range.h
+conversions.o: $(hdrdir)/ruby/internal/intern/rational.h
+conversions.o: $(hdrdir)/ruby/internal/intern/re.h
+conversions.o: $(hdrdir)/ruby/internal/intern/ruby.h
+conversions.o: $(hdrdir)/ruby/internal/intern/select.h
+conversions.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+conversions.o: $(hdrdir)/ruby/internal/intern/signal.h
+conversions.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+conversions.o: $(hdrdir)/ruby/internal/intern/string.h
+conversions.o: $(hdrdir)/ruby/internal/intern/struct.h
+conversions.o: $(hdrdir)/ruby/internal/intern/thread.h
+conversions.o: $(hdrdir)/ruby/internal/intern/time.h
+conversions.o: $(hdrdir)/ruby/internal/intern/variable.h
+conversions.o: $(hdrdir)/ruby/internal/intern/vm.h
+conversions.o: $(hdrdir)/ruby/internal/interpreter.h
+conversions.o: $(hdrdir)/ruby/internal/iterator.h
+conversions.o: $(hdrdir)/ruby/internal/memory.h
+conversions.o: $(hdrdir)/ruby/internal/method.h
+conversions.o: $(hdrdir)/ruby/internal/module.h
+conversions.o: $(hdrdir)/ruby/internal/newobj.h
+conversions.o: $(hdrdir)/ruby/internal/rgengc.h
+conversions.o: $(hdrdir)/ruby/internal/scan_args.h
+conversions.o: $(hdrdir)/ruby/internal/special_consts.h
+conversions.o: $(hdrdir)/ruby/internal/static_assert.h
+conversions.o: $(hdrdir)/ruby/internal/stdalign.h
+conversions.o: $(hdrdir)/ruby/internal/stdbool.h
+conversions.o: $(hdrdir)/ruby/internal/symbol.h
+conversions.o: $(hdrdir)/ruby/internal/value.h
+conversions.o: $(hdrdir)/ruby/internal/value_type.h
+conversions.o: $(hdrdir)/ruby/internal/variable.h
+conversions.o: $(hdrdir)/ruby/internal/warning_push.h
+conversions.o: $(hdrdir)/ruby/internal/xmalloc.h
conversions.o: $(hdrdir)/ruby/missing.h
conversions.o: $(hdrdir)/ruby/ruby.h
conversions.o: $(hdrdir)/ruby/st.h
@@ -90,8 +386,156 @@ fiddle.o: $(arch_hdrdir)/ruby/config.h
fiddle.o: $(hdrdir)/ruby.h
fiddle.o: $(hdrdir)/ruby/assert.h
fiddle.o: $(hdrdir)/ruby/backward.h
+fiddle.o: $(hdrdir)/ruby/backward/2/assume.h
+fiddle.o: $(hdrdir)/ruby/backward/2/attributes.h
+fiddle.o: $(hdrdir)/ruby/backward/2/bool.h
+fiddle.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fiddle.o: $(hdrdir)/ruby/backward/2/limits.h
+fiddle.o: $(hdrdir)/ruby/backward/2/long_long.h
+fiddle.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fiddle.o: $(hdrdir)/ruby/backward/2/stdarg.h
fiddle.o: $(hdrdir)/ruby/defines.h
fiddle.o: $(hdrdir)/ruby/intern.h
+fiddle.o: $(hdrdir)/ruby/internal/abi.h
+fiddle.o: $(hdrdir)/ruby/internal/anyargs.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+fiddle.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+fiddle.o: $(hdrdir)/ruby/internal/assume.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/artificial.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/cold.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/const.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/error.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/format.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/noalias.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/noinline.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/pure.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/restrict.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/warning.h
+fiddle.o: $(hdrdir)/ruby/internal/attr/weakref.h
+fiddle.o: $(hdrdir)/ruby/internal/cast.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+fiddle.o: $(hdrdir)/ruby/internal/compiler_since.h
+fiddle.o: $(hdrdir)/ruby/internal/config.h
+fiddle.o: $(hdrdir)/ruby/internal/constant_p.h
+fiddle.o: $(hdrdir)/ruby/internal/core.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rarray.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rbasic.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rbignum.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rclass.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rdata.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rfile.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rhash.h
+fiddle.o: $(hdrdir)/ruby/internal/core/robject.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rregexp.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rstring.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rstruct.h
+fiddle.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+fiddle.o: $(hdrdir)/ruby/internal/ctype.h
+fiddle.o: $(hdrdir)/ruby/internal/dllexport.h
+fiddle.o: $(hdrdir)/ruby/internal/dosish.h
+fiddle.o: $(hdrdir)/ruby/internal/error.h
+fiddle.o: $(hdrdir)/ruby/internal/eval.h
+fiddle.o: $(hdrdir)/ruby/internal/event.h
+fiddle.o: $(hdrdir)/ruby/internal/fl_type.h
+fiddle.o: $(hdrdir)/ruby/internal/gc.h
+fiddle.o: $(hdrdir)/ruby/internal/glob.h
+fiddle.o: $(hdrdir)/ruby/internal/globals.h
+fiddle.o: $(hdrdir)/ruby/internal/has/attribute.h
+fiddle.o: $(hdrdir)/ruby/internal/has/builtin.h
+fiddle.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+fiddle.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+fiddle.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+fiddle.o: $(hdrdir)/ruby/internal/has/extension.h
+fiddle.o: $(hdrdir)/ruby/internal/has/feature.h
+fiddle.o: $(hdrdir)/ruby/internal/has/warning.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/array.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/bignum.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/class.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/compar.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/complex.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/cont.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/dir.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/enum.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/error.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/eval.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/file.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/gc.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/hash.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/io.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/load.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/marshal.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/numeric.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/object.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/parse.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/proc.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/process.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/random.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/range.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/rational.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/re.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/ruby.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/select.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/signal.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/string.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/struct.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/thread.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/time.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/variable.h
+fiddle.o: $(hdrdir)/ruby/internal/intern/vm.h
+fiddle.o: $(hdrdir)/ruby/internal/interpreter.h
+fiddle.o: $(hdrdir)/ruby/internal/iterator.h
+fiddle.o: $(hdrdir)/ruby/internal/memory.h
+fiddle.o: $(hdrdir)/ruby/internal/method.h
+fiddle.o: $(hdrdir)/ruby/internal/module.h
+fiddle.o: $(hdrdir)/ruby/internal/newobj.h
+fiddle.o: $(hdrdir)/ruby/internal/rgengc.h
+fiddle.o: $(hdrdir)/ruby/internal/scan_args.h
+fiddle.o: $(hdrdir)/ruby/internal/special_consts.h
+fiddle.o: $(hdrdir)/ruby/internal/static_assert.h
+fiddle.o: $(hdrdir)/ruby/internal/stdalign.h
+fiddle.o: $(hdrdir)/ruby/internal/stdbool.h
+fiddle.o: $(hdrdir)/ruby/internal/symbol.h
+fiddle.o: $(hdrdir)/ruby/internal/value.h
+fiddle.o: $(hdrdir)/ruby/internal/value_type.h
+fiddle.o: $(hdrdir)/ruby/internal/variable.h
+fiddle.o: $(hdrdir)/ruby/internal/warning_push.h
+fiddle.o: $(hdrdir)/ruby/internal/xmalloc.h
fiddle.o: $(hdrdir)/ruby/missing.h
fiddle.o: $(hdrdir)/ruby/ruby.h
fiddle.o: $(hdrdir)/ruby/st.h
@@ -106,8 +550,156 @@ function.o: $(arch_hdrdir)/ruby/config.h
function.o: $(hdrdir)/ruby.h
function.o: $(hdrdir)/ruby/assert.h
function.o: $(hdrdir)/ruby/backward.h
+function.o: $(hdrdir)/ruby/backward/2/assume.h
+function.o: $(hdrdir)/ruby/backward/2/attributes.h
+function.o: $(hdrdir)/ruby/backward/2/bool.h
+function.o: $(hdrdir)/ruby/backward/2/inttypes.h
+function.o: $(hdrdir)/ruby/backward/2/limits.h
+function.o: $(hdrdir)/ruby/backward/2/long_long.h
+function.o: $(hdrdir)/ruby/backward/2/stdalign.h
+function.o: $(hdrdir)/ruby/backward/2/stdarg.h
function.o: $(hdrdir)/ruby/defines.h
function.o: $(hdrdir)/ruby/intern.h
+function.o: $(hdrdir)/ruby/internal/abi.h
+function.o: $(hdrdir)/ruby/internal/anyargs.h
+function.o: $(hdrdir)/ruby/internal/arithmetic.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+function.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+function.o: $(hdrdir)/ruby/internal/assume.h
+function.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+function.o: $(hdrdir)/ruby/internal/attr/artificial.h
+function.o: $(hdrdir)/ruby/internal/attr/cold.h
+function.o: $(hdrdir)/ruby/internal/attr/const.h
+function.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+function.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+function.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+function.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+function.o: $(hdrdir)/ruby/internal/attr/error.h
+function.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+function.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+function.o: $(hdrdir)/ruby/internal/attr/format.h
+function.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+function.o: $(hdrdir)/ruby/internal/attr/noalias.h
+function.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+function.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+function.o: $(hdrdir)/ruby/internal/attr/noinline.h
+function.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+function.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+function.o: $(hdrdir)/ruby/internal/attr/pure.h
+function.o: $(hdrdir)/ruby/internal/attr/restrict.h
+function.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+function.o: $(hdrdir)/ruby/internal/attr/warning.h
+function.o: $(hdrdir)/ruby/internal/attr/weakref.h
+function.o: $(hdrdir)/ruby/internal/cast.h
+function.o: $(hdrdir)/ruby/internal/compiler_is.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+function.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+function.o: $(hdrdir)/ruby/internal/compiler_since.h
+function.o: $(hdrdir)/ruby/internal/config.h
+function.o: $(hdrdir)/ruby/internal/constant_p.h
+function.o: $(hdrdir)/ruby/internal/core.h
+function.o: $(hdrdir)/ruby/internal/core/rarray.h
+function.o: $(hdrdir)/ruby/internal/core/rbasic.h
+function.o: $(hdrdir)/ruby/internal/core/rbignum.h
+function.o: $(hdrdir)/ruby/internal/core/rclass.h
+function.o: $(hdrdir)/ruby/internal/core/rdata.h
+function.o: $(hdrdir)/ruby/internal/core/rfile.h
+function.o: $(hdrdir)/ruby/internal/core/rhash.h
+function.o: $(hdrdir)/ruby/internal/core/robject.h
+function.o: $(hdrdir)/ruby/internal/core/rregexp.h
+function.o: $(hdrdir)/ruby/internal/core/rstring.h
+function.o: $(hdrdir)/ruby/internal/core/rstruct.h
+function.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+function.o: $(hdrdir)/ruby/internal/ctype.h
+function.o: $(hdrdir)/ruby/internal/dllexport.h
+function.o: $(hdrdir)/ruby/internal/dosish.h
+function.o: $(hdrdir)/ruby/internal/error.h
+function.o: $(hdrdir)/ruby/internal/eval.h
+function.o: $(hdrdir)/ruby/internal/event.h
+function.o: $(hdrdir)/ruby/internal/fl_type.h
+function.o: $(hdrdir)/ruby/internal/gc.h
+function.o: $(hdrdir)/ruby/internal/glob.h
+function.o: $(hdrdir)/ruby/internal/globals.h
+function.o: $(hdrdir)/ruby/internal/has/attribute.h
+function.o: $(hdrdir)/ruby/internal/has/builtin.h
+function.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+function.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+function.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+function.o: $(hdrdir)/ruby/internal/has/extension.h
+function.o: $(hdrdir)/ruby/internal/has/feature.h
+function.o: $(hdrdir)/ruby/internal/has/warning.h
+function.o: $(hdrdir)/ruby/internal/intern/array.h
+function.o: $(hdrdir)/ruby/internal/intern/bignum.h
+function.o: $(hdrdir)/ruby/internal/intern/class.h
+function.o: $(hdrdir)/ruby/internal/intern/compar.h
+function.o: $(hdrdir)/ruby/internal/intern/complex.h
+function.o: $(hdrdir)/ruby/internal/intern/cont.h
+function.o: $(hdrdir)/ruby/internal/intern/dir.h
+function.o: $(hdrdir)/ruby/internal/intern/enum.h
+function.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+function.o: $(hdrdir)/ruby/internal/intern/error.h
+function.o: $(hdrdir)/ruby/internal/intern/eval.h
+function.o: $(hdrdir)/ruby/internal/intern/file.h
+function.o: $(hdrdir)/ruby/internal/intern/gc.h
+function.o: $(hdrdir)/ruby/internal/intern/hash.h
+function.o: $(hdrdir)/ruby/internal/intern/io.h
+function.o: $(hdrdir)/ruby/internal/intern/load.h
+function.o: $(hdrdir)/ruby/internal/intern/marshal.h
+function.o: $(hdrdir)/ruby/internal/intern/numeric.h
+function.o: $(hdrdir)/ruby/internal/intern/object.h
+function.o: $(hdrdir)/ruby/internal/intern/parse.h
+function.o: $(hdrdir)/ruby/internal/intern/proc.h
+function.o: $(hdrdir)/ruby/internal/intern/process.h
+function.o: $(hdrdir)/ruby/internal/intern/random.h
+function.o: $(hdrdir)/ruby/internal/intern/range.h
+function.o: $(hdrdir)/ruby/internal/intern/rational.h
+function.o: $(hdrdir)/ruby/internal/intern/re.h
+function.o: $(hdrdir)/ruby/internal/intern/ruby.h
+function.o: $(hdrdir)/ruby/internal/intern/select.h
+function.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+function.o: $(hdrdir)/ruby/internal/intern/signal.h
+function.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+function.o: $(hdrdir)/ruby/internal/intern/string.h
+function.o: $(hdrdir)/ruby/internal/intern/struct.h
+function.o: $(hdrdir)/ruby/internal/intern/thread.h
+function.o: $(hdrdir)/ruby/internal/intern/time.h
+function.o: $(hdrdir)/ruby/internal/intern/variable.h
+function.o: $(hdrdir)/ruby/internal/intern/vm.h
+function.o: $(hdrdir)/ruby/internal/interpreter.h
+function.o: $(hdrdir)/ruby/internal/iterator.h
+function.o: $(hdrdir)/ruby/internal/memory.h
+function.o: $(hdrdir)/ruby/internal/method.h
+function.o: $(hdrdir)/ruby/internal/module.h
+function.o: $(hdrdir)/ruby/internal/newobj.h
+function.o: $(hdrdir)/ruby/internal/rgengc.h
+function.o: $(hdrdir)/ruby/internal/scan_args.h
+function.o: $(hdrdir)/ruby/internal/special_consts.h
+function.o: $(hdrdir)/ruby/internal/static_assert.h
+function.o: $(hdrdir)/ruby/internal/stdalign.h
+function.o: $(hdrdir)/ruby/internal/stdbool.h
+function.o: $(hdrdir)/ruby/internal/symbol.h
+function.o: $(hdrdir)/ruby/internal/value.h
+function.o: $(hdrdir)/ruby/internal/value_type.h
+function.o: $(hdrdir)/ruby/internal/variable.h
+function.o: $(hdrdir)/ruby/internal/warning_push.h
+function.o: $(hdrdir)/ruby/internal/xmalloc.h
function.o: $(hdrdir)/ruby/missing.h
function.o: $(hdrdir)/ruby/ruby.h
function.o: $(hdrdir)/ruby/st.h
@@ -123,8 +715,156 @@ handle.o: $(arch_hdrdir)/ruby/config.h
handle.o: $(hdrdir)/ruby.h
handle.o: $(hdrdir)/ruby/assert.h
handle.o: $(hdrdir)/ruby/backward.h
+handle.o: $(hdrdir)/ruby/backward/2/assume.h
+handle.o: $(hdrdir)/ruby/backward/2/attributes.h
+handle.o: $(hdrdir)/ruby/backward/2/bool.h
+handle.o: $(hdrdir)/ruby/backward/2/inttypes.h
+handle.o: $(hdrdir)/ruby/backward/2/limits.h
+handle.o: $(hdrdir)/ruby/backward/2/long_long.h
+handle.o: $(hdrdir)/ruby/backward/2/stdalign.h
+handle.o: $(hdrdir)/ruby/backward/2/stdarg.h
handle.o: $(hdrdir)/ruby/defines.h
handle.o: $(hdrdir)/ruby/intern.h
+handle.o: $(hdrdir)/ruby/internal/abi.h
+handle.o: $(hdrdir)/ruby/internal/anyargs.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+handle.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+handle.o: $(hdrdir)/ruby/internal/assume.h
+handle.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+handle.o: $(hdrdir)/ruby/internal/attr/artificial.h
+handle.o: $(hdrdir)/ruby/internal/attr/cold.h
+handle.o: $(hdrdir)/ruby/internal/attr/const.h
+handle.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+handle.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+handle.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+handle.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+handle.o: $(hdrdir)/ruby/internal/attr/error.h
+handle.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+handle.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+handle.o: $(hdrdir)/ruby/internal/attr/format.h
+handle.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+handle.o: $(hdrdir)/ruby/internal/attr/noalias.h
+handle.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+handle.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+handle.o: $(hdrdir)/ruby/internal/attr/noinline.h
+handle.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+handle.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+handle.o: $(hdrdir)/ruby/internal/attr/pure.h
+handle.o: $(hdrdir)/ruby/internal/attr/restrict.h
+handle.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+handle.o: $(hdrdir)/ruby/internal/attr/warning.h
+handle.o: $(hdrdir)/ruby/internal/attr/weakref.h
+handle.o: $(hdrdir)/ruby/internal/cast.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+handle.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+handle.o: $(hdrdir)/ruby/internal/compiler_since.h
+handle.o: $(hdrdir)/ruby/internal/config.h
+handle.o: $(hdrdir)/ruby/internal/constant_p.h
+handle.o: $(hdrdir)/ruby/internal/core.h
+handle.o: $(hdrdir)/ruby/internal/core/rarray.h
+handle.o: $(hdrdir)/ruby/internal/core/rbasic.h
+handle.o: $(hdrdir)/ruby/internal/core/rbignum.h
+handle.o: $(hdrdir)/ruby/internal/core/rclass.h
+handle.o: $(hdrdir)/ruby/internal/core/rdata.h
+handle.o: $(hdrdir)/ruby/internal/core/rfile.h
+handle.o: $(hdrdir)/ruby/internal/core/rhash.h
+handle.o: $(hdrdir)/ruby/internal/core/robject.h
+handle.o: $(hdrdir)/ruby/internal/core/rregexp.h
+handle.o: $(hdrdir)/ruby/internal/core/rstring.h
+handle.o: $(hdrdir)/ruby/internal/core/rstruct.h
+handle.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+handle.o: $(hdrdir)/ruby/internal/ctype.h
+handle.o: $(hdrdir)/ruby/internal/dllexport.h
+handle.o: $(hdrdir)/ruby/internal/dosish.h
+handle.o: $(hdrdir)/ruby/internal/error.h
+handle.o: $(hdrdir)/ruby/internal/eval.h
+handle.o: $(hdrdir)/ruby/internal/event.h
+handle.o: $(hdrdir)/ruby/internal/fl_type.h
+handle.o: $(hdrdir)/ruby/internal/gc.h
+handle.o: $(hdrdir)/ruby/internal/glob.h
+handle.o: $(hdrdir)/ruby/internal/globals.h
+handle.o: $(hdrdir)/ruby/internal/has/attribute.h
+handle.o: $(hdrdir)/ruby/internal/has/builtin.h
+handle.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+handle.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+handle.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+handle.o: $(hdrdir)/ruby/internal/has/extension.h
+handle.o: $(hdrdir)/ruby/internal/has/feature.h
+handle.o: $(hdrdir)/ruby/internal/has/warning.h
+handle.o: $(hdrdir)/ruby/internal/intern/array.h
+handle.o: $(hdrdir)/ruby/internal/intern/bignum.h
+handle.o: $(hdrdir)/ruby/internal/intern/class.h
+handle.o: $(hdrdir)/ruby/internal/intern/compar.h
+handle.o: $(hdrdir)/ruby/internal/intern/complex.h
+handle.o: $(hdrdir)/ruby/internal/intern/cont.h
+handle.o: $(hdrdir)/ruby/internal/intern/dir.h
+handle.o: $(hdrdir)/ruby/internal/intern/enum.h
+handle.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+handle.o: $(hdrdir)/ruby/internal/intern/error.h
+handle.o: $(hdrdir)/ruby/internal/intern/eval.h
+handle.o: $(hdrdir)/ruby/internal/intern/file.h
+handle.o: $(hdrdir)/ruby/internal/intern/gc.h
+handle.o: $(hdrdir)/ruby/internal/intern/hash.h
+handle.o: $(hdrdir)/ruby/internal/intern/io.h
+handle.o: $(hdrdir)/ruby/internal/intern/load.h
+handle.o: $(hdrdir)/ruby/internal/intern/marshal.h
+handle.o: $(hdrdir)/ruby/internal/intern/numeric.h
+handle.o: $(hdrdir)/ruby/internal/intern/object.h
+handle.o: $(hdrdir)/ruby/internal/intern/parse.h
+handle.o: $(hdrdir)/ruby/internal/intern/proc.h
+handle.o: $(hdrdir)/ruby/internal/intern/process.h
+handle.o: $(hdrdir)/ruby/internal/intern/random.h
+handle.o: $(hdrdir)/ruby/internal/intern/range.h
+handle.o: $(hdrdir)/ruby/internal/intern/rational.h
+handle.o: $(hdrdir)/ruby/internal/intern/re.h
+handle.o: $(hdrdir)/ruby/internal/intern/ruby.h
+handle.o: $(hdrdir)/ruby/internal/intern/select.h
+handle.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+handle.o: $(hdrdir)/ruby/internal/intern/signal.h
+handle.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+handle.o: $(hdrdir)/ruby/internal/intern/string.h
+handle.o: $(hdrdir)/ruby/internal/intern/struct.h
+handle.o: $(hdrdir)/ruby/internal/intern/thread.h
+handle.o: $(hdrdir)/ruby/internal/intern/time.h
+handle.o: $(hdrdir)/ruby/internal/intern/variable.h
+handle.o: $(hdrdir)/ruby/internal/intern/vm.h
+handle.o: $(hdrdir)/ruby/internal/interpreter.h
+handle.o: $(hdrdir)/ruby/internal/iterator.h
+handle.o: $(hdrdir)/ruby/internal/memory.h
+handle.o: $(hdrdir)/ruby/internal/method.h
+handle.o: $(hdrdir)/ruby/internal/module.h
+handle.o: $(hdrdir)/ruby/internal/newobj.h
+handle.o: $(hdrdir)/ruby/internal/rgengc.h
+handle.o: $(hdrdir)/ruby/internal/scan_args.h
+handle.o: $(hdrdir)/ruby/internal/special_consts.h
+handle.o: $(hdrdir)/ruby/internal/static_assert.h
+handle.o: $(hdrdir)/ruby/internal/stdalign.h
+handle.o: $(hdrdir)/ruby/internal/stdbool.h
+handle.o: $(hdrdir)/ruby/internal/symbol.h
+handle.o: $(hdrdir)/ruby/internal/value.h
+handle.o: $(hdrdir)/ruby/internal/value_type.h
+handle.o: $(hdrdir)/ruby/internal/variable.h
+handle.o: $(hdrdir)/ruby/internal/warning_push.h
+handle.o: $(hdrdir)/ruby/internal/xmalloc.h
handle.o: $(hdrdir)/ruby/missing.h
handle.o: $(hdrdir)/ruby/ruby.h
handle.o: $(hdrdir)/ruby/st.h
@@ -134,15 +874,514 @@ handle.o: conversions.h
handle.o: fiddle.h
handle.o: function.h
handle.o: handle.c
+memory_view.o: $(RUBY_EXTCONF_H)
+memory_view.o: $(arch_hdrdir)/ruby/config.h
+memory_view.o: $(hdrdir)/ruby.h
+memory_view.o: $(hdrdir)/ruby/assert.h
+memory_view.o: $(hdrdir)/ruby/backward.h
+memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
+memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
+memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
+memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
+memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
+memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
+memory_view.o: $(hdrdir)/ruby/backward/2/stdalign.h
+memory_view.o: $(hdrdir)/ruby/backward/2/stdarg.h
+memory_view.o: $(hdrdir)/ruby/defines.h
+memory_view.o: $(hdrdir)/ruby/encoding.h
+memory_view.o: $(hdrdir)/ruby/intern.h
+memory_view.o: $(hdrdir)/ruby/internal/abi.h
+memory_view.o: $(hdrdir)/ruby/internal/anyargs.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+memory_view.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+memory_view.o: $(hdrdir)/ruby/internal/assume.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/artificial.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/cold.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/const.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/error.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/format.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noalias.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noinline.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/pure.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/restrict.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/warning.h
+memory_view.o: $(hdrdir)/ruby/internal/attr/weakref.h
+memory_view.o: $(hdrdir)/ruby/internal/cast.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+memory_view.o: $(hdrdir)/ruby/internal/compiler_since.h
+memory_view.o: $(hdrdir)/ruby/internal/config.h
+memory_view.o: $(hdrdir)/ruby/internal/constant_p.h
+memory_view.o: $(hdrdir)/ruby/internal/core.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rarray.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rbasic.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rbignum.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rclass.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rdata.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rfile.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rhash.h
+memory_view.o: $(hdrdir)/ruby/internal/core/robject.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rregexp.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rstring.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rstruct.h
+memory_view.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+memory_view.o: $(hdrdir)/ruby/internal/ctype.h
+memory_view.o: $(hdrdir)/ruby/internal/dllexport.h
+memory_view.o: $(hdrdir)/ruby/internal/dosish.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/re.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/string.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+memory_view.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+memory_view.o: $(hdrdir)/ruby/internal/error.h
+memory_view.o: $(hdrdir)/ruby/internal/eval.h
+memory_view.o: $(hdrdir)/ruby/internal/event.h
+memory_view.o: $(hdrdir)/ruby/internal/fl_type.h
+memory_view.o: $(hdrdir)/ruby/internal/gc.h
+memory_view.o: $(hdrdir)/ruby/internal/glob.h
+memory_view.o: $(hdrdir)/ruby/internal/globals.h
+memory_view.o: $(hdrdir)/ruby/internal/has/attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/builtin.h
+memory_view.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+memory_view.o: $(hdrdir)/ruby/internal/has/extension.h
+memory_view.o: $(hdrdir)/ruby/internal/has/feature.h
+memory_view.o: $(hdrdir)/ruby/internal/has/warning.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/array.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/bignum.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/class.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/compar.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/complex.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/cont.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/dir.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/enum.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/error.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/eval.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/file.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/gc.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/hash.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/io.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/load.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/marshal.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/numeric.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/object.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/parse.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/proc.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/process.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/random.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/range.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/rational.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/re.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/ruby.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/select.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/signal.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/string.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/struct.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/thread.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/time.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/variable.h
+memory_view.o: $(hdrdir)/ruby/internal/intern/vm.h
+memory_view.o: $(hdrdir)/ruby/internal/interpreter.h
+memory_view.o: $(hdrdir)/ruby/internal/iterator.h
+memory_view.o: $(hdrdir)/ruby/internal/memory.h
+memory_view.o: $(hdrdir)/ruby/internal/method.h
+memory_view.o: $(hdrdir)/ruby/internal/module.h
+memory_view.o: $(hdrdir)/ruby/internal/newobj.h
+memory_view.o: $(hdrdir)/ruby/internal/rgengc.h
+memory_view.o: $(hdrdir)/ruby/internal/scan_args.h
+memory_view.o: $(hdrdir)/ruby/internal/special_consts.h
+memory_view.o: $(hdrdir)/ruby/internal/static_assert.h
+memory_view.o: $(hdrdir)/ruby/internal/stdalign.h
+memory_view.o: $(hdrdir)/ruby/internal/stdbool.h
+memory_view.o: $(hdrdir)/ruby/internal/symbol.h
+memory_view.o: $(hdrdir)/ruby/internal/value.h
+memory_view.o: $(hdrdir)/ruby/internal/value_type.h
+memory_view.o: $(hdrdir)/ruby/internal/variable.h
+memory_view.o: $(hdrdir)/ruby/internal/warning_push.h
+memory_view.o: $(hdrdir)/ruby/internal/xmalloc.h
+memory_view.o: $(hdrdir)/ruby/memory_view.h
+memory_view.o: $(hdrdir)/ruby/missing.h
+memory_view.o: $(hdrdir)/ruby/onigmo.h
+memory_view.o: $(hdrdir)/ruby/oniguruma.h
+memory_view.o: $(hdrdir)/ruby/ruby.h
+memory_view.o: $(hdrdir)/ruby/st.h
+memory_view.o: $(hdrdir)/ruby/subst.h
+memory_view.o: closure.h
+memory_view.o: conversions.h
+memory_view.o: fiddle.h
+memory_view.o: function.h
+memory_view.o: memory_view.c
+pinned.o: $(RUBY_EXTCONF_H)
+pinned.o: $(arch_hdrdir)/ruby/config.h
+pinned.o: $(hdrdir)/ruby.h
+pinned.o: $(hdrdir)/ruby/assert.h
+pinned.o: $(hdrdir)/ruby/backward.h
+pinned.o: $(hdrdir)/ruby/backward/2/assume.h
+pinned.o: $(hdrdir)/ruby/backward/2/attributes.h
+pinned.o: $(hdrdir)/ruby/backward/2/bool.h
+pinned.o: $(hdrdir)/ruby/backward/2/inttypes.h
+pinned.o: $(hdrdir)/ruby/backward/2/limits.h
+pinned.o: $(hdrdir)/ruby/backward/2/long_long.h
+pinned.o: $(hdrdir)/ruby/backward/2/stdalign.h
+pinned.o: $(hdrdir)/ruby/backward/2/stdarg.h
+pinned.o: $(hdrdir)/ruby/defines.h
+pinned.o: $(hdrdir)/ruby/intern.h
+pinned.o: $(hdrdir)/ruby/internal/abi.h
+pinned.o: $(hdrdir)/ruby/internal/anyargs.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+pinned.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+pinned.o: $(hdrdir)/ruby/internal/assume.h
+pinned.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+pinned.o: $(hdrdir)/ruby/internal/attr/artificial.h
+pinned.o: $(hdrdir)/ruby/internal/attr/cold.h
+pinned.o: $(hdrdir)/ruby/internal/attr/const.h
+pinned.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+pinned.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+pinned.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+pinned.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+pinned.o: $(hdrdir)/ruby/internal/attr/error.h
+pinned.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+pinned.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+pinned.o: $(hdrdir)/ruby/internal/attr/format.h
+pinned.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+pinned.o: $(hdrdir)/ruby/internal/attr/noalias.h
+pinned.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+pinned.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+pinned.o: $(hdrdir)/ruby/internal/attr/noinline.h
+pinned.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+pinned.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+pinned.o: $(hdrdir)/ruby/internal/attr/pure.h
+pinned.o: $(hdrdir)/ruby/internal/attr/restrict.h
+pinned.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+pinned.o: $(hdrdir)/ruby/internal/attr/warning.h
+pinned.o: $(hdrdir)/ruby/internal/attr/weakref.h
+pinned.o: $(hdrdir)/ruby/internal/cast.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+pinned.o: $(hdrdir)/ruby/internal/compiler_since.h
+pinned.o: $(hdrdir)/ruby/internal/config.h
+pinned.o: $(hdrdir)/ruby/internal/constant_p.h
+pinned.o: $(hdrdir)/ruby/internal/core.h
+pinned.o: $(hdrdir)/ruby/internal/core/rarray.h
+pinned.o: $(hdrdir)/ruby/internal/core/rbasic.h
+pinned.o: $(hdrdir)/ruby/internal/core/rbignum.h
+pinned.o: $(hdrdir)/ruby/internal/core/rclass.h
+pinned.o: $(hdrdir)/ruby/internal/core/rdata.h
+pinned.o: $(hdrdir)/ruby/internal/core/rfile.h
+pinned.o: $(hdrdir)/ruby/internal/core/rhash.h
+pinned.o: $(hdrdir)/ruby/internal/core/robject.h
+pinned.o: $(hdrdir)/ruby/internal/core/rregexp.h
+pinned.o: $(hdrdir)/ruby/internal/core/rstring.h
+pinned.o: $(hdrdir)/ruby/internal/core/rstruct.h
+pinned.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+pinned.o: $(hdrdir)/ruby/internal/ctype.h
+pinned.o: $(hdrdir)/ruby/internal/dllexport.h
+pinned.o: $(hdrdir)/ruby/internal/dosish.h
+pinned.o: $(hdrdir)/ruby/internal/error.h
+pinned.o: $(hdrdir)/ruby/internal/eval.h
+pinned.o: $(hdrdir)/ruby/internal/event.h
+pinned.o: $(hdrdir)/ruby/internal/fl_type.h
+pinned.o: $(hdrdir)/ruby/internal/gc.h
+pinned.o: $(hdrdir)/ruby/internal/glob.h
+pinned.o: $(hdrdir)/ruby/internal/globals.h
+pinned.o: $(hdrdir)/ruby/internal/has/attribute.h
+pinned.o: $(hdrdir)/ruby/internal/has/builtin.h
+pinned.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+pinned.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+pinned.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+pinned.o: $(hdrdir)/ruby/internal/has/extension.h
+pinned.o: $(hdrdir)/ruby/internal/has/feature.h
+pinned.o: $(hdrdir)/ruby/internal/has/warning.h
+pinned.o: $(hdrdir)/ruby/internal/intern/array.h
+pinned.o: $(hdrdir)/ruby/internal/intern/bignum.h
+pinned.o: $(hdrdir)/ruby/internal/intern/class.h
+pinned.o: $(hdrdir)/ruby/internal/intern/compar.h
+pinned.o: $(hdrdir)/ruby/internal/intern/complex.h
+pinned.o: $(hdrdir)/ruby/internal/intern/cont.h
+pinned.o: $(hdrdir)/ruby/internal/intern/dir.h
+pinned.o: $(hdrdir)/ruby/internal/intern/enum.h
+pinned.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+pinned.o: $(hdrdir)/ruby/internal/intern/error.h
+pinned.o: $(hdrdir)/ruby/internal/intern/eval.h
+pinned.o: $(hdrdir)/ruby/internal/intern/file.h
+pinned.o: $(hdrdir)/ruby/internal/intern/gc.h
+pinned.o: $(hdrdir)/ruby/internal/intern/hash.h
+pinned.o: $(hdrdir)/ruby/internal/intern/io.h
+pinned.o: $(hdrdir)/ruby/internal/intern/load.h
+pinned.o: $(hdrdir)/ruby/internal/intern/marshal.h
+pinned.o: $(hdrdir)/ruby/internal/intern/numeric.h
+pinned.o: $(hdrdir)/ruby/internal/intern/object.h
+pinned.o: $(hdrdir)/ruby/internal/intern/parse.h
+pinned.o: $(hdrdir)/ruby/internal/intern/proc.h
+pinned.o: $(hdrdir)/ruby/internal/intern/process.h
+pinned.o: $(hdrdir)/ruby/internal/intern/random.h
+pinned.o: $(hdrdir)/ruby/internal/intern/range.h
+pinned.o: $(hdrdir)/ruby/internal/intern/rational.h
+pinned.o: $(hdrdir)/ruby/internal/intern/re.h
+pinned.o: $(hdrdir)/ruby/internal/intern/ruby.h
+pinned.o: $(hdrdir)/ruby/internal/intern/select.h
+pinned.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+pinned.o: $(hdrdir)/ruby/internal/intern/signal.h
+pinned.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+pinned.o: $(hdrdir)/ruby/internal/intern/string.h
+pinned.o: $(hdrdir)/ruby/internal/intern/struct.h
+pinned.o: $(hdrdir)/ruby/internal/intern/thread.h
+pinned.o: $(hdrdir)/ruby/internal/intern/time.h
+pinned.o: $(hdrdir)/ruby/internal/intern/variable.h
+pinned.o: $(hdrdir)/ruby/internal/intern/vm.h
+pinned.o: $(hdrdir)/ruby/internal/interpreter.h
+pinned.o: $(hdrdir)/ruby/internal/iterator.h
+pinned.o: $(hdrdir)/ruby/internal/memory.h
+pinned.o: $(hdrdir)/ruby/internal/method.h
+pinned.o: $(hdrdir)/ruby/internal/module.h
+pinned.o: $(hdrdir)/ruby/internal/newobj.h
+pinned.o: $(hdrdir)/ruby/internal/rgengc.h
+pinned.o: $(hdrdir)/ruby/internal/scan_args.h
+pinned.o: $(hdrdir)/ruby/internal/special_consts.h
+pinned.o: $(hdrdir)/ruby/internal/static_assert.h
+pinned.o: $(hdrdir)/ruby/internal/stdalign.h
+pinned.o: $(hdrdir)/ruby/internal/stdbool.h
+pinned.o: $(hdrdir)/ruby/internal/symbol.h
+pinned.o: $(hdrdir)/ruby/internal/value.h
+pinned.o: $(hdrdir)/ruby/internal/value_type.h
+pinned.o: $(hdrdir)/ruby/internal/variable.h
+pinned.o: $(hdrdir)/ruby/internal/warning_push.h
+pinned.o: $(hdrdir)/ruby/internal/xmalloc.h
+pinned.o: $(hdrdir)/ruby/missing.h
+pinned.o: $(hdrdir)/ruby/ruby.h
+pinned.o: $(hdrdir)/ruby/st.h
+pinned.o: $(hdrdir)/ruby/subst.h
+pinned.o: closure.h
+pinned.o: conversions.h
+pinned.o: fiddle.h
+pinned.o: function.h
+pinned.o: pinned.c
pointer.o: $(RUBY_EXTCONF_H)
pointer.o: $(arch_hdrdir)/ruby/config.h
pointer.o: $(hdrdir)/ruby.h
pointer.o: $(hdrdir)/ruby/assert.h
pointer.o: $(hdrdir)/ruby/backward.h
+pointer.o: $(hdrdir)/ruby/backward/2/assume.h
+pointer.o: $(hdrdir)/ruby/backward/2/attributes.h
+pointer.o: $(hdrdir)/ruby/backward/2/bool.h
+pointer.o: $(hdrdir)/ruby/backward/2/inttypes.h
+pointer.o: $(hdrdir)/ruby/backward/2/limits.h
+pointer.o: $(hdrdir)/ruby/backward/2/long_long.h
+pointer.o: $(hdrdir)/ruby/backward/2/stdalign.h
+pointer.o: $(hdrdir)/ruby/backward/2/stdarg.h
pointer.o: $(hdrdir)/ruby/defines.h
pointer.o: $(hdrdir)/ruby/encoding.h
pointer.o: $(hdrdir)/ruby/intern.h
+pointer.o: $(hdrdir)/ruby/internal/abi.h
+pointer.o: $(hdrdir)/ruby/internal/anyargs.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+pointer.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+pointer.o: $(hdrdir)/ruby/internal/assume.h
+pointer.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+pointer.o: $(hdrdir)/ruby/internal/attr/artificial.h
+pointer.o: $(hdrdir)/ruby/internal/attr/cold.h
+pointer.o: $(hdrdir)/ruby/internal/attr/const.h
+pointer.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+pointer.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+pointer.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+pointer.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+pointer.o: $(hdrdir)/ruby/internal/attr/error.h
+pointer.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+pointer.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+pointer.o: $(hdrdir)/ruby/internal/attr/format.h
+pointer.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+pointer.o: $(hdrdir)/ruby/internal/attr/noalias.h
+pointer.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+pointer.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+pointer.o: $(hdrdir)/ruby/internal/attr/noinline.h
+pointer.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+pointer.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+pointer.o: $(hdrdir)/ruby/internal/attr/pure.h
+pointer.o: $(hdrdir)/ruby/internal/attr/restrict.h
+pointer.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+pointer.o: $(hdrdir)/ruby/internal/attr/warning.h
+pointer.o: $(hdrdir)/ruby/internal/attr/weakref.h
+pointer.o: $(hdrdir)/ruby/internal/cast.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+pointer.o: $(hdrdir)/ruby/internal/compiler_since.h
+pointer.o: $(hdrdir)/ruby/internal/config.h
+pointer.o: $(hdrdir)/ruby/internal/constant_p.h
+pointer.o: $(hdrdir)/ruby/internal/core.h
+pointer.o: $(hdrdir)/ruby/internal/core/rarray.h
+pointer.o: $(hdrdir)/ruby/internal/core/rbasic.h
+pointer.o: $(hdrdir)/ruby/internal/core/rbignum.h
+pointer.o: $(hdrdir)/ruby/internal/core/rclass.h
+pointer.o: $(hdrdir)/ruby/internal/core/rdata.h
+pointer.o: $(hdrdir)/ruby/internal/core/rfile.h
+pointer.o: $(hdrdir)/ruby/internal/core/rhash.h
+pointer.o: $(hdrdir)/ruby/internal/core/robject.h
+pointer.o: $(hdrdir)/ruby/internal/core/rregexp.h
+pointer.o: $(hdrdir)/ruby/internal/core/rstring.h
+pointer.o: $(hdrdir)/ruby/internal/core/rstruct.h
+pointer.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+pointer.o: $(hdrdir)/ruby/internal/ctype.h
+pointer.o: $(hdrdir)/ruby/internal/dllexport.h
+pointer.o: $(hdrdir)/ruby/internal/dosish.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/re.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/string.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+pointer.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+pointer.o: $(hdrdir)/ruby/internal/error.h
+pointer.o: $(hdrdir)/ruby/internal/eval.h
+pointer.o: $(hdrdir)/ruby/internal/event.h
+pointer.o: $(hdrdir)/ruby/internal/fl_type.h
+pointer.o: $(hdrdir)/ruby/internal/gc.h
+pointer.o: $(hdrdir)/ruby/internal/glob.h
+pointer.o: $(hdrdir)/ruby/internal/globals.h
+pointer.o: $(hdrdir)/ruby/internal/has/attribute.h
+pointer.o: $(hdrdir)/ruby/internal/has/builtin.h
+pointer.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+pointer.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+pointer.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+pointer.o: $(hdrdir)/ruby/internal/has/extension.h
+pointer.o: $(hdrdir)/ruby/internal/has/feature.h
+pointer.o: $(hdrdir)/ruby/internal/has/warning.h
+pointer.o: $(hdrdir)/ruby/internal/intern/array.h
+pointer.o: $(hdrdir)/ruby/internal/intern/bignum.h
+pointer.o: $(hdrdir)/ruby/internal/intern/class.h
+pointer.o: $(hdrdir)/ruby/internal/intern/compar.h
+pointer.o: $(hdrdir)/ruby/internal/intern/complex.h
+pointer.o: $(hdrdir)/ruby/internal/intern/cont.h
+pointer.o: $(hdrdir)/ruby/internal/intern/dir.h
+pointer.o: $(hdrdir)/ruby/internal/intern/enum.h
+pointer.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+pointer.o: $(hdrdir)/ruby/internal/intern/error.h
+pointer.o: $(hdrdir)/ruby/internal/intern/eval.h
+pointer.o: $(hdrdir)/ruby/internal/intern/file.h
+pointer.o: $(hdrdir)/ruby/internal/intern/gc.h
+pointer.o: $(hdrdir)/ruby/internal/intern/hash.h
+pointer.o: $(hdrdir)/ruby/internal/intern/io.h
+pointer.o: $(hdrdir)/ruby/internal/intern/load.h
+pointer.o: $(hdrdir)/ruby/internal/intern/marshal.h
+pointer.o: $(hdrdir)/ruby/internal/intern/numeric.h
+pointer.o: $(hdrdir)/ruby/internal/intern/object.h
+pointer.o: $(hdrdir)/ruby/internal/intern/parse.h
+pointer.o: $(hdrdir)/ruby/internal/intern/proc.h
+pointer.o: $(hdrdir)/ruby/internal/intern/process.h
+pointer.o: $(hdrdir)/ruby/internal/intern/random.h
+pointer.o: $(hdrdir)/ruby/internal/intern/range.h
+pointer.o: $(hdrdir)/ruby/internal/intern/rational.h
+pointer.o: $(hdrdir)/ruby/internal/intern/re.h
+pointer.o: $(hdrdir)/ruby/internal/intern/ruby.h
+pointer.o: $(hdrdir)/ruby/internal/intern/select.h
+pointer.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+pointer.o: $(hdrdir)/ruby/internal/intern/signal.h
+pointer.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+pointer.o: $(hdrdir)/ruby/internal/intern/string.h
+pointer.o: $(hdrdir)/ruby/internal/intern/struct.h
+pointer.o: $(hdrdir)/ruby/internal/intern/thread.h
+pointer.o: $(hdrdir)/ruby/internal/intern/time.h
+pointer.o: $(hdrdir)/ruby/internal/intern/variable.h
+pointer.o: $(hdrdir)/ruby/internal/intern/vm.h
+pointer.o: $(hdrdir)/ruby/internal/interpreter.h
+pointer.o: $(hdrdir)/ruby/internal/iterator.h
+pointer.o: $(hdrdir)/ruby/internal/memory.h
+pointer.o: $(hdrdir)/ruby/internal/method.h
+pointer.o: $(hdrdir)/ruby/internal/module.h
+pointer.o: $(hdrdir)/ruby/internal/newobj.h
+pointer.o: $(hdrdir)/ruby/internal/rgengc.h
+pointer.o: $(hdrdir)/ruby/internal/scan_args.h
+pointer.o: $(hdrdir)/ruby/internal/special_consts.h
+pointer.o: $(hdrdir)/ruby/internal/static_assert.h
+pointer.o: $(hdrdir)/ruby/internal/stdalign.h
+pointer.o: $(hdrdir)/ruby/internal/stdbool.h
+pointer.o: $(hdrdir)/ruby/internal/symbol.h
+pointer.o: $(hdrdir)/ruby/internal/value.h
+pointer.o: $(hdrdir)/ruby/internal/value_type.h
+pointer.o: $(hdrdir)/ruby/internal/variable.h
+pointer.o: $(hdrdir)/ruby/internal/warning_push.h
+pointer.o: $(hdrdir)/ruby/internal/xmalloc.h
pointer.o: $(hdrdir)/ruby/io.h
+pointer.o: $(hdrdir)/ruby/memory_view.h
pointer.o: $(hdrdir)/ruby/missing.h
pointer.o: $(hdrdir)/ruby/onigmo.h
pointer.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index fce0cb4079..cf8b5223bb 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -3,56 +3,91 @@ require 'mkmf'
# :stopdoc:
-bundle = enable_config('bundled-libffi')
-if ! bundle
+def gcc?
+ RbConfig::CONFIG["GCC"] == "yes"
+end
+
+def disable_optimization_build_flag(flags)
+ if gcc?
+ expanded_flags = RbConfig.expand(flags.dup)
+ optimization_option_pattern = /(^|\s)?-O\d(\s|$)?/
+ if optimization_option_pattern.match?(expanded_flags)
+ expanded_flags.gsub(optimization_option_pattern, '\\1-Og\\2')
+ else
+ flags + " -Og"
+ end
+ else
+ flags
+ end
+end
+
+def enable_debug_build_flag(flags)
+ if gcc?
+ expanded_flags = RbConfig.expand(flags.dup)
+ debug_option_pattern = /(^|\s)-g(?:gdb)?\d?(\s|$)/
+ if debug_option_pattern.match?(expanded_flags)
+ expanded_flags.gsub(debug_option_pattern, '\\1-ggdb3\\2')
+ else
+ flags + " -ggdb3"
+ end
+ else
+ flags
+ end
+end
+
+checking_for(checking_message("--enable-debug-build option")) do
+ enable_debug_build = enable_config("debug-build", false)
+ if enable_debug_build
+ $CFLAGS = disable_optimization_build_flag($CFLAGS)
+ $CFLAGS = enable_debug_build_flag($CFLAGS)
+ end
+ enable_debug_build
+end
+
+libffi_version = nil
+have_libffi = false
+bundle = with_config("libffi-source-dir")
+unless bundle
dir_config 'libffi'
- pkg_config("libffi") and
- ver = pkg_config("libffi", "modversion")
+ if pkg_config("libffi")
+ libffi_version = pkg_config("libffi", "modversion")
+ end
+ have_ffi_header = false
if have_header(ffi_header = 'ffi.h')
- true
+ have_ffi_header = true
elsif have_header(ffi_header = 'ffi/ffi.h')
- $defs.push(format('-DUSE_HEADER_HACKS'))
- true
- end and (have_library('ffi') || have_library('libffi'))
-end or
-begin
- # for https://github.com/ruby/fiddle
- if bundle && File.exist?("../../bin/extlibs.rb")
- require "fileutils"
- require_relative "../../bin/extlibs"
- extlibs = ExtLibs.new
- cache_dir = File.expand_path("../../tmp/.download_cache", $srcdir)
- ext_dir = File.expand_path("../../ext", $srcdir)
- Dir.glob("#{$srcdir}/libffi-*/").each{|dir| FileUtils.rm_rf(dir)}
- extlibs.run(["--cache=#{cache_dir}", ext_dir])
- end
- ver = bundle != false &&
- Dir.glob("#{$srcdir}/libffi-*/")
- .map {|n| File.basename(n)}
- .max_by {|n| n.scan(/\d+/).map(&:to_i)}
- unless ver
- raise "missing libffi. Please install libffi."
- end
-
- srcdir = "#{$srcdir}/#{ver}"
+ $defs.push('-DUSE_HEADER_HACKS')
+ have_ffi_header = true
+ end
+ if have_ffi_header && (have_library('ffi') || have_library('libffi'))
+ have_libffi = true
+ end
+end
+
+unless have_libffi
+ if bundle
+ libffi_srcdir = libffi_package_name = bundle
+ else
+ raise "missing libffi. Please install libffi or use --with-libffi-source-dir with libffi source location."
+ end
ffi_header = 'ffi.h'
libffi = Struct.new(*%I[dir srcdir builddir include lib a cflags ldflags opt arch]).new
- libffi.dir = ver
+ libffi.dir = libffi_package_name
if $srcdir == "."
- libffi.builddir = "#{ver}/#{RUBY_PLATFORM}"
+ libffi.builddir = libffi_package_name
libffi.srcdir = "."
else
libffi.builddir = libffi.dir
- libffi.srcdir = relative_from(srcdir, "..")
+ libffi.srcdir = relative_from(libffi_srcdir, "..")
end
libffi.include = "#{libffi.builddir}/include"
libffi.lib = "#{libffi.builddir}/.libs"
libffi.a = "#{libffi.lib}/libffi_convenience.#{$LIBEXT}"
nowarn = CONFIG.merge("warnflags"=>"")
libffi.cflags = RbConfig.expand("$(CFLAGS)".dup, nowarn)
- ver = ver[/libffi-(.*)/, 1]
+ libffi_version = libffi_package_name[/libffi-(.*)/, 1]
FileUtils.mkdir_p(libffi.dir)
libffi.opt = CONFIG['configure_args'][/'(-C)'/, 1]
@@ -81,7 +116,6 @@ begin
args.concat %W[
--srcdir=#{libffi.srcdir}
--host=#{libffi.arch}
- --enable-builddir=#{RUBY_PLATFORM}
]
args << ($enable_shared || !$static ? '--enable-shared' : '--enable-static')
args << libffi.opt if libffi.opt
@@ -98,7 +132,7 @@ begin
begin
IO.copy_stream(libffi.dir + "/config.log", Logging.instance_variable_get(:@logfile))
rescue SystemCallError => e
- Logfile.message("%s\n", e.message)
+ Logging.message("%s\n", e.message)
end
raise "failed to configure libffi. Please install libffi."
end
@@ -107,18 +141,37 @@ begin
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
end
unless File.file?("#{libffi.include}/ffitarget.h")
- FileUtils.cp("#{srcdir}/src/x86/ffitarget.h", libffi.include, preserve: true)
+ FileUtils.cp("#{libffi_srcdir}/src/x86/ffitarget.h", libffi.include, preserve: true)
end
$INCFLAGS << " -I" << libffi.include
end
-if ver
- ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
- ver = (ver.split('.') + [0,0])[0,3]
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
+if libffi_version
+ # If libffi_version contains rc version, just ignored.
+ libffi_version = libffi_version.gsub(/-rc\d+/, '')
+ libffi_version = (libffi_version.split('.').map(&:to_i) + [0,0])[0,3]
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % libffi_version }})
+ warn "libffi_version: #{libffi_version.join('.')}"
+end
+
+case
+when $mswin, $mingw, (libffi_version && (libffi_version <=> [3, 2]) >= 0)
+ $defs << "-DUSE_FFI_CLOSURE_ALLOC=1"
+when (libffi_version && (libffi_version <=> [3, 2]) < 0)
+else
+ have_func('ffi_closure_alloc', ffi_header)
+end
+
+if libffi_version
+ if (libffi_version <=> [3, 0, 11]) >= 0
+ $defs << "-DHAVE_FFI_PREP_CIF_VAR"
+ end
+else
+ have_func('ffi_prep_cif_var', ffi_header)
end
have_header 'sys/mman.h'
+have_header 'link.h'
if have_header "dlfcn.h"
have_library "dl"
@@ -128,10 +181,14 @@ if have_header "dlfcn.h"
end
have_func "dlerror"
+ have_func "dlinfo"
+ have_const("RTLD_DI_LINKMAP", "dlfcn.h")
elsif have_header "windows.h"
- %w{ LoadLibrary FreeLibrary GetProcAddress }.each do |func|
+ %w{ LoadLibrary FreeLibrary GetProcAddress GetModuleFileName }.each do |func|
abort "missing function #{func}" unless have_func(func)
end
+
+ have_library "ws2_32"
end
have_const('FFI_STDCALL', ffi_header)
@@ -142,19 +199,20 @@ types.each do |type, signed|
if /^\#define\s+SIZEOF_#{type}\s+(SIZEOF_(.+)|\d+)/ =~ config
if size = $2 and size != 'VOIDP'
size = types.fetch(size) {size}
- $defs << format("-DTYPE_%s=TYPE_%s", signed||type, size)
+ $defs << "-DTYPE_#{signed||type}=TYPE_#{size}"
end
if signed
check_signedness(type.downcase, "stddef.h")
end
+ else
+ check_signedness(type.downcase, "stddef.h")
end
end
if libffi
- $LOCAL_LIBS.prepend("./#{libffi.a} ").strip! # to exts.mk
+ $LOCAL_LIBS.prepend("#{libffi.a} ").strip! # to exts.mk
$INCFLAGS.gsub!(/-I#{libffi.dir}/, '-I$(LIBFFI_DIR)')
end
-$INCFLAGS << " -I$(top_srcdir)"
create_makefile 'fiddle' do |conf|
if !libffi
next conf << "LIBFFI_CLEAN = none\n"
diff --git a/ext/fiddle/extlibs b/ext/fiddle/extlibs
deleted file mode 100644
index 290b814590..0000000000
--- a/ext/fiddle/extlibs
+++ /dev/null
@@ -1,5 +0,0 @@
-http://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz \
- md5:83b89587607e3eb65c70d361f13bab43 \
- sha512:980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 \
- #
- win32/libffi-3.2.1-mswin.patch -p0
diff --git a/ext/fiddle/fiddle.c b/ext/fiddle/fiddle.c
index 9f3d1537d6..c06cd5634a 100644
--- a/ext/fiddle/fiddle.c
+++ b/ext/fiddle/fiddle.c
@@ -1,41 +1,15 @@
#include <fiddle.h>
VALUE mFiddle;
+VALUE rb_eFiddleDLError;
VALUE rb_eFiddleError;
-#ifndef TYPE_SSIZE_T
-# if SIZEOF_SIZE_T == SIZEOF_INT
-# define TYPE_SSIZE_T TYPE_INT
-# elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define TYPE_SSIZE_T TYPE_LONG
-# elif defined HAVE_LONG_LONG && SIZEOF_SIZE_T == SIZEOF_LONG_LONG
-# define TYPE_SSIZE_T TYPE_LONG_LONG
-# endif
-#endif
-#define TYPE_SIZE_T (-1*SIGNEDNESS_OF_SIZE_T*TYPE_SSIZE_T)
-
-#ifndef TYPE_PTRDIFF_T
-# if SIZEOF_PTRDIFF_T == SIZEOF_INT
-# define TYPE_PTRDIFF_T TYPE_INT
-# elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
-# define TYPE_PTRDIFF_T TYPE_LONG
-# elif defined HAVE_LONG_LONG && SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
-# define TYPE_PTRDIFF_T TYPE_LONG_LONG
-# endif
-#endif
+void Init_fiddle_pointer(void);
+void Init_fiddle_pinned(void);
-#ifndef TYPE_INTPTR_T
-# if SIZEOF_INTPTR_T == SIZEOF_INT
-# define TYPE_INTPTR_T TYPE_INT
-# elif SIZEOF_INTPTR_T == SIZEOF_LONG
-# define TYPE_INTPTR_T TYPE_LONG
-# elif defined HAVE_LONG_LONG && SIZEOF_INTPTR_T == SIZEOF_LONG_LONG
-# define TYPE_INTPTR_T TYPE_LONG_LONG
-# endif
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+void Init_fiddle_memory_view(void);
#endif
-#define TYPE_UINTPTR_T (-TYPE_INTPTR_T)
-
-void Init_fiddle_pointer(void);
/*
* call-seq: Fiddle.malloc(size)
@@ -47,8 +21,7 @@ static VALUE
rb_fiddle_malloc(VALUE self, VALUE size)
{
void *ptr;
-
- ptr = (void*)ruby_xmalloc(NUM2SIZET(size));
+ ptr = (void*)ruby_xcalloc(1, NUM2SIZET(size));
return PTR2NUM(ptr);
}
@@ -164,97 +137,220 @@ Init_fiddle(void)
mFiddle = rb_define_module("Fiddle");
/*
+ * Document-class: Fiddle::Error
+ *
+ * Generic error class for Fiddle
+ */
+ rb_eFiddleError = rb_define_class_under(mFiddle, "Error", rb_eStandardError);
+
+ /*
+ * Ruby installed by RubyInstaller for Windows always require
+ * bundled Fiddle because ruby_installer/runtime/dll_directory.rb
+ * requires Fiddle. It's used by
+ * rubygems/defaults/operating_system.rb. It means that the
+ * bundled Fiddle is always required on initialization.
+ *
+ * We just remove existing Fiddle::DLError here to override
+ * the bundled Fiddle.
+ */
+ if (rb_const_defined(mFiddle, rb_intern("DLError"))) {
+ rb_const_remove(mFiddle, rb_intern("DLError"));
+ }
+
+ /*
* Document-class: Fiddle::DLError
*
* standard dynamic load exception
*/
- rb_eFiddleError = rb_define_class_under(mFiddle, "DLError", rb_eStandardError);
+ rb_eFiddleDLError = rb_define_class_under(mFiddle, "DLError", rb_eFiddleError);
+
+ VALUE mFiddleTypes = rb_define_module_under(mFiddle, "Types");
- /* Document-const: TYPE_VOID
+ /* Document-const: Fiddle::Types::VOID
*
* C type - void
*/
- rb_define_const(mFiddle, "TYPE_VOID", INT2NUM(TYPE_VOID));
+ rb_define_const(mFiddleTypes, "VOID", INT2NUM(TYPE_VOID));
- /* Document-const: TYPE_VOIDP
+ /* Document-const: Fiddle::Types::VOIDP
*
* C type - void*
*/
- rb_define_const(mFiddle, "TYPE_VOIDP", INT2NUM(TYPE_VOIDP));
+ rb_define_const(mFiddleTypes, "VOIDP", INT2NUM(TYPE_VOIDP));
- /* Document-const: TYPE_CHAR
+ /* Document-const: Fiddle::Types::CHAR
*
* C type - char
*/
- rb_define_const(mFiddle, "TYPE_CHAR", INT2NUM(TYPE_CHAR));
+ rb_define_const(mFiddleTypes, "CHAR", INT2NUM(TYPE_CHAR));
+
+ /* Document-const: Fiddle::Types::UCHAR
+ *
+ * C type - unsigned char
+ */
+ rb_define_const(mFiddleTypes, "UCHAR", INT2NUM(TYPE_UCHAR));
- /* Document-const: TYPE_SHORT
+ /* Document-const: Fiddle::Types::SHORT
*
* C type - short
*/
- rb_define_const(mFiddle, "TYPE_SHORT", INT2NUM(TYPE_SHORT));
+ rb_define_const(mFiddleTypes, "SHORT", INT2NUM(TYPE_SHORT));
- /* Document-const: TYPE_INT
+ /* Document-const: Fiddle::Types::USHORT
+ *
+ * C type - unsigned short
+ */
+ rb_define_const(mFiddleTypes, "USHORT", INT2NUM(TYPE_USHORT));
+
+ /* Document-const: Fiddle::Types::INT
*
* C type - int
*/
- rb_define_const(mFiddle, "TYPE_INT", INT2NUM(TYPE_INT));
+ rb_define_const(mFiddleTypes, "INT", INT2NUM(TYPE_INT));
- /* Document-const: TYPE_LONG
+ /* Document-const: Fiddle::Types::UINT
+ *
+ * C type - unsigned int
+ */
+ rb_define_const(mFiddleTypes, "UINT", INT2NUM(TYPE_UINT));
+
+ /* Document-const: Fiddle::Types::LONG
*
* C type - long
*/
- rb_define_const(mFiddle, "TYPE_LONG", INT2NUM(TYPE_LONG));
+ rb_define_const(mFiddleTypes, "LONG", INT2NUM(TYPE_LONG));
+
+ /* Document-const: Fiddle::Types::ULONG
+ *
+ * C type - long
+ */
+ rb_define_const(mFiddleTypes, "ULONG", INT2NUM(TYPE_ULONG));
#if HAVE_LONG_LONG
- /* Document-const: TYPE_LONG_LONG
+ /* Document-const: Fiddle::Types::LONG_LONG
+ *
+ * C type - long long
+ */
+ rb_define_const(mFiddleTypes, "LONG_LONG", INT2NUM(TYPE_LONG_LONG));
+
+ /* Document-const: Fiddle::Types::ULONG_LONG
*
* C type - long long
*/
- rb_define_const(mFiddle, "TYPE_LONG_LONG", INT2NUM(TYPE_LONG_LONG));
+ rb_define_const(mFiddleTypes, "ULONG_LONG", INT2NUM(TYPE_ULONG_LONG));
+#endif
+
+#ifdef TYPE_INT8_T
+ /* Document-const: Fiddle::Types::INT8_T
+ *
+ * C type - int8_t
+ */
+ rb_define_const(mFiddleTypes, "INT8_T", INT2NUM(TYPE_INT8_T));
+
+ /* Document-const: Fiddle::Types::UINT8_T
+ *
+ * C type - uint8_t
+ */
+ rb_define_const(mFiddleTypes, "UINT8_T", INT2NUM(TYPE_UINT8_T));
+#endif
+
+#ifdef TYPE_INT16_T
+ /* Document-const: Fiddle::Types::INT16_T
+ *
+ * C type - int16_t
+ */
+ rb_define_const(mFiddleTypes, "INT16_T", INT2NUM(TYPE_INT16_T));
+
+ /* Document-const: Fiddle::Types::UINT16_T
+ *
+ * C type - uint16_t
+ */
+ rb_define_const(mFiddleTypes, "UINT16_T", INT2NUM(TYPE_UINT16_T));
+#endif
+
+#ifdef TYPE_INT32_T
+ /* Document-const: Fiddle::Types::INT32_T
+ *
+ * C type - int32_t
+ */
+ rb_define_const(mFiddleTypes, "INT32_T", INT2NUM(TYPE_INT32_T));
+
+ /* Document-const: Fiddle::Types::UINT32_T
+ *
+ * C type - uint32_t
+ */
+ rb_define_const(mFiddleTypes, "UINT32_T", INT2NUM(TYPE_UINT32_T));
+#endif
+
+#ifdef TYPE_INT64_T
+ /* Document-const: Fiddle::Types::INT64_T
+ *
+ * C type - int64_t
+ */
+ rb_define_const(mFiddleTypes, "INT64_T", INT2NUM(TYPE_INT64_T));
+
+ /* Document-const: Fiddle::Types::UINT64_T
+ *
+ * C type - uint64_t
+ */
+ rb_define_const(mFiddleTypes, "UINT64_T", INT2NUM(TYPE_UINT64_T));
#endif
- /* Document-const: TYPE_FLOAT
+ /* Document-const: Fiddle::Types::FLOAT
*
* C type - float
*/
- rb_define_const(mFiddle, "TYPE_FLOAT", INT2NUM(TYPE_FLOAT));
+ rb_define_const(mFiddleTypes, "FLOAT", INT2NUM(TYPE_FLOAT));
- /* Document-const: TYPE_DOUBLE
+ /* Document-const: Fiddle::Types::DOUBLE
*
* C type - double
*/
- rb_define_const(mFiddle, "TYPE_DOUBLE", INT2NUM(TYPE_DOUBLE));
+ rb_define_const(mFiddleTypes, "DOUBLE", INT2NUM(TYPE_DOUBLE));
- /* Document-const: TYPE_SIZE_T
+#ifdef HAVE_FFI_PREP_CIF_VAR
+ /* Document-const: Fiddle::Types::VARIADIC
+ *
+ * C type - ...
+ */
+ rb_define_const(mFiddleTypes, "VARIADIC", INT2NUM(TYPE_VARIADIC));
+#endif
+
+ /* Document-const: Fiddle::Types::CONST_STRING
+ *
+ * C type - const char* ('\0' terminated const char*)
+ */
+ rb_define_const(mFiddleTypes, "CONST_STRING", INT2NUM(TYPE_CONST_STRING));
+
+ /* Document-const: Fiddle::Types::SIZE_T
*
* C type - size_t
*/
- rb_define_const(mFiddle, "TYPE_SIZE_T", INT2NUM(TYPE_SIZE_T));
+ rb_define_const(mFiddleTypes, "SIZE_T", INT2NUM(TYPE_SIZE_T));
- /* Document-const: TYPE_SSIZE_T
+ /* Document-const: Fiddle::Types::SSIZE_T
*
* C type - ssize_t
*/
- rb_define_const(mFiddle, "TYPE_SSIZE_T", INT2NUM(TYPE_SSIZE_T));
+ rb_define_const(mFiddleTypes, "SSIZE_T", INT2NUM(TYPE_SSIZE_T));
- /* Document-const: TYPE_PTRDIFF_T
+ /* Document-const: Fiddle::Types::PTRDIFF_T
*
* C type - ptrdiff_t
*/
- rb_define_const(mFiddle, "TYPE_PTRDIFF_T", INT2NUM(TYPE_PTRDIFF_T));
+ rb_define_const(mFiddleTypes, "PTRDIFF_T", INT2NUM(TYPE_PTRDIFF_T));
- /* Document-const: TYPE_INTPTR_T
+ /* Document-const: Fiddle::Types::INTPTR_T
*
* C type - intptr_t
*/
- rb_define_const(mFiddle, "TYPE_INTPTR_T", INT2NUM(TYPE_INTPTR_T));
+ rb_define_const(mFiddleTypes, "INTPTR_T", INT2NUM(TYPE_INTPTR_T));
- /* Document-const: TYPE_UINTPTR_T
+ /* Document-const: Fiddle::Types::UINTPTR_T
*
* C type - uintptr_t
*/
- rb_define_const(mFiddle, "TYPE_UINTPTR_T", INT2NUM(TYPE_UINTPTR_T));
+ rb_define_const(mFiddleTypes, "UINTPTR_T", INT2NUM(TYPE_UINTPTR_T));
/* Document-const: ALIGN_VOIDP
*
@@ -294,6 +390,30 @@ Init_fiddle(void)
rb_define_const(mFiddle, "ALIGN_LONG_LONG", INT2NUM(ALIGN_LONG_LONG));
#endif
+ /* Document-const: ALIGN_INT8_T
+ *
+ * The alignment size of a int8_t
+ */
+ rb_define_const(mFiddle, "ALIGN_INT8_T", INT2NUM(ALIGN_INT8_T));
+
+ /* Document-const: ALIGN_INT16_T
+ *
+ * The alignment size of a int16_t
+ */
+ rb_define_const(mFiddle, "ALIGN_INT16_T", INT2NUM(ALIGN_INT16_T));
+
+ /* Document-const: ALIGN_INT32_T
+ *
+ * The alignment size of a int32_t
+ */
+ rb_define_const(mFiddle, "ALIGN_INT32_T", INT2NUM(ALIGN_INT32_T));
+
+ /* Document-const: ALIGN_INT64_T
+ *
+ * The alignment size of a int64_t
+ */
+ rb_define_const(mFiddle, "ALIGN_INT64_T", INT2NUM(ALIGN_INT64_T));
+
/* Document-const: ALIGN_FLOAT
*
* The alignment size of a float
@@ -358,32 +478,110 @@ Init_fiddle(void)
*/
rb_define_const(mFiddle, "SIZEOF_CHAR", INT2NUM(sizeof(char)));
+ /* Document-const: SIZEOF_UCHAR
+ *
+ * size of a unsigned char
+ */
+ rb_define_const(mFiddle, "SIZEOF_UCHAR", INT2NUM(sizeof(unsigned char)));
+
/* Document-const: SIZEOF_SHORT
*
* size of a short
*/
rb_define_const(mFiddle, "SIZEOF_SHORT", INT2NUM(sizeof(short)));
+ /* Document-const: SIZEOF_USHORT
+ *
+ * size of a unsigned short
+ */
+ rb_define_const(mFiddle, "SIZEOF_USHORT", INT2NUM(sizeof(unsigned short)));
+
/* Document-const: SIZEOF_INT
*
* size of an int
*/
rb_define_const(mFiddle, "SIZEOF_INT", INT2NUM(sizeof(int)));
+ /* Document-const: SIZEOF_UINT
+ *
+ * size of an unsigned int
+ */
+ rb_define_const(mFiddle, "SIZEOF_UINT", INT2NUM(sizeof(unsigned int)));
+
/* Document-const: SIZEOF_LONG
*
* size of a long
*/
rb_define_const(mFiddle, "SIZEOF_LONG", INT2NUM(sizeof(long)));
+ /* Document-const: SIZEOF_ULONG
+ *
+ * size of a unsigned long
+ */
+ rb_define_const(mFiddle, "SIZEOF_ULONG", INT2NUM(sizeof(unsigned long)));
+
#if HAVE_LONG_LONG
/* Document-const: SIZEOF_LONG_LONG
*
* size of a long long
*/
rb_define_const(mFiddle, "SIZEOF_LONG_LONG", INT2NUM(sizeof(LONG_LONG)));
+
+ /* Document-const: SIZEOF_ULONG_LONG
+ *
+ * size of a unsigned long long
+ */
+ rb_define_const(mFiddle, "SIZEOF_ULONG_LONG", INT2NUM(sizeof(unsigned LONG_LONG)));
#endif
+ /* Document-const: SIZEOF_INT8_T
+ *
+ * size of a int8_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_INT8_T", INT2NUM(sizeof(int8_t)));
+
+ /* Document-const: SIZEOF_UINT8_T
+ *
+ * size of a uint8_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_UINT8_T", INT2NUM(sizeof(uint8_t)));
+
+ /* Document-const: SIZEOF_INT16_T
+ *
+ * size of a int16_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_INT16_T", INT2NUM(sizeof(int16_t)));
+
+ /* Document-const: SIZEOF_UINT16_T
+ *
+ * size of a uint16_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_UINT16_T", INT2NUM(sizeof(uint16_t)));
+
+ /* Document-const: SIZEOF_INT32_T
+ *
+ * size of a int32_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_INT32_T", INT2NUM(sizeof(int32_t)));
+
+ /* Document-const: SIZEOF_UINT32_T
+ *
+ * size of a uint32_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_UINT32_T", INT2NUM(sizeof(uint32_t)));
+
+ /* Document-const: SIZEOF_INT64_T
+ *
+ * size of a int64_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_INT64_T", INT2NUM(sizeof(int64_t)));
+
+ /* Document-const: SIZEOF_UINT64_T
+ *
+ * size of a uint64_t
+ */
+ rb_define_const(mFiddle, "SIZEOF_UINT64_T", INT2NUM(sizeof(uint64_t)));
+
/* Document-const: SIZEOF_FLOAT
*
* size of a float
@@ -426,6 +624,12 @@ Init_fiddle(void)
*/
rb_define_const(mFiddle, "SIZEOF_UINTPTR_T", INT2NUM(sizeof(uintptr_t)));
+ /* Document-const: SIZEOF_CONST_STRING
+ *
+ * size of a const char*
+ */
+ rb_define_const(mFiddle, "SIZEOF_CONST_STRING", INT2NUM(sizeof(const char*)));
+
/* Document-const: RUBY_FREE
*
* Address of the ruby_xfree() function
@@ -446,9 +650,38 @@ Init_fiddle(void)
rb_define_module_function(mFiddle, "realloc", rb_fiddle_realloc, 2);
rb_define_module_function(mFiddle, "free", rb_fiddle_free, 1);
+ /* Document-const: Qtrue
+ *
+ * The value of Qtrue
+ */
+ rb_define_const(mFiddle, "Qtrue", INT2NUM(Qtrue));
+
+ /* Document-const: Qfalse
+ *
+ * The value of Qfalse
+ */
+ rb_define_const(mFiddle, "Qfalse", INT2NUM(Qfalse));
+
+ /* Document-const: Qnil
+ *
+ * The value of Qnil
+ */
+ rb_define_const(mFiddle, "Qnil", INT2NUM(Qnil));
+
+ /* Document-const: Qundef
+ *
+ * The value of Qundef
+ */
+ rb_define_const(mFiddle, "Qundef", INT2NUM(Qundef));
+
Init_fiddle_function();
Init_fiddle_closure();
Init_fiddle_handle();
Init_fiddle_pointer();
+ Init_fiddle_pinned();
+
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+ Init_fiddle_memory_view();
+#endif
}
/* vim: set noet sws=4 sw=4: */
diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec
index b29f4ec788..878109395b 100644
--- a/ext/fiddle/fiddle.gemspec
+++ b/ext/fiddle/fiddle.gemspec
@@ -1,23 +1,59 @@
# frozen_string_literal: true
+
+version_module = Module.new do
+ version_rb = File.join(__dir__, "lib/fiddle/version.rb")
+ module_eval(File.read(version_rb), version_rb, __LINE__)
+end
+
Gem::Specification.new do |spec|
spec.name = "fiddle"
- spec.version = '1.0.0'
+ spec.version = version_module::Fiddle::VERSION
spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
spec.summary = %q{A libffi wrapper for Ruby.}
spec.description = %q{A libffi wrapper for Ruby.}
spec.homepage = "https://github.com/ruby/fiddle"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "ext/fiddle/closure.c", "ext/fiddle/closure.h", "ext/fiddle/conversions.c", "ext/fiddle/conversions.h", "ext/fiddle/extconf.rb", "ext/fiddle/extlibs", "ext/fiddle/fiddle.c", "ext/fiddle/fiddle.h", "ext/fiddle/function.c", "ext/fiddle/function.h", "ext/fiddle/handle.c", "ext/fiddle/pointer.c", "ext/fiddle/win32/fficonfig.h", "ext/fiddle/win32/libffi-3.2.1-mswin.patch", "ext/fiddle/win32/libffi-config.rb", "ext/fiddle/win32/libffi.mk.tmpl", "fiddle.gemspec", "lib/fiddle.rb", "lib/fiddle/closure.rb", "lib/fiddle/cparser.rb", "lib/fiddle/function.rb", "lib/fiddle/import.rb", "lib/fiddle/pack.rb", "lib/fiddle/struct.rb", "lib/fiddle/types.rb", "lib/fiddle/value.rb"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.files = [
+ "LICENSE.txt",
+ "README.md",
+ "Rakefile",
+ "ext/fiddle/closure.c",
+ "ext/fiddle/closure.h",
+ "ext/fiddle/conversions.c",
+ "ext/fiddle/conversions.h",
+ "ext/fiddle/depend",
+ "ext/fiddle/extconf.rb",
+ "ext/fiddle/fiddle.c",
+ "ext/fiddle/fiddle.h",
+ "ext/fiddle/function.c",
+ "ext/fiddle/function.h",
+ "ext/fiddle/handle.c",
+ "ext/fiddle/memory_view.c",
+ "ext/fiddle/pinned.c",
+ "ext/fiddle/pointer.c",
+ "ext/fiddle/win32/fficonfig.h",
+ "ext/fiddle/win32/libffi-3.2.1-mswin.patch",
+ "ext/fiddle/win32/libffi-config.rb",
+ "ext/fiddle/win32/libffi.mk.tmpl",
+ "fiddle.gemspec",
+ "lib/fiddle.rb",
+ "lib/fiddle/closure.rb",
+ "lib/fiddle/cparser.rb",
+ "lib/fiddle/function.rb",
+ "lib/fiddle/import.rb",
+ "lib/fiddle/pack.rb",
+ "lib/fiddle/struct.rb",
+ "lib/fiddle/types.rb",
+ "lib/fiddle/value.rb",
+ "lib/fiddle/version.rb",
+ ]
spec.require_paths = ["lib"]
+ spec.extensions = ["ext/fiddle/extconf.rb"]
- spec.required_ruby_version = ">= 2.3.0"
+ spec.required_ruby_version = ">= 2.5.0"
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "rake-compiler"
+ spec.metadata["msys2_mingw_dependencies"] = "libffi"
end
diff --git a/ext/fiddle/fiddle.h b/ext/fiddle/fiddle.h
index d2583c1cbf..10eb9ceedb 100644
--- a/ext/fiddle/fiddle.h
+++ b/ext/fiddle/fiddle.h
@@ -12,6 +12,10 @@
#include <sys/mman.h>
#endif
+#if defined(HAVE_LINK_H)
+# include <link.h>
+#endif
+
#if defined(HAVE_DLFCN_H)
# include <dlfcn.h>
# /* some stranger systems may not define all of these */
@@ -58,38 +62,38 @@
# error "CHAR_BIT not supported"
#endif
-# if SIZEOF_SHORT == 2
-# define ffi_type_ushort ffi_type_uint16
-# define ffi_type_sshort ffi_type_sint16
-# elif SIZEOF_SHORT == 4
-# define ffi_type_ushort ffi_type_uint32
-# define ffi_type_sshort ffi_type_sint32
-# else
-# error "short size not supported"
-# endif
+#if SIZEOF_SHORT == 2
+# define ffi_type_ushort ffi_type_uint16
+# define ffi_type_sshort ffi_type_sint16
+#elif SIZEOF_SHORT == 4
+# define ffi_type_ushort ffi_type_uint32
+# define ffi_type_sshort ffi_type_sint32
+#else
+# error "short size not supported"
+#endif
-# if SIZEOF_INT == 2
-# define ffi_type_uint ffi_type_uint16
-# define ffi_type_sint ffi_type_sint16
-# elif SIZEOF_INT == 4
-# define ffi_type_uint ffi_type_uint32
-# define ffi_type_sint ffi_type_sint32
-# elif SIZEOF_INT == 8
-# define ffi_type_uint ffi_type_uint64
-# define ffi_type_sint ffi_type_sint64
-# else
-# error "int size not supported"
-# endif
+#if SIZEOF_INT == 2
+# define ffi_type_uint ffi_type_uint16
+# define ffi_type_sint ffi_type_sint16
+#elif SIZEOF_INT == 4
+# define ffi_type_uint ffi_type_uint32
+# define ffi_type_sint ffi_type_sint32
+#elif SIZEOF_INT == 8
+# define ffi_type_uint ffi_type_uint64
+# define ffi_type_sint ffi_type_sint64
+#else
+# error "int size not supported"
+#endif
-# if SIZEOF_LONG == 4
-# define ffi_type_ulong ffi_type_uint32
-# define ffi_type_slong ffi_type_sint32
-# elif SIZEOF_LONG == 8
-# define ffi_type_ulong ffi_type_uint64
-# define ffi_type_slong ffi_type_sint64
-# else
-# error "long size not supported"
-# endif
+#if SIZEOF_LONG == 4
+# define ffi_type_ulong ffi_type_uint32
+# define ffi_type_slong ffi_type_sint32
+#elif SIZEOF_LONG == 8
+# define ffi_type_ulong ffi_type_uint64
+# define ffi_type_slong ffi_type_sint64
+#else
+# error "long size not supported"
+#endif
#if HAVE_LONG_LONG
# if SIZEOF_LONG_LONG == 8
@@ -107,20 +111,96 @@
#define TYPE_VOID 0
#define TYPE_VOIDP 1
#define TYPE_CHAR 2
+#define TYPE_UCHAR -TYPE_CHAR
#define TYPE_SHORT 3
+#define TYPE_USHORT -TYPE_SHORT
#define TYPE_INT 4
+#define TYPE_UINT -TYPE_INT
#define TYPE_LONG 5
+#define TYPE_ULONG -TYPE_LONG
#if HAVE_LONG_LONG
#define TYPE_LONG_LONG 6
+#define TYPE_ULONG_LONG -TYPE_LONG_LONG
#endif
#define TYPE_FLOAT 7
#define TYPE_DOUBLE 8
+#define TYPE_VARIADIC 9
+#define TYPE_CONST_STRING 10
+
+#define TYPE_INT8_T TYPE_CHAR
+#define TYPE_UINT8_T -TYPE_INT8_T
+
+#if SIZEOF_SHORT == 2
+# define TYPE_INT16_T TYPE_SHORT
+#elif SIZEOF_INT == 2
+# define TYPE_INT16_T TYPE_INT
+#endif
+
+#ifdef TYPE_INT16_T
+# define TYPE_UINT16_T -TYPE_INT16_T
+#endif
+
+#if SIZEOF_SHORT == 4
+# define TYPE_INT32_T TYPE_SHORT
+#elif SIZEOF_INT == 4
+# define TYPE_INT32_T TYPE_INT
+#elif SIZEOF_LONG == 4
+# define TYPE_INT32_T TYPE_LONG
+#endif
+
+#ifdef TYPE_INT32_T
+#define TYPE_UINT32_T -TYPE_INT32_T
+#endif
+
+#if SIZEOF_INT == 8
+# define TYPE_INT64_T TYPE_INT
+#elif SIZEOF_LONG == 8
+# define TYPE_INT64_T TYPE_LONG
+#elif defined(TYPE_LONG_LONG)
+# define TYPE_INT64_T TYPE_LONG_LONG
+#endif
+
+#ifdef TYPE_INT64_T
+#define TYPE_UINT64_T -TYPE_INT64_T
+#endif
+
+#ifndef TYPE_SSIZE_T
+# if SIZEOF_SIZE_T == SIZEOF_INT
+# define TYPE_SSIZE_T TYPE_INT
+# elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define TYPE_SSIZE_T TYPE_LONG
+# elif defined HAVE_LONG_LONG && SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define TYPE_SSIZE_T TYPE_LONG_LONG
+# endif
+#endif
+#define TYPE_SIZE_T (-1*SIGNEDNESS_OF_SIZE_T*TYPE_SSIZE_T)
+
+#ifndef TYPE_PTRDIFF_T
+# if SIZEOF_PTRDIFF_T == SIZEOF_INT
+# define TYPE_PTRDIFF_T TYPE_INT
+# elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
+# define TYPE_PTRDIFF_T TYPE_LONG
+# elif defined HAVE_LONG_LONG && SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
+# define TYPE_PTRDIFF_T TYPE_LONG_LONG
+# endif
+#endif
+
+#ifndef TYPE_INTPTR_T
+# if SIZEOF_INTPTR_T == SIZEOF_INT
+# define TYPE_INTPTR_T TYPE_INT
+# elif SIZEOF_INTPTR_T == SIZEOF_LONG
+# define TYPE_INTPTR_T TYPE_LONG
+# elif defined HAVE_LONG_LONG && SIZEOF_INTPTR_T == SIZEOF_LONG_LONG
+# define TYPE_INTPTR_T TYPE_LONG_LONG
+# endif
+#endif
+#define TYPE_UINTPTR_T (-TYPE_INTPTR_T)
#define ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x)
#define ALIGN_VOIDP ALIGN_OF(void*)
-#define ALIGN_SHORT ALIGN_OF(short)
#define ALIGN_CHAR ALIGN_OF(char)
+#define ALIGN_SHORT ALIGN_OF(short)
#define ALIGN_INT ALIGN_OF(int)
#define ALIGN_LONG ALIGN_OF(long)
#if HAVE_LONG_LONG
@@ -129,10 +209,18 @@
#define ALIGN_FLOAT ALIGN_OF(float)
#define ALIGN_DOUBLE ALIGN_OF(double)
+#define ALIGN_INT8_T ALIGN_OF(int8_t)
+#define ALIGN_INT16_T ALIGN_OF(int16_t)
+#define ALIGN_INT32_T ALIGN_OF(int32_t)
+#define ALIGN_INT64_T ALIGN_OF(int64_t)
+
extern VALUE mFiddle;
-extern VALUE rb_eFiddleError;
+extern VALUE rb_eFiddleDLError;
VALUE rb_fiddle_new_function(VALUE address, VALUE arg_types, VALUE ret_type);
+typedef void (*rb_fiddle_freefunc_t)(void*);
+VALUE rb_fiddle_ptr_new_wrap(void *ptr, long size, rb_fiddle_freefunc_t func, VALUE wrap0, VALUE wrap1);
+
#endif
/* vim: set noet sws=4 sw=4: */
diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c
index 994402e26b..274d181d17 100644
--- a/ext/fiddle/function.c
+++ b/ext/fiddle/function.c
@@ -1,6 +1,8 @@
#include <fiddle.h>
#include <ruby/thread.h>
+#include <stdbool.h>
+
#ifdef PRIsVALUE
# define RB_OBJ_CLASSNAME(obj) rb_obj_class(obj)
# define RB_OBJ_STRING(obj) (obj)
@@ -19,21 +21,21 @@ VALUE cFiddleFunction;
#define Check_Max_Args_Long(name, len) \
Check_Max_Args_(name, len, "l")
#define Check_Max_Args_(name, len, fmt) \
- if ((size_t)(len) < MAX_ARGS) { \
- /* OK */ \
- } \
- else { \
- rb_raise(rb_eTypeError, \
- name" is so large that it can cause integer overflow (%"fmt"d)", \
- (len)); \
- }
+ do { \
+ if ((size_t)(len) >= MAX_ARGS) { \
+ rb_raise(rb_eTypeError, \
+ "%s is so large " \
+ "that it can cause integer overflow (%"fmt"d)", \
+ (name), (len)); \
+ } \
+ } while (0)
static void
deallocate(void *p)
{
- ffi_cif *ptr = p;
- if (ptr->arg_types) xfree(ptr->arg_types);
- xfree(ptr);
+ ffi_cif *cif = p;
+ if (cif->arg_types) xfree(cif->arg_types);
+ xfree(cif);
}
static size_t
@@ -75,74 +77,114 @@ rb_fiddle_new_function(VALUE address, VALUE arg_types, VALUE ret_type)
return rb_class_new_instance(3, argv, cFiddleFunction);
}
-static int
-parse_keyword_arg_i(VALUE key, VALUE value, VALUE self)
+static VALUE
+normalize_argument_types(const char *name,
+ VALUE arg_types,
+ bool *is_variadic)
{
- if (key == ID2SYM(rb_intern("name"))) {
- rb_iv_set(self, "@name", value);
- } else {
- rb_raise(rb_eArgError, "unknown keyword: %"PRIsVALUE,
- RB_OBJ_STRING(key));
+ VALUE normalized_arg_types;
+ int i;
+ int n_arg_types;
+ *is_variadic = false;
+
+ Check_Type(arg_types, T_ARRAY);
+ n_arg_types = RARRAY_LENINT(arg_types);
+ Check_Max_Args(name, n_arg_types);
+
+ normalized_arg_types = rb_ary_new_capa(n_arg_types);
+ for (i = 0; i < n_arg_types; i++) {
+ VALUE arg_type = RARRAY_AREF(arg_types, i);
+ int c_arg_type;
+ arg_type = rb_fiddle_type_ensure(arg_type);
+ c_arg_type = NUM2INT(arg_type);
+ if (c_arg_type == TYPE_VARIADIC) {
+ if (i != n_arg_types - 1) {
+ rb_raise(rb_eArgError,
+ "Fiddle::TYPE_VARIADIC must be the last argument type: "
+ "%"PRIsVALUE,
+ arg_types);
+ }
+ *is_variadic = true;
+ break;
+ }
+ else {
+ (void)INT2FFI_TYPE(c_arg_type); /* raise */
+ }
+ rb_ary_push(normalized_arg_types, INT2FIX(c_arg_type));
}
- return ST_CONTINUE;
+
+ /* freeze to prevent inconsistency at calling #to_int later */
+ OBJ_FREEZE(normalized_arg_types);
+ return normalized_arg_types;
}
static VALUE
initialize(int argc, VALUE argv[], VALUE self)
{
ffi_cif * cif;
- ffi_type **arg_types, *rtype;
- ffi_status result;
- VALUE ptr, args, ret_type, abi, kwds, ary;
- int i, len;
- int nabi;
+ VALUE ptr, arg_types, ret_type, abi, kwargs;
+ VALUE name = Qnil;
+ VALUE need_gvl = Qfalse;
+ int c_ret_type;
+ bool is_variadic = false;
+ ffi_abi c_ffi_abi;
void *cfunc;
- rb_scan_args(argc, argv, "31:", &ptr, &args, &ret_type, &abi, &kwds);
+ rb_scan_args(argc, argv, "31:", &ptr, &arg_types, &ret_type, &abi, &kwargs);
rb_iv_set(self, "@closure", ptr);
+ if (!NIL_P(kwargs)) {
+ enum {
+ kw_name,
+ kw_need_gvl,
+ kw_max_,
+ };
+ static ID kw[kw_max_];
+ VALUE args[kw_max_];
+ if (!kw[0]) {
+ kw[kw_name] = rb_intern_const("name");
+ kw[kw_need_gvl] = rb_intern_const("need_gvl");
+ }
+ rb_get_kwargs(kwargs, kw, 0, kw_max_, args);
+ if (args[kw_name] != Qundef) {
+ name = args[kw_name];
+ }
+ if (args[kw_need_gvl] != Qundef) {
+ need_gvl = args[kw_need_gvl];
+ }
+ }
+ rb_iv_set(self, "@name", name);
+ rb_iv_set(self, "@need_gvl", need_gvl);
+
ptr = rb_Integer(ptr);
cfunc = NUM2PTR(ptr);
PTR2NUM(cfunc);
- nabi = NIL_P(abi) ? FFI_DEFAULT_ABI : NUM2INT(abi);
- abi = INT2FIX(nabi);
- i = NUM2INT(ret_type);
- rtype = INT2FFI_TYPE(i);
- ret_type = INT2FIX(i);
-
- Check_Type(args, T_ARRAY);
- len = RARRAY_LENINT(args);
- Check_Max_Args("args", len);
- ary = rb_ary_subseq(args, 0, len);
- for (i = 0; i < RARRAY_LEN(args); i++) {
- VALUE a = RARRAY_AREF(args, i);
- int type = NUM2INT(a);
- (void)INT2FFI_TYPE(type); /* raise */
- if (INT2FIX(type) != a) rb_ary_store(ary, i, INT2FIX(type));
+ c_ffi_abi = NIL_P(abi) ? FFI_DEFAULT_ABI : NUM2INT(abi);
+ abi = INT2FIX(c_ffi_abi);
+ ret_type = rb_fiddle_type_ensure(ret_type);
+ c_ret_type = NUM2INT(ret_type);
+ (void)INT2FFI_TYPE(c_ret_type); /* raise */
+ ret_type = INT2FIX(c_ret_type);
+
+ arg_types = normalize_argument_types("argument types",
+ arg_types,
+ &is_variadic);
+#ifndef HAVE_FFI_PREP_CIF_VAR
+ if (is_variadic) {
+ rb_raise(rb_eNotImpError,
+ "ffi_prep_cif_var() is required in libffi "
+ "for variadic arguments");
}
- OBJ_FREEZE(ary);
+#endif
rb_iv_set(self, "@ptr", ptr);
- rb_iv_set(self, "@args", args);
+ rb_iv_set(self, "@argument_types", arg_types);
rb_iv_set(self, "@return_type", ret_type);
rb_iv_set(self, "@abi", abi);
-
- if (!NIL_P(kwds)) rb_hash_foreach(kwds, parse_keyword_arg_i, self);
+ rb_iv_set(self, "@is_variadic", is_variadic ? Qtrue : Qfalse);
TypedData_Get_Struct(self, ffi_cif, &function_data_type, cif);
-
- arg_types = xcalloc(len + 1, sizeof(ffi_type *));
-
- for (i = 0; i < RARRAY_LEN(args); i++) {
- int type = NUM2INT(RARRAY_AREF(args, i));
- arg_types[i] = INT2FFI_TYPE(type);
- }
- arg_types[len] = NULL;
-
- result = ffi_prep_cif(cif, nabi, len, rtype, arg_types);
-
- if (result)
- rb_raise(rb_eRuntimeError, "error creating CIF %d", result);
+ cif->arg_types = NULL;
return self;
}
@@ -169,52 +211,182 @@ function_call(int argc, VALUE argv[], VALUE self)
{
struct nogvl_ffi_call_args args = { 0 };
fiddle_generic *generic_args;
- VALUE cfunc, types, cPointer;
+ VALUE cfunc;
+ VALUE abi;
+ VALUE arg_types;
+ VALUE cPointer;
+ VALUE is_variadic;
+ VALUE need_gvl;
+ int n_arg_types;
+ int n_fixed_args = 0;
+ int n_call_args = 0;
int i;
+ int i_call;
+ VALUE converted_args = Qnil;
VALUE alloc_buffer = 0;
cfunc = rb_iv_get(self, "@ptr");
- types = rb_iv_get(self, "@args");
+ abi = rb_iv_get(self, "@abi");
+ arg_types = rb_iv_get(self, "@argument_types");
cPointer = rb_const_get(mFiddle, rb_intern("Pointer"));
-
- Check_Max_Args("number of arguments", argc);
- if (argc != (i = RARRAY_LENINT(types))) {
- rb_error_arity(argc, i, i);
+ is_variadic = rb_iv_get(self, "@is_variadic");
+ need_gvl = rb_iv_get(self, "@need_gvl");
+
+ n_arg_types = RARRAY_LENINT(arg_types);
+ n_fixed_args = n_arg_types;
+ if (RTEST(is_variadic)) {
+ if (argc < n_arg_types) {
+ rb_error_arity(argc, n_arg_types, UNLIMITED_ARGUMENTS);
+ }
+ if (((argc - n_arg_types) % 2) != 0) {
+ rb_raise(rb_eArgError,
+ "variadic arguments must be type and value pairs: "
+ "%"PRIsVALUE,
+ rb_ary_new_from_values(argc, argv));
+ }
+ n_call_args = n_arg_types + ((argc - n_arg_types) / 2);
}
+ else {
+ if (argc != n_arg_types) {
+ rb_error_arity(argc, n_arg_types, n_arg_types);
+ }
+ n_call_args = n_arg_types;
+ }
+ Check_Max_Args("the number of arguments", n_call_args);
TypedData_Get_Struct(self, ffi_cif, &function_data_type, args.cif);
+ if (is_variadic && args.cif->arg_types) {
+ xfree(args.cif->arg_types);
+ args.cif->arg_types = NULL;
+ }
+
+ if (!args.cif->arg_types) {
+ VALUE fixed_arg_types = arg_types;
+ VALUE return_type;
+ int c_return_type;
+ ffi_type *ffi_return_type;
+ ffi_type **ffi_arg_types;
+ ffi_status result;
+
+ arg_types = rb_ary_dup(fixed_arg_types);
+ for (i = n_fixed_args; i < argc; i += 2) {
+ VALUE arg_type = argv[i];
+ int c_arg_type;
+ arg_type = rb_fiddle_type_ensure(arg_type);
+ c_arg_type = NUM2INT(arg_type);
+ (void)INT2FFI_TYPE(c_arg_type); /* raise */
+ rb_ary_push(arg_types, INT2FIX(c_arg_type));
+ }
+
+ return_type = rb_iv_get(self, "@return_type");
+ c_return_type = FIX2INT(return_type);
+ ffi_return_type = INT2FFI_TYPE(c_return_type);
+
+ ffi_arg_types = xcalloc(n_call_args + 1, sizeof(ffi_type *));
+ for (i_call = 0; i_call < n_call_args; i_call++) {
+ VALUE arg_type;
+ int c_arg_type;
+ arg_type = RARRAY_AREF(arg_types, i_call);
+ c_arg_type = FIX2INT(arg_type);
+ ffi_arg_types[i_call] = INT2FFI_TYPE(c_arg_type);
+ }
+ ffi_arg_types[i_call] = NULL;
+
+ if (is_variadic) {
+#ifdef HAVE_FFI_PREP_CIF_VAR
+ result = ffi_prep_cif_var(args.cif,
+ FIX2INT(abi),
+ n_fixed_args,
+ n_call_args,
+ ffi_return_type,
+ ffi_arg_types);
+#else
+ /* This code is never used because ffi_prep_cif_var()
+ * availability check is done in #initialize. */
+ result = FFI_BAD_TYPEDEF;
+#endif
+ }
+ else {
+ result = ffi_prep_cif(args.cif,
+ FIX2INT(abi),
+ n_call_args,
+ ffi_return_type,
+ ffi_arg_types);
+ }
+ if (result != FFI_OK) {
+ xfree(ffi_arg_types);
+ args.cif->arg_types = NULL;
+ rb_raise(rb_eRuntimeError, "error creating CIF %d", result);
+ }
+ }
+
generic_args = ALLOCV(alloc_buffer,
- (size_t)(argc + 1) * sizeof(void *) + (size_t)argc * sizeof(fiddle_generic));
+ sizeof(fiddle_generic) * n_call_args +
+ sizeof(void *) * (n_call_args + 1));
args.values = (void **)((char *)generic_args +
- (size_t)argc * sizeof(fiddle_generic));
-
- for (i = 0; i < argc; i++) {
- VALUE type = RARRAY_AREF(types, i);
- VALUE src = argv[i];
- int argtype = FIX2INT(type);
-
- if (argtype == TYPE_VOIDP) {
- if(NIL_P(src)) {
- src = INT2FIX(0);
- } else if(cPointer != CLASS_OF(src)) {
- src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
- }
- src = rb_Integer(src);
- }
-
- VALUE2GENERIC(argtype, src, &generic_args[i]);
- args.values[i] = (void *)&generic_args[i];
+ sizeof(fiddle_generic) * n_call_args);
+
+ for (i = 0, i_call = 0;
+ i < argc && i_call < n_call_args;
+ i++, i_call++) {
+ VALUE arg_type;
+ int c_arg_type;
+ VALUE original_src;
+ VALUE src;
+ arg_type = RARRAY_AREF(arg_types, i_call);
+ c_arg_type = FIX2INT(arg_type);
+ if (i >= n_fixed_args) {
+ i++;
+ }
+ src = argv[i];
+
+ if (c_arg_type == TYPE_VOIDP) {
+ if (NIL_P(src)) {
+ src = INT2FIX(0);
+ }
+ else if (cPointer != CLASS_OF(src)) {
+ src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
+ if (NIL_P(converted_args)) {
+ converted_args = rb_ary_new();
+ }
+ rb_ary_push(converted_args, src);
+ }
+ src = rb_Integer(src);
+ }
+
+ original_src = src;
+ VALUE2GENERIC(c_arg_type, src, &generic_args[i_call]);
+ if (src != original_src) {
+ if (NIL_P(converted_args)) {
+ converted_args = rb_ary_new();
+ }
+ rb_ary_push(converted_args, src);
+ }
+ args.values[i_call] = (void *)&generic_args[i_call];
}
- args.values[argc] = NULL;
+ args.values[i_call] = NULL;
args.fn = (void(*)(void))NUM2PTR(cfunc);
- (void)rb_thread_call_without_gvl(nogvl_ffi_call, &args, 0, 0);
+ if (RTEST(need_gvl)) {
+ ffi_call(args.cif, args.fn, &(args.retval), args.values);
+ }
+ else {
+ (void)rb_thread_call_without_gvl(nogvl_ffi_call, &args, 0, 0);
+ }
- rb_funcall(mFiddle, rb_intern("last_error="), 1, INT2NUM(errno));
+ {
+ int errno_keep = errno;
#if defined(_WIN32)
- rb_funcall(mFiddle, rb_intern("win32_last_error="), 1, INT2NUM(errno));
+ DWORD error = WSAGetLastError();
+ int socket_error = WSAGetLastError();
+ rb_funcall(mFiddle, rb_intern("win32_last_error="), 1,
+ ULONG2NUM(error));
+ rb_funcall(mFiddle, rb_intern("win32_last_socket_error="), 1,
+ INT2NUM(socket_error));
#endif
+ rb_funcall(mFiddle, rb_intern("last_error="), 1, INT2NUM(errno_keep));
+ }
ALLOCV_END(alloc_buffer);
@@ -287,6 +459,10 @@ Init_fiddle_function(void)
* Caller must ensure the underlying function is called in a
* thread-safe manner if running in a multi-threaded process.
*
+ * Note that it is not thread-safe to use this method to
+ * directly or indirectly call many Ruby C-extension APIs unless
+ * you don't pass +need_gvl: true+ to Fiddle::Function#new.
+ *
* For an example see Fiddle::Function
*
*/
@@ -294,13 +470,20 @@ Init_fiddle_function(void)
/*
* Document-method: new
- * call-seq: new(ptr, args, ret_type, abi = DEFAULT)
+ * call-seq: new(ptr,
+ * args,
+ * ret_type,
+ * abi = DEFAULT,
+ * name: nil,
+ * need_gvl: false)
*
* Constructs a Function object.
* * +ptr+ is a referenced function, of a Fiddle::Handle
* * +args+ is an Array of arguments, passed to the +ptr+ function
* * +ret_type+ is the return type of the function
* * +abi+ is the ABI of the function
+ * * +name+ is the name of the function
+ * * +need_gvl+ is whether GVL is needed to call the function
*
*/
rb_define_method(cFiddleFunction, "initialize", initialize, -1);
diff --git a/ext/fiddle/handle.c b/ext/fiddle/handle.c
index 700924afb5..ae8cc3a581 100644
--- a/ext/fiddle/handle.c
+++ b/ext/fiddle/handle.c
@@ -74,14 +74,14 @@ rb_fiddle_handle_close(VALUE self)
/* Check dlclose for successful return value */
if(ret) {
#if defined(HAVE_DLERROR)
- rb_raise(rb_eFiddleError, "%s", dlerror());
+ rb_raise(rb_eFiddleDLError, "%s", dlerror());
#else
- rb_raise(rb_eFiddleError, "could not close handle");
+ rb_raise(rb_eFiddleDLError, "could not close handle");
#endif
}
return INT2NUM(ret);
}
- rb_raise(rb_eFiddleError, "dlclose() called too many times");
+ rb_raise(rb_eFiddleDLError, "dlclose() called too many times");
UNREACHABLE;
}
@@ -177,12 +177,12 @@ rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self)
ptr = dlopen(clib, cflag);
#if defined(HAVE_DLERROR)
if( !ptr && (err = dlerror()) ){
- rb_raise(rb_eFiddleError, "%s", err);
+ rb_raise(rb_eFiddleDLError, "%s", err);
}
#else
if( !ptr ){
err = dlerror();
- rb_raise(rb_eFiddleError, "%s", err);
+ rb_raise(rb_eFiddleDLError, "%s", err);
}
#endif
TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
@@ -259,7 +259,21 @@ rb_fiddle_handle_to_i(VALUE self)
struct dl_handle *fiddle_handle;
TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
- return PTR2NUM(fiddle_handle);
+ return PTR2NUM(fiddle_handle->ptr);
+}
+
+/*
+ * call-seq: to_ptr
+ *
+ * Returns the Fiddle::Pointer of this handle.
+ */
+static VALUE
+rb_fiddle_handle_to_ptr(VALUE self)
+{
+ struct dl_handle *fiddle_handle;
+
+ TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
+ return rb_fiddle_ptr_new_wrap(fiddle_handle->ptr, 0, 0, self, 0);
}
static VALUE fiddle_handle_sym(void *handle, VALUE symbol);
@@ -278,7 +292,7 @@ rb_fiddle_handle_sym(VALUE self, VALUE sym)
TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
if( ! fiddle_handle->open ){
- rb_raise(rb_eFiddleError, "closed handle");
+ rb_raise(rb_eFiddleDLError, "closed handle");
}
return fiddle_handle_sym(fiddle_handle->ptr, sym);
@@ -307,8 +321,10 @@ rb_fiddle_handle_s_sym(VALUE self, VALUE sym)
return fiddle_handle_sym(RTLD_NEXT, sym);
}
-static VALUE
-fiddle_handle_sym(void *handle, VALUE symbol)
+typedef void (*fiddle_void_func)(void);
+
+static fiddle_void_func
+fiddle_handle_find_func(void *handle, VALUE symbol)
{
#if defined(HAVE_DLERROR)
const char *err;
@@ -316,13 +332,13 @@ fiddle_handle_sym(void *handle, VALUE symbol)
#else
# define CHECK_DLERROR
#endif
- void (*func)();
+ fiddle_void_func func;
const char *name = StringValueCStr(symbol);
#ifdef HAVE_DLERROR
dlerror();
#endif
- func = (void (*)())(VALUE)dlsym(handle, name);
+ func = (fiddle_void_func)(VALUE)dlsym(handle, name);
CHECK_DLERROR;
#if defined(FUNC_STDCALL)
if( !func ){
@@ -365,13 +381,102 @@ fiddle_handle_sym(void *handle, VALUE symbol)
xfree(name_n);
}
#endif
+
+ return func;
+}
+
+static VALUE
+rb_fiddle_handle_s_sym_defined(VALUE self, VALUE sym)
+{
+ fiddle_void_func func;
+
+ func = fiddle_handle_find_func(RTLD_NEXT, sym);
+
+ if( func ) {
+ return PTR2NUM(func);
+ }
+ else {
+ return Qnil;
+ }
+}
+
+static VALUE
+rb_fiddle_handle_sym_defined(VALUE self, VALUE sym)
+{
+ struct dl_handle *fiddle_handle;
+ fiddle_void_func func;
+
+ TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
+ if( ! fiddle_handle->open ){
+ rb_raise(rb_eFiddleDLError, "closed handle");
+ }
+
+ func = fiddle_handle_find_func(fiddle_handle->ptr, sym);
+
+ if( func ) {
+ return PTR2NUM(func);
+ }
+ else {
+ return Qnil;
+ }
+}
+
+static VALUE
+fiddle_handle_sym(void *handle, VALUE symbol)
+{
+ fiddle_void_func func;
+
+ func = fiddle_handle_find_func(handle, symbol);
+
if( !func ){
- rb_raise(rb_eFiddleError, "unknown symbol \"%"PRIsVALUE"\"", symbol);
+ rb_raise(rb_eFiddleDLError, "unknown symbol \"%"PRIsVALUE"\"", symbol);
}
return PTR2NUM(func);
}
+/*
+ * call-seq: file_name
+ *
+ * Returns the file name of this handle.
+ */
+static VALUE
+rb_fiddle_handle_file_name(VALUE self)
+{
+ struct dl_handle *fiddle_handle;
+
+ TypedData_Get_Struct(self, struct dl_handle, &fiddle_handle_data_type, fiddle_handle);
+
+#if defined(HAVE_DLINFO) && defined(HAVE_CONST_RTLD_DI_LINKMAP)
+ {
+ struct link_map *lm = NULL;
+ int res = dlinfo(fiddle_handle->ptr, RTLD_DI_LINKMAP, &lm);
+ if (res == 0 && lm != NULL) {
+ return rb_str_new_cstr(lm->l_name);
+ }
+ else {
+#if defined(HAVE_DLERROR)
+ rb_raise(rb_eFiddleDLError, "could not get handle file name: %s", dlerror());
+#else
+ rb_raise(rb_eFiddleDLError, "could not get handle file name");
+#endif
+ }
+ }
+#elif defined(HAVE_GETMODULEFILENAME)
+ {
+ char filename[MAX_PATH];
+ DWORD res = GetModuleFileName(fiddle_handle->ptr, filename, MAX_PATH);
+ if (res == 0) {
+ rb_raise(rb_eFiddleDLError, "could not get handle file name: %s", dlerror());
+ }
+ return rb_str_new_cstr(filename);
+ }
+#else
+ (void)fiddle_handle;
+ return Qnil;
+#endif
+}
+
void
Init_fiddle_handle(void)
{
@@ -412,6 +517,7 @@ Init_fiddle_handle(void)
rb_cHandle = rb_define_class_under(mFiddle, "Handle", rb_cObject);
rb_define_alloc_func(rb_cHandle, rb_fiddle_handle_s_allocate);
rb_define_singleton_method(rb_cHandle, "sym", rb_fiddle_handle_s_sym, 1);
+ rb_define_singleton_method(rb_cHandle, "sym_defined?", rb_fiddle_handle_s_sym_defined, 1);
rb_define_singleton_method(rb_cHandle, "[]", rb_fiddle_handle_s_sym, 1);
/* Document-const: NEXT
@@ -466,9 +572,12 @@ Init_fiddle_handle(void)
rb_define_method(rb_cHandle, "initialize", rb_fiddle_handle_initialize, -1);
rb_define_method(rb_cHandle, "to_i", rb_fiddle_handle_to_i, 0);
+ rb_define_method(rb_cHandle, "to_ptr", rb_fiddle_handle_to_ptr, 0);
rb_define_method(rb_cHandle, "close", rb_fiddle_handle_close, 0);
rb_define_method(rb_cHandle, "sym", rb_fiddle_handle_sym, 1);
rb_define_method(rb_cHandle, "[]", rb_fiddle_handle_sym, 1);
+ rb_define_method(rb_cHandle, "sym_defined?", rb_fiddle_handle_sym_defined, 1);
+ rb_define_method(rb_cHandle, "file_name", rb_fiddle_handle_file_name, 0);
rb_define_method(rb_cHandle, "disable_close", rb_fiddle_handle_disable_close, 0);
rb_define_method(rb_cHandle, "enable_close", rb_fiddle_handle_enable_close, 0);
rb_define_method(rb_cHandle, "close_enabled?", rb_fiddle_handle_close_enabled_p, 0);
diff --git a/ext/fiddle/lib/fiddle.rb b/ext/fiddle/lib/fiddle.rb
index e9aa7e50ae..6137c487c6 100644
--- a/ext/fiddle/lib/fiddle.rb
+++ b/ext/fiddle/lib/fiddle.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
+
require 'fiddle.so'
-require 'fiddle/function'
require 'fiddle/closure'
+require 'fiddle/function'
+require 'fiddle/version'
module Fiddle
if WINDOWS
@@ -15,6 +17,18 @@ module Fiddle
def self.win32_last_error= error
Thread.current[:__FIDDLE_WIN32_LAST_ERROR__] = error
end
+
+ # Returns the last win32 socket +Error+ of the current executing
+ # +Thread+ or nil if none
+ def self.win32_last_socket_error
+ Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__]
+ end
+
+ # Sets the last win32 socket +Error+ of the current executing
+ # +Thread+ to +error+
+ def self.win32_last_socket_error= error
+ Thread.current[:__FIDDLE_WIN32_LAST_SOCKET_ERROR__] = error
+ end
end
# Returns the last +Error+ of the current executing +Thread+ or nil if none
@@ -44,7 +58,36 @@ module Fiddle
#
# See Fiddle::Handle.new for more.
def dlopen library
- Fiddle::Handle.new library
+ begin
+ Fiddle::Handle.new(library)
+ rescue DLError => error
+ case RUBY_PLATFORM
+ when /linux/
+ case error.message
+ when /\A(\/.+?): (?:invalid ELF header|file too short)/
+ # This may be a linker script:
+ # https://sourceware.org/binutils/docs/ld.html#Scripts
+ path = $1
+ else
+ raise
+ end
+ else
+ raise
+ end
+
+ File.open(path) do |input|
+ input.each_line do |line|
+ case line
+ when /\A\s*(?:INPUT|GROUP)\s*\(\s*([^\s,\)]+)/
+ # TODO: Should we support multiple files?
+ return dlopen($1)
+ end
+ end
+ end
+
+ # Not found
+ raise
+ end
end
module_function :dlopen
@@ -53,4 +96,8 @@ module Fiddle
RTLD_GLOBAL = Handle::RTLD_GLOBAL # :nodoc:
RTLD_LAZY = Handle::RTLD_LAZY # :nodoc:
RTLD_NOW = Handle::RTLD_NOW # :nodoc:
+
+ Fiddle::Types.constants.each do |type|
+ const_set "TYPE_#{type}", Fiddle::Types.const_get(type)
+ end
end
diff --git a/ext/fiddle/lib/fiddle/closure.rb b/ext/fiddle/lib/fiddle/closure.rb
index c865a63c20..7e0077ea52 100644
--- a/ext/fiddle/lib/fiddle/closure.rb
+++ b/ext/fiddle/lib/fiddle/closure.rb
@@ -1,6 +1,31 @@
# frozen_string_literal: true
module Fiddle
class Closure
+ class << self
+ # Create a new closure. If a block is given, the created closure
+ # is automatically freed after the given block is executed.
+ #
+ # The all given arguments are passed to Fiddle::Closure.new. So
+ # using this method without block equals to Fiddle::Closure.new.
+ #
+ # == Example
+ #
+ # Fiddle::Closure.create(TYPE_INT, [TYPE_INT]) do |closure|
+ # # closure is freed automatically when this block is finished.
+ # end
+ def create(*args)
+ if block_given?
+ closure = new(*args)
+ begin
+ yield(closure)
+ ensure
+ closure.free
+ end
+ else
+ new(*args)
+ end
+ end
+ end
# the C type of the return of the FFI closure
attr_reader :ctype
diff --git a/ext/fiddle/lib/fiddle/cparser.rb b/ext/fiddle/lib/fiddle/cparser.rb
index cd0a64fef5..9a70402953 100644
--- a/ext/fiddle/lib/fiddle/cparser.rb
+++ b/ext/fiddle/lib/fiddle/cparser.rb
@@ -35,12 +35,37 @@ module Fiddle
def parse_struct_signature(signature, tymap=nil)
if signature.is_a?(String)
signature = split_arguments(signature, /[,;]/)
+ elsif signature.is_a?(Hash)
+ signature = [signature]
end
mems = []
tys = []
signature.each{|msig|
- msig = compact(msig)
+ msig = compact(msig) if msig.is_a?(String)
case msig
+ when Hash
+ msig.each do |struct_name, struct_signature|
+ struct_name = struct_name.to_s if struct_name.is_a?(Symbol)
+ struct_name = compact(struct_name)
+ struct_count = nil
+ if struct_name =~ /^([\w\*\s]+)\[(\d+)\]$/
+ struct_count = $2.to_i
+ struct_name = $1
+ end
+ if struct_signature.respond_to?(:entity_class)
+ struct_type = struct_signature
+ else
+ parsed_struct = parse_struct_signature(struct_signature, tymap)
+ struct_type = CStructBuilder.create(CStruct, *parsed_struct)
+ end
+ if struct_count
+ ty = [struct_type, struct_count]
+ else
+ ty = struct_type
+ end
+ mems.push([struct_name, struct_type.members])
+ tys.push(ty)
+ end
when /^[\w\*\s]+[\*\s](\w+)$/
mems.push($1)
tys.push(parse_ctype(msig, tymap))
@@ -123,55 +148,97 @@ module Fiddle
#
def parse_ctype(ty, tymap=nil)
tymap ||= {}
- case ty
- when Array
+ if ty.is_a?(Array)
return [parse_ctype(ty[0], tymap), ty[1]]
+ end
+ ty = ty.gsub(/\Aconst\s+/, "")
+ case ty
when 'void'
return TYPE_VOID
- when /^(?:(?:signed\s+)?long\s+long(?:\s+int\s+)?|int64_t)(?:\s+\w+)?$/
- if( defined?(TYPE_LONG_LONG) )
- return TYPE_LONG_LONG
- else
+ when /\A(?:(?:signed\s+)?long\s+long(?:\s+int\s+)?|int64_t)(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_LONG_LONG)
raise(RuntimeError, "unsupported type: #{ty}")
end
- when /^(?:unsigned\s+long\s+long(?:\s+int\s+)?|uint64_t)(?:\s+\w+)?$/
- if( defined?(TYPE_LONG_LONG) )
- return -TYPE_LONG_LONG
- else
+ return TYPE_LONG_LONG
+ when /\A(?:unsigned\s+long\s+long(?:\s+int\s+)?|uint64_t)(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_LONG_LONG)
raise(RuntimeError, "unsupported type: #{ty}")
end
- when /^(?:signed\s+)?long(?:\s+int\s+)?(?:\s+\w+)?$/
+ return TYPE_ULONG_LONG
+ when /\A(?:signed\s+)?long(?:\s+int\s+)?(?:\s+\w+)?\z/
return TYPE_LONG
- when /^unsigned\s+long(?:\s+int\s+)?(?:\s+\w+)?$/
- return -TYPE_LONG
- when /^(?:signed\s+)?int(?:\s+\w+)?$/
+ when /\Aunsigned\s+long(?:\s+int\s+)?(?:\s+\w+)?\z/
+ return TYPE_ULONG
+ when /\A(?:signed\s+)?int(?:\s+\w+)?\z/
return TYPE_INT
- when /^(?:unsigned\s+int|uint)(?:\s+\w+)?$/
- return -TYPE_INT
- when /^(?:signed\s+)?short(?:\s+int\s+)?(?:\s+\w+)?$/
+ when /\A(?:unsigned\s+int|uint)(?:\s+\w+)?\z/
+ return TYPE_UINT
+ when /\A(?:signed\s+)?short(?:\s+int\s+)?(?:\s+\w+)?\z/
return TYPE_SHORT
- when /^unsigned\s+short(?:\s+int\s+)?(?:\s+\w+)?$/
- return -TYPE_SHORT
- when /^(?:signed\s+)?char(?:\s+\w+)?$/
+ when /\Aunsigned\s+short(?:\s+int\s+)?(?:\s+\w+)?\z/
+ return TYPE_USHORT
+ when /\A(?:signed\s+)?char(?:\s+\w+)?\z/
return TYPE_CHAR
- when /^unsigned\s+char(?:\s+\w+)?$/
- return -TYPE_CHAR
- when /^float(?:\s+\w+)?$/
+ when /\Aunsigned\s+char(?:\s+\w+)?\z/
+ return TYPE_UCHAR
+ when /\Aint8_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT8_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_INT8_T
+ when /\Auint8_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT8_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_UINT8_T
+ when /\Aint16_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT16_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_INT16_T
+ when /\Auint16_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT16_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_UINT16_T
+ when /\Aint32_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT32_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_INT32_T
+ when /\Auint32_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT32_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_UINT32_T
+ when /\Aint64_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT64_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_INT64_T
+ when /\Auint64_t(?:\s+\w+)?\z/
+ unless Fiddle.const_defined?(:TYPE_INT64_T)
+ raise(RuntimeError, "unsupported type: #{ty}")
+ end
+ return TYPE_UINT64_T
+ when /\Afloat(?:\s+\w+)?\z/
return TYPE_FLOAT
- when /^double(?:\s+\w+)?$/
+ when /\Adouble(?:\s+\w+)?\z/
return TYPE_DOUBLE
- when /^size_t(?:\s+\w+)?$/
+ when /\Asize_t(?:\s+\w+)?\z/
return TYPE_SIZE_T
- when /^ssize_t(?:\s+\w+)?$/
+ when /\Assize_t(?:\s+\w+)?\z/
return TYPE_SSIZE_T
- when /^ptrdiff_t(?:\s+\w+)?$/
+ when /\Aptrdiff_t(?:\s+\w+)?\z/
return TYPE_PTRDIFF_T
- when /^intptr_t(?:\s+\w+)?$/
+ when /\Aintptr_t(?:\s+\w+)?\z/
return TYPE_INTPTR_T
- when /^uintptr_t(?:\s+\w+)?$/
+ when /\Auintptr_t(?:\s+\w+)?\z/
return TYPE_UINTPTR_T
when /\*/, /\[[\s\d]*\]/
return TYPE_VOIDP
+ when "..."
+ return TYPE_VARIADIC
else
ty = ty.split(' ', 2)[0]
if( tymap[ty] )
@@ -186,7 +253,7 @@ module Fiddle
def split_arguments(arguments, sep=',')
return [] if arguments.strip == 'void'
- arguments.scan(/([\w\*\s]+\(\*\w*\)\(.*?\)|[\w\*\s\[\]]+)(?:#{sep}\s*|$)/).collect {|m| m[0]}
+ arguments.scan(/([\w\*\s]+\(\*\w*\)\(.*?\)|[\w\*\s\[\]]+|\.\.\.)(?:#{sep}\s*|\z)/).collect {|m| m[0]}
end
def compact(signature)
diff --git a/ext/fiddle/lib/fiddle/function.rb b/ext/fiddle/lib/fiddle/function.rb
index dd5e04e417..dc2e3e6bf5 100644
--- a/ext/fiddle/lib/fiddle/function.rb
+++ b/ext/fiddle/lib/fiddle/function.rb
@@ -10,9 +10,20 @@ module Fiddle
# The name of this function
attr_reader :name
+ # Whether GVL is needed to call this function
+ def need_gvl?
+ @need_gvl
+ end
+
# The integer memory location of this function
def to_i
ptr.to_i
end
+
+ # Turn this function in to a proc
+ def to_proc
+ this = self
+ lambda { |*args| this.call(*args) }
+ end
end
end
diff --git a/ext/fiddle/lib/fiddle/import.rb b/ext/fiddle/lib/fiddle/import.rb
index 178ebb8c76..09ffcef544 100644
--- a/ext/fiddle/lib/fiddle/import.rb
+++ b/ext/fiddle/lib/fiddle/import.rb
@@ -83,11 +83,7 @@ module Fiddle
when Importer
lib.handlers
else
- begin
- Fiddle.dlopen(lib)
- rescue DLError
- raise(DLError, "can't load #{lib}")
- end
+ Fiddle.dlopen(lib)
end
}.flatten()
@handler = CompositeHandler.new(handles)
@@ -121,6 +117,8 @@ module Fiddle
return SIZEOF_DOUBLE
when TYPE_VOIDP
return SIZEOF_VOIDP
+ when TYPE_CONST_STRING
+ return SIZEOF_CONST_STRING
else
if defined?(TYPE_LONG_LONG) and
ty == TYPE_LONG_LONG
diff --git a/ext/fiddle/lib/fiddle/pack.rb b/ext/fiddle/lib/fiddle/pack.rb
index 22eccedb76..545b985d50 100644
--- a/ext/fiddle/lib/fiddle/pack.rb
+++ b/ext/fiddle/lib/fiddle/pack.rb
@@ -11,24 +11,24 @@ module Fiddle
TYPE_LONG => ALIGN_LONG,
TYPE_FLOAT => ALIGN_FLOAT,
TYPE_DOUBLE => ALIGN_DOUBLE,
- -TYPE_CHAR => ALIGN_CHAR,
- -TYPE_SHORT => ALIGN_SHORT,
- -TYPE_INT => ALIGN_INT,
- -TYPE_LONG => ALIGN_LONG,
+ TYPE_UCHAR => ALIGN_CHAR,
+ TYPE_USHORT => ALIGN_SHORT,
+ TYPE_UINT => ALIGN_INT,
+ TYPE_ULONG => ALIGN_LONG,
}
PACK_MAP = {
- TYPE_VOIDP => "l!",
+ TYPE_VOIDP => "L!",
TYPE_CHAR => "c",
TYPE_SHORT => "s!",
TYPE_INT => "i!",
TYPE_LONG => "l!",
TYPE_FLOAT => "f",
TYPE_DOUBLE => "d",
- -TYPE_CHAR => "c",
- -TYPE_SHORT => "s!",
- -TYPE_INT => "i!",
- -TYPE_LONG => "l!",
+ TYPE_UCHAR => "C",
+ TYPE_USHORT => "S!",
+ TYPE_UINT => "I!",
+ TYPE_ULONG => "L!",
}
SIZE_MAP = {
@@ -39,16 +39,17 @@ module Fiddle
TYPE_LONG => SIZEOF_LONG,
TYPE_FLOAT => SIZEOF_FLOAT,
TYPE_DOUBLE => SIZEOF_DOUBLE,
- -TYPE_CHAR => SIZEOF_CHAR,
- -TYPE_SHORT => SIZEOF_SHORT,
- -TYPE_INT => SIZEOF_INT,
- -TYPE_LONG => SIZEOF_LONG,
+ TYPE_UCHAR => SIZEOF_CHAR,
+ TYPE_USHORT => SIZEOF_SHORT,
+ TYPE_UINT => SIZEOF_INT,
+ TYPE_ULONG => SIZEOF_LONG,
}
if defined?(TYPE_LONG_LONG)
- ALIGN_MAP[TYPE_LONG_LONG] = ALIGN_MAP[-TYPE_LONG_LONG] = ALIGN_LONG_LONG
- PACK_MAP[TYPE_LONG_LONG] = PACK_MAP[-TYPE_LONG_LONG] = "q"
- SIZE_MAP[TYPE_LONG_LONG] = SIZE_MAP[-TYPE_LONG_LONG] = SIZEOF_LONG_LONG
- PACK_MAP[TYPE_VOIDP] = "q" if SIZEOF_LONG_LONG == SIZEOF_VOIDP
+ ALIGN_MAP[TYPE_LONG_LONG] = ALIGN_MAP[TYPE_ULONG_LONG] = ALIGN_LONG_LONG
+ PACK_MAP[TYPE_LONG_LONG] = "q"
+ PACK_MAP[TYPE_ULONG_LONG] = "Q"
+ SIZE_MAP[TYPE_LONG_LONG] = SIZE_MAP[TYPE_ULONG_LONG] = SIZEOF_LONG_LONG
+ PACK_MAP[TYPE_VOIDP] = "Q" if SIZEOF_LONG_LONG == SIZEOF_VOIDP
end
def align(addr, align)
diff --git a/ext/fiddle/lib/fiddle/struct.rb b/ext/fiddle/lib/fiddle/struct.rb
index 7c0dedb39f..6d05bbd742 100644
--- a/ext/fiddle/lib/fiddle/struct.rb
+++ b/ext/fiddle/lib/fiddle/struct.rb
@@ -4,20 +4,168 @@ require 'fiddle/value'
require 'fiddle/pack'
module Fiddle
- # C struct shell
+ # A base class for objects representing a C structure
class CStruct
+ include Enumerable
+
# accessor to Fiddle::CStructEntity
def CStruct.entity_class
CStructEntity
end
+
+ def self.offsetof(name, members, types) # :nodoc:
+ offset = 0
+ worklist = name.split('.')
+ this_type = self
+ while search_name = worklist.shift
+ index = 0
+ member_index = members.index(search_name)
+
+ unless member_index
+ # Possibly a sub-structure
+ member_index = members.index { |member_name, _|
+ member_name == search_name
+ }
+ return unless member_index
+ end
+
+ types.each { |type, count = 1|
+ orig_offset = offset
+ if type.respond_to?(:entity_class)
+ align = type.alignment
+ type_size = type.size
+ else
+ align = PackInfo::ALIGN_MAP[type]
+ type_size = PackInfo::SIZE_MAP[type]
+ end
+
+ # Unions shouldn't advance the offset
+ if this_type.entity_class == CUnionEntity
+ type_size = 0
+ end
+
+ offset = PackInfo.align(orig_offset, align)
+
+ if worklist.empty?
+ return offset if index == member_index
+ else
+ if index == member_index
+ subtype = types[member_index]
+ members = subtype.members
+ types = subtype.types
+ this_type = subtype
+ break
+ end
+ end
+
+ offset += (type_size * count)
+ index += 1
+ }
+ end
+ nil
+ end
+
+ def each
+ return enum_for(__function__) unless block_given?
+
+ self.class.members.each do |name,|
+ yield(self[name])
+ end
+ end
+
+ def each_pair
+ return enum_for(__function__) unless block_given?
+
+ self.class.members.each do |name,|
+ yield(name, self[name])
+ end
+ end
+
+ def to_h
+ hash = {}
+ each_pair do |name, value|
+ hash[name] = unstruct(value)
+ end
+ hash
+ end
+
+ def replace(another)
+ if another.nil?
+ self.class.members.each do |name,|
+ self[name] = nil
+ end
+ elsif another.respond_to?(:each_pair)
+ another.each_pair do |name, value|
+ self[name] = value
+ end
+ else
+ another.each do |name, value|
+ self[name] = value
+ end
+ end
+ self
+ end
+
+ private
+ def unstruct(value)
+ case value
+ when CStruct
+ value.to_h
+ when Array
+ value.collect do |v|
+ unstruct(v)
+ end
+ else
+ value
+ end
+ end
end
- # C union shell
+ # A base class for objects representing a C union
class CUnion
# accessor to Fiddle::CUnionEntity
def CUnion.entity_class
CUnionEntity
end
+
+ def self.offsetof(name, members, types) # :nodoc:
+ 0
+ end
+ end
+
+ # Wrapper for arrays within a struct
+ class StructArray < Array
+ include ValueUtil
+
+ def initialize(ptr, type, initial_values)
+ @ptr = ptr
+ @type = type
+ @is_struct = @type.respond_to?(:entity_class)
+ if @is_struct
+ super(initial_values)
+ else
+ @size = Fiddle::PackInfo::SIZE_MAP[type]
+ @pack_format = Fiddle::PackInfo::PACK_MAP[type]
+ super(initial_values.collect { |v| unsigned_value(v, type) })
+ end
+ end
+
+ def to_ptr
+ @ptr
+ end
+
+ def []=(index, value)
+ if index < 0 || index >= size
+ raise IndexError, 'index %d outside of array bounds 0...%d' % [index, size]
+ end
+
+ if @is_struct
+ self[index].replace(value)
+ else
+ to_ptr[index * @size, @size] = [value].pack(@pack_format)
+ super(index, value)
+ end
+ end
end
# Used to construct C classes (CUnion, CStruct, etc)
@@ -35,7 +183,7 @@ module Fiddle
# Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an
# easy-to-use manner.
#
- # Example:
+ # Examples:
#
# require 'fiddle/struct'
# require 'fiddle/cparser'
@@ -46,47 +194,113 @@ module Fiddle
#
# MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)
#
- # obj = MyStruct.allocate
+ # MyStruct.malloc(Fiddle::RUBY_FREE) do |obj|
+ # ...
+ # end
+ #
+ # obj = MyStruct.malloc(Fiddle::RUBY_FREE)
+ # begin
+ # ...
+ # ensure
+ # obj.call_free
+ # end
+ #
+ # obj = MyStruct.malloc
+ # begin
+ # ...
+ # ensure
+ # Fiddle.free obj.to_ptr
+ # end
#
def create(klass, types, members)
new_class = Class.new(klass){
- define_method(:initialize){|addr|
- @entity = klass.entity_class.new(addr, types)
+ define_method(:initialize){|addr, func = nil|
+ if addr.is_a?(self.class.entity_class)
+ @entity = addr
+ else
+ @entity = self.class.entity_class.new(addr, types, func)
+ end
@entity.assign_names(members)
}
+ define_method(:[]) { |*args| @entity.send(:[], *args) }
+ define_method(:[]=) { |*args| @entity.send(:[]=, *args) }
define_method(:to_ptr){ @entity }
define_method(:to_i){ @entity.to_i }
+ define_singleton_method(:types) { types }
+ define_singleton_method(:members) { members }
+
+ # Return the offset of a struct member given its name.
+ # For example:
+ #
+ # MyStruct = struct [
+ # "int64_t i",
+ # "char c",
+ # ]
+ #
+ # MyStruct.offsetof("i") # => 0
+ # MyStruct.offsetof("c") # => 8
+ #
+ define_singleton_method(:offsetof) { |name|
+ klass.offsetof(name, members, types)
+ }
members.each{|name|
+ name = name[0] if name.is_a?(Array) # name is a nested struct
+ next if method_defined?(name)
define_method(name){ @entity[name] }
define_method(name + "="){|val| @entity[name] = val }
}
- }
- size = klass.entity_class.size(types)
- new_class.module_eval(<<-EOS, __FILE__, __LINE__+1)
- def new_class.size()
- #{size}
- end
- def new_class.malloc()
- addr = Fiddle.malloc(#{size})
- new(addr)
+ entity_class = klass.entity_class
+ alignment = entity_class.alignment(types)
+ size = entity_class.size(types)
+ define_singleton_method(:alignment) { alignment }
+ define_singleton_method(:size) { size }
+ define_singleton_method(:malloc) do |func=nil, &block|
+ if block
+ entity_class.malloc(types, func, size) do |entity|
+ block.call(new(entity))
+ end
+ else
+ new(entity_class.malloc(types, func, size))
+ end
end
- EOS
+ }
return new_class
end
module_function :create
end
- # A C struct wrapper
+ # A pointer to a C structure
class CStructEntity < Fiddle::Pointer
include PackInfo
include ValueUtil
+ def CStructEntity.alignment(types)
+ max = 1
+ types.each do |type, count = 1|
+ if type.respond_to?(:entity_class)
+ n = type.alignment
+ else
+ n = ALIGN_MAP[type]
+ end
+ max = n if n > max
+ end
+ max
+ end
+
# Allocates a C struct with the +types+ provided.
#
- # When the instance is garbage collected, the C function +func+ is called.
- def CStructEntity.malloc(types, func = nil)
- addr = Fiddle.malloc(CStructEntity.size(types))
- CStructEntity.new(addr, types, func)
+ # See Fiddle::Pointer.malloc for memory management issues.
+ def CStructEntity.malloc(types, func = nil, size = size(types), &block)
+ if block_given?
+ super(size, func) do |struct|
+ struct.set_ctypes types
+ yield struct
+ end
+ else
+ struct = super(size, func)
+ struct.set_ctypes types
+ struct
+ end
end
# Returns the offset for the packed sizes for the given +types+.
@@ -102,9 +316,15 @@ module Fiddle
max_align = types.map { |type, count = 1|
last_offset = offset
- align = PackInfo::ALIGN_MAP[type]
+ if type.respond_to?(:entity_class)
+ align = type.alignment
+ type_size = type.size
+ else
+ align = PackInfo::ALIGN_MAP[type]
+ type_size = PackInfo::SIZE_MAP[type]
+ end
offset = PackInfo.align(last_offset, align) +
- (PackInfo::SIZE_MAP[type] * count)
+ (type_size * count)
align
}.max
@@ -118,13 +338,37 @@ module Fiddle
#
# See also Fiddle::Pointer.new
def initialize(addr, types, func = nil)
+ if func && addr.is_a?(Pointer) && addr.free
+ raise ArgumentError, 'free function specified on both underlying struct Pointer and when creating a CStructEntity - who do you want to free this?'
+ end
set_ctypes(types)
super(addr, @size, func)
end
# Set the names of the +members+ in this C struct
def assign_names(members)
- @members = members
+ @members = []
+ @nested_structs = {}
+ members.each_with_index do |member, index|
+ if member.is_a?(Array) # nested struct
+ member_name = member[0]
+ struct_type, struct_count = @ctypes[index]
+ if struct_count.nil?
+ struct = struct_type.new(to_i + @offset[index])
+ else
+ structs = struct_count.times.map do |i|
+ struct_type.new(to_i + @offset[index] + i * struct_type.size)
+ end
+ struct = StructArray.new(to_i + @offset[index],
+ struct_type,
+ structs)
+ end
+ @nested_structs[member_name] = struct
+ else
+ member_name = member
+ end
+ @members << member_name
+ end
end
# Calculates the offsets and sizes for the given +types+ in the struct.
@@ -135,12 +379,18 @@ module Fiddle
max_align = types.map { |type, count = 1|
orig_offset = offset
- align = ALIGN_MAP[type]
+ if type.respond_to?(:entity_class)
+ align = type.alignment
+ type_size = type.size
+ else
+ align = ALIGN_MAP[type]
+ type_size = SIZE_MAP[type]
+ end
offset = PackInfo.align(orig_offset, align)
@offset << offset
- offset += (SIZE_MAP[type] * count)
+ offset += (type_size * count)
align
}.max
@@ -148,15 +398,34 @@ module Fiddle
@size = PackInfo.align(offset, max_align)
end
- # Fetch struct member +name+
- def [](name)
+ # Fetch struct member +name+ if only one argument is specified. If two
+ # arguments are specified, the first is an offset and the second is a
+ # length and this method returns the string of +length+ bytes beginning at
+ # +offset+.
+ #
+ # Examples:
+ #
+ # my_struct = struct(['int id']).malloc
+ # my_struct.id = 1
+ # my_struct['id'] # => 1
+ # my_struct[0, 4] # => "\x01\x00\x00\x00".b
+ #
+ def [](*args)
+ return super(*args) if args.size > 1
+ name = args[0]
idx = @members.index(name)
if( idx.nil? )
raise(ArgumentError, "no such member: #{name}")
end
ty = @ctypes[idx]
if( ty.is_a?(Array) )
- r = super(@offset[idx], SIZE_MAP[ty[0]] * ty[1])
+ if ty.first.respond_to?(:entity_class)
+ return @nested_structs[name]
+ else
+ r = super(@offset[idx], SIZE_MAP[ty[0]] * ty[1])
+ end
+ elsif ty.respond_to?(:entity_class)
+ return @nested_structs[name]
else
r = super(@offset[idx], SIZE_MAP[ty.abs])
end
@@ -176,14 +445,44 @@ module Fiddle
if( ty.is_a?(Integer) && (ty < 0) )
return unsigned_value(val, ty)
elsif( ty.is_a?(Array) && (ty[0] < 0) )
- return val.collect{|v| unsigned_value(v,ty[0])}
+ return StructArray.new(self + @offset[idx], ty[0], val)
else
return val
end
end
- # Set struct member +name+, to value +val+
- def []=(name, val)
+ # Set struct member +name+, to value +val+. If more arguments are
+ # specified, writes the string of bytes to the memory at the given
+ # +offset+ and +length+.
+ #
+ # Examples:
+ #
+ # my_struct = struct(['int id']).malloc
+ # my_struct['id'] = 1
+ # my_struct[0, 4] = "\x01\x00\x00\x00".b
+ # my_struct.id # => 1
+ #
+ def []=(*args)
+ return super(*args) if args.size > 2
+ name, val = *args
+ name = name.to_s if name.is_a?(Symbol)
+ nested_struct = @nested_structs[name]
+ if nested_struct
+ if nested_struct.is_a?(StructArray)
+ if val.nil?
+ nested_struct.each do |s|
+ s.replace(nil)
+ end
+ else
+ val.each_with_index do |v, i|
+ nested_struct[i] = v
+ end
+ end
+ else
+ nested_struct.replace(val)
+ end
+ return val
+ end
idx = @members.index(name)
if( idx.nil? )
raise(ArgumentError, "no such member: #{name}")
@@ -202,23 +501,16 @@ module Fiddle
end
end
+ undef_method :size=
def to_s() # :nodoc:
super(@size)
end
end
- # A C union wrapper
+ # A pointer to a C union
class CUnionEntity < CStructEntity
include PackInfo
- # Allocates a C union the +types+ provided.
- #
- # When the instance is garbage collected, the C function +func+ is called.
- def CUnionEntity.malloc(types, func=nil)
- addr = Fiddle.malloc(CUnionEntity.size(types))
- CUnionEntity.new(addr, types, func)
- end
-
# Returns the size needed for the union with the given +types+.
#
# Fiddle::CUnionEntity.size(
@@ -228,7 +520,11 @@ module Fiddle
# Fiddle::TYPE_VOIDP ]) #=> 8
def CUnionEntity.size(types)
types.map { |type, count = 1|
- PackInfo::SIZE_MAP[type] * count
+ if type.respond_to?(:entity_class)
+ type.size * count
+ else
+ PackInfo::SIZE_MAP[type] * count
+ end
}.max
end
@@ -241,4 +537,3 @@ module Fiddle
end
end
end
-
diff --git a/ext/fiddle/lib/fiddle/types.rb b/ext/fiddle/lib/fiddle/types.rb
index 8dc811d3e4..7baf31ec9e 100644
--- a/ext/fiddle/lib/fiddle/types.rb
+++ b/ext/fiddle/lib/fiddle/types.rb
@@ -27,28 +27,29 @@ module Fiddle
# * WORD
module Win32Types
def included(m) # :nodoc:
+ # https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
m.module_eval{
- typealias "DWORD", "unsigned long"
- typealias "PDWORD", "unsigned long *"
- typealias "DWORD32", "unsigned long"
- typealias "DWORD64", "unsigned long long"
- typealias "WORD", "unsigned short"
- typealias "PWORD", "unsigned short *"
+ typealias "ATOM", "WORD"
typealias "BOOL", "int"
- typealias "ATOM", "int"
typealias "BYTE", "unsigned char"
- typealias "PBYTE", "unsigned char *"
+ typealias "DWORD", "unsigned long"
+ typealias "DWORD32", "uint32_t"
+ typealias "DWORD64", "uint64_t"
+ typealias "HANDLE", "PVOID"
+ typealias "HDC", "HANDLE"
+ typealias "HINSTANCE", "HANDLE"
+ typealias "HWND", "HANDLE"
+ typealias "LPCSTR", "const char *"
+ typealias "LPSTR", "char *"
+ typealias "PBYTE", "BYTE *"
+ typealias "PDWORD", "DWORD *"
+ typealias "PHANDLE", "HANDLE *"
+ typealias "PVOID", "void *"
+ typealias "PWORD", "WORD *"
+ typealias "UCHAR", "unsigned char"
typealias "UINT", "unsigned int"
typealias "ULONG", "unsigned long"
- typealias "UCHAR", "unsigned char"
- typealias "HANDLE", "uintptr_t"
- typealias "PHANDLE", "void*"
- typealias "PVOID", "void*"
- typealias "LPCSTR", "char*"
- typealias "LPSTR", "char*"
- typealias "HINSTANCE", "unsigned int"
- typealias "HDC", "unsigned int"
- typealias "HWND", "unsigned int"
+ typealias "WORD", "unsigned short"
}
end
module_function :included
diff --git a/ext/fiddle/lib/fiddle/version.rb b/ext/fiddle/lib/fiddle/version.rb
new file mode 100644
index 0000000000..719dc62e37
--- /dev/null
+++ b/ext/fiddle/lib/fiddle/version.rb
@@ -0,0 +1,3 @@
+module Fiddle
+ VERSION = "1.1.1"
+end
diff --git a/ext/fiddle/memory_view.c b/ext/fiddle/memory_view.c
new file mode 100644
index 0000000000..fa66fc2c7b
--- /dev/null
+++ b/ext/fiddle/memory_view.c
@@ -0,0 +1,321 @@
+#include <fiddle.h>
+
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+
+#include <stdbool.h>
+#include <ruby/ruby.h>
+#include <ruby/encoding.h>
+#include <ruby/memory_view.h>
+
+#if SIZEOF_INTPTR_T == SIZEOF_LONG_LONG
+# define INTPTR2NUM LL2NUM
+# define UINTPTR2NUM ULL2NUM
+#elif SIZEOF_INTPTR_T == SIZEOF_LONG
+# define INTPTR2NUM LONG2NUM
+# define UINTPTR2NUM ULONG2NUM
+#else
+# define INTPTR2NUM INT2NUM
+# define UINTPTR2NUM UINT2NUM
+#endif
+
+VALUE rb_cMemoryView = Qnil;
+
+struct memview_data {
+ rb_memory_view_t view;
+ rb_memory_view_item_component_t *members;
+ size_t n_members;
+};
+
+static void
+fiddle_memview_mark(void *ptr)
+{
+ const struct memview_data *data = ptr;
+ rb_gc_mark(data->view.obj);
+}
+
+static void
+fiddle_memview_release(struct memview_data *data)
+{
+ if (NIL_P(data->view.obj)) return;
+
+ rb_memory_view_release(&data->view);
+ data->view.obj = Qnil;
+ data->view.byte_size = 0;
+ if (data->members) {
+ xfree(data->members);
+ data->members = NULL;
+ data->n_members = 0;
+ }
+}
+
+static void
+fiddle_memview_free(void *ptr)
+{
+ struct memview_data *data = ptr;
+ fiddle_memview_release(data);
+ xfree(ptr);
+}
+
+static size_t
+fiddle_memview_memsize(const void *ptr)
+{
+ const struct memview_data *data = ptr;
+ return sizeof(*data) + sizeof(rb_memory_view_item_component_t)*data->n_members + (size_t)data->view.byte_size;
+}
+
+static const rb_data_type_t fiddle_memview_data_type = {
+ "fiddle/memory_view",
+ {fiddle_memview_mark, fiddle_memview_free, fiddle_memview_memsize,},
+};
+
+static VALUE
+rb_fiddle_memview_s_allocate(VALUE klass)
+{
+ struct memview_data *data;
+ VALUE obj = TypedData_Make_Struct(klass, struct memview_data, &fiddle_memview_data_type, data);
+ data->view.obj = Qnil;
+ data->view.byte_size = 0;
+ data->members = NULL;
+ data->n_members = 0;
+ return obj;
+}
+
+static VALUE
+rb_fiddle_memview_release(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ fiddle_memview_release(data);
+ return Qnil;
+}
+
+static VALUE
+rb_fiddle_memview_s_export(VALUE klass, VALUE target)
+{
+ ID id_new;
+ CONST_ID(id_new, "new");
+ VALUE memview = rb_funcall(klass, id_new, 1, target);
+ return rb_ensure(rb_yield, memview, rb_fiddle_memview_release, memview);
+}
+
+static VALUE
+rb_fiddle_memview_initialize(VALUE obj, VALUE target)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (!rb_memory_view_get(target, &data->view, 0)) {
+ data->view.obj = Qnil;
+ rb_raise(rb_eArgError, "Unable to get a memory view from %+"PRIsVALUE, target);
+ }
+
+ return Qnil;
+}
+
+static VALUE
+rb_fiddle_memview_get_obj(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ return data->view.obj;
+}
+
+static VALUE
+rb_fiddle_memview_get_byte_size(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ return SSIZET2NUM(data->view.byte_size);
+}
+
+static VALUE
+rb_fiddle_memview_get_readonly(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ return data->view.readonly ? Qtrue : Qfalse;
+}
+
+static VALUE
+rb_fiddle_memview_get_format(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ return data->view.format == NULL ? Qnil : rb_str_new_cstr(data->view.format);
+}
+
+static VALUE
+rb_fiddle_memview_get_item_size(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ return SSIZET2NUM(data->view.item_size);
+}
+
+static VALUE
+rb_fiddle_memview_get_ndim(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ return SSIZET2NUM(data->view.ndim);
+}
+
+static VALUE
+rb_fiddle_memview_get_shape(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ if (data->view.shape == NULL) return Qnil;
+
+ const ssize_t ndim = data->view.ndim;
+ VALUE shape = rb_ary_new_capa(ndim);
+ ssize_t i;
+ for (i = 0; i < ndim; ++i) {
+ rb_ary_push(shape, SSIZET2NUM(data->view.shape[i]));
+ }
+ return shape;
+}
+
+static VALUE
+rb_fiddle_memview_get_strides(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ if (data->view.strides == NULL) return Qnil;
+
+ const ssize_t ndim = data->view.ndim;
+ VALUE strides = rb_ary_new_capa(ndim);
+ ssize_t i;
+ for (i = 0; i < ndim; ++i) {
+ rb_ary_push(strides, SSIZET2NUM(data->view.strides[i]));
+ }
+ return strides;
+}
+
+static VALUE
+rb_fiddle_memview_get_sub_offsets(VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+ if (data->view.sub_offsets == NULL) return Qnil;
+
+ const ssize_t ndim = data->view.ndim;
+ VALUE sub_offsets = rb_ary_new_capa(ndim);
+ ssize_t i;
+ for (i = 0; i < ndim; ++i) {
+ rb_ary_push(sub_offsets, SSIZET2NUM(data->view.sub_offsets[i]));
+ }
+ return sub_offsets;
+}
+
+static VALUE
+rb_fiddle_memview_aref(int argc, VALUE *argv, VALUE obj)
+{
+ struct memview_data *data;
+ TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
+
+ if (NIL_P(data->view.obj)) return Qnil;
+
+ const ssize_t ndim = data->view.ndim;
+ if (argc != ndim) {
+ rb_raise(rb_eIndexError, "wrong number of index (%d for %"PRIdSIZE")", argc, ndim);
+ }
+
+ VALUE indices_v = 0;
+ ssize_t *indices = ALLOCV_N(ssize_t, indices_v, ndim);
+
+ ssize_t i;
+ for (i = 0; i < ndim; ++i) {
+ ssize_t x = NUM2SSIZET(argv[i]);
+ indices[i] = x;
+ }
+
+ uint8_t *ptr = rb_memory_view_get_item_pointer(&data->view, indices);
+ ALLOCV_END(indices_v);
+
+ if (data->view.format == NULL) {
+ return INT2FIX(*ptr);
+ }
+
+ if (!data->members) {
+ const char *err;
+ if (rb_memory_view_parse_item_format(data->view.format, &data->members, &data->n_members, &err) < 0) {
+ rb_raise(rb_eRuntimeError, "Unable to recognize item format at %"PRIdSIZE" in \"%s\"",
+ err - data->view.format, data->view.format);
+ }
+ }
+
+ return rb_memory_view_extract_item_members(ptr, data->members, data->n_members);
+}
+
+static VALUE
+rb_fiddle_memview_to_s(VALUE self)
+{
+ struct memview_data *data;
+ const char *raw_data;
+ long byte_size;
+ VALUE string;
+
+ TypedData_Get_Struct(self,
+ struct memview_data,
+ &fiddle_memview_data_type,
+ data);
+
+ if (NIL_P(data->view.obj)) {
+ raw_data = NULL;
+ byte_size = 0;
+ } else {
+ raw_data = data->view.data;
+ byte_size = data->view.byte_size;
+ }
+
+ string = rb_enc_str_new_static(raw_data, byte_size, rb_ascii8bit_encoding());
+ {
+ ID id_memory_view;
+ CONST_ID(id_memory_view, "memory_view");
+ rb_ivar_set(string, id_memory_view, self);
+ }
+ return rb_obj_freeze(string);
+}
+
+void
+Init_fiddle_memory_view(void)
+{
+ rb_cMemoryView = rb_define_class_under(mFiddle, "MemoryView", rb_cObject);
+ rb_define_alloc_func(rb_cMemoryView, rb_fiddle_memview_s_allocate);
+ rb_define_singleton_method(rb_cMemoryView, "export", rb_fiddle_memview_s_export, 1);
+ rb_define_method(rb_cMemoryView, "initialize", rb_fiddle_memview_initialize, 1);
+ rb_define_method(rb_cMemoryView, "release", rb_fiddle_memview_release, 0);
+ rb_define_method(rb_cMemoryView, "obj", rb_fiddle_memview_get_obj, 0);
+ rb_define_method(rb_cMemoryView, "byte_size", rb_fiddle_memview_get_byte_size, 0);
+ rb_define_method(rb_cMemoryView, "readonly?", rb_fiddle_memview_get_readonly, 0);
+ rb_define_method(rb_cMemoryView, "format", rb_fiddle_memview_get_format, 0);
+ rb_define_method(rb_cMemoryView, "item_size", rb_fiddle_memview_get_item_size, 0);
+ rb_define_method(rb_cMemoryView, "ndim", rb_fiddle_memview_get_ndim, 0);
+ rb_define_method(rb_cMemoryView, "shape", rb_fiddle_memview_get_shape, 0);
+ rb_define_method(rb_cMemoryView, "strides", rb_fiddle_memview_get_strides, 0);
+ rb_define_method(rb_cMemoryView, "sub_offsets", rb_fiddle_memview_get_sub_offsets, 0);
+ rb_define_method(rb_cMemoryView, "[]", rb_fiddle_memview_aref, -1);
+ rb_define_method(rb_cMemoryView, "to_s", rb_fiddle_memview_to_s, 0);
+}
+
+#endif /* HAVE_RUBY_MEMORY_VIEW_H */
diff --git a/ext/fiddle/pinned.c b/ext/fiddle/pinned.c
new file mode 100644
index 0000000000..019a3020e2
--- /dev/null
+++ b/ext/fiddle/pinned.c
@@ -0,0 +1,123 @@
+#include <fiddle.h>
+
+VALUE rb_cPinned;
+VALUE rb_eFiddleClearedReferenceError;
+
+struct pinned_data {
+ VALUE ptr;
+};
+
+static void
+pinned_mark(void *ptr)
+{
+ struct pinned_data *data = (struct pinned_data*)ptr;
+ /* Ensure reference is pinned */
+ if (data->ptr) {
+ rb_gc_mark(data->ptr);
+ }
+}
+
+static size_t
+pinned_memsize(const void *ptr)
+{
+ return sizeof(struct pinned_data);
+}
+
+static const rb_data_type_t pinned_data_type = {
+ "fiddle/pinned",
+ {pinned_mark, xfree, pinned_memsize, },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
+};
+
+static VALUE
+allocate(VALUE klass)
+{
+ struct pinned_data *data;
+ VALUE obj = TypedData_Make_Struct(klass, struct pinned_data, &pinned_data_type, data);
+ data->ptr = 0;
+ return obj;
+}
+
+/*
+ * call-seq:
+ * Fiddle::Pinned.new(object) => pinned_object
+ *
+ * Create a new pinned object reference. The Fiddle::Pinned instance will
+ * prevent the GC from moving +object+.
+ */
+static VALUE
+initialize(VALUE self, VALUE ref)
+{
+ struct pinned_data *data;
+ TypedData_Get_Struct(self, struct pinned_data, &pinned_data_type, data);
+ RB_OBJ_WRITE(self, &data->ptr, ref);
+ return self;
+}
+
+/*
+ * call-seq: ref
+ *
+ * Return the object that this pinned instance references.
+ */
+static VALUE
+ref(VALUE self)
+{
+ struct pinned_data *data;
+ TypedData_Get_Struct(self, struct pinned_data, &pinned_data_type, data);
+ if (data->ptr) {
+ return data->ptr;
+ } else {
+ rb_raise(rb_eFiddleClearedReferenceError, "`ref` called on a cleared object");
+ }
+}
+
+/*
+ * call-seq: clear
+ *
+ * Clear the reference to the object this is pinning.
+ */
+static VALUE
+clear(VALUE self)
+{
+ struct pinned_data *data;
+ TypedData_Get_Struct(self, struct pinned_data, &pinned_data_type, data);
+ data->ptr = 0;
+ return self;
+}
+
+/*
+ * call-seq: cleared?
+ *
+ * Returns true if the reference has been cleared, otherwise returns false.
+ */
+static VALUE
+cleared_p(VALUE self)
+{
+ struct pinned_data *data;
+ TypedData_Get_Struct(self, struct pinned_data, &pinned_data_type, data);
+ if (data->ptr) {
+ return Qfalse;
+ } else {
+ return Qtrue;
+ }
+}
+
+extern VALUE rb_eFiddleError;
+
+void
+Init_fiddle_pinned(void)
+{
+ rb_cPinned = rb_define_class_under(mFiddle, "Pinned", rb_cObject);
+ rb_define_alloc_func(rb_cPinned, allocate);
+ rb_define_method(rb_cPinned, "initialize", initialize, 1);
+ rb_define_method(rb_cPinned, "ref", ref, 0);
+ rb_define_method(rb_cPinned, "clear", clear, 0);
+ rb_define_method(rb_cPinned, "cleared?", cleared_p, 0);
+
+ /*
+ * Document-class: Fiddle::ClearedReferenceError
+ *
+ * Cleared reference exception
+ */
+ rb_eFiddleClearedReferenceError = rb_define_class_under(mFiddle, "ClearedReferenceError", rb_eFiddleError);
+}
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 117cc9b826..15107e3862 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -2,11 +2,17 @@
* $Id$
*/
+#include <stdbool.h>
#include <ruby/ruby.h>
#include <ruby/io.h>
+
#include <ctype.h>
#include <fiddle.h>
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+# include <ruby/memory_view.h>
+#endif
+
#ifdef PRIsVALUE
# define RB_OBJ_CLASSNAME(obj) rb_obj_class(obj)
# define RB_OBJ_STRING(obj) (obj)
@@ -18,12 +24,13 @@
VALUE rb_cPointer;
-typedef void (*freefunc_t)(void*);
+typedef rb_fiddle_freefunc_t freefunc_t;
struct ptr_data {
void *ptr;
long size;
freefunc_t free;
+ bool freed;
VALUE wrap[2];
};
@@ -57,14 +64,19 @@ fiddle_ptr_mark(void *ptr)
}
static void
-fiddle_ptr_free(void *ptr)
+fiddle_ptr_free_ptr(void *ptr)
{
struct ptr_data *data = ptr;
- if (data->ptr) {
- if (data->free) {
- (*(data->free))(data->ptr);
- }
+ if (data->ptr && data->free && !data->freed) {
+ data->freed = true;
+ (*(data->free))(data->ptr);
}
+}
+
+static void
+fiddle_ptr_free(void *ptr)
+{
+ fiddle_ptr_free_ptr(ptr);
xfree(ptr);
}
@@ -80,8 +92,40 @@ static const rb_data_type_t fiddle_ptr_data_type = {
{fiddle_ptr_mark, fiddle_ptr_free, fiddle_ptr_memsize,},
};
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+static struct ptr_data *
+fiddle_ptr_check_memory_view(VALUE obj)
+{
+ struct ptr_data *data;
+ TypedData_Get_Struct(obj, struct ptr_data, &fiddle_ptr_data_type, data);
+ if (data->ptr == NULL || data->size == 0) return NULL;
+ return data;
+}
+
+static bool
+fiddle_ptr_memory_view_available_p(VALUE obj)
+{
+ return fiddle_ptr_check_memory_view(obj) != NULL;
+}
+
+static bool
+fiddle_ptr_get_memory_view(VALUE obj, rb_memory_view_t *view, int flags)
+{
+ struct ptr_data *data = fiddle_ptr_check_memory_view(obj);
+ rb_memory_view_init_as_byte_array(view, obj, data->ptr, data->size, true);
+
+ return true;
+}
+
+static const rb_memory_view_entry_t fiddle_ptr_memory_view_entry = {
+ fiddle_ptr_get_memory_view,
+ NULL,
+ fiddle_ptr_memory_view_available_p
+};
+#endif
+
static VALUE
-rb_fiddle_ptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
+rb_fiddle_ptr_new2(VALUE klass, void *ptr, long size, freefunc_t func, VALUE wrap0, VALUE wrap1)
{
struct ptr_data *data;
VALUE val;
@@ -89,25 +133,34 @@ rb_fiddle_ptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
val = TypedData_Make_Struct(klass, struct ptr_data, &fiddle_ptr_data_type, data);
data->ptr = ptr;
data->free = func;
+ data->freed = false;
data->size = size;
+ data->wrap[0] = wrap0;
+ data->wrap[1] = wrap1;
return val;
}
+VALUE
+rb_fiddle_ptr_new_wrap(void *ptr, long size, freefunc_t func, VALUE wrap0, VALUE wrap1)
+{
+ return rb_fiddle_ptr_new2(rb_cPointer, ptr, size, func, wrap0, wrap1);
+}
+
static VALUE
rb_fiddle_ptr_new(void *ptr, long size, freefunc_t func)
{
- return rb_fiddle_ptr_new2(rb_cPointer, ptr, size, func);
+ return rb_fiddle_ptr_new2(rb_cPointer, ptr, size, func, 0, 0);
}
static VALUE
-rb_fiddle_ptr_malloc(long size, freefunc_t func)
+rb_fiddle_ptr_malloc(VALUE klass, long size, freefunc_t func)
{
void *ptr;
ptr = ruby_xmalloc((size_t)size);
memset(ptr,0,(size_t)size);
- return rb_fiddle_ptr_new(ptr, size, func);
+ return rb_fiddle_ptr_new2(klass, ptr, size, func, 0, 0);
}
static void *
@@ -140,6 +193,7 @@ rb_fiddle_ptr_s_allocate(VALUE klass)
data->ptr = 0;
data->size = 0;
data->free = 0;
+ data->freed = false;
return obj;
}
@@ -191,16 +245,53 @@ rb_fiddle_ptr_initialize(int argc, VALUE argv[], VALUE self)
return Qnil;
}
+static VALUE
+rb_fiddle_ptr_call_free(VALUE self);
+
/*
* call-seq:
- *
* Fiddle::Pointer.malloc(size, freefunc = nil) => fiddle pointer instance
+ * Fiddle::Pointer.malloc(size, freefunc) { |pointer| ... } => ...
+ *
+ * == Examples
+ *
+ * # Automatically freeing the pointer when the block is exited - recommended
+ * Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) do |pointer|
+ * ...
+ * end
+ *
+ * # Manually freeing but relying on the garbage collector otherwise
+ * pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
+ * ...
+ * pointer.call_free
+ *
+ * # Relying on the garbage collector - may lead to unlimited memory allocated before freeing any, but safe
+ * pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
+ * ...
+ *
+ * # Only manually freeing
+ * pointer = Fiddle::Pointer.malloc(size)
+ * begin
+ * ...
+ * ensure
+ * Fiddle.free pointer
+ * end
+ *
+ * # No free function and no call to free - the native memory will leak if the pointer is garbage collected
+ * pointer = Fiddle::Pointer.malloc(size)
+ * ...
*
* Allocate +size+ bytes of memory and associate it with an optional
- * +freefunc+ that will be called when the pointer is garbage collected.
+ * +freefunc+.
*
- * +freefunc+ must be an address pointing to a function or an instance of
- * Fiddle::Function
+ * If a block is supplied, the pointer will be yielded to the block instead of
+ * being returned, and the return value of the block will be returned. A
+ * +freefunc+ must be supplied if a block is.
+ *
+ * If a +freefunc+ is supplied it will be called once, when the pointer is
+ * garbage collected or when the block is left if a block is supplied or
+ * when the user calls +call_free+, whichever happens first. +freefunc+ must be
+ * an address pointing to a function or an instance of +Fiddle::Function+.
*/
static VALUE
rb_fiddle_ptr_s_malloc(int argc, VALUE argv[], VALUE klass)
@@ -222,10 +313,17 @@ rb_fiddle_ptr_s_malloc(int argc, VALUE argv[], VALUE klass)
rb_bug("rb_fiddle_ptr_s_malloc");
}
- obj = rb_fiddle_ptr_malloc(s,f);
+ obj = rb_fiddle_ptr_malloc(klass, s,f);
if (wrap) RPTR_DATA(obj)->wrap[1] = wrap;
- return obj;
+ if (rb_block_given_p()) {
+ if (!f) {
+ rb_raise(rb_eArgError, "a free function must be supplied to Fiddle::Pointer.malloc when it is called with a block");
+ }
+ return rb_ensure(rb_yield, obj, rb_fiddle_ptr_call_free, obj);
+ } else {
+ return obj;
+ }
}
/*
@@ -351,6 +449,34 @@ rb_fiddle_ptr_free_get(VALUE self)
}
/*
+ * call-seq: call_free => nil
+ *
+ * Call the free function for this pointer. Calling more than once will do
+ * nothing. Does nothing if there is no free function attached.
+ */
+static VALUE
+rb_fiddle_ptr_call_free(VALUE self)
+{
+ struct ptr_data *pdata;
+ TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, pdata);
+ fiddle_ptr_free_ptr(pdata);
+ return Qnil;
+}
+
+/*
+ * call-seq: freed? => bool
+ *
+ * Returns if the free function for this pointer has been called.
+ */
+static VALUE
+rb_fiddle_ptr_freed_p(VALUE self)
+{
+ struct ptr_data *pdata;
+ TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, pdata);
+ return pdata->freed ? Qtrue : Qfalse;
+}
+
+/*
* call-seq:
*
* ptr.to_s => string
@@ -541,7 +667,7 @@ rb_fiddle_ptr_aref(int argc, VALUE argv[], VALUE self)
struct ptr_data *data;
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
- if (!data->ptr) rb_raise(rb_eFiddleError, "NULL pointer dereference");
+ if (!data->ptr) rb_raise(rb_eFiddleDLError, "NULL pointer dereference");
switch( rb_scan_args(argc, argv, "11", &arg0, &arg1) ){
case 1:
offset = NUM2ULONG(arg0);
@@ -579,7 +705,7 @@ rb_fiddle_ptr_aset(int argc, VALUE argv[], VALUE self)
struct ptr_data *data;
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
- if (!data->ptr) rb_raise(rb_eFiddleError, "NULL pointer dereference");
+ if (!data->ptr) rb_raise(rb_eFiddleDLError, "NULL pointer dereference");
switch( rb_scan_args(argc, argv, "21", &arg0, &arg1, &arg2) ){
case 2:
offset = NUM2ULONG(arg0);
@@ -652,6 +778,7 @@ rb_fiddle_ptr_s_to_ptr(VALUE self, VALUE val)
}
else if (RTEST(rb_obj_is_kind_of(val, rb_cString))){
char *str = StringValuePtr(val);
+ wrap = val;
ptr = rb_fiddle_ptr_new(str, RSTRING_LEN(val), NULL);
}
else if ((vptr = rb_check_funcall(val, id_to_ptr, 0, 0)) != Qundef){
@@ -660,7 +787,7 @@ rb_fiddle_ptr_s_to_ptr(VALUE self, VALUE val)
wrap = 0;
}
else{
- rb_raise(rb_eFiddleError, "to_ptr should return a Fiddle::Pointer object");
+ rb_raise(rb_eFiddleDLError, "to_ptr should return a Fiddle::Pointer object");
}
}
else{
@@ -691,6 +818,8 @@ Init_fiddle_pointer(void)
rb_define_method(rb_cPointer, "initialize", rb_fiddle_ptr_initialize, -1);
rb_define_method(rb_cPointer, "free=", rb_fiddle_ptr_free_set, 1);
rb_define_method(rb_cPointer, "free", rb_fiddle_ptr_free_get, 0);
+ rb_define_method(rb_cPointer, "call_free", rb_fiddle_ptr_call_free, 0);
+ rb_define_method(rb_cPointer, "freed?", rb_fiddle_ptr_freed_p, 0);
rb_define_method(rb_cPointer, "to_i", rb_fiddle_ptr_to_i, 0);
rb_define_method(rb_cPointer, "to_int", rb_fiddle_ptr_to_i, 0);
rb_define_method(rb_cPointer, "to_value", rb_fiddle_ptr_to_value, 0);
@@ -712,6 +841,10 @@ Init_fiddle_pointer(void)
rb_define_method(rb_cPointer, "size", rb_fiddle_ptr_size_get, 0);
rb_define_method(rb_cPointer, "size=", rb_fiddle_ptr_size_set, 1);
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
+ rb_memory_view_register(rb_cPointer, &fiddle_ptr_memory_view_entry);
+#endif
+
/* Document-const: NULL
*
* A NULL pointer
diff --git a/ext/fiddle/win32/fficonfig.h b/ext/fiddle/win32/fficonfig.h
index 776808159c..776808159c 100755..100644
--- a/ext/fiddle/win32/fficonfig.h
+++ b/ext/fiddle/win32/fficonfig.h
diff --git a/ext/fiddle/win32/libffi-config.rb b/ext/fiddle/win32/libffi-config.rb
index 6abc9b2c02..985fc29d36 100755
--- a/ext/fiddle/win32/libffi-config.rb
+++ b/ext/fiddle/win32/libffi-config.rb
@@ -32,7 +32,7 @@ IO.foreach("#{srcdir}/configure.ac") do |line|
end
end
-builddir = srcdir == "." ? enable['builddir'] : "."
+builddir = srcdir == "." ? (enable['builddir'] || ".") : "."
conf['TARGET'] = /^x64/ =~ host ? "X86_WIN64" : "X86_WIN32"
FileUtils.mkdir_p([builddir, "#{builddir}/include", "#{builddir}/src/x86"])
diff --git a/ext/fiddle/win32/libffi.mk.tmpl b/ext/fiddle/win32/libffi.mk.tmpl
index 2a16e8efec..2a16e8efec 100755..100644
--- a/ext/fiddle/win32/libffi.mk.tmpl
+++ b/ext/fiddle/win32/libffi.mk.tmpl
diff --git a/ext/gdbm/README b/ext/gdbm/README
deleted file mode 100644
index df7a261c68..0000000000
--- a/ext/gdbm/README
+++ /dev/null
@@ -1 +0,0 @@
-gdbm ext-library for Ruby 1.3 or later
diff --git a/ext/gdbm/depend b/ext/gdbm/depend
deleted file mode 100644
index 33635bc099..0000000000
--- a/ext/gdbm/depend
+++ /dev/null
@@ -1,14 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-gdbm.o: $(RUBY_EXTCONF_H)
-gdbm.o: $(arch_hdrdir)/ruby/config.h
-gdbm.o: $(hdrdir)/ruby.h
-gdbm.o: $(hdrdir)/ruby/assert.h
-gdbm.o: $(hdrdir)/ruby/backward.h
-gdbm.o: $(hdrdir)/ruby/defines.h
-gdbm.o: $(hdrdir)/ruby/intern.h
-gdbm.o: $(hdrdir)/ruby/missing.h
-gdbm.o: $(hdrdir)/ruby/ruby.h
-gdbm.o: $(hdrdir)/ruby/st.h
-gdbm.o: $(hdrdir)/ruby/subst.h
-gdbm.o: gdbm.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/gdbm/extconf.rb b/ext/gdbm/extconf.rb
deleted file mode 100644
index d1908ffa5c..0000000000
--- a/ext/gdbm/extconf.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: false
-require 'mkmf'
-
-dir_config("gdbm")
-if have_library("gdbm", "gdbm_open") and
- have_header("gdbm.h")
- checking_for("sizeof(DBM) is available") {
- if try_compile(<<SRC)
-#include <gdbm.h>
-
-const int sizeof_DBM = (int)sizeof(DBM);
-SRC
- $defs << '-DDBM_SIZEOF_DBM=sizeof(DBM)'
- else
- $defs << '-DDBM_SIZEOF_DBM=0'
- end
- }
- create_makefile("gdbm")
-end
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
deleted file mode 100644
index 4a6377b685..0000000000
--- a/ext/gdbm/gdbm.c
+++ /dev/null
@@ -1,1306 +0,0 @@
-/************************************************
-
- gdbm.c -
-
- $Author$
- modified at: Mon Jan 24 15:59:52 JST 1994
-
- Documentation by Peter Adolphs < futzilogik at users dot sourceforge dot net >
-
-************************************************/
-
-#include "ruby.h"
-
-#include <gdbm.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*
- * Document-class: GDBM
- *
- * == Summary
- *
- * Ruby extension for GNU dbm (gdbm) -- a simple database engine for storing
- * key-value pairs on disk.
- *
- * == Description
- *
- * GNU dbm is a library for simple databases. A database is a file that stores
- * key-value pairs. Gdbm allows the user to store, retrieve, and delete data by
- * key. It furthermore allows a non-sorted traversal of all key-value pairs.
- * A gdbm database thus provides the same functionality as a hash. As
- * with objects of the Hash class, elements can be accessed with <tt>[]</tt>.
- * Furthermore, GDBM mixes in the Enumerable module, thus providing convenient
- * methods such as #find, #collect, #map, etc.
- *
- * A process is allowed to open several different databases at the same time.
- * A process can open a database as a "reader" or a "writer". Whereas a reader
- * has only read-access to the database, a writer has read- and write-access.
- * A database can be accessed either by any number of readers or by exactly one
- * writer at the same time.
- *
- * == Examples
- *
- * 1. Opening/creating a database, and filling it with some entries:
- *
- * require 'gdbm'
- *
- * gdbm = GDBM.new("fruitstore.db")
- * gdbm["ananas"] = "3"
- * gdbm["banana"] = "8"
- * gdbm["cranberry"] = "4909"
- * gdbm.close
- *
- * 2. Reading out a database:
- *
- * require 'gdbm'
- *
- * gdbm = GDBM.new("fruitstore.db")
- * gdbm.each_pair do |key, value|
- * print "#{key}: #{value}\n"
- * end
- * gdbm.close
- *
- * produces
- *
- * banana: 8
- * ananas: 3
- * cranberry: 4909
- *
- * == Links
- *
- * * http://www.gnu.org/software/gdbm/
- */
-static VALUE rb_cGDBM, rb_eGDBMError, rb_eGDBMFatalError;
-
-#if SIZEOF_LONG > SIZEOF_INT
-#define TOO_LONG(n) ((long)(+(int)(n)) != (long)(n))
-#else
-#define TOO_LONG(n) 0
-#endif
-
-#define RUBY_GDBM_RW_BIT 0x20000000
-
-#define MY_BLOCK_SIZE (2048)
-#define MY_FATAL_FUNC rb_gdbm_fatal
-
-NORETURN(static void rb_gdbm_fatal(const char *msg));
-NORETURN(static void closed_dbm(void));
-
-static void
-rb_gdbm_fatal(const char *msg)
-{
- rb_raise(rb_eGDBMFatalError, "%s", msg);
-}
-
-struct dbmdata {
- int di_size;
- GDBM_FILE di_dbm;
-};
-
-static void
-closed_dbm(void)
-{
- rb_raise(rb_eRuntimeError, "closed GDBM file");
-}
-
-#define GetDBM(obj, dbmp) do {\
- TypedData_Get_Struct((obj), struct dbmdata, &dbm_type, (dbmp));\
- if ((dbmp)->di_dbm == 0) closed_dbm();\
-} while (0)
-
-#define GetDBM2(obj, dbmp, dbm) do {\
- GetDBM((obj), (dbmp));\
- (dbm) = (dbmp)->di_dbm;\
-} while (0)
-
-static void
-free_dbm(void *ptr)
-{
- struct dbmdata *dbmp = ptr;
- if (dbmp->di_dbm)
- gdbm_close(dbmp->di_dbm);
- xfree(dbmp);
-}
-
-static size_t
-memsize_dbm(const void *ptr)
-{
- const struct dbmdata *dbmp = ptr;
- size_t size = sizeof(*dbmp);
- if (dbmp->di_dbm)
- size += DBM_SIZEOF_DBM;
- return size;
-}
-
-static const rb_data_type_t dbm_type = {
- "gdbm",
- {0, free_dbm, memsize_dbm,},
- 0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY,
-};
-
-/*
- * call-seq:
- * gdbm.close -> nil
- *
- * Closes the associated database file.
- */
-static VALUE
-fgdbm_close(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- GetDBM(obj, dbmp);
- gdbm_close(dbmp->di_dbm);
- dbmp->di_dbm = 0;
-
- return Qnil;
-}
-
-/*
- * call-seq:
- * gdbm.closed? -> true or false
- *
- * Returns true if the associated database file has been closed.
- */
-static VALUE
-fgdbm_closed(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- TypedData_Get_Struct(obj, struct dbmdata, &dbm_type, dbmp);
- if (dbmp->di_dbm == 0)
- return Qtrue;
-
- return Qfalse;
-}
-
-static VALUE
-fgdbm_s_alloc(VALUE klass)
-{
- struct dbmdata *dbmp;
-
- return TypedData_Make_Struct(klass, struct dbmdata, &dbm_type, dbmp);
-}
-
-/*
- * call-seq:
- * GDBM.new(filename, mode = 0666, flags = nil)
- *
- * Creates a new GDBM instance by opening a gdbm file named _filename_.
- * If the file does not exist, a new file with file mode _mode_ will be
- * created. _flags_ may be one of the following:
- * * *READER* - open as a reader
- * * *WRITER* - open as a writer
- * * *WRCREAT* - open as a writer; if the database does not exist, create a new one
- * * *NEWDB* - open as a writer; overwrite any existing databases
- *
- * The values *WRITER*, *WRCREAT* and *NEWDB* may be combined with the following
- * values by bitwise or:
- * * *SYNC* - cause all database operations to be synchronized to the disk
- * * *NOLOCK* - do not lock the database file
- *
- * If no _flags_ are specified, the GDBM object will try to open the database
- * file as a writer and will create it if it does not already exist
- * (cf. flag <tt>WRCREAT</tt>). If this fails (for instance, if another process
- * has already opened the database as a reader), it will try to open the
- * database file as a reader (cf. flag <tt>READER</tt>).
- */
-static VALUE
-fgdbm_initialize(int argc, VALUE *argv, VALUE obj)
-{
- VALUE file, vmode, vflags;
- GDBM_FILE dbm;
- struct dbmdata *dbmp;
- int mode, flags = 0;
-
- TypedData_Get_Struct(obj, struct dbmdata, &dbm_type, dbmp);
- if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
- mode = 0666; /* default value */
- }
- else if (NIL_P(vmode)) {
- mode = -1; /* return nil if DB does not exist */
- }
- else {
- mode = NUM2INT(vmode);
- }
-
- if (!NIL_P(vflags))
- flags = NUM2INT(vflags);
-
- FilePathValue(file);
-
-#ifdef GDBM_CLOEXEC
- /* GDBM_CLOEXEC is available since gdbm 1.10. */
- flags |= GDBM_CLOEXEC;
-#endif
-
- if (flags & RUBY_GDBM_RW_BIT) {
- flags &= ~RUBY_GDBM_RW_BIT;
- dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
- flags, mode, MY_FATAL_FUNC);
- }
- else {
- dbm = 0;
- if (mode >= 0)
- dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
- GDBM_WRCREAT|flags, mode, MY_FATAL_FUNC);
- if (!dbm)
- dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
- GDBM_WRITER|flags, 0, MY_FATAL_FUNC);
- if (!dbm)
- dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE,
- GDBM_READER|flags, 0, MY_FATAL_FUNC);
- }
-
- if (dbm) {
- rb_fd_fix_cloexec(gdbm_fdesc(dbm));
- }
-
- if (!dbm) {
- if (mode == -1) return Qnil;
-
- if (gdbm_errno == GDBM_FILE_OPEN_ERROR ||
- gdbm_errno == GDBM_CANT_BE_READER ||
- gdbm_errno == GDBM_CANT_BE_WRITER)
- rb_sys_fail_str(file);
- else
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
-
- if (dbmp->di_dbm)
- gdbm_close(dbmp->di_dbm);
- dbmp->di_dbm = dbm;
- dbmp->di_size = -1;
-
- return obj;
-}
-
-/*
- * call-seq:
- * GDBM.open(filename, mode = 0666, flags = nil)
- * GDBM.open(filename, mode = 0666, flags = nil) { |gdbm| ... }
- *
- * If called without a block, this is synonymous to GDBM::new.
- * If a block is given, the new GDBM instance will be passed to the block
- * as a parameter, and the corresponding database file will be closed
- * after the execution of the block code has been finished.
- *
- * Example for an open call with a block:
- *
- * require 'gdbm'
- * GDBM.open("fruitstore.db") do |gdbm|
- * gdbm.each_pair do |key, value|
- * print "#{key}: #{value}\n"
- * end
- * end
- */
-static VALUE
-fgdbm_s_open(int argc, VALUE *argv, VALUE klass)
-{
- VALUE obj = fgdbm_s_alloc(klass);
-
- if (NIL_P(fgdbm_initialize(argc, argv, obj))) {
- return Qnil;
- }
-
- if (rb_block_given_p()) {
- return rb_ensure(rb_yield, obj, fgdbm_close, obj);
- }
-
- return obj;
-}
-
-static VALUE
-rb_gdbm_fetch(GDBM_FILE dbm, datum key)
-{
- datum val;
- VALUE str;
-
- val = gdbm_fetch(dbm, key);
- if (val.dptr == 0)
- return Qnil;
-
- str = rb_str_new(val.dptr, val.dsize);
- free(val.dptr);
- return str;
-}
-
-static VALUE
-rb_gdbm_fetch2(GDBM_FILE dbm, VALUE keystr)
-{
- datum key;
- long len;
-
- ExportStringValue(keystr);
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) return Qnil;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (int)len;
-
- return rb_gdbm_fetch(dbm, key);
-}
-
-static VALUE
-rb_gdbm_fetch3(VALUE obj, VALUE keystr)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- GetDBM2(obj, dbmp, dbm);
- return rb_gdbm_fetch2(dbm, keystr);
-}
-
-static VALUE
-rb_gdbm_firstkey(GDBM_FILE dbm)
-{
- datum key;
- VALUE str;
-
- key = gdbm_firstkey(dbm);
- if (key.dptr == 0)
- return Qnil;
-
- str = rb_str_new(key.dptr, key.dsize);
- free(key.dptr);
- return str;
-}
-
-static VALUE
-rb_gdbm_nextkey(GDBM_FILE dbm, VALUE keystr)
-{
- datum key, key2;
- VALUE str;
- long len;
-
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) return Qnil;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (int)len;
- key2 = gdbm_nextkey(dbm, key);
- if (key2.dptr == 0)
- return Qnil;
-
- str = rb_str_new(key2.dptr, key2.dsize);
- free(key2.dptr);
- return str;
-}
-
-static VALUE
-fgdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone)
-{
- VALUE valstr;
-
- valstr = rb_gdbm_fetch3(obj, keystr);
- if (NIL_P(valstr)) {
- if (ifnone == Qnil && rb_block_given_p())
- return rb_yield(keystr);
- return ifnone;
- }
- return valstr;
-}
-
-/*
- * call-seq:
- * gdbm[key] -> value
- *
- * Retrieves the _value_ corresponding to _key_.
- */
-static VALUE
-fgdbm_aref(VALUE obj, VALUE keystr)
-{
- return rb_gdbm_fetch3(obj, keystr);
-}
-
-/*
- * call-seq:
- * gdbm.fetch(key [, default]) -> value
- *
- * Retrieves the _value_ corresponding to _key_. If there is no value
- * associated with _key_, _default_ will be returned instead.
- */
-static VALUE
-fgdbm_fetch_m(int argc, VALUE *argv, VALUE obj)
-{
- VALUE keystr, valstr, ifnone;
-
- rb_scan_args(argc, argv, "11", &keystr, &ifnone);
- valstr = fgdbm_fetch(obj, keystr, ifnone);
- if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
- rb_raise(rb_eIndexError, "key not found");
-
- return valstr;
-}
-
-/*
- * call-seq:
- * gdbm.key(value) -> key
- *
- * Returns the _key_ for a given _value_. If several keys may map to the
- * same value, the key that is found first will be returned.
- */
-static VALUE
-fgdbm_key(VALUE obj, VALUE valstr)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, valstr2;
-
- ExportStringValue(valstr);
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- valstr2 = rb_gdbm_fetch2(dbm, keystr);
- if (!NIL_P(valstr2) &&
- (int)RSTRING_LEN(valstr) == (int)RSTRING_LEN(valstr2) &&
- memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2),
- (int)RSTRING_LEN(valstr)) == 0) {
- return keystr;
- }
- }
- return Qnil;
-}
-
-/* :nodoc: */
-static VALUE
-fgdbm_index(VALUE obj, VALUE value)
-{
- rb_warn("GDBM#index is deprecated; use GDBM#key");
- return fgdbm_key(obj, value);
-}
-
-/*
- * call-seq:
- * gdbm.select { |key, value| block } -> array
- *
- * Returns a new array of all key-value pairs of the database for which _block_
- * evaluates to true.
- */
-static VALUE
-fgdbm_select(VALUE obj)
-{
- VALUE new = rb_ary_new();
- GDBM_FILE dbm;
- struct dbmdata *dbmp;
- VALUE keystr;
-
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
- VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
- VALUE v = rb_yield(assoc);
-
- if (RTEST(v)) {
- rb_ary_push(new, assoc);
- }
- GetDBM2(obj, dbmp, dbm);
- }
-
- return new;
-}
-
-/*
- * call-seq:
- * gdbm.values_at(key, ...) -> array
- *
- * Returns an array of the values associated with each specified _key_.
- */
-static VALUE
-fgdbm_values_at(int argc, VALUE *argv, VALUE obj)
-{
- VALUE new = rb_ary_new2(argc);
- int i;
-
- for (i=0; i<argc; i++) {
- rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
- }
-
- return new;
-}
-
-static void
-rb_gdbm_modify(VALUE obj)
-{
- if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
-}
-
-static VALUE
-rb_gdbm_delete(VALUE obj, VALUE keystr)
-{
- datum key;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- long len;
-
- rb_gdbm_modify(obj);
- ExportStringValue(keystr);
- len = RSTRING_LEN(keystr);
- if (TOO_LONG(len)) return Qnil;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (int)len;
-
- GetDBM2(obj, dbmp, dbm);
- if (!gdbm_exists(dbm, key)) {
- return Qnil;
- }
-
- if (gdbm_delete(dbm, key)) {
- dbmp->di_size = -1;
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- else if (dbmp->di_size >= 0) {
- dbmp->di_size--;
- }
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.delete(key) -> value or nil
- *
- * Removes the key-value-pair with the specified _key_ from this database and
- * returns the corresponding _value_. Returns nil if the database is empty.
- */
-static VALUE
-fgdbm_delete(VALUE obj, VALUE keystr)
-{
- VALUE valstr;
-
- valstr = fgdbm_fetch(obj, keystr, Qnil);
- rb_gdbm_delete(obj, keystr);
- return valstr;
-}
-
-/*
- * call-seq:
- * gdbm.shift -> (key, value) or nil
- *
- * Removes a key-value-pair from this database and returns it as a
- * two-item array [ _key_, _value_ ]. Returns nil if the database is empty.
- */
-static VALUE
-fgdbm_shift(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, valstr;
-
- rb_gdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- keystr = rb_gdbm_firstkey(dbm);
- if (NIL_P(keystr)) return Qnil;
- valstr = rb_gdbm_fetch2(dbm, keystr);
- rb_gdbm_delete(obj, keystr);
-
- return rb_assoc_new(keystr, valstr);
-}
-
-/*
- * call-seq:
- * gdbm.delete_if { |key, value| block } -> gdbm
- * gdbm.reject! { |key, value| block } -> gdbm
- *
- * Deletes every key-value pair from _gdbm_ for which _block_ evaluates to true.
- */
-static VALUE
-fgdbm_delete_if(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, valstr;
- VALUE ret, ary = rb_ary_tmp_new(0);
- long i;
- int status = 0, n;
-
- rb_gdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- n = dbmp->di_size;
- dbmp->di_size = -1;
-
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- OBJ_FREEZE(keystr);
- valstr = rb_gdbm_fetch2(dbm, keystr);
- ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
- if (status != 0) break;
- if (RTEST(ret)) rb_ary_push(ary, keystr);
- GetDBM2(obj, dbmp, dbm);
- }
-
- for (i = 0; i < RARRAY_LEN(ary); i++)
- rb_gdbm_delete(obj, RARRAY_AREF(ary, i));
- if (status) rb_jump_tag(status);
- if (n > 0) dbmp->di_size = n - (int)RARRAY_LEN(ary);
- rb_ary_clear(ary);
-
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.clear -> gdbm
- *
- * Removes all the key-value pairs within _gdbm_.
- */
-static VALUE
-fgdbm_clear(VALUE obj)
-{
- datum key, nextkey;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- rb_gdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
-
-#if 0
- while (key = gdbm_firstkey(dbm), key.dptr) {
- if (gdbm_delete(dbm, key)) {
- free(key.dptr);
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- free(key.dptr);
- }
-#else
- while (key = gdbm_firstkey(dbm), key.dptr) {
- for (; key.dptr; key = nextkey) {
- nextkey = gdbm_nextkey(dbm, key);
- if (gdbm_delete(dbm, key)) {
- free(key.dptr);
- if (nextkey.dptr) free(nextkey.dptr);
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- free(key.dptr);
- }
- }
-#endif
- dbmp->di_size = 0;
-
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.invert -> hash
- *
- * Returns a hash created by using _gdbm_'s values as keys, and the keys
- * as values.
- */
-static VALUE
-fgdbm_invert(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, valstr;
- VALUE hash = rb_hash_new();
-
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
- valstr = rb_gdbm_fetch2(dbm, keystr);
-
- rb_hash_aset(hash, valstr, keystr);
- }
- return hash;
-}
-
-/*
- * call-seq:
- * gdbm[key]= value -> value
- * gdbm.store(key, value) -> value
- *
- * Associates the value _value_ with the specified _key_.
- */
-static VALUE
-fgdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- rb_gdbm_modify(obj);
- ExportStringValue(keystr);
- ExportStringValue(valstr);
-
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
-
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_LENINT(valstr);
-
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
- if (gdbm_store(dbm, key, val, GDBM_REPLACE)) {
- if (errno == EPERM) rb_sys_fail(0);
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
-
- return valstr;
-}
-
-static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
-{
- const VALUE *ptr;
- Check_Type(pair, T_ARRAY);
- if (RARRAY_LEN(pair) < 2) {
- rb_raise(rb_eArgError, "pair must be [key, value]");
- }
- ptr = RARRAY_CONST_PTR(pair);
- fgdbm_store(dbm, ptr[0], ptr[1]);
- return Qnil;
-}
-
-/*
- * call-seq:
- * gdbm.update(other) -> gdbm
- *
- * Adds the key-value pairs of _other_ to _gdbm_, overwriting entries with
- * duplicate keys with those from _other_. _other_ must have an each_pair
- * method.
- */
-static VALUE
-fgdbm_update(VALUE obj, VALUE other)
-{
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.replace(other) -> gdbm
- *
- * Replaces the content of _gdbm_ with the key-value pairs of _other_.
- * _other_ must have an each_pair method.
- */
-static VALUE
-fgdbm_replace(VALUE obj, VALUE other)
-{
- fgdbm_clear(obj);
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.length -> fixnum
- * gdbm.size -> fixnum
- *
- * Returns the number of key-value pairs in this database.
- */
-static VALUE
-fgdbm_length(VALUE obj)
-{
- datum key, nextkey;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- int i = 0;
-
- GetDBM2(obj, dbmp, dbm);
- if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
-
- for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) {
- nextkey = gdbm_nextkey(dbm, key);
- free(key.dptr);
- i++;
- }
- dbmp->di_size = i;
-
- return INT2FIX(i);
-}
-
-/*
- * call-seq:
- * gdbm.empty? -> true or false
- *
- * Returns true if the database is empty.
- */
-static VALUE
-fgdbm_empty_p(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- GetDBM(obj, dbmp);
- if (dbmp->di_size < 0) {
- dbm = dbmp->di_dbm;
-
- key = gdbm_firstkey(dbm);
- if (key.dptr) {
- free(key.dptr);
- return Qfalse;
- }
- return Qtrue;
- }
-
- if (dbmp->di_size == 0) return Qtrue;
- return Qfalse;
-}
-
-/*
- * call-seq:
- * gdbm.each_value { |value| block } -> gdbm
- *
- * Executes _block_ for each key in the database, passing the corresponding
- * _value_ as a parameter.
- */
-static VALUE
-fgdbm_each_value(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_yield(rb_gdbm_fetch2(dbm, keystr));
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.each_key { |key| block } -> gdbm
- *
- * Executes _block_ for each key in the database, passing the
- * _key_ as a parameter.
- */
-static VALUE
-fgdbm_each_key(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_yield(keystr);
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.each_pair { |key, value| block } -> gdbm
- *
- * Executes _block_ for each key in the database, passing the _key_ and the
- * corresponding _value_ as a parameter.
- */
-static VALUE
-fgdbm_each_pair(VALUE obj)
-{
- GDBM_FILE dbm;
- struct dbmdata *dbmp;
- VALUE keystr;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
- GetDBM2(obj, dbmp, dbm);
- }
-
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.keys -> array
- *
- * Returns an array of all keys of this database.
- */
-static VALUE
-fgdbm_keys(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_ary_push(ary, keystr);
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * gdbm.values -> array
- *
- * Returns an array of all values of this database.
- */
-static VALUE
-fgdbm_values(VALUE obj)
-{
- datum key, nextkey;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE valstr, ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) {
- nextkey = gdbm_nextkey(dbm, key);
- valstr = rb_gdbm_fetch(dbm, key);
- free(key.dptr);
- rb_ary_push(ary, valstr);
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * gdbm.include?(k) -> true or false
- * gdbm.has_key?(k) -> true or false
- * gdbm.member?(k) -> true or false
- * gdbm.key?(k) -> true or false
- *
- * Returns true if the given key _k_ exists within the database.
- * Returns false otherwise.
- */
-static VALUE
-fgdbm_has_key(VALUE obj, VALUE keystr)
-{
- datum key;
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- long len;
-
- ExportStringValue(keystr);
- len = RSTRING_LENINT(keystr);
- if (TOO_LONG(len)) return Qfalse;
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = (int)len;
-
- GetDBM2(obj, dbmp, dbm);
- if (gdbm_exists(dbm, key))
- return Qtrue;
- return Qfalse;
-}
-
-/*
- * call-seq:
- * gdbm.has_value?(v) -> true or false
- * gdbm.value?(v) -> true or false
- *
- * Returns true if the given value _v_ exists within the database.
- * Returns false otherwise.
- */
-static VALUE
-fgdbm_has_value(VALUE obj, VALUE valstr)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, valstr2;
-
- ExportStringValue(valstr);
- GetDBM2(obj, dbmp, dbm);
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- valstr2 = rb_gdbm_fetch2(dbm, keystr);
-
- if (!NIL_P(valstr2) &&
- (int)RSTRING_LEN(valstr) == (int)RSTRING_LEN(valstr2) &&
- memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2),
- (int)RSTRING_LEN(valstr)) == 0) {
- return Qtrue;
- }
- }
- return Qfalse;
-}
-
-/*
- * call-seq:
- * gdbm.to_a -> array
- *
- * Returns an array of all key-value pairs contained in the database.
- */
-static VALUE
-fgdbm_to_a(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * gdbm.reorganize -> gdbm
- *
- * Reorganizes the database file. This operation removes reserved space of
- * elements that have already been deleted. It is only useful after a lot of
- * deletions in the database.
- */
-static VALUE
-fgdbm_reorganize(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- rb_gdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- gdbm_reorganize(dbm);
- rb_fd_fix_cloexec(gdbm_fdesc(dbm));
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.sync -> gdbm
- *
- * Unless the _gdbm_ object has been opened with the *SYNC* flag, it is not
- * guaranteed that database modification operations are immediately applied to
- * the database file. This method ensures that all recent modifications
- * to the database are written to the file. Blocks until all writing operations
- * to the disk have been finished.
- */
-static VALUE
-fgdbm_sync(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
-
- rb_gdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- gdbm_sync(dbm);
- return obj;
-}
-
-/*
- * call-seq:
- * gdbm.cachesize = size -> size
- *
- * Sets the size of the internal bucket cache to _size_.
- */
-static VALUE
-fgdbm_set_cachesize(VALUE obj, VALUE val)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- int optval;
-
- GetDBM2(obj, dbmp, dbm);
- optval = FIX2INT(val);
- if (gdbm_setopt(dbm, GDBM_CACHESIZE, &optval, sizeof(optval)) == -1) {
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- return val;
-}
-
-/*
- * call-seq:
- * gdbm.fastmode = boolean -> boolean
- *
- * Turns the database's fast mode on or off. If fast mode is turned on, gdbm
- * does not wait for writes to be flushed to the disk before continuing.
- *
- * This option is obsolete for gdbm >= 1.8 since fast mode is turned on by
- * default. See also: #syncmode=
- */
-static VALUE
-fgdbm_set_fastmode(VALUE obj, VALUE val)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- int optval;
-
- GetDBM2(obj, dbmp, dbm);
- optval = 0;
- if (RTEST(val))
- optval = 1;
-
- if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) {
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- return val;
-}
-
-/*
- * call-seq:
- * gdbm.syncmode = boolean -> boolean
- *
- * Turns the database's synchronization mode on or off. If the synchronization
- * mode is turned on, the database's in-memory state will be synchronized to
- * disk after every database modification operation. If the synchronization
- * mode is turned off, GDBM does not wait for writes to be flushed to the disk
- * before continuing.
- *
- * This option is only available for gdbm >= 1.8 where syncmode is turned off
- * by default. See also: #fastmode=
- */
-static VALUE
-fgdbm_set_syncmode(VALUE obj, VALUE val)
-{
-#if !defined(GDBM_SYNCMODE)
- fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
- return val;
-#else
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- int optval;
-
- GetDBM2(obj, dbmp, dbm);
- optval = 0;
- if (RTEST(val))
- optval = 1;
-
- if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) {
- rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
- }
- return val;
-#endif
-}
-
-/*
- * call-seq:
- * gdbm.to_hash -> hash
- *
- * Returns a hash of all key-value pairs contained in the database.
- */
-static VALUE
-fgdbm_to_hash(VALUE obj)
-{
- struct dbmdata *dbmp;
- GDBM_FILE dbm;
- VALUE keystr, hash;
-
- GetDBM2(obj, dbmp, dbm);
- hash = rb_hash_new();
- for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
- keystr = rb_gdbm_nextkey(dbm, keystr)) {
-
- rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));
- }
-
- return hash;
-}
-
-/*
- * call-seq:
- * gdbm.reject { |key, value| block } -> hash
- *
- * Returns a hash copy of _gdbm_ where all key-value pairs from _gdbm_ for
- * which _block_ evaluates to true are removed. See also: #delete_if
- */
-static VALUE
-fgdbm_reject(VALUE obj)
-{
- return rb_hash_delete_if(fgdbm_to_hash(obj));
-}
-
-void
-Init_gdbm(void)
-{
- rb_cGDBM = rb_define_class("GDBM", rb_cObject);
- rb_eGDBMError = rb_define_class("GDBMError", rb_eStandardError);
- rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException);
- rb_include_module(rb_cGDBM, rb_mEnumerable);
-
- rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);
- rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1);
-
- rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);
- rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);
- rb_define_method(rb_cGDBM, "closed?", fgdbm_closed, 0);
- rb_define_method(rb_cGDBM, "[]", fgdbm_aref, 1);
- rb_define_method(rb_cGDBM, "fetch", fgdbm_fetch_m, -1);
- rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
- rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);
- rb_define_method(rb_cGDBM, "index", fgdbm_index, 1);
- rb_define_method(rb_cGDBM, "key", fgdbm_key, 1);
- rb_define_method(rb_cGDBM, "select", fgdbm_select, 0);
- rb_define_method(rb_cGDBM, "values_at", fgdbm_values_at, -1);
- rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
- rb_define_method(rb_cGDBM, "size", fgdbm_length, 0);
- rb_define_method(rb_cGDBM, "empty?", fgdbm_empty_p, 0);
- rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
- rb_define_method(rb_cGDBM, "each_value", fgdbm_each_value, 0);
- rb_define_method(rb_cGDBM, "each_key", fgdbm_each_key, 0);
- rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0);
- rb_define_method(rb_cGDBM, "keys", fgdbm_keys, 0);
- rb_define_method(rb_cGDBM, "values", fgdbm_values, 0);
- rb_define_method(rb_cGDBM, "shift", fgdbm_shift, 0);
- rb_define_method(rb_cGDBM, "delete", fgdbm_delete, 1);
- rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
- rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);
- rb_define_method(rb_cGDBM, "reject", fgdbm_reject, 0);
- rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0);
- rb_define_method(rb_cGDBM, "invert", fgdbm_invert, 0);
- rb_define_method(rb_cGDBM, "update", fgdbm_update, 1);
- rb_define_method(rb_cGDBM, "replace", fgdbm_replace, 1);
- rb_define_method(rb_cGDBM, "reorganize", fgdbm_reorganize, 0);
- rb_define_method(rb_cGDBM, "sync", fgdbm_sync, 0);
- /* rb_define_method(rb_cGDBM, "setopt", fgdbm_setopt, 2); */
- rb_define_method(rb_cGDBM, "cachesize=", fgdbm_set_cachesize, 1);
- rb_define_method(rb_cGDBM, "fastmode=", fgdbm_set_fastmode, 1);
- rb_define_method(rb_cGDBM, "syncmode=", fgdbm_set_syncmode, 1);
-
- rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
- rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
- rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
- rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
- rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);
- rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);
-
- rb_define_method(rb_cGDBM, "to_a", fgdbm_to_a, 0);
- rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);
-
- /* flag for #new and #open: open database as a reader */
- rb_define_const(rb_cGDBM, "READER", INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
- /* flag for #new and #open: open database as a writer */
- rb_define_const(rb_cGDBM, "WRITER", INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
- /* flag for #new and #open: open database as a writer; if the database does not exist, create a new one */
- rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
- /* flag for #new and #open: open database as a writer; overwrite any existing databases */
- rb_define_const(rb_cGDBM, "NEWDB", INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));
-
- /* flag for #new and #open. this flag is obsolete for gdbm >= 1.8 */
- rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
- /* this flag is obsolete in gdbm 1.8.
- On gdbm 1.8, fast mode is default behavior. */
-
- /* gdbm version 1.8 specific */
-#if defined(GDBM_SYNC)
- /* flag for #new and #open. only for gdbm >= 1.8 */
- rb_define_const(rb_cGDBM, "SYNC", INT2FIX(GDBM_SYNC));
-#endif
-#if defined(GDBM_NOLOCK)
- /* flag for #new and #open */
- rb_define_const(rb_cGDBM, "NOLOCK", INT2FIX(GDBM_NOLOCK));
-#endif
- /* version of the gdbm library*/
- rb_define_const(rb_cGDBM, "VERSION", rb_str_new2(gdbm_version));
-}
diff --git a/ext/gdbm/gdbm.gemspec b/ext/gdbm/gdbm.gemspec
deleted file mode 100644
index da074b0180..0000000000
--- a/ext/gdbm/gdbm.gemspec
+++ /dev/null
@@ -1,21 +0,0 @@
-# coding: utf-8
-# frozen_string_literal: true
-
-Gem::Specification.new do |spec|
- spec.name = "gdbm"
- spec.version = "2.1.0"
- spec.authors = ["Yukihiro Matsumoto"]
- spec.email = ["matz@ruby-lang.org"]
-
- spec.summary = "Ruby extension for GNU dbm."
- spec.description = "Ruby extension for GNU dbm."
- spec.homepage = "https://github.com/ruby/gdbm"
- spec.license = "BSD-2-Clause"
-
- spec.files = ["ext/gdbm/extconf.rb", "ext/gdbm/gdbm.c"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
- spec.extensions = ["ext/gdbm/extconf.rb"]
- spec.required_ruby_version = ">= 2.3.0"
-end
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index ac5b6a611c..21454a73fa 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -1,4 +1,4 @@
-/* -*- c-file-style: "ruby" -*- */
+/* -*- c-file-style: "ruby"; indent-tabs-mode: t -*- */
/*
* console IO module
*/
@@ -75,12 +75,25 @@ getattr(int fd, conmode *t)
#define SET_LAST_ERROR (0)
#endif
-static ID id_getc, id_console, id_close, id_min, id_time, id_intr;
+static ID id_getc, id_console, id_close;
#if ENABLE_IO_GETPASS
-static ID id_gets;
+static ID id_gets, id_chomp_bang;
#endif
+#if defined HAVE_RUBY_FIBER_SCHEDULER_H
+# include "ruby/fiber/scheduler.h"
+#elif defined HAVE_RB_SCHEDULER_TIMEOUT
+extern VALUE rb_scheduler_timeout(struct timeval *timeout);
+# define rb_fiber_scheduler_make_timeout rb_scheduler_timeout
+#endif
+
+#define sys_fail_fptr(fptr) rb_sys_fail_str((fptr)->pathv)
+
#ifndef HAVE_RB_F_SEND
+#ifndef RB_PASS_CALLED_KEYWORDS
+# define rb_funcallv_kw(recv, mid, arg, argv, kw_splat) rb_funcallv(recv, mid, arg, argv)
+#endif
+
static ID id___send__;
static VALUE
@@ -95,22 +108,41 @@ rb_f_send(int argc, VALUE *argv, VALUE recv)
else {
vid = id___send__;
}
- return rb_funcallv(recv, vid, argc, argv);
+ return rb_funcallv_kw(recv, vid, argc, argv, RB_PASS_CALLED_KEYWORDS);
}
#endif
+enum rawmode_opt_ids {
+ kwd_min,
+ kwd_time,
+ kwd_intr,
+ rawmode_opt_id_count
+};
+static ID rawmode_opt_ids[rawmode_opt_id_count];
+
typedef struct {
int vmin;
int vtime;
int intr;
} rawmode_arg_t;
+#ifndef UNDEF_P
+# define UNDEF_P(obj) ((obj) == Qundef)
+#endif
+#ifndef NIL_OR_UNDEF_P
+# define NIL_OR_UNDEF_P(obj) (NIL_P(obj) || UNDEF_P(obj))
+#endif
+
static rawmode_arg_t *
rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *opts)
{
int argc = *argcp;
rawmode_arg_t *optp = NULL;
VALUE vopts = Qnil;
+ VALUE optvals[rawmode_opt_id_count];
+#ifdef RB_SCAN_ARGS_PASS_CALLED_KEYWORDS
+ argc = rb_scan_args(argc, argv, "*:", NULL, &vopts);
+#else
if (argc > min_argc) {
vopts = rb_check_hash_type(argv[argc-1]);
if (!NIL_P(vopts)) {
@@ -120,20 +152,22 @@ rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *
if (!vopts) vopts = Qnil;
}
}
+#endif
rb_check_arity(argc, min_argc, max_argc);
- if (!NIL_P(vopts)) {
- VALUE vmin = rb_hash_aref(vopts, ID2SYM(id_min));
- VALUE vtime = rb_hash_aref(vopts, ID2SYM(id_time));
- VALUE intr = rb_hash_aref(vopts, ID2SYM(id_intr));
+ if (rb_get_kwargs(vopts, rawmode_opt_ids,
+ 0, rawmode_opt_id_count, optvals)) {
+ VALUE vmin = optvals[kwd_min];
+ VALUE vtime = optvals[kwd_time];
+ VALUE intr = optvals[kwd_intr];
/* default values by `stty raw` */
opts->vmin = 1;
opts->vtime = 0;
opts->intr = 0;
- if (!NIL_P(vmin)) {
+ if (!NIL_OR_UNDEF_P(vmin)) {
opts->vmin = NUM2INT(vmin);
optp = opts;
}
- if (!NIL_P(vtime)) {
+ if (!NIL_OR_UNDEF_P(vtime)) {
VALUE v10 = INT2FIX(10);
vtime = rb_funcall3(vtime, '*', 1, &v10);
opts->vtime = NUM2INT(vtime);
@@ -148,6 +182,7 @@ rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *
opts->intr = 0;
optp = opts;
break;
+ case Qundef:
case Qnil:
break;
default:
@@ -188,8 +223,9 @@ set_rawmode(conmode *t, void *arg)
#endif
#ifdef ISIG
if (r->intr) {
- t->c_iflag |= BRKINT|IXON;
+ t->c_iflag |= BRKINT;
t->c_lflag |= ISIG;
+ t->c_oflag |= OPOST;
}
#endif
(void)r;
@@ -355,9 +391,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
/*
* call-seq:
- * io.raw(min: nil, time: nil) {|io| }
+ * io.raw(min: nil, time: nil, intr: nil) {|io| }
*
- * Yields +self+ within raw mode.
+ * Yields +self+ within raw mode, and returns the result of the block.
*
* STDIN.raw(&:gets)
*
@@ -369,6 +405,9 @@ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter
* The parameter +time+ specifies the timeout in _seconds_ with a
* precision of 1/10 of a second. (default: 0)
*
+ * If the parameter +intr+ is +true+, enables break, interrupt, quit,
+ * and suspend special characters.
+ *
* Refer to the manual page of termios for further details.
*
* You must require 'io/console' to use this method.
@@ -382,11 +421,11 @@ console_raw(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * io.raw!(min: nil, time: nil)
+ * io.raw!(min: nil, time: nil, intr: nil) -> io
*
- * Enables raw mode.
+ * Enables raw mode, and returns +io+.
*
- * If the terminal mode needs to be back, use io.raw { ... }.
+ * If the terminal mode needs to be back, use <code>io.raw { ... }</code>.
*
* See IO#raw for details on the parameters.
*
@@ -402,9 +441,9 @@ console_set_raw(int argc, VALUE *argv, VALUE io)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!getattr(fd, &t)) rb_sys_fail(0);
+ if (!getattr(fd, &t)) sys_fail_fptr(fptr);
set_rawmode(&t, optp);
- if (!setattr(fd, &t)) rb_sys_fail(0);
+ if (!setattr(fd, &t)) sys_fail_fptr(fptr);
return io;
}
@@ -445,9 +484,9 @@ console_set_cooked(VALUE io)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!getattr(fd, &t)) rb_sys_fail(0);
+ if (!getattr(fd, &t)) sys_fail_fptr(fptr);
set_cookedmode(&t, NULL);
- if (!setattr(fd, &t)) rb_sys_fail(0);
+ if (!setattr(fd, &t)) sys_fail_fptr(fptr);
return io;
}
@@ -482,7 +521,7 @@ nogvl_getch(void *p)
/*
* call-seq:
- * io.getch(min: nil, time: nil) -> char
+ * io.getch(min: nil, time: nil, intr: nil) -> char
*
* Reads and returns a character in raw mode.
*
@@ -500,28 +539,50 @@ console_getch(int argc, VALUE *argv, VALUE io)
rb_io_t *fptr;
VALUE str;
wint_t c;
- int w, len;
+ int len;
char buf[8];
wint_t wbuf[2];
+# ifndef HAVE_RB_IO_WAIT
struct timeval *to = NULL, tv;
+# else
+ VALUE timeout = Qnil;
+# endif
GetOpenFile(io, fptr);
if (optp) {
if (optp->vtime) {
+# ifndef HAVE_RB_IO_WAIT
to = &tv;
+# else
+ struct timeval tv;
+# endif
tv.tv_sec = optp->vtime / 10;
tv.tv_usec = (optp->vtime % 10) * 100000;
+# ifdef HAVE_RB_IO_WAIT
+ timeout = rb_fiber_scheduler_make_timeout(&tv);
+# endif
}
- if (optp->vmin != 1) {
- rb_warning("min option ignored");
+ switch (optp->vmin) {
+ case 1: /* default */
+ break;
+ case 0: /* return nil when timed out */
+ if (optp->vtime) break;
+ /* fallthru */
+ default:
+ rb_warning("min option larger than 1 ignored");
}
if (optp->intr) {
- w = rb_wait_for_single_fd(fptr->fd, RB_WAITFD_IN, to);
+# ifndef HAVE_RB_IO_WAIT
+ int w = rb_wait_for_single_fd(fptr->fd, RB_WAITFD_IN, to);
if (w < 0) rb_eof_error();
if (!(w & RB_WAITFD_IN)) return Qnil;
+# else
+ VALUE result = rb_io_wait(io, RB_INT2NUM(RUBY_IO_READABLE), timeout);
+ if (!RTEST(result)) return Qnil;
+# endif
}
- else {
- rb_warning("vtime option ignored if intr flag is unset");
+ else if (optp->vtime) {
+ rb_warning("Non-zero vtime option ignored if intr flag is unset");
}
}
len = (int)(VALUE)rb_thread_call_without_gvl(nogvl_getch, wbuf, RUBY_UBF_IO, 0);
@@ -582,12 +643,12 @@ console_set_echo(VALUE io, VALUE f)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!getattr(fd, &t)) rb_sys_fail(0);
+ if (!getattr(fd, &t)) sys_fail_fptr(fptr);
if (RTEST(f))
set_echo(&t, NULL);
else
set_noecho(&t, NULL);
- if (!setattr(fd, &t)) rb_sys_fail(0);
+ if (!setattr(fd, &t)) sys_fail_fptr(fptr);
return io;
}
@@ -608,7 +669,7 @@ console_echo_p(VALUE io)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!getattr(fd, &t)) rb_sys_fail(0);
+ if (!getattr(fd, &t)) sys_fail_fptr(fptr);
return echo_p(&t) ? Qtrue : Qfalse;
}
@@ -692,7 +753,7 @@ console_conmode_get(VALUE io)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!getattr(fd, &t)) rb_sys_fail(0);
+ if (!getattr(fd, &t)) sys_fail_fptr(fptr);
return conmode_new(cConmode, &t);
}
@@ -716,7 +777,7 @@ console_conmode_set(VALUE io, VALUE mode)
r = *t;
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
- if (!setattr(fd, &r)) rb_sys_fail(0);
+ if (!setattr(fd, &r)) sys_fail_fptr(fptr);
return mode;
}
@@ -758,7 +819,7 @@ console_winsize(VALUE io)
GetOpenFile(io, fptr);
fd = GetWriteFD(fptr);
- if (!getwinsize(fd, &ws)) rb_sys_fail(0);
+ if (!getwinsize(fd, &ws)) sys_fail_fptr(fptr);
return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
}
@@ -805,7 +866,7 @@ console_set_winsize(VALUE io, VALUE size)
SET(xpixel);
SET(ypixel);
#undef SET
- if (!setwinsize(fd, &ws)) rb_sys_fail(0);
+ if (!setwinsize(fd, &ws)) sys_fail_fptr(fptr);
#elif defined _WIN32
wh = (HANDLE)rb_w32_get_osfhandle(fd);
#define SET(m) new##m = NIL_P(m) ? 0 : (unsigned short)NUM2UINT(m)
@@ -880,7 +941,7 @@ console_iflush(VALUE io)
GetOpenFile(io, fptr);
fd = GetReadFD(fptr);
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
- if (tcflush(fd, TCIFLUSH)) rb_sys_fail(0);
+ if (tcflush(fd, TCIFLUSH)) sys_fail_fptr(fptr);
#endif
(void)fd;
return io;
@@ -903,7 +964,7 @@ console_oflush(VALUE io)
GetOpenFile(io, fptr);
fd = GetWriteFD(fptr);
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
- if (tcflush(fd, TCOFLUSH)) rb_sys_fail(0);
+ if (tcflush(fd, TCOFLUSH)) sys_fail_fptr(fptr);
#endif
(void)fd;
return io;
@@ -930,11 +991,11 @@ console_ioflush(VALUE io)
fd1 = GetReadFD(fptr);
fd2 = GetWriteFD(fptr);
if (fd2 != -1 && fd1 != fd2) {
- if (tcflush(fd1, TCIFLUSH)) rb_sys_fail(0);
- if (tcflush(fd2, TCOFLUSH)) rb_sys_fail(0);
+ if (tcflush(fd1, TCIFLUSH)) sys_fail_fptr(fptr);
+ if (tcflush(fd2, TCOFLUSH)) sys_fail_fptr(fptr);
}
else {
- if (tcflush(fd1, TCIOFLUSH)) rb_sys_fail(0);
+ if (tcflush(fd1, TCIOFLUSH)) sys_fail_fptr(fptr);
}
#endif
return io;
@@ -953,7 +1014,7 @@ console_beep(VALUE io)
MessageBeep(0);
#else
if (write(fd, "\a", 1) < 0)
- rb_sys_fail(0);
+ sys_fail_fptr(fptr);
#endif
return io;
}
@@ -1187,8 +1248,8 @@ console_key_pressed_p(VALUE io, VALUE k)
}
#else
struct query_args {
- const char *qstr;
- int opt;
+ char qstr[6];
+ unsigned char opt;
};
static int
@@ -1489,7 +1550,7 @@ console_dev(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * io.getch(min: nil, time: nil) -> char
+ * io.getch(min: nil, time: nil, intr: nil) -> char
*
* See IO#getch.
*/
@@ -1526,7 +1587,7 @@ static VALUE
str_chomp(VALUE str)
{
if (!NIL_P(str)) {
- str = rb_funcallv(str, rb_intern("chomp!"), 0, 0);
+ rb_funcallv(str, id_chomp_bang, 0, 0);
}
return str;
}
@@ -1538,6 +1599,10 @@ str_chomp(VALUE str)
* Reads and returns a line without echo back.
* Prints +prompt+ unless it is +nil+.
*
+ * The newline character that terminates the
+ * read line is removed from the returned string,
+ * see String#chomp!.
+ *
* You must require 'io/console' to use this method.
*/
static VALUE
@@ -1582,12 +1647,15 @@ Init_console(void)
id_getc = rb_intern("getc");
#if ENABLE_IO_GETPASS
id_gets = rb_intern("gets");
+ id_chomp_bang = rb_intern("chomp!");
#endif
id_console = rb_intern("console");
id_close = rb_intern("close");
- id_min = rb_intern("min");
- id_time = rb_intern("time");
- id_intr = rb_intern("intr");
+#define init_rawmode_opt_id(name) \
+ rawmode_opt_ids[kwd_##name] = rb_intern(#name)
+ init_rawmode_opt_id(min);
+ init_rawmode_opt_id(time);
+ init_rawmode_opt_id(intr);
#ifndef HAVE_RB_F_SEND
id___send__ = rb_intern("__send__");
#endif
diff --git a/ext/io/console/depend b/ext/io/console/depend
index 9c8f9cd22e..36747ef583 100644
--- a/ext/io/console/depend
+++ b/ext/io/console/depend
@@ -4,9 +4,167 @@ console.o: $(arch_hdrdir)/ruby/config.h
console.o: $(hdrdir)/ruby.h
console.o: $(hdrdir)/ruby/assert.h
console.o: $(hdrdir)/ruby/backward.h
+console.o: $(hdrdir)/ruby/backward/2/assume.h
+console.o: $(hdrdir)/ruby/backward/2/attributes.h
+console.o: $(hdrdir)/ruby/backward/2/bool.h
+console.o: $(hdrdir)/ruby/backward/2/inttypes.h
+console.o: $(hdrdir)/ruby/backward/2/limits.h
+console.o: $(hdrdir)/ruby/backward/2/long_long.h
+console.o: $(hdrdir)/ruby/backward/2/stdalign.h
+console.o: $(hdrdir)/ruby/backward/2/stdarg.h
console.o: $(hdrdir)/ruby/defines.h
console.o: $(hdrdir)/ruby/encoding.h
+console.o: $(hdrdir)/ruby/fiber/scheduler.h
console.o: $(hdrdir)/ruby/intern.h
+console.o: $(hdrdir)/ruby/internal/abi.h
+console.o: $(hdrdir)/ruby/internal/anyargs.h
+console.o: $(hdrdir)/ruby/internal/arithmetic.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+console.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+console.o: $(hdrdir)/ruby/internal/assume.h
+console.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+console.o: $(hdrdir)/ruby/internal/attr/artificial.h
+console.o: $(hdrdir)/ruby/internal/attr/cold.h
+console.o: $(hdrdir)/ruby/internal/attr/const.h
+console.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+console.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+console.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+console.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+console.o: $(hdrdir)/ruby/internal/attr/error.h
+console.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+console.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+console.o: $(hdrdir)/ruby/internal/attr/format.h
+console.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+console.o: $(hdrdir)/ruby/internal/attr/noalias.h
+console.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+console.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+console.o: $(hdrdir)/ruby/internal/attr/noinline.h
+console.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+console.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+console.o: $(hdrdir)/ruby/internal/attr/pure.h
+console.o: $(hdrdir)/ruby/internal/attr/restrict.h
+console.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+console.o: $(hdrdir)/ruby/internal/attr/warning.h
+console.o: $(hdrdir)/ruby/internal/attr/weakref.h
+console.o: $(hdrdir)/ruby/internal/cast.h
+console.o: $(hdrdir)/ruby/internal/compiler_is.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+console.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+console.o: $(hdrdir)/ruby/internal/compiler_since.h
+console.o: $(hdrdir)/ruby/internal/config.h
+console.o: $(hdrdir)/ruby/internal/constant_p.h
+console.o: $(hdrdir)/ruby/internal/core.h
+console.o: $(hdrdir)/ruby/internal/core/rarray.h
+console.o: $(hdrdir)/ruby/internal/core/rbasic.h
+console.o: $(hdrdir)/ruby/internal/core/rbignum.h
+console.o: $(hdrdir)/ruby/internal/core/rclass.h
+console.o: $(hdrdir)/ruby/internal/core/rdata.h
+console.o: $(hdrdir)/ruby/internal/core/rfile.h
+console.o: $(hdrdir)/ruby/internal/core/rhash.h
+console.o: $(hdrdir)/ruby/internal/core/robject.h
+console.o: $(hdrdir)/ruby/internal/core/rregexp.h
+console.o: $(hdrdir)/ruby/internal/core/rstring.h
+console.o: $(hdrdir)/ruby/internal/core/rstruct.h
+console.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+console.o: $(hdrdir)/ruby/internal/ctype.h
+console.o: $(hdrdir)/ruby/internal/dllexport.h
+console.o: $(hdrdir)/ruby/internal/dosish.h
+console.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+console.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+console.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+console.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+console.o: $(hdrdir)/ruby/internal/encoding/re.h
+console.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+console.o: $(hdrdir)/ruby/internal/encoding/string.h
+console.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+console.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+console.o: $(hdrdir)/ruby/internal/error.h
+console.o: $(hdrdir)/ruby/internal/eval.h
+console.o: $(hdrdir)/ruby/internal/event.h
+console.o: $(hdrdir)/ruby/internal/fl_type.h
+console.o: $(hdrdir)/ruby/internal/gc.h
+console.o: $(hdrdir)/ruby/internal/glob.h
+console.o: $(hdrdir)/ruby/internal/globals.h
+console.o: $(hdrdir)/ruby/internal/has/attribute.h
+console.o: $(hdrdir)/ruby/internal/has/builtin.h
+console.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+console.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+console.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+console.o: $(hdrdir)/ruby/internal/has/extension.h
+console.o: $(hdrdir)/ruby/internal/has/feature.h
+console.o: $(hdrdir)/ruby/internal/has/warning.h
+console.o: $(hdrdir)/ruby/internal/intern/array.h
+console.o: $(hdrdir)/ruby/internal/intern/bignum.h
+console.o: $(hdrdir)/ruby/internal/intern/class.h
+console.o: $(hdrdir)/ruby/internal/intern/compar.h
+console.o: $(hdrdir)/ruby/internal/intern/complex.h
+console.o: $(hdrdir)/ruby/internal/intern/cont.h
+console.o: $(hdrdir)/ruby/internal/intern/dir.h
+console.o: $(hdrdir)/ruby/internal/intern/enum.h
+console.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+console.o: $(hdrdir)/ruby/internal/intern/error.h
+console.o: $(hdrdir)/ruby/internal/intern/eval.h
+console.o: $(hdrdir)/ruby/internal/intern/file.h
+console.o: $(hdrdir)/ruby/internal/intern/gc.h
+console.o: $(hdrdir)/ruby/internal/intern/hash.h
+console.o: $(hdrdir)/ruby/internal/intern/io.h
+console.o: $(hdrdir)/ruby/internal/intern/load.h
+console.o: $(hdrdir)/ruby/internal/intern/marshal.h
+console.o: $(hdrdir)/ruby/internal/intern/numeric.h
+console.o: $(hdrdir)/ruby/internal/intern/object.h
+console.o: $(hdrdir)/ruby/internal/intern/parse.h
+console.o: $(hdrdir)/ruby/internal/intern/proc.h
+console.o: $(hdrdir)/ruby/internal/intern/process.h
+console.o: $(hdrdir)/ruby/internal/intern/random.h
+console.o: $(hdrdir)/ruby/internal/intern/range.h
+console.o: $(hdrdir)/ruby/internal/intern/rational.h
+console.o: $(hdrdir)/ruby/internal/intern/re.h
+console.o: $(hdrdir)/ruby/internal/intern/ruby.h
+console.o: $(hdrdir)/ruby/internal/intern/select.h
+console.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+console.o: $(hdrdir)/ruby/internal/intern/signal.h
+console.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+console.o: $(hdrdir)/ruby/internal/intern/string.h
+console.o: $(hdrdir)/ruby/internal/intern/struct.h
+console.o: $(hdrdir)/ruby/internal/intern/thread.h
+console.o: $(hdrdir)/ruby/internal/intern/time.h
+console.o: $(hdrdir)/ruby/internal/intern/variable.h
+console.o: $(hdrdir)/ruby/internal/intern/vm.h
+console.o: $(hdrdir)/ruby/internal/interpreter.h
+console.o: $(hdrdir)/ruby/internal/iterator.h
+console.o: $(hdrdir)/ruby/internal/memory.h
+console.o: $(hdrdir)/ruby/internal/method.h
+console.o: $(hdrdir)/ruby/internal/module.h
+console.o: $(hdrdir)/ruby/internal/newobj.h
+console.o: $(hdrdir)/ruby/internal/rgengc.h
+console.o: $(hdrdir)/ruby/internal/scan_args.h
+console.o: $(hdrdir)/ruby/internal/special_consts.h
+console.o: $(hdrdir)/ruby/internal/static_assert.h
+console.o: $(hdrdir)/ruby/internal/stdalign.h
+console.o: $(hdrdir)/ruby/internal/stdbool.h
+console.o: $(hdrdir)/ruby/internal/symbol.h
+console.o: $(hdrdir)/ruby/internal/value.h
+console.o: $(hdrdir)/ruby/internal/value_type.h
+console.o: $(hdrdir)/ruby/internal/variable.h
+console.o: $(hdrdir)/ruby/internal/warning_push.h
+console.o: $(hdrdir)/ruby/internal/xmalloc.h
console.o: $(hdrdir)/ruby/io.h
console.o: $(hdrdir)/ruby/missing.h
console.o: $(hdrdir)/ruby/onigmo.h
@@ -27,7 +185,7 @@ win32_vk.inc: win32_vk.list
-e 'n=$$F[1] and (n.strip!; /\AVK_/=~n) and' \
-e 'puts(%[#ifndef #{n}\n# define #{n} UNDEFINED_VK\n#endif])' \
$< && \
- gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k* $< \
+ gperf --ignore-case -L ANSI-C -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k* $< \
| sed -f $(top_srcdir)/tool/gperf.sed \
) > $(@F)
diff --git a/ext/io/console/extconf.rb b/ext/io/console/extconf.rb
index a6049da667..e8c5923b18 100644
--- a/ext/io/console/extconf.rb
+++ b/ext/io/console/extconf.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
require 'mkmf'
-ok = true
+ok = true if RUBY_ENGINE == "ruby" || RUBY_ENGINE == "truffleruby"
hdr = nil
case
when macro_defined?("_WIN32", "")
@@ -14,8 +14,9 @@ when have_header(hdr = "sgtty.h")
%w"stty gtty".each {|f| have_func(f, hdr)}
else
ok = false
-end
-if ok
+end if ok
+case ok
+when true
have_header("sys/ioctl.h") if hdr
# rb_check_hash_type: 1.9.3
# rb_io_get_write_io: 1.9.1
@@ -23,8 +24,15 @@ if ok
# rb_funcallv: 2.1.0
# RARRAY_CONST_PTR: 2.1.0
# rb_sym2str: 2.2.0
+ if have_macro("HAVE_RUBY_FIBER_SCHEDULER_H")
+ $defs << "-D""HAVE_RB_IO_WAIT=1"
+ elsif have_func("rb_scheduler_timeout") # 3.0
+ have_func("rb_io_wait")
+ end
$defs << "-D""ENABLE_IO_GETPASS=1"
create_makefile("io/console") {|conf|
conf << "\n""VK_HEADER = #{vk_header}\n"
}
+when nil
+ File.write("Makefile", dummy_makefile($srcdir).join(""))
end
diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
index fac9bff9b7..d26a757b01 100644
--- a/ext/io/console/io-console.gemspec
+++ b/ext/io/console/io-console.gemspec
@@ -1,15 +1,13 @@
# -*- ruby -*-
-_VERSION = "0.5.3"
-date = %w$Date:: $[1]
+_VERSION = "0.6.0"
Gem::Specification.new do |s|
s.name = "io-console"
s.version = _VERSION
- s.date = date
s.summary = "Console interface"
s.email = "nobu@ruby-lang.org"
s.description = "add console capabilities to IO instances."
- s.required_ruby_version = ">= 2.2.0"
+ s.required_ruby_version = ">= 2.6.0"
s.homepage = "https://github.com/ruby/io-console"
s.metadata["source_code_url"] = s.homepage
s.authors = ["Nobu Nakada"]
@@ -23,5 +21,21 @@ Gem::Specification.new do |s|
lib/io/console/size.rb
]
s.extensions = %w[ext/io/console/extconf.rb]
- s.license = "BSD-2-Clause"
+
+ if Gem::Platform === s.platform and s.platform =~ 'java'
+ s.files.delete_if {|f| f.start_with?("ext/")}
+ s.extensions.clear
+ s.files.concat(%w[
+ lib/io/console.rb
+ lib/io/console/ffi/bsd_console.rb
+ lib/io/console/ffi/common.rb
+ lib/io/console/ffi/console.rb
+ lib/io/console/ffi/linux_console.rb
+ lib/io/console/ffi/native_console.rb
+ lib/io/console/ffi/stty_console.rb
+ lib/io/console/ffi/stub_console.rb
+ ])
+ end
+
+ s.licenses = ["Ruby", "BSD-2-Clause"]
end
diff --git a/ext/io/console/win32_vk.inc b/ext/io/console/win32_vk.inc
index cbec7bef15..d15b1219fb 100644
--- a/ext/io/console/win32_vk.inc
+++ b/ext/io/console/win32_vk.inc
@@ -480,7 +480,7 @@
# define VK_OEM_CLEAR UNDEFINED_VK
#endif
/* ANSI-C code produced by gperf version 3.1 */
-/* Command-line: gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k'*' win32_vk.list */
+/* Command-line: gperf --ignore-case -L ANSI-C -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k'*' win32_vk.list */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -509,18 +509,17 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
-#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "win32_vk.list"
struct vktable {short ofs; unsigned short vk;};
-static const struct vktable *console_win32_vk(/*const char *, unsigned int*/);
+static const struct vktable *console_win32_vk(const char *, size_t);
#line 5 "win32_vk.list"
struct vktable;
/* maximum key range = 245, duplicates = 0 */
#ifndef GPERF_DOWNCASE
#define GPERF_DOWNCASE 1
-static unsigned char gperf_downcase[256] =
+static const unsigned char gperf_downcase[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -1007,368 +1006,368 @@ console_win32_vk (register const char *str, register size_t len)
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1},
#line 40 "win32_vk.list"
- {gperf_offsetof(stringpool, 12), VK_UP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, VK_UP},
#line 52 "win32_vk.list"
- {gperf_offsetof(stringpool, 13), VK_APPS},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, VK_APPS},
#line 159 "win32_vk.list"
- {gperf_offsetof(stringpool, 14), VK_CRSEL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, VK_CRSEL},
#line 34 "win32_vk.list"
- {gperf_offsetof(stringpool, 15), VK_SPACE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, VK_SPACE},
#line 95 "win32_vk.list"
- {gperf_offsetof(stringpool, 16), VK_SCROLL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, VK_SCROLL},
#line 29 "win32_vk.list"
- {gperf_offsetof(stringpool, 17), VK_ESCAPE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, VK_ESCAPE},
#line 9 "win32_vk.list"
- {gperf_offsetof(stringpool, 18), VK_CANCEL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, VK_CANCEL},
#line 32 "win32_vk.list"
- {gperf_offsetof(stringpool, 19), VK_ACCEPT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, VK_ACCEPT},
#line 66 "win32_vk.list"
- {gperf_offsetof(stringpool, 20), VK_SEPARATOR},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, VK_SEPARATOR},
#line 43 "win32_vk.list"
- {gperf_offsetof(stringpool, 21), VK_SELECT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, VK_SELECT},
#line 18 "win32_vk.list"
- {gperf_offsetof(stringpool, 22), VK_CONTROL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, VK_CONTROL},
#line 166 "win32_vk.list"
- {gperf_offsetof(stringpool, 23), VK_OEM_CLEAR},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, VK_OEM_CLEAR},
#line 145 "win32_vk.list"
- {gperf_offsetof(stringpool, 24), VK_OEM_RESET},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, VK_OEM_RESET},
#line 155 "win32_vk.list"
- {gperf_offsetof(stringpool, 25), VK_OEM_AUTO},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, VK_OEM_AUTO},
#line 151 "win32_vk.list"
- {gperf_offsetof(stringpool, 26), VK_OEM_CUSEL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, VK_OEM_CUSEL},
{-1},
#line 22 "win32_vk.list"
- {gperf_offsetof(stringpool, 28), VK_KANA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, VK_KANA},
#line 127 "win32_vk.list"
- {gperf_offsetof(stringpool, 29), VK_OEM_PLUS},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, VK_OEM_PLUS},
#line 35 "win32_vk.list"
- {gperf_offsetof(stringpool, 30), VK_PRIOR},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, VK_PRIOR},
#line 152 "win32_vk.list"
- {gperf_offsetof(stringpool, 31), VK_OEM_ATTN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, VK_OEM_ATTN},
#line 20 "win32_vk.list"
- {gperf_offsetof(stringpool, 32), VK_PAUSE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, VK_PAUSE},
#line 13 "win32_vk.list"
- {gperf_offsetof(stringpool, 33), VK_BACK},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, VK_BACK},
#line 144 "win32_vk.list"
- {gperf_offsetof(stringpool, 34), VK_PACKET},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, VK_PACKET},
#line 105 "win32_vk.list"
- {gperf_offsetof(stringpool, 35), VK_RCONTROL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, VK_RCONTROL},
#line 104 "win32_vk.list"
- {gperf_offsetof(stringpool, 36), VK_LCONTROL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, VK_LCONTROL},
#line 37 "win32_vk.list"
- {gperf_offsetof(stringpool, 37), VK_END},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, VK_END},
#line 38 "win32_vk.list"
- {gperf_offsetof(stringpool, 38), VK_HOME},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, VK_HOME},
#line 44 "win32_vk.list"
- {gperf_offsetof(stringpool, 39), VK_PRINT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, VK_PRINT},
#line 94 "win32_vk.list"
- {gperf_offsetof(stringpool, 40), VK_NUMLOCK},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, VK_NUMLOCK},
#line 39 "win32_vk.list"
- {gperf_offsetof(stringpool, 41), VK_LEFT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, VK_LEFT},
#line 25 "win32_vk.list"
- {gperf_offsetof(stringpool, 42), VK_JUNJA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, VK_JUNJA},
#line 19 "win32_vk.list"
- {gperf_offsetof(stringpool, 43), VK_MENU},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, VK_MENU},
#line 150 "win32_vk.list"
- {gperf_offsetof(stringpool, 44), VK_OEM_WSCTRL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, VK_OEM_WSCTRL},
#line 156 "win32_vk.list"
- {gperf_offsetof(stringpool, 45), VK_OEM_ENLW},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, VK_OEM_ENLW},
#line 36 "win32_vk.list"
- {gperf_offsetof(stringpool, 46), VK_NEXT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, VK_NEXT},
#line 51 "win32_vk.list"
- {gperf_offsetof(stringpool, 47), VK_RWIN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, VK_RWIN},
#line 50 "win32_vk.list"
- {gperf_offsetof(stringpool, 48), VK_LWIN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48, VK_LWIN},
#line 21 "win32_vk.list"
- {gperf_offsetof(stringpool, 49), VK_CAPITAL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49, VK_CAPITAL},
#line 49 "win32_vk.list"
- {gperf_offsetof(stringpool, 50), VK_HELP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str50, VK_HELP},
#line 164 "win32_vk.list"
- {gperf_offsetof(stringpool, 51), VK_NONAME},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str51, VK_NONAME},
#line 8 "win32_vk.list"
- {gperf_offsetof(stringpool, 52), VK_RBUTTON},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str52, VK_RBUTTON},
#line 7 "win32_vk.list"
- {gperf_offsetof(stringpool, 53), VK_LBUTTON},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str53, VK_LBUTTON},
#line 96 "win32_vk.list"
- {gperf_offsetof(stringpool, 54), VK_OEM_NEC_EQUAL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str54, VK_OEM_NEC_EQUAL},
{-1},
#line 47 "win32_vk.list"
- {gperf_offsetof(stringpool, 56), VK_INSERT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str56, VK_INSERT},
#line 27 "win32_vk.list"
- {gperf_offsetof(stringpool, 57), VK_HANJA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str57, VK_HANJA},
{-1}, {-1},
#line 46 "win32_vk.list"
- {gperf_offsetof(stringpool, 60), VK_SNAPSHOT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str60, VK_SNAPSHOT},
#line 158 "win32_vk.list"
- {gperf_offsetof(stringpool, 61), VK_ATTN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str61, VK_ATTN},
#line 14 "win32_vk.list"
- {gperf_offsetof(stringpool, 62), VK_TAB},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str62, VK_TAB},
#line 157 "win32_vk.list"
- {gperf_offsetof(stringpool, 63), VK_OEM_BACKTAB},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str63, VK_OEM_BACKTAB},
#line 143 "win32_vk.list"
- {gperf_offsetof(stringpool, 64), VK_ICO_CLEAR},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64, VK_ICO_CLEAR},
#line 30 "win32_vk.list"
- {gperf_offsetof(stringpool, 65), VK_CONVERT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str65, VK_CONVERT},
#line 16 "win32_vk.list"
- {gperf_offsetof(stringpool, 66), VK_RETURN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str66, VK_RETURN},
#line 146 "win32_vk.list"
- {gperf_offsetof(stringpool, 67), VK_OEM_JUMP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str67, VK_OEM_JUMP},
{-1}, {-1}, {-1},
#line 111 "win32_vk.list"
- {gperf_offsetof(stringpool, 71), VK_BROWSER_STOP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str71, VK_BROWSER_STOP},
#line 26 "win32_vk.list"
- {gperf_offsetof(stringpool, 72), VK_FINAL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str72, VK_FINAL},
#line 163 "win32_vk.list"
- {gperf_offsetof(stringpool, 73), VK_ZOOM},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str73, VK_ZOOM},
#line 28 "win32_vk.list"
- {gperf_offsetof(stringpool, 74), VK_KANJI},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str74, VK_KANJI},
#line 48 "win32_vk.list"
- {gperf_offsetof(stringpool, 75), VK_DELETE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str75, VK_DELETE},
#line 128 "win32_vk.list"
- {gperf_offsetof(stringpool, 76), VK_OEM_COMMA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str76, VK_OEM_COMMA},
#line 67 "win32_vk.list"
- {gperf_offsetof(stringpool, 77), VK_SUBTRACT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str77, VK_SUBTRACT},
{-1},
#line 10 "win32_vk.list"
- {gperf_offsetof(stringpool, 79), VK_MBUTTON},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str79, VK_MBUTTON},
#line 78 "win32_vk.list"
- {gperf_offsetof(stringpool, 80), VK_F9},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str80, VK_F9},
#line 17 "win32_vk.list"
- {gperf_offsetof(stringpool, 81), VK_SHIFT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str81, VK_SHIFT},
#line 103 "win32_vk.list"
- {gperf_offsetof(stringpool, 82), VK_RSHIFT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str82, VK_RSHIFT},
#line 102 "win32_vk.list"
- {gperf_offsetof(stringpool, 83), VK_LSHIFT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str83, VK_LSHIFT},
#line 65 "win32_vk.list"
- {gperf_offsetof(stringpool, 84), VK_ADD},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str84, VK_ADD},
#line 31 "win32_vk.list"
- {gperf_offsetof(stringpool, 85), VK_NONCONVERT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str85, VK_NONCONVERT},
#line 160 "win32_vk.list"
- {gperf_offsetof(stringpool, 86), VK_EXSEL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str86, VK_EXSEL},
#line 126 "win32_vk.list"
- {gperf_offsetof(stringpool, 87), VK_OEM_1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str87, VK_OEM_1},
#line 138 "win32_vk.list"
- {gperf_offsetof(stringpool, 88), VK_OEM_AX},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str88, VK_OEM_AX},
#line 108 "win32_vk.list"
- {gperf_offsetof(stringpool, 89), VK_BROWSER_BACK},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str89, VK_BROWSER_BACK},
#line 137 "win32_vk.list"
- {gperf_offsetof(stringpool, 90), VK_OEM_8},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str90, VK_OEM_8},
#line 129 "win32_vk.list"
- {gperf_offsetof(stringpool, 91), VK_OEM_MINUS},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str91, VK_OEM_MINUS},
#line 162 "win32_vk.list"
- {gperf_offsetof(stringpool, 92), VK_PLAY},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str92, VK_PLAY},
#line 131 "win32_vk.list"
- {gperf_offsetof(stringpool, 93), VK_OEM_2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str93, VK_OEM_2},
#line 15 "win32_vk.list"
- {gperf_offsetof(stringpool, 94), VK_CLEAR},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str94, VK_CLEAR},
#line 99 "win32_vk.list"
- {gperf_offsetof(stringpool, 95), VK_OEM_FJ_TOUROKU},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str95, VK_OEM_FJ_TOUROKU},
#line 147 "win32_vk.list"
- {gperf_offsetof(stringpool, 96), VK_OEM_PA1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str96, VK_OEM_PA1},
#line 140 "win32_vk.list"
- {gperf_offsetof(stringpool, 97), VK_ICO_HELP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str97, VK_ICO_HELP},
#line 112 "win32_vk.list"
- {gperf_offsetof(stringpool, 98), VK_BROWSER_SEARCH},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str98, VK_BROWSER_SEARCH},
#line 53 "win32_vk.list"
- {gperf_offsetof(stringpool, 99), VK_SLEEP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str99, VK_SLEEP},
{-1},
#line 70 "win32_vk.list"
- {gperf_offsetof(stringpool, 101), VK_F1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str101, VK_F1},
#line 148 "win32_vk.list"
- {gperf_offsetof(stringpool, 102), VK_OEM_PA2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str102, VK_OEM_PA2},
#line 154 "win32_vk.list"
- {gperf_offsetof(stringpool, 103), VK_OEM_COPY},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str103, VK_OEM_COPY},
#line 77 "win32_vk.list"
- {gperf_offsetof(stringpool, 104), VK_F8},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str104, VK_F8},
#line 88 "win32_vk.list"
- {gperf_offsetof(stringpool, 105), VK_F19},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str105, VK_F19},
#line 41 "win32_vk.list"
- {gperf_offsetof(stringpool, 106), VK_RIGHT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str106, VK_RIGHT},
#line 71 "win32_vk.list"
- {gperf_offsetof(stringpool, 107), VK_F2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str107, VK_F2},
#line 135 "win32_vk.list"
- {gperf_offsetof(stringpool, 108), VK_OEM_6},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str108, VK_OEM_6},
#line 87 "win32_vk.list"
- {gperf_offsetof(stringpool, 109), VK_F18},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str109, VK_F18},
{-1},
#line 117 "win32_vk.list"
- {gperf_offsetof(stringpool, 111), VK_VOLUME_UP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str111, VK_VOLUME_UP},
{-1}, {-1},
#line 120 "win32_vk.list"
- {gperf_offsetof(stringpool, 114), VK_MEDIA_STOP},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str114, VK_MEDIA_STOP},
#line 130 "win32_vk.list"
- {gperf_offsetof(stringpool, 115), VK_OEM_PERIOD},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str115, VK_OEM_PERIOD},
{-1},
#line 161 "win32_vk.list"
- {gperf_offsetof(stringpool, 117), VK_EREOF},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str117, VK_EREOF},
{-1}, {-1}, {-1},
#line 114 "win32_vk.list"
- {gperf_offsetof(stringpool, 121), VK_BROWSER_HOME},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str121, VK_BROWSER_HOME},
#line 75 "win32_vk.list"
- {gperf_offsetof(stringpool, 122), VK_F6},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str122, VK_F6},
{-1},
#line 110 "win32_vk.list"
- {gperf_offsetof(stringpool, 124), VK_BROWSER_REFRESH},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str124, VK_BROWSER_REFRESH},
{-1},
#line 165 "win32_vk.list"
- {gperf_offsetof(stringpool, 126), VK_PA1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str126, VK_PA1},
#line 142 "win32_vk.list"
- {gperf_offsetof(stringpool, 127), VK_PROCESSKEY},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str127, VK_PROCESSKEY},
#line 68 "win32_vk.list"
- {gperf_offsetof(stringpool, 128), VK_DECIMAL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str128, VK_DECIMAL},
#line 132 "win32_vk.list"
- {gperf_offsetof(stringpool, 129), VK_OEM_3},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str129, VK_OEM_3},
#line 107 "win32_vk.list"
- {gperf_offsetof(stringpool, 130), VK_RMENU},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str130, VK_RMENU},
#line 106 "win32_vk.list"
- {gperf_offsetof(stringpool, 131), VK_LMENU},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str131, VK_LMENU},
#line 98 "win32_vk.list"
- {gperf_offsetof(stringpool, 132), VK_OEM_FJ_MASSHOU},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str132, VK_OEM_FJ_MASSHOU},
#line 54 "win32_vk.list"
- {gperf_offsetof(stringpool, 133), VK_NUMPAD0},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str133, VK_NUMPAD0},
#line 24 "win32_vk.list"
- {gperf_offsetof(stringpool, 134), VK_HANGUL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str134, VK_HANGUL},
#line 63 "win32_vk.list"
- {gperf_offsetof(stringpool, 135), VK_NUMPAD9},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str135, VK_NUMPAD9},
#line 23 "win32_vk.list"
- {gperf_offsetof(stringpool, 136), VK_HANGEUL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str136, VK_HANGEUL},
#line 134 "win32_vk.list"
- {gperf_offsetof(stringpool, 137), VK_OEM_5},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str137, VK_OEM_5},
#line 149 "win32_vk.list"
- {gperf_offsetof(stringpool, 138), VK_OEM_PA3},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str138, VK_OEM_PA3},
#line 115 "win32_vk.list"
- {gperf_offsetof(stringpool, 139), VK_VOLUME_MUTE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str139, VK_VOLUME_MUTE},
#line 133 "win32_vk.list"
- {gperf_offsetof(stringpool, 140), VK_OEM_4},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str140, VK_OEM_4},
#line 122 "win32_vk.list"
- {gperf_offsetof(stringpool, 141), VK_LAUNCH_MAIL},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str141, VK_LAUNCH_MAIL},
#line 97 "win32_vk.list"
- {gperf_offsetof(stringpool, 142), VK_OEM_FJ_JISHO},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str142, VK_OEM_FJ_JISHO},
#line 72 "win32_vk.list"
- {gperf_offsetof(stringpool, 143), VK_F3},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str143, VK_F3},
#line 101 "win32_vk.list"
- {gperf_offsetof(stringpool, 144), VK_OEM_FJ_ROYA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str144, VK_OEM_FJ_ROYA},
#line 100 "win32_vk.list"
- {gperf_offsetof(stringpool, 145), VK_OEM_FJ_LOYA},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str145, VK_OEM_FJ_LOYA},
{-1},
#line 42 "win32_vk.list"
- {gperf_offsetof(stringpool, 147), VK_DOWN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str147, VK_DOWN},
{-1},
#line 153 "win32_vk.list"
- {gperf_offsetof(stringpool, 149), VK_OEM_FINISH},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str149, VK_OEM_FINISH},
{-1},
#line 74 "win32_vk.list"
- {gperf_offsetof(stringpool, 151), VK_F5},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str151, VK_F5},
{-1},
#line 136 "win32_vk.list"
- {gperf_offsetof(stringpool, 153), VK_OEM_7},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str153, VK_OEM_7},
#line 73 "win32_vk.list"
- {gperf_offsetof(stringpool, 154), VK_F4},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str154, VK_F4},
#line 86 "win32_vk.list"
- {gperf_offsetof(stringpool, 155), VK_F17},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str155, VK_F17},
#line 55 "win32_vk.list"
- {gperf_offsetof(stringpool, 156), VK_NUMPAD1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str156, VK_NUMPAD1},
#line 141 "win32_vk.list"
- {gperf_offsetof(stringpool, 157), VK_ICO_00},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str157, VK_ICO_00},
{-1},
#line 62 "win32_vk.list"
- {gperf_offsetof(stringpool, 159), VK_NUMPAD8},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str159, VK_NUMPAD8},
{-1}, {-1},
#line 56 "win32_vk.list"
- {gperf_offsetof(stringpool, 162), VK_NUMPAD2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str162, VK_NUMPAD2},
{-1},
#line 124 "win32_vk.list"
- {gperf_offsetof(stringpool, 164), VK_LAUNCH_APP1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str164, VK_LAUNCH_APP1},
#line 109 "win32_vk.list"
- {gperf_offsetof(stringpool, 165), VK_BROWSER_FORWARD},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str165, VK_BROWSER_FORWARD},
{-1},
#line 76 "win32_vk.list"
- {gperf_offsetof(stringpool, 167), VK_F7},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str167, VK_F7},
{-1}, {-1},
#line 125 "win32_vk.list"
- {gperf_offsetof(stringpool, 170), VK_LAUNCH_APP2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str170, VK_LAUNCH_APP2},
#line 64 "win32_vk.list"
- {gperf_offsetof(stringpool, 171), VK_MULTIPLY},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str171, VK_MULTIPLY},
{-1}, {-1},
#line 45 "win32_vk.list"
- {gperf_offsetof(stringpool, 174), VK_EXECUTE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str174, VK_EXECUTE},
{-1},
#line 113 "win32_vk.list"
- {gperf_offsetof(stringpool, 176), VK_BROWSER_FAVORITES},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str176, VK_BROWSER_FAVORITES},
#line 60 "win32_vk.list"
- {gperf_offsetof(stringpool, 177), VK_NUMPAD6},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str177, VK_NUMPAD6},
{-1},
#line 85 "win32_vk.list"
- {gperf_offsetof(stringpool, 179), VK_F16},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str179, VK_F16},
{-1}, {-1},
#line 79 "win32_vk.list"
- {gperf_offsetof(stringpool, 182), VK_F10},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str182, VK_F10},
{-1}, {-1},
#line 116 "win32_vk.list"
- {gperf_offsetof(stringpool, 185), VK_VOLUME_DOWN},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str185, VK_VOLUME_DOWN},
{-1}, {-1},
#line 89 "win32_vk.list"
- {gperf_offsetof(stringpool, 188), VK_F20},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str188, VK_F20},
#line 119 "win32_vk.list"
- {gperf_offsetof(stringpool, 189), VK_MEDIA_PREV_TRACK},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str189, VK_MEDIA_PREV_TRACK},
{-1},
#line 33 "win32_vk.list"
- {gperf_offsetof(stringpool, 191), VK_MODECHANGE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str191, VK_MODECHANGE},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 83 "win32_vk.list"
- {gperf_offsetof(stringpool, 197), VK_F14},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str197, VK_F14},
#line 57 "win32_vk.list"
- {gperf_offsetof(stringpool, 198), VK_NUMPAD3},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str198, VK_NUMPAD3},
#line 11 "win32_vk.list"
- {gperf_offsetof(stringpool, 199), VK_XBUTTON1},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str199, VK_XBUTTON1},
{-1}, {-1}, {-1},
#line 93 "win32_vk.list"
- {gperf_offsetof(stringpool, 203), VK_F24},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str203, VK_F24},
{-1},
#line 12 "win32_vk.list"
- {gperf_offsetof(stringpool, 205), VK_XBUTTON2},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str205, VK_XBUTTON2},
#line 59 "win32_vk.list"
- {gperf_offsetof(stringpool, 206), VK_NUMPAD5},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str206, VK_NUMPAD5},
{-1}, {-1},
#line 58 "win32_vk.list"
- {gperf_offsetof(stringpool, 209), VK_NUMPAD4},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str209, VK_NUMPAD4},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 121 "win32_vk.list"
- {gperf_offsetof(stringpool, 215), VK_MEDIA_PLAY_PAUSE},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str215, VK_MEDIA_PLAY_PAUSE},
{-1},
#line 123 "win32_vk.list"
- {gperf_offsetof(stringpool, 217), VK_LAUNCH_MEDIA_SELECT},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str217, VK_LAUNCH_MEDIA_SELECT},
#line 80 "win32_vk.list"
- {gperf_offsetof(stringpool, 218), VK_F11},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str218, VK_F11},
{-1},
#line 139 "win32_vk.list"
- {gperf_offsetof(stringpool, 220), VK_OEM_102},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str220, VK_OEM_102},
#line 118 "win32_vk.list"
- {gperf_offsetof(stringpool, 221), VK_MEDIA_NEXT_TRACK},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str221, VK_MEDIA_NEXT_TRACK},
#line 61 "win32_vk.list"
- {gperf_offsetof(stringpool, 222), VK_NUMPAD7},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str222, VK_NUMPAD7},
{-1},
#line 90 "win32_vk.list"
- {gperf_offsetof(stringpool, 224), VK_F21},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str224, VK_F21},
{-1},
#line 82 "win32_vk.list"
- {gperf_offsetof(stringpool, 226), VK_F13},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str226, VK_F13},
{-1}, {-1},
#line 81 "win32_vk.list"
- {gperf_offsetof(stringpool, 229), VK_F12},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str229, VK_F12},
{-1}, {-1},
#line 92 "win32_vk.list"
- {gperf_offsetof(stringpool, 232), VK_F23},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str232, VK_F23},
{-1}, {-1},
#line 91 "win32_vk.list"
- {gperf_offsetof(stringpool, 235), VK_F22},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str235, VK_F22},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 84 "win32_vk.list"
- {gperf_offsetof(stringpool, 242), VK_F15},
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str242, VK_F15},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1},
#line 69 "win32_vk.list"
- {gperf_offsetof(stringpool, 256), VK_DIVIDE}
+ {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str256, VK_DIVIDE}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/ext/io/console/win32_vk.list b/ext/io/console/win32_vk.list
index 7909a4d1f0..5df3d6da57 100644
--- a/ext/io/console/win32_vk.list
+++ b/ext/io/console/win32_vk.list
@@ -1,6 +1,6 @@
%{
struct vktable {short ofs; unsigned short vk;};
-static const struct vktable *console_win32_vk(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/);
+static const struct vktable *console_win32_vk(const char *, size_t);
%}
struct vktable
%%
diff --git a/ext/io/nonblock/depend b/ext/io/nonblock/depend
index bea4a15e23..7f2db65732 100644
--- a/ext/io/nonblock/depend
+++ b/ext/io/nonblock/depend
@@ -4,9 +4,166 @@ nonblock.o: $(arch_hdrdir)/ruby/config.h
nonblock.o: $(hdrdir)/ruby.h
nonblock.o: $(hdrdir)/ruby/assert.h
nonblock.o: $(hdrdir)/ruby/backward.h
+nonblock.o: $(hdrdir)/ruby/backward/2/assume.h
+nonblock.o: $(hdrdir)/ruby/backward/2/attributes.h
+nonblock.o: $(hdrdir)/ruby/backward/2/bool.h
+nonblock.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nonblock.o: $(hdrdir)/ruby/backward/2/limits.h
+nonblock.o: $(hdrdir)/ruby/backward/2/long_long.h
+nonblock.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nonblock.o: $(hdrdir)/ruby/backward/2/stdarg.h
nonblock.o: $(hdrdir)/ruby/defines.h
nonblock.o: $(hdrdir)/ruby/encoding.h
nonblock.o: $(hdrdir)/ruby/intern.h
+nonblock.o: $(hdrdir)/ruby/internal/abi.h
+nonblock.o: $(hdrdir)/ruby/internal/anyargs.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+nonblock.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+nonblock.o: $(hdrdir)/ruby/internal/assume.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/artificial.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/cold.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/const.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/error.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/format.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/noalias.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/noinline.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/pure.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/restrict.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/warning.h
+nonblock.o: $(hdrdir)/ruby/internal/attr/weakref.h
+nonblock.o: $(hdrdir)/ruby/internal/cast.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+nonblock.o: $(hdrdir)/ruby/internal/compiler_since.h
+nonblock.o: $(hdrdir)/ruby/internal/config.h
+nonblock.o: $(hdrdir)/ruby/internal/constant_p.h
+nonblock.o: $(hdrdir)/ruby/internal/core.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rarray.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rbasic.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rbignum.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rclass.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rdata.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rfile.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rhash.h
+nonblock.o: $(hdrdir)/ruby/internal/core/robject.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rregexp.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rstring.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rstruct.h
+nonblock.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+nonblock.o: $(hdrdir)/ruby/internal/ctype.h
+nonblock.o: $(hdrdir)/ruby/internal/dllexport.h
+nonblock.o: $(hdrdir)/ruby/internal/dosish.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/re.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/string.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+nonblock.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+nonblock.o: $(hdrdir)/ruby/internal/error.h
+nonblock.o: $(hdrdir)/ruby/internal/eval.h
+nonblock.o: $(hdrdir)/ruby/internal/event.h
+nonblock.o: $(hdrdir)/ruby/internal/fl_type.h
+nonblock.o: $(hdrdir)/ruby/internal/gc.h
+nonblock.o: $(hdrdir)/ruby/internal/glob.h
+nonblock.o: $(hdrdir)/ruby/internal/globals.h
+nonblock.o: $(hdrdir)/ruby/internal/has/attribute.h
+nonblock.o: $(hdrdir)/ruby/internal/has/builtin.h
+nonblock.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+nonblock.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+nonblock.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+nonblock.o: $(hdrdir)/ruby/internal/has/extension.h
+nonblock.o: $(hdrdir)/ruby/internal/has/feature.h
+nonblock.o: $(hdrdir)/ruby/internal/has/warning.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/array.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/bignum.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/class.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/compar.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/complex.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/cont.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/dir.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/enum.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/error.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/eval.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/file.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/gc.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/hash.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/io.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/load.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/marshal.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/numeric.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/object.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/parse.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/proc.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/process.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/random.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/range.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/rational.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/re.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/ruby.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/select.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/signal.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/string.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/struct.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/thread.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/time.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/variable.h
+nonblock.o: $(hdrdir)/ruby/internal/intern/vm.h
+nonblock.o: $(hdrdir)/ruby/internal/interpreter.h
+nonblock.o: $(hdrdir)/ruby/internal/iterator.h
+nonblock.o: $(hdrdir)/ruby/internal/memory.h
+nonblock.o: $(hdrdir)/ruby/internal/method.h
+nonblock.o: $(hdrdir)/ruby/internal/module.h
+nonblock.o: $(hdrdir)/ruby/internal/newobj.h
+nonblock.o: $(hdrdir)/ruby/internal/rgengc.h
+nonblock.o: $(hdrdir)/ruby/internal/scan_args.h
+nonblock.o: $(hdrdir)/ruby/internal/special_consts.h
+nonblock.o: $(hdrdir)/ruby/internal/static_assert.h
+nonblock.o: $(hdrdir)/ruby/internal/stdalign.h
+nonblock.o: $(hdrdir)/ruby/internal/stdbool.h
+nonblock.o: $(hdrdir)/ruby/internal/symbol.h
+nonblock.o: $(hdrdir)/ruby/internal/value.h
+nonblock.o: $(hdrdir)/ruby/internal/value_type.h
+nonblock.o: $(hdrdir)/ruby/internal/variable.h
+nonblock.o: $(hdrdir)/ruby/internal/warning_push.h
+nonblock.o: $(hdrdir)/ruby/internal/xmalloc.h
nonblock.o: $(hdrdir)/ruby/io.h
nonblock.o: $(hdrdir)/ruby/missing.h
nonblock.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/io/nonblock/io-nonblock.gemspec b/ext/io/nonblock/io-nonblock.gemspec
new file mode 100644
index 0000000000..d6df21a84d
--- /dev/null
+++ b/ext/io/nonblock/io-nonblock.gemspec
@@ -0,0 +1,25 @@
+Gem::Specification.new do |spec|
+ spec.name = "io-nonblock"
+ spec.version = "0.2.0"
+ spec.authors = ["Nobu Nakada"]
+ spec.email = ["nobu@ruby-lang.org"]
+
+ spec.summary = %q{Enables non-blocking mode with IO class}
+ spec.description = %q{Enables non-blocking mode with IO class}
+ spec.homepage = "https://github.com/ruby/io-nonblock"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = %w[
+ COPYING
+ README.md
+ ext/io/nonblock/depend
+ ext/io/nonblock/extconf.rb
+ ext/io/nonblock/nonblock.c
+ ]
+ spec.extensions = %w[ext/io/nonblock/extconf.rb]
+ spec.require_paths = ["lib"]
+end
diff --git a/ext/io/nonblock/nonblock.c b/ext/io/nonblock/nonblock.c
index 1c0bdc68e7..b8a40ff38e 100644
--- a/ext/io/nonblock/nonblock.c
+++ b/ext/io/nonblock/nonblock.c
@@ -19,14 +19,14 @@
#ifdef F_GETFL
static int
-io_nonblock_mode(int fd)
+get_fcntl_flags(int fd)
{
int f = fcntl(fd, F_GETFL);
if (f == -1) rb_sys_fail(0);
return f;
}
#else
-#define io_nonblock_mode(fd) ((void)(fd), 0)
+#define get_fcntl_flags(fd) ((void)(fd), 0)
#endif
#ifdef F_GETFL
@@ -41,7 +41,7 @@ rb_io_nonblock_p(VALUE io)
{
rb_io_t *fptr;
GetOpenFile(io, fptr);
- if (io_nonblock_mode(fptr->fd) & O_NONBLOCK)
+ if (get_fcntl_flags(fptr->fd) & O_NONBLOCK)
return Qtrue;
return Qfalse;
}
@@ -50,6 +50,13 @@ rb_io_nonblock_p(VALUE io)
#endif
#ifdef F_SETFL
+static void
+set_fcntl_flags(int fd, int f)
+{
+ if (fcntl(fd, F_SETFL, f) == -1)
+ rb_sys_fail(0);
+}
+
static int
io_nonblock_set(int fd, int f, int nb)
{
@@ -63,8 +70,7 @@ io_nonblock_set(int fd, int f, int nb)
return 0;
f &= ~O_NONBLOCK;
}
- if (fcntl(fd, F_SETFL, f) == -1)
- rb_sys_fail(0);
+ set_fcntl_flags(fd, f);
return 1;
}
@@ -74,6 +80,46 @@ io_nonblock_set(int fd, int f, int nb)
*
* Enables non-blocking mode on a stream when set to
* +true+, and blocking mode when set to +false+.
+ *
+ * This method set or clear O_NONBLOCK flag for the file descriptor
+ * in <em>ios</em>.
+ *
+ * The behavior of most IO methods is not affected by this flag
+ * because they retry system calls to complete their task
+ * after EAGAIN and partial read/write.
+ * (An exception is IO#syswrite which doesn't retry.)
+ *
+ * This method can be used to clear non-blocking mode of standard I/O.
+ * Since nonblocking methods (read_nonblock, etc.) set non-blocking mode but
+ * they doesn't clear it, this method is usable as follows.
+ *
+ * END { STDOUT.nonblock = false }
+ * STDOUT.write_nonblock("foo")
+ *
+ * Since the flag is shared across processes and
+ * many non-Ruby commands doesn't expect standard I/O with non-blocking mode,
+ * it would be safe to clear the flag before Ruby program exits.
+ *
+ * For example following Ruby program leaves STDIN/STDOUT/STDER non-blocking mode.
+ * (STDIN, STDOUT and STDERR are connected to a terminal.
+ * So making one of them nonblocking-mode effects other two.)
+ * Thus cat command try to read from standard input and
+ * it causes "Resource temporarily unavailable" error (EAGAIN).
+ *
+ * % ruby -e '
+ * STDOUT.write_nonblock("foo\n")'; cat
+ * foo
+ * cat: -: Resource temporarily unavailable
+ *
+ * Clearing the flag makes the behavior of cat command normal.
+ * (cat command waits input from standard input.)
+ *
+ * % ruby -rio/nonblock -e '
+ * END { STDOUT.nonblock = false }
+ * STDOUT.write_nonblock("foo")
+ * '; cat
+ * foo
+ *
*/
static VALUE
rb_io_nonblock_set(VALUE io, VALUE nb)
@@ -83,7 +129,7 @@ rb_io_nonblock_set(VALUE io, VALUE nb)
if (RTEST(nb))
rb_io_set_nonblock(fptr);
else
- io_nonblock_set(fptr->fd, io_nonblock_mode(fptr->fd), RTEST(nb));
+ io_nonblock_set(fptr->fd, get_fcntl_flags(fptr->fd), RTEST(nb));
return io;
}
@@ -91,15 +137,14 @@ static VALUE
io_nonblock_restore(VALUE arg)
{
int *restore = (int *)arg;
- if (fcntl(restore[0], F_SETFL, restore[1]) == -1)
- rb_sys_fail(0);
+ set_fcntl_flags(restore[0], restore[1]);
return Qnil;
}
/*
* call-seq:
- * io.nonblock {|io| } -> io
- * io.nonblock(boolean) {|io| } -> io
+ * io.nonblock {|io| } -> object
+ * io.nonblock(boolean) {|io| } -> object
*
* Yields +self+ in non-blocking mode.
*
@@ -119,7 +164,7 @@ rb_io_nonblock_block(int argc, VALUE *argv, VALUE io)
rb_scan_args(argc, argv, "01", &v);
nb = RTEST(v);
}
- f = io_nonblock_mode(fptr->fd);
+ f = get_fcntl_flags(fptr->fd);
restore[0] = fptr->fd;
restore[1] = f;
if (!io_nonblock_set(fptr->fd, f, nb))
diff --git a/ext/io/wait/depend b/ext/io/wait/depend
index bbf1266aba..51e1af8280 100644
--- a/ext/io/wait/depend
+++ b/ext/io/wait/depend
@@ -1,12 +1,170 @@
# AUTOGENERATED DEPENDENCIES START
+# wait.o: $(hdrdir)/ruby/assert.h # not in 2.6
wait.o: $(RUBY_EXTCONF_H)
wait.o: $(arch_hdrdir)/ruby/config.h
wait.o: $(hdrdir)/ruby.h
wait.o: $(hdrdir)/ruby/assert.h
wait.o: $(hdrdir)/ruby/backward.h
+wait.o: $(hdrdir)/ruby/backward/2/assume.h
+wait.o: $(hdrdir)/ruby/backward/2/attributes.h
+wait.o: $(hdrdir)/ruby/backward/2/bool.h
+wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
+wait.o: $(hdrdir)/ruby/backward/2/limits.h
+wait.o: $(hdrdir)/ruby/backward/2/long_long.h
+wait.o: $(hdrdir)/ruby/backward/2/stdalign.h
+wait.o: $(hdrdir)/ruby/backward/2/stdarg.h
wait.o: $(hdrdir)/ruby/defines.h
wait.o: $(hdrdir)/ruby/encoding.h
wait.o: $(hdrdir)/ruby/intern.h
+wait.o: $(hdrdir)/ruby/internal/abi.h
+wait.o: $(hdrdir)/ruby/internal/anyargs.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+wait.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+wait.o: $(hdrdir)/ruby/internal/assume.h
+wait.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+wait.o: $(hdrdir)/ruby/internal/attr/artificial.h
+wait.o: $(hdrdir)/ruby/internal/attr/cold.h
+wait.o: $(hdrdir)/ruby/internal/attr/const.h
+wait.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+wait.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+wait.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+wait.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+wait.o: $(hdrdir)/ruby/internal/attr/error.h
+wait.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+wait.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+wait.o: $(hdrdir)/ruby/internal/attr/format.h
+wait.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+wait.o: $(hdrdir)/ruby/internal/attr/noalias.h
+wait.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+wait.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+wait.o: $(hdrdir)/ruby/internal/attr/noinline.h
+wait.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+wait.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+wait.o: $(hdrdir)/ruby/internal/attr/pure.h
+wait.o: $(hdrdir)/ruby/internal/attr/restrict.h
+wait.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+wait.o: $(hdrdir)/ruby/internal/attr/warning.h
+wait.o: $(hdrdir)/ruby/internal/attr/weakref.h
+wait.o: $(hdrdir)/ruby/internal/cast.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+wait.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+wait.o: $(hdrdir)/ruby/internal/compiler_since.h
+wait.o: $(hdrdir)/ruby/internal/config.h
+wait.o: $(hdrdir)/ruby/internal/constant_p.h
+wait.o: $(hdrdir)/ruby/internal/core.h
+wait.o: $(hdrdir)/ruby/internal/core/rarray.h
+wait.o: $(hdrdir)/ruby/internal/core/rbasic.h
+wait.o: $(hdrdir)/ruby/internal/core/rbignum.h
+wait.o: $(hdrdir)/ruby/internal/core/rclass.h
+wait.o: $(hdrdir)/ruby/internal/core/rdata.h
+wait.o: $(hdrdir)/ruby/internal/core/rfile.h
+wait.o: $(hdrdir)/ruby/internal/core/rhash.h
+wait.o: $(hdrdir)/ruby/internal/core/robject.h
+wait.o: $(hdrdir)/ruby/internal/core/rregexp.h
+wait.o: $(hdrdir)/ruby/internal/core/rstring.h
+wait.o: $(hdrdir)/ruby/internal/core/rstruct.h
+wait.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+wait.o: $(hdrdir)/ruby/internal/ctype.h
+wait.o: $(hdrdir)/ruby/internal/dllexport.h
+wait.o: $(hdrdir)/ruby/internal/dosish.h
+wait.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+wait.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+wait.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+wait.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+wait.o: $(hdrdir)/ruby/internal/encoding/re.h
+wait.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+wait.o: $(hdrdir)/ruby/internal/encoding/string.h
+wait.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+wait.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+wait.o: $(hdrdir)/ruby/internal/error.h
+wait.o: $(hdrdir)/ruby/internal/eval.h
+wait.o: $(hdrdir)/ruby/internal/event.h
+wait.o: $(hdrdir)/ruby/internal/fl_type.h
+wait.o: $(hdrdir)/ruby/internal/gc.h
+wait.o: $(hdrdir)/ruby/internal/glob.h
+wait.o: $(hdrdir)/ruby/internal/globals.h
+wait.o: $(hdrdir)/ruby/internal/has/attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/builtin.h
+wait.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+wait.o: $(hdrdir)/ruby/internal/has/extension.h
+wait.o: $(hdrdir)/ruby/internal/has/feature.h
+wait.o: $(hdrdir)/ruby/internal/has/warning.h
+wait.o: $(hdrdir)/ruby/internal/intern/array.h
+wait.o: $(hdrdir)/ruby/internal/intern/bignum.h
+wait.o: $(hdrdir)/ruby/internal/intern/class.h
+wait.o: $(hdrdir)/ruby/internal/intern/compar.h
+wait.o: $(hdrdir)/ruby/internal/intern/complex.h
+wait.o: $(hdrdir)/ruby/internal/intern/cont.h
+wait.o: $(hdrdir)/ruby/internal/intern/dir.h
+wait.o: $(hdrdir)/ruby/internal/intern/enum.h
+wait.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+wait.o: $(hdrdir)/ruby/internal/intern/error.h
+wait.o: $(hdrdir)/ruby/internal/intern/eval.h
+wait.o: $(hdrdir)/ruby/internal/intern/file.h
+wait.o: $(hdrdir)/ruby/internal/intern/gc.h
+wait.o: $(hdrdir)/ruby/internal/intern/hash.h
+wait.o: $(hdrdir)/ruby/internal/intern/io.h
+wait.o: $(hdrdir)/ruby/internal/intern/load.h
+wait.o: $(hdrdir)/ruby/internal/intern/marshal.h
+wait.o: $(hdrdir)/ruby/internal/intern/numeric.h
+wait.o: $(hdrdir)/ruby/internal/intern/object.h
+wait.o: $(hdrdir)/ruby/internal/intern/parse.h
+wait.o: $(hdrdir)/ruby/internal/intern/proc.h
+wait.o: $(hdrdir)/ruby/internal/intern/process.h
+wait.o: $(hdrdir)/ruby/internal/intern/random.h
+wait.o: $(hdrdir)/ruby/internal/intern/range.h
+wait.o: $(hdrdir)/ruby/internal/intern/rational.h
+wait.o: $(hdrdir)/ruby/internal/intern/re.h
+wait.o: $(hdrdir)/ruby/internal/intern/ruby.h
+wait.o: $(hdrdir)/ruby/internal/intern/select.h
+wait.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+wait.o: $(hdrdir)/ruby/internal/intern/signal.h
+wait.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+wait.o: $(hdrdir)/ruby/internal/intern/string.h
+wait.o: $(hdrdir)/ruby/internal/intern/struct.h
+wait.o: $(hdrdir)/ruby/internal/intern/thread.h
+wait.o: $(hdrdir)/ruby/internal/intern/time.h
+wait.o: $(hdrdir)/ruby/internal/intern/variable.h
+wait.o: $(hdrdir)/ruby/internal/intern/vm.h
+wait.o: $(hdrdir)/ruby/internal/interpreter.h
+wait.o: $(hdrdir)/ruby/internal/iterator.h
+wait.o: $(hdrdir)/ruby/internal/memory.h
+wait.o: $(hdrdir)/ruby/internal/method.h
+wait.o: $(hdrdir)/ruby/internal/module.h
+wait.o: $(hdrdir)/ruby/internal/newobj.h
+wait.o: $(hdrdir)/ruby/internal/rgengc.h
+wait.o: $(hdrdir)/ruby/internal/scan_args.h
+wait.o: $(hdrdir)/ruby/internal/special_consts.h
+wait.o: $(hdrdir)/ruby/internal/static_assert.h
+wait.o: $(hdrdir)/ruby/internal/stdalign.h
+wait.o: $(hdrdir)/ruby/internal/stdbool.h
+wait.o: $(hdrdir)/ruby/internal/symbol.h
+wait.o: $(hdrdir)/ruby/internal/value.h
+wait.o: $(hdrdir)/ruby/internal/value_type.h
+wait.o: $(hdrdir)/ruby/internal/variable.h
+wait.o: $(hdrdir)/ruby/internal/warning_push.h
+wait.o: $(hdrdir)/ruby/internal/xmalloc.h
wait.o: $(hdrdir)/ruby/io.h
wait.o: $(hdrdir)/ruby/missing.h
wait.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb
index b5d36c3fe3..c6230b7783 100644
--- a/ext/io/wait/extconf.rb
+++ b/ext/io/wait/extconf.rb
@@ -1,19 +1,24 @@
# frozen_string_literal: false
require 'mkmf'
-target = "io/wait"
-unless macro_defined?("DOSISH", "#include <ruby.h>")
- have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil
- fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h|
- have_macro("FIONREAD", [h, ioctl_h].compact)
- end
- if fionread
- $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
- create_makefile(target)
- end
+if RUBY_VERSION < "2.6"
+ File.write("Makefile", dummy_makefile($srcdir).join(""))
else
- if have_func("rb_w32_ioctlsocket", "ruby.h")
- have_func("rb_w32_is_socket", "ruby.h")
- create_makefile(target)
+ target = "io/wait"
+ have_func("rb_io_wait", "ruby/io.h")
+ unless macro_defined?("DOSISH", "#include <ruby.h>")
+ have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil
+ fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h|
+ have_macro("FIONREAD", [h, ioctl_h].compact)
+ end
+ if fionread
+ $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
+ create_makefile(target)
+ end
+ else
+ if have_func("rb_w32_ioctlsocket", "ruby.h")
+ have_func("rb_w32_is_socket", "ruby.h")
+ create_makefile(target)
+ end
end
end
diff --git a/ext/io/wait/io-wait.gemspec b/ext/io/wait/io-wait.gemspec
new file mode 100644
index 0000000000..ebc1f6f5c7
--- /dev/null
+++ b/ext/io/wait/io-wait.gemspec
@@ -0,0 +1,38 @@
+_VERSION = "0.3.0"
+
+Gem::Specification.new do |spec|
+ spec.name = "io-wait"
+ spec.version = _VERSION
+ spec.authors = ["Nobu Nakada", "Charles Oliver Nutter"]
+ spec.email = ["nobu@ruby-lang.org", "headius@headius.com"]
+
+ spec.summary = %q{Waits until IO is readable or writable without blocking.}
+ spec.description = %q{Waits until IO is readable or writable without blocking.}
+ spec.homepage = "https://github.com/ruby/io-wait"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject do |f|
+ File.identical?(f, __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|rakelib)/|\.(?:git|travis|circleci)|appveyor|Rakefile)})
+ end
+ end
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+
+ jruby = true if Gem::Platform.new('java') =~ spec.platform or RUBY_ENGINE == 'jruby'
+ spec.files.delete_if do |f|
+ f.end_with?(".java") or
+ f.start_with?("ext/") && (jruby ^ f.start_with?("ext/java/"))
+ end
+ if jruby
+ spec.platform = 'java'
+ spec.files << "lib/io/wait.jar"
+ spec.require_paths += ["ext/java/lib"]
+ else
+ spec.extensions = %w[ext/io/wait/extconf.rb]
+ end
+end
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index d846bba49e..d74afb580b 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -1,3 +1,4 @@
+/* -*- c-file-style: "ruby"; indent-tabs-mode: t -*- */
/**********************************************************************
io/wait.c -
@@ -39,22 +40,18 @@
#define FIONREAD_POSSIBLE_P(fd) ((void)(fd),Qtrue)
#endif
-static VALUE io_ready_p _((VALUE io));
-static VALUE io_wait_readable _((int argc, VALUE *argv, VALUE io));
-static VALUE io_wait_writable _((int argc, VALUE *argv, VALUE io));
-void Init_wait _((void));
-
+#ifndef HAVE_RB_IO_WAIT
static struct timeval *
get_timeout(int argc, VALUE *argv, struct timeval *timerec)
{
VALUE timeout = Qnil;
rb_check_arity(argc, 0, 1);
if (!argc || NIL_P(timeout = argv[0])) {
- return NULL;
+ return NULL;
}
else {
- *timerec = rb_time_interval(timeout);
- return timerec;
+ *timerec = rb_time_interval(timeout);
+ return timerec;
}
}
@@ -63,10 +60,11 @@ wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv)
{
int i = rb_wait_for_single_fd(fptr->fd, events, tv);
if (i < 0)
- rb_sys_fail(0);
+ rb_sys_fail(0);
rb_io_check_closed(fptr);
return (i & events);
}
+#endif
/*
* call-seq:
@@ -74,6 +72,8 @@ wait_for_single_fd(rb_io_t *fptr, int events, struct timeval *tv)
*
* Returns number of bytes that can be read without blocking.
* Returns zero if no information available.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
@@ -93,126 +93,238 @@ io_nread(VALUE io)
return INT2FIX(0);
}
+#ifdef HAVE_RB_IO_WAIT
+static VALUE
+io_wait_event(VALUE io, int event, VALUE timeout, int return_io)
+{
+ VALUE result = rb_io_wait(io, RB_INT2NUM(event), timeout);
+
+ if (!RB_TEST(result)) {
+ return Qnil;
+ }
+
+ int mask = RB_NUM2INT(result);
+
+ if (mask & event) {
+ if (return_io)
+ return io;
+ else
+ return result;
+ }
+ else {
+ return Qfalse;
+ }
+}
+#endif
+
/*
* call-seq:
- * io.ready? -> true or false
+ * io.ready? -> truthy or falsy
+ *
+ * Returns a truthy value if input available without blocking, or a
+ * falsy value.
*
- * Returns true if input available without blocking, or false.
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_ready_p(VALUE io)
{
rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
struct timeval tv = {0, 0};
+#endif
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
if (rb_io_read_pending(fptr)) return Qtrue;
- if (wait_for_single_fd(fptr, RB_WAITFD_IN, &tv))
- return Qtrue;
- return Qfalse;
+
+#ifndef HAVE_RB_IO_WAIT
+ return wait_for_single_fd(fptr, RB_WAITFD_IN, &tv) ? Qtrue : Qfalse;
+#else
+ return io_wait_event(io, RUBY_IO_READABLE, RB_INT2NUM(0), 1);
+#endif
}
+/* Ruby 3.2+ can define these methods. This macro indicates that case. */
+#ifndef RUBY_IO_WAIT_METHODS
+
/*
* call-seq:
- * io.wait_readable -> IO, true or nil
- * io.wait_readable(timeout) -> IO, true or nil
+ * io.wait_readable -> truthy or falsy
+ * io.wait_readable(timeout) -> truthy or falsy
*
- * Waits until IO is readable without blocking and returns +self+, or
- * +nil+ when times out.
- * Returns +true+ immediately when buffered data is available.
+ * Waits until IO is readable and returns a truthy value, or a falsy
+ * value when times out. Returns a truthy value immediately when
+ * buffered data is available.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait_readable(int argc, VALUE *argv, VALUE io)
{
rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
struct timeval timerec;
struct timeval *tv;
+#endif
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
+
+#ifndef HAVE_RB_IO_WAIT
tv = get_timeout(argc, argv, &timerec);
+#endif
if (rb_io_read_pending(fptr)) return Qtrue;
+
+#ifndef HAVE_RB_IO_WAIT
if (wait_for_single_fd(fptr, RB_WAITFD_IN, tv)) {
- return io;
+ return io;
}
return Qnil;
+#else
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = (argc == 1 ? argv[0] : Qnil);
+
+ return io_wait_event(io, RUBY_IO_READABLE, timeout, 1);
+#endif
}
/*
* call-seq:
- * io.wait_writable -> IO
- * io.wait_writable(timeout) -> IO or nil
+ * io.wait_writable -> truthy or falsy
+ * io.wait_writable(timeout) -> truthy or falsy
*
- * Waits until IO is writable without blocking and returns +self+ or
- * +nil+ when times out.
+ * Waits until IO is writable and returns a truthy value or a falsy
+ * value when times out.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
io_wait_writable(int argc, VALUE *argv, VALUE io)
{
rb_io_t *fptr;
+#ifndef HAVE_RB_IO_WAIT
struct timeval timerec;
struct timeval *tv;
+#endif
GetOpenFile(io, fptr);
rb_io_check_writable(fptr);
+
+#ifndef HAVE_RB_IO_WAIT
tv = get_timeout(argc, argv, &timerec);
if (wait_for_single_fd(fptr, RB_WAITFD_OUT, tv)) {
- return io;
+ return io;
}
return Qnil;
+#else
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = (argc == 1 ? argv[0] : Qnil);
+
+ return io_wait_event(io, RUBY_IO_WRITABLE, timeout, 1);
+#endif
}
+#ifdef HAVE_RB_IO_WAIT
+/*
+ * call-seq:
+ * io.wait_priority -> truthy or falsy
+ * io.wait_priority(timeout) -> truthy or falsy
+ *
+ * Waits until IO is priority and returns a truthy value or a falsy
+ * value when times out. Priority data is sent and received using
+ * the Socket::MSG_OOB flag and is typically limited to streams.
+ *
+ * You must require 'io/wait' to use this method.
+ */
+static VALUE
+io_wait_priority(int argc, VALUE *argv, VALUE io)
+{
+ rb_io_t *fptr = NULL;
+
+ RB_IO_POINTER(io, fptr);
+ rb_io_check_readable(fptr);
+
+ if (rb_io_read_pending(fptr)) return Qtrue;
+
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = argc == 1 ? argv[0] : Qnil;
+
+ return io_wait_event(io, RUBY_IO_PRIORITY, timeout, 1);
+}
+#endif
+
static int
wait_mode_sym(VALUE mode)
{
if (mode == ID2SYM(rb_intern("r"))) {
- return RB_WAITFD_IN;
+ return RB_WAITFD_IN;
}
if (mode == ID2SYM(rb_intern("read"))) {
- return RB_WAITFD_IN;
+ return RB_WAITFD_IN;
}
if (mode == ID2SYM(rb_intern("readable"))) {
- return RB_WAITFD_IN;
+ return RB_WAITFD_IN;
}
if (mode == ID2SYM(rb_intern("w"))) {
- return RB_WAITFD_OUT;
+ return RB_WAITFD_OUT;
}
if (mode == ID2SYM(rb_intern("write"))) {
- return RB_WAITFD_OUT;
+ return RB_WAITFD_OUT;
}
if (mode == ID2SYM(rb_intern("writable"))) {
- return RB_WAITFD_OUT;
+ return RB_WAITFD_OUT;
}
if (mode == ID2SYM(rb_intern("rw"))) {
- return RB_WAITFD_IN|RB_WAITFD_OUT;
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
}
if (mode == ID2SYM(rb_intern("read_write"))) {
- return RB_WAITFD_IN|RB_WAITFD_OUT;
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
}
if (mode == ID2SYM(rb_intern("readable_writable"))) {
- return RB_WAITFD_IN|RB_WAITFD_OUT;
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
}
rb_raise(rb_eArgError, "unsupported mode: %"PRIsVALUE, mode);
return 0;
}
+#ifdef HAVE_RB_IO_WAIT
+static inline rb_io_event_t
+io_event_from_value(VALUE value)
+{
+ int events = RB_NUM2INT(value);
+
+ if (events <= 0) rb_raise(rb_eArgError, "Events must be positive integer!");
+
+ return events;
+}
+#endif
+
/*
* call-seq:
- * io.wait(timeout = nil, mode = :read) -> IO, true or nil
+ * io.wait(events, timeout) -> event mask, false or nil
+ * io.wait(timeout = nil, mode = :read) -> self, true, or false
+ *
+ * Waits until the IO becomes ready for the specified events and returns the
+ * subset of events that become ready, or a falsy value when times out.
+ *
+ * The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
+ * +IO::PRIORITY+.
+ *
+ * Returns a truthy value immediately when buffered data is available.
*
- * Waits until IO is readable or writable without blocking and returns
- * +self+, or +nil+ when times out.
- * Returns +true+ immediately when buffered data is available.
* Optional parameter +mode+ is one of +:read+, +:write+, or
* +:read_write+.
+ *
+ * You must require 'io/wait' to use this method.
*/
static VALUE
-io_wait_readwrite(int argc, VALUE *argv, VALUE io)
+io_wait(int argc, VALUE *argv, VALUE io)
{
+#ifndef HAVE_RB_IO_WAIT
rb_io_t *fptr;
struct timeval timerec;
struct timeval *tv = NULL;
@@ -221,23 +333,77 @@ io_wait_readwrite(int argc, VALUE *argv, VALUE io)
GetOpenFile(io, fptr);
for (i = 0; i < argc; ++i) {
- if (SYMBOL_P(argv[i])) {
- event |= wait_mode_sym(argv[i]);
- }
- else {
- *(tv = &timerec) = rb_time_interval(argv[i]);
- }
+ if (SYMBOL_P(argv[i])) {
+ event |= wait_mode_sym(argv[i]);
+ }
+ else {
+ *(tv = &timerec) = rb_time_interval(argv[i]);
+ }
}
/* rb_time_interval() and might_mode() might convert the argument */
rb_io_check_closed(fptr);
if (!event) event = RB_WAITFD_IN;
if ((event & RB_WAITFD_IN) && rb_io_read_pending(fptr))
- return Qtrue;
+ return Qtrue;
if (wait_for_single_fd(fptr, event, tv))
- return io;
+ return io;
return Qnil;
+#else
+ VALUE timeout = Qundef;
+ rb_io_event_t events = 0;
+ int i, return_io = 0;
+
+ /* The documented signature for this method is actually incorrect.
+ * A single timeout is allowed in any position, and multiple symbols can be given.
+ * Whether this is intentional or not, I don't know, and as such I consider this to
+ * be a legacy/slow path. */
+ if (argc != 2 || (RB_SYMBOL_P(argv[0]) || RB_SYMBOL_P(argv[1]))) {
+ /* We'd prefer to return the actual mask, but this form would return the io itself: */
+ return_io = 1;
+
+ /* Slow/messy path: */
+ for (i = 0; i < argc; i += 1) {
+ if (RB_SYMBOL_P(argv[i])) {
+ events |= wait_mode_sym(argv[i]);
+ }
+ else if (timeout == Qundef) {
+ rb_time_interval(timeout = argv[i]);
+ }
+ else {
+ rb_raise(rb_eArgError, "timeout given more than once");
+ }
+ }
+
+ if (timeout == Qundef) timeout = Qnil;
+
+ if (events == 0) {
+ events = RUBY_IO_READABLE;
+ }
+ }
+ else /* argc == 2 and neither are symbols */ {
+ /* This is the fast path: */
+ events = io_event_from_value(argv[0]);
+ timeout = argv[1];
+ }
+
+ if (events & RUBY_IO_READABLE) {
+ rb_io_t *fptr = NULL;
+ RB_IO_POINTER(io, fptr);
+
+ if (rb_io_read_pending(fptr)) {
+ /* This was the original behaviour: */
+ if (return_io) return Qtrue;
+ /* New behaviour always returns an event mask: */
+ else return RB_INT2NUM(RUBY_IO_READABLE);
+ }
+ }
+
+ return io_wait_event(io, events, timeout, return_io);
+#endif
}
+#endif /* RUBY_IO_WAIT_METHODS */
+
/*
* IO wait methods
*/
@@ -245,9 +411,20 @@ io_wait_readwrite(int argc, VALUE *argv, VALUE io)
void
Init_wait(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ RB_EXT_RACTOR_SAFE(true);
+#endif
+
rb_define_method(rb_cIO, "nread", io_nread, 0);
rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
- rb_define_method(rb_cIO, "wait", io_wait_readwrite, -1);
+
+#ifndef RUBY_IO_WAIT_METHODS
+ rb_define_method(rb_cIO, "wait", io_wait, -1);
+
rb_define_method(rb_cIO, "wait_readable", io_wait_readable, -1);
rb_define_method(rb_cIO, "wait_writable", io_wait_writable, -1);
+#ifdef HAVE_RB_IO_WAIT
+ rb_define_method(rb_cIO, "wait_priority", io_wait_priority, -1);
+#endif
+#endif
}
diff --git a/ext/json/VERSION b/ext/json/VERSION
new file mode 100644
index 0000000000..ec1cf33c3f
--- /dev/null
+++ b/ext/json/VERSION
@@ -0,0 +1 @@
+2.6.3
diff --git a/ext/json/extconf.rb b/ext/json/extconf.rb
index 7595d58a98..8a99b6a5c8 100644
--- a/ext/json/extconf.rb
+++ b/ext/json/extconf.rb
@@ -1,2 +1,3 @@
require 'mkmf'
+
create_makefile('json')
diff --git a/ext/json/generator/depend b/ext/json/generator/depend
index 3f04c0d625..28ef06b36d 100644
--- a/ext/json/generator/depend
+++ b/ext/json/generator/depend
@@ -7,9 +7,167 @@ generator.o: $(arch_hdrdir)/ruby/config.h
generator.o: $(hdrdir)/ruby.h
generator.o: $(hdrdir)/ruby/assert.h
generator.o: $(hdrdir)/ruby/backward.h
+generator.o: $(hdrdir)/ruby/backward/2/assume.h
+generator.o: $(hdrdir)/ruby/backward/2/attributes.h
+generator.o: $(hdrdir)/ruby/backward/2/bool.h
+generator.o: $(hdrdir)/ruby/backward/2/inttypes.h
+generator.o: $(hdrdir)/ruby/backward/2/limits.h
+generator.o: $(hdrdir)/ruby/backward/2/long_long.h
+generator.o: $(hdrdir)/ruby/backward/2/stdalign.h
+generator.o: $(hdrdir)/ruby/backward/2/stdarg.h
generator.o: $(hdrdir)/ruby/defines.h
generator.o: $(hdrdir)/ruby/encoding.h
generator.o: $(hdrdir)/ruby/intern.h
+generator.o: $(hdrdir)/ruby/internal/abi.h
+generator.o: $(hdrdir)/ruby/internal/anyargs.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+generator.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+generator.o: $(hdrdir)/ruby/internal/assume.h
+generator.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+generator.o: $(hdrdir)/ruby/internal/attr/artificial.h
+generator.o: $(hdrdir)/ruby/internal/attr/cold.h
+generator.o: $(hdrdir)/ruby/internal/attr/const.h
+generator.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+generator.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+generator.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+generator.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+generator.o: $(hdrdir)/ruby/internal/attr/error.h
+generator.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+generator.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+generator.o: $(hdrdir)/ruby/internal/attr/format.h
+generator.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+generator.o: $(hdrdir)/ruby/internal/attr/noalias.h
+generator.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+generator.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+generator.o: $(hdrdir)/ruby/internal/attr/noinline.h
+generator.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+generator.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+generator.o: $(hdrdir)/ruby/internal/attr/pure.h
+generator.o: $(hdrdir)/ruby/internal/attr/restrict.h
+generator.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+generator.o: $(hdrdir)/ruby/internal/attr/warning.h
+generator.o: $(hdrdir)/ruby/internal/attr/weakref.h
+generator.o: $(hdrdir)/ruby/internal/cast.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+generator.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+generator.o: $(hdrdir)/ruby/internal/compiler_since.h
+generator.o: $(hdrdir)/ruby/internal/config.h
+generator.o: $(hdrdir)/ruby/internal/constant_p.h
+generator.o: $(hdrdir)/ruby/internal/core.h
+generator.o: $(hdrdir)/ruby/internal/core/rarray.h
+generator.o: $(hdrdir)/ruby/internal/core/rbasic.h
+generator.o: $(hdrdir)/ruby/internal/core/rbignum.h
+generator.o: $(hdrdir)/ruby/internal/core/rclass.h
+generator.o: $(hdrdir)/ruby/internal/core/rdata.h
+generator.o: $(hdrdir)/ruby/internal/core/rfile.h
+generator.o: $(hdrdir)/ruby/internal/core/rhash.h
+generator.o: $(hdrdir)/ruby/internal/core/rmatch.h
+generator.o: $(hdrdir)/ruby/internal/core/robject.h
+generator.o: $(hdrdir)/ruby/internal/core/rregexp.h
+generator.o: $(hdrdir)/ruby/internal/core/rstring.h
+generator.o: $(hdrdir)/ruby/internal/core/rstruct.h
+generator.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+generator.o: $(hdrdir)/ruby/internal/ctype.h
+generator.o: $(hdrdir)/ruby/internal/dllexport.h
+generator.o: $(hdrdir)/ruby/internal/dosish.h
+generator.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+generator.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+generator.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+generator.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+generator.o: $(hdrdir)/ruby/internal/encoding/re.h
+generator.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+generator.o: $(hdrdir)/ruby/internal/encoding/string.h
+generator.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+generator.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+generator.o: $(hdrdir)/ruby/internal/error.h
+generator.o: $(hdrdir)/ruby/internal/eval.h
+generator.o: $(hdrdir)/ruby/internal/event.h
+generator.o: $(hdrdir)/ruby/internal/fl_type.h
+generator.o: $(hdrdir)/ruby/internal/gc.h
+generator.o: $(hdrdir)/ruby/internal/glob.h
+generator.o: $(hdrdir)/ruby/internal/globals.h
+generator.o: $(hdrdir)/ruby/internal/has/attribute.h
+generator.o: $(hdrdir)/ruby/internal/has/builtin.h
+generator.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+generator.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+generator.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+generator.o: $(hdrdir)/ruby/internal/has/extension.h
+generator.o: $(hdrdir)/ruby/internal/has/feature.h
+generator.o: $(hdrdir)/ruby/internal/has/warning.h
+generator.o: $(hdrdir)/ruby/internal/intern/array.h
+generator.o: $(hdrdir)/ruby/internal/intern/bignum.h
+generator.o: $(hdrdir)/ruby/internal/intern/class.h
+generator.o: $(hdrdir)/ruby/internal/intern/compar.h
+generator.o: $(hdrdir)/ruby/internal/intern/complex.h
+generator.o: $(hdrdir)/ruby/internal/intern/cont.h
+generator.o: $(hdrdir)/ruby/internal/intern/dir.h
+generator.o: $(hdrdir)/ruby/internal/intern/enum.h
+generator.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+generator.o: $(hdrdir)/ruby/internal/intern/error.h
+generator.o: $(hdrdir)/ruby/internal/intern/eval.h
+generator.o: $(hdrdir)/ruby/internal/intern/file.h
+generator.o: $(hdrdir)/ruby/internal/intern/gc.h
+generator.o: $(hdrdir)/ruby/internal/intern/hash.h
+generator.o: $(hdrdir)/ruby/internal/intern/io.h
+generator.o: $(hdrdir)/ruby/internal/intern/load.h
+generator.o: $(hdrdir)/ruby/internal/intern/marshal.h
+generator.o: $(hdrdir)/ruby/internal/intern/numeric.h
+generator.o: $(hdrdir)/ruby/internal/intern/object.h
+generator.o: $(hdrdir)/ruby/internal/intern/parse.h
+generator.o: $(hdrdir)/ruby/internal/intern/proc.h
+generator.o: $(hdrdir)/ruby/internal/intern/process.h
+generator.o: $(hdrdir)/ruby/internal/intern/random.h
+generator.o: $(hdrdir)/ruby/internal/intern/range.h
+generator.o: $(hdrdir)/ruby/internal/intern/rational.h
+generator.o: $(hdrdir)/ruby/internal/intern/re.h
+generator.o: $(hdrdir)/ruby/internal/intern/ruby.h
+generator.o: $(hdrdir)/ruby/internal/intern/select.h
+generator.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+generator.o: $(hdrdir)/ruby/internal/intern/signal.h
+generator.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+generator.o: $(hdrdir)/ruby/internal/intern/string.h
+generator.o: $(hdrdir)/ruby/internal/intern/struct.h
+generator.o: $(hdrdir)/ruby/internal/intern/thread.h
+generator.o: $(hdrdir)/ruby/internal/intern/time.h
+generator.o: $(hdrdir)/ruby/internal/intern/variable.h
+generator.o: $(hdrdir)/ruby/internal/intern/vm.h
+generator.o: $(hdrdir)/ruby/internal/interpreter.h
+generator.o: $(hdrdir)/ruby/internal/iterator.h
+generator.o: $(hdrdir)/ruby/internal/memory.h
+generator.o: $(hdrdir)/ruby/internal/method.h
+generator.o: $(hdrdir)/ruby/internal/module.h
+generator.o: $(hdrdir)/ruby/internal/newobj.h
+generator.o: $(hdrdir)/ruby/internal/rgengc.h
+generator.o: $(hdrdir)/ruby/internal/scan_args.h
+generator.o: $(hdrdir)/ruby/internal/special_consts.h
+generator.o: $(hdrdir)/ruby/internal/static_assert.h
+generator.o: $(hdrdir)/ruby/internal/stdalign.h
+generator.o: $(hdrdir)/ruby/internal/stdbool.h
+generator.o: $(hdrdir)/ruby/internal/symbol.h
+generator.o: $(hdrdir)/ruby/internal/value.h
+generator.o: $(hdrdir)/ruby/internal/value_type.h
+generator.o: $(hdrdir)/ruby/internal/variable.h
+generator.o: $(hdrdir)/ruby/internal/warning_push.h
+generator.o: $(hdrdir)/ruby/internal/xmalloc.h
generator.o: $(hdrdir)/ruby/missing.h
generator.o: $(hdrdir)/ruby/onigmo.h
generator.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 881435e3dc..98d0ea46c3 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -1,11 +1,6 @@
#include "../fbuffer/fbuffer.h"
#include "generator.h"
-#ifdef HAVE_RUBY_ENCODING_H
-static VALUE CEncoding_UTF_8;
-static ID i_encoding, i_encode;
-#endif
-
static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
mHash, mArray,
#ifdef RUBY_INTEGER_UNIFICATION
@@ -15,14 +10,13 @@ static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
#endif
mFloat, mString, mString_Extend,
mTrueClass, mFalseClass, mNilClass, eGeneratorError,
- eNestingError,
- i_SAFE_STATE_PROTOTYPE;
+ eNestingError;
static ID i_to_s, i_to_json, i_new, i_indent, i_space, i_space_before,
i_object_nl, i_array_nl, i_max_nesting, i_allow_nan, i_ascii_only,
i_pack, i_unpack, i_create_id, i_extend, i_key_p,
i_aref, i_send, i_respond_to_p, i_match, i_keys, i_depth,
- i_buffer_initial_length, i_dup;
+ i_buffer_initial_length, i_dup, i_escape_slash;
/*
* Copyright 2001-2004 Unicode, Inc.
@@ -130,7 +124,7 @@ static void unicode_escape_to_buffer(FBuffer *buffer, char buf[6], UTF16
/* Converts string to a JSON string in FBuffer buffer, where all but the ASCII
* and control characters are JSON escaped. */
-static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string)
+static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string, char escape_slash)
{
const UTF8 *source = (UTF8 *) RSTRING_PTR(string);
const UTF8 *sourceEnd = source + RSTRING_LEN(string);
@@ -180,6 +174,11 @@ static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string)
case '"':
fbuffer_append(buffer, "\\\"", 2);
break;
+ case '/':
+ if(escape_slash) {
+ fbuffer_append(buffer, "\\/", 2);
+ break;
+ }
default:
fbuffer_append_char(buffer, (char)ch);
break;
@@ -229,7 +228,7 @@ static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string)
* characters required by the JSON standard are JSON escaped. The remaining
* characters (should be UTF8) are just passed through and appended to the
* result. */
-static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string)
+static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string, char escape_slash)
{
const char *ptr = RSTRING_PTR(string), *p;
unsigned long len = RSTRING_LEN(string), start = 0, end = 0;
@@ -280,6 +279,12 @@ static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string)
escape = "\\\"";
escape_len = 2;
break;
+ case '/':
+ if(escape_slash) {
+ escape = "\\/";
+ escape_len = 2;
+ break;
+ }
default:
{
unsigned short clen = 1;
@@ -328,6 +333,76 @@ static char *fstrndup(const char *ptr, unsigned long len) {
*
*/
+/* Explanation of the following: that's the only way to not pollute
+ * standard library's docs with GeneratorMethods::<ClassName> which
+ * are uninformative and take a large place in a list of classes
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Array
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Bignum
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::FalseClass
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Fixnum
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Float
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Hash
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Integer
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::NilClass
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::Object
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::String
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::String::Extend
+ * :nodoc:
+ */
+
+/*
+ * Document-module: JSON::Ext::Generator::GeneratorMethods::TrueClass
+ * :nodoc:
+ */
+
/*
* call-seq: to_json(state = nil)
*
@@ -539,13 +614,18 @@ static size_t State_memsize(const void *ptr)
return size;
}
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+# undef RUBY_TYPED_FROZEN_SHAREABLE
+# define RUBY_TYPED_FROZEN_SHAREABLE 0
+#endif
+
#ifdef NEW_TYPEDDATA_WRAPPER
static const rb_data_type_t JSON_Generator_State_type = {
"JSON/Generator/State",
{NULL, State_free, State_memsize,},
#ifdef RUBY_TYPED_FREE_IMMEDIATELY
0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY,
+ RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_FROZEN_SHAREABLE,
#endif
};
#endif
@@ -646,6 +726,8 @@ static VALUE cState_configure(VALUE self, VALUE opts)
state->allow_nan = RTEST(tmp);
tmp = rb_hash_aref(opts, ID2SYM(i_ascii_only));
state->ascii_only = RTEST(tmp);
+ tmp = rb_hash_aref(opts, ID2SYM(i_escape_slash));
+ state->escape_slash = RTEST(tmp);
return self;
}
@@ -680,6 +762,7 @@ static VALUE cState_to_h(VALUE self)
rb_hash_aset(result, ID2SYM(i_allow_nan), state->allow_nan ? Qtrue : Qfalse);
rb_hash_aset(result, ID2SYM(i_ascii_only), state->ascii_only ? Qtrue : Qfalse);
rb_hash_aset(result, ID2SYM(i_max_nesting), LONG2FIX(state->max_nesting));
+ rb_hash_aset(result, ID2SYM(i_escape_slash), state->escape_slash ? Qtrue : Qfalse);
rb_hash_aset(result, ID2SYM(i_depth), LONG2FIX(state->depth));
rb_hash_aset(result, ID2SYM(i_buffer_initial_length), LONG2FIX(state->buffer_initial_length));
return result;
@@ -860,13 +943,13 @@ static void generate_json_string(FBuffer *buffer, VALUE Vstate, JSON_Generator_S
fbuffer_append_char(buffer, '"');
#ifdef HAVE_RUBY_ENCODING_H
if (!enc_utf8_compatible_p(rb_enc_get(obj))) {
- obj = rb_str_encode(obj, CEncoding_UTF_8, 0, Qnil);
+ obj = rb_str_export_to_enc(obj, rb_utf8_encoding());
}
#endif
if (state->ascii_only) {
- convert_UTF8_to_JSON_ASCII(buffer, obj);
+ convert_UTF8_to_JSON_ASCII(buffer, obj, state->escape_slash);
} else {
- convert_UTF8_to_JSON(buffer, obj);
+ convert_UTF8_to_JSON(buffer, obj, state->escape_slash);
}
fbuffer_append_char(buffer, '"');
}
@@ -914,10 +997,10 @@ static void generate_json_float(FBuffer *buffer, VALUE Vstate, JSON_Generator_St
if (!allow_nan) {
if (isinf(value)) {
fbuffer_free(buffer);
- rb_raise(eGeneratorError, "%u: %"PRIsVALUE" not allowed in JSON", __LINE__, RB_OBJ_STRING(tmp));
+ rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", RB_OBJ_STRING(tmp));
} else if (isnan(value)) {
fbuffer_free(buffer);
- rb_raise(eGeneratorError, "%u: %"PRIsVALUE" not allowed in JSON", __LINE__, RB_OBJ_STRING(tmp));
+ rb_raise(eGeneratorError, "%"PRIsVALUE" not allowed in JSON", RB_OBJ_STRING(tmp));
}
}
fbuffer_append_str(buffer, tmp);
@@ -1026,7 +1109,7 @@ static VALUE cState_generate(VALUE self, VALUE obj)
* generated, otherwise an exception is thrown, if these values are
* encountered. This options defaults to false.
* * *ascii_only*: true if only ASCII characters should be generated. This
- * ontions defaults to false.
+ * option defaults to false.
* * *buffer_initial_length*: sets the initial length of the generator's
* internal buffer.
*/
@@ -1082,8 +1165,7 @@ static VALUE cState_from_state_s(VALUE self, VALUE opts)
} else if (rb_obj_is_kind_of(opts, rb_cHash)) {
return rb_funcall(self, i_new, 1, opts);
} else {
- VALUE prototype = rb_const_get(mJSON, i_SAFE_STATE_PROTOTYPE);
- return rb_funcall(prototype, i_dup, 0);
+ return rb_class_new_instance(0, NULL, cState);
}
}
@@ -1308,6 +1390,31 @@ static VALUE cState_max_nesting_set(VALUE self, VALUE depth)
}
/*
+ * call-seq: escape_slash
+ *
+ * If this boolean is true, the forward slashes will be escaped in
+ * the json output.
+ */
+static VALUE cState_escape_slash(VALUE self)
+{
+ GET_STATE(self);
+ return state->escape_slash ? Qtrue : Qfalse;
+}
+
+/*
+ * call-seq: escape_slash=(depth)
+ *
+ * This sets whether or not the forward slashes will be escaped in
+ * the json output.
+ */
+static VALUE cState_escape_slash_set(VALUE self, VALUE enable)
+{
+ GET_STATE(self);
+ state->escape_slash = RTEST(enable);
+ return Qnil;
+}
+
+/*
* call-seq: allow_nan?
*
* Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise
@@ -1390,6 +1497,10 @@ static VALUE cState_buffer_initial_length_set(VALUE self, VALUE buffer_initial_l
*/
void Init_generator(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
rb_require("json/common");
@@ -1419,6 +1530,9 @@ void Init_generator(void)
rb_define_method(cState, "array_nl=", cState_array_nl_set, 1);
rb_define_method(cState, "max_nesting", cState_max_nesting, 0);
rb_define_method(cState, "max_nesting=", cState_max_nesting_set, 1);
+ rb_define_method(cState, "escape_slash", cState_escape_slash, 0);
+ rb_define_method(cState, "escape_slash?", cState_escape_slash, 0);
+ rb_define_method(cState, "escape_slash=", cState_escape_slash_set, 1);
rb_define_method(cState, "check_circular?", cState_check_circular_p, 0);
rb_define_method(cState, "allow_nan?", cState_allow_nan_p, 0);
rb_define_method(cState, "ascii_only?", cState_ascii_only_p, 0);
@@ -1475,6 +1589,7 @@ void Init_generator(void)
i_object_nl = rb_intern("object_nl");
i_array_nl = rb_intern("array_nl");
i_max_nesting = rb_intern("max_nesting");
+ i_escape_slash = rb_intern("escape_slash");
i_allow_nan = rb_intern("allow_nan");
i_ascii_only = rb_intern("ascii_only");
i_depth = rb_intern("depth");
@@ -1490,10 +1605,4 @@ void Init_generator(void)
i_match = rb_intern("match");
i_keys = rb_intern("keys");
i_dup = rb_intern("dup");
-#ifdef HAVE_RUBY_ENCODING_H
- CEncoding_UTF_8 = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-8"));
- i_encoding = rb_intern("encoding");
- i_encode = rb_intern("encode");
-#endif
- i_SAFE_STATE_PROTOTYPE = rb_intern("SAFE_STATE_PROTOTYPE");
}
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index c367a6209a..3ebd622554 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -49,8 +49,8 @@ static const UTF32 halfMask = 0x3FFUL;
static unsigned char isLegalUTF8(const UTF8 *source, unsigned long length);
static void unicode_escape(char *buf, UTF16 character);
static void unicode_escape_to_buffer(FBuffer *buffer, char buf[6], UTF16 character);
-static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string);
-static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string);
+static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string, char escape_slash);
+static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string, char escape_slash);
static char *fstrndup(const char *ptr, unsigned long len);
/* ruby api and some helpers */
@@ -72,6 +72,7 @@ typedef struct JSON_Generator_StateStruct {
long max_nesting;
char allow_nan;
char ascii_only;
+ char escape_slash;
long depth;
long buffer_initial_length;
} JSON_Generator_State;
@@ -150,6 +151,8 @@ static VALUE cState_allow_nan_p(VALUE self);
static VALUE cState_ascii_only_p(VALUE self);
static VALUE cState_depth(VALUE self);
static VALUE cState_depth_set(VALUE self, VALUE depth);
+static VALUE cState_escape_slash(VALUE self);
+static VALUE cState_escape_slash_set(VALUE self, VALUE depth);
static FBuffer *cState_prepare_buffer(VALUE self);
#ifndef ZALLOC
#define ZALLOC(type) ((type *)ruby_zalloc(sizeof(type)))
diff --git a/ext/json/json.gemspec b/ext/json/json.gemspec
index d8be2e52c6..948e92c501 100644
--- a/ext/json/json.gemspec
+++ b/ext/json/json.gemspec
@@ -2,26 +2,22 @@
Gem::Specification.new do |s|
s.name = "json"
- s.version = "2.3.0"
+ s.version = File.read(File.expand_path('../VERSION', __FILE__)).chomp
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.require_paths = ["lib"]
- s.authors = ["Florian Frank"]
- s.date = "2019-12-11"
+ s.summary = "JSON Implementation for Ruby"
s.description = "This is a JSON implementation as a Ruby extension in C."
+ s.licenses = ["Ruby"]
+ s.authors = ["Florian Frank"]
s.email = "flori@ping.de"
+
s.extensions = ["ext/json/ext/generator/extconf.rb", "ext/json/ext/parser/extconf.rb", "ext/json/extconf.rb"]
s.extra_rdoc_files = ["README.md"]
+ s.rdoc_options = ["--title", "JSON implementation for Ruby", "--main", "README.md"]
s.files = [
- ".gitignore",
- ".travis.yml",
"CHANGES.md",
- "Gemfile",
- "README-json-jruby.md",
+ "LICENSE",
"README.md",
- "Rakefile",
"VERSION",
- "diagrams/.keep",
"ext/json/ext/fbuffer/fbuffer.h",
"ext/json/ext/generator/depend",
"ext/json/ext/generator/extconf.rb",
@@ -33,23 +29,7 @@ Gem::Specification.new do |s|
"ext/json/ext/parser/parser.h",
"ext/json/ext/parser/parser.rl",
"ext/json/extconf.rb",
- "install.rb",
- "java/src/json/ext/ByteListTranscoder.java",
- "java/src/json/ext/Generator.java",
- "java/src/json/ext/GeneratorMethods.java",
- "java/src/json/ext/GeneratorService.java",
- "java/src/json/ext/GeneratorState.java",
- "java/src/json/ext/OptionsReader.java",
- "java/src/json/ext/Parser.java",
- "java/src/json/ext/Parser.rl",
- "java/src/json/ext/ParserService.java",
- "java/src/json/ext/RuntimeInfo.java",
- "java/src/json/ext/StringDecoder.java",
- "java/src/json/ext/StringEncoder.java",
- "java/src/json/ext/Utils.java",
- "json-java.gemspec",
"json.gemspec",
- "json_pure.gemspec",
"lib/json.rb",
"lib/json/add/bigdecimal.rb",
"lib/json/add/complex.rb",
@@ -67,67 +47,21 @@ Gem::Specification.new do |s|
"lib/json/add/time.rb",
"lib/json/common.rb",
"lib/json/ext.rb",
- "lib/json/ext/.keep",
"lib/json/generic_object.rb",
"lib/json/pure.rb",
"lib/json/pure/generator.rb",
"lib/json/pure/parser.rb",
"lib/json/version.rb",
- "references/rfc7159.txt",
- "tests/fixtures/fail10.json",
- "tests/fixtures/fail11.json",
- "tests/fixtures/fail12.json",
- "tests/fixtures/fail13.json",
- "tests/fixtures/fail14.json",
- "tests/fixtures/fail18.json",
- "tests/fixtures/fail19.json",
- "tests/fixtures/fail2.json",
- "tests/fixtures/fail20.json",
- "tests/fixtures/fail21.json",
- "tests/fixtures/fail22.json",
- "tests/fixtures/fail23.json",
- "tests/fixtures/fail24.json",
- "tests/fixtures/fail25.json",
- "tests/fixtures/fail27.json",
- "tests/fixtures/fail28.json",
- "tests/fixtures/fail3.json",
- "tests/fixtures/fail4.json",
- "tests/fixtures/fail5.json",
- "tests/fixtures/fail6.json",
- "tests/fixtures/fail7.json",
- "tests/fixtures/fail8.json",
- "tests/fixtures/fail9.json",
- "tests/fixtures/obsolete_fail1.json",
- "tests/fixtures/pass1.json",
- "tests/fixtures/pass15.json",
- "tests/fixtures/pass16.json",
- "tests/fixtures/pass17.json",
- "tests/fixtures/pass2.json",
- "tests/fixtures/pass26.json",
- "tests/fixtures/pass3.json",
- "tests/json_addition_test.rb",
- "tests/json_common_interface_test.rb",
- "tests/json_encoding_test.rb",
- "tests/json_ext_parser_test.rb",
- "tests/json_fixtures_test.rb",
- "tests/json_generator_test.rb",
- "tests/json_generic_object_test.rb",
- "tests/json_parser_test.rb",
- "tests/json_string_matching_test.rb",
- "tests/test_helper.rb",
- "tests/test_helper.rb",
- "tools/diff.sh",
- "tools/fuzz.rb",
- "tools/server.rb",
]
s.homepage = "http://flori.github.com/json"
- s.licenses = ["Ruby"]
- s.rdoc_options = ["--title", "JSON implemention for Ruby", "--main", "README.md"]
- s.required_ruby_version = Gem::Requirement.new(">= 1.9")
- s.rubygems_version = "3.0.3"
- s.summary = "JSON Implementation for Ruby"
- s.test_files = ["tests/test_helper.rb"]
+ s.metadata = {
+ 'bug_tracker_uri' => 'https://github.com/flori/json/issues',
+ 'changelog_uri' => 'https://github.com/flori/json/blob/master/CHANGES.md',
+ 'documentation_uri' => 'http://flori.github.io/json/doc/index.html',
+ 'homepage_uri' => 'http://flori.github.io/json/',
+ 'source_code_uri' => 'https://github.com/flori/json',
+ 'wiki_uri' => 'https://github.com/flori/json/wiki'
+ }
- s.add_development_dependency("rake", [">= 0"])
- s.add_development_dependency("test-unit", ["~> 2.0"])
+ s.required_ruby_version = Gem::Requirement.new(">= 2.3")
end
diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb
index b5a6912415..1e64bfcb1a 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -2,55 +2,575 @@
require 'json/common'
##
-# = JavaScript Object Notation (JSON)
+# = JavaScript \Object Notation (\JSON)
#
-# JSON is a lightweight data-interchange format. It is easy for us
-# humans to read and write. Plus, equally simple for machines to generate or parse.
-# JSON is completely language agnostic, making it the ideal interchange format.
+# \JSON is a lightweight data-interchange format.
#
-# Built on two universally available structures:
-# 1. A collection of name/value pairs. Often referred to as an _object_, hash table, record, struct, keyed list, or associative array.
-# 2. An ordered list of values. More commonly called an _array_, vector, sequence or list.
+# A \JSON value is one of the following:
+# - Double-quoted text: <tt>"foo"</tt>.
+# - Number: +1+, +1.0+, +2.0e2+.
+# - Boolean: +true+, +false+.
+# - Null: +null+.
+# - \Array: an ordered list of values, enclosed by square brackets:
+# ["foo", 1, 1.0, 2.0e2, true, false, null]
#
-# To read more about JSON visit: http://json.org
+# - \Object: a collection of name/value pairs, enclosed by curly braces;
+# each name is double-quoted text;
+# the values may be any \JSON values:
+# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}
#
-# == Parsing JSON
+# A \JSON array or object may contain nested arrays, objects, and scalars
+# to any depth:
+# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}
+# [{"foo": 0, "bar": 1}, ["baz", 2]]
#
-# To parse a JSON string received by another application or generated within
-# your existing application:
+# == Using \Module \JSON
#
+# To make module \JSON available in your code, begin with:
# require 'json'
#
-# my_hash = JSON.parse('{"hello": "goodbye"}')
-# puts my_hash["hello"] => "goodbye"
+# All examples here assume that this has been done.
#
-# Notice the extra quotes <tt>''</tt> around the hash notation. Ruby expects
-# the argument to be a string and can't convert objects like a hash or array.
+# === Parsing \JSON
#
-# Ruby converts your string into a hash
+# You can parse a \String containing \JSON data using
+# either of two methods:
+# - <tt>JSON.parse(source, opts)</tt>
+# - <tt>JSON.parse!(source, opts)</tt>
#
-# == Generating JSON
+# where
+# - +source+ is a Ruby object.
+# - +opts+ is a \Hash object containing options
+# that control both input allowed and output formatting.
#
-# Creating a JSON string for communication or serialization is
-# just as simple.
+# The difference between the two methods
+# is that JSON.parse! omits some checks
+# and may not be safe for some +source+ data;
+# use it only for data from trusted sources.
+# Use the safer method JSON.parse for less trusted sources.
#
-# require 'json'
+# ==== Parsing \JSON Arrays
#
-# my_hash = {:hello => "goodbye"}
-# puts JSON.generate(my_hash) => "{\"hello\":\"goodbye\"}"
+# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array:
+# json = '["foo", 1, 1.0, 2.0e2, true, false, null]'
+# ruby = JSON.parse(json)
+# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil]
+# ruby.class # => Array
#
-# Or an alternative way:
+# The \JSON array may contain nested arrays, objects, and scalars
+# to any depth:
+# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]'
+# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]]
#
-# require 'json'
-# puts {:hello => "goodbye"}.to_json => "{\"hello\":\"goodbye\"}"
+# ==== Parsing \JSON \Objects
+#
+# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash:
+# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}'
+# ruby = JSON.parse(json)
+# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil}
+# ruby.class # => Hash
+#
+# The \JSON object may contain nested arrays, objects, and scalars
+# to any depth:
+# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}'
+# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]}
+#
+# ==== Parsing \JSON Scalars
+#
+# When the source is a \JSON scalar (not an array or object),
+# JSON.parse returns a Ruby scalar.
+#
+# \String:
+# ruby = JSON.parse('"foo"')
+# ruby # => 'foo'
+# ruby.class # => String
+# \Integer:
+# ruby = JSON.parse('1')
+# ruby # => 1
+# ruby.class # => Integer
+# \Float:
+# ruby = JSON.parse('1.0')
+# ruby # => 1.0
+# ruby.class # => Float
+# ruby = JSON.parse('2.0e2')
+# ruby # => 200
+# ruby.class # => Float
+# Boolean:
+# ruby = JSON.parse('true')
+# ruby # => true
+# ruby.class # => TrueClass
+# ruby = JSON.parse('false')
+# ruby # => false
+# ruby.class # => FalseClass
+# Null:
+# ruby = JSON.parse('null')
+# ruby # => nil
+# ruby.class # => NilClass
+#
+# ==== Parsing Options
+#
+# ====== Input Options
+#
+# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed;
+# defaults to +100+; specify +false+ to disable depth checking.
+#
+# With the default, +false+:
+# source = '[0, [1, [2, [3]]]]'
+# ruby = JSON.parse(source)
+# ruby # => [0, [1, [2, [3]]]]
+# Too deep:
+# # Raises JSON::NestingError (nesting of 2 is too deep):
+# JSON.parse(source, {max_nesting: 1})
+# Bad value:
+# # Raises TypeError (wrong argument type Symbol (expected Fixnum)):
+# JSON.parse(source, {max_nesting: :foo})
+#
+# ---
+#
+# Option +allow_nan+ (boolean) specifies whether to allow
+# NaN, Infinity, and MinusInfinity in +source+;
+# defaults to +false+.
+#
+# With the default, +false+:
+# # Raises JSON::ParserError (225: unexpected token at '[NaN]'):
+# JSON.parse('[NaN]')
+# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'):
+# JSON.parse('[Infinity]')
+# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'):
+# JSON.parse('[-Infinity]')
+# Allow:
+# source = '[NaN, Infinity, -Infinity]'
+# ruby = JSON.parse(source, {allow_nan: true})
+# ruby # => [NaN, Infinity, -Infinity]
+#
+# ====== Output Options
+#
+# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys
+# should be Symbols;
+# defaults to +false+ (use Strings).
+#
+# With the default, +false+:
+# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}'
+# ruby = JSON.parse(source)
+# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil}
+# Use Symbols:
+# ruby = JSON.parse(source, {symbolize_names: true})
+# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil}
+#
+# ---
+#
+# Option +object_class+ (\Class) specifies the Ruby class to be used
+# for each \JSON object;
+# defaults to \Hash.
+#
+# With the default, \Hash:
+# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}'
+# ruby = JSON.parse(source)
+# ruby.class # => Hash
+# Use class \OpenStruct:
+# ruby = JSON.parse(source, {object_class: OpenStruct})
+# ruby # => #<OpenStruct a="foo", b=1.0, c=true, d=false, e=nil>
+#
+# ---
+#
+# Option +array_class+ (\Class) specifies the Ruby class to be used
+# for each \JSON array;
+# defaults to \Array.
+#
+# With the default, \Array:
+# source = '["foo", 1.0, true, false, null]'
+# ruby = JSON.parse(source)
+# ruby.class # => Array
+# Use class \Set:
+# ruby = JSON.parse(source, {array_class: Set})
+# ruby # => #<Set: {"foo", 1.0, true, false, nil}>
+#
+# ---
+#
+# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing.
+# See {\JSON Additions}[#module-JSON-label-JSON+Additions].
+#
+# === Generating \JSON
+#
+# To generate a Ruby \String containing \JSON data,
+# use method <tt>JSON.generate(source, opts)</tt>, where
+# - +source+ is a Ruby object.
+# - +opts+ is a \Hash object containing options
+# that control both input allowed and output formatting.
+#
+# ==== Generating \JSON from Arrays
+#
+# When the source is a Ruby \Array, JSON.generate returns
+# a \String containing a \JSON array:
+# ruby = [0, 's', :foo]
+# json = JSON.generate(ruby)
+# json # => '[0,"s","foo"]'
+#
+# The Ruby \Array array may contain nested arrays, hashes, and scalars
+# to any depth:
+# ruby = [0, [1, 2], {foo: 3, bar: 4}]
+# json = JSON.generate(ruby)
+# json # => '[0,[1,2],{"foo":3,"bar":4}]'
+#
+# ==== Generating \JSON from Hashes
+#
+# When the source is a Ruby \Hash, JSON.generate returns
+# a \String containing a \JSON object:
+# ruby = {foo: 0, bar: 's', baz: :bat}
+# json = JSON.generate(ruby)
+# json # => '{"foo":0,"bar":"s","baz":"bat"}'
+#
+# The Ruby \Hash array may contain nested arrays, hashes, and scalars
+# to any depth:
+# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad}
+# json = JSON.generate(ruby)
+# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}'
+#
+# ==== Generating \JSON from Other Objects
+#
+# When the source is neither an \Array nor a \Hash,
+# the generated \JSON data depends on the class of the source.
+#
+# When the source is a Ruby \Integer or \Float, JSON.generate returns
+# a \String containing a \JSON number:
+# JSON.generate(42) # => '42'
+# JSON.generate(0.42) # => '0.42'
+#
+# When the source is a Ruby \String, JSON.generate returns
+# a \String containing a \JSON string (with double-quotes):
+# JSON.generate('A string') # => '"A string"'
+#
+# When the source is +true+, +false+ or +nil+, JSON.generate returns
+# a \String containing the corresponding \JSON token:
+# JSON.generate(true) # => 'true'
+# JSON.generate(false) # => 'false'
+# JSON.generate(nil) # => 'null'
+#
+# When the source is none of the above, JSON.generate returns
+# a \String containing a \JSON string representation of the source:
+# JSON.generate(:foo) # => '"foo"'
+# JSON.generate(Complex(0, 0)) # => '"0+0i"'
+# JSON.generate(Dir.new('.')) # => '"#<Dir>"'
+#
+# ==== Generating Options
+#
+# ====== Input Options
#
-# <tt>JSON.generate</tt> only allows objects or arrays to be converted
-# to JSON syntax. <tt>to_json</tt>, however, accepts many Ruby classes
-# even though it acts only as a method for serialization:
+# Option +allow_nan+ (boolean) specifies whether
+# +NaN+, +Infinity+, and <tt>-Infinity</tt> may be generated;
+# defaults to +false+.
#
+# With the default, +false+:
+# # Raises JSON::GeneratorError (920: NaN not allowed in JSON):
+# JSON.generate(JSON::NaN)
+# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON):
+# JSON.generate(JSON::Infinity)
+# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON):
+# JSON.generate(JSON::MinusInfinity)
+#
+# Allow:
+# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity]
+# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]'
+#
+# ---
+#
+# Option +max_nesting+ (\Integer) specifies the maximum nesting depth
+# in +obj+; defaults to +100+.
+#
+# With the default, +100+:
+# obj = [[[[[[0]]]]]]
+# JSON.generate(obj) # => '[[[[[[0]]]]]]'
+#
+# Too deep:
+# # Raises JSON::NestingError (nesting of 2 is too deep):
+# JSON.generate(obj, max_nesting: 2)
+#
+# ====== Output Options
+#
+# The default formatting options generate the most compact
+# \JSON data, all on one line and with no whitespace.
+#
+# You can use these formatting options to generate
+# \JSON data in a more open format, using whitespace.
+# See also JSON.pretty_generate.
+#
+# - Option +array_nl+ (\String) specifies a string (usually a newline)
+# to be inserted after each \JSON array; defaults to the empty \String, <tt>''</tt>.
+# - Option +object_nl+ (\String) specifies a string (usually a newline)
+# to be inserted after each \JSON object; defaults to the empty \String, <tt>''</tt>.
+# - Option +indent+ (\String) specifies the string (usually spaces) to be
+# used for indentation; defaults to the empty \String, <tt>''</tt>;
+# defaults to the empty \String, <tt>''</tt>;
+# has no effect unless options +array_nl+ or +object_nl+ specify newlines.
+# - Option +space+ (\String) specifies a string (usually a space) to be
+# inserted after the colon in each \JSON object's pair;
+# defaults to the empty \String, <tt>''</tt>.
+# - Option +space_before+ (\String) specifies a string (usually a space) to be
+# inserted before the colon in each \JSON object's pair;
+# defaults to the empty \String, <tt>''</tt>.
+#
+# In this example, +obj+ is used first to generate the shortest
+# \JSON data (no whitespace), then again with all formatting options
+# specified:
+#
+# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}}
+# json = JSON.generate(obj)
+# puts 'Compact:', json
+# opts = {
+# array_nl: "\n",
+# object_nl: "\n",
+# indent: ' ',
+# space_before: ' ',
+# space: ' '
+# }
+# puts 'Open:', JSON.generate(obj, opts)
+#
+# Output:
+# Compact:
+# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}}
+# Open:
+# {
+# "foo" : [
+# "bar",
+# "baz"
+# ],
+# "bat" : {
+# "bam" : 0,
+# "bad" : 1
+# }
+# }
+#
+# == \JSON Additions
+#
+# When you "round trip" a non-\String object from Ruby to \JSON and back,
+# you have a new \String, instead of the object you began with:
+# ruby0 = Range.new(0, 2)
+# json = JSON.generate(ruby0)
+# json # => '0..2"'
+# ruby1 = JSON.parse(json)
+# ruby1 # => '0..2'
+# ruby1.class # => String
+#
+# You can use \JSON _additions_ to preserve the original object.
+# The addition is an extension of a ruby class, so that:
+# - \JSON.generate stores more information in the \JSON string.
+# - \JSON.parse, called with option +create_additions+,
+# uses that information to create a proper Ruby object.
+#
+# This example shows a \Range being generated into \JSON
+# and parsed back into Ruby, both without and with
+# the addition for \Range:
+# ruby = Range.new(0, 2)
+# # This passage does not use the addition for Range.
+# json0 = JSON.generate(ruby)
+# ruby0 = JSON.parse(json0)
+# # This passage uses the addition for Range.
+# require 'json/add/range'
+# json1 = JSON.generate(ruby)
+# ruby1 = JSON.parse(json1, create_additions: true)
+# # Make a nice display.
+# display = <<EOT
+# Generated JSON:
+# Without addition: #{json0} (#{json0.class})
+# With addition: #{json1} (#{json1.class})
+# Parsed JSON:
+# Without addition: #{ruby0.inspect} (#{ruby0.class})
+# With addition: #{ruby1.inspect} (#{ruby1.class})
+# EOT
+# puts display
+#
+# This output shows the different results:
+# Generated JSON:
+# Without addition: "0..2" (String)
+# With addition: {"json_class":"Range","a":[0,2,false]} (String)
+# Parsed JSON:
+# Without addition: "0..2" (String)
+# With addition: 0..2 (Range)
+#
+# The \JSON module includes additions for certain classes.
+# You can also craft custom additions.
+# See {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions].
+#
+# === Built-in Additions
+#
+# The \JSON module includes additions for certain classes.
+# To use an addition, +require+ its source:
+# - BigDecimal: <tt>require 'json/add/bigdecimal'</tt>
+# - Complex: <tt>require 'json/add/complex'</tt>
+# - Date: <tt>require 'json/add/date'</tt>
+# - DateTime: <tt>require 'json/add/date_time'</tt>
+# - Exception: <tt>require 'json/add/exception'</tt>
+# - OpenStruct: <tt>require 'json/add/ostruct'</tt>
+# - Range: <tt>require 'json/add/range'</tt>
+# - Rational: <tt>require 'json/add/rational'</tt>
+# - Regexp: <tt>require 'json/add/regexp'</tt>
+# - Set: <tt>require 'json/add/set'</tt>
+# - Struct: <tt>require 'json/add/struct'</tt>
+# - Symbol: <tt>require 'json/add/symbol'</tt>
+# - Time: <tt>require 'json/add/time'</tt>
+#
+# To reduce punctuation clutter, the examples below
+# show the generated \JSON via +puts+, rather than the usual +inspect+,
+#
+# \BigDecimal:
+# require 'json/add/bigdecimal'
+# ruby0 = BigDecimal(0) # 0.0
+# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"}
+# ruby1 = JSON.parse(json, create_additions: true) # 0.0
+# ruby1.class # => BigDecimal
+#
+# \Complex:
+# require 'json/add/complex'
+# ruby0 = Complex(1+0i) # 1+0i
+# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0}
+# ruby1 = JSON.parse(json, create_additions: true) # 1+0i
+# ruby1.class # Complex
+#
+# \Date:
+# require 'json/add/date'
+# ruby0 = Date.today # 2020-05-02
+# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0}
+# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02
+# ruby1.class # Date
+#
+# \DateTime:
+# require 'json/add/date_time'
+# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00
+# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0}
+# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00
+# ruby1.class # DateTime
+#
+# \Exception (and its subclasses including \RuntimeError):
+# require 'json/add/exception'
+# ruby0 = Exception.new('A message') # A message
+# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null}
+# ruby1 = JSON.parse(json, create_additions: true) # A message
+# ruby1.class # Exception
+# ruby0 = RuntimeError.new('Another message') # Another message
+# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null}
+# ruby1 = JSON.parse(json, create_additions: true) # Another message
+# ruby1.class # RuntimeError
+#
+# \OpenStruct:
+# require 'json/add/ostruct'
+# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # #<OpenStruct name="Matz", language="Ruby">
+# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}}
+# ruby1 = JSON.parse(json, create_additions: true) # #<OpenStruct name="Matz", language="Ruby">
+# ruby1.class # OpenStruct
+#
+# \Range:
+# require 'json/add/range'
+# ruby0 = Range.new(0, 2) # 0..2
+# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]}
+# ruby1 = JSON.parse(json, create_additions: true) # 0..2
+# ruby1.class # Range
+#
+# \Rational:
+# require 'json/add/rational'
+# ruby0 = Rational(1, 3) # 1/3
+# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3}
+# ruby1 = JSON.parse(json, create_additions: true) # 1/3
+# ruby1.class # Rational
+#
+# \Regexp:
+# require 'json/add/regexp'
+# ruby0 = Regexp.new('foo') # (?-mix:foo)
+# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"}
+# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo)
+# ruby1.class # Regexp
+#
+# \Set:
+# require 'json/add/set'
+# ruby0 = Set.new([0, 1, 2]) # #<Set: {0, 1, 2}>
+# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]}
+# ruby1 = JSON.parse(json, create_additions: true) # #<Set: {0, 1, 2}>
+# ruby1.class # Set
+#
+# \Struct:
+# require 'json/add/struct'
+# Customer = Struct.new(:name, :address) # Customer
+# ruby0 = Customer.new("Dave", "123 Main") # #<struct Customer name="Dave", address="123 Main">
+# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]}
+# ruby1 = JSON.parse(json, create_additions: true) # #<struct Customer name="Dave", address="123 Main">
+# ruby1.class # Customer
+#
+# \Symbol:
+# require 'json/add/symbol'
+# ruby0 = :foo # foo
+# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"}
+# ruby1 = JSON.parse(json, create_additions: true) # foo
+# ruby1.class # Symbol
+#
+# \Time:
+# require 'json/add/time'
+# ruby0 = Time.now # 2020-05-02 11:28:26 -0500
+# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000}
+# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500
+# ruby1.class # Time
+#
+#
+# === Custom \JSON Additions
+#
+# In addition to the \JSON additions provided,
+# you can craft \JSON additions of your own,
+# either for Ruby built-in classes or for user-defined classes.
+#
+# Here's a user-defined class +Foo+:
+# class Foo
+# attr_accessor :bar, :baz
+# def initialize(bar, baz)
+# self.bar = bar
+# self.baz = baz
+# end
+# end
+#
+# Here's the \JSON addition for it:
+# # Extend class Foo with JSON addition.
+# class Foo
+# # Serialize Foo object with its class name and arguments
+# def to_json(*args)
+# {
+# JSON.create_id => self.class.name,
+# 'a' => [ bar, baz ]
+# }.to_json(*args)
+# end
+# # Deserialize JSON string by constructing new Foo object with arguments.
+# def self.json_create(object)
+# new(*object['a'])
+# end
+# end
+#
+# Demonstration:
# require 'json'
+# # This Foo object has no custom addition.
+# foo0 = Foo.new(0, 1)
+# json0 = JSON.generate(foo0)
+# obj0 = JSON.parse(json0)
+# # Lood the custom addition.
+# require_relative 'foo_addition'
+# # This foo has the custom addition.
+# foo1 = Foo.new(0, 1)
+# json1 = JSON.generate(foo1)
+# obj1 = JSON.parse(json1, create_additions: true)
+# # Make a nice display.
+# display = <<EOT
+# Generated JSON:
+# Without custom addition: #{json0} (#{json0.class})
+# With custom addition: #{json1} (#{json1.class})
+# Parsed JSON:
+# Without custom addition: #{obj0.inspect} (#{obj0.class})
+# With custom addition: #{obj1.inspect} (#{obj1.class})
+# EOT
+# puts display
+#
+# Output:
#
-# 1.to_json => "1"
+# Generated JSON:
+# Without custom addition: "#<Foo:0x0000000006534e80>" (String)
+# With custom addition: {"json_class":"Foo","a":[0,1]} (String)
+# Parsed JSON:
+# Without custom addition: "#<Foo:0x0000000006534e80>" (String)
+# With custom addition: #<Foo:0x0000000006473bb8 @bar=0, @baz=1> (Foo)
#
module JSON
require 'json/version'
diff --git a/ext/json/lib/json/add/complex.rb b/ext/json/lib/json/add/complex.rb
index 4d977e7589..e63e29fd22 100644
--- a/ext/json/lib/json/add/complex.rb
+++ b/ext/json/lib/json/add/complex.rb
@@ -2,7 +2,6 @@
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
-defined?(::Complex) or require 'complex'
class Complex
diff --git a/ext/json/lib/json/add/rational.rb b/ext/json/lib/json/add/rational.rb
index 6be4034581..f776226046 100644
--- a/ext/json/lib/json/add/rational.rb
+++ b/ext/json/lib/json/add/rational.rb
@@ -2,7 +2,6 @@
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
require 'json'
end
-defined?(::Rational) or require 'rational'
class Rational
# Deserializes JSON string by converting numerator value <tt>n</tt>,
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index 3be9fd8dc5..ea46896fcc 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -4,12 +4,17 @@ require 'json/generic_object'
module JSON
class << self
- # If _object_ is string-like, parse the string and return the parsed
- # result as a Ruby data structure. Otherwise generate a JSON text from the
- # Ruby data structure object and return it.
+ # :call-seq:
+ # JSON[object] -> new_array or new_string
#
- # The _opts_ argument is passed through to generate/parse respectively.
- # See generate and parse for their documentation.
+ # If +object+ is a \String,
+ # calls JSON.parse with +object+ and +opts+ (see method #parse):
+ # json = '[0, 1, null]'
+ # JSON[json]# => [0, 1, nil]
+ #
+ # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate):
+ # ruby = [0, 1, nil]
+ # JSON[ruby] # => '[0,1,null]'
def [](object, opts = {})
if object.respond_to? :to_str
JSON.parse(object.to_str, opts)
@@ -19,7 +24,8 @@ module JSON
end
# Returns the JSON parser class that is used by JSON. This is either
- # JSON::Ext::Parser or JSON::Pure::Parser.
+ # JSON::Ext::Parser or JSON::Pure::Parser:
+ # JSON.parser # => JSON::Ext::Parser
attr_reader :parser
# Set the JSON parser class _parser_ to be used by JSON.
@@ -65,37 +71,61 @@ module JSON
end
self.state = generator::State
const_set :State, self.state
- const_set :SAFE_STATE_PROTOTYPE, State.new
- const_set :FAST_STATE_PROTOTYPE, State.new(
+ const_set :SAFE_STATE_PROTOTYPE, State.new # for JRuby
+ const_set :FAST_STATE_PROTOTYPE, create_fast_state
+ const_set :PRETTY_STATE_PROTOTYPE, create_pretty_state
+ ensure
+ $VERBOSE = old
+ end
+
+ def create_fast_state
+ State.new(
:indent => '',
:space => '',
:object_nl => "",
:array_nl => "",
:max_nesting => false
)
- const_set :PRETTY_STATE_PROTOTYPE, State.new(
+ end
+
+ def create_pretty_state
+ State.new(
:indent => ' ',
:space => ' ',
:object_nl => "\n",
:array_nl => "\n"
)
- ensure
- $VERBOSE = old
end
# Returns the JSON generator module that is used by JSON. This is
- # either JSON::Ext::Generator or JSON::Pure::Generator.
+ # either JSON::Ext::Generator or JSON::Pure::Generator:
+ # JSON.generator # => JSON::Ext::Generator
attr_reader :generator
- # Returns the JSON generator state class that is used by JSON. This is
- # either JSON::Ext::Generator::State or JSON::Pure::Generator::State.
+ # Sets or Returns the JSON generator state class that is used by JSON. This is
+ # either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
+ # JSON.state # => JSON::Ext::Generator::State
attr_accessor :state
+ end
+
+ DEFAULT_CREATE_ID = 'json_class'.freeze
+ private_constant :DEFAULT_CREATE_ID
+
+ CREATE_ID_TLS_KEY = "JSON.create_id".freeze
+ private_constant :CREATE_ID_TLS_KEY
+
+ # Sets create identifier, which is used to decide if the _json_create_
+ # hook of a class should be called; initial value is +json_class+:
+ # JSON.create_id # => 'json_class'
+ def self.create_id=(new_value)
+ Thread.current[CREATE_ID_TLS_KEY] = new_value.dup.freeze
+ end
- # This is create identifier, which is used to decide if the _json_create_
- # hook of a class should be called. It defaults to 'json_class'.
- attr_accessor :create_id
+ # Returns the current create identifier.
+ # See also JSON.create_id=.
+ def self.create_id
+ Thread.current[CREATE_ID_TLS_KEY] || DEFAULT_CREATE_ID
end
- self.create_id = 'json_class'
NaN = 0.0/0
@@ -126,7 +156,7 @@ module JSON
# This exception is raised if a generator or unparser error occurs.
class GeneratorError < JSONError; end
# For backwards compatibility
- UnparserError = GeneratorError
+ UnparserError = GeneratorError # :nodoc:
# This exception is raised if the required unicode support is missing on the
# system. Usually this means that the iconv library is not installed.
@@ -134,43 +164,69 @@ module JSON
module_function
- # Parse the JSON document _source_ into a Ruby data structure and return it.
- #
- # _opts_ can have the following
- # keys:
- # * *max_nesting*: The maximum depth of nesting allowed in the parsed data
- # structures. Disable depth checking with :max_nesting => false. It
- # defaults to 100.
- # * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
- # defiance of RFC 7159 to be parsed by the Parser. This option defaults
- # to false.
- # * *symbolize_names*: If set to true, returns symbols for the names
- # (keys) in a JSON object. Otherwise strings are returned. Strings are
- # the default.
- # * *create_additions*: If set to false, the Parser doesn't create
- # additions even if a matching class and create_id was found. This option
- # defaults to false.
- # * *object_class*: Defaults to Hash
- # * *array_class*: Defaults to Array
+ # :call-seq:
+ # JSON.parse(source, opts) -> object
+ #
+ # Returns the Ruby objects created by parsing the given +source+.
+ #
+ # Argument +source+ contains the \String to be parsed.
+ #
+ # Argument +opts+, if given, contains a \Hash of options for the parsing.
+ # See {Parsing Options}[#module-JSON-label-Parsing+Options].
+ #
+ # ---
+ #
+ # When +source+ is a \JSON array, returns a Ruby \Array:
+ # source = '["foo", 1.0, true, false, null]'
+ # ruby = JSON.parse(source)
+ # ruby # => ["foo", 1.0, true, false, nil]
+ # ruby.class # => Array
+ #
+ # When +source+ is a \JSON object, returns a Ruby \Hash:
+ # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}'
+ # ruby = JSON.parse(source)
+ # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil}
+ # ruby.class # => Hash
+ #
+ # For examples of parsing for all \JSON data types, see
+ # {Parsing \JSON}[#module-JSON-label-Parsing+JSON].
+ #
+ # Parses nested JSON objects:
+ # source = <<-EOT
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # EOT
+ # ruby = JSON.parse(source)
+ # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # ---
+ #
+ # Raises an exception if +source+ is not valid JSON:
+ # # Raises JSON::ParserError (783: unexpected token at ''):
+ # JSON.parse('')
+ #
def parse(source, opts = {})
Parser.new(source, **(opts||{})).parse
end
- # Parse the JSON document _source_ into a Ruby data structure and return it.
- # The bang version of the parse method defaults to the more dangerous values
- # for the _opts_ hash, so be sure only to parse trusted _source_ documents.
- #
- # _opts_ can have the following keys:
- # * *max_nesting*: The maximum depth of nesting allowed in the parsed data
- # structures. Enable depth checking with :max_nesting => anInteger. The
- # parse! methods defaults to not doing max depth checking: This can be
- # dangerous if someone wants to fill up your stack.
- # * *allow_nan*: If set to true, allow NaN, Infinity, and -Infinity in
- # defiance of RFC 7159 to be parsed by the Parser. This option defaults
- # to true.
- # * *create_additions*: If set to false, the Parser doesn't create
- # additions even if a matching class and create_id was found. This option
- # defaults to false.
+ # :call-seq:
+ # JSON.parse!(source, opts) -> object
+ #
+ # Calls
+ # parse(source, opts)
+ # with +source+ and possibly modified +opts+.
+ #
+ # Differences from JSON.parse:
+ # - Option +max_nesting+, if not provided, defaults to +false+,
+ # which disables checking for nesting depth.
+ # - Option +allow_nan+, if not provided, defaults to +true+.
def parse!(source, opts = {})
opts = {
:max_nesting => false,
@@ -179,37 +235,69 @@ module JSON
Parser.new(source, **(opts||{})).parse
end
- # Generate a JSON document from the Ruby data structure _obj_ and return
- # it. _state_ is * a JSON::State object,
- # * or a Hash like object (responding to to_hash),
- # * an object convertible into a hash by a to_h method,
- # that is used as or to configure a State object.
- #
- # It defaults to a state object, that creates the shortest possible JSON text
- # in one line, checks for circular data structures and doesn't allow NaN,
- # Infinity, and -Infinity.
- #
- # A _state_ hash can have the following keys:
- # * *indent*: a string used to indent levels (default: ''),
- # * *space*: a string that is put after, a : or , delimiter (default: ''),
- # * *space_before*: a string that is put before a : pair delimiter (default: ''),
- # * *object_nl*: a string that is put at the end of a JSON object (default: ''),
- # * *array_nl*: a string that is put at the end of a JSON array (default: ''),
- # * *allow_nan*: true if NaN, Infinity, and -Infinity should be
- # generated, otherwise an exception is thrown if these values are
- # encountered. This options defaults to false.
- # * *max_nesting*: The maximum depth of nesting allowed in the data
- # structures from which JSON is to be generated. Disable depth checking
- # with :max_nesting => false, it defaults to 100.
- #
- # See also the fast_generate for the fastest creation method with the least
- # amount of sanity checks, and the pretty_generate method for some
- # defaults for pretty output.
+ # :call-seq:
+ # JSON.load_file(path, opts={}) -> object
+ #
+ # Calls:
+ # parse(File.read(path), opts)
+ #
+ # See method #parse.
+ def load_file(filespec, opts = {})
+ parse(File.read(filespec), opts)
+ end
+
+ # :call-seq:
+ # JSON.load_file!(path, opts = {})
+ #
+ # Calls:
+ # JSON.parse!(File.read(path, opts))
+ #
+ # See method #parse!
+ def load_file!(filespec, opts = {})
+ parse!(File.read(filespec), opts)
+ end
+
+ # :call-seq:
+ # JSON.generate(obj, opts = nil) -> new_string
+ #
+ # Returns a \String containing the generated \JSON data.
+ #
+ # See also JSON.fast_generate, JSON.pretty_generate.
+ #
+ # Argument +obj+ is the Ruby object to be converted to \JSON.
+ #
+ # Argument +opts+, if given, contains a \Hash of options for the generation.
+ # See {Generating Options}[#module-JSON-label-Generating+Options].
+ #
+ # ---
+ #
+ # When +obj+ is an \Array, returns a \String containing a \JSON array:
+ # obj = ["foo", 1.0, true, false, nil]
+ # json = JSON.generate(obj)
+ # json # => '["foo",1.0,true,false,null]'
+ #
+ # When +obj+ is a \Hash, returns a \String containing a \JSON object:
+ # obj = {foo: 0, bar: 's', baz: :bat}
+ # json = JSON.generate(obj)
+ # json # => '{"foo":0,"bar":"s","baz":"bat"}'
+ #
+ # For examples of generating from other Ruby objects, see
+ # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects].
+ #
+ # ---
+ #
+ # Raises an exception if any formatting option is not a \String.
+ #
+ # Raises an exception if +obj+ contains circular references:
+ # a = []; b = []; a.push(b); b.push(a)
+ # # Raises JSON::NestingError (nesting of 100 is too deep):
+ # JSON.generate(a)
+ #
def generate(obj, opts = nil)
if State === opts
state, opts = opts, nil
else
- state = SAFE_STATE_PROTOTYPE.dup
+ state = State.new
end
if opts
if opts.respond_to? :to_hash
@@ -231,16 +319,24 @@ module JSON
module_function :unparse
# :startdoc:
- # Generate a JSON document from the Ruby data structure _obj_ and return it.
- # This method disables the checks for circles in Ruby objects.
+ # :call-seq:
+ # JSON.fast_generate(obj, opts) -> new_string
+ #
+ # Arguments +obj+ and +opts+ here are the same as
+ # arguments +obj+ and +opts+ in JSON.generate.
+ #
+ # By default, generates \JSON data without checking
+ # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled).
#
- # *WARNING*: Be careful not to pass any Ruby data structures with circles as
- # _obj_ argument because this will cause JSON to go into an infinite loop.
+ # Raises an exception if +obj+ contains circular references:
+ # a = []; b = []; a.push(b); b.push(a)
+ # # Raises SystemStackError (stack level too deep):
+ # JSON.fast_generate(a)
def fast_generate(obj, opts = nil)
if State === opts
state, opts = opts, nil
else
- state = FAST_STATE_PROTOTYPE.dup
+ state = JSON.create_fast_state
end
if opts
if opts.respond_to? :to_hash
@@ -261,17 +357,41 @@ module JSON
module_function :fast_unparse
# :startdoc:
- # Generate a JSON document from the Ruby data structure _obj_ and return it.
- # The returned document is a prettier form of the document returned by
- # #unparse.
+ # :call-seq:
+ # JSON.pretty_generate(obj, opts = nil) -> new_string
+ #
+ # Arguments +obj+ and +opts+ here are the same as
+ # arguments +obj+ and +opts+ in JSON.generate.
+ #
+ # Default options are:
+ # {
+ # indent: ' ', # Two spaces
+ # space: ' ', # One space
+ # array_nl: "\n", # Newline
+ # object_nl: "\n" # Newline
+ # }
+ #
+ # Example:
+ # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}}
+ # json = JSON.pretty_generate(obj)
+ # puts json
+ # Output:
+ # {
+ # "foo": [
+ # "bar",
+ # "baz"
+ # ],
+ # "bat": {
+ # "bam": 0,
+ # "bad": 1
+ # }
+ # }
#
- # The _opts_ argument can be used to configure the generator. See the
- # generate method for a more detailed explanation.
def pretty_generate(obj, opts = nil)
if State === opts
state, opts = opts, nil
else
- state = PRETTY_STATE_PROTOTYPE.dup
+ state = JSON.create_pretty_state
end
if opts
if opts.respond_to? :to_hash
@@ -293,10 +413,10 @@ module JSON
# :startdoc:
class << self
- # The global default options for the JSON.load method:
- # :max_nesting: false
- # :allow_nan: true
- # :allow_blank: true
+ # Sets or returns default options for the JSON.load method.
+ # Initially:
+ # opts = JSON.load_default_options
+ # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
attr_accessor :load_default_options
end
self.load_default_options = {
@@ -306,20 +426,134 @@ module JSON
:create_additions => true,
}
- # Load a ruby data structure from a JSON _source_ and return it. A source can
- # either be a string-like object, an IO-like object, or an object responding
- # to the read method. If _proc_ was given, it will be called with any nested
- # Ruby object as an argument recursively in depth first order. To modify the
- # default options pass in the optional _options_ argument as well.
+ # :call-seq:
+ # JSON.load(source, proc = nil, options = {}) -> object
+ #
+ # Returns the Ruby objects created by parsing the given +source+.
+ #
+ # - Argument +source+ must be, or be convertible to, a \String:
+ # - If +source+ responds to instance method +to_str+,
+ # <tt>source.to_str</tt> becomes the source.
+ # - If +source+ responds to instance method +to_io+,
+ # <tt>source.to_io.read</tt> becomes the source.
+ # - If +source+ responds to instance method +read+,
+ # <tt>source.read</tt> becomes the source.
+ # - If both of the following are true, source becomes the \String <tt>'null'</tt>:
+ # - Option +allow_blank+ specifies a truthy value.
+ # - The source, as defined above, is +nil+ or the empty \String <tt>''</tt>.
+ # - Otherwise, +source+ remains the source.
+ # - Argument +proc+, if given, must be a \Proc that accepts one argument.
+ # It will be called recursively with each result (depth-first order).
+ # See details below.
+ # BEWARE: This method is meant to serialise data from trusted user input,
+ # like from your own database server or clients under your control, it could
+ # be dangerous to allow untrusted users to pass JSON sources into it.
+ # - Argument +opts+, if given, contains a \Hash of options for the parsing.
+ # See {Parsing Options}[#module-JSON-label-Parsing+Options].
+ # The default options can be changed via method JSON.load_default_options=.
+ #
+ # ---
+ #
+ # When no +proc+ is given, modifies +source+ as above and returns the result of
+ # <tt>parse(source, opts)</tt>; see #parse.
+ #
+ # Source for following examples:
+ # source = <<-EOT
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # EOT
#
- # BEWARE: This method is meant to serialise data from trusted user input,
- # like from your own database server or clients under your control, it could
- # be dangerous to allow untrusted users to pass JSON sources into it. The
- # default options for the parser can be changed via the load_default_options
- # method.
+ # Load a \String:
+ # ruby = JSON.load(source)
+ # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load an \IO object:
+ # require 'stringio'
+ # object = JSON.load(StringIO.new(source))
+ # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load a \File object:
+ # path = 't.json'
+ # File.write(path, source)
+ # File.open(path) do |file|
+ # JSON.load(file)
+ # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # ---
+ #
+ # When +proc+ is given:
+ # - Modifies +source+ as above.
+ # - Gets the +result+ from calling <tt>parse(source, opts)</tt>.
+ # - Recursively calls <tt>proc(result)</tt>.
+ # - Returns the final result.
+ #
+ # Example:
+ # require 'json'
+ #
+ # # Some classes for the example.
+ # class Base
+ # def initialize(attributes)
+ # @attributes = attributes
+ # end
+ # end
+ # class User < Base; end
+ # class Account < Base; end
+ # class Admin < Base; end
+ # # The JSON source.
+ # json = <<-EOF
+ # {
+ # "users": [
+ # {"type": "User", "username": "jane", "email": "jane@example.com"},
+ # {"type": "User", "username": "john", "email": "john@example.com"}
+ # ],
+ # "accounts": [
+ # {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
+ # {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
+ # ],
+ # "admins": {"type": "Admin", "password": "0wn3d"}
+ # }
+ # EOF
+ # # Deserializer method.
+ # def deserialize_obj(obj, safe_types = %w(User Account Admin))
+ # type = obj.is_a?(Hash) && obj["type"]
+ # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
+ # end
+ # # Call to JSON.load
+ # ruby = JSON.load(json, proc {|obj|
+ # case obj
+ # when Hash
+ # obj.each {|k, v| obj[k] = deserialize_obj v }
+ # when Array
+ # obj.map! {|v| deserialize_obj v }
+ # end
+ # })
+ # pp ruby
+ # Output:
+ # {"users"=>
+ # [#<User:0x00000000064c4c98
+ # @attributes=
+ # {"type"=>"User", "username"=>"jane", "email"=>"jane@example.com"}>,
+ # #<User:0x00000000064c4bd0
+ # @attributes=
+ # {"type"=>"User", "username"=>"john", "email"=>"john@example.com"}>],
+ # "accounts"=>
+ # [{"account"=>
+ # #<Account:0x00000000064c4928
+ # @attributes={"type"=>"Account", "paid"=>true, "account_id"=>"1234"}>},
+ # {"account"=>
+ # #<Account:0x00000000064c4680
+ # @attributes={"type"=>"Account", "paid"=>false, "account_id"=>"1235"}>}],
+ # "admins"=>
+ # #<Admin:0x00000000064c41f8
+ # @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
#
- # This method is part of the implementation of the load/dump interface of
- # Marshal and YAML.
def load(source, proc = nil, options = {})
opts = load_default_options.merge options
if source.respond_to? :to_str
@@ -338,7 +572,7 @@ module JSON
end
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
- def recurse_proc(result, &proc)
+ def recurse_proc(result, &proc) # :nodoc:
case result
when Array
result.each { |x| recurse_proc x, &proc }
@@ -355,32 +589,45 @@ module JSON
module_function :restore
class << self
- # The global default options for the JSON.dump method:
- # :max_nesting: false
- # :allow_nan: true
- # :allow_blank: true
+ # Sets or returns the default options for the JSON.dump method.
+ # Initially:
+ # opts = JSON.dump_default_options
+ # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
attr_accessor :dump_default_options
end
self.dump_default_options = {
:max_nesting => false,
:allow_nan => true,
+ :escape_slash => false,
}
- # Dumps _obj_ as a JSON string, i.e. calls generate on the object and returns
- # the result.
+ # :call-seq:
+ # JSON.dump(obj, io = nil, limit = nil)
+ #
+ # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result.
+ #
+ # The default options can be changed via method JSON.dump_default_options.
#
- # If anIO (an IO-like object or an object that responds to the write method)
- # was given, the resulting JSON is written to it.
+ # - Argument +io+, if given, should respond to method +write+;
+ # the \JSON \String is written to +io+, and +io+ is returned.
+ # If +io+ is not given, the \JSON \String is returned.
+ # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+.
#
- # If the number of nested arrays or objects exceeds _limit_, an ArgumentError
- # exception is raised. This argument is similar (but not exactly the
- # same!) to the _limit_ argument in Marshal.dump.
+ # ---
#
- # The default options for the generator can be changed via the
- # dump_default_options method.
+ # When argument +io+ is not given, returns the \JSON \String generated from +obj+:
+ # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad}
+ # json = JSON.dump(obj)
+ # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}"
#
- # This method is part of the implementation of the load/dump interface of
- # Marshal and YAML.
+ # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+:
+ # path = 't.json'
+ # File.open(path, 'w') do |file|
+ # JSON.dump(obj, file)
+ # end # => #<File:t.json (closed)>
+ # puts File.read(path)
+ # Output:
+ # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
def dump(obj, anIO = nil, limit = nil)
if anIO and limit.nil?
anIO = anIO.to_io if anIO.respond_to?(:to_io)
@@ -402,7 +649,7 @@ module JSON
raise ArgumentError, "exceed depth limit"
end
- # Encodes string using Ruby's _String.encode_
+ # Encodes string using String.encode.
def self.iconv(to, from, string)
string.encode(to, from)
end
diff --git a/ext/json/lib/json/version.rb b/ext/json/lib/json/version.rb
index 9d781df875..3d4326d836 100644
--- a/ext/json/lib/json/version.rb
+++ b/ext/json/lib/json/version.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module JSON
# JSON version
- VERSION = '2.3.0'
+ VERSION = '2.6.3'
VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
diff --git a/ext/json/parser/depend b/ext/json/parser/depend
index d0c9c2d2a6..a8e066ce15 100644
--- a/ext/json/parser/depend
+++ b/ext/json/parser/depend
@@ -7,9 +7,166 @@ parser.o: $(arch_hdrdir)/ruby/config.h
parser.o: $(hdrdir)/ruby.h
parser.o: $(hdrdir)/ruby/assert.h
parser.o: $(hdrdir)/ruby/backward.h
+parser.o: $(hdrdir)/ruby/backward/2/assume.h
+parser.o: $(hdrdir)/ruby/backward/2/attributes.h
+parser.o: $(hdrdir)/ruby/backward/2/bool.h
+parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
+parser.o: $(hdrdir)/ruby/backward/2/limits.h
+parser.o: $(hdrdir)/ruby/backward/2/long_long.h
+parser.o: $(hdrdir)/ruby/backward/2/stdalign.h
+parser.o: $(hdrdir)/ruby/backward/2/stdarg.h
parser.o: $(hdrdir)/ruby/defines.h
parser.o: $(hdrdir)/ruby/encoding.h
parser.o: $(hdrdir)/ruby/intern.h
+parser.o: $(hdrdir)/ruby/internal/abi.h
+parser.o: $(hdrdir)/ruby/internal/anyargs.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+parser.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+parser.o: $(hdrdir)/ruby/internal/assume.h
+parser.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+parser.o: $(hdrdir)/ruby/internal/attr/artificial.h
+parser.o: $(hdrdir)/ruby/internal/attr/cold.h
+parser.o: $(hdrdir)/ruby/internal/attr/const.h
+parser.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+parser.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+parser.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+parser.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+parser.o: $(hdrdir)/ruby/internal/attr/error.h
+parser.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+parser.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+parser.o: $(hdrdir)/ruby/internal/attr/format.h
+parser.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+parser.o: $(hdrdir)/ruby/internal/attr/noalias.h
+parser.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+parser.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+parser.o: $(hdrdir)/ruby/internal/attr/noinline.h
+parser.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+parser.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+parser.o: $(hdrdir)/ruby/internal/attr/pure.h
+parser.o: $(hdrdir)/ruby/internal/attr/restrict.h
+parser.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+parser.o: $(hdrdir)/ruby/internal/attr/warning.h
+parser.o: $(hdrdir)/ruby/internal/attr/weakref.h
+parser.o: $(hdrdir)/ruby/internal/cast.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+parser.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+parser.o: $(hdrdir)/ruby/internal/compiler_since.h
+parser.o: $(hdrdir)/ruby/internal/config.h
+parser.o: $(hdrdir)/ruby/internal/constant_p.h
+parser.o: $(hdrdir)/ruby/internal/core.h
+parser.o: $(hdrdir)/ruby/internal/core/rarray.h
+parser.o: $(hdrdir)/ruby/internal/core/rbasic.h
+parser.o: $(hdrdir)/ruby/internal/core/rbignum.h
+parser.o: $(hdrdir)/ruby/internal/core/rclass.h
+parser.o: $(hdrdir)/ruby/internal/core/rdata.h
+parser.o: $(hdrdir)/ruby/internal/core/rfile.h
+parser.o: $(hdrdir)/ruby/internal/core/rhash.h
+parser.o: $(hdrdir)/ruby/internal/core/robject.h
+parser.o: $(hdrdir)/ruby/internal/core/rregexp.h
+parser.o: $(hdrdir)/ruby/internal/core/rstring.h
+parser.o: $(hdrdir)/ruby/internal/core/rstruct.h
+parser.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+parser.o: $(hdrdir)/ruby/internal/ctype.h
+parser.o: $(hdrdir)/ruby/internal/dllexport.h
+parser.o: $(hdrdir)/ruby/internal/dosish.h
+parser.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+parser.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+parser.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+parser.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+parser.o: $(hdrdir)/ruby/internal/encoding/re.h
+parser.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+parser.o: $(hdrdir)/ruby/internal/encoding/string.h
+parser.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+parser.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+parser.o: $(hdrdir)/ruby/internal/error.h
+parser.o: $(hdrdir)/ruby/internal/eval.h
+parser.o: $(hdrdir)/ruby/internal/event.h
+parser.o: $(hdrdir)/ruby/internal/fl_type.h
+parser.o: $(hdrdir)/ruby/internal/gc.h
+parser.o: $(hdrdir)/ruby/internal/glob.h
+parser.o: $(hdrdir)/ruby/internal/globals.h
+parser.o: $(hdrdir)/ruby/internal/has/attribute.h
+parser.o: $(hdrdir)/ruby/internal/has/builtin.h
+parser.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+parser.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+parser.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+parser.o: $(hdrdir)/ruby/internal/has/extension.h
+parser.o: $(hdrdir)/ruby/internal/has/feature.h
+parser.o: $(hdrdir)/ruby/internal/has/warning.h
+parser.o: $(hdrdir)/ruby/internal/intern/array.h
+parser.o: $(hdrdir)/ruby/internal/intern/bignum.h
+parser.o: $(hdrdir)/ruby/internal/intern/class.h
+parser.o: $(hdrdir)/ruby/internal/intern/compar.h
+parser.o: $(hdrdir)/ruby/internal/intern/complex.h
+parser.o: $(hdrdir)/ruby/internal/intern/cont.h
+parser.o: $(hdrdir)/ruby/internal/intern/dir.h
+parser.o: $(hdrdir)/ruby/internal/intern/enum.h
+parser.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+parser.o: $(hdrdir)/ruby/internal/intern/error.h
+parser.o: $(hdrdir)/ruby/internal/intern/eval.h
+parser.o: $(hdrdir)/ruby/internal/intern/file.h
+parser.o: $(hdrdir)/ruby/internal/intern/gc.h
+parser.o: $(hdrdir)/ruby/internal/intern/hash.h
+parser.o: $(hdrdir)/ruby/internal/intern/io.h
+parser.o: $(hdrdir)/ruby/internal/intern/load.h
+parser.o: $(hdrdir)/ruby/internal/intern/marshal.h
+parser.o: $(hdrdir)/ruby/internal/intern/numeric.h
+parser.o: $(hdrdir)/ruby/internal/intern/object.h
+parser.o: $(hdrdir)/ruby/internal/intern/parse.h
+parser.o: $(hdrdir)/ruby/internal/intern/proc.h
+parser.o: $(hdrdir)/ruby/internal/intern/process.h
+parser.o: $(hdrdir)/ruby/internal/intern/random.h
+parser.o: $(hdrdir)/ruby/internal/intern/range.h
+parser.o: $(hdrdir)/ruby/internal/intern/rational.h
+parser.o: $(hdrdir)/ruby/internal/intern/re.h
+parser.o: $(hdrdir)/ruby/internal/intern/ruby.h
+parser.o: $(hdrdir)/ruby/internal/intern/select.h
+parser.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+parser.o: $(hdrdir)/ruby/internal/intern/signal.h
+parser.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+parser.o: $(hdrdir)/ruby/internal/intern/string.h
+parser.o: $(hdrdir)/ruby/internal/intern/struct.h
+parser.o: $(hdrdir)/ruby/internal/intern/thread.h
+parser.o: $(hdrdir)/ruby/internal/intern/time.h
+parser.o: $(hdrdir)/ruby/internal/intern/variable.h
+parser.o: $(hdrdir)/ruby/internal/intern/vm.h
+parser.o: $(hdrdir)/ruby/internal/interpreter.h
+parser.o: $(hdrdir)/ruby/internal/iterator.h
+parser.o: $(hdrdir)/ruby/internal/memory.h
+parser.o: $(hdrdir)/ruby/internal/method.h
+parser.o: $(hdrdir)/ruby/internal/module.h
+parser.o: $(hdrdir)/ruby/internal/newobj.h
+parser.o: $(hdrdir)/ruby/internal/rgengc.h
+parser.o: $(hdrdir)/ruby/internal/scan_args.h
+parser.o: $(hdrdir)/ruby/internal/special_consts.h
+parser.o: $(hdrdir)/ruby/internal/static_assert.h
+parser.o: $(hdrdir)/ruby/internal/stdalign.h
+parser.o: $(hdrdir)/ruby/internal/stdbool.h
+parser.o: $(hdrdir)/ruby/internal/symbol.h
+parser.o: $(hdrdir)/ruby/internal/value.h
+parser.o: $(hdrdir)/ruby/internal/value_type.h
+parser.o: $(hdrdir)/ruby/internal/variable.h
+parser.o: $(hdrdir)/ruby/internal/warning_push.h
+parser.o: $(hdrdir)/ruby/internal/xmalloc.h
parser.o: $(hdrdir)/ruby/missing.h
parser.o: $(hdrdir)/ruby/onigmo.h
parser.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/json/parser/extconf.rb b/ext/json/parser/extconf.rb
index f7360d46b2..4723a02aee 100644
--- a/ext/json/parser/extconf.rb
+++ b/ext/json/parser/extconf.rb
@@ -1,6 +1,32 @@
# frozen_string_literal: false
require 'mkmf'
-have_func("rb_enc_raise", "ruby.h")
+have_func("rb_enc_raise", "ruby/encoding.h")
+have_func("rb_enc_interned_str", "ruby/encoding.h")
+
+# checking if String#-@ (str_uminus) dedupes... '
+begin
+ a = -(%w(t e s t).join)
+ b = -(%w(t e s t).join)
+ if a.equal?(b)
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE=1 '
+ else
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
+ end
+rescue NoMethodError
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE=0 '
+end
+
+# checking if String#-@ (str_uminus) directly interns frozen strings... '
+begin
+ s = rand.to_s.freeze
+ if (-s).equal?(s) && (-s.dup).equal?(s)
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=1 '
+ else
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
+ end
+rescue NoMethodError
+ $CFLAGS << ' -DSTR_UMINUS_DEDUPE_FROZEN=0 '
+end
create_makefile 'json/ext/parser'
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index 0f98cf9827..9bd7f1971e 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -9,14 +9,14 @@
static void
enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
{
- va_list args;
- VALUE mesg;
+ va_list args;
+ VALUE mesg;
- va_start(args, fmt);
- mesg = rb_enc_vsprintf(enc, fmt, args);
- va_end(args);
+ va_start(args, fmt);
+ mesg = rb_enc_vsprintf(enc, fmt, args);
+ va_end(args);
- rb_exc_raise(rb_exc_new3(exc, mesg));
+ rb_exc_raise(rb_exc_new3(exc, mesg));
}
# define rb_enc_raise enc_raise
# endif
@@ -28,2109 +28,3320 @@ enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
/* unicode */
static const signed char digit_values[256] = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
- -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
+ -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1
};
static UTF32 unescape_unicode(const unsigned char *p)
{
- signed char b;
- UTF32 result = 0;
- b = digit_values[p[0]];
- if (b < 0) return UNI_REPLACEMENT_CHAR;
- result = (result << 4) | (unsigned char)b;
- b = digit_values[p[1]];
- if (b < 0) return UNI_REPLACEMENT_CHAR;
- result = (result << 4) | (unsigned char)b;
- b = digit_values[p[2]];
- if (b < 0) return UNI_REPLACEMENT_CHAR;
- result = (result << 4) | (unsigned char)b;
- b = digit_values[p[3]];
- if (b < 0) return UNI_REPLACEMENT_CHAR;
- result = (result << 4) | (unsigned char)b;
- return result;
+ signed char b;
+ UTF32 result = 0;
+ b = digit_values[p[0]];
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
+ result = (result << 4) | (unsigned char)b;
+ b = digit_values[p[1]];
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
+ result = (result << 4) | (unsigned char)b;
+ b = digit_values[p[2]];
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
+ result = (result << 4) | (unsigned char)b;
+ b = digit_values[p[3]];
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
+ result = (result << 4) | (unsigned char)b;
+ return result;
}
static int convert_UTF32_to_UTF8(char *buf, UTF32 ch)
{
- int len = 1;
- if (ch <= 0x7F) {
- buf[0] = (char) ch;
- } else if (ch <= 0x07FF) {
- buf[0] = (char) ((ch >> 6) | 0xC0);
- buf[1] = (char) ((ch & 0x3F) | 0x80);
- len++;
- } else if (ch <= 0xFFFF) {
- buf[0] = (char) ((ch >> 12) | 0xE0);
- buf[1] = (char) (((ch >> 6) & 0x3F) | 0x80);
- buf[2] = (char) ((ch & 0x3F) | 0x80);
- len += 2;
- } else if (ch <= 0x1fffff) {
- buf[0] =(char) ((ch >> 18) | 0xF0);
- buf[1] =(char) (((ch >> 12) & 0x3F) | 0x80);
- buf[2] =(char) (((ch >> 6) & 0x3F) | 0x80);
- buf[3] =(char) ((ch & 0x3F) | 0x80);
- len += 3;
- } else {
- buf[0] = '?';
- }
- return len;
+ int len = 1;
+ if (ch <= 0x7F) {
+ buf[0] = (char) ch;
+ } else if (ch <= 0x07FF) {
+ buf[0] = (char) ((ch >> 6) | 0xC0);
+ buf[1] = (char) ((ch & 0x3F) | 0x80);
+ len++;
+ } else if (ch <= 0xFFFF) {
+ buf[0] = (char) ((ch >> 12) | 0xE0);
+ buf[1] = (char) (((ch >> 6) & 0x3F) | 0x80);
+ buf[2] = (char) ((ch & 0x3F) | 0x80);
+ len += 2;
+ } else if (ch <= 0x1fffff) {
+ buf[0] =(char) ((ch >> 18) | 0xF0);
+ buf[1] =(char) (((ch >> 12) & 0x3F) | 0x80);
+ buf[2] =(char) (((ch >> 6) & 0x3F) | 0x80);
+ buf[3] =(char) ((ch & 0x3F) | 0x80);
+ len += 3;
+ } else {
+ buf[0] = '?';
+ }
+ return len;
}
static VALUE mJSON, mExt, cParser, eParserError, eNestingError;
static VALUE CNaN, CInfinity, CMinusInfinity;
-static VALUE cBigDecimal = Qundef;
static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
- i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
- i_object_class, i_array_class, i_decimal_class, i_key_p,
- i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
- i_leftshift, i_new, i_BigDecimal;
+i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
+i_object_class, i_array_class, i_decimal_class, i_key_p,
+i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
+i_leftshift, i_new, i_try_convert, i_freeze, i_uminus;
-#line 126 "parser.rl"
+#line 125 "parser.rl"
-#line 108 "parser.c"
enum {JSON_object_start = 1};
enum {JSON_object_first_final = 27};
enum {JSON_object_error = 0};
enum {JSON_object_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_object_nfa_targs)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_object_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_object_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_object_nfa_pop_trans)[] = {
+ 0, 0
+};
+
#line 167 "parser.rl"
static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
{
- int cs = EVIL;
- VALUE last_name = Qnil;
- VALUE object_class = json->object_class;
+ int cs = EVIL;
+ VALUE last_name = Qnil;
+ VALUE object_class = json->object_class;
- if (json->max_nesting && current_nesting > json->max_nesting) {
- rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
- }
+ if (json->max_nesting && current_nesting > json->max_nesting) {
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
+ }
- *result = NIL_P(object_class) ? rb_hash_new() : rb_class_new_instance(0, 0, object_class);
+ *result = NIL_P(object_class) ? rb_hash_new() : rb_class_new_instance(0, 0, object_class);
-#line 132 "parser.c"
{
- cs = JSON_object_start;
+ cs = (int)JSON_object_start;
}
-#line 182 "parser.rl"
+ #line 182 "parser.rl"
+
-#line 139 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-case 1:
- if ( (*p) == 123 )
- goto st2;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-st2:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 7:
+ goto st_case_7;
+ case 8:
+ goto st_case_8;
+ case 9:
+ goto st_case_9;
+ case 10:
+ goto st_case_10;
+ case 11:
+ goto st_case_11;
+ case 12:
+ goto st_case_12;
+ case 13:
+ goto st_case_13;
+ case 14:
+ goto st_case_14;
+ case 15:
+ goto st_case_15;
+ case 16:
+ goto st_case_16;
+ case 17:
+ goto st_case_17;
+ case 18:
+ goto st_case_18;
+ case 27:
+ goto st_case_27;
+ case 19:
+ goto st_case_19;
+ case 20:
+ goto st_case_20;
+ case 21:
+ goto st_case_21;
+ case 22:
+ goto st_case_22;
+ case 23:
+ goto st_case_23;
+ case 24:
+ goto st_case_24;
+ case 25:
+ goto st_case_25;
+ case 26:
+ goto st_case_26;
+ }
+ goto st_out;
+ st_case_1:
+ if ( ( (*( p))) == 123 ) {
+ goto st2;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- switch( (*p) ) {
- case 13: goto st2;
- case 32: goto st2;
- case 34: goto tr2;
- case 47: goto st23;
- case 125: goto tr4;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
- goto st2;
- goto st0;
-tr2:
-#line 149 "parser.rl"
- {
- char *np;
- json->parsing_name = 1;
- np = JSON_parse_string(json, p, pe, &last_name);
- json->parsing_name = 0;
- if (np == NULL) { p--; {p++; cs = 3; goto _out;} } else {p = (( np))-1;}
- }
- goto st3;
-st3:
- if ( ++p == pe )
- goto _test_eof3;
-case 3:
-#line 180 "parser.c"
- switch( (*p) ) {
- case 13: goto st3;
- case 32: goto st3;
- case 47: goto st4;
- case 58: goto st8;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
+ st_case_2:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st2;
+ }
+ case 32: {
+ goto st2;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 47: {
+ goto st23;
+ }
+ case 125: {
+ goto ctr4;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st2;
+ }
+ {
+ goto st0;
+ }
+ ctr2:
+ {
+ #line 149 "parser.rl"
+
+ char *np;
+ json->parsing_name = 1;
+ np = JSON_parse_string(json, p, pe, &last_name);
+ json->parsing_name = 0;
+ if (np == NULL) { {p = p - 1; } {p+= 1; cs = 3; goto _out;} } else {p = (( np))-1;}
+
+ }
+
goto st3;
- goto st0;
-st4:
- if ( ++p == pe )
+ st3:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof3;
+ st_case_3:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st3;
+ }
+ case 32: {
+ goto st3;
+ }
+ case 47: {
+ goto st4;
+ }
+ case 58: {
+ goto st8;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st3;
+ }
+ {
+ goto st0;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- switch( (*p) ) {
- case 42: goto st5;
- case 47: goto st7;
- }
- goto st0;
-st5:
- if ( ++p == pe )
+ st_case_4:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st5;
+ }
+ case 47: {
+ goto st7;
+ }
+ }
+ {
+ goto st0;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- if ( (*p) == 42 )
- goto st6;
- goto st5;
-st6:
- if ( ++p == pe )
+ st_case_5:
+ if ( ( (*( p))) == 42 ) {
+ goto st6;
+ }
+ {
+ goto st5;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- switch( (*p) ) {
- case 42: goto st6;
- case 47: goto st3;
- }
- goto st5;
-st7:
- if ( ++p == pe )
+ st_case_6:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st6;
+ }
+ case 47: {
+ goto st3;
+ }
+ }
+ {
+ goto st5;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- if ( (*p) == 10 )
- goto st3;
- goto st7;
-st8:
- if ( ++p == pe )
+ st_case_7:
+ if ( ( (*( p))) == 10 ) {
+ goto st3;
+ }
+ {
+ goto st7;
+ }
+ st8:
+ p+= 1;
+ if ( p == pe )
goto _test_eof8;
-case 8:
- switch( (*p) ) {
- case 13: goto st8;
- case 32: goto st8;
- case 34: goto tr11;
- case 45: goto tr11;
- case 47: goto st19;
- case 73: goto tr11;
- case 78: goto tr11;
- case 91: goto tr11;
- case 102: goto tr11;
- case 110: goto tr11;
- case 116: goto tr11;
- case 123: goto tr11;
- }
- if ( (*p) > 10 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto tr11;
- } else if ( (*p) >= 9 )
- goto st8;
- goto st0;
-tr11:
-#line 134 "parser.rl"
- {
- VALUE v = Qnil;
- char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
- if (np == NULL) {
- p--; {p++; cs = 9; goto _out;}
- } else {
- if (NIL_P(json->object_class)) {
- rb_hash_aset(*result, last_name, v);
- } else {
- rb_funcall(*result, i_aset, 2, last_name, v);
- }
- {p = (( np))-1;}
- }
- }
- goto st9;
-st9:
- if ( ++p == pe )
- goto _test_eof9;
-case 9:
-#line 267 "parser.c"
- switch( (*p) ) {
- case 13: goto st9;
- case 32: goto st9;
- case 44: goto st10;
- case 47: goto st15;
- case 125: goto tr4;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
+ st_case_8:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st8;
+ }
+ case 32: {
+ goto st8;
+ }
+ case 34: {
+ goto ctr11;
+ }
+ case 45: {
+ goto ctr11;
+ }
+ case 47: {
+ goto st19;
+ }
+ case 73: {
+ goto ctr11;
+ }
+ case 78: {
+ goto ctr11;
+ }
+ case 91: {
+ goto ctr11;
+ }
+ case 102: {
+ goto ctr11;
+ }
+ case 110: {
+ goto ctr11;
+ }
+ case 116: {
+ goto ctr11;
+ }
+ case 123: {
+ goto ctr11;
+ }
+ }
+ if ( ( (*( p))) > 10 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto ctr11;
+ }
+ } else if ( ( (*( p))) >= 9 ) {
+ goto st8;
+ }
+ {
+ goto st0;
+ }
+ ctr11:
+ {
+ #line 133 "parser.rl"
+
+ VALUE v = Qnil;
+ char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
+ if (np == NULL) {
+ {p = p - 1; } {p+= 1; cs = 9; goto _out;}
+ } else {
+ if (NIL_P(json->object_class)) {
+ OBJ_FREEZE(last_name);
+ rb_hash_aset(*result, last_name, v);
+ } else {
+ rb_funcall(*result, i_aset, 2, last_name, v);
+ }
+ {p = (( np))-1;}
+
+ }
+ }
+
goto st9;
- goto st0;
-st10:
- if ( ++p == pe )
+ st9:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof9;
+ st_case_9:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st9;
+ }
+ case 32: {
+ goto st9;
+ }
+ case 44: {
+ goto st10;
+ }
+ case 47: {
+ goto st15;
+ }
+ case 125: {
+ goto ctr4;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st9;
+ }
+ {
+ goto st0;
+ }
+ st10:
+ p+= 1;
+ if ( p == pe )
goto _test_eof10;
-case 10:
- switch( (*p) ) {
- case 13: goto st10;
- case 32: goto st10;
- case 34: goto tr2;
- case 47: goto st11;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
- goto st10;
- goto st0;
-st11:
- if ( ++p == pe )
+ st_case_10:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st10;
+ }
+ case 32: {
+ goto st10;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 47: {
+ goto st11;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st10;
+ }
+ {
+ goto st0;
+ }
+ st11:
+ p+= 1;
+ if ( p == pe )
goto _test_eof11;
-case 11:
- switch( (*p) ) {
- case 42: goto st12;
- case 47: goto st14;
- }
- goto st0;
-st12:
- if ( ++p == pe )
+ st_case_11:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st12;
+ }
+ case 47: {
+ goto st14;
+ }
+ }
+ {
+ goto st0;
+ }
+ st12:
+ p+= 1;
+ if ( p == pe )
goto _test_eof12;
-case 12:
- if ( (*p) == 42 )
- goto st13;
- goto st12;
-st13:
- if ( ++p == pe )
+ st_case_12:
+ if ( ( (*( p))) == 42 ) {
+ goto st13;
+ }
+ {
+ goto st12;
+ }
+ st13:
+ p+= 1;
+ if ( p == pe )
goto _test_eof13;
-case 13:
- switch( (*p) ) {
- case 42: goto st13;
- case 47: goto st10;
- }
- goto st12;
-st14:
- if ( ++p == pe )
+ st_case_13:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st13;
+ }
+ case 47: {
+ goto st10;
+ }
+ }
+ {
+ goto st12;
+ }
+ st14:
+ p+= 1;
+ if ( p == pe )
goto _test_eof14;
-case 14:
- if ( (*p) == 10 )
- goto st10;
- goto st14;
-st15:
- if ( ++p == pe )
+ st_case_14:
+ if ( ( (*( p))) == 10 ) {
+ goto st10;
+ }
+ {
+ goto st14;
+ }
+ st15:
+ p+= 1;
+ if ( p == pe )
goto _test_eof15;
-case 15:
- switch( (*p) ) {
- case 42: goto st16;
- case 47: goto st18;
- }
- goto st0;
-st16:
- if ( ++p == pe )
+ st_case_15:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st16;
+ }
+ case 47: {
+ goto st18;
+ }
+ }
+ {
+ goto st0;
+ }
+ st16:
+ p+= 1;
+ if ( p == pe )
goto _test_eof16;
-case 16:
- if ( (*p) == 42 )
- goto st17;
- goto st16;
-st17:
- if ( ++p == pe )
+ st_case_16:
+ if ( ( (*( p))) == 42 ) {
+ goto st17;
+ }
+ {
+ goto st16;
+ }
+ st17:
+ p+= 1;
+ if ( p == pe )
goto _test_eof17;
-case 17:
- switch( (*p) ) {
- case 42: goto st17;
- case 47: goto st9;
- }
- goto st16;
-st18:
- if ( ++p == pe )
+ st_case_17:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st17;
+ }
+ case 47: {
+ goto st9;
+ }
+ }
+ {
+ goto st16;
+ }
+ st18:
+ p+= 1;
+ if ( p == pe )
goto _test_eof18;
-case 18:
- if ( (*p) == 10 )
- goto st9;
- goto st18;
-tr4:
-#line 157 "parser.rl"
- { p--; {p++; cs = 27; goto _out;} }
- goto st27;
-st27:
- if ( ++p == pe )
+ st_case_18:
+ if ( ( (*( p))) == 10 ) {
+ goto st9;
+ }
+ {
+ goto st18;
+ }
+ ctr4:
+ {
+ #line 157 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 27; goto _out;} }
+
+ goto st27;
+ st27:
+ p+= 1;
+ if ( p == pe )
goto _test_eof27;
-case 27:
-#line 363 "parser.c"
- goto st0;
-st19:
- if ( ++p == pe )
+ st_case_27:
+ {
+ goto st0;
+ }
+ st19:
+ p+= 1;
+ if ( p == pe )
goto _test_eof19;
-case 19:
- switch( (*p) ) {
- case 42: goto st20;
- case 47: goto st22;
- }
- goto st0;
-st20:
- if ( ++p == pe )
+ st_case_19:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st20;
+ }
+ case 47: {
+ goto st22;
+ }
+ }
+ {
+ goto st0;
+ }
+ st20:
+ p+= 1;
+ if ( p == pe )
goto _test_eof20;
-case 20:
- if ( (*p) == 42 )
- goto st21;
- goto st20;
-st21:
- if ( ++p == pe )
+ st_case_20:
+ if ( ( (*( p))) == 42 ) {
+ goto st21;
+ }
+ {
+ goto st20;
+ }
+ st21:
+ p+= 1;
+ if ( p == pe )
goto _test_eof21;
-case 21:
- switch( (*p) ) {
- case 42: goto st21;
- case 47: goto st8;
- }
- goto st20;
-st22:
- if ( ++p == pe )
+ st_case_21:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st21;
+ }
+ case 47: {
+ goto st8;
+ }
+ }
+ {
+ goto st20;
+ }
+ st22:
+ p+= 1;
+ if ( p == pe )
goto _test_eof22;
-case 22:
- if ( (*p) == 10 )
- goto st8;
- goto st22;
-st23:
- if ( ++p == pe )
+ st_case_22:
+ if ( ( (*( p))) == 10 ) {
+ goto st8;
+ }
+ {
+ goto st22;
+ }
+ st23:
+ p+= 1;
+ if ( p == pe )
goto _test_eof23;
-case 23:
- switch( (*p) ) {
- case 42: goto st24;
- case 47: goto st26;
- }
- goto st0;
-st24:
- if ( ++p == pe )
+ st_case_23:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st24;
+ }
+ case 47: {
+ goto st26;
+ }
+ }
+ {
+ goto st0;
+ }
+ st24:
+ p+= 1;
+ if ( p == pe )
goto _test_eof24;
-case 24:
- if ( (*p) == 42 )
- goto st25;
- goto st24;
-st25:
- if ( ++p == pe )
+ st_case_24:
+ if ( ( (*( p))) == 42 ) {
+ goto st25;
+ }
+ {
+ goto st24;
+ }
+ st25:
+ p+= 1;
+ if ( p == pe )
goto _test_eof25;
-case 25:
- switch( (*p) ) {
- case 42: goto st25;
- case 47: goto st2;
- }
- goto st24;
-st26:
- if ( ++p == pe )
+ st_case_25:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st25;
+ }
+ case 47: {
+ goto st2;
+ }
+ }
+ {
+ goto st24;
+ }
+ st26:
+ p+= 1;
+ if ( p == pe )
goto _test_eof26;
-case 26:
- if ( (*p) == 10 )
- goto st2;
- goto st26;
- }
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof9: cs = 9; goto _test_eof;
- _test_eof10: cs = 10; goto _test_eof;
- _test_eof11: cs = 11; goto _test_eof;
- _test_eof12: cs = 12; goto _test_eof;
- _test_eof13: cs = 13; goto _test_eof;
- _test_eof14: cs = 14; goto _test_eof;
- _test_eof15: cs = 15; goto _test_eof;
- _test_eof16: cs = 16; goto _test_eof;
- _test_eof17: cs = 17; goto _test_eof;
- _test_eof18: cs = 18; goto _test_eof;
- _test_eof27: cs = 27; goto _test_eof;
- _test_eof19: cs = 19; goto _test_eof;
- _test_eof20: cs = 20; goto _test_eof;
- _test_eof21: cs = 21; goto _test_eof;
- _test_eof22: cs = 22; goto _test_eof;
- _test_eof23: cs = 23; goto _test_eof;
- _test_eof24: cs = 24; goto _test_eof;
- _test_eof25: cs = 25; goto _test_eof;
- _test_eof26: cs = 26; goto _test_eof;
-
- _test_eof: {}
- _out: {}
+ st_case_26:
+ if ( ( (*( p))) == 10 ) {
+ goto st2;
+ }
+ {
+ goto st26;
+ }
+ st_out:
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof9: cs = 9; goto _test_eof;
+ _test_eof10: cs = 10; goto _test_eof;
+ _test_eof11: cs = 11; goto _test_eof;
+ _test_eof12: cs = 12; goto _test_eof;
+ _test_eof13: cs = 13; goto _test_eof;
+ _test_eof14: cs = 14; goto _test_eof;
+ _test_eof15: cs = 15; goto _test_eof;
+ _test_eof16: cs = 16; goto _test_eof;
+ _test_eof17: cs = 17; goto _test_eof;
+ _test_eof18: cs = 18; goto _test_eof;
+ _test_eof27: cs = 27; goto _test_eof;
+ _test_eof19: cs = 19; goto _test_eof;
+ _test_eof20: cs = 20; goto _test_eof;
+ _test_eof21: cs = 21; goto _test_eof;
+ _test_eof22: cs = 22; goto _test_eof;
+ _test_eof23: cs = 23; goto _test_eof;
+ _test_eof24: cs = 24; goto _test_eof;
+ _test_eof25: cs = 25; goto _test_eof;
+ _test_eof26: cs = 26; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 183 "parser.rl"
+
+
+ if (cs >= JSON_object_first_final) {
+ if (json->create_additions) {
+ VALUE klassname;
+ if (NIL_P(json->object_class)) {
+ klassname = rb_hash_aref(*result, json->create_id);
+ } else {
+ klassname = rb_funcall(*result, i_aref, 1, json->create_id);
+ }
+ if (!NIL_P(klassname)) {
+ VALUE klass = rb_funcall(mJSON, i_deep_const_get, 1, klassname);
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0))) {
+ *result = rb_funcall(klass, i_json_create, 1, *result);
+ }
+ }
+ }
+ return p + 1;
+ } else {
+ return NULL;
}
-
-#line 183 "parser.rl"
-
- if (cs >= JSON_object_first_final) {
- if (json->create_additions) {
- VALUE klassname;
- if (NIL_P(json->object_class)) {
- klassname = rb_hash_aref(*result, json->create_id);
- } else {
- klassname = rb_funcall(*result, i_aref, 1, json->create_id);
- }
- if (!NIL_P(klassname)) {
- VALUE klass = rb_funcall(mJSON, i_deep_const_get, 1, klassname);
- if (RTEST(rb_funcall(klass, i_json_creatable_p, 0))) {
- *result = rb_funcall(klass, i_json_create, 1, *result);
- }
- }
- }
- return p + 1;
- } else {
- return NULL;
- }
}
-#line 486 "parser.c"
enum {JSON_value_start = 1};
enum {JSON_value_first_final = 29};
enum {JSON_value_error = 0};
enum {JSON_value_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_value_nfa_targs)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_value_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_value_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_value_nfa_pop_trans)[] = {
+ 0, 0
+};
+
#line 283 "parser.rl"
static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
{
- int cs = EVIL;
+ int cs = EVIL;
-#line 502 "parser.c"
{
- cs = JSON_value_start;
+ cs = (int)JSON_value_start;
}
-#line 290 "parser.rl"
+ #line 290 "parser.rl"
+
-#line 509 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-st1:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 29:
+ goto st_case_29;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 7:
+ goto st_case_7;
+ case 8:
+ goto st_case_8;
+ case 9:
+ goto st_case_9;
+ case 10:
+ goto st_case_10;
+ case 11:
+ goto st_case_11;
+ case 12:
+ goto st_case_12;
+ case 13:
+ goto st_case_13;
+ case 14:
+ goto st_case_14;
+ case 15:
+ goto st_case_15;
+ case 16:
+ goto st_case_16;
+ case 17:
+ goto st_case_17;
+ case 18:
+ goto st_case_18;
+ case 19:
+ goto st_case_19;
+ case 20:
+ goto st_case_20;
+ case 21:
+ goto st_case_21;
+ case 22:
+ goto st_case_22;
+ case 23:
+ goto st_case_23;
+ case 24:
+ goto st_case_24;
+ case 25:
+ goto st_case_25;
+ case 26:
+ goto st_case_26;
+ case 27:
+ goto st_case_27;
+ case 28:
+ goto st_case_28;
+ }
+ goto st_out;
+ st1:
+ p+= 1;
+ if ( p == pe )
goto _test_eof1;
-case 1:
- switch( (*p) ) {
- case 13: goto st1;
- case 32: goto st1;
- case 34: goto tr2;
- case 45: goto tr3;
- case 47: goto st6;
- case 73: goto st10;
- case 78: goto st17;
- case 91: goto tr7;
- case 102: goto st19;
- case 110: goto st23;
- case 116: goto st26;
- case 123: goto tr11;
- }
- if ( (*p) > 10 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto tr3;
- } else if ( (*p) >= 9 )
- goto st1;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-tr2:
-#line 235 "parser.rl"
- {
- char *np = JSON_parse_string(json, p, pe, result);
- if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
- }
- goto st29;
-tr3:
-#line 240 "parser.rl"
- {
- char *np;
- if(pe > p + 8 && !strncmp(MinusInfinity, p, 9)) {
- if (json->allow_nan) {
- *result = CMinusInfinity;
- {p = (( p + 10))-1;}
- p--; {p++; cs = 29; goto _out;}
- } else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
- }
- }
- np = JSON_parse_float(json, p, pe, result);
- if (np != NULL) {p = (( np))-1;}
- np = JSON_parse_integer(json, p, pe, result);
- if (np != NULL) {p = (( np))-1;}
- p--; {p++; cs = 29; goto _out;}
- }
- goto st29;
-tr7:
-#line 258 "parser.rl"
- {
- char *np;
- np = JSON_parse_array(json, p, pe, result, current_nesting + 1);
- if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
- }
- goto st29;
-tr11:
-#line 264 "parser.rl"
- {
- char *np;
- np = JSON_parse_object(json, p, pe, result, current_nesting + 1);
- if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
- }
- goto st29;
-tr25:
-#line 228 "parser.rl"
- {
- if (json->allow_nan) {
- *result = CInfinity;
- } else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 8);
- }
- }
- goto st29;
-tr27:
-#line 221 "parser.rl"
- {
- if (json->allow_nan) {
- *result = CNaN;
- } else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 2);
- }
- }
- goto st29;
-tr31:
-#line 215 "parser.rl"
- {
- *result = Qfalse;
- }
- goto st29;
-tr34:
-#line 212 "parser.rl"
- {
- *result = Qnil;
- }
- goto st29;
-tr37:
-#line 218 "parser.rl"
- {
- *result = Qtrue;
- }
- goto st29;
-st29:
- if ( ++p == pe )
- goto _test_eof29;
-case 29:
-#line 270 "parser.rl"
- { p--; {p++; cs = 29; goto _out;} }
-#line 629 "parser.c"
- switch( (*p) ) {
- case 13: goto st29;
- case 32: goto st29;
- case 47: goto st2;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
+ st_case_1:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st1;
+ }
+ case 32: {
+ goto st1;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 45: {
+ goto ctr3;
+ }
+ case 47: {
+ goto st6;
+ }
+ case 73: {
+ goto st10;
+ }
+ case 78: {
+ goto st17;
+ }
+ case 91: {
+ goto ctr7;
+ }
+ case 102: {
+ goto st19;
+ }
+ case 110: {
+ goto st23;
+ }
+ case 116: {
+ goto st26;
+ }
+ case 123: {
+ goto ctr11;
+ }
+ }
+ if ( ( (*( p))) > 10 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto ctr3;
+ }
+ } else if ( ( (*( p))) >= 9 ) {
+ goto st1;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ ctr2:
+ {
+ #line 235 "parser.rl"
+
+ char *np = JSON_parse_string(json, p, pe, result);
+ if (np == NULL) { {p = p - 1; } {p+= 1; cs = 29; goto _out;} } else {p = (( np))-1;}
+
+ }
+
+ goto st29;
+ ctr3:
+ {
+ #line 240 "parser.rl"
+
+ char *np;
+ if(pe > p + 8 && !strncmp(MinusInfinity, p, 9)) {
+ if (json->allow_nan) {
+ *result = CMinusInfinity;
+ {p = (( p + 10))-1;}
+
+ {p = p - 1; } {p+= 1; cs = 29; goto _out;}
+ } else {
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
+ }
+ }
+ np = JSON_parse_float(json, p, pe, result);
+ if (np != NULL) {p = (( np))-1;}
+
+ np = JSON_parse_integer(json, p, pe, result);
+ if (np != NULL) {p = (( np))-1;}
+
+ {p = p - 1; } {p+= 1; cs = 29; goto _out;}
+ }
+
+ goto st29;
+ ctr7:
+ {
+ #line 258 "parser.rl"
+
+ char *np;
+ np = JSON_parse_array(json, p, pe, result, current_nesting + 1);
+ if (np == NULL) { {p = p - 1; } {p+= 1; cs = 29; goto _out;} } else {p = (( np))-1;}
+
+ }
+
+ goto st29;
+ ctr11:
+ {
+ #line 264 "parser.rl"
+
+ char *np;
+ np = JSON_parse_object(json, p, pe, result, current_nesting + 1);
+ if (np == NULL) { {p = p - 1; } {p+= 1; cs = 29; goto _out;} } else {p = (( np))-1;}
+
+ }
+
goto st29;
- goto st0;
-st2:
- if ( ++p == pe )
+ ctr25:
+ {
+ #line 228 "parser.rl"
+
+ if (json->allow_nan) {
+ *result = CInfinity;
+ } else {
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 8);
+ }
+ }
+
+ goto st29;
+ ctr27:
+ {
+ #line 221 "parser.rl"
+
+ if (json->allow_nan) {
+ *result = CNaN;
+ } else {
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 2);
+ }
+ }
+
+ goto st29;
+ ctr31:
+ {
+ #line 215 "parser.rl"
+
+ *result = Qfalse;
+ }
+
+ goto st29;
+ ctr34:
+ {
+ #line 212 "parser.rl"
+
+ *result = Qnil;
+ }
+
+ goto st29;
+ ctr37:
+ {
+ #line 218 "parser.rl"
+
+ *result = Qtrue;
+ }
+
+ goto st29;
+ st29:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof29;
+ st_case_29:
+ {
+ #line 270 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 29; goto _out;} }
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st29;
+ }
+ case 32: {
+ goto st29;
+ }
+ case 47: {
+ goto st2;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st29;
+ }
+ {
+ goto st0;
+ }
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- switch( (*p) ) {
- case 42: goto st3;
- case 47: goto st5;
- }
- goto st0;
-st3:
- if ( ++p == pe )
+ st_case_2:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st3;
+ }
+ case 47: {
+ goto st5;
+ }
+ }
+ {
+ goto st0;
+ }
+ st3:
+ p+= 1;
+ if ( p == pe )
goto _test_eof3;
-case 3:
- if ( (*p) == 42 )
- goto st4;
- goto st3;
-st4:
- if ( ++p == pe )
+ st_case_3:
+ if ( ( (*( p))) == 42 ) {
+ goto st4;
+ }
+ {
+ goto st3;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- switch( (*p) ) {
- case 42: goto st4;
- case 47: goto st29;
- }
- goto st3;
-st5:
- if ( ++p == pe )
+ st_case_4:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st4;
+ }
+ case 47: {
+ goto st29;
+ }
+ }
+ {
+ goto st3;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- if ( (*p) == 10 )
- goto st29;
- goto st5;
-st6:
- if ( ++p == pe )
+ st_case_5:
+ if ( ( (*( p))) == 10 ) {
+ goto st29;
+ }
+ {
+ goto st5;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- switch( (*p) ) {
- case 42: goto st7;
- case 47: goto st9;
- }
- goto st0;
-st7:
- if ( ++p == pe )
+ st_case_6:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st7;
+ }
+ case 47: {
+ goto st9;
+ }
+ }
+ {
+ goto st0;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- if ( (*p) == 42 )
- goto st8;
- goto st7;
-st8:
- if ( ++p == pe )
+ st_case_7:
+ if ( ( (*( p))) == 42 ) {
+ goto st8;
+ }
+ {
+ goto st7;
+ }
+ st8:
+ p+= 1;
+ if ( p == pe )
goto _test_eof8;
-case 8:
- switch( (*p) ) {
- case 42: goto st8;
- case 47: goto st1;
- }
- goto st7;
-st9:
- if ( ++p == pe )
+ st_case_8:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st8;
+ }
+ case 47: {
+ goto st1;
+ }
+ }
+ {
+ goto st7;
+ }
+ st9:
+ p+= 1;
+ if ( p == pe )
goto _test_eof9;
-case 9:
- if ( (*p) == 10 )
- goto st1;
- goto st9;
-st10:
- if ( ++p == pe )
+ st_case_9:
+ if ( ( (*( p))) == 10 ) {
+ goto st1;
+ }
+ {
+ goto st9;
+ }
+ st10:
+ p+= 1;
+ if ( p == pe )
goto _test_eof10;
-case 10:
- if ( (*p) == 110 )
- goto st11;
- goto st0;
-st11:
- if ( ++p == pe )
+ st_case_10:
+ if ( ( (*( p))) == 110 ) {
+ goto st11;
+ }
+ {
+ goto st0;
+ }
+ st11:
+ p+= 1;
+ if ( p == pe )
goto _test_eof11;
-case 11:
- if ( (*p) == 102 )
- goto st12;
- goto st0;
-st12:
- if ( ++p == pe )
+ st_case_11:
+ if ( ( (*( p))) == 102 ) {
+ goto st12;
+ }
+ {
+ goto st0;
+ }
+ st12:
+ p+= 1;
+ if ( p == pe )
goto _test_eof12;
-case 12:
- if ( (*p) == 105 )
- goto st13;
- goto st0;
-st13:
- if ( ++p == pe )
+ st_case_12:
+ if ( ( (*( p))) == 105 ) {
+ goto st13;
+ }
+ {
+ goto st0;
+ }
+ st13:
+ p+= 1;
+ if ( p == pe )
goto _test_eof13;
-case 13:
- if ( (*p) == 110 )
- goto st14;
- goto st0;
-st14:
- if ( ++p == pe )
+ st_case_13:
+ if ( ( (*( p))) == 110 ) {
+ goto st14;
+ }
+ {
+ goto st0;
+ }
+ st14:
+ p+= 1;
+ if ( p == pe )
goto _test_eof14;
-case 14:
- if ( (*p) == 105 )
- goto st15;
- goto st0;
-st15:
- if ( ++p == pe )
+ st_case_14:
+ if ( ( (*( p))) == 105 ) {
+ goto st15;
+ }
+ {
+ goto st0;
+ }
+ st15:
+ p+= 1;
+ if ( p == pe )
goto _test_eof15;
-case 15:
- if ( (*p) == 116 )
- goto st16;
- goto st0;
-st16:
- if ( ++p == pe )
+ st_case_15:
+ if ( ( (*( p))) == 116 ) {
+ goto st16;
+ }
+ {
+ goto st0;
+ }
+ st16:
+ p+= 1;
+ if ( p == pe )
goto _test_eof16;
-case 16:
- if ( (*p) == 121 )
- goto tr25;
- goto st0;
-st17:
- if ( ++p == pe )
+ st_case_16:
+ if ( ( (*( p))) == 121 ) {
+ goto ctr25;
+ }
+ {
+ goto st0;
+ }
+ st17:
+ p+= 1;
+ if ( p == pe )
goto _test_eof17;
-case 17:
- if ( (*p) == 97 )
- goto st18;
- goto st0;
-st18:
- if ( ++p == pe )
+ st_case_17:
+ if ( ( (*( p))) == 97 ) {
+ goto st18;
+ }
+ {
+ goto st0;
+ }
+ st18:
+ p+= 1;
+ if ( p == pe )
goto _test_eof18;
-case 18:
- if ( (*p) == 78 )
- goto tr27;
- goto st0;
-st19:
- if ( ++p == pe )
+ st_case_18:
+ if ( ( (*( p))) == 78 ) {
+ goto ctr27;
+ }
+ {
+ goto st0;
+ }
+ st19:
+ p+= 1;
+ if ( p == pe )
goto _test_eof19;
-case 19:
- if ( (*p) == 97 )
- goto st20;
- goto st0;
-st20:
- if ( ++p == pe )
+ st_case_19:
+ if ( ( (*( p))) == 97 ) {
+ goto st20;
+ }
+ {
+ goto st0;
+ }
+ st20:
+ p+= 1;
+ if ( p == pe )
goto _test_eof20;
-case 20:
- if ( (*p) == 108 )
- goto st21;
- goto st0;
-st21:
- if ( ++p == pe )
+ st_case_20:
+ if ( ( (*( p))) == 108 ) {
+ goto st21;
+ }
+ {
+ goto st0;
+ }
+ st21:
+ p+= 1;
+ if ( p == pe )
goto _test_eof21;
-case 21:
- if ( (*p) == 115 )
- goto st22;
- goto st0;
-st22:
- if ( ++p == pe )
+ st_case_21:
+ if ( ( (*( p))) == 115 ) {
+ goto st22;
+ }
+ {
+ goto st0;
+ }
+ st22:
+ p+= 1;
+ if ( p == pe )
goto _test_eof22;
-case 22:
- if ( (*p) == 101 )
- goto tr31;
- goto st0;
-st23:
- if ( ++p == pe )
+ st_case_22:
+ if ( ( (*( p))) == 101 ) {
+ goto ctr31;
+ }
+ {
+ goto st0;
+ }
+ st23:
+ p+= 1;
+ if ( p == pe )
goto _test_eof23;
-case 23:
- if ( (*p) == 117 )
- goto st24;
- goto st0;
-st24:
- if ( ++p == pe )
+ st_case_23:
+ if ( ( (*( p))) == 117 ) {
+ goto st24;
+ }
+ {
+ goto st0;
+ }
+ st24:
+ p+= 1;
+ if ( p == pe )
goto _test_eof24;
-case 24:
- if ( (*p) == 108 )
- goto st25;
- goto st0;
-st25:
- if ( ++p == pe )
+ st_case_24:
+ if ( ( (*( p))) == 108 ) {
+ goto st25;
+ }
+ {
+ goto st0;
+ }
+ st25:
+ p+= 1;
+ if ( p == pe )
goto _test_eof25;
-case 25:
- if ( (*p) == 108 )
- goto tr34;
- goto st0;
-st26:
- if ( ++p == pe )
+ st_case_25:
+ if ( ( (*( p))) == 108 ) {
+ goto ctr34;
+ }
+ {
+ goto st0;
+ }
+ st26:
+ p+= 1;
+ if ( p == pe )
goto _test_eof26;
-case 26:
- if ( (*p) == 114 )
- goto st27;
- goto st0;
-st27:
- if ( ++p == pe )
+ st_case_26:
+ if ( ( (*( p))) == 114 ) {
+ goto st27;
+ }
+ {
+ goto st0;
+ }
+ st27:
+ p+= 1;
+ if ( p == pe )
goto _test_eof27;
-case 27:
- if ( (*p) == 117 )
- goto st28;
- goto st0;
-st28:
- if ( ++p == pe )
+ st_case_27:
+ if ( ( (*( p))) == 117 ) {
+ goto st28;
+ }
+ {
+ goto st0;
+ }
+ st28:
+ p+= 1;
+ if ( p == pe )
goto _test_eof28;
-case 28:
- if ( (*p) == 101 )
- goto tr37;
- goto st0;
- }
- _test_eof1: cs = 1; goto _test_eof;
- _test_eof29: cs = 29; goto _test_eof;
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof9: cs = 9; goto _test_eof;
- _test_eof10: cs = 10; goto _test_eof;
- _test_eof11: cs = 11; goto _test_eof;
- _test_eof12: cs = 12; goto _test_eof;
- _test_eof13: cs = 13; goto _test_eof;
- _test_eof14: cs = 14; goto _test_eof;
- _test_eof15: cs = 15; goto _test_eof;
- _test_eof16: cs = 16; goto _test_eof;
- _test_eof17: cs = 17; goto _test_eof;
- _test_eof18: cs = 18; goto _test_eof;
- _test_eof19: cs = 19; goto _test_eof;
- _test_eof20: cs = 20; goto _test_eof;
- _test_eof21: cs = 21; goto _test_eof;
- _test_eof22: cs = 22; goto _test_eof;
- _test_eof23: cs = 23; goto _test_eof;
- _test_eof24: cs = 24; goto _test_eof;
- _test_eof25: cs = 25; goto _test_eof;
- _test_eof26: cs = 26; goto _test_eof;
- _test_eof27: cs = 27; goto _test_eof;
- _test_eof28: cs = 28; goto _test_eof;
-
- _test_eof: {}
- _out: {}
+ st_case_28:
+ if ( ( (*( p))) == 101 ) {
+ goto ctr37;
+ }
+ {
+ goto st0;
+ }
+ st_out:
+ _test_eof1: cs = 1; goto _test_eof;
+ _test_eof29: cs = 29; goto _test_eof;
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof9: cs = 9; goto _test_eof;
+ _test_eof10: cs = 10; goto _test_eof;
+ _test_eof11: cs = 11; goto _test_eof;
+ _test_eof12: cs = 12; goto _test_eof;
+ _test_eof13: cs = 13; goto _test_eof;
+ _test_eof14: cs = 14; goto _test_eof;
+ _test_eof15: cs = 15; goto _test_eof;
+ _test_eof16: cs = 16; goto _test_eof;
+ _test_eof17: cs = 17; goto _test_eof;
+ _test_eof18: cs = 18; goto _test_eof;
+ _test_eof19: cs = 19; goto _test_eof;
+ _test_eof20: cs = 20; goto _test_eof;
+ _test_eof21: cs = 21; goto _test_eof;
+ _test_eof22: cs = 22; goto _test_eof;
+ _test_eof23: cs = 23; goto _test_eof;
+ _test_eof24: cs = 24; goto _test_eof;
+ _test_eof25: cs = 25; goto _test_eof;
+ _test_eof26: cs = 26; goto _test_eof;
+ _test_eof27: cs = 27; goto _test_eof;
+ _test_eof28: cs = 28; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 291 "parser.rl"
+
+
+ if (json->freeze) {
+ OBJ_FREEZE(*result);
+ }
+
+ if (cs >= JSON_value_first_final) {
+ return p;
+ } else {
+ return NULL;
}
-
-#line 291 "parser.rl"
-
- if (cs >= JSON_value_first_final) {
- return p;
- } else {
- return NULL;
- }
}
-#line 880 "parser.c"
enum {JSON_integer_start = 1};
enum {JSON_integer_first_final = 3};
enum {JSON_integer_error = 0};
enum {JSON_integer_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_integer_nfa_targs)[] = {
+ 0, 0
+};
-#line 307 "parser.rl"
+static const char MAYBE_UNUSED(_JSON_integer_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_integer_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_integer_nfa_pop_trans)[] = {
+ 0, 0
+};
+
+
+#line 311 "parser.rl"
static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result)
{
- int cs = EVIL;
+ int cs = EVIL;
-#line 896 "parser.c"
{
- cs = JSON_integer_start;
+ cs = (int)JSON_integer_start;
}
-#line 314 "parser.rl"
- json->memo = p;
+ #line 318 "parser.rl"
+
+ json->memo = p;
-#line 904 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-case 1:
- switch( (*p) ) {
- case 45: goto st2;
- case 48: goto st3;
- }
- if ( 49 <= (*p) && (*p) <= 57 )
- goto st5;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-st2:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ }
+ goto st_out;
+ st_case_1:
+ switch( ( (*( p))) ) {
+ case 45: {
+ goto st2;
+ }
+ case 48: {
+ goto st3;
+ }
+ }
+ if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st5;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- if ( (*p) == 48 )
- goto st3;
- if ( 49 <= (*p) && (*p) <= 57 )
- goto st5;
- goto st0;
-st3:
- if ( ++p == pe )
+ st_case_2:
+ if ( ( (*( p))) == 48 ) {
+ goto st3;
+ }
+ if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st5;
+ }
+ {
+ goto st0;
+ }
+ st3:
+ p+= 1;
+ if ( p == pe )
goto _test_eof3;
-case 3:
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st0;
- goto tr4;
-tr4:
-#line 304 "parser.rl"
- { p--; {p++; cs = 4; goto _out;} }
- goto st4;
-st4:
- if ( ++p == pe )
+ st_case_3:
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st0;
+ }
+ {
+ goto ctr4;
+ }
+ ctr4:
+ {
+ #line 308 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 4; goto _out;} }
+
+ goto st4;
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
-#line 945 "parser.c"
- goto st0;
-st5:
- if ( ++p == pe )
+ st_case_4:
+ {
+ goto st0;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st5;
- goto tr4;
- }
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
+ st_case_5:
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st5;
+ }
+ {
+ goto ctr4;
+ }
+ st_out:
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
- _test_eof: {}
- _out: {}
+ _test_eof: {}
+ _out: {}
}
-#line 316 "parser.rl"
-
- if (cs >= JSON_integer_first_final) {
- long len = p - json->memo;
- fbuffer_clear(json->fbuffer);
- fbuffer_append(json->fbuffer, json->memo, len);
- fbuffer_append_char(json->fbuffer, '\0');
- *result = rb_cstr2inum(FBUFFER_PTR(json->fbuffer), 10);
- return p + 1;
- } else {
- return NULL;
- }
+ #line 320 "parser.rl"
+
+
+ if (cs >= JSON_integer_first_final) {
+ long len = p - json->memo;
+ fbuffer_clear(json->fbuffer);
+ fbuffer_append(json->fbuffer, json->memo, len);
+ fbuffer_append_char(json->fbuffer, '\0');
+ *result = rb_cstr2inum(FBUFFER_PTR(json->fbuffer), 10);
+ return p + 1;
+ } else {
+ return NULL;
+ }
}
-#line 979 "parser.c"
enum {JSON_float_start = 1};
enum {JSON_float_first_final = 8};
enum {JSON_float_error = 0};
enum {JSON_float_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_float_nfa_targs)[] = {
+ 0, 0
+};
-#line 341 "parser.rl"
+static const char MAYBE_UNUSED(_JSON_float_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+static const char MAYBE_UNUSED(_JSON_float_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_float_nfa_pop_trans)[] = {
+ 0, 0
+};
+
+
+#line 345 "parser.rl"
-static int is_bigdecimal_class(VALUE obj)
-{
- if (cBigDecimal == Qundef) {
- if (rb_const_defined(rb_cObject, i_BigDecimal)) {
- cBigDecimal = rb_const_get_at(rb_cObject, i_BigDecimal);
- }
- else {
- return 0;
- }
- }
- return obj == cBigDecimal;
-}
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
{
- int cs = EVIL;
+ int cs = EVIL;
-#line 1008 "parser.c"
{
- cs = JSON_float_start;
+ cs = (int)JSON_float_start;
}
-#line 361 "parser.rl"
- json->memo = p;
+ #line 352 "parser.rl"
+
+ json->memo = p;
-#line 1016 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-case 1:
- switch( (*p) ) {
- case 45: goto st2;
- case 48: goto st3;
- }
- if ( 49 <= (*p) && (*p) <= 57 )
- goto st7;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-st2:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 8:
+ goto st_case_8;
+ case 9:
+ goto st_case_9;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 10:
+ goto st_case_10;
+ case 7:
+ goto st_case_7;
+ }
+ goto st_out;
+ st_case_1:
+ switch( ( (*( p))) ) {
+ case 45: {
+ goto st2;
+ }
+ case 48: {
+ goto st3;
+ }
+ }
+ if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st7;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- if ( (*p) == 48 )
- goto st3;
- if ( 49 <= (*p) && (*p) <= 57 )
- goto st7;
- goto st0;
-st3:
- if ( ++p == pe )
+ st_case_2:
+ if ( ( (*( p))) == 48 ) {
+ goto st3;
+ }
+ if ( 49 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st7;
+ }
+ {
+ goto st0;
+ }
+ st3:
+ p+= 1;
+ if ( p == pe )
goto _test_eof3;
-case 3:
- switch( (*p) ) {
- case 46: goto st4;
- case 69: goto st5;
- case 101: goto st5;
- }
- goto st0;
-st4:
- if ( ++p == pe )
+ st_case_3:
+ switch( ( (*( p))) ) {
+ case 46: {
+ goto st4;
+ }
+ case 69: {
+ goto st5;
+ }
+ case 101: {
+ goto st5;
+ }
+ }
+ {
+ goto st0;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st8;
- goto st0;
-st8:
- if ( ++p == pe )
- goto _test_eof8;
-case 8:
- switch( (*p) ) {
- case 69: goto st5;
- case 101: goto st5;
- }
- if ( (*p) > 46 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
+ st_case_4:
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto st8;
- } else if ( (*p) >= 45 )
- goto st0;
- goto tr9;
-tr9:
-#line 335 "parser.rl"
- { p--; {p++; cs = 9; goto _out;} }
- goto st9;
-st9:
- if ( ++p == pe )
+ }
+ {
+ goto st0;
+ }
+ st8:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof8;
+ st_case_8:
+ switch( ( (*( p))) ) {
+ case 69: {
+ goto st5;
+ }
+ case 101: {
+ goto st5;
+ }
+ }
+ if ( ( (*( p))) > 46 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st8;
+ }
+ } else if ( ( (*( p))) >= 45 ) {
+ goto st0;
+ }
+ {
+ goto ctr9;
+ }
+ ctr9:
+ {
+ #line 339 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 9; goto _out;} }
+
+ goto st9;
+ st9:
+ p+= 1;
+ if ( p == pe )
goto _test_eof9;
-case 9:
-#line 1081 "parser.c"
- goto st0;
-st5:
- if ( ++p == pe )
+ st_case_9:
+ {
+ goto st0;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- switch( (*p) ) {
- case 43: goto st6;
- case 45: goto st6;
- }
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st10;
- goto st0;
-st6:
- if ( ++p == pe )
+ st_case_5:
+ switch( ( (*( p))) ) {
+ case 43: {
+ goto st6;
+ }
+ case 45: {
+ goto st6;
+ }
+ }
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st10;
+ }
+ {
+ goto st0;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st10;
- goto st0;
-st10:
- if ( ++p == pe )
- goto _test_eof10;
-case 10:
- switch( (*p) ) {
- case 69: goto st0;
- case 101: goto st0;
- }
- if ( (*p) > 46 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
+ st_case_6:
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
goto st10;
- } else if ( (*p) >= 45 )
- goto st0;
- goto tr9;
-st7:
- if ( ++p == pe )
+ }
+ {
+ goto st0;
+ }
+ st10:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof10;
+ st_case_10:
+ switch( ( (*( p))) ) {
+ case 69: {
+ goto st0;
+ }
+ case 101: {
+ goto st0;
+ }
+ }
+ if ( ( (*( p))) > 46 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st10;
+ }
+ } else if ( ( (*( p))) >= 45 ) {
+ goto st0;
+ }
+ {
+ goto ctr9;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- switch( (*p) ) {
- case 46: goto st4;
- case 69: goto st5;
- case 101: goto st5;
- }
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st7;
- goto st0;
- }
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof9: cs = 9; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof10: cs = 10; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
-
- _test_eof: {}
- _out: {}
+ st_case_7:
+ switch( ( (*( p))) ) {
+ case 46: {
+ goto st4;
+ }
+ case 69: {
+ goto st5;
+ }
+ case 101: {
+ goto st5;
+ }
+ }
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st7;
+ }
+ {
+ goto st0;
+ }
+ st_out:
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof9: cs = 9; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof10: cs = 10; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 354 "parser.rl"
+
+
+ if (cs >= JSON_float_first_final) {
+ VALUE mod = Qnil;
+ ID method_id = 0;
+ if (rb_respond_to(json->decimal_class, i_try_convert)) {
+ mod = json->decimal_class;
+ method_id = i_try_convert;
+ } else if (rb_respond_to(json->decimal_class, i_new)) {
+ mod = json->decimal_class;
+ method_id = i_new;
+ } else if (RB_TYPE_P(json->decimal_class, T_CLASS)) {
+ VALUE name = rb_class_name(json->decimal_class);
+ const char *name_cstr = RSTRING_PTR(name);
+ const char *last_colon = strrchr(name_cstr, ':');
+ if (last_colon) {
+ const char *mod_path_end = last_colon - 1;
+ VALUE mod_path = rb_str_substr(name, 0, mod_path_end - name_cstr);
+ mod = rb_path_to_class(mod_path);
+
+ const char *method_name_beg = last_colon + 1;
+ long before_len = method_name_beg - name_cstr;
+ long len = RSTRING_LEN(name) - before_len;
+ VALUE method_name = rb_str_substr(name, before_len, len);
+ method_id = SYM2ID(rb_str_intern(method_name));
+ } else {
+ mod = rb_mKernel;
+ method_id = SYM2ID(rb_str_intern(name));
+ }
+ }
+
+ long len = p - json->memo;
+ fbuffer_clear(json->fbuffer);
+ fbuffer_append(json->fbuffer, json->memo, len);
+ fbuffer_append_char(json->fbuffer, '\0');
+
+ if (method_id) {
+ VALUE text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
+ *result = rb_funcallv(mod, method_id, 1, &text);
+ } else {
+ *result = DBL2NUM(rb_cstr_to_dbl(FBUFFER_PTR(json->fbuffer), 1));
+ }
+
+ return p + 1;
+ } else {
+ return NULL;
}
-
-#line 363 "parser.rl"
-
- if (cs >= JSON_float_first_final) {
- long len = p - json->memo;
- fbuffer_clear(json->fbuffer);
- fbuffer_append(json->fbuffer, json->memo, len);
- fbuffer_append_char(json->fbuffer, '\0');
- if (NIL_P(json->decimal_class)) {
- *result = rb_float_new(rb_cstr_to_dbl(FBUFFER_PTR(json->fbuffer), 1));
- } else {
- VALUE text;
- text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
- if (is_bigdecimal_class(json->decimal_class)) {
- *result = rb_funcall(Qnil, i_BigDecimal, 1, text);
- } else {
- *result = rb_funcall(json->decimal_class, i_new, 1, text);
- }
- }
- return p + 1;
- } else {
- return NULL;
- }
}
-#line 1168 "parser.c"
enum {JSON_array_start = 1};
enum {JSON_array_first_final = 17};
enum {JSON_array_error = 0};
enum {JSON_array_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_array_nfa_targs)[] = {
+ 0, 0
+};
-#line 416 "parser.rl"
+static const char MAYBE_UNUSED(_JSON_array_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_array_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_array_nfa_pop_trans)[] = {
+ 0, 0
+};
+
+
+#line 432 "parser.rl"
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
{
- int cs = EVIL;
- VALUE array_class = json->array_class;
+ int cs = EVIL;
+ VALUE array_class = json->array_class;
- if (json->max_nesting && current_nesting > json->max_nesting) {
- rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
- }
- *result = NIL_P(array_class) ? rb_ary_new() : rb_class_new_instance(0, 0, array_class);
+ if (json->max_nesting && current_nesting > json->max_nesting) {
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
+ }
+ *result = NIL_P(array_class) ? rb_ary_new() : rb_class_new_instance(0, 0, array_class);
-#line 1190 "parser.c"
{
- cs = JSON_array_start;
+ cs = (int)JSON_array_start;
}
-#line 429 "parser.rl"
+ #line 445 "parser.rl"
+
-#line 1197 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-case 1:
- if ( (*p) == 91 )
- goto st2;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-st2:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 7:
+ goto st_case_7;
+ case 8:
+ goto st_case_8;
+ case 9:
+ goto st_case_9;
+ case 10:
+ goto st_case_10;
+ case 11:
+ goto st_case_11;
+ case 12:
+ goto st_case_12;
+ case 17:
+ goto st_case_17;
+ case 13:
+ goto st_case_13;
+ case 14:
+ goto st_case_14;
+ case 15:
+ goto st_case_15;
+ case 16:
+ goto st_case_16;
+ }
+ goto st_out;
+ st_case_1:
+ if ( ( (*( p))) == 91 ) {
+ goto st2;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- switch( (*p) ) {
- case 13: goto st2;
- case 32: goto st2;
- case 34: goto tr2;
- case 45: goto tr2;
- case 47: goto st13;
- case 73: goto tr2;
- case 78: goto tr2;
- case 91: goto tr2;
- case 93: goto tr4;
- case 102: goto tr2;
- case 110: goto tr2;
- case 116: goto tr2;
- case 123: goto tr2;
- }
- if ( (*p) > 10 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto tr2;
- } else if ( (*p) >= 9 )
- goto st2;
- goto st0;
-tr2:
-#line 393 "parser.rl"
- {
- VALUE v = Qnil;
- char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
- if (np == NULL) {
- p--; {p++; cs = 3; goto _out;}
- } else {
- if (NIL_P(json->array_class)) {
- rb_ary_push(*result, v);
- } else {
- rb_funcall(*result, i_leftshift, 1, v);
- }
- {p = (( np))-1;}
- }
- }
- goto st3;
-st3:
- if ( ++p == pe )
- goto _test_eof3;
-case 3:
-#line 1256 "parser.c"
- switch( (*p) ) {
- case 13: goto st3;
- case 32: goto st3;
- case 44: goto st4;
- case 47: goto st9;
- case 93: goto tr4;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
+ st_case_2:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st2;
+ }
+ case 32: {
+ goto st2;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 45: {
+ goto ctr2;
+ }
+ case 47: {
+ goto st13;
+ }
+ case 73: {
+ goto ctr2;
+ }
+ case 78: {
+ goto ctr2;
+ }
+ case 91: {
+ goto ctr2;
+ }
+ case 93: {
+ goto ctr4;
+ }
+ case 102: {
+ goto ctr2;
+ }
+ case 110: {
+ goto ctr2;
+ }
+ case 116: {
+ goto ctr2;
+ }
+ case 123: {
+ goto ctr2;
+ }
+ }
+ if ( ( (*( p))) > 10 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto ctr2;
+ }
+ } else if ( ( (*( p))) >= 9 ) {
+ goto st2;
+ }
+ {
+ goto st0;
+ }
+ ctr2:
+ {
+ #line 409 "parser.rl"
+
+ VALUE v = Qnil;
+ char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
+ if (np == NULL) {
+ {p = p - 1; } {p+= 1; cs = 3; goto _out;}
+ } else {
+ if (NIL_P(json->array_class)) {
+ rb_ary_push(*result, v);
+ } else {
+ rb_funcall(*result, i_leftshift, 1, v);
+ }
+ {p = (( np))-1;}
+
+ }
+ }
+
goto st3;
- goto st0;
-st4:
- if ( ++p == pe )
+ st3:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof3;
+ st_case_3:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st3;
+ }
+ case 32: {
+ goto st3;
+ }
+ case 44: {
+ goto st4;
+ }
+ case 47: {
+ goto st9;
+ }
+ case 93: {
+ goto ctr4;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st3;
+ }
+ {
+ goto st0;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- switch( (*p) ) {
- case 13: goto st4;
- case 32: goto st4;
- case 34: goto tr2;
- case 45: goto tr2;
- case 47: goto st5;
- case 73: goto tr2;
- case 78: goto tr2;
- case 91: goto tr2;
- case 102: goto tr2;
- case 110: goto tr2;
- case 116: goto tr2;
- case 123: goto tr2;
- }
- if ( (*p) > 10 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto tr2;
- } else if ( (*p) >= 9 )
- goto st4;
- goto st0;
-st5:
- if ( ++p == pe )
+ st_case_4:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st4;
+ }
+ case 32: {
+ goto st4;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 45: {
+ goto ctr2;
+ }
+ case 47: {
+ goto st5;
+ }
+ case 73: {
+ goto ctr2;
+ }
+ case 78: {
+ goto ctr2;
+ }
+ case 91: {
+ goto ctr2;
+ }
+ case 102: {
+ goto ctr2;
+ }
+ case 110: {
+ goto ctr2;
+ }
+ case 116: {
+ goto ctr2;
+ }
+ case 123: {
+ goto ctr2;
+ }
+ }
+ if ( ( (*( p))) > 10 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto ctr2;
+ }
+ } else if ( ( (*( p))) >= 9 ) {
+ goto st4;
+ }
+ {
+ goto st0;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- switch( (*p) ) {
- case 42: goto st6;
- case 47: goto st8;
- }
- goto st0;
-st6:
- if ( ++p == pe )
+ st_case_5:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st6;
+ }
+ case 47: {
+ goto st8;
+ }
+ }
+ {
+ goto st0;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- if ( (*p) == 42 )
- goto st7;
- goto st6;
-st7:
- if ( ++p == pe )
+ st_case_6:
+ if ( ( (*( p))) == 42 ) {
+ goto st7;
+ }
+ {
+ goto st6;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- switch( (*p) ) {
- case 42: goto st7;
- case 47: goto st4;
- }
- goto st6;
-st8:
- if ( ++p == pe )
+ st_case_7:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st7;
+ }
+ case 47: {
+ goto st4;
+ }
+ }
+ {
+ goto st6;
+ }
+ st8:
+ p+= 1;
+ if ( p == pe )
goto _test_eof8;
-case 8:
- if ( (*p) == 10 )
- goto st4;
- goto st8;
-st9:
- if ( ++p == pe )
+ st_case_8:
+ if ( ( (*( p))) == 10 ) {
+ goto st4;
+ }
+ {
+ goto st8;
+ }
+ st9:
+ p+= 1;
+ if ( p == pe )
goto _test_eof9;
-case 9:
- switch( (*p) ) {
- case 42: goto st10;
- case 47: goto st12;
- }
- goto st0;
-st10:
- if ( ++p == pe )
+ st_case_9:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st10;
+ }
+ case 47: {
+ goto st12;
+ }
+ }
+ {
+ goto st0;
+ }
+ st10:
+ p+= 1;
+ if ( p == pe )
goto _test_eof10;
-case 10:
- if ( (*p) == 42 )
- goto st11;
- goto st10;
-st11:
- if ( ++p == pe )
+ st_case_10:
+ if ( ( (*( p))) == 42 ) {
+ goto st11;
+ }
+ {
+ goto st10;
+ }
+ st11:
+ p+= 1;
+ if ( p == pe )
goto _test_eof11;
-case 11:
- switch( (*p) ) {
- case 42: goto st11;
- case 47: goto st3;
- }
- goto st10;
-st12:
- if ( ++p == pe )
+ st_case_11:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st11;
+ }
+ case 47: {
+ goto st3;
+ }
+ }
+ {
+ goto st10;
+ }
+ st12:
+ p+= 1;
+ if ( p == pe )
goto _test_eof12;
-case 12:
- if ( (*p) == 10 )
- goto st3;
- goto st12;
-tr4:
-#line 408 "parser.rl"
- { p--; {p++; cs = 17; goto _out;} }
- goto st17;
-st17:
- if ( ++p == pe )
+ st_case_12:
+ if ( ( (*( p))) == 10 ) {
+ goto st3;
+ }
+ {
+ goto st12;
+ }
+ ctr4:
+ {
+ #line 424 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 17; goto _out;} }
+
+ goto st17;
+ st17:
+ p+= 1;
+ if ( p == pe )
goto _test_eof17;
-case 17:
-#line 1363 "parser.c"
- goto st0;
-st13:
- if ( ++p == pe )
+ st_case_17:
+ {
+ goto st0;
+ }
+ st13:
+ p+= 1;
+ if ( p == pe )
goto _test_eof13;
-case 13:
- switch( (*p) ) {
- case 42: goto st14;
- case 47: goto st16;
- }
- goto st0;
-st14:
- if ( ++p == pe )
+ st_case_13:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st14;
+ }
+ case 47: {
+ goto st16;
+ }
+ }
+ {
+ goto st0;
+ }
+ st14:
+ p+= 1;
+ if ( p == pe )
goto _test_eof14;
-case 14:
- if ( (*p) == 42 )
- goto st15;
- goto st14;
-st15:
- if ( ++p == pe )
+ st_case_14:
+ if ( ( (*( p))) == 42 ) {
+ goto st15;
+ }
+ {
+ goto st14;
+ }
+ st15:
+ p+= 1;
+ if ( p == pe )
goto _test_eof15;
-case 15:
- switch( (*p) ) {
- case 42: goto st15;
- case 47: goto st2;
- }
- goto st14;
-st16:
- if ( ++p == pe )
+ st_case_15:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st15;
+ }
+ case 47: {
+ goto st2;
+ }
+ }
+ {
+ goto st14;
+ }
+ st16:
+ p+= 1;
+ if ( p == pe )
goto _test_eof16;
-case 16:
- if ( (*p) == 10 )
- goto st2;
- goto st16;
- }
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof9: cs = 9; goto _test_eof;
- _test_eof10: cs = 10; goto _test_eof;
- _test_eof11: cs = 11; goto _test_eof;
- _test_eof12: cs = 12; goto _test_eof;
- _test_eof17: cs = 17; goto _test_eof;
- _test_eof13: cs = 13; goto _test_eof;
- _test_eof14: cs = 14; goto _test_eof;
- _test_eof15: cs = 15; goto _test_eof;
- _test_eof16: cs = 16; goto _test_eof;
-
- _test_eof: {}
- _out: {}
+ st_case_16:
+ if ( ( (*( p))) == 10 ) {
+ goto st2;
+ }
+ {
+ goto st16;
+ }
+ st_out:
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof9: cs = 9; goto _test_eof;
+ _test_eof10: cs = 10; goto _test_eof;
+ _test_eof11: cs = 11; goto _test_eof;
+ _test_eof12: cs = 12; goto _test_eof;
+ _test_eof17: cs = 17; goto _test_eof;
+ _test_eof13: cs = 13; goto _test_eof;
+ _test_eof14: cs = 14; goto _test_eof;
+ _test_eof15: cs = 15; goto _test_eof;
+ _test_eof16: cs = 16; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 446 "parser.rl"
+
+
+ if(cs >= JSON_array_first_final) {
+ return p + 1;
+ } else {
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
+ return NULL;
}
-
-#line 430 "parser.rl"
-
- if(cs >= JSON_array_first_final) {
- return p + 1;
- } else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
- return NULL;
- }
}
-static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
+static const size_t MAX_STACK_BUFFER_SIZE = 128;
+static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int symbolize)
{
- char *p = string, *pe = string, *unescape;
- int unescape_len;
- char buf[4];
-
- while (pe < stringEnd) {
- if (*pe == '\\') {
- unescape = (char *) "?";
- unescape_len = 1;
- if (pe > p) rb_str_buf_cat(result, p, pe - p);
- switch (*++pe) {
- case 'n':
- unescape = (char *) "\n";
- break;
- case 'r':
- unescape = (char *) "\r";
- break;
- case 't':
- unescape = (char *) "\t";
- break;
- case '"':
- unescape = (char *) "\"";
- break;
- case '\\':
- unescape = (char *) "\\";
- break;
- case 'b':
- unescape = (char *) "\b";
- break;
- case 'f':
- unescape = (char *) "\f";
- break;
- case 'u':
- if (pe > stringEnd - 4) {
- rb_enc_raise(
- EXC_ENCODING eParserError,
- "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p
- );
- } else {
- UTF32 ch = unescape_unicode((unsigned char *) ++pe);
- pe += 3;
- if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
- pe++;
- if (pe > stringEnd - 6) {
- rb_enc_raise(
- EXC_ENCODING eParserError,
- "%u: incomplete surrogate pair at '%s'", __LINE__, p
- );
- }
- if (pe[0] == '\\' && pe[1] == 'u') {
- UTF32 sur = unescape_unicode((unsigned char *) pe + 2);
- ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
- | (sur & 0x3FF));
- pe += 5;
- } else {
- unescape = (char *) "?";
- break;
- }
- }
- unescape_len = convert_UTF32_to_UTF8(buf, ch);
- unescape = buf;
- }
- break;
- default:
- p = pe;
- continue;
- }
- rb_str_buf_cat(result, unescape, unescape_len);
- p = ++pe;
- } else {
- pe++;
- }
- }
- rb_str_buf_cat(result, p, pe - p);
- return result;
+ VALUE result = Qnil;
+ size_t bufferSize = stringEnd - string;
+ char *p = string, *pe = string, *unescape, *bufferStart, *buffer;
+ int unescape_len;
+ char buf[4];
+
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+# ifdef HAVE_RB_ENC_INTERNED_STR
+ bufferStart = buffer = ALLOC_N(char, bufferSize ? bufferSize : 1);
+# else
+ bufferStart = buffer = ALLOC_N(char, bufferSize);
+# endif
+ } else {
+# ifdef HAVE_RB_ENC_INTERNED_STR
+ bufferStart = buffer = ALLOCA_N(char, bufferSize ? bufferSize : 1);
+# else
+ bufferStart = buffer = ALLOCA_N(char, bufferSize);
+# endif
+ }
+
+ while (pe < stringEnd) {
+ if (*pe == '\\') {
+ unescape = (char *) "?";
+ unescape_len = 1;
+ if (pe > p) {
+ MEMCPY(buffer, p, char, pe - p);
+ buffer += pe - p;
+ }
+ switch (*++pe) {
+ case 'n':
+ unescape = (char *) "\n";
+ break;
+ case 'r':
+ unescape = (char *) "\r";
+ break;
+ case 't':
+ unescape = (char *) "\t";
+ break;
+ case '"':
+ unescape = (char *) "\"";
+ break;
+ case '\\':
+ unescape = (char *) "\\";
+ break;
+ case 'b':
+ unescape = (char *) "\b";
+ break;
+ case 'f':
+ unescape = (char *) "\f";
+ break;
+ case 'u':
+ if (pe > stringEnd - 4) {
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+ rb_enc_raise(
+ EXC_ENCODING eParserError,
+ "incomplete unicode character escape sequence at '%s'", p
+ );
+ } else {
+ UTF32 ch = unescape_unicode((unsigned char *) ++pe);
+ pe += 3;
+ if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
+ pe++;
+ if (pe > stringEnd - 6) {
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+ rb_enc_raise(
+ EXC_ENCODING eParserError,
+ "incomplete surrogate pair at '%s'", p
+ );
+ }
+ if (pe[0] == '\\' && pe[1] == 'u') {
+ UTF32 sur = unescape_unicode((unsigned char *) pe + 2);
+ ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
+ | (sur & 0x3FF));
+ pe += 5;
+ } else {
+ unescape = (char *) "?";
+ break;
+ }
+ }
+ unescape_len = convert_UTF32_to_UTF8(buf, ch);
+ unescape = buf;
+ }
+ break;
+ default:
+ p = pe;
+ continue;
+ }
+ MEMCPY(buffer, unescape, char, unescape_len);
+ buffer += unescape_len;
+ p = ++pe;
+ } else {
+ pe++;
+ }
+ }
+
+ if (pe > p) {
+ MEMCPY(buffer, p, char, pe - p);
+ buffer += pe - p;
+ }
+
+ # ifdef HAVE_RB_ENC_INTERNED_STR
+ if (intern) {
+ result = rb_enc_interned_str(bufferStart, (long)(buffer - bufferStart), rb_utf8_encoding());
+ } else {
+ result = rb_utf8_str_new(bufferStart, (long)(buffer - bufferStart));
+ }
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+ # else
+ result = rb_utf8_str_new(bufferStart, (long)(buffer - bufferStart));
+
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+
+ if (intern) {
+ # if STR_UMINUS_DEDUPE_FROZEN
+ // Starting from MRI 2.8 it is preferable to freeze the string
+ // before deduplication so that it can be interned directly
+ // otherwise it would be duplicated first which is wasteful.
+ result = rb_funcall(rb_str_freeze(result), i_uminus, 0);
+ # elif STR_UMINUS_DEDUPE
+ // MRI 2.5 and older do not deduplicate strings that are already
+ // frozen.
+ result = rb_funcall(result, i_uminus, 0);
+ # else
+ result = rb_str_freeze(result);
+ # endif
+ }
+ # endif
+
+ if (symbolize) {
+ result = rb_str_intern(result);
+ }
+
+ return result;
}
-#line 1508 "parser.c"
enum {JSON_string_start = 1};
enum {JSON_string_first_final = 8};
enum {JSON_string_error = 0};
enum {JSON_string_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_string_nfa_targs)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_string_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_string_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_string_nfa_pop_trans)[] = {
+ 0, 0
+};
-#line 537 "parser.rl"
+
+#line 612 "parser.rl"
static int
match_i(VALUE regexp, VALUE klass, VALUE memo)
{
- if (regexp == Qundef) return ST_STOP;
- if (RTEST(rb_funcall(klass, i_json_creatable_p, 0)) &&
- RTEST(rb_funcall(regexp, i_match, 1, rb_ary_entry(memo, 0)))) {
- rb_ary_push(memo, klass);
- return ST_STOP;
- }
- return ST_CONTINUE;
+ if (regexp == Qundef) return ST_STOP;
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0)) &&
+ RTEST(rb_funcall(regexp, i_match, 1, rb_ary_entry(memo, 0)))) {
+ rb_ary_push(memo, klass);
+ return ST_STOP;
+ }
+ return ST_CONTINUE;
}
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result)
{
- int cs = EVIL;
- VALUE match_string;
+ int cs = EVIL;
+ VALUE match_string;
- *result = rb_str_buf_new(0);
-#line 1538 "parser.c"
{
- cs = JSON_string_start;
+ cs = (int)JSON_string_start;
}
-#line 558 "parser.rl"
- json->memo = p;
+ #line 632 "parser.rl"
+
+ json->memo = p;
-#line 1546 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-case 1:
- if ( (*p) == 34 )
- goto st2;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-st2:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 2:
+ goto st_case_2;
+ case 8:
+ goto st_case_8;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 7:
+ goto st_case_7;
+ }
+ goto st_out;
+ st_case_1:
+ if ( ( (*( p))) == 34 ) {
+ goto st2;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- switch( (*p) ) {
- case 34: goto tr2;
- case 92: goto st3;
- }
- if ( 0 <= (*p) && (*p) <= 31 )
- goto st0;
- goto st2;
-tr2:
-#line 523 "parser.rl"
- {
- *result = json_string_unescape(*result, json->memo + 1, p);
- if (NIL_P(*result)) {
- p--;
- {p++; cs = 8; goto _out;}
- } else {
- FORCE_UTF8(*result);
- {p = (( p + 1))-1;}
- }
- }
-#line 534 "parser.rl"
- { p--; {p++; cs = 8; goto _out;} }
- goto st8;
-st8:
- if ( ++p == pe )
+ st_case_2:
+ switch( ( (*( p))) ) {
+ case 34: {
+ goto ctr2;
+ }
+ case 92: {
+ goto st3;
+ }
+ }
+ if ( 0 <= (signed char)(*(p)) && (*(p)) <= 31 ) {
+ goto st0;
+ }
+ {
+ goto st2;
+ }
+ ctr2:
+ {
+ #line 599 "parser.rl"
+
+ *result = json_string_unescape(json->memo + 1, p, json->parsing_name || json-> freeze, json->parsing_name && json->symbolize_names);
+ if (NIL_P(*result)) {
+ {p = p - 1; }
+ {p+= 1; cs = 8; goto _out;}
+ } else {
+ {p = (( p + 1))-1;}
+
+ }
+ }
+ {
+ #line 609 "parser.rl"
+ {p = p - 1; } {p+= 1; cs = 8; goto _out;} }
+
+ goto st8;
+ st8:
+ p+= 1;
+ if ( p == pe )
goto _test_eof8;
-case 8:
-#line 1589 "parser.c"
- goto st0;
-st3:
- if ( ++p == pe )
+ st_case_8:
+ {
+ goto st0;
+ }
+ st3:
+ p+= 1;
+ if ( p == pe )
goto _test_eof3;
-case 3:
- if ( (*p) == 117 )
- goto st4;
- if ( 0 <= (*p) && (*p) <= 31 )
- goto st0;
- goto st2;
-st4:
- if ( ++p == pe )
+ st_case_3:
+ if ( ( (*( p))) == 117 ) {
+ goto st4;
+ }
+ if ( 0 <= (signed char)(*(p)) && (*(p)) <= 31 ) {
+ goto st0;
+ }
+ {
+ goto st2;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- if ( (*p) < 65 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st5;
- } else if ( (*p) > 70 ) {
- if ( 97 <= (*p) && (*p) <= 102 )
+ st_case_4:
+ if ( ( (*( p))) < 65 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st5;
+ }
+ } else if ( ( (*( p))) > 70 ) {
+ if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
+ goto st5;
+ }
+ } else {
goto st5;
- } else
- goto st5;
- goto st0;
-st5:
- if ( ++p == pe )
+ }
+ {
+ goto st0;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- if ( (*p) < 65 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
+ st_case_5:
+ if ( ( (*( p))) < 65 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st6;
+ }
+ } else if ( ( (*( p))) > 70 ) {
+ if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
+ goto st6;
+ }
+ } else {
goto st6;
- } else if ( (*p) > 70 ) {
- if ( 97 <= (*p) && (*p) <= 102 )
- goto st6;
- } else
- goto st6;
- goto st0;
-st6:
- if ( ++p == pe )
+ }
+ {
+ goto st0;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- if ( (*p) < 65 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto st7;
- } else if ( (*p) > 70 ) {
- if ( 97 <= (*p) && (*p) <= 102 )
+ st_case_6:
+ if ( ( (*( p))) < 65 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st7;
+ }
+ } else if ( ( (*( p))) > 70 ) {
+ if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
+ goto st7;
+ }
+ } else {
goto st7;
- } else
- goto st7;
- goto st0;
-st7:
- if ( ++p == pe )
+ }
+ {
+ goto st0;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- if ( (*p) < 65 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
+ st_case_7:
+ if ( ( (*( p))) < 65 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto st2;
+ }
+ } else if ( ( (*( p))) > 70 ) {
+ if ( 97 <= ( (*( p))) && ( (*( p))) <= 102 ) {
+ goto st2;
+ }
+ } else {
goto st2;
- } else if ( (*p) > 70 ) {
- if ( 97 <= (*p) && (*p) <= 102 )
- goto st2;
- } else
- goto st2;
- goto st0;
- }
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
-
- _test_eof: {}
- _out: {}
+ }
+ {
+ goto st0;
+ }
+ st_out:
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 634 "parser.rl"
+
+
+ if (json->create_additions && RTEST(match_string = json->match_string)) {
+ VALUE klass;
+ VALUE memo = rb_ary_new2(2);
+ rb_ary_push(memo, *result);
+ rb_hash_foreach(match_string, match_i, memo);
+ klass = rb_ary_entry(memo, 1);
+ if (RTEST(klass)) {
+ *result = rb_funcall(klass, i_json_create, 1, *result);
+ }
+ }
+
+ if (cs >= JSON_string_first_final) {
+ return p + 1;
+ } else {
+ return NULL;
}
-
-#line 560 "parser.rl"
-
- if (json->create_additions && RTEST(match_string = json->match_string)) {
- VALUE klass;
- VALUE memo = rb_ary_new2(2);
- rb_ary_push(memo, *result);
- rb_hash_foreach(match_string, match_i, memo);
- klass = rb_ary_entry(memo, 1);
- if (RTEST(klass)) {
- *result = rb_funcall(klass, i_json_create, 1, *result);
- }
- }
-
- if (json->symbolize_names && json->parsing_name) {
- *result = rb_str_intern(*result);
- } else if (RB_TYPE_P(*result, T_STRING)) {
- rb_str_resize(*result, RSTRING_LEN(*result));
- }
- if (cs >= JSON_string_first_final) {
- return p + 1;
- } else {
- return NULL;
- }
}
/*
- * Document-class: JSON::Ext::Parser
- *
- * This is the JSON parser implemented as a C extension. It can be configured
- * to be used by setting
- *
- * JSON.parser = JSON::Ext::Parser
- *
- * with the method parser= in JSON.
- *
- */
+* Document-class: JSON::Ext::Parser
+*
+* This is the JSON parser implemented as a C extension. It can be configured
+* to be used by setting
+*
+* JSON.parser = JSON::Ext::Parser
+*
+* with the method parser= in JSON.
+*
+*/
static VALUE convert_encoding(VALUE source)
{
-#ifdef HAVE_RUBY_ENCODING_H
- rb_encoding *enc = rb_enc_get(source);
- if (enc == rb_ascii8bit_encoding()) {
- if (OBJ_FROZEN(source)) {
- source = rb_str_dup(source);
- }
- FORCE_UTF8(source);
- } else {
- source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
- }
-#endif
- return source;
+ #ifdef HAVE_RUBY_ENCODING_H
+ rb_encoding *enc = rb_enc_get(source);
+ if (enc == rb_ascii8bit_encoding()) {
+ if (OBJ_FROZEN(source)) {
+ source = rb_str_dup(source);
+ }
+ FORCE_UTF8(source);
+ } else {
+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
+ }
+ #endif
+ return source;
}
/*
- * call-seq: new(source, opts => {})
- *
- * Creates a new JSON::Ext::Parser instance for the string _source_.
- *
- * Creates a new JSON::Ext::Parser instance for the string _source_.
- *
- * It will be configured by the _opts_ hash. _opts_ can have the following
- * keys:
- *
- * _opts_ can have the following keys:
- * * *max_nesting*: The maximum depth of nesting allowed in the parsed data
- * structures. Disable depth checking with :max_nesting => false|nil|0, it
- * defaults to 100.
- * * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
- * defiance of RFC 4627 to be parsed by the Parser. This option defaults to
- * false.
- * * *symbolize_names*: If set to true, returns symbols for the names
- * (keys) in a JSON object. Otherwise strings are returned, which is
- * also the default. It's not possible to use this option in
- * conjunction with the *create_additions* option.
- * * *create_additions*: If set to false, the Parser doesn't create
- * additions even if a matching class and create_id was found. This option
- * defaults to false.
- * * *object_class*: Defaults to Hash
- * * *array_class*: Defaults to Array
- */
+* call-seq: new(source, opts => {})
+*
+* Creates a new JSON::Ext::Parser instance for the string _source_.
+*
+* Creates a new JSON::Ext::Parser instance for the string _source_.
+*
+* It will be configured by the _opts_ hash. _opts_ can have the following
+* keys:
+*
+* _opts_ can have the following keys:
+* * *max_nesting*: The maximum depth of nesting allowed in the parsed data
+* structures. Disable depth checking with :max_nesting => false|nil|0, it
+* defaults to 100.
+* * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
+* defiance of RFC 4627 to be parsed by the Parser. This option defaults to
+* false.
+* * *symbolize_names*: If set to true, returns symbols for the names
+* (keys) in a JSON object. Otherwise strings are returned, which is
+* also the default. It's not possible to use this option in
+* conjunction with the *create_additions* option.
+* * *create_additions*: If set to false, the Parser doesn't create
+* additions even if a matching class and create_id was found. This option
+* defaults to false.
+* * *object_class*: Defaults to Hash
+* * *array_class*: Defaults to Array
+*/
static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
{
- VALUE source, opts;
- GET_PARSER_INIT;
-
- if (json->Vsource) {
- rb_raise(rb_eTypeError, "already initialized instance");
- }
-#ifdef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
- rb_scan_args(argc, argv, "1:", &source, &opts);
-#else
- rb_scan_args(argc, argv, "11", &source, &opts);
-#endif
- if (!NIL_P(opts)) {
-#ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
- opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash");
- if (NIL_P(opts)) {
- rb_raise(rb_eArgError, "opts needs to be like a hash");
- } else {
-#endif
- VALUE tmp = ID2SYM(i_max_nesting);
- if (option_given_p(opts, tmp)) {
- VALUE max_nesting = rb_hash_aref(opts, tmp);
- if (RTEST(max_nesting)) {
- Check_Type(max_nesting, T_FIXNUM);
- json->max_nesting = FIX2INT(max_nesting);
- } else {
- json->max_nesting = 0;
- }
- } else {
- json->max_nesting = 100;
- }
- tmp = ID2SYM(i_allow_nan);
- if (option_given_p(opts, tmp)) {
- json->allow_nan = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
- } else {
- json->allow_nan = 0;
- }
- tmp = ID2SYM(i_symbolize_names);
- if (option_given_p(opts, tmp)) {
- json->symbolize_names = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
- } else {
- json->symbolize_names = 0;
- }
- tmp = ID2SYM(i_create_additions);
- if (option_given_p(opts, tmp)) {
- json->create_additions = RTEST(rb_hash_aref(opts, tmp));
- } else {
- json->create_additions = 0;
- }
- if (json->symbolize_names && json->create_additions) {
- rb_raise(rb_eArgError,
- "options :symbolize_names and :create_additions cannot be "
- " used in conjunction");
- }
- tmp = ID2SYM(i_create_id);
- if (option_given_p(opts, tmp)) {
- json->create_id = rb_hash_aref(opts, tmp);
- } else {
- json->create_id = rb_funcall(mJSON, i_create_id, 0);
- }
- tmp = ID2SYM(i_object_class);
- if (option_given_p(opts, tmp)) {
- json->object_class = rb_hash_aref(opts, tmp);
- } else {
- json->object_class = Qnil;
- }
- tmp = ID2SYM(i_array_class);
- if (option_given_p(opts, tmp)) {
- json->array_class = rb_hash_aref(opts, tmp);
- } else {
- json->array_class = Qnil;
- }
- tmp = ID2SYM(i_decimal_class);
- if (option_given_p(opts, tmp)) {
- json->decimal_class = rb_hash_aref(opts, tmp);
- } else {
- json->decimal_class = Qnil;
- }
- tmp = ID2SYM(i_match_string);
- if (option_given_p(opts, tmp)) {
- VALUE match_string = rb_hash_aref(opts, tmp);
- json->match_string = RTEST(match_string) ? match_string : Qnil;
- } else {
- json->match_string = Qnil;
- }
-#ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
- }
-#endif
- } else {
- json->max_nesting = 100;
- json->allow_nan = 0;
- json->create_additions = 0;
- json->create_id = rb_funcall(mJSON, i_create_id, 0);
- json->object_class = Qnil;
- json->array_class = Qnil;
- json->decimal_class = Qnil;
- }
- source = convert_encoding(StringValue(source));
- StringValue(source);
- json->len = RSTRING_LEN(source);
- json->source = RSTRING_PTR(source);;
- json->Vsource = source;
- return self;
+ VALUE source, opts;
+ GET_PARSER_INIT;
+
+ if (json->Vsource) {
+ rb_raise(rb_eTypeError, "already initialized instance");
+ }
+ #ifdef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
+ rb_scan_args(argc, argv, "1:", &source, &opts);
+ #else
+ rb_scan_args(argc, argv, "11", &source, &opts);
+ #endif
+ if (!NIL_P(opts)) {
+ #ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
+ opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash");
+ if (NIL_P(opts)) {
+ rb_raise(rb_eArgError, "opts needs to be like a hash");
+ } else {
+ #endif
+ VALUE tmp = ID2SYM(i_max_nesting);
+ if (option_given_p(opts, tmp)) {
+ VALUE max_nesting = rb_hash_aref(opts, tmp);
+ if (RTEST(max_nesting)) {
+ Check_Type(max_nesting, T_FIXNUM);
+ json->max_nesting = FIX2INT(max_nesting);
+ } else {
+ json->max_nesting = 0;
+ }
+ } else {
+ json->max_nesting = 100;
+ }
+ tmp = ID2SYM(i_allow_nan);
+ if (option_given_p(opts, tmp)) {
+ json->allow_nan = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
+ } else {
+ json->allow_nan = 0;
+ }
+ tmp = ID2SYM(i_symbolize_names);
+ if (option_given_p(opts, tmp)) {
+ json->symbolize_names = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
+ } else {
+ json->symbolize_names = 0;
+ }
+ tmp = ID2SYM(i_freeze);
+ if (option_given_p(opts, tmp)) {
+ json->freeze = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
+ } else {
+ json->freeze = 0;
+ }
+ tmp = ID2SYM(i_create_additions);
+ if (option_given_p(opts, tmp)) {
+ json->create_additions = RTEST(rb_hash_aref(opts, tmp));
+ } else {
+ json->create_additions = 0;
+ }
+ if (json->symbolize_names && json->create_additions) {
+ rb_raise(rb_eArgError,
+ "options :symbolize_names and :create_additions cannot be "
+ " used in conjunction");
+ }
+ tmp = ID2SYM(i_create_id);
+ if (option_given_p(opts, tmp)) {
+ json->create_id = rb_hash_aref(opts, tmp);
+ } else {
+ json->create_id = rb_funcall(mJSON, i_create_id, 0);
+ }
+ tmp = ID2SYM(i_object_class);
+ if (option_given_p(opts, tmp)) {
+ json->object_class = rb_hash_aref(opts, tmp);
+ } else {
+ json->object_class = Qnil;
+ }
+ tmp = ID2SYM(i_array_class);
+ if (option_given_p(opts, tmp)) {
+ json->array_class = rb_hash_aref(opts, tmp);
+ } else {
+ json->array_class = Qnil;
+ }
+ tmp = ID2SYM(i_decimal_class);
+ if (option_given_p(opts, tmp)) {
+ json->decimal_class = rb_hash_aref(opts, tmp);
+ } else {
+ json->decimal_class = Qnil;
+ }
+ tmp = ID2SYM(i_match_string);
+ if (option_given_p(opts, tmp)) {
+ VALUE match_string = rb_hash_aref(opts, tmp);
+ json->match_string = RTEST(match_string) ? match_string : Qnil;
+ } else {
+ json->match_string = Qnil;
+ }
+ #ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
+ }
+ #endif
+ } else {
+ json->max_nesting = 100;
+ json->allow_nan = 0;
+ json->create_additions = 0;
+ json->create_id = rb_funcall(mJSON, i_create_id, 0);
+ json->object_class = Qnil;
+ json->array_class = Qnil;
+ json->decimal_class = Qnil;
+ }
+ source = convert_encoding(StringValue(source));
+ StringValue(source);
+ json->len = RSTRING_LEN(source);
+ json->source = RSTRING_PTR(source);;
+ json->Vsource = source;
+ return self;
}
-#line 1852 "parser.c"
enum {JSON_start = 1};
enum {JSON_first_final = 10};
enum {JSON_error = 0};
enum {JSON_en_main = 1};
+static const char MAYBE_UNUSED(_JSON_nfa_targs)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_nfa_offsets)[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_nfa_push_actions)[] = {
+ 0, 0
+};
+
+static const char MAYBE_UNUSED(_JSON_nfa_pop_trans)[] = {
+ 0, 0
+};
+
-#line 760 "parser.rl"
+#line 835 "parser.rl"
/*
- * call-seq: parse()
- *
- * Parses the current JSON text _source_ and returns the complete data
- * structure as a result.
- */
+* call-seq: parse()
+*
+* Parses the current JSON text _source_ and returns the complete data
+* structure as a result.
+* It raises JSON::ParseError if fail to parse.
+*/
static VALUE cParser_parse(VALUE self)
{
- char *p, *pe;
- int cs = EVIL;
- VALUE result = Qnil;
- GET_PARSER;
+ char *p, *pe;
+ int cs = EVIL;
+ VALUE result = Qnil;
+ GET_PARSER;
-#line 1877 "parser.c"
{
- cs = JSON_start;
+ cs = (int)JSON_start;
}
-#line 776 "parser.rl"
- p = json->source;
- pe = p + json->len;
+ #line 851 "parser.rl"
+
+ p = json->source;
+ pe = p + json->len;
-#line 1886 "parser.c"
{
- if ( p == pe )
+ if ( p == pe )
goto _test_eof;
- switch ( cs )
- {
-st1:
- if ( ++p == pe )
+ switch ( cs )
+ {
+ case 1:
+ goto st_case_1;
+ case 0:
+ goto st_case_0;
+ case 10:
+ goto st_case_10;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 5:
+ goto st_case_5;
+ case 6:
+ goto st_case_6;
+ case 7:
+ goto st_case_7;
+ case 8:
+ goto st_case_8;
+ case 9:
+ goto st_case_9;
+ }
+ goto st_out;
+ st1:
+ p+= 1;
+ if ( p == pe )
goto _test_eof1;
-case 1:
- switch( (*p) ) {
- case 13: goto st1;
- case 32: goto st1;
- case 34: goto tr2;
- case 45: goto tr2;
- case 47: goto st6;
- case 73: goto tr2;
- case 78: goto tr2;
- case 91: goto tr2;
- case 102: goto tr2;
- case 110: goto tr2;
- case 116: goto tr2;
- case 123: goto tr2;
- }
- if ( (*p) > 10 ) {
- if ( 48 <= (*p) && (*p) <= 57 )
- goto tr2;
- } else if ( (*p) >= 9 )
- goto st1;
- goto st0;
-st0:
-cs = 0;
- goto _out;
-tr2:
-#line 752 "parser.rl"
- {
- char *np = JSON_parse_value(json, p, pe, &result, 0);
- if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
- }
- goto st10;
-st10:
- if ( ++p == pe )
- goto _test_eof10;
-case 10:
-#line 1930 "parser.c"
- switch( (*p) ) {
- case 13: goto st10;
- case 32: goto st10;
- case 47: goto st2;
- }
- if ( 9 <= (*p) && (*p) <= 10 )
+ st_case_1:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st1;
+ }
+ case 32: {
+ goto st1;
+ }
+ case 34: {
+ goto ctr2;
+ }
+ case 45: {
+ goto ctr2;
+ }
+ case 47: {
+ goto st6;
+ }
+ case 73: {
+ goto ctr2;
+ }
+ case 78: {
+ goto ctr2;
+ }
+ case 91: {
+ goto ctr2;
+ }
+ case 102: {
+ goto ctr2;
+ }
+ case 110: {
+ goto ctr2;
+ }
+ case 116: {
+ goto ctr2;
+ }
+ case 123: {
+ goto ctr2;
+ }
+ }
+ if ( ( (*( p))) > 10 ) {
+ if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
+ goto ctr2;
+ }
+ } else if ( ( (*( p))) >= 9 ) {
+ goto st1;
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ ctr2:
+ {
+ #line 827 "parser.rl"
+
+ char *np = JSON_parse_value(json, p, pe, &result, 0);
+ if (np == NULL) { {p = p - 1; } {p+= 1; cs = 10; goto _out;} } else {p = (( np))-1;}
+
+ }
+
goto st10;
- goto st0;
-st2:
- if ( ++p == pe )
+ st10:
+ p+= 1;
+ if ( p == pe )
+ goto _test_eof10;
+ st_case_10:
+ switch( ( (*( p))) ) {
+ case 13: {
+ goto st10;
+ }
+ case 32: {
+ goto st10;
+ }
+ case 47: {
+ goto st2;
+ }
+ }
+ if ( 9 <= ( (*( p))) && ( (*( p))) <= 10 ) {
+ goto st10;
+ }
+ {
+ goto st0;
+ }
+ st2:
+ p+= 1;
+ if ( p == pe )
goto _test_eof2;
-case 2:
- switch( (*p) ) {
- case 42: goto st3;
- case 47: goto st5;
- }
- goto st0;
-st3:
- if ( ++p == pe )
+ st_case_2:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st3;
+ }
+ case 47: {
+ goto st5;
+ }
+ }
+ {
+ goto st0;
+ }
+ st3:
+ p+= 1;
+ if ( p == pe )
goto _test_eof3;
-case 3:
- if ( (*p) == 42 )
- goto st4;
- goto st3;
-st4:
- if ( ++p == pe )
+ st_case_3:
+ if ( ( (*( p))) == 42 ) {
+ goto st4;
+ }
+ {
+ goto st3;
+ }
+ st4:
+ p+= 1;
+ if ( p == pe )
goto _test_eof4;
-case 4:
- switch( (*p) ) {
- case 42: goto st4;
- case 47: goto st10;
- }
- goto st3;
-st5:
- if ( ++p == pe )
+ st_case_4:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st4;
+ }
+ case 47: {
+ goto st10;
+ }
+ }
+ {
+ goto st3;
+ }
+ st5:
+ p+= 1;
+ if ( p == pe )
goto _test_eof5;
-case 5:
- if ( (*p) == 10 )
- goto st10;
- goto st5;
-st6:
- if ( ++p == pe )
+ st_case_5:
+ if ( ( (*( p))) == 10 ) {
+ goto st10;
+ }
+ {
+ goto st5;
+ }
+ st6:
+ p+= 1;
+ if ( p == pe )
goto _test_eof6;
-case 6:
- switch( (*p) ) {
- case 42: goto st7;
- case 47: goto st9;
- }
- goto st0;
-st7:
- if ( ++p == pe )
+ st_case_6:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st7;
+ }
+ case 47: {
+ goto st9;
+ }
+ }
+ {
+ goto st0;
+ }
+ st7:
+ p+= 1;
+ if ( p == pe )
goto _test_eof7;
-case 7:
- if ( (*p) == 42 )
- goto st8;
- goto st7;
-st8:
- if ( ++p == pe )
+ st_case_7:
+ if ( ( (*( p))) == 42 ) {
+ goto st8;
+ }
+ {
+ goto st7;
+ }
+ st8:
+ p+= 1;
+ if ( p == pe )
goto _test_eof8;
-case 8:
- switch( (*p) ) {
- case 42: goto st8;
- case 47: goto st1;
- }
- goto st7;
-st9:
- if ( ++p == pe )
+ st_case_8:
+ switch( ( (*( p))) ) {
+ case 42: {
+ goto st8;
+ }
+ case 47: {
+ goto st1;
+ }
+ }
+ {
+ goto st7;
+ }
+ st9:
+ p+= 1;
+ if ( p == pe )
goto _test_eof9;
-case 9:
- if ( (*p) == 10 )
- goto st1;
- goto st9;
+ st_case_9:
+ if ( ( (*( p))) == 10 ) {
+ goto st1;
+ }
+ {
+ goto st9;
+ }
+ st_out:
+ _test_eof1: cs = 1; goto _test_eof;
+ _test_eof10: cs = 10; goto _test_eof;
+ _test_eof2: cs = 2; goto _test_eof;
+ _test_eof3: cs = 3; goto _test_eof;
+ _test_eof4: cs = 4; goto _test_eof;
+ _test_eof5: cs = 5; goto _test_eof;
+ _test_eof6: cs = 6; goto _test_eof;
+ _test_eof7: cs = 7; goto _test_eof;
+ _test_eof8: cs = 8; goto _test_eof;
+ _test_eof9: cs = 9; goto _test_eof;
+
+ _test_eof: {}
+ _out: {}
+ }
+
+ #line 854 "parser.rl"
+
+
+ if (cs >= JSON_first_final && p == pe) {
+ return result;
+ } else {
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
+ return Qnil;
}
- _test_eof1: cs = 1; goto _test_eof;
- _test_eof10: cs = 10; goto _test_eof;
- _test_eof2: cs = 2; goto _test_eof;
- _test_eof3: cs = 3; goto _test_eof;
- _test_eof4: cs = 4; goto _test_eof;
- _test_eof5: cs = 5; goto _test_eof;
- _test_eof6: cs = 6; goto _test_eof;
- _test_eof7: cs = 7; goto _test_eof;
- _test_eof8: cs = 8; goto _test_eof;
- _test_eof9: cs = 9; goto _test_eof;
-
- _test_eof: {}
- _out: {}
- }
-
-#line 779 "parser.rl"
-
- if (cs >= JSON_first_final && p == pe) {
- return result;
- } else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
- return Qnil;
- }
}
static void JSON_mark(void *ptr)
{
- JSON_Parser *json = ptr;
- rb_gc_mark_maybe(json->Vsource);
- rb_gc_mark_maybe(json->create_id);
- rb_gc_mark_maybe(json->object_class);
- rb_gc_mark_maybe(json->array_class);
- rb_gc_mark_maybe(json->decimal_class);
- rb_gc_mark_maybe(json->match_string);
+ JSON_Parser *json = ptr;
+ rb_gc_mark_maybe(json->Vsource);
+ rb_gc_mark_maybe(json->create_id);
+ rb_gc_mark_maybe(json->object_class);
+ rb_gc_mark_maybe(json->array_class);
+ rb_gc_mark_maybe(json->decimal_class);
+ rb_gc_mark_maybe(json->match_string);
}
static void JSON_free(void *ptr)
{
- JSON_Parser *json = ptr;
- fbuffer_free(json->fbuffer);
- ruby_xfree(json);
+ JSON_Parser *json = ptr;
+ fbuffer_free(json->fbuffer);
+ ruby_xfree(json);
}
static size_t JSON_memsize(const void *ptr)
{
- const JSON_Parser *json = ptr;
- return sizeof(*json) + FBUFFER_CAPA(json->fbuffer);
+ const JSON_Parser *json = ptr;
+ return sizeof(*json) + FBUFFER_CAPA(json->fbuffer);
}
#ifdef NEW_TYPEDDATA_WRAPPER
static const rb_data_type_t JSON_Parser_type = {
- "JSON/Parser",
- {JSON_mark, JSON_free, JSON_memsize,},
-#ifdef RUBY_TYPED_FREE_IMMEDIATELY
- 0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY,
-#endif
+ "JSON/Parser",
+ {JSON_mark, JSON_free, JSON_memsize,},
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
+ 0, 0,
+ RUBY_TYPED_FREE_IMMEDIATELY,
+ #endif
};
#endif
static VALUE cJSON_parser_s_allocate(VALUE klass)
{
- JSON_Parser *json;
- VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json);
- json->fbuffer = fbuffer_alloc(0);
- return obj;
+ JSON_Parser *json;
+ VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json);
+ json->fbuffer = fbuffer_alloc(0);
+ return obj;
}
/*
- * call-seq: source()
- *
- * Returns a copy of the current _source_ string, that was used to construct
- * this Parser.
- */
+* call-seq: source()
+*
+* Returns a copy of the current _source_ string, that was used to construct
+* this Parser.
+*/
static VALUE cParser_source(VALUE self)
{
- GET_PARSER;
- return rb_str_dup(json->Vsource);
+ GET_PARSER;
+ return rb_str_dup(json->Vsource);
}
void Init_parser(void)
{
-#undef rb_intern
- rb_require("json/common");
- mJSON = rb_define_module("JSON");
- mExt = rb_define_module_under(mJSON, "Ext");
- cParser = rb_define_class_under(mExt, "Parser", rb_cObject);
- eParserError = rb_path2class("JSON::ParserError");
- eNestingError = rb_path2class("JSON::NestingError");
- rb_gc_register_mark_object(eParserError);
- rb_gc_register_mark_object(eNestingError);
- rb_define_alloc_func(cParser, cJSON_parser_s_allocate);
- rb_define_method(cParser, "initialize", cParser_initialize, -1);
- rb_define_method(cParser, "parse", cParser_parse, 0);
- rb_define_method(cParser, "source", cParser_source, 0);
-
- CNaN = rb_const_get(mJSON, rb_intern("NaN"));
- rb_gc_register_mark_object(CNaN);
-
- CInfinity = rb_const_get(mJSON, rb_intern("Infinity"));
- rb_gc_register_mark_object(CInfinity);
-
- CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity"));
- rb_gc_register_mark_object(CMinusInfinity);
-
- i_json_creatable_p = rb_intern("json_creatable?");
- i_json_create = rb_intern("json_create");
- i_create_id = rb_intern("create_id");
- i_create_additions = rb_intern("create_additions");
- i_chr = rb_intern("chr");
- i_max_nesting = rb_intern("max_nesting");
- i_allow_nan = rb_intern("allow_nan");
- i_symbolize_names = rb_intern("symbolize_names");
- i_object_class = rb_intern("object_class");
- i_array_class = rb_intern("array_class");
- i_decimal_class = rb_intern("decimal_class");
- i_match = rb_intern("match");
- i_match_string = rb_intern("match_string");
- i_key_p = rb_intern("key?");
- i_deep_const_get = rb_intern("deep_const_get");
- i_aset = rb_intern("[]=");
- i_aref = rb_intern("[]");
- i_leftshift = rb_intern("<<");
- i_new = rb_intern("new");
- i_BigDecimal = rb_intern("BigDecimal");
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+ #endif
+
+ #undef rb_intern
+ rb_require("json/common");
+ mJSON = rb_define_module("JSON");
+ mExt = rb_define_module_under(mJSON, "Ext");
+ cParser = rb_define_class_under(mExt, "Parser", rb_cObject);
+ eParserError = rb_path2class("JSON::ParserError");
+ eNestingError = rb_path2class("JSON::NestingError");
+ rb_gc_register_mark_object(eParserError);
+ rb_gc_register_mark_object(eNestingError);
+ rb_define_alloc_func(cParser, cJSON_parser_s_allocate);
+ rb_define_method(cParser, "initialize", cParser_initialize, -1);
+ rb_define_method(cParser, "parse", cParser_parse, 0);
+ rb_define_method(cParser, "source", cParser_source, 0);
+
+ CNaN = rb_const_get(mJSON, rb_intern("NaN"));
+ rb_gc_register_mark_object(CNaN);
+
+ CInfinity = rb_const_get(mJSON, rb_intern("Infinity"));
+ rb_gc_register_mark_object(CInfinity);
+
+ CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity"));
+ rb_gc_register_mark_object(CMinusInfinity);
+
+ i_json_creatable_p = rb_intern("json_creatable?");
+ i_json_create = rb_intern("json_create");
+ i_create_id = rb_intern("create_id");
+ i_create_additions = rb_intern("create_additions");
+ i_chr = rb_intern("chr");
+ i_max_nesting = rb_intern("max_nesting");
+ i_allow_nan = rb_intern("allow_nan");
+ i_symbolize_names = rb_intern("symbolize_names");
+ i_object_class = rb_intern("object_class");
+ i_array_class = rb_intern("array_class");
+ i_decimal_class = rb_intern("decimal_class");
+ i_match = rb_intern("match");
+ i_match_string = rb_intern("match_string");
+ i_key_p = rb_intern("key?");
+ i_deep_const_get = rb_intern("deep_const_get");
+ i_aset = rb_intern("[]=");
+ i_aref = rb_intern("[]");
+ i_leftshift = rb_intern("<<");
+ i_new = rb_intern("new");
+ i_try_convert = rb_intern("try_convert");
+ i_freeze = rb_intern("freeze");
+ i_uminus = rb_intern("-@");
}
/*
- * Local variables:
- * mode: c
- * c-file-style: ruby
- * indent-tabs-mode: nil
- * End:
- */
+* Local variables:
+* mode: c
+* c-file-style: ruby
+* indent-tabs-mode: nil
+* End:
+*/
diff --git a/ext/json/parser/parser.h b/ext/json/parser/parser.h
index e6cf779024..92ed3fdc5d 100644
--- a/ext/json/parser/parser.h
+++ b/ext/json/parser/parser.h
@@ -13,6 +13,10 @@
#include "st.h"
#endif
+#ifndef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x
+#endif
+
#define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
/* unicode */
@@ -37,6 +41,7 @@ typedef struct JSON_ParserStruct {
int allow_nan;
int parsing_name;
int symbolize_names;
+ int freeze;
VALUE object_class;
VALUE array_class;
VALUE decimal_class;
@@ -62,7 +67,7 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
-static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd);
+static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int symbolize);
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
static VALUE convert_encoding(VALUE source);
static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self);
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
index 6b38bb283a..2dbdc7ef24 100644
--- a/ext/json/parser/parser.rl
+++ b/ext/json/parser/parser.rl
@@ -89,13 +89,12 @@ static int convert_UTF32_to_UTF8(char *buf, UTF32 ch)
static VALUE mJSON, mExt, cParser, eParserError, eNestingError;
static VALUE CNaN, CInfinity, CMinusInfinity;
-static VALUE cBigDecimal = Qundef;
static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
i_object_class, i_array_class, i_decimal_class, i_key_p,
i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
- i_leftshift, i_new, i_BigDecimal;
+ i_leftshift, i_new, i_try_convert, i_freeze, i_uminus;
%%{
machine JSON_common;
@@ -138,6 +137,7 @@ static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
fhold; fbreak;
} else {
if (NIL_P(json->object_class)) {
+ OBJ_FREEZE(last_name);
rb_hash_aset(*result, last_name, v);
} else {
rb_funcall(*result, i_aset, 2, last_name, v);
@@ -222,14 +222,14 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
if (json->allow_nan) {
*result = CNaN;
} else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 2);
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 2);
}
}
action parse_infinity {
if (json->allow_nan) {
*result = CInfinity;
} else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 8);
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p - 8);
}
}
action parse_string {
@@ -245,7 +245,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
fexec p + 10;
fhold; fbreak;
} else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
}
}
np = JSON_parse_float(json, fpc, pe, result);
@@ -289,6 +289,10 @@ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *resul
%% write init;
%% write exec;
+ if (json->freeze) {
+ OBJ_FREEZE(*result);
+ }
+
if (cs >= JSON_value_first_final) {
return p;
} else {
@@ -340,19 +344,6 @@ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *res
) (^[0-9Ee.\-]? @exit );
}%%
-static int is_bigdecimal_class(VALUE obj)
-{
- if (cBigDecimal == Qundef) {
- if (rb_const_defined(rb_cObject, i_BigDecimal)) {
- cBigDecimal = rb_const_get_at(rb_cObject, i_BigDecimal);
- }
- else {
- return 0;
- }
- }
- return obj == cBigDecimal;
-}
-
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
{
int cs = EVIL;
@@ -362,21 +353,46 @@ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *resul
%% write exec;
if (cs >= JSON_float_first_final) {
+ VALUE mod = Qnil;
+ ID method_id = 0;
+ if (rb_respond_to(json->decimal_class, i_try_convert)) {
+ mod = json->decimal_class;
+ method_id = i_try_convert;
+ } else if (rb_respond_to(json->decimal_class, i_new)) {
+ mod = json->decimal_class;
+ method_id = i_new;
+ } else if (RB_TYPE_P(json->decimal_class, T_CLASS)) {
+ VALUE name = rb_class_name(json->decimal_class);
+ const char *name_cstr = RSTRING_PTR(name);
+ const char *last_colon = strrchr(name_cstr, ':');
+ if (last_colon) {
+ const char *mod_path_end = last_colon - 1;
+ VALUE mod_path = rb_str_substr(name, 0, mod_path_end - name_cstr);
+ mod = rb_path_to_class(mod_path);
+
+ const char *method_name_beg = last_colon + 1;
+ long before_len = method_name_beg - name_cstr;
+ long len = RSTRING_LEN(name) - before_len;
+ VALUE method_name = rb_str_substr(name, before_len, len);
+ method_id = SYM2ID(rb_str_intern(method_name));
+ } else {
+ mod = rb_mKernel;
+ method_id = SYM2ID(rb_str_intern(name));
+ }
+ }
+
long len = p - json->memo;
fbuffer_clear(json->fbuffer);
fbuffer_append(json->fbuffer, json->memo, len);
fbuffer_append_char(json->fbuffer, '\0');
- if (NIL_P(json->decimal_class)) {
- *result = rb_float_new(rb_cstr_to_dbl(FBUFFER_PTR(json->fbuffer), 1));
+
+ if (method_id) {
+ VALUE text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
+ *result = rb_funcallv(mod, method_id, 1, &text);
} else {
- VALUE text;
- text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
- if (is_bigdecimal_class(json->decimal_class)) {
- *result = rb_funcall(Qnil, i_BigDecimal, 1, text);
- } else {
- *result = rb_funcall(json->decimal_class, i_new, 1, text);
- }
+ *result = DBL2NUM(rb_cstr_to_dbl(FBUFFER_PTR(json->fbuffer), 1));
}
+
return p + 1;
} else {
return NULL;
@@ -431,22 +447,42 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul
if(cs >= JSON_array_first_final) {
return p + 1;
} else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
return NULL;
}
}
-static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
+static const size_t MAX_STACK_BUFFER_SIZE = 128;
+static VALUE json_string_unescape(char *string, char *stringEnd, int intern, int symbolize)
{
- char *p = string, *pe = string, *unescape;
+ VALUE result = Qnil;
+ size_t bufferSize = stringEnd - string;
+ char *p = string, *pe = string, *unescape, *bufferStart, *buffer;
int unescape_len;
char buf[4];
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+# ifdef HAVE_RB_ENC_INTERNED_STR
+ bufferStart = buffer = ALLOC_N(char, bufferSize ? bufferSize : 1);
+# else
+ bufferStart = buffer = ALLOC_N(char, bufferSize);
+# endif
+ } else {
+# ifdef HAVE_RB_ENC_INTERNED_STR
+ bufferStart = buffer = ALLOCA_N(char, bufferSize ? bufferSize : 1);
+# else
+ bufferStart = buffer = ALLOCA_N(char, bufferSize);
+# endif
+ }
+
while (pe < stringEnd) {
if (*pe == '\\') {
unescape = (char *) "?";
unescape_len = 1;
- if (pe > p) rb_str_buf_cat(result, p, pe - p);
+ if (pe > p) {
+ MEMCPY(buffer, p, char, pe - p);
+ buffer += pe - p;
+ }
switch (*++pe) {
case 'n':
unescape = (char *) "\n";
@@ -471,9 +507,12 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
break;
case 'u':
if (pe > stringEnd - 4) {
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
rb_enc_raise(
EXC_ENCODING eParserError,
- "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p
+ "incomplete unicode character escape sequence at '%s'", p
);
} else {
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
@@ -481,9 +520,12 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
pe++;
if (pe > stringEnd - 6) {
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
rb_enc_raise(
EXC_ENCODING eParserError,
- "%u: incomplete surrogate pair at '%s'", __LINE__, p
+ "incomplete surrogate pair at '%s'", p
);
}
if (pe[0] == '\\' && pe[1] == 'u') {
@@ -504,13 +546,55 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
p = pe;
continue;
}
- rb_str_buf_cat(result, unescape, unescape_len);
+ MEMCPY(buffer, unescape, char, unescape_len);
+ buffer += unescape_len;
p = ++pe;
} else {
pe++;
}
}
- rb_str_buf_cat(result, p, pe - p);
+
+ if (pe > p) {
+ MEMCPY(buffer, p, char, pe - p);
+ buffer += pe - p;
+ }
+
+# ifdef HAVE_RB_ENC_INTERNED_STR
+ if (intern) {
+ result = rb_enc_interned_str(bufferStart, (long)(buffer - bufferStart), rb_utf8_encoding());
+ } else {
+ result = rb_utf8_str_new(bufferStart, (long)(buffer - bufferStart));
+ }
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+# else
+ result = rb_utf8_str_new(bufferStart, (long)(buffer - bufferStart));
+
+ if (bufferSize > MAX_STACK_BUFFER_SIZE) {
+ free(bufferStart);
+ }
+
+ if (intern) {
+ # if STR_UMINUS_DEDUPE_FROZEN
+ // Starting from MRI 2.8 it is preferable to freeze the string
+ // before deduplication so that it can be interned directly
+ // otherwise it would be duplicated first which is wasteful.
+ result = rb_funcall(rb_str_freeze(result), i_uminus, 0);
+ # elif STR_UMINUS_DEDUPE
+ // MRI 2.5 and older do not deduplicate strings that are already
+ // frozen.
+ result = rb_funcall(result, i_uminus, 0);
+ # else
+ result = rb_str_freeze(result);
+ # endif
+ }
+# endif
+
+ if (symbolize) {
+ result = rb_str_intern(result);
+ }
+
return result;
}
@@ -521,12 +605,11 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
write data;
action parse_string {
- *result = json_string_unescape(*result, json->memo + 1, p);
+ *result = json_string_unescape(json->memo + 1, p, json->parsing_name || json-> freeze, json->parsing_name && json->symbolize_names);
if (NIL_P(*result)) {
fhold;
fbreak;
} else {
- FORCE_UTF8(*result);
fexec p + 1;
}
}
@@ -553,7 +636,6 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu
int cs = EVIL;
VALUE match_string;
- *result = rb_str_buf_new(0);
%% write init;
json->memo = p;
%% write exec;
@@ -569,11 +651,6 @@ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *resu
}
}
- if (json->symbolize_names && json->parsing_name) {
- *result = rb_str_intern(*result);
- } else if (RB_TYPE_P(*result, T_STRING)) {
- rb_str_resize(*result, RSTRING_LEN(*result));
- }
if (cs >= JSON_string_first_final) {
return p + 1;
} else {
@@ -680,6 +757,12 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
} else {
json->symbolize_names = 0;
}
+ tmp = ID2SYM(i_freeze);
+ if (option_given_p(opts, tmp)) {
+ json->freeze = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
+ } else {
+ json->freeze = 0;
+ }
tmp = ID2SYM(i_create_additions);
if (option_given_p(opts, tmp)) {
json->create_additions = RTEST(rb_hash_aref(opts, tmp));
@@ -764,6 +847,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
*
* Parses the current JSON text _source_ and returns the complete data
* structure as a result.
+ * It raises JSON::ParseError if fail to parse.
*/
static VALUE cParser_parse(VALUE self)
{
@@ -780,7 +864,7 @@ static VALUE cParser_parse(VALUE self)
if (cs >= JSON_first_final && p == pe) {
return result;
} else {
- rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
+ rb_enc_raise(EXC_ENCODING eParserError, "unexpected token at '%s'", p);
return Qnil;
}
}
@@ -842,6 +926,10 @@ static VALUE cParser_source(VALUE self)
void Init_parser(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
rb_require("json/common");
mJSON = rb_define_module("JSON");
@@ -884,7 +972,9 @@ void Init_parser(void)
i_aref = rb_intern("[]");
i_leftshift = rb_intern("<<");
i_new = rb_intern("new");
- i_BigDecimal = rb_intern("BigDecimal");
+ i_try_convert = rb_intern("try_convert");
+ i_freeze = rb_intern("freeze");
+ i_uminus = rb_intern("-@");
}
/*
diff --git a/ext/json/parser/prereq.mk b/ext/json/parser/prereq.mk
index 37bacc3380..fc59169056 100644
--- a/ext/json/parser/prereq.mk
+++ b/ext/json/parser/prereq.mk
@@ -6,6 +6,8 @@ RAGEL = ragel
$(RAGEL) -G2 $<
$(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' \
-e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' \
- -e '$$_ = "/* This file is automatically generated from parser.rl by using ragel */" + $$_ if $$. == 1' $@
+ -e '$$_.sub!(/^(static const char) (_JSON(?:_\w+)?_nfa_\w+)(?=\[\] =)/, "\\1 MAYBE_UNUSED(\\2)")' \
+ -e '$$_.sub!(/0 <= ([\( ]+\*[\( ]*p\)+) && \1 <= 31/, "0 <= (signed char)(*(p)) && (*(p)) <= 31")' \
+ -e '$$_ = "/* This file is automatically generated from parser.rl by using ragel */\n" + $$_ if $$. == 1' $@
parser.c:
diff --git a/ext/monitor/depend b/ext/monitor/depend
index 89efe1766b..3030da71d0 100644
--- a/ext/monitor/depend
+++ b/ext/monitor/depend
@@ -3,8 +3,156 @@ monitor.o: $(RUBY_EXTCONF_H)
monitor.o: $(arch_hdrdir)/ruby/config.h
monitor.o: $(hdrdir)/ruby/assert.h
monitor.o: $(hdrdir)/ruby/backward.h
+monitor.o: $(hdrdir)/ruby/backward/2/assume.h
+monitor.o: $(hdrdir)/ruby/backward/2/attributes.h
+monitor.o: $(hdrdir)/ruby/backward/2/bool.h
+monitor.o: $(hdrdir)/ruby/backward/2/inttypes.h
+monitor.o: $(hdrdir)/ruby/backward/2/limits.h
+monitor.o: $(hdrdir)/ruby/backward/2/long_long.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdalign.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdarg.h
monitor.o: $(hdrdir)/ruby/defines.h
monitor.o: $(hdrdir)/ruby/intern.h
+monitor.o: $(hdrdir)/ruby/internal/abi.h
+monitor.o: $(hdrdir)/ruby/internal/anyargs.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+monitor.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+monitor.o: $(hdrdir)/ruby/internal/assume.h
+monitor.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+monitor.o: $(hdrdir)/ruby/internal/attr/artificial.h
+monitor.o: $(hdrdir)/ruby/internal/attr/cold.h
+monitor.o: $(hdrdir)/ruby/internal/attr/const.h
+monitor.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+monitor.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+monitor.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+monitor.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+monitor.o: $(hdrdir)/ruby/internal/attr/error.h
+monitor.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+monitor.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+monitor.o: $(hdrdir)/ruby/internal/attr/format.h
+monitor.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+monitor.o: $(hdrdir)/ruby/internal/attr/noalias.h
+monitor.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+monitor.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+monitor.o: $(hdrdir)/ruby/internal/attr/noinline.h
+monitor.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+monitor.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+monitor.o: $(hdrdir)/ruby/internal/attr/pure.h
+monitor.o: $(hdrdir)/ruby/internal/attr/restrict.h
+monitor.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+monitor.o: $(hdrdir)/ruby/internal/attr/warning.h
+monitor.o: $(hdrdir)/ruby/internal/attr/weakref.h
+monitor.o: $(hdrdir)/ruby/internal/cast.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+monitor.o: $(hdrdir)/ruby/internal/compiler_since.h
+monitor.o: $(hdrdir)/ruby/internal/config.h
+monitor.o: $(hdrdir)/ruby/internal/constant_p.h
+monitor.o: $(hdrdir)/ruby/internal/core.h
+monitor.o: $(hdrdir)/ruby/internal/core/rarray.h
+monitor.o: $(hdrdir)/ruby/internal/core/rbasic.h
+monitor.o: $(hdrdir)/ruby/internal/core/rbignum.h
+monitor.o: $(hdrdir)/ruby/internal/core/rclass.h
+monitor.o: $(hdrdir)/ruby/internal/core/rdata.h
+monitor.o: $(hdrdir)/ruby/internal/core/rfile.h
+monitor.o: $(hdrdir)/ruby/internal/core/rhash.h
+monitor.o: $(hdrdir)/ruby/internal/core/robject.h
+monitor.o: $(hdrdir)/ruby/internal/core/rregexp.h
+monitor.o: $(hdrdir)/ruby/internal/core/rstring.h
+monitor.o: $(hdrdir)/ruby/internal/core/rstruct.h
+monitor.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+monitor.o: $(hdrdir)/ruby/internal/ctype.h
+monitor.o: $(hdrdir)/ruby/internal/dllexport.h
+monitor.o: $(hdrdir)/ruby/internal/dosish.h
+monitor.o: $(hdrdir)/ruby/internal/error.h
+monitor.o: $(hdrdir)/ruby/internal/eval.h
+monitor.o: $(hdrdir)/ruby/internal/event.h
+monitor.o: $(hdrdir)/ruby/internal/fl_type.h
+monitor.o: $(hdrdir)/ruby/internal/gc.h
+monitor.o: $(hdrdir)/ruby/internal/glob.h
+monitor.o: $(hdrdir)/ruby/internal/globals.h
+monitor.o: $(hdrdir)/ruby/internal/has/attribute.h
+monitor.o: $(hdrdir)/ruby/internal/has/builtin.h
+monitor.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+monitor.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+monitor.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+monitor.o: $(hdrdir)/ruby/internal/has/extension.h
+monitor.o: $(hdrdir)/ruby/internal/has/feature.h
+monitor.o: $(hdrdir)/ruby/internal/has/warning.h
+monitor.o: $(hdrdir)/ruby/internal/intern/array.h
+monitor.o: $(hdrdir)/ruby/internal/intern/bignum.h
+monitor.o: $(hdrdir)/ruby/internal/intern/class.h
+monitor.o: $(hdrdir)/ruby/internal/intern/compar.h
+monitor.o: $(hdrdir)/ruby/internal/intern/complex.h
+monitor.o: $(hdrdir)/ruby/internal/intern/cont.h
+monitor.o: $(hdrdir)/ruby/internal/intern/dir.h
+monitor.o: $(hdrdir)/ruby/internal/intern/enum.h
+monitor.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+monitor.o: $(hdrdir)/ruby/internal/intern/error.h
+monitor.o: $(hdrdir)/ruby/internal/intern/eval.h
+monitor.o: $(hdrdir)/ruby/internal/intern/file.h
+monitor.o: $(hdrdir)/ruby/internal/intern/gc.h
+monitor.o: $(hdrdir)/ruby/internal/intern/hash.h
+monitor.o: $(hdrdir)/ruby/internal/intern/io.h
+monitor.o: $(hdrdir)/ruby/internal/intern/load.h
+monitor.o: $(hdrdir)/ruby/internal/intern/marshal.h
+monitor.o: $(hdrdir)/ruby/internal/intern/numeric.h
+monitor.o: $(hdrdir)/ruby/internal/intern/object.h
+monitor.o: $(hdrdir)/ruby/internal/intern/parse.h
+monitor.o: $(hdrdir)/ruby/internal/intern/proc.h
+monitor.o: $(hdrdir)/ruby/internal/intern/process.h
+monitor.o: $(hdrdir)/ruby/internal/intern/random.h
+monitor.o: $(hdrdir)/ruby/internal/intern/range.h
+monitor.o: $(hdrdir)/ruby/internal/intern/rational.h
+monitor.o: $(hdrdir)/ruby/internal/intern/re.h
+monitor.o: $(hdrdir)/ruby/internal/intern/ruby.h
+monitor.o: $(hdrdir)/ruby/internal/intern/select.h
+monitor.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+monitor.o: $(hdrdir)/ruby/internal/intern/signal.h
+monitor.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+monitor.o: $(hdrdir)/ruby/internal/intern/string.h
+monitor.o: $(hdrdir)/ruby/internal/intern/struct.h
+monitor.o: $(hdrdir)/ruby/internal/intern/thread.h
+monitor.o: $(hdrdir)/ruby/internal/intern/time.h
+monitor.o: $(hdrdir)/ruby/internal/intern/variable.h
+monitor.o: $(hdrdir)/ruby/internal/intern/vm.h
+monitor.o: $(hdrdir)/ruby/internal/interpreter.h
+monitor.o: $(hdrdir)/ruby/internal/iterator.h
+monitor.o: $(hdrdir)/ruby/internal/memory.h
+monitor.o: $(hdrdir)/ruby/internal/method.h
+monitor.o: $(hdrdir)/ruby/internal/module.h
+monitor.o: $(hdrdir)/ruby/internal/newobj.h
+monitor.o: $(hdrdir)/ruby/internal/rgengc.h
+monitor.o: $(hdrdir)/ruby/internal/scan_args.h
+monitor.o: $(hdrdir)/ruby/internal/special_consts.h
+monitor.o: $(hdrdir)/ruby/internal/static_assert.h
+monitor.o: $(hdrdir)/ruby/internal/stdalign.h
+monitor.o: $(hdrdir)/ruby/internal/stdbool.h
+monitor.o: $(hdrdir)/ruby/internal/symbol.h
+monitor.o: $(hdrdir)/ruby/internal/value.h
+monitor.o: $(hdrdir)/ruby/internal/value_type.h
+monitor.o: $(hdrdir)/ruby/internal/variable.h
+monitor.o: $(hdrdir)/ruby/internal/warning_push.h
+monitor.o: $(hdrdir)/ruby/internal/xmalloc.h
monitor.o: $(hdrdir)/ruby/missing.h
monitor.o: $(hdrdir)/ruby/ruby.h
monitor.o: $(hdrdir)/ruby/st.h
diff --git a/ext/monitor/lib/monitor.rb b/ext/monitor/lib/monitor.rb
index 1883cb72f6..11c5ac17d9 100644
--- a/ext/monitor/lib/monitor.rb
+++ b/ext/monitor/lib/monitor.rb
@@ -17,7 +17,7 @@
# structure.
#
# You can read more about the general principles on the Wikipedia page for
-# Monitors[http://en.wikipedia.org/wiki/Monitor_%28synchronization%29]
+# Monitors[https://en.wikipedia.org/wiki/Monitor_%28synchronization%29]
#
# == Examples
#
@@ -220,7 +220,7 @@ module MonitorMixin
# Use <tt>extend MonitorMixin</tt> or <tt>include MonitorMixin</tt> instead
# of this constructor. Have look at the examples above to understand how to
# use this module.
- def initialize(*args)
+ def initialize(...)
super
mon_initialize
end
@@ -230,7 +230,7 @@ module MonitorMixin
def mon_initialize
if defined?(@mon_data)
if defined?(@mon_initialized_by_new_cond)
- return # already initalized.
+ return # already initialized.
elsif @mon_data_owner_object_id == self.object_id
raise ThreadError, "already initialized"
end
diff --git a/ext/monitor/monitor.c b/ext/monitor/monitor.c
index 256fc4d7db..10209cf2aa 100644
--- a/ext/monitor/monitor.c
+++ b/ext/monitor/monitor.c
@@ -53,7 +53,7 @@ monitor_ptr(VALUE monitor)
static int
mc_owner_p(struct rb_monitor *mc)
{
- return mc->owner == rb_thread_current();
+ return mc->owner == rb_fiber_current();
}
static VALUE
@@ -65,7 +65,7 @@ monitor_try_enter(VALUE monitor)
if (!rb_mutex_trylock(mc->mutex)) {
return Qfalse;
}
- RB_OBJ_WRITE(monitor, &mc->owner, rb_thread_current());
+ RB_OBJ_WRITE(monitor, &mc->owner, rb_fiber_current());
mc->count = 0;
}
mc->count += 1;
@@ -78,7 +78,7 @@ monitor_enter(VALUE monitor)
struct rb_monitor *mc = monitor_ptr(monitor);
if (!mc_owner_p(mc)) {
rb_mutex_lock(mc->mutex);
- RB_OBJ_WRITE(monitor, &mc->owner, rb_thread_current());
+ RB_OBJ_WRITE(monitor, &mc->owner, rb_fiber_current());
mc->count = 0;
}
mc->count++;
@@ -90,7 +90,7 @@ monitor_check_owner(VALUE monitor)
{
struct rb_monitor *mc = monitor_ptr(monitor);
if (!mc_owner_p(mc)) {
- rb_raise(rb_eThreadError, "current thread not owner");
+ rb_raise(rb_eThreadError, "current fiber not owner");
}
return Qnil;
}
@@ -149,8 +149,8 @@ monitor_wait_for_cond_body(VALUE v)
struct wait_for_cond_data *data = (struct wait_for_cond_data *)v;
struct rb_monitor *mc = monitor_ptr(data->monitor);
// cond.wait(monitor.mutex, timeout)
- rb_funcall(data->cond, rb_intern("wait"), 2, mc->mutex, data->timeout);
- return Qtrue;
+ VALUE signaled = rb_funcall(data->cond, rb_intern("wait"), 2, mc->mutex, data->timeout);
+ return RTEST(signaled) ? Qtrue : Qfalse;
}
static VALUE
@@ -161,7 +161,7 @@ monitor_enter_for_cond(VALUE v)
struct wait_for_cond_data *data = (struct wait_for_cond_data *)v;
struct rb_monitor *mc = monitor_ptr(data->monitor);
- RB_OBJ_WRITE(data->monitor, &mc->owner, rb_thread_current());
+ RB_OBJ_WRITE(data->monitor, &mc->owner, rb_fiber_current());
mc->count = NUM2LONG(data->count);
return Qnil;
}
@@ -203,6 +203,10 @@ monitor_synchronize(VALUE monitor)
void
Init_monitor(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
VALUE rb_cMonitor = rb_define_class("Monitor", rb_cObject);
rb_define_alloc_func(rb_cMonitor, monitor_alloc);
@@ -216,6 +220,6 @@ Init_monitor(void)
rb_define_method(rb_cMonitor, "mon_check_owner", monitor_check_owner, 0);
rb_define_method(rb_cMonitor, "mon_owned?", monitor_owned_p, 0);
- /* internal methods for MonitorMixin::ConditionalVariable */
+ /* internal methods for MonitorMixin::ConditionVariable */
rb_define_method(rb_cMonitor, "wait_for_cond", monitor_wait_for_cond, 2);
}
diff --git a/ext/nkf/depend b/ext/nkf/depend
index 82580ff7fe..9e2f468ba1 100644
--- a/ext/nkf/depend
+++ b/ext/nkf/depend
@@ -7,9 +7,166 @@ nkf.o: $(RUBY_EXTCONF_H)
nkf.o: $(arch_hdrdir)/ruby/config.h
nkf.o: $(hdrdir)/ruby/assert.h
nkf.o: $(hdrdir)/ruby/backward.h
+nkf.o: $(hdrdir)/ruby/backward/2/assume.h
+nkf.o: $(hdrdir)/ruby/backward/2/attributes.h
+nkf.o: $(hdrdir)/ruby/backward/2/bool.h
+nkf.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nkf.o: $(hdrdir)/ruby/backward/2/limits.h
+nkf.o: $(hdrdir)/ruby/backward/2/long_long.h
+nkf.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nkf.o: $(hdrdir)/ruby/backward/2/stdarg.h
nkf.o: $(hdrdir)/ruby/defines.h
nkf.o: $(hdrdir)/ruby/encoding.h
nkf.o: $(hdrdir)/ruby/intern.h
+nkf.o: $(hdrdir)/ruby/internal/abi.h
+nkf.o: $(hdrdir)/ruby/internal/anyargs.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+nkf.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+nkf.o: $(hdrdir)/ruby/internal/assume.h
+nkf.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+nkf.o: $(hdrdir)/ruby/internal/attr/artificial.h
+nkf.o: $(hdrdir)/ruby/internal/attr/cold.h
+nkf.o: $(hdrdir)/ruby/internal/attr/const.h
+nkf.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+nkf.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+nkf.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+nkf.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+nkf.o: $(hdrdir)/ruby/internal/attr/error.h
+nkf.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+nkf.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+nkf.o: $(hdrdir)/ruby/internal/attr/format.h
+nkf.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+nkf.o: $(hdrdir)/ruby/internal/attr/noalias.h
+nkf.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+nkf.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+nkf.o: $(hdrdir)/ruby/internal/attr/noinline.h
+nkf.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+nkf.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+nkf.o: $(hdrdir)/ruby/internal/attr/pure.h
+nkf.o: $(hdrdir)/ruby/internal/attr/restrict.h
+nkf.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+nkf.o: $(hdrdir)/ruby/internal/attr/warning.h
+nkf.o: $(hdrdir)/ruby/internal/attr/weakref.h
+nkf.o: $(hdrdir)/ruby/internal/cast.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+nkf.o: $(hdrdir)/ruby/internal/compiler_since.h
+nkf.o: $(hdrdir)/ruby/internal/config.h
+nkf.o: $(hdrdir)/ruby/internal/constant_p.h
+nkf.o: $(hdrdir)/ruby/internal/core.h
+nkf.o: $(hdrdir)/ruby/internal/core/rarray.h
+nkf.o: $(hdrdir)/ruby/internal/core/rbasic.h
+nkf.o: $(hdrdir)/ruby/internal/core/rbignum.h
+nkf.o: $(hdrdir)/ruby/internal/core/rclass.h
+nkf.o: $(hdrdir)/ruby/internal/core/rdata.h
+nkf.o: $(hdrdir)/ruby/internal/core/rfile.h
+nkf.o: $(hdrdir)/ruby/internal/core/rhash.h
+nkf.o: $(hdrdir)/ruby/internal/core/robject.h
+nkf.o: $(hdrdir)/ruby/internal/core/rregexp.h
+nkf.o: $(hdrdir)/ruby/internal/core/rstring.h
+nkf.o: $(hdrdir)/ruby/internal/core/rstruct.h
+nkf.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+nkf.o: $(hdrdir)/ruby/internal/ctype.h
+nkf.o: $(hdrdir)/ruby/internal/dllexport.h
+nkf.o: $(hdrdir)/ruby/internal/dosish.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/re.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/string.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+nkf.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+nkf.o: $(hdrdir)/ruby/internal/error.h
+nkf.o: $(hdrdir)/ruby/internal/eval.h
+nkf.o: $(hdrdir)/ruby/internal/event.h
+nkf.o: $(hdrdir)/ruby/internal/fl_type.h
+nkf.o: $(hdrdir)/ruby/internal/gc.h
+nkf.o: $(hdrdir)/ruby/internal/glob.h
+nkf.o: $(hdrdir)/ruby/internal/globals.h
+nkf.o: $(hdrdir)/ruby/internal/has/attribute.h
+nkf.o: $(hdrdir)/ruby/internal/has/builtin.h
+nkf.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+nkf.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+nkf.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+nkf.o: $(hdrdir)/ruby/internal/has/extension.h
+nkf.o: $(hdrdir)/ruby/internal/has/feature.h
+nkf.o: $(hdrdir)/ruby/internal/has/warning.h
+nkf.o: $(hdrdir)/ruby/internal/intern/array.h
+nkf.o: $(hdrdir)/ruby/internal/intern/bignum.h
+nkf.o: $(hdrdir)/ruby/internal/intern/class.h
+nkf.o: $(hdrdir)/ruby/internal/intern/compar.h
+nkf.o: $(hdrdir)/ruby/internal/intern/complex.h
+nkf.o: $(hdrdir)/ruby/internal/intern/cont.h
+nkf.o: $(hdrdir)/ruby/internal/intern/dir.h
+nkf.o: $(hdrdir)/ruby/internal/intern/enum.h
+nkf.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+nkf.o: $(hdrdir)/ruby/internal/intern/error.h
+nkf.o: $(hdrdir)/ruby/internal/intern/eval.h
+nkf.o: $(hdrdir)/ruby/internal/intern/file.h
+nkf.o: $(hdrdir)/ruby/internal/intern/gc.h
+nkf.o: $(hdrdir)/ruby/internal/intern/hash.h
+nkf.o: $(hdrdir)/ruby/internal/intern/io.h
+nkf.o: $(hdrdir)/ruby/internal/intern/load.h
+nkf.o: $(hdrdir)/ruby/internal/intern/marshal.h
+nkf.o: $(hdrdir)/ruby/internal/intern/numeric.h
+nkf.o: $(hdrdir)/ruby/internal/intern/object.h
+nkf.o: $(hdrdir)/ruby/internal/intern/parse.h
+nkf.o: $(hdrdir)/ruby/internal/intern/proc.h
+nkf.o: $(hdrdir)/ruby/internal/intern/process.h
+nkf.o: $(hdrdir)/ruby/internal/intern/random.h
+nkf.o: $(hdrdir)/ruby/internal/intern/range.h
+nkf.o: $(hdrdir)/ruby/internal/intern/rational.h
+nkf.o: $(hdrdir)/ruby/internal/intern/re.h
+nkf.o: $(hdrdir)/ruby/internal/intern/ruby.h
+nkf.o: $(hdrdir)/ruby/internal/intern/select.h
+nkf.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+nkf.o: $(hdrdir)/ruby/internal/intern/signal.h
+nkf.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+nkf.o: $(hdrdir)/ruby/internal/intern/string.h
+nkf.o: $(hdrdir)/ruby/internal/intern/struct.h
+nkf.o: $(hdrdir)/ruby/internal/intern/thread.h
+nkf.o: $(hdrdir)/ruby/internal/intern/time.h
+nkf.o: $(hdrdir)/ruby/internal/intern/variable.h
+nkf.o: $(hdrdir)/ruby/internal/intern/vm.h
+nkf.o: $(hdrdir)/ruby/internal/interpreter.h
+nkf.o: $(hdrdir)/ruby/internal/iterator.h
+nkf.o: $(hdrdir)/ruby/internal/memory.h
+nkf.o: $(hdrdir)/ruby/internal/method.h
+nkf.o: $(hdrdir)/ruby/internal/module.h
+nkf.o: $(hdrdir)/ruby/internal/newobj.h
+nkf.o: $(hdrdir)/ruby/internal/rgengc.h
+nkf.o: $(hdrdir)/ruby/internal/scan_args.h
+nkf.o: $(hdrdir)/ruby/internal/special_consts.h
+nkf.o: $(hdrdir)/ruby/internal/static_assert.h
+nkf.o: $(hdrdir)/ruby/internal/stdalign.h
+nkf.o: $(hdrdir)/ruby/internal/stdbool.h
+nkf.o: $(hdrdir)/ruby/internal/symbol.h
+nkf.o: $(hdrdir)/ruby/internal/value.h
+nkf.o: $(hdrdir)/ruby/internal/value_type.h
+nkf.o: $(hdrdir)/ruby/internal/variable.h
+nkf.o: $(hdrdir)/ruby/internal/warning_push.h
+nkf.o: $(hdrdir)/ruby/internal/xmalloc.h
nkf.o: $(hdrdir)/ruby/missing.h
nkf.o: $(hdrdir)/ruby/onigmo.h
nkf.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/nkf/nkf-utf8/config.h b/ext/nkf/nkf-utf8/config.h
index 51dc2a5152..36898c0b4b 100644
--- a/ext/nkf/nkf-utf8/config.h
+++ b/ext/nkf/nkf-utf8/config.h
@@ -30,7 +30,7 @@
/* --exec-in, --exec-out option
* require pipe, fork, execvp and so on.
* please undef this on MS-DOS, MinGW
- * this is still buggy arround child process
+ * this is still buggy around child process
*/
/* #define EXEC_IO */
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index cc438a50d6..6888a43918 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -144,7 +144,7 @@ static void w_oconv(nkf_char c2, nkf_char c1);
static void w_oconv16(nkf_char c2, nkf_char c1);
static void w_oconv32(nkf_char c2, nkf_char c1);
-typedef struct {
+typedef const struct {
const char *name;
nkf_char (*iconv)(nkf_char c2, nkf_char c1, nkf_char c0);
void (*oconv)(nkf_char c2, nkf_char c1);
@@ -158,10 +158,10 @@ nkf_native_encoding NkfEncodingUTF_8 = { "UTF-8", w_iconv, w_oconv };
nkf_native_encoding NkfEncodingUTF_16 = { "UTF-16", w_iconv16, w_oconv16 };
nkf_native_encoding NkfEncodingUTF_32 = { "UTF-32", w_iconv32, w_oconv32 };
-typedef struct {
- const int id;
+typedef const struct {
+ int id;
const char *name;
- const nkf_native_encoding *base_encoding;
+ nkf_native_encoding *base_encoding;
} nkf_encoding;
nkf_encoding nkf_encoding_table[] = {
@@ -204,9 +204,9 @@ nkf_encoding nkf_encoding_table[] = {
{-1, NULL, NULL}
};
-struct {
+static const struct {
const char *name;
- const int id;
+ int id;
} encoding_name_to_id_table[] = {
{"US-ASCII", ASCII},
{"ASCII", ASCII},
@@ -581,7 +581,7 @@ static const unsigned char cv[]= {
0x00,0x00};
-/* X0201 kana conversion table for daguten */
+/* X0201 kana conversion table for dakuten */
/* 90-9F A0-DF */
static const unsigned char dv[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -602,7 +602,7 @@ static const unsigned char dv[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00};
-/* X0201 kana conversion table for han-daguten */
+/* X0201 kana conversion table for han-dakuten */
/* 90-9F A0-DF */
static const unsigned char ev[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -623,7 +623,7 @@ static const unsigned char ev[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00};
-/* X0201 kana to X0213 conversion table for han-daguten */
+/* X0201 kana to X0213 conversion table for han-dakuten */
/* 90-9F A0-DF */
static const unsigned char ev_x0213[]= {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -3817,7 +3817,7 @@ oconv_newline(void (*func)(nkf_char, nkf_char))
LF new line
SP space
- This fold algorthm does not preserve heading space in a line.
+ This fold algorithm does not preserve heading space in a line.
This is the main difference from fmt.
*/
@@ -4286,7 +4286,7 @@ static const unsigned char *mime_pattern[] = {
/* $B3:Ev$9$k%3!<%I$NM%@hEY$r>e$2$k$?$a$NL\0u(B */
-nkf_char (*mime_priority_func[])(nkf_char c2, nkf_char c1, nkf_char c0) = {
+static nkf_char (*const mime_priority_func[])(nkf_char c2, nkf_char c1, nkf_char c0) = {
e_iconv, s_iconv, 0, 0, 0, 0, 0,
#if defined(UTF8_INPUT_ENABLE)
w_iconv, w_iconv,
@@ -6787,7 +6787,7 @@ options(unsigned char *cp)
case 'S': /* Shift_JIS input */
input_encoding = nkf_enc_from_index(SHIFT_JIS);
continue;
- case 'Z': /* Convert X0208 alphabet to asii */
+ case 'Z': /* Convert X0208 alphabet to ascii */
/* alpha_f
bit:0 Convert JIS X 0208 Alphabet to ASCII
bit:1 Convert Kankaku to one space
diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
index cd3037601b..b3a520da54 100644
--- a/ext/nkf/nkf-utf8/nkf.h
+++ b/ext/nkf/nkf-utf8/nkf.h
@@ -16,8 +16,8 @@
#define X0201_DEFAULT TRUE
#endif
-#if DEFAULT_NEWLINE == 0x0D0A
-#elif DEFAULT_NEWLINE == 0x0D
+#if defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D0A
+#elif defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D
#else
#define DEFAULT_NEWLINE 0x0A
#endif
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 37717e4799..c6ddee1976 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -65,11 +65,11 @@ rb_encoding* rb_nkf_enc_get(const char *name)
{
int idx = rb_enc_find_index(name);
if (idx < 0) {
- nkf_encoding *nkf_enc = nkf_enc_find(name);
- idx = rb_enc_find_index(nkf_enc_name(nkf_enc_to_base_encoding(nkf_enc)));
- if (idx < 0) {
- idx = rb_define_dummy_encoding(name);
- }
+ nkf_encoding *nkf_enc = nkf_enc_find(name);
+ idx = rb_enc_find_index(nkf_enc_name(nkf_enc_to_base_encoding(nkf_enc)));
+ if (idx < 0) {
+ idx = rb_define_dummy_encoding(name);
+ }
}
return rb_enc_from_index(idx);
}
@@ -83,40 +83,40 @@ int nkf_split_options(const char *arg)
int is_single_quoted = FALSE;
int is_double_quoted = FALSE;
for(i = 0; arg[i]; i++){
- if(j == 255){
- return -1;
- }else if(is_single_quoted){
- if(arg[i] == '\''){
- is_single_quoted = FALSE;
- }else{
- option[j++] = arg[i];
- }
- }else if(is_escaped){
- is_escaped = FALSE;
- option[j++] = arg[i];
- }else if(arg[i] == '\\'){
- is_escaped = TRUE;
- }else if(is_double_quoted){
- if(arg[i] == '"'){
- is_double_quoted = FALSE;
- }else{
- option[j++] = arg[i];
- }
- }else if(arg[i] == '\''){
- is_single_quoted = TRUE;
- }else if(arg[i] == '"'){
- is_double_quoted = TRUE;
- }else if(arg[i] == ' '){
- option[j] = '\0';
- options(option);
- j = 0;
- }else{
- option[j++] = arg[i];
- }
+ if(j == 255){
+ return -1;
+ }else if(is_single_quoted){
+ if(arg[i] == '\''){
+ is_single_quoted = FALSE;
+ }else{
+ option[j++] = arg[i];
+ }
+ }else if(is_escaped){
+ is_escaped = FALSE;
+ option[j++] = arg[i];
+ }else if(arg[i] == '\\'){
+ is_escaped = TRUE;
+ }else if(is_double_quoted){
+ if(arg[i] == '"'){
+ is_double_quoted = FALSE;
+ }else{
+ option[j++] = arg[i];
+ }
+ }else if(arg[i] == '\''){
+ is_single_quoted = TRUE;
+ }else if(arg[i] == '"'){
+ is_double_quoted = TRUE;
+ }else if(arg[i] == ' '){
+ option[j] = '\0';
+ options(option);
+ j = 0;
+ }else{
+ option[j++] = arg[i];
+ }
}
if(j){
- option[j] = '\0';
- options(option);
+ option[j] = '\0';
+ options(option);
}
return count;
}
@@ -170,9 +170,9 @@ rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
rb_str_set_len(tmp, output_ctr);
if (mimeout_f)
- rb_enc_associate(tmp, rb_usascii_encoding());
+ rb_enc_associate(tmp, rb_usascii_encoding());
else
- rb_enc_associate(tmp, rb_nkf_enc_get(nkf_enc_name(output_encoding)));
+ rb_enc_associate(tmp, rb_nkf_enc_get(nkf_enc_name(output_encoding)));
return tmp;
}
@@ -274,7 +274,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*
* {de/en}crypt ROT13/47
*
- * === -h[123] --hiragana --katakana --katakana-hiragana
+ * === \-h[123] --hiragana --katakana --katakana-hiragana
*
* [-h1 --hiragana] Katakana to Hiragana conversion.
*
@@ -299,7 +299,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*
* New line preserving line folding.
*
- * === -Z[0-3]
+ * === \-Z[0-3]
*
* Convert X0208 alphabet (Fullwidth Alphabets) to ASCII.
*
@@ -318,7 +318,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
* With <b>-x</b>, try to preserve X0208 kana and do not convert X0201 kana to X0208.
* In JIS output, ESC-(-I is used. In EUC output, SSO is used.
*
- * === -B[0-2]
+ * === \-B[0-2]
*
* Assume broken JIS-Kanji input, which lost ESC.
* Useful when your site is using old B-News Nihongo patch.
@@ -336,7 +336,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*
* Delete \r in line feed, Add \r in line feed.
*
- * === -m[BQN0]
+ * === \-m[BQN0]
*
* MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT)
* To see ISO8859-1 (Latin-1) -l is necessary.
@@ -358,14 +358,14 @@ rb_nkf_guess(VALUE obj, VALUE src)
*
* [-MB] MIME encode Base64 stream.
*
- * [-MQ] Perfome quoted encoding.
+ * [-MQ] Perform quoted encoding.
*
* === -l
*
* Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.
* <b>-s</b>, <b>-e</b> and <b>-x</b> are not compatible with this option.
*
- * === -L[uwm]
+ * === \-L[uwm]
*
* new line mode
* Without this option, nkf doesn't convert line breaks.
@@ -458,7 +458,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
* with this and -x option, nkf can be used as UTF converter.
* (In other words, without this and -x option, nkf doesn't save some characters)
*
- * When nkf convert string which related to path, you should use this opion.
+ * When nkf convert string which related to path, you should use this option.
*
* === --cap-input
*
diff --git a/ext/nkf/nkf.gemspec b/ext/nkf/nkf.gemspec
new file mode 100644
index 0000000000..7f3bd4a4b1
--- /dev/null
+++ b/ext/nkf/nkf.gemspec
@@ -0,0 +1,24 @@
+Gem::Specification.new do |spec|
+ spec.name = "nkf"
+ spec.version = "0.1.2"
+ spec.authors = ["NARUSE Yui"]
+ spec.email = ["naruse@airemix.jp"]
+
+ spec.summary = %q{Ruby extension for Network Kanji Filter}
+ spec.description = %q{Ruby extension for Network Kanji Filter}
+ spec.homepage = "https://github.com/ruby/nkf"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+end
diff --git a/ext/objspace/depend b/ext/objspace/depend
index 18be4fe8a8..52797664e0 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -1,27 +1,334 @@
# AUTOGENERATED DEPENDENCIES START
object_tracing.o: $(RUBY_EXTCONF_H)
object_tracing.o: $(arch_hdrdir)/ruby/config.h
-object_tracing.o: $(hdrdir)/ruby.h
object_tracing.o: $(hdrdir)/ruby/assert.h
object_tracing.o: $(hdrdir)/ruby/backward.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/assume.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/attributes.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/bool.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/inttypes.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/limits.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/long_long.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/stdalign.h
+object_tracing.o: $(hdrdir)/ruby/backward/2/stdarg.h
object_tracing.o: $(hdrdir)/ruby/debug.h
object_tracing.o: $(hdrdir)/ruby/defines.h
object_tracing.o: $(hdrdir)/ruby/intern.h
+object_tracing.o: $(hdrdir)/ruby/internal/abi.h
+object_tracing.o: $(hdrdir)/ruby/internal/anyargs.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+object_tracing.o: $(hdrdir)/ruby/internal/assume.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/artificial.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/cold.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/const.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/error.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/format.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/noalias.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/noinline.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/pure.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/restrict.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/warning.h
+object_tracing.o: $(hdrdir)/ruby/internal/attr/weakref.h
+object_tracing.o: $(hdrdir)/ruby/internal/cast.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+object_tracing.o: $(hdrdir)/ruby/internal/compiler_since.h
+object_tracing.o: $(hdrdir)/ruby/internal/config.h
+object_tracing.o: $(hdrdir)/ruby/internal/constant_p.h
+object_tracing.o: $(hdrdir)/ruby/internal/core.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rarray.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rbasic.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rbignum.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rclass.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rdata.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rfile.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rhash.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/robject.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rregexp.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rstring.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rstruct.h
+object_tracing.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+object_tracing.o: $(hdrdir)/ruby/internal/ctype.h
+object_tracing.o: $(hdrdir)/ruby/internal/dllexport.h
+object_tracing.o: $(hdrdir)/ruby/internal/dosish.h
+object_tracing.o: $(hdrdir)/ruby/internal/error.h
+object_tracing.o: $(hdrdir)/ruby/internal/eval.h
+object_tracing.o: $(hdrdir)/ruby/internal/event.h
+object_tracing.o: $(hdrdir)/ruby/internal/fl_type.h
+object_tracing.o: $(hdrdir)/ruby/internal/gc.h
+object_tracing.o: $(hdrdir)/ruby/internal/glob.h
+object_tracing.o: $(hdrdir)/ruby/internal/globals.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/attribute.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/builtin.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/extension.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/feature.h
+object_tracing.o: $(hdrdir)/ruby/internal/has/warning.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/array.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/bignum.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/class.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/compar.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/complex.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/cont.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/dir.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/enum.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/error.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/eval.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/file.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/gc.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/hash.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/io.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/load.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/marshal.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/numeric.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/object.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/parse.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/proc.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/process.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/random.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/range.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/rational.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/re.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/ruby.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/select.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/signal.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/string.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/struct.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/thread.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/time.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/variable.h
+object_tracing.o: $(hdrdir)/ruby/internal/intern/vm.h
+object_tracing.o: $(hdrdir)/ruby/internal/interpreter.h
+object_tracing.o: $(hdrdir)/ruby/internal/iterator.h
+object_tracing.o: $(hdrdir)/ruby/internal/memory.h
+object_tracing.o: $(hdrdir)/ruby/internal/method.h
+object_tracing.o: $(hdrdir)/ruby/internal/module.h
+object_tracing.o: $(hdrdir)/ruby/internal/newobj.h
+object_tracing.o: $(hdrdir)/ruby/internal/rgengc.h
+object_tracing.o: $(hdrdir)/ruby/internal/scan_args.h
+object_tracing.o: $(hdrdir)/ruby/internal/special_consts.h
+object_tracing.o: $(hdrdir)/ruby/internal/static_assert.h
+object_tracing.o: $(hdrdir)/ruby/internal/stdalign.h
+object_tracing.o: $(hdrdir)/ruby/internal/stdbool.h
+object_tracing.o: $(hdrdir)/ruby/internal/symbol.h
+object_tracing.o: $(hdrdir)/ruby/internal/value.h
+object_tracing.o: $(hdrdir)/ruby/internal/value_type.h
+object_tracing.o: $(hdrdir)/ruby/internal/variable.h
+object_tracing.o: $(hdrdir)/ruby/internal/warning_push.h
+object_tracing.o: $(hdrdir)/ruby/internal/xmalloc.h
object_tracing.o: $(hdrdir)/ruby/missing.h
object_tracing.o: $(hdrdir)/ruby/ruby.h
object_tracing.o: $(hdrdir)/ruby/st.h
object_tracing.o: $(hdrdir)/ruby/subst.h
+object_tracing.o: $(top_srcdir)/gc.h
object_tracing.o: $(top_srcdir)/internal.h
object_tracing.o: object_tracing.c
object_tracing.o: objspace.h
objspace.o: $(RUBY_EXTCONF_H)
objspace.o: $(arch_hdrdir)/ruby/config.h
-objspace.o: $(hdrdir)/ruby.h
objspace.o: $(hdrdir)/ruby/assert.h
+objspace.o: $(hdrdir)/ruby/atomic.h
objspace.o: $(hdrdir)/ruby/backward.h
+objspace.o: $(hdrdir)/ruby/backward/2/assume.h
+objspace.o: $(hdrdir)/ruby/backward/2/attributes.h
+objspace.o: $(hdrdir)/ruby/backward/2/bool.h
+objspace.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+objspace.o: $(hdrdir)/ruby/backward/2/inttypes.h
+objspace.o: $(hdrdir)/ruby/backward/2/limits.h
+objspace.o: $(hdrdir)/ruby/backward/2/long_long.h
+objspace.o: $(hdrdir)/ruby/backward/2/stdalign.h
+objspace.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace.o: $(hdrdir)/ruby/defines.h
objspace.o: $(hdrdir)/ruby/encoding.h
objspace.o: $(hdrdir)/ruby/intern.h
+objspace.o: $(hdrdir)/ruby/internal/abi.h
+objspace.o: $(hdrdir)/ruby/internal/anyargs.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+objspace.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+objspace.o: $(hdrdir)/ruby/internal/assume.h
+objspace.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+objspace.o: $(hdrdir)/ruby/internal/attr/artificial.h
+objspace.o: $(hdrdir)/ruby/internal/attr/cold.h
+objspace.o: $(hdrdir)/ruby/internal/attr/const.h
+objspace.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+objspace.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+objspace.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+objspace.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+objspace.o: $(hdrdir)/ruby/internal/attr/error.h
+objspace.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+objspace.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+objspace.o: $(hdrdir)/ruby/internal/attr/format.h
+objspace.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+objspace.o: $(hdrdir)/ruby/internal/attr/noalias.h
+objspace.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+objspace.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+objspace.o: $(hdrdir)/ruby/internal/attr/noinline.h
+objspace.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+objspace.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+objspace.o: $(hdrdir)/ruby/internal/attr/pure.h
+objspace.o: $(hdrdir)/ruby/internal/attr/restrict.h
+objspace.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+objspace.o: $(hdrdir)/ruby/internal/attr/warning.h
+objspace.o: $(hdrdir)/ruby/internal/attr/weakref.h
+objspace.o: $(hdrdir)/ruby/internal/cast.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+objspace.o: $(hdrdir)/ruby/internal/compiler_since.h
+objspace.o: $(hdrdir)/ruby/internal/config.h
+objspace.o: $(hdrdir)/ruby/internal/constant_p.h
+objspace.o: $(hdrdir)/ruby/internal/core.h
+objspace.o: $(hdrdir)/ruby/internal/core/rarray.h
+objspace.o: $(hdrdir)/ruby/internal/core/rbasic.h
+objspace.o: $(hdrdir)/ruby/internal/core/rbignum.h
+objspace.o: $(hdrdir)/ruby/internal/core/rclass.h
+objspace.o: $(hdrdir)/ruby/internal/core/rdata.h
+objspace.o: $(hdrdir)/ruby/internal/core/rfile.h
+objspace.o: $(hdrdir)/ruby/internal/core/rhash.h
+objspace.o: $(hdrdir)/ruby/internal/core/rmatch.h
+objspace.o: $(hdrdir)/ruby/internal/core/robject.h
+objspace.o: $(hdrdir)/ruby/internal/core/rregexp.h
+objspace.o: $(hdrdir)/ruby/internal/core/rstring.h
+objspace.o: $(hdrdir)/ruby/internal/core/rstruct.h
+objspace.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+objspace.o: $(hdrdir)/ruby/internal/ctype.h
+objspace.o: $(hdrdir)/ruby/internal/dllexport.h
+objspace.o: $(hdrdir)/ruby/internal/dosish.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/re.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/string.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+objspace.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+objspace.o: $(hdrdir)/ruby/internal/error.h
+objspace.o: $(hdrdir)/ruby/internal/eval.h
+objspace.o: $(hdrdir)/ruby/internal/event.h
+objspace.o: $(hdrdir)/ruby/internal/fl_type.h
+objspace.o: $(hdrdir)/ruby/internal/gc.h
+objspace.o: $(hdrdir)/ruby/internal/glob.h
+objspace.o: $(hdrdir)/ruby/internal/globals.h
+objspace.o: $(hdrdir)/ruby/internal/has/attribute.h
+objspace.o: $(hdrdir)/ruby/internal/has/builtin.h
+objspace.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+objspace.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+objspace.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+objspace.o: $(hdrdir)/ruby/internal/has/extension.h
+objspace.o: $(hdrdir)/ruby/internal/has/feature.h
+objspace.o: $(hdrdir)/ruby/internal/has/warning.h
+objspace.o: $(hdrdir)/ruby/internal/intern/array.h
+objspace.o: $(hdrdir)/ruby/internal/intern/bignum.h
+objspace.o: $(hdrdir)/ruby/internal/intern/class.h
+objspace.o: $(hdrdir)/ruby/internal/intern/compar.h
+objspace.o: $(hdrdir)/ruby/internal/intern/complex.h
+objspace.o: $(hdrdir)/ruby/internal/intern/cont.h
+objspace.o: $(hdrdir)/ruby/internal/intern/dir.h
+objspace.o: $(hdrdir)/ruby/internal/intern/enum.h
+objspace.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+objspace.o: $(hdrdir)/ruby/internal/intern/error.h
+objspace.o: $(hdrdir)/ruby/internal/intern/eval.h
+objspace.o: $(hdrdir)/ruby/internal/intern/file.h
+objspace.o: $(hdrdir)/ruby/internal/intern/gc.h
+objspace.o: $(hdrdir)/ruby/internal/intern/hash.h
+objspace.o: $(hdrdir)/ruby/internal/intern/io.h
+objspace.o: $(hdrdir)/ruby/internal/intern/load.h
+objspace.o: $(hdrdir)/ruby/internal/intern/marshal.h
+objspace.o: $(hdrdir)/ruby/internal/intern/numeric.h
+objspace.o: $(hdrdir)/ruby/internal/intern/object.h
+objspace.o: $(hdrdir)/ruby/internal/intern/parse.h
+objspace.o: $(hdrdir)/ruby/internal/intern/proc.h
+objspace.o: $(hdrdir)/ruby/internal/intern/process.h
+objspace.o: $(hdrdir)/ruby/internal/intern/random.h
+objspace.o: $(hdrdir)/ruby/internal/intern/range.h
+objspace.o: $(hdrdir)/ruby/internal/intern/rational.h
+objspace.o: $(hdrdir)/ruby/internal/intern/re.h
+objspace.o: $(hdrdir)/ruby/internal/intern/ruby.h
+objspace.o: $(hdrdir)/ruby/internal/intern/select.h
+objspace.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+objspace.o: $(hdrdir)/ruby/internal/intern/signal.h
+objspace.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+objspace.o: $(hdrdir)/ruby/internal/intern/string.h
+objspace.o: $(hdrdir)/ruby/internal/intern/struct.h
+objspace.o: $(hdrdir)/ruby/internal/intern/thread.h
+objspace.o: $(hdrdir)/ruby/internal/intern/time.h
+objspace.o: $(hdrdir)/ruby/internal/intern/variable.h
+objspace.o: $(hdrdir)/ruby/internal/intern/vm.h
+objspace.o: $(hdrdir)/ruby/internal/interpreter.h
+objspace.o: $(hdrdir)/ruby/internal/iterator.h
+objspace.o: $(hdrdir)/ruby/internal/memory.h
+objspace.o: $(hdrdir)/ruby/internal/method.h
+objspace.o: $(hdrdir)/ruby/internal/module.h
+objspace.o: $(hdrdir)/ruby/internal/newobj.h
+objspace.o: $(hdrdir)/ruby/internal/rgengc.h
+objspace.o: $(hdrdir)/ruby/internal/scan_args.h
+objspace.o: $(hdrdir)/ruby/internal/special_consts.h
+objspace.o: $(hdrdir)/ruby/internal/static_assert.h
+objspace.o: $(hdrdir)/ruby/internal/stdalign.h
+objspace.o: $(hdrdir)/ruby/internal/stdbool.h
+objspace.o: $(hdrdir)/ruby/internal/symbol.h
+objspace.o: $(hdrdir)/ruby/internal/value.h
+objspace.o: $(hdrdir)/ruby/internal/value_type.h
+objspace.o: $(hdrdir)/ruby/internal/variable.h
+objspace.o: $(hdrdir)/ruby/internal/warning_push.h
+objspace.o: $(hdrdir)/ruby/internal/xmalloc.h
objspace.o: $(hdrdir)/ruby/io.h
objspace.o: $(hdrdir)/ruby/missing.h
objspace.o: $(hdrdir)/ruby/onigmo.h
@@ -31,21 +338,204 @@ objspace.o: $(hdrdir)/ruby/regex.h
objspace.o: $(hdrdir)/ruby/ruby.h
objspace.o: $(hdrdir)/ruby/st.h
objspace.o: $(hdrdir)/ruby/subst.h
+objspace.o: $(hdrdir)/ruby/thread_native.h
+objspace.o: $(top_srcdir)/ccan/check_type/check_type.h
+objspace.o: $(top_srcdir)/ccan/container_of/container_of.h
+objspace.o: $(top_srcdir)/ccan/list/list.h
+objspace.o: $(top_srcdir)/ccan/str/str.h
objspace.o: $(top_srcdir)/gc.h
+objspace.o: $(top_srcdir)/id_table.h
objspace.o: $(top_srcdir)/internal.h
+objspace.o: $(top_srcdir)/internal/array.h
+objspace.o: $(top_srcdir)/internal/basic_operators.h
+objspace.o: $(top_srcdir)/internal/class.h
+objspace.o: $(top_srcdir)/internal/compilers.h
+objspace.o: $(top_srcdir)/internal/gc.h
+objspace.o: $(top_srcdir)/internal/hash.h
+objspace.o: $(top_srcdir)/internal/imemo.h
+objspace.o: $(top_srcdir)/internal/sanitizers.h
+objspace.o: $(top_srcdir)/internal/serial.h
+objspace.o: $(top_srcdir)/internal/static_assert.h
+objspace.o: $(top_srcdir)/internal/vm.h
+objspace.o: $(top_srcdir)/internal/warnings.h
+objspace.o: $(top_srcdir)/method.h
objspace.o: $(top_srcdir)/node.h
+objspace.o: $(top_srcdir)/ruby_assert.h
+objspace.o: $(top_srcdir)/ruby_atomic.h
+objspace.o: $(top_srcdir)/shape.h
objspace.o: $(top_srcdir)/symbol.h
+objspace.o: $(top_srcdir)/thread_pthread.h
+objspace.o: $(top_srcdir)/vm_core.h
+objspace.o: $(top_srcdir)/vm_opts.h
objspace.o: objspace.c
objspace.o: {$(VPATH)}id.h
objspace_dump.o: $(RUBY_EXTCONF_H)
objspace_dump.o: $(arch_hdrdir)/ruby/config.h
-objspace_dump.o: $(hdrdir)/ruby.h
objspace_dump.o: $(hdrdir)/ruby/assert.h
+objspace_dump.o: $(hdrdir)/ruby/atomic.h
objspace_dump.o: $(hdrdir)/ruby/backward.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/assume.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/attributes.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/bool.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/inttypes.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/limits.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/long_long.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/stdalign.h
+objspace_dump.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace_dump.o: $(hdrdir)/ruby/debug.h
objspace_dump.o: $(hdrdir)/ruby/defines.h
objspace_dump.o: $(hdrdir)/ruby/encoding.h
objspace_dump.o: $(hdrdir)/ruby/intern.h
+objspace_dump.o: $(hdrdir)/ruby/internal/abi.h
+objspace_dump.o: $(hdrdir)/ruby/internal/anyargs.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+objspace_dump.o: $(hdrdir)/ruby/internal/assume.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/artificial.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/cold.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/const.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/error.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/format.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/noalias.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/noinline.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/pure.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/restrict.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/warning.h
+objspace_dump.o: $(hdrdir)/ruby/internal/attr/weakref.h
+objspace_dump.o: $(hdrdir)/ruby/internal/cast.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+objspace_dump.o: $(hdrdir)/ruby/internal/compiler_since.h
+objspace_dump.o: $(hdrdir)/ruby/internal/config.h
+objspace_dump.o: $(hdrdir)/ruby/internal/constant_p.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rarray.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rbasic.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rbignum.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rclass.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rdata.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rfile.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rhash.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/robject.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rregexp.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rstring.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rstruct.h
+objspace_dump.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+objspace_dump.o: $(hdrdir)/ruby/internal/ctype.h
+objspace_dump.o: $(hdrdir)/ruby/internal/dllexport.h
+objspace_dump.o: $(hdrdir)/ruby/internal/dosish.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/re.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/string.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+objspace_dump.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+objspace_dump.o: $(hdrdir)/ruby/internal/error.h
+objspace_dump.o: $(hdrdir)/ruby/internal/eval.h
+objspace_dump.o: $(hdrdir)/ruby/internal/event.h
+objspace_dump.o: $(hdrdir)/ruby/internal/fl_type.h
+objspace_dump.o: $(hdrdir)/ruby/internal/gc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/glob.h
+objspace_dump.o: $(hdrdir)/ruby/internal/globals.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/attribute.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/builtin.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/extension.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/feature.h
+objspace_dump.o: $(hdrdir)/ruby/internal/has/warning.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/array.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/bignum.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/class.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/compar.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/complex.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/cont.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/dir.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/enum.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/error.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/eval.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/file.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/gc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/hash.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/io.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/load.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/marshal.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/numeric.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/object.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/parse.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/proc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/process.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/random.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/range.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/rational.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/re.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/ruby.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/select.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/signal.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/string.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/struct.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/thread.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/time.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/variable.h
+objspace_dump.o: $(hdrdir)/ruby/internal/intern/vm.h
+objspace_dump.o: $(hdrdir)/ruby/internal/interpreter.h
+objspace_dump.o: $(hdrdir)/ruby/internal/iterator.h
+objspace_dump.o: $(hdrdir)/ruby/internal/memory.h
+objspace_dump.o: $(hdrdir)/ruby/internal/method.h
+objspace_dump.o: $(hdrdir)/ruby/internal/module.h
+objspace_dump.o: $(hdrdir)/ruby/internal/newobj.h
+objspace_dump.o: $(hdrdir)/ruby/internal/rgengc.h
+objspace_dump.o: $(hdrdir)/ruby/internal/scan_args.h
+objspace_dump.o: $(hdrdir)/ruby/internal/special_consts.h
+objspace_dump.o: $(hdrdir)/ruby/internal/static_assert.h
+objspace_dump.o: $(hdrdir)/ruby/internal/stdalign.h
+objspace_dump.o: $(hdrdir)/ruby/internal/stdbool.h
+objspace_dump.o: $(hdrdir)/ruby/internal/symbol.h
+objspace_dump.o: $(hdrdir)/ruby/internal/value.h
+objspace_dump.o: $(hdrdir)/ruby/internal/value_type.h
+objspace_dump.o: $(hdrdir)/ruby/internal/variable.h
+objspace_dump.o: $(hdrdir)/ruby/internal/warning_push.h
+objspace_dump.o: $(hdrdir)/ruby/internal/xmalloc.h
objspace_dump.o: $(hdrdir)/ruby/io.h
objspace_dump.o: $(hdrdir)/ruby/missing.h
objspace_dump.o: $(hdrdir)/ruby/onigmo.h
@@ -54,16 +544,35 @@ objspace_dump.o: $(hdrdir)/ruby/ruby.h
objspace_dump.o: $(hdrdir)/ruby/st.h
objspace_dump.o: $(hdrdir)/ruby/subst.h
objspace_dump.o: $(hdrdir)/ruby/thread_native.h
+objspace_dump.o: $(hdrdir)/ruby/util.h
objspace_dump.o: $(top_srcdir)/ccan/check_type/check_type.h
objspace_dump.o: $(top_srcdir)/ccan/container_of/container_of.h
objspace_dump.o: $(top_srcdir)/ccan/list/list.h
objspace_dump.o: $(top_srcdir)/ccan/str/str.h
+objspace_dump.o: $(top_srcdir)/constant.h
objspace_dump.o: $(top_srcdir)/gc.h
+objspace_dump.o: $(top_srcdir)/id_table.h
objspace_dump.o: $(top_srcdir)/internal.h
+objspace_dump.o: $(top_srcdir)/internal/array.h
+objspace_dump.o: $(top_srcdir)/internal/basic_operators.h
+objspace_dump.o: $(top_srcdir)/internal/class.h
+objspace_dump.o: $(top_srcdir)/internal/compilers.h
+objspace_dump.o: $(top_srcdir)/internal/gc.h
+objspace_dump.o: $(top_srcdir)/internal/hash.h
+objspace_dump.o: $(top_srcdir)/internal/imemo.h
+objspace_dump.o: $(top_srcdir)/internal/sanitizers.h
+objspace_dump.o: $(top_srcdir)/internal/serial.h
+objspace_dump.o: $(top_srcdir)/internal/static_assert.h
+objspace_dump.o: $(top_srcdir)/internal/string.h
+objspace_dump.o: $(top_srcdir)/internal/variable.h
+objspace_dump.o: $(top_srcdir)/internal/vm.h
+objspace_dump.o: $(top_srcdir)/internal/warnings.h
objspace_dump.o: $(top_srcdir)/method.h
objspace_dump.o: $(top_srcdir)/node.h
objspace_dump.o: $(top_srcdir)/ruby_assert.h
objspace_dump.o: $(top_srcdir)/ruby_atomic.h
+objspace_dump.o: $(top_srcdir)/shape.h
+objspace_dump.o: $(top_srcdir)/symbol.h
objspace_dump.o: $(top_srcdir)/thread_pthread.h
objspace_dump.o: $(top_srcdir)/vm_core.h
objspace_dump.o: $(top_srcdir)/vm_opts.h
diff --git a/ext/objspace/lib/objspace.rb b/ext/objspace/lib/objspace.rb
new file mode 100644
index 0000000000..6865fdda4c
--- /dev/null
+++ b/ext/objspace/lib/objspace.rb
@@ -0,0 +1,142 @@
+# frozen_string_literal: true
+
+require 'objspace.so'
+
+module ObjectSpace
+ class << self
+ private :_dump
+ private :_dump_all
+ private :_dump_shapes
+ end
+
+ module_function
+
+ # call-seq:
+ # ObjectSpace.dump(obj[, output: :string]) -> "{ ... }"
+ # ObjectSpace.dump(obj, output: :file) -> #<File:/tmp/rubyobj20131125-88733-1xkfmpv.json>
+ # ObjectSpace.dump(obj, output: :stdout) -> nil
+ #
+ # Dump the contents of a ruby object as JSON.
+ #
+ # This method is only expected to work with C Ruby.
+ # This is an experimental method and is subject to change.
+ # In particular, the function signature and output format are
+ # not guaranteed to be compatible in future versions of ruby.
+ def dump(obj, output: :string)
+ out = case output
+ when :file, nil
+ require 'tempfile'
+ Tempfile.create(%w(rubyobj .json))
+ when :stdout
+ STDOUT
+ when :string
+ +''
+ when IO
+ output
+ else
+ raise ArgumentError, "wrong output option: #{output.inspect}"
+ end
+
+ ret = _dump(obj, out)
+ return nil if output == :stdout
+ ret
+ end
+
+
+ # call-seq:
+ # ObjectSpace.dump_all([output: :file]) -> #<File:/tmp/rubyheap20131125-88469-laoj3v.json>
+ # ObjectSpace.dump_all(output: :stdout) -> nil
+ # ObjectSpace.dump_all(output: :string) -> "{...}\n{...}\n..."
+ # ObjectSpace.dump_all(output: File.open('heap.json','w')) -> #<File:heap.json>
+ # ObjectSpace.dump_all(output: :string, since: 42) -> "{...}\n{...}\n..."
+ #
+ # Dump the contents of the ruby heap as JSON.
+ #
+ # _full_ must be a boolean. If true all heap slots are dumped including the empty ones (T_NONE).
+ #
+ # _since_ must be a non-negative integer or +nil+.
+ #
+ # If _since_ is a positive integer, only objects of that generation and
+ # newer generations are dumped. The current generation can be accessed using
+ # GC::count. Objects that were allocated without object allocation tracing enabled
+ # are ignored. See ::trace_object_allocations for more information and
+ # examples.
+ #
+ # If _since_ is omitted or is +nil+, all objects are dumped.
+ #
+ # _shapes_ must be a boolean or a non-negative integer.
+ #
+ # If _shapes_ is a positive integer, only shapes newer than the provided
+ # shape id are dumped. The current shape_id can be accessed using <tt>RubyVM.stat(:next_shape_id)</tt>.
+ #
+ # If _shapes_ is +false+, no shapes are dumped.
+ #
+ # To only dump objects allocated past a certain point you can combine _since_ and _shapes_:
+ # ObjectSpace.trace_object_allocations
+ # GC.start
+ # gc_generation = GC.count
+ # shape_generation = RubyVM.stat(:next_shape_id)
+ # call_method_to_instrument
+ # ObjectSpace.dump_all(since: gc_generation, shapes: shape_generation)
+ #
+ # This method is only expected to work with C Ruby.
+ # This is an experimental method and is subject to change.
+ # In particular, the function signature and output format are
+ # not guaranteed to be compatible in future versions of ruby.
+ def dump_all(output: :file, full: false, since: nil, shapes: true)
+ out = case output
+ when :file, nil
+ require 'tempfile'
+ Tempfile.create(%w(rubyheap .json))
+ when :stdout
+ STDOUT
+ when :string
+ +''
+ when IO
+ output
+ else
+ raise ArgumentError, "wrong output option: #{output.inspect}"
+ end
+
+ shapes = 0 if shapes == true
+ ret = _dump_all(out, full, since, shapes)
+ return nil if output == :stdout
+ ret
+ end
+
+ # call-seq:
+ # ObjectSpace.dump_shapes([output: :file]) -> #<File:/tmp/rubyshapes20131125-88469-laoj3v.json>
+ # ObjectSpace.dump_shapes(output: :stdout) -> nil
+ # ObjectSpace.dump_shapes(output: :string) -> "{...}\n{...}\n..."
+ # ObjectSpace.dump_shapes(output: File.open('shapes.json','w')) -> #<File:shapes.json>
+ # ObjectSpace.dump_all(output: :string, since: 42) -> "{...}\n{...}\n..."
+ #
+ # Dump the contents of the ruby shape tree as JSON.
+ #
+ # If _shapes_ is a positive integer, only shapes newer than the provided
+ # shape id are dumped. The current shape_id can be accessed using <tt>RubyVM.stat(:next_shape_id)</tt>.
+ #
+ # This method is only expected to work with C Ruby.
+ # This is an experimental method and is subject to change.
+ # In particular, the function signature and output format are
+ # not guaranteed to be compatible in future versions of ruby.
+ def dump_shapes(output: :file, since: 0)
+ out = case output
+ when :file, nil
+ require 'tempfile'
+ Tempfile.create(%w(rubyshapes .json))
+ when :stdout
+ STDOUT
+ when :string
+ +''
+ when IO
+ output
+ else
+ raise ArgumentError, "wrong output option: #{output.inspect}"
+ end
+
+ ret = _dump_shapes(out, since)
+ return nil if output == :stdout
+ ret
+ end
+end
diff --git a/ext/objspace/lib/objspace/trace.rb b/ext/objspace/lib/objspace/trace.rb
new file mode 100644
index 0000000000..c23f5a9d52
--- /dev/null
+++ b/ext/objspace/lib/objspace/trace.rb
@@ -0,0 +1,45 @@
+# This is a simple tool to enable the object allocation tracer.
+# When you have an object of unknown provenance, you can use this
+# to investigate where the object in question is created.
+#
+# = Important notice
+#
+# This is only for debugging purpose. Do not use this in production.
+# Require'ing this file immediately starts tracing the object allocation,
+# which brings a large performance overhead.
+#
+# = Usage
+#
+# 1. Add `require "objspace/trace"` into your code (or add `-robjspace/trace` into the command line)
+# 2. `p obj` will show the allocation site of `obj`
+#
+# Note: This redefines `Kernel#p` method, but not `Object#inspect`.
+#
+# = Examples
+#
+# 1: require "objspace/trace"
+# 2:
+# 3: obj = "str"
+# 4:
+# 5: p obj #=> "str" @ test.rb:3
+
+require 'objspace.so'
+
+module Kernel
+ remove_method :p
+ define_method(:p) do |*objs|
+ objs.each do |obj|
+ file = ObjectSpace.allocation_sourcefile(obj)
+ line = ObjectSpace.allocation_sourceline(obj)
+ if file
+ puts "#{ obj.inspect } @ #{ file }:#{ line }"
+ else
+ puts obj.inspect
+ end
+ end
+ end
+end
+
+ObjectSpace.trace_object_allocations_start
+
+warn "objspace/trace is enabled"
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index a057ac2a96..8c54d51eab 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -13,6 +13,7 @@
**********************************************************************/
+#include "gc.h"
#include "internal.h"
#include "ruby/debug.h"
#include "objspace.h"
@@ -31,24 +32,24 @@ static const char *
make_unique_str(st_table *tbl, const char *str, long len)
{
if (!str) {
- return NULL;
+ return NULL;
}
else {
- st_data_t n;
- char *result;
-
- if (st_lookup(tbl, (st_data_t)str, &n)) {
- st_insert(tbl, (st_data_t)str, n+1);
- st_get_key(tbl, (st_data_t)str, &n);
- result = (char *)n;
- }
- else {
- result = (char *)ruby_xmalloc(len+1);
- strncpy(result, str, len);
- result[len] = 0;
- st_add_direct(tbl, (st_data_t)result, 1);
- }
- return result;
+ st_data_t n;
+ char *result;
+
+ if (st_lookup(tbl, (st_data_t)str, &n)) {
+ st_insert(tbl, (st_data_t)str, n+1);
+ st_get_key(tbl, (st_data_t)str, &n);
+ result = (char *)n;
+ }
+ else {
+ result = (char *)ruby_xmalloc(len+1);
+ strncpy(result, str, len);
+ result[len] = 0;
+ st_add_direct(tbl, (st_data_t)result, 1);
+ }
+ return result;
}
}
@@ -56,17 +57,17 @@ static void
delete_unique_str(st_table *tbl, const char *str)
{
if (str) {
- st_data_t n;
-
- st_lookup(tbl, (st_data_t)str, &n);
- if (n == 1) {
- n = (st_data_t)str;
- st_delete(tbl, &n, 0);
- ruby_xfree((char *)n);
- }
- else {
- st_insert(tbl, (st_data_t)str, n-1);
- }
+ st_data_t n;
+
+ st_lookup(tbl, (st_data_t)str, &n);
+ if (n == 1) {
+ n = (st_data_t)str;
+ st_delete(tbl, &n, 0);
+ ruby_xfree((char *)n);
+ }
+ else {
+ st_insert(tbl, (st_data_t)str, n-1);
+ }
}
}
@@ -87,18 +88,18 @@ newobj_i(VALUE tpval, void *data)
st_data_t v;
if (st_lookup(arg->object_table, (st_data_t)obj, &v)) {
- info = (struct allocation_info *)v;
- if (arg->keep_remains) {
- if (info->living) {
- /* do nothing. there is possibility to keep living if FREEOBJ events while suppressing tracing */
- }
- }
- /* reuse info */
- delete_unique_str(arg->str_table, info->path);
- delete_unique_str(arg->str_table, info->class_path);
+ info = (struct allocation_info *)v;
+ if (arg->keep_remains) {
+ if (info->living) {
+ /* do nothing. there is possibility to keep living if FREEOBJ events while suppressing tracing */
+ }
+ }
+ /* reuse info */
+ delete_unique_str(arg->str_table, info->path);
+ delete_unique_str(arg->str_table, info->class_path);
}
else {
- info = (struct allocation_info *)ruby_xmalloc(sizeof(struct allocation_info));
+ info = (struct allocation_info *)ruby_xmalloc(sizeof(struct allocation_info));
}
info->living = 1;
info->flags = RBASIC(obj)->flags;
@@ -121,20 +122,26 @@ freeobj_i(VALUE tpval, void *data)
st_data_t v;
struct allocation_info *info;
+ /* Modifying the st table can cause allocations, which can trigger GC.
+ * Since freeobj_i is called during GC, it must not trigger another GC. */
+ VALUE gc_disabled = rb_gc_disable_no_rest();
+
if (arg->keep_remains) {
- if (st_lookup(arg->object_table, obj, &v)) {
- info = (struct allocation_info *)v;
- info->living = 0;
- }
+ if (st_lookup(arg->object_table, obj, &v)) {
+ info = (struct allocation_info *)v;
+ info->living = 0;
+ }
}
else {
- if (st_delete(arg->object_table, &obj, &v)) {
- info = (struct allocation_info *)v;
- delete_unique_str(arg->str_table, info->path);
- delete_unique_str(arg->str_table, info->class_path);
- ruby_xfree(info);
- }
+ if (st_delete(arg->object_table, &obj, &v)) {
+ info = (struct allocation_info *)v;
+ delete_unique_str(arg->str_table, info->path);
+ delete_unique_str(arg->str_table, info->class_path);
+ ruby_xfree(info);
+ }
}
+
+ if (gc_disabled == Qfalse) rb_gc_enable();
}
static int
@@ -151,6 +158,81 @@ free_values_i(st_data_t key, st_data_t value, st_data_t data)
return ST_CONTINUE;
}
+static void
+allocation_info_tracer_mark(void *ptr)
+{
+ struct traceobj_arg *trace_arg = (struct traceobj_arg *)ptr;
+ rb_gc_mark(trace_arg->newobj_trace);
+ rb_gc_mark(trace_arg->freeobj_trace);
+}
+
+static void
+allocation_info_tracer_free(void *ptr)
+{
+ struct traceobj_arg *arg = (struct traceobj_arg *)ptr;
+ /* clear tables */
+ st_foreach(arg->object_table, free_values_i, 0);
+ st_free_table(arg->object_table);
+ st_foreach(arg->str_table, free_keys_i, 0);
+ st_free_table(arg->str_table);
+ xfree(arg);
+}
+
+static size_t
+allocation_info_tracer_memsize(const void *ptr)
+{
+ size_t size;
+ struct traceobj_arg *trace_arg = (struct traceobj_arg *)ptr;
+ size = sizeof(*trace_arg);
+ size += st_memsize(trace_arg->object_table);
+ size += st_memsize(trace_arg->str_table);
+ return size;
+}
+
+static int
+hash_foreach_should_replace_key(st_data_t key, st_data_t value, st_data_t argp, int error)
+{
+ VALUE allocated_object;
+
+ allocated_object = (VALUE)value;
+ if (allocated_object != rb_gc_location(allocated_object)) {
+ return ST_REPLACE;
+ }
+
+ return ST_CONTINUE;
+}
+
+static int
+hash_replace_key(st_data_t *key, st_data_t *value, st_data_t argp, int existing)
+{
+ *key = rb_gc_location((VALUE)*key);
+
+ return ST_CONTINUE;
+}
+
+static void
+allocation_info_tracer_compact(void *ptr)
+{
+ struct traceobj_arg *trace_arg = (struct traceobj_arg *)ptr;
+
+ if (trace_arg->object_table &&
+ st_foreach_with_replace(trace_arg->object_table, hash_foreach_should_replace_key, hash_replace_key, 0)) {
+ rb_raise(rb_eRuntimeError, "hash modified during iteration");
+ }
+}
+
+static const rb_data_type_t allocation_info_tracer_type = {
+ "ObjectTracing/allocation_info_tracer",
+ {
+ allocation_info_tracer_mark,
+ allocation_info_tracer_free, /* Never called because global */
+ allocation_info_tracer_memsize,
+ allocation_info_tracer_compact,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
+};
+
+static VALUE traceobj_arg;
static struct traceobj_arg *tmp_trace_arg; /* TODO: Do not use global variables */
static int tmp_keep_remains; /* TODO: Do not use global variables */
@@ -158,13 +240,15 @@ static struct traceobj_arg *
get_traceobj_arg(void)
{
if (tmp_trace_arg == 0) {
- tmp_trace_arg = ALLOC_N(struct traceobj_arg, 1);
- tmp_trace_arg->running = 0;
- tmp_trace_arg->keep_remains = tmp_keep_remains;
- tmp_trace_arg->newobj_trace = 0;
- tmp_trace_arg->freeobj_trace = 0;
- tmp_trace_arg->object_table = st_init_numtable();
- tmp_trace_arg->str_table = st_init_strtable();
+ VALUE obj = TypedData_Make_Struct(rb_cObject, struct traceobj_arg, &allocation_info_tracer_type, tmp_trace_arg);
+ traceobj_arg = obj;
+ rb_gc_register_mark_object(traceobj_arg);
+ tmp_trace_arg->running = 0;
+ tmp_trace_arg->keep_remains = tmp_keep_remains;
+ tmp_trace_arg->newobj_trace = 0;
+ tmp_trace_arg->freeobj_trace = 0;
+ tmp_trace_arg->object_table = st_init_numtable();
+ tmp_trace_arg->str_table = st_init_strtable();
}
return tmp_trace_arg;
}
@@ -181,17 +265,15 @@ trace_object_allocations_start(VALUE self)
struct traceobj_arg *arg = get_traceobj_arg();
if (arg->running++ > 0) {
- /* do nothing */
+ /* do nothing */
}
else {
- if (arg->newobj_trace == 0) {
- arg->newobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ, newobj_i, arg);
- rb_gc_register_mark_object(arg->newobj_trace);
- arg->freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREEOBJ, freeobj_i, arg);
- rb_gc_register_mark_object(arg->freeobj_trace);
- }
- rb_tracepoint_enable(arg->newobj_trace);
- rb_tracepoint_enable(arg->freeobj_trace);
+ if (arg->newobj_trace == 0) {
+ arg->newobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ, newobj_i, arg);
+ arg->freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREEOBJ, freeobj_i, arg);
+ }
+ rb_tracepoint_enable(arg->newobj_trace);
+ rb_tracepoint_enable(arg->freeobj_trace);
}
return Qnil;
@@ -212,12 +294,16 @@ trace_object_allocations_stop(VALUE self)
struct traceobj_arg *arg = get_traceobj_arg();
if (arg->running > 0) {
- arg->running--;
+ arg->running--;
}
if (arg->running == 0) {
- rb_tracepoint_disable(arg->newobj_trace);
- rb_tracepoint_disable(arg->freeobj_trace);
+ if (arg->newobj_trace != 0) {
+ rb_tracepoint_disable(arg->newobj_trace);
+ }
+ if (arg->freeobj_trace != 0) {
+ rb_tracepoint_disable(arg->freeobj_trace);
+ }
}
return Qnil;
@@ -295,8 +381,8 @@ object_allocations_reporter_i(st_data_t key, st_data_t val, st_data_t ptr)
else fprintf(out, "C: %p", (void *)info->klass);
fprintf(out, "@%s:%lu", info->path ? info->path : "", info->line);
if (!NIL_P(info->mid)) {
- VALUE m = rb_sym2str(info->mid);
- fprintf(out, " (%s)", RSTRING_PTR(m));
+ VALUE m = rb_sym2str(info->mid);
+ fprintf(out, " (%s)", RSTRING_PTR(m));
}
fprintf(out, ")\n");
@@ -308,7 +394,7 @@ object_allocations_reporter(FILE *out, void *ptr)
{
fprintf(out, "== object_allocations_reporter: START\n");
if (tmp_trace_arg) {
- st_foreach(tmp_trace_arg->object_table, object_allocations_reporter_i, (st_data_t)out);
+ st_foreach(tmp_trace_arg->object_table, object_allocations_reporter_i, (st_data_t)out);
}
fprintf(out, "== object_allocations_reporter: END\n");
}
@@ -318,8 +404,8 @@ trace_object_allocations_debug_start(VALUE self)
{
tmp_keep_remains = 1;
if (object_allocations_reporter_registered == 0) {
- object_allocations_reporter_registered = 1;
- rb_bug_reporter_add(object_allocations_reporter, 0);
+ object_allocations_reporter_registered = 1;
+ rb_bug_reporter_add(object_allocations_reporter, 0);
}
return trace_object_allocations_start(self);
@@ -329,10 +415,10 @@ static struct allocation_info *
lookup_allocation_info(VALUE obj)
{
if (tmp_trace_arg) {
- st_data_t info;
- if (st_lookup(tmp_trace_arg->object_table, obj, &info)) {
- return (struct allocation_info *)info;
- }
+ st_data_t info;
+ if (st_lookup(tmp_trace_arg->object_table, obj, &info)) {
+ return (struct allocation_info *)info;
+ }
}
return NULL;
}
@@ -356,10 +442,10 @@ allocation_sourcefile(VALUE self, VALUE obj)
struct allocation_info *info = lookup_allocation_info(obj);
if (info && info->path) {
- return rb_str_new2(info->path);
+ return rb_str_new2(info->path);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -376,10 +462,10 @@ allocation_sourceline(VALUE self, VALUE obj)
struct allocation_info *info = lookup_allocation_info(obj);
if (info) {
- return INT2FIX(info->line);
+ return INT2FIX(info->line);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -407,10 +493,10 @@ allocation_class_path(VALUE self, VALUE obj)
struct allocation_info *info = lookup_allocation_info(obj);
if (info && info->class_path) {
- return rb_str_new2(info->class_path);
+ return rb_str_new2(info->class_path);
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -439,10 +525,10 @@ allocation_method_id(VALUE self, VALUE obj)
{
struct allocation_info *info = lookup_allocation_info(obj);
if (info) {
- return info->mid;
+ return info->mid;
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -471,10 +557,10 @@ allocation_generation(VALUE self, VALUE obj)
{
struct allocation_info *info = lookup_allocation_info(obj);
if (info) {
- return SIZET2NUM(info->generation);
+ return SIZET2NUM(info->generation);
}
else {
- return Qnil;
+ return Qnil;
}
}
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 311e687206..ca08604c95 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -12,19 +12,28 @@
**********************************************************************/
-#include <ruby/io.h>
+#include "gc.h"
#include "internal.h"
-#include <ruby/st.h>
-#include <ruby/re.h>
+#include "internal/class.h"
+#include "internal/compilers.h"
+#include "internal/hash.h"
+#include "internal/imemo.h"
+#include "internal/sanitizers.h"
#include "node.h"
-#include "gc.h"
+#include "ruby/io.h"
+#include "ruby/re.h"
+#include "ruby/st.h"
#include "symbol.h"
+#undef rb_funcall
+
+#include "ruby/ruby.h"
+
/*
* call-seq:
* ObjectSpace.memsize_of(obj) -> Integer
*
- * Return consuming memory size of obj.
+ * Return consuming memory size of obj in bytes.
*
* Note that the return size is incomplete. You need to deal with this
* information as only a *HINT*. Especially, the size of +T_DATA+ may not be
@@ -47,37 +56,61 @@ struct total_data {
VALUE klass;
};
+static void
+total_i(VALUE v, void *ptr)
+{
+ struct total_data *data = (struct total_data *)ptr;
+
+ if (!rb_objspace_internal_object_p(v)) {
+ if (data->klass == 0 || rb_obj_is_kind_of(v, data->klass)) {
+ data->total += rb_obj_memsize_of(v);
+ }
+ }
+}
+
+typedef void (*each_obj_with_flags)(VALUE, void*);
+
+struct obj_itr {
+ each_obj_with_flags cb;
+ void *data;
+};
+
static int
-total_i(void *vstart, void *vend, size_t stride, void *ptr)
+heap_iter(void *vstart, void *vend, size_t stride, void *ptr)
{
+ struct obj_itr * ctx = (struct obj_itr *)ptr;
VALUE v;
- struct total_data *data = (struct total_data *)ptr;
for (v = (VALUE)vstart; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags) {
- switch (BUILTIN_TYPE(v)) {
- case T_NONE:
- case T_IMEMO:
- case T_ICLASS:
- case T_NODE:
- case T_ZOMBIE:
- continue;
- default:
- if (data->klass == 0 || rb_obj_is_kind_of(v, data->klass)) {
- data->total += rb_obj_memsize_of(v);
- }
- }
- }
+ void *poisoned = asan_poisoned_object_p(v);
+ asan_unpoison_object(v, false);
+
+ if (RBASIC(v)->flags) {
+ (*ctx->cb)(v, ctx->data);
+ }
+
+ if (poisoned) {
+ asan_poison_object(v);
+ }
}
return 0;
}
+static void
+each_object_with_flags(each_obj_with_flags cb, void *ctx)
+{
+ struct obj_itr data;
+ data.cb = cb;
+ data.data = ctx;
+ rb_objspace_each_objects(heap_iter, &data);
+}
+
/*
* call-seq:
* ObjectSpace.memsize_of_all([klass]) -> Integer
*
- * Return consuming memory size of all living objects.
+ * Return consuming memory size of all living objects in bytes.
*
* If +klass+ (should be Class object) is given, return the total memory size
* of instances of the given class.
@@ -107,10 +140,10 @@ memsize_of_all_m(int argc, VALUE *argv, VALUE self)
struct total_data data = {0, 0};
if (argc > 0) {
- rb_scan_args(argc, argv, "01", &data.klass);
+ rb_scan_args(argc, argv, "01", &data.klass);
}
- rb_objspace_each_objects(total_i, &data);
+ each_object_with_flags(total_i, &data);
return SIZET2NUM(data.total);
}
@@ -137,24 +170,18 @@ setup_hash(int argc, VALUE *argv)
hash = rb_hash_new();
}
else if (!RHASH_EMPTY_P(hash)) {
- st_foreach(RHASH_TBL(hash), set_zero_i, hash);
+ /* WB: no new reference */
+ st_foreach(RHASH_TBL_RAW(hash), set_zero_i, hash);
}
return hash;
}
-static int
-cos_i(void *vstart, void *vend, size_t stride, void *data)
+static void
+cos_i(VALUE v, void *data)
{
size_t *counts = (size_t *)data;
- VALUE v = (VALUE)vstart;
-
- for (;v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags) {
- counts[BUILTIN_TYPE(v)] += rb_obj_memsize_of(v);
- }
- }
- return 0;
+ counts[BUILTIN_TYPE(v)] += rb_obj_memsize_of(v);
}
static VALUE
@@ -163,33 +190,33 @@ type2sym(enum ruby_value_type i)
VALUE type;
switch (i) {
#define CASE_TYPE(t) case t: type = ID2SYM(rb_intern(#t)); break;
- CASE_TYPE(T_NONE);
- CASE_TYPE(T_OBJECT);
- CASE_TYPE(T_CLASS);
- CASE_TYPE(T_MODULE);
- CASE_TYPE(T_FLOAT);
- CASE_TYPE(T_STRING);
- CASE_TYPE(T_REGEXP);
- CASE_TYPE(T_ARRAY);
- CASE_TYPE(T_HASH);
- CASE_TYPE(T_STRUCT);
- CASE_TYPE(T_BIGNUM);
- CASE_TYPE(T_FILE);
- CASE_TYPE(T_DATA);
- CASE_TYPE(T_MATCH);
- CASE_TYPE(T_COMPLEX);
- CASE_TYPE(T_RATIONAL);
- CASE_TYPE(T_NIL);
- CASE_TYPE(T_TRUE);
- CASE_TYPE(T_FALSE);
- CASE_TYPE(T_SYMBOL);
- CASE_TYPE(T_FIXNUM);
- CASE_TYPE(T_UNDEF);
- CASE_TYPE(T_IMEMO);
- CASE_TYPE(T_NODE);
- CASE_TYPE(T_ICLASS);
+ CASE_TYPE(T_NONE);
+ CASE_TYPE(T_OBJECT);
+ CASE_TYPE(T_CLASS);
+ CASE_TYPE(T_MODULE);
+ CASE_TYPE(T_FLOAT);
+ CASE_TYPE(T_STRING);
+ CASE_TYPE(T_REGEXP);
+ CASE_TYPE(T_ARRAY);
+ CASE_TYPE(T_HASH);
+ CASE_TYPE(T_STRUCT);
+ CASE_TYPE(T_BIGNUM);
+ CASE_TYPE(T_FILE);
+ CASE_TYPE(T_DATA);
+ CASE_TYPE(T_MATCH);
+ CASE_TYPE(T_COMPLEX);
+ CASE_TYPE(T_RATIONAL);
+ CASE_TYPE(T_NIL);
+ CASE_TYPE(T_TRUE);
+ CASE_TYPE(T_FALSE);
+ CASE_TYPE(T_SYMBOL);
+ CASE_TYPE(T_FIXNUM);
+ CASE_TYPE(T_UNDEF);
+ CASE_TYPE(T_IMEMO);
+ CASE_TYPE(T_NODE);
+ CASE_TYPE(T_ICLASS);
CASE_TYPE(T_MOVED);
- CASE_TYPE(T_ZOMBIE);
+ CASE_TYPE(T_ZOMBIE);
#undef CASE_TYPE
default: rb_bug("type2sym: unknown type (%d)", i);
}
@@ -228,17 +255,17 @@ count_objects_size(int argc, VALUE *argv, VALUE os)
VALUE hash = setup_hash(argc, argv);
for (i = 0; i <= T_MASK; i++) {
- counts[i] = 0;
+ counts[i] = 0;
}
- rb_objspace_each_objects(cos_i, &counts[0]);
+ each_object_with_flags(cos_i, &counts[0]);
for (i = 0; i <= T_MASK; i++) {
- if (counts[i]) {
- VALUE type = type2sym(i);
- total += counts[i];
- rb_hash_aset(hash, type, SIZET2NUM(counts[i]));
- }
+ if (counts[i]) {
+ VALUE type = type2sym(i);
+ total += counts[i];
+ rb_hash_aset(hash, type, SIZET2NUM(counts[i]));
+ }
}
rb_hash_aset(hash, ID2SYM(rb_intern("TOTAL")), SIZET2NUM(total));
return hash;
@@ -249,25 +276,20 @@ struct dynamic_symbol_counts {
size_t immortal;
};
-static int
-cs_i(void *vstart, void *vend, size_t stride, void *n)
+static void
+cs_i(VALUE v, void *n)
{
struct dynamic_symbol_counts *counts = (struct dynamic_symbol_counts *)n;
- VALUE v = (VALUE)vstart;
-
- for (; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags && BUILTIN_TYPE(v) == T_SYMBOL) {
- ID id = RSYMBOL(v)->id;
- if ((id & ~ID_SCOPE_MASK) == 0) {
- counts->mortal++;
- }
- else {
- counts->immortal++;
- }
- }
- }
- return 0;
+ if (BUILTIN_TYPE(v) == T_SYMBOL) {
+ ID id = RSYMBOL(v)->id;
+ if ((id & ~ID_SCOPE_MASK) == 0) {
+ counts->mortal++;
+ }
+ else {
+ counts->immortal++;
+ }
+ }
}
size_t rb_sym_immortal_count(void);
@@ -305,7 +327,7 @@ count_symbols(int argc, VALUE *argv, VALUE os)
VALUE hash = setup_hash(argc, argv);
size_t immortal_symbols = rb_sym_immortal_count();
- rb_objspace_each_objects(cs_i, &dynamic_counts);
+ each_object_with_flags(cs_i, &dynamic_counts);
rb_hash_aset(hash, ID2SYM(rb_intern("mortal_dynamic_symbol")), SIZET2NUM(dynamic_counts.mortal));
rb_hash_aset(hash, ID2SYM(rb_intern("immortal_dynamic_symbol")), SIZET2NUM(dynamic_counts.immortal));
@@ -315,20 +337,15 @@ count_symbols(int argc, VALUE *argv, VALUE os)
return hash;
}
-static int
-cn_i(void *vstart, void *vend, size_t stride, void *n)
+static void
+cn_i(VALUE v, void *n)
{
size_t *nodes = (size_t *)n;
- VALUE v = (VALUE)vstart;
- for (; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags && BUILTIN_TYPE(v) == T_NODE) {
- size_t s = nd_type((NODE *)v);
- nodes[s]++;
- }
+ if (BUILTIN_TYPE(v) == T_NODE) {
+ size_t s = nd_type((NODE *)v);
+ nodes[s]++;
}
-
- return 0;
}
/*
@@ -362,161 +379,157 @@ count_nodes(int argc, VALUE *argv, VALUE os)
VALUE hash = setup_hash(argc, argv);
for (i = 0; i <= NODE_LAST; i++) {
- nodes[i] = 0;
+ nodes[i] = 0;
}
- rb_objspace_each_objects(cn_i, &nodes[0]);
+ each_object_with_flags(cn_i, &nodes[0]);
for (i=0; i<NODE_LAST; i++) {
- if (nodes[i] != 0) {
- VALUE node;
- switch (i) {
+ if (nodes[i] != 0) {
+ VALUE node;
+ switch (i) {
#define COUNT_NODE(n) case n: node = ID2SYM(rb_intern(#n)); goto set
- COUNT_NODE(NODE_SCOPE);
- COUNT_NODE(NODE_BLOCK);
- COUNT_NODE(NODE_IF);
- COUNT_NODE(NODE_UNLESS);
- COUNT_NODE(NODE_CASE);
- COUNT_NODE(NODE_CASE2);
+ COUNT_NODE(NODE_SCOPE);
+ COUNT_NODE(NODE_BLOCK);
+ COUNT_NODE(NODE_IF);
+ COUNT_NODE(NODE_UNLESS);
+ COUNT_NODE(NODE_CASE);
+ COUNT_NODE(NODE_CASE2);
COUNT_NODE(NODE_CASE3);
- COUNT_NODE(NODE_WHEN);
+ COUNT_NODE(NODE_WHEN);
COUNT_NODE(NODE_IN);
- COUNT_NODE(NODE_WHILE);
- COUNT_NODE(NODE_UNTIL);
- COUNT_NODE(NODE_ITER);
- COUNT_NODE(NODE_FOR);
- COUNT_NODE(NODE_FOR_MASGN);
- COUNT_NODE(NODE_BREAK);
- COUNT_NODE(NODE_NEXT);
- COUNT_NODE(NODE_REDO);
- COUNT_NODE(NODE_RETRY);
- COUNT_NODE(NODE_BEGIN);
- COUNT_NODE(NODE_RESCUE);
- COUNT_NODE(NODE_RESBODY);
- COUNT_NODE(NODE_ENSURE);
- COUNT_NODE(NODE_AND);
- COUNT_NODE(NODE_OR);
- COUNT_NODE(NODE_MASGN);
- COUNT_NODE(NODE_LASGN);
- COUNT_NODE(NODE_DASGN);
- COUNT_NODE(NODE_DASGN_CURR);
- COUNT_NODE(NODE_GASGN);
- COUNT_NODE(NODE_IASGN);
- COUNT_NODE(NODE_CDECL);
- COUNT_NODE(NODE_CVASGN);
- COUNT_NODE(NODE_OP_ASGN1);
- COUNT_NODE(NODE_OP_ASGN2);
- COUNT_NODE(NODE_OP_ASGN_AND);
- COUNT_NODE(NODE_OP_ASGN_OR);
- COUNT_NODE(NODE_OP_CDECL);
- COUNT_NODE(NODE_CALL);
- COUNT_NODE(NODE_OPCALL);
- COUNT_NODE(NODE_FCALL);
- COUNT_NODE(NODE_VCALL);
- COUNT_NODE(NODE_QCALL);
- COUNT_NODE(NODE_SUPER);
- COUNT_NODE(NODE_ZSUPER);
- COUNT_NODE(NODE_LIST);
- COUNT_NODE(NODE_ZLIST);
- COUNT_NODE(NODE_VALUES);
- COUNT_NODE(NODE_HASH);
- COUNT_NODE(NODE_RETURN);
- COUNT_NODE(NODE_YIELD);
- COUNT_NODE(NODE_LVAR);
- COUNT_NODE(NODE_DVAR);
- COUNT_NODE(NODE_GVAR);
- COUNT_NODE(NODE_IVAR);
- COUNT_NODE(NODE_CONST);
- COUNT_NODE(NODE_CVAR);
- COUNT_NODE(NODE_NTH_REF);
- COUNT_NODE(NODE_BACK_REF);
- COUNT_NODE(NODE_MATCH);
- COUNT_NODE(NODE_MATCH2);
- COUNT_NODE(NODE_MATCH3);
- COUNT_NODE(NODE_LIT);
- COUNT_NODE(NODE_STR);
- COUNT_NODE(NODE_DSTR);
- COUNT_NODE(NODE_XSTR);
- COUNT_NODE(NODE_DXSTR);
- COUNT_NODE(NODE_EVSTR);
- COUNT_NODE(NODE_DREGX);
- COUNT_NODE(NODE_ONCE);
- COUNT_NODE(NODE_ARGS);
- COUNT_NODE(NODE_ARGS_AUX);
- COUNT_NODE(NODE_OPT_ARG);
- COUNT_NODE(NODE_KW_ARG);
- COUNT_NODE(NODE_POSTARG);
- COUNT_NODE(NODE_ARGSCAT);
- COUNT_NODE(NODE_ARGSPUSH);
- COUNT_NODE(NODE_SPLAT);
- COUNT_NODE(NODE_BLOCK_PASS);
- COUNT_NODE(NODE_DEFN);
- COUNT_NODE(NODE_DEFS);
- COUNT_NODE(NODE_ALIAS);
- COUNT_NODE(NODE_VALIAS);
- COUNT_NODE(NODE_UNDEF);
- COUNT_NODE(NODE_CLASS);
- COUNT_NODE(NODE_MODULE);
- COUNT_NODE(NODE_SCLASS);
- COUNT_NODE(NODE_COLON2);
- COUNT_NODE(NODE_COLON3);
- COUNT_NODE(NODE_DOT2);
- COUNT_NODE(NODE_DOT3);
- COUNT_NODE(NODE_FLIP2);
- COUNT_NODE(NODE_FLIP3);
- COUNT_NODE(NODE_SELF);
- COUNT_NODE(NODE_NIL);
- COUNT_NODE(NODE_TRUE);
- COUNT_NODE(NODE_FALSE);
- COUNT_NODE(NODE_ERRINFO);
- COUNT_NODE(NODE_DEFINED);
- COUNT_NODE(NODE_POSTEXE);
- COUNT_NODE(NODE_DSYM);
- COUNT_NODE(NODE_ATTRASGN);
- COUNT_NODE(NODE_LAMBDA);
+ COUNT_NODE(NODE_WHILE);
+ COUNT_NODE(NODE_UNTIL);
+ COUNT_NODE(NODE_ITER);
+ COUNT_NODE(NODE_FOR);
+ COUNT_NODE(NODE_FOR_MASGN);
+ COUNT_NODE(NODE_BREAK);
+ COUNT_NODE(NODE_NEXT);
+ COUNT_NODE(NODE_REDO);
+ COUNT_NODE(NODE_RETRY);
+ COUNT_NODE(NODE_BEGIN);
+ COUNT_NODE(NODE_RESCUE);
+ COUNT_NODE(NODE_RESBODY);
+ COUNT_NODE(NODE_ENSURE);
+ COUNT_NODE(NODE_AND);
+ COUNT_NODE(NODE_OR);
+ COUNT_NODE(NODE_MASGN);
+ COUNT_NODE(NODE_LASGN);
+ COUNT_NODE(NODE_DASGN);
+ COUNT_NODE(NODE_GASGN);
+ COUNT_NODE(NODE_IASGN);
+ COUNT_NODE(NODE_CDECL);
+ COUNT_NODE(NODE_CVASGN);
+ COUNT_NODE(NODE_OP_ASGN1);
+ COUNT_NODE(NODE_OP_ASGN2);
+ COUNT_NODE(NODE_OP_ASGN_AND);
+ COUNT_NODE(NODE_OP_ASGN_OR);
+ COUNT_NODE(NODE_OP_CDECL);
+ COUNT_NODE(NODE_CALL);
+ COUNT_NODE(NODE_OPCALL);
+ COUNT_NODE(NODE_FCALL);
+ COUNT_NODE(NODE_VCALL);
+ COUNT_NODE(NODE_QCALL);
+ COUNT_NODE(NODE_SUPER);
+ COUNT_NODE(NODE_ZSUPER);
+ COUNT_NODE(NODE_LIST);
+ COUNT_NODE(NODE_ZLIST);
+ COUNT_NODE(NODE_VALUES);
+ COUNT_NODE(NODE_HASH);
+ COUNT_NODE(NODE_RETURN);
+ COUNT_NODE(NODE_YIELD);
+ COUNT_NODE(NODE_LVAR);
+ COUNT_NODE(NODE_DVAR);
+ COUNT_NODE(NODE_GVAR);
+ COUNT_NODE(NODE_IVAR);
+ COUNT_NODE(NODE_CONST);
+ COUNT_NODE(NODE_CVAR);
+ COUNT_NODE(NODE_NTH_REF);
+ COUNT_NODE(NODE_BACK_REF);
+ COUNT_NODE(NODE_MATCH);
+ COUNT_NODE(NODE_MATCH2);
+ COUNT_NODE(NODE_MATCH3);
+ COUNT_NODE(NODE_LIT);
+ COUNT_NODE(NODE_STR);
+ COUNT_NODE(NODE_DSTR);
+ COUNT_NODE(NODE_XSTR);
+ COUNT_NODE(NODE_DXSTR);
+ COUNT_NODE(NODE_EVSTR);
+ COUNT_NODE(NODE_DREGX);
+ COUNT_NODE(NODE_ONCE);
+ COUNT_NODE(NODE_ARGS);
+ COUNT_NODE(NODE_ARGS_AUX);
+ COUNT_NODE(NODE_OPT_ARG);
+ COUNT_NODE(NODE_KW_ARG);
+ COUNT_NODE(NODE_POSTARG);
+ COUNT_NODE(NODE_ARGSCAT);
+ COUNT_NODE(NODE_ARGSPUSH);
+ COUNT_NODE(NODE_SPLAT);
+ COUNT_NODE(NODE_BLOCK_PASS);
+ COUNT_NODE(NODE_DEFN);
+ COUNT_NODE(NODE_DEFS);
+ COUNT_NODE(NODE_ALIAS);
+ COUNT_NODE(NODE_VALIAS);
+ COUNT_NODE(NODE_UNDEF);
+ COUNT_NODE(NODE_CLASS);
+ COUNT_NODE(NODE_MODULE);
+ COUNT_NODE(NODE_SCLASS);
+ COUNT_NODE(NODE_COLON2);
+ COUNT_NODE(NODE_COLON3);
+ COUNT_NODE(NODE_DOT2);
+ COUNT_NODE(NODE_DOT3);
+ COUNT_NODE(NODE_FLIP2);
+ COUNT_NODE(NODE_FLIP3);
+ COUNT_NODE(NODE_SELF);
+ COUNT_NODE(NODE_NIL);
+ COUNT_NODE(NODE_TRUE);
+ COUNT_NODE(NODE_FALSE);
+ COUNT_NODE(NODE_ERRINFO);
+ COUNT_NODE(NODE_DEFINED);
+ COUNT_NODE(NODE_POSTEXE);
+ COUNT_NODE(NODE_DSYM);
+ COUNT_NODE(NODE_ATTRASGN);
+ COUNT_NODE(NODE_LAMBDA);
COUNT_NODE(NODE_ARYPTN);
+ COUNT_NODE(NODE_FNDPTN);
COUNT_NODE(NODE_HSHPTN);
+ COUNT_NODE(NODE_ERROR);
#undef COUNT_NODE
- case NODE_LAST: break;
- }
- UNREACHABLE;
- set:
- rb_hash_aset(hash, node, SIZET2NUM(nodes[i]));
- }
+ case NODE_LAST: break;
+ }
+ UNREACHABLE;
+ set:
+ rb_hash_aset(hash, node, SIZET2NUM(nodes[i]));
+ }
}
return hash;
}
-static int
-cto_i(void *vstart, void *vend, size_t stride, void *data)
+static void
+cto_i(VALUE v, void *data)
{
VALUE hash = (VALUE)data;
- VALUE v = (VALUE)vstart;
-
- for (; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags && BUILTIN_TYPE(v) == T_DATA) {
- VALUE counter;
- VALUE key = RBASIC(v)->klass;
-
- if (key == 0) {
- const char *name = rb_objspace_data_type_name(v);
- if (name == 0) name = "unknown";
- key = ID2SYM(rb_intern(name));
- }
-
- counter = rb_hash_aref(hash, key);
- if (NIL_P(counter)) {
- counter = INT2FIX(1);
- }
- else {
- counter = INT2FIX(FIX2INT(counter) + 1);
- }
-
- rb_hash_aset(hash, key, counter);
- }
- }
- return 0;
+ if (BUILTIN_TYPE(v) == T_DATA) {
+ VALUE counter;
+ VALUE key = RBASIC(v)->klass;
+
+ if (key == 0) {
+ const char *name = rb_objspace_data_type_name(v);
+ if (name == 0) name = "unknown";
+ key = ID2SYM(rb_intern(name));
+ }
+
+ counter = rb_hash_aref(hash, key);
+ if (NIL_P(counter)) {
+ counter = INT2FIX(1);
+ }
+ else {
+ counter = INT2FIX(FIX2INT(counter) + 1);
+ }
+
+ rb_hash_aset(hash, key, counter);
+ }
}
/*
@@ -555,37 +568,32 @@ static VALUE
count_tdata_objects(int argc, VALUE *argv, VALUE self)
{
VALUE hash = setup_hash(argc, argv);
- rb_objspace_each_objects(cto_i, (void *)hash);
+ each_object_with_flags(cto_i, (void *)hash);
return hash;
}
static ID imemo_type_ids[IMEMO_MASK+1];
-static int
-count_imemo_objects_i(void *vstart, void *vend, size_t stride, void *data)
+static void
+count_imemo_objects_i(VALUE v, void *data)
{
VALUE hash = (VALUE)data;
- VALUE v = (VALUE)vstart;
- for (; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags && BUILTIN_TYPE(v) == T_IMEMO) {
- VALUE counter;
- VALUE key = ID2SYM(imemo_type_ids[imemo_type(v)]);
+ if (BUILTIN_TYPE(v) == T_IMEMO) {
+ VALUE counter;
+ VALUE key = ID2SYM(imemo_type_ids[imemo_type(v)]);
- counter = rb_hash_aref(hash, key);
+ counter = rb_hash_aref(hash, key);
- if (NIL_P(counter)) {
- counter = INT2FIX(1);
- }
- else {
- counter = INT2FIX(FIX2INT(counter) + 1);
- }
+ if (NIL_P(counter)) {
+ counter = INT2FIX(1);
+ }
+ else {
+ counter = INT2FIX(FIX2INT(counter) + 1);
+ }
- rb_hash_aset(hash, key, counter);
- }
+ rb_hash_aset(hash, key, counter);
}
-
- return 0;
}
/*
@@ -622,20 +630,25 @@ count_imemo_objects(int argc, VALUE *argv, VALUE self)
VALUE hash = setup_hash(argc, argv);
if (imemo_type_ids[0] == 0) {
- imemo_type_ids[0] = rb_intern("imemo_env");
- imemo_type_ids[1] = rb_intern("imemo_cref");
- imemo_type_ids[2] = rb_intern("imemo_svar");
- imemo_type_ids[3] = rb_intern("imemo_throw_data");
- imemo_type_ids[4] = rb_intern("imemo_ifunc");
- imemo_type_ids[5] = rb_intern("imemo_memo");
- imemo_type_ids[6] = rb_intern("imemo_ment");
- imemo_type_ids[7] = rb_intern("imemo_iseq");
- imemo_type_ids[8] = rb_intern("imemo_tmpbuf");
- imemo_type_ids[9] = rb_intern("imemo_ast");
- imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
+#define INIT_IMEMO_TYPE_ID(n) (imemo_type_ids[n] = rb_intern_const(#n))
+ INIT_IMEMO_TYPE_ID(imemo_env);
+ INIT_IMEMO_TYPE_ID(imemo_cref);
+ INIT_IMEMO_TYPE_ID(imemo_svar);
+ INIT_IMEMO_TYPE_ID(imemo_throw_data);
+ INIT_IMEMO_TYPE_ID(imemo_ifunc);
+ INIT_IMEMO_TYPE_ID(imemo_memo);
+ INIT_IMEMO_TYPE_ID(imemo_ment);
+ INIT_IMEMO_TYPE_ID(imemo_iseq);
+ INIT_IMEMO_TYPE_ID(imemo_tmpbuf);
+ INIT_IMEMO_TYPE_ID(imemo_ast);
+ INIT_IMEMO_TYPE_ID(imemo_parser_strterm);
+ INIT_IMEMO_TYPE_ID(imemo_callinfo);
+ INIT_IMEMO_TYPE_ID(imemo_callcache);
+ INIT_IMEMO_TYPE_ID(imemo_constcache);
+#undef INIT_IMEMO_TYPE_ID
}
- rb_objspace_each_objects(count_imemo_objects_i, (void *)hash);
+ each_object_with_flags(count_imemo_objects_i, (void *)hash);
return hash;
}
@@ -659,12 +672,12 @@ static const rb_data_type_t iow_data_type = {
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
-static VALUE rb_mInternalObjectWrapper;
+static VALUE rb_cInternalObjectWrapper;
static VALUE
iow_newobj(VALUE obj)
{
- return TypedData_Wrap_Struct(rb_mInternalObjectWrapper, &iow_data_type, (void *)obj);
+ return TypedData_Wrap_Struct(rb_cInternalObjectWrapper, &iow_data_type, (void *)obj);
}
/* Returns the type of the internal object. */
@@ -694,8 +707,8 @@ iow_internal_object_id(VALUE self)
}
struct rof_data {
- st_table *refs;
- VALUE internals;
+ VALUE refs;
+ VALUE values;
};
static void
@@ -706,11 +719,15 @@ reachable_object_from_i(VALUE obj, void *data_ptr)
VALUE val = obj;
if (rb_objspace_markable_object_p(obj)) {
- if (rb_objspace_internal_object_p(obj)) {
- val = iow_newobj(obj);
- rb_ary_push(data->internals, val);
- }
- st_insert(data->refs, key, val);
+ if (NIL_P(rb_hash_lookup(data->refs, key))) {
+ rb_hash_aset(data->refs, key, Qtrue);
+
+ if (rb_objspace_internal_object_p(obj)) {
+ val = iow_newobj(obj);
+ }
+
+ rb_ary_push(data->values, val);
+ }
}
}
@@ -768,23 +785,21 @@ static VALUE
reachable_objects_from(VALUE self, VALUE obj)
{
if (rb_objspace_markable_object_p(obj)) {
- VALUE ret = rb_ary_new();
- struct rof_data data;
+ struct rof_data data;
- if (rb_typeddata_is_kind_of(obj, &iow_data_type)) {
- obj = (VALUE)DATA_PTR(obj);
- }
+ if (rb_typeddata_is_kind_of(obj, &iow_data_type)) {
+ obj = (VALUE)DATA_PTR(obj);
+ }
- data.refs = st_init_numtable();
- data.internals = rb_ary_new();
+ data.refs = rb_obj_hide(rb_ident_hash_new());
+ data.values = rb_ary_new();
- rb_objspace_reachable_objects_from(obj, reachable_object_from_i, &data);
+ rb_objspace_reachable_objects_from(obj, reachable_object_from_i, &data);
- st_foreach(data.refs, collect_values, (st_data_t)ret);
- return ret;
+ return data.values;
}
else {
- return Qnil;
+ return Qnil;
}
}
@@ -803,26 +818,26 @@ reachable_object_from_root_i(const char *category, VALUE obj, void *ptr)
VALUE category_objects;
if (category == data->last_category) {
- category_str = data->last_category_str;
- category_objects = data->last_category_objects;
+ category_str = data->last_category_str;
+ category_objects = data->last_category_objects;
}
else {
- data->last_category = category;
- category_str = data->last_category_str = rb_str_new2(category);
- category_objects = data->last_category_objects = rb_ident_hash_new();
- if (!NIL_P(rb_hash_lookup(data->categories, category_str))) {
- rb_bug("reachable_object_from_root_i: category should insert at once");
- }
- rb_hash_aset(data->categories, category_str, category_objects);
+ data->last_category = category;
+ category_str = data->last_category_str = rb_str_new2(category);
+ category_objects = data->last_category_objects = rb_ident_hash_new();
+ if (!NIL_P(rb_hash_lookup(data->categories, category_str))) {
+ rb_bug("reachable_object_from_root_i: category should insert at once");
+ }
+ rb_hash_aset(data->categories, category_str, category_objects);
}
if (rb_objspace_markable_object_p(obj) &&
- obj != data->categories &&
- obj != data->last_category_objects) {
- if (rb_objspace_internal_object_p(obj)) {
- obj = iow_newobj(obj);
- }
- rb_hash_aset(category_objects, obj, obj);
+ obj != data->categories &&
+ obj != data->last_category_objects) {
+ if (rb_objspace_internal_object_p(obj)) {
+ obj = iow_newobj(obj);
+ }
+ rb_hash_aset(category_objects, obj, obj);
}
}
@@ -858,13 +873,14 @@ static VALUE
wrap_klass_iow(VALUE klass)
{
if (!RTEST(klass)) {
- return Qnil;
+ return Qnil;
}
- else if (RB_TYPE_P(klass, T_ICLASS)) {
- return iow_newobj(klass);
+ else if (RB_TYPE_P(klass, T_ICLASS) ||
+ CLASS_OF(klass) == Qfalse /* hidden object */) {
+ return iow_newobj(klass);
}
else {
- return klass;
+ return klass;
}
}
@@ -883,11 +899,16 @@ objspace_internal_class_of(VALUE self, VALUE obj)
VALUE klass;
if (rb_typeddata_is_kind_of(obj, &iow_data_type)) {
- obj = (VALUE)DATA_PTR(obj);
+ obj = (VALUE)DATA_PTR(obj);
}
- klass = CLASS_OF(obj);
- return wrap_klass_iow(klass);
+ if (RB_TYPE_P(obj, T_IMEMO)) {
+ return Qnil;
+ }
+ else {
+ klass = CLASS_OF(obj);
+ return wrap_klass_iow(klass);
+ }
}
/*
@@ -905,17 +926,17 @@ objspace_internal_super_of(VALUE self, VALUE obj)
VALUE super;
if (rb_typeddata_is_kind_of(obj, &iow_data_type)) {
- obj = (VALUE)DATA_PTR(obj);
+ obj = (VALUE)DATA_PTR(obj);
}
switch (OBJ_BUILTIN_TYPE(obj)) {
case T_MODULE:
case T_CLASS:
case T_ICLASS:
- super = RCLASS_SUPER(obj);
- break;
+ super = RCLASS_SUPER(obj);
+ break;
default:
- rb_raise(rb_eArgError, "class or module is expected");
+ rb_raise(rb_eArgError, "class or module is expected");
}
return wrap_klass_iow(super);
@@ -973,10 +994,11 @@ Init_objspace(void)
*
* You can use the #type method to check the type of the internal object.
*/
- rb_mInternalObjectWrapper = rb_define_class_under(rb_mObjSpace, "InternalObjectWrapper", rb_cObject);
- rb_define_method(rb_mInternalObjectWrapper, "type", iow_type, 0);
- rb_define_method(rb_mInternalObjectWrapper, "inspect", iow_inspect, 0);
- rb_define_method(rb_mInternalObjectWrapper, "internal_object_id", iow_internal_object_id, 0);
+ rb_cInternalObjectWrapper = rb_define_class_under(rb_mObjSpace, "InternalObjectWrapper", rb_cObject);
+ rb_undef_alloc_func(rb_cInternalObjectWrapper);
+ rb_define_method(rb_cInternalObjectWrapper, "type", iow_type, 0);
+ rb_define_method(rb_cInternalObjectWrapper, "inspect", iow_inspect, 0);
+ rb_define_method(rb_cInternalObjectWrapper, "internal_object_id", iow_internal_object_id, 0);
Init_object_tracing(rb_mObjSpace);
Init_objspace_dump(rb_mObjSpace);
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index 5fa9d98e38..c3cc9a1e7b 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -12,43 +12,177 @@
**********************************************************************/
-#include "ruby/io.h"
-#include "internal.h"
-#include "ruby/debug.h"
#include "gc.h"
+#include "id_table.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/class.h"
+#include "internal/hash.h"
+#include "internal/string.h"
+#include "internal/sanitizers.h"
+#include "symbol.h"
+#include "shape.h"
#include "node.h"
-#include "vm_core.h"
#include "objspace.h"
+#include "ruby/debug.h"
+#include "ruby/util.h"
+#include "ruby/io.h"
+#include "vm_core.h"
-static VALUE sym_output, sym_stdout, sym_string, sym_file;
-static VALUE sym_full;
+RUBY_EXTERN const char ruby_hexdigits[];
+
+#define BUFFER_CAPACITY 4096
struct dump_config {
VALUE type;
- FILE *stream;
+ VALUE stream;
VALUE string;
const char *root_category;
VALUE cur_obj;
VALUE cur_obj_klass;
+ size_t cur_page_slot_size;
size_t cur_obj_references;
unsigned int roots: 1;
unsigned int full_heap: 1;
+ unsigned int partial_dump;
+ size_t since;
+ size_t shapes_since;
+ unsigned long buffer_len;
+ char buffer[BUFFER_CAPACITY];
};
-PRINTF_ARGS(static void dump_append(struct dump_config *, const char *, ...), 2, 3);
static void
-dump_append(struct dump_config *dc, const char *format, ...)
+dump_flush(struct dump_config *dc)
+{
+ if (dc->buffer_len) {
+ if (dc->stream) {
+ size_t written = rb_io_bufwrite(dc->stream, dc->buffer, dc->buffer_len);
+ if (written < dc->buffer_len) {
+ MEMMOVE(dc->buffer, dc->buffer + written, char, dc->buffer_len - written);
+ dc->buffer_len -= written;
+ return;
+ }
+ }
+ else if (dc->string) {
+ rb_str_cat(dc->string, dc->buffer, dc->buffer_len);
+ }
+ dc->buffer_len = 0;
+ }
+}
+
+static inline void
+buffer_ensure_capa(struct dump_config *dc, unsigned long requested)
{
- va_list vl;
- va_start(vl, format);
+ RUBY_ASSERT(requested <= BUFFER_CAPACITY);
+ if (requested + dc->buffer_len >= BUFFER_CAPACITY) {
+ dump_flush(dc);
+ if (requested + dc->buffer_len >= BUFFER_CAPACITY) {
+ rb_raise(rb_eIOError, "full buffer");
+ }
+ }
+}
- if (dc->stream) {
- vfprintf(dc->stream, format, vl);
+static void
+buffer_append(struct dump_config *dc, const char *cstr, unsigned long len)
+{
+ if (LIKELY(len > 0)) {
+ buffer_ensure_capa(dc, len);
+ MEMCPY(dc->buffer + dc->buffer_len, cstr, char, len);
+ dc->buffer_len += len;
}
- else if (dc->string)
- rb_str_vcatf(dc->string, format, vl);
+}
+
+# define dump_append(dc, str) buffer_append(dc, (str), (long)strlen(str))
+
+static void
+dump_append_ld(struct dump_config *dc, const long number)
+{
+ const unsigned int width = DECIMAL_SIZE_OF_BITS(sizeof(number) * CHAR_BIT - 1) + 2;
+ buffer_ensure_capa(dc, width);
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, width, "%ld", number);
+ RUBY_ASSERT(required <= width);
+ dc->buffer_len += required;
+}
+
+static void
+dump_append_lu(struct dump_config *dc, const unsigned long number)
+{
+ const unsigned int width = DECIMAL_SIZE_OF_BITS(sizeof(number) * CHAR_BIT) + 1;
+ buffer_ensure_capa(dc, width);
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, width, "%lu", number);
+ RUBY_ASSERT(required <= width);
+ dc->buffer_len += required;
+}
+
+static void
+dump_append_g(struct dump_config *dc, const double number)
+{
+ unsigned long capa_left = BUFFER_CAPACITY - dc->buffer_len;
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, capa_left, "%#g", number);
- va_end(vl);
+ if (required >= capa_left) {
+ buffer_ensure_capa(dc, required);
+ capa_left = BUFFER_CAPACITY - dc->buffer_len;
+ snprintf(dc->buffer + dc->buffer_len, capa_left, "%#g", number);
+ }
+ dc->buffer_len += required;
+}
+
+static void
+dump_append_d(struct dump_config *dc, const int number)
+{
+ const unsigned int width = DECIMAL_SIZE_OF_BITS(sizeof(number) * CHAR_BIT - 1) + 2;
+ buffer_ensure_capa(dc, width);
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, width, "%d", number);
+ RUBY_ASSERT(required <= width);
+ dc->buffer_len += required;
+}
+
+static void
+dump_append_sizet(struct dump_config *dc, const size_t number)
+{
+ const unsigned int width = DECIMAL_SIZE_OF_BITS(sizeof(number) * CHAR_BIT) + 1;
+ buffer_ensure_capa(dc, width);
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, width, "%"PRIuSIZE, number);
+ RUBY_ASSERT(required <= width);
+ dc->buffer_len += required;
+}
+
+static void
+dump_append_c(struct dump_config *dc, unsigned char c)
+{
+ if (c <= 0x1f) {
+ const unsigned int width = rb_strlen_lit("\\u0000") + 1;
+ buffer_ensure_capa(dc, width);
+ unsigned long required = snprintf(dc->buffer + dc->buffer_len, width, "\\u00%02x", c);
+ RUBY_ASSERT(required <= width);
+ dc->buffer_len += required;
+ }
+ else {
+ buffer_ensure_capa(dc, 1);
+ dc->buffer[dc->buffer_len] = c;
+ dc->buffer_len++;
+ }
+}
+
+static void
+dump_append_ref(struct dump_config *dc, VALUE ref)
+{
+ RUBY_ASSERT(ref > 0);
+
+ char buffer[roomof(sizeof(VALUE) * CHAR_BIT, 4) + rb_strlen_lit("\"0x\"")];
+ char *buffer_start, *buffer_end;
+
+ buffer_start = buffer_end = &buffer[sizeof(buffer)];
+ *--buffer_start = '"';
+ while (ref) {
+ *--buffer_start = ruby_hexdigits[ref & 0xF];
+ ref >>= 4;
+ }
+ *--buffer_start = 'x';
+ *--buffer_start = '0';
+ *--buffer_start = '"';
+ buffer_append(dc, buffer_start, buffer_end - buffer_start);
}
static void
@@ -60,35 +194,37 @@ dump_append_string_value(struct dump_config *dc, VALUE obj)
dump_append(dc, "\"");
for (i = 0, value = RSTRING_PTR(obj); i < RSTRING_LEN(obj); i++) {
- switch ((c = value[i])) {
- case '\\':
- case '"':
- dump_append(dc, "\\%c", c);
- break;
- case '\0':
- dump_append(dc, "\\u0000");
- break;
- case '\b':
- dump_append(dc, "\\b");
- break;
- case '\t':
- dump_append(dc, "\\t");
- break;
- case '\f':
- dump_append(dc, "\\f");
- break;
- case '\n':
- dump_append(dc, "\\n");
- break;
- case '\r':
- dump_append(dc, "\\r");
- break;
- default:
- if (c <= 0x1f)
- dump_append(dc, "\\u%04d", c);
- else
- dump_append(dc, "%c", c);
- }
+ switch ((c = value[i])) {
+ case '\\':
+ dump_append(dc, "\\\\");
+ break;
+ case '"':
+ dump_append(dc, "\\\"");
+ break;
+ case '\0':
+ dump_append(dc, "\\u0000");
+ break;
+ case '\b':
+ dump_append(dc, "\\b");
+ break;
+ case '\t':
+ dump_append(dc, "\\t");
+ break;
+ case '\f':
+ dump_append(dc, "\\f");
+ break;
+ case '\n':
+ dump_append(dc, "\\n");
+ break;
+ case '\r':
+ dump_append(dc, "\\r");
+ break;
+ case '\177':
+ dump_append(dc, "\\u007f");
+ break;
+ default:
+ dump_append_c(dc, c);
+ }
}
dump_append(dc, "\"");
}
@@ -106,33 +242,34 @@ obj_type(VALUE obj)
{
switch (BUILTIN_TYPE(obj)) {
#define CASE_TYPE(type) case T_##type: return #type
- CASE_TYPE(NONE);
- CASE_TYPE(NIL);
- CASE_TYPE(OBJECT);
- CASE_TYPE(CLASS);
- CASE_TYPE(ICLASS);
- CASE_TYPE(MODULE);
- CASE_TYPE(FLOAT);
- CASE_TYPE(STRING);
- CASE_TYPE(REGEXP);
- CASE_TYPE(ARRAY);
- CASE_TYPE(HASH);
- CASE_TYPE(STRUCT);
- CASE_TYPE(BIGNUM);
- CASE_TYPE(FILE);
- CASE_TYPE(FIXNUM);
- CASE_TYPE(TRUE);
- CASE_TYPE(FALSE);
- CASE_TYPE(DATA);
- CASE_TYPE(MATCH);
- CASE_TYPE(SYMBOL);
- CASE_TYPE(RATIONAL);
- CASE_TYPE(COMPLEX);
- CASE_TYPE(IMEMO);
- CASE_TYPE(UNDEF);
- CASE_TYPE(NODE);
- CASE_TYPE(ZOMBIE);
+ CASE_TYPE(NONE);
+ CASE_TYPE(NIL);
+ CASE_TYPE(OBJECT);
+ CASE_TYPE(CLASS);
+ CASE_TYPE(ICLASS);
+ CASE_TYPE(MODULE);
+ CASE_TYPE(FLOAT);
+ CASE_TYPE(STRING);
+ CASE_TYPE(REGEXP);
+ CASE_TYPE(ARRAY);
+ CASE_TYPE(HASH);
+ CASE_TYPE(STRUCT);
+ CASE_TYPE(BIGNUM);
+ CASE_TYPE(FILE);
+ CASE_TYPE(FIXNUM);
+ CASE_TYPE(TRUE);
+ CASE_TYPE(FALSE);
+ CASE_TYPE(DATA);
+ CASE_TYPE(MATCH);
+ CASE_TYPE(SYMBOL);
+ CASE_TYPE(RATIONAL);
+ CASE_TYPE(COMPLEX);
+ CASE_TYPE(IMEMO);
+ CASE_TYPE(UNDEF);
+ CASE_TYPE(NODE);
+ CASE_TYPE(ZOMBIE);
#undef CASE_TYPE
+ default: break;
}
return "UNKNOWN";
}
@@ -141,25 +278,25 @@ static void
dump_append_special_const(struct dump_config *dc, VALUE value)
{
if (value == Qtrue) {
- dump_append(dc, "true");
+ dump_append(dc, "true");
}
else if (value == Qfalse) {
- dump_append(dc, "false");
+ dump_append(dc, "false");
}
else if (value == Qnil) {
- dump_append(dc, "null");
+ dump_append(dc, "null");
}
else if (FIXNUM_P(value)) {
- dump_append(dc, "%ld", FIX2LONG(value));
+ dump_append_ld(dc, FIX2LONG(value));
}
else if (FLONUM_P(value)) {
- dump_append(dc, "%#g", RFLOAT_VALUE(value));
+ dump_append_g(dc, RFLOAT_VALUE(value));
}
else if (SYMBOL_P(value)) {
- dump_append_symbol_value(dc, value);
+ dump_append_symbol_value(dc, value);
}
else {
- dump_append(dc, "{}");
+ dump_append(dc, "{}");
}
}
@@ -169,175 +306,304 @@ reachable_object_i(VALUE ref, void *data)
struct dump_config *dc = (struct dump_config *)data;
if (dc->cur_obj_klass == ref)
- return;
+ return;
- if (dc->cur_obj_references == 0)
- dump_append(dc, ", \"references\":[\"%#"PRIxVALUE"\"", ref);
- else
- dump_append(dc, ", \"%#"PRIxVALUE"\"", ref);
+ if (dc->cur_obj_references == 0) {
+ dump_append(dc, ", \"references\":[");
+ dump_append_ref(dc, ref);
+ }
+ else {
+ dump_append(dc, ", ");
+ dump_append_ref(dc, ref);
+ }
dc->cur_obj_references++;
}
+static bool
+dump_string_ascii_only(const char *str, long size)
+{
+ for (long i = 0; i < size; i++) {
+ if (str[i] & 0x80) {
+ return false;
+ }
+ }
+ return true;
+}
+
static void
dump_append_string_content(struct dump_config *dc, VALUE obj)
{
- dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
- if (!STR_EMBED_P(obj) && !STR_SHARED_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj))
- dump_append(dc, ", \"capacity\":%"PRIuSIZE, rb_str_capacity(obj));
+ dump_append(dc, ", \"bytesize\":");
+ dump_append_ld(dc, RSTRING_LEN(obj));
+ if (!STR_EMBED_P(obj) && !STR_SHARED_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj)) {
+ dump_append(dc, ", \"capacity\":");
+ dump_append_sizet(dc, rb_str_capacity(obj));
+ }
- if (is_ascii_string(obj)) {
- dump_append(dc, ", \"value\":");
- dump_append_string_value(dc, obj);
+ if (RSTRING_LEN(obj) && rb_enc_asciicompat(rb_enc_from_index(ENCODING_GET(obj)))) {
+ int cr = ENC_CODERANGE(obj);
+ if (cr == RUBY_ENC_CODERANGE_UNKNOWN) {
+ if (dump_string_ascii_only(RSTRING_PTR(obj), RSTRING_LEN(obj))) {
+ cr = RUBY_ENC_CODERANGE_7BIT;
+ }
+ }
+ if (cr == RUBY_ENC_CODERANGE_7BIT) {
+ dump_append(dc, ", \"value\":");
+ dump_append_string_value(dc, obj);
+ }
}
}
-static const char *
-imemo_name(int imemo)
+static inline void
+dump_append_id(struct dump_config *dc, ID id)
{
- switch(imemo) {
-#define TYPE_STR(t) case(imemo_##t): return #t
- TYPE_STR(env);
- TYPE_STR(cref);
- TYPE_STR(svar);
- TYPE_STR(throw_data);
- TYPE_STR(ifunc);
- TYPE_STR(memo);
- TYPE_STR(ment);
- TYPE_STR(iseq);
- TYPE_STR(tmpbuf);
- TYPE_STR(ast);
- TYPE_STR(parser_strterm);
- default:
- return "unknown";
-#undef TYPE_STR
+ if (is_instance_id(id)) {
+ dump_append_string_value(dc, rb_sym2str(ID2SYM(id)));
+ }
+ else {
+ dump_append(dc, "\"ID_INTERNAL(");
+ dump_append_sizet(dc, rb_id_to_serial(id));
+ dump_append(dc, ")\"");
}
}
+
static void
dump_object(VALUE obj, struct dump_config *dc)
{
size_t memsize;
- struct allocation_info *ainfo;
+ struct allocation_info *ainfo = objspace_lookup_allocation_info(obj);
rb_io_t *fptr;
ID flags[RB_OBJ_GC_FLAGS_MAX];
size_t n, i;
if (SPECIAL_CONST_P(obj)) {
- dump_append_special_const(dc, obj);
- return;
+ dump_append_special_const(dc, obj);
+ return;
}
dc->cur_obj = obj;
dc->cur_obj_references = 0;
- dc->cur_obj_klass = BUILTIN_TYPE(obj) == T_NODE ? 0 : RBASIC_CLASS(obj);
+ if (BUILTIN_TYPE(obj) == T_NODE || BUILTIN_TYPE(obj) == T_IMEMO) {
+ dc->cur_obj_klass = 0;
+ } else {
+ dc->cur_obj_klass = RBASIC_CLASS(obj);
+ }
+
+ if (dc->partial_dump && (!ainfo || ainfo->generation < dc->since)) {
+ return;
+ }
if (dc->cur_obj == dc->string)
- return;
+ return;
+
+ dump_append(dc, "{\"address\":");
+ dump_append_ref(dc, obj);
+
+ dump_append(dc, ", \"type\":\"");
+ dump_append(dc, obj_type(obj));
+ dump_append(dc, "\"");
- dump_append(dc, "{\"address\":\"%#"PRIxVALUE"\", \"type\":\"%s\"", obj, obj_type(obj));
+ size_t shape_id = rb_shape_get_shape_id(obj);
+ dump_append(dc, ", \"shape_id\":");
+ dump_append_sizet(dc, shape_id);
- if (dc->cur_obj_klass)
- dump_append(dc, ", \"class\":\"%#"PRIxVALUE"\"", dc->cur_obj_klass);
+ dump_append(dc, ", \"slot_size\":");
+ dump_append_sizet(dc, dc->cur_page_slot_size);
+
+ if (dc->cur_obj_klass) {
+ dump_append(dc, ", \"class\":");
+ dump_append_ref(dc, dc->cur_obj_klass);
+ }
if (rb_obj_frozen_p(obj))
- dump_append(dc, ", \"frozen\":true");
+ dump_append(dc, ", \"frozen\":true");
switch (BUILTIN_TYPE(obj)) {
case T_NONE:
- dump_append(dc, "}\n");
- return;
+ dump_append(dc, "}\n");
+ return;
case T_IMEMO:
- dump_append(dc, ", \"imemo_type\":\"%s\"", imemo_name(imemo_type(obj)));
- break;
+ dump_append(dc, ", \"imemo_type\":\"");
+ dump_append(dc, rb_imemo_name(imemo_type(obj)));
+ dump_append(dc, "\"");
+ break;
case T_SYMBOL:
- dump_append_string_content(dc, rb_sym2str(obj));
- break;
+ dump_append_string_content(dc, rb_sym2str(obj));
+ break;
case T_STRING:
- if (STR_EMBED_P(obj))
- dump_append(dc, ", \"embedded\":true");
- if (is_broken_string(obj))
- dump_append(dc, ", \"broken\":true");
- if (FL_TEST(obj, RSTRING_FSTR))
- dump_append(dc, ", \"fstring\":true");
- if (STR_SHARED_P(obj))
- dump_append(dc, ", \"shared\":true");
- else
- dump_append_string_content(dc, obj);
-
- if (!ENCODING_IS_ASCII8BIT(obj))
- dump_append(dc, ", \"encoding\":\"%s\"", rb_enc_name(rb_enc_from_index(ENCODING_GET(obj))));
- break;
+ if (STR_EMBED_P(obj))
+ dump_append(dc, ", \"embedded\":true");
+ if (FL_TEST(obj, RSTRING_FSTR))
+ dump_append(dc, ", \"fstring\":true");
+ if (STR_SHARED_P(obj))
+ dump_append(dc, ", \"shared\":true");
+ else
+ dump_append_string_content(dc, obj);
+
+ if (!ENCODING_IS_ASCII8BIT(obj)) {
+ dump_append(dc, ", \"encoding\":\"");
+ dump_append(dc, rb_enc_name(rb_enc_from_index(ENCODING_GET(obj))));
+ dump_append(dc, "\"");
+ }
+
+ dump_append(dc, ", \"coderange\":\"");
+ switch (RB_ENC_CODERANGE(obj)) {
+ case RUBY_ENC_CODERANGE_UNKNOWN:
+ dump_append(dc, "unknown");
+ break;
+ case RUBY_ENC_CODERANGE_7BIT:
+ dump_append(dc, "7bit");
+ break;
+ case RUBY_ENC_CODERANGE_VALID:
+ dump_append(dc, "valid");
+ break;
+ case RUBY_ENC_CODERANGE_BROKEN:
+ dump_append(dc, "broken");
+ break;
+ }
+ dump_append(dc, "\"");
+
+ if (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_BROKEN)
+ dump_append(dc, ", \"broken\":true");
+
+ break;
case T_HASH:
- dump_append(dc, ", \"size\":%"PRIuSIZE, (size_t)RHASH_SIZE(obj));
- if (FL_TEST(obj, RHASH_PROC_DEFAULT))
- dump_append(dc, ", \"default\":\"%#"PRIxVALUE"\"", RHASH_IFNONE(obj));
- break;
+ dump_append(dc, ", \"size\":");
+ dump_append_sizet(dc, (size_t)RHASH_SIZE(obj));
+ if (FL_TEST(obj, RHASH_PROC_DEFAULT)) {
+ dump_append(dc, ", \"default\":");
+ dump_append_ref(dc, RHASH_IFNONE(obj));
+ }
+ break;
case T_ARRAY:
- dump_append(dc, ", \"length\":%ld", RARRAY_LEN(obj));
- if (RARRAY_LEN(obj) > 0 && FL_TEST(obj, ELTS_SHARED))
- dump_append(dc, ", \"shared\":true");
- if (RARRAY_LEN(obj) > 0 && FL_TEST(obj, RARRAY_EMBED_FLAG))
- dump_append(dc, ", \"embedded\":true");
- break;
+ dump_append(dc, ", \"length\":");
+ dump_append_ld(dc, RARRAY_LEN(obj));
+ if (RARRAY_LEN(obj) > 0 && FL_TEST(obj, RARRAY_SHARED_FLAG))
+ dump_append(dc, ", \"shared\":true");
+ if (FL_TEST(obj, RARRAY_EMBED_FLAG))
+ dump_append(dc, ", \"embedded\":true");
+ break;
+
+ case T_ICLASS:
+ if (rb_class_get_superclass(obj)) {
+ dump_append(dc, ", \"superclass\":");
+ dump_append_ref(dc, rb_class_get_superclass(obj));
+ }
+ break;
case T_CLASS:
+ dump_append(dc, ", \"variation_count\":");
+ dump_append_d(dc, RCLASS_EXT(obj)->variation_count);
+
case T_MODULE:
- if (dc->cur_obj_klass)
- dump_append(dc, ", \"name\":\"%s\"", rb_class2name(obj));
- break;
+ if (rb_class_get_superclass(obj)) {
+ dump_append(dc, ", \"superclass\":");
+ dump_append_ref(dc, rb_class_get_superclass(obj));
+ }
+
+ if (dc->cur_obj_klass) {
+ VALUE mod_name = rb_mod_name(obj);
+ if (!NIL_P(mod_name)) {
+ dump_append(dc, ", \"name\":\"");
+ dump_append(dc, RSTRING_PTR(mod_name));
+ dump_append(dc, "\"");
+ }
+ else {
+ VALUE real_mod_name = rb_mod_name(rb_class_real(obj));
+ if (RTEST(real_mod_name)) {
+ dump_append(dc, ", \"real_class_name\":\"");
+ dump_append(dc, RSTRING_PTR(real_mod_name));
+ dump_append(dc, "\"");
+ }
+ }
+
+ if (FL_TEST(obj, FL_SINGLETON)) {
+ dump_append(dc, ", \"singleton\":true");
+ }
+ }
+ break;
case T_DATA:
- if (RTYPEDDATA_P(obj))
- dump_append(dc, ", \"struct\":\"%s\"", RTYPEDDATA_TYPE(obj)->wrap_struct_name);
- break;
+ if (RTYPEDDATA_P(obj)) {
+ dump_append(dc, ", \"struct\":\"");
+ dump_append(dc, RTYPEDDATA_TYPE(obj)->wrap_struct_name);
+ dump_append(dc, "\"");
+ }
+ break;
case T_FLOAT:
- dump_append(dc, ", \"value\":\"%g\"", RFLOAT_VALUE(obj));
- break;
+ dump_append(dc, ", \"value\":\"");
+ dump_append_g(dc, RFLOAT_VALUE(obj));
+ dump_append(dc, "\"");
+ break;
case T_OBJECT:
- dump_append(dc, ", \"ivars\":%u", ROBJECT_NUMIV(obj));
- break;
+ dump_append(dc, ", \"ivars\":");
+ dump_append_lu(dc, ROBJECT_IV_COUNT(obj));
+ if (rb_shape_obj_too_complex(obj)) {
+ dump_append(dc, ", \"too_complex_shape\":true");
+ }
+ break;
case T_FILE:
- fptr = RFILE(obj)->fptr;
- if (fptr)
- dump_append(dc, ", \"fd\":%d", fptr->fd);
- break;
+ fptr = RFILE(obj)->fptr;
+ if (fptr) {
+ dump_append(dc, ", \"fd\":");
+ dump_append_d(dc, fptr->fd);
+ }
+ break;
case T_ZOMBIE:
- dump_append(dc, "}\n");
- return;
+ dump_append(dc, "}\n");
+ return;
+
+ default:
+ break;
}
rb_objspace_reachable_objects_from(obj, reachable_object_i, dc);
if (dc->cur_obj_references > 0)
- dump_append(dc, "]");
-
- if ((ainfo = objspace_lookup_allocation_info(obj))) {
- dump_append(dc, ", \"file\":\"%s\", \"line\":%lu", ainfo->path, ainfo->line);
- if (RTEST(ainfo->mid)) {
- VALUE m = rb_sym2str(ainfo->mid);
- dump_append(dc, ", \"method\":\"%s\"", RSTRING_PTR(m));
- }
- dump_append(dc, ", \"generation\":%"PRIuSIZE, ainfo->generation);
+ dump_append(dc, "]");
+
+ if (ainfo) {
+ if (ainfo->path) {
+ dump_append(dc, ", \"file\":\"");
+ dump_append(dc, ainfo->path);
+ dump_append(dc, "\"");
+ }
+ if (ainfo->line) {
+ dump_append(dc, ", \"line\":");
+ dump_append_lu(dc, ainfo->line);
+ }
+ if (RTEST(ainfo->mid)) {
+ VALUE m = rb_sym2str(ainfo->mid);
+ dump_append(dc, ", \"method\":");
+ dump_append_string_value(dc, m);
+ }
+ dump_append(dc, ", \"generation\":");
+ dump_append_sizet(dc, ainfo->generation);
}
- if ((memsize = rb_obj_memsize_of(obj)) > 0)
- dump_append(dc, ", \"memsize\":%"PRIuSIZE, memsize);
+ if ((memsize = rb_obj_memsize_of(obj)) > 0) {
+ dump_append(dc, ", \"memsize\":");
+ dump_append_sizet(dc, memsize);
+ }
if ((n = rb_obj_gc_flags(obj, flags, sizeof(flags))) > 0) {
- dump_append(dc, ", \"flags\":{");
- for (i=0; i<n; i++) {
- dump_append(dc, "\"%s\":true", rb_id2name(flags[i]));
- if (i != n-1) dump_append(dc, ", ");
- }
- dump_append(dc, "}");
+ dump_append(dc, ", \"flags\":{");
+ for (i=0; i<n; i++) {
+ dump_append(dc, "\"");
+ dump_append(dc, rb_id2name(flags[i]));
+ dump_append(dc, "\":true");
+ if (i != n-1) dump_append(dc, ", ");
+ }
+ dump_append(dc, "}");
}
dump_append(dc, "}\n");
@@ -349,8 +615,16 @@ heap_i(void *vstart, void *vend, size_t stride, void *data)
struct dump_config *dc = (struct dump_config *)data;
VALUE v = (VALUE)vstart;
for (; v != (VALUE)vend; v += stride) {
- if (dc->full_heap || RBASIC(v)->flags)
- dump_object(v, dc);
+ void *ptr = asan_poisoned_object_p(v);
+ asan_unpoison_object(v, false);
+ dc->cur_page_slot_size = stride;
+
+ if (dc->full_heap || RBASIC(v)->flags)
+ dump_object(v, dc);
+
+ if (ptr) {
+ asan_poison_object(v);
+ }
}
return 0;
}
@@ -361,138 +635,185 @@ root_obj_i(const char *category, VALUE obj, void *data)
struct dump_config *dc = (struct dump_config *)data;
if (dc->root_category != NULL && category != dc->root_category)
- dump_append(dc, "]}\n");
- if (dc->root_category == NULL || category != dc->root_category)
- dump_append(dc, "{\"type\":\"ROOT\", \"root\":\"%s\", \"references\":[\"%#"PRIxVALUE"\"", category, obj);
- else
- dump_append(dc, ", \"%#"PRIxVALUE"\"", obj);
+ dump_append(dc, "]}\n");
+ if (dc->root_category == NULL || category != dc->root_category) {
+ dump_append(dc, "{\"type\":\"ROOT\", \"root\":\"");
+ dump_append(dc, category);
+ dump_append(dc, "\", \"references\":[");
+ dump_append_ref(dc, obj);
+ }
+ else {
+ dump_append(dc, ", ");
+ dump_append_ref(dc, obj);
+ }
dc->root_category = category;
dc->roots = 1;
}
-static VALUE
-dump_output(struct dump_config *dc, VALUE opts, VALUE output, const char *filename)
+static void
+dump_output(struct dump_config *dc, VALUE output, VALUE full, VALUE since, VALUE shapes)
{
- VALUE tmp;
dc->full_heap = 0;
+ dc->buffer_len = 0;
- if (RTEST(opts)) {
- output = rb_hash_aref(opts, sym_output);
-
- if (Qtrue == rb_hash_lookup2(opts, sym_full, Qfalse))
- dc->full_heap = 1;
+ if (TYPE(output) == T_STRING) {
+ dc->stream = Qfalse;
+ dc->string = output;
}
-
- if (output == sym_stdout) {
- dc->stream = stdout;
- dc->string = Qnil;
- }
- else if (output == sym_file) {
- rb_io_t *fptr;
- rb_require("tempfile");
- tmp = rb_assoc_new(rb_str_new_cstr(filename), rb_str_new_cstr(".json"));
- tmp = rb_funcallv(rb_path2class("Tempfile"), rb_intern("create"), 1, &tmp);
- io:
- dc->string = rb_io_get_write_io(tmp);
- rb_io_flush(dc->string);
- GetOpenFile(dc->string, fptr);
- dc->stream = rb_io_stdio_file(fptr);
+ else {
+ dc->stream = output;
+ dc->string = Qfalse;
}
- else if (output == sym_string) {
- dc->string = rb_str_new_cstr("");
+
+ if (full == Qtrue) {
+ dc->full_heap = 1;
}
- else if (!NIL_P(tmp = rb_io_check_io(output))) {
- output = sym_file;
- goto io;
+
+ if (RTEST(since)) {
+ dc->partial_dump = 1;
+ dc->since = NUM2SIZET(since);
}
else {
- rb_raise(rb_eArgError, "wrong output option: %"PRIsVALUE, output);
+ dc->partial_dump = 0;
}
- return output;
+
+ dc->shapes_since = RTEST(shapes) ? NUM2SIZET(shapes) : 0;
}
static VALUE
-dump_result(struct dump_config *dc, VALUE output)
+dump_result(struct dump_config *dc)
{
- if (output == sym_string) {
- return rb_str_resurrect(dc->string);
- }
- else if (output == sym_file) {
- rb_io_flush(dc->string);
- return dc->string;
+ dump_flush(dc);
+
+ if (dc->string) {
+ return dc->string;
}
else {
- return Qnil;
+ rb_io_flush(dc->stream);
+ return dc->stream;
}
}
-/*
- * call-seq:
- * ObjectSpace.dump(obj[, output: :string]) # => "{ ... }"
- * ObjectSpace.dump(obj, output: :file) # => #<File:/tmp/rubyobj20131125-88733-1xkfmpv.json>
- * ObjectSpace.dump(obj, output: :stdout) # => nil
- *
- * Dump the contents of a ruby object as JSON.
- *
- * This method is only expected to work with C Ruby.
- * This is an experimental method and is subject to change.
- * In particular, the function signature and output format are
- * not guaranteed to be compatible in future versions of ruby.
- */
-
+/* :nodoc: */
static VALUE
-objspace_dump(int argc, VALUE *argv, VALUE os)
+objspace_dump(VALUE os, VALUE obj, VALUE output)
{
- static const char filename[] = "rubyobj";
- VALUE obj = Qnil, opts = Qnil, output;
struct dump_config dc = {0,};
+ if (!RB_SPECIAL_CONST_P(obj)) {
+ dc.cur_page_slot_size = rb_gc_obj_slot_size(obj);
+ }
- rb_scan_args(argc, argv, "1:", &obj, &opts);
-
- output = dump_output(&dc, opts, sym_string, filename);
+ dump_output(&dc, output, Qnil, Qnil, Qnil);
dump_object(obj, &dc);
- return dump_result(&dc, output);
+ return dump_result(&dc);
}
-/*
- * call-seq:
- * ObjectSpace.dump_all([output: :file]) # => #<File:/tmp/rubyheap20131125-88469-laoj3v.json>
- * ObjectSpace.dump_all(output: :stdout) # => nil
- * ObjectSpace.dump_all(output: :string) # => "{...}\n{...}\n..."
- * ObjectSpace.dump_all(output:
- * File.open('heap.json','w')) # => #<File:heap.json>
- *
- * Dump the contents of the ruby heap as JSON.
- *
- * This method is only expected to work with C Ruby.
- * This is an experimental method and is subject to change.
- * In particular, the function signature and output format are
- * not guaranteed to be compatible in future versions of ruby.
- */
+static void
+shape_i(rb_shape_t *shape, void *data)
+{
+ struct dump_config *dc = (struct dump_config *)data;
+
+ size_t shape_id = rb_shape_id(shape);
+ if (shape_id < dc->shapes_since) {
+ return;
+ }
+
+ dump_append(dc, "{\"address\":");
+ dump_append_ref(dc, (VALUE)shape);
+
+ dump_append(dc, ", \"type\":\"SHAPE\", \"id\":");
+ dump_append_sizet(dc, shape_id);
+
+ if (shape->type != SHAPE_ROOT) {
+ dump_append(dc, ", \"parent_id\":");
+ dump_append_lu(dc, shape->parent_id);
+ }
+
+ dump_append(dc, ", \"depth\":");
+ dump_append_sizet(dc, rb_shape_depth(shape));
+
+ dump_append(dc, ", \"shape_type\":");
+ switch((enum shape_type)shape->type) {
+ case SHAPE_ROOT:
+ dump_append(dc, "\"ROOT\"");
+ break;
+ case SHAPE_IVAR:
+ dump_append(dc, "\"IVAR\"");
+
+ dump_append(dc, ",\"edge_name\":");
+ dump_append_id(dc, shape->edge_name);
+
+ break;
+ case SHAPE_FROZEN:
+ dump_append(dc, "\"FROZEN\"");
+ break;
+ case SHAPE_CAPACITY_CHANGE:
+ dump_append(dc, "\"CAPACITY_CHANGE\"");
+ dump_append(dc, ", \"capacity\":");
+ dump_append_sizet(dc, shape->capacity);
+ break;
+ case SHAPE_INITIAL_CAPACITY:
+ dump_append(dc, "\"INITIAL_CAPACITY\"");
+ dump_append(dc, ", \"capacity\":");
+ dump_append_sizet(dc, shape->capacity);
+ break;
+ case SHAPE_T_OBJECT:
+ dump_append(dc, "\"T_OBJECT\"");
+ break;
+ case SHAPE_OBJ_TOO_COMPLEX:
+ dump_append(dc, "\"OBJ_TOO_COMPLEX\"");
+ break;
+ default:
+ rb_bug("[objspace] unexpected shape type");
+ }
+
+ dump_append(dc, ", \"edges\":");
+ dump_append_sizet(dc, rb_shape_edges_count(shape));
+ dump_append(dc, ", \"memsize\":");
+ dump_append_sizet(dc, rb_shape_memsize(shape));
+
+ dump_append(dc, "}\n");
+}
+
+/* :nodoc: */
static VALUE
-objspace_dump_all(int argc, VALUE *argv, VALUE os)
+objspace_dump_all(VALUE os, VALUE output, VALUE full, VALUE since, VALUE shapes)
{
- static const char filename[] = "rubyheap";
- VALUE opts = Qnil, output;
struct dump_config dc = {0,};
+ dump_output(&dc, output, full, since, shapes);
- rb_scan_args(argc, argv, "0:", &opts);
-
- output = dump_output(&dc, opts, sym_file, filename);
+ if (!dc.partial_dump || dc.since == 0) {
+ /* dump roots */
+ rb_objspace_reachable_objects_from_root(root_obj_i, &dc);
+ if (dc.roots) dump_append(&dc, "]}\n");
+ }
- /* dump roots */
- rb_objspace_reachable_objects_from_root(root_obj_i, &dc);
- if (dc.roots) dump_append(&dc, "]}\n");
+ if (RTEST(shapes)) {
+ rb_shape_each_shape(shape_i, &dc);
+ }
/* dump all objects */
rb_objspace_each_objects(heap_i, &dc);
- return dump_result(&dc, output);
+ return dump_result(&dc);
+}
+
+/* :nodoc: */
+static VALUE
+objspace_dump_shapes(VALUE os, VALUE output, VALUE shapes)
+{
+ struct dump_config dc = {0,};
+ dump_output(&dc, output, Qfalse, Qnil, shapes);
+
+ if (RTEST(shapes)) {
+ rb_shape_each_shape(shape_i, &dc);
+ }
+ return dump_result(&dc);
}
void
@@ -503,14 +824,9 @@ Init_objspace_dump(VALUE rb_mObjSpace)
rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
#endif
- rb_define_module_function(rb_mObjSpace, "dump", objspace_dump, -1);
- rb_define_module_function(rb_mObjSpace, "dump_all", objspace_dump_all, -1);
-
- sym_output = ID2SYM(rb_intern("output"));
- sym_stdout = ID2SYM(rb_intern("stdout"));
- sym_string = ID2SYM(rb_intern("string"));
- sym_file = ID2SYM(rb_intern("file"));
- sym_full = ID2SYM(rb_intern("full"));
+ rb_define_module_function(rb_mObjSpace, "_dump", objspace_dump, 2);
+ rb_define_module_function(rb_mObjSpace, "_dump_all", objspace_dump_all, 4);
+ rb_define_module_function(rb_mObjSpace, "_dump_shapes", objspace_dump_shapes, 2);
/* force create static IDs */
rb_obj_gc_flags(rb_mObjSpace, 0, 0);
diff --git a/ext/openssl/History.md b/ext/openssl/History.md
index db5050014e..1e0df7dd87 100644
--- a/ext/openssl/History.md
+++ b/ext/openssl/History.md
@@ -1,3 +1,340 @@
+Version 3.1.0
+=============
+
+Ruby/OpenSSL 3.1 will be maintained for the lifetime of Ruby 3.2.
+
+Merged bug fixes in 2.2.3 and 3.0.2. Among the new features and changes are:
+
+Notable changes
+---------------
+
+* Add `OpenSSL::SSL::SSLContext#ciphersuites=` to allow setting TLS 1.3 cipher
+ suites.
+ [[GitHub #493]](https://github.com/ruby/openssl/pull/493)
+* Add `OpenSSL::SSL::SSLSocket#export_keying_material` for exporting keying
+ material of the session, as defined in RFC 5705.
+ [[GitHub #530]](https://github.com/ruby/openssl/pull/530)
+* Add `OpenSSL::SSL::SSLContext#keylog_cb=` for setting the TLS key logging
+ callback, which is useful for supporting NSS's SSLKEYLOGFILE debugging output.
+ [[GitHub #536]](https://github.com/ruby/openssl/pull/536)
+* Remove the default digest algorithm from `OpenSSL::OCSP::BasicResponse#sign`
+ and `OpenSSL::OCSP::Request#sign`. Omitting the 5th parameter of these
+ methods used to be equivalent of specifying SHA-1. This default value is now
+ removed and we will let the underlying OpenSSL library decide instead.
+ [[GitHub #507]](https://github.com/ruby/openssl/pull/507)
+* Add `OpenSSL::BN#mod_sqrt`.
+ [[GitHub #553]](https://github.com/ruby/openssl/pull/553)
+* Allow calling `OpenSSL::Cipher#update` with an empty string. This was
+ prohibited to workaround an ancient bug in OpenSSL.
+ [[GitHub #568]](https://github.com/ruby/openssl/pull/568)
+* Fix build on platforms without socket support, such as WASI. `OpenSSL::SSL`
+ will not be defined if OpenSSL is compiled with `OPENSSL_NO_SOCK`.
+ [[GitHub #558]](https://github.com/ruby/openssl/pull/558)
+* Improve support for recent LibreSSL versions. This includes HKDF support in
+ LibreSSL 3.6 and Ed25519 support in LibreSSL 3.7.
+
+
+Version 3.0.2
+=============
+
+Merged changes in 2.2.3. Additionally, the following issues are fixed by this
+release.
+
+Bug fixes
+---------
+
+* Fix OpenSSL::PKey::EC#check_key not working correctly on OpenSSL 3.0.
+ [[GitHub #563]](https://github.com/ruby/openssl/issues/563)
+ [[GitHub #580]](https://github.com/ruby/openssl/pull/580)
+
+
+Version 3.0.1
+=============
+
+Merged changes in 2.1.4 and 2.2.2. Additionally, the following issues are fixed
+by this release.
+
+Bug fixes
+---------
+
+* Add missing type check in OpenSSL::PKey::PKey#sign's optional parameters.
+ [[GitHub #531]](https://github.com/ruby/openssl/pull/531)
+* Work around OpenSSL 3.0's HMAC issues with a zero-length key.
+ [[GitHub #538]](https://github.com/ruby/openssl/pull/538)
+* Fix a regression in OpenSSL::PKey::DSA.generate's default of 'q' size.
+ [[GitHub #483]](https://github.com/ruby/openssl/issues/483)
+ [[GitHub #539]](https://github.com/ruby/openssl/pull/539)
+* Restore OpenSSL::PKey.read's ability to decode "openssl ecparam -genkey"
+ output when linked against OpenSSL 3.0.
+ [[GitHub #535]](https://github.com/ruby/openssl/pull/535)
+ [[GitHub #540]](https://github.com/ruby/openssl/pull/540)
+* Restore error checks in OpenSSL::PKey::EC#{to_der,to_pem}.
+ [[GitHub #541]](https://github.com/ruby/openssl/pull/541)
+
+
+Version 3.0.0
+=============
+
+Compatibility notes
+-------------------
+
+* OpenSSL 1.0.1 and Ruby 2.3-2.5 are no longer supported.
+ [[GitHub #396]](https://github.com/ruby/openssl/pull/396)
+ [[GitHub #466]](https://github.com/ruby/openssl/pull/466)
+
+* OpenSSL 3.0 support is added. It is the first major version bump from OpenSSL
+ 1.1 and contains incompatible changes that affect Ruby/OpenSSL.
+ Note that OpenSSL 3.0 support is preliminary and not all features are
+ currently available:
+ [[GitHub #369]](https://github.com/ruby/openssl/issues/369)
+
+ - Deprecate the ability to modify `OpenSSL::PKey::PKey` instances. OpenSSL 3.0
+ made EVP_PKEY structure immutable, and hence the following methods are not
+ available when Ruby/OpenSSL is linked against OpenSSL 3.0.
+ [[GitHub #480]](https://github.com/ruby/openssl/pull/480)
+
+ - `OpenSSL::PKey::RSA#set_key`, `#set_factors`, `#set_crt_params`
+ - `OpenSSL::PKey::DSA#set_pqg`, `#set_key`
+ - `OpenSSL::PKey::DH#set_pqg`, `#set_key`, `#generate_key!`
+ - `OpenSSL::PKey::EC#private_key=`, `#public_key=`, `#group=`, `#generate_key!`
+
+ - Deprecate `OpenSSL::Engine`. The ENGINE API has been deprecated in OpenSSL 3.0
+ in favor of the new "provider" concept and will be removed in a future
+ version.
+ [[GitHub #481]](https://github.com/ruby/openssl/pull/481)
+
+* `OpenSSL::SSL::SSLContext#tmp_ecdh_callback` has been removed. It has been
+ deprecated since v2.0.0 because it is incompatible with modern OpenSSL
+ versions.
+ [[GitHub #394]](https://github.com/ruby/openssl/pull/394)
+
+* `OpenSSL::SSL::SSLSocket#read` and `#write` now raise `OpenSSL::SSL::SSLError`
+ if called before a TLS connection is established. Historically, they
+ read/wrote unencrypted data to the underlying socket directly in that case.
+ [[GitHub #9]](https://github.com/ruby/openssl/issues/9)
+ [[GitHub #469]](https://github.com/ruby/openssl/pull/469)
+
+
+Notable changes
+---------------
+
+* Enhance OpenSSL::PKey's common interface.
+ [[GitHub #370]](https://github.com/ruby/openssl/issues/370)
+
+ - Key deserialization: Enhance `OpenSSL::PKey.read` to handle PEM encoding of
+ DH parameters, which used to be only deserialized by `OpenSSL::PKey::DH.new`.
+ [[GitHub #328]](https://github.com/ruby/openssl/issues/328)
+ - Key generation: Add `OpenSSL::PKey.generate_parameters` and
+ `OpenSSL::PKey.generate_key`.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Public key signing: Enhance `OpenSSL::PKey::PKey#sign` and `#verify` to use
+ the new EVP_DigestSign() family to enable PureEdDSA support on OpenSSL 1.1.1
+ or later. They also now take optional algorithm-specific parameters for more
+ control.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Low-level public key signing and verification: Add
+ `OpenSSL::PKey::PKey#sign_raw`, `#verify_raw`, and `#verify_recover`.
+ [[GitHub #382]](https://github.com/ruby/openssl/issues/382)
+ - Public key encryption: Add `OpenSSL::PKey::PKey#encrypt` and `#decrypt`.
+ [[GitHub #382]](https://github.com/ruby/openssl/issues/382)
+ - Key agreement: Add `OpenSSL::PKey::PKey#derive`.
+ [[GitHub #329]](https://github.com/ruby/openssl/issues/329)
+ - Key comparison: Add `OpenSSL::PKey::PKey#compare?` to conveniently check
+ that two keys have common parameters and a public key.
+ [[GitHub #383]](https://github.com/ruby/openssl/issues/383)
+
+* Add `OpenSSL::BN#set_flags` and `#get_flags`. This can be used in combination
+ with `OpenSSL::BN::CONSTTIME` to force constant-time computation.
+ [[GitHub #417]](https://github.com/ruby/openssl/issues/417)
+
+* Add `OpenSSL::BN#abs` to get the absolute value of the BIGNUM.
+ [[GitHub #430]](https://github.com/ruby/openssl/issues/430)
+
+* Add `OpenSSL::SSL::SSLSocket#getbyte`.
+ [[GitHub #438]](https://github.com/ruby/openssl/issues/438)
+
+* Add `OpenSSL::SSL::SSLContext#tmp_dh=`.
+ [[GitHub #459]](https://github.com/ruby/openssl/pull/459)
+
+* Add `OpenSSL::X509::Certificate.load` to load a PEM-encoded and concatenated
+ list of X.509 certificates at once.
+ [[GitHub #441]](https://github.com/ruby/openssl/pull/441)
+
+* Change `OpenSSL::X509::Certificate.new` to attempt to deserialize the given
+ string first as DER encoding first and then as PEM encoding to ensure the
+ round-trip consistency.
+ [[GitHub #442]](https://github.com/ruby/openssl/pull/442)
+
+* Update various part of the code base to use the modern API. No breaking
+ changes are intended with this. This includes:
+
+ - `OpenSSL::HMAC` uses the EVP API.
+ [[GitHub #371]](https://github.com/ruby/openssl/issues/371)
+ - `OpenSSL::Config` uses native OpenSSL API to parse config files.
+ [[GitHub #342]](https://github.com/ruby/openssl/issues/342)
+
+
+Version 2.2.3
+=============
+
+Bug fixes
+---------
+
+* Fix serveral methods in OpenSSL::PKey::EC::Point attempting to raise an error
+ with an incorrect class, which would end up with a TypeError.
+ [[GitHub #570]](https://github.com/ruby/openssl/pull/570)
+* Fix OpenSSL::PKey::EC::Point#eql? and OpenSSL::PKey::EC::Group#eql?
+ incorrectly treated OpenSSL's internal errors as "not equal".
+ [[GitHub #564]](https://github.com/ruby/openssl/pull/564)
+* Fix build with LibreSSL 3.5 or later.
+
+
+Version 2.2.2
+=============
+
+Merged changes in 2.1.4.
+
+
+Version 2.2.1
+=============
+
+Merged changes in 2.1.3. Additionally, the following issues are fixed by this
+release.
+
+Bug fixes
+---------
+
+* Fix crash in `OpenSSL::Timestamp::{Request,Response,TokenInfo}.new` when
+ invalid arguments are given.
+ [[GitHub #407]](https://github.com/ruby/openssl/pull/407)
+* Fix `OpenSSL::Timestamp::Factory#create_timestamp` with LibreSSL on platforms
+ where `time_t` has a different size from `long`.
+ [[GitHub #454]](https://github.com/ruby/openssl/pull/454)
+
+
+Version 2.2.0
+=============
+
+Compatibility notes
+-------------------
+
+* Remove unsupported MDC2, DSS, DSS1, and SHA algorithms.
+* Remove `OpenSSL::PKCS7::SignerInfo#name` alias for `#issuer`.
+ [[GitHub #266]](https://github.com/ruby/openssl/pull/266)
+* Deprecate `OpenSSL::Config#add_value` and `#[]=` for future removal.
+ [[GitHub #322]](https://github.com/ruby/openssl/pull/322)
+
+
+Notable changes
+---------------
+
+* Change default `OpenSSL::SSL::SSLServer#listen` backlog argument from
+ 5 to `Socket::SOMAXCONN`.
+ [[GitHub #286]](https://github.com/ruby/openssl/issues/286)
+* Make `OpenSSL::HMAC#==` use a timing safe string comparison.
+ [[GitHub #284]](https://github.com/ruby/openssl/pull/284)
+* Add support for SHA3 and BLAKE digests.
+ [[GitHub #282]](https://github.com/ruby/openssl/pull/282)
+* Add `OpenSSL::SSL::SSLSocket.open` for opening a `TCPSocket` and
+ returning an `OpenSSL::SSL::SSLSocket` for it.
+ [[GitHub #225]](https://github.com/ruby/openssl/issues/225)
+* Support marshalling of `OpenSSL::X509` and `OpenSSL::PKey` objects.
+ [[GitHub #281]](https://github.com/ruby/openssl/pull/281)
+ [[GitHub #363]](https://github.com/ruby/openssl/pull/363)
+* Add `OpenSSL.secure_compare` for timing safe string comparison for
+ strings of possibly unequal length.
+ [[GitHub #280]](https://github.com/ruby/openssl/pull/280)
+* Add `OpenSSL.fixed_length_secure_compare` for timing safe string
+ comparison for strings of equal length.
+ [[GitHub #269]](https://github.com/ruby/openssl/pull/269)
+* Add `OpenSSL::SSL::SSLSocket#{finished_message,peer_finished_message}`
+ for last finished message sent and received.
+ [[GitHub #250]](https://github.com/ruby/openssl/pull/250)
+* Add `OpenSSL::Timestamp` module for handing timestamp requests and
+ responses.
+ [[GitHub #204]](https://github.com/ruby/openssl/pull/204)
+* Add helper methods for `OpenSSL::X509::Certificate`:
+ `find_extension`, `subject_key_identifier`,
+ `authority_key_identifier`, `crl_uris`, `ca_issuer_uris` and
+ `ocsp_uris`, and for `OpenSSL::X509::CRL`:
+ `find_extension` and `subject_key_identifier`.
+ [[GitHub #260]](https://github.com/ruby/openssl/pull/260)
+ [[GitHub #275]](https://github.com/ruby/openssl/pull/275)
+ [[GitHub #293]](https://github.com/ruby/openssl/pull/293)
+* Add `OpenSSL::ECPoint#add` for performing elliptic curve point addition.
+ [[GitHub #261]](https://github.com/ruby/openssl/pull/261)
+* Make `OpenSSL::PKey::RSA#{export,to_der}` check `key`, `factors`, and
+ `crt_params` to do proper private key serialization.
+ [[GitHub #258]](https://github.com/ruby/openssl/pull/258)
+* Add `OpenSSL::SSL::{SSLSocket,SSLServer}#fileno`, returning the
+ underlying socket file descriptor number.
+ [[GitHub #247]](https://github.com/ruby/openssl/pull/247)
+* Support client certificates with TLS 1.3, and support post-handshake
+ authentication with OpenSSL 1.1.1+.
+ [[GitHub #239]](https://github.com/ruby/openssl/pull/239)
+* Add `OpenSSL::ASN1::ObjectId#==` for equality testing.
+* Add `OpenSSL::X509::Extension#value_der` for the raw value of
+ the extension.
+ [[GitHub #234]](https://github.com/ruby/openssl/pull/234)
+* Significantly reduce allocated memory in `OpenSSL::Buffering#do_write`.
+ [[GitHub #212]](https://github.com/ruby/openssl/pull/212)
+* Ensure all valid IPv6 addresses are considered valid as elements
+ of subjectAlternativeName in certificates.
+ [[GitHub #185]](https://github.com/ruby/openssl/pull/185)
+* Allow recipient's certificate to be omitted in PCKS7#decrypt.
+ [[GitHub #183]](https://github.com/ruby/openssl/pull/183)
+* Add support for reading keys in PKCS #8 format and export via instance methods
+ added to `OpenSSL::PKey` classes: `private_to_der`, `private_to_pem`,
+ `public_to_der` and `public_to_pem`.
+ [[GitHub #297]](https://github.com/ruby/openssl/pull/297)
+
+
+Version 2.1.4
+=============
+
+Bug fixes
+---------
+
+* Do not use pkg-config if --with-openssl-dir option is specified.
+ [[GitHub #486]](https://github.com/ruby/openssl/pull/486)
+
+
+Version 2.1.3
+=============
+
+Bug fixes
+---------
+
+* Fix deprecation warnings on Ruby 3.0.
+* Add ".include" directive support in `OpenSSL::Config`.
+ [[GitHub #216]](https://github.com/ruby/openssl/pull/216)
+* Fix handling of IPv6 address SANs.
+ [[GitHub #185]](https://github.com/ruby/openssl/pull/185)
+* Hostname verification failure with `OpenSSL::SSL::SSLContext#verify_hostname=`
+ sets a proper error code.
+ [[GitHub #350]](https://github.com/ruby/openssl/pull/350)
+* Fix crash with `OpenSSL::BN.new(nil, 2)`.
+ [[Bug #15760]](https://bugs.ruby-lang.org/issues/15760)
+* `OpenSSL::SSL::SSLSocket#sys{read,write}` prevent internal string buffers from
+ being modified by another thread.
+ [[GitHub #453]](https://github.com/ruby/openssl/pull/453)
+* Fix misuse of input record separator in `OpenSSL::Buffering` where it was
+ for output.
+* Fix wrong integer casting in `OpenSSL::PKey::EC#dsa_verify_asn1`.
+ [[GitHub #460]](https://github.com/ruby/openssl/pull/460)
+* `extconf.rb` explicitly checks that OpenSSL's version number is 1.0.1 or
+ newer but also less than 3.0. Ruby/OpenSSL v2.1.x and v2.2.x will not support
+ OpenSSL 3.0 API.
+ [[GitHub #458]](https://github.com/ruby/openssl/pull/458)
+* Activate `digest` gem correctly. `digest` library could go into an
+ inconsistent state if there are multiple versions of `digest` is installed
+ and `openssl` is `require`d before `digest`.
+ [[GitHub #463]](https://github.com/ruby/openssl/pull/463)
+* Fix GC.compact compatibility.
+ [[GitHub #464]](https://github.com/ruby/openssl/issues/464)
+ [[GitHub #465]](https://github.com/ruby/openssl/pull/465)
+
+
Version 2.1.2
=============
diff --git a/ext/openssl/depend b/ext/openssl/depend
index 68cf357294..c38d224c85 100644
--- a/ext/openssl/depend
+++ b/ext/openssl/depend
@@ -8,9 +8,166 @@ ossl.o: $(arch_hdrdir)/ruby/config.h
ossl.o: $(hdrdir)/ruby.h
ossl.o: $(hdrdir)/ruby/assert.h
ossl.o: $(hdrdir)/ruby/backward.h
+ossl.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl.o: $(hdrdir)/ruby/defines.h
ossl.o: $(hdrdir)/ruby/encoding.h
ossl.o: $(hdrdir)/ruby/intern.h
+ossl.o: $(hdrdir)/ruby/internal/abi.h
+ossl.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl.o: $(hdrdir)/ruby/internal/assume.h
+ossl.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl.o: $(hdrdir)/ruby/internal/cast.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl.o: $(hdrdir)/ruby/internal/config.h
+ossl.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl.o: $(hdrdir)/ruby/internal/core.h
+ossl.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl.o: $(hdrdir)/ruby/internal/ctype.h
+ossl.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl.o: $(hdrdir)/ruby/internal/dosish.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl.o: $(hdrdir)/ruby/internal/error.h
+ossl.o: $(hdrdir)/ruby/internal/eval.h
+ossl.o: $(hdrdir)/ruby/internal/event.h
+ossl.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl.o: $(hdrdir)/ruby/internal/gc.h
+ossl.o: $(hdrdir)/ruby/internal/glob.h
+ossl.o: $(hdrdir)/ruby/internal/globals.h
+ossl.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl.o: $(hdrdir)/ruby/internal/iterator.h
+ossl.o: $(hdrdir)/ruby/internal/memory.h
+ossl.o: $(hdrdir)/ruby/internal/method.h
+ossl.o: $(hdrdir)/ruby/internal/module.h
+ossl.o: $(hdrdir)/ruby/internal/newobj.h
+ossl.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl.o: $(hdrdir)/ruby/internal/symbol.h
+ossl.o: $(hdrdir)/ruby/internal/value.h
+ossl.o: $(hdrdir)/ruby/internal/value_type.h
+ossl.o: $(hdrdir)/ruby/internal/variable.h
+ossl.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl.o: $(hdrdir)/ruby/io.h
ossl.o: $(hdrdir)/ruby/missing.h
ossl.o: $(hdrdir)/ruby/onigmo.h
@@ -19,7 +176,6 @@ ossl.o: $(hdrdir)/ruby/ruby.h
ossl.o: $(hdrdir)/ruby/st.h
ossl.o: $(hdrdir)/ruby/subst.h
ossl.o: $(hdrdir)/ruby/thread.h
-ossl.o: $(hdrdir)/ruby/thread_native.h
ossl.o: openssl_missing.h
ossl.o: ossl.c
ossl.o: ossl.h
@@ -39,17 +195,173 @@ ossl.o: ossl_pkcs7.h
ossl.o: ossl_pkey.h
ossl.o: ossl_rand.h
ossl.o: ossl_ssl.h
-ossl.o: ossl_version.h
+ossl.o: ossl_ts.h
ossl.o: ossl_x509.h
-ossl.o: ruby_missing.h
ossl_asn1.o: $(RUBY_EXTCONF_H)
ossl_asn1.o: $(arch_hdrdir)/ruby/config.h
ossl_asn1.o: $(hdrdir)/ruby.h
ossl_asn1.o: $(hdrdir)/ruby/assert.h
ossl_asn1.o: $(hdrdir)/ruby/backward.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_asn1.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_asn1.o: $(hdrdir)/ruby/defines.h
ossl_asn1.o: $(hdrdir)/ruby/encoding.h
ossl_asn1.o: $(hdrdir)/ruby/intern.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/abi.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/assume.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/cast.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/config.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/error.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/eval.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/event.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/gc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/glob.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/globals.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/memory.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/method.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/module.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/value.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/variable.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_asn1.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_asn1.o: $(hdrdir)/ruby/io.h
ossl_asn1.o: $(hdrdir)/ruby/missing.h
ossl_asn1.o: $(hdrdir)/ruby/onigmo.h
@@ -77,17 +389,173 @@ ossl_asn1.o: ossl_pkcs7.h
ossl_asn1.o: ossl_pkey.h
ossl_asn1.o: ossl_rand.h
ossl_asn1.o: ossl_ssl.h
-ossl_asn1.o: ossl_version.h
+ossl_asn1.o: ossl_ts.h
ossl_asn1.o: ossl_x509.h
-ossl_asn1.o: ruby_missing.h
ossl_bio.o: $(RUBY_EXTCONF_H)
ossl_bio.o: $(arch_hdrdir)/ruby/config.h
ossl_bio.o: $(hdrdir)/ruby.h
ossl_bio.o: $(hdrdir)/ruby/assert.h
ossl_bio.o: $(hdrdir)/ruby/backward.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_bio.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_bio.o: $(hdrdir)/ruby/defines.h
ossl_bio.o: $(hdrdir)/ruby/encoding.h
ossl_bio.o: $(hdrdir)/ruby/intern.h
+ossl_bio.o: $(hdrdir)/ruby/internal/abi.h
+ossl_bio.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_bio.o: $(hdrdir)/ruby/internal/assume.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_bio.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_bio.o: $(hdrdir)/ruby/internal/cast.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_bio.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_bio.o: $(hdrdir)/ruby/internal/config.h
+ossl_bio.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_bio.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_bio.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_bio.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_bio.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_bio.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_bio.o: $(hdrdir)/ruby/internal/error.h
+ossl_bio.o: $(hdrdir)/ruby/internal/eval.h
+ossl_bio.o: $(hdrdir)/ruby/internal/event.h
+ossl_bio.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_bio.o: $(hdrdir)/ruby/internal/gc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/glob.h
+ossl_bio.o: $(hdrdir)/ruby/internal/globals.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_bio.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_bio.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_bio.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_bio.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_bio.o: $(hdrdir)/ruby/internal/memory.h
+ossl_bio.o: $(hdrdir)/ruby/internal/method.h
+ossl_bio.o: $(hdrdir)/ruby/internal/module.h
+ossl_bio.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_bio.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_bio.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_bio.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_bio.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_bio.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_bio.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_bio.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_bio.o: $(hdrdir)/ruby/internal/value.h
+ossl_bio.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_bio.o: $(hdrdir)/ruby/internal/variable.h
+ossl_bio.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_bio.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_bio.o: $(hdrdir)/ruby/io.h
ossl_bio.o: $(hdrdir)/ruby/missing.h
ossl_bio.o: $(hdrdir)/ruby/onigmo.h
@@ -115,21 +583,178 @@ ossl_bio.o: ossl_pkcs7.h
ossl_bio.o: ossl_pkey.h
ossl_bio.o: ossl_rand.h
ossl_bio.o: ossl_ssl.h
-ossl_bio.o: ossl_version.h
+ossl_bio.o: ossl_ts.h
ossl_bio.o: ossl_x509.h
-ossl_bio.o: ruby_missing.h
ossl_bn.o: $(RUBY_EXTCONF_H)
ossl_bn.o: $(arch_hdrdir)/ruby/config.h
ossl_bn.o: $(hdrdir)/ruby.h
ossl_bn.o: $(hdrdir)/ruby/assert.h
ossl_bn.o: $(hdrdir)/ruby/backward.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_bn.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_bn.o: $(hdrdir)/ruby/defines.h
ossl_bn.o: $(hdrdir)/ruby/encoding.h
ossl_bn.o: $(hdrdir)/ruby/intern.h
+ossl_bn.o: $(hdrdir)/ruby/internal/abi.h
+ossl_bn.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_bn.o: $(hdrdir)/ruby/internal/assume.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_bn.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_bn.o: $(hdrdir)/ruby/internal/cast.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_bn.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_bn.o: $(hdrdir)/ruby/internal/config.h
+ossl_bn.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_bn.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_bn.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_bn.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_bn.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_bn.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_bn.o: $(hdrdir)/ruby/internal/error.h
+ossl_bn.o: $(hdrdir)/ruby/internal/eval.h
+ossl_bn.o: $(hdrdir)/ruby/internal/event.h
+ossl_bn.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_bn.o: $(hdrdir)/ruby/internal/gc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/glob.h
+ossl_bn.o: $(hdrdir)/ruby/internal/globals.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_bn.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_bn.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_bn.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_bn.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_bn.o: $(hdrdir)/ruby/internal/memory.h
+ossl_bn.o: $(hdrdir)/ruby/internal/method.h
+ossl_bn.o: $(hdrdir)/ruby/internal/module.h
+ossl_bn.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_bn.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_bn.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_bn.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_bn.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_bn.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_bn.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_bn.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_bn.o: $(hdrdir)/ruby/internal/value.h
+ossl_bn.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_bn.o: $(hdrdir)/ruby/internal/variable.h
+ossl_bn.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_bn.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_bn.o: $(hdrdir)/ruby/io.h
ossl_bn.o: $(hdrdir)/ruby/missing.h
ossl_bn.o: $(hdrdir)/ruby/onigmo.h
ossl_bn.o: $(hdrdir)/ruby/oniguruma.h
+ossl_bn.o: $(hdrdir)/ruby/ractor.h
ossl_bn.o: $(hdrdir)/ruby/ruby.h
ossl_bn.o: $(hdrdir)/ruby/st.h
ossl_bn.o: $(hdrdir)/ruby/subst.h
@@ -153,17 +778,173 @@ ossl_bn.o: ossl_pkcs7.h
ossl_bn.o: ossl_pkey.h
ossl_bn.o: ossl_rand.h
ossl_bn.o: ossl_ssl.h
-ossl_bn.o: ossl_version.h
+ossl_bn.o: ossl_ts.h
ossl_bn.o: ossl_x509.h
-ossl_bn.o: ruby_missing.h
ossl_cipher.o: $(RUBY_EXTCONF_H)
ossl_cipher.o: $(arch_hdrdir)/ruby/config.h
ossl_cipher.o: $(hdrdir)/ruby.h
ossl_cipher.o: $(hdrdir)/ruby/assert.h
ossl_cipher.o: $(hdrdir)/ruby/backward.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_cipher.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_cipher.o: $(hdrdir)/ruby/defines.h
ossl_cipher.o: $(hdrdir)/ruby/encoding.h
ossl_cipher.o: $(hdrdir)/ruby/intern.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/abi.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/assume.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/cast.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/config.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/error.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/eval.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/event.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/gc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/glob.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/globals.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/memory.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/method.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/module.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/value.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/variable.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_cipher.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_cipher.o: $(hdrdir)/ruby/io.h
ossl_cipher.o: $(hdrdir)/ruby/missing.h
ossl_cipher.o: $(hdrdir)/ruby/onigmo.h
@@ -191,17 +972,173 @@ ossl_cipher.o: ossl_pkcs7.h
ossl_cipher.o: ossl_pkey.h
ossl_cipher.o: ossl_rand.h
ossl_cipher.o: ossl_ssl.h
-ossl_cipher.o: ossl_version.h
+ossl_cipher.o: ossl_ts.h
ossl_cipher.o: ossl_x509.h
-ossl_cipher.o: ruby_missing.h
ossl_config.o: $(RUBY_EXTCONF_H)
ossl_config.o: $(arch_hdrdir)/ruby/config.h
ossl_config.o: $(hdrdir)/ruby.h
ossl_config.o: $(hdrdir)/ruby/assert.h
ossl_config.o: $(hdrdir)/ruby/backward.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_config.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_config.o: $(hdrdir)/ruby/defines.h
ossl_config.o: $(hdrdir)/ruby/encoding.h
ossl_config.o: $(hdrdir)/ruby/intern.h
+ossl_config.o: $(hdrdir)/ruby/internal/abi.h
+ossl_config.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_config.o: $(hdrdir)/ruby/internal/assume.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_config.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_config.o: $(hdrdir)/ruby/internal/cast.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_config.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_config.o: $(hdrdir)/ruby/internal/config.h
+ossl_config.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_config.o: $(hdrdir)/ruby/internal/core.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_config.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_config.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_config.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_config.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_config.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_config.o: $(hdrdir)/ruby/internal/error.h
+ossl_config.o: $(hdrdir)/ruby/internal/eval.h
+ossl_config.o: $(hdrdir)/ruby/internal/event.h
+ossl_config.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_config.o: $(hdrdir)/ruby/internal/gc.h
+ossl_config.o: $(hdrdir)/ruby/internal/glob.h
+ossl_config.o: $(hdrdir)/ruby/internal/globals.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_config.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_config.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_config.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_config.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_config.o: $(hdrdir)/ruby/internal/memory.h
+ossl_config.o: $(hdrdir)/ruby/internal/method.h
+ossl_config.o: $(hdrdir)/ruby/internal/module.h
+ossl_config.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_config.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_config.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_config.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_config.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_config.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_config.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_config.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_config.o: $(hdrdir)/ruby/internal/value.h
+ossl_config.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_config.o: $(hdrdir)/ruby/internal/variable.h
+ossl_config.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_config.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_config.o: $(hdrdir)/ruby/io.h
ossl_config.o: $(hdrdir)/ruby/missing.h
ossl_config.o: $(hdrdir)/ruby/onigmo.h
@@ -229,17 +1166,173 @@ ossl_config.o: ossl_pkcs7.h
ossl_config.o: ossl_pkey.h
ossl_config.o: ossl_rand.h
ossl_config.o: ossl_ssl.h
-ossl_config.o: ossl_version.h
+ossl_config.o: ossl_ts.h
ossl_config.o: ossl_x509.h
-ossl_config.o: ruby_missing.h
ossl_digest.o: $(RUBY_EXTCONF_H)
ossl_digest.o: $(arch_hdrdir)/ruby/config.h
ossl_digest.o: $(hdrdir)/ruby.h
ossl_digest.o: $(hdrdir)/ruby/assert.h
ossl_digest.o: $(hdrdir)/ruby/backward.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_digest.o: $(hdrdir)/ruby/defines.h
ossl_digest.o: $(hdrdir)/ruby/encoding.h
ossl_digest.o: $(hdrdir)/ruby/intern.h
+ossl_digest.o: $(hdrdir)/ruby/internal/abi.h
+ossl_digest.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_digest.o: $(hdrdir)/ruby/internal/assume.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_digest.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_digest.o: $(hdrdir)/ruby/internal/cast.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_digest.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_digest.o: $(hdrdir)/ruby/internal/config.h
+ossl_digest.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_digest.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_digest.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_digest.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_digest.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_digest.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_digest.o: $(hdrdir)/ruby/internal/error.h
+ossl_digest.o: $(hdrdir)/ruby/internal/eval.h
+ossl_digest.o: $(hdrdir)/ruby/internal/event.h
+ossl_digest.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_digest.o: $(hdrdir)/ruby/internal/gc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/glob.h
+ossl_digest.o: $(hdrdir)/ruby/internal/globals.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_digest.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_digest.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_digest.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_digest.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_digest.o: $(hdrdir)/ruby/internal/memory.h
+ossl_digest.o: $(hdrdir)/ruby/internal/method.h
+ossl_digest.o: $(hdrdir)/ruby/internal/module.h
+ossl_digest.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_digest.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_digest.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_digest.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_digest.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_digest.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_digest.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_digest.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_digest.o: $(hdrdir)/ruby/internal/value.h
+ossl_digest.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_digest.o: $(hdrdir)/ruby/internal/variable.h
+ossl_digest.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_digest.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_digest.o: $(hdrdir)/ruby/io.h
ossl_digest.o: $(hdrdir)/ruby/missing.h
ossl_digest.o: $(hdrdir)/ruby/onigmo.h
@@ -267,17 +1360,173 @@ ossl_digest.o: ossl_pkcs7.h
ossl_digest.o: ossl_pkey.h
ossl_digest.o: ossl_rand.h
ossl_digest.o: ossl_ssl.h
-ossl_digest.o: ossl_version.h
+ossl_digest.o: ossl_ts.h
ossl_digest.o: ossl_x509.h
-ossl_digest.o: ruby_missing.h
ossl_engine.o: $(RUBY_EXTCONF_H)
ossl_engine.o: $(arch_hdrdir)/ruby/config.h
ossl_engine.o: $(hdrdir)/ruby.h
ossl_engine.o: $(hdrdir)/ruby/assert.h
ossl_engine.o: $(hdrdir)/ruby/backward.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_engine.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_engine.o: $(hdrdir)/ruby/defines.h
ossl_engine.o: $(hdrdir)/ruby/encoding.h
ossl_engine.o: $(hdrdir)/ruby/intern.h
+ossl_engine.o: $(hdrdir)/ruby/internal/abi.h
+ossl_engine.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_engine.o: $(hdrdir)/ruby/internal/assume.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_engine.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_engine.o: $(hdrdir)/ruby/internal/cast.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_engine.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_engine.o: $(hdrdir)/ruby/internal/config.h
+ossl_engine.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_engine.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_engine.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_engine.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_engine.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_engine.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_engine.o: $(hdrdir)/ruby/internal/error.h
+ossl_engine.o: $(hdrdir)/ruby/internal/eval.h
+ossl_engine.o: $(hdrdir)/ruby/internal/event.h
+ossl_engine.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_engine.o: $(hdrdir)/ruby/internal/gc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/glob.h
+ossl_engine.o: $(hdrdir)/ruby/internal/globals.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_engine.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_engine.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_engine.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_engine.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_engine.o: $(hdrdir)/ruby/internal/memory.h
+ossl_engine.o: $(hdrdir)/ruby/internal/method.h
+ossl_engine.o: $(hdrdir)/ruby/internal/module.h
+ossl_engine.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_engine.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_engine.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_engine.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_engine.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_engine.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_engine.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_engine.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_engine.o: $(hdrdir)/ruby/internal/value.h
+ossl_engine.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_engine.o: $(hdrdir)/ruby/internal/variable.h
+ossl_engine.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_engine.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_engine.o: $(hdrdir)/ruby/io.h
ossl_engine.o: $(hdrdir)/ruby/missing.h
ossl_engine.o: $(hdrdir)/ruby/onigmo.h
@@ -305,17 +1554,173 @@ ossl_engine.o: ossl_pkcs7.h
ossl_engine.o: ossl_pkey.h
ossl_engine.o: ossl_rand.h
ossl_engine.o: ossl_ssl.h
-ossl_engine.o: ossl_version.h
+ossl_engine.o: ossl_ts.h
ossl_engine.o: ossl_x509.h
-ossl_engine.o: ruby_missing.h
ossl_hmac.o: $(RUBY_EXTCONF_H)
ossl_hmac.o: $(arch_hdrdir)/ruby/config.h
ossl_hmac.o: $(hdrdir)/ruby.h
ossl_hmac.o: $(hdrdir)/ruby/assert.h
ossl_hmac.o: $(hdrdir)/ruby/backward.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_hmac.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_hmac.o: $(hdrdir)/ruby/defines.h
ossl_hmac.o: $(hdrdir)/ruby/encoding.h
ossl_hmac.o: $(hdrdir)/ruby/intern.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/abi.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/assume.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/cast.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/config.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/error.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/eval.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/event.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/gc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/glob.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/globals.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/memory.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/method.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/module.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/value.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/variable.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_hmac.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_hmac.o: $(hdrdir)/ruby/io.h
ossl_hmac.o: $(hdrdir)/ruby/missing.h
ossl_hmac.o: $(hdrdir)/ruby/onigmo.h
@@ -343,17 +1748,173 @@ ossl_hmac.o: ossl_pkcs7.h
ossl_hmac.o: ossl_pkey.h
ossl_hmac.o: ossl_rand.h
ossl_hmac.o: ossl_ssl.h
-ossl_hmac.o: ossl_version.h
+ossl_hmac.o: ossl_ts.h
ossl_hmac.o: ossl_x509.h
-ossl_hmac.o: ruby_missing.h
ossl_kdf.o: $(RUBY_EXTCONF_H)
ossl_kdf.o: $(arch_hdrdir)/ruby/config.h
ossl_kdf.o: $(hdrdir)/ruby.h
ossl_kdf.o: $(hdrdir)/ruby/assert.h
ossl_kdf.o: $(hdrdir)/ruby/backward.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_kdf.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_kdf.o: $(hdrdir)/ruby/defines.h
ossl_kdf.o: $(hdrdir)/ruby/encoding.h
ossl_kdf.o: $(hdrdir)/ruby/intern.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/abi.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/assume.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/cast.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/config.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/error.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/eval.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/event.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/gc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/glob.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/globals.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/memory.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/method.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/module.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/value.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/variable.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_kdf.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_kdf.o: $(hdrdir)/ruby/io.h
ossl_kdf.o: $(hdrdir)/ruby/missing.h
ossl_kdf.o: $(hdrdir)/ruby/onigmo.h
@@ -381,17 +1942,173 @@ ossl_kdf.o: ossl_pkcs7.h
ossl_kdf.o: ossl_pkey.h
ossl_kdf.o: ossl_rand.h
ossl_kdf.o: ossl_ssl.h
-ossl_kdf.o: ossl_version.h
+ossl_kdf.o: ossl_ts.h
ossl_kdf.o: ossl_x509.h
-ossl_kdf.o: ruby_missing.h
ossl_ns_spki.o: $(RUBY_EXTCONF_H)
ossl_ns_spki.o: $(arch_hdrdir)/ruby/config.h
ossl_ns_spki.o: $(hdrdir)/ruby.h
ossl_ns_spki.o: $(hdrdir)/ruby/assert.h
ossl_ns_spki.o: $(hdrdir)/ruby/backward.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_ns_spki.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_ns_spki.o: $(hdrdir)/ruby/defines.h
ossl_ns_spki.o: $(hdrdir)/ruby/encoding.h
ossl_ns_spki.o: $(hdrdir)/ruby/intern.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/abi.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/assume.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/cast.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/config.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/error.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/eval.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/event.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/gc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/glob.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/globals.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/memory.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/method.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/module.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/value.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/variable.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_ns_spki.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_ns_spki.o: $(hdrdir)/ruby/io.h
ossl_ns_spki.o: $(hdrdir)/ruby/missing.h
ossl_ns_spki.o: $(hdrdir)/ruby/onigmo.h
@@ -419,17 +2136,173 @@ ossl_ns_spki.o: ossl_pkcs7.h
ossl_ns_spki.o: ossl_pkey.h
ossl_ns_spki.o: ossl_rand.h
ossl_ns_spki.o: ossl_ssl.h
-ossl_ns_spki.o: ossl_version.h
+ossl_ns_spki.o: ossl_ts.h
ossl_ns_spki.o: ossl_x509.h
-ossl_ns_spki.o: ruby_missing.h
ossl_ocsp.o: $(RUBY_EXTCONF_H)
ossl_ocsp.o: $(arch_hdrdir)/ruby/config.h
ossl_ocsp.o: $(hdrdir)/ruby.h
ossl_ocsp.o: $(hdrdir)/ruby/assert.h
ossl_ocsp.o: $(hdrdir)/ruby/backward.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_ocsp.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_ocsp.o: $(hdrdir)/ruby/defines.h
ossl_ocsp.o: $(hdrdir)/ruby/encoding.h
ossl_ocsp.o: $(hdrdir)/ruby/intern.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/abi.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/assume.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/cast.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/config.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/error.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/eval.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/event.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/gc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/glob.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/globals.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/memory.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/method.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/module.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/value.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/variable.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_ocsp.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_ocsp.o: $(hdrdir)/ruby/io.h
ossl_ocsp.o: $(hdrdir)/ruby/missing.h
ossl_ocsp.o: $(hdrdir)/ruby/onigmo.h
@@ -457,17 +2330,173 @@ ossl_ocsp.o: ossl_pkcs7.h
ossl_ocsp.o: ossl_pkey.h
ossl_ocsp.o: ossl_rand.h
ossl_ocsp.o: ossl_ssl.h
-ossl_ocsp.o: ossl_version.h
+ossl_ocsp.o: ossl_ts.h
ossl_ocsp.o: ossl_x509.h
-ossl_ocsp.o: ruby_missing.h
ossl_pkcs12.o: $(RUBY_EXTCONF_H)
ossl_pkcs12.o: $(arch_hdrdir)/ruby/config.h
ossl_pkcs12.o: $(hdrdir)/ruby.h
ossl_pkcs12.o: $(hdrdir)/ruby/assert.h
ossl_pkcs12.o: $(hdrdir)/ruby/backward.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkcs12.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkcs12.o: $(hdrdir)/ruby/defines.h
ossl_pkcs12.o: $(hdrdir)/ruby/encoding.h
ossl_pkcs12.o: $(hdrdir)/ruby/intern.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkcs12.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkcs12.o: $(hdrdir)/ruby/io.h
ossl_pkcs12.o: $(hdrdir)/ruby/missing.h
ossl_pkcs12.o: $(hdrdir)/ruby/onigmo.h
@@ -495,17 +2524,173 @@ ossl_pkcs12.o: ossl_pkcs7.h
ossl_pkcs12.o: ossl_pkey.h
ossl_pkcs12.o: ossl_rand.h
ossl_pkcs12.o: ossl_ssl.h
-ossl_pkcs12.o: ossl_version.h
+ossl_pkcs12.o: ossl_ts.h
ossl_pkcs12.o: ossl_x509.h
-ossl_pkcs12.o: ruby_missing.h
ossl_pkcs7.o: $(RUBY_EXTCONF_H)
ossl_pkcs7.o: $(arch_hdrdir)/ruby/config.h
ossl_pkcs7.o: $(hdrdir)/ruby.h
ossl_pkcs7.o: $(hdrdir)/ruby/assert.h
ossl_pkcs7.o: $(hdrdir)/ruby/backward.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkcs7.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkcs7.o: $(hdrdir)/ruby/defines.h
ossl_pkcs7.o: $(hdrdir)/ruby/encoding.h
ossl_pkcs7.o: $(hdrdir)/ruby/intern.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkcs7.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkcs7.o: $(hdrdir)/ruby/io.h
ossl_pkcs7.o: $(hdrdir)/ruby/missing.h
ossl_pkcs7.o: $(hdrdir)/ruby/onigmo.h
@@ -533,17 +2718,173 @@ ossl_pkcs7.o: ossl_pkcs7.h
ossl_pkcs7.o: ossl_pkey.h
ossl_pkcs7.o: ossl_rand.h
ossl_pkcs7.o: ossl_ssl.h
-ossl_pkcs7.o: ossl_version.h
+ossl_pkcs7.o: ossl_ts.h
ossl_pkcs7.o: ossl_x509.h
-ossl_pkcs7.o: ruby_missing.h
ossl_pkey.o: $(RUBY_EXTCONF_H)
ossl_pkey.o: $(arch_hdrdir)/ruby/config.h
ossl_pkey.o: $(hdrdir)/ruby.h
ossl_pkey.o: $(hdrdir)/ruby/assert.h
ossl_pkey.o: $(hdrdir)/ruby/backward.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkey.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkey.o: $(hdrdir)/ruby/defines.h
ossl_pkey.o: $(hdrdir)/ruby/encoding.h
ossl_pkey.o: $(hdrdir)/ruby/intern.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkey.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkey.o: $(hdrdir)/ruby/io.h
ossl_pkey.o: $(hdrdir)/ruby/missing.h
ossl_pkey.o: $(hdrdir)/ruby/onigmo.h
@@ -571,17 +2912,173 @@ ossl_pkey.o: ossl_pkey.c
ossl_pkey.o: ossl_pkey.h
ossl_pkey.o: ossl_rand.h
ossl_pkey.o: ossl_ssl.h
-ossl_pkey.o: ossl_version.h
+ossl_pkey.o: ossl_ts.h
ossl_pkey.o: ossl_x509.h
-ossl_pkey.o: ruby_missing.h
ossl_pkey_dh.o: $(RUBY_EXTCONF_H)
ossl_pkey_dh.o: $(arch_hdrdir)/ruby/config.h
ossl_pkey_dh.o: $(hdrdir)/ruby.h
ossl_pkey_dh.o: $(hdrdir)/ruby/assert.h
ossl_pkey_dh.o: $(hdrdir)/ruby/backward.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkey_dh.o: $(hdrdir)/ruby/defines.h
ossl_pkey_dh.o: $(hdrdir)/ruby/encoding.h
ossl_pkey_dh.o: $(hdrdir)/ruby/intern.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkey_dh.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkey_dh.o: $(hdrdir)/ruby/io.h
ossl_pkey_dh.o: $(hdrdir)/ruby/missing.h
ossl_pkey_dh.o: $(hdrdir)/ruby/onigmo.h
@@ -609,17 +3106,173 @@ ossl_pkey_dh.o: ossl_pkey.h
ossl_pkey_dh.o: ossl_pkey_dh.c
ossl_pkey_dh.o: ossl_rand.h
ossl_pkey_dh.o: ossl_ssl.h
-ossl_pkey_dh.o: ossl_version.h
+ossl_pkey_dh.o: ossl_ts.h
ossl_pkey_dh.o: ossl_x509.h
-ossl_pkey_dh.o: ruby_missing.h
ossl_pkey_dsa.o: $(RUBY_EXTCONF_H)
ossl_pkey_dsa.o: $(arch_hdrdir)/ruby/config.h
ossl_pkey_dsa.o: $(hdrdir)/ruby.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/assert.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/backward.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/defines.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/encoding.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/intern.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkey_dsa.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/io.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/missing.h
ossl_pkey_dsa.o: $(hdrdir)/ruby/onigmo.h
@@ -647,17 +3300,173 @@ ossl_pkey_dsa.o: ossl_pkey.h
ossl_pkey_dsa.o: ossl_pkey_dsa.c
ossl_pkey_dsa.o: ossl_rand.h
ossl_pkey_dsa.o: ossl_ssl.h
-ossl_pkey_dsa.o: ossl_version.h
+ossl_pkey_dsa.o: ossl_ts.h
ossl_pkey_dsa.o: ossl_x509.h
-ossl_pkey_dsa.o: ruby_missing.h
ossl_pkey_ec.o: $(RUBY_EXTCONF_H)
ossl_pkey_ec.o: $(arch_hdrdir)/ruby/config.h
ossl_pkey_ec.o: $(hdrdir)/ruby.h
ossl_pkey_ec.o: $(hdrdir)/ruby/assert.h
ossl_pkey_ec.o: $(hdrdir)/ruby/backward.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkey_ec.o: $(hdrdir)/ruby/defines.h
ossl_pkey_ec.o: $(hdrdir)/ruby/encoding.h
ossl_pkey_ec.o: $(hdrdir)/ruby/intern.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkey_ec.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkey_ec.o: $(hdrdir)/ruby/io.h
ossl_pkey_ec.o: $(hdrdir)/ruby/missing.h
ossl_pkey_ec.o: $(hdrdir)/ruby/onigmo.h
@@ -685,17 +3494,173 @@ ossl_pkey_ec.o: ossl_pkey.h
ossl_pkey_ec.o: ossl_pkey_ec.c
ossl_pkey_ec.o: ossl_rand.h
ossl_pkey_ec.o: ossl_ssl.h
-ossl_pkey_ec.o: ossl_version.h
+ossl_pkey_ec.o: ossl_ts.h
ossl_pkey_ec.o: ossl_x509.h
-ossl_pkey_ec.o: ruby_missing.h
ossl_pkey_rsa.o: $(RUBY_EXTCONF_H)
ossl_pkey_rsa.o: $(arch_hdrdir)/ruby/config.h
ossl_pkey_rsa.o: $(hdrdir)/ruby.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/assert.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/backward.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/defines.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/encoding.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/intern.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/abi.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/assume.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/cast.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/config.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/error.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/eval.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/event.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/gc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/glob.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/globals.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/memory.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/method.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/module.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/value.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/variable.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_pkey_rsa.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/io.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/missing.h
ossl_pkey_rsa.o: $(hdrdir)/ruby/onigmo.h
@@ -723,17 +3688,173 @@ ossl_pkey_rsa.o: ossl_pkey.h
ossl_pkey_rsa.o: ossl_pkey_rsa.c
ossl_pkey_rsa.o: ossl_rand.h
ossl_pkey_rsa.o: ossl_ssl.h
-ossl_pkey_rsa.o: ossl_version.h
+ossl_pkey_rsa.o: ossl_ts.h
ossl_pkey_rsa.o: ossl_x509.h
-ossl_pkey_rsa.o: ruby_missing.h
ossl_rand.o: $(RUBY_EXTCONF_H)
ossl_rand.o: $(arch_hdrdir)/ruby/config.h
ossl_rand.o: $(hdrdir)/ruby.h
ossl_rand.o: $(hdrdir)/ruby/assert.h
ossl_rand.o: $(hdrdir)/ruby/backward.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_rand.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_rand.o: $(hdrdir)/ruby/defines.h
ossl_rand.o: $(hdrdir)/ruby/encoding.h
ossl_rand.o: $(hdrdir)/ruby/intern.h
+ossl_rand.o: $(hdrdir)/ruby/internal/abi.h
+ossl_rand.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_rand.o: $(hdrdir)/ruby/internal/assume.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_rand.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_rand.o: $(hdrdir)/ruby/internal/cast.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_rand.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_rand.o: $(hdrdir)/ruby/internal/config.h
+ossl_rand.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_rand.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_rand.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_rand.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_rand.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_rand.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_rand.o: $(hdrdir)/ruby/internal/error.h
+ossl_rand.o: $(hdrdir)/ruby/internal/eval.h
+ossl_rand.o: $(hdrdir)/ruby/internal/event.h
+ossl_rand.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_rand.o: $(hdrdir)/ruby/internal/gc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/glob.h
+ossl_rand.o: $(hdrdir)/ruby/internal/globals.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_rand.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_rand.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_rand.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_rand.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_rand.o: $(hdrdir)/ruby/internal/memory.h
+ossl_rand.o: $(hdrdir)/ruby/internal/method.h
+ossl_rand.o: $(hdrdir)/ruby/internal/module.h
+ossl_rand.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_rand.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_rand.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_rand.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_rand.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_rand.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_rand.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_rand.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_rand.o: $(hdrdir)/ruby/internal/value.h
+ossl_rand.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_rand.o: $(hdrdir)/ruby/internal/variable.h
+ossl_rand.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_rand.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_rand.o: $(hdrdir)/ruby/io.h
ossl_rand.o: $(hdrdir)/ruby/missing.h
ossl_rand.o: $(hdrdir)/ruby/onigmo.h
@@ -761,17 +3882,173 @@ ossl_rand.o: ossl_pkey.h
ossl_rand.o: ossl_rand.c
ossl_rand.o: ossl_rand.h
ossl_rand.o: ossl_ssl.h
-ossl_rand.o: ossl_version.h
+ossl_rand.o: ossl_ts.h
ossl_rand.o: ossl_x509.h
-ossl_rand.o: ruby_missing.h
ossl_ssl.o: $(RUBY_EXTCONF_H)
ossl_ssl.o: $(arch_hdrdir)/ruby/config.h
ossl_ssl.o: $(hdrdir)/ruby.h
ossl_ssl.o: $(hdrdir)/ruby/assert.h
ossl_ssl.o: $(hdrdir)/ruby/backward.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_ssl.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_ssl.o: $(hdrdir)/ruby/defines.h
ossl_ssl.o: $(hdrdir)/ruby/encoding.h
ossl_ssl.o: $(hdrdir)/ruby/intern.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/abi.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/assume.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/cast.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/config.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/error.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/eval.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/event.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/gc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/glob.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/globals.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/memory.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/method.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/module.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/value.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/variable.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_ssl.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_ssl.o: $(hdrdir)/ruby/io.h
ossl_ssl.o: $(hdrdir)/ruby/missing.h
ossl_ssl.o: $(hdrdir)/ruby/onigmo.h
@@ -799,17 +4076,173 @@ ossl_ssl.o: ossl_pkey.h
ossl_ssl.o: ossl_rand.h
ossl_ssl.o: ossl_ssl.c
ossl_ssl.o: ossl_ssl.h
-ossl_ssl.o: ossl_version.h
+ossl_ssl.o: ossl_ts.h
ossl_ssl.o: ossl_x509.h
-ossl_ssl.o: ruby_missing.h
ossl_ssl_session.o: $(RUBY_EXTCONF_H)
ossl_ssl_session.o: $(arch_hdrdir)/ruby/config.h
ossl_ssl_session.o: $(hdrdir)/ruby.h
ossl_ssl_session.o: $(hdrdir)/ruby/assert.h
ossl_ssl_session.o: $(hdrdir)/ruby/backward.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_ssl_session.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_ssl_session.o: $(hdrdir)/ruby/defines.h
ossl_ssl_session.o: $(hdrdir)/ruby/encoding.h
ossl_ssl_session.o: $(hdrdir)/ruby/intern.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/abi.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/assume.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/cast.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/config.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/error.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/eval.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/event.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/gc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/glob.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/globals.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/memory.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/method.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/module.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/value.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/variable.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_ssl_session.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_ssl_session.o: $(hdrdir)/ruby/io.h
ossl_ssl_session.o: $(hdrdir)/ruby/missing.h
ossl_ssl_session.o: $(hdrdir)/ruby/onigmo.h
@@ -837,17 +4270,367 @@ ossl_ssl_session.o: ossl_pkey.h
ossl_ssl_session.o: ossl_rand.h
ossl_ssl_session.o: ossl_ssl.h
ossl_ssl_session.o: ossl_ssl_session.c
-ossl_ssl_session.o: ossl_version.h
+ossl_ssl_session.o: ossl_ts.h
ossl_ssl_session.o: ossl_x509.h
-ossl_ssl_session.o: ruby_missing.h
+ossl_ts.o: $(RUBY_EXTCONF_H)
+ossl_ts.o: $(arch_hdrdir)/ruby/config.h
+ossl_ts.o: $(hdrdir)/ruby.h
+ossl_ts.o: $(hdrdir)/ruby/assert.h
+ossl_ts.o: $(hdrdir)/ruby/backward.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_ts.o: $(hdrdir)/ruby/backward/2/stdarg.h
+ossl_ts.o: $(hdrdir)/ruby/defines.h
+ossl_ts.o: $(hdrdir)/ruby/encoding.h
+ossl_ts.o: $(hdrdir)/ruby/intern.h
+ossl_ts.o: $(hdrdir)/ruby/internal/abi.h
+ossl_ts.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_ts.o: $(hdrdir)/ruby/internal/assume.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_ts.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_ts.o: $(hdrdir)/ruby/internal/cast.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_ts.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_ts.o: $(hdrdir)/ruby/internal/config.h
+ossl_ts.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_ts.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_ts.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_ts.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_ts.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_ts.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_ts.o: $(hdrdir)/ruby/internal/error.h
+ossl_ts.o: $(hdrdir)/ruby/internal/eval.h
+ossl_ts.o: $(hdrdir)/ruby/internal/event.h
+ossl_ts.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_ts.o: $(hdrdir)/ruby/internal/gc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/glob.h
+ossl_ts.o: $(hdrdir)/ruby/internal/globals.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_ts.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_ts.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_ts.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_ts.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_ts.o: $(hdrdir)/ruby/internal/memory.h
+ossl_ts.o: $(hdrdir)/ruby/internal/method.h
+ossl_ts.o: $(hdrdir)/ruby/internal/module.h
+ossl_ts.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_ts.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_ts.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_ts.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_ts.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_ts.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_ts.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_ts.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_ts.o: $(hdrdir)/ruby/internal/value.h
+ossl_ts.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_ts.o: $(hdrdir)/ruby/internal/variable.h
+ossl_ts.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_ts.o: $(hdrdir)/ruby/internal/xmalloc.h
+ossl_ts.o: $(hdrdir)/ruby/io.h
+ossl_ts.o: $(hdrdir)/ruby/missing.h
+ossl_ts.o: $(hdrdir)/ruby/onigmo.h
+ossl_ts.o: $(hdrdir)/ruby/oniguruma.h
+ossl_ts.o: $(hdrdir)/ruby/ruby.h
+ossl_ts.o: $(hdrdir)/ruby/st.h
+ossl_ts.o: $(hdrdir)/ruby/subst.h
+ossl_ts.o: $(hdrdir)/ruby/thread.h
+ossl_ts.o: openssl_missing.h
+ossl_ts.o: ossl.h
+ossl_ts.o: ossl_asn1.h
+ossl_ts.o: ossl_bio.h
+ossl_ts.o: ossl_bn.h
+ossl_ts.o: ossl_cipher.h
+ossl_ts.o: ossl_config.h
+ossl_ts.o: ossl_digest.h
+ossl_ts.o: ossl_engine.h
+ossl_ts.o: ossl_hmac.h
+ossl_ts.o: ossl_kdf.h
+ossl_ts.o: ossl_ns_spki.h
+ossl_ts.o: ossl_ocsp.h
+ossl_ts.o: ossl_pkcs12.h
+ossl_ts.o: ossl_pkcs7.h
+ossl_ts.o: ossl_pkey.h
+ossl_ts.o: ossl_rand.h
+ossl_ts.o: ossl_ssl.h
+ossl_ts.o: ossl_ts.c
+ossl_ts.o: ossl_ts.h
+ossl_ts.o: ossl_x509.h
ossl_x509.o: $(RUBY_EXTCONF_H)
ossl_x509.o: $(arch_hdrdir)/ruby/config.h
ossl_x509.o: $(hdrdir)/ruby.h
ossl_x509.o: $(hdrdir)/ruby/assert.h
ossl_x509.o: $(hdrdir)/ruby/backward.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509.o: $(hdrdir)/ruby/defines.h
ossl_x509.o: $(hdrdir)/ruby/encoding.h
ossl_x509.o: $(hdrdir)/ruby/intern.h
+ossl_x509.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509.o: $(hdrdir)/ruby/io.h
ossl_x509.o: $(hdrdir)/ruby/missing.h
ossl_x509.o: $(hdrdir)/ruby/onigmo.h
@@ -874,18 +4657,174 @@ ossl_x509.o: ossl_pkcs7.h
ossl_x509.o: ossl_pkey.h
ossl_x509.o: ossl_rand.h
ossl_x509.o: ossl_ssl.h
-ossl_x509.o: ossl_version.h
+ossl_x509.o: ossl_ts.h
ossl_x509.o: ossl_x509.c
ossl_x509.o: ossl_x509.h
-ossl_x509.o: ruby_missing.h
ossl_x509attr.o: $(RUBY_EXTCONF_H)
ossl_x509attr.o: $(arch_hdrdir)/ruby/config.h
ossl_x509attr.o: $(hdrdir)/ruby.h
ossl_x509attr.o: $(hdrdir)/ruby/assert.h
ossl_x509attr.o: $(hdrdir)/ruby/backward.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509attr.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509attr.o: $(hdrdir)/ruby/defines.h
ossl_x509attr.o: $(hdrdir)/ruby/encoding.h
ossl_x509attr.o: $(hdrdir)/ruby/intern.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509attr.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509attr.o: $(hdrdir)/ruby/io.h
ossl_x509attr.o: $(hdrdir)/ruby/missing.h
ossl_x509attr.o: $(hdrdir)/ruby/onigmo.h
@@ -912,18 +4851,174 @@ ossl_x509attr.o: ossl_pkcs7.h
ossl_x509attr.o: ossl_pkey.h
ossl_x509attr.o: ossl_rand.h
ossl_x509attr.o: ossl_ssl.h
-ossl_x509attr.o: ossl_version.h
+ossl_x509attr.o: ossl_ts.h
ossl_x509attr.o: ossl_x509.h
ossl_x509attr.o: ossl_x509attr.c
-ossl_x509attr.o: ruby_missing.h
ossl_x509cert.o: $(RUBY_EXTCONF_H)
ossl_x509cert.o: $(arch_hdrdir)/ruby/config.h
ossl_x509cert.o: $(hdrdir)/ruby.h
ossl_x509cert.o: $(hdrdir)/ruby/assert.h
ossl_x509cert.o: $(hdrdir)/ruby/backward.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509cert.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509cert.o: $(hdrdir)/ruby/defines.h
ossl_x509cert.o: $(hdrdir)/ruby/encoding.h
ossl_x509cert.o: $(hdrdir)/ruby/intern.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509cert.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509cert.o: $(hdrdir)/ruby/io.h
ossl_x509cert.o: $(hdrdir)/ruby/missing.h
ossl_x509cert.o: $(hdrdir)/ruby/onigmo.h
@@ -950,18 +5045,174 @@ ossl_x509cert.o: ossl_pkcs7.h
ossl_x509cert.o: ossl_pkey.h
ossl_x509cert.o: ossl_rand.h
ossl_x509cert.o: ossl_ssl.h
-ossl_x509cert.o: ossl_version.h
+ossl_x509cert.o: ossl_ts.h
ossl_x509cert.o: ossl_x509.h
ossl_x509cert.o: ossl_x509cert.c
-ossl_x509cert.o: ruby_missing.h
ossl_x509crl.o: $(RUBY_EXTCONF_H)
ossl_x509crl.o: $(arch_hdrdir)/ruby/config.h
ossl_x509crl.o: $(hdrdir)/ruby.h
ossl_x509crl.o: $(hdrdir)/ruby/assert.h
ossl_x509crl.o: $(hdrdir)/ruby/backward.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509crl.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509crl.o: $(hdrdir)/ruby/defines.h
ossl_x509crl.o: $(hdrdir)/ruby/encoding.h
ossl_x509crl.o: $(hdrdir)/ruby/intern.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509crl.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509crl.o: $(hdrdir)/ruby/io.h
ossl_x509crl.o: $(hdrdir)/ruby/missing.h
ossl_x509crl.o: $(hdrdir)/ruby/onigmo.h
@@ -988,18 +5239,174 @@ ossl_x509crl.o: ossl_pkcs7.h
ossl_x509crl.o: ossl_pkey.h
ossl_x509crl.o: ossl_rand.h
ossl_x509crl.o: ossl_ssl.h
-ossl_x509crl.o: ossl_version.h
+ossl_x509crl.o: ossl_ts.h
ossl_x509crl.o: ossl_x509.h
ossl_x509crl.o: ossl_x509crl.c
-ossl_x509crl.o: ruby_missing.h
ossl_x509ext.o: $(RUBY_EXTCONF_H)
ossl_x509ext.o: $(arch_hdrdir)/ruby/config.h
ossl_x509ext.o: $(hdrdir)/ruby.h
ossl_x509ext.o: $(hdrdir)/ruby/assert.h
ossl_x509ext.o: $(hdrdir)/ruby/backward.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509ext.o: $(hdrdir)/ruby/defines.h
ossl_x509ext.o: $(hdrdir)/ruby/encoding.h
ossl_x509ext.o: $(hdrdir)/ruby/intern.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509ext.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509ext.o: $(hdrdir)/ruby/io.h
ossl_x509ext.o: $(hdrdir)/ruby/missing.h
ossl_x509ext.o: $(hdrdir)/ruby/onigmo.h
@@ -1026,18 +5433,174 @@ ossl_x509ext.o: ossl_pkcs7.h
ossl_x509ext.o: ossl_pkey.h
ossl_x509ext.o: ossl_rand.h
ossl_x509ext.o: ossl_ssl.h
-ossl_x509ext.o: ossl_version.h
+ossl_x509ext.o: ossl_ts.h
ossl_x509ext.o: ossl_x509.h
ossl_x509ext.o: ossl_x509ext.c
-ossl_x509ext.o: ruby_missing.h
ossl_x509name.o: $(RUBY_EXTCONF_H)
ossl_x509name.o: $(arch_hdrdir)/ruby/config.h
ossl_x509name.o: $(hdrdir)/ruby.h
ossl_x509name.o: $(hdrdir)/ruby/assert.h
ossl_x509name.o: $(hdrdir)/ruby/backward.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509name.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509name.o: $(hdrdir)/ruby/defines.h
ossl_x509name.o: $(hdrdir)/ruby/encoding.h
ossl_x509name.o: $(hdrdir)/ruby/intern.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509name.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509name.o: $(hdrdir)/ruby/io.h
ossl_x509name.o: $(hdrdir)/ruby/missing.h
ossl_x509name.o: $(hdrdir)/ruby/onigmo.h
@@ -1064,18 +5627,174 @@ ossl_x509name.o: ossl_pkcs7.h
ossl_x509name.o: ossl_pkey.h
ossl_x509name.o: ossl_rand.h
ossl_x509name.o: ossl_ssl.h
-ossl_x509name.o: ossl_version.h
+ossl_x509name.o: ossl_ts.h
ossl_x509name.o: ossl_x509.h
ossl_x509name.o: ossl_x509name.c
-ossl_x509name.o: ruby_missing.h
ossl_x509req.o: $(RUBY_EXTCONF_H)
ossl_x509req.o: $(arch_hdrdir)/ruby/config.h
ossl_x509req.o: $(hdrdir)/ruby.h
ossl_x509req.o: $(hdrdir)/ruby/assert.h
ossl_x509req.o: $(hdrdir)/ruby/backward.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509req.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509req.o: $(hdrdir)/ruby/defines.h
ossl_x509req.o: $(hdrdir)/ruby/encoding.h
ossl_x509req.o: $(hdrdir)/ruby/intern.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509req.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509req.o: $(hdrdir)/ruby/io.h
ossl_x509req.o: $(hdrdir)/ruby/missing.h
ossl_x509req.o: $(hdrdir)/ruby/onigmo.h
@@ -1102,18 +5821,174 @@ ossl_x509req.o: ossl_pkcs7.h
ossl_x509req.o: ossl_pkey.h
ossl_x509req.o: ossl_rand.h
ossl_x509req.o: ossl_ssl.h
-ossl_x509req.o: ossl_version.h
+ossl_x509req.o: ossl_ts.h
ossl_x509req.o: ossl_x509.h
ossl_x509req.o: ossl_x509req.c
-ossl_x509req.o: ruby_missing.h
ossl_x509revoked.o: $(RUBY_EXTCONF_H)
ossl_x509revoked.o: $(arch_hdrdir)/ruby/config.h
ossl_x509revoked.o: $(hdrdir)/ruby.h
ossl_x509revoked.o: $(hdrdir)/ruby/assert.h
ossl_x509revoked.o: $(hdrdir)/ruby/backward.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509revoked.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509revoked.o: $(hdrdir)/ruby/defines.h
ossl_x509revoked.o: $(hdrdir)/ruby/encoding.h
ossl_x509revoked.o: $(hdrdir)/ruby/intern.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509revoked.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509revoked.o: $(hdrdir)/ruby/io.h
ossl_x509revoked.o: $(hdrdir)/ruby/missing.h
ossl_x509revoked.o: $(hdrdir)/ruby/onigmo.h
@@ -1140,18 +6015,174 @@ ossl_x509revoked.o: ossl_pkcs7.h
ossl_x509revoked.o: ossl_pkey.h
ossl_x509revoked.o: ossl_rand.h
ossl_x509revoked.o: ossl_ssl.h
-ossl_x509revoked.o: ossl_version.h
+ossl_x509revoked.o: ossl_ts.h
ossl_x509revoked.o: ossl_x509.h
ossl_x509revoked.o: ossl_x509revoked.c
-ossl_x509revoked.o: ruby_missing.h
ossl_x509store.o: $(RUBY_EXTCONF_H)
ossl_x509store.o: $(arch_hdrdir)/ruby/config.h
ossl_x509store.o: $(hdrdir)/ruby.h
ossl_x509store.o: $(hdrdir)/ruby/assert.h
ossl_x509store.o: $(hdrdir)/ruby/backward.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/assume.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/attributes.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/bool.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/limits.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/long_long.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ossl_x509store.o: $(hdrdir)/ruby/backward/2/stdarg.h
ossl_x509store.o: $(hdrdir)/ruby/defines.h
ossl_x509store.o: $(hdrdir)/ruby/encoding.h
ossl_x509store.o: $(hdrdir)/ruby/intern.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/abi.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/anyargs.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/assume.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/cold.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/const.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/error.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/format.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/pure.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/warning.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/cast.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/compiler_since.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/config.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/constant_p.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rarray.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rclass.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rdata.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rfile.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rhash.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/robject.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rstring.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/ctype.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/dllexport.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/dosish.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/re.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/string.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/error.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/eval.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/event.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/fl_type.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/gc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/glob.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/globals.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/attribute.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/builtin.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/extension.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/feature.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/has/warning.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/array.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/class.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/compar.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/complex.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/cont.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/dir.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/enum.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/error.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/eval.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/file.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/gc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/hash.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/io.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/load.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/object.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/parse.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/proc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/process.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/random.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/range.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/rational.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/re.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/select.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/signal.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/string.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/struct.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/thread.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/time.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/variable.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/intern/vm.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/interpreter.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/iterator.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/memory.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/method.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/module.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/newobj.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/rgengc.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/scan_args.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/special_consts.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/static_assert.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/stdalign.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/stdbool.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/symbol.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/value.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/value_type.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/variable.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/warning_push.h
+ossl_x509store.o: $(hdrdir)/ruby/internal/xmalloc.h
ossl_x509store.o: $(hdrdir)/ruby/io.h
ossl_x509store.o: $(hdrdir)/ruby/missing.h
ossl_x509store.o: $(hdrdir)/ruby/onigmo.h
@@ -1178,8 +6209,7 @@ ossl_x509store.o: ossl_pkcs7.h
ossl_x509store.o: ossl_pkey.h
ossl_x509store.o: ossl_rand.h
ossl_x509store.o: ossl_ssl.h
-ossl_x509store.o: ossl_version.h
+ossl_x509store.o: ossl_ts.h
ossl_x509store.o: ossl_x509.h
ossl_x509store.o: ossl_x509store.c
-ossl_x509store.o: ruby_missing.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/openssl/deprecation.rb b/ext/openssl/deprecation.rb
deleted file mode 100644
index afe989ead1..0000000000
--- a/ext/openssl/deprecation.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: false
-module OpenSSL
- def self.deprecated_warning_flag
- unless flag = (@deprecated_warning_flag ||= nil)
- if try_compile("", flag = "-Werror=deprecated-declarations")
- $warnflags = "#{@warnflags = $warnflags}" #{flag}"
- else
- flag = ""
- end
- @deprecated_warning_flag = flag
- end
- flag
- end
-
- def self.restore_warning_flag
- $warnflags = @warnflags
- end
-
- def self.check_func(func, header)
- have_func(func, header, deprecated_warning_flag)
- end
-
- def self.check_func_or_macro(func, header)
- check_func(func, header) or
- have_macro(func, header) && $defs.push("-DHAVE_#{func.upcase}")
- end
-end
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 264130bb51..bc3e4d3a21 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -1,5 +1,5 @@
# -*- coding: us-ascii -*-
-# frozen_string_literal: false
+# frozen_string_literal: true
=begin
= Info
'OpenSSL for Ruby 2' project
@@ -12,16 +12,12 @@
=end
require "mkmf"
-require File.expand_path('../deprecation', __FILE__)
-dir_config("openssl")
+dir_config_given = dir_config("openssl").any?
dir_config("kerberos")
Logging::message "=== OpenSSL for Ruby configurator ===\n"
-# Check with -Werror=deprecated-declarations if available
-OpenSSL.deprecated_warning_flag
-
##
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
# To turn it on, use: --with-debug or --enable-debug
@@ -29,6 +25,9 @@ OpenSSL.deprecated_warning_flag
if with_config("debug") or enable_config("debug")
$defs.push("-DOSSL_DEBUG")
end
+$defs.push("-D""OPENSSL_SUPPRESS_DEPRECATED")
+
+have_func("rb_io_maybe_wait(0, Qnil, Qnil, Qnil)", "ruby/io.h") # Ruby 3.1
Logging::message "=== Checking for system dependent stuff... ===\n"
have_library("nsl", "t_open")
@@ -37,8 +36,11 @@ if $mswin || $mingw
have_library("ws2_32")
end
-Logging::message "=== Checking for required stuff... ===\n"
-result = pkg_config("openssl") && have_header("openssl/ssl.h")
+if $mingw
+ append_cflags '-D_FORTIFY_SOURCE=2'
+ append_ldflags '-fstack-protector'
+ have_library 'ssp'
+end
def find_openssl_library
if $mswin || $mingw
@@ -90,85 +92,105 @@ def find_openssl_library
return false
end
-unless result
- unless find_openssl_library
- Logging::message "=== Checking for required stuff failed. ===\n"
- Logging::message "Makefile wasn't created. Fix the errors above.\n"
- raise "OpenSSL library could not be found. You might want to use " \
- "--with-openssl-dir=<dir> option to specify the prefix where OpenSSL " \
- "is installed."
- end
+Logging::message "=== Checking for required stuff... ===\n"
+pkg_config_found = !dir_config_given && pkg_config("openssl") && have_header("openssl/ssl.h")
+
+if !pkg_config_found && !find_openssl_library
+ Logging::message "=== Checking for required stuff failed. ===\n"
+ Logging::message "Makefile wasn't created. Fix the errors above.\n"
+ raise "OpenSSL library could not be found. You might want to use " \
+ "--with-openssl-dir=<dir> option to specify the prefix where OpenSSL " \
+ "is installed."
end
-unless checking_for("OpenSSL version is 1.0.1 or later") {
- try_static_assert("OPENSSL_VERSION_NUMBER >= 0x10001000L", "openssl/opensslv.h") }
- raise "OpenSSL >= 1.0.1 or LibreSSL is required"
+version_ok = if have_macro("LIBRESSL_VERSION_NUMBER", "openssl/opensslv.h")
+ is_libressl = true
+ checking_for("LibreSSL version >= 3.1.0") {
+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x30100000L", "openssl/opensslv.h") }
+else
+ checking_for("OpenSSL version >= 1.0.2") {
+ try_static_assert("OPENSSL_VERSION_NUMBER >= 0x10002000L", "openssl/opensslv.h") }
+end
+unless version_ok
+ raise "OpenSSL >= 1.0.2 or LibreSSL >= 3.1.0 is required"
+end
+
+# Prevent wincrypt.h from being included, which defines conflicting macro with openssl/x509.h
+if is_libressl && ($mswin || $mingw)
+ $defs.push("-DNOCRYPT")
end
Logging::message "=== Checking for OpenSSL features... ===\n"
+evp_h = "openssl/evp.h".freeze
+x509_h = "openssl/x509.h".freeze
+ts_h = "openssl/ts.h".freeze
+ssl_h = "openssl/ssl.h".freeze
+
# compile options
-have_func("RAND_egd")
-engines = %w{builtin_engines openbsd_dev_crypto dynamic 4758cca aep atalla chil
- cswift nuron sureware ubsec padlock capi gmp gost cryptodev aesni}
+have_func("RAND_egd()", "openssl/rand.h")
+engines = %w{dynamic 4758cca aep atalla chil
+ cswift nuron sureware ubsec padlock capi gmp gost cryptodev}
engines.each { |name|
- OpenSSL.check_func_or_macro("ENGINE_load_#{name}", "openssl/engine.h")
+ have_func("ENGINE_load_#{name}()", "openssl/engine.h")
}
-if ($mswin || $mingw) && have_macro("LIBRESSL_VERSION_NUMBER", "openssl/opensslv.h")
- $defs.push("-DNOCRYPT")
-end
-
-# added in 1.0.2
-have_func("EC_curve_nist2nid")
-have_func("X509_REVOKED_dup")
-have_func("X509_STORE_CTX_get0_store")
-have_func("SSL_CTX_set_alpn_select_cb")
-OpenSSL.check_func_or_macro("SSL_CTX_set1_curves_list", "openssl/ssl.h")
-OpenSSL.check_func_or_macro("SSL_CTX_set_ecdh_auto", "openssl/ssl.h")
-OpenSSL.check_func_or_macro("SSL_get_server_tmp_key", "openssl/ssl.h")
-have_func("SSL_is_server")
-
# added in 1.1.0
-if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
- try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h")
+if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || is_libressl
$defs.push("-DHAVE_OPAQUE_OPENSSL")
end
-have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
-have_func("BN_GENCB_new")
-have_func("BN_GENCB_free")
-have_func("BN_GENCB_get_arg")
-have_func("EVP_MD_CTX_new")
-have_func("EVP_MD_CTX_free")
-have_func("HMAC_CTX_new")
-have_func("HMAC_CTX_free")
-OpenSSL.check_func("RAND_pseudo_bytes", "openssl/rand.h") # deprecated
-have_func("X509_STORE_get_ex_data")
-have_func("X509_STORE_set_ex_data")
-have_func("X509_CRL_get0_signature")
-have_func("X509_REQ_get0_signature")
-have_func("X509_REVOKED_get0_serialNumber")
-have_func("X509_REVOKED_get0_revocationDate")
-have_func("X509_get0_tbs_sigalg")
-have_func("X509_STORE_CTX_get0_untrusted")
-have_func("X509_STORE_CTX_get0_cert")
-have_func("X509_STORE_CTX_get0_chain")
-have_func("OCSP_SINGLERESP_get0_id")
-have_func("SSL_CTX_get_ciphers")
-have_func("X509_up_ref")
-have_func("X509_CRL_up_ref")
-have_func("X509_STORE_up_ref")
-have_func("SSL_SESSION_up_ref")
-have_func("EVP_PKEY_up_ref")
-OpenSSL.check_func_or_macro("SSL_CTX_set_tmp_ecdh_callback", "openssl/ssl.h") # removed
-OpenSSL.check_func_or_macro("SSL_CTX_set_min_proto_version", "openssl/ssl.h")
-have_func("SSL_CTX_get_security_level")
-have_func("X509_get0_notBefore")
-have_func("SSL_SESSION_get_protocol_version")
-have_func("EVP_PBE_scrypt")
+have_func("EVP_MD_CTX_new()", evp_h)
+have_func("EVP_MD_CTX_free(NULL)", evp_h)
+have_func("EVP_MD_CTX_pkey_ctx(NULL)", evp_h)
+have_func("X509_STORE_get_ex_data(NULL, 0)", x509_h)
+have_func("X509_STORE_set_ex_data(NULL, 0, NULL)", x509_h)
+have_func("X509_STORE_get_ex_new_index(0, NULL, NULL, NULL, NULL)", x509_h)
+have_func("X509_CRL_get0_signature(NULL, NULL, NULL)", x509_h)
+have_func("X509_REQ_get0_signature(NULL, NULL, NULL)", x509_h)
+have_func("X509_REVOKED_get0_serialNumber(NULL)", x509_h)
+have_func("X509_REVOKED_get0_revocationDate(NULL)", x509_h)
+have_func("X509_get0_tbs_sigalg(NULL)", x509_h)
+have_func("X509_STORE_CTX_get0_untrusted(NULL)", x509_h)
+have_func("X509_STORE_CTX_get0_cert(NULL)", x509_h)
+have_func("X509_STORE_CTX_get0_chain(NULL)", x509_h)
+have_func("OCSP_SINGLERESP_get0_id(NULL)", "openssl/ocsp.h")
+have_func("SSL_CTX_get_ciphers(NULL)", ssl_h)
+have_func("X509_up_ref(NULL)", x509_h)
+have_func("X509_CRL_up_ref(NULL)", x509_h)
+have_func("X509_STORE_up_ref(NULL)", x509_h)
+have_func("SSL_SESSION_up_ref(NULL)", ssl_h)
+have_func("EVP_PKEY_up_ref(NULL)", evp_h)
+have_func("SSL_CTX_set_min_proto_version(NULL, 0)", ssl_h)
+have_func("SSL_CTX_get_security_level(NULL)", ssl_h)
+have_func("X509_get0_notBefore(NULL)", x509_h)
+have_func("SSL_SESSION_get_protocol_version(NULL)", ssl_h)
+have_func("TS_STATUS_INFO_get0_status(NULL)", ts_h)
+have_func("TS_STATUS_INFO_get0_text(NULL)", ts_h)
+have_func("TS_STATUS_INFO_get0_failure_info(NULL)", ts_h)
+have_func("TS_VERIFY_CTS_set_certs(NULL, NULL)", ts_h)
+have_func("TS_VERIFY_CTX_set_store(NULL, NULL)", ts_h)
+have_func("TS_VERIFY_CTX_add_flags(NULL, 0)", ts_h)
+have_func("TS_RESP_CTX_set_time_cb(NULL, NULL, NULL)", ts_h)
+have_func("EVP_PBE_scrypt(\"\", 0, (unsigned char *)\"\", 0, 0, 0, 0, 0, NULL, 0)", evp_h)
+have_func("SSL_CTX_set_post_handshake_auth(NULL, 0)", ssl_h)
+
+# added in 1.1.1
+have_func("EVP_PKEY_check(NULL)", evp_h)
+have_func("EVP_PKEY_new_raw_private_key(0, NULL, (unsigned char *)\"\", 0)", evp_h)
+have_func("SSL_CTX_set_ciphersuites(NULL, \"\")", ssl_h)
+
+# added in 3.0.0
+have_func("SSL_set0_tmp_dh_pkey(NULL, NULL)", ssl_h)
+have_func("ERR_get_error_all(NULL, NULL, NULL, NULL, NULL)", "openssl/err.h")
+have_func("TS_VERIFY_CTX_set_certs(NULL, NULL)", ts_h)
+have_func("SSL_CTX_load_verify_file(NULL, \"\")", ssl_h)
+have_func("BN_check_prime(NULL, NULL, NULL)", "openssl/bn.h")
+have_func("EVP_MD_CTX_get0_md(NULL)", evp_h)
+have_func("EVP_MD_CTX_get_pkey_ctx(NULL)", evp_h)
+have_func("EVP_PKEY_eq(NULL, NULL)", evp_h)
+have_func("EVP_PKEY_dup(NULL)", evp_h)
Logging::message "=== Checking done. ===\n"
create_header
-OpenSSL.restore_warning_flag
create_makefile("openssl")
Logging::message "Done.\n"
diff --git a/ext/openssl/lib/openssl.rb b/ext/openssl/lib/openssl.rb
index 0914282920..8a342f15b6 100644
--- a/ext/openssl/lib/openssl.rb
+++ b/ext/openssl/lib/openssl.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
=begin
= Info
'OpenSSL for Ruby 2' project
@@ -12,11 +12,26 @@
require 'openssl.so'
-require 'openssl/bn'
-require 'openssl/pkey'
-require 'openssl/cipher'
-require 'openssl/config'
-require 'openssl/digest'
-require 'openssl/x509'
-require 'openssl/ssl'
-require 'openssl/pkcs5'
+require_relative 'openssl/bn'
+require_relative 'openssl/pkey'
+require_relative 'openssl/cipher'
+require_relative 'openssl/digest'
+require_relative 'openssl/hmac'
+require_relative 'openssl/x509'
+require_relative 'openssl/ssl'
+require_relative 'openssl/pkcs5'
+require_relative 'openssl/version'
+
+module OpenSSL
+ # call-seq:
+ # OpenSSL.secure_compare(string, string) -> boolean
+ #
+ # Constant time memory comparison. Inputs are hashed using SHA-256 to mask
+ # the length of the secret. Returns +true+ if the strings are identical,
+ # +false+ otherwise.
+ def self.secure_compare(a, b)
+ hashed_a = OpenSSL::Digest.digest('SHA256', a)
+ hashed_b = OpenSSL::Digest.digest('SHA256', b)
+ OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
+ end
+end
diff --git a/ext/openssl/lib/openssl/bn.rb b/ext/openssl/lib/openssl/bn.rb
index 8d1ebefb6e..0a5e11b4c2 100644
--- a/ext/openssl/lib/openssl/bn.rb
+++ b/ext/openssl/lib/openssl/bn.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
#
# = Ruby-space definitions that completes C-space funcs for BN
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index 5d1586e594..d47e1082ef 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/lib/openssl/buffering.rb
@@ -1,5 +1,5 @@
# coding: binary
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
#= Info
# 'OpenSSL for Ruby 2' project
@@ -22,6 +22,29 @@
module OpenSSL::Buffering
include Enumerable
+ # A buffer which will retain binary encoding.
+ class Buffer < String
+ BINARY = Encoding::BINARY
+
+ def initialize
+ super
+
+ force_encoding(BINARY)
+ end
+
+ def << string
+ if string.encoding == BINARY
+ super(string)
+ else
+ super(string.b)
+ end
+
+ return self
+ end
+
+ alias concat <<
+ end
+
##
# The "sync mode" of the SSLSocket.
#
@@ -40,7 +63,7 @@ module OpenSSL::Buffering
def initialize(*)
super
@eof = false
- @rbuffer = ""
+ @rbuffer = Buffer.new
@sync = @io.sync
end
@@ -78,6 +101,15 @@ module OpenSSL::Buffering
public
+ # call-seq:
+ # ssl.getbyte => 81
+ #
+ # Get the next 8bit byte from `ssl`. Returns `nil` on EOF
+ def getbyte
+ byte = read(1)
+ byte && byte.unpack1("C")
+ end
+
##
# Reads _size_ bytes from the stream. If _buf_ is provided it must
# reference a string which will receive the data.
@@ -312,7 +344,7 @@ module OpenSSL::Buffering
# buffer is flushed to the underlying socket.
def do_write(s)
- @wbuffer = "" unless defined? @wbuffer
+ @wbuffer = Buffer.new unless defined? @wbuffer
@wbuffer << s
@wbuffer.force_encoding(Encoding::BINARY)
@sync ||= false
@@ -398,7 +430,7 @@ module OpenSSL::Buffering
# See IO#puts for full details.
def puts(*args)
- s = ""
+ s = Buffer.new
if args.empty?
s << "\n"
end
@@ -416,7 +448,7 @@ module OpenSSL::Buffering
# See IO#print for full details.
def print(*args)
- s = ""
+ s = Buffer.new
args.each{ |arg| s << arg.to_s }
do_write(s)
nil
diff --git a/ext/openssl/lib/openssl/cipher.rb b/ext/openssl/lib/openssl/cipher.rb
index af721b3a80..8ad8c35dd3 100644
--- a/ext/openssl/lib/openssl/cipher.rb
+++ b/ext/openssl/lib/openssl/cipher.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
# = Ruby-space predefined Cipher subclasses
#
diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config.rb
deleted file mode 100644
index 48d8be0069..0000000000
--- a/ext/openssl/lib/openssl/config.rb
+++ /dev/null
@@ -1,474 +0,0 @@
-# frozen_string_literal: false
-=begin
-= Ruby-space definitions that completes C-space funcs for Config
-
-= Info
- Copyright (C) 2010 Hiroshi Nakamura <nahi@ruby-lang.org>
-
-= Licence
- This program is licensed under the same licence as Ruby.
- (See the file 'LICENCE'.)
-
-=end
-
-require 'stringio'
-
-module OpenSSL
- ##
- # = OpenSSL::Config
- #
- # Configuration for the openssl library.
- #
- # Many system's installation of openssl library will depend on your system
- # configuration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for
- # the location of the file for your host.
- #
- # See also http://www.openssl.org/docs/apps/config.html
- class Config
- include Enumerable
-
- class << self
-
- ##
- # Parses a given _string_ as a blob that contains configuration for
- # OpenSSL.
- #
- # If the source of the IO is a file, then consider using #parse_config.
- def parse(string)
- c = new()
- parse_config(StringIO.new(string)).each do |section, hash|
- c[section] = hash
- end
- c
- end
-
- ##
- # load is an alias to ::new
- alias load new
-
- ##
- # Parses the configuration data read from _io_, see also #parse.
- #
- # Raises a ConfigError on invalid configuration data.
- def parse_config(io)
- begin
- parse_config_lines(io)
- rescue ConfigError => e
- e.message.replace("error in line #{io.lineno}: " + e.message)
- raise
- end
- end
-
- def get_key_string(data, section, key) # :nodoc:
- if v = data[section] && data[section][key]
- return v
- elsif section == 'ENV'
- if v = ENV[key]
- return v
- end
- end
- if v = data['default'] && data['default'][key]
- return v
- end
- end
-
- private
-
- def parse_config_lines(io)
- section = 'default'
- data = {section => {}}
- while definition = get_definition(io)
- definition = clear_comments(definition)
- next if definition.empty?
- if definition[0] == ?[
- if /\[([^\]]*)\]/ =~ definition
- section = $1.strip
- data[section] ||= {}
- else
- raise ConfigError, "missing close square bracket"
- end
- else
- if /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/ =~ definition
- if $2
- section = $1
- key = $2
- else
- key = $1
- end
- value = unescape_value(data, section, $3)
- (data[section] ||= {})[key] = value.strip
- else
- raise ConfigError, "missing equal sign"
- end
- end
- end
- data
- end
-
- # escape with backslash
- QUOTE_REGEXP_SQ = /\A([^'\\]*(?:\\.[^'\\]*)*)'/
- # escape with backslash and doubled dq
- QUOTE_REGEXP_DQ = /\A([^"\\]*(?:""[^"\\]*|\\.[^"\\]*)*)"/
- # escaped char map
- ESCAPE_MAP = {
- "r" => "\r",
- "n" => "\n",
- "b" => "\b",
- "t" => "\t",
- }
-
- def unescape_value(data, section, value)
- scanned = []
- while m = value.match(/['"\\$]/)
- scanned << m.pre_match
- c = m[0]
- value = m.post_match
- case c
- when "'"
- if m = value.match(QUOTE_REGEXP_SQ)
- scanned << m[1].gsub(/\\(.)/, '\\1')
- value = m.post_match
- else
- break
- end
- when '"'
- if m = value.match(QUOTE_REGEXP_DQ)
- scanned << m[1].gsub(/""/, '').gsub(/\\(.)/, '\\1')
- value = m.post_match
- else
- break
- end
- when "\\"
- c = value.slice!(0, 1)
- scanned << (ESCAPE_MAP[c] || c)
- when "$"
- ref, value = extract_reference(value)
- refsec = section
- if ref.index('::')
- refsec, ref = ref.split('::', 2)
- end
- if v = get_key_string(data, refsec, ref)
- scanned << v
- else
- raise ConfigError, "variable has no value"
- end
- else
- raise 'must not reaced'
- end
- end
- scanned << value
- scanned.join
- end
-
- def extract_reference(value)
- rest = ''
- if m = value.match(/\(([^)]*)\)|\{([^}]*)\}/)
- value = m[1] || m[2]
- rest = m.post_match
- elsif [?(, ?{].include?(value[0])
- raise ConfigError, "no close brace"
- end
- if m = value.match(/[a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]*)?/)
- return m[0], m.post_match + rest
- else
- raise
- end
- end
-
- def clear_comments(line)
- # FCOMMENT
- if m = line.match(/\A([\t\n\f ]*);.*\z/)
- return m[1]
- end
- # COMMENT
- scanned = []
- while m = line.match(/[#'"\\]/)
- scanned << m.pre_match
- c = m[0]
- line = m.post_match
- case c
- when '#'
- line = nil
- break
- when "'", '"'
- regexp = (c == "'") ? QUOTE_REGEXP_SQ : QUOTE_REGEXP_DQ
- scanned << c
- if m = line.match(regexp)
- scanned << m[0]
- line = m.post_match
- else
- scanned << line
- line = nil
- break
- end
- when "\\"
- scanned << c
- scanned << line.slice!(0, 1)
- else
- raise 'must not reaced'
- end
- end
- scanned << line
- scanned.join
- end
-
- def get_definition(io)
- if line = get_line(io)
- while /[^\\]\\\z/ =~ line
- if extra = get_line(io)
- line += extra
- else
- break
- end
- end
- return line.strip
- end
- end
-
- def get_line(io)
- if line = io.gets
- line.gsub(/[\r\n]*/, '')
- end
- end
- end
-
- ##
- # Creates an instance of OpenSSL's configuration class.
- #
- # This can be used in contexts like OpenSSL::X509::ExtensionFactory.config=
- #
- # If the optional _filename_ parameter is provided, then it is read in and
- # parsed via #parse_config.
- #
- # This can raise IO exceptions based on the access, or availability of the
- # file. A ConfigError exception may be raised depending on the validity of
- # the data being configured.
- #
- def initialize(filename = nil)
- @data = {}
- if filename
- File.open(filename.to_s) do |file|
- Config.parse_config(file).each do |section, hash|
- self[section] = hash
- end
- end
- end
- end
-
- ##
- # Gets the value of _key_ from the given _section_
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can get a specific value from the config if you know the _section_
- # and _key_ like so:
- #
- # config.get_value('default','foo')
- # #=> "bar"
- #
- def get_value(section, key)
- if section.nil?
- raise TypeError.new('nil not allowed')
- end
- section = 'default' if section.empty?
- get_key_string(section, key)
- end
-
- ##
- #
- # *Deprecated*
- #
- # Use #get_value instead
- def value(arg1, arg2 = nil) # :nodoc:
- warn('Config#value is deprecated; use Config#get_value')
- if arg2.nil?
- section, key = 'default', arg1
- else
- section, key = arg1, arg2
- end
- section ||= 'default'
- section = 'default' if section.empty?
- get_key_string(section, key)
- end
-
- ##
- # Set the target _key_ with a given _value_ under a specific _section_.
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can set the value of _foo_ under the _default_ section to a new
- # value:
- #
- # config.add_value('default', 'foo', 'buzz')
- # #=> "buzz"
- # puts config.to_s
- # #=> [ default ]
- # # foo=buzz
- #
- def add_value(section, key, value)
- check_modify
- (@data[section] ||= {})[key] = value
- end
-
- ##
- # Get a specific _section_ from the current configuration
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can get a hash of the specific section like so:
- #
- # config['default']
- # #=> {"foo"=>"bar"}
- #
- def [](section)
- @data[section] || {}
- end
-
- ##
- # Deprecated
- #
- # Use #[] instead
- def section(name) # :nodoc:
- warn('Config#section is deprecated; use Config#[]')
- @data[name] || {}
- end
-
- ##
- # Sets a specific _section_ name with a Hash _pairs_.
- #
- # Given the following configuration being created:
- #
- # config = OpenSSL::Config.new
- # #=> #<OpenSSL::Config sections=[]>
- # config['default'] = {"foo"=>"bar","baz"=>"buz"}
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- # # baz=buz
- #
- # It's important to note that this will essentially merge any of the keys
- # in _pairs_ with the existing _section_. For example:
- #
- # config['default']
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # config['default'] = {"foo" => "changed"}
- # #=> {"foo"=>"changed"}
- # config['default']
- # #=> {"foo"=>"changed", "baz"=>"buz"}
- #
- def []=(section, pairs)
- check_modify
- @data[section] ||= {}
- pairs.each do |key, value|
- self.add_value(section, key, value)
- end
- end
-
- ##
- # Get the names of all sections in the current configuration
- def sections
- @data.keys
- end
-
- ##
- # Get the parsable form of the current configuration
- #
- # Given the following configuration being created:
- #
- # config = OpenSSL::Config.new
- # #=> #<OpenSSL::Config sections=[]>
- # config['default'] = {"foo"=>"bar","baz"=>"buz"}
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- # # baz=buz
- #
- # You can parse get the serialized configuration using #to_s and then parse
- # it later:
- #
- # serialized_config = config.to_s
- # # much later...
- # new_config = OpenSSL::Config.parse(serialized_config)
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts new_config
- # #=> [ default ]
- # foo=bar
- # baz=buz
- #
- def to_s
- ary = []
- @data.keys.sort.each do |section|
- ary << "[ #{section} ]\n"
- @data[section].keys.each do |key|
- ary << "#{key}=#{@data[section][key]}\n"
- end
- ary << "\n"
- end
- ary.join
- end
-
- ##
- # For a block.
- #
- # Receive the section and its pairs for the current configuration.
- #
- # config.each do |section, key, value|
- # # ...
- # end
- #
- def each
- @data.each do |section, hash|
- hash.each do |key, value|
- yield [section, key, value]
- end
- end
- end
-
- ##
- # String representation of this configuration object, including the class
- # name and its sections.
- def inspect
- "#<#{self.class.name} sections=#{sections.inspect}>"
- end
-
- protected
-
- def data # :nodoc:
- @data
- end
-
- private
-
- def initialize_copy(other)
- @data = other.data.dup
- end
-
- def check_modify
- raise TypeError.new("Insecure: can't modify OpenSSL config") if frozen?
- end
-
- def get_key_string(section, key)
- Config.get_key_string(@data, section, key)
- end
- end
-end
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb
index b6744de6bd..2ff8398e44 100644
--- a/ext/openssl/lib/openssl/digest.rb
+++ b/ext/openssl/lib/openssl/digest.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
# = Ruby-space predefined Digest subclasses
#
@@ -15,11 +15,6 @@
module OpenSSL
class Digest
- alg = %w(MD2 MD4 MD5 MDC2 RIPEMD160 SHA1 SHA224 SHA256 SHA384 SHA512)
- if OPENSSL_VERSION_NUMBER < 0x10100000
- alg += %w(DSS DSS1 SHA)
- end
-
# Return the hash value computed with _name_ Digest. _name_ is either the
# long name or short name of a supported digest algorithm.
#
@@ -29,23 +24,26 @@ module OpenSSL
#
# which is equivalent to:
#
- # OpenSSL::Digest::SHA256.digest("abc")
+ # OpenSSL::Digest.digest('SHA256', "abc")
def self.digest(name, data)
super(data, name)
end
- alg.each{|name|
+ %w(MD4 MD5 RIPEMD160 SHA1 SHA224 SHA256 SHA384 SHA512).each do |name|
klass = Class.new(self) {
define_method(:initialize, ->(data = nil) {super(name, data)})
}
+
singleton = (class << klass; self; end)
+
singleton.class_eval{
- define_method(:digest){|data| new.digest(data) }
- define_method(:hexdigest){|data| new.hexdigest(data) }
+ define_method(:digest) {|data| new.digest(data)}
+ define_method(:hexdigest) {|data| new.hexdigest(data)}
}
- const_set(name, klass)
- }
+
+ const_set(name.tr('-', '_'), klass)
+ end
# Deprecated.
#
diff --git a/ext/openssl/lib/openssl/hmac.rb b/ext/openssl/lib/openssl/hmac.rb
new file mode 100644
index 0000000000..c8c844d8d7
--- /dev/null
+++ b/ext/openssl/lib/openssl/hmac.rb
@@ -0,0 +1,78 @@
+# frozen_string_literal: true
+
+module OpenSSL
+ class HMAC
+ # Securely compare with another HMAC instance in constant time.
+ def ==(other)
+ return false unless HMAC === other
+ return false unless self.digest.bytesize == other.digest.bytesize
+
+ OpenSSL.fixed_length_secure_compare(self.digest, other.digest)
+ end
+
+ # :call-seq:
+ # hmac.base64digest -> string
+ #
+ # Returns the authentication code an a Base64-encoded string.
+ def base64digest
+ [digest].pack("m0")
+ end
+
+ class << self
+ # :call-seq:
+ # HMAC.digest(digest, key, data) -> aString
+ #
+ # Returns the authentication code as a binary string. The _digest_ parameter
+ # specifies the digest algorithm to use. This may be a String representing
+ # the algorithm name or an instance of OpenSSL::Digest.
+ #
+ # === Example
+ # key = 'key'
+ # data = 'The quick brown fox jumps over the lazy dog'
+ #
+ # hmac = OpenSSL::HMAC.digest('SHA1', key, data)
+ # #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9"
+ def digest(digest, key, data)
+ hmac = new(key, digest)
+ hmac << data
+ hmac.digest
+ end
+
+ # :call-seq:
+ # HMAC.hexdigest(digest, key, data) -> aString
+ #
+ # Returns the authentication code as a hex-encoded string. The _digest_
+ # parameter specifies the digest algorithm to use. This may be a String
+ # representing the algorithm name or an instance of OpenSSL::Digest.
+ #
+ # === Example
+ # key = 'key'
+ # data = 'The quick brown fox jumps over the lazy dog'
+ #
+ # hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data)
+ # #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
+ def hexdigest(digest, key, data)
+ hmac = new(key, digest)
+ hmac << data
+ hmac.hexdigest
+ end
+
+ # :call-seq:
+ # HMAC.base64digest(digest, key, data) -> aString
+ #
+ # Returns the authentication code as a Base64-encoded string. The _digest_
+ # parameter specifies the digest algorithm to use. This may be a String
+ # representing the algorithm name or an instance of OpenSSL::Digest.
+ #
+ # === Example
+ # key = 'key'
+ # data = 'The quick brown fox jumps over the lazy dog'
+ #
+ # hmac = OpenSSL::HMAC.base64digest('SHA1', key, data)
+ # #=> "3nybhbi3iqa8ino29wqQcBydtNk="
+ def base64digest(digest, key, data)
+ [digest(digest, key, data)].pack("m0")
+ end
+ end
+ end
+end
diff --git a/ext/openssl/lib/openssl/marshal.rb b/ext/openssl/lib/openssl/marshal.rb
new file mode 100644
index 0000000000..af5647192a
--- /dev/null
+++ b/ext/openssl/lib/openssl/marshal.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+#--
+# = Ruby-space definitions to add DER (de)serialization to classes
+#
+# = Info
+# 'OpenSSL for Ruby 2' project
+# Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz>
+# All rights reserved.
+#
+# = Licence
+# This program is licensed under the same licence as Ruby.
+# (See the file 'LICENCE'.)
+#++
+module OpenSSL
+ module Marshal
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+
+ module ClassMethods
+ def _load(string)
+ new(string)
+ end
+ end
+
+ def _dump(_level)
+ to_der
+ end
+ end
+end
diff --git a/ext/openssl/lib/openssl/pkcs5.rb b/ext/openssl/lib/openssl/pkcs5.rb
index 959447df5e..8dedc4beef 100644
--- a/ext/openssl/lib/openssl/pkcs5.rb
+++ b/ext/openssl/lib/openssl/pkcs5.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
# Ruby/OpenSSL Project
# Copyright (C) 2017 Ruby/OpenSSL Project Authors
diff --git a/ext/openssl/lib/openssl/pkey.rb b/ext/openssl/lib/openssl/pkey.rb
index 8a547c340d..0414658a10 100644
--- a/ext/openssl/lib/openssl/pkey.rb
+++ b/ext/openssl/lib/openssl/pkey.rb
@@ -1,11 +1,298 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
# Ruby/OpenSSL Project
# Copyright (C) 2017 Ruby/OpenSSL Project Authors
#++
+require_relative 'marshal'
+
module OpenSSL::PKey
+ class DH
+ include OpenSSL::Marshal
+
+ # :call-seq:
+ # dh.public_key -> dhnew
+ #
+ # Returns a new DH instance that carries just the \DH parameters.
+ #
+ # Contrary to the method name, the returned DH object contains only
+ # parameters and not the public key.
+ #
+ # This method is provided for backwards compatibility. In most cases, there
+ # is no need to call this method.
+ #
+ # For the purpose of re-generating the key pair while keeping the
+ # parameters, check OpenSSL::PKey.generate_key.
+ #
+ # Example:
+ # # OpenSSL::PKey::DH.generate by default generates a random key pair
+ # dh1 = OpenSSL::PKey::DH.generate(2048)
+ # p dh1.priv_key #=> #<OpenSSL::BN 1288347...>
+ # dhcopy = dh1.public_key
+ # p dhcopy.priv_key #=> nil
+ def public_key
+ DH.new(to_der)
+ end
+
+ # :call-seq:
+ # dh.compute_key(pub_bn) -> string
+ #
+ # Returns a String containing a shared secret computed from the other
+ # party's public value.
+ #
+ # This method is provided for backwards compatibility, and calls #derive
+ # internally.
+ #
+ # === Parameters
+ # * _pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by
+ # DH#public_key as that contains the DH parameters only.
+ def compute_key(pub_bn)
+ # FIXME: This is constructing an X.509 SubjectPublicKeyInfo and is very
+ # inefficient
+ obj = OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.ObjectId("dhKeyAgreement"),
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Integer(p),
+ OpenSSL::ASN1.Integer(g),
+ ]),
+ ]),
+ OpenSSL::ASN1.BitString(OpenSSL::ASN1.Integer(pub_bn).to_der),
+ ])
+ derive(OpenSSL::PKey.read(obj.to_der))
+ end
+
+ # :call-seq:
+ # dh.generate_key! -> self
+ #
+ # Generates a private and public key unless a private key already exists.
+ # If this DH instance was generated from public \DH parameters (e.g. by
+ # encoding the result of DH#public_key), then this method needs to be
+ # called first in order to generate the per-session keys before performing
+ # the actual key exchange.
+ #
+ # <b>Deprecated in version 3.0</b>. This method is incompatible with
+ # OpenSSL 3.0.0 or later.
+ #
+ # See also OpenSSL::PKey.generate_key.
+ #
+ # Example:
+ # # DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later
+ # dh0 = OpenSSL::PKey::DH.new(2048)
+ # dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name)
+ # dh.generate_key!
+ # puts dh.private? # => true
+ # puts dh0.pub_key == dh.pub_key #=> false
+ #
+ # # With OpenSSL::PKey.generate_key
+ # dh0 = OpenSSL::PKey::DH.new(2048)
+ # dh = OpenSSL::PKey.generate_key(dh0)
+ # puts dh0.pub_key == dh.pub_key #=> false
+ def generate_key!
+ if OpenSSL::OPENSSL_VERSION_NUMBER >= 0x30000000
+ raise DHError, "OpenSSL::PKey::DH is immutable on OpenSSL 3.0; " \
+ "use OpenSSL::PKey.generate_key instead"
+ end
+
+ unless priv_key
+ tmp = OpenSSL::PKey.generate_key(self)
+ set_key(tmp.pub_key, tmp.priv_key)
+ end
+ self
+ end
+
+ class << self
+ # :call-seq:
+ # DH.generate(size, generator = 2) -> dh
+ #
+ # Creates a new DH instance from scratch by generating random parameters
+ # and a key pair.
+ #
+ # See also OpenSSL::PKey.generate_parameters and
+ # OpenSSL::PKey.generate_key.
+ #
+ # +size+::
+ # The desired key size in bits.
+ # +generator+::
+ # The generator.
+ def generate(size, generator = 2, &blk)
+ dhparams = OpenSSL::PKey.generate_parameters("DH", {
+ "dh_paramgen_prime_len" => size,
+ "dh_paramgen_generator" => generator,
+ }, &blk)
+ OpenSSL::PKey.generate_key(dhparams)
+ end
+
+ # Handle DH.new(size, generator) form here; new(str) and new() forms
+ # are handled by #initialize
+ def new(*args, &blk) # :nodoc:
+ if args[0].is_a?(Integer)
+ generate(*args, &blk)
+ else
+ super
+ end
+ end
+ end
+ end
+
+ class DSA
+ include OpenSSL::Marshal
+
+ # :call-seq:
+ # dsa.public_key -> dsanew
+ #
+ # Returns a new DSA instance that carries just the \DSA parameters and the
+ # public key.
+ #
+ # This method is provided for backwards compatibility. In most cases, there
+ # is no need to call this method.
+ #
+ # For the purpose of serializing the public key, to PEM or DER encoding of
+ # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and
+ # PKey#public_to_der.
+ def public_key
+ OpenSSL::PKey.read(public_to_der)
+ end
+
+ class << self
+ # :call-seq:
+ # DSA.generate(size) -> dsa
+ #
+ # Creates a new DSA instance by generating a private/public key pair
+ # from scratch.
+ #
+ # See also OpenSSL::PKey.generate_parameters and
+ # OpenSSL::PKey.generate_key.
+ #
+ # +size+::
+ # The desired key size in bits.
+ def generate(size, &blk)
+ # FIPS 186-4 specifies four (L,N) pairs: (1024,160), (2048,224),
+ # (2048,256), and (3072,256).
+ #
+ # q size is derived here with compatibility with
+ # DSA_generator_parameters_ex() which previous versions of ruby/openssl
+ # used to call.
+ qsize = size >= 2048 ? 256 : 160
+ dsaparams = OpenSSL::PKey.generate_parameters("DSA", {
+ "dsa_paramgen_bits" => size,
+ "dsa_paramgen_q_bits" => qsize,
+ }, &blk)
+ OpenSSL::PKey.generate_key(dsaparams)
+ end
+
+ # Handle DSA.new(size) form here; new(str) and new() forms
+ # are handled by #initialize
+ def new(*args, &blk) # :nodoc:
+ if args[0].is_a?(Integer)
+ generate(*args, &blk)
+ else
+ super
+ end
+ end
+ end
+
+ # :call-seq:
+ # dsa.syssign(string) -> string
+ #
+ # Computes and returns the \DSA signature of +string+, where +string+ is
+ # expected to be an already-computed message digest of the original input
+ # data. The signature is issued using the private key of this DSA instance.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
+ #
+ # +string+::
+ # A message digest of the original input data to be signed.
+ #
+ # Example:
+ # dsa = OpenSSL::PKey::DSA.new(2048)
+ # doc = "Sign me"
+ # digest = OpenSSL::Digest.digest('SHA1', doc)
+ #
+ # # With legacy #syssign and #sysverify:
+ # sig = dsa.syssign(digest)
+ # p dsa.sysverify(digest, sig) #=> true
+ #
+ # # With #sign_raw and #verify_raw:
+ # sig = dsa.sign_raw(nil, digest)
+ # p dsa.verify_raw(nil, sig, digest) #=> true
+ def syssign(string)
+ q or raise OpenSSL::PKey::DSAError, "incomplete DSA"
+ private? or raise OpenSSL::PKey::DSAError, "Private DSA key needed!"
+ begin
+ sign_raw(nil, string)
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::DSAError, $!.message
+ end
+ end
+
+ # :call-seq:
+ # dsa.sysverify(digest, sig) -> true | false
+ #
+ # Verifies whether the signature is valid given the message digest input.
+ # It does so by validating +sig+ using the public key of this DSA instance.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
+ #
+ # +digest+::
+ # A message digest of the original input data to be signed.
+ # +sig+::
+ # A \DSA signature value.
+ def sysverify(digest, sig)
+ verify_raw(nil, sig, digest)
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::DSAError, $!.message
+ end
+ end
+
if defined?(EC)
+ class EC
+ include OpenSSL::Marshal
+
+ # :call-seq:
+ # key.dsa_sign_asn1(data) -> String
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
+ def dsa_sign_asn1(data)
+ sign_raw(nil, data)
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::ECError, $!.message
+ end
+
+ # :call-seq:
+ # key.dsa_verify_asn1(data, sig) -> true | false
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
+ def dsa_verify_asn1(data, sig)
+ verify_raw(nil, sig, data)
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::ECError, $!.message
+ end
+
+ # :call-seq:
+ # ec.dh_compute_key(pubkey) -> string
+ #
+ # Derives a shared secret by ECDH. _pubkey_ must be an instance of
+ # OpenSSL::PKey::EC::Point and must belong to the same group.
+ #
+ # This method is provided for backwards compatibility, and calls #derive
+ # internally.
+ def dh_compute_key(pubkey)
+ obj = OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.Sequence([
+ OpenSSL::ASN1.ObjectId("id-ecPublicKey"),
+ group.to_der,
+ ]),
+ OpenSSL::ASN1.BitString(pubkey.to_octet_string(:uncompressed)),
+ ])
+ derive(OpenSSL::PKey.read(obj.to_der))
+ end
+ end
+
class EC::Point
# :call-seq:
# point.to_bn([conversion_form]) -> OpenSSL::BN
@@ -22,4 +309,163 @@ module OpenSSL::PKey
end
end
end
+
+ class RSA
+ include OpenSSL::Marshal
+
+ # :call-seq:
+ # rsa.public_key -> rsanew
+ #
+ # Returns a new RSA instance that carries just the public key components.
+ #
+ # This method is provided for backwards compatibility. In most cases, there
+ # is no need to call this method.
+ #
+ # For the purpose of serializing the public key, to PEM or DER encoding of
+ # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and
+ # PKey#public_to_der.
+ def public_key
+ OpenSSL::PKey.read(public_to_der)
+ end
+
+ class << self
+ # :call-seq:
+ # RSA.generate(size, exponent = 65537) -> RSA
+ #
+ # Generates an \RSA keypair.
+ #
+ # See also OpenSSL::PKey.generate_key.
+ #
+ # +size+::
+ # The desired key size in bits.
+ # +exponent+::
+ # An odd Integer, normally 3, 17, or 65537.
+ def generate(size, exp = 0x10001, &blk)
+ OpenSSL::PKey.generate_key("RSA", {
+ "rsa_keygen_bits" => size,
+ "rsa_keygen_pubexp" => exp,
+ }, &blk)
+ end
+
+ # Handle RSA.new(size, exponent) form here; new(str) and new() forms
+ # are handled by #initialize
+ def new(*args, &blk) # :nodoc:
+ if args[0].is_a?(Integer)
+ generate(*args, &blk)
+ else
+ super
+ end
+ end
+ end
+
+ # :call-seq:
+ # rsa.private_encrypt(string) -> String
+ # rsa.private_encrypt(string, padding) -> String
+ #
+ # Encrypt +string+ with the private key. +padding+ defaults to
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
+ # compatibility. The encrypted string output can be decrypted using
+ # #public_decrypt.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
+ # PKey::PKey#verify_recover instead.
+ def private_encrypt(string, padding = PKCS1_PADDING)
+ n or raise OpenSSL::PKey::RSAError, "incomplete RSA"
+ private? or raise OpenSSL::PKey::RSAError, "private key needed."
+ begin
+ sign_raw(nil, string, {
+ "rsa_padding_mode" => translate_padding_mode(padding),
+ })
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::RSAError, $!.message
+ end
+ end
+
+ # :call-seq:
+ # rsa.public_decrypt(string) -> String
+ # rsa.public_decrypt(string, padding) -> String
+ #
+ # Decrypt +string+, which has been encrypted with the private key, with the
+ # public key. +padding+ defaults to PKCS1_PADDING which is known to be
+ # insecure but is kept for backwards compatibility.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
+ # PKey::PKey#verify_recover instead.
+ def public_decrypt(string, padding = PKCS1_PADDING)
+ n or raise OpenSSL::PKey::RSAError, "incomplete RSA"
+ begin
+ verify_recover(nil, string, {
+ "rsa_padding_mode" => translate_padding_mode(padding),
+ })
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::RSAError, $!.message
+ end
+ end
+
+ # :call-seq:
+ # rsa.public_encrypt(string) -> String
+ # rsa.public_encrypt(string, padding) -> String
+ #
+ # Encrypt +string+ with the public key. +padding+ defaults to
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
+ # compatibility. The encrypted string output can be decrypted using
+ # #private_decrypt.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
+ def public_encrypt(data, padding = PKCS1_PADDING)
+ n or raise OpenSSL::PKey::RSAError, "incomplete RSA"
+ begin
+ encrypt(data, {
+ "rsa_padding_mode" => translate_padding_mode(padding),
+ })
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::RSAError, $!.message
+ end
+ end
+
+ # :call-seq:
+ # rsa.private_decrypt(string) -> String
+ # rsa.private_decrypt(string, padding) -> String
+ #
+ # Decrypt +string+, which has been encrypted with the public key, with the
+ # private key. +padding+ defaults to PKCS1_PADDING, which is known to be
+ # insecure but is kept for backwards compatibility.
+ #
+ # <b>Deprecated in version 3.0</b>.
+ # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
+ def private_decrypt(data, padding = PKCS1_PADDING)
+ n or raise OpenSSL::PKey::RSAError, "incomplete RSA"
+ private? or raise OpenSSL::PKey::RSAError, "private key needed."
+ begin
+ decrypt(data, {
+ "rsa_padding_mode" => translate_padding_mode(padding),
+ })
+ rescue OpenSSL::PKey::PKeyError
+ raise OpenSSL::PKey::RSAError, $!.message
+ end
+ end
+
+ PKCS1_PADDING = 1
+ SSLV23_PADDING = 2
+ NO_PADDING = 3
+ PKCS1_OAEP_PADDING = 4
+
+ private def translate_padding_mode(num)
+ case num
+ when PKCS1_PADDING
+ "pkcs1"
+ when SSLV23_PADDING
+ "sslv23"
+ when NO_PADDING
+ "none"
+ when PKCS1_OAEP_PADDING
+ "oaep"
+ else
+ raise OpenSSL::PKey::PKeyError, "unsupported padding mode"
+ end
+ end
+ end
end
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb
index 355eb2ebbb..ea8bb2a18e 100644
--- a/ext/openssl/lib/openssl/ssl.rb
+++ b/ext/openssl/lib/openssl/ssl.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
=begin
= Info
'OpenSSL for Ruby 2' project
@@ -11,8 +11,12 @@
=end
require "openssl/buffering"
+
+if defined?(OpenSSL::SSL)
+
require "io/nonblock"
require "ipaddr"
+require "socket"
module OpenSSL
module SSL
@@ -90,15 +94,17 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
DEFAULT_CERT_STORE.set_default_paths
DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
- # A callback invoked when DH parameters are required.
+ # A callback invoked when DH parameters are required for ephemeral DH key
+ # exchange.
#
- # The callback is invoked with the Session for the key exchange, an
+ # The callback is invoked with the SSLSocket, a
# flag indicating the use of an export cipher and the keylength
# required.
#
# The callback must return an OpenSSL::PKey::DH instance of the correct
# key length.
-
+ #
+ # <b>Deprecated in version 3.0.</b> Use #tmp_dh= instead.
attr_accessor :tmp_dh_callback
# A callback invoked at connect time to distinguish between multiple
@@ -121,6 +127,8 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
def initialize(version = nil)
self.options |= OpenSSL::SSL::OP_ALL
self.ssl_version = version if version
+ self.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ self.verify_hostname = false
end
##
@@ -231,6 +239,11 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
end
module SocketForwarder
+ # The file descriptor for the socket.
+ def fileno
+ to_io.fileno
+ end
+
def addr
to_io.addr
end
@@ -424,10 +437,6 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
@context.tmp_dh_callback || OpenSSL::SSL::SSLContext::DEFAULT_TMP_DH_CALLBACK
end
- def tmp_ecdh_callback
- @context.tmp_ecdh_callback
- end
-
def session_new_cb
@context.session_new_cb
end
@@ -435,6 +444,38 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
def session_get_cb
@context.session_get_cb
end
+
+ class << self
+
+ # call-seq:
+ # open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil)
+ #
+ # Creates a new instance of SSLSocket.
+ # _remote\_host_ and _remote\_port_ are used to open TCPSocket.
+ # If _local\_host_ and _local\_port_ are specified,
+ # then those parameters are used on the local end to establish the connection.
+ # If _context_ is provided,
+ # the SSL Sockets initial params will be taken from the context.
+ #
+ # === Examples
+ #
+ # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443)
+ # sock.connect # Initiates a connection to localhost:443
+ #
+ # with SSLContext:
+ #
+ # ctx = OpenSSL::SSL::SSLContext.new
+ # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443, context: ctx)
+ # sock.connect # Initiates a connection to localhost:443 with SSLContext
+ def open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil)
+ sock = ::TCPSocket.open(remote_host, remote_port, local_host, local_port)
+ if context.nil?
+ return OpenSSL::SSL::SSLSocket.new(sock)
+ else
+ return OpenSSL::SSL::SSLSocket.new(sock, context)
+ end
+ end
+ end
end
##
@@ -465,7 +506,7 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
end
# See TCPServer#listen for details.
- def listen(backlog=5)
+ def listen(backlog=Socket::SOMAXCONN)
@svr.listen(backlog)
end
@@ -502,3 +543,5 @@ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
end
end
end
+
+end
diff --git a/ext/openssl/lib/openssl/version.rb b/ext/openssl/lib/openssl/version.rb
new file mode 100644
index 0000000000..4163f55064
--- /dev/null
+++ b/ext/openssl/lib/openssl/version.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+module OpenSSL
+ VERSION = "3.1.0"
+end
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb
index 98358f90da..f973f4f4dc 100644
--- a/ext/openssl/lib/openssl/x509.rb
+++ b/ext/openssl/lib/openssl/x509.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#--
# = Ruby-space definitions that completes C-space funcs for X509 and subclasses
#
@@ -12,6 +12,8 @@
# (See the file 'LICENCE'.)
#++
+require_relative 'marshal'
+
module OpenSSL
module X509
class ExtensionFactory
@@ -41,6 +43,8 @@ module OpenSSL
end
class Extension
+ include OpenSSL::Marshal
+
def ==(other)
return false unless Extension === other
to_der == other.to_der
@@ -60,9 +64,146 @@ module OpenSSL
def to_a
[ self.oid, self.value, self.critical? ]
end
+
+ module Helpers
+ def find_extension(oid)
+ extensions.find { |e| e.oid == oid }
+ end
+ end
+
+ module SubjectKeyIdentifier
+ include Helpers
+
+ # Get the subject's key identifier from the subjectKeyIdentifier
+ # exteension, as described in RFC5280 Section 4.2.1.2.
+ #
+ # Returns the binary String key identifier or nil or raises
+ # ASN1::ASN1Error.
+ def subject_key_identifier
+ ext = find_extension("subjectKeyIdentifier")
+ return nil if ext.nil?
+
+ ski_asn1 = ASN1.decode(ext.value_der)
+ if ext.critical? || ski_asn1.tag_class != :UNIVERSAL || ski_asn1.tag != ASN1::OCTET_STRING
+ raise ASN1::ASN1Error, "invalid extension"
+ end
+
+ ski_asn1.value
+ end
+ end
+
+ module AuthorityKeyIdentifier
+ include Helpers
+
+ # Get the issuing certificate's key identifier from the
+ # authorityKeyIdentifier extension, as described in RFC5280
+ # Section 4.2.1.1
+ #
+ # Returns the binary String keyIdentifier or nil or raises
+ # ASN1::ASN1Error.
+ def authority_key_identifier
+ ext = find_extension("authorityKeyIdentifier")
+ return nil if ext.nil?
+
+ aki_asn1 = ASN1.decode(ext.value_der)
+ if ext.critical? || aki_asn1.tag_class != :UNIVERSAL || aki_asn1.tag != ASN1::SEQUENCE
+ raise ASN1::ASN1Error, "invalid extension"
+ end
+
+ key_id = aki_asn1.value.find do |v|
+ v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0
+ end
+
+ key_id.nil? ? nil : key_id.value
+ end
+ end
+
+ module CRLDistributionPoints
+ include Helpers
+
+ # Get the distributionPoint fullName URI from the certificate's CRL
+ # distribution points extension, as described in RFC5280 Section
+ # 4.2.1.13
+ #
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
+ def crl_uris
+ ext = find_extension("crlDistributionPoints")
+ return nil if ext.nil?
+
+ cdp_asn1 = ASN1.decode(ext.value_der)
+ if cdp_asn1.tag_class != :UNIVERSAL || cdp_asn1.tag != ASN1::SEQUENCE
+ raise ASN1::ASN1Error, "invalid extension"
+ end
+
+ crl_uris = cdp_asn1.map do |crl_distribution_point|
+ distribution_point = crl_distribution_point.value.find do |v|
+ v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0
+ end
+ full_name = distribution_point&.value&.find do |v|
+ v.tag_class == :CONTEXT_SPECIFIC && v.tag == 0
+ end
+ full_name&.value&.find do |v|
+ v.tag_class == :CONTEXT_SPECIFIC && v.tag == 6 # uniformResourceIdentifier
+ end
+ end
+
+ crl_uris&.map(&:value)
+ end
+ end
+
+ module AuthorityInfoAccess
+ include Helpers
+
+ # Get the information and services for the issuer from the certificate's
+ # authority information access extension exteension, as described in RFC5280
+ # Section 4.2.2.1.
+ #
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
+ def ca_issuer_uris
+ aia_asn1 = parse_aia_asn1
+ return nil if aia_asn1.nil?
+
+ ca_issuer = aia_asn1.value.select do |authority_info_access|
+ authority_info_access.value.first.value == "caIssuers"
+ end
+
+ ca_issuer&.map(&:value)&.map(&:last)&.map(&:value)
+ end
+
+ # Get the URIs for OCSP from the certificate's authority information access
+ # extension exteension, as described in RFC5280 Section 4.2.2.1.
+ #
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
+ def ocsp_uris
+ aia_asn1 = parse_aia_asn1
+ return nil if aia_asn1.nil?
+
+ ocsp = aia_asn1.value.select do |authority_info_access|
+ authority_info_access.value.first.value == "OCSP"
+ end
+
+ ocsp&.map(&:value)&.map(&:last)&.map(&:value)
+ end
+
+ private
+
+ def parse_aia_asn1
+ ext = find_extension("authorityInfoAccess")
+ return nil if ext.nil?
+
+ aia_asn1 = ASN1.decode(ext.value_der)
+ if ext.critical? || aia_asn1.tag_class != :UNIVERSAL || aia_asn1.tag != ASN1::SEQUENCE
+ raise ASN1::ASN1Error, "invalid extension"
+ end
+
+ aia_asn1
+ end
+ end
end
class Name
+ include OpenSSL::Marshal
+
module RFC2253DN
Special = ',=+<>#;'
HexChar = /[0-9a-fA-F]/
@@ -138,11 +279,29 @@ module OpenSSL
end
class << self
+ # Parses the UTF-8 string representation of a distinguished name,
+ # according to RFC 2253.
+ #
+ # See also #to_utf8 for the opposite operation.
def parse_rfc2253(str, template=OBJECT_TYPE_TEMPLATE)
ary = OpenSSL::X509::Name::RFC2253DN.scan(str)
self.new(ary, template)
end
+ # Parses the string representation of a distinguished name. Two
+ # different forms are supported:
+ #
+ # - \OpenSSL format (<tt>X509_NAME_oneline()</tt>) used by
+ # <tt>#to_s</tt>. For example: <tt>/DC=com/DC=example/CN=nobody</tt>
+ # - \OpenSSL format (<tt>X509_NAME_print()</tt>)
+ # used by <tt>#to_s(OpenSSL::X509::Name::COMPAT)</tt>. For example:
+ # <tt>DC=com, DC=example, CN=nobody</tt>
+ #
+ # Neither of them is standardized and has quirks and inconsistencies
+ # in handling of escaped characters or multi-valued RDNs.
+ #
+ # Use of this method is discouraged in new applications. See
+ # Name.parse_rfc2253 and #to_utf8 for the alternative.
def parse_openssl(str, template=OBJECT_TYPE_TEMPLATE)
if str.start_with?("/")
# /A=B/C=D format
@@ -166,6 +325,8 @@ module OpenSSL
end
class Attribute
+ include OpenSSL::Marshal
+
def ==(other)
return false unless Attribute === other
to_der == other.to_der
@@ -179,6 +340,12 @@ module OpenSSL
end
class Certificate
+ include OpenSSL::Marshal
+ include Extension::SubjectKeyIdentifier
+ include Extension::AuthorityKeyIdentifier
+ include Extension::CRLDistributionPoints
+ include Extension::AuthorityInfoAccess
+
def pretty_print(q)
q.object_group(self) {
q.breakable
@@ -189,9 +356,16 @@ module OpenSSL
q.text 'not_after='; q.pp self.not_after
}
end
+
+ def self.load_file(path)
+ load(File.binread(path))
+ end
end
class CRL
+ include OpenSSL::Marshal
+ include Extension::AuthorityKeyIdentifier
+
def ==(other)
return false unless CRL === other
to_der == other.to_der
@@ -206,6 +380,8 @@ module OpenSSL
end
class Request
+ include OpenSSL::Marshal
+
def ==(other)
return false unless Request === other
to_der == other.to_der
diff --git a/ext/openssl/openssl.gemspec b/ext/openssl/openssl.gemspec
index 295379fb6c..8d83b69193 100644
--- a/ext/openssl/openssl.gemspec
+++ b/ext/openssl/openssl.gemspec
@@ -1,29 +1,21 @@
-# -*- encoding: utf-8 -*-
+Gem::Specification.new do |spec|
+ spec.name = "openssl"
+ spec.version = "3.1.0"
+ spec.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"]
+ spec.email = ["ruby-core@ruby-lang.org"]
+ spec.summary = %q{OpenSSL provides SSL, TLS and general purpose cryptography.}
+ spec.description = %q{It wraps the OpenSSL library.}
+ spec.homepage = "https://github.com/ruby/openssl"
+ spec.license = "Ruby"
-Gem::Specification.new do |s|
- s.name = "openssl"
- s.version = "2.1.2"
+ spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "LICENSE.txt"]
+ spec.require_paths = ["lib"]
+ spec.extensions = ["ext/openssl/extconf.rb"]
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.metadata = { "msys2_mingw_dependencies" => "openssl" } if s.respond_to? :metadata=
- s.require_paths = ["lib"]
- s.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"]
- s.date = "2018-10-17"
- s.description = "It wraps the OpenSSL library."
- s.email = ["ruby-core@ruby-lang.org"]
- s.extensions = ["ext/openssl/extconf.rb"]
- s.extra_rdoc_files = ["README.md", "CONTRIBUTING.md", "History.md"]
- s.files = ["BSDL", "CONTRIBUTING.md", "History.md", "LICENSE.txt", "README.md", "ext/openssl/deprecation.rb", "ext/openssl/extconf.rb", "ext/openssl/openssl_missing.c", "ext/openssl/openssl_missing.h", "ext/openssl/ossl.c", "ext/openssl/ossl.h", "ext/openssl/ossl_asn1.c", "ext/openssl/ossl_asn1.h", "ext/openssl/ossl_bio.c", "ext/openssl/ossl_bio.h", "ext/openssl/ossl_bn.c", "ext/openssl/ossl_bn.h", "ext/openssl/ossl_cipher.c", "ext/openssl/ossl_cipher.h", "ext/openssl/ossl_config.c", "ext/openssl/ossl_config.h", "ext/openssl/ossl_digest.c", "ext/openssl/ossl_digest.h", "ext/openssl/ossl_engine.c", "ext/openssl/ossl_engine.h", "ext/openssl/ossl_hmac.c", "ext/openssl/ossl_hmac.h", "ext/openssl/ossl_kdf.c", "ext/openssl/ossl_kdf.h", "ext/openssl/ossl_ns_spki.c", "ext/openssl/ossl_ns_spki.h", "ext/openssl/ossl_ocsp.c", "ext/openssl/ossl_ocsp.h", "ext/openssl/ossl_pkcs12.c", "ext/openssl/ossl_pkcs12.h", "ext/openssl/ossl_pkcs7.c", "ext/openssl/ossl_pkcs7.h", "ext/openssl/ossl_pkey.c", "ext/openssl/ossl_pkey.h", "ext/openssl/ossl_pkey_dh.c", "ext/openssl/ossl_pkey_dsa.c", "ext/openssl/ossl_pkey_ec.c", "ext/openssl/ossl_pkey_rsa.c", "ext/openssl/ossl_rand.c", "ext/openssl/ossl_rand.h", "ext/openssl/ossl_ssl.c", "ext/openssl/ossl_ssl.h", "ext/openssl/ossl_ssl_session.c", "ext/openssl/ossl_version.h", "ext/openssl/ossl_x509.c", "ext/openssl/ossl_x509.h", "ext/openssl/ossl_x509attr.c", "ext/openssl/ossl_x509cert.c", "ext/openssl/ossl_x509crl.c", "ext/openssl/ossl_x509ext.c", "ext/openssl/ossl_x509name.c", "ext/openssl/ossl_x509req.c", "ext/openssl/ossl_x509revoked.c", "ext/openssl/ossl_x509store.c", "ext/openssl/ruby_missing.h", "lib/openssl.rb", "lib/openssl/bn.rb", "lib/openssl/buffering.rb", "lib/openssl/cipher.rb", "lib/openssl/config.rb", "lib/openssl/digest.rb", "lib/openssl/pkcs5.rb", "lib/openssl/pkey.rb", "lib/openssl/ssl.rb", "lib/openssl/x509.rb"]
- s.homepage = "https://github.com/ruby/openssl"
- s.licenses = ["Ruby"]
- s.rdoc_options = ["--main", "README.md"]
- s.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
- s.rubygems_version = "3.0.0.beta1"
- s.summary = "OpenSSL provides SSL, TLS and general purpose cryptography."
+ spec.extra_rdoc_files = Dir["*.md"]
+ spec.rdoc_options = ["--main", "README.md"]
- s.add_runtime_dependency("ipaddr", [">= 0"])
- s.add_development_dependency("rake", [">= 0"])
- s.add_development_dependency("rake-compiler", [">= 0"])
- s.add_development_dependency("test-unit", ["~> 3.0"])
- s.add_development_dependency("rdoc", [">= 0"])
+ spec.required_ruby_version = ">= 2.6.0"
+
+ spec.metadata["msys2_mingw_dependencies"] = "openssl"
end
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c
index b36ef0288e..4415703db4 100644
--- a/ext/openssl/openssl_missing.c
+++ b/ext/openssl/openssl_missing.c
@@ -10,77 +10,11 @@
#include RUBY_EXTCONF_H
#include <string.h> /* memcpy() */
-#if !defined(OPENSSL_NO_ENGINE)
-# include <openssl/engine.h>
-#endif
-#if !defined(OPENSSL_NO_HMAC)
-# include <openssl/hmac.h>
-#endif
#include <openssl/x509_vfy.h>
#include "openssl_missing.h"
-/* added in 1.0.2 */
-#if !defined(OPENSSL_NO_EC)
-#if !defined(HAVE_EC_CURVE_NIST2NID)
-static struct {
- const char *name;
- int nid;
-} nist_curves[] = {
- {"B-163", NID_sect163r2},
- {"B-233", NID_sect233r1},
- {"B-283", NID_sect283r1},
- {"B-409", NID_sect409r1},
- {"B-571", NID_sect571r1},
- {"K-163", NID_sect163k1},
- {"K-233", NID_sect233k1},
- {"K-283", NID_sect283k1},
- {"K-409", NID_sect409k1},
- {"K-571", NID_sect571k1},
- {"P-192", NID_X9_62_prime192v1},
- {"P-224", NID_secp224r1},
- {"P-256", NID_X9_62_prime256v1},
- {"P-384", NID_secp384r1},
- {"P-521", NID_secp521r1}
-};
-
-int
-ossl_EC_curve_nist2nid(const char *name)
-{
- size_t i;
- for (i = 0; i < (sizeof(nist_curves) / sizeof(nist_curves[0])); i++) {
- if (!strcmp(nist_curves[i].name, name))
- return nist_curves[i].nid;
- }
- return NID_undef;
-}
-#endif
-#endif
-
/*** added in 1.1.0 ***/
-#if !defined(HAVE_HMAC_CTX_NEW)
-HMAC_CTX *
-ossl_HMAC_CTX_new(void)
-{
- HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX));
- if (!ctx)
- return NULL;
- HMAC_CTX_init(ctx);
- return ctx;
-}
-#endif
-
-#if !defined(HAVE_HMAC_CTX_FREE)
-void
-ossl_HMAC_CTX_free(HMAC_CTX *ctx)
-{
- if (ctx) {
- HMAC_CTX_cleanup(ctx);
- OPENSSL_free(ctx);
- }
-}
-#endif
-
#if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
void
ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index 09998214e1..8629bfe505 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -12,40 +12,7 @@
#include "ruby/config.h"
-/* added in 1.0.2 */
-#if !defined(OPENSSL_NO_EC)
-#if !defined(HAVE_EC_CURVE_NIST2NID)
-int ossl_EC_curve_nist2nid(const char *);
-# define EC_curve_nist2nid ossl_EC_curve_nist2nid
-#endif
-#endif
-
-#if !defined(HAVE_X509_REVOKED_DUP)
-# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
- (d2i_of_void *)d2i_X509_REVOKED, (char *)(rev))
-#endif
-
-#if !defined(HAVE_X509_STORE_CTX_GET0_STORE)
-# define X509_STORE_CTX_get0_store(x) ((x)->ctx)
-#endif
-
-#if !defined(HAVE_SSL_IS_SERVER)
-# define SSL_is_server(s) ((s)->server)
-#endif
-
/* added in 1.1.0 */
-#if !defined(HAVE_BN_GENCB_NEW)
-# define BN_GENCB_new() ((BN_GENCB *)OPENSSL_malloc(sizeof(BN_GENCB)))
-#endif
-
-#if !defined(HAVE_BN_GENCB_FREE)
-# define BN_GENCB_free(cb) OPENSSL_free(cb)
-#endif
-
-#if !defined(HAVE_BN_GENCB_GET_ARG)
-# define BN_GENCB_get_arg(cb) (cb)->arg
-#endif
-
#if !defined(HAVE_EVP_MD_CTX_NEW)
# define EVP_MD_CTX_new EVP_MD_CTX_create
#endif
@@ -54,16 +21,6 @@ int ossl_EC_curve_nist2nid(const char *);
# define EVP_MD_CTX_free EVP_MD_CTX_destroy
#endif
-#if !defined(HAVE_HMAC_CTX_NEW)
-HMAC_CTX *ossl_HMAC_CTX_new(void);
-# define HMAC_CTX_new ossl_HMAC_CTX_new
-#endif
-
-#if !defined(HAVE_HMAC_CTX_FREE)
-void ossl_HMAC_CTX_free(HMAC_CTX *);
-# define HMAC_CTX_free ossl_HMAC_CTX_free
-#endif
-
#if !defined(HAVE_X509_STORE_GET_EX_DATA)
# define X509_STORE_get_ex_data(x, idx) \
CRYPTO_get_ex_data(&(x)->ex_data, (idx))
@@ -72,6 +29,9 @@ void ossl_HMAC_CTX_free(HMAC_CTX *);
#if !defined(HAVE_X509_STORE_SET_EX_DATA)
# define X509_STORE_set_ex_data(x, idx, data) \
CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
+#endif
+
+#if !defined(HAVE_X509_STORE_GET_EX_NEW_INDEX) && !defined(X509_STORE_get_ex_new_index)
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
(newf), (dupf), (freef))
@@ -219,4 +179,60 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
# define SSL_SESSION_get_protocol_version(s) ((s)->ssl_version)
#endif
+#if !defined(HAVE_TS_STATUS_INFO_GET0_STATUS)
+# define TS_STATUS_INFO_get0_status(a) ((a)->status)
+#endif
+
+#if !defined(HAVE_TS_STATUS_INFO_GET0_TEXT)
+# define TS_STATUS_INFO_get0_text(a) ((a)->text)
+#endif
+
+#if !defined(HAVE_TS_STATUS_INFO_GET0_FAILURE_INFO)
+# define TS_STATUS_INFO_get0_failure_info(a) ((a)->failure_info)
+#endif
+
+#if !defined(HAVE_TS_VERIFY_CTS_SET_CERTS)
+# define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
+#endif
+
+#if !defined(HAVE_TS_VERIFY_CTX_SET_STORE)
+# define TS_VERIFY_CTX_set_store(ctx, str) ((ctx)->store=(str))
+#endif
+
+#if !defined(HAVE_TS_VERIFY_CTX_ADD_FLAGS)
+# define TS_VERIFY_CTX_add_flags(ctx, f) ((ctx)->flags |= (f))
+#endif
+
+#if !defined(HAVE_TS_RESP_CTX_SET_TIME_CB)
+# define TS_RESP_CTX_set_time_cb(ctx, callback, dta) do { \
+ (ctx)->time_cb = (callback); \
+ (ctx)->time_cb_data = (dta); \
+ } while (0)
+#endif
+
+/* added in 3.0.0 */
+#if !defined(HAVE_TS_VERIFY_CTX_SET_CERTS)
+# define TS_VERIFY_CTX_set_certs(ctx, crts) TS_VERIFY_CTS_set_certs(ctx, crts)
+#endif
+
+#ifndef HAVE_EVP_MD_CTX_GET0_MD
+# define EVP_MD_CTX_get0_md(ctx) EVP_MD_CTX_md(ctx)
+#endif
+
+/*
+ * OpenSSL 1.1.0 added EVP_MD_CTX_pkey_ctx(), and then it was renamed to
+ * EVP_MD_CTX_get_pkey_ctx(x) in OpenSSL 3.0.
+ */
+#ifndef HAVE_EVP_MD_CTX_GET_PKEY_CTX
+# ifdef HAVE_EVP_MD_CTX_PKEY_CTX
+# define EVP_MD_CTX_get_pkey_ctx(x) EVP_MD_CTX_pkey_ctx(x)
+# else
+# define EVP_MD_CTX_get_pkey_ctx(x) (x)->pctx
+# endif
+#endif
+
+#ifndef HAVE_EVP_PKEY_EQ
+# define EVP_PKEY_eq(a, b) EVP_PKEY_cmp(a, b)
+#endif
+
#endif /* _OSSL_OPENSSL_MISSING_H_ */
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index e4196f0754..6c532aca94 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -9,13 +9,19 @@
*/
#include "ossl.h"
#include <stdarg.h> /* for ossl_raise */
-#include <ruby/thread_native.h> /* for OpenSSL < 1.1.0 locks */
+
+/* OpenSSL >= 1.1.0 and LibreSSL >= 2.9.0 */
+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER >= 0x10100000
+# define HAVE_OPENSSL_110_THREADING_API
+#else
+# include <ruby/thread_native.h>
+#endif
/*
* Data Conversion
*/
#define OSSL_IMPL_ARY2SK(name, type, expected_class, dup) \
-STACK_OF(type) * \
+VALUE \
ossl_##name##_ary2sk0(VALUE ary) \
{ \
STACK_OF(type) *sk; \
@@ -37,7 +43,7 @@ ossl_##name##_ary2sk0(VALUE ary) \
x = dup(val); /* NEED TO DUP */ \
sk_##type##_push(sk, x); \
} \
- return sk; \
+ return (VALUE)sk; \
} \
\
STACK_OF(type) * \
@@ -262,15 +268,11 @@ ossl_to_der_if_possible(VALUE obj)
/*
* Errors
*/
-static VALUE
-ossl_make_error(VALUE exc, const char *fmt, va_list args)
+VALUE
+ossl_make_error(VALUE exc, VALUE str)
{
- VALUE str = Qnil;
unsigned long e;
- if (fmt) {
- str = rb_vsprintf(fmt, args);
- }
e = ERR_peek_last_error();
if (e) {
const char *msg = ERR_reason_error_string(e);
@@ -294,37 +296,48 @@ ossl_raise(VALUE exc, const char *fmt, ...)
{
va_list args;
VALUE err;
- va_start(args, fmt);
- err = ossl_make_error(exc, fmt, args);
- va_end(args);
- rb_exc_raise(err);
+
+ if (fmt) {
+ va_start(args, fmt);
+ err = rb_vsprintf(fmt, args);
+ va_end(args);
+ }
+ else {
+ err = Qnil;
+ }
+
+ rb_exc_raise(ossl_make_error(exc, err));
}
void
ossl_clear_error(void)
{
if (dOSSL == Qtrue) {
- unsigned long e;
- const char *file, *data, *errstr;
- int line, flags;
-
- while ((e = ERR_get_error_line_data(&file, &line, &data, &flags))) {
- errstr = ERR_error_string(e, NULL);
- if (!errstr)
- errstr = "(null)";
-
- if (flags & ERR_TXT_STRING) {
- if (!data)
- data = "(null)";
- rb_warn("error on stack: %s (%s)", errstr, data);
- }
- else {
- rb_warn("error on stack: %s", errstr);
- }
- }
+ unsigned long e;
+ const char *file, *data, *func, *lib, *reason;
+ char append[256] = "";
+ int line, flags;
+
+#ifdef HAVE_ERR_GET_ERROR_ALL
+ while ((e = ERR_get_error_all(&file, &line, &func, &data, &flags))) {
+#else
+ while ((e = ERR_get_error_line_data(&file, &line, &data, &flags))) {
+ func = ERR_func_error_string(e);
+#endif
+ lib = ERR_lib_error_string(e);
+ reason = ERR_reason_error_string(e);
+
+ if (flags & ERR_TXT_STRING) {
+ if (!data)
+ data = "(null)";
+ snprintf(append, sizeof(append), " (%s)", data);
+ }
+ rb_warn("error on stack: error:%08lX:%s:%s:%s%s", e, lib ? lib : "",
+ func ? func : "", reason ? reason : "", append);
+ }
}
else {
- ERR_clear_error();
+ ERR_clear_error();
}
}
@@ -386,7 +399,7 @@ ossl_debug_get(VALUE self)
* call-seq:
* OpenSSL.debug = boolean -> boolean
*
- * Turns on or off debug mode. With debug mode, all erros added to the OpenSSL
+ * Turns on or off debug mode. With debug mode, all errors added to the OpenSSL
* error queue will be printed to stderr.
*/
static VALUE
@@ -497,8 +510,11 @@ print_mem_leaks(VALUE self)
int ret;
#endif
- BN_CTX_free(ossl_bn_ctx);
- ossl_bn_ctx = NULL;
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+ // for Ruby 2.x
+ void ossl_bn_ctx_free(void); // ossl_bn.c
+ ossl_bn_ctx_free();
+#endif
#if OPENSSL_VERSION_NUMBER >= 0x10100000
ret = CRYPTO_mem_leaks_fp(stderr);
@@ -605,6 +621,35 @@ static void Init_ossl_locks(void)
#endif /* !HAVE_OPENSSL_110_THREADING_API */
/*
+ * call-seq:
+ * OpenSSL.fixed_length_secure_compare(string, string) -> boolean
+ *
+ * Constant time memory comparison for fixed length strings, such as results
+ * of HMAC calculations.
+ *
+ * Returns +true+ if the strings are identical, +false+ if they are of the same
+ * length but not identical. If the length is different, +ArgumentError+ is
+ * raised.
+ */
+static VALUE
+ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
+{
+ const unsigned char *p1 = (const unsigned char *)StringValuePtr(str1);
+ const unsigned char *p2 = (const unsigned char *)StringValuePtr(str2);
+ long len1 = RSTRING_LEN(str1);
+ long len2 = RSTRING_LEN(str2);
+
+ if (len1 != len2) {
+ ossl_raise(rb_eArgError, "inputs must be of equal length");
+ }
+
+ switch (CRYPTO_memcmp(p1, p2, len1)) {
+ case 0: return Qtrue;
+ default: return Qfalse;
+ }
+}
+
+/*
* OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
* OpenSSL[https://www.openssl.org/] library.
*
@@ -635,7 +680,7 @@ static void Init_ossl_locks(void)
* ahold of the key may use it unless it is encrypted. In order to securely
* export a key you may export it with a pass phrase.
*
- * cipher = OpenSSL::Cipher.new 'AES-128-CBC'
+ * cipher = OpenSSL::Cipher.new 'aes-256-cbc'
* pass_phrase = 'my secure pass phrase goes here'
*
* key_secure = key.export cipher, pass_phrase
@@ -650,13 +695,13 @@ static void Init_ossl_locks(void)
*
* A key can also be loaded from a file.
*
- * key2 = OpenSSL::PKey::RSA.new File.read 'private_key.pem'
+ * key2 = OpenSSL::PKey.read File.read 'private_key.pem'
* key2.public? # => true
* key2.private? # => true
*
* or
*
- * key3 = OpenSSL::PKey::RSA.new File.read 'public_key.pem'
+ * key3 = OpenSSL::PKey.read File.read 'public_key.pem'
* key3.public? # => true
* key3.private? # => false
*
@@ -668,7 +713,7 @@ static void Init_ossl_locks(void)
*
* key4_pem = File.read 'private.secure.pem'
* pass_phrase = 'my secure pass phrase goes here'
- * key4 = OpenSSL::PKey::RSA.new key4_pem, pass_phrase
+ * key4 = OpenSSL::PKey.read key4_pem, pass_phrase
*
* == RSA Encryption
*
@@ -710,16 +755,14 @@ static void Init_ossl_locks(void)
* To sign a document, a cryptographically secure hash of the document is
* computed first, which is then signed using the private key.
*
- * digest = OpenSSL::Digest::SHA256.new
- * signature = key.sign digest, document
+ * signature = key.sign 'SHA256', document
*
* To validate the signature, again a hash of the document is computed and
* the signature is decrypted using the public key. The result is then
* compared to the hash just computed, if they are equal the signature was
* valid.
*
- * digest = OpenSSL::Digest::SHA256.new
- * if key.verify digest, signature, document
+ * if key.verify 'SHA256', signature, document
* puts 'Valid'
* else
* puts 'Invalid'
@@ -745,7 +788,7 @@ static void Init_ossl_locks(void)
* using PBKDF2. PKCS #5 v2.0 recommends at least 8 bytes for the salt,
* the number of iterations largely depends on the hardware being used.
*
- * cipher = OpenSSL::Cipher.new 'AES-128-CBC'
+ * cipher = OpenSSL::Cipher.new 'aes-256-cbc'
* cipher.encrypt
* iv = cipher.random_iv
*
@@ -753,7 +796,7 @@ static void Init_ossl_locks(void)
* salt = OpenSSL::Random.random_bytes 16
* iter = 20000
* key_len = cipher.key_len
- * digest = OpenSSL::Digest::SHA256.new
+ * digest = OpenSSL::Digest.new('SHA256')
*
* key = OpenSSL::PKCS5.pbkdf2_hmac(pwd, salt, iter, key_len, digest)
* cipher.key = key
@@ -768,7 +811,7 @@ static void Init_ossl_locks(void)
* Use the same steps as before to derive the symmetric AES key, this time
* setting the Cipher up for decryption.
*
- * cipher = OpenSSL::Cipher.new 'AES-128-CBC'
+ * cipher = OpenSSL::Cipher.new 'aes-256-cbc'
* cipher.decrypt
* cipher.iv = iv # the one generated with #random_iv
*
@@ -776,7 +819,7 @@ static void Init_ossl_locks(void)
* salt = ... # the one generated above
* iter = 20000
* key_len = cipher.key_len
- * digest = OpenSSL::Digest::SHA256.new
+ * digest = OpenSSL::Digest.new('SHA256')
*
* key = OpenSSL::PKCS5.pbkdf2_hmac(pwd, salt, iter, key_len, digest)
* cipher.key = key
@@ -803,7 +846,7 @@ static void Init_ossl_locks(void)
*
* First set up the cipher for encryption
*
- * encryptor = OpenSSL::Cipher.new 'AES-128-CBC'
+ * encryptor = OpenSSL::Cipher.new 'aes-256-cbc'
* encryptor.encrypt
* encryptor.pkcs5_keyivgen pass_phrase, salt
*
@@ -816,7 +859,7 @@ static void Init_ossl_locks(void)
*
* Use a new Cipher instance set up for decryption
*
- * decryptor = OpenSSL::Cipher.new 'AES-128-CBC'
+ * decryptor = OpenSSL::Cipher.new 'aes-256-cbc'
* decryptor.decrypt
* decryptor.pkcs5_keyivgen pass_phrase, salt
*
@@ -833,7 +876,7 @@ static void Init_ossl_locks(void)
* signature.
*
* key = OpenSSL::PKey::RSA.new 2048
- * name = OpenSSL::X509::Name.parse 'CN=nobody/DC=example'
+ * name = OpenSSL::X509::Name.parse '/CN=nobody/DC=example'
*
* cert = OpenSSL::X509::Certificate.new
* cert.version = 2
@@ -872,7 +915,7 @@ static void Init_ossl_locks(void)
* certificate.
*
* cert.issuer = name
- * cert.sign key, OpenSSL::Digest::SHA1.new
+ * cert.sign key, OpenSSL::Digest.new('SHA1')
*
* open 'certificate.pem', 'w' do |io| io.write cert.to_pem end
*
@@ -904,7 +947,7 @@ static void Init_ossl_locks(void)
* ca_key = OpenSSL::PKey::RSA.new 2048
* pass_phrase = 'my secure pass phrase goes here'
*
- * cipher = OpenSSL::Cipher.new 'AES-128-CBC'
+ * cipher = OpenSSL::Cipher.new 'aes-256-cbc'
*
* open 'ca_key.pem', 'w', 0400 do |io|
* io.write ca_key.export(cipher, pass_phrase)
@@ -915,7 +958,7 @@ static void Init_ossl_locks(void)
* A CA certificate is created the same way we created a certificate above, but
* with different extensions.
*
- * ca_name = OpenSSL::X509::Name.parse 'CN=ca/DC=example'
+ * ca_name = OpenSSL::X509::Name.parse '/CN=ca/DC=example'
*
* ca_cert = OpenSSL::X509::Certificate.new
* ca_cert.serial = 0
@@ -948,7 +991,7 @@ static void Init_ossl_locks(void)
*
* Root CA certificates are self-signed.
*
- * ca_cert.sign ca_key, OpenSSL::Digest::SHA1.new
+ * ca_cert.sign ca_key, OpenSSL::Digest.new('SHA1')
*
* The CA certificate is saved to disk so it may be distributed to all the
* users of the keys this CA will sign.
@@ -966,7 +1009,7 @@ static void Init_ossl_locks(void)
* csr.version = 0
* csr.subject = name
* csr.public_key = key.public_key
- * csr.sign key, OpenSSL::Digest::SHA1.new
+ * csr.sign key, OpenSSL::Digest.new('SHA1')
*
* A CSR is saved to disk and sent to the CA for signing.
*
@@ -1010,7 +1053,7 @@ static void Init_ossl_locks(void)
* csr_cert.add_extension \
* extension_factory.create_extension('subjectKeyIdentifier', 'hash')
*
- * csr_cert.sign ca_key, OpenSSL::Digest::SHA1.new
+ * csr_cert.sign ca_key, OpenSSL::Digest.new('SHA1')
*
* open 'csr_cert.pem', 'w' do |io|
* io.write csr_cert.to_pem
@@ -1042,13 +1085,13 @@ static void Init_ossl_locks(void)
* loop do
* ssl_connection = ssl_server.accept
*
- * data = connection.gets
+ * data = ssl_connection.gets
*
* response = "I got #{data.dump}"
* puts response
*
- * connection.puts "I got #{data.dump}"
- * connection.close
+ * ssl_connection.puts "I got #{data.dump}"
+ * ssl_connection.close
* end
*
* === SSL client
@@ -1099,6 +1142,10 @@ static void Init_ossl_locks(void)
void
Init_openssl(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
/*
* Init timezone info
@@ -1125,11 +1172,7 @@ Init_openssl(void)
*/
mOSSL = rb_define_module("OpenSSL");
rb_global_variable(&mOSSL);
-
- /*
- * OpenSSL ruby extension version
- */
- rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));
+ rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2);
/*
* Version of OpenSSL the ruby OpenSSL extension was built with
@@ -1205,6 +1248,9 @@ Init_openssl(void)
Init_ossl_pkey();
Init_ossl_rand();
Init_ossl_ssl();
+#ifndef OPENSSL_NO_TS
+ Init_ossl_ts();
+#endif
Init_ossl_x509();
Init_ossl_ocsp();
Init_ossl_engine();
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 6af7ddd7d0..facb80aa73 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -18,19 +18,19 @@
#include <ruby/io.h>
#include <ruby/thread.h>
#include <openssl/opensslv.h>
+
#include <openssl/err.h>
#include <openssl/asn1.h>
#include <openssl/x509v3.h>
#include <openssl/ssl.h>
#include <openssl/pkcs12.h>
#include <openssl/pkcs7.h>
-#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
-#include <openssl/crypto.h>
-#if !defined(OPENSSL_NO_ENGINE)
-# include <openssl/engine.h>
+#ifndef OPENSSL_NO_TS
+ #include <openssl/ts.h>
#endif
+#include <openssl/crypto.h>
#if !defined(OPENSSL_NO_OCSP)
# include <openssl/ocsp.h>
#endif
@@ -40,6 +40,28 @@
#include <openssl/evp.h>
#include <openssl/dh.h>
+#ifndef LIBRESSL_VERSION_NUMBER
+# define OSSL_IS_LIBRESSL 0
+# define OSSL_OPENSSL_PREREQ(maj, min, pat) \
+ (OPENSSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12)))
+# define OSSL_LIBRESSL_PREREQ(maj, min, pat) 0
+#else
+# define OSSL_IS_LIBRESSL 1
+# define OSSL_OPENSSL_PREREQ(maj, min, pat) 0
+# define OSSL_LIBRESSL_PREREQ(maj, min, pat) \
+ (LIBRESSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12)))
+#endif
+
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+# define OSSL_3_const const
+#else
+# define OSSL_3_const /* const */
+#endif
+
+#if !defined(OPENSSL_NO_ENGINE) && !OSSL_OPENSSL_PREREQ(3, 0, 0)
+# define OSSL_USE_ENGINE
+#endif
+
/*
* Common Module
*/
@@ -85,9 +107,8 @@ VALUE ossl_buf2str(char *buf, int len);
VALUE ossl_str_new(const char *, long, int *);
#define ossl_str_adjust(str, p) \
do{\
- long len = RSTRING_LEN(str);\
long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\
- assert(newlen <= len);\
+ assert(newlen <= RSTRING_LEN(str));\
rb_str_set_len((str), newlen);\
}while(0)
/*
@@ -119,7 +140,9 @@ int ossl_pem_passwd_cb(char *, int, int, void *);
/*
* ERRor messages
*/
-NORETURN(void ossl_raise(VALUE, const char *, ...));
+PRINTF_ARGS(NORETURN(void ossl_raise(VALUE, const char *, ...)), 2, 3);
+/* Make exception instance from str and OpenSSL error reason string. */
+VALUE ossl_make_error(VALUE exc, VALUE str);
/* Clear OpenSSL error queue. If dOSSL is set, rb_warn() them. */
void ossl_clear_error(void);
@@ -152,7 +175,6 @@ void ossl_debug(const char *, ...);
* Include all parts
*/
#include "openssl_missing.h"
-#include "ruby_missing.h"
#include "ossl_asn1.h"
#include "ossl_bio.h"
#include "ossl_bn.h"
@@ -167,7 +189,9 @@ void ossl_debug(const char *, ...);
#include "ossl_pkey.h"
#include "ossl_rand.h"
#include "ossl_ssl.h"
-#include "ossl_version.h"
+#ifndef OPENSSL_NO_TS
+ #include "ossl_ts.h"
+#endif
#include "ossl_x509.h"
#include "ossl_engine.h"
#include "ossl_kdf.h"
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index 0085d4beab..71c452c88a 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -69,6 +69,12 @@ asn1time_to_time(const ASN1_TIME *time)
return rb_funcall2(rb_cTime, rb_intern("utc"), 6, argv);
}
+static VALUE
+asn1time_to_time_i(VALUE arg)
+{
+ return asn1time_to_time((ASN1_TIME *)arg);
+}
+
void
ossl_time_split(VALUE time, time_t *sec, int *days)
{
@@ -136,6 +142,12 @@ num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
return ai;
}
+static VALUE
+asn1integer_to_num_i(VALUE arg)
+{
+ return asn1integer_to_num((ASN1_INTEGER *)arg);
+}
+
/********/
/*
* ASN1 module
@@ -325,7 +337,7 @@ decode_int(unsigned char* der, long length)
p = der;
if(!(ai = d2i_ASN1_INTEGER(NULL, &p, length)))
ossl_raise(eASN1Error, NULL);
- ret = rb_protect((VALUE (*)(VALUE))asn1integer_to_num,
+ ret = rb_protect(asn1integer_to_num_i,
(VALUE)ai, &status);
ASN1_INTEGER_free(ai);
if(status) rb_jump_tag(status);
@@ -365,7 +377,7 @@ decode_enum(unsigned char* der, long length)
p = der;
if(!(ai = d2i_ASN1_ENUMERATED(NULL, &p, length)))
ossl_raise(eASN1Error, NULL);
- ret = rb_protect((VALUE (*)(VALUE))asn1integer_to_num,
+ ret = rb_protect(asn1integer_to_num_i,
(VALUE)ai, &status);
ASN1_ENUMERATED_free(ai);
if(status) rb_jump_tag(status);
@@ -427,7 +439,7 @@ decode_time(unsigned char* der, long length)
p = der;
if(!(time = d2i_ASN1_TIME(NULL, &p, length)))
ossl_raise(eASN1Error, NULL);
- ret = rb_protect((VALUE (*)(VALUE))asn1time_to_time,
+ ret = rb_protect(asn1time_to_time_i,
(VALUE)time, &status);
ASN1_TIME_free(time);
if(status) rb_jump_tag(status);
@@ -497,7 +509,8 @@ ossl_asn1_get_asn1type(VALUE obj)
ASN1_TYPE *ret;
VALUE value, rflag;
void *ptr;
- void (*free_func)();
+ typedef void free_func_type(void *);
+ free_func_type *free_func;
int tag;
tag = ossl_asn1_default_tag(obj);
@@ -510,16 +523,16 @@ ossl_asn1_get_asn1type(VALUE obj)
case V_ASN1_INTEGER: /* FALLTHROUGH */
case V_ASN1_ENUMERATED:
ptr = obj_to_asn1int(value);
- free_func = ASN1_INTEGER_free;
+ free_func = (free_func_type *)ASN1_INTEGER_free;
break;
case V_ASN1_BIT_STRING:
rflag = rb_attr_get(obj, sivUNUSED_BITS);
ptr = obj_to_asn1bstr(value, NUM2INT(rflag));
- free_func = ASN1_BIT_STRING_free;
+ free_func = (free_func_type *)ASN1_BIT_STRING_free;
break;
case V_ASN1_NULL:
ptr = obj_to_asn1null(value);
- free_func = ASN1_NULL_free;
+ free_func = (free_func_type *)ASN1_NULL_free;
break;
case V_ASN1_OCTET_STRING: /* FALLTHROUGH */
case V_ASN1_UTF8STRING: /* FALLTHROUGH */
@@ -534,24 +547,24 @@ ossl_asn1_get_asn1type(VALUE obj)
case V_ASN1_UNIVERSALSTRING: /* FALLTHROUGH */
case V_ASN1_BMPSTRING:
ptr = obj_to_asn1str(value);
- free_func = ASN1_STRING_free;
+ free_func = (free_func_type *)ASN1_STRING_free;
break;
case V_ASN1_OBJECT:
ptr = obj_to_asn1obj(value);
- free_func = ASN1_OBJECT_free;
+ free_func = (free_func_type *)ASN1_OBJECT_free;
break;
case V_ASN1_UTCTIME:
ptr = obj_to_asn1utime(value);
- free_func = ASN1_TIME_free;
+ free_func = (free_func_type *)ASN1_TIME_free;
break;
case V_ASN1_GENERALIZEDTIME:
ptr = obj_to_asn1gtime(value);
- free_func = ASN1_TIME_free;
+ free_func = (free_func_type *)ASN1_TIME_free;
break;
case V_ASN1_SET: /* FALLTHROUGH */
case V_ASN1_SEQUENCE:
ptr = obj_to_asn1derstr(obj);
- free_func = ASN1_STRING_free;
+ free_func = (free_func_type *)ASN1_STRING_free;
break;
default:
ossl_raise(eASN1Error, "unsupported ASN.1 type");
@@ -1285,6 +1298,30 @@ ossl_asn1obj_get_ln(VALUE self)
return ret;
}
+/*
+ * call-seq:
+ * oid == other_oid => true or false
+ *
+ * Returns +true+ if _other_oid_ is the same as _oid_
+ */
+static VALUE
+ossl_asn1obj_eq(VALUE self, VALUE other)
+{
+ VALUE valSelf, valOther;
+ int nidSelf, nidOther;
+
+ valSelf = ossl_asn1_get_value(self);
+ valOther = ossl_asn1_get_value(other);
+
+ if ((nidSelf = OBJ_txt2nid(StringValueCStr(valSelf))) == NID_undef)
+ ossl_raise(eASN1Error, "OBJ_txt2nid");
+
+ if ((nidOther = OBJ_txt2nid(StringValueCStr(valOther))) == NID_undef)
+ ossl_raise(eASN1Error, "OBJ_txt2nid");
+
+ return nidSelf == nidOther ? Qtrue : Qfalse;
+}
+
static VALUE
asn1obj_get_oid_i(VALUE vobj)
{
@@ -1486,7 +1523,7 @@ Init_ossl_asn1(void)
*
* An Array that stores the name of a given tag number. These names are
* the same as the name of the tag constant that is additionally defined,
- * e.g. UNIVERSAL_TAG_NAME[2] = "INTEGER" and OpenSSL::ASN1::INTEGER = 2.
+ * e.g. <tt>UNIVERSAL_TAG_NAME[2] = "INTEGER"</tt> and <tt>OpenSSL::ASN1::INTEGER = 2</tt>.
*
* == Example usage
*
@@ -1818,6 +1855,7 @@ do{\
rb_define_method(cASN1ObjectId, "oid", ossl_asn1obj_get_oid, 0);
rb_define_alias(cASN1ObjectId, "short_name", "sn");
rb_define_alias(cASN1ObjectId, "long_name", "ln");
+ rb_define_method(cASN1ObjectId, "==", ossl_asn1obj_eq, 1);
rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, 0);
rb_define_method(cASN1EndOfContent, "initialize", ossl_asn1eoc_initialize, 0);
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 6f0064e966..bf2bac3679 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -10,6 +10,10 @@
/* modified by Michal Rokos <m.rokos@sh.cvut.cz> */
#include "ossl.h"
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+#include <ruby/ractor.h>
+#endif
+
#define NewBN(klass) \
TypedData_Wrap_Struct((klass), &ossl_bn_type, 0)
#define SetBN(obj, bn) do { \
@@ -150,12 +154,58 @@ ossl_bn_value_ptr(volatile VALUE *ptr)
/*
* Private
*/
-/*
- * BN_CTX - is used in more difficult math. ops
- * (Why just 1? Because Ruby itself isn't thread safe,
- * we don't need to care about threads)
- */
-BN_CTX *ossl_bn_ctx;
+
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+void
+ossl_bn_ctx_free(void *ptr)
+{
+ BN_CTX *ctx = (BN_CTX *)ptr;
+ BN_CTX_free(ctx);
+}
+
+struct rb_ractor_local_storage_type ossl_bn_ctx_key_type = {
+ NULL, // mark
+ ossl_bn_ctx_free,
+};
+
+rb_ractor_local_key_t ossl_bn_ctx_key;
+
+BN_CTX *
+ossl_bn_ctx_get(void)
+{
+ // stored in ractor local storage
+
+ BN_CTX *ctx = rb_ractor_local_storage_ptr(ossl_bn_ctx_key);
+ if (!ctx) {
+ if (!(ctx = BN_CTX_new())) {
+ ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX");
+ }
+ rb_ractor_local_storage_ptr_set(ossl_bn_ctx_key, ctx);
+ }
+ return ctx;
+}
+#else
+// for ruby 2.x
+static BN_CTX *gv_ossl_bn_ctx;
+
+BN_CTX *
+ossl_bn_ctx_get(void)
+{
+ if (gv_ossl_bn_ctx == NULL) {
+ if (!(gv_ossl_bn_ctx = BN_CTX_new())) {
+ ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX");
+ }
+ }
+ return gv_ossl_bn_ctx;
+}
+
+void
+ossl_bn_ctx_free(void)
+{
+ BN_CTX_free(gv_ossl_bn_ctx);
+ gv_ossl_bn_ctx = NULL;
+}
+#endif
static VALUE
ossl_bn_alloc(VALUE klass)
@@ -173,13 +223,29 @@ ossl_bn_alloc(VALUE klass)
/*
* call-seq:
- * OpenSSL::BN.new => aBN
- * OpenSSL::BN.new(bn) => aBN
- * OpenSSL::BN.new(integer) => aBN
- * OpenSSL::BN.new(string) => aBN
- * OpenSSL::BN.new(string, 0 | 2 | 10 | 16) => aBN
+ * OpenSSL::BN.new(bn) -> aBN
+ * OpenSSL::BN.new(integer) -> aBN
+ * OpenSSL::BN.new(string, base = 10) -> aBN
+ *
+ * Construct a new \OpenSSL BIGNUM object.
*
- * Construct a new OpenSSL BIGNUM object.
+ * If +bn+ is an Integer or OpenSSL::BN, a new instance of OpenSSL::BN
+ * representing the same value is returned. See also Integer#to_bn for the
+ * short-hand.
+ *
+ * If a String is given, the content will be parsed according to +base+.
+ *
+ * +string+::
+ * The string to be parsed.
+ * +base+::
+ * The format. Must be one of the following:
+ * - +0+ - MPI format. See the man page BN_mpi2bn(3) for details.
+ * - +2+ - Variable-length and big-endian binary encoding of a positive
+ * number.
+ * - +10+ - Decimal number representation, with a leading '-' for a negative
+ * number.
+ * - +16+ - Hexadeciaml number representation, with a leading '-' for a
+ * negative number.
*/
static VALUE
ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
@@ -193,6 +259,10 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
base = NUM2INT(bs);
}
+ if (NIL_P(str)) {
+ ossl_raise(rb_eArgError, "invalid argument");
+ }
+
if (RB_INTEGER_TYPE_P(str)) {
GetBN(self, bn);
integer_to_bnptr(str, bn);
@@ -243,16 +313,21 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * bn.to_s => string
- * bn.to_s(base) => string
+ * bn.to_s(base = 10) -> string
*
- * === Parameters
- * * _base_ - Integer
- * Valid values:
- * * 0 - MPI
- * * 2 - binary
- * * 10 - the default
- * * 16 - hex
+ * Returns the string representation of the bignum.
+ *
+ * BN.new can parse the encoded string to convert back into an OpenSSL::BN.
+ *
+ * +base+::
+ * The format. Must be one of the following:
+ * - +0+ - MPI format. See the man page BN_bn2mpi(3) for details.
+ * - +2+ - Variable-length and big-endian binary encoding. The sign of
+ * the bignum is ignored.
+ * - +10+ - Decimal number representation, with a leading '-' for a negative
+ * bignum.
+ * - +16+ - Hexadeciaml number representation, with a leading '-' for a
+ * negative bignum.
*/
static VALUE
ossl_bn_to_s(int argc, VALUE *argv, VALUE self)
@@ -400,7 +475,7 @@ ossl_bn_is_negative(VALUE self)
if (!(result = BN_new())) { \
ossl_raise(eBNError, NULL); \
} \
- if (!BN_##func(result, bn, ossl_bn_ctx)) { \
+ if (BN_##func(result, bn, ossl_bn_ctx) <= 0) { \
BN_free(result); \
ossl_raise(eBNError, NULL); \
} \
@@ -426,7 +501,7 @@ BIGNUM_1c(sqr)
if (!(result = BN_new())) { \
ossl_raise(eBNError, NULL); \
} \
- if (!BN_##func(result, bn1, bn2)) { \
+ if (BN_##func(result, bn1, bn2) <= 0) { \
BN_free(result); \
ossl_raise(eBNError, NULL); \
} \
@@ -459,7 +534,7 @@ BIGNUM_2(sub)
if (!(result = BN_new())) { \
ossl_raise(eBNError, NULL); \
} \
- if (!BN_##func(result, bn1, bn2, ossl_bn_ctx)) { \
+ if (BN_##func(result, bn1, bn2, ossl_bn_ctx) <= 0) { \
BN_free(result); \
ossl_raise(eBNError, NULL); \
} \
@@ -502,12 +577,33 @@ BIGNUM_2c(gcd)
*/
BIGNUM_2c(mod_sqr)
+#define BIGNUM_2cr(func) \
+ static VALUE \
+ ossl_bn_##func(VALUE self, VALUE other) \
+ { \
+ BIGNUM *bn1, *bn2 = GetBNPtr(other), *result; \
+ VALUE obj; \
+ GetBN(self, bn1); \
+ obj = NewBN(rb_obj_class(self)); \
+ if (!(result = BN_##func(NULL, bn1, bn2, ossl_bn_ctx))) \
+ ossl_raise(eBNError, NULL); \
+ SetBN(obj, result); \
+ return obj; \
+ }
+
+/*
+ * Document-method: OpenSSL::BN#mod_sqrt
+ * call-seq:
+ * bn.mod_sqrt(bn2) => aBN
+ */
+BIGNUM_2cr(mod_sqrt)
+
/*
* Document-method: OpenSSL::BN#mod_inverse
* call-seq:
- * bn.mod_inverse(bn2) => aBN
+ * bn.mod_inverse(bn2) => aBN
*/
-BIGNUM_2c(mod_inverse)
+BIGNUM_2cr(mod_inverse)
/*
* call-seq:
@@ -556,7 +652,7 @@ ossl_bn_div(VALUE self, VALUE other)
if (!(result = BN_new())) { \
ossl_raise(eBNError, NULL); \
} \
- if (!BN_##func(result, bn1, bn2, bn3, ossl_bn_ctx)) { \
+ if (BN_##func(result, bn1, bn2, bn3, ossl_bn_ctx) <= 0) { \
BN_free(result); \
ossl_raise(eBNError, NULL); \
} \
@@ -598,7 +694,7 @@ BIGNUM_3c(mod_exp)
{ \
BIGNUM *bn; \
GetBN(self, bn); \
- if (!BN_##func(bn, NUM2INT(bit))) { \
+ if (BN_##func(bn, NUM2INT(bit)) <= 0) { \
ossl_raise(eBNError, NULL); \
} \
return self; \
@@ -658,7 +754,7 @@ ossl_bn_is_bit_set(VALUE self, VALUE bit)
if (!(result = BN_new())) { \
ossl_raise(eBNError, NULL); \
} \
- if (!BN_##func(result, bn, b)) { \
+ if (BN_##func(result, bn, b) <= 0) { \
BN_free(result); \
ossl_raise(eBNError, NULL); \
} \
@@ -688,7 +784,7 @@ BIGNUM_SHIFT(rshift)
int b; \
b = NUM2INT(bits); \
GetBN(self, bn); \
- if (!BN_##func(bn, bn, b)) \
+ if (BN_##func(bn, bn, b) <= 0) \
ossl_raise(eBNError, NULL); \
return self; \
}
@@ -707,78 +803,64 @@ BIGNUM_SELF_SHIFT(lshift)
*/
BIGNUM_SELF_SHIFT(rshift)
-#define BIGNUM_RAND(func) \
- static VALUE \
- ossl_bn_s_##func(int argc, VALUE *argv, VALUE klass) \
- { \
- BIGNUM *result; \
- int bottom = 0, top = 0, b; \
- VALUE bits, fill, odd, obj; \
- \
- switch (rb_scan_args(argc, argv, "12", &bits, &fill, &odd)) { \
- case 3: \
- bottom = (odd == Qtrue) ? 1 : 0; \
- /* FALLTHROUGH */ \
- case 2: \
- top = NUM2INT(fill); \
- } \
- b = NUM2INT(bits); \
- obj = NewBN(klass); \
- if (!(result = BN_new())) { \
- ossl_raise(eBNError, NULL); \
- } \
- if (!BN_##func(result, b, top, bottom)) { \
- BN_free(result); \
- ossl_raise(eBNError, NULL); \
- } \
- SetBN(obj, result); \
- return obj; \
- }
-
-/*
- * Document-method: OpenSSL::BN.rand
- * BN.rand(bits [, fill [, odd]]) -> aBN
- */
-BIGNUM_RAND(rand)
-
/*
- * Document-method: OpenSSL::BN.pseudo_rand
- * BN.pseudo_rand(bits [, fill [, odd]]) -> aBN
- */
-BIGNUM_RAND(pseudo_rand)
-
-#define BIGNUM_RAND_RANGE(func) \
- static VALUE \
- ossl_bn_s_##func##_range(VALUE klass, VALUE range) \
- { \
- BIGNUM *bn = GetBNPtr(range), *result; \
- VALUE obj = NewBN(klass); \
- if (!(result = BN_new())) { \
- ossl_raise(eBNError, NULL); \
- } \
- if (!BN_##func##_range(result, bn)) { \
- BN_free(result); \
- ossl_raise(eBNError, NULL); \
- } \
- SetBN(obj, result); \
- return obj; \
- }
-
-/*
- * Document-method: OpenSSL::BN.rand_range
* call-seq:
- * BN.rand_range(range) -> aBN
+ * BN.rand(bits [, fill [, odd]]) -> aBN
+ *
+ * Generates a cryptographically strong pseudo-random number of +bits+.
*
+ * See also the man page BN_rand(3).
*/
-BIGNUM_RAND_RANGE(rand)
+static VALUE
+ossl_bn_s_rand(int argc, VALUE *argv, VALUE klass)
+{
+ BIGNUM *result;
+ int bottom = 0, top = 0, b;
+ VALUE bits, fill, odd, obj;
+
+ switch (rb_scan_args(argc, argv, "12", &bits, &fill, &odd)) {
+ case 3:
+ bottom = (odd == Qtrue) ? 1 : 0;
+ /* FALLTHROUGH */
+ case 2:
+ top = NUM2INT(fill);
+ }
+ b = NUM2INT(bits);
+ obj = NewBN(klass);
+ if (!(result = BN_new())) {
+ ossl_raise(eBNError, "BN_new");
+ }
+ if (BN_rand(result, b, top, bottom) <= 0) {
+ BN_free(result);
+ ossl_raise(eBNError, "BN_rand");
+ }
+ SetBN(obj, result);
+ return obj;
+}
/*
- * Document-method: OpenSSL::BN.pseudo_rand_range
* call-seq:
- * BN.pseudo_rand_range(range) -> aBN
+ * BN.rand_range(range) -> aBN
+ *
+ * Generates a cryptographically strong pseudo-random number in the range
+ * 0...+range+.
*
+ * See also the man page BN_rand_range(3).
*/
-BIGNUM_RAND_RANGE(pseudo_rand)
+static VALUE
+ossl_bn_s_rand_range(VALUE klass, VALUE range)
+{
+ BIGNUM *bn = GetBNPtr(range), *result;
+ VALUE obj = NewBN(klass);
+ if (!(result = BN_new()))
+ ossl_raise(eBNError, "BN_new");
+ if (BN_rand_range(result, bn) <= 0) {
+ BN_free(result);
+ ossl_raise(eBNError, "BN_rand_range");
+ }
+ SetBN(obj, result);
+ return obj;
+}
/*
* call-seq:
@@ -873,7 +955,17 @@ ossl_bn_copy(VALUE self, VALUE other)
static VALUE
ossl_bn_uplus(VALUE self)
{
- return self;
+ VALUE obj;
+ BIGNUM *bn1, *bn2;
+
+ GetBN(self, bn1);
+ obj = NewBN(cBN);
+ bn2 = BN_dup(bn1);
+ if (!bn2)
+ ossl_raise(eBNError, "BN_dup");
+ SetBN(obj, bn2);
+
+ return obj;
}
/*
@@ -897,6 +989,24 @@ ossl_bn_uminus(VALUE self)
return obj;
}
+/*
+ * call-seq:
+ * bn.abs -> aBN
+ */
+static VALUE
+ossl_bn_abs(VALUE self)
+{
+ BIGNUM *bn1;
+
+ GetBN(self, bn1);
+ if (BN_is_negative(bn1)) {
+ return ossl_bn_uminus(self);
+ }
+ else {
+ return ossl_bn_uplus(self);
+ }
+}
+
#define BIGNUM_CMP(func) \
static VALUE \
ossl_bn_##func(VALUE self, VALUE other) \
@@ -1005,34 +1115,29 @@ ossl_bn_hash(VALUE self)
* bn.prime? => true | false
* bn.prime?(checks) => true | false
*
- * Performs a Miller-Rabin probabilistic primality test with _checks_
- * iterations. If _checks_ is not specified, a number of iterations is used
- * that yields a false positive rate of at most 2^-80 for random input.
+ * Performs a Miller-Rabin probabilistic primality test for +bn+.
*
- * === Parameters
- * * _checks_ - integer
+ * <b>+checks+ parameter is deprecated in version 3.0.</b> It has no effect.
*/
static VALUE
ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
{
BIGNUM *bn;
- VALUE vchecks;
- int checks = BN_prime_checks;
+ int ret;
- if (rb_scan_args(argc, argv, "01", &vchecks) == 1) {
- checks = NUM2INT(vchecks);
- }
+ rb_check_arity(argc, 0, 1);
GetBN(self, bn);
- switch (BN_is_prime_ex(bn, checks, ossl_bn_ctx, NULL)) {
- case 1:
- return Qtrue;
- case 0:
- return Qfalse;
- default:
- ossl_raise(eBNError, NULL);
- }
- /* not reachable */
- return Qnil;
+
+#ifdef HAVE_BN_CHECK_PRIME
+ ret = BN_check_prime(bn, ossl_bn_ctx, NULL);
+ if (ret < 0)
+ ossl_raise(eBNError, "BN_check_prime");
+#else
+ ret = BN_is_prime_fasttest_ex(bn, BN_prime_checks, ossl_bn_ctx, 1, NULL);
+ if (ret < 0)
+ ossl_raise(eBNError, "BN_is_prime_fasttest_ex");
+#endif
+ return ret ? Qtrue : Qfalse;
}
/*
@@ -1041,39 +1146,52 @@ ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
* bn.prime_fasttest?(checks) => true | false
* bn.prime_fasttest?(checks, trial_div) => true | false
*
- * Performs a Miller-Rabin primality test. This is same as #prime? except this
- * first attempts trial divisions with some small primes.
+ * Performs a Miller-Rabin probabilistic primality test for +bn+.
*
- * === Parameters
- * * _checks_ - integer
- * * _trial_div_ - boolean
+ * <b>Deprecated in version 3.0.</b> Use #prime? instead.
+ *
+ * +checks+ and +trial_div+ parameters no longer have any effect.
*/
static VALUE
ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
{
+ rb_check_arity(argc, 0, 2);
+ return ossl_bn_is_prime(0, argv, self);
+}
+
+/*
+ * call-seq:
+ * bn.get_flags(flags) => flags
+ *
+ * Returns the flags on the BN object.
+ * The argument is used as a bit mask.
+ *
+ * === Parameters
+ * * _flags_ - integer
+ */
+static VALUE
+ossl_bn_get_flags(VALUE self, VALUE arg)
+{
BIGNUM *bn;
- VALUE vchecks, vtrivdiv;
- int checks = BN_prime_checks, do_trial_division = 1;
+ GetBN(self, bn);
- rb_scan_args(argc, argv, "02", &vchecks, &vtrivdiv);
+ return INT2NUM(BN_get_flags(bn, NUM2INT(arg)));
+}
- if (!NIL_P(vchecks)) {
- checks = NUM2INT(vchecks);
- }
+/*
+ * call-seq:
+ * bn.set_flags(flags) => nil
+ *
+ * Enables the flags on the BN object.
+ * Currently, the flags argument can contain zero of OpenSSL::BN::CONSTTIME.
+ */
+static VALUE
+ossl_bn_set_flags(VALUE self, VALUE arg)
+{
+ BIGNUM *bn;
GetBN(self, bn);
- /* handle true/false */
- if (vtrivdiv == Qfalse) {
- do_trial_division = 0;
- }
- switch (BN_is_prime_fasttest_ex(bn, checks, ossl_bn_ctx, do_trial_division, NULL)) {
- case 1:
- return Qtrue;
- case 0:
- return Qfalse;
- default:
- ossl_raise(eBNError, NULL);
- }
- /* not reachable */
+
+ BN_set_flags(bn, NUM2INT(arg));
return Qnil;
}
@@ -1089,9 +1207,11 @@ Init_ossl_bn(void)
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif
- if (!(ossl_bn_ctx = BN_CTX_new())) {
- ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX");
- }
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ ossl_bn_ctx_key = rb_ractor_local_storage_ptr_newkey(&ossl_bn_ctx_key_type);
+#else
+ ossl_bn_ctx_get();
+#endif
eBNError = rb_define_class_under(mOSSL, "BNError", eOSSLError);
@@ -1111,6 +1231,7 @@ Init_ossl_bn(void)
rb_define_method(cBN, "+@", ossl_bn_uplus, 0);
rb_define_method(cBN, "-@", ossl_bn_uminus, 0);
+ rb_define_method(cBN, "abs", ossl_bn_abs, 0);
rb_define_method(cBN, "+", ossl_bn_add, 1);
rb_define_method(cBN, "-", ossl_bn_sub, 1);
@@ -1124,6 +1245,7 @@ Init_ossl_bn(void)
rb_define_method(cBN, "mod_sub", ossl_bn_mod_sub, 2);
rb_define_method(cBN, "mod_mul", ossl_bn_mod_mul, 2);
rb_define_method(cBN, "mod_sqr", ossl_bn_mod_sqr, 1);
+ rb_define_method(cBN, "mod_sqrt", ossl_bn_mod_sqrt, 1);
rb_define_method(cBN, "**", ossl_bn_exp, 1);
rb_define_method(cBN, "mod_exp", ossl_bn_mod_exp, 2);
rb_define_method(cBN, "gcd", ossl_bn_gcd, 1);
@@ -1154,9 +1276,9 @@ Init_ossl_bn(void)
* get_word */
rb_define_singleton_method(cBN, "rand", ossl_bn_s_rand, -1);
- rb_define_singleton_method(cBN, "pseudo_rand", ossl_bn_s_pseudo_rand, -1);
rb_define_singleton_method(cBN, "rand_range", ossl_bn_s_rand_range, 1);
- rb_define_singleton_method(cBN, "pseudo_rand_range", ossl_bn_s_pseudo_rand_range, 1);
+ rb_define_alias(rb_singleton_class(cBN), "pseudo_rand", "rand");
+ rb_define_alias(rb_singleton_class(cBN), "pseudo_rand_range", "rand_range");
rb_define_singleton_method(cBN, "generate_prime", ossl_bn_s_generate_prime, -1);
rb_define_method(cBN, "prime?", ossl_bn_is_prime, -1);
@@ -1173,6 +1295,23 @@ Init_ossl_bn(void)
/* lshift1 - DON'T IMPL. */
/* rshift1 - DON'T IMPL. */
+ rb_define_method(cBN, "get_flags", ossl_bn_get_flags, 1);
+ rb_define_method(cBN, "set_flags", ossl_bn_set_flags, 1);
+
+#ifdef BN_FLG_CONSTTIME
+ rb_define_const(cBN, "CONSTTIME", INT2NUM(BN_FLG_CONSTTIME));
+#endif
+ /* BN_FLG_MALLOCED and BN_FLG_STATIC_DATA seems for C programming.
+ * Allowing them leads to memory leak.
+ * So, for now, they are not exported
+#ifdef BN_FLG_MALLOCED
+ rb_define_const(cBN, "MALLOCED", INT2NUM(BN_FLG_MALLOCED));
+#endif
+#ifdef BN_FLG_STATIC_DATA
+ rb_define_const(cBN, "STATIC_DATA", INT2NUM(BN_FLG_STATIC_DATA));
+#endif
+ */
+
/*
* bn2bin
* bin2bn
diff --git a/ext/openssl/ossl_bn.h b/ext/openssl/ossl_bn.h
index a19ba19487..1cc041fc22 100644
--- a/ext/openssl/ossl_bn.h
+++ b/ext/openssl/ossl_bn.h
@@ -13,7 +13,8 @@
extern VALUE cBN;
extern VALUE eBNError;
-extern BN_CTX *ossl_bn_ctx;
+BN_CTX *ossl_bn_ctx_get(void);
+#define ossl_bn_ctx ossl_bn_ctx_get()
#define GetBNPtr(obj) ossl_bn_value_ptr(&(obj))
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 0840c84a71..cb8fbc3ca2 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -104,7 +104,7 @@ ossl_cipher_alloc(VALUE klass)
* call-seq:
* Cipher.new(string) -> cipher
*
- * The string must be a valid cipher name like "AES-128-CBC" or "3DES".
+ * The string must contain a valid cipher name like "aes-256-cbc".
*
* A list of cipher names is available by calling OpenSSL::Cipher.ciphers.
*/
@@ -149,11 +149,11 @@ ossl_cipher_copy(VALUE self, VALUE other)
return self;
}
-static void*
-add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary)
+static void
+add_cipher_name_to_ary(const OBJ_NAME *name, void *arg)
{
+ VALUE ary = (VALUE)arg;
rb_ary_push(ary, rb_str_new2(name->name));
- return NULL;
}
/*
@@ -169,7 +169,7 @@ ossl_s_ciphers(VALUE self)
ary = rb_ary_new();
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
- (void(*)(const OBJ_NAME*,void*))add_cipher_name_to_ary,
+ add_cipher_name_to_ary,
(void*)ary);
return ary;
@@ -237,8 +237,7 @@ ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode)
ossl_raise(eCipherError, NULL);
}
- if (p_key)
- rb_ivar_set(self, id_key_set, Qtrue);
+ rb_ivar_set(self, id_key_set, p_key ? Qtrue : Qfalse);
return self;
}
@@ -385,8 +384,7 @@ ossl_cipher_update(int argc, VALUE *argv, VALUE self)
StringValue(data);
in = (unsigned char *)RSTRING_PTR(data);
- if ((in_len = RSTRING_LEN(data)) == 0)
- ossl_raise(rb_eArgError, "data must not be empty");
+ in_len = RSTRING_LEN(data);
GetCipher(self, ctx);
out_len = in_len+EVP_CIPHER_CTX_block_size(ctx);
if (out_len <= 0) {
@@ -815,6 +813,31 @@ ossl_cipher_block_size(VALUE self)
}
/*
+ * call-seq:
+ * cipher.ccm_data_len = integer -> integer
+ *
+ * Sets the length of the plaintext / ciphertext message that will be
+ * processed in CCM mode. Make sure to call this method after #key= and
+ * #iv= have been set, and before #auth_data=.
+ *
+ * Only call this method after calling Cipher#encrypt or Cipher#decrypt.
+ */
+static VALUE
+ossl_cipher_set_ccm_data_len(VALUE self, VALUE data_len)
+{
+ int in_len, out_len;
+ EVP_CIPHER_CTX *ctx;
+
+ in_len = NUM2INT(data_len);
+
+ GetCipher(self, ctx);
+ if (EVP_CipherUpdate(ctx, NULL, &out_len, NULL, in_len) != 1)
+ ossl_raise(eCipherError, NULL);
+
+ return data_len;
+}
+
+/*
* INIT
*/
void
@@ -850,23 +873,7 @@ Init_ossl_cipher(void)
* individual components name, key length and mode. Either all uppercase
* or all lowercase strings may be used, for example:
*
- * cipher = OpenSSL::Cipher.new('AES-128-CBC')
- *
- * For each algorithm supported, there is a class defined under the
- * Cipher class that goes by the name of the cipher, e.g. to obtain an
- * instance of AES, you could also use
- *
- * # these are equivalent
- * cipher = OpenSSL::Cipher::AES.new(128, :CBC)
- * cipher = OpenSSL::Cipher::AES.new(128, 'CBC')
- * cipher = OpenSSL::Cipher::AES.new('128-CBC')
- *
- * Finally, due to its wide-spread use, there are also extra classes
- * defined for the different key sizes of AES
- *
- * cipher = OpenSSL::Cipher::AES128.new(:CBC)
- * cipher = OpenSSL::Cipher::AES192.new(:CBC)
- * cipher = OpenSSL::Cipher::AES256.new(:CBC)
+ * cipher = OpenSSL::Cipher.new('aes-128-cbc')
*
* === Choosing either encryption or decryption mode
*
@@ -896,7 +903,7 @@ Init_ossl_cipher(void)
* without processing the password further. A simple and secure way to
* create a key for a particular Cipher is
*
- * cipher = OpenSSL::AES256.new(:CFB)
+ * cipher = OpenSSL::Cipher.new('aes-256-cfb')
* cipher.encrypt
* key = cipher.random_key # also sets the generated key on the Cipher
*
@@ -964,14 +971,14 @@ Init_ossl_cipher(void)
*
* data = "Very, very confidential data"
*
- * cipher = OpenSSL::Cipher::AES.new(128, :CBC)
+ * cipher = OpenSSL::Cipher.new('aes-128-cbc')
* cipher.encrypt
* key = cipher.random_key
* iv = cipher.random_iv
*
* encrypted = cipher.update(data) + cipher.final
* ...
- * decipher = OpenSSL::Cipher::AES.new(128, :CBC)
+ * decipher = OpenSSL::Cipher.new('aes-128-cbc')
* decipher.decrypt
* decipher.key = key
* decipher.iv = iv
@@ -1007,7 +1014,7 @@ Init_ossl_cipher(void)
* not to reuse the _key_ and _nonce_ pair. Reusing an nonce ruins the
* security guarantees of GCM mode.
*
- * cipher = OpenSSL::Cipher::AES.new(128, :GCM).encrypt
+ * cipher = OpenSSL::Cipher.new('aes-128-gcm').encrypt
* cipher.key = key
* cipher.iv = nonce
* cipher.auth_data = auth_data
@@ -1023,7 +1030,7 @@ Init_ossl_cipher(void)
* ciphertext with a probability of 1/256.
*
* raise "tag is truncated!" unless tag.bytesize == 16
- * decipher = OpenSSL::Cipher::AES.new(128, :GCM).decrypt
+ * decipher = OpenSSL::Cipher.new('aes-128-gcm').decrypt
* decipher.key = key
* decipher.iv = nonce
* decipher.auth_tag = tag
@@ -1060,6 +1067,7 @@ Init_ossl_cipher(void)
rb_define_method(cCipher, "iv_len", ossl_cipher_iv_length, 0);
rb_define_method(cCipher, "block_size", ossl_cipher_block_size, 0);
rb_define_method(cCipher, "padding=", ossl_cipher_set_padding, 1);
+ rb_define_method(cCipher, "ccm_data_len=", ossl_cipher_set_ccm_data_len, 1);
id_auth_tag_len = rb_intern_const("auth_tag_len");
id_key_set = rb_intern_const("key_set");
diff --git a/ext/openssl/ossl_config.c b/ext/openssl/ossl_config.c
index 28392e208c..0bac027487 100644
--- a/ext/openssl/ossl_config.c
+++ b/ext/openssl/ossl_config.c
@@ -9,81 +9,452 @@
*/
#include "ossl.h"
+static VALUE cConfig, eConfigError;
+
+static void
+nconf_free(void *conf)
+{
+ NCONF_free(conf);
+}
+
+static const rb_data_type_t ossl_config_type = {
+ "OpenSSL/CONF",
+ {
+ 0, nconf_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
+CONF *
+GetConfig(VALUE obj)
+{
+ CONF *conf;
+
+ TypedData_Get_Struct(obj, CONF, &ossl_config_type, conf);
+ if (!conf)
+ rb_raise(rb_eRuntimeError, "CONF is not initialized");
+ return conf;
+}
+
+static VALUE
+config_s_alloc(VALUE klass)
+{
+ VALUE obj;
+ CONF *conf;
+
+ obj = TypedData_Wrap_Struct(klass, &ossl_config_type, 0);
+ conf = NCONF_new(NULL);
+ if (!conf)
+ ossl_raise(eConfigError, "NCONF_new");
+ RTYPEDDATA_DATA(obj) = conf;
+ return obj;
+}
+
+static void
+config_load_bio(CONF *conf, BIO *bio)
+{
+ long eline = -1;
+
+ if (!NCONF_load_bio(conf, bio, &eline)) {
+ BIO_free(bio);
+ if (eline <= 0)
+ ossl_raise(eConfigError, "wrong config format");
+ else
+ ossl_raise(eConfigError, "error in line %ld", eline);
+ }
+ BIO_free(bio);
+
+ /*
+ * Clear the error queue even if it is parsed successfully.
+ * Particularly, when the .include directive refers to a non-existent file,
+ * it is only reported in the error queue.
+ */
+ ossl_clear_error();
+}
/*
- * Classes
- */
-VALUE cConfig;
-/* Document-class: OpenSSL::ConfigError
+ * call-seq:
+ * Config.parse(string) -> OpenSSL::Config
*
- * General error for openssl library configuration files. Including formatting,
- * parsing errors, etc.
+ * Parses a given _string_ as a blob that contains configuration for OpenSSL.
*/
-VALUE eConfigError;
+static VALUE
+config_s_parse(VALUE klass, VALUE str)
+{
+ VALUE obj = config_s_alloc(klass);
+ CONF *conf = GetConfig(obj);
+ BIO *bio;
+
+ bio = ossl_obj2bio(&str);
+ config_load_bio(conf, bio); /* Consumes BIO */
+ return obj;
+}
+
+static VALUE config_get_sections(VALUE self);
+static VALUE config_get_section(VALUE self, VALUE section);
/*
- * Public
+ * call-seq:
+ * Config.parse_config(io) -> hash
+ *
+ * Parses the configuration data read from _io_ and returns the whole content
+ * as a Hash.
*/
+static VALUE
+config_s_parse_config(VALUE klass, VALUE io)
+{
+ VALUE obj, sections, ret;
+ long i;
+
+ obj = config_s_parse(klass, io);
+ sections = config_get_sections(obj);
+ ret = rb_hash_new();
+ for (i = 0; i < RARRAY_LEN(sections); i++) {
+ VALUE section = rb_ary_entry(sections, i);
+ rb_hash_aset(ret, section, config_get_section(obj, section));
+ }
+ return ret;
+}
/*
- * DupConfigPtr is a public C-level function for getting OpenSSL CONF struct
- * from an OpenSSL::Config(eConfig) instance. We decided to implement
- * OpenSSL::Config in Ruby level but we need to pass native CONF struct for
- * some OpenSSL features such as X509V3_EXT_*.
+ * call-seq:
+ * Config.new(filename) -> OpenSSL::Config
+ *
+ * Creates an instance of OpenSSL::Config from the content of the file
+ * specified by _filename_.
+ *
+ * This can be used in contexts like OpenSSL::X509::ExtensionFactory.config=
+ *
+ * This can raise IO exceptions based on the access, or availability of the
+ * file. A ConfigError exception may be raised depending on the validity of
+ * the data being configured.
*/
-CONF *
-DupConfigPtr(VALUE obj)
+static VALUE
+config_initialize(int argc, VALUE *argv, VALUE self)
{
- CONF *conf;
+ CONF *conf = GetConfig(self);
+ VALUE filename;
+
+ /* 0-arguments call has no use-case, but is kept for compatibility */
+ rb_scan_args(argc, argv, "01", &filename);
+ rb_check_frozen(self);
+ if (!NIL_P(filename)) {
+ BIO *bio = BIO_new_file(StringValueCStr(filename), "rb");
+ if (!bio)
+ ossl_raise(eConfigError, "BIO_new_file");
+ config_load_bio(conf, bio); /* Consumes BIO */
+ }
+ return self;
+}
+
+static VALUE
+config_initialize_copy(VALUE self, VALUE other)
+{
+ CONF *conf = GetConfig(self);
VALUE str;
BIO *bio;
- long eline = -1;
- OSSL_Check_Kind(obj, cConfig);
- str = rb_funcall(obj, rb_intern("to_s"), 0);
+ str = rb_funcall(other, rb_intern("to_s"), 0);
+ rb_check_frozen(self);
bio = ossl_obj2bio(&str);
- conf = NCONF_new(NULL);
- if(!conf){
- BIO_free(bio);
- ossl_raise(eConfigError, NULL);
+ config_load_bio(conf, bio); /* Consumes BIO */
+ return self;
+}
+
+/*
+ * call-seq:
+ * config.get_value(section, key) -> string
+ *
+ * Gets the value of _key_ from the given _section_.
+ *
+ * Given the following configurating file being loaded:
+ *
+ * config = OpenSSL::Config.load('foo.cnf')
+ * #=> #<OpenSSL::Config sections=["default"]>
+ * puts config.to_s
+ * #=> [ default ]
+ * # foo=bar
+ *
+ * You can get a specific value from the config if you know the _section_
+ * and _key_ like so:
+ *
+ * config.get_value('default','foo')
+ * #=> "bar"
+ */
+static VALUE
+config_get_value(VALUE self, VALUE section, VALUE key)
+{
+ CONF *conf = GetConfig(self);
+ const char *str, *sectionp;
+
+ StringValueCStr(section);
+ StringValueCStr(key);
+ /* For compatibility; NULL means "default". */
+ sectionp = RSTRING_LEN(section) ? RSTRING_PTR(section) : NULL;
+ str = NCONF_get_string(conf, sectionp, RSTRING_PTR(key));
+ if (!str) {
+ ossl_clear_error();
+ return Qnil;
+ }
+ return rb_str_new_cstr(str);
+}
+
+/*
+ * call-seq:
+ * config[section] -> hash
+ *
+ * Gets all key-value pairs in a specific _section_ from the current
+ * configuration.
+ *
+ * Given the following configurating file being loaded:
+ *
+ * config = OpenSSL::Config.load('foo.cnf')
+ * #=> #<OpenSSL::Config sections=["default"]>
+ * puts config.to_s
+ * #=> [ default ]
+ * # foo=bar
+ *
+ * You can get a hash of the specific section like so:
+ *
+ * config['default']
+ * #=> {"foo"=>"bar"}
+ *
+ */
+static VALUE
+config_get_section(VALUE self, VALUE section)
+{
+ CONF *conf = GetConfig(self);
+ STACK_OF(CONF_VALUE) *sk;
+ int i, entries;
+ VALUE hash;
+
+ hash = rb_hash_new();
+ StringValueCStr(section);
+ if (!(sk = NCONF_get_section(conf, RSTRING_PTR(section)))) {
+ ossl_clear_error();
+ return hash;
}
- if(!NCONF_load_bio(conf, bio, &eline)){
- BIO_free(bio);
- NCONF_free(conf);
- if (eline <= 0)
- ossl_raise(eConfigError, "wrong config format");
- else
- ossl_raise(eConfigError, "error in line %d", eline);
+ entries = sk_CONF_VALUE_num(sk);
+ for (i = 0; i < entries; i++) {
+ CONF_VALUE *entry = sk_CONF_VALUE_value(sk, i);
+ rb_hash_aset(hash, rb_str_new_cstr(entry->name),
+ rb_str_new_cstr(entry->value));
}
- BIO_free(bio);
+ return hash;
+}
- return conf;
+static void
+get_conf_section_doall_arg(CONF_VALUE *cv, VALUE *aryp)
+{
+ if (cv->name)
+ return;
+ rb_ary_push(*aryp, rb_str_new_cstr(cv->section));
}
-/* Document-const: DEFAULT_CONFIG_FILE
+/* IMPLEMENT_LHASH_DOALL_ARG_CONST() requires >= OpenSSL 1.1.0 */
+static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE, VALUE)
+
+/*
+ * call-seq:
+ * config.sections -> array of string
*
- * The default system configuration file for openssl
+ * Get the names of all sections in the current configuration.
*/
+static VALUE
+config_get_sections(VALUE self)
+{
+ CONF *conf = GetConfig(self);
+ VALUE ary;
+
+ ary = rb_ary_new();
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(get_conf_section),
+ &ary);
+ return ary;
+}
+
+static void
+dump_conf_value_doall_arg(CONF_VALUE *cv, VALUE *strp)
+{
+ VALUE str = *strp;
+ STACK_OF(CONF_VALUE) *sk;
+ int i, num;
+
+ if (cv->name)
+ return;
+ sk = (STACK_OF(CONF_VALUE) *)cv->value;
+ num = sk_CONF_VALUE_num(sk);
+ rb_str_cat_cstr(str, "[ ");
+ rb_str_cat_cstr(str, cv->section);
+ rb_str_cat_cstr(str, " ]\n");
+ for (i = 0; i < num; i++){
+ CONF_VALUE *v = sk_CONF_VALUE_value(sk, i);
+ rb_str_cat_cstr(str, v->name ? v->name : "None");
+ rb_str_cat_cstr(str, "=");
+ rb_str_cat_cstr(str, v->value ? v->value : "None");
+ rb_str_cat_cstr(str, "\n");
+ }
+ rb_str_cat_cstr(str, "\n");
+}
+
+static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE, VALUE)
/*
- * INIT
+ * call-seq:
+ * config.to_s -> string
+ *
+ *
+ * Gets the parsable form of the current configuration.
+ *
+ * Given the following configuration being created:
+ *
+ * config = OpenSSL::Config.new
+ * #=> #<OpenSSL::Config sections=[]>
+ * config['default'] = {"foo"=>"bar","baz"=>"buz"}
+ * #=> {"foo"=>"bar", "baz"=>"buz"}
+ * puts config.to_s
+ * #=> [ default ]
+ * # foo=bar
+ * # baz=buz
+ *
+ * You can parse get the serialized configuration using #to_s and then parse
+ * it later:
+ *
+ * serialized_config = config.to_s
+ * # much later...
+ * new_config = OpenSSL::Config.parse(serialized_config)
+ * #=> #<OpenSSL::Config sections=["default"]>
+ * puts new_config
+ * #=> [ default ]
+ * foo=bar
+ * baz=buz
*/
+static VALUE
+config_to_s(VALUE self)
+{
+ CONF *conf = GetConfig(self);
+ VALUE str;
+
+ str = rb_str_new(NULL, 0);
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(dump_conf_value),
+ &str);
+ return str;
+}
+
+static void
+each_conf_value_doall_arg(CONF_VALUE *cv, void *unused)
+{
+ STACK_OF(CONF_VALUE) *sk;
+ VALUE section;
+ int i, num;
+
+ if (cv->name)
+ return;
+ sk = (STACK_OF(CONF_VALUE) *)cv->value;
+ num = sk_CONF_VALUE_num(sk);
+ section = rb_str_new_cstr(cv->section);
+ for (i = 0; i < num; i++){
+ CONF_VALUE *v = sk_CONF_VALUE_value(sk, i);
+ VALUE name = v->name ? rb_str_new_cstr(v->name) : Qnil;
+ VALUE value = v->value ? rb_str_new_cstr(v->value) : Qnil;
+ rb_yield(rb_ary_new3(3, section, name, value));
+ }
+}
+
+static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE, void)
+
+/*
+ * call-seq:
+ * config.each { |section, key, value| }
+ *
+ * Retrieves the section and its pairs for the current configuration.
+ *
+ * config.each do |section, key, value|
+ * # ...
+ * end
+ */
+static VALUE
+config_each(VALUE self)
+{
+ CONF *conf = GetConfig(self);
+
+ RETURN_ENUMERATOR(self, 0, 0);
+
+ lh_doall_arg((_LHASH *)conf->data, LHASH_DOALL_ARG_FN(each_conf_value),
+ NULL);
+ return self;
+}
+
+/*
+ * call-seq:
+ * config.inspect -> string
+ *
+ * String representation of this configuration object, including the class
+ * name and its sections.
+ */
+static VALUE
+config_inspect(VALUE self)
+{
+ VALUE str, ary = config_get_sections(self);
+ const char *cname = rb_class2name(rb_obj_class(self));
+
+ str = rb_str_new_cstr("#<");
+ rb_str_cat_cstr(str, cname);
+ rb_str_cat_cstr(str, " sections=");
+ rb_str_append(str, rb_inspect(ary));
+ rb_str_cat_cstr(str, ">");
+
+ return str;
+}
+
void
Init_ossl_config(void)
{
- char *default_config_file;
+ char *path;
+ VALUE path_str;
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif
- eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
+ /* Document-class: OpenSSL::Config
+ *
+ * Configuration for the openssl library.
+ *
+ * Many system's installation of openssl library will depend on your system
+ * configuration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for
+ * the location of the file for your host.
+ *
+ * See also http://www.openssl.org/docs/apps/config.html
+ */
cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject);
- default_config_file = CONF_get1_default_config_file();
- rb_define_const(cConfig, "DEFAULT_CONFIG_FILE",
- rb_str_new2(default_config_file));
- OPENSSL_free(default_config_file);
- /* methods are defined by openssl/config.rb */
+ /* Document-class: OpenSSL::ConfigError
+ *
+ * General error for openssl library configuration files. Including formatting,
+ * parsing errors, etc.
+ */
+ eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
+
+ rb_include_module(cConfig, rb_mEnumerable);
+ rb_define_singleton_method(cConfig, "parse", config_s_parse, 1);
+ rb_define_singleton_method(cConfig, "parse_config", config_s_parse_config, 1);
+ rb_define_alias(CLASS_OF(cConfig), "load", "new");
+ rb_define_alloc_func(cConfig, config_s_alloc);
+ rb_define_method(cConfig, "initialize", config_initialize, -1);
+ rb_define_method(cConfig, "initialize_copy", config_initialize_copy, 1);
+ rb_define_method(cConfig, "get_value", config_get_value, 2);
+ rb_define_method(cConfig, "[]", config_get_section, 1);
+ rb_define_method(cConfig, "sections", config_get_sections, 0);
+ rb_define_method(cConfig, "to_s", config_to_s, 0);
+ rb_define_method(cConfig, "each", config_each, 0);
+ rb_define_method(cConfig, "inspect", config_inspect, 0);
+
+ /* Document-const: DEFAULT_CONFIG_FILE
+ *
+ * The default system configuration file for OpenSSL.
+ */
+ path = CONF_get1_default_config_file();
+ path_str = ossl_buf2str(path, rb_long2int(strlen(path)));
+ rb_define_const(cConfig, "DEFAULT_CONFIG_FILE", path_str);
}
diff --git a/ext/openssl/ossl_config.h b/ext/openssl/ossl_config.h
index 627d297ba3..4e604f1aed 100644
--- a/ext/openssl/ossl_config.h
+++ b/ext/openssl/ossl_config.h
@@ -7,13 +7,10 @@
* This program is licensed under the same licence as Ruby.
* (See the file 'LICENCE'.)
*/
-#if !defined(_OSSL_CONFIG_H_)
-#define _OSSL_CONFIG_H_
+#ifndef OSSL_CONFIG_H
+#define OSSL_CONFIG_H
-extern VALUE cConfig;
-extern VALUE eConfigError;
-
-CONF* DupConfigPtr(VALUE obj);
+CONF *GetConfig(VALUE obj);
void Init_ossl_config(void);
-#endif /* _OSSL_CONFIG_H_ */
+#endif /* OSSL_CONFIG_H */
diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c
index 112ce33647..fc326ec14a 100644
--- a/ext/openssl/ossl_digest.c
+++ b/ext/openssl/ossl_digest.c
@@ -63,7 +63,7 @@ ossl_evp_get_digestbyname(VALUE obj)
GetDigest(obj, ctx);
- md = EVP_MD_CTX_md(ctx);
+ md = EVP_MD_CTX_get0_md(ctx);
}
return md;
@@ -176,7 +176,7 @@ ossl_digest_reset(VALUE self)
EVP_MD_CTX *ctx;
GetDigest(self, ctx);
- if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL) != 1) {
+ if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_get0_md(ctx), NULL) != 1) {
ossl_raise(eDigestError, "Digest initialization failed.");
}
@@ -192,7 +192,7 @@ ossl_digest_reset(VALUE self)
* be passed individually to the Digest instance.
*
* === Example
- * digest = OpenSSL::Digest::SHA256.new
+ * digest = OpenSSL::Digest.new('SHA256')
* digest.update('First input')
* digest << 'Second input' # equivalent to digest.update('Second input')
* result = digest.digest
@@ -248,7 +248,7 @@ ossl_digest_finish(int argc, VALUE *argv, VALUE self)
* Returns the sn of this Digest algorithm.
*
* === Example
- * digest = OpenSSL::Digest::SHA512.new
+ * digest = OpenSSL::Digest.new('SHA512')
* puts digest.name # => SHA512
*
*/
@@ -259,7 +259,7 @@ ossl_digest_name(VALUE self)
GetDigest(self, ctx);
- return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx)));
+ return rb_str_new_cstr(EVP_MD_name(EVP_MD_CTX_get0_md(ctx)));
}
/*
@@ -270,7 +270,7 @@ ossl_digest_name(VALUE self)
* final message digest result.
*
* === Example
- * digest = OpenSSL::Digest::SHA1.new
+ * digest = OpenSSL::Digest.new('SHA1')
* puts digest.digest_length # => 20
*
*/
@@ -294,7 +294,7 @@ ossl_digest_size(VALUE self)
* consecutively.
*
* === Example
- * digest = OpenSSL::Digest::SHA1.new
+ * digest = OpenSSL::Digest.new('SHA1')
* puts digest.block_length # => 64
*/
static VALUE
@@ -313,8 +313,6 @@ ossl_digest_block_length(VALUE self)
void
Init_ossl_digest(void)
{
- rb_require("digest");
-
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
@@ -348,54 +346,19 @@ Init_ossl_digest(void)
* the integrity of a signed document, it suffices to re-compute the hash
* and verify that it is equal to that in the signature.
*
- * Among the supported message digest algorithms are:
- * * SHA, SHA1, SHA224, SHA256, SHA384 and SHA512
- * * MD2, MD4, MDC2 and MD5
- * * RIPEMD160
- * * DSS, DSS1 (Pseudo algorithms to be used for DSA signatures. DSS is
- * equal to SHA and DSS1 is equal to SHA1)
+ * You can get a list of all digest algorithms supported on your system by
+ * running this command in your terminal:
*
- * For each of these algorithms, there is a sub-class of Digest that
- * can be instantiated as simply as e.g.
+ * openssl list -digest-algorithms
*
- * digest = OpenSSL::Digest::SHA1.new
+ * Among the OpenSSL 1.1.1 supported message digest algorithms are:
+ * * SHA224, SHA256, SHA384, SHA512, SHA512-224 and SHA512-256
+ * * SHA3-224, SHA3-256, SHA3-384 and SHA3-512
+ * * BLAKE2s256 and BLAKE2b512
*
- * === Mapping between Digest class and sn/ln
+ * Each of these algorithms can be instantiated using the name:
*
- * The sn (short names) and ln (long names) are defined in
- * <openssl/object.h> and <openssl/obj_mac.h>. They are textual
- * representations of ASN.1 OBJECT IDENTIFIERs. Each supported digest
- * algorithm has an OBJECT IDENTIFIER associated to it and those again
- * have short/long names assigned to them.
- * E.g. the OBJECT IDENTIFIER for SHA-1 is 1.3.14.3.2.26 and its
- * sn is "SHA1" and its ln is "sha1".
- * ==== MD2
- * * sn: MD2
- * * ln: md2
- * ==== MD4
- * * sn: MD4
- * * ln: md4
- * ==== MD5
- * * sn: MD5
- * * ln: md5
- * ==== SHA
- * * sn: SHA
- * * ln: SHA
- * ==== SHA-1
- * * sn: SHA1
- * * ln: sha1
- * ==== SHA-224
- * * sn: SHA224
- * * ln: sha224
- * ==== SHA-256
- * * sn: SHA256
- * * ln: sha256
- * ==== SHA-384
- * * sn: SHA384
- * * ln: sha384
- * ==== SHA-512
- * * sn: SHA512
- * * ln: sha512
+ * digest = OpenSSL::Digest.new('SHA256')
*
* "Breaking" a message digest algorithm means defying its one-way
* function characteristics, i.e. producing a collision or finding a way
@@ -407,16 +370,16 @@ Init_ossl_digest(void)
*
* === Hashing a file
*
- * data = File.read('document')
- * sha256 = OpenSSL::Digest::SHA256.new
+ * data = File.binread('document')
+ * sha256 = OpenSSL::Digest.new('SHA256')
* digest = sha256.digest(data)
*
* === Hashing several pieces of data at once
*
- * data1 = File.read('file1')
- * data2 = File.read('file2')
- * data3 = File.read('file3')
- * sha256 = OpenSSL::Digest::SHA256.new
+ * data1 = File.binread('file1')
+ * data2 = File.binread('file2')
+ * data3 = File.binread('file3')
+ * sha256 = OpenSSL::Digest.new('SHA256')
* sha256 << data1
* sha256 << data2
* sha256 << data3
@@ -424,15 +387,21 @@ Init_ossl_digest(void)
*
* === Reuse a Digest instance
*
- * data1 = File.read('file1')
- * sha256 = OpenSSL::Digest::SHA256.new
+ * data1 = File.binread('file1')
+ * sha256 = OpenSSL::Digest.new('SHA256')
* digest1 = sha256.digest(data1)
*
- * data2 = File.read('file2')
+ * data2 = File.binread('file2')
* sha256.reset
* digest2 = sha256.digest(data2)
*
*/
+
+ /*
+ * Digest::Class is defined by the digest library. rb_require() cannot be
+ * used here because it bypasses RubyGems.
+ */
+ rb_funcall(Qnil, rb_intern_const("require"), 1, rb_str_new_cstr("digest"));
cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class"));
/* Document-class: OpenSSL::Digest::DigestError
*
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index 5ca0d4ca3f..1abde7f766 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -9,7 +9,8 @@
*/
#include "ossl.h"
-#if !defined(OPENSSL_NO_ENGINE)
+#ifdef OSSL_USE_ENGINE
+# include <openssl/engine.h>
#define NewEngine(klass) \
TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)
@@ -93,9 +94,6 @@ static const rb_data_type_t ossl_engine_type = {
static VALUE
ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
{
-#if !defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES)
- return Qnil;
-#else
VALUE name;
rb_scan_args(argc, argv, "01", &name);
@@ -104,60 +102,53 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
return Qtrue;
}
StringValueCStr(name);
-#ifndef OPENSSL_NO_STATIC_ENGINE
-#if HAVE_ENGINE_LOAD_DYNAMIC
+#ifdef HAVE_ENGINE_LOAD_DYNAMIC
OSSL_ENGINE_LOAD_IF_MATCH(dynamic, DYNAMIC);
#endif
-#if HAVE_ENGINE_LOAD_4758CCA
+#ifndef OPENSSL_NO_STATIC_ENGINE
+#ifdef HAVE_ENGINE_LOAD_4758CCA
OSSL_ENGINE_LOAD_IF_MATCH(4758cca, 4758CCA);
#endif
-#if HAVE_ENGINE_LOAD_AEP
+#ifdef HAVE_ENGINE_LOAD_AEP
OSSL_ENGINE_LOAD_IF_MATCH(aep, AEP);
#endif
-#if HAVE_ENGINE_LOAD_ATALLA
+#ifdef HAVE_ENGINE_LOAD_ATALLA
OSSL_ENGINE_LOAD_IF_MATCH(atalla, ATALLA);
#endif
-#if HAVE_ENGINE_LOAD_CHIL
+#ifdef HAVE_ENGINE_LOAD_CHIL
OSSL_ENGINE_LOAD_IF_MATCH(chil, CHIL);
#endif
-#if HAVE_ENGINE_LOAD_CSWIFT
+#ifdef HAVE_ENGINE_LOAD_CSWIFT
OSSL_ENGINE_LOAD_IF_MATCH(cswift, CSWIFT);
#endif
-#if HAVE_ENGINE_LOAD_NURON
+#ifdef HAVE_ENGINE_LOAD_NURON
OSSL_ENGINE_LOAD_IF_MATCH(nuron, NURON);
#endif
-#if HAVE_ENGINE_LOAD_SUREWARE
+#ifdef HAVE_ENGINE_LOAD_SUREWARE
OSSL_ENGINE_LOAD_IF_MATCH(sureware, SUREWARE);
#endif
-#if HAVE_ENGINE_LOAD_UBSEC
+#ifdef HAVE_ENGINE_LOAD_UBSEC
OSSL_ENGINE_LOAD_IF_MATCH(ubsec, UBSEC);
#endif
-#if HAVE_ENGINE_LOAD_PADLOCK
+#ifdef HAVE_ENGINE_LOAD_PADLOCK
OSSL_ENGINE_LOAD_IF_MATCH(padlock, PADLOCK);
#endif
-#if HAVE_ENGINE_LOAD_CAPI
+#ifdef HAVE_ENGINE_LOAD_CAPI
OSSL_ENGINE_LOAD_IF_MATCH(capi, CAPI);
#endif
-#if HAVE_ENGINE_LOAD_GMP
+#ifdef HAVE_ENGINE_LOAD_GMP
OSSL_ENGINE_LOAD_IF_MATCH(gmp, GMP);
#endif
-#if HAVE_ENGINE_LOAD_GOST
+#ifdef HAVE_ENGINE_LOAD_GOST
OSSL_ENGINE_LOAD_IF_MATCH(gost, GOST);
#endif
-#if HAVE_ENGINE_LOAD_CRYPTODEV
- OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV);
-#endif
-#if HAVE_ENGINE_LOAD_AESNI
- OSSL_ENGINE_LOAD_IF_MATCH(aesni, AESNI);
#endif
-#endif
-#ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO
- OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto, OPENBSD_DEV_CRYPTO);
+#ifdef HAVE_ENGINE_LOAD_CRYPTODEV
+ OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV);
#endif
OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL);
rb_warning("no such builtin loader for `%"PRIsVALUE"'", name);
return Qnil;
-#endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
}
/*
diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c
index 564dcab522..1a5f471a27 100644
--- a/ext/openssl/ossl_hmac.c
+++ b/ext/openssl/ossl_hmac.c
@@ -7,14 +7,12 @@
* This program is licensed under the same licence as Ruby.
* (See the file 'LICENCE'.)
*/
-#if !defined(OPENSSL_NO_HMAC)
-
#include "ossl.h"
#define NewHMAC(klass) \
TypedData_Wrap_Struct((klass), &ossl_hmac_type, 0)
#define GetHMAC(obj, ctx) do { \
- TypedData_Get_Struct((obj), HMAC_CTX, &ossl_hmac_type, (ctx)); \
+ TypedData_Get_Struct((obj), EVP_MD_CTX, &ossl_hmac_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
} \
@@ -36,7 +34,7 @@ VALUE eHMACError;
static void
ossl_hmac_free(void *ctx)
{
- HMAC_CTX_free(ctx);
+ EVP_MD_CTX_free(ctx);
}
static const rb_data_type_t ossl_hmac_type = {
@@ -51,12 +49,12 @@ static VALUE
ossl_hmac_alloc(VALUE klass)
{
VALUE obj;
- HMAC_CTX *ctx;
+ EVP_MD_CTX *ctx;
obj = NewHMAC(klass);
- ctx = HMAC_CTX_new();
+ ctx = EVP_MD_CTX_new();
if (!ctx)
- ossl_raise(eHMACError, NULL);
+ ossl_raise(eHMACError, "EVP_MD_CTX");
RTYPEDDATA_DATA(obj) = ctx;
return obj;
@@ -76,37 +74,49 @@ ossl_hmac_alloc(VALUE klass)
* === Example
*
* key = 'key'
- * digest = OpenSSL::Digest.new('sha1')
- * instance = OpenSSL::HMAC.new(key, digest)
+ * instance = OpenSSL::HMAC.new(key, 'SHA1')
* #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
* instance.class
* #=> OpenSSL::HMAC
*
* === A note about comparisons
*
- * Two instances won't be equal when they're compared, even if they have the
- * same value. Use #to_s or #hexdigest to return the authentication code that
- * the instance represents. For example:
+ * Two instances can be securely compared with #== in constant time:
*
- * other_instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance == other_instance
- * #=> false
- * instance.to_s == other_instance.to_s
- * #=> true
+ * other_instance = OpenSSL::HMAC.new('key', 'SHA1')
+ * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
+ * instance == other_instance
+ * #=> true
*
*/
static VALUE
ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest)
{
- HMAC_CTX *ctx;
+ EVP_MD_CTX *ctx;
+ EVP_PKEY *pkey;
- StringValue(key);
GetHMAC(self, ctx);
- HMAC_Init_ex(ctx, RSTRING_PTR(key), RSTRING_LENINT(key),
- ossl_evp_get_digestbyname(digest), NULL);
+ StringValue(key);
+#ifdef HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY
+ pkey = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL,
+ (unsigned char *)RSTRING_PTR(key),
+ RSTRING_LENINT(key));
+ if (!pkey)
+ ossl_raise(eHMACError, "EVP_PKEY_new_raw_private_key");
+#else
+ pkey = EVP_PKEY_new_mac_key(EVP_PKEY_HMAC, NULL,
+ (unsigned char *)RSTRING_PTR(key),
+ RSTRING_LENINT(key));
+ if (!pkey)
+ ossl_raise(eHMACError, "EVP_PKEY_new_mac_key");
+#endif
+ if (EVP_DigestSignInit(ctx, NULL, ossl_evp_get_digestbyname(digest),
+ NULL, pkey) != 1) {
+ EVP_PKEY_free(pkey);
+ ossl_raise(eHMACError, "EVP_DigestSignInit");
+ }
+ /* Decrement reference counter; EVP_MD_CTX still keeps it */
+ EVP_PKEY_free(pkey);
return self;
}
@@ -114,16 +124,15 @@ ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest)
static VALUE
ossl_hmac_copy(VALUE self, VALUE other)
{
- HMAC_CTX *ctx1, *ctx2;
+ EVP_MD_CTX *ctx1, *ctx2;
rb_check_frozen(self);
if (self == other) return self;
GetHMAC(self, ctx1);
GetHMAC(other, ctx2);
-
- if (!HMAC_CTX_copy(ctx1, ctx2))
- ossl_raise(eHMACError, "HMAC_CTX_copy");
+ if (EVP_MD_CTX_copy(ctx1, ctx2) != 1)
+ ossl_raise(eHMACError, "EVP_MD_CTX_copy");
return self;
}
@@ -148,33 +157,16 @@ ossl_hmac_copy(VALUE self, VALUE other)
static VALUE
ossl_hmac_update(VALUE self, VALUE data)
{
- HMAC_CTX *ctx;
+ EVP_MD_CTX *ctx;
StringValue(data);
GetHMAC(self, ctx);
- HMAC_Update(ctx, (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data));
+ if (EVP_DigestSignUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)) != 1)
+ ossl_raise(eHMACError, "EVP_DigestSignUpdate");
return self;
}
-static void
-hmac_final(HMAC_CTX *ctx, unsigned char *buf, unsigned int *buf_len)
-{
- HMAC_CTX *final;
-
- final = HMAC_CTX_new();
- if (!final)
- ossl_raise(eHMACError, "HMAC_CTX_new");
-
- if (!HMAC_CTX_copy(final, ctx)) {
- HMAC_CTX_free(final);
- ossl_raise(eHMACError, "HMAC_CTX_copy");
- }
-
- HMAC_Final(final, buf, buf_len);
- HMAC_CTX_free(final);
-}
-
/*
* call-seq:
* hmac.digest -> string
@@ -182,7 +174,7 @@ hmac_final(HMAC_CTX *ctx, unsigned char *buf, unsigned int *buf_len)
* Returns the authentication code an instance represents as a binary string.
*
* === Example
- * instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
+ * instance = OpenSSL::HMAC.new('key', 'SHA1')
* #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
* instance.digest
* #=> "\xF4+\xB0\xEE\xB0\x18\xEB\xBDE\x97\xAEr\x13q\x1E\xC6\a`\x84?"
@@ -190,15 +182,16 @@ hmac_final(HMAC_CTX *ctx, unsigned char *buf, unsigned int *buf_len)
static VALUE
ossl_hmac_digest(VALUE self)
{
- HMAC_CTX *ctx;
- unsigned int buf_len;
+ EVP_MD_CTX *ctx;
+ size_t buf_len = EVP_MAX_MD_SIZE;
VALUE ret;
GetHMAC(self, ctx);
ret = rb_str_new(NULL, EVP_MAX_MD_SIZE);
- hmac_final(ctx, (unsigned char *)RSTRING_PTR(ret), &buf_len);
- assert(buf_len <= EVP_MAX_MD_SIZE);
- rb_str_set_len(ret, buf_len);
+ if (EVP_DigestSignFinal(ctx, (unsigned char *)RSTRING_PTR(ret),
+ &buf_len) != 1)
+ ossl_raise(eHMACError, "EVP_DigestSignFinal");
+ rb_str_set_len(ret, (long)buf_len);
return ret;
}
@@ -213,13 +206,14 @@ ossl_hmac_digest(VALUE self)
static VALUE
ossl_hmac_hexdigest(VALUE self)
{
- HMAC_CTX *ctx;
+ EVP_MD_CTX *ctx;
unsigned char buf[EVP_MAX_MD_SIZE];
- unsigned int buf_len;
+ size_t buf_len = EVP_MAX_MD_SIZE;
VALUE ret;
GetHMAC(self, ctx);
- hmac_final(ctx, buf, &buf_len);
+ if (EVP_DigestSignFinal(ctx, buf, &buf_len) != 1)
+ ossl_raise(eHMACError, "EVP_DigestSignFinal");
ret = rb_str_new(NULL, buf_len * 2);
ossl_bin2hex(buf, RSTRING_PTR(ret), buf_len);
@@ -236,7 +230,7 @@ ossl_hmac_hexdigest(VALUE self)
* === Example
*
* data = "The quick brown fox jumps over the lazy dog"
- * instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
+ * instance = OpenSSL::HMAC.new('key', 'SHA1')
* #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
*
* instance.update(data)
@@ -248,85 +242,18 @@ ossl_hmac_hexdigest(VALUE self)
static VALUE
ossl_hmac_reset(VALUE self)
{
- HMAC_CTX *ctx;
+ EVP_MD_CTX *ctx;
+ EVP_PKEY *pkey;
GetHMAC(self, ctx);
- HMAC_Init_ex(ctx, NULL, 0, NULL, NULL);
+ pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx));
+ if (EVP_DigestSignInit(ctx, NULL, EVP_MD_CTX_get0_md(ctx), NULL, pkey) != 1)
+ ossl_raise(eHMACError, "EVP_DigestSignInit");
return self;
}
/*
- * call-seq:
- * HMAC.digest(digest, key, data) -> aString
- *
- * Returns the authentication code as a binary string. The _digest_ parameter
- * specifies the digest algorithm to use. This may be a String representing
- * the algorithm name or an instance of OpenSSL::Digest.
- *
- * === Example
- *
- * key = 'key'
- * data = 'The quick brown fox jumps over the lazy dog'
- *
- * hmac = OpenSSL::HMAC.digest('sha1', key, data)
- * #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9"
- *
- */
-static VALUE
-ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data)
-{
- unsigned char *buf;
- unsigned int buf_len;
-
- StringValue(key);
- StringValue(data);
- buf = HMAC(ossl_evp_get_digestbyname(digest), RSTRING_PTR(key),
- RSTRING_LENINT(key), (unsigned char *)RSTRING_PTR(data),
- RSTRING_LEN(data), NULL, &buf_len);
-
- return rb_str_new((const char *)buf, buf_len);
-}
-
-/*
- * call-seq:
- * HMAC.hexdigest(digest, key, data) -> aString
- *
- * Returns the authentication code as a hex-encoded string. The _digest_
- * parameter specifies the digest algorithm to use. This may be a String
- * representing the algorithm name or an instance of OpenSSL::Digest.
- *
- * === Example
- *
- * key = 'key'
- * data = 'The quick brown fox jumps over the lazy dog'
- *
- * hmac = OpenSSL::HMAC.hexdigest('sha1', key, data)
- * #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
- *
- */
-static VALUE
-ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data)
-{
- unsigned char buf[EVP_MAX_MD_SIZE];
- unsigned int buf_len;
- VALUE ret;
-
- StringValue(key);
- StringValue(data);
-
- if (!HMAC(ossl_evp_get_digestbyname(digest), RSTRING_PTR(key),
- RSTRING_LENINT(key), (unsigned char *)RSTRING_PTR(data),
- RSTRING_LEN(data), buf, &buf_len))
- ossl_raise(eHMACError, "HMAC");
-
- ret = rb_str_new(NULL, buf_len * 2);
- ossl_bin2hex(buf, RSTRING_PTR(ret), buf_len);
-
- return ret;
-}
-
-/*
* INIT
*/
void
@@ -356,11 +283,10 @@ Init_ossl_hmac(void)
*
* === HMAC-SHA256 using incremental interface
*
- * data1 = File.read("file1")
- * data2 = File.read("file2")
+ * data1 = File.binread("file1")
+ * data2 = File.binread("file2")
* key = "key"
- * digest = OpenSSL::Digest::SHA256.new
- * hmac = OpenSSL::HMAC.new(key, digest)
+ * hmac = OpenSSL::HMAC.new(key, 'SHA256')
* hmac << data1
* hmac << data2
* mac = hmac.digest
@@ -370,8 +296,6 @@ Init_ossl_hmac(void)
cHMAC = rb_define_class_under(mOSSL, "HMAC", rb_cObject);
rb_define_alloc_func(cHMAC, ossl_hmac_alloc);
- rb_define_singleton_method(cHMAC, "digest", ossl_hmac_s_digest, 3);
- rb_define_singleton_method(cHMAC, "hexdigest", ossl_hmac_s_hexdigest, 3);
rb_define_method(cHMAC, "initialize", ossl_hmac_initialize, 2);
rb_define_method(cHMAC, "initialize_copy", ossl_hmac_copy, 1);
@@ -384,12 +308,3 @@ Init_ossl_hmac(void)
rb_define_alias(cHMAC, "inspect", "hexdigest");
rb_define_alias(cHMAC, "to_s", "hexdigest");
}
-
-#else /* NO_HMAC */
-# warning >>> OpenSSL is compiled without HMAC support <<<
-void
-Init_ossl_hmac(void)
-{
- rb_warning("HMAC is not available: OpenSSL is compiled without HMAC.");
-}
-#endif /* NO_HMAC */
diff --git a/ext/openssl/ossl_kdf.c b/ext/openssl/ossl_kdf.c
index ee124718b5..0d25a7304b 100644
--- a/ext/openssl/ossl_kdf.c
+++ b/ext/openssl/ossl_kdf.c
@@ -3,7 +3,7 @@
* Copyright (C) 2007, 2017 Ruby/OpenSSL Project Authors
*/
#include "ossl.h"
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
# include <openssl/kdf.h>
#endif
@@ -141,7 +141,7 @@ kdf_scrypt(int argc, VALUE *argv, VALUE self)
}
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
/*
* call-seq:
* KDF.hkdf(ikm, salt:, info:, length:, hash:) -> String
@@ -163,6 +163,14 @@ kdf_scrypt(int argc, VALUE *argv, VALUE self)
* HashLen is the length of the hash function output in octets.
* _hash_::
* The hash function.
+ *
+ * === Example
+ * # The values from https://datatracker.ietf.org/doc/html/rfc5869#appendix-A.1
+ * ikm = ["0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"].pack("H*")
+ * salt = ["000102030405060708090a0b0c"].pack("H*")
+ * info = ["f0f1f2f3f4f5f6f7f8f9"].pack("H*")
+ * p OpenSSL::KDF.hkdf(ikm, salt: salt, info: info, length: 42, hash: "SHA256").unpack1("H*")
+ * # => "3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865"
*/
static VALUE
kdf_hkdf(int argc, VALUE *argv, VALUE self)
@@ -272,7 +280,7 @@ Init_ossl_kdf(void)
* # store this with the generated value
* salt = OpenSSL::Random.random_bytes(16)
* iter = 20_000
- * hash = OpenSSL::Digest::SHA256.new
+ * hash = OpenSSL::Digest.new('SHA256')
* len = hash.digest_length
* # the final value to be stored
* value = OpenSSL::KDF.pbkdf2_hmac(pass, salt: salt, iterations: iter,
@@ -284,24 +292,8 @@ Init_ossl_kdf(void)
* Typically, "==" short-circuits on evaluation, and is therefore
* vulnerable to timing attacks. The proper way is to use a method that
* always takes the same amount of time when comparing two values, thus
- * not leaking any information to potential attackers. To compare two
- * values, the following could be used:
- *
- * def eql_time_cmp(a, b)
- * unless a.length == b.length
- * return false
- * end
- * cmp = b.bytes
- * result = 0
- * a.bytes.each_with_index {|c,i|
- * result |= c ^ cmp[i]
- * }
- * result == 0
- * end
- *
- * Please note that the premature return in case of differing lengths
- * typically does not leak valuable information - when using PBKDF2, the
- * length of the values to be compared is of fixed size.
+ * not leaking any information to potential attackers. To do this, use
+ * +OpenSSL.fixed_length_secure_compare+.
*/
mKDF = rb_define_module_under(mOSSL, "KDF");
/*
@@ -313,7 +305,7 @@ Init_ossl_kdf(void)
#if defined(HAVE_EVP_PBE_SCRYPT)
rb_define_module_function(mKDF, "scrypt", kdf_scrypt, -1);
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
rb_define_module_function(mKDF, "hkdf", kdf_hkdf, -1);
#endif
}
diff --git a/ext/openssl/ossl_ns_spki.c b/ext/openssl/ossl_ns_spki.c
index 6f61e61bf5..9b1147367a 100644
--- a/ext/openssl/ossl_ns_spki.c
+++ b/ext/openssl/ossl_ns_spki.c
@@ -350,7 +350,7 @@ ossl_spki_verify(VALUE self, VALUE key)
* spki = OpenSSL::Netscape::SPKI.new
* spki.challenge = "RandomChallenge"
* spki.public_key = key.public_key
- * spki.sign(key, OpenSSL::Digest::SHA256.new)
+ * spki.sign(key, OpenSSL::Digest.new('SHA256'))
* #send a request containing this to a server generating a certificate
* === Verifying an SPKI request
* request = #...
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index c0237791da..9c8d768d87 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -157,7 +157,7 @@ ossl_ocspcertid_new(OCSP_CERTID *cid)
}
/*
- * OCSP::Resquest
+ * OCSP::Request
*/
static VALUE
ossl_ocspreq_alloc(VALUE klass)
@@ -382,7 +382,7 @@ ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self)
if (!NIL_P(flags))
flg = NUM2INT(flags);
if (NIL_P(digest))
- md = EVP_sha1();
+ md = NULL;
else
md = ossl_evp_get_digestbyname(digest);
if (NIL_P(certs))
@@ -803,7 +803,7 @@ add_status_convert_time(VALUE obj)
* revocation, and must be one of OpenSSL::OCSP::REVOKED_STATUS_* constants.
* _revocation_time_ is the time when the certificate is revoked.
*
- * _this_update_ and _next_update_ indicate the time at which ths status is
+ * _this_update_ and _next_update_ indicate the time at which the status is
* verified to be correct and the time at or before which newer information
* will be available, respectively. _next_update_ is optional.
*
@@ -1033,7 +1033,7 @@ ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self)
if (!NIL_P(flags))
flg = NUM2INT(flags);
if (NIL_P(digest))
- md = EVP_sha1();
+ md = NULL;
else
md = ossl_evp_get_digestbyname(digest);
if (NIL_P(certs))
@@ -1069,55 +1069,7 @@ ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
x509st = GetX509StorePtr(store);
flg = NIL_P(flags) ? 0 : NUM2INT(flags);
x509s = ossl_x509_ary2sk(certs);
-#if (OPENSSL_VERSION_NUMBER < 0x1000202fL) || defined(LIBRESSL_VERSION_NUMBER)
- /*
- * OpenSSL had a bug that it doesn't use the certificates in x509s for
- * verifying the chain. This can be a problem when the response is signed by
- * a certificate issued by an intermediate CA.
- *
- * root_ca
- * |
- * intermediate_ca
- * |-------------|
- * end_entity ocsp_signer
- *
- * When the certificate hierarchy is like this, and the response contains
- * only ocsp_signer certificate, the following code wrongly fails.
- *
- * store = OpenSSL::X509::Store.new; store.add_cert(root_ca)
- * basic_response.verify([intermediate_ca], store)
- *
- * So add the certificates in x509s to the embedded certificates list first.
- *
- * This is fixed in OpenSSL 0.9.8zg, 1.0.0s, 1.0.1n, 1.0.2b. But it still
- * exists in LibreSSL 2.1.10, 2.2.9, 2.3.6, 2.4.1.
- */
- if (!(flg & (OCSP_NOCHAIN | OCSP_NOVERIFY)) &&
- sk_X509_num(x509s) && sk_X509_num(bs->certs)) {
- int i;
-
- bs = ASN1_item_dup(ASN1_ITEM_rptr(OCSP_BASICRESP), bs);
- if (!bs) {
- sk_X509_pop_free(x509s, X509_free);
- ossl_raise(eOCSPError, "ASN1_item_dup");
- }
-
- for (i = 0; i < sk_X509_num(x509s); i++) {
- if (!OCSP_basic_add1_cert(bs, sk_X509_value(x509s, i))) {
- sk_X509_pop_free(x509s, X509_free);
- OCSP_BASICRESP_free(bs);
- ossl_raise(eOCSPError, "OCSP_basic_add1_cert");
- }
- }
- result = OCSP_basic_verify(bs, x509s, x509st, flg);
- OCSP_BASICRESP_free(bs);
- }
- else {
- result = OCSP_basic_verify(bs, x509s, x509st, flg);
- }
-#else
result = OCSP_basic_verify(bs, x509s, x509st, flg);
-#endif
sk_X509_pop_free(x509s, X509_free);
if (result <= 0)
ossl_clear_error();
@@ -1489,13 +1441,15 @@ ossl_ocspcid_initialize_copy(VALUE self, VALUE other)
* call-seq:
* OpenSSL::OCSP::CertificateId.new(subject, issuer, digest = nil) -> certificate_id
* OpenSSL::OCSP::CertificateId.new(der_string) -> certificate_id
+ * OpenSSL::OCSP::CertificateId.new(obj) -> certificate_id
*
* Creates a new OpenSSL::OCSP::CertificateId for the given _subject_ and
* _issuer_ X509 certificates. The _digest_ is a digest algorithm that is used
* to compute the hash values. This defaults to SHA-1.
*
* If only one argument is given, decodes it as DER representation of a
- * certificate ID.
+ * certificate ID or generates certificate ID from the object that responds to
+ * the to_der method.
*/
static VALUE
ossl_ocspcid_initialize(int argc, VALUE *argv, VALUE self)
@@ -1717,7 +1671,7 @@ Init_ossl_ocsp(void)
* subject certificate so the CA knows which certificate we are asking
* about:
*
- * digest = OpenSSL::Digest::SHA1.new
+ * digest = OpenSSL::Digest.new('SHA1')
* certificate_id =
* OpenSSL::OCSP::CertificateId.new subject, issuer, digest
*
@@ -1734,18 +1688,11 @@ Init_ossl_ocsp(void)
* To submit the request to the CA for verification we need to extract the
* OCSP URI from the subject certificate:
*
- * authority_info_access = subject.extensions.find do |extension|
- * extension.oid == 'authorityInfoAccess'
- * end
- *
- * descriptions = authority_info_access.value.split "\n"
- * ocsp = descriptions.find do |description|
- * description.start_with? 'OCSP'
- * end
+ * ocsp_uris = subject.ocsp_uris
*
* require 'uri'
*
- * ocsp_uri = URI ocsp[/URI:(.*)/, 1]
+ * ocsp_uri = URI ocsp_uris[0]
*
* To submit the request we'll POST the request to the OCSP URI (per RFC
* 2560). Note that we only handle HTTP requests and don't handle any
@@ -1792,7 +1739,7 @@ Init_ossl_ocsp(void)
* single_response = basic_response.find_response(certificate_id)
*
* unless single_response
- * raise 'basic_response does not have the status for the certificiate'
+ * raise 'basic_response does not have the status for the certificate'
* end
*
* Then check the validity. A status issued in the future must be rejected.
diff --git a/ext/openssl/ossl_ocsp.h b/ext/openssl/ossl_ocsp.h
index 21e2c99a2e..6d2aac8657 100644
--- a/ext/openssl/ossl_ocsp.h
+++ b/ext/openssl/ossl_ocsp.h
@@ -13,9 +13,9 @@
#if !defined(OPENSSL_NO_OCSP)
extern VALUE mOCSP;
-extern VALUE cOPCSReq;
-extern VALUE cOPCSRes;
-extern VALUE cOPCSBasicRes;
+extern VALUE cOCSPReq;
+extern VALUE cOCSPRes;
+extern VALUE cOCSPBasicRes;
#endif
void Init_ossl_ocsp(void);
diff --git a/ext/openssl/ossl_pkcs12.c b/ext/openssl/ossl_pkcs12.c
index 4566334481..fb947df1d0 100644
--- a/ext/openssl/ossl_pkcs12.c
+++ b/ext/openssl/ossl_pkcs12.c
@@ -149,6 +149,24 @@ ossl_pkcs12_s_create(int argc, VALUE *argv, VALUE self)
return obj;
}
+static VALUE
+ossl_pkey_new_i(VALUE arg)
+{
+ return ossl_pkey_new((EVP_PKEY *)arg);
+}
+
+static VALUE
+ossl_x509_new_i(VALUE arg)
+{
+ return ossl_x509_new((X509 *)arg);
+}
+
+static VALUE
+ossl_x509_sk2ary_i(VALUE arg)
+{
+ return ossl_x509_sk2ary((STACK_OF(X509) *)arg);
+}
+
/*
* call-seq:
* PKCS12.new -> pkcs12
@@ -186,15 +204,15 @@ ossl_pkcs12_initialize(int argc, VALUE *argv, VALUE self)
ossl_raise(ePKCS12Error, "PKCS12_parse");
ERR_pop_to_mark();
if (key) {
- pkey = rb_protect((VALUE (*)(VALUE))ossl_pkey_new, (VALUE)key, &st);
+ pkey = rb_protect(ossl_pkey_new_i, (VALUE)key, &st);
if (st) goto err;
}
if (x509) {
- cert = rb_protect((VALUE (*)(VALUE))ossl_x509_new, (VALUE)x509, &st);
+ cert = rb_protect(ossl_x509_new_i, (VALUE)x509, &st);
if (st) goto err;
}
if (x509s) {
- ca = rb_protect((VALUE (*)(VALUE))ossl_x509_sk2ary, (VALUE)x509s, &st);
+ ca = rb_protect(ossl_x509_sk2ary_i, (VALUE)x509s, &st);
if (st) goto err;
}
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index 28010c81fb..dbe5347639 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -9,21 +9,6 @@
*/
#include "ossl.h"
-#define NewPKCS7(klass) \
- TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0)
-#define SetPKCS7(obj, pkcs7) do { \
- if (!(pkcs7)) { \
- ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
- } \
- RTYPEDDATA_DATA(obj) = (pkcs7); \
-} while (0)
-#define GetPKCS7(obj, pkcs7) do { \
- TypedData_Get_Struct((obj), PKCS7, &ossl_pkcs7_type, (pkcs7)); \
- if (!(pkcs7)) { \
- ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
- } \
-} while (0)
-
#define NewPKCS7si(klass) \
TypedData_Wrap_Struct((klass), &ossl_pkcs7_signer_info_type, 0)
#define SetPKCS7si(obj, p7si) do { \
@@ -75,7 +60,7 @@ ossl_pkcs7_free(void *ptr)
PKCS7_free(ptr);
}
-static const rb_data_type_t ossl_pkcs7_type = {
+const rb_data_type_t ossl_pkcs7_type = {
"OpenSSL/PKCS7",
{
0, ossl_pkcs7_free,
@@ -116,19 +101,24 @@ static const rb_data_type_t ossl_pkcs7_recip_info_type = {
* (MADE PRIVATE UNTIL SOMEBODY WILL NEED THEM)
*/
static PKCS7_SIGNER_INFO *
-ossl_PKCS7_SIGNER_INFO_dup(const PKCS7_SIGNER_INFO *si)
+ossl_PKCS7_SIGNER_INFO_dup(PKCS7_SIGNER_INFO *si)
{
- return (PKCS7_SIGNER_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO,
- (d2i_of_void *)d2i_PKCS7_SIGNER_INFO,
- (char *)si);
+ PKCS7_SIGNER_INFO *si_new = ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO,
+ (d2i_of_void *)d2i_PKCS7_SIGNER_INFO,
+ si);
+ if (si_new && si->pkey) {
+ EVP_PKEY_up_ref(si->pkey);
+ si_new->pkey = si->pkey;
+ }
+ return si_new;
}
static PKCS7_RECIP_INFO *
-ossl_PKCS7_RECIP_INFO_dup(const PKCS7_RECIP_INFO *si)
+ossl_PKCS7_RECIP_INFO_dup(PKCS7_RECIP_INFO *si)
{
- return (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO,
- (d2i_of_void *)d2i_PKCS7_RECIP_INFO,
- (char *)si);
+ return ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO,
+ (d2i_of_void *)d2i_PKCS7_RECIP_INFO,
+ si);
}
static VALUE
@@ -145,19 +135,6 @@ ossl_pkcs7si_new(PKCS7_SIGNER_INFO *p7si)
return obj;
}
-static PKCS7_SIGNER_INFO *
-DupPKCS7SignerPtr(VALUE obj)
-{
- PKCS7_SIGNER_INFO *p7si, *pkcs7;
-
- GetPKCS7si(obj, p7si);
- if (!(pkcs7 = ossl_PKCS7_SIGNER_INFO_dup(p7si))) {
- ossl_raise(ePKCS7Error, NULL);
- }
-
- return pkcs7;
-}
-
static VALUE
ossl_pkcs7ri_new(PKCS7_RECIP_INFO *p7ri)
{
@@ -172,19 +149,6 @@ ossl_pkcs7ri_new(PKCS7_RECIP_INFO *p7ri)
return obj;
}
-static PKCS7_RECIP_INFO *
-DupPKCS7RecipientPtr(VALUE obj)
-{
- PKCS7_RECIP_INFO *p7ri, *pkcs7;
-
- GetPKCS7ri(obj, p7ri);
- if (!(pkcs7 = ossl_PKCS7_RECIP_INFO_dup(p7ri))) {
- ossl_raise(ePKCS7Error, NULL);
- }
-
- return pkcs7;
-}
-
/*
* call-seq:
* PKCS7.read_smime(string) => pkcs7
@@ -366,7 +330,7 @@ ossl_pkcs7_alloc(VALUE klass)
static VALUE
ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self)
{
- PKCS7 *p7, *pkcs = DATA_PTR(self);
+ PKCS7 *p7, *p7_orig = RTYPEDDATA_DATA(self);
BIO *in;
VALUE arg;
@@ -374,19 +338,17 @@ ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self)
return self;
arg = ossl_to_der_if_possible(arg);
in = ossl_obj2bio(&arg);
- p7 = PEM_read_bio_PKCS7(in, &pkcs, NULL, NULL);
+ p7 = d2i_PKCS7_bio(in, NULL);
if (!p7) {
- OSSL_BIO_reset(in);
- p7 = d2i_PKCS7_bio(in, &pkcs);
- if (!p7) {
- BIO_free(in);
- PKCS7_free(pkcs);
- DATA_PTR(self) = NULL;
- ossl_raise(rb_eArgError, "Could not parse the PKCS7");
- }
+ OSSL_BIO_reset(in);
+ p7 = PEM_read_bio_PKCS7(in, NULL, NULL, NULL);
}
- DATA_PTR(self) = pkcs;
BIO_free(in);
+ if (!p7)
+ ossl_raise(rb_eArgError, "Could not parse the PKCS7");
+
+ RTYPEDDATA_DATA(self) = p7;
+ PKCS7_free(p7_orig);
ossl_pkcs7_set_data(self, Qnil);
ossl_pkcs7_set_err_string(self, Qnil);
@@ -536,17 +498,18 @@ static VALUE
ossl_pkcs7_add_signer(VALUE self, VALUE signer)
{
PKCS7 *pkcs7;
- PKCS7_SIGNER_INFO *p7si;
+ PKCS7_SIGNER_INFO *si, *si_new;
- p7si = DupPKCS7SignerPtr(signer); /* NEED TO DUP */
GetPKCS7(self, pkcs7);
- if (!PKCS7_add_signer(pkcs7, p7si)) {
- PKCS7_SIGNER_INFO_free(p7si);
- ossl_raise(ePKCS7Error, "Could not add signer.");
- }
- if (PKCS7_type_is_signed(pkcs7)){
- PKCS7_add_signed_attribute(p7si, NID_pkcs9_contentType,
- V_ASN1_OBJECT, OBJ_nid2obj(NID_pkcs7_data));
+ GetPKCS7si(signer, si);
+
+ si_new = ossl_PKCS7_SIGNER_INFO_dup(si);
+ if (!si_new)
+ ossl_raise(ePKCS7Error, "PKCS7_SIGNER_INFO_dup");
+
+ if (PKCS7_add_signer(pkcs7, si_new) != 1) {
+ PKCS7_SIGNER_INFO_free(si_new);
+ ossl_raise(ePKCS7Error, "PKCS7_add_signer");
}
return self;
@@ -582,13 +545,18 @@ static VALUE
ossl_pkcs7_add_recipient(VALUE self, VALUE recip)
{
PKCS7 *pkcs7;
- PKCS7_RECIP_INFO *ri;
+ PKCS7_RECIP_INFO *ri, *ri_new;
- ri = DupPKCS7RecipientPtr(recip); /* NEED TO DUP */
GetPKCS7(self, pkcs7);
- if (!PKCS7_add_recipient_info(pkcs7, ri)) {
- PKCS7_RECIP_INFO_free(ri);
- ossl_raise(ePKCS7Error, "Could not add recipient.");
+ GetPKCS7ri(recip, ri);
+
+ ri_new = ossl_PKCS7_RECIP_INFO_dup(ri);
+ if (!ri_new)
+ ossl_raise(ePKCS7Error, "PKCS7_RECIP_INFO_dup");
+
+ if (PKCS7_add_recipient_info(pkcs7, ri_new) != 1) {
+ PKCS7_RECIP_INFO_free(ri_new);
+ ossl_raise(ePKCS7Error, "PKCS7_add_recipient_info");
}
return self;
@@ -1088,7 +1056,6 @@ Init_ossl_pkcs7(void)
rb_define_alloc_func(cPKCS7Signer, ossl_pkcs7si_alloc);
rb_define_method(cPKCS7Signer, "initialize", ossl_pkcs7si_initialize,3);
rb_define_method(cPKCS7Signer, "issuer", ossl_pkcs7si_get_issuer, 0);
- rb_define_alias(cPKCS7Signer, "name", "issuer");
rb_define_method(cPKCS7Signer, "serial", ossl_pkcs7si_get_serial,0);
rb_define_method(cPKCS7Signer,"signed_time",ossl_pkcs7si_get_signed_time,0);
diff --git a/ext/openssl/ossl_pkcs7.h b/ext/openssl/ossl_pkcs7.h
index 139e00d640..3e1b094670 100644
--- a/ext/openssl/ossl_pkcs7.h
+++ b/ext/openssl/ossl_pkcs7.h
@@ -10,6 +10,22 @@
#if !defined(_OSSL_PKCS7_H_)
#define _OSSL_PKCS7_H_
+#define NewPKCS7(klass) \
+ TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0)
+#define SetPKCS7(obj, pkcs7) do { \
+ if (!(pkcs7)) { \
+ ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
+ } \
+ RTYPEDDATA_DATA(obj) = (pkcs7); \
+} while (0)
+#define GetPKCS7(obj, pkcs7) do { \
+ TypedData_Get_Struct((obj), PKCS7, &ossl_pkcs7_type, (pkcs7)); \
+ if (!(pkcs7)) { \
+ ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
+ } \
+} while (0)
+
+extern const rb_data_type_t ossl_pkcs7_type;
extern VALUE cPKCS7;
extern VALUE cPKCS7Signer;
extern VALUE cPKCS7Recipient;
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index e1fffb2446..476256679b 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -9,6 +9,10 @@
*/
#include "ossl.h"
+#ifdef OSSL_USE_ENGINE
+# include <openssl/engine.h>
+#endif
+
/*
* Classes
*/
@@ -17,64 +21,6 @@ VALUE cPKey;
VALUE ePKeyError;
static ID id_private_q;
-/*
- * callback for generating keys
- */
-static VALUE
-call_check_ints0(VALUE arg)
-{
- rb_thread_check_ints();
- return Qnil;
-}
-
-static void *
-call_check_ints(void *arg)
-{
- int state;
- rb_protect(call_check_ints0, Qnil, &state);
- return (void *)(VALUE)state;
-}
-
-int
-ossl_generate_cb_2(int p, int n, BN_GENCB *cb)
-{
- VALUE ary;
- struct ossl_generate_cb_arg *arg;
- int state;
-
- arg = (struct ossl_generate_cb_arg *)BN_GENCB_get_arg(cb);
- if (arg->yield) {
- ary = rb_ary_new2(2);
- rb_ary_store(ary, 0, INT2NUM(p));
- rb_ary_store(ary, 1, INT2NUM(n));
-
- /*
- * can be break by raising exception or 'break'
- */
- rb_protect(rb_yield, ary, &state);
- if (state) {
- arg->state = state;
- return 0;
- }
- }
- if (arg->interrupted) {
- arg->interrupted = 0;
- state = (int)(VALUE)rb_thread_call_with_gvl(call_check_ints, NULL);
- if (state) {
- arg->state = state;
- return 0;
- }
- }
- return 1;
-}
-
-void
-ossl_generate_cb_stop(void *ptr)
-{
- struct ossl_generate_cb_arg *arg = (struct ossl_generate_cb_arg *)ptr;
- arg->interrupted = 1;
-}
-
static void
ossl_evp_pkey_free(void *ptr)
{
@@ -93,36 +39,29 @@ const rb_data_type_t ossl_evp_pkey_type = {
};
static VALUE
-pkey_new0(EVP_PKEY *pkey)
+pkey_new0(VALUE arg)
{
- VALUE obj;
- int type;
+ EVP_PKEY *pkey = (EVP_PKEY *)arg;
+ VALUE klass, obj;
- if (!pkey || (type = EVP_PKEY_base_id(pkey)) == EVP_PKEY_NONE)
- ossl_raise(rb_eRuntimeError, "pkey is empty");
-
- switch (type) {
+ switch (EVP_PKEY_base_id(pkey)) {
#if !defined(OPENSSL_NO_RSA)
- case EVP_PKEY_RSA:
- return ossl_rsa_new(pkey);
+ case EVP_PKEY_RSA: klass = cRSA; break;
#endif
#if !defined(OPENSSL_NO_DSA)
- case EVP_PKEY_DSA:
- return ossl_dsa_new(pkey);
+ case EVP_PKEY_DSA: klass = cDSA; break;
#endif
#if !defined(OPENSSL_NO_DH)
- case EVP_PKEY_DH:
- return ossl_dh_new(pkey);
+ case EVP_PKEY_DH: klass = cDH; break;
#endif
#if !defined(OPENSSL_NO_EC)
- case EVP_PKEY_EC:
- return ossl_ec_new(pkey);
+ case EVP_PKEY_EC: klass = cEC; break;
#endif
- default:
- obj = NewPKey(cPKey);
- SetPKey(obj, pkey);
- return obj;
+ default: klass = cPKey; break;
}
+ obj = rb_obj_alloc(klass);
+ RTYPEDDATA_DATA(obj) = pkey;
+ return obj;
}
VALUE
@@ -131,7 +70,7 @@ ossl_pkey_new(EVP_PKEY *pkey)
VALUE obj;
int status;
- obj = rb_protect((VALUE (*)(VALUE))pkey_new0, (VALUE)pkey, &status);
+ obj = rb_protect(pkey_new0, (VALUE)pkey, &status);
if (status) {
EVP_PKEY_free(pkey);
rb_jump_tag(status);
@@ -140,6 +79,114 @@ ossl_pkey_new(EVP_PKEY *pkey)
return obj;
}
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+# include <openssl/decoder.h>
+
+EVP_PKEY *
+ossl_pkey_read_generic(BIO *bio, VALUE pass)
+{
+ void *ppass = (void *)pass;
+ OSSL_DECODER_CTX *dctx;
+ EVP_PKEY *pkey = NULL;
+ int pos = 0, pos2;
+
+ dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", NULL, NULL, 0, NULL, NULL);
+ if (!dctx)
+ goto out;
+ if (OSSL_DECODER_CTX_set_pem_password_cb(dctx, ossl_pem_passwd_cb, ppass) != 1)
+ goto out;
+
+ /* First check DER */
+ if (OSSL_DECODER_from_bio(dctx, bio) == 1)
+ goto out;
+ OSSL_BIO_reset(bio);
+
+ /* Then check PEM; multiple OSSL_DECODER_from_bio() calls may be needed */
+ if (OSSL_DECODER_CTX_set_input_type(dctx, "PEM") != 1)
+ goto out;
+ /*
+ * First check for private key formats. This is to keep compatibility with
+ * ruby/openssl < 3.0 which decoded the following as a private key.
+ *
+ * $ openssl ecparam -name prime256v1 -genkey -outform PEM
+ * -----BEGIN EC PARAMETERS-----
+ * BggqhkjOPQMBBw==
+ * -----END EC PARAMETERS-----
+ * -----BEGIN EC PRIVATE KEY-----
+ * MHcCAQEEIAG8ugBbA5MHkqnZ9ujQF93OyUfL9tk8sxqM5Wv5tKg5oAoGCCqGSM49
+ * AwEHoUQDQgAEVcjhJfkwqh5C7kGuhAf8XaAjVuG5ADwb5ayg/cJijCgs+GcXeedj
+ * 86avKpGH84DXUlB23C/kPt+6fXYlitUmXQ==
+ * -----END EC PRIVATE KEY-----
+ *
+ * While the first PEM block is a proper encoding of ECParameters, thus
+ * OSSL_DECODER_from_bio() would pick it up, ruby/openssl used to return
+ * the latter instead. Existing applications expect this behavior.
+ *
+ * Note that normally, the input is supposed to contain a single decodable
+ * PEM block only, so this special handling should not create a new problem.
+ */
+ OSSL_DECODER_CTX_set_selection(dctx, EVP_PKEY_KEYPAIR);
+ while (1) {
+ if (OSSL_DECODER_from_bio(dctx, bio) == 1)
+ goto out;
+ if (BIO_eof(bio))
+ break;
+ pos2 = BIO_tell(bio);
+ if (pos2 < 0 || pos2 <= pos)
+ break;
+ ossl_clear_error();
+ pos = pos2;
+ }
+
+ OSSL_BIO_reset(bio);
+ OSSL_DECODER_CTX_set_selection(dctx, 0);
+ while (1) {
+ if (OSSL_DECODER_from_bio(dctx, bio) == 1)
+ goto out;
+ if (BIO_eof(bio))
+ break;
+ pos2 = BIO_tell(bio);
+ if (pos2 < 0 || pos2 <= pos)
+ break;
+ ossl_clear_error();
+ pos = pos2;
+ }
+
+ out:
+ OSSL_DECODER_CTX_free(dctx);
+ return pkey;
+}
+#else
+EVP_PKEY *
+ossl_pkey_read_generic(BIO *bio, VALUE pass)
+{
+ void *ppass = (void *)pass;
+ EVP_PKEY *pkey;
+
+ if ((pkey = d2i_PrivateKey_bio(bio, NULL)))
+ goto out;
+ OSSL_BIO_reset(bio);
+ if ((pkey = d2i_PKCS8PrivateKey_bio(bio, NULL, ossl_pem_passwd_cb, ppass)))
+ goto out;
+ OSSL_BIO_reset(bio);
+ if ((pkey = d2i_PUBKEY_bio(bio, NULL)))
+ goto out;
+ OSSL_BIO_reset(bio);
+ /* PEM_read_bio_PrivateKey() also parses PKCS #8 formats */
+ if ((pkey = PEM_read_bio_PrivateKey(bio, NULL, ossl_pem_passwd_cb, ppass)))
+ goto out;
+ OSSL_BIO_reset(bio);
+ if ((pkey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL)))
+ goto out;
+ OSSL_BIO_reset(bio);
+ if ((pkey = PEM_read_bio_Parameters(bio, NULL)))
+ goto out;
+
+ out:
+ return pkey;
+}
+#endif
+
/*
* call-seq:
* OpenSSL::PKey.read(string [, pwd ]) -> PKey
@@ -149,7 +196,7 @@ ossl_pkey_new(EVP_PKEY *pkey)
* instance of the appropriate PKey class.
*
* === Parameters
- * * _string+ is a DER- or PEM-encoded string containing an arbitrary private
+ * * _string_ is a DER- or PEM-encoded string containing an arbitrary private
* or public key.
* * _io_ is an instance of IO containing a DER- or PEM-encoded
* arbitrary private or public key.
@@ -164,30 +211,283 @@ ossl_pkey_new_from_data(int argc, VALUE *argv, VALUE self)
VALUE data, pass;
rb_scan_args(argc, argv, "11", &data, &pass);
- pass = ossl_pem_passwd_value(pass);
-
bio = ossl_obj2bio(&data);
- if (!(pkey = d2i_PrivateKey_bio(bio, NULL))) {
- OSSL_BIO_reset(bio);
- if (!(pkey = PEM_read_bio_PrivateKey(bio, NULL, ossl_pem_passwd_cb, (void *)pass))) {
- OSSL_BIO_reset(bio);
- if (!(pkey = d2i_PUBKEY_bio(bio, NULL))) {
- OSSL_BIO_reset(bio);
- pkey = PEM_read_bio_PUBKEY(bio, NULL, ossl_pem_passwd_cb, (void *)pass);
- }
- }
- }
-
+ pkey = ossl_pkey_read_generic(bio, ossl_pem_passwd_value(pass));
BIO_free(bio);
if (!pkey)
ossl_raise(ePKeyError, "Could not parse PKey");
-
return ossl_pkey_new(pkey);
}
+static VALUE
+pkey_ctx_apply_options_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ctx_v))
+{
+ VALUE key = rb_ary_entry(i, 0), value = rb_ary_entry(i, 1);
+ EVP_PKEY_CTX *ctx = (EVP_PKEY_CTX *)ctx_v;
+
+ if (SYMBOL_P(key))
+ key = rb_sym2str(key);
+ value = rb_String(value);
+
+ if (EVP_PKEY_CTX_ctrl_str(ctx, StringValueCStr(key), StringValueCStr(value)) <= 0)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_ctrl_str(ctx, %+"PRIsVALUE", %+"PRIsVALUE")",
+ key, value);
+ return Qnil;
+}
+
+static VALUE
+pkey_ctx_apply_options0(VALUE args_v)
+{
+ VALUE *args = (VALUE *)args_v;
+ Check_Type(args[1], T_HASH);
+
+ rb_block_call(args[1], rb_intern("each"), 0, NULL,
+ pkey_ctx_apply_options_i, args[0]);
+ return Qnil;
+}
+
+static void
+pkey_ctx_apply_options(EVP_PKEY_CTX *ctx, VALUE options, int *state)
+{
+ VALUE args[2];
+ args[0] = (VALUE)ctx;
+ args[1] = options;
+
+ rb_protect(pkey_ctx_apply_options0, (VALUE)args, state);
+}
+
+struct pkey_blocking_generate_arg {
+ EVP_PKEY_CTX *ctx;
+ EVP_PKEY *pkey;
+ int state;
+ int yield: 1;
+ int genparam: 1;
+ int interrupted: 1;
+};
+
+static VALUE
+pkey_gen_cb_yield(VALUE ctx_v)
+{
+ EVP_PKEY_CTX *ctx = (void *)ctx_v;
+ int i, info_num;
+ VALUE *argv;
+
+ info_num = EVP_PKEY_CTX_get_keygen_info(ctx, -1);
+ argv = ALLOCA_N(VALUE, info_num);
+ for (i = 0; i < info_num; i++)
+ argv[i] = INT2NUM(EVP_PKEY_CTX_get_keygen_info(ctx, i));
+
+ return rb_yield_values2(info_num, argv);
+}
+
+static VALUE
+call_check_ints0(VALUE arg)
+{
+ rb_thread_check_ints();
+ return Qnil;
+}
+
+static void *
+call_check_ints(void *arg)
+{
+ int state;
+ rb_protect(call_check_ints0, Qnil, &state);
+ return (void *)(VALUE)state;
+}
+
+static int
+pkey_gen_cb(EVP_PKEY_CTX *ctx)
+{
+ struct pkey_blocking_generate_arg *arg = EVP_PKEY_CTX_get_app_data(ctx);
+ int state;
+
+ if (arg->yield) {
+ rb_protect(pkey_gen_cb_yield, (VALUE)ctx, &state);
+ if (state) {
+ arg->state = state;
+ return 0;
+ }
+ }
+ if (arg->interrupted) {
+ arg->interrupted = 0;
+ state = (int)(VALUE)rb_thread_call_with_gvl(call_check_ints, NULL);
+ if (state) {
+ arg->state = state;
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static void
+pkey_blocking_gen_stop(void *ptr)
+{
+ struct pkey_blocking_generate_arg *arg = ptr;
+ arg->interrupted = 1;
+}
+
+static void *
+pkey_blocking_gen(void *ptr)
+{
+ struct pkey_blocking_generate_arg *arg = ptr;
+
+ if (arg->genparam && EVP_PKEY_paramgen(arg->ctx, &arg->pkey) <= 0)
+ return NULL;
+ if (!arg->genparam && EVP_PKEY_keygen(arg->ctx, &arg->pkey) <= 0)
+ return NULL;
+ return arg->pkey;
+}
+
+static VALUE
+pkey_generate(int argc, VALUE *argv, VALUE self, int genparam)
+{
+ EVP_PKEY_CTX *ctx;
+ VALUE alg, options;
+ struct pkey_blocking_generate_arg gen_arg = { 0 };
+ int state;
+
+ rb_scan_args(argc, argv, "11", &alg, &options);
+ if (rb_obj_is_kind_of(alg, cPKey)) {
+ EVP_PKEY *base_pkey;
+
+ GetPKey(alg, base_pkey);
+ ctx = EVP_PKEY_CTX_new(base_pkey, NULL/* engine */);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ }
+ else {
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ ctx = EVP_PKEY_CTX_new_from_name(NULL, StringValueCStr(alg), NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new_from_name");
+#else
+ const EVP_PKEY_ASN1_METHOD *ameth;
+ ENGINE *tmpeng;
+ int pkey_id;
+
+ StringValue(alg);
+ ameth = EVP_PKEY_asn1_find_str(&tmpeng, RSTRING_PTR(alg),
+ RSTRING_LENINT(alg));
+ if (!ameth)
+ ossl_raise(ePKeyError, "algorithm %"PRIsVALUE" not found", alg);
+ EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL, ameth);
+#if !defined(OPENSSL_NO_ENGINE)
+ if (tmpeng)
+ ENGINE_finish(tmpeng);
+#endif
+
+ ctx = EVP_PKEY_CTX_new_id(pkey_id, NULL/* engine */);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new_id");
+#endif
+ }
+
+ if (genparam && EVP_PKEY_paramgen_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_paramgen_init");
+ }
+ if (!genparam && EVP_PKEY_keygen_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_keygen_init");
+ }
+
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+
+ gen_arg.genparam = genparam;
+ gen_arg.ctx = ctx;
+ gen_arg.yield = rb_block_given_p();
+ EVP_PKEY_CTX_set_app_data(ctx, &gen_arg);
+ EVP_PKEY_CTX_set_cb(ctx, pkey_gen_cb);
+ if (gen_arg.yield)
+ pkey_blocking_gen(&gen_arg);
+ else
+ rb_thread_call_without_gvl(pkey_blocking_gen, &gen_arg,
+ pkey_blocking_gen_stop, &gen_arg);
+ EVP_PKEY_CTX_free(ctx);
+ if (!gen_arg.pkey) {
+ if (gen_arg.state) {
+ ossl_clear_error();
+ rb_jump_tag(gen_arg.state);
+ }
+ else {
+ ossl_raise(ePKeyError, genparam ? "EVP_PKEY_paramgen" : "EVP_PKEY_keygen");
+ }
+ }
+
+ return ossl_pkey_new(gen_arg.pkey);
+}
+
+/*
+ * call-seq:
+ * OpenSSL::PKey.generate_parameters(algo_name [, options]) -> pkey
+ *
+ * Generates new parameters for the algorithm. _algo_name_ is a String that
+ * represents the algorithm. The optional argument _options_ is a Hash that
+ * specifies the options specific to the algorithm. The order of the options
+ * can be important.
+ *
+ * A block can be passed optionally. The meaning of the arguments passed to
+ * the block varies depending on the implementation of the algorithm. The block
+ * may be called once or multiple times, or may not even be called.
+ *
+ * For the supported options, see the documentation for the 'openssl genpkey'
+ * utility command.
+ *
+ * == Example
+ * pkey = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048)
+ * p pkey.p.num_bits #=> 2048
+ */
+static VALUE
+ossl_pkey_s_generate_parameters(int argc, VALUE *argv, VALUE self)
+{
+ return pkey_generate(argc, argv, self, 1);
+}
+
+/*
+ * call-seq:
+ * OpenSSL::PKey.generate_key(algo_name [, options]) -> pkey
+ * OpenSSL::PKey.generate_key(pkey [, options]) -> pkey
+ *
+ * Generates a new key (pair).
+ *
+ * If a String is given as the first argument, it generates a new random key
+ * for the algorithm specified by the name just as ::generate_parameters does.
+ * If an OpenSSL::PKey::PKey is given instead, it generates a new random key
+ * for the same algorithm as the key, using the parameters the key contains.
+ *
+ * See ::generate_parameters for the details of _options_ and the given block.
+ *
+ * == Example
+ * pkey_params = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048)
+ * pkey_params.priv_key #=> nil
+ * pkey = OpenSSL::PKey.generate_key(pkey_params)
+ * pkey.priv_key #=> #<OpenSSL::BN 6277...
+ */
+static VALUE
+ossl_pkey_s_generate_key(int argc, VALUE *argv, VALUE self)
+{
+ return pkey_generate(argc, argv, self, 0);
+}
+
+/*
+ * TODO: There is no convenient way to check the presence of public key
+ * components on OpenSSL 3.0. But since keys are immutable on 3.0, pkeys without
+ * these should only be created by OpenSSL::PKey.generate_parameters or by
+ * parsing DER-/PEM-encoded string. We would need another flag for that.
+ */
void
ossl_pkey_check_public_key(const EVP_PKEY *pkey)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ if (EVP_PKEY_missing_parameters(pkey))
+ ossl_raise(ePKeyError, "parameters missing");
+#else
void *ptr;
const BIGNUM *n, *e, *pubkey;
@@ -223,6 +523,7 @@ ossl_pkey_check_public_key(const EVP_PKEY *pkey)
return;
}
ossl_raise(ePKeyError, "public key missing");
+#endif
}
EVP_PKEY *
@@ -240,12 +541,19 @@ GetPrivPKeyPtr(VALUE obj)
{
EVP_PKEY *pkey;
- if (rb_funcallv(obj, id_private_q, 0, NULL) != Qtrue) {
- ossl_raise(rb_eArgError, "Private key is needed.");
- }
GetPKey(obj, pkey);
+ if (OSSL_PKEY_IS_PRIVATE(obj))
+ return pkey;
+ /*
+ * The EVP API does not provide a way to check if the EVP_PKEY has private
+ * components. Assuming it does...
+ */
+ if (!rb_respond_to(obj, id_private_q))
+ return pkey;
+ if (RTEST(rb_funcallv(obj, id_private_q, 0, NULL)))
+ return pkey;
- return pkey;
+ rb_raise(rb_eArgError, "private key is needed");
}
EVP_PKEY *
@@ -265,16 +573,7 @@ DupPKeyPtr(VALUE obj)
static VALUE
ossl_pkey_alloc(VALUE klass)
{
- EVP_PKEY *pkey;
- VALUE obj;
-
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- ossl_raise(ePKeyError, NULL);
- }
- SetPKey(obj, pkey);
-
- return obj;
+ return TypedData_Wrap_Struct(klass, &ossl_evp_pkey_type, NULL);
}
/*
@@ -293,119 +592,916 @@ ossl_pkey_initialize(VALUE self)
return self;
}
+#ifdef HAVE_EVP_PKEY_DUP
+static VALUE
+ossl_pkey_initialize_copy(VALUE self, VALUE other)
+{
+ EVP_PKEY *pkey, *pkey_other;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ TypedData_Get_Struct(other, EVP_PKEY, &ossl_evp_pkey_type, pkey_other);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
+ if (pkey_other) {
+ pkey = EVP_PKEY_dup(pkey_other);
+ if (!pkey)
+ ossl_raise(ePKeyError, "EVP_PKEY_dup");
+ RTYPEDDATA_DATA(self) = pkey;
+ }
+ return self;
+}
+#endif
+
+/*
+ * call-seq:
+ * pkey.oid -> string
+ *
+ * Returns the short name of the OID associated with _pkey_.
+ */
+static VALUE
+ossl_pkey_oid(VALUE self)
+{
+ EVP_PKEY *pkey;
+ int nid;
+
+ GetPKey(self, pkey);
+ nid = EVP_PKEY_id(pkey);
+ return rb_str_new_cstr(OBJ_nid2sn(nid));
+}
+
+/*
+ * call-seq:
+ * pkey.inspect -> string
+ *
+ * Returns a string describing the PKey object.
+ */
+static VALUE
+ossl_pkey_inspect(VALUE self)
+{
+ EVP_PKEY *pkey;
+ int nid;
+
+ GetPKey(self, pkey);
+ nid = EVP_PKEY_id(pkey);
+ return rb_sprintf("#<%"PRIsVALUE":%p oid=%s>",
+ rb_class_name(CLASS_OF(self)), (void *)self,
+ OBJ_nid2sn(nid));
+}
+
+/*
+ * call-seq:
+ * pkey.to_text -> string
+ *
+ * Dumps key parameters, public key, and private key components contained in
+ * the key into a human-readable text.
+ *
+ * This is intended for debugging purpose.
+ *
+ * See also the man page EVP_PKEY_print_private(3).
+ */
+static VALUE
+ossl_pkey_to_text(VALUE self)
+{
+ EVP_PKEY *pkey;
+ BIO *bio;
+
+ GetPKey(self, pkey);
+ if (!(bio = BIO_new(BIO_s_mem())))
+ ossl_raise(ePKeyError, "BIO_new");
+
+ if (EVP_PKEY_print_private(bio, pkey, 0, NULL) == 1)
+ goto out;
+ OSSL_BIO_reset(bio);
+ if (EVP_PKEY_print_public(bio, pkey, 0, NULL) == 1)
+ goto out;
+ OSSL_BIO_reset(bio);
+ if (EVP_PKEY_print_params(bio, pkey, 0, NULL) == 1)
+ goto out;
+
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "EVP_PKEY_print_params");
+
+ out:
+ return ossl_membio2str(bio);
+}
+
+VALUE
+ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self, int to_der)
+{
+ EVP_PKEY *pkey;
+ VALUE cipher, pass;
+ const EVP_CIPHER *enc = NULL;
+ BIO *bio;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "02", &cipher, &pass);
+ if (!NIL_P(cipher)) {
+ enc = ossl_evp_get_cipherbyname(cipher);
+ pass = ossl_pem_passwd_value(pass);
+ }
+
+ bio = BIO_new(BIO_s_mem());
+ if (!bio)
+ ossl_raise(ePKeyError, "BIO_new");
+ if (to_der) {
+ if (!i2d_PrivateKey_bio(bio, pkey)) {
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "i2d_PrivateKey_bio");
+ }
+ }
+ else {
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 5, 0)
+ if (!PEM_write_bio_PrivateKey_traditional(bio, pkey, enc, NULL, 0,
+ ossl_pem_passwd_cb,
+ (void *)pass)) {
+#else
+ char pem_str[80];
+ const char *aname;
+
+ EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &aname, pkey->ameth);
+ snprintf(pem_str, sizeof(pem_str), "%s PRIVATE KEY", aname);
+ if (!PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, pem_str, bio,
+ pkey, enc, NULL, 0, ossl_pem_passwd_cb,
+ (void *)pass)) {
+#endif
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "PEM_write_bio_PrivateKey_traditional");
+ }
+ }
+ return ossl_membio2str(bio);
+}
+
+static VALUE
+do_pkcs8_export(int argc, VALUE *argv, VALUE self, int to_der)
+{
+ EVP_PKEY *pkey;
+ VALUE cipher, pass;
+ const EVP_CIPHER *enc = NULL;
+ BIO *bio;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "02", &cipher, &pass);
+ if (argc > 0) {
+ /*
+ * TODO: EncryptedPrivateKeyInfo actually has more options.
+ * Should they be exposed?
+ */
+ enc = ossl_evp_get_cipherbyname(cipher);
+ pass = ossl_pem_passwd_value(pass);
+ }
+
+ bio = BIO_new(BIO_s_mem());
+ if (!bio)
+ ossl_raise(ePKeyError, "BIO_new");
+ if (to_der) {
+ if (!i2d_PKCS8PrivateKey_bio(bio, pkey, enc, NULL, 0,
+ ossl_pem_passwd_cb, (void *)pass)) {
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "i2d_PKCS8PrivateKey_bio");
+ }
+ }
+ else {
+ if (!PEM_write_bio_PKCS8PrivateKey(bio, pkey, enc, NULL, 0,
+ ossl_pem_passwd_cb, (void *)pass)) {
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "PEM_write_bio_PKCS8PrivateKey");
+ }
+ }
+ return ossl_membio2str(bio);
+}
+
+/*
+ * call-seq:
+ * pkey.private_to_der -> string
+ * pkey.private_to_der(cipher, password) -> string
+ *
+ * Serializes the private key to DER-encoded PKCS #8 format. If called without
+ * arguments, unencrypted PKCS #8 PrivateKeyInfo format is used. If called with
+ * a cipher name and a password, PKCS #8 EncryptedPrivateKeyInfo format with
+ * PBES2 encryption scheme is used.
+ */
+static VALUE
+ossl_pkey_private_to_der(int argc, VALUE *argv, VALUE self)
+{
+ return do_pkcs8_export(argc, argv, self, 1);
+}
+
+/*
+ * call-seq:
+ * pkey.private_to_pem -> string
+ * pkey.private_to_pem(cipher, password) -> string
+ *
+ * Serializes the private key to PEM-encoded PKCS #8 format. See #private_to_der
+ * for more details.
+ */
+static VALUE
+ossl_pkey_private_to_pem(int argc, VALUE *argv, VALUE self)
+{
+ return do_pkcs8_export(argc, argv, self, 0);
+}
+
+VALUE
+ossl_pkey_export_spki(VALUE self, int to_der)
+{
+ EVP_PKEY *pkey;
+ BIO *bio;
+
+ GetPKey(self, pkey);
+ bio = BIO_new(BIO_s_mem());
+ if (!bio)
+ ossl_raise(ePKeyError, "BIO_new");
+ if (to_der) {
+ if (!i2d_PUBKEY_bio(bio, pkey)) {
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "i2d_PUBKEY_bio");
+ }
+ }
+ else {
+ if (!PEM_write_bio_PUBKEY(bio, pkey)) {
+ BIO_free(bio);
+ ossl_raise(ePKeyError, "PEM_write_bio_PUBKEY");
+ }
+ }
+ return ossl_membio2str(bio);
+}
+
+/*
+ * call-seq:
+ * pkey.public_to_der -> string
+ *
+ * Serializes the public key to DER-encoded X.509 SubjectPublicKeyInfo format.
+ */
+static VALUE
+ossl_pkey_public_to_der(VALUE self)
+{
+ return ossl_pkey_export_spki(self, 1);
+}
+
+/*
+ * call-seq:
+ * pkey.public_to_pem -> string
+ *
+ * Serializes the public key to PEM-encoded X.509 SubjectPublicKeyInfo format.
+ */
+static VALUE
+ossl_pkey_public_to_pem(VALUE self)
+{
+ return ossl_pkey_export_spki(self, 0);
+}
+
/*
* call-seq:
- * pkey.sign(digest, data) -> String
+ * pkey.compare?(another_pkey) -> true | false
*
- * To sign the String _data_, _digest_, an instance of OpenSSL::Digest, must
- * be provided. The return value is again a String containing the signature.
- * A PKeyError is raised should errors occur.
- * Any previous state of the Digest instance is irrelevant to the signature
- * outcome, the digest instance is reset to its initial state during the
- * operation.
+ * Used primarily to check if an OpenSSL::X509::Certificate#public_key compares to its private key.
*
* == Example
- * data = 'Sign me!'
- * digest = OpenSSL::Digest::SHA256.new
- * pkey = OpenSSL::PKey::RSA.new(2048)
- * signature = pkey.sign(digest, data)
+ * x509 = OpenSSL::X509::Certificate.new(pem_encoded_certificate)
+ * rsa_key = OpenSSL::PKey::RSA.new(pem_encoded_private_key)
+ *
+ * rsa_key.compare?(x509.public_key) => true | false
*/
static VALUE
-ossl_pkey_sign(VALUE self, VALUE digest, VALUE data)
+ossl_pkey_compare(VALUE self, VALUE other)
+{
+ int ret;
+ EVP_PKEY *selfPKey;
+ EVP_PKEY *otherPKey;
+
+ GetPKey(self, selfPKey);
+ GetPKey(other, otherPKey);
+
+ /* Explicitly check the key type given EVP_PKEY_ASN1_METHOD(3)
+ * docs param_cmp could return any negative number.
+ */
+ if (EVP_PKEY_id(selfPKey) != EVP_PKEY_id(otherPKey))
+ ossl_raise(rb_eTypeError, "cannot match different PKey types");
+
+ ret = EVP_PKEY_eq(selfPKey, otherPKey);
+
+ if (ret == 0)
+ return Qfalse;
+ else if (ret == 1)
+ return Qtrue;
+ else
+ ossl_raise(ePKeyError, "EVP_PKEY_eq");
+}
+
+/*
+ * call-seq:
+ * pkey.sign(digest, data [, options]) -> string
+ *
+ * Hashes and signs the +data+ using a message digest algorithm +digest+ and
+ * a private key +pkey+.
+ *
+ * See #verify for the verification operation.
+ *
+ * See also the man page EVP_DigestSign(3).
+ *
+ * +digest+::
+ * A String that represents the message digest algorithm name, or +nil+
+ * if the PKey type requires no digest algorithm.
+ * For backwards compatibility, this can be an instance of OpenSSL::Digest.
+ * Its state will not affect the signature.
+ * +data+::
+ * A String. The data to be hashed and signed.
+ * +options+::
+ * A Hash that contains algorithm specific control operations to \OpenSSL.
+ * See OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details.
+ * +options+ parameter was added in version 3.0.
+ *
+ * Example:
+ * data = "Sign me!"
+ * pkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048)
+ * signopts = { rsa_padding_mode: "pss" }
+ * signature = pkey.sign("SHA256", data, signopts)
+ *
+ * # Creates a copy of the RSA key pkey, but without the private components
+ * pub_key = pkey.public_key
+ * puts pub_key.verify("SHA256", signature, data, signopts) # => true
+ */
+static VALUE
+ossl_pkey_sign(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
- const EVP_MD *md;
+ VALUE digest, data, options, sig;
+ const EVP_MD *md = NULL;
EVP_MD_CTX *ctx;
- unsigned int buf_len;
- VALUE str;
- int result;
+ EVP_PKEY_CTX *pctx;
+ size_t siglen;
+ int state;
pkey = GetPrivPKeyPtr(self);
- md = ossl_evp_get_digestbyname(digest);
+ rb_scan_args(argc, argv, "21", &digest, &data, &options);
+ if (!NIL_P(digest))
+ md = ossl_evp_get_digestbyname(digest);
StringValue(data);
- str = rb_str_new(0, EVP_PKEY_size(pkey));
ctx = EVP_MD_CTX_new();
if (!ctx)
- ossl_raise(ePKeyError, "EVP_MD_CTX_new");
- if (!EVP_SignInit_ex(ctx, md, NULL)) {
- EVP_MD_CTX_free(ctx);
- ossl_raise(ePKeyError, "EVP_SignInit_ex");
+ ossl_raise(ePKeyError, "EVP_MD_CTX_new");
+ if (EVP_DigestSignInit(ctx, &pctx, md, /* engine */NULL, pkey) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSignInit");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(pctx, options, &state);
+ if (state) {
+ EVP_MD_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+#if OSSL_OPENSSL_PREREQ(1, 1, 1) || OSSL_LIBRESSL_PREREQ(3, 4, 0)
+ if (EVP_DigestSign(ctx, NULL, &siglen, (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSign");
+ }
+ if (siglen > LONG_MAX) {
+ EVP_MD_CTX_free(ctx);
+ rb_raise(ePKeyError, "signature would be too large");
}
- if (!EVP_SignUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data))) {
- EVP_MD_CTX_free(ctx);
- ossl_raise(ePKeyError, "EVP_SignUpdate");
+ sig = ossl_str_new(NULL, (long)siglen, &state);
+ if (state) {
+ EVP_MD_CTX_free(ctx);
+ rb_jump_tag(state);
}
- result = EVP_SignFinal(ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey);
+ if (EVP_DigestSign(ctx, (unsigned char *)RSTRING_PTR(sig), &siglen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSign");
+ }
+#else
+ if (EVP_DigestSignUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSignUpdate");
+ }
+ if (EVP_DigestSignFinal(ctx, NULL, &siglen) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSignFinal");
+ }
+ if (siglen > LONG_MAX) {
+ EVP_MD_CTX_free(ctx);
+ rb_raise(ePKeyError, "signature would be too large");
+ }
+ sig = ossl_str_new(NULL, (long)siglen, &state);
+ if (state) {
+ EVP_MD_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_DigestSignFinal(ctx, (unsigned char *)RSTRING_PTR(sig),
+ &siglen) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestSignFinal");
+ }
+#endif
EVP_MD_CTX_free(ctx);
- if (!result)
- ossl_raise(ePKeyError, "EVP_SignFinal");
- rb_str_set_len(str, buf_len);
-
- return str;
+ rb_str_set_len(sig, siglen);
+ return sig;
}
/*
- * call-seq:
- * pkey.verify(digest, signature, data) -> String
+ * call-seq:
+ * pkey.verify(digest, signature, data [, options]) -> true or false
*
- * To verify the String _signature_, _digest_, an instance of
- * OpenSSL::Digest, must be provided to re-compute the message digest of the
- * original _data_, also a String. The return value is +true+ if the
- * signature is valid, +false+ otherwise. A PKeyError is raised should errors
- * occur.
- * Any previous state of the Digest instance is irrelevant to the validation
- * outcome, the digest instance is reset to its initial state during the
- * operation.
+ * Verifies the +signature+ for the +data+ using a message digest algorithm
+ * +digest+ and a public key +pkey+.
*
- * == Example
- * data = 'Sign me!'
- * digest = OpenSSL::Digest::SHA256.new
- * pkey = OpenSSL::PKey::RSA.new(2048)
- * signature = pkey.sign(digest, data)
- * pub_key = pkey.public_key
- * puts pub_key.verify(digest, signature, data) # => true
+ * Returns +true+ if the signature is successfully verified, +false+ otherwise.
+ * The caller must check the return value.
+ *
+ * See #sign for the signing operation and an example.
+ *
+ * See also the man page EVP_DigestVerify(3).
+ *
+ * +digest+::
+ * See #sign.
+ * +signature+::
+ * A String containing the signature to be verified.
+ * +data+::
+ * See #sign.
+ * +options+::
+ * See #sign. +options+ parameter was added in version 3.0.
*/
static VALUE
-ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
+ossl_pkey_verify(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
- const EVP_MD *md;
+ VALUE digest, sig, data, options;
+ const EVP_MD *md = NULL;
EVP_MD_CTX *ctx;
- int siglen, result;
+ EVP_PKEY_CTX *pctx;
+ int state, ret;
GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "31", &digest, &sig, &data, &options);
ossl_pkey_check_public_key(pkey);
- md = ossl_evp_get_digestbyname(digest);
+ if (!NIL_P(digest))
+ md = ossl_evp_get_digestbyname(digest);
StringValue(sig);
- siglen = RSTRING_LENINT(sig);
StringValue(data);
ctx = EVP_MD_CTX_new();
if (!ctx)
- ossl_raise(ePKeyError, "EVP_MD_CTX_new");
- if (!EVP_VerifyInit_ex(ctx, md, NULL)) {
- EVP_MD_CTX_free(ctx);
- ossl_raise(ePKeyError, "EVP_VerifyInit_ex");
+ ossl_raise(ePKeyError, "EVP_MD_CTX_new");
+ if (EVP_DigestVerifyInit(ctx, &pctx, md, /* engine */NULL, pkey) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestVerifyInit");
}
- if (!EVP_VerifyUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data))) {
- EVP_MD_CTX_free(ctx);
- ossl_raise(ePKeyError, "EVP_VerifyUpdate");
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(pctx, options, &state);
+ if (state) {
+ EVP_MD_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
}
- result = EVP_VerifyFinal(ctx, (unsigned char *)RSTRING_PTR(sig), siglen, pkey);
+#if OSSL_OPENSSL_PREREQ(1, 1, 1) || OSSL_LIBRESSL_PREREQ(3, 4, 0)
+ ret = EVP_DigestVerify(ctx, (unsigned char *)RSTRING_PTR(sig),
+ RSTRING_LEN(sig), (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data));
EVP_MD_CTX_free(ctx);
- switch (result) {
- case 0:
- ossl_clear_error();
- return Qfalse;
- case 1:
- return Qtrue;
- default:
- ossl_raise(ePKeyError, "EVP_VerifyFinal");
+ if (ret < 0)
+ ossl_raise(ePKeyError, "EVP_DigestVerify");
+#else
+ if (EVP_DigestVerifyUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)) < 1) {
+ EVP_MD_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_DigestVerifyUpdate");
+ }
+ ret = EVP_DigestVerifyFinal(ctx, (unsigned char *)RSTRING_PTR(sig),
+ RSTRING_LEN(sig));
+ EVP_MD_CTX_free(ctx);
+ if (ret < 0)
+ ossl_raise(ePKeyError, "EVP_DigestVerifyFinal");
+#endif
+ if (ret)
+ return Qtrue;
+ else {
+ ossl_clear_error();
+ return Qfalse;
}
}
/*
+ * call-seq:
+ * pkey.sign_raw(digest, data [, options]) -> string
+ *
+ * Signs +data+ using a private key +pkey+. Unlike #sign, +data+ will not be
+ * hashed by +digest+ automatically.
+ *
+ * See #verify_raw for the verification operation.
+ *
+ * Added in version 3.0. See also the man page EVP_PKEY_sign(3).
+ *
+ * +digest+::
+ * A String that represents the message digest algorithm name, or +nil+
+ * if the PKey type requires no digest algorithm.
+ * Although this method will not hash +data+ with it, this parameter may still
+ * be required depending on the signature algorithm.
+ * +data+::
+ * A String. The data to be signed.
+ * +options+::
+ * A Hash that contains algorithm specific control operations to \OpenSSL.
+ * See OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details.
+ *
+ * Example:
+ * data = "Sign me!"
+ * hash = OpenSSL::Digest.digest("SHA256", data)
+ * pkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048)
+ * signopts = { rsa_padding_mode: "pss" }
+ * signature = pkey.sign_raw("SHA256", hash, signopts)
+ *
+ * # Creates a copy of the RSA key pkey, but without the private components
+ * pub_key = pkey.public_key
+ * puts pub_key.verify_raw("SHA256", signature, hash, signopts) # => true
+ */
+static VALUE
+ossl_pkey_sign_raw(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey;
+ VALUE digest, data, options, sig;
+ const EVP_MD *md = NULL;
+ EVP_PKEY_CTX *ctx;
+ size_t outlen;
+ int state;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "21", &digest, &data, &options);
+ if (!NIL_P(digest))
+ md = ossl_evp_get_digestbyname(digest);
+ StringValue(data);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_sign_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_sign_init");
+ }
+ if (md && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_set_signature_md");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+ if (EVP_PKEY_sign(ctx, NULL, &outlen, (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_sign");
+ }
+ if (outlen > LONG_MAX) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_raise(ePKeyError, "signature would be too large");
+ }
+ sig = ossl_str_new(NULL, (long)outlen, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_PKEY_sign(ctx, (unsigned char *)RSTRING_PTR(sig), &outlen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_sign");
+ }
+ EVP_PKEY_CTX_free(ctx);
+ rb_str_set_len(sig, outlen);
+ return sig;
+}
+
+/*
+ * call-seq:
+ * pkey.verify_raw(digest, signature, data [, options]) -> true or false
+ *
+ * Verifies the +signature+ for the +data+ using a public key +pkey+. Unlike
+ * #verify, this method will not hash +data+ with +digest+ automatically.
+ *
+ * Returns +true+ if the signature is successfully verified, +false+ otherwise.
+ * The caller must check the return value.
+ *
+ * See #sign_raw for the signing operation and an example code.
+ *
+ * Added in version 3.0. See also the man page EVP_PKEY_verify(3).
+ *
+ * +signature+::
+ * A String containing the signature to be verified.
+ */
+static VALUE
+ossl_pkey_verify_raw(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey;
+ VALUE digest, sig, data, options;
+ const EVP_MD *md = NULL;
+ EVP_PKEY_CTX *ctx;
+ int state, ret;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "31", &digest, &sig, &data, &options);
+ ossl_pkey_check_public_key(pkey);
+ if (!NIL_P(digest))
+ md = ossl_evp_get_digestbyname(digest);
+ StringValue(sig);
+ StringValue(data);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_verify_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_verify_init");
+ }
+ if (md && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_set_signature_md");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+ ret = EVP_PKEY_verify(ctx, (unsigned char *)RSTRING_PTR(sig),
+ RSTRING_LEN(sig),
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data));
+ EVP_PKEY_CTX_free(ctx);
+ if (ret < 0)
+ ossl_raise(ePKeyError, "EVP_PKEY_verify");
+
+ if (ret)
+ return Qtrue;
+ else {
+ ossl_clear_error();
+ return Qfalse;
+ }
+}
+
+/*
+ * call-seq:
+ * pkey.verify_recover(digest, signature [, options]) -> string
+ *
+ * Recovers the signed data from +signature+ using a public key +pkey+. Not all
+ * signature algorithms support this operation.
+ *
+ * Added in version 3.0. See also the man page EVP_PKEY_verify_recover(3).
+ *
+ * +signature+::
+ * A String containing the signature to be verified.
+ */
+static VALUE
+ossl_pkey_verify_recover(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey;
+ VALUE digest, sig, options, out;
+ const EVP_MD *md = NULL;
+ EVP_PKEY_CTX *ctx;
+ int state;
+ size_t outlen;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "21", &digest, &sig, &options);
+ ossl_pkey_check_public_key(pkey);
+ if (!NIL_P(digest))
+ md = ossl_evp_get_digestbyname(digest);
+ StringValue(sig);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_verify_recover_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_verify_recover_init");
+ }
+ if (md && EVP_PKEY_CTX_set_signature_md(ctx, md) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_set_signature_md");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+ if (EVP_PKEY_verify_recover(ctx, NULL, &outlen,
+ (unsigned char *)RSTRING_PTR(sig),
+ RSTRING_LEN(sig)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_verify_recover");
+ }
+ out = ossl_str_new(NULL, (long)outlen, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_PKEY_verify_recover(ctx, (unsigned char *)RSTRING_PTR(out), &outlen,
+ (unsigned char *)RSTRING_PTR(sig),
+ RSTRING_LEN(sig)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_verify_recover");
+ }
+ EVP_PKEY_CTX_free(ctx);
+ rb_str_set_len(out, outlen);
+ return out;
+}
+
+/*
+ * call-seq:
+ * pkey.derive(peer_pkey) -> string
+ *
+ * Derives a shared secret from _pkey_ and _peer_pkey_. _pkey_ must contain
+ * the private components, _peer_pkey_ must contain the public components.
+ */
+static VALUE
+ossl_pkey_derive(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey, *peer_pkey;
+ EVP_PKEY_CTX *ctx;
+ VALUE peer_pkey_obj, str;
+ size_t keylen;
+ int state;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "1", &peer_pkey_obj);
+ GetPKey(peer_pkey_obj, peer_pkey);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_derive_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_derive_init");
+ }
+ if (EVP_PKEY_derive_set_peer(ctx, peer_pkey) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_derive_set_peer");
+ }
+ if (EVP_PKEY_derive(ctx, NULL, &keylen) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_derive");
+ }
+ if (keylen > LONG_MAX)
+ rb_raise(ePKeyError, "derived key would be too large");
+ str = ossl_str_new(NULL, (long)keylen, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_PKEY_derive(ctx, (unsigned char *)RSTRING_PTR(str), &keylen) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_derive");
+ }
+ EVP_PKEY_CTX_free(ctx);
+ rb_str_set_len(str, keylen);
+ return str;
+}
+
+/*
+ * call-seq:
+ * pkey.encrypt(data [, options]) -> string
+ *
+ * Performs a public key encryption operation using +pkey+.
+ *
+ * See #decrypt for the reverse operation.
+ *
+ * Added in version 3.0. See also the man page EVP_PKEY_encrypt(3).
+ *
+ * +data+::
+ * A String to be encrypted.
+ * +options+::
+ * A Hash that contains algorithm specific control operations to \OpenSSL.
+ * See OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for details.
+ *
+ * Example:
+ * pkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048)
+ * data = "secret data"
+ * encrypted = pkey.encrypt(data, rsa_padding_mode: "oaep")
+ * decrypted = pkey.decrypt(data, rsa_padding_mode: "oaep")
+ * p decrypted #=> "secret data"
+ */
+static VALUE
+ossl_pkey_encrypt(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey;
+ EVP_PKEY_CTX *ctx;
+ VALUE data, options, str;
+ size_t outlen;
+ int state;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "11", &data, &options);
+ StringValue(data);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_encrypt_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_encrypt_init");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+ if (EVP_PKEY_encrypt(ctx, NULL, &outlen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_encrypt");
+ }
+ if (outlen > LONG_MAX) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_raise(ePKeyError, "encrypted data would be too large");
+ }
+ str = ossl_str_new(NULL, (long)outlen, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_PKEY_encrypt(ctx, (unsigned char *)RSTRING_PTR(str), &outlen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_encrypt");
+ }
+ EVP_PKEY_CTX_free(ctx);
+ rb_str_set_len(str, outlen);
+ return str;
+}
+
+/*
+ * call-seq:
+ * pkey.decrypt(data [, options]) -> string
+ *
+ * Performs a public key decryption operation using +pkey+.
+ *
+ * See #encrypt for a description of the parameters and an example.
+ *
+ * Added in version 3.0. See also the man page EVP_PKEY_decrypt(3).
+ */
+static VALUE
+ossl_pkey_decrypt(int argc, VALUE *argv, VALUE self)
+{
+ EVP_PKEY *pkey;
+ EVP_PKEY_CTX *ctx;
+ VALUE data, options, str;
+ size_t outlen;
+ int state;
+
+ GetPKey(self, pkey);
+ rb_scan_args(argc, argv, "11", &data, &options);
+ StringValue(data);
+
+ ctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!ctx)
+ ossl_raise(ePKeyError, "EVP_PKEY_CTX_new");
+ if (EVP_PKEY_decrypt_init(ctx) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_decrypt_init");
+ }
+ if (!NIL_P(options)) {
+ pkey_ctx_apply_options(ctx, options, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ }
+ if (EVP_PKEY_decrypt(ctx, NULL, &outlen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_decrypt");
+ }
+ if (outlen > LONG_MAX) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_raise(ePKeyError, "decrypted data would be too large");
+ }
+ str = ossl_str_new(NULL, (long)outlen, &state);
+ if (state) {
+ EVP_PKEY_CTX_free(ctx);
+ rb_jump_tag(state);
+ }
+ if (EVP_PKEY_decrypt(ctx, (unsigned char *)RSTRING_PTR(str), &outlen,
+ (unsigned char *)RSTRING_PTR(data),
+ RSTRING_LEN(data)) <= 0) {
+ EVP_PKEY_CTX_free(ctx);
+ ossl_raise(ePKeyError, "EVP_PKEY_decrypt");
+ }
+ EVP_PKEY_CTX_free(ctx);
+ rb_str_set_len(str, outlen);
+ return str;
+}
+
+/*
* INIT
*/
void
@@ -488,12 +1584,33 @@ Init_ossl_pkey(void)
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
rb_define_module_function(mPKey, "read", ossl_pkey_new_from_data, -1);
+ rb_define_module_function(mPKey, "generate_parameters", ossl_pkey_s_generate_parameters, -1);
+ rb_define_module_function(mPKey, "generate_key", ossl_pkey_s_generate_key, -1);
rb_define_alloc_func(cPKey, ossl_pkey_alloc);
rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0);
+#ifdef HAVE_EVP_PKEY_DUP
+ rb_define_method(cPKey, "initialize_copy", ossl_pkey_initialize_copy, 1);
+#else
+ rb_undef_method(cPKey, "initialize_copy");
+#endif
+ rb_define_method(cPKey, "oid", ossl_pkey_oid, 0);
+ rb_define_method(cPKey, "inspect", ossl_pkey_inspect, 0);
+ rb_define_method(cPKey, "to_text", ossl_pkey_to_text, 0);
+ rb_define_method(cPKey, "private_to_der", ossl_pkey_private_to_der, -1);
+ rb_define_method(cPKey, "private_to_pem", ossl_pkey_private_to_pem, -1);
+ rb_define_method(cPKey, "public_to_der", ossl_pkey_public_to_der, 0);
+ rb_define_method(cPKey, "public_to_pem", ossl_pkey_public_to_pem, 0);
+ rb_define_method(cPKey, "compare?", ossl_pkey_compare, 1);
- rb_define_method(cPKey, "sign", ossl_pkey_sign, 2);
- rb_define_method(cPKey, "verify", ossl_pkey_verify, 3);
+ rb_define_method(cPKey, "sign", ossl_pkey_sign, -1);
+ rb_define_method(cPKey, "verify", ossl_pkey_verify, -1);
+ rb_define_method(cPKey, "sign_raw", ossl_pkey_sign_raw, -1);
+ rb_define_method(cPKey, "verify_raw", ossl_pkey_verify_raw, -1);
+ rb_define_method(cPKey, "verify_recover", ossl_pkey_verify_recover, -1);
+ rb_define_method(cPKey, "derive", ossl_pkey_derive, -1);
+ rb_define_method(cPKey, "encrypt", ossl_pkey_encrypt, -1);
+ rb_define_method(cPKey, "decrypt", ossl_pkey_decrypt, -1);
id_private_q = rb_intern("private?");
diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h
index 0db59305f7..10669b824c 100644
--- a/ext/openssl/ossl_pkey.h
+++ b/ext/openssl/ossl_pkey.h
@@ -7,27 +7,18 @@
* This program is licensed under the same licence as Ruby.
* (See the file 'LICENCE'.)
*/
-#if !defined(_OSSL_PKEY_H_)
-#define _OSSL_PKEY_H_
+#if !defined(OSSL_PKEY_H)
+#define OSSL_PKEY_H
extern VALUE mPKey;
extern VALUE cPKey;
extern VALUE ePKeyError;
extern const rb_data_type_t ossl_evp_pkey_type;
-#define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue)
-#define OSSL_PKEY_SET_PUBLIC(obj) rb_iv_set((obj), "private", Qfalse)
-#define OSSL_PKEY_IS_PRIVATE(obj) (rb_iv_get((obj), "private") == Qtrue)
+/* For ENGINE */
+#define OSSL_PKEY_SET_PRIVATE(obj) rb_ivar_set((obj), rb_intern("private"), Qtrue)
+#define OSSL_PKEY_IS_PRIVATE(obj) (rb_attr_get((obj), rb_intern("private")) == Qtrue)
-#define NewPKey(klass) \
- TypedData_Wrap_Struct((klass), &ossl_evp_pkey_type, 0)
-#define SetPKey(obj, pkey) do { \
- if (!(pkey)) { \
- rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \
- } \
- RTYPEDDATA_DATA(obj) = (pkey); \
- OSSL_PKEY_SET_PUBLIC(obj); \
-} while (0)
#define GetPKey(obj, pkey) do {\
TypedData_Get_Struct((obj), EVP_PKEY, &ossl_evp_pkey_type, (pkey)); \
if (!(pkey)) { \
@@ -35,19 +26,27 @@ extern const rb_data_type_t ossl_evp_pkey_type;
} \
} while (0)
-struct ossl_generate_cb_arg {
- int yield;
- int interrupted;
- int state;
-};
-int ossl_generate_cb_2(int p, int n, BN_GENCB *cb);
-void ossl_generate_cb_stop(void *ptr);
-
+/* Takes ownership of the EVP_PKEY */
VALUE ossl_pkey_new(EVP_PKEY *);
void ossl_pkey_check_public_key(const EVP_PKEY *);
+EVP_PKEY *ossl_pkey_read_generic(BIO *, VALUE);
EVP_PKEY *GetPKeyPtr(VALUE);
EVP_PKEY *DupPKeyPtr(VALUE);
EVP_PKEY *GetPrivPKeyPtr(VALUE);
+
+/*
+ * Serializes _self_ in X.509 SubjectPublicKeyInfo format and returns the
+ * resulting String. Sub-classes use this when overriding #to_der.
+ */
+VALUE ossl_pkey_export_spki(VALUE self, int to_der);
+/*
+ * Serializes the private key _self_ in the traditional private key format
+ * and returns the resulting String. Sub-classes use this when overriding
+ * #to_der.
+ */
+VALUE ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self,
+ int to_der);
+
void Init_ossl_pkey(void);
/*
@@ -56,7 +55,6 @@ void Init_ossl_pkey(void);
extern VALUE cRSA;
extern VALUE eRSAError;
-VALUE ossl_rsa_new(EVP_PKEY *);
void Init_ossl_rsa(void);
/*
@@ -65,7 +63,6 @@ void Init_ossl_rsa(void);
extern VALUE cDSA;
extern VALUE eDSAError;
-VALUE ossl_dsa_new(EVP_PKEY *);
void Init_ossl_dsa(void);
/*
@@ -74,7 +71,6 @@ void Init_ossl_dsa(void);
extern VALUE cDH;
extern VALUE eDHError;
-VALUE ossl_dh_new(EVP_PKEY *);
void Init_ossl_dh(void);
/*
@@ -96,7 +92,7 @@ void Init_ossl_ec(void);
*/ \
static VALUE ossl_##_keytype##_get_##_name(VALUE self) \
{ \
- _type *obj; \
+ const _type *obj; \
const BIGNUM *bn; \
\
Get##_type(self, obj); \
@@ -120,6 +116,7 @@ static VALUE ossl_##_keytype##_get_##_name(VALUE self) \
OSSL_PKEY_BN_DEF_GETTER0(_keytype, _type, a2, \
_type##_get0_##_group(obj, NULL, &bn))
+#if !OSSL_OPENSSL_PREREQ(3, 0, 0)
#define OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) \
/* \
* call-seq: \
@@ -177,36 +174,22 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
} \
return self; \
}
+#else
+#define OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) \
+static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2, VALUE v3) \
+{ \
+ rb_raise(ePKeyError, \
+ #_keytype"#set_"#_group"= is incompatible with OpenSSL 3.0"); \
+}
-#define OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, _name) \
-/* \
- * call-seq: \
- * _keytype##.##_name = bn -> bn \
- */ \
-static VALUE ossl_##_keytype##_set_##_name(VALUE self, VALUE bignum) \
+#define OSSL_PKEY_BN_DEF_SETTER2(_keytype, _type, _group, a1, a2) \
+static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
{ \
- _type *obj; \
- BIGNUM *bn; \
- \
- rb_warning("#"#_name"= is deprecated; use #set_"#_group); \
- Get##_type(self, obj); \
- if (NIL_P(bignum)) { \
- BN_clear_free(obj->_name); \
- obj->_name = NULL; \
- return Qnil; \
- } \
- \
- bn = GetBNPtr(bignum); \
- if (obj->_name == NULL) \
- obj->_name = BN_new(); \
- if (obj->_name == NULL) \
- ossl_raise(eBNError, NULL); \
- if (BN_copy(obj->_name, bn) == NULL) \
- ossl_raise(eBNError, NULL); \
- return bignum; \
+ rb_raise(ePKeyError, \
+ #_keytype"#set_"#_group"= is incompatible with OpenSSL 3.0"); \
}
+#endif
-#if defined(HAVE_OPAQUE_OPENSSL) /* OpenSSL 1.1.0 */
#define OSSL_PKEY_BN_DEF3(_keytype, _type, _group, a1, a2, a3) \
OSSL_PKEY_BN_DEF_GETTER3(_keytype, _type, _group, a1, a2, a3) \
OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3)
@@ -218,24 +201,4 @@ static VALUE ossl_##_keytype##_set_##_name(VALUE self, VALUE bignum) \
#define DEF_OSSL_PKEY_BN(class, keytype, name) \
rb_define_method((class), #name, ossl_##keytype##_get_##name, 0)
-#else
-#define OSSL_PKEY_BN_DEF3(_keytype, _type, _group, a1, a2, a3) \
- OSSL_PKEY_BN_DEF_GETTER3(_keytype, _type, _group, a1, a2, a3) \
- OSSL_PKEY_BN_DEF_SETTER3(_keytype, _type, _group, a1, a2, a3) \
- OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, a1) \
- OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, a2) \
- OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, a3)
-
-#define OSSL_PKEY_BN_DEF2(_keytype, _type, _group, a1, a2) \
- OSSL_PKEY_BN_DEF_GETTER2(_keytype, _type, _group, a1, a2) \
- OSSL_PKEY_BN_DEF_SETTER2(_keytype, _type, _group, a1, a2) \
- OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, a1) \
- OSSL_PKEY_BN_DEF_SETTER_OLD(_keytype, _type, _group, a2)
-
-#define DEF_OSSL_PKEY_BN(class, keytype, name) do { \
- rb_define_method((class), #name, ossl_##keytype##_get_##name, 0);\
- rb_define_method((class), #name "=", ossl_##keytype##_set_##name, 1);\
-} while (0)
-#endif /* HAVE_OPAQUE_OPENSSL */
-
-#endif /* _OSSL_PKEY_H_ */
+#endif /* OSSL_PKEY_H */
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index bf4e3f9322..83c41378fe 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -30,216 +30,104 @@ VALUE cDH;
VALUE eDHError;
/*
- * Public
- */
-static VALUE
-dh_instance(VALUE klass, DH *dh)
-{
- EVP_PKEY *pkey;
- VALUE obj;
-
- if (!dh) {
- return Qfalse;
- }
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- return Qfalse;
- }
- if (!EVP_PKEY_assign_DH(pkey, dh)) {
- EVP_PKEY_free(pkey);
- return Qfalse;
- }
- SetPKey(obj, pkey);
-
- return obj;
-}
-
-VALUE
-ossl_dh_new(EVP_PKEY *pkey)
-{
- VALUE obj;
-
- if (!pkey) {
- obj = dh_instance(cDH, DH_new());
- } else {
- obj = NewPKey(cDH);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DH) {
- ossl_raise(rb_eTypeError, "Not a DH key!");
- }
- SetPKey(obj, pkey);
- }
- if (obj == Qfalse) {
- ossl_raise(eDHError, NULL);
- }
-
- return obj;
-}
-
-/*
* Private
*/
-struct dh_blocking_gen_arg {
- DH *dh;
- int size;
- int gen;
- BN_GENCB *cb;
- int result;
-};
-
-static void *
-dh_blocking_gen(void *arg)
-{
- struct dh_blocking_gen_arg *gen = (struct dh_blocking_gen_arg *)arg;
- gen->result = DH_generate_parameters_ex(gen->dh, gen->size, gen->gen, gen->cb);
- return 0;
-}
-
-static DH *
-dh_generate(int size, int gen)
-{
- struct ossl_generate_cb_arg cb_arg = { 0 };
- struct dh_blocking_gen_arg gen_arg;
- DH *dh = DH_new();
- BN_GENCB *cb = BN_GENCB_new();
-
- if (!dh || !cb) {
- DH_free(dh);
- BN_GENCB_free(cb);
- return NULL;
- }
-
- if (rb_block_given_p())
- cb_arg.yield = 1;
- BN_GENCB_set(cb, ossl_generate_cb_2, &cb_arg);
- gen_arg.dh = dh;
- gen_arg.size = size;
- gen_arg.gen = gen;
- gen_arg.cb = cb;
- if (cb_arg.yield == 1) {
- /* we cannot release GVL when callback proc is supplied */
- dh_blocking_gen(&gen_arg);
- } else {
- /* there's a chance to unblock */
- rb_thread_call_without_gvl(dh_blocking_gen, &gen_arg, ossl_generate_cb_stop, &cb_arg);
- }
-
- BN_GENCB_free(cb);
- if (!gen_arg.result) {
- DH_free(dh);
- if (cb_arg.state) {
- /* Clear OpenSSL error queue before re-raising. */
- ossl_clear_error();
- rb_jump_tag(cb_arg.state);
- }
- return NULL;
- }
-
- if (!DH_generate_key(dh)) {
- DH_free(dh);
- return NULL;
- }
-
- return dh;
-}
-
-/*
- * call-seq:
- * DH.generate(size [, generator]) -> dh
- *
- * Creates a new DH instance from scratch by generating the private and public
- * components alike.
- *
- * === Parameters
- * * _size_ is an integer representing the desired key size. Keys smaller than 1024 bits should be considered insecure.
- * * _generator_ is a small number > 1, typically 2 or 5.
- *
- */
-static VALUE
-ossl_dh_s_generate(int argc, VALUE *argv, VALUE klass)
-{
- DH *dh ;
- int g = 2;
- VALUE size, gen, obj;
-
- if (rb_scan_args(argc, argv, "11", &size, &gen) == 2) {
- g = NUM2INT(gen);
- }
- dh = dh_generate(NUM2INT(size), g);
- obj = dh_instance(klass, dh);
- if (obj == Qfalse) {
- DH_free(dh);
- ossl_raise(eDHError, NULL);
- }
-
- return obj;
-}
-
/*
* call-seq:
* DH.new -> dh
* DH.new(string) -> dh
* DH.new(size [, generator]) -> dh
*
- * Either generates a DH instance from scratch or by reading already existing
- * DH parameters from _string_. Note that when reading a DH instance from
- * data that was encoded from a DH instance by using DH#to_pem or DH#to_der
- * the result will *not* contain a public/private key pair yet. This needs to
- * be generated using DH#generate_key! first.
+ * Creates a new instance of OpenSSL::PKey::DH.
+ *
+ * If called without arguments, an empty instance without any parameter or key
+ * components is created. Use #set_pqg to manually set the parameters afterwards
+ * (and optionally #set_key to set private and public key components).
+ *
+ * If a String is given, tries to parse it as a DER- or PEM- encoded parameters.
+ * See also OpenSSL::PKey.read which can parse keys of any kinds.
+ *
+ * The DH.new(size [, generator]) form is an alias of DH.generate.
*
- * === Parameters
- * * _size_ is an integer representing the desired key size. Keys smaller than 1024 bits should be considered insecure.
- * * _generator_ is a small number > 1, typically 2 or 5.
- * * _string_ contains the DER or PEM encoded key.
+ * +string+::
+ * A String that contains the DER or PEM encoded key.
+ * +size+::
+ * See DH.generate.
+ * +generator+::
+ * See DH.generate.
*
- * === Examples
- * DH.new # -> dh
- * DH.new(1024) # -> dh
- * DH.new(1024, 5) # -> dh
- * #Reading DH parameters
- * dh = DH.new(File.read('parameters.pem')) # -> dh, but no public/private key yet
- * dh.generate_key! # -> dh with public and private key
+ * Examples:
+ * # Creating an instance from scratch
+ * # Note that this is deprecated and will not work on OpenSSL 3.0 or later.
+ * dh = OpenSSL::PKey::DH.new
+ * dh.set_pqg(bn_p, nil, bn_g)
+ *
+ * # Generating a parameters and a key pair
+ * dh = OpenSSL::PKey::DH.new(2048) # An alias of OpenSSL::PKey::DH.generate(2048)
+ *
+ * # Reading DH parameters
+ * dh_params = OpenSSL::PKey::DH.new(File.read('parameters.pem')) # loads parameters only
+ * dh = OpenSSL::PKey.generate_key(dh_params) # generates a key pair
*/
static VALUE
ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
+ int type;
DH *dh;
- int g = 2;
- BIO *in;
- VALUE arg, gen;
-
- GetPKey(self, pkey);
- if(rb_scan_args(argc, argv, "02", &arg, &gen) == 0) {
- dh = DH_new();
+ BIO *in = NULL;
+ VALUE arg;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
+
+ /* The DH.new(size, generator) form is handled by lib/openssl/pkey.rb */
+ if (rb_scan_args(argc, argv, "01", &arg) == 0) {
+ dh = DH_new();
+ if (!dh)
+ ossl_raise(eDHError, "DH_new");
+ goto legacy;
}
- else if (RB_INTEGER_TYPE_P(arg)) {
- if (!NIL_P(gen)) {
- g = NUM2INT(gen);
- }
- if (!(dh = dh_generate(NUM2INT(arg), g))) {
- ossl_raise(eDHError, NULL);
- }
- }
- else {
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
- dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
- if (!dh){
- OSSL_BIO_reset(in);
- dh = d2i_DHparams_bio(in, NULL);
- }
- BIO_free(in);
- if (!dh) {
- ossl_raise(eDHError, NULL);
- }
+
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /*
+ * On OpenSSL <= 1.1.1 and current versions of LibreSSL, the generic
+ * routine does not support DER-encoded parameters
+ */
+ dh = d2i_DHparams_bio(in, NULL);
+ if (dh)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ pkey = ossl_pkey_read_generic(in, Qnil);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eDHError, "could not parse pkey");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_DH) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDHError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
- if (!EVP_PKEY_assign_DH(pkey, dh)) {
- DH_free(dh);
- ossl_raise(eDHError, NULL);
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DH(pkey, dh) != 1) {
+ EVP_PKEY_free(pkey);
+ DH_free(dh);
+ ossl_raise(eDHError, "EVP_PKEY_assign_DH");
}
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_dh_initialize_copy(VALUE self, VALUE other)
{
@@ -247,15 +135,14 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
DH *dh, *dh_other;
const BIGNUM *pub, *priv;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eDHError, "DH already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetDH(other, dh_other);
dh = DHparams_dup(dh_other);
if (!dh)
ossl_raise(eDHError, "DHparams_dup");
- EVP_PKEY_assign_DH(pkey, dh);
DH_get0_key(dh_other, &pub, &priv);
if (pub) {
@@ -270,8 +157,16 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
DH_set0_key(dh, pub2, priv2);
}
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DH(pkey, dh) != 1) {
+ EVP_PKEY_free(pkey);
+ DH_free(dh);
+ ossl_raise(eDHError, "EVP_PKEY_assign_DH");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -283,7 +178,7 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
static VALUE
ossl_dh_is_public(VALUE self)
{
- DH *dh;
+ OSSL_3_const DH *dh;
const BIGNUM *bn;
GetDH(self, dh);
@@ -302,14 +197,14 @@ ossl_dh_is_public(VALUE self)
static VALUE
ossl_dh_is_private(VALUE self)
{
- DH *dh;
+ OSSL_3_const DH *dh;
const BIGNUM *bn;
GetDH(self, dh);
DH_get0_key(dh, NULL, &bn);
#if !defined(OPENSSL_NO_ENGINE)
- return (bn || DH_get0_engine(dh)) ? Qtrue : Qfalse;
+ return (bn || DH_get0_engine((DH *)dh)) ? Qtrue : Qfalse;
#else
return bn ? Qtrue : Qfalse;
#endif
@@ -328,7 +223,7 @@ ossl_dh_is_private(VALUE self)
static VALUE
ossl_dh_export(VALUE self)
{
- DH *dh;
+ OSSL_3_const DH *dh;
BIO *out;
VALUE str;
@@ -357,7 +252,7 @@ ossl_dh_export(VALUE self)
static VALUE
ossl_dh_to_der(VALUE self)
{
- DH *dh;
+ OSSL_3_const DH *dh;
unsigned char *p;
long len;
VALUE str;
@@ -385,7 +280,7 @@ ossl_dh_to_der(VALUE self)
static VALUE
ossl_dh_get_params(VALUE self)
{
- DH *dh;
+ OSSL_3_const DH *dh;
VALUE hash;
const BIGNUM *p, *q, *g, *pub_key, *priv_key;
@@ -405,151 +300,43 @@ ossl_dh_get_params(VALUE self)
/*
* call-seq:
- * dh.to_text -> aString
- *
- * Prints all parameters of key to buffer
- * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
- * Don't use :-)) (I's up to you)
- */
-static VALUE
-ossl_dh_to_text(VALUE self)
-{
- DH *dh;
- BIO *out;
- VALUE str;
-
- GetDH(self, dh);
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eDHError, NULL);
- }
- if (!DHparams_print(out, dh)) {
- BIO_free(out);
- ossl_raise(eDHError, NULL);
- }
- str = ossl_membio2str(out);
-
- return str;
-}
-
-/*
- * call-seq:
- * dh.public_key -> aDH
- *
- * Returns a new DH instance that carries just the public information, i.e.
- * the prime _p_ and the generator _g_, but no public/private key yet. Such
- * a pair may be generated using DH#generate_key!. The "public key" needed
- * for a key exchange with DH#compute_key is considered as per-session
- * information and may be retrieved with DH#pub_key once a key pair has
- * been generated.
- * If the current instance already contains private information (and thus a
- * valid public/private key pair), this information will no longer be present
- * in the new instance generated by DH#public_key. This feature is helpful for
- * publishing the Diffie-Hellman parameters without leaking any of the private
- * per-session information.
- *
- * === Example
- * dh = OpenSSL::PKey::DH.new(2048) # has public and private key set
- * public_key = dh.public_key # contains only prime and generator
- * parameters = public_key.to_der # it's safe to publish this
- */
-static VALUE
-ossl_dh_to_public_key(VALUE self)
-{
- DH *orig_dh, *dh;
- VALUE obj;
-
- GetDH(self, orig_dh);
- dh = DHparams_dup(orig_dh); /* err check perfomed by dh_instance */
- obj = dh_instance(rb_obj_class(self), dh);
- if (obj == Qfalse) {
- DH_free(dh);
- ossl_raise(eDHError, NULL);
- }
-
- return obj;
-}
-
-/*
- * call-seq:
* dh.params_ok? -> true | false
*
* Validates the Diffie-Hellman parameters associated with this instance.
* It checks whether a safe prime and a suitable generator are used. If this
* is not the case, +false+ is returned.
+ *
+ * See also the man page EVP_PKEY_param_check(3).
*/
static VALUE
ossl_dh_check_params(VALUE self)
{
- DH *dh;
- int codes;
-
- GetDH(self, dh);
- if (!DH_check(dh, &codes)) {
- return Qfalse;
- }
-
- return codes == 0 ? Qtrue : Qfalse;
-}
+ int ret;
+#ifdef HAVE_EVP_PKEY_CHECK
+ EVP_PKEY *pkey;
+ EVP_PKEY_CTX *pctx;
-/*
- * call-seq:
- * dh.generate_key! -> self
- *
- * Generates a private and public key unless a private key already exists.
- * If this DH instance was generated from public DH parameters (e.g. by
- * encoding the result of DH#public_key), then this method needs to be
- * called first in order to generate the per-session keys before performing
- * the actual key exchange.
- *
- * === Example
- * dh = OpenSSL::PKey::DH.new(2048)
- * public_key = dh.public_key #contains no private/public key yet
- * public_key.generate_key!
- * puts public_key.private? # => true
- */
-static VALUE
-ossl_dh_generate_key(VALUE self)
-{
+ GetPKey(self, pkey);
+ pctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!pctx)
+ ossl_raise(eDHError, "EVP_PKEY_CTX_new");
+ ret = EVP_PKEY_param_check(pctx);
+ EVP_PKEY_CTX_free(pctx);
+#else
DH *dh;
+ int codes;
GetDH(self, dh);
- if (!DH_generate_key(dh))
- ossl_raise(eDHError, "Failed to generate key");
- return self;
-}
-
-/*
- * call-seq:
- * dh.compute_key(pub_bn) -> aString
- *
- * Returns a String containing a shared secret computed from the other party's public value.
- * See DH_compute_key() for further information.
- *
- * === Parameters
- * * _pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by
- * DH#public_key as that contains the DH parameters only.
- */
-static VALUE
-ossl_dh_compute_key(VALUE self, VALUE pub)
-{
- DH *dh;
- const BIGNUM *pub_key, *dh_p;
- VALUE str;
- int len;
+ ret = DH_check(dh, &codes) == 1 && codes == 0;
+#endif
- GetDH(self, dh);
- DH_get0_pqg(dh, &dh_p, NULL, NULL);
- if (!dh_p)
- ossl_raise(eDHError, "incomplete DH");
- pub_key = GetBNPtr(pub);
- len = DH_size(dh);
- str = rb_str_new(0, len);
- if ((len = DH_compute_key((unsigned char *)RSTRING_PTR(str), pub_key, dh)) < 0) {
- ossl_raise(eDHError, NULL);
+ if (ret == 1)
+ return Qtrue;
+ else {
+ /* DH_check_ex() will put error entry on failure */
+ ossl_clear_error();
+ return Qfalse;
}
- rb_str_set_len(str, len);
-
- return str;
}
/*
@@ -606,30 +393,33 @@ Init_ossl_dh(void)
* The per-session private key, an OpenSSL::BN.
*
* === Example of a key exchange
- * dh1 = OpenSSL::PKey::DH.new(2048)
- * der = dh1.public_key.to_der #you may send this publicly to the participating party
- * dh2 = OpenSSL::PKey::DH.new(der)
- * dh2.generate_key! #generate the per-session key pair
- * symm_key1 = dh1.compute_key(dh2.pub_key)
- * symm_key2 = dh2.compute_key(dh1.pub_key)
+ * # you may send the parameters (der) and own public key (pub1) publicly
+ * # to the participating party
+ * dh1 = OpenSSL::PKey::DH.new(2048)
+ * der = dh1.to_der
+ * pub1 = dh1.pub_key
*
- * puts symm_key1 == symm_key2 # => true
+ * # the other party generates its per-session key pair
+ * dhparams = OpenSSL::PKey::DH.new(der)
+ * dh2 = OpenSSL::PKey.generate_key(dhparams)
+ * pub2 = dh2.pub_key
+ *
+ * symm_key1 = dh1.compute_key(pub2)
+ * symm_key2 = dh2.compute_key(pub1)
+ * puts symm_key1 == symm_key2 # => true
*/
cDH = rb_define_class_under(mPKey, "DH", cPKey);
- rb_define_singleton_method(cDH, "generate", ossl_dh_s_generate, -1);
rb_define_method(cDH, "initialize", ossl_dh_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cDH, "initialize_copy", ossl_dh_initialize_copy, 1);
+#endif
rb_define_method(cDH, "public?", ossl_dh_is_public, 0);
rb_define_method(cDH, "private?", ossl_dh_is_private, 0);
- rb_define_method(cDH, "to_text", ossl_dh_to_text, 0);
rb_define_method(cDH, "export", ossl_dh_export, 0);
rb_define_alias(cDH, "to_pem", "export");
rb_define_alias(cDH, "to_s", "export");
rb_define_method(cDH, "to_der", ossl_dh_to_der, 0);
- rb_define_method(cDH, "public_key", ossl_dh_to_public_key, 0);
rb_define_method(cDH, "params_ok?", ossl_dh_check_params, 0);
- rb_define_method(cDH, "generate_key!", ossl_dh_generate_key, 0);
- rb_define_method(cDH, "compute_key", ossl_dh_compute_key, 1);
DEF_OSSL_PKEY_BN(cDH, dh, p);
DEF_OSSL_PKEY_BN(cDH, dh, q);
diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c
index 56cc9dd4f1..b097f8c9d2 100644
--- a/ext/openssl/ossl_pkey_dsa.c
+++ b/ext/openssl/ossl_pkey_dsa.c
@@ -24,7 +24,7 @@
} while (0)
static inline int
-DSA_HAS_PRIVATE(DSA *dsa)
+DSA_HAS_PRIVATE(OSSL_3_const DSA *dsa)
{
const BIGNUM *bn;
DSA_get0_key(dsa, NULL, &bn);
@@ -32,7 +32,7 @@ DSA_HAS_PRIVATE(DSA *dsa)
}
static inline int
-DSA_PRIVATE(VALUE obj, DSA *dsa)
+DSA_PRIVATE(VALUE obj, OSSL_3_const DSA *dsa)
{
return DSA_HAS_PRIVATE(dsa) || OSSL_PKEY_IS_PRIVATE(obj);
}
@@ -44,245 +44,130 @@ VALUE cDSA;
VALUE eDSAError;
/*
- * Public
- */
-static VALUE
-dsa_instance(VALUE klass, DSA *dsa)
-{
- EVP_PKEY *pkey;
- VALUE obj;
-
- if (!dsa) {
- return Qfalse;
- }
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- return Qfalse;
- }
- if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
- EVP_PKEY_free(pkey);
- return Qfalse;
- }
- SetPKey(obj, pkey);
-
- return obj;
-}
-
-VALUE
-ossl_dsa_new(EVP_PKEY *pkey)
-{
- VALUE obj;
-
- if (!pkey) {
- obj = dsa_instance(cDSA, DSA_new());
- } else {
- obj = NewPKey(cDSA);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) {
- ossl_raise(rb_eTypeError, "Not a DSA key!");
- }
- SetPKey(obj, pkey);
- }
- if (obj == Qfalse) {
- ossl_raise(eDSAError, NULL);
- }
-
- return obj;
-}
-
-/*
* Private
*/
-struct dsa_blocking_gen_arg {
- DSA *dsa;
- int size;
- int *counter;
- unsigned long *h;
- BN_GENCB *cb;
- int result;
-};
-
-static void *
-dsa_blocking_gen(void *arg)
-{
- struct dsa_blocking_gen_arg *gen = (struct dsa_blocking_gen_arg *)arg;
- gen->result = DSA_generate_parameters_ex(gen->dsa, gen->size, NULL, 0,
- gen->counter, gen->h, gen->cb);
- return 0;
-}
-
-static DSA *
-dsa_generate(int size)
-{
- struct ossl_generate_cb_arg cb_arg = { 0 };
- struct dsa_blocking_gen_arg gen_arg;
- DSA *dsa = DSA_new();
- BN_GENCB *cb = BN_GENCB_new();
- int counter;
- unsigned long h;
-
- if (!dsa || !cb) {
- DSA_free(dsa);
- BN_GENCB_free(cb);
- return NULL;
- }
-
- if (rb_block_given_p())
- cb_arg.yield = 1;
- BN_GENCB_set(cb, ossl_generate_cb_2, &cb_arg);
- gen_arg.dsa = dsa;
- gen_arg.size = size;
- gen_arg.counter = &counter;
- gen_arg.h = &h;
- gen_arg.cb = cb;
- if (cb_arg.yield == 1) {
- /* we cannot release GVL when callback proc is supplied */
- dsa_blocking_gen(&gen_arg);
- } else {
- /* there's a chance to unblock */
- rb_thread_call_without_gvl(dsa_blocking_gen, &gen_arg, ossl_generate_cb_stop, &cb_arg);
- }
-
- BN_GENCB_free(cb);
- if (!gen_arg.result) {
- DSA_free(dsa);
- if (cb_arg.state) {
- /* Clear OpenSSL error queue before re-raising. By the way, the
- * documentation of DSA_generate_parameters_ex() says the error code
- * can be obtained by ERR_get_error(), but the default
- * implementation, dsa_builtin_paramgen() doesn't put any error... */
- ossl_clear_error();
- rb_jump_tag(cb_arg.state);
- }
- return NULL;
- }
-
- if (!DSA_generate_key(dsa)) {
- DSA_free(dsa);
- return NULL;
- }
-
- return dsa;
-}
-
-/*
- * call-seq:
- * DSA.generate(size) -> dsa
- *
- * Creates a new DSA instance by generating a private/public key pair
- * from scratch.
- *
- * === Parameters
- * * _size_ is an integer representing the desired key size.
- *
- */
-static VALUE
-ossl_dsa_s_generate(VALUE klass, VALUE size)
-{
- DSA *dsa = dsa_generate(NUM2INT(size)); /* err handled by dsa_instance */
- VALUE obj = dsa_instance(klass, dsa);
-
- if (obj == Qfalse) {
- DSA_free(dsa);
- ossl_raise(eDSAError, NULL);
- }
-
- return obj;
-}
-
/*
* call-seq:
* DSA.new -> dsa
- * DSA.new(size) -> dsa
* DSA.new(string [, pass]) -> dsa
+ * DSA.new(size) -> dsa
*
* Creates a new DSA instance by reading an existing key from _string_.
*
- * === Parameters
- * * _size_ is an integer representing the desired key size.
- * * _string_ contains a DER or PEM encoded key.
- * * _pass_ is a string that contains an optional password.
+ * If called without arguments, creates a new instance with no key components
+ * set. They can be set individually by #set_pqg and #set_key.
*
- * === Examples
- * DSA.new -> dsa
- * DSA.new(1024) -> dsa
- * DSA.new(File.read('dsa.pem')) -> dsa
- * DSA.new(File.read('dsa.pem'), 'mypassword') -> dsa
+ * If called with a String, tries to parse as DER or PEM encoding of a \DSA key.
+ * See also OpenSSL::PKey.read which can parse keys of any kinds.
+ *
+ * If called with a number, generates random parameters and a key pair. This
+ * form works as an alias of DSA.generate.
+ *
+ * +string+::
+ * A String that contains a DER or PEM encoded key.
+ * +pass+::
+ * A String that contains an optional password.
+ * +size+::
+ * See DSA.generate.
*
+ * Examples:
+ * p OpenSSL::PKey::DSA.new(1024)
+ * #=> #<OpenSSL::PKey::DSA:0x000055a8d6025bf0 oid=DSA>
+ *
+ * p OpenSSL::PKey::DSA.new(File.read('dsa.pem'))
+ * #=> #<OpenSSL::PKey::DSA:0x000055555d6b8110 oid=DSA>
+ *
+ * p OpenSSL::PKey::DSA.new(File.read('dsa.pem'), 'mypassword')
+ * #=> #<OpenSSL::PKey::DSA:0x0000556f973c40b8 oid=DSA>
*/
static VALUE
ossl_dsa_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
DSA *dsa;
- BIO *in;
+ BIO *in = NULL;
VALUE arg, pass;
+ int type;
+
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
- GetPKey(self, pkey);
- if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
+ /* The DSA.new(size, generator) form is handled by lib/openssl/pkey.rb */
+ rb_scan_args(argc, argv, "02", &arg, &pass);
+ if (argc == 0) {
dsa = DSA_new();
+ if (!dsa)
+ ossl_raise(eDSAError, "DSA_new");
+ goto legacy;
}
- else if (RB_INTEGER_TYPE_P(arg)) {
- if (!(dsa = dsa_generate(NUM2INT(arg)))) {
- ossl_raise(eDSAError, NULL);
- }
- }
- else {
- pass = ossl_pem_passwd_value(pass);
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
- dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, (void *)pass);
- if (!dsa) {
- OSSL_BIO_reset(in);
- dsa = PEM_read_bio_DSA_PUBKEY(in, NULL, NULL, NULL);
- }
- if (!dsa) {
- OSSL_BIO_reset(in);
- dsa = d2i_DSAPrivateKey_bio(in, NULL);
- }
- if (!dsa) {
- OSSL_BIO_reset(in);
- dsa = d2i_DSA_PUBKEY_bio(in, NULL);
- }
- if (!dsa) {
- OSSL_BIO_reset(in);
-#define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \
- (d2i_of_void *)d2i_DSAPublicKey, PEM_STRING_DSA_PUBLIC, (bp), (void **)(x), (cb), (u))
- dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
-#undef PEM_read_bio_DSAPublicKey
- }
- BIO_free(in);
- if (!dsa) {
- ossl_clear_error();
- ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
- }
- }
- if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
- DSA_free(dsa);
- ossl_raise(eDSAError, NULL);
+
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /* DER-encoded DSAPublicKey format isn't supported by the generic routine */
+ dsa = (DSA *)PEM_ASN1_read_bio((d2i_of_void *)d2i_DSAPublicKey,
+ PEM_STRING_DSA_PUBLIC,
+ in, NULL, NULL, NULL);
+ if (dsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eDSAError, "Neither PUB key nor PRIV key");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_DSA) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DSA(pkey, dsa) != 1) {
+ EVP_PKEY_free(pkey);
+ DSA_free(dsa);
+ ossl_raise(eDSAError, "EVP_PKEY_assign_DSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_dsa_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
DSA *dsa, *dsa_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eDSAError, "DSA already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetDSA(other, dsa);
- dsa_new = ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, (d2i_of_void *)d2i_DSAPrivateKey, (char *)dsa);
+ dsa_new = (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey,
+ (d2i_of_void *)d2i_DSAPrivateKey,
+ (char *)dsa);
if (!dsa_new)
ossl_raise(eDSAError, "ASN1_dup");
- EVP_PKEY_assign_DSA(pkey, dsa_new);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_DSA(pkey, dsa_new) != 1) {
+ EVP_PKEY_free(pkey);
+ DSA_free(dsa_new);
+ ossl_raise(eDSAError, "EVP_PKEY_assign_DSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -294,7 +179,7 @@ ossl_dsa_initialize_copy(VALUE self, VALUE other)
static VALUE
ossl_dsa_is_public(VALUE self)
{
- DSA *dsa;
+ const DSA *dsa;
const BIGNUM *bn;
GetDSA(self, dsa);
@@ -313,7 +198,7 @@ ossl_dsa_is_public(VALUE self)
static VALUE
ossl_dsa_is_private(VALUE self)
{
- DSA *dsa;
+ OSSL_3_const DSA *dsa;
GetDSA(self, dsa);
@@ -340,35 +225,13 @@ ossl_dsa_is_private(VALUE self)
static VALUE
ossl_dsa_export(int argc, VALUE *argv, VALUE self)
{
- DSA *dsa;
- BIO *out;
- const EVP_CIPHER *ciph = NULL;
- VALUE cipher, pass, str;
+ OSSL_3_const DSA *dsa;
GetDSA(self, dsa);
- rb_scan_args(argc, argv, "02", &cipher, &pass);
- if (!NIL_P(cipher)) {
- ciph = ossl_evp_get_cipherbyname(cipher);
- pass = ossl_pem_passwd_value(pass);
- }
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eDSAError, NULL);
- }
- if (DSA_HAS_PRIVATE(dsa)) {
- if (!PEM_write_bio_DSAPrivateKey(out, dsa, ciph, NULL, 0,
- ossl_pem_passwd_cb, (void *)pass)){
- BIO_free(out);
- ossl_raise(eDSAError, NULL);
- }
- } else {
- if (!PEM_write_bio_DSA_PUBKEY(out, dsa)) {
- BIO_free(out);
- ossl_raise(eDSAError, NULL);
- }
- }
- str = ossl_membio2str(out);
-
- return str;
+ if (DSA_HAS_PRIVATE(dsa))
+ return ossl_pkey_export_traditional(argc, argv, self, 0);
+ else
+ return ossl_pkey_export_spki(self, 0);
}
/*
@@ -381,26 +244,13 @@ ossl_dsa_export(int argc, VALUE *argv, VALUE self)
static VALUE
ossl_dsa_to_der(VALUE self)
{
- DSA *dsa;
- int (*i2d_func)(DSA *, unsigned char **);
- unsigned char *p;
- long len;
- VALUE str;
+ OSSL_3_const DSA *dsa;
GetDSA(self, dsa);
- if(DSA_HAS_PRIVATE(dsa))
- i2d_func = (int (*)(DSA *,unsigned char **))i2d_DSAPrivateKey;
+ if (DSA_HAS_PRIVATE(dsa))
+ return ossl_pkey_export_traditional(0, NULL, self, 1);
else
- i2d_func = i2d_DSA_PUBKEY;
- if((len = i2d_func(dsa, NULL)) <= 0)
- ossl_raise(eDSAError, NULL);
- str = rb_str_new(0, len);
- p = (unsigned char *)RSTRING_PTR(str);
- if(i2d_func(dsa, &p) < 0)
- ossl_raise(eDSAError, NULL);
- ossl_str_adjust(str, p);
-
- return str;
+ return ossl_pkey_export_spki(self, 1);
}
@@ -415,7 +265,7 @@ ossl_dsa_to_der(VALUE self)
static VALUE
ossl_dsa_get_params(VALUE self)
{
- DSA *dsa;
+ OSSL_3_const DSA *dsa;
VALUE hash;
const BIGNUM *p, *q, *g, *pub_key, *priv_key;
@@ -434,158 +284,6 @@ ossl_dsa_get_params(VALUE self)
}
/*
- * call-seq:
- * dsa.to_text -> aString
- *
- * Prints all parameters of key to buffer
- * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
- * Don't use :-)) (I's up to you)
- */
-static VALUE
-ossl_dsa_to_text(VALUE self)
-{
- DSA *dsa;
- BIO *out;
- VALUE str;
-
- GetDSA(self, dsa);
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eDSAError, NULL);
- }
- if (!DSA_print(out, dsa, 0)) { /* offset = 0 */
- BIO_free(out);
- ossl_raise(eDSAError, NULL);
- }
- str = ossl_membio2str(out);
-
- return str;
-}
-
-/*
- * call-seq:
- * dsa.public_key -> aDSA
- *
- * Returns a new DSA instance that carries just the public key information.
- * If the current instance has also private key information, this will no
- * longer be present in the new instance. This feature is helpful for
- * publishing the public key information without leaking any of the private
- * information.
- *
- * === Example
- * dsa = OpenSSL::PKey::DSA.new(2048) # has public and private information
- * pub_key = dsa.public_key # has only the public part available
- * pub_key_der = pub_key.to_der # it's safe to publish this
- *
- *
- */
-static VALUE
-ossl_dsa_to_public_key(VALUE self)
-{
- EVP_PKEY *pkey;
- DSA *dsa;
- VALUE obj;
-
- GetPKeyDSA(self, pkey);
- /* err check performed by dsa_instance */
-#define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup( \
- (i2d_of_void *)i2d_DSAPublicKey, (d2i_of_void *)d2i_DSAPublicKey, (char *)(dsa))
- dsa = DSAPublicKey_dup(EVP_PKEY_get0_DSA(pkey));
-#undef DSAPublicKey_dup
- obj = dsa_instance(rb_obj_class(self), dsa);
- if (obj == Qfalse) {
- DSA_free(dsa);
- ossl_raise(eDSAError, NULL);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * dsa.syssign(string) -> aString
- *
- * Computes and returns the DSA signature of _string_, where _string_ is
- * expected to be an already-computed message digest of the original input
- * data. The signature is issued using the private key of this DSA instance.
- *
- * === Parameters
- * * _string_ is a message digest of the original input data to be signed.
- *
- * === Example
- * dsa = OpenSSL::PKey::DSA.new(2048)
- * doc = "Sign me"
- * digest = OpenSSL::Digest::SHA1.digest(doc)
- * sig = dsa.syssign(digest)
- *
- *
- */
-static VALUE
-ossl_dsa_sign(VALUE self, VALUE data)
-{
- DSA *dsa;
- const BIGNUM *dsa_q;
- unsigned int buf_len;
- VALUE str;
-
- GetDSA(self, dsa);
- DSA_get0_pqg(dsa, NULL, &dsa_q, NULL);
- if (!dsa_q)
- ossl_raise(eDSAError, "incomplete DSA");
- if (!DSA_PRIVATE(self, dsa))
- ossl_raise(eDSAError, "Private DSA key needed!");
- StringValue(data);
- str = rb_str_new(0, DSA_size(dsa));
- if (!DSA_sign(0, (unsigned char *)RSTRING_PTR(data), RSTRING_LENINT(data),
- (unsigned char *)RSTRING_PTR(str),
- &buf_len, dsa)) { /* type is ignored (0) */
- ossl_raise(eDSAError, NULL);
- }
- rb_str_set_len(str, buf_len);
-
- return str;
-}
-
-/*
- * call-seq:
- * dsa.sysverify(digest, sig) -> true | false
- *
- * Verifies whether the signature is valid given the message digest input. It
- * does so by validating _sig_ using the public key of this DSA instance.
- *
- * === Parameters
- * * _digest_ is a message digest of the original input data to be signed
- * * _sig_ is a DSA signature value
- *
- * === Example
- * dsa = OpenSSL::PKey::DSA.new(2048)
- * doc = "Sign me"
- * digest = OpenSSL::Digest::SHA1.digest(doc)
- * sig = dsa.syssign(digest)
- * puts dsa.sysverify(digest, sig) # => true
- *
- */
-static VALUE
-ossl_dsa_verify(VALUE self, VALUE digest, VALUE sig)
-{
- DSA *dsa;
- int ret;
-
- GetDSA(self, dsa);
- StringValue(digest);
- StringValue(sig);
- /* type is ignored (0) */
- ret = DSA_verify(0, (unsigned char *)RSTRING_PTR(digest), RSTRING_LENINT(digest),
- (unsigned char *)RSTRING_PTR(sig), RSTRING_LENINT(sig), dsa);
- if (ret < 0) {
- ossl_raise(eDSAError, NULL);
- }
- else if (ret == 1) {
- return Qtrue;
- }
-
- return Qfalse;
-}
-
-/*
* Document-method: OpenSSL::PKey::DSA#set_pqg
* call-seq:
* dsa.set_pqg(p, q, g) -> self
@@ -630,20 +328,17 @@ Init_ossl_dsa(void)
*/
cDSA = rb_define_class_under(mPKey, "DSA", cPKey);
- rb_define_singleton_method(cDSA, "generate", ossl_dsa_s_generate, 1);
rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cDSA, "initialize_copy", ossl_dsa_initialize_copy, 1);
+#endif
rb_define_method(cDSA, "public?", ossl_dsa_is_public, 0);
rb_define_method(cDSA, "private?", ossl_dsa_is_private, 0);
- rb_define_method(cDSA, "to_text", ossl_dsa_to_text, 0);
rb_define_method(cDSA, "export", ossl_dsa_export, -1);
rb_define_alias(cDSA, "to_pem", "export");
rb_define_alias(cDSA, "to_s", "export");
rb_define_method(cDSA, "to_der", ossl_dsa_to_der, 0);
- rb_define_method(cDSA, "public_key", ossl_dsa_to_public_key, 0);
- rb_define_method(cDSA, "syssign", ossl_dsa_sign, 1);
- rb_define_method(cDSA, "sysverify", ossl_dsa_verify, 2);
DEF_OSSL_PKEY_BN(cDSA, dsa, p);
DEF_OSSL_PKEY_BN(cDSA, dsa, q);
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 8bb611248b..92842f95ac 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -47,12 +47,7 @@ VALUE eEC_GROUP;
VALUE cEC_POINT;
VALUE eEC_POINT;
-static ID s_GFp;
-static ID s_GFp_simple;
-static ID s_GFp_mont;
-static ID s_GFp_nist;
-static ID s_GF2m;
-static ID s_GF2m_simple;
+static ID s_GFp, s_GF2m;
static ID ID_uncompressed;
static ID ID_compressed;
@@ -63,47 +58,6 @@ static ID id_i_group;
static VALUE ec_group_new(const EC_GROUP *group);
static VALUE ec_point_new(const EC_POINT *point, const EC_GROUP *group);
-static VALUE ec_instance(VALUE klass, EC_KEY *ec)
-{
- EVP_PKEY *pkey;
- VALUE obj;
-
- if (!ec) {
- return Qfalse;
- }
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- return Qfalse;
- }
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) {
- EVP_PKEY_free(pkey);
- return Qfalse;
- }
- SetPKey(obj, pkey);
-
- return obj;
-}
-
-VALUE ossl_ec_new(EVP_PKEY *pkey)
-{
- VALUE obj;
-
- if (!pkey) {
- obj = ec_instance(cEC, EC_KEY_new());
- } else {
- obj = NewPKey(cEC);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC) {
- ossl_raise(rb_eTypeError, "Not a EC key!");
- }
- SetPKey(obj, pkey);
- }
- if (obj == Qfalse) {
- ossl_raise(eECError, NULL);
- }
-
- return obj;
-}
-
/*
* Creates a new EC_KEY on the EC group obj. arg can be an EC::Group or a String
* representing an OID.
@@ -150,16 +104,20 @@ ec_key_new_from_group(VALUE arg)
static VALUE
ossl_ec_key_s_generate(VALUE klass, VALUE arg)
{
+ EVP_PKEY *pkey;
EC_KEY *ec;
VALUE obj;
- ec = ec_key_new_from_group(arg);
+ obj = rb_obj_alloc(klass);
- obj = ec_instance(klass, ec);
- if (obj == Qfalse) {
- EC_KEY_free(ec);
- ossl_raise(eECError, NULL);
+ ec = ec_key_new_from_group(arg);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec) != 1) {
+ EVP_PKEY_free(pkey);
+ EC_KEY_free(ec);
+ ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
}
+ RTYPEDDATA_DATA(obj) = pkey;
if (!EC_KEY_generate_key(ec))
ossl_raise(eECError, "EC_KEY_generate_key");
@@ -182,81 +140,82 @@ static VALUE ossl_ec_key_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
EC_KEY *ec;
+ BIO *in;
VALUE arg, pass;
+ int type;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eECError, "EC_KEY already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
rb_scan_args(argc, argv, "02", &arg, &pass);
-
if (NIL_P(arg)) {
if (!(ec = EC_KEY_new()))
- ossl_raise(eECError, NULL);
- } else if (rb_obj_is_kind_of(arg, cEC)) {
- EC_KEY *other_ec = NULL;
-
- GetEC(arg, other_ec);
- if (!(ec = EC_KEY_dup(other_ec)))
- ossl_raise(eECError, NULL);
- } else if (rb_obj_is_kind_of(arg, cEC_GROUP)) {
- ec = ec_key_new_from_group(arg);
- } else {
- BIO *in;
-
- pass = ossl_pem_passwd_value(pass);
- in = ossl_obj2bio(&arg);
+ ossl_raise(eECError, "EC_KEY_new");
+ goto legacy;
+ }
+ else if (rb_obj_is_kind_of(arg, cEC_GROUP)) {
+ ec = ec_key_new_from_group(arg);
+ goto legacy;
+ }
- ec = PEM_read_bio_ECPrivateKey(in, NULL, ossl_pem_passwd_cb, (void *)pass);
- if (!ec) {
- OSSL_BIO_reset(in);
- ec = PEM_read_bio_EC_PUBKEY(in, NULL, ossl_pem_passwd_cb, (void *)pass);
- }
- if (!ec) {
- OSSL_BIO_reset(in);
- ec = d2i_ECPrivateKey_bio(in, NULL);
- }
- if (!ec) {
- OSSL_BIO_reset(in);
- ec = d2i_EC_PUBKEY_bio(in, NULL);
- }
- BIO_free(in);
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
- if (!ec) {
- ossl_clear_error();
- ec = ec_key_new_from_group(arg);
- }
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey) {
+ ossl_clear_error();
+ ec = ec_key_new_from_group(arg);
+ goto legacy;
}
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) {
- EC_KEY_free(ec);
- ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_EC) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eDSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec) != 1) {
+ EVP_PKEY_free(pkey);
+ EC_KEY_free(ec);
+ ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_ec_key_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
EC_KEY *ec, *ec_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eECError, "EC already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetEC(other, ec);
ec_new = EC_KEY_dup(ec);
if (!ec_new)
ossl_raise(eECError, "EC_KEY_dup");
- if (!EVP_PKEY_assign_EC_KEY(pkey, ec_new)) {
- EC_KEY_free(ec_new);
- ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
+
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_EC_KEY(pkey, ec_new) != 1) {
+ EC_KEY_free(ec_new);
+ ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY");
}
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -268,7 +227,7 @@ ossl_ec_key_initialize_copy(VALUE self, VALUE other)
static VALUE
ossl_ec_key_get_group(VALUE self)
{
- EC_KEY *ec;
+ OSSL_3_const EC_KEY *ec;
const EC_GROUP *group;
GetEC(self, ec);
@@ -289,6 +248,9 @@ ossl_ec_key_get_group(VALUE self)
static VALUE
ossl_ec_key_set_group(VALUE self, VALUE group_v)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
EC_GROUP *group;
@@ -299,6 +261,7 @@ ossl_ec_key_set_group(VALUE self, VALUE group_v)
ossl_raise(eECError, "EC_KEY_set_group");
return group_v;
+#endif
}
/*
@@ -309,7 +272,7 @@ ossl_ec_key_set_group(VALUE self, VALUE group_v)
*/
static VALUE ossl_ec_key_get_private_key(VALUE self)
{
- EC_KEY *ec;
+ OSSL_3_const EC_KEY *ec;
const BIGNUM *bn;
GetEC(self, ec);
@@ -327,6 +290,9 @@ static VALUE ossl_ec_key_get_private_key(VALUE self)
*/
static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
BIGNUM *bn = NULL;
@@ -340,11 +306,13 @@ static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
case 0:
if (bn == NULL)
break;
+ /* fallthrough */
default:
ossl_raise(eECError, "EC_KEY_set_private_key");
}
return private_key;
+#endif
}
/*
@@ -355,7 +323,7 @@ static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key)
*/
static VALUE ossl_ec_key_get_public_key(VALUE self)
{
- EC_KEY *ec;
+ OSSL_3_const EC_KEY *ec;
const EC_POINT *point;
GetEC(self, ec);
@@ -373,6 +341,9 @@ static VALUE ossl_ec_key_get_public_key(VALUE self)
*/
static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
EC_POINT *point = NULL;
@@ -386,11 +357,13 @@ static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key)
case 0:
if (point == NULL)
break;
+ /* fallthrough */
default:
ossl_raise(eECError, "EC_KEY_set_public_key");
}
return public_key;
+#endif
}
/*
@@ -402,7 +375,7 @@ static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key)
*/
static VALUE ossl_ec_key_is_public(VALUE self)
{
- EC_KEY *ec;
+ OSSL_3_const EC_KEY *ec;
GetEC(self, ec);
@@ -418,73 +391,13 @@ static VALUE ossl_ec_key_is_public(VALUE self)
*/
static VALUE ossl_ec_key_is_private(VALUE self)
{
- EC_KEY *ec;
+ OSSL_3_const EC_KEY *ec;
GetEC(self, ec);
return EC_KEY_get0_private_key(ec) ? Qtrue : Qfalse;
}
-static VALUE ossl_ec_key_to_string(VALUE self, VALUE ciph, VALUE pass, int format)
-{
- EC_KEY *ec;
- BIO *out;
- int i = -1;
- int private = 0;
- VALUE str;
- const EVP_CIPHER *cipher = NULL;
-
- GetEC(self, ec);
-
- if (EC_KEY_get0_public_key(ec) == NULL)
- ossl_raise(eECError, "can't export - no public key set");
-
- if (EC_KEY_check_key(ec) != 1)
- ossl_raise(eECError, "can't export - EC_KEY_check_key failed");
-
- if (EC_KEY_get0_private_key(ec))
- private = 1;
-
- if (!NIL_P(ciph)) {
- cipher = ossl_evp_get_cipherbyname(ciph);
- pass = ossl_pem_passwd_value(pass);
- }
-
- if (!(out = BIO_new(BIO_s_mem())))
- ossl_raise(eECError, "BIO_new(BIO_s_mem())");
-
- switch(format) {
- case EXPORT_PEM:
- if (private) {
- i = PEM_write_bio_ECPrivateKey(out, ec, cipher, NULL, 0, ossl_pem_passwd_cb, (void *)pass);
- } else {
- i = PEM_write_bio_EC_PUBKEY(out, ec);
- }
-
- break;
- case EXPORT_DER:
- if (private) {
- i = i2d_ECPrivateKey_bio(out, ec);
- } else {
- i = i2d_EC_PUBKEY_bio(out, ec);
- }
-
- break;
- default:
- BIO_free(out);
- ossl_raise(rb_eRuntimeError, "unknown format (internal error)");
- }
-
- if (i != 1) {
- BIO_free(out);
- ossl_raise(eECError, "outlen=%d", i);
- }
-
- str = ossl_membio2str(out);
-
- return str;
-}
-
/*
* call-seq:
* key.export([cipher, pass_phrase]) => String
@@ -495,11 +408,18 @@ static VALUE ossl_ec_key_to_string(VALUE self, VALUE ciph, VALUE pass, int forma
* instance. Note that encryption will only be effective for a private key,
* public keys will always be encoded in plain text.
*/
-static VALUE ossl_ec_key_export(int argc, VALUE *argv, VALUE self)
+static VALUE
+ossl_ec_key_export(int argc, VALUE *argv, VALUE self)
{
- VALUE cipher, passwd;
- rb_scan_args(argc, argv, "02", &cipher, &passwd);
- return ossl_ec_key_to_string(self, cipher, passwd, EXPORT_PEM);
+ OSSL_3_const EC_KEY *ec;
+
+ GetEC(self, ec);
+ if (EC_KEY_get0_public_key(ec) == NULL)
+ ossl_raise(eECError, "can't export - no public key set");
+ if (EC_KEY_get0_private_key(ec))
+ return ossl_pkey_export_traditional(argc, argv, self, 0);
+ else
+ return ossl_pkey_export_spki(self, 0);
}
/*
@@ -508,36 +428,19 @@ static VALUE ossl_ec_key_export(int argc, VALUE *argv, VALUE self)
*
* See the OpenSSL documentation for i2d_ECPrivateKey_bio()
*/
-static VALUE ossl_ec_key_to_der(VALUE self)
-{
- return ossl_ec_key_to_string(self, Qnil, Qnil, EXPORT_DER);
-}
-
-/*
- * call-seq:
- * key.to_text => String
- *
- * See the OpenSSL documentation for EC_KEY_print()
- */
-static VALUE ossl_ec_key_to_text(VALUE self)
+static VALUE
+ossl_ec_key_to_der(VALUE self)
{
- EC_KEY *ec;
- BIO *out;
- VALUE str;
+ OSSL_3_const EC_KEY *ec;
GetEC(self, ec);
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eECError, "BIO_new(BIO_s_mem())");
- }
- if (!EC_KEY_print(out, ec, 0)) {
- BIO_free(out);
- ossl_raise(eECError, "EC_KEY_print");
- }
- str = ossl_membio2str(out);
-
- return str;
+ if (EC_KEY_get0_public_key(ec) == NULL)
+ ossl_raise(eECError, "can't export - no public key set");
+ if (EC_KEY_get0_private_key(ec))
+ return ossl_pkey_export_traditional(0, NULL, self, 1);
+ else
+ return ossl_pkey_export_spki(self, 1);
}
-
/*
* call-seq:
* key.generate_key! => self
@@ -554,6 +457,9 @@ static VALUE ossl_ec_key_to_text(VALUE self)
*/
static VALUE ossl_ec_key_generate_key(VALUE self)
{
+#if OSSL_OPENSSL_PREREQ(3, 0, 0)
+ rb_raise(ePKeyError, "pkeys are immutable on OpenSSL 3.0");
+#else
EC_KEY *ec;
GetEC(self, ec);
@@ -561,107 +467,53 @@ static VALUE ossl_ec_key_generate_key(VALUE self)
ossl_raise(eECError, "EC_KEY_generate_key");
return self;
+#endif
}
/*
- * call-seq:
- * key.check_key => true
+ * call-seq:
+ * key.check_key => true
*
- * Raises an exception if the key is invalid.
+ * Raises an exception if the key is invalid.
*
- * See the OpenSSL documentation for EC_KEY_check_key()
+ * See also the man page EVP_PKEY_public_check(3).
*/
static VALUE ossl_ec_key_check_key(VALUE self)
{
- EC_KEY *ec;
-
- GetEC(self, ec);
- if (EC_KEY_check_key(ec) != 1)
- ossl_raise(eECError, "EC_KEY_check_key");
-
- return Qtrue;
-}
-
-/*
- * call-seq:
- * key.dh_compute_key(pubkey) => String
- *
- * See the OpenSSL documentation for ECDH_compute_key()
- */
-static VALUE ossl_ec_key_dh_compute_key(VALUE self, VALUE pubkey)
-{
- EC_KEY *ec;
- EC_POINT *point;
- int buf_len;
- VALUE str;
-
- GetEC(self, ec);
- GetECPoint(pubkey, point);
-
-/* BUG: need a way to figure out the maximum string size */
- buf_len = 1024;
- str = rb_str_new(0, buf_len);
-/* BUG: take KDF as a block */
- buf_len = ECDH_compute_key(RSTRING_PTR(str), buf_len, point, ec, NULL);
- if (buf_len < 0)
- ossl_raise(eECError, "ECDH_compute_key");
-
- rb_str_resize(str, buf_len);
-
- return str;
-}
-
-/* sign_setup */
-
-/*
- * call-seq:
- * key.dsa_sign_asn1(data) => String
- *
- * See the OpenSSL documentation for ECDSA_sign()
- */
-static VALUE ossl_ec_key_dsa_sign_asn1(VALUE self, VALUE data)
-{
- EC_KEY *ec;
- unsigned int buf_len;
- VALUE str;
+#ifdef HAVE_EVP_PKEY_CHECK
+ EVP_PKEY *pkey;
+ EVP_PKEY_CTX *pctx;
+ const EC_KEY *ec;
+ GetPKey(self, pkey);
GetEC(self, ec);
- StringValue(data);
-
- if (EC_KEY_get0_private_key(ec) == NULL)
- ossl_raise(eECError, "Private EC key needed!");
-
- str = rb_str_new(0, ECDSA_size(ec));
- if (ECDSA_sign(0, (unsigned char *) RSTRING_PTR(data), RSTRING_LENINT(data), (unsigned char *) RSTRING_PTR(str), &buf_len, ec) != 1)
- ossl_raise(eECError, "ECDSA_sign");
- rb_str_set_len(str, buf_len);
-
- return str;
-}
+ pctx = EVP_PKEY_CTX_new(pkey, /* engine */NULL);
+ if (!pctx)
+ ossl_raise(eECError, "EVP_PKEY_CTX_new");
+
+ if (EC_KEY_get0_private_key(ec) != NULL) {
+ if (EVP_PKEY_check(pctx) != 1) {
+ EVP_PKEY_CTX_free(pctx);
+ ossl_raise(eECError, "EVP_PKEY_check");
+ }
+ }
+ else {
+ if (EVP_PKEY_public_check(pctx) != 1) {
+ EVP_PKEY_CTX_free(pctx);
+ ossl_raise(eECError, "EVP_PKEY_public_check");
+ }
+ }
-/*
- * call-seq:
- * key.dsa_verify_asn1(data, sig) => true or false
- *
- * See the OpenSSL documentation for ECDSA_verify()
- */
-static VALUE ossl_ec_key_dsa_verify_asn1(VALUE self, VALUE data, VALUE sig)
-{
+ EVP_PKEY_CTX_free(pctx);
+#else
EC_KEY *ec;
GetEC(self, ec);
- StringValue(data);
- StringValue(sig);
-
- switch (ECDSA_verify(0, (unsigned char *) RSTRING_PTR(data), RSTRING_LENINT(data), (unsigned char *) RSTRING_PTR(sig), (int)RSTRING_LEN(sig), ec)) {
- case 1: return Qtrue;
- case 0: return Qfalse;
- default: break;
- }
-
- ossl_raise(eECError, "ECDSA_verify");
+ if (EC_KEY_check_key(ec) != 1)
+ ossl_raise(eECError, "EC_KEY_check_key");
+#endif
- UNREACHABLE;
+ return Qtrue;
}
/*
@@ -670,7 +522,7 @@ static VALUE ossl_ec_key_dsa_verify_asn1(VALUE self, VALUE data, VALUE sig)
static void
ossl_ec_group_free(void *ptr)
{
- EC_GROUP_clear_free(ptr);
+ EC_GROUP_free(ptr);
}
static const rb_data_type_t ossl_ec_group_type = {
@@ -706,20 +558,11 @@ ec_group_new(const EC_GROUP *group)
* call-seq:
* OpenSSL::PKey::EC::Group.new(ec_group)
* OpenSSL::PKey::EC::Group.new(pem_or_der_encoded)
- * OpenSSL::PKey::EC::Group.new(ec_method)
* OpenSSL::PKey::EC::Group.new(:GFp, bignum_p, bignum_a, bignum_b)
* OpenSSL::PKey::EC::Group.new(:GF2m, bignum_p, bignum_a, bignum_b)
*
* Creates a new EC::Group object.
*
- * _ec_method_ is a symbol that represents an EC_METHOD. Currently the following
- * are supported:
- *
- * * :GFp_simple
- * * :GFp_mont
- * * :GFp_nist
- * * :GF2m_simple
- *
* If the first argument is :GFp or :GF2m, creates a new curve with given
* parameters.
*/
@@ -734,29 +577,7 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
switch (rb_scan_args(argc, argv, "13", &arg1, &arg2, &arg3, &arg4)) {
case 1:
- if (SYMBOL_P(arg1)) {
- const EC_METHOD *method = NULL;
- ID id = SYM2ID(arg1);
-
- if (id == s_GFp_simple) {
- method = EC_GFp_simple_method();
- } else if (id == s_GFp_mont) {
- method = EC_GFp_mont_method();
- } else if (id == s_GFp_nist) {
- method = EC_GFp_nist_method();
-#if !defined(OPENSSL_NO_EC2M)
- } else if (id == s_GF2m_simple) {
- method = EC_GF2m_simple_method();
-#endif
- }
-
- if (method) {
- if ((group = EC_GROUP_new(method)) == NULL)
- ossl_raise(eEC_GROUP, "EC_GROUP_new");
- } else {
- ossl_raise(rb_eArgError, "unknown symbol, must be :GFp_simple, :GFp_mont, :GFp_nist or :GF2m_simple");
- }
- } else if (rb_obj_is_kind_of(arg1, cEC_GROUP)) {
+ if (rb_obj_is_kind_of(arg1, cEC_GROUP)) {
const EC_GROUP *arg1_group;
GetECGroup(arg1, arg1_group);
@@ -820,8 +641,7 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
ossl_raise(rb_eArgError, "wrong number of arguments");
}
- if (group == NULL)
- ossl_raise(eEC_GROUP, "");
+ ASSUME(group);
RTYPEDDATA_DATA(self) = group;
return self;
@@ -860,10 +680,11 @@ static VALUE ossl_ec_group_eql(VALUE a, VALUE b)
GetECGroup(a, group1);
GetECGroup(b, group2);
- if (EC_GROUP_cmp(group1, group2, ossl_bn_ctx) == 1)
- return Qfalse;
-
- return Qtrue;
+ switch (EC_GROUP_cmp(group1, group2, ossl_bn_ctx)) {
+ case 0: return Qtrue;
+ case 1: return Qfalse;
+ default: ossl_raise(eEC_GROUP, "EC_GROUP_cmp");
+ }
}
/*
@@ -1424,10 +1245,13 @@ static VALUE ossl_ec_point_eql(VALUE a, VALUE b)
GetECPoint(b, point2);
GetECGroup(group_v1, group);
- if (EC_POINT_cmp(group, point1, point2, ossl_bn_ctx) == 1)
- return Qfalse;
+ switch (EC_POINT_cmp(group, point1, point2, ossl_bn_ctx)) {
+ case 0: return Qtrue;
+ case 1: return Qfalse;
+ default: ossl_raise(eEC_POINT, "EC_POINT_cmp");
+ }
- return Qtrue;
+ UNREACHABLE;
}
/*
@@ -1445,7 +1269,7 @@ static VALUE ossl_ec_point_is_at_infinity(VALUE self)
switch (EC_POINT_is_at_infinity(group, point)) {
case 1: return Qtrue;
case 0: return Qfalse;
- default: ossl_raise(cEC_POINT, "EC_POINT_is_at_infinity");
+ default: ossl_raise(eEC_POINT, "EC_POINT_is_at_infinity");
}
UNREACHABLE;
@@ -1466,7 +1290,7 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self)
switch (EC_POINT_is_on_curve(group, point, ossl_bn_ctx)) {
case 1: return Qtrue;
case 0: return Qfalse;
- default: ossl_raise(cEC_POINT, "EC_POINT_is_on_curve");
+ default: ossl_raise(eEC_POINT, "EC_POINT_is_on_curve");
}
UNREACHABLE;
@@ -1475,6 +1299,8 @@ static VALUE ossl_ec_point_is_on_curve(VALUE self)
/*
* call-seq:
* point.make_affine! => self
+ *
+ * This method is deprecated and should not be used. This is a no-op.
*/
static VALUE ossl_ec_point_make_affine(VALUE self)
{
@@ -1484,8 +1310,11 @@ static VALUE ossl_ec_point_make_affine(VALUE self)
GetECPoint(self, point);
GetECPointGroup(self, group);
+ rb_warn("OpenSSL::PKey::EC::Point#make_affine! is deprecated");
+#if !OSSL_OPENSSL_PREREQ(3, 0, 0)
if (EC_POINT_make_affine(group, point, ossl_bn_ctx) != 1)
- ossl_raise(cEC_POINT, "EC_POINT_make_affine");
+ ossl_raise(eEC_POINT, "EC_POINT_make_affine");
+#endif
return self;
}
@@ -1503,7 +1332,7 @@ static VALUE ossl_ec_point_invert(VALUE self)
GetECPointGroup(self, group);
if (EC_POINT_invert(group, point, ossl_bn_ctx) != 1)
- ossl_raise(cEC_POINT, "EC_POINT_invert");
+ ossl_raise(eEC_POINT, "EC_POINT_invert");
return self;
}
@@ -1521,7 +1350,7 @@ static VALUE ossl_ec_point_set_to_infinity(VALUE self)
GetECPointGroup(self, group);
if (EC_POINT_set_to_infinity(group, point) != 1)
- ossl_raise(cEC_POINT, "EC_POINT_set_to_infinity");
+ ossl_raise(eEC_POINT, "EC_POINT_set_to_infinity");
return self;
}
@@ -1564,6 +1393,34 @@ ossl_ec_point_to_octet_string(VALUE self, VALUE conversion_form)
/*
* call-seq:
+ * point.add(point) => point
+ *
+ * Performs elliptic curve point addition.
+ */
+static VALUE ossl_ec_point_add(VALUE self, VALUE other)
+{
+ EC_POINT *point_self, *point_other, *point_result;
+ const EC_GROUP *group;
+ VALUE group_v = rb_attr_get(self, id_i_group);
+ VALUE result;
+
+ GetECPoint(self, point_self);
+ GetECPoint(other, point_other);
+ GetECGroup(group_v, group);
+
+ result = rb_obj_alloc(cEC_POINT);
+ ossl_ec_point_initialize(1, &group_v, result);
+ GetECPoint(result, point_result);
+
+ if (EC_POINT_add(group, point_result, point_self, point_other, ossl_bn_ctx) != 1) {
+ ossl_raise(eEC_POINT, "EC_POINT_add");
+ }
+
+ return result;
+}
+
+/*
+ * call-seq:
* point.mul(bn1 [, bn2]) => point
* point.mul(bns, points [, bn2]) => point
*
@@ -1603,6 +1460,10 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
if (EC_POINT_mul(group, point_result, bn_g, point_self, bn, ossl_bn_ctx) != 1)
ossl_raise(eEC_POINT, NULL);
} else {
+#if (defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3) || defined(LIBRESSL_VERSION_NUMBER)
+ rb_raise(rb_eNotImpError, "calling #mul with arrays is not" \
+ "supported by this OpenSSL version");
+#else
/*
* bignums | arg1[0] | arg1[1] | arg1[2] | ...
* points | self | arg2[0] | arg2[1] | ...
@@ -1617,6 +1478,9 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
if (RARRAY_LEN(arg1) != RARRAY_LEN(arg2) + 1) /* arg2 must be 1 larger */
ossl_raise(rb_eArgError, "bns must be 1 longer than points; see the documentation");
+ rb_warning("OpenSSL::PKey::EC::Point#mul(ary, ary) is deprecated; " \
+ "use #mul(bn) form instead");
+
num = RARRAY_LEN(arg1);
bns_tmp = rb_ary_tmp_new(num);
bignums = ALLOCV_N(const BIGNUM *, tmp_b, num);
@@ -1642,6 +1506,7 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
ALLOCV_END(tmp_b);
ALLOCV_END(tmp_p);
+#endif
}
return result;
@@ -1682,10 +1547,6 @@ void Init_ossl_ec(void)
s_GFp = rb_intern("GFp");
s_GF2m = rb_intern("GF2m");
- s_GFp_simple = rb_intern("GFp_simple");
- s_GFp_mont = rb_intern("GFp_mont");
- s_GFp_nist = rb_intern("GFp_nist");
- s_GF2m_simple = rb_intern("GF2m_simple");
ID_uncompressed = rb_intern("uncompressed");
ID_compressed = rb_intern("compressed");
@@ -1700,8 +1561,9 @@ void Init_ossl_ec(void)
rb_define_singleton_method(cEC, "generate", ossl_ec_key_s_generate, 1);
rb_define_method(cEC, "initialize", ossl_ec_key_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cEC, "initialize_copy", ossl_ec_key_initialize_copy, 1);
-/* copy/dup/cmp */
+#endif
rb_define_method(cEC, "group", ossl_ec_key_get_group, 0);
rb_define_method(cEC, "group=", ossl_ec_key_set_group, 1);
@@ -1724,15 +1586,9 @@ void Init_ossl_ec(void)
rb_define_alias(cEC, "generate_key", "generate_key!");
rb_define_method(cEC, "check_key", ossl_ec_key_check_key, 0);
- rb_define_method(cEC, "dh_compute_key", ossl_ec_key_dh_compute_key, 1);
- rb_define_method(cEC, "dsa_sign_asn1", ossl_ec_key_dsa_sign_asn1, 1);
- rb_define_method(cEC, "dsa_verify_asn1", ossl_ec_key_dsa_verify_asn1, 2);
-/* do_sign/do_verify */
-
rb_define_method(cEC, "export", ossl_ec_key_export, -1);
rb_define_alias(cEC, "to_pem", "export");
rb_define_method(cEC, "to_der", ossl_ec_key_to_der, 0);
- rb_define_method(cEC, "to_text", ossl_ec_key_to_text, 0);
rb_define_alloc_func(cEC_GROUP, ossl_ec_group_alloc);
@@ -1786,6 +1642,7 @@ void Init_ossl_ec(void)
/* all the other methods */
rb_define_method(cEC_POINT, "to_octet_string", ossl_ec_point_to_octet_string, 1);
+ rb_define_method(cEC_POINT, "add", ossl_ec_point_add, 1);
rb_define_method(cEC_POINT, "mul", ossl_ec_point_mul, -1);
id_i_group = rb_intern("@group");
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index 4800fb2710..072adabe62 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -24,16 +24,16 @@
} while (0)
static inline int
-RSA_HAS_PRIVATE(RSA *rsa)
+RSA_HAS_PRIVATE(OSSL_3_const RSA *rsa)
{
- const BIGNUM *p, *q;
+ const BIGNUM *e, *d;
- RSA_get0_factors(rsa, &p, &q);
- return p && q; /* d? why? */
+ RSA_get0_key(rsa, NULL, &e, &d);
+ return e && d;
}
static inline int
-RSA_PRIVATE(VALUE obj, RSA *rsa)
+RSA_PRIVATE(VALUE obj, OSSL_3_const RSA *rsa)
{
return RSA_HAS_PRIVATE(rsa) || OSSL_PKEY_IS_PRIVATE(obj);
}
@@ -45,174 +45,30 @@ VALUE cRSA;
VALUE eRSAError;
/*
- * Public
- */
-static VALUE
-rsa_instance(VALUE klass, RSA *rsa)
-{
- EVP_PKEY *pkey;
- VALUE obj;
-
- if (!rsa) {
- return Qfalse;
- }
- obj = NewPKey(klass);
- if (!(pkey = EVP_PKEY_new())) {
- return Qfalse;
- }
- if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
- EVP_PKEY_free(pkey);
- return Qfalse;
- }
- SetPKey(obj, pkey);
-
- return obj;
-}
-
-VALUE
-ossl_rsa_new(EVP_PKEY *pkey)
-{
- VALUE obj;
-
- if (!pkey) {
- obj = rsa_instance(cRSA, RSA_new());
- }
- else {
- obj = NewPKey(cRSA);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA) {
- ossl_raise(rb_eTypeError, "Not a RSA key!");
- }
- SetPKey(obj, pkey);
- }
- if (obj == Qfalse) {
- ossl_raise(eRSAError, NULL);
- }
-
- return obj;
-}
-
-/*
* Private
*/
-struct rsa_blocking_gen_arg {
- RSA *rsa;
- BIGNUM *e;
- int size;
- BN_GENCB *cb;
- int result;
-};
-
-static void *
-rsa_blocking_gen(void *arg)
-{
- struct rsa_blocking_gen_arg *gen = (struct rsa_blocking_gen_arg *)arg;
- gen->result = RSA_generate_key_ex(gen->rsa, gen->size, gen->e, gen->cb);
- return 0;
-}
-
-static RSA *
-rsa_generate(int size, unsigned long exp)
-{
- int i;
- struct ossl_generate_cb_arg cb_arg = { 0 };
- struct rsa_blocking_gen_arg gen_arg;
- RSA *rsa = RSA_new();
- BIGNUM *e = BN_new();
- BN_GENCB *cb = BN_GENCB_new();
-
- if (!rsa || !e || !cb) {
- RSA_free(rsa);
- BN_free(e);
- BN_GENCB_free(cb);
- return NULL;
- }
- for (i = 0; i < (int)sizeof(exp) * 8; ++i) {
- if (exp & (1UL << i)) {
- if (BN_set_bit(e, i) == 0) {
- BN_free(e);
- RSA_free(rsa);
- BN_GENCB_free(cb);
- return NULL;
- }
- }
- }
-
- if (rb_block_given_p())
- cb_arg.yield = 1;
- BN_GENCB_set(cb, ossl_generate_cb_2, &cb_arg);
- gen_arg.rsa = rsa;
- gen_arg.e = e;
- gen_arg.size = size;
- gen_arg.cb = cb;
- if (cb_arg.yield == 1) {
- /* we cannot release GVL when callback proc is supplied */
- rsa_blocking_gen(&gen_arg);
- } else {
- /* there's a chance to unblock */
- rb_thread_call_without_gvl(rsa_blocking_gen, &gen_arg, ossl_generate_cb_stop, &cb_arg);
- }
-
- BN_GENCB_free(cb);
- BN_free(e);
- if (!gen_arg.result) {
- RSA_free(rsa);
- if (cb_arg.state) {
- /* must clear OpenSSL error stack */
- ossl_clear_error();
- rb_jump_tag(cb_arg.state);
- }
- return NULL;
- }
-
- return rsa;
-}
-
/*
* call-seq:
- * RSA.generate(size) => RSA instance
- * RSA.generate(size, exponent) => RSA instance
+ * RSA.new -> rsa
+ * RSA.new(encoded_key [, passphrase]) -> rsa
+ * RSA.new(encoded_key) { passphrase } -> rsa
+ * RSA.new(size [, exponent]) -> rsa
*
- * Generates an RSA keypair. _size_ is an integer representing the desired key
- * size. Keys smaller than 1024 should be considered insecure. _exponent_ is
- * an odd number normally 3, 17, or 65537.
- */
-static VALUE
-ossl_rsa_s_generate(int argc, VALUE *argv, VALUE klass)
-{
-/* why does this method exist? why can't initialize take an optional exponent? */
- RSA *rsa;
- VALUE size, exp;
- VALUE obj;
-
- rb_scan_args(argc, argv, "11", &size, &exp);
-
- rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2ULONG(exp)); /* err handled by rsa_instance */
- obj = rsa_instance(klass, rsa);
-
- if (obj == Qfalse) {
- RSA_free(rsa);
- ossl_raise(eRSAError, NULL);
- }
-
- return obj;
-}
-
-/*
- * call-seq:
- * RSA.new(key_size) => RSA instance
- * RSA.new(encoded_key) => RSA instance
- * RSA.new(encoded_key, pass_phrase) => RSA instance
+ * Generates or loads an \RSA keypair.
*
- * Generates or loads an RSA keypair. If an integer _key_size_ is given it
- * represents the desired key size. Keys less than 1024 bits should be
- * considered insecure.
+ * If called without arguments, creates a new instance with no key components
+ * set. They can be set individually by #set_key, #set_factors, and
+ * #set_crt_params.
*
- * A key can instead be loaded from an _encoded_key_ which must be PEM or DER
- * encoded. A _pass_phrase_ can be used to decrypt the key. If none is given
- * OpenSSL will prompt for the pass phrase.
+ * If called with a String, tries to parse as DER or PEM encoding of an \RSA key.
+ * Note that, if _passphrase_ is not specified but the key is encrypted with a
+ * passphrase, \OpenSSL will prompt for it.
+ * See also OpenSSL::PKey.read which can parse keys of any kinds.
*
- * = Examples
+ * If called with a number, generates a new key pair. This form works as an
+ * alias of RSA.generate.
*
+ * Examples:
* OpenSSL::PKey::RSA.new 2048
* OpenSSL::PKey::RSA.new File.read 'rsa.pem'
* OpenSSL::PKey::RSA.new File.read('rsa.pem'), 'my pass phrase'
@@ -222,74 +78,91 @@ ossl_rsa_initialize(int argc, VALUE *argv, VALUE self)
{
EVP_PKEY *pkey;
RSA *rsa;
- BIO *in;
+ BIO *in = NULL;
VALUE arg, pass;
+ int type;
- GetPKey(self, pkey);
- if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
+
+ /* The RSA.new(size, generator) form is handled by lib/openssl/pkey.rb */
+ rb_scan_args(argc, argv, "02", &arg, &pass);
+ if (argc == 0) {
rsa = RSA_new();
+ if (!rsa)
+ ossl_raise(eRSAError, "RSA_new");
+ goto legacy;
}
- else if (RB_INTEGER_TYPE_P(arg)) {
- rsa = rsa_generate(NUM2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2ULONG(pass));
- if (!rsa) ossl_raise(eRSAError, NULL);
- }
- else {
- pass = ossl_pem_passwd_value(pass);
- arg = ossl_to_der_if_possible(arg);
- in = ossl_obj2bio(&arg);
- rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, (void *)pass);
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = d2i_RSAPrivateKey_bio(in, NULL);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = d2i_RSA_PUBKEY_bio(in, NULL);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
- }
- if (!rsa) {
- OSSL_BIO_reset(in);
- rsa = d2i_RSAPublicKey_bio(in, NULL);
- }
- BIO_free(in);
- if (!rsa) {
- ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
- }
- }
- if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
- RSA_free(rsa);
- ossl_raise(eRSAError, NULL);
+
+ pass = ossl_pem_passwd_value(pass);
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+
+ /* First try RSAPublicKey format */
+ rsa = d2i_RSAPublicKey_bio(in, NULL);
+ if (rsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+ rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
+ if (rsa)
+ goto legacy;
+ OSSL_BIO_reset(in);
+
+ /* Use the generic routine */
+ pkey = ossl_pkey_read_generic(in, pass);
+ BIO_free(in);
+ if (!pkey)
+ ossl_raise(eRSAError, "Neither PUB key nor PRIV key");
+
+ type = EVP_PKEY_base_id(pkey);
+ if (type != EVP_PKEY_RSA) {
+ EVP_PKEY_free(pkey);
+ rb_raise(eRSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
}
+ RTYPEDDATA_DATA(self) = pkey;
+ return self;
+ legacy:
+ BIO_free(in);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_RSA(pkey, rsa) != 1) {
+ EVP_PKEY_free(pkey);
+ RSA_free(rsa);
+ ossl_raise(eRSAError, "EVP_PKEY_assign_RSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#ifndef HAVE_EVP_PKEY_DUP
static VALUE
ossl_rsa_initialize_copy(VALUE self, VALUE other)
{
EVP_PKEY *pkey;
RSA *rsa, *rsa_new;
- GetPKey(self, pkey);
- if (EVP_PKEY_base_id(pkey) != EVP_PKEY_NONE)
- ossl_raise(eRSAError, "RSA already initialized");
+ TypedData_Get_Struct(self, EVP_PKEY, &ossl_evp_pkey_type, pkey);
+ if (pkey)
+ rb_raise(rb_eTypeError, "pkey already initialized");
GetRSA(other, rsa);
- rsa_new = ASN1_dup((i2d_of_void *)i2d_RSAPrivateKey, (d2i_of_void *)d2i_RSAPrivateKey, (char *)rsa);
+ rsa_new = (RSA *)ASN1_dup((i2d_of_void *)i2d_RSAPrivateKey,
+ (d2i_of_void *)d2i_RSAPrivateKey,
+ (char *)rsa);
if (!rsa_new)
ossl_raise(eRSAError, "ASN1_dup");
- EVP_PKEY_assign_RSA(pkey, rsa_new);
+ pkey = EVP_PKEY_new();
+ if (!pkey || EVP_PKEY_assign_RSA(pkey, rsa_new) != 1) {
+ RSA_free(rsa_new);
+ ossl_raise(eRSAError, "EVP_PKEY_assign_RSA");
+ }
+ RTYPEDDATA_DATA(self) = pkey;
return self;
}
+#endif
/*
* call-seq:
@@ -301,7 +174,7 @@ ossl_rsa_initialize_copy(VALUE self, VALUE other)
static VALUE
ossl_rsa_is_public(VALUE self)
{
- RSA *rsa;
+ OSSL_3_const RSA *rsa;
GetRSA(self, rsa);
/*
@@ -320,13 +193,28 @@ ossl_rsa_is_public(VALUE self)
static VALUE
ossl_rsa_is_private(VALUE self)
{
- RSA *rsa;
+ OSSL_3_const RSA *rsa;
GetRSA(self, rsa);
return RSA_PRIVATE(self, rsa) ? Qtrue : Qfalse;
}
+static int
+can_export_rsaprivatekey(VALUE self)
+{
+ OSSL_3_const RSA *rsa;
+ const BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp;
+
+ GetRSA(self, rsa);
+
+ RSA_get0_key(rsa, &n, &e, &d);
+ RSA_get0_factors(rsa, &p, &q);
+ RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
+
+ return n && e && d && p && q && dmp1 && dmq1 && iqmp;
+}
+
/*
* call-seq:
* rsa.export([cipher, pass_phrase]) => PEM-format String
@@ -340,37 +228,10 @@ ossl_rsa_is_private(VALUE self)
static VALUE
ossl_rsa_export(int argc, VALUE *argv, VALUE self)
{
- RSA *rsa;
- BIO *out;
- const EVP_CIPHER *ciph = NULL;
- VALUE cipher, pass, str;
-
- GetRSA(self, rsa);
-
- rb_scan_args(argc, argv, "02", &cipher, &pass);
-
- if (!NIL_P(cipher)) {
- ciph = ossl_evp_get_cipherbyname(cipher);
- pass = ossl_pem_passwd_value(pass);
- }
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eRSAError, NULL);
- }
- if (RSA_HAS_PRIVATE(rsa)) {
- if (!PEM_write_bio_RSAPrivateKey(out, rsa, ciph, NULL, 0,
- ossl_pem_passwd_cb, (void *)pass)) {
- BIO_free(out);
- ossl_raise(eRSAError, NULL);
- }
- } else {
- if (!PEM_write_bio_RSA_PUBKEY(out, rsa)) {
- BIO_free(out);
- ossl_raise(eRSAError, NULL);
- }
- }
- str = ossl_membio2str(out);
-
- return str;
+ if (can_export_rsaprivatekey(self))
+ return ossl_pkey_export_traditional(argc, argv, self, 0);
+ else
+ return ossl_pkey_export_spki(self, 0);
}
/*
@@ -382,158 +243,10 @@ ossl_rsa_export(int argc, VALUE *argv, VALUE self)
static VALUE
ossl_rsa_to_der(VALUE self)
{
- RSA *rsa;
- int (*i2d_func)(const RSA *, unsigned char **);
- unsigned char *p;
- long len;
- VALUE str;
-
- GetRSA(self, rsa);
- if (RSA_HAS_PRIVATE(rsa))
- i2d_func = i2d_RSAPrivateKey;
+ if (can_export_rsaprivatekey(self))
+ return ossl_pkey_export_traditional(0, NULL, self, 1);
else
- i2d_func = (int (*)(const RSA *, unsigned char **))i2d_RSA_PUBKEY;
- if((len = i2d_func(rsa, NULL)) <= 0)
- ossl_raise(eRSAError, NULL);
- str = rb_str_new(0, len);
- p = (unsigned char *)RSTRING_PTR(str);
- if(i2d_func(rsa, &p) < 0)
- ossl_raise(eRSAError, NULL);
- ossl_str_adjust(str, p);
-
- return str;
-}
-
-/*
- * call-seq:
- * rsa.public_encrypt(string) => String
- * rsa.public_encrypt(string, padding) => String
- *
- * Encrypt _string_ with the public key. _padding_ defaults to PKCS1_PADDING.
- * The encrypted string output can be decrypted using #private_decrypt.
- */
-static VALUE
-ossl_rsa_public_encrypt(int argc, VALUE *argv, VALUE self)
-{
- RSA *rsa;
- const BIGNUM *rsa_n;
- int buf_len, pad;
- VALUE str, buffer, padding;
-
- GetRSA(self, rsa);
- RSA_get0_key(rsa, &rsa_n, NULL, NULL);
- if (!rsa_n)
- ossl_raise(eRSAError, "incomplete RSA");
- rb_scan_args(argc, argv, "11", &buffer, &padding);
- pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
- StringValue(buffer);
- str = rb_str_new(0, RSA_size(rsa));
- buf_len = RSA_public_encrypt(RSTRING_LENINT(buffer), (unsigned char *)RSTRING_PTR(buffer),
- (unsigned char *)RSTRING_PTR(str), rsa, pad);
- if (buf_len < 0) ossl_raise(eRSAError, NULL);
- rb_str_set_len(str, buf_len);
-
- return str;
-}
-
-/*
- * call-seq:
- * rsa.public_decrypt(string) => String
- * rsa.public_decrypt(string, padding) => String
- *
- * Decrypt _string_, which has been encrypted with the private key, with the
- * public key. _padding_ defaults to PKCS1_PADDING.
- */
-static VALUE
-ossl_rsa_public_decrypt(int argc, VALUE *argv, VALUE self)
-{
- RSA *rsa;
- const BIGNUM *rsa_n;
- int buf_len, pad;
- VALUE str, buffer, padding;
-
- GetRSA(self, rsa);
- RSA_get0_key(rsa, &rsa_n, NULL, NULL);
- if (!rsa_n)
- ossl_raise(eRSAError, "incomplete RSA");
- rb_scan_args(argc, argv, "11", &buffer, &padding);
- pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
- StringValue(buffer);
- str = rb_str_new(0, RSA_size(rsa));
- buf_len = RSA_public_decrypt(RSTRING_LENINT(buffer), (unsigned char *)RSTRING_PTR(buffer),
- (unsigned char *)RSTRING_PTR(str), rsa, pad);
- if (buf_len < 0) ossl_raise(eRSAError, NULL);
- rb_str_set_len(str, buf_len);
-
- return str;
-}
-
-/*
- * call-seq:
- * rsa.private_encrypt(string) => String
- * rsa.private_encrypt(string, padding) => String
- *
- * Encrypt _string_ with the private key. _padding_ defaults to PKCS1_PADDING.
- * The encrypted string output can be decrypted using #public_decrypt.
- */
-static VALUE
-ossl_rsa_private_encrypt(int argc, VALUE *argv, VALUE self)
-{
- RSA *rsa;
- const BIGNUM *rsa_n;
- int buf_len, pad;
- VALUE str, buffer, padding;
-
- GetRSA(self, rsa);
- RSA_get0_key(rsa, &rsa_n, NULL, NULL);
- if (!rsa_n)
- ossl_raise(eRSAError, "incomplete RSA");
- if (!RSA_PRIVATE(self, rsa))
- ossl_raise(eRSAError, "private key needed.");
- rb_scan_args(argc, argv, "11", &buffer, &padding);
- pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
- StringValue(buffer);
- str = rb_str_new(0, RSA_size(rsa));
- buf_len = RSA_private_encrypt(RSTRING_LENINT(buffer), (unsigned char *)RSTRING_PTR(buffer),
- (unsigned char *)RSTRING_PTR(str), rsa, pad);
- if (buf_len < 0) ossl_raise(eRSAError, NULL);
- rb_str_set_len(str, buf_len);
-
- return str;
-}
-
-/*
- * call-seq:
- * rsa.private_decrypt(string) => String
- * rsa.private_decrypt(string, padding) => String
- *
- * Decrypt _string_, which has been encrypted with the public key, with the
- * private key. _padding_ defaults to PKCS1_PADDING.
- */
-static VALUE
-ossl_rsa_private_decrypt(int argc, VALUE *argv, VALUE self)
-{
- RSA *rsa;
- const BIGNUM *rsa_n;
- int buf_len, pad;
- VALUE str, buffer, padding;
-
- GetRSA(self, rsa);
- RSA_get0_key(rsa, &rsa_n, NULL, NULL);
- if (!rsa_n)
- ossl_raise(eRSAError, "incomplete RSA");
- if (!RSA_PRIVATE(self, rsa))
- ossl_raise(eRSAError, "private key needed.");
- rb_scan_args(argc, argv, "11", &buffer, &padding);
- pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
- StringValue(buffer);
- str = rb_str_new(0, RSA_size(rsa));
- buf_len = RSA_private_decrypt(RSTRING_LENINT(buffer), (unsigned char *)RSTRING_PTR(buffer),
- (unsigned char *)RSTRING_PTR(str), rsa, pad);
- if (buf_len < 0) ossl_raise(eRSAError, NULL);
- rb_str_set_len(str, buf_len);
-
- return str;
+ return ossl_pkey_export_spki(self, 1);
}
/*
@@ -565,7 +278,7 @@ ossl_rsa_private_decrypt(int argc, VALUE *argv, VALUE self)
* data = "Sign me!"
* pkey = OpenSSL::PKey::RSA.new(2048)
* signature = pkey.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA256")
- * pub_key = pkey.public_key
+ * pub_key = OpenSSL::PKey.read(pkey.public_to_der)
* puts pub_key.verify_pss("SHA256", signature, data,
* salt_length: :auto, mgf1_hash: "SHA256") # => true
*/
@@ -740,7 +453,7 @@ ossl_rsa_verify_pss(int argc, VALUE *argv, VALUE self)
static VALUE
ossl_rsa_get_params(VALUE self)
{
- RSA *rsa;
+ OSSL_3_const RSA *rsa;
VALUE hash;
const BIGNUM *n, *e, *d, *p, *q, *dmp1, *dmq1, *iqmp;
@@ -763,88 +476,6 @@ ossl_rsa_get_params(VALUE self)
}
/*
- * call-seq:
- * rsa.to_text => String
- *
- * THIS METHOD IS INSECURE, PRIVATE INFORMATION CAN LEAK OUT!!!
- *
- * Dumps all parameters of a keypair to a String
- *
- * Don't use :-)) (It's up to you)
- */
-static VALUE
-ossl_rsa_to_text(VALUE self)
-{
- RSA *rsa;
- BIO *out;
- VALUE str;
-
- GetRSA(self, rsa);
- if (!(out = BIO_new(BIO_s_mem()))) {
- ossl_raise(eRSAError, NULL);
- }
- if (!RSA_print(out, rsa, 0)) { /* offset = 0 */
- BIO_free(out);
- ossl_raise(eRSAError, NULL);
- }
- str = ossl_membio2str(out);
-
- return str;
-}
-
-/*
- * call-seq:
- * rsa.public_key -> RSA
- *
- * Makes new RSA instance containing the public key from the private key.
- */
-static VALUE
-ossl_rsa_to_public_key(VALUE self)
-{
- EVP_PKEY *pkey;
- RSA *rsa;
- VALUE obj;
-
- GetPKeyRSA(self, pkey);
- /* err check performed by rsa_instance */
- rsa = RSAPublicKey_dup(EVP_PKEY_get0_RSA(pkey));
- obj = rsa_instance(rb_obj_class(self), rsa);
- if (obj == Qfalse) {
- RSA_free(rsa);
- ossl_raise(eRSAError, NULL);
- }
- return obj;
-}
-
-/*
- * TODO: Test me
-
-static VALUE
-ossl_rsa_blinding_on(VALUE self)
-{
- RSA *rsa;
-
- GetRSA(self, rsa);
-
- if (RSA_blinding_on(rsa, ossl_bn_ctx) != 1) {
- ossl_raise(eRSAError, NULL);
- }
- return self;
-}
-
-static VALUE
-ossl_rsa_blinding_off(VALUE self)
-{
- RSA *rsa;
-
- GetRSA(self, rsa);
- RSA_blinding_off(rsa);
-
- return self;
-}
- */
-
-/*
* Document-method: OpenSSL::PKey::RSA#set_key
* call-seq:
* rsa.set_key(n, e, d) -> self
@@ -905,22 +536,17 @@ Init_ossl_rsa(void)
*/
cRSA = rb_define_class_under(mPKey, "RSA", cPKey);
- rb_define_singleton_method(cRSA, "generate", ossl_rsa_s_generate, -1);
rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1);
+#ifndef HAVE_EVP_PKEY_DUP
rb_define_method(cRSA, "initialize_copy", ossl_rsa_initialize_copy, 1);
+#endif
rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0);
rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0);
- rb_define_method(cRSA, "to_text", ossl_rsa_to_text, 0);
rb_define_method(cRSA, "export", ossl_rsa_export, -1);
rb_define_alias(cRSA, "to_pem", "export");
rb_define_alias(cRSA, "to_s", "export");
rb_define_method(cRSA, "to_der", ossl_rsa_to_der, 0);
- rb_define_method(cRSA, "public_key", ossl_rsa_to_public_key, 0);
- rb_define_method(cRSA, "public_encrypt", ossl_rsa_public_encrypt, -1);
- rb_define_method(cRSA, "public_decrypt", ossl_rsa_public_decrypt, -1);
- rb_define_method(cRSA, "private_encrypt", ossl_rsa_private_encrypt, -1);
- rb_define_method(cRSA, "private_decrypt", ossl_rsa_private_decrypt, -1);
rb_define_method(cRSA, "sign_pss", ossl_rsa_sign_pss, -1);
rb_define_method(cRSA, "verify_pss", ossl_rsa_verify_pss, -1);
@@ -938,11 +564,6 @@ Init_ossl_rsa(void)
rb_define_method(cRSA, "params", ossl_rsa_get_params, 0);
- DefRSAConst(PKCS1_PADDING);
- DefRSAConst(SSLV23_PADDING);
- DefRSAConst(NO_PADDING);
- DefRSAConst(PKCS1_OAEP_PADDING);
-
/*
* TODO: Test it
rb_define_method(cRSA, "blinding_on!", ossl_rsa_blinding_on, 0);
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 4a4f9dd5bf..659dc818b6 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -120,36 +120,6 @@ ossl_rand_bytes(VALUE self, VALUE len)
return str;
}
-#if defined(HAVE_RAND_PSEUDO_BYTES)
-/*
- * call-seq:
- * pseudo_bytes(length) -> string
- *
- * Generates a String with _length_ number of pseudo-random bytes.
- *
- * Pseudo-random byte sequences generated by ::pseudo_bytes will be unique if
- * they are of sufficient length, but are not necessarily unpredictable.
- *
- * === Example
- *
- * OpenSSL::Random.pseudo_bytes(12)
- * #=> "..."
- */
-static VALUE
-ossl_rand_pseudo_bytes(VALUE self, VALUE len)
-{
- VALUE str;
- int n = NUM2INT(len);
-
- str = rb_str_new(0, n);
- if (RAND_pseudo_bytes((unsigned char *)RSTRING_PTR(str), n) < 1) {
- ossl_raise(eRandomError, NULL);
- }
-
- return str;
-}
-#endif
-
#ifdef HAVE_RAND_EGD
/*
* call-seq:
@@ -219,8 +189,8 @@ Init_ossl_rand(void)
rb_define_module_function(mRandom, "load_random_file", ossl_rand_load_file, 1);
rb_define_module_function(mRandom, "write_random_file", ossl_rand_write_file, 1);
rb_define_module_function(mRandom, "random_bytes", ossl_rand_bytes, 1);
-#if defined(HAVE_RAND_PSEUDO_BYTES)
- rb_define_module_function(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
+#if OPENSSL_VERSION_NUMBER < 0x10101000 || defined(LIBRESSL_VERSION_NUMBER)
+ rb_define_alias(rb_singleton_class(mRandom), "pseudo_bytes", "random_bytes");
#endif
#ifdef HAVE_RAND_EGD
rb_define_module_function(mRandom, "egd", ossl_rand_egd, 1);
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index de0556f543..f63992664a 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -11,8 +11,18 @@
*/
#include "ossl.h"
+#ifndef OPENSSL_NO_SOCK
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
+#if !defined(OPENSSL_NO_NEXTPROTONEG) && !OSSL_IS_LIBRESSL
+# define OSSL_USE_NEXTPROTONEG
+#endif
+
+#if !defined(TLS1_3_VERSION) && \
+ OSSL_LIBRESSL_PREREQ(3, 2, 0) && !OSSL_LIBRESSL_PREREQ(3, 4, 0)
+# define TLS1_3_VERSION 0x0304
+#endif
+
#ifdef _WIN32
# define TO_SOCKET(s) _get_osfhandle(s)
#else
@@ -24,7 +34,6 @@
} while (0)
VALUE mSSL;
-static VALUE mSSLExtConfig;
static VALUE eSSLError;
VALUE cSSLContext;
VALUE cSSLSocket;
@@ -32,42 +41,41 @@ VALUE cSSLSocket;
static VALUE eSSLErrorWaitReadable;
static VALUE eSSLErrorWaitWritable;
-static ID id_call, ID_callback_state, id_tmp_dh_callback, id_tmp_ecdh_callback,
- id_npn_protocols_encoded;
+static ID id_call, ID_callback_state, id_tmp_dh_callback,
+ id_npn_protocols_encoded, id_each;
static VALUE sym_exception, sym_wait_readable, sym_wait_writable;
static ID id_i_cert_store, id_i_ca_file, id_i_ca_path, id_i_verify_mode,
id_i_verify_depth, id_i_verify_callback, id_i_client_ca,
id_i_renegotiation_cb, id_i_cert, id_i_key, id_i_extra_chain_cert,
- id_i_client_cert_cb, id_i_tmp_ecdh_callback, id_i_timeout,
+ id_i_client_cert_cb, id_i_timeout,
id_i_session_id_context, id_i_session_get_cb, id_i_session_new_cb,
id_i_session_remove_cb, id_i_npn_select_cb, id_i_npn_protocols,
id_i_alpn_select_cb, id_i_alpn_protocols, id_i_servername_cb,
- id_i_verify_hostname;
+ id_i_verify_hostname, id_i_keylog_cb;
static ID id_i_io, id_i_context, id_i_hostname;
static int ossl_ssl_ex_vcb_idx;
static int ossl_ssl_ex_ptr_idx;
static int ossl_sslctx_ex_ptr_idx;
-#if !defined(HAVE_X509_STORE_UP_REF)
-static int ossl_sslctx_ex_store_p;
-#endif
static void
-ossl_sslctx_free(void *ptr)
+ossl_sslctx_mark(void *ptr)
{
SSL_CTX *ctx = ptr;
-#if !defined(HAVE_X509_STORE_UP_REF)
- if (ctx && SSL_CTX_get_ex_data(ctx, ossl_sslctx_ex_store_p))
- ctx->cert_store = NULL;
-#endif
- SSL_CTX_free(ctx);
+ rb_gc_mark((VALUE)SSL_CTX_get_ex_data(ctx, ossl_sslctx_ex_ptr_idx));
+}
+
+static void
+ossl_sslctx_free(void *ptr)
+{
+ SSL_CTX_free(ptr);
}
static const rb_data_type_t ossl_sslctx_type = {
"OpenSSL/SSL/CTX",
{
- 0, ossl_sslctx_free,
+ ossl_sslctx_mark, ossl_sslctx_free,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
};
@@ -83,7 +91,7 @@ ossl_sslctx_s_alloc(VALUE klass)
VALUE obj;
obj = TypedData_Wrap_Struct(klass, &ossl_sslctx_type, 0);
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
ctx = SSL_CTX_new(TLS_method());
#else
ctx = SSL_CTX_new(SSLv23_method());
@@ -95,14 +103,15 @@ ossl_sslctx_s_alloc(VALUE klass)
RTYPEDDATA_DATA(obj) = ctx;
SSL_CTX_set_ex_data(ctx, ossl_sslctx_ex_ptr_idx, (void *)obj);
-#if !defined(OPENSSL_NO_EC) && defined(HAVE_SSL_CTX_SET_ECDH_AUTO)
+#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER < 0x10100000 && \
+ !defined(LIBRESSL_VERSION_NUMBER)
/* We use SSL_CTX_set1_curves_list() to specify the curve used in ECDH. It
* allows to specify multiple curve names and OpenSSL will select
* automatically from them. In OpenSSL 1.0.2, the automatic selection has to
- * be enabled explicitly. But OpenSSL 1.1.0 removed the knob and it is
- * always enabled. To uniform the behavior, we enable the automatic
- * selection also in 1.0.2. Users can still disable ECDH by removing ECDH
- * cipher suites by SSLContext#ciphers=. */
+ * be enabled explicitly. OpenSSL 1.1.0 and LibreSSL 2.6.1 removed the knob
+ * and it is always enabled. To uniform the behavior, we enable the
+ * automatic selection also in 1.0.2. Users can still disable ECDH by
+ * removing ECDH cipher suites by SSLContext#ciphers=. */
if (!SSL_CTX_set_ecdh_auto(ctx, 1))
ossl_raise(eSSLError, "SSL_CTX_set_ecdh_auto");
#endif
@@ -231,8 +240,7 @@ ossl_client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
return 1;
}
-#if !defined(OPENSSL_NO_DH) || \
- !defined(OPENSSL_NO_EC) && defined(HAVE_SSL_CTX_SET_TMP_ECDH_CALLBACK)
+#if !defined(OPENSSL_NO_DH)
struct tmp_dh_callback_args {
VALUE ssl_obj;
ID id;
@@ -241,22 +249,23 @@ struct tmp_dh_callback_args {
int keylength;
};
-static EVP_PKEY *
-ossl_call_tmp_dh_callback(struct tmp_dh_callback_args *args)
+static VALUE
+ossl_call_tmp_dh_callback(VALUE arg)
{
+ struct tmp_dh_callback_args *args = (struct tmp_dh_callback_args *)arg;
VALUE cb, dh;
EVP_PKEY *pkey;
cb = rb_funcall(args->ssl_obj, args->id, 0);
if (NIL_P(cb))
- return NULL;
+ return (VALUE)NULL;
dh = rb_funcall(cb, id_call, 3, args->ssl_obj, INT2NUM(args->is_export),
INT2NUM(args->keylength));
pkey = GetPKeyPtr(dh);
if (EVP_PKEY_base_id(pkey) != args->type)
- return NULL;
+ return (VALUE)NULL;
- return pkey;
+ return (VALUE)pkey;
}
#endif
@@ -276,7 +285,7 @@ ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
args.keylength = keylength;
args.type = EVP_PKEY_DH;
- pkey = (EVP_PKEY *)rb_protect((VALUE (*)(VALUE))ossl_call_tmp_dh_callback,
+ pkey = (EVP_PKEY *)rb_protect(ossl_call_tmp_dh_callback,
(VALUE)&args, &state);
if (state) {
rb_ivar_set(rb_ssl, ID_callback_state, INT2NUM(state));
@@ -285,39 +294,10 @@ ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
if (!pkey)
return NULL;
- return EVP_PKEY_get0_DH(pkey);
+ return (DH *)EVP_PKEY_get0_DH(pkey);
}
#endif /* OPENSSL_NO_DH */
-#if !defined(OPENSSL_NO_EC) && defined(HAVE_SSL_CTX_SET_TMP_ECDH_CALLBACK)
-static EC_KEY *
-ossl_tmp_ecdh_callback(SSL *ssl, int is_export, int keylength)
-{
- VALUE rb_ssl;
- EVP_PKEY *pkey;
- struct tmp_dh_callback_args args;
- int state;
-
- rb_ssl = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
- args.ssl_obj = rb_ssl;
- args.id = id_tmp_ecdh_callback;
- args.is_export = is_export;
- args.keylength = keylength;
- args.type = EVP_PKEY_EC;
-
- pkey = (EVP_PKEY *)rb_protect((VALUE (*)(VALUE))ossl_call_tmp_dh_callback,
- (VALUE)&args, &state);
- if (state) {
- rb_ivar_set(rb_ssl, ID_callback_state, INT2NUM(state));
- return NULL;
- }
- if (!pkey)
- return NULL;
-
- return EVP_PKEY_get0_EC_KEY(pkey);
-}
-#endif
-
static VALUE
call_verify_certificate_identity(VALUE ctx_v)
{
@@ -359,7 +339,14 @@ ossl_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(status));
return 0;
}
- preverify_ok = ret == Qtrue;
+ if (ret != Qtrue) {
+ preverify_ok = 0;
+#if defined(X509_V_ERR_HOSTNAME_MISMATCH)
+ X509_STORE_CTX_set_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH);
+#else
+ X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_REJECTED);
+#endif
+ }
}
return ossl_verify_cb_call(cb, preverify_ok, ctx);
@@ -380,7 +367,7 @@ ossl_call_session_get_cb(VALUE ary)
}
static SSL_SESSION *
-#if (!defined(LIBRESSL_VERSION_NUMBER) ? OPENSSL_VERSION_NUMBER >= 0x10100000 : LIBRESSL_VERSION_NUMBER >= 0x2080000f)
+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER >= 0x10100000
ossl_sslctx_session_get_cb(SSL *ssl, const unsigned char *buf, int len, int *copy)
#else
ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *buf, int len, int *copy)
@@ -457,6 +444,54 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess)
return 0;
}
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
+/*
+ * It is only compatible with OpenSSL >= 1.1.1. Even if LibreSSL implements
+ * SSL_CTX_set_keylog_callback() from v3.4.2, it does nothing (see
+ * https://github.com/libressl-portable/openbsd/commit/648d39f0f035835d0653342d139883b9661e9cb6).
+ */
+
+struct ossl_call_keylog_cb_args {
+ VALUE ssl_obj;
+ const char * line;
+};
+
+static VALUE
+ossl_call_keylog_cb(VALUE args_v)
+{
+ VALUE sslctx_obj, cb, line_v;
+ struct ossl_call_keylog_cb_args *args = (struct ossl_call_keylog_cb_args *) args_v;
+
+ sslctx_obj = rb_attr_get(args->ssl_obj, id_i_context);
+
+ cb = rb_attr_get(sslctx_obj, id_i_keylog_cb);
+ if (NIL_P(cb)) return Qnil;
+
+ line_v = rb_str_new_cstr(args->line);
+
+ return rb_funcall(cb, id_call, 2, args->ssl_obj, line_v);
+}
+
+static void
+ossl_sslctx_keylog_cb(const SSL *ssl, const char *line)
+{
+ VALUE ssl_obj;
+ struct ossl_call_keylog_cb_args args;
+ int state = 0;
+
+ OSSL_Debug("SSL keylog callback entered");
+
+ ssl_obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
+ args.ssl_obj = ssl_obj;
+ args.line = line;
+
+ rb_protect(ossl_call_keylog_cb, (VALUE)&args, &state);
+ if (state) {
+ rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state));
+ }
+}
+#endif
+
static VALUE
ossl_call_session_remove_cb(VALUE ary)
{
@@ -589,8 +624,6 @@ ssl_renegotiation_cb(const SSL *ssl)
rb_funcallv(cb, id_call, 1, &ssl_obj);
}
-#if !defined(OPENSSL_NO_NEXTPROTONEG) || \
- defined(HAVE_SSL_CTX_SET_ALPN_SELECT_CB)
static VALUE
ssl_npn_encode_protocol_i(RB_BLOCK_CALL_FUNC_ARGLIST(cur, encoded))
{
@@ -609,7 +642,7 @@ static VALUE
ssl_encode_npn_protocols(VALUE protocols)
{
VALUE encoded = rb_str_new(NULL, 0);
- rb_iterate(rb_each, protocols, ssl_npn_encode_protocol_i, encoded);
+ rb_block_call(protocols, id_each, 0, 0, ssl_npn_encode_protocol_i, encoded);
return encoded;
}
@@ -672,14 +705,13 @@ ssl_npn_select_cb_common(SSL *ssl, VALUE cb, const unsigned char **out,
return SSL_TLSEXT_ERR_OK;
}
-#endif
-#ifndef OPENSSL_NO_NEXTPROTONEG
+#ifdef OSSL_USE_NEXTPROTONEG
static int
ssl_npn_advertise_cb(SSL *ssl, const unsigned char **out, unsigned int *outlen,
void *arg)
{
- VALUE protocols = (VALUE)arg;
+ VALUE protocols = rb_attr_get((VALUE)arg, id_npn_protocols_encoded);
*out = (const unsigned char *) RSTRING_PTR(protocols);
*outlen = RSTRING_LENINT(protocols);
@@ -701,7 +733,6 @@ ssl_npn_select_cb(SSL *ssl, unsigned char **out, unsigned char *outlen,
}
#endif
-#ifdef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
static int
ssl_alpn_select_cb(SSL *ssl, const unsigned char **out, unsigned char *outlen,
const unsigned char *in, unsigned int inlen, void *arg)
@@ -713,7 +744,6 @@ ssl_alpn_select_cb(SSL *ssl, const unsigned char **out, unsigned char *outlen,
return ssl_npn_select_cb_common(ssl, cb, out, outlen, in, inlen);
}
-#endif
/* This function may serve as the entry point to support further callbacks. */
static void
@@ -790,41 +820,15 @@ ossl_sslctx_setup(VALUE self)
SSL_CTX_set_tmp_dh_callback(ctx, ossl_tmp_dh_callback);
#endif
-#if !defined(OPENSSL_NO_EC)
- /* We added SSLContext#tmp_ecdh_callback= in Ruby 2.3.0,
- * but SSL_CTX_set_tmp_ecdh_callback() was removed in OpenSSL 1.1.0. */
- if (RTEST(rb_attr_get(self, id_i_tmp_ecdh_callback))) {
-# if defined(HAVE_SSL_CTX_SET_TMP_ECDH_CALLBACK)
- rb_warn("#tmp_ecdh_callback= is deprecated; use #ecdh_curves= instead");
- SSL_CTX_set_tmp_ecdh_callback(ctx, ossl_tmp_ecdh_callback);
-# if defined(HAVE_SSL_CTX_SET_ECDH_AUTO)
- /* tmp_ecdh_callback and ecdh_auto conflict; OpenSSL ignores
- * tmp_ecdh_callback. So disable ecdh_auto. */
- if (!SSL_CTX_set_ecdh_auto(ctx, 0))
- ossl_raise(eSSLError, "SSL_CTX_set_ecdh_auto");
-# endif
-# else
- ossl_raise(eSSLError, "OpenSSL does not support tmp_ecdh_callback; "
- "use #ecdh_curves= instead");
-# endif
- }
-#endif /* OPENSSL_NO_EC */
+#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
+ SSL_CTX_set_post_handshake_auth(ctx, 1);
+#endif
val = rb_attr_get(self, id_i_cert_store);
if (!NIL_P(val)) {
X509_STORE *store = GetX509StorePtr(val); /* NO NEED TO DUP */
SSL_CTX_set_cert_store(ctx, store);
-#if !defined(HAVE_X509_STORE_UP_REF)
- /*
- * WORKAROUND:
- * X509_STORE can count references, but
- * X509_STORE_free() doesn't care it.
- * So we won't increment it but mark it by ex_data.
- */
- SSL_CTX_set_ex_data(ctx, ossl_sslctx_ex_store_p, ctx);
-#else /* Fixed in OpenSSL 1.0.2; bff9ce4db38b (master), 5b4b9ce976fc (1.0.2) */
X509_STORE_up_ref(store);
-#endif
}
val = rb_attr_get(self, id_i_extra_chain_cert);
@@ -875,10 +879,17 @@ ossl_sslctx_setup(VALUE self)
ca_file = NIL_P(val) ? NULL : StringValueCStr(val);
val = rb_attr_get(self, id_i_ca_path);
ca_path = NIL_P(val) ? NULL : StringValueCStr(val);
+#ifdef HAVE_SSL_CTX_LOAD_VERIFY_FILE
+ if (ca_file && !SSL_CTX_load_verify_file(ctx, ca_file))
+ ossl_raise(eSSLError, "SSL_CTX_load_verify_file");
+ if (ca_path && !SSL_CTX_load_verify_dir(ctx, ca_path))
+ ossl_raise(eSSLError, "SSL_CTX_load_verify_dir");
+#else
if(ca_file || ca_path){
if (!SSL_CTX_load_verify_locations(ctx, ca_file, ca_path))
rb_warning("can't set verify locations");
}
+#endif
val = rb_attr_get(self, id_i_verify_mode);
verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
@@ -892,12 +903,12 @@ ossl_sslctx_setup(VALUE self)
val = rb_attr_get(self, id_i_verify_depth);
if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2INT(val));
-#ifndef OPENSSL_NO_NEXTPROTONEG
+#ifdef OSSL_USE_NEXTPROTONEG
val = rb_attr_get(self, id_i_npn_protocols);
if (!NIL_P(val)) {
VALUE encoded = ssl_encode_npn_protocols(val);
rb_ivar_set(self, id_npn_protocols_encoded, encoded);
- SSL_CTX_set_next_protos_advertised_cb(ctx, ssl_npn_advertise_cb, (void *)encoded);
+ SSL_CTX_set_next_protos_advertised_cb(ctx, ssl_npn_advertise_cb, (void *)self);
OSSL_Debug("SSL NPN advertise callback added");
}
if (RTEST(rb_attr_get(self, id_i_npn_select_cb))) {
@@ -906,7 +917,6 @@ ossl_sslctx_setup(VALUE self)
}
#endif
-#ifdef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
val = rb_attr_get(self, id_i_alpn_protocols);
if (!NIL_P(val)) {
VALUE rprotos = ssl_encode_npn_protocols(val);
@@ -921,7 +931,6 @@ ossl_sslctx_setup(VALUE self)
SSL_CTX_set_alpn_select_cb(ctx, ssl_alpn_select_cb, (void *) self);
OSSL_Debug("SSL ALPN select callback added");
}
-#endif
rb_obj_freeze(self);
@@ -953,6 +962,18 @@ ossl_sslctx_setup(VALUE self)
OSSL_Debug("SSL TLSEXT servername callback added");
}
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
+ /*
+ * It is only compatible with OpenSSL >= 1.1.1. Even if LibreSSL implements
+ * SSL_CTX_set_keylog_callback() from v3.4.2, it does nothing (see
+ * https://github.com/libressl-portable/openbsd/commit/648d39f0f035835d0653342d139883b9661e9cb6).
+ */
+ if (RTEST(rb_attr_get(self, id_i_keylog_cb))) {
+ SSL_CTX_set_keylog_callback(ctx, ossl_sslctx_keylog_cb);
+ OSSL_Debug("SSL keylog callback added");
+ }
+#endif
+
return Qtrue;
}
@@ -1001,27 +1022,13 @@ ossl_sslctx_get_ciphers(VALUE self)
return ary;
}
-/*
- * call-seq:
- * ctx.ciphers = "cipher1:cipher2:..."
- * ctx.ciphers = [name, ...]
- * ctx.ciphers = [[name, version, bits, alg_bits], ...]
- *
- * Sets the list of available cipher suites for this context. Note in a server
- * context some ciphers require the appropriate certificates. For example, an
- * RSA cipher suite can only be chosen when an RSA certificate is available.
- */
static VALUE
-ossl_sslctx_set_ciphers(VALUE self, VALUE v)
+build_cipher_string(VALUE v)
{
- SSL_CTX *ctx;
VALUE str, elem;
int i;
- rb_check_frozen(self);
- if (NIL_P(v))
- return v;
- else if (RB_TYPE_P(v, T_ARRAY)) {
+ if (RB_TYPE_P(v, T_ARRAY)) {
str = rb_str_new(0, 0);
for (i = 0; i < RARRAY_LEN(v); i++) {
elem = rb_ary_entry(v, i);
@@ -1035,14 +1042,113 @@ ossl_sslctx_set_ciphers(VALUE self, VALUE v)
StringValue(str);
}
+ return str;
+}
+
+/*
+ * call-seq:
+ * ctx.ciphers = "cipher1:cipher2:..."
+ * ctx.ciphers = [name, ...]
+ * ctx.ciphers = [[name, version, bits, alg_bits], ...]
+ *
+ * Sets the list of available cipher suites for this context. Note in a server
+ * context some ciphers require the appropriate certificates. For example, an
+ * RSA cipher suite can only be chosen when an RSA certificate is available.
+ */
+static VALUE
+ossl_sslctx_set_ciphers(VALUE self, VALUE v)
+{
+ SSL_CTX *ctx;
+ VALUE str;
+
+ rb_check_frozen(self);
+ if (NIL_P(v))
+ return v;
+
+ str = build_cipher_string(v);
+
GetSSLCTX(self, ctx);
- if (!SSL_CTX_set_cipher_list(ctx, StringValueCStr(str))) {
+ if (!SSL_CTX_set_cipher_list(ctx, StringValueCStr(str)))
ossl_raise(eSSLError, "SSL_CTX_set_cipher_list");
- }
return v;
}
+#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
+/*
+ * call-seq:
+ * ctx.ciphersuites = "cipher1:cipher2:..."
+ * ctx.ciphersuites = [name, ...]
+ * ctx.ciphersuites = [[name, version, bits, alg_bits], ...]
+ *
+ * Sets the list of available TLSv1.3 cipher suites for this context.
+ */
+static VALUE
+ossl_sslctx_set_ciphersuites(VALUE self, VALUE v)
+{
+ SSL_CTX *ctx;
+ VALUE str;
+
+ rb_check_frozen(self);
+ if (NIL_P(v))
+ return v;
+
+ str = build_cipher_string(v);
+
+ GetSSLCTX(self, ctx);
+ if (!SSL_CTX_set_ciphersuites(ctx, StringValueCStr(str)))
+ ossl_raise(eSSLError, "SSL_CTX_set_ciphersuites");
+
+ return v;
+}
+#endif
+
+#ifndef OPENSSL_NO_DH
+/*
+ * call-seq:
+ * ctx.tmp_dh = pkey
+ *
+ * Sets DH parameters used for ephemeral DH key exchange. This is relevant for
+ * servers only.
+ *
+ * +pkey+ is an instance of OpenSSL::PKey::DH. Note that key components
+ * contained in the key object, if any, are ignored. The server will always
+ * generate a new key pair for each handshake.
+ *
+ * Added in version 3.0. See also the man page SSL_set0_tmp_dh_pkey(3).
+ *
+ * Example:
+ * ctx = OpenSSL::SSL::SSLContext.new
+ * ctx.tmp_dh = OpenSSL::DH.generate(2048)
+ * svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx)
+ * Thread.new { svr.accept }
+ */
+static VALUE
+ossl_sslctx_set_tmp_dh(VALUE self, VALUE arg)
+{
+ SSL_CTX *ctx;
+ EVP_PKEY *pkey;
+
+ rb_check_frozen(self);
+ GetSSLCTX(self, ctx);
+ pkey = GetPKeyPtr(arg);
+
+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DH)
+ rb_raise(eSSLError, "invalid pkey type %s (expected DH)",
+ OBJ_nid2sn(EVP_PKEY_base_id(pkey)));
+#ifdef HAVE_SSL_SET0_TMP_DH_PKEY
+ if (!SSL_CTX_set0_tmp_dh_pkey(ctx, pkey))
+ ossl_raise(eSSLError, "SSL_CTX_set0_tmp_dh_pkey");
+ EVP_PKEY_up_ref(pkey);
+#else
+ if (!SSL_CTX_set_tmp_dh(ctx, EVP_PKEY_get0_DH(pkey)))
+ ossl_raise(eSSLError, "SSL_CTX_set_tmp_dh");
+#endif
+
+ return arg;
+}
+#endif
+
#if !defined(OPENSSL_NO_EC)
/*
* call-seq:
@@ -1054,9 +1160,6 @@ ossl_sslctx_set_ciphers(VALUE self, VALUE v)
* Extension. For a server, the list is used by OpenSSL to determine the set of
* shared curves. OpenSSL will pick the most appropriate one from it.
*
- * Note that this works differently with old OpenSSL (<= 1.0.1). Only one curve
- * can be set, and this has no effect for TLS clients.
- *
* === Example
* ctx1 = OpenSSL::SSL::SSLContext.new
* ctx1.ecdh_curves = "X25519:P-256:P-224"
@@ -1080,48 +1183,8 @@ ossl_sslctx_set_ecdh_curves(VALUE self, VALUE arg)
GetSSLCTX(self, ctx);
StringValueCStr(arg);
-#if defined(HAVE_SSL_CTX_SET1_CURVES_LIST)
if (!SSL_CTX_set1_curves_list(ctx, RSTRING_PTR(arg)))
ossl_raise(eSSLError, NULL);
-#else
- /* OpenSSL does not have SSL_CTX_set1_curves_list()... Fallback to
- * SSL_CTX_set_tmp_ecdh(). So only the first curve is used. */
- {
- VALUE curve, splitted;
- EC_KEY *ec;
- int nid;
-
- splitted = rb_str_split(arg, ":");
- if (!RARRAY_LEN(splitted))
- ossl_raise(eSSLError, "invalid input format");
- curve = RARRAY_AREF(splitted, 0);
- StringValueCStr(curve);
-
- /* SSL_CTX_set1_curves_list() accepts NIST names */
- nid = EC_curve_nist2nid(RSTRING_PTR(curve));
- if (nid == NID_undef)
- nid = OBJ_txt2nid(RSTRING_PTR(curve));
- if (nid == NID_undef)
- ossl_raise(eSSLError, "unknown curve name");
-
- ec = EC_KEY_new_by_curve_name(nid);
- if (!ec)
- ossl_raise(eSSLError, NULL);
- EC_KEY_set_asn1_flag(ec, OPENSSL_EC_NAMED_CURVE);
- if (!SSL_CTX_set_tmp_ecdh(ctx, ec)) {
- EC_KEY_free(ec);
- ossl_raise(eSSLError, "SSL_CTX_set_tmp_ecdh");
- }
- EC_KEY_free(ec);
-# if defined(HAVE_SSL_CTX_SET_ECDH_AUTO)
- /* tmp_ecdh and ecdh_auto conflict. tmp_ecdh is ignored when ecdh_auto
- * is enabled. So disable ecdh_auto. */
- if (!SSL_CTX_set_ecdh_auto(ctx, 0))
- ossl_raise(eSSLError, "SSL_CTX_set_ecdh_auto");
-# endif
- }
-#endif
-
return arg;
}
#else
@@ -1212,7 +1275,7 @@ ossl_sslctx_enable_fallback_scsv(VALUE self)
/*
* call-seq:
- * ctx.add_certificate(certiticate, pkey [, extra_certs]) -> self
+ * ctx.add_certificate(certificate, pkey [, extra_certs]) -> self
*
* Adds a certificate to the context. _pkey_ must be a corresponding private
* key with _certificate_.
@@ -1244,10 +1307,6 @@ ossl_sslctx_enable_fallback_scsv(VALUE self)
* ecdsa_pkey = ...
* another_ca_cert = ...
* ctx.add_certificate(ecdsa_cert, ecdsa_pkey, [another_ca_cert])
- *
- * === Note
- * OpenSSL before the version 1.0.2 could handle only one extra chain across
- * all key types. Calling this method discards the chain set previously.
*/
static VALUE
ossl_sslctx_add_certificate(int argc, VALUE *argv, VALUE self)
@@ -1272,7 +1331,7 @@ ossl_sslctx_add_certificate(int argc, VALUE *argv, VALUE self)
EVP_PKEY_free(pub_pkey);
if (!pub_pkey)
rb_raise(rb_eArgError, "certificate does not contain public key");
- if (EVP_PKEY_cmp(pub_pkey, pkey) != 1)
+ if (EVP_PKEY_eq(pub_pkey, pkey) != 1)
rb_raise(rb_eArgError, "public key mismatch");
if (argc >= 3)
@@ -1286,34 +1345,9 @@ ossl_sslctx_add_certificate(int argc, VALUE *argv, VALUE self)
sk_X509_pop_free(extra_chain, X509_free);
ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey");
}
-
- if (extra_chain) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000 && !defined(LIBRESSL_VERSION_NUMBER)
- if (!SSL_CTX_set0_chain(ctx, extra_chain)) {
- sk_X509_pop_free(extra_chain, X509_free);
- ossl_raise(eSSLError, "SSL_CTX_set0_chain");
- }
-#else
- STACK_OF(X509) *orig_extra_chain;
- X509 *x509_tmp;
-
- /* First, clear the existing chain */
- SSL_CTX_get_extra_chain_certs(ctx, &orig_extra_chain);
- if (orig_extra_chain && sk_X509_num(orig_extra_chain)) {
- rb_warning("SSL_CTX_set0_chain() is not available; " \
- "clearing previously set certificate chain");
- SSL_CTX_clear_extra_chain_certs(ctx);
- }
- while ((x509_tmp = sk_X509_shift(extra_chain))) {
- /* Transfers ownership */
- if (!SSL_CTX_add_extra_chain_cert(ctx, x509_tmp)) {
- X509_free(x509_tmp);
- sk_X509_pop_free(extra_chain, X509_free);
- ossl_raise(eSSLError, "SSL_CTX_add_extra_chain_cert");
- }
- }
- sk_X509_free(extra_chain);
-#endif
+ if (extra_chain && !SSL_CTX_set0_chain(ctx, extra_chain)) {
+ sk_X509_pop_free(extra_chain, X509_free);
+ ossl_raise(eSSLError, "SSL_CTX_set0_chain");
}
return self;
}
@@ -1507,12 +1541,19 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
/*
* SSLSocket class
*/
-#ifndef OPENSSL_NO_SOCK
static inline int
ssl_started(SSL *ssl)
{
- /* the FD is set in ossl_ssl_setup(), called by #connect or #accept */
- return SSL_get_fd(ssl) >= 0;
+ /* BIO is created through ossl_ssl_setup(), called by #connect or #accept */
+ return SSL_get_rbio(ssl) != NULL;
+}
+
+static void
+ossl_ssl_mark(void *ptr)
+{
+ SSL *ssl = ptr;
+ rb_gc_mark((VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx));
+ rb_gc_mark((VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx));
}
static void
@@ -1524,7 +1565,7 @@ ossl_ssl_free(void *ssl)
const rb_data_type_t ossl_ssl_type = {
"OpenSSL/SSL",
{
- 0, ossl_ssl_free,
+ ossl_ssl_mark, ossl_ssl_free,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
};
@@ -1535,6 +1576,29 @@ ossl_ssl_s_alloc(VALUE klass)
return TypedData_Wrap_Struct(klass, &ossl_ssl_type, NULL);
}
+static VALUE
+peer_ip_address(VALUE self)
+{
+ VALUE remote_address = rb_funcall(rb_attr_get(self, id_i_io), rb_intern("remote_address"), 0);
+
+ return rb_funcall(remote_address, rb_intern("inspect_sockaddr"), 0);
+}
+
+static VALUE
+fallback_peer_ip_address(VALUE self, VALUE args)
+{
+ return rb_str_new_cstr("(null)");
+}
+
+static VALUE
+peeraddr_ip_str(VALUE self)
+{
+ VALUE rb_mErrno = rb_const_get(rb_cObject, rb_intern("Errno"));
+ VALUE rb_eSystemCallError = rb_const_get(rb_mErrno, rb_intern("SystemCallError"));
+
+ return rb_rescue2(peer_ip_address, self, fallback_peer_ip_address, (VALUE)0, rb_eSystemCallError, NULL);
+}
+
/*
* call-seq:
* SSLSocket.new(io) => aSSLSocket
@@ -1571,6 +1635,7 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
if (rb_respond_to(io, rb_intern("nonblock=")))
rb_funcall(io, rb_intern("nonblock="), 1, Qtrue);
+ Check_Type(io, T_FILE);
rb_ivar_set(self, id_i_io, io);
ssl = SSL_new(ctx);
@@ -1638,8 +1703,33 @@ no_exception_p(VALUE opts)
return 0;
}
+// Provided by Ruby 3.2.0 and later in order to support the default IO#timeout.
+#ifndef RUBY_IO_TIMEOUT_DEFAULT
+#define RUBY_IO_TIMEOUT_DEFAULT Qnil
+#endif
+
+static void
+io_wait_writable(rb_io_t *fptr)
+{
+#ifdef HAVE_RB_IO_MAYBE_WAIT
+ rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT);
+#else
+ rb_io_wait_writable(fptr->fd);
+#endif
+}
+
+static void
+io_wait_readable(rb_io_t *fptr)
+{
+#ifdef HAVE_RB_IO_MAYBE_WAIT
+ rb_io_maybe_wait_readable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT);
+#else
+ rb_io_wait_readable(fptr->fd);
+#endif
+}
+
static VALUE
-ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
+ossl_start_ssl(VALUE self, int (*func)(SSL *), const char *funcname, VALUE opts)
{
SSL *ssl;
rb_io_t *fptr;
@@ -1672,16 +1762,23 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
case SSL_ERROR_WANT_WRITE:
if (no_exception_p(opts)) { return sym_wait_writable; }
write_would_block(nonblock);
- rb_io_wait_writable(fptr->fd);
+ io_wait_writable(fptr);
continue;
case SSL_ERROR_WANT_READ:
if (no_exception_p(opts)) { return sym_wait_readable; }
read_would_block(nonblock);
- rb_io_wait_readable(fptr->fd);
+ io_wait_readable(fptr);
continue;
case SSL_ERROR_SYSCALL:
+#ifdef __APPLE__
+ /* See ossl_ssl_write_internal() */
+ if (errno == EPROTOTYPE)
+ continue;
+#endif
if (errno) rb_sys_fail(funcname);
- ossl_raise(eSSLError, "%s SYSCALL returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl));
+ ossl_raise(eSSLError, "%s SYSCALL returned=%d errno=%d peeraddr=%"PRIsVALUE" state=%s",
+ funcname, ret2, errno, peeraddr_ip_str(self), SSL_state_string_long(ssl));
+
#if defined(SSL_R_CERTIFICATE_VERIFY_FAILED)
case SSL_ERROR_SSL:
err = ERR_peek_last_error();
@@ -1694,13 +1791,15 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
if (!verify_msg)
verify_msg = "(null)";
ossl_clear_error(); /* let ossl_raise() not append message */
- ossl_raise(eSSLError, "%s returned=%d errno=%d state=%s: %s (%s)",
- funcname, ret2, errno, SSL_state_string_long(ssl),
+ ossl_raise(eSSLError, "%s returned=%d errno=%d peeraddr=%"PRIsVALUE" state=%s: %s (%s)",
+ funcname, ret2, errno, peeraddr_ip_str(self), SSL_state_string_long(ssl),
err_msg, verify_msg);
}
#endif
+ /* fallthrough */
default:
- ossl_raise(eSSLError, "%s returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl));
+ ossl_raise(eSSLError, "%s returned=%d errno=%d peeraddr=%"PRIsVALUE" state=%s",
+ funcname, ret2, errno, peeraddr_ip_str(self), SSL_state_string_long(ssl));
}
}
@@ -1711,8 +1810,7 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, VALUE opts)
* call-seq:
* ssl.connect => self
*
- * Initiates an SSL/TLS handshake with a server. The handshake may be started
- * after unencrypted data has been sent over the socket.
+ * Initiates an SSL/TLS handshake with a server.
*/
static VALUE
ossl_ssl_connect(VALUE self)
@@ -1759,8 +1857,7 @@ ossl_ssl_connect_nonblock(int argc, VALUE *argv, VALUE self)
* call-seq:
* ssl.accept => self
*
- * Waits for a SSL/TLS client to initiate a handshake. The handshake may be
- * started after unencrypted data has been sent over the socket.
+ * Waits for a SSL/TLS client to initiate a handshake.
*/
static VALUE
ossl_ssl_accept(VALUE self)
@@ -1807,7 +1904,7 @@ static VALUE
ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
{
SSL *ssl;
- int ilen, nread = 0;
+ int ilen;
VALUE len, str;
rb_io_t *fptr;
VALUE io, opts = Qnil;
@@ -1817,6 +1914,9 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
} else {
rb_scan_args(argc, argv, "11", &len, &str);
}
+ GetSSL(self, ssl);
+ if (!ssl_started(ssl))
+ rb_raise(eSSLError, "SSL session is not started yet");
ilen = NUM2INT(len);
if (NIL_P(str))
@@ -1832,68 +1932,60 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
if (ilen == 0)
return str;
- GetSSL(self, ssl);
io = rb_attr_get(self, id_i_io);
GetOpenFile(io, fptr);
- if (ssl_started(ssl)) {
- for (;;){
- nread = SSL_read(ssl, RSTRING_PTR(str), ilen);
- switch(ssl_get_error(ssl, nread)){
- case SSL_ERROR_NONE:
- goto end;
- case SSL_ERROR_ZERO_RETURN:
- if (no_exception_p(opts)) { return Qnil; }
- rb_eof_error();
- case SSL_ERROR_WANT_WRITE:
- if (no_exception_p(opts)) { return sym_wait_writable; }
+
+ rb_str_locktmp(str);
+ for (;;) {
+ int nread = SSL_read(ssl, RSTRING_PTR(str), ilen);
+ switch (ssl_get_error(ssl, nread)) {
+ case SSL_ERROR_NONE:
+ rb_str_unlocktmp(str);
+ rb_str_set_len(str, nread);
+ return str;
+ case SSL_ERROR_ZERO_RETURN:
+ rb_str_unlocktmp(str);
+ if (no_exception_p(opts)) { return Qnil; }
+ rb_eof_error();
+ case SSL_ERROR_WANT_WRITE:
+ if (nonblock) {
+ rb_str_unlocktmp(str);
+ if (no_exception_p(opts)) { return sym_wait_writable; }
write_would_block(nonblock);
- rb_io_wait_writable(fptr->fd);
- continue;
- case SSL_ERROR_WANT_READ:
- if (no_exception_p(opts)) { return sym_wait_readable; }
+ }
+ io_wait_writable(fptr);
+ continue;
+ case SSL_ERROR_WANT_READ:
+ if (nonblock) {
+ rb_str_unlocktmp(str);
+ if (no_exception_p(opts)) { return sym_wait_readable; }
read_would_block(nonblock);
- rb_io_wait_readable(fptr->fd);
- continue;
- case SSL_ERROR_SYSCALL:
- if (!ERR_peek_error()) {
- if (errno)
- rb_sys_fail(0);
- else {
- /*
- * The underlying BIO returned 0. This is actually a
- * protocol error. But unfortunately, not all
- * implementations cleanly shutdown the TLS connection
- * but just shutdown/close the TCP connection. So report
- * EOF for now...
- */
- if (no_exception_p(opts)) { return Qnil; }
- rb_eof_error();
- }
- }
- /* fall through */
- default:
- ossl_raise(eSSLError, "SSL_read");
- }
- }
- }
- else {
- ID meth = nonblock ? rb_intern("read_nonblock") : rb_intern("sysread");
-
- rb_warning("SSL session is not started yet.");
- if (nonblock) {
- VALUE argv[3];
- argv[0] = len;
- argv[1] = str;
- argv[2] = opts;
- return rb_funcallv_kw(io, meth, 3, argv, RB_PASS_KEYWORDS);
+ }
+ io_wait_readable(fptr);
+ continue;
+ case SSL_ERROR_SYSCALL:
+ if (!ERR_peek_error()) {
+ rb_str_unlocktmp(str);
+ if (errno)
+ rb_sys_fail(0);
+ else {
+ /*
+ * The underlying BIO returned 0. This is actually a
+ * protocol error. But unfortunately, not all
+ * implementations cleanly shutdown the TLS connection
+ * but just shutdown/close the TCP connection. So report
+ * EOF for now...
+ */
+ if (no_exception_p(opts)) { return Qnil; }
+ rb_eof_error();
+ }
+ }
+ /* fall through */
+ default:
+ rb_str_unlocktmp(str);
+ ossl_raise(eSSLError, "SSL_read");
}
- else
- return rb_funcall(io, meth, 2, len, str);
}
-
- end:
- rb_str_set_len(str, nread);
- return str;
}
/*
@@ -1933,61 +2025,55 @@ static VALUE
ossl_ssl_write_internal(VALUE self, VALUE str, VALUE opts)
{
SSL *ssl;
- int nwrite = 0;
rb_io_t *fptr;
- int nonblock = opts != Qfalse;
- VALUE io;
+ int num, nonblock = opts != Qfalse;
+ VALUE tmp, io;
- StringValue(str);
GetSSL(self, ssl);
+ if (!ssl_started(ssl))
+ rb_raise(eSSLError, "SSL session is not started yet");
+
+ tmp = rb_str_new_frozen(StringValue(str));
io = rb_attr_get(self, id_i_io);
GetOpenFile(io, fptr);
- if (ssl_started(ssl)) {
- for (;;){
- int num = RSTRING_LENINT(str);
-
- /* SSL_write(3ssl) manpage states num == 0 is undefined */
- if (num == 0)
- goto end;
-
- nwrite = SSL_write(ssl, RSTRING_PTR(str), num);
- switch(ssl_get_error(ssl, nwrite)){
- case SSL_ERROR_NONE:
- goto end;
- case SSL_ERROR_WANT_WRITE:
- if (no_exception_p(opts)) { return sym_wait_writable; }
- write_would_block(nonblock);
- rb_io_wait_writable(fptr->fd);
- continue;
- case SSL_ERROR_WANT_READ:
- if (no_exception_p(opts)) { return sym_wait_readable; }
- read_would_block(nonblock);
- rb_io_wait_readable(fptr->fd);
+
+ /* SSL_write(3ssl) manpage states num == 0 is undefined */
+ num = RSTRING_LENINT(tmp);
+ if (num == 0)
+ return INT2FIX(0);
+
+ for (;;) {
+ int nwritten = SSL_write(ssl, RSTRING_PTR(tmp), num);
+ switch (ssl_get_error(ssl, nwritten)) {
+ case SSL_ERROR_NONE:
+ return INT2NUM(nwritten);
+ case SSL_ERROR_WANT_WRITE:
+ if (no_exception_p(opts)) { return sym_wait_writable; }
+ write_would_block(nonblock);
+ io_wait_writable(fptr);
+ continue;
+ case SSL_ERROR_WANT_READ:
+ if (no_exception_p(opts)) { return sym_wait_readable; }
+ read_would_block(nonblock);
+ io_wait_readable(fptr);
+ continue;
+ case SSL_ERROR_SYSCALL:
+#ifdef __APPLE__
+ /*
+ * It appears that send syscall can return EPROTOTYPE if the
+ * socket is being torn down. Retry to get a proper errno to
+ * make the error handling in line with the socket library.
+ * [Bug #14713] https://bugs.ruby-lang.org/issues/14713
+ */
+ if (errno == EPROTOTYPE)
continue;
- case SSL_ERROR_SYSCALL:
- if (errno) rb_sys_fail(0);
- default:
- ossl_raise(eSSLError, "SSL_write");
- }
- }
- }
- else {
- ID meth = nonblock ?
- rb_intern("write_nonblock") : rb_intern("syswrite");
-
- rb_warning("SSL session is not started yet.");
- if (nonblock) {
- VALUE argv[2];
- argv[0] = str;
- argv[1] = opts;
- return rb_funcallv_kw(io, meth, 2, argv, RB_PASS_KEYWORDS);
+#endif
+ if (errno) rb_sys_fail(0);
+ /* fallthrough */
+ default:
+ ossl_raise(eSSLError, "SSL_write");
}
- else
- return rb_funcall(io, meth, 1, str);
}
-
- end:
- return INT2NUM(nwrite);
}
/*
@@ -2286,7 +2372,57 @@ ossl_ssl_get_verify_result(VALUE self)
GetSSL(self, ssl);
- return INT2NUM(SSL_get_verify_result(ssl));
+ return LONG2NUM(SSL_get_verify_result(ssl));
+}
+
+/*
+ * call-seq:
+ * ssl.finished_message => "finished message"
+ *
+ * Returns the last *Finished* message sent
+ *
+ */
+static VALUE
+ossl_ssl_get_finished(VALUE self)
+{
+ SSL *ssl;
+ char sizer[1], *buf;
+ size_t len;
+
+ GetSSL(self, ssl);
+
+ len = SSL_get_finished(ssl, sizer, 0);
+ if (len == 0)
+ return Qnil;
+
+ buf = ALLOCA_N(char, len);
+ SSL_get_finished(ssl, buf, len);
+ return rb_str_new(buf, len);
+}
+
+/*
+ * call-seq:
+ * ssl.peer_finished_message => "peer finished message"
+ *
+ * Returns the last *Finished* message received
+ *
+ */
+static VALUE
+ossl_ssl_get_peer_finished(VALUE self)
+{
+ SSL *ssl;
+ char sizer[1], *buf;
+ size_t len;
+
+ GetSSL(self, ssl);
+
+ len = SSL_get_peer_finished(ssl, sizer, 0);
+ if (len == 0)
+ return Qnil;
+
+ buf = ALLOCA_N(char, len);
+ SSL_get_peer_finished(ssl, buf, len);
+ return rb_str_new(buf, len);
}
/*
@@ -2312,7 +2448,7 @@ ossl_ssl_get_client_ca_list(VALUE self)
return ossl_x509name_sk2ary(ca);
}
-# ifndef OPENSSL_NO_NEXTPROTONEG
+# ifdef OSSL_USE_NEXTPROTONEG
/*
* call-seq:
* ssl.npn_protocol => String | nil
@@ -2337,7 +2473,6 @@ ossl_ssl_npn_protocol(VALUE self)
}
# endif
-# ifdef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
/*
* call-seq:
* ssl.alpn_protocol => String | nil
@@ -2360,9 +2495,50 @@ ossl_ssl_alpn_protocol(VALUE self)
else
return rb_str_new((const char *) out, outlen);
}
-# endif
-# ifdef HAVE_SSL_GET_SERVER_TMP_KEY
+/*
+ * call-seq:
+ * session.export_keying_material(label, length) -> String
+ *
+ * Enables use of shared session key material in accordance with RFC 5705.
+ */
+static VALUE
+ossl_ssl_export_keying_material(int argc, VALUE *argv, VALUE self)
+{
+ SSL *ssl;
+ VALUE str;
+ VALUE label;
+ VALUE length;
+ VALUE context;
+ unsigned char *p;
+ size_t len;
+ int use_ctx = 0;
+ unsigned char *ctx = NULL;
+ size_t ctx_len = 0;
+ int ret;
+
+ rb_scan_args(argc, argv, "21", &label, &length, &context);
+ StringValue(label);
+
+ GetSSL(self, ssl);
+
+ len = (size_t)NUM2LONG(length);
+ str = rb_str_new(0, len);
+ p = (unsigned char *)RSTRING_PTR(str);
+ if (!NIL_P(context)) {
+ use_ctx = 1;
+ StringValue(context);
+ ctx = (unsigned char *)RSTRING_PTR(context);
+ ctx_len = RSTRING_LEN(context);
+ }
+ ret = SSL_export_keying_material(ssl, p, len, (char *)RSTRING_PTR(label),
+ RSTRING_LENINT(label), ctx, ctx_len, use_ctx);
+ if (ret == 0 || ret == -1) {
+ ossl_raise(eSSLError, "SSL_export_keying_material");
+ }
+ return str;
+}
+
/*
* call-seq:
* ssl.tmp_key => PKey or nil
@@ -2380,11 +2556,8 @@ ossl_ssl_tmp_key(VALUE self)
return Qnil;
return ossl_pkey_new(key);
}
-# endif /* defined(HAVE_SSL_GET_SERVER_TMP_KEY) */
#endif /* !defined(OPENSSL_NO_SOCK) */
-#undef rb_intern
-#define rb_intern(s) rb_intern_const(s)
void
Init_ossl_ssl(void)
{
@@ -2395,8 +2568,9 @@ Init_ossl_ssl(void)
rb_mWaitWritable = rb_define_module_under(rb_cIO, "WaitWritable");
#endif
- id_call = rb_intern("call");
- ID_callback_state = rb_intern("callback_state");
+#ifndef OPENSSL_NO_SOCK
+ id_call = rb_intern_const("call");
+ ID_callback_state = rb_intern_const("callback_state");
ossl_ssl_ex_vcb_idx = SSL_get_ex_new_index(0, (void *)"ossl_ssl_ex_vcb_idx", 0, 0, 0);
if (ossl_ssl_ex_vcb_idx < 0)
@@ -2407,11 +2581,6 @@ Init_ossl_ssl(void)
ossl_sslctx_ex_ptr_idx = SSL_CTX_get_ex_new_index(0, (void *)"ossl_sslctx_ex_ptr_idx", 0, 0, 0);
if (ossl_sslctx_ex_ptr_idx < 0)
ossl_raise(rb_eRuntimeError, "SSL_CTX_get_ex_new_index");
-#if !defined(HAVE_X509_STORE_UP_REF)
- ossl_sslctx_ex_store_p = SSL_CTX_get_ex_new_index(0, (void *)"ossl_sslctx_ex_store_p", 0, 0, 0);
- if (ossl_sslctx_ex_store_p < 0)
- ossl_raise(rb_eRuntimeError, "SSL_CTX_get_ex_new_index");
-#endif
/* Document-module: OpenSSL::SSL
*
@@ -2422,16 +2591,6 @@ Init_ossl_ssl(void)
*/
mSSL = rb_define_module_under(mOSSL, "SSL");
- /* Document-module: OpenSSL::ExtConfig
- *
- * This module contains configuration information about the SSL extension,
- * for example if socket support is enabled, or the host name TLS extension
- * is enabled. Constants in this module will always be defined, but contain
- * +true+ or +false+ values depending on the configuration of your OpenSSL
- * installation.
- */
- mSSLExtConfig = rb_define_module_under(mOSSL, "ExtConfig");
-
/* Document-class: OpenSSL::SSL::SSLError
*
* Generic error class raised by SSLSocket and SSLContext.
@@ -2463,7 +2622,7 @@ Init_ossl_ssl(void)
* The _cert_, _key_, and _extra_chain_cert_ attributes are deprecated.
* It is recommended to use #add_certificate instead.
*/
- rb_attr(cSSLContext, rb_intern("cert"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("cert"), 1, 1, Qfalse);
/*
* Context private key
@@ -2471,29 +2630,29 @@ Init_ossl_ssl(void)
* The _cert_, _key_, and _extra_chain_cert_ attributes are deprecated.
* It is recommended to use #add_certificate instead.
*/
- rb_attr(cSSLContext, rb_intern("key"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("key"), 1, 1, Qfalse);
/*
* A certificate or Array of certificates that will be sent to the client.
*/
- rb_attr(cSSLContext, rb_intern("client_ca"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("client_ca"), 1, 1, Qfalse);
/*
* The path to a file containing a PEM-format CA certificate
*/
- rb_attr(cSSLContext, rb_intern("ca_file"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("ca_file"), 1, 1, Qfalse);
/*
* The path to a directory containing CA certificates in PEM format.
*
* Files are looked up by subject's X509 name's hash value.
*/
- rb_attr(cSSLContext, rb_intern("ca_path"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("ca_path"), 1, 1, Qfalse);
/*
* Maximum session lifetime in seconds.
*/
- rb_attr(cSSLContext, rb_intern("timeout"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("timeout"), 1, 1, Qfalse);
/*
* Session verification mode.
@@ -2506,12 +2665,12 @@ Init_ossl_ssl(void)
*
* See SSL_CTX_set_verify(3) for details.
*/
- rb_attr(cSSLContext, rb_intern("verify_mode"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("verify_mode"), 1, 1, Qfalse);
/*
* Number of CA certificates to walk when verifying a certificate chain.
*/
- rb_attr(cSSLContext, rb_intern("verify_depth"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("verify_depth"), 1, 1, Qfalse);
/*
* A callback for additional certificate verification. The callback is
@@ -2525,7 +2684,7 @@ Init_ossl_ssl(void)
* If the callback returns +false+, the chain verification is immediately
* stopped and a bad_certificate alert is then sent.
*/
- rb_attr(cSSLContext, rb_intern("verify_callback"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("verify_callback"), 1, 1, Qfalse);
/*
* Whether to check the server certificate is valid for the hostname.
@@ -2533,12 +2692,12 @@ Init_ossl_ssl(void)
* In order to make this work, verify_mode must be set to VERIFY_PEER and
* the server hostname must be given by OpenSSL::SSL::SSLSocket#hostname=.
*/
- rb_attr(cSSLContext, rb_intern("verify_hostname"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("verify_hostname"), 1, 1, Qfalse);
/*
* An OpenSSL::X509::Store used for certificate verification.
*/
- rb_attr(cSSLContext, rb_intern("cert_store"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("cert_store"), 1, 1, Qfalse);
/*
* An Array of extra X509 certificates to be added to the certificate
@@ -2547,7 +2706,7 @@ Init_ossl_ssl(void)
* The _cert_, _key_, and _extra_chain_cert_ attributes are deprecated.
* It is recommended to use #add_certificate instead.
*/
- rb_attr(cSSLContext, rb_intern("extra_chain_cert"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("extra_chain_cert"), 1, 1, Qfalse);
/*
* A callback invoked when a client certificate is requested by a server
@@ -2557,28 +2716,14 @@ Init_ossl_ssl(void)
* containing an OpenSSL::X509::Certificate and an OpenSSL::PKey. If any
* other value is returned the handshake is suspended.
*/
- rb_attr(cSSLContext, rb_intern("client_cert_cb"), 1, 1, Qfalse);
-
-#if !defined(OPENSSL_NO_EC) && defined(HAVE_SSL_CTX_SET_TMP_ECDH_CALLBACK)
- /*
- * A callback invoked when ECDH parameters are required.
- *
- * The callback is invoked with the Session for the key exchange, an
- * flag indicating the use of an export cipher and the keylength
- * required.
- *
- * The callback is deprecated. This does not work with recent versions of
- * OpenSSL. Use OpenSSL::SSL::SSLContext#ecdh_curves= instead.
- */
- rb_attr(cSSLContext, rb_intern("tmp_ecdh_callback"), 1, 1, Qfalse);
-#endif
+ rb_attr(cSSLContext, rb_intern_const("client_cert_cb"), 1, 1, Qfalse);
/*
* Sets the context in which a session can be reused. This allows
* sessions for multiple applications to be distinguished, for example, by
* name.
*/
- rb_attr(cSSLContext, rb_intern("session_id_context"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("session_id_context"), 1, 1, Qfalse);
/*
* A callback invoked on a server when a session is proposed by the client
@@ -2587,7 +2732,7 @@ Init_ossl_ssl(void)
* The callback is invoked with the SSLSocket and session id. The
* callback may return a Session from an external cache.
*/
- rb_attr(cSSLContext, rb_intern("session_get_cb"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("session_get_cb"), 1, 1, Qfalse);
/*
* A callback invoked when a new session was negotiated.
@@ -2595,7 +2740,7 @@ Init_ossl_ssl(void)
* The callback is invoked with an SSLSocket. If +false+ is returned the
* session will be removed from the internal cache.
*/
- rb_attr(cSSLContext, rb_intern("session_new_cb"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("session_new_cb"), 1, 1, Qfalse);
/*
* A callback invoked when a session is removed from the internal cache.
@@ -2606,18 +2751,16 @@ Init_ossl_ssl(void)
* multi-threaded application. The callback is called inside a global lock
* and it can randomly cause deadlock on Ruby thread switching.
*/
- rb_attr(cSSLContext, rb_intern("session_remove_cb"), 1, 1, Qfalse);
-
- rb_define_const(mSSLExtConfig, "HAVE_TLSEXT_HOST_NAME", Qtrue);
+ rb_attr(cSSLContext, rb_intern_const("session_remove_cb"), 1, 1, Qfalse);
/*
- * A callback invoked whenever a new handshake is initiated. May be used
- * to disable renegotiation entirely.
+ * A callback invoked whenever a new handshake is initiated on an
+ * established connection. May be used to disable renegotiation entirely.
*
* The callback is invoked with the active SSLSocket. The callback's
- * return value is irrelevant, normal return indicates "approval" of the
+ * return value is ignored. A normal return indicates "approval" of the
* renegotiation and will continue the process. To forbid renegotiation
- * and to cancel the process, an Error may be raised within the callback.
+ * and to cancel the process, raise an exception within the callback.
*
* === Disable client renegotiation
*
@@ -2625,14 +2768,12 @@ Init_ossl_ssl(void)
* renegotiation entirely. You may use a callback as follows to implement
* this feature:
*
- * num_handshakes = 0
* ctx.renegotiation_cb = lambda do |ssl|
- * num_handshakes += 1
- * raise RuntimeError.new("Client renegotiation disabled") if num_handshakes > 1
+ * raise RuntimeError, "Client renegotiation disabled"
* end
*/
- rb_attr(cSSLContext, rb_intern("renegotiation_cb"), 1, 1, Qfalse);
-#ifndef OPENSSL_NO_NEXTPROTONEG
+ rb_attr(cSSLContext, rb_intern_const("renegotiation_cb"), 1, 1, Qfalse);
+#ifdef OSSL_USE_NEXTPROTONEG
/*
* An Enumerable of Strings. Each String represents a protocol to be
* advertised as the list of supported protocols for Next Protocol
@@ -2644,7 +2785,7 @@ Init_ossl_ssl(void)
*
* ctx.npn_protocols = ["http/1.1", "spdy/2"]
*/
- rb_attr(cSSLContext, rb_intern("npn_protocols"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("npn_protocols"), 1, 1, Qfalse);
/*
* A callback invoked on the client side when the client needs to select
* a protocol from the list sent by the server. Supported in OpenSSL 1.0.1
@@ -2661,10 +2802,9 @@ Init_ossl_ssl(void)
* protocols.first
* end
*/
- rb_attr(cSSLContext, rb_intern("npn_select_cb"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("npn_select_cb"), 1, 1, Qfalse);
#endif
-#ifdef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
/*
* An Enumerable of Strings. Each String represents a protocol to be
* advertised as the list of supported protocols for Application-Layer
@@ -2676,7 +2816,7 @@ Init_ossl_ssl(void)
*
* ctx.alpn_protocols = ["http/1.1", "spdy/2", "h2"]
*/
- rb_attr(cSSLContext, rb_intern("alpn_protocols"), 1, 1, Qfalse);
+ rb_attr(cSSLContext, rb_intern_const("alpn_protocols"), 1, 1, Qfalse);
/*
* A callback invoked on the server side when the server needs to select
* a protocol from the list sent by the client. Supported in OpenSSL 1.0.2
@@ -2693,8 +2833,30 @@ Init_ossl_ssl(void)
* protocols.first
* end
*/
- rb_attr(cSSLContext, rb_intern("alpn_select_cb"), 1, 1, Qfalse);
-#endif
+ rb_attr(cSSLContext, rb_intern_const("alpn_select_cb"), 1, 1, Qfalse);
+
+ /*
+ * A callback invoked when TLS key material is generated or received, in
+ * order to allow applications to store this keying material for debugging
+ * purposes.
+ *
+ * The callback is invoked with an SSLSocket and a string containing the
+ * key material in the format used by NSS for its SSLKEYLOGFILE debugging
+ * output.
+ *
+ * It is only compatible with OpenSSL >= 1.1.1. Even if LibreSSL implements
+ * SSL_CTX_set_keylog_callback() from v3.4.2, it does nothing (see
+ * https://github.com/libressl-portable/openbsd/commit/648d39f0f035835d0653342d139883b9661e9cb6).
+ *
+ * === Example
+ *
+ * context.keylog_cb = proc do |_sock, line|
+ * File.open('ssl_keylog_file', "a") do |f|
+ * f.write("#{line}\n")
+ * end
+ * end
+ */
+ rb_attr(cSSLContext, rb_intern_const("keylog_cb"), 1, 1, Qfalse);
rb_define_alias(cSSLContext, "ssl_timeout", "timeout");
rb_define_alias(cSSLContext, "ssl_timeout=", "timeout=");
@@ -2702,6 +2864,12 @@ Init_ossl_ssl(void)
ossl_sslctx_set_minmax_proto_version, 2);
rb_define_method(cSSLContext, "ciphers", ossl_sslctx_get_ciphers, 0);
rb_define_method(cSSLContext, "ciphers=", ossl_sslctx_set_ciphers, 1);
+#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
+ rb_define_method(cSSLContext, "ciphersuites=", ossl_sslctx_set_ciphersuites, 1);
+#endif
+#ifndef OPENSSL_NO_DH
+ rb_define_method(cSSLContext, "tmp_dh=", ossl_sslctx_set_tmp_dh, 1);
+#endif
rb_define_method(cSSLContext, "ecdh_curves=", ossl_sslctx_set_ecdh_curves, 1);
rb_define_method(cSSLContext, "security_level", ossl_sslctx_get_security_level, 0);
rb_define_method(cSSLContext, "security_level=", ossl_sslctx_set_security_level, 1);
@@ -2775,11 +2943,6 @@ Init_ossl_ssl(void)
* Document-class: OpenSSL::SSL::SSLSocket
*/
cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
-#ifdef OPENSSL_NO_SOCK
- rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qtrue);
- rb_define_method(cSSLSocket, "initialize", rb_f_notimplement, -1);
-#else
- rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qfalse);
rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
rb_undef_method(cSSLSocket, "initialize_copy");
@@ -2806,16 +2969,14 @@ Init_ossl_ssl(void)
rb_define_method(cSSLSocket, "client_ca", ossl_ssl_get_client_ca_list, 0);
/* #hostname is defined in lib/openssl/ssl.rb */
rb_define_method(cSSLSocket, "hostname=", ossl_ssl_set_hostname, 1);
-# ifdef HAVE_SSL_GET_SERVER_TMP_KEY
+ rb_define_method(cSSLSocket, "finished_message", ossl_ssl_get_finished, 0);
+ rb_define_method(cSSLSocket, "peer_finished_message", ossl_ssl_get_peer_finished, 0);
rb_define_method(cSSLSocket, "tmp_key", ossl_ssl_tmp_key, 0);
-# endif
-# ifdef HAVE_SSL_CTX_SET_ALPN_SELECT_CB
rb_define_method(cSSLSocket, "alpn_protocol", ossl_ssl_alpn_protocol, 0);
-# endif
-# ifndef OPENSSL_NO_NEXTPROTONEG
+ rb_define_method(cSSLSocket, "export_keying_material", ossl_ssl_export_keying_material, -1);
+# ifdef OSSL_USE_NEXTPROTONEG
rb_define_method(cSSLSocket, "npn_protocol", ossl_ssl_npn_protocol, 0);
# endif
-#endif
rb_define_const(mSSL, "VERIFY_NONE", INT2NUM(SSL_VERIFY_NONE));
rb_define_const(mSSL, "VERIFY_PEER", INT2NUM(SSL_VERIFY_PEER));
@@ -2823,12 +2984,23 @@ Init_ossl_ssl(void)
rb_define_const(mSSL, "VERIFY_CLIENT_ONCE", INT2NUM(SSL_VERIFY_CLIENT_ONCE));
rb_define_const(mSSL, "OP_ALL", ULONG2NUM(SSL_OP_ALL));
+#ifdef SSL_OP_CLEANSE_PLAINTEXT /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_CLEANSE_PLAINTEXT", ULONG2NUM(SSL_OP_CLEANSE_PLAINTEXT));
+#endif
rb_define_const(mSSL, "OP_LEGACY_SERVER_CONNECT", ULONG2NUM(SSL_OP_LEGACY_SERVER_CONNECT));
-#ifdef SSL_OP_TLSEXT_PADDING /* OpenSSL 1.0.1h and OpenSSL 1.0.2 */
- rb_define_const(mSSL, "OP_TLSEXT_PADDING", ULONG2NUM(SSL_OP_TLSEXT_PADDING));
+#ifdef SSL_OP_ENABLE_KTLS /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_ENABLE_KTLS", ULONG2NUM(SSL_OP_ENABLE_KTLS));
#endif
-#ifdef SSL_OP_SAFARI_ECDHE_ECDSA_BUG /* OpenSSL 1.0.1f and OpenSSL 1.0.2 */
+ rb_define_const(mSSL, "OP_TLSEXT_PADDING", ULONG2NUM(SSL_OP_TLSEXT_PADDING));
rb_define_const(mSSL, "OP_SAFARI_ECDHE_ECDSA_BUG", ULONG2NUM(SSL_OP_SAFARI_ECDHE_ECDSA_BUG));
+#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_IGNORE_UNEXPECTED_EOF", ULONG2NUM(SSL_OP_IGNORE_UNEXPECTED_EOF));
+#endif
+#ifdef SSL_OP_ALLOW_CLIENT_RENEGOTIATION /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_ALLOW_CLIENT_RENEGOTIATION", ULONG2NUM(SSL_OP_ALLOW_CLIENT_RENEGOTIATION));
+#endif
+#ifdef SSL_OP_DISABLE_TLSEXT_CA_NAMES /* OpenSSL 3.0 */
+ rb_define_const(mSSL, "OP_DISABLE_TLSEXT_CA_NAMES", ULONG2NUM(SSL_OP_DISABLE_TLSEXT_CA_NAMES));
#endif
#ifdef SSL_OP_ALLOW_NO_DHE_KEX /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_ALLOW_NO_DHE_KEX", ULONG2NUM(SSL_OP_ALLOW_NO_DHE_KEX));
@@ -2841,13 +3013,15 @@ Init_ossl_ssl(void)
#ifdef SSL_OP_NO_ENCRYPT_THEN_MAC /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_NO_ENCRYPT_THEN_MAC", ULONG2NUM(SSL_OP_NO_ENCRYPT_THEN_MAC));
#endif
- rb_define_const(mSSL, "OP_CIPHER_SERVER_PREFERENCE", ULONG2NUM(SSL_OP_CIPHER_SERVER_PREFERENCE));
- rb_define_const(mSSL, "OP_TLS_ROLLBACK_BUG", ULONG2NUM(SSL_OP_TLS_ROLLBACK_BUG));
-#ifdef SSL_OP_NO_RENEGOTIATION /* OpenSSL 1.1.1 */
- rb_define_const(mSSL, "OP_NO_RENEGOTIATION", ULONG2NUM(SSL_OP_NO_RENEGOTIATION));
+#ifdef SSL_OP_ENABLE_MIDDLEBOX_COMPAT /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_ENABLE_MIDDLEBOX_COMPAT", ULONG2NUM(SSL_OP_ENABLE_MIDDLEBOX_COMPAT));
+#endif
+#ifdef SSL_OP_PRIORITIZE_CHACHA /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_PRIORITIZE_CHACHA", ULONG2NUM(SSL_OP_PRIORITIZE_CHACHA));
+#endif
+#ifdef SSL_OP_NO_ANTI_REPLAY /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_NO_ANTI_REPLAY", ULONG2NUM(SSL_OP_NO_ANTI_REPLAY));
#endif
- rb_define_const(mSSL, "OP_CRYPTOPRO_TLSEXT_BUG", ULONG2NUM(SSL_OP_CRYPTOPRO_TLSEXT_BUG));
-
rb_define_const(mSSL, "OP_NO_SSLv3", ULONG2NUM(SSL_OP_NO_SSLv3));
rb_define_const(mSSL, "OP_NO_TLSv1", ULONG2NUM(SSL_OP_NO_TLSv1));
rb_define_const(mSSL, "OP_NO_TLSv1_1", ULONG2NUM(SSL_OP_NO_TLSv1_1));
@@ -2855,6 +3029,12 @@ Init_ossl_ssl(void)
#ifdef SSL_OP_NO_TLSv1_3 /* OpenSSL 1.1.1 */
rb_define_const(mSSL, "OP_NO_TLSv1_3", ULONG2NUM(SSL_OP_NO_TLSv1_3));
#endif
+ rb_define_const(mSSL, "OP_CIPHER_SERVER_PREFERENCE", ULONG2NUM(SSL_OP_CIPHER_SERVER_PREFERENCE));
+ rb_define_const(mSSL, "OP_TLS_ROLLBACK_BUG", ULONG2NUM(SSL_OP_TLS_ROLLBACK_BUG));
+#ifdef SSL_OP_NO_RENEGOTIATION /* OpenSSL 1.1.1 */
+ rb_define_const(mSSL, "OP_NO_RENEGOTIATION", ULONG2NUM(SSL_OP_NO_RENEGOTIATION));
+#endif
+ rb_define_const(mSSL, "OP_CRYPTOPRO_TLSEXT_BUG", ULONG2NUM(SSL_OP_CRYPTOPRO_TLSEXT_BUG));
/* SSL_OP_* flags for DTLS */
#if 0
@@ -2919,16 +3099,16 @@ Init_ossl_ssl(void)
#endif
- sym_exception = ID2SYM(rb_intern("exception"));
- sym_wait_readable = ID2SYM(rb_intern("wait_readable"));
- sym_wait_writable = ID2SYM(rb_intern("wait_writable"));
+ sym_exception = ID2SYM(rb_intern_const("exception"));
+ sym_wait_readable = ID2SYM(rb_intern_const("wait_readable"));
+ sym_wait_writable = ID2SYM(rb_intern_const("wait_writable"));
- id_tmp_dh_callback = rb_intern("tmp_dh_callback");
- id_tmp_ecdh_callback = rb_intern("tmp_ecdh_callback");
- id_npn_protocols_encoded = rb_intern("npn_protocols_encoded");
+ id_tmp_dh_callback = rb_intern_const("tmp_dh_callback");
+ id_npn_protocols_encoded = rb_intern_const("npn_protocols_encoded");
+ id_each = rb_intern_const("each");
#define DefIVarID(name) do \
- id_i_##name = rb_intern("@"#name); while (0)
+ id_i_##name = rb_intern_const("@"#name); while (0)
DefIVarID(cert_store);
DefIVarID(ca_file);
@@ -2942,7 +3122,6 @@ Init_ossl_ssl(void)
DefIVarID(key);
DefIVarID(extra_chain_cert);
DefIVarID(client_cert_cb);
- DefIVarID(tmp_ecdh_callback);
DefIVarID(timeout);
DefIVarID(session_id_context);
DefIVarID(session_get_cb);
@@ -2954,8 +3133,10 @@ Init_ossl_ssl(void)
DefIVarID(alpn_select_cb);
DefIVarID(servername_cb);
DefIVarID(verify_hostname);
+ DefIVarID(keylog_cb);
DefIVarID(io);
DefIVarID(context);
DefIVarID(hostname);
+#endif /* !defined(OPENSSL_NO_SOCK) */
}
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c
index 5514087387..139a474b04 100644
--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -4,6 +4,7 @@
#include "ossl.h"
+#ifndef OPENSSL_NO_SOCK
VALUE cSSLSession;
static VALUE eSSLSession;
@@ -34,43 +35,38 @@ static VALUE ossl_ssl_session_alloc(VALUE klass)
* Creates a new Session object from an instance of SSLSocket or DER/PEM encoded
* String.
*/
-static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1)
+static VALUE
+ossl_ssl_session_initialize(VALUE self, VALUE arg1)
{
- SSL_SESSION *ctx = NULL;
-
- if (RDATA(self)->data)
- ossl_raise(eSSLSession, "SSL Session already initialized");
-
- if (rb_obj_is_instance_of(arg1, cSSLSocket)) {
- SSL *ssl;
-
- GetSSL(arg1, ssl);
-
- if ((ctx = SSL_get1_session(ssl)) == NULL)
- ossl_raise(eSSLSession, "no session available");
- } else {
- BIO *in = ossl_obj2bio(&arg1);
+ SSL_SESSION *ctx;
- ctx = PEM_read_bio_SSL_SESSION(in, NULL, NULL, NULL);
+ if (RTYPEDDATA_DATA(self))
+ ossl_raise(eSSLSession, "SSL Session already initialized");
- if (!ctx) {
- OSSL_BIO_reset(in);
- ctx = d2i_SSL_SESSION_bio(in, NULL);
- }
+ if (rb_obj_is_instance_of(arg1, cSSLSocket)) {
+ SSL *ssl;
- BIO_free(in);
+ GetSSL(arg1, ssl);
- if (!ctx)
- ossl_raise(rb_eArgError, "unknown type");
- }
+ if ((ctx = SSL_get1_session(ssl)) == NULL)
+ ossl_raise(eSSLSession, "no session available");
+ }
+ else {
+ BIO *in = ossl_obj2bio(&arg1);
- /* should not happen */
- if (ctx == NULL)
- ossl_raise(eSSLSession, "ctx not set - internal error");
+ ctx = d2i_SSL_SESSION_bio(in, NULL);
+ if (!ctx) {
+ OSSL_BIO_reset(in);
+ ctx = PEM_read_bio_SSL_SESSION(in, NULL, NULL, NULL);
+ }
+ BIO_free(in);
+ if (!ctx)
+ ossl_raise(rb_eArgError, "unknown type");
+ }
- RDATA(self)->data = ctx;
+ RTYPEDDATA_DATA(self) = ctx;
- return self;
+ return self;
}
static VALUE
@@ -304,6 +300,7 @@ static VALUE ossl_ssl_session_to_text(VALUE self)
return ossl_membio2str(out);
}
+#endif /* !defined(OPENSSL_NO_SOCK) */
void Init_ossl_ssl_session(void)
{
@@ -312,6 +309,7 @@ void Init_ossl_ssl_session(void)
mSSL = rb_define_module_under(mOSSL, "SSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);
#endif
+#ifndef OPENSSL_NO_SOCK
cSSLSession = rb_define_class_under(mSSL, "Session", rb_cObject);
eSSLSession = rb_define_class_under(cSSLSession, "SessionError", eOSSLError);
@@ -329,4 +327,5 @@ void Init_ossl_ssl_session(void)
rb_define_method(cSSLSession, "to_der", ossl_ssl_session_to_der, 0);
rb_define_method(cSSLSession, "to_pem", ossl_ssl_session_to_pem, 0);
rb_define_method(cSSLSession, "to_text", ossl_ssl_session_to_text, 0);
+#endif /* !defined(OPENSSL_NO_SOCK) */
}
diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c
new file mode 100644
index 0000000000..b33ff10c10
--- /dev/null
+++ b/ext/openssl/ossl_ts.c
@@ -0,0 +1,1539 @@
+/*
+ *
+ * Copyright (C) 2010 Martin Bosslet <Martin.Bosslet@googlemail.com>
+ * All rights reserved.
+ */
+/*
+ * This program is licenced under the same licence as Ruby.
+ * (See the file 'LICENCE'.)
+ */
+#include "ossl.h"
+
+#ifndef OPENSSL_NO_TS
+
+#define NewTSRequest(klass) \
+ TypedData_Wrap_Struct((klass), &ossl_ts_req_type, 0)
+#define SetTSRequest(obj, req) do { \
+ if (!(req)) { \
+ ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
+ } \
+ RTYPEDDATA_DATA(obj) = (req); \
+} while (0)
+#define GetTSRequest(obj, req) do { \
+ TypedData_Get_Struct((obj), TS_REQ, &ossl_ts_req_type, (req)); \
+ if (!(req)) { \
+ ossl_raise(rb_eRuntimeError, "TS_REQ wasn't initialized."); \
+ } \
+} while (0)
+
+#define NewTSResponse(klass) \
+ TypedData_Wrap_Struct((klass), &ossl_ts_resp_type, 0)
+#define SetTSResponse(obj, resp) do { \
+ if (!(resp)) { \
+ ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
+ } \
+ RTYPEDDATA_DATA(obj) = (resp); \
+} while (0)
+#define GetTSResponse(obj, resp) do { \
+ TypedData_Get_Struct((obj), TS_RESP, &ossl_ts_resp_type, (resp)); \
+ if (!(resp)) { \
+ ossl_raise(rb_eRuntimeError, "TS_RESP wasn't initialized."); \
+ } \
+} while (0)
+
+#define NewTSTokenInfo(klass) \
+ TypedData_Wrap_Struct((klass), &ossl_ts_token_info_type, 0)
+#define SetTSTokenInfo(obj, info) do { \
+ if (!(info)) { \
+ ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
+ } \
+ RTYPEDDATA_DATA(obj) = (info); \
+} while (0)
+#define GetTSTokenInfo(obj, info) do { \
+ TypedData_Get_Struct((obj), TS_TST_INFO, &ossl_ts_token_info_type, (info)); \
+ if (!(info)) { \
+ ossl_raise(rb_eRuntimeError, "TS_TST_INFO wasn't initialized."); \
+ } \
+} while (0)
+
+#define ossl_tsfac_get_default_policy_id(o) rb_attr_get((o),rb_intern("@default_policy_id"))
+#define ossl_tsfac_get_serial_number(o) rb_attr_get((o),rb_intern("@serial_number"))
+#define ossl_tsfac_get_gen_time(o) rb_attr_get((o),rb_intern("@gen_time"))
+#define ossl_tsfac_get_additional_certs(o) rb_attr_get((o),rb_intern("@additional_certs"))
+#define ossl_tsfac_get_allowed_digests(o) rb_attr_get((o),rb_intern("@allowed_digests"))
+
+static VALUE mTimestamp;
+static VALUE eTimestampError;
+static VALUE cTimestampRequest;
+static VALUE cTimestampResponse;
+static VALUE cTimestampTokenInfo;
+static VALUE cTimestampFactory;
+static VALUE sBAD_ALG, sBAD_REQUEST, sBAD_DATA_FORMAT, sTIME_NOT_AVAILABLE;
+static VALUE sUNACCEPTED_POLICY, sUNACCEPTED_EXTENSION, sADD_INFO_NOT_AVAILABLE;
+static VALUE sSYSTEM_FAILURE;
+
+static void
+ossl_ts_req_free(void *ptr)
+{
+ TS_REQ_free(ptr);
+}
+
+static const rb_data_type_t ossl_ts_req_type = {
+ "OpenSSL/Timestamp/Request",
+ {
+ 0, ossl_ts_req_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
+static void
+ossl_ts_resp_free(void *ptr)
+{
+ TS_RESP_free(ptr);
+}
+
+static const rb_data_type_t ossl_ts_resp_type = {
+ "OpenSSL/Timestamp/Response",
+ {
+ 0, ossl_ts_resp_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
+static void
+ossl_ts_token_info_free(void *ptr)
+{
+ TS_TST_INFO_free(ptr);
+}
+
+static const rb_data_type_t ossl_ts_token_info_type = {
+ "OpenSSL/Timestamp/TokenInfo",
+ {
+ 0, ossl_ts_token_info_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
+static VALUE
+asn1_to_der(void *template, int (*i2d)(void *template, unsigned char **pp))
+{
+ VALUE str;
+ int len;
+ unsigned char *p;
+
+ if((len = i2d(template, NULL)) <= 0)
+ ossl_raise(eTimestampError, "Error when encoding to DER");
+ str = rb_str_new(0, len);
+ p = (unsigned char *)RSTRING_PTR(str);
+ if(i2d(template, &p) <= 0)
+ ossl_raise(eTimestampError, "Error when encoding to DER");
+ rb_str_set_len(str, p - (unsigned char*)RSTRING_PTR(str));
+
+ return str;
+}
+
+static ASN1_OBJECT*
+obj_to_asn1obj(VALUE obj)
+{
+ ASN1_OBJECT *a1obj;
+
+ StringValue(obj);
+ a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 0);
+ if(!a1obj) a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 1);
+ if(!a1obj) ossl_raise(eASN1Error, "invalid OBJECT ID");
+
+ return a1obj;
+}
+
+static VALUE
+obj_to_asn1obj_i(VALUE obj)
+{
+ return (VALUE)obj_to_asn1obj(obj);
+}
+
+static VALUE
+get_asn1obj(ASN1_OBJECT *obj)
+{
+ BIO *out;
+ VALUE ret;
+ int nid;
+ if ((nid = OBJ_obj2nid(obj)) != NID_undef)
+ ret = rb_str_new2(OBJ_nid2sn(nid));
+ else{
+ if (!(out = BIO_new(BIO_s_mem())))
+ ossl_raise(eX509AttrError, NULL);
+ i2a_ASN1_OBJECT(out, obj);
+ ret = ossl_membio2str(out);
+ }
+
+ return ret;
+}
+
+static VALUE
+ossl_ts_req_alloc(VALUE klass)
+{
+ TS_REQ *req;
+ VALUE obj;
+
+ obj = NewTSRequest(klass);
+ if (!(req = TS_REQ_new()))
+ ossl_raise(eTimestampError, NULL);
+ SetTSRequest(obj, req);
+
+ /* Defaults */
+ TS_REQ_set_version(req, 1);
+ TS_REQ_set_cert_req(req, 1);
+
+ return obj;
+}
+
+/*
+ * When creating a Request with the +File+ or +string+ parameter, the
+ * corresponding +File+ or +string+ must be DER-encoded.
+ *
+ * call-seq:
+ * OpenSSL::Timestamp::Request.new(file) -> request
+ * OpenSSL::Timestamp::Request.new(string) -> request
+ * OpenSSL::Timestamp::Request.new -> empty request
+ */
+static VALUE
+ossl_ts_req_initialize(int argc, VALUE *argv, VALUE self)
+{
+ TS_REQ *ts_req = DATA_PTR(self);
+ BIO *in;
+ VALUE arg;
+
+ if(rb_scan_args(argc, argv, "01", &arg) == 0) {
+ return self;
+ }
+
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(&arg);
+ ts_req = d2i_TS_REQ_bio(in, &ts_req);
+ BIO_free(in);
+ if (!ts_req) {
+ DATA_PTR(self) = NULL;
+ ossl_raise(eTimestampError, "Error when decoding the timestamp request");
+ }
+ DATA_PTR(self) = ts_req;
+
+ return self;
+}
+
+/*
+ * Returns the 'short name' of the object identifier that represents the
+ * algorithm that was used to create the message imprint digest.
+ *
+ * call-seq:
+ * request.algorithm -> string
+ */
+static VALUE
+ossl_ts_req_get_algorithm(VALUE self)
+{
+ TS_REQ *req;
+ TS_MSG_IMPRINT *mi;
+ X509_ALGOR *algor;
+
+ GetTSRequest(self, req);
+ mi = TS_REQ_get_msg_imprint(req);
+ algor = TS_MSG_IMPRINT_get_algo(mi);
+ return get_asn1obj(algor->algorithm);
+}
+
+/*
+ * Allows to set the object identifier or the 'short name' of the
+ * algorithm that was used to create the message imprint digest.
+ *
+ * ===Example:
+ * request.algorithm = "SHA1"
+ *
+ * call-seq:
+ * request.algorithm = "string" -> string
+ */
+static VALUE
+ossl_ts_req_set_algorithm(VALUE self, VALUE algo)
+{
+ TS_REQ *req;
+ TS_MSG_IMPRINT *mi;
+ ASN1_OBJECT *obj;
+ X509_ALGOR *algor;
+
+ GetTSRequest(self, req);
+ obj = obj_to_asn1obj(algo);
+ mi = TS_REQ_get_msg_imprint(req);
+ algor = TS_MSG_IMPRINT_get_algo(mi);
+ if (!X509_ALGOR_set0(algor, obj, V_ASN1_NULL, NULL)) {
+ ASN1_OBJECT_free(obj);
+ ossl_raise(eTimestampError, "X509_ALGOR_set0");
+ }
+
+ return algo;
+}
+
+/*
+ * Returns the message imprint (digest) of the data to be timestamped.
+ *
+ * call-seq:
+ * request.message_imprint -> string or nil
+ */
+static VALUE
+ossl_ts_req_get_msg_imprint(VALUE self)
+{
+ TS_REQ *req;
+ TS_MSG_IMPRINT *mi;
+ ASN1_OCTET_STRING *hashed_msg;
+ VALUE ret;
+
+ GetTSRequest(self, req);
+ mi = TS_REQ_get_msg_imprint(req);
+ hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
+
+ ret = rb_str_new((const char *)hashed_msg->data, hashed_msg->length);
+
+ return ret;
+}
+
+/*
+ * Set the message imprint digest.
+ *
+ * call-seq:
+ * request.message_imprint = "string" -> string
+ */
+static VALUE
+ossl_ts_req_set_msg_imprint(VALUE self, VALUE hash)
+{
+ TS_REQ *req;
+ TS_MSG_IMPRINT *mi;
+ StringValue(hash);
+
+ GetTSRequest(self, req);
+ mi = TS_REQ_get_msg_imprint(req);
+ if (!TS_MSG_IMPRINT_set_msg(mi, (unsigned char *)RSTRING_PTR(hash), RSTRING_LENINT(hash)))
+ ossl_raise(eTimestampError, "TS_MSG_IMPRINT_set_msg");
+
+ return hash;
+}
+
+/*
+ * Returns the version of this request. +1+ is the default value.
+ *
+ * call-seq:
+ * request.version -> Integer
+ */
+static VALUE
+ossl_ts_req_get_version(VALUE self)
+{
+ TS_REQ *req;
+
+ GetTSRequest(self, req);
+ return LONG2NUM(TS_REQ_get_version(req));
+}
+
+/*
+ * Sets the version number for this Request. This should be +1+ for compliant
+ * servers.
+ *
+ * call-seq:
+ * request.version = number -> Integer
+ */
+static VALUE
+ossl_ts_req_set_version(VALUE self, VALUE version)
+{
+ TS_REQ *req;
+ long ver;
+
+ if ((ver = NUM2LONG(version)) < 0)
+ ossl_raise(eTimestampError, "version must be >= 0!");
+ GetTSRequest(self, req);
+ if (!TS_REQ_set_version(req, ver))
+ ossl_raise(eTimestampError, "TS_REQ_set_version");
+
+ return version;
+}
+
+/*
+ * Returns the 'short name' of the object identifier that represents the
+ * timestamp policy under which the server shall create the timestamp.
+ *
+ * call-seq:
+ * request.policy_id -> string or nil
+ */
+static VALUE
+ossl_ts_req_get_policy_id(VALUE self)
+{
+ TS_REQ *req;
+
+ GetTSRequest(self, req);
+ if (!TS_REQ_get_policy_id(req))
+ return Qnil;
+ return get_asn1obj(TS_REQ_get_policy_id(req));
+}
+
+/*
+ * Allows to set the object identifier that represents the
+ * timestamp policy under which the server shall create the timestamp. This
+ * may be left +nil+, implying that the timestamp server will issue the
+ * timestamp using some default policy.
+ *
+ * ===Example:
+ * request.policy_id = "1.2.3.4.5"
+ *
+ * call-seq:
+ * request.policy_id = "string" -> string
+ */
+static VALUE
+ossl_ts_req_set_policy_id(VALUE self, VALUE oid)
+{
+ TS_REQ *req;
+ ASN1_OBJECT *obj;
+ int ok;
+
+ GetTSRequest(self, req);
+ obj = obj_to_asn1obj(oid);
+ ok = TS_REQ_set_policy_id(req, obj);
+ ASN1_OBJECT_free(obj);
+ if (!ok)
+ ossl_raise(eTimestampError, "TS_REQ_set_policy_id");
+
+ return oid;
+}
+
+/*
+ * Returns the nonce (number used once) that the server shall include in its
+ * response.
+ *
+ * call-seq:
+ * request.nonce -> BN or nil
+ */
+static VALUE
+ossl_ts_req_get_nonce(VALUE self)
+{
+ TS_REQ *req;
+ const ASN1_INTEGER * nonce;
+
+ GetTSRequest(self, req);
+ if (!(nonce = TS_REQ_get_nonce(req)))
+ return Qnil;
+ return asn1integer_to_num(nonce);
+}
+
+/*
+ * Sets the nonce (number used once) that the server shall include in its
+ * response. If the nonce is set, the server must return the same nonce value in
+ * a valid Response.
+ *
+ * call-seq:
+ * request.nonce = number -> BN
+ */
+static VALUE
+ossl_ts_req_set_nonce(VALUE self, VALUE num)
+{
+ TS_REQ *req;
+ ASN1_INTEGER *nonce;
+ int ok;
+
+ GetTSRequest(self, req);
+ nonce = num_to_asn1integer(num, NULL);
+ ok = TS_REQ_set_nonce(req, nonce);
+ ASN1_INTEGER_free(nonce);
+ if (!ok)
+ ossl_raise(eTimestampError, NULL);
+ return num;
+}
+
+/*
+ * Indicates whether the response shall contain the timestamp authority's
+ * certificate or not.
+ *
+ * call-seq:
+ * request.cert_requested? -> true or false
+ */
+static VALUE
+ossl_ts_req_get_cert_requested(VALUE self)
+{
+ TS_REQ *req;
+
+ GetTSRequest(self, req);
+ return TS_REQ_get_cert_req(req) ? Qtrue: Qfalse;
+}
+
+/*
+ * Specify whether the response shall contain the timestamp authority's
+ * certificate or not. The default value is +true+.
+ *
+ * call-seq:
+ * request.cert_requested = boolean -> true or false
+ */
+static VALUE
+ossl_ts_req_set_cert_requested(VALUE self, VALUE requested)
+{
+ TS_REQ *req;
+
+ GetTSRequest(self, req);
+ TS_REQ_set_cert_req(req, RTEST(requested));
+
+ return requested;
+}
+
+/*
+ * DER-encodes this Request.
+ *
+ * call-seq:
+ * request.to_der -> DER-encoded string
+ */
+static VALUE
+ossl_ts_req_to_der(VALUE self)
+{
+ TS_REQ *req;
+ TS_MSG_IMPRINT *mi;
+ X509_ALGOR *algo;
+ ASN1_OCTET_STRING *hashed_msg;
+
+ GetTSRequest(self, req);
+ mi = TS_REQ_get_msg_imprint(req);
+
+ algo = TS_MSG_IMPRINT_get_algo(mi);
+ if (OBJ_obj2nid(algo->algorithm) == NID_undef)
+ ossl_raise(eTimestampError, "Message imprint missing algorithm");
+
+ hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
+ if (!hashed_msg->length)
+ ossl_raise(eTimestampError, "Message imprint missing hashed message");
+
+ return asn1_to_der((void *)req, (int (*)(void *, unsigned char **))i2d_TS_REQ);
+}
+
+static VALUE
+ossl_ts_resp_alloc(VALUE klass)
+{
+ TS_RESP *resp;
+ VALUE obj;
+
+ obj = NewTSResponse(klass);
+ if (!(resp = TS_RESP_new()))
+ ossl_raise(eTimestampError, NULL);
+ SetTSResponse(obj, resp);
+
+ return obj;
+}
+
+/*
+ * Creates a Response from a +File+ or +string+ parameter, the
+ * corresponding +File+ or +string+ must be DER-encoded. Please note
+ * that Response is an immutable read-only class. If you'd like to create
+ * timestamps please refer to Factory instead.
+ *
+ * call-seq:
+ * OpenSSL::Timestamp::Response.new(file) -> response
+ * OpenSSL::Timestamp::Response.new(string) -> response
+ */
+static VALUE
+ossl_ts_resp_initialize(VALUE self, VALUE der)
+{
+ TS_RESP *ts_resp = DATA_PTR(self);
+ BIO *in;
+
+ der = ossl_to_der_if_possible(der);
+ in = ossl_obj2bio(&der);
+ ts_resp = d2i_TS_RESP_bio(in, &ts_resp);
+ BIO_free(in);
+ if (!ts_resp) {
+ DATA_PTR(self) = NULL;
+ ossl_raise(eTimestampError, "Error when decoding the timestamp response");
+ }
+ DATA_PTR(self) = ts_resp;
+
+ return self;
+}
+
+/*
+ * Returns one of GRANTED, GRANTED_WITH_MODS, REJECTION, WAITING,
+ * REVOCATION_WARNING or REVOCATION_NOTIFICATION. A timestamp token has
+ * been created only in case +status+ is equal to GRANTED or GRANTED_WITH_MODS.
+ *
+ * call-seq:
+ * response.status -> BN (never nil)
+ */
+static VALUE
+ossl_ts_resp_get_status(VALUE self)
+{
+ TS_RESP *resp;
+ TS_STATUS_INFO *si;
+ const ASN1_INTEGER *st;
+
+ GetTSResponse(self, resp);
+ si = TS_RESP_get_status_info(resp);
+ st = TS_STATUS_INFO_get0_status(si);
+
+ return asn1integer_to_num(st);
+}
+
+/*
+ * In cases no timestamp token has been created, this field contains further
+ * info about the reason why response creation failed. The method returns either
+ * nil (the request was successful and a timestamp token was created) or one of
+ * the following:
+ * * :BAD_ALG - Indicates that the timestamp server rejects the message
+ * imprint algorithm used in the Request
+ * * :BAD_REQUEST - Indicates that the timestamp server was not able to process
+ * the Request properly
+ * * :BAD_DATA_FORMAT - Indicates that the timestamp server was not able to
+ * parse certain data in the Request
+ * * :TIME_NOT_AVAILABLE - Indicates that the server could not access its time
+ * source
+ * * :UNACCEPTED_POLICY - Indicates that the requested policy identifier is not
+ * recognized or supported by the timestamp server
+ * * :UNACCEPTED_EXTENSIION - Indicates that an extension in the Request is
+ * not supported by the timestamp server
+ * * :ADD_INFO_NOT_AVAILABLE -Indicates that additional information requested
+ * is either not understood or currently not available
+ * * :SYSTEM_FAILURE - Timestamp creation failed due to an internal error that
+ * occurred on the timestamp server
+ *
+ * call-seq:
+ * response.failure_info -> nil or symbol
+ */
+static VALUE
+ossl_ts_resp_get_failure_info(VALUE self)
+{
+ TS_RESP *resp;
+ TS_STATUS_INFO *si;
+
+ /* The ASN1_BIT_STRING_get_bit changed from 1.0.0. to 1.1.0, making this
+ * const. */
+ #if defined(HAVE_TS_STATUS_INFO_GET0_FAILURE_INFO)
+ const ASN1_BIT_STRING *fi;
+ #else
+ ASN1_BIT_STRING *fi;
+ #endif
+
+ GetTSResponse(self, resp);
+ si = TS_RESP_get_status_info(resp);
+ fi = TS_STATUS_INFO_get0_failure_info(si);
+ if (!fi)
+ return Qnil;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_ALG))
+ return sBAD_ALG;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_REQUEST))
+ return sBAD_REQUEST;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_BAD_DATA_FORMAT))
+ return sBAD_DATA_FORMAT;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_TIME_NOT_AVAILABLE))
+ return sTIME_NOT_AVAILABLE;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_UNACCEPTED_POLICY))
+ return sUNACCEPTED_POLICY;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_UNACCEPTED_EXTENSION))
+ return sUNACCEPTED_EXTENSION;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_ADD_INFO_NOT_AVAILABLE))
+ return sADD_INFO_NOT_AVAILABLE;
+ if (ASN1_BIT_STRING_get_bit(fi, TS_INFO_SYSTEM_FAILURE))
+ return sSYSTEM_FAILURE;
+
+ ossl_raise(eTimestampError, "Unrecognized failure info.");
+}
+
+/*
+ * In cases of failure this field may contain an array of strings further
+ * describing the origin of the failure.
+ *
+ * call-seq:
+ * response.status_text -> Array of strings or nil
+ */
+static VALUE
+ossl_ts_resp_get_status_text(VALUE self)
+{
+ TS_RESP *resp;
+ TS_STATUS_INFO *si;
+ const STACK_OF(ASN1_UTF8STRING) *text;
+ ASN1_UTF8STRING *current;
+ int i;
+ VALUE ret = rb_ary_new();
+
+ GetTSResponse(self, resp);
+ si = TS_RESP_get_status_info(resp);
+ if ((text = TS_STATUS_INFO_get0_text(si))) {
+ for (i = 0; i < sk_ASN1_UTF8STRING_num(text); i++) {
+ current = sk_ASN1_UTF8STRING_value(text, i);
+ rb_ary_push(ret, asn1str_to_str(current));
+ }
+ }
+
+ return ret;
+}
+
+/*
+ * If a timestamp token is present, this returns it in the form of a
+ * OpenSSL::PKCS7.
+ *
+ * call-seq:
+ * response.token -> nil or OpenSSL::PKCS7
+ */
+static VALUE
+ossl_ts_resp_get_token(VALUE self)
+{
+ TS_RESP *resp;
+ PKCS7 *p7, *copy;
+ VALUE obj;
+
+ GetTSResponse(self, resp);
+ if (!(p7 = TS_RESP_get_token(resp)))
+ return Qnil;
+
+ obj = NewPKCS7(cPKCS7);
+
+ if (!(copy = PKCS7_dup(p7)))
+ ossl_raise(eTimestampError, NULL);
+
+ SetPKCS7(obj, copy);
+
+ return obj;
+}
+
+/*
+ * Get the response's token info if present.
+ *
+ * call-seq:
+ * response.token_info -> nil or OpenSSL::Timestamp::TokenInfo
+ */
+static VALUE
+ossl_ts_resp_get_token_info(VALUE self)
+{
+ TS_RESP *resp;
+ TS_TST_INFO *info, *copy;
+ VALUE obj;
+
+ GetTSResponse(self, resp);
+ if (!(info = TS_RESP_get_tst_info(resp)))
+ return Qnil;
+
+ obj = NewTSTokenInfo(cTimestampTokenInfo);
+
+ if (!(copy = TS_TST_INFO_dup(info)))
+ ossl_raise(eTimestampError, NULL);
+
+ SetTSTokenInfo(obj, copy);
+
+ return obj;
+}
+
+/*
+ * If the Request specified to request the TSA certificate
+ * (Request#cert_requested = true), then this field contains the
+ * certificate of the timestamp authority.
+ *
+ * call-seq:
+ * response.tsa_certificate -> OpenSSL::X509::Certificate or nil
+ */
+static VALUE
+ossl_ts_resp_get_tsa_certificate(VALUE self)
+{
+ TS_RESP *resp;
+ PKCS7 *p7;
+ PKCS7_SIGNER_INFO *ts_info;
+ X509 *cert;
+
+ GetTSResponse(self, resp);
+ if (!(p7 = TS_RESP_get_token(resp)))
+ return Qnil;
+ ts_info = sk_PKCS7_SIGNER_INFO_value(p7->d.sign->signer_info, 0);
+ cert = PKCS7_cert_from_signer_info(p7, ts_info);
+ if (!cert)
+ return Qnil;
+ return ossl_x509_new(cert);
+}
+
+/*
+ * Returns the Response in DER-encoded form.
+ *
+ * call-seq:
+ * response.to_der -> string
+ */
+static VALUE
+ossl_ts_resp_to_der(VALUE self)
+{
+ TS_RESP *resp;
+
+ GetTSResponse(self, resp);
+ return asn1_to_der((void *)resp, (int (*)(void *, unsigned char **))i2d_TS_RESP);
+}
+
+/*
+ * Verifies a timestamp token by checking the signature, validating the
+ * certificate chain implied by tsa_certificate and by checking conformance to
+ * a given Request. Mandatory parameters are the Request associated to this
+ * Response, and an OpenSSL::X509::Store of trusted roots.
+ *
+ * Intermediate certificates can optionally be supplied for creating the
+ * certificate chain. These intermediate certificates must all be
+ * instances of OpenSSL::X509::Certificate.
+ *
+ * If validation fails, several kinds of exceptions can be raised:
+ * * TypeError if types don't fit
+ * * TimestampError if something is wrong with the timestamp token itself, if
+ * it is not conformant to the Request, or if validation of the timestamp
+ * certificate chain fails.
+ *
+ * call-seq:
+ * response.verify(Request, root_store) -> Response
+ * response.verify(Request, root_store, [intermediate_cert]) -> Response
+ */
+static VALUE
+ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self)
+{
+ VALUE ts_req, store, intermediates;
+ TS_RESP *resp;
+ TS_REQ *req;
+ X509_STORE *x509st;
+ TS_VERIFY_CTX *ctx;
+ STACK_OF(X509) *x509inter = NULL;
+ PKCS7* p7;
+ X509 *cert;
+ int status, i, ok;
+
+ rb_scan_args(argc, argv, "21", &ts_req, &store, &intermediates);
+
+ GetTSResponse(self, resp);
+ GetTSRequest(ts_req, req);
+ x509st = GetX509StorePtr(store);
+
+ if (!(ctx = TS_REQ_to_TS_VERIFY_CTX(req, NULL))) {
+ ossl_raise(eTimestampError, "Error when creating the verification context.");
+ }
+
+ if (!NIL_P(intermediates)) {
+ x509inter = ossl_protect_x509_ary2sk(intermediates, &status);
+ if (status) {
+ TS_VERIFY_CTX_free(ctx);
+ rb_jump_tag(status);
+ }
+ } else if (!(x509inter = sk_X509_new_null())) {
+ TS_VERIFY_CTX_free(ctx);
+ ossl_raise(eTimestampError, "sk_X509_new_null");
+ }
+
+ if (!(p7 = TS_RESP_get_token(resp))) {
+ TS_VERIFY_CTX_free(ctx);
+ sk_X509_pop_free(x509inter, X509_free);
+ ossl_raise(eTimestampError, "TS_RESP_get_token");
+ }
+ for (i=0; i < sk_X509_num(p7->d.sign->cert); i++) {
+ cert = sk_X509_value(p7->d.sign->cert, i);
+ if (!sk_X509_push(x509inter, cert)) {
+ sk_X509_pop_free(x509inter, X509_free);
+ TS_VERIFY_CTX_free(ctx);
+ ossl_raise(eTimestampError, "sk_X509_push");
+ }
+ X509_up_ref(cert);
+ }
+
+ TS_VERIFY_CTX_set_certs(ctx, x509inter);
+ TS_VERIFY_CTX_add_flags(ctx, TS_VFY_SIGNATURE);
+ TS_VERIFY_CTX_set_store(ctx, x509st);
+
+ ok = TS_RESP_verify_response(ctx, resp);
+ /*
+ * TS_VERIFY_CTX_set_store() call above does not increment the reference
+ * counter, so it must be unset before TS_VERIFY_CTX_free() is called.
+ */
+ TS_VERIFY_CTX_set_store(ctx, NULL);
+ TS_VERIFY_CTX_free(ctx);
+
+ if (!ok)
+ ossl_raise(eTimestampError, "TS_RESP_verify_response");
+
+ return self;
+}
+
+static VALUE
+ossl_ts_token_info_alloc(VALUE klass)
+{
+ TS_TST_INFO *info;
+ VALUE obj;
+
+ obj = NewTSTokenInfo(klass);
+ if (!(info = TS_TST_INFO_new()))
+ ossl_raise(eTimestampError, NULL);
+ SetTSTokenInfo(obj, info);
+
+ return obj;
+}
+
+/*
+ * Creates a TokenInfo from a +File+ or +string+ parameter, the
+ * corresponding +File+ or +string+ must be DER-encoded. Please note
+ * that TokenInfo is an immutable read-only class. If you'd like to create
+ * timestamps please refer to Factory instead.
+ *
+ * call-seq:
+ * OpenSSL::Timestamp::TokenInfo.new(file) -> token-info
+ * OpenSSL::Timestamp::TokenInfo.new(string) -> token-info
+ */
+static VALUE
+ossl_ts_token_info_initialize(VALUE self, VALUE der)
+{
+ TS_TST_INFO *info = DATA_PTR(self);
+ BIO *in;
+
+ der = ossl_to_der_if_possible(der);
+ in = ossl_obj2bio(&der);
+ info = d2i_TS_TST_INFO_bio(in, &info);
+ BIO_free(in);
+ if (!info) {
+ DATA_PTR(self) = NULL;
+ ossl_raise(eTimestampError, "Error when decoding the timestamp token info");
+ }
+ DATA_PTR(self) = info;
+
+ return self;
+}
+
+/*
+ * Returns the version number of the token info. With compliant servers,
+ * this value should be +1+ if present. If status is GRANTED or
+ * GRANTED_WITH_MODS.
+ *
+ * call-seq:
+ * token_info.version -> Integer or nil
+ */
+static VALUE
+ossl_ts_token_info_get_version(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return LONG2NUM(TS_TST_INFO_get_version(info));
+}
+
+/*
+ * Returns the timestamp policy object identifier of the policy this timestamp
+ * was created under. If status is GRANTED or GRANTED_WITH_MODS, this is never
+ * +nil+.
+ *
+ * ===Example:
+ * id = token_info.policy_id
+ * puts id -> "1.2.3.4.5"
+ *
+ * call-seq:
+ * token_info.policy_id -> string or nil
+ */
+static VALUE
+ossl_ts_token_info_get_policy_id(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return get_asn1obj(TS_TST_INFO_get_policy_id(info));
+}
+
+/*
+ * Returns the 'short name' of the object identifier representing the algorithm
+ * that was used to derive the message imprint digest. For valid timestamps,
+ * this is the same value that was already given in the Request. If status is
+ * GRANTED or GRANTED_WITH_MODS, this is never +nil+.
+ *
+ * ===Example:
+ * algo = token_info.algorithm
+ * puts algo -> "SHA1"
+ *
+ * call-seq:
+ * token_info.algorithm -> string or nil
+ */
+static VALUE
+ossl_ts_token_info_get_algorithm(VALUE self)
+{
+ TS_TST_INFO *info;
+ TS_MSG_IMPRINT *mi;
+ X509_ALGOR *algo;
+
+ GetTSTokenInfo(self, info);
+ mi = TS_TST_INFO_get_msg_imprint(info);
+ algo = TS_MSG_IMPRINT_get_algo(mi);
+ return get_asn1obj(algo->algorithm);
+}
+
+/*
+ * Returns the message imprint digest. For valid timestamps,
+ * this is the same value that was already given in the Request.
+ * If status is GRANTED or GRANTED_WITH_MODS, this is never +nil+.
+ *
+ * ===Example:
+ * mi = token_info.msg_imprint
+ * puts mi -> "DEADBEEF"
+ *
+ * call-seq:
+ * token_info.msg_imprint -> string.
+ */
+static VALUE
+ossl_ts_token_info_get_msg_imprint(VALUE self)
+{
+ TS_TST_INFO *info;
+ TS_MSG_IMPRINT *mi;
+ ASN1_OCTET_STRING *hashed_msg;
+ VALUE ret;
+
+ GetTSTokenInfo(self, info);
+ mi = TS_TST_INFO_get_msg_imprint(info);
+ hashed_msg = TS_MSG_IMPRINT_get_msg(mi);
+ ret = rb_str_new((const char *)hashed_msg->data, hashed_msg->length);
+
+ return ret;
+}
+
+/*
+ * Returns serial number of the timestamp token. This value shall never be the
+ * same for two timestamp tokens issued by a dedicated timestamp authority.
+ * If status is GRANTED or GRANTED_WITH_MODS, this is never +nil+.
+ *
+ * call-seq:
+ * token_info.serial_number -> BN or nil
+ */
+static VALUE
+ossl_ts_token_info_get_serial_number(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return asn1integer_to_num(TS_TST_INFO_get_serial(info));
+}
+
+/*
+ * Returns time when this timestamp token was created. If status is GRANTED or
+ * GRANTED_WITH_MODS, this is never +nil+.
+ *
+ * call-seq:
+ * token_info.gen_time -> Time
+ */
+static VALUE
+ossl_ts_token_info_get_gen_time(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return asn1time_to_time(TS_TST_INFO_get_time(info));
+}
+
+/*
+ * If the ordering field is missing, or if the ordering field is present
+ * and set to false, then the genTime field only indicates the time at
+ * which the time-stamp token has been created by the TSA. In such a
+ * case, the ordering of time-stamp tokens issued by the same TSA or
+ * different TSAs is only possible when the difference between the
+ * genTime of the first time-stamp token and the genTime of the second
+ * time-stamp token is greater than the sum of the accuracies of the
+ * genTime for each time-stamp token.
+ *
+ * If the ordering field is present and set to true, every time-stamp
+ * token from the same TSA can always be ordered based on the genTime
+ * field, regardless of the genTime accuracy.
+ *
+ * call-seq:
+ * token_info.ordering -> true, falses or nil
+ */
+static VALUE
+ossl_ts_token_info_get_ordering(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return TS_TST_INFO_get_ordering(info) ? Qtrue : Qfalse;
+}
+
+/*
+ * If the timestamp token is valid then this field contains the same nonce that
+ * was passed to the timestamp server in the initial Request.
+ *
+ * call-seq:
+ * token_info.nonce -> BN or nil
+ */
+static VALUE
+ossl_ts_token_info_get_nonce(VALUE self)
+{
+ TS_TST_INFO *info;
+ const ASN1_INTEGER *nonce;
+
+ GetTSTokenInfo(self, info);
+ if (!(nonce = TS_TST_INFO_get_nonce(info)))
+ return Qnil;
+
+ return asn1integer_to_num(nonce);
+}
+
+/*
+ * Returns the TokenInfo in DER-encoded form.
+ *
+ * call-seq:
+ * token_info.to_der -> string
+ */
+static VALUE
+ossl_ts_token_info_to_der(VALUE self)
+{
+ TS_TST_INFO *info;
+
+ GetTSTokenInfo(self, info);
+ return asn1_to_der((void *)info, (int (*)(void *, unsigned char **))i2d_TS_TST_INFO);
+}
+
+static ASN1_INTEGER *
+ossl_tsfac_serial_cb(struct TS_resp_ctx *ctx, void *data)
+{
+ ASN1_INTEGER **snptr = (ASN1_INTEGER **)data;
+ ASN1_INTEGER *sn = *snptr;
+ *snptr = NULL;
+ return sn;
+}
+
+static int
+#if !defined(LIBRESSL_VERSION_NUMBER)
+ossl_tsfac_time_cb(struct TS_resp_ctx *ctx, void *data, long *sec, long *usec)
+#else
+ossl_tsfac_time_cb(struct TS_resp_ctx *ctx, void *data, time_t *sec, long *usec)
+#endif
+{
+ *sec = *((long *)data);
+ *usec = 0;
+ return 1;
+}
+
+static VALUE
+ossl_evp_get_digestbyname_i(VALUE arg)
+{
+ return (VALUE)ossl_evp_get_digestbyname(arg);
+}
+
+static VALUE
+ossl_obj2bio_i(VALUE arg)
+{
+ return (VALUE)ossl_obj2bio((VALUE *)arg);
+}
+
+/*
+ * Creates a Response with the help of an OpenSSL::PKey, an
+ * OpenSSL::X509::Certificate and a Request.
+ *
+ * Mandatory parameters for timestamp creation that need to be set in the
+ * Request:
+ *
+ * * Request#algorithm
+ * * Request#message_imprint
+ *
+ * Mandatory parameters that need to be set in the Factory:
+ * * Factory#serial_number
+ * * Factory#gen_time
+ * * Factory#allowed_digests
+ *
+ * In addition one of either Request#policy_id or Factory#default_policy_id
+ * must be set.
+ *
+ * Raises a TimestampError if creation fails, though successfully created error
+ * responses may be returned.
+ *
+ * call-seq:
+ * factory.create_timestamp(key, certificate, request) -> Response
+ */
+static VALUE
+ossl_tsfac_create_ts(VALUE self, VALUE key, VALUE certificate, VALUE request)
+{
+ VALUE serial_number, def_policy_id, gen_time, additional_certs, allowed_digests;
+ VALUE str;
+ STACK_OF(X509) *inter_certs;
+ VALUE tsresp, ret = Qnil;
+ EVP_PKEY *sign_key;
+ X509 *tsa_cert;
+ TS_REQ *req;
+ TS_RESP *response = NULL;
+ TS_RESP_CTX *ctx = NULL;
+ BIO *req_bio;
+ ASN1_INTEGER *asn1_serial = NULL;
+ ASN1_OBJECT *def_policy_id_obj = NULL;
+ long lgen_time;
+ const char * err_msg = NULL;
+ int status = 0;
+
+ tsresp = NewTSResponse(cTimestampResponse);
+ tsa_cert = GetX509CertPtr(certificate);
+ sign_key = GetPrivPKeyPtr(key);
+ GetTSRequest(request, req);
+
+ gen_time = ossl_tsfac_get_gen_time(self);
+ if (!rb_obj_is_instance_of(gen_time, rb_cTime)) {
+ err_msg = "@gen_time must be a Time.";
+ goto end;
+ }
+ lgen_time = NUM2LONG(rb_funcall(gen_time, rb_intern("to_i"), 0));
+
+ serial_number = ossl_tsfac_get_serial_number(self);
+ if (NIL_P(serial_number)) {
+ err_msg = "@serial_number must be set.";
+ goto end;
+ }
+ asn1_serial = num_to_asn1integer(serial_number, NULL);
+
+ def_policy_id = ossl_tsfac_get_default_policy_id(self);
+ if (NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req)) {
+ err_msg = "No policy id in the request and no default policy set";
+ goto end;
+ }
+ if (!NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req)) {
+ def_policy_id_obj = (ASN1_OBJECT*)rb_protect(obj_to_asn1obj_i, (VALUE)def_policy_id, &status);
+ if (status)
+ goto end;
+ }
+
+ if (!(ctx = TS_RESP_CTX_new())) {
+ err_msg = "Memory allocation failed.";
+ goto end;
+ }
+
+ TS_RESP_CTX_set_serial_cb(ctx, ossl_tsfac_serial_cb, &asn1_serial);
+ if (!TS_RESP_CTX_set_signer_cert(ctx, tsa_cert)) {
+ err_msg = "Certificate does not contain the timestamping extension";
+ goto end;
+ }
+
+ additional_certs = ossl_tsfac_get_additional_certs(self);
+ if (rb_obj_is_kind_of(additional_certs, rb_cArray)) {
+ inter_certs = ossl_protect_x509_ary2sk(additional_certs, &status);
+ if (status)
+ goto end;
+
+ /* this dups the sk_X509 and ups each cert's ref count */
+ TS_RESP_CTX_set_certs(ctx, inter_certs);
+ sk_X509_pop_free(inter_certs, X509_free);
+ }
+
+ TS_RESP_CTX_set_signer_key(ctx, sign_key);
+ if (!NIL_P(def_policy_id) && !TS_REQ_get_policy_id(req))
+ TS_RESP_CTX_set_def_policy(ctx, def_policy_id_obj);
+ if (TS_REQ_get_policy_id(req))
+ TS_RESP_CTX_set_def_policy(ctx, TS_REQ_get_policy_id(req));
+ TS_RESP_CTX_set_time_cb(ctx, ossl_tsfac_time_cb, &lgen_time);
+
+ allowed_digests = ossl_tsfac_get_allowed_digests(self);
+ if (rb_obj_is_kind_of(allowed_digests, rb_cArray)) {
+ int i;
+ VALUE rbmd;
+ const EVP_MD *md;
+
+ for (i = 0; i < RARRAY_LEN(allowed_digests); i++) {
+ rbmd = rb_ary_entry(allowed_digests, i);
+ md = (const EVP_MD *)rb_protect(ossl_evp_get_digestbyname_i, rbmd, &status);
+ if (status)
+ goto end;
+ TS_RESP_CTX_add_md(ctx, md);
+ }
+ }
+
+ str = rb_protect(ossl_to_der, request, &status);
+ if (status)
+ goto end;
+
+ req_bio = (BIO*)rb_protect(ossl_obj2bio_i, (VALUE)&str, &status);
+ if (status)
+ goto end;
+
+ response = TS_RESP_create_response(ctx, req_bio);
+ BIO_free(req_bio);
+
+ if (!response) {
+ err_msg = "Error during response generation";
+ goto end;
+ }
+
+ /* bad responses aren't exceptional, but openssl still sets error
+ * information. */
+ ossl_clear_error();
+
+ SetTSResponse(tsresp, response);
+ ret = tsresp;
+
+end:
+ ASN1_INTEGER_free(asn1_serial);
+ ASN1_OBJECT_free(def_policy_id_obj);
+ TS_RESP_CTX_free(ctx);
+ if (err_msg)
+ rb_exc_raise(ossl_make_error(eTimestampError, rb_str_new_cstr(err_msg)));
+ if (status)
+ rb_jump_tag(status);
+ return ret;
+}
+
+/*
+ * INIT
+ */
+void
+Init_ossl_ts(void)
+{
+ #if 0
+ mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
+ #endif
+
+ /*
+ * Possible return value for +Response#failure_info+. Indicates that the
+ * timestamp server rejects the message imprint algorithm used in the
+ * +Request+
+ */
+ sBAD_ALG = ID2SYM(rb_intern_const("BAD_ALG"));
+
+ /*
+ * Possible return value for +Response#failure_info+. Indicates that the
+ * timestamp server was not able to process the +Request+ properly.
+ */
+ sBAD_REQUEST = ID2SYM(rb_intern_const("BAD_REQUEST"));
+ /*
+ * Possible return value for +Response#failure_info+. Indicates that the
+ * timestamp server was not able to parse certain data in the +Request+.
+ */
+ sBAD_DATA_FORMAT = ID2SYM(rb_intern_const("BAD_DATA_FORMAT"));
+
+ sTIME_NOT_AVAILABLE = ID2SYM(rb_intern_const("TIME_NOT_AVAILABLE"));
+ sUNACCEPTED_POLICY = ID2SYM(rb_intern_const("UNACCEPTED_POLICY"));
+ sUNACCEPTED_EXTENSION = ID2SYM(rb_intern_const("UNACCEPTED_EXTENSION"));
+ sADD_INFO_NOT_AVAILABLE = ID2SYM(rb_intern_const("ADD_INFO_NOT_AVAILABLE"));
+ sSYSTEM_FAILURE = ID2SYM(rb_intern_const("SYSTEM_FAILURE"));
+
+ /* Document-class: OpenSSL::Timestamp
+ * Provides classes and methods to request, create and validate
+ * {RFC3161-compliant}[http://www.ietf.org/rfc/rfc3161.txt] timestamps.
+ * Request may be used to either create requests from scratch or to parse
+ * existing requests that again can be used to request timestamps from a
+ * timestamp server, e.g. via the net/http. The resulting timestamp
+ * response may be parsed using Response.
+ *
+ * Please note that Response is read-only and immutable. To create a
+ * Response, an instance of Factory as well as a valid Request are needed.
+ *
+ * ===Create a Response:
+ * #Assumes ts.p12 is a PKCS#12-compatible file with a private key
+ * #and a certificate that has an extended key usage of 'timeStamping'
+ * p12 = OpenSSL::PKCS12.new(File.binread('ts.p12'), 'pwd')
+ * md = OpenSSL::Digest.new('SHA1')
+ * hash = md.digest(data) #some binary data to be timestamped
+ * req = OpenSSL::Timestamp::Request.new
+ * req.algorithm = 'SHA1'
+ * req.message_imprint = hash
+ * req.policy_id = "1.2.3.4.5"
+ * req.nonce = 42
+ * fac = OpenSSL::Timestamp::Factory.new
+ * fac.gen_time = Time.now
+ * fac.serial_number = 1
+ * timestamp = fac.create_timestamp(p12.key, p12.certificate, req)
+ *
+ * ===Verify a timestamp response:
+ * #Assume we have a timestamp token in a file called ts.der
+ * ts = OpenSSL::Timestamp::Response.new(File.binread('ts.der'))
+ * #Assume we have the Request for this token in a file called req.der
+ * req = OpenSSL::Timestamp::Request.new(File.binread('req.der'))
+ * # Assume the associated root CA certificate is contained in a
+ * # DER-encoded file named root.cer
+ * root = OpenSSL::X509::Certificate.new(File.binread('root.cer'))
+ * # get the necessary intermediate certificates, available in
+ * # DER-encoded form in inter1.cer and inter2.cer
+ * inter1 = OpenSSL::X509::Certificate.new(File.binread('inter1.cer'))
+ * inter2 = OpenSSL::X509::Certificate.new(File.binread('inter2.cer'))
+ * ts.verify(req, root, inter1, inter2) -> ts or raises an exception if validation fails
+ *
+ */
+ mTimestamp = rb_define_module_under(mOSSL, "Timestamp");
+
+ /* Document-class: OpenSSL::Timestamp::TimestampError
+ * Generic exception class of the Timestamp module.
+ */
+ eTimestampError = rb_define_class_under(mTimestamp, "TimestampError", eOSSLError);
+
+ /* Document-class: OpenSSL::Timestamp::Response
+ * Immutable and read-only representation of a timestamp response returned
+ * from a timestamp server after receiving an associated Request. Allows
+ * access to specific information about the response but also allows to
+ * verify the Response.
+ */
+ cTimestampResponse = rb_define_class_under(mTimestamp, "Response", rb_cObject);
+ rb_define_alloc_func(cTimestampResponse, ossl_ts_resp_alloc);
+ rb_define_method(cTimestampResponse, "initialize", ossl_ts_resp_initialize, 1);
+ rb_define_method(cTimestampResponse, "status", ossl_ts_resp_get_status, 0);
+ rb_define_method(cTimestampResponse, "failure_info", ossl_ts_resp_get_failure_info, 0);
+ rb_define_method(cTimestampResponse, "status_text", ossl_ts_resp_get_status_text, 0);
+ rb_define_method(cTimestampResponse, "token", ossl_ts_resp_get_token, 0);
+ rb_define_method(cTimestampResponse, "token_info", ossl_ts_resp_get_token_info, 0);
+ rb_define_method(cTimestampResponse, "tsa_certificate", ossl_ts_resp_get_tsa_certificate, 0);
+ rb_define_method(cTimestampResponse, "to_der", ossl_ts_resp_to_der, 0);
+ rb_define_method(cTimestampResponse, "verify", ossl_ts_resp_verify, -1);
+
+ /* Document-class: OpenSSL::Timestamp::TokenInfo
+ * Immutable and read-only representation of a timestamp token info from a
+ * Response.
+ */
+ cTimestampTokenInfo = rb_define_class_under(mTimestamp, "TokenInfo", rb_cObject);
+ rb_define_alloc_func(cTimestampTokenInfo, ossl_ts_token_info_alloc);
+ rb_define_method(cTimestampTokenInfo, "initialize", ossl_ts_token_info_initialize, 1);
+ rb_define_method(cTimestampTokenInfo, "version", ossl_ts_token_info_get_version, 0);
+ rb_define_method(cTimestampTokenInfo, "policy_id", ossl_ts_token_info_get_policy_id, 0);
+ rb_define_method(cTimestampTokenInfo, "algorithm", ossl_ts_token_info_get_algorithm, 0);
+ rb_define_method(cTimestampTokenInfo, "message_imprint", ossl_ts_token_info_get_msg_imprint, 0);
+ rb_define_method(cTimestampTokenInfo, "serial_number", ossl_ts_token_info_get_serial_number, 0);
+ rb_define_method(cTimestampTokenInfo, "gen_time", ossl_ts_token_info_get_gen_time, 0);
+ rb_define_method(cTimestampTokenInfo, "ordering", ossl_ts_token_info_get_ordering, 0);
+ rb_define_method(cTimestampTokenInfo, "nonce", ossl_ts_token_info_get_nonce, 0);
+ rb_define_method(cTimestampTokenInfo, "to_der", ossl_ts_token_info_to_der, 0);
+
+ /* Document-class: OpenSSL::Timestamp::Request
+ * Allows to create timestamp requests or parse existing ones. A Request is
+ * also needed for creating timestamps from scratch with Factory. When
+ * created from scratch, some default values are set:
+ * * version is set to +1+
+ * * cert_requested is set to +true+
+ * * algorithm, message_imprint, policy_id, and nonce are set to +false+
+ */
+ cTimestampRequest = rb_define_class_under(mTimestamp, "Request", rb_cObject);
+ rb_define_alloc_func(cTimestampRequest, ossl_ts_req_alloc);
+ rb_define_method(cTimestampRequest, "initialize", ossl_ts_req_initialize, -1);
+ rb_define_method(cTimestampRequest, "version=", ossl_ts_req_set_version, 1);
+ rb_define_method(cTimestampRequest, "version", ossl_ts_req_get_version, 0);
+ rb_define_method(cTimestampRequest, "algorithm=", ossl_ts_req_set_algorithm, 1);
+ rb_define_method(cTimestampRequest, "algorithm", ossl_ts_req_get_algorithm, 0);
+ rb_define_method(cTimestampRequest, "message_imprint=", ossl_ts_req_set_msg_imprint, 1);
+ rb_define_method(cTimestampRequest, "message_imprint", ossl_ts_req_get_msg_imprint, 0);
+ rb_define_method(cTimestampRequest, "policy_id=", ossl_ts_req_set_policy_id, 1);
+ rb_define_method(cTimestampRequest, "policy_id", ossl_ts_req_get_policy_id, 0);
+ rb_define_method(cTimestampRequest, "nonce=", ossl_ts_req_set_nonce, 1);
+ rb_define_method(cTimestampRequest, "nonce", ossl_ts_req_get_nonce, 0);
+ rb_define_method(cTimestampRequest, "cert_requested=", ossl_ts_req_set_cert_requested, 1);
+ rb_define_method(cTimestampRequest, "cert_requested?", ossl_ts_req_get_cert_requested, 0);
+ rb_define_method(cTimestampRequest, "to_der", ossl_ts_req_to_der, 0);
+
+ /*
+ * Indicates a successful response. Equal to +0+.
+ */
+ rb_define_const(cTimestampResponse, "GRANTED", INT2NUM(TS_STATUS_GRANTED));
+ /*
+ * Indicates a successful response that probably contains modifications
+ * from the initial request. Equal to +1+.
+ */
+ rb_define_const(cTimestampResponse, "GRANTED_WITH_MODS", INT2NUM(TS_STATUS_GRANTED_WITH_MODS));
+ /*
+ * Indicates a failure. No timestamp token was created. Equal to +2+.
+ */
+ rb_define_const(cTimestampResponse, "REJECTION", INT2NUM(TS_STATUS_REJECTION));
+ /*
+ * Indicates a failure. No timestamp token was created. Equal to +3+.
+ */
+ rb_define_const(cTimestampResponse, "WAITING", INT2NUM(TS_STATUS_WAITING));
+ /*
+ * Indicates a failure. No timestamp token was created. Revocation of a
+ * certificate is imminent. Equal to +4+.
+ */
+ rb_define_const(cTimestampResponse, "REVOCATION_WARNING", INT2NUM(TS_STATUS_REVOCATION_WARNING));
+ /*
+ * Indicates a failure. No timestamp token was created. A certificate
+ * has been revoked. Equal to +5+.
+ */
+ rb_define_const(cTimestampResponse, "REVOCATION_NOTIFICATION", INT2NUM(TS_STATUS_REVOCATION_NOTIFICATION));
+
+ /* Document-class: OpenSSL::Timestamp::Factory
+ *
+ * Used to generate a Response from scratch.
+ *
+ * Please bear in mind that the implementation will always apply and prefer
+ * the policy object identifier given in the request over the default policy
+ * id specified in the Factory. As a consequence, +default_policy_id+ will
+ * only be applied if no Request#policy_id was given. But this also means
+ * that one needs to check the policy identifier in the request manually
+ * before creating the Response, e.g. to check whether it complies to a
+ * specific set of acceptable policies.
+ *
+ * There exists also the possibility to add certificates (instances of
+ * OpenSSL::X509::Certificate) besides the timestamping certificate
+ * that will be included in the resulting timestamp token if
+ * Request#cert_requested? is +true+. Ideally, one would also include any
+ * intermediate certificates (the root certificate can be left out - in
+ * order to trust it any verifying party will have to be in its possession
+ * anyway). This simplifies validation of the timestamp since these
+ * intermediate certificates are "already there" and need not be passed as
+ * external parameters to Response#verify anymore, thus minimizing external
+ * resources needed for verification.
+ *
+ * ===Example: Inclusion of (untrusted) intermediate certificates
+ *
+ * Assume we received a timestamp request that has set Request#policy_id to
+ * +nil+ and Request#cert_requested? to true. The raw request bytes are
+ * stored in a variable called +req_raw+. We'd still like to integrate
+ * the necessary intermediate certificates (in +inter1.cer+ and
+ * +inter2.cer+) to simplify validation of the resulting Response. +ts.p12+
+ * is a PKCS#12-compatible file including the private key and the
+ * timestamping certificate.
+ *
+ * req = OpenSSL::Timestamp::Request.new(raw_bytes)
+ * p12 = OpenSSL::PKCS12.new(File.binread('ts.p12'), 'pwd')
+ * inter1 = OpenSSL::X509::Certificate.new(File.binread('inter1.cer'))
+ * inter2 = OpenSSL::X509::Certificate.new(File.binread('inter2.cer'))
+ * fac = OpenSSL::Timestamp::Factory.new
+ * fac.gen_time = Time.now
+ * fac.serial_number = 1
+ * fac.allowed_digests = ["sha256", "sha384", "sha512"]
+ * #needed because the Request contained no policy identifier
+ * fac.default_policy_id = '1.2.3.4.5'
+ * fac.additional_certificates = [ inter1, inter2 ]
+ * timestamp = fac.create_timestamp(p12.key, p12.certificate, req)
+ *
+ * ==Attributes
+ *
+ * ===default_policy_id
+ *
+ * Request#policy_id will always be preferred over this if present in the
+ * Request, only if Request#policy_id is nil default_policy will be used.
+ * If none of both is present, a TimestampError will be raised when trying
+ * to create a Response.
+ *
+ * call-seq:
+ * factory.default_policy_id = "string" -> string
+ * factory.default_policy_id -> string or nil
+ *
+ * ===serial_number
+ *
+ * Sets or retrieves the serial number to be used for timestamp creation.
+ * Must be present for timestamp creation.
+ *
+ * call-seq:
+ * factory.serial_number = number -> number
+ * factory.serial_number -> number or nil
+ *
+ * ===gen_time
+ *
+ * Sets or retrieves the Time value to be used in the Response. Must be
+ * present for timestamp creation.
+ *
+ * call-seq:
+ * factory.gen_time = Time -> Time
+ * factory.gen_time -> Time or nil
+ *
+ * ===additional_certs
+ *
+ * Sets or retrieves additional certificates apart from the timestamp
+ * certificate (e.g. intermediate certificates) to be added to the Response.
+ * Must be an Array of OpenSSL::X509::Certificate.
+ *
+ * call-seq:
+ * factory.additional_certs = [cert1, cert2] -> [ cert1, cert2 ]
+ * factory.additional_certs -> array or nil
+ *
+ * ===allowed_digests
+ *
+ * Sets or retrieves the digest algorithms that the factory is allowed
+ * create timestamps for. Known vulnerable or weak algorithms should not be
+ * allowed where possible.
+ * Must be an Array of String or OpenSSL::Digest subclass instances.
+ *
+ * call-seq:
+ * factory.allowed_digests = ["sha1", OpenSSL::Digest.new('SHA256').new] -> [ "sha1", OpenSSL::Digest) ]
+ * factory.allowed_digests -> array or nil
+ *
+ */
+ cTimestampFactory = rb_define_class_under(mTimestamp, "Factory", rb_cObject);
+ rb_attr(cTimestampFactory, rb_intern_const("allowed_digests"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("default_policy_id"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("serial_number"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("gen_time"), 1, 1, 0);
+ rb_attr(cTimestampFactory, rb_intern_const("additional_certs"), 1, 1, 0);
+ rb_define_method(cTimestampFactory, "create_timestamp", ossl_tsfac_create_ts, 3);
+}
+
+#endif
diff --git a/ext/openssl/ossl_ts.h b/ext/openssl/ossl_ts.h
new file mode 100644
index 0000000000..25fb0e1d64
--- /dev/null
+++ b/ext/openssl/ossl_ts.h
@@ -0,0 +1,16 @@
+/*
+ *
+ * Copyright (C) 2010 Martin Bosslet <Martin.Bosslet@googlemail.com>
+ * All rights reserved.
+ */
+/*
+ * This program is licenced under the same licence as Ruby.
+ * (See the file 'LICENCE'.)
+ */
+
+#if !defined(_OSSL_TS_H_)
+#define _OSSL_TS_H_
+
+void Init_ossl_ts(void);
+
+#endif
diff --git a/ext/openssl/ossl_version.h b/ext/openssl/ossl_version.h
deleted file mode 100644
index c162f8c2a8..0000000000
--- a/ext/openssl/ossl_version.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * 'OpenSSL for Ruby' project
- * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
- * All rights reserved.
- */
-/*
- * This program is licensed under the same licence as Ruby.
- * (See the file 'LICENCE'.)
- */
-#if !defined(_OSSL_VERSION_H_)
-#define _OSSL_VERSION_H_
-
-#define OSSL_VERSION "2.1.2"
-
-#endif /* _OSSL_VERSION_H_ */
diff --git a/ext/openssl/ossl_x509.c b/ext/openssl/ossl_x509.c
index 8a061b0687..f8470703fc 100644
--- a/ext/openssl/ossl_x509.c
+++ b/ext/openssl/ossl_x509.c
@@ -44,7 +44,13 @@ Init_ossl_x509(void)
Init_ossl_x509revoked();
Init_ossl_x509store();
+ /* Constants are up-to-date with 1.1.1. */
+
+ /* Certificate verification error code */
DefX509Const(V_OK);
+#if defined(X509_V_ERR_UNSPECIFIED) /* 1.0.1r, 1.0.2f, 1.1.0 */
+ DefX509Const(V_ERR_UNSPECIFIED);
+#endif
DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT);
DefX509Const(V_ERR_UNABLE_TO_GET_CRL);
DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE);
@@ -76,8 +82,71 @@ Init_ossl_x509(void)
DefX509Const(V_ERR_AKID_SKID_MISMATCH);
DefX509Const(V_ERR_AKID_ISSUER_SERIAL_MISMATCH);
DefX509Const(V_ERR_KEYUSAGE_NO_CERTSIGN);
+ DefX509Const(V_ERR_UNABLE_TO_GET_CRL_ISSUER);
+ DefX509Const(V_ERR_UNHANDLED_CRITICAL_EXTENSION);
+ DefX509Const(V_ERR_KEYUSAGE_NO_CRL_SIGN);
+ DefX509Const(V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION);
+ DefX509Const(V_ERR_INVALID_NON_CA);
+ DefX509Const(V_ERR_PROXY_PATH_LENGTH_EXCEEDED);
+ DefX509Const(V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE);
+ DefX509Const(V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED);
+ DefX509Const(V_ERR_INVALID_EXTENSION);
+ DefX509Const(V_ERR_INVALID_POLICY_EXTENSION);
+ DefX509Const(V_ERR_NO_EXPLICIT_POLICY);
+ DefX509Const(V_ERR_DIFFERENT_CRL_SCOPE);
+ DefX509Const(V_ERR_UNSUPPORTED_EXTENSION_FEATURE);
+ DefX509Const(V_ERR_UNNESTED_RESOURCE);
+ DefX509Const(V_ERR_PERMITTED_VIOLATION);
+ DefX509Const(V_ERR_EXCLUDED_VIOLATION);
+ DefX509Const(V_ERR_SUBTREE_MINMAX);
DefX509Const(V_ERR_APPLICATION_VERIFICATION);
+ DefX509Const(V_ERR_UNSUPPORTED_CONSTRAINT_TYPE);
+ DefX509Const(V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX);
+ DefX509Const(V_ERR_UNSUPPORTED_NAME_SYNTAX);
+ DefX509Const(V_ERR_CRL_PATH_VALIDATION_ERROR);
+#if defined(X509_V_ERR_PATH_LOOP)
+ DefX509Const(V_ERR_PATH_LOOP);
+#endif
+#if defined(X509_V_ERR_SUITE_B_INVALID_VERSION)
+ DefX509Const(V_ERR_SUITE_B_INVALID_VERSION);
+ DefX509Const(V_ERR_SUITE_B_INVALID_ALGORITHM);
+ DefX509Const(V_ERR_SUITE_B_INVALID_CURVE);
+ DefX509Const(V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM);
+ DefX509Const(V_ERR_SUITE_B_LOS_NOT_ALLOWED);
+ DefX509Const(V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256);
+#endif
+ DefX509Const(V_ERR_HOSTNAME_MISMATCH);
+ DefX509Const(V_ERR_EMAIL_MISMATCH);
+ DefX509Const(V_ERR_IP_ADDRESS_MISMATCH);
+#if defined(X509_V_ERR_DANE_NO_MATCH)
+ DefX509Const(V_ERR_DANE_NO_MATCH);
+#endif
+#if defined(X509_V_ERR_EE_KEY_TOO_SMALL)
+ DefX509Const(V_ERR_EE_KEY_TOO_SMALL);
+ DefX509Const(V_ERR_CA_KEY_TOO_SMALL);
+ DefX509Const(V_ERR_CA_MD_TOO_WEAK);
+#endif
+#if defined(X509_V_ERR_INVALID_CALL)
+ DefX509Const(V_ERR_INVALID_CALL);
+#endif
+#if defined(X509_V_ERR_STORE_LOOKUP)
+ DefX509Const(V_ERR_STORE_LOOKUP);
+#endif
+#if defined(X509_V_ERR_NO_VALID_SCTS)
+ DefX509Const(V_ERR_NO_VALID_SCTS);
+#endif
+#if defined(X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION)
+ DefX509Const(V_ERR_PROXY_SUBJECT_NAME_VIOLATION);
+#endif
+#if defined(X509_V_ERR_OCSP_VERIFY_NEEDED)
+ DefX509Const(V_ERR_OCSP_VERIFY_NEEDED);
+ DefX509Const(V_ERR_OCSP_VERIFY_FAILED);
+ DefX509Const(V_ERR_OCSP_CERT_UNKNOWN);
+#endif
+ /* Certificate verify flags */
+ /* Set by Store#flags= and StoreContext#flags=. */
+ DefX509Const(V_FLAG_USE_CHECK_TIME);
/* Set by Store#flags= and StoreContext#flags=. Enables CRL checking for the
* certificate chain leaf. */
DefX509Const(V_FLAG_CRL_CHECK);
@@ -116,12 +185,28 @@ Init_ossl_x509(void)
/* Set by Store#flags= and StoreContext#flags=. Enables checking of the
* signature of the root self-signed CA. */
DefX509Const(V_FLAG_CHECK_SS_SIGNATURE);
-#if defined(X509_V_FLAG_TRUSTED_FIRST)
/* Set by Store#flags= and StoreContext#flags=. When constructing a
* certificate chain, search the Store first for the issuer certificate.
* Enabled by default in OpenSSL >= 1.1.0. */
DefX509Const(V_FLAG_TRUSTED_FIRST);
+#if defined(X509_V_FLAG_SUITEB_128_LOS_ONLY)
+ /* Set by Store#flags= and StoreContext#flags=.
+ * Enables Suite B 128 bit only mode. */
+ DefX509Const(V_FLAG_SUITEB_128_LOS_ONLY);
#endif
+#if defined(X509_V_FLAG_SUITEB_192_LOS)
+ /* Set by Store#flags= and StoreContext#flags=.
+ * Enables Suite B 192 bit only mode. */
+ DefX509Const(V_FLAG_SUITEB_192_LOS);
+#endif
+#if defined(X509_V_FLAG_SUITEB_128_LOS)
+ /* Set by Store#flags= and StoreContext#flags=.
+ * Enables Suite B 128 bit mode allowing 192 bit algorithms. */
+ DefX509Const(V_FLAG_SUITEB_128_LOS);
+#endif
+ /* Set by Store#flags= and StoreContext#flags=.
+ * Allows partial chains if at least one certificate is in trusted store. */
+ DefX509Const(V_FLAG_PARTIAL_CHAIN);
#if defined(X509_V_FLAG_NO_ALT_CHAINS)
/* Set by Store#flags= and StoreContext#flags=. Suppresses searching for
* a alternative chain. No effect in OpenSSL >= 1.1.0. */
diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c
index 40542c4a78..9443541645 100644
--- a/ext/openssl/ossl_x509cert.c
+++ b/ext/openssl/ossl_x509cert.c
@@ -115,24 +115,27 @@ static VALUE
ossl_x509_initialize(int argc, VALUE *argv, VALUE self)
{
BIO *in;
- X509 *x509, *x = DATA_PTR(self);
+ X509 *x509, *x509_orig = RTYPEDDATA_DATA(self);
VALUE arg;
+ rb_check_frozen(self);
if (rb_scan_args(argc, argv, "01", &arg) == 0) {
/* create just empty X509Cert */
return self;
}
arg = ossl_to_der_if_possible(arg);
in = ossl_obj2bio(&arg);
- x509 = PEM_read_bio_X509(in, &x, NULL, NULL);
- DATA_PTR(self) = x;
+ x509 = d2i_X509_bio(in, NULL);
if (!x509) {
- OSSL_BIO_reset(in);
- x509 = d2i_X509_bio(in, &x);
- DATA_PTR(self) = x;
+ OSSL_BIO_reset(in);
+ x509 = PEM_read_bio_X509(in, NULL, NULL, NULL);
}
BIO_free(in);
- if (!x509) ossl_raise(eX509CertError, NULL);
+ if (!x509)
+ ossl_raise(eX509CertError, "PEM_read_bio_X509");
+
+ RTYPEDDATA_DATA(self) = x509;
+ X509_free(x509_orig);
return self;
}
@@ -639,12 +642,12 @@ ossl_x509_set_extensions(VALUE self, VALUE ary)
OSSL_Check_Kind(RARRAY_AREF(ary, i), cX509Ext);
}
GetX509(self, x509);
- while ((ext = X509_delete_ext(x509, 0)))
- X509_EXTENSION_free(ext);
+ for (i = X509_get_ext_count(x509); i > 0; i--)
+ X509_EXTENSION_free(X509_delete_ext(x509, 0));
for (i=0; i<RARRAY_LEN(ary); i++) {
ext = GetX509ExtPtr(RARRAY_AREF(ary, i));
if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext */
- ossl_raise(eX509CertError, NULL);
+ ossl_raise(eX509CertError, "X509_add_ext");
}
}
@@ -704,6 +707,157 @@ ossl_x509_eq(VALUE self, VALUE other)
return !X509_cmp(a, b) ? Qtrue : Qfalse;
}
+struct load_chained_certificates_arguments {
+ VALUE certificates;
+ X509 *certificate;
+};
+
+static VALUE
+load_chained_certificates_append_push(VALUE _arguments) {
+ struct load_chained_certificates_arguments *arguments = (struct load_chained_certificates_arguments*)_arguments;
+
+ if (arguments->certificates == Qnil) {
+ arguments->certificates = rb_ary_new();
+ }
+
+ rb_ary_push(arguments->certificates, ossl_x509_new(arguments->certificate));
+
+ return Qnil;
+}
+
+static VALUE
+load_chained_certificate_append_ensure(VALUE _arguments) {
+ struct load_chained_certificates_arguments *arguments = (struct load_chained_certificates_arguments*)_arguments;
+
+ X509_free(arguments->certificate);
+
+ return Qnil;
+}
+
+inline static VALUE
+load_chained_certificates_append(VALUE certificates, X509 *certificate) {
+ struct load_chained_certificates_arguments arguments;
+ arguments.certificates = certificates;
+ arguments.certificate = certificate;
+
+ rb_ensure(load_chained_certificates_append_push, (VALUE)&arguments, load_chained_certificate_append_ensure, (VALUE)&arguments);
+
+ return arguments.certificates;
+}
+
+static VALUE
+load_chained_certificates_PEM(BIO *in) {
+ VALUE certificates = Qnil;
+ X509 *certificate = PEM_read_bio_X509(in, NULL, NULL, NULL);
+
+ /* If we cannot read even one certificate: */
+ if (certificate == NULL) {
+ /* If we cannot read one certificate because we could not read the PEM encoding: */
+ if (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) {
+ ossl_clear_error();
+ }
+
+ if (ERR_peek_last_error())
+ ossl_raise(eX509CertError, NULL);
+ else
+ return Qnil;
+ }
+
+ certificates = load_chained_certificates_append(Qnil, certificate);
+
+ while ((certificate = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
+ load_chained_certificates_append(certificates, certificate);
+ }
+
+ /* We tried to read one more certificate but could not read start line: */
+ if (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) {
+ /* This is not an error, it means we are finished: */
+ ossl_clear_error();
+
+ return certificates;
+ }
+
+ /* Alternatively, if we reached the end of the file and there was no error: */
+ if (BIO_eof(in) && !ERR_peek_last_error()) {
+ return certificates;
+ } else {
+ /* Otherwise, we tried to read a certificate but failed somewhere: */
+ ossl_raise(eX509CertError, NULL);
+ }
+}
+
+static VALUE
+load_chained_certificates_DER(BIO *in) {
+ X509 *certificate = d2i_X509_bio(in, NULL);
+
+ /* If we cannot read one certificate: */
+ if (certificate == NULL) {
+ /* Ignore error. We could not load. */
+ ossl_clear_error();
+
+ return Qnil;
+ }
+
+ return load_chained_certificates_append(Qnil, certificate);
+}
+
+static VALUE
+load_chained_certificates(VALUE _io) {
+ BIO *in = (BIO*)_io;
+ VALUE certificates = Qnil;
+
+ /*
+ DER is a binary format and it may contain octets within it that look like
+ PEM encoded certificates. So we need to check DER first.
+ */
+ certificates = load_chained_certificates_DER(in);
+
+ if (certificates != Qnil)
+ return certificates;
+
+ OSSL_BIO_reset(in);
+
+ certificates = load_chained_certificates_PEM(in);
+
+ if (certificates != Qnil)
+ return certificates;
+
+ /* Otherwise we couldn't read the output correctly so fail: */
+ ossl_raise(eX509CertError, "Could not detect format of certificate data!");
+}
+
+static VALUE
+load_chained_certificates_ensure(VALUE _io) {
+ BIO *in = (BIO*)_io;
+
+ BIO_free(in);
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * OpenSSL::X509::Certificate.load(string) -> [certs...]
+ * OpenSSL::X509::Certificate.load(file) -> [certs...]
+ *
+ * Read the chained certificates from the given input. Supports both PEM
+ * and DER encoded certificates.
+ *
+ * PEM is a text format and supports more than one certificate.
+ *
+ * DER is a binary format and only supports one certificate.
+ *
+ * If the file is empty, or contains only unrelated data, an
+ * +OpenSSL::X509::CertificateError+ exception will be raised.
+ */
+static VALUE
+ossl_x509_load(VALUE klass, VALUE buffer)
+{
+ BIO *in = ossl_obj2bio(&buffer);
+
+ return rb_ensure(load_chained_certificates, (VALUE)in, load_chained_certificates_ensure, (VALUE)in);
+}
+
/*
* INIT
*/
@@ -730,7 +884,7 @@ Init_ossl_x509cert(void)
* Certificate is capable of handling DER-encoded certificates and
* certificates encoded in OpenSSL's PEM format.
*
- * raw = File.read "cert.cer" # DER- or PEM-encoded
+ * raw = File.binread "cert.cer" # DER- or PEM-encoded
* certificate = OpenSSL::X509::Certificate.new raw
*
* === Saving a certificate to a file
@@ -788,7 +942,7 @@ Init_ossl_x509cert(void)
* root_ca.add_extension(ef.create_extension("keyUsage","keyCertSign, cRLSign", true))
* root_ca.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
* root_ca.add_extension(ef.create_extension("authorityKeyIdentifier","keyid:always",false))
- * root_ca.sign(root_key, OpenSSL::Digest::SHA256.new)
+ * root_ca.sign(root_key, OpenSSL::Digest.new('SHA256'))
*
* The next step is to create the end-entity certificate using the root CA
* certificate.
@@ -807,11 +961,13 @@ Init_ossl_x509cert(void)
* ef.issuer_certificate = root_ca
* cert.add_extension(ef.create_extension("keyUsage","digitalSignature", true))
* cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
- * cert.sign(root_key, OpenSSL::Digest::SHA256.new)
+ * cert.sign(root_key, OpenSSL::Digest.new('SHA256'))
*
*/
cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);
+ rb_define_singleton_method(cX509Cert, "load", ossl_x509_load, 1);
+
rb_define_alloc_func(cX509Cert, ossl_x509_alloc);
rb_define_method(cX509Cert, "initialize", ossl_x509_initialize, -1);
rb_define_method(cX509Cert, "initialize_copy", ossl_x509_copy, 1);
diff --git a/ext/openssl/ossl_x509crl.c b/ext/openssl/ossl_x509crl.c
index b0badf45c4..6c1d915370 100644
--- a/ext/openssl/ossl_x509crl.c
+++ b/ext/openssl/ossl_x509crl.c
@@ -93,23 +93,26 @@ static VALUE
ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self)
{
BIO *in;
- X509_CRL *crl, *x = DATA_PTR(self);
+ X509_CRL *crl, *crl_orig = RTYPEDDATA_DATA(self);
VALUE arg;
+ rb_check_frozen(self);
if (rb_scan_args(argc, argv, "01", &arg) == 0) {
return self;
}
arg = ossl_to_der_if_possible(arg);
in = ossl_obj2bio(&arg);
- crl = PEM_read_bio_X509_CRL(in, &x, NULL, NULL);
- DATA_PTR(self) = x;
+ crl = d2i_X509_CRL_bio(in, NULL);
if (!crl) {
- OSSL_BIO_reset(in);
- crl = d2i_X509_CRL_bio(in, &x);
- DATA_PTR(self) = x;
+ OSSL_BIO_reset(in);
+ crl = PEM_read_bio_X509_CRL(in, NULL, NULL, NULL);
}
BIO_free(in);
- if (!crl) ossl_raise(eX509CRLError, NULL);
+ if (!crl)
+ ossl_raise(eX509CRLError, "PEM_read_bio_X509_CRL");
+
+ RTYPEDDATA_DATA(self) = crl;
+ X509_CRL_free(crl_orig);
return self;
}
@@ -471,12 +474,12 @@ ossl_x509crl_set_extensions(VALUE self, VALUE ary)
OSSL_Check_Kind(RARRAY_AREF(ary, i), cX509Ext);
}
GetX509CRL(self, crl);
- while ((ext = X509_CRL_delete_ext(crl, 0)))
- X509_EXTENSION_free(ext);
+ for (i = X509_CRL_get_ext_count(crl); i > 0; i--)
+ X509_EXTENSION_free(X509_CRL_delete_ext(crl, 0));
for (i=0; i<RARRAY_LEN(ary); i++) {
ext = GetX509ExtPtr(RARRAY_AREF(ary, i)); /* NO NEED TO DUP */
if (!X509_CRL_add_ext(crl, ext, -1)) {
- ossl_raise(eX509CRLError, NULL);
+ ossl_raise(eX509CRLError, "X509_CRL_add_ext");
}
}
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 30ec09d7a3..e54102c771 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -226,11 +226,10 @@ ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
GetX509ExtFactory(self, ctx);
obj = NewX509Ext(cX509Ext);
rconf = rb_iv_get(self, "@config");
- conf = NIL_P(rconf) ? NULL : DupConfigPtr(rconf);
+ conf = NIL_P(rconf) ? NULL : GetConfig(rconf);
X509V3_set_nconf(ctx, conf);
ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr));
X509V3_set_ctx_nodb(ctx);
- NCONF_free(conf);
if (!ext){
ossl_raise(eX509ExtError, "%"PRIsVALUE" = %"PRIsVALUE, oid, valstr);
}
@@ -403,6 +402,19 @@ ossl_x509ext_get_value(VALUE obj)
}
static VALUE
+ossl_x509ext_get_value_der(VALUE obj)
+{
+ X509_EXTENSION *ext;
+ ASN1_OCTET_STRING *value;
+
+ GetX509Ext(obj, ext);
+ if ((value = X509_EXTENSION_get_data(ext)) == NULL)
+ ossl_raise(eX509ExtError, NULL);
+
+ return rb_str_new((const char *)value->data, value->length);
+}
+
+static VALUE
ossl_x509ext_get_critical(VALUE obj)
{
X509_EXTENSION *ext;
@@ -472,6 +484,7 @@ Init_ossl_x509ext(void)
rb_define_method(cX509Ext, "critical=", ossl_x509ext_set_critical, 1);
rb_define_method(cX509Ext, "oid", ossl_x509ext_get_oid, 0);
rb_define_method(cX509Ext, "value", ossl_x509ext_get_value, 0);
+ rb_define_method(cX509Ext, "value_der", ossl_x509ext_get_value_der, 0);
rb_define_method(cX509Ext, "critical?", ossl_x509ext_get_critical, 0);
rb_define_method(cX509Ext, "to_der", ossl_x509ext_to_der, 0);
}
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index 1ea8400dbb..13a2b2c030 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -291,7 +291,14 @@ x509name_print(VALUE self, unsigned long iflag)
* * OpenSSL::X509::Name::MULTILINE
*
* If _format_ is omitted, the largely broken and traditional OpenSSL format
- * is used.
+ * (<tt>X509_NAME_oneline()</tt> format) is chosen.
+ *
+ * <b>Use of this method is discouraged.</b> None of the formats other than
+ * OpenSSL::X509::Name::RFC2253 is standardized and may show an inconsistent
+ * behavior through \OpenSSL versions.
+ *
+ * It is recommended to use #to_utf8 instead, which is equivalent to calling
+ * <tt>name.to_s(OpenSSL::X509::Name::RFC2253).force_encoding("UTF-8")</tt>.
*/
static VALUE
ossl_x509name_to_s(int argc, VALUE *argv, VALUE self)
@@ -387,17 +394,21 @@ ossl_x509name_cmp0(VALUE self, VALUE other)
/*
* call-seq:
- * name.cmp(other) -> -1 | 0 | 1
- * name <=> other -> -1 | 0 | 1
+ * name.cmp(other) -> -1 | 0 | 1 | nil
+ * name <=> other -> -1 | 0 | 1 | nil
*
* Compares this Name with _other_ and returns +0+ if they are the same and +-1+
* or ++1+ if they are greater or less than each other respectively.
+ * Returns +nil+ if they are not comparable (i.e. different types).
*/
static VALUE
ossl_x509name_cmp(VALUE self, VALUE other)
{
int result;
+ if (!rb_obj_is_kind_of(other, cX509Name))
+ return Qnil;
+
result = ossl_x509name_cmp0(self, other);
if (result < 0) return INT2FIX(-1);
if (result > 0) return INT2FIX(1);
@@ -494,7 +505,7 @@ ossl_x509name_to_der(VALUE self)
* You can create a Name by parsing a distinguished name String or by
* supplying the distinguished name as an Array.
*
- * name = OpenSSL::X509::Name.parse 'CN=nobody/DC=example'
+ * name = OpenSSL::X509::Name.parse_rfc2253 'DC=example,CN=nobody'
*
* name = OpenSSL::X509::Name.new [['CN', 'nobody'], ['DC', 'example']]
*/
diff --git a/ext/openssl/ossl_x509req.c b/ext/openssl/ossl_x509req.c
index 2c20042a92..77a7d3f2ff 100644
--- a/ext/openssl/ossl_x509req.c
+++ b/ext/openssl/ossl_x509req.c
@@ -79,23 +79,26 @@ static VALUE
ossl_x509req_initialize(int argc, VALUE *argv, VALUE self)
{
BIO *in;
- X509_REQ *req, *x = DATA_PTR(self);
+ X509_REQ *req, *req_orig = RTYPEDDATA_DATA(self);
VALUE arg;
+ rb_check_frozen(self);
if (rb_scan_args(argc, argv, "01", &arg) == 0) {
return self;
}
arg = ossl_to_der_if_possible(arg);
in = ossl_obj2bio(&arg);
- req = PEM_read_bio_X509_REQ(in, &x, NULL, NULL);
- DATA_PTR(self) = x;
+ req = d2i_X509_REQ_bio(in, NULL);
if (!req) {
- OSSL_BIO_reset(in);
- req = d2i_X509_REQ_bio(in, &x);
- DATA_PTR(self) = x;
+ OSSL_BIO_reset(in);
+ req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
}
BIO_free(in);
- if (!req) ossl_raise(eX509ReqError, NULL);
+ if (!req)
+ ossl_raise(eX509ReqError, "PEM_read_bio_X509_REQ");
+
+ RTYPEDDATA_DATA(self) = req;
+ X509_REQ_free(req_orig);
return self;
}
@@ -377,13 +380,13 @@ ossl_x509req_set_attributes(VALUE self, VALUE ary)
OSSL_Check_Kind(RARRAY_AREF(ary, i), cX509Attr);
}
GetX509Req(self, req);
- while ((attr = X509_REQ_delete_attr(req, 0)))
- X509_ATTRIBUTE_free(attr);
+ for (i = X509_REQ_get_attr_count(req); i > 0; i--)
+ X509_ATTRIBUTE_free(X509_REQ_delete_attr(req, 0));
for (i=0;i<RARRAY_LEN(ary); i++) {
item = RARRAY_AREF(ary, i);
attr = GetX509AttrPtr(item);
if (!X509_REQ_add1_attr(req, attr)) {
- ossl_raise(eX509ReqError, NULL);
+ ossl_raise(eX509ReqError, "X509_REQ_add1_attr");
}
}
return ary;
diff --git a/ext/openssl/ossl_x509revoked.c b/ext/openssl/ossl_x509revoked.c
index 5fe6853430..10b8aa4ad6 100644
--- a/ext/openssl/ossl_x509revoked.c
+++ b/ext/openssl/ossl_x509revoked.c
@@ -223,13 +223,13 @@ ossl_x509revoked_set_extensions(VALUE self, VALUE ary)
OSSL_Check_Kind(RARRAY_AREF(ary, i), cX509Ext);
}
GetX509Rev(self, rev);
- while ((ext = X509_REVOKED_delete_ext(rev, 0)))
- X509_EXTENSION_free(ext);
+ for (i = X509_REVOKED_get_ext_count(rev); i > 0; i--)
+ X509_EXTENSION_free(X509_REVOKED_delete_ext(rev, 0));
for (i=0; i<RARRAY_LEN(ary); i++) {
item = RARRAY_AREF(ary, i);
ext = GetX509ExtPtr(item);
if(!X509_REVOKED_add_ext(rev, ext, -1)) {
- ossl_raise(eX509RevError, NULL);
+ ossl_raise(eX509RevError, "X509_REVOKED_add_ext");
}
}
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index 61543d44f6..7c546187c3 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -52,8 +52,15 @@ struct ossl_verify_cb_args {
};
static VALUE
-call_verify_cb_proc(struct ossl_verify_cb_args *args)
+ossl_x509stctx_new_i(VALUE arg)
{
+ return ossl_x509stctx_new((X509_STORE_CTX *)arg);
+}
+
+static VALUE
+call_verify_cb_proc(VALUE arg)
+{
+ struct ossl_verify_cb_args *args = (struct ossl_verify_cb_args *)arg;
return rb_funcall(args->proc, rb_intern("call"), 2,
args->preverify_ok, args->store_ctx);
}
@@ -69,7 +76,7 @@ ossl_verify_cb_call(VALUE proc, int ok, X509_STORE_CTX *ctx)
return ok;
ret = Qfalse;
- rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new, (VALUE)ctx, &state);
+ rctx = rb_protect(ossl_x509stctx_new_i, (VALUE)ctx, &state);
if (state) {
rb_set_errinfo(Qnil);
rb_warn("StoreContext initialization failure");
@@ -78,7 +85,7 @@ ossl_verify_cb_call(VALUE proc, int ok, X509_STORE_CTX *ctx)
args.proc = proc;
args.preverify_ok = ok ? Qtrue : Qfalse;
args.store_ctx = rctx;
- ret = rb_protect((VALUE(*)(VALUE))call_verify_cb_proc, (VALUE)&args, &state);
+ ret = rb_protect(call_verify_cb_proc, (VALUE)&args, &state);
if (state) {
rb_set_errinfo(Qnil);
rb_warn("exception in verify_callback is ignored");
@@ -106,6 +113,13 @@ VALUE cX509StoreContext;
VALUE eX509StoreError;
static void
+ossl_x509store_mark(void *ptr)
+{
+ X509_STORE *store = ptr;
+ rb_gc_mark((VALUE)X509_STORE_get_ex_data(store, store_ex_verify_cb_idx));
+}
+
+static void
ossl_x509store_free(void *ptr)
{
X509_STORE_free(ptr);
@@ -114,7 +128,7 @@ ossl_x509store_free(void *ptr)
static const rb_data_type_t ossl_x509store_type = {
"OpenSSL/X509/STORE",
{
- 0, ossl_x509store_free,
+ ossl_x509store_mark, ossl_x509store_free,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
};
@@ -157,9 +171,8 @@ ossl_x509store_alloc(VALUE klass)
VALUE obj;
obj = NewX509Store(klass);
- if((store = X509_STORE_new()) == NULL){
- ossl_raise(eX509StoreError, NULL);
- }
+ if ((store = X509_STORE_new()) == NULL)
+ ossl_raise(eX509StoreError, "X509_STORE_new");
SetX509Store(obj, store);
return obj;
@@ -192,8 +205,9 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
{
X509_STORE *store;
-/* BUG: This method takes any number of arguments but appears to ignore them. */
GetX509Store(self, store);
+ if (argc != 0)
+ rb_warn("OpenSSL::X509::Store.new does not take any arguments");
#if !defined(HAVE_OPAQUE_OPENSSL)
/* [Bug #405] [Bug #1678] [Bug #3000]; already fixed? */
store->ex_data.sk = NULL;
@@ -214,8 +228,16 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
* call-seq:
* store.flags = flags
*
- * Sets _flags_ to the Store. _flags_ consists of zero or more of the constants
- * defined in with name V_FLAG_* or'ed together.
+ * Sets the default flags used by certificate chain verification performed with
+ * the Store.
+ *
+ * _flags_ consists of zero or more of the constants defined in OpenSSL::X509
+ * with name V_FLAG_* or'ed together.
+ *
+ * OpenSSL::X509::StoreContext#flags= can be used to change the flags for a
+ * single verification operation.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_flags(3).
*/
static VALUE
ossl_x509store_set_flags(VALUE self, VALUE flags)
@@ -233,9 +255,9 @@ ossl_x509store_set_flags(VALUE self, VALUE flags)
* call-seq:
* store.purpose = purpose
*
- * Sets the store's purpose to _purpose_. If specified, the verifications on
- * the store will check every untrusted certificate's extensions are consistent
- * with the purpose. The purpose is specified by constants:
+ * Sets the store's default verification purpose. If specified,
+ * the verifications on the store will check every certificate's extensions are
+ * consistent with the purpose. The purpose is specified by constants:
*
* * X509::PURPOSE_SSL_CLIENT
* * X509::PURPOSE_SSL_SERVER
@@ -246,6 +268,11 @@ ossl_x509store_set_flags(VALUE self, VALUE flags)
* * X509::PURPOSE_ANY
* * X509::PURPOSE_OCSP_HELPER
* * X509::PURPOSE_TIMESTAMP_SIGN
+ *
+ * OpenSSL::X509::StoreContext#purpose= can be used to change the value for a
+ * single verification operation.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_purpose(3).
*/
static VALUE
ossl_x509store_set_purpose(VALUE self, VALUE purpose)
@@ -262,6 +289,14 @@ ossl_x509store_set_purpose(VALUE self, VALUE purpose)
/*
* call-seq:
* store.trust = trust
+ *
+ * Sets the default trust settings used by the certificate verification with
+ * the store.
+ *
+ * OpenSSL::X509::StoreContext#trust= can be used to change the value for a
+ * single verification operation.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_trust(3).
*/
static VALUE
ossl_x509store_set_trust(VALUE self, VALUE trust)
@@ -279,7 +314,13 @@ ossl_x509store_set_trust(VALUE self, VALUE trust)
* call-seq:
* store.time = time
*
- * Sets the time to be used in verifications.
+ * Sets the time to be used in the certificate verifications with the store.
+ * By default, if not specified, the current system time is used.
+ *
+ * OpenSSL::X509::StoreContext#time= can be used to change the value for a
+ * single verification operation.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_time(3).
*/
static VALUE
ossl_x509store_set_time(VALUE self, VALUE time)
@@ -295,23 +336,23 @@ ossl_x509store_set_time(VALUE self, VALUE time)
* Adds the certificates in _file_ to the certificate store. _file_ is the path
* to the file, and the file contains one or more certificates in PEM format
* concatenated together.
+ *
+ * See also the man page X509_LOOKUP_file(3).
*/
static VALUE
ossl_x509store_add_file(VALUE self, VALUE file)
{
X509_STORE *store;
X509_LOOKUP *lookup;
- char *path = NULL;
+ const char *path;
- if(file != Qnil){
- path = StringValueCStr(file);
- }
GetX509Store(self, store);
+ path = StringValueCStr(file);
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
- if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
- if(X509_LOOKUP_load_file(lookup, path, X509_FILETYPE_PEM) != 1){
- ossl_raise(eX509StoreError, NULL);
- }
+ if (!lookup)
+ ossl_raise(eX509StoreError, "X509_STORE_add_lookup");
+ if (X509_LOOKUP_load_file(lookup, path, X509_FILETYPE_PEM) != 1)
+ ossl_raise(eX509StoreError, "X509_LOOKUP_load_file");
#if OPENSSL_VERSION_NUMBER < 0x10101000 || defined(LIBRESSL_VERSION_NUMBER)
/*
* X509_load_cert_crl_file() which is called from X509_LOOKUP_load_file()
@@ -330,23 +371,23 @@ ossl_x509store_add_file(VALUE self, VALUE file)
* store.add_path(path) -> self
*
* Adds _path_ as the hash dir to be looked up by the store.
+ *
+ * See also the man page X509_LOOKUP_hash_dir(3).
*/
static VALUE
ossl_x509store_add_path(VALUE self, VALUE dir)
{
X509_STORE *store;
X509_LOOKUP *lookup;
- char *path = NULL;
+ const char *path;
- if(dir != Qnil){
- path = StringValueCStr(dir);
- }
GetX509Store(self, store);
+ path = StringValueCStr(dir);
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir());
- if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
- if(X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) != 1){
- ossl_raise(eX509StoreError, NULL);
- }
+ if (!lookup)
+ ossl_raise(eX509StoreError, "X509_STORE_add_lookup");
+ if (X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) != 1)
+ ossl_raise(eX509StoreError, "X509_LOOKUP_add_dir");
return self;
}
@@ -361,6 +402,8 @@ ossl_x509store_add_path(VALUE self, VALUE dir)
*
* * OpenSSL::X509::DEFAULT_CERT_FILE
* * OpenSSL::X509::DEFAULT_CERT_DIR
+ *
+ * See also the man page X509_STORE_set_default_paths(3).
*/
static VALUE
ossl_x509store_set_default_paths(VALUE self)
@@ -368,18 +411,19 @@ ossl_x509store_set_default_paths(VALUE self)
X509_STORE *store;
GetX509Store(self, store);
- if (X509_STORE_set_default_paths(store) != 1){
- ossl_raise(eX509StoreError, NULL);
- }
+ if (X509_STORE_set_default_paths(store) != 1)
+ ossl_raise(eX509StoreError, "X509_STORE_set_default_paths");
return Qnil;
}
/*
* call-seq:
- * store.add_cert(cert)
+ * store.add_cert(cert) -> self
*
* Adds the OpenSSL::X509::Certificate _cert_ to the certificate store.
+ *
+ * See also the man page X509_STORE_add_cert(3).
*/
static VALUE
ossl_x509store_add_cert(VALUE self, VALUE arg)
@@ -389,9 +433,8 @@ ossl_x509store_add_cert(VALUE self, VALUE arg)
cert = GetX509CertPtr(arg); /* NO NEED TO DUP */
GetX509Store(self, store);
- if (X509_STORE_add_cert(store, cert) != 1){
- ossl_raise(eX509StoreError, NULL);
- }
+ if (X509_STORE_add_cert(store, cert) != 1)
+ ossl_raise(eX509StoreError, "X509_STORE_add_cert");
return self;
}
@@ -401,6 +444,8 @@ ossl_x509store_add_cert(VALUE self, VALUE arg)
* store.add_crl(crl) -> self
*
* Adds the OpenSSL::X509::CRL _crl_ to the store.
+ *
+ * See also the man page X509_STORE_add_crl(3).
*/
static VALUE
ossl_x509store_add_crl(VALUE self, VALUE arg)
@@ -410,9 +455,8 @@ ossl_x509store_add_crl(VALUE self, VALUE arg)
crl = GetX509CRLPtr(arg); /* NO NEED TO DUP */
GetX509Store(self, store);
- if (X509_STORE_add_crl(store, crl) != 1){
- ossl_raise(eX509StoreError, NULL);
- }
+ if (X509_STORE_add_crl(store, crl) != 1)
+ ossl_raise(eX509StoreError, "X509_STORE_add_crl");
return self;
}
@@ -457,23 +501,16 @@ ossl_x509store_verify(int argc, VALUE *argv, VALUE self)
}
/*
- * Public Functions
- */
-static void ossl_x509stctx_free(void*);
-
-
-static const rb_data_type_t ossl_x509stctx_type = {
- "OpenSSL/X509/STORE_CTX",
- {
- 0, ossl_x509stctx_free,
- },
- 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
-};
-
-/*
* Private functions
*/
static void
+ossl_x509stctx_mark(void *ptr)
+{
+ X509_STORE_CTX *ctx = ptr;
+ rb_gc_mark((VALUE)X509_STORE_CTX_get_ex_data(ctx, stctx_ex_verify_cb_idx));
+}
+
+static void
ossl_x509stctx_free(void *ptr)
{
X509_STORE_CTX *ctx = ptr;
@@ -484,6 +521,14 @@ ossl_x509stctx_free(void *ptr)
X509_STORE_CTX_free(ctx);
}
+static const rb_data_type_t ossl_x509stctx_type = {
+ "OpenSSL/X509/STORE_CTX",
+ {
+ ossl_x509stctx_mark, ossl_x509stctx_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
static VALUE
ossl_x509stctx_alloc(VALUE klass)
{
@@ -491,9 +536,8 @@ ossl_x509stctx_alloc(VALUE klass)
VALUE obj;
obj = NewX509StCtx(klass);
- if((ctx = X509_STORE_CTX_new()) == NULL){
- ossl_raise(eX509StoreError, NULL);
- }
+ if ((ctx = X509_STORE_CTX_new()) == NULL)
+ ossl_raise(eX509StoreError, "X509_STORE_CTX_new");
SetX509StCtx(obj, ctx);
return obj;
@@ -517,7 +561,9 @@ static VALUE ossl_x509stctx_set_time(VALUE, VALUE);
/*
* call-seq:
- * StoreContext.new(store, cert = nil, chain = nil)
+ * StoreContext.new(store, cert = nil, untrusted = nil)
+ *
+ * Sets up a StoreContext for a verification of the X.509 certificate _cert_.
*/
static VALUE
ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
@@ -527,15 +573,24 @@ ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
X509_STORE *x509st;
X509 *x509 = NULL;
STACK_OF(X509) *x509s = NULL;
+ int state;
rb_scan_args(argc, argv, "12", &store, &cert, &chain);
GetX509StCtx(self, ctx);
GetX509Store(store, x509st);
- if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */
- if(!NIL_P(chain)) x509s = ossl_x509_ary2sk(chain);
- if(X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){
+ if (!NIL_P(cert))
+ x509 = DupX509CertPtr(cert); /* NEED TO DUP */
+ if (!NIL_P(chain)) {
+ x509s = ossl_protect_x509_ary2sk(chain, &state);
+ if (state) {
+ X509_free(x509);
+ rb_jump_tag(state);
+ }
+ }
+ if (X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){
+ X509_free(x509);
sk_X509_pop_free(x509s, X509_free);
- ossl_raise(eX509StoreError, NULL);
+ ossl_raise(eX509StoreError, "X509_STORE_CTX_init");
}
if (!NIL_P(t = rb_iv_get(store, "@time")))
ossl_x509stctx_set_time(self, t);
@@ -548,6 +603,10 @@ ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
* stctx.verify -> true | false
+ *
+ * Performs the certificate verification using the parameters set to _stctx_.
+ *
+ * See also the man page X509_verify_cert(3).
*/
static VALUE
ossl_x509stctx_verify(VALUE self)
@@ -560,48 +619,45 @@ ossl_x509stctx_verify(VALUE self)
switch (X509_verify_cert(ctx)) {
case 1:
- return Qtrue;
+ return Qtrue;
case 0:
- ossl_clear_error();
- return Qfalse;
+ ossl_clear_error();
+ return Qfalse;
default:
- ossl_raise(eX509CertError, NULL);
+ ossl_raise(eX509CertError, "X509_verify_cert");
}
}
/*
* call-seq:
- * stctx.chain -> Array of X509::Certificate
+ * stctx.chain -> nil | Array of X509::Certificate
+ *
+ * Returns the verified chain.
+ *
+ * See also the man page X509_STORE_CTX_set0_verified_chain(3).
*/
static VALUE
ossl_x509stctx_get_chain(VALUE self)
{
X509_STORE_CTX *ctx;
- STACK_OF(X509) *chain;
- X509 *x509;
- int i, num;
- VALUE ary;
+ const STACK_OF(X509) *chain;
GetX509StCtx(self, ctx);
- if((chain = X509_STORE_CTX_get0_chain(ctx)) == NULL){
- return Qnil;
- }
- if((num = sk_X509_num(chain)) < 0){
- OSSL_Debug("certs in chain < 0???");
- return rb_ary_new();
- }
- ary = rb_ary_new2(num);
- for(i = 0; i < num; i++) {
- x509 = sk_X509_value(chain, i);
- rb_ary_push(ary, ossl_x509_new(x509));
- }
-
- return ary;
+ chain = X509_STORE_CTX_get0_chain(ctx);
+ if (!chain)
+ return Qnil; /* Could be an empty array instead? */
+ return ossl_x509_sk2ary(chain);
}
/*
* call-seq:
* stctx.error -> Integer
+ *
+ * Returns the error code of _stctx_. This is typically called after #verify
+ * is done, or from the verification callback set to
+ * OpenSSL::X509::Store#verify_callback=.
+ *
+ * See also the man page X509_STORE_CTX_get_error(3).
*/
static VALUE
ossl_x509stctx_get_err(VALUE self)
@@ -616,6 +672,11 @@ ossl_x509stctx_get_err(VALUE self)
/*
* call-seq:
* stctx.error = error_code
+ *
+ * Sets the error code of _stctx_. This is used by the verification callback
+ * set to OpenSSL::X509::Store#verify_callback=.
+ *
+ * See also the man page X509_STORE_CTX_set_error(3).
*/
static VALUE
ossl_x509stctx_set_error(VALUE self, VALUE err)
@@ -632,7 +693,10 @@ ossl_x509stctx_set_error(VALUE self, VALUE err)
* call-seq:
* stctx.error_string -> String
*
- * Returns the error string corresponding to the error code retrieved by #error.
+ * Returns the human readable error string corresponding to the error code
+ * retrieved by #error.
+ *
+ * See also the man page X509_verify_cert_error_string(3).
*/
static VALUE
ossl_x509stctx_get_err_string(VALUE self)
@@ -649,6 +713,10 @@ ossl_x509stctx_get_err_string(VALUE self)
/*
* call-seq:
* stctx.error_depth -> Integer
+ *
+ * Returns the depth of the chain. This is used in combination with #error.
+ *
+ * See also the man page X509_STORE_CTX_get_error_depth(3).
*/
static VALUE
ossl_x509stctx_get_err_depth(VALUE self)
@@ -663,6 +731,10 @@ ossl_x509stctx_get_err_depth(VALUE self)
/*
* call-seq:
* stctx.current_cert -> X509::Certificate
+ *
+ * Returns the certificate which caused the error.
+ *
+ * See also the man page X509_STORE_CTX_get_current_cert(3).
*/
static VALUE
ossl_x509stctx_get_curr_cert(VALUE self)
@@ -677,6 +749,10 @@ ossl_x509stctx_get_curr_cert(VALUE self)
/*
* call-seq:
* stctx.current_crl -> X509::CRL
+ *
+ * Returns the CRL which caused the error.
+ *
+ * See also the man page X509_STORE_CTX_get_current_crl(3).
*/
static VALUE
ossl_x509stctx_get_curr_crl(VALUE self)
@@ -696,7 +772,10 @@ ossl_x509stctx_get_curr_crl(VALUE self)
* call-seq:
* stctx.flags = flags
*
- * Sets the verification flags to the context. See Store#flags=.
+ * Sets the verification flags to the context. This overrides the default value
+ * set by Store#flags=.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_flags(3).
*/
static VALUE
ossl_x509stctx_set_flags(VALUE self, VALUE flags)
@@ -714,7 +793,10 @@ ossl_x509stctx_set_flags(VALUE self, VALUE flags)
* call-seq:
* stctx.purpose = purpose
*
- * Sets the purpose of the context. See Store#purpose=.
+ * Sets the purpose of the context. This overrides the default value set by
+ * Store#purpose=.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_purpose(3).
*/
static VALUE
ossl_x509stctx_set_purpose(VALUE self, VALUE purpose)
@@ -731,6 +813,11 @@ ossl_x509stctx_set_purpose(VALUE self, VALUE purpose)
/*
* call-seq:
* stctx.trust = trust
+ *
+ * Sets the trust settings of the context. This overrides the default value set
+ * by Store#trust=.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_trust(3).
*/
static VALUE
ossl_x509stctx_set_trust(VALUE self, VALUE trust)
@@ -749,6 +836,8 @@ ossl_x509stctx_set_trust(VALUE self, VALUE trust)
* stctx.time = time
*
* Sets the time used in the verification. If not set, the current time is used.
+ *
+ * See also the man page X509_VERIFY_PARAM_set_time(3).
*/
static VALUE
ossl_x509stctx_set_time(VALUE self, VALUE time)
@@ -824,23 +913,37 @@ Init_ossl_x509store(void)
cX509Store = rb_define_class_under(mX509, "Store", rb_cObject);
/*
* The callback for additional certificate verification. It is invoked for
- * each untrusted certificate in the chain.
+ * each certificate in the chain and can be used to implement custom
+ * certificate verification conditions.
*
* The callback is invoked with two values, a boolean that indicates if the
* pre-verification by OpenSSL has succeeded or not, and the StoreContext in
- * use. The callback must return either true or false.
+ * use.
+ *
+ * The callback can use StoreContext#error= to change the error code as
+ * needed. The callback must return either true or false.
+ *
+ * NOTE: any exception raised within the callback will be ignored.
+ *
+ * See also the man page X509_STORE_CTX_set_verify_cb(3).
*/
rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse);
/*
* The error code set by the last call of #verify.
+ *
+ * See also StoreContext#error.
*/
rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse);
/*
* The description for the error code set by the last call of #verify.
+ *
+ * See also StoreContext#error_string.
*/
rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse);
/*
* The certificate chain constructed by the last call of #verify.
+ *
+ * See also StoreContext#chain.
*/
rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse);
rb_define_alloc_func(cX509Store, ossl_x509store_alloc);
diff --git a/ext/openssl/ruby_missing.h b/ext/openssl/ruby_missing.h
deleted file mode 100644
index 069acc8b14..0000000000
--- a/ext/openssl/ruby_missing.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 'OpenSSL for Ruby' project
- * Copyright (C) 2001-2003 Michal Rokos <m.rokos@sh.cvut.cz>
- * All rights reserved.
- */
-/*
- * This program is licensed under the same licence as Ruby.
- * (See the file 'LICENCE'.)
- */
-#if !defined(_OSSL_RUBY_MISSING_H_)
-#define _OSSL_RUBY_MISSING_H_
-
-/* Ruby 2.4 */
-#ifndef RB_INTEGER_TYPE_P
-# define RB_INTEGER_TYPE_P(obj) (RB_FIXNUM_P(obj) || RB_TYPE_P(obj, T_BIGNUM))
-#endif
-
-/* Ruby 2.5 */
-#ifndef ST2FIX
-# define RB_ST2FIX(h) LONG2FIX((long)(h))
-# define ST2FIX(h) RB_ST2FIX(h)
-#endif
-
-#endif /* _OSSL_RUBY_MISSING_H_ */
diff --git a/ext/pathname/depend b/ext/pathname/depend
index 1e13dd5f37..a6b000e305 100644
--- a/ext/pathname/depend
+++ b/ext/pathname/depend
@@ -4,9 +4,166 @@ pathname.o: $(arch_hdrdir)/ruby/config.h
pathname.o: $(hdrdir)/ruby.h
pathname.o: $(hdrdir)/ruby/assert.h
pathname.o: $(hdrdir)/ruby/backward.h
+pathname.o: $(hdrdir)/ruby/backward/2/assume.h
+pathname.o: $(hdrdir)/ruby/backward/2/attributes.h
+pathname.o: $(hdrdir)/ruby/backward/2/bool.h
+pathname.o: $(hdrdir)/ruby/backward/2/inttypes.h
+pathname.o: $(hdrdir)/ruby/backward/2/limits.h
+pathname.o: $(hdrdir)/ruby/backward/2/long_long.h
+pathname.o: $(hdrdir)/ruby/backward/2/stdalign.h
+pathname.o: $(hdrdir)/ruby/backward/2/stdarg.h
pathname.o: $(hdrdir)/ruby/defines.h
pathname.o: $(hdrdir)/ruby/encoding.h
pathname.o: $(hdrdir)/ruby/intern.h
+pathname.o: $(hdrdir)/ruby/internal/abi.h
+pathname.o: $(hdrdir)/ruby/internal/anyargs.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+pathname.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+pathname.o: $(hdrdir)/ruby/internal/assume.h
+pathname.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+pathname.o: $(hdrdir)/ruby/internal/attr/artificial.h
+pathname.o: $(hdrdir)/ruby/internal/attr/cold.h
+pathname.o: $(hdrdir)/ruby/internal/attr/const.h
+pathname.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+pathname.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+pathname.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+pathname.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+pathname.o: $(hdrdir)/ruby/internal/attr/error.h
+pathname.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+pathname.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+pathname.o: $(hdrdir)/ruby/internal/attr/format.h
+pathname.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+pathname.o: $(hdrdir)/ruby/internal/attr/noalias.h
+pathname.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+pathname.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+pathname.o: $(hdrdir)/ruby/internal/attr/noinline.h
+pathname.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+pathname.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+pathname.o: $(hdrdir)/ruby/internal/attr/pure.h
+pathname.o: $(hdrdir)/ruby/internal/attr/restrict.h
+pathname.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+pathname.o: $(hdrdir)/ruby/internal/attr/warning.h
+pathname.o: $(hdrdir)/ruby/internal/attr/weakref.h
+pathname.o: $(hdrdir)/ruby/internal/cast.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+pathname.o: $(hdrdir)/ruby/internal/compiler_since.h
+pathname.o: $(hdrdir)/ruby/internal/config.h
+pathname.o: $(hdrdir)/ruby/internal/constant_p.h
+pathname.o: $(hdrdir)/ruby/internal/core.h
+pathname.o: $(hdrdir)/ruby/internal/core/rarray.h
+pathname.o: $(hdrdir)/ruby/internal/core/rbasic.h
+pathname.o: $(hdrdir)/ruby/internal/core/rbignum.h
+pathname.o: $(hdrdir)/ruby/internal/core/rclass.h
+pathname.o: $(hdrdir)/ruby/internal/core/rdata.h
+pathname.o: $(hdrdir)/ruby/internal/core/rfile.h
+pathname.o: $(hdrdir)/ruby/internal/core/rhash.h
+pathname.o: $(hdrdir)/ruby/internal/core/robject.h
+pathname.o: $(hdrdir)/ruby/internal/core/rregexp.h
+pathname.o: $(hdrdir)/ruby/internal/core/rstring.h
+pathname.o: $(hdrdir)/ruby/internal/core/rstruct.h
+pathname.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+pathname.o: $(hdrdir)/ruby/internal/ctype.h
+pathname.o: $(hdrdir)/ruby/internal/dllexport.h
+pathname.o: $(hdrdir)/ruby/internal/dosish.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/re.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/string.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+pathname.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+pathname.o: $(hdrdir)/ruby/internal/error.h
+pathname.o: $(hdrdir)/ruby/internal/eval.h
+pathname.o: $(hdrdir)/ruby/internal/event.h
+pathname.o: $(hdrdir)/ruby/internal/fl_type.h
+pathname.o: $(hdrdir)/ruby/internal/gc.h
+pathname.o: $(hdrdir)/ruby/internal/glob.h
+pathname.o: $(hdrdir)/ruby/internal/globals.h
+pathname.o: $(hdrdir)/ruby/internal/has/attribute.h
+pathname.o: $(hdrdir)/ruby/internal/has/builtin.h
+pathname.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+pathname.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+pathname.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+pathname.o: $(hdrdir)/ruby/internal/has/extension.h
+pathname.o: $(hdrdir)/ruby/internal/has/feature.h
+pathname.o: $(hdrdir)/ruby/internal/has/warning.h
+pathname.o: $(hdrdir)/ruby/internal/intern/array.h
+pathname.o: $(hdrdir)/ruby/internal/intern/bignum.h
+pathname.o: $(hdrdir)/ruby/internal/intern/class.h
+pathname.o: $(hdrdir)/ruby/internal/intern/compar.h
+pathname.o: $(hdrdir)/ruby/internal/intern/complex.h
+pathname.o: $(hdrdir)/ruby/internal/intern/cont.h
+pathname.o: $(hdrdir)/ruby/internal/intern/dir.h
+pathname.o: $(hdrdir)/ruby/internal/intern/enum.h
+pathname.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+pathname.o: $(hdrdir)/ruby/internal/intern/error.h
+pathname.o: $(hdrdir)/ruby/internal/intern/eval.h
+pathname.o: $(hdrdir)/ruby/internal/intern/file.h
+pathname.o: $(hdrdir)/ruby/internal/intern/gc.h
+pathname.o: $(hdrdir)/ruby/internal/intern/hash.h
+pathname.o: $(hdrdir)/ruby/internal/intern/io.h
+pathname.o: $(hdrdir)/ruby/internal/intern/load.h
+pathname.o: $(hdrdir)/ruby/internal/intern/marshal.h
+pathname.o: $(hdrdir)/ruby/internal/intern/numeric.h
+pathname.o: $(hdrdir)/ruby/internal/intern/object.h
+pathname.o: $(hdrdir)/ruby/internal/intern/parse.h
+pathname.o: $(hdrdir)/ruby/internal/intern/proc.h
+pathname.o: $(hdrdir)/ruby/internal/intern/process.h
+pathname.o: $(hdrdir)/ruby/internal/intern/random.h
+pathname.o: $(hdrdir)/ruby/internal/intern/range.h
+pathname.o: $(hdrdir)/ruby/internal/intern/rational.h
+pathname.o: $(hdrdir)/ruby/internal/intern/re.h
+pathname.o: $(hdrdir)/ruby/internal/intern/ruby.h
+pathname.o: $(hdrdir)/ruby/internal/intern/select.h
+pathname.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+pathname.o: $(hdrdir)/ruby/internal/intern/signal.h
+pathname.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+pathname.o: $(hdrdir)/ruby/internal/intern/string.h
+pathname.o: $(hdrdir)/ruby/internal/intern/struct.h
+pathname.o: $(hdrdir)/ruby/internal/intern/thread.h
+pathname.o: $(hdrdir)/ruby/internal/intern/time.h
+pathname.o: $(hdrdir)/ruby/internal/intern/variable.h
+pathname.o: $(hdrdir)/ruby/internal/intern/vm.h
+pathname.o: $(hdrdir)/ruby/internal/interpreter.h
+pathname.o: $(hdrdir)/ruby/internal/iterator.h
+pathname.o: $(hdrdir)/ruby/internal/memory.h
+pathname.o: $(hdrdir)/ruby/internal/method.h
+pathname.o: $(hdrdir)/ruby/internal/module.h
+pathname.o: $(hdrdir)/ruby/internal/newobj.h
+pathname.o: $(hdrdir)/ruby/internal/rgengc.h
+pathname.o: $(hdrdir)/ruby/internal/scan_args.h
+pathname.o: $(hdrdir)/ruby/internal/special_consts.h
+pathname.o: $(hdrdir)/ruby/internal/static_assert.h
+pathname.o: $(hdrdir)/ruby/internal/stdalign.h
+pathname.o: $(hdrdir)/ruby/internal/stdbool.h
+pathname.o: $(hdrdir)/ruby/internal/symbol.h
+pathname.o: $(hdrdir)/ruby/internal/value.h
+pathname.o: $(hdrdir)/ruby/internal/value_type.h
+pathname.o: $(hdrdir)/ruby/internal/variable.h
+pathname.o: $(hdrdir)/ruby/internal/warning_push.h
+pathname.o: $(hdrdir)/ruby/internal/xmalloc.h
pathname.o: $(hdrdir)/ruby/missing.h
pathname.o: $(hdrdir)/ruby/onigmo.h
pathname.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index dc4a7c0220..7bdfd0eb39 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -35,6 +35,13 @@ class Pathname
SEPARATOR_PAT = /#{Regexp.quote File::SEPARATOR}/
end
+ if File.dirname('A:') == 'A:.' # DOSish drive letter
+ ABSOLUTE_PATH = /\A(?:[A-Za-z]:|#{SEPARATOR_PAT})/o
+ else
+ ABSOLUTE_PATH = /\A#{SEPARATOR_PAT}/o
+ end
+ private_constant :ABSOLUTE_PATH
+
# :startdoc:
# chop_basename(path) -> [pre-basename, basename] or nil
@@ -222,7 +229,7 @@ class Pathname
# p.absolute?
# #=> false
def absolute?
- !relative?
+ ABSOLUTE_PATH.match? @path
end
# The opposite of Pathname#absolute?
@@ -237,11 +244,7 @@ class Pathname
# p.relative?
# #=> true
def relative?
- path = @path
- while r = chop_basename(path)
- path, = r
- end
- path == ''
+ !absolute?
end
#
@@ -335,6 +338,8 @@ class Pathname
#
# Appends a pathname fragment to +self+ to produce a new Pathname object.
+ # Since +other+ is considered as a path relative to +self+, if +other+ is
+ # an absolute path, the new Pathname object is created from just +other+.
#
# p1 = Pathname.new("/usr") # Pathname:/usr
# p2 = p1 + "bin/ruby" # Pathname:/usr/bin/ruby
@@ -396,6 +401,8 @@ class Pathname
#
# Joins the given pathnames onto +self+ to create a new Pathname object.
+ # This is effectively the same as using Pathname#+ to append +self+ and
+ # all arguments sequentially.
#
# path0 = Pathname.new("/usr") # Pathname:/usr
# path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
@@ -502,6 +509,9 @@ class Pathname
#
# ArgumentError is raised when it cannot find a relative path.
#
+ # Note that this method does not handle situations where the case sensitivity
+ # of the filesystem in use differs from the operating system default.
+ #
def relative_path_from(base_directory)
base_directory = Pathname.new(base_directory) unless base_directory.is_a? Pathname
dest_directory = self.cleanpath.to_s
@@ -568,25 +578,26 @@ class Pathname # * Find *
end
+autoload(:FileUtils, 'fileutils')
+
class Pathname # * FileUtils *
# Creates a full path, including any intermediate directories that don't yet
# exist.
#
# See FileUtils.mkpath and FileUtils.mkdir_p
- def mkpath
- require 'fileutils'
- FileUtils.mkpath(@path)
+ def mkpath(mode: nil)
+ FileUtils.mkpath(@path, mode: mode)
nil
end
# Recursively deletes a directory, including all directories beneath it.
#
- # See FileUtils.rm_r
- def rmtree
+ # See FileUtils.rm_rf
+ def rmtree(noop: nil, verbose: nil, secure: nil)
# The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree".
require 'fileutils'
- FileUtils.rm_r(@path)
+ FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
nil
end
end
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 15f80d487e..8ee4bcec5b 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -35,6 +35,7 @@ static ID id_lchmod;
static ID id_lchown;
static ID id_link;
static ID id_lstat;
+static ID id_lutime;
static ID id_mkdir;
static ID id_mtime;
static ID id_open;
@@ -138,7 +139,7 @@ path_freeze(VALUE self)
static VALUE
path_taint(VALUE self)
{
- rb_warning("Pathname#taint is deprecated and will be removed in Ruby 3.2.");
+ rb_warn("Pathname#taint is deprecated and will be removed in Ruby 3.2.");
return self;
}
@@ -151,7 +152,7 @@ path_taint(VALUE self)
static VALUE
path_untaint(VALUE self)
{
- rb_warning("Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
+ rb_warn("Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
return self;
}
@@ -360,10 +361,10 @@ path_each_line(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
if (rb_block_given_p()) {
- return rb_block_call(rb_cFile, id_foreach, 1+n, args, 0, 0);
+ return rb_block_call_kw(rb_cFile, id_foreach, 1+n, args, 0, 0, RB_PASS_CALLED_KEYWORDS);
}
else {
- return rb_funcallv(rb_cFile, id_foreach, 1+n, args);
+ return rb_funcallv_kw(rb_cFile, id_foreach, 1+n, args, RB_PASS_CALLED_KEYWORDS);
}
}
@@ -554,7 +555,7 @@ path_mtime(VALUE self)
/*
* call-seq:
- * pathname.chmod -> integer
+ * pathname.chmod(mode_int) -> integer
*
* Changes file permissions.
*
@@ -568,7 +569,7 @@ path_chmod(VALUE self, VALUE mode)
/*
* call-seq:
- * pathname.lchmod -> integer
+ * pathname.lchmod(mode_int) -> integer
*
* Same as Pathname.chmod, but does not follow symbolic links.
*
@@ -582,7 +583,7 @@ path_lchmod(VALUE self, VALUE mode)
/*
* call-seq:
- * pathname.chown -> integer
+ * pathname.chown(owner_int, group_int) -> integer
*
* Change owner and group of the file.
*
@@ -596,7 +597,7 @@ path_chown(VALUE self, VALUE owner, VALUE group)
/*
* call-seq:
- * pathname.lchown -> integer
+ * pathname.lchown(owner_int, group_int) -> integer
*
* Same as Pathname.chown, but does not follow symbolic links.
*
@@ -610,8 +611,8 @@ path_lchown(VALUE self, VALUE owner, VALUE group)
/*
* call-seq:
- * pathname.fnmatch(pattern, [flags]) -> string
- * pathname.fnmatch?(pattern, [flags]) -> string
+ * pathname.fnmatch(pattern, [flags]) -> true or false
+ * pathname.fnmatch?(pattern, [flags]) -> true or false
*
* Return +true+ if the receiver matches the given pattern.
*
@@ -657,6 +658,13 @@ path_make_link(VALUE self, VALUE old)
}
/*
+ * call-seq:
+ * pathname.open()
+ * pathname.open(mode="r" [, opt]) -> file
+ * pathname.open([mode [, perm]] [, opt]) -> file
+ * pathname.open(mode="r" [, opt]) {|file| block } -> obj
+ * pathname.open([mode [, perm]] [, opt]) {|file| block } -> obj
+ *
* Opens the file for reading or writing.
*
* See File.open.
@@ -758,6 +766,19 @@ path_utime(VALUE self, VALUE atime, VALUE mtime)
}
/*
+ * Update the access and modification times of the file.
+ *
+ * Same as Pathname#utime, but does not follow symbolic links.
+ *
+ * See File.lutime.
+ */
+static VALUE
+path_lutime(VALUE self, VALUE atime, VALUE mtime)
+{
+ return rb_funcall(rb_cFile, id_lutime, 3, atime, mtime, get_strpath(self));
+}
+
+/*
* Returns the last component of the path.
*
* See File.basename.
@@ -827,7 +848,7 @@ path_split(VALUE self)
VALUE str = get_strpath(self);
VALUE ary, dirname, basename;
ary = rb_funcall(rb_cFile, id_split, 1, str);
- ary = rb_check_array_type(ary);
+ Check_Type(ary, T_ARRAY);
dirname = rb_ary_entry(ary, 0);
basename = rb_ary_entry(ary, 1);
dirname = rb_class_new_instance(1, &dirname, rb_obj_class(self));
@@ -1205,7 +1226,7 @@ path_entries(VALUE self)
ary = rb_funcall(rb_cDir, id_entries, 1, str);
ary = rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
for (i = 0; i < RARRAY_LEN(ary); i++) {
- VALUE elt = RARRAY_AREF(ary, i);
+ VALUE elt = RARRAY_AREF(ary, i);
elt = rb_class_new_instance(1, &elt, klass);
rb_ary_store(ary, i, elt);
}
@@ -1267,6 +1288,7 @@ static VALUE
path_each_entry(VALUE self)
{
VALUE args[1];
+ RETURN_ENUMERATOR(self, 0, 0);
args[0] = get_strpath(self);
return rb_block_call(rb_cDir, id_foreach, 1, args, each_entry_i, rb_obj_class(self));
@@ -1457,6 +1479,7 @@ path_f_pathname(VALUE self, VALUE str)
* - #make_symlink(old)
* - #truncate(length)
* - #utime(atime, mtime)
+ * - #lutime(atime, mtime)
* - #basename(*args)
* - #dirname
* - #extname
@@ -1482,6 +1505,8 @@ path_f_pathname(VALUE self, VALUE str)
* - #binread(*args)
* - #readlines(*args)
* - #sysopen(*args)
+ * - #write(*args)
+ * - #binwrite(*args)
*
* === Utilities
*
@@ -1503,6 +1528,10 @@ path_f_pathname(VALUE self, VALUE str)
void
Init_pathname(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
InitVM(pathname);
rb_cPathname = rb_define_class("Pathname", rb_cObject);
@@ -1549,6 +1578,7 @@ Init_pathname(void)
rb_define_method(rb_cPathname, "make_symlink", path_make_symlink, 1);
rb_define_method(rb_cPathname, "truncate", path_truncate, 1);
rb_define_method(rb_cPathname, "utime", path_utime, 2);
+ rb_define_method(rb_cPathname, "lutime", path_lutime, 2);
rb_define_method(rb_cPathname, "basename", path_basename, -1);
rb_define_method(rb_cPathname, "dirname", path_dirname, 0);
rb_define_method(rb_cPathname, "extname", path_extname, 0);
@@ -1632,6 +1662,7 @@ InitVM_pathname(void)
id_lchown = rb_intern("lchown");
id_link = rb_intern("link");
id_lstat = rb_intern("lstat");
+ id_lutime = rb_intern("lutime");
id_mkdir = rb_intern("mkdir");
id_mtime = rb_intern("mtime");
id_open = rb_intern("open");
diff --git a/ext/pathname/pathname.gemspec b/ext/pathname/pathname.gemspec
new file mode 100644
index 0000000000..92bc02b0db
--- /dev/null
+++ b/ext/pathname/pathname.gemspec
@@ -0,0 +1,25 @@
+Gem::Specification.new do |spec|
+ spec.name = "pathname"
+ spec.version = "0.2.1"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{Representation of the name of a file or directory on the filesystem}
+ spec.description = %q{Representation of the name of a file or directory on the filesystem}
+ spec.homepage = "https://github.com/ruby/pathname"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+ spec.extensions = %w[ext/pathname/extconf.rb]
+end
diff --git a/ext/psych/.gitignore b/ext/psych/.gitignore
new file mode 100644
index 0000000000..92946455b0
--- /dev/null
+++ b/ext/psych/.gitignore
@@ -0,0 +1 @@
+/yaml-[0-9]*.*.*
diff --git a/ext/psych/depend b/ext/psych/depend
index dc358eaed3..78bde9a53d 100644
--- a/ext/psych/depend
+++ b/ext/psych/depend
@@ -1,4 +1,16 @@
-$(OBJS): $(YAML_H)
+$(TARGET_SO): $(LIBYAML)
+
+libyaml $(LIBYAML):
+ cd libyaml && $(MAKE)
+ $(AR) $(ARFLAGS) $(LIBYAML) $(LIBYAML_OBJDIR)/*.$(OBJEXT)
+ $(RANLIB) $(LIBYAML)
+
+clean-so::
+ -cd libyaml && $(MAKE) clean
+
+distclean-so::
+ -cd libyaml && $(MAKE) distclean
+ -$(Q)$(RMDIRS) libyaml/* libyaml
# AUTOGENERATED DEPENDENCIES START
psych.o: $(RUBY_EXTCONF_H)
@@ -6,9 +18,166 @@ psych.o: $(arch_hdrdir)/ruby/config.h
psych.o: $(hdrdir)/ruby.h
psych.o: $(hdrdir)/ruby/assert.h
psych.o: $(hdrdir)/ruby/backward.h
+psych.o: $(hdrdir)/ruby/backward/2/assume.h
+psych.o: $(hdrdir)/ruby/backward/2/attributes.h
+psych.o: $(hdrdir)/ruby/backward/2/bool.h
+psych.o: $(hdrdir)/ruby/backward/2/inttypes.h
+psych.o: $(hdrdir)/ruby/backward/2/limits.h
+psych.o: $(hdrdir)/ruby/backward/2/long_long.h
+psych.o: $(hdrdir)/ruby/backward/2/stdalign.h
+psych.o: $(hdrdir)/ruby/backward/2/stdarg.h
psych.o: $(hdrdir)/ruby/defines.h
psych.o: $(hdrdir)/ruby/encoding.h
psych.o: $(hdrdir)/ruby/intern.h
+psych.o: $(hdrdir)/ruby/internal/abi.h
+psych.o: $(hdrdir)/ruby/internal/anyargs.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+psych.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+psych.o: $(hdrdir)/ruby/internal/assume.h
+psych.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+psych.o: $(hdrdir)/ruby/internal/attr/artificial.h
+psych.o: $(hdrdir)/ruby/internal/attr/cold.h
+psych.o: $(hdrdir)/ruby/internal/attr/const.h
+psych.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+psych.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+psych.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+psych.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+psych.o: $(hdrdir)/ruby/internal/attr/error.h
+psych.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+psych.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+psych.o: $(hdrdir)/ruby/internal/attr/format.h
+psych.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+psych.o: $(hdrdir)/ruby/internal/attr/noalias.h
+psych.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+psych.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+psych.o: $(hdrdir)/ruby/internal/attr/noinline.h
+psych.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+psych.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+psych.o: $(hdrdir)/ruby/internal/attr/pure.h
+psych.o: $(hdrdir)/ruby/internal/attr/restrict.h
+psych.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+psych.o: $(hdrdir)/ruby/internal/attr/warning.h
+psych.o: $(hdrdir)/ruby/internal/attr/weakref.h
+psych.o: $(hdrdir)/ruby/internal/cast.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+psych.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+psych.o: $(hdrdir)/ruby/internal/compiler_since.h
+psych.o: $(hdrdir)/ruby/internal/config.h
+psych.o: $(hdrdir)/ruby/internal/constant_p.h
+psych.o: $(hdrdir)/ruby/internal/core.h
+psych.o: $(hdrdir)/ruby/internal/core/rarray.h
+psych.o: $(hdrdir)/ruby/internal/core/rbasic.h
+psych.o: $(hdrdir)/ruby/internal/core/rbignum.h
+psych.o: $(hdrdir)/ruby/internal/core/rclass.h
+psych.o: $(hdrdir)/ruby/internal/core/rdata.h
+psych.o: $(hdrdir)/ruby/internal/core/rfile.h
+psych.o: $(hdrdir)/ruby/internal/core/rhash.h
+psych.o: $(hdrdir)/ruby/internal/core/robject.h
+psych.o: $(hdrdir)/ruby/internal/core/rregexp.h
+psych.o: $(hdrdir)/ruby/internal/core/rstring.h
+psych.o: $(hdrdir)/ruby/internal/core/rstruct.h
+psych.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+psych.o: $(hdrdir)/ruby/internal/ctype.h
+psych.o: $(hdrdir)/ruby/internal/dllexport.h
+psych.o: $(hdrdir)/ruby/internal/dosish.h
+psych.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+psych.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+psych.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+psych.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+psych.o: $(hdrdir)/ruby/internal/encoding/re.h
+psych.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+psych.o: $(hdrdir)/ruby/internal/encoding/string.h
+psych.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+psych.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+psych.o: $(hdrdir)/ruby/internal/error.h
+psych.o: $(hdrdir)/ruby/internal/eval.h
+psych.o: $(hdrdir)/ruby/internal/event.h
+psych.o: $(hdrdir)/ruby/internal/fl_type.h
+psych.o: $(hdrdir)/ruby/internal/gc.h
+psych.o: $(hdrdir)/ruby/internal/glob.h
+psych.o: $(hdrdir)/ruby/internal/globals.h
+psych.o: $(hdrdir)/ruby/internal/has/attribute.h
+psych.o: $(hdrdir)/ruby/internal/has/builtin.h
+psych.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+psych.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+psych.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+psych.o: $(hdrdir)/ruby/internal/has/extension.h
+psych.o: $(hdrdir)/ruby/internal/has/feature.h
+psych.o: $(hdrdir)/ruby/internal/has/warning.h
+psych.o: $(hdrdir)/ruby/internal/intern/array.h
+psych.o: $(hdrdir)/ruby/internal/intern/bignum.h
+psych.o: $(hdrdir)/ruby/internal/intern/class.h
+psych.o: $(hdrdir)/ruby/internal/intern/compar.h
+psych.o: $(hdrdir)/ruby/internal/intern/complex.h
+psych.o: $(hdrdir)/ruby/internal/intern/cont.h
+psych.o: $(hdrdir)/ruby/internal/intern/dir.h
+psych.o: $(hdrdir)/ruby/internal/intern/enum.h
+psych.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+psych.o: $(hdrdir)/ruby/internal/intern/error.h
+psych.o: $(hdrdir)/ruby/internal/intern/eval.h
+psych.o: $(hdrdir)/ruby/internal/intern/file.h
+psych.o: $(hdrdir)/ruby/internal/intern/gc.h
+psych.o: $(hdrdir)/ruby/internal/intern/hash.h
+psych.o: $(hdrdir)/ruby/internal/intern/io.h
+psych.o: $(hdrdir)/ruby/internal/intern/load.h
+psych.o: $(hdrdir)/ruby/internal/intern/marshal.h
+psych.o: $(hdrdir)/ruby/internal/intern/numeric.h
+psych.o: $(hdrdir)/ruby/internal/intern/object.h
+psych.o: $(hdrdir)/ruby/internal/intern/parse.h
+psych.o: $(hdrdir)/ruby/internal/intern/proc.h
+psych.o: $(hdrdir)/ruby/internal/intern/process.h
+psych.o: $(hdrdir)/ruby/internal/intern/random.h
+psych.o: $(hdrdir)/ruby/internal/intern/range.h
+psych.o: $(hdrdir)/ruby/internal/intern/rational.h
+psych.o: $(hdrdir)/ruby/internal/intern/re.h
+psych.o: $(hdrdir)/ruby/internal/intern/ruby.h
+psych.o: $(hdrdir)/ruby/internal/intern/select.h
+psych.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+psych.o: $(hdrdir)/ruby/internal/intern/signal.h
+psych.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+psych.o: $(hdrdir)/ruby/internal/intern/string.h
+psych.o: $(hdrdir)/ruby/internal/intern/struct.h
+psych.o: $(hdrdir)/ruby/internal/intern/thread.h
+psych.o: $(hdrdir)/ruby/internal/intern/time.h
+psych.o: $(hdrdir)/ruby/internal/intern/variable.h
+psych.o: $(hdrdir)/ruby/internal/intern/vm.h
+psych.o: $(hdrdir)/ruby/internal/interpreter.h
+psych.o: $(hdrdir)/ruby/internal/iterator.h
+psych.o: $(hdrdir)/ruby/internal/memory.h
+psych.o: $(hdrdir)/ruby/internal/method.h
+psych.o: $(hdrdir)/ruby/internal/module.h
+psych.o: $(hdrdir)/ruby/internal/newobj.h
+psych.o: $(hdrdir)/ruby/internal/rgengc.h
+psych.o: $(hdrdir)/ruby/internal/scan_args.h
+psych.o: $(hdrdir)/ruby/internal/special_consts.h
+psych.o: $(hdrdir)/ruby/internal/static_assert.h
+psych.o: $(hdrdir)/ruby/internal/stdalign.h
+psych.o: $(hdrdir)/ruby/internal/stdbool.h
+psych.o: $(hdrdir)/ruby/internal/symbol.h
+psych.o: $(hdrdir)/ruby/internal/value.h
+psych.o: $(hdrdir)/ruby/internal/value_type.h
+psych.o: $(hdrdir)/ruby/internal/variable.h
+psych.o: $(hdrdir)/ruby/internal/warning_push.h
+psych.o: $(hdrdir)/ruby/internal/xmalloc.h
psych.o: $(hdrdir)/ruby/missing.h
psych.o: $(hdrdir)/ruby/onigmo.h
psych.o: $(hdrdir)/ruby/oniguruma.h
@@ -26,9 +195,166 @@ psych_emitter.o: $(arch_hdrdir)/ruby/config.h
psych_emitter.o: $(hdrdir)/ruby.h
psych_emitter.o: $(hdrdir)/ruby/assert.h
psych_emitter.o: $(hdrdir)/ruby/backward.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/assume.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/attributes.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/bool.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/limits.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/long_long.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+psych_emitter.o: $(hdrdir)/ruby/backward/2/stdarg.h
psych_emitter.o: $(hdrdir)/ruby/defines.h
psych_emitter.o: $(hdrdir)/ruby/encoding.h
psych_emitter.o: $(hdrdir)/ruby/intern.h
+psych_emitter.o: $(hdrdir)/ruby/internal/abi.h
+psych_emitter.o: $(hdrdir)/ruby/internal/anyargs.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+psych_emitter.o: $(hdrdir)/ruby/internal/assume.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/artificial.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/cold.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/const.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/error.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/format.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/noalias.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/noinline.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/pure.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/restrict.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/warning.h
+psych_emitter.o: $(hdrdir)/ruby/internal/attr/weakref.h
+psych_emitter.o: $(hdrdir)/ruby/internal/cast.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+psych_emitter.o: $(hdrdir)/ruby/internal/compiler_since.h
+psych_emitter.o: $(hdrdir)/ruby/internal/config.h
+psych_emitter.o: $(hdrdir)/ruby/internal/constant_p.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rarray.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rbasic.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rbignum.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rclass.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rdata.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rfile.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rhash.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/robject.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rregexp.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rstring.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rstruct.h
+psych_emitter.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+psych_emitter.o: $(hdrdir)/ruby/internal/ctype.h
+psych_emitter.o: $(hdrdir)/ruby/internal/dllexport.h
+psych_emitter.o: $(hdrdir)/ruby/internal/dosish.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/re.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/string.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+psych_emitter.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+psych_emitter.o: $(hdrdir)/ruby/internal/error.h
+psych_emitter.o: $(hdrdir)/ruby/internal/eval.h
+psych_emitter.o: $(hdrdir)/ruby/internal/event.h
+psych_emitter.o: $(hdrdir)/ruby/internal/fl_type.h
+psych_emitter.o: $(hdrdir)/ruby/internal/gc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/glob.h
+psych_emitter.o: $(hdrdir)/ruby/internal/globals.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/attribute.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/builtin.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/extension.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/feature.h
+psych_emitter.o: $(hdrdir)/ruby/internal/has/warning.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/array.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/bignum.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/class.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/compar.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/complex.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/cont.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/dir.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/enum.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/error.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/eval.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/file.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/gc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/hash.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/io.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/load.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/marshal.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/numeric.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/object.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/parse.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/proc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/process.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/random.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/range.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/rational.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/re.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/ruby.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/select.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/signal.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/string.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/struct.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/thread.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/time.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/variable.h
+psych_emitter.o: $(hdrdir)/ruby/internal/intern/vm.h
+psych_emitter.o: $(hdrdir)/ruby/internal/interpreter.h
+psych_emitter.o: $(hdrdir)/ruby/internal/iterator.h
+psych_emitter.o: $(hdrdir)/ruby/internal/memory.h
+psych_emitter.o: $(hdrdir)/ruby/internal/method.h
+psych_emitter.o: $(hdrdir)/ruby/internal/module.h
+psych_emitter.o: $(hdrdir)/ruby/internal/newobj.h
+psych_emitter.o: $(hdrdir)/ruby/internal/rgengc.h
+psych_emitter.o: $(hdrdir)/ruby/internal/scan_args.h
+psych_emitter.o: $(hdrdir)/ruby/internal/special_consts.h
+psych_emitter.o: $(hdrdir)/ruby/internal/static_assert.h
+psych_emitter.o: $(hdrdir)/ruby/internal/stdalign.h
+psych_emitter.o: $(hdrdir)/ruby/internal/stdbool.h
+psych_emitter.o: $(hdrdir)/ruby/internal/symbol.h
+psych_emitter.o: $(hdrdir)/ruby/internal/value.h
+psych_emitter.o: $(hdrdir)/ruby/internal/value_type.h
+psych_emitter.o: $(hdrdir)/ruby/internal/variable.h
+psych_emitter.o: $(hdrdir)/ruby/internal/warning_push.h
+psych_emitter.o: $(hdrdir)/ruby/internal/xmalloc.h
psych_emitter.o: $(hdrdir)/ruby/missing.h
psych_emitter.o: $(hdrdir)/ruby/onigmo.h
psych_emitter.o: $(hdrdir)/ruby/oniguruma.h
@@ -46,9 +372,166 @@ psych_parser.o: $(arch_hdrdir)/ruby/config.h
psych_parser.o: $(hdrdir)/ruby.h
psych_parser.o: $(hdrdir)/ruby/assert.h
psych_parser.o: $(hdrdir)/ruby/backward.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/assume.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/attributes.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/bool.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/limits.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/long_long.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/stdalign.h
+psych_parser.o: $(hdrdir)/ruby/backward/2/stdarg.h
psych_parser.o: $(hdrdir)/ruby/defines.h
psych_parser.o: $(hdrdir)/ruby/encoding.h
psych_parser.o: $(hdrdir)/ruby/intern.h
+psych_parser.o: $(hdrdir)/ruby/internal/abi.h
+psych_parser.o: $(hdrdir)/ruby/internal/anyargs.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+psych_parser.o: $(hdrdir)/ruby/internal/assume.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/artificial.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/cold.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/const.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/error.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/format.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/noalias.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/noinline.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/pure.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/restrict.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/warning.h
+psych_parser.o: $(hdrdir)/ruby/internal/attr/weakref.h
+psych_parser.o: $(hdrdir)/ruby/internal/cast.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+psych_parser.o: $(hdrdir)/ruby/internal/compiler_since.h
+psych_parser.o: $(hdrdir)/ruby/internal/config.h
+psych_parser.o: $(hdrdir)/ruby/internal/constant_p.h
+psych_parser.o: $(hdrdir)/ruby/internal/core.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rarray.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rbasic.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rbignum.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rclass.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rdata.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rfile.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rhash.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/robject.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rregexp.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rstring.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rstruct.h
+psych_parser.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+psych_parser.o: $(hdrdir)/ruby/internal/ctype.h
+psych_parser.o: $(hdrdir)/ruby/internal/dllexport.h
+psych_parser.o: $(hdrdir)/ruby/internal/dosish.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/re.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/string.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+psych_parser.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+psych_parser.o: $(hdrdir)/ruby/internal/error.h
+psych_parser.o: $(hdrdir)/ruby/internal/eval.h
+psych_parser.o: $(hdrdir)/ruby/internal/event.h
+psych_parser.o: $(hdrdir)/ruby/internal/fl_type.h
+psych_parser.o: $(hdrdir)/ruby/internal/gc.h
+psych_parser.o: $(hdrdir)/ruby/internal/glob.h
+psych_parser.o: $(hdrdir)/ruby/internal/globals.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/attribute.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/builtin.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/extension.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/feature.h
+psych_parser.o: $(hdrdir)/ruby/internal/has/warning.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/array.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/bignum.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/class.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/compar.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/complex.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/cont.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/dir.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/enum.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/error.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/eval.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/file.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/gc.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/hash.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/io.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/load.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/marshal.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/numeric.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/object.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/parse.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/proc.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/process.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/random.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/range.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/rational.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/re.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/ruby.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/select.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/signal.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/string.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/struct.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/thread.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/time.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/variable.h
+psych_parser.o: $(hdrdir)/ruby/internal/intern/vm.h
+psych_parser.o: $(hdrdir)/ruby/internal/interpreter.h
+psych_parser.o: $(hdrdir)/ruby/internal/iterator.h
+psych_parser.o: $(hdrdir)/ruby/internal/memory.h
+psych_parser.o: $(hdrdir)/ruby/internal/method.h
+psych_parser.o: $(hdrdir)/ruby/internal/module.h
+psych_parser.o: $(hdrdir)/ruby/internal/newobj.h
+psych_parser.o: $(hdrdir)/ruby/internal/rgengc.h
+psych_parser.o: $(hdrdir)/ruby/internal/scan_args.h
+psych_parser.o: $(hdrdir)/ruby/internal/special_consts.h
+psych_parser.o: $(hdrdir)/ruby/internal/static_assert.h
+psych_parser.o: $(hdrdir)/ruby/internal/stdalign.h
+psych_parser.o: $(hdrdir)/ruby/internal/stdbool.h
+psych_parser.o: $(hdrdir)/ruby/internal/symbol.h
+psych_parser.o: $(hdrdir)/ruby/internal/value.h
+psych_parser.o: $(hdrdir)/ruby/internal/value_type.h
+psych_parser.o: $(hdrdir)/ruby/internal/variable.h
+psych_parser.o: $(hdrdir)/ruby/internal/warning_push.h
+psych_parser.o: $(hdrdir)/ruby/internal/xmalloc.h
psych_parser.o: $(hdrdir)/ruby/missing.h
psych_parser.o: $(hdrdir)/ruby/onigmo.h
psych_parser.o: $(hdrdir)/ruby/oniguruma.h
@@ -66,9 +549,166 @@ psych_to_ruby.o: $(arch_hdrdir)/ruby/config.h
psych_to_ruby.o: $(hdrdir)/ruby.h
psych_to_ruby.o: $(hdrdir)/ruby/assert.h
psych_to_ruby.o: $(hdrdir)/ruby/backward.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/assume.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/attributes.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/bool.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/inttypes.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/limits.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/long_long.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/stdalign.h
+psych_to_ruby.o: $(hdrdir)/ruby/backward/2/stdarg.h
psych_to_ruby.o: $(hdrdir)/ruby/defines.h
psych_to_ruby.o: $(hdrdir)/ruby/encoding.h
psych_to_ruby.o: $(hdrdir)/ruby/intern.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/abi.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/anyargs.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/assume.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/artificial.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/cold.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/const.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/error.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/format.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/noalias.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/noinline.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/pure.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/restrict.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/warning.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/attr/weakref.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/cast.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/compiler_since.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/config.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/constant_p.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rarray.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rbasic.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rbignum.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rclass.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rdata.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rfile.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rhash.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/robject.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rregexp.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rstring.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rstruct.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/ctype.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/dllexport.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/dosish.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/re.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/string.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/error.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/eval.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/event.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/fl_type.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/gc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/glob.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/globals.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/attribute.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/builtin.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/extension.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/feature.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/has/warning.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/array.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/bignum.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/class.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/compar.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/complex.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/cont.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/dir.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/enum.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/error.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/eval.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/file.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/gc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/hash.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/io.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/load.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/marshal.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/numeric.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/object.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/parse.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/proc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/process.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/random.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/range.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/rational.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/re.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/ruby.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/select.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/signal.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/string.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/struct.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/thread.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/time.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/variable.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/intern/vm.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/interpreter.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/iterator.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/memory.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/method.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/module.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/newobj.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/rgengc.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/scan_args.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/special_consts.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/static_assert.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/stdalign.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/stdbool.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/symbol.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/value.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/value_type.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/variable.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/warning_push.h
+psych_to_ruby.o: $(hdrdir)/ruby/internal/xmalloc.h
psych_to_ruby.o: $(hdrdir)/ruby/missing.h
psych_to_ruby.o: $(hdrdir)/ruby/onigmo.h
psych_to_ruby.o: $(hdrdir)/ruby/oniguruma.h
@@ -86,9 +726,166 @@ psych_yaml_tree.o: $(arch_hdrdir)/ruby/config.h
psych_yaml_tree.o: $(hdrdir)/ruby.h
psych_yaml_tree.o: $(hdrdir)/ruby/assert.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/assume.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/attributes.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/bool.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/inttypes.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/limits.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/long_long.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/stdalign.h
+psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/stdarg.h
psych_yaml_tree.o: $(hdrdir)/ruby/defines.h
psych_yaml_tree.o: $(hdrdir)/ruby/encoding.h
psych_yaml_tree.o: $(hdrdir)/ruby/intern.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/abi.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/anyargs.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/assume.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/artificial.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/cold.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/const.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/error.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/format.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/noalias.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/noinline.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/pure.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/restrict.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/warning.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/attr/weakref.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/cast.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/compiler_since.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/config.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/constant_p.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rarray.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rbasic.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rbignum.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rclass.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rdata.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rfile.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rhash.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/robject.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rregexp.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rstring.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rstruct.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/ctype.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/dllexport.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/dosish.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/re.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/string.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/error.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/eval.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/event.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/fl_type.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/gc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/glob.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/globals.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/attribute.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/builtin.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/extension.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/feature.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/has/warning.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/array.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/bignum.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/class.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/compar.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/complex.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/cont.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/dir.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/enum.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/error.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/eval.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/file.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/gc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/hash.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/io.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/load.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/marshal.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/numeric.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/object.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/parse.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/proc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/process.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/random.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/range.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/rational.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/re.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/ruby.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/select.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/signal.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/string.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/struct.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/thread.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/time.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/variable.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/intern/vm.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/interpreter.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/iterator.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/memory.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/method.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/module.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/newobj.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/rgengc.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/scan_args.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/special_consts.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/static_assert.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/stdalign.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/stdbool.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/symbol.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/value.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/value_type.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/variable.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/warning_push.h
+psych_yaml_tree.o: $(hdrdir)/ruby/internal/xmalloc.h
psych_yaml_tree.o: $(hdrdir)/ruby/missing.h
psych_yaml_tree.o: $(hdrdir)/ruby/onigmo.h
psych_yaml_tree.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index 857f8e68c4..41daf8c238 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -1,43 +1,53 @@
# -*- coding: us-ascii -*-
# frozen_string_literal: true
require 'mkmf'
-require 'fileutils'
-# :stopdoc:
-
-dir_config 'libyaml'
-
-if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
- # Embed libyaml since we could not find it.
-
- $VPATH << "$(srcdir)/yaml"
- $INCFLAGS << " -I$(srcdir)/yaml"
-
- $srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}.sort
+if $mswin or $mingw or $cygwin
+ $CPPFLAGS << " -DYAML_DECLARE_STATIC"
+end
- header = 'yaml/yaml.h'
- header = "{$(VPATH)}#{header}" if $nmake
- if have_macro("_WIN32")
- $CPPFLAGS << " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
+yaml_source = with_config("libyaml-source-dir")
+if yaml_source
+ yaml_source = yaml_source.gsub(/\$\((\w+)\)|\$\{(\w+)\}/) {ENV[$1||$2]}
+ yaml_source = yaml_source.chomp("/")
+ yaml_configure = "#{File.expand_path(yaml_source)}/configure"
+ unless File.exist?(yaml_configure)
+ raise "Configure script not found in #{yaml_source.quote}"
end
- have_header 'dlfcn.h'
- have_header 'inttypes.h'
- have_header 'memory.h'
- have_header 'stdint.h'
- have_header 'stdlib.h'
- have_header 'strings.h'
- have_header 'string.h'
- have_header 'sys/stat.h'
- have_header 'sys/types.h'
- have_header 'unistd.h'
-
- find_header 'yaml.h'
- have_header 'config.h'
+ puts("Configuring libyaml source in #{yaml_source.quote}")
+ yaml = "libyaml"
+ Dir.mkdir(yaml) unless File.directory?(yaml)
+ shared = $enable_shared || !$static
+ args = [
+ yaml_configure,
+ "--enable-#{shared ? 'shared' : 'static'}",
+ "--host=#{RbConfig::CONFIG['host'].sub(/-unknown-/, '-')}",
+ "CC=#{RbConfig::CONFIG['CC']}",
+ *(["CFLAGS=-w"] if RbConfig::CONFIG["GCC"] == "yes"),
+ ]
+ puts(args.quote.join(' '))
+ unless system(*args, chdir: yaml)
+ raise "failed to configure libyaml"
+ end
+ inc = yaml_source.start_with?("#$srcdir/") ? "$(srcdir)#{yaml_source[$srcdir.size..-1]}" : yaml_source
+ $INCFLAGS << " -I#{yaml}/include -I#{inc}/include"
+ puts("INCFLAGS=#$INCFLAGS")
+ libyaml = "libyaml.#$LIBEXT"
+ $cleanfiles << libyaml
+ $LOCAL_LIBS.prepend("$(LIBYAML) ")
+else # default to pre-installed libyaml
+ pkg_config('yaml-0.1')
+ dir_config('libyaml')
+ find_header('yaml.h') or abort "yaml.h not found"
+ find_library('yaml', 'yaml_get_version') or abort "libyaml not found"
end
create_makefile 'psych' do |mk|
- mk << "YAML_H = #{header}".strip << "\n"
+ mk << "LIBYAML = #{libyaml}".strip << "\n"
+ mk << "LIBYAML_OBJDIR = libyaml/src#{shared ? '/.libs' : ''}\n"
+ mk << "OBJEXT = #$OBJEXT"
+ mk << "RANLIB = #{config_string('RANLIB') || config_string('NULLCMD')}\n"
end
# :startdoc:
diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb
index c719b036d0..4a2ab58514 100644
--- a/ext/psych/lib/psych.rb
+++ b/ext/psych/lib/psych.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require 'psych/versions'
+require_relative 'psych/versions'
case RUBY_ENGINE
when 'jruby'
- require 'psych_jars'
+ require_relative 'psych_jars'
if JRuby::Util.respond_to?(:load_ext)
JRuby::Util.load_ext('org.jruby.ext.psych.PsychLibrary')
else
@@ -12,28 +12,28 @@ when 'jruby'
else
require 'psych.so'
end
-require 'psych/nodes'
-require 'psych/streaming'
-require 'psych/visitors'
-require 'psych/handler'
-require 'psych/tree_builder'
-require 'psych/parser'
-require 'psych/omap'
-require 'psych/set'
-require 'psych/coder'
-require 'psych/core_ext'
-require 'psych/stream'
-require 'psych/json/tree_builder'
-require 'psych/json/stream'
-require 'psych/handlers/document_stream'
-require 'psych/class_loader'
+require_relative 'psych/nodes'
+require_relative 'psych/streaming'
+require_relative 'psych/visitors'
+require_relative 'psych/handler'
+require_relative 'psych/tree_builder'
+require_relative 'psych/parser'
+require_relative 'psych/omap'
+require_relative 'psych/set'
+require_relative 'psych/coder'
+require_relative 'psych/core_ext'
+require_relative 'psych/stream'
+require_relative 'psych/json/tree_builder'
+require_relative 'psych/json/stream'
+require_relative 'psych/handlers/document_stream'
+require_relative 'psych/class_loader'
###
# = Overview
#
# Psych is a YAML parser and emitter.
# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML]
-# or [HG repo: https://bitbucket.org/xi/libyaml] for its YAML parsing
+# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing
# and emitting capabilities. In addition to wrapping libyaml, Psych also
# knows how to serialize and de-serialize most Ruby objects to and from
# the YAML format.
@@ -74,12 +74,15 @@ require 'psych/class_loader'
#
# ==== Reading from a string
#
-# Psych.load("--- a") # => 'a'
-# Psych.load("---\n - a\n - b") # => ['a', 'b']
+# Psych.safe_load("--- a") # => 'a'
+# Psych.safe_load("---\n - a\n - b") # => ['a', 'b']
+# # From a trusted string:
+# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42
#
# ==== Reading from a file
#
-# Psych.load_file("database.yml")
+# Psych.safe_load_file("data.yml", permitted_classes: [Date])
+# Psych.load_file("trusted_database.yml")
#
# ==== Exception handling
#
@@ -230,10 +233,7 @@ require 'psych/class_loader'
module Psych
# The version of libyaml Psych is using
- LIBYAML_VERSION = Psych.libyaml_version.join '.'
- # Deprecation guard
- NOT_GIVEN = Object.new
- private_constant :NOT_GIVEN
+ LIBYAML_VERSION = Psych.libyaml_version.join('.').freeze
###
# Load +yaml+ in to a Ruby data structure. If multiple documents are
@@ -246,11 +246,11 @@ module Psych
#
# Example:
#
- # Psych.load("--- a") # => 'a'
- # Psych.load("---\n - a\n - b") # => ['a', 'b']
+ # Psych.unsafe_load("--- a") # => 'a'
+ # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b']
#
# begin
- # Psych.load("--- `", filename: "file.txt")
+ # Psych.unsafe_load("--- `", filename: "file.txt")
# rescue Psych::SyntaxError => ex
# ex.file # => 'file.txt'
# ex.message # => "(file.txt): found character that cannot start any token"
@@ -259,26 +259,19 @@ module Psych
# When the optional +symbolize_names+ keyword argument is set to a
# true value, returns symbols for keys in Hash objects (default: strings).
#
- # Psych.load("---\n foo: bar") # => {"foo"=>"bar"}
- # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
+ # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"}
+ # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
#
# Raises a TypeError when `yaml` parameter is NilClass
#
# NOTE: This method *should not* be used to parse untrusted documents, such as
# YAML documents that are supplied via user input. Instead, please use the
- # safe_load method.
+ # load method or the safe_load method.
#
- def self.load yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false
- if legacy_filename != NOT_GIVEN
- warn_with_uplevel 'Passing filename with the 2nd argument of Psych.load is deprecated. Use keyword argument like Psych.load(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
- filename = legacy_filename
- end
-
+ def self.unsafe_load yaml, filename: nil, fallback: false, symbolize_names: false, freeze: false, strict_integer: false
result = parse(yaml, filename: filename)
return fallback unless result
- result = result.to_ruby if result
- symbolize_names!(result) if symbolize_names
- result
+ result.to_ruby(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer)
end
###
@@ -288,7 +281,8 @@ module Psych
# * TrueClass
# * FalseClass
# * NilClass
- # * Numeric
+ # * Integer
+ # * Float
# * String
# * Array
# * Hash
@@ -313,7 +307,7 @@ module Psych
# A Psych::DisallowedClass exception will be raised if the yaml contains a
# class that isn't in the +permitted_classes+ list.
#
- # A Psych::BadAlias exception will be raised if the yaml contains aliases
+ # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases
# but the +aliases+ keyword argument is set to false.
#
# +filename+ will be used in the exception message if any exception is raised
@@ -325,44 +319,64 @@ module Psych
# Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"}
# Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
#
- def self.safe_load yaml, legacy_permitted_classes = NOT_GIVEN, legacy_permitted_symbols = NOT_GIVEN, legacy_aliases = NOT_GIVEN, legacy_filename = NOT_GIVEN, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false
- if legacy_permitted_classes != NOT_GIVEN
- warn_with_uplevel 'Passing permitted_classes with the 2nd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_classes: ...) instead.', uplevel: 1 if $VERBOSE
- permitted_classes = legacy_permitted_classes
- end
-
- if legacy_permitted_symbols != NOT_GIVEN
- warn_with_uplevel 'Passing permitted_symbols with the 3rd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, permitted_symbols: ...) instead.', uplevel: 1 if $VERBOSE
- permitted_symbols = legacy_permitted_symbols
- end
-
- if legacy_aliases != NOT_GIVEN
- warn_with_uplevel 'Passing aliases with the 4th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, aliases: ...) instead.', uplevel: 1 if $VERBOSE
- aliases = legacy_aliases
- end
-
- if legacy_filename != NOT_GIVEN
- warn_with_uplevel 'Passing filename with the 5th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
- filename = legacy_filename
- end
-
+ def self.safe_load yaml, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
result = parse(yaml, filename: filename)
return fallback unless result
class_loader = ClassLoader::Restricted.new(permitted_classes.map(&:to_s),
permitted_symbols.map(&:to_s))
- scanner = ScalarScanner.new class_loader
+ scanner = ScalarScanner.new class_loader, strict_integer: strict_integer
visitor = if aliases
- Visitors::ToRuby.new scanner, class_loader
+ Visitors::ToRuby.new scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze
else
- Visitors::NoAliasRuby.new scanner, class_loader
+ Visitors::NoAliasRuby.new scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze
end
result = visitor.accept result
- symbolize_names!(result) if symbolize_names
result
end
###
+ # Load +yaml+ in to a Ruby data structure. If multiple documents are
+ # provided, the object contained in the first document will be returned.
+ # +filename+ will be used in the exception message if any exception
+ # is raised while parsing. If +yaml+ is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ #
+ # Raises a Psych::SyntaxError when a YAML syntax error is detected.
+ #
+ # Example:
+ #
+ # Psych.load("--- a") # => 'a'
+ # Psych.load("---\n - a\n - b") # => ['a', 'b']
+ #
+ # begin
+ # Psych.load("--- `", filename: "file.txt")
+ # rescue Psych::SyntaxError => ex
+ # ex.file # => 'file.txt'
+ # ex.message # => "(file.txt): found character that cannot start any token"
+ # end
+ #
+ # When the optional +symbolize_names+ keyword argument is set to a
+ # true value, returns symbols for keys in Hash objects (default: strings).
+ #
+ # Psych.load("---\n foo: bar") # => {"foo"=>"bar"}
+ # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"}
+ #
+ # Raises a TypeError when `yaml` parameter is NilClass. This method is
+ # similar to `safe_load` except that `Symbol` objects are allowed by default.
+ #
+ def self.load yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false
+ safe_load yaml, permitted_classes: permitted_classes,
+ permitted_symbols: permitted_symbols,
+ aliases: aliases,
+ filename: filename,
+ fallback: fallback,
+ symbolize_names: symbolize_names,
+ freeze: freeze,
+ strict_integer: strict_integer
+ end
+
+ ###
# Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document.
# +filename+ is used in the exception message if a Psych::SyntaxError is
# raised.
@@ -381,22 +395,12 @@ module Psych
# end
#
# See Psych::Nodes for more information about YAML AST.
- def self.parse yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: NOT_GIVEN
- if legacy_filename != NOT_GIVEN
- warn_with_uplevel 'Passing filename with the 2nd argument of Psych.parse is deprecated. Use keyword argument like Psych.parse(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
- filename = legacy_filename
- end
-
+ def self.parse yaml, filename: nil
parse_stream(yaml, filename: filename) do |node|
return node
end
- if fallback != NOT_GIVEN
- warn_with_uplevel 'Passing the `fallback` keyword argument of Psych.parse is deprecated.', uplevel: 1 if $VERBOSE
- fallback
- else
- false
- end
+ false
end
###
@@ -445,12 +449,7 @@ module Psych
# Raises a TypeError when NilClass is passed.
#
# See Psych::Nodes for more information about YAML AST.
- def self.parse_stream yaml, legacy_filename = NOT_GIVEN, filename: nil, &block
- if legacy_filename != NOT_GIVEN
- warn_with_uplevel 'Passing filename with the 2nd argument of Psych.parse_stream is deprecated. Use keyword argument like Psych.parse_stream(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
- filename = legacy_filename
- end
-
+ def self.parse_stream yaml, filename: nil, &block
if block_given?
parser = Psych::Parser.new(Handlers::DocumentStream.new(&block))
parser.parse yaml, filename
@@ -515,6 +514,79 @@ module Psych
end
###
+ # call-seq:
+ # Psych.safe_dump(o) -> string of yaml
+ # Psych.safe_dump(o, options) -> string of yaml
+ # Psych.safe_dump(o, io) -> io object passed in
+ # Psych.safe_dump(o, io, options) -> io object passed in
+ #
+ # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in
+ # to control the output format. If an IO object is passed in, the YAML will
+ # be dumped to that IO object. By default, only the following
+ # classes are allowed to be serialized:
+ #
+ # * TrueClass
+ # * FalseClass
+ # * NilClass
+ # * Integer
+ # * Float
+ # * String
+ # * Array
+ # * Hash
+ #
+ # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+
+ # keyword argument. They are additive. For example, to allow Date serialization:
+ #
+ # Psych.safe_dump(yaml, permitted_classes: [Date])
+ #
+ # Now the Date class can be dumped in addition to the classes listed above.
+ #
+ # A Psych::DisallowedClass exception will be raised if the object contains a
+ # class that isn't in the +permitted_classes+ list.
+ #
+ # Currently supported options are:
+ #
+ # [<tt>:indentation</tt>] Number of space characters used to indent.
+ # Acceptable value should be in <tt>0..9</tt> range,
+ # otherwise option is ignored.
+ #
+ # Default: <tt>2</tt>.
+ # [<tt>:line_width</tt>] Max character to wrap line at.
+ #
+ # Default: <tt>0</tt> (meaning "wrap at 81").
+ # [<tt>:canonical</tt>] Write "canonical" YAML form (very verbose, yet
+ # strictly formal).
+ #
+ # Default: <tt>false</tt>.
+ # [<tt>:header</tt>] Write <tt>%YAML [version]</tt> at the beginning of document.
+ #
+ # Default: <tt>false</tt>.
+ #
+ # Example:
+ #
+ # # Dump an array, get back a YAML string
+ # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n"
+ #
+ # # Dump an array to an IO object
+ # Psych.safe_dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
+ #
+ # # Dump an array with indentation set
+ # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n"
+ #
+ # # Dump an array to an IO with indentation set
+ # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3)
+ def self.safe_dump o, io = nil, options = {}
+ if Hash === io
+ options = io
+ io = nil
+ end
+
+ visitor = Psych::Visitors::RestrictedYAMLTree.create options
+ visitor << o
+ visitor.tree.yaml io, options
+ end
+
+ ###
# Dump a list of objects as separate documents to a document stream.
#
# Example:
@@ -551,18 +623,13 @@ module Psych
# end
# list # => ['foo', 'bar']
#
- def self.load_stream yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: []
- if legacy_filename != NOT_GIVEN
- warn_with_uplevel 'Passing filename with the 2nd argument of Psych.load_stream is deprecated. Use keyword argument like Psych.load_stream(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
- filename = legacy_filename
- end
-
+ def self.load_stream yaml, filename: nil, fallback: [], **kwargs
result = if block_given?
parse_stream(yaml, filename: filename) do |node|
- yield node.to_ruby
+ yield node.to_ruby(**kwargs)
end
else
- parse_stream(yaml, filename: filename).children.map(&:to_ruby)
+ parse_stream(yaml, filename: filename).children.map { |node| node.to_ruby(**kwargs) }
end
return fallback if result.is_a?(Array) && result.empty?
@@ -573,49 +640,59 @@ module Psych
# Load the document contained in +filename+. Returns the yaml contained in
# +filename+ as a Ruby object, or if the file is empty, it returns
# the specified +fallback+ return value, which defaults to +false+.
- def self.load_file filename, fallback: false
+ #
+ # NOTE: This method *should not* be used to parse untrusted documents, such as
+ # YAML documents that are supplied via user input. Instead, please use the
+ # safe_load_file method.
+ def self.unsafe_load_file filename, **kwargs
File.open(filename, 'r:bom|utf-8') { |f|
- self.load f, filename: filename, fallback: fallback
+ self.unsafe_load f, filename: filename, **kwargs
+ }
+ end
+
+ ###
+ # Safely loads the document contained in +filename+. Returns the yaml contained in
+ # +filename+ as a Ruby object, or if the file is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ # See safe_load for options.
+ def self.safe_load_file filename, **kwargs
+ File.open(filename, 'r:bom|utf-8') { |f|
+ self.safe_load f, filename: filename, **kwargs
+ }
+ end
+
+ ###
+ # Loads the document contained in +filename+. Returns the yaml contained in
+ # +filename+ as a Ruby object, or if the file is empty, it returns
+ # the specified +fallback+ return value, which defaults to +false+.
+ # See load for options.
+ def self.load_file filename, **kwargs
+ File.open(filename, 'r:bom|utf-8') { |f|
+ self.load f, filename: filename, **kwargs
}
end
# :stopdoc:
- @domain_types = {}
def self.add_domain_type domain, type_tag, &block
key = ['tag', domain, type_tag].join ':'
- @domain_types[key] = [key, block]
- @domain_types["tag:#{type_tag}"] = [key, block]
+ domain_types[key] = [key, block]
+ domain_types["tag:#{type_tag}"] = [key, block]
end
def self.add_builtin_type type_tag, &block
domain = 'yaml.org,2002'
key = ['tag', domain, type_tag].join ':'
- @domain_types[key] = [key, block]
+ domain_types[key] = [key, block]
end
def self.remove_type type_tag
- @domain_types.delete type_tag
+ domain_types.delete type_tag
end
- @load_tags = {}
- @dump_tags = {}
def self.add_tag tag, klass
- @load_tags[tag] = klass.name
- @dump_tags[klass] = tag
- end
-
- def self.symbolize_names!(result)
- case result
- when Hash
- result.keys.each do |key|
- result[key.to_sym] = symbolize_names!(result.delete(key))
- end
- when Array
- result.map! { |r| symbolize_names!(r) }
- end
- result
+ load_tags[tag] = klass.name
+ dump_tags[klass] = tag
end
- private_class_method :symbolize_names!
# Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower.
def self.warn_with_uplevel(message, uplevel: 1)
@@ -633,9 +710,32 @@ module Psych
private_class_method :warn_with_uplevel, :parse_caller
class << self
- attr_accessor :load_tags
- attr_accessor :dump_tags
- attr_accessor :domain_types
+ if defined?(Ractor)
+ require 'forwardable'
+ extend Forwardable
+
+ class Config
+ attr_accessor :load_tags, :dump_tags, :domain_types
+ def initialize
+ @load_tags = {}
+ @dump_tags = {}
+ @domain_types = {}
+ end
+ end
+
+ def config
+ Ractor.current[:PsychConfig] ||= Config.new
+ end
+
+ def_delegators :config, :load_tags, :dump_tags, :domain_types, :load_tags=, :dump_tags=, :domain_types=
+ else
+ attr_accessor :load_tags
+ attr_accessor :dump_tags
+ attr_accessor :domain_types
+ end
end
+ self.load_tags = {}
+ self.dump_tags = {}
+ self.domain_types = {}
# :startdoc:
end
diff --git a/ext/psych/lib/psych/class_loader.rb b/ext/psych/lib/psych/class_loader.rb
index cfca86845a..c2e4ea4c93 100644
--- a/ext/psych/lib/psych/class_loader.rb
+++ b/ext/psych/lib/psych/class_loader.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require 'psych/omap'
-require 'psych/set'
+require_relative 'omap'
+require_relative 'set'
module Psych
class ClassLoader # :nodoc:
@@ -35,9 +35,11 @@ module Psych
constants.each do |const|
konst = const_get const
- define_method(const.to_s.downcase) do
- load konst
- end
+ class_eval <<~RUBY
+ def #{const.to_s.downcase}
+ load #{konst.inspect}
+ end
+ RUBY
end
private
@@ -69,7 +71,7 @@ module Psych
rescue
nil
end
- }.compact]
+ }.compact].freeze
class Restricted < ClassLoader
def initialize classes, symbols
@@ -84,7 +86,7 @@ module Psych
if @symbols.include? sym
super
else
- raise DisallowedClass, 'Symbol'
+ raise DisallowedClass.new('load', 'Symbol')
end
end
@@ -94,7 +96,7 @@ module Psych
if @classes.include? klassname
super
else
- raise DisallowedClass, klassname
+ raise DisallowedClass.new('load', klassname)
end
end
end
diff --git a/ext/psych/lib/psych/core_ext.rb b/ext/psych/lib/psych/core_ext.rb
index 81055cc501..0721a133c3 100644
--- a/ext/psych/lib/psych/core_ext.rb
+++ b/ext/psych/lib/psych/core_ext.rb
@@ -15,5 +15,5 @@ class Object
end
if defined?(::IRB)
- require 'psych/y'
+ require_relative 'y'
end
diff --git a/ext/psych/lib/psych/exception.rb b/ext/psych/lib/psych/exception.rb
index fac0c42b9f..d7469a4b30 100644
--- a/ext/psych/lib/psych/exception.rb
+++ b/ext/psych/lib/psych/exception.rb
@@ -6,9 +6,23 @@ module Psych
class BadAlias < Exception
end
+ # Subclasses `BadAlias` for backwards compatibility
+ class AliasesNotEnabled < BadAlias
+ def initialize
+ super "Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`."
+ end
+ end
+
+ # Subclasses `BadAlias` for backwards compatibility
+ class AnchorNotDefined < BadAlias
+ def initialize anchor_name
+ super "An alias referenced an unknown anchor: #{anchor_name}"
+ end
+ end
+
class DisallowedClass < Exception
- def initialize klass_name
- super "Tried to load unspecified class: #{klass_name}"
+ def initialize action, klass_name
+ super "Tried to #{action} unspecified class: #{klass_name}"
end
end
end
diff --git a/ext/psych/lib/psych/handler.rb b/ext/psych/lib/psych/handler.rb
index 8f23e366fa..ad7249ff77 100644
--- a/ext/psych/lib/psych/handler.rb
+++ b/ext/psych/lib/psych/handler.rb
@@ -119,7 +119,7 @@ module Psych
# +tag+ is an associated tag or nil
# +plain+ is a boolean value
# +quoted+ is a boolean value
- # +style+ is an integer idicating the string style
+ # +style+ is an integer indicating the string style
#
# See the constants in Psych::Nodes::Scalar for the possible values of
# +style+
diff --git a/ext/psych/lib/psych/handlers/document_stream.rb b/ext/psych/lib/psych/handlers/document_stream.rb
index 67da794093..b77115d074 100644
--- a/ext/psych/lib/psych/handlers/document_stream.rb
+++ b/ext/psych/lib/psych/handlers/document_stream.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/tree_builder'
+require_relative '../tree_builder'
module Psych
module Handlers
diff --git a/ext/psych/lib/psych/handlers/recorder.rb b/ext/psych/lib/psych/handlers/recorder.rb
index a8fc7b1144..c98724cb76 100644
--- a/ext/psych/lib/psych/handlers/recorder.rb
+++ b/ext/psych/lib/psych/handlers/recorder.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/handler'
+require_relative '../handler'
module Psych
module Handlers
diff --git a/ext/psych/lib/psych/json/stream.rb b/ext/psych/lib/psych/json/stream.rb
index 2ebd3d7a66..24dd4b9baf 100644
--- a/ext/psych/lib/psych/json/stream.rb
+++ b/ext/psych/lib/psych/json/stream.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require 'psych/json/ruby_events'
-require 'psych/json/yaml_events'
+require_relative 'ruby_events'
+require_relative 'yaml_events'
module Psych
module JSON
diff --git a/ext/psych/lib/psych/json/tree_builder.rb b/ext/psych/lib/psych/json/tree_builder.rb
index 5c2ee8ca25..9a45f6b94c 100644
--- a/ext/psych/lib/psych/json/tree_builder.rb
+++ b/ext/psych/lib/psych/json/tree_builder.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/json/yaml_events'
+require_relative 'yaml_events'
module Psych
module JSON
diff --git a/ext/psych/lib/psych/nodes.rb b/ext/psych/lib/psych/nodes.rb
index 5842c2e3e5..2fa52e0055 100644
--- a/ext/psych/lib/psych/nodes.rb
+++ b/ext/psych/lib/psych/nodes.rb
@@ -1,11 +1,11 @@
# frozen_string_literal: true
-require 'psych/nodes/node'
-require 'psych/nodes/stream'
-require 'psych/nodes/document'
-require 'psych/nodes/sequence'
-require 'psych/nodes/scalar'
-require 'psych/nodes/mapping'
-require 'psych/nodes/alias'
+require_relative 'nodes/node'
+require_relative 'nodes/stream'
+require_relative 'nodes/document'
+require_relative 'nodes/sequence'
+require_relative 'nodes/scalar'
+require_relative 'nodes/mapping'
+require_relative 'nodes/alias'
module Psych
###
diff --git a/ext/psych/lib/psych/nodes/node.rb b/ext/psych/lib/psych/nodes/node.rb
index f59fb8916b..f44fce5f05 100644
--- a/ext/psych/lib/psych/nodes/node.rb
+++ b/ext/psych/lib/psych/nodes/node.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'stringio'
-require 'psych/class_loader'
-require 'psych/scalar_scanner'
+require_relative '../class_loader'
+require_relative '../scalar_scanner'
module Psych
module Nodes
@@ -46,8 +46,8 @@ module Psych
# Convert this node to Ruby.
#
# See also Psych::Visitors::ToRuby
- def to_ruby
- Visitors::ToRuby.create.accept(self)
+ def to_ruby(symbolize_names: false, freeze: false, strict_integer: false)
+ Visitors::ToRuby.create(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer).accept(self)
end
alias :transform :to_ruby
diff --git a/ext/psych/lib/psych/nodes/scalar.rb b/ext/psych/lib/psych/nodes/scalar.rb
index e2616b6a84..5550b616a3 100644
--- a/ext/psych/lib/psych/nodes/scalar.rb
+++ b/ext/psych/lib/psych/nodes/scalar.rb
@@ -50,7 +50,7 @@ module Psych
# +tag+ is an associated tag or nil
# +plain+ is a boolean value
# +quoted+ is a boolean value
- # +style+ is an integer idicating the string style
+ # +style+ is an integer indicating the string style
#
# == See Also
#
diff --git a/ext/psych/lib/psych/parser.rb b/ext/psych/lib/psych/parser.rb
index 39bc8289be..2181c730e5 100644
--- a/ext/psych/lib/psych/parser.rb
+++ b/ext/psych/lib/psych/parser.rb
@@ -48,5 +48,18 @@ module Psych
@handler = handler
@external_encoding = ANY
end
+
+ ###
+ # call-seq:
+ # parser.parse(yaml)
+ #
+ # Parse the YAML document contained in +yaml+. Events will be called on
+ # the handler set on the parser instance.
+ #
+ # See Psych::Parser and Psych::Parser#handler
+
+ def parse yaml, path = yaml.respond_to?(:path) ? yaml.path : "<unknown>"
+ _native_parse @handler, yaml, path
+ end
end
end
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index cea2a453dd..3cb4bf3c7e 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
-require 'strscan'
module Psych
###
@@ -9,32 +8,39 @@ module Psych
TIME = /^-?\d{4}-\d{1,2}-\d{1,2}(?:[Tt]|\s+)\d{1,2}:\d\d:\d\d(?:\.\d*)?(?:\s*(?:Z|[-+]\d{1,2}:?(?:\d\d)?))?$/
# Taken from http://yaml.org/type/float.html
- FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10)
- |[-+]?\.(inf|Inf|INF)(?# infinity)
- |\.(nan|NaN|NAN)(?# not a number))$/x
+ # Base 60, [-+]inf and NaN are handled separately
+ FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10))$/x
# Taken from http://yaml.org/type/int.html
- INTEGER = /^(?:[-+]?0b[0-1_,]+ (?# base 2)
- |[-+]?0[0-7_,]+ (?# base 8)
- |[-+]?(?:0|[1-9][0-9_,]*) (?# base 10)
- |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x
+ INTEGER_STRICT = /^(?:[-+]?0b[0-1_]+ (?# base 2)
+ |[-+]?0[0-7_]+ (?# base 8)
+ |[-+]?(0|[1-9][0-9_]*) (?# base 10)
+ |[-+]?0x[0-9a-fA-F_]+ (?# base 16))$/x
+
+ # Same as above, but allows commas.
+ # Not to YML spec, but kept for backwards compatibility
+ INTEGER_LEGACY = /^(?:[-+]?0b[0-1_,]+ (?# base 2)
+ |[-+]?0[0-7_,]+ (?# base 8)
+ |[-+]?(?:0|[1-9](?:[0-9]|,[0-9]|_[0-9])*) (?# base 10)
+ |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x
attr_reader :class_loader
# Create a new scanner
- def initialize class_loader
+ def initialize class_loader, strict_integer: false
@symbol_cache = {}
@class_loader = class_loader
+ @strict_integer = strict_integer
end
# Tokenize +string+ returning the Ruby object
def tokenize string
return nil if string.empty?
return @symbol_cache[string] if @symbol_cache.key?(string)
-
+ integer_regex = @strict_integer ? INTEGER_STRICT : INTEGER_LEGACY
# Check for a String type, being careful not to get caught by hash keys, hex values, and
# special floats (e.g., -.inf).
- if string.match?(/^[^\d\.:-]?[A-Za-z_\s!@#\$%\^&\*\(\)\{\}\<\>\|\/\\~;=]+/) || string.match?(/\n/)
+ if string.match?(%r{^[^\d.:-]?[[:alpha:]_\s!@#$%\^&*(){}<>|/\\~;=]+}) || string.match?(/\n/)
return string if string.length > 5
if string.match?(/^[^ytonf~]/i)
@@ -57,11 +63,11 @@ module Psych
elsif string.match?(/^\d{4}-(?:1[012]|0\d|\d)-(?:[12]\d|3[01]|0\d|\d)$/)
require 'date'
begin
- class_loader.date.strptime(string, '%Y-%m-%d')
+ class_loader.date.strptime(string, '%F', Date::GREGORIAN)
rescue ArgumentError
string
end
- elsif string.match?(/^\.inf$/i)
+ elsif string.match?(/^\+?\.inf$/i)
Float::INFINITY
elsif string.match?(/^-\.inf$/i)
-Float::INFINITY
@@ -89,9 +95,9 @@ module Psych
if string.match?(/\A[-+]?\.\Z/)
string
else
- Float(string.gsub(/[,_]|\.([Ee]|$)/, '\1'))
+ Float(string.delete(',_').gsub(/\.([Ee]|$)/, '\1'))
end
- elsif string.match?(INTEGER)
+ elsif string.match?(integer_regex)
parse_int string
else
string
@@ -101,7 +107,7 @@ module Psych
###
# Parse and return an int from +string+
def parse_int string
- Integer(string.gsub(/[,]/, ''))
+ Integer(string.delete(',_'))
end
###
diff --git a/ext/psych/lib/psych/syntax_error.rb b/ext/psych/lib/psych/syntax_error.rb
index 1598e6ff36..a4c9c4a376 100644
--- a/ext/psych/lib/psych/syntax_error.rb
+++ b/ext/psych/lib/psych/syntax_error.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/exception'
+require_relative 'exception'
module Psych
class SyntaxError < Psych::Exception
diff --git a/ext/psych/lib/psych/tree_builder.rb b/ext/psych/lib/psych/tree_builder.rb
index 47a1695643..414ca02bf7 100644
--- a/ext/psych/lib/psych/tree_builder.rb
+++ b/ext/psych/lib/psych/tree_builder.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/handler'
+require_relative 'handler'
module Psych
###
diff --git a/ext/psych/lib/psych/versions.rb b/ext/psych/lib/psych/versions.rb
index 731ba9545e..a592a6916c 100644
--- a/ext/psych/lib/psych/versions.rb
+++ b/ext/psych/lib/psych/versions.rb
@@ -1,10 +1,10 @@
-
# frozen_string_literal: true
+
module Psych
# The version of Psych you are using
- VERSION = '3.1.0' unless defined?(::Psych::VERSION)
+ VERSION = '5.0.1'
if RUBY_ENGINE == 'jruby'
- DEFAULT_SNAKEYAML_VERSION = '1.23'.freeze
+ DEFAULT_SNAKEYAML_VERSION = '1.33'.freeze
end
end
diff --git a/ext/psych/lib/psych/visitors.rb b/ext/psych/lib/psych/visitors.rb
index e2b084daee..508290d862 100644
--- a/ext/psych/lib/psych/visitors.rb
+++ b/ext/psych/lib/psych/visitors.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require 'psych/visitors/visitor'
-require 'psych/visitors/to_ruby'
-require 'psych/visitors/emitter'
-require 'psych/visitors/yaml_tree'
-require 'psych/visitors/json_tree'
-require 'psych/visitors/depth_first'
+require_relative 'visitors/visitor'
+require_relative 'visitors/to_ruby'
+require_relative 'visitors/emitter'
+require_relative 'visitors/yaml_tree'
+require_relative 'visitors/json_tree'
+require_relative 'visitors/depth_first'
diff --git a/ext/psych/lib/psych/visitors/json_tree.rb b/ext/psych/lib/psych/visitors/json_tree.rb
index 9912cb1362..979fc100bd 100644
--- a/ext/psych/lib/psych/visitors/json_tree.rb
+++ b/ext/psych/lib/psych/visitors/json_tree.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'psych/json/ruby_events'
+require_relative '../json/ruby_events'
module Psych
module Visitors
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index b72fb4a1dc..8614251ca9 100644
--- a/ext/psych/lib/psych/visitors/to_ruby.rb
+++ b/ext/psych/lib/psych/visitors/to_ruby.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require 'psych/scalar_scanner'
-require 'psych/class_loader'
-require 'psych/exception'
+require_relative '../scalar_scanner'
+require_relative '../class_loader'
+require_relative '../exception'
unless defined?(Regexp::NOENCODING)
Regexp::NOENCODING = 32
@@ -12,39 +12,44 @@ module Psych
###
# This class walks a YAML AST, converting each node to Ruby
class ToRuby < Psych::Visitors::Visitor
- def self.create
+ def self.create(symbolize_names: false, freeze: false, strict_integer: false)
class_loader = ClassLoader.new
- scanner = ScalarScanner.new class_loader
- new(scanner, class_loader)
+ scanner = ScalarScanner.new class_loader, strict_integer: strict_integer
+ new(scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze)
end
attr_reader :class_loader
- def initialize ss, class_loader
+ def initialize ss, class_loader, symbolize_names: false, freeze: false
super()
@st = {}
@ss = ss
+ @load_tags = Psych.load_tags
@domain_types = Psych.domain_types
@class_loader = class_loader
+ @symbolize_names = symbolize_names
+ @freeze = freeze
end
def accept target
result = super
- return result if @domain_types.empty? || !target.tag
- key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
- key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/
+ unless @domain_types.empty? || !target.tag
+ key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
+ key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/
- if @domain_types.key? key
- value, block = @domain_types[key]
- return block.call value, result
+ if @domain_types.key? key
+ value, block = @domain_types[key]
+ result = block.call value, result
+ end
end
+ result = deduplicate(result).freeze if @freeze
result
end
def deserialize o
- if klass = resolve_class(Psych.load_tags[o.tag])
+ if klass = resolve_class(@load_tags[o.tag])
instance = klass.allocate
if instance.respond_to?(:init_with)
@@ -75,7 +80,9 @@ module Psych
when "!ruby/object:DateTime"
class_loader.date_time
require 'date' unless defined? DateTime
- @ss.parse_time(o.value).to_datetime
+ t = @ss.parse_time(o.value)
+ DateTime.civil(*t.to_a[0, 6].reverse, Rational(t.utc_offset, 86400)) +
+ (t.subsec/86400)
when '!ruby/encoding'
::Encoding.find o.value
when "!ruby/object:Complex"
@@ -124,7 +131,7 @@ module Psych
end
def visit_Psych_Nodes_Sequence o
- if klass = resolve_class(Psych.load_tags[o.tag])
+ if klass = resolve_class(@load_tags[o.tag])
instance = klass.allocate
if instance.respond_to?(:init_with)
@@ -156,8 +163,8 @@ module Psych
end
def visit_Psych_Nodes_Mapping o
- if Psych.load_tags[o.tag]
- return revive(resolve_class(Psych.load_tags[o.tag]), o)
+ if @load_tags[o.tag]
+ return revive(resolve_class(@load_tags[o.tag]), o)
end
return revive_hash(register(o, {}), o) unless o.tag
@@ -318,10 +325,11 @@ module Psych
end
def visit_Psych_Nodes_Alias o
- @st.fetch(o.anchor) { raise BadAlias, "Unknown alias: #{o.anchor}" }
+ @st.fetch(o.anchor) { raise AnchorNotDefined, o.anchor }
end
private
+
def register node, object
@st[node.anchor] = object if node.anchor
object
@@ -333,13 +341,12 @@ module Psych
list
end
- SHOVEL = '<<'
- def revive_hash hash, o
+ def revive_hash hash, o, tagged= false
o.children.each_slice(2) { |k,v|
- key = deduplicate(accept(k))
+ key = accept(k)
val = accept(v)
- if key == SHOVEL && k.tag != "tag:yaml.org,2002:str"
+ if key == '<<' && k.tag != "tag:yaml.org,2002:str"
case v
when Nodes::Alias, Nodes::Mapping
begin
@@ -361,6 +368,12 @@ module Psych
hash[key] = val
end
else
+ if !tagged && @symbolize_names && key.is_a?(String)
+ key = key.to_sym
+ elsif !@freeze
+ key = deduplicate(key)
+ end
+
hash[key] = val
end
@@ -371,6 +384,8 @@ module Psych
if RUBY_VERSION < '2.7'
def deduplicate key
if key.is_a?(String)
+ # It is important to untaint the string, otherwise it won't
+ # be deduplicated into an fstring, but simply frozen.
-(key.untaint)
else
key
@@ -391,7 +406,7 @@ module Psych
def revive klass, node
s = register(node, klass.allocate)
- init_with(s, revive_hash({}, node), node)
+ init_with(s, revive_hash({}, node, true), node)
end
def init_with o, h, node
@@ -414,7 +429,7 @@ module Psych
class NoAliasRuby < ToRuby
def visit_Psych_Nodes_Alias o
- raise BadAlias, "Unknown alias: #{o.anchor}"
+ raise AliasesNotEnabled
end
end
end
diff --git a/ext/psych/lib/psych/visitors/visitor.rb b/ext/psych/lib/psych/visitors/visitor.rb
index 3f4ba64e57..21052aa66f 100644
--- a/ext/psych/lib/psych/visitors/visitor.rb
+++ b/ext/psych/lib/psych/visitors/visitor.rb
@@ -8,12 +8,26 @@ module Psych
private
- DISPATCH = Hash.new do |hash, klass|
- hash[klass] = "visit_#{klass.name.gsub('::', '_')}"
+ # @api private
+ def self.dispatch_cache
+ Hash.new do |hash, klass|
+ hash[klass] = :"visit_#{klass.name.gsub('::', '_')}"
+ end.compare_by_identity
+ end
+
+ if defined?(Ractor)
+ def dispatch
+ @dispatch_cache ||= (Ractor.current[:Psych_Visitors_Visitor] ||= Visitor.dispatch_cache)
+ end
+ else
+ DISPATCH = dispatch_cache
+ def dispatch
+ DISPATCH
+ end
end
def visit target
- send DISPATCH[target.class], target
+ send dispatch[target.class], target
end
end
end
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index 79ca129b83..31858798e4 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require 'psych/tree_builder'
-require 'psych/scalar_scanner'
-require 'psych/class_loader'
+require_relative '../tree_builder'
+require_relative '../scalar_scanner'
+require_relative '../class_loader'
module Psych
module Visitors
@@ -80,7 +80,7 @@ module Psych
raise(TypeError, "Can't dump #{target.class}") unless method
h[klass] = method
- end
+ end.compare_by_identity
end
def start encoding = Nodes::Stream::UTF8
@@ -181,7 +181,7 @@ module Psych
end
def visit_Exception o
- dump_exception o, private_iv_get(o, 'mesg')
+ dump_exception o, o.message.to_s
end
def visit_NameError o
@@ -192,12 +192,13 @@ module Psych
register o, @emitter.scalar(o.inspect, nil, '!ruby/regexp', false, false, Nodes::Scalar::ANY)
end
+ def visit_Date o
+ register o, visit_Integer(o.gregorian)
+ end
+
def visit_DateTime o
- formatted = if o.offset.zero?
- o.strftime("%Y-%m-%d %H:%M:%S.%9N Z".freeze)
- else
- o.strftime("%Y-%m-%d %H:%M:%S.%9N %:z".freeze)
- end
+ t = o.italy
+ formatted = format_time t, t.offset.zero?
tag = '!ruby/object:DateTime'
register o, @emitter.scalar(formatted, nil, tag, false, false, Nodes::Scalar::ANY)
end
@@ -235,7 +236,6 @@ module Psych
end
alias :visit_TrueClass :visit_Integer
alias :visit_FalseClass :visit_Integer
- alias :visit_Date :visit_Integer
def visit_Float o
if o.nan?
@@ -272,6 +272,8 @@ module Psych
tag = 'tag:yaml.org,2002:str'
plain = false
quote = false
+ elsif o == 'y' || o == 'n'
+ style = Nodes::Scalar::DOUBLE_QUOTED
elsif @line_width && o.length > @line_width
style = Nodes::Scalar::FOLDED
elsif o =~ /^[^[:word:]][^"]*$/
@@ -480,8 +482,8 @@ module Psych
@emitter.end_mapping
end
- def format_time time
- if time.utc?
+ def format_time time, utc = time.utc?
+ if utc
time.strftime("%Y-%m-%d %H:%M:%S.%9N Z")
else
time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
@@ -509,9 +511,9 @@ module Psych
def emit_coder c, o
case c.type
when :scalar
- @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, Nodes::Scalar::ANY
+ @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, c.style
when :seq
- @emitter.start_sequence nil, c.tag, c.tag.nil?, Nodes::Sequence::BLOCK
+ @emitter.start_sequence nil, c.tag, c.tag.nil?, c.style
c.seq.each do |thing|
accept thing
end
@@ -535,5 +537,51 @@ module Psych
end
end
end
+
+ class RestrictedYAMLTree < YAMLTree
+ DEFAULT_PERMITTED_CLASSES = {
+ TrueClass => true,
+ FalseClass => true,
+ NilClass => true,
+ Integer => true,
+ Float => true,
+ String => true,
+ Array => true,
+ Hash => true,
+ }.compare_by_identity.freeze
+
+ def initialize emitter, ss, options
+ super
+ @permitted_classes = DEFAULT_PERMITTED_CLASSES.dup
+ Array(options[:permitted_classes]).each do |klass|
+ @permitted_classes[klass] = true
+ end
+ @permitted_symbols = {}.compare_by_identity
+ Array(options[:permitted_symbols]).each do |symbol|
+ @permitted_symbols[symbol] = true
+ end
+ @aliases = options.fetch(:aliases, false)
+ end
+
+ def accept target
+ if !@aliases && @st.key?(target)
+ raise BadAlias, "Tried to dump an aliased object"
+ end
+
+ unless @permitted_classes[target.class]
+ raise DisallowedClass.new('dump', target.class.name || target.class.inspect)
+ end
+
+ super
+ end
+
+ def visit_Symbol sym
+ unless @permitted_symbols[sym]
+ raise DisallowedClass.new('dump', "Symbol(#{sym.inspect})")
+ end
+
+ super
+ end
+ end
end
end
diff --git a/ext/psych/psych.c b/ext/psych/psych.c
index 3bb59bfc11..8af0bb6a5a 100644
--- a/ext/psych/psych.c
+++ b/ext/psych/psych.c
@@ -11,9 +11,9 @@ static VALUE libyaml_version(VALUE module)
yaml_get_version(&major, &minor, &patch);
- list[0] = INT2NUM((long)major);
- list[1] = INT2NUM((long)minor);
- list[2] = INT2NUM((long)patch);
+ list[0] = INT2NUM(major);
+ list[1] = INT2NUM(minor);
+ list[2] = INT2NUM(patch);
return rb_ary_new4((long)3, list);
}
@@ -22,6 +22,9 @@ VALUE mPsych;
void Init_psych(void)
{
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
+ RB_EXT_RACTOR_SAFE(true);
+ #endif
mPsych = rb_define_module("Psych");
rb_define_singleton_method(mPsych, "libyaml_version", libyaml_version, 0);
diff --git a/ext/psych/psych.gemspec b/ext/psych/psych.gemspec
index e0168af7d8..5f5168ddb0 100644
--- a/ext/psych/psych.gemspec
+++ b/ext/psych/psych.gemspec
@@ -1,16 +1,14 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
-begin
- require_relative 'lib/psych/versions'
-rescue LoadError
- # for Ruby core repository
- require_relative 'versions'
+version_module = Module.new do
+ version_rb = File.join(__dir__, "lib/psych/versions.rb")
+ module_eval(File.read(version_rb), version_rb)
end
Gem::Specification.new do |s|
s.name = "psych"
- s.version = Psych::VERSION
+ s.version = version_module::Psych::VERSION
s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"]
s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org", "headius@headius.com"]
s.summary = "Psych is a YAML parser and emitter"
@@ -25,13 +23,10 @@ DESCRIPTION
# for ruby core repository. It was generated by `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
s.files = [
- ".gitignore", ".travis.yml", "Gemfile", "Mavenfile", "README.md", "Rakefile", "bin/console",
+ ".gitignore", "Gemfile", "LICENSE", "Mavenfile", "README.md", "Rakefile", "bin/console",
"bin/setup", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h",
"ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h",
"ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h",
- "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c",
- "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c",
- "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h",
"lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/exception.rb",
"lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb",
"lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb",
@@ -48,7 +43,6 @@ DESCRIPTION
s.extra_rdoc_files = ["README.md"]
s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
- s.rubygems_version = "2.5.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0")
if RUBY_ENGINE == 'jruby'
@@ -62,9 +56,11 @@ DESCRIPTION
"lib/psych_jars.rb",
"lib/psych.jar"
]
- s.requirements = "jar org.yaml:snakeyaml, #{Psych::DEFAULT_SNAKEYAML_VERSION}"
+ s.requirements = "jar org.yaml:snakeyaml, #{version_module::Psych::DEFAULT_SNAKEYAML_VERSION}"
s.add_dependency 'jar-dependencies', '>= 0.1.7'
else
s.extensions = ["ext/psych/extconf.rb"]
+ s.add_dependency 'stringio'
end
+
end
diff --git a/ext/psych/psych_parser.c b/ext/psych/psych_parser.c
index fb1a917bb2..9c5179cc44 100644
--- a/ext/psych/psych_parser.c
+++ b/ext/psych/psych_parser.c
@@ -27,7 +27,7 @@ static ID id_event_location;
static int io_reader(void * data, unsigned char *buf, size_t size, size_t *read)
{
VALUE io = (VALUE)data;
- VALUE string = rb_funcall(io, id_read, 1, INT2NUM(size));
+ VALUE string = rb_funcall(io, id_read, 1, SIZET2NUM(size));
*read = 0;
@@ -79,21 +79,25 @@ static VALUE allocate(VALUE klass)
static VALUE make_exception(yaml_parser_t * parser, VALUE path)
{
- size_t line, column;
- VALUE ePsychSyntaxError;
+ if (parser->error == YAML_MEMORY_ERROR) {
+ return rb_eNoMemError;
+ } else {
+ size_t line, column;
+ VALUE ePsychSyntaxError;
- line = parser->context_mark.line + 1;
- column = parser->context_mark.column + 1;
+ line = parser->context_mark.line + 1;
+ column = parser->context_mark.column + 1;
- ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
+ ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
- return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6,
- path,
- INT2NUM(line),
- INT2NUM(column),
- INT2NUM(parser->problem_offset),
- parser->problem ? rb_usascii_str_new2(parser->problem) : Qnil,
- parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
+ return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6,
+ path,
+ SIZET2NUM(line),
+ SIZET2NUM(column),
+ SIZET2NUM(parser->problem_offset),
+ parser->problem ? rb_usascii_str_new2(parser->problem) : Qnil,
+ parser->context ? rb_usascii_str_new2(parser->context) : Qnil);
+ }
}
static VALUE transcode_string(VALUE src, int * parser_encoding)
@@ -241,18 +245,8 @@ static VALUE protected_event_location(VALUE pointer)
return rb_funcall3(args[0], id_event_location, 4, args + 1);
}
-/*
- * call-seq:
- * parser.parse(yaml)
- *
- * Parse the YAML document contained in +yaml+. Events will be called on
- * the handler set on the parser instance.
- *
- * See Psych::Parser and Psych::Parser#handler
- */
-static VALUE parse(int argc, VALUE *argv, VALUE self)
+static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
{
- VALUE yaml, path;
yaml_parser_t * parser;
yaml_event_t event;
int done = 0;
@@ -260,14 +254,6 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
int parser_encoding = YAML_ANY_ENCODING;
int encoding = rb_utf8_encindex();
rb_encoding * internal_enc = rb_default_internal_encoding();
- VALUE handler = rb_iv_get(self, "@handler");
-
- if (rb_scan_args(argc, argv, "11", &yaml, &path) == 1) {
- if(rb_respond_to(yaml, id_path))
- path = rb_funcall(yaml, id_path, 0);
- else
- path = rb_str_new2("<unknown>");
- }
TypedData_Get_Struct(self, yaml_parser_t, &psych_parser_type, parser);
@@ -293,7 +279,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
VALUE event_args[5];
VALUE start_line, start_column, end_line, end_column;
- if(!yaml_parser_parse(parser, &event)) {
+ if(parser->error || !yaml_parser_parse(parser, &event)) {
VALUE exception;
exception = make_exception(parser, path);
@@ -303,10 +289,10 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
rb_exc_raise(exception);
}
- start_line = INT2NUM((long)event.start_mark.line);
- start_column = INT2NUM((long)event.start_mark.column);
- end_line = INT2NUM((long)event.end_mark.line);
- end_column = INT2NUM((long)event.end_mark.column);
+ start_line = SIZET2NUM(event.start_mark.line);
+ start_column = SIZET2NUM(event.start_mark.column);
+ end_line = SIZET2NUM(event.end_mark.line);
+ end_column = SIZET2NUM(event.end_mark.column);
event_args[0] = handler;
event_args[1] = start_line;
@@ -321,7 +307,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
VALUE args[2];
args[0] = handler;
- args[1] = INT2NUM((long)event.data.stream_start.encoding);
+ args[1] = INT2NUM(event.data.stream_start.encoding);
rb_protect(protected_start_stream, (VALUE)args, &state);
}
break;
@@ -334,8 +320,8 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
VALUE version = event.data.document_start.version_directive ?
rb_ary_new3(
(long)2,
- INT2NUM((long)event.data.document_start.version_directive->major),
- INT2NUM((long)event.data.document_start.version_directive->minor)
+ INT2NUM(event.data.document_start.version_directive->major),
+ INT2NUM(event.data.document_start.version_directive->minor)
) : rb_ary_new();
if(event.data.document_start.tag_directives.start) {
@@ -418,7 +404,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
quoted_implicit =
event.data.scalar.quoted_implicit == 0 ? Qfalse : Qtrue;
- style = INT2NUM((long)event.data.scalar.style);
+ style = INT2NUM(event.data.scalar.style);
args[0] = handler;
args[1] = val;
@@ -450,7 +436,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
implicit =
event.data.sequence_start.implicit == 0 ? Qfalse : Qtrue;
- style = INT2NUM((long)event.data.sequence_start.style);
+ style = INT2NUM(event.data.sequence_start.style);
args[0] = handler;
args[1] = anchor;
@@ -483,7 +469,7 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
implicit =
event.data.mapping_start.implicit == 0 ? Qfalse : Qtrue;
- style = INT2NUM((long)event.data.mapping_start.style);
+ style = INT2NUM(event.data.mapping_start.style);
args[0] = handler;
args[1] = anchor;
@@ -527,9 +513,9 @@ static VALUE mark(VALUE self)
TypedData_Get_Struct(self, yaml_parser_t, &psych_parser_type, parser);
mark_klass = rb_const_get_at(cPsychParser, rb_intern("Mark"));
- args[0] = INT2NUM(parser->mark.index);
- args[1] = INT2NUM(parser->mark.line);
- args[2] = INT2NUM(parser->mark.column);
+ args[0] = SIZET2NUM(parser->mark.index);
+ args[1] = SIZET2NUM(parser->mark.line);
+ args[2] = SIZET2NUM(parser->mark.column);
return rb_class_new_instance(3, args, mark_klass);
}
@@ -558,7 +544,7 @@ void Init_psych_parser(void)
rb_require("psych/syntax_error");
- rb_define_method(cPsychParser, "parse", parse, -1);
+ rb_define_private_method(cPsychParser, "_native_parse", parse, 3);
rb_define_method(cPsychParser, "mark", mark, 0);
id_read = rb_intern("read");
diff --git a/ext/psych/psych_yaml_tree.c b/ext/psych/psych_yaml_tree.c
index 7aca9114c9..225655d127 100644
--- a/ext/psych/psych_yaml_tree.c
+++ b/ext/psych/psych_yaml_tree.c
@@ -2,23 +2,11 @@
VALUE cPsychVisitorsYamlTree;
-/*
- * call-seq: private_iv_get(target, prop)
- *
- * Get the private instance variable +prop+ from +target+
- */
-static VALUE private_iv_get(VALUE self, VALUE target, VALUE prop)
-{
- return rb_attr_get(target, rb_intern(StringValueCStr(prop)));
-}
-
void Init_psych_yaml_tree(void)
{
VALUE psych = rb_define_module("Psych");
VALUE visitors = rb_define_module_under(psych, "Visitors");
VALUE visitor = rb_define_class_under(visitors, "Visitor", rb_cObject);
cPsychVisitorsYamlTree = rb_define_class_under(visitors, "YAMLTree", visitor);
-
- rb_define_private_method(cPsychVisitorsYamlTree, "private_iv_get", private_iv_get, 2);
}
/* vim: set noet sws=4 sw=4: */
diff --git a/ext/psych/yaml/api.c b/ext/psych/yaml/api.c
deleted file mode 100644
index 95dc6b4de3..0000000000
--- a/ext/psych/yaml/api.c
+++ /dev/null
@@ -1,1395 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * Get the library version.
- */
-
-YAML_DECLARE(const char *)
-yaml_get_version_string(void)
-{
- return YAML_VERSION_STRING;
-}
-
-/*
- * Get the library version numbers.
- */
-
-YAML_DECLARE(void)
-yaml_get_version(int *major, int *minor, int *patch)
-{
- *major = YAML_VERSION_MAJOR;
- *minor = YAML_VERSION_MINOR;
- *patch = YAML_VERSION_PATCH;
-}
-
-/*
- * Allocate a dynamic memory block.
- */
-
-YAML_DECLARE(void *)
-yaml_malloc(size_t size)
-{
- return malloc(size ? size : 1);
-}
-
-/*
- * Reallocate a dynamic memory block.
- */
-
-YAML_DECLARE(void *)
-yaml_realloc(void *ptr, size_t size)
-{
- return ptr ? realloc(ptr, size ? size : 1) : malloc(size ? size : 1);
-}
-
-/*
- * Free a dynamic memory block.
- */
-
-YAML_DECLARE(void)
-yaml_free(void *ptr)
-{
- if (ptr) free(ptr);
-}
-
-/*
- * Duplicate a string.
- */
-
-YAML_DECLARE(yaml_char_t *)
-yaml_strdup(const yaml_char_t *str)
-{
- if (!str)
- return NULL;
-
- return (yaml_char_t *)strdup((char *)str);
-}
-
-/*
- * Extend a string.
- */
-
-YAML_DECLARE(int)
-yaml_string_extend(yaml_char_t **start,
- yaml_char_t **pointer, yaml_char_t **end)
-{
- yaml_char_t *new_start = (yaml_char_t *)yaml_realloc((void*)*start, (*end - *start)*2);
-
- if (!new_start) return 0;
-
- memset(new_start + (*end - *start), 0, *end - *start);
-
- *pointer = new_start + (*pointer - *start);
- *end = new_start + (*end - *start)*2;
- *start = new_start;
-
- return 1;
-}
-
-/*
- * Append a string B to a string A.
- */
-
-YAML_DECLARE(int)
-yaml_string_join(
- yaml_char_t **a_start, yaml_char_t **a_pointer, yaml_char_t **a_end,
- yaml_char_t **b_start, yaml_char_t **b_pointer, SHIM(yaml_char_t **b_end))
-{
- UNUSED_PARAM(b_end)
- if (*b_start == *b_pointer)
- return 1;
-
- while (*a_end - *a_pointer <= *b_pointer - *b_start) {
- if (!yaml_string_extend(a_start, a_pointer, a_end))
- return 0;
- }
-
- memcpy(*a_pointer, *b_start, *b_pointer - *b_start);
- *a_pointer += *b_pointer - *b_start;
-
- return 1;
-}
-
-/*
- * Extend a stack.
- */
-
-YAML_DECLARE(int)
-yaml_stack_extend(void **start, void **top, void **end)
-{
- void *new_start = yaml_realloc(*start, ((char *)*end - (char *)*start)*2);
-
- if (!new_start) return 0;
-
- *top = (char *)new_start + ((char *)*top - (char *)*start);
- *end = (char *)new_start + ((char *)*end - (char *)*start)*2;
- *start = new_start;
-
- return 1;
-}
-
-/*
- * Extend or move a queue.
- */
-
-YAML_DECLARE(int)
-yaml_queue_extend(void **start, void **head, void **tail, void **end)
-{
- /* Check if we need to resize the queue. */
-
- if (*start == *head && *tail == *end) {
- void *new_start = yaml_realloc(*start,
- ((char *)*end - (char *)*start)*2);
-
- if (!new_start) return 0;
-
- *head = (char *)new_start + ((char *)*head - (char *)*start);
- *tail = (char *)new_start + ((char *)*tail - (char *)*start);
- *end = (char *)new_start + ((char *)*end - (char *)*start)*2;
- *start = new_start;
- }
-
- /* Check if we need to move the queue at the beginning of the buffer. */
-
- if (*tail == *end) {
- if (*head != *tail) {
- memmove(*start, *head, (char *)*tail - (char *)*head);
- }
- *tail = (char *)*tail - (char *)*head + (char *)*start;
- *head = *start;
- }
-
- return 1;
-}
-
-
-/*
- * Create a new parser object.
- */
-
-YAML_DECLARE(int)
-yaml_parser_initialize(yaml_parser_t *parser)
-{
- assert(parser); /* Non-NULL parser object expected. */
-
- memset(parser, 0, sizeof(yaml_parser_t));
- if (!BUFFER_INIT(parser, parser->raw_buffer, INPUT_RAW_BUFFER_SIZE))
- goto error;
- if (!BUFFER_INIT(parser, parser->buffer, INPUT_BUFFER_SIZE))
- goto error;
- if (!QUEUE_INIT(parser, parser->tokens, INITIAL_QUEUE_SIZE, yaml_token_t*))
- goto error;
- if (!STACK_INIT(parser, parser->indents, int*))
- goto error;
- if (!STACK_INIT(parser, parser->simple_keys, yaml_simple_key_t*))
- goto error;
- if (!STACK_INIT(parser, parser->states, yaml_parser_state_t*))
- goto error;
- if (!STACK_INIT(parser, parser->marks, yaml_mark_t*))
- goto error;
- if (!STACK_INIT(parser, parser->tag_directives, yaml_tag_directive_t*))
- goto error;
-
- return 1;
-
-error:
-
- BUFFER_DEL(parser, parser->raw_buffer);
- BUFFER_DEL(parser, parser->buffer);
- QUEUE_DEL(parser, parser->tokens);
- STACK_DEL(parser, parser->indents);
- STACK_DEL(parser, parser->simple_keys);
- STACK_DEL(parser, parser->states);
- STACK_DEL(parser, parser->marks);
- STACK_DEL(parser, parser->tag_directives);
-
- return 0;
-}
-
-/*
- * Destroy a parser object.
- */
-
-YAML_DECLARE(void)
-yaml_parser_delete(yaml_parser_t *parser)
-{
- assert(parser); /* Non-NULL parser object expected. */
-
- BUFFER_DEL(parser, parser->raw_buffer);
- BUFFER_DEL(parser, parser->buffer);
- while (!QUEUE_EMPTY(parser, parser->tokens)) {
- yaml_token_delete(&DEQUEUE(parser, parser->tokens));
- }
- QUEUE_DEL(parser, parser->tokens);
- STACK_DEL(parser, parser->indents);
- STACK_DEL(parser, parser->simple_keys);
- STACK_DEL(parser, parser->states);
- STACK_DEL(parser, parser->marks);
- while (!STACK_EMPTY(parser, parser->tag_directives)) {
- yaml_tag_directive_t tag_directive = POP(parser, parser->tag_directives);
- yaml_free(tag_directive.handle);
- yaml_free(tag_directive.prefix);
- }
- STACK_DEL(parser, parser->tag_directives);
-
- memset(parser, 0, sizeof(yaml_parser_t));
-}
-
-/*
- * String read handler.
- */
-
-static int
-yaml_string_read_handler(void *data, unsigned char *buffer, size_t size,
- size_t *size_read)
-{
- yaml_parser_t *parser = (yaml_parser_t *)data;
-
- if (parser->input.string.current == parser->input.string.end) {
- *size_read = 0;
- return 1;
- }
-
- if (size > (size_t)(parser->input.string.end
- - parser->input.string.current)) {
- size = parser->input.string.end - parser->input.string.current;
- }
-
- memcpy(buffer, parser->input.string.current, size);
- parser->input.string.current += size;
- *size_read = size;
- return 1;
-}
-
-/*
- * File read handler.
- */
-
-static int
-yaml_file_read_handler(void *data, unsigned char *buffer, size_t size,
- size_t *size_read)
-{
- yaml_parser_t *parser = (yaml_parser_t *)data;
-
- *size_read = fread(buffer, 1, size, parser->input.file);
- return !ferror(parser->input.file);
-}
-
-/*
- * Set a string input.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input_string(yaml_parser_t *parser,
- const unsigned char *input, size_t size)
-{
- assert(parser); /* Non-NULL parser object expected. */
- assert(!parser->read_handler); /* You can set the source only once. */
- assert(input); /* Non-NULL input string expected. */
-
- parser->read_handler = yaml_string_read_handler;
- parser->read_handler_data = parser;
-
- parser->input.string.start = input;
- parser->input.string.current = input;
- parser->input.string.end = input+size;
-}
-
-/*
- * Set a file input.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input_file(yaml_parser_t *parser, FILE *file)
-{
- assert(parser); /* Non-NULL parser object expected. */
- assert(!parser->read_handler); /* You can set the source only once. */
- assert(file); /* Non-NULL file object expected. */
-
- parser->read_handler = yaml_file_read_handler;
- parser->read_handler_data = parser;
-
- parser->input.file = file;
-}
-
-/*
- * Set a generic input.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input(yaml_parser_t *parser,
- yaml_read_handler_t *handler, void *data)
-{
- assert(parser); /* Non-NULL parser object expected. */
- assert(!parser->read_handler); /* You can set the source only once. */
- assert(handler); /* Non-NULL read handler expected. */
-
- parser->read_handler = handler;
- parser->read_handler_data = data;
-}
-
-/*
- * Set the source encoding.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding)
-{
- assert(parser); /* Non-NULL parser object expected. */
- assert(!parser->encoding); /* Encoding is already set or detected. */
-
- parser->encoding = encoding;
-}
-
-/*
- * Create a new emitter object.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_initialize(yaml_emitter_t *emitter)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- memset(emitter, 0, sizeof(yaml_emitter_t));
- if (!BUFFER_INIT(emitter, emitter->buffer, OUTPUT_BUFFER_SIZE))
- goto error;
- if (!BUFFER_INIT(emitter, emitter->raw_buffer, OUTPUT_RAW_BUFFER_SIZE))
- goto error;
- if (!STACK_INIT(emitter, emitter->states, yaml_emitter_state_t*))
- goto error;
- if (!QUEUE_INIT(emitter, emitter->events, INITIAL_QUEUE_SIZE, yaml_event_t*))
- goto error;
- if (!STACK_INIT(emitter, emitter->indents, int*))
- goto error;
- if (!STACK_INIT(emitter, emitter->tag_directives, yaml_tag_directive_t*))
- goto error;
-
- return 1;
-
-error:
-
- BUFFER_DEL(emitter, emitter->buffer);
- BUFFER_DEL(emitter, emitter->raw_buffer);
- STACK_DEL(emitter, emitter->states);
- QUEUE_DEL(emitter, emitter->events);
- STACK_DEL(emitter, emitter->indents);
- STACK_DEL(emitter, emitter->tag_directives);
-
- return 0;
-}
-
-/*
- * Destroy an emitter object.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_delete(yaml_emitter_t *emitter)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- BUFFER_DEL(emitter, emitter->buffer);
- BUFFER_DEL(emitter, emitter->raw_buffer);
- STACK_DEL(emitter, emitter->states);
- while (!QUEUE_EMPTY(emitter, emitter->events)) {
- yaml_event_delete(&DEQUEUE(emitter, emitter->events));
- }
- QUEUE_DEL(emitter, emitter->events);
- STACK_DEL(emitter, emitter->indents);
- while (!STACK_EMPTY(empty, emitter->tag_directives)) {
- yaml_tag_directive_t tag_directive = POP(emitter, emitter->tag_directives);
- yaml_free(tag_directive.handle);
- yaml_free(tag_directive.prefix);
- }
- STACK_DEL(emitter, emitter->tag_directives);
- yaml_free(emitter->anchors);
-
- memset(emitter, 0, sizeof(yaml_emitter_t));
-}
-
-/*
- * String write handler.
- */
-
-static int
-yaml_string_write_handler(void *data, unsigned char *buffer, size_t size)
-{
- yaml_emitter_t *emitter = (yaml_emitter_t *)data;
-
- if (emitter->output.string.size - *emitter->output.string.size_written
- < size) {
- memcpy(emitter->output.string.buffer
- + *emitter->output.string.size_written,
- buffer,
- emitter->output.string.size
- - *emitter->output.string.size_written);
- *emitter->output.string.size_written = emitter->output.string.size;
- return 0;
- }
-
- memcpy(emitter->output.string.buffer
- + *emitter->output.string.size_written, buffer, size);
- *emitter->output.string.size_written += size;
- return 1;
-}
-
-/*
- * File write handler.
- */
-
-static int
-yaml_file_write_handler(void *data, unsigned char *buffer, size_t size)
-{
- yaml_emitter_t *emitter = (yaml_emitter_t *)data;
-
- return (fwrite(buffer, 1, size, emitter->output.file) == size);
-}
-/*
- * Set a string output.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output_string(yaml_emitter_t *emitter,
- unsigned char *output, size_t size, size_t *size_written)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
- assert(!emitter->write_handler); /* You can set the output only once. */
- assert(output); /* Non-NULL output string expected. */
-
- emitter->write_handler = yaml_string_write_handler;
- emitter->write_handler_data = emitter;
-
- emitter->output.string.buffer = output;
- emitter->output.string.size = size;
- emitter->output.string.size_written = size_written;
- *size_written = 0;
-}
-
-/*
- * Set a file output.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output_file(yaml_emitter_t *emitter, FILE *file)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
- assert(!emitter->write_handler); /* You can set the output only once. */
- assert(file); /* Non-NULL file object expected. */
-
- emitter->write_handler = yaml_file_write_handler;
- emitter->write_handler_data = emitter;
-
- emitter->output.file = file;
-}
-
-/*
- * Set a generic output handler.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output(yaml_emitter_t *emitter,
- yaml_write_handler_t *handler, void *data)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
- assert(!emitter->write_handler); /* You can set the output only once. */
- assert(handler); /* Non-NULL handler object expected. */
-
- emitter->write_handler = handler;
- emitter->write_handler_data = data;
-}
-
-/*
- * Set the output encoding.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_encoding(yaml_emitter_t *emitter, yaml_encoding_t encoding)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
- assert(!emitter->encoding); /* You can set encoding only once. */
-
- emitter->encoding = encoding;
-}
-
-/*
- * Set the canonical output style.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- emitter->canonical = (canonical != 0);
-}
-
-/*
- * Set the indentation increment.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- emitter->best_indent = (1 < indent && indent < 10) ? indent : 2;
-}
-
-/*
- * Set the preferred line width.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_width(yaml_emitter_t *emitter, int width)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- emitter->best_width = (width >= 0) ? width : -1;
-}
-
-/*
- * Set if unescaped non-ASCII characters are allowed.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_unicode(yaml_emitter_t *emitter, int unicode)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- emitter->unicode = (unicode != 0);
-}
-
-/*
- * Set the preferred line break character.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_break(yaml_emitter_t *emitter, yaml_break_t line_break)
-{
- assert(emitter); /* Non-NULL emitter object expected. */
-
- emitter->line_break = line_break;
-}
-
-/*
- * Destroy a token object.
- */
-
-YAML_DECLARE(void)
-yaml_token_delete(yaml_token_t *token)
-{
- assert(token); /* Non-NULL token object expected. */
-
- switch (token->type)
- {
- case YAML_TAG_DIRECTIVE_TOKEN:
- yaml_free(token->data.tag_directive.handle);
- yaml_free(token->data.tag_directive.prefix);
- break;
-
- case YAML_ALIAS_TOKEN:
- yaml_free(token->data.alias.value);
- break;
-
- case YAML_ANCHOR_TOKEN:
- yaml_free(token->data.anchor.value);
- break;
-
- case YAML_TAG_TOKEN:
- yaml_free(token->data.tag.handle);
- yaml_free(token->data.tag.suffix);
- break;
-
- case YAML_SCALAR_TOKEN:
- yaml_free(token->data.scalar.value);
- break;
-
- default:
- break;
- }
-
- memset(token, 0, sizeof(yaml_token_t));
-}
-
-/*
- * Check if a string is a valid UTF-8 sequence.
- *
- * Check 'reader.c' for more details on UTF-8 encoding.
- */
-
-static int
-yaml_check_utf8(yaml_char_t *start, size_t length)
-{
- yaml_char_t *end = start+length;
- yaml_char_t *pointer = start;
-
- while (pointer < end) {
- unsigned char octet;
- unsigned int width;
- unsigned int value;
- size_t k;
-
- octet = pointer[0];
- width = (octet & 0x80) == 0x00 ? 1 :
- (octet & 0xE0) == 0xC0 ? 2 :
- (octet & 0xF0) == 0xE0 ? 3 :
- (octet & 0xF8) == 0xF0 ? 4 : 0;
- value = (octet & 0x80) == 0x00 ? octet & 0x7F :
- (octet & 0xE0) == 0xC0 ? octet & 0x1F :
- (octet & 0xF0) == 0xE0 ? octet & 0x0F :
- (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
- if (!width) return 0;
- if (pointer+width > end) return 0;
- for (k = 1; k < width; k ++) {
- octet = pointer[k];
- if ((octet & 0xC0) != 0x80) return 0;
- value = (value << 6) + (octet & 0x3F);
- }
- if (!((width == 1) ||
- (width == 2 && value >= 0x80) ||
- (width == 3 && value >= 0x800) ||
- (width == 4 && value >= 0x10000))) return 0;
-
- pointer += width;
- }
-
- return 1;
-}
-
-/*
- * Create STREAM-START.
- */
-
-YAML_DECLARE(int)
-yaml_stream_start_event_initialize(yaml_event_t *event,
- yaml_encoding_t encoding)
-{
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(event); /* Non-NULL event object is expected. */
-
- STREAM_START_EVENT_INIT(*event, encoding, mark, mark);
-
- return 1;
-}
-
-/*
- * Create STREAM-END.
- */
-
-YAML_DECLARE(int)
-yaml_stream_end_event_initialize(yaml_event_t *event)
-{
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(event); /* Non-NULL event object is expected. */
-
- STREAM_END_EVENT_INIT(*event, mark, mark);
-
- return 1;
-}
-
-/*
- * Create DOCUMENT-START.
- */
-
-YAML_DECLARE(int)
-yaml_document_start_event_initialize(yaml_event_t *event,
- yaml_version_directive_t *version_directive,
- yaml_tag_directive_t *tag_directives_start,
- yaml_tag_directive_t *tag_directives_end,
- int implicit)
-{
- struct {
- yaml_error_type_t error;
- } context;
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_version_directive_t *version_directive_copy = NULL;
- struct {
- yaml_tag_directive_t *start;
- yaml_tag_directive_t *end;
- yaml_tag_directive_t *top;
- } tag_directives_copy = { NULL, NULL, NULL };
- yaml_tag_directive_t value = { NULL, NULL };
-
- assert(event); /* Non-NULL event object is expected. */
- assert((tag_directives_start && tag_directives_end) ||
- (tag_directives_start == tag_directives_end));
- /* Valid tag directives are expected. */
-
- if (version_directive) {
- version_directive_copy = YAML_MALLOC_STATIC(yaml_version_directive_t);
- if (!version_directive_copy) goto error;
- version_directive_copy->major = version_directive->major;
- version_directive_copy->minor = version_directive->minor;
- }
-
- if (tag_directives_start != tag_directives_end) {
- yaml_tag_directive_t *tag_directive;
- if (!STACK_INIT(&context, tag_directives_copy, yaml_tag_directive_t*))
- goto error;
- for (tag_directive = tag_directives_start;
- tag_directive != tag_directives_end; tag_directive ++) {
- assert(tag_directive->handle);
- assert(tag_directive->prefix);
- if (!yaml_check_utf8(tag_directive->handle,
- strlen((char *)tag_directive->handle)))
- goto error;
- if (!yaml_check_utf8(tag_directive->prefix,
- strlen((char *)tag_directive->prefix)))
- goto error;
- value.handle = yaml_strdup(tag_directive->handle);
- value.prefix = yaml_strdup(tag_directive->prefix);
- if (!value.handle || !value.prefix) goto error;
- if (!PUSH(&context, tag_directives_copy, value))
- goto error;
- value.handle = NULL;
- value.prefix = NULL;
- }
- }
-
- DOCUMENT_START_EVENT_INIT(*event, version_directive_copy,
- tag_directives_copy.start, tag_directives_copy.top,
- implicit, mark, mark);
-
- return 1;
-
-error:
- yaml_free(version_directive_copy);
- while (!STACK_EMPTY(context, tag_directives_copy)) {
- yaml_tag_directive_t value = POP(context, tag_directives_copy);
- yaml_free(value.handle);
- yaml_free(value.prefix);
- }
- STACK_DEL(context, tag_directives_copy);
- yaml_free(value.handle);
- yaml_free(value.prefix);
-
- return 0;
-}
-
-/*
- * Create DOCUMENT-END.
- */
-
-YAML_DECLARE(int)
-yaml_document_end_event_initialize(yaml_event_t *event, int implicit)
-{
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(event); /* Non-NULL emitter object is expected. */
-
- DOCUMENT_END_EVENT_INIT(*event, implicit, mark, mark);
-
- return 1;
-}
-
-/*
- * Create ALIAS.
- */
-
-YAML_DECLARE(int)
-yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor)
-{
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *anchor_copy = NULL;
-
- assert(event); /* Non-NULL event object is expected. */
- assert(anchor); /* Non-NULL anchor is expected. */
-
- if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0;
-
- anchor_copy = yaml_strdup(anchor);
- if (!anchor_copy)
- return 0;
-
- ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark);
-
- return 1;
-}
-
-/*
- * Create SCALAR.
- */
-
-YAML_DECLARE(int)
-yaml_scalar_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag,
- yaml_char_t *value, int length,
- int plain_implicit, int quoted_implicit,
- yaml_scalar_style_t style)
-{
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *anchor_copy = NULL;
- yaml_char_t *tag_copy = NULL;
- yaml_char_t *value_copy = NULL;
-
- assert(event); /* Non-NULL event object is expected. */
- assert(value); /* Non-NULL anchor is expected. */
-
- if (anchor) {
- if (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
- anchor_copy = yaml_strdup(anchor);
- if (!anchor_copy) goto error;
- }
-
- if (tag) {
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
- }
-
- if (length < 0) {
- length = (int)strlen((char *)value);
- }
-
- if (!yaml_check_utf8(value, length)) goto error;
- value_copy = YAML_MALLOC(length+1);
- if (!value_copy) goto error;
- memcpy(value_copy, value, length);
- value_copy[length] = '\0';
-
- SCALAR_EVENT_INIT(*event, anchor_copy, tag_copy, value_copy, length,
- plain_implicit, quoted_implicit, style, mark, mark);
-
- return 1;
-
-error:
- yaml_free(anchor_copy);
- yaml_free(tag_copy);
- yaml_free(value_copy);
-
- return 0;
-}
-
-/*
- * Create SEQUENCE-START.
- */
-
-YAML_DECLARE(int)
-yaml_sequence_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
- yaml_sequence_style_t style)
-{
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *anchor_copy = NULL;
- yaml_char_t *tag_copy = NULL;
-
- assert(event); /* Non-NULL event object is expected. */
-
- if (anchor) {
- if (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
- anchor_copy = yaml_strdup(anchor);
- if (!anchor_copy) goto error;
- }
-
- if (tag) {
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
- }
-
- SEQUENCE_START_EVENT_INIT(*event, anchor_copy, tag_copy,
- implicit, style, mark, mark);
-
- return 1;
-
-error:
- yaml_free(anchor_copy);
- yaml_free(tag_copy);
-
- return 0;
-}
-
-/*
- * Create SEQUENCE-END.
- */
-
-YAML_DECLARE(int)
-yaml_sequence_end_event_initialize(yaml_event_t *event)
-{
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(event); /* Non-NULL event object is expected. */
-
- SEQUENCE_END_EVENT_INIT(*event, mark, mark);
-
- return 1;
-}
-
-/*
- * Create MAPPING-START.
- */
-
-YAML_DECLARE(int)
-yaml_mapping_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
- yaml_mapping_style_t style)
-{
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *anchor_copy = NULL;
- yaml_char_t *tag_copy = NULL;
-
- assert(event); /* Non-NULL event object is expected. */
-
- if (anchor) {
- if (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
- anchor_copy = yaml_strdup(anchor);
- if (!anchor_copy) goto error;
- }
-
- if (tag) {
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
- }
-
- MAPPING_START_EVENT_INIT(*event, anchor_copy, tag_copy,
- implicit, style, mark, mark);
-
- return 1;
-
-error:
- yaml_free(anchor_copy);
- yaml_free(tag_copy);
-
- return 0;
-}
-
-/*
- * Create MAPPING-END.
- */
-
-YAML_DECLARE(int)
-yaml_mapping_end_event_initialize(yaml_event_t *event)
-{
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(event); /* Non-NULL event object is expected. */
-
- MAPPING_END_EVENT_INIT(*event, mark, mark);
-
- return 1;
-}
-
-/*
- * Destroy an event object.
- */
-
-YAML_DECLARE(void)
-yaml_event_delete(yaml_event_t *event)
-{
- yaml_tag_directive_t *tag_directive;
-
- assert(event); /* Non-NULL event object expected. */
-
- switch (event->type)
- {
- case YAML_DOCUMENT_START_EVENT:
- yaml_free(event->data.document_start.version_directive);
- for (tag_directive = event->data.document_start.tag_directives.start;
- tag_directive != event->data.document_start.tag_directives.end;
- tag_directive++) {
- yaml_free(tag_directive->handle);
- yaml_free(tag_directive->prefix);
- }
- yaml_free(event->data.document_start.tag_directives.start);
- break;
-
- case YAML_ALIAS_EVENT:
- yaml_free(event->data.alias.anchor);
- break;
-
- case YAML_SCALAR_EVENT:
- yaml_free(event->data.scalar.anchor);
- yaml_free(event->data.scalar.tag);
- yaml_free(event->data.scalar.value);
- break;
-
- case YAML_SEQUENCE_START_EVENT:
- yaml_free(event->data.sequence_start.anchor);
- yaml_free(event->data.sequence_start.tag);
- break;
-
- case YAML_MAPPING_START_EVENT:
- yaml_free(event->data.mapping_start.anchor);
- yaml_free(event->data.mapping_start.tag);
- break;
-
- default:
- break;
- }
-
- memset(event, 0, sizeof(yaml_event_t));
-}
-
-/*
- * Create a document object.
- */
-
-YAML_DECLARE(int)
-yaml_document_initialize(yaml_document_t *document,
- yaml_version_directive_t *version_directive,
- yaml_tag_directive_t *tag_directives_start,
- yaml_tag_directive_t *tag_directives_end,
- int start_implicit, int end_implicit)
-{
- struct {
- yaml_error_type_t error;
- } context;
- struct {
- yaml_node_t *start;
- yaml_node_t *end;
- yaml_node_t *top;
- } nodes = { NULL, NULL, NULL };
- yaml_version_directive_t *version_directive_copy = NULL;
- struct {
- yaml_tag_directive_t *start;
- yaml_tag_directive_t *end;
- yaml_tag_directive_t *top;
- } tag_directives_copy = { NULL, NULL, NULL };
- yaml_tag_directive_t value = { NULL, NULL };
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(document); /* Non-NULL document object is expected. */
- assert((tag_directives_start && tag_directives_end) ||
- (tag_directives_start == tag_directives_end));
- /* Valid tag directives are expected. */
-
- if (!STACK_INIT(&context, nodes, yaml_node_t*)) goto error;
-
- if (version_directive) {
- version_directive_copy = YAML_MALLOC_STATIC(yaml_version_directive_t);
- if (!version_directive_copy) goto error;
- version_directive_copy->major = version_directive->major;
- version_directive_copy->minor = version_directive->minor;
- }
-
- if (tag_directives_start != tag_directives_end) {
- yaml_tag_directive_t *tag_directive;
- if (!STACK_INIT(&context, tag_directives_copy, yaml_tag_directive_t*))
- goto error;
- for (tag_directive = tag_directives_start;
- tag_directive != tag_directives_end; tag_directive ++) {
- assert(tag_directive->handle);
- assert(tag_directive->prefix);
- if (!yaml_check_utf8(tag_directive->handle,
- strlen((char *)tag_directive->handle)))
- goto error;
- if (!yaml_check_utf8(tag_directive->prefix,
- strlen((char *)tag_directive->prefix)))
- goto error;
- value.handle = yaml_strdup(tag_directive->handle);
- value.prefix = yaml_strdup(tag_directive->prefix);
- if (!value.handle || !value.prefix) goto error;
- if (!PUSH(&context, tag_directives_copy, value))
- goto error;
- value.handle = NULL;
- value.prefix = NULL;
- }
- }
-
- DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy,
- tag_directives_copy.start, tag_directives_copy.top,
- start_implicit, end_implicit, mark, mark);
-
- return 1;
-
-error:
- STACK_DEL(&context, nodes);
- yaml_free(version_directive_copy);
- while (!STACK_EMPTY(&context, tag_directives_copy)) {
- yaml_tag_directive_t value = POP(&context, tag_directives_copy);
- yaml_free(value.handle);
- yaml_free(value.prefix);
- }
- STACK_DEL(&context, tag_directives_copy);
- yaml_free(value.handle);
- yaml_free(value.prefix);
-
- return 0;
-}
-
-/*
- * Destroy a document object.
- */
-
-YAML_DECLARE(void)
-yaml_document_delete(yaml_document_t *document)
-{
- struct {
- yaml_error_type_t error;
- } context;
- yaml_tag_directive_t *tag_directive;
-
- /* Eliminate a compliler warning. */
- context.error = YAML_NO_ERROR;
- (void)context.error;
-
- assert(document); /* Non-NULL document object is expected. */
-
- while (!STACK_EMPTY(&context, document->nodes)) {
- yaml_node_t node = POP(&context, document->nodes);
- yaml_free(node.tag);
- switch (node.type) {
- case YAML_SCALAR_NODE:
- yaml_free(node.data.scalar.value);
- break;
- case YAML_SEQUENCE_NODE:
- STACK_DEL(&context, node.data.sequence.items);
- break;
- case YAML_MAPPING_NODE:
- STACK_DEL(&context, node.data.mapping.pairs);
- break;
- default:
- assert(0); /* Should not happen. */
- }
- }
- STACK_DEL(&context, document->nodes);
-
- yaml_free(document->version_directive);
- for (tag_directive = document->tag_directives.start;
- tag_directive != document->tag_directives.end;
- tag_directive++) {
- yaml_free(tag_directive->handle);
- yaml_free(tag_directive->prefix);
- }
- yaml_free(document->tag_directives.start);
-
- memset(document, 0, sizeof(yaml_document_t));
-}
-
-/**
- * Get a document node.
- */
-
-YAML_DECLARE(yaml_node_t *)
-yaml_document_get_node(yaml_document_t *document, int index)
-{
- assert(document); /* Non-NULL document object is expected. */
-
- if (index > 0 && document->nodes.start + index <= document->nodes.top) {
- return document->nodes.start + index - 1;
- }
- return NULL;
-}
-
-/**
- * Get the root object.
- */
-
-YAML_DECLARE(yaml_node_t *)
-yaml_document_get_root_node(yaml_document_t *document)
-{
- assert(document); /* Non-NULL document object is expected. */
-
- if (document->nodes.top != document->nodes.start) {
- return document->nodes.start;
- }
- return NULL;
-}
-
-/*
- * Add a scalar node to a document.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_scalar(yaml_document_t *document,
- yaml_char_t *tag, yaml_char_t *value, int length,
- yaml_scalar_style_t style)
-{
- struct {
- yaml_error_type_t error;
- } context;
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *tag_copy = NULL;
- yaml_char_t *value_copy = NULL;
- yaml_node_t node;
-
- assert(document); /* Non-NULL document object is expected. */
- assert(value); /* Non-NULL value is expected. */
-
- if (!tag) {
- tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG;
- }
-
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
-
- if (length < 0) {
- length = (int)strlen((char *)value);
- }
-
- if (!yaml_check_utf8(value, length)) goto error;
- value_copy = YAML_MALLOC(length+1);
- if (!value_copy) goto error;
- memcpy(value_copy, value, length);
- value_copy[length] = '\0';
-
- SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark);
- if (!PUSH(&context, document->nodes, node)) goto error;
-
- return (int)(document->nodes.top - document->nodes.start);
-
-error:
- yaml_free(tag_copy);
- yaml_free(value_copy);
-
- return 0;
-}
-
-/*
- * Add a sequence node to a document.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_sequence(yaml_document_t *document,
- yaml_char_t *tag, yaml_sequence_style_t style)
-{
- struct {
- yaml_error_type_t error;
- } context;
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *tag_copy = NULL;
- struct {
- yaml_node_item_t *start;
- yaml_node_item_t *end;
- yaml_node_item_t *top;
- } items = { NULL, NULL, NULL };
- yaml_node_t node;
-
- assert(document); /* Non-NULL document object is expected. */
-
- if (!tag) {
- tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG;
- }
-
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
-
- if (!STACK_INIT(&context, items, yaml_node_item_t*)) goto error;
-
- SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end,
- style, mark, mark);
- if (!PUSH(&context, document->nodes, node)) goto error;
-
- return (int)(document->nodes.top - document->nodes.start);
-
-error:
- STACK_DEL(&context, items);
- yaml_free(tag_copy);
-
- return 0;
-}
-
-/*
- * Add a mapping node to a document.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_mapping(yaml_document_t *document,
- yaml_char_t *tag, yaml_mapping_style_t style)
-{
- struct {
- yaml_error_type_t error;
- } context;
- yaml_mark_t mark = { 0, 0, 0 };
- yaml_char_t *tag_copy = NULL;
- struct {
- yaml_node_pair_t *start;
- yaml_node_pair_t *end;
- yaml_node_pair_t *top;
- } pairs = { NULL, NULL, NULL };
- yaml_node_t node;
-
- assert(document); /* Non-NULL document object is expected. */
-
- if (!tag) {
- tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG;
- }
-
- if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
- tag_copy = yaml_strdup(tag);
- if (!tag_copy) goto error;
-
- if (!STACK_INIT(&context, pairs, yaml_node_pair_t*)) goto error;
-
- MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end,
- style, mark, mark);
- if (!PUSH(&context, document->nodes, node)) goto error;
-
- return (int)(document->nodes.top - document->nodes.start);
-
-error:
- STACK_DEL(&context, pairs);
- yaml_free(tag_copy);
-
- return 0;
-}
-
-/*
- * Append an item to a sequence node.
- */
-
-YAML_DECLARE(int)
-yaml_document_append_sequence_item(yaml_document_t *document,
- int sequence, int item)
-{
- struct {
- yaml_error_type_t error;
- } context;
-
- assert(document); /* Non-NULL document is required. */
- assert(sequence > 0
- && document->nodes.start + sequence <= document->nodes.top);
- /* Valid sequence id is required. */
- assert(document->nodes.start[sequence-1].type == YAML_SEQUENCE_NODE);
- /* A sequence node is required. */
- assert(item > 0 && document->nodes.start + item <= document->nodes.top);
- /* Valid item id is required. */
-
- if (!PUSH(&context,
- document->nodes.start[sequence-1].data.sequence.items, item))
- return 0;
-
- return 1;
-}
-
-/*
- * Append a pair of a key and a value to a mapping node.
- */
-
-YAML_DECLARE(int)
-yaml_document_append_mapping_pair(yaml_document_t *document,
- int mapping, int key, int value)
-{
- struct {
- yaml_error_type_t error;
- } context;
-
- yaml_node_pair_t pair;
-
- assert(document); /* Non-NULL document is required. */
- assert(mapping > 0
- && document->nodes.start + mapping <= document->nodes.top);
- /* Valid mapping id is required. */
- assert(document->nodes.start[mapping-1].type == YAML_MAPPING_NODE);
- /* A mapping node is required. */
- assert(key > 0 && document->nodes.start + key <= document->nodes.top);
- /* Valid key id is required. */
- assert(value > 0 && document->nodes.start + value <= document->nodes.top);
- /* Valid value id is required. */
-
- pair.key = key;
- pair.value = value;
-
- if (!PUSH(&context,
- document->nodes.start[mapping-1].data.mapping.pairs, pair))
- return 0;
-
- return 1;
-}
-
-
diff --git a/ext/psych/yaml/config.h b/ext/psych/yaml/config.h
deleted file mode 100644
index da905133ff..0000000000
--- a/ext/psych/yaml/config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#define PACKAGE_NAME "yaml"
-#define PACKAGE_TARNAME "yaml"
-#define PACKAGE_VERSION "0.2.1"
-#define PACKAGE_STRING "yaml 0.2.1"
-#define PACKAGE_BUGREPORT "https://github.com/yaml/libyaml/issues"
-#define PACKAGE_URL "https://github.com/yaml/libyaml"
-#define YAML_VERSION_MAJOR 0
-#define YAML_VERSION_MINOR 2
-#define YAML_VERSION_PATCH 1
-#define YAML_VERSION_STRING "0.2.1"
diff --git a/ext/psych/yaml/dumper.c b/ext/psych/yaml/dumper.c
deleted file mode 100644
index 29fb9c0784..0000000000
--- a/ext/psych/yaml/dumper.c
+++ /dev/null
@@ -1,394 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * API functions.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_open(yaml_emitter_t *emitter);
-
-YAML_DECLARE(int)
-yaml_emitter_close(yaml_emitter_t *emitter);
-
-YAML_DECLARE(int)
-yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document);
-
-/*
- * Clean up functions.
- */
-
-static void
-yaml_emitter_delete_document_and_anchors(yaml_emitter_t *emitter);
-
-/*
- * Anchor functions.
- */
-
-static void
-yaml_emitter_anchor_node(yaml_emitter_t *emitter, int index);
-
-static yaml_char_t *
-yaml_emitter_generate_anchor(yaml_emitter_t *emitter, int anchor_id);
-
-
-/*
- * Serialize functions.
- */
-
-static int
-yaml_emitter_dump_node(yaml_emitter_t *emitter, int index);
-
-static int
-yaml_emitter_dump_alias(yaml_emitter_t *emitter, yaml_char_t *anchor);
-
-static int
-yaml_emitter_dump_scalar(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor);
-
-static int
-yaml_emitter_dump_sequence(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor);
-
-static int
-yaml_emitter_dump_mapping(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor);
-
-/*
- * Issue a STREAM-START event.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_open(yaml_emitter_t *emitter)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(emitter); /* Non-NULL emitter object is required. */
- assert(!emitter->opened); /* Emitter should not be opened yet. */
-
- STREAM_START_EVENT_INIT(event, YAML_ANY_ENCODING, mark, mark);
-
- if (!yaml_emitter_emit(emitter, &event)) {
- return 0;
- }
-
- emitter->opened = 1;
-
- return 1;
-}
-
-/*
- * Issue a STREAM-END event.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_close(yaml_emitter_t *emitter)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(emitter); /* Non-NULL emitter object is required. */
- assert(emitter->opened); /* Emitter should be opened. */
-
- if (emitter->closed) return 1;
-
- STREAM_END_EVENT_INIT(event, mark, mark);
-
- if (!yaml_emitter_emit(emitter, &event)) {
- return 0;
- }
-
- emitter->closed = 1;
-
- return 1;
-}
-
-/*
- * Dump a YAML document.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- assert(emitter); /* Non-NULL emitter object is required. */
- assert(document); /* Non-NULL emitter object is expected. */
-
- emitter->document = document;
-
- if (!emitter->opened) {
- if (!yaml_emitter_open(emitter)) goto error;
- }
-
- if (STACK_EMPTY(emitter, document->nodes)) {
- if (!yaml_emitter_close(emitter)) goto error;
- yaml_emitter_delete_document_and_anchors(emitter);
- return 1;
- }
-
- assert(emitter->opened); /* Emitter should be opened. */
-
- emitter->anchors = yaml_malloc(sizeof(*(emitter->anchors))
- * (document->nodes.top - document->nodes.start));
- if (!emitter->anchors) goto error;
- memset(emitter->anchors, 0, sizeof(*(emitter->anchors))
- * (document->nodes.top - document->nodes.start));
-
- DOCUMENT_START_EVENT_INIT(event, document->version_directive,
- document->tag_directives.start, document->tag_directives.end,
- document->start_implicit, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) goto error;
-
- yaml_emitter_anchor_node(emitter, 1);
- if (!yaml_emitter_dump_node(emitter, 1)) goto error;
-
- DOCUMENT_END_EVENT_INIT(event, document->end_implicit, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) goto error;
-
- yaml_emitter_delete_document_and_anchors(emitter);
-
- return 1;
-
-error:
-
- yaml_emitter_delete_document_and_anchors(emitter);
-
- return 0;
-}
-
-/*
- * Clean up the emitter object after a document is dumped.
- */
-
-static void
-yaml_emitter_delete_document_and_anchors(yaml_emitter_t *emitter)
-{
- int index;
-
- if (!emitter->anchors) {
- yaml_document_delete(emitter->document);
- emitter->document = NULL;
- return;
- }
-
- for (index = 0; emitter->document->nodes.start + index
- < emitter->document->nodes.top; index ++) {
- yaml_node_t node = emitter->document->nodes.start[index];
- if (!emitter->anchors[index].serialized) {
- yaml_free(node.tag);
- if (node.type == YAML_SCALAR_NODE) {
- yaml_free(node.data.scalar.value);
- }
- }
- if (node.type == YAML_SEQUENCE_NODE) {
- STACK_DEL(emitter, node.data.sequence.items);
- }
- if (node.type == YAML_MAPPING_NODE) {
- STACK_DEL(emitter, node.data.mapping.pairs);
- }
- }
-
- STACK_DEL(emitter, emitter->document->nodes);
- yaml_free(emitter->anchors);
-
- emitter->anchors = NULL;
- emitter->last_anchor_id = 0;
- emitter->document = NULL;
-}
-
-/*
- * Check the references of a node and assign the anchor id if needed.
- */
-
-static void
-yaml_emitter_anchor_node(yaml_emitter_t *emitter, int index)
-{
- yaml_node_t *node = emitter->document->nodes.start + index - 1;
- yaml_node_item_t *item;
- yaml_node_pair_t *pair;
-
- emitter->anchors[index-1].references ++;
-
- if (emitter->anchors[index-1].references == 1) {
- switch (node->type) {
- case YAML_SEQUENCE_NODE:
- for (item = node->data.sequence.items.start;
- item < node->data.sequence.items.top; item ++) {
- yaml_emitter_anchor_node(emitter, *item);
- }
- break;
- case YAML_MAPPING_NODE:
- for (pair = node->data.mapping.pairs.start;
- pair < node->data.mapping.pairs.top; pair ++) {
- yaml_emitter_anchor_node(emitter, pair->key);
- yaml_emitter_anchor_node(emitter, pair->value);
- }
- break;
- default:
- break;
- }
- }
-
- else if (emitter->anchors[index-1].references == 2) {
- emitter->anchors[index-1].anchor = (++ emitter->last_anchor_id);
- }
-}
-
-/*
- * Generate a textual representation for an anchor.
- */
-
-#define ANCHOR_TEMPLATE "id%03d"
-#define ANCHOR_TEMPLATE_LENGTH 16
-
-static yaml_char_t *
-yaml_emitter_generate_anchor(SHIM(yaml_emitter_t *emitter), int anchor_id)
-{
- yaml_char_t *anchor = YAML_MALLOC(ANCHOR_TEMPLATE_LENGTH);
-
- if (!anchor) return NULL;
-
- sprintf((char *)anchor, ANCHOR_TEMPLATE, anchor_id);
-
- return anchor;
-}
-
-/*
- * Serialize a node.
- */
-
-static int
-yaml_emitter_dump_node(yaml_emitter_t *emitter, int index)
-{
- yaml_node_t *node = emitter->document->nodes.start + index - 1;
- int anchor_id = emitter->anchors[index-1].anchor;
- yaml_char_t *anchor = NULL;
-
- if (anchor_id) {
- anchor = yaml_emitter_generate_anchor(emitter, anchor_id);
- if (!anchor) return 0;
- }
-
- if (emitter->anchors[index-1].serialized) {
- return yaml_emitter_dump_alias(emitter, anchor);
- }
-
- emitter->anchors[index-1].serialized = 1;
-
- switch (node->type) {
- case YAML_SCALAR_NODE:
- return yaml_emitter_dump_scalar(emitter, node, anchor);
- case YAML_SEQUENCE_NODE:
- return yaml_emitter_dump_sequence(emitter, node, anchor);
- case YAML_MAPPING_NODE:
- return yaml_emitter_dump_mapping(emitter, node, anchor);
- default:
- assert(0); /* Could not happen. */
- break;
- }
-
- return 0; /* Could not happen. */
-}
-
-/*
- * Serialize an alias.
- */
-
-static int
-yaml_emitter_dump_alias(yaml_emitter_t *emitter, yaml_char_t *anchor)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- ALIAS_EVENT_INIT(event, anchor, mark, mark);
-
- return yaml_emitter_emit(emitter, &event);
-}
-
-/*
- * Serialize a scalar.
- */
-
-static int
-yaml_emitter_dump_scalar(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- int plain_implicit = (strcmp((char *)node->tag,
- YAML_DEFAULT_SCALAR_TAG) == 0);
- int quoted_implicit = (strcmp((char *)node->tag,
- YAML_DEFAULT_SCALAR_TAG) == 0);
-
- SCALAR_EVENT_INIT(event, anchor, node->tag, node->data.scalar.value,
- node->data.scalar.length, plain_implicit, quoted_implicit,
- node->data.scalar.style, mark, mark);
-
- return yaml_emitter_emit(emitter, &event);
-}
-
-/*
- * Serialize a sequence.
- */
-
-static int
-yaml_emitter_dump_sequence(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- int implicit = (strcmp((char *)node->tag, YAML_DEFAULT_SEQUENCE_TAG) == 0);
-
- yaml_node_item_t *item;
-
- SEQUENCE_START_EVENT_INIT(event, anchor, node->tag, implicit,
- node->data.sequence.style, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) return 0;
-
- for (item = node->data.sequence.items.start;
- item < node->data.sequence.items.top; item ++) {
- if (!yaml_emitter_dump_node(emitter, *item)) return 0;
- }
-
- SEQUENCE_END_EVENT_INIT(event, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) return 0;
-
- return 1;
-}
-
-/*
- * Serialize a mapping.
- */
-
-static int
-yaml_emitter_dump_mapping(yaml_emitter_t *emitter, yaml_node_t *node,
- yaml_char_t *anchor)
-{
- yaml_event_t event;
- yaml_mark_t mark = { 0, 0, 0 };
-
- int implicit = (strcmp((char *)node->tag, YAML_DEFAULT_MAPPING_TAG) == 0);
-
- yaml_node_pair_t *pair;
-
- MAPPING_START_EVENT_INIT(event, anchor, node->tag, implicit,
- node->data.mapping.style, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) return 0;
-
- for (pair = node->data.mapping.pairs.start;
- pair < node->data.mapping.pairs.top; pair ++) {
- if (!yaml_emitter_dump_node(emitter, pair->key)) return 0;
- if (!yaml_emitter_dump_node(emitter, pair->value)) return 0;
- }
-
- MAPPING_END_EVENT_INIT(event, mark, mark);
- if (!yaml_emitter_emit(emitter, &event)) return 0;
-
- return 1;
-}
-
diff --git a/ext/psych/yaml/emitter.c b/ext/psych/yaml/emitter.c
deleted file mode 100644
index 92e21cdb73..0000000000
--- a/ext/psych/yaml/emitter.c
+++ /dev/null
@@ -1,2324 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * Flush the buffer if needed.
- */
-
-#define FLUSH(emitter) \
- ((emitter->buffer.pointer+5 < emitter->buffer.end) \
- || yaml_emitter_flush(emitter))
-
-/*
- * Put a character to the output buffer.
- */
-
-#define PUT(emitter,value) \
- (FLUSH(emitter) \
- && (*(emitter->buffer.pointer++) = (yaml_char_t)(value), \
- emitter->column ++, \
- 1))
-
-/*
- * Put a line break to the output buffer.
- */
-
-#define PUT_BREAK(emitter) \
- (FLUSH(emitter) ? \
- ((emitter->line_break == YAML_CR_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\r') : \
- emitter->line_break == YAML_LN_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\n') : \
- emitter->line_break == YAML_CRLN_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\r', \
- *(emitter->buffer.pointer++) = (yaml_char_t) '\n') : 0), \
- emitter->column = 0, \
- emitter->line ++, \
- 1) : 0)
-
-/*
- * Copy a character from a string into buffer.
- */
-
-#define WRITE(emitter,string) \
- (FLUSH(emitter) \
- && (COPY(emitter->buffer,string), \
- emitter->column ++, \
- 1))
-
-/*
- * Copy a line break character from a string into buffer.
- */
-
-#define WRITE_BREAK(emitter,string) \
- (FLUSH(emitter) \
- && (CHECK(string,'\n') ? \
- (PUT_BREAK(emitter), \
- string.pointer ++, \
- 1) : \
- (COPY(emitter->buffer,string), \
- emitter->column = 0, \
- emitter->line ++, \
- 1)))
-
-/*
- * API functions.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event);
-
-/*
- * Utility functions.
- */
-
-static int
-yaml_emitter_set_emitter_error(yaml_emitter_t *emitter, const char *problem);
-
-static int
-yaml_emitter_need_more_events(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_append_tag_directive(yaml_emitter_t *emitter,
- yaml_tag_directive_t value, int allow_duplicates);
-
-static int
-yaml_emitter_increase_indent(yaml_emitter_t *emitter,
- int flow, int indentless);
-
-/*
- * State functions.
- */
-
-static int
-yaml_emitter_state_machine(yaml_emitter_t *emitter, yaml_event_t *event);
-
-static int
-yaml_emitter_emit_stream_start(yaml_emitter_t *emitter,
- yaml_event_t *event);
-
-static int
-yaml_emitter_emit_document_start(yaml_emitter_t *emitter,
- yaml_event_t *event, int first);
-
-static int
-yaml_emitter_emit_document_content(yaml_emitter_t *emitter,
- yaml_event_t *event);
-
-static int
-yaml_emitter_emit_document_end(yaml_emitter_t *emitter,
- yaml_event_t *event);
-
-static int
-yaml_emitter_emit_flow_sequence_item(yaml_emitter_t *emitter,
- yaml_event_t *event, int first);
-
-static int
-yaml_emitter_emit_flow_mapping_key(yaml_emitter_t *emitter,
- yaml_event_t *event, int first);
-
-static int
-yaml_emitter_emit_flow_mapping_value(yaml_emitter_t *emitter,
- yaml_event_t *event, int simple);
-
-static int
-yaml_emitter_emit_block_sequence_item(yaml_emitter_t *emitter,
- yaml_event_t *event, int first);
-
-static int
-yaml_emitter_emit_block_mapping_key(yaml_emitter_t *emitter,
- yaml_event_t *event, int first);
-
-static int
-yaml_emitter_emit_block_mapping_value(yaml_emitter_t *emitter,
- yaml_event_t *event, int simple);
-
-static int
-yaml_emitter_emit_node(yaml_emitter_t *emitter, yaml_event_t *event,
- int root, int sequence, int mapping, int simple_key);
-
-static int
-yaml_emitter_emit_alias(yaml_emitter_t *emitter, yaml_event_t *event);
-
-static int
-yaml_emitter_emit_scalar(yaml_emitter_t *emitter, yaml_event_t *event);
-
-static int
-yaml_emitter_emit_sequence_start(yaml_emitter_t *emitter, yaml_event_t *event);
-
-static int
-yaml_emitter_emit_mapping_start(yaml_emitter_t *emitter, yaml_event_t *event);
-
-/*
- * Checkers.
- */
-
-static int
-yaml_emitter_check_empty_document(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_check_empty_sequence(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_check_empty_mapping(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_check_simple_key(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_select_scalar_style(yaml_emitter_t *emitter, yaml_event_t *event);
-
-/*
- * Processors.
- */
-
-static int
-yaml_emitter_process_anchor(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_process_tag(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_process_scalar(yaml_emitter_t *emitter);
-
-/*
- * Analyzers.
- */
-
-static int
-yaml_emitter_analyze_version_directive(yaml_emitter_t *emitter,
- yaml_version_directive_t version_directive);
-
-static int
-yaml_emitter_analyze_tag_directive(yaml_emitter_t *emitter,
- yaml_tag_directive_t tag_directive);
-
-static int
-yaml_emitter_analyze_anchor(yaml_emitter_t *emitter,
- yaml_char_t *anchor, int alias);
-
-static int
-yaml_emitter_analyze_tag(yaml_emitter_t *emitter,
- yaml_char_t *tag);
-
-static int
-yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length);
-
-static int
-yaml_emitter_analyze_event(yaml_emitter_t *emitter,
- yaml_event_t *event);
-
-/*
- * Writers.
- */
-
-static int
-yaml_emitter_write_bom(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_write_indent(yaml_emitter_t *emitter);
-
-static int
-yaml_emitter_write_indicator(yaml_emitter_t *emitter,
- const char *indicator, int need_whitespace,
- int is_whitespace, int is_indention);
-
-static int
-yaml_emitter_write_anchor(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length);
-
-static int
-yaml_emitter_write_tag_handle(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length);
-
-static int
-yaml_emitter_write_tag_content(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int need_whitespace);
-
-static int
-yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks);
-
-static int
-yaml_emitter_write_single_quoted_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks);
-
-static int
-yaml_emitter_write_double_quoted_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks);
-
-static int
-yaml_emitter_write_block_scalar_hints(yaml_emitter_t *emitter,
- yaml_string_t string);
-
-static int
-yaml_emitter_write_literal_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length);
-
-static int
-yaml_emitter_write_folded_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length);
-
-/*
- * Set an emitter error and return 0.
- */
-
-static int
-yaml_emitter_set_emitter_error(yaml_emitter_t *emitter, const char *problem)
-{
- emitter->error = YAML_EMITTER_ERROR;
- emitter->problem = problem;
-
- return 0;
-}
-
-/*
- * Emit an event.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- if (!ENQUEUE(emitter, emitter->events, *event)) {
- yaml_event_delete(event);
- return 0;
- }
-
- while (!yaml_emitter_need_more_events(emitter)) {
- if (!yaml_emitter_analyze_event(emitter, emitter->events.head))
- return 0;
- if (!yaml_emitter_state_machine(emitter, emitter->events.head))
- return 0;
- yaml_event_delete(&DEQUEUE(emitter, emitter->events));
- }
-
- return 1;
-}
-
-/*
- * Check if we need to accumulate more events before emitting.
- *
- * We accumulate extra
- * - 1 event for DOCUMENT-START
- * - 2 events for SEQUENCE-START
- * - 3 events for MAPPING-START
- */
-
-static int
-yaml_emitter_need_more_events(yaml_emitter_t *emitter)
-{
- int level = 0;
- int accumulate = 0;
- yaml_event_t *event;
-
- if (QUEUE_EMPTY(emitter, emitter->events))
- return 1;
-
- switch (emitter->events.head->type) {
- case YAML_DOCUMENT_START_EVENT:
- accumulate = 1;
- break;
- case YAML_SEQUENCE_START_EVENT:
- accumulate = 2;
- break;
- case YAML_MAPPING_START_EVENT:
- accumulate = 3;
- break;
- default:
- return 0;
- }
-
- if (emitter->events.tail - emitter->events.head > accumulate)
- return 0;
-
- for (event = emitter->events.head; event != emitter->events.tail; event ++) {
- switch (event->type) {
- case YAML_STREAM_START_EVENT:
- case YAML_DOCUMENT_START_EVENT:
- case YAML_SEQUENCE_START_EVENT:
- case YAML_MAPPING_START_EVENT:
- level += 1;
- break;
- case YAML_STREAM_END_EVENT:
- case YAML_DOCUMENT_END_EVENT:
- case YAML_SEQUENCE_END_EVENT:
- case YAML_MAPPING_END_EVENT:
- level -= 1;
- break;
- default:
- break;
- }
- if (!level)
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Append a directive to the directives stack.
- */
-
-static int
-yaml_emitter_append_tag_directive(yaml_emitter_t *emitter,
- yaml_tag_directive_t value, int allow_duplicates)
-{
- yaml_tag_directive_t *tag_directive;
- yaml_tag_directive_t copy = { NULL, NULL };
-
- for (tag_directive = emitter->tag_directives.start;
- tag_directive != emitter->tag_directives.top; tag_directive ++) {
- if (strcmp((char *)value.handle, (char *)tag_directive->handle) == 0) {
- if (allow_duplicates)
- return 1;
- return yaml_emitter_set_emitter_error(emitter,
- "duplicate %TAG directive");
- }
- }
-
- copy.handle = yaml_strdup(value.handle);
- copy.prefix = yaml_strdup(value.prefix);
- if (!copy.handle || !copy.prefix) {
- emitter->error = YAML_MEMORY_ERROR;
- goto error;
- }
-
- if (!PUSH(emitter, emitter->tag_directives, copy))
- goto error;
-
- return 1;
-
-error:
- yaml_free(copy.handle);
- yaml_free(copy.prefix);
- return 0;
-}
-
-/*
- * Increase the indentation level.
- */
-
-static int
-yaml_emitter_increase_indent(yaml_emitter_t *emitter,
- int flow, int indentless)
-{
- if (!PUSH(emitter, emitter->indents, emitter->indent))
- return 0;
-
- if (emitter->indent < 0) {
- emitter->indent = flow ? emitter->best_indent : 0;
- }
- else if (!indentless) {
- emitter->indent += emitter->best_indent;
- }
-
- return 1;
-}
-
-/*
- * State dispatcher.
- */
-
-static int
-yaml_emitter_state_machine(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- switch (emitter->state)
- {
- case YAML_EMIT_STREAM_START_STATE:
- return yaml_emitter_emit_stream_start(emitter, event);
-
- case YAML_EMIT_FIRST_DOCUMENT_START_STATE:
- return yaml_emitter_emit_document_start(emitter, event, 1);
-
- case YAML_EMIT_DOCUMENT_START_STATE:
- return yaml_emitter_emit_document_start(emitter, event, 0);
-
- case YAML_EMIT_DOCUMENT_CONTENT_STATE:
- return yaml_emitter_emit_document_content(emitter, event);
-
- case YAML_EMIT_DOCUMENT_END_STATE:
- return yaml_emitter_emit_document_end(emitter, event);
-
- case YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE:
- return yaml_emitter_emit_flow_sequence_item(emitter, event, 1);
-
- case YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE:
- return yaml_emitter_emit_flow_sequence_item(emitter, event, 0);
-
- case YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE:
- return yaml_emitter_emit_flow_mapping_key(emitter, event, 1);
-
- case YAML_EMIT_FLOW_MAPPING_KEY_STATE:
- return yaml_emitter_emit_flow_mapping_key(emitter, event, 0);
-
- case YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE:
- return yaml_emitter_emit_flow_mapping_value(emitter, event, 1);
-
- case YAML_EMIT_FLOW_MAPPING_VALUE_STATE:
- return yaml_emitter_emit_flow_mapping_value(emitter, event, 0);
-
- case YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE:
- return yaml_emitter_emit_block_sequence_item(emitter, event, 1);
-
- case YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE:
- return yaml_emitter_emit_block_sequence_item(emitter, event, 0);
-
- case YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE:
- return yaml_emitter_emit_block_mapping_key(emitter, event, 1);
-
- case YAML_EMIT_BLOCK_MAPPING_KEY_STATE:
- return yaml_emitter_emit_block_mapping_key(emitter, event, 0);
-
- case YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE:
- return yaml_emitter_emit_block_mapping_value(emitter, event, 1);
-
- case YAML_EMIT_BLOCK_MAPPING_VALUE_STATE:
- return yaml_emitter_emit_block_mapping_value(emitter, event, 0);
-
- case YAML_EMIT_END_STATE:
- return yaml_emitter_set_emitter_error(emitter,
- "expected nothing after STREAM-END");
-
- default:
- assert(1); /* Invalid state. */
- }
-
- return 0;
-}
-
-/*
- * Expect STREAM-START.
- */
-
-static int
-yaml_emitter_emit_stream_start(yaml_emitter_t *emitter,
- yaml_event_t *event)
-{
- if (event->type == YAML_STREAM_START_EVENT)
- {
- if (!emitter->encoding) {
- emitter->encoding = event->data.stream_start.encoding;
- }
-
- if (!emitter->encoding) {
- emitter->encoding = YAML_UTF8_ENCODING;
- }
-
- if (emitter->best_indent < 2 || emitter->best_indent > 9) {
- emitter->best_indent = 2;
- }
-
- if (emitter->best_width >= 0
- && emitter->best_width <= emitter->best_indent*2) {
- emitter->best_width = 80;
- }
-
- if (emitter->best_width < 0) {
- emitter->best_width = INT_MAX;
- }
-
- if (!emitter->line_break) {
- emitter->line_break = YAML_LN_BREAK;
- }
-
- emitter->indent = -1;
-
- emitter->line = 0;
- emitter->column = 0;
- emitter->whitespace = 1;
- emitter->indention = 1;
-
- if (emitter->encoding != YAML_UTF8_ENCODING) {
- if (!yaml_emitter_write_bom(emitter))
- return 0;
- }
-
- emitter->state = YAML_EMIT_FIRST_DOCUMENT_START_STATE;
-
- return 1;
- }
-
- return yaml_emitter_set_emitter_error(emitter,
- "expected STREAM-START");
-}
-
-/*
- * Expect DOCUMENT-START or STREAM-END.
- */
-
-static int
-yaml_emitter_emit_document_start(yaml_emitter_t *emitter,
- yaml_event_t *event, int first)
-{
- if (event->type == YAML_DOCUMENT_START_EVENT)
- {
- yaml_tag_directive_t default_tag_directives[] = {
- {(yaml_char_t *)"!", (yaml_char_t *)"!"},
- {(yaml_char_t *)"!!", (yaml_char_t *)"tag:yaml.org,2002:"},
- {NULL, NULL}
- };
- yaml_tag_directive_t *tag_directive;
- int implicit;
-
- if (event->data.document_start.version_directive) {
- if (!yaml_emitter_analyze_version_directive(emitter,
- *event->data.document_start.version_directive))
- return 0;
- }
-
- for (tag_directive = event->data.document_start.tag_directives.start;
- tag_directive != event->data.document_start.tag_directives.end;
- tag_directive ++) {
- if (!yaml_emitter_analyze_tag_directive(emitter, *tag_directive))
- return 0;
- if (!yaml_emitter_append_tag_directive(emitter, *tag_directive, 0))
- return 0;
- }
-
- for (tag_directive = default_tag_directives;
- tag_directive->handle; tag_directive ++) {
- if (!yaml_emitter_append_tag_directive(emitter, *tag_directive, 1))
- return 0;
- }
-
- implicit = event->data.document_start.implicit;
- if (!first || emitter->canonical) {
- implicit = 0;
- }
-
- if ((event->data.document_start.version_directive ||
- (event->data.document_start.tag_directives.start
- != event->data.document_start.tag_directives.end)) &&
- emitter->open_ended)
- {
- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
-
- if (event->data.document_start.version_directive) {
- implicit = 0;
- if (!yaml_emitter_write_indicator(emitter, "%YAML", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_indicator(emitter, "1.1", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
-
- if (event->data.document_start.tag_directives.start
- != event->data.document_start.tag_directives.end) {
- implicit = 0;
- for (tag_directive = event->data.document_start.tag_directives.start;
- tag_directive != event->data.document_start.tag_directives.end;
- tag_directive ++) {
- if (!yaml_emitter_write_indicator(emitter, "%TAG", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_tag_handle(emitter, tag_directive->handle,
- strlen((char *)tag_directive->handle)))
- return 0;
- if (!yaml_emitter_write_tag_content(emitter, tag_directive->prefix,
- strlen((char *)tag_directive->prefix), 1))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- }
-
- if (yaml_emitter_check_empty_document(emitter)) {
- implicit = 0;
- }
-
- if (!implicit) {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- if (!yaml_emitter_write_indicator(emitter, "---", 1, 0, 0))
- return 0;
- if (emitter->canonical) {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- }
-
- emitter->state = YAML_EMIT_DOCUMENT_CONTENT_STATE;
-
- return 1;
- }
-
- else if (event->type == YAML_STREAM_END_EVENT)
- {
- if (emitter->open_ended)
- {
- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
-
- if (!yaml_emitter_flush(emitter))
- return 0;
-
- emitter->state = YAML_EMIT_END_STATE;
-
- return 1;
- }
-
- return yaml_emitter_set_emitter_error(emitter,
- "expected DOCUMENT-START or STREAM-END");
-}
-
-/*
- * Expect the root node.
- */
-
-static int
-yaml_emitter_emit_document_content(yaml_emitter_t *emitter,
- yaml_event_t *event)
-{
- if (!PUSH(emitter, emitter->states, YAML_EMIT_DOCUMENT_END_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 1, 0, 0, 0);
-}
-
-/*
- * Expect DOCUMENT-END.
- */
-
-static int
-yaml_emitter_emit_document_end(yaml_emitter_t *emitter,
- yaml_event_t *event)
-{
- if (event->type == YAML_DOCUMENT_END_EVENT)
- {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- if (!event->data.document_end.implicit) {
- if (!yaml_emitter_write_indicator(emitter, "...", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- if (!yaml_emitter_flush(emitter))
- return 0;
-
- emitter->state = YAML_EMIT_DOCUMENT_START_STATE;
-
- while (!STACK_EMPTY(emitter, emitter->tag_directives)) {
- yaml_tag_directive_t tag_directive = POP(emitter,
- emitter->tag_directives);
- yaml_free(tag_directive.handle);
- yaml_free(tag_directive.prefix);
- }
-
- return 1;
- }
-
- return yaml_emitter_set_emitter_error(emitter,
- "expected DOCUMENT-END");
-}
-
-/*
- *
- * Expect a flow item node.
- */
-
-static int
-yaml_emitter_emit_flow_sequence_item(yaml_emitter_t *emitter,
- yaml_event_t *event, int first)
-{
- if (first)
- {
- if (!yaml_emitter_write_indicator(emitter, "[", 1, 1, 0))
- return 0;
- if (!yaml_emitter_increase_indent(emitter, 1, 0))
- return 0;
- emitter->flow_level ++;
- }
-
- if (event->type == YAML_SEQUENCE_END_EVENT)
- {
- emitter->flow_level --;
- emitter->indent = POP(emitter, emitter->indents);
- if (emitter->canonical && !first) {
- if (!yaml_emitter_write_indicator(emitter, ",", 0, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- if (!yaml_emitter_write_indicator(emitter, "]", 0, 0, 0))
- return 0;
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
- }
-
- if (!first) {
- if (!yaml_emitter_write_indicator(emitter, ",", 0, 0, 0))
- return 0;
- }
-
- if (emitter->canonical || emitter->column > emitter->best_width) {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- if (!PUSH(emitter, emitter->states, YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 1, 0, 0);
-}
-
-/*
- * Expect a flow key node.
- */
-
-static int
-yaml_emitter_emit_flow_mapping_key(yaml_emitter_t *emitter,
- yaml_event_t *event, int first)
-{
- if (first)
- {
- if (!yaml_emitter_write_indicator(emitter, "{", 1, 1, 0))
- return 0;
- if (!yaml_emitter_increase_indent(emitter, 1, 0))
- return 0;
- emitter->flow_level ++;
- }
-
- if (event->type == YAML_MAPPING_END_EVENT)
- {
- emitter->flow_level --;
- emitter->indent = POP(emitter, emitter->indents);
- if (emitter->canonical && !first) {
- if (!yaml_emitter_write_indicator(emitter, ",", 0, 0, 0))
- return 0;
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- if (!yaml_emitter_write_indicator(emitter, "}", 0, 0, 0))
- return 0;
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
- }
-
- if (!first) {
- if (!yaml_emitter_write_indicator(emitter, ",", 0, 0, 0))
- return 0;
- }
- if (emitter->canonical || emitter->column > emitter->best_width) {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
-
- if (!emitter->canonical && yaml_emitter_check_simple_key(emitter))
- {
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 1);
- }
- else
- {
- if (!yaml_emitter_write_indicator(emitter, "?", 1, 0, 0))
- return 0;
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_FLOW_MAPPING_VALUE_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 0);
- }
-}
-
-/*
- * Expect a flow value node.
- */
-
-static int
-yaml_emitter_emit_flow_mapping_value(yaml_emitter_t *emitter,
- yaml_event_t *event, int simple)
-{
- if (simple) {
- if (!yaml_emitter_write_indicator(emitter, ":", 0, 0, 0))
- return 0;
- }
- else {
- if (emitter->canonical || emitter->column > emitter->best_width) {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- }
- if (!yaml_emitter_write_indicator(emitter, ":", 1, 0, 0))
- return 0;
- }
- if (!PUSH(emitter, emitter->states, YAML_EMIT_FLOW_MAPPING_KEY_STATE))
- return 0;
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 0);
-}
-
-/*
- * Expect a block item node.
- */
-
-static int
-yaml_emitter_emit_block_sequence_item(yaml_emitter_t *emitter,
- yaml_event_t *event, int first)
-{
- if (first)
- {
- if (!yaml_emitter_increase_indent(emitter, 0,
- (emitter->mapping_context && !emitter->indention)))
- return 0;
- }
-
- if (event->type == YAML_SEQUENCE_END_EVENT)
- {
- emitter->indent = POP(emitter, emitter->indents);
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
- }
-
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- if (!yaml_emitter_write_indicator(emitter, "-", 1, 0, 1))
- return 0;
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 1, 0, 0);
-}
-
-/*
- * Expect a block key node.
- */
-
-static int
-yaml_emitter_emit_block_mapping_key(yaml_emitter_t *emitter,
- yaml_event_t *event, int first)
-{
- if (first)
- {
- if (!yaml_emitter_increase_indent(emitter, 0, 0))
- return 0;
- }
-
- if (event->type == YAML_MAPPING_END_EVENT)
- {
- emitter->indent = POP(emitter, emitter->indents);
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
- }
-
- if (!yaml_emitter_write_indent(emitter))
- return 0;
-
- if (yaml_emitter_check_simple_key(emitter))
- {
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 1);
- }
- else
- {
- if (!yaml_emitter_write_indicator(emitter, "?", 1, 0, 1))
- return 0;
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_BLOCK_MAPPING_VALUE_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 0);
- }
-}
-
-/*
- * Expect a block value node.
- */
-
-static int
-yaml_emitter_emit_block_mapping_value(yaml_emitter_t *emitter,
- yaml_event_t *event, int simple)
-{
- if (simple) {
- if (!yaml_emitter_write_indicator(emitter, ":", 0, 0, 0))
- return 0;
- }
- else {
- if (!yaml_emitter_write_indent(emitter))
- return 0;
- if (!yaml_emitter_write_indicator(emitter, ":", 1, 0, 1))
- return 0;
- }
- if (!PUSH(emitter, emitter->states,
- YAML_EMIT_BLOCK_MAPPING_KEY_STATE))
- return 0;
-
- return yaml_emitter_emit_node(emitter, event, 0, 0, 1, 0);
-}
-
-/*
- * Expect a node.
- */
-
-static int
-yaml_emitter_emit_node(yaml_emitter_t *emitter, yaml_event_t *event,
- int root, int sequence, int mapping, int simple_key)
-{
- emitter->root_context = root;
- emitter->sequence_context = sequence;
- emitter->mapping_context = mapping;
- emitter->simple_key_context = simple_key;
-
- switch (event->type)
- {
- case YAML_ALIAS_EVENT:
- return yaml_emitter_emit_alias(emitter, event);
-
- case YAML_SCALAR_EVENT:
- return yaml_emitter_emit_scalar(emitter, event);
-
- case YAML_SEQUENCE_START_EVENT:
- return yaml_emitter_emit_sequence_start(emitter, event);
-
- case YAML_MAPPING_START_EVENT:
- return yaml_emitter_emit_mapping_start(emitter, event);
-
- default:
- return yaml_emitter_set_emitter_error(emitter,
- "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS");
- }
-
- return 0;
-}
-
-/*
- * Expect ALIAS.
- */
-
-static int
-yaml_emitter_emit_alias(yaml_emitter_t *emitter, SHIM(yaml_event_t *event))
-{
- if (!yaml_emitter_process_anchor(emitter))
- return 0;
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
-}
-
-/*
- * Expect SCALAR.
- */
-
-static int
-yaml_emitter_emit_scalar(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- if (!yaml_emitter_select_scalar_style(emitter, event))
- return 0;
- if (!yaml_emitter_process_anchor(emitter))
- return 0;
- if (!yaml_emitter_process_tag(emitter))
- return 0;
- if (!yaml_emitter_increase_indent(emitter, 1, 0))
- return 0;
- if (!yaml_emitter_process_scalar(emitter))
- return 0;
- emitter->indent = POP(emitter, emitter->indents);
- emitter->state = POP(emitter, emitter->states);
-
- return 1;
-}
-
-/*
- * Expect SEQUENCE-START.
- */
-
-static int
-yaml_emitter_emit_sequence_start(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- if (!yaml_emitter_process_anchor(emitter))
- return 0;
- if (!yaml_emitter_process_tag(emitter))
- return 0;
-
- if (emitter->flow_level || emitter->canonical
- || event->data.sequence_start.style == YAML_FLOW_SEQUENCE_STYLE
- || yaml_emitter_check_empty_sequence(emitter)) {
- emitter->state = YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE;
- }
- else {
- emitter->state = YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE;
- }
-
- return 1;
-}
-
-/*
- * Expect MAPPING-START.
- */
-
-static int
-yaml_emitter_emit_mapping_start(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- if (!yaml_emitter_process_anchor(emitter))
- return 0;
- if (!yaml_emitter_process_tag(emitter))
- return 0;
-
- if (emitter->flow_level || emitter->canonical
- || event->data.mapping_start.style == YAML_FLOW_MAPPING_STYLE
- || yaml_emitter_check_empty_mapping(emitter)) {
- emitter->state = YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE;
- }
- else {
- emitter->state = YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE;
- }
-
- return 1;
-}
-
-/*
- * Check if the document content is an empty scalar.
- */
-
-static int
-yaml_emitter_check_empty_document(SHIM(yaml_emitter_t *emitter))
-{
- return 0;
-}
-
-/*
- * Check if the next events represent an empty sequence.
- */
-
-static int
-yaml_emitter_check_empty_sequence(yaml_emitter_t *emitter)
-{
- if (emitter->events.tail - emitter->events.head < 2)
- return 0;
-
- return (emitter->events.head[0].type == YAML_SEQUENCE_START_EVENT
- && emitter->events.head[1].type == YAML_SEQUENCE_END_EVENT);
-}
-
-/*
- * Check if the next events represent an empty mapping.
- */
-
-static int
-yaml_emitter_check_empty_mapping(yaml_emitter_t *emitter)
-{
- if (emitter->events.tail - emitter->events.head < 2)
- return 0;
-
- return (emitter->events.head[0].type == YAML_MAPPING_START_EVENT
- && emitter->events.head[1].type == YAML_MAPPING_END_EVENT);
-}
-
-/*
- * Check if the next node can be expressed as a simple key.
- */
-
-static int
-yaml_emitter_check_simple_key(yaml_emitter_t *emitter)
-{
- yaml_event_t *event = emitter->events.head;
- size_t length = 0;
-
- switch (event->type)
- {
- case YAML_ALIAS_EVENT:
- length += emitter->anchor_data.anchor_length;
- break;
-
- case YAML_SCALAR_EVENT:
- if (emitter->scalar_data.multiline)
- return 0;
- length += emitter->anchor_data.anchor_length
- + emitter->tag_data.handle_length
- + emitter->tag_data.suffix_length
- + emitter->scalar_data.length;
- break;
-
- case YAML_SEQUENCE_START_EVENT:
- if (!yaml_emitter_check_empty_sequence(emitter))
- return 0;
- length += emitter->anchor_data.anchor_length
- + emitter->tag_data.handle_length
- + emitter->tag_data.suffix_length;
- break;
-
- case YAML_MAPPING_START_EVENT:
- if (!yaml_emitter_check_empty_mapping(emitter))
- return 0;
- length += emitter->anchor_data.anchor_length
- + emitter->tag_data.handle_length
- + emitter->tag_data.suffix_length;
- break;
-
- default:
- return 0;
- }
-
- if (length > 128)
- return 0;
-
- return 1;
-}
-
-/*
- * Determine an acceptable scalar style.
- */
-
-static int
-yaml_emitter_select_scalar_style(yaml_emitter_t *emitter, yaml_event_t *event)
-{
- yaml_scalar_style_t style = event->data.scalar.style;
- int no_tag = (!emitter->tag_data.handle && !emitter->tag_data.suffix);
-
- if (no_tag && !event->data.scalar.plain_implicit
- && !event->data.scalar.quoted_implicit) {
- return yaml_emitter_set_emitter_error(emitter,
- "neither tag nor implicit flags are specified");
- }
-
- if (style == YAML_ANY_SCALAR_STYLE)
- style = YAML_PLAIN_SCALAR_STYLE;
-
- if (emitter->canonical)
- style = YAML_DOUBLE_QUOTED_SCALAR_STYLE;
-
- if (emitter->simple_key_context && emitter->scalar_data.multiline)
- style = YAML_DOUBLE_QUOTED_SCALAR_STYLE;
-
- if (style == YAML_PLAIN_SCALAR_STYLE)
- {
- if ((emitter->flow_level && !emitter->scalar_data.flow_plain_allowed)
- || (!emitter->flow_level && !emitter->scalar_data.block_plain_allowed))
- style = YAML_SINGLE_QUOTED_SCALAR_STYLE;
- if (!emitter->scalar_data.length
- && (emitter->flow_level || emitter->simple_key_context))
- style = YAML_SINGLE_QUOTED_SCALAR_STYLE;
- if (no_tag && !event->data.scalar.plain_implicit)
- style = YAML_SINGLE_QUOTED_SCALAR_STYLE;
- }
-
- if (style == YAML_SINGLE_QUOTED_SCALAR_STYLE)
- {
- if (!emitter->scalar_data.single_quoted_allowed)
- style = YAML_DOUBLE_QUOTED_SCALAR_STYLE;
- }
-
- if (style == YAML_LITERAL_SCALAR_STYLE || style == YAML_FOLDED_SCALAR_STYLE)
- {
- if (!emitter->scalar_data.block_allowed
- || emitter->flow_level || emitter->simple_key_context)
- style = YAML_DOUBLE_QUOTED_SCALAR_STYLE;
- }
-
- if (no_tag && !event->data.scalar.quoted_implicit
- && style != YAML_PLAIN_SCALAR_STYLE)
- {
- emitter->tag_data.handle = (yaml_char_t *)"!";
- emitter->tag_data.handle_length = 1;
- }
-
- emitter->scalar_data.style = style;
-
- return 1;
-}
-
-/*
- * Write an anchor.
- */
-
-static int
-yaml_emitter_process_anchor(yaml_emitter_t *emitter)
-{
- if (!emitter->anchor_data.anchor)
- return 1;
-
- if (!yaml_emitter_write_indicator(emitter,
- (emitter->anchor_data.alias ? "*" : "&"), 1, 0, 0))
- return 0;
-
- return yaml_emitter_write_anchor(emitter,
- emitter->anchor_data.anchor, emitter->anchor_data.anchor_length);
-}
-
-/*
- * Write a tag.
- */
-
-static int
-yaml_emitter_process_tag(yaml_emitter_t *emitter)
-{
- if (!emitter->tag_data.handle && !emitter->tag_data.suffix)
- return 1;
-
- if (emitter->tag_data.handle)
- {
- if (!yaml_emitter_write_tag_handle(emitter, emitter->tag_data.handle,
- emitter->tag_data.handle_length))
- return 0;
- if (emitter->tag_data.suffix) {
- if (!yaml_emitter_write_tag_content(emitter, emitter->tag_data.suffix,
- emitter->tag_data.suffix_length, 0))
- return 0;
- }
- }
- else
- {
- if (!yaml_emitter_write_indicator(emitter, "!<", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_tag_content(emitter, emitter->tag_data.suffix,
- emitter->tag_data.suffix_length, 0))
- return 0;
- if (!yaml_emitter_write_indicator(emitter, ">", 0, 0, 0))
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Write a scalar.
- */
-
-static int
-yaml_emitter_process_scalar(yaml_emitter_t *emitter)
-{
- switch (emitter->scalar_data.style)
- {
- case YAML_PLAIN_SCALAR_STYLE:
- return yaml_emitter_write_plain_scalar(emitter,
- emitter->scalar_data.value, emitter->scalar_data.length,
- !emitter->simple_key_context);
-
- case YAML_SINGLE_QUOTED_SCALAR_STYLE:
- return yaml_emitter_write_single_quoted_scalar(emitter,
- emitter->scalar_data.value, emitter->scalar_data.length,
- !emitter->simple_key_context);
-
- case YAML_DOUBLE_QUOTED_SCALAR_STYLE:
- return yaml_emitter_write_double_quoted_scalar(emitter,
- emitter->scalar_data.value, emitter->scalar_data.length,
- !emitter->simple_key_context);
-
- case YAML_LITERAL_SCALAR_STYLE:
- return yaml_emitter_write_literal_scalar(emitter,
- emitter->scalar_data.value, emitter->scalar_data.length);
-
- case YAML_FOLDED_SCALAR_STYLE:
- return yaml_emitter_write_folded_scalar(emitter,
- emitter->scalar_data.value, emitter->scalar_data.length);
-
- default:
- assert(1); /* Impossible. */
- }
-
- return 0;
-}
-
-/*
- * Check if a %YAML directive is valid.
- */
-
-static int
-yaml_emitter_analyze_version_directive(yaml_emitter_t *emitter,
- yaml_version_directive_t version_directive)
-{
- if (version_directive.major != 1 || version_directive.minor != 1) {
- return yaml_emitter_set_emitter_error(emitter,
- "incompatible %YAML directive");
- }
-
- return 1;
-}
-
-/*
- * Check if a %TAG directive is valid.
- */
-
-static int
-yaml_emitter_analyze_tag_directive(yaml_emitter_t *emitter,
- yaml_tag_directive_t tag_directive)
-{
- yaml_string_t handle;
- yaml_string_t prefix;
- size_t handle_length;
- size_t prefix_length;
-
- handle_length = strlen((char *)tag_directive.handle);
- prefix_length = strlen((char *)tag_directive.prefix);
- STRING_ASSIGN(handle, tag_directive.handle, handle_length);
- STRING_ASSIGN(prefix, tag_directive.prefix, prefix_length);
-
- if (handle.start == handle.end) {
- return yaml_emitter_set_emitter_error(emitter,
- "tag handle must not be empty");
- }
-
- if (handle.start[0] != '!') {
- return yaml_emitter_set_emitter_error(emitter,
- "tag handle must start with '!'");
- }
-
- if (handle.end[-1] != '!') {
- return yaml_emitter_set_emitter_error(emitter,
- "tag handle must end with '!'");
- }
-
- handle.pointer ++;
-
- while (handle.pointer < handle.end-1) {
- if (!IS_ALPHA(handle)) {
- return yaml_emitter_set_emitter_error(emitter,
- "tag handle must contain alphanumerical characters only");
- }
- MOVE(handle);
- }
-
- if (prefix.start == prefix.end) {
- return yaml_emitter_set_emitter_error(emitter,
- "tag prefix must not be empty");
- }
-
- return 1;
-}
-
-/*
- * Check if an anchor is valid.
- */
-
-static int
-yaml_emitter_analyze_anchor(yaml_emitter_t *emitter,
- yaml_char_t *anchor, int alias)
-{
- size_t anchor_length;
- yaml_string_t string;
-
- anchor_length = strlen((char *)anchor);
- STRING_ASSIGN(string, anchor, anchor_length);
-
- if (string.start == string.end) {
- return yaml_emitter_set_emitter_error(emitter, alias ?
- "alias value must not be empty" :
- "anchor value must not be empty");
- }
-
- while (string.pointer != string.end) {
- if (!IS_ALPHA(string)) {
- return yaml_emitter_set_emitter_error(emitter, alias ?
- "alias value must contain alphanumerical characters only" :
- "anchor value must contain alphanumerical characters only");
- }
- MOVE(string);
- }
-
- emitter->anchor_data.anchor = string.start;
- emitter->anchor_data.anchor_length = string.end - string.start;
- emitter->anchor_data.alias = alias;
-
- return 1;
-}
-
-/*
- * Check if a tag is valid.
- */
-
-static int
-yaml_emitter_analyze_tag(yaml_emitter_t *emitter,
- yaml_char_t *tag)
-{
- size_t tag_length;
- yaml_string_t string;
- yaml_tag_directive_t *tag_directive;
-
- tag_length = strlen((char *)tag);
- STRING_ASSIGN(string, tag, tag_length);
-
- if (string.start == string.end) {
- return yaml_emitter_set_emitter_error(emitter,
- "tag value must not be empty");
- }
-
- for (tag_directive = emitter->tag_directives.start;
- tag_directive != emitter->tag_directives.top; tag_directive ++) {
- size_t prefix_length = strlen((char *)tag_directive->prefix);
- if (prefix_length < (size_t)(string.end - string.start)
- && strncmp((char *)tag_directive->prefix, (char *)string.start,
- prefix_length) == 0)
- {
- emitter->tag_data.handle = tag_directive->handle;
- emitter->tag_data.handle_length =
- strlen((char *)tag_directive->handle);
- emitter->tag_data.suffix = string.start + prefix_length;
- emitter->tag_data.suffix_length =
- (string.end - string.start) - prefix_length;
- return 1;
- }
- }
-
- emitter->tag_data.suffix = string.start;
- emitter->tag_data.suffix_length = string.end - string.start;
-
- return 1;
-}
-
-/*
- * Check if a scalar is valid.
- */
-
-static int
-yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length)
-{
- yaml_string_t string;
-
- int block_indicators = 0;
- int flow_indicators = 0;
- int line_breaks = 0;
- int special_characters = 0;
-
- int leading_space = 0;
- int leading_break = 0;
- int trailing_space = 0;
- int trailing_break = 0;
- int break_space = 0;
- int space_break = 0;
-
- int preceded_by_whitespace = 0;
- int followed_by_whitespace = 0;
- int previous_space = 0;
- int previous_break = 0;
-
- STRING_ASSIGN(string, value, length);
-
- emitter->scalar_data.value = value;
- emitter->scalar_data.length = length;
-
- if (string.start == string.end)
- {
- emitter->scalar_data.multiline = 0;
- emitter->scalar_data.flow_plain_allowed = 0;
- emitter->scalar_data.block_plain_allowed = 1;
- emitter->scalar_data.single_quoted_allowed = 1;
- emitter->scalar_data.block_allowed = 0;
-
- return 1;
- }
-
- if ((CHECK_AT(string, '-', 0)
- && CHECK_AT(string, '-', 1)
- && CHECK_AT(string, '-', 2))
- || (CHECK_AT(string, '.', 0)
- && CHECK_AT(string, '.', 1)
- && CHECK_AT(string, '.', 2))) {
- block_indicators = 1;
- flow_indicators = 1;
- }
-
- preceded_by_whitespace = 1;
- followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
-
- while (string.pointer != string.end)
- {
- if (string.start == string.pointer)
- {
- if (CHECK(string, '#') || CHECK(string, ',')
- || CHECK(string, '[') || CHECK(string, ']')
- || CHECK(string, '{') || CHECK(string, '}')
- || CHECK(string, '&') || CHECK(string, '*')
- || CHECK(string, '!') || CHECK(string, '|')
- || CHECK(string, '>') || CHECK(string, '\'')
- || CHECK(string, '"') || CHECK(string, '%')
- || CHECK(string, '@') || CHECK(string, '`')) {
- flow_indicators = 1;
- block_indicators = 1;
- }
-
- if (CHECK(string, '?') || CHECK(string, ':')) {
- flow_indicators = 1;
- if (followed_by_whitespace) {
- block_indicators = 1;
- }
- }
-
- if (CHECK(string, '-') && followed_by_whitespace) {
- flow_indicators = 1;
- block_indicators = 1;
- }
- }
- else
- {
- if (CHECK(string, ',') || CHECK(string, '?')
- || CHECK(string, '[') || CHECK(string, ']')
- || CHECK(string, '{') || CHECK(string, '}')) {
- flow_indicators = 1;
- }
-
- if (CHECK(string, ':')) {
- flow_indicators = 1;
- if (followed_by_whitespace) {
- block_indicators = 1;
- }
- }
-
- if (CHECK(string, '#') && preceded_by_whitespace) {
- flow_indicators = 1;
- block_indicators = 1;
- }
- }
-
- if (!IS_PRINTABLE(string)
- || (!IS_ASCII(string) && !emitter->unicode)) {
- special_characters = 1;
- }
-
- if (IS_BREAK(string)) {
- line_breaks = 1;
- }
-
- if (IS_SPACE(string))
- {
- if (string.start == string.pointer) {
- leading_space = 1;
- }
- if (string.pointer+WIDTH(string) == string.end) {
- trailing_space = 1;
- }
- if (previous_break) {
- break_space = 1;
- }
- previous_space = 1;
- previous_break = 0;
- }
- else if (IS_BREAK(string))
- {
- if (string.start == string.pointer) {
- leading_break = 1;
- }
- if (string.pointer+WIDTH(string) == string.end) {
- trailing_break = 1;
- }
- if (previous_space) {
- space_break = 1;
- }
- previous_space = 0;
- previous_break = 1;
- }
- else
- {
- previous_space = 0;
- previous_break = 0;
- }
-
- preceded_by_whitespace = IS_BLANKZ(string);
- MOVE(string);
- if (string.pointer != string.end) {
- followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
- }
- }
-
- emitter->scalar_data.multiline = line_breaks;
-
- emitter->scalar_data.flow_plain_allowed = 1;
- emitter->scalar_data.block_plain_allowed = 1;
- emitter->scalar_data.single_quoted_allowed = 1;
- emitter->scalar_data.block_allowed = 1;
-
- if (leading_space || leading_break || trailing_space || trailing_break) {
- emitter->scalar_data.flow_plain_allowed = 0;
- emitter->scalar_data.block_plain_allowed = 0;
- }
-
- if (trailing_space) {
- emitter->scalar_data.block_allowed = 0;
- }
-
- if (break_space) {
- emitter->scalar_data.flow_plain_allowed = 0;
- emitter->scalar_data.block_plain_allowed = 0;
- emitter->scalar_data.single_quoted_allowed = 0;
- }
-
- if (space_break || special_characters) {
- emitter->scalar_data.flow_plain_allowed = 0;
- emitter->scalar_data.block_plain_allowed = 0;
- emitter->scalar_data.single_quoted_allowed = 0;
- emitter->scalar_data.block_allowed = 0;
- }
-
- if (line_breaks) {
- emitter->scalar_data.flow_plain_allowed = 0;
- emitter->scalar_data.block_plain_allowed = 0;
- }
-
- if (flow_indicators) {
- emitter->scalar_data.flow_plain_allowed = 0;
- }
-
- if (block_indicators) {
- emitter->scalar_data.block_plain_allowed = 0;
- }
-
- return 1;
-}
-
-/*
- * Check if the event data is valid.
- */
-
-static int
-yaml_emitter_analyze_event(yaml_emitter_t *emitter,
- yaml_event_t *event)
-{
- emitter->anchor_data.anchor = NULL;
- emitter->anchor_data.anchor_length = 0;
- emitter->tag_data.handle = NULL;
- emitter->tag_data.handle_length = 0;
- emitter->tag_data.suffix = NULL;
- emitter->tag_data.suffix_length = 0;
- emitter->scalar_data.value = NULL;
- emitter->scalar_data.length = 0;
-
- switch (event->type)
- {
- case YAML_ALIAS_EVENT:
- if (!yaml_emitter_analyze_anchor(emitter,
- event->data.alias.anchor, 1))
- return 0;
- return 1;
-
- case YAML_SCALAR_EVENT:
- if (event->data.scalar.anchor) {
- if (!yaml_emitter_analyze_anchor(emitter,
- event->data.scalar.anchor, 0))
- return 0;
- }
- if (event->data.scalar.tag && (emitter->canonical ||
- (!event->data.scalar.plain_implicit
- && !event->data.scalar.quoted_implicit))) {
- if (!yaml_emitter_analyze_tag(emitter, event->data.scalar.tag))
- return 0;
- }
- if (!yaml_emitter_analyze_scalar(emitter,
- event->data.scalar.value, event->data.scalar.length))
- return 0;
- return 1;
-
- case YAML_SEQUENCE_START_EVENT:
- if (event->data.sequence_start.anchor) {
- if (!yaml_emitter_analyze_anchor(emitter,
- event->data.sequence_start.anchor, 0))
- return 0;
- }
- if (event->data.sequence_start.tag && (emitter->canonical ||
- !event->data.sequence_start.implicit)) {
- if (!yaml_emitter_analyze_tag(emitter,
- event->data.sequence_start.tag))
- return 0;
- }
- return 1;
-
- case YAML_MAPPING_START_EVENT:
- if (event->data.mapping_start.anchor) {
- if (!yaml_emitter_analyze_anchor(emitter,
- event->data.mapping_start.anchor, 0))
- return 0;
- }
- if (event->data.mapping_start.tag && (emitter->canonical ||
- !event->data.mapping_start.implicit)) {
- if (!yaml_emitter_analyze_tag(emitter,
- event->data.mapping_start.tag))
- return 0;
- }
- return 1;
-
- default:
- return 1;
- }
-}
-
-/*
- * Write the BOM character.
- */
-
-static int
-yaml_emitter_write_bom(yaml_emitter_t *emitter)
-{
- if (!FLUSH(emitter)) return 0;
-
- *(emitter->buffer.pointer++) = (yaml_char_t) '\xEF';
- *(emitter->buffer.pointer++) = (yaml_char_t) '\xBB';
- *(emitter->buffer.pointer++) = (yaml_char_t) '\xBF';
-
- return 1;
-}
-
-static int
-yaml_emitter_write_indent(yaml_emitter_t *emitter)
-{
- int indent = (emitter->indent >= 0) ? emitter->indent : 0;
-
- if (!emitter->indention || emitter->column > indent
- || (emitter->column == indent && !emitter->whitespace)) {
- if (!PUT_BREAK(emitter)) return 0;
- }
-
- while (emitter->column < indent) {
- if (!PUT(emitter, ' ')) return 0;
- }
-
- emitter->whitespace = 1;
- emitter->indention = 1;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_indicator(yaml_emitter_t *emitter,
- const char *indicator, int need_whitespace,
- int is_whitespace, int is_indention)
-{
- size_t indicator_length;
- yaml_string_t string;
-
- indicator_length = strlen(indicator);
- STRING_ASSIGN(string, (yaml_char_t *)indicator, indicator_length);
-
- if (need_whitespace && !emitter->whitespace) {
- if (!PUT(emitter, ' ')) return 0;
- }
-
- while (string.pointer != string.end) {
- if (!WRITE(emitter, string)) return 0;
- }
-
- emitter->whitespace = is_whitespace;
- emitter->indention = (emitter->indention && is_indention);
- emitter->open_ended = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_anchor(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length)
-{
- yaml_string_t string;
- STRING_ASSIGN(string, value, length);
-
- while (string.pointer != string.end) {
- if (!WRITE(emitter, string)) return 0;
- }
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_tag_handle(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length)
-{
- yaml_string_t string;
- STRING_ASSIGN(string, value, length);
-
- if (!emitter->whitespace) {
- if (!PUT(emitter, ' ')) return 0;
- }
-
- while (string.pointer != string.end) {
- if (!WRITE(emitter, string)) return 0;
- }
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_tag_content(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length,
- int need_whitespace)
-{
- yaml_string_t string;
- STRING_ASSIGN(string, value, length);
-
- if (need_whitespace && !emitter->whitespace) {
- if (!PUT(emitter, ' ')) return 0;
- }
-
- while (string.pointer != string.end) {
- if (IS_ALPHA(string)
- || CHECK(string, ';') || CHECK(string, '/')
- || CHECK(string, '?') || CHECK(string, ':')
- || CHECK(string, '@') || CHECK(string, '&')
- || CHECK(string, '=') || CHECK(string, '+')
- || CHECK(string, '$') || CHECK(string, ',')
- || CHECK(string, '_') || CHECK(string, '.')
- || CHECK(string, '~') || CHECK(string, '*')
- || CHECK(string, '\'') || CHECK(string, '(')
- || CHECK(string, ')') || CHECK(string, '[')
- || CHECK(string, ']')) {
- if (!WRITE(emitter, string)) return 0;
- }
- else {
- int width = WIDTH(string);
- unsigned int value;
- while (width --) {
- value = *(string.pointer++);
- if (!PUT(emitter, '%')) return 0;
- if (!PUT(emitter, (value >> 4)
- + ((value >> 4) < 10 ? '0' : 'A' - 10)))
- return 0;
- if (!PUT(emitter, (value & 0x0F)
- + ((value & 0x0F) < 10 ? '0' : 'A' - 10)))
- return 0;
- }
- }
- }
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_plain_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks)
-{
- yaml_string_t string;
- int spaces = 0;
- int breaks = 0;
-
- STRING_ASSIGN(string, value, length);
-
- if (!emitter->whitespace) {
- if (!PUT(emitter, ' ')) return 0;
- }
-
- while (string.pointer != string.end)
- {
- if (IS_SPACE(string))
- {
- if (allow_breaks && !spaces
- && emitter->column > emitter->best_width
- && !IS_SPACE_AT(string, 1)) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- MOVE(string);
- }
- else {
- if (!WRITE(emitter, string)) return 0;
- }
- spaces = 1;
- }
- else if (IS_BREAK(string))
- {
- if (!breaks && CHECK(string, '\n')) {
- if (!PUT_BREAK(emitter)) return 0;
- }
- if (!WRITE_BREAK(emitter, string)) return 0;
- emitter->indention = 1;
- breaks = 1;
- }
- else
- {
- if (breaks) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- }
- if (!WRITE(emitter, string)) return 0;
- emitter->indention = 0;
- spaces = 0;
- breaks = 0;
- }
- }
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_single_quoted_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks)
-{
- yaml_string_t string;
- int spaces = 0;
- int breaks = 0;
-
- STRING_ASSIGN(string, value, length);
-
- if (!yaml_emitter_write_indicator(emitter, "'", 1, 0, 0))
- return 0;
-
- while (string.pointer != string.end)
- {
- if (IS_SPACE(string))
- {
- if (allow_breaks && !spaces
- && emitter->column > emitter->best_width
- && string.pointer != string.start
- && string.pointer != string.end - 1
- && !IS_SPACE_AT(string, 1)) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- MOVE(string);
- }
- else {
- if (!WRITE(emitter, string)) return 0;
- }
- spaces = 1;
- }
- else if (IS_BREAK(string))
- {
- if (!breaks && CHECK(string, '\n')) {
- if (!PUT_BREAK(emitter)) return 0;
- }
- if (!WRITE_BREAK(emitter, string)) return 0;
- emitter->indention = 1;
- breaks = 1;
- }
- else
- {
- if (breaks) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- }
- if (CHECK(string, '\'')) {
- if (!PUT(emitter, '\'')) return 0;
- }
- if (!WRITE(emitter, string)) return 0;
- emitter->indention = 0;
- spaces = 0;
- breaks = 0;
- }
- }
-
- if (!yaml_emitter_write_indicator(emitter, "'", 0, 0, 0))
- return 0;
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_double_quoted_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length, int allow_breaks)
-{
- yaml_string_t string;
- int spaces = 0;
-
- STRING_ASSIGN(string, value, length);
-
- if (!yaml_emitter_write_indicator(emitter, "\"", 1, 0, 0))
- return 0;
-
- while (string.pointer != string.end)
- {
- if (!IS_PRINTABLE(string) || (!emitter->unicode && !IS_ASCII(string))
- || IS_BOM(string) || IS_BREAK(string)
- || CHECK(string, '"') || CHECK(string, '\\'))
- {
- unsigned char octet;
- unsigned int width;
- unsigned int value;
- int k;
-
- octet = string.pointer[0];
- width = (octet & 0x80) == 0x00 ? 1 :
- (octet & 0xE0) == 0xC0 ? 2 :
- (octet & 0xF0) == 0xE0 ? 3 :
- (octet & 0xF8) == 0xF0 ? 4 : 0;
- value = (octet & 0x80) == 0x00 ? octet & 0x7F :
- (octet & 0xE0) == 0xC0 ? octet & 0x1F :
- (octet & 0xF0) == 0xE0 ? octet & 0x0F :
- (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
- for (k = 1; k < (int)width; k ++) {
- octet = string.pointer[k];
- value = (value << 6) + (octet & 0x3F);
- }
- string.pointer += width;
-
- if (!PUT(emitter, '\\')) return 0;
-
- switch (value)
- {
- case 0x00:
- if (!PUT(emitter, '0')) return 0;
- break;
-
- case 0x07:
- if (!PUT(emitter, 'a')) return 0;
- break;
-
- case 0x08:
- if (!PUT(emitter, 'b')) return 0;
- break;
-
- case 0x09:
- if (!PUT(emitter, 't')) return 0;
- break;
-
- case 0x0A:
- if (!PUT(emitter, 'n')) return 0;
- break;
-
- case 0x0B:
- if (!PUT(emitter, 'v')) return 0;
- break;
-
- case 0x0C:
- if (!PUT(emitter, 'f')) return 0;
- break;
-
- case 0x0D:
- if (!PUT(emitter, 'r')) return 0;
- break;
-
- case 0x1B:
- if (!PUT(emitter, 'e')) return 0;
- break;
-
- case 0x22:
- if (!PUT(emitter, '\"')) return 0;
- break;
-
- case 0x5C:
- if (!PUT(emitter, '\\')) return 0;
- break;
-
- case 0x85:
- if (!PUT(emitter, 'N')) return 0;
- break;
-
- case 0xA0:
- if (!PUT(emitter, '_')) return 0;
- break;
-
- case 0x2028:
- if (!PUT(emitter, 'L')) return 0;
- break;
-
- case 0x2029:
- if (!PUT(emitter, 'P')) return 0;
- break;
-
- default:
- if (value <= 0xFF) {
- if (!PUT(emitter, 'x')) return 0;
- width = 2;
- }
- else if (value <= 0xFFFF) {
- if (!PUT(emitter, 'u')) return 0;
- width = 4;
- }
- else {
- if (!PUT(emitter, 'U')) return 0;
- width = 8;
- }
- for (k = (width-1)*4; k >= 0; k -= 4) {
- int digit = (value >> k) & 0x0F;
- if (!PUT(emitter, digit + (digit < 10 ? '0' : 'A'-10)))
- return 0;
- }
- }
- spaces = 0;
- }
- else if (IS_SPACE(string))
- {
- if (allow_breaks && !spaces
- && emitter->column > emitter->best_width
- && string.pointer != string.start
- && string.pointer != string.end - 1) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- if (IS_SPACE_AT(string, 1)) {
- if (!PUT(emitter, '\\')) return 0;
- }
- MOVE(string);
- }
- else {
- if (!WRITE(emitter, string)) return 0;
- }
- spaces = 1;
- }
- else
- {
- if (!WRITE(emitter, string)) return 0;
- spaces = 0;
- }
- }
-
- if (!yaml_emitter_write_indicator(emitter, "\"", 0, 0, 0))
- return 0;
-
- emitter->whitespace = 0;
- emitter->indention = 0;
-
- return 1;
-}
-
-static int
-yaml_emitter_write_block_scalar_hints(yaml_emitter_t *emitter,
- yaml_string_t string)
-{
- char indent_hint[2];
- const char *chomp_hint = NULL;
-
- if (IS_SPACE(string) || IS_BREAK(string))
- {
- indent_hint[0] = '0' + (char)emitter->best_indent;
- indent_hint[1] = '\0';
- if (!yaml_emitter_write_indicator(emitter, indent_hint, 0, 0, 0))
- return 0;
- }
-
- emitter->open_ended = 0;
-
- string.pointer = string.end;
- if (string.start == string.pointer)
- {
- chomp_hint = "-";
- }
- else
- {
- do {
- string.pointer --;
- } while ((*string.pointer & 0xC0) == 0x80);
- if (!IS_BREAK(string))
- {
- chomp_hint = "-";
- }
- else if (string.start == string.pointer)
- {
- chomp_hint = "+";
- emitter->open_ended = 1;
- }
- else
- {
- do {
- string.pointer --;
- } while ((*string.pointer & 0xC0) == 0x80);
- if (IS_BREAK(string))
- {
- chomp_hint = "+";
- emitter->open_ended = 1;
- }
- }
- }
-
- if (chomp_hint)
- {
- if (!yaml_emitter_write_indicator(emitter, chomp_hint, 0, 0, 0))
- return 0;
- }
-
- return 1;
-}
-
-static int
-yaml_emitter_write_literal_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length)
-{
- yaml_string_t string;
- int breaks = 1;
-
- STRING_ASSIGN(string, value, length);
-
- if (!yaml_emitter_write_indicator(emitter, "|", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_block_scalar_hints(emitter, string))
- return 0;
- if (!PUT_BREAK(emitter)) return 0;
- emitter->indention = 1;
- emitter->whitespace = 1;
-
- while (string.pointer != string.end)
- {
- if (IS_BREAK(string))
- {
- if (!WRITE_BREAK(emitter, string)) return 0;
- emitter->indention = 1;
- breaks = 1;
- }
- else
- {
- if (breaks) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- }
- if (!WRITE(emitter, string)) return 0;
- emitter->indention = 0;
- breaks = 0;
- }
- }
-
- return 1;
-}
-
-static int
-yaml_emitter_write_folded_scalar(yaml_emitter_t *emitter,
- yaml_char_t *value, size_t length)
-{
- yaml_string_t string;
- int breaks = 1;
- int leading_spaces = 1;
-
- STRING_ASSIGN(string, value, length);
-
- if (!yaml_emitter_write_indicator(emitter, ">", 1, 0, 0))
- return 0;
- if (!yaml_emitter_write_block_scalar_hints(emitter, string))
- return 0;
- if (!PUT_BREAK(emitter)) return 0;
- emitter->indention = 1;
- emitter->whitespace = 1;
-
- while (string.pointer != string.end)
- {
- if (IS_BREAK(string))
- {
- if (!breaks && !leading_spaces && CHECK(string, '\n')) {
- int k = 0;
- while (IS_BREAK_AT(string, k)) {
- k += WIDTH_AT(string, k);
- }
- if (!IS_BLANKZ_AT(string, k)) {
- if (!PUT_BREAK(emitter)) return 0;
- }
- }
- if (!WRITE_BREAK(emitter, string)) return 0;
- emitter->indention = 1;
- breaks = 1;
- }
- else
- {
- if (breaks) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- leading_spaces = IS_BLANK(string);
- }
- if (!breaks && IS_SPACE(string) && !IS_SPACE_AT(string, 1)
- && emitter->column > emitter->best_width) {
- if (!yaml_emitter_write_indent(emitter)) return 0;
- MOVE(string);
- }
- else {
- if (!WRITE(emitter, string)) return 0;
- }
- emitter->indention = 0;
- breaks = 0;
- }
- }
-
- return 1;
-}
diff --git a/ext/psych/yaml/loader.c b/ext/psych/yaml/loader.c
deleted file mode 100644
index e5d90be9bc..0000000000
--- a/ext/psych/yaml/loader.c
+++ /dev/null
@@ -1,444 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * API functions.
- */
-
-YAML_DECLARE(int)
-yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document);
-
-/*
- * Error handling.
- */
-
-static int
-yaml_parser_set_composer_error(yaml_parser_t *parser,
- const char *problem, yaml_mark_t problem_mark);
-
-static int
-yaml_parser_set_composer_error_context(yaml_parser_t *parser,
- const char *context, yaml_mark_t context_mark,
- const char *problem, yaml_mark_t problem_mark);
-
-
-/*
- * Alias handling.
- */
-
-static int
-yaml_parser_register_anchor(yaml_parser_t *parser,
- int index, yaml_char_t *anchor);
-
-/*
- * Clean up functions.
- */
-
-static void
-yaml_parser_delete_aliases(yaml_parser_t *parser);
-
-/*
- * Composer functions.
- */
-
-static int
-yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *first_event);
-
-static int
-yaml_parser_load_node(yaml_parser_t *parser, yaml_event_t *first_event);
-
-static int
-yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *first_event);
-
-static int
-yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *first_event);
-
-static int
-yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *first_event);
-
-static int
-yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *first_event);
-
-/*
- * Load the next document of the stream.
- */
-
-YAML_DECLARE(int)
-yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document)
-{
- yaml_event_t event;
-
- assert(parser); /* Non-NULL parser object is expected. */
- assert(document); /* Non-NULL document object is expected. */
-
- memset(document, 0, sizeof(yaml_document_t));
- if (!STACK_INIT(parser, document->nodes, yaml_node_t*))
- goto error;
-
- if (!parser->stream_start_produced) {
- if (!yaml_parser_parse(parser, &event)) goto error;
- assert(event.type == YAML_STREAM_START_EVENT);
- /* STREAM-START is expected. */
- }
-
- if (parser->stream_end_produced) {
- return 1;
- }
-
- if (!yaml_parser_parse(parser, &event)) goto error;
- if (event.type == YAML_STREAM_END_EVENT) {
- return 1;
- }
-
- if (!STACK_INIT(parser, parser->aliases, yaml_alias_data_t*))
- goto error;
-
- parser->document = document;
-
- if (!yaml_parser_load_document(parser, &event)) goto error;
-
- yaml_parser_delete_aliases(parser);
- parser->document = NULL;
-
- return 1;
-
-error:
-
- yaml_parser_delete_aliases(parser);
- yaml_document_delete(document);
- parser->document = NULL;
-
- return 0;
-}
-
-/*
- * Set composer error.
- */
-
-static int
-yaml_parser_set_composer_error(yaml_parser_t *parser,
- const char *problem, yaml_mark_t problem_mark)
-{
- parser->error = YAML_COMPOSER_ERROR;
- parser->problem = problem;
- parser->problem_mark = problem_mark;
-
- return 0;
-}
-
-/*
- * Set composer error with context.
- */
-
-static int
-yaml_parser_set_composer_error_context(yaml_parser_t *parser,
- const char *context, yaml_mark_t context_mark,
- const char *problem, yaml_mark_t problem_mark)
-{
- parser->error = YAML_COMPOSER_ERROR;
- parser->context = context;
- parser->context_mark = context_mark;
- parser->problem = problem;
- parser->problem_mark = problem_mark;
-
- return 0;
-}
-
-/*
- * Delete the stack of aliases.
- */
-
-static void
-yaml_parser_delete_aliases(yaml_parser_t *parser)
-{
- while (!STACK_EMPTY(parser, parser->aliases)) {
- yaml_free(POP(parser, parser->aliases).anchor);
- }
- STACK_DEL(parser, parser->aliases);
-}
-
-/*
- * Compose a document object.
- */
-
-static int
-yaml_parser_load_document(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- yaml_event_t event;
-
- assert(first_event->type == YAML_DOCUMENT_START_EVENT);
- /* DOCUMENT-START is expected. */
-
- parser->document->version_directive
- = first_event->data.document_start.version_directive;
- parser->document->tag_directives.start
- = first_event->data.document_start.tag_directives.start;
- parser->document->tag_directives.end
- = first_event->data.document_start.tag_directives.end;
- parser->document->start_implicit
- = first_event->data.document_start.implicit;
- parser->document->start_mark = first_event->start_mark;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
-
- if (!yaml_parser_load_node(parser, &event)) return 0;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
- assert(event.type == YAML_DOCUMENT_END_EVENT);
- /* DOCUMENT-END is expected. */
-
- parser->document->end_implicit = event.data.document_end.implicit;
- parser->document->end_mark = event.end_mark;
-
- return 1;
-}
-
-/*
- * Compose a node.
- */
-
-static int
-yaml_parser_load_node(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- switch (first_event->type) {
- case YAML_ALIAS_EVENT:
- return yaml_parser_load_alias(parser, first_event);
- case YAML_SCALAR_EVENT:
- return yaml_parser_load_scalar(parser, first_event);
- case YAML_SEQUENCE_START_EVENT:
- return yaml_parser_load_sequence(parser, first_event);
- case YAML_MAPPING_START_EVENT:
- return yaml_parser_load_mapping(parser, first_event);
- default:
- assert(0); /* Could not happen. */
- return 0;
- }
-
- return 0;
-}
-
-/*
- * Add an anchor.
- */
-
-static int
-yaml_parser_register_anchor(yaml_parser_t *parser,
- int index, yaml_char_t *anchor)
-{
- yaml_alias_data_t data;
- yaml_alias_data_t *alias_data;
-
- if (!anchor) return 1;
-
- data.anchor = anchor;
- data.index = index;
- data.mark = parser->document->nodes.start[index-1].start_mark;
-
- for (alias_data = parser->aliases.start;
- alias_data != parser->aliases.top; alias_data ++) {
- if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
- yaml_free(anchor);
- return yaml_parser_set_composer_error_context(parser,
- "found duplicate anchor; first occurrence",
- alias_data->mark, "second occurrence", data.mark);
- }
- }
-
- if (!PUSH(parser, parser->aliases, data)) {
- yaml_free(anchor);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Compose a node corresponding to an alias.
- */
-
-static int
-yaml_parser_load_alias(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- yaml_char_t *anchor = first_event->data.alias.anchor;
- yaml_alias_data_t *alias_data;
-
- for (alias_data = parser->aliases.start;
- alias_data != parser->aliases.top; alias_data ++) {
- if (strcmp((char *)alias_data->anchor, (char *)anchor) == 0) {
- yaml_free(anchor);
- return alias_data->index;
- }
- }
-
- yaml_free(anchor);
- return yaml_parser_set_composer_error(parser, "found undefined alias",
- first_event->start_mark);
-}
-
-/*
- * Compose a scalar node.
- */
-
-static int
-yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- yaml_node_t node;
- int index;
- yaml_char_t *tag = first_event->data.scalar.tag;
-
- if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
-
- if (!tag || strcmp((char *)tag, "!") == 0) {
- yaml_free(tag);
- tag = yaml_strdup((yaml_char_t *)YAML_DEFAULT_SCALAR_TAG);
- if (!tag) goto error;
- }
-
- SCALAR_NODE_INIT(node, tag, first_event->data.scalar.value,
- first_event->data.scalar.length, first_event->data.scalar.style,
- first_event->start_mark, first_event->end_mark);
-
- if (!PUSH(parser, parser->document->nodes, node)) goto error;
-
- index = (int)(parser->document->nodes.top - parser->document->nodes.start);
-
- if (!yaml_parser_register_anchor(parser, index,
- first_event->data.scalar.anchor)) return 0;
-
- return index;
-
-error:
- yaml_free(tag);
- yaml_free(first_event->data.scalar.anchor);
- yaml_free(first_event->data.scalar.value);
- return 0;
-}
-
-/*
- * Compose a sequence node.
- */
-
-static int
-yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- yaml_event_t event;
- yaml_node_t node;
- struct {
- yaml_node_item_t *start;
- yaml_node_item_t *end;
- yaml_node_item_t *top;
- } items = { NULL, NULL, NULL };
- int index, item_index;
- yaml_char_t *tag = first_event->data.sequence_start.tag;
-
- if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
-
- if (!tag || strcmp((char *)tag, "!") == 0) {
- yaml_free(tag);
- tag = yaml_strdup((yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG);
- if (!tag) goto error;
- }
-
- if (!STACK_INIT(parser, items, yaml_node_item_t*)) goto error;
-
- SEQUENCE_NODE_INIT(node, tag, items.start, items.end,
- first_event->data.sequence_start.style,
- first_event->start_mark, first_event->end_mark);
-
- if (!PUSH(parser, parser->document->nodes, node)) goto error;
-
- index = (int)(parser->document->nodes.top - parser->document->nodes.start);
-
- if (!yaml_parser_register_anchor(parser, index,
- first_event->data.sequence_start.anchor)) return 0;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
-
- while (event.type != YAML_SEQUENCE_END_EVENT) {
- if (!STACK_LIMIT(parser,
- parser->document->nodes.start[index-1].data.sequence.items,
- INT_MAX-1)) return 0;
- item_index = yaml_parser_load_node(parser, &event);
- if (!item_index) return 0;
- if (!PUSH(parser,
- parser->document->nodes.start[index-1].data.sequence.items,
- item_index)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- }
-
- parser->document->nodes.start[index-1].end_mark = event.end_mark;
-
- return index;
-
-error:
- yaml_free(tag);
- yaml_free(first_event->data.sequence_start.anchor);
- return 0;
-}
-
-/*
- * Compose a mapping node.
- */
-
-static int
-yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *first_event)
-{
- yaml_event_t event;
- yaml_node_t node;
- struct {
- yaml_node_pair_t *start;
- yaml_node_pair_t *end;
- yaml_node_pair_t *top;
- } pairs = { NULL, NULL, NULL };
- int index;
- yaml_node_pair_t pair;
- yaml_char_t *tag = first_event->data.mapping_start.tag;
-
- if (!STACK_LIMIT(parser, parser->document->nodes, INT_MAX-1)) goto error;
-
- if (!tag || strcmp((char *)tag, "!") == 0) {
- yaml_free(tag);
- tag = yaml_strdup((yaml_char_t *)YAML_DEFAULT_MAPPING_TAG);
- if (!tag) goto error;
- }
-
- if (!STACK_INIT(parser, pairs, yaml_node_pair_t*)) goto error;
-
- MAPPING_NODE_INIT(node, tag, pairs.start, pairs.end,
- first_event->data.mapping_start.style,
- first_event->start_mark, first_event->end_mark);
-
- if (!PUSH(parser, parser->document->nodes, node)) goto error;
-
- index = (int)(parser->document->nodes.top - parser->document->nodes.start);
-
- if (!yaml_parser_register_anchor(parser, index,
- first_event->data.mapping_start.anchor)) return 0;
-
- if (!yaml_parser_parse(parser, &event)) return 0;
-
- while (event.type != YAML_MAPPING_END_EVENT) {
- if (!STACK_LIMIT(parser,
- parser->document->nodes.start[index-1].data.mapping.pairs,
- INT_MAX-1)) return 0;
- pair.key = yaml_parser_load_node(parser, &event);
- if (!pair.key) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- pair.value = yaml_parser_load_node(parser, &event);
- if (!pair.value) return 0;
- if (!PUSH(parser,
- parser->document->nodes.start[index-1].data.mapping.pairs,
- pair)) return 0;
- if (!yaml_parser_parse(parser, &event)) return 0;
- }
-
- parser->document->nodes.start[index-1].end_mark = event.end_mark;
-
- return index;
-
-error:
- yaml_free(tag);
- yaml_free(first_event->data.mapping_start.anchor);
- return 0;
-}
-
diff --git a/ext/psych/yaml/parser.c b/ext/psych/yaml/parser.c
deleted file mode 100644
index 621f676bf2..0000000000
--- a/ext/psych/yaml/parser.c
+++ /dev/null
@@ -1,1370 +0,0 @@
-
-/*
- * The parser implements the following grammar:
- *
- * stream ::= STREAM-START implicit_document? explicit_document* STREAM-END
- * implicit_document ::= block_node DOCUMENT-END*
- * explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
- * block_node_or_indentless_sequence ::=
- * ALIAS
- * | properties (block_content | indentless_block_sequence)?
- * | block_content
- * | indentless_block_sequence
- * block_node ::= ALIAS
- * | properties block_content?
- * | block_content
- * flow_node ::= ALIAS
- * | properties flow_content?
- * | flow_content
- * properties ::= TAG ANCHOR? | ANCHOR TAG?
- * block_content ::= block_collection | flow_collection | SCALAR
- * flow_content ::= flow_collection | SCALAR
- * block_collection ::= block_sequence | block_mapping
- * flow_collection ::= flow_sequence | flow_mapping
- * block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END
- * indentless_sequence ::= (BLOCK-ENTRY block_node?)+
- * block_mapping ::= BLOCK-MAPPING_START
- * ((KEY block_node_or_indentless_sequence?)?
- * (VALUE block_node_or_indentless_sequence?)?)*
- * BLOCK-END
- * flow_sequence ::= FLOW-SEQUENCE-START
- * (flow_sequence_entry FLOW-ENTRY)*
- * flow_sequence_entry?
- * FLOW-SEQUENCE-END
- * flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * flow_mapping ::= FLOW-MAPPING-START
- * (flow_mapping_entry FLOW-ENTRY)*
- * flow_mapping_entry?
- * FLOW-MAPPING-END
- * flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- */
-
-#include "yaml_private.h"
-
-/*
- * Peek the next token in the token queue.
- */
-
-#define PEEK_TOKEN(parser) \
- ((parser->token_available || yaml_parser_fetch_more_tokens(parser)) ? \
- parser->tokens.head : NULL)
-
-/*
- * Remove the next token from the queue (must be called after PEEK_TOKEN).
- */
-
-#define SKIP_TOKEN(parser) \
- (parser->token_available = 0, \
- parser->tokens_parsed ++, \
- parser->stream_end_produced = \
- (parser->tokens.head->type == YAML_STREAM_END_TOKEN), \
- parser->tokens.head ++)
-
-/*
- * Public API declarations.
- */
-
-YAML_DECLARE(int)
-yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event);
-
-/*
- * Error handling.
- */
-
-static int
-yaml_parser_set_parser_error(yaml_parser_t *parser,
- const char *problem, yaml_mark_t problem_mark);
-
-static int
-yaml_parser_set_parser_error_context(yaml_parser_t *parser,
- const char *context, yaml_mark_t context_mark,
- const char *problem, yaml_mark_t problem_mark);
-
-/*
- * State functions.
- */
-
-static int
-yaml_parser_state_machine(yaml_parser_t *parser, yaml_event_t *event);
-
-static int
-yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event);
-
-static int
-yaml_parser_parse_document_start(yaml_parser_t *parser, yaml_event_t *event,
- int implicit);
-
-static int
-yaml_parser_parse_document_content(yaml_parser_t *parser, yaml_event_t *event);
-
-static int
-yaml_parser_parse_document_end(yaml_parser_t *parser, yaml_event_t *event);
-
-static int
-yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event,
- int block, int indentless_sequence);
-
-static int
-yaml_parser_parse_block_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event, int first);
-
-static int
-yaml_parser_parse_indentless_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event);
-
-static int
-yaml_parser_parse_block_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event, int first);
-
-static int
-yaml_parser_parse_block_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event);
-
-static int
-yaml_parser_parse_flow_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event, int first);
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event);
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event);
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_end(yaml_parser_t *parser,
- yaml_event_t *event);
-
-static int
-yaml_parser_parse_flow_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event, int first);
-
-static int
-yaml_parser_parse_flow_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event, int empty);
-
-/*
- * Utility functions.
- */
-
-static int
-yaml_parser_process_empty_scalar(yaml_parser_t *parser,
- yaml_event_t *event, yaml_mark_t mark);
-
-static int
-yaml_parser_process_directives(yaml_parser_t *parser,
- yaml_version_directive_t **version_directive_ref,
- yaml_tag_directive_t **tag_directives_start_ref,
- yaml_tag_directive_t **tag_directives_end_ref);
-
-static int
-yaml_parser_append_tag_directive(yaml_parser_t *parser,
- yaml_tag_directive_t value, int allow_duplicates, yaml_mark_t mark);
-
-/*
- * Get the next event.
- */
-
-YAML_DECLARE(int)
-yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event)
-{
- assert(parser); /* Non-NULL parser object is expected. */
- assert(event); /* Non-NULL event object is expected. */
-
- /* Erase the event object. */
-
- memset(event, 0, sizeof(yaml_event_t));
-
- /* No events after the end of the stream or error. */
-
- if (parser->stream_end_produced || parser->error ||
- parser->state == YAML_PARSE_END_STATE) {
- return 1;
- }
-
- /* Generate the next event. */
-
- return yaml_parser_state_machine(parser, event);
-}
-
-/*
- * Set parser error.
- */
-
-static int
-yaml_parser_set_parser_error(yaml_parser_t *parser,
- const char *problem, yaml_mark_t problem_mark)
-{
- parser->error = YAML_PARSER_ERROR;
- parser->problem = problem;
- parser->problem_mark = problem_mark;
-
- return 0;
-}
-
-static int
-yaml_parser_set_parser_error_context(yaml_parser_t *parser,
- const char *context, yaml_mark_t context_mark,
- const char *problem, yaml_mark_t problem_mark)
-{
- parser->error = YAML_PARSER_ERROR;
- parser->context = context;
- parser->context_mark = context_mark;
- parser->problem = problem;
- parser->problem_mark = problem_mark;
-
- return 0;
-}
-
-
-/*
- * State dispatcher.
- */
-
-static int
-yaml_parser_state_machine(yaml_parser_t *parser, yaml_event_t *event)
-{
- switch (parser->state)
- {
- case YAML_PARSE_STREAM_START_STATE:
- return yaml_parser_parse_stream_start(parser, event);
-
- case YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE:
- return yaml_parser_parse_document_start(parser, event, 1);
-
- case YAML_PARSE_DOCUMENT_START_STATE:
- return yaml_parser_parse_document_start(parser, event, 0);
-
- case YAML_PARSE_DOCUMENT_CONTENT_STATE:
- return yaml_parser_parse_document_content(parser, event);
-
- case YAML_PARSE_DOCUMENT_END_STATE:
- return yaml_parser_parse_document_end(parser, event);
-
- case YAML_PARSE_BLOCK_NODE_STATE:
- return yaml_parser_parse_node(parser, event, 1, 0);
-
- case YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE:
- return yaml_parser_parse_node(parser, event, 1, 1);
-
- case YAML_PARSE_FLOW_NODE_STATE:
- return yaml_parser_parse_node(parser, event, 0, 0);
-
- case YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE:
- return yaml_parser_parse_block_sequence_entry(parser, event, 1);
-
- case YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE:
- return yaml_parser_parse_block_sequence_entry(parser, event, 0);
-
- case YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE:
- return yaml_parser_parse_indentless_sequence_entry(parser, event);
-
- case YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE:
- return yaml_parser_parse_block_mapping_key(parser, event, 1);
-
- case YAML_PARSE_BLOCK_MAPPING_KEY_STATE:
- return yaml_parser_parse_block_mapping_key(parser, event, 0);
-
- case YAML_PARSE_BLOCK_MAPPING_VALUE_STATE:
- return yaml_parser_parse_block_mapping_value(parser, event);
-
- case YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE:
- return yaml_parser_parse_flow_sequence_entry(parser, event, 1);
-
- case YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE:
- return yaml_parser_parse_flow_sequence_entry(parser, event, 0);
-
- case YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE:
- return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event);
-
- case YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE:
- return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event);
-
- case YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE:
- return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event);
-
- case YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE:
- return yaml_parser_parse_flow_mapping_key(parser, event, 1);
-
- case YAML_PARSE_FLOW_MAPPING_KEY_STATE:
- return yaml_parser_parse_flow_mapping_key(parser, event, 0);
-
- case YAML_PARSE_FLOW_MAPPING_VALUE_STATE:
- return yaml_parser_parse_flow_mapping_value(parser, event, 0);
-
- case YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE:
- return yaml_parser_parse_flow_mapping_value(parser, event, 1);
-
- default:
- assert(1); /* Invalid state. */
- }
-
- return 0;
-}
-
-/*
- * Parse the production:
- * stream ::= STREAM-START implicit_document? explicit_document* STREAM-END
- * ************
- */
-
-static int
-yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type != YAML_STREAM_START_TOKEN) {
- return yaml_parser_set_parser_error(parser,
- "did not find expected <stream-start>", token->start_mark);
- }
-
- parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE;
- STREAM_START_EVENT_INIT(*event, token->data.stream_start.encoding,
- token->start_mark, token->start_mark);
- SKIP_TOKEN(parser);
-
- return 1;
-}
-
-/*
- * Parse the productions:
- * implicit_document ::= block_node DOCUMENT-END*
- * *
- * explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
- * *************************
- */
-
-static int
-yaml_parser_parse_document_start(yaml_parser_t *parser, yaml_event_t *event,
- int implicit)
-{
- yaml_token_t *token;
- yaml_version_directive_t *version_directive = NULL;
- struct {
- yaml_tag_directive_t *start;
- yaml_tag_directive_t *end;
- } tag_directives = { NULL, NULL };
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- /* Parse extra document end indicators. */
-
- if (!implicit)
- {
- while (token->type == YAML_DOCUMENT_END_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- }
- }
-
- /* Parse an implicit document. */
-
- if (implicit && token->type != YAML_VERSION_DIRECTIVE_TOKEN &&
- token->type != YAML_TAG_DIRECTIVE_TOKEN &&
- token->type != YAML_DOCUMENT_START_TOKEN &&
- token->type != YAML_STREAM_END_TOKEN)
- {
- if (!yaml_parser_process_directives(parser, NULL, NULL, NULL))
- return 0;
- if (!PUSH(parser, parser->states, YAML_PARSE_DOCUMENT_END_STATE))
- return 0;
- parser->state = YAML_PARSE_BLOCK_NODE_STATE;
- DOCUMENT_START_EVENT_INIT(*event, NULL, NULL, NULL, 1,
- token->start_mark, token->start_mark);
- return 1;
- }
-
- /* Parse an explicit document. */
-
- else if (token->type != YAML_STREAM_END_TOKEN)
- {
- yaml_mark_t start_mark, end_mark;
- start_mark = token->start_mark;
- if (!yaml_parser_process_directives(parser, &version_directive,
- &tag_directives.start, &tag_directives.end))
- return 0;
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- if (token->type != YAML_DOCUMENT_START_TOKEN) {
- yaml_parser_set_parser_error(parser,
- "did not find expected <document start>", token->start_mark);
- goto error;
- }
- if (!PUSH(parser, parser->states, YAML_PARSE_DOCUMENT_END_STATE))
- goto error;
- parser->state = YAML_PARSE_DOCUMENT_CONTENT_STATE;
- end_mark = token->end_mark;
- DOCUMENT_START_EVENT_INIT(*event, version_directive,
- tag_directives.start, tag_directives.end, 0,
- start_mark, end_mark);
- SKIP_TOKEN(parser);
- version_directive = NULL;
- tag_directives.start = tag_directives.end = NULL;
- return 1;
- }
-
- /* Parse the stream end. */
-
- else
- {
- parser->state = YAML_PARSE_END_STATE;
- STREAM_END_EVENT_INIT(*event, token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
-
-error:
- yaml_free(version_directive);
- while (tag_directives.start != tag_directives.end) {
- yaml_free(tag_directives.end[-1].handle);
- yaml_free(tag_directives.end[-1].prefix);
- tag_directives.end --;
- }
- yaml_free(tag_directives.start);
- return 0;
-}
-
-/*
- * Parse the productions:
- * explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
- * ***********
- */
-
-static int
-yaml_parser_parse_document_content(yaml_parser_t *parser, yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_VERSION_DIRECTIVE_TOKEN ||
- token->type == YAML_TAG_DIRECTIVE_TOKEN ||
- token->type == YAML_DOCUMENT_START_TOKEN ||
- token->type == YAML_DOCUMENT_END_TOKEN ||
- token->type == YAML_STREAM_END_TOKEN) {
- parser->state = POP(parser, parser->states);
- return yaml_parser_process_empty_scalar(parser, event,
- token->start_mark);
- }
- else {
- return yaml_parser_parse_node(parser, event, 1, 0);
- }
-}
-
-/*
- * Parse the productions:
- * implicit_document ::= block_node DOCUMENT-END*
- * *************
- * explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
- * *************
- */
-
-static int
-yaml_parser_parse_document_end(yaml_parser_t *parser, yaml_event_t *event)
-{
- yaml_token_t *token;
- yaml_mark_t start_mark, end_mark;
- int implicit = 1;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- start_mark = end_mark = token->start_mark;
-
- if (token->type == YAML_DOCUMENT_END_TOKEN) {
- end_mark = token->end_mark;
- SKIP_TOKEN(parser);
- implicit = 0;
- }
-
- while (!STACK_EMPTY(parser, parser->tag_directives)) {
- yaml_tag_directive_t tag_directive = POP(parser, parser->tag_directives);
- yaml_free(tag_directive.handle);
- yaml_free(tag_directive.prefix);
- }
-
- parser->state = YAML_PARSE_DOCUMENT_START_STATE;
- DOCUMENT_END_EVENT_INIT(*event, implicit, start_mark, end_mark);
-
- return 1;
-}
-
-/*
- * Parse the productions:
- * block_node_or_indentless_sequence ::=
- * ALIAS
- * *****
- * | properties (block_content | indentless_block_sequence)?
- * ********** *
- * | block_content | indentless_block_sequence
- * *
- * block_node ::= ALIAS
- * *****
- * | properties block_content?
- * ********** *
- * | block_content
- * *
- * flow_node ::= ALIAS
- * *****
- * | properties flow_content?
- * ********** *
- * | flow_content
- * *
- * properties ::= TAG ANCHOR? | ANCHOR TAG?
- * *************************
- * block_content ::= block_collection | flow_collection | SCALAR
- * ******
- * flow_content ::= flow_collection | SCALAR
- * ******
- */
-
-static int
-yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event,
- int block, int indentless_sequence)
-{
- yaml_token_t *token;
- yaml_char_t *anchor = NULL;
- yaml_char_t *tag_handle = NULL;
- yaml_char_t *tag_suffix = NULL;
- yaml_char_t *tag = NULL;
- yaml_mark_t start_mark, end_mark, tag_mark;
- int implicit;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_ALIAS_TOKEN)
- {
- parser->state = POP(parser, parser->states);
- ALIAS_EVENT_INIT(*event, token->data.alias.value,
- token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
-
- else
- {
- start_mark = end_mark = token->start_mark;
-
- if (token->type == YAML_ANCHOR_TOKEN)
- {
- anchor = token->data.anchor.value;
- start_mark = token->start_mark;
- end_mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- if (token->type == YAML_TAG_TOKEN)
- {
- tag_handle = token->data.tag.handle;
- tag_suffix = token->data.tag.suffix;
- tag_mark = token->start_mark;
- end_mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- }
- }
- else if (token->type == YAML_TAG_TOKEN)
- {
- tag_handle = token->data.tag.handle;
- tag_suffix = token->data.tag.suffix;
- start_mark = tag_mark = token->start_mark;
- end_mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- if (token->type == YAML_ANCHOR_TOKEN)
- {
- anchor = token->data.anchor.value;
- end_mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- }
- }
-
- if (tag_handle) {
- if (!*tag_handle) {
- tag = tag_suffix;
- yaml_free(tag_handle);
- tag_handle = tag_suffix = NULL;
- }
- else {
- yaml_tag_directive_t *tag_directive;
- for (tag_directive = parser->tag_directives.start;
- tag_directive != parser->tag_directives.top;
- tag_directive ++) {
- if (strcmp((char *)tag_directive->handle, (char *)tag_handle) == 0) {
- size_t prefix_len = strlen((char *)tag_directive->prefix);
- size_t suffix_len = strlen((char *)tag_suffix);
- tag = YAML_MALLOC(prefix_len+suffix_len+1);
- if (!tag) {
- parser->error = YAML_MEMORY_ERROR;
- goto error;
- }
- memcpy(tag, tag_directive->prefix, prefix_len);
- memcpy(tag+prefix_len, tag_suffix, suffix_len);
- tag[prefix_len+suffix_len] = '\0';
- yaml_free(tag_handle);
- yaml_free(tag_suffix);
- tag_handle = tag_suffix = NULL;
- break;
- }
- }
- if (!tag) {
- yaml_parser_set_parser_error_context(parser,
- "while parsing a node", start_mark,
- "found undefined tag handle", tag_mark);
- goto error;
- }
- }
- }
-
- implicit = (!tag || !*tag);
- if (indentless_sequence && token->type == YAML_BLOCK_ENTRY_TOKEN) {
- end_mark = token->end_mark;
- parser->state = YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE;
- SEQUENCE_START_EVENT_INIT(*event, anchor, tag, implicit,
- YAML_BLOCK_SEQUENCE_STYLE, start_mark, end_mark);
- return 1;
- }
- else {
- if (token->type == YAML_SCALAR_TOKEN) {
- int plain_implicit = 0;
- int quoted_implicit = 0;
- end_mark = token->end_mark;
- if ((token->data.scalar.style == YAML_PLAIN_SCALAR_STYLE && !tag)
- || (tag && strcmp((char *)tag, "!") == 0)) {
- plain_implicit = 1;
- }
- else if (!tag) {
- quoted_implicit = 1;
- }
- parser->state = POP(parser, parser->states);
- SCALAR_EVENT_INIT(*event, anchor, tag,
- token->data.scalar.value, token->data.scalar.length,
- plain_implicit, quoted_implicit,
- token->data.scalar.style, start_mark, end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
- else if (token->type == YAML_FLOW_SEQUENCE_START_TOKEN) {
- end_mark = token->end_mark;
- parser->state = YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE;
- SEQUENCE_START_EVENT_INIT(*event, anchor, tag, implicit,
- YAML_FLOW_SEQUENCE_STYLE, start_mark, end_mark);
- return 1;
- }
- else if (token->type == YAML_FLOW_MAPPING_START_TOKEN) {
- end_mark = token->end_mark;
- parser->state = YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE;
- MAPPING_START_EVENT_INIT(*event, anchor, tag, implicit,
- YAML_FLOW_MAPPING_STYLE, start_mark, end_mark);
- return 1;
- }
- else if (block && token->type == YAML_BLOCK_SEQUENCE_START_TOKEN) {
- end_mark = token->end_mark;
- parser->state = YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE;
- SEQUENCE_START_EVENT_INIT(*event, anchor, tag, implicit,
- YAML_BLOCK_SEQUENCE_STYLE, start_mark, end_mark);
- return 1;
- }
- else if (block && token->type == YAML_BLOCK_MAPPING_START_TOKEN) {
- end_mark = token->end_mark;
- parser->state = YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE;
- MAPPING_START_EVENT_INIT(*event, anchor, tag, implicit,
- YAML_BLOCK_MAPPING_STYLE, start_mark, end_mark);
- return 1;
- }
- else if (anchor || tag) {
- yaml_char_t *value = YAML_MALLOC(1);
- if (!value) {
- parser->error = YAML_MEMORY_ERROR;
- goto error;
- }
- value[0] = '\0';
- parser->state = POP(parser, parser->states);
- SCALAR_EVENT_INIT(*event, anchor, tag, value, 0,
- implicit, 0, YAML_PLAIN_SCALAR_STYLE,
- start_mark, end_mark);
- return 1;
- }
- else {
- yaml_parser_set_parser_error_context(parser,
- (block ? "while parsing a block node"
- : "while parsing a flow node"), start_mark,
- "did not find expected node content", token->start_mark);
- goto error;
- }
- }
- }
-
-error:
- yaml_free(anchor);
- yaml_free(tag_handle);
- yaml_free(tag_suffix);
- yaml_free(tag);
-
- return 0;
-}
-
-/*
- * Parse the productions:
- * block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END
- * ******************** *********** * *********
- */
-
-static int
-yaml_parser_parse_block_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event, int first)
-{
- yaml_token_t *token;
-
- if (first) {
- token = PEEK_TOKEN(parser);
- if (!PUSH(parser, parser->marks, token->start_mark))
- return 0;
- SKIP_TOKEN(parser);
- }
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_BLOCK_ENTRY_TOKEN)
- {
- yaml_mark_t mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_BLOCK_ENTRY_TOKEN &&
- token->type != YAML_BLOCK_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 1, 0);
- }
- else {
- parser->state = YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE;
- return yaml_parser_process_empty_scalar(parser, event, mark);
- }
- }
-
- else if (token->type == YAML_BLOCK_END_TOKEN)
- {
- parser->state = POP(parser, parser->states);
- (void)POP(parser, parser->marks);
- SEQUENCE_END_EVENT_INIT(*event, token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
-
- else
- {
- return yaml_parser_set_parser_error_context(parser,
- "while parsing a block collection", POP(parser, parser->marks),
- "did not find expected '-' indicator", token->start_mark);
- }
-}
-
-/*
- * Parse the productions:
- * indentless_sequence ::= (BLOCK-ENTRY block_node?)+
- * *********** *
- */
-
-static int
-yaml_parser_parse_indentless_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_BLOCK_ENTRY_TOKEN)
- {
- yaml_mark_t mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_BLOCK_ENTRY_TOKEN &&
- token->type != YAML_KEY_TOKEN &&
- token->type != YAML_VALUE_TOKEN &&
- token->type != YAML_BLOCK_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 1, 0);
- }
- else {
- parser->state = YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE;
- return yaml_parser_process_empty_scalar(parser, event, mark);
- }
- }
-
- else
- {
- parser->state = POP(parser, parser->states);
- SEQUENCE_END_EVENT_INIT(*event, token->start_mark, token->start_mark);
- return 1;
- }
-}
-
-/*
- * Parse the productions:
- * block_mapping ::= BLOCK-MAPPING_START
- * *******************
- * ((KEY block_node_or_indentless_sequence?)?
- * *** *
- * (VALUE block_node_or_indentless_sequence?)?)*
- *
- * BLOCK-END
- * *********
- */
-
-static int
-yaml_parser_parse_block_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event, int first)
-{
- yaml_token_t *token;
-
- if (first) {
- token = PEEK_TOKEN(parser);
- if (!PUSH(parser, parser->marks, token->start_mark))
- return 0;
- SKIP_TOKEN(parser);
- }
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_KEY_TOKEN)
- {
- yaml_mark_t mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_KEY_TOKEN &&
- token->type != YAML_VALUE_TOKEN &&
- token->type != YAML_BLOCK_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_BLOCK_MAPPING_VALUE_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 1, 1);
- }
- else {
- parser->state = YAML_PARSE_BLOCK_MAPPING_VALUE_STATE;
- return yaml_parser_process_empty_scalar(parser, event, mark);
- }
- }
-
- else if (token->type == YAML_BLOCK_END_TOKEN)
- {
- parser->state = POP(parser, parser->states);
- (void)POP(parser, parser->marks);
- MAPPING_END_EVENT_INIT(*event, token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
-
- else
- {
- return yaml_parser_set_parser_error_context(parser,
- "while parsing a block mapping", POP(parser, parser->marks),
- "did not find expected key", token->start_mark);
- }
-}
-
-/*
- * Parse the productions:
- * block_mapping ::= BLOCK-MAPPING_START
- *
- * ((KEY block_node_or_indentless_sequence?)?
- *
- * (VALUE block_node_or_indentless_sequence?)?)*
- * ***** *
- * BLOCK-END
- *
- */
-
-static int
-yaml_parser_parse_block_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_VALUE_TOKEN)
- {
- yaml_mark_t mark = token->end_mark;
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_KEY_TOKEN &&
- token->type != YAML_VALUE_TOKEN &&
- token->type != YAML_BLOCK_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_BLOCK_MAPPING_KEY_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 1, 1);
- }
- else {
- parser->state = YAML_PARSE_BLOCK_MAPPING_KEY_STATE;
- return yaml_parser_process_empty_scalar(parser, event, mark);
- }
- }
-
- else
- {
- parser->state = YAML_PARSE_BLOCK_MAPPING_KEY_STATE;
- return yaml_parser_process_empty_scalar(parser, event, token->start_mark);
- }
-}
-
-/*
- * Parse the productions:
- * flow_sequence ::= FLOW-SEQUENCE-START
- * *******************
- * (flow_sequence_entry FLOW-ENTRY)*
- * * **********
- * flow_sequence_entry?
- * *
- * FLOW-SEQUENCE-END
- * *****************
- * flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * *
- */
-
-static int
-yaml_parser_parse_flow_sequence_entry(yaml_parser_t *parser,
- yaml_event_t *event, int first)
-{
- yaml_token_t *token;
-
- if (first) {
- token = PEEK_TOKEN(parser);
- if (!PUSH(parser, parser->marks, token->start_mark))
- return 0;
- SKIP_TOKEN(parser);
- }
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type != YAML_FLOW_SEQUENCE_END_TOKEN)
- {
- if (!first) {
- if (token->type == YAML_FLOW_ENTRY_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- }
- else {
- return yaml_parser_set_parser_error_context(parser,
- "while parsing a flow sequence", POP(parser, parser->marks),
- "did not find expected ',' or ']'", token->start_mark);
- }
- }
-
- if (token->type == YAML_KEY_TOKEN) {
- parser->state = YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE;
- MAPPING_START_EVENT_INIT(*event, NULL, NULL,
- 1, YAML_FLOW_MAPPING_STYLE,
- token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
- }
-
- else if (token->type != YAML_FLOW_SEQUENCE_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- }
-
- parser->state = POP(parser, parser->states);
- (void)POP(parser, parser->marks);
- SEQUENCE_END_EVENT_INIT(*event, token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
-}
-
-/*
- * Parse the productions:
- * flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * *** *
- */
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type != YAML_VALUE_TOKEN && token->type != YAML_FLOW_ENTRY_TOKEN
- && token->type != YAML_FLOW_SEQUENCE_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- else {
- yaml_mark_t mark = token->end_mark;
- SKIP_TOKEN(parser);
- parser->state = YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE;
- return yaml_parser_process_empty_scalar(parser, event, mark);
- }
-}
-
-/*
- * Parse the productions:
- * flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * ***** *
- */
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type == YAML_VALUE_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_FLOW_ENTRY_TOKEN
- && token->type != YAML_FLOW_SEQUENCE_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- }
- parser->state = YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE;
- return yaml_parser_process_empty_scalar(parser, event, token->start_mark);
-}
-
-/*
- * Parse the productions:
- * flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * *
- */
-
-static int
-yaml_parser_parse_flow_sequence_entry_mapping_end(yaml_parser_t *parser,
- yaml_event_t *event)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- parser->state = YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE;
-
- MAPPING_END_EVENT_INIT(*event, token->start_mark, token->start_mark);
- return 1;
-}
-
-/*
- * Parse the productions:
- * flow_mapping ::= FLOW-MAPPING-START
- * ******************
- * (flow_mapping_entry FLOW-ENTRY)*
- * * **********
- * flow_mapping_entry?
- * ******************
- * FLOW-MAPPING-END
- * ****************
- * flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * * *** *
- */
-
-static int
-yaml_parser_parse_flow_mapping_key(yaml_parser_t *parser,
- yaml_event_t *event, int first)
-{
- yaml_token_t *token;
-
- if (first) {
- token = PEEK_TOKEN(parser);
- if (!PUSH(parser, parser->marks, token->start_mark))
- return 0;
- SKIP_TOKEN(parser);
- }
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (token->type != YAML_FLOW_MAPPING_END_TOKEN)
- {
- if (!first) {
- if (token->type == YAML_FLOW_ENTRY_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- }
- else {
- return yaml_parser_set_parser_error_context(parser,
- "while parsing a flow mapping", POP(parser, parser->marks),
- "did not find expected ',' or '}'", token->start_mark);
- }
- }
-
- if (token->type == YAML_KEY_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_VALUE_TOKEN
- && token->type != YAML_FLOW_ENTRY_TOKEN
- && token->type != YAML_FLOW_MAPPING_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_MAPPING_VALUE_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- else {
- parser->state = YAML_PARSE_FLOW_MAPPING_VALUE_STATE;
- return yaml_parser_process_empty_scalar(parser, event,
- token->start_mark);
- }
- }
- else if (token->type != YAML_FLOW_MAPPING_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- }
-
- parser->state = POP(parser, parser->states);
- (void)POP(parser, parser->marks);
- MAPPING_END_EVENT_INIT(*event, token->start_mark, token->end_mark);
- SKIP_TOKEN(parser);
- return 1;
-}
-
-/*
- * Parse the productions:
- * flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)?
- * * ***** *
- */
-
-static int
-yaml_parser_parse_flow_mapping_value(yaml_parser_t *parser,
- yaml_event_t *event, int empty)
-{
- yaml_token_t *token;
-
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
-
- if (empty) {
- parser->state = YAML_PARSE_FLOW_MAPPING_KEY_STATE;
- return yaml_parser_process_empty_scalar(parser, event,
- token->start_mark);
- }
-
- if (token->type == YAML_VALUE_TOKEN) {
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) return 0;
- if (token->type != YAML_FLOW_ENTRY_TOKEN
- && token->type != YAML_FLOW_MAPPING_END_TOKEN) {
- if (!PUSH(parser, parser->states,
- YAML_PARSE_FLOW_MAPPING_KEY_STATE))
- return 0;
- return yaml_parser_parse_node(parser, event, 0, 0);
- }
- }
-
- parser->state = YAML_PARSE_FLOW_MAPPING_KEY_STATE;
- return yaml_parser_process_empty_scalar(parser, event, token->start_mark);
-}
-
-/*
- * Generate an empty scalar event.
- */
-
-static int
-yaml_parser_process_empty_scalar(yaml_parser_t *parser, yaml_event_t *event,
- yaml_mark_t mark)
-{
- yaml_char_t *value;
-
- value = YAML_MALLOC(1);
- if (!value) {
- parser->error = YAML_MEMORY_ERROR;
- return 0;
- }
- value[0] = '\0';
-
- SCALAR_EVENT_INIT(*event, NULL, NULL, value, 0,
- 1, 0, YAML_PLAIN_SCALAR_STYLE, mark, mark);
-
- return 1;
-}
-
-/*
- * Parse directives.
- */
-
-static int
-yaml_parser_process_directives(yaml_parser_t *parser,
- yaml_version_directive_t **version_directive_ref,
- yaml_tag_directive_t **tag_directives_start_ref,
- yaml_tag_directive_t **tag_directives_end_ref)
-{
- yaml_tag_directive_t default_tag_directives[] = {
- {(yaml_char_t *)"!", (yaml_char_t *)"!"},
- {(yaml_char_t *)"!!", (yaml_char_t *)"tag:yaml.org,2002:"},
- {NULL, NULL}
- };
- yaml_tag_directive_t *default_tag_directive;
- yaml_version_directive_t *version_directive = NULL;
- struct {
- yaml_tag_directive_t *start;
- yaml_tag_directive_t *end;
- yaml_tag_directive_t *top;
- } tag_directives = { NULL, NULL, NULL };
- yaml_token_t *token;
-
- if (!STACK_INIT(parser, tag_directives, yaml_tag_directive_t*))
- goto error;
-
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
-
- while (token->type == YAML_VERSION_DIRECTIVE_TOKEN ||
- token->type == YAML_TAG_DIRECTIVE_TOKEN)
- {
- if (token->type == YAML_VERSION_DIRECTIVE_TOKEN) {
- if (version_directive) {
- yaml_parser_set_parser_error(parser,
- "found duplicate %YAML directive", token->start_mark);
- goto error;
- }
- if (token->data.version_directive.major != 1
- || token->data.version_directive.minor != 1) {
- yaml_parser_set_parser_error(parser,
- "found incompatible YAML document", token->start_mark);
- goto error;
- }
- version_directive = YAML_MALLOC_STATIC(yaml_version_directive_t);
- if (!version_directive) {
- parser->error = YAML_MEMORY_ERROR;
- goto error;
- }
- version_directive->major = token->data.version_directive.major;
- version_directive->minor = token->data.version_directive.minor;
- }
-
- else if (token->type == YAML_TAG_DIRECTIVE_TOKEN) {
- yaml_tag_directive_t value;
- value.handle = token->data.tag_directive.handle;
- value.prefix = token->data.tag_directive.prefix;
-
- if (!yaml_parser_append_tag_directive(parser, value, 0,
- token->start_mark))
- goto error;
- if (!PUSH(parser, tag_directives, value))
- goto error;
- }
-
- SKIP_TOKEN(parser);
- token = PEEK_TOKEN(parser);
- if (!token) goto error;
- }
-
- for (default_tag_directive = default_tag_directives;
- default_tag_directive->handle; default_tag_directive++) {
- if (!yaml_parser_append_tag_directive(parser, *default_tag_directive, 1,
- token->start_mark))
- goto error;
- }
-
- if (version_directive_ref) {
- *version_directive_ref = version_directive;
- }
- if (tag_directives_start_ref) {
- if (STACK_EMPTY(parser, tag_directives)) {
- *tag_directives_start_ref = *tag_directives_end_ref = NULL;
- STACK_DEL(parser, tag_directives);
- }
- else {
- *tag_directives_start_ref = tag_directives.start;
- *tag_directives_end_ref = tag_directives.top;
- }
- }
- else {
- STACK_DEL(parser, tag_directives);
- }
-
- return 1;
-
-error:
- yaml_free(version_directive);
- while (!STACK_EMPTY(parser, tag_directives)) {
- yaml_tag_directive_t tag_directive = POP(parser, tag_directives);
- yaml_free(tag_directive.handle);
- yaml_free(tag_directive.prefix);
- }
- STACK_DEL(parser, tag_directives);
- return 0;
-}
-
-/*
- * Append a tag directive to the directives stack.
- */
-
-static int
-yaml_parser_append_tag_directive(yaml_parser_t *parser,
- yaml_tag_directive_t value, int allow_duplicates, yaml_mark_t mark)
-{
- yaml_tag_directive_t *tag_directive;
- yaml_tag_directive_t copy = { NULL, NULL };
-
- for (tag_directive = parser->tag_directives.start;
- tag_directive != parser->tag_directives.top; tag_directive ++) {
- if (strcmp((char *)value.handle, (char *)tag_directive->handle) == 0) {
- if (allow_duplicates)
- return 1;
- return yaml_parser_set_parser_error(parser,
- "found duplicate %TAG directive", mark);
- }
- }
-
- copy.handle = yaml_strdup(value.handle);
- copy.prefix = yaml_strdup(value.prefix);
- if (!copy.handle || !copy.prefix) {
- parser->error = YAML_MEMORY_ERROR;
- goto error;
- }
-
- if (!PUSH(parser, parser->tag_directives, copy))
- goto error;
-
- return 1;
-
-error:
- yaml_free(copy.handle);
- yaml_free(copy.prefix);
- return 0;
-}
-
diff --git a/ext/psych/yaml/reader.c b/ext/psych/yaml/reader.c
deleted file mode 100644
index f3ac54c251..0000000000
--- a/ext/psych/yaml/reader.c
+++ /dev/null
@@ -1,469 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * Declarations.
- */
-
-static int
-yaml_parser_set_reader_error(yaml_parser_t *parser, const char *problem,
- size_t offset, int value);
-
-static int
-yaml_parser_update_raw_buffer(yaml_parser_t *parser);
-
-static int
-yaml_parser_determine_encoding(yaml_parser_t *parser);
-
-YAML_DECLARE(int)
-yaml_parser_update_buffer(yaml_parser_t *parser, size_t length);
-
-/*
- * Set the reader error and return 0.
- */
-
-static int
-yaml_parser_set_reader_error(yaml_parser_t *parser, const char *problem,
- size_t offset, int value)
-{
- parser->error = YAML_READER_ERROR;
- parser->problem = problem;
- parser->problem_offset = offset;
- parser->problem_value = value;
-
- return 0;
-}
-
-/*
- * Byte order marks.
- */
-
-#define BOM_UTF8 "\xef\xbb\xbf"
-#define BOM_UTF16LE "\xff\xfe"
-#define BOM_UTF16BE "\xfe\xff"
-
-/*
- * Determine the input stream encoding by checking the BOM symbol. If no BOM is
- * found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure.
- */
-
-static int
-yaml_parser_determine_encoding(yaml_parser_t *parser)
-{
- /* Ensure that we had enough bytes in the raw buffer. */
-
- while (!parser->eof
- && parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
- if (!yaml_parser_update_raw_buffer(parser)) {
- return 0;
- }
- }
-
- /* Determine the encoding. */
-
- if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
- && !memcmp(parser->raw_buffer.pointer, BOM_UTF16LE, 2)) {
- parser->encoding = YAML_UTF16LE_ENCODING;
- parser->raw_buffer.pointer += 2;
- parser->offset += 2;
- }
- else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
- && !memcmp(parser->raw_buffer.pointer, BOM_UTF16BE, 2)) {
- parser->encoding = YAML_UTF16BE_ENCODING;
- parser->raw_buffer.pointer += 2;
- parser->offset += 2;
- }
- else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 3
- && !memcmp(parser->raw_buffer.pointer, BOM_UTF8, 3)) {
- parser->encoding = YAML_UTF8_ENCODING;
- parser->raw_buffer.pointer += 3;
- parser->offset += 3;
- }
- else {
- parser->encoding = YAML_UTF8_ENCODING;
- }
-
- return 1;
-}
-
-/*
- * Update the raw buffer.
- */
-
-static int
-yaml_parser_update_raw_buffer(yaml_parser_t *parser)
-{
- size_t size_read = 0;
-
- /* Return if the raw buffer is full. */
-
- if (parser->raw_buffer.start == parser->raw_buffer.pointer
- && parser->raw_buffer.last == parser->raw_buffer.end)
- return 1;
-
- /* Return on EOF. */
-
- if (parser->eof) return 1;
-
- /* Move the remaining bytes in the raw buffer to the beginning. */
-
- if (parser->raw_buffer.start < parser->raw_buffer.pointer
- && parser->raw_buffer.pointer < parser->raw_buffer.last) {
- memmove(parser->raw_buffer.start, parser->raw_buffer.pointer,
- parser->raw_buffer.last - parser->raw_buffer.pointer);
- }
- parser->raw_buffer.last -=
- parser->raw_buffer.pointer - parser->raw_buffer.start;
- parser->raw_buffer.pointer = parser->raw_buffer.start;
-
- /* Call the read handler to fill the buffer. */
-
- if (!parser->read_handler(parser->read_handler_data, parser->raw_buffer.last,
- parser->raw_buffer.end - parser->raw_buffer.last, &size_read)) {
- return yaml_parser_set_reader_error(parser, "input error",
- parser->offset, -1);
- }
- parser->raw_buffer.last += size_read;
- if (!size_read) {
- parser->eof = 1;
- }
-
- return 1;
-}
-
-/*
- * Ensure that the buffer contains at least `length` characters.
- * Return 1 on success, 0 on failure.
- *
- * The length is supposed to be significantly less that the buffer size.
- */
-
-YAML_DECLARE(int)
-yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
-{
- int first = 1;
-
- assert(parser->read_handler); /* Read handler must be set. */
-
- /* If the EOF flag is set and the raw buffer is empty, do nothing. */
-
- if (parser->eof && parser->raw_buffer.pointer == parser->raw_buffer.last)
- return 1;
-
- /* Return if the buffer contains enough characters. */
-
- if (parser->unread >= length)
- return 1;
-
- /* Determine the input encoding if it is not known yet. */
-
- if (!parser->encoding) {
- if (!yaml_parser_determine_encoding(parser))
- return 0;
- }
-
- /* Move the unread characters to the beginning of the buffer. */
-
- if (parser->buffer.start < parser->buffer.pointer
- && parser->buffer.pointer < parser->buffer.last) {
- size_t size = parser->buffer.last - parser->buffer.pointer;
- memmove(parser->buffer.start, parser->buffer.pointer, size);
- parser->buffer.pointer = parser->buffer.start;
- parser->buffer.last = parser->buffer.start + size;
- }
- else if (parser->buffer.pointer == parser->buffer.last) {
- parser->buffer.pointer = parser->buffer.start;
- parser->buffer.last = parser->buffer.start;
- }
-
- /* Fill the buffer until it has enough characters. */
-
- while (parser->unread < length)
- {
- /* Fill the raw buffer if necessary. */
-
- if (!first || parser->raw_buffer.pointer == parser->raw_buffer.last) {
- if (!yaml_parser_update_raw_buffer(parser)) return 0;
- }
- first = 0;
-
- /* Decode the raw buffer. */
-
- while (parser->raw_buffer.pointer != parser->raw_buffer.last)
- {
- unsigned int value = 0, value2 = 0;
- int incomplete = 0;
- unsigned char octet;
- unsigned int width = 0;
- int low, high;
- size_t k;
- size_t raw_unread = parser->raw_buffer.last - parser->raw_buffer.pointer;
-
- /* Decode the next character. */
-
- switch (parser->encoding)
- {
- case YAML_UTF8_ENCODING:
-
- /*
- * Decode a UTF-8 character. Check RFC 3629
- * (http://www.ietf.org/rfc/rfc3629.txt) for more details.
- *
- * The following table (taken from the RFC) is used for
- * decoding.
- *
- * Char. number range | UTF-8 octet sequence
- * (hexadecimal) | (binary)
- * --------------------+------------------------------------
- * 0000 0000-0000 007F | 0xxxxxxx
- * 0000 0080-0000 07FF | 110xxxxx 10xxxxxx
- * 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
- * 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
- *
- * Additionally, the characters in the range 0xD800-0xDFFF
- * are prohibited as they are reserved for use with UTF-16
- * surrogate pairs.
- */
-
- /* Determine the length of the UTF-8 sequence. */
-
- octet = parser->raw_buffer.pointer[0];
- width = (octet & 0x80) == 0x00 ? 1 :
- (octet & 0xE0) == 0xC0 ? 2 :
- (octet & 0xF0) == 0xE0 ? 3 :
- (octet & 0xF8) == 0xF0 ? 4 : 0;
-
- /* Check if the leading octet is valid. */
-
- if (!width)
- return yaml_parser_set_reader_error(parser,
- "invalid leading UTF-8 octet",
- parser->offset, octet);
-
- /* Check if the raw buffer contains an incomplete character. */
-
- if (width > raw_unread) {
- if (parser->eof) {
- return yaml_parser_set_reader_error(parser,
- "incomplete UTF-8 octet sequence",
- parser->offset, -1);
- }
- incomplete = 1;
- break;
- }
-
- /* Decode the leading octet. */
-
- value = (octet & 0x80) == 0x00 ? octet & 0x7F :
- (octet & 0xE0) == 0xC0 ? octet & 0x1F :
- (octet & 0xF0) == 0xE0 ? octet & 0x0F :
- (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
-
- /* Check and decode the trailing octets. */
-
- for (k = 1; k < width; k ++)
- {
- octet = parser->raw_buffer.pointer[k];
-
- /* Check if the octet is valid. */
-
- if ((octet & 0xC0) != 0x80)
- return yaml_parser_set_reader_error(parser,
- "invalid trailing UTF-8 octet",
- parser->offset+k, octet);
-
- /* Decode the octet. */
-
- value = (value << 6) + (octet & 0x3F);
- }
-
- /* Check the length of the sequence against the value. */
-
- if (!((width == 1) ||
- (width == 2 && value >= 0x80) ||
- (width == 3 && value >= 0x800) ||
- (width == 4 && value >= 0x10000)))
- return yaml_parser_set_reader_error(parser,
- "invalid length of a UTF-8 sequence",
- parser->offset, -1);
-
- /* Check the range of the value. */
-
- if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF)
- return yaml_parser_set_reader_error(parser,
- "invalid Unicode character",
- parser->offset, value);
-
- break;
-
- case YAML_UTF16LE_ENCODING:
- case YAML_UTF16BE_ENCODING:
-
- low = (parser->encoding == YAML_UTF16LE_ENCODING ? 0 : 1);
- high = (parser->encoding == YAML_UTF16LE_ENCODING ? 1 : 0);
-
- /*
- * The UTF-16 encoding is not as simple as one might
- * naively think. Check RFC 2781
- * (http://www.ietf.org/rfc/rfc2781.txt).
- *
- * Normally, two subsequent bytes describe a Unicode
- * character. However a special technique (called a
- * surrogate pair) is used for specifying character
- * values larger than 0xFFFF.
- *
- * A surrogate pair consists of two pseudo-characters:
- * high surrogate area (0xD800-0xDBFF)
- * low surrogate area (0xDC00-0xDFFF)
- *
- * The following formulas are used for decoding
- * and encoding characters using surrogate pairs:
- *
- * U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF)
- * U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF)
- * W1 = 110110yyyyyyyyyy
- * W2 = 110111xxxxxxxxxx
- *
- * where U is the character value, W1 is the high surrogate
- * area, W2 is the low surrogate area.
- */
-
- /* Check for incomplete UTF-16 character. */
-
- if (raw_unread < 2) {
- if (parser->eof) {
- return yaml_parser_set_reader_error(parser,
- "incomplete UTF-16 character",
- parser->offset, -1);
- }
- incomplete = 1;
- break;
- }
-
- /* Get the character. */
-
- value = parser->raw_buffer.pointer[low]
- + (parser->raw_buffer.pointer[high] << 8);
-
- /* Check for unexpected low surrogate area. */
-
- if ((value & 0xFC00) == 0xDC00)
- return yaml_parser_set_reader_error(parser,
- "unexpected low surrogate area",
- parser->offset, value);
-
- /* Check for a high surrogate area. */
-
- if ((value & 0xFC00) == 0xD800) {
-
- width = 4;
-
- /* Check for incomplete surrogate pair. */
-
- if (raw_unread < 4) {
- if (parser->eof) {
- return yaml_parser_set_reader_error(parser,
- "incomplete UTF-16 surrogate pair",
- parser->offset, -1);
- }
- incomplete = 1;
- break;
- }
-
- /* Get the next character. */
-
- value2 = parser->raw_buffer.pointer[low+2]
- + (parser->raw_buffer.pointer[high+2] << 8);
-
- /* Check for a low surrogate area. */
-
- if ((value2 & 0xFC00) != 0xDC00)
- return yaml_parser_set_reader_error(parser,
- "expected low surrogate area",
- parser->offset+2, value2);
-
- /* Generate the value of the surrogate pair. */
-
- value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF);
- }
-
- else {
- width = 2;
- }
-
- break;
-
- default:
- assert(1); /* Impossible. */
- }
-
- /* Check if the raw buffer contains enough bytes to form a character. */
-
- if (incomplete) break;
-
- /*
- * Check if the character is in the allowed range:
- * #x9 | #xA | #xD | [#x20-#x7E] (8 bit)
- * | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit)
- * | [#x10000-#x10FFFF] (32 bit)
- */
-
- if (! (value == 0x09 || value == 0x0A || value == 0x0D
- || (value >= 0x20 && value <= 0x7E)
- || (value == 0x85) || (value >= 0xA0 && value <= 0xD7FF)
- || (value >= 0xE000 && value <= 0xFFFD)
- || (value >= 0x10000 && value <= 0x10FFFF)))
- return yaml_parser_set_reader_error(parser,
- "control characters are not allowed",
- parser->offset, value);
-
- /* Move the raw pointers. */
-
- parser->raw_buffer.pointer += width;
- parser->offset += width;
-
- /* Finally put the character into the buffer. */
-
- /* 0000 0000-0000 007F -> 0xxxxxxx */
- if (value <= 0x7F) {
- *(parser->buffer.last++) = value;
- }
- /* 0000 0080-0000 07FF -> 110xxxxx 10xxxxxx */
- else if (value <= 0x7FF) {
- *(parser->buffer.last++) = 0xC0 + (value >> 6);
- *(parser->buffer.last++) = 0x80 + (value & 0x3F);
- }
- /* 0000 0800-0000 FFFF -> 1110xxxx 10xxxxxx 10xxxxxx */
- else if (value <= 0xFFFF) {
- *(parser->buffer.last++) = 0xE0 + (value >> 12);
- *(parser->buffer.last++) = 0x80 + ((value >> 6) & 0x3F);
- *(parser->buffer.last++) = 0x80 + (value & 0x3F);
- }
- /* 0001 0000-0010 FFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
- else {
- *(parser->buffer.last++) = 0xF0 + (value >> 18);
- *(parser->buffer.last++) = 0x80 + ((value >> 12) & 0x3F);
- *(parser->buffer.last++) = 0x80 + ((value >> 6) & 0x3F);
- *(parser->buffer.last++) = 0x80 + (value & 0x3F);
- }
-
- parser->unread ++;
- }
-
- /* On EOF, put NUL into the buffer and return. */
-
- if (parser->eof) {
- *(parser->buffer.last++) = '\0';
- parser->unread ++;
- return 1;
- }
-
- }
-
- if (parser->offset >= MAX_FILE_SIZE) {
- return yaml_parser_set_reader_error(parser, "input is too long",
- parser->offset, -1);
- }
-
- return 1;
-}
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c
deleted file mode 100644
index 204593d910..0000000000
--- a/ext/psych/yaml/scanner.c
+++ /dev/null
@@ -1,3578 +0,0 @@
-
-/*
- * Introduction
- * ************
- *
- * The following notes assume that you are familiar with the YAML specification
- * (http://yaml.org/spec/cvs/current.html). We mostly follow it, although in
- * some cases we are less restrictive that it requires.
- *
- * The process of transforming a YAML stream into a sequence of events is
- * divided on two steps: Scanning and Parsing.
- *
- * The Scanner transforms the input stream into a sequence of tokens, while the
- * parser transform the sequence of tokens produced by the Scanner into a
- * sequence of parsing events.
- *
- * The Scanner is rather clever and complicated. The Parser, on the contrary,
- * is a straightforward implementation of a recursive-descendant parser (or,
- * LL(1) parser, as it is usually called).
- *
- * Actually there are two issues of Scanning that might be called "clever", the
- * rest is quite straightforward. The issues are "block collection start" and
- * "simple keys". Both issues are explained below in details.
- *
- * Here the Scanning step is explained and implemented. We start with the list
- * of all the tokens produced by the Scanner together with short descriptions.
- *
- * Now, tokens:
- *
- * STREAM-START(encoding) # The stream start.
- * STREAM-END # The stream end.
- * VERSION-DIRECTIVE(major,minor) # The '%YAML' directive.
- * TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive.
- * DOCUMENT-START # '---'
- * DOCUMENT-END # '...'
- * BLOCK-SEQUENCE-START # Indentation increase denoting a block
- * BLOCK-MAPPING-START # sequence or a block mapping.
- * BLOCK-END # Indentation decrease.
- * FLOW-SEQUENCE-START # '['
- * FLOW-SEQUENCE-END # ']'
- * BLOCK-SEQUENCE-START # '{'
- * BLOCK-SEQUENCE-END # '}'
- * BLOCK-ENTRY # '-'
- * FLOW-ENTRY # ','
- * KEY # '?' or nothing (simple keys).
- * VALUE # ':'
- * ALIAS(anchor) # '*anchor'
- * ANCHOR(anchor) # '&anchor'
- * TAG(handle,suffix) # '!handle!suffix'
- * SCALAR(value,style) # A scalar.
- *
- * The following two tokens are "virtual" tokens denoting the beginning and the
- * end of the stream:
- *
- * STREAM-START(encoding)
- * STREAM-END
- *
- * We pass the information about the input stream encoding with the
- * STREAM-START token.
- *
- * The next two tokens are responsible for tags:
- *
- * VERSION-DIRECTIVE(major,minor)
- * TAG-DIRECTIVE(handle,prefix)
- *
- * Example:
- *
- * %YAML 1.1
- * %TAG ! !foo
- * %TAG !yaml! tag:yaml.org,2002:
- * ---
- *
- * The corresponding sequence of tokens:
- *
- * STREAM-START(utf-8)
- * VERSION-DIRECTIVE(1,1)
- * TAG-DIRECTIVE("!","!foo")
- * TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:")
- * DOCUMENT-START
- * STREAM-END
- *
- * Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole
- * line.
- *
- * The document start and end indicators are represented by:
- *
- * DOCUMENT-START
- * DOCUMENT-END
- *
- * Note that if a YAML stream contains an implicit document (without '---'
- * and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be
- * produced.
- *
- * In the following examples, we present whole documents together with the
- * produced tokens.
- *
- * 1. An implicit document:
- *
- * 'a scalar'
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * SCALAR("a scalar",single-quoted)
- * STREAM-END
- *
- * 2. An explicit document:
- *
- * ---
- * 'a scalar'
- * ...
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * DOCUMENT-START
- * SCALAR("a scalar",single-quoted)
- * DOCUMENT-END
- * STREAM-END
- *
- * 3. Several documents in a stream:
- *
- * 'a scalar'
- * ---
- * 'another scalar'
- * ---
- * 'yet another scalar'
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * SCALAR("a scalar",single-quoted)
- * DOCUMENT-START
- * SCALAR("another scalar",single-quoted)
- * DOCUMENT-START
- * SCALAR("yet another scalar",single-quoted)
- * STREAM-END
- *
- * We have already introduced the SCALAR token above. The following tokens are
- * used to describe aliases, anchors, tag, and scalars:
- *
- * ALIAS(anchor)
- * ANCHOR(anchor)
- * TAG(handle,suffix)
- * SCALAR(value,style)
- *
- * The following series of examples illustrate the usage of these tokens:
- *
- * 1. A recursive sequence:
- *
- * &A [ *A ]
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * ANCHOR("A")
- * FLOW-SEQUENCE-START
- * ALIAS("A")
- * FLOW-SEQUENCE-END
- * STREAM-END
- *
- * 2. A tagged scalar:
- *
- * !!float "3.14" # A good approximation.
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * TAG("!!","float")
- * SCALAR("3.14",double-quoted)
- * STREAM-END
- *
- * 3. Various scalar styles:
- *
- * --- # Implicit empty plain scalars do not produce tokens.
- * --- a plain scalar
- * --- 'a single-quoted scalar'
- * --- "a double-quoted scalar"
- * --- |-
- * a literal scalar
- * --- >-
- * a folded
- * scalar
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * DOCUMENT-START
- * DOCUMENT-START
- * SCALAR("a plain scalar",plain)
- * DOCUMENT-START
- * SCALAR("a single-quoted scalar",single-quoted)
- * DOCUMENT-START
- * SCALAR("a double-quoted scalar",double-quoted)
- * DOCUMENT-START
- * SCALAR("a literal scalar",literal)
- * DOCUMENT-START
- * SCALAR("a folded scalar",folded)
- * STREAM-END
- *
- * Now it's time to review collection-related tokens. We will start with
- * flow collections:
- *
- * FLOW-SEQUENCE-START
- * FLOW-SEQUENCE-END
- * FLOW-MAPPING-START
- * FLOW-MAPPING-END
- * FLOW-ENTRY
- * KEY
- * VALUE
- *
- * The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and
- * FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}'
- * correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the
- * indicators '?' and ':', which are used for denoting mapping keys and values,
- * are represented by the KEY and VALUE tokens.
- *
- * The following examples show flow collections:
- *
- * 1. A flow sequence:
- *
- * [item 1, item 2, item 3]
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * FLOW-SEQUENCE-START
- * SCALAR("item 1",plain)
- * FLOW-ENTRY
- * SCALAR("item 2",plain)
- * FLOW-ENTRY
- * SCALAR("item 3",plain)
- * FLOW-SEQUENCE-END
- * STREAM-END
- *
- * 2. A flow mapping:
- *
- * {
- * a simple key: a value, # Note that the KEY token is produced.
- * ? a complex key: another value,
- * }
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * FLOW-MAPPING-START
- * KEY
- * SCALAR("a simple key",plain)
- * VALUE
- * SCALAR("a value",plain)
- * FLOW-ENTRY
- * KEY
- * SCALAR("a complex key",plain)
- * VALUE
- * SCALAR("another value",plain)
- * FLOW-ENTRY
- * FLOW-MAPPING-END
- * STREAM-END
- *
- * A simple key is a key which is not denoted by the '?' indicator. Note that
- * the Scanner still produce the KEY token whenever it encounters a simple key.
- *
- * For scanning block collections, the following tokens are used (note that we
- * repeat KEY and VALUE here):
- *
- * BLOCK-SEQUENCE-START
- * BLOCK-MAPPING-START
- * BLOCK-END
- * BLOCK-ENTRY
- * KEY
- * VALUE
- *
- * The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation
- * increase that precedes a block collection (cf. the INDENT token in Python).
- * The token BLOCK-END denote indentation decrease that ends a block collection
- * (cf. the DEDENT token in Python). However YAML has some syntax pecularities
- * that makes detections of these tokens more complex.
- *
- * The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators
- * '-', '?', and ':' correspondingly.
- *
- * The following examples show how the tokens BLOCK-SEQUENCE-START,
- * BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner:
- *
- * 1. Block sequences:
- *
- * - item 1
- * - item 2
- * -
- * - item 3.1
- * - item 3.2
- * -
- * key 1: value 1
- * key 2: value 2
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * SCALAR("item 1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 2",plain)
- * BLOCK-ENTRY
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * SCALAR("item 3.1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 3.2",plain)
- * BLOCK-END
- * BLOCK-ENTRY
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("key 1",plain)
- * VALUE
- * SCALAR("value 1",plain)
- * KEY
- * SCALAR("key 2",plain)
- * VALUE
- * SCALAR("value 2",plain)
- * BLOCK-END
- * BLOCK-END
- * STREAM-END
- *
- * 2. Block mappings:
- *
- * a simple key: a value # The KEY token is produced here.
- * ? a complex key
- * : another value
- * a mapping:
- * key 1: value 1
- * key 2: value 2
- * a sequence:
- * - item 1
- * - item 2
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("a simple key",plain)
- * VALUE
- * SCALAR("a value",plain)
- * KEY
- * SCALAR("a complex key",plain)
- * VALUE
- * SCALAR("another value",plain)
- * KEY
- * SCALAR("a mapping",plain)
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("key 1",plain)
- * VALUE
- * SCALAR("value 1",plain)
- * KEY
- * SCALAR("key 2",plain)
- * VALUE
- * SCALAR("value 2",plain)
- * BLOCK-END
- * KEY
- * SCALAR("a sequence",plain)
- * VALUE
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * SCALAR("item 1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 2",plain)
- * BLOCK-END
- * BLOCK-END
- * STREAM-END
- *
- * YAML does not always require to start a new block collection from a new
- * line. If the current line contains only '-', '?', and ':' indicators, a new
- * block collection may start at the current line. The following examples
- * illustrate this case:
- *
- * 1. Collections in a sequence:
- *
- * - - item 1
- * - item 2
- * - key 1: value 1
- * key 2: value 2
- * - ? complex key
- * : complex value
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * SCALAR("item 1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 2",plain)
- * BLOCK-END
- * BLOCK-ENTRY
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("key 1",plain)
- * VALUE
- * SCALAR("value 1",plain)
- * KEY
- * SCALAR("key 2",plain)
- * VALUE
- * SCALAR("value 2",plain)
- * BLOCK-END
- * BLOCK-ENTRY
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("complex key")
- * VALUE
- * SCALAR("complex value")
- * BLOCK-END
- * BLOCK-END
- * STREAM-END
- *
- * 2. Collections in a mapping:
- *
- * ? a sequence
- * : - item 1
- * - item 2
- * ? a mapping
- * : key 1: value 1
- * key 2: value 2
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("a sequence",plain)
- * VALUE
- * BLOCK-SEQUENCE-START
- * BLOCK-ENTRY
- * SCALAR("item 1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 2",plain)
- * BLOCK-END
- * KEY
- * SCALAR("a mapping",plain)
- * VALUE
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("key 1",plain)
- * VALUE
- * SCALAR("value 1",plain)
- * KEY
- * SCALAR("key 2",plain)
- * VALUE
- * SCALAR("value 2",plain)
- * BLOCK-END
- * BLOCK-END
- * STREAM-END
- *
- * YAML also permits non-indented sequences if they are included into a block
- * mapping. In this case, the token BLOCK-SEQUENCE-START is not produced:
- *
- * key:
- * - item 1 # BLOCK-SEQUENCE-START is NOT produced here.
- * - item 2
- *
- * Tokens:
- *
- * STREAM-START(utf-8)
- * BLOCK-MAPPING-START
- * KEY
- * SCALAR("key",plain)
- * VALUE
- * BLOCK-ENTRY
- * SCALAR("item 1",plain)
- * BLOCK-ENTRY
- * SCALAR("item 2",plain)
- * BLOCK-END
- */
-
-#include "yaml_private.h"
-
-/*
- * Ensure that the buffer contains the required number of characters.
- * Return 1 on success, 0 on failure (reader error or memory error).
- */
-
-#define CACHE(parser,length) \
- (parser->unread >= (length) \
- ? 1 \
- : yaml_parser_update_buffer(parser, (length)))
-
-/*
- * Advance the buffer pointer.
- */
-
-#define SKIP(parser) \
- (parser->mark.index ++, \
- parser->mark.column ++, \
- parser->unread --, \
- parser->buffer.pointer += WIDTH(parser->buffer))
-
-#define SKIP_LINE(parser) \
- (IS_CRLF(parser->buffer) ? \
- (parser->mark.index += 2, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread -= 2, \
- parser->buffer.pointer += 2) : \
- IS_BREAK(parser->buffer) ? \
- (parser->mark.index ++, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread --, \
- parser->buffer.pointer += WIDTH(parser->buffer)) : 0)
-
-/*
- * Copy a character to a string buffer and advance pointers.
- */
-
-#define READ(parser,string) \
- (STRING_EXTEND(parser,string) ? \
- (COPY(string,parser->buffer), \
- parser->mark.index ++, \
- parser->mark.column ++, \
- parser->unread --, \
- 1) : 0)
-
-/*
- * Copy a line break character to a string buffer and advance pointers.
- */
-
-#define READ_LINE(parser,string) \
- (STRING_EXTEND(parser,string) ? \
- (((CHECK_AT(parser->buffer,'\r',0) \
- && CHECK_AT(parser->buffer,'\n',1)) ? /* CR LF -> LF */ \
- (*((string).pointer++) = (yaml_char_t) '\n', \
- parser->buffer.pointer += 2, \
- parser->mark.index += 2, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread -= 2) : \
- (CHECK_AT(parser->buffer,'\r',0) \
- || CHECK_AT(parser->buffer,'\n',0)) ? /* CR|LF -> LF */ \
- (*((string).pointer++) = (yaml_char_t) '\n', \
- parser->buffer.pointer ++, \
- parser->mark.index ++, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread --) : \
- (CHECK_AT(parser->buffer,'\xC2',0) \
- && CHECK_AT(parser->buffer,'\x85',1)) ? /* NEL -> LF */ \
- (*((string).pointer++) = (yaml_char_t) '\n', \
- parser->buffer.pointer += 2, \
- parser->mark.index ++, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread --) : \
- (CHECK_AT(parser->buffer,'\xE2',0) && \
- CHECK_AT(parser->buffer,'\x80',1) && \
- (CHECK_AT(parser->buffer,'\xA8',2) || \
- CHECK_AT(parser->buffer,'\xA9',2))) ? /* LS|PS -> LS|PS */ \
- (*((string).pointer++) = *(parser->buffer.pointer++), \
- *((string).pointer++) = *(parser->buffer.pointer++), \
- *((string).pointer++) = *(parser->buffer.pointer++), \
- parser->mark.index ++, \
- parser->mark.column = 0, \
- parser->mark.line ++, \
- parser->unread --) : 0), \
- 1) : 0)
-
-/*
- * Public API declarations.
- */
-
-YAML_DECLARE(int)
-yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token);
-
-/*
- * Error handling.
- */
-
-static int
-yaml_parser_set_scanner_error(yaml_parser_t *parser, const char *context,
- yaml_mark_t context_mark, const char *problem);
-
-/*
- * High-level token API.
- */
-
-YAML_DECLARE(int)
-yaml_parser_fetch_more_tokens(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_next_token(yaml_parser_t *parser);
-
-/*
- * Potential simple keys.
- */
-
-static int
-yaml_parser_stale_simple_keys(yaml_parser_t *parser);
-
-static int
-yaml_parser_save_simple_key(yaml_parser_t *parser);
-
-static int
-yaml_parser_remove_simple_key(yaml_parser_t *parser);
-
-static int
-yaml_parser_increase_flow_level(yaml_parser_t *parser);
-
-static int
-yaml_parser_decrease_flow_level(yaml_parser_t *parser);
-
-/*
- * Indentation treatment.
- */
-
-static int
-yaml_parser_roll_indent(yaml_parser_t *parser, ptrdiff_t column,
- ptrdiff_t number, yaml_token_type_t type, yaml_mark_t mark);
-
-static int
-yaml_parser_unroll_indent(yaml_parser_t *parser, ptrdiff_t column);
-
-/*
- * Token fetchers.
- */
-
-static int
-yaml_parser_fetch_stream_start(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_stream_end(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_directive(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_document_indicator(yaml_parser_t *parser,
- yaml_token_type_t type);
-
-static int
-yaml_parser_fetch_flow_collection_start(yaml_parser_t *parser,
- yaml_token_type_t type);
-
-static int
-yaml_parser_fetch_flow_collection_end(yaml_parser_t *parser,
- yaml_token_type_t type);
-
-static int
-yaml_parser_fetch_flow_entry(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_block_entry(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_key(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_value(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_anchor(yaml_parser_t *parser, yaml_token_type_t type);
-
-static int
-yaml_parser_fetch_tag(yaml_parser_t *parser);
-
-static int
-yaml_parser_fetch_block_scalar(yaml_parser_t *parser, int literal);
-
-static int
-yaml_parser_fetch_flow_scalar(yaml_parser_t *parser, int single);
-
-static int
-yaml_parser_fetch_plain_scalar(yaml_parser_t *parser);
-
-/*
- * Token scanners.
- */
-
-static int
-yaml_parser_scan_to_next_token(yaml_parser_t *parser);
-
-static int
-yaml_parser_scan_directive(yaml_parser_t *parser, yaml_token_t *token);
-
-static int
-yaml_parser_scan_directive_name(yaml_parser_t *parser,
- yaml_mark_t start_mark, yaml_char_t **name);
-
-static int
-yaml_parser_scan_version_directive_value(yaml_parser_t *parser,
- yaml_mark_t start_mark, int *major, int *minor);
-
-static int
-yaml_parser_scan_version_directive_number(yaml_parser_t *parser,
- yaml_mark_t start_mark, int *number);
-
-static int
-yaml_parser_scan_tag_directive_value(yaml_parser_t *parser,
- yaml_mark_t mark, yaml_char_t **handle, yaml_char_t **prefix);
-
-static int
-yaml_parser_scan_anchor(yaml_parser_t *parser, yaml_token_t *token,
- yaml_token_type_t type);
-
-static int
-yaml_parser_scan_tag(yaml_parser_t *parser, yaml_token_t *token);
-
-static int
-yaml_parser_scan_tag_handle(yaml_parser_t *parser, int directive,
- yaml_mark_t start_mark, yaml_char_t **handle);
-
-static int
-yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
- yaml_char_t *head, yaml_mark_t start_mark, yaml_char_t **uri);
-
-static int
-yaml_parser_scan_uri_escapes(yaml_parser_t *parser, int directive,
- yaml_mark_t start_mark, yaml_string_t *string);
-
-static int
-yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
- int literal);
-
-static int
-yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
- int *indent, yaml_string_t *breaks,
- yaml_mark_t start_mark, yaml_mark_t *end_mark);
-
-static int
-yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
- int single);
-
-static int
-yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token);
-
-/*
- * Get the next token.
- */
-
-YAML_DECLARE(int)
-yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token)
-{
- assert(parser); /* Non-NULL parser object is expected. */
- assert(token); /* Non-NULL token object is expected. */
-
- /* Erase the token object. */
-
- memset(token, 0, sizeof(yaml_token_t));
-
- /* No tokens after STREAM-END or error. */
-
- if (parser->stream_end_produced || parser->error) {
- return 1;
- }
-
- /* Ensure that the tokens queue contains enough tokens. */
-
- if (!parser->token_available) {
- if (!yaml_parser_fetch_more_tokens(parser))
- return 0;
- }
-
- /* Fetch the next token from the queue. */
-
- *token = DEQUEUE(parser, parser->tokens);
- parser->token_available = 0;
- parser->tokens_parsed ++;
-
- if (token->type == YAML_STREAM_END_TOKEN) {
- parser->stream_end_produced = 1;
- }
-
- return 1;
-}
-
-/*
- * Set the scanner error and return 0.
- */
-
-static int
-yaml_parser_set_scanner_error(yaml_parser_t *parser, const char *context,
- yaml_mark_t context_mark, const char *problem)
-{
- parser->error = YAML_SCANNER_ERROR;
- parser->context = context;
- parser->context_mark = context_mark;
- parser->problem = problem;
- parser->problem_mark = parser->mark;
-
- return 0;
-}
-
-/*
- * Ensure that the tokens queue contains at least one token which can be
- * returned to the Parser.
- */
-
-YAML_DECLARE(int)
-yaml_parser_fetch_more_tokens(yaml_parser_t *parser)
-{
- int need_more_tokens;
-
- /* While we need more tokens to fetch, do it. */
-
- while (1)
- {
- /*
- * Check if we really need to fetch more tokens.
- */
-
- need_more_tokens = 0;
-
- if (parser->tokens.head == parser->tokens.tail)
- {
- /* Queue is empty. */
-
- need_more_tokens = 1;
- }
- else
- {
- yaml_simple_key_t *simple_key;
-
- /* Check if any potential simple key may occupy the head position. */
-
- if (!yaml_parser_stale_simple_keys(parser))
- return 0;
-
- for (simple_key = parser->simple_keys.start;
- simple_key != parser->simple_keys.top; simple_key++) {
- if (simple_key->possible
- && simple_key->token_number == parser->tokens_parsed) {
- need_more_tokens = 1;
- break;
- }
- }
- }
-
- /* We are finished. */
-
- if (!need_more_tokens)
- break;
-
- /* Fetch the next token. */
-
- if (!yaml_parser_fetch_next_token(parser))
- return 0;
- }
-
- parser->token_available = 1;
-
- return 1;
-}
-
-/*
- * The dispatcher for token fetchers.
- */
-
-static int
-yaml_parser_fetch_next_token(yaml_parser_t *parser)
-{
- /* Ensure that the buffer is initialized. */
-
- if (!CACHE(parser, 1))
- return 0;
-
- /* Check if we just started scanning. Fetch STREAM-START then. */
-
- if (!parser->stream_start_produced)
- return yaml_parser_fetch_stream_start(parser);
-
- /* Eat whitespaces and comments until we reach the next token. */
-
- if (!yaml_parser_scan_to_next_token(parser))
- return 0;
-
- /* Remove obsolete potential simple keys. */
-
- if (!yaml_parser_stale_simple_keys(parser))
- return 0;
-
- /* Check the indentation level against the current column. */
-
- if (!yaml_parser_unroll_indent(parser, parser->mark.column))
- return 0;
-
- /*
- * Ensure that the buffer contains at least 4 characters. 4 is the length
- * of the longest indicators ('--- ' and '... ').
- */
-
- if (!CACHE(parser, 4))
- return 0;
-
- /* Is it the end of the stream? */
-
- if (IS_Z(parser->buffer))
- return yaml_parser_fetch_stream_end(parser);
-
- /* Is it a directive? */
-
- if (parser->mark.column == 0 && CHECK(parser->buffer, '%'))
- return yaml_parser_fetch_directive(parser);
-
- /* Is it the document start indicator? */
-
- if (parser->mark.column == 0
- && CHECK_AT(parser->buffer, '-', 0)
- && CHECK_AT(parser->buffer, '-', 1)
- && CHECK_AT(parser->buffer, '-', 2)
- && IS_BLANKZ_AT(parser->buffer, 3))
- return yaml_parser_fetch_document_indicator(parser,
- YAML_DOCUMENT_START_TOKEN);
-
- /* Is it the document end indicator? */
-
- if (parser->mark.column == 0
- && CHECK_AT(parser->buffer, '.', 0)
- && CHECK_AT(parser->buffer, '.', 1)
- && CHECK_AT(parser->buffer, '.', 2)
- && IS_BLANKZ_AT(parser->buffer, 3))
- return yaml_parser_fetch_document_indicator(parser,
- YAML_DOCUMENT_END_TOKEN);
-
- /* Is it the flow sequence start indicator? */
-
- if (CHECK(parser->buffer, '['))
- return yaml_parser_fetch_flow_collection_start(parser,
- YAML_FLOW_SEQUENCE_START_TOKEN);
-
- /* Is it the flow mapping start indicator? */
-
- if (CHECK(parser->buffer, '{'))
- return yaml_parser_fetch_flow_collection_start(parser,
- YAML_FLOW_MAPPING_START_TOKEN);
-
- /* Is it the flow sequence end indicator? */
-
- if (CHECK(parser->buffer, ']'))
- return yaml_parser_fetch_flow_collection_end(parser,
- YAML_FLOW_SEQUENCE_END_TOKEN);
-
- /* Is it the flow mapping end indicator? */
-
- if (CHECK(parser->buffer, '}'))
- return yaml_parser_fetch_flow_collection_end(parser,
- YAML_FLOW_MAPPING_END_TOKEN);
-
- /* Is it the flow entry indicator? */
-
- if (CHECK(parser->buffer, ','))
- return yaml_parser_fetch_flow_entry(parser);
-
- /* Is it the block entry indicator? */
-
- if (CHECK(parser->buffer, '-') && IS_BLANKZ_AT(parser->buffer, 1))
- return yaml_parser_fetch_block_entry(parser);
-
- /* Is it the key indicator? */
-
- if (CHECK(parser->buffer, '?')
- && (parser->flow_level || IS_BLANKZ_AT(parser->buffer, 1)))
- return yaml_parser_fetch_key(parser);
-
- /* Is it the value indicator? */
-
- if (CHECK(parser->buffer, ':')
- && (parser->flow_level || IS_BLANKZ_AT(parser->buffer, 1)))
- return yaml_parser_fetch_value(parser);
-
- /* Is it an alias? */
-
- if (CHECK(parser->buffer, '*'))
- return yaml_parser_fetch_anchor(parser, YAML_ALIAS_TOKEN);
-
- /* Is it an anchor? */
-
- if (CHECK(parser->buffer, '&'))
- return yaml_parser_fetch_anchor(parser, YAML_ANCHOR_TOKEN);
-
- /* Is it a tag? */
-
- if (CHECK(parser->buffer, '!'))
- return yaml_parser_fetch_tag(parser);
-
- /* Is it a literal scalar? */
-
- if (CHECK(parser->buffer, '|') && !parser->flow_level)
- return yaml_parser_fetch_block_scalar(parser, 1);
-
- /* Is it a folded scalar? */
-
- if (CHECK(parser->buffer, '>') && !parser->flow_level)
- return yaml_parser_fetch_block_scalar(parser, 0);
-
- /* Is it a single-quoted scalar? */
-
- if (CHECK(parser->buffer, '\''))
- return yaml_parser_fetch_flow_scalar(parser, 1);
-
- /* Is it a double-quoted scalar? */
-
- if (CHECK(parser->buffer, '"'))
- return yaml_parser_fetch_flow_scalar(parser, 0);
-
- /*
- * Is it a plain scalar?
- *
- * A plain scalar may start with any non-blank characters except
- *
- * '-', '?', ':', ',', '[', ']', '{', '}',
- * '#', '&', '*', '!', '|', '>', '\'', '\"',
- * '%', '@', '`'.
- *
- * In the block context (and, for the '-' indicator, in the flow context
- * too), it may also start with the characters
- *
- * '-', '?', ':'
- *
- * if it is followed by a non-space character.
- *
- * The last rule is more restrictive than the specification requires.
- */
-
- if (!(IS_BLANKZ(parser->buffer) || CHECK(parser->buffer, '-')
- || CHECK(parser->buffer, '?') || CHECK(parser->buffer, ':')
- || CHECK(parser->buffer, ',') || CHECK(parser->buffer, '[')
- || CHECK(parser->buffer, ']') || CHECK(parser->buffer, '{')
- || CHECK(parser->buffer, '}') || CHECK(parser->buffer, '#')
- || CHECK(parser->buffer, '&') || CHECK(parser->buffer, '*')
- || CHECK(parser->buffer, '!') || CHECK(parser->buffer, '|')
- || CHECK(parser->buffer, '>') || CHECK(parser->buffer, '\'')
- || CHECK(parser->buffer, '"') || CHECK(parser->buffer, '%')
- || CHECK(parser->buffer, '@') || CHECK(parser->buffer, '`')) ||
- (CHECK(parser->buffer, '-') && !IS_BLANK_AT(parser->buffer, 1)) ||
- (!parser->flow_level &&
- (CHECK(parser->buffer, '?') || CHECK(parser->buffer, ':'))
- && !IS_BLANKZ_AT(parser->buffer, 1)))
- return yaml_parser_fetch_plain_scalar(parser);
-
- /*
- * If we don't determine the token type so far, it is an error.
- */
-
- return yaml_parser_set_scanner_error(parser,
- "while scanning for the next token", parser->mark,
- "found character that cannot start any token");
-}
-
-/*
- * Check the list of potential simple keys and remove the positions that
- * cannot contain simple keys anymore.
- */
-
-static int
-yaml_parser_stale_simple_keys(yaml_parser_t *parser)
-{
- yaml_simple_key_t *simple_key;
-
- /* Check for a potential simple key for each flow level. */
-
- for (simple_key = parser->simple_keys.start;
- simple_key != parser->simple_keys.top; simple_key ++)
- {
- /*
- * The specification requires that a simple key
- *
- * - is limited to a single line,
- * - is shorter than 1024 characters.
- */
-
- if (simple_key->possible
- && (simple_key->mark.line < parser->mark.line
- || simple_key->mark.index+1024 < parser->mark.index)) {
-
- /* Check if the potential simple key to be removed is required. */
-
- if (simple_key->required) {
- return yaml_parser_set_scanner_error(parser,
- "while scanning a simple key", simple_key->mark,
- "could not find expected ':'");
- }
-
- simple_key->possible = 0;
- }
- }
-
- return 1;
-}
-
-/*
- * Check if a simple key may start at the current position and add it if
- * needed.
- */
-
-static int
-yaml_parser_save_simple_key(yaml_parser_t *parser)
-{
- /*
- * A simple key is required at the current position if the scanner is in
- * the block context and the current column coincides with the indentation
- * level.
- */
-
- int required = (!parser->flow_level
- && parser->indent == (ptrdiff_t)parser->mark.column);
-
- /*
- * If the current position may start a simple key, save it.
- */
-
- if (parser->simple_key_allowed)
- {
- yaml_simple_key_t simple_key;
- simple_key.possible = 1;
- simple_key.required = required;
- simple_key.token_number =
- parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);
- simple_key.mark = parser->mark;
-
- if (!yaml_parser_remove_simple_key(parser)) return 0;
-
- *(parser->simple_keys.top-1) = simple_key;
- }
-
- return 1;
-}
-
-/*
- * Remove a potential simple key at the current flow level.
- */
-
-static int
-yaml_parser_remove_simple_key(yaml_parser_t *parser)
-{
- yaml_simple_key_t *simple_key = parser->simple_keys.top-1;
-
- if (simple_key->possible)
- {
- /* If the key is required, it is an error. */
-
- if (simple_key->required) {
- return yaml_parser_set_scanner_error(parser,
- "while scanning a simple key", simple_key->mark,
- "could not find expected ':'");
- }
- }
-
- /* Remove the key from the stack. */
-
- simple_key->possible = 0;
-
- return 1;
-}
-
-/*
- * Increase the flow level and resize the simple key list if needed.
- */
-
-static int
-yaml_parser_increase_flow_level(yaml_parser_t *parser)
-{
- yaml_simple_key_t empty_simple_key = { 0, 0, 0, { 0, 0, 0 } };
-
- /* Reset the simple key on the next level. */
-
- if (!PUSH(parser, parser->simple_keys, empty_simple_key))
- return 0;
-
- /* Increase the flow level. */
-
- if (parser->flow_level == INT_MAX) {
- parser->error = YAML_MEMORY_ERROR;
- return 0;
- }
-
- parser->flow_level++;
-
- return 1;
-}
-
-/*
- * Decrease the flow level.
- */
-
-static int
-yaml_parser_decrease_flow_level(yaml_parser_t *parser)
-{
- if (parser->flow_level) {
- parser->flow_level --;
- (void)POP(parser, parser->simple_keys);
- }
-
- return 1;
-}
-
-/*
- * Push the current indentation level to the stack and set the new level
- * the current column is greater than the indentation level. In this case,
- * append or insert the specified token into the token queue.
- *
- */
-
-static int
-yaml_parser_roll_indent(yaml_parser_t *parser, ptrdiff_t column,
- ptrdiff_t number, yaml_token_type_t type, yaml_mark_t mark)
-{
- yaml_token_t token;
-
- /* In the flow context, do nothing. */
-
- if (parser->flow_level)
- return 1;
-
- if (parser->indent < column)
- {
- /*
- * Push the current indentation level to the stack and set the new
- * indentation level.
- */
-
- if (!PUSH(parser, parser->indents, parser->indent))
- return 0;
-
- if (column > INT_MAX) {
- parser->error = YAML_MEMORY_ERROR;
- return 0;
- }
-
- parser->indent = (int)column;
-
- /* Create a token and insert it into the queue. */
-
- TOKEN_INIT(token, type, mark, mark);
-
- if (number == -1) {
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
- }
- else {
- if (!QUEUE_INSERT(parser,
- parser->tokens, number - parser->tokens_parsed, token))
- return 0;
- }
- }
-
- return 1;
-}
-
-/*
- * Pop indentation levels from the indents stack until the current level
- * becomes less or equal to the column. For each indentation level, append
- * the BLOCK-END token.
- */
-
-
-static int
-yaml_parser_unroll_indent(yaml_parser_t *parser, ptrdiff_t column)
-{
- yaml_token_t token;
-
- /* In the flow context, do nothing. */
-
- if (parser->flow_level)
- return 1;
-
- /* Loop through the indentation levels in the stack. */
-
- while (parser->indent > column)
- {
- /* Create a token and append it to the queue. */
-
- TOKEN_INIT(token, YAML_BLOCK_END_TOKEN, parser->mark, parser->mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- /* Pop the indentation level. */
-
- parser->indent = POP(parser, parser->indents);
- }
-
- return 1;
-}
-
-/*
- * Initialize the scanner and produce the STREAM-START token.
- */
-
-static int
-yaml_parser_fetch_stream_start(yaml_parser_t *parser)
-{
- yaml_simple_key_t simple_key = { 0, 0, 0, { 0, 0, 0 } };
- yaml_token_t token;
-
- /* Set the initial indentation. */
-
- parser->indent = -1;
-
- /* Initialize the simple key stack. */
-
- if (!PUSH(parser, parser->simple_keys, simple_key))
- return 0;
-
- /* A simple key is allowed at the beginning of the stream. */
-
- parser->simple_key_allowed = 1;
-
- /* We have started. */
-
- parser->stream_start_produced = 1;
-
- /* Create the STREAM-START token and append it to the queue. */
-
- STREAM_START_TOKEN_INIT(token, parser->encoding,
- parser->mark, parser->mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the STREAM-END token and shut down the scanner.
- */
-
-static int
-yaml_parser_fetch_stream_end(yaml_parser_t *parser)
-{
- yaml_token_t token;
-
- /* Force new line. */
-
- if (parser->mark.column != 0) {
- parser->mark.column = 0;
- parser->mark.line ++;
- }
-
- /* Reset the indentation level. */
-
- if (!yaml_parser_unroll_indent(parser, -1))
- return 0;
-
- /* Reset simple keys. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- parser->simple_key_allowed = 0;
-
- /* Create the STREAM-END token and append it to the queue. */
-
- STREAM_END_TOKEN_INIT(token, parser->mark, parser->mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token.
- */
-
-static int
-yaml_parser_fetch_directive(yaml_parser_t *parser)
-{
- yaml_token_t token;
-
- /* Reset the indentation level. */
-
- if (!yaml_parser_unroll_indent(parser, -1))
- return 0;
-
- /* Reset simple keys. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- parser->simple_key_allowed = 0;
-
- /* Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. */
-
- if (!yaml_parser_scan_directive(parser, &token))
- return 0;
-
- /* Append the token to the queue. */
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Produce the DOCUMENT-START or DOCUMENT-END token.
- */
-
-static int
-yaml_parser_fetch_document_indicator(yaml_parser_t *parser,
- yaml_token_type_t type)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* Reset the indentation level. */
-
- if (!yaml_parser_unroll_indent(parser, -1))
- return 0;
-
- /* Reset simple keys. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- parser->simple_key_allowed = 0;
-
- /* Consume the token. */
-
- start_mark = parser->mark;
-
- SKIP(parser);
- SKIP(parser);
- SKIP(parser);
-
- end_mark = parser->mark;
-
- /* Create the DOCUMENT-START or DOCUMENT-END token. */
-
- TOKEN_INIT(token, type, start_mark, end_mark);
-
- /* Append the token to the queue. */
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token.
- */
-
-static int
-yaml_parser_fetch_flow_collection_start(yaml_parser_t *parser,
- yaml_token_type_t type)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* The indicators '[' and '{' may start a simple key. */
-
- if (!yaml_parser_save_simple_key(parser))
- return 0;
-
- /* Increase the flow level. */
-
- if (!yaml_parser_increase_flow_level(parser))
- return 0;
-
- /* A simple key may follow the indicators '[' and '{'. */
-
- parser->simple_key_allowed = 1;
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. */
-
- TOKEN_INIT(token, type, start_mark, end_mark);
-
- /* Append the token to the queue. */
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.
- */
-
-static int
-yaml_parser_fetch_flow_collection_end(yaml_parser_t *parser,
- yaml_token_type_t type)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* Reset any potential simple key on the current flow level. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- /* Decrease the flow level. */
-
- if (!yaml_parser_decrease_flow_level(parser))
- return 0;
-
- /* No simple keys after the indicators ']' and '}'. */
-
- parser->simple_key_allowed = 0;
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. */
-
- TOKEN_INIT(token, type, start_mark, end_mark);
-
- /* Append the token to the queue. */
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the FLOW-ENTRY token.
- */
-
-static int
-yaml_parser_fetch_flow_entry(yaml_parser_t *parser)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* Reset any potential simple keys on the current flow level. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- /* Simple keys are allowed after ','. */
-
- parser->simple_key_allowed = 1;
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the FLOW-ENTRY token and append it to the queue. */
-
- TOKEN_INIT(token, YAML_FLOW_ENTRY_TOKEN, start_mark, end_mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the BLOCK-ENTRY token.
- */
-
-static int
-yaml_parser_fetch_block_entry(yaml_parser_t *parser)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* Check if the scanner is in the block context. */
-
- if (!parser->flow_level)
- {
- /* Check if we are allowed to start a new entry. */
-
- if (!parser->simple_key_allowed) {
- return yaml_parser_set_scanner_error(parser, NULL, parser->mark,
- "block sequence entries are not allowed in this context");
- }
-
- /* Add the BLOCK-SEQUENCE-START token if needed. */
-
- if (!yaml_parser_roll_indent(parser, parser->mark.column, -1,
- YAML_BLOCK_SEQUENCE_START_TOKEN, parser->mark))
- return 0;
- }
- else
- {
- /*
- * It is an error for the '-' indicator to occur in the flow context,
- * but we let the Parser detect and report about it because the Parser
- * is able to point to the context.
- */
- }
-
- /* Reset any potential simple keys on the current flow level. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- /* Simple keys are allowed after '-'. */
-
- parser->simple_key_allowed = 1;
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the BLOCK-ENTRY token and append it to the queue. */
-
- TOKEN_INIT(token, YAML_BLOCK_ENTRY_TOKEN, start_mark, end_mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the KEY token.
- */
-
-static int
-yaml_parser_fetch_key(yaml_parser_t *parser)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
-
- /* In the block context, additional checks are required. */
-
- if (!parser->flow_level)
- {
- /* Check if we are allowed to start a new key (not necessary simple). */
-
- if (!parser->simple_key_allowed) {
- return yaml_parser_set_scanner_error(parser, NULL, parser->mark,
- "mapping keys are not allowed in this context");
- }
-
- /* Add the BLOCK-MAPPING-START token if needed. */
-
- if (!yaml_parser_roll_indent(parser, parser->mark.column, -1,
- YAML_BLOCK_MAPPING_START_TOKEN, parser->mark))
- return 0;
- }
-
- /* Reset any potential simple keys on the current flow level. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- /* Simple keys are allowed after '?' in the block context. */
-
- parser->simple_key_allowed = (!parser->flow_level);
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the KEY token and append it to the queue. */
-
- TOKEN_INIT(token, YAML_KEY_TOKEN, start_mark, end_mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the VALUE token.
- */
-
-static int
-yaml_parser_fetch_value(yaml_parser_t *parser)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_token_t token;
- yaml_simple_key_t *simple_key = parser->simple_keys.top-1;
-
- /* Have we found a simple key? */
-
- if (simple_key->possible)
- {
-
- /* Create the KEY token and insert it into the queue. */
-
- TOKEN_INIT(token, YAML_KEY_TOKEN, simple_key->mark, simple_key->mark);
-
- if (!QUEUE_INSERT(parser, parser->tokens,
- simple_key->token_number - parser->tokens_parsed, token))
- return 0;
-
- /* In the block context, we may need to add the BLOCK-MAPPING-START token. */
-
- if (!yaml_parser_roll_indent(parser, simple_key->mark.column,
- simple_key->token_number,
- YAML_BLOCK_MAPPING_START_TOKEN, simple_key->mark))
- return 0;
-
- /* Remove the simple key. */
-
- simple_key->possible = 0;
-
- /* A simple key cannot follow another simple key. */
-
- parser->simple_key_allowed = 0;
- }
- else
- {
- /* The ':' indicator follows a complex key. */
-
- /* In the block context, extra checks are required. */
-
- if (!parser->flow_level)
- {
- /* Check if we are allowed to start a complex value. */
-
- if (!parser->simple_key_allowed) {
- return yaml_parser_set_scanner_error(parser, NULL, parser->mark,
- "mapping values are not allowed in this context");
- }
-
- /* Add the BLOCK-MAPPING-START token if needed. */
-
- if (!yaml_parser_roll_indent(parser, parser->mark.column, -1,
- YAML_BLOCK_MAPPING_START_TOKEN, parser->mark))
- return 0;
- }
-
- /* Simple keys after ':' are allowed in the block context. */
-
- parser->simple_key_allowed = (!parser->flow_level);
- }
-
- /* Consume the token. */
-
- start_mark = parser->mark;
- SKIP(parser);
- end_mark = parser->mark;
-
- /* Create the VALUE token and append it to the queue. */
-
- TOKEN_INIT(token, YAML_VALUE_TOKEN, start_mark, end_mark);
-
- if (!ENQUEUE(parser, parser->tokens, token))
- return 0;
-
- return 1;
-}
-
-/*
- * Produce the ALIAS or ANCHOR token.
- */
-
-static int
-yaml_parser_fetch_anchor(yaml_parser_t *parser, yaml_token_type_t type)
-{
- yaml_token_t token;
-
- /* An anchor or an alias could be a simple key. */
-
- if (!yaml_parser_save_simple_key(parser))
- return 0;
-
- /* A simple key cannot follow an anchor or an alias. */
-
- parser->simple_key_allowed = 0;
-
- /* Create the ALIAS or ANCHOR token and append it to the queue. */
-
- if (!yaml_parser_scan_anchor(parser, &token, type))
- return 0;
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
- return 1;
-}
-
-/*
- * Produce the TAG token.
- */
-
-static int
-yaml_parser_fetch_tag(yaml_parser_t *parser)
-{
- yaml_token_t token;
-
- /* A tag could be a simple key. */
-
- if (!yaml_parser_save_simple_key(parser))
- return 0;
-
- /* A simple key cannot follow a tag. */
-
- parser->simple_key_allowed = 0;
-
- /* Create the TAG token and append it to the queue. */
-
- if (!yaml_parser_scan_tag(parser, &token))
- return 0;
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens.
- */
-
-static int
-yaml_parser_fetch_block_scalar(yaml_parser_t *parser, int literal)
-{
- yaml_token_t token;
-
- /* Remove any potential simple keys. */
-
- if (!yaml_parser_remove_simple_key(parser))
- return 0;
-
- /* A simple key may follow a block scalar. */
-
- parser->simple_key_allowed = 1;
-
- /* Create the SCALAR token and append it to the queue. */
-
- if (!yaml_parser_scan_block_scalar(parser, &token, literal))
- return 0;
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens.
- */
-
-static int
-yaml_parser_fetch_flow_scalar(yaml_parser_t *parser, int single)
-{
- yaml_token_t token;
-
- /* A plain scalar could be a simple key. */
-
- if (!yaml_parser_save_simple_key(parser))
- return 0;
-
- /* A simple key cannot follow a flow scalar. */
-
- parser->simple_key_allowed = 0;
-
- /* Create the SCALAR token and append it to the queue. */
-
- if (!yaml_parser_scan_flow_scalar(parser, &token, single))
- return 0;
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Produce the SCALAR(...,plain) token.
- */
-
-static int
-yaml_parser_fetch_plain_scalar(yaml_parser_t *parser)
-{
- yaml_token_t token;
-
- /* A plain scalar could be a simple key. */
-
- if (!yaml_parser_save_simple_key(parser))
- return 0;
-
- /* A simple key cannot follow a flow scalar. */
-
- parser->simple_key_allowed = 0;
-
- /* Create the SCALAR token and append it to the queue. */
-
- if (!yaml_parser_scan_plain_scalar(parser, &token))
- return 0;
-
- if (!ENQUEUE(parser, parser->tokens, token)) {
- yaml_token_delete(&token);
- return 0;
- }
-
- return 1;
-}
-
-/*
- * Eat whitespaces and comments until the next token is found.
- */
-
-static int
-yaml_parser_scan_to_next_token(yaml_parser_t *parser)
-{
- /* Until the next token is not found. */
-
- while (1)
- {
- /* Allow the BOM mark to start a line. */
-
- if (!CACHE(parser, 1)) return 0;
-
- if (parser->mark.column == 0 && IS_BOM(parser->buffer))
- SKIP(parser);
-
- /*
- * Eat whitespaces.
- *
- * Tabs are allowed:
- *
- * - in the flow context;
- * - in the block context, but not at the beginning of the line or
- * after '-', '?', or ':' (complex value).
- */
-
- if (!CACHE(parser, 1)) return 0;
-
- while (CHECK(parser->buffer,' ') ||
- ((parser->flow_level || !parser->simple_key_allowed) &&
- CHECK(parser->buffer, '\t'))) {
- SKIP(parser);
- if (!CACHE(parser, 1)) return 0;
- }
-
- /* Eat a comment until a line break. */
-
- if (CHECK(parser->buffer, '#')) {
- while (!IS_BREAKZ(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) return 0;
- }
- }
-
- /* If it is a line break, eat it. */
-
- if (IS_BREAK(parser->buffer))
- {
- if (!CACHE(parser, 2)) return 0;
- SKIP_LINE(parser);
-
- /* In the block context, a new line may start a simple key. */
-
- if (!parser->flow_level) {
- parser->simple_key_allowed = 1;
- }
- }
- else
- {
- /* We have found a token. */
-
- break;
- }
- }
-
- return 1;
-}
-
-/*
- * Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token.
- *
- * Scope:
- * %YAML 1.1 # a comment \n
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- * %TAG !yaml! tag:yaml.org,2002: \n
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- */
-
-int
-yaml_parser_scan_directive(yaml_parser_t *parser, yaml_token_t *token)
-{
- yaml_mark_t start_mark, end_mark;
- yaml_char_t *name = NULL;
- int major, minor;
- yaml_char_t *handle = NULL, *prefix = NULL;
-
- /* Eat '%'. */
-
- start_mark = parser->mark;
-
- SKIP(parser);
-
- /* Scan the directive name. */
-
- if (!yaml_parser_scan_directive_name(parser, start_mark, &name))
- goto error;
-
- /* Is it a YAML directive? */
-
- if (strcmp((char *)name, "YAML") == 0)
- {
- /* Scan the VERSION directive value. */
-
- if (!yaml_parser_scan_version_directive_value(parser, start_mark,
- &major, &minor))
- goto error;
-
- end_mark = parser->mark;
-
- /* Create a VERSION-DIRECTIVE token. */
-
- VERSION_DIRECTIVE_TOKEN_INIT(*token, major, minor,
- start_mark, end_mark);
- }
-
- /* Is it a TAG directive? */
-
- else if (strcmp((char *)name, "TAG") == 0)
- {
- /* Scan the TAG directive value. */
-
- if (!yaml_parser_scan_tag_directive_value(parser, start_mark,
- &handle, &prefix))
- goto error;
-
- end_mark = parser->mark;
-
- /* Create a TAG-DIRECTIVE token. */
-
- TAG_DIRECTIVE_TOKEN_INIT(*token, handle, prefix,
- start_mark, end_mark);
- }
-
- /* Unknown directive. */
-
- else
- {
- yaml_parser_set_scanner_error(parser, "while scanning a directive",
- start_mark, "found unknown directive name");
- goto error;
- }
-
- /* Eat the rest of the line including any comments. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_BLANK(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
-
- if (CHECK(parser->buffer, '#')) {
- while (!IS_BREAKZ(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
- }
-
- /* Check if we are at the end of the line. */
-
- if (!IS_BREAKZ(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a directive",
- start_mark, "did not find expected comment or line break");
- goto error;
- }
-
- /* Eat a line break. */
-
- if (IS_BREAK(parser->buffer)) {
- if (!CACHE(parser, 2)) goto error;
- SKIP_LINE(parser);
- }
-
- yaml_free(name);
-
- return 1;
-
-error:
- yaml_free(prefix);
- yaml_free(handle);
- yaml_free(name);
- return 0;
-}
-
-/*
- * Scan the directive name.
- *
- * Scope:
- * %YAML 1.1 # a comment \n
- * ^^^^
- * %TAG !yaml! tag:yaml.org,2002: \n
- * ^^^
- */
-
-static int
-yaml_parser_scan_directive_name(yaml_parser_t *parser,
- yaml_mark_t start_mark, yaml_char_t **name)
-{
- yaml_string_t string = NULL_STRING;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
-
- /* Consume the directive name. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_ALPHA(parser->buffer))
- {
- if (!READ(parser, string)) goto error;
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Check if the name is empty. */
-
- if (string.start == string.pointer) {
- yaml_parser_set_scanner_error(parser, "while scanning a directive",
- start_mark, "could not find expected directive name");
- goto error;
- }
-
- /* Check for an blank character after the name. */
-
- if (!IS_BLANKZ(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a directive",
- start_mark, "found unexpected non-alphabetical character");
- goto error;
- }
-
- *name = string.start;
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- return 0;
-}
-
-/*
- * Scan the value of VERSION-DIRECTIVE.
- *
- * Scope:
- * %YAML 1.1 # a comment \n
- * ^^^^^^
- */
-
-static int
-yaml_parser_scan_version_directive_value(yaml_parser_t *parser,
- yaml_mark_t start_mark, int *major, int *minor)
-{
- /* Eat whitespaces. */
-
- if (!CACHE(parser, 1)) return 0;
-
- while (IS_BLANK(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) return 0;
- }
-
- /* Consume the major version number. */
-
- if (!yaml_parser_scan_version_directive_number(parser, start_mark, major))
- return 0;
-
- /* Eat '.'. */
-
- if (!CHECK(parser->buffer, '.')) {
- return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive",
- start_mark, "did not find expected digit or '.' character");
- }
-
- SKIP(parser);
-
- /* Consume the minor version number. */
-
- if (!yaml_parser_scan_version_directive_number(parser, start_mark, minor))
- return 0;
-
- return 1;
-}
-
-#define MAX_NUMBER_LENGTH 9
-
-/*
- * Scan the version number of VERSION-DIRECTIVE.
- *
- * Scope:
- * %YAML 1.1 # a comment \n
- * ^
- * %YAML 1.1 # a comment \n
- * ^
- */
-
-static int
-yaml_parser_scan_version_directive_number(yaml_parser_t *parser,
- yaml_mark_t start_mark, int *number)
-{
- int value = 0;
- size_t length = 0;
-
- /* Repeat while the next character is digit. */
-
- if (!CACHE(parser, 1)) return 0;
-
- while (IS_DIGIT(parser->buffer))
- {
- /* Check if the number is too long. */
-
- if (++length > MAX_NUMBER_LENGTH) {
- return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive",
- start_mark, "found extremely long version number");
- }
-
- value = value*10 + AS_DIGIT(parser->buffer);
-
- SKIP(parser);
-
- if (!CACHE(parser, 1)) return 0;
- }
-
- /* Check if the number was present. */
-
- if (!length) {
- return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive",
- start_mark, "did not find expected version number");
- }
-
- *number = value;
-
- return 1;
-}
-
-/*
- * Scan the value of a TAG-DIRECTIVE token.
- *
- * Scope:
- * %TAG !yaml! tag:yaml.org,2002: \n
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- */
-
-static int
-yaml_parser_scan_tag_directive_value(yaml_parser_t *parser,
- yaml_mark_t start_mark, yaml_char_t **handle, yaml_char_t **prefix)
-{
- yaml_char_t *handle_value = NULL;
- yaml_char_t *prefix_value = NULL;
-
- /* Eat whitespaces. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_BLANK(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Scan a handle. */
-
- if (!yaml_parser_scan_tag_handle(parser, 1, start_mark, &handle_value))
- goto error;
-
- /* Expect a whitespace. */
-
- if (!CACHE(parser, 1)) goto error;
-
- if (!IS_BLANK(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive",
- start_mark, "did not find expected whitespace");
- goto error;
- }
-
- /* Eat whitespaces. */
-
- while (IS_BLANK(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Scan a prefix. */
-
- if (!yaml_parser_scan_tag_uri(parser, 1, NULL, start_mark, &prefix_value))
- goto error;
-
- /* Expect a whitespace or line break. */
-
- if (!CACHE(parser, 1)) goto error;
-
- if (!IS_BLANKZ(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive",
- start_mark, "did not find expected whitespace or line break");
- goto error;
- }
-
- *handle = handle_value;
- *prefix = prefix_value;
-
- return 1;
-
-error:
- yaml_free(handle_value);
- yaml_free(prefix_value);
- return 0;
-}
-
-static int
-yaml_parser_scan_anchor(yaml_parser_t *parser, yaml_token_t *token,
- yaml_token_type_t type)
-{
- int length = 0;
- yaml_mark_t start_mark, end_mark;
- yaml_string_t string = NULL_STRING;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
-
- /* Eat the indicator character. */
-
- start_mark = parser->mark;
-
- SKIP(parser);
-
- /* Consume the value. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_ALPHA(parser->buffer)) {
- if (!READ(parser, string)) goto error;
- if (!CACHE(parser, 1)) goto error;
- length ++;
- }
-
- end_mark = parser->mark;
-
- /*
- * Check if length of the anchor is greater than 0 and it is followed by
- * a whitespace character or one of the indicators:
- *
- * '?', ':', ',', ']', '}', '%', '@', '`'.
- */
-
- if (!length || !(IS_BLANKZ(parser->buffer) || CHECK(parser->buffer, '?')
- || CHECK(parser->buffer, ':') || CHECK(parser->buffer, ',')
- || CHECK(parser->buffer, ']') || CHECK(parser->buffer, '}')
- || CHECK(parser->buffer, '%') || CHECK(parser->buffer, '@')
- || CHECK(parser->buffer, '`'))) {
- yaml_parser_set_scanner_error(parser, type == YAML_ANCHOR_TOKEN ?
- "while scanning an anchor" : "while scanning an alias", start_mark,
- "did not find expected alphabetic or numeric character");
- goto error;
- }
-
- /* Create a token. */
-
- if (type == YAML_ANCHOR_TOKEN) {
- ANCHOR_TOKEN_INIT(*token, string.start, start_mark, end_mark);
- }
- else {
- ALIAS_TOKEN_INIT(*token, string.start, start_mark, end_mark);
- }
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- return 0;
-}
-
-/*
- * Scan a TAG token.
- */
-
-static int
-yaml_parser_scan_tag(yaml_parser_t *parser, yaml_token_t *token)
-{
- yaml_char_t *handle = NULL;
- yaml_char_t *suffix = NULL;
- yaml_mark_t start_mark, end_mark;
-
- start_mark = parser->mark;
-
- /* Check if the tag is in the canonical form. */
-
- if (!CACHE(parser, 2)) goto error;
-
- if (CHECK_AT(parser->buffer, '<', 1))
- {
- /* Set the handle to '' */
-
- handle = YAML_MALLOC(1);
- if (!handle) goto error;
- handle[0] = '\0';
-
- /* Eat '!<' */
-
- SKIP(parser);
- SKIP(parser);
-
- /* Consume the tag value. */
-
- if (!yaml_parser_scan_tag_uri(parser, 0, NULL, start_mark, &suffix))
- goto error;
-
- /* Check for '>' and eat it. */
-
- if (!CHECK(parser->buffer, '>')) {
- yaml_parser_set_scanner_error(parser, "while scanning a tag",
- start_mark, "did not find the expected '>'");
- goto error;
- }
-
- SKIP(parser);
- }
- else
- {
- /* The tag has either the '!suffix' or the '!handle!suffix' form. */
-
- /* First, try to scan a handle. */
-
- if (!yaml_parser_scan_tag_handle(parser, 0, start_mark, &handle))
- goto error;
-
- /* Check if it is, indeed, handle. */
-
- if (handle[0] == '!' && handle[1] != '\0' && handle[strlen((char *)handle)-1] == '!')
- {
- /* Scan the suffix now. */
-
- if (!yaml_parser_scan_tag_uri(parser, 0, NULL, start_mark, &suffix))
- goto error;
- }
- else
- {
- /* It wasn't a handle after all. Scan the rest of the tag. */
-
- if (!yaml_parser_scan_tag_uri(parser, 0, handle, start_mark, &suffix))
- goto error;
-
- /* Set the handle to '!'. */
-
- yaml_free(handle);
- handle = YAML_MALLOC(2);
- if (!handle) goto error;
- handle[0] = '!';
- handle[1] = '\0';
-
- /*
- * A special case: the '!' tag. Set the handle to '' and the
- * suffix to '!'.
- */
-
- if (suffix[0] == '\0') {
- yaml_char_t *tmp = handle;
- handle = suffix;
- suffix = tmp;
- }
- }
- }
-
- /* Check the character which ends the tag. */
-
- if (!CACHE(parser, 1)) goto error;
-
- if (!IS_BLANKZ(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a tag",
- start_mark, "did not find expected whitespace or line break");
- goto error;
- }
-
- end_mark = parser->mark;
-
- /* Create a token. */
-
- TAG_TOKEN_INIT(*token, handle, suffix, start_mark, end_mark);
-
- return 1;
-
-error:
- yaml_free(handle);
- yaml_free(suffix);
- return 0;
-}
-
-/*
- * Scan a tag handle.
- */
-
-static int
-yaml_parser_scan_tag_handle(yaml_parser_t *parser, int directive,
- yaml_mark_t start_mark, yaml_char_t **handle)
-{
- yaml_string_t string = NULL_STRING;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
-
- /* Check the initial '!' character. */
-
- if (!CACHE(parser, 1)) goto error;
-
- if (!CHECK(parser->buffer, '!')) {
- yaml_parser_set_scanner_error(parser, directive ?
- "while scanning a tag directive" : "while scanning a tag",
- start_mark, "did not find expected '!'");
- goto error;
- }
-
- /* Copy the '!' character. */
-
- if (!READ(parser, string)) goto error;
-
- /* Copy all subsequent alphabetical and numerical characters. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_ALPHA(parser->buffer))
- {
- if (!READ(parser, string)) goto error;
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Check if the trailing character is '!' and copy it. */
-
- if (CHECK(parser->buffer, '!'))
- {
- if (!READ(parser, string)) goto error;
- }
- else
- {
- /*
- * It's either the '!' tag or not really a tag handle. If it's a %TAG
- * directive, it's an error. If it's a tag token, it must be a part of
- * URI.
- */
-
- if (directive && !(string.start[0] == '!' && string.start[1] == '\0')) {
- yaml_parser_set_scanner_error(parser, "while parsing a tag directive",
- start_mark, "did not find expected '!'");
- goto error;
- }
- }
-
- *handle = string.start;
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- return 0;
-}
-
-/*
- * Scan a tag.
- */
-
-static int
-yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
- yaml_char_t *head, yaml_mark_t start_mark, yaml_char_t **uri)
-{
- size_t length = head ? strlen((char *)head) : 0;
- yaml_string_t string = NULL_STRING;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
-
- /* Resize the string to include the head. */
-
- while ((size_t)(string.end - string.start) <= length) {
- if (!yaml_string_extend(&string.start, &string.pointer, &string.end)) {
- parser->error = YAML_MEMORY_ERROR;
- goto error;
- }
- }
-
- /*
- * Copy the head if needed.
- *
- * Note that we don't copy the leading '!' character.
- */
-
- if (length > 1) {
- memcpy(string.start, head+1, length-1);
- string.pointer += length-1;
- }
-
- /* Scan the tag. */
-
- if (!CACHE(parser, 1)) goto error;
-
- /*
- * The set of characters that may appear in URI is as follows:
- *
- * '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&',
- * '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']',
- * '%'.
- */
-
- while (IS_ALPHA(parser->buffer) || CHECK(parser->buffer, ';')
- || CHECK(parser->buffer, '/') || CHECK(parser->buffer, '?')
- || CHECK(parser->buffer, ':') || CHECK(parser->buffer, '@')
- || CHECK(parser->buffer, '&') || CHECK(parser->buffer, '=')
- || CHECK(parser->buffer, '+') || CHECK(parser->buffer, '$')
- || CHECK(parser->buffer, ',') || CHECK(parser->buffer, '.')
- || CHECK(parser->buffer, '!') || CHECK(parser->buffer, '~')
- || CHECK(parser->buffer, '*') || CHECK(parser->buffer, '\'')
- || CHECK(parser->buffer, '(') || CHECK(parser->buffer, ')')
- || CHECK(parser->buffer, '[') || CHECK(parser->buffer, ']')
- || CHECK(parser->buffer, '%'))
- {
- /* Check if it is a URI-escape sequence. */
-
- if (CHECK(parser->buffer, '%')) {
- if (!STRING_EXTEND(parser, string))
- goto error;
-
- if (!yaml_parser_scan_uri_escapes(parser,
- directive, start_mark, &string)) goto error;
- }
- else {
- if (!READ(parser, string)) goto error;
- }
-
- length ++;
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Check if the tag is non-empty. */
-
- if (!length) {
- if (!STRING_EXTEND(parser, string))
- goto error;
-
- yaml_parser_set_scanner_error(parser, directive ?
- "while parsing a %TAG directive" : "while parsing a tag",
- start_mark, "did not find expected tag URI");
- goto error;
- }
-
- *uri = string.start;
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- return 0;
-}
-
-/*
- * Decode an URI-escape sequence corresponding to a single UTF-8 character.
- */
-
-static int
-yaml_parser_scan_uri_escapes(yaml_parser_t *parser, int directive,
- yaml_mark_t start_mark, yaml_string_t *string)
-{
- int width = 0;
-
- /* Decode the required number of characters. */
-
- do {
-
- unsigned char octet = 0;
-
- /* Check for a URI-escaped octet. */
-
- if (!CACHE(parser, 3)) return 0;
-
- if (!(CHECK(parser->buffer, '%')
- && IS_HEX_AT(parser->buffer, 1)
- && IS_HEX_AT(parser->buffer, 2))) {
- return yaml_parser_set_scanner_error(parser, directive ?
- "while parsing a %TAG directive" : "while parsing a tag",
- start_mark, "did not find URI escaped octet");
- }
-
- /* Get the octet. */
-
- octet = (AS_HEX_AT(parser->buffer, 1) << 4) + AS_HEX_AT(parser->buffer, 2);
-
- /* If it is the leading octet, determine the length of the UTF-8 sequence. */
-
- if (!width)
- {
- width = (octet & 0x80) == 0x00 ? 1 :
- (octet & 0xE0) == 0xC0 ? 2 :
- (octet & 0xF0) == 0xE0 ? 3 :
- (octet & 0xF8) == 0xF0 ? 4 : 0;
- if (!width) {
- return yaml_parser_set_scanner_error(parser, directive ?
- "while parsing a %TAG directive" : "while parsing a tag",
- start_mark, "found an incorrect leading UTF-8 octet");
- }
- }
- else
- {
- /* Check if the trailing octet is correct. */
-
- if ((octet & 0xC0) != 0x80) {
- return yaml_parser_set_scanner_error(parser, directive ?
- "while parsing a %TAG directive" : "while parsing a tag",
- start_mark, "found an incorrect trailing UTF-8 octet");
- }
- }
-
- /* Copy the octet and move the pointers. */
-
- *(string->pointer++) = octet;
- SKIP(parser);
- SKIP(parser);
- SKIP(parser);
-
- } while (--width);
-
- return 1;
-}
-
-/*
- * Scan a block scalar.
- */
-
-static int
-yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
- int literal)
-{
- yaml_mark_t start_mark;
- yaml_mark_t end_mark;
- yaml_string_t string = NULL_STRING;
- yaml_string_t leading_break = NULL_STRING;
- yaml_string_t trailing_breaks = NULL_STRING;
- int chomping = 0;
- int increment = 0;
- int indent = 0;
- int leading_blank = 0;
- int trailing_blank = 0;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, leading_break, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, trailing_breaks, INITIAL_STRING_SIZE)) goto error;
-
- /* Eat the indicator '|' or '>'. */
-
- start_mark = parser->mark;
-
- SKIP(parser);
-
- /* Scan the additional block scalar indicators. */
-
- if (!CACHE(parser, 1)) goto error;
-
- /* Check for a chomping indicator. */
-
- if (CHECK(parser->buffer, '+') || CHECK(parser->buffer, '-'))
- {
- /* Set the chomping method and eat the indicator. */
-
- chomping = CHECK(parser->buffer, '+') ? +1 : -1;
-
- SKIP(parser);
-
- /* Check for an indentation indicator. */
-
- if (!CACHE(parser, 1)) goto error;
-
- if (IS_DIGIT(parser->buffer))
- {
- /* Check that the indentation is greater than 0. */
-
- if (CHECK(parser->buffer, '0')) {
- yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found an indentation indicator equal to 0");
- goto error;
- }
-
- /* Get the indentation level and eat the indicator. */
-
- increment = AS_DIGIT(parser->buffer);
-
- SKIP(parser);
- }
- }
-
- /* Do the same as above, but in the opposite order. */
-
- else if (IS_DIGIT(parser->buffer))
- {
- if (CHECK(parser->buffer, '0')) {
- yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found an indentation indicator equal to 0");
- goto error;
- }
-
- increment = AS_DIGIT(parser->buffer);
-
- SKIP(parser);
-
- if (!CACHE(parser, 1)) goto error;
-
- if (CHECK(parser->buffer, '+') || CHECK(parser->buffer, '-')) {
- chomping = CHECK(parser->buffer, '+') ? +1 : -1;
-
- SKIP(parser);
- }
- }
-
- /* Eat whitespaces and comments to the end of the line. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_BLANK(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
-
- if (CHECK(parser->buffer, '#')) {
- while (!IS_BREAKZ(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) goto error;
- }
- }
-
- /* Check if we are at the end of the line. */
-
- if (!IS_BREAKZ(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "did not find expected comment or line break");
- goto error;
- }
-
- /* Eat a line break. */
-
- if (IS_BREAK(parser->buffer)) {
- if (!CACHE(parser, 2)) goto error;
- SKIP_LINE(parser);
- }
-
- end_mark = parser->mark;
-
- /* Set the indentation level if it was specified. */
-
- if (increment) {
- indent = parser->indent >= 0 ? parser->indent+increment : increment;
- }
-
- /* Scan the leading line breaks and determine the indentation level if needed. */
-
- if (!yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks,
- start_mark, &end_mark)) goto error;
-
- /* Scan the block scalar content. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while ((int)parser->mark.column == indent && !IS_Z(parser->buffer))
- {
- /*
- * We are at the beginning of a non-empty line.
- */
-
- /* Is it a trailing whitespace? */
-
- trailing_blank = IS_BLANK(parser->buffer);
-
- /* Check if we need to fold the leading line break. */
-
- if (!literal && (*leading_break.start == '\n')
- && !leading_blank && !trailing_blank)
- {
- /* Do we need to join the lines by space? */
-
- if (*trailing_breaks.start == '\0') {
- if (!STRING_EXTEND(parser, string)) goto error;
- *(string.pointer ++) = ' ';
- }
-
- CLEAR(parser, leading_break);
- }
- else {
- if (!JOIN(parser, string, leading_break)) goto error;
- CLEAR(parser, leading_break);
- }
-
- /* Append the remaining line breaks. */
-
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- CLEAR(parser, trailing_breaks);
-
- /* Is it a leading whitespace? */
-
- leading_blank = IS_BLANK(parser->buffer);
-
- /* Consume the current line. */
-
- while (!IS_BREAKZ(parser->buffer)) {
- if (!READ(parser, string)) goto error;
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Consume the line break. */
-
- if (!CACHE(parser, 2)) goto error;
-
- if (!READ_LINE(parser, leading_break)) goto error;
-
- /* Eat the following indentation spaces and line breaks. */
-
- if (!yaml_parser_scan_block_scalar_breaks(parser,
- &indent, &trailing_breaks, start_mark, &end_mark)) goto error;
- }
-
- /* Chomp the tail. */
-
- if (chomping != -1) {
- if (!JOIN(parser, string, leading_break)) goto error;
- }
- if (chomping == 1) {
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- }
-
- /* Create a token. */
-
- SCALAR_TOKEN_INIT(*token, string.start, string.pointer-string.start,
- literal ? YAML_LITERAL_SCALAR_STYLE : YAML_FOLDED_SCALAR_STYLE,
- start_mark, end_mark);
-
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
-
- return 0;
-}
-
-/*
- * Scan indentation spaces and line breaks for a block scalar. Determine the
- * indentation level if needed.
- */
-
-static int
-yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
- int *indent, yaml_string_t *breaks,
- yaml_mark_t start_mark, yaml_mark_t *end_mark)
-{
- int max_indent = 0;
-
- *end_mark = parser->mark;
-
- /* Eat the indentation spaces and line breaks. */
-
- while (1)
- {
- /* Eat the indentation spaces. */
-
- if (!CACHE(parser, 1)) return 0;
-
- while ((!*indent || (int)parser->mark.column < *indent)
- && IS_SPACE(parser->buffer)) {
- SKIP(parser);
- if (!CACHE(parser, 1)) return 0;
- }
-
- if ((int)parser->mark.column > max_indent)
- max_indent = (int)parser->mark.column;
-
- /* Check for a tab character messing the indentation. */
-
- if ((!*indent || (int)parser->mark.column < *indent)
- && IS_TAB(parser->buffer)) {
- return yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found a tab character where an indentation space is expected");
- }
-
- /* Have we found a non-empty line? */
-
- if (!IS_BREAK(parser->buffer)) break;
-
- /* Consume the line break. */
-
- if (!CACHE(parser, 2)) return 0;
- if (!READ_LINE(parser, *breaks)) return 0;
- *end_mark = parser->mark;
- }
-
- /* Determine the indentation level if needed. */
-
- if (!*indent) {
- *indent = max_indent;
- if (*indent < parser->indent + 1)
- *indent = parser->indent + 1;
- if (*indent < 1)
- *indent = 1;
- }
-
- return 1;
-}
-
-/*
- * Scan a quoted scalar.
- */
-
-static int
-yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
- int single)
-{
- yaml_mark_t start_mark;
- yaml_mark_t end_mark;
- yaml_string_t string = NULL_STRING;
- yaml_string_t leading_break = NULL_STRING;
- yaml_string_t trailing_breaks = NULL_STRING;
- yaml_string_t whitespaces = NULL_STRING;
- int leading_blanks;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, leading_break, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, trailing_breaks, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, whitespaces, INITIAL_STRING_SIZE)) goto error;
-
- /* Eat the left quote. */
-
- start_mark = parser->mark;
-
- SKIP(parser);
-
- /* Consume the content of the quoted scalar. */
-
- while (1)
- {
- /* Check that there are no document indicators at the beginning of the line. */
-
- if (!CACHE(parser, 4)) goto error;
-
- if (parser->mark.column == 0 &&
- ((CHECK_AT(parser->buffer, '-', 0) &&
- CHECK_AT(parser->buffer, '-', 1) &&
- CHECK_AT(parser->buffer, '-', 2)) ||
- (CHECK_AT(parser->buffer, '.', 0) &&
- CHECK_AT(parser->buffer, '.', 1) &&
- CHECK_AT(parser->buffer, '.', 2))) &&
- IS_BLANKZ_AT(parser->buffer, 3))
- {
- yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar",
- start_mark, "found unexpected document indicator");
- goto error;
- }
-
- /* Check for EOF. */
-
- if (IS_Z(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar",
- start_mark, "found unexpected end of stream");
- goto error;
- }
-
- /* Consume non-blank characters. */
-
- if (!CACHE(parser, 2)) goto error;
-
- leading_blanks = 0;
-
- while (!IS_BLANKZ(parser->buffer))
- {
- /* Check for an escaped single quote. */
-
- if (single && CHECK_AT(parser->buffer, '\'', 0)
- && CHECK_AT(parser->buffer, '\'', 1))
- {
- if (!STRING_EXTEND(parser, string)) goto error;
- *(string.pointer++) = '\'';
- SKIP(parser);
- SKIP(parser);
- }
-
- /* Check for the right quote. */
-
- else if (CHECK(parser->buffer, single ? '\'' : '"'))
- {
- break;
- }
-
- /* Check for an escaped line break. */
-
- else if (!single && CHECK(parser->buffer, '\\')
- && IS_BREAK_AT(parser->buffer, 1))
- {
- if (!CACHE(parser, 3)) goto error;
- SKIP(parser);
- SKIP_LINE(parser);
- leading_blanks = 1;
- break;
- }
-
- /* Check for an escape sequence. */
-
- else if (!single && CHECK(parser->buffer, '\\'))
- {
- size_t code_length = 0;
-
- if (!STRING_EXTEND(parser, string)) goto error;
-
- /* Check the escape character. */
-
- switch (parser->buffer.pointer[1])
- {
- case '0':
- *(string.pointer++) = '\0';
- break;
-
- case 'a':
- *(string.pointer++) = '\x07';
- break;
-
- case 'b':
- *(string.pointer++) = '\x08';
- break;
-
- case 't':
- case '\t':
- *(string.pointer++) = '\x09';
- break;
-
- case 'n':
- *(string.pointer++) = '\x0A';
- break;
-
- case 'v':
- *(string.pointer++) = '\x0B';
- break;
-
- case 'f':
- *(string.pointer++) = '\x0C';
- break;
-
- case 'r':
- *(string.pointer++) = '\x0D';
- break;
-
- case 'e':
- *(string.pointer++) = '\x1B';
- break;
-
- case ' ':
- *(string.pointer++) = '\x20';
- break;
-
- case '"':
- *(string.pointer++) = '"';
- break;
-
- case '/':
- *(string.pointer++) = '/';
- break;
-
- case '\\':
- *(string.pointer++) = '\\';
- break;
-
- case 'N': /* NEL (#x85) */
- *(string.pointer++) = '\xC2';
- *(string.pointer++) = '\x85';
- break;
-
- case '_': /* #xA0 */
- *(string.pointer++) = '\xC2';
- *(string.pointer++) = '\xA0';
- break;
-
- case 'L': /* LS (#x2028) */
- *(string.pointer++) = '\xE2';
- *(string.pointer++) = '\x80';
- *(string.pointer++) = '\xA8';
- break;
-
- case 'P': /* PS (#x2029) */
- *(string.pointer++) = '\xE2';
- *(string.pointer++) = '\x80';
- *(string.pointer++) = '\xA9';
- break;
-
- case 'x':
- code_length = 2;
- break;
-
- case 'u':
- code_length = 4;
- break;
-
- case 'U':
- code_length = 8;
- break;
-
- default:
- yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar",
- start_mark, "found unknown escape character");
- goto error;
- }
-
- SKIP(parser);
- SKIP(parser);
-
- /* Consume an arbitrary escape code. */
-
- if (code_length)
- {
- unsigned int value = 0;
- size_t k;
-
- /* Scan the character value. */
-
- if (!CACHE(parser, code_length)) goto error;
-
- for (k = 0; k < code_length; k ++) {
- if (!IS_HEX_AT(parser->buffer, k)) {
- yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar",
- start_mark, "did not find expected hexdecimal number");
- goto error;
- }
- value = (value << 4) + AS_HEX_AT(parser->buffer, k);
- }
-
- /* Check the value and write the character. */
-
- if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF) {
- yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar",
- start_mark, "found invalid Unicode character escape code");
- goto error;
- }
-
- if (value <= 0x7F) {
- *(string.pointer++) = value;
- }
- else if (value <= 0x7FF) {
- *(string.pointer++) = 0xC0 + (value >> 6);
- *(string.pointer++) = 0x80 + (value & 0x3F);
- }
- else if (value <= 0xFFFF) {
- *(string.pointer++) = 0xE0 + (value >> 12);
- *(string.pointer++) = 0x80 + ((value >> 6) & 0x3F);
- *(string.pointer++) = 0x80 + (value & 0x3F);
- }
- else {
- *(string.pointer++) = 0xF0 + (value >> 18);
- *(string.pointer++) = 0x80 + ((value >> 12) & 0x3F);
- *(string.pointer++) = 0x80 + ((value >> 6) & 0x3F);
- *(string.pointer++) = 0x80 + (value & 0x3F);
- }
-
- /* Advance the pointer. */
-
- for (k = 0; k < code_length; k ++) {
- SKIP(parser);
- }
- }
- }
-
- else
- {
- /* It is a non-escaped non-blank character. */
-
- if (!READ(parser, string)) goto error;
- }
-
- if (!CACHE(parser, 2)) goto error;
- }
-
- /* Check if we are at the end of the scalar. */
-
- /* Fix for crash unitialized value crash
- * Credit for the bug and input is to OSS Fuzz
- * Credit for the fix to Alex Gaynor
- */
- if (!CACHE(parser, 1)) goto error;
- if (CHECK(parser->buffer, single ? '\'' : '"'))
- break;
-
- /* Consume blank characters. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_BLANK(parser->buffer) || IS_BREAK(parser->buffer))
- {
- if (IS_BLANK(parser->buffer))
- {
- /* Consume a space or a tab character. */
-
- if (!leading_blanks) {
- if (!READ(parser, whitespaces)) goto error;
- }
- else {
- SKIP(parser);
- }
- }
- else
- {
- if (!CACHE(parser, 2)) goto error;
-
- /* Check if it is a first line break. */
-
- if (!leading_blanks)
- {
- CLEAR(parser, whitespaces);
- if (!READ_LINE(parser, leading_break)) goto error;
- leading_blanks = 1;
- }
- else
- {
- if (!READ_LINE(parser, trailing_breaks)) goto error;
- }
- }
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Join the whitespaces or fold line breaks. */
-
- if (leading_blanks)
- {
- /* Do we need to fold line breaks? */
-
- if (leading_break.start[0] == '\n') {
- if (trailing_breaks.start[0] == '\0') {
- if (!STRING_EXTEND(parser, string)) goto error;
- *(string.pointer++) = ' ';
- }
- else {
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- CLEAR(parser, trailing_breaks);
- }
- CLEAR(parser, leading_break);
- }
- else {
- if (!JOIN(parser, string, leading_break)) goto error;
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- CLEAR(parser, leading_break);
- CLEAR(parser, trailing_breaks);
- }
- }
- else
- {
- if (!JOIN(parser, string, whitespaces)) goto error;
- CLEAR(parser, whitespaces);
- }
- }
-
- /* Eat the right quote. */
-
- SKIP(parser);
-
- end_mark = parser->mark;
-
- /* Create a token. */
-
- SCALAR_TOKEN_INIT(*token, string.start, string.pointer-string.start,
- single ? YAML_SINGLE_QUOTED_SCALAR_STYLE : YAML_DOUBLE_QUOTED_SCALAR_STYLE,
- start_mark, end_mark);
-
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
- STRING_DEL(parser, whitespaces);
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
- STRING_DEL(parser, whitespaces);
-
- return 0;
-}
-
-/*
- * Scan a plain scalar.
- */
-
-static int
-yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
-{
- yaml_mark_t start_mark;
- yaml_mark_t end_mark;
- yaml_string_t string = NULL_STRING;
- yaml_string_t leading_break = NULL_STRING;
- yaml_string_t trailing_breaks = NULL_STRING;
- yaml_string_t whitespaces = NULL_STRING;
- int leading_blanks = 0;
- int indent = parser->indent+1;
-
- if (!STRING_INIT(parser, string, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, leading_break, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, trailing_breaks, INITIAL_STRING_SIZE)) goto error;
- if (!STRING_INIT(parser, whitespaces, INITIAL_STRING_SIZE)) goto error;
-
- start_mark = end_mark = parser->mark;
-
- /* Consume the content of the plain scalar. */
-
- while (1)
- {
- /* Check for a document indicator. */
-
- if (!CACHE(parser, 4)) goto error;
-
- if (parser->mark.column == 0 &&
- ((CHECK_AT(parser->buffer, '-', 0) &&
- CHECK_AT(parser->buffer, '-', 1) &&
- CHECK_AT(parser->buffer, '-', 2)) ||
- (CHECK_AT(parser->buffer, '.', 0) &&
- CHECK_AT(parser->buffer, '.', 1) &&
- CHECK_AT(parser->buffer, '.', 2))) &&
- IS_BLANKZ_AT(parser->buffer, 3)) break;
-
- /* Check for a comment. */
-
- if (CHECK(parser->buffer, '#'))
- break;
-
- /* Consume non-blank characters. */
-
- while (!IS_BLANKZ(parser->buffer))
- {
- /* Check for 'x:x' in the flow context. TODO: Fix the test "spec-08-13". */
-
- if (parser->flow_level
- && CHECK(parser->buffer, ':')
- && !IS_BLANKZ_AT(parser->buffer, 1)) {
- yaml_parser_set_scanner_error(parser, "while scanning a plain scalar",
- start_mark, "found unexpected ':'");
- goto error;
- }
-
- /* Check for indicators that may end a plain scalar. */
-
- if ((CHECK(parser->buffer, ':') && IS_BLANKZ_AT(parser->buffer, 1))
- || (parser->flow_level &&
- (CHECK(parser->buffer, ',') || CHECK(parser->buffer, ':')
- || CHECK(parser->buffer, '?') || CHECK(parser->buffer, '[')
- || CHECK(parser->buffer, ']') || CHECK(parser->buffer, '{')
- || CHECK(parser->buffer, '}'))))
- break;
-
- /* Check if we need to join whitespaces and breaks. */
-
- if (leading_blanks || whitespaces.start != whitespaces.pointer)
- {
- if (leading_blanks)
- {
- /* Do we need to fold line breaks? */
-
- if (leading_break.start[0] == '\n') {
- if (trailing_breaks.start[0] == '\0') {
- if (!STRING_EXTEND(parser, string)) goto error;
- *(string.pointer++) = ' ';
- }
- else {
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- CLEAR(parser, trailing_breaks);
- }
- CLEAR(parser, leading_break);
- }
- else {
- if (!JOIN(parser, string, leading_break)) goto error;
- if (!JOIN(parser, string, trailing_breaks)) goto error;
- CLEAR(parser, leading_break);
- CLEAR(parser, trailing_breaks);
- }
-
- leading_blanks = 0;
- }
- else
- {
- if (!JOIN(parser, string, whitespaces)) goto error;
- CLEAR(parser, whitespaces);
- }
- }
-
- /* Copy the character. */
-
- if (!READ(parser, string)) goto error;
-
- end_mark = parser->mark;
-
- if (!CACHE(parser, 2)) goto error;
- }
-
- /* Is it the end? */
-
- if (!(IS_BLANK(parser->buffer) || IS_BREAK(parser->buffer)))
- break;
-
- /* Consume blank characters. */
-
- if (!CACHE(parser, 1)) goto error;
-
- while (IS_BLANK(parser->buffer) || IS_BREAK(parser->buffer))
- {
- if (IS_BLANK(parser->buffer))
- {
- /* Check for tab characters that abuse indentation. */
-
- if (leading_blanks && (int)parser->mark.column < indent
- && IS_TAB(parser->buffer)) {
- yaml_parser_set_scanner_error(parser, "while scanning a plain scalar",
- start_mark, "found a tab character that violate indentation");
- goto error;
- }
-
- /* Consume a space or a tab character. */
-
- if (!leading_blanks) {
- if (!READ(parser, whitespaces)) goto error;
- }
- else {
- SKIP(parser);
- }
- }
- else
- {
- if (!CACHE(parser, 2)) goto error;
-
- /* Check if it is a first line break. */
-
- if (!leading_blanks)
- {
- CLEAR(parser, whitespaces);
- if (!READ_LINE(parser, leading_break)) goto error;
- leading_blanks = 1;
- }
- else
- {
- if (!READ_LINE(parser, trailing_breaks)) goto error;
- }
- }
- if (!CACHE(parser, 1)) goto error;
- }
-
- /* Check indentation level. */
-
- if (!parser->flow_level && (int)parser->mark.column < indent)
- break;
- }
-
- /* Create a token. */
-
- SCALAR_TOKEN_INIT(*token, string.start, string.pointer-string.start,
- YAML_PLAIN_SCALAR_STYLE, start_mark, end_mark);
-
- /* Note that we change the 'simple_key_allowed' flag. */
-
- if (leading_blanks) {
- parser->simple_key_allowed = 1;
- }
-
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
- STRING_DEL(parser, whitespaces);
-
- return 1;
-
-error:
- STRING_DEL(parser, string);
- STRING_DEL(parser, leading_break);
- STRING_DEL(parser, trailing_breaks);
- STRING_DEL(parser, whitespaces);
-
- return 0;
-}
diff --git a/ext/psych/yaml/writer.c b/ext/psych/yaml/writer.c
deleted file mode 100644
index 5d57f392f1..0000000000
--- a/ext/psych/yaml/writer.c
+++ /dev/null
@@ -1,141 +0,0 @@
-
-#include "yaml_private.h"
-
-/*
- * Declarations.
- */
-
-static int
-yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem);
-
-YAML_DECLARE(int)
-yaml_emitter_flush(yaml_emitter_t *emitter);
-
-/*
- * Set the writer error and return 0.
- */
-
-static int
-yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem)
-{
- emitter->error = YAML_WRITER_ERROR;
- emitter->problem = problem;
-
- return 0;
-}
-
-/*
- * Flush the output buffer.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_flush(yaml_emitter_t *emitter)
-{
- int low, high;
-
- assert(emitter); /* Non-NULL emitter object is expected. */
- assert(emitter->write_handler); /* Write handler must be set. */
- assert(emitter->encoding); /* Output encoding must be set. */
-
- emitter->buffer.last = emitter->buffer.pointer;
- emitter->buffer.pointer = emitter->buffer.start;
-
- /* Check if the buffer is empty. */
-
- if (emitter->buffer.start == emitter->buffer.last) {
- return 1;
- }
-
- /* If the output encoding is UTF-8, we don't need to recode the buffer. */
-
- if (emitter->encoding == YAML_UTF8_ENCODING)
- {
- if (emitter->write_handler(emitter->write_handler_data,
- emitter->buffer.start,
- emitter->buffer.last - emitter->buffer.start)) {
- emitter->buffer.last = emitter->buffer.start;
- emitter->buffer.pointer = emitter->buffer.start;
- return 1;
- }
- else {
- return yaml_emitter_set_writer_error(emitter, "write error");
- }
- }
-
- /* Recode the buffer into the raw buffer. */
-
- low = (emitter->encoding == YAML_UTF16LE_ENCODING ? 0 : 1);
- high = (emitter->encoding == YAML_UTF16LE_ENCODING ? 1 : 0);
-
- while (emitter->buffer.pointer != emitter->buffer.last)
- {
- unsigned char octet;
- unsigned int width;
- unsigned int value;
- size_t k;
-
- /*
- * See the "reader.c" code for more details on UTF-8 encoding. Note
- * that we assume that the buffer contains a valid UTF-8 sequence.
- */
-
- /* Read the next UTF-8 character. */
-
- octet = emitter->buffer.pointer[0];
-
- width = (octet & 0x80) == 0x00 ? 1 :
- (octet & 0xE0) == 0xC0 ? 2 :
- (octet & 0xF0) == 0xE0 ? 3 :
- (octet & 0xF8) == 0xF0 ? 4 : 0;
-
- value = (octet & 0x80) == 0x00 ? octet & 0x7F :
- (octet & 0xE0) == 0xC0 ? octet & 0x1F :
- (octet & 0xF0) == 0xE0 ? octet & 0x0F :
- (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
-
- for (k = 1; k < width; k ++) {
- octet = emitter->buffer.pointer[k];
- value = (value << 6) + (octet & 0x3F);
- }
-
- emitter->buffer.pointer += width;
-
- /* Write the character. */
-
- if (value < 0x10000)
- {
- emitter->raw_buffer.last[high] = value >> 8;
- emitter->raw_buffer.last[low] = value & 0xFF;
-
- emitter->raw_buffer.last += 2;
- }
- else
- {
- /* Write the character using a surrogate pair (check "reader.c"). */
-
- value -= 0x10000;
- emitter->raw_buffer.last[high] = 0xD8 + (value >> 18);
- emitter->raw_buffer.last[low] = (value >> 10) & 0xFF;
- emitter->raw_buffer.last[high+2] = 0xDC + ((value >> 8) & 0xFF);
- emitter->raw_buffer.last[low+2] = value & 0xFF;
-
- emitter->raw_buffer.last += 4;
- }
- }
-
- /* Write the raw buffer. */
-
- if (emitter->write_handler(emitter->write_handler_data,
- emitter->raw_buffer.start,
- emitter->raw_buffer.last - emitter->raw_buffer.start)) {
- emitter->buffer.last = emitter->buffer.start;
- emitter->buffer.pointer = emitter->buffer.start;
- emitter->raw_buffer.last = emitter->raw_buffer.start;
- emitter->raw_buffer.pointer = emitter->raw_buffer.start;
- return 1;
- }
- else {
- return yaml_emitter_set_writer_error(emitter, "write error");
- }
-}
-
diff --git a/ext/psych/yaml/yaml.h b/ext/psych/yaml/yaml.h
deleted file mode 100644
index f33a152594..0000000000
--- a/ext/psych/yaml/yaml.h
+++ /dev/null
@@ -1,1971 +0,0 @@
-/**
- * @file yaml.h
- * @brief Public interface for libyaml.
- *
- * Include the header file with the code:
- * @code
- * #include <yaml.h>
- * @endcode
- */
-
-#ifndef YAML_H
-#define YAML_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-/**
- * @defgroup export Export Definitions
- * @{
- */
-
-/** The public API declaration. */
-
-#ifdef _WIN32
-# if defined(YAML_DECLARE_STATIC)
-# define YAML_DECLARE(type) type
-# elif defined(YAML_DECLARE_EXPORT)
-# define YAML_DECLARE(type) __declspec(dllexport) type
-# else
-# define YAML_DECLARE(type) __declspec(dllimport) type
-# endif
-#else
-# define YAML_DECLARE(type) type
-#endif
-
-/** @} */
-
-/**
- * @defgroup version Version Information
- * @{
- */
-
-/**
- * Get the library version as a string.
- *
- * @returns The function returns the pointer to a static string of the form
- * @c "X.Y.Z", where @c X is the major version number, @c Y is a minor version
- * number, and @c Z is the patch version number.
- */
-
-YAML_DECLARE(const char *)
-yaml_get_version_string(void);
-
-/**
- * Get the library version numbers.
- *
- * @param[out] major Major version number.
- * @param[out] minor Minor version number.
- * @param[out] patch Patch version number.
- */
-
-YAML_DECLARE(void)
-yaml_get_version(int *major, int *minor, int *patch);
-
-/** @} */
-
-/**
- * @defgroup basic Basic Types
- * @{
- */
-
-/** The character type (UTF-8 octet). */
-typedef unsigned char yaml_char_t;
-
-/** The version directive data. */
-typedef struct yaml_version_directive_s {
- /** The major version number. */
- int major;
- /** The minor version number. */
- int minor;
-} yaml_version_directive_t;
-
-/** The tag directive data. */
-typedef struct yaml_tag_directive_s {
- /** The tag handle. */
- yaml_char_t *handle;
- /** The tag prefix. */
- yaml_char_t *prefix;
-} yaml_tag_directive_t;
-
-/** The stream encoding. */
-typedef enum yaml_encoding_e {
- /** Let the parser choose the encoding. */
- YAML_ANY_ENCODING,
- /** The default UTF-8 encoding. */
- YAML_UTF8_ENCODING,
- /** The UTF-16-LE encoding with BOM. */
- YAML_UTF16LE_ENCODING,
- /** The UTF-16-BE encoding with BOM. */
- YAML_UTF16BE_ENCODING
-} yaml_encoding_t;
-
-/** Line break types. */
-
-typedef enum yaml_break_e {
- /** Let the parser choose the break type. */
- YAML_ANY_BREAK,
- /** Use CR for line breaks (Mac style). */
- YAML_CR_BREAK,
- /** Use LN for line breaks (Unix style). */
- YAML_LN_BREAK,
- /** Use CR LN for line breaks (DOS style). */
- YAML_CRLN_BREAK
-} yaml_break_t;
-
-/** Many bad things could happen with the parser and emitter. */
-typedef enum yaml_error_type_e {
- /** No error is produced. */
- YAML_NO_ERROR,
-
- /** Cannot allocate or reallocate a block of memory. */
- YAML_MEMORY_ERROR,
-
- /** Cannot read or decode the input stream. */
- YAML_READER_ERROR,
- /** Cannot scan the input stream. */
- YAML_SCANNER_ERROR,
- /** Cannot parse the input stream. */
- YAML_PARSER_ERROR,
- /** Cannot compose a YAML document. */
- YAML_COMPOSER_ERROR,
-
- /** Cannot write to the output stream. */
- YAML_WRITER_ERROR,
- /** Cannot emit a YAML stream. */
- YAML_EMITTER_ERROR
-} yaml_error_type_t;
-
-/** The pointer position. */
-typedef struct yaml_mark_s {
- /** The position index. */
- size_t index;
-
- /** The position line. */
- size_t line;
-
- /** The position column. */
- size_t column;
-} yaml_mark_t;
-
-/** @} */
-
-/**
- * @defgroup styles Node Styles
- * @{
- */
-
-/** Scalar styles. */
-typedef enum yaml_scalar_style_e {
- /** Let the emitter choose the style. */
- YAML_ANY_SCALAR_STYLE,
-
- /** The plain scalar style. */
- YAML_PLAIN_SCALAR_STYLE,
-
- /** The single-quoted scalar style. */
- YAML_SINGLE_QUOTED_SCALAR_STYLE,
- /** The double-quoted scalar style. */
- YAML_DOUBLE_QUOTED_SCALAR_STYLE,
-
- /** The literal scalar style. */
- YAML_LITERAL_SCALAR_STYLE,
- /** The folded scalar style. */
- YAML_FOLDED_SCALAR_STYLE
-} yaml_scalar_style_t;
-
-/** Sequence styles. */
-typedef enum yaml_sequence_style_e {
- /** Let the emitter choose the style. */
- YAML_ANY_SEQUENCE_STYLE,
-
- /** The block sequence style. */
- YAML_BLOCK_SEQUENCE_STYLE,
- /** The flow sequence style. */
- YAML_FLOW_SEQUENCE_STYLE
-} yaml_sequence_style_t;
-
-/** Mapping styles. */
-typedef enum yaml_mapping_style_e {
- /** Let the emitter choose the style. */
- YAML_ANY_MAPPING_STYLE,
-
- /** The block mapping style. */
- YAML_BLOCK_MAPPING_STYLE,
- /** The flow mapping style. */
- YAML_FLOW_MAPPING_STYLE
-/* YAML_FLOW_SET_MAPPING_STYLE */
-} yaml_mapping_style_t;
-
-/** @} */
-
-/**
- * @defgroup tokens Tokens
- * @{
- */
-
-/** Token types. */
-typedef enum yaml_token_type_e {
- /** An empty token. */
- YAML_NO_TOKEN,
-
- /** A STREAM-START token. */
- YAML_STREAM_START_TOKEN,
- /** A STREAM-END token. */
- YAML_STREAM_END_TOKEN,
-
- /** A VERSION-DIRECTIVE token. */
- YAML_VERSION_DIRECTIVE_TOKEN,
- /** A TAG-DIRECTIVE token. */
- YAML_TAG_DIRECTIVE_TOKEN,
- /** A DOCUMENT-START token. */
- YAML_DOCUMENT_START_TOKEN,
- /** A DOCUMENT-END token. */
- YAML_DOCUMENT_END_TOKEN,
-
- /** A BLOCK-SEQUENCE-START token. */
- YAML_BLOCK_SEQUENCE_START_TOKEN,
- /** A BLOCK-SEQUENCE-END token. */
- YAML_BLOCK_MAPPING_START_TOKEN,
- /** A BLOCK-END token. */
- YAML_BLOCK_END_TOKEN,
-
- /** A FLOW-SEQUENCE-START token. */
- YAML_FLOW_SEQUENCE_START_TOKEN,
- /** A FLOW-SEQUENCE-END token. */
- YAML_FLOW_SEQUENCE_END_TOKEN,
- /** A FLOW-MAPPING-START token. */
- YAML_FLOW_MAPPING_START_TOKEN,
- /** A FLOW-MAPPING-END token. */
- YAML_FLOW_MAPPING_END_TOKEN,
-
- /** A BLOCK-ENTRY token. */
- YAML_BLOCK_ENTRY_TOKEN,
- /** A FLOW-ENTRY token. */
- YAML_FLOW_ENTRY_TOKEN,
- /** A KEY token. */
- YAML_KEY_TOKEN,
- /** A VALUE token. */
- YAML_VALUE_TOKEN,
-
- /** An ALIAS token. */
- YAML_ALIAS_TOKEN,
- /** An ANCHOR token. */
- YAML_ANCHOR_TOKEN,
- /** A TAG token. */
- YAML_TAG_TOKEN,
- /** A SCALAR token. */
- YAML_SCALAR_TOKEN
-} yaml_token_type_t;
-
-/** The token structure. */
-typedef struct yaml_token_s {
-
- /** The token type. */
- yaml_token_type_t type;
-
- /** The token data. */
- union {
-
- /** The stream start (for @c YAML_STREAM_START_TOKEN). */
- struct {
- /** The stream encoding. */
- yaml_encoding_t encoding;
- } stream_start;
-
- /** The alias (for @c YAML_ALIAS_TOKEN). */
- struct {
- /** The alias value. */
- yaml_char_t *value;
- } alias;
-
- /** The anchor (for @c YAML_ANCHOR_TOKEN). */
- struct {
- /** The anchor value. */
- yaml_char_t *value;
- } anchor;
-
- /** The tag (for @c YAML_TAG_TOKEN). */
- struct {
- /** The tag handle. */
- yaml_char_t *handle;
- /** The tag suffix. */
- yaml_char_t *suffix;
- } tag;
-
- /** The scalar value (for @c YAML_SCALAR_TOKEN). */
- struct {
- /** The scalar value. */
- yaml_char_t *value;
- /** The length of the scalar value. */
- size_t length;
- /** The scalar style. */
- yaml_scalar_style_t style;
- } scalar;
-
- /** The version directive (for @c YAML_VERSION_DIRECTIVE_TOKEN). */
- struct {
- /** The major version number. */
- int major;
- /** The minor version number. */
- int minor;
- } version_directive;
-
- /** The tag directive (for @c YAML_TAG_DIRECTIVE_TOKEN). */
- struct {
- /** The tag handle. */
- yaml_char_t *handle;
- /** The tag prefix. */
- yaml_char_t *prefix;
- } tag_directive;
-
- } data;
-
- /** The beginning of the token. */
- yaml_mark_t start_mark;
- /** The end of the token. */
- yaml_mark_t end_mark;
-
-} yaml_token_t;
-
-/**
- * Free any memory allocated for a token object.
- *
- * @param[in,out] token A token object.
- */
-
-YAML_DECLARE(void)
-yaml_token_delete(yaml_token_t *token);
-
-/** @} */
-
-/**
- * @defgroup events Events
- * @{
- */
-
-/** Event types. */
-typedef enum yaml_event_type_e {
- /** An empty event. */
- YAML_NO_EVENT,
-
- /** A STREAM-START event. */
- YAML_STREAM_START_EVENT,
- /** A STREAM-END event. */
- YAML_STREAM_END_EVENT,
-
- /** A DOCUMENT-START event. */
- YAML_DOCUMENT_START_EVENT,
- /** A DOCUMENT-END event. */
- YAML_DOCUMENT_END_EVENT,
-
- /** An ALIAS event. */
- YAML_ALIAS_EVENT,
- /** A SCALAR event. */
- YAML_SCALAR_EVENT,
-
- /** A SEQUENCE-START event. */
- YAML_SEQUENCE_START_EVENT,
- /** A SEQUENCE-END event. */
- YAML_SEQUENCE_END_EVENT,
-
- /** A MAPPING-START event. */
- YAML_MAPPING_START_EVENT,
- /** A MAPPING-END event. */
- YAML_MAPPING_END_EVENT
-} yaml_event_type_t;
-
-/** The event structure. */
-typedef struct yaml_event_s {
-
- /** The event type. */
- yaml_event_type_t type;
-
- /** The event data. */
- union {
-
- /** The stream parameters (for @c YAML_STREAM_START_EVENT). */
- struct {
- /** The document encoding. */
- yaml_encoding_t encoding;
- } stream_start;
-
- /** The document parameters (for @c YAML_DOCUMENT_START_EVENT). */
- struct {
- /** The version directive. */
- yaml_version_directive_t *version_directive;
-
- /** The list of tag directives. */
- struct {
- /** The beginning of the tag directives list. */
- yaml_tag_directive_t *start;
- /** The end of the tag directives list. */
- yaml_tag_directive_t *end;
- } tag_directives;
-
- /** Is the document indicator implicit? */
- int implicit;
- } document_start;
-
- /** The document end parameters (for @c YAML_DOCUMENT_END_EVENT). */
- struct {
- /** Is the document end indicator implicit? */
- int implicit;
- } document_end;
-
- /** The alias parameters (for @c YAML_ALIAS_EVENT). */
- struct {
- /** The anchor. */
- yaml_char_t *anchor;
- } alias;
-
- /** The scalar parameters (for @c YAML_SCALAR_EVENT). */
- struct {
- /** The anchor. */
- yaml_char_t *anchor;
- /** The tag. */
- yaml_char_t *tag;
- /** The scalar value. */
- yaml_char_t *value;
- /** The length of the scalar value. */
- size_t length;
- /** Is the tag optional for the plain style? */
- int plain_implicit;
- /** Is the tag optional for any non-plain style? */
- int quoted_implicit;
- /** The scalar style. */
- yaml_scalar_style_t style;
- } scalar;
-
- /** The sequence parameters (for @c YAML_SEQUENCE_START_EVENT). */
- struct {
- /** The anchor. */
- yaml_char_t *anchor;
- /** The tag. */
- yaml_char_t *tag;
- /** Is the tag optional? */
- int implicit;
- /** The sequence style. */
- yaml_sequence_style_t style;
- } sequence_start;
-
- /** The mapping parameters (for @c YAML_MAPPING_START_EVENT). */
- struct {
- /** The anchor. */
- yaml_char_t *anchor;
- /** The tag. */
- yaml_char_t *tag;
- /** Is the tag optional? */
- int implicit;
- /** The mapping style. */
- yaml_mapping_style_t style;
- } mapping_start;
-
- } data;
-
- /** The beginning of the event. */
- yaml_mark_t start_mark;
- /** The end of the event. */
- yaml_mark_t end_mark;
-
-} yaml_event_t;
-
-/**
- * Create the STREAM-START event.
- *
- * @param[out] event An empty event object.
- * @param[in] encoding The stream encoding.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_stream_start_event_initialize(yaml_event_t *event,
- yaml_encoding_t encoding);
-
-/**
- * Create the STREAM-END event.
- *
- * @param[out] event An empty event object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_stream_end_event_initialize(yaml_event_t *event);
-
-/**
- * Create the DOCUMENT-START event.
- *
- * The @a implicit argument is considered as a stylistic parameter and may be
- * ignored by the emitter.
- *
- * @param[out] event An empty event object.
- * @param[in] version_directive The %YAML directive value or
- * @c NULL.
- * @param[in] tag_directives_start The beginning of the %TAG
- * directives list.
- * @param[in] tag_directives_end The end of the %TAG directives
- * list.
- * @param[in] implicit If the document start indicator is
- * implicit.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_start_event_initialize(yaml_event_t *event,
- yaml_version_directive_t *version_directive,
- yaml_tag_directive_t *tag_directives_start,
- yaml_tag_directive_t *tag_directives_end,
- int implicit);
-
-/**
- * Create the DOCUMENT-END event.
- *
- * The @a implicit argument is considered as a stylistic parameter and may be
- * ignored by the emitter.
- *
- * @param[out] event An empty event object.
- * @param[in] implicit If the document end indicator is implicit.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_end_event_initialize(yaml_event_t *event, int implicit);
-
-/**
- * Create an ALIAS event.
- *
- * @param[out] event An empty event object.
- * @param[in] anchor The anchor value.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
-
-/**
- * Create a SCALAR event.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * Either the @a tag attribute or one of the @a plain_implicit and
- * @a quoted_implicit flags must be set.
- *
- * @param[out] event An empty event object.
- * @param[in] anchor The scalar anchor or @c NULL.
- * @param[in] tag The scalar tag or @c NULL.
- * @param[in] value The scalar value.
- * @param[in] length The length of the scalar value.
- * @param[in] plain_implicit If the tag may be omitted for the plain
- * style.
- * @param[in] quoted_implicit If the tag may be omitted for any
- * non-plain style.
- * @param[in] style The scalar style.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_scalar_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag,
- yaml_char_t *value, int length,
- int plain_implicit, int quoted_implicit,
- yaml_scalar_style_t style);
-
-/**
- * Create a SEQUENCE-START event.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * Either the @a tag attribute or the @a implicit flag must be set.
- *
- * @param[out] event An empty event object.
- * @param[in] anchor The sequence anchor or @c NULL.
- * @param[in] tag The sequence tag or @c NULL.
- * @param[in] implicit If the tag may be omitted.
- * @param[in] style The sequence style.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_sequence_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
- yaml_sequence_style_t style);
-
-/**
- * Create a SEQUENCE-END event.
- *
- * @param[out] event An empty event object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_sequence_end_event_initialize(yaml_event_t *event);
-
-/**
- * Create a MAPPING-START event.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * Either the @a tag attribute or the @a implicit flag must be set.
- *
- * @param[out] event An empty event object.
- * @param[in] anchor The mapping anchor or @c NULL.
- * @param[in] tag The mapping tag or @c NULL.
- * @param[in] implicit If the tag may be omitted.
- * @param[in] style The mapping style.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_mapping_start_event_initialize(yaml_event_t *event,
- yaml_char_t *anchor, yaml_char_t *tag, int implicit,
- yaml_mapping_style_t style);
-
-/**
- * Create a MAPPING-END event.
- *
- * @param[out] event An empty event object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_mapping_end_event_initialize(yaml_event_t *event);
-
-/**
- * Free any memory allocated for an event object.
- *
- * @param[in,out] event An event object.
- */
-
-YAML_DECLARE(void)
-yaml_event_delete(yaml_event_t *event);
-
-/** @} */
-
-/**
- * @defgroup nodes Nodes
- * @{
- */
-
-/** The tag @c !!null with the only possible value: @c null. */
-#define YAML_NULL_TAG "tag:yaml.org,2002:null"
-/** The tag @c !!bool with the values: @c true and @c falce. */
-#define YAML_BOOL_TAG "tag:yaml.org,2002:bool"
-/** The tag @c !!str for string values. */
-#define YAML_STR_TAG "tag:yaml.org,2002:str"
-/** The tag @c !!int for integer values. */
-#define YAML_INT_TAG "tag:yaml.org,2002:int"
-/** The tag @c !!float for float values. */
-#define YAML_FLOAT_TAG "tag:yaml.org,2002:float"
-/** The tag @c !!timestamp for date and time values. */
-#define YAML_TIMESTAMP_TAG "tag:yaml.org,2002:timestamp"
-
-/** The tag @c !!seq is used to denote sequences. */
-#define YAML_SEQ_TAG "tag:yaml.org,2002:seq"
-/** The tag @c !!map is used to denote mapping. */
-#define YAML_MAP_TAG "tag:yaml.org,2002:map"
-
-/** The default scalar tag is @c !!str. */
-#define YAML_DEFAULT_SCALAR_TAG YAML_STR_TAG
-/** The default sequence tag is @c !!seq. */
-#define YAML_DEFAULT_SEQUENCE_TAG YAML_SEQ_TAG
-/** The default mapping tag is @c !!map. */
-#define YAML_DEFAULT_MAPPING_TAG YAML_MAP_TAG
-
-/** Node types. */
-typedef enum yaml_node_type_e {
- /** An empty node. */
- YAML_NO_NODE,
-
- /** A scalar node. */
- YAML_SCALAR_NODE,
- /** A sequence node. */
- YAML_SEQUENCE_NODE,
- /** A mapping node. */
- YAML_MAPPING_NODE
-} yaml_node_type_t;
-
-/** The forward definition of a document node structure. */
-typedef struct yaml_node_s yaml_node_t;
-
-/** An element of a sequence node. */
-typedef int yaml_node_item_t;
-
-/** An element of a mapping node. */
-typedef struct yaml_node_pair_s {
- /** The key of the element. */
- int key;
- /** The value of the element. */
- int value;
-} yaml_node_pair_t;
-
-/** The node structure. */
-struct yaml_node_s {
-
- /** The node type. */
- yaml_node_type_t type;
-
- /** The node tag. */
- yaml_char_t *tag;
-
- /** The node data. */
- union {
-
- /** The scalar parameters (for @c YAML_SCALAR_NODE). */
- struct {
- /** The scalar value. */
- yaml_char_t *value;
- /** The length of the scalar value. */
- size_t length;
- /** The scalar style. */
- yaml_scalar_style_t style;
- } scalar;
-
- /** The sequence parameters (for @c YAML_SEQUENCE_NODE). */
- struct {
- /** The stack of sequence items. */
- struct {
- /** The beginning of the stack. */
- yaml_node_item_t *start;
- /** The end of the stack. */
- yaml_node_item_t *end;
- /** The top of the stack. */
- yaml_node_item_t *top;
- } items;
- /** The sequence style. */
- yaml_sequence_style_t style;
- } sequence;
-
- /** The mapping parameters (for @c YAML_MAPPING_NODE). */
- struct {
- /** The stack of mapping pairs (key, value). */
- struct {
- /** The beginning of the stack. */
- yaml_node_pair_t *start;
- /** The end of the stack. */
- yaml_node_pair_t *end;
- /** The top of the stack. */
- yaml_node_pair_t *top;
- } pairs;
- /** The mapping style. */
- yaml_mapping_style_t style;
- } mapping;
-
- } data;
-
- /** The beginning of the node. */
- yaml_mark_t start_mark;
- /** The end of the node. */
- yaml_mark_t end_mark;
-
-};
-
-/** The document structure. */
-typedef struct yaml_document_s {
-
- /** The document nodes. */
- struct {
- /** The beginning of the stack. */
- yaml_node_t *start;
- /** The end of the stack. */
- yaml_node_t *end;
- /** The top of the stack. */
- yaml_node_t *top;
- } nodes;
-
- /** The version directive. */
- yaml_version_directive_t *version_directive;
-
- /** The list of tag directives. */
- struct {
- /** The beginning of the tag directives list. */
- yaml_tag_directive_t *start;
- /** The end of the tag directives list. */
- yaml_tag_directive_t *end;
- } tag_directives;
-
- /** Is the document start indicator implicit? */
- int start_implicit;
- /** Is the document end indicator implicit? */
- int end_implicit;
-
- /** The beginning of the document. */
- yaml_mark_t start_mark;
- /** The end of the document. */
- yaml_mark_t end_mark;
-
-} yaml_document_t;
-
-/**
- * Create a YAML document.
- *
- * @param[out] document An empty document object.
- * @param[in] version_directive The %YAML directive value or
- * @c NULL.
- * @param[in] tag_directives_start The beginning of the %TAG
- * directives list.
- * @param[in] tag_directives_end The end of the %TAG directives
- * list.
- * @param[in] start_implicit If the document start indicator is
- * implicit.
- * @param[in] end_implicit If the document end indicator is
- * implicit.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_initialize(yaml_document_t *document,
- yaml_version_directive_t *version_directive,
- yaml_tag_directive_t *tag_directives_start,
- yaml_tag_directive_t *tag_directives_end,
- int start_implicit, int end_implicit);
-
-/**
- * Delete a YAML document and all its nodes.
- *
- * @param[in,out] document A document object.
- */
-
-YAML_DECLARE(void)
-yaml_document_delete(yaml_document_t *document);
-
-/**
- * Get a node of a YAML document.
- *
- * The pointer returned by this function is valid until any of the functions
- * modifying the documents are called.
- *
- * @param[in] document A document object.
- * @param[in] index The node id.
- *
- * @returns the node objct or @c NULL if @c node_id is out of range.
- */
-
-YAML_DECLARE(yaml_node_t *)
-yaml_document_get_node(yaml_document_t *document, int index);
-
-/**
- * Get the root of a YAML document node.
- *
- * The root object is the first object added to the document.
- *
- * The pointer returned by this function is valid until any of the functions
- * modifying the documents are called.
- *
- * An empty document produced by the parser signifies the end of a YAML
- * stream.
- *
- * @param[in] document A document object.
- *
- * @returns the node object or @c NULL if the document is empty.
- */
-
-YAML_DECLARE(yaml_node_t *)
-yaml_document_get_root_node(yaml_document_t *document);
-
-/**
- * Create a SCALAR node and attach it to the document.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * @param[in,out] document A document object.
- * @param[in] tag The scalar tag.
- * @param[in] value The scalar value.
- * @param[in] length The length of the scalar value.
- * @param[in] style The scalar style.
- *
- * @returns the node id or @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_scalar(yaml_document_t *document,
- yaml_char_t *tag, yaml_char_t *value, int length,
- yaml_scalar_style_t style);
-
-/**
- * Create a SEQUENCE node and attach it to the document.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * @param[in,out] document A document object.
- * @param[in] tag The sequence tag.
- * @param[in] style The sequence style.
- *
- * @returns the node id or @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_sequence(yaml_document_t *document,
- yaml_char_t *tag, yaml_sequence_style_t style);
-
-/**
- * Create a MAPPING node and attach it to the document.
- *
- * The @a style argument may be ignored by the emitter.
- *
- * @param[in,out] document A document object.
- * @param[in] tag The sequence tag.
- * @param[in] style The sequence style.
- *
- * @returns the node id or @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_add_mapping(yaml_document_t *document,
- yaml_char_t *tag, yaml_mapping_style_t style);
-
-/**
- * Add an item to a SEQUENCE node.
- *
- * @param[in,out] document A document object.
- * @param[in] sequence The sequence node id.
- * @param[in] item The item node id.
-*
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_append_sequence_item(yaml_document_t *document,
- int sequence, int item);
-
-/**
- * Add a pair of a key and a value to a MAPPING node.
- *
- * @param[in,out] document A document object.
- * @param[in] mapping The mapping node id.
- * @param[in] key The key node id.
- * @param[in] value The value node id.
-*
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_document_append_mapping_pair(yaml_document_t *document,
- int mapping, int key, int value);
-
-/** @} */
-
-/**
- * @defgroup parser Parser Definitions
- * @{
- */
-
-/**
- * The prototype of a read handler.
- *
- * The read handler is called when the parser needs to read more bytes from the
- * source. The handler should write not more than @a size bytes to the @a
- * buffer. The number of written bytes should be set to the @a length variable.
- *
- * @param[in,out] data A pointer to an application data specified by
- * yaml_parser_set_input().
- * @param[out] buffer The buffer to write the data from the source.
- * @param[in] size The size of the buffer.
- * @param[out] size_read The actual number of bytes read from the source.
- *
- * @returns On success, the handler should return @c 1. If the handler failed,
- * the returned value should be @c 0. On EOF, the handler should set the
- * @a size_read to @c 0 and return @c 1.
- */
-
-typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size,
- size_t *size_read);
-
-/**
- * This structure holds information about a potential simple key.
- */
-
-typedef struct yaml_simple_key_s {
- /** Is a simple key possible? */
- int possible;
-
- /** Is a simple key required? */
- int required;
-
- /** The number of the token. */
- size_t token_number;
-
- /** The position mark. */
- yaml_mark_t mark;
-} yaml_simple_key_t;
-
-/**
- * The states of the parser.
- */
-typedef enum yaml_parser_state_e {
- /** Expect STREAM-START. */
- YAML_PARSE_STREAM_START_STATE,
- /** Expect the beginning of an implicit document. */
- YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE,
- /** Expect DOCUMENT-START. */
- YAML_PARSE_DOCUMENT_START_STATE,
- /** Expect the content of a document. */
- YAML_PARSE_DOCUMENT_CONTENT_STATE,
- /** Expect DOCUMENT-END. */
- YAML_PARSE_DOCUMENT_END_STATE,
- /** Expect a block node. */
- YAML_PARSE_BLOCK_NODE_STATE,
- /** Expect a block node or indentless sequence. */
- YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE,
- /** Expect a flow node. */
- YAML_PARSE_FLOW_NODE_STATE,
- /** Expect the first entry of a block sequence. */
- YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE,
- /** Expect an entry of a block sequence. */
- YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE,
- /** Expect an entry of an indentless sequence. */
- YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE,
- /** Expect the first key of a block mapping. */
- YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE,
- /** Expect a block mapping key. */
- YAML_PARSE_BLOCK_MAPPING_KEY_STATE,
- /** Expect a block mapping value. */
- YAML_PARSE_BLOCK_MAPPING_VALUE_STATE,
- /** Expect the first entry of a flow sequence. */
- YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE,
- /** Expect an entry of a flow sequence. */
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE,
- /** Expect a key of an ordered mapping. */
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE,
- /** Expect a value of an ordered mapping. */
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE,
- /** Expect the and of an ordered mapping entry. */
- YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE,
- /** Expect the first key of a flow mapping. */
- YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE,
- /** Expect a key of a flow mapping. */
- YAML_PARSE_FLOW_MAPPING_KEY_STATE,
- /** Expect a value of a flow mapping. */
- YAML_PARSE_FLOW_MAPPING_VALUE_STATE,
- /** Expect an empty value of a flow mapping. */
- YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE,
- /** Expect nothing. */
- YAML_PARSE_END_STATE
-} yaml_parser_state_t;
-
-/**
- * This structure holds aliases data.
- */
-
-typedef struct yaml_alias_data_s {
- /** The anchor. */
- yaml_char_t *anchor;
- /** The node id. */
- int index;
- /** The anchor mark. */
- yaml_mark_t mark;
-} yaml_alias_data_t;
-
-/**
- * The parser structure.
- *
- * All members are internal. Manage the structure using the @c yaml_parser_
- * family of functions.
- */
-
-typedef struct yaml_parser_s {
-
- /**
- * @name Error handling
- * @{
- */
-
- /** Error type. */
- yaml_error_type_t error;
- /** Error description. */
- const char *problem;
- /** The byte about which the problem occurred. */
- size_t problem_offset;
- /** The problematic value (@c -1 is none). */
- int problem_value;
- /** The problem position. */
- yaml_mark_t problem_mark;
- /** The error context. */
- const char *context;
- /** The context position. */
- yaml_mark_t context_mark;
-
- /**
- * @}
- */
-
- /**
- * @name Reader stuff
- * @{
- */
-
- /** Read handler. */
- yaml_read_handler_t *read_handler;
-
- /** A pointer for passing to the read handler. */
- void *read_handler_data;
-
- /** Standard (string or file) input data. */
- union {
- /** String input data. */
- struct {
- /** The string start pointer. */
- const unsigned char *start;
- /** The string end pointer. */
- const unsigned char *end;
- /** The string current position. */
- const unsigned char *current;
- } string;
-
- /** File input data. */
- FILE *file;
- } input;
-
- /** EOF flag */
- int eof;
-
- /** The working buffer. */
- struct {
- /** The beginning of the buffer. */
- yaml_char_t *start;
- /** The end of the buffer. */
- yaml_char_t *end;
- /** The current position of the buffer. */
- yaml_char_t *pointer;
- /** The last filled position of the buffer. */
- yaml_char_t *last;
- } buffer;
-
- /* The number of unread characters in the buffer. */
- size_t unread;
-
- /** The raw buffer. */
- struct {
- /** The beginning of the buffer. */
- unsigned char *start;
- /** The end of the buffer. */
- unsigned char *end;
- /** The current position of the buffer. */
- unsigned char *pointer;
- /** The last filled position of the buffer. */
- unsigned char *last;
- } raw_buffer;
-
- /** The input encoding. */
- yaml_encoding_t encoding;
-
- /** The offset of the current position (in bytes). */
- size_t offset;
-
- /** The mark of the current position. */
- yaml_mark_t mark;
-
- /**
- * @}
- */
-
- /**
- * @name Scanner stuff
- * @{
- */
-
- /** Have we started to scan the input stream? */
- int stream_start_produced;
-
- /** Have we reached the end of the input stream? */
- int stream_end_produced;
-
- /** The number of unclosed '[' and '{' indicators. */
- int flow_level;
-
- /** The tokens queue. */
- struct {
- /** The beginning of the tokens queue. */
- yaml_token_t *start;
- /** The end of the tokens queue. */
- yaml_token_t *end;
- /** The head of the tokens queue. */
- yaml_token_t *head;
- /** The tail of the tokens queue. */
- yaml_token_t *tail;
- } tokens;
-
- /** The number of tokens fetched from the queue. */
- size_t tokens_parsed;
-
- /* Does the tokens queue contain a token ready for dequeueing. */
- int token_available;
-
- /** The indentation levels stack. */
- struct {
- /** The beginning of the stack. */
- int *start;
- /** The end of the stack. */
- int *end;
- /** The top of the stack. */
- int *top;
- } indents;
-
- /** The current indentation level. */
- int indent;
-
- /** May a simple key occur at the current position? */
- int simple_key_allowed;
-
- /** The stack of simple keys. */
- struct {
- /** The beginning of the stack. */
- yaml_simple_key_t *start;
- /** The end of the stack. */
- yaml_simple_key_t *end;
- /** The top of the stack. */
- yaml_simple_key_t *top;
- } simple_keys;
-
- /**
- * @}
- */
-
- /**
- * @name Parser stuff
- * @{
- */
-
- /** The parser states stack. */
- struct {
- /** The beginning of the stack. */
- yaml_parser_state_t *start;
- /** The end of the stack. */
- yaml_parser_state_t *end;
- /** The top of the stack. */
- yaml_parser_state_t *top;
- } states;
-
- /** The current parser state. */
- yaml_parser_state_t state;
-
- /** The stack of marks. */
- struct {
- /** The beginning of the stack. */
- yaml_mark_t *start;
- /** The end of the stack. */
- yaml_mark_t *end;
- /** The top of the stack. */
- yaml_mark_t *top;
- } marks;
-
- /** The list of TAG directives. */
- struct {
- /** The beginning of the list. */
- yaml_tag_directive_t *start;
- /** The end of the list. */
- yaml_tag_directive_t *end;
- /** The top of the list. */
- yaml_tag_directive_t *top;
- } tag_directives;
-
- /**
- * @}
- */
-
- /**
- * @name Dumper stuff
- * @{
- */
-
- /** The alias data. */
- struct {
- /** The beginning of the list. */
- yaml_alias_data_t *start;
- /** The end of the list. */
- yaml_alias_data_t *end;
- /** The top of the list. */
- yaml_alias_data_t *top;
- } aliases;
-
- /** The currently parsed document. */
- yaml_document_t *document;
-
- /**
- * @}
- */
-
-} yaml_parser_t;
-
-/**
- * Initialize a parser.
- *
- * This function creates a new parser object. An application is responsible
- * for destroying the object using the yaml_parser_delete() function.
- *
- * @param[out] parser An empty parser object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_parser_initialize(yaml_parser_t *parser);
-
-/**
- * Destroy a parser.
- *
- * @param[in,out] parser A parser object.
- */
-
-YAML_DECLARE(void)
-yaml_parser_delete(yaml_parser_t *parser);
-
-/**
- * Set a string input.
- *
- * Note that the @a input pointer must be valid while the @a parser object
- * exists. The application is responsible for destroing @a input after
- * destroying the @a parser.
- *
- * @param[in,out] parser A parser object.
- * @param[in] input A source data.
- * @param[in] size The length of the source data in bytes.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input_string(yaml_parser_t *parser,
- const unsigned char *input, size_t size);
-
-/**
- * Set a file input.
- *
- * @a file should be a file object open for reading. The application is
- * responsible for closing the @a file.
- *
- * @param[in,out] parser A parser object.
- * @param[in] file An open file.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input_file(yaml_parser_t *parser, FILE *file);
-
-/**
- * Set a generic input handler.
- *
- * @param[in,out] parser A parser object.
- * @param[in] handler A read handler.
- * @param[in] data Any application data for passing to the read
- * handler.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_input(yaml_parser_t *parser,
- yaml_read_handler_t *handler, void *data);
-
-/**
- * Set the source encoding.
- *
- * @param[in,out] parser A parser object.
- * @param[in] encoding The source encoding.
- */
-
-YAML_DECLARE(void)
-yaml_parser_set_encoding(yaml_parser_t *parser, yaml_encoding_t encoding);
-
-/**
- * Scan the input stream and produce the next token.
- *
- * Call the function subsequently to produce a sequence of tokens corresponding
- * to the input stream. The initial token has the type
- * @c YAML_STREAM_START_TOKEN while the ending token has the type
- * @c YAML_STREAM_END_TOKEN.
- *
- * An application is responsible for freeing any buffers associated with the
- * produced token object using the @c yaml_token_delete function.
- *
- * An application must not alternate the calls of yaml_parser_scan() with the
- * calls of yaml_parser_parse() or yaml_parser_load(). Doing this will break
- * the parser.
- *
- * @param[in,out] parser A parser object.
- * @param[out] token An empty token object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_parser_scan(yaml_parser_t *parser, yaml_token_t *token);
-
-/**
- * Parse the input stream and produce the next parsing event.
- *
- * Call the function subsequently to produce a sequence of events corresponding
- * to the input stream. The initial event has the type
- * @c YAML_STREAM_START_EVENT while the ending event has the type
- * @c YAML_STREAM_END_EVENT.
- *
- * An application is responsible for freeing any buffers associated with the
- * produced event object using the yaml_event_delete() function.
- *
- * An application must not alternate the calls of yaml_parser_parse() with the
- * calls of yaml_parser_scan() or yaml_parser_load(). Doing this will break the
- * parser.
- *
- * @param[in,out] parser A parser object.
- * @param[out] event An empty event object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event);
-
-/**
- * Parse the input stream and produce the next YAML document.
- *
- * Call this function subsequently to produce a sequence of documents
- * constituting the input stream.
- *
- * If the produced document has no root node, it means that the document
- * end has been reached.
- *
- * An application is responsible for freeing any data associated with the
- * produced document object using the yaml_document_delete() function.
- *
- * An application must not alternate the calls of yaml_parser_load() with the
- * calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break
- * the parser.
- *
- * @param[in,out] parser A parser object.
- * @param[out] document An empty document object.
- *
- * @return @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_parser_load(yaml_parser_t *parser, yaml_document_t *document);
-
-/** @} */
-
-/**
- * @defgroup emitter Emitter Definitions
- * @{
- */
-
-/**
- * The prototype of a write handler.
- *
- * The write handler is called when the emitter needs to flush the accumulated
- * characters to the output. The handler should write @a size bytes of the
- * @a buffer to the output.
- *
- * @param[in,out] data A pointer to an application data specified by
- * yaml_emitter_set_output().
- * @param[in] buffer The buffer with bytes to be written.
- * @param[in] size The size of the buffer.
- *
- * @returns On success, the handler should return @c 1. If the handler failed,
- * the returned value should be @c 0.
- */
-
-typedef int yaml_write_handler_t(void *data, unsigned char *buffer, size_t size);
-
-/** The emitter states. */
-typedef enum yaml_emitter_state_e {
- /** Expect STREAM-START. */
- YAML_EMIT_STREAM_START_STATE,
- /** Expect the first DOCUMENT-START or STREAM-END. */
- YAML_EMIT_FIRST_DOCUMENT_START_STATE,
- /** Expect DOCUMENT-START or STREAM-END. */
- YAML_EMIT_DOCUMENT_START_STATE,
- /** Expect the content of a document. */
- YAML_EMIT_DOCUMENT_CONTENT_STATE,
- /** Expect DOCUMENT-END. */
- YAML_EMIT_DOCUMENT_END_STATE,
- /** Expect the first item of a flow sequence. */
- YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE,
- /** Expect an item of a flow sequence. */
- YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE,
- /** Expect the first key of a flow mapping. */
- YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE,
- /** Expect a key of a flow mapping. */
- YAML_EMIT_FLOW_MAPPING_KEY_STATE,
- /** Expect a value for a simple key of a flow mapping. */
- YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE,
- /** Expect a value of a flow mapping. */
- YAML_EMIT_FLOW_MAPPING_VALUE_STATE,
- /** Expect the first item of a block sequence. */
- YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE,
- /** Expect an item of a block sequence. */
- YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE,
- /** Expect the first key of a block mapping. */
- YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE,
- /** Expect the key of a block mapping. */
- YAML_EMIT_BLOCK_MAPPING_KEY_STATE,
- /** Expect a value for a simple key of a block mapping. */
- YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE,
- /** Expect a value of a block mapping. */
- YAML_EMIT_BLOCK_MAPPING_VALUE_STATE,
- /** Expect nothing. */
- YAML_EMIT_END_STATE
-} yaml_emitter_state_t;
-
-/**
- * The emitter structure.
- *
- * All members are internal. Manage the structure using the @c yaml_emitter_
- * family of functions.
- */
-
-typedef struct yaml_emitter_s {
-
- /**
- * @name Error handling
- * @{
- */
-
- /** Error type. */
- yaml_error_type_t error;
- /** Error description. */
- const char *problem;
-
- /**
- * @}
- */
-
- /**
- * @name Writer stuff
- * @{
- */
-
- /** Write handler. */
- yaml_write_handler_t *write_handler;
-
- /** A pointer for passing to the white handler. */
- void *write_handler_data;
-
- /** Standard (string or file) output data. */
- union {
- /** String output data. */
- struct {
- /** The buffer pointer. */
- unsigned char *buffer;
- /** The buffer size. */
- size_t size;
- /** The number of written bytes. */
- size_t *size_written;
- } string;
-
- /** File output data. */
- FILE *file;
- } output;
-
- /** The working buffer. */
- struct {
- /** The beginning of the buffer. */
- yaml_char_t *start;
- /** The end of the buffer. */
- yaml_char_t *end;
- /** The current position of the buffer. */
- yaml_char_t *pointer;
- /** The last filled position of the buffer. */
- yaml_char_t *last;
- } buffer;
-
- /** The raw buffer. */
- struct {
- /** The beginning of the buffer. */
- unsigned char *start;
- /** The end of the buffer. */
- unsigned char *end;
- /** The current position of the buffer. */
- unsigned char *pointer;
- /** The last filled position of the buffer. */
- unsigned char *last;
- } raw_buffer;
-
- /** The stream encoding. */
- yaml_encoding_t encoding;
-
- /**
- * @}
- */
-
- /**
- * @name Emitter stuff
- * @{
- */
-
- /** If the output is in the canonical style? */
- int canonical;
- /** The number of indentation spaces. */
- int best_indent;
- /** The preferred width of the output lines. */
- int best_width;
- /** Allow unescaped non-ASCII characters? */
- int unicode;
- /** The preferred line break. */
- yaml_break_t line_break;
-
- /** The stack of states. */
- struct {
- /** The beginning of the stack. */
- yaml_emitter_state_t *start;
- /** The end of the stack. */
- yaml_emitter_state_t *end;
- /** The top of the stack. */
- yaml_emitter_state_t *top;
- } states;
-
- /** The current emitter state. */
- yaml_emitter_state_t state;
-
- /** The event queue. */
- struct {
- /** The beginning of the event queue. */
- yaml_event_t *start;
- /** The end of the event queue. */
- yaml_event_t *end;
- /** The head of the event queue. */
- yaml_event_t *head;
- /** The tail of the event queue. */
- yaml_event_t *tail;
- } events;
-
- /** The stack of indentation levels. */
- struct {
- /** The beginning of the stack. */
- int *start;
- /** The end of the stack. */
- int *end;
- /** The top of the stack. */
- int *top;
- } indents;
-
- /** The list of tag directives. */
- struct {
- /** The beginning of the list. */
- yaml_tag_directive_t *start;
- /** The end of the list. */
- yaml_tag_directive_t *end;
- /** The top of the list. */
- yaml_tag_directive_t *top;
- } tag_directives;
-
- /** The current indentation level. */
- int indent;
-
- /** The current flow level. */
- int flow_level;
-
- /** Is it the document root context? */
- int root_context;
- /** Is it a sequence context? */
- int sequence_context;
- /** Is it a mapping context? */
- int mapping_context;
- /** Is it a simple mapping key context? */
- int simple_key_context;
-
- /** The current line. */
- int line;
- /** The current column. */
- int column;
- /** If the last character was a whitespace? */
- int whitespace;
- /** If the last character was an indentation character (' ', '-', '?', ':')? */
- int indention;
- /** If an explicit document end is required? */
- int open_ended;
-
- /** Anchor analysis. */
- struct {
- /** The anchor value. */
- yaml_char_t *anchor;
- /** The anchor length. */
- size_t anchor_length;
- /** Is it an alias? */
- int alias;
- } anchor_data;
-
- /** Tag analysis. */
- struct {
- /** The tag handle. */
- yaml_char_t *handle;
- /** The tag handle length. */
- size_t handle_length;
- /** The tag suffix. */
- yaml_char_t *suffix;
- /** The tag suffix length. */
- size_t suffix_length;
- } tag_data;
-
- /** Scalar analysis. */
- struct {
- /** The scalar value. */
- yaml_char_t *value;
- /** The scalar length. */
- size_t length;
- /** Does the scalar contain line breaks? */
- int multiline;
- /** Can the scalar be expessed in the flow plain style? */
- int flow_plain_allowed;
- /** Can the scalar be expressed in the block plain style? */
- int block_plain_allowed;
- /** Can the scalar be expressed in the single quoted style? */
- int single_quoted_allowed;
- /** Can the scalar be expressed in the literal or folded styles? */
- int block_allowed;
- /** The output style. */
- yaml_scalar_style_t style;
- } scalar_data;
-
- /**
- * @}
- */
-
- /**
- * @name Dumper stuff
- * @{
- */
-
- /** If the stream was already opened? */
- int opened;
- /** If the stream was already closed? */
- int closed;
-
- /** The information associated with the document nodes. */
- struct {
- /** The number of references. */
- int references;
- /** The anchor id. */
- int anchor;
- /** If the node has been emitted? */
- int serialized;
- } *anchors;
-
- /** The last assigned anchor id. */
- int last_anchor_id;
-
- /** The currently emitted document. */
- yaml_document_t *document;
-
- /**
- * @}
- */
-
-} yaml_emitter_t;
-
-/**
- * Initialize an emitter.
- *
- * This function creates a new emitter object. An application is responsible
- * for destroying the object using the yaml_emitter_delete() function.
- *
- * @param[out] emitter An empty parser object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_initialize(yaml_emitter_t *emitter);
-
-/**
- * Destroy an emitter.
- *
- * @param[in,out] emitter An emitter object.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_delete(yaml_emitter_t *emitter);
-
-/**
- * Set a string output.
- *
- * The emitter will write the output characters to the @a output buffer of the
- * size @a size. The emitter will set @a size_written to the number of written
- * bytes. If the buffer is smaller than required, the emitter produces the
- * YAML_WRITE_ERROR error.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] output An output buffer.
- * @param[in] size The buffer size.
- * @param[in] size_written The pointer to save the number of written
- * bytes.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output_string(yaml_emitter_t *emitter,
- unsigned char *output, size_t size, size_t *size_written);
-
-/**
- * Set a file output.
- *
- * @a file should be a file object open for writing. The application is
- * responsible for closing the @a file.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] file An open file.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output_file(yaml_emitter_t *emitter, FILE *file);
-
-/**
- * Set a generic output handler.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] handler A write handler.
- * @param[in] data Any application data for passing to the write
- * handler.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_output(yaml_emitter_t *emitter,
- yaml_write_handler_t *handler, void *data);
-
-/**
- * Set the output encoding.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] encoding The output encoding.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_encoding(yaml_emitter_t *emitter, yaml_encoding_t encoding);
-
-/**
- * Set if the output should be in the "canonical" format as in the YAML
- * specification.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] canonical If the output is canonical.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical);
-
-/**
- * Set the indentation increment.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] indent The indentation increment (1 < . < 10).
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent);
-
-/**
- * Set the preferred line width. @c -1 means unlimited.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] width The preferred line width.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_width(yaml_emitter_t *emitter, int width);
-
-/**
- * Set if unescaped non-ASCII characters are allowed.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] unicode If unescaped Unicode characters are allowed.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_unicode(yaml_emitter_t *emitter, int unicode);
-
-/**
- * Set the preferred line break.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in] line_break The preferred line break.
- */
-
-YAML_DECLARE(void)
-yaml_emitter_set_break(yaml_emitter_t *emitter, yaml_break_t line_break);
-
-/**
- * Emit an event.
- *
- * The event object may be generated using the yaml_parser_parse() function.
- * The emitter takes the responsibility for the event object and destroys its
- * content after it is emitted. The event object is destroyed even if the
- * function fails.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in,out] event An event object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_emit(yaml_emitter_t *emitter, yaml_event_t *event);
-
-/**
- * Start a YAML stream.
- *
- * This function should be used before yaml_emitter_dump() is called.
- *
- * @param[in,out] emitter An emitter object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_open(yaml_emitter_t *emitter);
-
-/**
- * Finish a YAML stream.
- *
- * This function should be used after yaml_emitter_dump() is called.
- *
- * @param[in,out] emitter An emitter object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_close(yaml_emitter_t *emitter);
-
-/**
- * Emit a YAML document.
- *
- * The documen object may be generated using the yaml_parser_load() function
- * or the yaml_document_initialize() function. The emitter takes the
- * responsibility for the document object and destoys its content after
- * it is emitted. The document object is destroyedeven if the function fails.
- *
- * @param[in,out] emitter An emitter object.
- * @param[in,out] document A document object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document);
-
-/**
- * Flush the accumulated characters to the output.
- *
- * @param[in,out] emitter An emitter object.
- *
- * @returns @c 1 if the function succeeded, @c 0 on error.
- */
-
-YAML_DECLARE(int)
-yaml_emitter_flush(yaml_emitter_t *emitter);
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* #ifndef YAML_H */
-
diff --git a/ext/psych/yaml/yaml_private.h b/ext/psych/yaml/yaml_private.h
deleted file mode 100644
index f4f244cbc8..0000000000
--- a/ext/psych/yaml/yaml_private.h
+++ /dev/null
@@ -1,688 +0,0 @@
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
-#endif
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <yaml.h>
-
-#include <assert.h>
-#include <limits.h>
-#include <stddef.h>
-
-/*
- * Memory management.
- */
-
-YAML_DECLARE(void *)
-yaml_malloc(size_t size);
-
-YAML_DECLARE(void *)
-yaml_realloc(void *ptr, size_t size);
-
-YAML_DECLARE(void)
-yaml_free(void *ptr);
-
-YAML_DECLARE(yaml_char_t *)
-yaml_strdup(const yaml_char_t *);
-
-/*
- * Reader: Ensure that the buffer contains at least `length` characters.
- */
-
-YAML_DECLARE(int)
-yaml_parser_update_buffer(yaml_parser_t *parser, size_t length);
-
-/*
- * Scanner: Ensure that the token stack contains at least one token ready.
- */
-
-YAML_DECLARE(int)
-yaml_parser_fetch_more_tokens(yaml_parser_t *parser);
-
-/*
- * The size of the input raw buffer.
- */
-
-#define INPUT_RAW_BUFFER_SIZE 16384
-
-/*
- * The size of the input buffer.
- *
- * It should be possible to decode the whole raw buffer.
- */
-
-#define INPUT_BUFFER_SIZE (INPUT_RAW_BUFFER_SIZE*3)
-
-/*
- * The size of the output buffer.
- */
-
-#define OUTPUT_BUFFER_SIZE 16384
-
-/*
- * The size of the output raw buffer.
- *
- * It should be possible to encode the whole output buffer.
- */
-
-#define OUTPUT_RAW_BUFFER_SIZE (OUTPUT_BUFFER_SIZE*2+2)
-
-/*
- * The maximum size of a YAML input file.
- * This used to be PTRDIFF_MAX, but that's not entirely portable
- * because stdint.h isn't available on all platforms.
- * It is not entirely clear why this isn't the maximum value
- * that can fit into the parser->offset field.
- */
-
-#define MAX_FILE_SIZE (~(size_t)0 / 2)
-
-
-/*
- * The size of other stacks and queues.
- */
-
-#define INITIAL_STACK_SIZE 16
-#define INITIAL_QUEUE_SIZE 16
-#define INITIAL_STRING_SIZE 16
-
-/*
- * Buffer management.
- */
-
-#define BUFFER_INIT(context,buffer,size) \
- (((buffer).start = (yaml_char_t *)yaml_malloc(size)) ? \
- ((buffer).last = (buffer).pointer = (buffer).start, \
- (buffer).end = (buffer).start+(size), \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define BUFFER_DEL(context,buffer) \
- (yaml_free((buffer).start), \
- (buffer).start = (buffer).pointer = (buffer).end = 0)
-
-/*
- * String management.
- */
-
-typedef struct {
- yaml_char_t *start;
- yaml_char_t *end;
- yaml_char_t *pointer;
-} yaml_string_t;
-
-YAML_DECLARE(int)
-yaml_string_extend(yaml_char_t **start,
- yaml_char_t **pointer, yaml_char_t **end);
-
-YAML_DECLARE(int)
-yaml_string_join(
- yaml_char_t **a_start, yaml_char_t **a_pointer, yaml_char_t **a_end,
- yaml_char_t **b_start, yaml_char_t **b_pointer, yaml_char_t **b_end);
-
-#define NULL_STRING { NULL, NULL, NULL }
-
-#define STRING(string,length) { (string), (string)+(length), (string) }
-
-#define STRING_ASSIGN(value,string,length) \
- ((value).start = (string), \
- (value).end = (string)+(length), \
- (value).pointer = (string))
-
-#define STRING_INIT(context,string,size) \
- (((string).start = YAML_MALLOC(size)) ? \
- ((string).pointer = (string).start, \
- (string).end = (string).start+(size), \
- memset((string).start, 0, (size)), \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define STRING_DEL(context,string) \
- (yaml_free((string).start), \
- (string).start = (string).pointer = (string).end = 0)
-
-#define STRING_EXTEND(context,string) \
- ((((string).pointer+5 < (string).end) \
- || yaml_string_extend(&(string).start, \
- &(string).pointer, &(string).end)) ? \
- 1 : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define CLEAR(context,string) \
- ((string).pointer = (string).start, \
- memset((string).start, 0, (string).end-(string).start))
-
-#define JOIN(context,string_a,string_b) \
- ((yaml_string_join(&(string_a).start, &(string_a).pointer, \
- &(string_a).end, &(string_b).start, \
- &(string_b).pointer, &(string_b).end)) ? \
- ((string_b).pointer = (string_b).start, \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-/*
- * String check operations.
- */
-
-/*
- * Check the octet at the specified position.
- */
-
-#define CHECK_AT(string,octet,offset) \
- ((string).pointer[offset] == (yaml_char_t)(octet))
-
-/*
- * Check the current octet in the buffer.
- */
-
-#define CHECK(string,octet) CHECK_AT((string),(octet),0)
-
-/*
- * Check if the character at the specified position is an alphabetical
- * character, a digit, '_', or '-'.
- */
-
-#define IS_ALPHA_AT(string,offset) \
- (((string).pointer[offset] >= (yaml_char_t) '0' && \
- (string).pointer[offset] <= (yaml_char_t) '9') || \
- ((string).pointer[offset] >= (yaml_char_t) 'A' && \
- (string).pointer[offset] <= (yaml_char_t) 'Z') || \
- ((string).pointer[offset] >= (yaml_char_t) 'a' && \
- (string).pointer[offset] <= (yaml_char_t) 'z') || \
- (string).pointer[offset] == '_' || \
- (string).pointer[offset] == '-')
-
-#define IS_ALPHA(string) IS_ALPHA_AT((string),0)
-
-/*
- * Check if the character at the specified position is a digit.
- */
-
-#define IS_DIGIT_AT(string,offset) \
- (((string).pointer[offset] >= (yaml_char_t) '0' && \
- (string).pointer[offset] <= (yaml_char_t) '9'))
-
-#define IS_DIGIT(string) IS_DIGIT_AT((string),0)
-
-/*
- * Get the value of a digit.
- */
-
-#define AS_DIGIT_AT(string,offset) \
- ((string).pointer[offset] - (yaml_char_t) '0')
-
-#define AS_DIGIT(string) AS_DIGIT_AT((string),0)
-
-/*
- * Check if the character at the specified position is a hex-digit.
- */
-
-#define IS_HEX_AT(string,offset) \
- (((string).pointer[offset] >= (yaml_char_t) '0' && \
- (string).pointer[offset] <= (yaml_char_t) '9') || \
- ((string).pointer[offset] >= (yaml_char_t) 'A' && \
- (string).pointer[offset] <= (yaml_char_t) 'F') || \
- ((string).pointer[offset] >= (yaml_char_t) 'a' && \
- (string).pointer[offset] <= (yaml_char_t) 'f'))
-
-#define IS_HEX(string) IS_HEX_AT((string),0)
-
-/*
- * Get the value of a hex-digit.
- */
-
-#define AS_HEX_AT(string,offset) \
- (((string).pointer[offset] >= (yaml_char_t) 'A' && \
- (string).pointer[offset] <= (yaml_char_t) 'F') ? \
- ((string).pointer[offset] - (yaml_char_t) 'A' + 10) : \
- ((string).pointer[offset] >= (yaml_char_t) 'a' && \
- (string).pointer[offset] <= (yaml_char_t) 'f') ? \
- ((string).pointer[offset] - (yaml_char_t) 'a' + 10) : \
- ((string).pointer[offset] - (yaml_char_t) '0'))
-
-#define AS_HEX(string) AS_HEX_AT((string),0)
-
-/*
- * Check if the character is ASCII.
- */
-
-#define IS_ASCII_AT(string,offset) \
- ((string).pointer[offset] <= (yaml_char_t) '\x7F')
-
-#define IS_ASCII(string) IS_ASCII_AT((string),0)
-
-/*
- * Check if the character can be printed unescaped.
- */
-
-#define IS_PRINTABLE_AT(string,offset) \
- (((string).pointer[offset] == 0x0A) /* . == #x0A */ \
- || ((string).pointer[offset] >= 0x20 /* #x20 <= . <= #x7E */ \
- && (string).pointer[offset] <= 0x7E) \
- || ((string).pointer[offset] == 0xC2 /* #0xA0 <= . <= #xD7FF */ \
- && (string).pointer[offset+1] >= 0xA0) \
- || ((string).pointer[offset] > 0xC2 \
- && (string).pointer[offset] < 0xED) \
- || ((string).pointer[offset] == 0xED \
- && (string).pointer[offset+1] < 0xA0) \
- || ((string).pointer[offset] == 0xEE) \
- || ((string).pointer[offset] == 0xEF /* #xE000 <= . <= #xFFFD */ \
- && !((string).pointer[offset+1] == 0xBB /* && . != #xFEFF */ \
- && (string).pointer[offset+2] == 0xBF) \
- && !((string).pointer[offset+1] == 0xBF \
- && ((string).pointer[offset+2] == 0xBE \
- || (string).pointer[offset+2] == 0xBF))))
-
-#define IS_PRINTABLE(string) IS_PRINTABLE_AT((string),0)
-
-/*
- * Check if the character at the specified position is NUL.
- */
-
-#define IS_Z_AT(string,offset) CHECK_AT((string),'\0',(offset))
-
-#define IS_Z(string) IS_Z_AT((string),0)
-
-/*
- * Check if the character at the specified position is BOM.
- */
-
-#define IS_BOM_AT(string,offset) \
- (CHECK_AT((string),'\xEF',(offset)) \
- && CHECK_AT((string),'\xBB',(offset)+1) \
- && CHECK_AT((string),'\xBF',(offset)+2)) /* BOM (#xFEFF) */
-
-#define IS_BOM(string) IS_BOM_AT(string,0)
-
-/*
- * Check if the character at the specified position is space.
- */
-
-#define IS_SPACE_AT(string,offset) CHECK_AT((string),' ',(offset))
-
-#define IS_SPACE(string) IS_SPACE_AT((string),0)
-
-/*
- * Check if the character at the specified position is tab.
- */
-
-#define IS_TAB_AT(string,offset) CHECK_AT((string),'\t',(offset))
-
-#define IS_TAB(string) IS_TAB_AT((string),0)
-
-/*
- * Check if the character at the specified position is blank (space or tab).
- */
-
-#define IS_BLANK_AT(string,offset) \
- (IS_SPACE_AT((string),(offset)) || IS_TAB_AT((string),(offset)))
-
-#define IS_BLANK(string) IS_BLANK_AT((string),0)
-
-/*
- * Check if the character at the specified position is a line break.
- */
-
-#define IS_BREAK_AT(string,offset) \
- (CHECK_AT((string),'\r',(offset)) /* CR (#xD)*/ \
- || CHECK_AT((string),'\n',(offset)) /* LF (#xA) */ \
- || (CHECK_AT((string),'\xC2',(offset)) \
- && CHECK_AT((string),'\x85',(offset)+1)) /* NEL (#x85) */ \
- || (CHECK_AT((string),'\xE2',(offset)) \
- && CHECK_AT((string),'\x80',(offset)+1) \
- && CHECK_AT((string),'\xA8',(offset)+2)) /* LS (#x2028) */ \
- || (CHECK_AT((string),'\xE2',(offset)) \
- && CHECK_AT((string),'\x80',(offset)+1) \
- && CHECK_AT((string),'\xA9',(offset)+2))) /* PS (#x2029) */
-
-#define IS_BREAK(string) IS_BREAK_AT((string),0)
-
-#define IS_CRLF_AT(string,offset) \
- (CHECK_AT((string),'\r',(offset)) && CHECK_AT((string),'\n',(offset)+1))
-
-#define IS_CRLF(string) IS_CRLF_AT((string),0)
-
-/*
- * Check if the character is a line break or NUL.
- */
-
-#define IS_BREAKZ_AT(string,offset) \
- (IS_BREAK_AT((string),(offset)) || IS_Z_AT((string),(offset)))
-
-#define IS_BREAKZ(string) IS_BREAKZ_AT((string),0)
-
-/*
- * Check if the character is a line break, space, or NUL.
- */
-
-#define IS_SPACEZ_AT(string,offset) \
- (IS_SPACE_AT((string),(offset)) || IS_BREAKZ_AT((string),(offset)))
-
-#define IS_SPACEZ(string) IS_SPACEZ_AT((string),0)
-
-/*
- * Check if the character is a line break, space, tab, or NUL.
- */
-
-#define IS_BLANKZ_AT(string,offset) \
- (IS_BLANK_AT((string),(offset)) || IS_BREAKZ_AT((string),(offset)))
-
-#define IS_BLANKZ(string) IS_BLANKZ_AT((string),0)
-
-/*
- * Determine the width of the character.
- */
-
-#define WIDTH_AT(string,offset) \
- (((string).pointer[offset] & 0x80) == 0x00 ? 1 : \
- ((string).pointer[offset] & 0xE0) == 0xC0 ? 2 : \
- ((string).pointer[offset] & 0xF0) == 0xE0 ? 3 : \
- ((string).pointer[offset] & 0xF8) == 0xF0 ? 4 : 0)
-
-#define WIDTH(string) WIDTH_AT((string),0)
-
-/*
- * Move the string pointer to the next character.
- */
-
-#define MOVE(string) ((string).pointer += WIDTH((string)))
-
-/*
- * Copy a character and move the pointers of both strings.
- */
-
-#define COPY(string_a,string_b) \
- ((*(string_b).pointer & 0x80) == 0x00 ? \
- (*((string_a).pointer++) = *((string_b).pointer++)) : \
- (*(string_b).pointer & 0xE0) == 0xC0 ? \
- (*((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++)) : \
- (*(string_b).pointer & 0xF0) == 0xE0 ? \
- (*((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++)) : \
- (*(string_b).pointer & 0xF8) == 0xF0 ? \
- (*((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++), \
- *((string_a).pointer++) = *((string_b).pointer++)) : 0)
-
-/*
- * Stack and queue management.
- */
-
-YAML_DECLARE(int)
-yaml_stack_extend(void **start, void **top, void **end);
-
-YAML_DECLARE(int)
-yaml_queue_extend(void **start, void **head, void **tail, void **end);
-
-#define STACK_INIT(context,stack,type) \
- (((stack).start = (type)yaml_malloc(INITIAL_STACK_SIZE*sizeof(*(stack).start))) ? \
- ((stack).top = (stack).start, \
- (stack).end = (stack).start+INITIAL_STACK_SIZE, \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define STACK_DEL(context,stack) \
- (yaml_free((stack).start), \
- (stack).start = (stack).top = (stack).end = 0)
-
-#define STACK_EMPTY(context,stack) \
- ((stack).start == (stack).top)
-
-#define STACK_LIMIT(context,stack,size) \
- ((stack).top - (stack).start < (size) ? \
- 1 : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define PUSH(context,stack,value) \
- (((stack).top != (stack).end \
- || yaml_stack_extend((void **)&(stack).start, \
- (void **)&(stack).top, (void **)&(stack).end)) ? \
- (*((stack).top++) = value, \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define POP(context,stack) \
- (*(--(stack).top))
-
-#define QUEUE_INIT(context,queue,size,type) \
- (((queue).start = (type)yaml_malloc((size)*sizeof(*(queue).start))) ? \
- ((queue).head = (queue).tail = (queue).start, \
- (queue).end = (queue).start+(size), \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define QUEUE_DEL(context,queue) \
- (yaml_free((queue).start), \
- (queue).start = (queue).head = (queue).tail = (queue).end = 0)
-
-#define QUEUE_EMPTY(context,queue) \
- ((queue).head == (queue).tail)
-
-#define ENQUEUE(context,queue,value) \
- (((queue).tail != (queue).end \
- || yaml_queue_extend((void **)&(queue).start, (void **)&(queue).head, \
- (void **)&(queue).tail, (void **)&(queue).end)) ? \
- (*((queue).tail++) = value, \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-#define DEQUEUE(context,queue) \
- (*((queue).head++))
-
-#define QUEUE_INSERT(context,queue,index,value) \
- (((queue).tail != (queue).end \
- || yaml_queue_extend((void **)&(queue).start, (void **)&(queue).head, \
- (void **)&(queue).tail, (void **)&(queue).end)) ? \
- (memmove((queue).head+(index)+1,(queue).head+(index), \
- ((queue).tail-(queue).head-(index))*sizeof(*(queue).start)), \
- *((queue).head+(index)) = value, \
- (queue).tail++, \
- 1) : \
- ((context)->error = YAML_MEMORY_ERROR, \
- 0))
-
-/*
- * Token initializers.
- */
-
-#define TOKEN_INIT(token,token_type,token_start_mark,token_end_mark) \
- (memset(&(token), 0, sizeof(yaml_token_t)), \
- (token).type = (token_type), \
- (token).start_mark = (token_start_mark), \
- (token).end_mark = (token_end_mark))
-
-#define STREAM_START_TOKEN_INIT(token,token_encoding,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_STREAM_START_TOKEN,(start_mark),(end_mark)), \
- (token).data.stream_start.encoding = (token_encoding))
-
-#define STREAM_END_TOKEN_INIT(token,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_STREAM_END_TOKEN,(start_mark),(end_mark)))
-
-#define ALIAS_TOKEN_INIT(token,token_value,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_ALIAS_TOKEN,(start_mark),(end_mark)), \
- (token).data.alias.value = (token_value))
-
-#define ANCHOR_TOKEN_INIT(token,token_value,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_ANCHOR_TOKEN,(start_mark),(end_mark)), \
- (token).data.anchor.value = (token_value))
-
-#define TAG_TOKEN_INIT(token,token_handle,token_suffix,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_TAG_TOKEN,(start_mark),(end_mark)), \
- (token).data.tag.handle = (token_handle), \
- (token).data.tag.suffix = (token_suffix))
-
-#define SCALAR_TOKEN_INIT(token,token_value,token_length,token_style,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_SCALAR_TOKEN,(start_mark),(end_mark)), \
- (token).data.scalar.value = (token_value), \
- (token).data.scalar.length = (token_length), \
- (token).data.scalar.style = (token_style))
-
-#define VERSION_DIRECTIVE_TOKEN_INIT(token,token_major,token_minor,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_VERSION_DIRECTIVE_TOKEN,(start_mark),(end_mark)), \
- (token).data.version_directive.major = (token_major), \
- (token).data.version_directive.minor = (token_minor))
-
-#define TAG_DIRECTIVE_TOKEN_INIT(token,token_handle,token_prefix,start_mark,end_mark) \
- (TOKEN_INIT((token),YAML_TAG_DIRECTIVE_TOKEN,(start_mark),(end_mark)), \
- (token).data.tag_directive.handle = (token_handle), \
- (token).data.tag_directive.prefix = (token_prefix))
-
-/*
- * Event initializers.
- */
-
-#define EVENT_INIT(event,event_type,event_start_mark,event_end_mark) \
- (memset(&(event), 0, sizeof(yaml_event_t)), \
- (event).type = (event_type), \
- (event).start_mark = (event_start_mark), \
- (event).end_mark = (event_end_mark))
-
-#define STREAM_START_EVENT_INIT(event,event_encoding,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_STREAM_START_EVENT,(start_mark),(end_mark)), \
- (event).data.stream_start.encoding = (event_encoding))
-
-#define STREAM_END_EVENT_INIT(event,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_STREAM_END_EVENT,(start_mark),(end_mark)))
-
-#define DOCUMENT_START_EVENT_INIT(event,event_version_directive, \
- event_tag_directives_start,event_tag_directives_end,event_implicit,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_DOCUMENT_START_EVENT,(start_mark),(end_mark)), \
- (event).data.document_start.version_directive = (event_version_directive), \
- (event).data.document_start.tag_directives.start = (event_tag_directives_start), \
- (event).data.document_start.tag_directives.end = (event_tag_directives_end), \
- (event).data.document_start.implicit = (event_implicit))
-
-#define DOCUMENT_END_EVENT_INIT(event,event_implicit,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_DOCUMENT_END_EVENT,(start_mark),(end_mark)), \
- (event).data.document_end.implicit = (event_implicit))
-
-#define ALIAS_EVENT_INIT(event,event_anchor,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_ALIAS_EVENT,(start_mark),(end_mark)), \
- (event).data.alias.anchor = (event_anchor))
-
-#define SCALAR_EVENT_INIT(event,event_anchor,event_tag,event_value,event_length, \
- event_plain_implicit, event_quoted_implicit,event_style,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_SCALAR_EVENT,(start_mark),(end_mark)), \
- (event).data.scalar.anchor = (event_anchor), \
- (event).data.scalar.tag = (event_tag), \
- (event).data.scalar.value = (event_value), \
- (event).data.scalar.length = (event_length), \
- (event).data.scalar.plain_implicit = (event_plain_implicit), \
- (event).data.scalar.quoted_implicit = (event_quoted_implicit), \
- (event).data.scalar.style = (event_style))
-
-#define SEQUENCE_START_EVENT_INIT(event,event_anchor,event_tag, \
- event_implicit,event_style,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_SEQUENCE_START_EVENT,(start_mark),(end_mark)), \
- (event).data.sequence_start.anchor = (event_anchor), \
- (event).data.sequence_start.tag = (event_tag), \
- (event).data.sequence_start.implicit = (event_implicit), \
- (event).data.sequence_start.style = (event_style))
-
-#define SEQUENCE_END_EVENT_INIT(event,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_SEQUENCE_END_EVENT,(start_mark),(end_mark)))
-
-#define MAPPING_START_EVENT_INIT(event,event_anchor,event_tag, \
- event_implicit,event_style,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_MAPPING_START_EVENT,(start_mark),(end_mark)), \
- (event).data.mapping_start.anchor = (event_anchor), \
- (event).data.mapping_start.tag = (event_tag), \
- (event).data.mapping_start.implicit = (event_implicit), \
- (event).data.mapping_start.style = (event_style))
-
-#define MAPPING_END_EVENT_INIT(event,start_mark,end_mark) \
- (EVENT_INIT((event),YAML_MAPPING_END_EVENT,(start_mark),(end_mark)))
-
-/*
- * Document initializer.
- */
-
-#define DOCUMENT_INIT(document,document_nodes_start,document_nodes_end, \
- document_version_directive,document_tag_directives_start, \
- document_tag_directives_end,document_start_implicit, \
- document_end_implicit,document_start_mark,document_end_mark) \
- (memset(&(document), 0, sizeof(yaml_document_t)), \
- (document).nodes.start = (document_nodes_start), \
- (document).nodes.end = (document_nodes_end), \
- (document).nodes.top = (document_nodes_start), \
- (document).version_directive = (document_version_directive), \
- (document).tag_directives.start = (document_tag_directives_start), \
- (document).tag_directives.end = (document_tag_directives_end), \
- (document).start_implicit = (document_start_implicit), \
- (document).end_implicit = (document_end_implicit), \
- (document).start_mark = (document_start_mark), \
- (document).end_mark = (document_end_mark))
-
-/*
- * Node initializers.
- */
-
-#define NODE_INIT(node,node_type,node_tag,node_start_mark,node_end_mark) \
- (memset(&(node), 0, sizeof(yaml_node_t)), \
- (node).type = (node_type), \
- (node).tag = (node_tag), \
- (node).start_mark = (node_start_mark), \
- (node).end_mark = (node_end_mark))
-
-#define SCALAR_NODE_INIT(node,node_tag,node_value,node_length, \
- node_style,start_mark,end_mark) \
- (NODE_INIT((node),YAML_SCALAR_NODE,(node_tag),(start_mark),(end_mark)), \
- (node).data.scalar.value = (node_value), \
- (node).data.scalar.length = (node_length), \
- (node).data.scalar.style = (node_style))
-
-#define SEQUENCE_NODE_INIT(node,node_tag,node_items_start,node_items_end, \
- node_style,start_mark,end_mark) \
- (NODE_INIT((node),YAML_SEQUENCE_NODE,(node_tag),(start_mark),(end_mark)), \
- (node).data.sequence.items.start = (node_items_start), \
- (node).data.sequence.items.end = (node_items_end), \
- (node).data.sequence.items.top = (node_items_start), \
- (node).data.sequence.style = (node_style))
-
-#define MAPPING_NODE_INIT(node,node_tag,node_pairs_start,node_pairs_end, \
- node_style,start_mark,end_mark) \
- (NODE_INIT((node),YAML_MAPPING_NODE,(node_tag),(start_mark),(end_mark)), \
- (node).data.mapping.pairs.start = (node_pairs_start), \
- (node).data.mapping.pairs.end = (node_pairs_end), \
- (node).data.mapping.pairs.top = (node_pairs_start), \
- (node).data.mapping.style = (node_style))
-
-/* Strict C compiler warning helpers */
-
-#if defined(__clang__) || defined(__GNUC__)
-# define HASATTRIBUTE_UNUSED
-#endif
-#ifdef HASATTRIBUTE_UNUSED
-# define __attribute__unused__ __attribute__((__unused__))
-#else
-# define __attribute__unused__
-#endif
-
-/* Shim arguments are arguments that must be included in your function,
- * but serve no purpose inside. Silence compiler warnings. */
-#define SHIM(a) /*@unused@*/ a __attribute__unused__
-
-/* UNUSED_PARAM() marks a shim argument in the body to silence compiler warnings */
-#ifdef __clang__
-# define UNUSED_PARAM(a) (void)(a);
-#else
-# define UNUSED_PARAM(a) /*@-noeffect*/if (0) (void)(a)/*@=noeffect*/;
-#endif
-
-#define YAML_MALLOC_STATIC(type) (type*)yaml_malloc(sizeof(type))
-#define YAML_MALLOC(size) (yaml_char_t *)yaml_malloc(size)
diff --git a/ext/pty/depend b/ext/pty/depend
index 1e89dc824c..f251caae3f 100644
--- a/ext/pty/depend
+++ b/ext/pty/depend
@@ -1,12 +1,169 @@
# AUTOGENERATED DEPENDENCIES START
pty.o: $(RUBY_EXTCONF_H)
pty.o: $(arch_hdrdir)/ruby/config.h
-pty.o: $(hdrdir)/ruby.h
pty.o: $(hdrdir)/ruby/assert.h
pty.o: $(hdrdir)/ruby/backward.h
+pty.o: $(hdrdir)/ruby/backward/2/assume.h
+pty.o: $(hdrdir)/ruby/backward/2/attributes.h
+pty.o: $(hdrdir)/ruby/backward/2/bool.h
+pty.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+pty.o: $(hdrdir)/ruby/backward/2/inttypes.h
+pty.o: $(hdrdir)/ruby/backward/2/limits.h
+pty.o: $(hdrdir)/ruby/backward/2/long_long.h
+pty.o: $(hdrdir)/ruby/backward/2/stdalign.h
+pty.o: $(hdrdir)/ruby/backward/2/stdarg.h
pty.o: $(hdrdir)/ruby/defines.h
pty.o: $(hdrdir)/ruby/encoding.h
pty.o: $(hdrdir)/ruby/intern.h
+pty.o: $(hdrdir)/ruby/internal/abi.h
+pty.o: $(hdrdir)/ruby/internal/anyargs.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+pty.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+pty.o: $(hdrdir)/ruby/internal/assume.h
+pty.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+pty.o: $(hdrdir)/ruby/internal/attr/artificial.h
+pty.o: $(hdrdir)/ruby/internal/attr/cold.h
+pty.o: $(hdrdir)/ruby/internal/attr/const.h
+pty.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+pty.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+pty.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+pty.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+pty.o: $(hdrdir)/ruby/internal/attr/error.h
+pty.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+pty.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+pty.o: $(hdrdir)/ruby/internal/attr/format.h
+pty.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+pty.o: $(hdrdir)/ruby/internal/attr/noalias.h
+pty.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+pty.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+pty.o: $(hdrdir)/ruby/internal/attr/noinline.h
+pty.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+pty.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+pty.o: $(hdrdir)/ruby/internal/attr/pure.h
+pty.o: $(hdrdir)/ruby/internal/attr/restrict.h
+pty.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+pty.o: $(hdrdir)/ruby/internal/attr/warning.h
+pty.o: $(hdrdir)/ruby/internal/attr/weakref.h
+pty.o: $(hdrdir)/ruby/internal/cast.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+pty.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+pty.o: $(hdrdir)/ruby/internal/compiler_since.h
+pty.o: $(hdrdir)/ruby/internal/config.h
+pty.o: $(hdrdir)/ruby/internal/constant_p.h
+pty.o: $(hdrdir)/ruby/internal/core.h
+pty.o: $(hdrdir)/ruby/internal/core/rarray.h
+pty.o: $(hdrdir)/ruby/internal/core/rbasic.h
+pty.o: $(hdrdir)/ruby/internal/core/rbignum.h
+pty.o: $(hdrdir)/ruby/internal/core/rclass.h
+pty.o: $(hdrdir)/ruby/internal/core/rdata.h
+pty.o: $(hdrdir)/ruby/internal/core/rfile.h
+pty.o: $(hdrdir)/ruby/internal/core/rhash.h
+pty.o: $(hdrdir)/ruby/internal/core/robject.h
+pty.o: $(hdrdir)/ruby/internal/core/rregexp.h
+pty.o: $(hdrdir)/ruby/internal/core/rstring.h
+pty.o: $(hdrdir)/ruby/internal/core/rstruct.h
+pty.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+pty.o: $(hdrdir)/ruby/internal/ctype.h
+pty.o: $(hdrdir)/ruby/internal/dllexport.h
+pty.o: $(hdrdir)/ruby/internal/dosish.h
+pty.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+pty.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+pty.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+pty.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+pty.o: $(hdrdir)/ruby/internal/encoding/re.h
+pty.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+pty.o: $(hdrdir)/ruby/internal/encoding/string.h
+pty.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+pty.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+pty.o: $(hdrdir)/ruby/internal/error.h
+pty.o: $(hdrdir)/ruby/internal/eval.h
+pty.o: $(hdrdir)/ruby/internal/event.h
+pty.o: $(hdrdir)/ruby/internal/fl_type.h
+pty.o: $(hdrdir)/ruby/internal/gc.h
+pty.o: $(hdrdir)/ruby/internal/glob.h
+pty.o: $(hdrdir)/ruby/internal/globals.h
+pty.o: $(hdrdir)/ruby/internal/has/attribute.h
+pty.o: $(hdrdir)/ruby/internal/has/builtin.h
+pty.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+pty.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+pty.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+pty.o: $(hdrdir)/ruby/internal/has/extension.h
+pty.o: $(hdrdir)/ruby/internal/has/feature.h
+pty.o: $(hdrdir)/ruby/internal/has/warning.h
+pty.o: $(hdrdir)/ruby/internal/intern/array.h
+pty.o: $(hdrdir)/ruby/internal/intern/bignum.h
+pty.o: $(hdrdir)/ruby/internal/intern/class.h
+pty.o: $(hdrdir)/ruby/internal/intern/compar.h
+pty.o: $(hdrdir)/ruby/internal/intern/complex.h
+pty.o: $(hdrdir)/ruby/internal/intern/cont.h
+pty.o: $(hdrdir)/ruby/internal/intern/dir.h
+pty.o: $(hdrdir)/ruby/internal/intern/enum.h
+pty.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+pty.o: $(hdrdir)/ruby/internal/intern/error.h
+pty.o: $(hdrdir)/ruby/internal/intern/eval.h
+pty.o: $(hdrdir)/ruby/internal/intern/file.h
+pty.o: $(hdrdir)/ruby/internal/intern/gc.h
+pty.o: $(hdrdir)/ruby/internal/intern/hash.h
+pty.o: $(hdrdir)/ruby/internal/intern/io.h
+pty.o: $(hdrdir)/ruby/internal/intern/load.h
+pty.o: $(hdrdir)/ruby/internal/intern/marshal.h
+pty.o: $(hdrdir)/ruby/internal/intern/numeric.h
+pty.o: $(hdrdir)/ruby/internal/intern/object.h
+pty.o: $(hdrdir)/ruby/internal/intern/parse.h
+pty.o: $(hdrdir)/ruby/internal/intern/proc.h
+pty.o: $(hdrdir)/ruby/internal/intern/process.h
+pty.o: $(hdrdir)/ruby/internal/intern/random.h
+pty.o: $(hdrdir)/ruby/internal/intern/range.h
+pty.o: $(hdrdir)/ruby/internal/intern/rational.h
+pty.o: $(hdrdir)/ruby/internal/intern/re.h
+pty.o: $(hdrdir)/ruby/internal/intern/ruby.h
+pty.o: $(hdrdir)/ruby/internal/intern/select.h
+pty.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+pty.o: $(hdrdir)/ruby/internal/intern/signal.h
+pty.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+pty.o: $(hdrdir)/ruby/internal/intern/string.h
+pty.o: $(hdrdir)/ruby/internal/intern/struct.h
+pty.o: $(hdrdir)/ruby/internal/intern/thread.h
+pty.o: $(hdrdir)/ruby/internal/intern/time.h
+pty.o: $(hdrdir)/ruby/internal/intern/variable.h
+pty.o: $(hdrdir)/ruby/internal/intern/vm.h
+pty.o: $(hdrdir)/ruby/internal/interpreter.h
+pty.o: $(hdrdir)/ruby/internal/iterator.h
+pty.o: $(hdrdir)/ruby/internal/memory.h
+pty.o: $(hdrdir)/ruby/internal/method.h
+pty.o: $(hdrdir)/ruby/internal/module.h
+pty.o: $(hdrdir)/ruby/internal/newobj.h
+pty.o: $(hdrdir)/ruby/internal/rgengc.h
+pty.o: $(hdrdir)/ruby/internal/scan_args.h
+pty.o: $(hdrdir)/ruby/internal/special_consts.h
+pty.o: $(hdrdir)/ruby/internal/static_assert.h
+pty.o: $(hdrdir)/ruby/internal/stdalign.h
+pty.o: $(hdrdir)/ruby/internal/stdbool.h
+pty.o: $(hdrdir)/ruby/internal/symbol.h
+pty.o: $(hdrdir)/ruby/internal/value.h
+pty.o: $(hdrdir)/ruby/internal/value_type.h
+pty.o: $(hdrdir)/ruby/internal/variable.h
+pty.o: $(hdrdir)/ruby/internal/warning_push.h
+pty.o: $(hdrdir)/ruby/internal/xmalloc.h
pty.o: $(hdrdir)/ruby/io.h
pty.o: $(hdrdir)/ruby/missing.h
pty.o: $(hdrdir)/ruby/onigmo.h
@@ -16,5 +173,14 @@ pty.o: $(hdrdir)/ruby/st.h
pty.o: $(hdrdir)/ruby/subst.h
pty.o: $(hdrdir)/ruby/util.h
pty.o: $(top_srcdir)/internal.h
+pty.o: $(top_srcdir)/internal/array.h
+pty.o: $(top_srcdir)/internal/compilers.h
+pty.o: $(top_srcdir)/internal/gc.h
+pty.o: $(top_srcdir)/internal/imemo.h
+pty.o: $(top_srcdir)/internal/process.h
+pty.o: $(top_srcdir)/internal/signal.h
+pty.o: $(top_srcdir)/internal/static_assert.h
+pty.o: $(top_srcdir)/internal/warnings.h
+pty.o: $(top_srcdir)/shape.h
pty.o: pty.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb
index 7721a744c8..ba0c4286fd 100644
--- a/ext/pty/extconf.rb
+++ b/ext/pty/extconf.rb
@@ -7,12 +7,14 @@ if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
have_header("sys/stropts.h")
have_func("setresuid")
have_header("libutil.h")
- have_header("util.h") # OpenBSD openpty
have_header("pty.h")
have_header("pwd.h")
- have_library("util", "openpty")
+ if /openbsd/ =~ RUBY_PLATFORM
+ have_header("util.h") # OpenBSD openpty
+ util = have_library("util", "openpty")
+ end
if have_func("posix_openpt") or
- have_func("openpty") or
+ (util or have_func("openpty")) or
have_func("_getpty") or
have_func("ptsname") or
have_func("ioctl")
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 5dbfa09ae9..22cbf54115 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -1,19 +1,19 @@
# frozen_string_literal: true
$expect_verbose = false
-# Expect library adds the IO instance method #expect, which does similar act to
-# tcl's expect extension.
-#
-# In order to use this method, you must require expect:
-#
-# require 'expect'
-#
-# Please see #expect for usage.
class IO
# call-seq:
# IO#expect(pattern,timeout=9999999) -> Array
# IO#expect(pattern,timeout=9999999) { |result| ... } -> nil
#
+ # The +expect+ library adds instance method IO#expect,
+ # which is similar to the
+ # {TCL expect extension}[https://www.tcl.tk/man/expect5.31/expect.1.html].
+ #
+ # To use this method, you must require +expect+:
+ #
+ # require 'expect'
+ #
# Reads from the IO until the given +pattern+ matches or the +timeout+ is over.
#
# It returns an array with the read buffer, followed by the matches.
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 4c6ae26127..acec33f9bf 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -1,45 +1,51 @@
-#include "ruby/config.h"
+#include "ruby/config.h"
+
#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
+# include RUBY_EXTCONF_H
#endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <errno.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <fcntl.h>
+
#ifdef HAVE_PWD_H
-#include <pwd.h>
+# include <pwd.h>
#endif
+
#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
+# include <sys/ioctl.h>
#endif
+
#ifdef HAVE_LIBUTIL_H
-#include <libutil.h>
+# include <libutil.h>
#endif
+
#ifdef HAVE_UTIL_H
-#include <util.h>
+# include <util.h>
#endif
+
#ifdef HAVE_PTY_H
-#include <pty.h>
+# include <pty.h>
#endif
+
#if defined(HAVE_SYS_PARAM_H)
- /* for __FreeBSD_version */
+ /* for __FreeBSD_version */
# include <sys/param.h>
#endif
+
#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
+# include <sys/wait.h>
#else
-#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+# define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
#endif
-#include <ctype.h>
-#include "ruby/io.h"
-#include "internal.h"
-#include "ruby/util.h"
-
-#include <signal.h>
#ifdef HAVE_SYS_STROPTS_H
#include <sys/stropts.h>
#endif
@@ -48,6 +54,12 @@
#include <unistd.h>
#endif
+#include "internal.h"
+#include "internal/process.h"
+#include "internal/signal.h"
+#include "ruby/io.h"
+#include "ruby/util.h"
+
#define DEVICELEN 16
#ifndef HAVE_SETEUID
@@ -95,8 +107,8 @@ chfunc(void *data, char *errbuf, size_t errbuf_len)
int slave = carg->slave;
#define ERROR_EXIT(str) do { \
- strlcpy(errbuf, (str), errbuf_len); \
- return -1; \
+ strlcpy(errbuf, (str), errbuf_len); \
+ return -1; \
} while (0)
/*
@@ -154,32 +166,32 @@ chfunc(void *data, char *errbuf, size_t errbuf_len)
static void
establishShell(int argc, VALUE *argv, struct pty_info *info,
- char SlaveName[DEVICELEN])
+ char SlaveName[DEVICELEN])
{
int master, slave, status = 0;
rb_pid_t pid;
- char *p, *getenv();
+ char *p;
VALUE v;
struct child_info carg;
char errbuf[32];
if (argc == 0) {
- const char *shellname = "/bin/sh";
+ const char *shellname = "/bin/sh";
- if ((p = getenv("SHELL")) != NULL) {
- shellname = p;
- }
- else {
+ if ((p = getenv("SHELL")) != NULL) {
+ shellname = p;
+ }
+ else {
#if defined HAVE_PWD_H
- const char *username = getenv("USER");
- struct passwd *pwent = getpwnam(username ? username : getlogin());
- if (pwent && pwent->pw_shell)
- shellname = pwent->pw_shell;
+ const char *username = getenv("USER");
+ struct passwd *pwent = getpwnam(username ? username : getlogin());
+ if (pwent && pwent->pw_shell)
+ shellname = pwent->pw_shell;
#endif
- }
- v = rb_str_new2(shellname);
- argc = 1;
- argv = &v;
+ }
+ v = rb_str_new2(shellname);
+ argc = 1;
+ argv = &v;
}
carg.execarg_obj = rb_execarg_new(argc, argv, 1, 0);
@@ -195,13 +207,13 @@ establishShell(int argc, VALUE *argv, struct pty_info *info,
pid = rb_fork_async_signal_safe(&status, chfunc, &carg, Qnil, errbuf, sizeof(errbuf));
if (pid < 0) {
- int e = errno;
- close(master);
- close(slave);
+ int e = errno;
+ close(master);
+ close(slave);
rb_execarg_parent_end(carg.execarg_obj);
- errno = e;
- if (status) rb_jump_tag(status);
- rb_sys_fail(errbuf[0] ? errbuf : "fork failed");
+ errno = e;
+ if (status) rb_jump_tag(status);
+ rb_sys_fail(errbuf[0] ? errbuf : "fork failed");
}
close(slave);
@@ -256,14 +268,14 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
rb_fd_fix_cloexec(masterfd);
#else
{
- int flags = O_RDWR|O_NOCTTY;
+ int flags = O_RDWR|O_NOCTTY;
# if defined(O_CLOEXEC)
- /* glibc posix_openpt() in GNU/Linux calls open("/dev/ptmx", flags) internally.
- * So version dependency on GNU/Linux is same as O_CLOEXEC with open().
- * O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */
- flags |= O_CLOEXEC;
+ /* glibc posix_openpt() in GNU/Linux calls open("/dev/ptmx", flags) internally.
+ * So version dependency on GNU/Linux is the same as O_CLOEXEC with open().
+ * O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */
+ flags |= O_CLOEXEC;
# endif
- if ((masterfd = posix_openpt(flags)) == -1) goto error;
+ if ((masterfd = posix_openpt(flags)) == -1) goto error;
}
rb_fd_fix_cloexec(masterfd);
if (rb_grantpt(masterfd) == -1) goto error;
@@ -298,15 +310,15 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
* or the same interface function.
*/
if (openpty(master, slave, SlaveName,
- (struct termios *)0, (struct winsize *)0) == -1) {
- if (!fail) return -1;
- rb_raise(rb_eRuntimeError, "openpty() failed");
+ (struct termios *)0, (struct winsize *)0) == -1) {
+ if (!fail) return -1;
+ rb_raise(rb_eRuntimeError, "openpty() failed");
}
rb_fd_fix_cloexec(*master);
rb_fd_fix_cloexec(*slave);
if (no_mesg(SlaveName, nomesg) == -1) {
- if (!fail) return -1;
- rb_raise(rb_eRuntimeError, "can't chmod slave pty");
+ if (!fail) return -1;
+ rb_raise(rb_eRuntimeError, "can't chmod slave pty");
}
return 0;
@@ -317,8 +329,8 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
mode_t mode = nomesg ? 0600 : 0622;
if (!(name = _getpty(master, O_RDWR, mode, 0))) {
- if (!fail) return -1;
- rb_raise(rb_eRuntimeError, "_getpty() failed");
+ if (!fail) return -1;
+ rb_raise(rb_eRuntimeError, "_getpty() failed");
}
rb_fd_fix_cloexec(*master);
@@ -374,49 +386,42 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
char MasterName[DEVICELEN];
#define HEX1(c) \
- c"0",c"1",c"2",c"3",c"4",c"5",c"6",c"7", \
- c"8",c"9",c"a",c"b",c"c",c"d",c"e",c"f"
+ c"0",c"1",c"2",c"3",c"4",c"5",c"6",c"7", \
+ c"8",c"9",c"a",c"b",c"c",c"d",c"e",c"f"
-#if defined(__hpux)
- static const char MasterDevice[] = "/dev/ptym/pty%s";
- static const char SlaveDevice[] = "/dev/pty/tty%s";
- static const char deviceNo[][3] = {
- HEX1("p"), HEX1("q"), HEX1("r"), HEX1("s"),
- HEX1("t"), HEX1("u"), HEX1("v"), HEX1("w"),
- };
-#elif defined(_IBMESA) /* AIX/ESA */
+#if defined(_IBMESA) /* AIX/ESA */
static const char MasterDevice[] = "/dev/ptyp%s";
static const char SlaveDevice[] = "/dev/ttyp%s";
static const char deviceNo[][3] = {
- HEX1("0"), HEX1("1"), HEX1("2"), HEX1("3"),
- HEX1("4"), HEX1("5"), HEX1("6"), HEX1("7"),
- HEX1("8"), HEX1("9"), HEX1("a"), HEX1("b"),
- HEX1("c"), HEX1("d"), HEX1("e"), HEX1("f"),
+ HEX1("0"), HEX1("1"), HEX1("2"), HEX1("3"),
+ HEX1("4"), HEX1("5"), HEX1("6"), HEX1("7"),
+ HEX1("8"), HEX1("9"), HEX1("a"), HEX1("b"),
+ HEX1("c"), HEX1("d"), HEX1("e"), HEX1("f"),
};
#else /* 4.2BSD */
static const char MasterDevice[] = "/dev/pty%s";
static const char SlaveDevice[] = "/dev/tty%s";
static const char deviceNo[][3] = {
- HEX1("p"), HEX1("q"), HEX1("r"), HEX1("s"),
+ HEX1("p"), HEX1("q"), HEX1("r"), HEX1("s"),
};
#endif
#undef HEX1
for (i = 0; i < numberof(deviceNo); i++) {
- const char *const devno = deviceNo[i];
- snprintf(MasterName, sizeof MasterName, MasterDevice, devno);
- if ((masterfd = rb_cloexec_open(MasterName,O_RDWR,0)) >= 0) {
+ const char *const devno = deviceNo[i];
+ snprintf(MasterName, sizeof MasterName, MasterDevice, devno);
+ if ((masterfd = rb_cloexec_open(MasterName,O_RDWR,0)) >= 0) {
rb_update_max_fd(masterfd);
- *master = masterfd;
- snprintf(SlaveName, DEVICELEN, SlaveDevice, devno);
- if ((slavefd = rb_cloexec_open(SlaveName,O_RDWR,0)) >= 0) {
+ *master = masterfd;
+ snprintf(SlaveName, DEVICELEN, SlaveDevice, devno);
+ if ((slavefd = rb_cloexec_open(SlaveName,O_RDWR,0)) >= 0) {
rb_update_max_fd(slavefd);
- *slave = slavefd;
- if (chown(SlaveName, getuid(), getgid()) != 0) goto error;
- if (chmod(SlaveName, nomesg ? 0600 : 0622) != 0) goto error;
- return 0;
- }
- close(masterfd);
- }
+ *slave = slavefd;
+ if (chown(SlaveName, getuid(), getgid()) != 0) goto error;
+ if (chmod(SlaveName, nomesg ? 0600 : 0622) != 0) goto error;
+ return 0;
+ }
+ close(masterfd);
+ }
}
error:
if (slavefd != -1) close(slavefd);
@@ -430,8 +435,8 @@ static void
getDevice(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg)
{
if (get_device_once(master, slave, SlaveName, nomesg, 0)) {
- rb_gc();
- get_device_once(master, slave, SlaveName, nomesg, 1);
+ rb_gc();
+ get_device_once(master, slave, SlaveName, nomesg, 1);
}
}
@@ -452,11 +457,11 @@ pty_close_pty(VALUE assoc)
/*
* call-seq:
* PTY.open => [master_io, slave_file]
- * PTY.open {|master_io, slave_file| ... } => block value
+ * PTY.open {|(master_io, slave_file)| ... } => block value
*
* Allocates a pty (pseudo-terminal).
*
- * In the block form, yields two arguments <tt>master_io, slave_file</tt>
+ * In the block form, yields an array of two elements (<tt>master_io, slave_file</tt>)
* and the value of the block is returned from +open+.
*
* The IO and File are both closed after the block completes if they haven't
@@ -485,7 +490,7 @@ pty_close_pty(VALUE assoc)
* require 'io/console'
* PTY.open {|m, s|
* s.raw!
- * ...
+ * # ...
* }
*
*/
@@ -514,7 +519,7 @@ pty_open(VALUE klass)
assoc = rb_assoc_new(master_io, slave_file);
if (rb_block_given_p()) {
- return rb_ensure(rb_yield, assoc, pty_close_pty, assoc);
+ return rb_ensure(rb_yield, assoc, pty_close_pty, assoc);
}
return assoc;
}
@@ -526,7 +531,7 @@ pty_detach_process(VALUE v)
#ifdef WNOHANG
int st;
if (rb_waitpid(info->child_pid, &st, WNOHANG) <= 0)
- return Qnil;
+ return Qnil;
#endif
rb_detach_process(info->child_pid);
return Qnil;
@@ -534,10 +539,10 @@ pty_detach_process(VALUE v)
/*
* call-seq:
- * PTY.spawn(command_line) { |r, w, pid| ... }
- * PTY.spawn(command_line) => [r, w, pid]
- * PTY.spawn(command, arguments, ...) { |r, w, pid| ... }
- * PTY.spawn(command, arguments, ...) => [r, w, pid]
+ * PTY.spawn([env,] command_line) { |r, w, pid| ... }
+ * PTY.spawn([env,] command_line) => [r, w, pid]
+ * PTY.spawn([env,] command, arguments, ...) { |r, w, pid| ... }
+ * PTY.spawn([env,] command, arguments, ...) => [r, w, pid]
*
* Spawns the specified command on a newly allocated pty. You can also use the
* alias ::getpty.
@@ -545,6 +550,13 @@ pty_detach_process(VALUE v)
* The command's controlling tty is set to the slave device of the pty
* and its standard input/output/error is redirected to the slave device.
*
+ * +env+ is an optional hash that provides additional environment variables to the spawned pty.
+ *
+ * # sets FOO to "bar"
+ * PTY.spawn({"FOO"=>"bar"}, "printenv", "FOO") { |r,w,pid| p r.read } #=> "bar\r\n"
+ * # unsets FOO
+ * PTY.spawn({"FOO"=>nil}, "printenv", "FOO") { |r,w,pid| p r.read } #=> ""
+ *
* +command+ and +command_line+ are the full commands to run, given a String.
* Any additional +arguments+ will be passed to the command.
*
@@ -592,8 +604,8 @@ pty_getpty(int argc, VALUE *argv, VALUE self)
rb_ary_store(res,2,PIDT2NUM(info.child_pid));
if (rb_block_given_p()) {
- rb_ensure(rb_yield, res, pty_detach_process, (VALUE)&info);
- return Qnil;
+ rb_ensure(rb_yield, res, pty_detach_process, (VALUE)&info);
+ return Qnil;
}
return res;
}
@@ -613,13 +625,13 @@ raise_from_check(rb_pid_t pid, int status)
---->> Either IF_STOPPED or WIFSTOPPED is needed <<----
#endif /* WIFSTOPPED | IF_STOPPED */
if (WIFSTOPPED(status)) { /* suspend */
- state = "stopped";
+ state = "stopped";
}
else if (kill(pid, 0) == 0) {
- state = "changed";
+ state = "changed";
}
else {
- state = "exited";
+ state = "exited";
}
msg = rb_sprintf("pty - %s: %ld", state, (long)pid);
exc = rb_exc_new_str(eChildExited, msg);
@@ -652,12 +664,12 @@ pty_check(int argc, VALUE *argv, VALUE self)
int status;
const int flag =
#ifdef WNOHANG
- WNOHANG|
+ WNOHANG|
#endif
#ifdef WUNTRACED
- WUNTRACED|
+ WUNTRACED|
#endif
- 0;
+ 0;
rb_scan_args(argc, argv, "11", &pid, &exc);
cpid = rb_waitpid(NUM2PIDT(pid), &status, flag);
@@ -682,7 +694,7 @@ static VALUE cPTY;
* Document-class: PTY
*
* Creates and manages pseudo terminals (PTYs). See also
- * http://en.wikipedia.org/wiki/Pseudo_terminal
+ * https://en.wikipedia.org/wiki/Pseudo_terminal
*
* PTY allows you to allocate new terminals using ::open or ::spawn a new
* terminal with a specific command.
@@ -725,16 +737,16 @@ static VALUE cPTY;
*
* == License
*
- * C) Copyright 1998 by Akinori Ito.
+ * (c) Copyright 1998 by Akinori Ito.
*
- * This software may be redistributed freely for this purpose, in full
- * or in part, provided that this entire copyright notice is included
- * on any copies of this software and applications and derivations thereof.
+ * This software may be redistributed freely for this purpose, in full
+ * or in part, provided that this entire copyright notice is included
+ * on any copies of this software and applications and derivations thereof.
*
- * This software is provided on an "as is" basis, without warranty of any
- * kind, either expressed or implied, as to any matter including, but not
- * limited to warranty of fitness of purpose, or merchantability, or
- * results obtained from use of this software.
+ * This software is provided on an "as is" basis, without warranty of any
+ * kind, either expressed or implied, as to any matter including, but not
+ * limited to warranty of fitness of purpose, or merchantability, or
+ * results obtained from use of this software.
*/
void
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c
index ca74b80000..f752eb7749 100644
--- a/ext/racc/cparse/cparse.c
+++ b/ext/racc/cparse/cparse.c
@@ -7,8 +7,6 @@
This library is free software.
You can distribute/modify this program under the same terms of ruby.
- $originalId: cparse.c,v 1.8 2006/07/06 11:39:46 aamine Exp $
-
*/
#include <ruby.h>
@@ -24,7 +22,7 @@
Important Constants
----------------------------------------------------------------------- */
-#define RACC_VERSION "1.4.15"
+#define RACC_VERSION "1.6.2"
#define DEFAULT_TOKEN -1
#define ERROR_TOKEN 1
@@ -605,7 +603,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume)
user_yyerror:
if (v->errstatus == 3) {
if (v->t == vFINAL_TOKEN) {
- v->retval = Qfalse;
+ v->retval = Qnil;
v->fin = CP_FIN_EOT;
return;
}
@@ -819,14 +817,16 @@ reduce0(RB_BLOCK_CALL_FUNC_ARGLIST(_, data))
void
Init_cparse(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
VALUE Racc, Parser;
- ID id_racc = rb_intern("Racc");
+ ID id_racc = rb_intern_const("Racc");
if (rb_const_defined(rb_cObject, id_racc)) {
Racc = rb_const_get(rb_cObject, id_racc);
- Parser = rb_const_get_at(Racc, rb_intern("Parser"));
+ Parser = rb_const_get_at(Racc, rb_intern_const("Parser"));
}
else {
Racc = rb_define_module("Racc");
@@ -846,16 +846,16 @@ Init_cparse(void)
RaccBug = rb_eRuntimeError;
- id_yydebug = rb_intern("@yydebug");
- id_nexttoken = rb_intern("next_token");
- id_onerror = rb_intern("on_error");
- id_noreduce = rb_intern("_reduce_none");
- id_errstatus = rb_intern("@racc_error_status");
-
- id_d_shift = rb_intern("racc_shift");
- id_d_reduce = rb_intern("racc_reduce");
- id_d_accept = rb_intern("racc_accept");
- id_d_read_token = rb_intern("racc_read_token");
- id_d_next_state = rb_intern("racc_next_state");
- id_d_e_pop = rb_intern("racc_e_pop");
+ id_yydebug = rb_intern_const("@yydebug");
+ id_nexttoken = rb_intern_const("next_token");
+ id_onerror = rb_intern_const("on_error");
+ id_noreduce = rb_intern_const("_reduce_none");
+ id_errstatus = rb_intern_const("@racc_error_status");
+
+ id_d_shift = rb_intern_const("racc_shift");
+ id_d_reduce = rb_intern_const("racc_reduce");
+ id_d_accept = rb_intern_const("racc_accept");
+ id_d_read_token = rb_intern_const("racc_read_token");
+ id_d_next_state = rb_intern_const("racc_next_state");
+ id_d_e_pop = rb_intern_const("racc_e_pop");
}
diff --git a/ext/racc/cparse/depend b/ext/racc/cparse/depend
index a156b32343..9dc509dc7c 100644
--- a/ext/racc/cparse/depend
+++ b/ext/racc/cparse/depend
@@ -4,8 +4,156 @@ cparse.o: $(arch_hdrdir)/ruby/config.h
cparse.o: $(hdrdir)/ruby.h
cparse.o: $(hdrdir)/ruby/assert.h
cparse.o: $(hdrdir)/ruby/backward.h
+cparse.o: $(hdrdir)/ruby/backward/2/assume.h
+cparse.o: $(hdrdir)/ruby/backward/2/attributes.h
+cparse.o: $(hdrdir)/ruby/backward/2/bool.h
+cparse.o: $(hdrdir)/ruby/backward/2/inttypes.h
+cparse.o: $(hdrdir)/ruby/backward/2/limits.h
+cparse.o: $(hdrdir)/ruby/backward/2/long_long.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdalign.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdarg.h
cparse.o: $(hdrdir)/ruby/defines.h
cparse.o: $(hdrdir)/ruby/intern.h
+cparse.o: $(hdrdir)/ruby/internal/abi.h
+cparse.o: $(hdrdir)/ruby/internal/anyargs.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+cparse.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+cparse.o: $(hdrdir)/ruby/internal/assume.h
+cparse.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+cparse.o: $(hdrdir)/ruby/internal/attr/artificial.h
+cparse.o: $(hdrdir)/ruby/internal/attr/cold.h
+cparse.o: $(hdrdir)/ruby/internal/attr/const.h
+cparse.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+cparse.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+cparse.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+cparse.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+cparse.o: $(hdrdir)/ruby/internal/attr/error.h
+cparse.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+cparse.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+cparse.o: $(hdrdir)/ruby/internal/attr/format.h
+cparse.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+cparse.o: $(hdrdir)/ruby/internal/attr/noalias.h
+cparse.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+cparse.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+cparse.o: $(hdrdir)/ruby/internal/attr/noinline.h
+cparse.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+cparse.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+cparse.o: $(hdrdir)/ruby/internal/attr/pure.h
+cparse.o: $(hdrdir)/ruby/internal/attr/restrict.h
+cparse.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+cparse.o: $(hdrdir)/ruby/internal/attr/warning.h
+cparse.o: $(hdrdir)/ruby/internal/attr/weakref.h
+cparse.o: $(hdrdir)/ruby/internal/cast.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+cparse.o: $(hdrdir)/ruby/internal/compiler_since.h
+cparse.o: $(hdrdir)/ruby/internal/config.h
+cparse.o: $(hdrdir)/ruby/internal/constant_p.h
+cparse.o: $(hdrdir)/ruby/internal/core.h
+cparse.o: $(hdrdir)/ruby/internal/core/rarray.h
+cparse.o: $(hdrdir)/ruby/internal/core/rbasic.h
+cparse.o: $(hdrdir)/ruby/internal/core/rbignum.h
+cparse.o: $(hdrdir)/ruby/internal/core/rclass.h
+cparse.o: $(hdrdir)/ruby/internal/core/rdata.h
+cparse.o: $(hdrdir)/ruby/internal/core/rfile.h
+cparse.o: $(hdrdir)/ruby/internal/core/rhash.h
+cparse.o: $(hdrdir)/ruby/internal/core/robject.h
+cparse.o: $(hdrdir)/ruby/internal/core/rregexp.h
+cparse.o: $(hdrdir)/ruby/internal/core/rstring.h
+cparse.o: $(hdrdir)/ruby/internal/core/rstruct.h
+cparse.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+cparse.o: $(hdrdir)/ruby/internal/ctype.h
+cparse.o: $(hdrdir)/ruby/internal/dllexport.h
+cparse.o: $(hdrdir)/ruby/internal/dosish.h
+cparse.o: $(hdrdir)/ruby/internal/error.h
+cparse.o: $(hdrdir)/ruby/internal/eval.h
+cparse.o: $(hdrdir)/ruby/internal/event.h
+cparse.o: $(hdrdir)/ruby/internal/fl_type.h
+cparse.o: $(hdrdir)/ruby/internal/gc.h
+cparse.o: $(hdrdir)/ruby/internal/glob.h
+cparse.o: $(hdrdir)/ruby/internal/globals.h
+cparse.o: $(hdrdir)/ruby/internal/has/attribute.h
+cparse.o: $(hdrdir)/ruby/internal/has/builtin.h
+cparse.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+cparse.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+cparse.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+cparse.o: $(hdrdir)/ruby/internal/has/extension.h
+cparse.o: $(hdrdir)/ruby/internal/has/feature.h
+cparse.o: $(hdrdir)/ruby/internal/has/warning.h
+cparse.o: $(hdrdir)/ruby/internal/intern/array.h
+cparse.o: $(hdrdir)/ruby/internal/intern/bignum.h
+cparse.o: $(hdrdir)/ruby/internal/intern/class.h
+cparse.o: $(hdrdir)/ruby/internal/intern/compar.h
+cparse.o: $(hdrdir)/ruby/internal/intern/complex.h
+cparse.o: $(hdrdir)/ruby/internal/intern/cont.h
+cparse.o: $(hdrdir)/ruby/internal/intern/dir.h
+cparse.o: $(hdrdir)/ruby/internal/intern/enum.h
+cparse.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+cparse.o: $(hdrdir)/ruby/internal/intern/error.h
+cparse.o: $(hdrdir)/ruby/internal/intern/eval.h
+cparse.o: $(hdrdir)/ruby/internal/intern/file.h
+cparse.o: $(hdrdir)/ruby/internal/intern/gc.h
+cparse.o: $(hdrdir)/ruby/internal/intern/hash.h
+cparse.o: $(hdrdir)/ruby/internal/intern/io.h
+cparse.o: $(hdrdir)/ruby/internal/intern/load.h
+cparse.o: $(hdrdir)/ruby/internal/intern/marshal.h
+cparse.o: $(hdrdir)/ruby/internal/intern/numeric.h
+cparse.o: $(hdrdir)/ruby/internal/intern/object.h
+cparse.o: $(hdrdir)/ruby/internal/intern/parse.h
+cparse.o: $(hdrdir)/ruby/internal/intern/proc.h
+cparse.o: $(hdrdir)/ruby/internal/intern/process.h
+cparse.o: $(hdrdir)/ruby/internal/intern/random.h
+cparse.o: $(hdrdir)/ruby/internal/intern/range.h
+cparse.o: $(hdrdir)/ruby/internal/intern/rational.h
+cparse.o: $(hdrdir)/ruby/internal/intern/re.h
+cparse.o: $(hdrdir)/ruby/internal/intern/ruby.h
+cparse.o: $(hdrdir)/ruby/internal/intern/select.h
+cparse.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+cparse.o: $(hdrdir)/ruby/internal/intern/signal.h
+cparse.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+cparse.o: $(hdrdir)/ruby/internal/intern/string.h
+cparse.o: $(hdrdir)/ruby/internal/intern/struct.h
+cparse.o: $(hdrdir)/ruby/internal/intern/thread.h
+cparse.o: $(hdrdir)/ruby/internal/intern/time.h
+cparse.o: $(hdrdir)/ruby/internal/intern/variable.h
+cparse.o: $(hdrdir)/ruby/internal/intern/vm.h
+cparse.o: $(hdrdir)/ruby/internal/interpreter.h
+cparse.o: $(hdrdir)/ruby/internal/iterator.h
+cparse.o: $(hdrdir)/ruby/internal/memory.h
+cparse.o: $(hdrdir)/ruby/internal/method.h
+cparse.o: $(hdrdir)/ruby/internal/module.h
+cparse.o: $(hdrdir)/ruby/internal/newobj.h
+cparse.o: $(hdrdir)/ruby/internal/rgengc.h
+cparse.o: $(hdrdir)/ruby/internal/scan_args.h
+cparse.o: $(hdrdir)/ruby/internal/special_consts.h
+cparse.o: $(hdrdir)/ruby/internal/static_assert.h
+cparse.o: $(hdrdir)/ruby/internal/stdalign.h
+cparse.o: $(hdrdir)/ruby/internal/stdbool.h
+cparse.o: $(hdrdir)/ruby/internal/symbol.h
+cparse.o: $(hdrdir)/ruby/internal/value.h
+cparse.o: $(hdrdir)/ruby/internal/value_type.h
+cparse.o: $(hdrdir)/ruby/internal/variable.h
+cparse.o: $(hdrdir)/ruby/internal/warning_push.h
+cparse.o: $(hdrdir)/ruby/internal/xmalloc.h
cparse.o: $(hdrdir)/ruby/missing.h
cparse.o: $(hdrdir)/ruby/ruby.h
cparse.o: $(hdrdir)/ruby/st.h
diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb
index 47b455d992..18c5689ad8 100644
--- a/ext/racc/cparse/extconf.rb
+++ b/ext/racc/cparse/extconf.rb
@@ -1,8 +1,9 @@
# frozen_string_literal: false
-# $Id: a9187b5bc40e6adf05e7b6ee5b370b39a3429ecd $
+#
require 'mkmf'
+have_func('rb_block_call')
have_func('rb_ary_subseq')
create_makefile 'racc/cparse'
diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend
index 9433dd4156..5b65b83772 100644
--- a/ext/rbconfig/sizeof/depend
+++ b/ext/rbconfig/sizeof/depend
@@ -18,8 +18,156 @@ limits.o: $(RUBY_EXTCONF_H)
limits.o: $(arch_hdrdir)/ruby/config.h
limits.o: $(hdrdir)/ruby/assert.h
limits.o: $(hdrdir)/ruby/backward.h
+limits.o: $(hdrdir)/ruby/backward/2/assume.h
+limits.o: $(hdrdir)/ruby/backward/2/attributes.h
+limits.o: $(hdrdir)/ruby/backward/2/bool.h
+limits.o: $(hdrdir)/ruby/backward/2/inttypes.h
+limits.o: $(hdrdir)/ruby/backward/2/limits.h
+limits.o: $(hdrdir)/ruby/backward/2/long_long.h
+limits.o: $(hdrdir)/ruby/backward/2/stdalign.h
+limits.o: $(hdrdir)/ruby/backward/2/stdarg.h
limits.o: $(hdrdir)/ruby/defines.h
limits.o: $(hdrdir)/ruby/intern.h
+limits.o: $(hdrdir)/ruby/internal/abi.h
+limits.o: $(hdrdir)/ruby/internal/anyargs.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+limits.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+limits.o: $(hdrdir)/ruby/internal/assume.h
+limits.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+limits.o: $(hdrdir)/ruby/internal/attr/artificial.h
+limits.o: $(hdrdir)/ruby/internal/attr/cold.h
+limits.o: $(hdrdir)/ruby/internal/attr/const.h
+limits.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+limits.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+limits.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+limits.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+limits.o: $(hdrdir)/ruby/internal/attr/error.h
+limits.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+limits.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+limits.o: $(hdrdir)/ruby/internal/attr/format.h
+limits.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+limits.o: $(hdrdir)/ruby/internal/attr/noalias.h
+limits.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+limits.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+limits.o: $(hdrdir)/ruby/internal/attr/noinline.h
+limits.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+limits.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+limits.o: $(hdrdir)/ruby/internal/attr/pure.h
+limits.o: $(hdrdir)/ruby/internal/attr/restrict.h
+limits.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+limits.o: $(hdrdir)/ruby/internal/attr/warning.h
+limits.o: $(hdrdir)/ruby/internal/attr/weakref.h
+limits.o: $(hdrdir)/ruby/internal/cast.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+limits.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+limits.o: $(hdrdir)/ruby/internal/compiler_since.h
+limits.o: $(hdrdir)/ruby/internal/config.h
+limits.o: $(hdrdir)/ruby/internal/constant_p.h
+limits.o: $(hdrdir)/ruby/internal/core.h
+limits.o: $(hdrdir)/ruby/internal/core/rarray.h
+limits.o: $(hdrdir)/ruby/internal/core/rbasic.h
+limits.o: $(hdrdir)/ruby/internal/core/rbignum.h
+limits.o: $(hdrdir)/ruby/internal/core/rclass.h
+limits.o: $(hdrdir)/ruby/internal/core/rdata.h
+limits.o: $(hdrdir)/ruby/internal/core/rfile.h
+limits.o: $(hdrdir)/ruby/internal/core/rhash.h
+limits.o: $(hdrdir)/ruby/internal/core/robject.h
+limits.o: $(hdrdir)/ruby/internal/core/rregexp.h
+limits.o: $(hdrdir)/ruby/internal/core/rstring.h
+limits.o: $(hdrdir)/ruby/internal/core/rstruct.h
+limits.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+limits.o: $(hdrdir)/ruby/internal/ctype.h
+limits.o: $(hdrdir)/ruby/internal/dllexport.h
+limits.o: $(hdrdir)/ruby/internal/dosish.h
+limits.o: $(hdrdir)/ruby/internal/error.h
+limits.o: $(hdrdir)/ruby/internal/eval.h
+limits.o: $(hdrdir)/ruby/internal/event.h
+limits.o: $(hdrdir)/ruby/internal/fl_type.h
+limits.o: $(hdrdir)/ruby/internal/gc.h
+limits.o: $(hdrdir)/ruby/internal/glob.h
+limits.o: $(hdrdir)/ruby/internal/globals.h
+limits.o: $(hdrdir)/ruby/internal/has/attribute.h
+limits.o: $(hdrdir)/ruby/internal/has/builtin.h
+limits.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+limits.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+limits.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+limits.o: $(hdrdir)/ruby/internal/has/extension.h
+limits.o: $(hdrdir)/ruby/internal/has/feature.h
+limits.o: $(hdrdir)/ruby/internal/has/warning.h
+limits.o: $(hdrdir)/ruby/internal/intern/array.h
+limits.o: $(hdrdir)/ruby/internal/intern/bignum.h
+limits.o: $(hdrdir)/ruby/internal/intern/class.h
+limits.o: $(hdrdir)/ruby/internal/intern/compar.h
+limits.o: $(hdrdir)/ruby/internal/intern/complex.h
+limits.o: $(hdrdir)/ruby/internal/intern/cont.h
+limits.o: $(hdrdir)/ruby/internal/intern/dir.h
+limits.o: $(hdrdir)/ruby/internal/intern/enum.h
+limits.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+limits.o: $(hdrdir)/ruby/internal/intern/error.h
+limits.o: $(hdrdir)/ruby/internal/intern/eval.h
+limits.o: $(hdrdir)/ruby/internal/intern/file.h
+limits.o: $(hdrdir)/ruby/internal/intern/gc.h
+limits.o: $(hdrdir)/ruby/internal/intern/hash.h
+limits.o: $(hdrdir)/ruby/internal/intern/io.h
+limits.o: $(hdrdir)/ruby/internal/intern/load.h
+limits.o: $(hdrdir)/ruby/internal/intern/marshal.h
+limits.o: $(hdrdir)/ruby/internal/intern/numeric.h
+limits.o: $(hdrdir)/ruby/internal/intern/object.h
+limits.o: $(hdrdir)/ruby/internal/intern/parse.h
+limits.o: $(hdrdir)/ruby/internal/intern/proc.h
+limits.o: $(hdrdir)/ruby/internal/intern/process.h
+limits.o: $(hdrdir)/ruby/internal/intern/random.h
+limits.o: $(hdrdir)/ruby/internal/intern/range.h
+limits.o: $(hdrdir)/ruby/internal/intern/rational.h
+limits.o: $(hdrdir)/ruby/internal/intern/re.h
+limits.o: $(hdrdir)/ruby/internal/intern/ruby.h
+limits.o: $(hdrdir)/ruby/internal/intern/select.h
+limits.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+limits.o: $(hdrdir)/ruby/internal/intern/signal.h
+limits.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+limits.o: $(hdrdir)/ruby/internal/intern/string.h
+limits.o: $(hdrdir)/ruby/internal/intern/struct.h
+limits.o: $(hdrdir)/ruby/internal/intern/thread.h
+limits.o: $(hdrdir)/ruby/internal/intern/time.h
+limits.o: $(hdrdir)/ruby/internal/intern/variable.h
+limits.o: $(hdrdir)/ruby/internal/intern/vm.h
+limits.o: $(hdrdir)/ruby/internal/interpreter.h
+limits.o: $(hdrdir)/ruby/internal/iterator.h
+limits.o: $(hdrdir)/ruby/internal/memory.h
+limits.o: $(hdrdir)/ruby/internal/method.h
+limits.o: $(hdrdir)/ruby/internal/module.h
+limits.o: $(hdrdir)/ruby/internal/newobj.h
+limits.o: $(hdrdir)/ruby/internal/rgengc.h
+limits.o: $(hdrdir)/ruby/internal/scan_args.h
+limits.o: $(hdrdir)/ruby/internal/special_consts.h
+limits.o: $(hdrdir)/ruby/internal/static_assert.h
+limits.o: $(hdrdir)/ruby/internal/stdalign.h
+limits.o: $(hdrdir)/ruby/internal/stdbool.h
+limits.o: $(hdrdir)/ruby/internal/symbol.h
+limits.o: $(hdrdir)/ruby/internal/value.h
+limits.o: $(hdrdir)/ruby/internal/value_type.h
+limits.o: $(hdrdir)/ruby/internal/variable.h
+limits.o: $(hdrdir)/ruby/internal/warning_push.h
+limits.o: $(hdrdir)/ruby/internal/xmalloc.h
limits.o: $(hdrdir)/ruby/missing.h
limits.o: $(hdrdir)/ruby/ruby.h
limits.o: $(hdrdir)/ruby/st.h
@@ -29,8 +177,156 @@ sizes.o: $(RUBY_EXTCONF_H)
sizes.o: $(arch_hdrdir)/ruby/config.h
sizes.o: $(hdrdir)/ruby/assert.h
sizes.o: $(hdrdir)/ruby/backward.h
+sizes.o: $(hdrdir)/ruby/backward/2/assume.h
+sizes.o: $(hdrdir)/ruby/backward/2/attributes.h
+sizes.o: $(hdrdir)/ruby/backward/2/bool.h
+sizes.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sizes.o: $(hdrdir)/ruby/backward/2/limits.h
+sizes.o: $(hdrdir)/ruby/backward/2/long_long.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdarg.h
sizes.o: $(hdrdir)/ruby/defines.h
sizes.o: $(hdrdir)/ruby/intern.h
+sizes.o: $(hdrdir)/ruby/internal/abi.h
+sizes.o: $(hdrdir)/ruby/internal/anyargs.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sizes.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sizes.o: $(hdrdir)/ruby/internal/assume.h
+sizes.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sizes.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sizes.o: $(hdrdir)/ruby/internal/attr/cold.h
+sizes.o: $(hdrdir)/ruby/internal/attr/const.h
+sizes.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sizes.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sizes.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sizes.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sizes.o: $(hdrdir)/ruby/internal/attr/error.h
+sizes.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sizes.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sizes.o: $(hdrdir)/ruby/internal/attr/format.h
+sizes.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sizes.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sizes.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sizes.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sizes.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sizes.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sizes.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sizes.o: $(hdrdir)/ruby/internal/attr/pure.h
+sizes.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sizes.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sizes.o: $(hdrdir)/ruby/internal/attr/warning.h
+sizes.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sizes.o: $(hdrdir)/ruby/internal/cast.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sizes.o: $(hdrdir)/ruby/internal/compiler_since.h
+sizes.o: $(hdrdir)/ruby/internal/config.h
+sizes.o: $(hdrdir)/ruby/internal/constant_p.h
+sizes.o: $(hdrdir)/ruby/internal/core.h
+sizes.o: $(hdrdir)/ruby/internal/core/rarray.h
+sizes.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sizes.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sizes.o: $(hdrdir)/ruby/internal/core/rclass.h
+sizes.o: $(hdrdir)/ruby/internal/core/rdata.h
+sizes.o: $(hdrdir)/ruby/internal/core/rfile.h
+sizes.o: $(hdrdir)/ruby/internal/core/rhash.h
+sizes.o: $(hdrdir)/ruby/internal/core/robject.h
+sizes.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sizes.o: $(hdrdir)/ruby/internal/core/rstring.h
+sizes.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sizes.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sizes.o: $(hdrdir)/ruby/internal/ctype.h
+sizes.o: $(hdrdir)/ruby/internal/dllexport.h
+sizes.o: $(hdrdir)/ruby/internal/dosish.h
+sizes.o: $(hdrdir)/ruby/internal/error.h
+sizes.o: $(hdrdir)/ruby/internal/eval.h
+sizes.o: $(hdrdir)/ruby/internal/event.h
+sizes.o: $(hdrdir)/ruby/internal/fl_type.h
+sizes.o: $(hdrdir)/ruby/internal/gc.h
+sizes.o: $(hdrdir)/ruby/internal/glob.h
+sizes.o: $(hdrdir)/ruby/internal/globals.h
+sizes.o: $(hdrdir)/ruby/internal/has/attribute.h
+sizes.o: $(hdrdir)/ruby/internal/has/builtin.h
+sizes.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sizes.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sizes.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sizes.o: $(hdrdir)/ruby/internal/has/extension.h
+sizes.o: $(hdrdir)/ruby/internal/has/feature.h
+sizes.o: $(hdrdir)/ruby/internal/has/warning.h
+sizes.o: $(hdrdir)/ruby/internal/intern/array.h
+sizes.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sizes.o: $(hdrdir)/ruby/internal/intern/class.h
+sizes.o: $(hdrdir)/ruby/internal/intern/compar.h
+sizes.o: $(hdrdir)/ruby/internal/intern/complex.h
+sizes.o: $(hdrdir)/ruby/internal/intern/cont.h
+sizes.o: $(hdrdir)/ruby/internal/intern/dir.h
+sizes.o: $(hdrdir)/ruby/internal/intern/enum.h
+sizes.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sizes.o: $(hdrdir)/ruby/internal/intern/error.h
+sizes.o: $(hdrdir)/ruby/internal/intern/eval.h
+sizes.o: $(hdrdir)/ruby/internal/intern/file.h
+sizes.o: $(hdrdir)/ruby/internal/intern/gc.h
+sizes.o: $(hdrdir)/ruby/internal/intern/hash.h
+sizes.o: $(hdrdir)/ruby/internal/intern/io.h
+sizes.o: $(hdrdir)/ruby/internal/intern/load.h
+sizes.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sizes.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sizes.o: $(hdrdir)/ruby/internal/intern/object.h
+sizes.o: $(hdrdir)/ruby/internal/intern/parse.h
+sizes.o: $(hdrdir)/ruby/internal/intern/proc.h
+sizes.o: $(hdrdir)/ruby/internal/intern/process.h
+sizes.o: $(hdrdir)/ruby/internal/intern/random.h
+sizes.o: $(hdrdir)/ruby/internal/intern/range.h
+sizes.o: $(hdrdir)/ruby/internal/intern/rational.h
+sizes.o: $(hdrdir)/ruby/internal/intern/re.h
+sizes.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sizes.o: $(hdrdir)/ruby/internal/intern/select.h
+sizes.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sizes.o: $(hdrdir)/ruby/internal/intern/signal.h
+sizes.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sizes.o: $(hdrdir)/ruby/internal/intern/string.h
+sizes.o: $(hdrdir)/ruby/internal/intern/struct.h
+sizes.o: $(hdrdir)/ruby/internal/intern/thread.h
+sizes.o: $(hdrdir)/ruby/internal/intern/time.h
+sizes.o: $(hdrdir)/ruby/internal/intern/variable.h
+sizes.o: $(hdrdir)/ruby/internal/intern/vm.h
+sizes.o: $(hdrdir)/ruby/internal/interpreter.h
+sizes.o: $(hdrdir)/ruby/internal/iterator.h
+sizes.o: $(hdrdir)/ruby/internal/memory.h
+sizes.o: $(hdrdir)/ruby/internal/method.h
+sizes.o: $(hdrdir)/ruby/internal/module.h
+sizes.o: $(hdrdir)/ruby/internal/newobj.h
+sizes.o: $(hdrdir)/ruby/internal/rgengc.h
+sizes.o: $(hdrdir)/ruby/internal/scan_args.h
+sizes.o: $(hdrdir)/ruby/internal/special_consts.h
+sizes.o: $(hdrdir)/ruby/internal/static_assert.h
+sizes.o: $(hdrdir)/ruby/internal/stdalign.h
+sizes.o: $(hdrdir)/ruby/internal/stdbool.h
+sizes.o: $(hdrdir)/ruby/internal/symbol.h
+sizes.o: $(hdrdir)/ruby/internal/value.h
+sizes.o: $(hdrdir)/ruby/internal/value_type.h
+sizes.o: $(hdrdir)/ruby/internal/variable.h
+sizes.o: $(hdrdir)/ruby/internal/warning_push.h
+sizes.o: $(hdrdir)/ruby/internal/xmalloc.h
sizes.o: $(hdrdir)/ruby/missing.h
sizes.o: $(hdrdir)/ruby/ruby.h
sizes.o: $(hdrdir)/ruby/st.h
diff --git a/ext/readline/depend b/ext/readline/depend
index 2dde7fca58..c62309622a 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -3,9 +3,166 @@ readline.o: $(RUBY_EXTCONF_H)
readline.o: $(arch_hdrdir)/ruby/config.h
readline.o: $(hdrdir)/ruby/assert.h
readline.o: $(hdrdir)/ruby/backward.h
+readline.o: $(hdrdir)/ruby/backward/2/assume.h
+readline.o: $(hdrdir)/ruby/backward/2/attributes.h
+readline.o: $(hdrdir)/ruby/backward/2/bool.h
+readline.o: $(hdrdir)/ruby/backward/2/inttypes.h
+readline.o: $(hdrdir)/ruby/backward/2/limits.h
+readline.o: $(hdrdir)/ruby/backward/2/long_long.h
+readline.o: $(hdrdir)/ruby/backward/2/stdalign.h
+readline.o: $(hdrdir)/ruby/backward/2/stdarg.h
readline.o: $(hdrdir)/ruby/defines.h
readline.o: $(hdrdir)/ruby/encoding.h
readline.o: $(hdrdir)/ruby/intern.h
+readline.o: $(hdrdir)/ruby/internal/abi.h
+readline.o: $(hdrdir)/ruby/internal/anyargs.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+readline.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+readline.o: $(hdrdir)/ruby/internal/assume.h
+readline.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+readline.o: $(hdrdir)/ruby/internal/attr/artificial.h
+readline.o: $(hdrdir)/ruby/internal/attr/cold.h
+readline.o: $(hdrdir)/ruby/internal/attr/const.h
+readline.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+readline.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+readline.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+readline.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+readline.o: $(hdrdir)/ruby/internal/attr/error.h
+readline.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+readline.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+readline.o: $(hdrdir)/ruby/internal/attr/format.h
+readline.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+readline.o: $(hdrdir)/ruby/internal/attr/noalias.h
+readline.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+readline.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+readline.o: $(hdrdir)/ruby/internal/attr/noinline.h
+readline.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+readline.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+readline.o: $(hdrdir)/ruby/internal/attr/pure.h
+readline.o: $(hdrdir)/ruby/internal/attr/restrict.h
+readline.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+readline.o: $(hdrdir)/ruby/internal/attr/warning.h
+readline.o: $(hdrdir)/ruby/internal/attr/weakref.h
+readline.o: $(hdrdir)/ruby/internal/cast.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+readline.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+readline.o: $(hdrdir)/ruby/internal/compiler_since.h
+readline.o: $(hdrdir)/ruby/internal/config.h
+readline.o: $(hdrdir)/ruby/internal/constant_p.h
+readline.o: $(hdrdir)/ruby/internal/core.h
+readline.o: $(hdrdir)/ruby/internal/core/rarray.h
+readline.o: $(hdrdir)/ruby/internal/core/rbasic.h
+readline.o: $(hdrdir)/ruby/internal/core/rbignum.h
+readline.o: $(hdrdir)/ruby/internal/core/rclass.h
+readline.o: $(hdrdir)/ruby/internal/core/rdata.h
+readline.o: $(hdrdir)/ruby/internal/core/rfile.h
+readline.o: $(hdrdir)/ruby/internal/core/rhash.h
+readline.o: $(hdrdir)/ruby/internal/core/robject.h
+readline.o: $(hdrdir)/ruby/internal/core/rregexp.h
+readline.o: $(hdrdir)/ruby/internal/core/rstring.h
+readline.o: $(hdrdir)/ruby/internal/core/rstruct.h
+readline.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+readline.o: $(hdrdir)/ruby/internal/ctype.h
+readline.o: $(hdrdir)/ruby/internal/dllexport.h
+readline.o: $(hdrdir)/ruby/internal/dosish.h
+readline.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+readline.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+readline.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+readline.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+readline.o: $(hdrdir)/ruby/internal/encoding/re.h
+readline.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+readline.o: $(hdrdir)/ruby/internal/encoding/string.h
+readline.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+readline.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+readline.o: $(hdrdir)/ruby/internal/error.h
+readline.o: $(hdrdir)/ruby/internal/eval.h
+readline.o: $(hdrdir)/ruby/internal/event.h
+readline.o: $(hdrdir)/ruby/internal/fl_type.h
+readline.o: $(hdrdir)/ruby/internal/gc.h
+readline.o: $(hdrdir)/ruby/internal/glob.h
+readline.o: $(hdrdir)/ruby/internal/globals.h
+readline.o: $(hdrdir)/ruby/internal/has/attribute.h
+readline.o: $(hdrdir)/ruby/internal/has/builtin.h
+readline.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+readline.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+readline.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+readline.o: $(hdrdir)/ruby/internal/has/extension.h
+readline.o: $(hdrdir)/ruby/internal/has/feature.h
+readline.o: $(hdrdir)/ruby/internal/has/warning.h
+readline.o: $(hdrdir)/ruby/internal/intern/array.h
+readline.o: $(hdrdir)/ruby/internal/intern/bignum.h
+readline.o: $(hdrdir)/ruby/internal/intern/class.h
+readline.o: $(hdrdir)/ruby/internal/intern/compar.h
+readline.o: $(hdrdir)/ruby/internal/intern/complex.h
+readline.o: $(hdrdir)/ruby/internal/intern/cont.h
+readline.o: $(hdrdir)/ruby/internal/intern/dir.h
+readline.o: $(hdrdir)/ruby/internal/intern/enum.h
+readline.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+readline.o: $(hdrdir)/ruby/internal/intern/error.h
+readline.o: $(hdrdir)/ruby/internal/intern/eval.h
+readline.o: $(hdrdir)/ruby/internal/intern/file.h
+readline.o: $(hdrdir)/ruby/internal/intern/gc.h
+readline.o: $(hdrdir)/ruby/internal/intern/hash.h
+readline.o: $(hdrdir)/ruby/internal/intern/io.h
+readline.o: $(hdrdir)/ruby/internal/intern/load.h
+readline.o: $(hdrdir)/ruby/internal/intern/marshal.h
+readline.o: $(hdrdir)/ruby/internal/intern/numeric.h
+readline.o: $(hdrdir)/ruby/internal/intern/object.h
+readline.o: $(hdrdir)/ruby/internal/intern/parse.h
+readline.o: $(hdrdir)/ruby/internal/intern/proc.h
+readline.o: $(hdrdir)/ruby/internal/intern/process.h
+readline.o: $(hdrdir)/ruby/internal/intern/random.h
+readline.o: $(hdrdir)/ruby/internal/intern/range.h
+readline.o: $(hdrdir)/ruby/internal/intern/rational.h
+readline.o: $(hdrdir)/ruby/internal/intern/re.h
+readline.o: $(hdrdir)/ruby/internal/intern/ruby.h
+readline.o: $(hdrdir)/ruby/internal/intern/select.h
+readline.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+readline.o: $(hdrdir)/ruby/internal/intern/signal.h
+readline.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+readline.o: $(hdrdir)/ruby/internal/intern/string.h
+readline.o: $(hdrdir)/ruby/internal/intern/struct.h
+readline.o: $(hdrdir)/ruby/internal/intern/thread.h
+readline.o: $(hdrdir)/ruby/internal/intern/time.h
+readline.o: $(hdrdir)/ruby/internal/intern/variable.h
+readline.o: $(hdrdir)/ruby/internal/intern/vm.h
+readline.o: $(hdrdir)/ruby/internal/interpreter.h
+readline.o: $(hdrdir)/ruby/internal/iterator.h
+readline.o: $(hdrdir)/ruby/internal/memory.h
+readline.o: $(hdrdir)/ruby/internal/method.h
+readline.o: $(hdrdir)/ruby/internal/module.h
+readline.o: $(hdrdir)/ruby/internal/newobj.h
+readline.o: $(hdrdir)/ruby/internal/rgengc.h
+readline.o: $(hdrdir)/ruby/internal/scan_args.h
+readline.o: $(hdrdir)/ruby/internal/special_consts.h
+readline.o: $(hdrdir)/ruby/internal/static_assert.h
+readline.o: $(hdrdir)/ruby/internal/stdalign.h
+readline.o: $(hdrdir)/ruby/internal/stdbool.h
+readline.o: $(hdrdir)/ruby/internal/symbol.h
+readline.o: $(hdrdir)/ruby/internal/value.h
+readline.o: $(hdrdir)/ruby/internal/value_type.h
+readline.o: $(hdrdir)/ruby/internal/variable.h
+readline.o: $(hdrdir)/ruby/internal/warning_push.h
+readline.o: $(hdrdir)/ruby/internal/xmalloc.h
readline.o: $(hdrdir)/ruby/io.h
readline.o: $(hdrdir)/ruby/missing.h
readline.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/readline/depend-gem b/ext/readline/depend-gem
new file mode 100644
index 0000000000..df01bd2a86
--- /dev/null
+++ b/ext/readline/depend-gem
@@ -0,0 +1,4 @@
+# AUTOGENERATED DEPENDENCIES START
+readline.o: $(RUBY_EXTCONF_H)
+readline.o: readline.c
+# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index fcc62921ae..d3e7872e65 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -109,5 +109,4 @@ unless readline.have_type("rl_hook_func_t*")
$defs << "-Drl_hook_func_t=Function"
end
-$INCFLAGS << " -I$(top_srcdir)"
create_makefile("readline")
diff --git a/ext/readline/readline-ext.gemspec b/ext/readline/readline-ext.gemspec
index 4d4d4b2dd9..1e16edbfe6 100644
--- a/ext/readline/readline-ext.gemspec
+++ b/ext/readline/readline-ext.gemspec
@@ -1,19 +1,20 @@
Gem::Specification.new do |spec|
spec.name = "readline-ext"
- spec.version = "0.1.0.pre.1"
+ spec.version = "0.1.5"
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Provides an interface for GNU Readline and Edit Line (libedit).}
spec.description = %q{Provides an interface for GNU Readline and Edit Line (libedit).}
spec.homepage = "https://github.com/ruby/readline-ext"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ spec.extensions = %w[ext/readline/extconf.rb]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 646be2b194..fc254ce315 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -78,7 +78,7 @@ static ID id_special_prefixes;
#ifndef HAVE_RL_USERNAME_COMPLETION_FUNCTION
# define rl_username_completion_function username_completion_function
#else
-char *rl_username_completion_function(const char *, int);
+RUBY_EXTERN char *rl_username_completion_function(const char *, int);
#endif
#ifndef HAVE_RL_COMPLETION_MATCHES
# define rl_completion_matches completion_matches
@@ -376,8 +376,8 @@ prepare_readline(void)
{
static int initialized = 0;
if (!initialized) {
- rl_initialize();
- initialized = 1;
+ rl_initialize();
+ initialized = 1;
}
if (readline_instream) {
@@ -689,14 +689,13 @@ readline_s_insert_text(VALUE self, VALUE str)
#endif
#if defined(HAVE_RL_DELETE_TEXT)
-int rl_delete_text(int, int);
+RUBY_EXTERN int rl_delete_text(int, int);
static const char *
str_subpos(const char *ptr, const char *end, long beg, long *sublen, rb_encoding *enc)
{
VALUE str = rb_enc_str_new_static(ptr, end-ptr, enc);
OBJ_FREEZE(str);
ptr = rb_str_subpos(str, beg, sublen);
- rb_gc_force_recycle(str);
return ptr;
}
@@ -1148,7 +1147,7 @@ readline_s_get_screen_size(VALUE self)
#endif
#ifdef HAVE_RL_VI_EDITING_MODE
-int rl_vi_editing_mode(int, int);
+RUBY_EXTERN int rl_vi_editing_mode(int, int);
/*
* call-seq:
* Readline.vi_editing_mode -> nil
@@ -1187,7 +1186,7 @@ readline_s_vi_editing_mode_p(VALUE self)
#endif
#ifdef HAVE_RL_EMACS_EDITING_MODE
-int rl_emacs_editing_mode(int, int);
+RUBY_EXTERN int rl_emacs_editing_mode(int, int);
/*
* call-seq:
* Readline.emacs_editing_mode -> nil
@@ -1672,7 +1671,7 @@ readline_s_get_filename_quote_characters(VALUE self)
#endif
#ifdef HAVE_RL_REFRESH_LINE
-int rl_refresh_line(int, int);
+RUBY_EXTERN int rl_refresh_line(int, int);
/*
* call-seq:
* Readline.refresh_line -> nil
@@ -1918,8 +1917,11 @@ username_completion_proc_call(VALUE self, VALUE str)
return result;
}
+#ifdef HAVE_RL_CATCH_SIGNALS
+RUBY_EXTERN int rl_catch_signals;
+#endif
#ifdef HAVE_RL_CLEAR_SIGNALS
-int rl_clear_signals(void);
+RUBY_EXTERN int rl_clear_signals(void);
#endif
#undef rb_intern
@@ -2060,7 +2062,7 @@ Init_readline(void)
* The history buffer. It extends Enumerable module, so it behaves
* just like an array.
* For example, gets the fifth content that the user input by
- * HISTORY[4].
+ * <code>HISTORY[4]</code>.
*/
rb_define_const(mReadline, "HISTORY", history);
@@ -2088,6 +2090,7 @@ Init_readline(void)
#if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY
if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
+ prepare_readline();
add_history("1");
if (history_get(history_get_offset_func(0)) == NULL) {
history_get_offset_func = history_get_offset_0;
diff --git a/ext/ripper/depend b/ext/ripper/depend
index 69759ec716..856283e177 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -17,11 +17,9 @@ ripper.o: ripper.c
all: check
static: check
-ripper.y: $(srcdir)/tools/preproc.rb $(srcdir)/tools/dsl.rb $(top_srcdir)/parse.y {$(VPATH)}id.h
+ripper.y: $(srcdir)/tools/preproc.rb $(srcdir)/tools/dsl.rb $(top_srcdir)/parse.y $(top_srcdir)/defs/id.def
$(ECHO) extracting $@ from $(top_srcdir)/parse.y
- $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ \
- --vpath=$(VPATH)$(PATH_SEPARATOR)$(top_srcdir) id.h $(top_srcdir)/parse.y > ripper.tmp.y
- $(Q) $(RUBY) $(top_srcdir)/tool/pure_parser.rb ripper.tmp.y $(BISON)
+ $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb $(top_srcdir)/parse.y > ripper.tmp.y
$(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@
$(Q) $(RM) ripper.tmp.y
@@ -53,20 +51,209 @@ ripper.o: $(arch_hdrdir)/ruby/config.h
ripper.o: $(hdrdir)/ruby.h
ripper.o: $(hdrdir)/ruby/assert.h
ripper.o: $(hdrdir)/ruby/backward.h
+ripper.o: $(hdrdir)/ruby/backward/2/assume.h
+ripper.o: $(hdrdir)/ruby/backward/2/attributes.h
+ripper.o: $(hdrdir)/ruby/backward/2/bool.h
+ripper.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+ripper.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ripper.o: $(hdrdir)/ruby/backward/2/limits.h
+ripper.o: $(hdrdir)/ruby/backward/2/long_long.h
+ripper.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ripper.o: $(hdrdir)/ruby/backward/2/stdarg.h
ripper.o: $(hdrdir)/ruby/defines.h
ripper.o: $(hdrdir)/ruby/encoding.h
ripper.o: $(hdrdir)/ruby/intern.h
+ripper.o: $(hdrdir)/ruby/internal/abi.h
+ripper.o: $(hdrdir)/ruby/internal/anyargs.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ripper.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ripper.o: $(hdrdir)/ruby/internal/assume.h
+ripper.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ripper.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ripper.o: $(hdrdir)/ruby/internal/attr/cold.h
+ripper.o: $(hdrdir)/ruby/internal/attr/const.h
+ripper.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ripper.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ripper.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ripper.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ripper.o: $(hdrdir)/ruby/internal/attr/error.h
+ripper.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ripper.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ripper.o: $(hdrdir)/ruby/internal/attr/format.h
+ripper.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ripper.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ripper.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ripper.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ripper.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ripper.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ripper.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ripper.o: $(hdrdir)/ruby/internal/attr/pure.h
+ripper.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ripper.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ripper.o: $(hdrdir)/ruby/internal/attr/warning.h
+ripper.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ripper.o: $(hdrdir)/ruby/internal/cast.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ripper.o: $(hdrdir)/ruby/internal/compiler_since.h
+ripper.o: $(hdrdir)/ruby/internal/config.h
+ripper.o: $(hdrdir)/ruby/internal/constant_p.h
+ripper.o: $(hdrdir)/ruby/internal/core.h
+ripper.o: $(hdrdir)/ruby/internal/core/rarray.h
+ripper.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ripper.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ripper.o: $(hdrdir)/ruby/internal/core/rclass.h
+ripper.o: $(hdrdir)/ruby/internal/core/rdata.h
+ripper.o: $(hdrdir)/ruby/internal/core/rfile.h
+ripper.o: $(hdrdir)/ruby/internal/core/rhash.h
+ripper.o: $(hdrdir)/ruby/internal/core/robject.h
+ripper.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ripper.o: $(hdrdir)/ruby/internal/core/rstring.h
+ripper.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ripper.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ripper.o: $(hdrdir)/ruby/internal/ctype.h
+ripper.o: $(hdrdir)/ruby/internal/dllexport.h
+ripper.o: $(hdrdir)/ruby/internal/dosish.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/re.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/string.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ripper.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ripper.o: $(hdrdir)/ruby/internal/error.h
+ripper.o: $(hdrdir)/ruby/internal/eval.h
+ripper.o: $(hdrdir)/ruby/internal/event.h
+ripper.o: $(hdrdir)/ruby/internal/fl_type.h
+ripper.o: $(hdrdir)/ruby/internal/gc.h
+ripper.o: $(hdrdir)/ruby/internal/glob.h
+ripper.o: $(hdrdir)/ruby/internal/globals.h
+ripper.o: $(hdrdir)/ruby/internal/has/attribute.h
+ripper.o: $(hdrdir)/ruby/internal/has/builtin.h
+ripper.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ripper.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ripper.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ripper.o: $(hdrdir)/ruby/internal/has/extension.h
+ripper.o: $(hdrdir)/ruby/internal/has/feature.h
+ripper.o: $(hdrdir)/ruby/internal/has/warning.h
+ripper.o: $(hdrdir)/ruby/internal/intern/array.h
+ripper.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ripper.o: $(hdrdir)/ruby/internal/intern/class.h
+ripper.o: $(hdrdir)/ruby/internal/intern/compar.h
+ripper.o: $(hdrdir)/ruby/internal/intern/complex.h
+ripper.o: $(hdrdir)/ruby/internal/intern/cont.h
+ripper.o: $(hdrdir)/ruby/internal/intern/dir.h
+ripper.o: $(hdrdir)/ruby/internal/intern/enum.h
+ripper.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ripper.o: $(hdrdir)/ruby/internal/intern/error.h
+ripper.o: $(hdrdir)/ruby/internal/intern/eval.h
+ripper.o: $(hdrdir)/ruby/internal/intern/file.h
+ripper.o: $(hdrdir)/ruby/internal/intern/gc.h
+ripper.o: $(hdrdir)/ruby/internal/intern/hash.h
+ripper.o: $(hdrdir)/ruby/internal/intern/io.h
+ripper.o: $(hdrdir)/ruby/internal/intern/load.h
+ripper.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ripper.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ripper.o: $(hdrdir)/ruby/internal/intern/object.h
+ripper.o: $(hdrdir)/ruby/internal/intern/parse.h
+ripper.o: $(hdrdir)/ruby/internal/intern/proc.h
+ripper.o: $(hdrdir)/ruby/internal/intern/process.h
+ripper.o: $(hdrdir)/ruby/internal/intern/random.h
+ripper.o: $(hdrdir)/ruby/internal/intern/range.h
+ripper.o: $(hdrdir)/ruby/internal/intern/rational.h
+ripper.o: $(hdrdir)/ruby/internal/intern/re.h
+ripper.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ripper.o: $(hdrdir)/ruby/internal/intern/select.h
+ripper.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ripper.o: $(hdrdir)/ruby/internal/intern/signal.h
+ripper.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ripper.o: $(hdrdir)/ruby/internal/intern/string.h
+ripper.o: $(hdrdir)/ruby/internal/intern/struct.h
+ripper.o: $(hdrdir)/ruby/internal/intern/thread.h
+ripper.o: $(hdrdir)/ruby/internal/intern/time.h
+ripper.o: $(hdrdir)/ruby/internal/intern/variable.h
+ripper.o: $(hdrdir)/ruby/internal/intern/vm.h
+ripper.o: $(hdrdir)/ruby/internal/interpreter.h
+ripper.o: $(hdrdir)/ruby/internal/iterator.h
+ripper.o: $(hdrdir)/ruby/internal/memory.h
+ripper.o: $(hdrdir)/ruby/internal/method.h
+ripper.o: $(hdrdir)/ruby/internal/module.h
+ripper.o: $(hdrdir)/ruby/internal/newobj.h
+ripper.o: $(hdrdir)/ruby/internal/rgengc.h
+ripper.o: $(hdrdir)/ruby/internal/scan_args.h
+ripper.o: $(hdrdir)/ruby/internal/special_consts.h
+ripper.o: $(hdrdir)/ruby/internal/static_assert.h
+ripper.o: $(hdrdir)/ruby/internal/stdalign.h
+ripper.o: $(hdrdir)/ruby/internal/stdbool.h
+ripper.o: $(hdrdir)/ruby/internal/symbol.h
+ripper.o: $(hdrdir)/ruby/internal/value.h
+ripper.o: $(hdrdir)/ruby/internal/value_type.h
+ripper.o: $(hdrdir)/ruby/internal/variable.h
+ripper.o: $(hdrdir)/ruby/internal/warning_push.h
+ripper.o: $(hdrdir)/ruby/internal/xmalloc.h
+ripper.o: $(hdrdir)/ruby/io.h
ripper.o: $(hdrdir)/ruby/missing.h
ripper.o: $(hdrdir)/ruby/onigmo.h
ripper.o: $(hdrdir)/ruby/oniguruma.h
+ripper.o: $(hdrdir)/ruby/ractor.h
ripper.o: $(hdrdir)/ruby/regex.h
ripper.o: $(hdrdir)/ruby/ruby.h
ripper.o: $(hdrdir)/ruby/st.h
ripper.o: $(hdrdir)/ruby/subst.h
ripper.o: $(hdrdir)/ruby/util.h
+ripper.o: $(top_srcdir)/constant.h
+ripper.o: $(top_srcdir)/id_table.h
ripper.o: $(top_srcdir)/internal.h
+ripper.o: $(top_srcdir)/internal/array.h
+ripper.o: $(top_srcdir)/internal/bignum.h
+ripper.o: $(top_srcdir)/internal/bits.h
+ripper.o: $(top_srcdir)/internal/compile.h
+ripper.o: $(top_srcdir)/internal/compilers.h
+ripper.o: $(top_srcdir)/internal/complex.h
+ripper.o: $(top_srcdir)/internal/encoding.h
+ripper.o: $(top_srcdir)/internal/error.h
+ripper.o: $(top_srcdir)/internal/fixnum.h
+ripper.o: $(top_srcdir)/internal/gc.h
+ripper.o: $(top_srcdir)/internal/hash.h
+ripper.o: $(top_srcdir)/internal/imemo.h
+ripper.o: $(top_srcdir)/internal/io.h
+ripper.o: $(top_srcdir)/internal/numeric.h
+ripper.o: $(top_srcdir)/internal/parse.h
+ripper.o: $(top_srcdir)/internal/rational.h
+ripper.o: $(top_srcdir)/internal/re.h
+ripper.o: $(top_srcdir)/internal/serial.h
+ripper.o: $(top_srcdir)/internal/static_assert.h
+ripper.o: $(top_srcdir)/internal/string.h
+ripper.o: $(top_srcdir)/internal/symbol.h
+ripper.o: $(top_srcdir)/internal/thread.h
+ripper.o: $(top_srcdir)/internal/variable.h
+ripper.o: $(top_srcdir)/internal/vm.h
+ripper.o: $(top_srcdir)/internal/warnings.h
ripper.o: $(top_srcdir)/node.h
ripper.o: $(top_srcdir)/regenc.h
+ripper.o: $(top_srcdir)/ruby_assert.h
+ripper.o: $(top_srcdir)/shape.h
ripper.o: $(top_srcdir)/symbol.h
ripper.o: ../../probes.h
ripper.o: eventids2.c
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index cdac2081e6..05687497ac 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -1,14 +1,3 @@
-enum {
- tIGNORED_NL = tLAST_TOKEN + 1,
- tCOMMENT,
- tEMBDOC_BEG,
- tEMBDOC,
- tEMBDOC_END,
- tHEREDOC_BEG,
- tHEREDOC_END,
- k__END__
-};
-
typedef struct {
ID ripper_id_backref;
ID ripper_id_backtick;
diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb
index 2dde565bd9..65cb5030d3 100644
--- a/ext/ripper/extconf.rb
+++ b/ext/ripper/extconf.rb
@@ -13,7 +13,8 @@ def main
end
end
$objs = %w(ripper.o)
- $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c .eventids2-check)
+ $distcleanfiles.concat %w(ripper.y ripper.c eventids1.c eventids2table.c)
+ $cleanfiles.concat %w(ripper.E ripper.output y.output .eventids2-check)
$defs << '-DRIPPER'
$defs << '-DRIPPER_DEBUG' if $debug
$VPATH << '$(topdir)' << '$(top_srcdir)'
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index 9f613c3475..a0f1cbeaa8 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -14,17 +14,24 @@ require 'ripper/core'
class Ripper
# Tokenizes the Ruby program and returns an array of strings.
+ # The +filename+ and +lineno+ arguments are mostly ignored, since the
+ # return value is just the tokenized input.
+ # By default, this method does not handle syntax errors in +src+,
+ # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+.
#
# p Ripper.tokenize("def m(a) nil end")
# # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]
#
- def Ripper.tokenize(src, filename = '-', lineno = 1)
- Lexer.new(src, filename, lineno).tokenize
+ def Ripper.tokenize(src, filename = '-', lineno = 1, **kw)
+ Lexer.new(src, filename, lineno).tokenize(**kw)
end
# Tokenizes the Ruby program and returns an array of an array,
# which is formatted like
# <code>[[lineno, column], type, token, state]</code>.
+ # The +filename+ argument is mostly ignored.
+ # By default, this method does not handle syntax errors in +src+,
+ # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+.
#
# require 'ripper'
# require 'pp'
@@ -41,15 +48,32 @@ class Ripper
# [[1, 12], :on_sp, " ", END ],
# [[1, 13], :on_kw, "end", END ]]
#
- def Ripper.lex(src, filename = '-', lineno = 1)
- Lexer.new(src, filename, lineno).lex
+ def Ripper.lex(src, filename = '-', lineno = 1, **kw)
+ Lexer.new(src, filename, lineno).lex(**kw)
end
class Lexer < ::Ripper #:nodoc: internal use only
- State = Struct.new(:to_int, :to_s) do
+ class State
+ attr_reader :to_int, :to_s
+
+ def initialize(i)
+ @to_int = i
+ @to_s = Ripper.lex_state_name(i)
+ freeze
+ end
+
+ def [](index)
+ case index
+ when 0, :to_int
+ @to_int
+ when 1, :to_s
+ @event
+ else
+ nil
+ end
+ end
+
alias to_i to_int
- def initialize(i) super(i, Ripper.lex_state_name(i)).freeze end
- # def inspect; "#<#{self.class}: #{self}>" end
alias inspect to_s
def pretty_print(q) q.text(to_s) end
def ==(i) super or to_int == i end
@@ -60,21 +84,46 @@ class Ripper
def nobits?(i) to_int.nobits?(i) end
end
- Elem = Struct.new(:pos, :event, :tok, :state, :message) do
+ class Elem
+ attr_accessor :pos, :event, :tok, :state, :message
+
def initialize(pos, event, tok, state, message = nil)
- super(pos, event, tok, State.new(state), message)
+ @pos = pos
+ @event = event
+ @tok = tok
+ @state = State.new(state)
+ @message = message
+ end
+
+ def [](index)
+ case index
+ when 0, :pos
+ @pos
+ when 1, :event
+ @event
+ when 2, :tok
+ @tok
+ when 3, :state
+ @state
+ when 4, :message
+ @message
+ else
+ nil
+ end
end
def inspect
"#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}#{": " if message}#{message}>"
end
+ alias to_s inspect
+
def pretty_print(q)
q.group(2, "#<#{self.class}:", ">") {
q.breakable
q.text("#{event}@#{pos[0]}:#{pos[1]}")
q.breakable
- q.text(state)
+ state.pretty_print(q)
q.breakable
q.text("token: ")
tok.pretty_print(q)
@@ -87,25 +136,27 @@ class Ripper
end
def to_a
- a = super
- a.pop unless a.last
- a
+ if @message
+ [@pos, @event, @tok, @state, @message]
+ else
+ [@pos, @event, @tok, @state]
+ end
end
end
attr_reader :errors
- def tokenize
- parse().sort_by(&:pos).map(&:tok)
+ def tokenize(**kw)
+ parse(**kw).sort_by(&:pos).map(&:tok)
end
- def lex
- parse().sort_by(&:pos).map(&:to_a)
+ def lex(**kw)
+ parse(**kw).sort_by(&:pos).map(&:to_a)
end
# parse the code and returns elements including errors.
- def scan
- result = (parse() + errors + @stack.flatten).uniq.sort_by {|e| [*e.pos, (e.message ? -1 : 0)]}
+ def scan(**kw)
+ result = (parse(**kw) + errors + @stack.flatten).uniq.sort_by {|e| [*e.pos, (e.message ? -1 : 0)]}
result.each_with_index do |e, i|
if e.event == :on_parse_error and e.tok.empty? and (pre = result[i-1]) and
pre.pos[0] == e.pos[0] and (pre.pos[1] + pre.tok.size) == e.pos[1]
@@ -118,13 +169,20 @@ class Ripper
result
end
- def parse
+ def parse(raise_errors: false)
@errors = []
@buf = []
@stack = []
- super
+ super()
+ @buf = @stack.pop unless @stack.empty?
+ if raise_errors and !@errors.empty?
+ raise SyntaxError, @errors.map(&:message).join(' ;')
+ end
@buf.flatten!
- @buf
+ unless (result = @buf).empty?
+ result.concat(@buf) until (@buf = []; super(); @buf.flatten!; @buf.empty?)
+ end
+ result
end
private
@@ -138,17 +196,19 @@ class Ripper
def on_heredoc_dedent(v, w)
ignored_sp = []
heredoc = @buf.last
- heredoc.each_with_index do |e, i|
- if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
- tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
- if (n = dedent_string(e.tok, w)) > 0
- if e.tok.empty?
- e.tok = tok[0, n]
- e.event = :on_ignored_sp
- next
+ if Array === heredoc
+ heredoc.each_with_index do |e, i|
+ if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
+ tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
+ if (n = dedent_string(e.tok, w)) > 0
+ if e.tok.empty?
+ e.tok = tok[0, n]
+ e.event = :on_ignored_sp
+ next
+ end
+ ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
+ e.pos[1] += n
end
- ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
- e.pos[1] += n
end
end
end
@@ -168,18 +228,32 @@ class Ripper
def on_heredoc_end(tok)
@buf.push Elem.new([lineno(), column()], __callee__, tok, state())
- @buf = @stack.pop
+ @buf = @stack.pop unless @stack.empty?
end
def _push_token(tok)
- @buf.push Elem.new([lineno(), column()], __callee__, tok, state())
+ e = Elem.new([lineno(), column()], __callee__, tok, state())
+ @buf.push(e)
+ e
end
- def on_error(mesg)
+ def on_error1(mesg)
@errors.push Elem.new([lineno(), column()], __callee__, token(), state(), mesg)
end
- alias on_parse_error on_error
- alias compile_error on_error
+
+ def on_error2(mesg, elem)
+ if elem
+ elem = Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
+ else
+ elem = Elem.new([lineno(), column()], __callee__, token(), state(), mesg)
+ end
+ @errors.push elem
+ end
+ PARSER_EVENTS.grep(/_error\z/) do |e|
+ arity = PARSER_EVENT_TABLE.fetch(e)
+ alias_method "on_#{e}", "on_error#{arity}"
+ end
+ alias compile_error on_error1
(SCANNER_EVENTS.map {|event|:"on_#{event}"} - private_instance_methods(false)).each do |event|
alias_method event, :_push_token
diff --git a/ext/ripper/lib/ripper/sexp.rb b/ext/ripper/lib/ripper/sexp.rb
index e71d52cd45..b1d553b1da 100644
--- a/ext/ripper/lib/ripper/sexp.rb
+++ b/ext/ripper/lib/ripper/sexp.rb
@@ -17,6 +17,10 @@ class Ripper
# Parses +src+ and create S-exp tree.
# Returns more readable tree rather than Ripper.sexp_raw.
# This method is mainly for developer use.
+ # The +filename+ argument is mostly ignored.
+ # By default, this method does not handle syntax errors in +src+,
+ # returning +nil+ in such cases. Use the +raise_errors+ keyword
+ # to raise a SyntaxError for an error in +src+.
#
# require 'ripper'
# require 'pp'
@@ -28,15 +32,25 @@ class Ripper
# [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]],
# [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]]
#
- def Ripper.sexp(src, filename = '-', lineno = 1)
+ def Ripper.sexp(src, filename = '-', lineno = 1, raise_errors: false)
builder = SexpBuilderPP.new(src, filename, lineno)
sexp = builder.parse
- sexp unless builder.error?
+ if builder.error?
+ if raise_errors
+ raise SyntaxError, builder.error
+ end
+ else
+ sexp
+ end
end
# [EXPERIMENTAL]
# Parses +src+ and create S-exp tree.
# This method is mainly for developer use.
+ # The +filename+ argument is mostly ignored.
+ # By default, this method does not handle syntax errors in +src+,
+ # returning +nil+ in such cases. Use the +raise_errors+ keyword
+ # to raise a SyntaxError for an error in +src+.
#
# require 'ripper'
# require 'pp'
@@ -54,13 +68,21 @@ class Ripper
# nil,
# nil]]]]
#
- def Ripper.sexp_raw(src, filename = '-', lineno = 1)
+ def Ripper.sexp_raw(src, filename = '-', lineno = 1, raise_errors: false)
builder = SexpBuilder.new(src, filename, lineno)
sexp = builder.parse
- sexp unless builder.error?
+ if builder.error?
+ if raise_errors
+ raise SyntaxError, builder.error
+ end
+ else
+ sexp
+ end
end
class SexpBuilder < ::Ripper #:nodoc:
+ attr_reader :error
+
private
def dedent_element(e, width)
@@ -107,6 +129,13 @@ class Ripper
end
End
end
+
+ def on_error(mesg)
+ @error = mesg
+ end
+ remove_method :on_parse_error
+ alias on_parse_error on_error
+ alias compile_error on_error
end
class SexpBuilderPP < SexpBuilder #:nodoc:
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index d2b9715a71..49ff51711f 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -7,6 +7,9 @@
# v2 = dispatch0(void_stmt);
# $$ = dispatch2(stmts_add, v1, v2);
+$dollar = "$$"
+alias $$ $dollar
+
class DSL
def initialize(code, options)
@events = {}
diff --git a/ext/ripper/tools/preproc.rb b/ext/ripper/tools/preproc.rb
index 7639a901df..cd85a5da61 100644
--- a/ext/ripper/tools/preproc.rb
+++ b/ext/ripper/tools/preproc.rb
@@ -45,9 +45,9 @@ def prelude(f, out)
while line = f.gets
case line
when /\A%%/
- out << '%%' << $/
+ out << "%%\n"
return
- when /\A%token/
+ when /\A%token/, /\A} <node>/
out << line.sub(/<\w+>/, '<val>')
when /\A%type/
out << line.sub(/<\w+>/, '<val>')
@@ -79,15 +79,15 @@ def grammar(f, out)
while line = f.gets
case line
when %r</\*% *ripper(?:\[(.*?)\])?: *(.*?) *%\*/>
- out << DSL.new($2, ($1 || "").split(",")).generate << $/
+ out << DSL.new($2, ($1 || "").split(",")).generate << "\n"
when %r</\*%%%\*/>
- out << '#if 0' << $/
+ out << "#if 0\n"
when %r</\*%>
- out << '#endif' << $/
+ out << "#endif\n"
when %r<%\*/>
- out << $/
+ out << "\n"
when /\A%%/
- out << '%%' << $/
+ out << "%%\n"
return
else
out << line
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
deleted file mode 100644
index 3a42b0e569..0000000000
--- a/ext/sdbm/_sdbm.c
+++ /dev/null
@@ -1,952 +0,0 @@
-/*
- * sdbm - ndbm work-alike hashed database library
- * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
- * author: oz@nexus.yorku.ca
- * status: public domain.
- *
- * core routines
- */
-
-#include "ruby/ruby.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "sdbm.h"
-
-/*
- * sdbm - ndbm work-alike hashed database library
- * tuning and portability constructs [not nearly enough]
- * author: oz@nexus.yorku.ca
- */
-
-#define BYTESIZ 8
-
-#ifdef BSD42
-#define SEEK_SET L_SET
-#define memset(s,c,n) bzero((s), (n)) /* only when c is zero */
-#define memcpy(s1,s2,n) bcopy((s2), (s1), (n))
-#define memcmp(s1,s2,n) bcmp((s1),(s2),(n))
-#endif
-
-/*
- * important tuning parms (hah)
- */
-
-#ifndef SEEDUPS
-#define SEEDUPS 1 /* always detect duplicates */
-#endif
-#ifndef BADMESS
-#define BADMESS 1 /* generate a message for worst case:
- cannot make room after SPLTMAX splits */
-#endif
-
-/*
- * misc
- */
-#ifdef DEBUG
-#define debug(x) printf x
-#else
-#define debug(x)
-#endif
-
-#ifdef BIG_E
-#define GET_SHORT(p, i) (((unsigned)((unsigned char *)(p))[(i)*2] << 8) + (((unsigned char *)(p))[(i)*2 + 1]))
-#define PUT_SHORT(p, i, s) (((unsigned char *)(p))[(i)*2] = (unsigned char)((s) >> 8), ((unsigned char *)(p))[(i)*2 + 1] = (unsigned char)(s))
-#else
-#define GET_SHORT(p, i) ((p)[(i)])
-#define PUT_SHORT(p, i, s) ((p)[(i)] = (s))
-#endif
-
-/*#include "pair.h"*/
-static int fitpair proto((char *, int));
-static void putpair proto((char *, datum, datum));
-static datum getpair proto((char *, datum));
-static int delpair proto((char *, datum));
-static int chkpage proto((char *));
-static datum getnkey proto((char *, int));
-static void splpage proto((char *, char *, long));
-#if SEEDUPS
-static int duppair proto((char *, datum));
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef DOSISH
-#include <io.h>
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef BSD42
-#include <sys/file.h>
-#else
-#include <fcntl.h>
-/*#include <memory.h>*/
-#endif
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-#include <errno.h>
-#ifndef EPERM
-#define EPERM EACCES
-#endif
-#include <string.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/*
- * externals
- */
-#if !defined(__sun) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(errno)
-extern int errno;
-#endif
-
-/*
- * forward
- */
-static int getdbit proto((DBM *, long));
-static int setdbit proto((DBM *, long));
-static int getpage proto((DBM *, long));
-static datum getnext proto((DBM *));
-static int makroom proto((DBM *, long, int));
-
-/*
- * useful macros
- */
-#define bad(x) ((x).dptr == NULL || (x).dsize < 0)
-#define exhash(item) sdbm_hash((item).dptr, (item).dsize)
-#define ioerr(db) ((db)->flags |= DBM_IOERR)
-
-#define OFF_PAG(off) (long) (off) * PBLKSIZ
-#define OFF_DIR(off) (long) (off) * DBLKSIZ
-
-static long masks[] = {
- 000000000000L, 000000000001L, 000000000003L,
- 000000000007L, 000000000017L, 000000000037L,
- 000000000077L, 000000000177L, 000000000377L,
- 000000000777L, 000000001777L, 000000003777L,
- 000000007777L, 000000017777L, 000000037777L,
- 000000077777L, 000000177777L, 000000377777L,
- 000000777777L, 000001777777L, 000003777777L,
- 000007777777L, 000017777777L, 000037777777L,
- 000077777777L, 000177777777L, 000377777777L,
- 000777777777L, 001777777777L, 003777777777L,
- 007777777777L, 017777777777L
-};
-
-datum nullitem = {NULL, 0};
-
-DBM *
-sdbm_open(register char *file, register int flags, register int mode)
-{
- register DBM *db;
- register char *dirname;
- register char *pagname;
- register size_t n;
-
- if (file == NULL || !*file)
- return errno = EINVAL, (DBM *) NULL;
-/*
- * need space for two separate filenames
- */
- n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
-
- if ((dirname = malloc(n)) == NULL)
- return errno = ENOMEM, (DBM *) NULL;
-/*
- * build the file names
- */
- dirname = strcat(strcpy(dirname, file), DIRFEXT);
- pagname = strcpy(dirname + strlen(dirname) + 1, file);
- pagname = strcat(pagname, PAGFEXT);
-
- db = sdbm_prep(dirname, pagname, flags, mode);
- free((char *) dirname);
- return db;
-}
-
-static int
-fd_set_cloexec(int fd)
-{
- /* MinGW don't have F_GETFD and FD_CLOEXEC. [ruby-core:40281] */
-#ifdef F_GETFD
- int flags, ret;
- flags = fcntl(fd, F_GETFD); /* should not fail except EBADF. */
- if (flags == -1) {
- return -1;
- }
- if (2 < fd) {
- if (!(flags & FD_CLOEXEC)) {
- flags |= FD_CLOEXEC;
- ret = fcntl(fd, F_SETFD, flags);
- if (ret == -1) {
- return -1;
- }
- }
- }
-#endif
- return 0;
-}
-
-DBM *
-sdbm_prep(char *dirname, char *pagname, int flags, int mode)
-{
- register DBM *db;
- struct stat dstat;
-
- if ((db = (DBM *) malloc(sizeof(DBM))) == NULL)
- return errno = ENOMEM, (DBM *) NULL;
-
- db->pagf = -1;
- db->dirf = -1;
- db->flags = 0;
- db->hmask = 0;
- db->blkptr = 0;
- db->keyptr = 0;
-/*
- * adjust user flags so that WRONLY becomes RDWR,
- * as required by this package. Also set our internal
- * flag for RDONLY.
- */
- if (flags & O_WRONLY)
- flags = (flags & ~O_WRONLY) | O_RDWR;
- if (flags & O_RDONLY)
- db->flags = DBM_RDONLY;
-/*
- * open the files in sequence, and stat the dirfile.
- * If we fail anywhere, undo everything, return NULL.
- */
- flags |= O_BINARY;
-#ifdef O_CLOEXEC
- flags |= O_CLOEXEC;
-#endif
-
- if ((db->pagf = open(pagname, flags, mode)) == -1) goto err;
- if (fd_set_cloexec(db->pagf) == -1) goto err;
- if ((db->dirf = open(dirname, flags, mode)) == -1) goto err;
- if (fd_set_cloexec(db->dirf) == -1) goto err;
-/*
- * need the dirfile size to establish max bit number.
- */
- if (fstat(db->dirf, &dstat) == -1) goto err;
-/*
- * zero size: either a fresh database, or one with a single,
- * unsplit data page: dirpage is all zeros.
- */
- db->dirbno = (!dstat.st_size) ? 0 : -1;
- db->pagbno = -1;
- db->maxbno = dstat.st_size * (long) BYTESIZ;
-
- (void) memset(db->pagbuf, 0, PBLKSIZ);
- (void) memset(db->dirbuf, 0, DBLKSIZ);
-/*
- * success
- */
- return db;
-
- err:
- if (db->pagf != -1)
- (void) close(db->pagf);
- if (db->dirf != -1)
- (void) close(db->dirf);
- free((char *) db);
- return (DBM *) NULL;
-}
-
-void
-sdbm_close(register DBM *db)
-{
- if (db == NULL)
- errno = EINVAL;
- else {
- (void) close(db->dirf);
- (void) close(db->pagf);
- free((char *) db);
- }
-}
-
-datum
-sdbm_fetch(register DBM *db, datum key)
-{
- if (db == NULL || bad(key))
- return errno = EINVAL, nullitem;
-
- if (getpage(db, exhash(key)))
- return getpair(db->pagbuf, key);
-
- return ioerr(db), nullitem;
-}
-
-int
-sdbm_delete(register DBM *db, datum key)
-{
- if (db == NULL || bad(key))
- return errno = EINVAL, -1;
- if (sdbm_rdonly(db))
- return errno = EPERM, -1;
-
- if (getpage(db, exhash(key))) {
- if (!delpair(db->pagbuf, key))
- return -1;
-/*
- * update the page file
- */
- if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
- || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return ioerr(db), -1;
-
- return 0;
- }
-
- return ioerr(db), -1;
-}
-
-int
-sdbm_store(register DBM *db, datum key, datum val, int flags)
-{
- int need;
- register long hash;
-
- if (db == NULL || bad(key))
- return errno = EINVAL, -1;
- if (sdbm_rdonly(db))
- return errno = EPERM, -1;
-
- need = key.dsize + val.dsize;
-/*
- * is the pair too big (or too small) for this database ??
- */
- if (need < 0 || need > PAIRMAX)
- return errno = EINVAL, -1;
-
- if (getpage(db, (hash = exhash(key)))) {
-/*
- * if we need to replace, delete the key/data pair
- * first. If it is not there, ignore.
- */
- if (flags == DBM_REPLACE)
- (void) delpair(db->pagbuf, key);
-#if SEEDUPS
- else if (duppair(db->pagbuf, key))
- return 1;
-#endif
-/*
- * if we do not have enough room, we have to split.
- */
- if (!fitpair(db->pagbuf, need))
- if (!makroom(db, hash, need))
- return ioerr(db), -1;
-/*
- * we have enough room or split is successful. insert the key,
- * and update the page file.
- */
- (void) putpair(db->pagbuf, key, val);
-
- if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
- || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return ioerr(db), -1;
- /*
- * success
- */
- return 0;
- }
-
- return ioerr(db), -1;
-}
-
-/*
- * makroom - make room by splitting the overfull page
- * this routine will attempt to make room for SPLTMAX times before
- * giving up.
- */
-static int
-makroom(register DBM *db, long int hash, int need)
-{
- long newp;
- char twin[PBLKSIZ];
-#if defined _WIN32
- char zer[PBLKSIZ];
- long oldtail;
-#endif
- char *pag = db->pagbuf;
- char *new = twin;
- register int smax = SPLTMAX;
-
- do {
-/*
- * split the current page
- */
- (void) splpage(pag, new, db->hmask + 1);
-/*
- * address of the new page
- */
- newp = (hash & db->hmask) | (db->hmask + 1);
- debug(("newp: %ld\n", newp));
-/*
- * write delay, read avoidance/cache shuffle:
- * select the page for incoming pair: if key is to go to the new page,
- * write out the previous one, and copy the new one over, thus making
- * it the current page. If not, simply write the new page, and we are
- * still looking at the page of interest. current page is not updated
- * here, as sdbm_store will do so, after it inserts the incoming pair.
- */
-
-#if defined _WIN32
- /*
- * Fill hole with 0 if made it.
- * (hole is NOT read as 0)
- */
- oldtail = lseek(db->pagf, 0L, SEEK_END);
- memset(zer, 0, PBLKSIZ);
- while (OFF_PAG(newp) > oldtail) {
- if (lseek(db->pagf, 0L, SEEK_END) < 0 ||
- write(db->pagf, zer, PBLKSIZ) < 0) {
-
- return 0;
- }
- oldtail += PBLKSIZ;
- }
-#endif
-
- if (hash & (db->hmask + 1)) {
- if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
- || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return 0;
- db->pagbno = newp;
- (void) memcpy(pag, new, PBLKSIZ);
- }
- else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0
- || write(db->pagf, new, PBLKSIZ) < 0)
- return 0;
-
- if (!setdbit(db, db->curbit))
- return 0;
-/*
- * see if we have enough room now
- */
- if (fitpair(pag, need))
- return 1;
-/*
- * try again... update curbit and hmask as getpage would have
- * done. because of our update of the current page, we do not
- * need to read in anything. BUT we have to write the current
- * [deferred] page out, as the window of failure is too great.
- */
- db->curbit = 2 * db->curbit +
- ((hash & (db->hmask + 1)) ? 2 : 1);
- db->hmask |= (db->hmask + 1);
-
- if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
- || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return 0;
-
- } while (--smax);
-/*
- * if we are here, this is real bad news. After SPLTMAX splits,
- * we still cannot fit the key. say goodnight.
- */
-#if BADMESS
- (void) (write(2, "sdbm: cannot insert after SPLTMAX attempts.\n", 44) < 0);
-#endif
- return 0;
-
-}
-
-/*
- * the following two routines will break if
- * deletions aren't taken into account. (ndbm bug)
- */
-datum
-sdbm_firstkey(register DBM *db)
-{
- if (db == NULL)
- return errno = EINVAL, nullitem;
-/*
- * start at page 0
- */
- (void) memset(db->pagbuf, 0, PBLKSIZ);
- if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0
- || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return ioerr(db), nullitem;
- db->pagbno = 0;
- db->blkptr = 0;
- db->keyptr = 0;
-
- return getnext(db);
-}
-
-datum
-sdbm_nextkey(register DBM *db)
-{
- if (db == NULL)
- return errno = EINVAL, nullitem;
- return getnext(db);
-}
-
-/*
- * all important binary trie traversal
- */
-static int
-getpage(register DBM *db, register long int hash)
-{
- register int hbit;
- register long dbit;
- register long pagb;
-
- dbit = 0;
- hbit = 0;
- while (dbit < db->maxbno && getdbit(db, dbit))
- dbit = 2 * dbit + ((hash & ((long) 1 << hbit++)) ? 2 : 1);
-
- debug(("dbit: %ld...", dbit));
-
- db->curbit = dbit;
- db->hmask = masks[hbit];
-
- pagb = hash & db->hmask;
-/*
- * see if the block we need is already in memory.
- * note: this lookaside cache has about 10% hit rate.
- */
- if (pagb != db->pagbno) {
-/*
- * note: here, we assume a "hole" is read as 0s.
- * if not, must zero pagbuf first.
- */
- (void) memset(db->pagbuf, 0, PBLKSIZ);
-
- if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0
- || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
- return 0;
- if (!chkpage(db->pagbuf)) {
- return 0;
- }
- db->pagbno = pagb;
-
- debug(("pag read: %ld\n", pagb));
- }
- return 1;
-}
-
-static int
-getdbit(register DBM *db, register long int dbit)
-{
- register long c;
- register long dirb;
-
- c = dbit / BYTESIZ;
- dirb = c / DBLKSIZ;
-
- if (dirb != db->dirbno) {
- if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
- || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
- return 0;
- db->dirbno = dirb;
-
- debug(("dir read: %ld\n", dirb));
- }
-
- return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ));
-}
-
-static int
-setdbit(register DBM *db, register long int dbit)
-{
- register long c;
- register long dirb;
-
- c = dbit / BYTESIZ;
- dirb = c / DBLKSIZ;
-
- if (dirb != db->dirbno) {
- if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
- || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
- return 0;
- db->dirbno = dirb;
-
- debug(("dir read: %ld\n", dirb));
- }
-
- db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ));
-
- if (dbit >= db->maxbno)
- db->maxbno += (long) DBLKSIZ * BYTESIZ;
-
- if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
- || write(db->dirf, db->dirbuf, DBLKSIZ) < 0)
- return 0;
-
- return 1;
-}
-
-/*
- * getnext - get the next key in the page, and if done with
- * the page, try the next page in sequence
- */
-static datum
-getnext(register DBM *db)
-{
- datum key;
-
- for (;;) {
- db->keyptr++;
- key = getnkey(db->pagbuf, db->keyptr);
- if (key.dptr != NULL)
- return key;
-/*
- * we either run out, or there is nothing on this page..
- * try the next one... If we lost our position on the
- * file, we will have to seek.
- */
- db->keyptr = 0;
- if (db->pagbno != db->blkptr++)
- if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0)
- break;
- db->pagbno = db->blkptr;
- if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0)
- break;
- if (!chkpage(db->pagbuf)) {
- break;
- }
- }
-
- return ioerr(db), nullitem;
-}
-
-/* pair.c */
-/*
- * sdbm - ndbm work-alike hashed database library
- * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
- * author: oz@nexus.yorku.ca
- * status: public domain.
- *
- * page-level routines
- */
-
-#ifndef BSD42
-/*#include <memory.h>*/
-#endif
-
-#define exhash(item) sdbm_hash((item).dptr, (item).dsize)
-
-/*
- * forward
- */
-static int seepair proto((char *, int, char *, int));
-
-/*
- * page format:
- * +------------------------------+
- * ino | n | keyoff | datoff | keyoff |
- * +------------+--------+--------+
- * | datoff | - - - ----> |
- * +--------+---------------------+
- * | F R E E A R E A |
- * +--------------+---------------+
- * | <---- - - - | data |
- * +--------+-----+----+----------+
- * | key | data | key |
- * +--------+----------+----------+
- *
- * calculating the offsets for free area: if the number
- * of entries (ino[0]) is zero, the offset to the END of
- * the free area is the block size. Otherwise, it is the
- * nth (ino[ino[0]]) entry's offset.
- */
-
-static int
-fitpair(char *pag, int need)
-{
- register int n;
- register int off;
- register int free;
- register short *ino = (short *) pag;
-
- off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
- free = off - (n + 1) * (int)sizeof(short);
- need += 2 * (int)sizeof(short);
-
- debug(("free %d need %d\n", free, need));
-
- return need <= free;
-}
-
-static void
-putpair(char *pag, datum key, datum val)
-{
- register int n;
- register int off;
- register short *ino = (short *) pag;
-
- off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
-/*
- * enter the key first
- */
- off -= key.dsize;
- if (key.dsize)
- (void) memcpy(pag + off, key.dptr, key.dsize);
- PUT_SHORT(ino,n + 1,off);
-/*
- * now the data
- */
- off -= val.dsize;
- if (val.dsize)
- (void) memcpy(pag + off, val.dptr, val.dsize);
- PUT_SHORT(ino,n + 2,off);
-/*
- * adjust item count
- */
- PUT_SHORT(ino,0,GET_SHORT(ino,0) + 2);
-}
-
-static datum
-getpair(char *pag, datum key)
-{
- register int i;
- register int n;
- datum val;
- register short *ino = (short *) pag;
-
- if ((n = GET_SHORT(ino,0)) == 0)
- return nullitem;
-
- if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)
- return nullitem;
-
- val.dptr = pag + GET_SHORT(ino,i + 1);
- val.dsize = GET_SHORT(ino,i) - GET_SHORT(ino,i + 1);
- return val;
-}
-
-#if SEEDUPS
-static int
-duppair(char *pag, datum key)
-{
- register short *ino = (short *) pag;
- return GET_SHORT(ino,0) > 0 &&
- seepair(pag, GET_SHORT(ino,0), key.dptr, key.dsize) > 0;
-}
-#endif
-
-static datum
-getnkey(char *pag, int num)
-{
- datum key;
- register int off;
- register short *ino = (short *) pag;
-
- num = num * 2 - 1;
- if (GET_SHORT(ino,0) == 0 || num > GET_SHORT(ino,0))
- return nullitem;
-
- off = (num > 1) ? GET_SHORT(ino,num - 1) : PBLKSIZ;
-
- key.dptr = pag + GET_SHORT(ino,num);
- key.dsize = off - GET_SHORT(ino,num);
-
- return key;
-}
-
-static int
-delpair(char *pag, datum key)
-{
- register int n;
- register int i;
- register short *ino = (short *) pag;
-
- if ((n = GET_SHORT(ino,0)) == 0)
- return 0;
-
- if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)
- return 0;
-/*
- * found the key. if it is the last entry
- * [i.e. i == n - 1] we just adjust the entry count.
- * hard case: move all data down onto the deleted pair,
- * shift offsets onto deleted offsets, and adjust them.
- * [note: 0 < i < n]
- */
- if (i < n - 1) {
- register int m;
- register char *dst = pag + (i == 1 ? PBLKSIZ : GET_SHORT(ino,i - 1));
- register char *src = pag + GET_SHORT(ino,i + 1);
- register ptrdiff_t zoo = dst - src;
-
- debug(("free-up %"PRIdPTRDIFF" ", zoo));
-/*
- * shift data/keys down
- */
- m = GET_SHORT(ino,i + 1) - GET_SHORT(ino,n);
-#ifdef DUFF
-#define MOVB *--dst = *--src
-
- if (m > 0) {
- register int loop = (m + 8 - 1) >> 3;
-
- switch (m & (8 - 1)) {
- case 0: do {
- MOVB; case 7: MOVB;
- case 6: MOVB; case 5: MOVB;
- case 4: MOVB; case 3: MOVB;
- case 2: MOVB; case 1: MOVB;
- } while (--loop);
- }
- }
-#else
-#ifdef MEMMOVE
- memmove(dst-m, src-m, m);
-#else
- while (m--)
- *--dst = *--src;
-#endif
-#endif
-/*
- * adjust offset index up
- */
- while (i < n - 1) {
- PUT_SHORT(ino,i, GET_SHORT(ino,i + 2) + zoo);
- i++;
- }
- }
- PUT_SHORT(ino, 0, GET_SHORT(ino, 0) - 2);
- return 1;
-}
-
-/*
- * search for the key in the page.
- * return offset index in the range 0 < i < n.
- * return 0 if not found.
- */
-static int
-seepair(char *pag, register int n, register char *key, register int siz)
-{
- register int i;
- register int off = PBLKSIZ;
- register short *ino = (short *) pag;
-
- for (i = 1; i < n; i += 2) {
- if (siz == off - GET_SHORT(ino,i) &&
- memcmp(key, pag + GET_SHORT(ino,i), siz) == 0)
- return i;
- off = GET_SHORT(ino,i + 1);
- }
- return 0;
-}
-
-static void
-splpage(char *pag, char *new, long int sbit)
-{
- datum key;
- datum val;
-
- register int n;
- register int off = PBLKSIZ;
- char cur[PBLKSIZ];
- register short *ino = (short *) cur;
-
- (void) memcpy(cur, pag, PBLKSIZ);
- (void) memset(pag, 0, PBLKSIZ);
- (void) memset(new, 0, PBLKSIZ);
-
- n = GET_SHORT(ino,0);
- for (ino++; n > 0; ino += 2) {
- key.dptr = cur + GET_SHORT(ino,0);
- key.dsize = off - GET_SHORT(ino,0);
- val.dptr = cur + GET_SHORT(ino,1);
- val.dsize = GET_SHORT(ino,0) - GET_SHORT(ino,1);
-/*
- * select the page pointer (by looking at sbit) and insert
- */
- (void) putpair((exhash(key) & sbit) ? new : pag, key, val);
-
- off = GET_SHORT(ino,1);
- n -= 2;
- }
-
- debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
- ((short *) new)[0] / 2,
- ((short *) pag)[0] / 2));
-}
-
-/*
- * check page sanity:
- * number of entries should be something
- * reasonable, and all offsets in the index should be in order.
- * this could be made more rigorous.
- */
-static int
-chkpage(char *pag)
-{
- register int n;
- register int off;
- register short *ino = (short *) pag;
-
- if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / (int)sizeof(short))
- return 0;
-
- if (n > 0) {
- off = PBLKSIZ;
- for (ino++; n > 0; ino += 2) {
- if (GET_SHORT(ino,0) > off || GET_SHORT(ino,1) > off ||
- GET_SHORT(ino,1) > GET_SHORT(ino,0))
- return 0;
- off = GET_SHORT(ino,1);
- n -= 2;
- }
- }
- return 1;
-}
-
-/* hash.c */
-/*
- * sdbm - ndbm work-alike hashed database library
- * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
- * author: oz@nexus.yorku.ca
- * status: public domain. keep it that way.
- *
- * hashing routine
- */
-
-/*
- * polynomial conversion ignoring overflows
- * [this seems to work remarkably well, in fact better
- * then the ndbm hash function. Replace at your own risk]
- * use: 65599 nice.
- * 65587 even better.
- */
-long
-sdbm_hash(register char *str, register int len)
-{
- register unsigned long n = 0;
-
-#ifdef DUFF
-
-#define HASHC n = *str++ + 65599 * n
-
- if (len > 0) {
- register int loop = (len + 8 - 1) >> 3;
-
- switch(len & (8 - 1)) {
- case 0: do {
- HASHC; case 7: HASHC;
- case 6: HASHC; case 5: HASHC;
- case 4: HASHC; case 3: HASHC;
- case 2: HASHC; case 1: HASHC;
- } while (--loop);
- }
-
- }
-#else
- while (len--)
- n = ((*str++) & 255) + 65587L * n;
-#endif
- return n;
-}
diff --git a/ext/sdbm/depend b/ext/sdbm/depend
deleted file mode 100644
index d475ecccef..0000000000
--- a/ext/sdbm/depend
+++ /dev/null
@@ -1,27 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-_sdbm.o: $(RUBY_EXTCONF_H)
-_sdbm.o: $(arch_hdrdir)/ruby/config.h
-_sdbm.o: $(hdrdir)/ruby/assert.h
-_sdbm.o: $(hdrdir)/ruby/backward.h
-_sdbm.o: $(hdrdir)/ruby/defines.h
-_sdbm.o: $(hdrdir)/ruby/intern.h
-_sdbm.o: $(hdrdir)/ruby/missing.h
-_sdbm.o: $(hdrdir)/ruby/ruby.h
-_sdbm.o: $(hdrdir)/ruby/st.h
-_sdbm.o: $(hdrdir)/ruby/subst.h
-_sdbm.o: _sdbm.c
-_sdbm.o: sdbm.h
-init.o: $(RUBY_EXTCONF_H)
-init.o: $(arch_hdrdir)/ruby/config.h
-init.o: $(hdrdir)/ruby.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
-init.o: $(hdrdir)/ruby/missing.h
-init.o: $(hdrdir)/ruby/ruby.h
-init.o: $(hdrdir)/ruby/st.h
-init.o: $(hdrdir)/ruby/subst.h
-init.o: init.c
-init.o: sdbm.h
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/sdbm/extconf.rb b/ext/sdbm/extconf.rb
deleted file mode 100644
index bdf3e299e6..0000000000
--- a/ext/sdbm/extconf.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-require 'mkmf'
-
-$defs << "-D""BADMESS=0"
-create_makefile("sdbm")
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
deleted file mode 100644
index 42292b99cd..0000000000
--- a/ext/sdbm/init.c
+++ /dev/null
@@ -1,1067 +0,0 @@
-/************************************************
-
- sdbminit.c -
-
- $Author$
- created at: Fri May 7 08:34:24 JST 1999
-
- Copyright (C) 1995-2001 Yukihiro Matsumoto
-
-************************************************/
-
-#include "ruby.h"
-
-#include "sdbm.h"
-#include <fcntl.h>
-#include <errno.h>
-
-/*
- * Document-class: SDBM
- *
- * SDBM provides a simple file-based key-value store, which can only store
- * String keys and values.
- *
- * Note that Ruby comes with the source code for SDBM, while the DBM and GDBM
- * standard libraries rely on external libraries and headers.
- *
- * === Examples
- *
- * Insert values:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db['apple'] = 'fruit'
- * db['pear'] = 'fruit'
- * db['carrot'] = 'vegetable'
- * db['tomato'] = 'vegetable'
- * end
- *
- * Bulk update:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db.update('peach' => 'fruit', 'tomato' => 'fruit')
- * end
- *
- * Retrieve values:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db.each do |key, value|
- * puts "Key: #{key}, Value: #{value}"
- * end
- * end
- *
- * Outputs:
- *
- * Key: apple, Value: fruit
- * Key: pear, Value: fruit
- * Key: carrot, Value: vegetable
- * Key: peach, Value: fruit
- * Key: tomato, Value: fruit
- */
-
-static VALUE rb_cDBM, rb_eDBMError;
-
-struct dbmdata {
- int di_size;
- DBM *di_dbm;
-};
-
-NORETURN(static void closed_sdbm(void));
-
-static void
-closed_sdbm(void)
-{
- rb_raise(rb_eDBMError, "closed SDBM file");
-}
-
-#define GetDBM(obj, dbmp) do {\
- TypedData_Get_Struct((obj), struct dbmdata, &sdbm_type, (dbmp));\
- if ((dbmp)->di_dbm == 0) closed_sdbm();\
-} while (0)
-
-#define GetDBM2(obj, dbmp, dbm) do {\
- GetDBM((obj), (dbmp));\
- (dbm) = (dbmp)->di_dbm;\
-} while (0)
-
-static void
-free_sdbm(void *ptr)
-{
- struct dbmdata *dbmp = ptr;
-
- if (dbmp->di_dbm) sdbm_close(dbmp->di_dbm);
- ruby_xfree(dbmp);
-}
-
-static size_t
-memsize_dbm(const void *ptr)
-{
- const struct dbmdata *dbmp = ptr;
- size_t size = sizeof(*dbmp);
- if (dbmp->di_dbm)
- size += sizeof(DBM);
- return size;
-}
-
-static const rb_data_type_t sdbm_type = {
- "sdbm",
- {0, free_sdbm, memsize_dbm,},
- 0, 0,
- RUBY_TYPED_FREE_IMMEDIATELY,
-};
-
-/*
- * call-seq:
- * sdbm.close -> nil
- *
- * Closes the database file.
- *
- * Raises SDBMError if the database is already closed.
- */
-static VALUE
-fsdbm_close(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- GetDBM(obj, dbmp);
- sdbm_close(dbmp->di_dbm);
- dbmp->di_dbm = 0;
-
- return Qnil;
-}
-
-/*
- * call-seq:
- * sdbm.closed? -> true or false
- *
- * Returns +true+ if the database is closed.
- */
-static VALUE
-fsdbm_closed(VALUE obj)
-{
- struct dbmdata *dbmp;
-
- TypedData_Get_Struct(obj, struct dbmdata, &sdbm_type, dbmp);
- if (dbmp->di_dbm == 0)
- return Qtrue;
-
- return Qfalse;
-}
-
-static VALUE
-fsdbm_alloc(VALUE klass)
-{
- struct dbmdata *dbmp;
-
- return TypedData_Make_Struct(klass, struct dbmdata, &sdbm_type, dbmp);
-}
-/*
- * call-seq:
- * SDBM.new(filename, mode = 0666)
- *
- * Creates a new database handle by opening the given +filename+. SDBM actually
- * uses two physical files, with extensions '.dir' and '.pag'. These extensions
- * will automatically be appended to the +filename+.
- *
- * If the file does not exist, a new file will be created using the given
- * +mode+, unless +mode+ is explicitly set to nil. In the latter case, no
- * database will be created.
- *
- * If the file exists, it will be opened in read/write mode. If this fails, it
- * will be opened in read-only mode.
- */
-static VALUE
-fsdbm_initialize(int argc, VALUE *argv, VALUE obj)
-{
- VALUE file, vmode;
- DBM *dbm;
- struct dbmdata *dbmp;
- int mode;
-
- TypedData_Get_Struct(obj, struct dbmdata, &sdbm_type, dbmp);
- if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
- mode = 0666; /* default value */
- }
- else if (NIL_P(vmode)) {
- mode = -1; /* return nil if DB not exist */
- }
- else {
- mode = NUM2INT(vmode);
- }
- FilePathValue(file);
-
- dbm = 0;
- if (mode >= 0)
- dbm = sdbm_open(RSTRING_PTR(file), O_RDWR|O_CREAT, mode);
- if (!dbm)
- dbm = sdbm_open(RSTRING_PTR(file), O_RDWR, 0);
- if (!dbm)
- dbm = sdbm_open(RSTRING_PTR(file), O_RDONLY, 0);
-
- if (!dbm) {
- if (mode == -1) return Qnil;
- rb_sys_fail_str(file);
- }
-
- if (dbmp->di_dbm)
- sdbm_close(dbmp->di_dbm);
- dbmp->di_dbm = dbm;
- dbmp->di_size = -1;
-
- return obj;
-}
-
-/*
- * call-seq:
- * SDBM.open(filename, mode = 0666)
- * SDBM.open(filename, mode = 0666) { |sdbm| ... }
- *
- * If called without a block, this is the same as SDBM.new.
- *
- * If a block is given, the new database will be passed to the block and
- * will be safely closed after the block has executed.
- *
- * Example:
- *
- * require 'sdbm'
- *
- * SDBM.open('my_database') do |db|
- * db['hello'] = 'world'
- * end
- */
-static VALUE
-fsdbm_s_open(int argc, VALUE *argv, VALUE klass)
-{
- VALUE obj = fsdbm_alloc(klass);
-
- if (NIL_P(fsdbm_initialize(argc, argv, obj))) {
- return Qnil;
- }
-
- if (rb_block_given_p()) {
- return rb_ensure(rb_yield, obj, fsdbm_close, obj);
- }
-
- return obj;
-}
-
-static VALUE
-fsdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone)
-{
- datum key, value;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- ExportStringValue(keystr);
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
-
- GetDBM2(obj, dbmp, dbm);
- value = sdbm_fetch(dbm, key);
- if (value.dptr == 0) {
- if (ifnone == Qnil && rb_block_given_p())
- return rb_yield(rb_external_str_new(key.dptr, key.dsize));
- return ifnone;
- }
- return rb_external_str_new(value.dptr, value.dsize);
-}
-
-/*
- * call-seq:
- * sdbm[key] -> value or nil
- *
- * Returns the +value+ in the database associated with the given +key+ string.
- *
- * If no value is found, returns +nil+.
- */
-static VALUE
-fsdbm_aref(VALUE obj, VALUE keystr)
-{
- return fsdbm_fetch(obj, keystr, Qnil);
-}
-
-/*
- * call-seq:
- * sdbm.fetch(key) -> value or nil
- * sdbm.fetch(key) { |key| ... }
- *
- * Returns the +value+ in the database associated with the given +key+ string.
- *
- * If a block is provided, the block will be called when there is no
- * +value+ associated with the given +key+. The +key+ will be passed in as an
- * argument to the block.
- *
- * If no block is provided and no value is associated with the given +key+,
- * then an IndexError will be raised.
- */
-static VALUE
-fsdbm_fetch_m(int argc, VALUE *argv, VALUE obj)
-{
- VALUE keystr, valstr, ifnone;
-
- rb_scan_args(argc, argv, "11", &keystr, &ifnone);
- valstr = fsdbm_fetch(obj, keystr, ifnone);
- if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
- rb_raise(rb_eIndexError, "key not found");
-
- return valstr;
-}
-
-/*
- * call-seq:
- * sdbm.key(value) -> key
- *
- * Returns the +key+ associated with the given +value+. If more than one
- * +key+ corresponds to the given +value+, then the first key to be found
- * will be returned. If no keys are found, +nil+ will be returned.
- */
-static VALUE
-fsdbm_key(VALUE obj, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- ExportStringValue(valstr);
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_LENINT(valstr);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- if (val.dsize == RSTRING_LEN(valstr) &&
- memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0)
- return rb_external_str_new(key.dptr, key.dsize);
- }
- return Qnil;
-}
-
-/*
- * :nodoc:
- */
-static VALUE
-fsdbm_index(VALUE hash, VALUE value)
-{
- rb_warn("SDBM#index is deprecated; use SDBM#key");
- return fsdbm_key(hash, value);
-}
-
-/* call-seq:
- * sdbm.select { |key, value| ... } -> Array
- *
- * Returns a new Array of key-value pairs for which the block returns +true+.
- *
- * Example:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db['apple'] = 'fruit'
- * db['pear'] = 'fruit'
- * db['spinach'] = 'vegetable'
- *
- * veggies = db.select do |key, value|
- * value == 'vegetable'
- * end #=> [["apple", "fruit"], ["pear", "fruit"]]
- * end
- */
-static VALUE
-fsdbm_select(VALUE obj)
-{
- VALUE new = rb_ary_new();
- datum key, val;
- DBM *dbm;
- struct dbmdata *dbmp;
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- VALUE assoc, v;
- val = sdbm_fetch(dbm, key);
- assoc = rb_assoc_new(rb_external_str_new(key.dptr, key.dsize),
- rb_external_str_new(val.dptr, val.dsize));
- v = rb_yield(assoc);
- if (RTEST(v)) {
- rb_ary_push(new, assoc);
- }
- GetDBM2(obj, dbmp, dbm);
- }
-
- return new;
-}
-
-/* call-seq:
- * sdbm.values_at(key, ...) -> Array
- *
- * Returns an Array of values corresponding to the given keys.
- */
-static VALUE
-fsdbm_values_at(int argc, VALUE *argv, VALUE obj)
-{
- VALUE new = rb_ary_new2(argc);
- int i;
-
- for (i=0; i<argc; i++) {
- rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
- }
-
- return new;
-}
-
-static void
-fdbm_modify(VALUE obj)
-{
- if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
-}
-
-/*
- * call-seq:
- * sdbm.delete(key) -> value or nil
- * sdbm.delete(key) { |key, value| ... }
- *
- * Deletes the key-value pair corresponding to the given +key+. If the
- * +key+ exists, the deleted value will be returned, otherwise +nil+.
- *
- * If a block is provided, the deleted +key+ and +value+ will be passed to
- * the block as arguments. If the +key+ does not exist in the database, the
- * value will be +nil+.
- */
-static VALUE
-fsdbm_delete(VALUE obj, VALUE keystr)
-{
- datum key, value;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE valstr;
-
- fdbm_modify(obj);
- ExportStringValue(keystr);
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
-
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
-
- value = sdbm_fetch(dbm, key);
- if (value.dptr == 0) {
- if (rb_block_given_p()) return rb_yield(keystr);
- return Qnil;
- }
-
- /* need to save value before sdbm_delete() */
- valstr = rb_external_str_new(value.dptr, value.dsize);
-
- if (sdbm_delete(dbm, key)) {
- dbmp->di_size = -1;
- rb_raise(rb_eDBMError, "dbm_delete failed");
- }
- else if (dbmp->di_size >= 0) {
- dbmp->di_size--;
- }
- return valstr;
-}
-
-/*
- * call-seq:
- * sdbm.shift -> Array or nil
- *
- * Removes a key-value pair from the database and returns them as an
- * Array. If the database is empty, returns +nil+.
- */
-static VALUE
-fsdbm_shift(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- key = sdbm_firstkey(dbm);
- if (!key.dptr) return Qnil;
- val = sdbm_fetch(dbm, key);
- keystr = rb_external_str_new(key.dptr, key.dsize);
- valstr = rb_external_str_new(val.dptr, val.dsize);
- sdbm_delete(dbm, key);
- if (dbmp->di_size >= 0) {
- dbmp->di_size--;
- }
-
- return rb_assoc_new(keystr, valstr);
-}
-
-/*
- * call-seq:
- * sdbm.delete_if { |key, value| ... } -> self
- * sdbm.reject! { |key, value| ... } -> self
- *
- * Iterates over the key-value pairs in the database, deleting those for
- * which the block returns +true+.
- */
-static VALUE
-fsdbm_delete_if(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
- VALUE ret, ary = rb_ary_new();
- long i;
- int status = 0, n;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- n = dbmp->di_size;
- dbmp->di_size = -1;
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- keystr = rb_external_str_new(key.dptr, key.dsize);
- valstr = rb_external_str_new(val.dptr, val.dsize);
- ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
- if (status != 0) break;
- if (RTEST(ret)) rb_ary_push(ary, keystr);
- GetDBM2(obj, dbmp, dbm);
- }
-
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- keystr = RARRAY_AREF(ary, i);
- ExportStringValue(keystr);
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
- if (sdbm_delete(dbm, key)) {
- rb_raise(rb_eDBMError, "sdbm_delete failed");
- }
- }
- if (status) rb_jump_tag(status);
- if (n > 0) dbmp->di_size = n - RARRAY_LENINT(ary);
-
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.clear -> self
- *
- * Deletes all data from the database.
- */
-static VALUE
-fsdbm_clear(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- fdbm_modify(obj);
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
- while (key = sdbm_firstkey(dbm), key.dptr) {
- if (sdbm_delete(dbm, key)) {
- rb_raise(rb_eDBMError, "sdbm_delete failed");
- }
- }
- dbmp->di_size = 0;
-
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.invert -> Hash
- *
- * Returns a Hash in which the key-value pairs have been inverted.
- *
- * Example:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db.update('apple' => 'fruit', 'spinach' => 'vegetable')
- *
- * db.invert #=> {"fruit" => "apple", "vegetable" => "spinach"}
- * end
- */
-static VALUE
-fsdbm_invert(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE keystr, valstr;
- VALUE hash = rb_hash_new();
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- keystr = rb_external_str_new(key.dptr, key.dsize);
- valstr = rb_external_str_new(val.dptr, val.dsize);
- rb_hash_aset(hash, valstr, keystr);
- }
- return hash;
-}
-
-/*
- * call-seq:
- * sdbm[key] = value -> value
- * sdbm.store(key, value) -> value
- *
- * Stores a new +value+ in the database with the given +key+ as an index.
- *
- * If the +key+ already exists, this will update the +value+ associated with
- * the +key+.
- *
- * Returns the given +value+.
- */
-static VALUE
-fsdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- if (valstr == Qnil) {
- fsdbm_delete(obj, keystr);
- return Qnil;
- }
-
- fdbm_modify(obj);
- ExportStringValue(keystr);
- ExportStringValue(valstr);
-
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
-
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_LENINT(valstr);
-
- GetDBM2(obj, dbmp, dbm);
- dbmp->di_size = -1;
- if (sdbm_store(dbm, key, val, DBM_REPLACE)) {
-#ifdef HAVE_DBM_CLAERERR
- sdbm_clearerr(dbm);
-#endif
- if (errno == EPERM) rb_sys_fail(0);
- rb_raise(rb_eDBMError, "sdbm_store failed");
- }
-
- return valstr;
-}
-
-static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
-{
- const VALUE *ptr;
- Check_Type(pair, T_ARRAY);
- if (RARRAY_LEN(pair) < 2) {
- rb_raise(rb_eArgError, "pair must be [key, value]");
- }
- ptr = RARRAY_CONST_PTR(pair);
- fsdbm_store(dbm, ptr[0], ptr[1]);
- return Qnil;
-}
-
-/*
- * call-seq:
- * sdbm.update(pairs) -> self
- *
- * Insert or update key-value pairs.
- *
- * This method will work with any object which implements an each_pair
- * method, such as a Hash.
- */
-static VALUE
-fsdbm_update(VALUE obj, VALUE other)
-{
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.replace(pairs) -> self
- *
- * Empties the database, then inserts the given key-value pairs.
- *
- * This method will work with any object which implements an each_pair
- * method, such as a Hash.
- */
-static VALUE
-fsdbm_replace(VALUE obj, VALUE other)
-{
- fsdbm_clear(obj);
- rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj);
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.length -> integer
- * sdbm.size -> integer
- *
- * Returns the number of keys in the database.
- */
-static VALUE
-fsdbm_length(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
- int i = 0;
-
- GetDBM2(obj, dbmp, dbm);
- if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
-
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- i++;
- }
- dbmp->di_size = i;
-
- return INT2FIX(i);
-}
-
-/*
- * call-seq:
- * sdbm.empty? -> true or false
- *
- * Returns +true+ if the database is empty.
- */
-static VALUE
-fsdbm_empty_p(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- GetDBM(obj, dbmp);
- if (dbmp->di_size < 0) {
- dbm = dbmp->di_dbm;
-
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- return Qfalse;
- }
- }
- else {
- if (dbmp->di_size)
- return Qfalse;
- }
- return Qtrue;
-}
-
-/*
- * call-seq:
- * sdbm.each_value
- * sdbm.each_value { |value| ... }
- *
- * Iterates over each +value+ in the database.
- *
- * If no block is given, returns an Enumerator.
- */
-static VALUE
-fsdbm_each_value(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- rb_yield(rb_external_str_new(val.dptr, val.dsize));
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.each_key
- * sdbm.each_key { |key| ... }
- *
- * Iterates over each +key+ in the database.
- *
- * If no block is given, returns an Enumerator.
- */
-static VALUE
-fsdbm_each_key(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- rb_yield(rb_external_str_new(key.dptr, key.dsize));
- GetDBM2(obj, dbmp, dbm);
- }
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.each
- * sdbm.each { |key, value| ... }
- * sdbm.each_pair
- * sdbm.each_pair { |key, value| ... }
- *
- * Iterates over each key-value pair in the database.
- *
- * If no block is given, returns an Enumerator.
- */
-static VALUE
-fsdbm_each_pair(VALUE obj)
-{
- datum key, val;
- DBM *dbm;
- struct dbmdata *dbmp;
- VALUE keystr, valstr;
-
- RETURN_ENUMERATOR(obj, 0, 0);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- keystr = rb_external_str_new(key.dptr, key.dsize);
- valstr = rb_external_str_new(val.dptr, val.dsize);
- rb_yield(rb_assoc_new(keystr, valstr));
- GetDBM2(obj, dbmp, dbm);
- }
-
- return obj;
-}
-
-/*
- * call-seq:
- * sdbm.keys -> Array
- *
- * Returns a new Array containing the keys in the database.
- */
-static VALUE
-fsdbm_keys(VALUE obj)
-{
- datum key;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- rb_ary_push(ary, rb_external_str_new(key.dptr, key.dsize));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * sdbm.values -> Array
- *
- * Returns a new Array containing the values in the database.
- */
-static VALUE
-fsdbm_values(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- rb_ary_push(ary, rb_external_str_new(val.dptr, val.dsize));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * sdbm.include?(key) -> true or false
- * sdbm.key?(key) -> true or false
- * sdbm.member?(key) -> true or false
- * sdbm.has_key?(key) -> true or false
- *
- * Returns +true+ if the database contains the given +key+.
- */
-static VALUE
-fsdbm_has_key(VALUE obj, VALUE keystr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- ExportStringValue(keystr);
- key.dptr = RSTRING_PTR(keystr);
- key.dsize = RSTRING_LENINT(keystr);
-
- GetDBM2(obj, dbmp, dbm);
- val = sdbm_fetch(dbm, key);
- if (val.dptr) return Qtrue;
- return Qfalse;
-}
-
-/*
- * call-seq:
- * sdbm.value?(key) -> true or false
- * sdbm.has_value?(key) -> true or false
- *
- * Returns +true+ if the database contains the given +value+.
- */
-static VALUE
-fsdbm_has_value(VALUE obj, VALUE valstr)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
-
- ExportStringValue(valstr);
- val.dptr = RSTRING_PTR(valstr);
- val.dsize = RSTRING_LENINT(valstr);
-
- GetDBM2(obj, dbmp, dbm);
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- if (val.dsize == RSTRING_LENINT(valstr) &&
- memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0)
- return Qtrue;
- }
- return Qfalse;
-}
-
-/*
- * call-seq:
- * sdbm.to_a -> Array
- *
- * Returns a new Array containing each key-value pair in the database.
- *
- * Example:
- *
- * require 'sdbm'
- *
- * SDBM.open 'my_database' do |db|
- * db.update('apple' => 'fruit', 'spinach' => 'vegetable')
- *
- * db.to_a #=> [["apple", "fruit"], ["spinach", "vegetable"]]
- * end
- */
-static VALUE
-fsdbm_to_a(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE ary;
-
- GetDBM2(obj, dbmp, dbm);
- ary = rb_ary_new();
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- rb_ary_push(ary, rb_assoc_new(rb_external_str_new(key.dptr, key.dsize),
- rb_external_str_new(val.dptr, val.dsize)));
- }
-
- return ary;
-}
-
-/*
- * call-seq:
- * sdbm.to_hash -> Hash
- *
- * Returns a new Hash containing each key-value pair in the database.
- */
-static VALUE
-fsdbm_to_hash(VALUE obj)
-{
- datum key, val;
- struct dbmdata *dbmp;
- DBM *dbm;
- VALUE hash;
-
- GetDBM2(obj, dbmp, dbm);
- hash = rb_hash_new();
- for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
- val = sdbm_fetch(dbm, key);
- rb_hash_aset(hash, rb_external_str_new(key.dptr, key.dsize),
- rb_external_str_new(val.dptr, val.dsize));
- }
-
- return hash;
-}
-
-/*
- * call-seq:
- * sdbm.reject { |key, value| ... } -> Hash
- *
- * Creates a new Hash using the key-value pairs from the database, then
- * calls Hash#reject with the given block, which returns a Hash with
- * only the key-value pairs for which the block returns +false+.
- */
-static VALUE
-fsdbm_reject(VALUE obj)
-{
- return rb_hash_delete_if(fsdbm_to_hash(obj));
-}
-
-void
-Init_sdbm(void)
-{
- rb_cDBM = rb_define_class("SDBM", rb_cObject);
- rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
- /* Document-class: SDBMError
- * Exception class used to return errors from the sdbm library.
- */
- rb_include_module(rb_cDBM, rb_mEnumerable);
-
- rb_define_alloc_func(rb_cDBM, fsdbm_alloc);
- rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);
-
- rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);
- rb_define_method(rb_cDBM, "close", fsdbm_close, 0);
- rb_define_method(rb_cDBM, "closed?", fsdbm_closed, 0);
- rb_define_method(rb_cDBM, "[]", fsdbm_aref, 1);
- rb_define_method(rb_cDBM, "fetch", fsdbm_fetch_m, -1);
- rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
- rb_define_method(rb_cDBM, "store", fsdbm_store, 2);
- rb_define_method(rb_cDBM, "index", fsdbm_index, 1);
- rb_define_method(rb_cDBM, "key", fsdbm_key, 1);
- rb_define_method(rb_cDBM, "select", fsdbm_select, 0);
- rb_define_method(rb_cDBM, "values_at", fsdbm_values_at, -1);
- rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
- rb_define_method(rb_cDBM, "size", fsdbm_length, 0);
- rb_define_method(rb_cDBM, "empty?", fsdbm_empty_p, 0);
- rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
- rb_define_method(rb_cDBM, "each_value", fsdbm_each_value, 0);
- rb_define_method(rb_cDBM, "each_key", fsdbm_each_key, 0);
- rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0);
- rb_define_method(rb_cDBM, "keys", fsdbm_keys, 0);
- rb_define_method(rb_cDBM, "values", fsdbm_values, 0);
- rb_define_method(rb_cDBM, "shift", fsdbm_shift, 0);
- rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);
- rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
- rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);
- rb_define_method(rb_cDBM, "reject", fsdbm_reject, 0);
- rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0);
- rb_define_method(rb_cDBM,"invert", fsdbm_invert, 0);
- rb_define_method(rb_cDBM,"update", fsdbm_update, 1);
- rb_define_method(rb_cDBM,"replace", fsdbm_replace, 1);
-
- rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
- rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
- rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);
- rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
- rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
- rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);
-
- rb_define_method(rb_cDBM, "to_a", fsdbm_to_a, 0);
- rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);
-}
diff --git a/ext/sdbm/sdbm.gemspec b/ext/sdbm/sdbm.gemspec
deleted file mode 100644
index 6cf000b453..0000000000
--- a/ext/sdbm/sdbm.gemspec
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-Gem::Specification.new do |s|
- s.name = "sdbm"
- s.version = '1.0.0'
- s.summary = "Provides a simple file-based key-value store with String keys and values."
- s.description = "Provides a simple file-based key-value store with String keys and values."
-
- s.require_path = %w{lib}
- s.files = %w{ext/sdbm/_sdbm.c ext/sdbm/extconf.rb ext/sdbm/init.c ext/sdbm/sdbm.h}
- s.extensions = ["ext/sdbm/extconf.rb"]
- s.required_ruby_version = ">= 2.3.0"
-
- s.authors = ["Yukihiro Matsumoto"]
- s.email = ["matz@ruby-lang.org"]
- s.homepage = "https://github.com/ruby/sdbm"
- s.license = "BSD-2-Clause"
-
- s.add_development_dependency "test-unit"
- s.add_development_dependency "rake-compiler"
-end
diff --git a/ext/sdbm/sdbm.h b/ext/sdbm/sdbm.h
deleted file mode 100644
index c3b53c4a8f..0000000000
--- a/ext/sdbm/sdbm.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * sdbm - ndbm work-alike hashed database library
- * based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
- * author: oz@nexus.yorku.ca
- * status: public domain.
- */
-#ifndef _SDBM_H_
-#define _SDBM_H_
-
-#include <stdio.h>
-
-#define DBLKSIZ 4096
-#define PBLKSIZ 1024
-#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
-#define SPLTMAX 10 /* maximum allowed splits */
- /* for a single insertion */
-#define DIRFEXT ".dir"
-#define PAGFEXT ".pag"
-
-typedef struct {
- int dirf; /* directory file descriptor */
- int pagf; /* page file descriptor */
- int flags; /* status/error flags, see below */
- int keyptr; /* current key for nextkey */
- off_t maxbno; /* size of dirfile in bits */
- long curbit; /* current bit number */
- long hmask; /* current hash mask */
- long blkptr; /* current block for nextkey */
- long blkno; /* current page to read/write */
- long pagbno; /* current page in pagbuf */
- char pagbuf[PBLKSIZ]; /* page file block buffer */
- long dirbno; /* current block in dirbuf */
- char dirbuf[DBLKSIZ]; /* directory file block buffer */
-} DBM;
-
-#define DBM_RDONLY 0x1 /* data base open read-only */
-#define DBM_IOERR 0x2 /* data base I/O error */
-
-/*
- * utility macros
- */
-#define sdbm_rdonly(db) ((db)->flags & DBM_RDONLY)
-#define sdbm_error(db) ((db)->flags & DBM_IOERR)
-
-#define sdbm_clearerr(db) ((db)->flags &= ~DBM_IOERR) /* ouch */
-
-#define sdbm_dirfno(db) ((db)->dirf)
-#define sdbm_pagfno(db) ((db)->pagf)
-
-typedef struct {
- char *dptr;
- int dsize;
-} datum;
-
-extern datum nullitem;
-
-#if defined(__STDC__)
-#define proto(p) p
-#else
-#define proto(p) ()
-#endif
-
-/*
- * flags to sdbm_store
- */
-#define DBM_INSERT 0
-#define DBM_REPLACE 1
-
-/*
- * ndbm interface
- */
-extern DBM *sdbm_open proto((char *, int, int));
-extern void sdbm_close proto((DBM *));
-extern datum sdbm_fetch proto((DBM *, datum));
-extern int sdbm_delete proto((DBM *, datum));
-extern int sdbm_store proto((DBM *, datum, datum, int));
-extern datum sdbm_firstkey proto((DBM *));
-extern datum sdbm_nextkey proto((DBM *));
-
-/*
- * other
- */
-extern DBM *sdbm_prep proto((char *, char *, int, int));
-extern long sdbm_hash proto((char *, int));
-
-#endif /* _SDBM_H_ */
diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h
index f0b977d79c..eb9eb8ae0e 100644
--- a/ext/socket/addrinfo.h
+++ b/ext/socket/addrinfo.h
@@ -129,14 +129,14 @@
#ifndef HAVE_TYPE_STRUCT_ADDRINFO
struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
- size_t ai_addrlen; /* length of ai_addr */
- char *ai_canonname; /* canonical name for hostname */
- struct sockaddr *ai_addr; /* binary address */
- struct addrinfo *ai_next; /* next structure in linked list */
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
};
#endif
@@ -158,18 +158,18 @@ struct addrinfo {
#endif
extern int getaddrinfo __P((
- const char *hostname, const char *servname,
- const struct addrinfo *hints,
- struct addrinfo **res));
+ const char *hostname, const char *servname,
+ const struct addrinfo *hints,
+ struct addrinfo **res));
extern int getnameinfo __P((
- const struct sockaddr *sa,
- socklen_t salen,
- char *host,
- socklen_t hostlen,
- char *serv,
- socklen_t servlen,
- int flags));
+ const struct sockaddr *sa,
+ socklen_t salen,
+ char *host,
+ socklen_t hostlen,
+ char *serv,
+ socklen_t servlen,
+ int flags));
extern void freehostent __P((struct hostent *));
extern void freeaddrinfo __P((struct addrinfo *));
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 84463af061..7406177de2 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -2,7 +2,6 @@
#include <time.h>
-int rsock_cmsg_cloexec_state = -1; /* <0: unknown, 0: ignored, >0: working */
static VALUE sym_wait_readable, sym_wait_writable;
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
@@ -89,9 +88,9 @@ ancillary_initialize(VALUE self, VALUE vfamily, VALUE vlevel, VALUE vtype, VALUE
static VALUE
ancdata_new(int family, int level, int type, VALUE data)
{
- NEWOBJ_OF(obj, struct RObject, rb_cAncillaryData, T_OBJECT);
+ VALUE obj = rb_obj_alloc(rb_cAncillaryData);
StringValue(data);
- ancillary_initialize((VALUE)obj, INT2NUM(family), INT2NUM(level), INT2NUM(type), data);
+ ancillary_initialize(obj, INT2NUM(family), INT2NUM(level), INT2NUM(type), data);
return (VALUE)obj;
}
@@ -334,11 +333,11 @@ ancillary_timestamp(VALUE self)
if (level == SOL_SOCKET && type == SCM_BINTIME &&
RSTRING_LEN(data) == sizeof(struct bintime)) {
struct bintime bt;
- VALUE d, timev;
+ VALUE d, timev;
memcpy((char*)&bt, RSTRING_PTR(data), sizeof(bt));
- d = ULL2NUM(0x100000000ULL);
- d = mul(d,d);
- timev = add(TIMET2NUM(bt.sec), quo(ULL2NUM(bt.frac), d));
+ d = ULL2NUM(0x100000000ULL);
+ d = mul(d,d);
+ timev = add(TIMET2NUM(bt.sec), quo(ULL2NUM(bt.frac), d));
result = rb_time_num_new(timev, Qnil);
}
# endif
@@ -698,7 +697,7 @@ anc_inspect_passcred_credentials(int level, int type, VALUE data, VALUE ret)
struct ucred cred;
memcpy(&cred, RSTRING_PTR(data), sizeof(struct ucred));
rb_str_catf(ret, " pid=%u uid=%u gid=%u", cred.pid, cred.uid, cred.gid);
- rb_str_cat2(ret, " (ucred)");
+ rb_str_cat2(ret, " (ucred)");
return 1;
}
else {
@@ -713,7 +712,7 @@ static int
anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret)
{
if (level != SOL_SOCKET && type != SCM_CREDS)
- return 0;
+ return 0;
/*
* FreeBSD has struct cmsgcred and struct sockcred.
@@ -728,46 +727,46 @@ anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret)
#if defined(HAVE_TYPE_STRUCT_CMSGCRED) /* FreeBSD */
if (RSTRING_LEN(data) == sizeof(struct cmsgcred)) {
- struct cmsgcred cred;
+ struct cmsgcred cred;
memcpy(&cred, RSTRING_PTR(data), sizeof(struct cmsgcred));
rb_str_catf(ret, " pid=%u", cred.cmcred_pid);
rb_str_catf(ret, " uid=%u", cred.cmcred_uid);
rb_str_catf(ret, " euid=%u", cred.cmcred_euid);
rb_str_catf(ret, " gid=%u", cred.cmcred_gid);
- if (cred.cmcred_ngroups) {
- int i;
- const char *sep = " groups=";
- for (i = 0; i < cred.cmcred_ngroups; i++) {
- rb_str_catf(ret, "%s%u", sep, cred.cmcred_groups[i]);
- sep = ",";
- }
- }
- rb_str_cat2(ret, " (cmsgcred)");
+ if (cred.cmcred_ngroups) {
+ int i;
+ const char *sep = " groups=";
+ for (i = 0; i < cred.cmcred_ngroups; i++) {
+ rb_str_catf(ret, "%s%u", sep, cred.cmcred_groups[i]);
+ sep = ",";
+ }
+ }
+ rb_str_cat2(ret, " (cmsgcred)");
return 1;
}
#endif
#if defined(HAVE_TYPE_STRUCT_SOCKCRED) /* FreeBSD, NetBSD */
if ((size_t)RSTRING_LEN(data) >= SOCKCREDSIZE(0)) {
- struct sockcred cred0, *cred;
+ struct sockcred cred0, *cred;
memcpy(&cred0, RSTRING_PTR(data), SOCKCREDSIZE(0));
- if ((size_t)RSTRING_LEN(data) == SOCKCREDSIZE(cred0.sc_ngroups)) {
- cred = (struct sockcred *)ALLOCA_N(char, SOCKCREDSIZE(cred0.sc_ngroups));
- memcpy(cred, RSTRING_PTR(data), SOCKCREDSIZE(cred0.sc_ngroups));
- rb_str_catf(ret, " uid=%u", cred->sc_uid);
- rb_str_catf(ret, " euid=%u", cred->sc_euid);
- rb_str_catf(ret, " gid=%u", cred->sc_gid);
- rb_str_catf(ret, " egid=%u", cred->sc_egid);
- if (cred0.sc_ngroups) {
- int i;
- const char *sep = " groups=";
- for (i = 0; i < cred0.sc_ngroups; i++) {
- rb_str_catf(ret, "%s%u", sep, cred->sc_groups[i]);
- sep = ",";
- }
- }
- rb_str_cat2(ret, " (sockcred)");
- return 1;
- }
+ if ((size_t)RSTRING_LEN(data) == SOCKCREDSIZE(cred0.sc_ngroups)) {
+ cred = (struct sockcred *)ALLOCA_N(char, SOCKCREDSIZE(cred0.sc_ngroups));
+ memcpy(cred, RSTRING_PTR(data), SOCKCREDSIZE(cred0.sc_ngroups));
+ rb_str_catf(ret, " uid=%u", cred->sc_uid);
+ rb_str_catf(ret, " euid=%u", cred->sc_euid);
+ rb_str_catf(ret, " gid=%u", cred->sc_gid);
+ rb_str_catf(ret, " egid=%u", cred->sc_egid);
+ if (cred0.sc_ngroups) {
+ int i;
+ const char *sep = " groups=";
+ for (i = 0; i < cred0.sc_ngroups; i++) {
+ rb_str_catf(ret, "%s%u", sep, cred->sc_groups[i]);
+ sep = ",";
+ }
+ }
+ rb_str_cat2(ret, " (sockcred)");
+ return 1;
+ }
}
#endif
return 0;
@@ -852,6 +851,12 @@ anc_inspect_ipv6_pktinfo(int level, int type, VALUE data, VALUE ret)
}
#endif
+#ifdef HAVE_GMTIME_R
+# define LOCALTIME(time, tm) localtime_r(&(time), &(tm))
+#else
+# define LOCALTIME(time, tm) ((tm) = *localtime(&(time)))
+#endif
+
#if defined(SCM_TIMESTAMP) /* GNU/Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, Solaris */
static int
inspect_timeval_as_abstime(int level, int optname, VALUE data, VALUE ret)
@@ -863,7 +868,7 @@ inspect_timeval_as_abstime(int level, int optname, VALUE data, VALUE ret)
char buf[32];
memcpy((char*)&tv, RSTRING_PTR(data), sizeof(tv));
time = tv.tv_sec;
- tm = *localtime(&time);
+ LOCALTIME(time, tm);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &tm);
rb_str_catf(ret, " %s.%06ld", buf, (long)tv.tv_usec);
return 1;
@@ -883,7 +888,7 @@ inspect_timespec_as_abstime(int level, int optname, VALUE data, VALUE ret)
struct tm tm;
char buf[32];
memcpy((char*)&ts, RSTRING_PTR(data), sizeof(ts));
- tm = *localtime(&ts.tv_sec);
+ LOCALTIME(ts.tv_sec, tm);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &tm);
rb_str_catf(ret, " %s.%09ld", buf, (long)ts.tv_nsec);
return 1;
@@ -901,37 +906,37 @@ inspect_bintime_as_abstime(int level, int optname, VALUE data, VALUE ret)
if (RSTRING_LEN(data) == sizeof(struct bintime)) {
struct bintime bt;
struct tm tm;
- uint64_t frac_h, frac_l;
- uint64_t scale_h, scale_l;
- uint64_t tmp1, tmp2;
- uint64_t res_h, res_l;
+ uint64_t frac_h, frac_l;
+ uint64_t scale_h, scale_l;
+ uint64_t tmp1, tmp2;
+ uint64_t res_h, res_l;
char buf[32];
memcpy((char*)&bt, RSTRING_PTR(data), sizeof(bt));
- tm = *localtime(&bt.sec);
+ LOCALTIME(bt.sec, tm);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &tm);
- /* res_h = frac * 10**19 / 2**64 */
+ /* res_h = frac * 10**19 / 2**64 */
- frac_h = bt.frac >> 32;
- frac_l = bt.frac & 0xffffffff;
+ frac_h = bt.frac >> 32;
+ frac_l = bt.frac & 0xffffffff;
- scale_h = 0x8ac72304; /* 0x8ac7230489e80000 == 10**19 */
- scale_l = 0x89e80000;
+ scale_h = 0x8ac72304; /* 0x8ac7230489e80000 == 10**19 */
+ scale_l = 0x89e80000;
- res_h = frac_h * scale_h;
- res_l = frac_l * scale_l;
+ res_h = frac_h * scale_h;
+ res_l = frac_l * scale_l;
- tmp1 = frac_h * scale_l;
- res_h += tmp1 >> 32;
- tmp2 = res_l;
- res_l += tmp1 & 0xffffffff;
- if (res_l < tmp2) res_h++;
+ tmp1 = frac_h * scale_l;
+ res_h += tmp1 >> 32;
+ tmp2 = res_l;
+ res_l += tmp1 & 0xffffffff;
+ if (res_l < tmp2) res_h++;
- tmp1 = frac_l * scale_h;
- res_h += tmp1 >> 32;
- tmp2 = res_l;
- res_l += tmp1 & 0xffffffff;
- if (res_l < tmp2) res_h++;
+ tmp1 = frac_l * scale_h;
+ res_h += tmp1 >> 32;
+ tmp2 = res_l;
+ res_l += tmp1 & 0xffffffff;
+ if (res_l < tmp2) res_h++;
rb_str_catf(ret, " %s.%019"PRIu64, buf, res_h);
return 1;
@@ -1131,8 +1136,8 @@ rb_sendmsg(int fd, const struct msghdr *msg, int flags)
static VALUE
bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
- VALUE dest_sockaddr, VALUE controls, VALUE ex,
- int nonblock)
+ VALUE dest_sockaddr, VALUE controls, VALUE ex,
+ int nonblock)
{
rb_io_t *fptr;
struct msghdr mh;
@@ -1155,15 +1160,15 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
tmp = rb_str_tmp_frozen_acquire(data);
if (!RB_TYPE_P(controls, T_ARRAY)) {
- controls = rb_ary_new();
+ controls = rb_ary_new();
}
controls_num = RARRAY_LENINT(controls);
if (controls_num) {
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- int i;
- size_t last_pad = 0;
- const VALUE *controls_ptr = RARRAY_CONST_PTR(controls);
+ int i;
+ size_t last_pad = 0;
+ const VALUE *controls_ptr = RARRAY_CONST_PTR(controls);
#if defined(__NetBSD__)
int last_level = 0;
int last_type = 0;
@@ -1210,9 +1215,9 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
last_level = cmh.cmsg_level;
last_type = cmh.cmsg_type;
#endif
- last_pad = cspace - cmh.cmsg_len;
+ last_pad = cspace - cmh.cmsg_len;
}
- if (last_pad) {
+ if (last_pad) {
/*
* This code removes the last padding from msg_controllen.
*
@@ -1237,10 +1242,10 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
if (last_level == SOL_SOCKET && last_type == SCM_RIGHTS)
rb_str_set_len(controls_str, RSTRING_LEN(controls_str)-last_pad);
#endif
- }
- RB_GC_GUARD(controls);
+ }
+ RB_GC_GUARD(controls);
#else
- rb_raise(rb_eNotImpError, "control message for sendmsg is unimplemented");
+ rb_raise(rb_eNotImpError, "control message for sendmsg is unimplemented");
#endif
}
@@ -1251,7 +1256,7 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
#endif
if (!NIL_P(dest_sockaddr))
- SockAddrStringValue(dest_sockaddr);
+ SockAddrStringValue(dest_sockaddr);
rb_io_check_closed(fptr);
@@ -1279,20 +1284,20 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
ss = rb_sendmsg(fptr->fd, &mh, flags);
if (ss == -1) {
- int e;
- if (!nonblock && rb_io_wait_writable(fptr->fd)) {
+ int e;
+ if (!nonblock && rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
rb_io_check_closed(fptr);
goto retry;
}
- e = errno;
- if (nonblock && (e == EWOULDBLOCK || e == EAGAIN)) {
- if (ex == Qfalse) {
- return sym_wait_writable;
- }
- rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
- "sendmsg(2) would block");
- }
- rb_syserr_fail(e, "sendmsg(2)");
+ e = errno;
+ if (nonblock && (e == EWOULDBLOCK || e == EAGAIN)) {
+ if (ex == Qfalse) {
+ return sym_wait_writable;
+ }
+ rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
+ "sendmsg(2) would block");
+ }
+ rb_syserr_fail(e, "sendmsg(2)");
}
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
RB_GC_GUARD(controls_str);
@@ -1306,20 +1311,20 @@ bsock_sendmsg_internal(VALUE sock, VALUE data, VALUE vflags,
#if defined(HAVE_SENDMSG)
VALUE
rsock_bsock_sendmsg(VALUE sock, VALUE data, VALUE flags, VALUE dest_sockaddr,
- VALUE controls)
+ VALUE controls)
{
return bsock_sendmsg_internal(sock, data, flags, dest_sockaddr, controls,
- Qtrue, 0);
+ Qtrue, 0);
}
#endif
#if defined(HAVE_SENDMSG)
VALUE
rsock_bsock_sendmsg_nonblock(VALUE sock, VALUE data, VALUE flags,
- VALUE dest_sockaddr, VALUE controls, VALUE ex)
+ VALUE dest_sockaddr, VALUE controls, VALUE ex)
{
return bsock_sendmsg_internal(sock, data, flags, dest_sockaddr,
- controls, ex, 1);
+ controls, ex, 1);
}
#endif
@@ -1417,22 +1422,19 @@ make_io_for_unix_rights(VALUE ctl, struct cmsghdr *cmh, char *msg_end)
{
if (cmh->cmsg_level == SOL_SOCKET && cmh->cmsg_type == SCM_RIGHTS) {
int *fdp, *end;
- VALUE ary = rb_ary_new();
- rb_ivar_set(ctl, rb_intern("unix_rights"), ary);
+ VALUE ary = rb_ary_new();
+ rb_ivar_set(ctl, rb_intern("unix_rights"), ary);
fdp = (int *)CMSG_DATA(cmh);
end = (int *)((char *)cmh + cmh->cmsg_len);
while ((char *)fdp + sizeof(int) <= (char *)end &&
- (char *)fdp + sizeof(int) <= msg_end) {
+ (char *)fdp + sizeof(int) <= msg_end) {
int fd = *fdp;
struct stat stbuf;
VALUE io;
if (fstat(fd, &stbuf) == -1)
rb_raise(rb_eSocket, "invalid fd in SCM_RIGHTS");
rb_update_max_fd(fd);
- if (rsock_cmsg_cloexec_state < 0)
- rsock_cmsg_cloexec_state = rsock_detect_cloexec(fd);
- if (rsock_cmsg_cloexec_state == 0 || fd <= 2)
- rb_maygvl_fd_fix_cloexec(fd);
+ rb_maygvl_fd_fix_cloexec(fd);
if (S_ISSOCK(stbuf.st_mode))
io = rsock_init_sock(rb_obj_alloc(rb_cSocket), fd);
else
@@ -1441,15 +1443,15 @@ make_io_for_unix_rights(VALUE ctl, struct cmsghdr *cmh, char *msg_end)
rb_ary_push(ary, io);
fdp++;
}
- OBJ_FREEZE(ary);
+ OBJ_FREEZE(ary);
}
}
#endif
static VALUE
bsock_recvmsg_internal(VALUE sock,
- VALUE vmaxdatlen, VALUE vflags, VALUE vmaxctllen,
- VALUE scm_rights, VALUE ex, int nonblock)
+ VALUE vmaxdatlen, VALUE vflags, VALUE vmaxctllen,
+ VALUE scm_rights, VALUE ex, int nonblock)
{
rb_io_t *fptr;
int grow_buffer;
@@ -1503,28 +1505,28 @@ bsock_recvmsg_internal(VALUE sock,
#if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
if (grow_buffer) {
- int socktype;
- socklen_t optlen = (socklen_t)sizeof(socktype);
+ int socktype;
+ socklen_t optlen = (socklen_t)sizeof(socktype);
if (getsockopt(fptr->fd, SOL_SOCKET, SO_TYPE, (void*)&socktype, &optlen) == -1) {
- rb_sys_fail("getsockopt(SO_TYPE)");
- }
- if (socktype == SOCK_STREAM)
- grow_buffer = 0;
+ rb_sys_fail("getsockopt(SO_TYPE)");
+ }
+ if (socktype == SOCK_STREAM)
+ grow_buffer = 0;
}
#endif
retry:
if (NIL_P(dat_str))
- dat_str = rb_str_tmp_new(maxdatlen);
+ dat_str = rb_str_tmp_new(maxdatlen);
else
- rb_str_resize(dat_str, maxdatlen);
+ rb_str_resize(dat_str, maxdatlen);
datbuf = RSTRING_PTR(dat_str);
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
if (NIL_P(ctl_str))
- ctl_str = rb_str_tmp_new(maxctllen);
+ ctl_str = rb_str_tmp_new(maxctllen);
else
- rb_str_resize(ctl_str, maxctllen);
+ rb_str_resize(ctl_str, maxctllen);
ctlbuf = RSTRING_PTR(ctl_str);
#endif
@@ -1554,20 +1556,20 @@ bsock_recvmsg_internal(VALUE sock,
ss = rb_recvmsg(fptr->fd, &mh, flags);
if (ss == -1) {
- int e;
- if (!nonblock && rb_io_wait_readable(fptr->fd)) {
+ int e;
+ if (!nonblock && rb_io_maybe_wait_readable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
rb_io_check_closed(fptr);
goto retry;
}
- e = errno;
- if (nonblock && (e == EWOULDBLOCK || e == EAGAIN)) {
+ e = errno;
+ if (nonblock && (e == EWOULDBLOCK || e == EAGAIN)) {
if (ex == Qfalse) {
return sym_wait_readable;
}
- rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE, e, "recvmsg(2) would block");
+ rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE, e, "recvmsg(2) would block");
}
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- if (!gc_done && (e == EMFILE || e == EMSGSIZE)) {
+ if (!gc_done && (e == EMFILE || e == EMSGSIZE)) {
/*
* When SCM_RIGHTS hit the file descriptors limit:
* - Linux 2.6.18 causes success with MSG_CTRUNC
@@ -1577,24 +1579,24 @@ bsock_recvmsg_internal(VALUE sock,
gc_and_retry:
rb_gc();
gc_done = 1;
- goto retry;
+ goto retry;
}
#else
- if (NIL_P(vmaxdatlen) && grow_buffer && e == EMSGSIZE)
- ss = (ssize_t)iov.iov_len;
- else
+ if (NIL_P(vmaxdatlen) && grow_buffer && e == EMSGSIZE)
+ ss = (ssize_t)iov.iov_len;
+ else
#endif
- rb_syserr_fail(e, "recvmsg(2)");
+ rb_syserr_fail(e, "recvmsg(2)");
}
if (grow_buffer) {
- int grown = 0;
- if (NIL_P(vmaxdatlen) && ss != -1 && ss == (ssize_t)iov.iov_len) {
+ int grown = 0;
+ if (NIL_P(vmaxdatlen) && ss != -1 && ss == (ssize_t)iov.iov_len) {
if (SIZE_MAX/2 < maxdatlen)
rb_raise(rb_eArgError, "max data length too big");
- maxdatlen *= 2;
- grown = 1;
- }
+ maxdatlen *= 2;
+ grown = 1;
+ }
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
if (NIL_P(vmaxctllen) && (mh.msg_flags & MSG_CTRUNC)) {
#define BIG_ENOUGH_SPACE 65536
@@ -1603,9 +1605,9 @@ bsock_recvmsg_internal(VALUE sock,
/* there are big space bug truncated.
* file descriptors limit? */
if (!gc_done) {
- rsock_discard_cmsg_resource(&mh, (flags & MSG_PEEK) != 0);
+ rsock_discard_cmsg_resource(&mh, (flags & MSG_PEEK) != 0);
goto gc_and_retry;
- }
+ }
}
else {
if (SIZE_MAX/2 < maxctllen)
@@ -1614,13 +1616,13 @@ bsock_recvmsg_internal(VALUE sock,
grown = 1;
}
#undef BIG_ENOUGH_SPACE
- }
+ }
#endif
- if (grown) {
+ if (grown) {
rsock_discard_cmsg_resource(&mh, (flags & MSG_PEEK) != 0);
- goto retry;
- }
- else {
+ goto retry;
+ }
+ else {
grow_buffer = 0;
if (flags != orig_flags) {
rsock_discard_cmsg_resource(&mh, (flags & MSG_PEEK) != 0);
@@ -1634,31 +1636,31 @@ bsock_recvmsg_internal(VALUE sock,
dat_str = rb_str_new(datbuf, ss);
else {
rb_str_resize(dat_str, ss);
- rb_obj_reveal(dat_str, rb_cString);
+ rb_obj_reveal(dat_str, rb_cString);
}
ret = rb_ary_new3(3, dat_str,
rsock_io_socket_addrinfo(sock, mh.msg_name, mh.msg_namelen),
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- INT2NUM(mh.msg_flags)
+ INT2NUM(mh.msg_flags)
#else
- Qnil
+ Qnil
#endif
- );
+ );
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
family = rsock_getfamily(fptr);
if (mh.msg_controllen) {
- char *msg_end = (char *)mh.msg_control + mh.msg_controllen;
+ char *msg_end = (char *)mh.msg_control + mh.msg_controllen;
for (cmh = CMSG_FIRSTHDR(&mh); cmh != NULL; cmh = CMSG_NXTHDR(&mh, cmh)) {
VALUE ctl;
- char *ctl_end;
+ char *ctl_end;
size_t clen;
if (cmh->cmsg_len == 0) {
rb_raise(rb_eTypeError, "invalid control message (cmsg_len == 0)");
}
ctl_end = (char*)cmh + cmh->cmsg_len;
- clen = (ctl_end <= msg_end ? ctl_end : msg_end) - (char*)CMSG_DATA(cmh);
+ clen = (ctl_end <= msg_end ? ctl_end : msg_end) - (char*)CMSG_DATA(cmh);
ctl = ancdata_new(family, cmh->cmsg_level, cmh->cmsg_type, rb_str_new((char*)CMSG_DATA(cmh), clen));
if (request_scm_rights)
make_io_for_unix_rights(ctl, cmh, msg_end);
@@ -1677,7 +1679,7 @@ bsock_recvmsg_internal(VALUE sock,
#if defined(HAVE_RECVMSG)
VALUE
rsock_bsock_recvmsg(VALUE sock, VALUE dlen, VALUE flags, VALUE clen,
- VALUE scm_rights)
+ VALUE scm_rights)
{
VALUE ex = Qtrue;
return bsock_recvmsg_internal(sock, dlen, flags, clen, scm_rights, ex, 0);
@@ -1687,7 +1689,7 @@ rsock_bsock_recvmsg(VALUE sock, VALUE dlen, VALUE flags, VALUE clen,
#if defined(HAVE_RECVMSG)
VALUE
rsock_bsock_recvmsg_nonblock(VALUE sock, VALUE dlen, VALUE flags, VALUE clen,
- VALUE scm_rights, VALUE ex)
+ VALUE scm_rights, VALUE ex)
{
return bsock_recvmsg_internal(sock, dlen, flags, clen, scm_rights, ex, 1);
}
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index fb5beed81a..54c369f6fc 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -10,6 +10,28 @@
#include "rubysocket.h"
+#ifdef _WIN32
+#define is_socket(fd) rb_w32_is_socket(fd)
+#else
+static int
+is_socket(int fd)
+{
+ struct stat sbuf;
+
+ if (fstat(fd, &sbuf) < 0)
+ rb_sys_fail("fstat(2)");
+ return S_ISSOCK(sbuf.st_mode);
+}
+#endif
+
+static void
+rsock_validate_descriptor(int descriptor)
+{
+ if (!is_socket(descriptor) || rb_reserved_fd_p(descriptor)) {
+ rb_syserr_fail(EBADF, "not a socket file descriptor");
+ }
+}
+
/*
* call-seq:
* BasicSocket.for_fd(fd) => basicsocket
@@ -22,10 +44,14 @@
*
*/
static VALUE
-bsock_s_for_fd(VALUE klass, VALUE fd)
+bsock_s_for_fd(VALUE klass, VALUE _descriptor)
{
rb_io_t *fptr;
- VALUE sock = rsock_init_sock(rb_obj_alloc(klass), NUM2INT(fd));
+
+ int descriptor = RB_NUM2INT(_descriptor);
+ rsock_validate_descriptor(descriptor);
+
+ VALUE sock = rsock_init_sock(rb_obj_alloc(klass), descriptor);
GetOpenFile(sock, fptr);
@@ -68,16 +94,16 @@ bsock_shutdown(int argc, VALUE *argv, VALUE sock)
rb_scan_args(argc, argv, "01", &howto);
if (howto == Qnil)
- how = SHUT_RDWR;
+ how = SHUT_RDWR;
else {
- how = rsock_shutdown_how_arg(howto);
+ how = rsock_shutdown_how_arg(howto);
if (how != SHUT_WR && how != SHUT_RD && how != SHUT_RDWR) {
- rb_raise(rb_eArgError, "`how' should be either :SHUT_RD, :SHUT_WR, :SHUT_RDWR");
- }
+ rb_raise(rb_eArgError, "`how' should be either :SHUT_RD, :SHUT_WR, :SHUT_RDWR");
+ }
}
GetOpenFile(sock, fptr);
if (shutdown(fptr->fd, how) == -1)
- rb_sys_fail("shutdown(2)");
+ rb_sys_fail("shutdown(2)");
return INT2FIX(0);
}
@@ -100,7 +126,7 @@ bsock_close_read(VALUE sock)
GetOpenFile(sock, fptr);
shutdown(fptr->fd, 0);
if (!(fptr->mode & FMODE_WRITABLE)) {
- return rb_io_close(sock);
+ return rb_io_close(sock);
}
fptr->mode &= ~FMODE_READABLE;
@@ -129,7 +155,7 @@ bsock_close_write(VALUE sock)
GetOpenFile(sock, fptr);
if (!(fptr->mode & FMODE_READABLE)) {
- return rb_io_close(sock);
+ return rb_io_close(sock);
}
shutdown(fptr->fd, 1);
fptr->mode &= ~FMODE_WRITABLE;
@@ -220,21 +246,21 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
switch (TYPE(val)) {
case T_FIXNUM:
- i = FIX2INT(val);
- goto numval;
+ i = FIX2INT(val);
+ goto numval;
case T_FALSE:
- i = 0;
- goto numval;
+ i = 0;
+ goto numval;
case T_TRUE:
- i = 1;
+ i = 1;
numval:
- v = (char*)&i; vlen = (int)sizeof(i);
- break;
+ v = (char*)&i; vlen = (int)sizeof(i);
+ break;
default:
- StringValue(val);
- v = RSTRING_PTR(val);
- vlen = RSTRING_SOCKLEN(val);
- break;
+ StringValue(val);
+ v = RSTRING_PTR(val);
+ vlen = RSTRING_SOCKLEN(val);
+ break;
}
rb_io_check_closed(fptr);
@@ -280,7 +306,7 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
* ipttl = sock.getsockopt(:IP, :TTL).int
*
* optval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL)
- * ipttl = optval.unpack("i")[0]
+ * ipttl = optval.unpack1("i")
*
* Option values may be structs. Decoding them can be complex as it involves
* examining your system headers to determine the correct definition. An
@@ -331,7 +357,7 @@ bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
rb_io_check_closed(fptr);
if (getsockopt(fptr->fd, level, option, buf, &len) < 0)
- rsock_sys_fail_path("getsockopt(2)", fptr->pathv);
+ rsock_sys_fail_path("getsockopt(2)", fptr->pathv);
return rsock_sockopt_new(family, level, option, rb_str_new(buf, len));
}
@@ -359,7 +385,7 @@ bsock_getsockname(VALUE sock)
GetOpenFile(sock, fptr);
if (getsockname(fptr->fd, &buf.addr, &len) < 0)
- rb_sys_fail("getsockname(2)");
+ rb_sys_fail("getsockname(2)");
if (len0 < len) len = len0;
return rb_str_new((char*)&buf, len);
}
@@ -390,7 +416,7 @@ bsock_getpeername(VALUE sock)
GetOpenFile(sock, fptr);
if (getpeername(fptr->fd, &buf.addr, &len) < 0)
- rb_sys_fail("getpeername(2)");
+ rb_sys_fail("getpeername(2)");
if (len0 < len) len = len0;
return rb_str_new((char*)&buf, len);
}
@@ -427,7 +453,7 @@ bsock_getpeereid(VALUE self)
gid_t egid;
GetOpenFile(self, fptr);
if (getpeereid(fptr->fd, &euid, &egid) == -1)
- rb_sys_fail("getpeereid(3)");
+ rb_sys_fail("getpeereid(3)");
return rb_assoc_new(UIDT2NUM(euid), GIDT2NUM(egid));
#elif defined(SO_PEERCRED) /* GNU/Linux */
rb_io_t *fptr;
@@ -435,7 +461,7 @@ bsock_getpeereid(VALUE self)
socklen_t len = sizeof(cred);
GetOpenFile(self, fptr);
if (getsockopt(fptr->fd, SOL_SOCKET, SO_PEERCRED, &cred, &len) == -1)
- rb_sys_fail("getsockopt(SO_PEERCRED)");
+ rb_sys_fail("getsockopt(SO_PEERCRED)");
return rb_assoc_new(UIDT2NUM(cred.uid), GIDT2NUM(cred.gid));
#elif defined(HAVE_GETPEERUCRED) /* Solaris */
rb_io_t *fptr;
@@ -443,7 +469,7 @@ bsock_getpeereid(VALUE self)
VALUE ret;
GetOpenFile(self, fptr);
if (getpeerucred(fptr->fd, &uc) == -1)
- rb_sys_fail("getpeerucred(3C)");
+ rb_sys_fail("getpeerucred(3C)");
ret = rb_assoc_new(UIDT2NUM(ucred_geteuid(uc)), GIDT2NUM(ucred_getegid(uc)));
ucred_free(uc);
return ret;
@@ -480,7 +506,7 @@ bsock_local_address(VALUE sock)
GetOpenFile(sock, fptr);
if (getsockname(fptr->fd, &buf.addr, &len) < 0)
- rb_sys_fail("getsockname(2)");
+ rb_sys_fail("getsockname(2)");
if (len0 < len) len = len0;
return rsock_fd_socket_addrinfo(fptr->fd, &buf.addr, len);
}
@@ -514,7 +540,7 @@ bsock_remote_address(VALUE sock)
GetOpenFile(sock, fptr);
if (getpeername(fptr->fd, &buf.addr, &len) < 0)
- rb_sys_fail("getpeername(2)");
+ rb_sys_fail("getpeername(2)");
if (len0 < len) len = len0;
return rsock_fd_socket_addrinfo(fptr->fd, &buf.addr, len);
}
@@ -537,12 +563,11 @@ bsock_remote_address(VALUE sock)
* }
*/
VALUE
-rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
+rsock_bsock_send(int argc, VALUE *argv, VALUE socket)
{
struct rsock_send_arg arg;
VALUE flags, to;
rb_io_t *fptr;
- ssize_t n;
rb_blocking_function_t *func;
const char *funcname;
@@ -550,28 +575,38 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
StringValue(arg.mesg);
if (!NIL_P(to)) {
- SockAddrStringValue(to);
- to = rb_str_new4(to);
- arg.to = (struct sockaddr *)RSTRING_PTR(to);
- arg.tolen = RSTRING_SOCKLEN(to);
- func = rsock_sendto_blocking;
- funcname = "sendto(2)";
+ SockAddrStringValue(to);
+ to = rb_str_new4(to);
+ arg.to = (struct sockaddr *)RSTRING_PTR(to);
+ arg.tolen = RSTRING_SOCKLEN(to);
+ func = rsock_sendto_blocking;
+ funcname = "sendto(2)";
}
else {
- func = rsock_send_blocking;
- funcname = "send(2)";
+ func = rsock_send_blocking;
+ funcname = "send(2)";
}
- GetOpenFile(sock, fptr);
+
+ RB_IO_POINTER(socket, fptr);
+
arg.fd = fptr->fd;
arg.flags = NUM2INT(flags);
- while (rsock_maybe_fd_writable(arg.fd),
- (n = (ssize_t)BLOCKING_REGION_FD(func, &arg)) < 0) {
- if (rb_io_wait_writable(arg.fd)) {
- continue;
- }
- rb_sys_fail(funcname);
+
+ while (true) {
+#ifdef RSOCK_WAIT_BEFORE_BLOCKING
+ rb_io_wait(socket, RB_INT2NUM(RUBY_IO_WRITABLE), Qnil);
+#endif
+
+ ssize_t n = (ssize_t)BLOCKING_REGION_FD(func, &arg);
+
+ if (n >= 0) return SSIZET2NUM(n);
+
+ if (rb_io_maybe_wait_writable(errno, socket, RUBY_IO_TIMEOUT_DEFAULT)) {
+ continue;
+ }
+
+ rb_sys_fail(funcname);
}
- return SSIZET2NUM(n);
}
/*
@@ -621,10 +656,10 @@ bsock_do_not_reverse_lookup_set(VALUE sock, VALUE state)
GetOpenFile(sock, fptr);
if (RTEST(state)) {
- fptr->mode |= FMODE_NOREVLOOKUP;
+ fptr->mode |= FMODE_NOREVLOOKUP;
}
else {
- fptr->mode &= ~FMODE_NOREVLOOKUP;
+ fptr->mode &= ~FMODE_NOREVLOOKUP;
}
return sock;
}
@@ -712,9 +747,9 @@ rsock_init_basicsocket(void)
rb_undef_method(rb_cBasicSocket, "initialize");
rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup",
- bsock_do_not_rev_lookup, 0);
+ bsock_do_not_rev_lookup, 0);
rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup=",
- bsock_do_not_rev_lookup_set, 1);
+ bsock_do_not_rev_lookup_set, 1);
rb_define_singleton_method(rb_cBasicSocket, "for_fd", bsock_s_for_fd, 1);
rb_define_method(rb_cBasicSocket, "close_read", bsock_close_read, 0);
@@ -735,23 +770,23 @@ rsock_init_basicsocket(void)
/* for ext/socket/lib/socket.rb use only: */
rb_define_private_method(rb_cBasicSocket,
- "__recv_nonblock", bsock_recv_nonblock, 4);
+ "__recv_nonblock", bsock_recv_nonblock, 4);
#if MSG_DONTWAIT_RELIABLE
rb_define_private_method(rb_cBasicSocket,
- "__read_nonblock", rsock_read_nonblock, 3);
+ "__read_nonblock", rsock_read_nonblock, 3);
rb_define_private_method(rb_cBasicSocket,
- "__write_nonblock", rsock_write_nonblock, 2);
+ "__write_nonblock", rsock_write_nonblock, 2);
#endif
/* in ancdata.c */
rb_define_private_method(rb_cBasicSocket, "__sendmsg",
- rsock_bsock_sendmsg, 4);
+ rsock_bsock_sendmsg, 4);
rb_define_private_method(rb_cBasicSocket, "__sendmsg_nonblock",
- rsock_bsock_sendmsg_nonblock, 5);
+ rsock_bsock_sendmsg_nonblock, 5);
rb_define_private_method(rb_cBasicSocket, "__recvmsg",
- rsock_bsock_recvmsg, 4);
+ rsock_bsock_recvmsg, 4);
rb_define_private_method(rb_cBasicSocket, "__recvmsg_nonblock",
- rsock_bsock_recvmsg_nonblock, 5);
+ rsock_bsock_recvmsg_nonblock, 5);
}
diff --git a/ext/socket/constants.c b/ext/socket/constants.c
index 1bbb53b173..1213f2ae17 100644
--- a/ext/socket/constants.c
+++ b/ext/socket/constants.c
@@ -26,14 +26,14 @@ constant_arg(VALUE arg, int (*str_to_int)(const char*, long, int*), const char *
goto str;
}
else if (!NIL_P(tmp = rb_check_string_type(arg))) {
- arg = tmp;
+ arg = tmp;
str:
ptr = RSTRING_PTR(arg);
if (str_to_int(ptr, RSTRING_LEN(arg), &ret) == -1)
- rb_raise(rb_eSocket, "%s: %s", errmsg, ptr);
+ rb_raise(rb_eSocket, "%s: %s", errmsg, ptr);
}
else {
- ret = NUM2INT(arg);
+ ret = NUM2INT(arg);
}
return ret;
}
diff --git a/ext/socket/depend b/ext/socket/depend
index e958b3dc5d..28c5540cd6 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -12,12 +12,170 @@ constdefs.c: constdefs.h
# AUTOGENERATED DEPENDENCIES START
ancdata.o: $(RUBY_EXTCONF_H)
ancdata.o: $(arch_hdrdir)/ruby/config.h
-ancdata.o: $(hdrdir)/ruby.h
ancdata.o: $(hdrdir)/ruby/assert.h
ancdata.o: $(hdrdir)/ruby/backward.h
+ancdata.o: $(hdrdir)/ruby/backward/2/assume.h
+ancdata.o: $(hdrdir)/ruby/backward/2/attributes.h
+ancdata.o: $(hdrdir)/ruby/backward/2/bool.h
+ancdata.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+ancdata.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ancdata.o: $(hdrdir)/ruby/backward/2/limits.h
+ancdata.o: $(hdrdir)/ruby/backward/2/long_long.h
+ancdata.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ancdata.o: $(hdrdir)/ruby/backward/2/stdarg.h
ancdata.o: $(hdrdir)/ruby/defines.h
ancdata.o: $(hdrdir)/ruby/encoding.h
+ancdata.o: $(hdrdir)/ruby/fiber/scheduler.h
ancdata.o: $(hdrdir)/ruby/intern.h
+ancdata.o: $(hdrdir)/ruby/internal/abi.h
+ancdata.o: $(hdrdir)/ruby/internal/anyargs.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ancdata.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ancdata.o: $(hdrdir)/ruby/internal/assume.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/cold.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/const.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/error.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/format.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/pure.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/warning.h
+ancdata.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ancdata.o: $(hdrdir)/ruby/internal/cast.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ancdata.o: $(hdrdir)/ruby/internal/compiler_since.h
+ancdata.o: $(hdrdir)/ruby/internal/config.h
+ancdata.o: $(hdrdir)/ruby/internal/constant_p.h
+ancdata.o: $(hdrdir)/ruby/internal/core.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rarray.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rclass.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rdata.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rfile.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rhash.h
+ancdata.o: $(hdrdir)/ruby/internal/core/robject.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rstring.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ancdata.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ancdata.o: $(hdrdir)/ruby/internal/ctype.h
+ancdata.o: $(hdrdir)/ruby/internal/dllexport.h
+ancdata.o: $(hdrdir)/ruby/internal/dosish.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/re.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/string.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ancdata.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ancdata.o: $(hdrdir)/ruby/internal/error.h
+ancdata.o: $(hdrdir)/ruby/internal/eval.h
+ancdata.o: $(hdrdir)/ruby/internal/event.h
+ancdata.o: $(hdrdir)/ruby/internal/fl_type.h
+ancdata.o: $(hdrdir)/ruby/internal/gc.h
+ancdata.o: $(hdrdir)/ruby/internal/glob.h
+ancdata.o: $(hdrdir)/ruby/internal/globals.h
+ancdata.o: $(hdrdir)/ruby/internal/has/attribute.h
+ancdata.o: $(hdrdir)/ruby/internal/has/builtin.h
+ancdata.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ancdata.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ancdata.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ancdata.o: $(hdrdir)/ruby/internal/has/extension.h
+ancdata.o: $(hdrdir)/ruby/internal/has/feature.h
+ancdata.o: $(hdrdir)/ruby/internal/has/warning.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/array.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/class.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/compar.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/complex.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/cont.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/dir.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/enum.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/error.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/eval.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/file.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/gc.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/hash.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/io.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/load.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/object.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/parse.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/proc.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/process.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/random.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/range.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/rational.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/re.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/select.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/signal.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/string.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/struct.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/thread.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/time.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/variable.h
+ancdata.o: $(hdrdir)/ruby/internal/intern/vm.h
+ancdata.o: $(hdrdir)/ruby/internal/interpreter.h
+ancdata.o: $(hdrdir)/ruby/internal/iterator.h
+ancdata.o: $(hdrdir)/ruby/internal/memory.h
+ancdata.o: $(hdrdir)/ruby/internal/method.h
+ancdata.o: $(hdrdir)/ruby/internal/module.h
+ancdata.o: $(hdrdir)/ruby/internal/newobj.h
+ancdata.o: $(hdrdir)/ruby/internal/rgengc.h
+ancdata.o: $(hdrdir)/ruby/internal/scan_args.h
+ancdata.o: $(hdrdir)/ruby/internal/special_consts.h
+ancdata.o: $(hdrdir)/ruby/internal/static_assert.h
+ancdata.o: $(hdrdir)/ruby/internal/stdalign.h
+ancdata.o: $(hdrdir)/ruby/internal/stdbool.h
+ancdata.o: $(hdrdir)/ruby/internal/symbol.h
+ancdata.o: $(hdrdir)/ruby/internal/value.h
+ancdata.o: $(hdrdir)/ruby/internal/value_type.h
+ancdata.o: $(hdrdir)/ruby/internal/variable.h
+ancdata.o: $(hdrdir)/ruby/internal/warning_push.h
+ancdata.o: $(hdrdir)/ruby/internal/xmalloc.h
ancdata.o: $(hdrdir)/ruby/io.h
ancdata.o: $(hdrdir)/ruby/missing.h
ancdata.o: $(hdrdir)/ruby/onigmo.h
@@ -28,18 +186,188 @@ ancdata.o: $(hdrdir)/ruby/subst.h
ancdata.o: $(hdrdir)/ruby/thread.h
ancdata.o: $(hdrdir)/ruby/util.h
ancdata.o: $(top_srcdir)/internal.h
+ancdata.o: $(top_srcdir)/internal/array.h
+ancdata.o: $(top_srcdir)/internal/compilers.h
+ancdata.o: $(top_srcdir)/internal/error.h
+ancdata.o: $(top_srcdir)/internal/gc.h
+ancdata.o: $(top_srcdir)/internal/io.h
+ancdata.o: $(top_srcdir)/internal/serial.h
+ancdata.o: $(top_srcdir)/internal/static_assert.h
+ancdata.o: $(top_srcdir)/internal/string.h
+ancdata.o: $(top_srcdir)/internal/thread.h
+ancdata.o: $(top_srcdir)/internal/vm.h
+ancdata.o: $(top_srcdir)/internal/warnings.h
+ancdata.o: $(top_srcdir)/shape.h
ancdata.o: ancdata.c
ancdata.o: constdefs.h
ancdata.o: rubysocket.h
ancdata.o: sockport.h
basicsocket.o: $(RUBY_EXTCONF_H)
basicsocket.o: $(arch_hdrdir)/ruby/config.h
-basicsocket.o: $(hdrdir)/ruby.h
basicsocket.o: $(hdrdir)/ruby/assert.h
basicsocket.o: $(hdrdir)/ruby/backward.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/assume.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/bool.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/limits.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+basicsocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
basicsocket.o: $(hdrdir)/ruby/defines.h
basicsocket.o: $(hdrdir)/ruby/encoding.h
+basicsocket.o: $(hdrdir)/ruby/fiber/scheduler.h
basicsocket.o: $(hdrdir)/ruby/intern.h
+basicsocket.o: $(hdrdir)/ruby/internal/abi.h
+basicsocket.o: $(hdrdir)/ruby/internal/anyargs.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+basicsocket.o: $(hdrdir)/ruby/internal/assume.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/const.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/error.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/format.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+basicsocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+basicsocket.o: $(hdrdir)/ruby/internal/cast.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+basicsocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+basicsocket.o: $(hdrdir)/ruby/internal/config.h
+basicsocket.o: $(hdrdir)/ruby/internal/constant_p.h
+basicsocket.o: $(hdrdir)/ruby/internal/core.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/robject.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+basicsocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+basicsocket.o: $(hdrdir)/ruby/internal/ctype.h
+basicsocket.o: $(hdrdir)/ruby/internal/dllexport.h
+basicsocket.o: $(hdrdir)/ruby/internal/dosish.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+basicsocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+basicsocket.o: $(hdrdir)/ruby/internal/error.h
+basicsocket.o: $(hdrdir)/ruby/internal/eval.h
+basicsocket.o: $(hdrdir)/ruby/internal/event.h
+basicsocket.o: $(hdrdir)/ruby/internal/fl_type.h
+basicsocket.o: $(hdrdir)/ruby/internal/gc.h
+basicsocket.o: $(hdrdir)/ruby/internal/glob.h
+basicsocket.o: $(hdrdir)/ruby/internal/globals.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/extension.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/feature.h
+basicsocket.o: $(hdrdir)/ruby/internal/has/warning.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/array.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/class.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/error.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/file.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/io.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/load.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/object.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/process.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/random.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/range.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/re.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/select.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/string.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/time.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+basicsocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+basicsocket.o: $(hdrdir)/ruby/internal/interpreter.h
+basicsocket.o: $(hdrdir)/ruby/internal/iterator.h
+basicsocket.o: $(hdrdir)/ruby/internal/memory.h
+basicsocket.o: $(hdrdir)/ruby/internal/method.h
+basicsocket.o: $(hdrdir)/ruby/internal/module.h
+basicsocket.o: $(hdrdir)/ruby/internal/newobj.h
+basicsocket.o: $(hdrdir)/ruby/internal/rgengc.h
+basicsocket.o: $(hdrdir)/ruby/internal/scan_args.h
+basicsocket.o: $(hdrdir)/ruby/internal/special_consts.h
+basicsocket.o: $(hdrdir)/ruby/internal/static_assert.h
+basicsocket.o: $(hdrdir)/ruby/internal/stdalign.h
+basicsocket.o: $(hdrdir)/ruby/internal/stdbool.h
+basicsocket.o: $(hdrdir)/ruby/internal/symbol.h
+basicsocket.o: $(hdrdir)/ruby/internal/value.h
+basicsocket.o: $(hdrdir)/ruby/internal/value_type.h
+basicsocket.o: $(hdrdir)/ruby/internal/variable.h
+basicsocket.o: $(hdrdir)/ruby/internal/warning_push.h
+basicsocket.o: $(hdrdir)/ruby/internal/xmalloc.h
basicsocket.o: $(hdrdir)/ruby/io.h
basicsocket.o: $(hdrdir)/ruby/missing.h
basicsocket.o: $(hdrdir)/ruby/onigmo.h
@@ -50,18 +378,188 @@ basicsocket.o: $(hdrdir)/ruby/subst.h
basicsocket.o: $(hdrdir)/ruby/thread.h
basicsocket.o: $(hdrdir)/ruby/util.h
basicsocket.o: $(top_srcdir)/internal.h
+basicsocket.o: $(top_srcdir)/internal/array.h
+basicsocket.o: $(top_srcdir)/internal/compilers.h
+basicsocket.o: $(top_srcdir)/internal/error.h
+basicsocket.o: $(top_srcdir)/internal/gc.h
+basicsocket.o: $(top_srcdir)/internal/io.h
+basicsocket.o: $(top_srcdir)/internal/serial.h
+basicsocket.o: $(top_srcdir)/internal/static_assert.h
+basicsocket.o: $(top_srcdir)/internal/string.h
+basicsocket.o: $(top_srcdir)/internal/thread.h
+basicsocket.o: $(top_srcdir)/internal/vm.h
+basicsocket.o: $(top_srcdir)/internal/warnings.h
+basicsocket.o: $(top_srcdir)/shape.h
basicsocket.o: basicsocket.c
basicsocket.o: constdefs.h
basicsocket.o: rubysocket.h
basicsocket.o: sockport.h
constants.o: $(RUBY_EXTCONF_H)
constants.o: $(arch_hdrdir)/ruby/config.h
-constants.o: $(hdrdir)/ruby.h
constants.o: $(hdrdir)/ruby/assert.h
constants.o: $(hdrdir)/ruby/backward.h
+constants.o: $(hdrdir)/ruby/backward/2/assume.h
+constants.o: $(hdrdir)/ruby/backward/2/attributes.h
+constants.o: $(hdrdir)/ruby/backward/2/bool.h
+constants.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+constants.o: $(hdrdir)/ruby/backward/2/inttypes.h
+constants.o: $(hdrdir)/ruby/backward/2/limits.h
+constants.o: $(hdrdir)/ruby/backward/2/long_long.h
+constants.o: $(hdrdir)/ruby/backward/2/stdalign.h
+constants.o: $(hdrdir)/ruby/backward/2/stdarg.h
constants.o: $(hdrdir)/ruby/defines.h
constants.o: $(hdrdir)/ruby/encoding.h
+constants.o: $(hdrdir)/ruby/fiber/scheduler.h
constants.o: $(hdrdir)/ruby/intern.h
+constants.o: $(hdrdir)/ruby/internal/abi.h
+constants.o: $(hdrdir)/ruby/internal/anyargs.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+constants.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+constants.o: $(hdrdir)/ruby/internal/assume.h
+constants.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+constants.o: $(hdrdir)/ruby/internal/attr/artificial.h
+constants.o: $(hdrdir)/ruby/internal/attr/cold.h
+constants.o: $(hdrdir)/ruby/internal/attr/const.h
+constants.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+constants.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+constants.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+constants.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+constants.o: $(hdrdir)/ruby/internal/attr/error.h
+constants.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+constants.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+constants.o: $(hdrdir)/ruby/internal/attr/format.h
+constants.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+constants.o: $(hdrdir)/ruby/internal/attr/noalias.h
+constants.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+constants.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+constants.o: $(hdrdir)/ruby/internal/attr/noinline.h
+constants.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+constants.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+constants.o: $(hdrdir)/ruby/internal/attr/pure.h
+constants.o: $(hdrdir)/ruby/internal/attr/restrict.h
+constants.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+constants.o: $(hdrdir)/ruby/internal/attr/warning.h
+constants.o: $(hdrdir)/ruby/internal/attr/weakref.h
+constants.o: $(hdrdir)/ruby/internal/cast.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+constants.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+constants.o: $(hdrdir)/ruby/internal/compiler_since.h
+constants.o: $(hdrdir)/ruby/internal/config.h
+constants.o: $(hdrdir)/ruby/internal/constant_p.h
+constants.o: $(hdrdir)/ruby/internal/core.h
+constants.o: $(hdrdir)/ruby/internal/core/rarray.h
+constants.o: $(hdrdir)/ruby/internal/core/rbasic.h
+constants.o: $(hdrdir)/ruby/internal/core/rbignum.h
+constants.o: $(hdrdir)/ruby/internal/core/rclass.h
+constants.o: $(hdrdir)/ruby/internal/core/rdata.h
+constants.o: $(hdrdir)/ruby/internal/core/rfile.h
+constants.o: $(hdrdir)/ruby/internal/core/rhash.h
+constants.o: $(hdrdir)/ruby/internal/core/robject.h
+constants.o: $(hdrdir)/ruby/internal/core/rregexp.h
+constants.o: $(hdrdir)/ruby/internal/core/rstring.h
+constants.o: $(hdrdir)/ruby/internal/core/rstruct.h
+constants.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+constants.o: $(hdrdir)/ruby/internal/ctype.h
+constants.o: $(hdrdir)/ruby/internal/dllexport.h
+constants.o: $(hdrdir)/ruby/internal/dosish.h
+constants.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+constants.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+constants.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+constants.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+constants.o: $(hdrdir)/ruby/internal/encoding/re.h
+constants.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+constants.o: $(hdrdir)/ruby/internal/encoding/string.h
+constants.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+constants.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+constants.o: $(hdrdir)/ruby/internal/error.h
+constants.o: $(hdrdir)/ruby/internal/eval.h
+constants.o: $(hdrdir)/ruby/internal/event.h
+constants.o: $(hdrdir)/ruby/internal/fl_type.h
+constants.o: $(hdrdir)/ruby/internal/gc.h
+constants.o: $(hdrdir)/ruby/internal/glob.h
+constants.o: $(hdrdir)/ruby/internal/globals.h
+constants.o: $(hdrdir)/ruby/internal/has/attribute.h
+constants.o: $(hdrdir)/ruby/internal/has/builtin.h
+constants.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+constants.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+constants.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+constants.o: $(hdrdir)/ruby/internal/has/extension.h
+constants.o: $(hdrdir)/ruby/internal/has/feature.h
+constants.o: $(hdrdir)/ruby/internal/has/warning.h
+constants.o: $(hdrdir)/ruby/internal/intern/array.h
+constants.o: $(hdrdir)/ruby/internal/intern/bignum.h
+constants.o: $(hdrdir)/ruby/internal/intern/class.h
+constants.o: $(hdrdir)/ruby/internal/intern/compar.h
+constants.o: $(hdrdir)/ruby/internal/intern/complex.h
+constants.o: $(hdrdir)/ruby/internal/intern/cont.h
+constants.o: $(hdrdir)/ruby/internal/intern/dir.h
+constants.o: $(hdrdir)/ruby/internal/intern/enum.h
+constants.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+constants.o: $(hdrdir)/ruby/internal/intern/error.h
+constants.o: $(hdrdir)/ruby/internal/intern/eval.h
+constants.o: $(hdrdir)/ruby/internal/intern/file.h
+constants.o: $(hdrdir)/ruby/internal/intern/gc.h
+constants.o: $(hdrdir)/ruby/internal/intern/hash.h
+constants.o: $(hdrdir)/ruby/internal/intern/io.h
+constants.o: $(hdrdir)/ruby/internal/intern/load.h
+constants.o: $(hdrdir)/ruby/internal/intern/marshal.h
+constants.o: $(hdrdir)/ruby/internal/intern/numeric.h
+constants.o: $(hdrdir)/ruby/internal/intern/object.h
+constants.o: $(hdrdir)/ruby/internal/intern/parse.h
+constants.o: $(hdrdir)/ruby/internal/intern/proc.h
+constants.o: $(hdrdir)/ruby/internal/intern/process.h
+constants.o: $(hdrdir)/ruby/internal/intern/random.h
+constants.o: $(hdrdir)/ruby/internal/intern/range.h
+constants.o: $(hdrdir)/ruby/internal/intern/rational.h
+constants.o: $(hdrdir)/ruby/internal/intern/re.h
+constants.o: $(hdrdir)/ruby/internal/intern/ruby.h
+constants.o: $(hdrdir)/ruby/internal/intern/select.h
+constants.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+constants.o: $(hdrdir)/ruby/internal/intern/signal.h
+constants.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+constants.o: $(hdrdir)/ruby/internal/intern/string.h
+constants.o: $(hdrdir)/ruby/internal/intern/struct.h
+constants.o: $(hdrdir)/ruby/internal/intern/thread.h
+constants.o: $(hdrdir)/ruby/internal/intern/time.h
+constants.o: $(hdrdir)/ruby/internal/intern/variable.h
+constants.o: $(hdrdir)/ruby/internal/intern/vm.h
+constants.o: $(hdrdir)/ruby/internal/interpreter.h
+constants.o: $(hdrdir)/ruby/internal/iterator.h
+constants.o: $(hdrdir)/ruby/internal/memory.h
+constants.o: $(hdrdir)/ruby/internal/method.h
+constants.o: $(hdrdir)/ruby/internal/module.h
+constants.o: $(hdrdir)/ruby/internal/newobj.h
+constants.o: $(hdrdir)/ruby/internal/rgengc.h
+constants.o: $(hdrdir)/ruby/internal/scan_args.h
+constants.o: $(hdrdir)/ruby/internal/special_consts.h
+constants.o: $(hdrdir)/ruby/internal/static_assert.h
+constants.o: $(hdrdir)/ruby/internal/stdalign.h
+constants.o: $(hdrdir)/ruby/internal/stdbool.h
+constants.o: $(hdrdir)/ruby/internal/symbol.h
+constants.o: $(hdrdir)/ruby/internal/value.h
+constants.o: $(hdrdir)/ruby/internal/value_type.h
+constants.o: $(hdrdir)/ruby/internal/variable.h
+constants.o: $(hdrdir)/ruby/internal/warning_push.h
+constants.o: $(hdrdir)/ruby/internal/xmalloc.h
constants.o: $(hdrdir)/ruby/io.h
constants.o: $(hdrdir)/ruby/missing.h
constants.o: $(hdrdir)/ruby/onigmo.h
@@ -72,6 +570,18 @@ constants.o: $(hdrdir)/ruby/subst.h
constants.o: $(hdrdir)/ruby/thread.h
constants.o: $(hdrdir)/ruby/util.h
constants.o: $(top_srcdir)/internal.h
+constants.o: $(top_srcdir)/internal/array.h
+constants.o: $(top_srcdir)/internal/compilers.h
+constants.o: $(top_srcdir)/internal/error.h
+constants.o: $(top_srcdir)/internal/gc.h
+constants.o: $(top_srcdir)/internal/io.h
+constants.o: $(top_srcdir)/internal/serial.h
+constants.o: $(top_srcdir)/internal/static_assert.h
+constants.o: $(top_srcdir)/internal/string.h
+constants.o: $(top_srcdir)/internal/thread.h
+constants.o: $(top_srcdir)/internal/vm.h
+constants.o: $(top_srcdir)/internal/warnings.h
+constants.o: $(top_srcdir)/shape.h
constants.o: constants.c
constants.o: constdefs.c
constants.o: constdefs.h
@@ -79,12 +589,170 @@ constants.o: rubysocket.h
constants.o: sockport.h
ifaddr.o: $(RUBY_EXTCONF_H)
ifaddr.o: $(arch_hdrdir)/ruby/config.h
-ifaddr.o: $(hdrdir)/ruby.h
ifaddr.o: $(hdrdir)/ruby/assert.h
ifaddr.o: $(hdrdir)/ruby/backward.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/assume.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/attributes.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/bool.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/limits.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/long_long.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ifaddr.o: $(hdrdir)/ruby/backward/2/stdarg.h
ifaddr.o: $(hdrdir)/ruby/defines.h
ifaddr.o: $(hdrdir)/ruby/encoding.h
+ifaddr.o: $(hdrdir)/ruby/fiber/scheduler.h
ifaddr.o: $(hdrdir)/ruby/intern.h
+ifaddr.o: $(hdrdir)/ruby/internal/abi.h
+ifaddr.o: $(hdrdir)/ruby/internal/anyargs.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ifaddr.o: $(hdrdir)/ruby/internal/assume.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/cold.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/const.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/error.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/format.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/pure.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/warning.h
+ifaddr.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ifaddr.o: $(hdrdir)/ruby/internal/cast.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ifaddr.o: $(hdrdir)/ruby/internal/compiler_since.h
+ifaddr.o: $(hdrdir)/ruby/internal/config.h
+ifaddr.o: $(hdrdir)/ruby/internal/constant_p.h
+ifaddr.o: $(hdrdir)/ruby/internal/core.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rarray.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rclass.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rdata.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rfile.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rhash.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/robject.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rstring.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ifaddr.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ifaddr.o: $(hdrdir)/ruby/internal/ctype.h
+ifaddr.o: $(hdrdir)/ruby/internal/dllexport.h
+ifaddr.o: $(hdrdir)/ruby/internal/dosish.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/re.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/string.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ifaddr.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ifaddr.o: $(hdrdir)/ruby/internal/error.h
+ifaddr.o: $(hdrdir)/ruby/internal/eval.h
+ifaddr.o: $(hdrdir)/ruby/internal/event.h
+ifaddr.o: $(hdrdir)/ruby/internal/fl_type.h
+ifaddr.o: $(hdrdir)/ruby/internal/gc.h
+ifaddr.o: $(hdrdir)/ruby/internal/glob.h
+ifaddr.o: $(hdrdir)/ruby/internal/globals.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/attribute.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/builtin.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/extension.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/feature.h
+ifaddr.o: $(hdrdir)/ruby/internal/has/warning.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/array.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/class.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/compar.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/complex.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/cont.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/dir.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/enum.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/error.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/eval.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/file.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/gc.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/hash.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/io.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/load.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/object.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/parse.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/proc.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/process.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/random.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/range.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/rational.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/re.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/select.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/signal.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/string.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/struct.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/thread.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/time.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/variable.h
+ifaddr.o: $(hdrdir)/ruby/internal/intern/vm.h
+ifaddr.o: $(hdrdir)/ruby/internal/interpreter.h
+ifaddr.o: $(hdrdir)/ruby/internal/iterator.h
+ifaddr.o: $(hdrdir)/ruby/internal/memory.h
+ifaddr.o: $(hdrdir)/ruby/internal/method.h
+ifaddr.o: $(hdrdir)/ruby/internal/module.h
+ifaddr.o: $(hdrdir)/ruby/internal/newobj.h
+ifaddr.o: $(hdrdir)/ruby/internal/rgengc.h
+ifaddr.o: $(hdrdir)/ruby/internal/scan_args.h
+ifaddr.o: $(hdrdir)/ruby/internal/special_consts.h
+ifaddr.o: $(hdrdir)/ruby/internal/static_assert.h
+ifaddr.o: $(hdrdir)/ruby/internal/stdalign.h
+ifaddr.o: $(hdrdir)/ruby/internal/stdbool.h
+ifaddr.o: $(hdrdir)/ruby/internal/symbol.h
+ifaddr.o: $(hdrdir)/ruby/internal/value.h
+ifaddr.o: $(hdrdir)/ruby/internal/value_type.h
+ifaddr.o: $(hdrdir)/ruby/internal/variable.h
+ifaddr.o: $(hdrdir)/ruby/internal/warning_push.h
+ifaddr.o: $(hdrdir)/ruby/internal/xmalloc.h
ifaddr.o: $(hdrdir)/ruby/io.h
ifaddr.o: $(hdrdir)/ruby/missing.h
ifaddr.o: $(hdrdir)/ruby/onigmo.h
@@ -95,18 +763,188 @@ ifaddr.o: $(hdrdir)/ruby/subst.h
ifaddr.o: $(hdrdir)/ruby/thread.h
ifaddr.o: $(hdrdir)/ruby/util.h
ifaddr.o: $(top_srcdir)/internal.h
+ifaddr.o: $(top_srcdir)/internal/array.h
+ifaddr.o: $(top_srcdir)/internal/compilers.h
+ifaddr.o: $(top_srcdir)/internal/error.h
+ifaddr.o: $(top_srcdir)/internal/gc.h
+ifaddr.o: $(top_srcdir)/internal/io.h
+ifaddr.o: $(top_srcdir)/internal/serial.h
+ifaddr.o: $(top_srcdir)/internal/static_assert.h
+ifaddr.o: $(top_srcdir)/internal/string.h
+ifaddr.o: $(top_srcdir)/internal/thread.h
+ifaddr.o: $(top_srcdir)/internal/vm.h
+ifaddr.o: $(top_srcdir)/internal/warnings.h
+ifaddr.o: $(top_srcdir)/shape.h
ifaddr.o: constdefs.h
ifaddr.o: ifaddr.c
ifaddr.o: rubysocket.h
ifaddr.o: sockport.h
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
-init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
init.o: $(hdrdir)/ruby/encoding.h
+init.o: $(hdrdir)/ruby/fiber/scheduler.h
init.o: $(hdrdir)/ruby/intern.h
+init.o: $(hdrdir)/ruby/internal/abi.h
+init.o: $(hdrdir)/ruby/internal/anyargs.h
+init.o: $(hdrdir)/ruby/internal/arithmetic.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+init.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+init.o: $(hdrdir)/ruby/internal/assume.h
+init.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+init.o: $(hdrdir)/ruby/internal/attr/artificial.h
+init.o: $(hdrdir)/ruby/internal/attr/cold.h
+init.o: $(hdrdir)/ruby/internal/attr/const.h
+init.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+init.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+init.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+init.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+init.o: $(hdrdir)/ruby/internal/attr/error.h
+init.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+init.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+init.o: $(hdrdir)/ruby/internal/attr/format.h
+init.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+init.o: $(hdrdir)/ruby/internal/attr/noalias.h
+init.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+init.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+init.o: $(hdrdir)/ruby/internal/attr/noinline.h
+init.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+init.o: $(hdrdir)/ruby/internal/attr/pure.h
+init.o: $(hdrdir)/ruby/internal/attr/restrict.h
+init.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+init.o: $(hdrdir)/ruby/internal/attr/warning.h
+init.o: $(hdrdir)/ruby/internal/attr/weakref.h
+init.o: $(hdrdir)/ruby/internal/cast.h
+init.o: $(hdrdir)/ruby/internal/compiler_is.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+init.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+init.o: $(hdrdir)/ruby/internal/compiler_since.h
+init.o: $(hdrdir)/ruby/internal/config.h
+init.o: $(hdrdir)/ruby/internal/constant_p.h
+init.o: $(hdrdir)/ruby/internal/core.h
+init.o: $(hdrdir)/ruby/internal/core/rarray.h
+init.o: $(hdrdir)/ruby/internal/core/rbasic.h
+init.o: $(hdrdir)/ruby/internal/core/rbignum.h
+init.o: $(hdrdir)/ruby/internal/core/rclass.h
+init.o: $(hdrdir)/ruby/internal/core/rdata.h
+init.o: $(hdrdir)/ruby/internal/core/rfile.h
+init.o: $(hdrdir)/ruby/internal/core/rhash.h
+init.o: $(hdrdir)/ruby/internal/core/robject.h
+init.o: $(hdrdir)/ruby/internal/core/rregexp.h
+init.o: $(hdrdir)/ruby/internal/core/rstring.h
+init.o: $(hdrdir)/ruby/internal/core/rstruct.h
+init.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+init.o: $(hdrdir)/ruby/internal/ctype.h
+init.o: $(hdrdir)/ruby/internal/dllexport.h
+init.o: $(hdrdir)/ruby/internal/dosish.h
+init.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+init.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+init.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+init.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+init.o: $(hdrdir)/ruby/internal/encoding/re.h
+init.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+init.o: $(hdrdir)/ruby/internal/encoding/string.h
+init.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+init.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+init.o: $(hdrdir)/ruby/internal/error.h
+init.o: $(hdrdir)/ruby/internal/eval.h
+init.o: $(hdrdir)/ruby/internal/event.h
+init.o: $(hdrdir)/ruby/internal/fl_type.h
+init.o: $(hdrdir)/ruby/internal/gc.h
+init.o: $(hdrdir)/ruby/internal/glob.h
+init.o: $(hdrdir)/ruby/internal/globals.h
+init.o: $(hdrdir)/ruby/internal/has/attribute.h
+init.o: $(hdrdir)/ruby/internal/has/builtin.h
+init.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+init.o: $(hdrdir)/ruby/internal/has/extension.h
+init.o: $(hdrdir)/ruby/internal/has/feature.h
+init.o: $(hdrdir)/ruby/internal/has/warning.h
+init.o: $(hdrdir)/ruby/internal/intern/array.h
+init.o: $(hdrdir)/ruby/internal/intern/bignum.h
+init.o: $(hdrdir)/ruby/internal/intern/class.h
+init.o: $(hdrdir)/ruby/internal/intern/compar.h
+init.o: $(hdrdir)/ruby/internal/intern/complex.h
+init.o: $(hdrdir)/ruby/internal/intern/cont.h
+init.o: $(hdrdir)/ruby/internal/intern/dir.h
+init.o: $(hdrdir)/ruby/internal/intern/enum.h
+init.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+init.o: $(hdrdir)/ruby/internal/intern/error.h
+init.o: $(hdrdir)/ruby/internal/intern/eval.h
+init.o: $(hdrdir)/ruby/internal/intern/file.h
+init.o: $(hdrdir)/ruby/internal/intern/gc.h
+init.o: $(hdrdir)/ruby/internal/intern/hash.h
+init.o: $(hdrdir)/ruby/internal/intern/io.h
+init.o: $(hdrdir)/ruby/internal/intern/load.h
+init.o: $(hdrdir)/ruby/internal/intern/marshal.h
+init.o: $(hdrdir)/ruby/internal/intern/numeric.h
+init.o: $(hdrdir)/ruby/internal/intern/object.h
+init.o: $(hdrdir)/ruby/internal/intern/parse.h
+init.o: $(hdrdir)/ruby/internal/intern/proc.h
+init.o: $(hdrdir)/ruby/internal/intern/process.h
+init.o: $(hdrdir)/ruby/internal/intern/random.h
+init.o: $(hdrdir)/ruby/internal/intern/range.h
+init.o: $(hdrdir)/ruby/internal/intern/rational.h
+init.o: $(hdrdir)/ruby/internal/intern/re.h
+init.o: $(hdrdir)/ruby/internal/intern/ruby.h
+init.o: $(hdrdir)/ruby/internal/intern/select.h
+init.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+init.o: $(hdrdir)/ruby/internal/intern/signal.h
+init.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+init.o: $(hdrdir)/ruby/internal/intern/string.h
+init.o: $(hdrdir)/ruby/internal/intern/struct.h
+init.o: $(hdrdir)/ruby/internal/intern/thread.h
+init.o: $(hdrdir)/ruby/internal/intern/time.h
+init.o: $(hdrdir)/ruby/internal/intern/variable.h
+init.o: $(hdrdir)/ruby/internal/intern/vm.h
+init.o: $(hdrdir)/ruby/internal/interpreter.h
+init.o: $(hdrdir)/ruby/internal/iterator.h
+init.o: $(hdrdir)/ruby/internal/memory.h
+init.o: $(hdrdir)/ruby/internal/method.h
+init.o: $(hdrdir)/ruby/internal/module.h
+init.o: $(hdrdir)/ruby/internal/newobj.h
+init.o: $(hdrdir)/ruby/internal/rgengc.h
+init.o: $(hdrdir)/ruby/internal/scan_args.h
+init.o: $(hdrdir)/ruby/internal/special_consts.h
+init.o: $(hdrdir)/ruby/internal/static_assert.h
+init.o: $(hdrdir)/ruby/internal/stdalign.h
+init.o: $(hdrdir)/ruby/internal/stdbool.h
+init.o: $(hdrdir)/ruby/internal/symbol.h
+init.o: $(hdrdir)/ruby/internal/value.h
+init.o: $(hdrdir)/ruby/internal/value_type.h
+init.o: $(hdrdir)/ruby/internal/variable.h
+init.o: $(hdrdir)/ruby/internal/warning_push.h
+init.o: $(hdrdir)/ruby/internal/xmalloc.h
init.o: $(hdrdir)/ruby/io.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/onigmo.h
@@ -117,18 +955,188 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: $(hdrdir)/ruby/thread.h
init.o: $(hdrdir)/ruby/util.h
init.o: $(top_srcdir)/internal.h
+init.o: $(top_srcdir)/internal/array.h
+init.o: $(top_srcdir)/internal/compilers.h
+init.o: $(top_srcdir)/internal/error.h
+init.o: $(top_srcdir)/internal/gc.h
+init.o: $(top_srcdir)/internal/io.h
+init.o: $(top_srcdir)/internal/serial.h
+init.o: $(top_srcdir)/internal/static_assert.h
+init.o: $(top_srcdir)/internal/string.h
+init.o: $(top_srcdir)/internal/thread.h
+init.o: $(top_srcdir)/internal/vm.h
+init.o: $(top_srcdir)/internal/warnings.h
+init.o: $(top_srcdir)/shape.h
init.o: constdefs.h
init.o: init.c
init.o: rubysocket.h
init.o: sockport.h
ipsocket.o: $(RUBY_EXTCONF_H)
ipsocket.o: $(arch_hdrdir)/ruby/config.h
-ipsocket.o: $(hdrdir)/ruby.h
ipsocket.o: $(hdrdir)/ruby/assert.h
ipsocket.o: $(hdrdir)/ruby/backward.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/assume.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/bool.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/limits.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+ipsocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
ipsocket.o: $(hdrdir)/ruby/defines.h
ipsocket.o: $(hdrdir)/ruby/encoding.h
+ipsocket.o: $(hdrdir)/ruby/fiber/scheduler.h
ipsocket.o: $(hdrdir)/ruby/intern.h
+ipsocket.o: $(hdrdir)/ruby/internal/abi.h
+ipsocket.o: $(hdrdir)/ruby/internal/anyargs.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+ipsocket.o: $(hdrdir)/ruby/internal/assume.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/const.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/error.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/format.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+ipsocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+ipsocket.o: $(hdrdir)/ruby/internal/cast.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+ipsocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+ipsocket.o: $(hdrdir)/ruby/internal/config.h
+ipsocket.o: $(hdrdir)/ruby/internal/constant_p.h
+ipsocket.o: $(hdrdir)/ruby/internal/core.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/robject.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+ipsocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+ipsocket.o: $(hdrdir)/ruby/internal/ctype.h
+ipsocket.o: $(hdrdir)/ruby/internal/dllexport.h
+ipsocket.o: $(hdrdir)/ruby/internal/dosish.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+ipsocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+ipsocket.o: $(hdrdir)/ruby/internal/error.h
+ipsocket.o: $(hdrdir)/ruby/internal/eval.h
+ipsocket.o: $(hdrdir)/ruby/internal/event.h
+ipsocket.o: $(hdrdir)/ruby/internal/fl_type.h
+ipsocket.o: $(hdrdir)/ruby/internal/gc.h
+ipsocket.o: $(hdrdir)/ruby/internal/glob.h
+ipsocket.o: $(hdrdir)/ruby/internal/globals.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/extension.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/feature.h
+ipsocket.o: $(hdrdir)/ruby/internal/has/warning.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/array.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/class.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/error.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/file.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/io.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/load.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/object.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/process.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/random.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/range.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/re.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/select.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/string.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/time.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+ipsocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+ipsocket.o: $(hdrdir)/ruby/internal/interpreter.h
+ipsocket.o: $(hdrdir)/ruby/internal/iterator.h
+ipsocket.o: $(hdrdir)/ruby/internal/memory.h
+ipsocket.o: $(hdrdir)/ruby/internal/method.h
+ipsocket.o: $(hdrdir)/ruby/internal/module.h
+ipsocket.o: $(hdrdir)/ruby/internal/newobj.h
+ipsocket.o: $(hdrdir)/ruby/internal/rgengc.h
+ipsocket.o: $(hdrdir)/ruby/internal/scan_args.h
+ipsocket.o: $(hdrdir)/ruby/internal/special_consts.h
+ipsocket.o: $(hdrdir)/ruby/internal/static_assert.h
+ipsocket.o: $(hdrdir)/ruby/internal/stdalign.h
+ipsocket.o: $(hdrdir)/ruby/internal/stdbool.h
+ipsocket.o: $(hdrdir)/ruby/internal/symbol.h
+ipsocket.o: $(hdrdir)/ruby/internal/value.h
+ipsocket.o: $(hdrdir)/ruby/internal/value_type.h
+ipsocket.o: $(hdrdir)/ruby/internal/variable.h
+ipsocket.o: $(hdrdir)/ruby/internal/warning_push.h
+ipsocket.o: $(hdrdir)/ruby/internal/xmalloc.h
ipsocket.o: $(hdrdir)/ruby/io.h
ipsocket.o: $(hdrdir)/ruby/missing.h
ipsocket.o: $(hdrdir)/ruby/onigmo.h
@@ -139,18 +1147,188 @@ ipsocket.o: $(hdrdir)/ruby/subst.h
ipsocket.o: $(hdrdir)/ruby/thread.h
ipsocket.o: $(hdrdir)/ruby/util.h
ipsocket.o: $(top_srcdir)/internal.h
+ipsocket.o: $(top_srcdir)/internal/array.h
+ipsocket.o: $(top_srcdir)/internal/compilers.h
+ipsocket.o: $(top_srcdir)/internal/error.h
+ipsocket.o: $(top_srcdir)/internal/gc.h
+ipsocket.o: $(top_srcdir)/internal/io.h
+ipsocket.o: $(top_srcdir)/internal/serial.h
+ipsocket.o: $(top_srcdir)/internal/static_assert.h
+ipsocket.o: $(top_srcdir)/internal/string.h
+ipsocket.o: $(top_srcdir)/internal/thread.h
+ipsocket.o: $(top_srcdir)/internal/vm.h
+ipsocket.o: $(top_srcdir)/internal/warnings.h
+ipsocket.o: $(top_srcdir)/shape.h
ipsocket.o: constdefs.h
ipsocket.o: ipsocket.c
ipsocket.o: rubysocket.h
ipsocket.o: sockport.h
option.o: $(RUBY_EXTCONF_H)
option.o: $(arch_hdrdir)/ruby/config.h
-option.o: $(hdrdir)/ruby.h
option.o: $(hdrdir)/ruby/assert.h
option.o: $(hdrdir)/ruby/backward.h
+option.o: $(hdrdir)/ruby/backward/2/assume.h
+option.o: $(hdrdir)/ruby/backward/2/attributes.h
+option.o: $(hdrdir)/ruby/backward/2/bool.h
+option.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+option.o: $(hdrdir)/ruby/backward/2/inttypes.h
+option.o: $(hdrdir)/ruby/backward/2/limits.h
+option.o: $(hdrdir)/ruby/backward/2/long_long.h
+option.o: $(hdrdir)/ruby/backward/2/stdalign.h
+option.o: $(hdrdir)/ruby/backward/2/stdarg.h
option.o: $(hdrdir)/ruby/defines.h
option.o: $(hdrdir)/ruby/encoding.h
+option.o: $(hdrdir)/ruby/fiber/scheduler.h
option.o: $(hdrdir)/ruby/intern.h
+option.o: $(hdrdir)/ruby/internal/abi.h
+option.o: $(hdrdir)/ruby/internal/anyargs.h
+option.o: $(hdrdir)/ruby/internal/arithmetic.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+option.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+option.o: $(hdrdir)/ruby/internal/assume.h
+option.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+option.o: $(hdrdir)/ruby/internal/attr/artificial.h
+option.o: $(hdrdir)/ruby/internal/attr/cold.h
+option.o: $(hdrdir)/ruby/internal/attr/const.h
+option.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+option.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+option.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+option.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+option.o: $(hdrdir)/ruby/internal/attr/error.h
+option.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+option.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+option.o: $(hdrdir)/ruby/internal/attr/format.h
+option.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+option.o: $(hdrdir)/ruby/internal/attr/noalias.h
+option.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+option.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+option.o: $(hdrdir)/ruby/internal/attr/noinline.h
+option.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+option.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+option.o: $(hdrdir)/ruby/internal/attr/pure.h
+option.o: $(hdrdir)/ruby/internal/attr/restrict.h
+option.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+option.o: $(hdrdir)/ruby/internal/attr/warning.h
+option.o: $(hdrdir)/ruby/internal/attr/weakref.h
+option.o: $(hdrdir)/ruby/internal/cast.h
+option.o: $(hdrdir)/ruby/internal/compiler_is.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+option.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+option.o: $(hdrdir)/ruby/internal/compiler_since.h
+option.o: $(hdrdir)/ruby/internal/config.h
+option.o: $(hdrdir)/ruby/internal/constant_p.h
+option.o: $(hdrdir)/ruby/internal/core.h
+option.o: $(hdrdir)/ruby/internal/core/rarray.h
+option.o: $(hdrdir)/ruby/internal/core/rbasic.h
+option.o: $(hdrdir)/ruby/internal/core/rbignum.h
+option.o: $(hdrdir)/ruby/internal/core/rclass.h
+option.o: $(hdrdir)/ruby/internal/core/rdata.h
+option.o: $(hdrdir)/ruby/internal/core/rfile.h
+option.o: $(hdrdir)/ruby/internal/core/rhash.h
+option.o: $(hdrdir)/ruby/internal/core/robject.h
+option.o: $(hdrdir)/ruby/internal/core/rregexp.h
+option.o: $(hdrdir)/ruby/internal/core/rstring.h
+option.o: $(hdrdir)/ruby/internal/core/rstruct.h
+option.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+option.o: $(hdrdir)/ruby/internal/ctype.h
+option.o: $(hdrdir)/ruby/internal/dllexport.h
+option.o: $(hdrdir)/ruby/internal/dosish.h
+option.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+option.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+option.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+option.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+option.o: $(hdrdir)/ruby/internal/encoding/re.h
+option.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+option.o: $(hdrdir)/ruby/internal/encoding/string.h
+option.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+option.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+option.o: $(hdrdir)/ruby/internal/error.h
+option.o: $(hdrdir)/ruby/internal/eval.h
+option.o: $(hdrdir)/ruby/internal/event.h
+option.o: $(hdrdir)/ruby/internal/fl_type.h
+option.o: $(hdrdir)/ruby/internal/gc.h
+option.o: $(hdrdir)/ruby/internal/glob.h
+option.o: $(hdrdir)/ruby/internal/globals.h
+option.o: $(hdrdir)/ruby/internal/has/attribute.h
+option.o: $(hdrdir)/ruby/internal/has/builtin.h
+option.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+option.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+option.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+option.o: $(hdrdir)/ruby/internal/has/extension.h
+option.o: $(hdrdir)/ruby/internal/has/feature.h
+option.o: $(hdrdir)/ruby/internal/has/warning.h
+option.o: $(hdrdir)/ruby/internal/intern/array.h
+option.o: $(hdrdir)/ruby/internal/intern/bignum.h
+option.o: $(hdrdir)/ruby/internal/intern/class.h
+option.o: $(hdrdir)/ruby/internal/intern/compar.h
+option.o: $(hdrdir)/ruby/internal/intern/complex.h
+option.o: $(hdrdir)/ruby/internal/intern/cont.h
+option.o: $(hdrdir)/ruby/internal/intern/dir.h
+option.o: $(hdrdir)/ruby/internal/intern/enum.h
+option.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+option.o: $(hdrdir)/ruby/internal/intern/error.h
+option.o: $(hdrdir)/ruby/internal/intern/eval.h
+option.o: $(hdrdir)/ruby/internal/intern/file.h
+option.o: $(hdrdir)/ruby/internal/intern/gc.h
+option.o: $(hdrdir)/ruby/internal/intern/hash.h
+option.o: $(hdrdir)/ruby/internal/intern/io.h
+option.o: $(hdrdir)/ruby/internal/intern/load.h
+option.o: $(hdrdir)/ruby/internal/intern/marshal.h
+option.o: $(hdrdir)/ruby/internal/intern/numeric.h
+option.o: $(hdrdir)/ruby/internal/intern/object.h
+option.o: $(hdrdir)/ruby/internal/intern/parse.h
+option.o: $(hdrdir)/ruby/internal/intern/proc.h
+option.o: $(hdrdir)/ruby/internal/intern/process.h
+option.o: $(hdrdir)/ruby/internal/intern/random.h
+option.o: $(hdrdir)/ruby/internal/intern/range.h
+option.o: $(hdrdir)/ruby/internal/intern/rational.h
+option.o: $(hdrdir)/ruby/internal/intern/re.h
+option.o: $(hdrdir)/ruby/internal/intern/ruby.h
+option.o: $(hdrdir)/ruby/internal/intern/select.h
+option.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+option.o: $(hdrdir)/ruby/internal/intern/signal.h
+option.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+option.o: $(hdrdir)/ruby/internal/intern/string.h
+option.o: $(hdrdir)/ruby/internal/intern/struct.h
+option.o: $(hdrdir)/ruby/internal/intern/thread.h
+option.o: $(hdrdir)/ruby/internal/intern/time.h
+option.o: $(hdrdir)/ruby/internal/intern/variable.h
+option.o: $(hdrdir)/ruby/internal/intern/vm.h
+option.o: $(hdrdir)/ruby/internal/interpreter.h
+option.o: $(hdrdir)/ruby/internal/iterator.h
+option.o: $(hdrdir)/ruby/internal/memory.h
+option.o: $(hdrdir)/ruby/internal/method.h
+option.o: $(hdrdir)/ruby/internal/module.h
+option.o: $(hdrdir)/ruby/internal/newobj.h
+option.o: $(hdrdir)/ruby/internal/rgengc.h
+option.o: $(hdrdir)/ruby/internal/scan_args.h
+option.o: $(hdrdir)/ruby/internal/special_consts.h
+option.o: $(hdrdir)/ruby/internal/static_assert.h
+option.o: $(hdrdir)/ruby/internal/stdalign.h
+option.o: $(hdrdir)/ruby/internal/stdbool.h
+option.o: $(hdrdir)/ruby/internal/symbol.h
+option.o: $(hdrdir)/ruby/internal/value.h
+option.o: $(hdrdir)/ruby/internal/value_type.h
+option.o: $(hdrdir)/ruby/internal/variable.h
+option.o: $(hdrdir)/ruby/internal/warning_push.h
+option.o: $(hdrdir)/ruby/internal/xmalloc.h
option.o: $(hdrdir)/ruby/io.h
option.o: $(hdrdir)/ruby/missing.h
option.o: $(hdrdir)/ruby/onigmo.h
@@ -161,18 +1339,188 @@ option.o: $(hdrdir)/ruby/subst.h
option.o: $(hdrdir)/ruby/thread.h
option.o: $(hdrdir)/ruby/util.h
option.o: $(top_srcdir)/internal.h
+option.o: $(top_srcdir)/internal/array.h
+option.o: $(top_srcdir)/internal/compilers.h
+option.o: $(top_srcdir)/internal/error.h
+option.o: $(top_srcdir)/internal/gc.h
+option.o: $(top_srcdir)/internal/io.h
+option.o: $(top_srcdir)/internal/serial.h
+option.o: $(top_srcdir)/internal/static_assert.h
+option.o: $(top_srcdir)/internal/string.h
+option.o: $(top_srcdir)/internal/thread.h
+option.o: $(top_srcdir)/internal/vm.h
+option.o: $(top_srcdir)/internal/warnings.h
+option.o: $(top_srcdir)/shape.h
option.o: constdefs.h
option.o: option.c
option.o: rubysocket.h
option.o: sockport.h
raddrinfo.o: $(RUBY_EXTCONF_H)
raddrinfo.o: $(arch_hdrdir)/ruby/config.h
-raddrinfo.o: $(hdrdir)/ruby.h
raddrinfo.o: $(hdrdir)/ruby/assert.h
raddrinfo.o: $(hdrdir)/ruby/backward.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/assume.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/attributes.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/bool.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/inttypes.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/limits.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/long_long.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/stdalign.h
+raddrinfo.o: $(hdrdir)/ruby/backward/2/stdarg.h
raddrinfo.o: $(hdrdir)/ruby/defines.h
raddrinfo.o: $(hdrdir)/ruby/encoding.h
+raddrinfo.o: $(hdrdir)/ruby/fiber/scheduler.h
raddrinfo.o: $(hdrdir)/ruby/intern.h
+raddrinfo.o: $(hdrdir)/ruby/internal/abi.h
+raddrinfo.o: $(hdrdir)/ruby/internal/anyargs.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+raddrinfo.o: $(hdrdir)/ruby/internal/assume.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/artificial.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/cold.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/const.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/error.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/format.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/noalias.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/noinline.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/pure.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/restrict.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/warning.h
+raddrinfo.o: $(hdrdir)/ruby/internal/attr/weakref.h
+raddrinfo.o: $(hdrdir)/ruby/internal/cast.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+raddrinfo.o: $(hdrdir)/ruby/internal/compiler_since.h
+raddrinfo.o: $(hdrdir)/ruby/internal/config.h
+raddrinfo.o: $(hdrdir)/ruby/internal/constant_p.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rarray.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rbasic.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rbignum.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rclass.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rdata.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rfile.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rhash.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/robject.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rregexp.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rstring.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rstruct.h
+raddrinfo.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+raddrinfo.o: $(hdrdir)/ruby/internal/ctype.h
+raddrinfo.o: $(hdrdir)/ruby/internal/dllexport.h
+raddrinfo.o: $(hdrdir)/ruby/internal/dosish.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/re.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/string.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+raddrinfo.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+raddrinfo.o: $(hdrdir)/ruby/internal/error.h
+raddrinfo.o: $(hdrdir)/ruby/internal/eval.h
+raddrinfo.o: $(hdrdir)/ruby/internal/event.h
+raddrinfo.o: $(hdrdir)/ruby/internal/fl_type.h
+raddrinfo.o: $(hdrdir)/ruby/internal/gc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/glob.h
+raddrinfo.o: $(hdrdir)/ruby/internal/globals.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/attribute.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/builtin.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/extension.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/feature.h
+raddrinfo.o: $(hdrdir)/ruby/internal/has/warning.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/array.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/bignum.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/class.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/compar.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/complex.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/cont.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/dir.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/enum.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/error.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/eval.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/file.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/gc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/hash.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/io.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/load.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/marshal.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/numeric.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/object.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/parse.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/proc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/process.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/random.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/range.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/rational.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/re.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/ruby.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/select.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/signal.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/string.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/struct.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/thread.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/time.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/variable.h
+raddrinfo.o: $(hdrdir)/ruby/internal/intern/vm.h
+raddrinfo.o: $(hdrdir)/ruby/internal/interpreter.h
+raddrinfo.o: $(hdrdir)/ruby/internal/iterator.h
+raddrinfo.o: $(hdrdir)/ruby/internal/memory.h
+raddrinfo.o: $(hdrdir)/ruby/internal/method.h
+raddrinfo.o: $(hdrdir)/ruby/internal/module.h
+raddrinfo.o: $(hdrdir)/ruby/internal/newobj.h
+raddrinfo.o: $(hdrdir)/ruby/internal/rgengc.h
+raddrinfo.o: $(hdrdir)/ruby/internal/scan_args.h
+raddrinfo.o: $(hdrdir)/ruby/internal/special_consts.h
+raddrinfo.o: $(hdrdir)/ruby/internal/static_assert.h
+raddrinfo.o: $(hdrdir)/ruby/internal/stdalign.h
+raddrinfo.o: $(hdrdir)/ruby/internal/stdbool.h
+raddrinfo.o: $(hdrdir)/ruby/internal/symbol.h
+raddrinfo.o: $(hdrdir)/ruby/internal/value.h
+raddrinfo.o: $(hdrdir)/ruby/internal/value_type.h
+raddrinfo.o: $(hdrdir)/ruby/internal/variable.h
+raddrinfo.o: $(hdrdir)/ruby/internal/warning_push.h
+raddrinfo.o: $(hdrdir)/ruby/internal/xmalloc.h
raddrinfo.o: $(hdrdir)/ruby/io.h
raddrinfo.o: $(hdrdir)/ruby/missing.h
raddrinfo.o: $(hdrdir)/ruby/onigmo.h
@@ -183,18 +1531,188 @@ raddrinfo.o: $(hdrdir)/ruby/subst.h
raddrinfo.o: $(hdrdir)/ruby/thread.h
raddrinfo.o: $(hdrdir)/ruby/util.h
raddrinfo.o: $(top_srcdir)/internal.h
+raddrinfo.o: $(top_srcdir)/internal/array.h
+raddrinfo.o: $(top_srcdir)/internal/compilers.h
+raddrinfo.o: $(top_srcdir)/internal/error.h
+raddrinfo.o: $(top_srcdir)/internal/gc.h
+raddrinfo.o: $(top_srcdir)/internal/io.h
+raddrinfo.o: $(top_srcdir)/internal/serial.h
+raddrinfo.o: $(top_srcdir)/internal/static_assert.h
+raddrinfo.o: $(top_srcdir)/internal/string.h
+raddrinfo.o: $(top_srcdir)/internal/thread.h
+raddrinfo.o: $(top_srcdir)/internal/vm.h
+raddrinfo.o: $(top_srcdir)/internal/warnings.h
+raddrinfo.o: $(top_srcdir)/shape.h
raddrinfo.o: constdefs.h
raddrinfo.o: raddrinfo.c
raddrinfo.o: rubysocket.h
raddrinfo.o: sockport.h
socket.o: $(RUBY_EXTCONF_H)
socket.o: $(arch_hdrdir)/ruby/config.h
-socket.o: $(hdrdir)/ruby.h
socket.o: $(hdrdir)/ruby/assert.h
socket.o: $(hdrdir)/ruby/backward.h
+socket.o: $(hdrdir)/ruby/backward/2/assume.h
+socket.o: $(hdrdir)/ruby/backward/2/attributes.h
+socket.o: $(hdrdir)/ruby/backward/2/bool.h
+socket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+socket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+socket.o: $(hdrdir)/ruby/backward/2/limits.h
+socket.o: $(hdrdir)/ruby/backward/2/long_long.h
+socket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+socket.o: $(hdrdir)/ruby/backward/2/stdarg.h
socket.o: $(hdrdir)/ruby/defines.h
socket.o: $(hdrdir)/ruby/encoding.h
+socket.o: $(hdrdir)/ruby/fiber/scheduler.h
socket.o: $(hdrdir)/ruby/intern.h
+socket.o: $(hdrdir)/ruby/internal/abi.h
+socket.o: $(hdrdir)/ruby/internal/anyargs.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+socket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+socket.o: $(hdrdir)/ruby/internal/assume.h
+socket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+socket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+socket.o: $(hdrdir)/ruby/internal/attr/cold.h
+socket.o: $(hdrdir)/ruby/internal/attr/const.h
+socket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+socket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+socket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+socket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+socket.o: $(hdrdir)/ruby/internal/attr/error.h
+socket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+socket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+socket.o: $(hdrdir)/ruby/internal/attr/format.h
+socket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+socket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+socket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+socket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+socket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+socket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+socket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+socket.o: $(hdrdir)/ruby/internal/attr/pure.h
+socket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+socket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+socket.o: $(hdrdir)/ruby/internal/attr/warning.h
+socket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+socket.o: $(hdrdir)/ruby/internal/cast.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+socket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+socket.o: $(hdrdir)/ruby/internal/compiler_since.h
+socket.o: $(hdrdir)/ruby/internal/config.h
+socket.o: $(hdrdir)/ruby/internal/constant_p.h
+socket.o: $(hdrdir)/ruby/internal/core.h
+socket.o: $(hdrdir)/ruby/internal/core/rarray.h
+socket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+socket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+socket.o: $(hdrdir)/ruby/internal/core/rclass.h
+socket.o: $(hdrdir)/ruby/internal/core/rdata.h
+socket.o: $(hdrdir)/ruby/internal/core/rfile.h
+socket.o: $(hdrdir)/ruby/internal/core/rhash.h
+socket.o: $(hdrdir)/ruby/internal/core/robject.h
+socket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+socket.o: $(hdrdir)/ruby/internal/core/rstring.h
+socket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+socket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+socket.o: $(hdrdir)/ruby/internal/ctype.h
+socket.o: $(hdrdir)/ruby/internal/dllexport.h
+socket.o: $(hdrdir)/ruby/internal/dosish.h
+socket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+socket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+socket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+socket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+socket.o: $(hdrdir)/ruby/internal/encoding/re.h
+socket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+socket.o: $(hdrdir)/ruby/internal/encoding/string.h
+socket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+socket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+socket.o: $(hdrdir)/ruby/internal/error.h
+socket.o: $(hdrdir)/ruby/internal/eval.h
+socket.o: $(hdrdir)/ruby/internal/event.h
+socket.o: $(hdrdir)/ruby/internal/fl_type.h
+socket.o: $(hdrdir)/ruby/internal/gc.h
+socket.o: $(hdrdir)/ruby/internal/glob.h
+socket.o: $(hdrdir)/ruby/internal/globals.h
+socket.o: $(hdrdir)/ruby/internal/has/attribute.h
+socket.o: $(hdrdir)/ruby/internal/has/builtin.h
+socket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+socket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+socket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+socket.o: $(hdrdir)/ruby/internal/has/extension.h
+socket.o: $(hdrdir)/ruby/internal/has/feature.h
+socket.o: $(hdrdir)/ruby/internal/has/warning.h
+socket.o: $(hdrdir)/ruby/internal/intern/array.h
+socket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+socket.o: $(hdrdir)/ruby/internal/intern/class.h
+socket.o: $(hdrdir)/ruby/internal/intern/compar.h
+socket.o: $(hdrdir)/ruby/internal/intern/complex.h
+socket.o: $(hdrdir)/ruby/internal/intern/cont.h
+socket.o: $(hdrdir)/ruby/internal/intern/dir.h
+socket.o: $(hdrdir)/ruby/internal/intern/enum.h
+socket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+socket.o: $(hdrdir)/ruby/internal/intern/error.h
+socket.o: $(hdrdir)/ruby/internal/intern/eval.h
+socket.o: $(hdrdir)/ruby/internal/intern/file.h
+socket.o: $(hdrdir)/ruby/internal/intern/gc.h
+socket.o: $(hdrdir)/ruby/internal/intern/hash.h
+socket.o: $(hdrdir)/ruby/internal/intern/io.h
+socket.o: $(hdrdir)/ruby/internal/intern/load.h
+socket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+socket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+socket.o: $(hdrdir)/ruby/internal/intern/object.h
+socket.o: $(hdrdir)/ruby/internal/intern/parse.h
+socket.o: $(hdrdir)/ruby/internal/intern/proc.h
+socket.o: $(hdrdir)/ruby/internal/intern/process.h
+socket.o: $(hdrdir)/ruby/internal/intern/random.h
+socket.o: $(hdrdir)/ruby/internal/intern/range.h
+socket.o: $(hdrdir)/ruby/internal/intern/rational.h
+socket.o: $(hdrdir)/ruby/internal/intern/re.h
+socket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+socket.o: $(hdrdir)/ruby/internal/intern/select.h
+socket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+socket.o: $(hdrdir)/ruby/internal/intern/signal.h
+socket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+socket.o: $(hdrdir)/ruby/internal/intern/string.h
+socket.o: $(hdrdir)/ruby/internal/intern/struct.h
+socket.o: $(hdrdir)/ruby/internal/intern/thread.h
+socket.o: $(hdrdir)/ruby/internal/intern/time.h
+socket.o: $(hdrdir)/ruby/internal/intern/variable.h
+socket.o: $(hdrdir)/ruby/internal/intern/vm.h
+socket.o: $(hdrdir)/ruby/internal/interpreter.h
+socket.o: $(hdrdir)/ruby/internal/iterator.h
+socket.o: $(hdrdir)/ruby/internal/memory.h
+socket.o: $(hdrdir)/ruby/internal/method.h
+socket.o: $(hdrdir)/ruby/internal/module.h
+socket.o: $(hdrdir)/ruby/internal/newobj.h
+socket.o: $(hdrdir)/ruby/internal/rgengc.h
+socket.o: $(hdrdir)/ruby/internal/scan_args.h
+socket.o: $(hdrdir)/ruby/internal/special_consts.h
+socket.o: $(hdrdir)/ruby/internal/static_assert.h
+socket.o: $(hdrdir)/ruby/internal/stdalign.h
+socket.o: $(hdrdir)/ruby/internal/stdbool.h
+socket.o: $(hdrdir)/ruby/internal/symbol.h
+socket.o: $(hdrdir)/ruby/internal/value.h
+socket.o: $(hdrdir)/ruby/internal/value_type.h
+socket.o: $(hdrdir)/ruby/internal/variable.h
+socket.o: $(hdrdir)/ruby/internal/warning_push.h
+socket.o: $(hdrdir)/ruby/internal/xmalloc.h
socket.o: $(hdrdir)/ruby/io.h
socket.o: $(hdrdir)/ruby/missing.h
socket.o: $(hdrdir)/ruby/onigmo.h
@@ -205,18 +1723,188 @@ socket.o: $(hdrdir)/ruby/subst.h
socket.o: $(hdrdir)/ruby/thread.h
socket.o: $(hdrdir)/ruby/util.h
socket.o: $(top_srcdir)/internal.h
+socket.o: $(top_srcdir)/internal/array.h
+socket.o: $(top_srcdir)/internal/compilers.h
+socket.o: $(top_srcdir)/internal/error.h
+socket.o: $(top_srcdir)/internal/gc.h
+socket.o: $(top_srcdir)/internal/io.h
+socket.o: $(top_srcdir)/internal/serial.h
+socket.o: $(top_srcdir)/internal/static_assert.h
+socket.o: $(top_srcdir)/internal/string.h
+socket.o: $(top_srcdir)/internal/thread.h
+socket.o: $(top_srcdir)/internal/vm.h
+socket.o: $(top_srcdir)/internal/warnings.h
+socket.o: $(top_srcdir)/shape.h
socket.o: constdefs.h
socket.o: rubysocket.h
socket.o: socket.c
socket.o: sockport.h
sockssocket.o: $(RUBY_EXTCONF_H)
sockssocket.o: $(arch_hdrdir)/ruby/config.h
-sockssocket.o: $(hdrdir)/ruby.h
sockssocket.o: $(hdrdir)/ruby/assert.h
sockssocket.o: $(hdrdir)/ruby/backward.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/assume.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/bool.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/limits.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sockssocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
sockssocket.o: $(hdrdir)/ruby/defines.h
sockssocket.o: $(hdrdir)/ruby/encoding.h
+sockssocket.o: $(hdrdir)/ruby/fiber/scheduler.h
sockssocket.o: $(hdrdir)/ruby/intern.h
+sockssocket.o: $(hdrdir)/ruby/internal/abi.h
+sockssocket.o: $(hdrdir)/ruby/internal/anyargs.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+sockssocket.o: $(hdrdir)/ruby/internal/assume.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/const.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/error.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/format.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+sockssocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+sockssocket.o: $(hdrdir)/ruby/internal/cast.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+sockssocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+sockssocket.o: $(hdrdir)/ruby/internal/config.h
+sockssocket.o: $(hdrdir)/ruby/internal/constant_p.h
+sockssocket.o: $(hdrdir)/ruby/internal/core.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/robject.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+sockssocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+sockssocket.o: $(hdrdir)/ruby/internal/ctype.h
+sockssocket.o: $(hdrdir)/ruby/internal/dllexport.h
+sockssocket.o: $(hdrdir)/ruby/internal/dosish.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+sockssocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+sockssocket.o: $(hdrdir)/ruby/internal/error.h
+sockssocket.o: $(hdrdir)/ruby/internal/eval.h
+sockssocket.o: $(hdrdir)/ruby/internal/event.h
+sockssocket.o: $(hdrdir)/ruby/internal/fl_type.h
+sockssocket.o: $(hdrdir)/ruby/internal/gc.h
+sockssocket.o: $(hdrdir)/ruby/internal/glob.h
+sockssocket.o: $(hdrdir)/ruby/internal/globals.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/extension.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/feature.h
+sockssocket.o: $(hdrdir)/ruby/internal/has/warning.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/array.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/class.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/error.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/file.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/io.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/load.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/object.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/process.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/random.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/range.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/re.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/select.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/string.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/time.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+sockssocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+sockssocket.o: $(hdrdir)/ruby/internal/interpreter.h
+sockssocket.o: $(hdrdir)/ruby/internal/iterator.h
+sockssocket.o: $(hdrdir)/ruby/internal/memory.h
+sockssocket.o: $(hdrdir)/ruby/internal/method.h
+sockssocket.o: $(hdrdir)/ruby/internal/module.h
+sockssocket.o: $(hdrdir)/ruby/internal/newobj.h
+sockssocket.o: $(hdrdir)/ruby/internal/rgengc.h
+sockssocket.o: $(hdrdir)/ruby/internal/scan_args.h
+sockssocket.o: $(hdrdir)/ruby/internal/special_consts.h
+sockssocket.o: $(hdrdir)/ruby/internal/static_assert.h
+sockssocket.o: $(hdrdir)/ruby/internal/stdalign.h
+sockssocket.o: $(hdrdir)/ruby/internal/stdbool.h
+sockssocket.o: $(hdrdir)/ruby/internal/symbol.h
+sockssocket.o: $(hdrdir)/ruby/internal/value.h
+sockssocket.o: $(hdrdir)/ruby/internal/value_type.h
+sockssocket.o: $(hdrdir)/ruby/internal/variable.h
+sockssocket.o: $(hdrdir)/ruby/internal/warning_push.h
+sockssocket.o: $(hdrdir)/ruby/internal/xmalloc.h
sockssocket.o: $(hdrdir)/ruby/io.h
sockssocket.o: $(hdrdir)/ruby/missing.h
sockssocket.o: $(hdrdir)/ruby/onigmo.h
@@ -227,18 +1915,188 @@ sockssocket.o: $(hdrdir)/ruby/subst.h
sockssocket.o: $(hdrdir)/ruby/thread.h
sockssocket.o: $(hdrdir)/ruby/util.h
sockssocket.o: $(top_srcdir)/internal.h
+sockssocket.o: $(top_srcdir)/internal/array.h
+sockssocket.o: $(top_srcdir)/internal/compilers.h
+sockssocket.o: $(top_srcdir)/internal/error.h
+sockssocket.o: $(top_srcdir)/internal/gc.h
+sockssocket.o: $(top_srcdir)/internal/io.h
+sockssocket.o: $(top_srcdir)/internal/serial.h
+sockssocket.o: $(top_srcdir)/internal/static_assert.h
+sockssocket.o: $(top_srcdir)/internal/string.h
+sockssocket.o: $(top_srcdir)/internal/thread.h
+sockssocket.o: $(top_srcdir)/internal/vm.h
+sockssocket.o: $(top_srcdir)/internal/warnings.h
+sockssocket.o: $(top_srcdir)/shape.h
sockssocket.o: constdefs.h
sockssocket.o: rubysocket.h
sockssocket.o: sockport.h
sockssocket.o: sockssocket.c
tcpserver.o: $(RUBY_EXTCONF_H)
tcpserver.o: $(arch_hdrdir)/ruby/config.h
-tcpserver.o: $(hdrdir)/ruby.h
tcpserver.o: $(hdrdir)/ruby/assert.h
tcpserver.o: $(hdrdir)/ruby/backward.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/assume.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/attributes.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/bool.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/inttypes.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/limits.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/long_long.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/stdalign.h
+tcpserver.o: $(hdrdir)/ruby/backward/2/stdarg.h
tcpserver.o: $(hdrdir)/ruby/defines.h
tcpserver.o: $(hdrdir)/ruby/encoding.h
+tcpserver.o: $(hdrdir)/ruby/fiber/scheduler.h
tcpserver.o: $(hdrdir)/ruby/intern.h
+tcpserver.o: $(hdrdir)/ruby/internal/abi.h
+tcpserver.o: $(hdrdir)/ruby/internal/anyargs.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+tcpserver.o: $(hdrdir)/ruby/internal/assume.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/artificial.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/cold.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/const.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/error.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/format.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/noalias.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/noinline.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/pure.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/restrict.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/warning.h
+tcpserver.o: $(hdrdir)/ruby/internal/attr/weakref.h
+tcpserver.o: $(hdrdir)/ruby/internal/cast.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+tcpserver.o: $(hdrdir)/ruby/internal/compiler_since.h
+tcpserver.o: $(hdrdir)/ruby/internal/config.h
+tcpserver.o: $(hdrdir)/ruby/internal/constant_p.h
+tcpserver.o: $(hdrdir)/ruby/internal/core.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rarray.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rbasic.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rbignum.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rclass.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rdata.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rfile.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rhash.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/robject.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rregexp.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rstring.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rstruct.h
+tcpserver.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+tcpserver.o: $(hdrdir)/ruby/internal/ctype.h
+tcpserver.o: $(hdrdir)/ruby/internal/dllexport.h
+tcpserver.o: $(hdrdir)/ruby/internal/dosish.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/re.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/string.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+tcpserver.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+tcpserver.o: $(hdrdir)/ruby/internal/error.h
+tcpserver.o: $(hdrdir)/ruby/internal/eval.h
+tcpserver.o: $(hdrdir)/ruby/internal/event.h
+tcpserver.o: $(hdrdir)/ruby/internal/fl_type.h
+tcpserver.o: $(hdrdir)/ruby/internal/gc.h
+tcpserver.o: $(hdrdir)/ruby/internal/glob.h
+tcpserver.o: $(hdrdir)/ruby/internal/globals.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/attribute.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/builtin.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/extension.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/feature.h
+tcpserver.o: $(hdrdir)/ruby/internal/has/warning.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/array.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/bignum.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/class.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/compar.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/complex.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/cont.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/dir.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/enum.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/error.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/eval.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/file.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/gc.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/hash.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/io.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/load.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/marshal.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/numeric.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/object.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/parse.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/proc.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/process.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/random.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/range.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/rational.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/re.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/ruby.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/select.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/signal.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/string.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/struct.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/thread.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/time.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/variable.h
+tcpserver.o: $(hdrdir)/ruby/internal/intern/vm.h
+tcpserver.o: $(hdrdir)/ruby/internal/interpreter.h
+tcpserver.o: $(hdrdir)/ruby/internal/iterator.h
+tcpserver.o: $(hdrdir)/ruby/internal/memory.h
+tcpserver.o: $(hdrdir)/ruby/internal/method.h
+tcpserver.o: $(hdrdir)/ruby/internal/module.h
+tcpserver.o: $(hdrdir)/ruby/internal/newobj.h
+tcpserver.o: $(hdrdir)/ruby/internal/rgengc.h
+tcpserver.o: $(hdrdir)/ruby/internal/scan_args.h
+tcpserver.o: $(hdrdir)/ruby/internal/special_consts.h
+tcpserver.o: $(hdrdir)/ruby/internal/static_assert.h
+tcpserver.o: $(hdrdir)/ruby/internal/stdalign.h
+tcpserver.o: $(hdrdir)/ruby/internal/stdbool.h
+tcpserver.o: $(hdrdir)/ruby/internal/symbol.h
+tcpserver.o: $(hdrdir)/ruby/internal/value.h
+tcpserver.o: $(hdrdir)/ruby/internal/value_type.h
+tcpserver.o: $(hdrdir)/ruby/internal/variable.h
+tcpserver.o: $(hdrdir)/ruby/internal/warning_push.h
+tcpserver.o: $(hdrdir)/ruby/internal/xmalloc.h
tcpserver.o: $(hdrdir)/ruby/io.h
tcpserver.o: $(hdrdir)/ruby/missing.h
tcpserver.o: $(hdrdir)/ruby/onigmo.h
@@ -249,18 +2107,188 @@ tcpserver.o: $(hdrdir)/ruby/subst.h
tcpserver.o: $(hdrdir)/ruby/thread.h
tcpserver.o: $(hdrdir)/ruby/util.h
tcpserver.o: $(top_srcdir)/internal.h
+tcpserver.o: $(top_srcdir)/internal/array.h
+tcpserver.o: $(top_srcdir)/internal/compilers.h
+tcpserver.o: $(top_srcdir)/internal/error.h
+tcpserver.o: $(top_srcdir)/internal/gc.h
+tcpserver.o: $(top_srcdir)/internal/io.h
+tcpserver.o: $(top_srcdir)/internal/serial.h
+tcpserver.o: $(top_srcdir)/internal/static_assert.h
+tcpserver.o: $(top_srcdir)/internal/string.h
+tcpserver.o: $(top_srcdir)/internal/thread.h
+tcpserver.o: $(top_srcdir)/internal/vm.h
+tcpserver.o: $(top_srcdir)/internal/warnings.h
+tcpserver.o: $(top_srcdir)/shape.h
tcpserver.o: constdefs.h
tcpserver.o: rubysocket.h
tcpserver.o: sockport.h
tcpserver.o: tcpserver.c
tcpsocket.o: $(RUBY_EXTCONF_H)
tcpsocket.o: $(arch_hdrdir)/ruby/config.h
-tcpsocket.o: $(hdrdir)/ruby.h
tcpsocket.o: $(hdrdir)/ruby/assert.h
tcpsocket.o: $(hdrdir)/ruby/backward.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/bool.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/limits.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+tcpsocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
tcpsocket.o: $(hdrdir)/ruby/defines.h
tcpsocket.o: $(hdrdir)/ruby/encoding.h
+tcpsocket.o: $(hdrdir)/ruby/fiber/scheduler.h
tcpsocket.o: $(hdrdir)/ruby/intern.h
+tcpsocket.o: $(hdrdir)/ruby/internal/abi.h
+tcpsocket.o: $(hdrdir)/ruby/internal/anyargs.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+tcpsocket.o: $(hdrdir)/ruby/internal/assume.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/const.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/error.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/format.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+tcpsocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+tcpsocket.o: $(hdrdir)/ruby/internal/cast.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+tcpsocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+tcpsocket.o: $(hdrdir)/ruby/internal/config.h
+tcpsocket.o: $(hdrdir)/ruby/internal/constant_p.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/robject.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+tcpsocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+tcpsocket.o: $(hdrdir)/ruby/internal/ctype.h
+tcpsocket.o: $(hdrdir)/ruby/internal/dllexport.h
+tcpsocket.o: $(hdrdir)/ruby/internal/dosish.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+tcpsocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+tcpsocket.o: $(hdrdir)/ruby/internal/error.h
+tcpsocket.o: $(hdrdir)/ruby/internal/eval.h
+tcpsocket.o: $(hdrdir)/ruby/internal/event.h
+tcpsocket.o: $(hdrdir)/ruby/internal/fl_type.h
+tcpsocket.o: $(hdrdir)/ruby/internal/gc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/glob.h
+tcpsocket.o: $(hdrdir)/ruby/internal/globals.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/extension.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/feature.h
+tcpsocket.o: $(hdrdir)/ruby/internal/has/warning.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/array.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/class.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/error.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/file.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/io.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/load.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/object.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/process.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/random.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/range.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/re.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/select.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/string.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/time.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+tcpsocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+tcpsocket.o: $(hdrdir)/ruby/internal/interpreter.h
+tcpsocket.o: $(hdrdir)/ruby/internal/iterator.h
+tcpsocket.o: $(hdrdir)/ruby/internal/memory.h
+tcpsocket.o: $(hdrdir)/ruby/internal/method.h
+tcpsocket.o: $(hdrdir)/ruby/internal/module.h
+tcpsocket.o: $(hdrdir)/ruby/internal/newobj.h
+tcpsocket.o: $(hdrdir)/ruby/internal/rgengc.h
+tcpsocket.o: $(hdrdir)/ruby/internal/scan_args.h
+tcpsocket.o: $(hdrdir)/ruby/internal/special_consts.h
+tcpsocket.o: $(hdrdir)/ruby/internal/static_assert.h
+tcpsocket.o: $(hdrdir)/ruby/internal/stdalign.h
+tcpsocket.o: $(hdrdir)/ruby/internal/stdbool.h
+tcpsocket.o: $(hdrdir)/ruby/internal/symbol.h
+tcpsocket.o: $(hdrdir)/ruby/internal/value.h
+tcpsocket.o: $(hdrdir)/ruby/internal/value_type.h
+tcpsocket.o: $(hdrdir)/ruby/internal/variable.h
+tcpsocket.o: $(hdrdir)/ruby/internal/warning_push.h
+tcpsocket.o: $(hdrdir)/ruby/internal/xmalloc.h
tcpsocket.o: $(hdrdir)/ruby/io.h
tcpsocket.o: $(hdrdir)/ruby/missing.h
tcpsocket.o: $(hdrdir)/ruby/onigmo.h
@@ -271,18 +2299,188 @@ tcpsocket.o: $(hdrdir)/ruby/subst.h
tcpsocket.o: $(hdrdir)/ruby/thread.h
tcpsocket.o: $(hdrdir)/ruby/util.h
tcpsocket.o: $(top_srcdir)/internal.h
+tcpsocket.o: $(top_srcdir)/internal/array.h
+tcpsocket.o: $(top_srcdir)/internal/compilers.h
+tcpsocket.o: $(top_srcdir)/internal/error.h
+tcpsocket.o: $(top_srcdir)/internal/gc.h
+tcpsocket.o: $(top_srcdir)/internal/io.h
+tcpsocket.o: $(top_srcdir)/internal/serial.h
+tcpsocket.o: $(top_srcdir)/internal/static_assert.h
+tcpsocket.o: $(top_srcdir)/internal/string.h
+tcpsocket.o: $(top_srcdir)/internal/thread.h
+tcpsocket.o: $(top_srcdir)/internal/vm.h
+tcpsocket.o: $(top_srcdir)/internal/warnings.h
+tcpsocket.o: $(top_srcdir)/shape.h
tcpsocket.o: constdefs.h
tcpsocket.o: rubysocket.h
tcpsocket.o: sockport.h
tcpsocket.o: tcpsocket.c
udpsocket.o: $(RUBY_EXTCONF_H)
udpsocket.o: $(arch_hdrdir)/ruby/config.h
-udpsocket.o: $(hdrdir)/ruby.h
udpsocket.o: $(hdrdir)/ruby/assert.h
udpsocket.o: $(hdrdir)/ruby/backward.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/bool.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/limits.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+udpsocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
udpsocket.o: $(hdrdir)/ruby/defines.h
udpsocket.o: $(hdrdir)/ruby/encoding.h
+udpsocket.o: $(hdrdir)/ruby/fiber/scheduler.h
udpsocket.o: $(hdrdir)/ruby/intern.h
+udpsocket.o: $(hdrdir)/ruby/internal/abi.h
+udpsocket.o: $(hdrdir)/ruby/internal/anyargs.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+udpsocket.o: $(hdrdir)/ruby/internal/assume.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/const.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/error.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/format.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+udpsocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+udpsocket.o: $(hdrdir)/ruby/internal/cast.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+udpsocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+udpsocket.o: $(hdrdir)/ruby/internal/config.h
+udpsocket.o: $(hdrdir)/ruby/internal/constant_p.h
+udpsocket.o: $(hdrdir)/ruby/internal/core.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/robject.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+udpsocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+udpsocket.o: $(hdrdir)/ruby/internal/ctype.h
+udpsocket.o: $(hdrdir)/ruby/internal/dllexport.h
+udpsocket.o: $(hdrdir)/ruby/internal/dosish.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+udpsocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+udpsocket.o: $(hdrdir)/ruby/internal/error.h
+udpsocket.o: $(hdrdir)/ruby/internal/eval.h
+udpsocket.o: $(hdrdir)/ruby/internal/event.h
+udpsocket.o: $(hdrdir)/ruby/internal/fl_type.h
+udpsocket.o: $(hdrdir)/ruby/internal/gc.h
+udpsocket.o: $(hdrdir)/ruby/internal/glob.h
+udpsocket.o: $(hdrdir)/ruby/internal/globals.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/extension.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/feature.h
+udpsocket.o: $(hdrdir)/ruby/internal/has/warning.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/array.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/class.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/error.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/file.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/io.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/load.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/object.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/process.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/random.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/range.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/re.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/select.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/string.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/time.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+udpsocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+udpsocket.o: $(hdrdir)/ruby/internal/interpreter.h
+udpsocket.o: $(hdrdir)/ruby/internal/iterator.h
+udpsocket.o: $(hdrdir)/ruby/internal/memory.h
+udpsocket.o: $(hdrdir)/ruby/internal/method.h
+udpsocket.o: $(hdrdir)/ruby/internal/module.h
+udpsocket.o: $(hdrdir)/ruby/internal/newobj.h
+udpsocket.o: $(hdrdir)/ruby/internal/rgengc.h
+udpsocket.o: $(hdrdir)/ruby/internal/scan_args.h
+udpsocket.o: $(hdrdir)/ruby/internal/special_consts.h
+udpsocket.o: $(hdrdir)/ruby/internal/static_assert.h
+udpsocket.o: $(hdrdir)/ruby/internal/stdalign.h
+udpsocket.o: $(hdrdir)/ruby/internal/stdbool.h
+udpsocket.o: $(hdrdir)/ruby/internal/symbol.h
+udpsocket.o: $(hdrdir)/ruby/internal/value.h
+udpsocket.o: $(hdrdir)/ruby/internal/value_type.h
+udpsocket.o: $(hdrdir)/ruby/internal/variable.h
+udpsocket.o: $(hdrdir)/ruby/internal/warning_push.h
+udpsocket.o: $(hdrdir)/ruby/internal/xmalloc.h
udpsocket.o: $(hdrdir)/ruby/io.h
udpsocket.o: $(hdrdir)/ruby/missing.h
udpsocket.o: $(hdrdir)/ruby/onigmo.h
@@ -293,18 +2491,188 @@ udpsocket.o: $(hdrdir)/ruby/subst.h
udpsocket.o: $(hdrdir)/ruby/thread.h
udpsocket.o: $(hdrdir)/ruby/util.h
udpsocket.o: $(top_srcdir)/internal.h
+udpsocket.o: $(top_srcdir)/internal/array.h
+udpsocket.o: $(top_srcdir)/internal/compilers.h
+udpsocket.o: $(top_srcdir)/internal/error.h
+udpsocket.o: $(top_srcdir)/internal/gc.h
+udpsocket.o: $(top_srcdir)/internal/io.h
+udpsocket.o: $(top_srcdir)/internal/serial.h
+udpsocket.o: $(top_srcdir)/internal/static_assert.h
+udpsocket.o: $(top_srcdir)/internal/string.h
+udpsocket.o: $(top_srcdir)/internal/thread.h
+udpsocket.o: $(top_srcdir)/internal/vm.h
+udpsocket.o: $(top_srcdir)/internal/warnings.h
+udpsocket.o: $(top_srcdir)/shape.h
udpsocket.o: constdefs.h
udpsocket.o: rubysocket.h
udpsocket.o: sockport.h
udpsocket.o: udpsocket.c
unixserver.o: $(RUBY_EXTCONF_H)
unixserver.o: $(arch_hdrdir)/ruby/config.h
-unixserver.o: $(hdrdir)/ruby.h
unixserver.o: $(hdrdir)/ruby/assert.h
unixserver.o: $(hdrdir)/ruby/backward.h
+unixserver.o: $(hdrdir)/ruby/backward/2/assume.h
+unixserver.o: $(hdrdir)/ruby/backward/2/attributes.h
+unixserver.o: $(hdrdir)/ruby/backward/2/bool.h
+unixserver.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+unixserver.o: $(hdrdir)/ruby/backward/2/inttypes.h
+unixserver.o: $(hdrdir)/ruby/backward/2/limits.h
+unixserver.o: $(hdrdir)/ruby/backward/2/long_long.h
+unixserver.o: $(hdrdir)/ruby/backward/2/stdalign.h
+unixserver.o: $(hdrdir)/ruby/backward/2/stdarg.h
unixserver.o: $(hdrdir)/ruby/defines.h
unixserver.o: $(hdrdir)/ruby/encoding.h
+unixserver.o: $(hdrdir)/ruby/fiber/scheduler.h
unixserver.o: $(hdrdir)/ruby/intern.h
+unixserver.o: $(hdrdir)/ruby/internal/abi.h
+unixserver.o: $(hdrdir)/ruby/internal/anyargs.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+unixserver.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+unixserver.o: $(hdrdir)/ruby/internal/assume.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/artificial.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/cold.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/const.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/error.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/format.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/noalias.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/noinline.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/pure.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/restrict.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/warning.h
+unixserver.o: $(hdrdir)/ruby/internal/attr/weakref.h
+unixserver.o: $(hdrdir)/ruby/internal/cast.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+unixserver.o: $(hdrdir)/ruby/internal/compiler_since.h
+unixserver.o: $(hdrdir)/ruby/internal/config.h
+unixserver.o: $(hdrdir)/ruby/internal/constant_p.h
+unixserver.o: $(hdrdir)/ruby/internal/core.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rarray.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rbasic.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rbignum.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rclass.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rdata.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rfile.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rhash.h
+unixserver.o: $(hdrdir)/ruby/internal/core/robject.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rregexp.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rstring.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rstruct.h
+unixserver.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+unixserver.o: $(hdrdir)/ruby/internal/ctype.h
+unixserver.o: $(hdrdir)/ruby/internal/dllexport.h
+unixserver.o: $(hdrdir)/ruby/internal/dosish.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/re.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/string.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+unixserver.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+unixserver.o: $(hdrdir)/ruby/internal/error.h
+unixserver.o: $(hdrdir)/ruby/internal/eval.h
+unixserver.o: $(hdrdir)/ruby/internal/event.h
+unixserver.o: $(hdrdir)/ruby/internal/fl_type.h
+unixserver.o: $(hdrdir)/ruby/internal/gc.h
+unixserver.o: $(hdrdir)/ruby/internal/glob.h
+unixserver.o: $(hdrdir)/ruby/internal/globals.h
+unixserver.o: $(hdrdir)/ruby/internal/has/attribute.h
+unixserver.o: $(hdrdir)/ruby/internal/has/builtin.h
+unixserver.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+unixserver.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+unixserver.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+unixserver.o: $(hdrdir)/ruby/internal/has/extension.h
+unixserver.o: $(hdrdir)/ruby/internal/has/feature.h
+unixserver.o: $(hdrdir)/ruby/internal/has/warning.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/array.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/bignum.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/class.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/compar.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/complex.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/cont.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/dir.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/enum.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/error.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/eval.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/file.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/gc.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/hash.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/io.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/load.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/marshal.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/numeric.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/object.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/parse.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/proc.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/process.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/random.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/range.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/rational.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/re.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/ruby.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/select.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/signal.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/string.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/struct.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/thread.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/time.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/variable.h
+unixserver.o: $(hdrdir)/ruby/internal/intern/vm.h
+unixserver.o: $(hdrdir)/ruby/internal/interpreter.h
+unixserver.o: $(hdrdir)/ruby/internal/iterator.h
+unixserver.o: $(hdrdir)/ruby/internal/memory.h
+unixserver.o: $(hdrdir)/ruby/internal/method.h
+unixserver.o: $(hdrdir)/ruby/internal/module.h
+unixserver.o: $(hdrdir)/ruby/internal/newobj.h
+unixserver.o: $(hdrdir)/ruby/internal/rgengc.h
+unixserver.o: $(hdrdir)/ruby/internal/scan_args.h
+unixserver.o: $(hdrdir)/ruby/internal/special_consts.h
+unixserver.o: $(hdrdir)/ruby/internal/static_assert.h
+unixserver.o: $(hdrdir)/ruby/internal/stdalign.h
+unixserver.o: $(hdrdir)/ruby/internal/stdbool.h
+unixserver.o: $(hdrdir)/ruby/internal/symbol.h
+unixserver.o: $(hdrdir)/ruby/internal/value.h
+unixserver.o: $(hdrdir)/ruby/internal/value_type.h
+unixserver.o: $(hdrdir)/ruby/internal/variable.h
+unixserver.o: $(hdrdir)/ruby/internal/warning_push.h
+unixserver.o: $(hdrdir)/ruby/internal/xmalloc.h
unixserver.o: $(hdrdir)/ruby/io.h
unixserver.o: $(hdrdir)/ruby/missing.h
unixserver.o: $(hdrdir)/ruby/onigmo.h
@@ -315,18 +2683,188 @@ unixserver.o: $(hdrdir)/ruby/subst.h
unixserver.o: $(hdrdir)/ruby/thread.h
unixserver.o: $(hdrdir)/ruby/util.h
unixserver.o: $(top_srcdir)/internal.h
+unixserver.o: $(top_srcdir)/internal/array.h
+unixserver.o: $(top_srcdir)/internal/compilers.h
+unixserver.o: $(top_srcdir)/internal/error.h
+unixserver.o: $(top_srcdir)/internal/gc.h
+unixserver.o: $(top_srcdir)/internal/io.h
+unixserver.o: $(top_srcdir)/internal/serial.h
+unixserver.o: $(top_srcdir)/internal/static_assert.h
+unixserver.o: $(top_srcdir)/internal/string.h
+unixserver.o: $(top_srcdir)/internal/thread.h
+unixserver.o: $(top_srcdir)/internal/vm.h
+unixserver.o: $(top_srcdir)/internal/warnings.h
+unixserver.o: $(top_srcdir)/shape.h
unixserver.o: constdefs.h
unixserver.o: rubysocket.h
unixserver.o: sockport.h
unixserver.o: unixserver.c
unixsocket.o: $(RUBY_EXTCONF_H)
unixsocket.o: $(arch_hdrdir)/ruby/config.h
-unixsocket.o: $(hdrdir)/ruby.h
unixsocket.o: $(hdrdir)/ruby/assert.h
unixsocket.o: $(hdrdir)/ruby/backward.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/assume.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/attributes.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/bool.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/inttypes.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/limits.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/long_long.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/stdalign.h
+unixsocket.o: $(hdrdir)/ruby/backward/2/stdarg.h
unixsocket.o: $(hdrdir)/ruby/defines.h
unixsocket.o: $(hdrdir)/ruby/encoding.h
+unixsocket.o: $(hdrdir)/ruby/fiber/scheduler.h
unixsocket.o: $(hdrdir)/ruby/intern.h
+unixsocket.o: $(hdrdir)/ruby/internal/abi.h
+unixsocket.o: $(hdrdir)/ruby/internal/anyargs.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+unixsocket.o: $(hdrdir)/ruby/internal/assume.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/artificial.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/cold.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/const.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/error.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/format.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/noalias.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/noinline.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/pure.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/restrict.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/warning.h
+unixsocket.o: $(hdrdir)/ruby/internal/attr/weakref.h
+unixsocket.o: $(hdrdir)/ruby/internal/cast.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+unixsocket.o: $(hdrdir)/ruby/internal/compiler_since.h
+unixsocket.o: $(hdrdir)/ruby/internal/config.h
+unixsocket.o: $(hdrdir)/ruby/internal/constant_p.h
+unixsocket.o: $(hdrdir)/ruby/internal/core.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rarray.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rbasic.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rbignum.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rclass.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rdata.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rfile.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rhash.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/robject.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rregexp.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rstring.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rstruct.h
+unixsocket.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+unixsocket.o: $(hdrdir)/ruby/internal/ctype.h
+unixsocket.o: $(hdrdir)/ruby/internal/dllexport.h
+unixsocket.o: $(hdrdir)/ruby/internal/dosish.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/re.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/string.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+unixsocket.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+unixsocket.o: $(hdrdir)/ruby/internal/error.h
+unixsocket.o: $(hdrdir)/ruby/internal/eval.h
+unixsocket.o: $(hdrdir)/ruby/internal/event.h
+unixsocket.o: $(hdrdir)/ruby/internal/fl_type.h
+unixsocket.o: $(hdrdir)/ruby/internal/gc.h
+unixsocket.o: $(hdrdir)/ruby/internal/glob.h
+unixsocket.o: $(hdrdir)/ruby/internal/globals.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/attribute.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/builtin.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/extension.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/feature.h
+unixsocket.o: $(hdrdir)/ruby/internal/has/warning.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/array.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/bignum.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/class.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/compar.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/complex.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/cont.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/dir.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/enum.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/error.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/eval.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/file.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/gc.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/hash.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/io.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/load.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/marshal.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/numeric.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/object.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/parse.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/proc.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/process.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/random.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/range.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/rational.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/re.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/ruby.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/select.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/signal.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/string.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/struct.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/thread.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/time.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/variable.h
+unixsocket.o: $(hdrdir)/ruby/internal/intern/vm.h
+unixsocket.o: $(hdrdir)/ruby/internal/interpreter.h
+unixsocket.o: $(hdrdir)/ruby/internal/iterator.h
+unixsocket.o: $(hdrdir)/ruby/internal/memory.h
+unixsocket.o: $(hdrdir)/ruby/internal/method.h
+unixsocket.o: $(hdrdir)/ruby/internal/module.h
+unixsocket.o: $(hdrdir)/ruby/internal/newobj.h
+unixsocket.o: $(hdrdir)/ruby/internal/rgengc.h
+unixsocket.o: $(hdrdir)/ruby/internal/scan_args.h
+unixsocket.o: $(hdrdir)/ruby/internal/special_consts.h
+unixsocket.o: $(hdrdir)/ruby/internal/static_assert.h
+unixsocket.o: $(hdrdir)/ruby/internal/stdalign.h
+unixsocket.o: $(hdrdir)/ruby/internal/stdbool.h
+unixsocket.o: $(hdrdir)/ruby/internal/symbol.h
+unixsocket.o: $(hdrdir)/ruby/internal/value.h
+unixsocket.o: $(hdrdir)/ruby/internal/value_type.h
+unixsocket.o: $(hdrdir)/ruby/internal/variable.h
+unixsocket.o: $(hdrdir)/ruby/internal/warning_push.h
+unixsocket.o: $(hdrdir)/ruby/internal/xmalloc.h
unixsocket.o: $(hdrdir)/ruby/io.h
unixsocket.o: $(hdrdir)/ruby/missing.h
unixsocket.o: $(hdrdir)/ruby/onigmo.h
@@ -337,6 +2875,18 @@ unixsocket.o: $(hdrdir)/ruby/subst.h
unixsocket.o: $(hdrdir)/ruby/thread.h
unixsocket.o: $(hdrdir)/ruby/util.h
unixsocket.o: $(top_srcdir)/internal.h
+unixsocket.o: $(top_srcdir)/internal/array.h
+unixsocket.o: $(top_srcdir)/internal/compilers.h
+unixsocket.o: $(top_srcdir)/internal/error.h
+unixsocket.o: $(top_srcdir)/internal/gc.h
+unixsocket.o: $(top_srcdir)/internal/io.h
+unixsocket.o: $(top_srcdir)/internal/serial.h
+unixsocket.o: $(top_srcdir)/internal/static_assert.h
+unixsocket.o: $(top_srcdir)/internal/string.h
+unixsocket.o: $(top_srcdir)/internal/thread.h
+unixsocket.o: $(top_srcdir)/internal/vm.h
+unixsocket.o: $(top_srcdir)/internal/warnings.h
+unixsocket.o: $(top_srcdir)/shape.h
unixsocket.o: constdefs.h
unixsocket.o: rubysocket.h
unixsocket.o: sockport.h
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 1a67e0013e..37ff216560 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -316,6 +316,7 @@ end
netpacket/packet.h
net/ethernet.h
sys/un.h
+ afunix.h
ifaddrs.h
sys/ioctl.h
sys/sockio.h
@@ -444,7 +445,6 @@ else
test_func = "socket(0,0,0)"
have_library("nsl", 't_open("", 0, (struct t_info *)NULL)', headers) # SunOS
have_library("socket", "socket(0,0,0)", headers) # SunOS
- have_library("anl", 'getaddrinfo_a', headers)
end
if have_func(test_func, headers)
@@ -485,6 +485,9 @@ EOF
have_func("getpeerucred(0, (ucred_t **)NULL)", headers) # SunOS
have_func_decl = proc do |name, headers|
+ # check if there is a declaration of <name> by trying to declare
+ # both "int <name>(void)" and "void <name>(void)"
+ # (at least one attempt should fail if there is a declaration)
if !checking_for("declaration of #{name}()") {!%w[int void].all? {|ret| try_compile(<<EOF)}}
#{cpp_include(headers)}
#{ret} #{name}(void);
@@ -493,10 +496,10 @@ EOF
end
end
if have_func('if_indextoname(0, "")', headers)
- have_func_decl["if_indextoname"]
+ have_func_decl["if_indextoname", headers]
end
if have_func('if_nametoindex("")', headers)
- have_func_decl["if_nametoindex"]
+ have_func_decl["if_nametoindex", headers]
end
have_func("hsterror", headers)
@@ -506,7 +509,6 @@ EOF
unless have_func("gethostname((char *)0, 0)", headers)
have_func("uname((struct utsname *)NULL)", headers)
end
- have_func("getaddrinfo_a", headers)
ipv6 = false
default_ipv6 = /haiku/ !~ RUBY_PLATFORM
@@ -550,7 +552,7 @@ EOS
end
if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
- IO.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
+ File.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
have_const(name, headers) unless $defs.include?("-DHAVE_CONST_#{name.upcase}")
}
end
@@ -654,12 +656,20 @@ EOS
end
hdr = "netinet6/in6.h"
- if /darwin/ =~ RUBY_PLATFORM and !try_compile(<<"SRC", nil, :werror=>true)
+ /darwin/ =~ RUBY_PLATFORM and
+ checking_for("if apple's #{hdr} needs s6_addr patch") {!try_compile(<<"SRC", nil, :werror=>true)} and
#include <netinet/in.h>
int t(struct in6_addr *addr) {return IN6_IS_ADDR_UNSPECIFIED(addr);}
SRC
- print "fixing apple's netinet6/in6.h ..."; $stdout.flush
- in6 = File.read("/usr/include/#{hdr}")
+ checking_for("fixing apple's #{hdr}", "%s") do
+ file = xpopen(%w"clang -include netinet/in.h -E -xc -", in: IO::NULL) do |f|
+ re = %r[^# *\d+ *"(.*/netinet/in\.h)"]
+ Logging.message " grep(#{re})\n"
+ f.read[re, 1]
+ end
+ Logging.message "Substitute from #{file}\n"
+
+ in6 = File.read(file)
if in6.gsub!(/\*\(const\s+__uint32_t\s+\*\)\(const\s+void\s+\*\)\(&(\(\w+\))->s6_addr\[(\d+)\]\)/) do
i, r = $2.to_i.divmod(4)
if r.zero?
@@ -669,12 +679,12 @@ SRC
end
end
FileUtils.mkdir_p(File.dirname(hdr))
- open(hdr, "w") {|f| f.write(in6)}
+ File.write(hdr, in6)
$distcleanfiles << hdr
$distcleandirs << File.dirname(hdr)
- puts "done"
+ "done"
else
- puts "not needed"
+ "not needed"
end
end
create_makefile("socket")
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index ce6dc40478..95a2feb3be 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -98,42 +98,42 @@ static struct in6_addr faith_prefix = IN6ADDR_ANY_INIT;
static const char in_addrany[] = { 0, 0, 0, 0 };
static const char in6_addrany[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static const char in_loopback[] = { 127, 0, 0, 1 };
static const char in6_loopback[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
};
struct sockinet {
- u_char si_len;
- u_char si_family;
- u_short si_port;
+ u_char si_len;
+ u_char si_family;
+ u_short si_port;
};
static const struct afd {
- int a_af;
- int a_addrlen;
- int a_socklen;
- int a_off;
- const char *a_addrany;
- const char *a_loopback;
+ int a_af;
+ int a_addrlen;
+ int a_socklen;
+ int a_off;
+ const char *a_addrany;
+ const char *a_loopback;
} afdl [] = {
#ifdef INET6
#define N_INET6 0
- {PF_INET6, sizeof(struct in6_addr),
- sizeof(struct sockaddr_in6),
- offsetof(struct sockaddr_in6, sin6_addr),
- in6_addrany, in6_loopback},
+ {PF_INET6, sizeof(struct in6_addr),
+ sizeof(struct sockaddr_in6),
+ offsetof(struct sockaddr_in6, sin6_addr),
+ in6_addrany, in6_loopback},
#define N_INET 1
#else
#define N_INET 0
#endif
- {PF_INET, sizeof(struct in_addr),
- sizeof(struct sockaddr_in),
- offsetof(struct sockaddr_in, sin_addr),
- in_addrany, in_loopback},
- {0, 0, 0, 0, NULL, NULL},
+ {PF_INET, sizeof(struct in_addr),
+ sizeof(struct sockaddr_in),
+ offsetof(struct sockaddr_in, sin_addr),
+ in_addrany, in_loopback},
+ {0, 0, 0, 0, NULL, NULL},
};
#ifdef INET6
@@ -143,58 +143,58 @@ static const struct afd {
#endif
static int get_name __P((const char *, const struct afd *,
- struct addrinfo **, char *, struct addrinfo *,
- int));
+ struct addrinfo **, char *, struct addrinfo *,
+ int));
static int get_addr __P((const char *, int, struct addrinfo **,
- struct addrinfo *, int));
+ struct addrinfo *, int));
static int str_isnumber __P((const char *));
#ifndef HAVE_GAI_STRERROR
static const char *const ai_errlist[] = {
- "success.",
- "address family for hostname not supported.", /* EAI_ADDRFAMILY */
- "temporary failure in name resolution.", /* EAI_AGAIN */
- "invalid value for ai_flags.", /* EAI_BADFLAGS */
- "non-recoverable failure in name resolution.", /* EAI_FAIL */
- "ai_family not supported.", /* EAI_FAMILY */
- "memory allocation failure.", /* EAI_MEMORY */
- "no address associated with hostname.", /* EAI_NODATA */
- "hostname nor servname provided, or not known.",/* EAI_NONAME */
- "servname not supported for ai_socktype.", /* EAI_SERVICE */
- "ai_socktype not supported.", /* EAI_SOCKTYPE */
- "system error returned in errno.", /* EAI_SYSTEM */
- "invalid value for hints.", /* EAI_BADHINTS */
- "resolved protocol is unknown.", /* EAI_PROTOCOL */
- "unknown error.", /* EAI_MAX */
+ "success.",
+ "address family for hostname not supported.", /* EAI_ADDRFAMILY */
+ "temporary failure in name resolution.", /* EAI_AGAIN */
+ "invalid value for ai_flags.", /* EAI_BADFLAGS */
+ "non-recoverable failure in name resolution.", /* EAI_FAIL */
+ "ai_family not supported.", /* EAI_FAMILY */
+ "memory allocation failure.", /* EAI_MEMORY */
+ "no address associated with hostname.", /* EAI_NODATA */
+ "hostname nor servname provided, or not known.",/* EAI_NONAME */
+ "servname not supported for ai_socktype.", /* EAI_SERVICE */
+ "ai_socktype not supported.", /* EAI_SOCKTYPE */
+ "system error returned in errno.", /* EAI_SYSTEM */
+ "invalid value for hints.", /* EAI_BADHINTS */
+ "resolved protocol is unknown.", /* EAI_PROTOCOL */
+ "unknown error.", /* EAI_MAX */
};
#endif
#define GET_CANONNAME(ai, str) \
if (pai->ai_flags & AI_CANONNAME) {\
- if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
- strcpy((ai)->ai_canonname, (str));\
- } else {\
- error = EAI_MEMORY;\
- goto free;\
- }\
+ if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
+ strcpy((ai)->ai_canonname, (str));\
+ } else {\
+ error = EAI_MEMORY;\
+ goto free;\
+ }\
}
#define GET_AI(ai, afd, addr, port) {\
- char *p;\
- if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\
- ((afd)->a_socklen)))\
- == NULL) {\
- error = EAI_MEMORY;\
- goto free;\
- }\
- memcpy((ai), pai, sizeof(struct addrinfo));\
- (ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
- (ai)->ai_family = (afd)->a_af;\
- (ai)->ai_addrlen = (afd)->a_socklen;\
- INIT_SOCKADDR((ai)->ai_addr, (afd)->a_af, (afd)->a_socklen);\
- ((struct sockinet *)(ai)->ai_addr)->si_port = (port);\
- p = (char *)((ai)->ai_addr);\
- memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
+ char *p;\
+ if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\
+ ((afd)->a_socklen)))\
+ == NULL) {\
+ error = EAI_MEMORY;\
+ goto free;\
+ }\
+ memcpy((ai), pai, sizeof(struct addrinfo));\
+ (ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
+ (ai)->ai_family = (afd)->a_af;\
+ (ai)->ai_addrlen = (afd)->a_socklen;\
+ INIT_SOCKADDR((ai)->ai_addr, (afd)->a_af, (afd)->a_socklen);\
+ ((struct sockinet *)(ai)->ai_addr)->si_port = (port);\
+ p = (char *)((ai)->ai_addr);\
+ memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
}
#define ERR(err) { error = (err); goto bad; }
@@ -206,36 +206,36 @@ const
char *
gai_strerror(int ecode)
{
- if (ecode < 0 || ecode > EAI_MAX)
- ecode = EAI_MAX;
- return (char *)ai_errlist[ecode];
+ if (ecode < 0 || ecode > EAI_MAX)
+ ecode = EAI_MAX;
+ return (char *)ai_errlist[ecode];
}
#endif
void
freeaddrinfo(struct addrinfo *ai)
{
- struct addrinfo *next;
-
- do {
- next = ai->ai_next;
- if (ai->ai_canonname)
- free(ai->ai_canonname);
- /* no need to free(ai->ai_addr) */
- free(ai);
- } while ((ai = next) != NULL);
+ struct addrinfo *next;
+
+ do {
+ next = ai->ai_next;
+ if (ai->ai_canonname)
+ free(ai->ai_canonname);
+ /* no need to free(ai->ai_addr) */
+ free(ai);
+ } while ((ai = next) != NULL);
}
static int
str_isnumber(const char *p)
{
- char *q = (char *)p;
- while (*q) {
- if (! isdigit(*q))
- return NO;
- q++;
- }
- return YES;
+ char *q = (char *)p;
+ while (*q) {
+ if (! isdigit(*q))
+ return NO;
+ q++;
+ }
+ return YES;
}
#ifndef HAVE_INET_PTON
@@ -243,435 +243,435 @@ str_isnumber(const char *p)
static int
inet_pton(int af, const char *hostname, void *pton)
{
- struct in_addr in;
+ struct in_addr in;
#ifdef HAVE_INET_ATON
- if (!inet_aton(hostname, &in))
- return 0;
+ if (!inet_aton(hostname, &in))
+ return 0;
#else
- int d1, d2, d3, d4;
- char ch;
-
- if (sscanf(hostname, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 &&
- 0 <= d1 && d1 <= 255 && 0 <= d2 && d2 <= 255 &&
- 0 <= d3 && d3 <= 255 && 0 <= d4 && d4 <= 255) {
- in.s_addr = htonl(
- ((long) d1 << 24) | ((long) d2 << 16) |
- ((long) d3 << 8) | ((long) d4 << 0));
- }
- else {
- return 0;
- }
-#endif
- memcpy(pton, &in, sizeof(in));
- return 1;
+ int d1, d2, d3, d4;
+ char ch;
+
+ if (sscanf(hostname, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 &&
+ 0 <= d1 && d1 <= 255 && 0 <= d2 && d2 <= 255 &&
+ 0 <= d3 && d3 <= 255 && 0 <= d4 && d4 <= 255) {
+ in.s_addr = htonl(
+ ((long) d1 << 24) | ((long) d2 << 16) |
+ ((long) d3 << 8) | ((long) d4 << 0));
+ }
+ else {
+ return 0;
+ }
+#endif
+ memcpy(pton, &in, sizeof(in));
+ return 1;
}
#endif
int
getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
{
- struct addrinfo sentinel;
- struct addrinfo *top = NULL;
- struct addrinfo *cur;
- int i, error = 0;
- char pton[PTON_MAX];
- struct addrinfo ai;
- struct addrinfo *pai;
- u_short port;
+ struct addrinfo sentinel;
+ struct addrinfo *top = NULL;
+ struct addrinfo *cur;
+ int i, error = 0;
+ char pton[PTON_MAX];
+ struct addrinfo ai;
+ struct addrinfo *pai;
+ u_short port;
#ifdef FAITH
- static int firsttime = 1;
-
- if (firsttime) {
- /* translator hack */
- {
- char *q = getenv("GAI");
- if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
- translate = YES;
- }
- firsttime = 0;
- }
-#endif
-
- /* initialize file static vars */
- sentinel.ai_next = NULL;
- cur = &sentinel;
- pai = &ai;
- pai->ai_flags = 0;
- pai->ai_family = PF_UNSPEC;
- pai->ai_socktype = ANY;
- pai->ai_protocol = ANY;
- pai->ai_addrlen = 0;
- pai->ai_canonname = NULL;
- pai->ai_addr = NULL;
- pai->ai_next = NULL;
- port = ANY;
-
- if (hostname == NULL && servname == NULL)
- return EAI_NONAME;
- if (hints) {
- /* error check for hints */
- if (hints->ai_addrlen || hints->ai_canonname ||
- hints->ai_addr || hints->ai_next)
- ERR(EAI_BADHINTS); /* xxx */
- if (hints->ai_flags & ~AI_MASK)
- ERR(EAI_BADFLAGS);
- switch (hints->ai_family) {
- case PF_UNSPEC:
- case PF_INET:
+ static int firsttime = 1;
+
+ if (firsttime) {
+ /* translator hack */
+ {
+ char *q = getenv("GAI");
+ if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
+ translate = YES;
+ }
+ firsttime = 0;
+ }
+#endif
+
+ /* initialize file static vars */
+ sentinel.ai_next = NULL;
+ cur = &sentinel;
+ pai = &ai;
+ pai->ai_flags = 0;
+ pai->ai_family = PF_UNSPEC;
+ pai->ai_socktype = ANY;
+ pai->ai_protocol = ANY;
+ pai->ai_addrlen = 0;
+ pai->ai_canonname = NULL;
+ pai->ai_addr = NULL;
+ pai->ai_next = NULL;
+ port = ANY;
+
+ if (hostname == NULL && servname == NULL)
+ return EAI_NONAME;
+ if (hints) {
+ /* error check for hints */
+ if (hints->ai_addrlen || hints->ai_canonname ||
+ hints->ai_addr || hints->ai_next)
+ ERR(EAI_BADHINTS); /* xxx */
+ if (hints->ai_flags & ~AI_MASK)
+ ERR(EAI_BADFLAGS);
+ switch (hints->ai_family) {
+ case PF_UNSPEC:
+ case PF_INET:
#ifdef INET6
- case PF_INET6:
-#endif
- break;
- default:
- ERR(EAI_FAMILY);
- }
- memcpy(pai, hints, sizeof(*pai));
- switch (pai->ai_socktype) {
- case ANY:
- switch (pai->ai_protocol) {
- case ANY:
- break;
- case IPPROTO_UDP:
- pai->ai_socktype = SOCK_DGRAM;
- break;
- case IPPROTO_TCP:
- pai->ai_socktype = SOCK_STREAM;
- break;
- default:
+ case PF_INET6:
+#endif
+ break;
+ default:
+ ERR(EAI_FAMILY);
+ }
+ memcpy(pai, hints, sizeof(*pai));
+ switch (pai->ai_socktype) {
+ case ANY:
+ switch (pai->ai_protocol) {
+ case ANY:
+ break;
+ case IPPROTO_UDP:
+ pai->ai_socktype = SOCK_DGRAM;
+ break;
+ case IPPROTO_TCP:
+ pai->ai_socktype = SOCK_STREAM;
+ break;
+ default:
#if defined(SOCK_RAW)
- pai->ai_socktype = SOCK_RAW;
+ pai->ai_socktype = SOCK_RAW;
#endif
- break;
- }
- break;
+ break;
+ }
+ break;
#if defined(SOCK_RAW)
- case SOCK_RAW:
- break;
-#endif
- case SOCK_DGRAM:
- if (pai->ai_protocol != IPPROTO_UDP &&
- pai->ai_protocol != ANY)
- ERR(EAI_BADHINTS); /*xxx*/
- pai->ai_protocol = IPPROTO_UDP;
- break;
- case SOCK_STREAM:
- if (pai->ai_protocol != IPPROTO_TCP &&
- pai->ai_protocol != ANY)
- ERR(EAI_BADHINTS); /*xxx*/
- pai->ai_protocol = IPPROTO_TCP;
- break;
- default:
- ERR(EAI_SOCKTYPE);
- break;
- }
- }
-
- /*
- * service port
- */
- if (servname) {
- if (str_isnumber(servname)) {
- if (pai->ai_socktype == ANY) {
- /* caller accept *ANY* socktype */
- pai->ai_socktype = SOCK_DGRAM;
- pai->ai_protocol = IPPROTO_UDP;
- }
- port = htons((unsigned short)atoi(servname));
+ case SOCK_RAW:
+ break;
+#endif
+ case SOCK_DGRAM:
+ if (pai->ai_protocol != IPPROTO_UDP &&
+ pai->ai_protocol != ANY)
+ ERR(EAI_BADHINTS); /*xxx*/
+ pai->ai_protocol = IPPROTO_UDP;
+ break;
+ case SOCK_STREAM:
+ if (pai->ai_protocol != IPPROTO_TCP &&
+ pai->ai_protocol != ANY)
+ ERR(EAI_BADHINTS); /*xxx*/
+ pai->ai_protocol = IPPROTO_TCP;
+ break;
+ default:
+ ERR(EAI_SOCKTYPE);
+ break;
+ }
+ }
+
+ /*
+ * service port
+ */
+ if (servname) {
+ if (str_isnumber(servname)) {
+ if (pai->ai_socktype == ANY) {
+ /* caller accept *ANY* socktype */
+ pai->ai_socktype = SOCK_DGRAM;
+ pai->ai_protocol = IPPROTO_UDP;
+ }
+ port = htons((unsigned short)atoi(servname));
} else if (pai->ai_flags & AI_NUMERICSERV) {
ERR(EAI_NONAME);
- } else {
- struct servent *sp;
- const char *proto;
-
- proto = NULL;
- switch (pai->ai_socktype) {
- case ANY:
- proto = NULL;
- break;
- case SOCK_DGRAM:
- proto = "udp";
- break;
- case SOCK_STREAM:
- proto = "tcp";
- break;
- default:
- fprintf(stderr, "panic!\n");
- break;
- }
- if ((sp = getservbyname((char*)servname, proto)) == NULL)
- ERR(EAI_SERVICE);
- port = sp->s_port;
- if (pai->ai_socktype == ANY)
- if (strcmp(sp->s_proto, "udp") == 0) {
- pai->ai_socktype = SOCK_DGRAM;
- pai->ai_protocol = IPPROTO_UDP;
- } else if (strcmp(sp->s_proto, "tcp") == 0) {
- pai->ai_socktype = SOCK_STREAM;
- pai->ai_protocol = IPPROTO_TCP;
- } else
- ERR(EAI_PROTOCOL); /*xxx*/
- }
- }
-
- /*
- * hostname == NULL.
- * passive socket -> anyaddr (0.0.0.0 or ::)
- * non-passive socket -> localhost (127.0.0.1 or ::1)
- */
- if (hostname == NULL) {
- const struct afd *afd;
- int s;
-
- for (afd = &afdl[0]; afd->a_af; afd++) {
- if (!(pai->ai_family == PF_UNSPEC
- || pai->ai_family == afd->a_af)) {
- continue;
- }
-
- /*
- * filter out AFs that are not supported by the kernel
- * XXX errno?
- */
- s = socket(afd->a_af, SOCK_DGRAM, 0);
- if (s < 0)
- continue;
-
- close(s);
-
- if (pai->ai_flags & AI_PASSIVE) {
- GET_AI(cur->ai_next, afd, afd->a_addrany, port);
- /* xxx meaningless?
- * GET_CANONNAME(cur->ai_next, "anyaddr");
- */
- } else {
- GET_AI(cur->ai_next, afd, afd->a_loopback,
- port);
- /* xxx meaningless?
- * GET_CANONNAME(cur->ai_next, "localhost");
- */
- }
- cur = cur->ai_next;
- }
- top = sentinel.ai_next;
- if (top)
- goto good;
- else
- ERR(EAI_FAMILY);
- }
-
- /* hostname as numeric name */
- for (i = 0; afdl[i].a_af; i++) {
- if (inet_pton(afdl[i].a_af, hostname, pton)) {
- u_long v4a;
+ } else {
+ struct servent *sp;
+ const char *proto;
+
+ proto = NULL;
+ switch (pai->ai_socktype) {
+ case ANY:
+ proto = NULL;
+ break;
+ case SOCK_DGRAM:
+ proto = "udp";
+ break;
+ case SOCK_STREAM:
+ proto = "tcp";
+ break;
+ default:
+ fprintf(stderr, "panic!\n");
+ break;
+ }
+ if ((sp = getservbyname((char*)servname, proto)) == NULL)
+ ERR(EAI_SERVICE);
+ port = sp->s_port;
+ if (pai->ai_socktype == ANY)
+ if (strcmp(sp->s_proto, "udp") == 0) {
+ pai->ai_socktype = SOCK_DGRAM;
+ pai->ai_protocol = IPPROTO_UDP;
+ } else if (strcmp(sp->s_proto, "tcp") == 0) {
+ pai->ai_socktype = SOCK_STREAM;
+ pai->ai_protocol = IPPROTO_TCP;
+ } else
+ ERR(EAI_PROTOCOL); /*xxx*/
+ }
+ }
+
+ /*
+ * hostname == NULL.
+ * passive socket -> anyaddr (0.0.0.0 or ::)
+ * non-passive socket -> localhost (127.0.0.1 or ::1)
+ */
+ if (hostname == NULL) {
+ const struct afd *afd;
+ int s;
+
+ for (afd = &afdl[0]; afd->a_af; afd++) {
+ if (!(pai->ai_family == PF_UNSPEC
+ || pai->ai_family == afd->a_af)) {
+ continue;
+ }
+
+ /*
+ * filter out AFs that are not supported by the kernel
+ * XXX errno?
+ */
+ s = socket(afd->a_af, SOCK_DGRAM, 0);
+ if (s < 0)
+ continue;
+
+ close(s);
+
+ if (pai->ai_flags & AI_PASSIVE) {
+ GET_AI(cur->ai_next, afd, afd->a_addrany, port);
+ /* xxx meaningless?
+ * GET_CANONNAME(cur->ai_next, "anyaddr");
+ */
+ } else {
+ GET_AI(cur->ai_next, afd, afd->a_loopback,
+ port);
+ /* xxx meaningless?
+ * GET_CANONNAME(cur->ai_next, "localhost");
+ */
+ }
+ cur = cur->ai_next;
+ }
+ top = sentinel.ai_next;
+ if (top)
+ goto good;
+ else
+ ERR(EAI_FAMILY);
+ }
+
+ /* hostname as numeric name */
+ for (i = 0; afdl[i].a_af; i++) {
+ if (inet_pton(afdl[i].a_af, hostname, pton)) {
+ u_long v4a;
#ifdef INET6
- u_char pfx;
-#endif
-
- switch (afdl[i].a_af) {
- case AF_INET:
- v4a = ((struct in_addr *)pton)->s_addr;
- if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
- pai->ai_flags &= ~AI_CANONNAME;
- v4a >>= IN_CLASSA_NSHIFT;
- if (v4a == 0 || v4a == IN_LOOPBACKNET)
- pai->ai_flags &= ~AI_CANONNAME;
- break;
+ u_char pfx;
+#endif
+
+ switch (afdl[i].a_af) {
+ case AF_INET:
+ v4a = ((struct in_addr *)pton)->s_addr;
+ if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
+ pai->ai_flags &= ~AI_CANONNAME;
+ v4a >>= IN_CLASSA_NSHIFT;
+ if (v4a == 0 || v4a == IN_LOOPBACKNET)
+ pai->ai_flags &= ~AI_CANONNAME;
+ break;
#ifdef INET6
- case AF_INET6:
- pfx = ((struct in6_addr *)pton)->s6_addr[0];
- if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
- pai->ai_flags &= ~AI_CANONNAME;
- break;
-#endif
- }
-
- if (pai->ai_family == afdl[i].a_af ||
- pai->ai_family == PF_UNSPEC) {
- if (! (pai->ai_flags & AI_CANONNAME)) {
- GET_AI(top, &afdl[i], pton, port);
- goto good;
- }
- /*
- * if AI_CANONNAME and if reverse lookup
- * fail, return ai anyway to pacify
- * calling application.
- *
- * XXX getaddrinfo() is a name->address
- * translation function, and it looks strange
- * that we do addr->name translation here.
- */
- get_name(pton, &afdl[i], &top, pton, pai, port);
- goto good;
- } else
- ERR(EAI_FAMILY); /*xxx*/
- }
- }
-
- if (pai->ai_flags & AI_NUMERICHOST)
- ERR(EAI_NONAME);
-
- /* hostname as alphabetical name */
- error = get_addr(hostname, pai->ai_family, &top, pai, port);
- if (error == 0) {
- if (top) {
+ case AF_INET6:
+ pfx = ((struct in6_addr *)pton)->s6_addr[0];
+ if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
+ pai->ai_flags &= ~AI_CANONNAME;
+ break;
+#endif
+ }
+
+ if (pai->ai_family == afdl[i].a_af ||
+ pai->ai_family == PF_UNSPEC) {
+ if (! (pai->ai_flags & AI_CANONNAME)) {
+ GET_AI(top, &afdl[i], pton, port);
+ goto good;
+ }
+ /*
+ * if AI_CANONNAME and if reverse lookup
+ * fail, return ai anyway to pacify
+ * calling application.
+ *
+ * XXX getaddrinfo() is a name->address
+ * translation function, and it looks strange
+ * that we do addr->name translation here.
+ */
+ get_name(pton, &afdl[i], &top, pton, pai, port);
+ goto good;
+ } else
+ ERR(EAI_FAMILY); /*xxx*/
+ }
+ }
+
+ if (pai->ai_flags & AI_NUMERICHOST)
+ ERR(EAI_NONAME);
+
+ /* hostname as alphabetical name */
+ error = get_addr(hostname, pai->ai_family, &top, pai, port);
+ if (error == 0) {
+ if (top) {
good:
- *res = top;
- return SUCCESS;
- } else
- error = EAI_FAIL;
- }
+ *res = top;
+ return SUCCESS;
+ } else
+ error = EAI_FAIL;
+ }
free:
- if (top)
- freeaddrinfo(top);
+ if (top)
+ freeaddrinfo(top);
bad:
- *res = NULL;
- return error;
+ *res = NULL;
+ return error;
}
static int
get_name(const char *addr, const struct afd *afd, struct addrinfo **res, char *numaddr, struct addrinfo *pai, int port0)
{
- u_short port = port0 & 0xffff;
- struct hostent *hp;
- struct addrinfo *cur;
- int error = 0;
+ u_short port = port0 & 0xffff;
+ struct hostent *hp;
+ struct addrinfo *cur;
+ int error = 0;
#ifdef INET6
- int h_error;
+ int h_error;
#endif
#ifdef INET6
- hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
+ hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
#else
- hp = gethostbyaddr((char*)addr, afd->a_addrlen, AF_INET);
+ hp = gethostbyaddr((char*)addr, afd->a_addrlen, AF_INET);
#endif
- if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
- GET_AI(cur, afd, hp->h_addr_list[0], port);
- GET_CANONNAME(cur, hp->h_name);
- } else
- GET_AI(cur, afd, numaddr, port);
+ if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
+ GET_AI(cur, afd, hp->h_addr_list[0], port);
+ GET_CANONNAME(cur, hp->h_name);
+ } else
+ GET_AI(cur, afd, numaddr, port);
#ifdef INET6
- if (hp)
- freehostent(hp);
+ if (hp)
+ freehostent(hp);
#endif
- *res = cur;
- return SUCCESS;
+ *res = cur;
+ return SUCCESS;
free:
- if (cur)
- freeaddrinfo(cur);
+ if (cur)
+ freeaddrinfo(cur);
#ifdef INET6
- if (hp)
- freehostent(hp);
+ if (hp)
+ freehostent(hp);
#endif
/* bad: */
- *res = NULL;
- return error;
+ *res = NULL;
+ return error;
}
static int
get_addr(const char *hostname, int af, struct addrinfo **res, struct addrinfo *pai, int port0)
{
- u_short port = port0 & 0xffff;
- struct addrinfo sentinel;
- struct hostent *hp;
- struct addrinfo *top, *cur;
- const struct afd *afd;
- int i, error = 0, h_error;
- char *ap;
-
- top = NULL;
- sentinel.ai_next = NULL;
- cur = &sentinel;
+ u_short port = port0 & 0xffff;
+ struct addrinfo sentinel;
+ struct hostent *hp;
+ struct addrinfo *top, *cur;
+ const struct afd *afd;
+ int i, error = 0, h_error;
+ char *ap;
+
+ top = NULL;
+ sentinel.ai_next = NULL;
+ cur = &sentinel;
#ifdef INET6
- if (af == AF_UNSPEC) {
- hp = getipnodebyname(hostname, AF_INET6,
- AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
- } else
- hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error);
+ if (af == AF_UNSPEC) {
+ hp = getipnodebyname(hostname, AF_INET6,
+ AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
+ } else
+ hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error);
#else
- if (strlen(hostname) >= NI_MAXHOST) ERR(EAI_NODATA);
- hp = gethostbyname((char*)hostname);
- h_error = h_errno;
-#endif
- if (hp == NULL) {
- switch (h_error) {
- case HOST_NOT_FOUND:
- case NO_DATA:
- error = EAI_NODATA;
- break;
- case TRY_AGAIN:
- error = EAI_AGAIN;
- break;
- case NO_RECOVERY:
- default:
- error = EAI_FAIL;
- break;
- }
- goto bad;
- }
-
- if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
- (hp->h_addr_list[0] == NULL))
- ERR(EAI_FAIL);
-
- for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
- switch (af) {
+ if (strlen(hostname) >= NI_MAXHOST) ERR(EAI_NODATA);
+ hp = gethostbyname((char*)hostname);
+ h_error = h_errno;
+#endif
+ if (hp == NULL) {
+ switch (h_error) {
+ case HOST_NOT_FOUND:
+ case NO_DATA:
+ error = EAI_NODATA;
+ break;
+ case TRY_AGAIN:
+ error = EAI_AGAIN;
+ break;
+ case NO_RECOVERY:
+ default:
+ error = EAI_FAIL;
+ break;
+ }
+ goto bad;
+ }
+
+ if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
+ (hp->h_addr_list[0] == NULL))
+ ERR(EAI_FAIL);
+
+ for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
+ switch (af) {
#ifdef INET6
- case AF_INET6:
- afd = &afdl[N_INET6];
- break;
+ case AF_INET6:
+ afd = &afdl[N_INET6];
+ break;
#endif
#ifndef INET6
- default: /* AF_UNSPEC */
+ default: /* AF_UNSPEC */
#endif
- case AF_INET:
- afd = &afdl[N_INET];
- break;
+ case AF_INET:
+ afd = &afdl[N_INET];
+ break;
#ifdef INET6
- default: /* AF_UNSPEC */
- if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
- ap += sizeof(struct in6_addr) -
- sizeof(struct in_addr);
- afd = &afdl[N_INET];
- } else
- afd = &afdl[N_INET6];
- break;
-#endif
- }
+ default: /* AF_UNSPEC */
+ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
+ ap += sizeof(struct in6_addr) -
+ sizeof(struct in_addr);
+ afd = &afdl[N_INET];
+ } else
+ afd = &afdl[N_INET6];
+ break;
+#endif
+ }
#ifdef FAITH
- if (translate && afd->a_af == AF_INET) {
- struct in6_addr *in6;
-
- GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
- in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr;
- memcpy(&in6->s6_addr, &faith_prefix,
- sizeof(struct in6_addr) - sizeof(struct in_addr));
- memcpy(&in6->s6_addr + sizeof(struct in_addr), ap,
- sizeof(struct in_addr));
- } else
+ if (translate && afd->a_af == AF_INET) {
+ struct in6_addr *in6;
+
+ GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
+ in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr;
+ memcpy(&in6->s6_addr, &faith_prefix,
+ sizeof(struct in6_addr) - sizeof(struct in_addr));
+ memcpy(&in6->s6_addr + sizeof(struct in_addr), ap,
+ sizeof(struct in_addr));
+ } else
#endif /* FAITH */
- GET_AI(cur->ai_next, afd, ap, port);
- if (cur == &sentinel) {
- top = cur->ai_next;
- GET_CANONNAME(top, hp->h_name);
- }
- cur = cur->ai_next;
- }
+ GET_AI(cur->ai_next, afd, ap, port);
+ if (cur == &sentinel) {
+ top = cur->ai_next;
+ GET_CANONNAME(top, hp->h_name);
+ }
+ cur = cur->ai_next;
+ }
#ifdef INET6
- freehostent(hp);
+ freehostent(hp);
#endif
- *res = top;
- return SUCCESS;
+ *res = top;
+ return SUCCESS;
free:
- if (top)
- freeaddrinfo(top);
+ if (top)
+ freeaddrinfo(top);
#ifdef INET6
- if (hp)
- freehostent(hp);
+ if (hp)
+ freehostent(hp);
#endif
bad:
- *res = NULL;
- return error;
+ *res = NULL;
+ return error;
}
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 94a5eb9439..ae5284fab6 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -84,30 +84,30 @@ typedef int socklen_t;
#define NO 0
struct sockinet {
- u_char si_len;
- u_char si_family;
- u_short si_port;
+ u_char si_len;
+ u_char si_family;
+ u_short si_port;
};
static struct afd {
- int a_af;
- int a_addrlen;
- int a_socklen;
- int a_off;
+ int a_af;
+ int a_addrlen;
+ int a_socklen;
+ int a_off;
} afdl [] = {
#ifdef INET6
#define N_INET6 0
- {PF_INET6, sizeof(struct in6_addr),
- sizeof(struct sockaddr_in6),
- offsetof(struct sockaddr_in6, sin6_addr)},
+ {PF_INET6, sizeof(struct in6_addr),
+ sizeof(struct sockaddr_in6),
+ offsetof(struct sockaddr_in6, sin6_addr)},
#define N_INET 1
#else
#define N_INET 0
#endif
- {PF_INET, sizeof(struct in_addr),
- sizeof(struct sockaddr_in),
- offsetof(struct sockaddr_in, sin_addr)},
- {0, 0, 0, 0},
+ {PF_INET, sizeof(struct in_addr),
+ sizeof(struct sockaddr_in),
+ offsetof(struct sockaddr_in, sin_addr)},
+ {0, 0, 0, 0},
};
#define ENI_NOSOCKET 0
@@ -121,123 +121,123 @@ static struct afd {
int
getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
{
- struct afd *afd;
- struct hostent *hp;
- u_short port;
- int family, len, i;
- char *addr, *p;
- u_long v4a;
+ struct afd *afd;
+ struct hostent *hp;
+ u_short port;
+ int family, len, i;
+ char *addr, *p;
+ u_long v4a;
#ifdef INET6
- u_char pfx;
+ u_char pfx;
#endif
- int h_error;
- char numserv[512];
- char numaddr[512];
+ int h_error;
+ char numserv[512];
+ char numaddr[512];
- if (sa == NULL)
- return ENI_NOSOCKET;
+ if (sa == NULL)
+ return ENI_NOSOCKET;
- if (!VALIDATE_SOCKLEN(sa, salen)) return ENI_SALEN;
+ if (!VALIDATE_SOCKLEN(sa, salen)) return ENI_SALEN;
len = salen;
- family = sa->sa_family;
- for (i = 0; afdl[i].a_af; i++)
- if (afdl[i].a_af == family) {
- afd = &afdl[i];
- goto found;
- }
- return ENI_FAMILY;
+ family = sa->sa_family;
+ for (i = 0; afdl[i].a_af; i++)
+ if (afdl[i].a_af == family) {
+ afd = &afdl[i];
+ goto found;
+ }
+ return ENI_FAMILY;
found:
- if (len != afd->a_socklen) return ENI_SALEN;
-
- port = ((struct sockinet *)sa)->si_port; /* network byte order */
- addr = (char *)sa + afd->a_off;
-
- if (serv == NULL || servlen == 0) {
- /* what we should do? */
- } else if (flags & NI_NUMERICSERV) {
- snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
- if (strlen(numserv) + 1 > servlen)
- return ENI_MEMORY;
- strcpy(serv, numserv);
- } else {
+ if (len != afd->a_socklen) return ENI_SALEN;
+
+ port = ((struct sockinet *)sa)->si_port; /* network byte order */
+ addr = (char *)sa + afd->a_off;
+
+ if (serv == NULL || servlen == 0) {
+ /* what we should do? */
+ } else if (flags & NI_NUMERICSERV) {
+ snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
+ if (strlen(numserv) + 1 > servlen)
+ return ENI_MEMORY;
+ strcpy(serv, numserv);
+ } else {
#if defined(HAVE_GETSERVBYPORT)
- struct servent *sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
- if (sp) {
- if (strlen(sp->s_name) + 1 > servlen)
- return ENI_MEMORY;
- strcpy(serv, sp->s_name);
- } else
- return ENI_NOSERVNAME;
+ struct servent *sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
+ if (sp) {
+ if (strlen(sp->s_name) + 1 > servlen)
+ return ENI_MEMORY;
+ strcpy(serv, sp->s_name);
+ } else
+ return ENI_NOSERVNAME;
#else
- return ENI_NOSERVNAME;
-#endif
- }
-
- switch (sa->sa_family) {
- case AF_INET:
- v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
- if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
- flags |= NI_NUMERICHOST;
- v4a >>= IN_CLASSA_NSHIFT;
- if (v4a == 0)
- flags |= NI_NUMERICHOST;
- break;
+ return ENI_NOSERVNAME;
+#endif
+ }
+
+ switch (sa->sa_family) {
+ case AF_INET:
+ v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
+ if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
+ flags |= NI_NUMERICHOST;
+ v4a >>= IN_CLASSA_NSHIFT;
+ if (v4a == 0)
+ flags |= NI_NUMERICHOST;
+ break;
#ifdef INET6
- case AF_INET6:
+ case AF_INET6:
#ifdef HAVE_ADDR8
- pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
+ pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
#else
- pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0];
-#endif
- if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
- flags |= NI_NUMERICHOST;
- break;
-#endif
- }
- if (host == NULL || hostlen == 0) {
- /* what should we do? */
- } else if (flags & NI_NUMERICHOST) {
- if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
- == NULL)
- return ENI_SYSTEM;
- if (strlen(numaddr) > hostlen)
- return ENI_MEMORY;
- strcpy(host, numaddr);
- } else {
+ pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0];
+#endif
+ if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
+ flags |= NI_NUMERICHOST;
+ break;
+#endif
+ }
+ if (host == NULL || hostlen == 0) {
+ /* what should we do? */
+ } else if (flags & NI_NUMERICHOST) {
+ if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
+ == NULL)
+ return ENI_SYSTEM;
+ if (strlen(numaddr) > hostlen)
+ return ENI_MEMORY;
+ strcpy(host, numaddr);
+ } else {
#ifdef INET6
- hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
+ hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
#else
- hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
- h_error = h_errno;
+ hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
+ h_error = h_errno;
#endif
- if (hp) {
- if (flags & NI_NOFQDN) {
- p = strchr(hp->h_name, '.');
- if (p) *p = '\0';
- }
- if (strlen(hp->h_name) + 1 > hostlen) {
+ if (hp) {
+ if (flags & NI_NOFQDN) {
+ p = strchr(hp->h_name, '.');
+ if (p) *p = '\0';
+ }
+ if (strlen(hp->h_name) + 1 > hostlen) {
#ifdef INET6
- freehostent(hp);
+ freehostent(hp);
#endif
- return ENI_MEMORY;
- }
- strcpy(host, hp->h_name);
+ return ENI_MEMORY;
+ }
+ strcpy(host, hp->h_name);
#ifdef INET6
- freehostent(hp);
-#endif
- } else {
- if (flags & NI_NAMEREQD)
- return ENI_NOHOSTNAME;
- if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
- == NULL)
- return ENI_NOHOSTNAME;
- if (strlen(numaddr) > hostlen)
- return ENI_MEMORY;
- strcpy(host, numaddr);
- }
- }
- return SUCCESS;
+ freehostent(hp);
+#endif
+ } else {
+ if (flags & NI_NAMEREQD)
+ return ENI_NOHOSTNAME;
+ if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
+ == NULL)
+ return ENI_NOHOSTNAME;
+ if (strlen(numaddr) > hostlen)
+ return ENI_MEMORY;
+ strcpy(host, numaddr);
+ }
+ }
+ return SUCCESS;
}
diff --git a/ext/socket/ifaddr.c b/ext/socket/ifaddr.c
index 26aa0c8082..ab163dcc8f 100644
--- a/ext/socket/ifaddr.c
+++ b/ext/socket/ifaddr.c
@@ -104,7 +104,7 @@ rsock_getifaddrs(void)
rb_sys_fail("getifaddrs");
if (!ifaddrs) {
- return rb_ary_new();
+ return rb_ary_new();
}
numifaddrs = 0;
@@ -128,9 +128,9 @@ rsock_getifaddrs(void)
result = rb_ary_new2(numifaddrs);
rb_ary_push(result, addr);
for (i = 1; i < numifaddrs; i++) {
- addr = TypedData_Wrap_Struct(rb_cSockIfaddr, &ifaddr_type, &root->ary[i]);
- root->refcount++;
- rb_ary_push(result, addr);
+ addr = TypedData_Wrap_Struct(rb_cSockIfaddr, &ifaddr_type, &root->ary[i]);
+ root->refcount++;
+ rb_ary_push(result, addr);
}
return result;
@@ -459,7 +459,8 @@ rsock_init_sockifaddr(void)
*
* Socket::Ifaddr represents a result of getifaddrs() function.
*/
- rb_cSockIfaddr = rb_define_class_under(rb_cSocket, "Ifaddr", rb_cData);
+ rb_cSockIfaddr = rb_define_class_under(rb_cSocket, "Ifaddr", rb_cObject);
+ rb_undef_alloc_func(rb_cSockIfaddr);
rb_define_method(rb_cSockIfaddr, "inspect", ifaddr_inspect, 0);
rb_define_method(rb_cSockIfaddr, "name", ifaddr_name, 0);
rb_define_method(rb_cSockIfaddr, "ifindex", ifaddr_ifindex, 0);
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 0675194d74..557d4374a5 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -41,7 +41,7 @@ rsock_raise_socket_error(const char *reason, int error)
#ifdef EAI_SYSTEM
int e;
if (error == EAI_SYSTEM && (e = errno) != 0)
- rb_syserr_fail(e, reason);
+ rb_syserr_fail(e, reason);
#endif
#ifdef _WIN32
rb_encoding *enc = rb_default_internal_encoding();
@@ -54,20 +54,6 @@ rsock_raise_socket_error(const char *reason, int error)
#endif
}
-#ifdef _WIN32
-#define is_socket(fd) rb_w32_is_socket(fd)
-#else
-static int
-is_socket(int fd)
-{
- struct stat sbuf;
-
- if (fstat(fd, &sbuf) < 0)
- rb_sys_fail("fstat(2)");
- return S_ISSOCK(sbuf.st_mode);
-}
-#endif
-
#if defined __APPLE__
# define do_write_retry(code) do {ret = code;} while (ret == -1 && errno == EPROTOTYPE)
#else
@@ -79,17 +65,13 @@ rsock_init_sock(VALUE sock, int fd)
{
rb_io_t *fp;
- if (!is_socket(fd) || rb_reserved_fd_p(fd)) {
- rb_syserr_fail(EBADF, "not a socket file descriptor");
- }
-
rb_update_max_fd(fd);
MakeOpenFile(sock, fp);
fp->fd = fd;
fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
rb_io_ascii8bit_binmode(sock);
if (rsock_do_not_reverse_lookup) {
- fp->mode |= FMODE_NOREVLOOKUP;
+ fp->mode |= FMODE_NOREVLOOKUP;
}
rb_io_synchronized(fp);
@@ -103,7 +85,7 @@ rsock_sendto_blocking(void *data)
VALUE mesg = arg->mesg;
ssize_t ret;
do_write_retry(sendto(arg->fd, RSTRING_PTR(mesg), RSTRING_LEN(mesg),
- arg->flags, arg->to, arg->tolen));
+ arg->flags, arg->to, arg->tolen));
return (VALUE)ret;
}
@@ -114,13 +96,14 @@ rsock_send_blocking(void *data)
VALUE mesg = arg->mesg;
ssize_t ret;
do_write_retry(send(arg->fd, RSTRING_PTR(mesg), RSTRING_LEN(mesg),
- arg->flags));
+ arg->flags));
return (VALUE)ret;
}
struct recvfrom_arg {
int fd, flags;
VALUE str;
+ size_t length;
socklen_t alen;
union_sockaddr buf;
};
@@ -131,10 +114,11 @@ recvfrom_blocking(void *data)
struct recvfrom_arg *arg = data;
socklen_t len0 = arg->alen;
ssize_t ret;
- ret = recvfrom(arg->fd, RSTRING_PTR(arg->str), RSTRING_LEN(arg->str),
+ ret = recvfrom(arg->fd, RSTRING_PTR(arg->str), arg->length,
arg->flags, &arg->buf.addr, &arg->alen);
if (ret != -1 && len0 < arg->alen)
arg->alen = len0;
+
return (VALUE)ret;
}
@@ -148,11 +132,10 @@ rsock_strbuf(VALUE str, long buflen)
StringValue(str);
len = RSTRING_LEN(str);
if (len >= buflen) {
- rb_str_modify(str);
+ rb_str_modify(str);
} else {
- rb_str_modify_expand(str, buflen - len);
+ rb_str_modify_expand(str, buflen - len);
}
- rb_str_set_len(str, buflen);
return str;
}
@@ -165,7 +148,7 @@ recvfrom_locktmp(VALUE v)
}
VALUE
-rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
+rsock_s_recvfrom(VALUE socket, int argc, VALUE *argv, enum sock_recv_type from)
{
rb_io_t *fptr;
VALUE str;
@@ -176,59 +159,70 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
rb_scan_args(argc, argv, "12", &len, &flg, &str);
- if (flg == Qnil) arg.flags = 0;
- else arg.flags = NUM2INT(flg);
+ if (flg == Qnil)
+ arg.flags = 0;
+ else
+ arg.flags = NUM2INT(flg);
+
buflen = NUM2INT(len);
str = rsock_strbuf(str, buflen);
- GetOpenFile(sock, fptr);
+ RB_IO_POINTER(socket, fptr);
+
if (rb_io_read_pending(fptr)) {
- rb_raise(rb_eIOError, "recv for buffered IO");
+ rb_raise(rb_eIOError, "recv for buffered IO");
}
+
arg.fd = fptr->fd;
arg.alen = (socklen_t)sizeof(arg.buf);
arg.str = str;
+ arg.length = buflen;
+
+ while (true) {
+ rb_io_check_closed(fptr);
+
+#ifdef RSOCK_WAIT_BEFORE_BLOCKING
+ rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_READABLE), Qnil);
+#endif
+
+ slen = (long)rb_str_locktmp_ensure(str, recvfrom_locktmp, (VALUE)&arg);
+
+ if (slen >= 0) break;
- while (rb_io_check_closed(fptr),
- rsock_maybe_wait_fd(arg.fd),
- (slen = (long)rb_str_locktmp_ensure(str, recvfrom_locktmp,
- (VALUE)&arg)) < 0) {
- if (!rb_io_wait_readable(fptr->fd)) {
+ if (!rb_io_maybe_wait_readable(errno, socket, RUBY_IO_TIMEOUT_DEFAULT))
rb_sys_fail("recvfrom(2)");
- }
}
- if (slen != RSTRING_LEN(str)) {
- rb_str_set_len(str, slen);
- }
+ /* Resize the string to the amount of data received */
+ rb_str_set_len(str, slen);
switch (from) {
case RECV_RECV:
- return str;
+ return str;
case RECV_IP:
#if 0
- if (arg.alen != sizeof(struct sockaddr_in)) {
- rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
- }
+ if (arg.alen != sizeof(struct sockaddr_in)) {
+ rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
+ }
#endif
- if (arg.alen && arg.alen != sizeof(arg.buf)) /* OSX doesn't return a from result for connection-oriented sockets */
- return rb_assoc_new(str, rsock_ipaddr(&arg.buf.addr, arg.alen, fptr->mode & FMODE_NOREVLOOKUP));
- else
- return rb_assoc_new(str, Qnil);
+ if (arg.alen && arg.alen != sizeof(arg.buf)) /* OSX doesn't return a from result for connection-oriented sockets */
+ return rb_assoc_new(str, rsock_ipaddr(&arg.buf.addr, arg.alen, fptr->mode & FMODE_NOREVLOOKUP));
+ else
+ return rb_assoc_new(str, Qnil);
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case RECV_UNIX:
return rb_assoc_new(str, rsock_unixaddr(&arg.buf.un, arg.alen));
#endif
case RECV_SOCKET:
- return rb_assoc_new(str, rsock_io_socket_addrinfo(sock, &arg.buf.addr, arg.alen));
+ return rb_assoc_new(str, rsock_io_socket_addrinfo(socket, &arg.buf.addr, arg.alen));
default:
- rb_bug("rsock_s_recvfrom called with bad value");
+ rb_bug("rsock_s_recvfrom called with bad value");
}
}
VALUE
rsock_s_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str,
- VALUE ex, enum sock_recv_type from)
+ VALUE ex, enum sock_recv_type from)
{
rb_io_t *fptr;
union_sockaddr buf;
@@ -251,14 +245,14 @@ rsock_s_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str,
GetOpenFile(sock, fptr);
if (rb_io_read_pending(fptr)) {
- rb_raise(rb_eIOError, "recvfrom for buffered IO");
+ rb_raise(rb_eIOError, "recvfrom for buffered IO");
}
fd = fptr->fd;
rb_io_check_closed(fptr);
if (!MSG_DONTWAIT_RELIABLE)
- rb_io_set_nonblock(fptr);
+ rb_io_set_nonblock(fptr);
len0 = alen;
slen = recvfrom(fd, RSTRING_PTR(str), buflen, flags, &buf.addr, &alen);
@@ -266,20 +260,20 @@ rsock_s_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str,
alen = len0;
if (slen < 0) {
- int e = errno;
- switch (e) {
- case EAGAIN:
+ int e = errno;
+ switch (e) {
+ case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EWOULDBLOCK:
#endif
if (ex == Qfalse)
- return sym_wait_readable;
+ return sym_wait_readable;
rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE, e, "recvfrom(2) would block");
- }
- rb_syserr_fail(e, "recvfrom(2)");
+ }
+ rb_syserr_fail(e, "recvfrom(2)");
}
if (slen != RSTRING_LEN(str)) {
- rb_str_set_len(str, slen);
+ rb_str_set_len(str, slen);
}
switch (from) {
case RECV_RECV:
@@ -330,33 +324,31 @@ rsock_read_nonblock(VALUE sock, VALUE length, VALUE buf, VALUE ex)
GetOpenFile(sock, fptr);
if (len == 0) {
- return str;
+ rb_str_set_len(str, 0);
+ return str;
}
ptr = RSTRING_PTR(str);
n = read_buffered_data(ptr, len, fptr);
if (n <= 0) {
- n = (long)recv(fptr->fd, ptr, len, MSG_DONTWAIT);
- if (n < 0) {
- int e = errno;
- if ((e == EWOULDBLOCK || e == EAGAIN)) {
- if (ex == Qfalse) return sym_wait_readable;
- rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
- e, "read would block");
- }
- rb_syserr_fail_path(e, fptr->pathv);
- }
+ n = (long)recv(fptr->fd, ptr, len, MSG_DONTWAIT);
+ if (n < 0) {
+ int e = errno;
+ if ((e == EWOULDBLOCK || e == EAGAIN)) {
+ if (ex == Qfalse) return sym_wait_readable;
+ rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
+ e, "read would block");
+ }
+ rb_syserr_fail_path(e, fptr->pathv);
+ }
}
- if (len != n) {
- rb_str_modify(str);
- rb_str_set_len(str, n);
- if (str != buf) {
- rb_str_resize(str, n);
- }
+ if (n != RSTRING_LEN(str)) {
+ rb_str_modify(str);
+ rb_str_set_len(str, n);
}
if (n == 0) {
- if (ex == Qfalse) return Qnil;
- rb_eof_error();
+ if (ex == Qfalse) return Qnil;
+ rb_eof_error();
}
return str;
@@ -370,7 +362,7 @@ rsock_write_nonblock(VALUE sock, VALUE str, VALUE ex)
long n;
if (!RB_TYPE_P(str, T_STRING))
- str = rb_obj_as_string(str);
+ str = rb_obj_as_string(str);
sock = rb_io_get_write_io(sock);
GetOpenFile(sock, fptr);
@@ -382,7 +374,7 @@ rsock_write_nonblock(VALUE sock, VALUE str, VALUE ex)
* are not userspace-buffered in Ruby by default.
*/
if (fptr->wbuf.len > 0) {
- rb_io_flush(sock);
+ rb_io_flush(sock);
}
#ifdef __APPLE__
@@ -390,103 +382,49 @@ rsock_write_nonblock(VALUE sock, VALUE str, VALUE ex)
#endif
n = (long)send(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str), MSG_DONTWAIT);
if (n < 0) {
- int e = errno;
+ int e = errno;
#ifdef __APPLE__
- if (e == EPROTOTYPE) {
- goto again;
- }
-#endif
- if (e == EWOULDBLOCK || e == EAGAIN) {
- if (ex == Qfalse) return sym_wait_writable;
- rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
- "write would block");
- }
- rb_syserr_fail_path(e, fptr->pathv);
+ if (e == EPROTOTYPE) {
+ goto again;
+ }
+#endif
+ if (e == EWOULDBLOCK || e == EAGAIN) {
+ if (ex == Qfalse) return sym_wait_writable;
+ rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e,
+ "write would block");
+ }
+ rb_syserr_fail_path(e, fptr->pathv);
}
return LONG2FIX(n);
}
#endif /* MSG_DONTWAIT_RELIABLE */
-/* returns true if SOCK_CLOEXEC is supported */
-int rsock_detect_cloexec(int fd)
+static int
+rsock_socket0(int domain, int type, int proto)
{
#ifdef SOCK_CLOEXEC
- int flags = fcntl(fd, F_GETFD);
-
- if (flags == -1)
- rb_bug("rsock_detect_cloexec: fcntl(%d, F_GETFD) failed: %s", fd, strerror(errno));
+ type |= SOCK_CLOEXEC;
+#endif
- if (flags & FD_CLOEXEC)
- return 1;
+#ifdef SOCK_NONBLOCK
+ type |= SOCK_NONBLOCK;
#endif
- return 0;
-}
-#ifdef SOCK_CLOEXEC
-static int
-rsock_socket0(int domain, int type, int proto)
-{
- int ret;
- static int cloexec_state = -1; /* <0: unknown, 0: ignored, >0: working */
-
- if (cloexec_state > 0) { /* common path, if SOCK_CLOEXEC is defined */
- ret = socket(domain, type|SOCK_CLOEXEC|RSOCK_NONBLOCK_DEFAULT, proto);
- if (ret >= 0) {
- if (ret <= 2)
- goto fix_cloexec;
- goto update_max_fd;
- }
- }
- else if (cloexec_state < 0) { /* usually runs once only for detection */
- ret = socket(domain, type|SOCK_CLOEXEC|RSOCK_NONBLOCK_DEFAULT, proto);
- if (ret >= 0) {
- cloexec_state = rsock_detect_cloexec(ret);
- if (cloexec_state == 0 || ret <= 2)
- goto fix_cloexec;
- goto update_max_fd;
- }
- else if (ret == -1 && errno == EINVAL) {
- /* SOCK_CLOEXEC is available since Linux 2.6.27. Linux 2.6.18 fails with EINVAL */
- ret = socket(domain, type, proto);
- if (ret != -1) {
- cloexec_state = 0;
- /* fall through to fix_cloexec */
- }
- }
- }
- else { /* cloexec_state == 0 */
- ret = socket(domain, type, proto);
- }
- if (ret == -1)
+ int result = socket(domain, type, proto);
+
+ if (result == -1)
return -1;
-fix_cloexec:
- rb_maygvl_fd_fix_cloexec(ret);
- if (RSOCK_NONBLOCK_DEFAULT) {
- rsock_make_fd_nonblock(ret);
- }
-update_max_fd:
- rb_update_max_fd(ret);
- return ret;
-}
-#else /* !SOCK_CLOEXEC */
-static int
-rsock_socket0(int domain, int type, int proto)
-{
- int ret = socket(domain, type, proto);
+ rb_fd_fix_cloexec(result);
- if (ret == -1)
- return -1;
- rb_fd_fix_cloexec(ret);
- if (RSOCK_NONBLOCK_DEFAULT) {
- rsock_make_fd_nonblock(ret);
- }
+#ifndef SOCK_NONBLOCK
+ rsock_make_fd_nonblock(result);
+#endif
- return ret;
+ return result;
}
-#endif /* !SOCK_CLOEXEC */
int
rsock_socket(int domain, int type, int proto)
@@ -506,7 +444,7 @@ rsock_socket(int domain, int type, int proto)
/* emulate blocking connect behavior on EINTR or non-blocking socket */
static int
-wait_connectable(int fd)
+wait_connectable(int fd, struct timeval *timeout)
{
int sockerr, revents;
socklen_t sockerrlen;
@@ -543,7 +481,7 @@ wait_connectable(int fd)
*
* Note: rb_wait_for_single_fd already retries on EINTR/ERESTART
*/
- revents = rb_wait_for_single_fd(fd, RB_WAITFD_IN|RB_WAITFD_OUT, NULL);
+ revents = rb_wait_for_single_fd(fd, RB_WAITFD_IN|RB_WAITFD_OUT, timeout);
if (revents < 0)
return -1;
@@ -558,6 +496,12 @@ wait_connectable(int fd)
* be defensive in case some platforms set SO_ERROR on the original,
* interrupted connect()
*/
+
+ /* when the connection timed out, no errno is set and revents is 0. */
+ if (timeout && revents == 0) {
+ errno = ETIMEDOUT;
+ return -1;
+ }
case EINTR:
#ifdef ERESTART
case ERESTART:
@@ -572,7 +516,7 @@ wait_connectable(int fd)
#ifdef EISCONN
case EISCONN:
#endif
- return 0; /* success */
+ return 0; /* success */
default:
/* likely (but not limited to): ECONNREFUSED, ETIMEDOUT, EHOSTUNREACH */
errno = sockerr;
@@ -605,7 +549,7 @@ socks_connect_blocking(void *data)
#endif
int
-rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
+rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks, struct timeval *timeout)
{
int status;
rb_blocking_function_t *func = connect_blocking;
@@ -629,7 +573,7 @@ rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
#ifdef EINPROGRESS
case EINPROGRESS:
#endif
- return wait_connectable(fd);
+ return wait_connectable(fd, timeout);
}
}
return status;
@@ -638,6 +582,10 @@ rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
void
rsock_make_fd_nonblock(int fd)
{
+#ifdef _WIN32
+ return;
+#endif
+
int flags;
#ifdef F_GETFL
flags = fcntl(fd, F_GETFL);
@@ -654,81 +602,59 @@ rsock_make_fd_nonblock(int fd)
}
static int
-cloexec_accept(int socket, struct sockaddr *address, socklen_t *address_len,
- int nonblock)
+cloexec_accept(int socket, struct sockaddr *address, socklen_t *address_len)
{
- int ret;
socklen_t len0 = 0;
-#ifdef HAVE_ACCEPT4
- static int try_accept4 = 1;
-#endif
- if (RSOCK_NONBLOCK_DEFAULT) {
- nonblock = 1;
- }
if (address_len) len0 = *address_len;
+
#ifdef HAVE_ACCEPT4
- if (try_accept4) {
- int flags = 0;
-#ifdef SOCK_CLOEXEC
- flags |= SOCK_CLOEXEC;
-#endif
+ int flags = SOCK_CLOEXEC;
+
#ifdef SOCK_NONBLOCK
- if (nonblock) {
- flags |= SOCK_NONBLOCK;
- }
+ flags |= SOCK_NONBLOCK;
#endif
- ret = accept4(socket, address, address_len, flags);
- /* accept4 is available since Linux 2.6.28, glibc 2.10. */
- if (ret != -1) {
- if (ret <= 2)
- rb_maygvl_fd_fix_cloexec(ret);
+
+ int result = accept4(socket, address, address_len, flags);
+ if (result == -1) return -1;
+
#ifndef SOCK_NONBLOCK
- if (nonblock) {
- rsock_make_fd_nonblock(ret);
- }
+ rsock_make_fd_nonblock(result);
#endif
- if (address_len && len0 < *address_len) *address_len = len0;
- return ret;
- }
- if (errno != ENOSYS) {
- return -1;
- }
- try_accept4 = 0;
- }
+#else
+ int result = accept(socket, address, address_len);
+ if (result == -1) return -1;
+
+ rb_maygvl_fd_fix_cloexec(result);
+ rsock_make_fd_nonblock(result);
#endif
- ret = accept(socket, address, address_len);
- if (ret == -1) return -1;
+
if (address_len && len0 < *address_len) *address_len = len0;
- rb_maygvl_fd_fix_cloexec(ret);
- if (nonblock) {
- rsock_make_fd_nonblock(ret);
- }
- return ret;
+ return result;
}
VALUE
rsock_s_accept_nonblock(VALUE klass, VALUE ex, rb_io_t *fptr,
- struct sockaddr *sockaddr, socklen_t *len)
+ struct sockaddr *sockaddr, socklen_t *len)
{
int fd2;
rb_io_set_nonblock(fptr);
- fd2 = cloexec_accept(fptr->fd, (struct sockaddr*)sockaddr, len, 1);
+ fd2 = cloexec_accept(fptr->fd, (struct sockaddr*)sockaddr, len);
if (fd2 < 0) {
- int e = errno;
- switch (e) {
- case EAGAIN:
+ int e = errno;
+ switch (e) {
+ case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EWOULDBLOCK:
#endif
- case ECONNABORTED:
+ case ECONNABORTED:
#if defined EPROTO
- case EPROTO:
+ case EPROTO:
#endif
if (ex == Qfalse)
- return sym_wait_readable;
+ return sym_wait_readable;
rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE, e, "accept(2) would block");
- }
+ }
rb_syserr_fail(e, "accept(2)");
}
rb_update_max_fd(fd2);
@@ -745,42 +671,53 @@ static VALUE
accept_blocking(void *data)
{
struct accept_arg *arg = data;
- return (VALUE)cloexec_accept(arg->fd, arg->sockaddr, arg->len, 0);
+ return (VALUE)cloexec_accept(arg->fd, arg->sockaddr, arg->len);
}
VALUE
-rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
+rsock_s_accept(VALUE klass, VALUE io, struct sockaddr *sockaddr, socklen_t *len)
{
- int fd2;
- int retry = 0;
- struct accept_arg arg;
+ rb_io_t *fptr = NULL;
+ RB_IO_POINTER(io, fptr);
+
+ struct accept_arg accept_arg = {
+ .fd = fptr->fd,
+ .sockaddr = sockaddr,
+ .len = len
+ };
+
+ int retry = 0, peer;
- arg.fd = fd;
- arg.sockaddr = sockaddr;
- arg.len = len;
retry:
- rsock_maybe_wait_fd(fd);
- fd2 = (int)BLOCKING_REGION_FD(accept_blocking, &arg);
- if (fd2 < 0) {
- int e = errno;
- switch (e) {
- case EMFILE:
- case ENFILE:
- case ENOMEM:
- if (retry) break;
- rb_gc();
- retry = 1;
- goto retry;
- default:
- if (!rb_io_wait_readable(fd)) break;
- retry = 0;
- goto retry;
- }
- rb_syserr_fail(e, "accept(2)");
+#ifdef RSOCK_WAIT_BEFORE_BLOCKING
+ rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_READABLE), Qnil);
+#endif
+ peer = (int)BLOCKING_REGION_FD(accept_blocking, &accept_arg);
+ if (peer < 0) {
+ int error = errno;
+
+ switch (error) {
+ case EMFILE:
+ case ENFILE:
+ case ENOMEM:
+ if (retry) break;
+ rb_gc();
+ retry = 1;
+ goto retry;
+ default:
+ if (!rb_io_maybe_wait_readable(error, io, RUBY_IO_TIMEOUT_DEFAULT)) break;
+ retry = 0;
+ goto retry;
+ }
+
+ rb_syserr_fail(error, "accept(2)");
}
- rb_update_max_fd(fd2);
- if (!klass) return INT2NUM(fd2);
- return rsock_init_sock(rb_obj_alloc(klass), fd2);
+
+ rb_update_max_fd(peer);
+
+ if (!klass) return INT2NUM(peer);
+
+ return rsock_init_sock(rb_obj_alloc(klass), peer);
}
int
@@ -793,11 +730,11 @@ rsock_getfamily(rb_io_t *fptr)
if (cached) {
switch (cached) {
#ifdef AF_UNIX
- case FMODE_UNIX: return AF_UNIX;
+ case FMODE_UNIX: return AF_UNIX;
#endif
- case FMODE_INET: return AF_INET;
- case FMODE_INET6: return AF_INET6;
- }
+ case FMODE_INET: return AF_INET;
+ case FMODE_INET6: return AF_INET6;
+ }
}
ss.addr.sa_family = AF_UNSPEC;
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index a2cb6e0e12..0c13620258 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -14,11 +14,13 @@ struct inetsock_arg
{
VALUE sock;
struct {
- VALUE host, serv;
- struct rb_addrinfo *res;
+ VALUE host, serv;
+ struct rb_addrinfo *res;
} remote, local;
int type;
int fd;
+ VALUE resolv_timeout;
+ VALUE connect_timeout;
};
static VALUE
@@ -26,15 +28,15 @@ inetsock_cleanup(VALUE v)
{
struct inetsock_arg *arg = (void *)v;
if (arg->remote.res) {
- rb_freeaddrinfo(arg->remote.res);
- arg->remote.res = 0;
+ rb_freeaddrinfo(arg->remote.res);
+ arg->remote.res = 0;
}
if (arg->local.res) {
- rb_freeaddrinfo(arg->local.res);
- arg->local.res = 0;
+ rb_freeaddrinfo(arg->local.res);
+ arg->local.res = 0;
}
if (arg->fd >= 0) {
- close(arg->fd);
+ close(arg->fd);
}
return Qnil;
}
@@ -49,24 +51,34 @@ init_inetsock_internal(VALUE v)
int fd, status = 0, local = 0;
int family = AF_UNSPEC;
const char *syscall = 0;
+ VALUE connect_timeout = arg->connect_timeout;
+ struct timeval tv_storage;
+ struct timeval *tv = NULL;
+
+ if (!NIL_P(connect_timeout)) {
+ tv_storage = rb_time_interval(connect_timeout);
+ tv = &tv_storage;
+ }
arg->remote.res = rsock_addrinfo(arg->remote.host, arg->remote.serv,
- family, SOCK_STREAM,
- (type == INET_SERVER) ? AI_PASSIVE : 0);
+ family, SOCK_STREAM,
+ (type == INET_SERVER) ? AI_PASSIVE : 0);
+
+
/*
* Maybe also accept a local address
*/
if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
- arg->local.res = rsock_addrinfo(arg->local.host, arg->local.serv,
- family, SOCK_STREAM, 0);
+ arg->local.res = rsock_addrinfo(arg->local.host, arg->local.serv,
+ family, SOCK_STREAM, 0);
}
arg->fd = fd = -1;
for (res = arg->remote.res->ai; res; res = res->ai_next) {
#if !defined(INET6) && defined(AF_INET6)
- if (res->ai_family == AF_INET6)
- continue;
+ if (res->ai_family == AF_INET6)
+ continue;
#endif
lres = NULL;
if (arg->local.res) {
@@ -82,73 +94,73 @@ init_inetsock_internal(VALUE v)
lres = arg->local.res->ai;
}
}
- status = rsock_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
- syscall = "socket(2)";
- fd = status;
- if (fd < 0) {
- error = errno;
- continue;
- }
- arg->fd = fd;
- if (type == INET_SERVER) {
+ status = rsock_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
+ syscall = "socket(2)";
+ fd = status;
+ if (fd < 0) {
+ error = errno;
+ continue;
+ }
+ arg->fd = fd;
+ if (type == INET_SERVER) {
#if !defined(_WIN32) && !defined(__CYGWIN__)
- status = 1;
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char*)&status, (socklen_t)sizeof(status));
+ status = 1;
+ setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
+ (char*)&status, (socklen_t)sizeof(status));
#endif
- status = bind(fd, res->ai_addr, res->ai_addrlen);
- syscall = "bind(2)";
- }
- else {
- if (lres) {
+ status = bind(fd, res->ai_addr, res->ai_addrlen);
+ syscall = "bind(2)";
+ }
+ else {
+ if (lres) {
#if !defined(_WIN32) && !defined(__CYGWIN__)
status = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(char*)&status, (socklen_t)sizeof(status));
#endif
- status = bind(fd, lres->ai_addr, lres->ai_addrlen);
- local = status;
- syscall = "bind(2)";
- }
-
- if (status >= 0) {
- status = rsock_connect(fd, res->ai_addr, res->ai_addrlen,
- (type == INET_SOCKS));
- syscall = "connect(2)";
- }
- }
-
- if (status < 0) {
- error = errno;
- close(fd);
- arg->fd = fd = -1;
- continue;
- } else
- break;
+ status = bind(fd, lres->ai_addr, lres->ai_addrlen);
+ local = status;
+ syscall = "bind(2)";
+ }
+
+ if (status >= 0) {
+ status = rsock_connect(fd, res->ai_addr, res->ai_addrlen,
+ (type == INET_SOCKS), tv);
+ syscall = "connect(2)";
+ }
+ }
+
+ if (status < 0) {
+ error = errno;
+ close(fd);
+ arg->fd = fd = -1;
+ continue;
+ } else
+ break;
}
if (status < 0) {
- VALUE host, port;
-
- if (local < 0) {
- host = arg->local.host;
- port = arg->local.serv;
- } else {
- host = arg->remote.host;
- port = arg->remote.serv;
- }
+ VALUE host, port;
+
+ if (local < 0) {
+ host = arg->local.host;
+ port = arg->local.serv;
+ } else {
+ host = arg->remote.host;
+ port = arg->remote.serv;
+ }
- rsock_syserr_fail_host_port(error, syscall, host, port);
+ rsock_syserr_fail_host_port(error, syscall, host, port);
}
arg->fd = -1;
if (type == INET_SERVER) {
- status = listen(fd, SOMAXCONN);
- if (status < 0) {
- error = errno;
- close(fd);
- rb_syserr_fail(error, "listen(2)");
- }
+ status = listen(fd, SOMAXCONN);
+ if (status < 0) {
+ error = errno;
+ close(fd);
+ rb_syserr_fail(error, "listen(2)");
+ }
}
/* create new instance */
@@ -157,7 +169,8 @@ init_inetsock_internal(VALUE v)
VALUE
rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv,
- VALUE local_host, VALUE local_serv, int type)
+ VALUE local_host, VALUE local_serv, int type,
+ VALUE resolv_timeout, VALUE connect_timeout)
{
struct inetsock_arg arg;
arg.sock = sock;
@@ -169,8 +182,10 @@ rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv,
arg.local.res = 0;
arg.type = type;
arg.fd = -1;
+ arg.resolv_timeout = resolv_timeout;
+ arg.connect_timeout = connect_timeout;
return rb_ensure(init_inetsock_internal, (VALUE)&arg,
- inetsock_cleanup, (VALUE)&arg);
+ inetsock_cleanup, (VALUE)&arg);
}
static ID id_numeric, id_hostname;
@@ -186,11 +201,11 @@ rsock_revlookup_flag(VALUE revlookup, int *norevlookup)
case Qfalse: return_norevlookup(1);
case Qnil: break;
default:
- Check_Type(revlookup, T_SYMBOL);
- id = SYM2ID(revlookup);
- if (id == id_numeric) return_norevlookup(1);
- if (id == id_hostname) return_norevlookup(0);
- rb_raise(rb_eArgError, "invalid reverse_lookup flag: :%s", rb_id2name(id));
+ Check_Type(revlookup, T_SYMBOL);
+ id = SYM2ID(revlookup);
+ if (id == id_numeric) return_norevlookup(1);
+ if (id == id_hostname) return_norevlookup(0);
+ rb_raise(rb_eArgError, "invalid reverse_lookup flag: :%s", rb_id2name(id));
}
return 0;
#undef return_norevlookup
@@ -211,24 +226,24 @@ ip_inspect(VALUE sock)
socklen_t len = (socklen_t)sizeof addr;
ID id;
if (fptr && fptr->fd >= 0 &&
- getsockname(fptr->fd, &addr.addr, &len) >= 0 &&
- (id = rsock_intern_family(addr.addr.sa_family)) != 0) {
- VALUE family = rb_id2str(id);
- char hbuf[1024], pbuf[1024];
- long slen = RSTRING_LEN(str);
- const char last = (slen > 1 && RSTRING_PTR(str)[slen - 1] == '>') ?
- (--slen, '>') : 0;
- str = rb_str_subseq(str, 0, slen);
- rb_str_cat_cstr(str, ", ");
- rb_str_append(str, family);
- if (!rb_getnameinfo(&addr.addr, len, hbuf, sizeof(hbuf),
- pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV)) {
- rb_str_cat_cstr(str, ", ");
- rb_str_cat_cstr(str, hbuf);
- rb_str_cat_cstr(str, ", ");
- rb_str_cat_cstr(str, pbuf);
- }
- if (last) rb_str_cat(str, &last, 1);
+ getsockname(fptr->fd, &addr.addr, &len) >= 0 &&
+ (id = rsock_intern_family(addr.addr.sa_family)) != 0) {
+ VALUE family = rb_id2str(id);
+ char hbuf[1024], pbuf[1024];
+ long slen = RSTRING_LEN(str);
+ const char last = (slen > 1 && RSTRING_PTR(str)[slen - 1] == '>') ?
+ (--slen, '>') : 0;
+ str = rb_str_subseq(str, 0, slen);
+ rb_str_cat_cstr(str, ", ");
+ rb_str_append(str, family);
+ if (!rb_getnameinfo(&addr.addr, len, hbuf, sizeof(hbuf),
+ pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV)) {
+ rb_str_cat_cstr(str, ", ");
+ rb_str_cat_cstr(str, hbuf);
+ rb_str_cat_cstr(str, ", ");
+ rb_str_cat_cstr(str, pbuf);
+ }
+ if (last) rb_str_cat(str, &last, 1);
}
return str;
}
@@ -243,7 +258,7 @@ ip_inspect(VALUE sock)
* If +reverse_lookup+ is +true+ or +:hostname+,
* hostname is obtained from numeric_address using reverse lookup.
* Or if it is +false+, or +:numeric+,
- * hostname is same as numeric_address.
+ * hostname is the same as numeric_address.
* Or if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+.
* See +Socket.getaddrinfo+ also.
*
@@ -267,9 +282,9 @@ ip_addr(int argc, VALUE *argv, VALUE sock)
GetOpenFile(sock, fptr);
if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
- norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
+ norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
if (getsockname(fptr->fd, &addr.addr, &len) < 0)
- rb_sys_fail("getsockname(2)");
+ rb_sys_fail("getsockname(2)");
return rsock_ipaddr(&addr.addr, len, norevlookup);
}
@@ -284,7 +299,7 @@ ip_addr(int argc, VALUE *argv, VALUE sock)
* If +reverse_lookup+ is +true+ or +:hostname+,
* hostname is obtained from numeric_address using reverse lookup.
* Or if it is +false+, or +:numeric+,
- * hostname is same as numeric_address.
+ * hostname is the same as numeric_address.
* Or if it is +nil+ or omitted, obeys to +ipsocket.do_not_reverse_lookup+.
* See +Socket.getaddrinfo+ also.
*
@@ -308,9 +323,9 @@ ip_peeraddr(int argc, VALUE *argv, VALUE sock)
GetOpenFile(sock, fptr);
if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
- norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
+ norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
if (getpeername(fptr->fd, &addr.addr, &len) < 0)
- rb_sys_fail("getpeername(2)");
+ rb_sys_fail("getpeername(2)");
return rsock_ipaddr(&addr.addr, len, norevlookup);
}
@@ -326,7 +341,7 @@ ip_peeraddr(int argc, VALUE *argv, VALUE sock)
*
* _flags_ should be a bitwise OR of Socket::MSG_* constants.
*
- * ipaddr is same as IPSocket#{peeraddr,addr}.
+ * ipaddr is the same as IPSocket#{peeraddr,addr}.
*
* u1 = UDPSocket.new
* u1.bind("127.0.0.1", 4913)
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index d756a32a5a..eecdc7d4b8 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -1,7 +1,11 @@
# frozen_string_literal: true
require 'socket.so'
-require 'io/wait'
+
+unless IO.method_defined?(:wait_writable, false)
+ # It's only required on older Rubies < v3.2:
+ require 'io/wait'
+end
class Addrinfo
# creates an Addrinfo object from the arguments.
@@ -197,7 +201,7 @@ class Addrinfo
sock = Socket.new(self.pfamily, self.socktype, self.protocol)
begin
sock.ipv6only! if self.ipv6?
- sock.setsockopt(:SOCKET, :REUSEADDR, 1)
+ sock.setsockopt(:SOCKET, :REUSEADDR, 1) unless self.pfamily == Socket::PF_UNIX
sock.bind(self)
sock.listen(backlog)
rescue Exception
@@ -606,7 +610,6 @@ class Socket < BasicSocket
# _opts_ may have following options:
#
# [:connect_timeout] specify the timeout in seconds.
- # [:resolv_timeout] specify the name resolution timeout in seconds.
#
# If a block is given, the block is called with the socket.
# The value of the block is returned.
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index 620a5f60ff..5e6c0668f6 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -358,6 +358,8 @@ SOCK_RAW nil A raw socket provides low-level access for direct access or impleme
SOCK_RDM nil A reliable datagram socket provides reliable delivery of messages
SOCK_SEQPACKET nil A sequential packet socket provides sequenced, reliable two-way connection for datagrams
SOCK_PACKET nil Device-level packet access
+SOCK_NONBLOCK nil Set the O_NONBLOCK file status flag on the open file description (see open(2)) referred to by the new file descriptor.
+SOCK_CLOEXEC nil Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor.
AF_UNSPEC nil Unspecified protocol, any supported address family
PF_UNSPEC nil Unspecified protocol, any supported address family
@@ -397,6 +399,8 @@ AF_SNA nil IBM SNA protocol
PF_SNA nil IBM SNA protocol
AF_DEC nil DECnet protocol
PF_DEC nil DECnet protocol
+AF_DECnet nil DECnet protocol
+PF_DECnet nil DECnet protocol
AF_DLI nil DEC Direct Data Link Interface protocol
PF_DLI nil DEC Direct Data Link Interface protocol
AF_LAT nil Local Area Transport protocol
@@ -438,7 +442,34 @@ AF_E164 nil CCITT (ITU-T) E.164 recommendation
PF_XTP nil eXpress Transfer Protocol
PF_RTIP
PF_PIP
-PF_KEY
+AF_KEY nil Key management protocol, originally developed for usage with IPsec
+PF_KEY nil Key management protocol, originally developed for usage with IPsec
+AF_NETLINK nil Kernel user interface device
+PF_NETLINK nil Kernel user interface device
+AF_RDS nil Reliable Datagram Sockets (RDS) protocol
+PF_RDS nil Reliable Datagram Sockets (RDS) protocol
+AF_PPPOX nil Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE)
+PF_PPPOX nil Generic PPP transport layer, for setting up L2 tunnels (L2TP and PPPoE)
+AF_LLC nil Logical link control (IEEE 802.2 LLC) protocol
+PF_LLC nil Logical link control (IEEE 802.2 LLC) protocol
+AF_IB nil InfiniBand native addressing
+PF_IB nil InfiniBand native addressing
+AF_MPLS nil Multiprotocol Label Switching
+PF_MPLS nil Multiprotocol Label Switching
+AF_CAN nil Controller Area Network automotive bus protocol
+PF_CAN nil Controller Area Network automotive bus protocol
+AF_TIPC nil TIPC, "cluster domain sockets" protocol
+PF_TIPC nil TIPC, "cluster domain sockets" protocol
+AF_BLUETOOTH nil Bluetooth low-level socket protocol
+PF_BLUETOOTH nil Bluetooth low-level socket protocol
+AF_ALG nil Interface to kernel crypto API
+PF_ALG nil Interface to kernel crypto API
+AF_VSOCK nil VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest communication
+PF_VSOCK nil VSOCK (originally "VMWare VSockets") protocol for hypervisor-guest communication
+AF_KCM nil KCM (kernel connection multiplexor) interface
+PF_KCM nil KCM (kernel connection multiplexor) interface
+AF_XDP nil XDP (express data path) interface
+PF_XDP nil XDP (express data path) interface
MSG_OOB nil Process out-of-band data
MSG_PEEK nil Peek at incoming message
@@ -595,6 +626,7 @@ SO_SNDTIMEO nil Send timeout
SO_ACCEPTCONN nil Socket has had listen() called on it
SO_USELOOPBACK nil Bypass hardware when possible
SO_ACCEPTFILTER nil There is an accept filter
+SO_USER_COOKIE nil Setting an identifier for ipfw purpose mainly
SO_DONTTRUNC nil Retain unread data
SO_WANTMORE nil Give a hint when more data is ready
SO_WANTOOBFLAG nil OOB data is wanted in MSG_FLAG on receive
@@ -630,6 +662,10 @@ SO_SELECT_ERR_QUEUE nil Make select() detect socket error queue with err
SO_BUSY_POLL nil Set the threshold in microseconds for low latency polling (Linux 3.11)
SO_MAX_PACING_RATE nil Cap the rate computed by transport layer. [bytes per second] (Linux 3.13)
SO_BPF_EXTENSIONS nil Query supported BPF extensions (Linux 3.14)
+SO_SETFIB nil Set the associated routing table for the socket (FreeBSD)
+SO_RTABLE nil Set the routing table for this socket (OpenBSD)
+SO_INCOMING_CPU nil Receive the cpu attached to the socket (Linux 3.19)
+SO_INCOMING_NAPI_ID nil Receive the napi ID attached to a RX queue (Linux 4.12)
SOPRI_INTERACTIVE nil Interactive socket priority
SOPRI_NORMAL nil Normal socket priority
@@ -639,9 +675,11 @@ IPX_TYPE
TCP_NODELAY nil Don't delay sending to coalesce packets
TCP_MAXSEG nil Set maximum segment size
+TCP_CONNECTION_INFO nil Retrieve information about this socket (macOS)
TCP_CORK nil Don't send partial frames (Linux 2.2, glibc 2.2)
TCP_DEFER_ACCEPT nil Don't notify a listening socket until data is ready (Linux 2.4, glibc 2.2)
TCP_INFO nil Retrieve information about this socket (Linux 2.4, glibc 2.2)
+TCP_KEEPALIVE nil Idle time before keepalive probes are sent (macOS)
TCP_KEEPCNT nil Maximum number of keepalive probes allowed before dropping a connection (Linux 2.4, glibc 2.2)
TCP_KEEPIDLE nil Idle time before keepalive probes are sent (Linux 2.4, glibc 2.2)
TCP_KEEPINTVL nil Time between keepalive probes (Linux 2.4, glibc 2.2)
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 5ad44cdcd8..0d818d0c70 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -31,7 +31,7 @@ VALUE rb_cSockOpt;
((len) == (size) ? \
(void)0 : \
rb_raise(rb_eTypeError, "size differ. expected as "#size"=%d but %ld", \
- (int)size, (long)(len)))
+ (int)size, (long)(len)))
static VALUE
sockopt_pack_byte(VALUE value)
@@ -106,9 +106,9 @@ sockopt_initialize(VALUE self, VALUE vfamily, VALUE vlevel, VALUE voptname, VALU
VALUE
rsock_sockopt_new(int family, int level, int optname, VALUE data)
{
- NEWOBJ_OF(obj, struct RObject, rb_cSockOpt, T_OBJECT);
+ VALUE obj = rb_obj_alloc(rb_cSockOpt);
StringValue(data);
- sockopt_initialize((VALUE)obj, INT2NUM(family), INT2NUM(level), INT2NUM(optname), data);
+ sockopt_initialize(obj, INT2NUM(family), INT2NUM(level), INT2NUM(optname), data);
return (VALUE)obj;
}
@@ -309,7 +309,7 @@ sockopt_bool(VALUE self)
StringValue(data);
len = RSTRING_LEN(data);
if (len == 1) {
- return *RSTRING_PTR(data) == 0 ? Qfalse : Qtrue;
+ return *RSTRING_PTR(data) == 0 ? Qfalse : Qtrue;
}
check_size(len, sizeof(int));
memcpy((char*)&i, RSTRING_PTR(data), len);
@@ -420,7 +420,7 @@ sockopt_ipv4_multicast_loop(VALUE self)
#if defined(IPPROTO_IP) && defined(IP_MULTICAST_LOOP)
if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_LOOP) {
- return XCAT(sockopt_,TYPE_IP_MULTICAST_LOOP)(self);
+ return XCAT(sockopt_,TYPE_IP_MULTICAST_LOOP)(self);
}
#endif
rb_raise(rb_eTypeError, "ipv4_multicast_loop socket option expected");
@@ -471,7 +471,7 @@ sockopt_ipv4_multicast_ttl(VALUE self)
#if defined(IPPROTO_IP) && defined(IP_MULTICAST_TTL)
if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_TTL) {
- return XCAT(sockopt_,TYPE_IP_MULTICAST_TTL)(self);
+ return XCAT(sockopt_,TYPE_IP_MULTICAST_TTL)(self);
}
#endif
rb_raise(rb_eTypeError, "ipv4_multicast_ttl socket option expected");
@@ -657,8 +657,8 @@ inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
#else
unsigned long x = ntohl(*(unsigned long*)addr);
snprintf(numaddr, numaddr_len, "%d.%d.%d.%d",
- (int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
- (int) (x>> 8) & 0xff, (int) (x>> 0) & 0xff);
+ (int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
+ (int) (x>> 8) & 0xff, (int) (x>> 0) & 0xff);
#endif
return numaddr;
}
@@ -670,10 +670,10 @@ rb_if_indextoname(const char *succ_prefix, const char *fail_prefix, unsigned int
{
#if defined(HAVE_IF_INDEXTONAME)
char ifbuf[IFNAMSIZ];
- if (if_indextoname(ifindex, ifbuf) == NULL)
- return snprintf(buf, len, "%s%u", fail_prefix, ifindex);
- else
+ if (if_indextoname(ifindex, ifbuf))
return snprintf(buf, len, "%s%s", succ_prefix, ifbuf);
+ else
+ return snprintf(buf, len, "%s%u", fail_prefix, ifindex);
#else
# ifndef IFNAMSIZ
# define IFNAMSIZ (sizeof(unsigned int)*3+1)
@@ -1059,16 +1059,16 @@ inspect_tcp_info(int level, int optname, VALUE data, VALUE ret)
rb_str_catf(ret, " fackets=%u", s.tcpi_fackets);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_LAST_DATA_SENT
- inspect_tcpi_last_data_sent(ret, s.tcpi_last_data_sent);
+ inspect_tcpi_last_data_sent(ret, s.tcpi_last_data_sent);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_LAST_ACK_SENT
- inspect_tcpi_last_ack_sent(ret, s.tcpi_last_ack_sent);
+ inspect_tcpi_last_ack_sent(ret, s.tcpi_last_ack_sent);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_LAST_DATA_RECV
- inspect_tcpi_last_data_recv(ret, s.tcpi_last_data_recv);
+ inspect_tcpi_last_data_recv(ret, s.tcpi_last_data_recv);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_LAST_ACK_RECV
- inspect_tcpi_last_ack_recv(ret, s.tcpi_last_ack_recv);
+ inspect_tcpi_last_ack_recv(ret, s.tcpi_last_ack_recv);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_PMTU
rb_str_catf(ret, " pmtu=%u", s.tcpi_pmtu);
@@ -1077,10 +1077,10 @@ inspect_tcp_info(int level, int optname, VALUE data, VALUE ret)
rb_str_catf(ret, " rcv_ssthresh=%u", s.tcpi_rcv_ssthresh);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_RTT
- inspect_tcpi_rtt(ret, s.tcpi_rtt);
+ inspect_tcpi_rtt(ret, s.tcpi_rtt);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_RTTVAR
- inspect_tcpi_rttvar(ret, s.tcpi_rttvar);
+ inspect_tcpi_rttvar(ret, s.tcpi_rttvar);
#endif
#ifdef HAVE_STRUCT_TCP_INFO_TCPI_SND_SSTHRESH
rb_str_catf(ret, " snd_ssthresh=%u", s.tcpi_snd_ssthresh);
@@ -1150,7 +1150,7 @@ inspect_peercred(int level, int optname, VALUE data, VALUE ret)
RUBY_SOCK_PEERCRED cred;
memcpy(&cred, RSTRING_PTR(data), sizeof(RUBY_SOCK_PEERCRED));
rb_str_catf(ret, " pid=%u euid=%u egid=%u",
- (unsigned)cred.pid, (unsigned)cred.uid, (unsigned)cred.gid);
+ (unsigned)cred.pid, (unsigned)cred.uid, (unsigned)cred.gid);
rb_str_cat2(ret, " (ucred)");
return 1;
}
@@ -1171,14 +1171,14 @@ inspect_local_peercred(int level, int optname, VALUE data, VALUE ret)
return 0;
rb_str_catf(ret, " version=%u", cred.cr_version);
rb_str_catf(ret, " euid=%u", cred.cr_uid);
- if (cred.cr_ngroups) {
- int i;
- const char *sep = " groups=";
- for (i = 0; i < cred.cr_ngroups; i++) {
- rb_str_catf(ret, "%s%u", sep, cred.cr_groups[i]);
- sep = ",";
- }
- }
+ if (cred.cr_ngroups) {
+ int i;
+ const char *sep = " groups=";
+ for (i = 0; i < cred.cr_ngroups; i++) {
+ rb_str_catf(ret, "%s%u", sep, cred.cr_groups[i]);
+ sep = ",";
+ }
+ }
rb_str_cat2(ret, " (xucred)");
return 1;
}
@@ -1216,42 +1216,42 @@ sockopt_inspect(VALUE self)
family_id = rsock_intern_family_noprefix(family);
if (family_id)
- rb_str_catf(ret, " %s", rb_id2name(family_id));
+ rb_str_catf(ret, " %s", rb_id2name(family_id));
else
rb_str_catf(ret, " family:%d", family);
if (level == SOL_SOCKET) {
rb_str_cat2(ret, " SOCKET");
- optname_id = rsock_intern_so_optname(optname);
- if (optname_id)
- rb_str_catf(ret, " %s", rb_id2name(optname_id));
- else
- rb_str_catf(ret, " optname:%d", optname);
+ optname_id = rsock_intern_so_optname(optname);
+ if (optname_id)
+ rb_str_catf(ret, " %s", rb_id2name(optname_id));
+ else
+ rb_str_catf(ret, " optname:%d", optname);
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
else if (family == AF_UNIX) {
- rb_str_catf(ret, " level:%d", level);
+ rb_str_catf(ret, " level:%d", level);
- optname_id = rsock_intern_local_optname(optname);
- if (optname_id)
- rb_str_catf(ret, " %s", rb_id2name(optname_id));
- else
- rb_str_catf(ret, " optname:%d", optname);
+ optname_id = rsock_intern_local_optname(optname);
+ if (optname_id)
+ rb_str_catf(ret, " %s", rb_id2name(optname_id));
+ else
+ rb_str_catf(ret, " optname:%d", optname);
}
#endif
else if (IS_IP_FAMILY(family)) {
- level_id = rsock_intern_iplevel(level);
- if (level_id)
- rb_str_catf(ret, " %s", rb_id2name(level_id));
- else
- rb_str_catf(ret, " level:%d", level);
-
- v = optname_to_sym(level, optname);
- if (SYMBOL_P(v))
- rb_str_catf(ret, " %"PRIsVALUE, rb_sym2str(v));
- else
- rb_str_catf(ret, " optname:%d", optname);
+ level_id = rsock_intern_iplevel(level);
+ if (level_id)
+ rb_str_catf(ret, " %s", rb_id2name(level_id));
+ else
+ rb_str_catf(ret, " level:%d", level);
+
+ v = optname_to_sym(level, optname);
+ if (SYMBOL_P(v))
+ rb_str_catf(ret, " %"PRIsVALUE, rb_sym2str(v));
+ else
+ rb_str_catf(ret, " optname:%d", optname);
}
else {
rb_str_catf(ret, " level:%d", level);
@@ -1393,7 +1393,7 @@ sockopt_inspect(VALUE self)
}
break;
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX:
switch (level) {
case 0:
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 9ec2fdc329..45b4cad38f 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -24,28 +24,28 @@ static const int lookup_order_table[] = {
static int
ruby_getaddrinfo(const char *nodename, const char *servname,
- const struct addrinfo *hints, struct addrinfo **res)
+ const struct addrinfo *hints, struct addrinfo **res)
{
struct addrinfo tmp_hints;
int i, af, error;
if (hints->ai_family != PF_UNSPEC) {
- return getaddrinfo(nodename, servname, hints, res);
+ return getaddrinfo(nodename, servname, hints, res);
}
for (i = 0; i < LOOKUP_ORDERS; i++) {
- af = lookup_order_table[i];
- MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
- tmp_hints.ai_family = af;
- error = getaddrinfo(nodename, servname, &tmp_hints, res);
- if (error) {
- if (tmp_hints.ai_family == PF_UNSPEC) {
- break;
- }
- }
- else {
- break;
- }
+ af = lookup_order_table[i];
+ MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
+ tmp_hints.ai_family = af;
+ error = getaddrinfo(nodename, servname, &tmp_hints, res);
+ if (error) {
+ if (tmp_hints.ai_family == PF_UNSPEC) {
+ break;
+ }
+ }
+ else {
+ break;
+ }
}
return error;
@@ -56,17 +56,17 @@ ruby_getaddrinfo(const char *nodename, const char *servname,
#if defined(_AIX)
static int
ruby_getaddrinfo__aix(const char *nodename, const char *servname,
- const struct addrinfo *hints, struct addrinfo **res)
+ const struct addrinfo *hints, struct addrinfo **res)
{
int error = getaddrinfo(nodename, servname, hints, res);
struct addrinfo *r;
if (error)
- return error;
+ return error;
for (r = *res; r != NULL; r = r->ai_next) {
- if (r->ai_addr->sa_family == 0)
- r->ai_addr->sa_family = r->ai_family;
- if (r->ai_addr->sa_len == 0)
- r->ai_addr->sa_len = r->ai_addrlen;
+ if (r->ai_addr->sa_family == 0)
+ r->ai_addr->sa_family = r->ai_family;
+ if (r->ai_addr->sa_len == 0)
+ r->ai_addr->sa_len = r->ai_addrlen;
}
return 0;
}
@@ -74,21 +74,21 @@ ruby_getaddrinfo__aix(const char *nodename, const char *servname,
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res))
static int
ruby_getnameinfo__aix(const struct sockaddr *sa, size_t salen,
- char *host, size_t hostlen,
- char *serv, size_t servlen, int flags)
+ char *host, size_t hostlen,
+ char *serv, size_t servlen, int flags)
{
struct sockaddr_in6 *sa6;
u_int32_t *a6;
if (sa->sa_family == AF_INET6) {
- sa6 = (struct sockaddr_in6 *)sa;
- a6 = sa6->sin6_addr.u6_addr.u6_addr32;
+ sa6 = (struct sockaddr_in6 *)sa;
+ a6 = sa6->sin6_addr.u6_addr.u6_addr32;
- if (a6[0] == 0 && a6[1] == 0 && a6[2] == 0 && a6[3] == 0) {
- strncpy(host, "::", hostlen);
- snprintf(serv, servlen, "%d", sa6->sin6_port);
- return 0;
- }
+ if (a6[0] == 0 && a6[1] == 0 && a6[2] == 0 && a6[3] == 0) {
+ strncpy(host, "::", hostlen);
+ snprintf(serv, servlen, "%d", sa6->sin6_port);
+ return 0;
+ }
}
return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
}
@@ -102,7 +102,7 @@ static int str_is_number(const char *);
#if defined(__APPLE__)
static int
ruby_getaddrinfo__darwin(const char *nodename, const char *servname,
- const struct addrinfo *hints, struct addrinfo **res)
+ const struct addrinfo *hints, struct addrinfo **res)
{
/* fix [ruby-core:29427] */
const char *tmp_servname;
@@ -112,12 +112,12 @@ ruby_getaddrinfo__darwin(const char *nodename, const char *servname,
tmp_servname = servname;
MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
if (nodename && servname) {
- if (str_is_number(tmp_servname) && atoi(servname) == 0) {
- tmp_servname = NULL;
+ if (str_is_number(tmp_servname) && atoi(servname) == 0) {
+ tmp_servname = NULL;
#ifdef AI_NUMERICSERV
- if (tmp_hints.ai_flags) tmp_hints.ai_flags &= ~AI_NUMERICSERV;
+ if (tmp_hints.ai_flags) tmp_hints.ai_flags &= ~AI_NUMERICSERV;
#endif
- }
+ }
}
error = getaddrinfo(nodename, tmp_servname, &tmp_hints, res);
@@ -193,33 +193,12 @@ nogvl_getaddrinfo(void *arg)
* it cause getaddrinfo to return EAI_SYSTEM/ENOENT. [ruby-list:49420]
*/
if (ret == EAI_SYSTEM && errno == ENOENT)
- ret = EAI_NONAME;
+ ret = EAI_NONAME;
#endif
return (void *)(VALUE)ret;
}
#endif
-#ifdef HAVE_GETADDRINFO_A
-struct gai_suspend_arg
-{
- struct gaicb *req;
- struct timespec *timeout;
-};
-
-static void *
-nogvl_gai_suspend(void *arg)
-{
- int ret;
- struct gai_suspend_arg *ptr = arg;
- struct gaicb const *wait_reqs[1];
-
- wait_reqs[0] = ptr->req;
- ret = gai_suspend(wait_reqs, 1, ptr->timeout);
-
- return (void *)(VALUE)ret;
-}
-#endif
-
static int
numeric_getaddrinfo(const char *node, const char *service,
const struct addrinfo *hints,
@@ -233,15 +212,15 @@ numeric_getaddrinfo(const char *node, const char *service,
int port;
if (node && parse_numeric_port(service, &port)) {
- static const struct {
- int socktype;
- int protocol;
- } list[] = {
- { SOCK_STREAM, IPPROTO_TCP },
- { SOCK_DGRAM, IPPROTO_UDP },
- { SOCK_RAW, 0 }
- };
- struct addrinfo *ai = NULL;
+ static const struct {
+ int socktype;
+ int protocol;
+ } list[] = {
+ { SOCK_STREAM, IPPROTO_TCP },
+ { SOCK_DGRAM, IPPROTO_UDP },
+ { SOCK_RAW, 0 }
+ };
+ struct addrinfo *ai = NULL;
int hint_family = hints ? hints->ai_family : PF_UNSPEC;
int hint_socktype = hints ? hints->ai_socktype : 0;
int hint_protocol = hints ? hints->ai_protocol : 0;
@@ -305,98 +284,12 @@ numeric_getaddrinfo(const char *node, const char *service,
return EAI_FAIL;
}
-int
-rb_getaddrinfo(const char *node, const char *service,
- const struct addrinfo *hints,
- struct rb_addrinfo **res)
-{
- struct addrinfo *ai;
- int ret;
- int allocated_by_malloc = 0;
-
- ret = numeric_getaddrinfo(node, service, hints, &ai);
- if (ret == 0)
- allocated_by_malloc = 1;
- else {
-#ifdef GETADDRINFO_EMU
- ret = getaddrinfo(node, service, hints, &ai);
-#else
- struct getaddrinfo_arg arg;
- MEMZERO(&arg, struct getaddrinfo_arg, 1);
- arg.node = node;
- arg.service = service;
- arg.hints = hints;
- arg.res = &ai;
- ret = (int)(VALUE)rb_thread_call_without_gvl(nogvl_getaddrinfo, &arg, RUBY_UBF_IO, 0);
-#endif
- }
-
- if (ret == 0) {
- *res = (struct rb_addrinfo *)xmalloc(sizeof(struct rb_addrinfo));
- (*res)->allocated_by_malloc = allocated_by_malloc;
- (*res)->ai = ai;
- }
- return ret;
-}
-
-#ifdef HAVE_GETADDRINFO_A
-int
-rb_getaddrinfo_a(const char *node, const char *service,
- const struct addrinfo *hints,
- struct rb_addrinfo **res, struct timespec *timeout)
-{
- struct addrinfo *ai;
- int ret;
- int allocated_by_malloc = 0;
-
- ret = numeric_getaddrinfo(node, service, hints, &ai);
- if (ret == 0)
- allocated_by_malloc = 1;
- else {
- struct gai_suspend_arg arg;
- struct gaicb *reqs[1];
- struct gaicb req;
-
- req.ar_name = node;
- req.ar_service = service;
- req.ar_request = hints;
-
- reqs[0] = &req;
- ret = getaddrinfo_a(GAI_NOWAIT, reqs, 1, NULL);
- if (ret) return ret;
-
- arg.req = &req;
- arg.timeout = timeout;
-
- ret = (int)(VALUE)rb_thread_call_without_gvl(nogvl_gai_suspend, &arg, RUBY_UBF_IO, 0);
-
- if (ret) {
- /* on Ubuntu 18.04 (or other systems), gai_suspend(3) returns EAI_SYSTEM/ENOENT on timeout */
- if (ret == EAI_SYSTEM && errno == ENOENT) {
- return EAI_AGAIN;
- } else {
- return ret;
- }
- }
-
- ret = gai_error(reqs[0]);
- ai = reqs[0]->ar_result;
- }
-
- if (ret == 0) {
- *res = (struct rb_addrinfo *)xmalloc(sizeof(struct rb_addrinfo));
- (*res)->allocated_by_malloc = allocated_by_malloc;
- (*res)->ai = ai;
- }
- return ret;
-}
-#endif
-
void
rb_freeaddrinfo(struct rb_addrinfo *ai)
{
- if (!ai->allocated_by_malloc)
- freeaddrinfo(ai->ai);
+ if (!ai->allocated_by_malloc) {
+ if (ai->ai) freeaddrinfo(ai->ai);
+ }
else {
struct addrinfo *ai1, *ai2;
ai1 = ai->ai;
@@ -427,9 +320,9 @@ nogvl_getnameinfo(void *arg)
{
struct getnameinfo_arg *ptr = arg;
return (void *)(VALUE)getnameinfo(ptr->sa, ptr->salen,
- ptr->host, (socklen_t)ptr->hostlen,
- ptr->serv, (socklen_t)ptr->servlen,
- ptr->flags);
+ ptr->host, (socklen_t)ptr->hostlen,
+ ptr->serv, (socklen_t)ptr->servlen,
+ ptr->flags);
}
#endif
@@ -572,41 +465,63 @@ port_str(VALUE port, char *pbuf, size_t pbuflen, int *flags_ptr)
}
}
-struct rb_addrinfo*
-rsock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack)
-{
- struct rb_addrinfo* res = NULL;
- char *hostp, *portp;
- int error;
- char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
- int additional_flags = 0;
-
- hostp = host_str(host, hbuf, sizeof(hbuf), &additional_flags);
- portp = port_str(port, pbuf, sizeof(pbuf), &additional_flags);
-
- if (socktype_hack && hints->ai_socktype == 0 && str_is_number(portp)) {
- hints->ai_socktype = SOCK_DGRAM;
- }
- hints->ai_flags |= additional_flags;
-
- error = rb_getaddrinfo(hostp, portp, hints, &res);
- if (error) {
- if (hostp && hostp[strlen(hostp)-1] == '\n') {
- rb_raise(rb_eSocket, "newline at the end of hostname");
+static int
+rb_scheduler_getaddrinfo(VALUE scheduler, VALUE host, const char *service,
+ const struct addrinfo *hints, struct rb_addrinfo **res)
+{
+ int error, res_allocated = 0, _additional_flags = 0;
+ long i, len;
+ struct addrinfo *ai, *ai_tail = NULL;
+ char *hostp;
+ char _hbuf[NI_MAXHOST];
+ VALUE ip_addresses_array, ip_address;
+
+ ip_addresses_array = rb_fiber_scheduler_address_resolve(scheduler, host);
+
+ if (ip_addresses_array == Qundef) {
+ // Returns EAI_FAIL if the scheduler hook is not implemented:
+ return EAI_FAIL;
+ } else if (ip_addresses_array == Qnil) {
+ len = 0;
+ } else {
+ len = RARRAY_LEN(ip_addresses_array);
+ }
+
+ for(i=0; i<len; i++) {
+ ip_address = rb_ary_entry(ip_addresses_array, i);
+ hostp = host_str(ip_address, _hbuf, sizeof(_hbuf), &_additional_flags);
+ error = numeric_getaddrinfo(hostp, service, hints, &ai);
+ if (error == 0) {
+ if (!res_allocated) {
+ res_allocated = 1;
+ *res = (struct rb_addrinfo *)xmalloc(sizeof(struct rb_addrinfo));
+ (*res)->allocated_by_malloc = 1;
+ (*res)->ai = ai;
+ ai_tail = ai;
+ } else {
+ while (ai_tail->ai_next) {
+ ai_tail = ai_tail->ai_next;
+ }
+ ai_tail->ai_next = ai;
+ ai_tail = ai;
+ }
}
- rsock_raise_socket_error("getaddrinfo", error);
}
- return res;
+ if (res_allocated) { // At least one valid result.
+ return 0;
+ } else {
+ return EAI_NONAME;
+ }
}
-#ifdef HAVE_GETADDRINFO_A
-static struct rb_addrinfo*
-rsock_getaddrinfo_a(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack, VALUE timeout)
+struct rb_addrinfo*
+rsock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack)
{
struct rb_addrinfo* res = NULL;
+ struct addrinfo *ai;
char *hostp, *portp;
- int error;
+ int error = 0;
char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
int additional_flags = 0;
@@ -614,27 +529,56 @@ rsock_getaddrinfo_a(VALUE host, VALUE port, struct addrinfo *hints, int socktype
portp = port_str(port, pbuf, sizeof(pbuf), &additional_flags);
if (socktype_hack && hints->ai_socktype == 0 && str_is_number(portp)) {
- hints->ai_socktype = SOCK_DGRAM;
+ hints->ai_socktype = SOCK_DGRAM;
}
hints->ai_flags |= additional_flags;
- if (NIL_P(timeout)) {
- error = rb_getaddrinfo(hostp, portp, hints, &res);
+ error = numeric_getaddrinfo(hostp, portp, hints, &ai);
+ if (error == 0) {
+ res = (struct rb_addrinfo *)xmalloc(sizeof(struct rb_addrinfo));
+ res->allocated_by_malloc = 1;
+ res->ai = ai;
} else {
- struct timespec _timeout = rb_time_timespec_interval(timeout);
- error = rb_getaddrinfo_a(hostp, portp, hints, &res, &_timeout);
+ VALUE scheduler = rb_fiber_scheduler_current();
+ int resolved = 0;
+
+ if (scheduler != Qnil && hostp && !(hints->ai_flags & AI_NUMERICHOST)) {
+ error = rb_scheduler_getaddrinfo(scheduler, host, portp, hints, &res);
+
+ if (error != EAI_FAIL) {
+ resolved = 1;
+ }
+ }
+
+ if (!resolved) {
+#ifdef GETADDRINFO_EMU
+ error = getaddrinfo(hostp, portp, hints, &ai);
+#else
+ struct getaddrinfo_arg arg;
+ MEMZERO(&arg, struct getaddrinfo_arg, 1);
+ arg.node = hostp;
+ arg.service = portp;
+ arg.hints = hints;
+ arg.res = &ai;
+ error = (int)(VALUE)rb_thread_call_without_gvl(nogvl_getaddrinfo, &arg, RUBY_UBF_IO, 0);
+#endif
+ if (error == 0) {
+ res = (struct rb_addrinfo *)xmalloc(sizeof(struct rb_addrinfo));
+ res->allocated_by_malloc = 0;
+ res->ai = ai;
+ }
+ }
}
if (error) {
if (hostp && hostp[strlen(hostp)-1] == '\n') {
rb_raise(rb_eSocket, "newline at the end of hostname");
}
- rsock_raise_socket_error("getaddrinfo_a", error);
+ rsock_raise_socket_error("getaddrinfo", error);
}
return res;
}
-#endif
int
rsock_fd_family(int fd)
@@ -644,7 +588,7 @@ rsock_fd_family(int fd)
if (fd < 0 || getsockname(fd, &sa, &sa_len) != 0 ||
(size_t)sa_len < offsetof(struct sockaddr, sa_family) + sizeof(sa.sa_family)) {
- return AF_UNSPEC;
+ return AF_UNSPEC;
}
return sa.sa_family;
}
@@ -675,8 +619,7 @@ rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup)
family = rb_str_dup(rb_id2str(id));
}
else {
- sprintf(pbuf, "unknown:%d", sockaddr->sa_family);
- family = rb_str_new2(pbuf);
+ family = rb_sprintf("unknown:%d", sockaddr->sa_family);
}
addr1 = Qnil;
@@ -702,7 +645,7 @@ rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup)
return ary;
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
static long
unixsocket_len(const struct sockaddr_un *su, socklen_t socklen)
{
@@ -734,19 +677,19 @@ rsock_unix_sockaddr_len(VALUE path)
{
#ifdef __linux__
if (RSTRING_LEN(path) == 0) {
- /* autobind; see unix(7) for details. */
- return (socklen_t) sizeof(sa_family_t);
+ /* autobind; see unix(7) for details. */
+ return (socklen_t) sizeof(sa_family_t);
}
else if (RSTRING_PTR(path)[0] == '\0') {
- /* abstract namespace; see unix(7) for details. */
+ /* abstract namespace; see unix(7) for details. */
if (SOCKLEN_MAX - offsetof(struct sockaddr_un, sun_path) < (size_t)RSTRING_LEN(path))
rb_raise(rb_eArgError, "Linux abstract socket too long");
- return (socklen_t) offsetof(struct sockaddr_un, sun_path) +
- RSTRING_SOCKLEN(path);
+ return (socklen_t) offsetof(struct sockaddr_un, sun_path) +
+ RSTRING_SOCKLEN(path);
}
else {
#endif
- return (socklen_t) sizeof(struct sockaddr_un);
+ return (socklen_t) sizeof(struct sockaddr_un);
#ifdef __linux__
}
#endif
@@ -784,7 +727,7 @@ make_hostent_internal(VALUE v)
rb_ary_push(ary, rb_str_new2(hostp));
if (addr->ai_canonname && strlen(addr->ai_canonname) < NI_MAXHOST &&
- (h = gethostbyname(addr->ai_canonname))) {
+ (h = gethostbyname(addr->ai_canonname))) {
names = rb_ary_new();
if (h->h_aliases != NULL) {
for (pch = h->h_aliases; *pch; pch++) {
@@ -932,27 +875,19 @@ call_getaddrinfo(VALUE node, VALUE service,
hints.ai_family = NIL_P(family) ? PF_UNSPEC : rsock_family_arg(family);
if (!NIL_P(socktype)) {
- hints.ai_socktype = rsock_socktype_arg(socktype);
+ hints.ai_socktype = rsock_socktype_arg(socktype);
}
if (!NIL_P(protocol)) {
- hints.ai_protocol = NUM2INT(protocol);
+ hints.ai_protocol = NUM2INT(protocol);
}
if (!NIL_P(flags)) {
- hints.ai_flags = NUM2INT(flags);
+ hints.ai_flags = NUM2INT(flags);
}
-#ifdef HAVE_GETADDRINFO_A
- if (NIL_P(timeout)) {
- res = rsock_getaddrinfo(node, service, &hints, socktype_hack);
- } else {
- res = rsock_getaddrinfo_a(node, service, &hints, socktype_hack, timeout);
- }
-#else
res = rsock_getaddrinfo(node, service, &hints, socktype_hack);
-#endif
if (res == NULL)
- rb_raise(rb_eSocket, "host not found");
+ rb_raise(rb_eSocket, "host not found");
return res;
}
@@ -1083,7 +1018,7 @@ addrinfo_list_new(VALUE node, VALUE service, VALUE family, VALUE socktype, VALUE
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
static void
init_unix_addrinfo(rb_addrinfo_t *rai, VALUE path, int socktype)
{
@@ -1102,7 +1037,7 @@ init_unix_addrinfo(rb_addrinfo_t *rai, VALUE path, int socktype)
len = rsock_unix_sockaddr_len(path);
init_addrinfo(rai, (struct sockaddr *)&un, len,
- PF_UNIX, socktype, 0, Qnil, Qnil);
+ PF_UNIX, socktype, 0, Qnil, Qnil);
}
static long
@@ -1130,13 +1065,13 @@ rai_unixsocket_len(const rb_addrinfo_t *rai)
* Socket.sockaddr_in or Socket.unpack_sockaddr_un.
*
* sockaddr examples:
- * - ["AF_INET", 46102, "localhost.localdomain", "127.0.0.1"]
- * - ["AF_INET6", 42304, "ip6-localhost", "::1"]
- * - ["AF_UNIX", "/tmp/sock"]
- * - Socket.sockaddr_in("smtp", "2001:DB8::1")
- * - Socket.sockaddr_in(80, "172.18.22.42")
- * - Socket.sockaddr_in(80, "www.ruby-lang.org")
- * - Socket.sockaddr_un("/tmp/sock")
+ * - <code>["AF_INET", 46102, "localhost.localdomain", "127.0.0.1"]</code>
+ * - <code>["AF_INET6", 42304, "ip6-localhost", "::1"]</code>
+ * - <code>["AF_UNIX", "/tmp/sock"]</code>
+ * - <code>Socket.sockaddr_in("smtp", "2001:DB8::1")</code>
+ * - <code>Socket.sockaddr_in(80, "172.18.22.42")</code>
+ * - <code>Socket.sockaddr_in(80, "www.ruby-lang.org")</code>
+ * - <code>Socket.sockaddr_un("/tmp/sock")</code>
*
* In an AF_INET/AF_INET6 sockaddr array, the 4th element,
* numeric IP address, is used to construct socket address in the Addrinfo instance.
@@ -1184,7 +1119,7 @@ addrinfo_initialize(int argc, VALUE *argv, VALUE self)
int af;
StringValue(afamily);
if (rsock_family_to_int(RSTRING_PTR(afamily), RSTRING_LEN(afamily), &af) == -1)
- rb_raise(rb_eSocket, "unknown address family: %s", StringValueCStr(afamily));
+ rb_raise(rb_eSocket, "unknown address family: %s", StringValueCStr(afamily));
switch (af) {
case AF_INET: /* ["AF_INET", 46102, "localhost.localdomain", "127.0.0.1"] */
#ifdef INET6
@@ -1212,7 +1147,7 @@ addrinfo_initialize(int argc, VALUE *argv, VALUE self)
break;
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX: /* ["AF_UNIX", "/tmp/sock"] */
{
VALUE path = rb_ary_entry(sockaddr_ary, 1);
@@ -1274,45 +1209,45 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
else {
switch (sockaddr->addr.sa_family) {
case AF_UNSPEC:
- {
- rb_str_cat2(ret, "UNSPEC");
+ {
+ rb_str_cat2(ret, "UNSPEC");
break;
- }
+ }
case AF_INET:
{
struct sockaddr_in *addr;
int port;
- addr = &sockaddr->in;
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+0+1) <= socklen)
- rb_str_catf(ret, "%d", ((unsigned char*)&addr->sin_addr)[0]);
- else
- rb_str_cat2(ret, "?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+1+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[1]);
- else
- rb_str_cat2(ret, ".?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+2+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[2]);
- else
- rb_str_cat2(ret, ".?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+3+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[3]);
- else
- rb_str_cat2(ret, ".?");
-
- if ((socklen_t)(((char*)&addr->sin_port)-(char*)addr+(int)sizeof(addr->sin_port)) < socklen) {
- port = ntohs(addr->sin_port);
- if (port)
- rb_str_catf(ret, ":%d", port);
- }
- else {
- rb_str_cat2(ret, ":?");
- }
- if ((socklen_t)sizeof(struct sockaddr_in) != socklen)
- rb_str_catf(ret, " (%d bytes for %d bytes sockaddr_in)",
- (int)socklen,
- (int)sizeof(struct sockaddr_in));
+ addr = &sockaddr->in;
+ if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+0+1) <= socklen)
+ rb_str_catf(ret, "%d", ((unsigned char*)&addr->sin_addr)[0]);
+ else
+ rb_str_cat2(ret, "?");
+ if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+1+1) <= socklen)
+ rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[1]);
+ else
+ rb_str_cat2(ret, ".?");
+ if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+2+1) <= socklen)
+ rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[2]);
+ else
+ rb_str_cat2(ret, ".?");
+ if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+3+1) <= socklen)
+ rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[3]);
+ else
+ rb_str_cat2(ret, ".?");
+
+ if ((socklen_t)(((char*)&addr->sin_port)-(char*)addr+(int)sizeof(addr->sin_port)) < socklen) {
+ port = ntohs(addr->sin_port);
+ if (port)
+ rb_str_catf(ret, ":%d", port);
+ }
+ else {
+ rb_str_cat2(ret, ":?");
+ }
+ if ((socklen_t)sizeof(struct sockaddr_in) != socklen)
+ rb_str_catf(ret, " (%d bytes for %d bytes sockaddr_in)",
+ (int)socklen,
+ (int)sizeof(struct sockaddr_in));
break;
}
@@ -1352,7 +1287,7 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
}
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX:
{
struct sockaddr_un *addr = &sockaddr->un;
@@ -1463,20 +1398,20 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
#endif
#if defined(AF_LINK) && defined(HAVE_TYPE_STRUCT_SOCKADDR_DL)
- /* AF_LINK is defined in 4.4BSD derivations since Net2.
- link_ntoa is also defined at Net2.
+ /* AF_LINK is defined in 4.4BSD derivations since Net2.
+ link_ntoa is also defined at Net2.
However Debian GNU/kFreeBSD defines AF_LINK but
don't have link_ntoa. */
case AF_LINK:
- {
- /*
- * Simple implementation using link_ntoa():
- * This doesn't work on Debian GNU/kFreeBSD 6.0.7 (squeeze).
+ {
+ /*
+ * Simple implementation using link_ntoa():
+ * This doesn't work on Debian GNU/kFreeBSD 6.0.7 (squeeze).
* Also, the format is bit different.
- *
- * rb_str_catf(ret, "LINK %s", link_ntoa(&sockaddr->dl));
- * break;
- */
+ *
+ * rb_str_catf(ret, "LINK %s", link_ntoa(&sockaddr->dl));
+ * break;
+ */
struct sockaddr_dl *addr = &sockaddr->dl;
char *np = NULL, *ap = NULL, *endp;
int nlen = 0, alen = 0;
@@ -1503,14 +1438,14 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
alen = (int)(endp - ap);
}
- CATSEP;
+ CATSEP;
if (np)
rb_str_catf(ret, "%.*s", nlen, np);
else
rb_str_cat2(ret, "?");
if (ap && 0 < alen) {
- CATSEP;
+ CATSEP;
for (i = 0; i < alen; i++)
rb_str_catf(ret, "%s%02x", i == 0 ? "" : ":", (unsigned char)ap[i]);
}
@@ -1521,10 +1456,10 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
/* longer length is possible behavior because struct sockaddr_dl has "minimum work area, can be larger" as the last field.
* cf. Net2:/usr/src/sys/net/if_dl.h. */
socklen < (socklen_t)(offsetof(struct sockaddr_dl, sdl_data) + addr->sdl_nlen + addr->sdl_alen + addr->sdl_slen)) {
- CATSEP;
+ CATSEP;
rb_str_catf(ret, "(%d bytes for %d bytes sockaddr_dl)",
(int)socklen, (int)sizeof(struct sockaddr_dl));
- }
+ }
rb_str_cat2(ret, "]");
#undef CATSEP
@@ -1688,7 +1623,7 @@ addrinfo_mdump(VALUE self)
afamily = rb_id2str(id);
switch(afamily_int) {
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX:
{
sockaddr = rb_str_new(rai->addr.un.sun_path, rai_unixsocket_len(rai));
@@ -1781,7 +1716,7 @@ addrinfo_mload(VALUE self, VALUE ary)
v = rb_ary_entry(ary, 1);
switch(afamily) {
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX:
{
struct sockaddr_un uaddr;
@@ -1913,7 +1848,7 @@ addrinfo_to_sockaddr(VALUE self)
* call-seq:
* addrinfo.canonname => string or nil
*
- * returns the canonical name as an string.
+ * returns the canonical name as a string.
*
* nil is returned if no canonical name.
*
@@ -2074,7 +2009,7 @@ addrinfo_ip_unpack(VALUE self)
VALUE ret, portstr;
if (!IS_IP_FAMILY(family))
- rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
+ rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
vflags = INT2NUM(NI_NUMERICHOST|NI_NUMERICSERV);
ret = addrinfo_getnameinfo(1, &vflags, self);
@@ -2101,7 +2036,7 @@ addrinfo_ip_address(VALUE self)
VALUE ret;
if (!IS_IP_FAMILY(family))
- rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
+ rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
vflags = INT2NUM(NI_NUMERICHOST|NI_NUMERICSERV);
ret = addrinfo_getnameinfo(1, &vflags, self);
@@ -2127,9 +2062,9 @@ addrinfo_ip_port(VALUE self)
if (!IS_IP_FAMILY(family)) {
bad_family:
#ifdef AF_INET6
- rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
+ rb_raise(rb_eSocket, "need IPv4 or IPv6 address");
#else
- rb_raise(rb_eSocket, "need IPv4 address");
+ rb_raise(rb_eSocket, "need IPv4 address");
#endif
}
@@ -2149,7 +2084,7 @@ addrinfo_ip_port(VALUE self)
#endif
default:
- goto bad_family;
+ goto bad_family;
}
return INT2NUM(port);
@@ -2257,7 +2192,7 @@ addrinfo_ipv6_multicast_p(VALUE self)
}
/*
- * Returns true for IPv6 link local address (ff80::/10).
+ * Returns true for IPv6 link local address (fe80::/10).
* It returns false otherwise.
*/
static VALUE
@@ -2269,7 +2204,7 @@ addrinfo_ipv6_linklocal_p(VALUE self)
}
/*
- * Returns true for IPv6 site local address (ffc0::/10).
+ * Returns true for IPv6 site local address (fec0::/10).
* It returns false otherwise.
*/
static VALUE
@@ -2409,7 +2344,7 @@ addrinfo_ipv6_to_ipv4(VALUE self)
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* call-seq:
* addrinfo.unix_path => path
@@ -2427,7 +2362,7 @@ addrinfo_unix_path(VALUE self)
long n;
if (family != AF_UNIX)
- rb_raise(rb_eSocket, "need AF_UNIX address");
+ rb_raise(rb_eSocket, "need AF_UNIX address");
addr = &rai->addr.un;
@@ -2494,10 +2429,10 @@ addrinfo_s_getaddrinfo(int argc, VALUE *argv, VALUE self)
VALUE node, service, family, socktype, protocol, flags, opts, timeout;
rb_scan_args(argc, argv, "24:", &node, &service, &family, &socktype,
- &protocol, &flags, &opts);
+ &protocol, &flags, &opts);
rb_get_kwargs(opts, &id_timeout, 0, 1, &timeout);
if (timeout == Qundef) {
- timeout = Qnil;
+ timeout = Qnil;
}
return addrinfo_list_new(node, service, family, socktype, protocol, flags, timeout);
@@ -2557,7 +2492,7 @@ addrinfo_s_udp(VALUE self, VALUE host, VALUE port)
INT2NUM(PF_UNSPEC), INT2NUM(SOCK_DGRAM), INT2NUM(IPPROTO_UDP), INT2FIX(0));
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* call-seq:
@@ -2686,7 +2621,7 @@ rsock_init_addrinfo(void)
*/
id_timeout = rb_intern("timeout");
- rb_cAddrinfo = rb_define_class("Addrinfo", rb_cData);
+ rb_cAddrinfo = rb_define_class("Addrinfo", rb_cObject);
rb_define_alloc_func(rb_cAddrinfo, addrinfo_s_allocate);
rb_define_method(rb_cAddrinfo, "initialize", addrinfo_initialize, -1);
rb_define_method(rb_cAddrinfo, "inspect", addrinfo_inspect, 0);
@@ -2695,7 +2630,7 @@ rsock_init_addrinfo(void)
rb_define_singleton_method(rb_cAddrinfo, "ip", addrinfo_s_ip, 1);
rb_define_singleton_method(rb_cAddrinfo, "tcp", addrinfo_s_tcp, 2);
rb_define_singleton_method(rb_cAddrinfo, "udp", addrinfo_s_udp, 2);
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
rb_define_singleton_method(rb_cAddrinfo, "unix", addrinfo_s_unix, -1);
#endif
@@ -2736,7 +2671,7 @@ rsock_init_addrinfo(void)
rb_define_method(rb_cAddrinfo, "ipv6_to_ipv4", addrinfo_ipv6_to_ipv4, 0);
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
rb_define_method(rb_cAddrinfo, "unix_path", addrinfo_unix_path, 0);
#endif
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 0ce77a5f6e..5f803ba0da 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -1,12 +1,22 @@
#ifndef RUBY_SOCKET_H
#define RUBY_SOCKET_H 1
-#include "ruby/ruby.h"
-#include "ruby/io.h"
-#include "ruby/thread.h"
-#include "ruby/util.h"
-#include "internal.h"
+#include "ruby/config.h"
+#include RUBY_EXTCONF_H
+
+#if defined(__sun) || defined(_AIX)
+/* (Recent?) Solaris' <nfs/nfs.h> have conflicting definition of T_DATA. Let
+ * us honour system definition by undefining ours.
+ *
+ * See also [ruby-core:4261]
+ */
+# include "ruby/ruby.h"
+# undef T_DATA
+#endif
+
+#include <errno.h>
#include <stdio.h>
+
#include <sys/types.h>
#include <sys/stat.h>
@@ -23,16 +33,13 @@
#endif
#ifdef _WIN32
+# include <winsock2.h>
+# include <ws2tcpip.h>
+# include <iphlpapi.h>
# if defined(_MSC_VER)
# undef HAVE_TYPE_STRUCT_SOCKADDR_DL
# endif
-/*
- * FIXME: failures if we make nonblocking the default
- * [ruby-core:89973] [ruby-core:89976] [ruby-core:89977] [Bug #14968]
- */
-# define RSOCK_NONBLOCK_DEFAULT (0)
#else
-# define RSOCK_NONBLOCK_DEFAULT (0)
# include <sys/socket.h>
# include <netinet/in.h>
# ifdef HAVE_NETINET_IN_SYSTM_H
@@ -56,16 +63,20 @@
#ifdef HAVE_NETPACKET_PACKET_H
# include <netpacket/packet.h>
#endif
+
#ifdef HAVE_NET_ETHERNET_H
# include <net/ethernet.h>
#endif
-#include <errno.h>
-
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
+#ifdef HAVE_AFUNIX_H
+// Windows doesn't have sys/un.h, but it does have afunix.h just to be special:
+# include <afunix.h>
+#endif
+
#if defined(HAVE_FCNTL)
# ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
@@ -87,12 +98,15 @@
# endif
# include <ifaddrs.h>
#endif
+
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
+
#ifdef HAVE_SYS_SOCKIO_H
# include <sys/sockio.h>
#endif
+
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#endif
@@ -100,16 +114,41 @@
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
+
#ifdef HAVE_SYS_UCRED_H
# include <sys/ucred.h>
#endif
+
#ifdef HAVE_UCRED_H
# include <ucred.h>
#endif
+
#ifdef HAVE_NET_IF_DL_H
# include <net/if_dl.h>
#endif
+#ifdef SOCKS5
+# include <socks.h>
+#endif
+
+#ifndef HAVE_GETADDRINFO
+# include "addrinfo.h"
+#endif
+
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/error.h"
+#include "internal/gc.h"
+#include "internal/io.h"
+#include "internal/thread.h"
+#include "internal/vm.h"
+#include "ruby/io.h"
+#include "ruby/ruby.h"
+#include "ruby/thread.h"
+#include "ruby/util.h"
+#include "sockport.h"
+#include "ruby/fiber/scheduler.h"
+
#ifndef HAVE_TYPE_SOCKLEN_T
typedef int socklen_t;
#endif
@@ -143,11 +182,6 @@ unsigned int if_nametoindex(const char *);
*/
#define pseudo_AF_FTIP pseudo_AF_RTIP
-#ifndef HAVE_GETADDRINFO
-# include "addrinfo.h"
-#endif
-
-#include "sockport.h"
#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
@@ -229,7 +263,6 @@ typedef union {
#define INET_SOCKS 2
extern int rsock_do_not_reverse_lookup;
-extern int rsock_cmsg_cloexec_state;
#define FMODE_NOREVLOOKUP 0x100
/* common socket families only */
@@ -243,7 +276,7 @@ extern VALUE rb_cIPSocket;
extern VALUE rb_cTCPSocket;
extern VALUE rb_cTCPServer;
extern VALUE rb_cUDPSocket;
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
extern VALUE rb_cUNIXSocket;
extern VALUE rb_cUNIXServer;
#endif
@@ -255,9 +288,7 @@ extern VALUE rb_eSocket;
#ifdef SOCKS
extern VALUE rb_cSOCKSSocket;
-# ifdef SOCKS5
-# include <socks.h>
-# else
+# ifndef SOCKS5
void SOCKSinit();
int Rconnect();
# endif
@@ -291,13 +322,13 @@ struct rb_addrinfo {
struct addrinfo *ai;
int allocated_by_malloc;
};
-int rb_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct rb_addrinfo **res);
void rb_freeaddrinfo(struct rb_addrinfo *ai);
VALUE rsock_freeaddrinfo(VALUE arg);
int rb_getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);
int rsock_fd_family(int fd);
struct rb_addrinfo *rsock_addrinfo(VALUE host, VALUE port, int family, int socktype, int flags);
struct rb_addrinfo *rsock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack);
+
VALUE rsock_fd_socket_addrinfo(int fd, struct sockaddr *addr, socklen_t len);
VALUE rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len);
@@ -313,7 +344,7 @@ VALUE rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len);
int rsock_revlookup_flag(VALUE revlookup, int *norevlookup);
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
VALUE rsock_unixpath_str(struct sockaddr_un *sockaddr, socklen_t len);
VALUE rsock_unixaddr(struct sockaddr_un *sockaddr, socklen_t len);
socklen_t rsock_unix_sockaddr_len(VALUE path);
@@ -323,7 +354,7 @@ int rsock_socket(int domain, int type, int proto);
int rsock_detect_cloexec(int fd);
VALUE rsock_init_sock(VALUE sock, int fd);
VALUE rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass);
-VALUE rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, VALUE local_serv, int type);
+VALUE rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, VALUE local_serv, int type, VALUE resolv_timeout, VALUE connect_timeout);
VALUE rsock_init_unixsock(VALUE sock, VALUE path, int server);
struct rsock_send_arg {
@@ -345,23 +376,23 @@ enum sock_recv_type {
};
VALUE rsock_s_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str,
- VALUE ex, enum sock_recv_type from);
+ VALUE ex, enum sock_recv_type from);
VALUE rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from);
-int rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks);
+int rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks, struct timeval *timeout);
-VALUE rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len);
+VALUE rsock_s_accept(VALUE klass, VALUE io, struct sockaddr *sockaddr, socklen_t *len);
VALUE rsock_s_accept_nonblock(VALUE klass, VALUE ex, rb_io_t *fptr,
- struct sockaddr *sockaddr, socklen_t *len);
+ struct sockaddr *sockaddr, socklen_t *len);
VALUE rsock_sock_listen(VALUE sock, VALUE log);
VALUE rsock_sockopt_new(int family, int level, int optname, VALUE data);
#if defined(HAVE_SENDMSG)
VALUE rsock_bsock_sendmsg(VALUE sock, VALUE data, VALUE flags,
- VALUE dest_sockaddr, VALUE controls);
+ VALUE dest_sockaddr, VALUE controls);
VALUE rsock_bsock_sendmsg_nonblock(VALUE sock, VALUE data, VALUE flags,
- VALUE dest_sockaddr, VALUE controls, VALUE ex);
+ VALUE dest_sockaddr, VALUE controls, VALUE ex);
#else
#define rsock_bsock_sendmsg rb_f_notimplement
#define rsock_bsock_sendmsg_nonblock rb_f_notimplement
@@ -369,9 +400,9 @@ VALUE rsock_bsock_sendmsg_nonblock(VALUE sock, VALUE data, VALUE flags,
#if defined(HAVE_RECVMSG)
VALUE rsock_bsock_recvmsg(VALUE sock, VALUE dlen, VALUE clen, VALUE flags,
- VALUE scm_rights);
+ VALUE scm_rights);
VALUE rsock_bsock_recvmsg_nonblock(VALUE sock, VALUE dlen, VALUE clen,
- VALUE flags, VALUE scm_rights, VALUE ex);
+ VALUE flags, VALUE scm_rights, VALUE ex);
ssize_t rsock_recvmsg(int socket, struct msghdr *message, int flags);
#else
#define rsock_bsock_recvmsg rb_f_notimplement
@@ -409,30 +440,17 @@ NORETURN(void rsock_sys_fail_sockaddr(const char *, struct sockaddr *addr, sockl
NORETURN(void rsock_sys_fail_raddrinfo(const char *, VALUE rai));
NORETURN(void rsock_sys_fail_raddrinfo_or_sockaddr(const char *, VALUE addr, VALUE rai));
-/*
- * It is safe on Linux to attempt using a socket without waiting on it in
- * all cases. For some syscalls (e.g. accept/accept4), blocking on the
- * syscall instead of relying on select/poll allows the kernel to use
- * "wake-one" behavior and avoid the thundering herd problem.
- * This is likely safe on all other *nix-like systems, so this safe list
- * can be expanded by interested parties.
- */
-#if defined(__linux__)
-static inline int rsock_maybe_fd_writable(int fd) { return 1; }
-static inline void rsock_maybe_wait_fd(int fd) { }
-# ifdef MSG_DONTWAIT
-# define MSG_DONTWAIT_RELIABLE 1
-# endif
-#else /* some systems (mswin/mingw) need these. ref: r36946 */
-# define rsock_maybe_fd_writable(fd) rb_thread_fd_writable((fd))
-# define rsock_maybe_wait_fd(fd) rb_thread_wait_fd((fd))
+#if defined(__MINGW32__) || defined(_WIN32)
+#define RSOCK_WAIT_BEFORE_BLOCKING
#endif
/*
* some OSes may support MSG_DONTWAIT inconsistently depending on socket
* type, we only expect Linux to support it consistently for all socket types.
*/
-#ifndef MSG_DONTWAIT_RELIABLE
+#if defined(MSG_DONTWAIT) && defined(__linux__)
+# define MSG_DONTWAIT_RELIABLE 1
+#else
# define MSG_DONTWAIT_RELIABLE 0
#endif
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index bfeb30340c..eb74f7a936 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -26,7 +26,11 @@ rsock_syserr_fail_host_port(int err, const char *mesg, VALUE host, VALUE port)
VALUE message;
message = rb_sprintf("%s for %+"PRIsVALUE" port % "PRIsVALUE"",
- mesg, host, port);
+ mesg, host, port);
+
+ if (err == ETIMEDOUT) {
+ rb_exc_raise(rb_exc_new3(rb_eIOTimeoutError, message));
+ }
rb_syserr_fail_str(err, message);
}
@@ -43,11 +47,11 @@ rsock_syserr_fail_path(int err, const char *mesg, VALUE path)
VALUE message;
if (RB_TYPE_P(path, T_STRING)) {
- message = rb_sprintf("%s for % "PRIsVALUE"", mesg, path);
- rb_syserr_fail_str(err, message);
+ message = rb_sprintf("%s for % "PRIsVALUE"", mesg, path);
+ rb_syserr_fail_str(err, message);
}
else {
- rb_syserr_fail(err, mesg);
+ rb_syserr_fail(err, mesg);
}
}
@@ -96,12 +100,12 @@ rsock_syserr_fail_raddrinfo_or_sockaddr(int err, const char *mesg, VALUE addr, V
if (NIL_P(rai)) {
StringValue(addr);
- rsock_syserr_fail_sockaddr(err, mesg,
+ rsock_syserr_fail_sockaddr(err, mesg,
(struct sockaddr *)RSTRING_PTR(addr),
(socklen_t)RSTRING_LEN(addr)); /* overflow should be checked already */
}
else
- rsock_syserr_fail_raddrinfo(err, mesg, rai);
+ rsock_syserr_fail_raddrinfo(err, mesg, rai);
}
static void
@@ -168,93 +172,47 @@ pair_yield(VALUE pair)
#endif
#if defined HAVE_SOCKETPAIR
-
-#ifdef SOCK_CLOEXEC
static int
-rsock_socketpair0(int domain, int type, int protocol, int sv[2])
+rsock_socketpair0(int domain, int type, int protocol, int descriptors[2])
{
- int ret;
- static int cloexec_state = -1; /* <0: unknown, 0: ignored, >0: working */
- static const int default_flags = SOCK_CLOEXEC|RSOCK_NONBLOCK_DEFAULT;
+#ifdef SOCK_CLOEXEC
+ type |= SOCK_CLOEXEC;
+#endif
- if (cloexec_state > 0) { /* common path, if SOCK_CLOEXEC is defined */
- ret = socketpair(domain, type|default_flags, protocol, sv);
- if (ret == 0 && (sv[0] <= 2 || sv[1] <= 2)) {
- goto fix_cloexec; /* highly unlikely */
- }
- goto update_max_fd;
- }
- else if (cloexec_state < 0) { /* usually runs once only for detection */
- ret = socketpair(domain, type|default_flags, protocol, sv);
- if (ret == 0) {
- cloexec_state = rsock_detect_cloexec(sv[0]);
- if ((cloexec_state == 0) || (sv[0] <= 2 || sv[1] <= 2))
- goto fix_cloexec;
- goto update_max_fd;
- }
- else if (ret == -1 && errno == EINVAL) {
- /* SOCK_CLOEXEC is available since Linux 2.6.27. Linux 2.6.18 fails with EINVAL */
- ret = socketpair(domain, type, protocol, sv);
- if (ret != -1) {
- /* The reason of EINVAL may be other than SOCK_CLOEXEC.
- * So disable SOCK_CLOEXEC only if socketpair() succeeds without SOCK_CLOEXEC.
- * Ex. Socket.pair(:UNIX, 0xff) fails with EINVAL.
- */
- cloexec_state = 0;
- }
- }
- }
- else { /* cloexec_state == 0 */
- ret = socketpair(domain, type, protocol, sv);
- }
- if (ret == -1) {
- return -1;
- }
+#ifdef SOCK_NONBLOCK
+ type |= SOCK_NONBLOCK;
+#endif
-fix_cloexec:
- rb_maygvl_fd_fix_cloexec(sv[0]);
- rb_maygvl_fd_fix_cloexec(sv[1]);
- if (RSOCK_NONBLOCK_DEFAULT) {
- rsock_make_fd_nonblock(sv[0]);
- rsock_make_fd_nonblock(sv[1]);
- }
+ int result = socketpair(domain, type, protocol, descriptors);
-update_max_fd:
- rb_update_max_fd(sv[0]);
- rb_update_max_fd(sv[1]);
+ if (result == -1)
+ return -1;
- return ret;
-}
-#else /* !SOCK_CLOEXEC */
-static int
-rsock_socketpair0(int domain, int type, int protocol, int sv[2])
-{
- int ret = socketpair(domain, type, protocol, sv);
+#ifndef SOCK_CLOEXEC
+ rb_fd_fix_cloexec(descriptors[0]);
+ rb_fd_fix_cloexec(descriptors[1]);
+#endif
- if (ret == -1)
- return -1;
+#ifndef SOCK_NONBLOCK
+ rsock_make_fd_nonblock(descriptors[0]);
+ rsock_make_fd_nonblock(descriptors[1]);
+#endif
- rb_fd_fix_cloexec(sv[0]);
- rb_fd_fix_cloexec(sv[1]);
- if (RSOCK_NONBLOCK_DEFAULT) {
- rsock_make_fd_nonblock(sv[0]);
- rsock_make_fd_nonblock(sv[1]);
- }
- return ret;
+ return result;
}
-#endif /* !SOCK_CLOEXEC */
static int
-rsock_socketpair(int domain, int type, int protocol, int sv[2])
+rsock_socketpair(int domain, int type, int protocol, int descriptors[2])
{
- int ret;
+ int result;
+
+ result = rsock_socketpair0(domain, type, protocol, descriptors);
- ret = rsock_socketpair0(domain, type, protocol, sv);
- if (ret < 0 && rb_gc_for_fd(errno)) {
- ret = rsock_socketpair0(domain, type, protocol, sv);
+ if (result < 0 && rb_gc_for_fd(errno)) {
+ result = rsock_socketpair0(domain, type, protocol, descriptors);
}
- return ret;
+ return result;
}
/*
@@ -302,7 +260,7 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass)
p = NUM2INT(protocol);
ret = rsock_socketpair(d, t, p, sp);
if (ret < 0) {
- rb_sys_fail("socketpair(2)");
+ rb_sys_fail("socketpair(2)");
}
s1 = rsock_init_sock(rb_obj_alloc(klass), sp[0]);
@@ -376,7 +334,7 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass)
* * Errno::EOPNOTSUPP - the calling +socket+ is listening and cannot be connected
* * Errno::EPROTOTYPE - the _sockaddr_ has a different type than the socket
* bound to the specified peer address
- * * Errno::ETIMEDOUT - the attempt to connect time out before a connection
+ * * Errno::ETIMEDOUT - the attempt to connect timed out before a connection
* was made.
*
* On unix-based systems if the address family of the calling +socket+ is
@@ -417,7 +375,7 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass)
* * Errno::EHOSTUNREACH - no route to the network is present
* * Errno::ENOBUFS - no buffer space is available
* * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket
- * * Errno::ETIMEDOUT - the attempt to connect time out before a connection
+ * * Errno::ETIMEDOUT - the attempt to connect timed out before a connection
* was made.
* * Errno::EWOULDBLOCK - the socket is marked as nonblocking and the
* connection cannot be completed immediately
@@ -439,9 +397,9 @@ sock_connect(VALUE sock, VALUE addr)
addr = rb_str_new4(addr);
GetOpenFile(sock, fptr);
fd = fptr->fd;
- n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), 0);
+ n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), 0, NULL);
if (n < 0) {
- rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
+ rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
}
return INT2FIX(n);
@@ -461,19 +419,19 @@ sock_connect_nonblock(VALUE sock, VALUE addr, VALUE ex)
rb_io_set_nonblock(fptr);
n = connect(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr));
if (n < 0) {
- int e = errno;
- if (e == EINPROGRESS) {
+ int e = errno;
+ if (e == EINPROGRESS) {
if (ex == Qfalse) {
return sym_wait_writable;
}
rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e, "connect(2) would block");
- }
- if (e == EISCONN) {
+ }
+ if (e == EISCONN) {
if (ex == Qfalse) {
return INT2FIX(0);
}
- }
- rsock_syserr_fail_raddrinfo_or_sockaddr(e, "connect(2)", addr, rai);
+ }
+ rsock_syserr_fail_raddrinfo_or_sockaddr(e, "connect(2)", addr, rai);
}
return INT2FIX(n);
@@ -574,7 +532,7 @@ sock_bind(VALUE sock, VALUE addr)
SockAddrStringValueWithAddrinfo(addr, rai);
GetOpenFile(sock, fptr);
if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr)) < 0)
- rsock_sys_fail_raddrinfo_or_sockaddr("bind(2)", addr, rai);
+ rsock_sys_fail_raddrinfo_or_sockaddr("bind(2)", addr, rai);
return INT2FIX(0);
}
@@ -658,7 +616,7 @@ rsock_sock_listen(VALUE sock, VALUE log)
backlog = NUM2INT(log);
GetOpenFile(sock, fptr);
if (listen(fptr->fd, backlog) < 0)
- rb_sys_fail("listen(2)");
+ rb_sys_fail("listen(2)");
return INT2FIX(0);
}
@@ -796,17 +754,14 @@ sock_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str, VALUE ex)
*
*/
static VALUE
-sock_accept(VALUE sock)
+sock_accept(VALUE server)
{
- rb_io_t *fptr;
- VALUE sock2;
- union_sockaddr buf;
- socklen_t len = (socklen_t)sizeof buf;
+ union_sockaddr buffer;
+ socklen_t length = (socklen_t)sizeof(buffer);
- GetOpenFile(sock, fptr);
- sock2 = rsock_s_accept(rb_cSocket,fptr->fd,&buf.addr,&len);
+ VALUE peer = rsock_s_accept(rb_cSocket, server, &buffer.addr, &length);
- return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
+ return rb_assoc_new(peer, rsock_io_socket_addrinfo(peer, &buffer.addr, length));
}
/* :nodoc: */
@@ -823,7 +778,7 @@ sock_accept_nonblock(VALUE sock, VALUE ex)
sock2 = rsock_s_accept_nonblock(rb_cSocket, ex, fptr, addr, &len);
if (SYMBOL_P(sock2)) /* :wait_readable */
- return sock2;
+ return sock2;
return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
}
@@ -866,17 +821,14 @@ sock_accept_nonblock(VALUE sock, VALUE ex)
* * Socket#accept
*/
static VALUE
-sock_sysaccept(VALUE sock)
+sock_sysaccept(VALUE server)
{
- rb_io_t *fptr;
- VALUE sock2;
- union_sockaddr buf;
- socklen_t len = (socklen_t)sizeof buf;
+ union_sockaddr buffer;
+ socklen_t length = (socklen_t)sizeof(buffer);
- GetOpenFile(sock, fptr);
- sock2 = rsock_s_accept(0,fptr->fd,&buf.addr,&len);
+ VALUE peer = rsock_s_accept(0, server, &buffer.addr, &length);
- return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
+ return rb_assoc_new(peer, rsock_io_socket_addrinfo(peer, &buffer.addr, length));
}
#ifdef HAVE_GETHOSTNAME
@@ -907,19 +859,19 @@ sock_gethostname(VALUE obj)
name = rb_str_new(0, len);
while (gethostname(RSTRING_PTR(name), len) < 0) {
- int e = errno;
- switch (e) {
- case ENAMETOOLONG:
+ int e = errno;
+ switch (e) {
+ case ENAMETOOLONG:
#ifdef __linux__
- case EINVAL:
- /* glibc before version 2.1 uses EINVAL instead of ENAMETOOLONG */
+ case EINVAL:
+ /* glibc before version 2.1 uses EINVAL instead of ENAMETOOLONG */
#endif
- break;
- default:
- rb_syserr_fail(e, "gethostname(3)");
- }
- rb_str_modify_expand(name, len);
- len += len;
+ break;
+ default:
+ rb_syserr_fail(e, "gethostname(3)");
+ }
+ rb_str_modify_expand(name, len);
+ len += len;
}
rb_str_resize(name, strlen(RSTRING_PTR(name)));
return name;
@@ -949,18 +901,18 @@ make_addrinfo(struct rb_addrinfo *res0, int norevlookup)
struct addrinfo *res;
if (res0 == NULL) {
- rb_raise(rb_eSocket, "host not found");
+ rb_raise(rb_eSocket, "host not found");
}
base = rb_ary_new();
for (res = res0->ai; res; res = res->ai_next) {
- ary = rsock_ipaddr(res->ai_addr, res->ai_addrlen, norevlookup);
- if (res->ai_canonname) {
- RARRAY_ASET(ary, 2, rb_str_new2(res->ai_canonname));
- }
- rb_ary_push(ary, INT2FIX(res->ai_family));
- rb_ary_push(ary, INT2FIX(res->ai_socktype));
- rb_ary_push(ary, INT2FIX(res->ai_protocol));
- rb_ary_push(base, ary);
+ ary = rsock_ipaddr(res->ai_addr, res->ai_addrlen, norevlookup);
+ if (res->ai_canonname) {
+ RARRAY_ASET(ary, 2, rb_str_new2(res->ai_canonname));
+ }
+ rb_ary_push(ary, INT2FIX(res->ai_family));
+ rb_ary_push(ary, INT2FIX(res->ai_socktype));
+ rb_ary_push(ary, INT2FIX(res->ai_protocol));
+ rb_ary_push(base, ary);
}
return base;
}
@@ -972,18 +924,18 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len)
switch (addr->sa_family) {
case AF_INET:
- ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr;
- len = (socklen_t)sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
- break;
+ ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr;
+ len = (socklen_t)sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
+ break;
#ifdef AF_INET6
case AF_INET6:
- ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr;
- len = (socklen_t)sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
- break;
+ ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr;
+ len = (socklen_t)sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
+ break;
#endif
default:
rb_raise(rb_eSocket, "unknown socket family:%d", addr->sa_family);
- break;
+ break;
}
return rb_str_new(ptr, len);
}
@@ -1011,8 +963,9 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len)
static VALUE
sock_s_gethostbyname(VALUE obj, VALUE host)
{
+ rb_warn("Socket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead.");
struct rb_addrinfo *res =
- rsock_addrinfo(host, Qnil, AF_UNSPEC, SOCK_STREAM, AI_CANONNAME);
+ rsock_addrinfo(host, Qnil, AF_UNSPEC, SOCK_STREAM, AI_CANONNAME);
return rsock_make_hostent(host, res, sock_sockaddr);
}
@@ -1050,23 +1003,25 @@ sock_s_gethostbyaddr(int argc, VALUE *argv, VALUE _)
VALUE ary, names;
int t = AF_INET;
+ rb_warn("Socket.gethostbyaddr is deprecated; use Addrinfo#getnameinfo instead.");
+
rb_scan_args(argc, argv, "11", &addr, &family);
StringValue(addr);
if (!NIL_P(family)) {
- t = rsock_family_arg(family);
+ t = rsock_family_arg(family);
}
#ifdef AF_INET6
else if (RSTRING_LEN(addr) == 16) {
- t = AF_INET6;
+ t = AF_INET6;
}
#endif
h = gethostbyaddr(RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), t);
if (h == NULL) {
#ifdef HAVE_HSTRERROR
- extern int h_errno;
- rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno));
+ extern int h_errno;
+ rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno));
#else
- rb_raise(rb_eSocket, "host not found");
+ rb_raise(rb_eSocket, "host not found");
#endif
}
ary = rb_ary_new();
@@ -1074,14 +1029,14 @@ sock_s_gethostbyaddr(int argc, VALUE *argv, VALUE _)
names = rb_ary_new();
rb_ary_push(ary, names);
if (h->h_aliases != NULL) {
- for (pch = h->h_aliases; *pch; pch++) {
- rb_ary_push(names, rb_str_new2(*pch));
- }
+ for (pch = h->h_aliases; *pch; pch++) {
+ rb_ary_push(names, rb_str_new2(*pch));
+ }
}
rb_ary_push(ary, INT2NUM(h->h_addrtype));
#ifdef h_addr
for (pch = h->h_addr_list; *pch; pch++) {
- rb_ary_push(ary, rb_str_new(*pch, h->h_length));
+ rb_ary_push(ary, rb_str_new(*pch, h->h_length));
}
#else
rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
@@ -1118,15 +1073,15 @@ sock_s_getservbyname(int argc, VALUE *argv, VALUE _)
if (!NIL_P(proto)) protoname = StringValueCStr(proto);
sp = getservbyname(servicename, protoname);
if (sp) {
- port = ntohs(sp->s_port);
+ port = ntohs(sp->s_port);
}
else {
- char *end;
+ char *end;
- port = STRTOUL(servicename, &end, 0);
- if (*end != '\0') {
- rb_raise(rb_eSocket, "no such service %s/%s", servicename, protoname);
- }
+ port = STRTOUL(servicename, &end, 0);
+ if (*end != '\0') {
+ rb_raise(rb_eSocket, "no such service %s/%s", servicename, protoname);
+ }
}
return INT2FIX(port);
}
@@ -1155,14 +1110,14 @@ sock_s_getservbyport(int argc, VALUE *argv, VALUE _)
rb_scan_args(argc, argv, "11", &port, &proto);
portnum = NUM2LONG(port);
if (portnum != (uint16_t)portnum) {
- const char *s = portnum > 0 ? "big" : "small";
- rb_raise(rb_eRangeError, "integer %ld too %s to convert into `int16_t'", portnum, s);
+ const char *s = portnum > 0 ? "big" : "small";
+ rb_raise(rb_eRangeError, "integer %ld too %s to convert into `int16_t'", portnum, s);
}
if (!NIL_P(proto)) protoname = StringValueCStr(proto);
sp = getservbyport((int)htons((uint16_t)portnum), protoname);
if (!sp) {
- rb_raise(rb_eSocket, "no such service for port %d/%s", (int)portnum, protoname);
+ rb_raise(rb_eSocket, "no such service for port %d/%s", (int)portnum, protoname);
}
return rb_str_new2(sp->s_name);
}
@@ -1197,7 +1152,7 @@ sock_s_getservbyport(int argc, VALUE *argv, VALUE _)
* be one of below. If _reverse_lookup_ is omitted, the default value is +nil+.
*
* +true+, +:hostname+: hostname is obtained from numeric address using reverse lookup, which may take a time.
- * +false+, +:numeric+: hostname is same as numeric address.
+ * +false+, +:numeric+: hostname is the same as numeric address.
* +nil+: obey to the current +do_not_reverse_lookup+ flag.
*
* If Addrinfo object is preferred, use Addrinfo.getaddrinfo.
@@ -1216,17 +1171,18 @@ sock_s_getaddrinfo(int argc, VALUE *argv, VALUE _)
hints.ai_family = NIL_P(family) ? PF_UNSPEC : rsock_family_arg(family);
if (!NIL_P(socktype)) {
- hints.ai_socktype = rsock_socktype_arg(socktype);
+ hints.ai_socktype = rsock_socktype_arg(socktype);
}
if (!NIL_P(protocol)) {
- hints.ai_protocol = NUM2INT(protocol);
+ hints.ai_protocol = NUM2INT(protocol);
}
if (!NIL_P(flags)) {
- hints.ai_flags = NUM2INT(flags);
+ hints.ai_flags = NUM2INT(flags);
}
if (NIL_P(revlookup) || !rsock_revlookup_flag(revlookup, &norevlookup)) {
- norevlookup = rsock_do_not_reverse_lookup;
+ norevlookup = rsock_do_not_reverse_lookup;
}
+
res = rsock_getaddrinfo(host, port, &hints, 0);
ret = make_addrinfo(res, norevlookup);
@@ -1260,7 +1216,6 @@ static VALUE
sock_s_getnameinfo(int argc, VALUE *argv, VALUE _)
{
VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
- char *hptr, *pptr;
char hbuf[1024], pbuf[1024];
int fl;
struct rb_addrinfo *res = NULL;
@@ -1275,115 +1230,85 @@ sock_s_getnameinfo(int argc, VALUE *argv, VALUE _)
fl = 0;
if (!NIL_P(flags)) {
- fl = NUM2INT(flags);
+ fl = NUM2INT(flags);
}
tmp = rb_check_sockaddr_string_type(sa);
if (!NIL_P(tmp)) {
- sa = tmp;
- if (sizeof(ss) < (size_t)RSTRING_LEN(sa)) {
- rb_raise(rb_eTypeError, "sockaddr length too big");
- }
- memcpy(&ss, RSTRING_PTR(sa), RSTRING_LEN(sa));
+ sa = tmp;
+ if (sizeof(ss) < (size_t)RSTRING_LEN(sa)) {
+ rb_raise(rb_eTypeError, "sockaddr length too big");
+ }
+ memcpy(&ss, RSTRING_PTR(sa), RSTRING_LEN(sa));
if (!VALIDATE_SOCKLEN(&ss.addr, RSTRING_LEN(sa))) {
- rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
- }
- sap = &ss.addr;
+ rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
+ }
+ sap = &ss.addr;
salen = RSTRING_SOCKLEN(sa);
- goto call_nameinfo;
+ goto call_nameinfo;
}
tmp = rb_check_array_type(sa);
if (!NIL_P(tmp)) {
- sa = tmp;
- MEMZERO(&hints, struct addrinfo, 1);
- if (RARRAY_LEN(sa) == 3) {
- af = RARRAY_AREF(sa, 0);
- port = RARRAY_AREF(sa, 1);
- host = RARRAY_AREF(sa, 2);
- }
- else if (RARRAY_LEN(sa) >= 4) {
- af = RARRAY_AREF(sa, 0);
- port = RARRAY_AREF(sa, 1);
- host = RARRAY_AREF(sa, 3);
- if (NIL_P(host)) {
- host = RARRAY_AREF(sa, 2);
- }
- else {
- /*
- * 4th element holds numeric form, don't resolve.
- * see rsock_ipaddr().
- */
+ sa = tmp;
+ MEMZERO(&hints, struct addrinfo, 1);
+ if (RARRAY_LEN(sa) == 3) {
+ af = RARRAY_AREF(sa, 0);
+ port = RARRAY_AREF(sa, 1);
+ host = RARRAY_AREF(sa, 2);
+ }
+ else if (RARRAY_LEN(sa) >= 4) {
+ af = RARRAY_AREF(sa, 0);
+ port = RARRAY_AREF(sa, 1);
+ host = RARRAY_AREF(sa, 3);
+ if (NIL_P(host)) {
+ host = RARRAY_AREF(sa, 2);
+ }
+ else {
+ /*
+ * 4th element holds numeric form, don't resolve.
+ * see rsock_ipaddr().
+ */
#ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */
- hints.ai_flags |= AI_NUMERICHOST;
+ hints.ai_flags |= AI_NUMERICHOST;
#endif
- }
- }
- else {
- rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given",
- RARRAY_LEN(sa));
- }
- /* host */
- if (NIL_P(host)) {
- hptr = NULL;
- }
- else {
- strncpy(hbuf, StringValueCStr(host), sizeof(hbuf));
- hbuf[sizeof(hbuf) - 1] = '\0';
- hptr = hbuf;
- }
- /* port */
- if (NIL_P(port)) {
- strcpy(pbuf, "0");
- pptr = NULL;
- }
- else if (FIXNUM_P(port)) {
- snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
- pptr = pbuf;
- }
- else {
- strncpy(pbuf, StringValueCStr(port), sizeof(pbuf));
- pbuf[sizeof(pbuf) - 1] = '\0';
- pptr = pbuf;
- }
- hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM;
- /* af */
+ }
+ }
+ else {
+ rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given",
+ RARRAY_LEN(sa));
+ }
+ hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM;
+ /* af */
hints.ai_family = NIL_P(af) ? PF_UNSPEC : rsock_family_arg(af);
- error = rb_getaddrinfo(hptr, pptr, &hints, &res);
- if (error) goto error_exit_addr;
- sap = res->ai->ai_addr;
+ res = rsock_getaddrinfo(host, port, &hints, 0);
+ sap = res->ai->ai_addr;
salen = res->ai->ai_addrlen;
}
else {
- rb_raise(rb_eTypeError, "expecting String or Array");
+ rb_raise(rb_eTypeError, "expecting String or Array");
}
call_nameinfo:
error = rb_getnameinfo(sap, salen, hbuf, sizeof(hbuf),
- pbuf, sizeof(pbuf), fl);
+ pbuf, sizeof(pbuf), fl);
if (error) goto error_exit_name;
if (res) {
- for (r = res->ai->ai_next; r; r = r->ai_next) {
- char hbuf2[1024], pbuf2[1024];
+ for (r = res->ai->ai_next; r; r = r->ai_next) {
+ char hbuf2[1024], pbuf2[1024];
- sap = r->ai_addr;
+ sap = r->ai_addr;
salen = r->ai_addrlen;
- error = rb_getnameinfo(sap, salen, hbuf2, sizeof(hbuf2),
- pbuf2, sizeof(pbuf2), fl);
- if (error) goto error_exit_name;
- if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) {
- rb_freeaddrinfo(res);
- rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename");
- }
- }
- rb_freeaddrinfo(res);
+ error = rb_getnameinfo(sap, salen, hbuf2, sizeof(hbuf2),
+ pbuf2, sizeof(pbuf2), fl);
+ if (error) goto error_exit_name;
+ if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) {
+ rb_freeaddrinfo(res);
+ rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename");
+ }
+ }
+ rb_freeaddrinfo(res);
}
return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));
- error_exit_addr:
- saved_errno = errno;
- if (res) rb_freeaddrinfo(res);
- errno = saved_errno;
- rsock_raise_socket_error("getaddrinfo", error);
-
error_exit_name:
saved_errno = errno;
if (res) rb_freeaddrinfo(res);
@@ -1458,7 +1383,7 @@ sock_s_unpack_sockaddr_in(VALUE self, VALUE addr)
return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
}
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* call-seq:
@@ -1516,8 +1441,8 @@ sock_s_unpack_sockaddr_un(VALUE self, VALUE addr)
rb_raise(rb_eArgError, "not an AF_UNIX sockaddr");
}
if (sizeof(struct sockaddr_un) < (size_t)RSTRING_LEN(addr)) {
- rb_raise(rb_eTypeError, "too long sockaddr_un - %ld longer than %d",
- RSTRING_LEN(addr), (int)sizeof(struct sockaddr_un));
+ rb_raise(rb_eTypeError, "too long sockaddr_un - %ld longer than %d",
+ RSTRING_LEN(addr), (int)sizeof(struct sockaddr_un));
}
path = rsock_unixpath_str(sockaddr, RSTRING_SOCKLEN(addr));
return path;
@@ -1546,7 +1471,7 @@ sockaddr_len(struct sockaddr *addr)
return (socklen_t)sizeof(struct sockaddr_in6);
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
case AF_UNIX:
return (socklen_t)sizeof(struct sockaddr_un);
#endif
@@ -1581,19 +1506,19 @@ sockaddr_obj(struct sockaddr *addr, socklen_t len)
#if defined(__KAME__) && defined(AF_INET6)
if (addr->sa_family == AF_INET6) {
- /* KAME uses the 2nd 16bit word of link local IPv6 address as interface index internally */
+ /* KAME uses the 2nd 16bit word of link local IPv6 address as interface index internally */
/* http://orange.kame.net/dev/cvsweb.cgi/kame/IMPLEMENTATION */
- /* convert fe80:1::1 to fe80::1%1 */
+ /* convert fe80:1::1 to fe80::1%1 */
len = (socklen_t)sizeof(struct sockaddr_in6);
- memcpy(&addr6, addr, len);
- addr = (struct sockaddr *)&addr6;
- if (IN6_IS_ADDR_LINKLOCAL(&addr6.sin6_addr) &&
- addr6.sin6_scope_id == 0 &&
- (addr6.sin6_addr.s6_addr[2] || addr6.sin6_addr.s6_addr[3])) {
- addr6.sin6_scope_id = (addr6.sin6_addr.s6_addr[2] << 8) | addr6.sin6_addr.s6_addr[3];
- addr6.sin6_addr.s6_addr[2] = 0;
- addr6.sin6_addr.s6_addr[3] = 0;
- }
+ memcpy(&addr6, addr, len);
+ addr = (struct sockaddr *)&addr6;
+ if (IN6_IS_ADDR_LINKLOCAL(&addr6.sin6_addr) &&
+ addr6.sin6_scope_id == 0 &&
+ (addr6.sin6_addr.s6_addr[2] || addr6.sin6_addr.s6_addr[3])) {
+ addr6.sin6_scope_id = (addr6.sin6_addr.s6_addr[2] << 8) | addr6.sin6_addr.s6_addr[3];
+ addr6.sin6_addr.s6_addr[2] = 0;
+ addr6.sin6_addr.s6_addr[3] = 0;
+ }
}
#endif
@@ -1608,7 +1533,7 @@ rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len)
#endif
-#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)) || defined(SIOCGIFCONF) || defined(_WIN32)
+#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)) || defined(SIOCGIFCONF) || defined(_WIN32)
/*
* call-seq:
* Socket.ip_address_list => array
@@ -1669,9 +1594,8 @@ socket_s_ip_address_list(VALUE self)
freeifaddrs(ifp);
return list;
-#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)
+#elif defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM)
/* Solaris if_tcp(7P) */
- /* HP-UX has SIOCGLIFCONF too. But it uses different struct */
int fd = -1;
int ret;
struct lifnum ln;
@@ -1692,8 +1616,8 @@ socket_s_ip_address_list(VALUE self)
ret = ioctl(fd, SIOCGLIFNUM, &ln);
if (ret == -1) {
- reason = "SIOCGLIFNUM";
- goto finish;
+ reason = "SIOCGLIFNUM";
+ goto finish;
}
memset(&lc, 0, sizeof(lc));
@@ -1704,13 +1628,13 @@ socket_s_ip_address_list(VALUE self)
ret = ioctl(fd, SIOCGLIFCONF, &lc);
if (ret == -1) {
- reason = "SIOCGLIFCONF";
- goto finish;
+ reason = "SIOCGLIFCONF";
+ goto finish;
}
list = rb_ary_new();
for (i = 0; i < ln.lifn_count; i++) {
- struct lifreq *req = &lc.lifc_req[i];
+ struct lifreq *req = &lc.lifc_req[i];
if (IS_IP_FAMILY(req->lifr_addr.ss_family)) {
if (req->lifr_addr.ss_family == AF_INET6 &&
IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)(&req->lifr_addr))->sin6_addr) &&
@@ -1731,13 +1655,13 @@ socket_s_ip_address_list(VALUE self)
finish:
save_errno = errno;
if (lc.lifc_buf != NULL)
- xfree(lc.lifc_req);
+ xfree(lc.lifc_req);
if (fd != -1)
- close(fd);
+ close(fd);
errno = save_errno;
if (reason)
- rb_syserr_fail(save_errno, reason);
+ rb_syserr_fail(save_errno, reason);
return list;
#elif defined(SIOCGIFCONF)
@@ -1775,17 +1699,17 @@ socket_s_ip_address_list(VALUE self)
/* fprintf(stderr, "conf.ifc_len: %d\n", conf.ifc_len); */
if (bufsize - EXTRA_SPACE < conf.ifc_len) {
- if (bufsize < conf.ifc_len) {
- /* NetBSD returns required size for all interfaces. */
- bufsize = conf.ifc_len + EXTRA_SPACE;
- }
- else {
- bufsize = bufsize << 1;
- }
- if (buf == initbuf)
- buf = NULL;
- buf = xrealloc(buf, bufsize);
- goto retry;
+ if (bufsize < conf.ifc_len) {
+ /* NetBSD returns required size for all interfaces. */
+ bufsize = conf.ifc_len + EXTRA_SPACE;
+ }
+ else {
+ bufsize = bufsize << 1;
+ }
+ if (buf == initbuf)
+ buf = NULL;
+ buf = xrealloc(buf, bufsize);
+ goto retry;
}
close(fd);
@@ -1794,10 +1718,10 @@ socket_s_ip_address_list(VALUE self)
list = rb_ary_new();
req = conf.ifc_req;
while ((char*)req < (char*)conf.ifc_req + conf.ifc_len) {
- struct sockaddr *addr = &req->ifr_addr;
+ struct sockaddr *addr = &req->ifr_addr;
if (IS_IP_FAMILY(addr->sa_family)) {
- rb_ary_push(list, sockaddr_obj(addr, sockaddr_len(addr)));
- }
+ rb_ary_push(list, sockaddr_obj(addr, sockaddr_len(addr)));
+ }
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
# ifndef _SIZEOF_ADDR_IFREQ
# define _SIZEOF_ADDR_IFREQ(r) \
@@ -1806,9 +1730,9 @@ socket_s_ip_address_list(VALUE self)
(r).ifr_addr.sa_len - sizeof(struct sockaddr) : \
0))
# endif
- req = (struct ifreq *)((char*)req + _SIZEOF_ADDR_IFREQ(*req));
+ req = (struct ifreq *)((char*)req + _SIZEOF_ADDR_IFREQ(*req));
#else
- req = (struct ifreq *)((char*)req + sizeof(struct ifreq));
+ req = (struct ifreq *)((char*)req + sizeof(struct ifreq));
#endif
}
@@ -1818,57 +1742,57 @@ socket_s_ip_address_list(VALUE self)
if (buf != initbuf)
xfree(buf);
if (fd != -1)
- close(fd);
+ close(fd);
errno = save_errno;
if (reason)
- rb_syserr_fail(save_errno, reason);
+ rb_syserr_fail(save_errno, reason);
return list;
#undef EXTRA_SPACE
#elif defined(_WIN32)
typedef struct ip_adapter_unicast_address_st {
- unsigned LONG_LONG dummy0;
- struct ip_adapter_unicast_address_st *Next;
- struct {
- struct sockaddr *lpSockaddr;
- int iSockaddrLength;
- } Address;
- int dummy1;
- int dummy2;
- int dummy3;
- long dummy4;
- long dummy5;
- long dummy6;
+ unsigned LONG_LONG dummy0;
+ struct ip_adapter_unicast_address_st *Next;
+ struct {
+ struct sockaddr *lpSockaddr;
+ int iSockaddrLength;
+ } Address;
+ int dummy1;
+ int dummy2;
+ int dummy3;
+ long dummy4;
+ long dummy5;
+ long dummy6;
} ip_adapter_unicast_address_t;
typedef struct ip_adapter_anycast_address_st {
- unsigned LONG_LONG dummy0;
- struct ip_adapter_anycast_address_st *Next;
- struct {
- struct sockaddr *lpSockaddr;
- int iSockaddrLength;
- } Address;
+ unsigned LONG_LONG dummy0;
+ struct ip_adapter_anycast_address_st *Next;
+ struct {
+ struct sockaddr *lpSockaddr;
+ int iSockaddrLength;
+ } Address;
} ip_adapter_anycast_address_t;
typedef struct ip_adapter_addresses_st {
- unsigned LONG_LONG dummy0;
- struct ip_adapter_addresses_st *Next;
- void *dummy1;
- ip_adapter_unicast_address_t *FirstUnicastAddress;
- ip_adapter_anycast_address_t *FirstAnycastAddress;
- void *dummy2;
- void *dummy3;
- void *dummy4;
- void *dummy5;
- void *dummy6;
- BYTE dummy7[8];
- DWORD dummy8;
- DWORD dummy9;
- DWORD dummy10;
- DWORD IfType;
- int OperStatus;
- DWORD dummy12;
- DWORD dummy13[16];
- void *dummy14;
+ unsigned LONG_LONG dummy0;
+ struct ip_adapter_addresses_st *Next;
+ void *dummy1;
+ ip_adapter_unicast_address_t *FirstUnicastAddress;
+ ip_adapter_anycast_address_t *FirstAnycastAddress;
+ void *dummy2;
+ void *dummy3;
+ void *dummy4;
+ void *dummy5;
+ void *dummy6;
+ BYTE dummy7[8];
+ DWORD dummy8;
+ DWORD dummy9;
+ DWORD dummy10;
+ DWORD IfType;
+ int OperStatus;
+ DWORD dummy12;
+ DWORD dummy13[16];
+ void *dummy14;
} ip_adapter_addresses_t;
typedef ULONG (WINAPI *GetAdaptersAddresses_t)(ULONG, ULONG, PVOID, ip_adapter_addresses_t *, PULONG);
HMODULE h;
@@ -1880,49 +1804,49 @@ socket_s_ip_address_list(VALUE self)
h = LoadLibrary("iphlpapi.dll");
if (!h)
- rb_notimplement();
+ rb_notimplement();
pGetAdaptersAddresses = (GetAdaptersAddresses_t)GetProcAddress(h, "GetAdaptersAddresses");
if (!pGetAdaptersAddresses) {
- FreeLibrary(h);
- rb_notimplement();
+ FreeLibrary(h);
+ rb_notimplement();
}
ret = pGetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &len);
if (ret != ERROR_SUCCESS && ret != ERROR_BUFFER_OVERFLOW) {
- errno = rb_w32_map_errno(ret);
- FreeLibrary(h);
- rb_sys_fail("GetAdaptersAddresses");
+ errno = rb_w32_map_errno(ret);
+ FreeLibrary(h);
+ rb_sys_fail("GetAdaptersAddresses");
}
adapters = (ip_adapter_addresses_t *)ALLOCA_N(BYTE, len);
ret = pGetAdaptersAddresses(AF_UNSPEC, 0, NULL, adapters, &len);
if (ret != ERROR_SUCCESS) {
- errno = rb_w32_map_errno(ret);
- FreeLibrary(h);
- rb_sys_fail("GetAdaptersAddresses");
+ errno = rb_w32_map_errno(ret);
+ FreeLibrary(h);
+ rb_sys_fail("GetAdaptersAddresses");
}
list = rb_ary_new();
for (; adapters; adapters = adapters->Next) {
- ip_adapter_unicast_address_t *uni;
- ip_adapter_anycast_address_t *any;
- if (adapters->OperStatus != 1) /* 1 means IfOperStatusUp */
- continue;
- for (uni = adapters->FirstUnicastAddress; uni; uni = uni->Next) {
+ ip_adapter_unicast_address_t *uni;
+ ip_adapter_anycast_address_t *any;
+ if (adapters->OperStatus != 1) /* 1 means IfOperStatusUp */
+ continue;
+ for (uni = adapters->FirstUnicastAddress; uni; uni = uni->Next) {
#ifndef INET6
- if (uni->Address.lpSockaddr->sa_family == AF_INET)
+ if (uni->Address.lpSockaddr->sa_family == AF_INET)
#else
- if (IS_IP_FAMILY(uni->Address.lpSockaddr->sa_family))
+ if (IS_IP_FAMILY(uni->Address.lpSockaddr->sa_family))
#endif
- rb_ary_push(list, sockaddr_obj(uni->Address.lpSockaddr, uni->Address.iSockaddrLength));
- }
- for (any = adapters->FirstAnycastAddress; any; any = any->Next) {
+ rb_ary_push(list, sockaddr_obj(uni->Address.lpSockaddr, uni->Address.iSockaddrLength));
+ }
+ for (any = adapters->FirstAnycastAddress; any; any = any->Next) {
#ifndef INET6
- if (any->Address.lpSockaddr->sa_family == AF_INET)
+ if (any->Address.lpSockaddr->sa_family == AF_INET)
#else
- if (IS_IP_FAMILY(any->Address.lpSockaddr->sa_family))
+ if (IS_IP_FAMILY(any->Address.lpSockaddr->sa_family))
#endif
- rb_ary_push(list, sockaddr_obj(any->Address.lpSockaddr, any->Address.iSockaddrLength));
- }
+ rb_ary_push(list, sockaddr_obj(any->Address.lpSockaddr, any->Address.iSockaddrLength));
+ }
}
FreeLibrary(h);
@@ -1936,6 +1860,8 @@ socket_s_ip_address_list(VALUE self)
void
Init_socket(void)
{
+ rb_ext_ractor_safe(true);
+
rsock_init_basicsocket();
/*
@@ -2064,7 +1990,7 @@ Init_socket(void)
/* for ext/socket/lib/socket.rb use only: */
rb_define_private_method(rb_cSocket,
- "__connect_nonblock", sock_connect_nonblock, 2);
+ "__connect_nonblock", sock_connect_nonblock, 2);
rb_define_method(rb_cSocket, "bind", sock_bind, 1);
rb_define_method(rb_cSocket, "listen", rsock_sock_listen, 1);
@@ -2072,7 +1998,7 @@ Init_socket(void)
/* for ext/socket/lib/socket.rb use only: */
rb_define_private_method(rb_cSocket,
- "__accept_nonblock", sock_accept_nonblock, 1);
+ "__accept_nonblock", sock_accept_nonblock, 1);
rb_define_method(rb_cSocket, "sysaccept", sock_sysaccept, 0);
@@ -2080,7 +2006,7 @@ Init_socket(void)
/* for ext/socket/lib/socket.rb use only: */
rb_define_private_method(rb_cSocket,
- "__recvfrom_nonblock", sock_recvfrom_nonblock, 4);
+ "__recvfrom_nonblock", sock_recvfrom_nonblock, 4);
rb_define_singleton_method(rb_cSocket, "socketpair", rsock_sock_s_socketpair, -1);
rb_define_singleton_method(rb_cSocket, "pair", rsock_sock_s_socketpair, -1);
@@ -2094,7 +2020,7 @@ Init_socket(void)
rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_in", sock_s_unpack_sockaddr_in, 1);
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1);
diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c
index 82789eeaab..f263ac3804 100644
--- a/ext/socket/sockssocket.c
+++ b/ext/socket/sockssocket.c
@@ -30,11 +30,11 @@ socks_init(VALUE sock, VALUE host, VALUE port)
static int init = 0;
if (init == 0) {
- SOCKSinit("ruby");
- init = 1;
+ SOCKSinit("ruby");
+ init = 1;
}
- return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS);
+ return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS, Qnil, Qnil);
}
#ifdef SOCKS5
diff --git a/ext/socket/tcpserver.c b/ext/socket/tcpserver.c
index 1bbb31adcf..04e5a0bb51 100644
--- a/ext/socket/tcpserver.c
+++ b/ext/socket/tcpserver.c
@@ -36,7 +36,7 @@ tcp_svr_init(int argc, VALUE *argv, VALUE sock)
VALUE hostname, port;
rb_scan_args(argc, argv, "011", &hostname, &port);
- return rsock_init_inetsock(sock, hostname, port, Qnil, Qnil, INET_SERVER);
+ return rsock_init_inetsock(sock, hostname, port, Qnil, Qnil, INET_SERVER, Qnil, Qnil);
}
/*
@@ -53,15 +53,12 @@ tcp_svr_init(int argc, VALUE *argv, VALUE sock)
*
*/
static VALUE
-tcp_accept(VALUE sock)
+tcp_accept(VALUE server)
{
- rb_io_t *fptr;
- union_sockaddr from;
- socklen_t fromlen;
+ union_sockaddr buffer;
+ socklen_t length = sizeof(buffer);
- GetOpenFile(sock, fptr);
- fromlen = (socklen_t)sizeof(from);
- return rsock_s_accept(rb_cTCPSocket, fptr->fd, &from.addr, &fromlen);
+ return rsock_s_accept(rb_cTCPSocket, server, &buffer.addr, &length);
}
/* :nodoc: */
@@ -91,15 +88,12 @@ tcp_accept_nonblock(VALUE sock, VALUE ex)
*
*/
static VALUE
-tcp_sysaccept(VALUE sock)
+tcp_sysaccept(VALUE server)
{
- rb_io_t *fptr;
- union_sockaddr from;
- socklen_t fromlen;
+ union_sockaddr buffer;
+ socklen_t length = sizeof(buffer);
- GetOpenFile(sock, fptr);
- fromlen = (socklen_t)sizeof(from);
- return rsock_s_accept(0, fptr->fd, &from.addr, &fromlen);
+ return rsock_s_accept(0, server, &buffer.addr, &length);
}
void
@@ -139,7 +133,7 @@ rsock_init_tcpserver(void)
rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
rb_define_private_method(rb_cTCPServer,
- "__accept_nonblock", tcp_accept_nonblock, 1);
+ "__accept_nonblock", tcp_accept_nonblock, 1);
rb_define_method(rb_cTCPServer, "sysaccept", tcp_sysaccept, 0);
rb_define_method(rb_cTCPServer, "initialize", tcp_svr_init, -1);
rb_define_method(rb_cTCPServer, "listen", rsock_sock_listen, 1); /* in socket.c */
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c
index 29a3eda45f..03787272f3 100644
--- a/ext/socket/tcpsocket.c
+++ b/ext/socket/tcpsocket.c
@@ -12,23 +12,42 @@
/*
* call-seq:
- * TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil)
+ * TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil, connect_timeout: nil)
*
* Opens a TCP connection to +remote_host+ on +remote_port+. If +local_host+
* and +local_port+ are specified, then those parameters are used on the local
* end to establish the connection.
+ *
+ * [:connect_timeout] specify the timeout in seconds.
*/
static VALUE
tcp_init(int argc, VALUE *argv, VALUE sock)
{
VALUE remote_host, remote_serv;
VALUE local_host, local_serv;
+ VALUE opt;
+ static ID keyword_ids[2];
+ VALUE kwargs[2];
+ VALUE resolv_timeout = Qnil;
+ VALUE connect_timeout = Qnil;
+
+ if (!keyword_ids[0]) {
+ CONST_ID(keyword_ids[0], "resolv_timeout");
+ CONST_ID(keyword_ids[1], "connect_timeout");
+ }
+
+ rb_scan_args(argc, argv, "22:", &remote_host, &remote_serv,
+ &local_host, &local_serv, &opt);
- rb_scan_args(argc, argv, "22", &remote_host, &remote_serv,
- &local_host, &local_serv);
+ if (!NIL_P(opt)) {
+ rb_get_kwargs(opt, keyword_ids, 0, 2, kwargs);
+ if (kwargs[0] != Qundef) { resolv_timeout = kwargs[0]; }
+ if (kwargs[1] != Qundef) { connect_timeout = kwargs[1]; }
+ }
return rsock_init_inetsock(sock, remote_host, remote_serv,
- local_host, local_serv, INET_CLIENT);
+ local_host, local_serv, INET_CLIENT,
+ resolv_timeout, connect_timeout);
}
static VALUE
@@ -59,8 +78,9 @@ tcp_sockaddr(struct sockaddr *addr, socklen_t len)
static VALUE
tcp_s_gethostbyname(VALUE obj, VALUE host)
{
+ rb_warn("TCPSocket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead.");
struct rb_addrinfo *res =
- rsock_addrinfo(host, Qnil, AF_UNSPEC, SOCK_STREAM, AI_CANONNAME);
+ rsock_addrinfo(host, Qnil, AF_UNSPEC, SOCK_STREAM, AI_CANONNAME);
return rsock_make_hostent(host, res, tcp_sockaddr);
}
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index 6ef8242a1e..5224e48a96 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -33,11 +33,11 @@ udp_init(int argc, VALUE *argv, VALUE sock)
int fd;
if (rb_scan_args(argc, argv, "01", &arg) == 1) {
- family = rsock_family_arg(arg);
+ family = rsock_family_arg(arg);
}
fd = rsock_socket(family, SOCK_DGRAM, 0);
if (fd < 0) {
- rb_sys_fail("socket(2) - udp");
+ rb_sys_fail("socket(2) - udp");
}
return rsock_init_sock(sock, fd);
@@ -60,9 +60,9 @@ udp_connect_internal(VALUE v)
rb_io_check_closed(fptr = arg->fptr);
fd = fptr->fd;
for (res = arg->res->ai; res; res = res->ai_next) {
- if (rsock_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
- return Qtrue;
- }
+ if (rsock_connect(fd, res->ai_addr, res->ai_addrlen, 0, NULL) >= 0) {
+ return Qtrue;
+ }
}
return Qfalse;
}
@@ -92,7 +92,7 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
GetOpenFile(sock, arg.fptr);
arg.res = rsock_addrinfo(host, port, rsock_fd_family(arg.fptr->fd), SOCK_DGRAM, 0);
ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
- rsock_freeaddrinfo, (VALUE)arg.res);
+ rsock_freeaddrinfo, (VALUE)arg.res);
if (!ret) rsock_sys_fail_host_port("connect(2)", host, port);
return INT2FIX(0);
}
@@ -108,10 +108,10 @@ udp_bind_internal(VALUE v)
rb_io_check_closed(fptr = arg->fptr);
fd = fptr->fd;
for (res = arg->res->ai; res; res = res->ai_next) {
- if (bind(fd, res->ai_addr, res->ai_addrlen) < 0) {
- continue;
- }
- return Qtrue;
+ if (bind(fd, res->ai_addr, res->ai_addrlen) < 0) {
+ continue;
+ }
+ return Qtrue;
}
return Qfalse;
}
@@ -137,7 +137,7 @@ udp_bind(VALUE sock, VALUE host, VALUE port)
GetOpenFile(sock, arg.fptr);
arg.res = rsock_addrinfo(host, port, rsock_fd_family(arg.fptr->fd), SOCK_DGRAM, 0);
ret = rb_ensure(udp_bind_internal, (VALUE)&arg,
- rsock_freeaddrinfo, (VALUE)arg.res);
+ rsock_freeaddrinfo, (VALUE)arg.res);
if (!ret) rsock_sys_fail_host_port("bind(2)", host, port);
return INT2FIX(0);
}
@@ -153,23 +153,26 @@ udp_send_internal(VALUE v)
{
struct udp_send_arg *arg = (void *)v;
rb_io_t *fptr;
- int n;
struct addrinfo *res;
rb_io_check_closed(fptr = arg->fptr);
for (res = arg->res->ai; res; res = res->ai_next) {
retry:
- arg->sarg.fd = fptr->fd;
- arg->sarg.to = res->ai_addr;
- arg->sarg.tolen = res->ai_addrlen;
- rsock_maybe_fd_writable(arg->sarg.fd);
- n = (int)BLOCKING_REGION_FD(rsock_sendto_blocking, &arg->sarg);
- if (n >= 0) {
- return INT2FIX(n);
- }
- if (rb_io_wait_writable(fptr->fd)) {
- goto retry;
- }
+ arg->sarg.fd = fptr->fd;
+ arg->sarg.to = res->ai_addr;
+ arg->sarg.tolen = res->ai_addrlen;
+
+#ifdef RSOCK_WAIT_BEFORE_BLOCKING
+ rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_WRITABLE), Qnil);
+#endif
+
+ ssize_t n = (ssize_t)BLOCKING_REGION_FD(rsock_sendto_blocking, &arg->sarg);
+
+ if (n >= 0) return RB_SSIZE2NUM(n);
+
+ if (rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
+ goto retry;
+ }
}
return Qfalse;
}
@@ -204,7 +207,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
VALUE ret;
if (argc == 2 || argc == 3) {
- return rsock_bsock_send(argc, argv, sock);
+ return rsock_bsock_send(argc, argv, sock);
}
rb_scan_args(argc, argv, "4", &arg.sarg.mesg, &flags, &host, &port);
@@ -214,7 +217,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
arg.sarg.flags = NUM2INT(flags);
arg.res = rsock_addrinfo(host, port, rsock_fd_family(arg.fptr->fd), SOCK_DGRAM, 0);
ret = rb_ensure(udp_send_internal, (VALUE)&arg,
- rsock_freeaddrinfo, (VALUE)arg.res);
+ rsock_freeaddrinfo, (VALUE)arg.res);
if (!ret) rsock_sys_fail_host_port("sendto(2)", host, port);
return ret;
}
@@ -243,5 +246,5 @@ rsock_init_udpsocket(void)
/* for ext/socket/lib/socket.rb use only: */
rb_define_private_method(rb_cUDPSocket,
- "__recvfrom_nonblock", udp_recvfrom_nonblock, 4);
+ "__recvfrom_nonblock", udp_recvfrom_nonblock, 4);
}
diff --git a/ext/socket/unixserver.c b/ext/socket/unixserver.c
index b1f2a38547..0ea5ac083c 100644
--- a/ext/socket/unixserver.c
+++ b/ext/socket/unixserver.c
@@ -10,7 +10,7 @@
#include "rubysocket.h"
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* call-seq:
* UNIXServer.new(path) => unixserver
@@ -47,16 +47,12 @@ unix_svr_init(VALUE sock, VALUE path)
*
*/
static VALUE
-unix_accept(VALUE sock)
+unix_accept(VALUE server)
{
- rb_io_t *fptr;
- struct sockaddr_un from;
- socklen_t fromlen;
+ struct sockaddr_un buffer;
+ socklen_t length = sizeof(buffer);
- GetOpenFile(sock, fptr);
- fromlen = (socklen_t)sizeof(struct sockaddr_un);
- return rsock_s_accept(rb_cUNIXSocket, fptr->fd,
- (struct sockaddr*)&from, &fromlen);
+ return rsock_s_accept(rb_cUNIXSocket, server, (struct sockaddr*)&buffer, &length);
}
/* :nodoc: */
@@ -70,7 +66,7 @@ unix_accept_nonblock(VALUE sock, VALUE ex)
GetOpenFile(sock, fptr);
fromlen = (socklen_t)sizeof(from);
return rsock_s_accept_nonblock(rb_cUNIXSocket, ex, fptr,
- (struct sockaddr *)&from, &fromlen);
+ (struct sockaddr *)&from, &fromlen);
}
/*
@@ -92,15 +88,12 @@ unix_accept_nonblock(VALUE sock, VALUE ex)
*
*/
static VALUE
-unix_sysaccept(VALUE sock)
+unix_sysaccept(VALUE server)
{
- rb_io_t *fptr;
- struct sockaddr_un from;
- socklen_t fromlen;
+ struct sockaddr_un buffer;
+ socklen_t length = sizeof(buffer);
- GetOpenFile(sock, fptr);
- fromlen = (socklen_t)sizeof(struct sockaddr_un);
- return rsock_s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
+ return rsock_s_accept(0, server, (struct sockaddr*)&buffer, &length);
}
#endif
@@ -108,7 +101,7 @@ unix_sysaccept(VALUE sock)
void
rsock_init_unixserver(void)
{
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* Document-class: UNIXServer < UNIXSocket
*
@@ -120,7 +113,7 @@ rsock_init_unixserver(void)
rb_define_method(rb_cUNIXServer, "accept", unix_accept, 0);
rb_define_private_method(rb_cUNIXServer,
- "__accept_nonblock", unix_accept_nonblock, 1);
+ "__accept_nonblock", unix_accept_nonblock, 1);
rb_define_method(rb_cUNIXServer, "sysaccept", unix_sysaccept, 0);
rb_define_method(rb_cUNIXServer, "listen", rsock_sock_listen, 1); /* in socket.c */
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 0c3a01d21e..26ab76fc9f 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -10,7 +10,7 @@
#include "rubysocket.h"
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
struct unixsock_arg {
struct sockaddr_un *sockaddr;
socklen_t sockaddrlen;
@@ -22,7 +22,7 @@ unixsock_connect_internal(VALUE a)
{
struct unixsock_arg *arg = (struct unixsock_arg *)a;
return (VALUE)rsock_connect(arg->fd, (struct sockaddr*)arg->sockaddr,
- arg->sockaddrlen, 0);
+ arg->sockaddrlen, 0, NULL);
}
static VALUE
@@ -43,6 +43,10 @@ unixsock_path_value(VALUE path)
}
}
#endif
+#ifdef _WIN32
+ /* UNIXSocket requires UTF-8 per spec. */
+ path = rb_str_export_to_enc(path, rb_utf8_encoding());
+#endif
return rb_get_path(path);
}
@@ -66,42 +70,42 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
fd = rsock_socket(AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
- rsock_sys_fail_path("socket(2)", path);
+ rsock_sys_fail_path("socket(2)", path);
}
if (server) {
status = bind(fd, (struct sockaddr*)&sockaddr, sockaddrlen);
}
else {
- int prot;
- struct unixsock_arg arg;
- arg.sockaddr = &sockaddr;
- arg.sockaddrlen = sockaddrlen;
- arg.fd = fd;
+ int prot;
+ struct unixsock_arg arg;
+ arg.sockaddr = &sockaddr;
+ arg.sockaddrlen = sockaddrlen;
+ arg.fd = fd;
status = (int)rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
- if (prot) {
- close(fd);
- rb_jump_tag(prot);
- }
+ if (prot) {
+ close(fd);
+ rb_jump_tag(prot);
+ }
}
if (status < 0) {
- int e = errno;
- close(fd);
- rsock_syserr_fail_path(e, "connect(2)", path);
+ int e = errno;
+ close(fd);
+ rsock_syserr_fail_path(e, "connect(2)", path);
}
if (server) {
- if (listen(fd, SOMAXCONN) < 0) {
- int e = errno;
- close(fd);
- rsock_syserr_fail_path(e, "listen(2)", path);
- }
+ if (listen(fd, SOMAXCONN) < 0) {
+ int e = errno;
+ close(fd);
+ rsock_syserr_fail_path(e, "listen(2)", path);
+ }
}
rsock_init_sock(sock, fd);
if (server) {
- GetOpenFile(sock, fptr);
+ GetOpenFile(sock, fptr);
fptr->pathv = rb_str_new_frozen(path);
}
@@ -143,13 +147,13 @@ unix_path(VALUE sock)
GetOpenFile(sock, fptr);
if (NIL_P(fptr->pathv)) {
- struct sockaddr_un addr;
- socklen_t len = (socklen_t)sizeof(addr);
- socklen_t len0 = len;
- if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
+ struct sockaddr_un addr;
+ socklen_t len = (socklen_t)sizeof(addr);
+ socklen_t len0 = len;
+ if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
rsock_sys_fail_path("getsockname(2)", fptr->pathv);
if (len0 < len) len = len0;
- fptr->pathv = rb_obj_freeze(rsock_unixpath_str(&addr, len));
+ fptr->pathv = rb_obj_freeze(rsock_unixpath_str(&addr, len));
}
return rb_str_dup(fptr->pathv);
}
@@ -240,21 +244,21 @@ unix_send_io(VALUE sock, VALUE val)
#if FD_PASSING_BY_MSG_CONTROL
union {
- struct cmsghdr hdr;
- char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
+ struct cmsghdr hdr;
+ char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
} cmsg;
#endif
if (rb_obj_is_kind_of(val, rb_cIO)) {
rb_io_t *valfptr;
- GetOpenFile(val, valfptr);
- fd = valfptr->fd;
+ GetOpenFile(val, valfptr);
+ fd = valfptr->fd;
}
else if (FIXNUM_P(val)) {
fd = FIX2INT(val);
}
else {
- rb_raise(rb_eTypeError, "neither IO nor file descriptor");
+ rb_raise(rb_eTypeError, "neither IO nor file descriptor");
}
GetOpenFile(sock, fptr);
@@ -285,8 +289,8 @@ unix_send_io(VALUE sock, VALUE val)
arg.fd = fptr->fd;
while ((int)BLOCKING_REGION_FD(sendmsg_blocking, &arg) == -1) {
- if (!rb_io_wait_writable(arg.fd))
- rsock_sys_fail_path("sendmsg(2)", fptr->pathv);
+ if (!rb_io_wait_writable(arg.fd))
+ rsock_sys_fail_path("sendmsg(2)", fptr->pathv);
}
return Qnil;
@@ -348,16 +352,16 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
int fd;
#if FD_PASSING_BY_MSG_CONTROL
union {
- struct cmsghdr hdr;
- char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
+ struct cmsghdr hdr;
+ char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
} cmsg;
#endif
rb_scan_args(argc, argv, "02", &klass, &mode);
if (argc == 0)
- klass = rb_cIO;
+ klass = rb_cIO;
if (argc <= 1)
- mode = Qnil;
+ mode = Qnil;
retry:
GetOpenFile(sock, fptr);
@@ -400,8 +404,8 @@ retry:
rb_gc_for_fd(e);
goto retry;
}
- if (!rb_io_wait_readable(arg.fd))
- rsock_syserr_fail_path(e, "recvmsg(2)", fptr->pathv);
+ if (!rb_io_wait_readable(arg.fd))
+ rsock_syserr_fail_path(e, "recvmsg(2)", fptr->pathv);
}
#if FD_PASSING_BY_MSG_CONTROL
@@ -412,41 +416,41 @@ retry:
rb_gc_for_fd(EMFILE);
goto retry;
}
- rb_raise(rb_eSocket,
- "file descriptor was not passed (msg_controllen=%d smaller than sizeof(struct cmsghdr)=%d)",
- (int)arg.msg.msg_controllen, (int)sizeof(struct cmsghdr));
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (msg_controllen=%d smaller than sizeof(struct cmsghdr)=%d)",
+ (int)arg.msg.msg_controllen, (int)sizeof(struct cmsghdr));
}
if (cmsg.hdr.cmsg_level != SOL_SOCKET) {
- rb_raise(rb_eSocket,
- "file descriptor was not passed (cmsg_level=%d, %d expected)",
- cmsg.hdr.cmsg_level, SOL_SOCKET);
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (cmsg_level=%d, %d expected)",
+ cmsg.hdr.cmsg_level, SOL_SOCKET);
}
if (cmsg.hdr.cmsg_type != SCM_RIGHTS) {
- rb_raise(rb_eSocket,
- "file descriptor was not passed (cmsg_type=%d, %d expected)",
- cmsg.hdr.cmsg_type, SCM_RIGHTS);
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (cmsg_type=%d, %d expected)",
+ cmsg.hdr.cmsg_type, SCM_RIGHTS);
}
if (arg.msg.msg_controllen < (socklen_t)CMSG_LEN(sizeof(int))) {
- rb_raise(rb_eSocket,
- "file descriptor was not passed (msg_controllen=%d smaller than CMSG_LEN(sizeof(int))=%d)",
- (int)arg.msg.msg_controllen, (int)CMSG_LEN(sizeof(int)));
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (msg_controllen=%d smaller than CMSG_LEN(sizeof(int))=%d)",
+ (int)arg.msg.msg_controllen, (int)CMSG_LEN(sizeof(int)));
}
if ((socklen_t)CMSG_SPACE(sizeof(int)) < arg.msg.msg_controllen) {
- rb_raise(rb_eSocket,
- "file descriptor was not passed (msg_controllen=%d bigger than CMSG_SPACE(sizeof(int))=%d)",
- (int)arg.msg.msg_controllen, (int)CMSG_SPACE(sizeof(int)));
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (msg_controllen=%d bigger than CMSG_SPACE(sizeof(int))=%d)",
+ (int)arg.msg.msg_controllen, (int)CMSG_SPACE(sizeof(int)));
}
if (cmsg.hdr.cmsg_len != CMSG_LEN(sizeof(int))) {
- rsock_discard_cmsg_resource(&arg.msg, 0);
- rb_raise(rb_eSocket,
- "file descriptor was not passed (cmsg_len=%d, %d expected)",
- (int)cmsg.hdr.cmsg_len, (int)CMSG_LEN(sizeof(int)));
+ rsock_discard_cmsg_resource(&arg.msg, 0);
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (cmsg_len=%d, %d expected)",
+ (int)cmsg.hdr.cmsg_len, (int)CMSG_LEN(sizeof(int)));
}
#else
if (arg.msg.msg_accrightslen != sizeof(fd)) {
- rb_raise(rb_eSocket,
- "file descriptor was not passed (accrightslen=%d, %d expected)",
- arg.msg.msg_accrightslen, (int)sizeof(fd));
+ rb_raise(rb_eSocket,
+ "file descriptor was not passed (accrightslen=%d, %d expected)",
+ arg.msg.msg_accrightslen, (int)sizeof(fd));
}
#endif
@@ -455,22 +459,18 @@ retry:
#endif
rb_update_max_fd(fd);
-
- if (rsock_cmsg_cloexec_state < 0)
- rsock_cmsg_cloexec_state = rsock_detect_cloexec(fd);
- if (rsock_cmsg_cloexec_state == 0 || fd <= 2)
- rb_maygvl_fd_fix_cloexec(fd);
+ rb_maygvl_fd_fix_cloexec(fd);
if (klass == Qnil)
- return INT2FIX(fd);
+ return INT2FIX(fd);
else {
- ID for_fd;
- int ff_argc;
- VALUE ff_argv[2];
- CONST_ID(for_fd, "for_fd");
- ff_argc = mode == Qnil ? 1 : 2;
- ff_argv[0] = INT2FIX(fd);
- ff_argv[1] = mode;
+ ID for_fd;
+ int ff_argc;
+ VALUE ff_argv[2];
+ CONST_ID(for_fd, "for_fd");
+ ff_argc = mode == Qnil ? 1 : 2;
+ ff_argv[0] = INT2FIX(fd);
+ ff_argv[1] = mode;
return rb_funcallv(klass, for_fd, ff_argc, ff_argv);
}
}
@@ -560,9 +560,9 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
domain = INT2FIX(PF_UNIX);
rb_scan_args(argc, argv, "02", &type, &protocol);
if (argc == 0)
- type = INT2FIX(SOCK_STREAM);
+ type = INT2FIX(SOCK_STREAM);
if (argc <= 1)
- protocol = INT2FIX(0);
+ protocol = INT2FIX(0);
args[0] = domain;
args[1] = type;
@@ -575,7 +575,7 @@ unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
void
rsock_init_unixsocket(void)
{
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
/*
* Document-class: UNIXSocket < BasicSocket
*
diff --git a/ext/stringio/depend b/ext/stringio/depend
index 02d468b306..828fc6e842 100644
--- a/ext/stringio/depend
+++ b/ext/stringio/depend
@@ -4,9 +4,166 @@ stringio.o: $(arch_hdrdir)/ruby/config.h
stringio.o: $(hdrdir)/ruby.h
stringio.o: $(hdrdir)/ruby/assert.h
stringio.o: $(hdrdir)/ruby/backward.h
+stringio.o: $(hdrdir)/ruby/backward/2/assume.h
+stringio.o: $(hdrdir)/ruby/backward/2/attributes.h
+stringio.o: $(hdrdir)/ruby/backward/2/bool.h
+stringio.o: $(hdrdir)/ruby/backward/2/inttypes.h
+stringio.o: $(hdrdir)/ruby/backward/2/limits.h
+stringio.o: $(hdrdir)/ruby/backward/2/long_long.h
+stringio.o: $(hdrdir)/ruby/backward/2/stdalign.h
+stringio.o: $(hdrdir)/ruby/backward/2/stdarg.h
stringio.o: $(hdrdir)/ruby/defines.h
stringio.o: $(hdrdir)/ruby/encoding.h
stringio.o: $(hdrdir)/ruby/intern.h
+stringio.o: $(hdrdir)/ruby/internal/abi.h
+stringio.o: $(hdrdir)/ruby/internal/anyargs.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+stringio.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+stringio.o: $(hdrdir)/ruby/internal/assume.h
+stringio.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+stringio.o: $(hdrdir)/ruby/internal/attr/artificial.h
+stringio.o: $(hdrdir)/ruby/internal/attr/cold.h
+stringio.o: $(hdrdir)/ruby/internal/attr/const.h
+stringio.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+stringio.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+stringio.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+stringio.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+stringio.o: $(hdrdir)/ruby/internal/attr/error.h
+stringio.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+stringio.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+stringio.o: $(hdrdir)/ruby/internal/attr/format.h
+stringio.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+stringio.o: $(hdrdir)/ruby/internal/attr/noalias.h
+stringio.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+stringio.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+stringio.o: $(hdrdir)/ruby/internal/attr/noinline.h
+stringio.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+stringio.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+stringio.o: $(hdrdir)/ruby/internal/attr/pure.h
+stringio.o: $(hdrdir)/ruby/internal/attr/restrict.h
+stringio.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+stringio.o: $(hdrdir)/ruby/internal/attr/warning.h
+stringio.o: $(hdrdir)/ruby/internal/attr/weakref.h
+stringio.o: $(hdrdir)/ruby/internal/cast.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+stringio.o: $(hdrdir)/ruby/internal/compiler_since.h
+stringio.o: $(hdrdir)/ruby/internal/config.h
+stringio.o: $(hdrdir)/ruby/internal/constant_p.h
+stringio.o: $(hdrdir)/ruby/internal/core.h
+stringio.o: $(hdrdir)/ruby/internal/core/rarray.h
+stringio.o: $(hdrdir)/ruby/internal/core/rbasic.h
+stringio.o: $(hdrdir)/ruby/internal/core/rbignum.h
+stringio.o: $(hdrdir)/ruby/internal/core/rclass.h
+stringio.o: $(hdrdir)/ruby/internal/core/rdata.h
+stringio.o: $(hdrdir)/ruby/internal/core/rfile.h
+stringio.o: $(hdrdir)/ruby/internal/core/rhash.h
+stringio.o: $(hdrdir)/ruby/internal/core/robject.h
+stringio.o: $(hdrdir)/ruby/internal/core/rregexp.h
+stringio.o: $(hdrdir)/ruby/internal/core/rstring.h
+stringio.o: $(hdrdir)/ruby/internal/core/rstruct.h
+stringio.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+stringio.o: $(hdrdir)/ruby/internal/ctype.h
+stringio.o: $(hdrdir)/ruby/internal/dllexport.h
+stringio.o: $(hdrdir)/ruby/internal/dosish.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/re.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/string.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+stringio.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+stringio.o: $(hdrdir)/ruby/internal/error.h
+stringio.o: $(hdrdir)/ruby/internal/eval.h
+stringio.o: $(hdrdir)/ruby/internal/event.h
+stringio.o: $(hdrdir)/ruby/internal/fl_type.h
+stringio.o: $(hdrdir)/ruby/internal/gc.h
+stringio.o: $(hdrdir)/ruby/internal/glob.h
+stringio.o: $(hdrdir)/ruby/internal/globals.h
+stringio.o: $(hdrdir)/ruby/internal/has/attribute.h
+stringio.o: $(hdrdir)/ruby/internal/has/builtin.h
+stringio.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+stringio.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+stringio.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+stringio.o: $(hdrdir)/ruby/internal/has/extension.h
+stringio.o: $(hdrdir)/ruby/internal/has/feature.h
+stringio.o: $(hdrdir)/ruby/internal/has/warning.h
+stringio.o: $(hdrdir)/ruby/internal/intern/array.h
+stringio.o: $(hdrdir)/ruby/internal/intern/bignum.h
+stringio.o: $(hdrdir)/ruby/internal/intern/class.h
+stringio.o: $(hdrdir)/ruby/internal/intern/compar.h
+stringio.o: $(hdrdir)/ruby/internal/intern/complex.h
+stringio.o: $(hdrdir)/ruby/internal/intern/cont.h
+stringio.o: $(hdrdir)/ruby/internal/intern/dir.h
+stringio.o: $(hdrdir)/ruby/internal/intern/enum.h
+stringio.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+stringio.o: $(hdrdir)/ruby/internal/intern/error.h
+stringio.o: $(hdrdir)/ruby/internal/intern/eval.h
+stringio.o: $(hdrdir)/ruby/internal/intern/file.h
+stringio.o: $(hdrdir)/ruby/internal/intern/gc.h
+stringio.o: $(hdrdir)/ruby/internal/intern/hash.h
+stringio.o: $(hdrdir)/ruby/internal/intern/io.h
+stringio.o: $(hdrdir)/ruby/internal/intern/load.h
+stringio.o: $(hdrdir)/ruby/internal/intern/marshal.h
+stringio.o: $(hdrdir)/ruby/internal/intern/numeric.h
+stringio.o: $(hdrdir)/ruby/internal/intern/object.h
+stringio.o: $(hdrdir)/ruby/internal/intern/parse.h
+stringio.o: $(hdrdir)/ruby/internal/intern/proc.h
+stringio.o: $(hdrdir)/ruby/internal/intern/process.h
+stringio.o: $(hdrdir)/ruby/internal/intern/random.h
+stringio.o: $(hdrdir)/ruby/internal/intern/range.h
+stringio.o: $(hdrdir)/ruby/internal/intern/rational.h
+stringio.o: $(hdrdir)/ruby/internal/intern/re.h
+stringio.o: $(hdrdir)/ruby/internal/intern/ruby.h
+stringio.o: $(hdrdir)/ruby/internal/intern/select.h
+stringio.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+stringio.o: $(hdrdir)/ruby/internal/intern/signal.h
+stringio.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+stringio.o: $(hdrdir)/ruby/internal/intern/string.h
+stringio.o: $(hdrdir)/ruby/internal/intern/struct.h
+stringio.o: $(hdrdir)/ruby/internal/intern/thread.h
+stringio.o: $(hdrdir)/ruby/internal/intern/time.h
+stringio.o: $(hdrdir)/ruby/internal/intern/variable.h
+stringio.o: $(hdrdir)/ruby/internal/intern/vm.h
+stringio.o: $(hdrdir)/ruby/internal/interpreter.h
+stringio.o: $(hdrdir)/ruby/internal/iterator.h
+stringio.o: $(hdrdir)/ruby/internal/memory.h
+stringio.o: $(hdrdir)/ruby/internal/method.h
+stringio.o: $(hdrdir)/ruby/internal/module.h
+stringio.o: $(hdrdir)/ruby/internal/newobj.h
+stringio.o: $(hdrdir)/ruby/internal/rgengc.h
+stringio.o: $(hdrdir)/ruby/internal/scan_args.h
+stringio.o: $(hdrdir)/ruby/internal/special_consts.h
+stringio.o: $(hdrdir)/ruby/internal/static_assert.h
+stringio.o: $(hdrdir)/ruby/internal/stdalign.h
+stringio.o: $(hdrdir)/ruby/internal/stdbool.h
+stringio.o: $(hdrdir)/ruby/internal/symbol.h
+stringio.o: $(hdrdir)/ruby/internal/value.h
+stringio.o: $(hdrdir)/ruby/internal/value_type.h
+stringio.o: $(hdrdir)/ruby/internal/variable.h
+stringio.o: $(hdrdir)/ruby/internal/warning_push.h
+stringio.o: $(hdrdir)/ruby/internal/xmalloc.h
stringio.o: $(hdrdir)/ruby/io.h
stringio.o: $(hdrdir)/ruby/missing.h
stringio.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index c8057eefb5..0054766dac 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; indent-tabs-mode: t -*- */
/**********************************************************************
stringio.c -
@@ -11,7 +12,7 @@
**********************************************************************/
-#define STRINGIO_VERSION "0.1.0"
+#define STRINGIO_VERSION "3.0.4"
#include "ruby.h"
#include "ruby/io.h"
@@ -64,17 +65,22 @@ strio_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
n = strchr(n, '|');
}
e = strchr(++n, ':');
- len = e ? e - n : strlen(n);
+ len = e ? e - n : (long)strlen(n);
if (len > 0 && len <= ENCODING_MAXNAMELEN) {
+ rb_encoding *enc;
if (e) {
memcpy(encname, n, len);
encname[len] = '\0';
n = encname;
}
- convconfig_p->enc = rb_enc_find(n);
+ enc = rb_enc_find(n);
+ if (e)
+ convconfig_p->enc2 = enc;
+ else
+ convconfig_p->enc = enc;
}
if (e && (len = strlen(++e)) > 0 && len <= ENCODING_MAXNAMELEN) {
- convconfig_p->enc2 = rb_enc_find(e);
+ convconfig_p->enc = rb_enc_find(e);
}
}
}
@@ -251,9 +257,20 @@ strio_s_allocate(VALUE klass)
}
/*
- * call-seq: StringIO.new(string=""[, mode])
+ * call-seq:
+ * StringIO.new(string = '', mode = 'r+') -> new_stringio
+ *
+ * Note that +mode+ defaults to <tt>'r'</tt> if +string+ is frozen.
+ *
+ * Returns a new \StringIO instance formed from +string+ and +mode+;
+ * see {Access Modes}[rdoc-ref:File@Access+Modes]:
*
- * Creates new StringIO instance from with _string_ and _mode_.
+ * strio = StringIO.new # => #<StringIO>
+ * strio.close
+ *
+ * The instance should be closed when no longer needed.
+ *
+ * Related: StringIO.open (accepts block; closes automatically).
*/
static VALUE
strio_initialize(int argc, VALUE *argv, VALUE self)
@@ -363,7 +380,12 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr, VALUE self)
rb_str_resize(string, 0);
}
ptr->string = string;
- ptr->enc = convconfig.enc;
+ if (argc == 1) {
+ ptr->enc = rb_enc_get(string);
+ }
+ else {
+ ptr->enc = convconfig.enc;
+ }
ptr->pos = 0;
ptr->lineno = 0;
if (ptr->flags & FMODE_SETENC_BY_BOM) set_encoding_by_bom(ptr);
@@ -381,11 +403,26 @@ strio_finalize(VALUE self)
}
/*
- * call-seq: StringIO.open(string=""[, mode]) {|strio| ...}
+ * call-seq:
+ * StringIO.open(string = '', mode = 'r+') {|strio| ... }
+ *
+ * Note that +mode+ defaults to <tt>'r'</tt> if +string+ is frozen.
+ *
+ * Creates a new \StringIO instance formed from +string+ and +mode+;
+ * see {Access Modes}[rdoc-ref:File@Access+Modes].
+ *
+ * With no block, returns the new instance:
*
- * Equivalent to StringIO.new except that when it is called with a block, it
- * yields with the new instance and closes it, and returns the result which
- * returned from the block.
+ * strio = StringIO.open # => #<StringIO>
+ *
+ * With a block, calls the block with the new instance
+ * and returns the block's value;
+ * closes the instance on block exit.
+ *
+ * StringIO.open {|strio| p strio }
+ * # => #<StringIO>
+ *
+ * Related: StringIO.new.
*/
static VALUE
strio_s_open(int argc, VALUE *argv, VALUE klass)
@@ -471,9 +508,23 @@ strio_unimpl(int argc, VALUE *argv, VALUE self)
}
/*
- * call-seq: strio.string -> string
+ * call-seq:
+ * string -> string
+ *
+ * Returns underlying string:
+ *
+ * StringIO.open('foo') do |strio|
+ * p strio.string
+ * strio.string = 'bar'
+ * p strio.string
+ * end
*
- * Returns underlying String object, the subject of IO.
+ * Output:
+ *
+ * "foo"
+ * "bar"
+ *
+ * Related: StringIO#string= (assigns the underlying string).
*/
static VALUE
strio_get_string(VALUE self)
@@ -483,9 +534,23 @@ strio_get_string(VALUE self)
/*
* call-seq:
- * strio.string = string -> string
+ * string = other_string -> other_string
+ *
+ * Assigns the underlying string as +other_string+, and sets position to zero;
+ * returns +other_string+:
+ *
+ * StringIO.open('foo') do |strio|
+ * p strio.string
+ * strio.string = 'bar'
+ * p strio.string
+ * end
+ *
+ * Output:
*
- * Changes underlying String object, the subject of IO.
+ * "foo"
+ * "bar"
+ *
+ * Related: StringIO#string (returns the underlying string).
*/
static VALUE
strio_set_string(VALUE self, VALUE string)
@@ -503,10 +568,13 @@ strio_set_string(VALUE self, VALUE string)
/*
* call-seq:
- * strio.close -> nil
+ * close -> nil
+ *
+ * Closes +self+ for both reading and writing.
+ *
+ * Raises IOError if reading or writing is attempted.
*
- * Closes a StringIO. The stream is unavailable for any further data
- * operations; an +IOError+ is raised if such an attempt is made.
+ * Related: StringIO#close_read, StringIO#close_write.
*/
static VALUE
strio_close(VALUE self)
@@ -518,10 +586,13 @@ strio_close(VALUE self)
/*
* call-seq:
- * strio.close_read -> nil
+ * close_read -> nil
*
- * Closes the read end of a StringIO. Will raise an +IOError+ if the
- * receiver is not readable.
+ * Closes +self+ for reading; closed-write setting remains unchanged.
+ *
+ * Raises IOError if reading is attempted.
+ *
+ * Related: StringIO#close, StringIO#close_write.
*/
static VALUE
strio_close_read(VALUE self)
@@ -536,10 +607,13 @@ strio_close_read(VALUE self)
/*
* call-seq:
- * strio.close_write -> nil
+ * close_write -> nil
+ *
+ * Closes +self+ for writing; closed-read setting remains unchanged.
*
- * Closes the write end of a StringIO. Will raise an +IOError+ if the
- * receiver is not writeable.
+ * Raises IOError if writing is attempted.
+ *
+ * Related: StringIO#close, StringIO#close_read.
*/
static VALUE
strio_close_write(VALUE self)
@@ -554,9 +628,10 @@ strio_close_write(VALUE self)
/*
* call-seq:
- * strio.closed? -> true or false
+ * closed? -> true or false
*
- * Returns +true+ if the stream is completely closed, +false+ otherwise.
+ * Returns +true+ if +self+ is closed for both reading and writing,
+ * +false+ otherwise.
*/
static VALUE
strio_closed(VALUE self)
@@ -568,9 +643,9 @@ strio_closed(VALUE self)
/*
* call-seq:
- * strio.closed_read? -> true or false
+ * closed_read? -> true or false
*
- * Returns +true+ if the stream is not readable, +false+ otherwise.
+ * Returns +true+ if +self+ is closed for reading, +false+ otherwise.
*/
static VALUE
strio_closed_read(VALUE self)
@@ -582,9 +657,9 @@ strio_closed_read(VALUE self)
/*
* call-seq:
- * strio.closed_write? -> true or false
+ * closed_write? -> true or false
*
- * Returns +true+ if the stream is not writable, +false+ otherwise.
+ * Returns +true+ if +self+ is closed for writing, +false+ otherwise.
*/
static VALUE
strio_closed_write(VALUE self)
@@ -594,19 +669,29 @@ strio_closed_write(VALUE self)
return Qtrue;
}
+static struct StringIO *
+strio_to_read(VALUE self)
+{
+ struct StringIO *ptr = readable(self);
+ if (ptr->pos < RSTRING_LEN(ptr->string)) return ptr;
+ return NULL;
+}
+
/*
* call-seq:
- * strio.eof -> true or false
- * strio.eof? -> true or false
+ * eof? -> true or false
+ *
+ * Returns +true+ if positioned at end-of-stream, +false+ otherwise;
+ * see {Position}[rdoc-ref:File@Position].
+ *
+ * Raises IOError if the stream is not opened for reading.
*
- * Returns true if the stream is at the end of the data (underlying string).
- * The stream must be opened for reading or an +IOError+ will be raised.
+ * StreamIO#eof is an alias for StreamIO#eof?.
*/
static VALUE
strio_eof(VALUE self)
{
- struct StringIO *ptr = readable(self);
- if (ptr->pos < RSTRING_LEN(ptr->string)) return Qfalse;
+ if (strio_to_read(self)) return Qfalse;
return Qtrue;
}
@@ -631,13 +716,10 @@ strio_copy(VALUE copy, VALUE orig)
/*
* call-seq:
- * strio.lineno -> integer
+ * lineno -> current_line_number
*
- * Returns the current line number. The stream must be
- * opened for reading. +lineno+ counts the number of times +gets+ is
- * called, rather than the number of newlines encountered. The two
- * values will differ if +gets+ is called with a separator other than
- * newline. See also the <code>$.</code> variable.
+ * Returns the current line number in +self+;
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
*/
static VALUE
strio_get_lineno(VALUE self)
@@ -647,10 +729,10 @@ strio_get_lineno(VALUE self)
/*
* call-seq:
- * strio.lineno = integer -> integer
+ * lineno = new_line_number -> new_line_number
*
- * Manually sets the current line number to the given value.
- * <code>$.</code> is updated only on the next read.
+ * Sets the current line number in +self+ to the given +new_line_number+;
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
*/
static VALUE
strio_set_lineno(VALUE self, VALUE lineno)
@@ -661,9 +743,10 @@ strio_set_lineno(VALUE self, VALUE lineno)
/*
* call-seq:
- * strio.binmode -> stringio
+ * binmode -> self
*
- * Puts stream into binary mode. See IO#binmode.
+ * Sets the data mode in +self+ to binary mode;
+ * see {Data Mode}[rdoc-ref:File@Data+Mode].
*
*/
static VALUE
@@ -687,11 +770,27 @@ strio_binmode(VALUE self)
/*
* call-seq:
- * strio.reopen(other_StrIO) -> strio
- * strio.reopen(string, mode) -> strio
+ * reopen(other, mode = 'r+') -> self
+ *
+ * Reinitializes the stream with the given +other+ (string or StringIO) and +mode+;
+ * see IO.new:
+ *
+ * StringIO.open('foo') do |strio|
+ * p strio.string
+ * strio.reopen('bar')
+ * p strio.string
+ * other_strio = StringIO.new('baz')
+ * strio.reopen(other_strio)
+ * p strio.string
+ * other_strio.close
+ * end
+ *
+ * Output:
+ *
+ * "foo"
+ * "bar"
+ * "baz"
*
- * Reinitializes the stream with the given <i>other_StrIO</i> or _string_
- * and _mode_ (see StringIO#new).
*/
static VALUE
strio_reopen(int argc, VALUE *argv, VALUE self)
@@ -705,10 +804,12 @@ strio_reopen(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * strio.pos -> integer
- * strio.tell -> integer
+ * pos -> stream_position
+ *
+ * Returns the current position (in bytes);
+ * see {Position}[rdoc-ref:IO@Position].
*
- * Returns the current offset (in bytes).
+ * StringIO#tell is an alias for StringIO#pos.
*/
static VALUE
strio_get_pos(VALUE self)
@@ -718,9 +819,10 @@ strio_get_pos(VALUE self)
/*
* call-seq:
- * strio.pos = integer -> integer
+ * pos = new_position -> new_position
*
- * Seeks to the given position (in bytes).
+ * Sets the current position (in bytes);
+ * see {Position}[rdoc-ref:IO@Position].
*/
static VALUE
strio_set_pos(VALUE self, VALUE pos)
@@ -736,10 +838,11 @@ strio_set_pos(VALUE self, VALUE pos)
/*
* call-seq:
- * strio.rewind -> 0
+ * rewind -> 0
*
- * Positions the stream to the beginning of input, resetting
- * +lineno+ to zero.
+ * Sets the current position and line number to zero;
+ * see {Position}[rdoc-ref:IO@Position]
+ * and {Line Number}[rdoc-ref:IO@Line+Number].
*/
static VALUE
strio_rewind(VALUE self)
@@ -752,10 +855,11 @@ strio_rewind(VALUE self)
/*
* call-seq:
- * strio.seek(amount, whence=SEEK_SET) -> 0
+ * seek(offset, whence = SEEK_SET) -> 0
*
- * Seeks to a given offset _amount_ in the stream according to
- * the value of _whence_ (see IO#seek).
+ * Sets the current position to the given integer +offset+ (in bytes),
+ * with respect to a given constant +whence+;
+ * see {Position}[rdoc-ref:IO@Position].
*/
static VALUE
strio_seek(int argc, VALUE *argv, VALUE self)
@@ -791,9 +895,9 @@ strio_seek(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * strio.sync -> true
+ * sync -> true
*
- * Returns +true+ always.
+ * Returns +true+; implemented only for compatibility with other stream classes.
*/
static VALUE
strio_get_sync(VALUE self)
@@ -808,19 +912,21 @@ strio_get_sync(VALUE self)
/*
* call-seq:
- * strio.each_byte {|byte| block } -> strio
- * strio.each_byte -> anEnumerator
+ * each_byte {|byte| ... } -> self
*
- * See IO#each_byte.
+ * With a block given, calls the block with each remaining byte in the stream;
+ * see {Byte IO}[rdoc-ref:IO@Byte+IO].
+ *
+ * With no block given, returns an enumerator.
*/
static VALUE
strio_each_byte(VALUE self)
{
- struct StringIO *ptr = readable(self);
+ struct StringIO *ptr;
RETURN_ENUMERATOR(self, 0, 0);
- while (ptr->pos < RSTRING_LEN(ptr->string)) {
+ while ((ptr = strio_to_read(self)) != NULL) {
char c = RSTRING_PTR(ptr->string)[ptr->pos++];
rb_yield(CHR2FIX(c));
}
@@ -828,22 +934,11 @@ strio_each_byte(VALUE self)
}
/*
- * This is a deprecated alias for #each_byte.
- */
-static VALUE
-strio_bytes(VALUE self)
-{
- rb_warn("StringIO#bytes is deprecated; use #each_byte instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(self, ID2SYM(rb_intern("each_byte")), 0, 0);
- return strio_each_byte(self);
-}
-
-/*
* call-seq:
- * strio.getc -> string or nil
+ * getc -> character or nil
*
- * See IO#getc.
+ * Reads and returns the next character from the stream;
+ * see {Character IO}[rdoc-ref:IO@Character+IO].
*/
static VALUE
strio_getc(VALUE self)
@@ -866,9 +961,10 @@ strio_getc(VALUE self)
/*
* call-seq:
- * strio.getbyte -> fixnum or nil
+ * getbyte -> byte or nil
*
- * See IO#getbyte.
+ * Reads and returns the next 8-bit byte from the stream;
+ * see {Byte IO}[rdoc-ref:IO@Byte+IO].
*/
static VALUE
strio_getbyte(VALUE self)
@@ -904,12 +1000,10 @@ strio_extend(struct StringIO *ptr, long pos, long len)
/*
* call-seq:
- * strio.ungetc(string) -> nil
+ * ungetc(character) -> nil
*
- * Pushes back one character (passed as a parameter)
- * such that a subsequent buffered read will return it. There is no
- * limitation for multiple pushbacks including pushing back behind the
- * beginning of the buffer string.
+ * Pushes back ("unshifts") a character or integer onto the stream;
+ * see {Character IO}[rdoc-ref:IO@Character+IO].
*/
static VALUE
strio_ungetc(VALUE self, VALUE c)
@@ -944,9 +1038,10 @@ strio_ungetc(VALUE self, VALUE c)
/*
* call-seq:
- * strio.ungetbyte(fixnum) -> nil
+ * ungetbyte(byte) -> nil
*
- * See IO#ungetbyte
+ * Pushes back ("unshifts") an 8-bit byte onto the stream;
+ * see {Byte IO}[rdoc-ref:IO@Byte+IO].
*/
static VALUE
strio_ungetbyte(VALUE self, VALUE c)
@@ -983,7 +1078,7 @@ strio_unget_bytes(struct StringIO *ptr, const char *cp, long cl)
len = RSTRING_LEN(str);
rest = pos - len;
if (cl > pos) {
- long ex = (rest < 0 ? cl-pos : cl+rest);
+ long ex = cl - (rest < 0 ? pos : len);
rb_str_modify_expand(str, ex);
rb_str_set_len(str, len + ex);
s = RSTRING_PTR(str);
@@ -1006,9 +1101,10 @@ strio_unget_bytes(struct StringIO *ptr, const char *cp, long cl)
/*
* call-seq:
- * strio.readchar -> string
+ * readchar -> string
*
- * See IO#readchar.
+ * Like +getc+, but raises an exception if already at end-of-stream;
+ * see {Character IO}[rdoc-ref:IO@Character+IO].
*/
static VALUE
strio_readchar(VALUE self)
@@ -1020,9 +1116,10 @@ strio_readchar(VALUE self)
/*
* call-seq:
- * strio.readbyte -> fixnum
+ * readbyte -> byte
*
- * See IO#readbyte.
+ * Like +getbyte+, but raises an exception if already at end-of-stream;
+ * see {Byte IO}[rdoc-ref:IO@Byte+IO].
*/
static VALUE
strio_readbyte(VALUE self)
@@ -1034,10 +1131,12 @@ strio_readbyte(VALUE self)
/*
* call-seq:
- * strio.each_char {|char| block } -> strio
- * strio.each_char -> anEnumerator
+ * each_char {|c| ... } -> self
+ *
+ * With a block given, calls the block with each remaining character in the stream;
+ * see {Character IO}[rdoc-ref:IO@Character+IO].
*
- * See IO#each_char.
+ * With no block given, returns an enumerator.
*/
static VALUE
strio_each_char(VALUE self)
@@ -1053,23 +1152,13 @@ strio_each_char(VALUE self)
}
/*
- * This is a deprecated alias for #each_char.
- */
-static VALUE
-strio_chars(VALUE self)
-{
- rb_warn("StringIO#chars is deprecated; use #each_char instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(self, ID2SYM(rb_intern("each_char")), 0, 0);
- return strio_each_char(self);
-}
-
-/*
* call-seq:
- * strio.each_codepoint {|c| block } -> strio
- * strio.each_codepoint -> anEnumerator
+ * each_codepoint {|codepoint| ... } -> self
*
- * See IO#each_codepoint.
+ * With a block given, calls the block with each remaining codepoint in the stream;
+ * see {Codepoint IO}[rdoc-ref:IO@Codepoint+IO].
+ *
+ * With no block given, returns an enumerator.
*/
static VALUE
strio_each_codepoint(VALUE self)
@@ -1083,31 +1172,15 @@ strio_each_codepoint(VALUE self)
ptr = readable(self);
enc = get_enc(ptr);
- for (;;) {
- if (ptr->pos >= RSTRING_LEN(ptr->string)) {
- return self;
- }
-
+ while ((ptr = strio_to_read(self)) != NULL) {
c = rb_enc_codepoint_len(RSTRING_PTR(ptr->string)+ptr->pos,
RSTRING_END(ptr->string), &n, enc);
- rb_yield(UINT2NUM(c));
ptr->pos += n;
+ rb_yield(UINT2NUM(c));
}
return self;
}
-/*
- * This is a deprecated alias for #each_codepoint.
- */
-static VALUE
-strio_codepoints(VALUE self)
-{
- rb_warn("StringIO#codepoints is deprecated; use #each_codepoint instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(self, ID2SYM(rb_intern("each_codepoint")), 0, 0);
- return strio_each_codepoint(self);
-}
-
/* Boyer-Moore search: copied from regex.c */
static void
bm_init_skip(long *skip, const char *pat, long m)
@@ -1152,8 +1225,10 @@ prepare_getline_args(struct getline_arg *arg, int argc, VALUE *argv)
{
VALUE str, lim, opts;
long limit = -1;
+ int respect_chomp;
argc = rb_scan_args(argc, argv, "02:", &str, &lim, &opts);
+ respect_chomp = argc == 0 || !NIL_P(str);
switch (argc) {
case 0:
str = rb_rs;
@@ -1187,7 +1262,9 @@ prepare_getline_args(struct getline_arg *arg, int argc, VALUE *argv)
keywords[0] = rb_intern_const("chomp");
}
rb_get_kwargs(opts, keywords, 0, 1, &vchomp);
- arg->chomp = (vchomp != Qundef) && RTEST(vchomp);
+ if (respect_chomp) {
+ arg->chomp = (vchomp != Qundef) && RTEST(vchomp);
+ }
}
return arg;
}
@@ -1208,7 +1285,7 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
const char *s, *e, *p;
long n, limit = arg->limit;
VALUE str = arg->rs;
- int w = 0;
+ long w = 0;
rb_encoding *enc = get_enc(ptr);
if (ptr->pos >= (n = RSTRING_LEN(ptr->string))) {
@@ -1227,6 +1304,7 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
str = strio_substr(ptr, ptr->pos, e - s - w, enc);
}
else if ((n = RSTRING_LEN(str)) == 0) {
+ const char *paragraph_end = NULL;
p = s;
while (p[(p + 1 < e) && (*p == '\r') && 0] == '\n') {
p += *p == '\r';
@@ -1236,19 +1314,21 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
}
s = p;
while ((p = memchr(p, '\n', e - p)) && (p != e)) {
- if (*++p == '\n') {
- e = p + 1;
- w = (arg->chomp ? 1 : 0);
- break;
- }
- else if (*p == '\r' && p < e && p[1] == '\n') {
- e = p + 2;
- w = (arg->chomp ? 2 : 0);
- break;
- }
+ p++;
+ if (!((p < e && *p == '\n') ||
+ (p + 1 < e && *p == '\r' && *(p+1) == '\n'))) {
+ continue;
+ }
+ paragraph_end = p - ((*(p-2) == '\r') ? 2 : 1);
+ while ((p < e && *p == '\n') ||
+ (p + 1 < e && *p == '\r' && *(p+1) == '\n')) {
+ p += (*p == '\r') ? 2 : 1;
+ }
+ e = p;
+ break;
}
- if (!w && arg->chomp) {
- w = chomp_newline_width(s, e);
+ if (arg->chomp && paragraph_end) {
+ w = e - paragraph_end;
}
str = strio_substr(ptr, s - RSTRING_PTR(ptr->string), e - s - w, enc);
}
@@ -1260,11 +1340,13 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
str = strio_substr(ptr, ptr->pos, e - s - w, enc);
}
else {
- if (n < e - s) {
- if (e - s < 1024) {
+ if (n < e - s + arg->chomp) {
+ /* unless chomping, RS at the end does not matter */
+ if (e - s < 1024 || n == e - s) {
for (p = s; p + n <= e; ++p) {
if (MEMCMP(p, RSTRING_PTR(str), char, n) == 0) {
- e = p + (arg->chomp ? 0 : n);
+ e = p + n;
+ w = (arg->chomp ? n : 0);
break;
}
}
@@ -1287,11 +1369,13 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
/*
* call-seq:
- * strio.gets(sep=$/, chomp: false) -> string or nil
- * strio.gets(limit, chomp: false) -> string or nil
- * strio.gets(sep, limit, chomp: false) -> string or nil
+ * gets(sep = $/, chomp: false) -> string or nil
+ * gets(limit, chomp: false) -> string or nil
+ * gets(sep, limit, chomp: false) -> string or nil
*
- * See IO#gets.
+ * Reads and returns a line from the stream;
+ * assigns the return value to <tt>$_</tt>;
+ * see {Line IO}[rdoc-ref:IO@Line+IO].
*/
static VALUE
strio_gets(int argc, VALUE *argv, VALUE self)
@@ -1311,11 +1395,12 @@ strio_gets(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * strio.readline(sep=$/, chomp: false) -> string
- * strio.readline(limit, chomp: false) -> string or nil
- * strio.readline(sep, limit, chomp: false) -> string or nil
+ * readline(sep = $/, chomp: false) -> string
+ * readline(limit, chomp: false) -> string
+ * readline(sep, limit, chomp: false) -> string
*
- * See IO#readline.
+ * Reads a line as with IO#gets, but raises EOFError if already at end-of-file;
+ * see {Line IO}[rdoc-ref:IO@Line+IO].
*/
static VALUE
strio_readline(int argc, VALUE *argv, VALUE self)
@@ -1327,17 +1412,16 @@ strio_readline(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * strio.each(sep=$/, chomp: false) {|line| block } -> strio
- * strio.each(limit, chomp: false) {|line| block } -> strio
- * strio.each(sep, limit, chomp: false) {|line| block } -> strio
- * strio.each(...) -> anEnumerator
+ * each_line(sep = $/, chomp: false) {|line| ... } -> self
+ * each_line(limit, chomp: false) {|line| ... } -> self
+ * each_line(sep, limit, chomp: false) {|line| ... } -> self
*
- * strio.each_line(sep=$/, chomp: false) {|line| block } -> strio
- * strio.each_line(limit, chomp: false) {|line| block } -> strio
- * strio.each_line(sep, limit, chomp: false) {|line| block } -> strio
- * strio.each_line(...) -> anEnumerator
+ * Calls the block with each remaining line read from the stream;
+ * does nothing if already at end-of-file;
+ * returns +self+.
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * See IO#each.
+ * StringIO#each is an alias for StringIO#each_line.
*/
static VALUE
strio_each(int argc, VALUE *argv, VALUE self)
@@ -1359,18 +1443,6 @@ strio_each(int argc, VALUE *argv, VALUE self)
}
/*
- * This is a deprecated alias for #each_line.
- */
-static VALUE
-strio_lines(int argc, VALUE *argv, VALUE self)
-{
- rb_warn("StringIO#lines is deprecated; use #each_line instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(self, ID2SYM(rb_intern("each_line")), argc, argv);
- return strio_each(argc, argv, self);
-}
-
-/*
* call-seq:
* strio.readlines(sep=$/, chomp: false) -> array
* strio.readlines(limit, chomp: false) -> array
@@ -1424,13 +1496,18 @@ strio_write(VALUE self, VALUE str)
long len, olen;
rb_encoding *enc, *enc2;
rb_encoding *const ascii8bit = rb_ascii8bit_encoding();
+ rb_encoding *usascii = 0;
if (!RB_TYPE_P(str, T_STRING))
str = rb_obj_as_string(str);
enc = get_enc(ptr);
enc2 = rb_enc_get(str);
- if (enc != enc2 && enc != ascii8bit) {
- str = rb_str_conv_enc(str, enc2, enc);
+ if (enc != enc2 && enc != ascii8bit && enc != (usascii = rb_usascii_encoding())) {
+ VALUE converted = rb_str_conv_enc(str, enc2, enc);
+ if (converted == str && enc2 != ascii8bit && enc2 != usascii) { /* conversion failed */
+ rb_enc_check(rb_enc_from_encoding(enc), str);
+ }
+ str = converted;
}
len = RSTRING_LEN(str);
if (len == 0) return 0;
@@ -1527,7 +1604,6 @@ strio_read(int argc, VALUE *argv, VALUE self)
long len;
int binary = 0;
- rb_check_arity(argc, 0, 2);
switch (argc) {
case 2:
str = argv[1];
@@ -1567,6 +1643,8 @@ strio_read(int argc, VALUE *argv, VALUE self)
len -= ptr->pos;
}
break;
+ default:
+ rb_error_arity(argc, 0, 2);
}
if (NIL_P(str)) {
rb_encoding *enc = binary ? rb_ascii8bit_encoding() : get_enc(ptr);
@@ -1688,7 +1766,7 @@ strio_truncate(VALUE self, VALUE len)
if (plen < l) {
MEMZERO(RSTRING_PTR(string) + plen, char, l - plen);
}
- return len;
+ return INT2FIX(0);
}
/*
@@ -1744,7 +1822,14 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
enc = rb_default_external_encoding();
}
else {
- enc = rb_to_encoding(ext_enc);
+ enc = rb_find_encoding(ext_enc);
+ if (!enc) {
+ struct rb_io_enc_t convconfig;
+ int oflags, fmode;
+ VALUE vmode = rb_str_append(rb_str_new_cstr("r:"), ext_enc);
+ rb_io_extract_modeenc(&vmode, 0, Qnil, &oflags, &fmode, &convconfig);
+ enc = convconfig.enc2;
+ }
}
ptr->enc = enc;
if (WRITABLE(self)) {
@@ -1759,38 +1844,32 @@ strio_set_encoding_by_bom(VALUE self)
{
struct StringIO *ptr = StringIO(self);
- if (ptr->enc) {
- rb_raise(rb_eArgError, "encoding conversion is set");
- }
if (!set_encoding_by_bom(ptr)) return Qnil;
return rb_enc_from_encoding(ptr->enc);
}
/*
- * Pseudo I/O on String object, with interface corresponding to IO.
+ * \IO streams for strings, with access similar to
+ * {IO}[rdoc-ref:IO];
+ * see {IO}[rdoc-ref:IO].
*
- * Commonly used to simulate <code>$stdio</code> or <code>$stderr</code>
+ * === About the Examples
*
- * === Examples
+ * Examples on this page assume that \StringIO has been required:
*
* require 'stringio'
*
- * # Writing stream emulation
- * io = StringIO.new
- * io.puts "Hello World"
- * io.string #=> "Hello World\n"
- *
- * # Reading stream emulation
- * io = StringIO.new "first\nsecond\nlast\n"
- * io.getc #=> "f"
- * io.gets #=> "irst\n"
- * io.read #=> "second\nlast\n"
*/
void
Init_stringio(void)
{
#undef rb_intern
- VALUE StringIO = rb_define_class("StringIO", rb_cData);
+
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
+ VALUE StringIO = rb_define_class("StringIO", rb_cObject);
rb_define_const(StringIO, "VERSION", rb_str_new_cstr(STRINGIO_VERSION));
@@ -1835,13 +1914,9 @@ Init_stringio(void)
rb_define_method(StringIO, "each", strio_each, -1);
rb_define_method(StringIO, "each_line", strio_each, -1);
- rb_define_method(StringIO, "lines", strio_lines, -1);
rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
- rb_define_method(StringIO, "bytes", strio_bytes, 0);
rb_define_method(StringIO, "each_char", strio_each_char, 0);
- rb_define_method(StringIO, "chars", strio_chars, 0);
rb_define_method(StringIO, "each_codepoint", strio_each_codepoint, 0);
- rb_define_method(StringIO, "codepoints", strio_codepoints, 0);
rb_define_method(StringIO, "getc", strio_getc, 0);
rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
rb_define_method(StringIO, "ungetbyte", strio_ungetbyte, 1);
diff --git a/ext/stringio/stringio.gemspec b/ext/stringio/stringio.gemspec
index a16c75753f..1015d261f5 100644
--- a/ext/stringio/stringio.gemspec
+++ b/ext/stringio/stringio.gemspec
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
# frozen_string_literal: true
source_version = ["", "ext/stringio/"].find do |dir|
@@ -16,19 +16,23 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 2.6")
s.require_paths = ["lib"]
- s.authors = ["Nobu Nakada"]
+ s.authors = ["Nobu Nakada", "Charles Oliver Nutter"]
s.description = "Pseudo `IO` class from/to `String`."
- s.email = "nobu@ruby-lang.org"
- s.extensions = ["ext/stringio/extconf.rb"]
- s.files = ["README.md", "ext/stringio/extconf.rb", "ext/stringio/stringio.c"]
+ s.email = ["nobu@ruby-lang.org", "headius@headius.com"]
+ s.files = ["README.md"]
+ jruby = true if Gem::Platform.new('java') =~ s.platform or RUBY_ENGINE == 'jruby'
+ if jruby
+ s.files += ["lib/stringio.rb", "lib/stringio.jar"]
+ s.platform = "java"
+ else
+ s.extensions = ["ext/stringio/extconf.rb"]
+ s.files += ["ext/stringio/extconf.rb", "ext/stringio/stringio.c"]
+ end
s.homepage = "https://github.com/ruby/stringio"
- s.licenses = ["BSD-2-Clause"]
+ s.licenses = ["Ruby", "BSD-2-Clause"]
s.required_ruby_version = ">= 2.5"
- s.rubygems_version = "2.6.11"
s.summary = "Pseudo IO on String"
# s.cert_chain = %w[certs/nobu.pem]
# s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
-
- s.add_development_dependency 'rake-compiler'
end
diff --git a/ext/strscan/depend b/ext/strscan/depend
index 212d386f83..8fe3cb23d9 100644
--- a/ext/strscan/depend
+++ b/ext/strscan/depend
@@ -3,9 +3,167 @@ strscan.o: $(RUBY_EXTCONF_H)
strscan.o: $(arch_hdrdir)/ruby/config.h
strscan.o: $(hdrdir)/ruby/assert.h
strscan.o: $(hdrdir)/ruby/backward.h
+strscan.o: $(hdrdir)/ruby/backward/2/assume.h
+strscan.o: $(hdrdir)/ruby/backward/2/attributes.h
+strscan.o: $(hdrdir)/ruby/backward/2/bool.h
+strscan.o: $(hdrdir)/ruby/backward/2/inttypes.h
+strscan.o: $(hdrdir)/ruby/backward/2/limits.h
+strscan.o: $(hdrdir)/ruby/backward/2/long_long.h
+strscan.o: $(hdrdir)/ruby/backward/2/stdalign.h
+strscan.o: $(hdrdir)/ruby/backward/2/stdarg.h
strscan.o: $(hdrdir)/ruby/defines.h
strscan.o: $(hdrdir)/ruby/encoding.h
strscan.o: $(hdrdir)/ruby/intern.h
+strscan.o: $(hdrdir)/ruby/internal/abi.h
+strscan.o: $(hdrdir)/ruby/internal/anyargs.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+strscan.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+strscan.o: $(hdrdir)/ruby/internal/assume.h
+strscan.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+strscan.o: $(hdrdir)/ruby/internal/attr/artificial.h
+strscan.o: $(hdrdir)/ruby/internal/attr/cold.h
+strscan.o: $(hdrdir)/ruby/internal/attr/const.h
+strscan.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+strscan.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+strscan.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+strscan.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+strscan.o: $(hdrdir)/ruby/internal/attr/error.h
+strscan.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+strscan.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+strscan.o: $(hdrdir)/ruby/internal/attr/format.h
+strscan.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+strscan.o: $(hdrdir)/ruby/internal/attr/noalias.h
+strscan.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+strscan.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+strscan.o: $(hdrdir)/ruby/internal/attr/noinline.h
+strscan.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+strscan.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+strscan.o: $(hdrdir)/ruby/internal/attr/pure.h
+strscan.o: $(hdrdir)/ruby/internal/attr/restrict.h
+strscan.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+strscan.o: $(hdrdir)/ruby/internal/attr/warning.h
+strscan.o: $(hdrdir)/ruby/internal/attr/weakref.h
+strscan.o: $(hdrdir)/ruby/internal/cast.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+strscan.o: $(hdrdir)/ruby/internal/compiler_since.h
+strscan.o: $(hdrdir)/ruby/internal/config.h
+strscan.o: $(hdrdir)/ruby/internal/constant_p.h
+strscan.o: $(hdrdir)/ruby/internal/core.h
+strscan.o: $(hdrdir)/ruby/internal/core/rarray.h
+strscan.o: $(hdrdir)/ruby/internal/core/rbasic.h
+strscan.o: $(hdrdir)/ruby/internal/core/rbignum.h
+strscan.o: $(hdrdir)/ruby/internal/core/rclass.h
+strscan.o: $(hdrdir)/ruby/internal/core/rdata.h
+strscan.o: $(hdrdir)/ruby/internal/core/rfile.h
+strscan.o: $(hdrdir)/ruby/internal/core/rhash.h
+strscan.o: $(hdrdir)/ruby/internal/core/rmatch.h
+strscan.o: $(hdrdir)/ruby/internal/core/robject.h
+strscan.o: $(hdrdir)/ruby/internal/core/rregexp.h
+strscan.o: $(hdrdir)/ruby/internal/core/rstring.h
+strscan.o: $(hdrdir)/ruby/internal/core/rstruct.h
+strscan.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+strscan.o: $(hdrdir)/ruby/internal/ctype.h
+strscan.o: $(hdrdir)/ruby/internal/dllexport.h
+strscan.o: $(hdrdir)/ruby/internal/dosish.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/re.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/string.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+strscan.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+strscan.o: $(hdrdir)/ruby/internal/error.h
+strscan.o: $(hdrdir)/ruby/internal/eval.h
+strscan.o: $(hdrdir)/ruby/internal/event.h
+strscan.o: $(hdrdir)/ruby/internal/fl_type.h
+strscan.o: $(hdrdir)/ruby/internal/gc.h
+strscan.o: $(hdrdir)/ruby/internal/glob.h
+strscan.o: $(hdrdir)/ruby/internal/globals.h
+strscan.o: $(hdrdir)/ruby/internal/has/attribute.h
+strscan.o: $(hdrdir)/ruby/internal/has/builtin.h
+strscan.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+strscan.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+strscan.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+strscan.o: $(hdrdir)/ruby/internal/has/extension.h
+strscan.o: $(hdrdir)/ruby/internal/has/feature.h
+strscan.o: $(hdrdir)/ruby/internal/has/warning.h
+strscan.o: $(hdrdir)/ruby/internal/intern/array.h
+strscan.o: $(hdrdir)/ruby/internal/intern/bignum.h
+strscan.o: $(hdrdir)/ruby/internal/intern/class.h
+strscan.o: $(hdrdir)/ruby/internal/intern/compar.h
+strscan.o: $(hdrdir)/ruby/internal/intern/complex.h
+strscan.o: $(hdrdir)/ruby/internal/intern/cont.h
+strscan.o: $(hdrdir)/ruby/internal/intern/dir.h
+strscan.o: $(hdrdir)/ruby/internal/intern/enum.h
+strscan.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+strscan.o: $(hdrdir)/ruby/internal/intern/error.h
+strscan.o: $(hdrdir)/ruby/internal/intern/eval.h
+strscan.o: $(hdrdir)/ruby/internal/intern/file.h
+strscan.o: $(hdrdir)/ruby/internal/intern/gc.h
+strscan.o: $(hdrdir)/ruby/internal/intern/hash.h
+strscan.o: $(hdrdir)/ruby/internal/intern/io.h
+strscan.o: $(hdrdir)/ruby/internal/intern/load.h
+strscan.o: $(hdrdir)/ruby/internal/intern/marshal.h
+strscan.o: $(hdrdir)/ruby/internal/intern/numeric.h
+strscan.o: $(hdrdir)/ruby/internal/intern/object.h
+strscan.o: $(hdrdir)/ruby/internal/intern/parse.h
+strscan.o: $(hdrdir)/ruby/internal/intern/proc.h
+strscan.o: $(hdrdir)/ruby/internal/intern/process.h
+strscan.o: $(hdrdir)/ruby/internal/intern/random.h
+strscan.o: $(hdrdir)/ruby/internal/intern/range.h
+strscan.o: $(hdrdir)/ruby/internal/intern/rational.h
+strscan.o: $(hdrdir)/ruby/internal/intern/re.h
+strscan.o: $(hdrdir)/ruby/internal/intern/ruby.h
+strscan.o: $(hdrdir)/ruby/internal/intern/select.h
+strscan.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+strscan.o: $(hdrdir)/ruby/internal/intern/signal.h
+strscan.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+strscan.o: $(hdrdir)/ruby/internal/intern/string.h
+strscan.o: $(hdrdir)/ruby/internal/intern/struct.h
+strscan.o: $(hdrdir)/ruby/internal/intern/thread.h
+strscan.o: $(hdrdir)/ruby/internal/intern/time.h
+strscan.o: $(hdrdir)/ruby/internal/intern/variable.h
+strscan.o: $(hdrdir)/ruby/internal/intern/vm.h
+strscan.o: $(hdrdir)/ruby/internal/interpreter.h
+strscan.o: $(hdrdir)/ruby/internal/iterator.h
+strscan.o: $(hdrdir)/ruby/internal/memory.h
+strscan.o: $(hdrdir)/ruby/internal/method.h
+strscan.o: $(hdrdir)/ruby/internal/module.h
+strscan.o: $(hdrdir)/ruby/internal/newobj.h
+strscan.o: $(hdrdir)/ruby/internal/rgengc.h
+strscan.o: $(hdrdir)/ruby/internal/scan_args.h
+strscan.o: $(hdrdir)/ruby/internal/special_consts.h
+strscan.o: $(hdrdir)/ruby/internal/static_assert.h
+strscan.o: $(hdrdir)/ruby/internal/stdalign.h
+strscan.o: $(hdrdir)/ruby/internal/stdbool.h
+strscan.o: $(hdrdir)/ruby/internal/symbol.h
+strscan.o: $(hdrdir)/ruby/internal/value.h
+strscan.o: $(hdrdir)/ruby/internal/value_type.h
+strscan.o: $(hdrdir)/ruby/internal/variable.h
+strscan.o: $(hdrdir)/ruby/internal/warning_push.h
+strscan.o: $(hdrdir)/ruby/internal/xmalloc.h
strscan.o: $(hdrdir)/ruby/missing.h
strscan.o: $(hdrdir)/ruby/onigmo.h
strscan.o: $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/strscan/extconf.rb b/ext/strscan/extconf.rb
index f0ecbf85d8..3c311d2364 100644
--- a/ext/strscan/extconf.rb
+++ b/ext/strscan/extconf.rb
@@ -1,5 +1,10 @@
# frozen_string_literal: true
require 'mkmf'
-$INCFLAGS << " -I$(top_srcdir)" if $extmk
-have_func("onig_region_memsize", "ruby.h")
-create_makefile 'strscan'
+if RUBY_ENGINE == 'ruby'
+ $INCFLAGS << " -I$(top_srcdir)" if $extmk
+ have_func("onig_region_memsize(NULL)")
+ have_func("rb_reg_onig_match", "ruby/re.h")
+ create_makefile 'strscan'
+else
+ File.write('Makefile', dummy_makefile("").join)
+end
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index b6d17992c9..16d669d8a5 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -4,8 +4,8 @@
Copyright (c) 1999-2006 Minero Aoki
This program is free software.
- You can distribute/modify this program under the terms of
- the Ruby License. For details, see the file COPYING.
+ You can redistribute this program under the terms of the Ruby's or 2-clause
+ BSD License. For details, see the COPYING and LICENSE.txt files.
*/
#include "ruby/ruby.h"
@@ -22,7 +22,7 @@ extern size_t onig_region_memsize(const struct re_registers *regs);
#include <stdbool.h>
-#define STRSCAN_VERSION "1.0.3"
+#define STRSCAN_VERSION "3.0.7"
/* =======================================================================
Data Type Definitions
@@ -176,6 +176,7 @@ strscan_mark(void *ptr)
{
struct strscanner *p = ptr;
rb_gc_mark(p->str);
+ rb_gc_mark(p->regex);
}
static void
@@ -212,6 +213,7 @@ strscan_s_allocate(VALUE klass)
CLEAR_MATCH_STATUS(p);
onig_region_init(&(p->regs));
p->str = Qnil;
+ p->regex = Qnil;
return obj;
}
@@ -433,23 +435,20 @@ strscan_get_pos(VALUE self)
*
* In short, it's a 0-based index into the string.
*
- * s = StringScanner.new("abcädeföghi")
- * s.charpos # -> 0
- * s.scan_until(/ä/) # -> "abcä"
- * s.pos # -> 5
- * s.charpos # -> 4
+ * s = StringScanner.new("abc\u00e4def\u00f6ghi")
+ * s.charpos # -> 0
+ * s.scan_until(/\u00e4/) # -> "abc\u00E4"
+ * s.pos # -> 5
+ * s.charpos # -> 4
*/
static VALUE
strscan_get_charpos(VALUE self)
{
struct strscanner *p;
- VALUE substr;
GET_SCANNER(self, p);
- substr = rb_funcall(p->str, id_byteslice, 2, INT2FIX(0), INT2NUM(p->curr));
-
- return rb_str_length(substr);
+ return LONG2NUM(rb_enc_strlen(S_PBEG(p), CURPTR(p), rb_enc_get(p->str)));
}
/*
@@ -473,7 +472,7 @@ strscan_set_pos(VALUE self, VALUE v)
if (i < 0) rb_raise(rb_eRangeError, "index out of range");
if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
p->curr = i;
- return INT2NUM(i);
+ return LONG2NUM(i);
}
static inline UChar *
@@ -540,6 +539,68 @@ adjust_register_position(struct strscanner *p, long position)
}
}
+/* rb_reg_onig_match is available in Ruby 3.3 and later. */
+#ifndef HAVE_RB_REG_ONIG_MATCH
+static OnigPosition
+rb_reg_onig_match(VALUE re, VALUE str,
+ OnigPosition (*match)(regex_t *reg, VALUE str, struct re_registers *regs, void *args),
+ void *args, struct re_registers *regs)
+{
+ regex_t *reg = rb_reg_prepare_re(re, str);
+
+ bool tmpreg = reg != RREGEXP_PTR(re);
+ if (!tmpreg) RREGEXP(re)->usecnt++;
+
+ OnigPosition result = match(reg, str, regs, args);
+
+ if (!tmpreg) RREGEXP(re)->usecnt--;
+ if (tmpreg) {
+ if (RREGEXP(re)->usecnt) {
+ onig_free(reg);
+ }
+ else {
+ onig_free(RREGEXP_PTR(re));
+ RREGEXP_PTR(re) = reg;
+ }
+ }
+
+ if (result < 0) {
+ if (result != ONIG_MISMATCH) {
+ rb_raise(ScanError, "regexp buffer overflow");
+ }
+ }
+
+ return result;
+}
+#endif
+
+static OnigPosition
+strscan_match(regex_t *reg, VALUE str, struct re_registers *regs, void *args_ptr)
+{
+ struct strscanner *p = (struct strscanner *)args_ptr;
+
+ return onig_match(reg,
+ match_target(p),
+ (UChar* )(CURPTR(p) + S_RESTLEN(p)),
+ (UChar* )CURPTR(p),
+ regs,
+ ONIG_OPTION_NONE);
+}
+
+static OnigPosition
+strscan_search(regex_t *reg, VALUE str, struct re_registers *regs, void *args_ptr)
+{
+ struct strscanner *p = (struct strscanner *)args_ptr;
+
+ return onig_search(reg,
+ match_target(p),
+ (UChar *)(CURPTR(p) + S_RESTLEN(p)),
+ (UChar *)CURPTR(p),
+ (UChar *)(CURPTR(p) + S_RESTLEN(p)),
+ regs,
+ ONIG_OPTION_NONE);
+}
+
static VALUE
strscan_do_scan(VALUE self, VALUE pattern, int succptr, int getstr, int headonly)
{
@@ -561,47 +622,14 @@ strscan_do_scan(VALUE self, VALUE pattern, int succptr, int getstr, int headonly
}
if (RB_TYPE_P(pattern, T_REGEXP)) {
- regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
- regex_t *re;
- long ret;
- int tmpreg;
-
p->regex = pattern;
- re = rb_reg_prepare_re(pattern, p->str);
- tmpreg = re != RREGEXP_PTR(pattern);
- if (!tmpreg) RREGEXP(pattern)->usecnt++;
-
- if (headonly) {
- ret = onig_match(re,
- match_target(p),
- (UChar* )(CURPTR(p) + S_RESTLEN(p)),
- (UChar* )CURPTR(p),
- &(p->regs),
- ONIG_OPTION_NONE);
- }
- else {
- ret = onig_search(re,
- match_target(p),
- (UChar* )(CURPTR(p) + S_RESTLEN(p)),
- (UChar* )CURPTR(p),
- (UChar* )(CURPTR(p) + S_RESTLEN(p)),
- &(p->regs),
- ONIG_OPTION_NONE);
- }
- if (!tmpreg) RREGEXP(pattern)->usecnt--;
- if (tmpreg) {
- if (RREGEXP(pattern)->usecnt) {
- onig_free(re);
- }
- else {
- onig_free(RREGEXP_PTR(pattern));
- RREGEXP_PTR(pattern) = re;
- }
- }
+ OnigPosition ret = rb_reg_onig_match(pattern,
+ p->str,
+ headonly ? strscan_match : strscan_search,
+ (void *)p,
+ &(p->regs));
- if (ret == -2) rb_raise(ScanError, "regexp buffer overflow");
- if (ret < 0) {
- /* not matched */
+ if (ret == ONIG_MISMATCH) {
return Qnil;
}
}
@@ -848,9 +876,8 @@ adjust_registers_to_matched(struct strscanner *p)
* s.getch # => "b"
* s.getch # => nil
*
- * $KCODE = 'EUC'
- * s = StringScanner.new("\244\242")
- * s.getch # => "\244\242" # Japanese hira-kana "A" in EUC-JP
+ * s = StringScanner.new("\244\242".force_encoding("euc-jp"))
+ * s.getch # => "\x{A4A2}" # Japanese hira-kana "A" in EUC-JP
* s.getch # => nil
*/
static VALUE
@@ -885,10 +912,9 @@ strscan_getch(VALUE self)
* s.get_byte # => "b"
* s.get_byte # => nil
*
- * $KCODE = 'EUC'
- * s = StringScanner.new("\244\242")
- * s.get_byte # => "\244"
- * s.get_byte # => "\242"
+ * s = StringScanner.new("\244\242".force_encoding("euc-jp"))
+ * s.get_byte # => "\xA4"
+ * s.get_byte # => "\xA2"
* s.get_byte # => nil
*/
static VALUE
@@ -984,7 +1010,7 @@ strscan_unscan(VALUE self)
}
/*
- * Returns +true+ iff the scan pointer is at the beginning of the line.
+ * Returns +true+ if and only if the scan pointer is at the beginning of the line.
*
* s = StringScanner.new("test\ntest\n")
* s.bol? # => true
@@ -1037,12 +1063,13 @@ strscan_empty_p(VALUE self)
}
/*
- * Returns true iff there is more data in the string. See #eos?.
+ * Returns true if and only if there is more data in the string. See #eos?.
* This method is obsolete; use #eos? instead.
*
* s = StringScanner.new('test string')
- * s.eos? # These two
- * s.rest? # are opposites.
+ * # These two are opposites
+ * s.eos? # => false
+ * s.rest? # => true
*/
static VALUE
strscan_rest_p(VALUE self)
@@ -1054,7 +1081,7 @@ strscan_rest_p(VALUE self)
}
/*
- * Returns +true+ iff the last match was successful.
+ * Returns +true+ if and only if the last match was successful.
*
* s = StringScanner.new('test string')
* s.match?(/\w+/) # => 4
@@ -1091,8 +1118,9 @@ strscan_matched(VALUE self)
}
/*
- * Returns the size of the most recent match (see #matched), or +nil+ if there
- * was no recent match.
+ * Returns the size of the most recent match in bytes, or +nil+ if there
+ * was no recent match. This is different than <tt>matched.size</tt>,
+ * which will return the size in characters.
*
* s = StringScanner.new('test string')
* s.check /\w+/ # -> "test"
@@ -1107,7 +1135,7 @@ strscan_matched_size(VALUE self)
GET_SCANNER(self, p);
if (! MATCHED_P(p)) return Qnil;
- return INT2NUM(p->regs.end[0] - p->regs.beg[0]);
+ return LONG2NUM(p->regs.end[0] - p->regs.beg[0]);
}
static int
@@ -1169,7 +1197,7 @@ strscan_aref(VALUE self, VALUE idx)
idx = rb_sym2str(idx);
/* fall through */
case T_STRING:
- if (!p->regex) return Qnil;
+ if (!RTEST(p->regex)) return Qnil;
RSTRING_GETMEM(idx, name, i);
i = name_to_backref_number(&(p->regs), p->regex, name, name + i, rb_enc_get(idx));
break;
@@ -1460,6 +1488,56 @@ strscan_fixed_anchor_p(VALUE self)
return p->fixed_anchor_p ? Qtrue : Qfalse;
}
+typedef struct {
+ VALUE self;
+ VALUE captures;
+} named_captures_data;
+
+static int
+named_captures_iter(const OnigUChar *name,
+ const OnigUChar *name_end,
+ int back_num,
+ int *back_refs,
+ OnigRegex regex,
+ void *arg)
+{
+ named_captures_data *data = arg;
+
+ VALUE key = rb_str_new((const char *)name, name_end - name);
+ VALUE value = RUBY_Qnil;
+ int i;
+ for (i = 0; i < back_num; i++) {
+ value = strscan_aref(data->self, INT2NUM(back_refs[i]));
+ }
+ rb_hash_aset(data->captures, key, value);
+ return 0;
+}
+
+/*
+ * call-seq:
+ * scanner.named_captures -> hash
+ *
+ * Returns a hash of string variables matching the regular expression.
+ *
+ * scan = StringScanner.new('foobarbaz')
+ * scan.match?(/(?<f>foo)(?<r>bar)(?<z>baz)/)
+ * scan.named_captures # -> {"f"=>"foo", "r"=>"bar", "z"=>"baz"}
+ */
+static VALUE
+strscan_named_captures(VALUE self)
+{
+ struct strscanner *p;
+ GET_SCANNER(self, p);
+ named_captures_data data;
+ data.self = self;
+ data.captures = rb_hash_new();
+ if (!RB_NIL_P(p->regex)) {
+ onig_foreach_name(RREGEXP_PTR(p->regex), named_captures_iter, &data);
+ }
+
+ return data.captures;
+}
+
/* =======================================================================
Ruby Interface
======================================================================= */
@@ -1470,6 +1548,8 @@ strscan_fixed_anchor_p(VALUE self)
* StringScanner provides for lexical scanning operations on a String. Here is
* an example of its usage:
*
+ * require 'strscan'
+ *
* s = StringScanner.new('This is an example string')
* s.eos? # -> false
*
@@ -1536,7 +1616,7 @@ strscan_fixed_anchor_p(VALUE self)
*
* === Finding Where we Are
*
- * - #beginning_of_line? (#bol?)
+ * - #beginning_of_line? (<tt>#bol?</tt>)
* - #eos?
* - #rest?
* - #rest_size
@@ -1553,13 +1633,13 @@ strscan_fixed_anchor_p(VALUE self)
* - #matched
* - #matched?
* - #matched_size
- * - []
+ * - <tt>#[]</tt>
* - #pre_match
* - #post_match
*
* === Miscellaneous
*
- * - <<
+ * - <tt><<</tt>
* - #concat
* - #string
* - #string=
@@ -1570,6 +1650,10 @@ strscan_fixed_anchor_p(VALUE self)
void
Init_strscan(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;
@@ -1648,4 +1732,6 @@ Init_strscan(void)
rb_define_method(StringScanner, "inspect", strscan_inspect, 0);
rb_define_method(StringScanner, "fixed_anchor?", strscan_fixed_anchor_p, 0);
+
+ rb_define_method(StringScanner, "named_captures", strscan_named_captures, 0);
}
diff --git a/ext/strscan/strscan.gemspec b/ext/strscan/strscan.gemspec
index 4759c6c860..8a61c7abe6 100644
--- a/ext/strscan/strscan.gemspec
+++ b/ext/strscan/strscan.gemspec
@@ -1,20 +1,41 @@
# frozen_string_literal: true
+#
+source_version = ["", "ext/strscan/"].find do |dir|
+ begin
+ break File.open(File.join(__dir__, "#{dir}strscan.c")) {|f|
+ f.gets("\n#define STRSCAN_VERSION ")
+ f.gets[/\s*"(.+)"/, 1]
+ }
+ rescue Errno::ENOENT
+ end
+end
+
Gem::Specification.new do |s|
s.name = "strscan"
- s.version = '1.0.3'
+ s.version = source_version
s.summary = "Provides lexical scanning operations on a String."
s.description = "Provides lexical scanning operations on a String."
- s.require_path = %w{lib}
- s.files = %w{ext/strscan/extconf.rb ext/strscan/strscan.c}
- s.extensions = %w{ext/strscan/extconf.rb}
+ files = [
+ "COPYING",
+ "LICENSE.txt",
+ ]
+ if RUBY_ENGINE == "jruby"
+ s.require_paths = %w{ext/jruby/lib lib}
+ files << "ext/jruby/lib/strscan.rb"
+ files << "lib/strscan.jar"
+ s.platform = "java"
+ else
+ s.require_paths = %w{lib}
+ files << "ext/strscan/extconf.rb"
+ files << "ext/strscan/strscan.c"
+ s.extensions = %w{ext/strscan/extconf.rb}
+ end
+ s.files = files
s.required_ruby_version = ">= 2.4.0"
- s.authors = ["Minero Aoki", "Sutou Kouhei"]
- s.email = [nil, "kou@cozmixng.org"]
+ s.authors = ["Minero Aoki", "Sutou Kouhei", "Charles Oliver Nutter"]
+ s.email = [nil, "kou@cozmixng.org", "headius@headius.com"]
s.homepage = "https://github.com/ruby/strscan"
- s.license = "BSD-2-Clause"
-
- s.add_development_dependency "rake-compiler"
- s.add_development_dependency "benchmark-driver"
+ s.licenses = ["Ruby", "BSD-2-Clause"]
end
diff --git a/ext/syslog/depend b/ext/syslog/depend
index a3f7db8371..4eea8c3bf9 100644
--- a/ext/syslog/depend
+++ b/ext/syslog/depend
@@ -3,8 +3,156 @@ syslog.o: $(RUBY_EXTCONF_H)
syslog.o: $(arch_hdrdir)/ruby/config.h
syslog.o: $(hdrdir)/ruby/assert.h
syslog.o: $(hdrdir)/ruby/backward.h
+syslog.o: $(hdrdir)/ruby/backward/2/assume.h
+syslog.o: $(hdrdir)/ruby/backward/2/attributes.h
+syslog.o: $(hdrdir)/ruby/backward/2/bool.h
+syslog.o: $(hdrdir)/ruby/backward/2/inttypes.h
+syslog.o: $(hdrdir)/ruby/backward/2/limits.h
+syslog.o: $(hdrdir)/ruby/backward/2/long_long.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdalign.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdarg.h
syslog.o: $(hdrdir)/ruby/defines.h
syslog.o: $(hdrdir)/ruby/intern.h
+syslog.o: $(hdrdir)/ruby/internal/abi.h
+syslog.o: $(hdrdir)/ruby/internal/anyargs.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+syslog.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+syslog.o: $(hdrdir)/ruby/internal/assume.h
+syslog.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+syslog.o: $(hdrdir)/ruby/internal/attr/artificial.h
+syslog.o: $(hdrdir)/ruby/internal/attr/cold.h
+syslog.o: $(hdrdir)/ruby/internal/attr/const.h
+syslog.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+syslog.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+syslog.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+syslog.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+syslog.o: $(hdrdir)/ruby/internal/attr/error.h
+syslog.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+syslog.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+syslog.o: $(hdrdir)/ruby/internal/attr/format.h
+syslog.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+syslog.o: $(hdrdir)/ruby/internal/attr/noalias.h
+syslog.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+syslog.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+syslog.o: $(hdrdir)/ruby/internal/attr/noinline.h
+syslog.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+syslog.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+syslog.o: $(hdrdir)/ruby/internal/attr/pure.h
+syslog.o: $(hdrdir)/ruby/internal/attr/restrict.h
+syslog.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+syslog.o: $(hdrdir)/ruby/internal/attr/warning.h
+syslog.o: $(hdrdir)/ruby/internal/attr/weakref.h
+syslog.o: $(hdrdir)/ruby/internal/cast.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+syslog.o: $(hdrdir)/ruby/internal/compiler_since.h
+syslog.o: $(hdrdir)/ruby/internal/config.h
+syslog.o: $(hdrdir)/ruby/internal/constant_p.h
+syslog.o: $(hdrdir)/ruby/internal/core.h
+syslog.o: $(hdrdir)/ruby/internal/core/rarray.h
+syslog.o: $(hdrdir)/ruby/internal/core/rbasic.h
+syslog.o: $(hdrdir)/ruby/internal/core/rbignum.h
+syslog.o: $(hdrdir)/ruby/internal/core/rclass.h
+syslog.o: $(hdrdir)/ruby/internal/core/rdata.h
+syslog.o: $(hdrdir)/ruby/internal/core/rfile.h
+syslog.o: $(hdrdir)/ruby/internal/core/rhash.h
+syslog.o: $(hdrdir)/ruby/internal/core/robject.h
+syslog.o: $(hdrdir)/ruby/internal/core/rregexp.h
+syslog.o: $(hdrdir)/ruby/internal/core/rstring.h
+syslog.o: $(hdrdir)/ruby/internal/core/rstruct.h
+syslog.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+syslog.o: $(hdrdir)/ruby/internal/ctype.h
+syslog.o: $(hdrdir)/ruby/internal/dllexport.h
+syslog.o: $(hdrdir)/ruby/internal/dosish.h
+syslog.o: $(hdrdir)/ruby/internal/error.h
+syslog.o: $(hdrdir)/ruby/internal/eval.h
+syslog.o: $(hdrdir)/ruby/internal/event.h
+syslog.o: $(hdrdir)/ruby/internal/fl_type.h
+syslog.o: $(hdrdir)/ruby/internal/gc.h
+syslog.o: $(hdrdir)/ruby/internal/glob.h
+syslog.o: $(hdrdir)/ruby/internal/globals.h
+syslog.o: $(hdrdir)/ruby/internal/has/attribute.h
+syslog.o: $(hdrdir)/ruby/internal/has/builtin.h
+syslog.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+syslog.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+syslog.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+syslog.o: $(hdrdir)/ruby/internal/has/extension.h
+syslog.o: $(hdrdir)/ruby/internal/has/feature.h
+syslog.o: $(hdrdir)/ruby/internal/has/warning.h
+syslog.o: $(hdrdir)/ruby/internal/intern/array.h
+syslog.o: $(hdrdir)/ruby/internal/intern/bignum.h
+syslog.o: $(hdrdir)/ruby/internal/intern/class.h
+syslog.o: $(hdrdir)/ruby/internal/intern/compar.h
+syslog.o: $(hdrdir)/ruby/internal/intern/complex.h
+syslog.o: $(hdrdir)/ruby/internal/intern/cont.h
+syslog.o: $(hdrdir)/ruby/internal/intern/dir.h
+syslog.o: $(hdrdir)/ruby/internal/intern/enum.h
+syslog.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+syslog.o: $(hdrdir)/ruby/internal/intern/error.h
+syslog.o: $(hdrdir)/ruby/internal/intern/eval.h
+syslog.o: $(hdrdir)/ruby/internal/intern/file.h
+syslog.o: $(hdrdir)/ruby/internal/intern/gc.h
+syslog.o: $(hdrdir)/ruby/internal/intern/hash.h
+syslog.o: $(hdrdir)/ruby/internal/intern/io.h
+syslog.o: $(hdrdir)/ruby/internal/intern/load.h
+syslog.o: $(hdrdir)/ruby/internal/intern/marshal.h
+syslog.o: $(hdrdir)/ruby/internal/intern/numeric.h
+syslog.o: $(hdrdir)/ruby/internal/intern/object.h
+syslog.o: $(hdrdir)/ruby/internal/intern/parse.h
+syslog.o: $(hdrdir)/ruby/internal/intern/proc.h
+syslog.o: $(hdrdir)/ruby/internal/intern/process.h
+syslog.o: $(hdrdir)/ruby/internal/intern/random.h
+syslog.o: $(hdrdir)/ruby/internal/intern/range.h
+syslog.o: $(hdrdir)/ruby/internal/intern/rational.h
+syslog.o: $(hdrdir)/ruby/internal/intern/re.h
+syslog.o: $(hdrdir)/ruby/internal/intern/ruby.h
+syslog.o: $(hdrdir)/ruby/internal/intern/select.h
+syslog.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+syslog.o: $(hdrdir)/ruby/internal/intern/signal.h
+syslog.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+syslog.o: $(hdrdir)/ruby/internal/intern/string.h
+syslog.o: $(hdrdir)/ruby/internal/intern/struct.h
+syslog.o: $(hdrdir)/ruby/internal/intern/thread.h
+syslog.o: $(hdrdir)/ruby/internal/intern/time.h
+syslog.o: $(hdrdir)/ruby/internal/intern/variable.h
+syslog.o: $(hdrdir)/ruby/internal/intern/vm.h
+syslog.o: $(hdrdir)/ruby/internal/interpreter.h
+syslog.o: $(hdrdir)/ruby/internal/iterator.h
+syslog.o: $(hdrdir)/ruby/internal/memory.h
+syslog.o: $(hdrdir)/ruby/internal/method.h
+syslog.o: $(hdrdir)/ruby/internal/module.h
+syslog.o: $(hdrdir)/ruby/internal/newobj.h
+syslog.o: $(hdrdir)/ruby/internal/rgengc.h
+syslog.o: $(hdrdir)/ruby/internal/scan_args.h
+syslog.o: $(hdrdir)/ruby/internal/special_consts.h
+syslog.o: $(hdrdir)/ruby/internal/static_assert.h
+syslog.o: $(hdrdir)/ruby/internal/stdalign.h
+syslog.o: $(hdrdir)/ruby/internal/stdbool.h
+syslog.o: $(hdrdir)/ruby/internal/symbol.h
+syslog.o: $(hdrdir)/ruby/internal/value.h
+syslog.o: $(hdrdir)/ruby/internal/value_type.h
+syslog.o: $(hdrdir)/ruby/internal/variable.h
+syslog.o: $(hdrdir)/ruby/internal/warning_push.h
+syslog.o: $(hdrdir)/ruby/internal/xmalloc.h
syslog.o: $(hdrdir)/ruby/missing.h
syslog.o: $(hdrdir)/ruby/ruby.h
syslog.o: $(hdrdir)/ruby/st.h
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 4c540fc9c7..8f3674aa8d 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -165,15 +165,15 @@ static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
syslog_ident = strdup(ident_ptr);
if (NIL_P(opt)) {
- syslog_options = LOG_PID | LOG_CONS;
+ syslog_options = LOG_PID | LOG_CONS;
} else {
- syslog_options = NUM2INT(opt);
+ syslog_options = NUM2INT(opt);
}
if (NIL_P(fac)) {
- syslog_facility = LOG_USER;
+ syslog_facility = LOG_USER;
} else {
- syslog_facility = NUM2INT(fac);
+ syslog_facility = NUM2INT(fac);
}
openlog(syslog_ident, syslog_options, syslog_facility);
@@ -307,7 +307,7 @@ static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
pri = *argv++;
if (!FIXNUM_P(pri)) {
- rb_raise(rb_eTypeError, "type mismatch: %"PRIsVALUE" given", rb_obj_class(pri));
+ rb_raise(rb_eTypeError, "type mismatch: %"PRIsVALUE" given", rb_obj_class(pri));
}
syslog_write(FIX2INT(pri), argc, argv);
@@ -322,14 +322,14 @@ static VALUE mSyslog_inspect(VALUE self)
Check_Type(self, T_MODULE);
if (!syslog_opened)
- return rb_sprintf("<#%"PRIsVALUE": opened=false>", self);
+ return rb_sprintf("<#%"PRIsVALUE": opened=false>", self);
return rb_sprintf("<#%"PRIsVALUE": opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>",
- self,
- syslog_ident,
- syslog_options,
- syslog_facility,
- syslog_mask);
+ self,
+ syslog_ident,
+ syslog_options,
+ syslog_facility,
+ syslog_mask);
}
/* Returns self, for backward compatibility.
diff --git a/ext/syslog/syslog.gemspec b/ext/syslog/syslog.gemspec
new file mode 100644
index 0000000000..6aa2e9570d
--- /dev/null
+++ b/ext/syslog/syslog.gemspec
@@ -0,0 +1,23 @@
+Gem::Specification.new do |spec|
+ spec.name = "syslog"
+ spec.version = "0.1.1"
+ spec.authors = ["Akinori MUSHA"]
+ spec.email = ["knu@idaemons.org"]
+
+ spec.summary = %q{Ruby interface for the POSIX system logging facility.}
+ spec.description = %q{Ruby interface for the POSIX system logging facility.}
+ spec.homepage = "https://github.com/ruby/syslog"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.extensions = ["ext/syslog/extconf.rb"]
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+end
diff --git a/ext/win32/lib/Win32API.rb b/ext/win32/lib/Win32API.rb
deleted file mode 100644
index 97b29fbf74..0000000000
--- a/ext/win32/lib/Win32API.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- ruby -*-
-# frozen_string_literal: true
-
-# for backward compatibility
-warn "Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead", uplevel: 2
-
-require 'fiddle/import'
-
-class Win32API
- DLL = {}
- TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG}
- POINTER_TYPE = Fiddle::SIZEOF_VOIDP == Fiddle::SIZEOF_LONG_LONG ? 'q*' : 'l!*'
-
- WIN32_TYPES = "VPpNnLlIi"
- DL_TYPES = "0SSI"
-
- def initialize(dllname, func, import, export = "0", calltype = :stdcall)
- @proto = [import].join.tr(WIN32_TYPES, DL_TYPES).sub(/^(.)0*$/, '\1')
- import = @proto.chars.map {|win_type| TYPEMAP[win_type.tr(WIN32_TYPES, DL_TYPES)]}
- export = TYPEMAP[export.tr(WIN32_TYPES, DL_TYPES)]
- calltype = Fiddle::Importer.const_get(:CALL_TYPE_TO_ABI)[calltype]
-
- handle = DLL[dllname] ||=
- begin
- Fiddle.dlopen(dllname)
- rescue Fiddle::DLError
- raise unless File.extname(dllname).empty?
- Fiddle.dlopen(dllname + ".dll")
- end
-
- @func = Fiddle::Function.new(handle[func], import, export, calltype)
- rescue Fiddle::DLError => e
- raise LoadError, e.message, e.backtrace
- end
-
- def call(*args)
- import = @proto.split("")
- args.each_with_index do |x, i|
- args[i], = [x == 0 ? nil : x].pack("p").unpack(POINTER_TYPE) if import[i] == "S"
- args[i], = [x].pack("I").unpack("i") if import[i] == "I"
- end
- ret, = @func.call(*args)
- return ret || 0
- end
-
- alias Call call
-end
diff --git a/ext/win32/lib/win32/importer.rb b/ext/win32/lib/win32/importer.rb
deleted file mode 100644
index 2bef016c29..0000000000
--- a/ext/win32/lib/win32/importer.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-require 'fiddle/import'
-
-module Win32
-end
-
-Win32.module_eval do
- Importer = Fiddle::Importer
-end
diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb
index 451499b166..bda8bb012f 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/win32/lib/win32/registry.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: false
-require 'win32/importer'
+require 'fiddle/import'
module Win32
@@ -69,7 +69,11 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
WCHAR_NUL = "\0".encode(WCHAR).freeze
WCHAR_CR = "\r".encode(WCHAR).freeze
WCHAR_SIZE = WCHAR_NUL.bytesize
- LOCALE = Encoding.find(Encoding.locale_charmap)
+ begin
+ LOCALE = Encoding.find(Encoding.locale_charmap)
+ rescue ArgumentError
+ LOCALE = Encoding::UTF_8
+ end
class Registry
@@ -169,7 +173,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
#
class Error < ::StandardError
module Kernel32
- extend Importer
+ extend Fiddle::Importer
dlload "kernel32.dll"
end
FormatMessageW = Kernel32.extern "int FormatMessageW(int, void *, int, int, void *, int, void *)", :stdcall
@@ -225,7 +229,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
#
module API
include Constants
- extend Importer
+ extend Fiddle::Importer
dlload "advapi32.dll"
[
"long RegOpenKeyExW(void *, void *, long, long, void *)",
@@ -667,14 +671,14 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
#
# Read a registry value named name and return its value data.
- # The class of value is same as #read method returns.
+ # The class of the value is the same as the #read method returns.
#
# If the value type is REG_EXPAND_SZ, returns value data whose environment
# variables are replaced.
# If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD,
# REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised.
#
- # The meaning of rtype is same as #read method.
+ # The meaning of rtype is the same as for the #read method.
#
def [](name, *rtype)
type, data = read(name, *rtype)
@@ -740,14 +744,11 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
# method returns.
#
def write(name, type, data)
- termsize = 0
case type
when REG_SZ, REG_EXPAND_SZ
- data = data.encode(WCHAR)
- termsize = WCHAR_SIZE
+ data = data.encode(WCHAR) << WCHAR_NUL
when REG_MULTI_SZ
data = data.to_a.map {|s| s.encode(WCHAR)}.join(WCHAR_NUL) << WCHAR_NUL
- termsize = WCHAR_SIZE
when REG_BINARY, REG_NONE
data = data.to_s
when REG_DWORD
@@ -759,7 +760,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
else
raise TypeError, "Unsupported type #{Registry.type2name(type)}"
end
- API.SetValue(@hkey, name, type, data, data.bytesize + termsize)
+ API.SetValue(@hkey, name, type, data, data.bytesize)
end
#
diff --git a/ext/win32/lib/win32/resolv.rb b/ext/win32/lib/win32/resolv.rb
index 1eb70d5dc6..d06658f0aa 100644
--- a/ext/win32/lib/win32/resolv.rb
+++ b/ext/win32/lib/win32/resolv.rb
@@ -42,19 +42,6 @@ begin
rescue LoadError
end
-if [nil].pack("p").size <= 4 # 32bit env
- begin
- f = Fiddle
- osid = f::Handle.new["rb_w32_osid"]
- rescue f::DLError # not ix86, cannot be Windows 9x
- else
- if f::Function.new(osid, [], f::TYPE_INT).call < 2 # VER_PLATFORM_WIN32_NT
- require_relative 'resolv9x'
- return
- end
- end
-end
-
module Win32
#====================================================================
# Windows NT
diff --git a/ext/win32/lib/win32/resolv9x.rb b/ext/win32/lib/win32/resolv9x.rb
deleted file mode 100644
index a409d59c0c..0000000000
--- a/ext/win32/lib/win32/resolv9x.rb
+++ /dev/null
@@ -1,253 +0,0 @@
-#====================================================================
-# Windows 9x
-#====================================================================
-module Win32
- module Resolv
- TCPIP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\MSTCP'
- DHCP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\DHCP'
- WINDOWS = 'Software\Microsoft\Windows\CurrentVersion'
-
- class << self
- # private
-
- def get_hosts_dir
- Registry::HKEY_LOCAL_MACHINE.open(WINDOWS) do |reg|
- reg.read_s_expand('SystemRoot')
- end
- end
-
- def get_info
- search = []
- nameserver = []
- begin
- Registry::HKEY_LOCAL_MACHINE.open(TCPIP_9X) do |reg|
- if reg.read_s("EnableDNS") == "1"
- domain = reg.read_s("Domain")
- ns = reg.read_s("NameServer")
- slist = reg.read_s("SearchList")
- search << domain unless domain.empty?
- search.concat(slist.split(/,\s*/))
- nameserver.concat(ns.split(/[,\s]\s*/))
- end
- end
- rescue Registry::Error
- end
-
- dhcpinfo = get_dhcpinfo
- search.concat(dhcpinfo[0])
- nameserver.concat(dhcpinfo[1])
- [ search, nameserver ]
- end
-
- def get_dhcpinfo
- macaddrs = {}
- ipaddrs = {}
- WsControl.get_iflist.each do |index, macaddr, *ipaddr|
- macaddrs[macaddr] = 1
- ipaddr.each { |ipaddr| ipaddrs[ipaddr] = 1 }
- end
- iflist = [ macaddrs, ipaddrs ]
-
- search = []
- nameserver = []
- version = -1
- Registry::HKEY_LOCAL_MACHINE.open(DHCP_9X) do |reg|
- begin
- version = API.unpackdw(reg.read_bin("Version"))
- rescue Registry::Error
- end
-
- reg.each_key do |key, |
- catch(:not_used) do
- reg.open(key) do |regdi|
- dom, ns = get_dhcpinfo_key(version, regdi, iflist)
- search << dom if dom
- nameserver.concat(ns) if ns
- end
- end
- end
- end
- [ search, nameserver ]
- end
-
- def get_dhcpinfo_95(reg)
- dhcp = reg.read_bin("DhcpInfo")
- [
- API.unpackdw(dhcp[4..7]),
- API.unpackdw(dhcp[8..11]),
- 1,
- dhcp[45..50],
- reg.read_bin("OptionInfo"),
- ]
- end
-
- def get_dhcpinfo_98(reg)
- [
- API.unpackdw(reg.read_bin("DhcpIPAddress")),
- API.unpackdw(reg.read_bin("DhcpSubnetMask")),
- API.unpackdw(reg.read_bin("HardwareType")),
- reg.read_bin("HardwareAddress"),
- reg.read_bin("OptionInfo"),
- ]
- end
-
- def get_dhcpinfo_key(version, reg, iflist)
- info = case version
- when 1
- get_dhcpinfo_95(reg)
- when 2
- get_dhcpinfo_98(reg)
- else
- begin
- get_dhcpinfo_98(reg)
- rescue Registry::Error
- get_dhcpinfo_95(reg)
- end
- end
- ipaddr, netmask, hwtype, macaddr, opt = info
- throw :not_used unless
- ipaddr and ipaddr != 0 and
- netmask and netmask != 0 and
- macaddr and macaddr.size == 6 and
- hwtype == 1 and
- iflist[0][macaddr] and iflist[1][ipaddr]
-
- size = opt.size
- idx = 0
- while idx <= size
- opttype = opt[idx]
- optsize = opt[idx + 1]
- optval = opt[idx + 2, optsize]
- case opttype
- when 0xFF ## term
- break
- when 0x0F ## domain
- domain = optval.chomp("\0")
- when 0x06 ## dns
- nameserver = optval.scan(/..../).collect { |addr|
- "%d.%d.%d.%d" % addr.unpack('C4')
- }
- end
- idx += optsize + 2
- end
- [ domain, nameserver ]
- rescue Registry::Error
- throw :not_used
- end
- end
-
- module WsControl
- module WSock32
- extend Importer
- dlload "wsock32.dll"
- end
- WsControl = WSock32.extern "int WsControl(int, int, void *, void *, void *, void *)", :stdcall
- WSAGetLastError = WSock32.extern "int WSAGetLastError(void)", :stdcall
-
- MAX_TDI_ENTITIES = 512
- IPPROTO_TCP = 6
- WSCTL_TCP_QUERY_INFORMATION = 0
- INFO_CLASS_GENERIC = 0x100
- INFO_CLASS_PROTOCOL = 0x200
- INFO_TYPE_PROVIDER = 0x100
- ENTITY_LIST_ID = 0
- GENERIC_ENTITY = 0
- CL_NL_ENTITY = 0x301
- IF_ENTITY = 0x200
- ENTITY_TYPE_ID = 1
- CL_NL_IP = 0x303
- IF_MIB = 0x202
- IF_MIB_STATS_ID = 1
- IP_MIB_ADDRTABLE_ENTRY_ID = 0x102
-
- def self.wsctl(tei_entity, tei_instance,
- toi_class, toi_type, toi_id,
- buffsize)
- reqinfo = [
- ## TDIEntityID
- tei_entity, tei_instance,
- ## TDIObjectID
- toi_class, toi_type, toi_id,
- ## TCP_REQUEST_INFORMATION_EX
- ""
- ].pack('VVVVVa16')
- reqsize = API.packdw(reqinfo.size)
- buff = "\0" * buffsize
- buffsize = API.packdw(buffsize)
- result = WsControl.call(
- IPPROTO_TCP,
- WSCTL_TCP_QUERY_INFORMATION,
- reqinfo, reqsize,
- buff, buffsize)
- if result != 0
- raise RuntimeError, "WsControl failed.(#{result})"
- end
- [ buff, API.unpackdw(buffsize) ]
- end
- private_class_method :wsctl
-
- def self.get_iflist
- # Get TDI Entity List
- entities, size =
- wsctl(GENERIC_ENTITY, 0,
- INFO_CLASS_GENERIC,
- INFO_TYPE_PROVIDER,
- ENTITY_LIST_ID,
- MAX_TDI_ENTITIES * 8) # sizeof(TDIEntityID)
- entities = entities[0, size].
- scan(/.{8}/).
- collect { |e| e.unpack('VV') }
-
- # Get MIB Interface List
- iflist = []
- ifcount = 0
- entities.each do |entity, instance|
- if( (entity & IF_ENTITY)>0 )
- ifcount += 1
- etype, = wsctl(entity, instance,
- INFO_CLASS_GENERIC,
- INFO_TYPE_PROVIDER,
- ENTITY_TYPE_ID,
- 4)
- if( (API.unpackdw(etype) & IF_MIB)==IF_MIB )
- ifentry, = wsctl(entity, instance,
- INFO_CLASS_PROTOCOL,
- INFO_TYPE_PROVIDER,
- IF_MIB_STATS_ID,
- 21 * 4 + 8 + 130) # sizeof(IFEntry)
- iflist << [
- API.unpackdw(ifentry[0,4]),
- ifentry[20, 6]
- ]
- end
- end
- end
-
- # Get IP Addresses
- entities.each do |entity, instance|
- if entity == CL_NL_ENTITY
- etype, = wsctl(entity, instance,
- INFO_CLASS_GENERIC,
- INFO_TYPE_PROVIDER,
- ENTITY_TYPE_ID,
- 4)
- if API.unpackdw(etype) == CL_NL_IP
- ipentries, = wsctl(entity, instance,
- INFO_CLASS_PROTOCOL,
- INFO_TYPE_PROVIDER,
- IP_MIB_ADDRTABLE_ENTRY_ID,
- 24 * (ifcount+1)) # sizeof(IPAddrEntry)
- ipentries.scan(/.{24}/) do |ipentry|
- ipaddr, index = ipentry.unpack('VV')
- if ifitem = iflist.assoc(index)
- ifitem << ipaddr
- end
- end
- end
- end
- end
- iflist
- end
- end
- end
-end
diff --git a/ext/win32/lib/win32/sspi.rb b/ext/win32/lib/win32/sspi.rb
index 8103893d7f..20205fd4d6 100644
--- a/ext/win32/lib/win32/sspi.rb
+++ b/ext/win32/lib/win32/sspi.rb
@@ -11,321 +11,328 @@
# Ruby Distribution License or GNU General Public License.
#
-require 'Win32API'
+require 'fiddle/import'
# Implements bindings to Win32 SSPI functions, focused on authentication to a proxy server over HTTP.
module Win32
- module SSPI
- # Specifies how credential structure requested will be used. Only SECPKG_CRED_OUTBOUND is used
- # here.
- SECPKG_CRED_INBOUND = 0x00000001
- SECPKG_CRED_OUTBOUND = 0x00000002
- SECPKG_CRED_BOTH = 0x00000003
-
- # Format of token. NETWORK format is used here.
- SECURITY_NATIVE_DREP = 0x00000010
- SECURITY_NETWORK_DREP = 0x00000000
-
- # InitializeSecurityContext Requirement flags
- ISC_REQ_REPLAY_DETECT = 0x00000004
- ISC_REQ_SEQUENCE_DETECT = 0x00000008
- ISC_REQ_CONFIDENTIALITY = 0x00000010
- ISC_REQ_USE_SESSION_KEY = 0x00000020
- ISC_REQ_PROMPT_FOR_CREDS = 0x00000040
- ISC_REQ_CONNECTION = 0x00000800
-
- # Win32 API Functions. Uses Win32API to bind methods to constants contained in class.
- module API
- # Can be called with AcquireCredentialsHandle.call()
- AcquireCredentialsHandle = Win32API.new("secur32", "AcquireCredentialsHandle", 'ppLpppppp', 'L')
- # Can be called with InitializeSecurityContext.call()
- InitializeSecurityContext = Win32API.new("secur32", "InitializeSecurityContext", 'pppLLLpLpppp', 'L')
- # Can be called with DeleteSecurityContext.call()
- DeleteSecurityContext = Win32API.new("secur32", "DeleteSecurityContext", 'P', 'L')
- # Can be called with FreeCredentialsHandle.call()
- FreeCredentialsHandle = Win32API.new("secur32", "FreeCredentialsHandle", 'P', 'L')
- end
-
- # SecHandle struct
- class SecurityHandle
- def upper
- @struct.unpack("LL")[1]
- end
-
- def lower
- @struct.unpack("LL")[0]
- end
-
- def to_p
- @struct ||= "\0" * 8
- end
- end
-
- # Some familiar aliases for the SecHandle structure
- CredHandle = CtxtHandle = SecurityHandle
-
- # TimeStamp struct
- class TimeStamp
- attr_reader :struct
-
- def to_p
- @struct ||= "\0" * 8
- end
- end
-
- # Creates binary representations of a SecBufferDesc structure,
- # including the SecBuffer contained inside.
- class SecurityBuffer
-
- SECBUFFER_TOKEN = 2 # Security token
-
- TOKENBUFSIZE = 12288
- SECBUFFER_VERSION = 0
-
- def initialize(buffer = nil)
- @buffer = buffer || "\0" * TOKENBUFSIZE
- @bufferSize = @buffer.length
- @type = SECBUFFER_TOKEN
- end
-
- def bufferSize
- unpack
- @bufferSize
- end
-
- def bufferType
- unpack
- @type
- end
-
- def token
- unpack
- @buffer
- end
-
- def to_p
- # Assumption is that when to_p is called we are going to get a packed structure. Therefore,
- # set @unpacked back to nil so we know to unpack when accessors are next accessed.
- @unpacked = nil
- # Assignment of inner structure to variable is very important here. Without it,
- # will not be able to unpack changes to the structure. Alternative, nested unpacks,
- # does not work (i.e. @struct.unpack("LLP12")[2].unpack("LLP12") results in "no associated pointer")
- @sec_buffer ||= [@bufferSize, @type, @buffer].pack("LLP")
- @struct ||= [SECBUFFER_VERSION, 1, @sec_buffer].pack("LLP")
- end
-
- private
-
- # Unpacks the SecurityBufferDesc structure into member variables. We
- # only want to do this once per struct, so the struct is deleted
- # after unpacking.
- def unpack
- if ! @unpacked && @sec_buffer && @struct
- @bufferSize, @type = @sec_buffer.unpack("LL")
- @buffer = @sec_buffer.unpack("LLP#{@bufferSize}")[2]
- @struct = nil
- @sec_buffer = nil
- @unpacked = true
- end
- end
- end
-
- # SEC_WINNT_AUTH_IDENTITY structure
- class Identity
- SEC_WINNT_AUTH_IDENTITY_ANSI = 0x1
-
- attr_accessor :user, :domain, :password
-
- def initialize(user = nil, domain = nil, password = nil)
- @user = user
- @domain = domain
- @password = password
- @flags = SEC_WINNT_AUTH_IDENTITY_ANSI
- end
-
- def to_p
- [@user, @user ? @user.length : 0,
- @domain, @domain ? @domain.length : 0,
- @password, @password ? @password.length : 0,
- @flags].pack("PLPLPLL")
- end
- end
-
- # Takes a return result from an SSPI function and interprets the value.
- class SSPIResult
- # Good results
- SEC_E_OK = 0x00000000
- SEC_I_CONTINUE_NEEDED = 0x00090312
-
- # These are generally returned by InitializeSecurityContext
- SEC_E_INSUFFICIENT_MEMORY = 0x80090300
- SEC_E_INTERNAL_ERROR = 0x80090304
- SEC_E_INVALID_HANDLE = 0x80090301
- SEC_E_INVALID_TOKEN = 0x80090308
- SEC_E_LOGON_DENIED = 0x8009030C
- SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311
- SEC_E_NO_CREDENTIALS = 0x8009030E
- SEC_E_TARGET_UNKNOWN = 0x80090303
- SEC_E_UNSUPPORTED_FUNCTION = 0x80090302
- SEC_E_WRONG_PRINCIPAL = 0x80090322
-
- # These are generally returned by AcquireCredentialsHandle
- SEC_E_NOT_OWNER = 0x80090306
- SEC_E_SECPKG_NOT_FOUND = 0x80090305
- SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D
-
- @@map = {}
- constants.each { |v| @@map[self.const_get(v.to_s)] = v }
-
- attr_reader :value
-
- def initialize(value)
- # convert to unsigned long
- value = [value].pack("L").unpack("L").first
- raise "#{value.to_s(16)} is not a recognized result" unless @@map.has_key? value
- @value = value
- end
-
- def to_s
- @@map[@value].to_s
- end
-
- def ok?
- @value == SEC_I_CONTINUE_NEEDED || @value == SEC_E_OK
- end
-
- def ==(other)
- if other.is_a?(SSPIResult)
- @value == other.value
- elsif other.is_a?(Fixnum)
- @value == @@map[other]
- else
- false
- end
- end
- end
-
- # Handles "Negotiate" type authentication. Geared towards authenticating with a proxy server over HTTP
- class NegotiateAuth
- attr_accessor :credentials, :context, :contextAttributes, :user, :domain
-
- # Default request flags for SSPI functions
- REQUEST_FLAGS = ISC_REQ_CONFIDENTIALITY | ISC_REQ_REPLAY_DETECT | ISC_REQ_CONNECTION
-
- # NTLM tokens start with this header always. Encoding alone adds "==" and newline, so remove those
+ module SSPI
+ # Specifies how credential structure requested will be used. Only SECPKG_CRED_OUTBOUND is used
+ # here.
+ SECPKG_CRED_INBOUND = 0x00000001
+ SECPKG_CRED_OUTBOUND = 0x00000002
+ SECPKG_CRED_BOTH = 0x00000003
+
+ # Format of token. NETWORK format is used here.
+ SECURITY_NATIVE_DREP = 0x00000010
+ SECURITY_NETWORK_DREP = 0x00000000
+
+ # InitializeSecurityContext Requirement flags
+ ISC_REQ_REPLAY_DETECT = 0x00000004
+ ISC_REQ_SEQUENCE_DETECT = 0x00000008
+ ISC_REQ_CONFIDENTIALITY = 0x00000010
+ ISC_REQ_USE_SESSION_KEY = 0x00000020
+ ISC_REQ_PROMPT_FOR_CREDS = 0x00000040
+ ISC_REQ_CONNECTION = 0x00000800
+
+ # Win32 API Functions. Uses Win32API to bind methods to constants contained in class.
+ module API
+ extend Fiddle::Importer
+ dlload "secur32.dll"
+ [
+ # Can be called with AcquireCredentialsHandleA.call()
+ "unsigned long AcquireCredentialsHandleA(void *, void *, unsigned long, void *, void *, void *, void *, void *, void *)",
+ # Can be called with InitializeSecurityContextA.call()
+ "unsigned long InitializeSecurityContextA(void *, void *, void *, unsigned long, unsigned long, unsigned long, void *, unsigned long, void *, void *, void *, void *)",
+ # Can be called with DeleteSecurityContext.call()
+ "unsigned long DeleteSecurityContext(void *)",
+ # Can be called with FreeCredentialsHandle.call()
+ "unsigned long FreeCredentialsHandle(void *)"
+ ].each do |fn|
+ cfunc = extern fn, :stdcall
+ const_set cfunc.name.intern, cfunc
+ end
+ end
+
+ # SecHandle struct
+ class SecurityHandle
+ def upper
+ @struct.unpack("LL")[1]
+ end
+
+ def lower
+ @struct.unpack("LL")[0]
+ end
+
+ def to_p
+ @struct ||= "\0" * 8
+ end
+ end
+
+ # Some familiar aliases for the SecHandle structure
+ CredHandle = CtxtHandle = SecurityHandle
+
+ # TimeStamp struct
+ class TimeStamp
+ attr_reader :struct
+
+ def to_p
+ @struct ||= "\0" * 8
+ end
+ end
+
+ # Creates binary representations of a SecBufferDesc structure,
+ # including the SecBuffer contained inside.
+ class SecurityBuffer
+
+ SECBUFFER_TOKEN = 2 # Security token
+
+ TOKENBUFSIZE = 12288
+ SECBUFFER_VERSION = 0
+
+ def initialize(buffer = nil)
+ @buffer = buffer || "\0" * TOKENBUFSIZE
+ @bufferSize = @buffer.length
+ @type = SECBUFFER_TOKEN
+ end
+
+ def bufferSize
+ unpack
+ @bufferSize
+ end
+
+ def bufferType
+ unpack
+ @type
+ end
+
+ def token
+ unpack
+ @buffer
+ end
+
+ def to_p
+ # Assumption is that when to_p is called we are going to get a packed structure. Therefore,
+ # set @unpacked back to nil so we know to unpack when accessors are next accessed.
+ @unpacked = nil
+ # Assignment of inner structure to variable is very important here. Without it,
+ # will not be able to unpack changes to the structure. Alternative, nested unpacks,
+ # does not work (i.e. @struct.unpack("LLP12")[2].unpack("LLP12") results in "no associated pointer")
+ @sec_buffer ||= [@bufferSize, @type, @buffer].pack("LLP")
+ @struct ||= [SECBUFFER_VERSION, 1, @sec_buffer].pack("LLP")
+ end
+
+ private
+
+ # Unpacks the SecurityBufferDesc structure into member variables. We
+ # only want to do this once per struct, so the struct is deleted
+ # after unpacking.
+ def unpack
+ if ! @unpacked && @sec_buffer && @struct
+ @bufferSize, @type = @sec_buffer.unpack("LL")
+ @buffer = @sec_buffer.unpack("LLP#{@bufferSize}")[2]
+ @struct = nil
+ @sec_buffer = nil
+ @unpacked = true
+ end
+ end
+ end
+
+ # SEC_WINNT_AUTH_IDENTITY structure
+ class Identity
+ SEC_WINNT_AUTH_IDENTITY_ANSI = 0x1
+
+ attr_accessor :user, :domain, :password
+
+ def initialize(user = nil, domain = nil, password = nil)
+ @user = user
+ @domain = domain
+ @password = password
+ @flags = SEC_WINNT_AUTH_IDENTITY_ANSI
+ end
+
+ def to_p
+ [@user, @user ? @user.length : 0,
+ @domain, @domain ? @domain.length : 0,
+ @password, @password ? @password.length : 0,
+ @flags].pack("PLPLPLL")
+ end
+ end
+
+ # Takes a return result from an SSPI function and interprets the value.
+ class SSPIResult
+ # Good results
+ SEC_E_OK = 0x00000000
+ SEC_I_CONTINUE_NEEDED = 0x00090312
+
+ # These are generally returned by InitializeSecurityContext
+ SEC_E_INSUFFICIENT_MEMORY = 0x80090300
+ SEC_E_INTERNAL_ERROR = 0x80090304
+ SEC_E_INVALID_HANDLE = 0x80090301
+ SEC_E_INVALID_TOKEN = 0x80090308
+ SEC_E_LOGON_DENIED = 0x8009030C
+ SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311
+ SEC_E_NO_CREDENTIALS = 0x8009030E
+ SEC_E_TARGET_UNKNOWN = 0x80090303
+ SEC_E_UNSUPPORTED_FUNCTION = 0x80090302
+ SEC_E_WRONG_PRINCIPAL = 0x80090322
+
+ # These are generally returned by AcquireCredentialsHandle
+ SEC_E_NOT_OWNER = 0x80090306
+ SEC_E_SECPKG_NOT_FOUND = 0x80090305
+ SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D
+
+ @@map = {}
+ constants.each { |v| @@map[self.const_get(v.to_s)] = v }
+
+ attr_reader :value
+
+ def initialize(value)
+ # convert to unsigned long
+ value = [value].pack("L").unpack("L").first
+ raise "#{value.to_s(16)} is not a recognized result" unless @@map.has_key? value
+ @value = value
+ end
+
+ def to_s
+ @@map[@value].to_s
+ end
+
+ def ok?
+ @value == SEC_I_CONTINUE_NEEDED || @value == SEC_E_OK
+ end
+
+ def ==(other)
+ if other.is_a?(SSPIResult)
+ @value == other.value
+ elsif other.is_a?(Fixnum)
+ @value == @@map[other]
+ else
+ false
+ end
+ end
+ end
+
+ # Handles "Negotiate" type authentication. Geared towards authenticating with a proxy server over HTTP
+ class NegotiateAuth
+ attr_accessor :credentials, :context, :contextAttributes, :user, :domain
+
+ # Default request flags for SSPI functions
+ REQUEST_FLAGS = ISC_REQ_CONFIDENTIALITY | ISC_REQ_REPLAY_DETECT | ISC_REQ_CONNECTION
+
+ # NTLM tokens start with this header always. Encoding alone adds "==" and newline, so remove those
B64_TOKEN_PREFIX = ["NTLMSSP"].pack("m").delete("=\n")
- # Given a connection and a request path, performs authentication as the current user and returns
- # the response from a GET request. The connnection should be a Net::HTTP object, and it should
- # have been constructed using the Net::HTTP.Proxy method, but anything that responds to "get" will work.
- # If a user and domain are given, will authenticate as the given user.
- # Returns the response received from the get method (usually Net::HTTPResponse)
- def NegotiateAuth.proxy_auth_get(http, path, user = nil, domain = nil)
- raise "http must respond to :get" unless http.respond_to?(:get)
- nego_auth = self.new user, domain
-
- resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.get_initial_token }
- if resp["Proxy-Authenticate"]
- resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.complete_authentication(resp["Proxy-Authenticate"].split(" ").last.strip) }
- end
-
- resp
- end
-
- # Creates a new instance ready for authentication as the given user in the given domain.
- # Defaults to current user and domain as defined by ENV["USERDOMAIN"] and ENV["USERNAME"] if
- # no arguments are supplied.
- def initialize(user = nil, domain = nil)
- if user.nil? && domain.nil? && ENV["USERNAME"].nil? && ENV["USERDOMAIN"].nil?
- raise "A username or domain must be supplied since they cannot be retrieved from the environment"
- end
-
- @user = user || ENV["USERNAME"]
- @domain = domain || ENV["USERDOMAIN"]
- end
-
- # Gets the initial Negotiate token. Returns it as a base64 encoded string suitable for use in HTTP. Can
- # be easily decoded, however.
- def get_initial_token
- raise "This object is no longer usable because its resources have been freed." if @cleaned_up
- get_credentials
-
- outputBuffer = SecurityBuffer.new
- @context = CtxtHandle.new
- @contextAttributes = "\0" * 4
-
- result = SSPIResult.new(API::InitializeSecurityContext.call(@credentials.to_p, nil, nil,
- REQUEST_FLAGS,0, SECURITY_NETWORK_DREP, nil, 0, @context.to_p, outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p))
-
- if result.ok? then
- return encode_token(outputBuffer.token)
- else
- raise "Error: #{result.to_s}"
- end
- end
-
- # Takes a token and gets the next token in the Negotiate authentication chain. Token can be Base64 encoded or not.
- # The token can include the "Negotiate" header and it will be stripped.
- # Does not indicate if SEC_I_CONTINUE or SEC_E_OK was returned.
- # Token returned is Base64 encoded w/ all new lines removed.
- def complete_authentication(token)
- raise "This object is no longer usable because its resources have been freed." if @cleaned_up
-
- # Nil token OK, just set it to empty string
- token = "" if token.nil?
-
- if token.include? "Negotiate"
- # If the Negotiate prefix is passed in, assume we are seeing "Negotiate <token>" and get the token.
- token = token.split(" ").last
- end
-
- if token.include? B64_TOKEN_PREFIX
- # indicates base64 encoded token
+ # Given a connection and a request path, performs authentication as the current user and returns
+ # the response from a GET request. The connection should be a Net::HTTP object, and it should
+ # have been constructed using the Net::HTTP.Proxy method, but anything that responds to "get" will work.
+ # If a user and domain are given, will authenticate as the given user.
+ # Returns the response received from the get method (usually Net::HTTPResponse)
+ def NegotiateAuth.proxy_auth_get(http, path, user = nil, domain = nil)
+ raise "http must respond to :get" unless http.respond_to?(:get)
+ nego_auth = self.new user, domain
+
+ resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.get_initial_token }
+ if resp["Proxy-Authenticate"]
+ resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.complete_authentication(resp["Proxy-Authenticate"].split(" ").last.strip) }
+ end
+
+ resp
+ end
+
+ # Creates a new instance ready for authentication as the given user in the given domain.
+ # Defaults to current user and domain as defined by ENV["USERDOMAIN"] and ENV["USERNAME"] if
+ # no arguments are supplied.
+ def initialize(user = nil, domain = nil)
+ if user.nil? && domain.nil? && ENV["USERNAME"].nil? && ENV["USERDOMAIN"].nil?
+ raise "A username or domain must be supplied since they cannot be retrieved from the environment"
+ end
+
+ @user = user || ENV["USERNAME"]
+ @domain = domain || ENV["USERDOMAIN"]
+ end
+
+ # Gets the initial Negotiate token. Returns it as a base64 encoded string suitable for use in HTTP. Can
+ # be easily decoded, however.
+ def get_initial_token
+ raise "This object is no longer usable because its resources have been freed." if @cleaned_up
+ get_credentials
+
+ outputBuffer = SecurityBuffer.new
+ @context = CtxtHandle.new
+ @contextAttributes = "\0" * 4
+
+ result = SSPIResult.new(API::InitializeSecurityContextA.call(@credentials.to_p, nil, nil,
+ REQUEST_FLAGS,0, SECURITY_NETWORK_DREP, nil, 0, @context.to_p, outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p))
+
+ if result.ok? then
+ return encode_token(outputBuffer.token)
+ else
+ raise "Error: #{result.to_s}"
+ end
+ end
+
+ # Takes a token and gets the next token in the Negotiate authentication chain. Token can be Base64 encoded or not.
+ # The token can include the "Negotiate" header and it will be stripped.
+ # Does not indicate if SEC_I_CONTINUE or SEC_E_OK was returned.
+ # Token returned is Base64 encoded w/ all new lines removed.
+ def complete_authentication(token)
+ raise "This object is no longer usable because its resources have been freed." if @cleaned_up
+
+ # Nil token OK, just set it to empty string
+ token = "" if token.nil?
+
+ if token.include? "Negotiate"
+ # If the Negotiate prefix is passed in, assume we are seeing "Negotiate <token>" and get the token.
+ token = token.split(" ").last
+ end
+
+ if token.include? B64_TOKEN_PREFIX
+ # indicates base64 encoded token
token = token.strip.unpack("m")[0]
- end
-
- outputBuffer = SecurityBuffer.new
- result = SSPIResult.new(API::InitializeSecurityContext.call(@credentials.to_p, @context.to_p, nil,
- REQUEST_FLAGS, 0, SECURITY_NETWORK_DREP, SecurityBuffer.new(token).to_p, 0,
- @context.to_p,
- outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p))
-
- if result.ok? then
- return encode_token(outputBuffer.token)
- else
- raise "Error: #{result.to_s}"
- end
- ensure
- # need to make sure we don't clean up if we've already cleaned up.
- clean_up unless @cleaned_up
- end
-
- private
-
- def clean_up
- # free structures allocated
- @cleaned_up = true
- API::FreeCredentialsHandle.call(@credentials.to_p)
- API::DeleteSecurityContext.call(@context.to_p)
- @context = nil
- @credentials = nil
- @contextAttributes = nil
- end
-
- # Gets credentials based on user, domain or both. If both are nil, an error occurs
- def get_credentials
- @credentials = CredHandle.new
- ts = TimeStamp.new
- @identity = Identity.new @user, @domain
- result = SSPIResult.new(API::AcquireCredentialsHandle.call(nil, "Negotiate", SECPKG_CRED_OUTBOUND, nil, @identity.to_p,
- nil, nil, @credentials.to_p, ts.to_p))
- raise "Error acquire credentials: #{result}" unless result.ok?
- end
-
- def encode_token(t)
- # encode64 will add newlines every 60 characters so we need to remove those.
+ end
+
+ outputBuffer = SecurityBuffer.new
+ result = SSPIResult.new(API::InitializeSecurityContext.call(@credentials.to_p, @context.to_p, nil,
+ REQUEST_FLAGS, 0, SECURITY_NETWORK_DREP, SecurityBuffer.new(token).to_p, 0,
+ @context.to_p,
+ outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p))
+
+ if result.ok? then
+ return encode_token(outputBuffer.token)
+ else
+ raise "Error: #{result.to_s}"
+ end
+ ensure
+ # need to make sure we don't clean up if we've already cleaned up.
+ clean_up unless @cleaned_up
+ end
+
+ private
+
+ def clean_up
+ # free structures allocated
+ @cleaned_up = true
+ API::FreeCredentialsHandle.call(@credentials.to_p)
+ API::DeleteSecurityContext.call(@context.to_p)
+ @context = nil
+ @credentials = nil
+ @contextAttributes = nil
+ end
+
+ # Gets credentials based on user, domain or both. If both are nil, an error occurs
+ def get_credentials
+ @credentials = CredHandle.new
+ ts = TimeStamp.new
+ @identity = Identity.new @user, @domain
+ result = SSPIResult.new(API::AcquireCredentialsHandleA.call(nil, "Negotiate", SECPKG_CRED_OUTBOUND, nil, @identity.to_p,
+ nil, nil, @credentials.to_p, ts.to_p))
+ raise "Error acquire credentials: #{result}" unless result.ok?
+ end
+
+ def encode_token(t)
+ # encode64 will add newlines every 60 characters so we need to remove those.
[t].pack("m").delete("\n")
- end
- end
- end
+ end
+ end
+ end
end
diff --git a/ext/win32/resolv/resolv.c b/ext/win32/resolv/resolv.c
index f19243ccc1..8a50ef7824 100644
--- a/ext/win32/resolv/resolv.c
+++ b/ext/win32/resolv/resolv.c
@@ -29,19 +29,19 @@ get_dns_server_list(VALUE self)
ret = GetNetworkParams(NULL, &buflen);
if (ret != NO_ERROR && ret != ERROR_BUFFER_OVERFLOW) {
- w32error_raise(ret);
+ w32error_raise(ret);
}
fixedinfo = ALLOCV(buf, buflen);
ret = GetNetworkParams(fixedinfo, &buflen);
if (ret == NO_ERROR) {
- const IP_ADDR_STRING *ipaddr = &fixedinfo->DnsServerList;
- nameservers = rb_ary_new();
- do {
- const char *s = ipaddr->IpAddress.String;
- if (!*s) continue;
- if (strcmp(s, "0.0.0.0") == 0) continue;
- rb_ary_push(nameservers, rb_str_new_cstr(s));
- } while ((ipaddr = ipaddr->Next) != NULL);
+ const IP_ADDR_STRING *ipaddr = &fixedinfo->DnsServerList;
+ nameservers = rb_ary_new();
+ do {
+ const char *s = ipaddr->IpAddress.String;
+ if (!*s) continue;
+ if (strcmp(s, "0.0.0.0") == 0) continue;
+ rb_ary_push(nameservers, rb_str_new_cstr(s));
+ } while ((ipaddr = ipaddr->Next) != NULL);
}
ALLOCV_END(buf);
if (ret != NO_ERROR) w32error_raise(ret);
diff --git a/ext/win32ole/sample/xml.rb b/ext/win32ole/sample/xml.rb
index 36c3db32ef..5a239c9336 100644
--- a/ext/win32ole/sample/xml.rb
+++ b/ext/win32ole/sample/xml.rb
@@ -1032,8 +1032,8 @@ module IXMLDOMDocument
end
# VOID save
- # save the document to a specified desination
- # VARIANT arg0 --- desination [IN]
+ # save the document to a specified destination
+ # VARIANT arg0 --- destination [IN]
def save(arg0)
ret = _invoke(64, [arg0], [VT_VARIANT])
@lastargs = WIN32OLE::ARGV
@@ -6224,8 +6224,8 @@ class Microsoft_XMLDOM_1_0 # DOMDocument
end
# VOID save
- # save the document to a specified desination
- # VARIANT arg0 --- desination [IN]
+ # save the document to a specified destination
+ # VARIANT arg0 --- destination [IN]
def save(arg0)
ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
@lastargs = WIN32OLE::ARGV
@@ -6831,8 +6831,8 @@ class Microsoft_FreeThreadedXMLDOM_1_0 # DOMFreeThreadedDocument
end
# VOID save
- # save the document to a specified desination
- # VARIANT arg0 --- desination [IN]
+ # save the document to a specified destination
+ # VARIANT arg0 --- destination [IN]
def save(arg0)
ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
@lastargs = WIN32OLE::ARGV
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index f20bfc84f6..3f083bb12d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -454,12 +454,12 @@ vtdate2rbtime(double date)
double sec;
VariantTimeToSystemTime(date, &st);
v = rb_funcall(rb_cTime, rb_intern("new"), 6,
- RB_INT2FIX(st.wYear),
- RB_INT2FIX(st.wMonth),
- RB_INT2FIX(st.wDay),
- RB_INT2FIX(st.wHour),
- RB_INT2FIX(st.wMinute),
- RB_INT2FIX(st.wSecond));
+ RB_INT2FIX(st.wYear),
+ RB_INT2FIX(st.wMonth),
+ RB_INT2FIX(st.wDay),
+ RB_INT2FIX(st.wHour),
+ RB_INT2FIX(st.wMinute),
+ RB_INT2FIX(st.wSecond));
st.wYear = RB_FIX2INT(rb_funcall(v, rb_intern("year"), 0));
st.wMonth = RB_FIX2INT(rb_funcall(v, rb_intern("month"), 0));
st.wDay = RB_FIX2INT(rb_funcall(v, rb_intern("mday"), 0));
@@ -507,6 +507,7 @@ static UINT ole_encoding2cp(rb_encoding *enc)
ENC_MACHING_CP(enc, "GB2312", 20936);
ENC_MACHING_CP(enc, "GBK", 936);
ENC_MACHING_CP(enc, "IBM437", 437);
+ ENC_MACHING_CP(enc, "IBM720", 720);
ENC_MACHING_CP(enc, "IBM737", 737);
ENC_MACHING_CP(enc, "IBM775", 775);
ENC_MACHING_CP(enc, "IBM852", 852);
@@ -567,16 +568,16 @@ load_conv_function51932(void)
void *p;
if (!pIMultiLanguage) {
#if defined(HAVE_TYPE_IMULTILANGUAGE2)
- hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
- &IID_IMultiLanguage2, &p);
+ hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IMultiLanguage2, &p);
#elif defined(HAVE_TYPE_IMULTILANGUAGE)
- hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
- &IID_IMultiLanguage, &p);
+ hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IMultiLanguage, &p);
#endif
- if (FAILED(hr)) {
- failed_load_conv51932();
- }
- pIMultiLanguage = p;
+ if (FAILED(hr)) {
+ failed_load_conv51932();
+ }
+ pIMultiLanguage = p;
}
}
#define need_conv_function51932() (load_conv_function51932(), 1)
@@ -623,7 +624,7 @@ ole_init_cp(void)
rb_encoding *encdef;
encdef = rb_default_internal_encoding();
if (!encdef) {
- encdef = rb_default_external_encoding();
+ encdef = rb_default_external_encoding();
}
cp = ole_encoding2cp(encdef);
set_ole_codepage(cp);
@@ -649,38 +650,38 @@ ole_cp2encoding(UINT cp)
int idx;
if (!code_page_installed(cp)) {
- switch(cp) {
- case CP_ACP:
- cp = GetACP();
- break;
- case CP_OEMCP:
- cp = GetOEMCP();
- break;
- case CP_MACCP:
- case CP_THREAD_ACP:
- if (!pGetCPInfoEx) {
- pGetCPInfoEx = (BOOL (*)(UINT, DWORD, struct myCPINFOEX *))
- GetProcAddress(GetModuleHandle("kernel32"), "GetCPInfoEx");
- if (!pGetCPInfoEx) {
- pGetCPInfoEx = (void*)-1;
- }
- }
- buf = ALLOCA_N(struct myCPINFOEX, 1);
- ZeroMemory(buf, sizeof(struct myCPINFOEX));
- if (pGetCPInfoEx == (void*)-1 || !pGetCPInfoEx(cp, 0, buf)) {
- rb_raise(eWIN32OLERuntimeError, "cannot map codepage to encoding.");
- break; /* never reach here */
- }
- cp = buf->CodePage;
- break;
- case CP_SYMBOL:
- case CP_UTF7:
- case CP_UTF8:
- break;
- case 51932:
- load_conv_function51932();
- break;
- default:
+ switch(cp) {
+ case CP_ACP:
+ cp = GetACP();
+ break;
+ case CP_OEMCP:
+ cp = GetOEMCP();
+ break;
+ case CP_MACCP:
+ case CP_THREAD_ACP:
+ if (!pGetCPInfoEx) {
+ pGetCPInfoEx = (BOOL (*)(UINT, DWORD, struct myCPINFOEX *))
+ GetProcAddress(GetModuleHandle("kernel32"), "GetCPInfoEx");
+ if (!pGetCPInfoEx) {
+ pGetCPInfoEx = (void*)-1;
+ }
+ }
+ buf = ALLOCA_N(struct myCPINFOEX, 1);
+ ZeroMemory(buf, sizeof(struct myCPINFOEX));
+ if (pGetCPInfoEx == (void*)-1 || !pGetCPInfoEx(cp, 0, buf)) {
+ rb_raise(eWIN32OLERuntimeError, "cannot map codepage to encoding.");
+ break; /* never reach here */
+ }
+ cp = buf->CodePage;
+ break;
+ case CP_SYMBOL:
+ case CP_UTF7:
+ case CP_UTF8:
+ break;
+ case 51932:
+ load_conv_function51932();
+ break;
+ default:
rb_raise(eWIN32OLERuntimeError, "codepage should be WIN32OLE::CP_ACP, WIN32OLE::CP_OEMCP, WIN32OLE::CP_MACCP, WIN32OLE::CP_THREAD_ACP, WIN32OLE::CP_SYMBOL, WIN32OLE::CP_UTF7, WIN32OLE::CP_UTF8, or installed codepage.");
break;
}
@@ -689,7 +690,7 @@ ole_cp2encoding(UINT cp)
enc_name = rb_sprintf("CP%d", cp);
idx = rb_enc_find_index(enc_cstr = StringValueCStr(enc_name));
if (idx < 0)
- idx = rb_define_dummy_encoding(enc_cstr);
+ idx = rb_define_dummy_encoding(enc_cstr);
return rb_enc_from_index(idx);
}
@@ -699,14 +700,14 @@ ole_ml_wc2mb_conv0(LPWSTR pw, LPSTR pm, UINT *size)
{
DWORD dw = 0;
return pIMultiLanguage->lpVtbl->ConvertStringFromUnicode(pIMultiLanguage,
- &dw, cWIN32OLE_cp, pw, NULL, pm, size);
+ &dw, cWIN32OLE_cp, pw, NULL, pm, size);
}
#define ole_ml_wc2mb_conv(pw, pm, size, onfailure) do { \
- HRESULT hr = ole_ml_wc2mb_conv0(pw, pm, &size); \
- if (FAILED(hr)) { \
- onfailure; \
- ole_raise(hr, eWIN32OLERuntimeError, "fail to convert Unicode to CP%d", cWIN32OLE_cp); \
- } \
+ HRESULT hr = ole_ml_wc2mb_conv0(pw, pm, &size); \
+ if (FAILED(hr)) { \
+ onfailure; \
+ ole_raise(hr, eWIN32OLERuntimeError, "fail to convert Unicode to CP%d", cWIN32OLE_cp); \
+ } \
} while (0)
#endif
@@ -719,11 +720,11 @@ ole_wc2mb_alloc(LPWSTR pw, char *(alloc)(UINT size, void *arg), void *arg)
UINT size = 0;
if (conv_51932(cWIN32OLE_cp)) {
#ifndef pIMultiLanguage
- ole_ml_wc2mb_conv(pw, NULL, size, {});
- pm = alloc(size, arg);
- if (size) ole_ml_wc2mb_conv(pw, pm, size, xfree(pm));
- pm[size] = '\0';
- return pm;
+ ole_ml_wc2mb_conv(pw, NULL, size, {});
+ pm = alloc(size, arg);
+ if (size) ole_ml_wc2mb_conv(pw, pm, size, xfree(pm));
+ pm[size] = '\0';
+ return pm;
#endif
}
size = ole_wc2mb_conv(pw, NULL, 0);
@@ -815,8 +816,8 @@ ole_initialize(void)
HRESULT hr;
if(!g_uninitialize_hooked) {
- rb_add_event_hook(ole_uninitialize_hook, RUBY_EVENT_THREAD_END, Qnil);
- g_uninitialize_hooked = TRUE;
+ rb_add_event_hook(ole_uninitialize_hook, RUBY_EVENT_THREAD_END, Qnil);
+ g_uninitialize_hooked = TRUE;
}
if(g_ole_initialized == FALSE) {
@@ -910,21 +911,21 @@ ole_mb2wc(char *pm, int len, UINT cp)
if (conv_51932(cp)) {
#ifndef pIMultiLanguage
- DWORD dw = 0;
- UINT n = len;
- HRESULT hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
- &dw, cp, pm, &n, NULL, &size);
- if (FAILED(hr)) {
+ DWORD dw = 0;
+ UINT n = len;
+ HRESULT hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
+ &dw, cp, pm, &n, NULL, &size);
+ if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError, "fail to convert CP%d to Unicode", cp);
- }
- pw = SysAllocStringLen(NULL, size);
- n = len;
- hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
- &dw, cp, pm, &n, pw, &size);
- if (FAILED(hr)) {
+ }
+ pw = SysAllocStringLen(NULL, size);
+ n = len;
+ hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
+ &dw, cp, pm, &n, pw, &size);
+ if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError, "fail to convert CP%d to Unicode", cp);
- }
- return pw;
+ }
+ return pw;
#endif
}
size = MultiByteToWideChar(cp, 0, pm, len, NULL, 0);
@@ -994,7 +995,7 @@ ole_val2variant_ex(VALUE val, VARIANT *var, VARTYPE vt)
}
return;
}
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
switch(vt & ~VT_BYREF) {
case VT_I8:
V_VT(var) = VT_I8;
@@ -1008,7 +1009,7 @@ ole_val2variant_ex(VALUE val, VARIANT *var, VARTYPE vt)
ole_val2variant2(val, var);
break;
}
-#else /* (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__) */
+#else /* (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__) */
ole_val2variant2(val, var);
#endif
}
@@ -1062,7 +1063,7 @@ get_ptr_of_variant(VARIANT *pvar)
case VT_R8:
return &V_R8(pvar);
break;
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
case VT_I8:
return &V_I8(pvar);
break;
@@ -1549,10 +1550,10 @@ ole_variant2val(VARIANT *pvar)
obj = RB_INT2NUM((long)V_UINT(pvar));
break;
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
case VT_I8:
if(V_ISBYREF(pvar))
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
#ifdef V_I8REF
obj = I8_2_NUM(*V_I8REF(pvar));
#endif
@@ -1564,7 +1565,7 @@ ole_variant2val(VARIANT *pvar)
break;
case VT_UI8:
if(V_ISBYREF(pvar))
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
#ifdef V_UI8REF
obj = UI8_2_NUM(*V_UI8REF(pvar));
#endif
@@ -1574,7 +1575,7 @@ ole_variant2val(VARIANT *pvar)
else
obj = UI8_2_NUM(V_UI8(pvar));
break;
-#endif /* (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__) */
+#endif /* (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__) */
case VT_R4:
if(V_ISBYREF(pvar))
@@ -1736,11 +1737,11 @@ reg_get_val(HKEY hkey, const char *subkey)
if (err == ERROR_SUCCESS) {
pbuf[size] = '\0';
if (dwtype == REG_EXPAND_SZ) {
- char* pbuf2 = (char *)pbuf;
- DWORD len = ExpandEnvironmentStrings(pbuf2, NULL, 0);
- pbuf = ALLOC_N(char, len + 1);
- ExpandEnvironmentStrings(pbuf2, pbuf, len + 1);
- free(pbuf2);
+ char* pbuf2 = (char *)pbuf;
+ DWORD len = ExpandEnvironmentStrings(pbuf2, NULL, 0);
+ pbuf = ALLOC_N(char, len + 1);
+ ExpandEnvironmentStrings(pbuf2, pbuf, len + 1);
+ free(pbuf2);
}
val = rb_str_new2((char *)pbuf);
}
@@ -2521,12 +2522,12 @@ fole_initialize(int argc, VALUE *argv, VALUE self)
OLE_RELEASE(pIClassFactory2);
}
}
- pDispatch = p;
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
"failed to create WIN32OLE object from `%s'",
StringValuePtr(svr_name));
}
+ pDispatch = p;
ole_set_member(self, pDispatch);
return self;
@@ -2554,7 +2555,7 @@ hash2named_arg(VALUE key, VALUE val, VALUE pop)
rb_raise(rb_eTypeError, "wrong argument type (expected String or Symbol)");
}
if (RB_TYPE_P(key, T_SYMBOL)) {
- key = rb_sym2str(key);
+ key = rb_sym2str(key);
}
/* pNamedArgs[0] is <method name>, so "index + 1" */
@@ -2618,10 +2619,10 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
rb_scan_args(argc, argv, "1*", &cmd, &paramS);
if(!RB_TYPE_P(cmd, T_STRING) && !RB_TYPE_P(cmd, T_SYMBOL) && !is_bracket) {
- rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
+ rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
}
if (RB_TYPE_P(cmd, T_SYMBOL)) {
- cmd = rb_sym2str(cmd);
+ cmd = rb_sym2str(cmd);
}
pole = oledata_get_struct(self);
if(!pole->pDispatch) {
@@ -2630,7 +2631,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
if (is_bracket) {
DispID = DISPID_VALUE;
argc += 1;
- rb_ary_unshift(paramS, cmd);
+ rb_ary_unshift(paramS, cmd);
} else {
wcmdname = ole_vstr2wc(cmd);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
@@ -2651,7 +2652,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
/*------------------------------------------
hash object ==> named dispatch parameters
--------------------------------------------*/
- cNamedArgs = rb_long2int(RHASH_SIZE(param));
+ cNamedArgs = rb_long2int((long)RHASH_SIZE(param));
op.dp.cArgs = cNamedArgs + argc - 2;
op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs);
@@ -3638,7 +3639,7 @@ fole_respond_to(VALUE self, VALUE method)
pole = oledata_get_struct(self);
wcmdname = ole_vstr2wc(method);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
- &wcmdname, 1, cWIN32OLE_lcid, &DispID);
+ &wcmdname, 1, cWIN32OLE_lcid, &DispID);
SysFreeString(wcmdname);
return SUCCEEDED(hr) ? Qtrue : Qfalse;
}
@@ -3752,7 +3753,7 @@ ole_typedesc2val(ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails)
case VT_UI4:
typestr = rb_str_new2("UI4");
break;
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
case VT_I8:
typestr = rb_str_new2("I8");
break;
@@ -3962,6 +3963,7 @@ check_nano_server(void)
}
}
+LCID cWIN32OLE_lcid;
void
Init_win32ole(void)
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec
new file mode 100644
index 0000000000..b6ea8e8a55
--- /dev/null
+++ b/ext/win32ole/win32ole.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "win32ole"
+ spec.version = "1.8.9"
+ spec.authors = ["Masaki Suketa"]
+ spec.email = ["suke@ruby-lang.org"]
+
+ spec.summary = %q{Provides an interface for OLE Automation in Ruby}
+ spec.description = spec.summary
+ spec.homepage = "https://github.com/ruby/win32ole"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+end
diff --git a/ext/win32ole/win32ole.h b/ext/win32ole/win32ole.h
index c019930397..cd627ef765 100644
--- a/ext/win32ole/win32ole.h
+++ b/ext/win32ole/win32ole.h
@@ -112,8 +112,8 @@ struct oledata {
IDispatch *pDispatch;
};
-VALUE cWIN32OLE;
-LCID cWIN32OLE_lcid;
+extern VALUE cWIN32OLE;
+extern LCID cWIN32OLE_lcid;
struct oledata *oledata_get_struct(VALUE obj);
LPWSTR ole_vstr2wc(VALUE vstr);
diff --git a/ext/win32ole/win32ole_error.c b/ext/win32ole/win32ole_error.c
index 022527617e..2bb5156263 100644
--- a/ext/win32ole/win32ole_error.c
+++ b/ext/win32ole/win32ole_error.c
@@ -60,6 +60,9 @@ ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
rb_exc_raise(rb_exc_new_str(ecs, msg));
}
+VALUE eWIN32OLERuntimeError;
+VALUE eWIN32OLEQueryInterfaceError;
+
void
Init_win32ole_error(void)
{
diff --git a/ext/win32ole/win32ole_error.h b/ext/win32ole/win32ole_error.h
index 296eb101ad..a2f329856f 100644
--- a/ext/win32ole/win32ole_error.h
+++ b/ext/win32ole/win32ole_error.h
@@ -1,8 +1,8 @@
#ifndef WIN32OLE_ERROR_H
#define WIN32OLE_ERROR_H 1
-VALUE eWIN32OLERuntimeError;
-VALUE eWIN32OLEQueryInterfaceError;
+extern VALUE eWIN32OLERuntimeError;
+extern VALUE eWIN32OLEQueryInterfaceError;
NORETURN(PRINTF_ARGS(void ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...), 3, 4));
void Init_win32ole_error(void);
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 041639af6c..45ebf13433 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -200,7 +200,7 @@ STDMETHODIMP EVENTSINK_Invoke(
}
outargv = Qnil;
if (is_outarg == Qtrue) {
- outargv = rb_ary_new();
+ outargv = rb_ary_new();
rb_ary_push(args, outargv);
}
@@ -413,15 +413,15 @@ hash2ptr_dispparams(VALUE hash, ITypeInfo *pTypeInfo, DISPID dispid, DISPPARAMS
bstrs, pdispparams->cArgs + 1,
&len);
if (FAILED(hr))
- return;
+ return;
for (i = 0; i < len - 1; i++) {
- key = WC2VSTR(bstrs[i + 1]);
+ key = WC2VSTR(bstrs[i + 1]);
val = rb_hash_aref(hash, RB_UINT2NUM(i));
- if (val == Qnil)
- val = rb_hash_aref(hash, key);
- if (val == Qnil)
- val = rb_hash_aref(hash, rb_str_intern(key));
+ if (val == Qnil)
+ val = rb_hash_aref(hash, key);
+ if (val == Qnil)
+ val = rb_hash_aref(hash, rb_str_intern(key));
pvar = &pdispparams->rgvarg[pdispparams->cArgs-i-1];
ole_val2ptr_variant(val, pvar);
}
@@ -433,7 +433,7 @@ hash2result(VALUE hash)
VALUE ret = Qnil;
ret = rb_hash_aref(hash, rb_str_new2("return"));
if (ret == Qnil)
- ret = rb_hash_aref(hash, rb_str_intern(rb_str_new2("return")));
+ ret = rb_hash_aref(hash, rb_str_intern(rb_str_new2("return")));
return ret;
}
@@ -610,7 +610,7 @@ find_coclass(
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, NULL);
if (FAILED(hr)) {
- return hr;
+ return hr;
}
count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
for (i = 0; i < count && !found; i++) {
@@ -1264,7 +1264,8 @@ Init_win32ole_event(void)
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);
id_events = rb_intern("events");
- cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
+ cWIN32OLE_EVENT = rb_define_class_under(cWIN32OLE, "Event", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_EVENT", cWIN32OLE_EVENT);
rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);
rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index ffa9324657..646fdaf60c 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -437,7 +437,7 @@ ole_method_invoke_kind(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_MTHOD#invkind
+ * WIN32OLE_METHOD#invkind
*
* Returns the method invoke kind.
* tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
@@ -923,9 +923,12 @@ folemethod_inspect(VALUE self)
return default_inspect(self, "WIN32OLE_METHOD");
}
+VALUE cWIN32OLE_METHOD;
+
void Init_win32ole_method(void)
{
- cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
+ cWIN32OLE_METHOD = rb_define_class_under(cWIN32OLE, "Method", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_METHOD", cWIN32OLE_METHOD);
rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);
rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0);
diff --git a/ext/win32ole/win32ole_method.h b/ext/win32ole/win32ole_method.h
index ff2898ebeb..ef907d2fac 100644
--- a/ext/win32ole/win32ole_method.h
+++ b/ext/win32ole/win32ole_method.h
@@ -7,7 +7,7 @@ struct olemethoddata {
UINT index;
};
-VALUE cWIN32OLE_METHOD;
+extern VALUE cWIN32OLE_METHOD;
VALUE folemethod_s_allocate(VALUE klass);
VALUE ole_methods_from_typeinfo(ITypeInfo *pTypeInfo, int mask);
VALUE create_win32ole_method(ITypeInfo *pTypeInfo, VALUE name);
diff --git a/ext/win32ole/win32ole_param.c b/ext/win32ole/win32ole_param.c
index 52905b3e8e..b654aaa845 100644
--- a/ext/win32ole/win32ole_param.c
+++ b/ext/win32ole/win32ole_param.c
@@ -422,7 +422,8 @@ foleparam_inspect(VALUE self)
void
Init_win32ole_param(void)
{
- cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
+ cWIN32OLE_PARAM = rb_define_class_under(cWIN32OLE, "Param", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_PARAM", cWIN32OLE_PARAM);
rb_define_alloc_func(cWIN32OLE_PARAM, foleparam_s_allocate);
rb_define_method(cWIN32OLE_PARAM, "initialize", foleparam_initialize, 2);
rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
diff --git a/ext/win32ole/win32ole_record.c b/ext/win32ole/win32ole_record.c
index e8838832a7..9e18653db9 100644
--- a/ext/win32ole/win32ole_record.c
+++ b/ext/win32ole/win32ole_record.c
@@ -589,10 +589,13 @@ folerecord_inspect(VALUE self)
field);
}
+VALUE cWIN32OLE_RECORD;
+
void
Init_win32ole_record(void)
{
- cWIN32OLE_RECORD = rb_define_class("WIN32OLE_RECORD", rb_cObject);
+ cWIN32OLE_RECORD = rb_define_class_under(cWIN32OLE, "Record", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_RECORD", cWIN32OLE_RECORD);
rb_define_alloc_func(cWIN32OLE_RECORD, folerecord_s_allocate);
rb_define_method(cWIN32OLE_RECORD, "initialize", folerecord_initialize, 2);
rb_define_method(cWIN32OLE_RECORD, "to_h", folerecord_to_h, 0);
diff --git a/ext/win32ole/win32ole_record.h b/ext/win32ole/win32ole_record.h
index ea431e91f7..ab1df0ee7f 100644
--- a/ext/win32ole/win32ole_record.h
+++ b/ext/win32ole/win32ole_record.h
@@ -1,7 +1,7 @@
#ifndef WIN32OLE_RECORD_H
#define WIN32OLE_RECORD_H 1
-VALUE cWIN32OLE_RECORD;
+extern VALUE cWIN32OLE_RECORD;
void ole_rec2variant(VALUE rec, VARIANT *var);
void olerecord_set_ivar(VALUE obj, IRecordInfo *pri, void *prec);
VALUE create_win32ole_record(IRecordInfo *pri, void *prec);
diff --git a/ext/win32ole/win32ole_type.c b/ext/win32ole/win32ole_type.c
index e6ac402ecf..1b96aea858 100644
--- a/ext/win32ole/win32ole_type.c
+++ b/ext/win32ole/win32ole_type.c
@@ -56,7 +56,7 @@ static const rb_data_type_t oletype_datatype = {
/*
* Document-class: WIN32OLE_TYPE
*
- * <code>WIN32OLE_TYPE</code> objects represent OLE type libarary information.
+ * <code>WIN32OLE_TYPE</code> objects represent OLE type library information.
*/
static void
@@ -883,9 +883,12 @@ foletype_inspect(VALUE self)
return default_inspect(self, "WIN32OLE_TYPE");
}
+VALUE cWIN32OLE_TYPE;
+
void Init_win32ole_type(void)
{
- cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
+ cWIN32OLE_TYPE = rb_define_class_under(cWIN32OLE, "Type", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_TYPE", cWIN32OLE_TYPE);
rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
diff --git a/ext/win32ole/win32ole_type.h b/ext/win32ole/win32ole_type.h
index a26bf3e043..87b551e502 100644
--- a/ext/win32ole/win32ole_type.h
+++ b/ext/win32ole/win32ole_type.h
@@ -1,6 +1,6 @@
#ifndef WIN32OLE_TYPE_H
#define WIN32OLE_TYPE_H 1
-VALUE cWIN32OLE_TYPE;
+extern VALUE cWIN32OLE_TYPE;
VALUE create_win32ole_type(ITypeInfo *pTypeInfo, VALUE name);
ITypeInfo *itypeinfo(VALUE self);
VALUE ole_type_from_itypeinfo(ITypeInfo *pTypeInfo);
diff --git a/ext/win32ole/win32ole_typelib.c b/ext/win32ole/win32ole_typelib.c
index 35376c644b..fb68bebda8 100644
--- a/ext/win32ole/win32ole_typelib.c
+++ b/ext/win32ole/win32ole_typelib.c
@@ -285,7 +285,7 @@ oletypelib_get_libattr(ITypeLib *pTypeLib, TLIBATTR **ppTLibAttr)
hr = pTypeLib->lpVtbl->GetLibAttr(pTypeLib, ppTLibAttr);
if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
- "failed to get library attribute(TLIBATTR) from ITypeLib");
+ "failed to get library attribute(TLIBATTR) from ITypeLib");
}
}
@@ -588,13 +588,13 @@ foletypelib_path(VALUE self)
pTypeLib = itypelib(self);
oletypelib_get_libattr(pTypeLib, &pTLibAttr);
hr = QueryPathOfRegTypeLib(&pTLibAttr->guid,
- pTLibAttr->wMajorVerNum,
- pTLibAttr->wMinorVerNum,
- lcid,
- &bstr);
+ pTLibAttr->wMajorVerNum,
+ pTLibAttr->wMinorVerNum,
+ lcid,
+ &bstr);
if (FAILED(hr)) {
- pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
- ole_raise(hr, eWIN32OLERuntimeError, "failed to QueryPathOfRegTypeTypeLib");
+ pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
+ ole_raise(hr, eWIN32OLERuntimeError, "failed to QueryPathOfRegTypeTypeLib");
}
pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
@@ -722,7 +722,7 @@ typelib_file_from_typelib(VALUE ole)
if (ver == Qnil)
break;
err = reg_open_vkey(hclsid, ver, &hversion);
- if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
+ if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
continue;
fver = atof(StringValuePtr(ver));
typelib = reg_get_val(hversion, NULL);
@@ -822,10 +822,13 @@ foletypelib_inspect(VALUE self)
return default_inspect(self, "WIN32OLE_TYPELIB");
}
+VALUE cWIN32OLE_TYPELIB;
+
void
Init_win32ole_typelib(void)
{
- cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
+ cWIN32OLE_TYPELIB = rb_define_class_under(cWIN32OLE, "Typelib", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_TYPELIB", cWIN32OLE_TYPELIB);
rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);
rb_define_alloc_func(cWIN32OLE_TYPELIB, foletypelib_s_allocate);
rb_define_method(cWIN32OLE_TYPELIB, "initialize", foletypelib_initialize, -2);
diff --git a/ext/win32ole/win32ole_typelib.h b/ext/win32ole/win32ole_typelib.h
index 9fc117fcb4..2c2730bb58 100644
--- a/ext/win32ole/win32ole_typelib.h
+++ b/ext/win32ole/win32ole_typelib.h
@@ -1,7 +1,7 @@
#ifndef WIN32OLE_TYPELIB_H
#define WIN32OLE_TYPELIB_H 1
-VALUE cWIN32OLE_TYPELIB;
+extern VALUE cWIN32OLE_TYPELIB;
void Init_win32ole_typelib(void);
ITypeLib * itypelib(VALUE self);
diff --git a/ext/win32ole/win32ole_variable.c b/ext/win32ole/win32ole_variable.c
index 3dc9972ee7..e7f58c891e 100644
--- a/ext/win32ole/win32ole_variable.c
+++ b/ext/win32ole/win32ole_variable.c
@@ -365,9 +365,13 @@ folevariable_inspect(VALUE self)
return make_inspect("WIN32OLE_VARIABLE", detail);
}
+VALUE cWIN32OLE_VARIABLE;
+
void Init_win32ole_variable(void)
{
- cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
+ cWIN32OLE_VARIABLE = rb_define_class_under(cWIN32OLE, "Variable", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_VARIABLE", cWIN32OLE_VARIABLE);
+ rb_undef_alloc_func(cWIN32OLE_VARIABLE);
rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
diff --git a/ext/win32ole/win32ole_variable.h b/ext/win32ole/win32ole_variable.h
index 704dc13508..209613fd44 100644
--- a/ext/win32ole/win32ole_variable.h
+++ b/ext/win32ole/win32ole_variable.h
@@ -1,7 +1,7 @@
#ifndef WIN32OLE_VARIABLE_H
#define WIN32OLE_VARIABLE_H 1
-VALUE cWIN32OLE_VARIABLE;
+extern VALUE cWIN32OLE_VARIABLE;
VALUE create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name);
void Init_win32ole_variable(void);
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index 3ff8f4ffbf..f1d83ed2e1 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -94,7 +94,7 @@ ole_val2olevariantdata(VALUE val, VARTYPE vt, struct olevariantdata *pvar)
}
}
}
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
} else if ( (vt & ~VT_BYREF) == VT_I8 || (vt & ~VT_BYREF) == VT_UI8) {
ole_val2variant_ex(val, &(pvar->realvar), (vt & ~VT_BYREF));
ole_val2variant_ex(val, &(pvar->var), (vt & ~VT_BYREF));
@@ -202,7 +202,7 @@ ole_set_byref(VARIANT *realvar, VARIANT *var, VARTYPE vt)
V_R8REF(var) = &V_R8(realvar);
break;
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
#ifdef V_I8REF
case VT_I8:
V_I8REF(var) = &V_I8(realvar);
@@ -371,7 +371,7 @@ check_type_val2variant(VALUE val)
* Win32OLE converts Ruby object into OLE variant automatically when
* invoking OLE methods. If OLE method requires the argument which is
* different from the variant by automatic conversion of Win32OLE, you
- * can convert the specfied variant type by using WIN32OLE_VARIANT class.
+ * can convert the specified variant type by using WIN32OLE_VARIANT class.
*
* param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4)
* oleobj.method(param)
@@ -689,11 +689,14 @@ ole_variant2variant(VALUE val, VARIANT *var)
VariantCopy(var, &(pvar->var));
}
+VALUE cWIN32OLE_VARIANT;
+
void
Init_win32ole_variant(void)
{
#undef rb_intern
- cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
+ cWIN32OLE_VARIANT = rb_define_class_under(cWIN32OLE, "Variant", rb_cObject);
+ rb_define_const(rb_cObject, "WIN32OLE_VARIANT", cWIN32OLE_VARIANT);
rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
rb_define_singleton_method(cWIN32OLE_VARIANT, "array", folevariant_s_array, 2);
rb_define_method(cWIN32OLE_VARIANT, "initialize", folevariant_initialize, -2);
diff --git a/ext/win32ole/win32ole_variant.h b/ext/win32ole/win32ole_variant.h
index efe7ea8bef..4bd3b0aeea 100644
--- a/ext/win32ole/win32ole_variant.h
+++ b/ext/win32ole/win32ole_variant.h
@@ -1,7 +1,7 @@
#ifndef WIN32OLE_VARIANT_H
#define WIN32OLE_VARIANT_H 1
-VALUE cWIN32OLE_VARIANT;
+extern VALUE cWIN32OLE_VARIANT;
void ole_variant2variant(VALUE val, VARIANT *var);
void Init_win32ole_variant(void);
diff --git a/ext/win32ole/win32ole_variant_m.c b/ext/win32ole/win32ole_variant_m.c
index 4d76fdc790..c285a00177 100644
--- a/ext/win32ole/win32ole_variant_m.c
+++ b/ext/win32ole/win32ole_variant_m.c
@@ -1,5 +1,7 @@
#include "win32ole.h"
+VALUE mWIN32OLE_VARIANT;
+
void Init_win32ole_variant_m(void)
{
/*
@@ -114,7 +116,7 @@ void Init_win32ole_variant_m(void)
*/
rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", RB_INT2FIX(VT_UI4));
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__CYGWIN__) || defined(__MINGW32__)
/*
* represents VT_I8 type constant.
*/
diff --git a/ext/win32ole/win32ole_variant_m.h b/ext/win32ole/win32ole_variant_m.h
index afbef30218..6272a6578f 100644
--- a/ext/win32ole/win32ole_variant_m.h
+++ b/ext/win32ole/win32ole_variant_m.h
@@ -1,7 +1,7 @@
#ifndef WIN32OLE_VARIANT_M_H
#define WIN32OLE_VARIANT_M_H 1
-VALUE mWIN32OLE_VARIANT;
+extern VALUE mWIN32OLE_VARIANT;
void Init_win32ole_variant_m(void);
#endif
diff --git a/ext/zlib/depend b/ext/zlib/depend
index 5ab5684fb0..15186f8266 100644
--- a/ext/zlib/depend
+++ b/ext/zlib/depend
@@ -4,9 +4,166 @@ zlib.o: $(arch_hdrdir)/ruby/config.h
zlib.o: $(hdrdir)/ruby.h
zlib.o: $(hdrdir)/ruby/assert.h
zlib.o: $(hdrdir)/ruby/backward.h
+zlib.o: $(hdrdir)/ruby/backward/2/assume.h
+zlib.o: $(hdrdir)/ruby/backward/2/attributes.h
+zlib.o: $(hdrdir)/ruby/backward/2/bool.h
+zlib.o: $(hdrdir)/ruby/backward/2/inttypes.h
+zlib.o: $(hdrdir)/ruby/backward/2/limits.h
+zlib.o: $(hdrdir)/ruby/backward/2/long_long.h
+zlib.o: $(hdrdir)/ruby/backward/2/stdalign.h
+zlib.o: $(hdrdir)/ruby/backward/2/stdarg.h
zlib.o: $(hdrdir)/ruby/defines.h
zlib.o: $(hdrdir)/ruby/encoding.h
zlib.o: $(hdrdir)/ruby/intern.h
+zlib.o: $(hdrdir)/ruby/internal/abi.h
+zlib.o: $(hdrdir)/ruby/internal/anyargs.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/char.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/double.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/int.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/long.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/short.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
+zlib.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
+zlib.o: $(hdrdir)/ruby/internal/assume.h
+zlib.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
+zlib.o: $(hdrdir)/ruby/internal/attr/artificial.h
+zlib.o: $(hdrdir)/ruby/internal/attr/cold.h
+zlib.o: $(hdrdir)/ruby/internal/attr/const.h
+zlib.o: $(hdrdir)/ruby/internal/attr/constexpr.h
+zlib.o: $(hdrdir)/ruby/internal/attr/deprecated.h
+zlib.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
+zlib.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
+zlib.o: $(hdrdir)/ruby/internal/attr/error.h
+zlib.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
+zlib.o: $(hdrdir)/ruby/internal/attr/forceinline.h
+zlib.o: $(hdrdir)/ruby/internal/attr/format.h
+zlib.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
+zlib.o: $(hdrdir)/ruby/internal/attr/noalias.h
+zlib.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
+zlib.o: $(hdrdir)/ruby/internal/attr/noexcept.h
+zlib.o: $(hdrdir)/ruby/internal/attr/noinline.h
+zlib.o: $(hdrdir)/ruby/internal/attr/nonnull.h
+zlib.o: $(hdrdir)/ruby/internal/attr/noreturn.h
+zlib.o: $(hdrdir)/ruby/internal/attr/pure.h
+zlib.o: $(hdrdir)/ruby/internal/attr/restrict.h
+zlib.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
+zlib.o: $(hdrdir)/ruby/internal/attr/warning.h
+zlib.o: $(hdrdir)/ruby/internal/attr/weakref.h
+zlib.o: $(hdrdir)/ruby/internal/cast.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
+zlib.o: $(hdrdir)/ruby/internal/compiler_since.h
+zlib.o: $(hdrdir)/ruby/internal/config.h
+zlib.o: $(hdrdir)/ruby/internal/constant_p.h
+zlib.o: $(hdrdir)/ruby/internal/core.h
+zlib.o: $(hdrdir)/ruby/internal/core/rarray.h
+zlib.o: $(hdrdir)/ruby/internal/core/rbasic.h
+zlib.o: $(hdrdir)/ruby/internal/core/rbignum.h
+zlib.o: $(hdrdir)/ruby/internal/core/rclass.h
+zlib.o: $(hdrdir)/ruby/internal/core/rdata.h
+zlib.o: $(hdrdir)/ruby/internal/core/rfile.h
+zlib.o: $(hdrdir)/ruby/internal/core/rhash.h
+zlib.o: $(hdrdir)/ruby/internal/core/robject.h
+zlib.o: $(hdrdir)/ruby/internal/core/rregexp.h
+zlib.o: $(hdrdir)/ruby/internal/core/rstring.h
+zlib.o: $(hdrdir)/ruby/internal/core/rstruct.h
+zlib.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
+zlib.o: $(hdrdir)/ruby/internal/ctype.h
+zlib.o: $(hdrdir)/ruby/internal/dllexport.h
+zlib.o: $(hdrdir)/ruby/internal/dosish.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/coderange.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/ctype.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/encoding.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/pathname.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/re.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/sprintf.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/string.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/symbol.h
+zlib.o: $(hdrdir)/ruby/internal/encoding/transcode.h
+zlib.o: $(hdrdir)/ruby/internal/error.h
+zlib.o: $(hdrdir)/ruby/internal/eval.h
+zlib.o: $(hdrdir)/ruby/internal/event.h
+zlib.o: $(hdrdir)/ruby/internal/fl_type.h
+zlib.o: $(hdrdir)/ruby/internal/gc.h
+zlib.o: $(hdrdir)/ruby/internal/glob.h
+zlib.o: $(hdrdir)/ruby/internal/globals.h
+zlib.o: $(hdrdir)/ruby/internal/has/attribute.h
+zlib.o: $(hdrdir)/ruby/internal/has/builtin.h
+zlib.o: $(hdrdir)/ruby/internal/has/c_attribute.h
+zlib.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
+zlib.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
+zlib.o: $(hdrdir)/ruby/internal/has/extension.h
+zlib.o: $(hdrdir)/ruby/internal/has/feature.h
+zlib.o: $(hdrdir)/ruby/internal/has/warning.h
+zlib.o: $(hdrdir)/ruby/internal/intern/array.h
+zlib.o: $(hdrdir)/ruby/internal/intern/bignum.h
+zlib.o: $(hdrdir)/ruby/internal/intern/class.h
+zlib.o: $(hdrdir)/ruby/internal/intern/compar.h
+zlib.o: $(hdrdir)/ruby/internal/intern/complex.h
+zlib.o: $(hdrdir)/ruby/internal/intern/cont.h
+zlib.o: $(hdrdir)/ruby/internal/intern/dir.h
+zlib.o: $(hdrdir)/ruby/internal/intern/enum.h
+zlib.o: $(hdrdir)/ruby/internal/intern/enumerator.h
+zlib.o: $(hdrdir)/ruby/internal/intern/error.h
+zlib.o: $(hdrdir)/ruby/internal/intern/eval.h
+zlib.o: $(hdrdir)/ruby/internal/intern/file.h
+zlib.o: $(hdrdir)/ruby/internal/intern/gc.h
+zlib.o: $(hdrdir)/ruby/internal/intern/hash.h
+zlib.o: $(hdrdir)/ruby/internal/intern/io.h
+zlib.o: $(hdrdir)/ruby/internal/intern/load.h
+zlib.o: $(hdrdir)/ruby/internal/intern/marshal.h
+zlib.o: $(hdrdir)/ruby/internal/intern/numeric.h
+zlib.o: $(hdrdir)/ruby/internal/intern/object.h
+zlib.o: $(hdrdir)/ruby/internal/intern/parse.h
+zlib.o: $(hdrdir)/ruby/internal/intern/proc.h
+zlib.o: $(hdrdir)/ruby/internal/intern/process.h
+zlib.o: $(hdrdir)/ruby/internal/intern/random.h
+zlib.o: $(hdrdir)/ruby/internal/intern/range.h
+zlib.o: $(hdrdir)/ruby/internal/intern/rational.h
+zlib.o: $(hdrdir)/ruby/internal/intern/re.h
+zlib.o: $(hdrdir)/ruby/internal/intern/ruby.h
+zlib.o: $(hdrdir)/ruby/internal/intern/select.h
+zlib.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
+zlib.o: $(hdrdir)/ruby/internal/intern/signal.h
+zlib.o: $(hdrdir)/ruby/internal/intern/sprintf.h
+zlib.o: $(hdrdir)/ruby/internal/intern/string.h
+zlib.o: $(hdrdir)/ruby/internal/intern/struct.h
+zlib.o: $(hdrdir)/ruby/internal/intern/thread.h
+zlib.o: $(hdrdir)/ruby/internal/intern/time.h
+zlib.o: $(hdrdir)/ruby/internal/intern/variable.h
+zlib.o: $(hdrdir)/ruby/internal/intern/vm.h
+zlib.o: $(hdrdir)/ruby/internal/interpreter.h
+zlib.o: $(hdrdir)/ruby/internal/iterator.h
+zlib.o: $(hdrdir)/ruby/internal/memory.h
+zlib.o: $(hdrdir)/ruby/internal/method.h
+zlib.o: $(hdrdir)/ruby/internal/module.h
+zlib.o: $(hdrdir)/ruby/internal/newobj.h
+zlib.o: $(hdrdir)/ruby/internal/rgengc.h
+zlib.o: $(hdrdir)/ruby/internal/scan_args.h
+zlib.o: $(hdrdir)/ruby/internal/special_consts.h
+zlib.o: $(hdrdir)/ruby/internal/static_assert.h
+zlib.o: $(hdrdir)/ruby/internal/stdalign.h
+zlib.o: $(hdrdir)/ruby/internal/stdbool.h
+zlib.o: $(hdrdir)/ruby/internal/symbol.h
+zlib.o: $(hdrdir)/ruby/internal/value.h
+zlib.o: $(hdrdir)/ruby/internal/value_type.h
+zlib.o: $(hdrdir)/ruby/internal/variable.h
+zlib.o: $(hdrdir)/ruby/internal/warning_push.h
+zlib.o: $(hdrdir)/ruby/internal/xmalloc.h
zlib.o: $(hdrdir)/ruby/io.h
zlib.o: $(hdrdir)/ruby/missing.h
zlib.o: $(hdrdir)/ruby/onigmo.h
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index fd2f168522..5477f49178 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -10,11 +10,12 @@ require 'rbconfig'
dir_config 'zlib'
-
+libs = $libs
if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
have_header('zlib.h') then
have_zlib = true
else
+ $libs = libs
unless File.directory?(zsrc = "#{$srcdir}/zlib")
dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
dirs.delete_if {|x| !File.directory?(x)}
@@ -31,9 +32,12 @@ else
$extso << dll
$cleanfiles << "$(topdir)/#{dll}" << "$(ZIMPLIB)"
zmk = "\t$(MAKE) -f $(ZMKFILE) TOP=$(ZSRC)"
+ zopts = []
if $nmake
zmkfile = "$(ZSRC)/win32/Makefile.msc"
m = "#{zsrc}/win32/Makefile.msc"
+ # zopts << "USE_ASM=1"
+ zopts << "ARCH=#{RbConfig::CONFIG['target_cpu']}"
else
zmkfile = "$(ZSRC)/win32/Makefile.gcc"
m = "#{zsrc}/win32/Makefile.gcc"
@@ -43,7 +47,7 @@ else
end
m = File.read(m)
zimplib = m[/^IMPLIB[ \t]*=[ \t]*(\S+)/, 1]
- $LOCAL_LIBS << " " << zimplib
+ ($LOCAL_LIBS << " ./" << zimplib).strip!
unless $nmake or /^TOP[ \t]/ =~ m
m.gsub!(/win32\/zlib\.def/, '$(TOP)/\&')
m.gsub!(/^(\t.*[ \t])(\S+\.rc)/, '\1-I$(<D) $<')
@@ -55,10 +59,11 @@ else
addconf.push(
"ZMKFILE = #{zmkfile}\n",
"ZIMPLIB = #{zimplib}\n",
+ "ZOPTS = #{zopts.join(' ')}\n",
"$(TARGET_SO): $(ZIMPLIB)\n",
"$(ZIMPLIB):\n",
- "#{zmk} $@\n",
- "install-so: $(topdir)/#{dll}",
+ "#{zmk} $(ZOPTS) $@\n",
+ "install-so static: $(topdir)/#{dll}",
"$(topdir)/#{dll}: $(ZIMPLIB)\n",
"\t$(Q) $(COPY) #{dll} $(@D)\n",
"clean: clean-zsrc\n",
@@ -116,10 +121,12 @@ if have_zlib
$defs << "-DHAVE_CRC32_COMBINE"
$defs << "-DHAVE_ADLER32_COMBINE"
$defs << "-DHAVE_TYPE_Z_CRC_T"
+ $defs << "-DHAVE_TYPE_Z_SIZE_T"
else
have_func('crc32_combine', 'zlib.h')
have_func('adler32_combine', 'zlib.h')
have_type('z_crc_t', 'zlib.h')
+ have_type('z_size_t', 'zlib.h')
end
create_makefile('zlib') {|conf|
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 5c8aab24af..aefdba0ebd 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -25,7 +25,7 @@
# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
#endif
-#define RUBY_ZLIB_VERSION "1.1.0"
+#define RUBY_ZLIB_VERSION "3.0.0"
#ifndef RB_PASS_CALLED_KEYWORDS
# define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
@@ -44,6 +44,14 @@
#endif
#endif
+#if defined(HAVE_TYPE_Z_SIZE_T)
+typedef uLong (*checksum_func)(uLong, const Bytef*, z_size_t);
+# define crc32 crc32_z
+# define adler32 adler32_z
+#else
+typedef uLong (*checksum_func)(uLong, const Bytef*, uInt);
+#endif
+
#if SIZEOF_LONG > SIZEOF_INT
static inline uInt
max_uint(long n)
@@ -56,13 +64,16 @@ max_uint(long n)
#define MAX_UINT(n) (uInt)(n)
#endif
-static ID id_dictionaries;
+#define OPTHASH_GIVEN_P(opts) \
+ (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
+
+static ID id_dictionaries, id_read, id_buffer;
/*--------- Prototypes --------*/
static NORETURN(void raise_zlib_error(int, const char*));
static VALUE rb_zlib_version(VALUE);
-static VALUE do_checksum(int, VALUE*, uLong (*)(uLong, const Bytef*, uInt));
+static VALUE do_checksum(int, VALUE*, checksum_func);
static VALUE rb_zlib_adler32(int, VALUE*, VALUE);
static VALUE rb_zlib_crc32(int, VALUE*, VALUE);
static VALUE rb_zlib_crc_table(VALUE);
@@ -130,7 +141,7 @@ static VALUE rb_inflate_s_allocate(VALUE);
static VALUE rb_inflate_initialize(int, VALUE*, VALUE);
static VALUE rb_inflate_s_inflate(VALUE, VALUE);
static void do_inflate(struct zstream*, VALUE);
-static VALUE rb_inflate_inflate(VALUE, VALUE);
+static VALUE rb_inflate_inflate(int, VALUE*, VALUE);
static VALUE rb_inflate_addstr(VALUE, VALUE);
static VALUE rb_inflate_sync(VALUE, VALUE);
static VALUE rb_inflate_sync_point_p(VALUE);
@@ -285,6 +296,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
* (if you have GZIP_SUPPORT)
* - Zlib::GzipReader
@@ -301,7 +313,7 @@ void Init_zlib(void);
/*--------- Exceptions --------*/
static VALUE cZError, cStreamEnd, cNeedDict;
-static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
+static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError, cInProgressError;
static void
raise_zlib_error(int err, const char *msg)
@@ -351,7 +363,9 @@ raise_zlib_error(int err, const char *msg)
static void
finalizer_warn(const char *msg)
{
+#if 0
fprintf(stderr, "zlib(finalizer): %s\n", msg);
+#endif
}
@@ -368,26 +382,32 @@ rb_zlib_version(VALUE klass)
return rb_str_new2(zlibVersion());
}
-#if SIZEOF_LONG > SIZEOF_INT
+#if SIZEOF_LONG * CHAR_BIT > 32
+# define mask32(x) ((x) & 0xffffffff)
+#else
+# define mask32(x) (x)
+#endif
+
+#if SIZEOF_LONG > SIZEOF_INT && !defined(HAVE_TYPE_Z_SIZE_T)
static uLong
checksum_long(uLong (*func)(uLong, const Bytef*, uInt), uLong sum, const Bytef *ptr, long len)
{
if (len > UINT_MAX) {
do {
- sum = func(sum, ptr, UINT_MAX);
+ sum = func(mask32(sum), ptr, UINT_MAX);
ptr += UINT_MAX;
len -= UINT_MAX;
} while (len >= UINT_MAX);
}
- if (len > 0) sum = func(sum, ptr, (uInt)len);
+ if (len > 0) sum = func(mask32(sum), ptr, (uInt)len);
return sum;
}
#else
-#define checksum_long(func, sum, ptr, len) (func)((sum), (ptr), (len))
+#define checksum_long(func, sum, ptr, len) (func)(mask32(sum), (ptr), (len))
#endif
static VALUE
-do_checksum(int argc, VALUE *argv, uLong (*func)(uLong, const Bytef*, uInt))
+do_checksum(int argc, VALUE *argv, checksum_func func)
{
VALUE str, vsum;
unsigned long sum;
@@ -405,7 +425,16 @@ do_checksum(int argc, VALUE *argv, uLong (*func)(uLong, const Bytef*, uInt))
}
if (NIL_P(str)) {
- sum = func(sum, Z_NULL, 0);
+ sum = func(mask32(sum), Z_NULL, 0);
+ }
+ else if (rb_obj_is_kind_of(str, rb_cIO)) {
+ VALUE buf;
+ VALUE buflen = INT2NUM(8192);
+
+ while (!NIL_P(buf = rb_funcall(str, id_read, 1, buflen))) {
+ StringValue(buf);
+ sum = checksum_long(func, sum, (Bytef*)RSTRING_PTR(buf), RSTRING_LEN(buf));
+ }
}
else {
StringValue(str);
@@ -422,6 +451,8 @@ do_checksum(int argc, VALUE *argv, uLong (*func)(uLong, const Bytef*, uInt))
* Calculates Adler-32 checksum for +string+, and returns updated value of
* +adler+. If +string+ is omitted, it returns the Adler-32 initial value. If
* +adler+ is omitted, it assumes that the initial value is given to +adler+.
+ * If +string+ is an IO instance, reads from the IO until the IO returns nil
+ * and returns Adler-32 of all read data.
*
* Example usage:
*
@@ -444,7 +475,7 @@ rb_zlib_adler32(int argc, VALUE *argv, VALUE klass)
*
* call-seq: Zlib.adler32_combine(adler1, adler2, len2)
*
- * Combine two Adler-32 check values in to one. +alder1+ is the first Adler-32
+ * Combine two Adler-32 check values in to one. +adler1+ is the first Adler-32
* value, +adler2+ is the second Adler-32 value. +len2+ is the length of the
* string used to generate +adler2+.
*
@@ -466,7 +497,9 @@ rb_zlib_adler32_combine(VALUE klass, VALUE adler1, VALUE adler2, VALUE len2)
*
* Calculates CRC checksum for +string+, and returns updated value of +crc+. If
* +string+ is omitted, it returns the CRC initial value. If +crc+ is omitted, it
- * assumes that the initial value is given to +crc+.
+ * assumes that the initial value is given to +crc+. If +string+ is an IO instance,
+ * reads from the IO until the IO returns nil and returns CRC checksum of all read
+ * data.
*
* FIXME: expression.
*/
@@ -530,6 +563,7 @@ struct zstream {
unsigned long flags;
VALUE buf;
VALUE input;
+ VALUE mutex;
z_stream stream;
const struct zstream_funcs {
int (*reset)(z_streamp);
@@ -538,13 +572,15 @@ struct zstream {
} *func;
};
-#define ZSTREAM_FLAG_READY 0x1
-#define ZSTREAM_FLAG_IN_STREAM 0x2
-#define ZSTREAM_FLAG_FINISHED 0x4
-#define ZSTREAM_FLAG_CLOSING 0x8
-#define ZSTREAM_FLAG_GZFILE 0x10 /* disallows yield from expand_buffer for
+#define ZSTREAM_FLAG_READY (1 << 0)
+#define ZSTREAM_FLAG_IN_STREAM (1 << 1)
+#define ZSTREAM_FLAG_FINISHED (1 << 2)
+#define ZSTREAM_FLAG_CLOSING (1 << 3)
+#define ZSTREAM_FLAG_GZFILE (1 << 4) /* disallows yield from expand_buffer for
gzip*/
-#define ZSTREAM_FLAG_UNUSED 0x20
+#define ZSTREAM_REUSE_BUFFER (1 << 5)
+#define ZSTREAM_IN_PROGRESS (1 << 6)
+#define ZSTREAM_FLAG_UNUSED (1 << 7)
#define ZSTREAM_READY(z) ((z)->flags |= ZSTREAM_FLAG_READY)
#define ZSTREAM_IS_READY(z) ((z)->flags & ZSTREAM_FLAG_READY)
@@ -553,6 +589,8 @@ struct zstream {
#define ZSTREAM_IS_GZFILE(z) ((z)->flags & ZSTREAM_FLAG_GZFILE)
#define ZSTREAM_BUF_FILLED(z) (NIL_P((z)->buf) ? 0 : RSTRING_LEN((z)->buf))
+#define ZSTREAM_REUSE_BUFFER_P(z) ((z)->flags & ZSTREAM_REUSE_BUFFER)
+
#define ZSTREAM_EXPAND_BUFFER_OK 0
/* I think that more better value should be found,
@@ -571,7 +609,9 @@ static const struct zstream_funcs inflate_funcs = {
};
struct zstream_run_args {
- struct zstream * z;
+ struct zstream *const z;
+ Bytef *src;
+ long len;
int flush; /* stream flush value for inflate() or deflate() */
int interrupt; /* stop processing the stream and return to ruby */
int jump_state; /* for buffer expansion block break or exception */
@@ -602,6 +642,7 @@ zstream_init(struct zstream *z, const struct zstream_funcs *func)
z->flags = 0;
z->buf = Qnil;
z->input = Qnil;
+ z->mutex = rb_mutex_new();
z->stream.zalloc = zlib_mem_alloc;
z->stream.zfree = zlib_mem_free;
z->stream.opaque = Z_NULL;
@@ -629,11 +670,21 @@ zstream_expand_buffer(struct zstream *z)
if (buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
int state = 0;
- rb_obj_reveal(z->buf, rb_cString);
+ if (!ZSTREAM_REUSE_BUFFER_P(z)) {
+ rb_obj_reveal(z->buf, rb_cString);
+ }
+ rb_mutex_unlock(z->mutex);
rb_protect(rb_yield, z->buf, &state);
-
- z->buf = Qnil;
+ rb_mutex_lock(z->mutex);
+
+ if (ZSTREAM_REUSE_BUFFER_P(z)) {
+ rb_str_modify(z->buf);
+ rb_str_set_len(z->buf, 0);
+ }
+ else {
+ z->buf = Qnil;
+ }
zstream_expand_buffer_into(z, ZSTREAM_AVAIL_OUT_STEP_MAX);
if (state)
@@ -751,7 +802,9 @@ zstream_detach_buffer(struct zstream *z)
}
else {
dst = z->buf;
- rb_obj_reveal(dst, rb_cString);
+ if (!ZSTREAM_REUSE_BUFFER_P(z)) {
+ rb_obj_reveal(dst, rb_cString);
+ }
}
z->buf = Qnil;
@@ -859,7 +912,6 @@ zstream_discard_input(struct zstream *z, long len)
}
rb_str_resize(z->input, newlen);
if (newlen == 0) {
- rb_gc_force_recycle(z->input);
z->input = Qnil;
}
else {
@@ -1024,19 +1076,18 @@ zstream_unblock_func(void *ptr)
args->interrupt = 1;
}
-static void
-zstream_run(struct zstream *z, Bytef *src, long len, int flush)
+static VALUE
+zstream_run_try(VALUE value_arg)
{
- struct zstream_run_args args;
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+ struct zstream *z = args->z;
+ Bytef *src = args->src;
+ long len = args->len;
+ int flush = args->flush;
+
int err;
VALUE old_input = Qnil;
- args.z = z;
- args.flush = flush;
- args.interrupt = 0;
- args.jump_state = 0;
- args.stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p();
-
if (NIL_P(z->input) && len == 0) {
z->stream.next_in = (Bytef*)"";
z->stream.avail_in = 0;
@@ -1058,14 +1109,20 @@ zstream_run(struct zstream *z, Bytef *src, long len, int flush)
loop:
#ifndef RB_NOGVL_UBF_ASYNC_SAFE
- err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args);
+ err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args);
#else
- err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args,
+ err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args,
RB_NOGVL_UBF_ASYNC_SAFE);
#endif
+ /* retry if no exception is thrown */
+ if (err == Z_OK && args->interrupt) {
+ args->interrupt = 0;
+ goto loop;
+ }
+
if (flush != Z_FINISH && err == Z_BUF_ERROR
&& z->stream.avail_out > 0) {
z->flags |= ZSTREAM_FLAG_IN_STREAM;
@@ -1096,11 +1153,54 @@ loop:
}
if (!NIL_P(old_input)) {
rb_str_resize(old_input, 0);
- rb_gc_force_recycle(old_input);
}
- if (args.jump_state)
- rb_jump_tag(args.jump_state);
+ if (args->jump_state)
+ rb_jump_tag(args->jump_state);
+
+ return Qnil;
+}
+
+static VALUE
+zstream_run_ensure(VALUE value_arg)
+{
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Remove ZSTREAM_IN_PROGRESS flag to signal that this zstream is not in use. */
+ args->z->flags &= ~ZSTREAM_IN_PROGRESS;
+
+ return Qnil;
+}
+
+static VALUE
+zstream_run_synchronized(VALUE value_arg)
+{
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Cannot start zstream while it is in progress. */
+ if (args->z->flags & ZSTREAM_IN_PROGRESS) {
+ rb_raise(cInProgressError, "zlib stream is in progress");
+ }
+ args->z->flags |= ZSTREAM_IN_PROGRESS;
+
+ rb_ensure(zstream_run_try, value_arg, zstream_run_ensure, value_arg);
+
+ return Qnil;
+}
+
+static void
+zstream_run(struct zstream *z, Bytef *src, long len, int flush)
+{
+ struct zstream_run_args args = {
+ .z = z,
+ .src = src,
+ .len = len,
+ .flush = flush,
+ .interrupt = 0,
+ .jump_state = 0,
+ .stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p(),
+ };
+ rb_mutex_synchronize(z->mutex, zstream_run_synchronized, (VALUE)&args);
}
static VALUE
@@ -1148,6 +1248,7 @@ zstream_mark(void *p)
struct zstream *z = p;
rb_gc_mark(z->buf);
rb_gc_mark(z->input);
+ rb_gc_mark(z->mutex);
}
static void
@@ -2000,8 +2101,8 @@ rb_inflate_add_dictionary(VALUE obj, VALUE dictionary)
* Document-method: Zlib::Inflate#inflate
*
* call-seq:
- * inflate(deflate_string) -> String
- * inflate(deflate_string) { |chunk| ... } -> nil
+ * inflate(deflate_string, buffer: nil) -> String
+ * inflate(deflate_string, buffer: nil) { |chunk| ... } -> nil
*
* Inputs +deflate_string+ into the inflate stream and returns the output from
* the stream. Calling this method, both the input and the output buffer of
@@ -2011,6 +2112,15 @@ rb_inflate_add_dictionary(VALUE obj, VALUE dictionary)
* If a block is given consecutive inflated chunks from the +deflate_string+
* are yielded to the block and +nil+ is returned.
*
+ * If a :buffer keyword argument is given and not nil:
+ *
+ * * The :buffer keyword should be a String, and will used as the output buffer.
+ * Using this option can reuse the memory required during inflation.
+ * * When not passing a block, the return value will be the same object as the
+ * :buffer keyword argument.
+ * * When passing a block, the yielded chunks will be the same value as the
+ * :buffer keyword argument.
+ *
* Raises a Zlib::NeedDict exception if a preset dictionary is needed to
* decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then
* call this method again with an empty string to flush the stream:
@@ -2034,10 +2144,37 @@ rb_inflate_add_dictionary(VALUE obj, VALUE dictionary)
* See also Zlib::Inflate.new
*/
static VALUE
-rb_inflate_inflate(VALUE obj, VALUE src)
+rb_inflate_inflate(int argc, VALUE* argv, VALUE obj)
{
struct zstream *z = get_zstream(obj);
- VALUE dst;
+ VALUE dst, src, opts, buffer = Qnil;
+
+ if (OPTHASH_GIVEN_P(opts)) {
+ VALUE buf;
+ rb_get_kwargs(opts, &id_buffer, 0, 1, &buf);
+ if (buf != Qundef && buf != Qnil) {
+ buffer = StringValue(buf);
+ }
+ }
+ if (buffer != Qnil) {
+ if (!(ZSTREAM_REUSE_BUFFER_P(z) && z->buf == buffer)) {
+ long len = RSTRING_LEN(buffer);
+ if (len >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
+ rb_str_modify(buffer);
+ }
+ else {
+ len = ZSTREAM_AVAIL_OUT_STEP_MAX - len;
+ rb_str_modify_expand(buffer, len);
+ }
+ rb_str_set_len(buffer, 0);
+ z->flags |= ZSTREAM_REUSE_BUFFER;
+ z->buf = buffer;
+ }
+ } else if (ZSTREAM_REUSE_BUFFER_P(z)) {
+ z->flags &= ~ZSTREAM_REUSE_BUFFER;
+ z->buf = Qnil;
+ }
+ rb_scan_args(argc, argv, "10", &src);
if (ZSTREAM_IS_FINISHED(z)) {
if (NIL_P(src)) {
@@ -2046,7 +2183,11 @@ rb_inflate_inflate(VALUE obj, VALUE src)
else {
StringValue(src);
zstream_append_buffer2(z, src);
- dst = rb_str_new(0, 0);
+ if (ZSTREAM_REUSE_BUFFER_P(z)) {
+ dst = rb_str_resize(buffer, 0);
+ } else {
+ dst = rb_str_new(0, 0);
+ }
}
}
else {
@@ -2198,7 +2339,7 @@ rb_inflate_set_dictionary(VALUE obj, VALUE dic)
#define OS_CODE OS_UNIX
#endif
-static ID id_write, id_read, id_readpartial, id_flush, id_seek, id_close, id_path, id_input;
+static ID id_write, id_readpartial, id_flush, id_seek, id_close, id_path, id_input;
static VALUE cGzError, cNoFooter, cCRCError, cLengthError;
@@ -2798,8 +2939,6 @@ gzfile_readpartial(struct gzfile *gz, long len, VALUE outbuf)
if (!NIL_P(outbuf)) {
rb_str_resize(outbuf, RSTRING_LEN(dst));
memcpy(RSTRING_PTR(outbuf), RSTRING_PTR(dst), RSTRING_LEN(dst));
- rb_str_resize(dst, 0);
- rb_gc_force_recycle(dst);
dst = outbuf;
}
return dst;
@@ -3445,6 +3584,16 @@ rb_gzfile_path(VALUE obj)
return gz->path;
}
+static VALUE
+gzfile_initialize_path_partial(VALUE obj)
+{
+ struct gzfile* gz;
+ TypedData_Get_Struct(obj, struct gzfile, &gzfile_data_type, gz);
+ gz->path = rb_funcall(gz->io, id_path, 0);
+ rb_define_singleton_method(obj, "path", rb_gzfile_path, 0);
+ return Qnil;
+}
+
static void
rb_gzfile_ecopts(struct gzfile *gz, VALUE opts)
{
@@ -3553,8 +3702,8 @@ rb_gzwriter_initialize(int argc, VALUE *argv, VALUE obj)
rb_gzfile_ecopts(gz, opt);
if (rb_respond_to(io, id_path)) {
- gz->path = rb_funcall(gz->io, id_path, 0);
- rb_define_singleton_method(obj, "path", rb_gzfile_path, 0);
+ /* File#path may raise IOError in case when a path is unavailable */
+ rb_rescue2(gzfile_initialize_path_partial, obj, NULL, Qnil, rb_eIOError, (VALUE)0);
}
return obj;
@@ -3724,6 +3873,60 @@ rb_gzreader_s_open(int argc, VALUE *argv, VALUE klass)
}
/*
+ * Document-method: Zlib::GzipReader.zcat
+ *
+ * call-seq:
+ * Zlib::GzipReader.zcat(io, options = {}, &block) => nil
+ * Zlib::GzipReader.zcat(io, options = {}) => string
+ *
+ * Decompresses all gzip data in the +io+, handling multiple gzip
+ * streams until the end of the +io+. There should not be any non-gzip
+ * data after the gzip streams.
+ *
+ * If a block is given, it is yielded strings of uncompressed data,
+ * and the method returns +nil+.
+ * If a block is not given, the method returns the concatenation of
+ * all uncompressed data in all gzip streams.
+ */
+static VALUE
+rb_gzreader_s_zcat(int argc, VALUE *argv, VALUE klass)
+{
+ VALUE io, unused, obj, buf=0, tmpbuf;
+ long pos;
+
+ rb_check_arity(argc, 1, 2);
+ io = argv[0];
+
+ do {
+ obj = rb_funcallv(klass, rb_intern("new"), argc, argv);
+ if (rb_block_given_p()) {
+ rb_gzreader_each(0, 0, obj);
+ }
+ else {
+ if (!buf) {
+ buf = rb_str_new(0, 0);
+ }
+ tmpbuf = gzfile_read_all(get_gzfile(obj));
+ rb_str_cat(buf, RSTRING_PTR(tmpbuf), RSTRING_LEN(tmpbuf));
+ }
+
+ rb_gzreader_read(0, 0, obj);
+ pos = NUM2LONG(rb_funcall(io, rb_intern("pos"), 0));
+ unused = rb_gzreader_unused(obj);
+ rb_gzfile_finish(obj);
+ if (!NIL_P(unused)) {
+ pos -= NUM2LONG(rb_funcall(unused, rb_intern("length"), 0));
+ rb_funcall(io, rb_intern("pos="), 1, LONG2NUM(pos));
+ }
+ } while (pos < NUM2LONG(rb_funcall(io, rb_intern("size"), 0)));
+
+ if (rb_block_given_p()) {
+ return Qnil;
+ }
+ return buf;
+}
+
+/*
* Document-method: Zlib::GzipReader.new
*
* call-seq:
@@ -3761,8 +3964,8 @@ rb_gzreader_initialize(int argc, VALUE *argv, VALUE obj)
rb_gzfile_ecopts(gz, opt);
if (rb_respond_to(io, id_path)) {
- gz->path = rb_funcall(gz->io, id_path, 0);
- rb_define_singleton_method(obj, "path", rb_gzfile_path, 0);
+ /* File#path may raise IOError in case when a path is unavailable */
+ rb_rescue2(gzfile_initialize_path_partial, obj, NULL, Qnil, rb_eIOError, (VALUE)0);
}
return obj;
@@ -3950,20 +4153,6 @@ rb_gzreader_each_byte(VALUE obj)
}
/*
- * Document-method: Zlib::GzipReader#bytes
- *
- * This is a deprecated alias for <code>each_byte</code>.
- */
-static VALUE
-rb_gzreader_bytes(VALUE obj)
-{
- rb_warn("Zlib::GzipReader#bytes is deprecated; use #each_byte instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(obj, ID2SYM(rb_intern("each_byte")), 0, 0);
- return rb_gzreader_each_byte(obj);
-}
-
-/*
* Document-method: Zlib::GzipReader#ungetc
*
* See Zlib::GzipReader documentation for a description.
@@ -4041,17 +4230,17 @@ gzreader_charboundary(struct gzfile *gz, long n)
{
char *s = RSTRING_PTR(gz->z.buf);
char *e = s + ZSTREAM_BUF_FILLED(&gz->z);
- char *p = rb_enc_left_char_head(s, s + n, e, gz->enc);
+ char *p = rb_enc_left_char_head(s, s + n - 1, e, gz->enc);
long l = p - s;
if (l < n) {
- n = rb_enc_precise_mbclen(p, e, gz->enc);
- if (MBCLEN_NEEDMORE_P(n)) {
- if ((l = gzfile_fill(gz, l + MBCLEN_NEEDMORE_LEN(n))) > 0) {
+ int n_bytes = rb_enc_precise_mbclen(p, e, gz->enc);
+ if (MBCLEN_NEEDMORE_P(n_bytes)) {
+ if ((l = gzfile_fill(gz, n + MBCLEN_NEEDMORE_LEN(n_bytes))) > 0) {
return l;
}
}
- else if (MBCLEN_CHARFOUND_P(n)) {
- return l + MBCLEN_CHARFOUND_LEN(n);
+ else if (MBCLEN_CHARFOUND_P(n_bytes)) {
+ return l + MBCLEN_CHARFOUND_LEN(n_bytes);
}
}
return n;
@@ -4189,6 +4378,8 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj)
* Document-method: Zlib::GzipReader#gets
*
* See Zlib::GzipReader documentation for a description.
+ * However, note that this method can return +nil+ even if
+ * #eof? returns false, unlike the behavior of File#gets.
*/
static VALUE
rb_gzreader_gets(int argc, VALUE *argv, VALUE obj)
@@ -4236,20 +4427,6 @@ rb_gzreader_each(int argc, VALUE *argv, VALUE obj)
}
/*
- * Document-method: Zlib::GzipReader#lines
- *
- * This is a deprecated alias for <code>each_line</code>.
- */
-static VALUE
-rb_gzreader_lines(int argc, VALUE *argv, VALUE obj)
-{
- rb_warn("Zlib::GzipReader#lines is deprecated; use #each_line instead");
- if (!rb_block_given_p())
- return rb_enumeratorize(obj, ID2SYM(rb_intern("each_line")), argc, argv);
- return rb_gzreader_each(argc, argv, obj);
-}
-
-/*
* Document-method: Zlib::GzipReader#readlines
*
* See Zlib::GzipReader documentation for a description.
@@ -4299,8 +4476,6 @@ zlib_gzip_end(struct gzfile *gz)
zstream_end(&gz->z);
}
-#define OPTHASH_GIVEN_P(opts) \
- (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
static ID id_level, id_strategy;
static VALUE zlib_gzip_run(VALUE arg);
@@ -4453,6 +4628,10 @@ zlib_gunzip_run(VALUE arg)
void
Init_zlib(void)
{
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+ rb_ext_ractor_safe(true);
+#endif
+
#undef rb_intern
VALUE mZlib, cZStream, cDeflate, cInflate;
#if GZIP_SUPPORT
@@ -4471,6 +4650,7 @@ Init_zlib(void)
cMemError = rb_define_class_under(mZlib, "MemError", cZError);
cBufError = rb_define_class_under(mZlib, "BufError", cZError);
cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);
+ cInProgressError = rb_define_class_under(mZlib, "InProgressError", cZError);
rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
@@ -4547,7 +4727,7 @@ Init_zlib(void)
rb_define_alloc_func(cInflate, rb_inflate_s_allocate);
rb_define_method(cInflate, "initialize", rb_inflate_initialize, -1);
rb_define_method(cInflate, "add_dictionary", rb_inflate_add_dictionary, 1);
- rb_define_method(cInflate, "inflate", rb_inflate_inflate, 1);
+ rb_define_method(cInflate, "inflate", rb_inflate_inflate, -1);
rb_define_method(cInflate, "<<", rb_inflate_addstr, 1);
rb_define_method(cInflate, "sync", rb_inflate_sync, 1);
rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);
@@ -4696,6 +4876,7 @@ Init_zlib(void)
rb_define_method(cGzipWriter, "puts", rb_gzwriter_puts, -1);
rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);
+ rb_define_singleton_method(cGzipReader, "zcat", rb_gzreader_s_zcat, -1);
rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);
rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, -1);
rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);
@@ -4708,14 +4889,12 @@ Init_zlib(void)
rb_define_method(cGzipReader, "readbyte", rb_gzreader_readbyte, 0);
rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);
rb_define_method(cGzipReader, "each_char", rb_gzreader_each_char, 0);
- rb_define_method(cGzipReader, "bytes", rb_gzreader_bytes, 0);
rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);
rb_define_method(cGzipReader, "ungetbyte", rb_gzreader_ungetbyte, 1);
rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);
rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);
rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);
- rb_define_method(cGzipReader, "lines", rb_gzreader_lines, -1);
rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);
rb_define_method(cGzipReader, "external_encoding", rb_gzreader_external_encoding, 0);
@@ -4757,6 +4936,7 @@ Init_zlib(void)
id_level = rb_intern("level");
id_strategy = rb_intern("strategy");
+ id_buffer = rb_intern("buffer");
#endif /* GZIP_SUPPORT */
}
@@ -4778,6 +4958,7 @@ Init_zlib(void)
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
*/
@@ -4853,6 +5034,20 @@ Init_zlib(void)
*/
/*
+ * Document-class: Zlib::InProgressError
+ *
+ * Subclass of Zlib::Error. This error is raised when the zlib
+ * stream is currently in progress.
+ *
+ * For example:
+ *
+ * inflater = Zlib::Inflate.new
+ * inflater.inflate(compressed) do
+ * inflater.inflate(compressed) # Raises Zlib::InProgressError
+ * end
+ */
+
+/*
* Document-class: Zlib::GzipFile::Error
*
* Base class of errors that occur when processing GZIP files.
diff --git a/ext/zlib/zlib.gemspec b/ext/zlib/zlib.gemspec
index 4a77ae325e..4a5f8f2ee8 100644
--- a/ext/zlib/zlib.gemspec
+++ b/ext/zlib/zlib.gemspec
@@ -20,16 +20,12 @@ Gem::Specification.new do |spec|
spec.summary = %q{Ruby interface for the zlib compression/decompression library}
spec.description = %q{Ruby interface for the zlib compression/decompression library}
spec.homepage = "https://github.com/ruby/zlib"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "ext/zlib/extconf.rb", "ext/zlib/zlib.c", "zlib.gemspec"]
+ spec.files = ["LICENSE.txt", "README.md", "ext/zlib/extconf.rb", "ext/zlib/zlib.c", "zlib.gemspec"]
spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.executables = []
spec.require_paths = ["lib"]
spec.extensions = "ext/zlib/extconf.rb"
spec.required_ruby_version = ">= 2.3.0"
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "rake-compiler"
end
diff --git a/file.c b/file.c
index c46377b933..3a8439ef07 100644
--- a/file.c
+++ b/file.c
@@ -11,14 +11,22 @@
**********************************************************************/
+#include "ruby/internal/config.h"
+
#ifdef _WIN32
-#include "missing/file.h"
+# include "missing/file.h"
+# include "ruby.h"
#endif
+
+#include <ctype.h>
+#include <time.h>
+
#ifdef __CYGWIN__
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <wchar.h>
+# include <windows.h>
+# include <sys/cygwin.h>
+# include <wchar.h>
#endif
+
#ifdef __APPLE__
# if !(defined(__has_feature) && defined(__has_attribute))
/* Maybe a bug in SDK of Xcode 10.2.1 */
@@ -28,21 +36,13 @@
# define API_AVAILABLE(...)
# define API_DEPRECATED(...)
# endif
-#include <CoreFoundation/CFString.h>
+# include <CoreFoundation/CFString.h>
#endif
-#include "id.h"
-#include "ruby/encoding.h"
-#include "ruby/io.h"
-#include "ruby/util.h"
-#include "ruby/thread.h"
-#include "internal.h"
-#include "dln.h"
-#include "encindex.h"
-
#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
#endif
+
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -60,77 +60,75 @@ int flock(int, int);
# define MAXPATHLEN 1024
#endif
-#include <ctype.h>
-
-#include <time.h>
-
#ifdef HAVE_UTIME_H
-#include <utime.h>
+# include <utime.h>
#elif defined HAVE_SYS_UTIME_H
-#include <sys/utime.h>
+# include <sys/utime.h>
#endif
#ifdef HAVE_PWD_H
-#include <pwd.h>
+# include <pwd.h>
#endif
#ifdef HAVE_SYS_SYSMACROS_H
-#include <sys/sysmacros.h>
+# include <sys/sysmacros.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_MKDEV_H
-#include <sys/mkdev.h>
+# include <sys/mkdev.h>
#endif
#if defined(HAVE_FCNTL_H)
-#include <fcntl.h>
+# include <fcntl.h>
#endif
#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
+# include <sys/time.h>
#endif
#if !defined HAVE_LSTAT && !defined lstat
-#define lstat stat
+# define lstat stat
#endif
/* define system APIs */
#ifdef _WIN32
-#include "win32/file.h"
-#define STAT(p, s) rb_w32_ustati128((p), (s))
-#undef lstat
-#define lstat(p, s) rb_w32_ulstati128((p), (s))
-#undef access
-#define access(p, m) rb_w32_uaccess((p), (m))
-#undef truncate
-#define truncate(p, n) rb_w32_utruncate((p), (n))
-#undef chmod
-#define chmod(p, m) rb_w32_uchmod((p), (m))
-#undef chown
-#define chown(p, o, g) rb_w32_uchown((p), (o), (g))
-#undef lchown
-#define lchown(p, o, g) rb_w32_ulchown((p), (o), (g))
-#undef utimensat
-#define utimensat(s, p, t, f) rb_w32_uutimensat((s), (p), (t), (f))
-#undef link
-#define link(f, t) rb_w32_ulink((f), (t))
-#undef unlink
-#define unlink(p) rb_w32_uunlink(p)
-#undef rename
-#define rename(f, t) rb_w32_urename((f), (t))
-#undef symlink
-#define symlink(s, l) rb_w32_usymlink((s), (l))
-
-#ifdef HAVE_REALPATH
+# include "win32/file.h"
+# define STAT(p, s) rb_w32_ustati128((p), (s))
+# undef lstat
+# define lstat(p, s) rb_w32_ulstati128((p), (s))
+# undef access
+# define access(p, m) rb_w32_uaccess((p), (m))
+# undef truncate
+# define truncate(p, n) rb_w32_utruncate((p), (n))
+# undef chmod
+# define chmod(p, m) rb_w32_uchmod((p), (m))
+# undef chown
+# define chown(p, o, g) rb_w32_uchown((p), (o), (g))
+# undef lchown
+# define lchown(p, o, g) rb_w32_ulchown((p), (o), (g))
+# undef utimensat
+# define utimensat(s, p, t, f) rb_w32_uutimensat((s), (p), (t), (f))
+# undef link
+# define link(f, t) rb_w32_ulink((f), (t))
+# undef unlink
+# define unlink(p) rb_w32_uunlink(p)
+# undef readlink
+# define readlink(f, t, l) rb_w32_ureadlink((f), (t), (l))
+# undef rename
+# define rename(f, t) rb_w32_urename((f), (t))
+# undef symlink
+# define symlink(s, l) rb_w32_usymlink((s), (l))
+
+# ifdef HAVE_REALPATH
/* Don't use native realpath(3) on Windows, as the check for
absolute paths does not work for drive letters. */
-#undef HAVE_REALPATH
-#endif
+# undef HAVE_REALPATH
+# endif
#else
-#define STAT(p, s) stat((p), (s))
+# define STAT(p, s) stat((p), (s))
#endif
#if defined _WIN32 || defined __APPLE__
@@ -143,7 +141,7 @@ int flock(int, int);
/* utime may fail if time is out-of-range for the FS [ruby-dev:38277] */
#if defined DOSISH || defined __CYGWIN__
-# define UTIME_EINVAL
+# define UTIME_EINVAL
#endif
/* Solaris 10 realpath(3) doesn't support File.realpath */
@@ -152,10 +150,29 @@ int flock(int, int);
#endif
#ifdef HAVE_REALPATH
-#include <limits.h>
-#include <stdlib.h>
+# include <limits.h>
+# include <stdlib.h>
#endif
+#include "dln.h"
+#include "encindex.h"
+#include "id.h"
+#include "internal.h"
+#include "internal/compilers.h"
+#include "internal/dir.h"
+#include "internal/error.h"
+#include "internal/file.h"
+#include "internal/io.h"
+#include "internal/load.h"
+#include "internal/object.h"
+#include "internal/process.h"
+#include "internal/thread.h"
+#include "internal/vm.h"
+#include "ruby/encoding.h"
+#include "ruby/io.h"
+#include "ruby/thread.h"
+#include "ruby/util.h"
+
VALUE rb_cFile;
VALUE rb_mFileTest;
VALUE rb_cStat;
@@ -167,15 +184,15 @@ file_path_convert(VALUE name)
int fname_encidx = ENCODING_GET(name);
int fs_encidx;
if (ENCINDEX_US_ASCII != fname_encidx &&
- ENCINDEX_ASCII != fname_encidx &&
- (fs_encidx = rb_filesystem_encindex()) != fname_encidx &&
- rb_default_internal_encoding() &&
- !rb_enc_str_asciionly_p(name)) {
- /* Don't call rb_filesystem_encoding() before US-ASCII and ASCII-8BIT */
- /* fs_encoding should be ascii compatible */
- rb_encoding *fname_encoding = rb_enc_from_index(fname_encidx);
- rb_encoding *fs_encoding = rb_enc_from_index(fs_encidx);
- name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
+ ENCINDEX_ASCII_8BIT != fname_encidx &&
+ (fs_encidx = rb_filesystem_encindex()) != fname_encidx &&
+ rb_default_internal_encoding() &&
+ !rb_enc_str_asciionly_p(name)) {
+ /* Don't call rb_filesystem_encoding() before US-ASCII and ASCII-8BIT */
+ /* fs_encoding should be ascii compatible */
+ rb_encoding *fname_encoding = rb_enc_from_index(fname_encidx);
+ rb_encoding *fs_encoding = rb_enc_from_index(fs_encidx);
+ name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
}
#endif
return name;
@@ -186,8 +203,8 @@ check_path_encoding(VALUE str)
{
rb_encoding *enc = rb_enc_get(str);
if (!rb_enc_asciicompat(enc)) {
- rb_raise(rb_eEncCompatError, "path name must be ASCII-compatible (%s): %"PRIsVALUE,
- rb_enc_name(enc), rb_str_inspect(str));
+ rb_raise(rb_eEncCompatError, "path name must be ASCII-compatible (%s): %"PRIsVALUE,
+ rb_enc_name(enc), rb_str_inspect(str));
}
return enc;
}
@@ -199,7 +216,7 @@ rb_get_path_check_to_string(VALUE obj)
ID to_path;
if (RB_TYPE_P(obj, T_STRING)) {
- return obj;
+ return obj;
}
CONST_ID(to_path, "to_path");
tmp = rb_check_funcall_default(obj, to_path, 0, 0, obj);
@@ -214,7 +231,7 @@ rb_get_path_check_convert(VALUE obj)
check_path_encoding(obj);
if (!rb_str_to_cstr(obj)) {
- rb_raise(rb_eArgError, "path name contains null byte");
+ rb_raise(rb_eArgError, "path name contains null byte");
}
return rb_str_new4(obj);
@@ -238,14 +255,14 @@ rb_str_encode_ospath(VALUE path)
#if USE_OSPATH
int encidx = ENCODING_GET(path);
#if 0 && defined _WIN32
- if (encidx == ENCINDEX_ASCII) {
- encidx = rb_filesystem_encindex();
+ if (encidx == ENCINDEX_ASCII_8BIT) {
+ encidx = rb_filesystem_encindex();
}
#endif
- if (encidx != ENCINDEX_ASCII && encidx != ENCINDEX_UTF_8) {
- rb_encoding *enc = rb_enc_from_index(encidx);
- rb_encoding *utf8 = rb_utf8_encoding();
- path = rb_str_conv_enc(path, enc, utf8);
+ if (encidx != ENCINDEX_ASCII_8BIT && encidx != ENCINDEX_UTF_8) {
+ rb_encoding *enc = rb_enc_from_index(encidx);
+ rb_encoding *utf8 = rb_utf8_encoding();
+ path = rb_str_conv_enc(path, enc, utf8);
}
#endif
return path;
@@ -253,15 +270,55 @@ rb_str_encode_ospath(VALUE path)
#ifdef __APPLE__
# define NORMALIZE_UTF8PATH 1
+
+# ifdef HAVE_WORKING_FORK
+static void
+rb_CFString_class_initialize_before_fork(void)
+{
+ /*
+ * Since macOS 13, CFString family API used in
+ * rb_str_append_normalized_ospath may internally use Objective-C classes
+ * (NSTaggedPointerString and NSPlaceholderMutableString) for small strings.
+ *
+ * On the other hand, Objective-C classes should not be used for the first
+ * time in a fork()'ed but not exec()'ed process. Violations for this rule
+ * can result deadlock during class initialization, so Objective-C runtime
+ * conservatively crashes on such cases by default.
+ *
+ * Therefore, we need to use CFString API to initialize Objective-C classes
+ * used internally *before* fork().
+ *
+ * For future changes, please note that this initialization process cannot
+ * be done in ctor because NSTaggedPointerString in CoreFoundation is enabled
+ * after CFStringInitializeTaggedStrings(), which is called during loading
+ * Objective-C runtime after ctor.
+ * For more details, see https://bugs.ruby-lang.org/issues/18912
+ */
+
+ /* Enough small but non-empty ASCII string to fit in NSTaggedPointerString. */
+ const char small_str[] = "/";
+ long len = sizeof(small_str) - 1;
+
+ const CFAllocatorRef alloc = kCFAllocatorDefault;
+ CFStringRef s = CFStringCreateWithBytesNoCopy(alloc,
+ (const UInt8 *)small_str,
+ len, kCFStringEncodingUTF8,
+ FALSE, kCFAllocatorNull);
+ CFMutableStringRef m = CFStringCreateMutableCopy(alloc, len, s);
+ CFRelease(m);
+ CFRelease(s);
+}
+# endif
+
static VALUE
rb_str_append_normalized_ospath(VALUE str, const char *ptr, long len)
{
CFIndex buflen = 0;
CFRange all;
CFStringRef s = CFStringCreateWithBytesNoCopy(kCFAllocatorDefault,
- (const UInt8 *)ptr, len,
- kCFStringEncodingUTF8, FALSE,
- kCFAllocatorNull);
+ (const UInt8 *)ptr, len,
+ kCFStringEncodingUTF8, FALSE,
+ kCFAllocatorNull);
CFMutableStringRef m = CFStringCreateMutableCopy(kCFAllocatorDefault, len, s);
long oldlen = RSTRING_LEN(str);
@@ -270,7 +327,7 @@ rb_str_append_normalized_ospath(VALUE str, const char *ptr, long len)
CFStringGetBytes(m, all, kCFStringEncodingUTF8, '?', FALSE, NULL, 0, &buflen);
rb_str_modify_expand(str, buflen);
CFStringGetBytes(m, all, kCFStringEncodingUTF8, '?', FALSE,
- (UInt8 *)(RSTRING_PTR(str) + oldlen), buflen, &buflen);
+ (UInt8 *)(RSTRING_PTR(str) + oldlen), buflen, &buflen);
rb_str_set_len(str, oldlen + buflen);
CFRelease(m);
CFRelease(s);
@@ -288,34 +345,34 @@ rb_str_normalize_ospath(const char *ptr, long len)
rb_enc_associate(str, enc);
while (p < e) {
- int l, c;
- int r = rb_enc_precise_mbclen(p, e, enc);
- if (!MBCLEN_CHARFOUND_P(r)) {
- /* invalid byte shall not happen but */
- static const char invalid[3] = "\xEF\xBF\xBD";
- rb_str_append_normalized_ospath(str, p1, p-p1);
- rb_str_cat(str, invalid, sizeof(invalid));
- p += 1;
- p1 = p;
- continue;
- }
- l = MBCLEN_CHARFOUND_LEN(r);
- c = rb_enc_mbc_to_codepoint(p, e, enc);
- if ((0x2000 <= c && c <= 0x2FFF) || (0xF900 <= c && c <= 0xFAFF) ||
- (0x2F800 <= c && c <= 0x2FAFF)) {
- if (p - p1 > 0) {
- rb_str_append_normalized_ospath(str, p1, p-p1);
- }
- rb_str_cat(str, p, l);
- p += l;
- p1 = p;
- }
- else {
- p += l;
- }
+ int l, c;
+ int r = rb_enc_precise_mbclen(p, e, enc);
+ if (!MBCLEN_CHARFOUND_P(r)) {
+ /* invalid byte shall not happen but */
+ static const char invalid[3] = "\xEF\xBF\xBD";
+ rb_str_append_normalized_ospath(str, p1, p-p1);
+ rb_str_cat(str, invalid, sizeof(invalid));
+ p += 1;
+ p1 = p;
+ continue;
+ }
+ l = MBCLEN_CHARFOUND_LEN(r);
+ c = rb_enc_mbc_to_codepoint(p, e, enc);
+ if ((0x2000 <= c && c <= 0x2FFF) || (0xF900 <= c && c <= 0xFAFF) ||
+ (0x2F800 <= c && c <= 0x2FAFF)) {
+ if (p - p1 > 0) {
+ rb_str_append_normalized_ospath(str, p1, p-p1);
+ }
+ rb_str_cat(str, p, l);
+ p += l;
+ p1 = p;
+ }
+ else {
+ p += l;
+ }
}
if (p - p1 > 0) {
- rb_str_append_normalized_ospath(str, p1, p-p1);
+ rb_str_append_normalized_ospath(str, p1, p-p1);
}
return str;
@@ -328,27 +385,27 @@ ignored_char_p(const char *p, const char *e, rb_encoding *enc)
if (p+3 > e) return 0;
switch ((unsigned char)*p) {
case 0xe2:
- switch ((unsigned char)p[1]) {
- case 0x80:
- c = (unsigned char)p[2];
- /* c >= 0x200c && c <= 0x200f */
- if (c >= 0x8c && c <= 0x8f) return 3;
- /* c >= 0x202a && c <= 0x202e */
- if (c >= 0xaa && c <= 0xae) return 3;
- return 0;
- case 0x81:
- c = (unsigned char)p[2];
- /* c >= 0x206a && c <= 0x206f */
- if (c >= 0xaa && c <= 0xaf) return 3;
- return 0;
- }
- break;
+ switch ((unsigned char)p[1]) {
+ case 0x80:
+ c = (unsigned char)p[2];
+ /* c >= 0x200c && c <= 0x200f */
+ if (c >= 0x8c && c <= 0x8f) return 3;
+ /* c >= 0x202a && c <= 0x202e */
+ if (c >= 0xaa && c <= 0xae) return 3;
+ return 0;
+ case 0x81:
+ c = (unsigned char)p[2];
+ /* c >= 0x206a && c <= 0x206f */
+ if (c >= 0xaa && c <= 0xaf) return 3;
+ return 0;
+ }
+ break;
case 0xef:
- /* c == 0xfeff */
- if ((unsigned char)p[1] == 0xbb &&
- (unsigned char)p[2] == 0xbf)
- return 3;
- break;
+ /* c == 0xfeff */
+ if ((unsigned char)p[1] == 0xbb &&
+ (unsigned char)p[2] == 0xbf)
+ return 3;
+ break;
}
return 0;
}
@@ -378,10 +435,10 @@ no_gvl_apply2files(void *ptr)
struct apply_arg *aa = ptr;
for (aa->i = 0; aa->i < aa->argc; aa->i++) {
- if (aa->func(aa->fn[aa->i].ptr, aa->arg) < 0) {
- aa->errnum = errno;
- break;
- }
+ if (aa->func(aa->fn[aa->i].ptr, aa->arg) < 0) {
+ aa->errnum = errno;
+ break;
+ }
}
return 0;
}
@@ -405,63 +462,28 @@ apply2files(int (*func)(const char *, void *), int argc, VALUE *argv, void *arg)
aa->func = func;
for (aa->i = 0; aa->i < argc; aa->i++) {
- VALUE path = rb_get_path(argv[aa->i]);
+ VALUE path = rb_get_path(argv[aa->i]);
- path = rb_str_encode_ospath(path);
- aa->fn[aa->i].ptr = RSTRING_PTR(path);
- aa->fn[aa->i].path = path;
+ path = rb_str_encode_ospath(path);
+ aa->fn[aa->i].ptr = RSTRING_PTR(path);
+ aa->fn[aa->i].path = path;
}
rb_thread_call_without_gvl(no_gvl_apply2files, aa, RUBY_UBF_IO, 0);
if (aa->errnum) {
#ifdef UTIME_EINVAL
- if (func == utime_internal) {
- utime_failed(aa);
- }
+ if (func == utime_internal) {
+ utime_failed(aa);
+ }
#endif
- rb_syserr_fail_path(aa->errnum, aa->fn[aa->i].path);
+ rb_syserr_fail_path(aa->errnum, aa->fn[aa->i].path);
}
if (v) {
- ALLOCV_END(v);
+ ALLOCV_END(v);
}
return LONG2FIX(argc);
}
-/*
- * call-seq:
- * file.path -> filename
- * file.to_path -> filename
- *
- * Returns the pathname used to create <i>file</i> as a string. Does
- * not normalize the name.
- *
- * The pathname may not point to the file corresponding to <i>file</i>.
- * For instance, the pathname becomes void when the file has been
- * moved or deleted.
- *
- * This method raises IOError for a <i>file</i> created using
- * File::Constants::TMPFILE because they don't have a pathname.
- *
- * File.new("testfile").path #=> "testfile"
- * File.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx"
- *
- */
-
-static VALUE
-rb_file_path(VALUE obj)
-{
- rb_io_t *fptr;
-
- fptr = RFILE(rb_io_taint_check(obj))->fptr;
- rb_io_check_initialized(fptr);
-
- if (NIL_P(fptr->pathv)) {
- rb_raise(rb_eIOError, "File is unnamed (TMPFILE?)");
- }
-
- return rb_str_dup(fptr->pathv);
-}
-
static size_t
stat_memsize(const void *p)
{
@@ -481,9 +503,9 @@ stat_new_0(VALUE klass, const struct stat *st)
VALUE obj = TypedData_Wrap_Struct(klass, &stat_data_type, 0);
if (st) {
- nst = ALLOC(struct stat);
- *nst = *st;
- RTYPEDDATA_DATA(obj) = nst;
+ nst = ALLOC(struct stat);
+ *nst = *st;
+ RTYPEDDATA_DATA(obj) = nst;
}
return obj;
}
@@ -562,7 +584,13 @@ rb_stat_cmp(VALUE self, VALUE other)
static VALUE
rb_stat_dev(VALUE self)
{
+#if SIZEOF_STRUCT_STAT_ST_DEV <= SIZEOF_DEV_T
return DEVT2NUM(get_stat(self)->st_dev);
+#elif SIZEOF_STRUCT_STAT_ST_DEV <= SIZEOF_LONG
+ return ULONG2NUM(get_stat(self)->st_dev);
+#else
+ return ULL2NUM(get_stat(self)->st_dev);
+#endif
}
/*
@@ -667,7 +695,21 @@ rb_stat_mode(VALUE self)
static VALUE
rb_stat_nlink(VALUE self)
{
- return UINT2NUM(get_stat(self)->st_nlink);
+ /* struct stat::st_nlink is nlink_t in POSIX. Not the case for Windows. */
+ const struct stat *ptr = get_stat(self);
+
+ if (sizeof(ptr->st_nlink) <= sizeof(int)) {
+ return UINT2NUM((unsigned)ptr->st_nlink);
+ }
+ else if (sizeof(ptr->st_nlink) == sizeof(long)) {
+ return ULONG2NUM((unsigned long)ptr->st_nlink);
+ }
+ else if (sizeof(ptr->st_nlink) == sizeof(LONG_LONG)) {
+ return ULL2NUM((unsigned LONG_LONG)ptr->st_nlink);
+ }
+ else {
+ rb_bug(":FIXME: don't know what to do");
+ }
}
/*
@@ -718,7 +760,13 @@ static VALUE
rb_stat_rdev(VALUE self)
{
#ifdef HAVE_STRUCT_STAT_ST_RDEV
+# if SIZEOF_STRUCT_STAT_ST_RDEV <= SIZEOF_DEV_T
return DEVT2NUM(get_stat(self)->st_rdev);
+# elif SIZEOF_STRUCT_STAT_ST_RDEV <= SIZEOF_LONG
+ return ULONG2NUM(get_stat(self)->st_rdev);
+# else
+ return ULL2NUM(get_stat(self)->st_rdev);
+# endif
#else
return Qnil;
#endif
@@ -845,12 +893,17 @@ stat_atimespec(const struct stat *st)
}
static VALUE
-stat_atime(const struct stat *st)
+stat_time(const struct timespec ts)
{
- struct timespec ts = stat_atimespec(st);
return rb_time_nano_new(ts.tv_sec, ts.tv_nsec);
}
+static VALUE
+stat_atime(const struct stat *st)
+{
+ return stat_time(stat_atimespec(st));
+}
+
static struct timespec
stat_mtimespec(const struct stat *st)
{
@@ -871,8 +924,7 @@ stat_mtimespec(const struct stat *st)
static VALUE
stat_mtime(const struct stat *st)
{
- struct timespec ts = stat_mtimespec(st);
- return rb_time_nano_new(ts.tv_sec, ts.tv_nsec);
+ return stat_time(stat_mtimespec(st));
}
static struct timespec
@@ -895,8 +947,7 @@ stat_ctimespec(const struct stat *st)
static VALUE
stat_ctime(const struct stat *st)
{
- struct timespec ts = stat_ctimespec(st);
- return rb_time_nano_new(ts.tv_sec, ts.tv_nsec);
+ return stat_time(stat_ctimespec(st));
}
#define HAVE_STAT_BIRTHTIME
@@ -934,7 +985,7 @@ rb_stat_atime(VALUE self)
/*
* call-seq:
- * stat.mtime -> aTime
+ * stat.mtime -> time
*
* Returns the modification time of <i>stat</i>.
*
@@ -950,7 +1001,7 @@ rb_stat_mtime(VALUE self)
/*
* call-seq:
- * stat.ctime -> aTime
+ * stat.ctime -> time
*
* Returns the change time for <i>stat</i> (that is, the time
* directory information about the file was changed, not the file
@@ -971,7 +1022,7 @@ rb_stat_ctime(VALUE self)
#if defined(HAVE_STAT_BIRTHTIME)
/*
* call-seq:
- * stat.birthtime -> aTime
+ * stat.birthtime -> time
*
* Returns the birth time for <i>stat</i>.
*
@@ -1021,24 +1072,24 @@ rb_stat_inspect(VALUE self)
VALUE str;
size_t i;
static const struct {
- const char *name;
- VALUE (*func)(VALUE);
+ const char *name;
+ VALUE (*func)(VALUE);
} member[] = {
- {"dev", rb_stat_dev},
- {"ino", rb_stat_ino},
- {"mode", rb_stat_mode},
- {"nlink", rb_stat_nlink},
- {"uid", rb_stat_uid},
- {"gid", rb_stat_gid},
- {"rdev", rb_stat_rdev},
- {"size", rb_stat_size},
- {"blksize", rb_stat_blksize},
- {"blocks", rb_stat_blocks},
- {"atime", rb_stat_atime},
- {"mtime", rb_stat_mtime},
- {"ctime", rb_stat_ctime},
+ {"dev", rb_stat_dev},
+ {"ino", rb_stat_ino},
+ {"mode", rb_stat_mode},
+ {"nlink", rb_stat_nlink},
+ {"uid", rb_stat_uid},
+ {"gid", rb_stat_gid},
+ {"rdev", rb_stat_rdev},
+ {"size", rb_stat_size},
+ {"blksize", rb_stat_blksize},
+ {"blocks", rb_stat_blocks},
+ {"atime", rb_stat_atime},
+ {"mtime", rb_stat_mtime},
+ {"ctime", rb_stat_ctime},
#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC)
- {"birthtime", rb_stat_birthtime},
+ {"birthtime", rb_stat_birthtime},
#endif
};
@@ -1053,23 +1104,23 @@ rb_stat_inspect(VALUE self)
rb_str_buf_cat2(str, " ");
for (i = 0; i < sizeof(member)/sizeof(member[0]); i++) {
- VALUE v;
-
- if (i > 0) {
- rb_str_buf_cat2(str, ", ");
- }
- rb_str_buf_cat2(str, member[i].name);
- rb_str_buf_cat2(str, "=");
- v = (*member[i].func)(self);
- if (i == 2) { /* mode */
- rb_str_catf(str, "0%lo", (unsigned long)NUM2ULONG(v));
- }
- else if (i == 0 || i == 6) { /* dev/rdev */
- rb_str_catf(str, "0x%"PRI_DEVT_PREFIX"x", NUM2DEVT(v));
- }
- else {
- rb_str_append(str, rb_inspect(v));
- }
+ VALUE v;
+
+ if (i > 0) {
+ rb_str_buf_cat2(str, ", ");
+ }
+ rb_str_buf_cat2(str, member[i].name);
+ rb_str_buf_cat2(str, "=");
+ v = (*member[i].func)(self);
+ if (i == 2) { /* mode */
+ rb_str_catf(str, "0%lo", (unsigned long)NUM2ULONG(v));
+ }
+ else if (i == 0 || i == 6) { /* dev/rdev */
+ rb_str_catf(str, "0x%"PRI_DEVT_PREFIX"x", NUM2DEVT(v));
+ }
+ else {
+ rb_str_append(str, rb_inspect(v));
+ }
}
rb_str_buf_cat2(str, ">");
@@ -1079,8 +1130,8 @@ rb_stat_inspect(VALUE self)
typedef struct no_gvl_stat_data {
struct stat *st;
union {
- const char *path;
- int fd;
+ const char *path;
+ int fd;
} file;
} no_gvl_stat_data;
@@ -1118,7 +1169,7 @@ stat_without_gvl(const char *path, struct stat *st)
data.st = st;
return (int)(VALUE)rb_thread_call_without_gvl(no_gvl_stat, &data,
- RUBY_UBF_IO, NULL);
+ RUBY_UBF_IO, NULL);
}
#if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC) && \
@@ -1224,7 +1275,7 @@ statx_birthtime(const struct statx *stx, VALUE fname)
/* birthtime is not supported on the filesystem */
statx_notimplement("birthtime");
}
- return rb_time_nano_new(stx->stx_btime.tv_sec, stx->stx_btime.tv_nsec);
+ return rb_time_nano_new((time_t)stx->stx_btime.tv_sec, stx->stx_btime.tv_nsec);
}
typedef struct statx statx_data;
@@ -1248,16 +1299,16 @@ rb_stat(VALUE file, struct stat *st)
tmp = rb_check_convert_type_with_id(file, T_FILE, "IO", idTo_io);
if (!NIL_P(tmp)) {
- rb_io_t *fptr;
+ rb_io_t *fptr;
- GetOpenFile(tmp, fptr);
- result = fstat_without_gvl(fptr->fd, st);
- file = tmp;
+ GetOpenFile(tmp, fptr);
+ result = fstat_without_gvl(fptr->fd, st);
+ file = tmp;
}
else {
- FilePathValue(file);
- file = rb_str_encode_ospath(file);
- result = stat_without_gvl(RSTRING_PTR(file), st);
+ FilePathValue(file);
+ file = rb_str_encode_ospath(file);
+ result = stat_without_gvl(RSTRING_PTR(file), st);
}
RB_GC_GUARD(file);
return result;
@@ -1265,11 +1316,11 @@ rb_stat(VALUE file, struct stat *st)
/*
* call-seq:
- * File.stat(file_name) -> stat
+ * File.stat(filepath) -> stat
*
- * Returns a File::Stat object for the named file (see File::Stat).
+ * Returns a File::Stat object for the file at +filepath+ (see File::Stat):
*
- * File.stat("testfile").mtime #=> Tue Apr 08 12:58:04 CDT 2003
+ * File.stat('t.txt').class # => File::Stat
*
*/
@@ -1281,7 +1332,7 @@ rb_file_s_stat(VALUE klass, VALUE fname)
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (stat_without_gvl(RSTRING_PTR(fname), &st) < 0) {
- rb_sys_fail_path(fname);
+ rb_sys_fail_path(fname);
}
return rb_stat_new(&st);
}
@@ -1309,7 +1360,7 @@ rb_io_stat(VALUE obj)
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return rb_stat_new(&st);
}
@@ -1331,21 +1382,20 @@ lstat_without_gvl(const char *path, struct stat *st)
data.st = st;
return (int)(VALUE)rb_thread_call_without_gvl(no_gvl_lstat, &data,
- RUBY_UBF_IO, NULL);
+ RUBY_UBF_IO, NULL);
}
#endif /* HAVE_LSTAT */
/*
* call-seq:
- * File.lstat(file_name) -> stat
+ * File.lstat(filepath) -> stat
*
- * Same as File::stat, but does not follow the last symbolic link.
- * Instead, reports on the link itself.
+ * Like File::stat, but does not follow the last symbolic link;
+ * instead, returns a File::Stat object for the link itself.
*
- * File.symlink("testfile", "link2test") #=> 0
- * File.stat("testfile").size #=> 66
- * File.lstat("link2test").size #=> 8
- * File.stat("link2test").size #=> 66
+ * File.symlink('t.txt', 'symlink')
+ * File.stat('symlink').size # => 47
+ * File.lstat('symlink').size # => 5
*
*/
@@ -1358,7 +1408,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (lstat_without_gvl(StringValueCStr(fname), &st) == -1) {
- rb_sys_fail_path(fname);
+ rb_sys_fail_path(fname);
}
return rb_stat_new(&st);
#else
@@ -1368,16 +1418,16 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
/*
* call-seq:
- * file.lstat -> stat
+ * lstat -> stat
*
- * Same as IO#stat, but does not follow the last symbolic link.
- * Instead, reports on the link itself.
+ * Like File#stat, but does not follow the last symbolic link;
+ * instead, returns a File::Stat object for the link itself:
+ *
+ * File.symlink('t.txt', 'symlink')
+ * f = File.new('symlink')
+ * f.stat.size # => 47
+ * f.lstat.size # => 11
*
- * File.symlink("testfile", "link2test") #=> 0
- * File.stat("testfile").size #=> 66
- * f = File.new("link2test")
- * f.lstat.size #=> 8
- * f.stat.size #=> 66
*/
static VALUE
@@ -1392,7 +1442,7 @@ rb_file_lstat(VALUE obj)
if (NIL_P(fptr->pathv)) return Qnil;
path = rb_str_encode_ospath(fptr->pathv);
if (lstat_without_gvl(RSTRING_PTR(path), &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return rb_stat_new(&st);
#else
@@ -1407,41 +1457,25 @@ rb_group_member(GETGROUPS_T gid)
return FALSE;
#else
int rv = FALSE;
- int groups = 16;
+ int groups;
VALUE v = 0;
GETGROUPS_T *gary;
int anum = -1;
if (getgid() == gid || getegid() == gid)
- return TRUE;
-
- /*
- * On Mac OS X (Mountain Lion), NGROUPS is 16. But libc and kernel
- * accept more larger value.
- * So we don't trunk NGROUPS anymore.
- */
- while (groups <= RB_MAX_GROUPS) {
- gary = ALLOCV_N(GETGROUPS_T, v, groups);
- anum = getgroups(groups, gary);
- if (anum != -1 && anum != groups)
- break;
- groups *= 2;
- if (v) {
- ALLOCV_END(v);
- v = 0;
- }
- }
- if (anum == -1)
- return FALSE;
+ return TRUE;
+ groups = getgroups(0, NULL);
+ gary = ALLOCV_N(GETGROUPS_T, v, groups);
+ anum = getgroups(groups, gary);
while (--anum >= 0) {
- if (gary[anum] == gid) {
- rv = TRUE;
- break;
- }
+ if (gary[anum] == gid) {
+ rv = TRUE;
+ break;
+ }
}
if (v)
- ALLOCV_END(v);
+ ALLOCV_END(v);
return rv;
#endif
@@ -1467,28 +1501,28 @@ eaccess(const char *path, int mode)
/* no setuid nor setgid. run shortcut. */
if (getuid() == euid && getgid() == getegid())
- return access(path, mode);
+ return access(path, mode);
if (STAT(path, &st) < 0)
- return -1;
+ return -1;
if (euid == 0) {
- /* Root can read or write any file. */
- if (!(mode & X_OK))
- return 0;
+ /* Root can read or write any file. */
+ if (!(mode & X_OK))
+ return 0;
- /* Root can execute any file that has any one of the execute
- bits set. */
- if (st.st_mode & S_IXUGO)
- return 0;
+ /* Root can execute any file that has any one of the execute
+ bits set. */
+ if (st.st_mode & S_IXUGO)
+ return 0;
- return -1;
+ return -1;
}
if (st.st_uid == euid) /* owner */
- mode <<= 6;
+ mode <<= 6;
else if (rb_group_member(st.st_gid))
- mode <<= 3;
+ mode <<= 3;
if ((int)(st.st_mode & mode) == mode) return 0;
@@ -1523,7 +1557,7 @@ rb_eaccess(VALUE fname, int mode)
aa.mode = mode;
return (int)(VALUE)rb_thread_call_without_gvl(nogvl_eaccess, &aa,
- RUBY_UBF_IO, 0);
+ RUBY_UBF_IO, 0);
}
static void *
@@ -1545,7 +1579,7 @@ rb_access(VALUE fname, int mode)
aa.mode = mode;
return (int)(VALUE)rb_thread_call_without_gvl(nogvl_access, &aa,
- RUBY_UBF_IO, 0);
+ RUBY_UBF_IO, 0);
}
/*
@@ -1562,15 +1596,20 @@ rb_access(VALUE fname, int mode)
* Document-method: directory?
*
* call-seq:
- * File.directory?(file_name) -> true or false
+ * File.directory?(path) -> true or false
*
- * Returns <code>true</code> if the named file is a directory,
- * or a symlink that points at a directory, and <code>false</code>
- * otherwise.
+ * With string +object+ given, returns +true+ if +path+ is a string path
+ * leading to a directory, or to a symbolic link to a directory; +false+ otherwise:
*
- * _file_name_ can be an IO object.
+ * File.directory?('.') # => true
+ * File.directory?('foo') # => false
+ * File.symlink('.', 'dirlink') # => 0
+ * File.directory?('dirlink') # => true
+ * File.symlink('t,txt', 'filelink') # => 0
+ * File.directory?('filelink') # => false
+ *
+ * Argument +path+ can be an IO object.
*
- * File.directory?(".")
*/
VALUE
@@ -1589,11 +1628,14 @@ rb_file_directory_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.pipe?(file_name) -> true or false
+ * File.pipe?(filepath) -> true or false
*
- * Returns <code>true</code> if the named file is a pipe.
+ * Returns +true+ if +filepath+ points to a pipe, +false+ otherwise:
+ *
+ * File.mkfifo('tmp/fifo')
+ * File.pipe?('tmp/fifo') # => true
+ * File.pipe?('t.txt') # => false
*
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1615,9 +1657,14 @@ rb_file_pipe_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.symlink?(file_name) -> true or false
+ * File.symlink?(filepath) -> true or false
+ *
+ * Returns +true+ if +filepath+ points to a symbolic link, +false+ otherwise:
+ *
+ * symlink = File.symlink('t.txt', 'symlink')
+ * File.symlink?('symlink') # => true
+ * File.symlink?('t.txt') # => false
*
- * Returns <code>true</code> if the named file is a symbolic link.
*/
static VALUE
@@ -1651,11 +1698,14 @@ rb_file_symlink_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.socket?(file_name) -> true or false
+ * File.socket?(filepath) -> true or false
*
- * Returns <code>true</code> if the named file is a socket.
+ * Returns +true+ if +filepath+ points to a socket, +false+ otherwise:
+ *
+ * require 'socket'
+ * File.socket?(Socket.new(:INET, :STREAM)) # => true
+ * File.socket?(File.new('t.txt')) # => false
*
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1680,18 +1730,20 @@ rb_file_socket_p(VALUE obj, VALUE fname)
if (rb_stat(fname, &st) < 0) return Qfalse;
if (S_ISSOCK(st.st_mode)) return Qtrue;
-
#endif
+
return Qfalse;
}
/*
* call-seq:
- * File.blockdev?(file_name) -> true or false
+ * File.blockdev?(filepath) -> true or false
*
- * Returns <code>true</code> if the named file is a block device.
+ * Returns +true+ if +filepath+ points to a block device, +false+ otherwise:
+ *
+ * File.blockdev?('/dev/sda1') # => true
+ * File.blockdev?(File.new('t.tmp')) # => false
*
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1717,11 +1769,13 @@ rb_file_blockdev_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.chardev?(file_name) -> true or false
+ * File.chardev?(filepath) -> true or false
*
- * Returns <code>true</code> if the named file is a character device.
+ * Returns +true+ if +filepath+ points to a character device, +false+ otherwise.
+ *
+ * File.chardev?($stdin) # => true
+ * File.chardev?('t.txt') # => false
*
- * _file_name_ can be an IO object.
*/
static VALUE
rb_file_chardev_p(VALUE obj, VALUE fname)
@@ -1760,28 +1814,6 @@ rb_file_exist_p(VALUE obj, VALUE fname)
/*
* call-seq:
- * File.exists?(file_name) -> true or false
- *
- * Deprecated method. Don't use.
- */
-static VALUE
-rb_file_exists_p(VALUE obj, VALUE fname)
-{
- const char *s = "FileTest#";
- if (obj == rb_mFileTest) {
- s = "FileTest.";
- }
- else if (obj == rb_cFile ||
- (RB_TYPE_P(obj, T_CLASS) &&
- RTEST(rb_class_inherited_p(obj, rb_cFile)))) {
- s = "File.";
- }
- rb_warning("%sexists? is a deprecated name, use %sexist? instead", s, s);
- return rb_file_exist_p(obj, fname);
-}
-
-/*
- * call-seq:
* File.readable?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is readable by the effective
@@ -1794,8 +1826,7 @@ rb_file_exists_p(VALUE obj, VALUE fname)
static VALUE
rb_file_readable_p(VALUE obj, VALUE fname)
{
- if (rb_eaccess(fname, R_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_eaccess(fname, R_OK) >= 0);
}
/*
@@ -1812,8 +1843,7 @@ rb_file_readable_p(VALUE obj, VALUE fname)
static VALUE
rb_file_readable_real_p(VALUE obj, VALUE fname)
{
- if (rb_access(fname, R_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_access(fname, R_OK) >= 0);
}
#ifndef S_IRUGO
@@ -1848,7 +1878,7 @@ rb_file_world_readable_p(VALUE obj, VALUE fname)
if (rb_stat(fname, &st) < 0) return Qnil;
if ((st.st_mode & (S_IROTH)) == S_IROTH) {
- return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
+ return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
#endif
return Qnil;
@@ -1868,8 +1898,7 @@ rb_file_world_readable_p(VALUE obj, VALUE fname)
static VALUE
rb_file_writable_p(VALUE obj, VALUE fname)
{
- if (rb_eaccess(fname, W_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_eaccess(fname, W_OK) >= 0);
}
/*
@@ -1886,8 +1915,7 @@ rb_file_writable_p(VALUE obj, VALUE fname)
static VALUE
rb_file_writable_real_p(VALUE obj, VALUE fname)
{
- if (rb_access(fname, W_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_access(fname, W_OK) >= 0);
}
/*
@@ -1914,7 +1942,7 @@ rb_file_world_writable_p(VALUE obj, VALUE fname)
if (rb_stat(fname, &st) < 0) return Qnil;
if ((st.st_mode & (S_IWOTH)) == S_IWOTH) {
- return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
+ return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
#endif
return Qnil;
@@ -1938,8 +1966,7 @@ rb_file_world_writable_p(VALUE obj, VALUE fname)
static VALUE
rb_file_executable_p(VALUE obj, VALUE fname)
{
- if (rb_eaccess(fname, X_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_eaccess(fname, X_OK) >= 0);
}
/*
@@ -1960,8 +1987,7 @@ rb_file_executable_p(VALUE obj, VALUE fname)
static VALUE
rb_file_executable_real_p(VALUE obj, VALUE fname)
{
- if (rb_access(fname, X_OK) < 0) return Qfalse;
- return Qtrue;
+ return RBOOL(rb_access(fname, X_OK) >= 0);
}
#ifndef S_ISREG
@@ -1986,8 +2012,7 @@ rb_file_file_p(VALUE obj, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
- if (S_ISREG(st.st_mode)) return Qtrue;
- return Qfalse;
+ return RBOOL(S_ISREG(st.st_mode));
}
/*
@@ -2006,8 +2031,7 @@ rb_file_zero_p(VALUE obj, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
- if (st.st_size == 0) return Qtrue;
- return Qfalse;
+ return RBOOL(st.st_size == 0);
}
/*
@@ -2047,8 +2071,7 @@ rb_file_owned_p(VALUE obj, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
- if (st.st_uid == geteuid()) return Qtrue;
- return Qfalse;
+ return RBOOL(st.st_uid == geteuid());
}
static VALUE
@@ -2057,8 +2080,7 @@ rb_file_rowned_p(VALUE obj, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
- if (st.st_uid == getuid()) return Qtrue;
- return Qfalse;
+ return RBOOL(st.st_uid == getuid());
}
/*
@@ -2091,8 +2113,7 @@ check3rdbyte(VALUE fname, int mode)
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
- if (st.st_mode & mode) return Qtrue;
- return Qfalse;
+ return RBOOL(st.st_mode & mode);
}
#endif
@@ -2149,7 +2170,7 @@ rb_file_sticky_p(VALUE obj, VALUE fname)
#ifdef S_ISVTX
return check3rdbyte(fname, S_ISVTX);
#else
- return Qnil;
+ return Qfalse;
#endif
}
@@ -2204,9 +2225,9 @@ rb_file_s_size(VALUE klass, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
}
return OFFT2NUM(st.st_size);
}
@@ -2217,36 +2238,36 @@ rb_file_ftype(const struct stat *st)
const char *t;
if (S_ISREG(st->st_mode)) {
- t = "file";
+ t = "file";
}
else if (S_ISDIR(st->st_mode)) {
- t = "directory";
+ t = "directory";
}
else if (S_ISCHR(st->st_mode)) {
- t = "characterSpecial";
+ t = "characterSpecial";
}
#ifdef S_ISBLK
else if (S_ISBLK(st->st_mode)) {
- t = "blockSpecial";
+ t = "blockSpecial";
}
#endif
#ifdef S_ISFIFO
else if (S_ISFIFO(st->st_mode)) {
- t = "fifo";
+ t = "fifo";
}
#endif
#ifdef S_ISLNK
else if (S_ISLNK(st->st_mode)) {
- t = "link";
+ t = "link";
}
#endif
#ifdef S_ISSOCK
else if (S_ISSOCK(st->st_mode)) {
- t = "socket";
+ t = "socket";
}
#endif
else {
- t = "unknown";
+ t = "unknown";
}
return rb_usascii_str_new2(t);
@@ -2275,7 +2296,7 @@ rb_file_s_ftype(VALUE klass, VALUE fname)
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (lstat_without_gvl(StringValueCStr(fname), &st) == -1) {
- rb_sys_fail_path(fname);
+ rb_sys_fail_path(fname);
}
return rb_file_ftype(&st);
@@ -2299,9 +2320,9 @@ rb_file_s_atime(VALUE klass, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
}
return stat_atime(&st);
}
@@ -2325,7 +2346,7 @@ rb_file_atime(VALUE obj)
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return stat_atime(&st);
}
@@ -2348,9 +2369,9 @@ rb_file_s_mtime(VALUE klass, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
}
return stat_mtime(&st);
}
@@ -2373,7 +2394,7 @@ rb_file_mtime(VALUE obj)
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return stat_mtime(&st);
}
@@ -2400,9 +2421,9 @@ rb_file_s_ctime(VALUE klass, VALUE fname)
struct stat st;
if (rb_stat(fname, &st) < 0) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
}
return stat_ctime(&st);
}
@@ -2428,7 +2449,7 @@ rb_file_ctime(VALUE obj)
GetOpenFile(obj, fptr);
if (fstat(fptr->fd, &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return stat_ctime(&st);
}
@@ -2454,9 +2475,9 @@ rb_file_s_birthtime(VALUE klass, VALUE fname)
statx_data st;
if (rb_statx(fname, &st, STATX_BTIME) < 0) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
}
return statx_birthtime(&st, fname);
}
@@ -2485,7 +2506,7 @@ rb_file_birthtime(VALUE obj)
GetOpenFile(obj, fptr);
if (fstatx_without_gvl(fptr->fd, &st, STATX_BTIME) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return statx_birthtime(&st, fptr->pathv);
}
@@ -2503,20 +2524,33 @@ rb_file_birthtime(VALUE obj)
*
*/
-static VALUE
-rb_file_size(VALUE obj)
+rb_off_t
+rb_file_size(VALUE file)
{
- rb_io_t *fptr;
- struct stat st;
+ if (RB_TYPE_P(file, T_FILE)) {
+ rb_io_t *fptr;
+ struct stat st;
- GetOpenFile(obj, fptr);
- if (fptr->mode & FMODE_WRITABLE) {
- rb_io_flush_raw(obj, 0);
+ RB_IO_POINTER(file, fptr);
+ if (fptr->mode & FMODE_WRITABLE) {
+ rb_io_flush_raw(file, 0);
+ }
+
+ if (fstat(fptr->fd, &st) == -1) {
+ rb_sys_fail_path(fptr->pathv);
+ }
+
+ return st.st_size;
}
- if (fstat(fptr->fd, &st) == -1) {
- rb_sys_fail_path(fptr->pathv);
+ else {
+ return NUM2OFFT(rb_funcall(file, idSize, 0));
}
- return OFFT2NUM(st.st_size);
+}
+
+static VALUE
+file_size(VALUE self)
+{
+ return OFFT2NUM(rb_file_size(self));
}
static int
@@ -2576,18 +2610,18 @@ rb_file_chmod(VALUE obj, VALUE vmode)
GetOpenFile(obj, fptr);
#ifdef HAVE_FCHMOD
if (fchmod(fptr->fd, mode) == -1) {
- if (HAVE_FCHMOD || errno != ENOSYS)
- rb_sys_fail_path(fptr->pathv);
+ if (HAVE_FCHMOD || errno != ENOSYS)
+ rb_sys_fail_path(fptr->pathv);
}
else {
- if (!HAVE_FCHMOD) return INT2FIX(0);
+ if (!HAVE_FCHMOD) return INT2FIX(0);
}
#endif
#if !defined HAVE_FCHMOD || !HAVE_FCHMOD
if (NIL_P(fptr->pathv)) return Qnil;
path = rb_str_encode_ospath(fptr->pathv);
if (chmod(RSTRING_PTR(path), mode) == -1)
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
#endif
return INT2FIX(0);
@@ -2628,7 +2662,7 @@ static inline rb_uid_t
to_uid(VALUE u)
{
if (NIL_P(u)) {
- return (rb_uid_t)-1;
+ return (rb_uid_t)-1;
}
return NUM2UIDT(u);
}
@@ -2637,7 +2671,7 @@ static inline rb_gid_t
to_gid(VALUE g)
{
if (NIL_P(g)) {
- return (rb_gid_t)-1;
+ return (rb_gid_t)-1;
}
return NUM2GIDT(g);
}
@@ -2713,10 +2747,10 @@ rb_file_chown(VALUE obj, VALUE owner, VALUE group)
if (NIL_P(fptr->pathv)) return Qnil;
path = rb_str_encode_ospath(fptr->pathv);
if (chown(RSTRING_PTR(path), o, g) == -1)
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
#else
if (fchown(fptr->fd, o, g) == -1)
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
#endif
return INT2FIX(0);
@@ -2773,32 +2807,32 @@ utime_failed(struct apply_arg *aa)
struct utime_args *ua = aa->arg;
if (ua->tsp && e == EINVAL) {
- VALUE e[2], a = Qnil, m = Qnil;
- int d = 0;
- VALUE atime = ua->atime;
- VALUE mtime = ua->mtime;
-
- if (!NIL_P(atime)) {
- a = rb_inspect(atime);
- }
- if (!NIL_P(mtime) && mtime != atime && !rb_equal(atime, mtime)) {
- m = rb_inspect(mtime);
- }
- if (NIL_P(a)) e[0] = m;
- else if (NIL_P(m) || rb_str_cmp(a, m) == 0) e[0] = a;
- else {
- e[0] = rb_str_plus(a, rb_str_new_cstr(" or "));
- rb_str_append(e[0], m);
- d = 1;
- }
- if (!NIL_P(e[0])) {
- if (path) {
- if (!d) e[0] = rb_str_dup(e[0]);
- rb_str_append(rb_str_cat2(e[0], " for "), path);
- }
- e[1] = INT2FIX(EINVAL);
- rb_exc_raise(rb_class_new_instance(2, e, rb_eSystemCallError));
- }
+ VALUE e[2], a = Qnil, m = Qnil;
+ int d = 0;
+ VALUE atime = ua->atime;
+ VALUE mtime = ua->mtime;
+
+ if (!NIL_P(atime)) {
+ a = rb_inspect(atime);
+ }
+ if (!NIL_P(mtime) && mtime != atime && !rb_equal(atime, mtime)) {
+ m = rb_inspect(mtime);
+ }
+ if (NIL_P(a)) e[0] = m;
+ else if (NIL_P(m) || rb_str_cmp(a, m) == 0) e[0] = a;
+ else {
+ e[0] = rb_str_plus(a, rb_str_new_cstr(" or "));
+ rb_str_append(e[0], m);
+ d = 1;
+ }
+ if (!NIL_P(e[0])) {
+ if (path) {
+ if (!d) e[0] = rb_str_dup(e[0]);
+ rb_str_append(rb_str_cat2(e[0], " for "), path);
+ }
+ e[1] = INT2FIX(EINVAL);
+ rb_exc_raise(rb_class_new_instance(2, e, rb_eSystemCallError));
+ }
}
rb_syserr_fail_path(e, path);
}
@@ -2806,6 +2840,29 @@ utime_failed(struct apply_arg *aa)
#if defined(HAVE_UTIMES)
+# if !defined(HAVE_UTIMENSAT)
+/* utimensat() is not found, runtime check is not needed */
+# elif defined(__APPLE__) && \
+ (!defined(MAC_OS_X_VERSION_13_0) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_13_0))
+
+# if defined(__has_attribute) && __has_attribute(availability)
+typedef int utimensat_func(int, const char *, const struct timespec [2], int);
+
+RBIMPL_WARNING_PUSH()
+RBIMPL_WARNING_IGNORED(-Wunguarded-availability-new)
+static inline utimensat_func *
+rb_utimensat(void)
+{
+ return &utimensat;
+}
+RBIMPL_WARNING_POP()
+
+# define utimensat rb_utimensat()
+# else /* __API_AVAILABLE macro does nothing on gcc */
+__attribute__((weak)) int utimensat(int, const char *, const struct timespec [2], int);
+# endif
+# endif
+
static int
utime_internal(const char *path, void *arg)
{
@@ -2814,35 +2871,40 @@ utime_internal(const char *path, void *arg)
struct timeval tvbuf[2], *tvp = NULL;
#if defined(HAVE_UTIMENSAT)
+# if defined(__APPLE__)
+ const int try_utimensat = utimensat != NULL;
+ const int try_utimensat_follow = utimensat != NULL;
+# else
+# define TRY_UTIMENSAT 1
static int try_utimensat = 1;
# ifdef AT_SYMLINK_NOFOLLOW
static int try_utimensat_follow = 1;
# else
const int try_utimensat_follow = 0;
# endif
+# endif
int flags = 0;
if (v->follow ? try_utimensat_follow : try_utimensat) {
# ifdef AT_SYMLINK_NOFOLLOW
- if (v->follow) {
- flags = AT_SYMLINK_NOFOLLOW;
- }
+ if (v->follow) {
+ flags = AT_SYMLINK_NOFOLLOW;
+ }
# endif
- if (utimensat(AT_FDCWD, path, tsp, flags) < 0) {
- if (errno == ENOSYS) {
+ int result = utimensat(AT_FDCWD, path, tsp, flags);
+# ifdef TRY_UTIMENSAT
+ if (result < 0 && errno == ENOSYS) {
# ifdef AT_SYMLINK_NOFOLLOW
- try_utimensat_follow = 0;
+ try_utimensat_follow = 0;
# endif
- if (!v->follow)
- try_utimensat = 0;
- goto no_utimensat;
- }
- return -1; /* calls utime_failed */
+ if (!v->follow)
+ try_utimensat = 0;
}
- return 0;
+ else
+# endif
+ return result;
}
-no_utimensat:
#endif
if (tsp) {
@@ -2896,12 +2958,12 @@ utime_internal_i(int argc, VALUE *argv, int follow)
args.follow = follow;
if (!NIL_P(args.atime) || !NIL_P(args.mtime)) {
- tsp = tss;
- tsp[0] = rb_time_timespec(args.atime);
- if (args.atime == args.mtime)
- tsp[1] = tsp[0];
- else
- tsp[1] = rb_time_timespec(args.mtime);
+ tsp = tss;
+ tsp[0] = rb_time_timespec(args.atime);
+ if (args.atime == args.mtime)
+ tsp[1] = tsp[0];
+ else
+ tsp[1] = rb_time_timespec(args.mtime);
}
args.tsp = tsp;
@@ -2965,7 +3027,7 @@ syserr_fail2_in(const char *func, int e, VALUE s1, VALUE s2)
#endif
if (e == EEXIST) {
- rb_syserr_fail_path(e, rb_str_ellipsize(s2, max_pathlen));
+ rb_syserr_fail_path(e, rb_str_ellipsize(s2, max_pathlen));
}
str = rb_str_new_cstr("(");
rb_str_append(str, rb_str_ellipsize(s1, max_pathlen));
@@ -3001,7 +3063,7 @@ rb_file_s_link(VALUE klass, VALUE from, VALUE to)
to = rb_str_encode_ospath(to);
if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
- sys_fail2(from, to);
+ sys_fail2(from, to);
}
return INT2FIX(0);
}
@@ -3031,7 +3093,7 @@ rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
to = rb_str_encode_ospath(to);
if (symlink(StringValueCStr(from), StringValueCStr(to)) < 0) {
- sys_fail2(from, to);
+ sys_fail2(from, to);
}
return INT2FIX(0);
}
@@ -3057,7 +3119,6 @@ rb_file_s_readlink(VALUE klass, VALUE path)
return rb_readlink(path, rb_filesystem_encoding());
}
-#ifndef _WIN32
struct readlink_arg {
const char *path;
char *buf;
@@ -3082,7 +3143,7 @@ readlink_without_gvl(VALUE path, VALUE buf, size_t size)
ra.size = size;
return (ssize_t)rb_thread_call_without_gvl(nogvl_readlink, &ra,
- RUBY_UBF_IO, 0);
+ RUBY_UBF_IO, 0);
}
VALUE
@@ -3097,23 +3158,22 @@ rb_readlink(VALUE path, rb_encoding *enc)
v = rb_enc_str_new(0, size, enc);
while ((rv = readlink_without_gvl(path, v, size)) == size
#ifdef _AIX
- || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
+ || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
#endif
- ) {
- rb_str_modify_expand(v, size);
- size *= 2;
- rb_str_set_len(v, size);
+ ) {
+ rb_str_modify_expand(v, size);
+ size *= 2;
+ rb_str_set_len(v, size);
}
if (rv < 0) {
- int e = errno;
- rb_str_resize(v, 0);
- rb_syserr_fail_path(e, path);
+ int e = errno;
+ rb_str_resize(v, 0);
+ rb_syserr_fail_path(e, path);
}
rb_str_resize(v, rv);
return v;
}
-#endif
#else
#define rb_file_s_readlink rb_f_notimplement
#endif
@@ -3185,18 +3245,18 @@ rb_file_s_rename(VALUE klass, VALUE from, VALUE to)
errno = 0;
#endif
if ((int)(VALUE)rb_thread_call_without_gvl(no_gvl_rename, &ra,
- RUBY_UBF_IO, 0) < 0) {
- int e = errno;
+ RUBY_UBF_IO, 0) < 0) {
+ int e = errno;
#if defined DOSISH
- switch (e) {
- case EEXIST:
- if (chmod(ra.dst, 0666) == 0 &&
- unlink(ra.dst) == 0 &&
- rename(ra.src, ra.dst) == 0)
- return INT2FIX(0);
- }
+ switch (e) {
+ case EEXIST:
+ if (chmod(ra.dst, 0666) == 0 &&
+ unlink(ra.dst) == 0 &&
+ rename(ra.src, ra.dst) == 0)
+ return INT2FIX(0);
+ }
#endif
- syserr_fail2(e, from, to);
+ syserr_fail2(e, from, to);
}
return INT2FIX(0);
@@ -3224,11 +3284,11 @@ rb_file_s_umask(int argc, VALUE *argv, VALUE _)
switch (argc) {
case 0:
- omask = umask(0);
- umask(omask);
+ omask = umask(0);
+ umask(omask);
break;
case 1:
- omask = umask(NUM2MODET(argv[0]));
+ omask = umask(NUM2MODET(argv[0]));
break;
default:
rb_error_arity(argc, 0, 1);
@@ -3293,10 +3353,10 @@ static inline int
has_drive_letter(const char *buf)
{
if (ISALPHA(buf[0]) && buf[1] == ':') {
- return 1;
+ return 1;
}
else {
- return 0;
+ return 0;
}
}
@@ -3317,17 +3377,16 @@ getcwdofdrv(int drv)
*/
oldcwd = ruby_getcwd();
if (chdir(drive) == 0) {
- drvcwd = ruby_getcwd();
- chdir(oldcwd);
- xfree(oldcwd);
+ drvcwd = ruby_getcwd();
+ chdir(oldcwd);
+ xfree(oldcwd);
}
else {
- /* perhaps the drive is not exist. we return only drive letter */
- drvcwd = strdup(drive);
+ /* perhaps the drive is not exist. we return only drive letter */
+ drvcwd = strdup(drive);
}
return drvcwd;
}
-#endif
static inline int
not_same_drive(VALUE path, int drive)
@@ -3335,13 +3394,14 @@ not_same_drive(VALUE path, int drive)
const char *p = RSTRING_PTR(path);
if (RSTRING_LEN(path) < 2) return 0;
if (has_drive_letter(p)) {
- return TOLOWER(p[0]) != TOLOWER(drive);
+ return TOLOWER(p[0]) != TOLOWER(drive);
}
else {
- return has_unc(p);
+ return has_unc(p);
}
}
#endif
+#endif
static inline char *
skiproot(const char *path, const char *end, rb_encoding *enc)
@@ -3358,7 +3418,7 @@ char *
rb_enc_path_next(const char *s, const char *e, rb_encoding *enc)
{
while (s < e && !isdirsep(*s)) {
- Inc(s, e, enc);
+ Inc(s, e, enc);
}
return (char *)s;
}
@@ -3374,16 +3434,16 @@ rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc)
#if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
#ifdef DOSISH_UNC
if (path + 2 <= end && isdirsep(path[0]) && isdirsep(path[1])) {
- path += 2;
- while (path < end && isdirsep(*path)) path++;
- if ((path = rb_enc_path_next(path, end, enc)) < end && path[0] && path[1] && !isdirsep(path[1]))
- path = rb_enc_path_next(path + 1, end, enc);
- return (char *)path;
+ path += 2;
+ while (path < end && isdirsep(*path)) path++;
+ if ((path = rb_enc_path_next(path, end, enc)) < end && path[0] && path[1] && !isdirsep(path[1]))
+ path = rb_enc_path_next(path + 1, end, enc);
+ return (char *)path;
}
#endif
#ifdef DOSISH_DRIVE_LETTER
if (has_drive_letter(path))
- return (char *)(path + 2);
+ return (char *)(path + 2);
#endif
#endif
return (char *)path;
@@ -3407,15 +3467,15 @@ rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc)
{
char *last = NULL;
while (path < end) {
- if (isdirsep(*path)) {
- const char *tmp = path++;
- while (path < end && isdirsep(*path)) path++;
- if (path >= end) break;
- last = (char *)tmp;
- }
- else {
- Inc(path, end, enc);
- }
+ if (isdirsep(*path)) {
+ const char *tmp = path++;
+ while (path < end && isdirsep(*path)) path++;
+ if (path >= end) break;
+ last = (char *)tmp;
+ }
+ else {
+ Inc(path, end, enc);
+ }
}
return last;
}
@@ -3424,14 +3484,14 @@ static char *
chompdirsep(const char *path, const char *end, rb_encoding *enc)
{
while (path < end) {
- if (isdirsep(*path)) {
- const char *last = path++;
- while (path < end && isdirsep(*path)) path++;
- if (path >= end) return (char *)last;
- }
- else {
- Inc(path, end, enc);
- }
+ if (isdirsep(*path)) {
+ const char *last = path++;
+ while (path < end && isdirsep(*path)) path++;
+ if (path >= end) return (char *)last;
+ }
+ else {
+ Inc(path, end, enc);
+ }
}
return (char *)path;
}
@@ -3443,26 +3503,40 @@ rb_enc_path_end(const char *path, const char *end, rb_encoding *enc)
return chompdirsep(path, end, enc);
}
+static rb_encoding *
+fs_enc_check(VALUE path1, VALUE path2)
+{
+ rb_encoding *enc = rb_enc_check(path1, path2);
+ int encidx = rb_enc_to_index(enc);
+ if (encidx == ENCINDEX_US_ASCII) {
+ encidx = rb_enc_get_index(path1);
+ if (encidx == ENCINDEX_US_ASCII)
+ encidx = rb_enc_get_index(path2);
+ enc = rb_enc_from_index(encidx);
+ }
+ return enc;
+}
+
#if USE_NTFS
static char *
ntfs_tail(const char *path, const char *end, rb_encoding *enc)
{
while (path < end && *path == '.') path++;
while (path < end && !isADS(*path)) {
- if (istrailinggarbage(*path)) {
- const char *last = path++;
- while (path < end && istrailinggarbage(*path)) path++;
- if (path >= end || isADS(*path)) return (char *)last;
- }
- else if (isdirsep(*path)) {
- const char *last = path++;
- while (path < end && isdirsep(*path)) path++;
- if (path >= end) return (char *)last;
- if (isADS(*path)) path++;
- }
- else {
- Inc(path, end, enc);
- }
+ if (istrailinggarbage(*path)) {
+ const char *last = path++;
+ while (path < end && istrailinggarbage(*path)) path++;
+ if (path >= end || isADS(*path)) return (char *)last;
+ }
+ else if (isdirsep(*path)) {
+ const char *last = path++;
+ while (path < end && isdirsep(*path)) path++;
+ if (path >= end) return (char *)last;
+ if (isADS(*path)) path++;
+ }
+ else {
+ Inc(path, end, enc);
+ }
}
return (char *)path;
}
@@ -3471,11 +3545,11 @@ ntfs_tail(const char *path, const char *end, rb_encoding *enc)
#define BUFCHECK(cond) do {\
bdiff = p - buf;\
if (cond) {\
- do {buflen *= 2;} while (cond);\
- rb_str_resize(result, buflen);\
- buf = RSTRING_PTR(result);\
- p = buf + bdiff;\
- pend = buf + buflen;\
+ do {buflen *= 2;} while (cond);\
+ rb_str_resize(result, buflen);\
+ buf = RSTRING_PTR(result);\
+ p = buf + bdiff;\
+ pend = buf + buflen;\
}\
} while (0)
@@ -3524,9 +3598,9 @@ copy_home_path(VALUE result, const char *dir)
#if defined DOSISH || defined __CYGWIN__
enc = rb_enc_from_index(encidx);
for (bend = (p = buf) + dirlen; p < bend; Inc(p, bend, enc)) {
- if (*p == '\\') {
- *p = '/';
- }
+ if (*p == '\\') {
+ *p = '/';
+ }
}
#endif
return result;
@@ -3557,11 +3631,11 @@ rb_home_dir_of(VALUE user, VALUE result)
pwPtr = getpwnam(username);
#else
if (strcasecmp(username, getlogin()) == 0)
- dir = pwPtr = getenv("HOME");
+ dir = pwPtr = getenv("HOME");
#endif
if (!pwPtr) {
- endpwent();
- rb_raise(rb_eArgError, "user %"PRIsVALUE" doesn't exist", user);
+ endpwent();
+ rb_raise(rb_eArgError, "user %"PRIsVALUE" doesn't exist", user);
}
#ifdef HAVE_PWD_H
dir = pwPtr->pw_dir;
@@ -3579,25 +3653,46 @@ rb_default_home_dir(VALUE result)
#if defined HAVE_PWD_H
if (!dir) {
- const char *login = getlogin();
- if (login) {
- struct passwd *pw = getpwnam(login);
- if (pw) {
- copy_home_path(result, pw->pw_dir);
- endpwent();
- return result;
- }
- endpwent();
- rb_raise(rb_eArgError, "couldn't find HOME for login `%s' -- expanding `~'",
- login);
- }
- else {
- rb_raise(rb_eArgError, "couldn't find login name -- expanding `~'");
- }
+ /* We'll look up the user's default home dir in the password db by
+ * login name, if possible, and failing that will fall back to looking
+ * the information up by uid (as would be needed for processes that
+ * are not a descendant of login(1) or a work-alike).
+ *
+ * While the lookup by uid is more likely to succeed (since we always
+ * have a uid, but may or may not have a login name), we prefer first
+ * looking up by name to accommodate the possibility of multiple login
+ * names (each with its own record in the password database, so each
+ * with a potentially different home directory) being mapped to the
+ * same uid (as explicitly allowed for by POSIX; see getlogin(3posix)).
+ */
+ VALUE login_name = rb_getlogin();
+
+# if !defined(HAVE_GETPWUID_R) && !defined(HAVE_GETPWUID)
+ /* This is a corner case, but for backward compatibility reasons we
+ * want to emit this error if neither the lookup by login name nor
+ * lookup by getuid() has a chance of succeeding.
+ */
+ if (NIL_P(login_name)) {
+ rb_raise(rb_eArgError, "couldn't find login name -- expanding `~'");
+ }
+# endif
+
+ VALUE pw_dir = rb_getpwdirnam_for_login(login_name);
+ if (NIL_P(pw_dir)) {
+ pw_dir = rb_getpwdiruid();
+ if (NIL_P(pw_dir)) {
+ rb_raise(rb_eArgError, "couldn't find home for uid `%ld'", (long)getuid());
+ }
+ }
+
+ /* found it */
+ copy_home_path(result, RSTRING_PTR(pw_dir));
+ rb_str_resize(pw_dir, 0);
+ return result;
}
#endif
if (!dir) {
- rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `~'");
+ rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `~'");
}
return copy_home_path(result, dir);
}
@@ -3622,15 +3717,15 @@ append_fspath(VALUE result, VALUE fname, char *dir, rb_encoding **enc, rb_encodi
size_t dirlen = strlen(dir), buflen = rb_str_capacity(result);
if (NORMALIZE_UTF8PATH || *enc != fsenc) {
- rb_encoding *direnc = rb_enc_check(fname, dirname = ospath_new(dir, dirlen, fsenc));
- if (direnc != fsenc) {
- dirname = rb_str_conv_enc(dirname, fsenc, direnc);
- RSTRING_GETMEM(dirname, cwdp, dirlen);
- }
- else if (NORMALIZE_UTF8PATH) {
- RSTRING_GETMEM(dirname, cwdp, dirlen);
- }
- *enc = direnc;
+ rb_encoding *direnc = fs_enc_check(fname, dirname = ospath_new(dir, dirlen, fsenc));
+ if (direnc != fsenc) {
+ dirname = rb_str_conv_enc(dirname, fsenc, direnc);
+ RSTRING_GETMEM(dirname, cwdp, dirlen);
+ }
+ else if (NORMALIZE_UTF8PATH) {
+ RSTRING_GETMEM(dirname, cwdp, dirlen);
+ }
+ *enc = direnc;
}
do {buflen *= 2;} while (dirlen > buflen);
rb_str_resize(result, buflen);
@@ -3656,115 +3751,115 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
BUFINIT();
if (s[0] == '~' && abs_mode == 0) { /* execute only if NOT absolute_path() */
- long userlen = 0;
- if (isdirsep(s[1]) || s[1] == '\0') {
- buf = 0;
- b = 0;
- rb_str_set_len(result, 0);
- if (*++s) ++s;
- rb_default_home_dir(result);
- }
- else {
- s = nextdirsep(b = s, fend, enc);
- b++; /* b[0] is '~' */
- userlen = s - b;
- BUFCHECK(bdiff + userlen >= buflen);
- memcpy(p, b, userlen);
- ENC_CODERANGE_CLEAR(result);
- rb_str_set_len(result, userlen);
- rb_enc_associate(result, enc);
- rb_home_dir_of(result, result);
- buf = p + 1;
- p += userlen;
- }
- if (!rb_is_absolute_path(RSTRING_PTR(result))) {
- if (userlen) {
- rb_enc_raise(enc, rb_eArgError, "non-absolute home of %.*s%.0"PRIsVALUE,
- (int)userlen, b, fname);
- }
- else {
- rb_raise(rb_eArgError, "non-absolute home");
- }
- }
- BUFINIT();
- p = pend;
+ long userlen = 0;
+ if (isdirsep(s[1]) || s[1] == '\0') {
+ buf = 0;
+ b = 0;
+ rb_str_set_len(result, 0);
+ if (*++s) ++s;
+ rb_default_home_dir(result);
+ }
+ else {
+ s = nextdirsep(b = s, fend, enc);
+ b++; /* b[0] is '~' */
+ userlen = s - b;
+ BUFCHECK(bdiff + userlen >= buflen);
+ memcpy(p, b, userlen);
+ ENC_CODERANGE_CLEAR(result);
+ rb_str_set_len(result, userlen);
+ rb_enc_associate(result, enc);
+ rb_home_dir_of(result, result);
+ buf = p + 1;
+ p += userlen;
+ }
+ if (!rb_is_absolute_path(RSTRING_PTR(result))) {
+ if (userlen) {
+ rb_enc_raise(enc, rb_eArgError, "non-absolute home of %.*s%.0"PRIsVALUE,
+ (int)userlen, b, fname);
+ }
+ else {
+ rb_raise(rb_eArgError, "non-absolute home");
+ }
+ }
+ BUFINIT();
+ p = pend;
}
#ifdef DOSISH_DRIVE_LETTER
/* skip drive letter */
else if (has_drive_letter(s)) {
- if (isdirsep(s[2])) {
- /* specified drive letter, and full path */
- /* skip drive letter */
- BUFCHECK(bdiff + 2 >= buflen);
- memcpy(p, s, 2);
- p += 2;
- s += 2;
- rb_enc_copy(result, fname);
- }
- else {
- /* specified drive, but not full path */
- int same = 0;
- if (!NIL_P(dname) && !not_same_drive(dname, s[0])) {
- rb_file_expand_path_internal(dname, Qnil, abs_mode, long_name, result);
- BUFINIT();
- if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {
- /* ok, same drive */
- same = 1;
- }
- }
- if (!same) {
- char *e = append_fspath(result, fname, getcwdofdrv(*s), &enc, fsenc);
- BUFINIT();
- p = e;
- }
- else {
- rb_enc_associate(result, enc = rb_enc_check(result, fname));
- p = pend;
- }
- p = chompdirsep(skiproot(buf, p, enc), p, enc);
- s += 2;
- }
+ if (isdirsep(s[2])) {
+ /* specified drive letter, and full path */
+ /* skip drive letter */
+ BUFCHECK(bdiff + 2 >= buflen);
+ memcpy(p, s, 2);
+ p += 2;
+ s += 2;
+ rb_enc_copy(result, fname);
+ }
+ else {
+ /* specified drive, but not full path */
+ int same = 0;
+ if (!NIL_P(dname) && !not_same_drive(dname, s[0])) {
+ rb_file_expand_path_internal(dname, Qnil, abs_mode, long_name, result);
+ BUFINIT();
+ if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {
+ /* ok, same drive */
+ same = 1;
+ }
+ }
+ if (!same) {
+ char *e = append_fspath(result, fname, getcwdofdrv(*s), &enc, fsenc);
+ BUFINIT();
+ p = e;
+ }
+ else {
+ rb_enc_associate(result, enc = fs_enc_check(result, fname));
+ p = pend;
+ }
+ p = chompdirsep(skiproot(buf, p, enc), p, enc);
+ s += 2;
+ }
}
#endif
else if (!rb_is_absolute_path(s)) {
- if (!NIL_P(dname)) {
- rb_file_expand_path_internal(dname, Qnil, abs_mode, long_name, result);
- rb_enc_associate(result, rb_enc_check(result, fname));
- BUFINIT();
- p = pend;
- }
- else {
- char *e = append_fspath(result, fname, ruby_getcwd(), &enc, fsenc);
- BUFINIT();
- p = e;
- }
+ if (!NIL_P(dname)) {
+ rb_file_expand_path_internal(dname, Qnil, abs_mode, long_name, result);
+ rb_enc_associate(result, fs_enc_check(result, fname));
+ BUFINIT();
+ p = pend;
+ }
+ else {
+ char *e = append_fspath(result, fname, ruby_getcwd(), &enc, fsenc);
+ BUFINIT();
+ p = e;
+ }
#if defined DOSISH || defined __CYGWIN__
- if (isdirsep(*s)) {
- /* specified full path, but not drive letter nor UNC */
- /* we need to get the drive letter or UNC share name */
- p = skipprefix(buf, p, enc);
- }
- else
+ if (isdirsep(*s)) {
+ /* specified full path, but not drive letter nor UNC */
+ /* we need to get the drive letter or UNC share name */
+ p = skipprefix(buf, p, enc);
+ }
+ else
#endif
- p = chompdirsep(skiproot(buf, p, enc), p, enc);
+ p = chompdirsep(skiproot(buf, p, enc), p, enc);
}
else {
- size_t len;
- b = s;
- do s++; while (isdirsep(*s));
- len = s - b;
- p = buf + len;
- BUFCHECK(bdiff >= buflen);
- memset(buf, '/', len);
- rb_str_set_len(result, len);
- rb_enc_associate(result, rb_enc_check(result, fname));
+ size_t len;
+ b = s;
+ do s++; while (isdirsep(*s));
+ len = s - b;
+ p = buf + len;
+ BUFCHECK(bdiff >= buflen);
+ memset(buf, '/', len);
+ rb_str_set_len(result, len);
+ rb_enc_associate(result, fs_enc_check(result, fname));
}
if (p > buf && p[-1] == '/')
- --p;
+ --p;
else {
- rb_str_set_len(result, p-buf);
- BUFCHECK(bdiff + 1 >= buflen);
- *p = '/';
+ rb_str_set_len(result, p-buf);
+ BUFCHECK(bdiff + 1 >= buflen);
+ *p = '/';
}
rb_str_set_len(result, p-buf+1);
@@ -3774,213 +3869,213 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
b = s;
while (*s) {
- switch (*s) {
- case '.':
- if (b == s++) { /* beginning of path element */
- switch (*s) {
- case '\0':
- b = s;
- break;
- case '.':
- if (*(s+1) == '\0' || isdirsep(*(s+1))) {
- /* We must go back to the parent */
- char *n;
- *p = '\0';
- if (!(n = strrdirsep(root, p, enc))) {
- *p = '/';
- }
- else {
- p = n;
- }
- b = ++s;
- }
+ switch (*s) {
+ case '.':
+ if (b == s++) { /* beginning of path element */
+ switch (*s) {
+ case '\0':
+ b = s;
+ break;
+ case '.':
+ if (*(s+1) == '\0' || isdirsep(*(s+1))) {
+ /* We must go back to the parent */
+ char *n;
+ *p = '\0';
+ if (!(n = strrdirsep(root, p, enc))) {
+ *p = '/';
+ }
+ else {
+ p = n;
+ }
+ b = ++s;
+ }
#if USE_NTFS
- else {
- do ++s; while (istrailinggarbage(*s));
- }
+ else {
+ do ++s; while (istrailinggarbage(*s));
+ }
#endif
- break;
- case '/':
+ break;
+ case '/':
#if defined DOSISH || defined __CYGWIN__
- case '\\':
-#endif
- b = ++s;
- break;
- default:
- /* ordinary path element, beginning don't move */
- break;
- }
- }
+ case '\\':
+#endif
+ b = ++s;
+ break;
+ default:
+ /* ordinary path element, beginning don't move */
+ break;
+ }
+ }
#if USE_NTFS
- else {
- --s;
- case ' ': {
- const char *e = s;
- while (s < fend && istrailinggarbage(*s)) s++;
- if (s >= fend) {
- s = e;
- goto endpath;
- }
- }
- }
-#endif
- break;
- case '/':
+ else {
+ --s;
+ case ' ': {
+ const char *e = s;
+ while (s < fend && istrailinggarbage(*s)) s++;
+ if (s >= fend) {
+ s = e;
+ goto endpath;
+ }
+ }
+ }
+#endif
+ break;
+ case '/':
#if defined DOSISH || defined __CYGWIN__
- case '\\':
-#endif
- if (s > b) {
- WITH_ROOTDIFF(BUFCOPY(b, s-b));
- *p = '/';
- }
- b = ++s;
- break;
- default:
+ case '\\':
+#endif
+ if (s > b) {
+ WITH_ROOTDIFF(BUFCOPY(b, s-b));
+ *p = '/';
+ }
+ b = ++s;
+ break;
+ default:
#ifdef __APPLE__
- {
- int n = ignored_char_p(s, fend, enc);
- if (n) {
- if (s > b) {
- WITH_ROOTDIFF(BUFCOPY(b, s-b));
- *p = '\0';
- }
- b = s += n;
- break;
- }
- }
-#endif
- Inc(s, fend, enc);
- break;
- }
+ {
+ int n = ignored_char_p(s, fend, enc);
+ if (n) {
+ if (s > b) {
+ WITH_ROOTDIFF(BUFCOPY(b, s-b));
+ *p = '\0';
+ }
+ b = s += n;
+ break;
+ }
+ }
+#endif
+ Inc(s, fend, enc);
+ break;
+ }
}
if (s > b) {
#if USE_NTFS
# if USE_NTFS_ADS
- static const char prime[] = ":$DATA";
- enum {prime_len = sizeof(prime) -1};
+ static const char prime[] = ":$DATA";
+ enum {prime_len = sizeof(prime) -1};
# endif
endpath:
# if USE_NTFS_ADS
- if (s > b + prime_len && strncasecmp(s - prime_len, prime, prime_len) == 0) {
- /* alias of stream */
- /* get rid of a bug of x64 VC++ */
- if (isADS(*(s - (prime_len+1)))) {
- s -= prime_len + 1; /* prime */
- }
- else if (memchr(b, ':', s - prime_len - b)) {
- s -= prime_len; /* alternative */
- }
- }
+ if (s > b + prime_len && strncasecmp(s - prime_len, prime, prime_len) == 0) {
+ /* alias of stream */
+ /* get rid of a bug of x64 VC++ */
+ if (isADS(*(s - (prime_len+1)))) {
+ s -= prime_len + 1; /* prime */
+ }
+ else if (memchr(b, ':', s - prime_len - b)) {
+ s -= prime_len; /* alternative */
+ }
+ }
# endif
#endif
- BUFCOPY(b, s-b);
- rb_str_set_len(result, p-buf);
+ BUFCOPY(b, s-b);
+ rb_str_set_len(result, p-buf);
}
if (p == skiproot(buf, p + !!*p, enc) - 1) p++;
#if USE_NTFS
*p = '\0';
if ((s = strrdirsep(b = buf, p, enc)) != 0 && !strpbrk(s, "*?")) {
- VALUE tmp, v;
- size_t len;
- int encidx;
- WCHAR *wstr;
- WIN32_FIND_DATAW wfd;
- HANDLE h;
+ VALUE tmp, v;
+ size_t len;
+ int encidx;
+ WCHAR *wstr;
+ WIN32_FIND_DATAW wfd;
+ HANDLE h;
#ifdef __CYGWIN__
#ifdef HAVE_CYGWIN_CONV_PATH
- char *w32buf = NULL;
- const int flags = CCP_POSIX_TO_WIN_A | CCP_RELATIVE;
+ char *w32buf = NULL;
+ const int flags = CCP_POSIX_TO_WIN_A | CCP_RELATIVE;
#else
- char w32buf[MAXPATHLEN];
-#endif
- const char *path;
- ssize_t bufsize;
- int lnk_added = 0, is_symlink = 0;
- struct stat st;
- p = (char *)s;
- len = strlen(p);
- if (lstat_without_gvl(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
- is_symlink = 1;
- if (len > 4 && STRCASECMP(p + len - 4, ".lnk") != 0) {
- lnk_added = 1;
- }
- }
- path = *buf ? buf : "/";
+ char w32buf[MAXPATHLEN];
+#endif
+ const char *path;
+ ssize_t bufsize;
+ int lnk_added = 0, is_symlink = 0;
+ struct stat st;
+ p = (char *)s;
+ len = strlen(p);
+ if (lstat_without_gvl(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
+ is_symlink = 1;
+ if (len > 4 && STRCASECMP(p + len - 4, ".lnk") != 0) {
+ lnk_added = 1;
+ }
+ }
+ path = *buf ? buf : "/";
#ifdef HAVE_CYGWIN_CONV_PATH
- bufsize = cygwin_conv_path(flags, path, NULL, 0);
- if (bufsize > 0) {
- bufsize += len;
- if (lnk_added) bufsize += 4;
- w32buf = ALLOCA_N(char, bufsize);
- if (cygwin_conv_path(flags, path, w32buf, bufsize) == 0) {
- b = w32buf;
- }
- }
+ bufsize = cygwin_conv_path(flags, path, NULL, 0);
+ if (bufsize > 0) {
+ bufsize += len;
+ if (lnk_added) bufsize += 4;
+ w32buf = ALLOCA_N(char, bufsize);
+ if (cygwin_conv_path(flags, path, w32buf, bufsize) == 0) {
+ b = w32buf;
+ }
+ }
#else
- bufsize = MAXPATHLEN;
- if (cygwin_conv_to_win32_path(path, w32buf) == 0) {
- b = w32buf;
- }
-#endif
- if (is_symlink && b == w32buf) {
- *p = '\\';
- strlcat(w32buf, p, bufsize);
- if (lnk_added) {
- strlcat(w32buf, ".lnk", bufsize);
- }
- }
- else {
- lnk_added = 0;
- }
- *p = '/';
-#endif
- rb_str_set_len(result, p - buf + strlen(p));
- encidx = ENCODING_GET(result);
- tmp = result;
- if (encidx != ENCINDEX_UTF_8 && rb_enc_str_coderange(result) != ENC_CODERANGE_7BIT) {
- tmp = rb_str_encode_ospath(result);
- }
- len = MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(tmp), -1, NULL, 0);
- wstr = ALLOCV_N(WCHAR, v, len);
- MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(tmp), -1, wstr, len);
- if (tmp != result) rb_str_set_len(tmp, 0);
- h = FindFirstFileW(wstr, &wfd);
- ALLOCV_END(v);
- if (h != INVALID_HANDLE_VALUE) {
- size_t wlen;
- FindClose(h);
- len = lstrlenW(wfd.cFileName);
+ bufsize = MAXPATHLEN;
+ if (cygwin_conv_to_win32_path(path, w32buf) == 0) {
+ b = w32buf;
+ }
+#endif
+ if (is_symlink && b == w32buf) {
+ *p = '\\';
+ strlcat(w32buf, p, bufsize);
+ if (lnk_added) {
+ strlcat(w32buf, ".lnk", bufsize);
+ }
+ }
+ else {
+ lnk_added = 0;
+ }
+ *p = '/';
+#endif
+ rb_str_set_len(result, p - buf + strlen(p));
+ encidx = ENCODING_GET(result);
+ tmp = result;
+ if (encidx != ENCINDEX_UTF_8 && !is_ascii_string(result)) {
+ tmp = rb_str_encode_ospath(result);
+ }
+ len = MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(tmp), -1, NULL, 0);
+ wstr = ALLOCV_N(WCHAR, v, len);
+ MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(tmp), -1, wstr, len);
+ if (tmp != result) rb_str_set_len(tmp, 0);
+ h = FindFirstFileW(wstr, &wfd);
+ ALLOCV_END(v);
+ if (h != INVALID_HANDLE_VALUE) {
+ size_t wlen;
+ FindClose(h);
+ len = lstrlenW(wfd.cFileName);
#ifdef __CYGWIN__
- if (lnk_added && len > 4 &&
- wcscasecmp(wfd.cFileName + len - 4, L".lnk") == 0) {
- wfd.cFileName[len -= 4] = L'\0';
- }
+ if (lnk_added && len > 4 &&
+ wcscasecmp(wfd.cFileName + len - 4, L".lnk") == 0) {
+ wfd.cFileName[len -= 4] = L'\0';
+ }
#else
- p = (char *)s;
-#endif
- ++p;
- wlen = (int)len;
- len = WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, NULL, 0, NULL, NULL);
- if (tmp == result) {
- BUFCHECK(bdiff + len >= buflen);
- WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, p, len + 1, NULL, NULL);
- }
- else {
- rb_str_modify_expand(tmp, len);
- WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, RSTRING_PTR(tmp), len + 1, NULL, NULL);
- rb_str_cat_conv_enc_opts(result, bdiff, RSTRING_PTR(tmp), len,
- rb_utf8_encoding(), 0, Qnil);
- BUFINIT();
- rb_str_resize(tmp, 0);
- }
- p += len;
- }
+ p = (char *)s;
+#endif
+ ++p;
+ wlen = (int)len;
+ len = WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, NULL, 0, NULL, NULL);
+ if (tmp == result) {
+ BUFCHECK(bdiff + len >= buflen);
+ WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, p, len + 1, NULL, NULL);
+ }
+ else {
+ rb_str_modify_expand(tmp, len);
+ WideCharToMultiByte(CP_UTF8, 0, wfd.cFileName, wlen, RSTRING_PTR(tmp), len + 1, NULL, NULL);
+ rb_str_cat_conv_enc_opts(result, bdiff, RSTRING_PTR(tmp), len,
+ rb_utf8_encoding(), 0, Qnil);
+ BUFINIT();
+ rb_str_resize(tmp, 0);
+ }
+ p += len;
+ }
#ifdef __CYGWIN__
- else {
- p += strlen(p);
- }
+ else {
+ p += strlen(p);
+ }
#endif
}
#endif
@@ -3992,7 +4087,7 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
}
#endif /* _WIN32 */
-#define EXPAND_PATH_BUFFER() rb_usascii_str_new(0, MAXPATHLEN + 2)
+#define EXPAND_PATH_BUFFER() rb_usascii_str_new(0, 1)
static VALUE
str_shrink(VALUE str)
@@ -4129,27 +4224,27 @@ enum rb_realpath_mode {
static int
realpath_rec(long *prefixlenp, VALUE *resolvedp, const char *unresolved, VALUE fallback,
- VALUE loopcheck, enum rb_realpath_mode mode, int last)
+ VALUE loopcheck, enum rb_realpath_mode mode, int last)
{
const char *pend = unresolved + strlen(unresolved);
rb_encoding *enc = rb_enc_get(*resolvedp);
ID resolving;
CONST_ID(resolving, "resolving");
while (unresolved < pend) {
- const char *testname = unresolved;
- const char *unresolved_firstsep = rb_enc_path_next(unresolved, pend, enc);
- long testnamelen = unresolved_firstsep - unresolved;
- const char *unresolved_nextname = unresolved_firstsep;
+ const char *testname = unresolved;
+ const char *unresolved_firstsep = rb_enc_path_next(unresolved, pend, enc);
+ long testnamelen = unresolved_firstsep - unresolved;
+ const char *unresolved_nextname = unresolved_firstsep;
while (unresolved_nextname < pend && isdirsep(*unresolved_nextname))
- unresolved_nextname++;
+ unresolved_nextname++;
unresolved = unresolved_nextname;
if (testnamelen == 1 && testname[0] == '.') {
}
else if (testnamelen == 2 && testname[0] == '.' && testname[1] == '.') {
if (*prefixlenp < RSTRING_LEN(*resolvedp)) {
- const char *resolved_str = RSTRING_PTR(*resolvedp);
- const char *resolved_names = resolved_str + *prefixlenp;
- const char *lastsep = strrdirsep(resolved_names, resolved_str + RSTRING_LEN(*resolvedp), enc);
+ const char *resolved_str = RSTRING_PTR(*resolvedp);
+ const char *resolved_names = resolved_str + *prefixlenp;
+ const char *lastsep = strrdirsep(resolved_names, resolved_str + RSTRING_LEN(*resolvedp), enc);
long len = lastsep ? lastsep - resolved_names : 0;
rb_str_resize(*resolvedp, *prefixlenp + len);
}
@@ -4160,20 +4255,20 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, const char *unresolved, VALUE f
if (*prefixlenp < RSTRING_LEN(testpath))
rb_str_cat2(testpath, "/");
#if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
- if (*prefixlenp > 1 && *prefixlenp == RSTRING_LEN(testpath)) {
- const char *prefix = RSTRING_PTR(testpath);
- const char *last = rb_enc_left_char_head(prefix, prefix + *prefixlenp - 1, prefix + *prefixlenp, enc);
- if (!isdirsep(*last)) rb_str_cat2(testpath, "/");
- }
+ if (*prefixlenp > 1 && *prefixlenp == RSTRING_LEN(testpath)) {
+ const char *prefix = RSTRING_PTR(testpath);
+ const char *last = rb_enc_left_char_head(prefix, prefix + *prefixlenp - 1, prefix + *prefixlenp, enc);
+ if (!isdirsep(*last)) rb_str_cat2(testpath, "/");
+ }
#endif
rb_str_cat(testpath, testname, testnamelen);
checkval = rb_hash_aref(loopcheck, testpath);
if (!NIL_P(checkval)) {
if (checkval == ID2SYM(resolving)) {
- if (mode == RB_REALPATH_CHECK) {
- errno = ELOOP;
- return -1;
- }
+ if (mode == RB_REALPATH_CHECK) {
+ errno = ELOOP;
+ return -1;
+ }
rb_syserr_fail_path(ELOOP, testpath);
}
else {
@@ -4185,49 +4280,49 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, const char *unresolved, VALUE f
int ret;
ret = lstat_without_gvl(RSTRING_PTR(testpath), &sbuf);
if (ret == -1) {
- int e = errno;
- if (e == ENOENT && !NIL_P(fallback)) {
- if (stat_without_gvl(RSTRING_PTR(fallback), &sbuf) == 0) {
- rb_str_replace(*resolvedp, fallback);
- return 0;
- }
- }
- if (mode == RB_REALPATH_CHECK) return -1;
- if (e == ENOENT) {
- if (mode == RB_REALPATH_STRICT || !last || *unresolved_firstsep)
- rb_syserr_fail_path(e, testpath);
+ int e = errno;
+ if (e == ENOENT && !NIL_P(fallback)) {
+ if (stat_without_gvl(RSTRING_PTR(fallback), &sbuf) == 0) {
+ rb_str_replace(*resolvedp, fallback);
+ return 0;
+ }
+ }
+ if (mode == RB_REALPATH_CHECK) return -1;
+ if (e == ENOENT) {
+ if (mode == RB_REALPATH_STRICT || !last || *unresolved_firstsep)
+ rb_syserr_fail_path(e, testpath);
*resolvedp = testpath;
break;
}
else {
- rb_syserr_fail_path(e, testpath);
+ rb_syserr_fail_path(e, testpath);
}
}
#ifdef HAVE_READLINK
if (S_ISLNK(sbuf.st_mode)) {
- VALUE link;
- VALUE link_orig = Qnil;
- const char *link_prefix, *link_names;
+ VALUE link;
+ VALUE link_orig = Qnil;
+ const char *link_prefix, *link_names;
long link_prefixlen;
rb_hash_aset(loopcheck, testpath, ID2SYM(resolving));
- link = rb_readlink(testpath, enc);
+ link = rb_readlink(testpath, enc);
link_prefix = RSTRING_PTR(link);
- link_names = skipprefixroot(link_prefix, link_prefix + RSTRING_LEN(link), rb_enc_get(link));
- link_prefixlen = link_names - link_prefix;
- if (link_prefixlen > 0) {
- rb_encoding *tmpenc, *linkenc = rb_enc_get(link);
- link_orig = link;
- link = rb_str_subseq(link, 0, link_prefixlen);
- tmpenc = rb_enc_check(*resolvedp, link);
- if (tmpenc != linkenc) link = rb_str_conv_enc(link, linkenc, tmpenc);
- *resolvedp = link;
- *prefixlenp = link_prefixlen;
- }
- if (realpath_rec(prefixlenp, resolvedp, link_names, testpath,
- loopcheck, mode, !*unresolved_firstsep))
- return -1;
- RB_GC_GUARD(link_orig);
- rb_hash_aset(loopcheck, testpath, rb_str_dup_frozen(*resolvedp));
+ link_names = skipprefixroot(link_prefix, link_prefix + RSTRING_LEN(link), rb_enc_get(link));
+ link_prefixlen = link_names - link_prefix;
+ if (link_prefixlen > 0) {
+ rb_encoding *tmpenc, *linkenc = rb_enc_get(link);
+ link_orig = link;
+ link = rb_str_subseq(link, 0, link_prefixlen);
+ tmpenc = fs_enc_check(*resolvedp, link);
+ if (tmpenc != linkenc) link = rb_str_conv_enc(link, linkenc, tmpenc);
+ *resolvedp = link;
+ *prefixlenp = link_prefixlen;
+ }
+ if (realpath_rec(prefixlenp, resolvedp, link_names, testpath,
+ loopcheck, mode, !*unresolved_firstsep))
+ return -1;
+ RB_GC_GUARD(link_orig);
+ rb_hash_aset(loopcheck, testpath, rb_str_dup_frozen(*resolvedp));
}
else
#endif
@@ -4273,11 +4368,11 @@ rb_check_realpath_emulate(VALUE basedir, VALUE path, rb_encoding *origenc, enum
}
if (!NIL_P(basedir)) {
- RSTRING_GETMEM(basedir, ptr, len);
- basedir_names = skipprefixroot(ptr, ptr + len, rb_enc_get(basedir));
+ RSTRING_GETMEM(basedir, ptr, len);
+ basedir_names = skipprefixroot(ptr, ptr + len, rb_enc_get(basedir));
if (ptr != basedir_names) {
- resolved = rb_str_subseq(basedir, 0, basedir_names - ptr);
- goto root_found;
+ resolved = rb_str_subseq(basedir, 0, basedir_names - ptr);
+ goto root_found;
}
}
@@ -4296,38 +4391,38 @@ rb_check_realpath_emulate(VALUE basedir, VALUE path, rb_encoding *origenc, enum
}
#ifdef FILE_ALT_SEPARATOR
while (prefixptr < ptr) {
- if (*prefixptr == FILE_ALT_SEPARATOR) {
- *prefixptr = '/';
- }
- Inc(prefixptr, pend, enc);
+ if (*prefixptr == FILE_ALT_SEPARATOR) {
+ *prefixptr = '/';
+ }
+ Inc(prefixptr, pend, enc);
}
#endif
switch (rb_enc_to_index(enc)) {
- case ENCINDEX_ASCII:
+ case ENCINDEX_ASCII_8BIT:
case ENCINDEX_US_ASCII:
- rb_enc_associate_index(resolved, rb_filesystem_encindex());
+ rb_enc_associate_index(resolved, rb_filesystem_encindex());
}
loopcheck = rb_hash_new();
if (curdir_names) {
- if (realpath_rec(&prefixlen, &resolved, curdir_names, Qnil, loopcheck, mode, 0))
- return Qnil;
+ if (realpath_rec(&prefixlen, &resolved, curdir_names, Qnil, loopcheck, mode, 0))
+ return Qnil;
}
if (basedir_names) {
- if (realpath_rec(&prefixlen, &resolved, basedir_names, Qnil, loopcheck, mode, 0))
- return Qnil;
+ if (realpath_rec(&prefixlen, &resolved, basedir_names, Qnil, loopcheck, mode, 0))
+ return Qnil;
}
if (realpath_rec(&prefixlen, &resolved, path_names, Qnil, loopcheck, mode, 1))
- return Qnil;
+ return Qnil;
if (origenc && origenc != rb_enc_get(resolved)) {
- if (rb_enc_str_asciionly_p(resolved)) {
- rb_enc_associate(resolved, origenc);
- }
- else {
- resolved = rb_str_conv_enc(resolved, NULL, origenc);
- }
+ if (rb_enc_str_asciionly_p(resolved)) {
+ rb_enc_associate(resolved, origenc);
+ }
+ else {
+ resolved = rb_str_conv_enc(resolved, NULL, origenc);
+ }
}
RB_GC_GUARD(unresolved_path);
@@ -4337,6 +4432,21 @@ rb_check_realpath_emulate(VALUE basedir, VALUE path, rb_encoding *origenc, enum
static VALUE rb_file_join(VALUE ary);
+#ifndef HAVE_REALPATH
+static VALUE
+rb_check_realpath_emulate_try(VALUE arg)
+{
+ VALUE *args = (VALUE *)arg;
+ return rb_check_realpath_emulate(args[0], args[1], (rb_encoding *)args[2], RB_REALPATH_CHECK);
+}
+
+static VALUE
+rb_check_realpath_emulate_rescue(VALUE arg, VALUE exc)
+{
+ return Qnil;
+}
+#endif /* HAVE_REALPATH */
+
static VALUE
rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum rb_realpath_mode mode)
{
@@ -4344,7 +4454,6 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
VALUE unresolved_path;
char *resolved_ptr = NULL;
VALUE resolved;
- struct stat st;
if (mode == RB_REALPATH_DIR) {
return rb_check_realpath_emulate(basedir, path, origenc, mode);
@@ -4375,14 +4484,17 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
resolved = ospath_new(resolved_ptr, strlen(resolved_ptr), rb_filesystem_encoding());
free(resolved_ptr);
+# if !defined(__LINUX__) && !defined(__APPLE__)
/* As `resolved` is a String in the filesystem encoding, no
* conversion is needed */
+ struct stat st;
if (stat_without_gvl(RSTRING_PTR(resolved), &st) < 0) {
if (mode == RB_REALPATH_CHECK) {
return Qnil;
}
rb_sys_fail_path(unresolved_path);
}
+# endif
if (origenc && origenc != rb_enc_get(resolved)) {
if (!rb_enc_str_asciionly_p(resolved)) {
@@ -4391,9 +4503,9 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
rb_enc_associate(resolved, origenc);
}
- if (rb_enc_str_coderange(resolved) == ENC_CODERANGE_BROKEN) {
+ if (is_broken_string(resolved)) {
rb_enc_associate(resolved, rb_filesystem_encoding());
- if (rb_enc_str_coderange(resolved) == ENC_CODERANGE_BROKEN) {
+ if (is_broken_string(resolved)) {
rb_enc_associate(resolved, rb_ascii8bit_encoding());
}
}
@@ -4401,7 +4513,18 @@ rb_check_realpath_internal(VALUE basedir, VALUE path, rb_encoding *origenc, enum
RB_GC_GUARD(unresolved_path);
return resolved;
#else
- return rb_check_realpath_emulate(basedir, path, origenc, mode);
+ if (mode == RB_REALPATH_CHECK) {
+ VALUE arg[3];
+ arg[0] = basedir;
+ arg[1] = path;
+ arg[2] = (VALUE)origenc;
+
+ return rb_rescue(rb_check_realpath_emulate_try, (VALUE)arg,
+ rb_check_realpath_emulate_rescue, Qnil);
+ }
+ else {
+ return rb_check_realpath_emulate(basedir, path, origenc, mode);
+ }
#endif /* HAVE_REALPATH */
}
@@ -4409,7 +4532,7 @@ VALUE
rb_realpath_internal(VALUE basedir, VALUE path, int strict)
{
const enum rb_realpath_mode mode =
- strict ? RB_REALPATH_STRICT : RB_REALPATH_DIR;
+ strict ? RB_REALPATH_STRICT : RB_REALPATH_DIR;
return rb_check_realpath_internal(basedir, path, rb_enc_get(path), mode);
}
@@ -4473,15 +4596,15 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc)
c = rb_enc_codepoint_len(e, e + l2, &len1, enc);
if (rb_enc_ascget(e + len1, e + l2, &len2, enc) == '*' && len1 + len2 == l2) {
- if (c == '.') return l0;
- s = p;
- e = p + l1;
- last = e;
- while (s < e) {
- if (rb_enc_codepoint_len(s, e, &len1, enc) == c) last = s;
- s += len1;
- }
- return last - p;
+ if (c == '.') return l0;
+ s = p;
+ e = p + l1;
+ last = e;
+ while (s < e) {
+ if (rb_enc_codepoint_len(s, e, &len1, enc) == c) last = s;
+ s += len1;
+ }
+ return last - p;
}
if (l1 < l2) return l1;
@@ -4493,7 +4616,7 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc)
#define fncomp strncmp
#endif
if (fncomp(s, e, l2) == 0) {
- return l1-l2;
+ return l1-l2;
}
return 0;
}
@@ -4513,51 +4636,51 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin
root = name;
#endif
while (isdirsep(*name))
- name++;
+ name++;
if (!*name) {
- p = name - 1;
- f = 1;
+ p = name - 1;
+ f = 1;
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
- if (name != root) {
- /* has slashes */
- }
+ if (name != root) {
+ /* has slashes */
+ }
#ifdef DOSISH_DRIVE_LETTER
- else if (*p == ':') {
- p++;
- f = 0;
- }
+ else if (*p == ':') {
+ p++;
+ f = 0;
+ }
#endif
#ifdef DOSISH_UNC
- else {
- p = "/";
- }
+ else {
+ p = "/";
+ }
#endif
#endif
}
else {
- if (!(p = strrdirsep(name, end, enc))) {
- p = name;
- }
- else {
- while (isdirsep(*p)) p++; /* skip last / */
- }
+ if (!(p = strrdirsep(name, end, enc))) {
+ p = name;
+ }
+ else {
+ while (isdirsep(*p)) p++; /* skip last / */
+ }
#if USE_NTFS
- n = ntfs_tail(p, end, enc) - p;
+ n = ntfs_tail(p, end, enc) - p;
#else
- n = chompdirsep(p, end, enc) - p;
+ n = chompdirsep(p, end, enc) - p;
#endif
- for (q = p; q - p < n && *q == '.'; q++);
- for (e = 0; q - p < n; Inc(q, end, enc)) {
- if (*q == '.') e = q;
- }
- if (e) f = e - p;
- else f = n;
+ for (q = p; q - p < n && *q == '.'; q++);
+ for (e = 0; q - p < n; Inc(q, end, enc)) {
+ if (*q == '.') e = q;
+ }
+ if (e) f = e - p;
+ else f = n;
}
if (baselen)
- *baselen = f;
+ *baselen = f;
if (alllen)
- *alllen = n;
+ *alllen = n;
return p;
}
@@ -4588,33 +4711,33 @@ rb_file_s_basename(int argc, VALUE *argv, VALUE _)
fext = Qnil;
if (rb_check_arity(argc, 1, 2) == 2) {
- fext = argv[1];
- StringValue(fext);
- enc = check_path_encoding(fext);
+ fext = argv[1];
+ StringValue(fext);
+ enc = check_path_encoding(fext);
}
fname = argv[0];
FilePathStringValue(fname);
if (NIL_P(fext) || !(enc = rb_enc_compatible(fname, fext))) {
- enc = rb_enc_get(fname);
- fext = Qnil;
+ enc = rb_enc_get(fname);
+ fext = Qnil;
}
if ((n = RSTRING_LEN(fname)) == 0 || !*(name = RSTRING_PTR(fname)))
- return rb_str_new_shared(fname);
+ return rb_str_new_shared(fname);
p = ruby_enc_find_basename(name, &f, &n, enc);
if (n >= 0) {
- if (NIL_P(fext)) {
- f = n;
- }
- else {
- const char *fp;
- fp = StringValueCStr(fext);
- if (!(f = rmext(p, f, n, fp, RSTRING_LEN(fext), enc))) {
- f = n;
- }
- RB_GC_GUARD(fext);
- }
- if (f == RSTRING_LEN(fname)) return rb_str_new_shared(fname);
+ if (NIL_P(fext)) {
+ f = n;
+ }
+ else {
+ const char *fp;
+ fp = StringValueCStr(fext);
+ if (!(f = rmext(p, f, n, fp, RSTRING_LEN(fext), enc))) {
+ f = n;
+ }
+ RB_GC_GUARD(fext);
+ }
+ if (f == RSTRING_LEN(fname)) return rb_str_new_shared(fname);
}
basename = rb_str_new(p, f);
@@ -4622,9 +4745,11 @@ rb_file_s_basename(int argc, VALUE *argv, VALUE _)
return basename;
}
+static VALUE rb_file_dirname_n(VALUE fname, int n);
+
/*
* call-seq:
- * File.dirname(file_name) -> dir_name
+ * File.dirname(file_name, level = 1) -> dir_name
*
* Returns all components of the filename given in <i>file_name</i>
* except the last one (after first stripping trailing separators).
@@ -4633,21 +4758,40 @@ rb_file_s_basename(int argc, VALUE *argv, VALUE _)
* not <code>nil</code>.
*
* File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"
+ *
+ * If +level+ is given, removes the last +level+ components, not only
+ * one.
+ *
+ * File.dirname("/home/gumby/work/ruby.rb", 2) #=> "/home/gumby"
+ * File.dirname("/home/gumby/work/ruby.rb", 4) #=> "/"
*/
static VALUE
-rb_file_s_dirname(VALUE klass, VALUE fname)
+rb_file_s_dirname(int argc, VALUE *argv, VALUE klass)
{
- return rb_file_dirname(fname);
+ int n = 1;
+ if ((argc = rb_check_arity(argc, 1, 2)) > 1) {
+ n = NUM2INT(argv[1]);
+ }
+ return rb_file_dirname_n(argv[0], n);
}
VALUE
rb_file_dirname(VALUE fname)
{
+ return rb_file_dirname_n(fname, 1);
+}
+
+static VALUE
+rb_file_dirname_n(VALUE fname, int n)
+{
const char *name, *root, *p, *end;
VALUE dirname;
rb_encoding *enc;
+ VALUE sepsv = 0;
+ const char **seps;
+ if (n < 0) rb_raise(rb_eArgError, "negative level: %d", n);
FilePathStringValue(fname);
name = StringValueCStr(fname);
end = name + RSTRING_LEN(fname);
@@ -4655,29 +4799,58 @@ rb_file_dirname(VALUE fname)
root = skiproot(name, end, enc);
#ifdef DOSISH_UNC
if (root > name + 1 && isdirsep(*name))
- root = skipprefix(name = root - 2, end, enc);
+ root = skipprefix(name = root - 2, end, enc);
#else
if (root > name + 1)
- name = root - 1;
+ name = root - 1;
#endif
- p = strrdirsep(root, end, enc);
- if (!p) {
- p = root;
+ if (n > (end - root + 1) / 2) {
+ p = root;
+ }
+ else {
+ int i;
+ switch (n) {
+ case 0:
+ p = end;
+ break;
+ case 1:
+ if (!(p = strrdirsep(root, end, enc))) p = root;
+ break;
+ default:
+ seps = ALLOCV_N(const char *, sepsv, n);
+ for (i = 0; i < n; ++i) seps[i] = root;
+ i = 0;
+ for (p = root; p < end; ) {
+ if (isdirsep(*p)) {
+ const char *tmp = p++;
+ while (p < end && isdirsep(*p)) p++;
+ if (p >= end) break;
+ seps[i++] = tmp;
+ if (i == n) i = 0;
+ }
+ else {
+ Inc(p, end, enc);
+ }
+ }
+ p = seps[i];
+ ALLOCV_END(sepsv);
+ break;
+ }
}
if (p == name)
- return rb_usascii_str_new2(".");
+ return rb_usascii_str_new2(".");
#ifdef DOSISH_DRIVE_LETTER
if (has_drive_letter(name) && isdirsep(*(name + 2))) {
- const char *top = skiproot(name + 2, end, enc);
- dirname = rb_str_new(name, 3);
- rb_str_cat(dirname, top, p - top);
+ const char *top = skiproot(name + 2, end, enc);
+ dirname = rb_str_new(name, 3);
+ rb_str_cat(dirname, top, p - top);
}
else
#endif
dirname = rb_str_new(name, p - name);
#ifdef DOSISH_DRIVE_LETTER
if (has_drive_letter(name) && root == name + 2 && p - name == 2)
- rb_str_cat(dirname, ".", 1);
+ rb_str_cat(dirname, ".", 1);
#endif
rb_enc_copy(dirname, fname);
return dirname;
@@ -4692,7 +4865,7 @@ rb_file_dirname(VALUE fname)
* dotfile top 0
* end with dot dot 1
* .ext dot len of .ext
- * .ext:stream dot len of .ext without :stream (NT only)
+ * .ext:stream dot len of .ext without :stream (NTFS only)
*
*/
const char *
@@ -4702,48 +4875,48 @@ ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
p = strrdirsep(name, end, enc); /* get the last path component */
if (!p)
- p = name;
+ p = name;
else
- do name = ++p; while (isdirsep(*p));
+ do name = ++p; while (isdirsep(*p));
e = 0;
while (*p && *p == '.') p++;
while (*p) {
- if (*p == '.' || istrailinggarbage(*p)) {
+ if (*p == '.' || istrailinggarbage(*p)) {
#if USE_NTFS
- const char *last = p++, *dot = last;
- while (istrailinggarbage(*p)) {
- if (*p == '.') dot = p;
- p++;
- }
- if (!*p || isADS(*p)) {
- p = last;
- break;
- }
- if (*last == '.' || dot > last) e = dot;
- continue;
+ const char *last = p++, *dot = last;
+ while (istrailinggarbage(*p)) {
+ if (*p == '.') dot = p;
+ p++;
+ }
+ if (!*p || isADS(*p)) {
+ p = last;
+ break;
+ }
+ if (*last == '.' || dot > last) e = dot;
+ continue;
#else
- e = p; /* get the last dot of the last component */
+ e = p; /* get the last dot of the last component */
#endif
- }
+ }
#if USE_NTFS
- else if (isADS(*p)) {
- break;
- }
+ else if (isADS(*p)) {
+ break;
+ }
#endif
- else if (isdirsep(*p))
- break;
- Inc(p, end, enc);
+ else if (isdirsep(*p))
+ break;
+ Inc(p, end, enc);
}
if (len) {
- /* no dot, or the only dot is first or end? */
- if (!e || e == name)
- *len = 0;
- else if (e+1 == p)
- *len = 1;
- else
- *len = p - e;
+ /* no dot, or the only dot is first or end? */
+ if (!e || e == name)
+ *len = 0;
+ else if (e+1 == p)
+ *len = 1;
+ else
+ *len = p - e;
}
return e;
}
@@ -4786,7 +4959,7 @@ rb_file_s_extname(VALUE klass, VALUE fname)
len = RSTRING_LEN(fname);
e = ruby_enc_find_extname(name, &len, rb_enc_get(fname));
if (len < 1)
- return rb_str_new(0, 0);
+ return rb_str_new(0, 0);
extname = rb_str_subseq(fname, e - name, len); /* keep the dot, too! */
return extname;
}
@@ -4846,53 +5019,53 @@ rb_file_join(VALUE ary)
len = 1;
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
- if (RB_TYPE_P(tmp, T_STRING)) {
- check_path_encoding(tmp);
- len += RSTRING_LEN(tmp);
- }
- else {
- len += 10;
- }
+ tmp = RARRAY_AREF(ary, i);
+ if (RB_TYPE_P(tmp, T_STRING)) {
+ check_path_encoding(tmp);
+ len += RSTRING_LEN(tmp);
+ }
+ else {
+ len += 10;
+ }
}
len += RARRAY_LEN(ary) - 1;
result = rb_str_buf_new(len);
RBASIC_CLEAR_CLASS(result);
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
- switch (OBJ_BUILTIN_TYPE(tmp)) {
- case T_STRING:
- if (!checked) check_path_encoding(tmp);
- StringValueCStr(tmp);
- break;
- case T_ARRAY:
- if (ary == tmp) {
- rb_raise(rb_eArgError, "recursive array");
- }
- else {
- tmp = rb_exec_recursive(file_inspect_join, ary, tmp);
- }
- break;
- default:
- FilePathStringValue(tmp);
- checked = FALSE;
- }
- RSTRING_GETMEM(result, name, len);
- if (i == 0) {
- rb_enc_copy(result, tmp);
- }
- else {
- tail = chompdirsep(name, name + len, rb_enc_get(result));
- if (RSTRING_PTR(tmp) && isdirsep(RSTRING_PTR(tmp)[0])) {
- rb_str_set_len(result, tail - name);
- }
- else if (!*tail) {
- rb_str_cat(result, "/", 1);
- }
- }
- enc = rb_enc_check(result, tmp);
- rb_str_buf_append(result, tmp);
- rb_enc_associate(result, enc);
+ tmp = RARRAY_AREF(ary, i);
+ switch (OBJ_BUILTIN_TYPE(tmp)) {
+ case T_STRING:
+ if (!checked) check_path_encoding(tmp);
+ StringValueCStr(tmp);
+ break;
+ case T_ARRAY:
+ if (ary == tmp) {
+ rb_raise(rb_eArgError, "recursive array");
+ }
+ else {
+ tmp = rb_exec_recursive(file_inspect_join, ary, tmp);
+ }
+ break;
+ default:
+ FilePathStringValue(tmp);
+ checked = FALSE;
+ }
+ RSTRING_GETMEM(result, name, len);
+ if (i == 0) {
+ rb_enc_copy(result, tmp);
+ }
+ else {
+ tail = chompdirsep(name, name + len, rb_enc_get(result));
+ if (RSTRING_PTR(tmp) && isdirsep(RSTRING_PTR(tmp)[0])) {
+ rb_str_set_len(result, tail - name);
+ }
+ else if (!*tail) {
+ rb_str_cat(result, "/", 1);
+ }
+ }
+ enc = fs_enc_check(result, tmp);
+ rb_str_buf_append(result, tmp);
+ rb_enc_associate(result, enc);
}
RBASIC_SET_CLASS_RAW(result, rb_cString);
@@ -4916,41 +5089,17 @@ rb_file_s_join(VALUE klass, VALUE args)
return rb_file_join(args);
}
-#if defined(HAVE_TRUNCATE) || defined(HAVE_CHSIZE)
+#if defined(HAVE_TRUNCATE)
struct truncate_arg {
const char *path;
-#if defined(HAVE_TRUNCATE)
-#define NUM2POS(n) NUM2OFFT(n)
- off_t pos;
-#else
-#define NUM2POS(n) NUM2LONG(n)
- long pos;
-#endif
+ rb_off_t pos;
};
static void *
nogvl_truncate(void *ptr)
{
struct truncate_arg *ta = ptr;
-#ifdef HAVE_TRUNCATE
return (void *)(VALUE)truncate(ta->path, ta->pos);
-#else /* defined(HAVE_CHSIZE) */
- {
- int tmpfd = rb_cloexec_open(ta->path, 0, 0);
-
- if (tmpfd < 0)
- return (void *)-1;
- rb_update_max_fd(tmpfd);
- if (chsize(tmpfd, ta->pos) < 0) {
- int e = errno;
- close(tmpfd);
- errno = e;
- return (void *)-1;
- }
- close(tmpfd);
- return 0;
- }
-#endif
}
/*
@@ -4974,32 +5123,25 @@ rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
struct truncate_arg ta;
int r;
- ta.pos = NUM2POS(len);
+ ta.pos = NUM2OFFT(len);
FilePathValue(path);
path = rb_str_encode_ospath(path);
ta.path = StringValueCStr(path);
r = (int)(VALUE)rb_thread_call_without_gvl(nogvl_truncate, &ta,
- RUBY_UBF_IO, NULL);
+ RUBY_UBF_IO, NULL);
if (r < 0)
- rb_sys_fail_path(path);
+ rb_sys_fail_path(path);
return INT2FIX(0);
-#undef NUM2POS
}
#else
#define rb_file_s_truncate rb_f_notimplement
#endif
-#if defined(HAVE_FTRUNCATE) || defined(HAVE_CHSIZE)
+#if defined(HAVE_FTRUNCATE)
struct ftruncate_arg {
int fd;
-#if defined(HAVE_FTRUNCATE)
-#define NUM2POS(n) NUM2OFFT(n)
- off_t pos;
-#else
-#define NUM2POS(n) NUM2LONG(n)
- long pos;
-#endif
+ rb_off_t pos;
};
static VALUE
@@ -5007,11 +5149,7 @@ nogvl_ftruncate(void *ptr)
{
struct ftruncate_arg *fa = ptr;
-#ifdef HAVE_FTRUNCATE
return (VALUE)ftruncate(fa->fd, fa->pos);
-#else /* defined(HAVE_CHSIZE) */
- return (VALUE)chsize(fa->fd, fa->pos);
-#endif
}
/*
@@ -5034,18 +5172,17 @@ rb_file_truncate(VALUE obj, VALUE len)
rb_io_t *fptr;
struct ftruncate_arg fa;
- fa.pos = NUM2POS(len);
+ fa.pos = NUM2OFFT(len);
GetOpenFile(obj, fptr);
if (!(fptr->mode & FMODE_WRITABLE)) {
- rb_raise(rb_eIOError, "not opened for writing");
+ rb_raise(rb_eIOError, "not opened for writing");
}
rb_io_flush_raw(obj, 0);
fa.fd = fptr->fd;
if ((int)rb_thread_io_blocking_region(nogvl_ftruncate, &fa, fa.fd) < 0) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
return INT2FIX(0);
-#undef NUM2POS
}
#else
#define rb_file_truncate rb_f_notimplement
@@ -5078,8 +5215,8 @@ rb_thread_flock(void *data)
#ifdef __CYGWIN__
if (GetLastError() == ERROR_NOT_LOCKED) {
- ret = 0;
- errno = old_errno;
+ ret = 0;
+ errno = old_errno;
}
#endif
return (VALUE)ret;
@@ -5141,33 +5278,33 @@ rb_file_flock(VALUE obj, VALUE operation)
op[0] = fptr->fd;
if (fptr->mode & FMODE_WRITABLE) {
- rb_io_flush_raw(obj, 0);
+ rb_io_flush_raw(obj, 0);
}
while ((int)rb_thread_io_blocking_region(rb_thread_flock, op, fptr->fd) < 0) {
- int e = errno;
- switch (e) {
- case EAGAIN:
- case EACCES:
+ int e = errno;
+ switch (e) {
+ case EAGAIN:
+ case EACCES:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EWOULDBLOCK:
#endif
- if (op1 & LOCK_NB) return Qfalse;
+ if (op1 & LOCK_NB) return Qfalse;
- time.tv_sec = 0;
- time.tv_usec = 100 * 1000; /* 0.1 sec */
- rb_thread_wait_for(time);
- rb_io_check_closed(fptr);
- continue;
+ time.tv_sec = 0;
+ time.tv_usec = 100 * 1000; /* 0.1 sec */
+ rb_thread_wait_for(time);
+ rb_io_check_closed(fptr);
+ continue;
- case EINTR:
+ case EINTR:
#if defined(ERESTART)
- case ERESTART:
+ case ERESTART:
#endif
- break;
+ break;
- default:
- rb_syserr_fail_path(e, fptr->pathv);
- }
+ default:
+ rb_syserr_fail_path(e, fptr->pathv);
+ }
}
return INT2FIX(0);
}
@@ -5180,9 +5317,9 @@ test_check(int n, int argc, VALUE *argv)
n+=1;
rb_check_arity(argc, n, n);
for (i=1; i<n; i++) {
- if (!RB_TYPE_P(argv[i], T_FILE)) {
- FilePathValue(argv[i]);
- }
+ if (!RB_TYPE_P(argv[i], T_FILE)) {
+ FilePathValue(argv[i]);
+ }
}
}
@@ -5205,8 +5342,7 @@ test_check(int n, int argc, VALUE *argv)
* "d" | boolean | True if file1 exists and is a directory
* "e" | boolean | True if file1 exists
* "f" | boolean | True if file1 exists and is a regular file
- * "g" | boolean | True if file1 has the \CF{setgid} bit
- * | | set (false under NT)
+ * "g" | boolean | True if file1 has the setgid bit set
* "G" | boolean | True if file1 exists and has a group
* | | ownership equal to the caller's group
* "k" | boolean | True if file1 exists and has the sticky bit set
@@ -5254,140 +5390,141 @@ rb_f_test(int argc, VALUE *argv, VALUE _)
if (argc == 0) rb_check_arity(argc, 2, 3);
cmd = NUM2CHR(argv[0]);
if (cmd == 0) {
- unknown:
- /* unknown command */
- if (ISPRINT(cmd)) {
- rb_raise(rb_eArgError, "unknown command '%s%c'", cmd == '\'' || cmd == '\\' ? "\\" : "", cmd);
- }
- else {
- rb_raise(rb_eArgError, "unknown command \"\\x%02X\"", cmd);
- }
+ goto unknown;
}
if (strchr("bcdefgGkloOprRsSuwWxXz", cmd)) {
- CHECK(1);
- switch (cmd) {
- case 'b':
- return rb_file_blockdev_p(0, argv[1]);
+ CHECK(1);
+ switch (cmd) {
+ case 'b':
+ return rb_file_blockdev_p(0, argv[1]);
- case 'c':
- return rb_file_chardev_p(0, argv[1]);
+ case 'c':
+ return rb_file_chardev_p(0, argv[1]);
- case 'd':
- return rb_file_directory_p(0, argv[1]);
+ case 'd':
+ return rb_file_directory_p(0, argv[1]);
- case 'e':
- return rb_file_exist_p(0, argv[1]);
+ case 'e':
+ return rb_file_exist_p(0, argv[1]);
- case 'f':
- return rb_file_file_p(0, argv[1]);
+ case 'f':
+ return rb_file_file_p(0, argv[1]);
- case 'g':
- return rb_file_sgid_p(0, argv[1]);
+ case 'g':
+ return rb_file_sgid_p(0, argv[1]);
- case 'G':
- return rb_file_grpowned_p(0, argv[1]);
+ case 'G':
+ return rb_file_grpowned_p(0, argv[1]);
- case 'k':
- return rb_file_sticky_p(0, argv[1]);
+ case 'k':
+ return rb_file_sticky_p(0, argv[1]);
- case 'l':
- return rb_file_symlink_p(0, argv[1]);
+ case 'l':
+ return rb_file_symlink_p(0, argv[1]);
- case 'o':
- return rb_file_owned_p(0, argv[1]);
+ case 'o':
+ return rb_file_owned_p(0, argv[1]);
- case 'O':
- return rb_file_rowned_p(0, argv[1]);
+ case 'O':
+ return rb_file_rowned_p(0, argv[1]);
- case 'p':
- return rb_file_pipe_p(0, argv[1]);
+ case 'p':
+ return rb_file_pipe_p(0, argv[1]);
- case 'r':
- return rb_file_readable_p(0, argv[1]);
+ case 'r':
+ return rb_file_readable_p(0, argv[1]);
- case 'R':
- return rb_file_readable_real_p(0, argv[1]);
+ case 'R':
+ return rb_file_readable_real_p(0, argv[1]);
- case 's':
- return rb_file_size_p(0, argv[1]);
+ case 's':
+ return rb_file_size_p(0, argv[1]);
- case 'S':
- return rb_file_socket_p(0, argv[1]);
+ case 'S':
+ return rb_file_socket_p(0, argv[1]);
- case 'u':
- return rb_file_suid_p(0, argv[1]);
+ case 'u':
+ return rb_file_suid_p(0, argv[1]);
- case 'w':
- return rb_file_writable_p(0, argv[1]);
+ case 'w':
+ return rb_file_writable_p(0, argv[1]);
- case 'W':
- return rb_file_writable_real_p(0, argv[1]);
+ case 'W':
+ return rb_file_writable_real_p(0, argv[1]);
- case 'x':
- return rb_file_executable_p(0, argv[1]);
+ case 'x':
+ return rb_file_executable_p(0, argv[1]);
- case 'X':
- return rb_file_executable_real_p(0, argv[1]);
+ case 'X':
+ return rb_file_executable_real_p(0, argv[1]);
- case 'z':
- return rb_file_zero_p(0, argv[1]);
- }
+ case 'z':
+ return rb_file_zero_p(0, argv[1]);
+ }
}
if (strchr("MAC", cmd)) {
- struct stat st;
- VALUE fname = argv[1];
-
- CHECK(1);
- if (rb_stat(fname, &st) == -1) {
- int e = errno;
- FilePathValue(fname);
- rb_syserr_fail_path(e, fname);
- }
-
- switch (cmd) {
- case 'A':
- return stat_atime(&st);
- case 'M':
- return stat_mtime(&st);
- case 'C':
- return stat_ctime(&st);
- }
+ struct stat st;
+ VALUE fname = argv[1];
+
+ CHECK(1);
+ if (rb_stat(fname, &st) == -1) {
+ int e = errno;
+ FilePathValue(fname);
+ rb_syserr_fail_path(e, fname);
+ }
+
+ switch (cmd) {
+ case 'A':
+ return stat_atime(&st);
+ case 'M':
+ return stat_mtime(&st);
+ case 'C':
+ return stat_ctime(&st);
+ }
}
if (cmd == '-') {
- CHECK(2);
- return rb_file_identical_p(0, argv[1], argv[2]);
+ CHECK(2);
+ return rb_file_identical_p(0, argv[1], argv[2]);
}
if (strchr("=<>", cmd)) {
- struct stat st1, st2;
+ struct stat st1, st2;
struct timespec t1, t2;
- CHECK(2);
- if (rb_stat(argv[1], &st1) < 0) return Qfalse;
- if (rb_stat(argv[2], &st2) < 0) return Qfalse;
+ CHECK(2);
+ if (rb_stat(argv[1], &st1) < 0) return Qfalse;
+ if (rb_stat(argv[2], &st2) < 0) return Qfalse;
t1 = stat_mtimespec(&st1);
t2 = stat_mtimespec(&st2);
- switch (cmd) {
- case '=':
- if (t1.tv_sec == t2.tv_sec && t1.tv_nsec == t2.tv_nsec) return Qtrue;
- return Qfalse;
+ switch (cmd) {
+ case '=':
+ if (t1.tv_sec == t2.tv_sec && t1.tv_nsec == t2.tv_nsec) return Qtrue;
+ return Qfalse;
- case '>':
- if (t1.tv_sec > t2.tv_sec) return Qtrue;
- if (t1.tv_sec == t2.tv_sec && t1.tv_nsec > t2.tv_nsec) return Qtrue;
- return Qfalse;
+ case '>':
+ if (t1.tv_sec > t2.tv_sec) return Qtrue;
+ if (t1.tv_sec == t2.tv_sec && t1.tv_nsec > t2.tv_nsec) return Qtrue;
+ return Qfalse;
- case '<':
- if (t1.tv_sec < t2.tv_sec) return Qtrue;
- if (t1.tv_sec == t2.tv_sec && t1.tv_nsec < t2.tv_nsec) return Qtrue;
- return Qfalse;
- }
+ case '<':
+ if (t1.tv_sec < t2.tv_sec) return Qtrue;
+ if (t1.tv_sec == t2.tv_sec && t1.tv_nsec < t2.tv_nsec) return Qtrue;
+ return Qfalse;
+ }
+ }
+ unknown:
+ /* unknown command */
+ if (ISPRINT(cmd)) {
+ rb_raise(rb_eArgError, "unknown command '%s%c'", cmd == '\'' || cmd == '\\' ? "\\" : "", cmd);
+ }
+ else {
+ rb_raise(rb_eArgError, "unknown command \"\\x%02X\"", cmd);
}
- goto unknown;
+ UNREACHABLE_RETURN(Qundef);
}
@@ -5426,11 +5563,12 @@ rb_stat_init(VALUE obj, VALUE fname)
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (STAT(StringValueCStr(fname), &st) == -1) {
- rb_sys_fail_path(fname);
+ rb_sys_fail_path(fname);
}
+
if (DATA_PTR(obj)) {
- xfree(DATA_PTR(obj));
- DATA_PTR(obj) = NULL;
+ xfree(DATA_PTR(obj));
+ DATA_PTR(obj) = NULL;
}
nst = ALLOC(struct stat);
*nst = st;
@@ -5447,13 +5585,13 @@ rb_stat_init_copy(VALUE copy, VALUE orig)
if (!OBJ_INIT_COPY(copy, orig)) return copy;
if (DATA_PTR(copy)) {
- xfree(DATA_PTR(copy));
- DATA_PTR(copy) = 0;
+ xfree(DATA_PTR(copy));
+ DATA_PTR(copy) = 0;
}
if (DATA_PTR(orig)) {
- nst = ALLOC(struct stat);
- *nst = *(struct stat*)DATA_PTR(orig);
- DATA_PTR(copy) = nst;
+ nst = ALLOC(struct stat);
+ *nst = *(struct stat*)DATA_PTR(orig);
+ DATA_PTR(copy) = nst;
}
return copy;
@@ -5636,7 +5774,7 @@ rb_stat_rowned(VALUE obj)
* stat.grpowned? -> true or false
*
* Returns true if the effective group id of the process is the same as
- * the group id of <i>stat</i>. On Windows NT, returns <code>false</code>.
+ * the group id of <i>stat</i>. On Windows, returns <code>false</code>.
*
* File.stat("testfile").grpowned? #=> true
* File.stat("/etc/passwd").grpowned? #=> false
@@ -5673,11 +5811,11 @@ rb_stat_r(VALUE obj)
#endif
#ifdef S_IRUSR
if (rb_stat_owned(obj))
- return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IRUSR);
#endif
#ifdef S_IRGRP
if (rb_stat_grpowned(obj))
- return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IRGRP);
#endif
#ifdef S_IROTH
if (!(st->st_mode & S_IROTH)) return Qfalse;
@@ -5706,11 +5844,11 @@ rb_stat_R(VALUE obj)
#endif
#ifdef S_IRUSR
if (rb_stat_rowned(obj))
- return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IRUSR);
#endif
#ifdef S_IRGRP
if (rb_group_member(get_stat(obj)->st_gid))
- return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IRGRP);
#endif
#ifdef S_IROTH
if (!(st->st_mode & S_IROTH)) return Qfalse;
@@ -5737,10 +5875,10 @@ rb_stat_wr(VALUE obj)
#ifdef S_IROTH
struct stat *st = get_stat(obj);
if ((st->st_mode & (S_IROTH)) == S_IROTH) {
- return UINT2NUM(st->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
+ return UINT2NUM(st->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
else {
- return Qnil;
+ return Qnil;
}
#endif
}
@@ -5766,11 +5904,11 @@ rb_stat_w(VALUE obj)
#endif
#ifdef S_IWUSR
if (rb_stat_owned(obj))
- return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IWUSR);
#endif
#ifdef S_IWGRP
if (rb_stat_grpowned(obj))
- return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IWGRP);
#endif
#ifdef S_IWOTH
if (!(st->st_mode & S_IWOTH)) return Qfalse;
@@ -5799,11 +5937,11 @@ rb_stat_W(VALUE obj)
#endif
#ifdef S_IWUSR
if (rb_stat_rowned(obj))
- return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IWUSR);
#endif
#ifdef S_IWGRP
if (rb_group_member(get_stat(obj)->st_gid))
- return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IWGRP);
#endif
#ifdef S_IWOTH
if (!(st->st_mode & S_IWOTH)) return Qfalse;
@@ -5830,10 +5968,10 @@ rb_stat_ww(VALUE obj)
#ifdef S_IROTH
struct stat *st = get_stat(obj);
if ((st->st_mode & (S_IWOTH)) == S_IWOTH) {
- return UINT2NUM(st->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
+ return UINT2NUM(st->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
else {
- return Qnil;
+ return Qnil;
}
#endif
}
@@ -5858,16 +5996,16 @@ rb_stat_x(VALUE obj)
#ifdef USE_GETEUID
if (geteuid() == 0) {
- return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXUGO);
}
#endif
#ifdef S_IXUSR
if (rb_stat_owned(obj))
- return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXUSR);
#endif
#ifdef S_IXGRP
if (rb_stat_grpowned(obj))
- return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXGRP);
#endif
#ifdef S_IXOTH
if (!(st->st_mode & S_IXOTH)) return Qfalse;
@@ -5890,16 +6028,16 @@ rb_stat_X(VALUE obj)
#ifdef USE_GETEUID
if (getuid() == 0) {
- return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXUGO);
}
#endif
#ifdef S_IXUSR
if (rb_stat_rowned(obj))
- return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXUSR);
#endif
#ifdef S_IXGRP
if (rb_group_member(get_stat(obj)->st_gid))
- return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
+ return RBOOL(st->st_mode & S_IXGRP);
#endif
#ifdef S_IXOTH
if (!(st->st_mode & S_IXOTH)) return Qfalse;
@@ -5945,18 +6083,20 @@ rb_stat_z(VALUE obj)
/*
* call-seq:
- * state.size -> integer
+ * stat.size? -> Integer or nil
*
- * Returns the size of <i>stat</i> in bytes.
+ * Returns +nil+ if <i>stat</i> is a zero-length file, the size of
+ * the file otherwise.
*
- * File.stat("testfile").size #=> 66
+ * File.stat("testfile").size? #=> 66
+ * File.stat("/dev/null").size? #=> nil
*
*/
static VALUE
rb_stat_s(VALUE obj)
{
- off_t size = get_stat(obj)->st_size;
+ rb_off_t size = get_stat(obj)->st_size;
if (size == 0) return Qnil;
return OFFT2NUM(size);
@@ -6062,14 +6202,14 @@ rb_file_s_mkfifo(int argc, VALUE *argv, VALUE _)
ma.mode = 0666;
rb_check_arity(argc, 1, 2);
if (argc > 1) {
- ma.mode = NUM2MODET(argv[1]);
+ ma.mode = NUM2MODET(argv[1]);
}
path = argv[0];
FilePathValue(path);
path = rb_str_encode_ospath(path);
ma.path = RSTRING_PTR(path);
if (rb_thread_call_without_gvl(nogvl_mkfifo, &ma, RUBY_UBF_IO, 0)) {
- rb_sys_fail_path(path);
+ rb_sys_fail_path(path);
}
return INT2FIX(0);
}
@@ -6110,7 +6250,7 @@ rb_is_absolute_path(const char *path)
#if ENABLE_PATH_CHECK
static int
-path_check_0(VALUE path, int execpath)
+path_check_0(VALUE path)
{
struct stat st;
const char *p0 = StringValueCStr(path);
@@ -6119,16 +6259,16 @@ path_check_0(VALUE path, int execpath)
char *p = 0, *s;
if (!rb_is_absolute_path(p0)) {
- char *buf = ruby_getcwd();
- VALUE newpath;
+ char *buf = ruby_getcwd();
+ VALUE newpath;
- newpath = rb_str_new2(buf);
- xfree(buf);
+ newpath = rb_str_new2(buf);
+ xfree(buf);
- rb_str_cat2(newpath, "/");
- rb_str_cat2(newpath, p0);
- path = newpath;
- p0 = RSTRING_PTR(path);
+ rb_str_cat2(newpath, "/");
+ rb_str_cat2(newpath, p0);
+ path = newpath;
+ p0 = RSTRING_PTR(path);
}
e0 = p0 + RSTRING_LEN(path);
enc = rb_enc_get(path);
@@ -6136,34 +6276,32 @@ path_check_0(VALUE path, int execpath)
#ifndef S_IWOTH
# define S_IWOTH 002
#endif
- if (STAT(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
+ if (STAT(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
#ifdef S_ISVTX
- && !(p && execpath && (st.st_mode & S_ISVTX))
+ && !(p && (st.st_mode & S_ISVTX))
+#endif
+ && !access(p0, W_OK)) {
+ rb_enc_warn(enc, "Insecure world writable dir %s in PATH, mode 0%"
+#if SIZEOF_DEV_T > SIZEOF_INT
+ PRI_MODET_PREFIX"o",
+#else
+ "o",
#endif
- && !access(p0, W_OK)) {
- rb_enc_warn(enc, "Insecure world writable dir %s in %sPATH, mode 0%"
- PRI_MODET_PREFIX"o",
- p0, (execpath ? "" : "LOAD_"), st.st_mode);
- if (p) *p = '/';
- RB_GC_GUARD(path);
- return 0;
- }
- s = strrdirsep(p0, e0, enc);
- if (p) *p = '/';
- if (!s || s == p0) return 1;
- p = s;
- e0 = p;
- *p = '\0';
+ p0, st.st_mode);
+ if (p) *p = '/';
+ RB_GC_GUARD(path);
+ return 0;
+ }
+ s = strrdirsep(p0, e0, enc);
+ if (p) *p = '/';
+ if (!s || s == p0) return 1;
+ p = s;
+ e0 = p;
+ *p = '\0';
}
}
#endif
-#if ENABLE_PATH_CHECK
-#define fpath_check(path) path_check_0((path), FALSE)
-#else
-#define fpath_check(path) 1
-#endif
-
int
rb_path_check(const char *path)
{
@@ -6179,13 +6317,13 @@ rb_path_check(const char *path)
if (!p) p = pend;
for (;;) {
- if (!path_check_0(rb_str_new(p0, p - p0), TRUE)) {
- return 0; /* not safe */
- }
- p0 = p + 1;
- if (p0 > pend) break;
- p = strchr(p0, sep);
- if (!p) p = pend;
+ if (!path_check_0(rb_str_new(p0, p - p0))) {
+ return 0; /* not safe */
+ }
+ p0 = p + 1;
+ if (p0 > pend) break;
+ p = strchr(p0, sep);
+ if (!p) p = pend;
}
#endif
return 1;
@@ -6200,18 +6338,18 @@ ruby_is_fd_loadable(int fd)
struct stat st;
if (fstat(fd, &st) < 0)
- return 0;
+ return 0;
if (S_ISREG(st.st_mode))
- return 1;
+ return 1;
if (S_ISFIFO(st.st_mode) || S_ISCHR(st.st_mode))
- return -1;
+ return -1;
if (S_ISDIR(st.st_mode))
- errno = EISDIR;
+ errno = EISDIR;
else
- errno = ENXIO;
+ errno = ENXIO;
return 0;
#endif
@@ -6228,11 +6366,11 @@ rb_file_load_ok(const char *path)
*/
int mode = (O_RDONLY |
#if defined O_NONBLOCK
- O_NONBLOCK |
+ O_NONBLOCK |
#elif defined O_NDELAY
- O_NDELAY |
+ O_NDELAY |
#endif
- 0);
+ 0);
int fd = rb_cloexec_open(path, mode, 0);
if (fd == -1) return 0;
rb_update_max_fd(fd);
@@ -6253,6 +6391,10 @@ is_explicit_relative(const char *path)
static VALUE
copy_path_class(VALUE path, VALUE orig)
{
+ int encidx = rb_enc_get_index(orig);
+ if (encidx == ENCINDEX_ASCII_8BIT || encidx == ENCINDEX_US_ASCII)
+ encidx = rb_filesystem_encindex();
+ rb_enc_associate_index(path, encidx);
str_shrink(path);
RBASIC_SET_CLASS(path, rb_obj_class(orig));
OBJ_FREEZE(path);
@@ -6260,13 +6402,6 @@ copy_path_class(VALUE path, VALUE orig)
}
int
-rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int _level)
-{
- rb_warn("rb_find_file_ext_safe will be removed in Ruby 3.0");
- return rb_find_file_ext(filep, ext);
-}
-
-int
rb_find_file_ext(VALUE *filep, const char *const *ext)
{
const char *f = StringValueCStr(*filep);
@@ -6277,24 +6412,24 @@ rb_find_file_ext(VALUE *filep, const char *const *ext)
if (!ext[0]) return 0;
if (f[0] == '~') {
- fname = file_expand_path_1(fname);
- f = RSTRING_PTR(fname);
- *filep = fname;
- expanded = 1;
+ fname = file_expand_path_1(fname);
+ f = RSTRING_PTR(fname);
+ *filep = fname;
+ expanded = 1;
}
if (expanded || rb_is_absolute_path(f) || is_explicit_relative(f)) {
- if (!expanded) fname = file_expand_path_1(fname);
- fnlen = RSTRING_LEN(fname);
- for (i=0; ext[i]; i++) {
- rb_str_cat2(fname, ext[i]);
- if (rb_file_load_ok(RSTRING_PTR(fname))) {
- *filep = copy_path_class(fname, *filep);
- return (int)(i+1);
- }
- rb_str_set_len(fname, fnlen);
- }
- return 0;
+ if (!expanded) fname = file_expand_path_1(fname);
+ fnlen = RSTRING_LEN(fname);
+ for (i=0; ext[i]; i++) {
+ rb_str_cat2(fname, ext[i]);
+ if (rb_file_load_ok(RSTRING_PTR(fname))) {
+ *filep = copy_path_class(fname, *filep);
+ return (int)(i+1);
+ }
+ rb_str_set_len(fname, fnlen);
+ }
+ return 0;
}
RB_GC_GUARD(load_path) = rb_get_expanded_load_path();
@@ -6306,19 +6441,19 @@ rb_find_file_ext(VALUE *filep, const char *const *ext)
tmp = rb_str_tmp_new(MAXPATHLEN + 2);
rb_enc_associate_index(tmp, rb_usascii_encindex());
for (j=0; ext[j]; j++) {
- rb_str_cat2(fname, ext[j]);
- for (i = 0; i < RARRAY_LEN(load_path); i++) {
- VALUE str = RARRAY_AREF(load_path, i);
+ rb_str_cat2(fname, ext[j]);
+ for (i = 0; i < RARRAY_LEN(load_path); i++) {
+ VALUE str = RARRAY_AREF(load_path, i);
RB_GC_GUARD(str) = rb_get_path(str);
- if (RSTRING_LEN(str) == 0) continue;
- rb_file_expand_path_internal(fname, str, 0, 0, tmp);
- if (rb_file_load_ok(RSTRING_PTR(tmp))) {
- *filep = copy_path_class(tmp, *filep);
- return (int)(j+1);
- }
- }
- rb_str_set_len(fname, fnlen);
+ if (RSTRING_LEN(str) == 0) continue;
+ rb_file_expand_path_internal(fname, str, 0, 0, tmp);
+ if (rb_file_load_ok(RSTRING_PTR(tmp))) {
+ *filep = copy_path_class(tmp, *filep);
+ return (int)(j+1);
+ }
+ }
+ rb_str_set_len(fname, fnlen);
}
rb_str_resize(tmp, 0);
RB_GC_GUARD(load_path);
@@ -6326,13 +6461,6 @@ rb_find_file_ext(VALUE *filep, const char *const *ext)
}
VALUE
-rb_find_file_safe(VALUE path, int _level)
-{
- rb_warn("rb_find_file_safe will be removed in Ruby 3.0");
- return rb_find_file(path);
-}
-
-VALUE
rb_find_file(VALUE path)
{
VALUE tmp, load_path;
@@ -6340,51 +6468,49 @@ rb_find_file(VALUE path)
int expanded = 0;
if (f[0] == '~') {
- tmp = file_expand_path_1(path);
- path = copy_path_class(tmp, path);
- f = RSTRING_PTR(path);
- expanded = 1;
+ tmp = file_expand_path_1(path);
+ path = copy_path_class(tmp, path);
+ f = RSTRING_PTR(path);
+ expanded = 1;
}
if (expanded || rb_is_absolute_path(f) || is_explicit_relative(f)) {
- if (!rb_file_load_ok(f)) return 0;
- if (!expanded)
- path = copy_path_class(file_expand_path_1(path), path);
- return path;
+ if (!rb_file_load_ok(f)) return 0;
+ if (!expanded)
+ path = copy_path_class(file_expand_path_1(path), path);
+ return path;
}
RB_GC_GUARD(load_path) = rb_get_expanded_load_path();
if (load_path) {
- long i;
+ long i;
- tmp = rb_str_tmp_new(MAXPATHLEN + 2);
- rb_enc_associate_index(tmp, rb_usascii_encindex());
- for (i = 0; i < RARRAY_LEN(load_path); i++) {
- VALUE str = RARRAY_AREF(load_path, i);
+ tmp = rb_str_tmp_new(MAXPATHLEN + 2);
+ rb_enc_associate_index(tmp, rb_usascii_encindex());
+ for (i = 0; i < RARRAY_LEN(load_path); i++) {
+ VALUE str = RARRAY_AREF(load_path, i);
RB_GC_GUARD(str) = rb_get_path(str);
- if (RSTRING_LEN(str) > 0) {
- rb_file_expand_path_internal(path, str, 0, 0, tmp);
- f = RSTRING_PTR(tmp);
- if (rb_file_load_ok(f)) goto found;
- }
- }
- rb_str_resize(tmp, 0);
- return 0;
+ if (RSTRING_LEN(str) > 0) {
+ rb_file_expand_path_internal(path, str, 0, 0, tmp);
+ f = RSTRING_PTR(tmp);
+ if (rb_file_load_ok(f)) goto found;
+ }
+ }
+ rb_str_resize(tmp, 0);
+ return 0;
}
else {
- return 0; /* no path, no load */
+ return 0; /* no path, no load */
}
found:
return copy_path_class(tmp, path);
}
-static void
-define_filetest_function(const char *name, VALUE (*func)(ANYARGS), int argc)
-{
- rb_define_module_function(rb_mFileTest, name, func, argc);
- rb_define_singleton_method(rb_cFile, name, func, argc);
-}
+#define define_filetest_function(name, func, argc) do { \
+ rb_define_module_function(rb_mFileTest, name, func, argc); \
+ rb_define_singleton_method(rb_cFile, name, func, argc); \
+} while(false)
const char ruby_null_device[] =
#if defined DOSISH
@@ -6399,41 +6525,805 @@ const char ruby_null_device[] =
;
/*
- * A File is an abstraction of any file object accessible by the
- * program and is closely associated with class IO. File includes
- * the methods of module FileTest as class methods, allowing you to
- * write (for example) <code>File.exist?("foo")</code>.
- *
- * In the description of File methods,
- * <em>permission bits</em> are a platform-specific
- * set of bits that indicate permissions of a file. On Unix-based
- * systems, permissions are viewed as a set of three octets, for the
- * owner, the group, and the rest of the world. For each of these
- * entities, permissions may be set to read, write, or execute the
- * file:
- *
- * The permission bits <code>0644</code> (in octal) would thus be
- * interpreted as read/write for owner, and read-only for group and
- * other. Higher-order bits may also be used to indicate the type of
- * file (plain, directory, pipe, socket, and so on) and various other
- * special features. If the permissions are for a directory, the
- * meaning of the execute bit changes; when set the directory can be
- * searched.
- *
- * On non-Posix operating systems, there may be only the ability to
- * make a file read-only or read-write. In this case, the remaining
- * permission bits will be synthesized to resemble typical values. For
- * instance, on Windows NT the default permission bits are
- * <code>0644</code>, which means read/write for owner, read-only for
- * all others. The only change that can be made is to make the file
+ * A \File object is a representation of a file in the underlying platform.
+ *
+ * \Class \File extends module FileTest, supporting such singleton methods
+ * as <tt>File.exist?</tt>.
+ *
+ * === About the Examples
+ *
+ * Many examples here use these variables:
+ *
+ * :include: doc/examples/files.rdoc
+ *
+ * == Access Modes
+ *
+ * \Methods File.new and File.open each create a \File object for a given file path.
+ *
+ * === \String Access Modes
+ *
+ * \Methods File.new and File.open each may take string argument +mode+, which:
+ *
+ * - Begins with a 1- or 2-character
+ * {read/write mode}[rdoc-ref:File@Read-2FWrite+Mode].
+ * - May also contain a 1-character {data mode}[rdoc-ref:File@Data+Mode].
+ * - May also contain a 1-character
+ * {file-create mode}[rdoc-ref:File@File-Create+Mode].
+ *
+ * ==== Read/Write Mode
+ *
+ * The read/write +mode+ determines:
+ *
+ * - Whether the file is to be initially truncated.
+ *
+ * - Whether reading is allowed, and if so:
+ *
+ * - The initial read position in the file.
+ * - Where in the file reading can occur.
+ *
+ * - Whether writing is allowed, and if so:
+ *
+ * - The initial write position in the file.
+ * - Where in the file writing can occur.
+ *
+ * These tables summarize:
+ *
+ * Read/Write Modes for Existing File
+ *
+ * |------|-----------|----------|----------|----------|-----------|
+ * | R/W | Initial | | Initial | | Initial |
+ * | Mode | Truncate? | Read | Read Pos | Write | Write Pos |
+ * |------|-----------|----------|----------|----------|-----------|
+ * | 'r' | No | Anywhere | 0 | Error | - |
+ * | 'w' | Yes | Error | - | Anywhere | 0 |
+ * | 'a' | No | Error | - | End only | End |
+ * | 'r+' | No | Anywhere | 0 | Anywhere | 0 |
+ * | 'w+' | Yes | Anywhere | 0 | Anywhere | 0 |
+ * | 'a+' | No | Anywhere | End | End only | End |
+ * |------|-----------|----------|----------|----------|-----------|
+ *
+ * Read/Write Modes for \File To Be Created
+ *
+ * |------|----------|----------|----------|-----------|
+ * | R/W | | Initial | | Initial |
+ * | Mode | Read | Read Pos | Write | Write Pos |
+ * |------|----------|----------|----------|-----------|
+ * | 'w' | Error | - | Anywhere | 0 |
+ * | 'a' | Error | - | End only | 0 |
+ * | 'w+' | Anywhere | 0 | Anywhere | 0 |
+ * | 'a+' | Anywhere | 0 | End only | End |
+ * |------|----------|----------|----------|-----------|
+ *
+ * Note that modes <tt>'r'</tt> and <tt>'r+'</tt> are not allowed
+ * for a non-existent file (exception raised).
+ *
+ * In the tables:
+ *
+ * - +Anywhere+ means that methods IO#rewind, IO#pos=, and IO#seek
+ * may be used to change the file's position,
+ * so that allowed reading or writing may occur anywhere in the file.
+ * - <tt>End only</tt> means that writing can occur only at end-of-file,
+ * and that methods IO#rewind, IO#pos=, and IO#seek do not affect writing.
+ * - +Error+ means that an exception is raised if disallowed reading or writing
+ * is attempted.
+ *
+ * ===== Read/Write Modes for Existing \File
+ *
+ * - <tt>'r'</tt>:
+ *
+ * - File is not initially truncated:
+ *
+ * f = File.new('t.txt') # => #<File:t.txt>
+ * f.size == 0 # => false
+ *
+ * - File's initial read position is 0:
+ *
+ * f.pos # => 0
+ *
+ * - File may be read anywhere; see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.readline # => "First line\n"
+ * f.readline # => "Second line\n"
+ *
+ * f.rewind
+ * f.readline # => "First line\n"
+ *
+ * f.pos = 1
+ * f.readline # => "irst line\n"
+ *
+ * f.seek(1, :CUR)
+ * f.readline # => "econd line\n"
+ *
+ * - Writing is not allowed:
+ *
+ * f.write('foo') # Raises IOError.
+ *
+ * - <tt>'w'</tt>:
+ *
+ * - File is initially truncated:
+ *
+ * path = 't.tmp'
+ * File.write(path, text)
+ * f = File.new(path, 'w')
+ * f.size == 0 # => true
+ *
+ * - File's initial write position is 0:
+ *
+ * f.pos # => 0
+ *
+ * - File may be written anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "foo"
+ * f.pos # => 3
+ *
+ * f.write('bar')
+ * f.flush
+ * File.read(path) # => "foobar"
+ * f.pos # => 6
+ *
+ * f.rewind
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "bazbar"
+ * f.pos # => 3
+ *
+ * f.pos = 3
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "bazfoo"
+ * f.pos # => 6
+ *
+ * f.seek(-3, :END)
+ * f.write('bam')
+ * f.flush
+ * File.read(path) # => "bazbam"
+ * f.pos # => 6
+ *
+ * f.pos = 8
+ * f.write('bah') # Zero padding as needed.
+ * f.flush
+ * File.read(path) # => "bazbam\u0000\u0000bah"
+ * f.pos # => 11
+ *
+ * - Reading is not allowed:
+ *
+ * f.read # Raises IOError.
+ *
+ * - <tt>'a'</tt>:
+ *
+ * - File is not initially truncated:
+ *
+ * path = 't.tmp'
+ * File.write(path, 'foo')
+ * f = File.new(path, 'a')
+ * f.size == 0 # => false
+ *
+ * - File's initial position is 0 (but is ignored):
+ *
+ * f.pos # => 0
+ *
+ * - File may be written only at end-of-file;
+ * IO#rewind, IO#pos=, IO#seek do not affect writing:
+ *
+ * f.write('bar')
+ * f.flush
+ * File.read(path) # => "foobar"
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "foobarbaz"
+ *
+ * f.rewind
+ * f.write('bat')
+ * f.flush
+ * File.read(path) # => "foobarbazbat"
+ *
+ * - Reading is not allowed:
+ *
+ * f.read # Raises IOError.
+ *
+ * - <tt>'r+'</tt>:
+ *
+ * - File is not initially truncated:
+ *
+ * path = 't.tmp'
+ * File.write(path, text)
+ * f = File.new(path, 'r+')
+ * f.size == 0 # => false
+ *
+ * - File's initial read position is 0:
+ *
+ * f.pos # => 0
+ *
+ * - File may be read or written anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.readline # => "First line\n"
+ * f.readline # => "Second line\n"
+ *
+ * f.rewind
+ * f.readline # => "First line\n"
+ *
+ * f.pos = 1
+ * f.readline # => "irst line\n"
+ *
+ * f.seek(1, :CUR)
+ * f.readline # => "econd line\n"
+ *
+ * f.rewind
+ * f.write('WWW')
+ * f.flush
+ * File.read(path)
+ * # => "WWWst line\nSecond line\nFourth line\nFifth line\n"
+ *
+ * f.pos = 10
+ * f.write('XXX')
+ * f.flush
+ * File.read(path)
+ * # => "WWWst lineXXXecond line\nFourth line\nFifth line\n"
+ *
+ * f.seek(-6, :END)
+ * # => 0
+ * f.write('YYY')
+ * # => 3
+ * f.flush
+ * # => #<File:t.tmp>
+ * File.read(path)
+ * # => "WWWst lineXXXecond line\nFourth line\nFifth YYYe\n"
+ *
+ * f.seek(2, :END)
+ * f.write('ZZZ') # Zero padding as needed.
+ * f.flush
+ * File.read(path)
+ * # => "WWWst lineXXXecond line\nFourth line\nFifth YYYe\n\u0000\u0000ZZZ"
+ *
+ *
+ * - <tt>'a+'</tt>:
+ *
+ * - File is not initially truncated:
+ *
+ * path = 't.tmp'
+ * File.write(path, 'foo')
+ * f = File.new(path, 'a+')
+ * f.size == 0 # => false
+ *
+ * - File's initial read position is 0:
+ *
+ * f.pos # => 0
+ *
+ * - File may be written only at end-of-file;
+ * IO#rewind, IO#pos=, IO#seek do not affect writing:
+ *
+ * f.write('bar')
+ * f.flush
+ * File.read(path) # => "foobar"
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "foobarbaz"
+ *
+ * f.rewind
+ * f.write('bat')
+ * f.flush
+ * File.read(path) # => "foobarbazbat"
+ *
+ * - File may be read anywhere; see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.rewind
+ * f.read # => "foobarbazbat"
+ *
+ * f.pos = 3
+ * f.read # => "barbazbat"
+ *
+ * f.seek(-3, :END)
+ * f.read # => "bat"
+ *
+ * ===== Read/Write Modes for \File To Be Created
+ *
+ * Note that modes <tt>'r'</tt> and <tt>'r+'</tt> are not allowed
+ * for a non-existent file (exception raised).
+ *
+ * - <tt>'w'</tt>:
+ *
+ * - File's initial write position is 0:
+ *
+ * path = 't.tmp'
+ * FileUtils.rm_f(path)
+ * f = File.new(path, 'w')
+ * f.pos # => 0
+ *
+ * - File may be written anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "foo"
+ * f.pos # => 3
+ *
+ * f.write('bar')
+ * f.flush
+ * File.read(path) # => "foobar"
+ * f.pos # => 6
+ *
+ * f.rewind
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "bazbar"
+ * f.pos # => 3
+ *
+ * f.pos = 3
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "bazfoo"
+ * f.pos # => 6
+ *
+ * f.seek(-3, :END)
+ * f.write('bam')
+ * f.flush
+ * File.read(path) # => "bazbam"
+ * f.pos # => 6
+ *
+ * f.pos = 8
+ * f.write('bah') # Zero padding as needed.
+ * f.flush
+ * File.read(path) # => "bazbam\u0000\u0000bah"
+ * f.pos # => 11
+ *
+ * - Reading is not allowed:
+ *
+ * f.read # Raises IOError.
+ *
+ * - <tt>'a'</tt>:
+ *
+ * - File's initial write position is 0:
+ *
+ * path = 't.tmp'
+ * FileUtils.rm_f(path)
+ * f = File.new(path, 'a')
+ * f.pos # => 0
+ *
+ * - Writing occurs only at end-of-file:
+ *
+ * f.write('foo')
+ * f.pos # => 3
+ * f.write('bar')
+ * f.pos # => 6
+ * f.flush
+ * File.read(path) # => "foobar"
+ *
+ * f.rewind
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "foobarbaz"
+ *
+ * - Reading is not allowed:
+ *
+ * f.read # Raises IOError.
+ *
+ * - <tt>'w+'</tt>:
+ *
+ * - File's initial position is 0:
+ *
+ * path = 't.tmp'
+ * FileUtils.rm_f(path)
+ * f = File.new(path, 'w+')
+ * f.pos # => 0
+ *
+ * - File may be written anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "foo"
+ * f.pos # => 3
+ *
+ * f.write('bar')
+ * f.flush
+ * File.read(path) # => "foobar"
+ * f.pos # => 6
+ *
+ * f.rewind
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "bazbar"
+ * f.pos # => 3
+ *
+ * f.pos = 3
+ * f.write('foo')
+ * f.flush
+ * File.read(path) # => "bazfoo"
+ * f.pos # => 6
+ *
+ * f.seek(-3, :END)
+ * f.write('bam')
+ * f.flush
+ * File.read(path) # => "bazbam"
+ * f.pos # => 6
+ *
+ * f.pos = 8
+ * f.write('bah') # Zero padding as needed.
+ * f.flush
+ * File.read(path) # => "bazbam\u0000\u0000bah"
+ * f.pos # => 11
+ *
+ * - File may be read anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.rewind
+ * # => 0
+ * f.read
+ * # => "bazbam\u0000\u0000bah"
+ *
+ * f.pos = 3
+ * # => 3
+ * f.read
+ * # => "bam\u0000\u0000bah"
+ *
+ * f.seek(-3, :END)
+ * # => 0
+ * f.read
+ * # => "bah"
+ *
+ * - <tt>'a+'</tt>:
+ *
+ * - File's initial write position is 0:
+ *
+ * path = 't.tmp'
+ * FileUtils.rm_f(path)
+ * f = File.new(path, 'a+')
+ * f.pos # => 0
+ *
+ * - Writing occurs only at end-of-file:
+ *
+ * f.write('foo')
+ * f.pos # => 3
+ * f.write('bar')
+ * f.pos # => 6
+ * f.flush
+ * File.read(path) # => "foobar"
+ *
+ * f.rewind
+ * f.write('baz')
+ * f.flush
+ * File.read(path) # => "foobarbaz"
+ *
+ * - File may be read anywhere (even past end-of-file);
+ * see IO#rewind, IO#pos=, IO#seek:
+ *
+ * f.rewind
+ * f.read # => "foobarbaz"
+ *
+ * f.pos = 3
+ * f.read # => "barbaz"
+ *
+ * f.seek(-3, :END)
+ * f.read # => "baz"
+ *
+ * f.pos = 800
+ * f.read # => ""
+ *
+ * ==== \Data Mode
+ *
+ * To specify whether data is to be treated as text or as binary data,
+ * either of the following may be suffixed to any of the string read/write modes
+ * above:
+ *
+ * - <tt>'t'</tt>: Text data; sets the default external encoding
+ * to <tt>Encoding::UTF_8</tt>;
+ * on Windows, enables conversion between EOL and CRLF
+ * and enables interpreting <tt>0x1A</tt> as an end-of-file marker.
+ * - <tt>'b'</tt>: Binary data; sets the default external encoding
+ * to <tt>Encoding::ASCII_8BIT</tt>;
+ * on Windows, suppresses conversion between EOL and CRLF
+ * and disables interpreting <tt>0x1A</tt> as an end-of-file marker.
+ *
+ * If neither is given, the stream defaults to text data.
+ *
+ * Examples:
+ *
+ * File.new('t.txt', 'rt')
+ * File.new('t.dat', 'rb')
+ *
+ * When the data mode is specified, the read/write mode may not be omitted,
+ * and the data mode must precede the file-create mode, if given:
+ *
+ * File.new('t.dat', 'b') # Raises an exception.
+ * File.new('t.dat', 'rxb') # Raises an exception.
+ *
+ * ==== \File-Create Mode
+ *
+ * The following may be suffixed to any writable string mode above:
+ *
+ * - <tt>'x'</tt>: Creates the file if it does not exist;
+ * raises an exception if the file exists.
+ *
+ * Example:
+ *
+ * File.new('t.tmp', 'wx')
+ *
+ * When the file-create mode is specified, the read/write mode may not be omitted,
+ * and the file-create mode must follow the data mode:
+ *
+ * File.new('t.dat', 'x') # Raises an exception.
+ * File.new('t.dat', 'rxb') # Raises an exception.
+ *
+ * === \Integer Access Modes
+ *
+ * When mode is an integer it must be one or more of the following constants,
+ * which may be combined by the bitwise OR operator <tt>|</tt>:
+ *
+ * - +File::RDONLY+: Open for reading only.
+ * - +File::WRONLY+: Open for writing only.
+ * - +File::RDWR+: Open for reading and writing.
+ * - +File::APPEND+: Open for appending only.
+ *
+ * Examples:
+ *
+ * File.new('t.txt', File::RDONLY)
+ * File.new('t.tmp', File::RDWR | File::CREAT | File::EXCL)
+ *
+ * Note: Method IO#set_encoding does not allow the mode to be specified as an integer.
+ *
+ * === File-Create Mode Specified as an \Integer
+ *
+ * These constants may also be ORed into the integer mode:
+ *
+ * - +File::CREAT+: Create file if it does not exist.
+ * - +File::EXCL+: Raise an exception if +File::CREAT+ is given and the file exists.
+ *
+ * === \Data Mode Specified as an \Integer
+ *
+ * \Data mode cannot be specified as an integer.
+ * When the stream access mode is given as an integer,
+ * the data mode is always text, never binary.
+ *
+ * Note that although there is a constant +File::BINARY+,
+ * setting its value in an integer stream mode has no effect;
+ * this is because, as documented in File::Constants,
+ * the +File::BINARY+ value disables line code conversion,
+ * but does not change the external encoding.
+ *
+ * === Encodings
+ *
+ * Any of the string modes above may specify encodings -
+ * either external encoding only or both external and internal encodings -
+ * by appending one or both encoding names, separated by colons:
+ *
+ * f = File.new('t.dat', 'rb')
+ * f.external_encoding # => #<Encoding:ASCII-8BIT>
+ * f.internal_encoding # => nil
+ * f = File.new('t.dat', 'rb:UTF-16')
+ * f.external_encoding # => #<Encoding:UTF-16 (dummy)>
+ * f.internal_encoding # => nil
+ * f = File.new('t.dat', 'rb:UTF-16:UTF-16')
+ * f.external_encoding # => #<Encoding:UTF-16 (dummy)>
+ * f.internal_encoding # => #<Encoding:UTF-16>
+ * f.close
+ *
+ * The numerous encoding names are available in array Encoding.name_list:
+ *
+ * Encoding.name_list.take(3) # => ["ASCII-8BIT", "UTF-8", "US-ASCII"]
+ *
+ * When the external encoding is set, strings read are tagged by that encoding
+ * when reading, and strings written are converted to that encoding when
+ * writing.
+ *
+ * When both external and internal encodings are set,
+ * strings read are converted from external to internal encoding,
+ * and strings written are converted from internal to external encoding.
+ * For further details about transcoding input and output,
+ * see {Encodings}[rdoc-ref:encodings.rdoc@Encodings].
+ *
+ * If the external encoding is <tt>'BOM|UTF-8'</tt>, <tt>'BOM|UTF-16LE'</tt>
+ * or <tt>'BOM|UTF16-BE'</tt>,
+ * Ruby checks for a Unicode BOM in the input document
+ * to help determine the encoding.
+ * For UTF-16 encodings the file open mode must be binary.
+ * If the BOM is found,
+ * it is stripped and the external encoding from the BOM is used.
+ *
+ * Note that the BOM-style encoding option is case insensitive,
+ * so <tt>'bom|utf-8'</tt> is also valid.
+ *
+ * == \File Permissions
+ *
+ * A \File object has _permissions_, an octal integer representing
+ * the permissions of an actual file in the underlying platform.
+ *
+ * Note that file permissions are quite different from the _mode_
+ * of a file stream (\File object).
+ * See IO@Modes.
+ *
+ * In a \File object, the permissions are available thus,
+ * where method +mode+, despite its name, returns permissions:
+ *
+ * f = File.new('t.txt')
+ * f.lstat.mode.to_s(8) # => "100644"
+ *
+ * On a Unix-based operating system,
+ * the three low-order octal digits represent the permissions
+ * for owner (6), group (4), and world (4).
+ * The triplet of bits in each octal digit represent, respectively,
+ * read, write, and execute permissions.
+ *
+ * Permissions <tt>0644</tt> thus represent read-write access for owner
+ * and read-only access for group and world.
+ * See man pages {open(2)}[https://www.unix.com/man-page/bsd/2/open]
+ * and {chmod(2)}[https://www.unix.com/man-page/bsd/2/chmod].
+ *
+ * For a directory, the meaning of the execute bit changes:
+ * when set, the directory can be searched.
+ *
+ * Higher-order bits in permissions may indicate the type of file
+ * (plain, directory, pipe, socket, etc.) and various other special features.
+ *
+ * On non-Posix operating systems, permissions may include only read-only or read-write,
+ * in which case, the remaining permission will resemble typical values.
+ * On Windows, for instance, the default permissions are <code>0644</code>;
+ * The only change that can be made is to make the file
* read-only, which is reported as <code>0444</code>.
*
- * Various constants for the methods in File can be found in File::Constants.
+ * For a method that actually creates a file in the underlying platform
+ * (as opposed to merely creating a \File object),
+ * permissions may be specified:
+ *
+ * File.new('t.tmp', File::CREAT, 0644)
+ * File.new('t.tmp', File::CREAT, 0444)
+ *
+ * Permissions may also be changed:
+ *
+ * f = File.new('t.tmp', File::CREAT, 0444)
+ * f.chmod(0644)
+ * f.chmod(0444)
+ *
+ * == \File \Constants
+ *
+ * Various constants for use in \File and \IO methods
+ * may be found in module File::Constants;
+ * an array of their names is returned by <tt>File::Constants.constants</tt>.
+ *
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \File:
+ *
+ * - Inherits from {class IO}[rdoc-ref:IO@What-27s+Here],
+ * in particular, methods for creating, reading, and writing files
+ * - Includes {module FileTest}[rdoc-ref:FileTest@What-27s+Here].
+ * which provides dozens of additional methods.
+ *
+ * Here, class \File provides methods that are useful for:
+ *
+ * - {Creating}[rdoc-ref:File@Creating]
+ * - {Querying}[rdoc-ref:File@Querying]
+ * - {Settings}[rdoc-ref:File@Settings]
+ * - {Other}[rdoc-ref:File@Other]
+ *
+ * === Creating
+ *
+ * - ::new: Opens the file at the given path; returns the file.
+ * - ::open: Same as ::new, but when given a block will yield the file to the block,
+ * and close the file upon exiting the block.
+ * - ::link: Creates a new name for an existing file using a hard link.
+ * - ::mkfifo: Returns the FIFO file created at the given path.
+ * - ::symlink: Creates a symbolic link for the given file path.
+ *
+ * === Querying
+ *
+ * _Paths_
+ *
+ * - ::absolute_path: Returns the absolute file path for the given path.
+ * - ::absolute_path?: Returns whether the given path is the absolute file path.
+ * - ::basename: Returns the last component of the given file path.
+ * - ::dirname: Returns all but the last component of the given file path.
+ * - ::expand_path: Returns the absolute file path for the given path,
+ * expanding <tt>~</tt> for a home directory.
+ * - ::extname: Returns the file extension for the given file path.
+ * - ::fnmatch? (aliased as ::fnmatch): Returns whether the given file path
+ * matches the given pattern.
+ * - ::join: Joins path components into a single path string.
+ * - ::path: Returns the string representation of the given path.
+ * - ::readlink: Returns the path to the file at the given symbolic link.
+ * - ::realdirpath: Returns the real path for the given file path,
+ * where the last component need not exist.
+ * - ::realpath: Returns the real path for the given file path,
+ * where all components must exist.
+ * - ::split: Returns an array of two strings: the directory name and basename
+ * of the file at the given path.
+ * - #path (aliased as #to_path): Returns the string representation of the given path.
+ *
+ * _Times_
+ *
+ * - ::atime: Returns a \Time for the most recent access to the given file.
+ * - ::birthtime: Returns a \Time for the creation of the given file.
+ * - ::ctime: Returns a \Time for the metadata change of the given file.
+ * - ::mtime: Returns a \Time for the most recent data modification to
+ * the content of the given file.
+ * - #atime: Returns a \Time for the most recent access to +self+.
+ * - #birthtime: Returns a \Time the creation for +self+.
+ * - #ctime: Returns a \Time for the metadata change of +self+.
+ * - #mtime: Returns a \Time for the most recent data modification
+ * to the content of +self+.
+ *
+ * _Types_
+ *
+ * - ::blockdev?: Returns whether the file at the given path is a block device.
+ * - ::chardev?: Returns whether the file at the given path is a character device.
+ * - ::directory?: Returns whether the file at the given path is a directory.
+ * - ::executable?: Returns whether the file at the given path is executable
+ * by the effective user and group of the current process.
+ * - ::executable_real?: Returns whether the file at the given path is executable
+ * by the real user and group of the current process.
+ * - ::exist?: Returns whether the file at the given path exists.
+ * - ::file?: Returns whether the file at the given path is a regular file.
+ * - ::ftype: Returns a string giving the type of the file at the given path.
+ * - ::grpowned?: Returns whether the effective group of the current process
+ * owns the file at the given path.
+ * - ::identical?: Returns whether the files at two given paths are identical.
+ * - ::lstat: Returns the File::Stat object for the last symbolic link
+ * in the given path.
+ * - ::owned?: Returns whether the effective user of the current process
+ * owns the file at the given path.
+ * - ::pipe?: Returns whether the file at the given path is a pipe.
+ * - ::readable?: Returns whether the file at the given path is readable
+ * by the effective user and group of the current process.
+ * - ::readable_real?: Returns whether the file at the given path is readable
+ * by the real user and group of the current process.
+ * - ::setgid?: Returns whether the setgid bit is set for the file at the given path.
+ * - ::setuid?: Returns whether the setuid bit is set for the file at the given path.
+ * - ::socket?: Returns whether the file at the given path is a socket.
+ * - ::stat: Returns the File::Stat object for the file at the given path.
+ * - ::sticky?: Returns whether the file at the given path has its sticky bit set.
+ * - ::symlink?: Returns whether the file at the given path is a symbolic link.
+ * - ::umask: Returns the umask value for the current process.
+ * - ::world_readable?: Returns whether the file at the given path is readable
+ * by others.
+ * - ::world_writable?: Returns whether the file at the given path is writable
+ * by others.
+ * - ::writable?: Returns whether the file at the given path is writable
+ * by the effective user and group of the current process.
+ * - ::writable_real?: Returns whether the file at the given path is writable
+ * by the real user and group of the current process.
+ * - #lstat: Returns the File::Stat object for the last symbolic link
+ * in the path for +self+.
+ *
+ * _Contents_
+ *
+ * - ::empty? (aliased as ::zero?): Returns whether the file at the given path
+ * exists and is empty.
+ * - ::size: Returns the size (bytes) of the file at the given path.
+ * - ::size?: Returns +nil+ if there is no file at the given path,
+ * or if that file is empty; otherwise returns the file size (bytes).
+ * - #size: Returns the size (bytes) of +self+.
+ *
+ * === Settings
+ *
+ * - ::chmod: Changes permissions of the file at the given path.
+ * - ::chown: Change ownership of the file at the given path.
+ * - ::lchmod: Changes permissions of the last symbolic link in the given path.
+ * - ::lchown: Change ownership of the last symbolic in the given path.
+ * - ::lutime: For each given file path, sets the access time and modification time
+ * of the last symbolic link in the path.
+ * - ::rename: Moves the file at one given path to another given path.
+ * - ::utime: Sets the access time and modification time of each file
+ * at the given paths.
+ * - #flock: Locks or unlocks +self+.
+ *
+ * === Other
+ *
+ * - ::truncate: Truncates the file at the given file path to the given size.
+ * - ::unlink (aliased as ::delete): Deletes the file for each given file path.
+ * - #truncate: Truncates +self+ to the given size.
+ *
*/
void
Init_File(void)
{
+#if defined(__APPLE__) && defined(HAVE_WORKING_FORK)
+ rb_CFString_class_initialize_before_fork();
+#endif
+
VALUE separator;
rb_mFileTest = rb_define_module("FileTest");
@@ -6441,7 +7331,6 @@ Init_File(void)
define_filetest_function("directory?", rb_file_directory_p, 1);
define_filetest_function("exist?", rb_file_exist_p, 1);
- define_filetest_function("exists?", rb_file_exists_p, 1);
define_filetest_function("readable?", rb_file_readable_p, 1);
define_filetest_function("readable_real?", rb_file_readable_real_p, 1);
define_filetest_function("world_readable?", rb_file_world_readable_p, 1);
@@ -6503,7 +7392,7 @@ Init_File(void)
rb_define_singleton_method(rb_cFile, "realpath", rb_file_s_realpath, -1);
rb_define_singleton_method(rb_cFile, "realdirpath", rb_file_s_realdirpath, -1);
rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);
- rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);
+ rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, -1);
rb_define_singleton_method(rb_cFile, "extname", rb_file_s_extname, 1);
rb_define_singleton_method(rb_cFile, "path", rb_file_s_path, 1);
@@ -6531,7 +7420,7 @@ Init_File(void)
rb_define_method(rb_cFile, "mtime", rb_file_mtime, 0);
rb_define_method(rb_cFile, "ctime", rb_file_ctime, 0);
rb_define_method(rb_cFile, "birthtime", rb_file_birthtime, 0);
- rb_define_method(rb_cFile, "size", rb_file_size, 0);
+ rb_define_method(rb_cFile, "size", file_size, 0);
rb_define_method(rb_cFile, "chmod", rb_file_chmod, 1);
rb_define_method(rb_cFile, "chown", rb_file_chown, 2);
@@ -6631,8 +7520,6 @@ Init_File(void)
/* Name of the null device */
rb_define_const(rb_mFConst, "NULL", rb_fstring_cstr(ruby_null_device));
- rb_define_method(rb_cFile, "path", rb_file_path, 0);
- rb_define_method(rb_cFile, "to_path", rb_file_path, 0);
rb_define_global_function("test", rb_f_test, -1);
rb_cStat = rb_define_class_under(rb_cFile, "Stat", rb_cObject);
diff --git a/gc.c b/gc.c
index 131ffb8246..919d57989a 100644
--- a/gc.c
+++ b/gc.c
@@ -14,47 +14,44 @@
#define rb_data_object_alloc rb_data_object_alloc
#define rb_data_typed_object_alloc rb_data_typed_object_alloc
-#include "ruby/encoding.h"
-#include "ruby/io.h"
-#include "ruby/st.h"
-#include "ruby/re.h"
-#include "ruby/thread.h"
-#include "ruby/util.h"
-#include "ruby/debug.h"
-#include "internal.h"
-#include "eval_intern.h"
-#include "vm_core.h"
-#include "builtin.h"
-#include "gc.h"
-#include "constant.h"
-#include "ruby_atomic.h"
-#include "probes.h"
-#include "id_table.h"
-#include "symbol.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <setjmp.h>
-#include <sys/types.h>
-#include "ruby_assert.h"
-#include "debug_counter.h"
-#include "transient_heap.h"
-#include "mjit.h"
+#include "ruby/internal/config.h"
+#ifdef _WIN32
+# include "ruby/ruby.h"
+#endif
-#undef rb_data_object_wrap
+#include <signal.h>
+
+#define sighandler_t ruby_sighandler_t
+
+#ifndef _WIN32
+#include <unistd.h>
+#include <sys/mman.h>
+#endif
+
+#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
+# include "wasm/setjmp.h"
+# include "wasm/machine.h"
+#else
+# include <setjmp.h>
+#endif
+#include <stdarg.h>
+#include <stdio.h>
+/* MALLOC_HEADERS_BEGIN */
#ifndef HAVE_MALLOC_USABLE_SIZE
# ifdef _WIN32
-# define HAVE_MALLOC_USABLE_SIZE
-# define malloc_usable_size(a) _msize(a)
+# define HAVE_MALLOC_USABLE_SIZE
+# define malloc_usable_size(a) _msize(a)
# elif defined HAVE_MALLOC_SIZE
-# define HAVE_MALLOC_USABLE_SIZE
-# define malloc_usable_size(a) malloc_size(a)
+# define HAVE_MALLOC_USABLE_SIZE
+# define malloc_usable_size(a) malloc_size(a)
# endif
#endif
+
#ifdef HAVE_MALLOC_USABLE_SIZE
# ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
-# include RUBY_ALTERNATIVE_MALLOC_HEADER
-# elif HAVE_MALLOC_H
+/* Alternative malloc header is included in ruby/missing.h */
+# elif defined(HAVE_MALLOC_H)
# include <malloc.h>
# elif defined(HAVE_MALLOC_NP_H)
# include <malloc_np.h>
@@ -63,75 +60,102 @@
# endif
#endif
+#if !defined(PAGE_SIZE) && defined(HAVE_SYS_USER_H)
+/* LIST_HEAD conflicts with sys/queue.h on macOS */
+# include <sys/user.h>
+#endif
+/* MALLOC_HEADERS_END */
+
#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
+# include <sys/time.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
+# include <sys/resource.h>
#endif
#if defined _WIN32 || defined __CYGWIN__
-#include <windows.h>
+# include <windows.h>
#elif defined(HAVE_POSIX_MEMALIGN)
#elif defined(HAVE_MEMALIGN)
-#include <malloc.h>
+# include <malloc.h>
#endif
-#define rb_setjmp(env) RUBY_SETJMP(env)
-#define rb_jmp_buf rb_jmpbuf_t
+#include <sys/types.h>
-#if defined(_MSC_VER) && defined(_WIN64)
-#include <intrin.h>
-#pragma intrinsic(_umul128)
+#ifdef __EMSCRIPTEN__
+#include <emscripten.h>
#endif
-/* Expecting this struct to be eliminated by function inlinings */
-struct optional {
- bool left;
- size_t right;
-};
-
-static inline struct optional
-size_mul_overflow(size_t x, size_t y)
-{
- bool p;
- size_t z;
-#if 0
-
-#elif defined(HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW)
- p = __builtin_mul_overflow(x, y, &z);
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+# include <mach/task.h>
+# include <mach/mach_init.h>
+# include <mach/mach_port.h>
+#endif
+#undef LIST_HEAD /* ccan/list conflicts with BSD-origin sys/queue.h. */
-#elif defined(DSIZE_T)
- RB_GNUC_EXTENSION DSIZE_T dx = x;
- RB_GNUC_EXTENSION DSIZE_T dy = y;
- RB_GNUC_EXTENSION DSIZE_T dz = dx * dy;
- p = dz > SIZE_MAX;
- z = (size_t)dz;
+#include "constant.h"
+#include "debug_counter.h"
+#include "eval_intern.h"
+#include "gc.h"
+#include "id_table.h"
+#include "internal.h"
+#include "internal/class.h"
+#include "internal/complex.h"
+#include "internal/cont.h"
+#include "internal/error.h"
+#include "internal/eval.h"
+#include "internal/gc.h"
+#include "internal/hash.h"
+#include "internal/imemo.h"
+#include "internal/io.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/proc.h"
+#include "internal/rational.h"
+#include "internal/sanitizers.h"
+#include "internal/struct.h"
+#include "internal/symbol.h"
+#include "internal/thread.h"
+#include "internal/variable.h"
+#include "internal/warnings.h"
+#include "mjit.h"
+#include "probes.h"
+#include "regint.h"
+#include "ruby/debug.h"
+#include "ruby/io.h"
+#include "ruby/re.h"
+#include "ruby/st.h"
+#include "ruby/thread.h"
+#include "ruby/util.h"
+#include "ruby_assert.h"
+#include "ruby_atomic.h"
+#include "symbol.h"
+#include "transient_heap.h"
+#include "vm_core.h"
+#include "vm_sync.h"
+#include "vm_callinfo.h"
+#include "ractor_core.h"
-#elif defined(_MSC_VER) && defined(_WIN64)
- unsigned __int64 dp;
- unsigned __int64 dz = _umul128(x, y, &dp);
- p = (bool)dp;
- z = (size_t)dz;
+#include "builtin.h"
+#include "shape.h"
-#else
- /* https://wiki.sei.cmu.edu/confluence/display/c/INT30-C.+Ensure+that+unsigned+integer+operations+do+not+wrap */
- p = (y != 0) && (x > SIZE_MAX / y);
- z = x * y;
+#define rb_setjmp(env) RUBY_SETJMP(env)
+#define rb_jmp_buf rb_jmpbuf_t
+#undef rb_data_object_wrap
+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+#define MAP_ANONYMOUS MAP_ANON
#endif
- return (struct optional) { p, z, };
-}
-static inline struct optional
+static inline struct rbimpl_size_mul_overflow_tag
size_add_overflow(size_t x, size_t y)
{
size_t z;
bool p;
#if 0
-#elif defined(HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW)
+#elif __has_builtin(__builtin_add_overflow)
p = __builtin_add_overflow(x, y, &z);
#elif defined(DSIZE_T)
@@ -146,24 +170,24 @@ size_add_overflow(size_t x, size_t y)
p = z < y;
#endif
- return (struct optional) { p, z, };
+ return (struct rbimpl_size_mul_overflow_tag) { p, z, };
}
-static inline struct optional
+static inline struct rbimpl_size_mul_overflow_tag
size_mul_add_overflow(size_t x, size_t y, size_t z) /* x * y + z */
{
- struct optional t = size_mul_overflow(x, y);
- struct optional u = size_add_overflow(t.right, z);
- return (struct optional) { t.left || u.left, u.right };
+ struct rbimpl_size_mul_overflow_tag t = rbimpl_size_mul_overflow(x, y);
+ struct rbimpl_size_mul_overflow_tag u = size_add_overflow(t.right, z);
+ return (struct rbimpl_size_mul_overflow_tag) { t.left || u.left, u.right };
}
-static inline struct optional
+static inline struct rbimpl_size_mul_overflow_tag
size_mul_add_mul_overflow(size_t x, size_t y, size_t z, size_t w) /* x * y + z * w */
{
- struct optional t = size_mul_overflow(x, y);
- struct optional u = size_mul_overflow(z, w);
- struct optional v = size_add_overflow(t.right, u.right);
- return (struct optional) { t.left || u.left || v.left, v.right };
+ struct rbimpl_size_mul_overflow_tag t = rbimpl_size_mul_overflow(x, y);
+ struct rbimpl_size_mul_overflow_tag u = rbimpl_size_mul_overflow(z, w);
+ struct rbimpl_size_mul_overflow_tag v = size_add_overflow(t.right, u.right);
+ return (struct rbimpl_size_mul_overflow_tag) { t.left || u.left || v.left, v.right };
}
PRINTF_ARGS(NORETURN(static void gc_raise(VALUE, const char*, ...)), 2, 3);
@@ -171,7 +195,7 @@ PRINTF_ARGS(NORETURN(static void gc_raise(VALUE, const char*, ...)), 2, 3);
static inline size_t
size_mul_or_raise(size_t x, size_t y, VALUE exc)
{
- struct optional t = size_mul_overflow(x, y);
+ struct rbimpl_size_mul_overflow_tag t = rbimpl_size_mul_overflow(x, y);
if (LIKELY(!t.left)) {
return t.right;
}
@@ -184,7 +208,7 @@ size_mul_or_raise(size_t x, size_t y, VALUE exc)
"integer overflow: %"PRIuSIZE
" * %"PRIuSIZE
" > %"PRIuSIZE,
- x, y, SIZE_MAX);
+ x, y, (size_t)SIZE_MAX);
}
}
@@ -197,7 +221,7 @@ rb_size_mul_or_raise(size_t x, size_t y, VALUE exc)
static inline size_t
size_mul_add_or_raise(size_t x, size_t y, size_t z, VALUE exc)
{
- struct optional t = size_mul_add_overflow(x, y, z);
+ struct rbimpl_size_mul_overflow_tag t = size_mul_add_overflow(x, y, z);
if (LIKELY(!t.left)) {
return t.right;
}
@@ -211,7 +235,7 @@ size_mul_add_or_raise(size_t x, size_t y, size_t z, VALUE exc)
" * %"PRIuSIZE
" + %"PRIuSIZE
" > %"PRIuSIZE,
- x, y, z, SIZE_MAX);
+ x, y, z, (size_t)SIZE_MAX);
}
}
@@ -224,7 +248,7 @@ rb_size_mul_add_or_raise(size_t x, size_t y, size_t z, VALUE exc)
static inline size_t
size_mul_add_mul_or_raise(size_t x, size_t y, size_t z, size_t w, VALUE exc)
{
- struct optional t = size_mul_add_mul_overflow(x, y, z, w);
+ struct rbimpl_size_mul_overflow_tag t = size_mul_add_mul_overflow(x, y, z, w);
if (LIKELY(!t.left)) {
return t.right;
}
@@ -239,7 +263,7 @@ size_mul_add_mul_or_raise(size_t x, size_t y, size_t z, size_t w, VALUE exc)
" + %"PRIdSIZE
" * %"PRIdSIZE
" > %"PRIdSIZE,
- x, y, z, w, SIZE_MAX);
+ x, y, z, w, (size_t)SIZE_MAX);
}
}
@@ -365,7 +389,6 @@ static ruby_gc_params_t gc_params = {
#define GC_DEBUG 0
#endif
-#if USE_RGENGC
/* RGENGC_DEBUG:
* 1: basic information
* 2: remember set operation
@@ -382,8 +405,10 @@ static ruby_gc_params_t gc_params = {
#endif
#if RGENGC_DEBUG < 0 && !defined(_MSC_VER)
# define RGENGC_DEBUG_ENABLED(level) (-(RGENGC_DEBUG) >= (level) && ruby_rgengc_debug >= (level))
-#else
+#elif defined(HAVE_VA_ARGS_MACRO)
# define RGENGC_DEBUG_ENABLED(level) ((RGENGC_DEBUG) >= (level))
+#else
+# define RGENGC_DEBUG_ENABLED(level) 0
#endif
int ruby_rgengc_debug;
@@ -438,22 +463,6 @@ int ruby_rgengc_debug;
#define RGENGC_FORCE_MAJOR_GC 0
#endif
-#else /* USE_RGENGC */
-
-#ifdef RGENGC_DEBUG
-#undef RGENGC_DEBUG
-#endif
-#define RGENGC_DEBUG 0
-#ifdef RGENGC_CHECK_MODE
-#undef RGENGC_CHECK_MODE
-#endif
-#define RGENGC_CHECK_MODE 0
-#define RGENGC_PROFILE 0
-#define RGENGC_ESTIMATE_OLDMALLOC 0
-#define RGENGC_FORCE_MAJOR_GC 0
-
-#endif /* USE_RGENGC */
-
#ifndef GC_PROFILE_MORE_DETAIL
#define GC_PROFILE_MORE_DETAIL 0
#endif
@@ -512,6 +521,7 @@ typedef enum {
GPR_FLAG_HAVE_FINALIZE = 0x4000,
GPR_FLAG_IMMEDIATE_MARK = 0x8000,
GPR_FLAG_FULL_MARK = 0x10000,
+ GPR_FLAG_COMPACT = 0x20000,
GPR_DEFAULT_REASON =
(GPR_FLAG_FULL_MARK | GPR_FLAG_IMMEDIATE_MARK |
@@ -519,7 +529,7 @@ typedef enum {
} gc_profile_record_flag;
typedef struct gc_profile_record {
- int flags;
+ unsigned int flags;
double gc_time;
double gc_invoke_time;
@@ -527,6 +537,7 @@ typedef struct gc_profile_record {
size_t heap_total_objects;
size_t heap_use_size;
size_t heap_total_size;
+ size_t moved_objects;
#if GC_PROFILE_MORE_DETAIL
double gc_mark_time;
@@ -559,62 +570,83 @@ typedef struct gc_profile_record {
#endif
} gc_profile_record;
-#if defined(_MSC_VER) || defined(__CYGWIN__)
-#pragma pack(push, 1) /* magic for reducing sizeof(RVALUE): 24 -> 20 */
-#endif
+struct RMoved {
+ VALUE flags;
+ VALUE dummy;
+ VALUE destination;
+ shape_id_t original_shape_id;
+};
+
+#define RMOVED(obj) ((struct RMoved *)(obj))
typedef struct RVALUE {
union {
- struct {
- VALUE flags; /* always 0 for freed obj */
- struct RVALUE *next;
- } free;
+ struct {
+ VALUE flags; /* always 0 for freed obj */
+ struct RVALUE *next;
+ } free;
struct RMoved moved;
- struct RBasic basic;
- struct RObject object;
- struct RClass klass;
- struct RFloat flonum;
- struct RString string;
- struct RArray array;
- struct RRegexp regexp;
- struct RHash hash;
- struct RData data;
- struct RTypedData typeddata;
- struct RStruct rstruct;
- struct RBignum bignum;
- struct RFile file;
- struct RMatch match;
- struct RRational rational;
- struct RComplex complex;
- union {
- rb_cref_t cref;
- struct vm_svar svar;
- struct vm_throw_data throw_data;
- struct vm_ifunc ifunc;
- struct MEMO memo;
- struct rb_method_entry_struct ment;
- const rb_iseq_t iseq;
- rb_env_t env;
- struct rb_imemo_tmpbuf_struct alloc;
- rb_ast_t ast;
- } imemo;
- struct {
- struct RBasic basic;
- VALUE v1;
- VALUE v2;
- VALUE v3;
- } values;
+ struct RBasic basic;
+ struct RObject object;
+ struct RClass klass;
+ struct RFloat flonum;
+ struct RString string;
+ struct RArray array;
+ struct RRegexp regexp;
+ struct RHash hash;
+ struct RData data;
+ struct RTypedData typeddata;
+ struct RStruct rstruct;
+ struct RBignum bignum;
+ struct RFile file;
+ struct RMatch match;
+ struct RRational rational;
+ struct RComplex complex;
+ struct RSymbol symbol;
+ union {
+ rb_cref_t cref;
+ struct vm_svar svar;
+ struct vm_throw_data throw_data;
+ struct vm_ifunc ifunc;
+ struct MEMO memo;
+ struct rb_method_entry_struct ment;
+ const rb_iseq_t iseq;
+ rb_env_t env;
+ struct rb_imemo_tmpbuf_struct alloc;
+ rb_ast_t ast;
+ } imemo;
+ struct {
+ struct RBasic basic;
+ VALUE v1;
+ VALUE v2;
+ VALUE v3;
+ } values;
} as;
+
+ /* Start of RVALUE_OVERHEAD.
+ * Do not directly read these members from the RVALUE as they're located
+ * at the end of the slot (which may differ in size depending on the size
+ * pool). */
+#if RACTOR_CHECK_MODE
+ uint32_t _ractor_belonging_id;
+#endif
#if GC_DEBUG
const char *file;
int line;
#endif
} RVALUE;
-#if defined(_MSC_VER) || defined(__CYGWIN__)
-#pragma pack(pop)
+#if RACTOR_CHECK_MODE
+# define RVALUE_OVERHEAD (sizeof(RVALUE) - offsetof(RVALUE, _ractor_belonging_id))
+#elif GC_DEBUG
+# define RVALUE_OVERHEAD (sizeof(RVALUE) - offsetof(RVALUE, file))
+#else
+# define RVALUE_OVERHEAD 0
#endif
+STATIC_ASSERT(sizeof_rvalue, sizeof(RVALUE) == (SIZEOF_VALUE * 5) + RVALUE_OVERHEAD);
+STATIC_ASSERT(alignof_rvalue, RUBY_ALIGNOF(RVALUE) == SIZEOF_VALUE);
+
typedef uintptr_t bits_t;
enum {
BITS_SIZE = sizeof(bits_t),
@@ -653,13 +685,15 @@ typedef struct mark_stack {
size_t unused_cache_size;
} mark_stack_t;
-typedef struct rb_heap_struct {
- RVALUE *freelist;
+#define SIZE_POOL_EDEN_HEAP(size_pool) (&(size_pool)->eden_heap)
+#define SIZE_POOL_TOMB_HEAP(size_pool) (&(size_pool)->tomb_heap)
+typedef struct rb_heap_struct {
struct heap_page *free_pages;
- struct heap_page *using_page;
- struct list_head pages;
+ struct ccan_list_head pages;
struct heap_page *sweeping_page; /* iterator for .pages */
+ struct heap_page *compact_cursor;
+ uintptr_t compact_cursor_index;
#if GC_ENABLE_INCREMENTAL_MARK
struct heap_page *pooled_pages;
#endif
@@ -667,157 +701,172 @@ typedef struct rb_heap_struct {
size_t total_slots; /* total slot count (about total_pages * HEAP_PAGE_OBJ_LIMIT) */
} rb_heap_t;
+typedef struct rb_size_pool_struct {
+ short slot_size;
+
+ size_t allocatable_pages;
+
+ /* Basic statistics */
+ size_t total_allocated_pages;
+ size_t total_freed_pages;
+ size_t force_major_gc_count;
+
+#if USE_RVARGC
+ /* Sweeping statistics */
+ size_t freed_slots;
+ size_t empty_slots;
+#endif
+
+ rb_heap_t eden_heap;
+ rb_heap_t tomb_heap;
+} rb_size_pool_t;
+
enum gc_mode {
gc_mode_none,
gc_mode_marking,
- gc_mode_sweeping
+ gc_mode_sweeping,
+ gc_mode_compacting,
};
typedef struct rb_objspace {
struct {
- size_t limit;
- size_t increase;
+ size_t limit;
+ size_t increase;
#if MALLOC_ALLOCATED_SIZE
- size_t allocated_size;
- size_t allocations;
+ size_t allocated_size;
+ size_t allocations;
#endif
+
} malloc_params;
struct {
- unsigned int mode : 2;
- unsigned int immediate_sweep : 1;
- unsigned int dont_gc : 1;
- unsigned int dont_incremental : 1;
- unsigned int during_gc : 1;
+ unsigned int mode : 2;
+ unsigned int immediate_sweep : 1;
+ unsigned int dont_gc : 1;
+ unsigned int dont_incremental : 1;
+ unsigned int during_gc : 1;
unsigned int during_compacting : 1;
- unsigned int gc_stressful: 1;
- unsigned int has_hook: 1;
-#if USE_RGENGC
- unsigned int during_minor_gc : 1;
-#endif
+ unsigned int gc_stressful: 1;
+ unsigned int has_hook: 1;
+ unsigned int during_minor_gc : 1;
#if GC_ENABLE_INCREMENTAL_MARK
- unsigned int during_incremental_marking : 1;
+ unsigned int during_incremental_marking : 1;
#endif
+ unsigned int measure_gc : 1;
} flags;
rb_event_flag_t hook_events;
size_t total_allocated_objects;
VALUE next_object_id;
- rb_heap_t eden_heap;
- rb_heap_t tomb_heap; /* heap for zombies and ghosts */
+ rb_size_pool_t size_pools[SIZE_POOL_COUNT];
struct {
- rb_atomic_t finalizing;
+ rb_atomic_t finalizing;
} atomic_flags;
- struct mark_func_data_struct {
- void *data;
- void (*mark_func)(VALUE v, void *data);
- } *mark_func_data;
-
mark_stack_t mark_stack;
size_t marked_slots;
struct {
- struct heap_page **sorted;
- size_t allocated_pages;
- size_t allocatable_pages;
- size_t sorted_length;
- RVALUE *range[2];
- size_t freeable_pages;
-
- /* final */
- size_t final_slots;
- VALUE deferred_final;
+ struct heap_page **sorted;
+ size_t allocated_pages;
+ size_t allocatable_pages;
+ size_t sorted_length;
+ uintptr_t range[2];
+ size_t freeable_pages;
+
+ /* final */
+ size_t final_slots;
+ VALUE deferred_final;
} heap_pages;
st_table *finalizer_table;
struct {
- int run;
- int latest_gc_info;
- gc_profile_record *records;
- gc_profile_record *current_record;
- size_t next_index;
- size_t size;
+ int run;
+ unsigned int latest_gc_info;
+ gc_profile_record *records;
+ gc_profile_record *current_record;
+ size_t next_index;
+ size_t size;
#if GC_PROFILE_MORE_DETAIL
- double prepare_time;
+ double prepare_time;
#endif
- double invoke_time;
+ double invoke_time;
-#if USE_RGENGC
- size_t minor_gc_count;
- size_t major_gc_count;
- size_t compact_count;
+ size_t minor_gc_count;
+ size_t major_gc_count;
+ size_t compact_count;
+ size_t read_barrier_faults;
#if RGENGC_PROFILE > 0
- size_t total_generated_normal_object_count;
- size_t total_generated_shady_object_count;
- size_t total_shade_operation_count;
- size_t total_promoted_count;
- size_t total_remembered_normal_object_count;
- size_t total_remembered_shady_object_count;
+ size_t total_generated_normal_object_count;
+ size_t total_generated_shady_object_count;
+ size_t total_shade_operation_count;
+ size_t total_promoted_count;
+ size_t total_remembered_normal_object_count;
+ size_t total_remembered_shady_object_count;
#if RGENGC_PROFILE >= 2
- size_t generated_normal_object_count_types[RUBY_T_MASK];
- size_t generated_shady_object_count_types[RUBY_T_MASK];
- size_t shade_operation_count_types[RUBY_T_MASK];
- size_t promoted_types[RUBY_T_MASK];
- size_t remembered_normal_object_count_types[RUBY_T_MASK];
- size_t remembered_shady_object_count_types[RUBY_T_MASK];
+ size_t generated_normal_object_count_types[RUBY_T_MASK];
+ size_t generated_shady_object_count_types[RUBY_T_MASK];
+ size_t shade_operation_count_types[RUBY_T_MASK];
+ size_t promoted_types[RUBY_T_MASK];
+ size_t remembered_normal_object_count_types[RUBY_T_MASK];
+ size_t remembered_shady_object_count_types[RUBY_T_MASK];
#endif
#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
-
- /* temporary profiling space */
- double gc_sweep_start_time;
- size_t total_allocated_objects_at_gc_start;
- size_t heap_used_at_gc_start;
-
- /* basic statistics */
- size_t count;
- size_t total_freed_objects;
- size_t total_allocated_pages;
- size_t total_freed_pages;
+
+ /* temporary profiling space */
+ double gc_sweep_start_time;
+ size_t total_allocated_objects_at_gc_start;
+ size_t heap_used_at_gc_start;
+
+ /* basic statistics */
+ size_t count;
+ size_t total_freed_objects;
+ uint64_t total_time_ns;
+ struct timespec start_time;
} profile;
struct gc_list *global_list;
VALUE gc_stress_mode;
-#if USE_RGENGC
struct {
- VALUE parent_object;
- int need_major_gc;
- size_t last_major_gc;
- size_t uncollectible_wb_unprotected_objects;
- size_t uncollectible_wb_unprotected_objects_limit;
- size_t old_objects;
- size_t old_objects_limit;
+ VALUE parent_object;
+ int need_major_gc;
+ size_t last_major_gc;
+ size_t uncollectible_wb_unprotected_objects;
+ size_t uncollectible_wb_unprotected_objects_limit;
+ size_t old_objects;
+ size_t old_objects_limit;
#if RGENGC_ESTIMATE_OLDMALLOC
- size_t oldmalloc_increase;
- size_t oldmalloc_increase_limit;
+ size_t oldmalloc_increase;
+ size_t oldmalloc_increase_limit;
#endif
#if RGENGC_CHECK_MODE >= 2
- struct st_table *allrefs_table;
- size_t error_count;
+ struct st_table *allrefs_table;
+ size_t error_count;
#endif
} rgengc;
struct {
size_t considered_count_table[T_MASK];
size_t moved_count_table[T_MASK];
+ size_t moved_up_count_table[T_MASK];
+ size_t moved_down_count_table[T_MASK];
+ size_t total_moved;
} rcompactor;
#if GC_ENABLE_INCREMENTAL_MARK
struct {
- size_t pooled_slots;
- size_t step_slots;
+ size_t pooled_slots;
+ size_t step_slots;
} rincgc;
#endif
-#endif /* USE_RGENGC */
st_table *id_to_obj_tbl;
st_table *obj_to_id_tbl;
@@ -828,56 +877,123 @@ typedef struct rb_objspace {
} rb_objspace_t;
-/* default tiny heap size: 16KB */
-#define HEAP_PAGE_ALIGN_LOG 14
-#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
+#ifndef HEAP_PAGE_ALIGN_LOG
+/* default tiny heap size: 64KiB */
+#define HEAP_PAGE_ALIGN_LOG 16
+#endif
+
+#define BASE_SLOT_SIZE sizeof(RVALUE)
+
+#define CEILDIV(i, mod) roomof(i, mod)
enum {
HEAP_PAGE_ALIGN = (1UL << HEAP_PAGE_ALIGN_LOG),
HEAP_PAGE_ALIGN_MASK = (~(~0UL << HEAP_PAGE_ALIGN_LOG)),
- REQUIRED_SIZE_BY_MALLOC = (sizeof(size_t) * 5),
- HEAP_PAGE_SIZE = (HEAP_PAGE_ALIGN - REQUIRED_SIZE_BY_MALLOC),
- HEAP_PAGE_OBJ_LIMIT = (unsigned int)((HEAP_PAGE_SIZE - sizeof(struct heap_page_header))/sizeof(struct RVALUE)),
- HEAP_PAGE_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_PAGE_SIZE, sizeof(struct RVALUE)), BITS_BITLENGTH),
+ HEAP_PAGE_SIZE = HEAP_PAGE_ALIGN,
+ HEAP_PAGE_OBJ_LIMIT = (unsigned int)((HEAP_PAGE_SIZE - sizeof(struct heap_page_header)) / BASE_SLOT_SIZE),
+ HEAP_PAGE_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_PAGE_SIZE, BASE_SLOT_SIZE), BITS_BITLENGTH),
HEAP_PAGE_BITMAP_SIZE = (BITS_SIZE * HEAP_PAGE_BITMAP_LIMIT),
- HEAP_PAGE_BITMAP_PLANES = USE_RGENGC ? 4 : 1 /* RGENGC: mark, unprotected, uncollectible, marking */
};
+#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
+#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
+
+#if GC_ENABLE_INCREMENTAL_MARK && !defined(INCREMENTAL_MARK_STEP_ALLOCATIONS)
+# define INCREMENTAL_MARK_STEP_ALLOCATIONS 500
+#endif
+
+#undef INIT_HEAP_PAGE_ALLOC_USE_MMAP
+/* Must define either HEAP_PAGE_ALLOC_USE_MMAP or
+ * INIT_HEAP_PAGE_ALLOC_USE_MMAP. */
+
+#ifndef HAVE_MMAP
+/* We can't use mmap of course, if it is not available. */
+static const bool HEAP_PAGE_ALLOC_USE_MMAP = false;
+
+#elif defined(__wasm__)
+/* wasmtime does not have proper support for mmap.
+ * See https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-rationale.md#why-no-mmap-and-friends
+ */
+static const bool HEAP_PAGE_ALLOC_USE_MMAP = false;
+
+#elif HAVE_CONST_PAGE_SIZE
+/* If we have the PAGE_SIZE and it is a constant, then we can directly use it. */
+static const bool HEAP_PAGE_ALLOC_USE_MMAP = (PAGE_SIZE <= HEAP_PAGE_SIZE);
+
+#elif defined(PAGE_MAX_SIZE) && (PAGE_MAX_SIZE <= HEAP_PAGE_SIZE)
+/* If we can use the maximum page size. */
+static const bool HEAP_PAGE_ALLOC_USE_MMAP = true;
+
+#elif defined(PAGE_SIZE)
+/* If the PAGE_SIZE macro can be used dynamically. */
+# define INIT_HEAP_PAGE_ALLOC_USE_MMAP (PAGE_SIZE <= HEAP_PAGE_SIZE)
+
+#elif defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+/* If we can use sysconf to determine the page size. */
+# define INIT_HEAP_PAGE_ALLOC_USE_MMAP (sysconf(_SC_PAGE_SIZE) <= HEAP_PAGE_SIZE)
+
+#else
+/* Otherwise we can't determine the system page size, so don't use mmap. */
+static const bool HEAP_PAGE_ALLOC_USE_MMAP = false;
+#endif
+
+#ifdef INIT_HEAP_PAGE_ALLOC_USE_MMAP
+/* We can determine the system page size at runtime. */
+# define HEAP_PAGE_ALLOC_USE_MMAP (heap_page_alloc_use_mmap != false)
+
+static bool heap_page_alloc_use_mmap;
+#endif
struct heap_page {
+ short slot_size;
short total_slots;
short free_slots;
- short pinned_slots;
short final_slots;
struct {
- unsigned int before_sweep : 1;
- unsigned int has_remembered_objects : 1;
- unsigned int has_uncollectible_shady_objects : 1;
- unsigned int in_tomb : 1;
+ unsigned int before_sweep : 1;
+ unsigned int has_remembered_objects : 1;
+ unsigned int has_uncollectible_shady_objects : 1;
+ unsigned int in_tomb : 1;
} flags;
+ rb_size_pool_t *size_pool;
+
struct heap_page *free_next;
- RVALUE *start;
+ uintptr_t start;
RVALUE *freelist;
- struct list_node page_node;
+ struct ccan_list_node page_node;
-#if USE_RGENGC
bits_t wb_unprotected_bits[HEAP_PAGE_BITMAP_LIMIT];
-#endif
/* the following three bitmaps are cleared at the beginning of full GC */
bits_t mark_bits[HEAP_PAGE_BITMAP_LIMIT];
-#if USE_RGENGC
bits_t uncollectible_bits[HEAP_PAGE_BITMAP_LIMIT];
bits_t marking_bits[HEAP_PAGE_BITMAP_LIMIT];
-#endif
/* If set, the object is not movable */
bits_t pinned_bits[HEAP_PAGE_BITMAP_LIMIT];
};
+/*
+ * When asan is enabled, this will prohibit writing to the freelist until it is unlocked
+ */
+static void
+asan_lock_freelist(struct heap_page *page)
+{
+ asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+}
+
+/*
+ * When asan is enabled, this will enable the ability to write to the freelist
+ */
+static void
+asan_unlock_freelist(struct heap_page *page)
+{
+ asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
+}
+
#define GET_PAGE_BODY(x) ((struct heap_page_body *)((bits_t)(x) & ~(HEAP_PAGE_ALIGN_MASK)))
#define GET_PAGE_HEADER(x) (&GET_PAGE_BODY(x)->header)
#define GET_HEAP_PAGE(x) (GET_PAGE_HEADER(x)->page)
-#define NUM_IN_PAGE(p) (((bits_t)(p) & HEAP_PAGE_ALIGN_MASK)/sizeof(RVALUE))
+#define NUM_IN_PAGE(p) (((bits_t)(p) & HEAP_PAGE_ALIGN_MASK) / BASE_SLOT_SIZE)
#define BITMAP_INDEX(p) (NUM_IN_PAGE(p) / BITS_BITLENGTH )
#define BITMAP_OFFSET(p) (NUM_IN_PAGE(p) & (BITS_BITLENGTH-1))
#define BITMAP_BIT(p) ((bits_t)1 << BITMAP_OFFSET(p))
@@ -890,11 +1006,11 @@ struct heap_page {
/* getting bitmap */
#define GET_HEAP_MARK_BITS(x) (&GET_HEAP_PAGE(x)->mark_bits[0])
#define GET_HEAP_PINNED_BITS(x) (&GET_HEAP_PAGE(x)->pinned_bits[0])
-#if USE_RGENGC
#define GET_HEAP_UNCOLLECTIBLE_BITS(x) (&GET_HEAP_PAGE(x)->uncollectible_bits[0])
#define GET_HEAP_WB_UNPROTECTED_BITS(x) (&GET_HEAP_PAGE(x)->wb_unprotected_bits[0])
#define GET_HEAP_MARKING_BITS(x) (&GET_HEAP_PAGE(x)->marking_bits[0])
-#endif
+
+#define GC_SWEEP_PAGES_FREEABLE_PER_STEP 3
/* Aliases */
#define rb_objspace (*rb_objspace_of(GET_VM()))
@@ -912,13 +1028,10 @@ VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
#define heap_pages_sorted_length objspace->heap_pages.sorted_length
#define heap_pages_lomem objspace->heap_pages.range[0]
#define heap_pages_himem objspace->heap_pages.range[1]
-#define heap_allocatable_pages objspace->heap_pages.allocatable_pages
#define heap_pages_freeable_pages objspace->heap_pages.freeable_pages
#define heap_pages_final_slots objspace->heap_pages.final_slots
#define heap_pages_deferred_final objspace->heap_pages.deferred_final
-#define heap_eden (&objspace->eden_heap)
-#define heap_tomb (&objspace->tomb_heap)
-#define dont_gc objspace->flags.dont_gc
+#define size_pools objspace->size_pools
#define during_gc objspace->flags.during_gc
#define finalizing objspace->atomic_flags.finalizing
#define finalizer_table objspace->finalizer_table
@@ -931,6 +1044,18 @@ VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
#define stress_to_class 0
#endif
+#if 0
+#define dont_gc_on() (fprintf(stderr, "dont_gc_on@%s:%d\n", __FILE__, __LINE__), objspace->flags.dont_gc = 1)
+#define dont_gc_off() (fprintf(stderr, "dont_gc_off@%s:%d\n", __FILE__, __LINE__), objspace->flags.dont_gc = 0)
+#define dont_gc_set(b) (fprintf(stderr, "dont_gc_set(%d)@%s:%d\n", __FILE__, __LINE__), (int)b), objspace->flags.dont_gc = (b))
+#define dont_gc_val() (objspace->flags.dont_gc)
+#else
+#define dont_gc_on() (objspace->flags.dont_gc = 1)
+#define dont_gc_off() (objspace->flags.dont_gc = 0)
+#define dont_gc_set(b) (((int)b), objspace->flags.dont_gc = (b))
+#define dont_gc_val() (objspace->flags.dont_gc)
+#endif
+
static inline enum gc_mode
gc_mode_verify(enum gc_mode mode)
{
@@ -939,24 +1064,106 @@ gc_mode_verify(enum gc_mode mode)
case gc_mode_none:
case gc_mode_marking:
case gc_mode_sweeping:
- break;
+ case gc_mode_compacting:
+ break;
default:
- rb_bug("gc_mode_verify: unreachable (%d)", (int)mode);
+ rb_bug("gc_mode_verify: unreachable (%d)", (int)mode);
}
#endif
return mode;
}
+static inline bool
+has_sweeping_pages(rb_objspace_t *objspace)
+{
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ if (SIZE_POOL_EDEN_HEAP(&size_pools[i])->sweeping_page) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static inline size_t
+heap_eden_total_pages(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ count += SIZE_POOL_EDEN_HEAP(&size_pools[i])->total_pages;
+ }
+ return count;
+}
+
+static inline size_t
+heap_eden_total_slots(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ count += SIZE_POOL_EDEN_HEAP(&size_pools[i])->total_slots;
+ }
+ return count;
+}
+
+static inline size_t
+heap_tomb_total_pages(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ count += SIZE_POOL_TOMB_HEAP(&size_pools[i])->total_pages;
+ }
+ return count;
+}
+
+static inline size_t
+heap_allocatable_pages(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ count += size_pools[i].allocatable_pages;
+ }
+ return count;
+}
+
+static inline size_t
+heap_allocatable_slots(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ int slot_size_multiple = size_pool->slot_size / BASE_SLOT_SIZE;
+ count += size_pool->allocatable_pages * HEAP_PAGE_OBJ_LIMIT / slot_size_multiple;
+ }
+ return count;
+}
+
+static inline size_t
+total_allocated_pages(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ count += size_pool->total_allocated_pages;
+ }
+ return count;
+}
+
+static inline size_t
+total_freed_pages(rb_objspace_t *objspace)
+{
+ size_t count = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ count += size_pool->total_freed_pages;
+ }
+ return count;
+}
+
#define gc_mode(objspace) gc_mode_verify((enum gc_mode)(objspace)->flags.mode)
#define gc_mode_set(objspace, mode) ((objspace)->flags.mode = (unsigned int)gc_mode_verify(mode))
#define is_marking(objspace) (gc_mode(objspace) == gc_mode_marking)
#define is_sweeping(objspace) (gc_mode(objspace) == gc_mode_sweeping)
-#if USE_RGENGC
#define is_full_marking(objspace) ((objspace)->flags.during_minor_gc == FALSE)
-#else
-#define is_full_marking(objspace) TRUE
-#endif
#if GC_ENABLE_INCREMENTAL_MARK
#define is_incremental_marking(objspace) ((objspace)->flags.during_incremental_marking != FALSE)
#else
@@ -967,8 +1174,10 @@ gc_mode_verify(enum gc_mode mode)
#else
#define will_be_incremental_marking(objspace) FALSE
#endif
-#define has_sweeping_pages(heap) ((heap)->sweeping_page != 0)
-#define is_lazy_sweeping(heap) (GC_ENABLE_LAZY_SWEEP && has_sweeping_pages(heap))
+#if GC_ENABLE_INCREMENTAL_MARK
+#define GC_INCREMENTAL_SWEEP_SLOT_COUNT 2048
+#endif
+#define is_lazy_sweeping(objspace) (GC_ENABLE_LAZY_SWEEP && has_sweeping_pages(objspace))
#if SIZEOF_LONG == SIZEOF_VOIDP
# define nonspecial_obj_id(obj) (VALUE)((SIGNED_VALUE)(obj)|FIXNUM_FLAG)
@@ -999,6 +1208,7 @@ int ruby_gc_debug_indent = 0;
#endif
VALUE rb_mGC;
int ruby_disable_gc = 0;
+int ruby_enable_autocompact = 0;
void rb_iseq_mark(const rb_iseq_t *iseq);
void rb_iseq_update_references(rb_iseq_t *iseq);
@@ -1010,32 +1220,46 @@ void rb_gcdebug_print_obj_condition(VALUE obj);
static VALUE define_final0(VALUE obj, VALUE block);
+NORETURN(static void *gc_vraise(void *ptr));
+NORETURN(static void gc_raise(VALUE exc, const char *fmt, ...));
NORETURN(static void negative_size_allocation_error(const char *));
static void init_mark_stack(mark_stack_t *stack);
static int ready_to_gc(rb_objspace_t *objspace);
-static int garbage_collect(rb_objspace_t *, int reason);
+static int garbage_collect(rb_objspace_t *, unsigned int reason);
-static int gc_start(rb_objspace_t *objspace, int reason);
+static int gc_start(rb_objspace_t *objspace, unsigned int reason);
static void gc_rest(rb_objspace_t *objspace);
-static inline void gc_enter(rb_objspace_t *objspace, const char *event);
-static inline void gc_exit(rb_objspace_t *objspace, const char *event);
+
+enum gc_enter_event {
+ gc_enter_event_start,
+ gc_enter_event_mark_continue,
+ gc_enter_event_sweep_continue,
+ gc_enter_event_rest,
+ gc_enter_event_finalizer,
+ gc_enter_event_rb_memerror,
+};
+
+static inline void gc_enter(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_lev);
+static inline void gc_exit(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_lev);
static void gc_marks(rb_objspace_t *objspace, int full_mark);
static void gc_marks_start(rb_objspace_t *objspace, int full);
-static int gc_marks_finish(rb_objspace_t *objspace);
+static void gc_marks_finish(rb_objspace_t *objspace);
static void gc_marks_rest(rb_objspace_t *objspace);
-static void gc_marks_step(rb_objspace_t *objspace, int slots);
-static void gc_marks_continue(rb_objspace_t *objspace, rb_heap_t *heap);
+static void gc_marks_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap);
static void gc_sweep(rb_objspace_t *objspace);
static void gc_sweep_start(rb_objspace_t *objspace);
+#if USE_RVARGC
+static void gc_sweep_finish_size_pool(rb_objspace_t *objspace, rb_size_pool_t *size_pool);
+#endif
static void gc_sweep_finish(rb_objspace_t *objspace);
-static int gc_sweep_step(rb_objspace_t *objspace, rb_heap_t *heap);
+static int gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap);
static void gc_sweep_rest(rb_objspace_t *objspace);
-static void gc_sweep_continue(rb_objspace_t *objspace, rb_heap_t *heap);
+static void gc_sweep_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap);
static inline void gc_mark(rb_objspace_t *objspace, VALUE ptr);
static inline void gc_pin(rb_objspace_t *objspace, VALUE ptr);
@@ -1062,9 +1286,10 @@ static int gc_verify_heap_page(rb_objspace_t *objspace, struct heap_page *page,
static int gc_verify_heap_pages(rb_objspace_t *objspace);
static void gc_stress_set(rb_objspace_t *objspace, VALUE flag);
+static VALUE gc_disable_no_rest(rb_objspace_t *);
static double getrusage_time(void);
-static inline void gc_prof_setup_new_record(rb_objspace_t *objspace, int reason);
+static inline void gc_prof_setup_new_record(rb_objspace_t *objspace, unsigned int reason);
static inline void gc_prof_timer_start(rb_objspace_t *);
static inline void gc_prof_timer_stop(rb_objspace_t *);
static inline void gc_prof_mark_timer_start(rb_objspace_t *);
@@ -1075,8 +1300,8 @@ static inline void gc_prof_set_malloc_info(rb_objspace_t *);
static inline void gc_prof_set_heap_info(rb_objspace_t *);
#define TYPED_UPDATE_IF_MOVED(_objspace, _type, _thing) do { \
- if (gc_object_moved_p(_objspace, (VALUE)_thing)) { \
- *((_type *)(&_thing)) = (_type)RMOVED((_thing))->destination; \
+ if (gc_object_moved_p((_objspace), (VALUE)(_thing))) { \
+ *(_type *)&(_thing) = (_type)RMOVED(_thing)->destination; \
} \
} while (0)
@@ -1093,12 +1318,7 @@ static inline void gc_prof_set_heap_info(rb_objspace_t *);
#endif
PRINTF_ARGS(static void gc_report_body(int level, rb_objspace_t *objspace, const char *fmt, ...), 3, 4);
static const char *obj_info(VALUE obj);
-
-#define PUSH_MARK_FUNC_DATA(v) do { \
- struct mark_func_data_struct *prev_mark_func_data = objspace->mark_func_data; \
- objspace->mark_func_data = (v);
-
-#define POP_MARK_FUNC_DATA() objspace->mark_func_data = prev_mark_func_data;} while (0)
+static const char *obj_type_name(VALUE obj);
/*
* 1 - TSC (H/W Time Stamp Counter)
@@ -1114,7 +1334,7 @@ static const char *obj_info(VALUE obj);
/* the following code is only for internal tuning. */
/* Source code to use RDTSC is quoted and modified from
- * http://www.mcs.anl.gov/~kazutomo/rdtsc.html
+ * https://www.mcs.anl.gov/~kazutomo/rdtsc.html
* written by Kazutomo Yoshii <kazutomo@mcs.anl.gov>
*/
@@ -1152,6 +1372,40 @@ tick(void)
return val;
}
+/* Implementation for macOS PPC by @nobu
+ * See: https://github.com/ruby/ruby/pull/5975#discussion_r890045558
+ */
+#elif defined(__POWERPC__) && defined(__APPLE__)
+typedef unsigned long long tick_t;
+#define PRItick "llu"
+
+static __inline__ tick_t
+tick(void)
+{
+ unsigned long int upper, lower, tmp;
+ # define mftbu(r) __asm__ volatile("mftbu %0" : "=r"(r))
+ # define mftb(r) __asm__ volatile("mftb %0" : "=r"(r))
+ do {
+ mftbu(upper);
+ mftb(lower);
+ mftbu(tmp);
+ } while (tmp != upper);
+ return ((tick_t)upper << 32) | lower;
+}
+
+#elif defined(__aarch64__) && defined(__GNUC__)
+typedef unsigned long tick_t;
+#define PRItick "lu"
+
+static __inline__ tick_t
+tick(void)
+{
+ unsigned long val;
+ __asm__ __volatile__ ("mrs %0, cntvct_el0" : "=r" (val));
+ return val;
+}
+
+
#elif defined(_WIN32) && defined(_MSC_VER)
#include <intrin.h>
typedef unsigned __int64 tick_t;
@@ -1199,6 +1453,29 @@ tick(void)
#define MEASURE_LINE(expr) expr
#endif /* USE_TICK_T */
+static inline void *
+asan_unpoison_object_temporary(VALUE obj)
+{
+ void *ptr = asan_poisoned_object_p(obj);
+ asan_unpoison_object(obj, false);
+ return ptr;
+}
+
+static inline void *
+asan_poison_object_restore(VALUE obj, void *ptr)
+{
+ if (ptr) {
+ asan_poison_object(obj);
+ }
+ return NULL;
+}
+
+#define asan_unpoisoning_object(obj) \
+ for (void *poisoned = asan_unpoison_object_temporary(obj), \
+ *unpoisoning = &poisoned; /* flag to loop just once */ \
+ unpoisoning; \
+ unpoisoning = asan_poison_object_restore(obj, poisoned))
+
#define FL_CHECK2(name, x, pred) \
((RGENGC_CHECK_MODE && SPECIAL_CONST_P(x)) ? \
(rb_bug(name": SPECIAL_CONST (%p)", (void *)(x)), 0) : (pred))
@@ -1210,7 +1487,6 @@ tick(void)
#define RVALUE_PIN_BITMAP(obj) MARKED_IN_BITMAP(GET_HEAP_PINNED_BITS(obj), (obj))
#define RVALUE_PAGE_MARKED(page, obj) MARKED_IN_BITMAP((page)->mark_bits, (obj))
-#if USE_RGENGC
#define RVALUE_WB_UNPROTECTED_BITMAP(obj) MARKED_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), (obj))
#define RVALUE_UNCOLLECTIBLE_BITMAP(obj) MARKED_IN_BITMAP(GET_HEAP_UNCOLLECTIBLE_BITS(obj), (obj))
#define RVALUE_MARKING_BITMAP(obj) MARKED_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), (obj))
@@ -1234,103 +1510,108 @@ RVALUE_FLAGS_AGE(VALUE flags)
return (int)((flags & (FL_PROMOTED0 | FL_PROMOTED1)) >> RVALUE_AGE_SHIFT);
}
-#endif /* USE_RGENGC */
-
static int
check_rvalue_consistency_force(const VALUE obj, int terminate)
{
- rb_objspace_t *objspace = &rb_objspace;
int err = 0;
+ rb_objspace_t *objspace = &rb_objspace;
- if (SPECIAL_CONST_P(obj)) {
- fprintf(stderr, "check_rvalue_consistency: %p is a special const.\n", (void *)obj);
- err++;
- }
- else if (!is_pointer_to_heap(objspace, (void *)obj)) {
- /* check if it is in tomb_pages */
- struct heap_page *page = NULL;
- list_for_each(&heap_tomb->pages, page, page_node) {
- if (&page->start[0] <= (RVALUE *)obj &&
- (RVALUE *)obj < &page->start[page->total_slots]) {
- fprintf(stderr, "check_rvalue_consistency: %p is in a tomb_heap (%p).\n",
- (void *)obj, (void *)page);
- err++;
- goto skip;
- }
- }
- fprintf(stderr, "check_rvalue_consistency: %p is not a Ruby object.\n", (void *)obj);
- err++;
- skip:
- ;
- }
- else {
- const int wb_unprotected_bit = RVALUE_WB_UNPROTECTED_BITMAP(obj) != 0;
- const int uncollectible_bit = RVALUE_UNCOLLECTIBLE_BITMAP(obj) != 0;
- const int mark_bit = RVALUE_MARK_BITMAP(obj) != 0;
- const int marking_bit = RVALUE_MARKING_BITMAP(obj) != 0, remembered_bit = marking_bit;
- const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
-
- if (GET_HEAP_PAGE(obj)->flags.in_tomb) {
- fprintf(stderr, "check_rvalue_consistency: %s is in tomb page.\n", obj_info(obj));
- err++;
- }
- if (BUILTIN_TYPE(obj) == T_NONE) {
- fprintf(stderr, "check_rvalue_consistency: %s is T_NONE.\n", obj_info(obj));
- err++;
- }
- if (BUILTIN_TYPE(obj) == T_ZOMBIE) {
- fprintf(stderr, "check_rvalue_consistency: %s is T_ZOMBIE.\n", obj_info(obj));
+ RB_VM_LOCK_ENTER_NO_BARRIER();
+ {
+ if (SPECIAL_CONST_P(obj)) {
+ fprintf(stderr, "check_rvalue_consistency: %p is a special const.\n", (void *)obj);
err++;
}
-
- obj_memsize_of((VALUE)obj, FALSE);
-
- /* check generation
- *
- * OLD == age == 3 && old-bitmap && mark-bit (except incremental marking)
- */
- if (age > 0 && wb_unprotected_bit) {
- fprintf(stderr, "check_rvalue_consistency: %s is not WB protected, but age is %d > 0.\n", obj_info(obj), age);
+ else if (!is_pointer_to_heap(objspace, (void *)obj)) {
+ /* check if it is in tomb_pages */
+ struct heap_page *page = NULL;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ ccan_list_for_each(&size_pool->tomb_heap.pages, page, page_node) {
+ if (page->start <= (uintptr_t)obj &&
+ (uintptr_t)obj < (page->start + (page->total_slots * size_pool->slot_size))) {
+ fprintf(stderr, "check_rvalue_consistency: %p is in a tomb_heap (%p).\n",
+ (void *)obj, (void *)page);
+ err++;
+ goto skip;
+ }
+ }
+ }
+ bp();
+ fprintf(stderr, "check_rvalue_consistency: %p is not a Ruby object.\n", (void *)obj);
err++;
+ skip:
+ ;
}
+ else {
+ const int wb_unprotected_bit = RVALUE_WB_UNPROTECTED_BITMAP(obj) != 0;
+ const int uncollectible_bit = RVALUE_UNCOLLECTIBLE_BITMAP(obj) != 0;
+ const int mark_bit = RVALUE_MARK_BITMAP(obj) != 0;
+ const int marking_bit = RVALUE_MARKING_BITMAP(obj) != 0, remembered_bit = marking_bit;
+ const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
+
+ if (GET_HEAP_PAGE(obj)->flags.in_tomb) {
+ fprintf(stderr, "check_rvalue_consistency: %s is in tomb page.\n", obj_info(obj));
+ err++;
+ }
+ if (BUILTIN_TYPE(obj) == T_NONE) {
+ fprintf(stderr, "check_rvalue_consistency: %s is T_NONE.\n", obj_info(obj));
+ err++;
+ }
+ if (BUILTIN_TYPE(obj) == T_ZOMBIE) {
+ fprintf(stderr, "check_rvalue_consistency: %s is T_ZOMBIE.\n", obj_info(obj));
+ err++;
+ }
- if (!is_marking(objspace) && uncollectible_bit && !mark_bit) {
- fprintf(stderr, "check_rvalue_consistency: %s is uncollectible, but is not marked while !gc.\n", obj_info(obj));
- err++;
- }
+ obj_memsize_of((VALUE)obj, FALSE);
- if (!is_full_marking(objspace)) {
- if (uncollectible_bit && age != RVALUE_OLD_AGE && !wb_unprotected_bit) {
- fprintf(stderr, "check_rvalue_consistency: %s is uncollectible, but not old (age: %d) and not WB unprotected.\n",
- obj_info(obj), age);
+ /* check generation
+ *
+ * OLD == age == 3 && old-bitmap && mark-bit (except incremental marking)
+ */
+ if (age > 0 && wb_unprotected_bit) {
+ fprintf(stderr, "check_rvalue_consistency: %s is not WB protected, but age is %d > 0.\n", obj_info(obj), age);
err++;
}
- if (remembered_bit && age != RVALUE_OLD_AGE) {
- fprintf(stderr, "check_rvalue_consistency: %s is remembered, but not old (age: %d).\n",
- obj_info(obj), age);
+
+ if (!is_marking(objspace) && uncollectible_bit && !mark_bit) {
+ fprintf(stderr, "check_rvalue_consistency: %s is uncollectible, but is not marked while !gc.\n", obj_info(obj));
err++;
}
- }
- /*
- * check coloring
- *
- * marking:false marking:true
- * marked:false white *invalid*
- * marked:true black grey
- */
- if (is_incremental_marking(objspace) && marking_bit) {
- if (!is_marking(objspace) && !mark_bit) {
- fprintf(stderr, "check_rvalue_consistency: %s is marking, but not marked.\n", obj_info(obj));
- err++;
+ if (!is_full_marking(objspace)) {
+ if (uncollectible_bit && age != RVALUE_OLD_AGE && !wb_unprotected_bit) {
+ fprintf(stderr, "check_rvalue_consistency: %s is uncollectible, but not old (age: %d) and not WB unprotected.\n",
+ obj_info(obj), age);
+ err++;
+ }
+ if (remembered_bit && age != RVALUE_OLD_AGE) {
+ fprintf(stderr, "check_rvalue_consistency: %s is remembered, but not old (age: %d).\n",
+ obj_info(obj), age);
+ err++;
+ }
+ }
+
+ /*
+ * check coloring
+ *
+ * marking:false marking:true
+ * marked:false white *invalid*
+ * marked:true black grey
+ */
+ if (is_incremental_marking(objspace) && marking_bit) {
+ if (!is_marking(objspace) && !mark_bit) {
+ fprintf(stderr, "check_rvalue_consistency: %s is marking, but not marked.\n", obj_info(obj));
+ err++;
+ }
}
}
}
+ RB_VM_LOCK_LEAVE_NO_BARRIER();
if (err > 0 && terminate) {
rb_bug("check_rvalue_consistency_force: there is %d errors.", err);
}
-
return err;
}
@@ -1356,8 +1637,7 @@ gc_object_moved_p(rb_objspace_t * objspace, VALUE obj)
return FALSE;
}
else {
- void *poisoned = asan_poisoned_object_p(obj);
- asan_unpoison_object(obj, false);
+ void *poisoned = asan_unpoison_object_temporary(obj);
int ret = BUILTIN_TYPE(obj) == T_MOVED;
/* Re-poison slot if it's not the one we want */
@@ -1383,7 +1663,6 @@ RVALUE_PINNED(VALUE obj)
return RVALUE_PIN_BITMAP(obj) != 0;
}
-#if USE_RGENGC
static inline int
RVALUE_WB_UNPROTECTED(VALUE obj)
{
@@ -1471,14 +1750,14 @@ RVALUE_AGE_INC(rb_objspace_t *objspace, VALUE obj)
int age = RVALUE_FLAGS_AGE(flags);
if (RGENGC_CHECK_MODE && age == RVALUE_OLD_AGE) {
- rb_bug("RVALUE_AGE_INC: can not increment age of OLD object %s.", obj_info(obj));
+ rb_bug("RVALUE_AGE_INC: can not increment age of OLD object %s.", obj_info(obj));
}
age++;
RBASIC(obj)->flags = RVALUE_FLAGS_AGE_SET(flags, age);
if (age == RVALUE_OLD_AGE) {
- RVALUE_OLD_UNCOLLECTIBLE_SET(objspace, obj);
+ RVALUE_OLD_UNCOLLECTIBLE_SET(objspace, obj);
}
check_rvalue_consistency(obj);
}
@@ -1522,13 +1801,13 @@ RVALUE_DEMOTE(rb_objspace_t *objspace, VALUE obj)
GC_ASSERT(RVALUE_OLD_P(obj));
if (!is_incremental_marking(objspace) && RVALUE_REMEMBERED(obj)) {
- CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
+ CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
}
RVALUE_DEMOTE_RAW(objspace, obj);
if (RVALUE_MARKED(obj)) {
- objspace->rgengc.old_objects--;
+ objspace->rgengc.old_objects--;
}
check_rvalue_consistency(obj);
@@ -1570,8 +1849,6 @@ RVALUE_WHITE_P(VALUE obj)
return RVALUE_MARKED(obj) == FALSE;
}
-#endif /* USE_RGENGC */
-
/*
--------------------------- ObjectSpace -----------------------------
*/
@@ -1586,51 +1863,68 @@ rb_objspace_t *
rb_objspace_alloc(void)
{
rb_objspace_t *objspace = calloc1(sizeof(rb_objspace_t));
+ objspace->flags.measure_gc = 1;
malloc_limit = gc_params.malloc_limit_min;
- list_head_init(&objspace->eden_heap.pages);
- list_head_init(&objspace->tomb_heap.pages);
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+
+ size_pool->slot_size = (1 << i) * BASE_SLOT_SIZE;
+
+ ccan_list_head_init(&SIZE_POOL_EDEN_HEAP(size_pool)->pages);
+ ccan_list_head_init(&SIZE_POOL_TOMB_HEAP(size_pool)->pages);
+ }
+
+ dont_gc_on();
return objspace;
}
static void free_stack_chunks(mark_stack_t *);
+static void mark_stack_free_cache(mark_stack_t *);
static void heap_page_free(rb_objspace_t *objspace, struct heap_page *page);
void
rb_objspace_free(rb_objspace_t *objspace)
{
- if (is_lazy_sweeping(heap_eden))
- rb_bug("lazy sweeping underway when freeing object space");
+ if (is_lazy_sweeping(objspace))
+ rb_bug("lazy sweeping underway when freeing object space");
if (objspace->profile.records) {
- free(objspace->profile.records);
- objspace->profile.records = 0;
+ free(objspace->profile.records);
+ objspace->profile.records = 0;
}
if (global_list) {
- struct gc_list *list, *next;
- for (list = global_list; list; list = next) {
- next = list->next;
- xfree(list);
- }
+ struct gc_list *list, *next;
+ for (list = global_list; list; list = next) {
+ next = list->next;
+ xfree(list);
+ }
}
if (heap_pages_sorted) {
- size_t i;
- for (i = 0; i < heap_allocated_pages; ++i) {
- heap_page_free(objspace, heap_pages_sorted[i]);
- }
- free(heap_pages_sorted);
- heap_allocated_pages = 0;
- heap_pages_sorted_length = 0;
- heap_pages_lomem = 0;
- heap_pages_himem = 0;
-
- objspace->eden_heap.total_pages = 0;
- objspace->eden_heap.total_slots = 0;
+ size_t i;
+ for (i = 0; i < heap_allocated_pages; ++i) {
+ heap_page_free(objspace, heap_pages_sorted[i]);
+ }
+ free(heap_pages_sorted);
+ heap_allocated_pages = 0;
+ heap_pages_sorted_length = 0;
+ heap_pages_lomem = 0;
+ heap_pages_himem = 0;
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ SIZE_POOL_EDEN_HEAP(size_pool)->total_pages = 0;
+ SIZE_POOL_EDEN_HEAP(size_pool)->total_slots = 0;
+ }
}
st_free_table(objspace->id_to_obj_tbl);
st_free_table(objspace->obj_to_id_tbl);
+
free_stack_chunks(&objspace->mark_stack);
+ mark_stack_free_cache(&objspace->mark_stack);
+
free(objspace);
}
@@ -1640,18 +1934,19 @@ heap_pages_expand_sorted_to(rb_objspace_t *objspace, size_t next_length)
struct heap_page **sorted;
size_t size = size_mul_or_raise(next_length, sizeof(struct heap_page *), rb_eRuntimeError);
- gc_report(3, objspace, "heap_pages_expand_sorted: next_length: %d, size: %d\n", (int)next_length, (int)size);
+ gc_report(3, objspace, "heap_pages_expand_sorted: next_length: %"PRIdSIZE", size: %"PRIdSIZE"\n",
+ next_length, size);
if (heap_pages_sorted_length > 0) {
- sorted = (struct heap_page **)realloc(heap_pages_sorted, size);
- if (sorted) heap_pages_sorted = sorted;
+ sorted = (struct heap_page **)realloc(heap_pages_sorted, size);
+ if (sorted) heap_pages_sorted = sorted;
}
else {
- sorted = heap_pages_sorted = (struct heap_page **)malloc(size);
+ sorted = heap_pages_sorted = (struct heap_page **)malloc(size);
}
if (sorted == 0) {
- rb_memerror();
+ rb_memerror();
}
heap_pages_sorted_length = next_length;
@@ -1665,99 +1960,121 @@ heap_pages_expand_sorted(rb_objspace_t *objspace)
* however, if there are pages which do not have empty slots, then try to create new pages
* so that the additional allocatable_pages counts (heap_tomb->total_pages) are added.
*/
- size_t next_length = heap_allocatable_pages;
- next_length += heap_eden->total_pages;
- next_length += heap_tomb->total_pages;
+ size_t next_length = heap_allocatable_pages(objspace);
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ next_length += SIZE_POOL_EDEN_HEAP(size_pool)->total_pages;
+ next_length += SIZE_POOL_TOMB_HEAP(size_pool)->total_pages;
+ }
if (next_length > heap_pages_sorted_length) {
- heap_pages_expand_sorted_to(objspace, next_length);
+ heap_pages_expand_sorted_to(objspace, next_length);
}
- GC_ASSERT(heap_allocatable_pages + heap_eden->total_pages <= heap_pages_sorted_length);
+ GC_ASSERT(heap_allocatable_pages(objspace) + heap_eden_total_pages(objspace) <= heap_pages_sorted_length);
GC_ASSERT(heap_allocated_pages <= heap_pages_sorted_length);
}
static void
-heap_allocatable_pages_set(rb_objspace_t *objspace, size_t s)
+size_pool_allocatable_pages_set(rb_objspace_t *objspace, rb_size_pool_t *size_pool, size_t s)
{
- heap_allocatable_pages = s;
+ size_pool->allocatable_pages = s;
heap_pages_expand_sorted(objspace);
}
-
static inline void
heap_page_add_freeobj(rb_objspace_t *objspace, struct heap_page *page, VALUE obj)
{
+ ASSERT_vm_locking();
+
RVALUE *p = (RVALUE *)obj;
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
+
+ asan_unpoison_object(obj, false);
+
+ asan_unlock_freelist(page);
p->as.free.flags = 0;
p->as.free.next = page->freelist;
page->freelist = p;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ asan_lock_freelist(page);
if (RGENGC_CHECK_MODE &&
/* obj should belong to page */
- !(&page->start[0] <= (RVALUE *)obj &&
- (RVALUE *)obj < &page->start[page->total_slots] &&
- obj % sizeof(RVALUE) == 0)) {
+ !(page->start <= (uintptr_t)obj &&
+ (uintptr_t)obj < ((uintptr_t)page->start + (page->total_slots * page->slot_size)) &&
+ obj % BASE_SLOT_SIZE == 0)) {
rb_bug("heap_page_add_freeobj: %p is not rvalue.", (void *)p);
}
asan_poison_object(obj);
-
gc_report(3, objspace, "heap_page_add_freeobj: add %p to freelist\n", (void *)obj);
}
static inline void
heap_add_freepage(rb_heap_t *heap, struct heap_page *page)
{
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
+ asan_unlock_freelist(page);
GC_ASSERT(page->free_slots != 0);
- if (page->freelist) {
- page->free_next = heap->free_pages;
- heap->free_pages = page;
- }
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ GC_ASSERT(page->freelist != NULL);
+
+ page->free_next = heap->free_pages;
+ heap->free_pages = page;
+
+ RUBY_DEBUG_LOG("page:%p freelist:%p", (void *)page, (void *)page->freelist);
+
+ asan_lock_freelist(page);
}
#if GC_ENABLE_INCREMENTAL_MARK
-static inline int
+static inline void
heap_add_poolpage(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
{
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
- if (page->freelist) {
- page->free_next = heap->pooled_pages;
- heap->pooled_pages = page;
- objspace->rincgc.pooled_slots += page->free_slots;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ asan_unlock_freelist(page);
+ GC_ASSERT(page->free_slots != 0);
+ GC_ASSERT(page->freelist != NULL);
- return TRUE;
- }
- else {
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ page->free_next = heap->pooled_pages;
+ heap->pooled_pages = page;
+ objspace->rincgc.pooled_slots += page->free_slots;
- return FALSE;
- }
+ asan_lock_freelist(page);
}
#endif
static void
heap_unlink_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
{
- list_del(&page->page_node);
+ ccan_list_del(&page->page_node);
heap->total_pages--;
heap->total_slots -= page->total_slots;
}
-static void rb_aligned_free(void *ptr);
+static void rb_aligned_free(void *ptr, size_t size);
+
+static void
+heap_page_body_free(struct heap_page_body *page_body)
+{
+ GC_ASSERT((uintptr_t)page_body % HEAP_PAGE_ALIGN == 0);
+
+ if (HEAP_PAGE_ALLOC_USE_MMAP) {
+#ifdef HAVE_MMAP
+ GC_ASSERT(HEAP_PAGE_SIZE % sysconf(_SC_PAGE_SIZE) == 0);
+ if (munmap(page_body, HEAP_PAGE_SIZE)) {
+ rb_bug("heap_page_body_free: munmap failed");
+ }
+#endif
+ }
+ else {
+ rb_aligned_free(page_body, HEAP_PAGE_SIZE);
+ }
+}
static void
heap_page_free(rb_objspace_t *objspace, struct heap_page *page)
{
heap_allocated_pages--;
- objspace->profile.total_freed_pages++;
- rb_aligned_free(GET_PAGE_BODY(page->start));
+ page->size_pool->total_freed_pages++;
+ heap_page_body_free(GET_PAGE_BODY(page->start));
free(page);
}
@@ -1766,92 +2083,167 @@ heap_pages_free_unused_pages(rb_objspace_t *objspace)
{
size_t i, j;
- if (!list_empty(&heap_tomb->pages)) {
- for (i = j = 1; j < heap_allocated_pages; i++) {
- struct heap_page *page = heap_pages_sorted[i];
+ bool has_pages_in_tomb_heap = FALSE;
+ for (i = 0; i < SIZE_POOL_COUNT; i++) {
+ if (!ccan_list_empty(&SIZE_POOL_TOMB_HEAP(&size_pools[i])->pages)) {
+ has_pages_in_tomb_heap = TRUE;
+ break;
+ }
+ }
+
+ if (has_pages_in_tomb_heap) {
+ for (i = j = 1; j < heap_allocated_pages; i++) {
+ struct heap_page *page = heap_pages_sorted[i];
+
+ if (page->flags.in_tomb && page->free_slots == page->total_slots) {
+ heap_unlink_page(objspace, SIZE_POOL_TOMB_HEAP(page->size_pool), page);
+ heap_page_free(objspace, page);
+ }
+ else {
+ if (i != j) {
+ heap_pages_sorted[j] = page;
+ }
+ j++;
+ }
+ }
+
+ struct heap_page *hipage = heap_pages_sorted[heap_allocated_pages - 1];
+ uintptr_t himem = (uintptr_t)hipage->start + (hipage->total_slots * hipage->slot_size);
+ GC_ASSERT(himem <= heap_pages_himem);
+ heap_pages_himem = himem;
- if (page->flags.in_tomb && page->free_slots == page->total_slots) {
- heap_unlink_page(objspace, heap_tomb, page);
- heap_page_free(objspace, page);
- }
- else {
- if (i != j) {
- heap_pages_sorted[j] = page;
- }
- j++;
- }
- }
- GC_ASSERT(j == heap_allocated_pages);
+ GC_ASSERT(j == heap_allocated_pages);
}
}
+static struct heap_page_body *
+heap_page_body_allocate(void)
+{
+ struct heap_page_body *page_body;
+
+ if (HEAP_PAGE_ALLOC_USE_MMAP) {
+#ifdef HAVE_MMAP
+ GC_ASSERT(HEAP_PAGE_ALIGN % sysconf(_SC_PAGE_SIZE) == 0);
+
+ char *ptr = mmap(NULL, HEAP_PAGE_ALIGN + HEAP_PAGE_SIZE,
+ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (ptr == MAP_FAILED) {
+ return NULL;
+ }
+
+ char *aligned = ptr + HEAP_PAGE_ALIGN;
+ aligned -= ((VALUE)aligned & (HEAP_PAGE_ALIGN - 1));
+ GC_ASSERT(aligned > ptr);
+ GC_ASSERT(aligned <= ptr + HEAP_PAGE_ALIGN);
+
+ size_t start_out_of_range_size = aligned - ptr;
+ GC_ASSERT(start_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
+ if (start_out_of_range_size > 0) {
+ if (munmap(ptr, start_out_of_range_size)) {
+ rb_bug("heap_page_body_allocate: munmap failed for start");
+ }
+ }
+
+ size_t end_out_of_range_size = HEAP_PAGE_ALIGN - start_out_of_range_size;
+ GC_ASSERT(end_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
+ if (end_out_of_range_size > 0) {
+ if (munmap(aligned + HEAP_PAGE_SIZE, end_out_of_range_size)) {
+ rb_bug("heap_page_body_allocate: munmap failed for end");
+ }
+ }
+
+ page_body = (struct heap_page_body *)aligned;
+#endif
+ }
+ else {
+ page_body = rb_aligned_malloc(HEAP_PAGE_ALIGN, HEAP_PAGE_SIZE);
+ }
+
+ GC_ASSERT((uintptr_t)page_body % HEAP_PAGE_ALIGN == 0);
+
+ return page_body;
+}
+
static struct heap_page *
-heap_page_allocate(rb_objspace_t *objspace)
+heap_page_allocate(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
{
- RVALUE *start, *end, *p;
+ uintptr_t start, end, p;
struct heap_page *page;
- struct heap_page_body *page_body = 0;
- size_t hi, lo, mid;
- int limit = HEAP_PAGE_OBJ_LIMIT;
+ uintptr_t hi, lo, mid;
+ size_t stride = size_pool->slot_size;
+ unsigned int limit = (unsigned int)((HEAP_PAGE_SIZE - sizeof(struct heap_page_header)))/(int)stride;
/* assign heap_page body (contains heap_page_header and RVALUEs) */
- page_body = (struct heap_page_body *)rb_aligned_malloc(HEAP_PAGE_ALIGN, HEAP_PAGE_SIZE);
+ struct heap_page_body *page_body = heap_page_body_allocate();
if (page_body == 0) {
- rb_memerror();
+ rb_memerror();
}
/* assign heap_page entry */
page = calloc1(sizeof(struct heap_page));
if (page == 0) {
- rb_aligned_free(page_body);
- rb_memerror();
+ heap_page_body_free(page_body);
+ rb_memerror();
}
/* adjust obj_limit (object number available in this page) */
- start = (RVALUE*)((VALUE)page_body + sizeof(struct heap_page_header));
- if ((VALUE)start % sizeof(RVALUE) != 0) {
- int delta = (int)(sizeof(RVALUE) - ((VALUE)start % sizeof(RVALUE)));
- start = (RVALUE*)((VALUE)start + delta);
- limit = (HEAP_PAGE_SIZE - (int)((VALUE)start - (VALUE)page_body))/(int)sizeof(RVALUE);
+ start = (uintptr_t)((VALUE)page_body + sizeof(struct heap_page_header));
+
+ if (start % BASE_SLOT_SIZE != 0) {
+ int delta = BASE_SLOT_SIZE - (start % BASE_SLOT_SIZE);
+ start = start + delta;
+ GC_ASSERT(NUM_IN_PAGE(start) == 0 || NUM_IN_PAGE(start) == 1);
+
+ /* Find a num in page that is evenly divisible by `stride`.
+ * This is to ensure that objects are aligned with bit planes.
+ * In other words, ensure there are an even number of objects
+ * per bit plane. */
+ if (NUM_IN_PAGE(start) == 1) {
+ start += stride - BASE_SLOT_SIZE;
+ }
+
+ GC_ASSERT(NUM_IN_PAGE(start) * BASE_SLOT_SIZE % stride == 0);
+
+ limit = (HEAP_PAGE_SIZE - (int)(start - (uintptr_t)page_body))/(int)stride;
}
- end = start + limit;
+ end = start + (limit * (int)stride);
/* setup heap_pages_sorted */
lo = 0;
- hi = heap_allocated_pages;
+ hi = (uintptr_t)heap_allocated_pages;
while (lo < hi) {
- struct heap_page *mid_page;
+ struct heap_page *mid_page;
- mid = (lo + hi) / 2;
- mid_page = heap_pages_sorted[mid];
- if (mid_page->start < start) {
- lo = mid + 1;
- }
- else if (mid_page->start > start) {
- hi = mid;
- }
- else {
- rb_bug("same heap page is allocated: %p at %"PRIuVALUE, (void *)page_body, (VALUE)mid);
- }
+ mid = (lo + hi) / 2;
+ mid_page = heap_pages_sorted[mid];
+ if ((uintptr_t)mid_page->start < start) {
+ lo = mid + 1;
+ }
+ else if ((uintptr_t)mid_page->start > start) {
+ hi = mid;
+ }
+ else {
+ rb_bug("same heap page is allocated: %p at %"PRIuVALUE, (void *)page_body, (VALUE)mid);
+ }
}
- if (hi < heap_allocated_pages) {
- MEMMOVE(&heap_pages_sorted[hi+1], &heap_pages_sorted[hi], struct heap_page_header*, heap_allocated_pages - hi);
+ if (hi < (uintptr_t)heap_allocated_pages) {
+ MEMMOVE(&heap_pages_sorted[hi+1], &heap_pages_sorted[hi], struct heap_page_header*, heap_allocated_pages - hi);
}
heap_pages_sorted[hi] = page;
heap_allocated_pages++;
- GC_ASSERT(heap_eden->total_pages + heap_allocatable_pages <= heap_pages_sorted_length);
- GC_ASSERT(heap_eden->total_pages + heap_tomb->total_pages == heap_allocated_pages - 1);
+ GC_ASSERT(heap_eden_total_pages(objspace) + heap_allocatable_pages(objspace) <= heap_pages_sorted_length);
+ GC_ASSERT(heap_eden_total_pages(objspace) + heap_tomb_total_pages(objspace) == heap_allocated_pages - 1);
GC_ASSERT(heap_allocated_pages <= heap_pages_sorted_length);
- objspace->profile.total_allocated_pages++;
+ size_pool->total_allocated_pages++;
if (heap_allocated_pages > heap_pages_sorted_length) {
- rb_bug("heap_page_allocate: allocated(%"PRIdSIZE") > sorted(%"PRIdSIZE")",
- heap_allocated_pages, heap_pages_sorted_length);
+ rb_bug("heap_page_allocate: allocated(%"PRIdSIZE") > sorted(%"PRIdSIZE")",
+ heap_allocated_pages, heap_pages_sorted_length);
}
if (heap_pages_lomem == 0 || heap_pages_lomem > start) heap_pages_lomem = start;
@@ -1859,221 +2251,216 @@ heap_page_allocate(rb_objspace_t *objspace)
page->start = start;
page->total_slots = limit;
+ page->slot_size = size_pool->slot_size;
+ page->size_pool = size_pool;
page_body->header.page = page;
- for (p = start; p != end; p++) {
- gc_report(3, objspace, "assign_heap_page: %p is added to freelist\n", (void *)p);
- heap_page_add_freeobj(objspace, page, (VALUE)p);
+ for (p = start; p != end; p += stride) {
+ gc_report(3, objspace, "assign_heap_page: %p is added to freelist\n", (void *)p);
+ heap_page_add_freeobj(objspace, page, (VALUE)p);
}
page->free_slots = limit;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ asan_lock_freelist(page);
return page;
}
static struct heap_page *
-heap_page_resurrect(rb_objspace_t *objspace)
+heap_page_resurrect(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
{
struct heap_page *page = 0, *next;
- list_for_each_safe(&heap_tomb->pages, page, next, page_node) {
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
- if (page->freelist != NULL) {
- heap_unlink_page(objspace, heap_tomb, page);
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
- return page;
- }
+ ccan_list_for_each_safe(&SIZE_POOL_TOMB_HEAP(size_pool)->pages, page, next, page_node) {
+ asan_unlock_freelist(page);
+ if (page->freelist != NULL) {
+ heap_unlink_page(objspace, &size_pool->tomb_heap, page);
+ asan_lock_freelist(page);
+ return page;
+ }
}
return NULL;
}
static struct heap_page *
-heap_page_create(rb_objspace_t *objspace)
+heap_page_create(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
{
struct heap_page *page;
const char *method = "recycle";
- heap_allocatable_pages--;
+ size_pool->allocatable_pages--;
- page = heap_page_resurrect(objspace);
+ page = heap_page_resurrect(objspace, size_pool);
if (page == NULL) {
- page = heap_page_allocate(objspace);
- method = "allocate";
- }
- if (0) fprintf(stderr, "heap_page_create: %s - %p, heap_allocated_pages: %d, heap_allocated_pages: %d, tomb->total_pages: %d\n",
- method, (void *)page, (int)heap_pages_sorted_length, (int)heap_allocated_pages, (int)heap_tomb->total_pages);
+ page = heap_page_allocate(objspace, size_pool);
+ method = "allocate";
+ }
+ if (0) fprintf(stderr, "heap_page_create: %s - %p, "
+ "heap_allocated_pages: %"PRIdSIZE", "
+ "heap_allocated_pages: %"PRIdSIZE", "
+ "tomb->total_pages: %"PRIdSIZE"\n",
+ method, (void *)page, heap_pages_sorted_length, heap_allocated_pages, SIZE_POOL_TOMB_HEAP(size_pool)->total_pages);
return page;
}
static void
-heap_add_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
+heap_add_page(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, struct heap_page *page)
{
- page->flags.in_tomb = (heap == heap_tomb);
- list_add(&heap->pages, &page->page_node);
+ /* Adding to eden heap during incremental sweeping is forbidden */
+ GC_ASSERT(!(heap == SIZE_POOL_EDEN_HEAP(size_pool) && heap->sweeping_page));
+ page->flags.in_tomb = (heap == SIZE_POOL_TOMB_HEAP(size_pool));
+ ccan_list_add_tail(&heap->pages, &page->page_node);
heap->total_pages++;
heap->total_slots += page->total_slots;
}
static void
-heap_assign_page(rb_objspace_t *objspace, rb_heap_t *heap)
+heap_assign_page(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- struct heap_page *page = heap_page_create(objspace);
- heap_add_page(objspace, heap, page);
+ struct heap_page *page = heap_page_create(objspace, size_pool);
+ heap_add_page(objspace, size_pool, heap, page);
heap_add_freepage(heap, page);
}
static void
-heap_add_pages(rb_objspace_t *objspace, rb_heap_t *heap, size_t add)
+heap_add_pages(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, size_t add)
{
size_t i;
- heap_allocatable_pages_set(objspace, add);
+ size_pool_allocatable_pages_set(objspace, size_pool, add);
for (i = 0; i < add; i++) {
- heap_assign_page(objspace, heap);
+ heap_assign_page(objspace, size_pool, heap);
}
- GC_ASSERT(heap_allocatable_pages == 0);
+ GC_ASSERT(size_pool->allocatable_pages == 0);
}
static size_t
-heap_extend_pages(rb_objspace_t *objspace, size_t free_slots, size_t total_slots)
+heap_extend_pages(rb_objspace_t *objspace, rb_size_pool_t *size_pool, size_t free_slots, size_t total_slots, size_t used)
{
double goal_ratio = gc_params.heap_free_slots_goal_ratio;
- size_t used = heap_allocated_pages + heap_allocatable_pages;
size_t next_used;
if (goal_ratio == 0.0) {
- next_used = (size_t)(used * gc_params.growth_factor);
+ next_used = (size_t)(used * gc_params.growth_factor);
+ }
+ else if (total_slots == 0) {
+ int multiple = size_pool->slot_size / BASE_SLOT_SIZE;
+ next_used = (gc_params.heap_init_slots * multiple) / HEAP_PAGE_OBJ_LIMIT;
}
else {
- /* Find `f' where free_slots = f * total_slots * goal_ratio
- * => f = (total_slots - free_slots) / ((1 - goal_ratio) * total_slots)
- */
- double f = (double)(total_slots - free_slots) / ((1 - goal_ratio) * total_slots);
+ /* Find `f' where free_slots = f * total_slots * goal_ratio
+ * => f = (total_slots - free_slots) / ((1 - goal_ratio) * total_slots)
+ */
+ double f = (double)(total_slots - free_slots) / ((1 - goal_ratio) * total_slots);
- if (f > gc_params.growth_factor) f = gc_params.growth_factor;
- if (f < 1.0) f = 1.1;
+ if (f > gc_params.growth_factor) f = gc_params.growth_factor;
+ if (f < 1.0) f = 1.1;
- next_used = (size_t)(f * used);
+ next_used = (size_t)(f * used);
- if (0) {
- fprintf(stderr,
- "free_slots(%8"PRIuSIZE")/total_slots(%8"PRIuSIZE")=%1.2f,"
- " G(%1.2f), f(%1.2f),"
- " used(%8"PRIuSIZE") => next_used(%8"PRIuSIZE")\n",
- free_slots, total_slots, free_slots/(double)total_slots,
- goal_ratio, f, used, next_used);
- }
+ if (0) {
+ fprintf(stderr,
+ "free_slots(%8"PRIuSIZE")/total_slots(%8"PRIuSIZE")=%1.2f,"
+ " G(%1.2f), f(%1.2f),"
+ " used(%8"PRIuSIZE") => next_used(%8"PRIuSIZE")\n",
+ free_slots, total_slots, free_slots/(double)total_slots,
+ goal_ratio, f, used, next_used);
+ }
}
if (gc_params.growth_max_slots > 0) {
- size_t max_used = (size_t)(used + gc_params.growth_max_slots/HEAP_PAGE_OBJ_LIMIT);
- if (next_used > max_used) next_used = max_used;
+ size_t max_used = (size_t)(used + gc_params.growth_max_slots/HEAP_PAGE_OBJ_LIMIT);
+ if (next_used > max_used) next_used = max_used;
}
- return next_used - used;
-}
-
-static void
-heap_set_increment(rb_objspace_t *objspace, size_t additional_pages)
-{
- size_t used = heap_eden->total_pages;
- size_t next_used_limit = used + additional_pages;
-
- if (next_used_limit == heap_allocated_pages) next_used_limit++;
-
- heap_allocatable_pages_set(objspace, next_used_limit - used);
+ size_t extend_page_count = next_used - used;
+ /* Extend by at least 1 page. */
+ if (extend_page_count == 0) extend_page_count = 1;
- gc_report(1, objspace, "heap_set_increment: heap_allocatable_pages is %d\n", (int)heap_allocatable_pages);
+ return extend_page_count;
}
static int
-heap_increment(rb_objspace_t *objspace, rb_heap_t *heap)
+heap_increment(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- if (heap_allocatable_pages > 0) {
- gc_report(1, objspace, "heap_increment: heap_pages_sorted_length: %d, heap_pages_inc: %d, heap->total_pages: %d\n",
- (int)heap_pages_sorted_length, (int)heap_allocatable_pages, (int)heap->total_pages);
+ if (size_pool->allocatable_pages > 0) {
+ gc_report(1, objspace, "heap_increment: heap_pages_sorted_length: %"PRIdSIZE", "
+ "heap_pages_inc: %"PRIdSIZE", heap->total_pages: %"PRIdSIZE"\n",
+ heap_pages_sorted_length, size_pool->allocatable_pages, heap->total_pages);
- GC_ASSERT(heap_allocatable_pages + heap_eden->total_pages <= heap_pages_sorted_length);
- GC_ASSERT(heap_allocated_pages <= heap_pages_sorted_length);
+ GC_ASSERT(heap_allocatable_pages(objspace) + heap_eden_total_pages(objspace) <= heap_pages_sorted_length);
+ GC_ASSERT(heap_allocated_pages <= heap_pages_sorted_length);
- heap_assign_page(objspace, heap);
- return TRUE;
+ heap_assign_page(objspace, size_pool, heap);
+ return TRUE;
}
return FALSE;
}
static void
-heap_prepare(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- GC_ASSERT(heap->free_pages == NULL);
-
- if (is_lazy_sweeping(heap)) {
- gc_sweep_continue(objspace, heap);
- }
- else if (is_incremental_marking(objspace)) {
- gc_marks_continue(objspace, heap);
+ /* Continue marking if in incremental marking. */
+ if (heap->free_pages == NULL && is_incremental_marking(objspace)) {
+ gc_marks_continue(objspace, size_pool, heap);
}
- if (heap->free_pages == NULL &&
- (will_be_incremental_marking(objspace) || heap_increment(objspace, heap) == FALSE) &&
- gc_start(objspace, GPR_FLAG_NEWOBJ) == FALSE) {
- rb_memerror();
+ /* Continue sweeping if in lazy sweeping or the previous incremental
+ * marking finished and did not yield a free page. */
+ if (heap->free_pages == NULL && is_lazy_sweeping(objspace)) {
+ gc_sweep_continue(objspace, size_pool, heap);
}
}
-static RVALUE *
-heap_get_freeobj_from_next_freepage(rb_objspace_t *objspace, rb_heap_t *heap)
+static void
+heap_prepare(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- struct heap_page *page;
- RVALUE *p;
-
- while (heap->free_pages == NULL) {
- heap_prepare(objspace, heap);
- }
- page = heap->free_pages;
- heap->free_pages = page->free_next;
- heap->using_page = page;
+ GC_ASSERT(heap->free_pages == NULL);
- GC_ASSERT(page->free_slots != 0);
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
- p = page->freelist;
- page->freelist = NULL;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
- page->free_slots = 0;
- asan_unpoison_object((VALUE)p, true);
- return p;
-}
+ /* Continue incremental marking or lazy sweeping, if in any of those steps. */
+ gc_continue(objspace, size_pool, heap);
-static inline VALUE
-heap_get_freeobj_head(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- RVALUE *p = heap->freelist;
- if (LIKELY(p != NULL)) {
- heap->freelist = p->as.free.next;
+ /* If we still don't have a free page and not allowed to create a new page,
+ * we should start a new GC cycle. */
+ if (heap->free_pages == NULL &&
+ (will_be_incremental_marking(objspace) ||
+ (heap_increment(objspace, size_pool, heap) == FALSE))) {
+ if (gc_start(objspace, GPR_FLAG_NEWOBJ) == FALSE) {
+ rb_memerror();
+ }
+ else {
+ /* Do steps of incremental marking or lazy sweeping if the GC run permits. */
+ gc_continue(objspace, size_pool, heap);
+
+ /* If we're not incremental marking (e.g. a minor GC) or finished
+ * sweeping and still don't have a free page, then
+ * gc_sweep_finish_size_pool should allow us to create a new page. */
+ if (heap->free_pages == NULL && !heap_increment(objspace, size_pool, heap)) {
+ if (objspace->rgengc.need_major_gc == GPR_FLAG_NONE) {
+ rb_bug("cannot create a new page after GC");
+ }
+ else { // Major GC is required, which will allow us to create new page
+ if (gc_start(objspace, GPR_FLAG_NEWOBJ) == FALSE) {
+ rb_memerror();
+ }
+ else {
+ /* Do steps of incremental marking or lazy sweeping. */
+ gc_continue(objspace, size_pool, heap);
+
+ if (heap->free_pages == NULL &&
+ !heap_increment(objspace, size_pool, heap)) {
+ rb_bug("cannot create a new page after major GC");
+ }
+ }
+ }
+ }
+ }
}
- asan_unpoison_object((VALUE)p, true);
- return (VALUE)p;
-}
-static inline VALUE
-heap_get_freeobj(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- RVALUE *p = heap->freelist;
-
- while (1) {
- if (LIKELY(p != NULL)) {
- asan_unpoison_object((VALUE)p, true);
- heap->freelist = p->as.free.next;
- return (VALUE)p;
- }
- else {
- p = heap_get_freeobj_from_next_freepage(objspace, heap);
- }
- }
+ GC_ASSERT(heap->free_pages != NULL);
}
void
@@ -2087,6 +2474,7 @@ rb_objspace_set_event_hook(const rb_event_flag_t event)
static void
gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
{
+ if (UNLIKELY(!ec->cfp)) return;
const VALUE *pc = ec->cfp->pc;
if (pc && VM_FRAME_RUBYFRAME_P(ec->cfp)) {
/* increment PC because source line is calculated with PC-1 */
@@ -2099,68 +2487,72 @@ gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb
#define gc_event_hook_available_p(objspace) ((objspace)->flags.has_hook)
#define gc_event_hook_needed_p(objspace, event) ((objspace)->hook_events & (event))
-#define gc_event_hook(objspace, event, data) do { \
+#define gc_event_hook_prep(objspace, event, data, prep) do { \
if (UNLIKELY(gc_event_hook_needed_p(objspace, event))) { \
- gc_event_hook_body(GET_EC(), (objspace), (event), (data)); \
+ prep; \
+ gc_event_hook_body(GET_EC(), (objspace), (event), (data)); \
} \
} while (0)
+#define gc_event_hook(objspace, event, data) gc_event_hook_prep(objspace, event, data, (void)0)
+
static inline VALUE
-newobj_init(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protected, rb_objspace_t *objspace, VALUE obj)
+newobj_init(VALUE klass, VALUE flags, int wb_protected, rb_objspace_t *objspace, VALUE obj)
{
#if !__has_feature(memory_sanitizer)
GC_ASSERT(BUILTIN_TYPE(obj) == T_NONE);
GC_ASSERT((flags & FL_WB_PROTECTED) == 0);
#endif
+ RVALUE *p = RANY(obj);
+ p->as.basic.flags = flags;
+ *((VALUE *)&p->as.basic.klass) = klass;
- /* OBJSETUP */
- struct RVALUE buf = {
- .as = {
- .values = {
- .basic = {
- .flags = flags,
- .klass = klass,
- },
- .v1 = v1,
- .v2 = v2,
- .v3 = v3,
- },
- },
- };
- MEMCPY(RANY(obj), &buf, RVALUE, 1);
+#if RACTOR_CHECK_MODE
+ rb_ractor_setup_belonging(obj);
+#endif
#if RGENGC_CHECK_MODE
- GC_ASSERT(RVALUE_MARKED(obj) == FALSE);
- GC_ASSERT(RVALUE_MARKING(obj) == FALSE);
- GC_ASSERT(RVALUE_OLD_P(obj) == FALSE);
- GC_ASSERT(RVALUE_WB_UNPROTECTED(obj) == FALSE);
+ p->as.values.v1 = p->as.values.v2 = p->as.values.v3 = 0;
- if (flags & FL_PROMOTED1) {
- if (RVALUE_AGE(obj) != 2) rb_bug("newobj: %s of age (%d) != 2.", obj_info(obj), RVALUE_AGE(obj));
- }
- else {
- if (RVALUE_AGE(obj) > 0) rb_bug("newobj: %s of age (%d) > 0.", obj_info(obj), RVALUE_AGE(obj));
+ RB_VM_LOCK_ENTER_NO_BARRIER();
+ {
+ check_rvalue_consistency(obj);
+
+ GC_ASSERT(RVALUE_MARKED(obj) == FALSE);
+ GC_ASSERT(RVALUE_MARKING(obj) == FALSE);
+ GC_ASSERT(RVALUE_OLD_P(obj) == FALSE);
+ GC_ASSERT(RVALUE_WB_UNPROTECTED(obj) == FALSE);
+
+ if (flags & FL_PROMOTED1) {
+ if (RVALUE_AGE(obj) != 2) rb_bug("newobj: %s of age (%d) != 2.", obj_info(obj), RVALUE_AGE(obj));
+ }
+ else {
+ if (RVALUE_AGE(obj) > 0) rb_bug("newobj: %s of age (%d) > 0.", obj_info(obj), RVALUE_AGE(obj));
+ }
+ if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %s is remembered.", obj_info(obj));
}
- if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %s is remembered.", obj_info(obj));
+ RB_VM_LOCK_LEAVE_NO_BARRIER();
#endif
-#if USE_RGENGC
if (UNLIKELY(wb_protected == FALSE)) {
- MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
+ ASSERT_vm_locking();
+ MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
}
-#endif
+
+ // TODO: make it atomic, or ractor local
+ objspace->total_allocated_objects++;
#if RGENGC_PROFILE
if (wb_protected) {
- objspace->profile.total_generated_normal_object_count++;
+ objspace->profile.total_generated_normal_object_count++;
#if RGENGC_PROFILE >= 2
- objspace->profile.generated_normal_object_count_types[BUILTIN_TYPE(obj)]++;
+ objspace->profile.generated_normal_object_count_types[BUILTIN_TYPE(obj)]++;
#endif
}
else {
- objspace->profile.total_generated_shady_object_count++;
+ objspace->profile.total_generated_shady_object_count++;
#if RGENGC_PROFILE >= 2
- objspace->profile.generated_shady_object_count_types[BUILTIN_TYPE(obj)]++;
+ objspace->profile.generated_shady_object_count_types[BUILTIN_TYPE(obj)]++;
#endif
}
#endif
@@ -2170,77 +2562,305 @@ newobj_init(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_prote
GC_ASSERT(!SPECIAL_CONST_P(obj)); /* check alignment */
#endif
- objspace->total_allocated_objects++;
-
gc_report(5, objspace, "newobj: %s\n", obj_info(obj));
#if RGENGC_OLD_NEWOBJ_CHECK > 0
{
- static int newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK;
+ static int newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK;
- if (!is_incremental_marking(objspace) &&
- flags & FL_WB_PROTECTED && /* do not promote WB unprotected objects */
- ! RB_TYPE_P(obj, T_ARRAY)) { /* array.c assumes that allocated objects are new */
- if (--newobj_cnt == 0) {
- newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK;
+ if (!is_incremental_marking(objspace) &&
+ flags & FL_WB_PROTECTED && /* do not promote WB unprotected objects */
+ ! RB_TYPE_P(obj, T_ARRAY)) { /* array.c assumes that allocated objects are new */
+ if (--newobj_cnt == 0) {
+ newobj_cnt = RGENGC_OLD_NEWOBJ_CHECK;
- gc_mark_set(objspace, obj);
- RVALUE_AGE_SET_OLD(objspace, obj);
+ gc_mark_set(objspace, obj);
+ RVALUE_AGE_SET_OLD(objspace, obj);
- rb_gc_writebarrier_remember(obj);
- }
- }
+ rb_gc_writebarrier_remember(obj);
+ }
+ }
}
#endif
- check_rvalue_consistency(obj);
+ // RUBY_DEBUG_LOG("obj:%p (%s)", (void *)obj, obj_type_name(obj));
+ return obj;
+}
+
+size_t
+rb_gc_obj_slot_size(VALUE obj)
+{
+ return GET_HEAP_PAGE(obj)->slot_size - RVALUE_OVERHEAD;
+}
+
+static inline size_t
+size_pool_slot_size(unsigned char pool_id)
+{
+ GC_ASSERT(pool_id < SIZE_POOL_COUNT);
+
+ size_t slot_size = (1 << pool_id) * BASE_SLOT_SIZE;
+
+#if RGENGC_CHECK_MODE
+ rb_objspace_t *objspace = &rb_objspace;
+ GC_ASSERT(size_pools[pool_id].slot_size == (short)slot_size);
+#endif
+
+ slot_size -= RVALUE_OVERHEAD;
+
+ return slot_size;
+}
+
+size_t
+rb_size_pool_slot_size(unsigned char pool_id)
+{
+ return size_pool_slot_size(pool_id);
+}
+
+bool
+rb_gc_size_allocatable_p(size_t size)
+{
+ return size <= size_pool_slot_size(SIZE_POOL_COUNT - 1);
+}
+
+static inline VALUE
+ractor_cache_allocate_slot(rb_objspace_t *objspace, rb_ractor_newobj_cache_t *cache,
+ size_t size_pool_idx)
+{
+ rb_ractor_newobj_size_pool_cache_t *size_pool_cache = &cache->size_pool_caches[size_pool_idx];
+ RVALUE *p = size_pool_cache->freelist;
+
+#if GC_ENABLE_INCREMENTAL_MARK
+ if (is_incremental_marking(objspace)) {
+ // Not allowed to allocate without running an incremental marking step
+ if (cache->incremental_mark_step_allocated_slots >= INCREMENTAL_MARK_STEP_ALLOCATIONS) {
+ return Qfalse;
+ }
+
+ if (p) {
+ cache->incremental_mark_step_allocated_slots++;
+ }
+ }
+#endif
+
+ if (p) {
+ VALUE obj = (VALUE)p;
+ MAYBE_UNUSED(const size_t) stride = size_pool_slot_size(size_pool_idx);
+ size_pool_cache->freelist = p->as.free.next;
+#if USE_RVARGC
+ asan_unpoison_memory_region(p, stride, true);
+#else
+ asan_unpoison_object(obj, true);
+#endif
+#if RGENGC_CHECK_MODE
+ GC_ASSERT(rb_gc_obj_slot_size(obj) == stride);
+ // zero clear
+ MEMZERO((char *)obj, char, stride);
+#endif
+ return obj;
+ }
+ else {
+ return Qfalse;
+ }
+}
+
+static struct heap_page *
+heap_next_free_page(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
+{
+ ASSERT_vm_locking();
+
+ struct heap_page *page;
+
+ if (heap->free_pages == NULL) {
+ heap_prepare(objspace, size_pool, heap);
+ }
+
+ page = heap->free_pages;
+ heap->free_pages = page->free_next;
+
+ GC_ASSERT(page->free_slots != 0);
+ RUBY_DEBUG_LOG("page:%p freelist:%p cnt:%d", (void *)page, (void *)page->freelist, page->free_slots);
+
+ asan_unlock_freelist(page);
+
+ return page;
+}
+
+static inline void
+ractor_cache_set_page(rb_ractor_newobj_cache_t *cache, size_t size_pool_idx,
+ struct heap_page *page)
+{
+ gc_report(3, &rb_objspace, "ractor_set_cache: Using page %p\n", (void *)GET_PAGE_BODY(page->start));
+
+ rb_ractor_newobj_size_pool_cache_t *size_pool_cache = &cache->size_pool_caches[size_pool_idx];
+
+ GC_ASSERT(size_pool_cache->freelist == NULL);
+ GC_ASSERT(page->free_slots != 0);
+ GC_ASSERT(page->freelist != NULL);
+
+ size_pool_cache->using_page = page;
+ size_pool_cache->freelist = page->freelist;
+ page->free_slots = 0;
+ page->freelist = NULL;
+
+ asan_unpoison_object((VALUE)size_pool_cache->freelist, false);
+ GC_ASSERT(RB_TYPE_P((VALUE)size_pool_cache->freelist, T_NONE));
+ asan_poison_object((VALUE)size_pool_cache->freelist);
+}
+
+static inline VALUE
+newobj_fill(VALUE obj, VALUE v1, VALUE v2, VALUE v3)
+{
+ RVALUE *p = (RVALUE *)obj;
+ p->as.values.v1 = v1;
+ p->as.values.v2 = v2;
+ p->as.values.v3 = v3;
+ return obj;
+}
+
+static inline size_t
+size_pool_idx_for_size(size_t size)
+{
+#if USE_RVARGC
+ size += RVALUE_OVERHEAD;
+
+ size_t slot_count = CEILDIV(size, BASE_SLOT_SIZE);
+
+ /* size_pool_idx is ceil(log2(slot_count)) */
+ size_t size_pool_idx = 64 - nlz_int64(slot_count - 1);
+
+ if (size_pool_idx >= SIZE_POOL_COUNT) {
+ rb_bug("size_pool_idx_for_size: allocation size too large");
+ }
+
+#if RGENGC_CHECK_MODE
+ rb_objspace_t *objspace = &rb_objspace;
+ GC_ASSERT(size <= (size_t)size_pools[size_pool_idx].slot_size);
+ if (size_pool_idx > 0) GC_ASSERT(size > (size_t)size_pools[size_pool_idx - 1].slot_size);
+#endif
+
+ return size_pool_idx;
+#else
+ GC_ASSERT(size <= sizeof(RVALUE));
+ return 0;
+#endif
+}
+
+static VALUE
+newobj_alloc(rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx, bool vm_locked)
+{
+ rb_size_pool_t *size_pool = &size_pools[size_pool_idx];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ rb_ractor_newobj_cache_t *cache = &cr->newobj_cache;
+
+ VALUE obj = ractor_cache_allocate_slot(objspace, cache, size_pool_idx);
+
+ if (UNLIKELY(obj == Qfalse)) {
+ unsigned int lev;
+ bool unlock_vm = false;
+
+ if (!vm_locked) {
+ RB_VM_LOCK_ENTER_CR_LEV(cr, &lev);
+ vm_locked = true;
+ unlock_vm = true;
+ }
+
+ {
+ ASSERT_vm_locking();
+
+#if GC_ENABLE_INCREMENTAL_MARK
+ if (is_incremental_marking(objspace)) {
+ gc_marks_continue(objspace, size_pool, heap);
+ cache->incremental_mark_step_allocated_slots = 0;
+
+ // Retry allocation after resetting incremental_mark_step_allocated_slots
+ obj = ractor_cache_allocate_slot(objspace, cache, size_pool_idx);
+ }
+#endif
+
+ if (obj == Qfalse) {
+ // Get next free page (possibly running GC)
+ struct heap_page *page = heap_next_free_page(objspace, size_pool, heap);
+ ractor_cache_set_page(cache, size_pool_idx, page);
+
+ // Retry allocation after moving to new page
+ obj = ractor_cache_allocate_slot(objspace, cache, size_pool_idx);
+
+ GC_ASSERT(obj != Qfalse);
+ }
+ }
+
+ if (unlock_vm) {
+ RB_VM_LOCK_LEAVE_CR_LEV(cr, &lev);
+ }
+ }
+
return obj;
}
+static void
+newobj_zero_slot(VALUE obj)
+{
+ memset((char *)obj + sizeof(struct RBasic), 0, rb_gc_obj_slot_size(obj) - sizeof(struct RBasic));
+}
+
+ALWAYS_INLINE(static VALUE newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t size_pool_idx));
+
static inline VALUE
-newobj_slowpath(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace, int wb_protected)
+newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t size_pool_idx)
{
VALUE obj;
+ unsigned int lev;
+
+ RB_VM_LOCK_ENTER_CR_LEV(cr, &lev);
+ {
+ if (UNLIKELY(during_gc || ruby_gc_stressful)) {
+ if (during_gc) {
+ dont_gc_on();
+ during_gc = 0;
+ rb_bug("object allocation during garbage collection phase");
+ }
- if (UNLIKELY(during_gc || ruby_gc_stressful)) {
- if (during_gc) {
- dont_gc = 1;
- during_gc = 0;
- rb_bug("object allocation during garbage collection phase");
- }
+ if (ruby_gc_stressful) {
+ if (!garbage_collect(objspace, GPR_FLAG_NEWOBJ)) {
+ rb_memerror();
+ }
+ }
+ }
- if (ruby_gc_stressful) {
- if (!garbage_collect(objspace, GPR_FLAG_NEWOBJ)) {
- rb_memerror();
- }
- }
+ obj = newobj_alloc(objspace, cr, size_pool_idx, true);
+#if SHAPE_IN_BASIC_FLAGS
+ flags |= (VALUE)(size_pool_idx) << SHAPE_FLAG_SHIFT;
+#endif
+ newobj_init(klass, flags, wb_protected, objspace, obj);
+
+ gc_event_hook_prep(objspace, RUBY_INTERNAL_EVENT_NEWOBJ, obj, newobj_zero_slot(obj));
}
+ RB_VM_LOCK_LEAVE_CR_LEV(cr, &lev);
- obj = heap_get_freeobj(objspace, heap_eden);
- newobj_init(klass, flags, v1, v2, v3, wb_protected, objspace, obj);
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_NEWOBJ, obj);
return obj;
}
-NOINLINE(static VALUE newobj_slowpath_wb_protected(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace));
-NOINLINE(static VALUE newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace));
+NOINLINE(static VALUE newobj_slowpath_wb_protected(VALUE klass, VALUE flags,
+ rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx));
+NOINLINE(static VALUE newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags,
+ rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx));
static VALUE
-newobj_slowpath_wb_protected(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace)
+newobj_slowpath_wb_protected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
- return newobj_slowpath(klass, flags, v1, v2, v3, objspace, TRUE);
+ return newobj_slowpath(klass, flags, objspace, cr, TRUE, size_pool_idx);
}
static VALUE
-newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, rb_objspace_t *objspace)
+newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
- return newobj_slowpath(klass, flags, v1, v2, v3, objspace, FALSE);
+ return newobj_slowpath(klass, flags, objspace, cr, FALSE, size_pool_idx);
}
static inline VALUE
-newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protected)
+newobj_of0(VALUE klass, VALUE flags, int wb_protected, rb_ractor_t *cr, size_t alloc_size)
{
- rb_objspace_t *objspace = &rb_objspace;
VALUE obj;
+ rb_objspace_t *objspace = &rb_objspace;
RB_DEBUG_COUNTER_INC(obj_newobj);
(void)RB_DEBUG_COUNTER_INC_IF(obj_newobj_wb_unprotected, !wb_protected);
@@ -2253,33 +2873,63 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protect
}
}
#endif
- if (!(during_gc ||
- ruby_gc_stressful ||
- gc_event_hook_available_p(objspace)) &&
- (obj = heap_get_freeobj_head(objspace, heap_eden)) != Qfalse) {
- return newobj_init(klass, flags, v1, v2, v3, wb_protected, objspace, obj);
+
+ size_t size_pool_idx = size_pool_idx_for_size(alloc_size);
+
+ if (!UNLIKELY(during_gc ||
+ ruby_gc_stressful ||
+ gc_event_hook_available_p(objspace)) &&
+ wb_protected) {
+ obj = newobj_alloc(objspace, cr, size_pool_idx, false);
+#if SHAPE_IN_BASIC_FLAGS
+ flags |= (VALUE)size_pool_idx << SHAPE_FLAG_SHIFT;
+#endif
+ newobj_init(klass, flags, wb_protected, objspace, obj);
}
else {
RB_DEBUG_COUNTER_INC(obj_newobj_slowpath);
- return wb_protected ?
- newobj_slowpath_wb_protected(klass, flags, v1, v2, v3, objspace) :
- newobj_slowpath_wb_unprotected(klass, flags, v1, v2, v3, objspace);
+ obj = wb_protected ?
+ newobj_slowpath_wb_protected(klass, flags, objspace, cr, size_pool_idx) :
+ newobj_slowpath_wb_unprotected(klass, flags, objspace, cr, size_pool_idx);
}
+
+ return obj;
+}
+
+static inline VALUE
+newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protected, size_t alloc_size)
+{
+ VALUE obj = newobj_of0(klass, flags, wb_protected, GET_RACTOR(), alloc_size);
+ return newobj_fill(obj, v1, v2, v3);
+}
+
+static inline VALUE
+newobj_of_cr(rb_ractor_t *cr, VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3, int wb_protected, size_t alloc_size)
+{
+ VALUE obj = newobj_of0(klass, flags, wb_protected, cr, alloc_size);
+ return newobj_fill(obj, v1, v2, v3);
}
VALUE
-rb_wb_unprotected_newobj_of(VALUE klass, VALUE flags)
+rb_wb_unprotected_newobj_of(VALUE klass, VALUE flags, size_t size)
{
GC_ASSERT((flags & FL_WB_PROTECTED) == 0);
- return newobj_of(klass, flags, 0, 0, 0, FALSE);
+ return newobj_of(klass, flags, 0, 0, 0, FALSE, size);
}
VALUE
-rb_wb_protected_newobj_of(VALUE klass, VALUE flags)
+rb_wb_protected_newobj_of(VALUE klass, VALUE flags, size_t size)
{
GC_ASSERT((flags & FL_WB_PROTECTED) == 0);
- return newobj_of(klass, flags, 0, 0, 0, TRUE);
+ return newobj_of(klass, flags, 0, 0, 0, TRUE, size);
+}
+
+VALUE
+rb_ec_wb_protected_newobj_of(rb_execution_context_t *ec, VALUE klass, VALUE flags, size_t size)
+{
+ GC_ASSERT((flags & FL_WB_PROTECTED) == 0);
+ return newobj_of_cr(rb_ec_ractor_ptr(ec), klass, flags, 0, 0, 0, TRUE, size);
}
/* for compatibility */
@@ -2287,33 +2937,108 @@ rb_wb_protected_newobj_of(VALUE klass, VALUE flags)
VALUE
rb_newobj(void)
{
- return newobj_of(0, T_NONE, 0, 0, 0, FALSE);
+ return newobj_of(0, T_NONE, 0, 0, 0, FALSE, RVALUE_SIZE);
+}
+
+static size_t
+rb_obj_embedded_size(uint32_t numiv)
+{
+ return offsetof(struct RObject, as.ary) + (sizeof(VALUE) * numiv);
+}
+
+static VALUE
+rb_class_instance_allocate_internal(VALUE klass, VALUE flags, bool wb_protected)
+{
+ GC_ASSERT((flags & RUBY_T_MASK) == T_OBJECT);
+ GC_ASSERT(flags & ROBJECT_EMBED);
+
+ size_t size;
+#if USE_RVARGC
+ uint32_t index_tbl_num_entries = RCLASS_EXT(klass)->max_iv_count;
+
+ size = rb_obj_embedded_size(index_tbl_num_entries);
+ if (!rb_gc_size_allocatable_p(size)) {
+ size = sizeof(struct RObject);
+ }
+#else
+ size = sizeof(struct RObject);
+#endif
+
+ VALUE obj = newobj_of(klass, flags, 0, 0, 0, wb_protected, size);
+ RUBY_ASSERT(rb_shape_get_shape(obj)->type == SHAPE_ROOT ||
+ rb_shape_get_shape(obj)->type == SHAPE_INITIAL_CAPACITY);
+
+ // Set the shape to the specific T_OBJECT shape which is always
+ // SIZE_POOL_COUNT away from the root shape.
+ ROBJECT_SET_SHAPE_ID(obj, ROBJECT_SHAPE_ID(obj) + SIZE_POOL_COUNT);
+
+#if RUBY_DEBUG
+ RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
+ VALUE *ptr = ROBJECT_IVPTR(obj);
+ for (size_t i = 0; i < ROBJECT_IV_CAPACITY(obj); i++) {
+ ptr[i] = Qundef;
+ }
+#endif
+
+ return obj;
}
VALUE
rb_newobj_of(VALUE klass, VALUE flags)
{
- return newobj_of(klass, flags & ~FL_WB_PROTECTED, 0, 0, 0, flags & FL_WB_PROTECTED);
+ if ((flags & RUBY_T_MASK) == T_OBJECT) {
+ return rb_class_instance_allocate_internal(klass, (flags | ROBJECT_EMBED) & ~FL_WB_PROTECTED, flags & FL_WB_PROTECTED);
+ }
+ else {
+ return newobj_of(klass, flags & ~FL_WB_PROTECTED, 0, 0, 0, flags & FL_WB_PROTECTED, RVALUE_SIZE);
+ }
}
#define UNEXPECTED_NODE(func) \
rb_bug(#func"(): GC does not handle T_NODE 0x%x(%p) 0x%"PRIxVALUE, \
- BUILTIN_TYPE(obj), (void*)(obj), RBASIC(obj)->flags)
+ BUILTIN_TYPE(obj), (void*)(obj), RBASIC(obj)->flags)
+
+const char *
+rb_imemo_name(enum imemo_type type)
+{
+ // put no default case to get a warning if an imemo type is missing
+ switch (type) {
+#define IMEMO_NAME(x) case imemo_##x: return #x;
+ IMEMO_NAME(env);
+ IMEMO_NAME(cref);
+ IMEMO_NAME(svar);
+ IMEMO_NAME(throw_data);
+ IMEMO_NAME(ifunc);
+ IMEMO_NAME(memo);
+ IMEMO_NAME(ment);
+ IMEMO_NAME(iseq);
+ IMEMO_NAME(tmpbuf);
+ IMEMO_NAME(ast);
+ IMEMO_NAME(parser_strterm);
+ IMEMO_NAME(callinfo);
+ IMEMO_NAME(callcache);
+ IMEMO_NAME(constcache);
+#undef IMEMO_NAME
+ }
+ return "unknown";
+}
#undef rb_imemo_new
VALUE
rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
{
+ size_t size = RVALUE_SIZE;
VALUE flags = T_IMEMO | (type << FL_USHIFT);
- return newobj_of(v0, flags, v1, v2, v3, TRUE);
+ return newobj_of(v0, flags, v1, v2, v3, TRUE, size);
}
static VALUE
rb_imemo_tmpbuf_new(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
{
+ size_t size = sizeof(struct rb_imemo_tmpbuf_struct);
VALUE flags = T_IMEMO | (imemo_tmpbuf << FL_USHIFT);
- return newobj_of(v0, flags, v1, v2, v3, FALSE);
+ return newobj_of(v0, flags, v1, v2, v3, FALSE, size);
}
static VALUE
@@ -2372,18 +3097,28 @@ rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0,
}
#endif
-VALUE
-rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
+MJIT_FUNC_EXPORTED VALUE
+rb_class_allocate_instance(VALUE klass)
{
- if (klass) Check_Type(klass, T_CLASS);
- return newobj_of(klass, T_DATA, (VALUE)dmark, (VALUE)dfree, (VALUE)datap, FALSE);
+ return rb_class_instance_allocate_internal(klass, T_OBJECT | ROBJECT_EMBED, RGENGC_WB_PROTECTED_OBJECT);
}
-#undef rb_data_object_alloc
-RUBY_ALIAS_FUNCTION(rb_data_object_alloc(VALUE klass, void *datap,
- RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree),
- rb_data_object_wrap, (klass, datap, dmark, dfree))
+static inline void
+rb_data_object_check(VALUE klass)
+{
+ if (klass != rb_cObject && (rb_get_alloc_func(klass) == rb_class_allocate_instance)) {
+ rb_undef_alloc_func(klass);
+ rb_warn("undefining the allocator of T_DATA class %"PRIsVALUE, klass);
+ }
+}
+VALUE
+rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
+{
+ RUBY_ASSERT_ALWAYS(dfree != (RUBY_DATA_FUNC)1);
+ if (klass) rb_data_object_check(klass);
+ return newobj_of(klass, T_DATA, (VALUE)dmark, (VALUE)dfree, (VALUE)datap, FALSE, sizeof(struct RTypedData));
+}
VALUE
rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
@@ -2396,15 +3131,11 @@ rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_
VALUE
rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
{
- if (klass) Check_Type(klass, T_CLASS);
- return newobj_of(klass, T_DATA, (VALUE)type, (VALUE)1, (VALUE)datap, type->flags & RUBY_FL_WB_PROTECTED);
+ RBIMPL_NONNULL_ARG(type);
+ if (klass) rb_data_object_check(klass);
+ return newobj_of(klass, T_DATA, (VALUE)type, (VALUE)1, (VALUE)datap, type->flags & RUBY_FL_WB_PROTECTED, sizeof(struct RTypedData));
}
-#undef rb_data_typed_object_alloc
-RUBY_ALIAS_FUNCTION(rb_data_typed_object_alloc(VALUE klass, void *datap,
- const rb_data_type_t *type),
- rb_data_typed_object_wrap, (klass, datap, type))
-
VALUE
rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
{
@@ -2417,11 +3148,11 @@ size_t
rb_objspace_data_type_memsize(VALUE obj)
{
if (RTYPEDDATA_P(obj)) {
- const rb_data_type_t *type = RTYPEDDATA_TYPE(obj);
- const void *ptr = RTYPEDDATA_DATA(obj);
- if (ptr && type->function.dsize) {
- return type->function.dsize(ptr);
- }
+ const rb_data_type_t *type = RTYPEDDATA_TYPE(obj);
+ const void *ptr = RTYPEDDATA_DATA(obj);
+ if (ptr && type->function.dsize) {
+ return type->function.dsize(ptr);
+ }
}
return 0;
}
@@ -2430,10 +3161,47 @@ const char *
rb_objspace_data_type_name(VALUE obj)
{
if (RTYPEDDATA_P(obj)) {
- return RTYPEDDATA_TYPE(obj)->wrap_struct_name;
+ return RTYPEDDATA_TYPE(obj)->wrap_struct_name;
+ }
+ else {
+ return 0;
+ }
+}
+
+static int
+ptr_in_page_body_p(const void *ptr, const void *memb)
+{
+ struct heap_page *page = *(struct heap_page **)memb;
+ uintptr_t p_body = (uintptr_t)GET_PAGE_BODY(page->start);
+
+ if ((uintptr_t)ptr >= p_body) {
+ return (uintptr_t)ptr < (p_body + HEAP_PAGE_SIZE) ? 0 : 1;
+ }
+ else {
+ return -1;
+ }
+}
+
+PUREFUNC(static inline struct heap_page * heap_page_for_ptr(rb_objspace_t *objspace, uintptr_t ptr);)
+static inline struct heap_page *
+heap_page_for_ptr(rb_objspace_t *objspace, uintptr_t ptr)
+{
+ struct heap_page **res;
+
+ if (ptr < (uintptr_t)heap_pages_lomem ||
+ ptr > (uintptr_t)heap_pages_himem) {
+ return NULL;
+ }
+
+ res = bsearch((void *)ptr, heap_pages_sorted,
+ (size_t)heap_allocated_pages, sizeof(struct heap_page *),
+ ptr_in_page_body_p);
+
+ if (res) {
+ return *res;
}
else {
- return 0;
+ return NULL;
}
}
@@ -2441,40 +3209,30 @@ PUREFUNC(static inline int is_pointer_to_heap(rb_objspace_t *objspace, void *ptr
static inline int
is_pointer_to_heap(rb_objspace_t *objspace, void *ptr)
{
- register RVALUE *p = RANY(ptr);
+ register uintptr_t p = (uintptr_t)ptr;
register struct heap_page *page;
- register size_t hi, lo, mid;
RB_DEBUG_COUNTER_INC(gc_isptr_trial);
if (p < heap_pages_lomem || p > heap_pages_himem) return FALSE;
RB_DEBUG_COUNTER_INC(gc_isptr_range);
- if ((VALUE)p % sizeof(RVALUE) != 0) return FALSE;
+ if (p % BASE_SLOT_SIZE != 0) return FALSE;
RB_DEBUG_COUNTER_INC(gc_isptr_align);
- /* check if p looks like a pointer using bsearch*/
- lo = 0;
- hi = heap_allocated_pages;
- while (lo < hi) {
- mid = (lo + hi) / 2;
- page = heap_pages_sorted[mid];
- if (page->start <= p) {
- if (p < page->start + page->total_slots) {
- RB_DEBUG_COUNTER_INC(gc_isptr_maybe);
+ page = heap_page_for_ptr(objspace, (uintptr_t)ptr);
+ if (page) {
+ RB_DEBUG_COUNTER_INC(gc_isptr_maybe);
+ if (page->flags.in_tomb) {
+ return FALSE;
+ }
+ else {
+ if (p < page->start) return FALSE;
+ if (p >= page->start + (page->total_slots * page->slot_size)) return FALSE;
+ if ((NUM_IN_PAGE(p) * BASE_SLOT_SIZE) % page->slot_size != 0) return FALSE;
- if (page->flags.in_tomb) {
- return FALSE;
- }
- else {
- return TRUE;
- }
- }
- lo = mid + 1;
- }
- else {
- hi = mid;
- }
+ return TRUE;
+ }
}
return FALSE;
}
@@ -2494,6 +3252,130 @@ rb_free_const_table(struct rb_id_table *tbl)
rb_id_table_free(tbl);
}
+// alive: if false, target pointers can be freed already.
+// To check it, we need objspace parameter.
+static void
+vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, rb_objspace_t *objspace, VALUE klass)
+{
+ if (ccs->entries) {
+ for (int i=0; i<ccs->len; i++) {
+ const struct rb_callcache *cc = ccs->entries[i].cc;
+ if (!alive) {
+ void *ptr = asan_unpoison_object_temporary((VALUE)cc);
+ // ccs can be free'ed.
+ if (is_pointer_to_heap(objspace, (void *)cc) &&
+ IMEMO_TYPE_P(cc, imemo_callcache) &&
+ cc->klass == klass) {
+ // OK. maybe target cc.
+ }
+ else {
+ if (ptr) {
+ asan_poison_object((VALUE)cc);
+ }
+ continue;
+ }
+ if (ptr) {
+ asan_poison_object((VALUE)cc);
+ }
+ }
+ vm_cc_invalidate(cc);
+ }
+ ruby_xfree(ccs->entries);
+ }
+ ruby_xfree(ccs);
+}
+
+void
+rb_vm_ccs_free(struct rb_class_cc_entries *ccs)
+{
+ RB_DEBUG_COUNTER_INC(ccs_free);
+ vm_ccs_free(ccs, TRUE, NULL, Qundef);
+}
+
+struct cc_tbl_i_data {
+ rb_objspace_t *objspace;
+ VALUE klass;
+ bool alive;
+};
+
+static enum rb_id_table_iterator_result
+cc_table_mark_i(ID id, VALUE ccs_ptr, void *data_ptr)
+{
+ struct cc_tbl_i_data *data = data_ptr;
+ struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
+ VM_ASSERT(vm_ccs_p(ccs));
+ VM_ASSERT(id == ccs->cme->called_id);
+
+ if (METHOD_ENTRY_INVALIDATED(ccs->cme)) {
+ rb_vm_ccs_free(ccs);
+ return ID_TABLE_DELETE;
+ }
+ else {
+ gc_mark(data->objspace, (VALUE)ccs->cme);
+
+ for (int i=0; i<ccs->len; i++) {
+ VM_ASSERT(data->klass == ccs->entries[i].cc->klass);
+ VM_ASSERT(vm_cc_check_cme(ccs->entries[i].cc, ccs->cme));
+
+ gc_mark(data->objspace, (VALUE)ccs->entries[i].ci);
+ gc_mark(data->objspace, (VALUE)ccs->entries[i].cc);
+ }
+ return ID_TABLE_CONTINUE;
+ }
+}
+
+static void
+cc_table_mark(rb_objspace_t *objspace, VALUE klass)
+{
+ struct rb_id_table *cc_tbl = RCLASS_CC_TBL(klass);
+ if (cc_tbl) {
+ struct cc_tbl_i_data data = {
+ .objspace = objspace,
+ .klass = klass,
+ };
+ rb_id_table_foreach(cc_tbl, cc_table_mark_i, &data);
+ }
+}
+
+static enum rb_id_table_iterator_result
+cc_table_free_i(VALUE ccs_ptr, void *data_ptr)
+{
+ struct cc_tbl_i_data *data = data_ptr;
+ struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
+ VM_ASSERT(vm_ccs_p(ccs));
+ vm_ccs_free(ccs, data->alive, data->objspace, data->klass);
+ return ID_TABLE_CONTINUE;
+}
+
+static void
+cc_table_free(rb_objspace_t *objspace, VALUE klass, bool alive)
+{
+ struct rb_id_table *cc_tbl = RCLASS_CC_TBL(klass);
+
+ if (cc_tbl) {
+ struct cc_tbl_i_data data = {
+ .objspace = objspace,
+ .klass = klass,
+ .alive = alive,
+ };
+ rb_id_table_foreach_values(cc_tbl, cc_table_free_i, &data);
+ rb_id_table_free(cc_tbl);
+ }
+}
+
+static enum rb_id_table_iterator_result
+cvar_table_free_i(VALUE value, void * ctx)
+{
+ xfree((void *) value);
+ return ID_TABLE_CONTINUE;
+}
+
+void
+rb_cc_table_free(VALUE klass)
+{
+ cc_table_free(&rb_objspace, klass, TRUE);
+}
+
static inline void
make_zombie(rb_objspace_t *objspace, VALUE obj, void (*dfree)(void *), void *data)
{
@@ -2501,28 +3383,36 @@ make_zombie(rb_objspace_t *objspace, VALUE obj, void (*dfree)(void *), void *dat
zombie->basic.flags = T_ZOMBIE | (zombie->basic.flags & FL_SEEN_OBJ_ID);
zombie->dfree = dfree;
zombie->data = data;
- zombie->next = heap_pages_deferred_final;
- heap_pages_deferred_final = (VALUE)zombie;
+ VALUE prev, next = heap_pages_deferred_final;
+ do {
+ zombie->next = prev = next;
+ next = RUBY_ATOMIC_VALUE_CAS(heap_pages_deferred_final, prev, obj);
+ } while (next != prev);
+
+ struct heap_page *page = GET_HEAP_PAGE(obj);
+ page->final_slots++;
+ heap_pages_final_slots++;
}
static inline void
make_io_zombie(rb_objspace_t *objspace, VALUE obj)
{
rb_io_t *fptr = RANY(obj)->as.file.fptr;
- make_zombie(objspace, obj, (void (*)(void*))rb_io_fptr_finalize, fptr);
+ make_zombie(objspace, obj, rb_io_fptr_finalize_internal, fptr);
}
static void
obj_free_object_id(rb_objspace_t *objspace, VALUE obj)
{
- VALUE id;
+ ASSERT_vm_locking();
+ st_data_t o = (st_data_t)obj, id;
GC_ASSERT(FL_TEST(obj, FL_SEEN_OBJ_ID));
FL_UNSET(obj, FL_SEEN_OBJ_ID);
- if (st_delete(objspace->obj_to_id_tbl, (st_data_t *)&obj, &id)) {
+ if (st_delete(objspace->obj_to_id_tbl, &o, &id)) {
GC_ASSERT(id);
- st_delete(objspace->id_to_obj_tbl, (st_data_t *)&id, NULL);
+ st_delete(objspace->id_to_obj_tbl, &id, NULL);
}
else {
rb_bug("Object ID seen, but not in mapping table: %s\n", obj_info(obj));
@@ -2533,6 +3423,7 @@ static int
obj_free(rb_objspace_t *objspace, VALUE obj)
{
RB_DEBUG_COUNTER_INC(obj_free);
+ // RUBY_DEBUG_LOG("obj:%p (%s)", (void *)obj, obj_type_name(obj));
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_FREEOBJ, obj);
@@ -2541,36 +3432,39 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case T_FIXNUM:
case T_TRUE:
case T_FALSE:
- rb_bug("obj_free() called for broken object");
- break;
+ rb_bug("obj_free() called for broken object");
+ break;
+ default:
+ break;
}
if (FL_TEST(obj, FL_EXIVAR)) {
- rb_free_generic_ivar((VALUE)obj);
- FL_UNSET(obj, FL_EXIVAR);
+ rb_free_generic_ivar((VALUE)obj);
+ FL_UNSET(obj, FL_EXIVAR);
}
if (FL_TEST(obj, FL_SEEN_OBJ_ID) && !FL_TEST(obj, FL_FINALIZE)) {
obj_free_object_id(objspace, obj);
}
-#if USE_RGENGC
if (RVALUE_WB_UNPROTECTED(obj)) CLEAR_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
#if RGENGC_CHECK_MODE
#define CHECK(x) if (x(obj) != FALSE) rb_bug("obj_free: " #x "(%s) != FALSE", obj_info(obj))
- CHECK(RVALUE_WB_UNPROTECTED);
- CHECK(RVALUE_MARKED);
- CHECK(RVALUE_MARKING);
- CHECK(RVALUE_UNCOLLECTIBLE);
+ CHECK(RVALUE_WB_UNPROTECTED);
+ CHECK(RVALUE_MARKED);
+ CHECK(RVALUE_MARKING);
+ CHECK(RVALUE_UNCOLLECTIBLE);
#undef CHECK
#endif
-#endif
switch (BUILTIN_TYPE(obj)) {
case T_OBJECT:
- if ((RANY(obj)->as.basic.flags & ROBJECT_EMBED) ||
- RANY(obj)->as.object.as.heap.ivptr == NULL) {
+ if (rb_shape_obj_too_complex(obj)) {
+ RB_DEBUG_COUNTER_INC(obj_obj_too_complex);
+ st_free_table(ROBJECT_IV_HASH(obj));
+ }
+ else if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
RB_DEBUG_COUNTER_INC(obj_obj_embed);
}
else if (ROBJ_TRANSIENT_P(obj)) {
@@ -2583,44 +3477,42 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_MODULE:
case T_CLASS:
- mjit_remove_class_serial(RCLASS_SERIAL(obj));
- rb_id_table_free(RCLASS_M_TBL(obj));
- if (RCLASS_IV_TBL(obj)) {
- st_free_table(RCLASS_IV_TBL(obj));
- }
- if (RCLASS_CONST_TBL(obj)) {
- rb_free_const_table(RCLASS_CONST_TBL(obj));
- }
- if (RCLASS_IV_INDEX_TBL(obj)) {
- st_free_table(RCLASS_IV_INDEX_TBL(obj));
- }
- if (RCLASS_EXT(obj)->subclasses) {
- if (BUILTIN_TYPE(obj) == T_MODULE) {
- rb_class_detach_module_subclasses(obj);
- }
- else {
- rb_class_detach_subclasses(obj);
- }
- RCLASS_EXT(obj)->subclasses = NULL;
- }
- rb_class_remove_from_module_subclasses(obj);
- rb_class_remove_from_super_subclasses(obj);
- if (RANY(obj)->as.klass.ptr)
- xfree(RANY(obj)->as.klass.ptr);
- RANY(obj)->as.klass.ptr = NULL;
+ rb_id_table_free(RCLASS_M_TBL(obj));
+ cc_table_free(objspace, obj, FALSE);
+ if (RCLASS_IVPTR(obj)) {
+ xfree(RCLASS_IVPTR(obj));
+ }
+ if (RCLASS_CONST_TBL(obj)) {
+ rb_free_const_table(RCLASS_CONST_TBL(obj));
+ }
+ if (RCLASS_CVC_TBL(obj)) {
+ rb_id_table_foreach_values(RCLASS_CVC_TBL(obj), cvar_table_free_i, NULL);
+ rb_id_table_free(RCLASS_CVC_TBL(obj));
+ }
+ rb_class_remove_subclass_head(obj);
+ rb_class_remove_from_module_subclasses(obj);
+ rb_class_remove_from_super_subclasses(obj);
+ if (FL_TEST_RAW(obj, RCLASS_SUPERCLASSES_INCLUDE_SELF)) {
+ xfree(RCLASS_SUPERCLASSES(obj));
+ }
+
+#if SIZE_POOL_COUNT == 1
+ if (RCLASS_EXT(obj))
+ xfree(RCLASS_EXT(obj));
+#endif
(void)RB_DEBUG_COUNTER_INC_IF(obj_module_ptr, BUILTIN_TYPE(obj) == T_MODULE);
(void)RB_DEBUG_COUNTER_INC_IF(obj_class_ptr, BUILTIN_TYPE(obj) == T_CLASS);
- break;
+ break;
case T_STRING:
- rb_str_free(obj);
- break;
+ rb_str_free(obj);
+ break;
case T_ARRAY:
rb_ary_free(obj);
- break;
+ break;
case T_HASH:
#if USE_DEBUG_COUNTER
- switch RHASH_SIZE(obj) {
+ switch (RHASH_SIZE(obj)) {
case 0:
RB_DEBUG_COUNTER_INC(obj_hash_empty);
break;
@@ -2675,53 +3567,53 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
GC_ASSERT(RHASH_ST_TABLE_P(obj));
st_free_table(RHASH(obj)->as.st);
}
- break;
+ break;
case T_REGEXP:
- if (RANY(obj)->as.regexp.ptr) {
- onig_free(RANY(obj)->as.regexp.ptr);
+ if (RANY(obj)->as.regexp.ptr) {
+ onig_free(RANY(obj)->as.regexp.ptr);
RB_DEBUG_COUNTER_INC(obj_regexp_ptr);
- }
- break;
+ }
+ break;
case T_DATA:
- if (DATA_PTR(obj)) {
- int free_immediately = FALSE;
- void (*dfree)(void *);
- void *data = DATA_PTR(obj);
-
- if (RTYPEDDATA_P(obj)) {
- free_immediately = (RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY) != 0;
- dfree = RANY(obj)->as.typeddata.type->function.dfree;
- if (0 && free_immediately == 0) {
- /* to expose non-free-immediate T_DATA */
- fprintf(stderr, "not immediate -> %s\n", RANY(obj)->as.typeddata.type->wrap_struct_name);
- }
- }
- else {
- dfree = RANY(obj)->as.data.dfree;
- }
-
- if (dfree) {
- if (dfree == RUBY_DEFAULT_FREE) {
- xfree(data);
+ if (DATA_PTR(obj)) {
+ int free_immediately = FALSE;
+ void (*dfree)(void *);
+ void *data = DATA_PTR(obj);
+
+ if (RTYPEDDATA_P(obj)) {
+ free_immediately = (RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY) != 0;
+ dfree = RANY(obj)->as.typeddata.type->function.dfree;
+ if (0 && free_immediately == 0) {
+ /* to expose non-free-immediate T_DATA */
+ fprintf(stderr, "not immediate -> %s\n", RANY(obj)->as.typeddata.type->wrap_struct_name);
+ }
+ }
+ else {
+ dfree = RANY(obj)->as.data.dfree;
+ }
+
+ if (dfree) {
+ if (dfree == RUBY_DEFAULT_FREE) {
+ xfree(data);
RB_DEBUG_COUNTER_INC(obj_data_xfree);
- }
- else if (free_immediately) {
- (*dfree)(data);
+ }
+ else if (free_immediately) {
+ (*dfree)(data);
RB_DEBUG_COUNTER_INC(obj_data_imm_free);
- }
- else {
- make_zombie(objspace, obj, dfree, data);
+ }
+ else {
+ make_zombie(objspace, obj, dfree, data);
RB_DEBUG_COUNTER_INC(obj_data_zombie);
- return 1;
- }
- }
+ return FALSE;
+ }
+ }
else {
RB_DEBUG_COUNTER_INC(obj_data_empty);
}
- }
- break;
+ }
+ break;
case T_MATCH:
- if (RANY(obj)->as.match.rmatch) {
+ if (RANY(obj)->as.match.rmatch) {
struct rmatch *rm = RANY(obj)->as.match.rmatch;
#if USE_DEBUG_COUNTER
if (rm->regs.num_regs >= 8) {
@@ -2734,21 +3626,21 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
RB_DEBUG_COUNTER_INC(obj_match_under4);
}
#endif
- onig_region_free(&rm->regs, 0);
+ onig_region_free(&rm->regs, 0);
if (rm->char_offset)
- xfree(rm->char_offset);
- xfree(rm);
+ xfree(rm->char_offset);
+ xfree(rm);
RB_DEBUG_COUNTER_INC(obj_match_ptr);
- }
- break;
+ }
+ break;
case T_FILE:
- if (RANY(obj)->as.file.fptr) {
- make_io_zombie(objspace, obj);
+ if (RANY(obj)->as.file.fptr) {
+ make_io_zombie(objspace, obj);
RB_DEBUG_COUNTER_INC(obj_file_ptr);
- return 1;
- }
- break;
+ return FALSE;
+ }
+ break;
case T_RATIONAL:
RB_DEBUG_COUNTER_INC(obj_rational);
break;
@@ -2756,44 +3648,44 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
RB_DEBUG_COUNTER_INC(obj_complex);
break;
case T_MOVED:
- break;
+ break;
case T_ICLASS:
- /* Basically , T_ICLASS shares table with the module */
- if (FL_TEST(obj, RICLASS_IS_ORIGIN)) {
- rb_id_table_free(RCLASS_M_TBL(obj));
- }
- if (RCLASS_CALLABLE_M_TBL(obj) != NULL) {
- rb_id_table_free(RCLASS_CALLABLE_M_TBL(obj));
- }
- if (RCLASS_EXT(obj)->subclasses) {
- rb_class_detach_subclasses(obj);
- RCLASS_EXT(obj)->subclasses = NULL;
- }
- rb_class_remove_from_module_subclasses(obj);
- rb_class_remove_from_super_subclasses(obj);
- xfree(RANY(obj)->as.klass.ptr);
- RANY(obj)->as.klass.ptr = NULL;
+ /* Basically , T_ICLASS shares table with the module */
+ if (RICLASS_OWNS_M_TBL_P(obj)) {
+ /* Method table is not shared for origin iclasses of classes */
+ rb_id_table_free(RCLASS_M_TBL(obj));
+ }
+ if (RCLASS_CALLABLE_M_TBL(obj) != NULL) {
+ rb_id_table_free(RCLASS_CALLABLE_M_TBL(obj));
+ }
+ rb_class_remove_subclass_head(obj);
+ cc_table_free(objspace, obj, FALSE);
+ rb_class_remove_from_module_subclasses(obj);
+ rb_class_remove_from_super_subclasses(obj);
+#if !RCLASS_EXT_EMBEDDED
+ xfree(RCLASS_EXT(obj));
+#endif
RB_DEBUG_COUNTER_INC(obj_iclass_ptr);
- break;
+ break;
case T_FLOAT:
RB_DEBUG_COUNTER_INC(obj_float);
- break;
+ break;
case T_BIGNUM:
- if (!(RBASIC(obj)->flags & BIGNUM_EMBED_FLAG) && BIGNUM_DIGITS(obj)) {
- xfree(BIGNUM_DIGITS(obj));
+ if (!BIGNUM_EMBED_P(obj) && BIGNUM_DIGITS(obj)) {
+ xfree(BIGNUM_DIGITS(obj));
RB_DEBUG_COUNTER_INC(obj_bignum_ptr);
- }
+ }
else {
RB_DEBUG_COUNTER_INC(obj_bignum_embed);
}
- break;
+ break;
case T_NODE:
- UNEXPECTED_NODE(obj_free);
- break;
+ UNEXPECTED_NODE(obj_free);
+ break;
case T_STRUCT:
if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) ||
@@ -2806,39 +3698,39 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
else {
xfree((void *)RANY(obj)->as.rstruct.as.heap.ptr);
RB_DEBUG_COUNTER_INC(obj_struct_ptr);
- }
- break;
+ }
+ break;
case T_SYMBOL:
- {
+ {
rb_gc_free_dsymbol(obj);
RB_DEBUG_COUNTER_INC(obj_symbol);
- }
- break;
+ }
+ break;
case T_IMEMO:
- switch (imemo_type(obj)) {
- case imemo_ment:
- rb_free_method_entry(&RANY(obj)->as.imemo.ment);
+ switch (imemo_type(obj)) {
+ case imemo_ment:
+ rb_free_method_entry(&RANY(obj)->as.imemo.ment);
RB_DEBUG_COUNTER_INC(obj_imemo_ment);
- break;
- case imemo_iseq:
- rb_iseq_free(&RANY(obj)->as.imemo.iseq);
+ break;
+ case imemo_iseq:
+ rb_iseq_free(&RANY(obj)->as.imemo.iseq);
RB_DEBUG_COUNTER_INC(obj_imemo_iseq);
- break;
- case imemo_env:
- GC_ASSERT(VM_ENV_ESCAPED_P(RANY(obj)->as.imemo.env.ep));
- xfree((VALUE *)RANY(obj)->as.imemo.env.env);
+ break;
+ case imemo_env:
+ GC_ASSERT(VM_ENV_ESCAPED_P(RANY(obj)->as.imemo.env.ep));
+ xfree((VALUE *)RANY(obj)->as.imemo.env.env);
RB_DEBUG_COUNTER_INC(obj_imemo_env);
- break;
- case imemo_tmpbuf:
- xfree(RANY(obj)->as.imemo.alloc.ptr);
+ break;
+ case imemo_tmpbuf:
+ xfree(RANY(obj)->as.imemo.alloc.ptr);
RB_DEBUG_COUNTER_INC(obj_imemo_tmpbuf);
- break;
- case imemo_ast:
- rb_ast_free(&RANY(obj)->as.imemo.ast);
+ break;
+ case imemo_ast:
+ rb_ast_free(&RANY(obj)->as.imemo.ast);
RB_DEBUG_COUNTER_INC(obj_imemo_ast);
- break;
+ break;
case imemo_cref:
RB_DEBUG_COUNTER_INC(obj_imemo_cref);
break;
@@ -2857,23 +3749,29 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case imemo_parser_strterm:
RB_DEBUG_COUNTER_INC(obj_imemo_parser_strterm);
break;
- default:
- /* unreachable */
- break;
- }
- return 0;
+ case imemo_callinfo:
+ RB_DEBUG_COUNTER_INC(obj_imemo_callinfo);
+ break;
+ case imemo_callcache:
+ RB_DEBUG_COUNTER_INC(obj_imemo_callcache);
+ break;
+ case imemo_constcache:
+ RB_DEBUG_COUNTER_INC(obj_imemo_constcache);
+ break;
+ }
+ return TRUE;
default:
- rb_bug("gc_sweep(): unknown data type 0x%x(%p) 0x%"PRIxVALUE,
- BUILTIN_TYPE(obj), (void*)obj, RBASIC(obj)->flags);
+ rb_bug("gc_sweep(): unknown data type 0x%x(%p) 0x%"PRIxVALUE,
+ BUILTIN_TYPE(obj), (void*)obj, RBASIC(obj)->flags);
}
if (FL_TEST(obj, FL_FINALIZE)) {
make_zombie(objspace, obj, 0, 0);
- return 1;
+ return FALSE;
}
else {
- return 0;
+ return TRUE;
}
}
@@ -2884,9 +3782,10 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
static int
object_id_cmp(st_data_t x, st_data_t y)
{
- if (RB_TYPE_P(x, T_BIGNUM)) {
+ if (RB_BIGNUM_TYPE_P(x)) {
return !rb_big_eql(x, y);
- } else {
+ }
+ else {
return x != y;
}
}
@@ -2894,9 +3793,10 @@ object_id_cmp(st_data_t x, st_data_t y)
static st_index_t
object_id_hash(st_data_t n)
{
- if (RB_TYPE_P(n, T_BIGNUM)) {
+ if (RB_BIGNUM_TYPE_P(n)) {
return FIX2LONG(rb_big_hash(n));
- } else {
+ }
+ else {
return st_numhash(n);
}
}
@@ -2910,6 +3810,11 @@ Init_heap(void)
{
rb_objspace_t *objspace = &rb_objspace;
+#if defined(INIT_HEAP_PAGE_ALLOC_USE_MMAP)
+ /* Need to determine if we can use mmap at runtime. */
+ heap_page_alloc_use_mmap = INIT_HEAP_PAGE_ALLOC_USE_MMAP;
+#endif
+
objspace->next_object_id = INT2FIX(OBJ_ID_INITIAL);
objspace->id_to_obj_tbl = st_init_table(&object_id_hash_type);
objspace->obj_to_id_tbl = st_init_numtable();
@@ -2918,7 +3823,16 @@ Init_heap(void)
objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
#endif
- heap_add_pages(objspace, heap_eden, gc_params.heap_init_slots / HEAP_PAGE_OBJ_LIMIT);
+ heap_add_pages(objspace, &size_pools[0], SIZE_POOL_EDEN_HEAP(&size_pools[0]), gc_params.heap_init_slots / HEAP_PAGE_OBJ_LIMIT);
+
+ /* Give other size pools allocatable pages. */
+ for (int i = 1; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ int multiple = size_pool->slot_size / BASE_SLOT_SIZE;
+ size_pool->allocatable_pages = gc_params.heap_init_slots * multiple / HEAP_PAGE_OBJ_LIMIT;
+ }
+ heap_pages_expand_sorted(objspace);
+
init_mark_stack(&objspace->mark_stack);
objspace->profile.invoke_time = getrusage_time();
@@ -2935,53 +3849,100 @@ Init_gc_stress(void)
typedef int each_obj_callback(void *, void *, size_t, void *);
-static void objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void *data);
+static void objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void *data, bool protected);
static void objspace_reachable_objects_from_root(rb_objspace_t *, void (func)(const char *, VALUE, void *), void *);
-struct each_obj_args {
+struct each_obj_data {
rb_objspace_t *objspace;
+ bool reenable_incremental;
+
each_obj_callback *callback;
void *data;
+
+ struct heap_page **pages[SIZE_POOL_COUNT];
+ size_t pages_counts[SIZE_POOL_COUNT];
};
-static void
-objspace_each_objects_without_setup(rb_objspace_t *objspace, each_obj_callback *callback, void *data)
+static VALUE
+objspace_each_objects_ensure(VALUE arg)
{
- size_t i;
- struct heap_page *page;
- RVALUE *pstart = NULL, *pend;
-
- i = 0;
- while (i < heap_allocated_pages) {
- while (0 < i && pstart < heap_pages_sorted[i-1]->start) i--;
- while (i < heap_allocated_pages && heap_pages_sorted[i]->start <= pstart) i++;
- if (heap_allocated_pages <= i) break;
-
- page = heap_pages_sorted[i];
+ struct each_obj_data *data = (struct each_obj_data *)arg;
+ rb_objspace_t *objspace = data->objspace;
- pstart = page->start;
- pend = pstart + page->total_slots;
+ /* Reenable incremental GC */
+ if (data->reenable_incremental) {
+ objspace->flags.dont_incremental = FALSE;
+ }
- if ((*callback)(pstart, pend, sizeof(RVALUE), data)) {
- break;
- }
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ struct heap_page **pages = data->pages[i];
+ /* pages could be NULL if an error was raised during setup (e.g.
+ * malloc failed due to out of memory). */
+ if (pages) {
+ free(pages);
+ }
}
-}
-static VALUE
-objspace_each_objects_protected(VALUE arg)
-{
- struct each_obj_args *args = (struct each_obj_args *)arg;
- objspace_each_objects_without_setup(args->objspace, args->callback, args->data);
return Qnil;
}
static VALUE
-incremental_enable(VALUE _)
+objspace_each_objects_try(VALUE arg)
{
- rb_objspace_t *objspace = &rb_objspace;
+ struct each_obj_data *data = (struct each_obj_data *)arg;
+ rb_objspace_t *objspace = data->objspace;
+
+ /* Copy pages from all size_pools to their respective buffers. */
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ size_t size = size_mul_or_raise(SIZE_POOL_EDEN_HEAP(size_pool)->total_pages, sizeof(struct heap_page *), rb_eRuntimeError);
+
+ struct heap_page **pages = malloc(size);
+ if (!pages) rb_memerror();
+
+ /* Set up pages buffer by iterating over all pages in the current eden
+ * heap. This will be a snapshot of the state of the heap before we
+ * call the callback over each page that exists in this buffer. Thus it
+ * is safe for the callback to allocate objects without possibly entering
+ * an infinite loop. */
+ struct heap_page *page = 0;
+ size_t pages_count = 0;
+ ccan_list_for_each(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, page, page_node) {
+ pages[pages_count] = page;
+ pages_count++;
+ }
+ data->pages[i] = pages;
+ data->pages_counts[i] = pages_count;
+ GC_ASSERT(pages_count == SIZE_POOL_EDEN_HEAP(size_pool)->total_pages);
+ }
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ size_t pages_count = data->pages_counts[i];
+ struct heap_page **pages = data->pages[i];
+
+ struct heap_page *page = ccan_list_top(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, struct heap_page, page_node);
+ for (size_t i = 0; i < pages_count; i++) {
+ /* If we have reached the end of the linked list then there are no
+ * more pages, so break. */
+ if (page == NULL) break;
+
+ /* If this page does not match the one in the buffer, then move to
+ * the next page in the buffer. */
+ if (pages[i] != page) continue;
+
+ uintptr_t pstart = (uintptr_t)page->start;
+ uintptr_t pend = pstart + (page->total_slots * size_pool->slot_size);
+
+ if (!__asan_region_is_poisoned((void *)pstart, pend - pstart) &&
+ (*data->callback)((void *)pstart, (void *)pend, size_pool->slot_size, data->data)) {
+ break;
+ }
+
+ page = ccan_list_next(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, page, page_node);
+ }
+ }
- objspace->flags.dont_incremental = FALSE;
return Qnil;
}
@@ -3016,7 +3977,7 @@ incremental_enable(VALUE _)
* This means that you can not walk through all Ruby object page
* including freed object page.
*
- * Note: On this implementation, 'stride' is same as sizeof(RVALUE).
+ * Note: On this implementation, 'stride' is the same as sizeof(RVALUE).
* However, there are possibilities to pass variable values with
* 'stride' with some reasons. You must use stride instead of
* use some constant value in the iteration.
@@ -3024,30 +3985,39 @@ incremental_enable(VALUE _)
void
rb_objspace_each_objects(each_obj_callback *callback, void *data)
{
- objspace_each_objects(&rb_objspace, callback, data);
+ objspace_each_objects(&rb_objspace, callback, data, TRUE);
}
static void
-objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void *data)
+objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void *data, bool protected)
{
- int prev_dont_incremental = objspace->flags.dont_incremental;
+ /* Disable incremental GC */
+ bool reenable_incremental = FALSE;
+ if (protected) {
+ reenable_incremental = !objspace->flags.dont_incremental;
- gc_rest(objspace);
- objspace->flags.dont_incremental = TRUE;
-
- if (prev_dont_incremental) {
- objspace_each_objects_without_setup(objspace, callback, data);
- }
- else {
- struct each_obj_args args = {objspace, callback, data};
- rb_ensure(objspace_each_objects_protected, (VALUE)&args, incremental_enable, Qnil);
+ gc_rest(objspace);
+ objspace->flags.dont_incremental = TRUE;
}
+
+ struct each_obj_data each_obj_data = {
+ .objspace = objspace,
+ .reenable_incremental = reenable_incremental,
+
+ .callback = callback,
+ .data = data,
+
+ .pages = {NULL},
+ .pages_counts = {0},
+ };
+ rb_ensure(objspace_each_objects_try, (VALUE)&each_obj_data,
+ objspace_each_objects_ensure, (VALUE)&each_obj_data);
}
void
rb_objspace_each_objects_without_setup(each_obj_callback *callback, void *data)
{
- objspace_each_objects_without_setup(&rb_objspace, callback, data);
+ objspace_each_objects(&rb_objspace, callback, data, FALSE);
}
struct os_each_struct {
@@ -3059,31 +4029,30 @@ static int
internal_object_p(VALUE obj)
{
RVALUE *p = (RVALUE *)obj;
- void *ptr = __asan_region_is_poisoned(p, SIZEOF_VALUE);
- asan_unpoison_object(obj, false);
+ void *ptr = asan_unpoison_object_temporary(obj);
bool used_p = p->as.basic.flags;
if (used_p) {
- switch (BUILTIN_TYPE(p)) {
- case T_NODE:
- UNEXPECTED_NODE(internal_object_p);
- break;
- case T_NONE:
+ switch (BUILTIN_TYPE(obj)) {
+ case T_NODE:
+ UNEXPECTED_NODE(internal_object_p);
+ break;
+ case T_NONE:
case T_MOVED:
- case T_IMEMO:
- case T_ICLASS:
- case T_ZOMBIE:
- break;
- case T_CLASS:
- if (!p->as.basic.klass) break;
- if (FL_TEST(obj, FL_SINGLETON)) {
- return rb_singleton_class_internal_p(obj);
- }
- return 0;
- default:
- if (!p->as.basic.klass) break;
- return 0;
- }
+ case T_IMEMO:
+ case T_ICLASS:
+ case T_ZOMBIE:
+ break;
+ case T_CLASS:
+ if (!p->as.basic.klass) break;
+ if (FL_TEST(obj, FL_SINGLETON)) {
+ return rb_singleton_class_internal_p(obj);
+ }
+ return 0;
+ default:
+ if (!p->as.basic.klass) break;
+ return 0;
+ }
}
if (ptr || ! used_p) {
asan_poison_object(obj);
@@ -3101,16 +4070,17 @@ static int
os_obj_of_i(void *vstart, void *vend, size_t stride, void *data)
{
struct os_each_struct *oes = (struct os_each_struct *)data;
- RVALUE *p = (RVALUE *)vstart, *pend = (RVALUE *)vend;
- for (; p != pend; p++) {
- volatile VALUE v = (VALUE)p;
- if (!internal_object_p(v)) {
- if (!oes->of || rb_obj_is_kind_of(v, oes->of)) {
- rb_yield(v);
- oes->num++;
- }
- }
+ VALUE v = (VALUE)vstart;
+ for (; v != (VALUE)vend; v += stride) {
+ if (!internal_object_p(v)) {
+ if (!oes->of || rb_obj_is_kind_of(v, oes->of)) {
+ if (!rb_multi_ractor_p() || rb_ractor_shareable_p(v)) {
+ rb_yield(v);
+ oes->num++;
+ }
+ }
+ }
}
return 0;
@@ -3202,8 +4172,8 @@ static void
should_be_callable(VALUE block)
{
if (!rb_obj_respond_to(block, idCall, TRUE)) {
- rb_raise(rb_eArgError, "wrong type argument %"PRIsVALUE" (should be callable)",
- rb_obj_class(block));
+ rb_raise(rb_eArgError, "wrong type argument %"PRIsVALUE" (should be callable)",
+ rb_obj_class(block));
}
}
@@ -3211,8 +4181,8 @@ static void
should_be_finalizable(VALUE obj)
{
if (!FL_ABLE(obj)) {
- rb_raise(rb_eArgError, "cannot define finalizer for %s",
- rb_obj_classname(obj));
+ rb_raise(rb_eArgError, "cannot define finalizer for %s",
+ rb_obj_classname(obj));
}
rb_check_frozen(obj);
}
@@ -3226,6 +4196,57 @@ should_be_finalizable(VALUE obj)
* as an argument to <i>aProc</i>. If <i>aProc</i> is a lambda or
* method, make sure it can be called with a single argument.
*
+ * The return value is an array <code>[0, aProc]</code>.
+ *
+ * The two recommended patterns are to either create the finaliser proc
+ * in a non-instance method where it can safely capture the needed state,
+ * or to use a custom callable object that stores the needed state
+ * explicitly as instance variables.
+ *
+ * class Foo
+ * def initialize(data_needed_for_finalization)
+ * ObjectSpace.define_finalizer(self, self.class.create_finalizer(data_needed_for_finalization))
+ * end
+ *
+ * def self.create_finalizer(data_needed_for_finalization)
+ * proc {
+ * puts "finalizing #{data_needed_for_finalization}"
+ * }
+ * end
+ * end
+ *
+ * class Bar
+ * class Remover
+ * def initialize(data_needed_for_finalization)
+ * @data_needed_for_finalization = data_needed_for_finalization
+ * end
+ *
+ * def call(id)
+ * puts "finalizing #{@data_needed_for_finalization}"
+ * end
+ * end
+ *
+ * def initialize(data_needed_for_finalization)
+ * ObjectSpace.define_finalizer(self, Remover.new(data_needed_for_finalization))
+ * end
+ * end
+ *
+ * Note that if your finalizer references the object to be
+ * finalized it will never be run on GC, although it will still be
+ * run at exit. You will get a warning if you capture the object
+ * to be finalized as the receiver of the finalizer.
+ *
+ * class CapturesSelf
+ * def initialize(name)
+ * ObjectSpace.define_finalizer(self, proc {
+ * # this finalizer will only be run on exit
+ * puts "finalizing #{name}"
+ * })
+ * end
+ * end
+ *
+ * Also note that finalization can be unpredictable and is never guaranteed
+ * to be run except on exit.
*/
static VALUE
@@ -3236,10 +4257,14 @@ define_final(int argc, VALUE *argv, VALUE os)
rb_scan_args(argc, argv, "11", &obj, &block);
should_be_finalizable(obj);
if (argc == 1) {
- block = rb_block_proc();
+ block = rb_block_proc();
}
else {
- should_be_callable(block);
+ should_be_callable(block);
+ }
+
+ if (rb_callable_receiver(block) == obj) {
+ rb_warn("finalizer references object to be finalized");
}
return define_final0(obj, block);
@@ -3254,32 +4279,33 @@ define_final0(VALUE obj, VALUE block)
RBASIC(obj)->flags |= FL_FINALIZE;
- block = rb_ary_new3(2, INT2FIX(0), block);
- OBJ_FREEZE(block);
-
if (st_lookup(finalizer_table, obj, &data)) {
- table = (VALUE)data;
+ table = (VALUE)data;
- /* avoid duplicate block, table is usually small */
- {
- long len = RARRAY_LEN(table);
- long i;
+ /* avoid duplicate block, table is usually small */
+ {
+ long len = RARRAY_LEN(table);
+ long i;
for (i = 0; i < len; i++) {
VALUE recv = RARRAY_AREF(table, i);
- if (rb_funcall(recv, idEq, 1, block)) {
- return recv;
- }
- }
- }
+ if (rb_equal(recv, block)) {
+ block = recv;
+ goto end;
+ }
+ }
+ }
- rb_ary_push(table, block);
+ rb_ary_push(table, block);
}
else {
- table = rb_ary_new3(1, block);
- RBASIC_CLEAR_CLASS(table);
- st_add_direct(finalizer_table, obj, table);
+ table = rb_ary_new3(1, block);
+ RBASIC_CLEAR_CLASS(table);
+ st_add_direct(finalizer_table, obj, table);
}
+ end:
+ block = rb_ary_new3(2, INT2FIX(0), block);
+ OBJ_FREEZE(block);
return block;
}
@@ -3300,49 +4326,65 @@ rb_gc_copy_finalizer(VALUE dest, VALUE obj)
if (!FL_TEST(obj, FL_FINALIZE)) return;
if (st_lookup(finalizer_table, obj, &data)) {
- table = (VALUE)data;
- st_insert(finalizer_table, dest, table);
+ table = (VALUE)data;
+ st_insert(finalizer_table, dest, table);
}
FL_SET(dest, FL_FINALIZE);
}
static VALUE
-run_single_final(VALUE final, VALUE objid)
+run_single_final(VALUE cmd, VALUE objid)
{
- const VALUE cmd = RARRAY_AREF(final, 1);
return rb_check_funcall(cmd, idCall, 1, &objid);
}
static void
+warn_exception_in_finalizer(rb_execution_context_t *ec, VALUE final)
+{
+ if (!UNDEF_P(final) && !NIL_P(ruby_verbose)) {
+ VALUE errinfo = ec->errinfo;
+ rb_warn("Exception in finalizer %+"PRIsVALUE, final);
+ rb_ec_error_print(ec, errinfo);
+ }
+}
+
+static void
run_finalizer(rb_objspace_t *objspace, VALUE obj, VALUE table)
{
long i;
enum ruby_tag_type state;
volatile struct {
- VALUE errinfo;
- VALUE objid;
- rb_control_frame_t *cfp;
- long finished;
+ VALUE errinfo;
+ VALUE objid;
+ VALUE final;
+ rb_control_frame_t *cfp;
+ VALUE *sp;
+ long finished;
} saved;
+
rb_execution_context_t * volatile ec = GET_EC();
#define RESTORE_FINALIZER() (\
- ec->cfp = saved.cfp, \
- rb_set_errinfo(saved.errinfo))
+ ec->cfp = saved.cfp, \
+ ec->cfp->sp = saved.sp, \
+ ec->errinfo = saved.errinfo)
- saved.errinfo = rb_errinfo();
+ saved.errinfo = ec->errinfo;
saved.objid = rb_obj_id(obj);
saved.cfp = ec->cfp;
+ saved.sp = ec->cfp->sp;
saved.finished = 0;
+ saved.final = Qundef;
EC_PUSH_TAG(ec);
state = EC_EXEC_TAG();
if (state != TAG_NONE) {
- ++saved.finished; /* skip failed finalizer */
+ ++saved.finished; /* skip failed finalizer */
+ warn_exception_in_finalizer(ec, ATOMIC_VALUE_EXCHANGE(saved.final, Qundef));
}
for (i = saved.finished;
- RESTORE_FINALIZER(), i<RARRAY_LEN(table);
- saved.finished = ++i) {
- run_single_final(RARRAY_AREF(table, i), saved.objid);
+ RESTORE_FINALIZER(), i<RARRAY_LEN(table);
+ saved.finished = ++i) {
+ run_single_final(saved.final = RARRAY_AREF(table, i), saved.objid);
}
EC_POP_TAG();
#undef RESTORE_FINALIZER
@@ -3354,12 +4396,12 @@ run_final(rb_objspace_t *objspace, VALUE zombie)
st_data_t key, table;
if (RZOMBIE(zombie)->dfree) {
- RZOMBIE(zombie)->dfree(RZOMBIE(zombie)->data);
+ RZOMBIE(zombie)->dfree(RZOMBIE(zombie)->data);
}
key = (st_data_t)zombie;
if (st_delete(finalizer_table, &key, &table)) {
- run_finalizer(objspace, zombie, (VALUE)table);
+ run_finalizer(objspace, zombie, (VALUE)table);
}
}
@@ -3373,40 +4415,54 @@ finalize_list(rb_objspace_t *objspace, VALUE zombie)
next_zombie = RZOMBIE(zombie)->next;
page = GET_HEAP_PAGE(zombie);
- run_final(objspace, zombie);
+ run_final(objspace, zombie);
- GC_ASSERT(BUILTIN_TYPE(zombie) == T_ZOMBIE);
- if (FL_TEST(zombie, FL_SEEN_OBJ_ID)) {
- obj_free_object_id(objspace, zombie);
- }
+ RB_VM_LOCK_ENTER();
+ {
+ GC_ASSERT(BUILTIN_TYPE(zombie) == T_ZOMBIE);
+ if (FL_TEST(zombie, FL_SEEN_OBJ_ID)) {
+ obj_free_object_id(objspace, zombie);
+ }
- RZOMBIE(zombie)->basic.flags = 0;
- if (LIKELY(heap_pages_final_slots)) heap_pages_final_slots--;
- page->final_slots--;
- page->free_slots++;
- heap_page_add_freeobj(objspace, GET_HEAP_PAGE(zombie), zombie);
+ GC_ASSERT(heap_pages_final_slots > 0);
+ GC_ASSERT(page->final_slots > 0);
- objspace->profile.total_freed_objects++;
+ heap_pages_final_slots--;
+ page->final_slots--;
+ page->free_slots++;
+ heap_page_add_freeobj(objspace, page, zombie);
+ objspace->profile.total_freed_objects++;
+ }
+ RB_VM_LOCK_LEAVE();
- zombie = next_zombie;
+ zombie = next_zombie;
}
}
static void
-finalize_deferred(rb_objspace_t *objspace)
+finalize_deferred_heap_pages(rb_objspace_t *objspace)
{
VALUE zombie;
-
while ((zombie = ATOMIC_VALUE_EXCHANGE(heap_pages_deferred_final, 0)) != 0) {
- finalize_list(objspace, zombie);
+ finalize_list(objspace, zombie);
}
}
static void
+finalize_deferred(rb_objspace_t *objspace)
+{
+ rb_execution_context_t *ec = GET_EC();
+ ec->interrupt_mask |= PENDING_INTERRUPT_MASK;
+ finalize_deferred_heap_pages(objspace);
+ ec->interrupt_mask &= ~PENDING_INTERRUPT_MASK;
+}
+
+static void
gc_finalize_deferred(void *dmy)
{
rb_objspace_t *objspace = dmy;
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
+
finalize_deferred(objspace);
ATOMIC_SET(finalizing, 0);
}
@@ -3415,7 +4471,7 @@ static void
gc_finalize_deferred_register(rb_objspace_t *objspace)
{
if (rb_postponed_job_register_one(0, gc_finalize_deferred, objspace) == 0) {
- rb_bug("gc_finalize_deferred_register: can't register finalizer.");
+ rb_bug("gc_finalize_deferred_register: can't register finalizer.");
}
}
@@ -3437,10 +4493,11 @@ force_chain_object(st_data_t key, st_data_t val, st_data_t arg)
return ST_CONTINUE;
}
+bool rb_obj_is_main_ractor(VALUE gv);
+
void
rb_objspace_call_finalizer(rb_objspace_t *objspace)
{
- RVALUE *p, *pend;
size_t i;
#if RGENGC_CHECK_MODE >= 2
@@ -3460,112 +4517,96 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
/* force to run finalizer */
while (finalizer_table->num_entries) {
- struct force_finalize_list *list = 0;
- st_foreach(finalizer_table, force_chain_object, (st_data_t)&list);
- while (list) {
- struct force_finalize_list *curr = list;
- st_data_t obj = (st_data_t)curr->obj;
- run_finalizer(objspace, curr->obj, curr->table);
- st_delete(finalizer_table, &obj, 0);
- list = curr->next;
- xfree(curr);
- }
+ struct force_finalize_list *list = 0;
+ st_foreach(finalizer_table, force_chain_object, (st_data_t)&list);
+ while (list) {
+ struct force_finalize_list *curr = list;
+ st_data_t obj = (st_data_t)curr->obj;
+ run_finalizer(objspace, curr->obj, curr->table);
+ st_delete(finalizer_table, &obj, 0);
+ list = curr->next;
+ xfree(curr);
+ }
}
/* prohibit GC because force T_DATA finalizers can break an object graph consistency */
- dont_gc = 1;
+ dont_gc_on();
/* running data/file finalizers are part of garbage collection */
- gc_enter(objspace, "rb_objspace_call_finalizer");
+ unsigned int lock_lev;
+ gc_enter(objspace, gc_enter_event_finalizer, &lock_lev);
/* run data/file object's finalizers */
for (i = 0; i < heap_allocated_pages; i++) {
- p = heap_pages_sorted[i]->start; pend = p + heap_pages_sorted[i]->total_slots;
- while (p < pend) {
- void *poisoned = asan_poisoned_object_p((VALUE)p);
- asan_unpoison_object((VALUE)p, false);
- switch (BUILTIN_TYPE(p)) {
- case T_DATA:
- if (!DATA_PTR(p) || !RANY(p)->as.data.dfree) break;
- if (rb_obj_is_thread((VALUE)p)) break;
- if (rb_obj_is_mutex((VALUE)p)) break;
- if (rb_obj_is_fiber((VALUE)p)) break;
- p->as.free.flags = 0;
- if (RTYPEDDATA_P(p)) {
- RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
- }
- if (RANY(p)->as.data.dfree == RUBY_DEFAULT_FREE) {
- xfree(DATA_PTR(p));
- }
- else if (RANY(p)->as.data.dfree) {
- make_zombie(objspace, (VALUE)p, RANY(p)->as.data.dfree, RANY(p)->as.data.data);
- }
- break;
- case T_FILE:
- if (RANY(p)->as.file.fptr) {
- make_io_zombie(objspace, (VALUE)p);
- }
- break;
- }
+ struct heap_page *page = heap_pages_sorted[i];
+ short stride = page->slot_size;
+
+ uintptr_t p = (uintptr_t)page->start;
+ uintptr_t pend = p + page->total_slots * stride;
+ for (; p < pend; p += stride) {
+ VALUE vp = (VALUE)p;
+ void *poisoned = asan_unpoison_object_temporary(vp);
+ switch (BUILTIN_TYPE(vp)) {
+ case T_DATA:
+ if (!DATA_PTR(p) || !RANY(p)->as.data.dfree) break;
+ if (rb_obj_is_thread(vp)) break;
+ if (rb_obj_is_mutex(vp)) break;
+ if (rb_obj_is_fiber(vp)) break;
+ if (rb_obj_is_main_ractor(vp)) break;
+ if (RTYPEDDATA_P(vp)) {
+ RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
+ }
+ RANY(p)->as.free.flags = 0;
+ if (RANY(p)->as.data.dfree == RUBY_DEFAULT_FREE) {
+ xfree(DATA_PTR(p));
+ }
+ else if (RANY(p)->as.data.dfree) {
+ make_zombie(objspace, vp, RANY(p)->as.data.dfree, RANY(p)->as.data.data);
+ }
+ break;
+ case T_FILE:
+ if (RANY(p)->as.file.fptr) {
+ make_io_zombie(objspace, vp);
+ }
+ break;
+ default:
+ break;
+ }
if (poisoned) {
- GC_ASSERT(BUILTIN_TYPE(p) == T_NONE);
- asan_poison_object((VALUE)p);
+ GC_ASSERT(BUILTIN_TYPE(vp) == T_NONE);
+ asan_poison_object(vp);
}
- p++;
- }
+ }
}
- gc_exit(objspace, "rb_objspace_call_finalizer");
+ gc_exit(objspace, gc_enter_event_finalizer, &lock_lev);
- if (heap_pages_deferred_final) {
- finalize_list(objspace, heap_pages_deferred_final);
- }
+ finalize_deferred_heap_pages(objspace);
st_free_table(finalizer_table);
finalizer_table = 0;
ATOMIC_SET(finalizing, 0);
}
-PUREFUNC(static inline int is_id_value(rb_objspace_t *objspace, VALUE ptr));
static inline int
-is_id_value(rb_objspace_t *objspace, VALUE ptr)
-{
- if (!is_pointer_to_heap(objspace, (void *)ptr)) return FALSE;
- if (BUILTIN_TYPE(ptr) > T_FIXNUM) return FALSE;
- if (BUILTIN_TYPE(ptr) == T_ICLASS) return FALSE;
- return TRUE;
-}
-
-static inline int
-heap_is_swept_object(rb_objspace_t *objspace, rb_heap_t *heap, VALUE ptr)
+is_swept_object(rb_objspace_t *objspace, VALUE ptr)
{
struct heap_page *page = GET_HEAP_PAGE(ptr);
return page->flags.before_sweep ? FALSE : TRUE;
}
-static inline int
-is_swept_object(rb_objspace_t *objspace, VALUE ptr)
-{
- if (heap_is_swept_object(objspace, heap_eden, ptr)) {
- return TRUE;
- }
- else {
- return FALSE;
- }
-}
-
/* garbage objects will be collected soon. */
static inline int
is_garbage_object(rb_objspace_t *objspace, VALUE ptr)
{
- if (!is_lazy_sweeping(heap_eden) ||
- is_swept_object(objspace, ptr) ||
- MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr)) {
+ if (!is_lazy_sweeping(objspace) ||
+ is_swept_object(objspace, ptr) ||
+ MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr)) {
- return FALSE;
+ return FALSE;
}
else {
- return TRUE;
+ return TRUE;
}
}
@@ -3574,15 +4615,18 @@ is_live_object(rb_objspace_t *objspace, VALUE ptr)
{
switch (BUILTIN_TYPE(ptr)) {
case T_NONE:
+ case T_MOVED:
case T_ZOMBIE:
- return FALSE;
+ return FALSE;
+ default:
+ break;
}
if (!is_garbage_object(objspace, ptr)) {
- return TRUE;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -3631,6 +4675,8 @@ id2ref_obj_tbl(rb_objspace_t *objspace, VALUE objid)
* r = ObjectSpace._id2ref(s.object_id) #=> "I am a string"
* r == s #=> true
*
+ * On multi-ractor mode, if the object is not shareable, it raises
+ * RangeError.
*/
static VALUE
@@ -3646,11 +4692,12 @@ id2ref(VALUE objid)
VALUE orig;
void *p0;
+ objid = rb_to_int(objid);
if (FIXNUM_P(objid) || rb_big_size(objid) <= SIZEOF_VOIDP) {
ptr = NUM2PTR(objid);
if (ptr == Qtrue) return Qtrue;
if (ptr == Qfalse) return Qfalse;
- if (ptr == Qnil) return Qnil;
+ if (NIL_P(ptr)) return Qnil;
if (FIXNUM_P(ptr)) return (VALUE)ptr;
if (FLONUM_P(ptr)) return (VALUE)ptr;
@@ -3658,24 +4705,32 @@ id2ref(VALUE objid)
if ((ptr % sizeof(RVALUE)) == (4 << 2)) {
ID symid = ptr / sizeof(RVALUE);
p0 = (void *)ptr;
- if (rb_id2str(symid) == 0)
+ if (!rb_static_id_valid_p(symid))
rb_raise(rb_eRangeError, "%p is not symbol id value", p0);
return ID2SYM(symid);
}
}
- if ((orig = id2ref_obj_tbl(objspace, objid)) != Qundef &&
+ if (!UNDEF_P(orig = id2ref_obj_tbl(objspace, objid)) &&
is_live_object(objspace, orig)) {
- return orig;
+
+ if (!rb_multi_ractor_p() || rb_ractor_shareable_p(orig)) {
+ return orig;
+ }
+ else {
+ rb_raise(rb_eRangeError, "%+"PRIsVALUE" is id of the unshareable object on multi-ractor", rb_int2str(objid, 10));
+ }
}
if (rb_int_ge(objid, objspace->next_object_id)) {
rb_raise(rb_eRangeError, "%+"PRIsVALUE" is not id value", rb_int2str(objid, 10));
- } else {
+ }
+ else {
rb_raise(rb_eRangeError, "%+"PRIsVALUE" is recycled object", rb_int2str(objid, 10));
}
}
+/* :nodoc: */
static VALUE
os_id2ref(VALUE os, VALUE objid)
{
@@ -3708,9 +4763,9 @@ cached_object_id(VALUE obj)
VALUE id;
rb_objspace_t *objspace = &rb_objspace;
+ RB_VM_LOCK_ENTER();
if (st_lookup(objspace->obj_to_id_tbl, (st_data_t)obj, &id)) {
GC_ASSERT(FL_TEST(obj, FL_SEEN_OBJ_ID));
- return id;
}
else {
GC_ASSERT(!FL_TEST(obj, FL_SEEN_OBJ_ID));
@@ -3718,12 +4773,15 @@ cached_object_id(VALUE obj)
id = objspace->next_object_id;
objspace->next_object_id = rb_int_plus(id, INT2FIX(OBJ_ID_INCREMENT));
+ VALUE already_disabled = rb_gc_disable_no_rest();
st_insert(objspace->obj_to_id_tbl, (st_data_t)obj, (st_data_t)id);
st_insert(objspace->id_to_obj_tbl, (st_data_t)id, (st_data_t)obj);
+ if (already_disabled == Qfalse) rb_objspace_gc_enable(objspace);
FL_SET(obj, FL_SEEN_OBJ_ID);
-
- return id;
}
+ RB_VM_LOCK_LEAVE();
+
+ return id;
}
static VALUE
@@ -3801,7 +4859,23 @@ rb_obj_id(VALUE obj)
return rb_find_object_id(obj, cached_object_id);
}
-#include "regint.h"
+static enum rb_id_table_iterator_result
+cc_table_memsize_i(VALUE ccs_ptr, void *data_ptr)
+{
+ size_t *total_size = data_ptr;
+ struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
+ *total_size += sizeof(*ccs);
+ *total_size += sizeof(ccs->entries[0]) * ccs->capa;
+ return ID_TABLE_CONTINUE;
+}
+
+static size_t
+cc_table_memsize(struct rb_id_table *cc_table)
+{
+ size_t total = rb_id_table_memsize(cc_table);
+ rb_id_table_foreach_values(cc_table, cc_table_memsize_i, &total);
+ return total;
+}
static size_t
obj_memsize_of(VALUE obj, int use_all_types)
@@ -3809,125 +4883,134 @@ obj_memsize_of(VALUE obj, int use_all_types)
size_t size = 0;
if (SPECIAL_CONST_P(obj)) {
- return 0;
+ return 0;
}
if (FL_TEST(obj, FL_EXIVAR)) {
- size += rb_generic_ivar_memsize(obj);
+ size += rb_generic_ivar_memsize(obj);
}
switch (BUILTIN_TYPE(obj)) {
case T_OBJECT:
- if (!(RBASIC(obj)->flags & ROBJECT_EMBED) &&
- ROBJECT(obj)->as.heap.ivptr) {
- size += ROBJECT(obj)->as.heap.numiv * sizeof(VALUE);
- }
- break;
+ if (rb_shape_obj_too_complex(obj)) {
+ size += rb_st_memsize(ROBJECT_IV_HASH(obj));
+ }
+ else if (!(RBASIC(obj)->flags & ROBJECT_EMBED)) {
+ size += ROBJECT_IV_CAPACITY(obj) * sizeof(VALUE);
+ }
+ break;
case T_MODULE:
case T_CLASS:
- if (RCLASS_EXT(obj)) {
+ if (RCLASS_EXT(obj)) {
if (RCLASS_M_TBL(obj)) {
size += rb_id_table_memsize(RCLASS_M_TBL(obj));
}
- if (RCLASS_IV_TBL(obj)) {
- size += st_memsize(RCLASS_IV_TBL(obj));
- }
- if (RCLASS_IV_INDEX_TBL(obj)) {
- size += st_memsize(RCLASS_IV_INDEX_TBL(obj));
- }
- if (RCLASS(obj)->ptr->iv_tbl) {
- size += st_memsize(RCLASS(obj)->ptr->iv_tbl);
- }
- if (RCLASS(obj)->ptr->const_tbl) {
- size += rb_id_table_memsize(RCLASS(obj)->ptr->const_tbl);
- }
- size += sizeof(rb_classext_t);
- }
- break;
+ // class IV sizes are allocated as powers of two
+ size += SIZEOF_VALUE << bit_length(RCLASS_IV_COUNT(obj));
+ if (RCLASS_CVC_TBL(obj)) {
+ size += rb_id_table_memsize(RCLASS_CVC_TBL(obj));
+ }
+ if (RCLASS_EXT(obj)->const_tbl) {
+ size += rb_id_table_memsize(RCLASS_EXT(obj)->const_tbl);
+ }
+ if (RCLASS_CC_TBL(obj)) {
+ size += cc_table_memsize(RCLASS_CC_TBL(obj));
+ }
+ if (FL_TEST_RAW(obj, RCLASS_SUPERCLASSES_INCLUDE_SELF)) {
+ size += (RCLASS_SUPERCLASS_DEPTH(obj) + 1) * sizeof(VALUE);
+ }
+#if SIZE_POOL_COUNT == 1
+ size += sizeof(rb_classext_t);
+#endif
+ }
+ break;
case T_ICLASS:
- if (FL_TEST(obj, RICLASS_IS_ORIGIN)) {
- if (RCLASS_M_TBL(obj)) {
- size += rb_id_table_memsize(RCLASS_M_TBL(obj));
- }
- }
- break;
+ if (RICLASS_OWNS_M_TBL_P(obj)) {
+ if (RCLASS_M_TBL(obj)) {
+ size += rb_id_table_memsize(RCLASS_M_TBL(obj));
+ }
+ }
+ if (RCLASS_EXT(obj) && RCLASS_CC_TBL(obj)) {
+ size += cc_table_memsize(RCLASS_CC_TBL(obj));
+ }
+ break;
case T_STRING:
- size += rb_str_memsize(obj);
- break;
+ size += rb_str_memsize(obj);
+ break;
case T_ARRAY:
- size += rb_ary_memsize(obj);
- break;
+ size += rb_ary_memsize(obj);
+ break;
case T_HASH:
if (RHASH_AR_TABLE_P(obj)) {
if (RHASH_AR_TABLE(obj) != NULL) {
- size_t rb_hash_ar_table_size();
+ size_t rb_hash_ar_table_size(void);
size += rb_hash_ar_table_size();
}
- }
+ }
else {
VM_ASSERT(RHASH_ST_TABLE(obj) != NULL);
size += st_memsize(RHASH_ST_TABLE(obj));
}
- break;
+ break;
case T_REGEXP:
- if (RREGEXP_PTR(obj)) {
- size += onig_memsize(RREGEXP_PTR(obj));
- }
- break;
+ if (RREGEXP_PTR(obj)) {
+ size += onig_memsize(RREGEXP_PTR(obj));
+ }
+ break;
case T_DATA:
- if (use_all_types) size += rb_objspace_data_type_memsize(obj);
- break;
+ if (use_all_types) size += rb_objspace_data_type_memsize(obj);
+ break;
case T_MATCH:
- if (RMATCH(obj)->rmatch) {
+ if (RMATCH(obj)->rmatch) {
struct rmatch *rm = RMATCH(obj)->rmatch;
- size += onig_region_memsize(&rm->regs);
- size += sizeof(struct rmatch_offset) * rm->char_offset_num_allocated;
- size += sizeof(struct rmatch);
- }
- break;
+ size += onig_region_memsize(&rm->regs);
+ size += sizeof(struct rmatch_offset) * rm->char_offset_num_allocated;
+ size += sizeof(struct rmatch);
+ }
+ break;
case T_FILE:
- if (RFILE(obj)->fptr) {
- size += rb_io_memsize(RFILE(obj)->fptr);
- }
- break;
+ if (RFILE(obj)->fptr) {
+ size += rb_io_memsize(RFILE(obj)->fptr);
+ }
+ break;
case T_RATIONAL:
case T_COMPLEX:
break;
case T_IMEMO:
size += imemo_memsize(obj);
- break;
+ break;
case T_FLOAT:
case T_SYMBOL:
- break;
+ break;
case T_BIGNUM:
- if (!(RBASIC(obj)->flags & BIGNUM_EMBED_FLAG) && BIGNUM_DIGITS(obj)) {
- size += BIGNUM_LEN(obj) * sizeof(BDIGIT);
- }
- break;
+ if (!(RBASIC(obj)->flags & BIGNUM_EMBED_FLAG) && BIGNUM_DIGITS(obj)) {
+ size += BIGNUM_LEN(obj) * sizeof(BDIGIT);
+ }
+ break;
case T_NODE:
- UNEXPECTED_NODE(obj_memsize_of);
- break;
+ UNEXPECTED_NODE(obj_memsize_of);
+ break;
case T_STRUCT:
- if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) == 0 &&
- RSTRUCT(obj)->as.heap.ptr) {
- size += sizeof(VALUE) * RSTRUCT_LEN(obj);
- }
- break;
+ if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) == 0 &&
+ RSTRUCT(obj)->as.heap.ptr) {
+ size += sizeof(VALUE) * RSTRUCT_LEN(obj);
+ }
+ break;
case T_ZOMBIE:
case T_MOVED:
- break;
+ break;
default:
- rb_bug("objspace/memsize_of(): unknown data type 0x%x(%p)",
- BUILTIN_TYPE(obj), (void*)obj);
+ rb_bug("objspace/memsize_of(): unknown data type 0x%x(%p)",
+ BUILTIN_TYPE(obj), (void*)obj);
}
- return size + sizeof(RVALUE);
+ return size + rb_gc_obj_slot_size(obj);
}
size_t
@@ -3978,7 +5061,7 @@ type_sym(size_t type)
COUNT_TYPE(T_ZOMBIE);
COUNT_TYPE(T_MOVED);
#undef COUNT_TYPE
- default: return INT2NUM(type); break;
+ default: return SIZET2NUM(type); break;
}
}
@@ -4038,28 +5121,31 @@ count_objects(int argc, VALUE *argv, VALUE os)
}
for (i = 0; i < heap_allocated_pages; i++) {
- struct heap_page *page = heap_pages_sorted[i];
- RVALUE *p, *pend;
-
- p = page->start; pend = p + page->total_slots;
- for (;p < pend; p++) {
- void *poisoned = asan_poisoned_object_p((VALUE)p);
- asan_unpoison_object((VALUE)p, false);
- if (p->as.basic.flags) {
- counts[BUILTIN_TYPE(p)]++;
- }
- else {
- freed++;
- }
+ struct heap_page *page = heap_pages_sorted[i];
+ short stride = page->slot_size;
+
+ uintptr_t p = (uintptr_t)page->start;
+ uintptr_t pend = p + page->total_slots * stride;
+ for (;p < pend; p += stride) {
+ VALUE vp = (VALUE)p;
+ GC_ASSERT((NUM_IN_PAGE(vp) * BASE_SLOT_SIZE) % page->slot_size == 0);
+
+ void *poisoned = asan_unpoison_object_temporary(vp);
+ if (RANY(p)->as.basic.flags) {
+ counts[BUILTIN_TYPE(vp)]++;
+ }
+ else {
+ freed++;
+ }
if (poisoned) {
- GC_ASSERT(BUILTIN_TYPE((VALUE)p) == T_NONE);
- asan_poison_object((VALUE)p);
+ GC_ASSERT(BUILTIN_TYPE(vp) == T_NONE);
+ asan_poison_object(vp);
}
- }
- total += page->total_slots;
+ }
+ total += page->total_slots;
}
- if (hash == Qnil) {
+ if (NIL_P(hash)) {
hash = rb_hash_new();
}
else if (!RHASH_EMPTY_P(hash)) {
@@ -4086,7 +5172,13 @@ count_objects(int argc, VALUE *argv, VALUE os)
static size_t
objspace_available_slots(rb_objspace_t *objspace)
{
- return heap_eden->total_slots + heap_tomb->total_slots;
+ size_t total_slots = 0;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ total_slots += SIZE_POOL_EDEN_HEAP(size_pool)->total_slots;
+ total_slots += SIZE_POOL_TOMB_HEAP(size_pool)->total_slots;
+ }
+ return total_slots;
}
static size_t
@@ -4104,122 +5196,551 @@ objspace_free_slots(rb_objspace_t *objspace)
static void
gc_setup_mark_bits(struct heap_page *page)
{
-#if USE_RGENGC
/* copy oldgen bitmap to mark bitmap */
memcpy(&page->mark_bits[0], &page->uncollectible_bits[0], HEAP_PAGE_BITMAP_SIZE);
+}
+
+static int gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj);
+static VALUE gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, size_t src_slot_size, size_t slot_size);
+
+#if defined(_WIN32)
+enum {HEAP_PAGE_LOCK = PAGE_NOACCESS, HEAP_PAGE_UNLOCK = PAGE_READWRITE};
+
+static BOOL
+protect_page_body(struct heap_page_body *body, DWORD protect)
+{
+ DWORD old_protect;
+ return VirtualProtect(body, HEAP_PAGE_SIZE, protect, &old_protect) != 0;
+}
#else
- /* clear mark bitmap */
- memset(&page->mark_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
+enum {HEAP_PAGE_LOCK = PROT_NONE, HEAP_PAGE_UNLOCK = PROT_READ | PROT_WRITE};
+#define protect_page_body(body, protect) !mprotect((body), HEAP_PAGE_SIZE, (protect))
#endif
+
+static void
+lock_page_body(rb_objspace_t *objspace, struct heap_page_body *body)
+{
+ if (!protect_page_body(body, HEAP_PAGE_LOCK)) {
+ rb_bug("Couldn't protect page %p, errno: %s", (void *)body, strerror(errno));
+ }
+ else {
+ gc_report(5, objspace, "Protecting page in move %p\n", (void *)body);
+ }
}
-static inline int
-gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page)
+static void
+unlock_page_body(rb_objspace_t *objspace, struct heap_page_body *body)
{
- int i;
- int empty_slots = 0, freed_slots = 0, final_slots = 0;
- RVALUE *p, *pend,*offset;
+ if (!protect_page_body(body, HEAP_PAGE_UNLOCK)) {
+ rb_bug("Couldn't unprotect page %p, errno: %s", (void *)body, strerror(errno));
+ }
+ else {
+ gc_report(5, objspace, "Unprotecting page in move %p\n", (void *)body);
+ }
+}
+
+static bool
+try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *free_page, VALUE src)
+{
+ GC_ASSERT(gc_is_moveable_obj(objspace, src));
+
+ struct heap_page *src_page = GET_HEAP_PAGE(src);
+ if (!free_page) {
+ return false;
+ }
+
+ /* We should return true if either src is successfully moved, or src is
+ * unmoveable. A false return will cause the sweeping cursor to be
+ * incremented to the next page, and src will attempt to move again */
+ GC_ASSERT(MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(src), src));
+
+ asan_unlock_freelist(free_page);
+ VALUE dest = (VALUE)free_page->freelist;
+ asan_lock_freelist(free_page);
+ asan_unpoison_object(dest, false);
+ if (!dest) {
+ /* if we can't get something from the freelist then the page must be
+ * full */
+ return false;
+ }
+ free_page->freelist = RANY(dest)->as.free.next;
+
+ GC_ASSERT(RB_BUILTIN_TYPE(dest) == T_NONE);
+
+ if (src_page->slot_size > free_page->slot_size) {
+ objspace->rcompactor.moved_down_count_table[BUILTIN_TYPE(src)]++;
+ }
+ else if (free_page->slot_size > src_page->slot_size) {
+ objspace->rcompactor.moved_up_count_table[BUILTIN_TYPE(src)]++;
+ }
+ objspace->rcompactor.moved_count_table[BUILTIN_TYPE(src)]++;
+ objspace->rcompactor.total_moved++;
+
+ gc_move(objspace, src, dest, src_page->slot_size, free_page->slot_size);
+ gc_pin(objspace, src);
+ free_page->free_slots--;
+
+ return true;
+}
+
+static void
+gc_unprotect_pages(rb_objspace_t *objspace, rb_heap_t *heap)
+{
+ struct heap_page *cursor = heap->compact_cursor;
+
+ while (cursor) {
+ unlock_page_body(objspace, GET_PAGE_BODY(cursor->start));
+ cursor = ccan_list_next(&heap->pages, cursor, page_node);
+ }
+}
+
+static void gc_update_references(rb_objspace_t * objspace);
+static void invalidate_moved_page(rb_objspace_t *objspace, struct heap_page *page);
+
+#ifndef GC_CAN_COMPILE_COMPACTION
+#if defined(__wasi__) /* WebAssembly doesn't support signals */
+# define GC_CAN_COMPILE_COMPACTION 0
+#else
+# define GC_CAN_COMPILE_COMPACTION 1
+#endif
+#endif
+
+#if defined(__MINGW32__) || defined(_WIN32)
+# define GC_COMPACTION_SUPPORTED 1
+#else
+/* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
+ * the read barrier, so we must disable compaction. */
+# define GC_COMPACTION_SUPPORTED (GC_CAN_COMPILE_COMPACTION && HEAP_PAGE_ALLOC_USE_MMAP)
+#endif
+
+#if GC_CAN_COMPILE_COMPACTION
+static void
+read_barrier_handler(uintptr_t original_address)
+{
+ VALUE obj;
+ rb_objspace_t * objspace = &rb_objspace;
+
+ /* Calculate address aligned to slots. */
+ uintptr_t address = original_address - (original_address % BASE_SLOT_SIZE);
+
+ obj = (VALUE)address;
+
+ struct heap_page_body *page_body = GET_PAGE_BODY(obj);
+
+ /* If the page_body is NULL, then mprotect cannot handle it and will crash
+ * with "Cannot allocate memory". */
+ if (page_body == NULL) {
+ rb_bug("read_barrier_handler: segmentation fault at %p", (void *)original_address);
+ }
+
+ RB_VM_LOCK_ENTER();
+ {
+ unlock_page_body(objspace, page_body);
+
+ objspace->profile.read_barrier_faults++;
+
+ invalidate_moved_page(objspace, GET_HEAP_PAGE(obj));
+ }
+ RB_VM_LOCK_LEAVE();
+}
+#endif
+
+#if !GC_CAN_COMPILE_COMPACTION
+static void
+uninstall_handlers(void)
+{
+ /* no-op */
+}
+
+static void
+install_handlers(void)
+{
+ /* no-op */
+}
+#elif defined(_WIN32)
+static LPTOP_LEVEL_EXCEPTION_FILTER old_handler;
+typedef void (*signal_handler)(int);
+static signal_handler old_sigsegv_handler;
+
+static LONG WINAPI
+read_barrier_signal(EXCEPTION_POINTERS * info)
+{
+ /* EXCEPTION_ACCESS_VIOLATION is what's raised by access to protected pages */
+ if (info->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
+ /* > The second array element specifies the virtual address of the inaccessible data.
+ * https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-exception_record
+ *
+ * Use this address to invalidate the page */
+ read_barrier_handler((uintptr_t)info->ExceptionRecord->ExceptionInformation[1]);
+ return EXCEPTION_CONTINUE_EXECUTION;
+ }
+ else {
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+}
+
+static void
+uninstall_handlers(void)
+{
+ signal(SIGSEGV, old_sigsegv_handler);
+ SetUnhandledExceptionFilter(old_handler);
+}
+
+static void
+install_handlers(void)
+{
+ /* Remove SEGV handler so that the Unhandled Exception Filter handles it */
+ old_sigsegv_handler = signal(SIGSEGV, NULL);
+ /* Unhandled Exception Filter has access to the violation address similar
+ * to si_addr from sigaction */
+ old_handler = SetUnhandledExceptionFilter(read_barrier_signal);
+}
+#else
+static struct sigaction old_sigbus_handler;
+static struct sigaction old_sigsegv_handler;
+
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+static exception_mask_t old_exception_masks[32];
+static mach_port_t old_exception_ports[32];
+static exception_behavior_t old_exception_behaviors[32];
+static thread_state_flavor_t old_exception_flavors[32];
+static mach_msg_type_number_t old_exception_count;
+
+static void
+disable_mach_bad_access_exc(void)
+{
+ old_exception_count = sizeof(old_exception_masks) / sizeof(old_exception_masks[0]);
+ task_swap_exception_ports(
+ mach_task_self(), EXC_MASK_BAD_ACCESS,
+ MACH_PORT_NULL, EXCEPTION_DEFAULT, 0,
+ old_exception_masks, &old_exception_count,
+ old_exception_ports, old_exception_behaviors, old_exception_flavors
+ );
+}
+
+static void
+restore_mach_bad_access_exc(void)
+{
+ for (mach_msg_type_number_t i = 0; i < old_exception_count; i++) {
+ task_set_exception_ports(
+ mach_task_self(),
+ old_exception_masks[i], old_exception_ports[i],
+ old_exception_behaviors[i], old_exception_flavors[i]
+ );
+ }
+}
+#endif
+
+static void
+read_barrier_signal(int sig, siginfo_t * info, void * data)
+{
+ // setup SEGV/BUS handlers for errors
+ struct sigaction prev_sigbus, prev_sigsegv;
+ sigaction(SIGBUS, &old_sigbus_handler, &prev_sigbus);
+ sigaction(SIGSEGV, &old_sigsegv_handler, &prev_sigsegv);
+
+ // enable SIGBUS/SEGV
+ sigset_t set, prev_set;
+ sigemptyset(&set);
+ sigaddset(&set, SIGBUS);
+ sigaddset(&set, SIGSEGV);
+ sigprocmask(SIG_UNBLOCK, &set, &prev_set);
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+ disable_mach_bad_access_exc();
+#endif
+ // run handler
+ read_barrier_handler((uintptr_t)info->si_addr);
+
+ // reset SEGV/BUS handlers
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+ restore_mach_bad_access_exc();
+#endif
+ sigaction(SIGBUS, &prev_sigbus, NULL);
+ sigaction(SIGSEGV, &prev_sigsegv, NULL);
+ sigprocmask(SIG_SETMASK, &prev_set, NULL);
+}
+
+static void
+uninstall_handlers(void)
+{
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+ restore_mach_bad_access_exc();
+#endif
+ sigaction(SIGBUS, &old_sigbus_handler, NULL);
+ sigaction(SIGSEGV, &old_sigsegv_handler, NULL);
+}
+
+static void
+install_handlers(void)
+{
+ struct sigaction action;
+ memset(&action, 0, sizeof(struct sigaction));
+ sigemptyset(&action.sa_mask);
+ action.sa_sigaction = read_barrier_signal;
+ action.sa_flags = SA_SIGINFO | SA_ONSTACK;
+
+ sigaction(SIGBUS, &action, &old_sigbus_handler);
+ sigaction(SIGSEGV, &action, &old_sigsegv_handler);
+#ifdef HAVE_MACH_TASK_EXCEPTION_PORTS
+ disable_mach_bad_access_exc();
+#endif
+}
+#endif
+
+static void
+revert_stack_objects(VALUE stack_obj, void *ctx)
+{
+ rb_objspace_t * objspace = (rb_objspace_t*)ctx;
+
+ if (BUILTIN_TYPE(stack_obj) == T_MOVED) {
+ /* For now we'll revert the whole page if the object made it to the
+ * stack. I think we can change this to move just the one object
+ * back though */
+ invalidate_moved_page(objspace, GET_HEAP_PAGE(stack_obj));
+ }
+}
+
+static void
+revert_machine_stack_references(rb_objspace_t *objspace, VALUE v)
+{
+ if (is_pointer_to_heap(objspace, (void *)v)) {
+ if (BUILTIN_TYPE(v) == T_MOVED) {
+ /* For now we'll revert the whole page if the object made it to the
+ * stack. I think we can change this to move just the one object
+ * back though */
+ invalidate_moved_page(objspace, GET_HEAP_PAGE(v));
+ }
+ }
+}
+
+static void each_machine_stack_value(const rb_execution_context_t *ec, void (*cb)(rb_objspace_t *, VALUE));
+
+static void
+check_stack_for_moved(rb_objspace_t *objspace)
+{
+ rb_execution_context_t *ec = GET_EC();
+ rb_vm_t *vm = rb_ec_vm_ptr(ec);
+ rb_vm_each_stack_value(vm, revert_stack_objects, (void*)objspace);
+ each_machine_stack_value(ec, revert_machine_stack_references);
+}
+
+static void gc_mode_transition(rb_objspace_t *objspace, enum gc_mode mode);
+
+static void
+gc_compact_finish(rb_objspace_t *objspace)
+{
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ gc_unprotect_pages(objspace, heap);
+ }
+
+ uninstall_handlers();
+
+ /* The mutator is allowed to run during incremental sweeping. T_MOVED
+ * objects can get pushed on the stack and when the compaction process
+ * finishes up, it may remove the read barrier before anything has a
+ * chance to read from the T_MOVED address. To fix this, we scan the stack
+ * then revert any moved objects that made it to the stack. */
+ check_stack_for_moved(objspace);
+
+ gc_update_references(objspace);
+ objspace->profile.compact_count++;
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ heap->compact_cursor = NULL;
+ heap->free_pages = NULL;
+ heap->compact_cursor_index = 0;
+ }
+
+ if (gc_prof_enabled(objspace)) {
+ gc_profile_record *record = gc_prof_record(objspace);
+ record->moved_objects = objspace->rcompactor.total_moved - record->moved_objects;
+ }
+ objspace->flags.during_compacting = FALSE;
+}
+
+struct gc_sweep_context {
+ struct heap_page *page;
+ int final_slots;
+ int freed_slots;
+ int empty_slots;
+};
+
+static inline void
+gc_sweep_plane(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bitset, struct gc_sweep_context *ctx)
+{
+ struct heap_page * sweep_page = ctx->page;
+ short slot_size = sweep_page->slot_size;
+ short slot_bits = slot_size / BASE_SLOT_SIZE;
+ GC_ASSERT(slot_bits > 0);
+
+ do {
+ VALUE vp = (VALUE)p;
+ GC_ASSERT(vp % BASE_SLOT_SIZE == 0);
+
+ asan_unpoison_object(vp, false);
+ if (bitset & 1) {
+ switch (BUILTIN_TYPE(vp)) {
+ default: /* majority case */
+ gc_report(2, objspace, "page_sweep: free %p\n", (void *)p);
+#if RGENGC_CHECK_MODE
+ if (!is_full_marking(objspace)) {
+ if (RVALUE_OLD_P(vp)) rb_bug("page_sweep: %p - old while minor GC.", (void *)p);
+ if (rgengc_remembered_sweep(objspace, vp)) rb_bug("page_sweep: %p - remembered.", (void *)p);
+ }
+#endif
+ if (obj_free(objspace, vp)) {
+ // always add free slots back to the swept pages freelist,
+ // so that if we're comapacting, we can re-use the slots
+ (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, BASE_SLOT_SIZE);
+ heap_page_add_freeobj(objspace, sweep_page, vp);
+ gc_report(3, objspace, "page_sweep: %s is added to freelist\n", obj_info(vp));
+ ctx->freed_slots++;
+ }
+ else {
+ ctx->final_slots++;
+ }
+ break;
+
+ case T_MOVED:
+ if (objspace->flags.during_compacting) {
+ /* The sweep cursor shouldn't have made it to any
+ * T_MOVED slots while the compact flag is enabled.
+ * The sweep cursor and compact cursor move in
+ * opposite directions, and when they meet references will
+ * get updated and "during_compacting" should get disabled */
+ rb_bug("T_MOVED shouldn't be seen until compaction is finished\n");
+ }
+ gc_report(3, objspace, "page_sweep: %s is added to freelist\n", obj_info(vp));
+ ctx->empty_slots++;
+ heap_page_add_freeobj(objspace, sweep_page, vp);
+ break;
+ case T_ZOMBIE:
+ /* already counted */
+ break;
+ case T_NONE:
+ ctx->empty_slots++; /* already freed */
+ break;
+ }
+ }
+ p += slot_size;
+ bitset >>= slot_bits;
+ } while (bitset);
+}
+
+static inline void
+gc_sweep_page(rb_objspace_t *objspace, rb_heap_t *heap, struct gc_sweep_context *ctx)
+{
+ struct heap_page *sweep_page = ctx->page;
+ GC_ASSERT(SIZE_POOL_EDEN_HEAP(sweep_page->size_pool) == heap);
+
+ uintptr_t p;
bits_t *bits, bitset;
gc_report(2, objspace, "page_sweep: start.\n");
+#if RGENGC_CHECK_MODE
+ if (!objspace->flags.immediate_sweep) {
+ GC_ASSERT(sweep_page->flags.before_sweep == TRUE);
+ }
+#endif
sweep_page->flags.before_sweep = FALSE;
+ sweep_page->free_slots = 0;
- p = sweep_page->start; pend = p + sweep_page->total_slots;
- offset = p - NUM_IN_PAGE(p);
+ p = (uintptr_t)sweep_page->start;
bits = sweep_page->mark_bits;
- /* create guard : fill 1 out-of-range */
- bits[BITMAP_INDEX(p)] |= BITMAP_BIT(p)-1;
- bits[BITMAP_INDEX(pend)] |= ~(BITMAP_BIT(pend) - 1);
+ int page_rvalue_count = sweep_page->total_slots * (sweep_page->slot_size / BASE_SLOT_SIZE);
+ int out_of_range_bits = (NUM_IN_PAGE(p) + page_rvalue_count) % BITS_BITLENGTH;
+ if (out_of_range_bits != 0) { // sizeof(RVALUE) == 64
+ bits[BITMAP_INDEX(p) + page_rvalue_count / BITS_BITLENGTH] |= ~(((bits_t)1 << out_of_range_bits) - 1);
+ }
+
+ /* The last bitmap plane may not be used if the last plane does not
+ * have enough space for the slot_size. In that case, the last plane must
+ * be skipped since none of the bits will be set. */
+ int bitmap_plane_count = CEILDIV(NUM_IN_PAGE(p) + page_rvalue_count, BITS_BITLENGTH);
+ GC_ASSERT(bitmap_plane_count == HEAP_PAGE_BITMAP_LIMIT - 1 ||
+ bitmap_plane_count == HEAP_PAGE_BITMAP_LIMIT);
- for (i=0; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
- bitset = ~bits[i];
- if (bitset) {
- p = offset + i * BITS_BITLENGTH;
- do {
- asan_unpoison_object((VALUE)p, false);
- if (bitset & 1) {
- switch (BUILTIN_TYPE(p)) {
- default: { /* majority case */
- gc_report(2, objspace, "page_sweep: free %p\n", (void *)p);
-#if USE_RGENGC && RGENGC_CHECK_MODE
- if (!is_full_marking(objspace)) {
- if (RVALUE_OLD_P((VALUE)p)) rb_bug("page_sweep: %p - old while minor GC.", (void *)p);
- if (rgengc_remembered_sweep(objspace, (VALUE)p)) rb_bug("page_sweep: %p - remembered.", (void *)p);
- }
-#endif
- if (obj_free(objspace, (VALUE)p)) {
- final_slots++;
- }
- else {
- (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, sizeof(RVALUE));
- heap_page_add_freeobj(objspace, sweep_page, (VALUE)p);
- gc_report(3, objspace, "page_sweep: %s is added to freelist\n", obj_info((VALUE)p));
- freed_slots++;
- asan_poison_object((VALUE)p);
- }
- break;
- }
-
- /* minor cases */
- case T_ZOMBIE:
- /* already counted */
- break;
- case T_NONE:
- empty_slots++; /* already freed */
- break;
- }
- }
- p++;
- bitset >>= 1;
- } while (bitset);
- }
- }
-
- gc_setup_mark_bits(sweep_page);
+ // Skip out of range slots at the head of the page
+ bitset = ~bits[0];
+ bitset >>= NUM_IN_PAGE(p);
+ if (bitset) {
+ gc_sweep_plane(objspace, heap, p, bitset, ctx);
+ }
+ p += (BITS_BITLENGTH - NUM_IN_PAGE(p)) * BASE_SLOT_SIZE;
+
+ for (int i = 1; i < bitmap_plane_count; i++) {
+ bitset = ~bits[i];
+ if (bitset) {
+ gc_sweep_plane(objspace, heap, p, bitset, ctx);
+ }
+ p += BITS_BITLENGTH * BASE_SLOT_SIZE;
+ }
+
+ if (!heap->compact_cursor) {
+ gc_setup_mark_bits(sweep_page);
+ }
#if GC_PROFILE_MORE_DETAIL
if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->removing_objects += final_slots + freed_slots;
- record->empty_objects += empty_slots;
+ gc_profile_record *record = gc_prof_record(objspace);
+ record->removing_objects += ctx->final_slots + ctx->freed_slots;
+ record->empty_objects += ctx->empty_slots;
}
#endif
- if (0) fprintf(stderr, "gc_page_sweep(%d): total_slots: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n",
- (int)rb_gc_count(),
- (int)sweep_page->total_slots,
- freed_slots, empty_slots, final_slots);
+ if (0) fprintf(stderr, "gc_sweep_page(%"PRIdSIZE"): total_slots: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n",
+ rb_gc_count(),
+ sweep_page->total_slots,
+ ctx->freed_slots, ctx->empty_slots, ctx->final_slots);
- sweep_page->free_slots = freed_slots + empty_slots;
- objspace->profile.total_freed_objects += freed_slots;
- heap_pages_final_slots += final_slots;
- sweep_page->final_slots += final_slots;
+ sweep_page->free_slots += ctx->freed_slots + ctx->empty_slots;
+ objspace->profile.total_freed_objects += ctx->freed_slots;
if (heap_pages_deferred_final && !finalizing) {
rb_thread_t *th = GET_THREAD();
if (th) {
- gc_finalize_deferred_register(objspace);
+ gc_finalize_deferred_register(objspace);
}
}
- gc_report(2, objspace, "page_sweep: end.\n");
+#if RGENGC_CHECK_MODE
+ short freelist_len = 0;
+ asan_unlock_freelist(sweep_page);
+ RVALUE *ptr = sweep_page->freelist;
+ while (ptr) {
+ freelist_len++;
+ ptr = ptr->as.free.next;
+ }
+ asan_lock_freelist(sweep_page);
+ if (freelist_len != sweep_page->free_slots) {
+ rb_bug("inconsistent freelist length: expected %d but was %d", sweep_page->free_slots, freelist_len);
+ }
+#endif
- return freed_slots + empty_slots;
+ gc_report(2, objspace, "page_sweep: end.\n");
}
+#if !USE_RVARGC
/* allocate additional minimum page to work */
static void
-gc_heap_prepare_minimum_pages(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_heap_prepare_minimum_pages(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- if (!heap->free_pages && heap_increment(objspace, heap) == FALSE) {
- /* there is no free after page_sweep() */
- heap_set_increment(objspace, 1);
- if (!heap_increment(objspace, heap)) { /* can't allocate additional free objects */
- rb_memerror();
- }
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ if (!heap->free_pages && heap_increment(objspace, size_pool, heap) == FALSE) {
+ /* there is no free after page_sweep() */
+ size_pool_allocatable_pages_set(objspace, size_pool, 1);
+ if (!heap_increment(objspace, size_pool, heap)) { /* can't allocate additional free objects */
+ rb_memerror();
+ }
+ }
}
}
+#endif
static const char *
gc_mode_name(enum gc_mode mode)
@@ -4228,6 +5749,7 @@ gc_mode_name(enum gc_mode mode)
case gc_mode_none: return "none";
case gc_mode_marking: return "marking";
case gc_mode_sweeping: return "sweeping";
+ case gc_mode_compacting: return "compacting";
default: rb_bug("gc_mode_name: unknown mode: %d", (int)mode);
}
}
@@ -4240,7 +5762,8 @@ gc_mode_transition(rb_objspace_t *objspace, enum gc_mode mode)
switch (prev_mode) {
case gc_mode_none: GC_ASSERT(mode == gc_mode_marking); break;
case gc_mode_marking: GC_ASSERT(mode == gc_mode_sweeping); break;
- case gc_mode_sweeping: GC_ASSERT(mode == gc_mode_none); break;
+ case gc_mode_sweeping: GC_ASSERT(mode == gc_mode_none || mode == gc_mode_compacting); break;
+ case gc_mode_compacting: GC_ASSERT(mode == gc_mode_none); break;
}
#endif
if (0) fprintf(stderr, "gc_mode_transition: %s->%s\n", gc_mode_name(gc_mode(objspace)), gc_mode_name(mode));
@@ -4248,27 +5771,44 @@ gc_mode_transition(rb_objspace_t *objspace, enum gc_mode mode)
}
static void
+heap_page_freelist_append(struct heap_page *page, RVALUE *freelist)
+{
+ if (freelist) {
+ asan_unlock_freelist(page);
+ if (page->freelist) {
+ RVALUE *p = page->freelist;
+ asan_unpoison_object((VALUE)p, false);
+ while (p->as.free.next) {
+ RVALUE *prev = p;
+ p = p->as.free.next;
+ asan_poison_object((VALUE)prev);
+ asan_unpoison_object((VALUE)p, false);
+ }
+ p->as.free.next = freelist;
+ asan_poison_object((VALUE)p);
+ }
+ else {
+ page->freelist = freelist;
+ }
+ asan_lock_freelist(page);
+ }
+}
+
+static void
gc_sweep_start_heap(rb_objspace_t *objspace, rb_heap_t *heap)
{
- heap->sweeping_page = list_top(&heap->pages, struct heap_page, page_node);
+ heap->sweeping_page = ccan_list_top(&heap->pages, struct heap_page, page_node);
heap->free_pages = NULL;
#if GC_ENABLE_INCREMENTAL_MARK
heap->pooled_pages = NULL;
- objspace->rincgc.pooled_slots = 0;
#endif
- if (heap->using_page) {
- struct heap_page *page = heap->using_page;
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
+ if (!objspace->flags.immediate_sweep) {
+ struct heap_page *page = NULL;
- RVALUE **p = &page->freelist;
- while (*p) {
- p = &(*p)->as.free.next;
- }
- *p = heap->freelist;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
- heap->using_page = NULL;
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ page->flags.before_sweep = TRUE;
+ }
}
- heap->freelist = NULL;
}
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 4
@@ -4278,8 +5818,97 @@ static void
gc_sweep_start(rb_objspace_t *objspace)
{
gc_mode_transition(objspace, gc_mode_sweeping);
- gc_sweep_start_heap(objspace, heap_eden);
+
+#if GC_ENABLE_INCREMENTAL_MARK
+ objspace->rincgc.pooled_slots = 0;
+#endif
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+
+ gc_sweep_start_heap(objspace, heap);
+
+#if USE_RVARGC
+ /* We should call gc_sweep_finish_size_pool for size pools with no pages. */
+ if (heap->sweeping_page == NULL) {
+ GC_ASSERT(heap->total_pages == 0);
+ GC_ASSERT(heap->total_slots == 0);
+ gc_sweep_finish_size_pool(objspace, size_pool);
+ }
+#endif
+ }
+
+ rb_ractor_t *r = NULL;
+ ccan_list_for_each(&GET_VM()->ractor.set, r, vmlr_node) {
+ rb_gc_ractor_newobj_cache_clear(&r->newobj_cache);
+ }
+}
+
+#if USE_RVARGC
+static void
+gc_sweep_finish_size_pool(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
+{
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ size_t total_slots = heap->total_slots + SIZE_POOL_TOMB_HEAP(size_pool)->total_slots;
+ size_t total_pages = heap->total_pages + SIZE_POOL_TOMB_HEAP(size_pool)->total_pages;
+ size_t swept_slots = size_pool->freed_slots + size_pool->empty_slots;
+
+ size_t min_free_slots = (size_t)(total_slots * gc_params.heap_free_slots_min_ratio);
+
+ /* If we don't have enough slots and we have pages on the tomb heap, move
+ * pages from the tomb heap to the eden heap. This may prevent page
+ * creation thrashing (frequently allocating and deallocting pages) and
+ * GC thrashing (running GC more frequently than required). */
+ struct heap_page *resurrected_page;
+ while ((swept_slots < min_free_slots || swept_slots < gc_params.heap_init_slots) &&
+ (resurrected_page = heap_page_resurrect(objspace, size_pool))) {
+ swept_slots += resurrected_page->free_slots;
+
+ heap_add_page(objspace, size_pool, heap, resurrected_page);
+ heap_add_freepage(heap, resurrected_page);
+ }
+
+ /* Some size pools may have very few pages (or even no pages). These size pools
+ * should still have allocatable pages. */
+ if (min_free_slots < gc_params.heap_init_slots && swept_slots < gc_params.heap_init_slots) {
+ int multiple = size_pool->slot_size / BASE_SLOT_SIZE;
+ size_t extra_slots = gc_params.heap_init_slots - swept_slots;
+ size_t extend_page_count = CEILDIV(extra_slots * multiple, HEAP_PAGE_OBJ_LIMIT);
+ if (extend_page_count > size_pool->allocatable_pages) {
+ size_pool_allocatable_pages_set(objspace, size_pool, extend_page_count);
+ }
+ }
+
+ if (swept_slots < min_free_slots) {
+ bool grow_heap = is_full_marking(objspace);
+
+ if (!is_full_marking(objspace)) {
+ /* The heap is a growth heap if it freed more slots than had empty
+ * slots and used up all of its allocatable pages. */
+ bool is_growth_heap = (size_pool->empty_slots == 0 ||
+ size_pool->freed_slots > size_pool->empty_slots) &&
+ size_pool->allocatable_pages == 0;
+
+ if (objspace->profile.count - objspace->rgengc.last_major_gc < RVALUE_OLD_AGE) {
+ grow_heap = TRUE;
+ }
+ else if (is_growth_heap) { /* Only growth heaps are allowed to start a major GC. */
+ objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_NOFREE;
+ size_pool->force_major_gc_count++;
+ }
+ }
+
+ if (grow_heap) {
+ size_t extend_page_count = heap_extend_pages(objspace, size_pool, swept_slots, total_slots, total_pages);
+
+ if (extend_page_count > size_pool->allocatable_pages) {
+ size_pool_allocatable_pages_set(objspace, size_pool, extend_page_count);
+ }
+ }
+ }
}
+#endif
static void
gc_sweep_finish(rb_objspace_t *objspace)
@@ -4289,26 +5918,55 @@ gc_sweep_finish(rb_objspace_t *objspace)
gc_prof_set_heap_info(objspace);
heap_pages_free_unused_pages(objspace);
- /* if heap_pages has unused pages, then assign them to increment */
- if (heap_allocatable_pages < heap_tomb->total_pages) {
- heap_allocatable_pages_set(objspace, heap_tomb->total_pages);
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+
+ /* if heap_pages has unused pages, then assign them to increment */
+ size_t tomb_pages = SIZE_POOL_TOMB_HEAP(size_pool)->total_pages;
+ if (size_pool->allocatable_pages < tomb_pages) {
+ size_pool->allocatable_pages = tomb_pages;
+ }
+
+#if USE_RVARGC
+ size_pool->freed_slots = 0;
+ size_pool->empty_slots = 0;
+
+#if GC_ENABLE_INCREMENTAL_MARK
+ if (!will_be_incremental_marking(objspace)) {
+ rb_heap_t *eden_heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ struct heap_page *end_page = eden_heap->free_pages;
+ if (end_page) {
+ while (end_page->free_next) end_page = end_page->free_next;
+ end_page->free_next = eden_heap->pooled_pages;
+ }
+ else {
+ eden_heap->free_pages = eden_heap->pooled_pages;
+ }
+ eden_heap->pooled_pages = NULL;
+ objspace->rincgc.pooled_slots = 0;
+ }
+#endif
+#endif
}
+ heap_pages_expand_sorted(objspace);
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_SWEEP, 0);
gc_mode_transition(objspace, gc_mode_none);
-
-#if RGENGC_CHECK_MODE >= 2
- gc_verify_internal_consistency(objspace);
-#endif
}
static int
-gc_sweep_step(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
struct heap_page *sweep_page = heap->sweeping_page;
- int unlink_limit = 3;
+ int unlink_limit = GC_SWEEP_PAGES_FREEABLE_PER_STEP;
+
#if GC_ENABLE_INCREMENTAL_MARK
+ int swept_slots = 0;
+#if USE_RVARGC
+ bool need_pool = TRUE;
+#else
int need_pool = will_be_incremental_marking(objspace) ? TRUE : FALSE;
+#endif
gc_report(2, objspace, "gc_sweep_step (need_pool: %d)\n", need_pool);
#else
@@ -4322,41 +5980,64 @@ gc_sweep_step(rb_objspace_t *objspace, rb_heap_t *heap)
#endif
do {
- int free_slots = gc_page_sweep(objspace, heap, sweep_page);
- heap->sweeping_page = list_next(&heap->pages, sweep_page, page_node);
-
- if (sweep_page->final_slots + free_slots == sweep_page->total_slots &&
- heap_pages_freeable_pages > 0 &&
- unlink_limit > 0) {
- heap_pages_freeable_pages--;
- unlink_limit--;
- /* there are no living objects -> move this page to tomb heap */
- heap_unlink_page(objspace, heap, sweep_page);
- heap_add_page(objspace, heap_tomb, sweep_page);
- }
- else if (free_slots > 0) {
+ RUBY_DEBUG_LOG("sweep_page:%p", (void *)sweep_page);
+
+ struct gc_sweep_context ctx = {
+ .page = sweep_page,
+ .final_slots = 0,
+ .freed_slots = 0,
+ .empty_slots = 0,
+ };
+ gc_sweep_page(objspace, heap, &ctx);
+ int free_slots = ctx.freed_slots + ctx.empty_slots;
+
+ heap->sweeping_page = ccan_list_next(&heap->pages, sweep_page, page_node);
+
+ if (sweep_page->final_slots + free_slots == sweep_page->total_slots &&
+ heap_pages_freeable_pages > 0 &&
+ unlink_limit > 0) {
+ heap_pages_freeable_pages--;
+ unlink_limit--;
+ /* there are no living objects -> move this page to tomb heap */
+ heap_unlink_page(objspace, heap, sweep_page);
+ heap_add_page(objspace, size_pool, SIZE_POOL_TOMB_HEAP(size_pool), sweep_page);
+ }
+ else if (free_slots > 0) {
+#if USE_RVARGC
+ size_pool->freed_slots += ctx.freed_slots;
+ size_pool->empty_slots += ctx.empty_slots;
+#endif
+
#if GC_ENABLE_INCREMENTAL_MARK
- if (need_pool) {
- if (heap_add_poolpage(objspace, heap, sweep_page)) {
- need_pool = FALSE;
- }
- }
- else {
- heap_add_freepage(heap, sweep_page);
- break;
- }
+ if (need_pool) {
+ heap_add_poolpage(objspace, heap, sweep_page);
+ need_pool = FALSE;
+ }
+ else {
+ heap_add_freepage(heap, sweep_page);
+ swept_slots += free_slots;
+ if (swept_slots > GC_INCREMENTAL_SWEEP_SLOT_COUNT) {
+ break;
+ }
+ }
#else
- heap_add_freepage(heap, sweep_page);
- break;
+ heap_add_freepage(heap, sweep_page);
+ break;
#endif
- }
- else {
- sweep_page->free_next = NULL;
- }
+ }
+ else {
+ sweep_page->free_next = NULL;
+ }
} while ((sweep_page = heap->sweeping_page));
if (!heap->sweeping_page) {
- gc_sweep_finish(objspace);
+#if USE_RVARGC
+ gc_sweep_finish_size_pool(objspace, size_pool);
+#endif
+
+ if (!has_sweeping_pages(objspace)) {
+ gc_sweep_finish(objspace);
+ }
}
#if GC_ENABLE_LAZY_SWEEP
@@ -4369,57 +6050,185 @@ gc_sweep_step(rb_objspace_t *objspace, rb_heap_t *heap)
static void
gc_sweep_rest(rb_objspace_t *objspace)
{
- rb_heap_t *heap = heap_eden; /* lazy sweep only for eden */
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
- while (has_sweeping_pages(heap)) {
- gc_sweep_step(objspace, heap);
+ while (SIZE_POOL_EDEN_HEAP(size_pool)->sweeping_page) {
+ gc_sweep_step(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
+ }
}
}
static void
-gc_sweep_continue(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_sweep_continue(rb_objspace_t *objspace, rb_size_pool_t *sweep_size_pool, rb_heap_t *heap)
{
- GC_ASSERT(dont_gc == FALSE);
+ GC_ASSERT(dont_gc_val() == FALSE);
if (!GC_ENABLE_LAZY_SWEEP) return;
- gc_enter(objspace, "sweep_continue");
-#if USE_RGENGC
- if (objspace->rgengc.need_major_gc == GPR_FLAG_NONE && heap_increment(objspace, heap)) {
- gc_report(3, objspace, "gc_sweep_continue: success heap_increment().\n");
- }
+ unsigned int lock_lev;
+ gc_enter(objspace, gc_enter_event_sweep_continue, &lock_lev);
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ if (!gc_sweep_step(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool))) {
+#if USE_RVARGC
+ /* sweep_size_pool requires a free slot but sweeping did not yield any. */
+ if (size_pool == sweep_size_pool) {
+ if (size_pool->allocatable_pages > 0) {
+ heap_increment(objspace, size_pool, heap);
+ }
+ else {
+ /* Not allowed to create a new page so finish sweeping. */
+ gc_sweep_rest(objspace);
+ break;
+ }
+ }
#endif
- gc_sweep_step(objspace, heap);
- gc_exit(objspace, "sweep_continue");
+ }
+ }
+
+ gc_exit(objspace, gc_enter_event_sweep_continue, &lock_lev);
}
static void
+invalidate_moved_plane(rb_objspace_t *objspace, struct heap_page *page, uintptr_t p, bits_t bitset)
+{
+ if (bitset) {
+ do {
+ if (bitset & 1) {
+ VALUE forwarding_object = (VALUE)p;
+ VALUE object;
+
+ if (BUILTIN_TYPE(forwarding_object) == T_MOVED) {
+ GC_ASSERT(MARKED_IN_BITMAP(GET_HEAP_PINNED_BITS(forwarding_object), forwarding_object));
+ GC_ASSERT(!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(forwarding_object), forwarding_object));
+
+ CLEAR_IN_BITMAP(GET_HEAP_PINNED_BITS(forwarding_object), forwarding_object);
+
+ object = rb_gc_location(forwarding_object);
+
+ shape_id_t original_shape_id = 0;
+ if (RB_TYPE_P(object, T_OBJECT)) {
+ original_shape_id = RMOVED(forwarding_object)->original_shape_id;
+ }
+
+ gc_move(objspace, object, forwarding_object, GET_HEAP_PAGE(object)->slot_size, page->slot_size);
+ /* forwarding_object is now our actual object, and "object"
+ * is the free slot for the original page */
+
+ if (original_shape_id) {
+ ROBJECT_SET_SHAPE_ID(forwarding_object, original_shape_id);
+ }
+
+ struct heap_page *orig_page = GET_HEAP_PAGE(object);
+ orig_page->free_slots++;
+ heap_page_add_freeobj(objspace, orig_page, object);
+
+ GC_ASSERT(MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(forwarding_object), forwarding_object));
+ GC_ASSERT(BUILTIN_TYPE(forwarding_object) != T_MOVED);
+ GC_ASSERT(BUILTIN_TYPE(forwarding_object) != T_NONE);
+ }
+ }
+ p += BASE_SLOT_SIZE;
+ bitset >>= 1;
+ } while (bitset);
+ }
+}
+
+static void
+invalidate_moved_page(rb_objspace_t *objspace, struct heap_page *page)
+{
+ int i;
+ bits_t *mark_bits, *pin_bits;
+ bits_t bitset;
+
+ mark_bits = page->mark_bits;
+ pin_bits = page->pinned_bits;
+
+ uintptr_t p = page->start;
+
+ // Skip out of range slots at the head of the page
+ bitset = pin_bits[0] & ~mark_bits[0];
+ bitset >>= NUM_IN_PAGE(p);
+ invalidate_moved_plane(objspace, page, p, bitset);
+ p += (BITS_BITLENGTH - NUM_IN_PAGE(p)) * BASE_SLOT_SIZE;
+
+ for (i=1; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
+ /* Moved objects are pinned but never marked. We reuse the pin bits
+ * to indicate there is a moved object in this slot. */
+ bitset = pin_bits[i] & ~mark_bits[i];
+
+ invalidate_moved_plane(objspace, page, p, bitset);
+ p += BITS_BITLENGTH * BASE_SLOT_SIZE;
+ }
+}
+
+static void
+gc_compact_start(rb_objspace_t *objspace)
+{
+ struct heap_page *page = NULL;
+ gc_mode_transition(objspace, gc_mode_compacting);
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(&size_pools[i]);
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ page->flags.before_sweep = TRUE;
+ }
+
+ heap->compact_cursor = ccan_list_tail(&heap->pages, struct heap_page, page_node);
+ heap->compact_cursor_index = 0;
+ }
+
+ if (gc_prof_enabled(objspace)) {
+ gc_profile_record *record = gc_prof_record(objspace);
+ record->moved_objects = objspace->rcompactor.total_moved;
+ }
+
+ memset(objspace->rcompactor.considered_count_table, 0, T_MASK * sizeof(size_t));
+ memset(objspace->rcompactor.moved_count_table, 0, T_MASK * sizeof(size_t));
+ memset(objspace->rcompactor.moved_up_count_table, 0, T_MASK * sizeof(size_t));
+ memset(objspace->rcompactor.moved_down_count_table, 0, T_MASK * sizeof(size_t));
+
+ /* Set up read barrier for pages containing MOVED objects */
+ install_handlers();
+}
+
+static void gc_sweep_compact(rb_objspace_t *objspace);
+
+static void
gc_sweep(rb_objspace_t *objspace)
{
const unsigned int immediate_sweep = objspace->flags.immediate_sweep;
gc_report(1, objspace, "gc_sweep: immediate: %d\n", immediate_sweep);
+ gc_sweep_start(objspace);
+ if (objspace->flags.during_compacting) {
+ gc_sweep_compact(objspace);
+ }
+
if (immediate_sweep) {
#if !GC_ENABLE_LAZY_SWEEP
- gc_prof_sweep_timer_start(objspace);
+ gc_prof_sweep_timer_start(objspace);
#endif
- gc_sweep_start(objspace);
- gc_sweep_rest(objspace);
+ gc_sweep_rest(objspace);
#if !GC_ENABLE_LAZY_SWEEP
- gc_prof_sweep_timer_stop(objspace);
+ gc_prof_sweep_timer_stop(objspace);
#endif
}
else {
- struct heap_page *page = NULL;
- gc_sweep_start(objspace);
- list_for_each(&heap_eden->pages, page, page_node) {
- page->flags.before_sweep = TRUE;
+ /* Sweep every size pool. */
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ gc_sweep_step(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
}
- gc_sweep_step(objspace, heap_eden);
}
- gc_heap_prepare_minimum_pages(objspace, heap_eden);
+#if !USE_RVARGC
+ rb_size_pool_t *size_pool = &size_pools[0];
+ gc_heap_prepare_minimum_pages(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
+#endif
}
/* Marking - Marking stack */
@@ -4449,8 +6258,8 @@ mark_stack_size(mark_stack_t *stack)
stack_chunk_t *chunk = stack->chunk ? stack->chunk->next : NULL;
while (chunk) {
- size += stack->limit;
- chunk = chunk->next;
+ size += stack->limit;
+ chunk = chunk->next;
}
return size;
}
@@ -4512,9 +6321,8 @@ pop_mark_stack_chunk(mark_stack_t *stack)
}
static void
-free_stack_chunks(mark_stack_t *stack)
+mark_stack_chunk_list_free(stack_chunk_t *chunk)
{
- stack_chunk_t *chunk = stack->chunk;
stack_chunk_t *next = NULL;
while (chunk != NULL) {
@@ -4525,12 +6333,68 @@ free_stack_chunks(mark_stack_t *stack)
}
static void
+free_stack_chunks(mark_stack_t *stack)
+{
+ mark_stack_chunk_list_free(stack->chunk);
+}
+
+static void
+mark_stack_free_cache(mark_stack_t *stack)
+{
+ mark_stack_chunk_list_free(stack->cache);
+ stack->cache_size = 0;
+ stack->unused_cache_size = 0;
+}
+
+static void
push_mark_stack(mark_stack_t *stack, VALUE data)
{
- if (stack->index == stack->limit) {
- push_mark_stack_chunk(stack);
+ VALUE obj = data;
+ switch (BUILTIN_TYPE(obj)) {
+ case T_OBJECT:
+ case T_CLASS:
+ case T_MODULE:
+ case T_FLOAT:
+ case T_STRING:
+ case T_REGEXP:
+ case T_ARRAY:
+ case T_HASH:
+ case T_STRUCT:
+ case T_BIGNUM:
+ case T_FILE:
+ case T_DATA:
+ case T_MATCH:
+ case T_COMPLEX:
+ case T_RATIONAL:
+ case T_TRUE:
+ case T_FALSE:
+ case T_SYMBOL:
+ case T_IMEMO:
+ case T_ICLASS:
+ if (stack->index == stack->limit) {
+ push_mark_stack_chunk(stack);
+ }
+ stack->chunk->data[stack->index++] = data;
+ return;
+
+ case T_NONE:
+ case T_NIL:
+ case T_FIXNUM:
+ case T_MOVED:
+ case T_ZOMBIE:
+ case T_UNDEF:
+ case T_MASK:
+ rb_bug("push_mark_stack() called for broken object");
+ break;
+
+ case T_NODE:
+ UNEXPECTED_NODE(push_mark_stack);
+ break;
}
- stack->chunk->data[stack->index++] = data;
+
+ rb_bug("rb_gc_mark(): unknown data type 0x%x(%p) %s",
+ BUILTIN_TYPE(obj), (void *)data,
+ is_pointer_to_heap(&rb_objspace, (void *)data) ? "corrupted object" : "non object");
}
static int
@@ -4544,40 +6408,11 @@ pop_mark_stack(mark_stack_t *stack, VALUE *data)
pop_mark_stack_chunk(stack);
}
else {
- *data = stack->chunk->data[--stack->index];
+ *data = stack->chunk->data[--stack->index];
}
return TRUE;
}
-#if GC_ENABLE_INCREMENTAL_MARK
-static int
-invalidate_mark_stack_chunk(stack_chunk_t *chunk, int limit, VALUE obj)
-{
- int i;
- for (i=0; i<limit; i++) {
- if (chunk->data[i] == obj) {
- chunk->data[i] = Qundef;
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static void
-invalidate_mark_stack(mark_stack_t *stack, VALUE obj)
-{
- stack_chunk_t *chunk = stack->chunk;
- int limit = stack->index;
-
- while (chunk) {
- if (invalidate_mark_stack_chunk(chunk, limit, obj)) return;
- chunk = chunk->next;
- limit = stack->limit;
- }
- rb_bug("invalid_mark_stack: unreachable");
-}
-#endif
-
static void
init_mark_stack(mark_stack_t *stack)
{
@@ -4585,7 +6420,6 @@ init_mark_stack(mark_stack_t *stack)
MEMZERO(stack, mark_stack_t, 1);
stack->index = stack->limit = STACK_CHUNK_SIZE;
- stack->cache_size = 0;
for (i=0; i < 4; i++) {
add_stack_chunk_cache(stack, stack_chunk_alloc());
@@ -4601,18 +6435,13 @@ init_mark_stack(mark_stack_t *stack)
#define STACK_END (ec->machine.stack_end)
#define STACK_LEVEL_MAX (ec->machine.stack_maxsize/sizeof(VALUE))
-#ifdef __EMSCRIPTEN__
-#undef STACK_GROW_DIRECTION
-#define STACK_GROW_DIRECTION 1
-#endif
-
#if STACK_GROW_DIRECTION < 0
# define STACK_LENGTH (size_t)(STACK_START - STACK_END)
#elif STACK_GROW_DIRECTION > 0
# define STACK_LENGTH (size_t)(STACK_END - STACK_START + 1)
#else
# define STACK_LENGTH ((STACK_END < STACK_START) ? (size_t)(STACK_START - STACK_END) \
- : (size_t)(STACK_END - STACK_START + 1))
+ : (size_t)(STACK_END - STACK_START + 1))
#endif
#if !STACK_GROW_DIRECTION
int ruby_stack_grow_direction;
@@ -4644,7 +6473,7 @@ ruby_stack_length(VALUE **p)
# define PREVENT_STACK_OVERFLOW 0
#endif
#endif
-#if PREVENT_STACK_OVERFLOW
+#if PREVENT_STACK_OVERFLOW && !defined(__EMSCRIPTEN__)
static int
stack_check(rb_execution_context_t *ec, int water_mark)
{
@@ -4673,32 +6502,32 @@ ruby_stack_check(void)
return stack_check(GET_EC(), STACKFRAME_FOR_CALL_CFUNC);
}
-ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static void mark_locations_array(rb_objspace_t *objspace, register const VALUE *x, register long n));
+ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static void each_location(rb_objspace_t *objspace, register const VALUE *x, register long n, void (*cb)(rb_objspace_t *, VALUE)));
static void
-mark_locations_array(rb_objspace_t *objspace, register const VALUE *x, register long n)
+each_location(rb_objspace_t *objspace, register const VALUE *x, register long n, void (*cb)(rb_objspace_t *, VALUE))
{
VALUE v;
while (n--) {
v = *x;
- gc_mark_maybe(objspace, v);
- x++;
+ cb(objspace, v);
+ x++;
}
}
static void
-gc_mark_locations(rb_objspace_t *objspace, const VALUE *start, const VALUE *end)
+gc_mark_locations(rb_objspace_t *objspace, const VALUE *start, const VALUE *end, void (*cb)(rb_objspace_t *, VALUE))
{
long n;
if (end <= start) return;
n = end - start;
- mark_locations_array(objspace, start, n);
+ each_location(objspace, start, n, cb);
}
void
rb_gc_mark_locations(const VALUE *start, const VALUE *end)
{
- gc_mark_locations(&rb_objspace, start, end);
+ gc_mark_locations(&rb_objspace, start, end, gc_mark_maybe);
}
static void
@@ -4723,13 +6552,12 @@ rb_gc_mark_values(long n, const VALUE *values)
}
static void
-gc_mark_and_pin_stack_values(rb_objspace_t *objspace, long n, const VALUE *values)
+gc_mark_stack_values(rb_objspace_t *objspace, long n, const VALUE *values)
{
long i;
for (i=0; i<n; i++) {
- /* skip MOVED objects that are on the stack */
- if (is_markable_object(objspace, values[i]) && T_MOVED != BUILTIN_TYPE(values[i])) {
+ if (is_markable_object(objspace, values[i])) {
gc_mark_and_pin(objspace, values[i]);
}
}
@@ -4739,7 +6567,7 @@ void
rb_gc_mark_vm_stack_values(long n, const VALUE *values)
{
rb_objspace_t *objspace = &rb_objspace;
- gc_mark_and_pin_stack_values(objspace, n, values);
+ gc_mark_stack_values(objspace, n, values);
}
static int
@@ -4787,11 +6615,19 @@ mark_set(rb_objspace_t *objspace, st_table *tbl)
st_foreach(tbl, mark_key, (st_data_t)objspace);
}
+static int
+pin_value(st_data_t key, st_data_t value, st_data_t data)
+{
+ rb_objspace_t *objspace = (rb_objspace_t *)data;
+ gc_mark_and_pin(objspace, (VALUE)value);
+ return ST_CONTINUE;
+}
+
static void
mark_finalizer_tbl(rb_objspace_t *objspace, st_table *tbl)
{
if (!tbl) return;
- st_foreach(tbl, mark_value, (st_data_t)objspace);
+ st_foreach(tbl, pin_value, (st_data_t)objspace);
}
void
@@ -4841,7 +6677,7 @@ mark_hash(rb_objspace_t *objspace, VALUE hash)
}
if (RHASH_AR_TABLE_P(hash)) {
- if (objspace->mark_func_data == NULL && RHASH_TRANSIENT_P(hash)) {
+ if (LIKELY(during_gc) && RHASH_TRANSIENT_P(hash)) {
rb_transient_heap_mark(hash, RHASH_AR_TABLE(hash));
}
}
@@ -4873,34 +6709,40 @@ mark_method_entry(rb_objspace_t *objspace, const rb_method_entry_t *me)
gc_mark(objspace, me->defined_class);
if (def) {
- switch (def->type) {
- case VM_METHOD_TYPE_ISEQ:
- if (def->body.iseq.iseqptr) gc_mark(objspace, (VALUE)def->body.iseq.iseqptr);
- gc_mark(objspace, (VALUE)def->body.iseq.cref);
- break;
- case VM_METHOD_TYPE_ATTRSET:
- case VM_METHOD_TYPE_IVAR:
- gc_mark(objspace, def->body.attr.location);
- break;
- case VM_METHOD_TYPE_BMETHOD:
+ switch (def->type) {
+ case VM_METHOD_TYPE_ISEQ:
+ if (def->body.iseq.iseqptr) gc_mark(objspace, (VALUE)def->body.iseq.iseqptr);
+ gc_mark(objspace, (VALUE)def->body.iseq.cref);
+
+ if (def->iseq_overload && me->defined_class) {
+ // it can be a key of "overloaded_cme" table
+ // so it should be pinned.
+ gc_mark_and_pin(objspace, (VALUE)me);
+ }
+ break;
+ case VM_METHOD_TYPE_ATTRSET:
+ case VM_METHOD_TYPE_IVAR:
+ gc_mark(objspace, def->body.attr.location);
+ break;
+ case VM_METHOD_TYPE_BMETHOD:
gc_mark(objspace, def->body.bmethod.proc);
if (def->body.bmethod.hooks) rb_hook_list_mark(def->body.bmethod.hooks);
- break;
- case VM_METHOD_TYPE_ALIAS:
- gc_mark(objspace, (VALUE)def->body.alias.original_me);
- return;
- case VM_METHOD_TYPE_REFINED:
- gc_mark(objspace, (VALUE)def->body.refined.orig_me);
- gc_mark(objspace, (VALUE)def->body.refined.owner);
- break;
- case VM_METHOD_TYPE_CFUNC:
- case VM_METHOD_TYPE_ZSUPER:
- case VM_METHOD_TYPE_MISSING:
- case VM_METHOD_TYPE_OPTIMIZED:
- case VM_METHOD_TYPE_UNDEF:
- case VM_METHOD_TYPE_NOTIMPLEMENTED:
- break;
- }
+ break;
+ case VM_METHOD_TYPE_ALIAS:
+ gc_mark(objspace, (VALUE)def->body.alias.original_me);
+ return;
+ case VM_METHOD_TYPE_REFINED:
+ gc_mark(objspace, (VALUE)def->body.refined.orig_me);
+ gc_mark(objspace, (VALUE)def->body.refined.owner);
+ break;
+ case VM_METHOD_TYPE_CFUNC:
+ case VM_METHOD_TYPE_ZSUPER:
+ case VM_METHOD_TYPE_MISSING:
+ case VM_METHOD_TYPE_OPTIMIZED:
+ case VM_METHOD_TYPE_UNDEF:
+ case VM_METHOD_TYPE_NOTIMPLEMENTED:
+ break;
+ }
}
}
@@ -4917,7 +6759,7 @@ static void
mark_m_tbl(rb_objspace_t *objspace, struct rb_id_table *tbl)
{
if (tbl) {
- rb_id_table_foreach_values(tbl, mark_method_entry_i, objspace);
+ rb_id_table_foreach_values(tbl, mark_method_entry_i, objspace);
}
}
@@ -4949,15 +6791,56 @@ mark_const_tbl(rb_objspace_t *objspace, struct rb_id_table *tbl)
((start) = STACK_END, (end) = STACK_START) : ((start) = STACK_START, (end) = STACK_END+(appendix)))
#endif
-static void mark_stack_locations(rb_objspace_t *objspace, const rb_execution_context_t *ec,
- const VALUE *stack_start, const VALUE *stack_end);
+static void each_stack_location(rb_objspace_t *objspace, const rb_execution_context_t *ec,
+ const VALUE *stack_start, const VALUE *stack_end, void (*cb)(rb_objspace_t *, VALUE));
+
+#if defined(__wasm__)
+
+
+static VALUE *rb_stack_range_tmp[2];
+
+static void
+rb_mark_locations(void *begin, void *end)
+{
+ rb_stack_range_tmp[0] = begin;
+ rb_stack_range_tmp[1] = end;
+}
+
+# if defined(__EMSCRIPTEN__)
+
+static void
+mark_current_machine_context(rb_objspace_t *objspace, rb_execution_context_t *ec)
+{
+ emscripten_scan_stack(rb_mark_locations);
+ each_stack_location(objspace, ec, rb_stack_range_tmp[0], rb_stack_range_tmp[1], gc_mark_maybe);
+
+ emscripten_scan_registers(rb_mark_locations);
+ each_stack_location(objspace, ec, rb_stack_range_tmp[0], rb_stack_range_tmp[1], gc_mark_maybe);
+}
+# else // use Asyncify version
+
+static void
+mark_current_machine_context(rb_objspace_t *objspace, rb_execution_context_t *ec)
+{
+ VALUE *stack_start, *stack_end;
+ SET_STACK_END;
+ GET_STACK_BOUNDS(stack_start, stack_end, 1);
+ each_stack_location(objspace, ec, stack_start, stack_end, gc_mark_maybe);
+
+ rb_wasm_scan_locals(rb_mark_locations);
+ each_stack_location(objspace, ec, rb_stack_range_tmp[0], rb_stack_range_tmp[1], gc_mark_maybe);
+}
+
+# endif
+
+#else // !defined(__wasm__)
static void
mark_current_machine_context(rb_objspace_t *objspace, rb_execution_context_t *ec)
{
union {
- rb_jmp_buf j;
- VALUE v[sizeof(rb_jmp_buf) / sizeof(VALUE)];
+ rb_jmp_buf j;
+ VALUE v[sizeof(rb_jmp_buf) / (sizeof(VALUE))];
} save_regs_gc_mark;
VALUE *stack_start, *stack_end;
@@ -4972,32 +6855,39 @@ mark_current_machine_context(rb_objspace_t *objspace, rb_execution_context_t *ec
SET_STACK_END;
GET_STACK_BOUNDS(stack_start, stack_end, 1);
- mark_locations_array(objspace, save_regs_gc_mark.v, numberof(save_regs_gc_mark.v));
+ each_location(objspace, save_regs_gc_mark.v, numberof(save_regs_gc_mark.v), gc_mark_maybe);
- mark_stack_locations(objspace, ec, stack_start, stack_end);
+ each_stack_location(objspace, ec, stack_start, stack_end, gc_mark_maybe);
}
+#endif
-void
-rb_gc_mark_machine_stack(const rb_execution_context_t *ec)
+static void
+each_machine_stack_value(const rb_execution_context_t *ec, void (*cb)(rb_objspace_t *, VALUE))
{
rb_objspace_t *objspace = &rb_objspace;
VALUE *stack_start, *stack_end;
GET_STACK_BOUNDS(stack_start, stack_end, 0);
- mark_stack_locations(objspace, ec, stack_start, stack_end);
+ each_stack_location(objspace, ec, stack_start, stack_end, cb);
+}
+
+void
+rb_gc_mark_machine_stack(const rb_execution_context_t *ec)
+{
+ each_machine_stack_value(ec, gc_mark_maybe);
}
static void
-mark_stack_locations(rb_objspace_t *objspace, const rb_execution_context_t *ec,
- const VALUE *stack_start, const VALUE *stack_end)
+each_stack_location(rb_objspace_t *objspace, const rb_execution_context_t *ec,
+ const VALUE *stack_start, const VALUE *stack_end, void (*cb)(rb_objspace_t *, VALUE))
{
- gc_mark_locations(objspace, stack_start, stack_end);
+ gc_mark_locations(objspace, stack_start, stack_end, cb);
#if defined(__mc68000__)
gc_mark_locations(objspace,
- (VALUE*)((char*)stack_start + 2),
- (VALUE*)((char*)stack_end - 2));
+ (VALUE*)((char*)stack_start + 2),
+ (VALUE*)((char*)stack_end - 2), cb);
#endif
}
@@ -5019,12 +6909,10 @@ gc_mark_maybe(rb_objspace_t *objspace, VALUE obj)
(void)VALGRIND_MAKE_MEM_DEFINED(&obj, sizeof(obj));
if (is_pointer_to_heap(objspace, (void *)obj)) {
- void *ptr = __asan_region_is_poisoned((void *)obj, SIZEOF_VALUE);
- asan_unpoison_object(obj, false);
+ void *ptr = asan_unpoison_object_temporary(obj);
/* Garbage can live on the stack, so do not mark or pin */
switch (BUILTIN_TYPE(obj)) {
- case T_MOVED:
case T_ZOMBIE:
case T_NONE:
break;
@@ -5049,12 +6937,12 @@ rb_gc_mark_maybe(VALUE obj)
static inline int
gc_mark_set(rb_objspace_t *objspace, VALUE obj)
{
+ ASSERT_vm_locking();
if (RVALUE_MARKED(obj)) return 0;
MARK_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj);
return 1;
}
-#if USE_RGENGC
static int
gc_remember_unprotected(rb_objspace_t *objspace, VALUE obj)
{
@@ -5062,61 +6950,58 @@ gc_remember_unprotected(rb_objspace_t *objspace, VALUE obj)
bits_t *uncollectible_bits = &page->uncollectible_bits[0];
if (!MARKED_IN_BITMAP(uncollectible_bits, obj)) {
- page->flags.has_uncollectible_shady_objects = TRUE;
- MARK_IN_BITMAP(uncollectible_bits, obj);
- objspace->rgengc.uncollectible_wb_unprotected_objects++;
+ page->flags.has_uncollectible_shady_objects = TRUE;
+ MARK_IN_BITMAP(uncollectible_bits, obj);
+ objspace->rgengc.uncollectible_wb_unprotected_objects++;
#if RGENGC_PROFILE > 0
- objspace->profile.total_remembered_shady_object_count++;
+ objspace->profile.total_remembered_shady_object_count++;
#if RGENGC_PROFILE >= 2
- objspace->profile.remembered_shady_object_count_types[BUILTIN_TYPE(obj)]++;
+ objspace->profile.remembered_shady_object_count_types[BUILTIN_TYPE(obj)]++;
#endif
#endif
- return TRUE;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
-#endif
static void
rgengc_check_relation(rb_objspace_t *objspace, VALUE obj)
{
-#if USE_RGENGC
const VALUE old_parent = objspace->rgengc.parent_object;
if (old_parent) { /* parent object is old */
- if (RVALUE_WB_UNPROTECTED(obj)) {
- if (gc_remember_unprotected(objspace, obj)) {
- gc_report(2, objspace, "relation: (O->S) %s -> %s\n", obj_info(old_parent), obj_info(obj));
- }
- }
- else {
- if (!RVALUE_OLD_P(obj)) {
- if (RVALUE_MARKED(obj)) {
- /* An object pointed from an OLD object should be OLD. */
- gc_report(2, objspace, "relation: (O->unmarked Y) %s -> %s\n", obj_info(old_parent), obj_info(obj));
- RVALUE_AGE_SET_OLD(objspace, obj);
- if (is_incremental_marking(objspace)) {
- if (!RVALUE_MARKING(obj)) {
- gc_grey(objspace, obj);
- }
- }
- else {
- rgengc_remember(objspace, obj);
- }
- }
- else {
- gc_report(2, objspace, "relation: (O->Y) %s -> %s\n", obj_info(old_parent), obj_info(obj));
- RVALUE_AGE_SET_CANDIDATE(objspace, obj);
- }
- }
- }
+ if (RVALUE_WB_UNPROTECTED(obj)) {
+ if (gc_remember_unprotected(objspace, obj)) {
+ gc_report(2, objspace, "relation: (O->S) %s -> %s\n", obj_info(old_parent), obj_info(obj));
+ }
+ }
+ else {
+ if (!RVALUE_OLD_P(obj)) {
+ if (RVALUE_MARKED(obj)) {
+ /* An object pointed from an OLD object should be OLD. */
+ gc_report(2, objspace, "relation: (O->unmarked Y) %s -> %s\n", obj_info(old_parent), obj_info(obj));
+ RVALUE_AGE_SET_OLD(objspace, obj);
+ if (is_incremental_marking(objspace)) {
+ if (!RVALUE_MARKING(obj)) {
+ gc_grey(objspace, obj);
+ }
+ }
+ else {
+ rgengc_remember(objspace, obj);
+ }
+ }
+ else {
+ gc_report(2, objspace, "relation: (O->Y) %s -> %s\n", obj_info(old_parent), obj_info(obj));
+ RVALUE_AGE_SET_CANDIDATE(objspace, obj);
+ }
+ }
+ }
}
GC_ASSERT(old_parent == objspace->rgengc.parent_object);
-#endif
}
static void
@@ -5129,7 +7014,7 @@ gc_grey(rb_objspace_t *objspace, VALUE obj)
#if GC_ENABLE_INCREMENTAL_MARK
if (is_incremental_marking(objspace)) {
- MARK_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
+ MARK_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
}
#endif
@@ -5139,42 +7024,56 @@ gc_grey(rb_objspace_t *objspace, VALUE obj)
static void
gc_aging(rb_objspace_t *objspace, VALUE obj)
{
-#if USE_RGENGC
struct heap_page *page = GET_HEAP_PAGE(obj);
GC_ASSERT(RVALUE_MARKING(obj) == FALSE);
check_rvalue_consistency(obj);
if (!RVALUE_PAGE_WB_UNPROTECTED(page, obj)) {
- if (!RVALUE_OLD_P(obj)) {
- gc_report(3, objspace, "gc_aging: YOUNG: %s\n", obj_info(obj));
- RVALUE_AGE_INC(objspace, obj);
- }
- else if (is_full_marking(objspace)) {
- GC_ASSERT(RVALUE_PAGE_UNCOLLECTIBLE(page, obj) == FALSE);
- RVALUE_PAGE_OLD_UNCOLLECTIBLE_SET(objspace, page, obj);
- }
+ if (!RVALUE_OLD_P(obj)) {
+ gc_report(3, objspace, "gc_aging: YOUNG: %s\n", obj_info(obj));
+ RVALUE_AGE_INC(objspace, obj);
+ }
+ else if (is_full_marking(objspace)) {
+ GC_ASSERT(RVALUE_PAGE_UNCOLLECTIBLE(page, obj) == FALSE);
+ RVALUE_PAGE_OLD_UNCOLLECTIBLE_SET(objspace, page, obj);
+ }
}
check_rvalue_consistency(obj);
-#endif /* USE_RGENGC */
objspace->marked_slots++;
}
NOINLINE(static void gc_mark_ptr(rb_objspace_t *objspace, VALUE obj));
+static void reachable_objects_from_callback(VALUE obj);
static void
gc_mark_ptr(rb_objspace_t *objspace, VALUE obj)
{
- if (LIKELY(objspace->mark_func_data == NULL)) {
- rgengc_check_relation(objspace, obj);
- if (!gc_mark_set(objspace, obj)) return; /* already marked */
- if (RB_TYPE_P(obj, T_NONE)) rb_bug("try to mark T_NONE object"); /* check here will help debugging */
- gc_aging(objspace, obj);
- gc_grey(objspace, obj);
+ if (LIKELY(during_gc)) {
+ rgengc_check_relation(objspace, obj);
+ if (!gc_mark_set(objspace, obj)) return; /* already marked */
+
+ if (0) { // for debug GC marking miss
+ if (objspace->rgengc.parent_object) {
+ RUBY_DEBUG_LOG("%p (%s) parent:%p (%s)",
+ (void *)obj, obj_type_name(obj),
+ (void *)objspace->rgengc.parent_object, obj_type_name(objspace->rgengc.parent_object));
+ }
+ else {
+ RUBY_DEBUG_LOG("%p (%s)", (void *)obj, obj_type_name(obj));
+ }
+ }
+
+ if (UNLIKELY(RB_TYPE_P(obj, T_NONE))) {
+ rp(obj);
+ rb_bug("try to mark T_NONE object"); /* check here will help debugging */
+ }
+ gc_aging(objspace, obj);
+ gc_grey(objspace, obj);
}
else {
- objspace->mark_func_data->mark_func(obj, objspace->mark_func_data->data);
+ reachable_objects_from_callback(obj);
}
}
@@ -5183,7 +7082,9 @@ gc_pin(rb_objspace_t *objspace, VALUE obj)
{
GC_ASSERT(is_markable_object(objspace, obj));
if (UNLIKELY(objspace->flags.during_compacting)) {
- MARK_IN_BITMAP(GET_HEAP_PINNED_BITS(obj), obj);
+ if (LIKELY(during_gc)) {
+ MARK_IN_BITMAP(GET_HEAP_PINNED_BITS(obj), obj);
+ }
}
}
@@ -5227,14 +7128,12 @@ rb_objspace_marked_object_p(VALUE obj)
static inline void
gc_mark_set_parent(rb_objspace_t *objspace, VALUE obj)
{
-#if USE_RGENGC
if (RVALUE_OLD_P(obj)) {
- objspace->rgengc.parent_object = obj;
+ objspace->rgengc.parent_object = obj;
}
else {
- objspace->rgengc.parent_object = Qfalse;
+ objspace->rgengc.parent_object = Qfalse;
}
-#endif
}
static void
@@ -5242,64 +7141,86 @@ gc_mark_imemo(rb_objspace_t *objspace, VALUE obj)
{
switch (imemo_type(obj)) {
case imemo_env:
- {
- const rb_env_t *env = (const rb_env_t *)obj;
- GC_ASSERT(VM_ENV_ESCAPED_P(env->ep));
- gc_mark_values(objspace, (long)env->env_size, env->env);
- VM_ENV_FLAGS_SET(env->ep, VM_ENV_FLAG_WB_REQUIRED);
- gc_mark(objspace, (VALUE)rb_vm_env_prev_env(env));
- gc_mark(objspace, (VALUE)env->iseq);
- }
- return;
+ {
+ const rb_env_t *env = (const rb_env_t *)obj;
+
+ if (LIKELY(env->ep)) {
+ // just after newobj() can be NULL here.
+ GC_ASSERT(env->ep[VM_ENV_DATA_INDEX_ENV] == obj);
+ GC_ASSERT(VM_ENV_ESCAPED_P(env->ep));
+ gc_mark_values(objspace, (long)env->env_size, env->env);
+ VM_ENV_FLAGS_SET(env->ep, VM_ENV_FLAG_WB_REQUIRED);
+ gc_mark(objspace, (VALUE)rb_vm_env_prev_env(env));
+ gc_mark(objspace, (VALUE)env->iseq);
+ }
+ }
+ return;
case imemo_cref:
- gc_mark(objspace, RANY(obj)->as.imemo.cref.klass);
- gc_mark(objspace, (VALUE)RANY(obj)->as.imemo.cref.next);
- gc_mark(objspace, RANY(obj)->as.imemo.cref.refinements);
- return;
+ gc_mark(objspace, RANY(obj)->as.imemo.cref.klass_or_self);
+ gc_mark(objspace, (VALUE)RANY(obj)->as.imemo.cref.next);
+ gc_mark(objspace, RANY(obj)->as.imemo.cref.refinements);
+ return;
case imemo_svar:
- gc_mark(objspace, RANY(obj)->as.imemo.svar.cref_or_me);
- gc_mark(objspace, RANY(obj)->as.imemo.svar.lastline);
- gc_mark(objspace, RANY(obj)->as.imemo.svar.backref);
- gc_mark(objspace, RANY(obj)->as.imemo.svar.others);
- return;
+ gc_mark(objspace, RANY(obj)->as.imemo.svar.cref_or_me);
+ gc_mark(objspace, RANY(obj)->as.imemo.svar.lastline);
+ gc_mark(objspace, RANY(obj)->as.imemo.svar.backref);
+ gc_mark(objspace, RANY(obj)->as.imemo.svar.others);
+ return;
case imemo_throw_data:
- gc_mark(objspace, RANY(obj)->as.imemo.throw_data.throw_obj);
- return;
+ gc_mark(objspace, RANY(obj)->as.imemo.throw_data.throw_obj);
+ return;
case imemo_ifunc:
- gc_mark_maybe(objspace, (VALUE)RANY(obj)->as.imemo.ifunc.data);
- return;
+ gc_mark_maybe(objspace, (VALUE)RANY(obj)->as.imemo.ifunc.data);
+ return;
case imemo_memo:
- gc_mark(objspace, RANY(obj)->as.imemo.memo.v1);
- gc_mark(objspace, RANY(obj)->as.imemo.memo.v2);
- gc_mark_maybe(objspace, RANY(obj)->as.imemo.memo.u3.value);
- return;
+ gc_mark(objspace, RANY(obj)->as.imemo.memo.v1);
+ gc_mark(objspace, RANY(obj)->as.imemo.memo.v2);
+ gc_mark_maybe(objspace, RANY(obj)->as.imemo.memo.u3.value);
+ return;
case imemo_ment:
- mark_method_entry(objspace, &RANY(obj)->as.imemo.ment);
- return;
+ mark_method_entry(objspace, &RANY(obj)->as.imemo.ment);
+ return;
case imemo_iseq:
- rb_iseq_mark((rb_iseq_t *)obj);
- return;
+ rb_iseq_mark((rb_iseq_t *)obj);
+ return;
case imemo_tmpbuf:
- {
- const rb_imemo_tmpbuf_t *m = &RANY(obj)->as.imemo.alloc;
- do {
- rb_gc_mark_locations(m->ptr, m->ptr + m->cnt);
- } while ((m = m->next) != NULL);
- }
- return;
+ {
+ const rb_imemo_tmpbuf_t *m = &RANY(obj)->as.imemo.alloc;
+ do {
+ rb_gc_mark_locations(m->ptr, m->ptr + m->cnt);
+ } while ((m = m->next) != NULL);
+ }
+ return;
case imemo_ast:
- rb_ast_mark(&RANY(obj)->as.imemo.ast);
- return;
+ rb_ast_mark(&RANY(obj)->as.imemo.ast);
+ return;
case imemo_parser_strterm:
- rb_strterm_mark(obj);
- return;
+ rb_strterm_mark(obj);
+ return;
+ case imemo_callinfo:
+ return;
+ case imemo_callcache:
+ {
+ const struct rb_callcache *cc = (const struct rb_callcache *)obj;
+ // should not mark klass here
+ gc_mark(objspace, (VALUE)vm_cc_cme(cc));
+ }
+ return;
+ case imemo_constcache:
+ {
+ const struct iseq_inline_constant_cache_entry *ice = (struct iseq_inline_constant_cache_entry *)obj;
+ gc_mark(objspace, ice->value);
+ }
+ return;
#if VM_CHECK_MODE > 0
default:
- VM_UNREACHABLE(gc_mark_imemo);
+ VM_UNREACHABLE(gc_mark_imemo);
#endif
}
}
+static void mark_cvc_tbl(rb_objspace_t *objspace, VALUE klass);
+
static void
gc_mark_children(rb_objspace_t *objspace, VALUE obj)
{
@@ -5307,7 +7228,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
gc_mark_set_parent(objspace, obj);
if (FL_TEST(obj, FL_EXIVAR)) {
- rb_mark_generic_ivar(obj);
+ rb_mark_generic_ivar(obj);
}
switch (BUILTIN_TYPE(obj)) {
@@ -5320,16 +7241,19 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
case T_NIL:
case T_FIXNUM:
- rb_bug("rb_gc_mark() called for broken object");
- break;
+ rb_bug("rb_gc_mark() called for broken object");
+ break;
case T_NODE:
- UNEXPECTED_NODE(rb_gc_mark);
- break;
+ UNEXPECTED_NODE(rb_gc_mark);
+ break;
case T_IMEMO:
- gc_mark_imemo(objspace, obj);
- return;
+ gc_mark_imemo(objspace, obj);
+ return;
+
+ default:
+ break;
}
gc_mark(objspace, any->as.basic.klass);
@@ -5340,118 +7264,142 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
if (RCLASS_SUPER(obj)) {
gc_mark(objspace, RCLASS_SUPER(obj));
}
- if (!RCLASS_EXT(obj)) break;
+ if (!RCLASS_EXT(obj)) break;
+
mark_m_tbl(objspace, RCLASS_M_TBL(obj));
- mark_tbl_no_pin(objspace, RCLASS_IV_TBL(obj));
- mark_const_tbl(objspace, RCLASS_CONST_TBL(obj));
- break;
+ mark_cvc_tbl(objspace, obj);
+ cc_table_mark(objspace, obj);
+ for (attr_index_t i = 0; i < RCLASS_IV_COUNT(obj); i++) {
+ gc_mark(objspace, RCLASS_IVPTR(obj)[i]);
+ }
+ mark_const_tbl(objspace, RCLASS_CONST_TBL(obj));
+ break;
case T_ICLASS:
- if (FL_TEST(obj, RICLASS_IS_ORIGIN)) {
- mark_m_tbl(objspace, RCLASS_M_TBL(obj));
- }
+ if (RICLASS_OWNS_M_TBL_P(obj)) {
+ mark_m_tbl(objspace, RCLASS_M_TBL(obj));
+ }
if (RCLASS_SUPER(obj)) {
gc_mark(objspace, RCLASS_SUPER(obj));
}
- if (!RCLASS_EXT(obj)) break;
- mark_m_tbl(objspace, RCLASS_CALLABLE_M_TBL(obj));
- break;
+ if (!RCLASS_EXT(obj)) break;
+
+ if (RCLASS_INCLUDER(obj)) {
+ gc_mark(objspace, RCLASS_INCLUDER(obj));
+ }
+ mark_m_tbl(objspace, RCLASS_CALLABLE_M_TBL(obj));
+ cc_table_mark(objspace, obj);
+ break;
case T_ARRAY:
- if (FL_TEST(obj, ELTS_SHARED)) {
- VALUE root = any->as.array.as.heap.aux.shared_root;
+ if (ARY_SHARED_P(obj)) {
+ VALUE root = ARY_SHARED_ROOT(obj);
gc_mark(objspace, root);
- }
- else {
- long i, len = RARRAY_LEN(obj);
+ }
+ else {
+ long i, len = RARRAY_LEN(obj);
const VALUE *ptr = RARRAY_CONST_PTR_TRANSIENT(obj);
- for (i=0; i < len; i++) {
+ for (i=0; i < len; i++) {
gc_mark(objspace, ptr[i]);
- }
+ }
- if (objspace->mark_func_data == NULL) {
- if (!FL_TEST_RAW(obj, RARRAY_EMBED_FLAG) &&
- RARRAY_TRANSIENT_P(obj)) {
+ if (LIKELY(during_gc)) {
+ if (!ARY_EMBED_P(obj) && RARRAY_TRANSIENT_P(obj)) {
rb_transient_heap_mark(obj, ptr);
}
}
}
- break;
+ break;
case T_HASH:
mark_hash(objspace, obj);
- break;
+ break;
case T_STRING:
- if (STR_SHARED_P(obj)) {
- gc_mark(objspace, any->as.string.as.heap.aux.shared);
- }
- break;
+ if (STR_SHARED_P(obj)) {
+ gc_mark(objspace, any->as.string.as.heap.aux.shared);
+ }
+ break;
case T_DATA:
- {
- void *const ptr = DATA_PTR(obj);
- if (ptr) {
- RUBY_DATA_FUNC mark_func = RTYPEDDATA_P(obj) ?
- any->as.typeddata.type->function.dmark :
- any->as.data.dmark;
- if (mark_func) (*mark_func)(ptr);
- }
- }
- break;
+ {
+ void *const ptr = DATA_PTR(obj);
+ if (ptr) {
+ RUBY_DATA_FUNC mark_func = RTYPEDDATA_P(obj) ?
+ any->as.typeddata.type->function.dmark :
+ any->as.data.dmark;
+ if (mark_func) (*mark_func)(ptr);
+ }
+ }
+ break;
case T_OBJECT:
{
- const VALUE * const ptr = ROBJECT_IVPTR(obj);
+ rb_shape_t *shape = rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj));
+ if (rb_shape_obj_too_complex(obj)) {
+ mark_tbl_no_pin(objspace, ROBJECT_IV_HASH(obj));
+ }
+ else {
+ const VALUE * const ptr = ROBJECT_IVPTR(obj);
- if (ptr) {
- uint32_t i, len = ROBJECT_NUMIV(obj);
+ uint32_t i, len = ROBJECT_IV_COUNT(obj);
for (i = 0; i < len; i++) {
gc_mark(objspace, ptr[i]);
}
- if (objspace->mark_func_data == NULL &&
- ROBJ_TRANSIENT_P(obj)) {
+ if (LIKELY(during_gc) &&
+ ROBJ_TRANSIENT_P(obj)) {
rb_transient_heap_mark(obj, ptr);
}
}
+ if (shape) {
+ VALUE klass = RBASIC_CLASS(obj);
+
+ // Increment max_iv_count if applicable, used to determine size pool allocation
+ uint32_t num_of_ivs = shape->next_iv_index;
+ if (RCLASS_EXT(klass)->max_iv_count < num_of_ivs) {
+ RCLASS_EXT(klass)->max_iv_count = num_of_ivs;
+ }
+ }
}
- break;
+ break;
case T_FILE:
if (any->as.file.fptr) {
+ gc_mark(objspace, any->as.file.fptr->self);
gc_mark(objspace, any->as.file.fptr->pathv);
gc_mark(objspace, any->as.file.fptr->tied_io_for_writing);
gc_mark(objspace, any->as.file.fptr->writeconv_asciicompat);
gc_mark(objspace, any->as.file.fptr->writeconv_pre_ecopts);
gc_mark(objspace, any->as.file.fptr->encs.ecopts);
gc_mark(objspace, any->as.file.fptr->write_lock);
+ gc_mark(objspace, any->as.file.fptr->timeout);
}
break;
case T_REGEXP:
gc_mark(objspace, any->as.regexp.src);
- break;
+ break;
case T_MATCH:
- gc_mark(objspace, any->as.match.regexp);
- if (any->as.match.str) {
- gc_mark(objspace, any->as.match.str);
- }
- break;
+ gc_mark(objspace, any->as.match.regexp);
+ if (any->as.match.str) {
+ gc_mark(objspace, any->as.match.str);
+ }
+ break;
case T_RATIONAL:
- gc_mark(objspace, any->as.rational.num);
- gc_mark(objspace, any->as.rational.den);
- break;
+ gc_mark(objspace, any->as.rational.num);
+ gc_mark(objspace, any->as.rational.den);
+ break;
case T_COMPLEX:
- gc_mark(objspace, any->as.complex.real);
- gc_mark(objspace, any->as.complex.imag);
- break;
+ gc_mark(objspace, any->as.complex.real);
+ gc_mark(objspace, any->as.complex.imag);
+ break;
case T_STRUCT:
- {
+ {
long i;
const long len = RSTRUCT_LEN(obj);
const VALUE * const ptr = RSTRUCT_CONST_PTR(obj);
@@ -5460,23 +7408,23 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
gc_mark(objspace, ptr[i]);
}
- if (objspace->mark_func_data == NULL &&
+ if (LIKELY(during_gc) &&
RSTRUCT_TRANSIENT_P(obj)) {
rb_transient_heap_mark(obj, ptr);
}
- }
- break;
+ }
+ break;
default:
#if GC_DEBUG
- rb_gcdebug_print_obj_condition((VALUE)obj);
+ rb_gcdebug_print_obj_condition((VALUE)obj);
#endif
if (BUILTIN_TYPE(obj) == T_MOVED) rb_bug("rb_gc_mark(): %p is T_MOVED", (void *)obj);
- if (BUILTIN_TYPE(obj) == T_NONE) rb_bug("rb_gc_mark(): %p is T_NONE", (void *)obj);
- if (BUILTIN_TYPE(obj) == T_ZOMBIE) rb_bug("rb_gc_mark(): %p is T_ZOMBIE", (void *)obj);
- rb_bug("rb_gc_mark(): unknown data type 0x%x(%p) %s",
- BUILTIN_TYPE(obj), (void *)any,
- is_pointer_to_heap(objspace, any) ? "corrupted object" : "non object");
+ if (BUILTIN_TYPE(obj) == T_NONE) rb_bug("rb_gc_mark(): %p is T_NONE", (void *)obj);
+ if (BUILTIN_TYPE(obj) == T_ZOMBIE) rb_bug("rb_gc_mark(): %p is T_ZOMBIE", (void *)obj);
+ rb_bug("rb_gc_mark(): unknown data type 0x%x(%p) %s",
+ BUILTIN_TYPE(obj), (void *)any,
+ is_pointer_to_heap(objspace, any) ? "corrupted object" : "non object");
}
}
@@ -5495,39 +7443,39 @@ gc_mark_stacked_objects(rb_objspace_t *objspace, int incremental, size_t count)
#endif
while (pop_mark_stack(mstack, &obj)) {
- if (obj == Qundef) continue; /* skip */
+ if (UNDEF_P(obj)) continue; /* skip */
- if (RGENGC_CHECK_MODE && !RVALUE_MARKED(obj)) {
- rb_bug("gc_mark_stacked_objects: %s is not marked.", obj_info(obj));
- }
+ if (RGENGC_CHECK_MODE && !RVALUE_MARKED(obj)) {
+ rb_bug("gc_mark_stacked_objects: %s is not marked.", obj_info(obj));
+ }
gc_mark_children(objspace, obj);
#if GC_ENABLE_INCREMENTAL_MARK
- if (incremental) {
- if (RGENGC_CHECK_MODE && !RVALUE_MARKING(obj)) {
- rb_bug("gc_mark_stacked_objects: incremental, but marking bit is 0");
- }
- CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
- popped_count++;
+ if (incremental) {
+ if (RGENGC_CHECK_MODE && !RVALUE_MARKING(obj)) {
+ rb_bug("gc_mark_stacked_objects: incremental, but marking bit is 0");
+ }
+ CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
+ popped_count++;
- if (popped_count + (objspace->marked_slots - marked_slots_at_the_beginning) > count) {
- break;
- }
- }
- else {
- /* just ignore marking bits */
- }
+ if (popped_count + (objspace->marked_slots - marked_slots_at_the_beginning) > count) {
+ break;
+ }
+ }
+ else {
+ /* just ignore marking bits */
+ }
#endif
}
if (RGENGC_CHECK_MODE >= 3) gc_verify_internal_consistency(objspace);
if (is_mark_stack_empty(mstack)) {
- shrink_stack_chunk_cache(mstack);
- return TRUE;
+ shrink_stack_chunk_cache(mstack);
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -5554,13 +7502,13 @@ show_mark_ticks(void)
int i;
fprintf(stderr, "mark ticks result:\n");
for (i=0; i<MAX_TICKS; i++) {
- const char *category = mark_ticks_categories[i];
- if (category) {
- fprintf(stderr, "%s\t%8lu\n", category, (unsigned long)mark_ticks[i]);
- }
- else {
- break;
- }
+ const char *category = mark_ticks_categories[i];
+ if (category) {
+ fprintf(stderr, "%s\t%8lu\n", category, (unsigned long)mark_ticks[i]);
+ }
+ else {
+ break;
+ }
}
}
@@ -5579,23 +7527,21 @@ gc_mark_roots(rb_objspace_t *objspace, const char **categoryp)
const char *prev_category = 0;
if (mark_ticks_categories[0] == 0) {
- atexit(show_mark_ticks);
+ atexit(show_mark_ticks);
}
#endif
if (categoryp) *categoryp = "xxx";
-#if USE_RGENGC
objspace->rgengc.parent_object = Qfalse;
-#endif
#if PRINT_ROOT_TICKS
#define MARK_CHECKPOINT_PRINT_TICK(category) do { \
if (prev_category) { \
- tick_t t = tick(); \
- mark_ticks[tick_count] = t - start_tick; \
- mark_ticks_categories[tick_count] = prev_category; \
- tick_count++; \
+ tick_t t = tick(); \
+ mark_ticks[tick_count] = t - start_tick; \
+ mark_ticks_categories[tick_count] = prev_category; \
+ tick_count++; \
} \
prev_category = category; \
start_tick = tick(); \
@@ -5676,8 +7622,8 @@ static void
reflist_add(struct reflist *refs, VALUE obj)
{
if (refs->pos == refs->size) {
- refs->size *= 2;
- SIZED_REALLOC_N(refs->list, VALUE, refs->size, refs->size/2);
+ refs->size *= 2;
+ SIZED_REALLOC_N(refs->list, VALUE, refs->size, refs->size/2);
}
refs->list[refs->pos++] = obj;
@@ -5688,14 +7634,14 @@ reflist_dump(struct reflist *refs)
{
int i;
for (i=0; i<refs->pos; i++) {
- VALUE obj = refs->list[i];
- if (IS_ROOTSIG(obj)) { /* root */
- fprintf(stderr, "<root@%s>", GET_ROOTSIG(obj));
- }
- else {
- fprintf(stderr, "<%s>", obj_info(obj));
- }
- if (i+1 < refs->pos) fprintf(stderr, ", ");
+ VALUE obj = refs->list[i];
+ if (IS_ROOTSIG(obj)) { /* root */
+ fprintf(stderr, "<root@%s>", GET_ROOTSIG(obj));
+ }
+ else {
+ fprintf(stderr, "<%s>", obj_info(obj));
+ }
+ if (i+1 < refs->pos) fprintf(stderr, ", ");
}
}
@@ -5704,8 +7650,8 @@ reflist_referred_from_machine_context(struct reflist *refs)
{
int i;
for (i=0; i<refs->pos; i++) {
- VALUE obj = refs->list[i];
- if (IS_ROOTSIG(obj) && strcmp(GET_ROOTSIG(obj), "machine_context") == 0) return 1;
+ VALUE obj = refs->list[i];
+ if (IS_ROOTSIG(obj) && strcmp(GET_ROOTSIG(obj), "machine_context") == 0) return 1;
}
return 0;
}
@@ -5729,15 +7675,17 @@ static int
allrefs_add(struct allrefs *data, VALUE obj)
{
struct reflist *refs;
+ st_data_t r;
- if (st_lookup(data->references, obj, (st_data_t *)&refs)) {
- reflist_add(refs, data->root_obj);
- return 0;
+ if (st_lookup(data->references, obj, &r)) {
+ refs = (struct reflist *)r;
+ reflist_add(refs, data->root_obj);
+ return 0;
}
else {
- refs = reflist_create(data->root_obj);
- st_insert(data->references, obj, (st_data_t)refs);
- return 1;
+ refs = reflist_create(data->root_obj);
+ st_insert(data->references, obj, (st_data_t)refs);
+ return 1;
}
}
@@ -5747,7 +7695,7 @@ allrefs_i(VALUE obj, void *ptr)
struct allrefs *data = (struct allrefs *)ptr;
if (allrefs_add(data, obj)) {
- push_mark_stack(&data->mark_stack, obj);
+ push_mark_stack(&data->mark_stack, obj);
}
}
@@ -5759,18 +7707,23 @@ allrefs_roots_i(VALUE obj, void *ptr)
data->root_obj = MAKE_ROOTSIG(data->category);
if (allrefs_add(data, obj)) {
- push_mark_stack(&data->mark_stack, obj);
+ push_mark_stack(&data->mark_stack, obj);
}
}
+#define PUSH_MARK_FUNC_DATA(v) do { \
+ struct gc_mark_func_data_struct *prev_mark_func_data = GET_RACTOR()->mfd; \
+ GET_RACTOR()->mfd = (v);
+
+#define POP_MARK_FUNC_DATA() GET_RACTOR()->mfd = prev_mark_func_data;} while (0)
static st_table *
objspace_allrefs(rb_objspace_t *objspace)
{
struct allrefs data;
- struct mark_func_data_struct mfd;
+ struct gc_mark_func_data_struct mfd;
VALUE obj;
- int prev_dont_gc = dont_gc;
- dont_gc = TRUE;
+ int prev_dont_gc = dont_gc_val();
+ dont_gc_on();
data.objspace = objspace;
data.references = st_init_numtable();
@@ -5781,22 +7734,22 @@ objspace_allrefs(rb_objspace_t *objspace)
/* traverse root objects */
PUSH_MARK_FUNC_DATA(&mfd);
- objspace->mark_func_data = &mfd;
+ GET_RACTOR()->mfd = &mfd;
gc_mark_roots(objspace, &data.category);
POP_MARK_FUNC_DATA();
/* traverse rest objects reachable from root objects */
while (pop_mark_stack(&data.mark_stack, &obj)) {
- rb_objspace_reachable_objects_from(data.root_obj = obj, allrefs_i, &data);
+ rb_objspace_reachable_objects_from(data.root_obj = obj, allrefs_i, &data);
}
free_stack_chunks(&data.mark_stack);
- dont_gc = prev_dont_gc;
+ dont_gc_set(prev_dont_gc);
return data.references;
}
static int
-objspace_allrefs_destruct_i(st_data_t key, st_data_t value, void *ptr)
+objspace_allrefs_destruct_i(st_data_t key, st_data_t value, st_data_t ptr)
{
struct reflist *refs = (struct reflist *)value;
reflist_destruct(refs);
@@ -5825,13 +7778,14 @@ allrefs_dump_i(st_data_t k, st_data_t v, st_data_t ptr)
static void
allrefs_dump(rb_objspace_t *objspace)
{
- fprintf(stderr, "[all refs] (size: %d)\n", (int)objspace->rgengc.allrefs_table->num_entries);
+ VALUE size = objspace->rgengc.allrefs_table->num_entries;
+ fprintf(stderr, "[all refs] (size: %"PRIuVALUE")\n", size);
st_foreach(objspace->rgengc.allrefs_table, allrefs_dump_i, 0);
}
#endif
static int
-gc_check_after_marks_i(st_data_t k, st_data_t v, void *ptr)
+gc_check_after_marks_i(st_data_t k, st_data_t v, st_data_t ptr)
{
VALUE obj = k;
struct reflist *refs = (struct reflist *)v;
@@ -5839,18 +7793,18 @@ gc_check_after_marks_i(st_data_t k, st_data_t v, void *ptr)
/* object should be marked or oldgen */
if (!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj)) {
- fprintf(stderr, "gc_check_after_marks_i: %s is not marked and not oldgen.\n", obj_info(obj));
- fprintf(stderr, "gc_check_after_marks_i: %p is referred from ", (void *)obj);
- reflist_dump(refs);
-
- if (reflist_referred_from_machine_context(refs)) {
- fprintf(stderr, " (marked from machine stack).\n");
- /* marked from machine context can be false positive */
- }
- else {
- objspace->rgengc.error_count++;
- fprintf(stderr, "\n");
- }
+ fprintf(stderr, "gc_check_after_marks_i: %s is not marked and not oldgen.\n", obj_info(obj));
+ fprintf(stderr, "gc_check_after_marks_i: %p is referred from ", (void *)obj);
+ reflist_dump(refs);
+
+ if (reflist_referred_from_machine_context(refs)) {
+ fprintf(stderr, " (marked from machine stack).\n");
+ /* marked from machine context can be false positive */
+ }
+ else {
+ objspace->rgengc.error_count++;
+ fprintf(stderr, "\n");
+ }
}
return ST_CONTINUE;
}
@@ -5862,25 +7816,25 @@ gc_marks_check(rb_objspace_t *objspace, st_foreach_callback_func *checker_func,
#if RGENGC_ESTIMATE_OLDMALLOC
size_t saved_oldmalloc_increase = objspace->rgengc.oldmalloc_increase;
#endif
- VALUE already_disabled = rb_gc_disable();
+ VALUE already_disabled = rb_objspace_gc_disable(objspace);
objspace->rgengc.allrefs_table = objspace_allrefs(objspace);
if (checker_func) {
- st_foreach(objspace->rgengc.allrefs_table, checker_func, (st_data_t)objspace);
+ st_foreach(objspace->rgengc.allrefs_table, checker_func, (st_data_t)objspace);
}
if (objspace->rgengc.error_count > 0) {
#if RGENGC_CHECK_MODE >= 5
- allrefs_dump(objspace);
+ allrefs_dump(objspace);
#endif
- if (checker_name) rb_bug("%s: GC has problem.", checker_name);
+ if (checker_name) rb_bug("%s: GC has problem.", checker_name);
}
objspace_allrefs_destruct(objspace->rgengc.allrefs_table);
objspace->rgengc.allrefs_table = 0;
- if (already_disabled == Qfalse) rb_gc_enable();
+ if (already_disabled == Qfalse) rb_objspace_gc_enable(objspace);
objspace->malloc_params.increase = saved_malloc_increase;
#if RGENGC_ESTIMATE_OLDMALLOC
objspace->rgengc.oldmalloc_increase = saved_oldmalloc_increase;
@@ -5894,14 +7848,11 @@ struct verify_internal_consistency_struct {
size_t live_object_count;
size_t zombie_object_count;
-#if USE_RGENGC
VALUE parent;
size_t old_object_count;
size_t remembered_shady_count;
-#endif
};
-#if USE_RGENGC
static void
check_generation_i(const VALUE child, void *ptr)
{
@@ -5911,12 +7862,12 @@ check_generation_i(const VALUE child, void *ptr)
if (RGENGC_CHECK_MODE) GC_ASSERT(RVALUE_OLD_P(parent));
if (!RVALUE_OLD_P(child)) {
- if (!RVALUE_REMEMBERED(parent) &&
- !RVALUE_REMEMBERED(child) &&
- !RVALUE_UNCOLLECTIBLE(child)) {
- fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (O->Y) %s -> %s\n", obj_info(parent), obj_info(child));
- data->err_count++;
- }
+ if (!RVALUE_REMEMBERED(parent) &&
+ !RVALUE_REMEMBERED(child) &&
+ !RVALUE_UNCOLLECTIBLE(child)) {
+ fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (O->Y) %s -> %s\n", obj_info(parent), obj_info(child));
+ data->err_count++;
+ }
}
}
@@ -5927,12 +7878,11 @@ check_color_i(const VALUE child, void *ptr)
const VALUE parent = data->parent;
if (!RVALUE_WB_UNPROTECTED(parent) && RVALUE_WHITE_P(child)) {
- fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (B->W) - %s -> %s\n",
- obj_info(parent), obj_info(child));
- data->err_count++;
+ fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (B->W) - %s -> %s\n",
+ obj_info(parent), obj_info(child));
+ data->err_count++;
}
}
-#endif
static void
check_children_i(const VALUE child, void *ptr)
@@ -5948,19 +7898,18 @@ check_children_i(const VALUE child, void *ptr)
}
static int
-verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, void *ptr)
+verify_internal_consistency_i(void *page_start, void *page_end, size_t stride,
+ struct verify_internal_consistency_struct *data)
{
- struct verify_internal_consistency_struct *data = (struct verify_internal_consistency_struct *)ptr;
VALUE obj;
rb_objspace_t *objspace = data->objspace;
for (obj = (VALUE)page_start; obj != (VALUE)page_end; obj += stride) {
- void *poisoned = asan_poisoned_object_p(obj);
- asan_unpoison_object(obj, false);
+ void *poisoned = asan_unpoison_object_temporary(obj);
- if (is_live_object(objspace, obj)) {
- /* count objects */
- data->live_object_count++;
+ if (is_live_object(objspace, obj)) {
+ /* count objects */
+ data->live_object_count++;
data->parent = obj;
/* Normally, we don't expect T_MOVED objects to be in the heap.
@@ -5970,32 +7919,30 @@ verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, v
rb_objspace_reachable_objects_from(obj, check_children_i, (void *)data);
}
-#if USE_RGENGC
- /* check health of children */
- if (RVALUE_OLD_P(obj)) data->old_object_count++;
- if (RVALUE_WB_UNPROTECTED(obj) && RVALUE_UNCOLLECTIBLE(obj)) data->remembered_shady_count++;
-
- if (!is_marking(objspace) && RVALUE_OLD_P(obj)) {
- /* reachable objects from an oldgen object should be old or (young with remember) */
- data->parent = obj;
- rb_objspace_reachable_objects_from(obj, check_generation_i, (void *)data);
- }
-
- if (is_incremental_marking(objspace)) {
- if (RVALUE_BLACK_P(obj)) {
- /* reachable objects from black objects should be black or grey objects */
- data->parent = obj;
- rb_objspace_reachable_objects_from(obj, check_color_i, (void *)data);
- }
- }
-#endif
- }
- else {
- if (BUILTIN_TYPE(obj) == T_ZOMBIE) {
- GC_ASSERT((RBASIC(obj)->flags & ~FL_SEEN_OBJ_ID) == T_ZOMBIE);
- data->zombie_object_count++;
- }
- }
+ /* check health of children */
+ if (RVALUE_OLD_P(obj)) data->old_object_count++;
+ if (RVALUE_WB_UNPROTECTED(obj) && RVALUE_UNCOLLECTIBLE(obj)) data->remembered_shady_count++;
+
+ if (!is_marking(objspace) && RVALUE_OLD_P(obj)) {
+ /* reachable objects from an oldgen object should be old or (young with remember) */
+ data->parent = obj;
+ rb_objspace_reachable_objects_from(obj, check_generation_i, (void *)data);
+ }
+
+ if (is_incremental_marking(objspace)) {
+ if (RVALUE_BLACK_P(obj)) {
+ /* reachable objects from black objects should be black or grey objects */
+ data->parent = obj;
+ rb_objspace_reachable_objects_from(obj, check_color_i, (void *)data);
+ }
+ }
+ }
+ else {
+ if (BUILTIN_TYPE(obj) == T_ZOMBIE) {
+ GC_ASSERT((RBASIC(obj)->flags & ~FL_SEEN_OBJ_ID) == T_ZOMBIE);
+ data->zombie_object_count++;
+ }
+ }
if (poisoned) {
GC_ASSERT(BUILTIN_TYPE(obj) == T_NONE);
asan_poison_object(obj);
@@ -6008,28 +7955,30 @@ verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, v
static int
gc_verify_heap_page(rb_objspace_t *objspace, struct heap_page *page, VALUE obj)
{
-#if USE_RGENGC
- int i;
unsigned int has_remembered_shady = FALSE;
unsigned int has_remembered_old = FALSE;
int remembered_old_objects = 0;
int free_objects = 0;
int zombie_objects = 0;
- for (i=0; i<page->total_slots; i++) {
- VALUE val = (VALUE)&page->start[i];
- void *poisoned = asan_poisoned_object_p(val);
- asan_unpoison_object(val, false);
-
- if (RBASIC(val) == 0) free_objects++;
- if (BUILTIN_TYPE(val) == T_ZOMBIE) zombie_objects++;
- if (RVALUE_PAGE_UNCOLLECTIBLE(page, val) && RVALUE_PAGE_WB_UNPROTECTED(page, val)) {
- has_remembered_shady = TRUE;
- }
- if (RVALUE_PAGE_MARKING(page, val)) {
- has_remembered_old = TRUE;
- remembered_old_objects++;
- }
+ short slot_size = page->slot_size;
+ uintptr_t start = (uintptr_t)page->start;
+ uintptr_t end = start + page->total_slots * slot_size;
+
+ for (uintptr_t ptr = start; ptr < end; ptr += slot_size) {
+ VALUE val = (VALUE)ptr;
+ void *poisoned = asan_unpoison_object_temporary(val);
+ enum ruby_value_type type = BUILTIN_TYPE(val);
+
+ if (type == T_NONE) free_objects++;
+ if (type == T_ZOMBIE) zombie_objects++;
+ if (RVALUE_PAGE_UNCOLLECTIBLE(page, val) && RVALUE_PAGE_WB_UNPROTECTED(page, val)) {
+ has_remembered_shady = TRUE;
+ }
+ if (RVALUE_PAGE_MARKING(page, val)) {
+ has_remembered_old = TRUE;
+ remembered_old_objects++;
+ }
if (poisoned) {
GC_ASSERT(BUILTIN_TYPE(val) == T_NONE);
@@ -6038,62 +7987,60 @@ gc_verify_heap_page(rb_objspace_t *objspace, struct heap_page *page, VALUE obj)
}
if (!is_incremental_marking(objspace) &&
- page->flags.has_remembered_objects == FALSE && has_remembered_old == TRUE) {
+ page->flags.has_remembered_objects == FALSE && has_remembered_old == TRUE) {
- for (i=0; i<page->total_slots; i++) {
- VALUE val = (VALUE)&page->start[i];
- if (RVALUE_PAGE_MARKING(page, val)) {
- fprintf(stderr, "marking -> %s\n", obj_info(val));
- }
- }
- rb_bug("page %p's has_remembered_objects should be false, but there are remembered old objects (%d). %s",
- (void *)page, remembered_old_objects, obj ? obj_info(obj) : "");
+ for (uintptr_t ptr = start; ptr < end; ptr += slot_size) {
+ VALUE val = (VALUE)ptr;
+ if (RVALUE_PAGE_MARKING(page, val)) {
+ fprintf(stderr, "marking -> %s\n", obj_info(val));
+ }
+ }
+ rb_bug("page %p's has_remembered_objects should be false, but there are remembered old objects (%d). %s",
+ (void *)page, remembered_old_objects, obj ? obj_info(obj) : "");
}
if (page->flags.has_uncollectible_shady_objects == FALSE && has_remembered_shady == TRUE) {
- rb_bug("page %p's has_remembered_shady should be false, but there are remembered shady objects. %s",
- (void *)page, obj ? obj_info(obj) : "");
+ rb_bug("page %p's has_remembered_shady should be false, but there are remembered shady objects. %s",
+ (void *)page, obj ? obj_info(obj) : "");
}
if (0) {
- /* free_slots may not equal to free_objects */
- if (page->free_slots != free_objects) {
- rb_bug("page %p's free_slots should be %d, but %d\n", (void *)page, (int)page->free_slots, free_objects);
- }
+ /* free_slots may not equal to free_objects */
+ if (page->free_slots != free_objects) {
+ rb_bug("page %p's free_slots should be %d, but %d\n", (void *)page, page->free_slots, free_objects);
+ }
}
if (page->final_slots != zombie_objects) {
- rb_bug("page %p's final_slots should be %d, but %d\n", (void *)page, (int)page->final_slots, zombie_objects);
+ rb_bug("page %p's final_slots should be %d, but %d\n", (void *)page, page->final_slots, zombie_objects);
}
return remembered_old_objects;
-#else
- return 0;
-#endif
}
static int
-gc_verify_heap_pages_(rb_objspace_t *objspace, struct list_head *head)
+gc_verify_heap_pages_(rb_objspace_t *objspace, struct ccan_list_head *head)
{
int remembered_old_objects = 0;
struct heap_page *page = 0;
- list_for_each(head, page, page_node) {
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
+ ccan_list_for_each(head, page, page_node) {
+ asan_unlock_freelist(page);
RVALUE *p = page->freelist;
while (p) {
- RVALUE *prev = p;
- asan_unpoison_object((VALUE)p, false);
- if (BUILTIN_TYPE(p) != T_NONE) {
- fprintf(stderr, "freelist slot expected to be T_NONE but was: %s\n", obj_info((VALUE)p));
+ VALUE vp = (VALUE)p;
+ VALUE prev = vp;
+ asan_unpoison_object(vp, false);
+ if (BUILTIN_TYPE(vp) != T_NONE) {
+ fprintf(stderr, "freelist slot expected to be T_NONE but was: %s\n", obj_info(vp));
}
p = p->as.free.next;
- asan_poison_object((VALUE)prev);
+ asan_poison_object(prev);
}
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ asan_lock_freelist(page);
- if (page->flags.has_remembered_objects == FALSE) {
- remembered_old_objects += gc_verify_heap_page(objspace, page, Qfalse);
- }
+ if (page->flags.has_remembered_objects == FALSE) {
+ remembered_old_objects += gc_verify_heap_page(objspace, page, Qfalse);
+ }
}
return remembered_old_objects;
@@ -6103,8 +8050,10 @@ static int
gc_verify_heap_pages(rb_objspace_t *objspace)
{
int remembered_old_objects = 0;
- remembered_old_objects += gc_verify_heap_pages_(objspace, &heap_eden->pages);
- remembered_old_objects += gc_verify_heap_pages_(objspace, &heap_tomb->pages);
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ remembered_old_objects += gc_verify_heap_pages_(objspace, &(SIZE_POOL_EDEN_HEAP(&size_pools[i])->pages));
+ remembered_old_objects += gc_verify_heap_pages_(objspace, &(SIZE_POOL_TOMB_HEAP(&size_pools[i])->pages));
+ }
return remembered_old_objects;
}
@@ -6122,12 +8071,11 @@ static VALUE
gc_verify_internal_consistency_m(VALUE dummy)
{
gc_verify_internal_consistency(&rb_objspace);
-
return Qnil;
}
static void
-gc_verify_internal_consistency(rb_objspace_t *objspace)
+gc_verify_internal_consistency_(rb_objspace_t *objspace)
{
struct verify_internal_consistency_struct data = {0};
@@ -6135,16 +8083,23 @@ gc_verify_internal_consistency(rb_objspace_t *objspace)
gc_report(5, objspace, "gc_verify_internal_consistency: start\n");
/* check relations */
+ for (size_t i = 0; i < heap_allocated_pages; i++) {
+ struct heap_page *page = heap_pages_sorted[i];
+ short slot_size = page->slot_size;
+
+ uintptr_t start = (uintptr_t)page->start;
+ uintptr_t end = start + page->total_slots * slot_size;
- objspace_each_objects_without_setup(objspace, verify_internal_consistency_i, &data);
+ verify_internal_consistency_i((void *)start, (void *)end, slot_size, &data);
+ }
if (data.err_count != 0) {
#if RGENGC_CHECK_MODE >= 5
- objspace->rgengc.error_count = data.err_count;
- gc_marks_check(objspace, NULL, NULL);
- allrefs_dump(objspace);
+ objspace->rgengc.error_count = data.err_count;
+ gc_marks_check(objspace, NULL, NULL);
+ allrefs_dump(objspace);
#endif
- rb_bug("gc_verify_internal_consistency: found internal inconsistency.");
+ rb_bug("gc_verify_internal_consistency: found internal inconsistency.");
}
/* check heap_page status */
@@ -6152,52 +8107,73 @@ gc_verify_internal_consistency(rb_objspace_t *objspace)
/* check counters */
- if (!is_lazy_sweeping(heap_eden) && !finalizing) {
- if (objspace_live_slots(objspace) != data.live_object_count) {
- fprintf(stderr, "heap_pages_final_slots: %d, objspace->profile.total_freed_objects: %d\n",
- (int)heap_pages_final_slots, (int)objspace->profile.total_freed_objects);
- rb_bug("inconsistent live slot number: expect %"PRIuSIZE", but %"PRIuSIZE".", objspace_live_slots(objspace), data.live_object_count);
- }
+ if (!is_lazy_sweeping(objspace) &&
+ !finalizing &&
+ ruby_single_main_ractor != NULL) {
+ if (objspace_live_slots(objspace) != data.live_object_count) {
+ fprintf(stderr, "heap_pages_final_slots: %"PRIdSIZE", "
+ "objspace->profile.total_freed_objects: %"PRIdSIZE"\n",
+ heap_pages_final_slots, objspace->profile.total_freed_objects);
+ rb_bug("inconsistent live slot number: expect %"PRIuSIZE", but %"PRIuSIZE".",
+ objspace_live_slots(objspace), data.live_object_count);
+ }
}
-#if USE_RGENGC
if (!is_marking(objspace)) {
- if (objspace->rgengc.old_objects != data.old_object_count) {
- rb_bug("inconsistent old slot number: expect %"PRIuSIZE", but %"PRIuSIZE".", objspace->rgengc.old_objects, data.old_object_count);
- }
- if (objspace->rgengc.uncollectible_wb_unprotected_objects != data.remembered_shady_count) {
- rb_bug("inconsistent old slot number: expect %"PRIuSIZE", but %"PRIuSIZE".", objspace->rgengc.uncollectible_wb_unprotected_objects, data.remembered_shady_count);
- }
+ if (objspace->rgengc.old_objects != data.old_object_count) {
+ rb_bug("inconsistent old slot number: expect %"PRIuSIZE", but %"PRIuSIZE".",
+ objspace->rgengc.old_objects, data.old_object_count);
+ }
+ if (objspace->rgengc.uncollectible_wb_unprotected_objects != data.remembered_shady_count) {
+ rb_bug("inconsistent number of wb unprotected objects: expect %"PRIuSIZE", but %"PRIuSIZE".",
+ objspace->rgengc.uncollectible_wb_unprotected_objects, data.remembered_shady_count);
+ }
}
-#endif
if (!finalizing) {
- size_t list_count = 0;
+ size_t list_count = 0;
- {
- VALUE z = heap_pages_deferred_final;
- while (z) {
- list_count++;
- z = RZOMBIE(z)->next;
- }
- }
+ {
+ VALUE z = heap_pages_deferred_final;
+ while (z) {
+ list_count++;
+ z = RZOMBIE(z)->next;
+ }
+ }
- if (heap_pages_final_slots != data.zombie_object_count ||
- heap_pages_final_slots != list_count) {
+ if (heap_pages_final_slots != data.zombie_object_count ||
+ heap_pages_final_slots != list_count) {
- rb_bug("inconsistent finalizing object count:\n"
- " expect %"PRIuSIZE"\n"
- " but %"PRIuSIZE" zombies\n"
- " heap_pages_deferred_final list has %"PRIuSIZE" items.",
- heap_pages_final_slots,
- data.zombie_object_count,
- list_count);
- }
+ rb_bug("inconsistent finalizing object count:\n"
+ " expect %"PRIuSIZE"\n"
+ " but %"PRIuSIZE" zombies\n"
+ " heap_pages_deferred_final list has %"PRIuSIZE" items.",
+ heap_pages_final_slots,
+ data.zombie_object_count,
+ list_count);
+ }
}
gc_report(5, objspace, "gc_verify_internal_consistency: OK\n");
}
+static void
+gc_verify_internal_consistency(rb_objspace_t *objspace)
+{
+ RB_VM_LOCK_ENTER();
+ {
+ rb_vm_barrier(); // stop other ractors
+
+ unsigned int prev_during_gc = during_gc;
+ during_gc = FALSE; // stop gc here
+ {
+ gc_verify_internal_consistency_(objspace);
+ }
+ during_gc = prev_during_gc;
+ }
+ RB_VM_LOCK_LEAVE();
+}
+
void
rb_gc_verify_internal_consistency(void)
{
@@ -6211,6 +8187,27 @@ gc_verify_transient_heap_internal_consistency(VALUE dmy)
return Qnil;
}
+#if GC_ENABLE_INCREMENTAL_MARK
+static void
+heap_move_pooled_pages_to_free_pages(rb_heap_t *heap)
+{
+ if (heap->pooled_pages) {
+ if (heap->free_pages) {
+ struct heap_page *free_pages_tail = heap->free_pages;
+ while (free_pages_tail->free_next) {
+ free_pages_tail = free_pages_tail->free_next;
+ }
+ free_pages_tail->free_next = heap->pooled_pages;
+ }
+ else {
+ heap->free_pages = heap->pooled_pages;
+ }
+
+ heap->pooled_pages = NULL;
+ }
+}
+#endif
+
/* marks */
static void
@@ -6220,118 +8217,121 @@ gc_marks_start(rb_objspace_t *objspace, int full_mark)
gc_report(1, objspace, "gc_marks_start: (%s)\n", full_mark ? "full" : "minor");
gc_mode_transition(objspace, gc_mode_marking);
-#if USE_RGENGC
if (full_mark) {
#if GC_ENABLE_INCREMENTAL_MARK
- objspace->rincgc.step_slots = (objspace->marked_slots * 2) / ((objspace->rincgc.pooled_slots / HEAP_PAGE_OBJ_LIMIT) + 1);
+ size_t incremental_marking_steps = (objspace->rincgc.pooled_slots / INCREMENTAL_MARK_STEP_ALLOCATIONS) + 1;
+ objspace->rincgc.step_slots = (objspace->marked_slots * 2) / incremental_marking_steps;
- if (0) fprintf(stderr, "objspace->marked_slots: %d, objspace->rincgc.pooled_page_num: %d, objspace->rincgc.step_slots: %d, \n",
- (int)objspace->marked_slots, (int)objspace->rincgc.pooled_slots, (int)objspace->rincgc.step_slots);
+ if (0) fprintf(stderr, "objspace->marked_slots: %"PRIdSIZE", "
+ "objspace->rincgc.pooled_page_num: %"PRIdSIZE", "
+ "objspace->rincgc.step_slots: %"PRIdSIZE", \n",
+ objspace->marked_slots, objspace->rincgc.pooled_slots, objspace->rincgc.step_slots);
#endif
- objspace->flags.during_minor_gc = FALSE;
- objspace->profile.major_gc_count++;
- objspace->rgengc.uncollectible_wb_unprotected_objects = 0;
- objspace->rgengc.old_objects = 0;
- objspace->rgengc.last_major_gc = objspace->profile.count;
- objspace->marked_slots = 0;
- rgengc_mark_and_rememberset_clear(objspace, heap_eden);
+ objspace->flags.during_minor_gc = FALSE;
+ if (ruby_enable_autocompact) {
+ objspace->flags.during_compacting |= TRUE;
+ }
+ objspace->profile.major_gc_count++;
+ objspace->rgengc.uncollectible_wb_unprotected_objects = 0;
+ objspace->rgengc.old_objects = 0;
+ objspace->rgengc.last_major_gc = objspace->profile.count;
+ objspace->marked_slots = 0;
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+ rgengc_mark_and_rememberset_clear(objspace, heap);
+ heap_move_pooled_pages_to_free_pages(heap);
+ }
}
else {
- objspace->flags.during_minor_gc = TRUE;
- objspace->marked_slots =
- objspace->rgengc.old_objects + objspace->rgengc.uncollectible_wb_unprotected_objects; /* uncollectible objects are marked already */
- objspace->profile.minor_gc_count++;
- rgengc_rememberset_mark(objspace, heap_eden);
+ objspace->flags.during_minor_gc = TRUE;
+ objspace->marked_slots =
+ objspace->rgengc.old_objects + objspace->rgengc.uncollectible_wb_unprotected_objects; /* uncollectible objects are marked already */
+ objspace->profile.minor_gc_count++;
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rgengc_rememberset_mark(objspace, SIZE_POOL_EDEN_HEAP(&size_pools[i]));
+ }
}
-#endif
gc_mark_roots(objspace, NULL);
- gc_report(1, objspace, "gc_marks_start: (%s) end, stack in %d\n", full_mark ? "full" : "minor", (int)mark_stack_size(&objspace->mark_stack));
+ gc_report(1, objspace, "gc_marks_start: (%s) end, stack in %"PRIdSIZE"\n",
+ full_mark ? "full" : "minor", mark_stack_size(&objspace->mark_stack));
}
#if GC_ENABLE_INCREMENTAL_MARK
+static inline void
+gc_marks_wb_unprotected_objects_plane(rb_objspace_t *objspace, uintptr_t p, bits_t bits)
+{
+ if (bits) {
+ do {
+ if (bits & 1) {
+ gc_report(2, objspace, "gc_marks_wb_unprotected_objects: marked shady: %s\n", obj_info((VALUE)p));
+ GC_ASSERT(RVALUE_WB_UNPROTECTED((VALUE)p));
+ GC_ASSERT(RVALUE_MARKED((VALUE)p));
+ gc_mark_children(objspace, (VALUE)p);
+ }
+ p += BASE_SLOT_SIZE;
+ bits >>= 1;
+ } while (bits);
+ }
+}
+
static void
-gc_marks_wb_unprotected_objects(rb_objspace_t *objspace)
+gc_marks_wb_unprotected_objects(rb_objspace_t *objspace, rb_heap_t *heap)
{
struct heap_page *page = 0;
- list_for_each(&heap_eden->pages, page, page_node) {
- bits_t *mark_bits = page->mark_bits;
- bits_t *wbun_bits = page->wb_unprotected_bits;
- RVALUE *p = page->start;
- RVALUE *offset = p - NUM_IN_PAGE(p);
- size_t j;
-
- for (j=0; j<HEAP_PAGE_BITMAP_LIMIT; j++) {
- bits_t bits = mark_bits[j] & wbun_bits[j];
-
- if (bits) {
- p = offset + j * BITS_BITLENGTH;
-
- do {
- if (bits & 1) {
- gc_report(2, objspace, "gc_marks_wb_unprotected_objects: marked shady: %s\n", obj_info((VALUE)p));
- GC_ASSERT(RVALUE_WB_UNPROTECTED((VALUE)p));
- GC_ASSERT(RVALUE_MARKED((VALUE)p));
- gc_mark_children(objspace, (VALUE)p);
- }
- p++;
- bits >>= 1;
- } while (bits);
- }
- }
- }
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ bits_t *mark_bits = page->mark_bits;
+ bits_t *wbun_bits = page->wb_unprotected_bits;
+ uintptr_t p = page->start;
+ size_t j;
- gc_mark_stacked_objects_all(objspace);
-}
+ bits_t bits = mark_bits[0] & wbun_bits[0];
+ bits >>= NUM_IN_PAGE(p);
+ gc_marks_wb_unprotected_objects_plane(objspace, p, bits);
+ p += (BITS_BITLENGTH - NUM_IN_PAGE(p)) * BASE_SLOT_SIZE;
-static struct heap_page *
-heap_move_pooled_pages_to_free_pages(rb_heap_t *heap)
-{
- struct heap_page *page = heap->pooled_pages;
+ for (j=1; j<HEAP_PAGE_BITMAP_LIMIT; j++) {
+ bits_t bits = mark_bits[j] & wbun_bits[j];
- if (page) {
- heap->pooled_pages = page->free_next;
- heap_add_freepage(heap, page);
+ gc_marks_wb_unprotected_objects_plane(objspace, p, bits);
+ p += BITS_BITLENGTH * BASE_SLOT_SIZE;
+ }
}
- return page;
+ gc_mark_stacked_objects_all(objspace);
}
#endif
-static int
+static void
gc_marks_finish(rb_objspace_t *objspace)
{
#if GC_ENABLE_INCREMENTAL_MARK
/* finish incremental GC */
if (is_incremental_marking(objspace)) {
- if (heap_eden->pooled_pages) {
- heap_move_pooled_pages_to_free_pages(heap_eden);
- gc_report(1, objspace, "gc_marks_finish: pooled pages are exists. retry.\n");
- return FALSE; /* continue marking phase */
- }
-
- if (RGENGC_CHECK_MODE && is_mark_stack_empty(&objspace->mark_stack) == 0) {
- rb_bug("gc_marks_finish: mark stack is not empty (%d).", (int)mark_stack_size(&objspace->mark_stack));
- }
-
- gc_mark_roots(objspace, 0);
+ if (RGENGC_CHECK_MODE && is_mark_stack_empty(&objspace->mark_stack) == 0) {
+ rb_bug("gc_marks_finish: mark stack is not empty (%"PRIdSIZE").",
+ mark_stack_size(&objspace->mark_stack));
+ }
- if (is_mark_stack_empty(&objspace->mark_stack) == FALSE) {
- gc_report(1, objspace, "gc_marks_finish: not empty (%d). retry.\n", (int)mark_stack_size(&objspace->mark_stack));
- return FALSE;
- }
+ gc_mark_roots(objspace, 0);
+ while (gc_mark_stacked_objects_incremental(objspace, INT_MAX) == false);
#if RGENGC_CHECK_MODE >= 2
- if (gc_verify_heap_pages(objspace) != 0) {
- rb_bug("gc_marks_finish (incremental): there are remembered old objects.");
- }
+ if (gc_verify_heap_pages(objspace) != 0) {
+ rb_bug("gc_marks_finish (incremental): there are remembered old objects.");
+ }
#endif
- objspace->flags.during_incremental_marking = FALSE;
- /* check children of all marked wb-unprotected objects */
- gc_marks_wb_unprotected_objects(objspace);
+ objspace->flags.during_incremental_marking = FALSE;
+ /* check children of all marked wb-unprotected objects */
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ gc_marks_wb_unprotected_objects(objspace, SIZE_POOL_EDEN_HEAP(&size_pools[i]));
+ }
}
#endif /* GC_ENABLE_INCREMENTAL_MARK */
@@ -6339,113 +8339,335 @@ gc_marks_finish(rb_objspace_t *objspace)
gc_verify_internal_consistency(objspace);
#endif
-#if USE_RGENGC
if (is_full_marking(objspace)) {
- /* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */
- const double r = gc_params.oldobject_limit_factor;
- objspace->rgengc.uncollectible_wb_unprotected_objects_limit = (size_t)(objspace->rgengc.uncollectible_wb_unprotected_objects * r);
- objspace->rgengc.old_objects_limit = (size_t)(objspace->rgengc.old_objects * r);
+ /* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */
+ const double r = gc_params.oldobject_limit_factor;
+ objspace->rgengc.uncollectible_wb_unprotected_objects_limit = (size_t)(objspace->rgengc.uncollectible_wb_unprotected_objects * r);
+ objspace->rgengc.old_objects_limit = (size_t)(objspace->rgengc.old_objects * r);
}
-#endif
#if RGENGC_CHECK_MODE >= 4
+ during_gc = FALSE;
gc_marks_check(objspace, gc_check_after_marks_i, "after_marks");
+ during_gc = TRUE;
#endif
{
- /* decide full GC is needed or not */
- rb_heap_t *heap = heap_eden;
- size_t total_slots = heap_allocatable_pages * HEAP_PAGE_OBJ_LIMIT + heap->total_slots;
- size_t sweep_slots = total_slots - objspace->marked_slots; /* will be swept slots */
- size_t max_free_slots = (size_t)(total_slots * gc_params.heap_free_slots_max_ratio);
- size_t min_free_slots = (size_t)(total_slots * gc_params.heap_free_slots_min_ratio);
- int full_marking = is_full_marking(objspace);
-
- GC_ASSERT(heap->total_slots >= objspace->marked_slots);
-
- /* setup free-able page counts */
- if (max_free_slots < gc_params.heap_init_slots) max_free_slots = gc_params.heap_init_slots;
-
- if (sweep_slots > max_free_slots) {
- heap_pages_freeable_pages = (sweep_slots - max_free_slots) / HEAP_PAGE_OBJ_LIMIT;
- }
- else {
- heap_pages_freeable_pages = 0;
- }
-
- /* check free_min */
- if (min_free_slots < gc_params.heap_free_slots) min_free_slots = gc_params.heap_free_slots;
-
-#if USE_RGENGC
- if (sweep_slots < min_free_slots) {
- if (!full_marking) {
- if (objspace->profile.count - objspace->rgengc.last_major_gc < RVALUE_OLD_AGE) {
- full_marking = TRUE;
- /* do not update last_major_gc, because full marking is not done. */
- goto increment;
- }
- else {
- gc_report(1, objspace, "gc_marks_finish: next is full GC!!)\n");
- objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_NOFREE;
- }
- }
- else {
- increment:
- gc_report(1, objspace, "gc_marks_finish: heap_set_increment!!\n");
- heap_set_increment(objspace, heap_extend_pages(objspace, sweep_slots, total_slots));
- heap_increment(objspace, heap);
- }
- }
-
- if (full_marking) {
- /* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */
- const double r = gc_params.oldobject_limit_factor;
- objspace->rgengc.uncollectible_wb_unprotected_objects_limit = (size_t)(objspace->rgengc.uncollectible_wb_unprotected_objects * r);
- objspace->rgengc.old_objects_limit = (size_t)(objspace->rgengc.old_objects * r);
- }
-
- if (objspace->rgengc.uncollectible_wb_unprotected_objects > objspace->rgengc.uncollectible_wb_unprotected_objects_limit) {
- objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_SHADY;
- }
- if (objspace->rgengc.old_objects > objspace->rgengc.old_objects_limit) {
- objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_OLDGEN;
- }
- if (RGENGC_FORCE_MAJOR_GC) {
- objspace->rgengc.need_major_gc = GPR_FLAG_MAJOR_BY_FORCE;
- }
-
- gc_report(1, objspace, "gc_marks_finish (marks %d objects, old %d objects, total %d slots, sweep %d slots, increment: %d, next GC: %s)\n",
- (int)objspace->marked_slots, (int)objspace->rgengc.old_objects, (int)heap->total_slots, (int)sweep_slots, (int)heap_allocatable_pages,
- objspace->rgengc.need_major_gc ? "major" : "minor");
-#else /* USE_RGENGC */
- if (sweep_slots < min_free_slots) {
- gc_report(1, objspace, "gc_marks_finish: heap_set_increment!!\n");
- heap_set_increment(objspace, heap_extend_pages(objspace, sweep_slot, total_slot));
- heap_increment(objspace, heap);
- }
+ /* decide full GC is needed or not */
+ size_t total_slots = heap_allocatable_slots(objspace) + heap_eden_total_slots(objspace);
+ size_t sweep_slots = total_slots - objspace->marked_slots; /* will be swept slots */
+ size_t max_free_slots = (size_t)(total_slots * gc_params.heap_free_slots_max_ratio);
+ size_t min_free_slots = (size_t)(total_slots * gc_params.heap_free_slots_min_ratio);
+ int full_marking = is_full_marking(objspace);
+ const int r_cnt = GET_VM()->ractor.cnt;
+ const int r_mul = r_cnt > 8 ? 8 : r_cnt; // upto 8
+
+ GC_ASSERT(heap_eden_total_slots(objspace) >= objspace->marked_slots);
+
+ /* setup free-able page counts */
+ if (max_free_slots < gc_params.heap_init_slots * r_mul) {
+ max_free_slots = gc_params.heap_init_slots * r_mul;
+ }
+
+ if (sweep_slots > max_free_slots) {
+ heap_pages_freeable_pages = (sweep_slots - max_free_slots) / HEAP_PAGE_OBJ_LIMIT;
+ }
+ else {
+ heap_pages_freeable_pages = 0;
+ }
+
+ /* check free_min */
+ if (min_free_slots < gc_params.heap_free_slots * r_mul) {
+ min_free_slots = gc_params.heap_free_slots * r_mul;
+ }
+
+ if (sweep_slots < min_free_slots) {
+ if (!full_marking) {
+ if (objspace->profile.count - objspace->rgengc.last_major_gc < RVALUE_OLD_AGE) {
+ full_marking = TRUE;
+ /* do not update last_major_gc, because full marking is not done. */
+ /* goto increment; */
+ }
+ else {
+ gc_report(1, objspace, "gc_marks_finish: next is full GC!!)\n");
+ objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_NOFREE;
+ }
+ }
+
+#if !USE_RVARGC
+ if (full_marking) {
+ /* increment: */
+ gc_report(1, objspace, "gc_marks_finish: heap_set_increment!!\n");
+ rb_size_pool_t *size_pool = &size_pools[0];
+ size_pool_allocatable_pages_set(objspace, size_pool, heap_extend_pages(objspace, size_pool, sweep_slots, total_slots, heap_allocated_pages + heap_allocatable_pages(objspace)));
+
+ heap_increment(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
+ }
#endif
+ }
+
+ if (full_marking) {
+ /* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */
+ const double r = gc_params.oldobject_limit_factor;
+ objspace->rgengc.uncollectible_wb_unprotected_objects_limit = (size_t)(objspace->rgengc.uncollectible_wb_unprotected_objects * r);
+ objspace->rgengc.old_objects_limit = (size_t)(objspace->rgengc.old_objects * r);
+ }
+
+ if (objspace->rgengc.uncollectible_wb_unprotected_objects > objspace->rgengc.uncollectible_wb_unprotected_objects_limit) {
+ objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_SHADY;
+ }
+ if (objspace->rgengc.old_objects > objspace->rgengc.old_objects_limit) {
+ objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_OLDGEN;
+ }
+ if (RGENGC_FORCE_MAJOR_GC) {
+ objspace->rgengc.need_major_gc = GPR_FLAG_MAJOR_BY_FORCE;
+ }
+
+ gc_report(1, objspace, "gc_marks_finish (marks %"PRIdSIZE" objects, "
+ "old %"PRIdSIZE" objects, total %"PRIdSIZE" slots, "
+ "sweep %"PRIdSIZE" slots, increment: %"PRIdSIZE", next GC: %s)\n",
+ objspace->marked_slots, objspace->rgengc.old_objects, heap_eden_total_slots(objspace), sweep_slots, heap_allocatable_pages(objspace),
+ objspace->rgengc.need_major_gc ? "major" : "minor");
}
rb_transient_heap_finish_marking();
+ rb_ractor_finish_marking();
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_MARK, 0);
-
- return TRUE;
}
+#if GC_ENABLE_INCREMENTAL_MARK
static void
-gc_marks_step(rb_objspace_t *objspace, int slots)
+gc_marks_step(rb_objspace_t *objspace, size_t slots)
{
-#if GC_ENABLE_INCREMENTAL_MARK
GC_ASSERT(is_marking(objspace));
if (gc_mark_stacked_objects_incremental(objspace, slots)) {
- if (gc_marks_finish(objspace)) {
- /* finish */
- gc_sweep(objspace);
- }
+ gc_marks_finish(objspace);
+ gc_sweep(objspace);
}
- if (0) fprintf(stderr, "objspace->marked_slots: %d\n", (int)objspace->marked_slots);
+ if (0) fprintf(stderr, "objspace->marked_slots: %"PRIdSIZE"\n", objspace->marked_slots);
+}
+#endif
+
+static bool
+gc_compact_heap_cursors_met_p(rb_heap_t *heap)
+{
+ return heap->sweeping_page == heap->compact_cursor;
+}
+
+static rb_size_pool_t *
+gc_compact_destination_pool(rb_objspace_t *objspace, rb_size_pool_t *src_pool, VALUE src)
+{
+ size_t obj_size;
+ size_t idx = 0;
+
+ switch (BUILTIN_TYPE(src)) {
+ case T_ARRAY:
+ obj_size = rb_ary_size_as_embedded(src);
+ break;
+
+ case T_OBJECT:
+ if (rb_shape_obj_too_complex(src)) {
+ return &size_pools[0];
+ }
+ else {
+ obj_size = rb_obj_embedded_size(ROBJECT_IV_CAPACITY(src));
+ }
+ break;
+
+ case T_STRING:
+ obj_size = rb_str_size_as_embedded(src);
+ break;
+
+ default:
+ return src_pool;
+ }
+
+ if (rb_gc_size_allocatable_p(obj_size)){
+ idx = size_pool_idx_for_size(obj_size);
+ }
+ return &size_pools[idx];
+}
+
+static bool
+gc_compact_move(rb_objspace_t *objspace, rb_heap_t *heap, rb_size_pool_t *size_pool, VALUE src)
+{
+ GC_ASSERT(BUILTIN_TYPE(src) != T_MOVED);
+ GC_ASSERT(gc_is_moveable_obj(objspace, src));
+
+ rb_size_pool_t *dest_pool = gc_compact_destination_pool(objspace, size_pool, src);
+ rb_heap_t *dheap = SIZE_POOL_EDEN_HEAP(dest_pool);
+ rb_shape_t *new_shape = NULL;
+ rb_shape_t *orig_shape = NULL;
+
+ if (gc_compact_heap_cursors_met_p(dheap)) {
+ return dheap != heap;
+ }
+
+ if (RB_TYPE_P(src, T_OBJECT)) {
+ orig_shape = rb_shape_get_shape(src);
+ if (dheap != heap && !rb_shape_obj_too_complex(src)) {
+ rb_shape_t *initial_shape = rb_shape_get_shape_by_id((shape_id_t)((dest_pool - size_pools) + SIZE_POOL_COUNT));
+ new_shape = rb_shape_traverse_from_new_root(initial_shape, orig_shape);
+
+ if (!new_shape) {
+ dest_pool = size_pool;
+ dheap = heap;
+ }
+ }
+ }
+
+ while (!try_move(objspace, dheap, dheap->free_pages, src)) {
+ struct gc_sweep_context ctx = {
+ .page = dheap->sweeping_page,
+ .final_slots = 0,
+ .freed_slots = 0,
+ .empty_slots = 0,
+ };
+
+ /* The page of src could be partially compacted, so it may contain
+ * T_MOVED. Sweeping a page may read objects on this page, so we
+ * need to lock the page. */
+ lock_page_body(objspace, GET_PAGE_BODY(src));
+ gc_sweep_page(objspace, dheap, &ctx);
+ unlock_page_body(objspace, GET_PAGE_BODY(src));
+
+ if (dheap->sweeping_page->free_slots > 0) {
+ heap_add_freepage(dheap, dheap->sweeping_page);
+ };
+
+ dheap->sweeping_page = ccan_list_next(&dheap->pages, dheap->sweeping_page, page_node);
+ if (gc_compact_heap_cursors_met_p(dheap)) {
+ return dheap != heap;
+ }
+ }
+
+ if (orig_shape) {
+ if (new_shape) {
+ VALUE dest = rb_gc_location(src);
+ rb_shape_set_shape(dest, new_shape);
+ }
+ RMOVED(src)->original_shape_id = rb_shape_id(orig_shape);
+ }
+
+ return true;
+}
+
+static bool
+gc_compact_plane(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, uintptr_t p, bits_t bitset, struct heap_page *page)
+{
+ short slot_size = page->slot_size;
+ short slot_bits = slot_size / BASE_SLOT_SIZE;
+ GC_ASSERT(slot_bits > 0);
+
+ do {
+ VALUE vp = (VALUE)p;
+ GC_ASSERT(vp % sizeof(RVALUE) == 0);
+
+ if (bitset & 1) {
+ objspace->rcompactor.considered_count_table[BUILTIN_TYPE(vp)]++;
+
+ if (gc_is_moveable_obj(objspace, vp)) {
+ if (!gc_compact_move(objspace, heap, size_pool, vp)) {
+ //the cursors met. bubble up
+ return false;
+ }
+ }
+ }
+ p += slot_size;
+ bitset >>= slot_bits;
+ } while (bitset);
+
+ return true;
+}
+
+// Iterate up all the objects in page, moving them to where they want to go
+static bool
+gc_compact_page(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, struct heap_page *page)
+{
+ GC_ASSERT(page == heap->compact_cursor);
+
+ bits_t *mark_bits, *pin_bits;
+ bits_t bitset;
+ uintptr_t p = page->start;
+
+ mark_bits = page->mark_bits;
+ pin_bits = page->pinned_bits;
+
+ // objects that can be moved are marked and not pinned
+ bitset = (mark_bits[0] & ~pin_bits[0]);
+ bitset >>= NUM_IN_PAGE(p);
+ if (bitset) {
+ if (!gc_compact_plane(objspace, size_pool, heap, (uintptr_t)p, bitset, page))
+ return false;
+ }
+ p += (BITS_BITLENGTH - NUM_IN_PAGE(p)) * BASE_SLOT_SIZE;
+
+ for (int j = 1; j < HEAP_PAGE_BITMAP_LIMIT; j++) {
+ bitset = (mark_bits[j] & ~pin_bits[j]);
+ if (bitset) {
+ if (!gc_compact_plane(objspace, size_pool, heap, (uintptr_t)p, bitset, page))
+ return false;
+ }
+ p += BITS_BITLENGTH * BASE_SLOT_SIZE;
+ }
+
+ return true;
+}
+
+static bool
+gc_compact_all_compacted_p(rb_objspace_t *objspace)
+{
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+
+ if (heap->total_pages > 0 &&
+ !gc_compact_heap_cursors_met_p(heap)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+static void
+gc_sweep_compact(rb_objspace_t *objspace)
+{
+ gc_compact_start(objspace);
+#if RGENGC_CHECK_MODE >= 2
+ gc_verify_internal_consistency(objspace);
+#endif
+
+ while (!gc_compact_all_compacted_p(objspace)) {
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+
+ if (gc_compact_heap_cursors_met_p(heap)) {
+ continue;
+ }
+
+ struct heap_page *start_page = heap->compact_cursor;
+
+ if (!gc_compact_page(objspace, size_pool, heap, start_page)) {
+ lock_page_body(objspace, GET_PAGE_BODY(start_page->start));
+
+ continue;
+ }
+
+ // If we get here, we've finished moving all objects on the compact_cursor page
+ // So we can lock it and move the cursor on to the next one.
+ lock_page_body(objspace, GET_PAGE_BODY(start_page->start));
+ heap->compact_cursor = ccan_list_prev(&heap->pages, heap->compact_cursor, page_node);
+ }
+ }
+
+ gc_compact_finish(objspace);
+
+#if RGENGC_CHECK_MODE >= 2
+ gc_verify_internal_consistency(objspace);
#endif
}
@@ -6455,60 +8677,44 @@ gc_marks_rest(rb_objspace_t *objspace)
gc_report(1, objspace, "gc_marks_rest\n");
#if GC_ENABLE_INCREMENTAL_MARK
- heap_eden->pooled_pages = NULL;
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ SIZE_POOL_EDEN_HEAP(&size_pools[i])->pooled_pages = NULL;
+ }
#endif
if (is_incremental_marking(objspace)) {
- do {
- while (gc_mark_stacked_objects_incremental(objspace, INT_MAX) == FALSE);
- } while (gc_marks_finish(objspace) == FALSE);
+ while (gc_mark_stacked_objects_incremental(objspace, INT_MAX) == FALSE);
}
else {
- gc_mark_stacked_objects_all(objspace);
- gc_marks_finish(objspace);
+ gc_mark_stacked_objects_all(objspace);
}
+ gc_marks_finish(objspace);
+
/* move to sweep */
gc_sweep(objspace);
}
static void
-gc_marks_continue(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_marks_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- GC_ASSERT(dont_gc == FALSE);
+ GC_ASSERT(dont_gc_val() == FALSE);
#if GC_ENABLE_INCREMENTAL_MARK
- gc_enter(objspace, "marks_continue");
+ unsigned int lock_lev;
+ gc_enter(objspace, gc_enter_event_mark_continue, &lock_lev);
- PUSH_MARK_FUNC_DATA(NULL);
- {
- int slots = 0;
- const char *from;
-
- if (heap->pooled_pages) {
- while (heap->pooled_pages && slots < HEAP_PAGE_OBJ_LIMIT) {
- struct heap_page *page = heap_move_pooled_pages_to_free_pages(heap);
- slots += page->free_slots;
- }
- from = "pooled-pages";
- }
- else if (heap_increment(objspace, heap)) {
- slots = heap->free_pages->free_slots;
- from = "incremented-pages";
- }
-
- if (slots > 0) {
- gc_report(2, objspace, "gc_marks_continue: provide %d slots from %s.\n", slots, from);
- gc_marks_step(objspace, (int)objspace->rincgc.step_slots);
- }
- else {
- gc_report(2, objspace, "gc_marks_continue: no more pooled pages (stack depth: %d).\n", (int)mark_stack_size(&objspace->mark_stack));
- gc_marks_rest(objspace);
- }
+ if (heap->free_pages) {
+ gc_report(2, objspace, "gc_marks_continue: has pooled pages");
+ gc_marks_step(objspace, objspace->rincgc.step_slots);
+ }
+ else {
+ gc_report(2, objspace, "gc_marks_continue: no more pooled pages (stack depth: %"PRIdSIZE").\n",
+ mark_stack_size(&objspace->mark_stack));
+ gc_marks_rest(objspace);
}
- POP_MARK_FUNC_DATA();
- gc_exit(objspace, "marks_continue");
+ gc_exit(objspace, gc_enter_event_mark_continue, &lock_lev);
#endif
}
@@ -6517,29 +8723,19 @@ gc_marks(rb_objspace_t *objspace, int full_mark)
{
gc_prof_mark_timer_start(objspace);
- PUSH_MARK_FUNC_DATA(NULL);
- {
- /* setup marking */
+ /* setup marking */
-#if USE_RGENGC
- gc_marks_start(objspace, full_mark);
- if (!is_incremental_marking(objspace)) {
- gc_marks_rest(objspace);
- }
+ gc_marks_start(objspace, full_mark);
+ if (!is_incremental_marking(objspace)) {
+ gc_marks_rest(objspace);
+ }
#if RGENGC_PROFILE > 0
- if (gc_prof_record(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->old_objects = objspace->rgengc.old_objects;
- }
-#endif
-
-#else /* USE_RGENGC */
- gc_marks_start(objspace, TRUE);
- gc_marks_rest(objspace);
-#endif
+ if (gc_prof_record(objspace)) {
+ gc_profile_record *record = gc_prof_record(objspace);
+ record->old_objects = objspace->rgengc.old_objects;
}
- POP_MARK_FUNC_DATA();
+#endif
gc_prof_mark_timer_stop(objspace);
}
@@ -6549,36 +8745,32 @@ static void
gc_report_body(int level, rb_objspace_t *objspace, const char *fmt, ...)
{
if (level <= RGENGC_DEBUG) {
- char buf[1024];
- FILE *out = stderr;
- va_list args;
- const char *status = " ";
+ char buf[1024];
+ FILE *out = stderr;
+ va_list args;
+ const char *status = " ";
-#if USE_RGENGC
- if (during_gc) {
- status = is_full_marking(objspace) ? "+" : "-";
- }
- else {
- if (is_lazy_sweeping(heap_eden)) {
- status = "S";
- }
- if (is_incremental_marking(objspace)) {
- status = "M";
- }
- }
-#endif
+ if (during_gc) {
+ status = is_full_marking(objspace) ? "+" : "-";
+ }
+ else {
+ if (is_lazy_sweeping(objspace)) {
+ status = "S";
+ }
+ if (is_incremental_marking(objspace)) {
+ status = "M";
+ }
+ }
- va_start(args, fmt);
- vsnprintf(buf, 1024, fmt, args);
- va_end(args);
+ va_start(args, fmt);
+ vsnprintf(buf, 1024, fmt, args);
+ va_end(args);
- fprintf(out, "%s|", status);
- fputs(buf, out);
+ fprintf(out, "%s|", status);
+ fputs(buf, out);
}
}
-#if USE_RGENGC
-
/* bit operations */
static int
@@ -6596,12 +8788,12 @@ rgengc_remembersetbits_set(rb_objspace_t *objspace, VALUE obj)
GC_ASSERT(!is_incremental_marking(objspace));
if (MARKED_IN_BITMAP(bits, obj)) {
- return FALSE;
+ return FALSE;
}
else {
- page->flags.has_remembered_objects = TRUE;
- MARK_IN_BITMAP(bits, obj);
- return TRUE;
+ page->flags.has_remembered_objects = TRUE;
+ MARK_IN_BITMAP(bits, obj);
+ return TRUE;
}
}
@@ -6612,22 +8804,22 @@ static int
rgengc_remember(rb_objspace_t *objspace, VALUE obj)
{
gc_report(6, objspace, "rgengc_remember: %s %s\n", obj_info(obj),
- rgengc_remembersetbits_get(objspace, obj) ? "was already remembered" : "is remembered now");
+ rgengc_remembersetbits_get(objspace, obj) ? "was already remembered" : "is remembered now");
check_rvalue_consistency(obj);
if (RGENGC_CHECK_MODE) {
- if (RVALUE_WB_UNPROTECTED(obj)) rb_bug("rgengc_remember: %s is not wb protected.", obj_info(obj));
+ if (RVALUE_WB_UNPROTECTED(obj)) rb_bug("rgengc_remember: %s is not wb protected.", obj_info(obj));
}
#if RGENGC_PROFILE > 0
if (!rgengc_remembered(objspace, obj)) {
- if (RVALUE_WB_UNPROTECTED(obj) == 0) {
- objspace->profile.total_remembered_normal_object_count++;
+ if (RVALUE_WB_UNPROTECTED(obj) == 0) {
+ objspace->profile.total_remembered_normal_object_count++;
#if RGENGC_PROFILE >= 2
- objspace->profile.remembered_normal_object_count_types[BUILTIN_TYPE(obj)]++;
+ objspace->profile.remembered_normal_object_count_types[BUILTIN_TYPE(obj)]++;
#endif
- }
+ }
}
#endif /* RGENGC_PROFILE > 0 */
@@ -6653,6 +8845,25 @@ rgengc_remembered(rb_objspace_t *objspace, VALUE obj)
#define PROFILE_REMEMBERSET_MARK 0
#endif
+static inline void
+rgengc_rememberset_mark_plane(rb_objspace_t *objspace, uintptr_t p, bits_t bitset)
+{
+ if (bitset) {
+ do {
+ if (bitset & 1) {
+ VALUE obj = (VALUE)p;
+ gc_report(2, objspace, "rgengc_rememberset_mark: mark %s\n", obj_info(obj));
+ GC_ASSERT(RVALUE_UNCOLLECTIBLE(obj));
+ GC_ASSERT(RVALUE_OLD_P(obj) || RVALUE_WB_UNPROTECTED(obj));
+
+ gc_mark_children(objspace, obj);
+ }
+ p += BASE_SLOT_SIZE;
+ bitset >>= 1;
+ } while (bitset);
+ }
+}
+
static void
rgengc_rememberset_mark(rb_objspace_t *objspace, rb_heap_t *heap)
{
@@ -6663,50 +8874,39 @@ rgengc_rememberset_mark(rb_objspace_t *objspace, rb_heap_t *heap)
#endif
gc_report(1, objspace, "rgengc_rememberset_mark: start\n");
- list_for_each(&heap->pages, page, page_node) {
- if (page->flags.has_remembered_objects | page->flags.has_uncollectible_shady_objects) {
- RVALUE *p = page->start;
- RVALUE *offset = p - NUM_IN_PAGE(p);
- bits_t bitset, bits[HEAP_PAGE_BITMAP_LIMIT];
- bits_t *marking_bits = page->marking_bits;
- bits_t *uncollectible_bits = page->uncollectible_bits;
- bits_t *wb_unprotected_bits = page->wb_unprotected_bits;
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ if (page->flags.has_remembered_objects | page->flags.has_uncollectible_shady_objects) {
+ uintptr_t p = page->start;
+ bits_t bitset, bits[HEAP_PAGE_BITMAP_LIMIT];
+ bits_t *marking_bits = page->marking_bits;
+ bits_t *uncollectible_bits = page->uncollectible_bits;
+ bits_t *wb_unprotected_bits = page->wb_unprotected_bits;
#if PROFILE_REMEMBERSET_MARK
- if (page->flags.has_remembered_objects && page->flags.has_uncollectible_shady_objects) has_both++;
- else if (page->flags.has_remembered_objects) has_old++;
- else if (page->flags.has_uncollectible_shady_objects) has_shady++;
-#endif
- for (j=0; j<HEAP_PAGE_BITMAP_LIMIT; j++) {
- bits[j] = marking_bits[j] | (uncollectible_bits[j] & wb_unprotected_bits[j]);
- marking_bits[j] = 0;
- }
- page->flags.has_remembered_objects = FALSE;
-
- for (j=0; j < HEAP_PAGE_BITMAP_LIMIT; j++) {
- bitset = bits[j];
-
- if (bitset) {
- p = offset + j * BITS_BITLENGTH;
-
- do {
- if (bitset & 1) {
- VALUE obj = (VALUE)p;
- gc_report(2, objspace, "rgengc_rememberset_mark: mark %s\n", obj_info(obj));
- GC_ASSERT(RVALUE_UNCOLLECTIBLE(obj));
- GC_ASSERT(RVALUE_OLD_P(obj) || RVALUE_WB_UNPROTECTED(obj));
-
- gc_mark_children(objspace, obj);
- }
- p++;
- bitset >>= 1;
- } while (bitset);
- }
- }
- }
+ if (page->flags.has_remembered_objects && page->flags.has_uncollectible_shady_objects) has_both++;
+ else if (page->flags.has_remembered_objects) has_old++;
+ else if (page->flags.has_uncollectible_shady_objects) has_shady++;
+#endif
+ for (j=0; j<HEAP_PAGE_BITMAP_LIMIT; j++) {
+ bits[j] = marking_bits[j] | (uncollectible_bits[j] & wb_unprotected_bits[j]);
+ marking_bits[j] = 0;
+ }
+ page->flags.has_remembered_objects = FALSE;
+
+ bitset = bits[0];
+ bitset >>= NUM_IN_PAGE(p);
+ rgengc_rememberset_mark_plane(objspace, p, bitset);
+ p += (BITS_BITLENGTH - NUM_IN_PAGE(p)) * BASE_SLOT_SIZE;
+
+ for (j=1; j < HEAP_PAGE_BITMAP_LIMIT; j++) {
+ bitset = bits[j];
+ rgengc_rememberset_mark_plane(objspace, p, bitset);
+ p += BITS_BITLENGTH * BASE_SLOT_SIZE;
+ }
+ }
#if PROFILE_REMEMBERSET_MARK
- else {
- skip++;
- }
+ else {
+ skip++;
+ }
#endif
}
@@ -6721,13 +8921,13 @@ rgengc_mark_and_rememberset_clear(rb_objspace_t *objspace, rb_heap_t *heap)
{
struct heap_page *page = 0;
- list_for_each(&heap->pages, page, page_node) {
- memset(&page->mark_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
- memset(&page->uncollectible_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ memset(&page->mark_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
+ memset(&page->uncollectible_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
memset(&page->marking_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
memset(&page->pinned_bits[0], 0, HEAP_PAGE_BITMAP_SIZE);
- page->flags.has_uncollectible_shady_objects = FALSE;
- page->flags.has_remembered_objects = FALSE;
+ page->flags.has_uncollectible_shady_objects = FALSE;
+ page->flags.has_remembered_objects = FALSE;
}
}
@@ -6739,26 +8939,30 @@ static void
gc_writebarrier_generational(VALUE a, VALUE b, rb_objspace_t *objspace)
{
if (RGENGC_CHECK_MODE) {
- if (!RVALUE_OLD_P(a)) rb_bug("gc_writebarrier_generational: %s is not an old object.", obj_info(a));
- if ( RVALUE_OLD_P(b)) rb_bug("gc_writebarrier_generational: %s is an old object.", obj_info(b));
- if (is_incremental_marking(objspace)) rb_bug("gc_writebarrier_generational: called while incremental marking: %s -> %s", obj_info(a), obj_info(b));
+ if (!RVALUE_OLD_P(a)) rb_bug("gc_writebarrier_generational: %s is not an old object.", obj_info(a));
+ if ( RVALUE_OLD_P(b)) rb_bug("gc_writebarrier_generational: %s is an old object.", obj_info(b));
+ if (is_incremental_marking(objspace)) rb_bug("gc_writebarrier_generational: called while incremental marking: %s -> %s", obj_info(a), obj_info(b));
}
#if 1
/* mark `a' and remember (default behavior) */
if (!rgengc_remembered(objspace, a)) {
- rgengc_remember(objspace, a);
- gc_report(1, objspace, "gc_writebarrier_generational: %s (remembered) -> %s\n", obj_info(a), obj_info(b));
+ RB_VM_LOCK_ENTER_NO_BARRIER();
+ {
+ rgengc_remember(objspace, a);
+ }
+ RB_VM_LOCK_LEAVE_NO_BARRIER();
+ gc_report(1, objspace, "gc_writebarrier_generational: %s (remembered) -> %s\n", obj_info(a), obj_info(b));
}
#else
/* mark `b' and remember */
MARK_IN_BITMAP(GET_HEAP_MARK_BITS(b), b);
if (RVALUE_WB_UNPROTECTED(b)) {
- gc_remember_unprotected(objspace, b);
+ gc_remember_unprotected(objspace, b);
}
else {
- RVALUE_AGE_SET_OLD(objspace, b);
- rgengc_remember(objspace, b);
+ RVALUE_AGE_SET_OLD(objspace, b);
+ rgengc_remember(objspace, b);
}
gc_report(1, objspace, "gc_writebarrier_generational: %s -> %s (remembered)\n", obj_info(a), obj_info(b));
@@ -6787,26 +8991,30 @@ gc_writebarrier_incremental(VALUE a, VALUE b, rb_objspace_t *objspace)
gc_report(2, objspace, "gc_writebarrier_incremental: [LG] %p -> %s\n", (void *)a, obj_info(b));
if (RVALUE_BLACK_P(a)) {
- if (RVALUE_WHITE_P(b)) {
- if (!RVALUE_WB_UNPROTECTED(a)) {
- gc_report(2, objspace, "gc_writebarrier_incremental: [IN] %p -> %s\n", (void *)a, obj_info(b));
- gc_mark_from(objspace, b, a);
- }
- }
- else if (RVALUE_OLD_P(a) && !RVALUE_OLD_P(b)) {
- if (!RVALUE_WB_UNPROTECTED(b)) {
- gc_report(1, objspace, "gc_writebarrier_incremental: [GN] %p -> %s\n", (void *)a, obj_info(b));
- RVALUE_AGE_SET_OLD(objspace, b);
-
- if (RVALUE_BLACK_P(b)) {
- gc_grey(objspace, b);
- }
- }
- else {
- gc_report(1, objspace, "gc_writebarrier_incremental: [LL] %p -> %s\n", (void *)a, obj_info(b));
- gc_remember_unprotected(objspace, b);
- }
- }
+ if (RVALUE_WHITE_P(b)) {
+ if (!RVALUE_WB_UNPROTECTED(a)) {
+ gc_report(2, objspace, "gc_writebarrier_incremental: [IN] %p -> %s\n", (void *)a, obj_info(b));
+ gc_mark_from(objspace, b, a);
+ }
+ }
+ else if (RVALUE_OLD_P(a) && !RVALUE_OLD_P(b)) {
+ if (!RVALUE_WB_UNPROTECTED(b)) {
+ gc_report(1, objspace, "gc_writebarrier_incremental: [GN] %p -> %s\n", (void *)a, obj_info(b));
+ RVALUE_AGE_SET_OLD(objspace, b);
+
+ if (RVALUE_BLACK_P(b)) {
+ gc_grey(objspace, b);
+ }
+ }
+ else {
+ gc_report(1, objspace, "gc_writebarrier_incremental: [LL] %p -> %s\n", (void *)a, obj_info(b));
+ gc_remember_unprotected(objspace, b);
+ }
+ }
+
+ if (UNLIKELY(objspace->flags.during_compacting)) {
+ MARK_IN_BITMAP(GET_HEAP_PINNED_BITS(b), b);
+ }
}
}
#else
@@ -6818,53 +9026,74 @@ rb_gc_writebarrier(VALUE a, VALUE b)
{
rb_objspace_t *objspace = &rb_objspace;
- if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(a)) rb_bug("rb_gc_writebarrier: a is special const");
- if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(b)) rb_bug("rb_gc_writebarrier: b is special const");
+ if (RGENGC_CHECK_MODE) {
+ if (SPECIAL_CONST_P(a)) rb_bug("rb_gc_writebarrier: a is special const: %"PRIxVALUE, a);
+ if (SPECIAL_CONST_P(b)) rb_bug("rb_gc_writebarrier: b is special const: %"PRIxVALUE, b);
+ }
+ retry:
if (!is_incremental_marking(objspace)) {
- if (!RVALUE_OLD_P(a) || RVALUE_OLD_P(b)) {
- return;
- }
- else {
- gc_writebarrier_generational(a, b, objspace);
- }
+ if (!RVALUE_OLD_P(a) || RVALUE_OLD_P(b)) {
+ // do nothing
+ }
+ else {
+ gc_writebarrier_generational(a, b, objspace);
+ }
}
- else { /* slow path */
- gc_writebarrier_incremental(a, b, objspace);
+ else {
+ bool retry = false;
+ /* slow path */
+ RB_VM_LOCK_ENTER_NO_BARRIER();
+ {
+ if (is_incremental_marking(objspace)) {
+ gc_writebarrier_incremental(a, b, objspace);
+ }
+ else {
+ retry = true;
+ }
+ }
+ RB_VM_LOCK_LEAVE_NO_BARRIER();
+
+ if (retry) goto retry;
}
+ return;
}
void
rb_gc_writebarrier_unprotect(VALUE obj)
{
if (RVALUE_WB_UNPROTECTED(obj)) {
- return;
+ return;
}
else {
- rb_objspace_t *objspace = &rb_objspace;
+ rb_objspace_t *objspace = &rb_objspace;
- gc_report(2, objspace, "rb_gc_writebarrier_unprotect: %s %s\n", obj_info(obj),
- rgengc_remembered(objspace, obj) ? " (already remembered)" : "");
+ gc_report(2, objspace, "rb_gc_writebarrier_unprotect: %s %s\n", obj_info(obj),
+ rgengc_remembered(objspace, obj) ? " (already remembered)" : "");
- if (RVALUE_OLD_P(obj)) {
- gc_report(1, objspace, "rb_gc_writebarrier_unprotect: %s\n", obj_info(obj));
- RVALUE_DEMOTE(objspace, obj);
- gc_mark_set(objspace, obj);
- gc_remember_unprotected(objspace, obj);
+ RB_VM_LOCK_ENTER_NO_BARRIER();
+ {
+ if (RVALUE_OLD_P(obj)) {
+ gc_report(1, objspace, "rb_gc_writebarrier_unprotect: %s\n", obj_info(obj));
+ RVALUE_DEMOTE(objspace, obj);
+ gc_mark_set(objspace, obj);
+ gc_remember_unprotected(objspace, obj);
#if RGENGC_PROFILE
- objspace->profile.total_shade_operation_count++;
+ objspace->profile.total_shade_operation_count++;
#if RGENGC_PROFILE >= 2
- objspace->profile.shade_operation_count_types[BUILTIN_TYPE(obj)]++;
+ objspace->profile.shade_operation_count_types[BUILTIN_TYPE(obj)]++;
#endif /* RGENGC_PROFILE >= 2 */
#endif /* RGENGC_PROFILE */
- }
- else {
- RVALUE_AGE_RESET(obj);
- }
+ }
+ else {
+ RVALUE_AGE_RESET(obj);
+ }
- RB_DEBUG_COUNTER_INC(obj_wb_unprotect);
- MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
+ RB_DEBUG_COUNTER_INC(obj_wb_unprotect);
+ MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
+ }
+ RB_VM_LOCK_LEAVE_NO_BARRIER();
}
}
@@ -6879,14 +9108,14 @@ rb_gc_writebarrier_remember(VALUE obj)
gc_report(1, objspace, "rb_gc_writebarrier_remember: %s\n", obj_info(obj));
if (is_incremental_marking(objspace)) {
- if (RVALUE_BLACK_P(obj)) {
- gc_grey(objspace, obj);
- }
+ if (RVALUE_BLACK_P(obj)) {
+ gc_grey(objspace, obj);
+ }
}
else {
- if (RVALUE_OLD_P(obj)) {
- rgengc_remember(objspace, obj);
- }
+ if (RVALUE_OLD_P(obj)) {
+ rgengc_remember(objspace, obj);
+ }
}
}
@@ -6895,7 +9124,7 @@ static st_table *rgengc_unprotect_logging_table;
static int
rgengc_unprotect_logging_exit_func_i(st_data_t key, st_data_t val, st_data_t arg)
{
- fprintf(stderr, "%s\t%d\n", (char *)key, (int)val);
+ fprintf(stderr, "%s\t%"PRIuVALUE"\n", (char *)key, (VALUE)val);
return ST_CONTINUE;
}
@@ -6911,47 +9140,44 @@ rb_gc_unprotect_logging(void *objptr, const char *filename, int line)
VALUE obj = (VALUE)objptr;
if (rgengc_unprotect_logging_table == 0) {
- rgengc_unprotect_logging_table = st_init_strtable();
- atexit(rgengc_unprotect_logging_exit_func);
+ rgengc_unprotect_logging_table = st_init_strtable();
+ atexit(rgengc_unprotect_logging_exit_func);
}
if (RVALUE_WB_UNPROTECTED(obj) == 0) {
- char buff[0x100];
- st_data_t cnt = 1;
- char *ptr = buff;
+ char buff[0x100];
+ st_data_t cnt = 1;
+ char *ptr = buff;
- snprintf(ptr, 0x100 - 1, "%s|%s:%d", obj_info(obj), filename, line);
+ snprintf(ptr, 0x100 - 1, "%s|%s:%d", obj_info(obj), filename, line);
- if (st_lookup(rgengc_unprotect_logging_table, (st_data_t)ptr, &cnt)) {
- cnt++;
- }
- else {
- ptr = (strdup)(buff);
- if (!ptr) rb_memerror();
- }
- st_insert(rgengc_unprotect_logging_table, (st_data_t)ptr, cnt);
+ if (st_lookup(rgengc_unprotect_logging_table, (st_data_t)ptr, &cnt)) {
+ cnt++;
+ }
+ else {
+ ptr = (strdup)(buff);
+ if (!ptr) rb_memerror();
+ }
+ st_insert(rgengc_unprotect_logging_table, (st_data_t)ptr, cnt);
}
}
-#endif /* USE_RGENGC */
void
rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
{
-#if USE_RGENGC
rb_objspace_t *objspace = &rb_objspace;
if (RVALUE_WB_UNPROTECTED(obj) && !RVALUE_WB_UNPROTECTED(dest)) {
- if (!RVALUE_OLD_P(dest)) {
- MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(dest), dest);
- RVALUE_AGE_RESET_RAW(dest);
- }
- else {
- RVALUE_DEMOTE(objspace, dest);
- }
+ if (!RVALUE_OLD_P(dest)) {
+ MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(dest), dest);
+ RVALUE_AGE_RESET_RAW(dest);
+ }
+ else {
+ RVALUE_DEMOTE(objspace, dest);
+ }
}
check_rvalue_consistency(dest);
-#endif
}
/* RGENGC analysis information */
@@ -6959,17 +9185,13 @@ rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
VALUE
rb_obj_rgengc_writebarrier_protected_p(VALUE obj)
{
-#if USE_RGENGC
- return RVALUE_WB_UNPROTECTED(obj) ? Qfalse : Qtrue;
-#else
- return Qfalse;
-#endif
+ return RBOOL(!RVALUE_WB_UNPROTECTED(obj));
}
VALUE
rb_obj_rgengc_promoted_p(VALUE obj)
{
- return OBJ_PROMOTED(obj) ? Qtrue : Qfalse;
+ return RBOOL(OBJ_PROMOTED(obj));
}
size_t
@@ -6977,29 +9199,23 @@ rb_obj_gc_flags(VALUE obj, ID* flags, size_t max)
{
size_t n = 0;
static ID ID_marked;
-#if USE_RGENGC
static ID ID_wb_protected, ID_old, ID_marking, ID_uncollectible, ID_pinned;
-#endif
if (!ID_marked) {
#define I(s) ID_##s = rb_intern(#s);
- I(marked);
-#if USE_RGENGC
- I(wb_protected);
- I(old);
- I(marking);
- I(uncollectible);
+ I(marked);
+ I(wb_protected);
+ I(old);
+ I(marking);
+ I(uncollectible);
I(pinned);
-#endif
#undef I
}
-#if USE_RGENGC
if (RVALUE_WB_UNPROTECTED(obj) == 0 && n<max) flags[n++] = ID_wb_protected;
if (RVALUE_OLD_P(obj) && n<max) flags[n++] = ID_old;
if (RVALUE_UNCOLLECTIBLE(obj) && n<max) flags[n++] = ID_uncollectible;
if (MARKED_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj) && n<max) flags[n++] = ID_marking;
-#endif
if (MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) && n<max) flags[n++] = ID_marked;
if (MARKED_IN_BITMAP(GET_HEAP_PINNED_BITS(obj), obj) && n<max) flags[n++] = ID_pinned;
return n;
@@ -7008,51 +9224,30 @@ rb_obj_gc_flags(VALUE obj, ID* flags, size_t max)
/* GC */
void
-rb_gc_force_recycle(VALUE obj)
+rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache)
{
- rb_objspace_t *objspace = &rb_objspace;
+#if GC_ENABLE_INCREMENTAL_MARK
+ newobj_cache->incremental_mark_step_allocated_slots = 0;
+#endif
-#if USE_RGENGC
- int is_old = RVALUE_OLD_P(obj);
+ for (size_t size_pool_idx = 0; size_pool_idx < SIZE_POOL_COUNT; size_pool_idx++) {
+ rb_ractor_newobj_size_pool_cache_t *cache = &newobj_cache->size_pool_caches[size_pool_idx];
- gc_report(2, objspace, "rb_gc_force_recycle: %s\n", obj_info(obj));
+ struct heap_page *page = cache->using_page;
+ RVALUE *freelist = cache->freelist;
+ RUBY_DEBUG_LOG("ractor using_page:%p freelist:%p", (void *)page, (void *)freelist);
- if (is_old) {
- if (RVALUE_MARKED(obj)) {
- objspace->rgengc.old_objects--;
- }
- }
- CLEAR_IN_BITMAP(GET_HEAP_UNCOLLECTIBLE_BITS(obj), obj);
- CLEAR_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(obj), obj);
+ heap_page_freelist_append(page, freelist);
-#if GC_ENABLE_INCREMENTAL_MARK
- if (is_incremental_marking(objspace)) {
- if (MARKED_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj)) {
- invalidate_mark_stack(&objspace->mark_stack, obj);
- CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
- }
- CLEAR_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj);
- }
- else {
-#endif
- if (is_old || !GET_HEAP_PAGE(obj)->flags.before_sweep) {
- CLEAR_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj);
- }
- CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS(obj), obj);
-#if GC_ENABLE_INCREMENTAL_MARK
+ cache->using_page = NULL;
+ cache->freelist = NULL;
}
-#endif
-#endif
-
- objspace->profile.total_freed_objects++;
-
- heap_page_add_freeobj(objspace, GET_HEAP_PAGE(obj), obj);
+}
- /* Disable counting swept_slots because there are no meaning.
- * if (!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(p), p)) {
- * objspace->heap.swept_slots++;
- * }
- */
+void
+rb_gc_force_recycle(VALUE obj)
+{
+ /* no-op */
}
#ifndef MARK_OBJECT_ARY_BUCKET_SIZE
@@ -7062,15 +9257,22 @@ rb_gc_force_recycle(VALUE obj)
void
rb_gc_register_mark_object(VALUE obj)
{
- VALUE ary_ary = GET_VM()->mark_object_ary;
- VALUE ary = rb_ary_last(0, 0, ary_ary);
+ if (!is_pointer_to_heap(&rb_objspace, (void *)obj))
+ return;
- if (ary == Qnil || RARRAY_LEN(ary) >= MARK_OBJECT_ARY_BUCKET_SIZE) {
- ary = rb_ary_tmp_new(MARK_OBJECT_ARY_BUCKET_SIZE);
- rb_ary_push(ary_ary, ary);
- }
+ RB_VM_LOCK_ENTER();
+ {
+ VALUE ary_ary = GET_VM()->mark_object_ary;
+ VALUE ary = rb_ary_last(0, 0, ary_ary);
- rb_ary_push(ary, obj);
+ if (NIL_P(ary) || RARRAY_LEN(ary) >= MARK_OBJECT_ARY_BUCKET_SIZE) {
+ ary = rb_ary_hidden_new(MARK_OBJECT_ARY_BUCKET_SIZE);
+ rb_ary_push(ary_ary, ary);
+ }
+
+ rb_ary_push(ary, obj);
+ }
+ RB_VM_LOCK_LEAVE();
}
void
@@ -7079,10 +9281,23 @@ rb_gc_register_address(VALUE *addr)
rb_objspace_t *objspace = &rb_objspace;
struct gc_list *tmp;
+ VALUE obj = *addr;
+
tmp = ALLOC(struct gc_list);
tmp->next = global_list;
tmp->varptr = addr;
global_list = tmp;
+
+ /*
+ * Because some C extensions have assignment-then-register bugs,
+ * we guard `obj` here so that it would not get swept defensively.
+ */
+ RB_GC_GUARD(obj);
+ if (0 && !SPECIAL_CONST_P(obj)) {
+ rb_warn("Object is assigned to registering address already: %"PRIsVALUE,
+ rb_obj_class(obj));
+ rb_print_backtrace();
+ }
}
void
@@ -7092,19 +9307,19 @@ rb_gc_unregister_address(VALUE *addr)
struct gc_list *tmp = global_list;
if (tmp->varptr == addr) {
- global_list = tmp->next;
- xfree(tmp);
- return;
+ global_list = tmp->next;
+ xfree(tmp);
+ return;
}
while (tmp->next) {
- if (tmp->next->varptr == addr) {
- struct gc_list *t = tmp->next;
+ if (tmp->next->varptr == addr) {
+ struct gc_list *t = tmp->next;
- tmp->next = tmp->next->next;
- xfree(t);
- break;
- }
- tmp = tmp->next;
+ tmp->next = tmp->next->next;
+ xfree(t);
+ break;
+ }
+ tmp = tmp->next;
}
}
@@ -7127,179 +9342,200 @@ enum {
(FIXNUM_P(ruby_gc_stress_mode) && (FIX2LONG(ruby_gc_stress_mode) & (1<<gc_stress_full_mark_after_malloc)))
static void
-heap_ready_to_gc(rb_objspace_t *objspace, rb_heap_t *heap)
+heap_ready_to_gc(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
{
- if (!heap->freelist && !heap->free_pages) {
- if (!heap_increment(objspace, heap)) {
- heap_set_increment(objspace, 1);
- heap_increment(objspace, heap);
- }
+ if (!heap->free_pages) {
+ if (!heap_increment(objspace, size_pool, heap)) {
+ size_pool_allocatable_pages_set(objspace, size_pool, 1);
+ heap_increment(objspace, size_pool, heap);
+ }
}
}
static int
ready_to_gc(rb_objspace_t *objspace)
{
- if (dont_gc || during_gc || ruby_disable_gc) {
- heap_ready_to_gc(objspace, heap_eden);
- return FALSE;
+ if (dont_gc_val() || during_gc || ruby_disable_gc) {
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ heap_ready_to_gc(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
+ }
+ return FALSE;
}
else {
- return TRUE;
+ return TRUE;
}
}
static void
-gc_reset_malloc_info(rb_objspace_t *objspace)
+gc_reset_malloc_info(rb_objspace_t *objspace, bool full_mark)
{
gc_prof_set_malloc_info(objspace);
{
- size_t inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
- size_t old_limit = malloc_limit;
-
- if (inc > malloc_limit) {
- malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
- if (malloc_limit > gc_params.malloc_limit_max) {
- malloc_limit = gc_params.malloc_limit_max;
- }
- }
- else {
- malloc_limit = (size_t)(malloc_limit * 0.98); /* magic number */
- if (malloc_limit < gc_params.malloc_limit_min) {
- malloc_limit = gc_params.malloc_limit_min;
- }
- }
-
- if (0) {
- if (old_limit != malloc_limit) {
- fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: %"PRIuSIZE" -> %"PRIuSIZE"\n",
- rb_gc_count(), old_limit, malloc_limit);
- }
- else {
- fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: not changed (%"PRIuSIZE")\n",
- rb_gc_count(), malloc_limit);
- }
- }
+ size_t inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
+ size_t old_limit = malloc_limit;
+
+ if (inc > malloc_limit) {
+ malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
+ if (malloc_limit > gc_params.malloc_limit_max) {
+ malloc_limit = gc_params.malloc_limit_max;
+ }
+ }
+ else {
+ malloc_limit = (size_t)(malloc_limit * 0.98); /* magic number */
+ if (malloc_limit < gc_params.malloc_limit_min) {
+ malloc_limit = gc_params.malloc_limit_min;
+ }
+ }
+
+ if (0) {
+ if (old_limit != malloc_limit) {
+ fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: %"PRIuSIZE" -> %"PRIuSIZE"\n",
+ rb_gc_count(), old_limit, malloc_limit);
+ }
+ else {
+ fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: not changed (%"PRIuSIZE")\n",
+ rb_gc_count(), malloc_limit);
+ }
+ }
}
/* reset oldmalloc info */
#if RGENGC_ESTIMATE_OLDMALLOC
- if (!is_full_marking(objspace)) {
- if (objspace->rgengc.oldmalloc_increase > objspace->rgengc.oldmalloc_increase_limit) {
- objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_OLDMALLOC;
- objspace->rgengc.oldmalloc_increase_limit =
- (size_t)(objspace->rgengc.oldmalloc_increase_limit * gc_params.oldmalloc_limit_growth_factor);
-
- if (objspace->rgengc.oldmalloc_increase_limit > gc_params.oldmalloc_limit_max) {
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_max;
- }
- }
-
- if (0) fprintf(stderr, "%d\t%d\t%u\t%u\t%d\n",
- (int)rb_gc_count(),
- (int)objspace->rgengc.need_major_gc,
- (unsigned int)objspace->rgengc.oldmalloc_increase,
- (unsigned int)objspace->rgengc.oldmalloc_increase_limit,
- (unsigned int)gc_params.oldmalloc_limit_max);
+ if (!full_mark) {
+ if (objspace->rgengc.oldmalloc_increase > objspace->rgengc.oldmalloc_increase_limit) {
+ objspace->rgengc.need_major_gc |= GPR_FLAG_MAJOR_BY_OLDMALLOC;
+ objspace->rgengc.oldmalloc_increase_limit =
+ (size_t)(objspace->rgengc.oldmalloc_increase_limit * gc_params.oldmalloc_limit_growth_factor);
+
+ if (objspace->rgengc.oldmalloc_increase_limit > gc_params.oldmalloc_limit_max) {
+ objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_max;
+ }
+ }
+
+ if (0) fprintf(stderr, "%"PRIdSIZE"\t%d\t%"PRIuSIZE"\t%"PRIuSIZE"\t%"PRIdSIZE"\n",
+ rb_gc_count(),
+ objspace->rgengc.need_major_gc,
+ objspace->rgengc.oldmalloc_increase,
+ objspace->rgengc.oldmalloc_increase_limit,
+ gc_params.oldmalloc_limit_max);
}
else {
- /* major GC */
- objspace->rgengc.oldmalloc_increase = 0;
-
- if ((objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_BY_OLDMALLOC) == 0) {
- objspace->rgengc.oldmalloc_increase_limit =
- (size_t)(objspace->rgengc.oldmalloc_increase_limit / ((gc_params.oldmalloc_limit_growth_factor - 1)/10 + 1));
- if (objspace->rgengc.oldmalloc_increase_limit < gc_params.oldmalloc_limit_min) {
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
- }
- }
+ /* major GC */
+ objspace->rgengc.oldmalloc_increase = 0;
+
+ if ((objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_BY_OLDMALLOC) == 0) {
+ objspace->rgengc.oldmalloc_increase_limit =
+ (size_t)(objspace->rgengc.oldmalloc_increase_limit / ((gc_params.oldmalloc_limit_growth_factor - 1)/10 + 1));
+ if (objspace->rgengc.oldmalloc_increase_limit < gc_params.oldmalloc_limit_min) {
+ objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
+ }
+ }
}
#endif
}
static int
-garbage_collect(rb_objspace_t *objspace, int reason)
+garbage_collect(rb_objspace_t *objspace, unsigned int reason)
{
+ int ret;
+
+ RB_VM_LOCK_ENTER();
+ {
#if GC_PROFILE_MORE_DETAIL
- objspace->profile.prepare_time = getrusage_time();
+ objspace->profile.prepare_time = getrusage_time();
#endif
- gc_rest(objspace);
+ gc_rest(objspace);
#if GC_PROFILE_MORE_DETAIL
- objspace->profile.prepare_time = getrusage_time() - objspace->profile.prepare_time;
+ objspace->profile.prepare_time = getrusage_time() - objspace->profile.prepare_time;
#endif
- return gc_start(objspace, reason);
+ ret = gc_start(objspace, reason);
+ }
+ RB_VM_LOCK_LEAVE();
+
+ return ret;
}
static int
-gc_start(rb_objspace_t *objspace, int reason)
+gc_start(rb_objspace_t *objspace, unsigned int reason)
{
- unsigned int do_full_mark = !!((unsigned)reason & GPR_FLAG_FULL_MARK);
- unsigned int immediate_mark = (unsigned)reason & GPR_FLAG_IMMEDIATE_MARK;
+ unsigned int do_full_mark = !!(reason & GPR_FLAG_FULL_MARK);
+#if GC_ENABLE_INCREMENTAL_MARK
+ unsigned int immediate_mark = reason & GPR_FLAG_IMMEDIATE_MARK;
+#endif
/* reason may be clobbered, later, so keep set immediate_sweep here */
- objspace->flags.immediate_sweep = !!((unsigned)reason & GPR_FLAG_IMMEDIATE_SWEEP);
+ objspace->flags.immediate_sweep = !!(reason & GPR_FLAG_IMMEDIATE_SWEEP);
+
+ /* Explicitly enable compaction (GC.compact) */
+ if (do_full_mark && ruby_enable_autocompact) {
+ objspace->flags.during_compacting = TRUE;
+ }
+ else {
+ objspace->flags.during_compacting = !!(reason & GPR_FLAG_COMPACT);
+ }
if (!heap_allocated_pages) return FALSE; /* heap is not ready */
if (!(reason & GPR_FLAG_METHOD) && !ready_to_gc(objspace)) return TRUE; /* GC is not allowed */
GC_ASSERT(gc_mode(objspace) == gc_mode_none);
- GC_ASSERT(!is_lazy_sweeping(heap_eden));
+ GC_ASSERT(!is_lazy_sweeping(objspace));
GC_ASSERT(!is_incremental_marking(objspace));
+
+ unsigned int lock_lev;
+ gc_enter(objspace, gc_enter_event_start, &lock_lev);
+
#if RGENGC_CHECK_MODE >= 2
gc_verify_internal_consistency(objspace);
#endif
- gc_enter(objspace, "gc_start");
-
if (ruby_gc_stressful) {
- int flag = FIXNUM_P(ruby_gc_stress_mode) ? FIX2INT(ruby_gc_stress_mode) : 0;
+ int flag = FIXNUM_P(ruby_gc_stress_mode) ? FIX2INT(ruby_gc_stress_mode) : 0;
- if ((flag & (1<<gc_stress_no_major)) == 0) {
- do_full_mark = TRUE;
- }
+ if ((flag & (1<<gc_stress_no_major)) == 0) {
+ do_full_mark = TRUE;
+ }
- objspace->flags.immediate_sweep = !(flag & (1<<gc_stress_no_immediate_sweep));
+ objspace->flags.immediate_sweep = !(flag & (1<<gc_stress_no_immediate_sweep));
}
else {
-#if USE_RGENGC
- if (objspace->rgengc.need_major_gc) {
- reason |= objspace->rgengc.need_major_gc;
- do_full_mark = TRUE;
- }
- else if (RGENGC_FORCE_MAJOR_GC) {
- reason = GPR_FLAG_MAJOR_BY_FORCE;
- do_full_mark = TRUE;
- }
+ if (objspace->rgengc.need_major_gc) {
+ reason |= objspace->rgengc.need_major_gc;
+ do_full_mark = TRUE;
+ }
+ else if (RGENGC_FORCE_MAJOR_GC) {
+ reason = GPR_FLAG_MAJOR_BY_FORCE;
+ do_full_mark = TRUE;
+ }
- objspace->rgengc.need_major_gc = GPR_FLAG_NONE;
-#endif
+ objspace->rgengc.need_major_gc = GPR_FLAG_NONE;
}
if (do_full_mark && (reason & GPR_FLAG_MAJOR_MASK) == 0) {
- reason |= GPR_FLAG_MAJOR_BY_FORCE; /* GC by CAPI, METHOD, and so on. */
+ reason |= GPR_FLAG_MAJOR_BY_FORCE; /* GC by CAPI, METHOD, and so on. */
}
#if GC_ENABLE_INCREMENTAL_MARK
if (!GC_ENABLE_INCREMENTAL_MARK || objspace->flags.dont_incremental || immediate_mark) {
- objspace->flags.during_incremental_marking = FALSE;
+ objspace->flags.during_incremental_marking = FALSE;
}
else {
- objspace->flags.during_incremental_marking = do_full_mark;
+ objspace->flags.during_incremental_marking = do_full_mark;
}
#endif
if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_incremental) {
- objspace->flags.immediate_sweep = TRUE;
+ objspace->flags.immediate_sweep = TRUE;
}
if (objspace->flags.immediate_sweep) reason |= GPR_FLAG_IMMEDIATE_SWEEP;
- gc_report(1, objspace, "gc_start(reason: %d) => %u, %d, %d\n",
- reason,
- do_full_mark, !is_incremental_marking(objspace), objspace->flags.immediate_sweep);
+ gc_report(1, objspace, "gc_start(reason: %x) => %u, %d, %d\n",
+ reason,
+ do_full_mark, !is_incremental_marking(objspace), objspace->flags.immediate_sweep);
#if USE_DEBUG_COUNTER
RB_DEBUG_COUNTER_INC(gc_count);
@@ -7327,7 +9563,7 @@ gc_start(rb_objspace_t *objspace, int reason)
objspace->profile.total_allocated_objects_at_gc_start = objspace->total_allocated_objects;
objspace->profile.heap_used_at_gc_start = heap_allocated_pages;
gc_prof_setup_new_record(objspace, reason);
- gc_reset_malloc_info(objspace);
+ gc_reset_malloc_info(objspace, do_full_mark);
rb_transient_heap_start_marking(do_full_mark);
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_START, 0 /* TODO: pass minor/immediate flag? */);
@@ -7335,11 +9571,11 @@ gc_start(rb_objspace_t *objspace, int reason)
gc_prof_timer_start(objspace);
{
- gc_marks(objspace, do_full_mark);
+ gc_marks(objspace, do_full_mark);
}
gc_prof_timer_stop(objspace);
- gc_exit(objspace, "gc_start");
+ gc_exit(objspace, gc_enter_event_start, &lock_lev);
return TRUE;
}
@@ -7347,28 +9583,27 @@ static void
gc_rest(rb_objspace_t *objspace)
{
int marking = is_incremental_marking(objspace);
- int sweeping = is_lazy_sweeping(heap_eden);
+ int sweeping = is_lazy_sweeping(objspace);
if (marking || sweeping) {
- gc_enter(objspace, "gc_rest");
+ unsigned int lock_lev;
+ gc_enter(objspace, gc_enter_event_rest, &lock_lev);
if (RGENGC_CHECK_MODE >= 2) gc_verify_internal_consistency(objspace);
- if (is_incremental_marking(objspace)) {
- PUSH_MARK_FUNC_DATA(NULL);
- gc_marks_rest(objspace);
- POP_MARK_FUNC_DATA();
- }
- if (is_lazy_sweeping(heap_eden)) {
- gc_sweep_rest(objspace);
- }
- gc_exit(objspace, "gc_rest");
+ if (is_incremental_marking(objspace)) {
+ gc_marks_rest(objspace);
+ }
+ if (is_lazy_sweeping(objspace)) {
+ gc_sweep_rest(objspace);
+ }
+ gc_exit(objspace, gc_enter_event_rest, &lock_lev);
}
}
struct objspace_and_reason {
rb_objspace_t *objspace;
- int reason;
+ unsigned int reason;
};
static void
@@ -7376,20 +9611,18 @@ gc_current_status_fill(rb_objspace_t *objspace, char *buff)
{
int i = 0;
if (is_marking(objspace)) {
- buff[i++] = 'M';
-#if USE_RGENGC
- if (is_full_marking(objspace)) buff[i++] = 'F';
+ buff[i++] = 'M';
+ if (is_full_marking(objspace)) buff[i++] = 'F';
#if GC_ENABLE_INCREMENTAL_MARK
- if (is_incremental_marking(objspace)) buff[i++] = 'I';
-#endif
+ if (is_incremental_marking(objspace)) buff[i++] = 'I';
#endif
}
else if (is_sweeping(objspace)) {
- buff[i++] = 'S';
- if (is_lazy_sweeping(heap_eden)) buff[i++] = 'L';
+ buff[i++] = 'S';
+ if (is_lazy_sweeping(objspace)) buff[i++] = 'L';
}
else {
- buff[i++] = 'N';
+ buff[i++] = 'N';
}
buff[i] = '\0';
}
@@ -7413,31 +9646,31 @@ static inline void
gc_record(rb_objspace_t *objspace, int direction, const char *event)
{
if (direction == 0) { /* enter */
- enter_count++;
- enter_tick = tick();
- gc_current_status_fill(objspace, last_gc_status);
+ enter_count++;
+ enter_tick = tick();
+ gc_current_status_fill(objspace, last_gc_status);
}
else { /* exit */
- tick_t exit_tick = tick();
- char current_gc_status[0x10];
- gc_current_status_fill(objspace, current_gc_status);
+ tick_t exit_tick = tick();
+ char current_gc_status[0x10];
+ gc_current_status_fill(objspace, current_gc_status);
#if 1
- /* [last mutator time] [gc time] [event] */
- fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
- enter_tick - last_exit_tick,
- exit_tick - enter_tick,
- event,
- last_gc_status, current_gc_status,
- (objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
- last_exit_tick = exit_tick;
+ /* [last mutator time] [gc time] [event] */
+ fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
+ enter_tick - last_exit_tick,
+ exit_tick - enter_tick,
+ event,
+ last_gc_status, current_gc_status,
+ (objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
+ last_exit_tick = exit_tick;
#else
- /* [enter_tick] [gc time] [event] */
- fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
- enter_tick,
- exit_tick - enter_tick,
- event,
- last_gc_status, current_gc_status,
- (objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
+ /* [enter_tick] [gc time] [event] */
+ fprintf(stderr, "%"PRItick"\t%"PRItick"\t%s\t[%s->%s|%c]\n",
+ enter_tick,
+ exit_tick - enter_tick,
+ event,
+ last_gc_status, current_gc_status,
+ (objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_MASK) ? '+' : '-');
#endif
}
}
@@ -7449,31 +9682,144 @@ gc_record(rb_objspace_t *objspace, int direction, const char *event)
}
#endif /* PRINT_ENTER_EXIT_TICK */
+static const char *
+gc_enter_event_cstr(enum gc_enter_event event)
+{
+ switch (event) {
+ case gc_enter_event_start: return "start";
+ case gc_enter_event_mark_continue: return "mark_continue";
+ case gc_enter_event_sweep_continue: return "sweep_continue";
+ case gc_enter_event_rest: return "rest";
+ case gc_enter_event_finalizer: return "finalizer";
+ case gc_enter_event_rb_memerror: return "rb_memerror";
+ }
+ return NULL;
+}
+
+static void
+gc_enter_count(enum gc_enter_event event)
+{
+ switch (event) {
+ case gc_enter_event_start: RB_DEBUG_COUNTER_INC(gc_enter_start); break;
+ case gc_enter_event_mark_continue: RB_DEBUG_COUNTER_INC(gc_enter_mark_continue); break;
+ case gc_enter_event_sweep_continue: RB_DEBUG_COUNTER_INC(gc_enter_sweep_continue); break;
+ case gc_enter_event_rest: RB_DEBUG_COUNTER_INC(gc_enter_rest); break;
+ case gc_enter_event_finalizer: RB_DEBUG_COUNTER_INC(gc_enter_finalizer); break;
+ case gc_enter_event_rb_memerror: /* nothing */ break;
+ }
+}
+
+#ifndef MEASURE_GC
+#define MEASURE_GC (objspace->flags.measure_gc)
+#endif
+
+static bool
+gc_enter_event_measure_p(rb_objspace_t *objspace, enum gc_enter_event event)
+{
+ if (!MEASURE_GC) return false;
+
+ switch (event) {
+ case gc_enter_event_start:
+ case gc_enter_event_mark_continue:
+ case gc_enter_event_sweep_continue:
+ case gc_enter_event_rest:
+ return true;
+
+ default:
+ // case gc_enter_event_finalizer:
+ // case gc_enter_event_rb_memerror:
+ return false;
+ }
+}
+
+static bool current_process_time(struct timespec *ts);
+
+static void
+gc_enter_clock(rb_objspace_t *objspace, enum gc_enter_event event)
+{
+ if (gc_enter_event_measure_p(objspace, event)) {
+ if (!current_process_time(&objspace->profile.start_time)) {
+ objspace->profile.start_time.tv_sec = 0;
+ objspace->profile.start_time.tv_nsec = 0;
+ }
+ }
+}
+
+static void
+gc_exit_clock(rb_objspace_t *objspace, enum gc_enter_event event)
+{
+ if (gc_enter_event_measure_p(objspace, event)) {
+ struct timespec end_time;
+
+ if ((objspace->profile.start_time.tv_sec > 0 ||
+ objspace->profile.start_time.tv_nsec > 0) &&
+ current_process_time(&end_time)) {
+
+ if (end_time.tv_sec < objspace->profile.start_time.tv_sec) {
+ return; // ignore
+ }
+ else {
+ uint64_t ns =
+ (uint64_t)(end_time.tv_sec - objspace->profile.start_time.tv_sec) * (1000 * 1000 * 1000) +
+ (end_time.tv_nsec - objspace->profile.start_time.tv_nsec);
+ objspace->profile.total_time_ns += ns;
+ }
+ }
+ }
+}
+
static inline void
-gc_enter(rb_objspace_t *objspace, const char *event)
+gc_enter(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_lev)
{
- GC_ASSERT(during_gc == 0);
- if (RGENGC_CHECK_MODE >= 3) gc_verify_internal_consistency(objspace);
+ RB_VM_LOCK_ENTER_LEV(lock_lev);
- mjit_gc_start_hook();
+ gc_enter_clock(objspace, event);
+
+ switch (event) {
+ case gc_enter_event_rest:
+ if (!is_marking(objspace)) break;
+ // fall through
+ case gc_enter_event_start:
+ case gc_enter_event_mark_continue:
+ // stop other ractors
+ rb_vm_barrier();
+ break;
+ default:
+ break;
+ }
+
+ gc_enter_count(event);
+ if (UNLIKELY(during_gc != 0)) rb_bug("during_gc != 0");
+ if (RGENGC_CHECK_MODE >= 3) gc_verify_internal_consistency(objspace);
during_gc = TRUE;
- gc_report(1, objspace, "gc_enter: %s [%s]\n", event, gc_current_status(objspace));
- gc_record(objspace, 0, event);
+ RUBY_DEBUG_LOG("%s (%s)",gc_enter_event_cstr(event), gc_current_status(objspace));
+ gc_report(1, objspace, "gc_enter: %s [%s]\n", gc_enter_event_cstr(event), gc_current_status(objspace));
+ gc_record(objspace, 0, gc_enter_event_cstr(event));
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_ENTER, 0); /* TODO: which parameter should be passed? */
}
static inline void
-gc_exit(rb_objspace_t *objspace, const char *event)
+gc_exit(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_lev)
{
GC_ASSERT(during_gc != 0);
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_EXIT, 0); /* TODO: which parameter should be passsed? */
- gc_record(objspace, 1, event);
- gc_report(1, objspace, "gc_exit: %s [%s]\n", event, gc_current_status(objspace));
+ gc_record(objspace, 1, gc_enter_event_cstr(event));
+ RUBY_DEBUG_LOG("%s (%s)", gc_enter_event_cstr(event), gc_current_status(objspace));
+ gc_report(1, objspace, "gc_exit: %s [%s]\n", gc_enter_event_cstr(event), gc_current_status(objspace));
during_gc = FALSE;
- mjit_gc_exit_hook();
+ gc_exit_clock(objspace, event);
+ RB_VM_LOCK_LEAVE_LEV(lock_lev);
+
+#if RGENGC_CHECK_MODE >= 2
+ if (event == gc_enter_event_sweep_continue && gc_mode(objspace) == gc_mode_none) {
+ GC_ASSERT(!during_gc);
+ // sweep finished
+ gc_verify_internal_consistency(objspace);
+ }
+#endif
}
static void *
@@ -7484,39 +9830,47 @@ gc_with_gvl(void *ptr)
}
static int
-garbage_collect_with_gvl(rb_objspace_t *objspace, int reason)
+garbage_collect_with_gvl(rb_objspace_t *objspace, unsigned int reason)
{
- if (dont_gc) return TRUE;
+ if (dont_gc_val()) return TRUE;
if (ruby_thread_has_gvl_p()) {
- return garbage_collect(objspace, reason);
+ return garbage_collect(objspace, reason);
}
else {
- if (ruby_native_thread_p()) {
- struct objspace_and_reason oar;
- oar.objspace = objspace;
- oar.reason = reason;
- return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)&oar);
- }
- else {
- /* no ruby thread */
- fprintf(stderr, "[FATAL] failed to allocate memory\n");
- exit(EXIT_FAILURE);
- }
+ if (ruby_native_thread_p()) {
+ struct objspace_and_reason oar;
+ oar.objspace = objspace;
+ oar.reason = reason;
+ return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)&oar);
+ }
+ else {
+ /* no ruby thread */
+ fprintf(stderr, "[FATAL] failed to allocate memory\n");
+ exit(EXIT_FAILURE);
+ }
}
}
static VALUE
-gc_start_internal(rb_execution_context_t *ec, VALUE self, VALUE full_mark, VALUE immediate_mark, VALUE immediate_sweep)
+gc_start_internal(rb_execution_context_t *ec, VALUE self, VALUE full_mark, VALUE immediate_mark, VALUE immediate_sweep, VALUE compact)
{
rb_objspace_t *objspace = &rb_objspace;
- int reason = GPR_FLAG_FULL_MARK |
- GPR_FLAG_IMMEDIATE_MARK |
- GPR_FLAG_IMMEDIATE_SWEEP |
- GPR_FLAG_METHOD;
+ unsigned int reason = (GPR_FLAG_FULL_MARK |
+ GPR_FLAG_IMMEDIATE_MARK |
+ GPR_FLAG_IMMEDIATE_SWEEP |
+ GPR_FLAG_METHOD);
+
+ /* For now, compact implies full mark / sweep, so ignore other flags */
+ if (RTEST(compact)) {
+ GC_ASSERT(GC_COMPACTION_SUPPORTED);
- if (!RTEST(full_mark)) reason &= ~GPR_FLAG_FULL_MARK;
- if (!RTEST(immediate_mark)) reason &= ~GPR_FLAG_IMMEDIATE_MARK;
- if (!RTEST(immediate_sweep)) reason &= ~GPR_FLAG_IMMEDIATE_SWEEP;
+ reason |= GPR_FLAG_COMPACT;
+ }
+ else {
+ if (!RTEST(full_mark)) reason &= ~GPR_FLAG_FULL_MARK;
+ if (!RTEST(immediate_mark)) reason &= ~GPR_FLAG_IMMEDIATE_MARK;
+ if (!RTEST(immediate_sweep)) reason &= ~GPR_FLAG_IMMEDIATE_SWEEP;
+ }
garbage_collect(objspace, reason);
gc_finalize_deferred(objspace);
@@ -7527,9 +9881,7 @@ gc_start_internal(rb_execution_context_t *ec, VALUE self, VALUE full_mark, VALUE
static int
gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
{
- if (SPECIAL_CONST_P(obj)) {
- return FALSE;
- }
+ GC_ASSERT(!SPECIAL_CONST_P(obj));
switch (BUILTIN_TYPE(obj)) {
case T_NONE:
@@ -7537,7 +9889,6 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
case T_MOVED:
case T_ZOMBIE:
return FALSE;
- break;
case T_SYMBOL:
if (DYNAMIC_SYM_P(obj) && (RSYMBOL(obj)->id & ~ID_SCOPE_MASK)) {
return FALSE;
@@ -7562,12 +9913,19 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
case T_NODE:
case T_CLASS:
if (FL_TEST(obj, FL_FINALIZE)) {
+ /* The finalizer table is a numtable. It looks up objects by address.
+ * We can't mark the keys in the finalizer table because that would
+ * prevent the objects from being collected. This check prevents
+ * objects that are keys in the finalizer table from being moved
+ * without directly pinning them. */
if (st_is_member(finalizer_table, obj)) {
return FALSE;
}
}
- return !RVALUE_PINNED(obj);
- break;
+ GC_ASSERT(RVALUE_MARKED(obj));
+ GC_ASSERT(!RVALUE_PINNED(obj));
+
+ return TRUE;
default:
rb_bug("gc_is_moveable_obj: unreachable (%d)", (int)BUILTIN_TYPE(obj));
@@ -7577,8 +9935,19 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
return FALSE;
}
+/* Used in places that could malloc, which can cause the GC to run. We need to
+ * temporarily disable the GC to allow the malloc to happen. */
+#define COULD_MALLOC_REGION_START() \
+ GC_ASSERT(during_gc); \
+ VALUE _already_disabled = rb_gc_disable_no_rest(); \
+ during_gc = false;
+
+#define COULD_MALLOC_REGION_END() \
+ during_gc = true; \
+ if (_already_disabled == Qfalse) rb_objspace_gc_enable(objspace);
+
static VALUE
-gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, VALUE moved_list)
+gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, size_t src_slot_size, size_t slot_size)
{
int marked;
int wb_unprotected;
@@ -7590,7 +9959,7 @@ gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, VALUE moved_list)
gc_report(4, objspace, "Moving object: %p -> %p\n", (void*)scan, (void *)free);
GC_ASSERT(BUILTIN_TYPE(scan) != T_NONE);
- GC_ASSERT(BUILTIN_TYPE(free) == T_NONE);
+ GC_ASSERT(!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(free), free));
/* Save off bits for current object. */
marked = rb_objspace_marked_object_p((VALUE)src);
@@ -7598,31 +9967,47 @@ gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, VALUE moved_list)
uncollectible = RVALUE_UNCOLLECTIBLE((VALUE)src);
marking = RVALUE_MARKING((VALUE)src);
- objspace->total_allocated_objects++;
-
/* Clear bits for eventual T_MOVED */
CLEAR_IN_BITMAP(GET_HEAP_MARK_BITS((VALUE)src), (VALUE)src);
CLEAR_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS((VALUE)src), (VALUE)src);
CLEAR_IN_BITMAP(GET_HEAP_UNCOLLECTIBLE_BITS((VALUE)src), (VALUE)src);
CLEAR_IN_BITMAP(GET_HEAP_MARKING_BITS((VALUE)src), (VALUE)src);
- if (FL_TEST(src, FL_EXIVAR)) {
- rb_mv_generic_ivar((VALUE)src, (VALUE)dest);
+ if (FL_TEST((VALUE)src, FL_EXIVAR)) {
+ /* Resizing the st table could cause a malloc */
+ COULD_MALLOC_REGION_START();
+ {
+ rb_mv_generic_ivar((VALUE)src, (VALUE)dest);
+ }
+ COULD_MALLOC_REGION_END();
}
- VALUE id;
+ st_data_t srcid = (st_data_t)src, id;
/* If the source object's object_id has been seen, we need to update
* the object to object id mapping. */
- if (st_lookup(objspace->obj_to_id_tbl, (VALUE)src, &id)) {
+ if (st_lookup(objspace->obj_to_id_tbl, srcid, &id)) {
gc_report(4, objspace, "Moving object with seen id: %p -> %p\n", (void *)src, (void *)dest);
- st_delete(objspace->obj_to_id_tbl, (st_data_t *)&src, 0);
- st_insert(objspace->obj_to_id_tbl, (VALUE)dest, id);
+ /* Resizing the st table could cause a malloc */
+ COULD_MALLOC_REGION_START();
+ {
+ st_delete(objspace->obj_to_id_tbl, &srcid, 0);
+ st_insert(objspace->obj_to_id_tbl, (st_data_t)dest, id);
+ }
+ COULD_MALLOC_REGION_END();
}
/* Move the object */
- memcpy(dest, src, sizeof(RVALUE));
- memset(src, 0, sizeof(RVALUE));
+ memcpy(dest, src, MIN(src_slot_size, slot_size));
+
+ if (RVALUE_OVERHEAD > 0) {
+ void *dest_overhead = (void *)(((uintptr_t)dest) + slot_size - RVALUE_OVERHEAD);
+ void *src_overhead = (void *)(((uintptr_t)src) + src_slot_size - RVALUE_OVERHEAD);
+
+ memcpy(dest_overhead, src_overhead, RVALUE_OVERHEAD);
+ }
+
+ memset(src, 0, src_slot_size);
/* Set bits for object in new location */
if (marking) {
@@ -7655,92 +10040,16 @@ gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free, VALUE moved_list)
/* Assign forwarding address */
src->as.moved.flags = T_MOVED;
+ src->as.moved.dummy = Qundef;
src->as.moved.destination = (VALUE)dest;
- src->as.moved.next = moved_list;
GC_ASSERT(BUILTIN_TYPE((VALUE)dest) != T_NONE);
return (VALUE)src;
}
-struct heap_cursor {
- RVALUE *slot;
- size_t index;
- struct heap_page *page;
- rb_objspace_t * objspace;
-};
-
-static void
-advance_cursor(struct heap_cursor *free, struct heap_page **page_list)
-{
- if (free->slot == free->page->start + free->page->total_slots - 1) {
- free->index++;
- free->page = page_list[free->index];
- free->slot = free->page->start;
- }
- else {
- free->slot++;
- }
-}
-
-static void
-retreat_cursor(struct heap_cursor *scan, struct heap_page **page_list)
-{
- if (scan->slot == scan->page->start) {
- scan->index--;
- scan->page = page_list[scan->index];
- scan->slot = scan->page->start + scan->page->total_slots - 1;
- }
- else {
- scan->slot--;
- }
-}
-
-static int
-not_met(struct heap_cursor *free, struct heap_cursor *scan)
-{
- if (free->index < scan->index)
- return 1;
-
- if (free->index > scan->index)
- return 0;
-
- return free->slot < scan->slot;
-}
-
-static void
-init_cursors(rb_objspace_t *objspace, struct heap_cursor *free, struct heap_cursor *scan, struct heap_page **page_list)
-{
- struct heap_page *page;
- size_t total_pages = heap_eden->total_pages;
- page = page_list[0];
-
- free->index = 0;
- free->page = page;
- free->slot = page->start;
- free->objspace = objspace;
-
- page = page_list[total_pages - 1];
- scan->index = total_pages - 1;
- scan->page = page;
- scan->slot = page->start + page->total_slots - 1;
- scan->objspace = objspace;
-}
-
+#if GC_CAN_COMPILE_COMPACTION
static int
-count_pinned(struct heap_page *page)
-{
- int pinned = 0;
- int i;
-
- for (i = 0; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
- pinned += popcount_bits(page->pinned_bits[i]);
- }
-
- return pinned;
-}
-
-static int
-compare_pinned(const void *left, const void *right, void *dummy)
+compare_free_slots(const void *left, const void *right, void *dummy)
{
struct heap_page *left_page;
struct heap_page *right_page;
@@ -7748,155 +10057,116 @@ compare_pinned(const void *left, const void *right, void *dummy)
left_page = *(struct heap_page * const *)left;
right_page = *(struct heap_page * const *)right;
- return right_page->pinned_slots - left_page->pinned_slots;
+ return left_page->free_slots - right_page->free_slots;
}
-static int
-compare_free_slots(const void *left, const void *right, void *dummy)
+static void
+gc_sort_heap_by_empty_slots(rb_objspace_t *objspace)
{
- struct heap_page *left_page;
- struct heap_page *right_page;
+ for (int j = 0; j < SIZE_POOL_COUNT; j++) {
+ rb_size_pool_t *size_pool = &size_pools[j];
- left_page = *(struct heap_page * const *)left;
- right_page = *(struct heap_page * const *)right;
+ size_t total_pages = SIZE_POOL_EDEN_HEAP(size_pool)->total_pages;
+ size_t size = size_mul_or_raise(total_pages, sizeof(struct heap_page *), rb_eRuntimeError);
+ struct heap_page *page = 0, **page_list = malloc(size);
+ size_t i = 0;
- return right_page->free_slots - left_page->free_slots;
-}
+ SIZE_POOL_EDEN_HEAP(size_pool)->free_pages = NULL;
+ ccan_list_for_each(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, page, page_node) {
+ page_list[i++] = page;
+ GC_ASSERT(page);
+ }
-typedef int page_compare_func_t(const void *, const void *, void *);
+ GC_ASSERT((size_t)i == total_pages);
-static struct heap_page **
-allocate_page_list(rb_objspace_t *objspace, page_compare_func_t *comparator)
-{
- size_t total_pages = heap_eden->total_pages;
- size_t size = size_mul_or_raise(total_pages, sizeof(struct heap_page *), rb_eRuntimeError);
- struct heap_page *page = 0, **page_list = malloc(size);
- int i = 0;
+ /* Sort the heap so "filled pages" are first. `heap_add_page` adds to the
+ * head of the list, so empty pages will end up at the start of the heap */
+ ruby_qsort(page_list, total_pages, sizeof(struct heap_page *), compare_free_slots, NULL);
- list_for_each(&heap_eden->pages, page, page_node) {
- page_list[i++] = page;
- page->pinned_slots = count_pinned(page);
- GC_ASSERT(page != NULL);
- }
- GC_ASSERT(total_pages > 0);
- GC_ASSERT((size_t)i == total_pages);
+ /* Reset the eden heap */
+ ccan_list_head_init(&SIZE_POOL_EDEN_HEAP(size_pool)->pages);
- ruby_qsort(page_list, total_pages, sizeof(struct heap_page *), comparator, NULL);
+ for (i = 0; i < total_pages; i++) {
+ ccan_list_add(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, &page_list[i]->page_node);
+ if (page_list[i]->free_slots != 0) {
+ heap_add_freepage(SIZE_POOL_EDEN_HEAP(size_pool), page_list[i]);
+ }
+ }
- return page_list;
+ free(page_list);
+ }
}
+#endif
-static VALUE
-gc_compact_heap(rb_objspace_t *objspace, page_compare_func_t *comparator)
+static void
+gc_ref_update_array(rb_objspace_t * objspace, VALUE v)
{
- struct heap_cursor free_cursor;
- struct heap_cursor scan_cursor;
- struct heap_page **page_list;
- VALUE moved_list;
-
- moved_list = Qfalse;
- memset(objspace->rcompactor.considered_count_table, 0, T_MASK * sizeof(size_t));
- memset(objspace->rcompactor.moved_count_table, 0, T_MASK * sizeof(size_t));
-
- page_list = allocate_page_list(objspace, comparator);
-
- init_cursors(objspace, &free_cursor, &scan_cursor, page_list);
-
- /* Two finger algorithm */
- while (not_met(&free_cursor, &scan_cursor)) {
- /* Free cursor movement */
-
- /* Unpoison free_cursor slot */
- void *free_slot_poison = asan_poisoned_object_p((VALUE)free_cursor.slot);
- asan_unpoison_object((VALUE)free_cursor.slot, false);
-
- while (BUILTIN_TYPE(free_cursor.slot) != T_NONE && not_met(&free_cursor, &scan_cursor)) {
- /* Re-poison slot if it's not the one we want */
- if (free_slot_poison) {
- GC_ASSERT(BUILTIN_TYPE(free_cursor.slot) == T_NONE);
- asan_poison_object((VALUE)free_cursor.slot);
- }
+ if (ARY_SHARED_P(v)) {
+#if USE_RVARGC
+ VALUE old_root = RARRAY(v)->as.heap.aux.shared_root;
+#endif
- advance_cursor(&free_cursor, page_list);
+ UPDATE_IF_MOVED(objspace, RARRAY(v)->as.heap.aux.shared_root);
- /* Unpoison free_cursor slot */
- free_slot_poison = asan_poisoned_object_p((VALUE)free_cursor.slot);
- asan_unpoison_object((VALUE)free_cursor.slot, false);
+#if USE_RVARGC
+ VALUE new_root = RARRAY(v)->as.heap.aux.shared_root;
+ // If the root is embedded and its location has changed
+ if (ARY_EMBED_P(new_root) && new_root != old_root) {
+ size_t offset = (size_t)(RARRAY(v)->as.heap.ptr - RARRAY(old_root)->as.ary);
+ GC_ASSERT(RARRAY(v)->as.heap.ptr >= RARRAY(old_root)->as.ary);
+ RARRAY(v)->as.heap.ptr = RARRAY(new_root)->as.ary + offset;
}
+#endif
+ }
+ else {
+ long len = RARRAY_LEN(v);
- /* Unpoison scan_cursor slot */
- void *scan_slot_poison = asan_poisoned_object_p((VALUE)scan_cursor.slot);
- asan_unpoison_object((VALUE)scan_cursor.slot, false);
-
- /* Scan cursor movement */
- objspace->rcompactor.considered_count_table[BUILTIN_TYPE((VALUE)scan_cursor.slot)]++;
-
- while (!gc_is_moveable_obj(objspace, (VALUE)scan_cursor.slot) && not_met(&free_cursor, &scan_cursor)) {
-
- /* Re-poison slot if it's not the one we want */
- if (scan_slot_poison) {
- GC_ASSERT(BUILTIN_TYPE(scan_cursor.slot) == T_NONE);
- asan_poison_object((VALUE)scan_cursor.slot);
+ if (len > 0) {
+ VALUE *ptr = (VALUE *)RARRAY_CONST_PTR_TRANSIENT(v);
+ for (long i = 0; i < len; i++) {
+ UPDATE_IF_MOVED(objspace, ptr[i]);
}
-
- retreat_cursor(&scan_cursor, page_list);
-
- /* Unpoison scan_cursor slot */
- scan_slot_poison = asan_poisoned_object_p((VALUE)scan_cursor.slot);
- asan_unpoison_object((VALUE)scan_cursor.slot, false);
-
- objspace->rcompactor.considered_count_table[BUILTIN_TYPE((VALUE)scan_cursor.slot)]++;
}
- if (not_met(&free_cursor, &scan_cursor)) {
- objspace->rcompactor.moved_count_table[BUILTIN_TYPE((VALUE)scan_cursor.slot)]++;
-
- GC_ASSERT(BUILTIN_TYPE(free_cursor.slot) == T_NONE);
- GC_ASSERT(BUILTIN_TYPE(scan_cursor.slot) != T_NONE);
- GC_ASSERT(BUILTIN_TYPE(scan_cursor.slot) != T_MOVED);
-
- moved_list = gc_move(objspace, (VALUE)scan_cursor.slot, (VALUE)free_cursor.slot, moved_list);
-
- GC_ASSERT(BUILTIN_TYPE(free_cursor.slot) != T_MOVED);
- GC_ASSERT(BUILTIN_TYPE(free_cursor.slot) != T_NONE);
- GC_ASSERT(BUILTIN_TYPE(scan_cursor.slot) == T_MOVED);
-
- advance_cursor(&free_cursor, page_list);
- retreat_cursor(&scan_cursor, page_list);
+#if USE_RVARGC
+ if (rb_gc_obj_slot_size(v) >= rb_ary_size_as_embedded(v)) {
+ if (rb_ary_embeddable_p(v)) {
+ rb_ary_make_embedded(v);
+ }
}
+#endif
}
- free(page_list);
-
- return moved_list;
}
static void
-gc_ref_update_array(rb_objspace_t * objspace, VALUE v)
+gc_ref_update_object(rb_objspace_t *objspace, VALUE v)
{
- long i, len;
+ VALUE *ptr = ROBJECT_IVPTR(v);
- if (FL_TEST(v, ELTS_SHARED))
+ if (rb_shape_obj_too_complex(v)) {
+ rb_gc_update_tbl_refs(ROBJECT_IV_HASH(v));
return;
+ }
- len = RARRAY_LEN(v);
- if (len > 0) {
- VALUE *ptr = (VALUE *)RARRAY_CONST_PTR_TRANSIENT(v);
- for (i = 0; i < len; i++) {
- UPDATE_IF_MOVED(objspace, ptr[i]);
+#if USE_RVARGC
+ size_t slot_size = rb_gc_obj_slot_size(v);
+ size_t embed_size = rb_obj_embedded_size(ROBJECT_IV_CAPACITY(v));
+ if (slot_size >= embed_size && !RB_FL_TEST_RAW(v, ROBJECT_EMBED)) {
+ // Object can be re-embedded
+ memcpy(ROBJECT(v)->as.ary, ptr, sizeof(VALUE) * ROBJECT_IV_COUNT(v));
+ RB_FL_SET_RAW(v, ROBJECT_EMBED);
+ if (ROBJ_TRANSIENT_P(v)) {
+ ROBJ_TRANSIENT_UNSET(v);
+ }
+ else {
+ xfree(ptr);
}
+ ptr = ROBJECT(v)->as.ary;
}
-}
-
-static void
-gc_ref_update_object(rb_objspace_t * objspace, VALUE v)
-{
- VALUE *ptr = ROBJECT_IVPTR(v);
+#endif
- if (ptr) {
- uint32_t i, len = ROBJECT_NUMIV(v);
- for (i = 0; i < len; i++) {
- UPDATE_IF_MOVED(objspace, ptr[i]);
- }
+ for (uint32_t i = 0; i < ROBJECT_IV_COUNT(v); i++) {
+ UPDATE_IF_MOVED(objspace, ptr[i]);
}
}
@@ -8050,13 +10320,16 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
case imemo_env:
{
rb_env_t *env = (rb_env_t *)obj;
- TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, env->iseq);
- UPDATE_IF_MOVED(objspace, env->ep[VM_ENV_DATA_INDEX_ENV]);
- gc_update_values(objspace, (long)env->env_size, (VALUE *)env->env);
+ if (LIKELY(env->ep)) {
+ // just after newobj() can be NULL here.
+ TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, env->iseq);
+ UPDATE_IF_MOVED(objspace, env->ep[VM_ENV_DATA_INDEX_ENV]);
+ gc_update_values(objspace, (long)env->env_size, (VALUE *)env->env);
+ }
}
break;
case imemo_cref:
- UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.klass);
+ UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.klass_or_self);
TYPED_UPDATE_IF_MOVED(objspace, struct rb_cref_struct *, RANY(obj)->as.imemo.cref.next);
UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.refinements);
break;
@@ -8084,8 +10357,33 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
case imemo_ast:
rb_ast_update_references((rb_ast_t *)obj);
break;
+ case imemo_callcache:
+ {
+ const struct rb_callcache *cc = (const struct rb_callcache *)obj;
+ if (cc->klass) {
+ UPDATE_IF_MOVED(objspace, cc->klass);
+ if (!is_live_object(objspace, cc->klass)) {
+ *((VALUE *)(&cc->klass)) = (VALUE)0;
+ }
+ }
+
+ if (cc->cme_) {
+ TYPED_UPDATE_IF_MOVED(objspace, struct rb_callable_method_entry_struct *, cc->cme_);
+ if (!is_live_object(objspace, (VALUE)cc->cme_)) {
+ *((struct rb_callable_method_entry_struct **)(&cc->cme_)) = (struct rb_callable_method_entry_struct *)0;
+ }
+ }
+ }
+ break;
+ case imemo_constcache:
+ {
+ const struct iseq_inline_constant_cache_entry *ice = (struct iseq_inline_constant_cache_entry *)obj;
+ UPDATE_IF_MOVED(objspace, ice->value);
+ }
+ break;
case imemo_parser_strterm:
case imemo_tmpbuf:
+ case imemo_callinfo:
break;
default:
rb_bug("not reachable %d", imemo_type(obj));
@@ -8094,7 +10392,7 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
}
static enum rb_id_table_iterator_result
-check_id_table_move(ID id, VALUE value, void *data)
+check_id_table_move(VALUE value, void *data)
{
rb_objspace_t *objspace = (rb_objspace_t *)data;
@@ -8113,9 +10411,8 @@ rb_gc_location(VALUE value)
VALUE destination;
- if (!SPECIAL_CONST_P((void *)value)) {
- void *poisoned = asan_poisoned_object_p(value);
- asan_unpoison_object(value, false);
+ if (!SPECIAL_CONST_P(value)) {
+ void *poisoned = asan_unpoison_object_temporary(value);
if (BUILTIN_TYPE(value) == T_MOVED) {
destination = (VALUE)RMOVED(value)->destination;
@@ -8139,7 +10436,7 @@ rb_gc_location(VALUE value)
}
static enum rb_id_table_iterator_result
-update_id_table(ID *key, VALUE * value, void *data, int existing)
+update_id_table(VALUE *value, void *data, int existing)
{
rb_objspace_t *objspace = (rb_objspace_t *)data;
@@ -8154,7 +10451,88 @@ static void
update_m_tbl(rb_objspace_t *objspace, struct rb_id_table *tbl)
{
if (tbl) {
- rb_id_table_foreach_with_replace(tbl, check_id_table_move, update_id_table, objspace);
+ rb_id_table_foreach_values_with_replace(tbl, check_id_table_move, update_id_table, objspace);
+ }
+}
+
+static enum rb_id_table_iterator_result
+update_cc_tbl_i(VALUE ccs_ptr, void *data)
+{
+ rb_objspace_t *objspace = (rb_objspace_t *)data;
+ struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)ccs_ptr;
+ VM_ASSERT(vm_ccs_p(ccs));
+
+ if (gc_object_moved_p(objspace, (VALUE)ccs->cme)) {
+ ccs->cme = (const rb_callable_method_entry_t *)rb_gc_location((VALUE)ccs->cme);
+ }
+
+ for (int i=0; i<ccs->len; i++) {
+ if (gc_object_moved_p(objspace, (VALUE)ccs->entries[i].ci)) {
+ ccs->entries[i].ci = (struct rb_callinfo *)rb_gc_location((VALUE)ccs->entries[i].ci);
+ }
+ if (gc_object_moved_p(objspace, (VALUE)ccs->entries[i].cc)) {
+ ccs->entries[i].cc = (struct rb_callcache *)rb_gc_location((VALUE)ccs->entries[i].cc);
+ }
+ }
+
+ // do not replace
+ return ID_TABLE_CONTINUE;
+}
+
+static void
+update_cc_tbl(rb_objspace_t *objspace, VALUE klass)
+{
+ struct rb_id_table *tbl = RCLASS_CC_TBL(klass);
+ if (tbl) {
+ rb_id_table_foreach_values(tbl, update_cc_tbl_i, objspace);
+ }
+}
+
+static enum rb_id_table_iterator_result
+update_cvc_tbl_i(VALUE cvc_entry, void *data)
+{
+ struct rb_cvar_class_tbl_entry *entry;
+ rb_objspace_t * objspace = (rb_objspace_t *)data;
+
+ entry = (struct rb_cvar_class_tbl_entry *)cvc_entry;
+
+ if (entry->cref) {
+ TYPED_UPDATE_IF_MOVED(objspace, rb_cref_t *, entry->cref);
+ }
+
+ entry->class_value = rb_gc_location(entry->class_value);
+
+ return ID_TABLE_CONTINUE;
+}
+
+static void
+update_cvc_tbl(rb_objspace_t *objspace, VALUE klass)
+{
+ struct rb_id_table *tbl = RCLASS_CVC_TBL(klass);
+ if (tbl) {
+ rb_id_table_foreach_values(tbl, update_cvc_tbl_i, objspace);
+ }
+}
+
+static enum rb_id_table_iterator_result
+mark_cvc_tbl_i(VALUE cvc_entry, void *data)
+{
+ struct rb_cvar_class_tbl_entry *entry;
+
+ entry = (struct rb_cvar_class_tbl_entry *)cvc_entry;
+
+ RUBY_ASSERT(entry->cref == 0 || (BUILTIN_TYPE((VALUE)entry->cref) == T_IMEMO && IMEMO_TYPE_P(entry->cref, imemo_cref)));
+ rb_gc_mark((VALUE) entry->cref);
+
+ return ID_TABLE_CONTINUE;
+}
+
+static void
+mark_cvc_tbl(rb_objspace_t *objspace, VALUE klass)
+{
+ struct rb_id_table *tbl = RCLASS_CVC_TBL(klass);
+ if (tbl) {
+ rb_id_table_foreach_values(tbl, mark_cvc_tbl_i, objspace);
}
}
@@ -8195,16 +10573,27 @@ static void
update_class_ext(rb_objspace_t *objspace, rb_classext_t *ext)
{
UPDATE_IF_MOVED(objspace, ext->origin_);
+ UPDATE_IF_MOVED(objspace, ext->includer);
UPDATE_IF_MOVED(objspace, ext->refined_class);
update_subclass_entries(objspace, ext->subclasses);
}
static void
+update_superclasses(rb_objspace_t *objspace, VALUE obj)
+{
+ if (FL_TEST_RAW(obj, RCLASS_SUPERCLASSES_INCLUDE_SELF)) {
+ for (size_t i = 0; i < RCLASS_SUPERCLASS_DEPTH(obj) + 1; i++) {
+ UPDATE_IF_MOVED(objspace, RCLASS_SUPERCLASSES(obj)[i]);
+ }
+ }
+}
+
+static void
gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
{
RVALUE *any = RANY(obj);
- gc_report(4, objspace, "update-refs: %p ->", (void *)obj);
+ gc_report(4, objspace, "update-refs: %p ->\n", (void *)obj);
switch (BUILTIN_TYPE(obj)) {
case T_CLASS:
@@ -8214,24 +10603,30 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
}
if (!RCLASS_EXT(obj)) break;
update_m_tbl(objspace, RCLASS_M_TBL(obj));
- gc_update_tbl_refs(objspace, RCLASS_IV_TBL(obj));
+ update_cc_tbl(objspace, obj);
+ update_cvc_tbl(objspace, obj);
+ update_superclasses(objspace, obj);
+
+ for (attr_index_t i = 0; i < RCLASS_IV_COUNT(obj); i++) {
+ UPDATE_IF_MOVED(objspace, RCLASS_IVPTR(obj)[i]);
+ }
+
update_class_ext(objspace, RCLASS_EXT(obj));
update_const_tbl(objspace, RCLASS_CONST_TBL(obj));
break;
case T_ICLASS:
- if (FL_TEST(obj, RICLASS_IS_ORIGIN)) {
+ if (FL_TEST(obj, RICLASS_IS_ORIGIN) &&
+ !FL_TEST(obj, RICLASS_ORIGIN_SHARED_MTBL)) {
update_m_tbl(objspace, RCLASS_M_TBL(obj));
}
if (RCLASS_SUPER((VALUE)obj)) {
UPDATE_IF_MOVED(objspace, RCLASS(obj)->super);
}
if (!RCLASS_EXT(obj)) break;
- if (RCLASS_IV_TBL(obj)) {
- gc_update_tbl_refs(objspace, RCLASS_IV_TBL(obj));
- }
update_class_ext(objspace, RCLASS_EXT(obj));
update_m_tbl(objspace, RCLASS_CALLABLE_M_TBL(obj));
+ update_cc_tbl(objspace, obj);
break;
case T_IMEMO:
@@ -8247,12 +10642,7 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
return;
case T_ARRAY:
- if (FL_TEST(obj, ELTS_SHARED)) {
- UPDATE_IF_MOVED(objspace, any->as.array.as.heap.aux.shared_root);
- }
- else {
- gc_ref_update_array(objspace, obj);
- }
+ gc_ref_update_array(objspace, obj);
break;
case T_HASH:
@@ -8261,11 +10651,33 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
break;
case T_STRING:
- if (STR_SHARED_P(obj)) {
- UPDATE_IF_MOVED(objspace, any->as.string.as.heap.aux.shared);
- }
- break;
+ {
+#if USE_RVARGC
+#endif
+
+ if (STR_SHARED_P(obj)) {
+#if USE_RVARGC
+ VALUE old_root = any->as.string.as.heap.aux.shared;
+#endif
+ UPDATE_IF_MOVED(objspace, any->as.string.as.heap.aux.shared);
+#if USE_RVARGC
+ VALUE new_root = any->as.string.as.heap.aux.shared;
+ rb_str_update_shared_ary(obj, old_root, new_root);
+#endif
+ }
+
+#if USE_RVARGC
+ /* If, after move the string is not embedded, and can fit in the
+ * slot it's been placed in, then re-embed it. */
+ if (rb_gc_obj_slot_size(obj) >= rb_str_size_as_embedded(obj)) {
+ if (!STR_EMBED_P(obj) && rb_str_reembeddable_p(obj)) {
+ rb_str_make_embedded(obj);
+ }
+ }
+#endif
+ break;
+ }
case T_DATA:
/* Call the compaction callback, if it exists */
{
@@ -8285,6 +10697,7 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
case T_FILE:
if (any->as.file.fptr) {
+ UPDATE_IF_MOVED(objspace, any->as.file.fptr->self);
UPDATE_IF_MOVED(objspace, any->as.file.fptr->pathv);
UPDATE_IF_MOVED(objspace, any->as.file.fptr->tied_io_for_writing);
UPDATE_IF_MOVED(objspace, any->as.file.fptr->writeconv_asciicompat);
@@ -8348,58 +10761,49 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj)
UPDATE_IF_MOVED(objspace, RBASIC(obj)->klass);
- gc_report(4, objspace, "update-refs: %p <-", (void *)obj);
+ gc_report(4, objspace, "update-refs: %p <-\n", (void *)obj);
}
static int
-gc_ref_update(void *vstart, void *vend, size_t stride, void * data)
+gc_ref_update(void *vstart, void *vend, size_t stride, rb_objspace_t * objspace, struct heap_page *page)
{
- rb_objspace_t * objspace;
- struct heap_page *page;
- short free_slots = 0;
-
VALUE v = (VALUE)vstart;
- objspace = (rb_objspace_t *)data;
- page = GET_HEAP_PAGE(v);
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
- page->freelist = NULL;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
+ asan_unlock_freelist(page);
+ asan_lock_freelist(page);
page->flags.has_uncollectible_shady_objects = FALSE;
page->flags.has_remembered_objects = FALSE;
/* For each object on the page */
for (; v != (VALUE)vend; v += stride) {
- if (!SPECIAL_CONST_P(v)) {
- void *poisoned = asan_poisoned_object_p(v);
- asan_unpoison_object(v, false);
+ void *poisoned = asan_unpoison_object_temporary(v);
- switch (BUILTIN_TYPE(v)) {
- case T_NONE:
- heap_page_add_freeobj(objspace, page, v);
- free_slots++;
- break;
- case T_MOVED:
- break;
- case T_ZOMBIE:
- break;
- default:
- if (RVALUE_WB_UNPROTECTED(v)) {
- page->flags.has_uncollectible_shady_objects = TRUE;
- }
- if (RVALUE_PAGE_MARKING(page, v)) {
- page->flags.has_remembered_objects = TRUE;
+ switch (BUILTIN_TYPE(v)) {
+ case T_NONE:
+ case T_MOVED:
+ case T_ZOMBIE:
+ break;
+ default:
+ if (RVALUE_WB_UNPROTECTED(v)) {
+ page->flags.has_uncollectible_shady_objects = TRUE;
+ }
+ if (RVALUE_PAGE_MARKING(page, v)) {
+ page->flags.has_remembered_objects = TRUE;
+ }
+ if (page->flags.before_sweep) {
+ if (RVALUE_MARKED(v)) {
+ gc_update_object_references(objspace, v);
}
+ }
+ else {
gc_update_object_references(objspace, v);
}
+ }
- if (poisoned) {
- GC_ASSERT(BUILTIN_TYPE(v) == T_NONE);
- asan_poison_object(v);
- }
+ if (poisoned) {
+ asan_poison_object(v);
}
}
- page->free_slots = free_slots;
return 0;
}
@@ -8407,14 +10811,34 @@ extern rb_symbols_t ruby_global_symbols;
#define global_symbols ruby_global_symbols
static void
-gc_update_references(rb_objspace_t * objspace)
+gc_update_references(rb_objspace_t *objspace)
{
rb_execution_context_t *ec = GET_EC();
rb_vm_t *vm = rb_ec_vm_ptr(ec);
- objspace_each_objects_without_setup(objspace, gc_ref_update, objspace);
+ struct heap_page *page = NULL;
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ bool should_set_mark_bits = TRUE;
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
+
+ ccan_list_for_each(&heap->pages, page, page_node) {
+ uintptr_t start = (uintptr_t)page->start;
+ uintptr_t end = start + (page->total_slots * size_pool->slot_size);
+
+ gc_ref_update((void *)start, (void *)end, size_pool->slot_size, objspace, page);
+ if (page == heap->sweeping_page) {
+ should_set_mark_bits = FALSE;
+ }
+ if (should_set_mark_bits) {
+ gc_setup_mark_bits(page);
+ }
+ }
+ }
rb_vm_update_references(vm);
rb_transient_heap_update_references();
+ rb_gc_update_global_tbl();
global_symbols.ids = rb_gc_location(global_symbols.ids);
global_symbols.dsymbol_fstr_hash = rb_gc_location(global_symbols.dsymbol_fstr_hash);
gc_update_tbl_refs(objspace, objspace->obj_to_id_tbl);
@@ -8423,56 +10847,60 @@ gc_update_references(rb_objspace_t * objspace)
gc_update_table_refs(objspace, finalizer_table);
}
-static VALUE type_sym(size_t type);
-
+#if GC_CAN_COMPILE_COMPACTION
+/*
+ * call-seq:
+ * GC.latest_compact_info -> hash
+ *
+ * Returns information about object moved in the most recent \GC compaction.
+ *
+ * The returned hash has two keys :considered and :moved. The hash for
+ * :considered lists the number of objects that were considered for movement
+ * by the compactor, and the :moved hash lists the number of objects that
+ * were actually moved. Some objects can't be moved (maybe they were pinned)
+ * so these numbers can be used to calculate compaction efficiency.
+ */
static VALUE
-gc_compact_stats(rb_objspace_t *objspace)
+gc_compact_stats(VALUE self)
{
size_t i;
+ rb_objspace_t *objspace = &rb_objspace;
VALUE h = rb_hash_new();
VALUE considered = rb_hash_new();
VALUE moved = rb_hash_new();
+ VALUE moved_up = rb_hash_new();
+ VALUE moved_down = rb_hash_new();
for (i=0; i<T_MASK; i++) {
- rb_hash_aset(considered, type_sym(i), SIZET2NUM(objspace->rcompactor.considered_count_table[i]));
- }
+ if (objspace->rcompactor.considered_count_table[i]) {
+ rb_hash_aset(considered, type_sym(i), SIZET2NUM(objspace->rcompactor.considered_count_table[i]));
+ }
- for (i=0; i<T_MASK; i++) {
- rb_hash_aset(moved, type_sym(i), SIZET2NUM(objspace->rcompactor.moved_count_table[i]));
+ if (objspace->rcompactor.moved_count_table[i]) {
+ rb_hash_aset(moved, type_sym(i), SIZET2NUM(objspace->rcompactor.moved_count_table[i]));
+ }
+
+ if (objspace->rcompactor.moved_up_count_table[i]) {
+ rb_hash_aset(moved_up, type_sym(i), SIZET2NUM(objspace->rcompactor.moved_up_count_table[i]));
+ }
+
+ if (objspace->rcompactor.moved_down_count_table[i]) {
+ rb_hash_aset(moved_down, type_sym(i), SIZET2NUM(objspace->rcompactor.moved_down_count_table[i]));
+ }
}
rb_hash_aset(h, ID2SYM(rb_intern("considered")), considered);
rb_hash_aset(h, ID2SYM(rb_intern("moved")), moved);
+ rb_hash_aset(h, ID2SYM(rb_intern("moved_up")), moved_up);
+ rb_hash_aset(h, ID2SYM(rb_intern("moved_down")), moved_down);
return h;
}
+#else
+# define gc_compact_stats rb_f_notimplement
+#endif
-static void gc_compact_after_gc(rb_objspace_t *objspace, int use_toward_empty, int use_double_pages, int use_verifier);
-
-static void
-gc_compact(rb_objspace_t *objspace, int use_toward_empty, int use_double_pages, int use_verifier)
-{
-
- objspace->flags.during_compacting = TRUE;
- {
- /* pin objects referenced by maybe pointers */
- garbage_collect(objspace, GPR_DEFAULT_REASON);
- /* compact */
- gc_compact_after_gc(objspace, use_toward_empty, use_double_pages, use_verifier);
- }
- objspace->flags.during_compacting = FALSE;
-}
-
-static VALUE
-rb_gc_compact(rb_execution_context_t *ec, VALUE self)
-{
- rb_objspace_t *objspace = &rb_objspace;
- if (dont_gc) return Qnil;
-
- gc_compact(objspace, FALSE, FALSE, FALSE);
- return gc_compact_stats(objspace);
-}
-
+#if GC_CAN_COMPILE_COMPACTION
static void
root_obj_check_moved_i(const char *category, VALUE obj, void *data)
{
@@ -8499,15 +10927,16 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
/* Moved object still on the heap, something may have a reference. */
}
else {
- void *poisoned = asan_poisoned_object_p(v);
- asan_unpoison_object(v, false);
+ void *poisoned = asan_unpoison_object_temporary(v);
switch (BUILTIN_TYPE(v)) {
case T_NONE:
case T_ZOMBIE:
break;
default:
- rb_objspace_reachable_objects_from(v, reachable_object_check_moved_i, (void *)v);
+ if (!rb_objspace_garbage_object_p(v)) {
+ rb_objspace_reachable_objects_from(v, reachable_object_check_moved_i, (void *)v);
+ }
}
if (poisoned) {
@@ -8520,153 +10949,85 @@ heap_check_moved_i(void *vstart, void *vend, size_t stride, void *data)
return 0;
}
-static VALUE
-gc_check_references_for_moved(rb_objspace_t *objspace)
-{
- objspace_reachable_objects_from_root(objspace, root_obj_check_moved_i, NULL);
- objspace_each_objects(objspace, heap_check_moved_i, NULL);
- return Qnil;
-}
-
-static void
-gc_compact_after_gc(rb_objspace_t *objspace, int use_toward_empty, int use_double_pages, int use_verifier)
-{
- if (0) fprintf(stderr, "gc_compact_after_gc: %d,%d,%d\n", use_toward_empty, use_double_pages, use_verifier);
-
- mjit_gc_start_hook(); // prevent MJIT from running while moving pointers related to ISeq
-
- objspace->profile.compact_count++;
-
- if (use_verifier) {
- gc_verify_internal_consistency(objspace);
- }
-
- if (use_double_pages) {
- /* Double heap size */
- heap_add_pages(objspace, heap_eden, heap_allocated_pages);
- }
-
- VALUE moved_list_head;
- VALUE disabled = rb_gc_disable();
-
- if (use_toward_empty) {
- moved_list_head = gc_compact_heap(objspace, compare_free_slots);
- }
- else {
- moved_list_head = gc_compact_heap(objspace, compare_pinned);
- }
- heap_eden->freelist = NULL;
-
- gc_update_references(objspace);
- if (!RTEST(disabled)) rb_gc_enable();
-
- if (use_verifier) {
- gc_check_references_for_moved(objspace);
- }
-
- rb_clear_method_cache_by_class(rb_cObject);
- rb_clear_constant_cache();
- heap_eden->free_pages = NULL;
- heap_eden->using_page = NULL;
-
- /* For each moved slot */
- while (moved_list_head) {
- VALUE next_moved;
- struct heap_page *page;
-
- page = GET_HEAP_PAGE(moved_list_head);
- next_moved = RMOVED(moved_list_head)->next;
-
- /* clear the memory for that moved slot */
- RMOVED(moved_list_head)->flags = 0;
- RMOVED(moved_list_head)->destination = 0;
- RMOVED(moved_list_head)->next = 0;
- page->free_slots++;
- heap_page_add_freeobj(objspace, page, moved_list_head);
-
- if (page->free_slots == page->total_slots && heap_pages_freeable_pages > 0) {
- heap_pages_freeable_pages--;
- heap_unlink_page(objspace, heap_eden, page);
- heap_add_page(objspace, heap_tomb, page);
- }
- objspace->profile.total_freed_objects++;
- moved_list_head = next_moved;
- }
-
- /* Add any eden pages with free slots back to the free pages list */
- struct heap_page *page = NULL;
- list_for_each(&heap_eden->pages, page, page_node) {
- if (page->free_slots > 0) {
- heap_add_freepage(heap_eden, page);
- } else {
- page->free_next = NULL;
- }
- }
-
- /* Set up "using_page" if we have any pages with free slots */
- if (heap_eden->free_pages) {
- heap_eden->using_page = heap_eden->free_pages;
- heap_eden->free_pages = heap_eden->free_pages->free_next;
- }
-
- if (use_verifier) {
- gc_verify_internal_consistency(objspace);
- }
-
- mjit_gc_exit_hook(); // unlock MJIT here, because `rb_gc()` calls `mjit_gc_start_hook()` again.
-}
-
/*
* call-seq:
- * GC.verify_compaction_references -> nil
+ * GC.compact
+ *
+ * This function compacts objects together in Ruby's heap. It eliminates
+ * unused space (or fragmentation) in the heap by moving objects in to that
+ * unused space. This function returns a hash which contains statistics about
+ * which objects were moved. See <tt>GC.latest_gc_info</tt> for details about
+ * compaction statistics.
*
- * Verify compaction reference consistency.
+ * This method is implementation specific and not expected to be implemented
+ * in any implementation besides MRI.
*
- * This method is implementation specific. During compaction, objects that
- * were moved are replaced with T_MOVED objects. No object should have a
- * reference to a T_MOVED object after compaction.
+ * To test whether \GC compaction is supported, use the idiom:
*
- * This function doubles the heap to ensure room to move all objects,
- * compacts the heap to make sure everything moves, updates all references,
- * then performs a full GC. If any object contains a reference to a T_MOVED
- * object, that object should be pushed on the mark stack, and will
- * make a SEGV.
+ * GC.respond_to?(:compact)
*/
static VALUE
-gc_verify_compaction_references(int argc, VALUE *argv, VALUE mod)
+gc_compact(VALUE self)
+{
+ /* Run GC with compaction enabled */
+ gc_start_internal(NULL, self, Qtrue, Qtrue, Qtrue, Qtrue);
+
+ return gc_compact_stats(self);
+}
+#else
+# define gc_compact rb_f_notimplement
+#endif
+
+#if GC_CAN_COMPILE_COMPACTION
+static VALUE
+gc_verify_compaction_references(rb_execution_context_t *ec, VALUE self, VALUE double_heap, VALUE expand_heap, VALUE toward_empty)
{
rb_objspace_t *objspace = &rb_objspace;
- int use_toward_empty = FALSE;
- int use_double_pages = FALSE;
- if (dont_gc) return Qnil;
+ /* Clear the heap. */
+ gc_start_internal(NULL, self, Qtrue, Qtrue, Qtrue, Qfalse);
+ size_t growth_slots = gc_params.heap_init_slots;
- VALUE opt = Qnil;
- static ID keyword_ids[2];
- VALUE kwvals[2];
+ if (RTEST(double_heap)) {
+ rb_warn("double_heap is deprecated, please use expand_heap instead");
+ }
- kwvals[1] = Qtrue;
+ RB_VM_LOCK_ENTER();
+ {
+ gc_rest(objspace);
- rb_scan_args(argc, argv, "0:", &opt);
+ /* if both double_heap and expand_heap are set, expand_heap takes precedence */
+ if (RTEST(double_heap) || RTEST(expand_heap)) {
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+ rb_heap_t *heap = SIZE_POOL_EDEN_HEAP(size_pool);
- if (!NIL_P(opt)) {
- if (!keyword_ids[0]) {
- keyword_ids[0] = rb_intern("toward");
- keyword_ids[1] = rb_intern("double_heap");
+ if (RTEST(expand_heap)) {
+ size_t required_pages = growth_slots / size_pool->slot_size;
+ heap_add_pages(objspace, size_pool, heap, MAX(required_pages, heap->total_pages));
+ }
+ else {
+ heap_add_pages(objspace, size_pool, heap, heap->total_pages);
+ }
+ }
}
- rb_get_kwargs(opt, keyword_ids, 0, 2, kwvals);
- if (rb_intern("empty") == rb_sym2id(kwvals[0])) {
- use_toward_empty = TRUE;
- }
- if (kwvals[1] != Qundef && RTEST(kwvals[1])) {
- use_double_pages = TRUE;
+ if (RTEST(toward_empty)) {
+ gc_sort_heap_by_empty_slots(objspace);
}
}
+ RB_VM_LOCK_LEAVE();
- gc_compact(objspace, use_toward_empty, use_double_pages, TRUE);
- return gc_compact_stats(objspace);
+ gc_start_internal(NULL, self, Qtrue, Qtrue, Qtrue, Qtrue);
+
+ objspace_reachable_objects_from_root(objspace, root_obj_check_moved_i, NULL);
+ objspace_each_objects(objspace, heap_check_moved_i, NULL, TRUE);
+
+ return gc_compact_stats(self);
}
+#else
+# define gc_verify_compaction_references (rb_builtin_arity3_function_type)rb_f_notimplement
+#endif
VALUE
rb_gc_start(void)
@@ -8679,7 +11040,7 @@ void
rb_gc(void)
{
rb_objspace_t *objspace = &rb_objspace;
- int reason = GPR_DEFAULT_REASON;
+ unsigned int reason = GPR_DEFAULT_REASON;
garbage_collect(objspace, reason);
}
@@ -8720,9 +11081,9 @@ gc_count(rb_execution_context_t *ec, VALUE self)
}
static VALUE
-gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_flags)
+gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const unsigned int orig_flags)
{
- static VALUE sym_major_by = Qnil, sym_gc_by, sym_immediate_sweep, sym_have_finalizer, sym_state;
+ static VALUE sym_major_by = Qnil, sym_gc_by, sym_immediate_sweep, sym_have_finalizer, sym_state, sym_need_major_by;
static VALUE sym_nofree, sym_oldgen, sym_shady, sym_force, sym_stress;
#if RGENGC_ESTIMATE_OLDMALLOC
static VALUE sym_oldmalloc;
@@ -8730,8 +11091,8 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
static VALUE sym_newobj, sym_malloc, sym_method, sym_capi;
static VALUE sym_none, sym_marking, sym_sweeping;
VALUE hash = Qnil, key = Qnil;
- VALUE major_by;
- VALUE flags = orig_flags ? orig_flags : objspace->profile.latest_gc_info;
+ VALUE major_by, need_major_by;
+ unsigned int flags = orig_flags ? orig_flags : objspace->profile.latest_gc_info;
if (SYMBOL_P(hash_or_key)) {
key = hash_or_key;
@@ -8743,13 +11104,14 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
rb_raise(rb_eTypeError, "non-hash or symbol given");
}
- if (sym_major_by == Qnil) {
+ if (NIL_P(sym_major_by)) {
#define S(s) sym_##s = ID2SYM(rb_intern_const(#s))
S(major_by);
S(gc_by);
S(immediate_sweep);
S(have_finalizer);
S(state);
+ S(need_major_by);
S(stress);
S(nofree);
@@ -8787,6 +11149,20 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
Qnil;
SET(major_by, major_by);
+ if (orig_flags == 0) { /* set need_major_by only if flags not set explicitly */
+ unsigned int need_major_flags = objspace->rgengc.need_major_gc;
+ need_major_by =
+ (need_major_flags & GPR_FLAG_MAJOR_BY_NOFREE) ? sym_nofree :
+ (need_major_flags & GPR_FLAG_MAJOR_BY_OLDGEN) ? sym_oldgen :
+ (need_major_flags & GPR_FLAG_MAJOR_BY_SHADY) ? sym_shady :
+ (need_major_flags & GPR_FLAG_MAJOR_BY_FORCE) ? sym_force :
+#if RGENGC_ESTIMATE_OLDMALLOC
+ (need_major_flags & GPR_FLAG_MAJOR_BY_OLDMALLOC) ? sym_oldmalloc :
+#endif
+ Qnil;
+ SET(need_major_by, need_major_by);
+ }
+
SET(gc_by,
(flags & GPR_FLAG_NEWOBJ) ? sym_newobj :
(flags & GPR_FLAG_MALLOC) ? sym_malloc :
@@ -8796,8 +11172,8 @@ gc_info_decode(rb_objspace_t *objspace, const VALUE hash_or_key, const int orig_
Qnil
);
- SET(have_finalizer, (flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse);
- SET(immediate_sweep, (flags & GPR_FLAG_IMMEDIATE_SWEEP) ? Qtrue : Qfalse);
+ SET(have_finalizer, RBOOL(flags & GPR_FLAG_HAVE_FINALIZE));
+ SET(immediate_sweep, RBOOL(flags & GPR_FLAG_IMMEDIATE_SWEEP));
if (orig_flags == 0) {
SET(state, gc_mode(objspace) == gc_mode_none ? sym_none :
@@ -8836,6 +11212,7 @@ gc_latest_gc_info(rb_execution_context_t *ec, VALUE self, VALUE arg)
enum gc_stat_sym {
gc_stat_sym_count,
+ gc_stat_sym_time,
gc_stat_sym_heap_allocated_pages,
gc_stat_sym_heap_sorted_length,
gc_stat_sym_heap_allocatable_pages,
@@ -8852,10 +11229,11 @@ enum gc_stat_sym {
gc_stat_sym_total_freed_objects,
gc_stat_sym_malloc_increase_bytes,
gc_stat_sym_malloc_increase_bytes_limit,
-#if USE_RGENGC
gc_stat_sym_minor_gc_count,
gc_stat_sym_major_gc_count,
gc_stat_sym_compact_count,
+ gc_stat_sym_read_barrier_faults,
+ gc_stat_sym_total_moved_objects,
gc_stat_sym_remembered_wb_unprotected_objects,
gc_stat_sym_remembered_wb_unprotected_objects_limit,
gc_stat_sym_old_objects,
@@ -8872,181 +11250,57 @@ enum gc_stat_sym {
gc_stat_sym_total_remembered_normal_object_count,
gc_stat_sym_total_remembered_shady_object_count,
#endif
-#endif
gc_stat_sym_last
};
-enum gc_stat_compat_sym {
- gc_stat_compat_sym_gc_stat_heap_used,
- gc_stat_compat_sym_heap_eden_page_length,
- gc_stat_compat_sym_heap_tomb_page_length,
- gc_stat_compat_sym_heap_increment,
- gc_stat_compat_sym_heap_length,
- gc_stat_compat_sym_heap_live_slot,
- gc_stat_compat_sym_heap_free_slot,
- gc_stat_compat_sym_heap_final_slot,
- gc_stat_compat_sym_heap_swept_slot,
-#if USE_RGENGC
- gc_stat_compat_sym_remembered_shady_object,
- gc_stat_compat_sym_remembered_shady_object_limit,
- gc_stat_compat_sym_old_object,
- gc_stat_compat_sym_old_object_limit,
-#endif
- gc_stat_compat_sym_total_allocated_object,
- gc_stat_compat_sym_total_freed_object,
- gc_stat_compat_sym_malloc_increase,
- gc_stat_compat_sym_malloc_limit,
-#if RGENGC_ESTIMATE_OLDMALLOC
- gc_stat_compat_sym_oldmalloc_increase,
- gc_stat_compat_sym_oldmalloc_limit,
-#endif
- gc_stat_compat_sym_last
-};
-
static VALUE gc_stat_symbols[gc_stat_sym_last];
-static VALUE gc_stat_compat_symbols[gc_stat_compat_sym_last];
-static VALUE gc_stat_compat_table;
static void
setup_gc_stat_symbols(void)
{
if (gc_stat_symbols[0] == 0) {
#define S(s) gc_stat_symbols[gc_stat_sym_##s] = ID2SYM(rb_intern_const(#s))
- S(count);
- S(heap_allocated_pages);
- S(heap_sorted_length);
- S(heap_allocatable_pages);
- S(heap_available_slots);
- S(heap_live_slots);
- S(heap_free_slots);
- S(heap_final_slots);
- S(heap_marked_slots);
- S(heap_eden_pages);
- S(heap_tomb_pages);
- S(total_allocated_pages);
- S(total_freed_pages);
- S(total_allocated_objects);
- S(total_freed_objects);
- S(malloc_increase_bytes);
- S(malloc_increase_bytes_limit);
-#if USE_RGENGC
- S(minor_gc_count);
- S(major_gc_count);
- S(compact_count);
- S(remembered_wb_unprotected_objects);
- S(remembered_wb_unprotected_objects_limit);
- S(old_objects);
- S(old_objects_limit);
+ S(count);
+ S(time);
+ S(heap_allocated_pages);
+ S(heap_sorted_length);
+ S(heap_allocatable_pages);
+ S(heap_available_slots);
+ S(heap_live_slots);
+ S(heap_free_slots);
+ S(heap_final_slots);
+ S(heap_marked_slots);
+ S(heap_eden_pages);
+ S(heap_tomb_pages);
+ S(total_allocated_pages);
+ S(total_freed_pages);
+ S(total_allocated_objects);
+ S(total_freed_objects);
+ S(malloc_increase_bytes);
+ S(malloc_increase_bytes_limit);
+ S(minor_gc_count);
+ S(major_gc_count);
+ S(compact_count);
+ S(read_barrier_faults);
+ S(total_moved_objects);
+ S(remembered_wb_unprotected_objects);
+ S(remembered_wb_unprotected_objects_limit);
+ S(old_objects);
+ S(old_objects_limit);
#if RGENGC_ESTIMATE_OLDMALLOC
- S(oldmalloc_increase_bytes);
- S(oldmalloc_increase_bytes_limit);
+ S(oldmalloc_increase_bytes);
+ S(oldmalloc_increase_bytes_limit);
#endif
#if RGENGC_PROFILE
- S(total_generated_normal_object_count);
- S(total_generated_shady_object_count);
- S(total_shade_operation_count);
- S(total_promoted_count);
- S(total_remembered_normal_object_count);
- S(total_remembered_shady_object_count);
+ S(total_generated_normal_object_count);
+ S(total_generated_shady_object_count);
+ S(total_shade_operation_count);
+ S(total_promoted_count);
+ S(total_remembered_normal_object_count);
+ S(total_remembered_shady_object_count);
#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
-#undef S
-#define S(s) gc_stat_compat_symbols[gc_stat_compat_sym_##s] = ID2SYM(rb_intern_const(#s))
- S(gc_stat_heap_used);
- S(heap_eden_page_length);
- S(heap_tomb_page_length);
- S(heap_increment);
- S(heap_length);
- S(heap_live_slot);
- S(heap_free_slot);
- S(heap_final_slot);
- S(heap_swept_slot);
-#if USE_RGEGC
- S(remembered_shady_object);
- S(remembered_shady_object_limit);
- S(old_object);
- S(old_object_limit);
-#endif
- S(total_allocated_object);
- S(total_freed_object);
- S(malloc_increase);
- S(malloc_limit);
-#if RGENGC_ESTIMATE_OLDMALLOC
- S(oldmalloc_increase);
- S(oldmalloc_limit);
-#endif
#undef S
-
- {
- VALUE table = gc_stat_compat_table = rb_hash_new();
- rb_obj_hide(table);
- rb_gc_register_mark_object(table);
-
- /* compatibility layer for Ruby 2.1 */
-#define OLD_SYM(s) gc_stat_compat_symbols[gc_stat_compat_sym_##s]
-#define NEW_SYM(s) gc_stat_symbols[gc_stat_sym_##s]
- rb_hash_aset(table, OLD_SYM(gc_stat_heap_used), NEW_SYM(heap_allocated_pages));
- rb_hash_aset(table, OLD_SYM(heap_eden_page_length), NEW_SYM(heap_eden_pages));
- rb_hash_aset(table, OLD_SYM(heap_tomb_page_length), NEW_SYM(heap_tomb_pages));
- rb_hash_aset(table, OLD_SYM(heap_increment), NEW_SYM(heap_allocatable_pages));
- rb_hash_aset(table, OLD_SYM(heap_length), NEW_SYM(heap_sorted_length));
- rb_hash_aset(table, OLD_SYM(heap_live_slot), NEW_SYM(heap_live_slots));
- rb_hash_aset(table, OLD_SYM(heap_free_slot), NEW_SYM(heap_free_slots));
- rb_hash_aset(table, OLD_SYM(heap_final_slot), NEW_SYM(heap_final_slots));
-#if USE_RGEGC
- rb_hash_aset(table, OLD_SYM(remembered_shady_object), NEW_SYM(remembered_wb_unprotected_objects));
- rb_hash_aset(table, OLD_SYM(remembered_shady_object_limit), NEW_SYM(remembered_wb_unprotected_objects_limit));
- rb_hash_aset(table, OLD_SYM(old_object), NEW_SYM(old_objects));
- rb_hash_aset(table, OLD_SYM(old_object_limit), NEW_SYM(old_objects_limit));
-#endif
- rb_hash_aset(table, OLD_SYM(total_allocated_object), NEW_SYM(total_allocated_objects));
- rb_hash_aset(table, OLD_SYM(total_freed_object), NEW_SYM(total_freed_objects));
- rb_hash_aset(table, OLD_SYM(malloc_increase), NEW_SYM(malloc_increase_bytes));
- rb_hash_aset(table, OLD_SYM(malloc_limit), NEW_SYM(malloc_increase_bytes_limit));
-#if RGENGC_ESTIMATE_OLDMALLOC
- rb_hash_aset(table, OLD_SYM(oldmalloc_increase), NEW_SYM(oldmalloc_increase_bytes));
- rb_hash_aset(table, OLD_SYM(oldmalloc_limit), NEW_SYM(oldmalloc_increase_bytes_limit));
-#endif
-#undef OLD_SYM
-#undef NEW_SYM
- rb_obj_freeze(table);
- }
- }
-}
-
-static VALUE
-compat_key(VALUE key)
-{
- VALUE new_key = rb_hash_lookup(gc_stat_compat_table, key);
-
- if (!NIL_P(new_key)) {
- static int warned = 0;
- if (warned == 0) {
- rb_warn("GC.stat keys were changed from Ruby 2.1. "
- "In this case, you refer to obsolete `%"PRIsVALUE"' (new key is `%"PRIsVALUE"'). "
- "Please check <https://bugs.ruby-lang.org/issues/9924> for more information.",
- key, new_key);
- warned = 1;
- }
- }
-
- return new_key;
-}
-
-static VALUE
-default_proc_for_compat_func(RB_BLOCK_CALL_FUNC_ARGLIST(hash, _))
-{
- VALUE key, new_key;
-
- Check_Type(hash, T_HASH);
- rb_check_arity(argc, 2, 2);
- key = argv[1];
-
- if ((new_key = compat_key(key)) != Qnil) {
- return rb_hash_lookup(hash, new_key);
}
-
- return Qnil;
}
static size_t
@@ -9058,54 +11312,46 @@ gc_stat_internal(VALUE hash_or_sym)
setup_gc_stat_symbols();
if (RB_TYPE_P(hash_or_sym, T_HASH)) {
- hash = hash_or_sym;
-
- if (NIL_P(RHASH_IFNONE(hash))) {
- static VALUE default_proc_for_compat = 0;
- if (default_proc_for_compat == 0) { /* TODO: it should be */
- default_proc_for_compat = rb_proc_new(default_proc_for_compat_func, Qnil);
- rb_gc_register_mark_object(default_proc_for_compat);
- }
- rb_hash_set_default_proc(hash, default_proc_for_compat);
- }
+ hash = hash_or_sym;
}
else if (SYMBOL_P(hash_or_sym)) {
- key = hash_or_sym;
+ key = hash_or_sym;
}
else {
- rb_raise(rb_eTypeError, "non-hash or symbol argument");
+ rb_raise(rb_eTypeError, "non-hash or symbol argument");
}
#define SET(name, attr) \
if (key == gc_stat_symbols[gc_stat_sym_##name]) \
- return attr; \
+ return attr; \
else if (hash != Qnil) \
- rb_hash_aset(hash, gc_stat_symbols[gc_stat_sym_##name], SIZET2NUM(attr));
+ rb_hash_aset(hash, gc_stat_symbols[gc_stat_sym_##name], SIZET2NUM(attr));
- again:
SET(count, objspace->profile.count);
+ SET(time, (size_t) (objspace->profile.total_time_ns / (1000 * 1000) /* ns -> ms */)); // TODO: UINT64T2NUM
/* implementation dependent counters */
SET(heap_allocated_pages, heap_allocated_pages);
SET(heap_sorted_length, heap_pages_sorted_length);
- SET(heap_allocatable_pages, heap_allocatable_pages);
+ SET(heap_allocatable_pages, heap_allocatable_pages(objspace));
SET(heap_available_slots, objspace_available_slots(objspace));
SET(heap_live_slots, objspace_live_slots(objspace));
SET(heap_free_slots, objspace_free_slots(objspace));
SET(heap_final_slots, heap_pages_final_slots);
SET(heap_marked_slots, objspace->marked_slots);
- SET(heap_eden_pages, heap_eden->total_pages);
- SET(heap_tomb_pages, heap_tomb->total_pages);
- SET(total_allocated_pages, objspace->profile.total_allocated_pages);
- SET(total_freed_pages, objspace->profile.total_freed_pages);
+ SET(heap_eden_pages, heap_eden_total_pages(objspace));
+ SET(heap_tomb_pages, heap_tomb_total_pages(objspace));
+ SET(total_allocated_pages, total_allocated_pages(objspace));
+ SET(total_freed_pages, total_freed_pages(objspace));
SET(total_allocated_objects, objspace->total_allocated_objects);
SET(total_freed_objects, objspace->profile.total_freed_objects);
SET(malloc_increase_bytes, malloc_increase);
SET(malloc_increase_bytes_limit, malloc_limit);
-#if USE_RGENGC
SET(minor_gc_count, objspace->profile.minor_gc_count);
SET(major_gc_count, objspace->profile.major_gc_count);
SET(compact_count, objspace->profile.compact_count);
+ SET(read_barrier_faults, objspace->profile.read_barrier_faults);
+ SET(total_moved_objects, objspace->rcompactor.total_moved);
SET(remembered_wb_unprotected_objects, objspace->rgengc.uncollectible_wb_unprotected_objects);
SET(remembered_wb_unprotected_objects_limit, objspace->rgengc.uncollectible_wb_unprotected_objects_limit);
SET(old_objects, objspace->rgengc.old_objects);
@@ -9123,26 +11369,20 @@ gc_stat_internal(VALUE hash_or_sym)
SET(total_remembered_normal_object_count, objspace->profile.total_remembered_normal_object_count);
SET(total_remembered_shady_object_count, objspace->profile.total_remembered_shady_object_count);
#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
#undef SET
if (!NIL_P(key)) { /* matched key should return above */
- VALUE new_key;
- if ((new_key = compat_key(key)) != Qnil) {
- key = new_key;
- goto again;
- }
- rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key));
+ rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key));
}
#if defined(RGENGC_PROFILE) && RGENGC_PROFILE >= 2
if (hash != Qnil) {
- gc_count_add_each_types(hash, "generated_normal_object_count_types", objspace->profile.generated_normal_object_count_types);
- gc_count_add_each_types(hash, "generated_shady_object_count_types", objspace->profile.generated_shady_object_count_types);
- gc_count_add_each_types(hash, "shade_operation_count_types", objspace->profile.shade_operation_count_types);
- gc_count_add_each_types(hash, "promoted_types", objspace->profile.promoted_types);
- gc_count_add_each_types(hash, "remembered_normal_object_count_types", objspace->profile.remembered_normal_object_count_types);
- gc_count_add_each_types(hash, "remembered_shady_object_count_types", objspace->profile.remembered_shady_object_count_types);
+ gc_count_add_each_types(hash, "generated_normal_object_count_types", objspace->profile.generated_normal_object_count_types);
+ gc_count_add_each_types(hash, "generated_shady_object_count_types", objspace->profile.generated_shady_object_count_types);
+ gc_count_add_each_types(hash, "shade_operation_count_types", objspace->profile.shade_operation_count_types);
+ gc_count_add_each_types(hash, "promoted_types", objspace->profile.promoted_types);
+ gc_count_add_each_types(hash, "remembered_normal_object_count_types", objspace->profile.remembered_normal_object_count_types);
+ gc_count_add_each_types(hash, "remembered_shady_object_count_types", objspace->profile.remembered_shady_object_count_types);
}
#endif
@@ -9174,15 +11414,146 @@ size_t
rb_gc_stat(VALUE key)
{
if (SYMBOL_P(key)) {
- size_t value = gc_stat_internal(key);
- return value;
+ size_t value = gc_stat_internal(key);
+ return value;
}
else {
- gc_stat_internal(key);
- return 0;
+ gc_stat_internal(key);
+ return 0;
}
}
+
+enum gc_stat_heap_sym {
+ gc_stat_heap_sym_slot_size,
+ gc_stat_heap_sym_heap_allocatable_pages,
+ gc_stat_heap_sym_heap_eden_pages,
+ gc_stat_heap_sym_heap_eden_slots,
+ gc_stat_heap_sym_heap_tomb_pages,
+ gc_stat_heap_sym_heap_tomb_slots,
+ gc_stat_heap_sym_total_allocated_pages,
+ gc_stat_heap_sym_total_freed_pages,
+ gc_stat_heap_sym_force_major_gc_count,
+ gc_stat_heap_sym_last
+};
+
+static VALUE gc_stat_heap_symbols[gc_stat_heap_sym_last];
+
+static void
+setup_gc_stat_heap_symbols(void)
+{
+ if (gc_stat_heap_symbols[0] == 0) {
+#define S(s) gc_stat_heap_symbols[gc_stat_heap_sym_##s] = ID2SYM(rb_intern_const(#s))
+ S(slot_size);
+ S(heap_allocatable_pages);
+ S(heap_eden_pages);
+ S(heap_eden_slots);
+ S(heap_tomb_pages);
+ S(heap_tomb_slots);
+ S(total_allocated_pages);
+ S(total_freed_pages);
+ S(force_major_gc_count);
+#undef S
+ }
+}
+
+static size_t
+gc_stat_heap_internal(int size_pool_idx, VALUE hash_or_sym)
+{
+ rb_objspace_t *objspace = &rb_objspace;
+ VALUE hash = Qnil, key = Qnil;
+
+ setup_gc_stat_heap_symbols();
+
+ if (RB_TYPE_P(hash_or_sym, T_HASH)) {
+ hash = hash_or_sym;
+ }
+ else if (SYMBOL_P(hash_or_sym)) {
+ key = hash_or_sym;
+ }
+ else {
+ rb_raise(rb_eTypeError, "non-hash or symbol argument");
+ }
+
+ if (size_pool_idx < 0 || size_pool_idx >= SIZE_POOL_COUNT) {
+ rb_raise(rb_eArgError, "size pool index out of range");
+ }
+
+ rb_size_pool_t *size_pool = &size_pools[size_pool_idx];
+
+#define SET(name, attr) \
+ if (key == gc_stat_heap_symbols[gc_stat_heap_sym_##name]) \
+ return attr; \
+ else if (hash != Qnil) \
+ rb_hash_aset(hash, gc_stat_heap_symbols[gc_stat_heap_sym_##name], SIZET2NUM(attr));
+
+ SET(slot_size, size_pool->slot_size);
+ SET(heap_allocatable_pages, size_pool->allocatable_pages);
+ SET(heap_eden_pages, SIZE_POOL_EDEN_HEAP(size_pool)->total_pages);
+ SET(heap_eden_slots, SIZE_POOL_EDEN_HEAP(size_pool)->total_slots);
+ SET(heap_tomb_pages, SIZE_POOL_TOMB_HEAP(size_pool)->total_pages);
+ SET(heap_tomb_slots, SIZE_POOL_TOMB_HEAP(size_pool)->total_slots);
+ SET(total_allocated_pages, size_pool->total_allocated_pages);
+ SET(total_freed_pages, size_pool->total_freed_pages);
+ SET(force_major_gc_count, size_pool->force_major_gc_count);
+#undef SET
+
+ if (!NIL_P(key)) { /* matched key should return above */
+ rb_raise(rb_eArgError, "unknown key: %"PRIsVALUE, rb_sym2str(key));
+ }
+
+ return 0;
+}
+
+static VALUE
+gc_stat_heap(rb_execution_context_t *ec, VALUE self, VALUE heap_name, VALUE arg)
+{
+ if (NIL_P(heap_name)) {
+ if (NIL_P(arg)) {
+ arg = rb_hash_new();
+ }
+ else if (RB_TYPE_P(arg, T_HASH)) {
+ // ok
+ }
+ else {
+ rb_raise(rb_eTypeError, "non-hash given");
+ }
+
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ VALUE hash = rb_hash_aref(arg, INT2FIX(i));
+ if (NIL_P(hash)) {
+ hash = rb_hash_new();
+ rb_hash_aset(arg, INT2FIX(i), hash);
+ }
+ gc_stat_heap_internal(i, hash);
+ }
+ }
+ else if (FIXNUM_P(heap_name)) {
+ int size_pool_idx = FIX2INT(heap_name);
+
+ if (NIL_P(arg)) {
+ arg = rb_hash_new();
+ }
+ else if (SYMBOL_P(arg)) {
+ size_t value = gc_stat_heap_internal(size_pool_idx, arg);
+ return SIZET2NUM(value);
+ }
+ else if (RB_TYPE_P(arg, T_HASH)) {
+ // ok
+ }
+ else {
+ rb_raise(rb_eTypeError, "non-hash or symbol given");
+ }
+
+ gc_stat_heap_internal(size_pool_idx, arg);
+ }
+ else {
+ rb_raise(rb_eTypeError, "heap_name must be nil or an Integer");
+ }
+
+ return arg;
+}
+
static VALUE
gc_stress_get(rb_execution_context_t *ec, VALUE self)
{
@@ -9209,10 +11580,16 @@ VALUE
rb_gc_enable(void)
{
rb_objspace_t *objspace = &rb_objspace;
- int old = dont_gc;
+ return rb_objspace_gc_enable(objspace);
+}
+
+VALUE
+rb_objspace_gc_enable(rb_objspace_t *objspace)
+{
+ int old = dont_gc_val();
- dont_gc = FALSE;
- return old ? Qtrue : Qfalse;
+ dont_gc_off();
+ return RBOOL(old);
}
static VALUE
@@ -9225,18 +11602,29 @@ VALUE
rb_gc_disable_no_rest(void)
{
rb_objspace_t *objspace = &rb_objspace;
- int old = dont_gc;
- dont_gc = TRUE;
- return old ? Qtrue : Qfalse;
+ return gc_disable_no_rest(objspace);
}
+static VALUE
+gc_disable_no_rest(rb_objspace_t *objspace)
+{
+ int old = dont_gc_val();
+ dont_gc_on();
+ return RBOOL(old);
+}
VALUE
rb_gc_disable(void)
{
rb_objspace_t *objspace = &rb_objspace;
+ return rb_objspace_gc_disable(objspace);
+}
+
+VALUE
+rb_objspace_gc_disable(rb_objspace_t *objspace)
+{
gc_rest(objspace);
- return rb_gc_disable_no_rest();
+ return gc_disable_no_rest(objspace);
}
static VALUE
@@ -9245,60 +11633,99 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
return rb_gc_disable();
}
+#if GC_CAN_COMPILE_COMPACTION
+/*
+ * call-seq:
+ * GC.auto_compact = flag
+ *
+ * Updates automatic compaction mode.
+ *
+ * When enabled, the compactor will execute on every major collection.
+ *
+ * Enabling compaction will degrade performance on major collections.
+ */
+static VALUE
+gc_set_auto_compact(VALUE _, VALUE v)
+{
+ GC_ASSERT(GC_COMPACTION_SUPPORTED);
+
+ ruby_enable_autocompact = RTEST(v);
+ return v;
+}
+#else
+# define gc_set_auto_compact rb_f_notimplement
+#endif
+
+#if GC_CAN_COMPILE_COMPACTION
+/*
+ * call-seq:
+ * GC.auto_compact -> true or false
+ *
+ * Returns whether or not automatic compaction has been enabled.
+ */
+static VALUE
+gc_get_auto_compact(VALUE _)
+{
+ return RBOOL(ruby_enable_autocompact);
+}
+#else
+# define gc_get_auto_compact rb_f_notimplement
+#endif
+
static int
get_envparam_size(const char *name, size_t *default_value, size_t lower_bound)
{
- char *ptr = getenv(name);
+ const char *ptr = getenv(name);
ssize_t val;
if (ptr != NULL && *ptr) {
- size_t unit = 0;
- char *end;
+ size_t unit = 0;
+ char *end;
#if SIZEOF_SIZE_T == SIZEOF_LONG_LONG
- val = strtoll(ptr, &end, 0);
+ val = strtoll(ptr, &end, 0);
#else
- val = strtol(ptr, &end, 0);
-#endif
- switch (*end) {
- case 'k': case 'K':
- unit = 1024;
- ++end;
- break;
- case 'm': case 'M':
- unit = 1024*1024;
- ++end;
- break;
- case 'g': case 'G':
- unit = 1024*1024*1024;
- ++end;
- break;
- }
- while (*end && isspace((unsigned char)*end)) end++;
- if (*end) {
- if (RTEST(ruby_verbose)) fprintf(stderr, "invalid string for %s: %s\n", name, ptr);
- return 0;
- }
- if (unit > 0) {
- if (val < -(ssize_t)(SIZE_MAX / 2 / unit) || (ssize_t)(SIZE_MAX / 2 / unit) < val) {
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%s is ignored because it overflows\n", name, ptr);
- return 0;
- }
- val *= unit;
- }
- if (val > 0 && (size_t)val > lower_bound) {
- if (RTEST(ruby_verbose)) {
- fprintf(stderr, "%s=%"PRIdSIZE" (default value: %"PRIuSIZE")\n", name, val, *default_value);
- }
- *default_value = (size_t)val;
- return 1;
- }
- else {
- if (RTEST(ruby_verbose)) {
- fprintf(stderr, "%s=%"PRIdSIZE" (default value: %"PRIuSIZE") is ignored because it must be greater than %"PRIuSIZE".\n",
- name, val, *default_value, lower_bound);
- }
- return 0;
- }
+ val = strtol(ptr, &end, 0);
+#endif
+ switch (*end) {
+ case 'k': case 'K':
+ unit = 1024;
+ ++end;
+ break;
+ case 'm': case 'M':
+ unit = 1024*1024;
+ ++end;
+ break;
+ case 'g': case 'G':
+ unit = 1024*1024*1024;
+ ++end;
+ break;
+ }
+ while (*end && isspace((unsigned char)*end)) end++;
+ if (*end) {
+ if (RTEST(ruby_verbose)) fprintf(stderr, "invalid string for %s: %s\n", name, ptr);
+ return 0;
+ }
+ if (unit > 0) {
+ if (val < -(ssize_t)(SIZE_MAX / 2 / unit) || (ssize_t)(SIZE_MAX / 2 / unit) < val) {
+ if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%s is ignored because it overflows\n", name, ptr);
+ return 0;
+ }
+ val *= unit;
+ }
+ if (val > 0 && (size_t)val > lower_bound) {
+ if (RTEST(ruby_verbose)) {
+ fprintf(stderr, "%s=%"PRIdSIZE" (default value: %"PRIuSIZE")\n", name, val, *default_value);
+ }
+ *default_value = (size_t)val;
+ return 1;
+ }
+ else {
+ if (RTEST(ruby_verbose)) {
+ fprintf(stderr, "%s=%"PRIdSIZE" (default value: %"PRIuSIZE") is ignored because it must be greater than %"PRIuSIZE".\n",
+ name, val, *default_value, lower_bound);
+ }
+ return 0;
+ }
}
return 0;
}
@@ -9306,53 +11733,65 @@ get_envparam_size(const char *name, size_t *default_value, size_t lower_bound)
static int
get_envparam_double(const char *name, double *default_value, double lower_bound, double upper_bound, int accept_zero)
{
- char *ptr = getenv(name);
+ const char *ptr = getenv(name);
double val;
if (ptr != NULL && *ptr) {
- char *end;
- val = strtod(ptr, &end);
- if (!*ptr || *end) {
- if (RTEST(ruby_verbose)) fprintf(stderr, "invalid string for %s: %s\n", name, ptr);
- return 0;
- }
-
- if (accept_zero && val == 0.0) {
- goto accept;
- }
- else if (val <= lower_bound) {
- if (RTEST(ruby_verbose)) {
- fprintf(stderr, "%s=%f (default value: %f) is ignored because it must be greater than %f.\n",
- name, val, *default_value, lower_bound);
- }
- }
- else if (upper_bound != 0.0 && /* ignore upper_bound if it is 0.0 */
- val > upper_bound) {
- if (RTEST(ruby_verbose)) {
- fprintf(stderr, "%s=%f (default value: %f) is ignored because it must be lower than %f.\n",
- name, val, *default_value, upper_bound);
- }
- }
- else {
- accept:
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (default value: %f)\n", name, val, *default_value);
- *default_value = val;
- return 1;
- }
+ char *end;
+ val = strtod(ptr, &end);
+ if (!*ptr || *end) {
+ if (RTEST(ruby_verbose)) fprintf(stderr, "invalid string for %s: %s\n", name, ptr);
+ return 0;
+ }
+
+ if (accept_zero && val == 0.0) {
+ goto accept;
+ }
+ else if (val <= lower_bound) {
+ if (RTEST(ruby_verbose)) {
+ fprintf(stderr, "%s=%f (default value: %f) is ignored because it must be greater than %f.\n",
+ name, val, *default_value, lower_bound);
+ }
+ }
+ else if (upper_bound != 0.0 && /* ignore upper_bound if it is 0.0 */
+ val > upper_bound) {
+ if (RTEST(ruby_verbose)) {
+ fprintf(stderr, "%s=%f (default value: %f) is ignored because it must be lower than %f.\n",
+ name, val, *default_value, upper_bound);
+ }
+ }
+ else {
+ goto accept;
+ }
}
return 0;
+
+ accept:
+ if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (default value: %f)\n", name, val, *default_value);
+ *default_value = val;
+ return 1;
}
static void
-gc_set_initial_pages(void)
+gc_set_initial_pages(rb_objspace_t *objspace)
{
- size_t min_pages;
- rb_objspace_t *objspace = &rb_objspace;
+ gc_rest(objspace);
- min_pages = gc_params.heap_init_slots / HEAP_PAGE_OBJ_LIMIT;
- if (min_pages > heap_eden->total_pages) {
- heap_add_pages(objspace, heap_eden, min_pages - heap_eden->total_pages);
+ for (int i = 0; i < SIZE_POOL_COUNT; i++) {
+ rb_size_pool_t *size_pool = &size_pools[i];
+
+ if (gc_params.heap_init_slots > size_pool->eden_heap.total_slots) {
+ size_t slots = gc_params.heap_init_slots - size_pool->eden_heap.total_slots;
+ int multiple = size_pool->slot_size / BASE_SLOT_SIZE;
+ size_pool->allocatable_pages = slots * multiple / HEAP_PAGE_OBJ_LIMIT;
+ }
+ else {
+ /* We already have more slots than heap_init_slots allows, so
+ * prevent creating more pages. */
+ size_pool->allocatable_pages = 0;
+ }
}
+ heap_pages_expand_sorted(objspace);
}
/*
@@ -9400,34 +11839,30 @@ gc_set_initial_pages(void)
void
ruby_gc_set_params(void)
{
+ rb_objspace_t *objspace = &rb_objspace;
/* RUBY_GC_HEAP_FREE_SLOTS */
if (get_envparam_size("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0)) {
- /* ok */
- }
- else if (get_envparam_size("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) {
- rb_warn("RUBY_FREE_MIN is obsolete. Use RUBY_GC_HEAP_FREE_SLOTS instead.");
+ /* ok */
}
/* RUBY_GC_HEAP_INIT_SLOTS */
if (get_envparam_size("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) {
- gc_set_initial_pages();
- }
- else if (get_envparam_size("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) {
- rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.");
- gc_set_initial_pages();
+ gc_set_initial_pages(objspace);
}
get_envparam_double("RUBY_GC_HEAP_GROWTH_FACTOR", &gc_params.growth_factor, 1.0, 0.0, FALSE);
get_envparam_size ("RUBY_GC_HEAP_GROWTH_MAX_SLOTS", &gc_params.growth_max_slots, 0);
get_envparam_double("RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO", &gc_params.heap_free_slots_min_ratio,
- 0.0, 1.0, FALSE);
+ 0.0, 1.0, FALSE);
get_envparam_double("RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO", &gc_params.heap_free_slots_max_ratio,
- gc_params.heap_free_slots_min_ratio, 1.0, FALSE);
+ gc_params.heap_free_slots_min_ratio, 1.0, FALSE);
get_envparam_double("RUBY_GC_HEAP_FREE_SLOTS_GOAL_RATIO", &gc_params.heap_free_slots_goal_ratio,
- gc_params.heap_free_slots_min_ratio, gc_params.heap_free_slots_max_ratio, TRUE);
+ gc_params.heap_free_slots_min_ratio, gc_params.heap_free_slots_max_ratio, TRUE);
get_envparam_double("RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR", &gc_params.oldobject_limit_factor, 0.0, 0.0, TRUE);
- get_envparam_size ("RUBY_GC_MALLOC_LIMIT", &gc_params.malloc_limit_min, 0);
+ if (get_envparam_size("RUBY_GC_MALLOC_LIMIT", &gc_params.malloc_limit_min, 0)) {
+ malloc_limit = gc_params.malloc_limit_min;
+ }
get_envparam_size ("RUBY_GC_MALLOC_LIMIT_MAX", &gc_params.malloc_limit_max, 0);
if (!gc_params.malloc_limit_max) { /* ignore max-check if 0 */
gc_params.malloc_limit_max = SIZE_MAX;
@@ -9436,27 +11871,42 @@ ruby_gc_set_params(void)
#if RGENGC_ESTIMATE_OLDMALLOC
if (get_envparam_size("RUBY_GC_OLDMALLOC_LIMIT", &gc_params.oldmalloc_limit_min, 0)) {
- rb_objspace_t *objspace = &rb_objspace;
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
+ objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
}
get_envparam_size ("RUBY_GC_OLDMALLOC_LIMIT_MAX", &gc_params.oldmalloc_limit_max, 0);
get_envparam_double("RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR", &gc_params.oldmalloc_limit_growth_factor, 1.0, 0.0, FALSE);
#endif
}
+static void
+reachable_objects_from_callback(VALUE obj)
+{
+ rb_ractor_t *cr = GET_RACTOR();
+ cr->mfd->mark_func(obj, cr->mfd->data);
+}
+
void
rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data)
{
rb_objspace_t *objspace = &rb_objspace;
- if (is_markable_object(objspace, obj)) {
- struct mark_func_data_struct mfd;
- mfd.mark_func = func;
- mfd.data = data;
- PUSH_MARK_FUNC_DATA(&mfd);
- gc_mark_children(objspace, obj);
- POP_MARK_FUNC_DATA();
+ RB_VM_LOCK_ENTER();
+ {
+ if (during_gc) rb_bug("rb_objspace_reachable_objects_from() is not supported while during_gc == true");
+
+ if (is_markable_object(objspace, obj)) {
+ rb_ractor_t *cr = GET_RACTOR();
+ struct gc_mark_func_data_struct mfd = {
+ .mark_func = func,
+ .data = data,
+ }, *prev_mfd = cr->mfd;
+
+ cr->mfd = &mfd;
+ gc_mark_children(objspace, obj);
+ cr->mfd = prev_mfd;
+ }
}
+ RB_VM_LOCK_LEAVE();
}
struct root_objects_data {
@@ -9482,18 +11932,21 @@ rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE,
static void
objspace_reachable_objects_from_root(rb_objspace_t *objspace, void (func)(const char *category, VALUE, void *), void *passing_data)
{
- struct root_objects_data data;
- struct mark_func_data_struct mfd;
-
- data.func = func;
- data.data = passing_data;
+ if (during_gc) rb_bug("objspace_reachable_objects_from_root() is not supported while during_gc == true");
- mfd.mark_func = root_objects_from;
- mfd.data = &data;
+ rb_ractor_t *cr = GET_RACTOR();
+ struct root_objects_data data = {
+ .func = func,
+ .data = passing_data,
+ };
+ struct gc_mark_func_data_struct mfd = {
+ .mark_func = root_objects_from,
+ .data = &data,
+ }, *prev_mfd = cr->mfd;
- PUSH_MARK_FUNC_DATA(&mfd);
+ cr->mfd = &mfd;
gc_mark_roots(objspace, &data.category);
- POP_MARK_FUNC_DATA();
+ cr->mfd = prev_mfd;
}
/*
@@ -9535,10 +11988,10 @@ gc_raise(VALUE exc, const char *fmt, ...)
/* Not in a ruby thread */
fprintf(stderr, "%s", "[FATAL] ");
vfprintf(stderr, fmt, ap);
- abort();
}
va_end(ap);
+ abort();
}
static void objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t size);
@@ -9556,22 +12009,24 @@ ruby_memerror_body(void *dummy)
return 0;
}
+NORETURN(static void ruby_memerror(void));
+RBIMPL_ATTR_MAYBE_UNUSED()
static void
ruby_memerror(void)
{
if (ruby_thread_has_gvl_p()) {
- rb_memerror();
+ rb_memerror();
}
else {
- if (ruby_native_thread_p()) {
- rb_thread_call_with_gvl(ruby_memerror_body, 0);
- }
- else {
- /* no ruby thread */
- fprintf(stderr, "[FATAL] failed to allocate memory\n");
- exit(EXIT_FAILURE);
- }
+ if (ruby_native_thread_p()) {
+ rb_thread_call_with_gvl(ruby_memerror_body, 0);
+ }
+ else {
+ /* no ruby thread */
+ fprintf(stderr, "[FATAL] failed to allocate memory\n");
+ }
}
+ exit(EXIT_FAILURE);
}
void
@@ -9587,20 +12042,23 @@ rb_memerror(void)
sleep(60);
}
- if (during_gc) gc_exit(objspace, "rb_memerror");
+ if (during_gc) {
+ // TODO: OMG!! How to implement it?
+ gc_exit(objspace, gc_enter_event_rb_memerror, NULL);
+ }
exc = nomem_error;
if (!exc ||
- rb_ec_raised_p(ec, RAISED_NOMEMORY)) {
- fprintf(stderr, "[FATAL] failed to allocate memory\n");
- exit(EXIT_FAILURE);
+ rb_ec_raised_p(ec, RAISED_NOMEMORY)) {
+ fprintf(stderr, "[FATAL] failed to allocate memory\n");
+ exit(EXIT_FAILURE);
}
if (rb_ec_raised_p(ec, RAISED_NOMEMORY)) {
- rb_ec_raised_clear(ec);
+ rb_ec_raised_clear(ec);
}
else {
- rb_ec_raised_set(ec, RAISED_NOMEMORY);
- exc = ruby_vm_special_exception_copy(exc);
+ rb_ec_raised_set(ec, RAISED_NOMEMORY);
+ exc = ruby_vm_special_exception_copy(exc);
}
ec->errinfo = exc;
EC_JUMP_TAG(ec, TAG_RAISE);
@@ -9609,6 +12067,10 @@ rb_memerror(void)
void *
rb_aligned_malloc(size_t alignment, size_t size)
{
+ /* alignment must be a power of 2 */
+ GC_ASSERT(((alignment - 1) & alignment) == 0);
+ GC_ASSERT(alignment % sizeof(void*) == 0);
+
void *res;
#if defined __MINGW32__
@@ -9617,10 +12079,7 @@ rb_aligned_malloc(size_t alignment, size_t size)
void *_aligned_malloc(size_t, size_t);
res = _aligned_malloc(size, alignment);
#elif defined(HAVE_POSIX_MEMALIGN)
- if (posix_memalign(&res, alignment, size) == 0) {
- return res;
- }
- else {
+ if (posix_memalign(&res, alignment, size) != 0) {
return NULL;
}
#elif defined(HAVE_MEMALIGN)
@@ -9634,20 +12093,19 @@ rb_aligned_malloc(size_t alignment, size_t size)
res = (void*)aligned;
#endif
- /* alignment must be a power of 2 */
- GC_ASSERT(((alignment - 1) & alignment) == 0);
- GC_ASSERT(alignment % sizeof(void*) == 0);
+ GC_ASSERT((uintptr_t)res % alignment == 0);
+
return res;
}
static void
-rb_aligned_free(void *ptr)
+rb_aligned_free(void *ptr, size_t size)
{
#if defined __MINGW32__
__mingw_aligned_free(ptr);
#elif defined _WIN32
_aligned_free(ptr);
-#elif defined(HAVE_MEMALIGN) || defined(HAVE_POSIX_MEMALIGN)
+#elif defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN)
free(ptr);
#else
free(((void**)ptr)[-1]);
@@ -9676,9 +12134,9 @@ atomic_sub_nounderflow(size_t *var, size_t sub)
if (sub == 0) return;
while (1) {
- size_t val = *var;
- if (val < sub) sub = val;
- if (ATOMIC_SIZE_CAS(*var, val, val-sub) == val) break;
+ size_t val = *var;
+ if (val < sub) sub = val;
+ if (ATOMIC_SIZE_CAS(*var, val, val-sub) == val) break;
}
}
@@ -9686,8 +12144,8 @@ static void
objspace_malloc_gc_stress(rb_objspace_t *objspace)
{
if (ruby_gc_stressful && ruby_native_thread_p()) {
- int reason = GPR_FLAG_IMMEDIATE_MARK | GPR_FLAG_IMMEDIATE_SWEEP |
- GPR_FLAG_STRESS | GPR_FLAG_MALLOC;
+ unsigned int reason = (GPR_FLAG_IMMEDIATE_MARK | GPR_FLAG_IMMEDIATE_SWEEP |
+ GPR_FLAG_STRESS | GPR_FLAG_MALLOC);
if (gc_stress_full_mark_after_malloc_p()) {
reason |= GPR_FLAG_FULL_MARK;
@@ -9696,78 +12154,89 @@ objspace_malloc_gc_stress(rb_objspace_t *objspace)
}
}
-static void
-objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, size_t old_size, enum memop_type type)
+static inline bool
+objspace_malloc_increase_report(rb_objspace_t *objspace, void *mem, size_t new_size, size_t old_size, enum memop_type type)
+{
+ if (0) fprintf(stderr, "increase - ptr: %p, type: %s, new_size: %"PRIdSIZE", old_size: %"PRIdSIZE"\n",
+ mem,
+ type == MEMOP_TYPE_MALLOC ? "malloc" :
+ type == MEMOP_TYPE_FREE ? "free " :
+ type == MEMOP_TYPE_REALLOC ? "realloc": "error",
+ new_size, old_size);
+ return false;
+}
+
+static bool
+objspace_malloc_increase_body(rb_objspace_t *objspace, void *mem, size_t new_size, size_t old_size, enum memop_type type)
{
if (new_size > old_size) {
- ATOMIC_SIZE_ADD(malloc_increase, new_size - old_size);
+ ATOMIC_SIZE_ADD(malloc_increase, new_size - old_size);
#if RGENGC_ESTIMATE_OLDMALLOC
- ATOMIC_SIZE_ADD(objspace->rgengc.oldmalloc_increase, new_size - old_size);
+ ATOMIC_SIZE_ADD(objspace->rgengc.oldmalloc_increase, new_size - old_size);
#endif
}
else {
- atomic_sub_nounderflow(&malloc_increase, old_size - new_size);
+ atomic_sub_nounderflow(&malloc_increase, old_size - new_size);
#if RGENGC_ESTIMATE_OLDMALLOC
- atomic_sub_nounderflow(&objspace->rgengc.oldmalloc_increase, old_size - new_size);
+ atomic_sub_nounderflow(&objspace->rgengc.oldmalloc_increase, old_size - new_size);
#endif
}
if (type == MEMOP_TYPE_MALLOC) {
retry:
- if (malloc_increase > malloc_limit && ruby_native_thread_p() && !dont_gc) {
- if (ruby_thread_has_gvl_p() && is_lazy_sweeping(heap_eden)) {
- gc_rest(objspace); /* gc_rest can reduce malloc_increase */
- goto retry;
- }
- garbage_collect_with_gvl(objspace, GPR_FLAG_MALLOC);
- }
+ if (malloc_increase > malloc_limit && ruby_native_thread_p() && !dont_gc_val()) {
+ if (ruby_thread_has_gvl_p() && is_lazy_sweeping(objspace)) {
+ gc_rest(objspace); /* gc_rest can reduce malloc_increase */
+ goto retry;
+ }
+ garbage_collect_with_gvl(objspace, GPR_FLAG_MALLOC);
+ }
}
#if MALLOC_ALLOCATED_SIZE
if (new_size >= old_size) {
- ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, new_size - old_size);
+ ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, new_size - old_size);
}
else {
- size_t dec_size = old_size - new_size;
- size_t allocated_size = objspace->malloc_params.allocated_size;
+ size_t dec_size = old_size - new_size;
+ size_t allocated_size = objspace->malloc_params.allocated_size;
#if MALLOC_ALLOCATED_SIZE_CHECK
- if (allocated_size < dec_size) {
- rb_bug("objspace_malloc_increase: underflow malloc_params.allocated_size.");
- }
+ if (allocated_size < dec_size) {
+ rb_bug("objspace_malloc_increase: underflow malloc_params.allocated_size.");
+ }
#endif
- atomic_sub_nounderflow(&objspace->malloc_params.allocated_size, dec_size);
+ atomic_sub_nounderflow(&objspace->malloc_params.allocated_size, dec_size);
}
- if (0) fprintf(stderr, "increase - ptr: %p, type: %s, new_size: %d, old_size: %d\n",
- mem,
- type == MEMOP_TYPE_MALLOC ? "malloc" :
- type == MEMOP_TYPE_FREE ? "free " :
- type == MEMOP_TYPE_REALLOC ? "realloc": "error",
- (int)new_size, (int)old_size);
-
switch (type) {
case MEMOP_TYPE_MALLOC:
- ATOMIC_SIZE_INC(objspace->malloc_params.allocations);
- break;
+ ATOMIC_SIZE_INC(objspace->malloc_params.allocations);
+ break;
case MEMOP_TYPE_FREE:
- {
- size_t allocations = objspace->malloc_params.allocations;
- if (allocations > 0) {
- atomic_sub_nounderflow(&objspace->malloc_params.allocations, 1);
- }
+ {
+ size_t allocations = objspace->malloc_params.allocations;
+ if (allocations > 0) {
+ atomic_sub_nounderflow(&objspace->malloc_params.allocations, 1);
+ }
#if MALLOC_ALLOCATED_SIZE_CHECK
- else {
- GC_ASSERT(objspace->malloc_params.allocations > 0);
- }
+ else {
+ GC_ASSERT(objspace->malloc_params.allocations > 0);
+ }
#endif
- }
- break;
+ }
+ break;
case MEMOP_TYPE_REALLOC: /* ignore */ break;
}
#endif
+ return true;
}
+#define objspace_malloc_increase(...) \
+ for (bool malloc_increase_done = objspace_malloc_increase_report(__VA_ARGS__); \
+ !malloc_increase_done; \
+ malloc_increase_done = objspace_malloc_increase_body(__VA_ARGS__))
+
struct malloc_obj_info { /* 4 words */
size_t size;
#if USE_GC_MALLOC_OBJ_INFO_DETAILS
@@ -9794,6 +12263,16 @@ objspace_malloc_prepare(rb_objspace_t *objspace, size_t size)
return size;
}
+static bool
+malloc_during_gc_p(rb_objspace_t *objspace)
+{
+ /* malloc is not allowed during GC when we're not using multiple ractors
+ * (since ractors can run while another thread is sweeping) and when we
+ * have the GVL (since if we don't have the GVL, we'll try to acquire the
+ * GVL which will block and ensure the other thread finishes GC). */
+ return during_gc && !rb_multi_ractor_p() && ruby_thread_has_gvl_p();
+}
+
static inline void *
objspace_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
{
@@ -9808,8 +12287,6 @@ objspace_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
info->gen = objspace->profile.count;
info->file = ruby_malloc_info_file;
info->line = info->file ? ruby_malloc_info_line : 0;
-#else
- info->file = NULL;
#endif
mem = info + 1;
}
@@ -9818,27 +12295,64 @@ objspace_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
return mem;
}
-#define TRY_WITH_GC(alloc) do { \
- objspace_malloc_gc_stress(objspace); \
- if (!(alloc) && \
- (!garbage_collect_with_gvl(objspace, GPR_FLAG_FULL_MARK | \
- GPR_FLAG_IMMEDIATE_MARK | GPR_FLAG_IMMEDIATE_SWEEP | \
- GPR_FLAG_MALLOC) || \
- !(alloc))) { \
- ruby_memerror(); \
- } \
+#if defined(__GNUC__) && RUBY_DEBUG
+#define RB_BUG_INSTEAD_OF_RB_MEMERROR 1
+#endif
+
+#ifndef RB_BUG_INSTEAD_OF_RB_MEMERROR
+# define RB_BUG_INSTEAD_OF_RB_MEMERROR 0
+#endif
+
+#define GC_MEMERROR(...) \
+ ((RB_BUG_INSTEAD_OF_RB_MEMERROR+0) ? rb_bug("" __VA_ARGS__) : rb_memerror())
+
+#define TRY_WITH_GC(siz, expr) do { \
+ const gc_profile_record_flag gpr = \
+ GPR_FLAG_FULL_MARK | \
+ GPR_FLAG_IMMEDIATE_MARK | \
+ GPR_FLAG_IMMEDIATE_SWEEP | \
+ GPR_FLAG_MALLOC; \
+ objspace_malloc_gc_stress(objspace); \
+ \
+ if (LIKELY((expr))) { \
+ /* Success on 1st try */ \
+ } \
+ else if (!garbage_collect_with_gvl(objspace, gpr)) { \
+ /* @shyouhei thinks this doesn't happen */ \
+ GC_MEMERROR("TRY_WITH_GC: could not GC"); \
+ } \
+ else if ((expr)) { \
+ /* Success on 2nd try */ \
+ } \
+ else { \
+ GC_MEMERROR("TRY_WITH_GC: could not allocate:" \
+ "%"PRIdSIZE" bytes for %s", \
+ siz, # expr); \
+ } \
} while (0)
+static void
+check_malloc_not_in_gc(rb_objspace_t *objspace, const char *msg)
+{
+ if (UNLIKELY(malloc_during_gc_p(objspace))) {
+ dont_gc_on();
+ during_gc = false;
+ rb_bug("Cannot %s during GC", msg);
+ }
+}
+
/* these shouldn't be called directly.
- * objspace_* functinos do not check allocation size.
+ * objspace_* functions do not check allocation size.
*/
static void *
objspace_xmalloc0(rb_objspace_t *objspace, size_t size)
{
+ check_malloc_not_in_gc(objspace, "malloc");
+
void *mem;
size = objspace_malloc_prepare(objspace, size);
- TRY_WITH_GC(mem = malloc(size));
+ TRY_WITH_GC(size, mem = malloc(size));
RB_DEBUG_COUNTER_INC(heap_xmalloc);
return objspace_malloc_fixup(objspace, mem, size);
}
@@ -9852,6 +12366,8 @@ xmalloc2_size(const size_t count, const size_t elsize)
static void *
objspace_xrealloc(rb_objspace_t *objspace, void *ptr, size_t new_size, size_t old_size)
{
+ check_malloc_not_in_gc(objspace, "realloc");
+
void *mem;
if (!ptr) return objspace_xmalloc0(objspace, new_size);
@@ -9875,7 +12391,7 @@ objspace_xrealloc(rb_objspace_t *objspace, void *ptr, size_t new_size, size_t ol
* a non-NULL pointer when its argument is 0. That return value
* is safe (and is expected) to be passed to free().
*
- * http://man7.org/linux/man-pages/man3/malloc.3.html
+ * https://man7.org/linux/man-pages/man3/malloc.3.html
*
* - As I read the implementation jemalloc's malloc() returns fully
* normal 16 bytes memory region when its argument is 0.
@@ -9909,7 +12425,7 @@ objspace_xrealloc(rb_objspace_t *objspace, void *ptr, size_t new_size, size_t ol
#endif
old_size = objspace_malloc_size(objspace, ptr, old_size);
- TRY_WITH_GC(mem = realloc(ptr, new_size));
+ TRY_WITH_GC(new_size, mem = RB_GNUC_EXTENSION_BLOCK(realloc(ptr, new_size)));
new_size = objspace_malloc_size(objspace, mem, new_size);
#if CALC_EXACT_MALLOC_SIZE
@@ -9941,7 +12457,7 @@ mmalloc_info_file_i(st_data_t key, st_data_t val, st_data_t dmy)
const char *file = (void *)key;
const size_t *data = (void *)val;
- fprintf(stderr, "%s\t%d\t%d\n", file, (int)data[0], (int)data[1]);
+ fprintf(stderr, "%s\t%"PRIdSIZE"\t%"PRIdSIZE"\n", file, data[0], data[1]);
return ST_CONTINUE;
}
@@ -9955,19 +12471,19 @@ rb_malloc_info_show_results(void)
fprintf(stderr, "* malloc_info gen statistics\n");
for (i=0; i<MALLOC_INFO_GEN_SIZE; i++) {
if (i == MALLOC_INFO_GEN_SIZE-1) {
- fprintf(stderr, "more\t%d\t%d\n", (int)malloc_info_gen_cnt[i], (int)malloc_info_gen_size[i]);
+ fprintf(stderr, "more\t%"PRIdSIZE"\t%"PRIdSIZE"\n", malloc_info_gen_cnt[i], malloc_info_gen_size[i]);
}
else {
- fprintf(stderr, "%d\t%d\t%d\n", i, (int)malloc_info_gen_cnt[i], (int)malloc_info_gen_size[i]);
+ fprintf(stderr, "%d\t%"PRIdSIZE"\t%"PRIdSIZE"\n", i, malloc_info_gen_cnt[i], malloc_info_gen_size[i]);
}
}
fprintf(stderr, "* malloc_info size statistics\n");
for (i=0; i<MALLOC_INFO_SIZE_SIZE; i++) {
int s = 16 << i;
- fprintf(stderr, "%d\t%d\n", (int)s, (int)malloc_info_size[i]);
+ fprintf(stderr, "%d\t%"PRIdSIZE"\n", s, malloc_info_size[i]);
}
- fprintf(stderr, "more\t%d\n", (int)malloc_info_size[i]);
+ fprintf(stderr, "more\t%"PRIdSIZE"\n", malloc_info_size[i]);
if (malloc_info_file_table) {
fprintf(stderr, "* malloc_info file statistics\n");
@@ -10016,14 +12532,15 @@ objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t old_size)
found:;
{
- st_data_t key = (st_data_t)info->file;
+ st_data_t key = (st_data_t)info->file, d;
size_t *data;
if (malloc_info_file_table == NULL) {
malloc_info_file_table = st_init_numtable_with_size(1024);
}
- if (st_lookup(malloc_info_file_table, key, (st_data_t *)&data)) {
+ if (st_lookup(malloc_info_file_table, key, &d)) {
/* hit */
+ data = (size_t *)d;
}
else {
data = malloc(xmalloc2_size(2, sizeof(size_t)));
@@ -10034,25 +12551,26 @@ objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t old_size)
data[0] ++;
data[1] += info->size;
};
-#if 0 /* verbose output */
- if (gen >= 2) {
+ if (0 && gen >= 2) { /* verbose output */
if (info->file) {
- fprintf(stderr, "free - size:%d, gen:%d, pos: %s:%d\n", (int)info->size, gen, info->file, (int)info->line);
+ fprintf(stderr, "free - size:%"PRIdSIZE", gen:%d, pos: %s:%"PRIdSIZE"\n",
+ info->size, gen, info->file, info->line);
}
else {
- fprintf(stderr, "free - size:%d, gen:%d\n", (int)info->size, gen);
+ fprintf(stderr, "free - size:%"PRIdSIZE", gen:%d\n",
+ info->size, gen);
}
}
-#endif
}
#endif
#endif
old_size = objspace_malloc_size(objspace, ptr, old_size);
- free(ptr);
- RB_DEBUG_COUNTER_INC(heap_xfree);
-
- objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE);
+ objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE) {
+ free(ptr);
+ ptr = NULL;
+ RB_DEBUG_COUNTER_INC(heap_xfree);
+ }
}
static void *
@@ -10065,7 +12583,7 @@ void *
ruby_xmalloc_body(size_t size)
{
if ((ssize_t)size < 0) {
- negative_size_allocation_error("too large allocation size");
+ negative_size_allocation_error("too large allocation size");
}
return ruby_xmalloc0(size);
}
@@ -10074,8 +12592,8 @@ void
ruby_malloc_size_overflow(size_t count, size_t elsize)
{
rb_raise(rb_eArgError,
- "malloc: possible integer overflow (%"PRIuSIZE"*%"PRIuSIZE")",
- count, elsize);
+ "malloc: possible integer overflow (%"PRIuSIZE"*%"PRIuSIZE")",
+ count, elsize);
}
void *
@@ -10087,10 +12605,17 @@ ruby_xmalloc2_body(size_t n, size_t size)
static void *
objspace_xcalloc(rb_objspace_t *objspace, size_t size)
{
+ if (UNLIKELY(malloc_during_gc_p(objspace))) {
+ rb_warn("calloc during GC detected, this could cause crashes if it triggers another GC");
+#if RGENGC_CHECK_MODE || RUBY_DEBUG
+ rb_bug("Cannot calloc during GC");
+#endif
+ }
+
void *mem;
size = objspace_malloc_prepare(objspace, size);
- TRY_WITH_GC(mem = calloc1(size));
+ TRY_WITH_GC(size, mem = calloc1(size));
return objspace_malloc_fixup(objspace, mem, size);
}
@@ -10107,7 +12632,7 @@ void *
ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size)
{
if ((ssize_t)new_size < 0) {
- negative_size_allocation_error("too large allocation size");
+ negative_size_allocation_error("too large allocation size");
}
return objspace_xrealloc(&rb_objspace, ptr, new_size, old_size);
@@ -10141,8 +12666,16 @@ ruby_xrealloc2_body(void *ptr, size_t n, size_t size)
void
ruby_sized_xfree(void *x, size_t size)
{
- if (x) {
- objspace_xfree(&rb_objspace, x, size);
+ if (LIKELY(x)) {
+ /* It's possible for a C extension's pthread destructor function set by pthread_key_create
+ * to be called after ruby_vm_destruct and attempt to free memory. Fall back to mimfree in
+ * that case. */
+ if (LIKELY(GET_VM())) {
+ objspace_xfree(&rb_objspace, x, size);
+ }
+ else {
+ ruby_mimfree(x);
+ }
}
}
@@ -10160,6 +12693,13 @@ rb_xmalloc_mul_add(size_t x, size_t y, size_t z) /* x * y + z */
}
void *
+rb_xcalloc_mul_add(size_t x, size_t y, size_t z) /* x * y + z */
+{
+ size_t w = size_mul_add_or_raise(x, y, z, rb_eArgError);
+ return ruby_xcalloc(w, 1);
+}
+
+void *
rb_xrealloc_mul_add(const void *p, size_t x, size_t y, size_t z) /* x * y + z */
{
size_t w = size_mul_add_or_raise(x, y, z, rb_eArgError);
@@ -10204,8 +12744,6 @@ ruby_mimmalloc(size_t size)
info->gen = 0;
info->file = NULL;
info->line = 0;
-#else
- info->file = NULL;
#endif
mem = info + 1;
}
@@ -10247,7 +12785,7 @@ rb_alloc_tmp_buffer(volatile VALUE *store, long len)
long cnt;
if (len < 0 || (cnt = (long)roomof(len, sizeof(VALUE))) < 0) {
- rb_raise(rb_eArgError, "negative buffer size (or size too big)");
+ rb_raise(rb_eArgError, "negative buffer size (or size too big)");
}
return rb_alloc_tmp_buffer_with_count(store, len, cnt);
@@ -10258,9 +12796,9 @@ rb_free_tmp_buffer(volatile VALUE *store)
{
rb_imemo_tmpbuf_t *s = (rb_imemo_tmpbuf_t*)ATOMIC_VALUE_EXCHANGE(*store, 0);
if (s) {
- void *ptr = ATOMIC_PTR_EXCHANGE(s->ptr, 0);
- s->cnt = 0;
- ruby_xfree(ptr);
+ void *ptr = ATOMIC_PTR_EXCHANGE(s->ptr, 0);
+ s->cnt = 0;
+ ruby_xfree(ptr);
}
}
@@ -10301,10 +12839,10 @@ rb_gc_adjust_memory_usage(ssize_t diff)
{
rb_objspace_t *objspace = &rb_objspace;
if (diff > 0) {
- objspace_malloc_increase(objspace, 0, diff, 0, MEMOP_TYPE_REALLOC);
+ objspace_malloc_increase(objspace, 0, diff, 0, MEMOP_TYPE_REALLOC);
}
else if (diff < 0) {
- objspace_malloc_increase(objspace, 0, 0, -diff, MEMOP_TYPE_REALLOC);
+ objspace_malloc_increase(objspace, 0, 0, -diff, MEMOP_TYPE_REALLOC);
}
}
@@ -10331,12 +12869,47 @@ wmap_mark_map(st_data_t key, st_data_t val, st_data_t arg)
}
#endif
+static int
+wmap_replace_ref(st_data_t *key, st_data_t *value, st_data_t _argp, int existing)
+{
+ *key = rb_gc_location((VALUE)*key);
+
+ VALUE *values = (VALUE *)*value;
+ VALUE size = values[0];
+
+ for (VALUE index = 1; index <= size; index++) {
+ values[index] = rb_gc_location(values[index]);
+ }
+
+ return ST_CONTINUE;
+}
+
+static int
+wmap_foreach_replace(st_data_t key, st_data_t value, st_data_t _argp, int error)
+{
+ if (rb_gc_location((VALUE)key) != (VALUE)key) {
+ return ST_REPLACE;
+ }
+
+ VALUE *values = (VALUE *)value;
+ VALUE size = values[0];
+
+ for (VALUE index = 1; index <= size; index++) {
+ VALUE val = values[index];
+ if (rb_gc_location(val) != val) {
+ return ST_REPLACE;
+ }
+ }
+
+ return ST_CONTINUE;
+}
+
static void
wmap_compact(void *ptr)
{
struct weakmap *w = ptr;
if (w->wmap2obj) rb_gc_update_tbl_refs(w->wmap2obj);
- if (w->obj2wmap) rb_gc_update_tbl_refs(w->obj2wmap);
+ if (w->obj2wmap) st_foreach_with_replace(w->obj2wmap, wmap_foreach_replace, wmap_replace_ref, (st_data_t)NULL);
w->final = rb_gc_location(w->final);
}
@@ -10365,6 +12938,7 @@ wmap_free(void *ptr)
st_foreach(w->obj2wmap, wmap_free_map, 0);
st_free_table(w->obj2wmap);
st_free_table(w->wmap2obj);
+ xfree(w);
}
static int
@@ -10390,15 +12964,14 @@ wmap_memsize(const void *ptr)
static const rb_data_type_t weakmap_type = {
"weakmap",
{
- wmap_mark,
- wmap_free,
- wmap_memsize,
+ wmap_mark,
+ wmap_free,
+ wmap_memsize,
wmap_compact,
},
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
-extern const struct st_hash_type rb_hashtype_ident;
static VALUE wmap_finalize(RB_BLOCK_CALL_FUNC_ARGLIST(objid, self));
static VALUE
@@ -10406,8 +12979,8 @@ wmap_allocate(VALUE klass)
{
struct weakmap *w;
VALUE obj = TypedData_Make_Struct(klass, struct weakmap, &weakmap_type, w);
- w->obj2wmap = st_init_table(&rb_hashtype_ident);
- w->wmap2obj = st_init_table(&rb_hashtype_ident);
+ w->obj2wmap = rb_init_identtable();
+ w->wmap2obj = rb_init_identtable();
w->final = rb_func_lambda_new(wmap_finalize, obj, 1, 1);
return obj;
}
@@ -10415,32 +12988,59 @@ wmap_allocate(VALUE klass)
static int
wmap_live_p(rb_objspace_t *objspace, VALUE obj)
{
- if (!FL_ABLE(obj)) return TRUE;
- if (!is_id_value(objspace, obj)) return FALSE;
- if (!is_live_object(objspace, obj)) return FALSE;
- return TRUE;
+ if (SPECIAL_CONST_P(obj)) return TRUE;
+ /* If is_pointer_to_heap returns false, the page could be in the tomb heap
+ * or have already been freed. */
+ if (!is_pointer_to_heap(objspace, (void *)obj)) return FALSE;
+
+ void *poisoned = asan_unpoison_object_temporary(obj);
+
+ enum ruby_value_type t = BUILTIN_TYPE(obj);
+ int ret = (!(t == T_NONE || t >= T_FIXNUM || t == T_ICLASS) &&
+ is_live_object(objspace, obj));
+
+ if (poisoned) {
+ asan_poison_object(obj);
+ }
+
+ return ret;
}
static int
-wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
+wmap_remove_inverse_ref(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
{
- VALUE wmap, *ptr, size, i, j;
if (!existing) return ST_STOP;
- wmap = (VALUE)arg, ptr = (VALUE *)*value;
- for (i = j = 1, size = ptr[0]; i <= size; ++i) {
- if (ptr[i] != wmap) {
- ptr[j++] = ptr[i];
- }
+
+ VALUE old_ref = (VALUE)arg;
+
+ VALUE *values = (VALUE *)*val;
+ VALUE size = values[0];
+
+ if (size == 1) {
+ // fast path, we only had one backref
+ RUBY_ASSERT(values[1] == old_ref);
+ ruby_sized_xfree(values, 2 * sizeof(VALUE));
+ return ST_DELETE;
}
- if (j == 1) {
- ruby_sized_xfree(ptr, i * sizeof(VALUE));
- return ST_DELETE;
+
+ bool found = false;
+ VALUE index = 1;
+ for (; index <= size; index++) {
+ if (values[index] == old_ref) {
+ found = true;
+ break;
+ }
}
- if (j < i) {
- SIZED_REALLOC_N(ptr, VALUE, j + 1, i);
- ptr[0] = j;
- *value = (st_data_t)ptr;
+ if (!found) return ST_STOP;
+
+ if (size > index) {
+ MEMMOVE(&values[index], &values[index + 1], VALUE, size - index);
}
+
+ size -= 1;
+ values[0] = size;
+ SIZED_REALLOC_N(values, VALUE, size + 1, size + 2);
+ *val = (st_data_t)values;
return ST_CONTINUE;
}
@@ -10454,26 +13054,26 @@ wmap_finalize(RB_BLOCK_CALL_FUNC_ARGLIST(objid, self))
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
/* Get reference from object id. */
- if ((obj = id2ref_obj_tbl(&rb_objspace, objid)) == Qundef) {
+ if (UNDEF_P(obj = id2ref_obj_tbl(&rb_objspace, objid))) {
rb_bug("wmap_finalize: objid is not found.");
}
/* obj is original referenced object and/or weak reference. */
orig = (st_data_t)obj;
if (st_delete(w->obj2wmap, &orig, &data)) {
- rids = (VALUE *)data;
- size = *rids++;
- for (i = 0; i < size; ++i) {
- wmap = (st_data_t)rids[i];
- st_delete(w->wmap2obj, &wmap, NULL);
- }
- ruby_sized_xfree((VALUE *)data, (size + 1) * sizeof(VALUE));
+ rids = (VALUE *)data;
+ size = *rids++;
+ for (i = 0; i < size; ++i) {
+ wmap = (st_data_t)rids[i];
+ st_delete(w->wmap2obj, &wmap, NULL);
+ }
+ ruby_sized_xfree((VALUE *)data, (size + 1) * sizeof(VALUE));
}
wmap = (st_data_t)obj;
if (st_delete(w->wmap2obj, &wmap, &orig)) {
- wmap = (st_data_t)obj;
- st_update(w->obj2wmap, orig, wmap_final_func, wmap);
+ wmap = (st_data_t)obj;
+ st_update(w->obj2wmap, orig, wmap_remove_inverse_ref, wmap);
}
return self;
}
@@ -10483,24 +13083,38 @@ struct wmap_iter_arg {
VALUE value;
};
+static VALUE
+wmap_inspect_append(rb_objspace_t *objspace, VALUE str, VALUE obj)
+{
+ if (SPECIAL_CONST_P(obj)) {
+ return rb_str_append(str, rb_inspect(obj));
+ }
+ else if (wmap_live_p(objspace, obj)) {
+ return rb_str_append(str, rb_any_to_s(obj));
+ }
+ else {
+ return rb_str_catf(str, "#<collected:%p>", (void*)obj);
+ }
+}
+
static int
wmap_inspect_i(st_data_t key, st_data_t val, st_data_t arg)
{
- VALUE str = (VALUE)arg;
+ struct wmap_iter_arg *argp = (struct wmap_iter_arg *)arg;
+ rb_objspace_t *objspace = argp->objspace;
+ VALUE str = argp->value;
VALUE k = (VALUE)key, v = (VALUE)val;
if (RSTRING_PTR(str)[0] == '#') {
- rb_str_cat2(str, ", ");
+ rb_str_cat2(str, ", ");
}
else {
- rb_str_cat2(str, ": ");
- RSTRING_PTR(str)[0] = '#';
+ rb_str_cat2(str, ": ");
+ RSTRING_PTR(str)[0] = '#';
}
- k = SPECIAL_CONST_P(k) ? rb_inspect(k) : rb_any_to_s(k);
- rb_str_append(str, k);
+ wmap_inspect_append(objspace, str, k);
rb_str_cat2(str, " => ");
- v = SPECIAL_CONST_P(v) ? rb_inspect(v) : rb_any_to_s(v);
- rb_str_append(str, v);
+ wmap_inspect_append(objspace, str, v);
return ST_CONTINUE;
}
@@ -10511,26 +13125,38 @@ wmap_inspect(VALUE self)
VALUE str;
VALUE c = rb_class_name(CLASS_OF(self));
struct weakmap *w;
+ struct wmap_iter_arg args;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
str = rb_sprintf("-<%"PRIsVALUE":%p", c, (void *)self);
if (w->wmap2obj) {
- st_foreach(w->wmap2obj, wmap_inspect_i, str);
+ args.objspace = &rb_objspace;
+ args.value = str;
+ st_foreach(w->wmap2obj, wmap_inspect_i, (st_data_t)&args);
}
RSTRING_PTR(str)[0] = '#';
rb_str_cat2(str, ">");
return str;
}
+static inline bool
+wmap_live_entry_p(rb_objspace_t *objspace, st_data_t key, st_data_t val)
+{
+ return wmap_live_p(objspace, (VALUE)key) && wmap_live_p(objspace, (VALUE)val);
+}
+
static int
wmap_each_i(st_data_t key, st_data_t val, st_data_t arg)
{
rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (wmap_live_p(objspace, obj)) {
- rb_yield_values(2, (VALUE)key, obj);
+
+ if (wmap_live_entry_p(objspace, key, val)) {
+ rb_yield_values(2, (VALUE)key, (VALUE)val);
+ return ST_CONTINUE;
+ }
+ else {
+ return ST_DELETE;
}
- return ST_CONTINUE;
}
/* Iterates over keys and objects in a weakly referenced object */
@@ -10549,11 +13175,14 @@ static int
wmap_each_key_i(st_data_t key, st_data_t val, st_data_t arg)
{
rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (wmap_live_p(objspace, obj)) {
- rb_yield((VALUE)key);
+
+ if (wmap_live_entry_p(objspace, key, val)) {
+ rb_yield((VALUE)key);
+ return ST_CONTINUE;
+ }
+ else {
+ return ST_DELETE;
}
- return ST_CONTINUE;
}
/* Iterates over keys and objects in a weakly referenced object */
@@ -10572,11 +13201,14 @@ static int
wmap_each_value_i(st_data_t key, st_data_t val, st_data_t arg)
{
rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (wmap_live_p(objspace, obj)) {
- rb_yield(obj);
+
+ if (wmap_live_entry_p(objspace, key, val)) {
+ rb_yield((VALUE)val);
+ return ST_CONTINUE;
+ }
+ else {
+ return ST_DELETE;
}
- return ST_CONTINUE;
}
/* Iterates over keys and objects in a weakly referenced object */
@@ -10597,11 +13229,14 @@ wmap_keys_i(st_data_t key, st_data_t val, st_data_t arg)
struct wmap_iter_arg *argp = (struct wmap_iter_arg *)arg;
rb_objspace_t *objspace = argp->objspace;
VALUE ary = argp->value;
- VALUE obj = (VALUE)val;
- if (wmap_live_p(objspace, obj)) {
- rb_ary_push(ary, (VALUE)key);
+
+ if (wmap_live_entry_p(objspace, key, val)) {
+ rb_ary_push(ary, (VALUE)key);
+ return ST_CONTINUE;
+ }
+ else {
+ return ST_DELETE;
}
- return ST_CONTINUE;
}
/* Iterates over keys and objects in a weakly referenced object */
@@ -10624,11 +13259,14 @@ wmap_values_i(st_data_t key, st_data_t val, st_data_t arg)
struct wmap_iter_arg *argp = (struct wmap_iter_arg *)arg;
rb_objspace_t *objspace = argp->objspace;
VALUE ary = argp->value;
- VALUE obj = (VALUE)val;
- if (wmap_live_p(objspace, obj)) {
- rb_ary_push(ary, obj);
+
+ if (wmap_live_entry_p(objspace, key, val)) {
+ rb_ary_push(ary, (VALUE)val);
+ return ST_CONTINUE;
+ }
+ else {
+ return ST_DELETE;
}
- return ST_CONTINUE;
}
/* Iterates over values and objects in a weakly referenced object */
@@ -10650,14 +13288,22 @@ wmap_aset_update(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
{
VALUE size, *ptr, *optr;
if (existing) {
- size = (ptr = optr = (VALUE *)*val)[0];
- ++size;
+ size = (ptr = optr = (VALUE *)*val)[0];
+
+ for (VALUE index = 1; index <= size; index++) {
+ if (ptr[index] == (VALUE)arg) {
+ // The reference was already registered.
+ return ST_STOP;
+ }
+ }
+
+ ++size;
SIZED_REALLOC_N(ptr, VALUE, size + 1, size);
}
else {
- optr = 0;
- size = 1;
- ptr = ruby_xmalloc0(2 * sizeof(VALUE));
+ optr = 0;
+ size = 1;
+ ptr = ruby_xmalloc0(2 * sizeof(VALUE));
}
ptr[0] = size;
ptr[size] = (VALUE)arg;
@@ -10666,46 +13312,89 @@ wmap_aset_update(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
return ST_CONTINUE;
}
+struct wmap_aset_replace_args {
+ VALUE new_value;
+ VALUE old_value;
+};
+
+static int
+wmap_aset_replace_value(st_data_t *key, st_data_t *val, st_data_t _args, int existing)
+{
+ struct wmap_aset_replace_args *args = (struct wmap_aset_replace_args *)_args;
+
+ if (existing) {
+ args->old_value = *val;
+ }
+ *val = (st_data_t)args->new_value;
+ return ST_CONTINUE;
+}
+
/* Creates a weak reference from the given key to the given value */
static VALUE
-wmap_aset(VALUE self, VALUE wmap, VALUE orig)
+wmap_aset(VALUE self, VALUE key, VALUE value)
{
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- if (FL_ABLE(orig)) {
- define_final0(orig, w->final);
+ if (FL_ABLE(value)) {
+ define_final0(value, w->final);
}
- if (FL_ABLE(wmap)) {
- define_final0(wmap, w->final);
+ if (FL_ABLE(key)) {
+ define_final0(key, w->final);
}
- st_update(w->obj2wmap, (st_data_t)orig, wmap_aset_update, wmap);
- st_insert(w->wmap2obj, (st_data_t)wmap, (st_data_t)orig);
- return nonspecial_obj_id(orig);
+ struct wmap_aset_replace_args aset_args = {
+ .new_value = value,
+ .old_value = Qundef,
+ };
+ st_update(w->wmap2obj, (st_data_t)key, wmap_aset_replace_value, (st_data_t)&aset_args);
+
+ // If the value is unchanged, we have nothing to do.
+ if (value != aset_args.old_value) {
+ if (!UNDEF_P(aset_args.old_value) && FL_ABLE(aset_args.old_value)) {
+ // That key existed and had an inverse reference, we need to clear the outdated inverse reference.
+ st_update(w->obj2wmap, (st_data_t)aset_args.old_value, wmap_remove_inverse_ref, key);
+ }
+
+ if (FL_ABLE(value)) {
+ // If the value has no finalizer, we don't need to keep the inverse reference
+ st_update(w->obj2wmap, (st_data_t)value, wmap_aset_update, key);
+ }
+ }
+
+ return nonspecial_obj_id(value);
}
/* Retrieves a weakly referenced object with the given key */
static VALUE
-wmap_aref(VALUE self, VALUE wmap)
+wmap_lookup(VALUE self, VALUE key)
{
st_data_t data;
VALUE obj;
struct weakmap *w;
rb_objspace_t *objspace = &rb_objspace;
+ GC_ASSERT(wmap_live_p(objspace, key));
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- if (!st_lookup(w->wmap2obj, (st_data_t)wmap, &data)) return Qnil;
+ if (!st_lookup(w->wmap2obj, (st_data_t)key, &data)) return Qundef;
obj = (VALUE)data;
- if (!wmap_live_p(objspace, obj)) return Qnil;
+ if (!wmap_live_p(objspace, obj)) return Qundef;
return obj;
}
+/* Retrieves a weakly referenced object with the given key */
+static VALUE
+wmap_aref(VALUE self, VALUE key)
+{
+ VALUE obj = wmap_lookup(self, key);
+ return !UNDEF_P(obj) ? obj : Qnil;
+}
+
/* Returns +true+ if +key+ is registered */
static VALUE
wmap_has_key(VALUE self, VALUE key)
{
- return NIL_P(wmap_aref(self, key)) ? Qfalse : Qtrue;
+ return RBOOL(!UNDEF_P(wmap_lookup(self, key)));
}
/* Returns the number of referenced objects */
@@ -10730,16 +13419,14 @@ wmap_size(VALUE self)
#define GC_PROFILE_RECORD_DEFAULT_SIZE 100
-/* return sec in user time */
-static double
-getrusage_time(void)
+static bool
+current_process_time(struct timespec *ts)
{
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
{
static int try_clock_gettime = 1;
- struct timespec ts;
- if (try_clock_gettime && clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) {
- return ts.tv_sec + ts.tv_nsec * 1e-9;
+ if (try_clock_gettime && clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ts) == 0) {
+ return true;
}
else {
try_clock_gettime = 0;
@@ -10753,80 +13440,87 @@ getrusage_time(void)
struct timeval time;
if (getrusage(RUSAGE_SELF, &usage) == 0) {
time = usage.ru_utime;
- return time.tv_sec + time.tv_usec * 1e-6;
+ ts->tv_sec = time.tv_sec;
+ ts->tv_nsec = (int32_t)time.tv_usec * 1000;
+ return true;
}
}
#endif
#ifdef _WIN32
{
- FILETIME creation_time, exit_time, kernel_time, user_time;
- ULARGE_INTEGER ui;
- LONG_LONG q;
- double t;
-
- if (GetProcessTimes(GetCurrentProcess(),
- &creation_time, &exit_time, &kernel_time, &user_time) != 0) {
- memcpy(&ui, &user_time, sizeof(FILETIME));
- q = ui.QuadPart / 10L;
- t = (DWORD)(q % 1000000L) * 1e-6;
- q /= 1000000L;
-#ifdef __GNUC__
- t += q;
-#else
- t += (double)(DWORD)(q >> 16) * (1 << 16);
- t += (DWORD)q & ~(~0 << 16);
-#endif
- return t;
- }
+ FILETIME creation_time, exit_time, kernel_time, user_time;
+ ULARGE_INTEGER ui;
+
+ if (GetProcessTimes(GetCurrentProcess(),
+ &creation_time, &exit_time, &kernel_time, &user_time) != 0) {
+ memcpy(&ui, &user_time, sizeof(FILETIME));
+#define PER100NSEC (uint64_t)(1000 * 1000 * 10)
+ ts->tv_nsec = (long)(ui.QuadPart % PER100NSEC);
+ ts->tv_sec = (time_t)(ui.QuadPart / PER100NSEC);
+ return true;
+ }
}
#endif
- return 0.0;
+ return false;
}
+static double
+getrusage_time(void)
+{
+ struct timespec ts;
+ if (current_process_time(&ts)) {
+ return ts.tv_sec + ts.tv_nsec * 1e-9;
+ }
+ else {
+ return 0.0;
+ }
+}
+
+
static inline void
-gc_prof_setup_new_record(rb_objspace_t *objspace, int reason)
+gc_prof_setup_new_record(rb_objspace_t *objspace, unsigned int reason)
{
if (objspace->profile.run) {
- size_t index = objspace->profile.next_index;
- gc_profile_record *record;
-
- /* create new record */
- objspace->profile.next_index++;
-
- if (!objspace->profile.records) {
- objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE;
- objspace->profile.records = malloc(xmalloc2_size(sizeof(gc_profile_record), objspace->profile.size));
- }
- if (index >= objspace->profile.size) {
- void *ptr;
- objspace->profile.size += 1000;
- ptr = realloc(objspace->profile.records, xmalloc2_size(sizeof(gc_profile_record), objspace->profile.size));
- if (!ptr) rb_memerror();
- objspace->profile.records = ptr;
- }
- if (!objspace->profile.records) {
- rb_bug("gc_profile malloc or realloc miss");
- }
- record = objspace->profile.current_record = &objspace->profile.records[objspace->profile.next_index - 1];
- MEMZERO(record, gc_profile_record, 1);
-
- /* setup before-GC parameter */
- record->flags = reason | (ruby_gc_stressful ? GPR_FLAG_STRESS : 0);
+ size_t index = objspace->profile.next_index;
+ gc_profile_record *record;
+
+ /* create new record */
+ objspace->profile.next_index++;
+
+ if (!objspace->profile.records) {
+ objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE;
+ objspace->profile.records = malloc(xmalloc2_size(sizeof(gc_profile_record), objspace->profile.size));
+ }
+ if (index >= objspace->profile.size) {
+ void *ptr;
+ objspace->profile.size += 1000;
+ ptr = realloc(objspace->profile.records, xmalloc2_size(sizeof(gc_profile_record), objspace->profile.size));
+ if (!ptr) rb_memerror();
+ objspace->profile.records = ptr;
+ }
+ if (!objspace->profile.records) {
+ rb_bug("gc_profile malloc or realloc miss");
+ }
+ record = objspace->profile.current_record = &objspace->profile.records[objspace->profile.next_index - 1];
+ MEMZERO(record, gc_profile_record, 1);
+
+ /* setup before-GC parameter */
+ record->flags = reason | (ruby_gc_stressful ? GPR_FLAG_STRESS : 0);
#if MALLOC_ALLOCATED_SIZE
- record->allocated_size = malloc_allocated_size;
+ record->allocated_size = malloc_allocated_size;
#endif
#if GC_PROFILE_MORE_DETAIL && GC_PROFILE_DETAIL_MEMORY
#ifdef RUSAGE_SELF
- {
- struct rusage usage;
- if (getrusage(RUSAGE_SELF, &usage) == 0) {
- record->maxrss = usage.ru_maxrss;
- record->minflt = usage.ru_minflt;
- record->majflt = usage.ru_majflt;
- }
- }
+ {
+ struct rusage usage;
+ if (getrusage(RUSAGE_SELF, &usage) == 0) {
+ record->maxrss = usage.ru_maxrss;
+ record->minflt = usage.ru_minflt;
+ record->majflt = usage.ru_majflt;
+ }
+ }
#endif
#endif
}
@@ -10836,12 +13530,12 @@ static inline void
gc_prof_timer_start(rb_objspace_t *objspace)
{
if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
+ gc_profile_record *record = gc_prof_record(objspace);
#if GC_PROFILE_MORE_DETAIL
- record->prepare_time = objspace->profile.prepare_time;
+ record->prepare_time = objspace->profile.prepare_time;
#endif
- record->gc_time = 0;
- record->gc_invoke_time = getrusage_time();
+ record->gc_time = 0;
+ record->gc_invoke_time = getrusage_time();
}
}
@@ -10850,10 +13544,10 @@ elapsed_time_from(double time)
{
double now = getrusage_time();
if (now > time) {
- return now - time;
+ return now - time;
}
else {
- return 0;
+ return 0;
}
}
@@ -10861,9 +13555,9 @@ static inline void
gc_prof_timer_stop(rb_objspace_t *objspace)
{
if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->gc_time = elapsed_time_from(record->gc_invoke_time);
- record->gc_invoke_time -= objspace->profile.invoke_time;
+ gc_profile_record *record = gc_prof_record(objspace);
+ record->gc_time = elapsed_time_from(record->gc_invoke_time);
+ record->gc_invoke_time -= objspace->profile.invoke_time;
}
}
@@ -10875,7 +13569,7 @@ gc_prof_mark_timer_start(rb_objspace_t *objspace)
RUBY_DTRACE_GC_HOOK(MARK_BEGIN);
#if GC_PROFILE_MORE_DETAIL
if (gc_prof_enabled(objspace)) {
- gc_prof_record(objspace)->gc_mark_time = getrusage_time();
+ gc_prof_record(objspace)->gc_mark_time = getrusage_time();
}
#endif
}
@@ -10887,7 +13581,7 @@ gc_prof_mark_timer_stop(rb_objspace_t *objspace)
#if GC_PROFILE_MORE_DETAIL
if (gc_prof_enabled(objspace)) {
gc_profile_record *record = gc_prof_record(objspace);
- record->gc_mark_time = elapsed_time_from(record->gc_mark_time);
+ record->gc_mark_time = elapsed_time_from(record->gc_mark_time);
}
#endif
}
@@ -10897,11 +13591,11 @@ gc_prof_sweep_timer_start(rb_objspace_t *objspace)
{
RUBY_DTRACE_GC_HOOK(SWEEP_BEGIN);
if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
+ gc_profile_record *record = gc_prof_record(objspace);
- if (record->gc_time > 0 || GC_PROFILE_MORE_DETAIL) {
- objspace->profile.gc_sweep_start_time = getrusage_time();
- }
+ if (record->gc_time > 0 || GC_PROFILE_MORE_DETAIL) {
+ objspace->profile.gc_sweep_start_time = getrusage_time();
+ }
}
}
@@ -10911,23 +13605,23 @@ gc_prof_sweep_timer_stop(rb_objspace_t *objspace)
RUBY_DTRACE_GC_HOOK(SWEEP_END);
if (gc_prof_enabled(objspace)) {
- double sweep_time;
- gc_profile_record *record = gc_prof_record(objspace);
-
- if (record->gc_time > 0) {
- sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
- /* need to accumulate GC time for lazy sweep after gc() */
- record->gc_time += sweep_time;
- }
- else if (GC_PROFILE_MORE_DETAIL) {
- sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
- }
+ double sweep_time;
+ gc_profile_record *record = gc_prof_record(objspace);
+
+ if (record->gc_time > 0) {
+ sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
+ /* need to accumulate GC time for lazy sweep after gc() */
+ record->gc_time += sweep_time;
+ }
+ else if (GC_PROFILE_MORE_DETAIL) {
+ sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
+ }
#if GC_PROFILE_MORE_DETAIL
- record->gc_sweep_time += sweep_time;
- if (heap_pages_deferred_final) record->flags |= GPR_FLAG_HAVE_FINALIZE;
+ record->gc_sweep_time += sweep_time;
+ if (heap_pages_deferred_final) record->flags |= GPR_FLAG_HAVE_FINALIZE;
#endif
- if (heap_pages_deferred_final) objspace->profile.latest_gc_info |= GPR_FLAG_HAVE_FINALIZE;
+ if (heap_pages_deferred_final) objspace->profile.latest_gc_info |= GPR_FLAG_HAVE_FINALIZE;
}
}
@@ -10937,8 +13631,8 @@ gc_prof_set_malloc_info(rb_objspace_t *objspace)
#if GC_PROFILE_MORE_DETAIL
if (gc_prof_enabled(objspace)) {
gc_profile_record *record = gc_prof_record(objspace);
- record->allocate_increase = malloc_increase;
- record->allocate_limit = malloc_limit;
+ record->allocate_increase = malloc_increase;
+ record->allocate_limit = malloc_limit;
}
#endif
}
@@ -10947,19 +13641,19 @@ static inline void
gc_prof_set_heap_info(rb_objspace_t *objspace)
{
if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- size_t live = objspace->profile.total_allocated_objects_at_gc_start - objspace->profile.total_freed_objects;
- size_t total = objspace->profile.heap_used_at_gc_start * HEAP_PAGE_OBJ_LIMIT;
+ gc_profile_record *record = gc_prof_record(objspace);
+ size_t live = objspace->profile.total_allocated_objects_at_gc_start - objspace->profile.total_freed_objects;
+ size_t total = objspace->profile.heap_used_at_gc_start * HEAP_PAGE_OBJ_LIMIT;
#if GC_PROFILE_MORE_DETAIL
- record->heap_use_pages = objspace->profile.heap_used_at_gc_start;
- record->heap_live_objects = live;
- record->heap_free_objects = total - live;
+ record->heap_use_pages = objspace->profile.heap_used_at_gc_start;
+ record->heap_live_objects = live;
+ record->heap_free_objects = total - live;
#endif
- record->heap_total_objects = total;
- record->heap_use_size = live * sizeof(RVALUE);
- record->heap_total_size = total * sizeof(RVALUE);
+ record->heap_total_objects = total;
+ record->heap_use_size = live * sizeof(RVALUE);
+ record->heap_total_size = total * sizeof(RVALUE);
}
}
@@ -10967,7 +13661,7 @@ gc_prof_set_heap_info(rb_objspace_t *objspace)
* call-seq:
* GC::Profiler.clear -> nil
*
- * Clears the GC profiler data.
+ * Clears the \GC profiler data.
*
*/
@@ -11045,19 +13739,20 @@ gc_profile_record_get(VALUE _)
rb_objspace_t *objspace = (&rb_objspace);
if (!objspace->profile.run) {
- return Qnil;
+ return Qnil;
}
for (i =0; i < objspace->profile.next_index; i++) {
- gc_profile_record *record = &objspace->profile.records[i];
+ gc_profile_record *record = &objspace->profile.records[i];
- prof = rb_hash_new();
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_FLAGS")), gc_info_decode(0, rb_hash_new(), record->flags));
+ prof = rb_hash_new();
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_FLAGS")), gc_info_decode(0, rb_hash_new(), record->flags));
rb_hash_aset(prof, ID2SYM(rb_intern("GC_TIME")), DBL2NUM(record->gc_time));
rb_hash_aset(prof, ID2SYM(rb_intern("GC_INVOKE_TIME")), DBL2NUM(record->gc_invoke_time));
rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_SIZE")), SIZET2NUM(record->heap_use_size));
rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_SIZE")), SIZET2NUM(record->heap_total_size));
rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_OBJECTS")), SIZET2NUM(record->heap_total_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("MOVED_OBJECTS")), SIZET2NUM(record->moved_objects));
rb_hash_aset(prof, ID2SYM(rb_intern("GC_IS_MARKED")), Qtrue);
#if GC_PROFILE_MORE_DETAIL
rb_hash_aset(prof, ID2SYM(rb_intern("GC_MARK_TIME")), DBL2NUM(record->gc_mark_time));
@@ -11068,18 +13763,18 @@ gc_profile_record_get(VALUE _)
rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_LIVE_OBJECTS")), SIZET2NUM(record->heap_live_objects));
rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_FREE_OBJECTS")), SIZET2NUM(record->heap_free_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("REMOVING_OBJECTS")), SIZET2NUM(record->removing_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("EMPTY_OBJECTS")), SIZET2NUM(record->empty_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("REMOVING_OBJECTS")), SIZET2NUM(record->removing_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("EMPTY_OBJECTS")), SIZET2NUM(record->empty_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), (record->flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse);
+ rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), RBOOL(record->flags & GPR_FLAG_HAVE_FINALIZE));
#endif
#if RGENGC_PROFILE > 0
- rb_hash_aset(prof, ID2SYM(rb_intern("OLD_OBJECTS")), SIZET2NUM(record->old_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBERED_NORMAL_OBJECTS")), SIZET2NUM(record->remembered_normal_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBERED_SHADY_OBJECTS")), SIZET2NUM(record->remembered_shady_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("OLD_OBJECTS")), SIZET2NUM(record->old_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBERED_NORMAL_OBJECTS")), SIZET2NUM(record->remembered_normal_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBERED_SHADY_OBJECTS")), SIZET2NUM(record->remembered_shady_objects));
#endif
- rb_ary_push(gc_profile, prof);
+ rb_ary_push(gc_profile, prof);
}
return gc_profile;
@@ -11089,14 +13784,14 @@ gc_profile_record_get(VALUE _)
#define MAJOR_REASON_MAX 0x10
static char *
-gc_profile_dump_major_reason(int flags, char *buff)
+gc_profile_dump_major_reason(unsigned int flags, char *buff)
{
- int reason = flags & GPR_FLAG_MAJOR_MASK;
+ unsigned int reason = flags & GPR_FLAG_MAJOR_MASK;
int i = 0;
if (reason == GPR_FLAG_NONE) {
- buff[0] = '-';
- buff[1] = 0;
+ buff[0] = '-';
+ buff[1] = 0;
}
else {
#define C(x, s) \
@@ -11105,11 +13800,11 @@ gc_profile_dump_major_reason(int flags, char *buff)
if (i >= MAJOR_REASON_MAX) rb_bug("gc_profile_dump_major_reason: overflow"); \
buff[i] = 0; \
}
- C(NOFREE, N);
- C(OLDGEN, O);
- C(SHADY, S);
+ C(NOFREE, N);
+ C(OLDGEN, O);
+ C(SHADY, S);
#if RGENGC_ESTIMATE_OLDMALLOC
- C(OLDMALLOC, M);
+ C(OLDMALLOC, M);
#endif
#undef C
}
@@ -11127,87 +13822,88 @@ gc_profile_dump_on(VALUE out, VALUE (*append)(VALUE, VALUE))
#endif
if (objspace->profile.run && count /* > 1 */) {
- size_t i;
- const gc_profile_record *record;
+ size_t i;
+ const gc_profile_record *record;
- append(out, rb_sprintf("GC %"PRIuSIZE" invokes.\n", objspace->profile.count));
- append(out, rb_str_new_cstr("Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)\n"));
+ append(out, rb_sprintf("GC %"PRIuSIZE" invokes.\n", objspace->profile.count));
+ append(out, rb_str_new_cstr("Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)\n"));
- for (i = 0; i < count; i++) {
- record = &objspace->profile.records[i];
- append(out, rb_sprintf("%5"PRIuSIZE" %19.3f %20"PRIuSIZE" %20"PRIuSIZE" %20"PRIuSIZE" %30.20f\n",
- i+1, record->gc_invoke_time, record->heap_use_size,
- record->heap_total_size, record->heap_total_objects, record->gc_time*1000));
- }
+ for (i = 0; i < count; i++) {
+ record = &objspace->profile.records[i];
+ append(out, rb_sprintf("%5"PRIuSIZE" %19.3f %20"PRIuSIZE" %20"PRIuSIZE" %20"PRIuSIZE" %30.20f\n",
+ i+1, record->gc_invoke_time, record->heap_use_size,
+ record->heap_total_size, record->heap_total_objects, record->gc_time*1000));
+ }
#if GC_PROFILE_MORE_DETAIL
- append(out, rb_str_new_cstr("\n\n" \
- "More detail.\n" \
- "Prepare Time = Previously GC's rest sweep time\n"
- "Index Flags Allocate Inc. Allocate Limit"
+ const char *str = "\n\n" \
+ "More detail.\n" \
+ "Prepare Time = Previously GC's rest sweep time\n"
+ "Index Flags Allocate Inc. Allocate Limit"
#if CALC_EXACT_MALLOC_SIZE
- " Allocated Size"
+ " Allocated Size"
#endif
- " Use Page Mark Time(ms) Sweep Time(ms) Prepare Time(ms) LivingObj FreeObj RemovedObj EmptyObj"
+ " Use Page Mark Time(ms) Sweep Time(ms) Prepare Time(ms) LivingObj FreeObj RemovedObj EmptyObj"
#if RGENGC_PROFILE
- " OldgenObj RemNormObj RemShadObj"
+ " OldgenObj RemNormObj RemShadObj"
#endif
#if GC_PROFILE_DETAIL_MEMORY
- " MaxRSS(KB) MinorFLT MajorFLT"
+ " MaxRSS(KB) MinorFLT MajorFLT"
#endif
- "\n"));
+ "\n";
+ append(out, rb_str_new_cstr(str));
- for (i = 0; i < count; i++) {
- record = &objspace->profile.records[i];
- append(out, rb_sprintf("%5"PRIuSIZE" %4s/%c/%6s%c %13"PRIuSIZE" %15"PRIuSIZE
+ for (i = 0; i < count; i++) {
+ record = &objspace->profile.records[i];
+ append(out, rb_sprintf("%5"PRIuSIZE" %4s/%c/%6s%c %13"PRIuSIZE" %15"PRIuSIZE
#if CALC_EXACT_MALLOC_SIZE
- " %15"PRIuSIZE
+ " %15"PRIuSIZE
#endif
- " %9"PRIuSIZE" %17.12f %17.12f %17.12f %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
+ " %9"PRIuSIZE" %17.12f %17.12f %17.12f %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
#if RGENGC_PROFILE
- "%10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
+ "%10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
#endif
#if GC_PROFILE_DETAIL_MEMORY
- "%11ld %8ld %8ld"
-#endif
-
- "\n",
- i+1,
- gc_profile_dump_major_reason(record->flags, reason_str),
- (record->flags & GPR_FLAG_HAVE_FINALIZE) ? 'F' : '.',
- (record->flags & GPR_FLAG_NEWOBJ) ? "NEWOBJ" :
- (record->flags & GPR_FLAG_MALLOC) ? "MALLOC" :
- (record->flags & GPR_FLAG_METHOD) ? "METHOD" :
- (record->flags & GPR_FLAG_CAPI) ? "CAPI__" : "??????",
- (record->flags & GPR_FLAG_STRESS) ? '!' : ' ',
- record->allocate_increase, record->allocate_limit,
+ "%11ld %8ld %8ld"
+#endif
+
+ "\n",
+ i+1,
+ gc_profile_dump_major_reason(record->flags, reason_str),
+ (record->flags & GPR_FLAG_HAVE_FINALIZE) ? 'F' : '.',
+ (record->flags & GPR_FLAG_NEWOBJ) ? "NEWOBJ" :
+ (record->flags & GPR_FLAG_MALLOC) ? "MALLOC" :
+ (record->flags & GPR_FLAG_METHOD) ? "METHOD" :
+ (record->flags & GPR_FLAG_CAPI) ? "CAPI__" : "??????",
+ (record->flags & GPR_FLAG_STRESS) ? '!' : ' ',
+ record->allocate_increase, record->allocate_limit,
#if CALC_EXACT_MALLOC_SIZE
- record->allocated_size,
+ record->allocated_size,
#endif
- record->heap_use_pages,
- record->gc_mark_time*1000,
- record->gc_sweep_time*1000,
- record->prepare_time*1000,
+ record->heap_use_pages,
+ record->gc_mark_time*1000,
+ record->gc_sweep_time*1000,
+ record->prepare_time*1000,
- record->heap_live_objects,
- record->heap_free_objects,
- record->removing_objects,
- record->empty_objects
+ record->heap_live_objects,
+ record->heap_free_objects,
+ record->removing_objects,
+ record->empty_objects
#if RGENGC_PROFILE
- ,
- record->old_objects,
- record->remembered_normal_objects,
- record->remembered_shady_objects
+ ,
+ record->old_objects,
+ record->remembered_normal_objects,
+ record->remembered_shady_objects
#endif
#if GC_PROFILE_DETAIL_MEMORY
- ,
- record->maxrss / 1024,
- record->minflt,
- record->majflt
+ ,
+ record->maxrss / 1024,
+ record->minflt,
+ record->majflt
#endif
- ));
- }
+ ));
+ }
#endif
}
}
@@ -11265,12 +13961,12 @@ gc_profile_total_time(VALUE self)
rb_objspace_t *objspace = &rb_objspace;
if (objspace->profile.run && objspace->profile.next_index > 0) {
- size_t i;
- size_t count = objspace->profile.next_index;
+ size_t i;
+ size_t count = objspace->profile.next_index;
- for (i = 0; i < count; i++) {
- time += objspace->profile.records[i].gc_time;
- }
+ for (i = 0; i < count; i++) {
+ time += objspace->profile.records[i].gc_time;
+ }
}
return DBL2NUM(time);
}
@@ -11279,21 +13975,21 @@ gc_profile_total_time(VALUE self)
* call-seq:
* GC::Profiler.enabled? -> true or false
*
- * The current status of GC profile mode.
+ * The current status of \GC profile mode.
*/
static VALUE
gc_profile_enable_get(VALUE self)
{
rb_objspace_t *objspace = &rb_objspace;
- return objspace->profile.run ? Qtrue : Qfalse;
+ return RBOOL(objspace->profile.run);
}
/*
* call-seq:
* GC::Profiler.enable -> nil
*
- * Starts the GC profiler.
+ * Starts the \GC profiler.
*
*/
@@ -11310,7 +14006,7 @@ gc_profile_enable(VALUE _)
* call-seq:
* GC::Profiler.disable -> nil
*
- * Stops the GC profiler.
+ * Stops the \GC profiler.
*
*/
@@ -11333,36 +14029,36 @@ type_name(int type, VALUE obj)
{
switch (type) {
#define TYPE_NAME(t) case (t): return #t;
- TYPE_NAME(T_NONE);
- TYPE_NAME(T_OBJECT);
- TYPE_NAME(T_CLASS);
- TYPE_NAME(T_MODULE);
- TYPE_NAME(T_FLOAT);
- TYPE_NAME(T_STRING);
- TYPE_NAME(T_REGEXP);
- TYPE_NAME(T_ARRAY);
- TYPE_NAME(T_HASH);
- TYPE_NAME(T_STRUCT);
- TYPE_NAME(T_BIGNUM);
- TYPE_NAME(T_FILE);
- TYPE_NAME(T_MATCH);
- TYPE_NAME(T_COMPLEX);
- TYPE_NAME(T_RATIONAL);
- TYPE_NAME(T_NIL);
- TYPE_NAME(T_TRUE);
- TYPE_NAME(T_FALSE);
- TYPE_NAME(T_SYMBOL);
- TYPE_NAME(T_FIXNUM);
- TYPE_NAME(T_UNDEF);
- TYPE_NAME(T_IMEMO);
- TYPE_NAME(T_ICLASS);
+ TYPE_NAME(T_NONE);
+ TYPE_NAME(T_OBJECT);
+ TYPE_NAME(T_CLASS);
+ TYPE_NAME(T_MODULE);
+ TYPE_NAME(T_FLOAT);
+ TYPE_NAME(T_STRING);
+ TYPE_NAME(T_REGEXP);
+ TYPE_NAME(T_ARRAY);
+ TYPE_NAME(T_HASH);
+ TYPE_NAME(T_STRUCT);
+ TYPE_NAME(T_BIGNUM);
+ TYPE_NAME(T_FILE);
+ TYPE_NAME(T_MATCH);
+ TYPE_NAME(T_COMPLEX);
+ TYPE_NAME(T_RATIONAL);
+ TYPE_NAME(T_NIL);
+ TYPE_NAME(T_TRUE);
+ TYPE_NAME(T_FALSE);
+ TYPE_NAME(T_SYMBOL);
+ TYPE_NAME(T_FIXNUM);
+ TYPE_NAME(T_UNDEF);
+ TYPE_NAME(T_IMEMO);
+ TYPE_NAME(T_ICLASS);
TYPE_NAME(T_MOVED);
- TYPE_NAME(T_ZOMBIE);
+ TYPE_NAME(T_ZOMBIE);
case T_DATA:
- if (obj && rb_objspace_data_type_name(obj)) {
- return rb_objspace_data_type_name(obj);
- }
- return "T_DATA";
+ if (obj && rb_objspace_data_type_name(obj)) {
+ return rb_objspace_data_type_name(obj);
+ }
+ return "T_DATA";
#undef TYPE_NAME
}
return "unknown";
@@ -11394,139 +14090,172 @@ rb_method_type_name(rb_method_type_t type)
rb_bug("rb_method_type_name: unreachable (type: %d)", type);
}
-/* from array.c */
-# define ARY_SHARED_P(ary) \
- (GC_ASSERT(!FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG)), \
- FL_TEST((ary),ELTS_SHARED)!=0)
-# define ARY_EMBED_P(ary) \
- (GC_ASSERT(!FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG)), \
- FL_TEST((ary), RARRAY_EMBED_FLAG)!=0)
-
static void
-rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
+rb_raw_iseq_info(char *const buff, const size_t buff_size, const rb_iseq_t *iseq)
{
- if (buff_size > 0 && iseq->body && iseq->body->location.label && !RB_TYPE_P(iseq->body->location.pathobj, T_MOVED)) {
- VALUE path = rb_iseq_path(iseq);
- VALUE n = iseq->body->location.first_lineno;
+ if (buff_size > 0 && ISEQ_BODY(iseq) && ISEQ_BODY(iseq)->location.label && !RB_TYPE_P(ISEQ_BODY(iseq)->location.pathobj, T_MOVED)) {
+ VALUE path = rb_iseq_path(iseq);
+ int n = ISEQ_BODY(iseq)->location.first_lineno;
snprintf(buff, buff_size, " %s@%s:%d",
- RSTRING_PTR(iseq->body->location.label),
- RSTRING_PTR(path),
- n ? FIX2INT(n) : 0 );
+ RSTRING_PTR(ISEQ_BODY(iseq)->location.label),
+ RSTRING_PTR(path), n);
}
}
-const char *
-rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
+static int
+str_len_no_raise(VALUE str)
{
- int pos = 0;
+ long len = RSTRING_LEN(str);
+ if (len < 0) return 0;
+ if (len > INT_MAX) return INT_MAX;
+ return (int)len;
+}
#define BUFF_ARGS buff + pos, buff_size - pos
-#define APPENDF(f) if ((pos += snprintf f) >= buff_size) goto end
+#define APPEND_F(...) if ((pos += snprintf(BUFF_ARGS, "" __VA_ARGS__)) >= buff_size) goto end
+#define APPEND_S(s) do { \
+ if ((pos + (int)rb_strlen_lit(s)) >= buff_size) { \
+ goto end; \
+ } \
+ else { \
+ memcpy(buff + pos, (s), rb_strlen_lit(s) + 1); \
+ } \
+ } while (0)
+#define TF(c) ((c) != 0 ? "true" : "false")
+#define C(c, s) ((c) != 0 ? (s) : " ")
+
+static size_t
+rb_raw_obj_info_common(char *const buff, const size_t buff_size, const VALUE obj)
+{
+ size_t pos = 0;
+
if (SPECIAL_CONST_P(obj)) {
- APPENDF((BUFF_ARGS, "%s", obj_type_name(obj)));
+ APPEND_F("%s", obj_type_name(obj));
if (FIXNUM_P(obj)) {
- APPENDF((BUFF_ARGS, " %ld", FIX2LONG(obj)));
+ APPEND_F(" %ld", FIX2LONG(obj));
}
else if (SYMBOL_P(obj)) {
- APPENDF((BUFF_ARGS, " %s", rb_id2name(SYM2ID(obj))));
+ APPEND_F(" %s", rb_id2name(SYM2ID(obj)));
}
}
else {
-#define TF(c) ((c) != 0 ? "true" : "false")
-#define C(c, s) ((c) != 0 ? (s) : " ")
- const int type = BUILTIN_TYPE(obj);
-#if USE_RGENGC
- const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
+ const int age = RVALUE_FLAGS_AGE(RBASIC(obj)->flags);
if (is_pointer_to_heap(&rb_objspace, (void *)obj)) {
- APPENDF((BUFF_ARGS, "%p [%d%s%s%s%s%s] %s ",
+ APPEND_F("%p [%d%s%s%s%s%s%s] %s ",
(void *)obj, age,
C(RVALUE_UNCOLLECTIBLE_BITMAP(obj), "L"),
C(RVALUE_MARK_BITMAP(obj), "M"),
C(RVALUE_PIN_BITMAP(obj), "P"),
C(RVALUE_MARKING_BITMAP(obj), "R"),
C(RVALUE_WB_UNPROTECTED_BITMAP(obj), "U"),
- obj_type_name(obj)));
+ C(rb_objspace_garbage_object_p(obj), "G"),
+ obj_type_name(obj));
}
else {
/* fake */
- APPENDF((BUFF_ARGS, "%p [%dXXXX] %s",
+ APPEND_F("%p [%dXXXX] %s",
(void *)obj, age,
- obj_type_name(obj)));
+ obj_type_name(obj));
}
-#else
- APPENDF((BUFF_ARGS, "%p [%s] %s",
- (void *)obj,
- C(RVALUE_MARK_BITMAP(obj), "M"),
- obj_type_name(obj)));
-#endif
-
- if (internal_object_p(obj)) {
- /* ignore */
- }
- else if (RBASIC(obj)->klass == 0) {
- APPENDF((BUFF_ARGS, "(temporary internal)"));
- }
- else {
- if (RTEST(RBASIC(obj)->klass)) {
+
+ if (internal_object_p(obj)) {
+ /* ignore */
+ }
+ else if (RBASIC(obj)->klass == 0) {
+ APPEND_S("(temporary internal)");
+ }
+ else if (RTEST(RBASIC(obj)->klass)) {
VALUE class_path = rb_class_path_cached(RBASIC(obj)->klass);
- if (!NIL_P(class_path)) {
- APPENDF((BUFF_ARGS, "(%s)", RSTRING_PTR(class_path)));
- }
+ if (!NIL_P(class_path)) {
+ APPEND_F("(%s)", RSTRING_PTR(class_path));
}
- }
+ }
#if GC_DEBUG
- APPENDF((BUFF_ARGS, "@%s:%d", RANY(obj)->file, RANY(obj)->line));
+ APPEND_F("@%s:%d", RANY(obj)->file, RANY(obj)->line);
#endif
+ }
+ end:
+
+ return pos;
+}
- switch (type) {
- case T_NODE:
- UNEXPECTED_NODE(rb_raw_obj_info);
- break;
- case T_ARRAY:
- if (FL_TEST(obj, ELTS_SHARED)) {
- APPENDF((BUFF_ARGS, "shared -> %s",
- rb_obj_info(RARRAY(obj)->as.heap.aux.shared_root)));
+static size_t
+rb_raw_obj_info_buitin_type(char *const buff, const size_t buff_size, const VALUE obj, size_t pos)
+{
+ if (LIKELY(pos < buff_size) && !SPECIAL_CONST_P(obj)) {
+ const enum ruby_value_type type = BUILTIN_TYPE(obj);
+
+ switch (type) {
+ case T_NODE:
+ UNEXPECTED_NODE(rb_raw_obj_info);
+ break;
+ case T_ARRAY:
+ if (ARY_SHARED_P(obj)) {
+ APPEND_S("shared -> ");
+ rb_raw_obj_info(BUFF_ARGS, ARY_SHARED_ROOT(obj));
}
- else if (FL_TEST(obj, RARRAY_EMBED_FLAG)) {
- APPENDF((BUFF_ARGS, "[%s%s] len: %d (embed)",
+ else if (ARY_EMBED_P(obj)) {
+ APPEND_F("[%s%s] len: %ld (embed)",
C(ARY_EMBED_P(obj), "E"),
C(ARY_SHARED_P(obj), "S"),
- (int)RARRAY_LEN(obj)));
+ RARRAY_LEN(obj));
}
else {
- APPENDF((BUFF_ARGS, "[%s%s%s] len: %d, capa:%d ptr:%p",
+ APPEND_F("[%s%s%s] len: %ld, capa:%ld ptr:%p",
C(ARY_EMBED_P(obj), "E"),
C(ARY_SHARED_P(obj), "S"),
C(RARRAY_TRANSIENT_P(obj), "T"),
- (int)RARRAY_LEN(obj),
- ARY_EMBED_P(obj) ? -1 : (int)RARRAY(obj)->as.heap.aux.capa,
- (void *)RARRAY_CONST_PTR_TRANSIENT(obj)));
- }
- break;
- case T_STRING: {
- APPENDF((BUFF_ARGS, "%s", RSTRING_PTR(obj)));
- break;
- }
+ RARRAY_LEN(obj),
+ ARY_EMBED_P(obj) ? -1L : RARRAY(obj)->as.heap.aux.capa,
+ (void *)RARRAY_CONST_PTR_TRANSIENT(obj));
+ }
+ break;
+ case T_STRING: {
+ if (STR_SHARED_P(obj)) {
+ APPEND_F(" [shared] len: %ld", RSTRING_LEN(obj));
+ }
+ else {
+ if (STR_EMBED_P(obj)) APPEND_S(" [embed]");
+
+ APPEND_F(" len: %ld, capa: %" PRIdSIZE, RSTRING_LEN(obj), rb_str_capacity(obj));
+ }
+ APPEND_F(" \"%.*s\"", str_len_no_raise(obj), RSTRING_PTR(obj));
+ break;
+ }
+ case T_SYMBOL: {
+ VALUE fstr = RSYMBOL(obj)->fstr;
+ ID id = RSYMBOL(obj)->id;
+ if (RB_TYPE_P(fstr, T_STRING)) {
+ APPEND_F(":%s id:%d", RSTRING_PTR(fstr), (unsigned int)id);
+ }
+ else {
+ APPEND_F("(%p) id:%d", (void *)fstr, (unsigned int)id);
+ }
+ break;
+ }
case T_MOVED: {
- APPENDF((BUFF_ARGS, "-> %p", (void*)rb_gc_location(obj)));
+ APPEND_F("-> %p", (void*)rb_gc_location(obj));
break;
}
case T_HASH: {
- APPENDF((BUFF_ARGS, "[%c%c] %d",
- RHASH_AR_TABLE_P(obj) ? 'A' : 'S',
- RHASH_TRANSIENT_P(obj) ? 'T' : ' ',
- (int)RHASH_SIZE(obj)));
- break;
+ APPEND_F("[%c%c] %"PRIdSIZE,
+ RHASH_AR_TABLE_P(obj) ? 'A' : 'S',
+ RHASH_TRANSIENT_P(obj) ? 'T' : ' ',
+ RHASH_SIZE(obj));
+ break;
}
case T_CLASS:
case T_MODULE:
{
VALUE class_path = rb_class_path_cached(obj);
if (!NIL_P(class_path)) {
- APPENDF((BUFF_ARGS, "%s", RSTRING_PTR(class_path)));
+ APPEND_F("%s", RSTRING_PTR(class_path));
+ }
+ else {
+ APPEND_S("(annon)");
}
break;
}
@@ -11534,113 +14263,166 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
{
VALUE class_path = rb_class_path_cached(RBASIC_CLASS(obj));
if (!NIL_P(class_path)) {
- APPENDF((BUFF_ARGS, "src:%s", RSTRING_PTR(class_path)));
+ APPEND_F("src:%s", RSTRING_PTR(class_path));
}
break;
}
case T_OBJECT:
{
- uint32_t len = ROBJECT_NUMIV(obj);
+ uint32_t len = ROBJECT_IV_CAPACITY(obj);
if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
- APPENDF((BUFF_ARGS, "(embed) len:%d", len));
+ APPEND_F("(embed) len:%d", len);
}
else {
VALUE *ptr = ROBJECT_IVPTR(obj);
- APPENDF((BUFF_ARGS, "len:%d ptr:%p", len, (void *)ptr));
+ APPEND_F("len:%d ptr:%p", len, (void *)ptr);
}
}
break;
- case T_DATA: {
- const struct rb_block *block;
- const rb_iseq_t *iseq;
- if (rb_obj_is_proc(obj) &&
- (block = vm_proc_block(obj)) != NULL &&
- (vm_block_type(block) == block_type_iseq) &&
- (iseq = vm_block_iseq(block)) != NULL) {
+ case T_DATA: {
+ const struct rb_block *block;
+ const rb_iseq_t *iseq;
+ if (rb_obj_is_proc(obj) &&
+ (block = vm_proc_block(obj)) != NULL &&
+ (vm_block_type(block) == block_type_iseq) &&
+ (iseq = vm_block_iseq(block)) != NULL) {
rb_raw_iseq_info(BUFF_ARGS, iseq);
- }
- else {
- const char * const type_name = rb_objspace_data_type_name(obj);
- if (type_name) {
- APPENDF((BUFF_ARGS, "%s", type_name));
- }
- }
- break;
- }
- case T_IMEMO: {
- const char *imemo_name = "\0";
- switch (imemo_type(obj)) {
-#define IMEMO_NAME(x) case imemo_##x: imemo_name = #x; break;
- IMEMO_NAME(env);
- IMEMO_NAME(cref);
- IMEMO_NAME(svar);
- IMEMO_NAME(throw_data);
- IMEMO_NAME(ifunc);
- IMEMO_NAME(memo);
- IMEMO_NAME(ment);
- IMEMO_NAME(iseq);
- IMEMO_NAME(tmpbuf);
- IMEMO_NAME(ast);
- IMEMO_NAME(parser_strterm);
-#undef IMEMO_NAME
- default: UNREACHABLE;
- }
- APPENDF((BUFF_ARGS, "/%s", imemo_name));
-
- switch (imemo_type(obj)) {
- case imemo_ment: {
- const rb_method_entry_t *me = &RANY(obj)->as.imemo.ment;
- if (me->def) {
- APPENDF((BUFF_ARGS, "(called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)",
- rb_id2name(me->called_id),
- rb_method_type_name(me->def->type),
- me->def->alias_count,
- obj_info(me->owner),
- obj_info(me->defined_class)));
- }
- else {
- APPENDF((BUFF_ARGS, "%s", rb_id2name(me->called_id)));
- }
- break;
- }
- case imemo_iseq: {
- const rb_iseq_t *iseq = (const rb_iseq_t *)obj;
+ }
+ else if (rb_ractor_p(obj)) {
+ rb_ractor_t *r = (void *)DATA_PTR(obj);
+ if (r) {
+ APPEND_F("r:%d", r->pub.id);
+ }
+ }
+ else {
+ const char * const type_name = rb_objspace_data_type_name(obj);
+ if (type_name) {
+ APPEND_F("%s", type_name);
+ }
+ }
+ break;
+ }
+ case T_IMEMO: {
+ APPEND_F("<%s> ", rb_imemo_name(imemo_type(obj)));
+
+ switch (imemo_type(obj)) {
+ case imemo_ment:
+ {
+ const rb_method_entry_t *me = &RANY(obj)->as.imemo.ment;
+
+ APPEND_F(":%s (%s%s%s%s) type:%s aliased:%d owner:%p defined_class:%p",
+ rb_id2name(me->called_id),
+ METHOD_ENTRY_VISI(me) == METHOD_VISI_PUBLIC ? "pub" :
+ METHOD_ENTRY_VISI(me) == METHOD_VISI_PRIVATE ? "pri" : "pro",
+ METHOD_ENTRY_COMPLEMENTED(me) ? ",cmp" : "",
+ METHOD_ENTRY_CACHED(me) ? ",cc" : "",
+ METHOD_ENTRY_INVALIDATED(me) ? ",inv" : "",
+ me->def ? rb_method_type_name(me->def->type) : "NULL",
+ me->def ? me->def->aliased : -1,
+ (void *)me->owner, // obj_info(me->owner),
+ (void *)me->defined_class); //obj_info(me->defined_class)));
+
+ if (me->def) {
+ switch (me->def->type) {
+ case VM_METHOD_TYPE_ISEQ:
+ APPEND_S(" (iseq:");
+ rb_raw_obj_info(BUFF_ARGS, (VALUE)me->def->body.iseq.iseqptr);
+ APPEND_S(")");
+ break;
+ default:
+ break;
+ }
+ }
+
+ break;
+ }
+ case imemo_iseq: {
+ const rb_iseq_t *iseq = (const rb_iseq_t *)obj;
rb_raw_iseq_info(BUFF_ARGS, iseq);
- break;
- }
- default:
- break;
- }
- }
- default:
- break;
- }
+ break;
+ }
+ case imemo_callinfo:
+ {
+ const struct rb_callinfo *ci = (const struct rb_callinfo *)obj;
+ APPEND_F("(mid:%s, flag:%x argc:%d, kwarg:%s)",
+ rb_id2name(vm_ci_mid(ci)),
+ vm_ci_flag(ci),
+ vm_ci_argc(ci),
+ vm_ci_kwarg(ci) ? "available" : "NULL");
+ break;
+ }
+ case imemo_callcache:
+ {
+ const struct rb_callcache *cc = (const struct rb_callcache *)obj;
+ VALUE class_path = cc->klass ? rb_class_path_cached(cc->klass) : Qnil;
+ const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
+
+ APPEND_F("(klass:%s cme:%s%s (%p) call:%p",
+ NIL_P(class_path) ? (cc->klass ? "??" : "<NULL>") : RSTRING_PTR(class_path),
+ cme ? rb_id2name(cme->called_id) : "<NULL>",
+ cme ? (METHOD_ENTRY_INVALIDATED(cme) ? " [inv]" : "") : "",
+ (void *)cme,
+ (void *)vm_cc_call(cc));
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ default:
+ break;
+ }
+ }
+ end:
+
+ return pos;
+}
+
#undef TF
#undef C
+
+const char *
+rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj)
+{
+ asan_unpoisoning_object(obj) {
+ size_t pos = rb_raw_obj_info_common(buff, buff_size, obj);
+ pos = rb_raw_obj_info_buitin_type(buff, buff_size, obj, pos);
+ if (pos >= buff_size) {} // truncated
}
- end:
+
return buff;
-#undef APPENDF
-#undef BUFF_ARGS
}
+#undef APPEND_S
+#undef APPEND_F
+#undef BUFF_ARGS
+
#if RGENGC_OBJ_INFO
#define OBJ_INFO_BUFFERS_NUM 10
#define OBJ_INFO_BUFFERS_SIZE 0x100
-static int obj_info_buffers_index = 0;
+static rb_atomic_t obj_info_buffers_index = 0;
static char obj_info_buffers[OBJ_INFO_BUFFERS_NUM][OBJ_INFO_BUFFERS_SIZE];
-static const char *
-obj_info(VALUE obj)
+/* Increments *var atomically and resets *var to 0 when maxval is
+ * reached. Returns the wraparound old *var value (0...maxval). */
+static rb_atomic_t
+atomic_inc_wraparound(rb_atomic_t *var, const rb_atomic_t maxval)
{
- const int index = obj_info_buffers_index++;
- char *const buff = &obj_info_buffers[index][0];
-
- if (obj_info_buffers_index >= OBJ_INFO_BUFFERS_NUM) {
- obj_info_buffers_index = 0;
+ rb_atomic_t oldval = RUBY_ATOMIC_FETCH_ADD(*var, 1);
+ if (UNLIKELY(oldval >= maxval - 1)) { // wraparound *var
+ const rb_atomic_t newval = oldval + 1;
+ RUBY_ATOMIC_CAS(*var, newval, newval % maxval);
+ oldval %= maxval;
}
+ return oldval;
+}
+static const char *
+obj_info(VALUE obj)
+{
+ rb_atomic_t index = atomic_inc_wraparound(&obj_info_buffers_index, OBJ_INFO_BUFFERS_NUM);
+ char *const buff = obj_info_buffers[index];
return rb_raw_obj_info(buff, OBJ_INFO_BUFFERS_SIZE, obj);
}
#else
@@ -11664,7 +14446,7 @@ rb_obj_info_dump(VALUE obj)
fprintf(stderr, "rb_obj_info_dump: %s\n", rb_raw_obj_info(buff, 0x100, obj));
}
-void
+MJIT_FUNC_EXPORTED void
rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func)
{
char buff[0x100];
@@ -11696,14 +14478,12 @@ rb_gcdebug_print_obj_condition(VALUE obj)
fprintf(stderr, "marked? : %s\n", MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) ? "true" : "false");
fprintf(stderr, "pinned? : %s\n", MARKED_IN_BITMAP(GET_HEAP_PINNED_BITS(obj), obj) ? "true" : "false");
-#if USE_RGENGC
fprintf(stderr, "age? : %d\n", RVALUE_AGE(obj));
fprintf(stderr, "old? : %s\n", RVALUE_OLD_P(obj) ? "true" : "false");
fprintf(stderr, "WB-protected?: %s\n", RVALUE_WB_UNPROTECTED(obj) ? "false" : "true");
fprintf(stderr, "remembered? : %s\n", RVALUE_REMEMBERED(obj) ? "true" : "false");
-#endif
- if (is_lazy_sweeping(heap_eden)) {
+ if (is_lazy_sweeping(objspace)) {
fprintf(stderr, "lazy sweeping?: true\n");
fprintf(stderr, "swept?: %s\n", is_swept_object(objspace, obj) ? "done" : "not yet");
}
@@ -11741,7 +14521,7 @@ rb_gcdebug_add_stress_to_class(int argc, VALUE *argv, VALUE self)
rb_objspace_t *objspace = &rb_objspace;
if (!stress_to_class) {
- stress_to_class = rb_ary_tmp_new(argc);
+ stress_to_class = rb_ary_hidden_new(argc);
}
rb_ary_cat(stress_to_class, argv, argc);
return self;
@@ -11762,12 +14542,12 @@ rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
int i;
if (stress_to_class) {
- for (i = 0; i < argc; ++i) {
- rb_ary_delete_same(stress_to_class, argv[i]);
- }
- if (RARRAY_LEN(stress_to_class) == 0) {
- stress_to_class = 0;
- }
+ for (i = 0; i < argc; ++i) {
+ rb_ary_delete_same(stress_to_class, argv[i]);
+ }
+ if (RARRAY_LEN(stress_to_class) == 0) {
+ stress_to_class = 0;
+ }
}
return Qnil;
}
@@ -11782,9 +14562,9 @@ rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
*
* ObjectSpace also provides support for object finalizers, procs that will be
* called when a specific object is about to be destroyed by garbage
- * collection.
- *
- * require 'objspace'
+ * collection. See the documentation for
+ * <code>ObjectSpace.define_finalizer</code> for important information on
+ * how to use this method correctly.
*
* a = "A"
* b = "B"
@@ -11792,6 +14572,9 @@ rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
* ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
* ObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" })
*
+ * a = nil
+ * b = nil
+ *
* _produces:_
*
* Finalizer two on 537763470
@@ -11827,6 +14610,22 @@ rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
*/
#include "gc.rbinc"
+/*
+ * call-seq:
+ * GC.using_rvargc? -> true or false
+ *
+ * Returns true if using experimental feature Variable Width Allocation, false
+ * otherwise.
+ */
+static VALUE
+gc_using_rvargc_p(VALUE mod)
+{
+#if USE_RVARGC
+ return Qtrue;
+#else
+ return Qfalse;
+#endif
+}
void
Init_GC(void)
@@ -11837,13 +14636,17 @@ Init_GC(void)
VALUE gc_constants;
rb_mGC = rb_define_module("GC");
- load_gc();
gc_constants = rb_hash_new();
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("DEBUG")), RBOOL(GC_DEBUG));
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("BASE_SLOT_SIZE")), SIZET2NUM(BASE_SLOT_SIZE - RVALUE_OVERHEAD));
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_OVERHEAD")), SIZET2NUM(RVALUE_OVERHEAD));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE)));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE));
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_PLANES")), SIZET2NUM(HEAP_PAGE_BITMAP_PLANES));
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_SIZE")), SIZET2NUM(HEAP_PAGE_SIZE));
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("SIZE_POOL_COUNT")), LONG2FIX(SIZE_POOL_COUNT));
+ rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVARGC_MAX_ALLOCATE_SIZE")), LONG2FIX(size_pool_slot_size(SIZE_POOL_COUNT - 1)));
OBJ_FREEZE(gc_constants);
/* internal constants */
rb_define_const(rb_mGC, "INTERNAL_CONSTANTS", gc_constants);
@@ -11875,58 +14678,75 @@ Init_GC(void)
rb_define_module_function(rb_mObjSpace, "count_objects", count_objects, -1);
{
- VALUE rb_cWeakMap = rb_define_class_under(rb_mObjSpace, "WeakMap", rb_cObject);
- rb_define_alloc_func(rb_cWeakMap, wmap_allocate);
- rb_define_method(rb_cWeakMap, "[]=", wmap_aset, 2);
- rb_define_method(rb_cWeakMap, "[]", wmap_aref, 1);
- rb_define_method(rb_cWeakMap, "include?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "member?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "key?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "inspect", wmap_inspect, 0);
- rb_define_method(rb_cWeakMap, "each", wmap_each, 0);
- rb_define_method(rb_cWeakMap, "each_pair", wmap_each, 0);
- rb_define_method(rb_cWeakMap, "each_key", wmap_each_key, 0);
- rb_define_method(rb_cWeakMap, "each_value", wmap_each_value, 0);
- rb_define_method(rb_cWeakMap, "keys", wmap_keys, 0);
- rb_define_method(rb_cWeakMap, "values", wmap_values, 0);
- rb_define_method(rb_cWeakMap, "size", wmap_size, 0);
- rb_define_method(rb_cWeakMap, "length", wmap_size, 0);
- rb_include_module(rb_cWeakMap, rb_mEnumerable);
+ VALUE rb_cWeakMap = rb_define_class_under(rb_mObjSpace, "WeakMap", rb_cObject);
+ rb_define_alloc_func(rb_cWeakMap, wmap_allocate);
+ rb_define_method(rb_cWeakMap, "[]=", wmap_aset, 2);
+ rb_define_method(rb_cWeakMap, "[]", wmap_aref, 1);
+ rb_define_method(rb_cWeakMap, "include?", wmap_has_key, 1);
+ rb_define_method(rb_cWeakMap, "member?", wmap_has_key, 1);
+ rb_define_method(rb_cWeakMap, "key?", wmap_has_key, 1);
+ rb_define_method(rb_cWeakMap, "inspect", wmap_inspect, 0);
+ rb_define_method(rb_cWeakMap, "each", wmap_each, 0);
+ rb_define_method(rb_cWeakMap, "each_pair", wmap_each, 0);
+ rb_define_method(rb_cWeakMap, "each_key", wmap_each_key, 0);
+ rb_define_method(rb_cWeakMap, "each_value", wmap_each_value, 0);
+ rb_define_method(rb_cWeakMap, "keys", wmap_keys, 0);
+ rb_define_method(rb_cWeakMap, "values", wmap_values, 0);
+ rb_define_method(rb_cWeakMap, "size", wmap_size, 0);
+ rb_define_method(rb_cWeakMap, "length", wmap_size, 0);
+ rb_include_module(rb_cWeakMap, rb_mEnumerable);
}
/* internal methods */
rb_define_singleton_method(rb_mGC, "verify_internal_consistency", gc_verify_internal_consistency_m, 0);
- rb_define_singleton_method(rb_mGC, "verify_compaction_references", gc_verify_compaction_references, -1);
rb_define_singleton_method(rb_mGC, "verify_transient_heap_internal_consistency", gc_verify_transient_heap_internal_consistency, 0);
#if MALLOC_ALLOCATED_SIZE
rb_define_singleton_method(rb_mGC, "malloc_allocated_size", gc_malloc_allocated_size, 0);
rb_define_singleton_method(rb_mGC, "malloc_allocations", gc_malloc_allocations, 0);
#endif
+ rb_define_singleton_method(rb_mGC, "using_rvargc?", gc_using_rvargc_p, 0);
+
+ if (GC_COMPACTION_SUPPORTED) {
+ rb_define_singleton_method(rb_mGC, "compact", gc_compact, 0);
+ rb_define_singleton_method(rb_mGC, "auto_compact", gc_get_auto_compact, 0);
+ rb_define_singleton_method(rb_mGC, "auto_compact=", gc_set_auto_compact, 1);
+ rb_define_singleton_method(rb_mGC, "latest_compact_info", gc_compact_stats, 0);
+ }
+ else {
+ rb_define_singleton_method(rb_mGC, "compact", rb_f_notimplement, 0);
+ rb_define_singleton_method(rb_mGC, "auto_compact", rb_f_notimplement, 0);
+ rb_define_singleton_method(rb_mGC, "auto_compact=", rb_f_notimplement, 1);
+ rb_define_singleton_method(rb_mGC, "latest_compact_info", rb_f_notimplement, 0);
+ /* When !GC_COMPACTION_SUPPORTED, this method is not defined in gc.rb */
+ rb_define_singleton_method(rb_mGC, "verify_compaction_references", rb_f_notimplement, -1);
+ }
+
#if GC_DEBUG_STRESS_TO_CLASS
rb_define_singleton_method(rb_mGC, "add_stress_to_class", rb_gcdebug_add_stress_to_class, -1);
rb_define_singleton_method(rb_mGC, "remove_stress_to_class", rb_gcdebug_remove_stress_to_class, -1);
#endif
{
- VALUE opts;
- /* GC build options */
- rb_define_const(rb_mGC, "OPTS", opts = rb_ary_new());
+ VALUE opts;
+ /* \GC build options */
+ rb_define_const(rb_mGC, "OPTS", opts = rb_ary_new());
#define OPT(o) if (o) rb_ary_push(opts, rb_fstring_lit(#o))
- OPT(GC_DEBUG);
- OPT(USE_RGENGC);
- OPT(RGENGC_DEBUG);
- OPT(RGENGC_CHECK_MODE);
- OPT(RGENGC_PROFILE);
- OPT(RGENGC_ESTIMATE_OLDMALLOC);
- OPT(GC_PROFILE_MORE_DETAIL);
- OPT(GC_ENABLE_LAZY_SWEEP);
- OPT(CALC_EXACT_MALLOC_SIZE);
- OPT(MALLOC_ALLOCATED_SIZE);
- OPT(MALLOC_ALLOCATED_SIZE_CHECK);
- OPT(GC_PROFILE_DETAIL_MEMORY);
+ OPT(GC_DEBUG);
+ OPT(USE_RGENGC);
+ OPT(RGENGC_DEBUG);
+ OPT(RGENGC_CHECK_MODE);
+ OPT(RGENGC_PROFILE);
+ OPT(RGENGC_ESTIMATE_OLDMALLOC);
+ OPT(GC_PROFILE_MORE_DETAIL);
+ OPT(GC_ENABLE_LAZY_SWEEP);
+ OPT(CALC_EXACT_MALLOC_SIZE);
+ OPT(MALLOC_ALLOCATED_SIZE);
+ OPT(MALLOC_ALLOCATED_SIZE_CHECK);
+ OPT(GC_PROFILE_DETAIL_MEMORY);
+ OPT(GC_COMPACTION_SUPPORTED);
#undef OPT
- OBJ_FREEZE(opts);
+ OBJ_FREEZE(opts);
}
}
diff --git a/gc.h b/gc.h
index cf794fa514..23218c1a9e 100644
--- a/gc.h
+++ b/gc.h
@@ -1,19 +1,32 @@
-
#ifndef RUBY_GC_H
#define RUBY_GC_H 1
+#include "ruby/ruby.h"
#if defined(__x86_64__) && !defined(_ILP32) && defined(__GNUC__)
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
#elif defined(__i386) && defined(__GNUC__)
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p)))
-#elif defined(__powerpc64__) && defined(__GNUC__)
+#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && !defined(_AIX) && !defined(__APPLE__) // Not Apple is NEEDED to unbreak ppc64 build on Darwin. Don't ask.
#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr\t%0, %%r1" : "=r" (*(p)))
+#elif (defined(__powerpc__) || defined(__powerpc64__)) && defined(__GNUC__) && defined(_AIX)
+#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mr %0,1" : "=r" (*(p)))
+#elif defined(__POWERPC__) && defined(__APPLE__) // Darwin ppc and ppc64
+#define SET_MACHINE_STACK_END(p) __asm__ volatile("mr %0, r1" : "=r" (*(p)))
+#elif defined(__aarch64__) && defined(__GNUC__)
+#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("mov\t%0, sp" : "=r" (*(p)))
#else
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
#define USE_CONSERVATIVE_STACK_END
#endif
+#define RB_GC_SAVE_MACHINE_CONTEXT(th) \
+ do { \
+ FLUSH_REGISTER_WINDOWS; \
+ setjmp((th)->ec->machine.regs); \
+ SET_MACHINE_STACK_END(&(th)->ec->machine.stack_end); \
+ } while (0)
+
/* for GC debug */
#ifndef RUBY_MARK_FREE_DEBUG
@@ -26,20 +39,20 @@ extern int ruby_gc_debug_indent;
static inline void
rb_gc_debug_indent(void)
{
- printf("%*s", ruby_gc_debug_indent, "");
+ ruby_debug_printf("%*s", ruby_gc_debug_indent, "");
}
static inline void
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
{
if (st == 0) {
- ruby_gc_debug_indent--;
+ ruby_gc_debug_indent--;
}
rb_gc_debug_indent();
- printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
+ ruby_debug_printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
if (st) {
- ruby_gc_debug_indent++;
+ ruby_gc_debug_indent++;
}
fflush(stdout);
@@ -49,7 +62,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
#define RUBY_MARK_LEAVE(msg) rb_gc_debug_body("mark", (msg), 0, ptr)
#define RUBY_FREE_ENTER(msg) rb_gc_debug_body("free", (msg), 1, ptr)
#define RUBY_FREE_LEAVE(msg) rb_gc_debug_body("free", (msg), 0, ptr)
-#define RUBY_GC_INFO rb_gc_debug_indent(); printf
+#define RUBY_GC_INFO rb_gc_debug_indent(), ruby_debug_printf
#else
#define RUBY_MARK_ENTER(msg)
@@ -59,7 +72,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
#define RUBY_GC_INFO if(0)printf
#endif
-#define RUBY_MARK_NO_PIN_UNLESS_NULL(ptr) do { \
+#define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { \
VALUE markobj = (ptr); \
if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} \
} while (0)
@@ -77,9 +90,9 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
RUBY_EXTERN int ruby_stack_grow_direction;
int ruby_get_stack_grow_direction(volatile VALUE *addr);
# define stack_growup_p(x) ( \
- (ruby_stack_grow_direction ? \
- ruby_stack_grow_direction : \
- ruby_get_stack_grow_direction(x)) > 0)
+ (ruby_stack_grow_direction ? \
+ ruby_stack_grow_direction : \
+ ruby_get_stack_grow_direction(x)) > 0)
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? (a) : (b))
#endif
@@ -101,12 +114,12 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
const char *rb_obj_info(VALUE obj);
-const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
-
-VALUE rb_gc_disable_no_rest(void);
+const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj);
struct rb_thread_struct;
+size_t rb_size_pool_slot_size(unsigned char pool_id);
+
RUBY_SYMBOL_EXPORT_BEGIN
/* exports for objspace module */
@@ -116,7 +129,6 @@ void rb_objspace_reachable_objects_from_root(void (func)(const char *category, V
int rb_objspace_markable_object_p(VALUE obj);
int rb_objspace_internal_object_p(VALUE obj);
int rb_objspace_marked_object_p(VALUE obj);
-int rb_objspace_garbage_object_p(VALUE obj);
void rb_objspace_each_objects(
int (*callback)(void *start, void *end, size_t stride, void *data),
@@ -126,6 +138,10 @@ void rb_objspace_each_objects_without_setup(
int (*callback)(void *, void *, size_t, void *),
void *data);
+size_t rb_gc_obj_slot_size(VALUE obj);
+
+VALUE rb_gc_disable_no_rest(void);
+
RUBY_SYMBOL_EXPORT_END
#endif /* RUBY_GC_H */
diff --git a/gc.rb b/gc.rb
index fcfa48fbe1..57aeeb9131 100644
--- a/gc.rb
+++ b/gc.rb
@@ -6,7 +6,7 @@
# Some of the underlying methods are also available via the ObjectSpace
# module.
#
-# You may obtain information about the operation of the GC through
+# You may obtain information about the operation of the \GC through
# GC::Profiler.
module GC
@@ -24,18 +24,18 @@ module GC
#
# def GC.start(full_mark: true, immediate_sweep: true); end
#
- # Use full_mark: false to perform a minor GC.
+ # Use full_mark: false to perform a minor \GC.
# Use immediate_sweep: false to defer sweeping (use lazy sweep).
#
# Note: These keyword arguments are implementation and version dependent. They
# are not guaranteed to be future-compatible, and may be ignored if the
# underlying implementation does not support them.
def self.start full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep, false
end
def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep, false
end
# call-seq:
@@ -49,7 +49,7 @@ module GC
# GC.enable #=> false
#
def self.enable
- __builtin_gc_enable
+ Primitive.gc_enable
end
# call-seq:
@@ -61,23 +61,23 @@ module GC
# GC.disable #=> false
# GC.disable #=> true
def self.disable
- __builtin_gc_disable
+ Primitive.gc_disable
end
# call-seq:
# GC.stress -> integer, true or false
#
- # Returns current status of GC stress mode.
+ # Returns current status of \GC stress mode.
def self.stress
- __builtin_gc_stress_get
+ Primitive.gc_stress_get
end
# call-seq:
# GC.stress = flag -> flag
#
- # Updates the GC stress mode.
+ # Updates the \GC stress mode.
#
- # When stress mode is enabled, the GC is invoked at every GC opportunity:
+ # When stress mode is enabled, the \GC is invoked at every \GC opportunity:
# all memory and object allocations.
#
# Enabling stress mode will degrade performance, it is only for debugging.
@@ -87,82 +87,209 @@ module GC
# 0x02:: no immediate sweep
# 0x04:: full mark after malloc/calloc/realloc
def self.stress=(flag)
- __builtin_gc_stress_set_m flag
+ Primitive.gc_stress_set_m flag
end
# call-seq:
# GC.count -> Integer
#
- # The number of times GC occurred.
+ # The number of times \GC occurred.
#
- # It returns the number of times GC occurred since the process started.
+ # It returns the number of times \GC occurred since the process started.
def self.count
- __builtin_gc_count
+ Primitive.gc_count
end
# call-seq:
# GC.stat -> Hash
- # GC.stat(hash) -> hash
+ # GC.stat(hash) -> Hash
# GC.stat(:key) -> Numeric
#
- # Returns a Hash containing information about the GC.
- #
- # The hash includes information about internal statistics about GC such as:
- #
- # {
- # :count=>0,
- # :heap_allocated_pages=>24,
- # :heap_sorted_length=>24,
- # :heap_allocatable_pages=>0,
- # :heap_available_slots=>9783,
- # :heap_live_slots=>7713,
- # :heap_free_slots=>2070,
- # :heap_final_slots=>0,
- # :heap_marked_slots=>0,
- # :heap_eden_pages=>24,
- # :heap_tomb_pages=>0,
- # :total_allocated_pages=>24,
- # :total_freed_pages=>0,
- # :total_allocated_objects=>7796,
- # :total_freed_objects=>83,
- # :malloc_increase_bytes=>2389312,
- # :malloc_increase_bytes_limit=>16777216,
- # :minor_gc_count=>0,
- # :major_gc_count=>0,
- # :remembered_wb_unprotected_objects=>0,
- # :remembered_wb_unprotected_objects_limit=>0,
- # :old_objects=>0,
- # :old_objects_limit=>0,
- # :oldmalloc_increase_bytes=>2389760,
- # :oldmalloc_increase_bytes_limit=>16777216
- # }
- #
- # The contents of the hash are implementation specific and may be changed in
- # the future.
- #
- # This method is only expected to work on C Ruby.
+ # Returns a Hash containing information about the \GC.
+ #
+ # The contents of the hash are implementation specific and may change in
+ # the future without notice.
+ #
+ # The hash includes information about internal statistics about \GC such as:
+ #
+ # [count]
+ # The total number of garbage collections ran since application start
+ # (count includes both minor and major garbage collections)
+ # [time]
+ # The total time spent in garbage collections (in milliseconds)
+ # [heap_allocated_pages]
+ # The total number of `:heap_eden_pages` + `:heap_tomb_pages`
+ # [heap_sorted_length]
+ # The number of pages that can fit into the buffer that holds references to
+ # all pages
+ # [heap_allocatable_pages]
+ # The total number of pages the application could allocate without additional \GC
+ # [heap_available_slots]
+ # The total number of slots in all `:heap_allocated_pages`
+ # [heap_live_slots]
+ # The total number of slots which contain live objects
+ # [heap_free_slots]
+ # The total number of slots which do not contain live objects
+ # [heap_final_slots]
+ # The total number of slots with pending finalizers to be run
+ # [heap_marked_slots]
+ # The total number of objects marked in the last \GC
+ # [heap_eden_pages]
+ # The total number of pages which contain at least one live slot
+ # [heap_tomb_pages]
+ # The total number of pages which do not contain any live slots
+ # [total_allocated_pages]
+ # The cumulative number of pages allocated since application start
+ # [total_freed_pages]
+ # The cumulative number of pages freed since application start
+ # [total_allocated_objects]
+ # The cumulative number of objects allocated since application start
+ # [total_freed_objects]
+ # The cumulative number of objects freed since application start
+ # [malloc_increase_bytes]
+ # Amount of memory allocated on the heap for objects. Decreased by any \GC
+ # [malloc_increase_bytes_limit]
+ # When `:malloc_increase_bytes` crosses this limit, \GC is triggered
+ # [minor_gc_count]
+ # The total number of minor garbage collections run since process start
+ # [major_gc_count]
+ # The total number of major garbage collections run since process start
+ # [compact_count]
+ # The total number of compactions run since process start
+ # [read_barrier_faults]
+ # The total number of times the read barrier was triggered during
+ # compaction
+ # [total_moved_objects]
+ # The total number of objects compaction has moved
+ # [remembered_wb_unprotected_objects]
+ # The total number of objects without write barriers
+ # [remembered_wb_unprotected_objects_limit]
+ # When `:remembered_wb_unprotected_objects` crosses this limit,
+ # major \GC is triggered
+ # [old_objects]
+ # Number of live, old objects which have survived at least 3 garbage collections
+ # [old_objects_limit]
+ # When `:old_objects` crosses this limit, major \GC is triggered
+ # [oldmalloc_increase_bytes]
+ # Amount of memory allocated on the heap for objects. Decreased by major \GC
+ # [oldmalloc_increase_bytes_limit]
+ # When `:old_malloc_increase_bytes` crosses this limit, major \GC is triggered
+ #
+ # If the optional argument, hash, is given,
+ # it is overwritten and returned.
+ # This is intended to avoid probe effect.
+ #
+ # This method is only expected to work on CRuby.
def self.stat hash_or_key = nil
- __builtin_gc_stat hash_or_key
+ Primitive.gc_stat hash_or_key
end
- # call-seq:
- # GC.latest_gc_info -> {:gc_by=>:newobj}
+ # call-seq:
+ # GC.stat_heap -> Hash
+ # GC.stat_heap(nil, hash) -> Hash
+ # GC.stat_heap(heap_name) -> Hash
+ # GC.stat_heap(heap_name, hash) -> Hash
+ # GC.stat_heap(heap_name, :key) -> Numeric
+ #
+ # Returns information for memory pools in the \GC.
+ #
+ # If the first optional argument, +heap_name+, is passed in and not +nil+, it
+ # returns a +Hash+ containing information about the particular memory pool.
+ # Otherwise, it will return a +Hash+ with memory pool names as keys and
+ # a +Hash+ containing information about the memory pool as values.
+ #
+ # If the second optional argument, +hash_or_key+, is given as +Hash+, it will
+ # be overwritten and returned. This is intended to avoid the probe effect.
+ #
+ # If both optional arguments are passed in and the second optional argument is
+ # a symbol, it will return a +Numeric+ of the value for the particular memory
+ # pool.
+ #
+ # On CRuby, +heap_name+ is of the type +Integer+ but may be of type +String+
+ # on other implementations.
+ #
+ # The contents of the hash are implementation specific and may change in
+ # the future without notice.
+ #
+ # If the optional argument, hash, is given, it is overwritten and returned.
+ #
+ # This method is only expected to work on CRuby.
+ def self.stat_heap heap_name = nil, hash_or_key = nil
+ Primitive.gc_stat_heap heap_name, hash_or_key
+ end
+
+ # call-seq:
+ # GC.latest_gc_info -> hash
# GC.latest_gc_info(hash) -> hash
# GC.latest_gc_info(:major_by) -> :malloc
#
- # Returns information about the most recent garbage collection.
+ # Returns information about the most recent garbage collection.
+ #
+ # If the optional argument, hash, is given,
+ # it is overwritten and returned.
+ # This is intended to avoid probe effect.
def self.latest_gc_info hash_or_key = nil
- __builtin_gc_latest_gc_info hash_or_key
+ Primitive.gc_latest_gc_info hash_or_key
end
- def self.compact
- __builtin_rb_gc_compact
+ if respond_to?(:compact)
+ # call-seq:
+ # GC.verify_compaction_references(toward: nil, double_heap: false) -> hash
+ #
+ # Verify compaction reference consistency.
+ #
+ # This method is implementation specific. During compaction, objects that
+ # were moved are replaced with T_MOVED objects. No object should have a
+ # reference to a T_MOVED object after compaction.
+ #
+ # This function expands the heap to ensure room to move all objects,
+ # compacts the heap to make sure everything moves, updates all references,
+ # then performs a full \GC. If any object contains a reference to a T_MOVED
+ # object, that object should be pushed on the mark stack, and will
+ # make a SEGV.
+ def self.verify_compaction_references(toward: nil, double_heap: false, expand_heap: false)
+ Primitive.gc_verify_compaction_references(double_heap, expand_heap, toward == :empty)
+ end
+ end
+
+ # call-seq:
+ # GC.measure_total_time = true/false
+ #
+ # Enable to measure \GC time.
+ # You can get the result with <tt>GC.stat(:time)</tt>.
+ # Note that \GC time measurement can cause some performance overhead.
+ def self.measure_total_time=(flag)
+ Primitive.cstmt! %{
+ rb_objspace.flags.measure_gc = RTEST(flag) ? TRUE : FALSE;
+ return flag;
+ }
+ end
+
+ # call-seq:
+ # GC.measure_total_time -> true/false
+ #
+ # Return measure_total_time flag (default: +true+).
+ # Note that measurement can affect the application performance.
+ def self.measure_total_time
+ Primitive.cexpr! %{
+ RBOOL(rb_objspace.flags.measure_gc)
+ }
+ end
+
+ # call-seq:
+ # GC.total_time -> int
+ #
+ # Return measured \GC total time in nano seconds.
+ def self.total_time
+ Primitive.cexpr! %{
+ ULL2NUM(rb_objspace.profile.total_time_ns)
+ }
end
end
module ObjectSpace
def garbage_collect full_mark: true, immediate_mark: true, immediate_sweep: true
- __builtin_gc_start_internal full_mark, immediate_mark, immediate_sweep
+ Primitive.gc_start_internal full_mark, immediate_mark, immediate_sweep, false
end
module_function :garbage_collect
diff --git a/gem_prelude.rb b/gem_prelude.rb
index 1d0158d00a..f382021ca3 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -1,2 +1,26 @@
-require 'rubygems.rb' if defined?(Gem)
-require 'did_you_mean' if defined?(DidYouMean)
+begin
+ require 'rubygems'
+rescue LoadError => e
+ raise unless e.path == 'rubygems'
+
+ warn "`RubyGems' were not loaded."
+end if defined?(Gem)
+
+begin
+ require 'error_highlight'
+rescue LoadError
+ warn "`error_highlight' was not loaded."
+end if defined?(ErrorHighlight)
+
+begin
+ require 'did_you_mean'
+rescue LoadError
+ warn "`did_you_mean' was not loaded."
+end if defined?(DidYouMean)
+
+begin
+ require 'syntax_suggest/core_ext'
+rescue LoadError
+ warn "`syntax_suggest' was not loaded."
+end if defined?(SyntaxSuggest)
+
diff --git a/gems/bundled_gems b/gems/bundled_gems
index b2c6e2d5cb..d37d869d41 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -1,6 +1,16 @@
-minitest 5.13.0 https://github.com/seattlerb/minitest
-net-telnet 0.2.0 https://github.com/ruby/net-telnet
-power_assert 1.1.5 https://github.com/k-tsj/power_assert
-rake 13.0.1 https://github.com/ruby/rake
-test-unit 3.3.4 https://github.com/test-unit/test-unit
-xmlrpc 0.3.0 https://github.com/ruby/xmlrpc
+# gem-name version-to-bundle repository-url [optional-commit-hash-to-test-or-defaults-to-v-version]
+minitest 5.25.1 https://github.com/seattlerb/minitest
+power_assert 2.0.3 https://github.com/ruby/power_assert
+rake 13.0.6 https://github.com/ruby/rake
+test-unit 3.5.7 https://github.com/test-unit/test-unit
+rexml 3.3.9 https://github.com/ruby/rexml
+rss 0.3.1 https://github.com/ruby/rss
+net-ftp 0.2.1 https://github.com/ruby/net-ftp
+net-imap 0.3.9 https://github.com/ruby/net-imap
+net-pop 0.1.2 https://github.com/ruby/net-pop
+net-smtp 0.3.4 https://github.com/ruby/net-smtp
+matrix 0.4.2 https://github.com/ruby/matrix
+prime 0.1.2 https://github.com/ruby/prime
+rbs 2.8.2 https://github.com/ruby/rbs
+typeprof 0.21.3 https://github.com/ruby/typeprof
+debug 1.7.1 https://github.com/ruby/debug
diff --git a/gems/lib/core_assertions.rb b/gems/lib/core_assertions.rb
new file mode 100644
index 0000000000..7334063885
--- /dev/null
+++ b/gems/lib/core_assertions.rb
@@ -0,0 +1 @@
+require_relative "../../tool/lib/core_assertions.rb"
diff --git a/gems/lib/envutil.rb b/gems/lib/envutil.rb
new file mode 100644
index 0000000000..d684c22cf2
--- /dev/null
+++ b/gems/lib/envutil.rb
@@ -0,0 +1 @@
+require_relative "../../tool/lib/envutil.rb"
diff --git a/gems/lib/rake/extensiontask.rb b/gems/lib/rake/extensiontask.rb
new file mode 100644
index 0000000000..fdbe8d8874
--- /dev/null
+++ b/gems/lib/rake/extensiontask.rb
@@ -0,0 +1,12 @@
+require "rake/tasklib" unless defined?(Rake::TaskLib)
+
+module Rake
+ class ExtensionTask < TaskLib
+ def initialize(...)
+ task :compile do |args|
+ puts "Dummy `compile` task defined in #{__FILE__}"
+ puts "#{args.name} => #{args.prereqs.join(' ')}"
+ end
+ end
+ end
+end
diff --git a/goruby.c b/goruby.c
index ddb62562d4..5d45277207 100644
--- a/goruby.c
+++ b/goruby.c
@@ -1,4 +1,6 @@
-void Init_golf(void);
+static void Init_golf(void);
+static void *goruby_options(int argc, char **argv);
+static int goruby_run_node(void *arg);
#define ruby_options goruby_options
#define ruby_run_node goruby_run_node
#include "main.c"
@@ -17,6 +19,8 @@ RUBY_EXTERN void *ruby_options(int argc, char **argv);
RUBY_EXTERN int ruby_run_node(void*);
RUBY_EXTERN void ruby_init_ext(const char *name, void (*init)(void));
+#include "golf_prelude.c"
+
static VALUE
init_golf(VALUE arg)
{
@@ -33,26 +37,24 @@ goruby_options(int argc, char **argv)
void *ret;
if ((isatty(0) && isatty(1) && isatty(2)) && (pipe(rw) == 0)) {
- ssize_t n;
- infd = dup(0);
- if (infd < 0) {
- close(rw[0]);
- close(rw[1]);
- goto no_irb;
- }
- dup2(rw[0], 0);
- close(rw[0]);
- n = write(rw[1], cmd, sizeof(cmd) - 1);
- close(rw[1]);
- ret = n > 0 ? ruby_options(argc, argv) : NULL;
- dup2(infd, 0);
- close(infd);
- return ret;
- }
- else {
- no_irb:
- return ruby_options(argc, argv);
+ ssize_t n;
+ infd = dup(0);
+ if (infd < 0) {
+ close(rw[0]);
+ close(rw[1]);
+ goto no_irb;
+ }
+ dup2(rw[0], 0);
+ close(rw[0]);
+ n = write(rw[1], cmd, sizeof(cmd) - 1);
+ close(rw[1]);
+ ret = n > 0 ? ruby_options(argc, argv) : NULL;
+ dup2(infd, 0);
+ close(infd);
+ return ret;
}
+ no_irb:
+ return ruby_options(argc, argv);
}
int
@@ -60,7 +62,7 @@ goruby_run_node(void *arg)
{
int state;
if (NIL_P(rb_protect(init_golf, Qtrue, &state))) {
- return state == EXIT_SUCCESS ? EXIT_FAILURE : state;
+ return state == EXIT_SUCCESS ? EXIT_FAILURE : state;
}
return ruby_run_node(arg);
}
diff --git a/hash.c b/hash.c
index 82383e9a93..d2dce30624 100644
--- a/hash.c
+++ b/hash.c
@@ -11,17 +11,10 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "ruby/st.h"
-#include "ruby/util.h"
-#include "internal.h"
+#include "ruby/internal/config.h"
+
#include <errno.h>
-#include "probes.h"
-#include "id.h"
-#include "symbol.h"
-#include "debug_counter.h"
-#include "transient_heap.h"
-#include "ruby_assert.h"
+
#ifdef __APPLE__
# ifdef HAVE_CRT_EXTERNS_H
# include <crt_externs.h>
@@ -30,6 +23,32 @@
# endif
#endif
+#include "debug_counter.h"
+#include "id.h"
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/bignum.h"
+#include "internal/basic_operators.h"
+#include "internal/class.h"
+#include "internal/cont.h"
+#include "internal/error.h"
+#include "internal/hash.h"
+#include "internal/object.h"
+#include "internal/proc.h"
+#include "internal/symbol.h"
+#include "internal/thread.h"
+#include "internal/time.h"
+#include "internal/vm.h"
+#include "probes.h"
+#include "ruby/st.h"
+#include "ruby/util.h"
+#include "ruby_assert.h"
+#include "symbol.h"
+#include "transient_heap.h"
+#include "ruby/thread_native.h"
+#include "ruby/ractor.h"
+#include "vm_sync.h"
+
#ifndef HASH_DEBUG
#define HASH_DEBUG 0
#endif
@@ -38,11 +57,6 @@
#include "gc.h"
#endif
-#define HAS_EXTRA_STATES(hash, klass) ( \
- ((klass = has_extra_methods(rb_obj_class(hash))) != 0) || \
- FL_TEST((hash), FL_EXIVAR|RHASH_PROC_DEFAULT) || \
- !NIL_P(RHASH_IFNONE(hash)))
-
#define SET_DEFAULT(hash, ifnone) ( \
FL_UNSET_RAW(hash, RHASH_PROC_DEFAULT), \
RHASH_SET_IFNONE(hash, ifnone))
@@ -56,19 +70,7 @@ copy_default(struct RHash *hash, const struct RHash *hash2)
{
hash->basic.flags &= ~RHASH_PROC_DEFAULT;
hash->basic.flags |= hash2->basic.flags & RHASH_PROC_DEFAULT;
- RHASH_SET_IFNONE(hash, RHASH_IFNONE(hash2));
-}
-
-static VALUE
-has_extra_methods(VALUE klass)
-{
- const VALUE base = rb_cHash;
- VALUE c = klass;
- while (c != base) {
- if (rb_class_has_methods(c)) return klass;
- c = RCLASS_SUPER(c);
- }
- return 0;
+ RHASH_SET_IFNONE(hash, RHASH_IFNONE((VALUE)hash2));
}
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
@@ -92,9 +94,11 @@ rb_hash_freeze(VALUE hash)
VALUE rb_cHash;
static VALUE envtbl;
-static ID id_hash, id_yield, id_default, id_flatten_bang;
+static ID id_hash, id_flatten_bang;
static ID id_hash_iter_lev;
+#define id_default idDefault
+
VALUE
rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
{
@@ -107,12 +111,12 @@ rb_any_cmp(VALUE a, VALUE b)
{
if (a == b) return 0;
if (RB_TYPE_P(a, T_STRING) && RBASIC(a)->klass == rb_cString &&
- RB_TYPE_P(b, T_STRING) && RBASIC(b)->klass == rb_cString) {
- return rb_str_hash_cmp(a, b);
+ RB_TYPE_P(b, T_STRING) && RBASIC(b)->klass == rb_cString) {
+ return rb_str_hash_cmp(a, b);
}
- if (a == Qundef || b == Qundef) return -1;
+ if (UNDEF_P(a) || UNDEF_P(b)) return -1;
if (SYMBOL_P(a) && SYMBOL_P(b)) {
- return a != b;
+ return a != b;
}
return !rb_eql(a, b);
@@ -125,27 +129,6 @@ hash_recursive(VALUE obj, VALUE arg, int recurse)
return rb_funcallv(obj, id_hash, 0, 0);
}
-VALUE
-rb_hash(VALUE obj)
-{
- VALUE hval = rb_exec_recursive_outer(hash_recursive, obj, 0);
-
- while (!FIXNUM_P(hval)) {
- if (RB_TYPE_P(hval, T_BIGNUM)) {
- int sign;
- unsigned long ul;
- sign = rb_integer_pack(hval, &ul, 1, sizeof(ul), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- ul &= (1UL << (sizeof(long)*CHAR_BIT-1)) - 1;
- if (sign < 0)
- return LONG2FIX(-(long)ul);
- return LONG2FIX((long)ul);
- }
- hval = rb_to_int(hval);
- }
- return hval;
-}
-
static long rb_objid_hash(st_index_t index);
static st_index_t
@@ -174,61 +157,83 @@ any_hash(VALUE a, st_index_t (*other_func)(VALUE))
VALUE hval;
st_index_t hnum;
- if (SPECIAL_CONST_P(a)) {
- if (STATIC_SYM_P(a)) {
+ switch (TYPE(a)) {
+ case T_SYMBOL:
+ if (STATIC_SYM_P(a)) {
hnum = a >> (RUBY_SPECIAL_SHIFT + ID_SCOPE_SHIFT);
hnum = rb_hash_start(hnum);
- goto out;
}
- else if (FLONUM_P(a)) {
- /* prevent pathological behavior: [Bug #10761] */
- goto flt;
- }
- hnum = rb_objid_hash((st_index_t)a);
- }
- else if (BUILTIN_TYPE(a) == T_STRING) {
- hnum = rb_str_hash(a);
- }
- else if (BUILTIN_TYPE(a) == T_SYMBOL) {
- hnum = RSYMBOL(a)->hashval;
- }
- else if (BUILTIN_TYPE(a) == T_BIGNUM) {
- hval = rb_big_hash(a);
- hnum = FIX2LONG(hval);
- }
- else if (BUILTIN_TYPE(a) == T_FLOAT) {
- flt:
- hnum = rb_dbl_long_hash(rb_float_value(a));
- }
- else {
- hnum = other_func(a);
+ else {
+ hnum = RSYMBOL(a)->hashval;
+ }
+ break;
+ case T_FIXNUM:
+ case T_TRUE:
+ case T_FALSE:
+ case T_NIL:
+ hnum = rb_objid_hash((st_index_t)a);
+ break;
+ case T_STRING:
+ hnum = rb_str_hash(a);
+ break;
+ case T_BIGNUM:
+ hval = rb_big_hash(a);
+ hnum = FIX2LONG(hval);
+ break;
+ case T_FLOAT: /* prevent pathological behavior: [Bug #10761] */
+ hnum = rb_dbl_long_hash(rb_float_value(a));
+ break;
+ default:
+ hnum = other_func(a);
}
- out:
-#if SIZEOF_LONG < SIZEOF_ST_INDEX_T
- if (hnum > 0)
- hnum &= (unsigned long)-1 >> 2;
+ if ((SIGNED_VALUE)hnum > 0)
+ hnum &= FIXNUM_MAX;
else
- hnum |= ~((unsigned long)-1 >> 2);
-#else
- hnum <<= 1;
- hnum = RSHIFT(hnum, 1);
-#endif
+ hnum |= FIXNUM_MIN;
return (long)hnum;
}
static st_index_t
obj_any_hash(VALUE obj)
{
- obj = rb_hash(obj);
- return FIX2LONG(obj);
+ VALUE hval = rb_check_funcall_basic_kw(obj, id_hash, rb_mKernel, 0, 0, 0);
+
+ if (UNDEF_P(hval)) {
+ hval = rb_exec_recursive_outer_mid(hash_recursive, obj, 0, id_hash);
+ }
+
+ while (!FIXNUM_P(hval)) {
+ if (RB_TYPE_P(hval, T_BIGNUM)) {
+ int sign;
+ unsigned long ul;
+ sign = rb_integer_pack(hval, &ul, 1, sizeof(ul), 0,
+ INTEGER_PACK_NATIVE_BYTE_ORDER);
+ if (sign < 0) {
+ hval = LONG2FIX(ul | FIXNUM_MIN);
+ }
+ else {
+ hval = LONG2FIX(ul & FIXNUM_MAX);
+ }
+ }
+ hval = rb_to_int(hval);
+ }
+
+ return FIX2LONG(hval);
}
-static st_index_t
+st_index_t
rb_any_hash(VALUE a)
{
return any_hash(a, obj_any_hash);
}
+VALUE
+rb_hash(VALUE obj)
+{
+ return LONG2FIX(any_hash(obj, obj_any_hash));
+}
+
+
/* Here is a hash function for 64-bit key. It is about 5 times faster
(2 times faster when uint128 type is absent) on Haswell than
tailored Spooky or City hash function can be. */
@@ -299,6 +304,22 @@ objid_hash(VALUE obj)
* implementations of Ruby. If you need a stable identifier across Ruby
* invocations and implementations you will need to generate one with a custom
* method.
+ *
+ * Certain core classes such as Integer use built-in hash calculations and
+ * do not call the #hash method when used as a hash key.
+ *
+ * When implementing your own #hash based on multiple values, the best
+ * practice is to combine the class and any values using the hash code of an
+ * array:
+ *
+ * For example:
+ *
+ * def hash
+ * [self.class, a, b, c].hash
+ * end
+ *
+ * The reason for this is that the Array#hash method already has logic for
+ * safely and efficiently combining multiple hash values.
*--
* \private
*++
@@ -340,6 +361,9 @@ const struct st_hash_type rb_hashtype_ident = {
rb_ident_hash,
};
+#define RHASH_IDENTHASH_P(hash) (RHASH_TYPE(hash) == &identhash)
+#define RHASH_STRING_KEY_P(hash, key) (!RHASH_IDENTHASH_P(hash) && (rb_obj_class(key) == rb_cString))
+
typedef st_index_t st_hash_t;
/*
@@ -419,7 +443,7 @@ ar_cleared_entry(VALUE hash, unsigned int index)
* so you need to check key == Qundef
*/
ar_table_pair *pair = RHASH_AR_TABLE_REF(hash, index);
- return pair->key == Qundef;
+ return UNDEF_P(pair->key);
}
else {
return FALSE;
@@ -499,8 +523,8 @@ hash_verify_(VALUE hash, const char *file, int line)
ar_table_pair *pair = RHASH_AR_TABLE_REF(hash, i);
k = pair->key;
v = pair->val;
- HASH_ASSERT(k != Qundef);
- HASH_ASSERT(v != Qundef);
+ HASH_ASSERT(!UNDEF_P(k));
+ HASH_ASSERT(!UNDEF_P(v));
n++;
}
}
@@ -514,11 +538,13 @@ hash_verify_(VALUE hash, const char *file, int line)
HASH_ASSERT(RHASH_AR_TABLE_BOUND_RAW(hash) == 0);
}
+#if USE_TRANSIENT_HEAP
if (RHASH_TRANSIENT_P(hash)) {
volatile st_data_t MAYBE_UNUSED(key) = RHASH_AR_TABLE_REF(hash, 0)->key; /* read */
HASH_ASSERT(RHASH_AR_TABLE(hash) != NULL);
HASH_ASSERT(rb_transient_heap_managed_ptr_p(RHASH_AR_TABLE(hash)));
}
+#endif
return hash;
}
@@ -744,28 +770,39 @@ ar_free_and_clear_table(VALUE hash)
HASH_ASSERT(RHASH_TRANSIENT_P(hash) == 0);
}
-static void
-ar_try_convert_table(VALUE hash)
-{
- st_table *new_tab;
- const unsigned size = RHASH_AR_TABLE_SIZE(hash);
- st_index_t i;
+void rb_st_add_direct_with_hash(st_table *tab, st_data_t key, st_data_t value, st_hash_t hash); // st.c
- if (!RHASH_AR_TABLE_P(hash) || size < RHASH_AR_TABLE_MAX_SIZE) {
- return;
- }
-
- new_tab = st_init_table_with_size(&objhash, size * 2);
+enum ar_each_key_type {
+ ar_each_key_copy,
+ ar_each_key_cmp,
+ ar_each_key_insert,
+};
- for (i = 0; i < RHASH_AR_TABLE_MAX_BOUND; i++) {
- ar_table_pair *pair = RHASH_AR_TABLE_REF(hash, i);
- st_add_direct(new_tab, pair->key, pair->val);
+static inline int
+ar_each_key(ar_table *ar, int max, enum ar_each_key_type type, st_data_t *dst_keys, st_table *new_tab, st_hash_t *hashes)
+{
+ for (int i = 0; i < max; i++) {
+ ar_table_pair *pair = &ar->pairs[i];
+
+ switch (type) {
+ case ar_each_key_copy:
+ dst_keys[i] = pair->key;
+ break;
+ case ar_each_key_cmp:
+ if (dst_keys[i] != pair->key) return 1;
+ break;
+ case ar_each_key_insert:
+ if (UNDEF_P(pair->key)) continue; // deleted entry
+ rb_st_add_direct_with_hash(new_tab, pair->key, pair->val, hashes[i]);
+ break;
+ }
}
- ar_free_and_clear_table(hash);
- RHASH_ST_TABLE_SET(hash, new_tab);
- return;
+
+ return 0;
}
+
+
static st_table *
ar_force_convert_table(VALUE hash, const char *file, int line)
{
@@ -776,22 +813,32 @@ ar_force_convert_table(VALUE hash, const char *file, int line)
}
if (RHASH_AR_TABLE(hash)) {
- unsigned i, bound = RHASH_AR_TABLE_BOUND(hash);
+ ar_table *ar = RHASH_AR_TABLE(hash);
+ st_hash_t hashes[RHASH_AR_TABLE_MAX_SIZE];
+ unsigned int bound, size;
+
+ // prepare hash values
+ do {
+ st_data_t keys[RHASH_AR_TABLE_MAX_SIZE];
+ bound = RHASH_AR_TABLE_BOUND(hash);
+ size = RHASH_AR_TABLE_SIZE(hash);
+ ar_each_key(ar, bound, ar_each_key_copy, keys, NULL, NULL);
+
+ for (unsigned int i = 0; i < bound; i++) {
+ // do_hash calls #hash method and it can modify hash object
+ hashes[i] = UNDEF_P(keys[i]) ? 0 : ar_do_hash(keys[i]);
+ }
-#if RHASH_CONVERT_TABLE_DEBUG
- rb_obj_info_dump(hash);
- fprintf(stderr, "force_convert: %s:%d\n", file, line);
- RB_DEBUG_COUNTER_INC(obj_hash_force_convert);
-#endif
+ // check if modified
+ if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) return RHASH_ST_TABLE(hash);
+ if (UNLIKELY(RHASH_AR_TABLE_BOUND(hash) != bound)) continue;
+ if (UNLIKELY(ar_each_key(ar, bound, ar_each_key_cmp, keys, NULL, NULL))) continue;
+ } while (0);
- new_tab = st_init_table_with_size(&objhash, RHASH_AR_TABLE_SIZE(hash));
- for (i = 0; i < bound; i++) {
- if (ar_cleared_entry(hash, i)) continue;
-
- ar_table_pair *pair = RHASH_AR_TABLE_REF(hash, i);
- st_add_direct(new_tab, pair->key, pair->val);
- }
+ // make st
+ new_tab = st_init_table_with_size(&objhash, size);
+ ar_each_key(ar, bound, ar_each_key_insert, NULL, new_tab, hashes);
ar_free_and_clear_table(hash);
}
else {
@@ -940,7 +987,7 @@ ar_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg)
static int
ar_foreach_check(VALUE hash, st_foreach_check_callback_func *func, st_data_t arg,
- st_data_t never)
+ st_data_t never)
{
if (RHASH_AR_TABLE_SIZE(hash) > 0) {
unsigned i, ret = 0, bound = RHASH_AR_TABLE_BOUND(hash);
@@ -961,12 +1008,13 @@ ar_foreach_check(VALUE hash, st_foreach_check_callback_func *func, st_data_t arg
switch (retval) {
case ST_CHECK: {
- if (pair->key == never) break;
- ret = ar_find_entry_hint(hash, hint, key);
- if (ret == RHASH_AR_TABLE_MAX_BOUND) {
- retval = (*func)(0, 0, arg, 1);
- return 2;
- }
+ pair = RHASH_AR_TABLE_REF(hash, i);
+ if (pair->key == never) break;
+ ret = ar_find_entry_hint(hash, hint, key);
+ if (ret == RHASH_AR_TABLE_MAX_BOUND) {
+ retval = (*func)(0, 0, arg, 1);
+ return 2;
+ }
}
case ST_CONTINUE:
break;
@@ -974,11 +1022,11 @@ ar_foreach_check(VALUE hash, st_foreach_check_callback_func *func, st_data_t arg
case ST_REPLACE:
return 0;
case ST_DELETE: {
- if (!ar_cleared_entry(hash, i)) {
- ar_clear_entry(hash, i);
- RHASH_AR_TABLE_SIZE_DEC(hash);
- }
- break;
+ if (!ar_cleared_entry(hash, i)) {
+ ar_clear_entry(hash, i);
+ RHASH_AR_TABLE_SIZE_DEC(hash);
+ }
+ break;
}
}
}
@@ -995,6 +1043,11 @@ ar_update(VALUE hash, st_data_t key,
st_data_t value = 0, old_key;
st_hash_t hash_value = ar_do_hash(key);
+ if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) {
+ // `#hash` changes ar_table -> st_table
+ return -1;
+ }
+
if (RHASH_AR_TABLE_SIZE(hash) > 0) {
bin = ar_find_entry(hash, hash_value, key);
existing = (bin != RHASH_AR_TABLE_MAX_BOUND) ? TRUE : FALSE;
@@ -1044,6 +1097,11 @@ ar_insert(VALUE hash, st_data_t key, st_data_t value)
unsigned bin = RHASH_AR_TABLE_BOUND(hash);
st_hash_t hash_value = ar_do_hash(key);
+ if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) {
+ // `#hash` changes ar_table -> st_table
+ return -1;
+ }
+
hash_ar_table(hash); /* prepare ltbl */
bin = ar_find_entry(hash, hash_value, key);
@@ -1076,6 +1134,10 @@ ar_lookup(VALUE hash, st_data_t key, st_data_t *value)
}
else {
st_hash_t hash_value = ar_do_hash(key);
+ if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) {
+ // `#hash` changes ar_table -> st_table
+ return st_lookup(RHASH_ST_TABLE(hash), key, value);
+ }
unsigned bin = ar_find_entry(hash, hash_value, key);
if (bin == RHASH_AR_TABLE_MAX_BOUND) {
@@ -1097,6 +1159,10 @@ ar_delete(VALUE hash, st_data_t *key, st_data_t *value)
unsigned bin;
st_hash_t hash_value = ar_do_hash(*key);
+ if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) {
+ // `#hash` changes ar_table -> st_table
+ return st_delete(RHASH_ST_TABLE(hash), key, value);
+ }
bin = ar_find_entry(hash, hash_value, *key);
@@ -1242,19 +1308,17 @@ rb_hash_transient_heap_evacuate(VALUE hash, int promote)
ar_table *old_tab = RHASH_AR_TABLE(hash);
if (UNLIKELY(old_tab == NULL)) {
- rb_gc_force_recycle(hash);
return;
}
HASH_ASSERT(old_tab != NULL);
+ if (! promote) {
+ new_tab = rb_transient_heap_alloc(hash, sizeof(ar_table));
+ if (new_tab == NULL) promote = true;
+ }
if (promote) {
- promote:
new_tab = ruby_xmalloc(sizeof(ar_table));
RHASH_UNSET_TRANSIENT_FLAG(hash);
}
- else {
- new_tab = rb_transient_heap_alloc(hash, sizeof(ar_table));
- if (new_tab == NULL) goto promote;
- }
*new_tab = *old_tab;
hash_ar_table_set(hash, new_tab);
}
@@ -1279,7 +1343,7 @@ foreach_safe_i(st_data_t key, st_data_t value, st_data_t args, int error)
if (error) return ST_STOP;
status = (*arg->func)(key, value, arg->arg);
if (status == ST_CONTINUE) {
- return ST_CHECK;
+ return ST_CHECK;
}
return status;
}
@@ -1293,7 +1357,7 @@ st_foreach_safe(st_table *table, st_foreach_func *func, st_data_t a)
arg.func = (st_foreach_func *)func;
arg.arg = a;
if (st_foreach_check(table, foreach_safe_i, (st_data_t)&arg, 0)) {
- rb_raise(rb_eRuntimeError, "hash modified during iteration");
+ rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
}
@@ -1306,15 +1370,8 @@ struct hash_foreach_arg {
};
static int
-hash_ar_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
+hash_iter_status_check(int status)
{
- struct hash_foreach_arg *arg = (struct hash_foreach_arg *)argp;
- int status;
-
- if (error) return ST_STOP;
- status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
- /* TODO: rehash check? rb_raise(rb_eRuntimeError, "rehash occurred during iteration"); */
-
switch (status) {
case ST_DELETE:
return ST_DELETE;
@@ -1323,31 +1380,38 @@ hash_ar_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
case ST_STOP:
return ST_STOP;
}
+
return ST_CHECK;
}
static int
+hash_ar_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
+{
+ struct hash_foreach_arg *arg = (struct hash_foreach_arg *)argp;
+
+ if (error) return ST_STOP;
+
+ int status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
+ /* TODO: rehash check? rb_raise(rb_eRuntimeError, "rehash occurred during iteration"); */
+
+ return hash_iter_status_check(status);
+}
+
+static int
hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
{
struct hash_foreach_arg *arg = (struct hash_foreach_arg *)argp;
- int status;
- st_table *tbl;
if (error) return ST_STOP;
- tbl = RHASH_ST_TABLE(arg->hash);
- status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
+
+ st_table *tbl = RHASH_ST_TABLE(arg->hash);
+ int status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
+
if (RHASH_ST_TABLE(arg->hash) != tbl) {
- rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
- }
- switch (status) {
- case ST_DELETE:
- return ST_DELETE;
- case ST_CONTINUE:
- break;
- case ST_STOP:
- return ST_STOP;
+ rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
}
- return ST_CHECK;
+
+ return hash_iter_status_check(status);
}
static int
@@ -1366,13 +1430,19 @@ iter_lev_in_ivar_set(VALUE hash, int lev)
rb_ivar_set_internal(hash, id_hash_iter_lev, INT2FIX(lev));
}
-static int
+static inline int
iter_lev_in_flags(VALUE hash)
{
unsigned int u = (unsigned int)((RBASIC(hash)->flags >> RHASH_LEV_SHIFT) & RHASH_LEV_MAX);
return (int)u;
}
+static inline void
+iter_lev_in_flags_set(VALUE hash, int lev)
+{
+ RBASIC(hash)->flags = ((RBASIC(hash)->flags & ~RHASH_LEV_MASK) | ((VALUE)lev << RHASH_LEV_SHIFT));
+}
+
static int
RHASH_ITER_LEV(VALUE hash)
{
@@ -1396,7 +1466,7 @@ hash_iter_lev_inc(VALUE hash)
}
else {
lev += 1;
- RBASIC(hash)->flags = ((RBASIC(hash)->flags & ~RHASH_LEV_MASK) | (lev << RHASH_LEV_SHIFT));
+ iter_lev_in_flags_set(hash, lev);
if (lev == RHASH_LEV_MAX) {
iter_lev_in_ivar_set(hash, lev);
}
@@ -1414,7 +1484,7 @@ hash_iter_lev_dec(VALUE hash)
}
else {
HASH_ASSERT(lev > 0);
- RBASIC(hash)->flags = ((RBASIC(hash)->flags & ~RHASH_LEV_MASK) | ((lev-1) << RHASH_LEV_SHIFT));
+ iter_lev_in_flags_set(hash, lev - 1);
}
}
@@ -1480,14 +1550,29 @@ rb_hash_foreach(VALUE hash, rb_foreach_func *func, VALUE farg)
if (RHASH_TABLE_EMPTY_P(hash))
return;
- hash_iter_lev_inc(hash);
arg.hash = hash;
arg.func = (rb_foreach_func *)func;
arg.arg = farg;
- rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
+ if (RB_OBJ_FROZEN(hash)) {
+ hash_foreach_call((VALUE)&arg);
+ }
+ else {
+ hash_iter_lev_inc(hash);
+ rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
+ }
hash_verify(hash);
}
+void rb_st_compact_table(st_table *tab);
+
+static void
+compact_after_delete(VALUE hash)
+{
+ if (RHASH_ITER_LEV(hash) == 0 && RHASH_ST_TABLE_P(hash)) {
+ rb_st_compact_table(RHASH_ST_TABLE(hash));
+ }
+}
+
static VALUE
hash_alloc_flags(VALUE klass, VALUE flags, VALUE ifnone)
{
@@ -1519,6 +1604,15 @@ rb_hash_new(void)
return hash_alloc(rb_cHash);
}
+static VALUE
+copy_compare_by_id(VALUE hash, VALUE basis)
+{
+ if (rb_hash_compare_by_id_p(basis)) {
+ return rb_hash_compare_by_id(hash);
+ }
+ return hash;
+}
+
MJIT_FUNC_EXPORTED VALUE
rb_hash_new_with_size(st_index_t size)
{
@@ -1535,11 +1629,15 @@ rb_hash_new_with_size(st_index_t size)
return ret;
}
+VALUE
+rb_hash_new_capa(long capa)
+{
+ return rb_hash_new_with_size((st_index_t)capa);
+}
+
static VALUE
-hash_dup(VALUE hash, VALUE klass, VALUE flags)
+hash_copy(VALUE ret, VALUE hash)
{
- VALUE ret = hash_alloc_flags(klass, flags,
- RHASH_IFNONE(hash));
if (!RHASH_EMPTY_P(hash)) {
if (RHASH_AR_TABLE_P(hash))
ar_copy(ret, hash);
@@ -1549,6 +1647,19 @@ hash_dup(VALUE hash, VALUE klass, VALUE flags)
return ret;
}
+static VALUE
+hash_dup_with_compare_by_id(VALUE hash)
+{
+ return hash_copy(copy_compare_by_id(rb_hash_new(), hash), hash);
+}
+
+static VALUE
+hash_dup(VALUE hash, VALUE klass, VALUE flags)
+{
+ return hash_copy(hash_alloc_flags(klass, flags, RHASH_IFNONE(hash)),
+ hash);
+}
+
VALUE
rb_hash_dup(VALUE hash)
{
@@ -1574,23 +1685,16 @@ rb_hash_modify_check(VALUE hash)
}
MJIT_FUNC_EXPORTED struct st_table *
-#if RHASH_CONVERT_TABLE_DEBUG
rb_hash_tbl_raw(VALUE hash, const char *file, int line)
{
return ar_force_convert_table(hash, file, line);
}
-#else
-rb_hash_tbl_raw(VALUE hash)
-{
- return ar_force_convert_table(hash, NULL, 0);
-}
-#endif
struct st_table *
rb_hash_tbl(VALUE hash, const char *file, int line)
{
OBJ_WB_UNPROTECT(hash);
- return RHASH_TBL_RAW(hash);
+ return rb_hash_tbl_raw(hash, file, line);
}
static void
@@ -1627,51 +1731,75 @@ func##_insert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
struct update_arg {
st_data_t arg;
+ st_update_callback_func *func;
VALUE hash;
- VALUE new_key;
- VALUE old_key;
- VALUE new_value;
- VALUE old_value;
+ VALUE key;
+ VALUE value;
};
typedef int (*tbl_update_func)(st_data_t *, st_data_t *, st_data_t, int);
int
-rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func func, st_data_t arg)
+rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg)
{
if (RHASH_AR_TABLE_P(hash)) {
- int result = ar_update(hash, (st_data_t)key, func, arg);
+ int result = ar_update(hash, key, func, arg);
if (result == -1) {
- ar_try_convert_table(hash);
+ ar_force_convert_table(hash, __FILE__, __LINE__);
}
else {
return result;
}
}
- return st_update(RHASH_ST_TABLE(hash), (st_data_t)key, func, arg);
+ return st_update(RHASH_ST_TABLE(hash), key, func, arg);
+}
+
+static int
+tbl_update_modify(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
+{
+ struct update_arg *p = (struct update_arg *)arg;
+ st_data_t old_key = *key;
+ st_data_t old_value = *val;
+ VALUE hash = p->hash;
+ int ret = (p->func)(key, val, arg, existing);
+ switch (ret) {
+ default:
+ break;
+ case ST_CONTINUE:
+ if (!existing || *key != old_key || *val != old_value) {
+ rb_hash_modify(hash);
+ p->key = *key;
+ p->value = *val;
+ }
+ break;
+ case ST_DELETE:
+ if (existing)
+ rb_hash_modify(hash);
+ break;
+ }
+
+ return ret;
}
static int
tbl_update(VALUE hash, VALUE key, tbl_update_func func, st_data_t optional_arg)
{
- struct update_arg arg;
- int result;
-
- arg.arg = optional_arg;
- arg.hash = hash;
- arg.new_key = 0;
- arg.old_key = Qundef;
- arg.new_value = 0;
- arg.old_value = Qundef;
+ struct update_arg arg = {
+ .arg = optional_arg,
+ .func = func,
+ .hash = hash,
+ .key = key,
+ .value = (VALUE)optional_arg,
+ };
- result = rb_hash_stlike_update(hash, key, func, (st_data_t)&arg);
+ int ret = rb_hash_stlike_update(hash, key, tbl_update_modify, (st_data_t)&arg);
/* write barrier */
- if (arg.new_key) RB_OBJ_WRITTEN(hash, arg.old_key, arg.new_key);
- if (arg.new_value) RB_OBJ_WRITTEN(hash, arg.old_value, arg.new_value);
+ RB_OBJ_WRITTEN(hash, Qundef, arg.key);
+ RB_OBJ_WRITTEN(hash, Qundef, arg.value);
- return result;
+ return ret;
}
#define UPDATE_CALLBACK(iter_lev, func) ((iter_lev) > 0 ? func##_noinsert : func##_insert)
@@ -1687,12 +1815,12 @@ static void
set_proc_default(VALUE hash, VALUE proc)
{
if (rb_proc_lambda_p(proc)) {
- int n = rb_proc_arity(proc);
+ int n = rb_proc_arity(proc);
- if (n != 2 && (n >= 0 || n < -3)) {
- if (n < 0) n = -n-1;
- rb_raise(rb_eTypeError, "default_proc takes two arguments (2 for %d)", n);
- }
+ if (n != 2 && (n >= 0 || n < -3)) {
+ if (n < 0) n = -n-1;
+ rb_raise(rb_eTypeError, "default_proc takes two arguments (2 for %d)", n);
+ }
}
FL_SET_RAW(hash, RHASH_PROC_DEFAULT);
@@ -1701,37 +1829,33 @@ set_proc_default(VALUE hash, VALUE proc)
/*
* call-seq:
- * Hash.new -> new_hash
- * Hash.new(obj) -> new_hash
- * Hash.new {|hash, key| block } -> new_hash
- *
- * Returns a new, empty hash. If this hash is subsequently accessed by
- * a key that doesn't correspond to a hash entry, the value returned
- * depends on the style of <code>new</code> used to create the hash. In
- * the first form, the access returns <code>nil</code>. If
- * <i>obj</i> is specified, this single object will be used for
- * all <em>default values</em>. If a block is specified, it will be
- * called with the hash object and the key, and should return the
- * default value. It is the block's responsibility to store the value
- * in the hash if required.
- *
- * h = Hash.new("Go Fish")
- * h["a"] = 100
- * h["b"] = 200
- * h["a"] #=> 100
- * h["c"] #=> "Go Fish"
- * # The following alters the single default object
- * h["c"].upcase! #=> "GO FISH"
- * h["d"] #=> "GO FISH"
- * h.keys #=> ["a", "b"]
- *
- * # While this creates a new default object each time
- * h = Hash.new { |hash, key| hash[key] = "Go Fish: #{key}" }
- * h["c"] #=> "Go Fish: c"
- * h["c"].upcase! #=> "GO FISH: C"
- * h["d"] #=> "Go Fish: d"
- * h.keys #=> ["c", "d"]
- *
+ * Hash.new(default_value = nil) -> new_hash
+ * Hash.new {|hash, key| ... } -> new_hash
+ *
+ * Returns a new empty \Hash object.
+ *
+ * The initial default value and initial default proc for the new hash
+ * depend on which form above was used. See {Default Values}[rdoc-ref:Hash@Default+Values].
+ *
+ * If neither an argument nor a block given,
+ * initializes both the default value and the default proc to <tt>nil</tt>:
+ * h = Hash.new
+ * h.default # => nil
+ * h.default_proc # => nil
+ *
+ * If argument <tt>default_value</tt> given but no block given,
+ * initializes the default value to the given <tt>default_value</tt>
+ * and the default proc to <tt>nil</tt>:
+ * h = Hash.new(false)
+ * h.default # => false
+ * h.default_proc # => nil
+ *
+ * If a block given but no argument, stores the block as the default proc
+ * and sets the default value to <tt>nil</tt>:
+ * h = Hash.new {|hash, key| "Default value for #{key}" }
+ * h.default # => nil
+ * h.default_proc.class # => Proc
+ * h[:nosuch] # => "Default value for nosuch"
*/
static VALUE
@@ -1741,14 +1865,14 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
rb_hash_modify(hash);
if (rb_block_given_p()) {
- rb_check_arity(argc, 0, 0);
- ifnone = rb_block_proc();
- SET_PROC_DEFAULT(hash, ifnone);
+ rb_check_arity(argc, 0, 0);
+ ifnone = rb_block_proc();
+ SET_PROC_DEFAULT(hash, ifnone);
}
else {
- rb_check_arity(argc, 0, 1);
- ifnone = argc == 0 ? Qnil : argv[0];
- RHASH_SET_IFNONE(hash, ifnone);
+ rb_check_arity(argc, 0, 1);
+ ifnone = argc == 0 ? Qnil : argv[0];
+ RHASH_SET_IFNONE(hash, ifnone);
}
return hash;
@@ -1756,22 +1880,37 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
/*
* call-seq:
- * Hash[ key, value, ... ] -> new_hash
- * Hash[ [ [key, value], ... ] ] -> new_hash
- * Hash[ object ] -> new_hash
+ * Hash[] -> new_empty_hash
+ * Hash[hash] -> new_hash
+ * Hash[ [*2_element_arrays] ] -> new_hash
+ * Hash[*objects] -> new_hash
+ *
+ * Returns a new \Hash object populated with the given objects, if any.
+ * See Hash::new.
+ *
+ * With no argument, returns a new empty \Hash.
+ *
+ * When the single given argument is a \Hash, returns a new \Hash
+ * populated with the entries from the given \Hash, excluding the
+ * default value or proc.
+ *
+ * h = {foo: 0, bar: 1, baz: 2}
+ * Hash[h] # => {:foo=>0, :bar=>1, :baz=>2}
*
- * Creates a new hash populated with the given objects.
+ * When the single given argument is an \Array of 2-element Arrays,
+ * returns a new \Hash object wherein each 2-element array forms a
+ * key-value entry:
*
- * Similar to the literal <code>{ _key_ => _value_, ... }</code>. In the first
- * form, keys and values occur in pairs, so there must be an even number of
- * arguments.
+ * Hash[ [ [:foo, 0], [:bar, 1] ] ] # => {:foo=>0, :bar=>1}
*
- * The second and third form take a single argument which is either an array
- * of key-value pairs or an object convertible to a hash.
+ * When the argument count is an even number;
+ * returns a new \Hash object wherein each successive pair of arguments
+ * has become a key-value entry:
*
- * Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
- * Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
- * Hash["a" => 100, "b" => 200] #=> {"a"=>100, "b"=>200}
+ * Hash[:foo, 0, :bar, 1] # => {:foo=>0, :bar=>1}
+ *
+ * Raises an exception if the argument list does not conform to any
+ * of the above.
*/
static VALUE
@@ -1781,47 +1920,42 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
if (argc == 1) {
tmp = rb_hash_s_try_convert(Qnil, argv[0]);
- if (!NIL_P(tmp)) {
- hash = hash_alloc(klass);
- if (RHASH_AR_TABLE_P(tmp)) {
- ar_copy(hash, tmp);
- }
- else {
- RHASH_ST_TABLE_SET(hash, st_copy(RHASH_ST_TABLE(tmp)));
+ if (!NIL_P(tmp)) {
+ hash = hash_alloc(klass);
+ hash_copy(hash, tmp);
+ return hash;
+ }
+
+ tmp = rb_check_array_type(argv[0]);
+ if (!NIL_P(tmp)) {
+ long i;
+
+ hash = hash_alloc(klass);
+ for (i = 0; i < RARRAY_LEN(tmp); ++i) {
+ VALUE e = RARRAY_AREF(tmp, i);
+ VALUE v = rb_check_array_type(e);
+ VALUE key, val = Qnil;
+
+ if (NIL_P(v)) {
+ rb_raise(rb_eArgError, "wrong element type %s at %ld (expected array)",
+ rb_builtin_class_name(e), i);
+ }
+ switch (RARRAY_LEN(v)) {
+ default:
+ rb_raise(rb_eArgError, "invalid number of elements (%ld for 1..2)",
+ RARRAY_LEN(v));
+ case 2:
+ val = RARRAY_AREF(v, 1);
+ case 1:
+ key = RARRAY_AREF(v, 0);
+ rb_hash_aset(hash, key, val);
+ }
}
- return hash;
- }
-
- tmp = rb_check_array_type(argv[0]);
- if (!NIL_P(tmp)) {
- long i;
-
- hash = hash_alloc(klass);
- for (i = 0; i < RARRAY_LEN(tmp); ++i) {
- VALUE e = RARRAY_AREF(tmp, i);
- VALUE v = rb_check_array_type(e);
- VALUE key, val = Qnil;
-
- if (NIL_P(v)) {
- rb_raise(rb_eArgError, "wrong element type %s at %ld (expected array)",
- rb_builtin_class_name(e), i);
- }
- switch (RARRAY_LEN(v)) {
- default:
- rb_raise(rb_eArgError, "invalid number of elements (%ld for 1..2)",
- RARRAY_LEN(v));
- case 2:
- val = RARRAY_AREF(v, 1);
- case 1:
- key = RARRAY_AREF(v, 0);
- rb_hash_aset(hash, key, val);
- }
- }
- return hash;
- }
+ return hash;
+ }
}
if (argc % 2 != 0) {
- rb_raise(rb_eArgError, "odd number of arguments for Hash");
+ rb_raise(rb_eArgError, "odd number of arguments for Hash");
}
hash = hash_alloc(klass);
@@ -1830,7 +1964,7 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
return hash;
}
-VALUE
+MJIT_FUNC_EXPORTED VALUE
rb_to_hash_type(VALUE hash)
{
return rb_convert_type_with_id(hash, T_HASH, "Hash", idTo_hash);
@@ -1845,14 +1979,16 @@ rb_check_hash_type(VALUE hash)
/*
* call-seq:
- * Hash.try_convert(obj) -> hash or nil
+ * Hash.try_convert(obj) -> obj, new_hash, or nil
+ *
+ * If +obj+ is a \Hash object, returns +obj+.
+ *
+ * Otherwise if +obj+ responds to <tt>:to_hash</tt>,
+ * calls <tt>obj.to_hash</tt> and returns the result.
*
- * Try to convert <i>obj</i> into a hash, using to_hash method.
- * Returns converted hash or nil if <i>obj</i> cannot be converted
- * for any reason.
+ * Returns +nil+ if +obj+ does not respond to <tt>:to_hash</tt>
*
- * Hash.try_convert({1=>2}) # => {1=>2}
- * Hash.try_convert("1=>2") # => nil
+ * Raises an exception unless <tt>obj.to_hash</tt> returns a \Hash object.
*/
static VALUE
rb_hash_s_try_convert(VALUE dummy, VALUE hash)
@@ -1860,6 +1996,52 @@ rb_hash_s_try_convert(VALUE dummy, VALUE hash)
return rb_check_hash_type(hash);
}
+/*
+ * call-seq:
+ * Hash.ruby2_keywords_hash?(hash) -> true or false
+ *
+ * Checks if a given hash is flagged by Module#ruby2_keywords (or
+ * Proc#ruby2_keywords).
+ * This method is not for casual use; debugging, researching, and
+ * some truly necessary cases like serialization of arguments.
+ *
+ * ruby2_keywords def foo(*args)
+ * Hash.ruby2_keywords_hash?(args.last)
+ * end
+ * foo(k: 1) #=> true
+ * foo({k: 1}) #=> false
+ */
+static VALUE
+rb_hash_s_ruby2_keywords_hash_p(VALUE dummy, VALUE hash)
+{
+ Check_Type(hash, T_HASH);
+ return RBOOL(RHASH(hash)->basic.flags & RHASH_PASS_AS_KEYWORDS);
+}
+
+/*
+ * call-seq:
+ * Hash.ruby2_keywords_hash(hash) -> hash
+ *
+ * Duplicates a given hash and adds a ruby2_keywords flag.
+ * This method is not for casual use; debugging, researching, and
+ * some truly necessary cases like deserialization of arguments.
+ *
+ * h = {k: 1}
+ * h = Hash.ruby2_keywords_hash(h)
+ * def foo(k: 42)
+ * k
+ * end
+ * foo(*[h]) #=> 1 with neither a warning or an error
+ */
+static VALUE
+rb_hash_s_ruby2_keywords_hash(VALUE dummy, VALUE hash)
+{
+ Check_Type(hash, T_HASH);
+ hash = rb_hash_dup(hash);
+ RHASH(hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
+ return hash;
+}
+
struct rehash_arg {
VALUE hash;
st_table *tbl;
@@ -1879,22 +2061,14 @@ rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
/*
* call-seq:
- * hsh.rehash -> hsh
- *
- * Rebuilds the hash based on the current hash values for each key. If
- * values of key objects have changed since they were inserted, this
- * method will reindex <i>hsh</i>. If Hash#rehash is
- * called while an iterator is traversing the hash, a
- * RuntimeError will be raised in the iterator.
- *
- * a = [ "a", "b" ]
- * c = [ "c", "d" ]
- * h = { a => 100, c => 300 }
- * h[a] #=> 100
- * a[0] = "z"
- * h[a] #=> nil
- * h.rehash #=> {["z", "b"]=>100, ["c", "d"]=>300}
- * h[a] #=> 100
+ * hash.rehash -> self
+ *
+ * Rebuilds the hash table by recomputing the hash index for each key;
+ * returns <tt>self</tt>.
+ *
+ * The hash table becomes invalid if the hash value of a key
+ * has changed after the entry was created.
+ * See {Modifying an Active Hash Key}[rdoc-ref:Hash@Modifying+an+Active+Hash+Key].
*/
VALUE
@@ -1904,7 +2078,7 @@ rb_hash_rehash(VALUE hash)
st_table *tbl;
if (RHASH_ITER_LEV(hash) > 0) {
- rb_raise(rb_eRuntimeError, "rehash during iteration");
+ rb_raise(rb_eRuntimeError, "rehash during iteration");
}
rb_hash_modify_check(hash);
if (RHASH_AR_TABLE_P(hash)) {
@@ -1929,17 +2103,38 @@ rb_hash_rehash(VALUE hash)
return hash;
}
+static VALUE
+call_default_proc(VALUE proc, VALUE hash, VALUE key)
+{
+ VALUE args[2] = {hash, key};
+ return rb_proc_call_with_block(proc, 2, args, Qnil);
+}
+
+static bool
+rb_hash_default_unredefined(VALUE hash)
+{
+ VALUE klass = RBASIC_CLASS(hash);
+ if (LIKELY(klass == rb_cHash)) {
+ return !!BASIC_OP_UNREDEFINED_P(BOP_DEFAULT, HASH_REDEFINED_OP_FLAG);
+ }
+ else {
+ return LIKELY(rb_method_basic_definition_p(klass, id_default));
+ }
+}
+
VALUE
rb_hash_default_value(VALUE hash, VALUE key)
{
- if (rb_method_basic_definition_p(CLASS_OF(hash), id_default)) {
- VALUE ifnone = RHASH_IFNONE(hash);
- if (!FL_TEST(hash, RHASH_PROC_DEFAULT)) return ifnone;
- if (key == Qundef) return Qnil;
- return rb_funcall(ifnone, id_yield, 2, hash, key);
+ RUBY_ASSERT(RB_TYPE_P(hash, T_HASH));
+
+ if (LIKELY(rb_hash_default_unredefined(hash))) {
+ VALUE ifnone = RHASH_IFNONE(hash);
+ if (LIKELY(!FL_TEST_RAW(hash, RHASH_PROC_DEFAULT))) return ifnone;
+ if (UNDEF_P(key)) return Qnil;
+ return call_default_proc(ifnone, hash, key);
}
else {
- return rb_funcall(hash, id_default, 1, key);
+ return rb_funcall(hash, id_default, 1, key);
}
}
@@ -1964,16 +2159,16 @@ rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval)
/*
* call-seq:
- * hsh[key] -> value
- *
- * Element Reference---Retrieves the <i>value</i> object corresponding
- * to the <i>key</i> object. If not found, returns the default value (see
- * Hash::new for details).
+ * hash[key] -> value
*
- * h = { "a" => 100, "b" => 200 }
- * h["a"] #=> 100
- * h["c"] #=> nil
+ * Returns the value associated with the given +key+, if found:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h[:foo] # => 0
*
+ * If +key+ is not found, returns a default value
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h[:nosuch] # => nil
*/
VALUE
@@ -2010,31 +2205,25 @@ rb_hash_lookup(VALUE hash, VALUE key)
/*
* call-seq:
- * hsh.fetch(key [, default] ) -> obj
- * hsh.fetch(key) {| key | block } -> obj
- *
- * Returns a value from the hash for the given key. If the key can't be
- * found, there are several options: With no other arguments, it will
- * raise a KeyError exception; if <i>default</i> is given,
- * then that will be returned; if the optional code block is specified,
- * then that will be run and its result returned.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.fetch("a") #=> 100
- * h.fetch("z", "go fish") #=> "go fish"
- * h.fetch("z") { |el| "go fish, #{el}"} #=> "go fish, z"
+ * hash.fetch(key) -> object
+ * hash.fetch(key, default_value) -> object
+ * hash.fetch(key) {|key| ... } -> object
*
- * The following example shows that an exception is raised if the key
- * is not found and a default value is not supplied.
+ * Returns the value for the given +key+, if found.
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.fetch(:bar) # => 1
*
- * h = { "a" => 100, "b" => 200 }
- * h.fetch("z")
+ * If +key+ is not found and no block was given,
+ * returns +default_value+:
+ * {}.fetch(:nosuch, :default) # => :default
*
- * <em>produces:</em>
+ * If +key+ is not found and a block was given,
+ * yields +key+ to the block and returns the block's return value:
+ * {}.fetch(:nosuch) {|key| "No key #{key}"} # => "No key nosuch"
*
- * prog.rb:2:in `fetch': key not found (KeyError)
- * from prog.rb:2
+ * Raises KeyError if neither +default_value+ nor a block was given.
*
+ * Note that this method does not use the values of either #default or #default_proc.
*/
static VALUE
@@ -2049,7 +2238,7 @@ rb_hash_fetch_m(int argc, VALUE *argv, VALUE hash)
block_given = rb_block_given_p();
if (block_given && argc == 2) {
- rb_warn("block supersedes default value argument");
+ rb_warn("block supersedes default value argument");
}
if (hash_stlike_lookup(hash, key, &val)) {
@@ -2081,59 +2270,49 @@ rb_hash_fetch(VALUE hash, VALUE key)
/*
* call-seq:
- * hsh.default(key=nil) -> obj
- *
- * Returns the default value, the value that would be returned by
- * <i>hsh</i>[<i>key</i>] if <i>key</i> did not exist in <i>hsh</i>.
- * See also Hash::new and Hash#default=.
- *
- * h = Hash.new #=> {}
- * h.default #=> nil
- * h.default(2) #=> nil
- *
- * h = Hash.new("cat") #=> {}
- * h.default #=> "cat"
- * h.default(2) #=> "cat"
- *
- * h = Hash.new {|h,k| h[k] = k.to_i*10} #=> {}
- * h.default #=> nil
- * h.default(2) #=> 20
+ * hash.default -> object
+ * hash.default(key) -> object
+ *
+ * Returns the default value for the given +key+.
+ * The returned value will be determined either by the default proc or by the default value.
+ * See {Default Values}[rdoc-ref:Hash@Default+Values].
+ *
+ * With no argument, returns the current default value:
+ * h = {}
+ * h.default # => nil
+ *
+ * If +key+ is given, returns the default value for +key+,
+ * regardless of whether that key exists:
+ * h = Hash.new { |hash, key| hash[key] = "No key #{key}"}
+ * h[:foo] = "Hello"
+ * h.default(:foo) # => "No key foo"
*/
static VALUE
rb_hash_default(int argc, VALUE *argv, VALUE hash)
{
- VALUE args[2], ifnone;
+ VALUE ifnone;
rb_check_arity(argc, 0, 1);
ifnone = RHASH_IFNONE(hash);
if (FL_TEST(hash, RHASH_PROC_DEFAULT)) {
- if (argc == 0) return Qnil;
- args[0] = hash;
- args[1] = argv[0];
- return rb_funcallv(ifnone, id_yield, 2, args);
+ if (argc == 0) return Qnil;
+ return call_default_proc(ifnone, hash, argv[0]);
}
return ifnone;
}
/*
* call-seq:
- * hsh.default = obj -> obj
- *
- * Sets the default value, the value returned for a key that does not
- * exist in the hash. It is not possible to set the default to a
- * Proc that will be executed on each key lookup.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.default = "Go fish"
- * h["a"] #=> 100
- * h["z"] #=> "Go fish"
- * # This doesn't do what you might hope...
- * h.default = proc do |hash, key|
- * hash[key] = key + key
- * end
- * h[2] #=> #<Proc:0x401b3948@-:6>
- * h["cat"] #=> #<Proc:0x401b3948@-:6>
+ * hash.default = value -> object
+ *
+ * Sets the default value to +value+; returns +value+:
+ * h = {}
+ * h.default # => nil
+ * h.default = false # => false
+ * h.default # => false
+ *
+ * See {Default Values}[rdoc-ref:Hash@Default+Values].
*/
static VALUE
@@ -2146,39 +2325,37 @@ rb_hash_set_default(VALUE hash, VALUE ifnone)
/*
* call-seq:
- * hsh.default_proc -> anObject
- *
- * If Hash::new was invoked with a block, return that
- * block, otherwise return <code>nil</code>.
- *
- * h = Hash.new {|h,k| h[k] = k*k } #=> {}
- * p = h.default_proc #=> #<Proc:0x401b3d08@-:1>
- * a = [] #=> []
- * p.call(a, 2)
- * a #=> [nil, nil, 4]
+ * hash.default_proc -> proc or nil
+ *
+ * Returns the default proc for +self+
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
+ * h = {}
+ * h.default_proc # => nil
+ * h.default_proc = proc {|hash, key| "Default value for #{key}" }
+ * h.default_proc.class # => Proc
*/
-
static VALUE
rb_hash_default_proc(VALUE hash)
{
if (FL_TEST(hash, RHASH_PROC_DEFAULT)) {
- return RHASH_IFNONE(hash);
+ return RHASH_IFNONE(hash);
}
return Qnil;
}
/*
* call-seq:
- * hsh.default_proc = proc_obj or nil
- *
- * Sets the default proc to be executed on each failed key lookup.
- *
- * h.default_proc = proc do |hash, key|
- * hash[key] = key + key
- * end
- * h[2] #=> 4
- * h["cat"] #=> "catcat"
+ * hash.default_proc = proc -> proc
+ *
+ * Sets the default proc for +self+ to +proc+:
+ * (see {Default Values}[rdoc-ref:Hash@Default+Values]):
+ * h = {}
+ * h.default_proc # => nil
+ * h.default_proc = proc { |hash, key| "Default value for #{key}" }
+ * h.default_proc.class # => Proc
+ * h.default_proc = nil
+ * h.default_proc # => nil
*/
VALUE
@@ -2188,14 +2365,14 @@ rb_hash_set_default_proc(VALUE hash, VALUE proc)
rb_hash_modify_check(hash);
if (NIL_P(proc)) {
- SET_DEFAULT(hash, proc);
- return proc;
+ SET_DEFAULT(hash, proc);
+ return proc;
}
b = rb_check_convert_type_with_id(proc, T_DATA, "Proc", idTo_proc);
if (NIL_P(b) || !rb_obj_is_proc(b)) {
- rb_raise(rb_eTypeError,
- "wrong default_proc type %s (expected Proc)",
- rb_obj_classname(proc));
+ rb_raise(rb_eTypeError,
+ "wrong default_proc type %s (expected Proc)",
+ rb_obj_classname(proc));
}
proc = b;
SET_PROC_DEFAULT(hash, proc);
@@ -2208,24 +2385,23 @@ key_i(VALUE key, VALUE value, VALUE arg)
VALUE *args = (VALUE *)arg;
if (rb_equal(value, args[0])) {
- args[1] = key;
- return ST_STOP;
+ args[1] = key;
+ return ST_STOP;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.key(value) -> key
+ * hash.key(value) -> key or nil
*
- * Returns the key of an occurrence of a given value. If the value is
- * not found, returns <code>nil</code>.
- *
- * h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300 }
- * h.key(200) #=> "b"
- * h.key(300) #=> "c"
- * h.key(999) #=> nil
+ * Returns the key for the first-found entry with the given +value+
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
+ * h = {foo: 0, bar: 2, baz: 2}
+ * h.key(0) # => :foo
+ * h.key(2) # => :bar
*
+ * Returns +nil+ if so such value is found.
*/
static VALUE
@@ -2241,14 +2417,6 @@ rb_hash_key(VALUE hash, VALUE value)
return args[1];
}
-/* :nodoc: */
-static VALUE
-rb_hash_index(VALUE hash, VALUE value)
-{
- rb_warn_deprecated("Hash#index", "Hash#key");
- return rb_hash_key(hash, value);
-}
-
int
rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval)
{
@@ -2261,7 +2429,7 @@ rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval)
}
/*
- * delete a specified entry a given key.
+ * delete a specified entry by a given key.
* if there is the corresponding entry, return a value of the entry.
* if there is no corresponding entry, return Qundef.
*/
@@ -2288,30 +2456,39 @@ rb_hash_delete(VALUE hash, VALUE key)
{
VALUE deleted_value = rb_hash_delete_entry(hash, key);
- if (deleted_value != Qundef) { /* likely pass */
- return deleted_value;
+ if (!UNDEF_P(deleted_value)) { /* likely pass */
+ return deleted_value;
}
else {
- return Qnil;
+ return Qnil;
}
}
/*
* call-seq:
- * hsh.delete(key) -> value
- * hsh.delete(key) {| key | block } -> value
+ * hash.delete(key) -> value or nil
+ * hash.delete(key) {|key| ... } -> object
+ *
+ * Deletes the entry for the given +key+ and returns its associated value.
*
- * Deletes the key-value pair and returns the value from <i>hsh</i> whose
- * key is equal to <i>key</i>. If the key is not found, it returns
- * <em>nil</em>. If the optional code block is given and the
- * key is not found, pass in the key and return the result of
- * <i>block</i>.
+ * If no block is given and +key+ is found, deletes the entry and returns the associated value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.delete(:bar) # => 1
+ * h # => {:foo=>0, :baz=>2}
*
- * h = { "a" => 100, "b" => 200 }
- * h.delete("a") #=> 100
- * h.delete("z") #=> nil
- * h.delete("z") { |el| "#{el} not found" } #=> "z not found"
+ * If no block given and +key+ is not found, returns +nil+.
*
+ * If a block is given and +key+ is found, ignores the block,
+ * deletes the entry, and returns the associated value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.delete(:baz) { |key| raise 'Will never happen'} # => 2
+ * h # => {:foo=>0, :bar=>1}
+ *
+ * If a block is given and +key+ is not found,
+ * calls the block and returns the block's return value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.delete(:nosuch) { |key| "Key #{key} not found" } # => "Key nosuch not found"
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
*/
static VALUE
@@ -2322,16 +2499,17 @@ rb_hash_delete_m(VALUE hash, VALUE key)
rb_hash_modify_check(hash);
val = rb_hash_delete_entry(hash, key);
- if (val != Qundef) {
- return val;
+ if (!UNDEF_P(val)) {
+ compact_after_delete(hash);
+ return val;
}
else {
- if (rb_block_given_p()) {
- return rb_yield(key);
- }
- else {
- return Qnil;
- }
+ if (rb_block_given_p()) {
+ return rb_yield(key);
+ }
+ else {
+ return Qnil;
+ }
}
}
@@ -2352,15 +2530,16 @@ shift_i_safe(VALUE key, VALUE value, VALUE arg)
/*
* call-seq:
- * hsh.shift -> anArray or obj
+ * hash.shift -> [key, value] or nil
*
- * Removes a key-value pair from <i>hsh</i> and returns it as the
- * two-item array <code>[</code> <i>key, value</i> <code>]</code>, or
- * the hash's default value if the hash is empty.
+ * Removes the first hash entry
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]);
+ * returns a 2-element \Array containing the removed key and value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.shift # => [:foo, 0]
+ * h # => {:bar=>1, :baz=>2}
*
- * h = { 1 => "a", 2 => "b", 3 => "c" }
- * h.shift #=> [1, "a"]
- * h #=> {2=>"b", 3=>"c"}
+ * Returns nil if the hash is empty.
*/
static VALUE
@@ -2370,15 +2549,15 @@ rb_hash_shift(VALUE hash)
rb_hash_modify_check(hash);
if (RHASH_AR_TABLE_P(hash)) {
- var.key = Qundef;
- if (RHASH_ITER_LEV(hash) == 0) {
+ var.key = Qundef;
+ if (RHASH_ITER_LEV(hash) == 0) {
if (ar_shift(hash, &var.key, &var.val)) {
- return rb_assoc_new(var.key, var.val);
- }
- }
- else {
+ return rb_assoc_new(var.key, var.val);
+ }
+ }
+ else {
rb_hash_foreach(hash, shift_i_safe, (VALUE)&var);
- if (var.key != Qundef) {
+ if (!UNDEF_P(var.key)) {
rb_hash_delete_entry(hash, var.key);
return rb_assoc_new(var.key, var.val);
}
@@ -2392,21 +2571,22 @@ rb_hash_shift(VALUE hash)
}
}
else {
- rb_hash_foreach(hash, shift_i_safe, (VALUE)&var);
- if (var.key != Qundef) {
- rb_hash_delete_entry(hash, var.key);
- return rb_assoc_new(var.key, var.val);
- }
- }
+ rb_hash_foreach(hash, shift_i_safe, (VALUE)&var);
+ if (!UNDEF_P(var.key)) {
+ rb_hash_delete_entry(hash, var.key);
+ return rb_assoc_new(var.key, var.val);
+ }
+ }
}
- return rb_hash_default_value(hash, Qnil);
+ return Qnil;
}
static int
delete_if_i(VALUE key, VALUE value, VALUE hash)
{
if (RTEST(rb_yield_values(2, key, value))) {
- return ST_DELETE;
+ rb_hash_modify(hash);
+ return ST_DELETE;
}
return ST_CONTINUE;
}
@@ -2419,17 +2599,19 @@ hash_enum_size(VALUE hash, VALUE args, VALUE eobj)
/*
* call-seq:
- * hsh.delete_if {| key, value | block } -> hsh
- * hsh.delete_if -> an_enumerator
- *
- * Deletes every key-value pair from <i>hsh</i> for which <i>block</i>
- * evaluates to <code>true</code>.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.delete_if {|key, value| key >= "b" } #=> {"a"=>100}
- *
+ * hash.delete_if {|key, value| ... } -> self
+ * hash.delete_if -> new_enumerator
+ *
+ * If a block given, calls the block with each key-value pair;
+ * deletes each entry for which the block returns a truthy value;
+ * returns +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.delete_if {|key, value| value > 0 } # => {:foo=>0}
+ *
+ * If no block given, returns a new \Enumerator:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.delete_if # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:delete_if>
+ * e.each { |key, value| value > 0 } # => {:foo=>0}
*/
VALUE
@@ -2439,20 +2621,30 @@ rb_hash_delete_if(VALUE hash)
rb_hash_modify_check(hash);
if (!RHASH_TABLE_EMPTY_P(hash)) {
rb_hash_foreach(hash, delete_if_i, hash);
+ compact_after_delete(hash);
}
return hash;
}
/*
* call-seq:
- * hsh.reject! {| key, value | block } -> hsh or nil
- * hsh.reject! -> an_enumerator
+ * hash.reject! {|key, value| ... } -> self or nil
+ * hash.reject! -> new_enumerator
+ *
+ * Returns +self+, whose remaining entries are those
+ * for which the block returns +false+ or +nil+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.reject! {|key, value| value < 2 } # => {:baz=>2}
+ *
+ * Returns +nil+ if no entries are removed.
*
- * Equivalent to Hash#delete_if, but returns
- * <code>nil</code> if no changes were made.
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.reject! # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:reject!>
+ * e.each {|key, value| key.start_with?('b') } # => {:foo=>0}
*/
-VALUE
+static VALUE
rb_hash_reject_bang(VALUE hash)
{
st_index_t n;
@@ -2466,57 +2658,47 @@ rb_hash_reject_bang(VALUE hash)
return hash;
}
-static int
-reject_i(VALUE key, VALUE value, VALUE result)
-{
- if (!RTEST(rb_yield_values(2, key, value))) {
- rb_hash_aset(result, key, value);
- }
- return ST_CONTINUE;
-}
-
/*
* call-seq:
- * hsh.reject {|key, value| block} -> a_hash
- * hsh.reject -> an_enumerator
- *
- * Returns a new hash consisting of entries for which the block returns false.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.reject {|k,v| k < "b"} #=> {"b" => 200, "c" => 300}
- * h.reject {|k,v| v > 100} #=> {"a" => 100}
+ * hash.reject {|key, value| ... } -> new_hash
+ * hash.reject -> new_enumerator
+ *
+ * Returns a new \Hash object whose entries are all those
+ * from +self+ for which the block returns +false+ or +nil+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.reject {|key, value| key.start_with?('b') }
+ * h1 # => {:foo=>0}
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.reject # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:reject>
+ * h1 = e.each {|key, value| key.start_with?('b') }
+ * h1 # => {:foo=>0}
*/
-VALUE
+static VALUE
rb_hash_reject(VALUE hash)
{
VALUE result;
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- if (RTEST(ruby_verbose)) {
- VALUE klass;
- if (HAS_EXTRA_STATES(hash, klass)) {
- rb_warn("extra states are no longer copied: %+"PRIsVALUE, hash);
- }
- }
- result = rb_hash_new();
+ result = hash_dup_with_compare_by_id(hash);
if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, reject_i, result);
+ rb_hash_foreach(result, delete_if_i, result);
+ compact_after_delete(result);
}
return result;
}
/*
* call-seq:
- * hsh.slice(*keys) -> a_hash
+ * hash.slice(*keys) -> new_hash
*
- * Returns a hash containing only the given keys and their values.
+ * Returns a new \Hash object containing the entries for the given +keys+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.slice(:baz, :foo) # => {:baz=>2, :foo=>0}
*
- * h = { a: 100, b: 200, c: 300 }
- * h.slice(:a) #=> {:a=>100}
- * h.slice(:b, :c, :d) #=> {:b=>200, :c=>300}
+ * Any given +keys+ that are not found are ignored.
*/
static VALUE
@@ -2526,134 +2708,166 @@ rb_hash_slice(int argc, VALUE *argv, VALUE hash)
VALUE key, value, result;
if (argc == 0 || RHASH_EMPTY_P(hash)) {
- return rb_hash_new();
+ return copy_compare_by_id(rb_hash_new(), hash);
}
- result = rb_hash_new_with_size(argc);
+ result = copy_compare_by_id(rb_hash_new_with_size(argc), hash);
for (i = 0; i < argc; i++) {
- key = argv[i];
- value = rb_hash_lookup2(hash, key, Qundef);
- if (value != Qundef)
- rb_hash_aset(result, key, value);
+ key = argv[i];
+ value = rb_hash_lookup2(hash, key, Qundef);
+ if (!UNDEF_P(value))
+ rb_hash_aset(result, key, value);
}
return result;
}
/*
- * call-seq:
- * hsh.values_at(key, ...) -> array
+ * call-seq:
+ * hsh.except(*keys) -> a_hash
*
- * Return an array containing the values associated with the given keys.
- * Also see Hash.select.
+ * Returns a new \Hash excluding entries for the given +keys+:
+ * h = { a: 100, b: 200, c: 300 }
+ * h.except(:a) #=> {:b=>200, :c=>300}
*
- * h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
- * h.values_at("cow", "cat") #=> ["bovine", "feline"]
+ * Any given +keys+ that are not found are ignored.
*/
-VALUE
+static VALUE
+rb_hash_except(int argc, VALUE *argv, VALUE hash)
+{
+ int i;
+ VALUE key, result;
+
+ result = hash_dup_with_compare_by_id(hash);
+
+ for (i = 0; i < argc; i++) {
+ key = argv[i];
+ rb_hash_delete(result, key);
+ }
+ compact_after_delete(result);
+
+ return result;
+}
+
+/*
+ * call-seq:
+ * hash.values_at(*keys) -> new_array
+ *
+ * Returns a new \Array containing values for the given +keys+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.values_at(:baz, :foo) # => [2, 0]
+ *
+ * The {default values}[rdoc-ref:Hash@Default+Values] are returned
+ * for any keys that are not found:
+ * h.values_at(:hello, :foo) # => [nil, 0]
+ */
+
+static VALUE
rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
{
VALUE result = rb_ary_new2(argc);
long i;
for (i=0; i<argc; i++) {
- rb_ary_push(result, rb_hash_aref(hash, argv[i]));
+ rb_ary_push(result, rb_hash_aref(hash, argv[i]));
}
return result;
}
/*
- * call-seq:
- * hsh.fetch_values(key, ...) -> array
- * hsh.fetch_values(key, ...) { |key| block } -> array
+ * call-seq:
+ * hash.fetch_values(*keys) -> new_array
+ * hash.fetch_values(*keys) {|key| ... } -> new_array
*
- * Returns an array containing the values associated with the given keys
- * but also raises KeyError when one of keys can't be found.
- * Also see Hash#values_at and Hash#fetch.
+ * Returns a new \Array containing the values associated with the given keys *keys:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.fetch_values(:baz, :foo) # => [2, 0]
*
- * h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
+ * Returns a new empty \Array if no arguments given.
*
- * h.fetch_values("cow", "cat") #=> ["bovine", "feline"]
- * h.fetch_values("cow", "bird") # raises KeyError
- * h.fetch_values("cow", "bird") { |k| k.upcase } #=> ["bovine", "BIRD"]
+ * When a block is given, calls the block with each missing key,
+ * treating the block's return value as the value for that key:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * values = h.fetch_values(:bar, :foo, :bad, :bam) {|key| key.to_s}
+ * values # => [1, 0, "bad", "bam"]
+ *
+ * When no block is given, raises an exception if any given key is not found.
*/
-VALUE
+static VALUE
rb_hash_fetch_values(int argc, VALUE *argv, VALUE hash)
{
VALUE result = rb_ary_new2(argc);
long i;
for (i=0; i<argc; i++) {
- rb_ary_push(result, rb_hash_fetch(hash, argv[i]));
+ rb_ary_push(result, rb_hash_fetch(hash, argv[i]));
}
return result;
}
static int
-select_i(VALUE key, VALUE value, VALUE result)
+keep_if_i(VALUE key, VALUE value, VALUE hash)
{
- if (RTEST(rb_yield_values(2, key, value))) {
- rb_hash_aset(result, key, value);
+ if (!RTEST(rb_yield_values(2, key, value))) {
+ rb_hash_modify(hash);
+ return ST_DELETE;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.select {|key, value| block} -> a_hash
- * hsh.select -> an_enumerator
- * hsh.filter {|key, value| block} -> a_hash
- * hsh.filter -> an_enumerator
- *
- * Returns a new hash consisting of entries for which the block returns true.
+ * hash.select {|key, value| ... } -> new_hash
+ * hash.select -> new_enumerator
*
- * If no block is given, an enumerator is returned instead.
+ * Hash#filter is an alias for Hash#select.
*
- * h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.select {|k,v| k > "a"} #=> {"b" => 200, "c" => 300}
- * h.select {|k,v| v < 200} #=> {"a" => 100}
+ * Returns a new \Hash object whose entries are those for which the block returns a truthy value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.select {|key, value| value < 2 } # => {:foo=>0, :bar=>1}
*
- * Hash#filter is an alias for Hash#select.
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.select # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:select>
+ * e.each {|key, value| value < 2 } # => {:foo=>0, :bar=>1}
*/
-VALUE
+static VALUE
rb_hash_select(VALUE hash)
{
VALUE result;
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- result = rb_hash_new();
+ result = hash_dup_with_compare_by_id(hash);
if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, select_i, result);
+ rb_hash_foreach(result, keep_if_i, result);
+ compact_after_delete(result);
}
return result;
}
-static int
-keep_if_i(VALUE key, VALUE value, VALUE hash)
-{
- if (!RTEST(rb_yield_values(2, key, value))) {
- return ST_DELETE;
- }
- return ST_CONTINUE;
-}
-
/*
* call-seq:
- * hsh.select! {| key, value | block } -> hsh or nil
- * hsh.select! -> an_enumerator
- * hsh.filter! {| key, value | block } -> hsh or nil
- * hsh.filter! -> an_enumerator
- *
- * Equivalent to Hash#keep_if, but returns
- * +nil+ if no changes were made.
+ * hash.select! {|key, value| ... } -> self or nil
+ * hash.select! -> new_enumerator
*
* Hash#filter! is an alias for Hash#select!.
+ *
+ * Returns +self+, whose entries are those for which the block returns a truthy value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.select! {|key, value| value < 2 } => {:foo=>0, :bar=>1}
+ *
+ * Returns +nil+ if no entries were removed.
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.select! # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:select!>
+ * e.each { |key, value| value < 2 } # => {:foo=>0, :bar=>1}
*/
-VALUE
+static VALUE
rb_hash_select_bang(VALUE hash)
{
st_index_t n;
@@ -2669,18 +2883,22 @@ rb_hash_select_bang(VALUE hash)
/*
* call-seq:
- * hsh.keep_if {| key, value | block } -> hsh
- * hsh.keep_if -> an_enumerator
- *
- * Deletes every key-value pair from <i>hsh</i> for which <i>block</i>
- * evaluates to +false+.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * See also Hash#select!.
+ * hash.keep_if {|key, value| ... } -> self
+ * hash.keep_if -> new_enumerator
+ *
+ * Calls the block for each key-value pair;
+ * retains the entry if the block returns a truthy value;
+ * otherwise deletes the entry; returns +self+.
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.keep_if { |key, value| key.start_with?('b') } # => {:bar=>1, :baz=>2}
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.keep_if # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:keep_if>
+ * e.each { |key, value| key.start_with?('b') } # => {:bar=>1, :baz=>2}
*/
-VALUE
+static VALUE
rb_hash_keep_if(VALUE hash)
{
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
@@ -2699,13 +2917,9 @@ clear_i(VALUE key, VALUE value, VALUE dummy)
/*
* call-seq:
- * hsh.clear -> hsh
- *
- * Removes all key-value pairs from <i>hsh</i>.
- *
- * h = { "a" => 100, "b" => 200 } #=> {"a"=>100, "b"=>200}
- * h.clear #=> {}
+ * hash.clear -> self
*
+ * Removes all hash entries; returns +self+.
*/
VALUE
@@ -2721,6 +2935,7 @@ rb_hash_clear(VALUE hash)
}
else {
st_clear(RHASH_ST_TABLE(hash));
+ compact_after_delete(hash);
}
return hash;
@@ -2729,14 +2944,6 @@ rb_hash_clear(VALUE hash)
static int
hash_aset(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
{
- if (existing) {
- arg->new_value = arg->arg;
- arg->old_value = *val;
- }
- else {
- arg->new_key = *key;
- arg->new_value = arg->arg;
- }
*val = arg->arg;
return ST_CONTINUE;
}
@@ -2748,7 +2955,7 @@ rb_hash_key_str(VALUE key)
return rb_fstring(key);
}
else {
- return rb_str_new_frozen(key);
+ return rb_str_new_frozen(key);
}
}
@@ -2756,7 +2963,7 @@ static int
hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
{
if (!existing && !RB_OBJ_FROZEN(*key)) {
- *key = rb_hash_key_str(*key);
+ *key = rb_hash_key_str(*key);
}
return hash_aset(key, val, arg, existing);
}
@@ -2766,29 +2973,28 @@ NOINSERT_UPDATE_CALLBACK(hash_aset_str)
/*
* call-seq:
- * hsh[key] = value -> value
- * hsh.store(key, value) -> value
- *
- * == Element Assignment
- *
- * Associates the value given by +value+ with the key given by +key+.
- *
- * h = { "a" => 100, "b" => 200 }
- * h["a"] = 9
- * h["c"] = 4
- * h #=> {"a"=>9, "b"=>200, "c"=>4}
- * h.store("d", 42) #=> 42
- * h #=> {"a"=>9, "b"=>200, "c"=>4, "d"=>42}
- *
- * +key+ should not have its value changed while it is in use as a key (an
- * <tt>unfrozen String</tt> passed as a key will be duplicated and frozen).
- *
- * a = "a"
- * b = "b".freeze
- * h = { a => 100, b => 200 }
- * h.key(100).equal? a #=> false
- * h.key(200).equal? b #=> true
- *
+ * hash[key] = value -> value
+ * hash.store(key, value)
+ *
+ * Hash#store is an alias for Hash#[]=.
+
+ * Associates the given +value+ with the given +key+; returns +value+.
+ *
+ * If the given +key+ exists, replaces its value with the given +value+;
+ * the ordering is not affected
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
+ * h = {foo: 0, bar: 1}
+ * h[:foo] = 2 # => 2
+ * h.store(:bar, 3) # => 3
+ * h # => {:foo=>2, :bar=>3}
+ *
+ * If +key+ does not exist, adds the +key+ and +value+;
+ * the new entry is last in the order
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
+ * h = {foo: 0, bar: 1}
+ * h[:baz] = 2 # => 2
+ * h.store(:bat, 3) # => 3
+ * h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3}
*/
VALUE
@@ -2799,29 +3005,27 @@ rb_hash_aset(VALUE hash, VALUE key, VALUE val)
rb_hash_modify(hash);
if (RHASH_TABLE_NULL_P(hash)) {
- if (iter_lev > 0) no_new_key();
+ if (iter_lev > 0) no_new_key();
ar_alloc_table(hash);
}
- if (RHASH_TYPE(hash) == &identhash || rb_obj_class(key) != rb_cString) {
- RHASH_UPDATE_ITER(hash, iter_lev, key, hash_aset, val);
+ if (!RHASH_STRING_KEY_P(hash, key)) {
+ RHASH_UPDATE_ITER(hash, iter_lev, key, hash_aset, val);
}
else {
- RHASH_UPDATE_ITER(hash, iter_lev, key, hash_aset_str, val);
+ RHASH_UPDATE_ITER(hash, iter_lev, key, hash_aset_str, val);
}
return val;
}
/*
* call-seq:
- * hsh.replace(other_hash) -> hsh
- *
- * Replaces the contents of <i>hsh</i> with the contents of
- * <i>other_hash</i>.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.replace({ "c" => 300, "d" => 400 }) #=> {"c"=>300, "d"=>400}
+ * hash.replace(other_hash) -> self
*
+ * Replaces the entire contents of +self+ with the contents of +other_hash+;
+ * returns +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.replace({bat: 3, bam: 4}) # => {:bat=>3, :bam=>4}
*/
static VALUE
@@ -2837,25 +3041,17 @@ rb_hash_replace(VALUE hash, VALUE hash2)
COPY_DEFAULT(hash, hash2);
if (RHASH_AR_TABLE_P(hash)) {
- if (RHASH_AR_TABLE_P(hash2)) {
- ar_clear(hash);
- }
- else {
- ar_free_and_clear_table(hash);
- RHASH_ST_TABLE_SET(hash, st_init_table_with_size(RHASH_TYPE(hash2), RHASH_SIZE(hash2)));
- }
+ ar_free_and_clear_table(hash);
}
else {
- if (RHASH_AR_TABLE_P(hash2)) {
- st_free_table(RHASH_ST_TABLE(hash));
- RHASH_ST_CLEAR(hash);
- }
- else {
- st_clear(RHASH_ST_TABLE(hash));
- RHASH_TBL_RAW(hash)->type = RHASH_ST_TABLE(hash2)->type;
- }
+ st_free_table(RHASH_ST_TABLE(hash));
+ RHASH_ST_CLEAR(hash);
+ }
+ hash_copy(hash, hash2);
+ if (RHASH_EMPTY_P(hash2) && RHASH_ST_TABLE_P(hash2)) {
+ /* ident hash */
+ RHASH_ST_TABLE_SET(hash, st_init_table_with_size(RHASH_TYPE(hash2), 0));
}
- rb_hash_foreach(hash2, rb_hash_rehash_i, (VALUE)hash);
rb_gc_writebarrier_remember(hash);
@@ -2864,16 +3060,11 @@ rb_hash_replace(VALUE hash, VALUE hash2)
/*
* call-seq:
- * hsh.length -> integer
- * hsh.size -> integer
+ * hash.length -> integer
+ * hash.size -> integer
*
- * Returns the number of key-value pairs in the hash.
- *
- * h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
- * h.size #=> 4
- * h.delete("a") #=> 200
- * h.size #=> 3
- * h.length #=> 3
+ * Returns the count of entries in +self+:
+ * {foo: 0, bar: 1, baz: 2}.length # => 3
*
* Hash#length is an alias for Hash#size.
*/
@@ -2892,18 +3083,17 @@ rb_hash_size_num(VALUE hash)
/*
* call-seq:
- * hsh.empty? -> true or false
- *
- * Returns <code>true</code> if <i>hsh</i> contains no key-value pairs.
- *
- * {}.empty? #=> true
+ * hash.empty? -> true or false
*
+ * Returns +true+ if there are no hash entries, +false+ otherwise:
+ * {}.empty? # => true
+ * {foo: 0, bar: 1, baz: 2}.empty? # => false
*/
static VALUE
rb_hash_empty_p(VALUE hash)
{
- return RHASH_EMPTY_P(hash) ? Qtrue : Qfalse;
+ return RBOOL(RHASH_EMPTY_P(hash));
}
static int
@@ -2915,21 +3105,26 @@ each_value_i(VALUE key, VALUE value, VALUE _)
/*
* call-seq:
- * hsh.each_value {| value | block } -> hsh
- * hsh.each_value -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the
- * value as a parameter.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each_value {|value| puts value }
- *
- * <em>produces:</em>
- *
- * 100
- * 200
+ * hash.each_value {|value| ... } -> self
+ * hash.each_value -> new_enumerator
+ *
+ * Calls the given block with each value; returns +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.each_value {|value| puts value } # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * 0
+ * 1
+ * 2
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.each_value # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:each_value>
+ * h1 = e.each {|value| puts value }
+ * h1 # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * 0
+ * 1
+ * 2
*/
static VALUE
@@ -2949,21 +3144,26 @@ each_key_i(VALUE key, VALUE value, VALUE _)
/*
* call-seq:
- * hsh.each_key {| key | block } -> hsh
- * hsh.each_key -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the key
- * as a parameter.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each_key {|key| puts key }
- *
- * <em>produces:</em>
- *
- * a
- * b
+ * hash.each_key {|key| ... } -> self
+ * hash.each_key -> new_enumerator
+ *
+ * Calls the given block with each key; returns +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.each_key {|key| puts key } # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * foo
+ * bar
+ * baz
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.each_key # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:each_key>
+ * h1 = e.each {|key| puts key }
+ * h1 # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * foo
+ * bar
+ * baz
*/
static VALUE
rb_hash_each_key(VALUE hash)
@@ -2992,37 +3192,65 @@ each_pair_i_fast(VALUE key, VALUE value, VALUE _)
/*
* call-seq:
- * hsh.each {| key, value | block } -> hsh
- * hsh.each_pair {| key, value | block } -> hsh
- * hsh.each -> an_enumerator
- * hsh.each_pair -> an_enumerator
- *
- * Calls <i>block</i> once for each key in <i>hsh</i>, passing the key-value
- * pair as parameters.
- *
- * If no block is given, an enumerator is returned instead.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.each {|key, value| puts "#{key} is #{value}" }
- *
- * <em>produces:</em>
- *
- * a is 100
- * b is 200
- *
+ * hash.each {|key, value| ... } -> self
+ * hash.each_pair {|key, value| ... } -> self
+ * hash.each -> new_enumerator
+ * hash.each_pair -> new_enumerator
+ *
+ * Hash#each is an alias for Hash#each_pair.
+
+ * Calls the given block with each key-value pair; returns +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.each_pair {|key, value| puts "#{key}: #{value}"} # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * foo: 0
+ * bar: 1
+ * baz: 2
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.each_pair # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:each_pair>
+ * h1 = e.each {|key, value| puts "#{key}: #{value}"}
+ * h1 # => {:foo=>0, :bar=>1, :baz=>2}
+ * Output:
+ * foo: 0
+ * bar: 1
+ * baz: 2
*/
static VALUE
rb_hash_each_pair(VALUE hash)
{
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- if (rb_block_arity() > 1)
- rb_hash_foreach(hash, each_pair_i_fast, 0);
+ if (rb_block_pair_yield_optimizable())
+ rb_hash_foreach(hash, each_pair_i_fast, 0);
else
- rb_hash_foreach(hash, each_pair_i, 0);
+ rb_hash_foreach(hash, each_pair_i, 0);
return hash;
}
+struct transform_keys_args{
+ VALUE trans;
+ VALUE result;
+ int block_given;
+};
+
+static int
+transform_keys_hash_i(VALUE key, VALUE value, VALUE transarg)
+{
+ struct transform_keys_args *p = (void *)transarg;
+ VALUE trans = p->trans, result = p->result;
+ VALUE new_key = rb_hash_lookup2(trans, key, Qundef);
+ if (UNDEF_P(new_key)) {
+ if (p->block_given)
+ new_key = rb_yield(key);
+ else
+ new_key = key;
+ }
+ rb_hash_aset(result, new_key, value);
+ return ST_CONTINUE;
+}
+
static int
transform_keys_i(VALUE key, VALUE value, VALUE result)
{
@@ -3033,69 +3261,127 @@ transform_keys_i(VALUE key, VALUE value, VALUE result)
/*
* call-seq:
- * hsh.transform_keys {|key| block } -> new_hash
- * hsh.transform_keys -> an_enumerator
- *
- * Returns a new hash with the results of running the block once for
- * every key.
- * This method does not change the values.
- *
- * h = { a: 1, b: 2, c: 3 }
- * h.transform_keys {|k| k.to_s } #=> { "a" => 1, "b" => 2, "c" => 3 }
- * h.transform_keys(&:to_s) #=> { "a" => 1, "b" => 2, "c" => 3 }
- * h.transform_keys.with_index {|k, i| "#{k}.#{i}" }
- * #=> { "a.0" => 1, "b.1" => 2, "c.2" => 3 }
- *
- * If no block is given, an enumerator is returned instead.
+ * hash.transform_keys {|key| ... } -> new_hash
+ * hash.transform_keys(hash2) -> new_hash
+ * hash.transform_keys(hash2) {|other_key| ...} -> new_hash
+ * hash.transform_keys -> new_enumerator
+ *
+ * Returns a new \Hash object; each entry has:
+ * * A key provided by the block.
+ * * The value from +self+.
+ *
+ * An optional hash argument can be provided to map keys to new keys.
+ * Any key not given will be mapped using the provided block,
+ * or remain the same if no block is given.
+ *
+ * Transform keys:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.transform_keys {|key| key.to_s }
+ * h1 # => {"foo"=>0, "bar"=>1, "baz"=>2}
+ *
+ * h.transform_keys(foo: :bar, bar: :foo)
+ * #=> {bar: 0, foo: 1, baz: 2}
+ *
+ * h.transform_keys(foo: :hello, &:to_s)
+ * #=> {:hello=>0, "bar"=>1, "baz"=>2}
+ *
+ * Overwrites values for duplicate keys:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.transform_keys {|key| :bat }
+ * h1 # => {:bat=>2}
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.transform_keys # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:transform_keys>
+ * h1 = e.each { |key| key.to_s }
+ * h1 # => {"foo"=>0, "bar"=>1, "baz"=>2}
*/
static VALUE
-rb_hash_transform_keys(VALUE hash)
+rb_hash_transform_keys(int argc, VALUE *argv, VALUE hash)
{
VALUE result;
+ struct transform_keys_args transarg = {0};
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ argc = rb_check_arity(argc, 0, 1);
+ if (argc > 0) {
+ transarg.trans = to_hash(argv[0]);
+ transarg.block_given = rb_block_given_p();
+ }
+ else {
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ }
result = rb_hash_new();
if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, transform_keys_i, result);
+ if (transarg.trans) {
+ transarg.result = result;
+ rb_hash_foreach(hash, transform_keys_hash_i, (VALUE)&transarg);
+ }
+ else {
+ rb_hash_foreach(hash, transform_keys_i, result);
+ }
}
return result;
}
-static VALUE rb_hash_flatten(int argc, VALUE *argv, VALUE hash);
+static int flatten_i(VALUE key, VALUE val, VALUE ary);
/*
* call-seq:
- * hsh.transform_keys! {|key| block } -> hsh
- * hsh.transform_keys! -> an_enumerator
+ * hash.transform_keys! {|key| ... } -> self
+ * hash.transform_keys!(hash2) -> self
+ * hash.transform_keys!(hash2) {|other_key| ...} -> self
+ * hash.transform_keys! -> new_enumerator
*
- * Invokes the given block once for each key in <i>hsh</i>, replacing it
- * with the new key returned by the block, and then returns <i>hsh</i>.
- * This method does not change the values.
- *
- * h = { a: 1, b: 2, c: 3 }
- * h.transform_keys! {|k| k.to_s } #=> { "a" => 1, "b" => 2, "c" => 3 }
- * h.transform_keys!(&:to_sym) #=> { a: 1, b: 2, c: 3 }
- * h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
- * #=> { "a.0" => 1, "b.1" => 2, "c.2" => 3 }
- *
- * If no block is given, an enumerator is returned instead.
+ * Same as Hash#transform_keys but modifies the receiver in place
+ * instead of returning a new hash.
*/
static VALUE
-rb_hash_transform_keys_bang(VALUE hash)
+rb_hash_transform_keys_bang(int argc, VALUE *argv, VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ VALUE trans = 0;
+ int block_given = 0;
+
+ argc = rb_check_arity(argc, 0, 1);
+ if (argc > 0) {
+ trans = to_hash(argv[0]);
+ block_given = rb_block_given_p();
+ }
+ else {
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ }
rb_hash_modify_check(hash);
if (!RHASH_TABLE_EMPTY_P(hash)) {
long i;
- VALUE pairs = rb_hash_flatten(0, NULL, hash);
- rb_hash_clear(hash);
+ VALUE new_keys = hash_alloc(0);
+ VALUE pairs = rb_ary_hidden_new(RHASH_SIZE(hash) * 2);
+ rb_hash_foreach(hash, flatten_i, pairs);
for (i = 0; i < RARRAY_LEN(pairs); i += 2) {
- VALUE key = RARRAY_AREF(pairs, i), new_key = rb_yield(key),
- val = RARRAY_AREF(pairs, i+1);
+ VALUE key = RARRAY_AREF(pairs, i), new_key, val;
+
+ if (!trans) {
+ new_key = rb_yield(key);
+ }
+ else if (!UNDEF_P(new_key = rb_hash_lookup2(trans, key, Qundef))) {
+ /* use the transformed key */
+ }
+ else if (block_given) {
+ new_key = rb_yield(key);
+ }
+ else {
+ new_key = key;
+ }
+ val = RARRAY_AREF(pairs, i+1);
+ if (!hash_stlike_lookup(new_keys, key, NULL)) {
+ rb_hash_stlike_delete(hash, &key, NULL);
+ }
rb_hash_aset(hash, new_key, val);
+ rb_hash_aset(new_keys, new_key, Qnil);
}
+ rb_ary_clear(pairs);
+ rb_hash_clear(new_keys);
}
+ compact_after_delete(hash);
return hash;
}
@@ -3109,26 +3395,31 @@ static int
transform_values_foreach_replace(st_data_t *key, st_data_t *value, st_data_t argp, int existing)
{
VALUE new_value = rb_yield((VALUE)*value);
- *value = new_value;
+ VALUE hash = (VALUE)argp;
+ rb_hash_modify(hash);
+ RB_OBJ_WRITE(hash, value, new_value);
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.transform_values {|value| block } -> new_hash
- * hsh.transform_values -> an_enumerator
- *
- * Returns a new hash with the results of running the block once for
- * every value.
- * This method does not change the keys.
- *
- * h = { a: 1, b: 2, c: 3 }
- * h.transform_values {|v| v * v + 1 } #=> { a: 2, b: 5, c: 10 }
- * h.transform_values(&:to_s) #=> { a: "1", b: "2", c: "3" }
- * h.transform_values.with_index {|v, i| "#{v}.#{i}" }
- * #=> { a: "1.0", b: "2.1", c: "3.2" }
- *
- * If no block is given, an enumerator is returned instead.
+ * hash.transform_values {|value| ... } -> new_hash
+ * hash.transform_values -> new_enumerator
+ *
+ * Returns a new \Hash object; each entry has:
+ * * A key from +self+.
+ * * A value provided by the block.
+ *
+ * Transform values:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.transform_values {|value| value * 100}
+ * h1 # => {:foo=>0, :bar=>100, :baz=>200}
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.transform_values # => #<Enumerator: {:foo=>0, :bar=>1, :baz=>2}:transform_values>
+ * h1 = e.each { |value| value * 100}
+ * h1 # => {:foo=>0, :bar=>100, :baz=>200}
*/
static VALUE
rb_hash_transform_values(VALUE hash)
@@ -3136,10 +3427,12 @@ rb_hash_transform_values(VALUE hash)
VALUE result;
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- result = hash_dup(hash, rb_cHash, 0);
+ result = hash_dup_with_compare_by_id(hash);
+ SET_DEFAULT(result, Qnil);
if (!RHASH_EMPTY_P(hash)) {
- rb_hash_stlike_foreach_with_replace(result, transform_values_foreach_func, transform_values_foreach_replace, 0);
+ rb_hash_stlike_foreach_with_replace(result, transform_values_foreach_func, transform_values_foreach_replace, result);
+ compact_after_delete(result);
}
return result;
@@ -3147,20 +3440,18 @@ rb_hash_transform_values(VALUE hash)
/*
* call-seq:
- * hsh.transform_values! {|value| block } -> hsh
- * hsh.transform_values! -> an_enumerator
- *
- * Invokes the given block once for each value in <i>hsh</i>, replacing it
- * with the new value returned by the block, and then returns <i>hsh</i>.
- * This method does not change the keys.
- *
- * h = { a: 1, b: 2, c: 3 }
- * h.transform_values! {|v| v * v + 1 } #=> { a: 2, b: 5, c: 10 }
- * h.transform_values!(&:to_s) #=> { a: "2", b: "5", c: "10" }
- * h.transform_values!.with_index {|v, i| "#{v}.#{i}" }
- * #=> { a: "2.0", b: "5.1", c: "10.2" }
- *
- * If no block is given, an enumerator is returned instead.
+ * hash.transform_values! {|value| ... } -> self
+ * hash.transform_values! -> new_enumerator
+ *
+ * Returns +self+, whose keys are unchanged, and whose values are determined by the given block.
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.transform_values! {|value| value * 100} # => {:foo=>0, :bar=>100, :baz=>200}
+ *
+ * Returns a new \Enumerator if no block given:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * e = h.transform_values! # => #<Enumerator: {:foo=>0, :bar=>100, :baz=>200}:transform_values!>
+ * h1 = e.each {|value| value * 100}
+ * h1 # => {:foo=>0, :bar=>100, :baz=>200}
*/
static VALUE
rb_hash_transform_values_bang(VALUE hash)
@@ -3169,7 +3460,7 @@ rb_hash_transform_values_bang(VALUE hash)
rb_hash_modify_check(hash);
if (!RHASH_TABLE_EMPTY_P(hash)) {
- rb_hash_stlike_foreach_with_replace(hash, transform_values_foreach_func, transform_values_foreach_replace, 0);
+ rb_hash_stlike_foreach_with_replace(hash, transform_values_foreach_func, transform_values_foreach_replace, hash);
}
return hash;
@@ -3184,13 +3475,12 @@ to_a_i(VALUE key, VALUE value, VALUE ary)
/*
* call-seq:
- * hsh.to_a -> array
- *
- * Converts <i>hsh</i> to a nested array of <code>[</code> <i>key,
- * value</i> <code>]</code> arrays.
+ * hash.to_a -> new_array
*
- * h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 }
- * h.to_a #=> [["c", 300], ["a", 100], ["d", 400]]
+ * Returns a new \Array of 2-element \Array objects;
+ * each nested \Array contains a key-value pair from +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.to_a # => [[:foo, 0], [:bar, 1], [:baz, 2]]
*/
static VALUE
@@ -3211,10 +3501,10 @@ inspect_i(VALUE key, VALUE value, VALUE str)
str2 = rb_inspect(key);
if (RSTRING_LEN(str) > 1) {
- rb_str_buf_cat_ascii(str, ", ");
+ rb_str_buf_cat_ascii(str, ", ");
}
else {
- rb_enc_copy(str, str2);
+ rb_enc_copy(str, str2);
}
rb_str_buf_append(str, str2);
rb_str_buf_cat_ascii(str, "=>");
@@ -3238,31 +3528,30 @@ inspect_hash(VALUE hash, VALUE dummy, int recur)
}
/*
- * call-seq:
- * hsh.to_s -> string
- * hsh.inspect -> string
+ * call-seq:
+ * hash.inspect -> new_string
*
- * Return the contents of this hash as a string.
+ * Returns a new \String containing the hash entries:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.inspect # => "{:foo=>0, :bar=>1, :baz=>2}"
*
- * h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 }
- * h.to_s #=> "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
+ * Hash#to_s is an alias for Hash#inspect.
*/
static VALUE
rb_hash_inspect(VALUE hash)
{
if (RHASH_EMPTY_P(hash))
- return rb_usascii_str_new2("{}");
+ return rb_usascii_str_new2("{}");
return rb_exec_recursive(inspect_hash, hash, 0);
}
/*
- * call-seq:
- * hsh.to_hash => hsh
+ * call-seq:
+ * hash.to_hash -> self
*
- * Returns +self+.
+ * Returns +self+.
*/
-
static VALUE
rb_hash_to_hash(VALUE hash)
{
@@ -3304,14 +3593,21 @@ rb_hash_to_h_block(VALUE hash)
/*
* call-seq:
- * hsh.to_h -> hsh or new_hash
- * hsh.to_h {|key, value| block } -> new_hash
+ * hash.to_h -> self or new_hash
+ * hash.to_h {|key, value| ... } -> new_hash
+ *
+ * For an instance of \Hash, returns +self+.
*
- * Returns +self+. If called on a subclass of Hash, converts
- * the receiver to a Hash object.
+ * For a subclass of \Hash, returns a new \Hash
+ * containing the content of +self+.
*
- * If a block is given, the results of the block on each pair of
- * the receiver will be used as pairs.
+ * When a block is given, returns a new \Hash object
+ * whose content is based on the block;
+ * the block should return a 2-element \Array object
+ * specifying the key-value pair to be included in the returned \Array:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.to_h {|key, value| [value, key] }
+ * h1 # => {0=>:foo, 1=>:bar, 2=>:baz}
*/
static VALUE
@@ -3321,7 +3617,7 @@ rb_hash_to_h(VALUE hash)
return rb_hash_to_h_block(hash);
}
if (rb_obj_class(hash) != rb_cHash) {
- const VALUE flags = RBASIC(hash)->flags;
+ const VALUE flags = RBASIC(hash)->flags;
hash = hash_dup(hash, rb_cHash, flags & RHASH_PROC_DEFAULT);
}
return hash;
@@ -3336,14 +3632,11 @@ keys_i(VALUE key, VALUE value, VALUE ary)
/*
* call-seq:
- * hsh.keys -> array
- *
- * Returns a new array populated with the keys from this hash. See also
- * Hash#values.
- *
- * h = { "a" => 100, "b" => 200, "c" => 300, "d" => 400 }
- * h.keys #=> ["a", "b", "c", "d"]
+ * hash.keys -> new_array
*
+ * Returns a new \Array containing all keys in +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.keys # => [:foo, :bar, :baz]
*/
MJIT_FUNC_EXPORTED VALUE
@@ -3365,10 +3658,10 @@ rb_hash_keys(VALUE hash)
}
});
rb_gc_writebarrier_remember(keys);
- rb_ary_set_len(keys, size);
+ rb_ary_set_len(keys, size);
}
else {
- rb_hash_foreach(hash, keys_i, keys);
+ rb_hash_foreach(hash, keys_i, keys);
}
return keys;
@@ -3383,14 +3676,11 @@ values_i(VALUE key, VALUE value, VALUE ary)
/*
* call-seq:
- * hsh.values -> array
- *
- * Returns a new array populated with the values from <i>hsh</i>. See
- * also Hash#keys.
- *
- * h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.values #=> [100, 200, 300]
+ * hash.values -> new_array
*
+ * Returns a new \Array containing all values in +self+:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.values # => [0, 1, 2]
*/
VALUE
@@ -3416,10 +3706,11 @@ rb_hash_values(VALUE hash)
size = st_values(table, ptr, size);
});
}
- rb_ary_set_len(values, size);
+ rb_ary_set_len(values, size);
}
+
else {
- rb_hash_foreach(hash, values_i, values);
+ rb_hash_foreach(hash, values_i, values);
}
return values;
@@ -3427,32 +3718,20 @@ rb_hash_values(VALUE hash)
/*
* call-seq:
- * hsh.has_key?(key) -> true or false
- * hsh.include?(key) -> true or false
- * hsh.key?(key) -> true or false
- * hsh.member?(key) -> true or false
- *
- * Returns <code>true</code> if the given key is present in <i>hsh</i>.
- *
- * h = { "a" => 100, "b" => 200 }
- * h.has_key?("a") #=> true
- * h.has_key?("z") #=> false
- *
- * Note that #include? and #member? do not test member
- * equality using <code>==</code> as do other Enumerables.
+ * hash.include?(key) -> true or false
+ * hash.has_key?(key) -> true or false
+ * hash.key?(key) -> true or false
+ * hash.member?(key) -> true or false
+
+ * Methods #has_key?, #key?, and #member? are aliases for \#include?.
*
- * See also Enumerable#include?
+ * Returns +true+ if +key+ is a key in +self+, otherwise +false+.
*/
MJIT_FUNC_EXPORTED VALUE
rb_hash_has_key(VALUE hash, VALUE key)
{
- if (hash_stlike_lookup(hash, key, NULL)) {
- return Qtrue;
- }
- else {
- return Qfalse;
- }
+ return RBOOL(hash_stlike_lookup(hash, key, NULL));
}
static int
@@ -3461,23 +3740,20 @@ rb_hash_search_value(VALUE key, VALUE value, VALUE arg)
VALUE *data = (VALUE *)arg;
if (rb_equal(value, data[1])) {
- data[0] = Qtrue;
- return ST_STOP;
+ data[0] = Qtrue;
+ return ST_STOP;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.has_value?(value) -> true or false
- * hsh.value?(value) -> true or false
+ * hash.has_value?(value) -> true or false
+ * hash.value?(value) -> true or false
*
- * Returns <code>true</code> if the given value is present for some key
- * in <i>hsh</i>.
+ * Method #value? is an alias for \#has_value?.
*
- * h = { "a" => 100, "b" => 200 }
- * h.value?(100) #=> true
- * h.value?(999) #=> false
+ * Returns +true+ if +value+ is a value in +self+, otherwise +false+.
*/
static VALUE
@@ -3536,23 +3812,23 @@ hash_equal(VALUE hash1, VALUE hash2, int eql)
if (hash1 == hash2) return Qtrue;
if (!RB_TYPE_P(hash2, T_HASH)) {
- if (!rb_respond_to(hash2, idTo_hash)) {
- return Qfalse;
- }
- if (eql) {
- if (rb_eql(hash2, hash1)) {
- return Qtrue;
- }
- else {
- return Qfalse;
- }
- }
- else {
- return rb_equal(hash2, hash1);
- }
+ if (!rb_respond_to(hash2, idTo_hash)) {
+ return Qfalse;
+ }
+ if (eql) {
+ if (rb_eql(hash2, hash1)) {
+ return Qtrue;
+ }
+ else {
+ return Qfalse;
+ }
+ }
+ else {
+ return rb_equal(hash2, hash1);
+ }
}
if (RHASH_SIZE(hash1) != RHASH_SIZE(hash2))
- return Qfalse;
+ return Qfalse;
if (!RHASH_TABLE_EMPTY_P(hash1) && !RHASH_TABLE_EMPTY_P(hash2)) {
if (RHASH_TYPE(hash1) != RHASH_TYPE(hash2)) {
return Qfalse;
@@ -3567,33 +3843,28 @@ hash_equal(VALUE hash1, VALUE hash2, int eql)
#if 0
if (!(rb_equal(RHASH_IFNONE(hash1), RHASH_IFNONE(hash2)) &&
FL_TEST(hash1, RHASH_PROC_DEFAULT) == FL_TEST(hash2, RHASH_PROC_DEFAULT)))
- return Qfalse;
+ return Qfalse;
#endif
return Qtrue;
}
/*
* call-seq:
- * hsh == other_hash -> true or false
- *
- * Equality---Two hashes are equal if they each contain the same number
- * of keys and if each key-value pair is equal to (according to
- * Object#==) the corresponding elements in the other hash.
- *
- * h1 = { "a" => 1, "c" => 2 }
- * h2 = { 7 => 35, "c" => 2, "a" => 1 }
- * h3 = { "a" => 1, "c" => 2, 7 => 35 }
- * h4 = { "a" => 1, "d" => 2, "f" => 35 }
- * h1 == h2 #=> false
- * h2 == h3 #=> true
- * h3 == h4 #=> false
+ * hash == object -> true or false
*
- * The orders of each hashes are not compared.
+ * Returns +true+ if all of the following are true:
+ * * +object+ is a \Hash object.
+ * * +hash+ and +object+ have the same keys (regardless of order).
+ * * For each key +key+, <tt>hash[key] == object[key]</tt>.
*
- * h1 = { "a" => 1, "c" => 2 }
- * h2 = { "c" => 2, "a" => 1 }
- * h1 == h2 #=> true
+ * Otherwise, returns +false+.
*
+ * Equal:
+ * h1 = {foo: 0, bar: 1, baz: 2}
+ * h2 = {foo: 0, bar: 1, baz: 2}
+ * h1 == h2 # => true
+ * h3 = {baz: 2, bar: 1, foo: 0}
+ * h1 == h3 # => true
*/
static VALUE
@@ -3604,11 +3875,21 @@ rb_hash_equal(VALUE hash1, VALUE hash2)
/*
* call-seq:
- * hash.eql?(other) -> true or false
+ * hash.eql? object -> true or false
*
- * Returns <code>true</code> if <i>hash</i> and <i>other</i> are
- * both hashes with the same content.
- * The orders of each hashes are not compared.
+ * Returns +true+ if all of the following are true:
+ * * +object+ is a \Hash object.
+ * * +hash+ and +object+ have the same keys (regardless of order).
+ * * For each key +key+, <tt>h[key] eql? object[key]</tt>.
+ *
+ * Otherwise, returns +false+.
+ *
+ * Equal:
+ * h1 = {foo: 0, bar: 1, baz: 2}
+ * h2 = {foo: 0, bar: 1, baz: 2}
+ * h1.eql? h2 # => true
+ * h3 = {baz: 2, bar: 1, foo: 0}
+ * h1.eql? h3 # => true
*/
static VALUE
@@ -3631,12 +3912,16 @@ hash_i(VALUE key, VALUE val, VALUE arg)
/*
* call-seq:
- * hsh.hash -> integer
+ * hash.hash -> an_integer
*
- * Compute a hash-code for this hash. Two hashes with the same content
- * will have the same hash code (and will compare using <code>eql?</code>).
+ * Returns the \Integer hash-code for the hash.
*
- * See also Object#hash.
+ * Two \Hash objects have the same hash-code if their content is the same
+ * (regardless or order):
+ * h1 = {foo: 0, bar: 1, baz: 2}
+ * h2 = {baz: 2, bar: 1, foo: 0}
+ * h2.hash == h1.hash # => true
+ * h2.eql? h1 # => true
*/
static VALUE
@@ -3646,7 +3931,7 @@ rb_hash_hash(VALUE hash)
st_index_t hval = rb_hash_start(size);
hval = rb_hash_uint(hval, (st_index_t)rb_hash_hash);
if (size) {
- rb_hash_foreach(hash, hash_i, (VALUE)&hval);
+ rb_hash_foreach(hash, hash_i, (VALUE)&hval);
}
hval = rb_hash_end(hval);
return ST2FIX(hval);
@@ -3661,32 +3946,17 @@ rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
/*
* call-seq:
- * hsh.invert -> new_hash
- *
- * Returns a new hash created by using <i>hsh</i>'s values as keys, and
- * the keys as values.
- * If a key with the same value already exists in the <i>hsh</i>, then
- * the last one defined will be used, the earlier value(s) will be discarded.
- *
- * h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 }
- * h.invert #=> {0=>"a", 100=>"m", 200=>"d", 300=>"y"}
+ * hash.invert -> new_hash
*
- * If there is no key with the same value, Hash#invert is involutive.
- *
- * h = { a: 1, b: 3, c: 4 }
- * h.invert.invert == h #=> true
- *
- * The condition, no key with the same value, can be tested by comparing
- * the size of inverted hash.
- *
- * # no key with the same value
- * h = { a: 1, b: 3, c: 4 }
- * h.size == h.invert.size #=> true
- *
- * # two (or more) keys has the same value
- * h = { a: 1, b: 3, c: 1 }
- * h.size == h.invert.size #=> false
+ * Returns a new \Hash object with the each key-value pair inverted:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = h.invert
+ * h1 # => {0=>:foo, 1=>:bar, 2=>:baz}
*
+ * Overwrites any repeated new keys:
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
+ * h = {foo: 0, bar: 0, baz: 0}
+ * h.invert # => {0=>:baz}
*/
static VALUE
@@ -3699,42 +3969,23 @@ rb_hash_invert(VALUE hash)
}
static int
-rb_hash_update_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
-{
- if (existing) {
- arg->old_value = *value;
- arg->new_value = arg->arg;
- }
- else {
- arg->new_key = *key;
- arg->new_value = arg->arg;
- }
- *value = arg->arg;
- return ST_CONTINUE;
-}
-
-NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback)
-
-static int
rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
{
- RHASH_UPDATE(hash, key, rb_hash_update_callback, value);
+ rb_hash_aset(hash, key, value);
return ST_CONTINUE;
}
static int
rb_hash_update_block_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
{
- VALUE newvalue = (VALUE)arg->arg;
+ st_data_t newvalue = arg->arg;
if (existing) {
- newvalue = rb_yield_values(3, (VALUE)*key, (VALUE)*value, newvalue);
- arg->old_value = *value;
+ newvalue = (st_data_t)rb_yield_values(3, (VALUE)*key, (VALUE)*value, (VALUE)newvalue);
}
- else {
- arg->new_key = *key;
+ else if (RHASH_STRING_KEY_P(arg->hash, *key) && !RB_OBJ_FROZEN(*key)) {
+ *key = rb_hash_key_str(*key);
}
- arg->new_value = newvalue;
*value = newvalue;
return ST_CONTINUE;
}
@@ -3750,45 +4001,52 @@ rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
/*
* call-seq:
- * hsh.merge!(other_hash1, other_hash2, ...) -> hsh
- * hsh.update(other_hash1, other_hash2, ...) -> hsh
- * hsh.merge!(other_hash1, other_hash2, ...) {|key, oldval, newval| block}
- * -> hsh
- * hsh.update(other_hash1, other_hash2, ...) {|key, oldval, newval| block}
- * -> hsh
- *
- * Adds the contents of the given hashes to the receiver.
- *
- * If no block is given, entries with duplicate keys are overwritten
- * with the values from each +other_hash+ successively,
- * otherwise the value for each duplicate key is determined by
- * calling the block with the key, its value in the receiver and
- * its value in each +other_hash+.
- *
- * h1 = { "a" => 100, "b" => 200 }
- * h1.merge! #=> {"a"=>100, "b"=>200}
- * h1 #=> {"a"=>100, "b"=>200}
- *
- * h1 = { "a" => 100, "b" => 200 }
- * h2 = { "b" => 246, "c" => 300 }
- * h1.merge!(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
- * h1 #=> {"a"=>100, "b"=>246, "c"=>300}
- *
- * h1 = { "a" => 100, "b" => 200 }
- * h2 = { "b" => 246, "c" => 300 }
- * h3 = { "b" => 357, "d" => 400 }
- * h1.merge!(h2, h3)
- * #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
- * h1 #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
- *
- * h1 = { "a" => 100, "b" => 200 }
- * h2 = { "b" => 246, "c" => 300 }
- * h3 = { "b" => 357, "d" => 400 }
- * h1.merge!(h2, h3) {|key, v1, v2| v1 }
- * #=> {"a"=>100, "b"=>200, "c"=>300, "d"=>400}
- * h1 #=> {"a"=>100, "b"=>200, "c"=>300, "d"=>400}
- *
- * Hash#update is an alias for Hash#merge!.
+ * hash.merge! -> self
+ * hash.merge!(*other_hashes) -> self
+ * hash.merge!(*other_hashes) { |key, old_value, new_value| ... } -> self
+ *
+ * Merges each of +other_hashes+ into +self+; returns +self+.
+ *
+ * Each argument in +other_hashes+ must be a \Hash.
+ *
+ * \Method #update is an alias for \#merge!.
+ *
+ * With arguments and no block:
+ * * Returns +self+, after the given hashes are merged into it.
+ * * The given hashes are merged left to right.
+ * * Each new entry is added at the end.
+ * * Each duplicate-key entry's value overwrites the previous value.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = {bat: 3, bar: 4}
+ * h2 = {bam: 5, bat:6}
+ * h.merge!(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5}
+ *
+ * With arguments and a block:
+ * * Returns +self+, after the given hashes are merged.
+ * * The given hashes are merged left to right.
+ * * Each new-key entry is added at the end.
+ * * For each duplicate key:
+ * * Calls the block with the key and the old and new values.
+ * * The block's return value becomes the new value for the entry.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = {bat: 3, bar: 4}
+ * h2 = {bam: 5, bat:6}
+ * h3 = h.merge!(h1, h2) { |key, old_value, new_value| old_value + new_value }
+ * h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5}
+ *
+ * With no arguments:
+ * * Returns +self+, unmodified.
+ * * The block, if given, is ignored.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.merge # => {:foo=>0, :bar=>1, :baz=>2}
+ * h1 = h.merge! { |key, old_value, new_value| raise 'Cannot happen' }
+ * h1 # => {:foo=>0, :bar=>1, :baz=>2}
*/
static VALUE
@@ -3799,13 +4057,13 @@ rb_hash_update(int argc, VALUE *argv, VALUE self)
rb_hash_modify(self);
for (i = 0; i < argc; i++){
- VALUE hash = to_hash(argv[i]);
- if (block_given) {
- rb_hash_foreach(hash, rb_hash_update_block_i, self);
- }
- else {
- rb_hash_foreach(hash, rb_hash_update_i, self);
- }
+ VALUE hash = to_hash(argv[i]);
+ if (block_given) {
+ rb_hash_foreach(hash, rb_hash_update_block_i, self);
+ }
+ else {
+ rb_hash_foreach(hash, rb_hash_update_i, self);
+ }
}
return self;
}
@@ -3823,13 +4081,8 @@ rb_hash_update_func_callback(st_data_t *key, st_data_t *value, struct update_arg
VALUE newvalue = uf_arg->value;
if (existing) {
- newvalue = (*uf_arg->func)((VALUE)*key, (VALUE)*value, newvalue);
- arg->old_value = *value;
- }
- else {
- arg->new_key = *key;
+ newvalue = (*uf_arg->func)((VALUE)*key, (VALUE)*value, newvalue);
}
- arg->new_value = newvalue;
*value = newvalue;
return ST_CONTINUE;
}
@@ -3853,52 +4106,72 @@ rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
rb_hash_modify(hash1);
hash2 = to_hash(hash2);
if (func) {
- struct update_func_arg arg;
- arg.hash = hash1;
- arg.func = func;
- rb_hash_foreach(hash2, rb_hash_update_func_i, (VALUE)&arg);
+ struct update_func_arg arg;
+ arg.hash = hash1;
+ arg.func = func;
+ rb_hash_foreach(hash2, rb_hash_update_func_i, (VALUE)&arg);
}
else {
- rb_hash_foreach(hash2, rb_hash_update_i, hash1);
+ rb_hash_foreach(hash2, rb_hash_update_i, hash1);
}
return hash1;
}
/*
* call-seq:
- * hsh.merge(other_hash1, other_hash2, ...) -> new_hash
- * hsh.merge(other_hash1, other_hash2, ...) {|key, oldval, newval| block}
- * -> new_hash
- *
- * Returns a new hash that combines the contents of the receiver and
- * the contents of the given hashes.
- *
- * If no block is given, entries with duplicate keys are overwritten
- * with the values from each +other_hash+ successively,
- * otherwise the value for each duplicate key is determined by
- * calling the block with the key, its value in the receiver and
- * its value in each +other_hash+.
- *
- * When called without any argument, returns a copy of the receiver.
- *
- * h1 = { "a" => 100, "b" => 200 }
- * h2 = { "b" => 246, "c" => 300 }
- * h3 = { "b" => 357, "d" => 400 }
- * h1.merge #=> {"a"=>100, "b"=>200}
- * h1.merge(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
- * h1.merge(h2, h3) #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
- * h1.merge(h2) {|key, oldval, newval| newval - oldval}
- * #=> {"a"=>100, "b"=>46, "c"=>300}
- * h1.merge(h2, h3) {|key, oldval, newval| newval - oldval}
- * #=> {"a"=>100, "b"=>311, "c"=>300, "d"=>400}
- * h1 #=> {"a"=>100, "b"=>200}
- *
+ * hash.merge -> copy_of_self
+ * hash.merge(*other_hashes) -> new_hash
+ * hash.merge(*other_hashes) { |key, old_value, new_value| ... } -> new_hash
+ *
+ * Returns the new \Hash formed by merging each of +other_hashes+
+ * into a copy of +self+.
+ *
+ * Each argument in +other_hashes+ must be a \Hash.
+ *
+ * ---
+ *
+ * With arguments and no block:
+ * * Returns the new \Hash object formed by merging each successive
+ * \Hash in +other_hashes+ into +self+.
+ * * Each new-key entry is added at the end.
+ * * Each duplicate-key entry's value overwrites the previous value.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = {bat: 3, bar: 4}
+ * h2 = {bam: 5, bat:6}
+ * h.merge(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5}
+ *
+ * With arguments and a block:
+ * * Returns a new \Hash object that is the merge of +self+ and each given hash.
+ * * The given hashes are merged left to right.
+ * * Each new-key entry is added at the end.
+ * * For each duplicate key:
+ * * Calls the block with the key and the old and new values.
+ * * The block's return value becomes the new value for the entry.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h1 = {bat: 3, bar: 4}
+ * h2 = {bam: 5, bat:6}
+ * h3 = h.merge(h1, h2) { |key, old_value, new_value| old_value + new_value }
+ * h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5}
+ *
+ * With no arguments:
+ * * Returns a copy of +self+.
+ * * The block, if given, is ignored.
+ *
+ * Example:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.merge # => {:foo=>0, :bar=>1, :baz=>2}
+ * h1 = h.merge { |key, old_value, new_value| raise 'Cannot happen' }
+ * h1 # => {:foo=>0, :bar=>1, :baz=>2}
*/
static VALUE
rb_hash_merge(int argc, VALUE *argv, VALUE self)
{
- return rb_hash_update(argc, argv, rb_hash_dup(self));
+ return rb_hash_update(argc, argv, copy_compare_by_id(rb_hash_dup(self), self));
}
static int
@@ -3934,27 +4207,24 @@ assoc_i(VALUE key, VALUE val, VALUE arg)
VALUE *args = (VALUE *)arg;
if (RTEST(rb_equal(args[0], key))) {
- args[1] = rb_assoc_new(key, val);
- return ST_STOP;
+ args[1] = rb_assoc_new(key, val);
+ return ST_STOP;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hash.assoc(obj) -> an_array or nil
+ * hash.assoc(key) -> new_array or nil
*
- * Searches through the hash comparing _obj_ with the key using <code>==</code>.
- * Returns the key-value pair (two elements array) or +nil+
- * if no match is found. See Array#assoc.
+ * If the given +key+ is found, returns a 2-element \Array containing that key and its value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.assoc(:bar) # => [:bar, 1]
*
- * h = {"colors" => ["red", "blue", "green"],
- * "letters" => ["a", "b", "c" ]}
- * h.assoc("letters") #=> ["letters", ["a", "b", "c"]]
- * h.assoc("foo") #=> nil
+ * Returns +nil+ if key +key+ is not found.
*/
-VALUE
+static VALUE
rb_hash_assoc(VALUE hash, VALUE key)
{
st_table *table;
@@ -3968,20 +4238,20 @@ rb_hash_assoc(VALUE hash, VALUE key)
table = RHASH_ST_TABLE(hash);
orighash = table->type;
- if (orighash != &identhash) {
- VALUE value;
- struct reset_hash_type_arg ensure_arg;
- struct st_hash_type assochash;
+ if (!RHASH_IDENTHASH_P(hash)) {
+ VALUE value;
+ struct reset_hash_type_arg ensure_arg;
+ struct st_hash_type assochash;
- assochash.compare = assoc_cmp;
- assochash.hash = orighash->hash;
+ assochash.compare = assoc_cmp;
+ assochash.hash = orighash->hash;
table->type = &assochash;
- args[0] = hash;
- args[1] = key;
- ensure_arg.hash = hash;
- ensure_arg.orighash = orighash;
- value = rb_ensure(lookup2_call, (VALUE)&args, reset_hash_type, (VALUE)&ensure_arg);
- if (value != Qundef) return rb_assoc_new(key, value);
+ args[0] = hash;
+ args[1] = key;
+ ensure_arg.hash = hash;
+ ensure_arg.orighash = orighash;
+ value = rb_ensure(lookup2_call, (VALUE)&args, reset_hash_type, (VALUE)&ensure_arg);
+ if (!UNDEF_P(value)) return rb_assoc_new(key, value);
}
args[0] = key;
@@ -3996,26 +4266,26 @@ rassoc_i(VALUE key, VALUE val, VALUE arg)
VALUE *args = (VALUE *)arg;
if (RTEST(rb_equal(args[0], val))) {
- args[1] = rb_assoc_new(key, val);
- return ST_STOP;
+ args[1] = rb_assoc_new(key, val);
+ return ST_STOP;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hash.rassoc(obj) -> an_array or nil
+ * hash.rassoc(value) -> new_array or nil
*
- * Searches through the hash comparing _obj_ with the value using <code>==</code>.
- * Returns the first key-value pair (two-element array) that matches. See
- * also Array#rassoc.
+ * Returns a new 2-element \Array consisting of the key and value
+ * of the first-found entry whose value is <tt>==</tt> to value
+ * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]):
+ * h = {foo: 0, bar: 1, baz: 1}
+ * h.rassoc(1) # => [:bar, 1]
*
- * a = {1=> "one", 2 => "two", 3 => "three", "ii" => "two"}
- * a.rassoc("two") #=> [2, "two"]
- * a.rassoc("four") #=> nil
+ * Returns +nil+ if no such value found.
*/
-VALUE
+static VALUE
rb_hash_rassoc(VALUE hash, VALUE obj)
{
VALUE args[2];
@@ -4040,18 +4310,33 @@ flatten_i(VALUE key, VALUE val, VALUE ary)
/*
* call-seq:
- * hash.flatten -> an_array
- * hash.flatten(level) -> an_array
- *
- * Returns a new array that is a one-dimensional flattening of this
- * hash. That is, for every key or value that is an array, extract
- * its elements into the new array. Unlike Array#flatten, this
- * method does not flatten recursively by default. The optional
- * <i>level</i> argument determines the level of recursion to flatten.
- *
- * a = {1=> "one", 2 => [2,"two"], 3 => "three"}
- * a.flatten # => [1, "one", 2, [2, "two"], 3, "three"]
- * a.flatten(2) # => [1, "one", 2, 2, "two", 3, "three"]
+ * hash.flatten -> new_array
+ * hash.flatten(level) -> new_array
+ *
+ * Returns a new \Array object that is a 1-dimensional flattening of +self+.
+ *
+ * ---
+ *
+ * By default, nested Arrays are not flattened:
+ * h = {foo: 0, bar: [:bat, 3], baz: 2}
+ * h.flatten # => [:foo, 0, :bar, [:bat, 3], :baz, 2]
+ *
+ * Takes the depth of recursive flattening from \Integer argument +level+:
+ * h = {foo: 0, bar: [:bat, [:baz, [:bat, ]]]}
+ * h.flatten(1) # => [:foo, 0, :bar, [:bat, [:baz, [:bat]]]]
+ * h.flatten(2) # => [:foo, 0, :bar, :bat, [:baz, [:bat]]]
+ * h.flatten(3) # => [:foo, 0, :bar, :bat, :baz, [:bat]]
+ * h.flatten(4) # => [:foo, 0, :bar, :bat, :baz, :bat]
+ *
+ * When +level+ is negative, flattens all nested Arrays:
+ * h = {foo: 0, bar: [:bat, [:baz, [:bat, ]]]}
+ * h.flatten(-1) # => [:foo, 0, :bar, :bat, :baz, :bat]
+ * h.flatten(-2) # => [:foo, 0, :bar, :bat, :baz, :bat]
+ *
+ * When +level+ is zero, returns the equivalent of #to_a :
+ * h = {foo: 0, bar: [:bat, 3], baz: 2}
+ * h.flatten(0) # => [[:foo, 0], [:bar, [:bat, 3]], [:baz, 2]]
+ * h.flatten(0) == h.to_a # => true
*/
static VALUE
@@ -4062,26 +4347,26 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
rb_check_arity(argc, 0, 1);
if (argc) {
- int level = NUM2INT(argv[0]);
+ int level = NUM2INT(argv[0]);
- if (level == 0) return rb_hash_to_a(hash);
+ if (level == 0) return rb_hash_to_a(hash);
- ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
- rb_hash_foreach(hash, flatten_i, ary);
- level--;
+ ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
+ rb_hash_foreach(hash, flatten_i, ary);
+ level--;
- if (level > 0) {
- VALUE ary_flatten_level = INT2FIX(level);
- rb_funcallv(ary, id_flatten_bang, 1, &ary_flatten_level);
- }
- else if (level < 0) {
- /* flatten recursively */
- rb_funcallv(ary, id_flatten_bang, 0, 0);
- }
+ if (level > 0) {
+ VALUE ary_flatten_level = INT2FIX(level);
+ rb_funcallv(ary, id_flatten_bang, 1, &ary_flatten_level);
+ }
+ else if (level < 0) {
+ /* flatten recursively */
+ rb_funcallv(ary, id_flatten_bang, 0, 0);
+ }
}
else {
- ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
- rb_hash_foreach(hash, flatten_i, ary);
+ ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
+ rb_hash_foreach(hash, flatten_i, ary);
}
return ary;
@@ -4091,7 +4376,7 @@ static int
delete_if_nil(VALUE key, VALUE value, VALUE hash)
{
if (NIL_P(value)) {
- return ST_DELETE;
+ return ST_DELETE;
}
return ST_CONTINUE;
}
@@ -4100,21 +4385,19 @@ static int
set_if_not_nil(VALUE key, VALUE value, VALUE hash)
{
if (!NIL_P(value)) {
- rb_hash_aset(hash, key, value);
+ rb_hash_aset(hash, key, value);
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.compact -> new_hash
- *
- * Returns a new hash with the nil values/key pairs removed
- *
- * h = { a: 1, b: false, c: nil }
- * h.compact #=> { a: 1, b: false }
- * h #=> { a: 1, b: false, c: nil }
+ * hash.compact -> new_hash
*
+ * Returns a copy of +self+ with all +nil+-valued entries removed:
+ * h = {foo: 0, bar: nil, baz: 2, bat: nil}
+ * h1 = h.compact
+ * h1 # => {:foo=>0, :baz=>2}
*/
static VALUE
@@ -4122,21 +4405,20 @@ rb_hash_compact(VALUE hash)
{
VALUE result = rb_hash_new();
if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, set_if_not_nil, result);
+ rb_hash_foreach(hash, set_if_not_nil, result);
}
return result;
}
/*
* call-seq:
- * hsh.compact! -> hsh or nil
+ * hash.compact! -> self or nil
*
- * Removes all nil values from the hash.
- * Returns nil if no changes were made, otherwise returns the hash.
- *
- * h = { a: 1, b: false, c: nil }
- * h.compact! #=> { a: 1, b: false }
+ * Returns +self+ with all its +nil+-valued entries removed (in place):
+ * h = {foo: 0, bar: nil, baz: 2, bat: nil}
+ * h.compact! # => {:foo=>0, :baz=>2}
*
+ * Returns +nil+ if no entries were removed.
*/
static VALUE
@@ -4146,9 +4428,9 @@ rb_hash_compact_bang(VALUE hash)
rb_hash_modify_check(hash);
n = RHASH_SIZE(hash);
if (n) {
- rb_hash_foreach(hash, delete_if_nil, hash);
+ rb_hash_foreach(hash, delete_if_nil, hash);
if (n != RHASH_SIZE(hash))
- return hash;
+ return hash;
}
return Qnil;
}
@@ -4157,21 +4439,33 @@ static st_table *rb_init_identtable_with_size(st_index_t size);
/*
* call-seq:
- * hsh.compare_by_identity -> hsh
- *
- * Makes <i>hsh</i> compare its keys by their identity, i.e. it
- * will consider exact same objects as same keys.
- *
- * h1 = { "a" => 100, "b" => 200, :c => "c" }
- * h1["a"] #=> 100
- * h1.compare_by_identity
- * h1.compare_by_identity? #=> true
- * h1["a".dup] #=> nil # different objects.
- * h1[:c] #=> "c" # same symbols are all same.
- *
+ * hash.compare_by_identity -> self
+ *
+ * Sets +self+ to consider only identity in comparing keys;
+ * two keys are considered the same only if they are the same object;
+ * returns +self+.
+ *
+ * By default, these two object are considered to be the same key,
+ * so +s1+ will overwrite +s0+:
+ * s0 = 'x'
+ * s1 = 'x'
+ * h = {}
+ * h.compare_by_identity? # => false
+ * h[s0] = 0
+ * h[s1] = 1
+ * h # => {"x"=>1}
+ *
+ * After calling \#compare_by_identity, the keys are considered to be different,
+ * and therefore do not overwrite each other:
+ * h = {}
+ * h.compare_by_identity # => {}
+ * h.compare_by_identity? # => true
+ * h[s0] = 0
+ * h[s1] = 1
+ * h # => {"x"=>0, "x"=>1}
*/
-static VALUE
+VALUE
rb_hash_compare_by_id(VALUE hash)
{
VALUE tmp;
@@ -4190,29 +4484,21 @@ rb_hash_compare_by_id(VALUE hash)
st_free_table(RHASH_ST_TABLE(hash));
RHASH_ST_TABLE_SET(hash, identtable);
RHASH_ST_CLEAR(tmp);
- rb_gc_force_recycle(tmp);
return hash;
}
/*
* call-seq:
- * hsh.compare_by_identity? -> true or false
- *
- * Returns <code>true</code> if <i>hsh</i> will compare its keys by
- * their identity. Also see Hash#compare_by_identity.
+ * hash.compare_by_identity? -> true or false
*
+ * Returns +true+ if #compare_by_identity has been called, +false+ otherwise.
*/
MJIT_FUNC_EXPORTED VALUE
rb_hash_compare_by_id_p(VALUE hash)
{
- if (RHASH_ST_TABLE_P(hash) && RHASH_ST_TABLE(hash)->type == &identhash) {
- return Qtrue;
- }
- else {
- return Qfalse;
- }
+ return RBOOL(RHASH_IDENTHASH_P(hash));
}
VALUE
@@ -4223,6 +4509,14 @@ rb_ident_hash_new(void)
return hash;
}
+VALUE
+rb_ident_hash_new_with_size(st_index_t size)
+{
+ VALUE hash = rb_hash_new();
+ RHASH_ST_TABLE_SET(hash, st_init_table_with_size(&identhash, size));
+ return hash;
+}
+
st_table *
rb_init_identtable(void)
{
@@ -4240,8 +4534,8 @@ any_p_i(VALUE key, VALUE value, VALUE arg)
{
VALUE ret = rb_yield(rb_assoc_new(key, value));
if (RTEST(ret)) {
- *(VALUE *)arg = Qtrue;
- return ST_STOP;
+ *(VALUE *)arg = Qtrue;
+ return ST_STOP;
}
return ST_CONTINUE;
}
@@ -4251,8 +4545,8 @@ any_p_i_fast(VALUE key, VALUE value, VALUE arg)
{
VALUE ret = rb_yield_values(2, key, value);
if (RTEST(ret)) {
- *(VALUE *)arg = Qtrue;
- return ST_STOP;
+ *(VALUE *)arg = Qtrue;
+ return ST_STOP;
}
return ST_CONTINUE;
}
@@ -4262,18 +4556,39 @@ any_p_i_pattern(VALUE key, VALUE value, VALUE arg)
{
VALUE ret = rb_funcall(((VALUE *)arg)[1], idEqq, 1, rb_assoc_new(key, value));
if (RTEST(ret)) {
- *(VALUE *)arg = Qtrue;
- return ST_STOP;
+ *(VALUE *)arg = Qtrue;
+ return ST_STOP;
}
return ST_CONTINUE;
}
/*
* call-seq:
- * hsh.any? [{ |(key, value)| block }] -> true or false
- * hsh.any?(pattern) -> true or false
- *
- * See also Enumerable#any?
+ * hash.any? -> true or false
+ * hash.any?(object) -> true or false
+ * hash.any? {|key, value| ... } -> true or false
+ *
+ * Returns +true+ if any element satisfies a given criterion;
+ * +false+ otherwise.
+ *
+ * With no argument and no block,
+ * returns +true+ if +self+ is non-empty; +false+ if empty.
+ *
+ * With argument +object+ and no block,
+ * returns +true+ if for any key +key+
+ * <tt>h.assoc(key) == object</tt>:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.any?([:bar, 1]) # => true
+ * h.any?([:bar, 0]) # => false
+ * h.any?([:baz, 1]) # => false
+ *
+ * With no argument and a block,
+ * calls the block with each key-value pair;
+ * returns +true+ if the block returns any truthy value,
+ * +false+ otherwise:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.any? {|key, value| value < 3 } # => true
+ * h.any? {|key, value| value > 3 } # => false
*/
static VALUE
@@ -4288,40 +4603,50 @@ rb_hash_any_p(int argc, VALUE *argv, VALUE hash)
if (rb_block_given_p()) {
rb_warn("given block not used");
}
- args[1] = argv[0];
+ args[1] = argv[0];
- rb_hash_foreach(hash, any_p_i_pattern, (VALUE)args);
+ rb_hash_foreach(hash, any_p_i_pattern, (VALUE)args);
}
else {
- if (!rb_block_given_p()) {
- /* yields pairs, never false */
- return Qtrue;
- }
- if (rb_block_arity() > 1)
- rb_hash_foreach(hash, any_p_i_fast, (VALUE)args);
- else
- rb_hash_foreach(hash, any_p_i, (VALUE)args);
+ if (!rb_block_given_p()) {
+ /* yields pairs, never false */
+ return Qtrue;
+ }
+ if (rb_block_pair_yield_optimizable())
+ rb_hash_foreach(hash, any_p_i_fast, (VALUE)args);
+ else
+ rb_hash_foreach(hash, any_p_i, (VALUE)args);
}
return args[0];
}
/*
- * call-seq:
- * hsh.dig(key, ...) -> object
- *
- * Extracts the nested value specified by the sequence of <i>key</i>
- * objects by calling +dig+ at each step, returning +nil+ if any
- * intermediate step is +nil+.
- *
- * h = { foo: {bar: {baz: 1}}}
- *
- * h.dig(:foo, :bar, :baz) #=> 1
- * h.dig(:foo, :zot, :xyz) #=> nil
- *
- * g = { foo: [10, 11, 12] }
- * g.dig(:foo, 1) #=> 11
- * g.dig(:foo, 1, 0) #=> TypeError: Integer does not have #dig method
- * g.dig(:foo, :bar) #=> TypeError: no implicit conversion of Symbol into Integer
+ * call-seq:
+ * hash.dig(key, *identifiers) -> object
+ *
+ * Finds and returns the object in nested objects
+ * that is specified by +key+ and +identifiers+.
+ * The nested objects may be instances of various classes.
+ * See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
+ *
+ * Nested Hashes:
+ * h = {foo: {bar: {baz: 2}}}
+ * h.dig(:foo) # => {:bar=>{:baz=>2}}
+ * h.dig(:foo, :bar) # => {:baz=>2}
+ * h.dig(:foo, :bar, :baz) # => 2
+ * h.dig(:foo, :bar, :BAZ) # => nil
+ *
+ * Nested Hashes and Arrays:
+ * h = {foo: {bar: [:a, :b, :c]}}
+ * h.dig(:foo, :bar, 2) # => :c
+ *
+ * This method will use the {default values}[rdoc-ref:Hash@Default+Values]
+ * for keys that are not present:
+ * h = {foo: {bar: [:a, :b, :c]}}
+ * h.dig(:hello) # => nil
+ * h.default_proc = -> (hash, _key) { hash }
+ * h.dig(:hello, :world) # => h
+ * h.dig(:hello, :world, :foo, :bar, 2) # => :c
*/
static VALUE
@@ -4339,7 +4664,7 @@ hash_le_i(VALUE key, VALUE value, VALUE arg)
{
VALUE *args = (VALUE *)arg;
VALUE v = rb_hash_lookup2(args[0], key, Qundef);
- if (v != Qundef && rb_equal(value, v)) return ST_CONTINUE;
+ if (!UNDEF_P(v) && rb_equal(value, v)) return ST_CONTINUE;
args[1] = Qfalse;
return ST_STOP;
}
@@ -4355,17 +4680,15 @@ hash_le(VALUE hash1, VALUE hash2)
}
/*
- * call-seq:
- * hash <= other -> true or false
- *
- * Returns <code>true</code> if <i>hash</i> is subset of
- * <i>other</i> or equals to <i>other</i>.
- *
- * h1 = {a:1, b:2}
- * h2 = {a:1, b:2, c:3}
- * h1 <= h2 #=> true
- * h2 <= h1 #=> false
- * h1 <= h1 #=> true
+ * call-seq:
+ * hash <= other_hash -> true or false
+ *
+ * Returns +true+ if +hash+ is a subset of +other_hash+, +false+ otherwise:
+ * h1 = {foo: 0, bar: 1}
+ * h2 = {foo: 0, bar: 1, baz: 2}
+ * h1 <= h2 # => true
+ * h2 <= h1 # => false
+ * h1 <= h1 # => true
*/
static VALUE
rb_hash_le(VALUE hash, VALUE other)
@@ -4376,17 +4699,15 @@ rb_hash_le(VALUE hash, VALUE other)
}
/*
- * call-seq:
- * hash < other -> true or false
- *
- * Returns <code>true</code> if <i>hash</i> is subset of
- * <i>other</i>.
- *
- * h1 = {a:1, b:2}
- * h2 = {a:1, b:2, c:3}
- * h1 < h2 #=> true
- * h2 < h1 #=> false
- * h1 < h1 #=> false
+ * call-seq:
+ * hash < other_hash -> true or false
+ *
+ * Returns +true+ if +hash+ is a proper subset of +other_hash+, +false+ otherwise:
+ * h1 = {foo: 0, bar: 1}
+ * h2 = {foo: 0, bar: 1, baz: 2}
+ * h1 < h2 # => true
+ * h2 < h1 # => false
+ * h1 < h1 # => false
*/
static VALUE
rb_hash_lt(VALUE hash, VALUE other)
@@ -4397,17 +4718,15 @@ rb_hash_lt(VALUE hash, VALUE other)
}
/*
- * call-seq:
- * hash >= other -> true or false
- *
- * Returns <code>true</code> if <i>other</i> is subset of
- * <i>hash</i> or equals to <i>hash</i>.
- *
- * h1 = {a:1, b:2}
- * h2 = {a:1, b:2, c:3}
- * h1 >= h2 #=> false
- * h2 >= h1 #=> true
- * h1 >= h1 #=> true
+ * call-seq:
+ * hash >= other_hash -> true or false
+ *
+ * Returns +true+ if +hash+ is a superset of +other_hash+, +false+ otherwise:
+ * h1 = {foo: 0, bar: 1, baz: 2}
+ * h2 = {foo: 0, bar: 1}
+ * h1 >= h2 # => true
+ * h2 >= h1 # => false
+ * h1 >= h1 # => true
*/
static VALUE
rb_hash_ge(VALUE hash, VALUE other)
@@ -4418,17 +4737,15 @@ rb_hash_ge(VALUE hash, VALUE other)
}
/*
- * call-seq:
- * hash > other -> true or false
- *
- * Returns <code>true</code> if <i>other</i> is subset of
- * <i>hash</i>.
- *
- * h1 = {a:1, b:2}
- * h2 = {a:1, b:2, c:3}
- * h1 > h2 #=> false
- * h2 > h1 #=> true
- * h1 > h1 #=> false
+ * call-seq:
+ * hash > other_hash -> true or false
+ *
+ * Returns +true+ if +hash+ is a proper superset of +other_hash+, +false+ otherwise:
+ * h1 = {foo: 0, bar: 1, baz: 2}
+ * h2 = {foo: 0, bar: 1}
+ * h1 > h2 # => true
+ * h2 > h1 # => false
+ * h1 > h1 # => false
*/
static VALUE
rb_hash_gt(VALUE hash, VALUE other)
@@ -4446,22 +4763,21 @@ hash_proc_call(RB_BLOCK_CALL_FUNC_ARGLIST(key, hash))
}
/*
- * call-seq:
- * hash.to_proc -> proc
- *
- * Returns a Proc which maps keys to values.
- *
- * h = {a:1, b:2}
- * hp = h.to_proc
- * hp.call(:a) #=> 1
- * hp.call(:b) #=> 2
- * hp.call(:c) #=> nil
- * [:a, :b, :c].map(&h) #=> [1, 2, nil]
+ * call-seq:
+ * hash.to_proc -> proc
+ *
+ * Returns a \Proc object that maps a key to its value:
+ * h = {foo: 0, bar: 1, baz: 2}
+ * proc = h.to_proc
+ * proc.class # => Proc
+ * proc.call(:foo) # => 0
+ * proc.call(:bar) # => 1
+ * proc.call(:nosuch) # => nil
*/
static VALUE
rb_hash_to_proc(VALUE hash)
{
- return rb_func_proc_new(hash_proc_call, hash);
+ return rb_func_lambda_new(hash_proc_call, hash, 1, 1);
}
static VALUE
@@ -4500,7 +4816,7 @@ rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val)
if (ret != -1) {
return ret;
}
- ar_try_convert_table(hash);
+ ar_force_convert_table(hash, __FILE__, __LINE__);
}
tbl = RHASH_TBL_RAW(hash);
return st_update(tbl, (st_data_t)key, add_new_i, (st_data_t)args);
@@ -4561,22 +4877,7 @@ static char **my_environ;
#undef environ
#define environ my_environ
#undef getenv
-static char *(*w32_getenv)(const char*);
-static char *
-w32_getenv_unknown(const char *name)
-{
- char *(*func)(const char*);
- if (rb_locale_encindex() == rb_ascii8bit_encindex()) {
- func = rb_w32_getenv;
- }
- else {
- func = rb_w32_ugetenv;
- }
- /* atomic assignment in flat memory model */
- return (w32_getenv = func)(name);
-}
-static char *(*w32_getenv)(const char*) = w32_getenv_unknown;
-#define getenv(n) w32_getenv(n)
+#define getenv(n) rb_w32_ugetenv(n)
#elif defined(__APPLE__)
#undef environ
#define environ (*_NSGetEnviron())
@@ -4595,35 +4896,32 @@ extern char **environ;
#define ENVNMATCH(s1, s2, n) (memcmp((s1), (s2), (n)) == 0)
#endif
-static VALUE
-env_enc_str_new(const char *ptr, long len, rb_encoding *enc)
+#define ENV_LOCK() RB_VM_LOCK_ENTER()
+#define ENV_UNLOCK() RB_VM_LOCK_LEAVE()
+
+static inline rb_encoding *
+env_encoding(void)
{
#ifdef _WIN32
- rb_encoding *internal = rb_default_internal_encoding();
- const int ecflags = ECONV_INVALID_REPLACE | ECONV_UNDEF_REPLACE;
- rb_encoding *utf8 = rb_utf8_encoding();
- VALUE str = rb_enc_str_new(NULL, 0, (internal ? internal : enc));
- if (NIL_P(rb_str_cat_conv_enc_opts(str, 0, ptr, len, utf8, ecflags, Qnil))) {
- rb_str_initialize(str, ptr, len, NULL);
- }
+ return rb_utf8_encoding();
#else
- VALUE str = rb_external_str_new_with_enc(ptr, len, enc);
+ return rb_locale_encoding();
#endif
-
- rb_obj_freeze(str);
- return str;
}
static VALUE
-env_enc_str_new_cstr(const char *ptr, rb_encoding *enc)
+env_enc_str_new(const char *ptr, long len, rb_encoding *enc)
{
- return env_enc_str_new(ptr, strlen(ptr), enc);
+ VALUE str = rb_external_str_new_with_enc(ptr, len, enc);
+
+ rb_obj_freeze(str);
+ return str;
}
static VALUE
env_str_new(const char *ptr, long len)
{
- return env_enc_str_new(ptr, len, rb_locale_encoding());
+ return env_enc_str_new(ptr, len, env_encoding());
}
static VALUE
@@ -4633,63 +4931,55 @@ env_str_new2(const char *ptr)
return env_str_new(ptr, strlen(ptr));
}
-static const char TZ_ENV[] = "TZ";
-extern bool ruby_tz_uptodate_p;
-
-static rb_encoding *
-env_encoding_for(const char *name, const char *ptr)
+static VALUE
+getenv_with_lock(const char *name)
{
- if (ENVMATCH(name, PATH_ENV)) {
- return rb_filesystem_encoding();
- }
- else {
- return rb_locale_encoding();
+ VALUE ret;
+ ENV_LOCK();
+ {
+ const char *val = getenv(name);
+ ret = env_str_new2(val);
}
+ ENV_UNLOCK();
+ return ret;
}
-static VALUE
-env_name_new(const char *name, const char *ptr)
+static bool
+has_env_with_lock(const char *name)
{
- return env_enc_str_new_cstr(ptr, env_encoding_for(name, ptr));
+ const char *val;
+
+ ENV_LOCK();
+ {
+ val = getenv(name);
+ }
+ ENV_UNLOCK();
+
+ return val ? true : false;
}
+static const char TZ_ENV[] = "TZ";
+
static void *
get_env_cstr(
-#ifdef _WIN32
- volatile VALUE *pstr,
-#else
VALUE str,
-#endif
const char *name)
{
-#ifdef _WIN32
- VALUE str = *pstr;
-#endif
char *var;
rb_encoding *enc = rb_enc_get(str);
if (!rb_enc_asciicompat(enc)) {
- rb_raise(rb_eArgError, "bad environment variable %s: ASCII incompatible encoding: %s",
- name, rb_enc_name(enc));
+ rb_raise(rb_eArgError, "bad environment variable %s: ASCII incompatible encoding: %s",
+ name, rb_enc_name(enc));
}
-#ifdef _WIN32
- if (!rb_enc_str_asciionly_p(str)) {
- *pstr = str = rb_str_conv_enc(str, NULL, rb_utf8_encoding());
- }
-#endif
var = RSTRING_PTR(str);
if (memchr(var, '\0', RSTRING_LEN(str))) {
- rb_raise(rb_eArgError, "bad environment variable %s: contains null byte", name);
+ rb_raise(rb_eArgError, "bad environment variable %s: contains null byte", name);
}
return rb_str_fill_terminator(str, 1); /* ASCII compatible */
}
-#ifdef _WIN32
-#define get_env_ptr(var, val) \
- (var = get_env_cstr(&(val), #var))
-#else
#define get_env_ptr(var, val) \
(var = get_env_cstr(val, #var))
-#endif
static inline const char *
env_name(volatile VALUE *s)
@@ -4704,14 +4994,9 @@ env_name(volatile VALUE *s)
static VALUE env_aset(VALUE nm, VALUE val);
-static VALUE
-env_delete(VALUE name)
+static void
+reset_by_modified_env(const char *nam, const char *val)
{
- const char *nam, *val;
-
- nam = env_name(name);
- val = getenv(nam);
-
/*
* ENV['TZ'] = nil has a special meaning.
* TZ is no longer considered up-to-date and ruby call tzset() as needed.
@@ -4719,41 +5004,47 @@ env_delete(VALUE name)
* This hack might works only on Linux glibc.
*/
if (ENVMATCH(nam, TZ_ENV)) {
- ruby_tz_uptodate_p = FALSE;
+ ruby_reset_timezone(val);
}
+}
- if (val) {
- VALUE value = env_str_new2(val);
+static VALUE
+env_delete(VALUE name)
+{
+ const char *nam = env_name(name);
+ reset_by_modified_env(nam, NULL);
+ VALUE val = getenv_with_lock(nam);
- ruby_setenv(nam, 0);
- if (ENVMATCH(nam, PATH_ENV)) {
- RB_GC_GUARD(name);
- }
- return value;
+ if (!NIL_P(val)) {
+ ruby_setenv(nam, 0);
}
- return Qnil;
+ return val;
}
/*
* call-seq:
- * ENV.delete(name) -> value
- * ENV.delete(name) { |name| block } -> value
+ * ENV.delete(name) -> value
+ * ENV.delete(name) { |name| block } -> value
+ * ENV.delete(missing_name) -> nil
+ * ENV.delete(missing_name) { |name| block } -> block_value
*
* Deletes the environment variable with +name+ if it exists and returns its value:
* ENV['foo'] = '0'
* ENV.delete('foo') # => '0'
- * Returns +nil+ if the named environment variable does not exist:
- * ENV.delete('foo') # => nil
+ *
+ * If a block is not given and the named environment variable does not exist, returns +nil+.
+ *
* If a block given and the environment variable does not exist,
- * yields +name+ to the block and returns +nil+:
- * ENV.delete('foo') { |name| puts name } # => nil
- * foo
+ * yields +name+ to the block and returns the value of the block:
+ * ENV.delete('foo') { |name| name * 2 } # => "foofoo"
+ *
* If a block given and the environment variable exists,
* deletes the environment variable and returns its value (ignoring the block):
* ENV['foo'] = '0'
- * ENV.delete('foo') { |name| fail 'ignored' } # => "0"
+ * ENV.delete('foo') { |name| raise 'ignored' } # => "0"
+ *
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid-Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_delete_m(VALUE obj, VALUE name)
@@ -4761,7 +5052,7 @@ env_delete_m(VALUE obj, VALUE name)
VALUE val;
val = env_delete(name);
- if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
+ if (NIL_P(val) && rb_block_given_p()) val = rb_yield(name);
return val;
}
@@ -4772,23 +5063,17 @@ env_delete_m(VALUE obj, VALUE name)
* Returns the value for the environment variable +name+ if it exists:
* ENV['foo'] = '0'
* ENV['foo'] # => "0"
- * Returns nil if the named variable does not exist:
- * ENV.clear
- * ENV['foo'] # => nil
+ * Returns +nil+ if the named variable does not exist.
+ *
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid-Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
rb_f_getenv(VALUE obj, VALUE name)
{
- const char *nam, *env;
-
- nam = env_name(name);
- env = getenv(nam);
- if (env) {
- return env_name_new(nam, env);
- }
- return Qnil;
+ const char *nam = env_name(name);
+ VALUE env = getenv_with_lock(nam);
+ return env;
}
/*
@@ -4814,38 +5099,33 @@ rb_f_getenv(VALUE obj, VALUE name)
* and neither default value nor block is given:
* ENV.fetch('foo') # Raises KeyError (key not found: "foo")
* Raises an exception if +name+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid-Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_fetch(int argc, VALUE *argv, VALUE _)
{
VALUE key;
long block_given;
- const char *nam, *env;
+ const char *nam;
+ VALUE env;
rb_check_arity(argc, 1, 2);
key = argv[0];
block_given = rb_block_given_p();
if (block_given && argc == 2) {
- rb_warn("block supersedes default value argument");
+ rb_warn("block supersedes default value argument");
}
nam = env_name(key);
- env = getenv(nam);
- if (!env) {
- if (block_given) return rb_yield(key);
- if (argc == 1) {
- rb_key_err_raise(rb_sprintf("key not found: \"%"PRIsVALUE"\"", key), envtbl, key);
- }
- return argv[1];
- }
- return env_name_new(nam, env);
-}
+ env = getenv_with_lock(nam);
-int
-rb_env_path_tainted(void)
-{
- rb_warning("rb_env_path_tainted is deprecated and will be removed in Ruby 3.2.");
- return 0;
+ if (NIL_P(env)) {
+ if (block_given) return rb_yield(key);
+ if (argc == 1) {
+ rb_key_err_raise(rb_sprintf("key not found: \"%"PRIsVALUE"\"", key), envtbl, key);
+ }
+ return argv[1];
+ }
+ return env;
}
#if defined(_WIN32) || (defined(HAVE_SETENV) && defined(HAVE_UNSETENV))
@@ -4855,7 +5135,7 @@ in_origenv(const char *str)
{
char **env;
for (env = origenviron; *env; ++env) {
- if (*env == str) return 1;
+ if (*env == str) return 1;
}
return 0;
}
@@ -4863,13 +5143,15 @@ in_origenv(const char *str)
static int
envix(const char *nam)
{
+ // should be locked
+
register int i, len = strlen(nam);
char **env;
env = GET_ENVIRON(environ);
for (i = 0; env[i]; i++) {
- if (ENVNMATCH(env[i],nam,len) && env[i][len] == '=')
- break; /* memcmp must come first to avoid */
+ if (ENVNMATCH(env[i],nam,len) && env[i][len] == '=')
+ break; /* memcmp must come first to avoid */
} /* potential SEGV's */
FREE_ENVIRON(environ);
return i;
@@ -4899,16 +5181,16 @@ static int
check_envsize(size_t n)
{
if (_WIN32_WINNT < 0x0600 && rb_w32_osver() < 6) {
- /* https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx */
- /* Windows Server 2003 and Windows XP: The maximum size of the
- * environment block for the process is 32,767 characters. */
- WCHAR* p = GetEnvironmentStringsW();
- if (!p) return -1; /* never happen */
- n += getenvsize(p);
- FreeEnvironmentStringsW(p);
- if (n >= getenvblocksize()) {
- return -1;
- }
+ /* https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx */
+ /* Windows Server 2003 and Windows XP: The maximum size of the
+ * environment block for the process is 32,767 characters. */
+ WCHAR* p = GetEnvironmentStringsW();
+ if (!p) return -1; /* never happen */
+ n += getenvsize(p);
+ FreeEnvironmentStringsW(p);
+ if (n >= getenvblocksize()) {
+ return -1;
+ }
}
return 0;
}
@@ -4929,7 +5211,7 @@ static const char *
check_envname(const char *name)
{
if (strchr(name, '=')) {
- invalid_envname(name);
+ invalid_envname(name);
}
return name;
}
@@ -4950,56 +5232,78 @@ ruby_setenv(const char *name, const char *value)
check_envname(name);
len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
if (value) {
- int len2;
- len2 = MultiByteToWideChar(CP_UTF8, 0, value, -1, NULL, 0);
- if (check_envsize((size_t)len + len2)) { /* len and len2 include '\0' */
- goto fail; /* 2 for '=' & '\0' */
- }
- wname = ALLOCV_N(WCHAR, buf, len + len2);
- wvalue = wname + len;
- MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, len);
- MultiByteToWideChar(CP_UTF8, 0, value, -1, wvalue, len2);
+ int len2;
+ len2 = MultiByteToWideChar(CP_UTF8, 0, value, -1, NULL, 0);
+ if (check_envsize((size_t)len + len2)) { /* len and len2 include '\0' */
+ goto fail; /* 2 for '=' & '\0' */
+ }
+ wname = ALLOCV_N(WCHAR, buf, len + len2);
+ wvalue = wname + len;
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, len);
+ MultiByteToWideChar(CP_UTF8, 0, value, -1, wvalue, len2);
#ifndef HAVE__WPUTENV_S
- wname[len-1] = L'=';
+ wname[len-1] = L'=';
#endif
}
else {
- wname = ALLOCV_N(WCHAR, buf, len + 1);
- MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, len);
- wvalue = wname + len;
- *wvalue = L'\0';
+ wname = ALLOCV_N(WCHAR, buf, len + 1);
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, len);
+ wvalue = wname + len;
+ *wvalue = L'\0';
#ifndef HAVE__WPUTENV_S
- wname[len-1] = L'=';
+ wname[len-1] = L'=';
#endif
}
+
+ ENV_LOCK();
+ {
#ifndef HAVE__WPUTENV_S
- failed = _wputenv(wname);
+ failed = _wputenv(wname);
#else
- failed = _wputenv_s(wname, wvalue);
+ failed = _wputenv_s(wname, wvalue);
#endif
+ }
+ ENV_UNLOCK();
+
ALLOCV_END(buf);
/* even if putenv() failed, clean up and try to delete the
* variable from the system area. */
if (!value || !*value) {
- /* putenv() doesn't handle empty value */
- if (!SetEnvironmentVariable(name, value) &&
- GetLastError() != ERROR_ENVVAR_NOT_FOUND) goto fail;
+ /* putenv() doesn't handle empty value */
+ if (!SetEnvironmentVariable(name, value) &&
+ GetLastError() != ERROR_ENVVAR_NOT_FOUND) goto fail;
}
if (failed) {
fail:
- invalid_envname(name);
+ invalid_envname(name);
}
#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
if (value) {
- if (setenv(name, value, 1))
- rb_sys_fail_str(rb_sprintf("setenv(%s)", name));
+ int ret;
+ ENV_LOCK();
+ {
+ ret = setenv(name, value, 1);
+ }
+ ENV_UNLOCK();
+
+ if (ret) rb_sys_fail_str(rb_sprintf("setenv(%s)", name));
}
else {
#ifdef VOID_UNSETENV
- unsetenv(name);
+ ENV_LOCK();
+ {
+ unsetenv(name);
+ }
+ ENV_UNLOCK();
#else
- if (unsetenv(name))
- rb_sys_fail_str(rb_sprintf("unsetenv(%s)", name));
+ int ret;
+ ENV_LOCK();
+ {
+ ret = unsetenv(name);
+ }
+ ENV_UNLOCK();
+
+ if (ret) rb_sys_fail_str(rb_sprintf("unsetenv(%s)", name));
#endif
}
#elif defined __sun
@@ -5013,64 +5317,85 @@ ruby_setenv(const char *name, const char *value)
check_envname(name);
len = strlen(name);
if (value) {
- mem_size = len + strlen(value) + 2;
- mem_ptr = malloc(mem_size);
- if (mem_ptr == NULL)
- rb_sys_fail_str(rb_sprintf("malloc("PRIuSIZE")", mem_size));
- snprintf(mem_ptr, mem_size, "%s=%s", name, value);
- }
- for (env_ptr = GET_ENVIRON(environ); (str = *env_ptr) != 0; ++env_ptr) {
- if (!strncmp(str, name, len) && str[len] == '=') {
- if (!in_origenv(str)) free(str);
- while ((env_ptr[0] = env_ptr[1]) != 0) env_ptr++;
- break;
- }
+ mem_size = len + strlen(value) + 2;
+ mem_ptr = malloc(mem_size);
+ if (mem_ptr == NULL)
+ rb_sys_fail_str(rb_sprintf("malloc(%"PRIuSIZE")", mem_size));
+ snprintf(mem_ptr, mem_size, "%s=%s", name, value);
+ }
+
+ ENV_LOCK();
+ {
+ for (env_ptr = GET_ENVIRON(environ); (str = *env_ptr) != 0; ++env_ptr) {
+ if (!strncmp(str, name, len) && str[len] == '=') {
+ if (!in_origenv(str)) free(str);
+ while ((env_ptr[0] = env_ptr[1]) != 0) env_ptr++;
+ break;
+ }
+ }
}
+ ENV_UNLOCK();
+
if (value) {
- if (putenv(mem_ptr)) {
- free(mem_ptr);
- rb_sys_fail_str(rb_sprintf("putenv(%s)", name));
- }
+ int ret;
+ ENV_LOCK();
+ {
+ ret = putenv(mem_ptr);
+ }
+ ENV_UNLOCK();
+
+ if (ret) {
+ free(mem_ptr);
+ rb_sys_fail_str(rb_sprintf("putenv(%s)", name));
+ }
}
#else /* WIN32 */
size_t len;
int i;
- i=envix(name); /* where does it go? */
-
- if (environ == origenviron) { /* need we copy environment? */
- int j;
- int max;
- char **tmpenv;
-
- for (max = i; environ[max]; max++) ;
- tmpenv = ALLOC_N(char*, max+2);
- for (j=0; j<max; j++) /* copy environment */
- tmpenv[j] = ruby_strdup(environ[j]);
- tmpenv[max] = 0;
- environ = tmpenv; /* tell exec where it is now */
- }
- if (environ[i]) {
- char **envp = origenviron;
- while (*envp && *envp != environ[i]) envp++;
- if (!*envp)
- xfree(environ[i]);
- if (!value) {
- while (environ[i]) {
- environ[i] = environ[i+1];
- i++;
- }
- return;
- }
- }
- else { /* does not exist yet */
- if (!value) return;
- REALLOC_N(environ, char*, i+2); /* just expand it a bit */
- environ[i+1] = 0; /* make sure it's null terminated */
- }
- len = strlen(name) + strlen(value) + 2;
- environ[i] = ALLOC_N(char, len);
- snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
+ ENV_LOCK();
+ {
+ i = envix(name); /* where does it go? */
+
+ if (environ == origenviron) { /* need we copy environment? */
+ int j;
+ int max;
+ char **tmpenv;
+
+ for (max = i; environ[max]; max++) ;
+ tmpenv = ALLOC_N(char*, max+2);
+ for (j=0; j<max; j++) /* copy environment */
+ tmpenv[j] = ruby_strdup(environ[j]);
+ tmpenv[max] = 0;
+ environ = tmpenv; /* tell exec where it is now */
+ }
+
+ if (environ[i]) {
+ char **envp = origenviron;
+ while (*envp && *envp != environ[i]) envp++;
+ if (!*envp)
+ xfree(environ[i]);
+ if (!value) {
+ while (environ[i]) {
+ environ[i] = environ[i+1];
+ i++;
+ }
+ goto finish;
+ }
+ }
+ else { /* does not exist yet */
+ if (!value) goto finish;
+ REALLOC_N(environ, char*, i+2); /* just expand it a bit */
+ environ[i+1] = 0; /* make sure it's null terminated */
+ }
+
+ len = strlen(name) + strlen(value) + 2;
+ environ[i] = ALLOC_N(char, len);
+ snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
+
+ finish:;
+ }
+ ENV_UNLOCK();
#endif /* WIN32 */
}
@@ -5082,14 +5407,14 @@ ruby_unsetenv(const char *name)
/*
* call-seq:
- * ENV[name] = value -> value
+ * ENV[name] = value -> value
* ENV.store(name, value) -> value
*
* ENV.store is an alias for ENV.[]=.
*
* Creates, updates, or deletes the named environment variable, returning the value.
* Both +name+ and +value+ may be instances of String.
- * See {Valid Names and Values}[#class-ENV-label-Valid+Names+and+Values].
+ * See {Valid Names and Values}[rdoc-ref:ENV@Valid+Names+and+Values].
*
* - If the named environment variable does not exist:
* - If +value+ is +nil+, does nothing.
@@ -5122,7 +5447,7 @@ ruby_unsetenv(const char *name)
* ENV.include?('bar') # => false
*
* Raises an exception if +name+ or +value+ is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values].
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_aset_m(VALUE obj, VALUE nm, VALUE val)
@@ -5137,7 +5462,7 @@ env_aset(VALUE nm, VALUE val)
if (NIL_P(val)) {
env_delete(nm);
- return Qnil;
+ return Qnil;
}
SafeStringValue(nm);
SafeStringValue(val);
@@ -5147,53 +5472,53 @@ env_aset(VALUE nm, VALUE val)
get_env_ptr(value, val);
ruby_setenv(name, value);
- if (ENVMATCH(name, PATH_ENV)) {
- RB_GC_GUARD(nm);
- }
- else if (ENVMATCH(name, TZ_ENV)) {
- ruby_tz_uptodate_p = FALSE;
- }
+ reset_by_modified_env(name, value);
return val;
}
static VALUE
-env_keys(void)
-{
- char **env;
- VALUE ary;
-
- ary = rb_ary_new();
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- rb_ary_push(ary, env_str_new(*env, s-*env));
- }
- env++;
+env_keys(int raw)
+{
+ rb_encoding *enc = raw ? 0 : rb_locale_encoding();
+ VALUE ary = rb_ary_new();
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s) {
+ const char *p = *env;
+ size_t l = s - p;
+ VALUE e = raw ? rb_utf8_str_new(p, l) : env_enc_str_new(p, l, enc);
+ rb_ary_push(ary, e);
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
return ary;
}
/*
* call-seq:
- * ENV.keys -> Array
+ * ENV.keys -> array of names
*
* Returns all variable names in an Array:
* ENV.replace('foo' => '0', 'bar' => '1')
* ENV.keys # => ['bar', 'foo']
* The order of the names is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
- * Returns the empty Array if ENV is empty:
- * ENV.clear
- * ENV.keys # => []
+ * Returns the empty Array if ENV is empty.
*/
static VALUE
env_f_keys(VALUE _)
{
- return env_keys();
+ return env_keys(FALSE);
}
static VALUE
@@ -5202,20 +5527,25 @@ rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
char **env;
long cnt = 0;
- env = GET_ENVIRON(environ);
- for (; *env ; ++env) {
- if (strchr(*env, '=')) {
- cnt++;
- }
+ ENV_LOCK();
+ {
+ env = GET_ENVIRON(environ);
+ for (; *env ; ++env) {
+ if (strchr(*env, '=')) {
+ cnt++;
+ }
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
return LONG2FIX(cnt);
}
/*
* call-seq:
* ENV.each_key { |name| block } -> ENV
- * ENV.each_key -> Enumerator
+ * ENV.each_key -> an_enumerator
*
* Yields each environment variable name:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV
@@ -5236,9 +5566,9 @@ env_each_key(VALUE ehash)
long i;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
+ keys = env_keys(FALSE);
for (i=0; i<RARRAY_LEN(keys); i++) {
- rb_yield(RARRAY_AREF(keys, i));
+ rb_yield(RARRAY_AREF(keys, i));
}
return ehash;
}
@@ -5246,35 +5576,37 @@ env_each_key(VALUE ehash)
static VALUE
env_values(void)
{
- VALUE ary;
- char **env;
+ VALUE ary = rb_ary_new();
- ary = rb_ary_new();
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- rb_ary_push(ary, env_str_new2(s+1));
- }
- env++;
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s) {
+ rb_ary_push(ary, env_str_new2(s+1));
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
return ary;
}
/*
* call-seq:
- * ENV.values -> Array
+ * ENV.values -> array of values
*
* Returns all environment variable values in an Array:
* ENV.replace('foo' => '0', 'bar' => '1')
* ENV.values # => ['1', '0']
* The order of the values is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
- * Returns the empty Array if ENV is empty:
- * ENV.clear
- * ENV.values # => []
+ * Returns the empty Array if ENV is empty.
*/
static VALUE
env_f_values(VALUE _)
@@ -5285,7 +5617,7 @@ env_f_values(VALUE _)
/*
* call-seq:
* ENV.each_value { |value| block } -> ENV
- * ENV.each_value -> Enumerator
+ * ENV.each_value -> an_enumerator
*
* Yields each environment variable value:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV
@@ -5308,7 +5640,7 @@ env_each_value(VALUE ehash)
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
values = env_values();
for (i=0; i<RARRAY_LEN(values); i++) {
- rb_yield(RARRAY_AREF(values, i));
+ rb_yield(RARRAY_AREF(values, i));
}
return ehash;
}
@@ -5316,11 +5648,11 @@ env_each_value(VALUE ehash)
/*
* call-seq:
* ENV.each { |name, value| block } -> ENV
- * ENV.each -> Enumerator
+ * ENV.each -> an_enumerator
* ENV.each_pair { |name, value| block } -> ENV
- * ENV.each_pair -> Enumerator
+ * ENV.each_pair -> an_enumerator
*
- * Yields each environment variable name and its value as a 2-element Array:
+ * Yields each environment variable name and its value as a 2-element \Array:
* h = {}
* ENV.each_pair { |name, value| h[name] = value } # => ENV
* h # => {"bar"=>"1", "foo"=>"0"}
@@ -5334,46 +5666,52 @@ env_each_value(VALUE ehash)
static VALUE
env_each_pair(VALUE ehash)
{
- char **env;
- VALUE ary;
long i;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- ary = rb_ary_new();
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- rb_ary_push(ary, env_str_new(*env, s-*env));
- rb_ary_push(ary, env_str_new2(s+1));
- }
- env++;
+ VALUE ary = rb_ary_new();
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s) {
+ rb_ary_push(ary, env_str_new(*env, s-*env));
+ rb_ary_push(ary, env_str_new2(s+1));
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
- if (rb_block_arity() > 1) {
- for (i=0; i<RARRAY_LEN(ary); i+=2) {
- rb_yield_values(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1));
- }
+ if (rb_block_pair_yield_optimizable()) {
+ for (i=0; i<RARRAY_LEN(ary); i+=2) {
+ rb_yield_values(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1));
+ }
}
else {
- for (i=0; i<RARRAY_LEN(ary); i+=2) {
- rb_yield(rb_assoc_new(RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1)));
- }
+ for (i=0; i<RARRAY_LEN(ary); i+=2) {
+ rb_yield(rb_assoc_new(RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1)));
+ }
}
+
return ehash;
}
/*
* call-seq:
* ENV.reject! { |name, value| block } -> ENV or nil
- * ENV.reject! -> Enumerator
+ * ENV.reject! -> an_enumerator
*
* Similar to ENV.delete_if, but returns +nil+ if no changes were made.
*
- * Deletes each environment variable for which the block returns a truthy value,
- * returning ENV (if any deletions) or +nil+ (if not):
+ * Yields each environment variable name and its value as a 2-element Array,
+ * deleting each environment variable for which the block returns a truthy value,
+ * and returning ENV (if any deletions) or +nil+ (if not):
* ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
* ENV.reject! { |name, value| name.start_with?('b') } # => ENV
* ENV # => {"foo"=>"0"}
@@ -5394,16 +5732,16 @@ env_reject_bang(VALUE ehash)
int del = 0;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
+ keys = env_keys(FALSE);
RBASIC_CLEAR_CLASS(keys);
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
- if (!NIL_P(val)) {
- if (RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
+ VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
+ if (!NIL_P(val)) {
+ if (RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
env_delete(RARRAY_AREF(keys, i));
- del++;
- }
- }
+ del++;
+ }
+ }
}
RB_GC_GUARD(keys);
if (del == 0) return Qnil;
@@ -5413,11 +5751,22 @@ env_reject_bang(VALUE ehash)
/*
* call-seq:
* ENV.delete_if { |name, value| block } -> ENV
- * ENV.delete_if -> Enumerator
+ * ENV.delete_if -> an_enumerator
*
- * Deletes every environment variable for which the block evaluates to +true+.
+ * Yields each environment variable name and its value as a 2-element Array,
+ * deleting each environment variable for which the block returns a truthy value,
+ * and returning ENV (regardless of whether any deletions):
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.delete_if { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"foo"=>"0"}
+ * ENV.delete_if { |name, value| name.start_with?('b') } # => ENV
*
- * If no block is given an enumerator is returned instead.
+ * Returns an Enumerator if no block given:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * e = ENV.delete_if # => #<Enumerator: {"bar"=>"1", "baz"=>"2", "foo"=>"0"}:delete_if!>
+ * e.each { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"foo"=>"0"}
+ * e.each { |name, value| name.start_with?('b') } # => ENV
*/
static VALUE
env_delete_if(VALUE ehash)
@@ -5429,10 +5778,20 @@ env_delete_if(VALUE ehash)
/*
* call-seq:
- * ENV.values_at(name, ...) -> Array
+ * ENV.values_at(*names) -> array of values
+ *
+ * Returns an Array containing the environment variable values associated with
+ * the given names:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.values_at('foo', 'baz') # => ["0", "2"]
+ *
+ * Returns +nil+ in the Array for each name that is not an ENV name:
+ * ENV.values_at('foo', 'bat', 'bar', 'bam') # => ["0", nil, "1", nil]
*
- * Returns an array containing the environment variable values associated with
- * the given names. See also ENV.select.
+ * Returns an empty \Array if no names given.
+ *
+ * Raises an exception if any name is invalid.
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_values_at(int argc, VALUE *argv, VALUE _)
@@ -5442,23 +5801,31 @@ env_values_at(int argc, VALUE *argv, VALUE _)
result = rb_ary_new();
for (i=0; i<argc; i++) {
- rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
+ rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
}
return result;
}
/*
* call-seq:
- * ENV.select { |name, value| block } -> Hash
- * ENV.select -> Enumerator
- * ENV.filter { |name, value| block } -> Hash
- * ENV.filter -> Enumerator
+ * ENV.select { |name, value| block } -> hash of name/value pairs
+ * ENV.select -> an_enumerator
+ * ENV.filter { |name, value| block } -> hash of name/value pairs
+ * ENV.filter -> an_enumerator
*
- * Returns a copy of the environment for entries where the block returns true.
+ * ENV.filter is an alias for ENV.select.
*
- * Returns an Enumerator if no block was given.
+ * Yields each environment variable name and its value as a 2-element Array,
+ * returning a Hash of the names and values for which the block returns a truthy value:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.select { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"}
+ * ENV.filter { |name, value| name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"}
*
- * ENV.filter is an alias for ENV.select.
+ * Returns an Enumerator if no block given:
+ * e = ENV.select # => #<Enumerator: {"bar"=>"1", "baz"=>"2", "foo"=>"0"}:select>
+ * e.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"}
+ * e = ENV.filter # => #<Enumerator: {"bar"=>"1", "baz"=>"2", "foo"=>"0"}:filter>
+ * e.each { |name, value | name.start_with?('b') } # => {"bar"=>"1", "baz"=>"2"}
*/
static VALUE
env_select(VALUE ehash)
@@ -5469,15 +5836,15 @@ env_select(VALUE ehash)
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
result = rb_hash_new();
- keys = env_keys();
+ keys = env_keys(FALSE);
for (i = 0; i < RARRAY_LEN(keys); ++i) {
- VALUE key = RARRAY_AREF(keys, i);
- VALUE val = rb_f_getenv(Qnil, key);
- if (!NIL_P(val)) {
- if (RTEST(rb_yield_values(2, key, val))) {
- rb_hash_aset(result, key, val);
- }
- }
+ VALUE key = RARRAY_AREF(keys, i);
+ VALUE val = rb_f_getenv(Qnil, key);
+ if (!NIL_P(val)) {
+ if (RTEST(rb_yield_values(2, key, val))) {
+ rb_hash_aset(result, key, val);
+ }
+ }
}
RB_GC_GUARD(keys);
@@ -5487,13 +5854,39 @@ env_select(VALUE ehash)
/*
* call-seq:
* ENV.select! { |name, value| block } -> ENV or nil
- * ENV.select! -> Enumerator
+ * ENV.select! -> an_enumerator
* ENV.filter! { |name, value| block } -> ENV or nil
- * ENV.filter! -> Enumerator
- *
- * Equivalent to ENV.keep_if but returns +nil+ if no changes were made.
+ * ENV.filter! -> an_enumerator
*
* ENV.filter! is an alias for ENV.select!.
+ *
+ * Yields each environment variable name and its value as a 2-element Array,
+ * deleting each entry for which the block returns +false+ or +nil+,
+ * and returning ENV if any deletions made, or +nil+ otherwise:
+ *
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.select! { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
+ * ENV.select! { |name, value| true } # => nil
+ *
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.filter! { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
+ * ENV.filter! { |name, value| true } # => nil
+ *
+ * Returns an Enumerator if no block given:
+ *
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * e = ENV.select! # => #<Enumerator: {"bar"=>"1", "baz"=>"2"}:select!>
+ * e.each { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
+ * e.each { |name, value| true } # => nil
+ *
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * e = ENV.filter! # => #<Enumerator: {"bar"=>"1", "baz"=>"2"}:filter!>
+ * e.each { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
+ * e.each { |name, value| true } # => nil
*/
static VALUE
env_select_bang(VALUE ehash)
@@ -5503,16 +5896,16 @@ env_select_bang(VALUE ehash)
int del = 0;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
+ keys = env_keys(FALSE);
RBASIC_CLEAR_CLASS(keys);
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
- if (!NIL_P(val)) {
- if (!RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
+ VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
+ if (!NIL_P(val)) {
+ if (!RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
env_delete(RARRAY_AREF(keys, i));
- del++;
- }
- }
+ del++;
+ }
+ }
}
RB_GC_GUARD(keys);
if (del == 0) return Qnil;
@@ -5522,11 +5915,20 @@ env_select_bang(VALUE ehash)
/*
* call-seq:
* ENV.keep_if { |name, value| block } -> ENV
- * ENV.keep_if -> Enumerator
+ * ENV.keep_if -> an_enumerator
*
- * Deletes every environment variable where the block evaluates to +false+.
+ * Yields each environment variable name and its value as a 2-element Array,
+ * deleting each environment variable for which the block returns +false+ or +nil+,
+ * and returning ENV:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.keep_if { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
*
- * Returns an enumerator if no block was given.
+ * Returns an Enumerator if no block given:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * e = ENV.keep_if # => #<Enumerator: {"bar"=>"1", "baz"=>"2", "foo"=>"0"}:keep_if>
+ * e.each { |name, value| name.start_with?('b') } # => ENV
+ * ENV # => {"bar"=>"1", "baz"=>"2"}
*/
static VALUE
env_keep_if(VALUE ehash)
@@ -5537,12 +5939,16 @@ env_keep_if(VALUE ehash)
}
/*
- * call-seq:
- * ENV.slice(*keys) -> a_hash
- *
- * Returns a hash containing only the given keys from ENV and their values.
- *
- * ENV.slice("TERM","HOME") #=> {"TERM"=>"xterm-256color", "HOME"=>"/Users/rhc"}
+ * call-seq:
+ * ENV.slice(*names) -> hash of name/value pairs
+ *
+ * Returns a Hash of the given ENV names and their corresponding values:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2', 'bat' => '3')
+ * ENV.slice('foo', 'baz') # => {"foo"=>"0", "baz"=>"2"}
+ * ENV.slice('baz', 'foo') # => {"baz"=>"2", "foo"=>"0"}
+ * Raises an exception if any of the +names+ is invalid
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
+ * ENV.slice('foo', 'bar', :bat) # Raises TypeError (no implicit conversion of Symbol into String)
*/
static VALUE
env_slice(int argc, VALUE *argv, VALUE _)
@@ -5571,12 +5977,11 @@ rb_env_clear(void)
VALUE keys;
long i;
- keys = env_keys();
+ keys = env_keys(TRUE);
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
- if (!NIL_P(val)) {
- env_delete(RARRAY_AREF(keys, i));
- }
+ VALUE key = RARRAY_AREF(keys, i);
+ const char *nam = RSTRING_PTR(key);
+ ruby_setenv(nam, 0);
}
RB_GC_GUARD(keys);
return envtbl;
@@ -5602,7 +6007,8 @@ env_clear(VALUE _)
* call-seq:
* ENV.to_s -> "ENV"
*
- * Returns "ENV"
+ * Returns String 'ENV':
+ * ENV.to_s # => "ENV"
*/
static VALUE
env_to_s(VALUE _)
@@ -5612,34 +6018,39 @@ env_to_s(VALUE _)
/*
* call-seq:
- * ENV.inspect -> string
+ * ENV.inspect -> a_string
*
- * Returns the contents of the environment as a String.
+ * Returns the contents of the environment as a String:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.inspect # => "{\"bar\"=>\"1\", \"foo\"=>\"0\"}"
*/
static VALUE
env_inspect(VALUE _)
{
- char **env;
- VALUE str, i;
+ VALUE str = rb_str_buf_new2("{");
+ rb_encoding *enc = env_encoding();
- str = rb_str_buf_new2("{");
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
-
- if (env != environ) {
- rb_str_buf_cat2(str, ", ");
- }
- if (s) {
- rb_str_buf_cat2(str, "\"");
- rb_str_buf_cat(str, *env, s-*env);
- rb_str_buf_cat2(str, "\"=>");
- i = rb_inspect(rb_str_new2(s+1));
- rb_str_buf_append(str, i);
- }
- env++;
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ const char *s = strchr(*env, '=');
+
+ if (env != environ) {
+ rb_str_buf_cat2(str, ", ");
+ }
+ if (s) {
+ rb_str_buf_append(str, rb_str_inspect(env_enc_str_new(*env, s-*env, enc)));
+ rb_str_buf_cat2(str, "=>");
+ s++;
+ rb_str_buf_append(str, rb_str_inspect(env_enc_str_new(s, strlen(s), enc)));
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
rb_str_buf_cat2(str, "}");
return str;
@@ -5647,39 +6058,43 @@ env_inspect(VALUE _)
/*
* call-seq:
- * ENV.to_a -> Array
- *
- * Converts the environment variables into an array of names and value arrays.
- *
- * ENV.to_a # => [["TERM", "xterm-color"], ["SHELL", "/bin/bash"], ...]
+ * ENV.to_a -> array of 2-element arrays
*
+ * Returns the contents of ENV as an Array of 2-element Arrays,
+ * each of which is a name/value pair:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.to_a # => [["bar", "1"], ["foo", "0"]]
*/
static VALUE
env_to_a(VALUE _)
{
- char **env;
- VALUE ary;
+ VALUE ary = rb_ary_new();
- ary = rb_ary_new();
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
- env_str_new2(s+1)));
- }
- env++;
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s) {
+ rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
+ env_str_new2(s+1)));
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
return ary;
}
/*
* call-seq:
- * ENV.rehash
+ * ENV.rehash -> nil
+ *
+ * (Provided for compatibility with Hash.)
*
- * Re-hashing the environment variables does nothing. It is provided for
- * compatibility with Hash.
+ * Does not modify ENV; returns +nil+.
*/
static VALUE
env_none(VALUE _)
@@ -5687,44 +6102,64 @@ env_none(VALUE _)
return Qnil;
}
+static int
+env_size_with_lock(void)
+{
+ int i = 0;
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (env[i]) i++;
+ FREE_ENVIRON(environ);
+ }
+ ENV_UNLOCK();
+
+ return i;
+}
+
/*
* call-seq:
- * ENV.length
- * ENV.size
+ * ENV.length -> an_integer
+ * ENV.size -> an_integer
*
- * Returns the number of environment variables.
+ * Returns the count of environment variables:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.length # => 2
+ * ENV.size # => 2
*/
static VALUE
env_size(VALUE _)
{
- int i;
- char **env;
-
- env = GET_ENVIRON(environ);
- for (i=0; env[i]; i++)
- ;
- FREE_ENVIRON(environ);
- return INT2FIX(i);
+ return INT2FIX(env_size_with_lock());
}
/*
* call-seq:
* ENV.empty? -> true or false
*
- * Returns true when there are no environment variables
+ * Returns +true+ when there are no environment variables, +false+ otherwise:
+ * ENV.clear
+ * ENV.empty? # => true
+ * ENV['foo'] = '0'
+ * ENV.empty? # => false
*/
static VALUE
env_empty_p(VALUE _)
{
- char **env;
+ bool empty = true;
- env = GET_ENVIRON(environ);
- if (env[0] == 0) {
- FREE_ENVIRON(environ);
- return Qtrue;
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ if (env[0] != 0) {
+ empty = false;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
- return Qfalse;
+ ENV_UNLOCK();
+
+ return RBOOL(empty);
}
/*
@@ -5755,26 +6190,22 @@ env_empty_p(VALUE _)
static VALUE
env_has_key(VALUE env, VALUE key)
{
- const char *s;
-
- s = env_name(key);
- if (getenv(s)) return Qtrue;
- return Qfalse;
+ const char *s = env_name(key);
+ return RBOOL(has_env_with_lock(s));
}
/*
* call-seq:
- * ENV.assoc(name) -> Array or nil
+ * ENV.assoc(name) -> [name, value] or nil
*
* Returns a 2-element Array containing the name and value of the environment variable
* for +name+ if it exists:
* ENV.replace('foo' => '0', 'bar' => '1')
- * ENV.assoc('foo') # => ['foo' '0']
- * Returns +nil+ if +name+ is a valid String and there is no such environment variable:
- * ENV.assoc('baz') # => false
- * Returns +nil+ if +name+ is the empty String or is a String containing character <code>'='</code>:
- * ENV.assoc('') # => false
- * ENV.assoc('=') # => false
+ * ENV.assoc('foo') # => ['foo', '0']
+ * Returns +nil+ if +name+ is a valid String and there is no such environment variable.
+ *
+ * Returns +nil+ if +name+ is the empty String or is a String containing character <code>'='</code>.
+ *
* Raises an exception if +name+ is a String containing the NUL character <code>"\0"</code>:
* ENV.assoc("\0") # Raises ArgumentError (bad environment variable name: contains null byte)
* Raises an exception if +name+ has an encoding that is not ASCII-compatible:
@@ -5786,153 +6217,188 @@ env_has_key(VALUE env, VALUE key)
static VALUE
env_assoc(VALUE env, VALUE key)
{
- const char *s, *e;
+ const char *s = env_name(key);
+ VALUE e = getenv_with_lock(s);
- s = env_name(key);
- e = getenv(s);
- if (e) return rb_assoc_new(key, env_str_new2(e));
- return Qnil;
+ if (!NIL_P(e)) {
+ return rb_assoc_new(key, e);
+ }
+ else {
+ return Qnil;
+ }
}
/*
* call-seq:
- * ENV.value?(value) -> true or false
+ * ENV.value?(value) -> true or false
* ENV.has_value?(value) -> true or false
*
- * Returns +true+ if there is an environment variable with the given +value+.
+ * Returns +true+ if +value+ is the value for some environment variable name, +false+ otherwise:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.value?('0') # => true
+ * ENV.has_value?('0') # => true
+ * ENV.value?('2') # => false
+ * ENV.has_value?('2') # => false
*/
static VALUE
env_has_value(VALUE dmy, VALUE obj)
{
- char **env;
-
obj = rb_check_string_type(obj);
if (NIL_P(obj)) return Qnil;
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s++) {
- long len = strlen(s);
- if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(obj), len) == 0) {
- FREE_ENVIRON(environ);
- return Qtrue;
- }
- }
- env++;
+
+ VALUE ret = Qfalse;
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s++) {
+ long len = strlen(s);
+ if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(obj), len) == 0) {
+ ret = Qtrue;
+ break;
+ }
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
- return Qfalse;
+ ENV_UNLOCK();
+
+ return ret;
}
/*
* call-seq:
- * ENV.rassoc(value)
+ * ENV.rassoc(value) -> [name, value] or nil
*
- * Returns an Array of the name and value of the environment variable with
- * +value+ or +nil+ if the value cannot be found.
+ * Returns a 2-element Array containing the name and value of the
+ * *first* *found* environment variable that has value +value+, if one
+ * exists:
+ * ENV.replace('foo' => '0', 'bar' => '0')
+ * ENV.rassoc('0') # => ["bar", "0"]
+ * The order in which environment variables are examined is OS-dependent.
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
+ *
+ * Returns +nil+ if there is no such environment variable.
*/
static VALUE
env_rassoc(VALUE dmy, VALUE obj)
{
- char **env;
-
obj = rb_check_string_type(obj);
if (NIL_P(obj)) return Qnil;
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s++) {
- long len = strlen(s);
- if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(obj), len) == 0) {
- VALUE result = rb_assoc_new(rb_str_new(*env, s-*env-1), obj);
- FREE_ENVIRON(environ);
- return result;
- }
- }
- env++;
+
+ VALUE result = Qnil;
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+
+ while (*env) {
+ const char *p = *env;
+ char *s = strchr(p, '=');
+ if (s++) {
+ long len = strlen(s);
+ if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(obj), len) == 0) {
+ result = rb_assoc_new(rb_str_new(p, s-p-1), obj);
+ break;
+ }
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
- return Qnil;
+ ENV_UNLOCK();
+
+ return result;
}
/*
* call-seq:
* ENV.key(value) -> name or nil
*
- * Returns the name of the first environment variable with +value+ if it exists:
- * ENV.replace('foo' => '0', 'bar' => '1')
- * ENV.key('0') # =>'foo'
+ * Returns the name of the first environment variable with +value+, if it exists:
+ * ENV.replace('foo' => '0', 'bar' => '0')
+ * ENV.key('0') # => "foo"
* The order in which environment variables are examined is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
+ *
+ * Returns +nil+ if there is no such value.
*
- * Returns +nil+ if there is no such value:
- * ENV.key('2') # => nil
- * Raises an exception if +value+ is not a String:
+ * Raises an exception if +value+ is invalid:
* ENV.key(Object.new) # raises TypeError (no implicit conversion of Object into String)
+ * See {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values].
*/
static VALUE
env_key(VALUE dmy, VALUE value)
{
- char **env;
- VALUE str;
-
SafeStringValue(value);
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s++) {
- long len = strlen(s);
- if (RSTRING_LEN(value) == len && strncmp(s, RSTRING_PTR(value), len) == 0) {
- str = env_str_new(*env, s-*env-1);
- FREE_ENVIRON(environ);
- return str;
- }
- }
- env++;
+ VALUE str = Qnil;
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s++) {
+ long len = strlen(s);
+ if (RSTRING_LEN(value) == len && strncmp(s, RSTRING_PTR(value), len) == 0) {
+ str = env_str_new(*env, s-*env-1);
+ break;
+ }
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
- return Qnil;
-}
+ ENV_UNLOCK();
-/*
- * call-seq:
- * ENV.index(value) -> key
- *
- * Deprecated method that is equivalent to ENV.key
- */
-static VALUE
-env_index(VALUE dmy, VALUE value)
-{
- rb_warn_deprecated("ENV.index", "ENV.key");
- return env_key(dmy, value);
+ return str;
}
static VALUE
env_to_hash(void)
{
- char **env;
- VALUE hash;
+ VALUE hash = rb_hash_new();
- hash = rb_hash_new();
- env = GET_ENVIRON(environ);
- while (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- rb_hash_aset(hash, env_str_new(*env, s-*env),
- env_str_new2(s+1));
- }
- env++;
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ while (*env) {
+ char *s = strchr(*env, '=');
+ if (s) {
+ rb_hash_aset(hash, env_str_new(*env, s-*env),
+ env_str_new2(s+1));
+ }
+ env++;
+ }
+ FREE_ENVIRON(environ);
}
- FREE_ENVIRON(environ);
+ ENV_UNLOCK();
+
return hash;
}
+VALUE
+rb_envtbl(void)
+{
+ return envtbl;
+}
+
+VALUE
+rb_env_to_hash(void)
+{
+ return env_to_hash();
+}
+
/*
* call-seq:
- * ENV.to_hash -> hash
- *
- * Creates a hash with a copy of the environment variables.
+ * ENV.to_hash -> hash of name/value pairs
*
+ * Returns a Hash containing all name/value pairs from ENV:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.to_hash # => {"bar"=>"1", "foo"=>"0"}
*/
static VALUE
@@ -5943,11 +6409,21 @@ env_f_to_hash(VALUE _)
/*
* call-seq:
- * ENV.to_h -> hash
- * ENV.to_h {|name, value| block } -> hash
- *
- * Creates a hash with a copy of the environment variables.
+ * ENV.to_h -> hash of name/value pairs
+ * ENV.to_h {|name, value| block } -> hash of name/value pairs
*
+ * With no block, returns a Hash containing all name/value pairs from ENV:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.to_h # => {"bar"=>"1", "foo"=>"0"}
+ * With a block, returns a Hash whose items are determined by the block.
+ * Each name/value pair in ENV is yielded to the block.
+ * The block must return a 2-element Array (name/value pair)
+ * that is added to the return Hash as a key and value:
+ * ENV.to_h { |name, value| [name.to_sym, value.to_i] } # => {:bar=>1, :foo=>0}
+ * Raises an exception if the block does not return an Array:
+ * ENV.to_h { |name, value| name } # Raises TypeError (wrong element type String (expected array))
+ * Raises an exception if the block returns an Array of the wrong size:
+ * ENV.to_h { |name, value| [name] } # Raises ArgumentError (element has wrong array length (expected 2, was 1))
*/
static VALUE
env_to_h(VALUE _)
@@ -5960,12 +6436,42 @@ env_to_h(VALUE _)
}
/*
+ * call-seq:
+ * ENV.except(*keys) -> a_hash
+ *
+ * Returns a hash except the given keys from ENV and their values.
+ *
+ * ENV #=> {"LANG"=>"en_US.UTF-8", "TERM"=>"xterm-256color", "HOME"=>"/Users/rhc"}
+ * ENV.except("TERM","HOME") #=> {"LANG"=>"en_US.UTF-8"}
+ */
+static VALUE
+env_except(int argc, VALUE *argv, VALUE _)
+{
+ int i;
+ VALUE key, hash = env_to_hash();
+
+ for (i = 0; i < argc; i++) {
+ key = argv[i];
+ rb_hash_delete(hash, key);
+ }
+
+ return hash;
+}
+
+/*
* call-seq:
- * ENV.reject { |name, value| block } -> Hash
- * ENV.reject -> Enumerator
+ * ENV.reject { |name, value| block } -> hash of name/value pairs
+ * ENV.reject -> an_enumerator
*
- * Same as ENV.delete_if, but works on (and returns) a copy of the
- * environment.
+ * Yields each environment variable name and its value as a 2-element Array.
+ * Returns a Hash whose items are determined by the block.
+ * When the block returns a truthy value, the name/value pair is added to the return Hash;
+ * otherwise the pair is ignored:
+ * ENV.replace('foo' => '0', 'bar' => '1', 'baz' => '2')
+ * ENV.reject { |name, value| name.start_with?('b') } # => {"foo"=>"0"}
+ * Returns an Enumerator if no block given:
+ * e = ENV.reject
+ * e.each { |name, value| name.start_with?('b') } # => {"foo"=>"0"}
*/
static VALUE
env_reject(VALUE _)
@@ -5973,18 +6479,19 @@ env_reject(VALUE _)
return rb_hash_delete_if(env_to_hash());
}
+NORETURN(static VALUE env_freeze(VALUE self));
/*
* call-seq:
- * ENV.freeze -> raises TypeError
+ * ENV.freeze
*
- * Ruby does not allow ENV to be frozen, so calling ENV.freeze
- * raises TypeError.
+ * Raises an exception:
+ * ENV.freeze # Raises TypeError (cannot freeze ENV)
*/
static VALUE
env_freeze(VALUE self)
{
rb_raise(rb_eTypeError, "cannot freeze ENV");
- return self; /* Not reached */
+ UNREACHABLE_RETURN(self);
}
/*
@@ -5998,38 +6505,53 @@ env_freeze(VALUE self)
* ENV.shift # => ['bar', '1']
* ENV.to_hash # => {'foo' => '0'}
* Exactly which environment variable is "first" is OS-dependent.
- * See {About Ordering}[#class-ENV-label-About+Ordering].
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*
- * Returns +nil+ if the environment is empty:
- * ENV.clear
- * ENV.shift # => nil
+ * Returns +nil+ if the environment is empty.
*/
static VALUE
env_shift(VALUE _)
{
- char **env;
VALUE result = Qnil;
+ VALUE key = Qnil;
+
+ ENV_LOCK();
+ {
+ char **env = GET_ENVIRON(environ);
+ if (*env) {
+ const char *p = *env;
+ char *s = strchr(p, '=');
+ if (s) {
+ key = env_str_new(p, s-p);
+ VALUE val = env_str_new2(getenv(RSTRING_PTR(key)));
+ result = rb_assoc_new(key, val);
+ }
+ }
+ FREE_ENVIRON(environ);
+ }
+ ENV_UNLOCK();
- env = GET_ENVIRON(environ);
- if (*env) {
- char *s = strchr(*env, '=');
- if (s) {
- VALUE key = env_str_new(*env, s-*env);
- VALUE val = env_str_new2(getenv(RSTRING_PTR(key)));
- env_delete(key);
- result = rb_assoc_new(key, val);
- }
+ if (!NIL_P(key)) {
+ env_delete(key);
}
- FREE_ENVIRON(environ);
+
return result;
}
/*
* call-seq:
- * ENV.invert -> Hash
+ * ENV.invert -> hash of value/name pairs
*
- * Returns a new hash created by using environment variable names as values
- * and values as names.
+ * Returns a Hash whose keys are the ENV values,
+ * and whose values are the corresponding ENV names:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.invert # => {"1"=>"bar", "0"=>"foo"}
+ * For a duplicate ENV value, overwrites the hash entry:
+ * ENV.replace('foo' => '0', 'bar' => '0')
+ * ENV.invert # => {"0"=>"foo"}
+ * Note that the order of the ENV processing is OS-dependent,
+ * which means that the order of overwriting is also OS-dependent.
+ * See {About Ordering}[rdoc-ref:ENV@About+Ordering].
*/
static VALUE
env_invert(VALUE _)
@@ -6037,13 +6559,32 @@ env_invert(VALUE _)
return rb_hash_invert(env_to_hash());
}
+static void
+keylist_delete(VALUE keys, VALUE key)
+{
+ long keylen, elen;
+ const char *keyptr, *eptr;
+ RSTRING_GETMEM(key, keyptr, keylen);
+ /* Don't stop at first key, as it is possible to have
+ multiple environment values with the same key.
+ */
+ for (long i=0; i<RARRAY_LEN(keys); i++) {
+ VALUE e = RARRAY_AREF(keys, i);
+ RSTRING_GETMEM(e, eptr, elen);
+ if (elen != keylen) continue;
+ if (!ENVNMATCH(keyptr, eptr, elen)) continue;
+ rb_ary_delete_at(keys, i);
+ i--;
+ }
+}
+
static int
env_replace_i(VALUE key, VALUE val, VALUE keys)
{
+ env_name(key);
env_aset(key, val);
- if (rb_ary_includes(keys, key)) {
- rb_ary_delete(keys, key);
- }
+
+ keylist_delete(keys, key);
return ST_CONTINUE;
}
@@ -6059,8 +6600,11 @@ env_replace_i(VALUE key, VALUE val, VALUE keys)
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV
* ENV.to_hash # => {"bar"=>"1", "foo"=>"0"}
*
- * Raises an exception if a name or value is invalid.
- * See {Invalid Names and Values}[#class-ENV-label-Invalid-Names+and+Values].
+ * Raises an exception if a name or value is invalid
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
+ * ENV.replace('foo' => '0', :bar => '1') # Raises TypeError (no implicit conversion of Symbol into String)
+ * ENV.replace('foo' => '0', 'bar' => 1) # Raises TypeError (no implicit conversion of Integer into String)
+ * ENV.to_hash # => {"bar"=>"1", "foo"=>"0"}
*/
static VALUE
env_replace(VALUE env, VALUE hash)
@@ -6068,7 +6612,7 @@ env_replace(VALUE env, VALUE hash)
VALUE keys;
long i;
- keys = env_keys();
+ keys = env_keys(TRUE);
if (env == hash) return env;
hash = to_hash(hash);
rb_hash_foreach(hash, env_replace_i, keys);
@@ -6092,7 +6636,7 @@ env_update_block_i(VALUE key, VALUE val, VALUE _)
{
VALUE oldval = rb_f_getenv(Qnil, key);
if (!NIL_P(oldval)) {
- val = rb_yield_values(3, key, oldval, val);
+ val = rb_yield_values(3, key, oldval, val);
}
env_aset(key, val);
return ST_CONTINUE;
@@ -6100,101 +6644,327 @@ env_update_block_i(VALUE key, VALUE val, VALUE _)
/*
* call-seq:
- * ENV.update(hash) -> ENV
- * ENV.update(hash) { |name, old_value, new_value| block } -> ENV
- * ENV.merge!(hash) -> ENV
- * ENV.merge!(hash) { |name, old_value, new_value| block } -> ENV
- *
- * Adds the contents of +hash+ to the environment variables. If no block is
- * specified entries with duplicate keys are overwritten, otherwise the value
- * of each duplicate name is determined by calling the block with the key, its
- * value from the environment and its value from the hash.
+ * ENV.update -> ENV
+ * ENV.update(*hashes) -> ENV
+ * ENV.update(*hashes) { |name, env_val, hash_val| block } -> ENV
+ * ENV.merge! -> ENV
+ * ENV.merge!(*hashes) -> ENV
+ * ENV.merge!(*hashes) { |name, env_val, hash_val| block } -> ENV
+ *
+ * ENV.update is an alias for ENV.merge!.
+ *
+ * Adds to ENV each key/value pair in the given +hash+; returns ENV:
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.merge!('baz' => '2', 'bat' => '3') # => {"bar"=>"1", "bat"=>"3", "baz"=>"2", "foo"=>"0"}
+ * Deletes the ENV entry for a hash value that is +nil+:
+ * ENV.merge!('baz' => nil, 'bat' => nil) # => {"bar"=>"1", "foo"=>"0"}
+ * For an already-existing name, if no block given, overwrites the ENV value:
+ * ENV.merge!('foo' => '4') # => {"bar"=>"1", "foo"=>"4"}
+ * For an already-existing name, if block given,
+ * yields the name, its ENV value, and its hash value;
+ * the block's return value becomes the new name:
+ * ENV.merge!('foo' => '5') { |name, env_val, hash_val | env_val + hash_val } # => {"bar"=>"1", "foo"=>"45"}
+ * Raises an exception if a name or value is invalid
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]);
+ * ENV.replace('foo' => '0', 'bar' => '1')
+ * ENV.merge!('foo' => '6', :bar => '7', 'baz' => '9') # Raises TypeError (no implicit conversion of Symbol into String)
+ * ENV # => {"bar"=>"1", "foo"=>"6"}
+ * ENV.merge!('foo' => '7', 'bar' => 8, 'baz' => '9') # Raises TypeError (no implicit conversion of Integer into String)
+ * ENV # => {"bar"=>"1", "foo"=>"7"}
+ * Raises an exception if the block returns an invalid name:
+ * (see {Invalid Names and Values}[rdoc-ref:ENV@Invalid+Names+and+Values]):
+ * ENV.merge!('bat' => '8', 'foo' => '9') { |name, env_val, hash_val | 10 } # Raises TypeError (no implicit conversion of Integer into String)
+ * ENV # => {"bar"=>"1", "bat"=>"8", "foo"=>"7"}
+ *
+ * Note that for the exceptions above,
+ * hash pairs preceding an invalid name or value are processed normally;
+ * those following are ignored.
*/
static VALUE
-env_update(VALUE env, VALUE hash)
+env_update(int argc, VALUE *argv, VALUE env)
{
- if (env == hash) return env;
- hash = to_hash(hash);
rb_foreach_func *func = rb_block_given_p() ?
env_update_block_i : env_update_i;
- rb_hash_foreach(hash, func, 0);
+ for (int i = 0; i < argc; ++i) {
+ VALUE hash = argv[i];
+ if (env == hash) continue;
+ hash = to_hash(hash);
+ rb_hash_foreach(hash, func, 0);
+ }
return env;
}
+NORETURN(static VALUE env_clone(int, VALUE *, VALUE));
/*
- * A Hash is a dictionary-like collection of unique keys and their values.
- * Also called associative arrays, they are similar to Arrays, but where an
- * Array uses integers as its index, a Hash allows you to use any object
- * type.
- *
- * Hashes enumerate their values in the order that the corresponding keys
- * were inserted.
+ * call-seq:
+ * ENV.clone(freeze: nil) # raises TypeError
*
- * A Hash can be easily created by using its implicit form:
+ * Raises TypeError, because ENV is a wrapper for the process-wide
+ * environment variables and a clone is useless.
+ * Use #to_h to get a copy of ENV data as a hash.
+ */
+static VALUE
+env_clone(int argc, VALUE *argv, VALUE obj)
+{
+ if (argc) {
+ VALUE opt;
+ if (rb_scan_args(argc, argv, "0:", &opt) < argc) {
+ rb_get_freeze_opt(1, &opt);
+ }
+ }
+
+ rb_raise(rb_eTypeError, "Cannot clone ENV, use ENV.to_h to get a copy of ENV as a hash");
+}
+
+NORETURN(static VALUE env_dup(VALUE));
+/*
+ * call-seq:
+ * ENV.dup # raises TypeError
*
- * grades = { "Jane Doe" => 10, "Jim Doe" => 6 }
+ * Raises TypeError, because ENV is a singleton object.
+ * Use #to_h to get a copy of ENV data as a hash.
+ */
+static VALUE
+env_dup(VALUE obj)
+{
+ rb_raise(rb_eTypeError, "Cannot dup ENV, use ENV.to_h to get a copy of ENV as a hash");
+}
+
+static const rb_data_type_t env_data_type = {
+ "ENV",
+ {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED,
+};
+
+/*
+ * A \Hash maps each of its unique keys to a specific value.
*
- * Hashes allow an alternate syntax for keys that are symbols.
- * Instead of
+ * A \Hash has certain similarities to an \Array, but:
+ * - An \Array index is always an \Integer.
+ * - A \Hash key can be (almost) any object.
*
- * options = { :font_size => 10, :font_family => "Arial" }
+ * === \Hash \Data Syntax
*
- * You could write it as:
+ * The older syntax for \Hash data uses the "hash rocket," <tt>=></tt>:
*
- * options = { font_size: 10, font_family: "Arial" }
+ * h = {:foo => 0, :bar => 1, :baz => 2}
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * Each named key is a symbol you can access in hash:
+ * Alternatively, but only for a \Hash key that's a \Symbol,
+ * you can use a newer JSON-style syntax,
+ * where each bareword becomes a \Symbol:
*
- * options[:font_size] # => 10
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * A Hash can also be created through its ::new method:
+ * You can also use a \String in place of a bareword:
*
- * grades = Hash.new
- * grades["Dorothy Doe"] = 9
+ * h = {'foo': 0, 'bar': 1, 'baz': 2}
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * Hashes have a <em>default value</em> that is returned when accessing
- * keys that do not exist in the hash. If no default is set +nil+ is used.
- * You can set the default value by sending it as an argument to Hash.new:
+ * And you can mix the styles:
*
- * grades = Hash.new(0)
+ * h = {foo: 0, :bar => 1, 'baz': 2}
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * Or by using the #default= method:
+ * But it's an error to try the JSON-style syntax
+ * for a key that's not a bareword or a String:
*
- * grades = {"Timmy Doe" => 8}
- * grades.default = 0
+ * # Raises SyntaxError (syntax error, unexpected ':', expecting =>):
+ * h = {0: 'zero'}
*
- * Accessing a value in a Hash requires using its key:
+ * Hash value can be omitted, meaning that value will be fetched from the context
+ * by the name of the key:
*
- * puts grades["Jane Doe"] # => 0
+ * x = 0
+ * y = 100
+ * h = {x:, y:}
+ * h # => {:x=>0, :y=>100}
*
* === Common Uses
*
- * Hashes are an easy way to represent data structures, such as
+ * You can use a \Hash to give names to objects:
*
- * books = {}
- * books[:matz] = "The Ruby Programming Language"
- * books[:black] = "The Well-Grounded Rubyist"
+ * person = {name: 'Matz', language: 'Ruby'}
+ * person # => {:name=>"Matz", :language=>"Ruby"}
*
- * Hashes are also commonly used as a way to have named parameters in
- * functions. Note that no brackets are used below. If a hash is the last
- * argument on a method call, no braces are needed, thus creating a really
- * clean interface:
+ * You can use a \Hash to give names to method arguments:
+ *
+ * def some_method(hash)
+ * p hash
+ * end
+ * some_method({foo: 0, bar: 1, baz: 2}) # => {:foo=>0, :bar=>1, :baz=>2}
*
- * Person.create(name: "John Doe", age: 27)
+ * Note: when the last argument in a method call is a \Hash,
+ * the curly braces may be omitted:
*
- * def self.create(params)
- * @name = params[:name]
- * @age = params[:age]
+ * some_method(foo: 0, bar: 1, baz: 2) # => {:foo=>0, :bar=>1, :baz=>2}
+ *
+ * You can use a \Hash to initialize an object:
+ *
+ * class Dev
+ * attr_accessor :name, :language
+ * def initialize(hash)
+ * self.name = hash[:name]
+ * self.language = hash[:language]
+ * end
* end
+ * matz = Dev.new(name: 'Matz', language: 'Ruby')
+ * matz # => #<Dev: @name="Matz", @language="Ruby">
+ *
+ * === Creating a \Hash
+ *
+ * You can create a \Hash object explicitly with:
+ *
+ * - A {hash literal}[rdoc-ref:syntax/literals.rdoc@Hash+Literals].
+ *
+ * You can convert certain objects to Hashes with:
+ *
+ * - \Method #Hash.
+ *
+ * You can create a \Hash by calling method Hash.new.
+ *
+ * Create an empty Hash:
+ *
+ * h = Hash.new
+ * h # => {}
+ * h.class # => Hash
+ *
+ * You can create a \Hash by calling method Hash.[].
*
- * === Hash Keys
+ * Create an empty Hash:
*
- * Two objects refer to the same hash key when their <code>hash</code> value
+ * h = Hash[]
+ * h # => {}
+ *
+ * Create a \Hash with initial entries:
+ *
+ * h = Hash[foo: 0, bar: 1, baz: 2]
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
+ *
+ * You can create a \Hash by using its literal form (curly braces).
+ *
+ * Create an empty \Hash:
+ *
+ * h = {}
+ * h # => {}
+ *
+ * Create a \Hash with initial entries:
+ *
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
+ *
+ *
+ * === \Hash Value Basics
+ *
+ * The simplest way to retrieve a \Hash value (instance method #[]):
+ *
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h[:foo] # => 0
+ *
+ * The simplest way to create or update a \Hash value (instance method #[]=):
+ *
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h[:bat] = 3 # => 3
+ * h # => {:foo=>0, :bar=>1, :baz=>2, :bat=>3}
+ * h[:foo] = 4 # => 4
+ * h # => {:foo=>4, :bar=>1, :baz=>2, :bat=>3}
+ *
+ * The simplest way to delete a \Hash entry (instance method #delete):
+ *
+ * h = {foo: 0, bar: 1, baz: 2}
+ * h.delete(:bar) # => 1
+ * h # => {:foo=>0, :baz=>2}
+ *
+ * === Entry Order
+ *
+ * A \Hash object presents its entries in the order of their creation. This is seen in:
+ *
+ * - Iterative methods such as <tt>each</tt>, <tt>each_key</tt>, <tt>each_pair</tt>, <tt>each_value</tt>.
+ * - Other order-sensitive methods such as <tt>shift</tt>, <tt>keys</tt>, <tt>values</tt>.
+ * - The \String returned by method <tt>inspect</tt>.
+ *
+ * A new \Hash has its initial ordering per the given entries:
+ *
+ * h = Hash[foo: 0, bar: 1]
+ * h # => {:foo=>0, :bar=>1}
+ *
+ * New entries are added at the end:
+ *
+ * h[:baz] = 2
+ * h # => {:foo=>0, :bar=>1, :baz=>2}
+ *
+ * Updating a value does not affect the order:
+ *
+ * h[:baz] = 3
+ * h # => {:foo=>0, :bar=>1, :baz=>3}
+ *
+ * But re-creating a deleted entry can affect the order:
+ *
+ * h.delete(:foo)
+ * h[:foo] = 5
+ * h # => {:bar=>1, :baz=>3, :foo=>5}
+ *
+ * === \Hash Keys
+ *
+ * ==== \Hash Key Equivalence
+ *
+ * Two objects are treated as the same \hash key when their <code>hash</code> value
* is identical and the two objects are <code>eql?</code> to each other.
*
- * A user-defined class may be used as a hash key if the <code>hash</code>
- * and <code>eql?</code> methods are overridden to provide meaningful
- * behavior. By default, separate instances refer to separate hash keys.
+ * ==== Modifying an Active \Hash Key
+ *
+ * Modifying a \Hash key while it is in use damages the hash's index.
+ *
+ * This \Hash has keys that are Arrays:
+ *
+ * a0 = [ :foo, :bar ]
+ * a1 = [ :baz, :bat ]
+ * h = {a0 => 0, a1 => 1}
+ * h.include?(a0) # => true
+ * h[a0] # => 0
+ * a0.hash # => 110002110
+ *
+ * Modifying array element <tt>a0[0]</tt> changes its hash value:
+ *
+ * a0[0] = :bam
+ * a0.hash # => 1069447059
+ *
+ * And damages the \Hash index:
+ *
+ * h.include?(a0) # => false
+ * h[a0] # => nil
+ *
+ * You can repair the hash index using method +rehash+:
+ *
+ * h.rehash # => {[:bam, :bar]=>0, [:baz, :bat]=>1}
+ * h.include?(a0) # => true
+ * h[a0] # => 0
+ *
+ * A \String key is always safe.
+ * That's because an unfrozen \String
+ * passed as a key will be replaced by a duplicated and frozen \String:
+ *
+ * s = 'foo'
+ * s.frozen? # => false
+ * h = {s => 0}
+ * first_key = h.keys.first
+ * first_key.frozen? # => true
+ *
+ * ==== User-Defined \Hash Keys
+ *
+ * To be useable as a \Hash key, objects must implement the methods <code>hash</code> and <code>eql?</code>.
+ * Note: this requirement does not apply if the \Hash uses #compare_by_identity since comparison will then
+ * rely on the keys' object id instead of <code>hash</code> and <code>eql?</code>.
+ *
+ * \Object defines basic implementation for <code>hash</code> and <code>eq?</code> that makes each object
+ * a distinct key. Typically, user-defined classes will want to override these methods to provide meaningful
+ * behavior, or for example inherit \Struct that has useful definitions for these.
*
* A typical implementation of <code>hash</code> is based on the
* object's data while <code>eql?</code> is usually aliased to the overridden
@@ -6209,8 +6979,8 @@ env_update(VALUE env, VALUE hash)
* end
*
* def ==(other)
- * self.class === other and
- * other.author == @author and
+ * self.class === other &&
+ * other.author == @author &&
* other.title == @title
* end
*
@@ -6231,18 +7001,225 @@ env_update(VALUE env, VALUE hash)
*
* reviews.length #=> 1
*
- * See also Object#hash and Object#eql?
+ * === Default Values
+ *
+ * The methods #[], #values_at and #dig need to return the value associated to a certain key.
+ * When that key is not found, that value will be determined by its default proc (if any)
+ * or else its default (initially `nil`).
+ *
+ * You can retrieve the default value with method #default:
+ *
+ * h = Hash.new
+ * h.default # => nil
+ *
+ * You can set the default value by passing an argument to method Hash.new or
+ * with method #default=
+ *
+ * h = Hash.new(-1)
+ * h.default # => -1
+ * h.default = 0
+ * h.default # => 0
+ *
+ * This default value is returned for #[], #values_at and #dig when a key is
+ * not found:
+ *
+ * counts = {foo: 42}
+ * counts.default # => nil (default)
+ * counts[:foo] = 42
+ * counts[:bar] # => nil
+ * counts.default = 0
+ * counts[:bar] # => 0
+ * counts.values_at(:foo, :bar, :baz) # => [42, 0, 0]
+ * counts.dig(:bar) # => 0
+ *
+ * Note that the default value is used without being duplicated. It is not advised to set
+ * the default value to a mutable object:
+ *
+ * synonyms = Hash.new([])
+ * synonyms[:hello] # => []
+ * synonyms[:hello] << :hi # => [:hi], but this mutates the default!
+ * synonyms.default # => [:hi]
+ * synonyms[:world] << :universe
+ * synonyms[:world] # => [:hi, :universe], oops
+ * synonyms.keys # => [], oops
+ *
+ * To use a mutable object as default, it is recommended to use a default proc
+ *
+ * ==== Default \Proc
+ *
+ * When the default proc for a \Hash is set (i.e., not +nil+),
+ * the default value returned by method #[] is determined by the default proc alone.
+ *
+ * You can retrieve the default proc with method #default_proc:
+ *
+ * h = Hash.new
+ * h.default_proc # => nil
+ *
+ * You can set the default proc by calling Hash.new with a block or
+ * calling the method #default_proc=
+ *
+ * h = Hash.new { |hash, key| "Default value for #{key}" }
+ * h.default_proc.class # => Proc
+ * h.default_proc = proc { |hash, key| "Default value for #{key.inspect}" }
+ * h.default_proc.class # => Proc
+ *
+ * When the default proc is set (i.e., not +nil+)
+ * and method #[] is called with with a non-existent key,
+ * #[] calls the default proc with both the \Hash object itself and the missing key,
+ * then returns the proc's return value:
+ *
+ * h = Hash.new { |hash, key| "Default value for #{key}" }
+ * h[:nosuch] # => "Default value for nosuch"
+ *
+ * Note that in the example above no entry for key +:nosuch+ is created:
+ *
+ * h.include?(:nosuch) # => false
+ *
+ * However, the proc itself can add a new entry:
+ *
+ * synonyms = Hash.new { |hash, key| hash[key] = [] }
+ * synonyms.include?(:hello) # => false
+ * synonyms[:hello] << :hi # => [:hi]
+ * synonyms[:world] << :universe # => [:universe]
+ * synonyms.keys # => [:hello, :world]
+ *
+ * Note that setting the default proc will clear the default value and vice versa.
+ *
+ * === What's Here
+ *
+ * First, what's elsewhere. \Class \Hash:
+ *
+ * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
+ * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
+ * which provides dozens of additional methods.
+ *
+ * Here, class \Hash provides methods that are useful for:
+ *
+ * - {Creating a Hash}[rdoc-ref:Hash@Methods+for+Creating+a+Hash]
+ * - {Setting Hash State}[rdoc-ref:Hash@Methods+for+Setting+Hash+State]
+ * - {Querying}[rdoc-ref:Hash@Methods+for+Querying]
+ * - {Comparing}[rdoc-ref:Hash@Methods+for+Comparing]
+ * - {Fetching}[rdoc-ref:Hash@Methods+for+Fetching]
+ * - {Assigning}[rdoc-ref:Hash@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:Hash@Methods+for+Deleting]
+ * - {Iterating}[rdoc-ref:Hash@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:Hash@Methods+for+Converting]
+ * - {Transforming Keys and Values}[rdoc-ref:Hash@Methods+for+Transforming+Keys+and+Values]
+ * - {And more....}[rdoc-ref:Hash@Other+Methods]
+ *
+ * \Class \Hash also includes methods from module Enumerable.
+ *
+ * ==== Methods for Creating a \Hash
+ *
+ * - ::[]: Returns a new hash populated with given objects.
+ * - ::new: Returns a new empty hash.
+ * - ::try_convert: Returns a new hash created from a given object.
+ *
+ * ==== Methods for Setting \Hash State
+ *
+ * - #compare_by_identity: Sets +self+ to consider only identity in comparing keys.
+ * - #default=: Sets the default to a given value.
+ * - #default_proc=: Sets the default proc to a given proc.
+ * - #rehash: Rebuilds the hash table by recomputing the hash index for each key.
+ *
+ * ==== Methods for Querying
+ *
+ * - #any?: Returns whether any element satisfies a given criterion.
+ * - #compare_by_identity?: Returns whether the hash considers only identity when comparing keys.
+ * - #default: Returns the default value, or the default value for a given key.
+ * - #default_proc: Returns the default proc.
+ * - #empty?: Returns whether there are no entries.
+ * - #eql?: Returns whether a given object is equal to +self+.
+ * - #hash: Returns the integer hash code.
+ * - #has_value?: Returns whether a given object is a value in +self+.
+ * - #include?, #has_key?, #member?, #key?: Returns whether a given object is a key in +self+.
+ * - #length, #size: Returns the count of entries.
+ * - #value?: Returns whether a given object is a value in +self+.
+ *
+ * ==== Methods for Comparing
+ *
+ * - #<: Returns whether +self+ is a proper subset of a given object.
+ * - #<=: Returns whether +self+ is a subset of a given object.
+ * - #==: Returns whether a given object is equal to +self+.
+ * - #>: Returns whether +self+ is a proper superset of a given object
+ * - #>=: Returns whether +self+ is a proper superset of a given object.
+ *
+ * ==== Methods for Fetching
+ *
+ * - #[]: Returns the value associated with a given key.
+ * - #assoc: Returns a 2-element array containing a given key and its value.
+ * - #dig: Returns the object in nested objects that is specified
+ * by a given key and additional arguments.
+ * - #fetch: Returns the value for a given key.
+ * - #fetch_values: Returns array containing the values associated with given keys.
+ * - #key: Returns the key for the first-found entry with a given value.
+ * - #keys: Returns an array containing all keys in +self+.
+ * - #rassoc: Returns a 2-element array consisting of the key and value
+ of the first-found entry having a given value.
+ * - #values: Returns an array containing all values in +self+/
+ * - #values_at: Returns an array containing values for given keys.
+ *
+ * ==== Methods for Assigning
+ *
+ * - #[]=, #store: Associates a given key with a given value.
+ * - #merge: Returns the hash formed by merging each given hash into a copy of +self+.
+ * - #merge!, #update: Merges each given hash into +self+.
+ * - #replace: Replaces the entire contents of +self+ with the contents of a given hash.
+ *
+ * ==== Methods for Deleting
+ *
+ * These methods remove entries from +self+:
+ *
+ * - #clear: Removes all entries from +self+.
+ * - #compact!: Removes all +nil+-valued entries from +self+.
+ * - #delete: Removes the entry for a given key.
+ * - #delete_if: Removes entries selected by a given block.
+ * - #filter!, #select!: Keep only those entries selected by a given block.
+ * - #keep_if: Keep only those entries selected by a given block.
+ * - #reject!: Removes entries selected by a given block.
+ * - #shift: Removes and returns the first entry.
+ *
+ * These methods return a copy of +self+ with some entries removed:
+ *
+ * - #compact: Returns a copy of +self+ with all +nil+-valued entries removed.
+ * - #except: Returns a copy of +self+ with entries removed for specified keys.
+ * - #filter, #select: Returns a copy of +self+ with only those entries selected by a given block.
+ * - #reject: Returns a copy of +self+ with entries removed as specified by a given block.
+ * - #slice: Returns a hash containing the entries for given keys.
+ *
+ * ==== Methods for Iterating
+ * - #each, #each_pair: Calls a given block with each key-value pair.
+ * - #each_key: Calls a given block with each key.
+ * - #each_value: Calls a given block with each value.
+ *
+ * ==== Methods for Converting
+ *
+ * - #inspect, #to_s: Returns a new String containing the hash entries.
+ * - #to_a: Returns a new array of 2-element arrays;
+ * each nested array contains a key-value pair from +self+.
+ * - #to_h: Returns +self+ if a \Hash;
+ * if a subclass of \Hash, returns a \Hash containing the entries from +self+.
+ * - #to_hash: Returns +self+.
+ * - #to_proc: Returns a proc that maps a given key to its value.
+ *
+ * ==== Methods for Transforming Keys and Values
+ *
+ * - #transform_keys: Returns a copy of +self+ with modified keys.
+ * - #transform_keys!: Modifies keys in +self+
+ * - #transform_values: Returns a copy of +self+ with modified values.
+ * - #transform_values!: Modifies values in +self+.
+ *
+ * ==== Other Methods
+ * - #flatten: Returns an array that is a 1-dimensional flattening of +self+.
+ * - #invert: Returns a hash with the each key-value pair inverted.
+ *
*/
void
Init_Hash(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
- id_hash = rb_intern("hash");
- id_yield = rb_intern("yield");
- id_default = rb_intern("default");
- id_flatten_bang = rb_intern("flatten!");
+ id_hash = rb_intern_const("hash");
+ id_flatten_bang = rb_intern_const("flatten!");
id_hash_iter_lev = rb_make_internal_id();
rb_cHash = rb_define_class("Hash", rb_cObject);
@@ -6275,7 +7252,6 @@ Init_Hash(void)
rb_define_method(rb_cHash, "default_proc", rb_hash_default_proc, 0);
rb_define_method(rb_cHash, "default_proc=", rb_hash_set_default_proc, 1);
rb_define_method(rb_cHash, "key", rb_hash_key, 1);
- rb_define_method(rb_cHash, "index", rb_hash_index, 1);
rb_define_method(rb_cHash, "size", rb_hash_size, 0);
rb_define_method(rb_cHash, "length", rb_hash_size, 0);
rb_define_method(rb_cHash, "empty?", rb_hash_empty_p, 0);
@@ -6285,8 +7261,8 @@ Init_Hash(void)
rb_define_method(rb_cHash, "each_pair", rb_hash_each_pair, 0);
rb_define_method(rb_cHash, "each", rb_hash_each_pair, 0);
- rb_define_method(rb_cHash, "transform_keys", rb_hash_transform_keys, 0);
- rb_define_method(rb_cHash, "transform_keys!", rb_hash_transform_keys_bang, 0);
+ rb_define_method(rb_cHash, "transform_keys", rb_hash_transform_keys, -1);
+ rb_define_method(rb_cHash, "transform_keys!", rb_hash_transform_keys_bang, -1);
rb_define_method(rb_cHash, "transform_values", rb_hash_transform_values, 0);
rb_define_method(rb_cHash, "transform_values!", rb_hash_transform_values_bang, 0);
@@ -6306,6 +7282,7 @@ Init_Hash(void)
rb_define_method(rb_cHash, "reject", rb_hash_reject, 0);
rb_define_method(rb_cHash, "reject!", rb_hash_reject_bang, 0);
rb_define_method(rb_cHash, "slice", rb_hash_slice, -1);
+ rb_define_method(rb_cHash, "except", rb_hash_except, -1);
rb_define_method(rb_cHash, "clear", rb_hash_clear, 0);
rb_define_method(rb_cHash, "invert", rb_hash_invert, 0);
rb_define_method(rb_cHash, "update", rb_hash_update, -1);
@@ -6338,6 +7315,9 @@ Init_Hash(void)
rb_define_method(rb_cHash, "deconstruct_keys", rb_hash_deconstruct_keys, 1);
+ rb_define_singleton_method(rb_cHash, "ruby2_keywords_hash?", rb_hash_s_ruby2_keywords_hash_p, 1);
+ rb_define_singleton_method(rb_cHash, "ruby2_keywords_hash", rb_hash_s_ruby2_keywords_hash, 1);
+
/* Document-class: ENV
*
* ENV is a hash-like accessor for environment variables.
@@ -6416,6 +7396,86 @@ Init_Hash(void)
* so most example snippets begin by resetting the contents of ENV:
* - ENV.replace replaces ENV with a new collection of entries.
* - ENV.clear empties ENV.
+ *
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \ENV:
+ *
+ * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
+ * - Extends {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
+ *
+ * Here, class \ENV provides methods that are useful for:
+ *
+ * - {Querying}[rdoc-ref:ENV@Methods+for+Querying]
+ * - {Assigning}[rdoc-ref:ENV@Methods+for+Assigning]
+ * - {Deleting}[rdoc-ref:ENV@Methods+for+Deleting]
+ * - {Iterating}[rdoc-ref:ENV@Methods+for+Iterating]
+ * - {Converting}[rdoc-ref:ENV@Methods+for+Converting]
+ * - {And more ....}[rdoc-ref:ENV@More+Methods]
+ *
+ * === Methods for Querying
+ *
+ * - ::[]: Returns the value for the given environment variable name if it exists:
+ * - ::empty?: Returns whether \ENV is empty.
+ * - ::has_value?, ::value?: Returns whether the given value is in \ENV.
+ * - ::include?, ::has_key?, ::key?, ::member?: Returns whether the given name
+ is in \ENV.
+ * - ::key: Returns the name of the first entry with the given value.
+ * - ::size, ::length: Returns the number of entries.
+ * - ::value?: Returns whether any entry has the given value.
+ *
+ * === Methods for Assigning
+ *
+ * - ::[]=, ::store: Creates, updates, or deletes the named environment variable.
+ * - ::clear: Removes every environment variable; returns \ENV:
+ * - ::update, ::merge!: Adds to \ENV each key/value pair in the given hash.
+ * - ::replace: Replaces the entire content of the \ENV
+ * with the name/value pairs in the given hash.
+ *
+ * === Methods for Deleting
+ *
+ * - ::delete: Deletes the named environment variable name if it exists.
+ * - ::delete_if: Deletes entries selected by the block.
+ * - ::keep_if: Deletes entries not selected by the block.
+ * - ::reject!: Similar to #delete_if, but returns +nil+ if no change was made.
+ * - ::select!, ::filter!: Deletes entries selected by the block.
+ * - ::shift: Removes and returns the first entry.
+ *
+ * === Methods for Iterating
+ *
+ * - ::each, ::each_pair: Calls the block with each name/value pair.
+ * - ::each_key: Calls the block with each name.
+ * - ::each_value: Calls the block with each value.
+ *
+ * === Methods for Converting
+ *
+ * - ::assoc: Returns a 2-element array containing the name and value
+ * of the named environment variable if it exists:
+ * - ::clone: Returns \ENV (and issues a warning).
+ * - ::except: Returns a hash of all name/value pairs except those given.
+ * - ::fetch: Returns the value for the given name.
+ * - ::inspect: Returns the contents of \ENV as a string.
+ * - ::invert: Returns a hash whose keys are the ENV values,
+ and whose values are the corresponding ENV names.
+ * - ::keys: Returns an array of all names.
+ * - ::rassoc: Returns the name and value of the first found entry
+ * that has the given value.
+ * - ::reject: Returns a hash of those entries not rejected by the block.
+ * - ::select, ::filter: Returns a hash of name/value pairs selected by the block.
+ * - ::slice: Returns a hash of the given names and their corresponding values.
+ * - ::to_a: Returns the entries as an array of 2-element Arrays.
+ * - ::to_h: Returns a hash of entries selected by the block.
+ * - ::to_hash: Returns a hash of all entries.
+ * - ::to_s: Returns the string <tt>'ENV'</tt>.
+ * - ::values: Returns all values as an array.
+ * - ::values_at: Returns an array of the values for the given name.
+ *
+ * === More Methods
+ *
+ * - ::dup: Raises an exception.
+ * - ::freeze: Raises an exception.
+ * - ::rehash: Returns +nil+, without modifying \ENV.
+ *
*/
/*
@@ -6423,8 +7483,10 @@ Init_Hash(void)
* envtbl = rb_define_class("ENV", rb_cObject);
*/
origenviron = environ;
- envtbl = rb_obj_alloc(rb_cObject);
+ envtbl = TypedData_Wrap_Struct(rb_cObject, &env_data_type, NULL);
rb_extend_object(envtbl, rb_mEnumerable);
+ FL_SET_RAW(envtbl, RUBY_FL_SHAREABLE);
+
rb_define_singleton_method(envtbl, "[]", rb_f_getenv, 1);
rb_define_singleton_method(envtbl, "fetch", env_fetch, -1);
@@ -6438,6 +7500,7 @@ Init_Hash(void)
rb_define_singleton_method(envtbl, "delete_if", env_delete_if, 0);
rb_define_singleton_method(envtbl, "keep_if", env_keep_if, 0);
rb_define_singleton_method(envtbl, "slice", env_slice, -1);
+ rb_define_singleton_method(envtbl, "except", env_except, -1);
rb_define_singleton_method(envtbl, "clear", env_clear, 0);
rb_define_singleton_method(envtbl, "reject", env_reject, 0);
rb_define_singleton_method(envtbl, "reject!", env_reject_bang, 0);
@@ -6449,14 +7512,13 @@ Init_Hash(void)
rb_define_singleton_method(envtbl, "freeze", env_freeze, 0);
rb_define_singleton_method(envtbl, "invert", env_invert, 0);
rb_define_singleton_method(envtbl, "replace", env_replace, 1);
- rb_define_singleton_method(envtbl, "update", env_update, 1);
- rb_define_singleton_method(envtbl, "merge!", env_update, 1);
+ rb_define_singleton_method(envtbl, "update", env_update, -1);
+ rb_define_singleton_method(envtbl, "merge!", env_update, -1);
rb_define_singleton_method(envtbl, "inspect", env_inspect, 0);
rb_define_singleton_method(envtbl, "rehash", env_none, 0);
rb_define_singleton_method(envtbl, "to_a", env_to_a, 0);
rb_define_singleton_method(envtbl, "to_s", env_to_s, 0);
rb_define_singleton_method(envtbl, "key", env_key, 1);
- rb_define_singleton_method(envtbl, "index", env_index, 1);
rb_define_singleton_method(envtbl, "size", env_size, 0);
rb_define_singleton_method(envtbl, "length", env_size, 0);
rb_define_singleton_method(envtbl, "empty?", env_empty_p, 0);
@@ -6473,6 +7535,14 @@ Init_Hash(void)
rb_define_singleton_method(envtbl, "to_h", env_to_h, 0);
rb_define_singleton_method(envtbl, "assoc", env_assoc, 1);
rb_define_singleton_method(envtbl, "rassoc", env_rassoc, 1);
+ rb_define_singleton_method(envtbl, "clone", env_clone, -1);
+ rb_define_singleton_method(envtbl, "dup", env_dup, 0);
+
+ VALUE envtbl_class = rb_singleton_class(envtbl);
+ rb_undef_method(envtbl_class, "initialize");
+ rb_undef_method(envtbl_class, "initialize_clone");
+ rb_undef_method(envtbl_class, "initialize_copy");
+ rb_undef_method(envtbl_class, "initialize_dup");
/*
* ENV is a Hash-like accessor for environment variables.
diff --git a/hrtime.h b/hrtime.h
index f133bdb1ac..7ed4e6b04c 100644
--- a/hrtime.h
+++ b/hrtime.h
@@ -36,6 +36,7 @@
#define RB_HRTIME_PER_MSEC (RB_HRTIME_PER_USEC * (rb_hrtime_t)1000)
#define RB_HRTIME_PER_SEC (RB_HRTIME_PER_MSEC * (rb_hrtime_t)1000)
#define RB_HRTIME_MAX UINT64_MAX
+#define RB_HRTIME_MIN ((rb_hrtime_t)0)
/*
* Lets try to support time travelers. Lets assume anybody with a time machine
@@ -91,6 +92,15 @@ rb_hrtime_add(rb_hrtime_t a, rb_hrtime_t b)
return c;
}
+static inline rb_hrtime_t
+rb_hrtime_sub(rb_hrtime_t a, rb_hrtime_t b)
+{
+ if (a < b) {
+ return RB_HRTIME_MIN;
+ }
+ return a - b;
+}
+
/*
* convert a timeval struct to rb_hrtime_t, clamping at RB_HRTIME_MAX
*/
@@ -165,4 +175,53 @@ rb_hrtime2timeval(struct timeval *tv, const rb_hrtime_t *hrt)
}
return 0;
}
+
+#include "internal/warnings.h"
+#include "internal/time.h"
+
+/*
+ * Back when we used "struct timeval", not all platforms implemented
+ * tv_sec as time_t. Nowadays we use "struct timespec" and tv_sec
+ * seems to be implemented more consistently across platforms.
+ * At least other parts of our code hasn't had to deal with non-time_t
+ * tv_sec in timespec...
+ */
+#define TIMESPEC_SEC_MAX TIMET_MAX
+#define TIMESPEC_SEC_MIN TIMET_MIN
+
+COMPILER_WARNING_PUSH
+#if __has_warning("-Wimplicit-int-float-conversion")
+COMPILER_WARNING_IGNORED(-Wimplicit-int-float-conversion)
+#elif defined(_MSC_VER)
+/* C4305: 'initializing': truncation from '__int64' to 'const double' */
+COMPILER_WARNING_IGNORED(4305)
+#endif
+static const double TIMESPEC_SEC_MAX_as_double = TIMESPEC_SEC_MAX;
+COMPILER_WARNING_POP
+
+static inline rb_hrtime_t *
+double2hrtime(rb_hrtime_t *hrt, double d)
+{
+ /* assume timespec.tv_sec has same signedness as time_t */
+ const double TIMESPEC_SEC_MAX_PLUS_ONE = 2.0 * (TIMESPEC_SEC_MAX_as_double / 2.0 + 1.0);
+
+ if (TIMESPEC_SEC_MAX_PLUS_ONE <= d) {
+ *hrt = RB_HRTIME_MAX;
+ return NULL;
+ }
+ else if (d <= 0) {
+ *hrt = 0;
+ }
+ else {
+ *hrt = (rb_hrtime_t)(d * (double)RB_HRTIME_PER_SEC);
+ }
+ return hrt;
+}
+
+static inline double
+hrtime2double(rb_hrtime_t hrt)
+{
+ return (double)hrt / (double)RB_HRTIME_PER_SEC;
+}
+
#endif /* RB_HRTIME_H */
diff --git a/id_table.c b/id_table.c
index f566582479..a9a041b955 100644
--- a/id_table.c
+++ b/id_table.c
@@ -7,6 +7,7 @@
#endif
#if ID_TABLE_DEBUG == 0
+#undef NDEBUG
#define NDEBUG
#endif
#include "ruby_assert.h"
@@ -84,14 +85,14 @@ rb_id_table_init(struct rb_id_table *tbl, int capa)
{
MEMZERO(tbl, struct rb_id_table, 1);
if (capa > 0) {
- capa = round_capa(capa);
- tbl->capa = (int)capa;
- tbl->items = ZALLOC_N(item_t, capa);
+ capa = round_capa(capa);
+ tbl->capa = (int)capa;
+ tbl->items = ZALLOC_N(item_t, capa);
}
return tbl;
}
-struct rb_id_table *
+MJIT_FUNC_EXPORTED struct rb_id_table *
rb_id_table_create(size_t capa)
{
struct rb_id_table *tbl = ALLOC(struct rb_id_table);
@@ -129,16 +130,16 @@ static int
hash_table_index(struct rb_id_table* tbl, id_key_t key)
{
if (tbl->capa > 0) {
- int mask = tbl->capa - 1;
- int ix = key & mask;
- int d = 1;
- while (key != ITEM_GET_KEY(tbl, ix)) {
- if (!ITEM_COLLIDED(tbl, ix))
- return -1;
- ix = (ix + d) & mask;
- d++;
- }
- return ix;
+ int mask = tbl->capa - 1;
+ int ix = key & mask;
+ int d = 1;
+ while (key != ITEM_GET_KEY(tbl, ix)) {
+ if (!ITEM_COLLIDED(tbl, ix))
+ return -1;
+ ix = (ix + d) & mask;
+ d++;
+ }
+ return ix;
}
return -1;
}
@@ -151,13 +152,13 @@ hash_table_raw_insert(struct rb_id_table *tbl, id_key_t key, VALUE val)
int d = 1;
assert(key != 0);
while (ITEM_KEY_ISSET(tbl, ix)) {
- ITEM_SET_COLLIDED(tbl, ix);
- ix = (ix + d) & mask;
- d++;
+ ITEM_SET_COLLIDED(tbl, ix);
+ ix = (ix + d) & mask;
+ d++;
}
tbl->num++;
if (!ITEM_COLLIDED(tbl, ix)) {
- tbl->used++;
+ tbl->used++;
}
ITEM_SET_KEY(tbl, ix, key);
tbl->items[ix].val = val;
@@ -167,16 +168,16 @@ static int
hash_delete_index(struct rb_id_table *tbl, int ix)
{
if (ix >= 0) {
- if (!ITEM_COLLIDED(tbl, ix)) {
- tbl->used--;
- }
- tbl->num--;
- ITEM_SET_KEY(tbl, ix, 0);
- tbl->items[ix].val = 0;
- return TRUE;
+ if (!ITEM_COLLIDED(tbl, ix)) {
+ tbl->used--;
+ }
+ tbl->num--;
+ ITEM_SET_KEY(tbl, ix, 0);
+ tbl->items[ix].val = 0;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -184,24 +185,24 @@ static void
hash_table_extend(struct rb_id_table* tbl)
{
if (tbl->used + (tbl->used >> 1) >= tbl->capa) {
- int new_cap = round_capa(tbl->num + (tbl->num >> 1));
- int i;
- item_t* old;
- struct rb_id_table tmp_tbl = {0, 0, 0};
- if (new_cap < tbl->capa) {
- new_cap = round_capa(tbl->used + (tbl->used >> 1));
- }
- tmp_tbl.capa = new_cap;
- tmp_tbl.items = ZALLOC_N(item_t, new_cap);
- for (i = 0; i < tbl->capa; i++) {
- id_key_t key = ITEM_GET_KEY(tbl, i);
- if (key != 0) {
- hash_table_raw_insert(&tmp_tbl, key, tbl->items[i].val);
- }
- }
- old = tbl->items;
- *tbl = tmp_tbl;
- xfree(old);
+ int new_cap = round_capa(tbl->num + (tbl->num >> 1));
+ int i;
+ item_t* old;
+ struct rb_id_table tmp_tbl = {0, 0, 0};
+ if (new_cap < tbl->capa) {
+ new_cap = round_capa(tbl->used + (tbl->used >> 1));
+ }
+ tmp_tbl.capa = new_cap;
+ tmp_tbl.items = ZALLOC_N(item_t, new_cap);
+ for (i = 0; i < tbl->capa; i++) {
+ id_key_t key = ITEM_GET_KEY(tbl, i);
+ if (key != 0) {
+ hash_table_raw_insert(&tmp_tbl, key, tbl->items[i].val);
+ }
+ }
+ old = tbl->items;
+ *tbl = tmp_tbl;
+ xfree(old);
}
}
@@ -215,25 +216,25 @@ hash_table_show(struct rb_id_table *tbl)
fprintf(stderr, "tbl: %p (capa: %d, num: %d, used: %d)\n", tbl, tbl->capa, tbl->num, tbl->used);
for (i=0; i<capa; i++) {
- if (ITEM_KEY_ISSET(tbl, i)) {
- fprintf(stderr, " -> [%d] %s %d\n", i, rb_id2name(key2id(keys[i])), (int)keys[i]);
- }
+ if (ITEM_KEY_ISSET(tbl, i)) {
+ fprintf(stderr, " -> [%d] %s %d\n", i, rb_id2name(key2id(keys[i])), (int)keys[i]);
+ }
}
}
#endif
-int
+MJIT_FUNC_EXPORTED int
rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp)
{
id_key_t key = id2key(id);
int index = hash_table_index(tbl, key);
if (index >= 0) {
- *valp = tbl->items[index].val;
- return TRUE;
+ *valp = tbl->items[index].val;
+ return TRUE;
}
else {
- return FALSE;
+ return FALSE;
}
}
@@ -243,16 +244,16 @@ rb_id_table_insert_key(struct rb_id_table *tbl, const id_key_t key, const VALUE
const int index = hash_table_index(tbl, key);
if (index >= 0) {
- tbl->items[index].val = val;
+ tbl->items[index].val = val;
}
else {
- hash_table_extend(tbl);
- hash_table_raw_insert(tbl, key, val);
+ hash_table_extend(tbl);
+ hash_table_raw_insert(tbl, key, val);
}
return TRUE;
}
-int
+MJIT_FUNC_EXPORTED int
rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val)
{
return rb_id_table_insert_key(tbl, id2key(id), val);
@@ -267,21 +268,18 @@ rb_id_table_delete(struct rb_id_table *tbl, ID id)
}
void
-rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data)
+rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data)
{
int i, capa = tbl->capa;
for (i=0; i<capa; i++) {
if (ITEM_KEY_ISSET(tbl, i)) {
const id_key_t key = ITEM_GET_KEY(tbl, i);
- enum rb_id_table_iterator_result ret = (*func)(Qundef, tbl->items[i].val, data);
+ enum rb_id_table_iterator_result ret = (*func)(key2id(key), tbl->items[i].val, data);
assert(key != 0);
- if (ret == ID_TABLE_REPLACE) {
- VALUE val = tbl->items[i].val;
- ret = (*replace)(NULL, &val, data, TRUE);
- tbl->items[i].val = val;
- }
+ if (ret == ID_TABLE_DELETE)
+ hash_delete_index(tbl, i);
else if (ret == ID_TABLE_STOP)
return;
}
@@ -289,37 +287,40 @@ rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_fu
}
void
-rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data)
+rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data)
{
int i, capa = tbl->capa;
for (i=0; i<capa; i++) {
- if (ITEM_KEY_ISSET(tbl, i)) {
- const id_key_t key = ITEM_GET_KEY(tbl, i);
- enum rb_id_table_iterator_result ret = (*func)(key2id(key), tbl->items[i].val, data);
- assert(key != 0);
-
- if (ret == ID_TABLE_DELETE)
- hash_delete_index(tbl, i);
- else if (ret == ID_TABLE_STOP)
- return;
- }
+ if (ITEM_KEY_ISSET(tbl, i)) {
+ enum rb_id_table_iterator_result ret = (*func)(tbl->items[i].val, data);
+
+ if (ret == ID_TABLE_DELETE)
+ hash_delete_index(tbl, i);
+ else if (ret == ID_TABLE_STOP)
+ return;
+ }
}
}
void
-rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data)
+rb_id_table_foreach_values_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, rb_id_table_update_value_callback_func_t *replace, void *data)
{
int i, capa = tbl->capa;
- for (i=0; i<capa; i++) {
- if (ITEM_KEY_ISSET(tbl, i)) {
- enum rb_id_table_iterator_result ret = (*func)(tbl->items[i].val, data);
-
- if (ret == ID_TABLE_DELETE)
- hash_delete_index(tbl, i);
- else if (ret == ID_TABLE_STOP)
- return;
- }
+ for (i = 0; i < capa; i++) {
+ if (ITEM_KEY_ISSET(tbl, i)) {
+ enum rb_id_table_iterator_result ret = (*func)(tbl->items[i].val, data);
+
+ if (ret == ID_TABLE_REPLACE) {
+ VALUE val = tbl->items[i].val;
+ ret = (*replace)(&val, data, TRUE);
+ tbl->items[i].val = val;
+ }
+
+ if (ret == ID_TABLE_STOP)
+ return;
+ }
}
}
+
diff --git a/id_table.h b/id_table.h
index abd9eb5f38..f72e2d1d92 100644
--- a/id_table.h
+++ b/id_table.h
@@ -1,5 +1,7 @@
#ifndef RUBY_ID_TABLE_H
#define RUBY_ID_TABLE_H 1
+#include "ruby/internal/config.h"
+#include <stddef.h>
#include "ruby/ruby.h"
struct rb_id_table;
@@ -17,18 +19,21 @@ struct rb_id_table *rb_id_table_create(size_t size);
void rb_id_table_free(struct rb_id_table *tbl);
void rb_id_table_clear(struct rb_id_table *tbl);
-size_t rb_id_table_size(const struct rb_id_table *tbl);
size_t rb_id_table_memsize(const struct rb_id_table *tbl);
int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
int rb_id_table_delete(struct rb_id_table *tbl, ID id);
-typedef enum rb_id_table_iterator_result rb_id_table_update_callback_func_t(ID *id, VALUE *val, void *data, int existing);
+typedef enum rb_id_table_iterator_result rb_id_table_update_value_callback_func_t(VALUE *val, void *data, int existing);
typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
-void rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data);
void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);
+void rb_id_table_foreach_values_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, rb_id_table_update_value_callback_func_t *replace, void *data);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+size_t rb_id_table_size(const struct rb_id_table *tbl);
+RUBY_SYMBOL_EXPORT_END
#endif /* RUBY_ID_TABLE_H */
diff --git a/include/ruby.h b/include/ruby.h
index 076b5ce258..789804b7b4 100644
--- a/include/ruby.h
+++ b/include/ruby.h
@@ -1,28 +1,33 @@
-/**********************************************************************
-
- ruby.h -
-
- $Author$
- created at: Sun 10 12:06:15 Jun JST 2007
-
- Copyright (C) 2007-2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_H
+#ifndef RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_H 1
-
+/**
+ * @author $Author$
+ * @date Sun 10 12:06:15 Jun JST 2007
+ * @copyright 2007-2008 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#define HAVE_RUBY_ATOMIC_H 1
+#define HAVE_RUBY_DEBUG_H 1
#define HAVE_RUBY_DEFINES_H 1
#define HAVE_RUBY_ENCODING_H 1
+#define HAVE_RUBY_FIBER_SCHEDULER_H 1
#define HAVE_RUBY_INTERN_H 1
#define HAVE_RUBY_IO_H 1
+#define HAVE_RUBY_MEMORY_VIEW_H 1
#define HAVE_RUBY_MISSING_H 1
+#define HAVE_RUBY_ONIGMO_H 1
#define HAVE_RUBY_ONIGURUMA_H 1
+#define HAVE_RUBY_RACTOR_H 1
+#define HAVE_RUBY_RANDOM_H 1
#define HAVE_RUBY_RE_H 1
#define HAVE_RUBY_REGEX_H 1
#define HAVE_RUBY_RUBY_H 1
#define HAVE_RUBY_ST_H 1
#define HAVE_RUBY_THREAD_H 1
+#define HAVE_RUBY_THREAD_NATIVE_H 1
#define HAVE_RUBY_UTIL_H 1
#define HAVE_RUBY_VERSION_H 1
#define HAVE_RUBY_VM_H 1
diff --git a/include/ruby/assert.h b/include/ruby/assert.h
index d19d8e4e32..0c052363bc 100644
--- a/include/ruby/assert.h
+++ b/include/ruby/assert.h
@@ -1,54 +1,234 @@
-#ifndef RUBY_ASSERT_H
+#ifndef RUBY_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_ASSERT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @date Wed May 18 00:21:44 JST 1994
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ */
+#include "ruby/internal/assume.h"
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/backward/2/assume.h"
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
+/* RUBY_NDEBUG is very simple: after everything described below are done,
+ * define it with either NDEBUG is undefined (=0) or defined (=1). It is truly
+ * subordinate.
+ *
+ * RUBY_DEBUG versus NDEBUG is complicated. Assertions shall be:
+ *
+ * | -UNDEBUG | -DNDEBUG
+ * ---------------+----------+---------
+ * -URUBY_DEBUG | (*1) | disabled
+ * -DRUBY_DEBUG=0 | disabled | disabled
+ * -DRUBY_DEBUG=1 | enabled | (*2)
+ * -DRUBY_DEBUG | enabled | (*2)
+ *
+ * where:
+ *
+ * - (*1): Assertions shall be silently disabled, no warnings, in favour of
+ * commit 21991e6ca59274e41a472b5256bd3245f6596c90.
+ *
+ * - (*2): Compile-time warnings shall be issued.
+ */
-NORETURN(void rb_assert_failure(const char *, int, const char *, const char *));
-#ifdef RUBY_FUNCTION_NAME_STRING
-# define RUBY_ASSERT_FAIL(expr) \
- rb_assert_failure(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, expr)
+/** @cond INTERNAL_MACRO */
+
+/*
+ * Pro tip: `!!RUBY_DEBUG-1` expands to...
+ *
+ * - `!!(-1)` (== `!0` == `1`) when RUBY_DEBUG is defined to be empty,
+ * - `(!!0)-1` (== `0-1` == `-1`) when RUBY_DEBUG is defined as 0, and
+ * - `(!!n)-1` (== `1-1` == `0`) when RUBY_DEBUG is defined as something else.
+ */
+#if ! defined(RUBY_DEBUG)
+# define RBIMPL_RUBY_DEBUG 0
+#elif !!RUBY_DEBUG-1 < 0
+# define RBIMPL_RUBY_DEBUG 0
#else
-# define RUBY_ASSERT_FAIL(expr) \
- rb_assert_failure(__FILE__, __LINE__, NULL, expr)
+# define RBIMPL_RUBY_DEBUG 1
#endif
-#define RUBY_ASSERT_MESG(expr, mesg) \
- ((expr) ? (void)0 : RUBY_ASSERT_FAIL(mesg))
-#ifdef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
-# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \
- ((RUBY_DEBUG+0) ? RUBY_ASSERT_MESG((expr), mesg) : \
- __builtin_choose_expr( \
- __builtin_constant_p(cond), \
- __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), \
- RUBY_ASSERT_MESG(!(cond) || (expr), mesg)))
+
+/*
+ * ISO/IEC 9899 (all past versions) says that "If NDEBUG is defined as a macro
+ * name at the point in the source file where <assert.h> is included, ..."
+ * which means we must not take its defined value into account.
+ */
+#if defined(NDEBUG)
+# define RBIMPL_NDEBUG 1
#else
-# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \
- RUBY_ASSERT_MESG(!((RUBY_DEBUG+0) || (cond)) || (expr), mesg)
+# define RBIMPL_NDEBUG 0
#endif
-#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN((!RUBY_NDEBUG+0), expr, #expr)
-#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
-#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG_WHEN(TRUE, expr, #expr)
-#ifndef RUBY_DEBUG
+/** @endcond */
+
+/* Here we go... */
+#undef RUBY_DEBUG
+#undef RUBY_NDEBUG
+#undef NDEBUG
+#if defined(__DOXYGEN__)
+# /** Define this macro when you want assertions. */
# define RUBY_DEBUG 0
-#endif
-#ifndef RUBY_NDEBUG
-# ifdef NDEBUG
-# define RUBY_NDEBUG 1
+# /** Define this macro when you don't want assertions. */
+# define NDEBUG
+# /** This macro is basically the same as #NDEBUG */
+# define RUBY_NDEBUG 1
+
+#elif (RBIMPL_NDEBUG == 1) && (RBIMPL_RUBY_DEBUG == 0)
+# /* Assertions disabled as per request, no conflicts. */
+# define RUBY_DEBUG 0
+# define RUBY_NDEBUG 1
+# define NDEBUG
+
+#elif (RBIMPL_NDEBUG == 0) && (RBIMPL_RUBY_DEBUG == 1)
+# /* Assertions enabled as per request, no conflicts. */
+# define RUBY_DEBUG 1
+# define RUBY_NDEBUG 0
+# /* keep NDEBUG undefined */
+
+#elif (RBIMPL_NDEBUG == 0) && (RBIMPL_RUBY_DEBUG == 0)
+# /* The (*1) situation in above diagram. */
+# define RUBY_DEBUG 0
+# define RUBY_NDEBUG 1
+# define NDEBUG
+
+#elif (RBIMPL_NDEBUG == 1) && (RBIMPL_RUBY_DEBUG == 1)
+# /* The (*2) situation in above diagram. */
+# define RUBY_DEBUG 1
+# define RUBY_NDEBUG 0
+# /* keep NDEBUG undefined */
+
+# if defined(_MSC_VER)
+# pragma message("NDEBUG is ignored because RUBY_DEBUG>0.")
+# elif defined(__GNUC__)
+# pragma GCC warning "NDEBUG is ignored because RUBY_DEBUG>0."
# else
-# define RUBY_NDEBUG 0
+# error NDEBUG is ignored because RUBY_DEBUG>0.
# endif
#endif
+#undef RBIMPL_NDEBUG
+#undef RBIMPL_RUBY_DEBUG
+
+/** @cond INTERNAL_MACRO */
+#define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0)
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_COLD()
+void rb_assert_failure(const char *file, int line, const char *name, const char *expr);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#ifdef RUBY_FUNCTION_NAME_STRING
+# define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
+#else
+# define RBIMPL_ASSERT_FUNC RBIMPL_CAST((const char *)0)
+#endif
+
+/** @endcond */
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
+/**
+ * Prints the given message, and terminates the entire process abnormally.
+ *
+ * @param mesg The message to display.
+ */
+#define RUBY_ASSERT_FAIL(mesg) \
+ rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg)
+
+/**
+ * Asserts that the expression is truthy. If not aborts with the message.
+ *
+ * @param expr What supposedly evaluates to true.
+ * @param mesg The message to display on failure.
+ */
+#define RUBY_ASSERT_MESG(expr, mesg) \
+ (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
+
+/**
+ * A variant of #RUBY_ASSERT that does not interface with #RUBY_DEBUG.
+ *
+ * @copydetails #RUBY_ASSERT
+ */
+#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr)
+
+/**
+ * Asserts that the given expression is truthy if and only if #RUBY_DEBUG is truthy.
+ *
+ * @param expr What supposedly evaluates to true.
+ */
+#if RUBY_DEBUG
+# define RUBY_ASSERT(expr) RUBY_ASSERT_MESG((expr), #expr)
+#else
+# define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING
#endif
-} /* extern "C" { */
+
+/**
+ * A variant of #RUBY_ASSERT that interfaces with #NDEBUG instead of
+ * #RUBY_DEBUG. This almost resembles `assert` C standard macro, except minor
+ * implementation details.
+ *
+ * @copydetails #RUBY_ASSERT
+ */
+/* Currently `RUBY_DEBUG == ! defined(NDEBUG)` is always true. There is no
+ * difference any longer between this one and `RUBY_ASSERT`. */
+#if defined(NDEBUG)
+# define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING
+#else
+# define RUBY_ASSERT_NDEBUG(expr) RUBY_ASSERT_MESG((expr), #expr)
#endif
+/**
+ * @copydoc #RUBY_ASSERT_WHEN
+ * @param mesg The message to display on failure.
+ */
+#if RUBY_DEBUG
+# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) RUBY_ASSERT_MESG((expr), (mesg))
+#else
+# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \
+ ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING)
#endif
+
+/**
+ * A variant of #RUBY_ASSERT that asserts when either #RUBY_DEBUG or `cond`
+ * parameter is truthy.
+ *
+ * @param cond Extra condition that shall hold for assertion to take effect.
+ * @param expr What supposedly evaluates to true.
+ */
+#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr)
+
+/**
+ * This is either #RUBY_ASSERT or #RBIMPL_ASSUME, depending on #RUBY_DEBUG.
+ *
+ * @copydetails #RUBY_ASSERT
+ */
+#if RUBY_DEBUG
+# define RBIMPL_ASSERT_OR_ASSUME(expr) RUBY_ASSERT_ALWAYS(expr)
+#elif RBIMPL_COMPILER_BEFORE(Clang, 7, 0, 0)
+# /* See commit 67d259c5dccd31fe49d417fec169977712ffdf10 */
+# define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
+#elif defined(RUBY_ASSERT_NOASSUME)
+# /* See commit d300a734414ef6de7e8eb563b7cc4389c455ed08 */
+# define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
+#elif ! defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
+#else
+# define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSUME(expr)
+#endif
+
+#endif /* RUBY_ASSERT_H */
diff --git a/include/ruby/atomic.h b/include/ruby/atomic.h
new file mode 100644
index 0000000000..3eb80fbf7d
--- /dev/null
+++ b/include/ruby/atomic.h
@@ -0,0 +1,890 @@
+#ifndef RUBY_ATOMIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_ATOMIC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Atomic operations
+ *
+ * Basically, if we could assume either C11 or C++11, these macros are just
+ * redundant. Sadly we cannot. We have to do them ourselves.
+ */
+
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h> /* size_t */
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* ssize_t */
+#endif
+
+#if RBIMPL_COMPILER_SINCE(MSVC, 13, 0, 0)
+# pragma intrinsic(_InterlockedOr)
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+# include <atomic.h>
+#endif
+
+#include "ruby/assert.h"
+#include "ruby/backward/2/limits.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/static_assert.h"
+#include "ruby/internal/stdbool.h"
+
+/*
+ * Asserts that your environment supports more than one atomic types. These
+ * days systems tend to have such property (C11 was a standard of decades ago,
+ * right?) but we still support older ones.
+ */
+#if defined(__DOXYGEN__) || defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_SYNC_BUILTINS)
+# define RUBY_ATOMIC_GENERIC_MACRO 1
+#endif
+
+/**
+ * Type that is eligible for atomic operations. Depending on your host
+ * platform you might have more than one such type, but we choose one of them
+ * anyways.
+ */
+#if defined(__DOXYGEN__)
+using rb_atomic_t = std::atomic<unsigned>;
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+typedef unsigned int rb_atomic_t;
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+typedef unsigned int rb_atomic_t;
+#elif defined(_WIN32)
+typedef LONG rb_atomic_t;
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+typedef unsigned int rb_atomic_t;
+#else
+# error No atomic operation found
+#endif
+
+/**
+ * Atomically replaces the value pointed by `var` with the result of addition
+ * of `val` to the old value of `var`.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to add.
+ * @return What was stored in `var` before the addition.
+ * @post `var` holds `var + val`.
+ */
+#define RUBY_ATOMIC_FETCH_ADD(var, val) rbimpl_atomic_fetch_add(&(var), (val))
+
+/**
+ * Atomically replaces the value pointed by `var` with the result of
+ * subtraction of `val` to the old value of `var`.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to subtract.
+ * @return What was stored in `var` before the subtraction.
+ * @post `var` holds `var - val`.
+ */
+#define RUBY_ATOMIC_FETCH_SUB(var, val) rbimpl_atomic_fetch_sub(&(var), (val))
+
+/**
+ * Atomically replaces the value pointed by `var` with the result of
+ * bitwise OR between `val` and the old value of `var`.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to mix.
+ * @return void
+ * @post `var` holds `var | val`.
+ * @note For portability, this macro can return void.
+ */
+#define RUBY_ATOMIC_OR(var, val) rbimpl_atomic_or(&(var), (val))
+
+/**
+ * Atomically replaces the value pointed by `var` with `val`. This is just an
+ * assignment, but you can additionally know the previous value.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to set.
+ * @return What was stored in `var` before the assignment.
+ * @post `var` holds `val`.
+ */
+#define RUBY_ATOMIC_EXCHANGE(var, val) rbimpl_atomic_exchange(&(var), (val))
+
+/**
+ * Atomic compare-and-swap. This stores `val` to `var` if and only if the
+ * assignment changes the value of `var` from `oldval` to `newval`. You can
+ * detect whether the assignment happened or not using the return value.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param oldval Expected value of `var` before the assignment.
+ * @param newval What you want to store at `var`.
+ * @retval oldval Successful assignment (`var` is now `newval`).
+ * @retval otherwise Something else is at `var`; not updated.
+ */
+#define RUBY_ATOMIC_CAS(var, oldval, newval) \
+ rbimpl_atomic_cas(&(var), (oldval), (newval))
+
+/**
+ * Identical to #RUBY_ATOMIC_EXCHANGE, except for the return type.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to set.
+ * @return void
+ * @post `var` holds `val`.
+ */
+#define RUBY_ATOMIC_SET(var, val) rbimpl_atomic_set(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_FETCH_ADD, except for the return type.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to add.
+ * @return void
+ * @post `var` holds `var + val`.
+ */
+#define RUBY_ATOMIC_ADD(var, val) rbimpl_atomic_add(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_FETCH_SUB, except for the return type.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @param val Value to subtract.
+ * @return void
+ * @post `var` holds `var - val`.
+ */
+#define RUBY_ATOMIC_SUB(var, val) rbimpl_atomic_sub(&(var), (val))
+
+/**
+ * Atomically increments the value pointed by `var`.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @return void
+ * @post `var` holds `var + 1`.
+ */
+#define RUBY_ATOMIC_INC(var) rbimpl_atomic_inc(&(var))
+
+/**
+ * Atomically decrements the value pointed by `var`.
+ *
+ * @param var A variable of ::rb_atomic_t.
+ * @return void
+ * @post `var` holds `var - 1`.
+ */
+#define RUBY_ATOMIC_DEC(var) rbimpl_atomic_dec(&(var))
+
+/**
+ * Identical to #RUBY_ATOMIC_INC, except it expects its argument is `size_t`.
+ * There are cases where ::rb_atomic_t is 32bit while `size_t` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @return void
+ * @post `var` holds `var + 1`.
+ */
+#define RUBY_ATOMIC_SIZE_INC(var) rbimpl_atomic_size_inc(&(var))
+
+/**
+ * Identical to #RUBY_ATOMIC_DEC, except it expects its argument is `size_t`.
+ * There are cases where ::rb_atomic_t is 32bit while `size_t` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @return void
+ * @post `var` holds `var - 1`.
+ */
+#define RUBY_ATOMIC_SIZE_DEC(var) rbimpl_atomic_size_dec(&(var))
+
+/**
+ * Identical to #RUBY_ATOMIC_EXCHANGE, except it expects its arguments are
+ * `size_t`. There are cases where ::rb_atomic_t is 32bit while `size_t` is
+ * 64bit. This should be used for size related operations to support such
+ * platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @param val Value to set.
+ * @return What was stored in `var` before the assignment.
+ * @post `var` holds `val`.
+ */
+#define RUBY_ATOMIC_SIZE_EXCHANGE(var, val) \
+ rbimpl_atomic_size_exchange(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_CAS, except it expects its arguments are `size_t`.
+ * There are cases where ::rb_atomic_t is 32bit while `size_t` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @param oldval Expected value of `var` before the assignment.
+ * @param newval What you want to store at `var`.
+ * @retval oldval Successful assignment (`var` is now `newval`).
+ * @retval otherwise Something else is at `var`; not updated.
+ */
+#define RUBY_ATOMIC_SIZE_CAS(var, oldval, newval) \
+ rbimpl_atomic_size_cas(&(var), (oldval), (newval))
+
+/**
+ * Identical to #RUBY_ATOMIC_ADD, except it expects its arguments are `size_t`.
+ * There are cases where ::rb_atomic_t is 32bit while `size_t` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @param val Value to add.
+ * @return void
+ * @post `var` holds `var + val`.
+ */
+#define RUBY_ATOMIC_SIZE_ADD(var, val) rbimpl_atomic_size_add(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_SUB, except it expects its arguments are `size_t`.
+ * There are cases where ::rb_atomic_t is 32bit while `size_t` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `size_t`.
+ * @param val Value to subtract.
+ * @return void
+ * @post `var` holds `var - val`.
+ */
+#define RUBY_ATOMIC_SIZE_SUB(var, val) rbimpl_atomic_size_sub(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_EXCHANGE, except it expects its arguments are
+ * `void*`. There are cases where ::rb_atomic_t is 32bit while `void*` is
+ * 64bit. This should be used for pointer related operations to support such
+ * platforms.
+ *
+ * @param var A variable of `void *`.
+ * @param val Value to set.
+ * @return What was stored in `var` before the assignment.
+ * @post `var` holds `val`.
+ *
+ * @internal
+ *
+ * :FIXME: this `(void*)` cast is evil! However `void*` is incompatible with
+ * some pointers, most notably function pointers.
+ */
+#define RUBY_ATOMIC_PTR_EXCHANGE(var, val) \
+ RBIMPL_CAST(rbimpl_atomic_ptr_exchange((void **)&(var), (void *)val))
+
+/**
+ * Identical to #RUBY_ATOMIC_CAS, except it expects its arguments are `void*`.
+ * There are cases where ::rb_atomic_t is 32bit while `void*` is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `void*`.
+ * @param oldval Expected value of `var` before the assignment.
+ * @param newval What you want to store at `var`.
+ * @retval oldval Successful assignment (`var` is now `newval`).
+ * @retval otherwise Something else is at `var`; not updated.
+ */
+#define RUBY_ATOMIC_PTR_CAS(var, oldval, newval) \
+ RBIMPL_CAST(rbimpl_atomic_ptr_cas((void **)&(var), (oldval), (newval)))
+
+/**
+ * Identical to #RUBY_ATOMIC_EXCHANGE, except it expects its arguments are
+ * ::VALUE. There are cases where ::rb_atomic_t is 32bit while ::VALUE is
+ * 64bit. This should be used for pointer related operations to support such
+ * platforms.
+ *
+ * @param var A variable of ::VALUE.
+ * @param val Value to set.
+ * @return What was stored in `var` before the assignment.
+ * @post `var` holds `val`.
+ */
+#define RUBY_ATOMIC_VALUE_EXCHANGE(var, val) \
+ rbimpl_atomic_value_exchange(&(var), (val))
+
+/**
+ * Identical to #RUBY_ATOMIC_CAS, except it expects its arguments are ::VALUE.
+ * There are cases where ::rb_atomic_t is 32bit while ::VALUE is 64bit. This
+ * should be used for size related operations to support such platforms.
+ *
+ * @param var A variable of `void*`.
+ * @param oldval Expected value of `var` before the assignment.
+ * @param newval What you want to store at `var`.
+ * @retval oldval Successful assignment (`var` is now `newval`).
+ * @retval otherwise Something else is at `var`; not updated.
+ */
+#define RUBY_ATOMIC_VALUE_CAS(var, oldval, newval) \
+ rbimpl_atomic_value_cas(&(var), (oldval), (newval))
+
+/** @cond INTERNAL_MACRO */
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline rb_atomic_t
+rbimpl_atomic_fetch_add(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ return __atomic_fetch_add(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_fetch_and_add(ptr, val);
+
+#elif defined(_WIN32)
+ return InterlockedExchangeAdd(ptr, val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ /*
+ * `atomic_add_int_nv` takes its second argument as `int`! Meanwhile our
+ * `rb_atomic_t` is unsigned. We cannot pass `val` as-is. We have to
+ * manually check integer overflow.
+ */
+ RBIMPL_ASSERT_OR_ASSUME(val <= INT_MAX);
+ return atomic_add_int_nv(ptr, val) - val;
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_add(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ /*
+ * GCC on amd64 is smart enough to detect this `__atomic_add_fetch`'s
+ * return value is not used, then compiles it into single `LOCK ADD`
+ * instruction.
+ */
+ __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ __sync_add_and_fetch(ptr, val);
+
+#elif defined(_WIN32)
+ /*
+ * `InterlockedExchangeAdd` is `LOCK XADD`. It seems there also is
+ * `_InterlockedAdd` intrinsic in ARM Windows but not for x86? Sticking to
+ * `InterlockedExchangeAdd` for better portability.
+ */
+ InterlockedExchangeAdd(ptr, val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ /* Ditto for `atomic_add_int_nv`. */
+ RBIMPL_ASSERT_OR_ASSUME(val <= INT_MAX);
+ atomic_add_int(ptr, val);
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_size_add(volatile size_t *ptr, size_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ __sync_add_and_fetch(ptr, val);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ /* Ditto for `InterlockeExchangedAdd`. */
+ InterlockedExchangeAdd64(ptr, val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ /* Ditto for `atomic_add_int_nv`. */
+ RBIMPL_ASSERT_OR_ASSUME(val <= LONG_MAX);
+ atomic_add_long(ptr, val);
+
+#else
+ RBIMPL_STATIC_ASSERT(size_of_rb_atomic_t, sizeof *ptr == sizeof(rb_atomic_t));
+
+ volatile rb_atomic_t *const tmp = RBIMPL_CAST((volatile rb_atomic_t *)ptr);
+ rbimpl_atomic_add(tmp, val);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_inc(volatile rb_atomic_t *ptr)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_SYNC_BUILTINS)
+ rbimpl_atomic_add(ptr, 1);
+
+#elif defined(_WIN32)
+ InterlockedIncrement(ptr);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ atomic_inc_uint(ptr);
+
+#else
+ rbimpl_atomic_add(ptr, 1);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_size_inc(volatile size_t *ptr)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_SYNC_BUILTINS)
+ rbimpl_atomic_size_add(ptr, 1);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ InterlockedIncrement64(ptr);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ atomic_inc_ulong(ptr);
+
+#else
+ rbimpl_atomic_size_add(ptr, 1);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline rb_atomic_t
+rbimpl_atomic_fetch_sub(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ return __atomic_fetch_sub(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_fetch_and_sub(ptr, val);
+
+#elif defined(_WIN32)
+ /* rb_atomic_t is signed here! Safe to do `-val`. */
+ return InterlockedExchangeAdd(ptr, -val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ /* Ditto for `rbimpl_atomic_fetch_add`. */
+ const signed neg = -1;
+ RBIMPL_ASSERT_OR_ASSUME(val <= INT_MAX);
+ return atomic_add_int_nv(ptr, neg * val) + val;
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_sub(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ __sync_sub_and_fetch(ptr, val);
+
+#elif defined(_WIN32)
+ InterlockedExchangeAdd(ptr, -val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ const signed neg = -1;
+ RBIMPL_ASSERT_OR_ASSUME(val <= INT_MAX);
+ atomic_add_int(ptr, neg * val);
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_size_sub(volatile size_t *ptr, size_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ __sync_sub_and_fetch(ptr, val);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ const ssize_t neg = -1;
+ InterlockedExchangeAdd64(ptr, neg * val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ const signed neg = -1;
+ RBIMPL_ASSERT_OR_ASSUME(val <= LONG_MAX);
+ atomic_add_long(ptr, neg * val);
+
+#else
+ RBIMPL_STATIC_ASSERT(size_of_rb_atomic_t, sizeof *ptr == sizeof(rb_atomic_t));
+
+ volatile rb_atomic_t *const tmp = RBIMPL_CAST((volatile rb_atomic_t *)ptr);
+ rbimpl_atomic_sub(tmp, val);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_dec(volatile rb_atomic_t *ptr)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_SYNC_BUILTINS)
+ rbimpl_atomic_sub(ptr, 1);
+
+#elif defined(_WIN32)
+ InterlockedDecrement(ptr);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ atomic_dec_uint(ptr);
+
+#else
+ rbimpl_atomic_sub(ptr, 1);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_size_dec(volatile size_t *ptr)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_SYNC_BUILTINS)
+ rbimpl_atomic_size_sub(ptr, 1);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ InterlockedDecrement64(ptr);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ atomic_dec_ulong(ptr);
+
+#else
+ rbimpl_atomic_size_sub(ptr, 1);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_or(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_or_fetch(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ __sync_or_and_fetch(ptr, val);
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 13, 0, 0)
+ _InterlockedOr(ptr, val);
+
+#elif defined(_WIN32) && defined(__GNUC__)
+ /* This was for old MinGW. Maybe not needed any longer? */
+ __asm__(
+ "lock\n\t"
+ "orl\t%1, %0"
+ : "=m"(ptr)
+ : "Ir"(val));
+
+#elif defined(_WIN32) && defined(_M_IX86)
+ __asm mov eax, ptr;
+ __asm mov ecx, val;
+ __asm lock or [eax], ecx;
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ atomic_or_uint(ptr, val);
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+/* Nobody uses this but for theoretical backwards compatibility... */
+#if RBIMPL_COMPILER_BEFORE(MSVC, 13, 0, 0)
+static inline rb_atomic_t
+rb_w32_atomic_or(volatile rb_atomic_t *var, rb_atomic_t val)
+{
+ return rbimpl_atomic_or(var, val);
+}
+#endif
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline rb_atomic_t
+rbimpl_atomic_exchange(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ return __atomic_exchange_n(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_lock_test_and_set(ptr, val);
+
+#elif defined(_WIN32)
+ return InterlockedExchange(ptr, val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ return atomic_swap_uint(ptr, val);
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline size_t
+rbimpl_atomic_size_exchange(volatile size_t *ptr, size_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ return __atomic_exchange_n(ptr, val, __ATOMIC_SEQ_CST);
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_lock_test_and_set(ptr, val);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ return InterlockedExchange64(ptr, val);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ return atomic_swap_ulong(ptr, val);
+
+#else
+ RBIMPL_STATIC_ASSERT(size_of_size_t, sizeof *ptr == sizeof(rb_atomic_t));
+
+ volatile rb_atomic_t *const tmp = RBIMPL_CAST((volatile rb_atomic_t *)ptr);
+ const rb_atomic_t ret = rbimpl_atomic_exchange(tmp, val);
+ return RBIMPL_CAST((size_t)ret);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void *
+rbimpl_atomic_ptr_exchange(void *volatile *ptr, const void *val)
+{
+#if 0
+
+#elif defined(InterlockedExchangePointer)
+ /* const_cast */
+ PVOID *pptr = RBIMPL_CAST((PVOID *)ptr);
+ PVOID pval = RBIMPL_CAST((PVOID)val);
+ return InterlockedExchangePointer(pptr, pval);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ return atomic_swap_ptr(ptr, RBIMPL_CAST((void *)val));
+
+#else
+ RBIMPL_STATIC_ASSERT(sizeof_voidp, sizeof *ptr == sizeof(size_t));
+
+ const size_t sval = RBIMPL_CAST((size_t)val);
+ volatile size_t *const sptr = RBIMPL_CAST((volatile size_t *)ptr);
+ const size_t sret = rbimpl_atomic_size_exchange(sptr, sval);
+ return RBIMPL_CAST((void *)sret);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline VALUE
+rbimpl_atomic_value_exchange(volatile VALUE *ptr, VALUE val)
+{
+ RBIMPL_STATIC_ASSERT(sizeof_value, sizeof *ptr == sizeof(size_t));
+
+ const size_t sval = RBIMPL_CAST((size_t)val);
+ volatile size_t *const sptr = RBIMPL_CAST((volatile size_t *)ptr);
+ const size_t sret = rbimpl_atomic_size_exchange(sptr, sval);
+ return RBIMPL_CAST((VALUE)sret);
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void
+rbimpl_atomic_set(volatile rb_atomic_t *ptr, rb_atomic_t val)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST);
+
+#else
+ /* Maybe std::atomic<rb_atomic_t>::store can be faster? */
+ rbimpl_atomic_exchange(ptr, val);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline rb_atomic_t
+rbimpl_atomic_cas(volatile rb_atomic_t *ptr, rb_atomic_t oldval, rb_atomic_t newval)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_compare_exchange_n(
+ ptr, &oldval, newval, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+ return oldval;
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_val_compare_and_swap(ptr, oldval, newval);
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 13, 0, 0)
+ return InterlockedCompareExchange(ptr, newval, oldval);
+
+#elif defined(_WIN32)
+ PVOID *pptr = RBIMPL_CAST((PVOID *)ptr);
+ PVOID pold = RBIMPL_CAST((PVOID)oldval);
+ PVOID pnew = RBIMPL_CAST((PVOID)newval);
+ PVOID pret = InterlockedCompareExchange(pptr, pnew, pold);
+ return RBIMPL_CAST((rb_atomic_t)pret);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ return atomic_cas_uint(ptr, oldval, newval);
+
+#else
+# error Unsupported platform.
+#endif
+}
+
+/* Nobody uses this but for theoretical backwards compatibility... */
+#if RBIMPL_COMPILER_BEFORE(MSVC, 13, 0, 0)
+static inline rb_atomic_t
+rb_w32_atomic_cas(volatile rb_atomic_t *var, rb_atomic_t oldval, rb_atomic_t newval)
+{
+ return rbimpl_atomic_cas(var, oldval, newval);
+}
+#endif
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline size_t
+rbimpl_atomic_size_cas(volatile size_t *ptr, size_t oldval, size_t newval)
+{
+#if 0
+
+#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
+ __atomic_compare_exchange_n(
+ ptr, &oldval, newval, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+ return oldval;
+
+#elif defined(HAVE_GCC_SYNC_BUILTINS)
+ return __sync_val_compare_and_swap(ptr, oldval, newval);
+
+#elif defined(_WIN32) && defined(_M_AMD64)
+ return InterlockedCompareExchange64(ptr, newval, oldval);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H) && (defined(_LP64) || defined(_I32LPx))
+ return atomic_cas_ulong(ptr, oldval, newval);
+
+#else
+ RBIMPL_STATIC_ASSERT(size_of_size_t, sizeof *ptr == sizeof(rb_atomic_t));
+
+ volatile rb_atomic_t *tmp = RBIMPL_CAST((volatile rb_atomic_t *)ptr);
+ return rbimpl_atomic_cas(tmp, oldval, newval);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline void *
+rbimpl_atomic_ptr_cas(void **ptr, const void *oldval, const void *newval)
+{
+#if 0
+
+#elif defined(InterlockedExchangePointer)
+ /* ... Can we say that InterlockedCompareExchangePtr surly exists when
+ * InterlockedExchangePointer is defined? Seems so but...?*/
+ PVOID *pptr = RBIMPL_CAST((PVOID *)ptr);
+ PVOID pold = RBIMPL_CAST((PVOID)oldval);
+ PVOID pnew = RBIMPL_CAST((PVOID)newval);
+ return InterlockedCompareExchangePointer(pptr, pnew, pold);
+
+#elif defined(__sun) && defined(HAVE_ATOMIC_H)
+ void *pold = RBIMPL_CAST((void *)oldval);
+ void *pnew = RBIMPL_CAST((void *)newval);
+ return atomic_cas_ptr(ptr, pold, pnew);
+
+
+#else
+ RBIMPL_STATIC_ASSERT(sizeof_voidp, sizeof *ptr == sizeof(size_t));
+
+ const size_t snew = RBIMPL_CAST((size_t)newval);
+ const size_t sold = RBIMPL_CAST((size_t)oldval);
+ volatile size_t *const sptr = RBIMPL_CAST((volatile size_t *)ptr);
+ const size_t sret = rbimpl_atomic_size_cas(sptr, sold, snew);
+ return RBIMPL_CAST((void *)sret);
+
+#endif
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+static inline VALUE
+rbimpl_atomic_value_cas(volatile VALUE *ptr, VALUE oldval, VALUE newval)
+{
+ RBIMPL_STATIC_ASSERT(sizeof_value, sizeof *ptr == sizeof(size_t));
+
+ const size_t snew = RBIMPL_CAST((size_t)newval);
+ const size_t sold = RBIMPL_CAST((size_t)oldval);
+ volatile size_t *const sptr = RBIMPL_CAST((volatile size_t *)ptr);
+ const size_t sret = rbimpl_atomic_size_cas(sptr, sold, snew);
+ return RBIMPL_CAST((VALUE)sret);
+}
+/** @endcond */
+#endif /* RUBY_ATOMIC_H */
diff --git a/include/ruby/backward.h b/include/ruby/backward.h
index 863edf0ed5..f804c2c36e 100644
--- a/include/ruby/backward.h
+++ b/include/ruby/backward.h
@@ -1,79 +1,25 @@
-#ifndef RUBY_RUBY_BACKWARD_H
+#ifndef RUBY_RUBY_BACKWARD_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_RUBY_BACKWARD_H 1
-
-#define RClass RClassDeprecated
-#ifndef __cplusplus
-DEPRECATED_TYPE(("RClass is internal use only"),
-struct RClass {
- struct RBasic basic;
-});
-#endif
-
-#define DECLARE_DEPRECATED_FEATURE(ver, func) \
- NORETURN(ERRORFUNC(("deprecated since "#ver), DEPRECATED(void func(void))))
-
-/* eval.c */
-DECLARE_DEPRECATED_FEATURE(2.2, rb_disable_super);
-DECLARE_DEPRECATED_FEATURE(2.2, rb_enable_super);
-
-/* hash.c */
-DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_iter_lev);
-DECLARE_DEPRECATED_FEATURE(2.2, rb_hash_ifnone);
-
-/* string.c */
-DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associate);
-DECLARE_DEPRECATED_FEATURE(2.2, rb_str_associated);
-
-/* variable.c */
-DEPRECATED(void rb_autoload(VALUE, ID, const char*));
-
-/* vm.c */
-DECLARE_DEPRECATED_FEATURE(2.2, rb_clear_cache);
-DECLARE_DEPRECATED_FEATURE(2.2, rb_frame_pop);
-
-#define DECLARE_DEPRECATED_INTERNAL_FEATURE(func) \
- NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
-
-/* eval.c */
-NORETURN(ERRORFUNC(("internal function"), void rb_frozen_class_p(VALUE)));
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_exec_end_proc);
-
-/* error.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error);
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_with_enc);
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_compile_error_append);
-
-/* gc.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_gc_call_finalizer_at_exit);
-
-/* signal.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_trap_exit);
-
-/* struct.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
-
-/* thread.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_clear_trace_func);
-
-/* variable.c */
-DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_generic_ivar_table);
-NORETURN(ERRORFUNC(("internal function"), VALUE rb_mod_const_missing(VALUE, VALUE)));
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/value.h"
+#include "ruby/internal/interpreter.h"
+#include "ruby/backward/2/attributes.h"
+
+#define RBIMPL_ATTR_DEPRECATED_SINCE(ver) RBIMPL_ATTR_DEPRECATED(("since " #ver))
+#define RBIMPL_ATTR_DEPRECATED_INTERNAL(ver) RBIMPL_ATTR_DEPRECATED(("since "#ver", also internal"))
+#define RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() RBIMPL_ATTR_DEPRECATED(("only for internal use"))
+
+RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY() void rb_clear_constant_cache(void);
/* from version.c */
-#ifndef RUBY_SHOW_COPYRIGHT_TO_DIE
-# define RUBY_SHOW_COPYRIGHT_TO_DIE 1
-#endif
-#if RUBY_SHOW_COPYRIGHT_TO_DIE
-/* for source code backward compatibility */
-DEPRECATED(static inline int ruby_show_copyright_to_die(int));
-static inline int
-ruby_show_copyright_to_die(int exitcode)
-{
- ruby_show_copyright();
- return exitcode;
-}
-#define ruby_show_copyright() /* defer EXIT_SUCCESS */ \
- (exit(ruby_show_copyright_to_die(EXIT_SUCCESS)))
+#if defined(RUBY_SHOW_COPYRIGHT_TO_DIE) && !!(RUBY_SHOW_COPYRIGHT_TO_DIE+0)
+# error RUBY_SHOW_COPYRIGHT_TO_DIE is deprecated
#endif
#endif /* RUBY_RUBY_BACKWARD_H */
diff --git a/include/ruby/backward/2/assume.h b/include/ruby/backward/2/assume.h
new file mode 100644
index 0000000000..d148710127
--- /dev/null
+++ b/include/ruby/backward/2/assume.h
@@ -0,0 +1,56 @@
+#ifndef RUBY_BACKWARD2_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_ASSUME_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #ASSUME / #RB_LIKELY / #UNREACHABLE
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/assume.h"
+#include "ruby/internal/has/builtin.h"
+
+#define ASSUME RBIMPL_ASSUME /**< @old{RBIMPL_ASSUME} */
+#define UNREACHABLE RBIMPL_UNREACHABLE() /**< @old{RBIMPL_UNREACHABLE} */
+#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN /**< @old{RBIMPL_UNREACHABLE_RETURN} */
+
+/* likely */
+#if RBIMPL_HAS_BUILTIN(__builtin_expect)
+/**
+ * Asserts that the given Boolean expression likely holds.
+ *
+ * @param x An expression that likely holds.
+ *
+ * @note Consider this macro carefully. It has been here since when CPUs were
+ * like babies, but contemporary processors are beasts. They are
+ * smarter than mare mortals like us today. Their branch predictions
+ * highly expectedly outperform your use of this macro.
+ */
+# define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
+
+/**
+ * Asserts that the given Boolean expression likely doesn't hold.
+ *
+ * @param x An expression that likely doesn't hold.
+ */
+# define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
+#else
+# define RB_LIKELY(x) (x)
+# define RB_UNLIKELY(x) (x)
+#endif
+
+#endif /* RUBY_BACKWARD2_ASSUME_H */
diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h
new file mode 100644
index 0000000000..73acfc9dc0
--- /dev/null
+++ b/include/ruby/backward/2/attributes.h
@@ -0,0 +1,165 @@
+#ifndef RUBY_BACKWARD2_ATTRIBUTES_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_ATTRIBUTES_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Various attribute-related macros.
+ *
+ * ### Q&A ###
+ *
+ * - Q: Why are the macros defined in this header file so inconsistent in
+ * style?
+ *
+ * - A: Don't know. Don't blame me. Backward compatibility is the key here.
+ * I'm just preserving what they have been.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/attr/alloc_size.h"
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/error.h"
+#include "ruby/internal/attr/forceinline.h"
+#include "ruby/internal/attr/format.h"
+#include "ruby/internal/attr/maybe_unused.h"
+#include "ruby/internal/attr/noinline.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/attr/restrict.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/attr/warning.h"
+#include "ruby/internal/has/attribute.h"
+
+/* function attributes */
+#undef CONSTFUNC
+#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
+
+#undef PUREFUNC
+#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
+
+#undef DEPRECATED
+#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
+
+#undef DEPRECATED_BY
+#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x
+
+#undef DEPRECATED_TYPE
+#if defined(__GNUC__)
+# define DEPRECATED_TYPE(mesg, decl) \
+ _Pragma("message \"DEPRECATED_TYPE is deprecated\""); \
+ decl RBIMPL_ATTR_DEPRECATED(mseg)
+#elif defined(_MSC_VER)
+# pragma deprecated(DEPRECATED_TYPE)
+# define DEPRECATED_TYPE(mesg, decl) \
+ __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: " \
+ "DEPRECATED_TYPE is deprecated")) \
+ decl RBIMPL_ATTR_DEPRECATED(mseg)
+#else
+# define DEPRECATED_TYPE(mesg, decl) \
+ <-<-"DEPRECATED_TYPE is deprecated"->->
+#endif
+
+#undef RUBY_CXX_DEPRECATED
+#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
+
+#undef NOINLINE
+#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
+
+#ifndef MJIT_HEADER
+# undef ALWAYS_INLINE
+# define ALWAYS_INLINE(x) RBIMPL_ATTR_FORCEINLINE() x
+#endif
+
+#undef ERRORFUNC
+#define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x
+#if RBIMPL_HAS_ATTRIBUTE(error)
+# define HAVE_ATTRIBUTE_ERRORFUNC 1
+#endif
+
+#undef WARNINGFUNC
+#define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x
+#if RBIMPL_HAS_ATTRIBUTE(warning)
+# define HAVE_ATTRIBUTE_WARNINGFUNC 1
+#endif
+
+/*
+ cold attribute for code layout improvements
+ RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros
+ */
+#undef COLDFUNC
+#define COLDFUNC RBIMPL_ATTR_COLD()
+
+#define PRINTF_ARGS(decl, string_index, first_to_check) \
+ RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) \
+ decl
+
+#undef RUBY_ATTR_ALLOC_SIZE
+#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
+
+#undef RUBY_ATTR_MALLOC
+#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
+
+#undef RUBY_ATTR_RETURNS_NONNULL
+#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
+
+#ifndef FUNC_MINIMIZED
+#define FUNC_MINIMIZED(x) x
+#endif
+
+#ifndef FUNC_UNOPTIMIZED
+#define FUNC_UNOPTIMIZED(x) x
+#endif
+
+#ifndef RUBY_ALIAS_FUNCTION_TYPE
+#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \
+ FUNC_MINIMIZED(type prot) {return (type)name args;}
+#endif
+
+#ifndef RUBY_ALIAS_FUNCTION_VOID
+#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \
+ FUNC_MINIMIZED(void prot) {name args;}
+#endif
+
+#ifndef RUBY_ALIAS_FUNCTION
+#define RUBY_ALIAS_FUNCTION(prot, name, args) \
+ RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
+#endif
+
+#undef RUBY_FUNC_NONNULL
+#define RUBY_FUNC_NONNULL(n, x) RBIMPL_ATTR_NONNULL(n) x
+
+#undef NORETURN
+#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
+#define NORETURN_STYLE_NEW
+
+#ifndef PACKED_STRUCT
+# define PACKED_STRUCT(x) x
+#endif
+
+#ifndef PACKED_STRUCT_UNALIGNED
+# if UNALIGNED_WORD_ACCESS
+# define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
+# else
+# define PACKED_STRUCT_UNALIGNED(x) x
+# endif
+#endif
+
+#undef RB_UNUSED_VAR
+#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
+
+#endif /* RUBY_BACKWARD2_ATTRIBUTES_H */
diff --git a/include/ruby/backward/2/bool.h b/include/ruby/backward/2/bool.h
new file mode 100644
index 0000000000..f2fa390c80
--- /dev/null
+++ b/include/ruby/backward/2/bool.h
@@ -0,0 +1,36 @@
+#ifndef RUBY_BACKWARD2_BOOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_BOOL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines old TRUE / FALSE
+ */
+#include "ruby/internal/stdbool.h"
+
+#ifndef FALSE
+# define FALSE false
+#elif FALSE
+# error FALSE must be false
+#endif
+
+#ifndef TRUE
+# define TRUE true
+#elif ! TRUE
+# error TRUE must be true
+#endif
+
+#endif /* RUBY_BACKWARD2_BOOL_H */
diff --git a/include/ruby/backward/2/gcc_version_since.h b/include/ruby/backward/2/gcc_version_since.h
new file mode 100644
index 0000000000..00cc40ca56
--- /dev/null
+++ b/include/ruby/backward/2/gcc_version_since.h
@@ -0,0 +1,37 @@
+#ifndef RUBY_BACKWARD2_GCC_VERSION_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines old GCC_VERSION_SINCE
+ */
+#include "ruby/internal/compiler_since.h"
+
+#ifndef GCC_VERSION_SINCE
+#define GCC_VERSION_SINCE(x, y, z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
+#endif
+
+#ifndef GCC_VERSION_BEFORE
+#define GCC_VERSION_BEFORE(x, y, z) \
+ (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || \
+ (RBIMPL_COMPILER_IS(GCC) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH == (z))))))
+#endif
+
+#endif /* RUBY_BACKWARD2_GCC_VERSION_SINCE_H */
diff --git a/include/ruby/backward/2/inttypes.h b/include/ruby/backward/2/inttypes.h
new file mode 100644
index 0000000000..45460878bc
--- /dev/null
+++ b/include/ruby/backward/2/inttypes.h
@@ -0,0 +1,131 @@
+#ifndef RUBY_BACKWARD2_INTTYPES_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_INTTYPES_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief C99 shim for `<inttypes.h>`
+ */
+#include "ruby/internal/config.h" /* PRI_LL_PREFIX etc. are here */
+
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#include "ruby/internal/value.h" /* PRI_VALUE_PREFIX is here. */
+
+#ifndef PRI_INT_PREFIX
+# define PRI_INT_PREFIX ""
+#endif
+
+#ifndef PRI_LONG_PREFIX
+# define PRI_LONG_PREFIX "l"
+#endif
+
+#ifndef PRI_SHORT_PREFIX
+# define PRI_SHORT_PREFIX "h"
+#endif
+
+#ifdef PRI_64_PREFIX
+# /* Take that. */
+#elif SIZEOF_LONG == 8
+# define PRI_64_PREFIX PRI_LONG_PREFIX
+#elif SIZEOF_LONG_LONG == 8
+# define PRI_64_PREFIX PRI_LL_PREFIX
+#endif
+
+#ifndef PRIdPTR
+# define PRIdPTR PRI_PTR_PREFIX"d"
+# define PRIiPTR PRI_PTR_PREFIX"i"
+# define PRIoPTR PRI_PTR_PREFIX"o"
+# define PRIuPTR PRI_PTR_PREFIX"u"
+# define PRIxPTR PRI_PTR_PREFIX"x"
+# define PRIXPTR PRI_PTR_PREFIX"X"
+#endif
+
+#ifndef RUBY_PRI_VALUE_MARK
+# define RUBY_PRI_VALUE_MARK "\v"
+#endif
+
+#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
+# define PRIdVALUE PRIdPTR
+# define PRIoVALUE PRIoPTR
+# define PRIuVALUE PRIuPTR
+# define PRIxVALUE PRIxPTR
+# define PRIXVALUE PRIXPTR
+# define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK
+#else
+# define PRIdVALUE PRI_VALUE_PREFIX"d"
+# define PRIoVALUE PRI_VALUE_PREFIX"o"
+# define PRIuVALUE PRI_VALUE_PREFIX"u"
+# define PRIxVALUE PRI_VALUE_PREFIX"x"
+# define PRIXVALUE PRI_VALUE_PREFIX"X"
+# define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
+#endif
+
+#ifndef PRI_VALUE_PREFIX
+# define PRI_VALUE_PREFIX ""
+#endif
+
+#ifdef PRI_TIMET_PREFIX
+# /* Take that. */
+#elif SIZEOF_TIME_T == SIZEOF_INT
+# define PRI_TIMET_PREFIX
+#elif SIZEOF_TIME_T == SIZEOF_LONG
+# define PRI_TIMET_PREFIX "l"
+#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
+# define PRI_TIMET_PREFIX PRI_LL_PREFIX
+#endif
+
+#ifdef PRI_PTRDIFF_PREFIX
+# /* Take that. */
+#elif SIZEOF_PTRDIFF_T == SIZEOF_INT
+# define PRI_PTRDIFF_PREFIX ""
+#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
+# define PRI_PTRDIFF_PREFIX "l"
+#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
+# define PRI_PTRDIFF_PREFIX PRI_LL_PREFIX
+#endif
+
+#ifndef PRIdPTRDIFF
+# define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
+# define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
+# define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
+# define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
+# define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
+# define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
+#endif
+
+#ifdef PRI_SIZE_PREFIX
+# /* Take that. */
+#elif SIZEOF_SIZE_T == SIZEOF_INT
+# define PRI_SIZE_PREFIX ""
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define PRI_SIZE_PREFIX "l"
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define PRI_SIZE_PREFIX PRI_LL_PREFIX
+#endif
+
+#ifndef PRIdSIZE
+# define PRIdSIZE PRI_SIZE_PREFIX"d"
+# define PRIiSIZE PRI_SIZE_PREFIX"i"
+# define PRIoSIZE PRI_SIZE_PREFIX"o"
+# define PRIuSIZE PRI_SIZE_PREFIX"u"
+# define PRIxSIZE PRI_SIZE_PREFIX"x"
+# define PRIXSIZE PRI_SIZE_PREFIX"X"
+#endif
+
+#endif /* RUBY_BACKWARD2_INTTYPES_H */
diff --git a/include/ruby/backward/2/limits.h b/include/ruby/backward/2/limits.h
new file mode 100644
index 0000000000..6f7021e5f4
--- /dev/null
+++ b/include/ruby/backward/2/limits.h
@@ -0,0 +1,99 @@
+#ifndef RUBY_BACKWARD2_LIMITS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_LIMITS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Historical shim for `<limits.h>`.
+ *
+ * The macros in this header file are obsolescent. Does anyone really need our
+ * own definition of `CHAR_BIT` today?
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#include "ruby/backward/2/long_long.h"
+
+#ifndef LONG_MAX
+# /* assuming 32bit(2's complement) long */
+# define LONG_MAX 2147483647L
+#endif
+
+#ifndef LONG_MIN
+# define LONG_MIN (-LONG_MAX-1)
+#endif
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+#ifdef LLONG_MAX
+# /* Take that. */
+#elif defined(LONG_LONG_MAX)
+# define LLONG_MAX LONG_LONG_MAX
+#elif defined(_I64_MAX)
+# define LLONG_MAX _I64_MAX
+#else
+# /* assuming 64bit(2's complement) long long */
+# define LLONG_MAX 9223372036854775807LL
+#endif
+
+#ifdef LLONG_MIN
+# /* Take that. */
+#elif defined(LONG_LONG_MIN)
+# define LLONG_MIN LONG_LONG_MIN
+#elif defined(_I64_MAX)
+# define LLONG_MIN _I64_MIN
+#else
+# define LLONG_MIN (-LLONG_MAX-1)
+#endif
+
+#ifdef SIZE_MAX
+# /* Take that. */
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define SIZE_MAX ULLONG_MAX
+# define SIZE_MIN ULLONG_MIN
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define SIZE_MAX ULONG_MAX
+# define SIZE_MIN ULONG_MIN
+#elif SIZEOF_SIZE_T == SIZEOF_INT
+# define SIZE_MAX UINT_MAX
+# define SIZE_MIN UINT_MIN
+#else
+# define SIZE_MAX USHRT_MAX
+# define SIZE_MIN USHRT_MIN
+#endif
+
+#ifdef SSIZE_MAX
+# /* Take that. */
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define SSIZE_MAX LLONG_MAX
+# define SSIZE_MIN LLONG_MIN
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define SSIZE_MAX LONG_MAX
+# define SSIZE_MIN LONG_MIN
+#elif SIZEOF_SIZE_T == SIZEOF_INT
+# define SSIZE_MAX INT_MAX
+# define SSIZE_MIN INT_MIN
+#else
+# define SSIZE_MAX SHRT_MAX
+# define SSIZE_MIN SHRT_MIN
+#endif
+
+#endif /* RUBY_BACKWARD2_LIMITS_H */
diff --git a/include/ruby/backward/2/long_long.h b/include/ruby/backward/2/long_long.h
new file mode 100644
index 0000000000..8e6b2743fc
--- /dev/null
+++ b/include/ruby/backward/2/long_long.h
@@ -0,0 +1,73 @@
+#ifndef RUBY_BACKWARD2_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_LONG_LONG_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines old #LONG_LONG
+ *
+ * No known compiler that can compile today's ruby lacks long long.
+ * Historically MSVC was one of such compiler, but it implemented long long a
+ * while ago (some time back in 2013). The macros are for backwards
+ * compatibility only.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/has/warning.h"
+#include "ruby/internal/warning_push.h"
+
+#if defined(__DOXYGEN__)
+# /** @cond INTERNAL_MACRO */
+# define HAVE_LONG_LONG 1
+# define HAVE_TRUE_LONG_LONG 1
+# /** @endcond */
+# /** @deprecated Just use `long long` directly. */
+# define LONG_LONG long long.
+
+#elif RBIMPL_HAS_WARNING("-Wc++11-long-long")
+# define HAVE_TRUE_LONG_LONG 1
+# define LONG_LONG \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wc++11-long-long) \
+ long long \
+ RBIMPL_WARNING_POP()
+
+#elif RBIMPL_HAS_WARNING("-Wlong-long")
+# define HAVE_TRUE_LONG_LONG 1
+# define LONG_LONG \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wlong-long) \
+ long long \
+ RBIMPL_WARNING_POP()
+
+#elif defined(HAVE_LONG_LONG)
+# define HAVE_TRUE_LONG_LONG 1
+# define LONG_LONG long long
+
+#elif SIZEOF___INT64 > 0
+# define HAVE_LONG_LONG 1
+# define LONG_LONG __int64
+# undef SIZEOF_LONG_LONG
+# define SIZEOF_LONG_LONG SIZEOF___INT64
+
+#else
+# error Hello! Ruby developers believe this message must not happen.
+# error If you encounter this message, can you file a bug report?
+# error Remember to attach a detailed description of your environment.
+# error Thank you!
+#endif
+
+#endif /* RBIMPL_BACKWARD2_LONG_LONG_H */
diff --git a/include/ruby/backward/2/r_cast.h b/include/ruby/backward/2/r_cast.h
new file mode 100644
index 0000000000..3d0f40fd1e
--- /dev/null
+++ b/include/ruby/backward/2/r_cast.h
@@ -0,0 +1,32 @@
+#ifndef RUBY_BACKWARD2_R_CAST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_R_CAST_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines old R_CAST
+ *
+ * Nobody is actively using this macro.
+ */
+#define R_CAST(st) (struct st*)
+#define RMOVED(obj) (R_CAST(RMoved)(obj))
+
+#if defined(__GNUC__)
+# warning R_CAST and RMOVED are deprecated
+#elif defined(_MSC_VER)
+# pragma message("warning: R_CAST and RMOVED are deprecated")
+#endif
+#endif /* RUBY_BACKWARD2_R_CAST_H */
diff --git a/include/ruby/backward/2/rmodule.h b/include/ruby/backward/2/rmodule.h
new file mode 100644
index 0000000000..53b37831c0
--- /dev/null
+++ b/include/ruby/backward/2/rmodule.h
@@ -0,0 +1,36 @@
+#ifndef RUBY_BACKWARD2_RMODULE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_RMODULE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Orphan macros.
+ *
+ * These macros seems broken since at least 2011. Nobody (except ruby itself
+ * who is implementing the internals) could have used those macros for a while.
+ * Kept public as-is here to keep some theoretical backwards compatibility.
+ */
+#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
+#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
+#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
+#define RMODULE_SUPER(m) RCLASS_SUPER(m)
+
+#if defined(__GNUC__)
+# warning RMODULE_* macros are deprecated
+#elif defined(_MSC_VER)
+# pragma message("warning: RMODULE_* macros are deprecated")
+#endif
+#endif /* RUBY_BACKWARD2_RMODULE_H */
diff --git a/include/ruby/backward/2/stdalign.h b/include/ruby/backward/2/stdalign.h
new file mode 100644
index 0000000000..8b491bf564
--- /dev/null
+++ b/include/ruby/backward/2/stdalign.h
@@ -0,0 +1,30 @@
+#ifndef RUBY_BACKWARD2_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_STDALIGN_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RUBY_ALIGNAS / #RUBY_ALIGNOF
+ */
+#include "ruby/internal/stdalign.h"
+
+#undef RUBY_ALIGNAS
+#undef RUBY_ALIGNOF
+#define RUBY_ALIGNAS RBIMPL_ALIGNAS /**< @copydoc RBIMPL_ALIGNAS */
+#define RUBY_ALIGNOF RBIMPL_ALIGNOF /**< @copydoc RBIMPL_ALIGNOF */
+
+#endif /* RUBY_BACKWARD2_STDALIGN_H */
diff --git a/include/ruby/backward/2/stdarg.h b/include/ruby/backward/2/stdarg.h
new file mode 100644
index 0000000000..08659fee47
--- /dev/null
+++ b/include/ruby/backward/2/stdarg.h
@@ -0,0 +1,69 @@
+#ifndef RUBY_BACKWARD2_STDARG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_BACKWARD2_STDARG_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines old #_
+ *
+ * Nobody should ever use these macros any longer. No known compilers lack
+ * prototypes today. It's 21st century. Just forget them.
+ */
+
+#undef _
+/**
+ * @deprecated Nobody practically needs this macro any longer.
+ * @brief This was a transition path from K&R to ANSI.
+ */
+#ifdef HAVE_PROTOTYPES
+# define _(args) args
+#else
+# define _(args) ()
+#endif
+
+#undef __
+/**
+ * @deprecated Nobody practically needs this macro any longer.
+ * @brief This was a transition path from K&R to ANSI.
+ */
+#ifdef HAVE_STDARG_PROTOTYPES
+# define __(args) args
+#else
+# define __(args) ()
+#endif
+
+/**
+ * Functions declared using this macro take arbitrary arguments, including
+ * void.
+ *
+ * ```CXX
+ * void func(ANYARGS);
+ * ```
+ *
+ * This was a necessary evil when there was no such thing like function
+ * overloading. But it is the 21st century today. People generally need not
+ * use this. Just use a granular typed function.
+ *
+ * @see ruby::backward::cxxanyargs
+ */
+#ifdef __cplusplus
+#define ANYARGS ...
+#else
+#define ANYARGS
+#endif
+
+#endif /* RUBY_BACKWARD2_STDARG_H */
diff --git a/include/ruby/backward/classext.h b/include/ruby/backward/classext.h
deleted file mode 100644
index 9d5747316a..0000000000
--- a/include/ruby/backward/classext.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#if defined __GNUC__
-#warning use of RClass internals is deprecated
-#elif defined _MSC_VER
-#pragma message("warning: use of RClass internals is deprecated")
-#endif
-
-#ifndef RUBY_BACKWARD_CLASSEXT_H
-#define RUBY_BACKWARD_CLASSEXT_H 1
-
-typedef struct rb_deprecated_classext_struct {
- VALUE super;
-} rb_deprecated_classext_t;
-
-#undef RCLASS_SUPER(c)
-#define RCLASS_EXT(c) ((rb_deprecated_classext_t *)RCLASS(c)->ptr)
-#define RCLASS_SUPER(c) (RCLASS(c)->super)
-
-#endif /* RUBY_BACKWARD_CLASSEXT_H */
diff --git a/include/ruby/backward/cxxanyargs.hpp b/include/ruby/backward/cxxanyargs.hpp
index 3585f678b8..2414b7ae6d 100644
--- a/include/ruby/backward/cxxanyargs.hpp
+++ b/include/ruby/backward/cxxanyargs.hpp
@@ -1,48 +1,62 @@
-#ifndef RUBY_BACKWARD_CXXANYARGS_HPP // -*- C++ -*-
+#ifndef RUBY_BACKWARD_CXXANYARGS_HPP //-*-C++-*-vi:ft=cpp
#define RUBY_BACKWARD_CXXANYARGS_HPP
/// @file
-/// @brief Provides old prototypes for C++ programs.
-/// @author \@shyouhei
+/// @author @shyouhei
/// @copyright This file is a part of the programming language Ruby.
/// Permission is hereby granted, to either redistribute and/or
/// modify this file, provided that the conditions mentioned in the
/// file COPYING are met. Consult the file for details.
-/// @note DO NOT MODERNIZE THIS FILE! As the file name implies it is
+/// @note DO NOT MODERNISE THIS FILE! As the file name implies it is
/// meant to be a backwards compatibility shim. Please stick to
/// C++ 98 and never use newer features, like `constexpr`.
+/// @brief Provides old prototypes for C++ programs.
+#include "ruby/internal/config.h"
+#include "ruby/internal/intern/class.h"
+#include "ruby/internal/intern/cont.h"
+#include "ruby/internal/intern/hash.h"
+#include "ruby/internal/intern/proc.h"
+#include "ruby/internal/intern/thread.h"
+#include "ruby/internal/intern/variable.h"
+#include "ruby/internal/intern/vm.h"
+#include "ruby/internal/iterator.h"
+#include "ruby/internal/method.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/variable.h"
+#include "ruby/backward/2/stdarg.h"
+#include "ruby/st.h"
+
+extern "C++" {
+
+#ifdef HAVE_NULLPTR
+#include <cstddef>
+#endif
/// @brief The main namespace.
/// @note The name "ruby" might already be taken, but that must not be a
/// problem because namespaces are allowed to reopen.
namespace ruby {
-/// @brief Backwards compatibility layer.
+/// Backwards compatibility layer.
namespace backward {
-/// @brief Provides ANYARGS deprecation warnings.
-///
-/// In C, ANYARGS means there is no function prototype. Literally anything,
-/// even including nothing, can be a valid ANYARGS. So passing a correctly
-/// prototyped function pointer to an ANYARGS-ed function parameter is valid,
-/// at the same time passing an ANYARGS-ed function pointer to a granular typed
-/// function parameter is also valid. However on the other hand in C++,
-/// ANYARGS doesn't actually mean any number of arguments. C++'s ANYARGS means
-/// _variadic_ number of arguments. This is incompatible with ordinal, correct
-/// function prototypes.
+/// Provides ANYARGS deprecation warnings. In C, ANYARGS means there is no
+/// function prototype. Literally anything, even including nothing, can be a
+/// valid ANYARGS. So passing a correctly prototyped function pointer to an
+/// ANYARGS-ed function parameter is valid, at the same time passing an
+/// ANYARGS-ed function pointer to a granular typed function parameter is also
+/// valid. However on the other hand in C++, ANYARGS doesn't actually mean any
+/// number of arguments. C++'s ANYARGS means _variadic_ number of arguments.
+/// This is incompatible with ordinal, correct function prototypes.
///
/// Luckily, function prototypes being distinct each other means they can be
/// overloaded. We can provide a compatibility layer for older Ruby APIs which
/// used to have ANYARGS. This namespace includes such attempts.
namespace cxxanyargs {
-/// @brief ANYARGS-ed function type.
-typedef VALUE type(ANYARGS);
-
-/// @brief ANYARGS-ed function type, void variant.
-typedef void void_type(ANYARGS);
-
-/// @brief ANYARGS-ed function type, int variant.
-typedef int int_type(ANYARGS);
+typedef VALUE type(ANYARGS); ///< ANYARGS-ed function type.
+typedef void void_type(ANYARGS); ///< ANYARGS-ed function type, void variant.
+typedef int int_type(ANYARGS); ///< ANYARGS-ed function type, int variant.
+typedef VALUE onearg_type(VALUE); ///< Single-argumented function type.
/// @name Hooking global variables
/// @{
@@ -54,7 +68,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] e Setter function.
/// @note Both functions can be nullptr.
/// @see rb_define_hooked_variable()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline void
rb_define_virtual_variable(const char *q, type *w, void_type *e)
{
@@ -64,13 +78,6 @@ rb_define_virtual_variable(const char *q, type *w, void_type *e)
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief Define a function-backended global variable.
-/// @param[in] q Name of the variable.
-/// @param[in] w Getter function.
-/// @param[in] e Setter function.
-/// @note Both functions can be nullptr.
-/// @see rb_define_hooked_variable()
-/// @deprecated Use glanular typed overload instead.
inline void
rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e)
{
@@ -79,13 +86,6 @@ rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e)
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief Define a function-backended global variable.
-/// @param[in] q Name of the variable.
-/// @param[in] w Getter function.
-/// @param[in] e Setter function.
-/// @note Both functions can be nullptr.
-/// @see rb_define_hooked_variable()
-/// @deprecated Use glanular typed overload instead.
inline void
rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
{
@@ -93,6 +93,36 @@ rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
::rb_define_virtual_variable(q, r, e);
}
+#ifdef HAVE_NULLPTR
+inline void
+rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, std::nullptr_t e)
+{
+ ::rb_define_virtual_variable(q, w, e);
+}
+
+RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
+inline void
+rb_define_virtual_variable(const char *q, type *w, std::nullptr_t e)
+{
+ rb_gvar_getter_t *r = reinterpret_cast<rb_gvar_getter_t *>(w);
+ ::rb_define_virtual_variable(q, r, e);
+}
+
+inline void
+rb_define_virtual_variable(const char *q, std::nullptr_t w, rb_gvar_setter_t *e)
+{
+ ::rb_define_virtual_variable(q, w, e);
+}
+
+RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
+inline void
+rb_define_virtual_variable(const char *q, std::nullptr_t w, void_type *e)
+{
+ rb_gvar_setter_t *r = reinterpret_cast<rb_gvar_setter_t *>(e);
+ ::rb_define_virtual_variable(q, w, r);
+}
+#endif
+
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
@@ -101,7 +131,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] r Setter function.
/// @note Both functions can be nullptr.
/// @see rb_define_virtual_variable()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline void
rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r)
{
@@ -111,14 +141,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r)
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief Define a function-backended global variable.
-/// @param[in] q Name of the variable.
-/// @param[in] w Variable storage.
-/// @param[in] e Getter function.
-/// @param[in] r Setter function.
-/// @note Both functions can be nullptr.
-/// @see rb_define_virtual_variable()
-/// @deprecated Use glanular typed overload instead.
inline void
rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_type *r)
{
@@ -127,14 +149,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_typ
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief Define a function-backended global variable.
-/// @param[in] q Name of the variable.
-/// @param[in] w Variable storage.
-/// @param[in] e Getter function.
-/// @param[in] r Setter function.
-/// @note Both functions can be nullptr.
-/// @see rb_define_virtual_variable()
-/// @deprecated Use glanular typed overload instead.
inline void
rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r)
{
@@ -142,10 +156,41 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r)
::rb_define_hooked_variable(q, w, t, r);
}
+#ifdef HAVE_NULLPTR
+inline void
+rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, std::nullptr_t r)
+{
+ ::rb_define_hooked_variable(q, w, e, r);
+}
+
+RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
+inline void
+rb_define_hooked_variable(const char *q, VALUE *w, type *e, std::nullptr_t r)
+{
+ rb_gvar_getter_t *y = reinterpret_cast<rb_gvar_getter_t *>(e);
+ ::rb_define_hooked_variable(q, w, y, r);
+}
+
+inline void
+rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, rb_gvar_setter_t *r)
+{
+ ::rb_define_hooked_variable(q, w, e, r);
+}
+
+RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
+inline void
+rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, void_type *r)
+{
+ rb_gvar_setter_t *y = reinterpret_cast<rb_gvar_setter_t *>(r);
+ ::rb_define_hooked_variable(q, w, e, y);
+}
+#endif
+
/// @}
/// @name Exceptions and tag jumps
/// @{
+// RUBY_CXX_DEPRECATED("by rb_block_call since 1.9")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Old way to implement iterators.
/// @param[in] q A function that can yield.
@@ -154,14 +199,23 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] r Passed to `e`.
/// @return The return value of `q`.
/// @note `e` can be nullptr.
-/// @deprecated This function is obsolated since long before 2.x era. Do not
+/// @deprecated This function is obsoleted since long before 2.x era. Do not
/// use it any longer. rb_block_call() is provided instead.
inline VALUE
-rb_iterate(VALUE(*q)(VALUE), VALUE w, type *e, VALUE r)
+rb_iterate(onearg_type *q, VALUE w, type *e, VALUE r)
{
rb_block_call_func_t t = reinterpret_cast<rb_block_call_func_t>(e);
- return ::rb_iterate(q, w, t, r);
+ return backward::rb_iterate_deprecated(q, w, t, r);
+}
+
+#ifdef HAVE_NULLPTR
+RUBY_CXX_DEPRECATED("by rb_block_call since 1.9")
+inline VALUE
+rb_iterate(onearg_type *q, VALUE w, std::nullptr_t e, VALUE r)
+{
+ return backward::rb_iterate_deprecated(q, w, e, r);
}
+#endif
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Call a method with a block.
@@ -173,7 +227,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] y Passed to `t`
/// @return Return value of `q#w(*r,&t)`
/// @note 't' can be nullptr.
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y)
{
@@ -181,6 +235,14 @@ rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y)
return ::rb_block_call(q, w, e, r, u, y);
}
+#ifdef HAVE_NULLPTR
+inline VALUE
+rb_block_call(VALUE q, ID w, int e, const VALUE *r, std::nullptr_t t, VALUE y)
+{
+ return ::rb_block_call(q, w, e, r, t, y);
+}
+#endif
+
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `rescue` clause.
/// @param[in] q A function that can raise.
@@ -193,7 +255,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @see rb_ensure()
/// @see rb_rescue2()
/// @see rb_protect()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_rescue(type *q, VALUE w, type *e, VALUE r)
{
@@ -217,7 +279,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @see rb_ensure()
/// @see rb_rescue()
/// @see rb_protect()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
{
@@ -243,7 +305,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @see rb_rescue()
/// @see rb_rescue2()
/// @see rb_protect()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_ensure(type *q, VALUE w, type *e, VALUE r)
{
@@ -264,7 +326,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @see rb_protect()
/// @see rb_rb_catch_obj()
/// @see rb_rescue()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_catch(const char *q, type *w, VALUE e)
{
@@ -272,6 +334,14 @@ rb_catch(const char *q, type *w, VALUE e)
return ::rb_catch(q, r, e);
}
+#ifdef HAVE_NULLPTR
+inline VALUE
+rb_catch(const char *q, std::nullptr_t w, VALUE e)
+{
+ return ::rb_catch(q, w, e);
+}
+#endif
+
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `Kernel#catch`.
/// @param[in] q The "tag" object.
@@ -283,7 +353,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @see rb_protect()
/// @see rb_rb_catch_obj()
/// @see rb_rescue()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_catch_obj(VALUE q, type *w, VALUE e)
{
@@ -296,14 +366,14 @@ rb_catch_obj(VALUE q, type *w, VALUE e)
/// @{
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief Creates a @ref rb_cFiber instance.
+/// @brief Creates a rb_cFiber instance.
/// @param[in] q The fiber body.
/// @param[in] w Passed to `q`.
/// @return What was allocated.
/// @note It makes no sense to pass nullptr to`q`.
/// @see rb_proc_new()
-/// @see rb_thread_creatr()
-/// @deprecated Use glanular typed overload instead.
+/// @see rb_thread_create()
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_fiber_new(type *q, VALUE w)
{
@@ -318,8 +388,8 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @return What was allocated.
/// @note It makes no sense to pass nullptr to`q`.
/// @see rb_fiber_new()
-/// @see rb_thread_creatr()
-/// @deprecated Use glanular typed overload instead.
+/// @see rb_thread_create()
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_proc_new(type *q, VALUE w)
{
@@ -335,7 +405,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @note It makes no sense to pass nullptr to`q`.
/// @see rb_proc_new()
/// @see rb_fiber_new()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline VALUE
rb_thread_create(type *q, void *w)
{
@@ -357,7 +427,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @note It makes no sense to pass nullptr to`w`.
/// @see st_foreach_check()
/// @see rb_hash_foreach()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline int
st_foreach(st_table *q, int_type *w, st_data_t e)
{
@@ -375,7 +445,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @retval 1 Element removed during traversing.
/// @note It makes no sense to pass nullptr to`w`.
/// @see st_foreach()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline int
st_foreach_check(st_table *q, int_type *w, st_data_t e, st_data_t)
{
@@ -391,7 +461,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] e Passed to `w`.
/// @note It makes no sense to pass nullptr to`w`.
/// @see st_foreach_check()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline void
st_foreach_safe(st_table *q, int_type *w, st_data_t e)
{
@@ -407,7 +477,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] e Passed to `w`.
/// @note It makes no sense to pass nullptr to`w`.
/// @see st_foreach()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline void
rb_hash_foreach(VALUE q, int_type *w, VALUE e)
{
@@ -423,7 +493,7 @@ RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @param[in] e Passed to `w`.
/// @note It makes no sense to pass nullptr to`w`.
/// @see st_foreach()
-/// @deprecated Use glanular typed overload instead.
+/// @deprecated Use granular typed overload instead.
inline void
rb_ivar_foreach(VALUE q, int_type *w, VALUE e)
{
@@ -433,7 +503,198 @@ rb_ivar_foreach(VALUE q, int_type *w, VALUE e)
}
/// @}
-}}}
+
+/// Driver for *_define_method. ::rb_define_method function for instance takes
+/// a pointer to ANYARGS-ed functions, which in fact varies 18 different
+/// prototypes. We still need to preserve ANYARGS for storages but why not
+/// check the consistencies if possible. In C++ a function has its own
+/// prototype, which is a compile-time constant (static type) by nature. We
+/// can list up all the possible input types and provide warnings for other
+/// cases. This is such attempt.
+namespace define_method {
+
+/// Type of ::rb_f_notimplement().
+typedef VALUE notimpl_type(int, const VALUE *, VALUE, VALUE);
+
+/// @brief Template metaprogramming to generate function prototypes.
+/// @tparam T Type of method id (`ID` or `const char*` in practice).
+/// @tparam F Definition driver e.g. ::rb_define_method.
+template<typename T, void (*F)(VALUE klass, T mid, type *func, int arity)>
+struct driver {
+
+ /// @brief Defines a method
+ /// @tparam N Arity of the function.
+ /// @tparam U The function in question
+ template<int N, typename U>
+ struct engine {
+
+ /* :TODO: Following deprecation attribute renders tons of warnings (one
+ * per every method definitions), which is annoying. Of course
+ * annoyance is the core feature of deprecation warnings... But that
+ * could be too much, especially when the warnings happen inside of
+ * machine-generated programs. And SWIG is known to do such thing.
+ * The new (granular) API was introduced in API version 2.7. As of
+ * this writing the version is 2.8. Let's warn this later, some time
+ * during 3.x. Hopefully codes in old (ANYARGS-ed) format should be
+ * less than now. */
+#if (RUBY_API_VERSION_MAJOR * 100 + RUBY_API_VERSION_MINOR) >= 301
+ RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated")
+#endif
+ /// @copydoc define(VALUE klass, T mid, U func)
+ /// @deprecated Pass correctly typed function instead.
+ static inline void
+ define(VALUE klass, T mid, type func)
+ {
+ F(klass, mid, func, N);
+ }
+
+ /// @brief Defines klass#mid as func, whose arity is N.
+ /// @param[in] klass Where the method lives.
+ /// @param[in] mid Name of the method to define.
+ /// @param[in] func Function that implements klass#mid.
+ static inline void
+ define(VALUE klass, T mid, U func)
+ {
+ F(klass, mid, reinterpret_cast<type *>(func), N);
+ }
+
+ /// @copydoc define(VALUE klass, T mid, U func)
+ static inline void
+ define(VALUE klass, T mid, notimpl_type func)
+ {
+ F(klass, mid, reinterpret_cast<type *>(func), N);
+ }
+ };
+
+ /// @cond INTERNAL_MACRO
+ template<int N, bool = false> struct specific : public engine<N, type *> {};
+ template<bool b> struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {};
+ template<bool b> struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {};
+ template<bool b> struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> {
+ using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define;
+ static inline void define(VALUE c, T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(c, m, reinterpret_cast<type *>(f), -1); }
+ };
+ template<bool b> struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {};
+ /// @endcond
+};
+
+/* We could perhaps merge this struct into the one above using variadic
+ * template parameters if we could assume C++11, but sadly we cannot. */
+/// @copydoc ruby::backward::cxxanyargs::define_method::driver
+template<typename T, void (*F)(T mid, type func, int arity)>
+struct driver0 {
+
+ /// @brief Defines a method
+ /// @tparam N Arity of the function.
+ /// @tparam U The function in question
+ template<int N, typename U>
+ struct engine {
+ RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated")
+ /// @copydoc define(T mid, U func)
+ /// @deprecated Pass correctly typed function instead.
+ static inline void
+ define(T mid, type func)
+ {
+ F(mid, func, N);
+ }
+
+ /// @brief Defines Kernel#mid as func, whose arity is N.
+ /// @param[in] mid Name of the method to define.
+ /// @param[in] func Function that implements klass#mid.
+ static inline void
+ define(T mid, U func)
+ {
+ F(mid, reinterpret_cast<type *>(func), N);
+ }
+
+ /// @copydoc define(T mid, U func)
+ /// @deprecated Pass correctly typed function instead.
+ static inline void
+ define(T mid, notimpl_type func)
+ {
+ F(mid, reinterpret_cast<type *>(func), N);
+ }
+ };
+
+ /// @cond INTERNAL_MACRO
+ template<int N, bool = false> struct specific : public engine<N, type *> {};
+ template<bool b> struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {};
+ template<bool b> struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {};
+ template<bool b> struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {};
+ template<bool b> struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> {
+ using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define;
+ static inline void define(T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(m, reinterpret_cast<type *>(f), -1); }
+ };
+ template<bool b> struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {};
+ /// @endcond
+};
+
+struct rb_define_method : public driver <const char *, ::rb_define_method> {}; ///< Dispatches appropriate driver for ::rb_define_method.
+struct rb_define_method_id : public driver <ID, ::rb_define_method_id> {}; ///< Dispatches appropriate driver for ::rb_define_method_id.
+struct rb_define_private_method : public driver <const char *, ::rb_define_private_method> {}; ///< Dispatches appropriate driver for ::rb_define_private_method.
+struct rb_define_protected_method : public driver <const char *, ::rb_define_protected_method> {}; ///< Dispatches appropriate driver for ::rb_define_protected_method.
+struct rb_define_singleton_method : public driver <const char *, ::rb_define_singleton_method> {}; ///< Dispatches appropriate driver for ::rb_define_singleton_method.
+struct rb_define_module_function : public driver <const char *, ::rb_define_module_function> {}; ///< Dispatches appropriate driver for ::rb_define_module_function.
+struct rb_define_global_function : public driver0<const char *, ::rb_define_global_function> {}; ///< Dispatches appropriate driver for ::rb_define_global_function.
+
+/// @brief Defines klass\#mid.
+/// @param klass Where the method lives.
+/// @copydetails #rb_define_global_function(mid, func, arity)
+#define rb_define_method(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_method::specific<arity>::define(klass, mid, func)
+
+/// @copydoc #rb_define_method(klass, mid, func, arity)
+#define rb_define_method_id(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_method_id::specific<arity>::define(klass, mid, func)
+
+/// @brief Defines klass\#mid and makes it private.
+/// @copydetails #rb_define_method(klass, mid, func, arity)
+#define rb_define_private_method(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_private_method::specific<arity>::define(klass, mid, func)
+
+/// @brief Defines klass\#mid and makes it protected.
+/// @copydetails #rb_define_method
+#define rb_define_protected_method(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_protected_method::specific<arity>::define(klass, mid, func)
+
+/// @brief Defines klass.mid.(klass, mid, func, arity)
+/// @copydetails #rb_define_method
+#define rb_define_singleton_method(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_singleton_method::specific<arity>::define(klass, mid, func)
+
+/// @brief Defines klass\#mid and makes it a module function.
+/// @copydetails #rb_define_method(klass, mid, func, arity)
+#define rb_define_module_function(klass, mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_module_function::specific<arity>::define(klass, mid, func)
+
+/// @brief Defines ::rb_mKernel \#mid.
+/// @param mid Name of the defining method.
+/// @param func Implementation of \#mid.
+/// @param arity Arity of \#mid.
+#define rb_define_global_function(mid, func, arity) ::ruby::backward::cxxanyargs::define_method::rb_define_global_function::specific<arity>::define(mid, func)
+
+}}}}}
using namespace ruby::backward::cxxanyargs;
#endif // RUBY_BACKWARD_CXXANYARGS_HPP
diff --git a/include/ruby/backward/rubyio.h b/include/ruby/backward/rubyio.h
deleted file mode 100644
index a6e3a7c78b..0000000000
--- a/include/ruby/backward/rubyio.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#if defined __GNUC__
-#warning use "ruby/io.h" instead of "rubyio.h"
-#elif defined _MSC_VER
-#pragma message("warning: use \"ruby/io.h\" instead of \"rubyio.h\"")
-#endif
-#include "ruby/io.h"
diff --git a/include/ruby/backward/rubysig.h b/include/ruby/backward/rubysig.h
deleted file mode 100644
index 58b13cab1c..0000000000
--- a/include/ruby/backward/rubysig.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**********************************************************************
-
- rubysig.h -
-
- $Author$
- $Date$
- created at: Wed Aug 16 01:15:38 JST 1995
-
- Copyright (C) 1993-2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#if defined __GNUC__
-#warning rubysig.h is obsolete
-#elif defined _MSC_VER
-#pragma message("warning: rubysig.h is obsolete")
-#endif
-
-#ifndef RUBYSIG_H
-#define RUBYSIG_H
-#include "ruby/ruby.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
-#define RUBY_CRITICAL(statements) do {statements;} while (0)
-#define DEFER_INTS (0)
-#define ENABLE_INTS (1)
-#define ALLOW_INTS do {CHECK_INTS;} while (0)
-#define CHECK_INTS rb_thread_check_ints()
-
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
-
-#endif
diff --git a/include/ruby/backward/st.h b/include/ruby/backward/st.h
deleted file mode 100644
index 3e36d44cf8..0000000000
--- a/include/ruby/backward/st.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#if defined __GNUC__
-#warning use "ruby/st.h" instead of bare "st.h"
-#elif defined _MSC_VER
-#pragma message("warning: use \"ruby/st.h\" instead of bare \"st.h\"")
-#endif
-#include "ruby/st.h"
diff --git a/include/ruby/backward/util.h b/include/ruby/backward/util.h
deleted file mode 100644
index 11d32a2da8..0000000000
--- a/include/ruby/backward/util.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#if defined __GNUC__
-#warning use "ruby/util.h" instead of bare "util.h"
-#elif defined _MSC_VER
-#pragma message("warning: use \"ruby/util.h\" instead of bare \"util.h\"")
-#endif
-#include "ruby/util.h"
diff --git a/include/ruby/debug.h b/include/ruby/debug.h
index 8a831e61ab..f95acdb17e 100644
--- a/include/ruby/debug.h
+++ b/include/ruby/debug.h
@@ -1,97 +1,654 @@
-/**********************************************************************
-
- ruby/debug.h -
-
- $Author: ko1 $
- created at: Tue Nov 20 20:35:08 2012
-
- Copyright (C) 2012 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RB_DEBUG_H
+#ifndef RB_DEBUG_H /*-*-C++-*-vi:se ft=cpp:*/
#define RB_DEBUG_H 1
+/**
+ * @file
+ * @author $Author: ko1 $
+ * @date Tue Nov 20 20:35:08 2012
+ * @copyright Copyright (C) 2012 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/event.h"
+#include "ruby/internal/value.h"
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* Note: This file contains experimental APIs. */
/* APIs can be replaced at Ruby 2.0.1 or later */
+/**
+ * @name Frame-profiling APIs
+ *
+ * @{
+ */
-/* profile frames APIs */
+RBIMPL_ATTR_NONNULL((3))
+/**
+ * Queries mysterious "frame"s of the given range.
+ *
+ * The returned values are opaque backtrace pointers, which you are allowed to
+ * issue a very limited set of operations listed below. Don't call arbitrary
+ * ruby methods.
+ *
+ * @param[in] start Start position (0 means the topmost).
+ * @param[in] limit Number objects of `buff`.
+ * @param[out] buff Return buffer.
+ * @param[out] lines Return buffer.
+ * @return Number of objects filled into `buff`.
+ * @post `buff` is filled with backtrace pointers.
+ * @post `lines` is filled with `__LINE__` of each backtraces.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't like this abuse of ::VALUE. It should have been
+ * `const struct rb_callable_method_entry_struct *`.
+ */
int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
+
+/**
+ * Queries the path of the passed backtrace.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil The frame is implemented in C etc.
+ * @retval otherwise Where `frame` is running.
+ */
VALUE rb_profile_frame_path(VALUE frame);
+
+/**
+ * Identical to rb_profile_frame_path(), except it tries to expand the
+ * returning path. In case the path is `require`-d from something else
+ * rb_profile_frame_path() can return relative paths. This one tries to avoid
+ * that.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval "<cfunc>" The frame is in C.
+ * @retval RUBY_Qnil Can't infer real path (inside of `eval` etc.).
+ * @retval otherwise Where `frame` is running.
+ */
VALUE rb_profile_frame_absolute_path(VALUE frame);
+
+/**
+ * Queries human-readable "label" string. This is `"<main>"` for the toplevel,
+ * `"<compiled>"` for evaluated ones, method name for methods, class name for
+ * classes.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil Can't infer the label (C etc.).
+ * @retval "<main>" The frame is global toplevel.
+ * @retval "<compiled>" The frame is dynamic.
+ * @retval otherwise Label of the frame.
+ */
VALUE rb_profile_frame_label(VALUE frame);
+
+/**
+ * Identical to rb_profile_frame_label(), except it does not "qualify" the
+ * result. Consider the following backtrace:
+ *
+ * ```ruby
+ * def bar
+ * caller_locations
+ * end
+ *
+ * def foo
+ * [1].map { bar }.first
+ * end
+ *
+ * obj = foo.first
+ * obj.label # => "block in foo"
+ * obj.base_label # => "foo"
+ * ```
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil Can't infer the label (C etc.).
+ * @retval "<main>" The frame is global toplevel.
+ * @retval "<compiled>" The frame is dynamic.
+ * @retval otherwise Base label of the frame.
+ */
VALUE rb_profile_frame_base_label(VALUE frame);
+
+/**
+ * Identical to rb_profile_frame_label(), except it returns a qualified result.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil Can't infer the label (C etc.).
+ * @retval "<main>" The frame is global toplevel.
+ * @retval "<compiled>" The frame is dynamic.
+ * @retval otherwise Qualified label of the frame.
+ *
+ * @internal
+ *
+ * As of writing there is no way to obtain this return value from a Ruby
+ * script. This may change in future (it took 8 years and still no progress,
+ * though).
+ */
VALUE rb_profile_frame_full_label(VALUE frame);
+
+/**
+ * Queries the first line of the method of the passed frame pointer. Can be
+ * handy when for instance a debugger want to display the frame in question.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil Can't infer the line (C etc.).
+ * @retval otherwise Line number of the method in question.
+ */
VALUE rb_profile_frame_first_lineno(VALUE frame);
+
+/**
+ * Queries the class path of the method that the passed frame represents.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil Can't infer the class (global toplevel etc.).
+ * @retval otherwise Class path as in rb_class_path().
+ */
VALUE rb_profile_frame_classpath(VALUE frame);
+
+/**
+ * Queries if the method of the passed frame is a singleton class.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qtrue It is a singleton method.
+ * @retval RUBY_Qfalse Otherwise (normal method/non-method).
+ */
VALUE rb_profile_frame_singleton_method_p(VALUE frame);
+
+/**
+ * Queries the name of the method of the passed frame.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil The frame in question is not a method.
+ * @retval otherwise Name of the method of the frame.
+ */
VALUE rb_profile_frame_method_name(VALUE frame);
+
+/**
+ * Identical to rb_profile_frame_method_name(), except it "qualifies" the
+ * return value with its defining class.
+ *
+ * @param[in] frame What rb_profile_frames() returned.
+ * @retval RUBY_Qnil The frame in question is not a method.
+ * @retval otherwise Qualified name of the method of the frame.
+ */
VALUE rb_profile_frame_qualified_method_name(VALUE frame);
-/* debug inspector APIs */
+/** @} */
+
+/**
+ * @name Debug inspector APIs
+ *
+ * @{
+ */
+
+/** Opaque struct representing a debug inspector. */
typedef struct rb_debug_inspector_struct rb_debug_inspector_t;
-typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *);
+/**
+ * Type of the callback function passed to rb_debug_inspector_open().
+ * Inspection shall happen only inside of them. The passed pointers gets
+ * invalidated once after the callback returns.
+ *
+ * @param[in] dc A debug context.
+ * @param[in,out] data What was passed to rb_debug_inspector_open().
+ * @return What would be the return value of rb_debug_inspector_open().
+ */
+typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *dc, void *data);
+
+/**
+ * Prepares, executes, then cleans up a debug session.
+ *
+ * @param[in] func A callback to run inside of a debug session.
+ * @param[in,out] data Passed as-is to `func`.
+ * @return What was returned from `func`.
+ */
VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data);
+
+/**
+ * Queries the backtrace object of the context. This is as if you call
+ * `caller_locations` at the point of debugger.
+ *
+ * @param[in] dc A debug context.
+ * @return An array of `Thread::Backtrace::Location` which represents the
+ * current point of execution at `dc`.
+
+ */
+VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc);
+
+/**
+ * Queries the current receiver of the passed context's upper frame.
+ *
+ * @param[in] dc A debug context.
+ * @param[in] index Index of the frame from top to bottom.
+ * @exception rb_eArgError `index` out of range.
+ * @return The current receiver at `index`-th frame.
+ */
VALUE rb_debug_inspector_frame_self_get(const rb_debug_inspector_t *dc, long index);
+
+/**
+ * Queries the current class of the passed context's upper frame.
+ *
+ * @param[in] dc A debug context.
+ * @param[in] index Index of the frame from top to bottom.
+ * @exception rb_eArgError `index` out of range.
+ * @return The current class at `index`-th frame.
+ */
VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, long index);
+
+/**
+ * Queries the binding of the passed context's upper frame.
+ *
+ * @param[in] dc A debug context.
+ * @param[in] index Index of the frame from top to bottom.
+ * @exception rb_eArgError `index` out of range.
+ * @return The binding at `index`-th frame.
+ */
VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, long index);
+
+/**
+ * Queries the instruction sequence of the passed context's upper frame.
+ *
+ * @param[in] dc A debug context.
+ * @param[in] index Index of the frame from top to bottom.
+ * @exception rb_eArgError `index` out of range.
+ * @retval RUBY_Qnil `index`-th frame is not in Ruby (C etc.).
+ * @retval otherwise An instance of `RubyVM::InstructionSequence` which
+ * represents the instruction sequence at `index`-th
+ * frame.
+ */
VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, long index);
-VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc);
-/* Old style set_trace_func APIs */
+/**
+ * Queries the depth of the passed context's upper frame.
+ *
+ * Note that the depth is not same as the frame index because debug_inspector
+ * skips some special frames but the depth counts all frames.
+ *
+ * @param[in] dc A debug context.
+ * @param[in] index Index of the frame from top to bottom.
+ * @exception rb_eArgError `index` out of range.
+ * @retval The depth at `index`-th frame in Integer.
+ */
+VALUE rb_debug_inspector_frame_depth(const rb_debug_inspector_t *dc, long index);
+
+// A macro to recognize `rb_debug_inspector_frame_depth()` is available or not
+#define RB_DEBUG_INSPECTOR_FRAME_DEPTH(dc, index) rb_debug_inspector_frame_depth(dc, index)
+
+/**
+ * Return current frmae depth.
+ *
+ * @retval The depth of the current frame in Integer.
+ */
+VALUE rb_debug_inspector_current_depth(void);
+
+/** @} */
+
+/**
+ * @name Old style set_trace_func APIs
+ *
+ * @{
+ */
/* duplicated def of include/ruby/ruby.h */
-void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
-int rb_remove_event_hook(rb_event_hook_func_t func);
+#include "ruby/internal/event.h"
+/**
+ * Identical to rb_remove_event_hook(), except it additionally takes the data
+ * argument. This extra argument is the same as that of rb_add_event_hook(),
+ * and this function removes the hook which matches both arguments at once.
+ *
+ * @param[in] func A callback.
+ * @param[in] data What to be passed to `func`.
+ * @return Number of deleted event hooks.
+ * @note As multiple events can share the same `func` it is quite
+ * possible for the return value to become more than one.
+ */
int rb_remove_event_hook_with_data(rb_event_hook_func_t func, VALUE data);
+
+/**
+ * Identical to rb_add_event_hook(), except its effect is limited to the passed
+ * thread. Other threads are not affected by this.
+ *
+ * @param[in] thval An instance of ::rb_cThread.
+ * @param[in] func A callback.
+ * @param[in] events A set of events that `func` should run.
+ * @param[in] data Passed as-is to `func`.
+ * @exception rb_eTypeError `thval` is not a thread.
+ */
void rb_thread_add_event_hook(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
+
+/**
+ * Identical to rb_remove_event_hook(), except it additionally takes a thread
+ * argument. This extra argument is the same as that of
+ * rb_thread_add_event_hook(), and this function removes the hook which matches
+ * both arguments at once.
+ *
+ * @param[in] thval An instance of ::rb_cThread.
+ * @param[in] func A callback.
+ * @exception rb_eTypeError `thval` is not a thread.
+ * @return Number of deleted event hooks.
+ * @note As multiple events can share the same `func` it is quite
+ * possible for the return value to become more than one.
+ */
int rb_thread_remove_event_hook(VALUE thval, rb_event_hook_func_t func);
+
+/**
+ * Identical to rb_thread_remove_event_hook(), except it additionally takes the
+ * data argument. It can also be seen as a routine identical to
+ * rb_remove_event_hook_with_data(), except it additionally takes the thread.
+ * This function deletes hooks that satisfy all three criteria.
+ *
+ * @param[in] thval An instance of ::rb_cThread.
+ * @param[in] func A callback.
+ * @param[in] data What to be passed to `func`.
+ * @exception rb_eTypeError `thval` is not a thread.
+ * @return Number of deleted event hooks.
+ * @note As multiple events can share the same `func` it is quite
+ * possible for the return value to become more than one.
+ */
int rb_thread_remove_event_hook_with_data(VALUE thval, rb_event_hook_func_t func, VALUE data);
-/* TracePoint APIs */
+/** @} */
+/**
+ * @name TracePoint APIs
+ *
+ * @{
+ */
+
+/**
+ * Creates a tracepoint by registering a callback function for one or more
+ * tracepoint events. Once the tracepoint is created, you can use
+ * rb_tracepoint_enable to enable the tracepoint.
+ *
+ * @param[in] target_thread_not_supported_yet Meant for picking the
+ * thread in which the tracepoint is to be created.
+ * However, current implementation ignore this
+ * parameter, tracepoint is created for all threads.
+ * Simply specify Qnil.
+ * @param[in] events Event(s) to listen to.
+ * @param[in] func A callback function.
+ * @param[in,out] data Void pointer that will be passed to the callback
+ * function.
+ *
+ * When the callback function is called, it will be passed 2 parameters:
+ * 1. `VALUE tpval` - the TracePoint object from which trace args can be
+ * extracted.
+ * 1. `void *data` - A void pointer which helps to share scope with the
+ * callback function.
+ *
+ * It is important to note that you cannot register callbacks for normal events
+ * and internal events simultaneously because they are different purpose. You
+ * can use any Ruby APIs (calling methods and so on) on normal event hooks.
+ * However, in internal events, you can not use any Ruby APIs (even object
+ * creations). This is why we can't specify internal events by TracePoint
+ * directly. Limitations are MRI version specific.
+ *
+ * Example:
+ *
+ * ```CXX
+ * rb_tracepoint_new(
+ * Qnil,
+ * RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREEOBJ,
+ * obj_event_i,
+ * data);
+ * ```
+ *
+ * In this example, a callback function `obj_event_i` will be registered for
+ * internal events #RUBY_INTERNAL_EVENT_NEWOBJ and
+ * #RUBY_INTERNAL_EVENT_FREEOBJ.
+ */
VALUE rb_tracepoint_new(VALUE target_thread_not_supported_yet, rb_event_flag_t events, void (*func)(VALUE, void *), void *data);
+
+/**
+ * Starts (enables) trace(s) defined by the passed object. A TracePoint object
+ * does not immediately take effect on creation. You have to explicitly call
+ * this API.
+ *
+ * @param[in] tpval An instance of TracePoint.
+ * @exception rb_eArgError A trace is already running.
+ * @return Undefined value. Forget this. It should have returned `void`.
+ * @post Trace(s) defined by `tpval` start.
+ */
VALUE rb_tracepoint_enable(VALUE tpval);
+
+/**
+ * Stops (disables) an already running instance of TracePoint.
+ *
+ * @param[in] tpval An instance of TracePoint.
+ * @return Undefined value. Forget this. It should have returned `void`.
+ * @post Trace(s) defined by `tpval` stop.
+ */
VALUE rb_tracepoint_disable(VALUE tpval);
+
+/**
+ * Queries if the passed TracePoint is up and running.
+ *
+ * @param[in] tpval An instance of TracePoint.
+ * @retval RUBY_Qtrue It is.
+ * @retval RUBY_Qfalse It isn't.
+ */
VALUE rb_tracepoint_enabled_p(VALUE tpval);
+/**
+ * Type that represents a specific trace event. Roughly resembles the
+ * tracepoint object that is passed to the block of `TracePoint.new`:
+ *
+ * ```ruby
+ * TracePoint.new(*events) do |obj|
+ * ... # ^^^^^ Resembles this object.
+ * end
+ * ```
+ */
typedef struct rb_trace_arg_struct rb_trace_arg_t;
+
+RBIMPL_ATTR_RETURNS_NONNULL()
+/**
+ * Queries the current event of the passed tracepoint.
+ *
+ * @param[in] tpval An instance of TracePoint.
+ * @exception rb_eRuntimeError `tpval` is disabled.
+ * @return The current event.
+ *
+ * @internal
+ *
+ * `tpval` is a fake. There is only one instance of ::rb_trace_arg_t at one
+ * time. This function just returns that global variable.
+ */
rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval);
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the event of the passed trace.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @return Its event.
+ */
rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_tracearg_event_flag(), except it returns the name of the
+ * event in Ruby's symbol.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @return Its event, in Ruby level Symbol object.
+ */
VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the line of the point where the trace is at.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval 0 The trace is not at Ruby frame.
+ * @return otherwise Its line number.
+ */
VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the file name of the point where the trace is at.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval RUBY_Qnil The trace is not at Ruby frame.
+ * @retval otherwise Its path.
+ */
VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the method name of the point where the trace is at.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval RUBY_Qnil There is no method.
+ * @retval otherwise Its method name, in Ruby level Symbol.
+ */
VALUE rb_tracearg_method_id(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_tracearg_method_id(), except it returns callee id like
+ * rb_frame_callee().
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval RUBY_Qnil There is no method.
+ * @retval otherwise Its method name, in Ruby level Symbol.
+ */
VALUE rb_tracearg_callee_id(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the class that defines the method that the passed trace is at. This
+ * can be different from the class of rb_tracearg_self()'s return value because
+ * of inheritance(s).
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval RUBY_Qnil There is no method.
+ * @retval otherwise Its method's class.
+ */
VALUE rb_tracearg_defined_class(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Creates a binding object of the point where the trace is at.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @retval RUBY_Qnil The point has no binding.
+ * @retval otherwise Its binding.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea on which situation shall this function return
+ * ::RUBY_Qnil.
+ */
VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the receiver of the point trace is at.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @return Its receiver.
+ */
VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the return value that the trace represents.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @exception rb_eRuntimeError The tracing event is not return-related.
+ * @return The return value.
+ */
VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the raised exception that the trace represents.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @exception rb_eRuntimeError The tracing event is not exception-related.
+ * @return The raised exception.
+ */
VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries the allocated/deallocated object that the trace represents.
+ *
+ * @param[in] trace_arg A trace instance.
+ * @exception rb_eRuntimeError The tracing event is not GC-related.
+ * @return The allocated/deallocated object.
+ */
VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg);
+
+/** @} */
+
+/**
+ * @name Postponed Job API
+ *
+ * @{
+ */
+
/*
* Postponed Job API
* rb_postponed_job_register and rb_postponed_job_register_one are
* async-signal-safe and used via SIGPROF by the "stackprof" RubyGem
*/
+
+/**
+ * Type of postponed jobs.
+ *
+ * @param[in,out] arg What was passed to rb_postponed_job_register().
+ */
typedef void (*rb_postponed_job_func_t)(void *arg);
+
+/**
+ * Registers a postponed job.
+ *
+ * There are situations when running a ruby program is not possible. For
+ * instance when a program is in a signal handler; for another instance when
+ * the GC is busy. On such situations however, there might be needs to do
+ * something. We cannot but defer such operations until we are 100% sure it is
+ * safe to execute them. This mechanism is called postponed jobs. This
+ * function registers a new one. The registered job would eventually gets
+ * executed.
+ *
+ * @param[in] flags (Unused) reserved for future extensions.
+ * @param[in] func Job body.
+ * @param[in,out] data Passed as-is to `func`.
+ * @retval 0 Postponed job buffer is full. Failed.
+ * @retval otherwise Opaque return value.
+ * @post The passed job is postponed.
+ */
int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data);
+
+/**
+ * Identical to rb_postponed_job_register_one(), except it additionally checks
+ * for duplicated registration. In case the passed job is already in the
+ * postponed job buffer this function does nothing.
+ *
+ * @param[in] flags (Unused) reserved for future extensions.
+ * @param[in] func Job body.
+ * @param[in,out] data Passed as-is to `func`.
+ * @retval 0 Postponed job buffer is full. Failed.
+ * @retval otherwise Opaque return value.
+ */
int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data);
+/** @} */
+
+/**
+ * @cond INTERNAL_MACRO
+ *
+ * Anything after this are intentionally left undocumented, to honour the
+ * comment below.
+ */
+
/* undocumented advanced tracing APIs */
typedef enum {
@@ -103,13 +660,8 @@ typedef enum {
void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
-RUBY_SYMBOL_EXPORT_END
+/** @endcond */
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_DEBUG_H */
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 5e03d49985..48184f8a18 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -1,135 +1,28 @@
-/************************************************
-
- defines.h -
-
- $Author$
- created at: Wed May 18 00:21:44 JST 1994
-
-************************************************/
-
-#ifndef RUBY_DEFINES_H
+#ifndef RUBY_DEFINES_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_DEFINES_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#include "ruby/config.h"
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
-#endif
-
-/* function attributes */
-#ifndef CONSTFUNC
-# define CONSTFUNC(x) x
-#endif
-#ifndef PUREFUNC
-# define PUREFUNC(x) x
-#endif
-#ifndef DEPRECATED
-# define DEPRECATED(x) x
-#endif
-#ifndef DEPRECATED_BY
-# define DEPRECATED_BY(n,x) DEPRECATED(x)
-#endif
-#ifndef DEPRECATED_TYPE
-# define DEPRECATED_TYPE(mesg, decl) decl
-#endif
-#ifndef RUBY_CXX_DEPRECATED
-# define RUBY_CXX_DEPRECATED(mesg) /* nothing */
-#endif
-#ifndef NOINLINE
-# define NOINLINE(x) x
-#endif
-#ifndef ALWAYS_INLINE
-# define ALWAYS_INLINE(x) x
-#endif
-#ifndef ERRORFUNC
-# define HAVE_ATTRIBUTE_ERRORFUNC 0
-# define ERRORFUNC(mesg, x) x
-#else
-# define HAVE_ATTRIBUTE_ERRORFUNC 1
-#endif
-#ifndef WARNINGFUNC
-# define HAVE_ATTRIBUTE_WARNINGFUNC 0
-# define WARNINGFUNC(mesg, x) x
-#else
-# define HAVE_ATTRIBUTE_WARNINGFUNC 1
-#endif
-
-#ifndef GCC_VERSION_SINCE
-# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
-# define GCC_VERSION_SINCE(major, minor, patchlevel) \
- ((__GNUC__ > (major)) || \
- ((__GNUC__ == (major) && \
- ((__GNUC_MINOR__ > (minor)) || \
- (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
-# else
-# define GCC_VERSION_SINCE(major, minor, patchlevel) 0
-# endif
-#endif
-#ifndef GCC_VERSION_BEFORE
-# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
-# define GCC_VERSION_BEFORE(major, minor, patchlevel) \
- ((__GNUC__ < (major)) || \
- ((__GNUC__ == (major) && \
- ((__GNUC_MINOR__ < (minor)) || \
- (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ <= (patchlevel))))))
-# else
-# define GCC_VERSION_BEFORE(major, minor, patchlevel) 0
-# endif
-#endif
-
-/* likely */
-#if __GNUC__ >= 3
-#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
-#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
-#else /* __GNUC__ >= 3 */
-#define RB_LIKELY(x) (x)
-#define RB_UNLIKELY(x) (x)
-#endif /* __GNUC__ >= 3 */
-
-/*
- cold attribute for code layout improvements
- RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros
+/**
+ * @file
+ * @author $Author$
+ * @date Wed May 18 00:21:44 JST 1994
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
*/
-#if defined(__clang__) || GCC_VERSION_SINCE(4, 3, 0)
-#define COLDFUNC __attribute__((cold))
-#else
-#define COLDFUNC
-#endif
-#ifdef __GNUC__
-#if defined __MINGW_PRINTF_FORMAT
-#define PRINTF_ARGS(decl, string_index, first_to_check) \
- decl __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, first_to_check)))
-#else
-#define PRINTF_ARGS(decl, string_index, first_to_check) \
- decl __attribute__((format(printf, string_index, first_to_check)))
-#endif
-#else
-#define PRINTF_ARGS(decl, string_index, first_to_check) decl
-#endif
-
-#ifdef __GNUC__
-#define RB_GNUC_EXTENSION __extension__
-#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
-#else
-#define RB_GNUC_EXTENSION
-#define RB_GNUC_EXTENSION_BLOCK(x) (x)
-#endif
+#include "ruby/internal/config.h"
/* AC_INCLUDES_DEFAULT */
#include <stdio.h>
+
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
+
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
+
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
@@ -138,24 +31,30 @@ extern "C" {
# include <stdlib.h>
# endif
#endif
+
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
+
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
+
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
+
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+
#ifdef HAVE_STDALIGN_H
# include <stdalign.h>
#endif
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -165,376 +64,53 @@ extern "C" {
#endif
#ifdef RUBY_USE_SETJMPEX
-#include <setjmpex.h>
-#endif
-
+# include <setjmpex.h>
+#endif
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/xmalloc.h"
+#include "ruby/backward/2/assume.h"
+#include "ruby/backward/2/attributes.h"
+#include "ruby/backward/2/bool.h"
+#include "ruby/backward/2/long_long.h"
+#include "ruby/backward/2/stdalign.h"
+#include "ruby/backward/2/stdarg.h"
+#include "ruby/internal/dosish.h"
#include "ruby/missing.h"
+/**
+ * Asserts that the compilation unit includes Ruby's CAPI. This has been here
+ * since the very beginning (at least since version 0.49).
+ */
#define RUBY
-#ifdef __cplusplus
-# ifndef HAVE_PROTOTYPES
-# define HAVE_PROTOTYPES 1
-# endif
-# ifndef HAVE_STDARG_PROTOTYPES
-# define HAVE_STDARG_PROTOTYPES 1
-# endif
-#endif
-
-#undef _
-#ifdef HAVE_PROTOTYPES
-# define _(args) args
-#else
-# define _(args) ()
-#endif
-
-#undef __
-#ifdef HAVE_STDARG_PROTOTYPES
-# define __(args) args
-#else
-# define __(args) ()
-#endif
-
-#ifdef __cplusplus
-#define ANYARGS ...
+#ifdef __GNUC__
+# /** This is expanded to nothing for non-GCC compilers. */
+# define RB_GNUC_EXTENSION __extension__
+# /** This is expanded to the passed token for non-GCC compilers. */
+# define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
#else
-#define ANYARGS
-#endif
-
-#ifndef RUBY_SYMBOL_EXPORT_BEGIN
-# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
-# define RUBY_SYMBOL_EXPORT_END /* end */
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
-#define xmalloc ruby_xmalloc
-#define xmalloc2 ruby_xmalloc2
-#define xcalloc ruby_xcalloc
-#define xrealloc ruby_xrealloc
-#define xrealloc2 ruby_xrealloc2
-#define xfree ruby_xfree
-
-#if GCC_VERSION_SINCE(4,3,0)
-# define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((alloc_size params))
-#elif defined(__has_attribute)
-# if __has_attribute(alloc_size)
-# define RUBY_ATTR_ALLOC_SIZE(params) __attribute__((__alloc_size__ params))
-# endif
-#endif
-#ifndef RUBY_ATTR_ALLOC_SIZE
-# define RUBY_ATTR_ALLOC_SIZE(params)
-#endif
-
-#ifdef __has_attribute
-# if __has_attribute(malloc)
-# define RUBY_ATTR_MALLOC __attribute__((__malloc__))
-# endif
-#endif
-#ifndef RUBY_ATTR_MALLOC
-# define RUBY_ATTR_MALLOC
-#endif
-
-#ifdef __has_attribute
-# if __has_attribute(returns_nonnull)
-# define RUBY_ATTR_RETURNS_NONNULL __attribute__((__returns_nonnull__))
-# endif
-#endif
-#ifndef RUBY_ATTR_RETURNS_NONNULL
-# define RUBY_ATTR_RETURNS_NONNULL
-#endif
-
-void *ruby_xmalloc(size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1));
-void *ruby_xmalloc2(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
-void *ruby_xcalloc(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
-void *ruby_xrealloc(void*,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
-void *ruby_xrealloc2(void*,size_t,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2,3));
-void ruby_xfree(void*);
-
-#ifndef USE_GC_MALLOC_OBJ_INFO_DETAILS
-#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
-#endif
-
-#if USE_GC_MALLOC_OBJ_INFO_DETAILS
-
-void *ruby_xmalloc_body(size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1));
-void *ruby_xmalloc2_body(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
-void *ruby_xcalloc_body(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
-void *ruby_xrealloc_body(void*,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
-void *ruby_xrealloc2_body(void*,size_t,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2,3));
-
-#define ruby_xmalloc(s1) ruby_xmalloc_with_location(s1, __FILE__, __LINE__)
-#define ruby_xmalloc2(s1, s2) ruby_xmalloc2_with_location(s1, s2, __FILE__, __LINE__)
-#define ruby_xcalloc(s1, s2) ruby_xcalloc_with_location(s1, s2, __FILE__, __LINE__)
-#define ruby_xrealloc(ptr, s1) ruby_xrealloc_with_location(ptr, s1, __FILE__, __LINE__)
-#define ruby_xrealloc2(ptr, s1, s2) ruby_xrealloc2_with_location(ptr, s1, s2, __FILE__, __LINE__)
-
-extern const char *ruby_malloc_info_file;
-extern int ruby_malloc_info_line;
-
-static inline void *
-ruby_xmalloc_with_location(size_t s, const char *file, int line)
-{
- void *ptr;
- ruby_malloc_info_file = file;
- ruby_malloc_info_line = line;
- ptr = ruby_xmalloc_body(s);
- ruby_malloc_info_file = NULL;
- return ptr;
-}
-
-static inline void *
-ruby_xmalloc2_with_location(size_t s1, size_t s2, const char *file, int line)
-{
- void *ptr;
- ruby_malloc_info_file = file;
- ruby_malloc_info_line = line;
- ptr = ruby_xmalloc2_body(s1, s2);
- ruby_malloc_info_file = NULL;
- return ptr;
-}
-
-static inline void *
-ruby_xcalloc_with_location(size_t s1, size_t s2, const char *file, int line)
-{
- void *ptr;
- ruby_malloc_info_file = file;
- ruby_malloc_info_line = line;
- ptr = ruby_xcalloc_body(s1, s2);
- ruby_malloc_info_file = NULL;
- return ptr;
-}
-
-static inline void *
-ruby_xrealloc_with_location(void *ptr, size_t s, const char *file, int line)
-{
- void *rptr;
- ruby_malloc_info_file = file;
- ruby_malloc_info_line = line;
- rptr = ruby_xrealloc_body(ptr, s);
- ruby_malloc_info_file = NULL;
- return rptr;
-}
-
-static inline void *
-ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file, int line)
-{
- void *rptr;
- ruby_malloc_info_file = file;
- ruby_malloc_info_line = line;
- rptr = ruby_xrealloc2_body(ptr, s1, s2);
- ruby_malloc_info_file = NULL;
- return rptr;
-}
+# define RB_GNUC_EXTENSION
+# define RB_GNUC_EXTENSION_BLOCK(x) (x)
#endif
-#define STRINGIZE(expr) STRINGIZE0(expr)
-#ifndef STRINGIZE0
-#define STRINGIZE0(expr) #expr
-#endif
-
-#ifdef HAVE_LONG_LONG
-# define HAVE_TRUE_LONG_LONG 1
-#endif
-
-#if SIZEOF_LONG_LONG > 0
-# define LONG_LONG long long
-#elif SIZEOF___INT64 > 0
-# define HAVE_LONG_LONG 1
-# define LONG_LONG __int64
-# undef SIZEOF_LONG_LONG
-# define SIZEOF_LONG_LONG SIZEOF___INT64
-#endif
-
-#ifdef __CYGWIN__
-#undef _WIN32
-#endif
-
-#if defined(_WIN32)
-/*
- DOSISH mean MS-Windows style filesystem.
- But you should use more precise macros like DOSISH_DRIVE_LETTER, PATH_SEP,
- ENV_IGNORECASE or CASEFOLD_FILESYSTEM.
- */
-#define DOSISH 1
-# define DOSISH_DRIVE_LETTER
-#endif
-
-#ifdef AC_APPLE_UNIVERSAL_BUILD
-#undef WORDS_BIGENDIAN
-#ifdef __BIG_ENDIAN__
-#define WORDS_BIGENDIAN
-#endif
-#endif
-
-#ifdef _WIN32
-#include "ruby/win32.h"
-#endif
-
-#ifdef RUBY_EXPORT
-#undef RUBY_EXTERN
-
-#ifndef FALSE
-# define FALSE 0
-#elif FALSE
-# error FALSE must be false
-#endif
-#ifndef TRUE
-# define TRUE 1
-#elif !TRUE
-# error TRUE must be true
-#endif
-
-#endif
-
-#ifndef RUBY_FUNC_EXPORTED
-#define RUBY_FUNC_EXPORTED
-#endif
-
-/* These macros are used for functions which are exported only for MJIT
- and NOT ensured to be exported in future versions. */
-#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
-#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
-#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
-
-#if defined(MJIT_HEADER) && defined(_MSC_VER)
-# undef MJIT_FUNC_EXPORTED
-# define MJIT_FUNC_EXPORTED static
-#endif
-
-#ifndef RUBY_EXTERN
-#define RUBY_EXTERN extern
-#endif
-
-#ifndef EXTERN
-# if defined __GNUC__
-# define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \
- RUBY_EXTERN
-# elif defined _MSC_VER
-# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
- "EXTERN is deprecated, use RUBY_EXTERN instead")); \
- RUBY_EXTERN
-# else
-# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
-# endif
-#endif
+/** @cond INTERNAL_MACRO */
+/* :FIXME: Can someone tell us why is this macro defined here? @shyouhei
+ * thinks this is a truly internal macro but cannot move around because he
+ * doesn't understand the reason of this arrangement. */
#ifndef RUBY_MBCHAR_MAXSIZE
-#define RUBY_MBCHAR_MAXSIZE INT_MAX
- /* MB_CUR_MAX will not work well in C locale */
+# define RUBY_MBCHAR_MAXSIZE INT_MAX
+# /* MB_CUR_MAX will not work well in C locale */
#endif
#if defined(__sparc)
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_sparc_flush_register_windows(void);
-# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
-#else
-# define FLUSH_REGISTER_WINDOWS ((void)0)
-#endif
-
-#if defined(DOSISH)
-#define PATH_SEP ";"
-#else
-#define PATH_SEP ":"
-#endif
-#define PATH_SEP_CHAR PATH_SEP[0]
-
-#define PATH_ENV "PATH"
-
-#if defined(DOSISH)
-#define ENV_IGNORECASE
-#endif
-
-#ifndef CASEFOLD_FILESYSTEM
-# if defined DOSISH
-# define CASEFOLD_FILESYSTEM 1
-# else
-# define CASEFOLD_FILESYSTEM 0
-# endif
-#endif
-
-#ifndef DLEXT_MAXLEN
-#define DLEXT_MAXLEN 4
-#endif
-
-#ifndef RUBY_PLATFORM
-#define RUBY_PLATFORM "unknown-unknown"
-#endif
-
-#ifndef FUNC_MINIMIZED
-#define FUNC_MINIMIZED(x) x
-#endif
-#ifndef FUNC_UNOPTIMIZED
-#define FUNC_UNOPTIMIZED(x) x
-#endif
-#ifndef RUBY_ALIAS_FUNCTION_TYPE
-#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \
- FUNC_MINIMIZED(type prot) {return (type)name args;}
-#endif
-#ifndef RUBY_ALIAS_FUNCTION_VOID
-#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \
- FUNC_MINIMIZED(void prot) {name args;}
-#endif
-#ifndef RUBY_ALIAS_FUNCTION
-#define RUBY_ALIAS_FUNCTION(prot, name, args) \
- RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
-#endif
-#ifndef RUBY_FUNC_NONNULL
-#define RUBY_FUNC_NONNULL(n, x) x
-#endif
-
-#ifndef UNALIGNED_WORD_ACCESS
-# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
- defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
- defined(__powerpc64__) || \
- defined(__mc68020__)
-# define UNALIGNED_WORD_ACCESS 1
-# else
-# define UNALIGNED_WORD_ACCESS 0
-# endif
-#endif
-#ifndef PACKED_STRUCT
-# define PACKED_STRUCT(x) x
-#endif
-#ifndef PACKED_STRUCT_UNALIGNED
-# if UNALIGNED_WORD_ACCESS
-# define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
-# else
-# define PACKED_STRUCT_UNALIGNED(x) x
-# endif
-#endif
-
-#ifndef RUBY_ALIGNAS
-#define RUBY_ALIGNAS(x) /* x */
-#endif
-
-#ifdef RUBY_ALIGNOF
-/* OK, take that definition */
-#elif defined(__cplusplus) && (__cplusplus >= 201103L)
-#define RUBY_ALIGNOF alignof
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-#define RUBY_ALIGNOF _Alignof
-#else
-#define RUBY_ALIGNOF(type) ((size_t)offsetof(struct { char f1; type f2; }, f2))
-#endif
-
-#define NORETURN_STYLE_NEW 1
-#ifdef NORETURN
-/* OK, take that definition */
-#elif defined(__cplusplus) && (__cplusplus >= 201103L)
-#define NORETURN(x) [[ noreturn ]] x
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-#define NORETURN(x) _Noreturn x
+RBIMPL_SYMBOL_EXPORT_END()
+# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
#else
-#define NORETURN(x) x
+# define FLUSH_REGISTER_WINDOWS ((void)0)
#endif
-
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
-
+/** @endcond */
#endif /* RUBY_DEFINES_H */
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 93939ee7db..1256393701 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -1,429 +1,31 @@
-/**********************************************************************
-
- encoding.h -
-
- $Author: matz $
- created at: Thu May 24 11:49:41 JST 2007
-
- Copyright (C) 2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_ENCODING_H
+#ifndef RUBY_ENCODING_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_ENCODING_H 1
-
-#ifdef RUBY_INTERNAL_H
-#error "Include this file before internal.h"
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#include <stdarg.h>
+/**
+ * @file
+ * @author $Author: matz $
+ * @date Thu May 24 11:49:41 JST 2007
+ * @copyright Copyright (C) 2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Encoding relates APIs.
+ *
+ * These APIs are mainly for implementing encodings themselves. Encodings are
+ * built on top of Ruby's core CAPIs. Though not prohibited, there can be
+ * relatively less rooms for things in this header file be useful when writing
+ * an extension library.
+ */
#include "ruby/ruby.h"
-#include "ruby/oniguruma.h"
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
-enum ruby_encoding_consts {
- RUBY_ENCODING_INLINE_MAX = 127,
- RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
- RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
- /* RUBY_FL_USER10..RUBY_FL_USER16 */),
- RUBY_ENCODING_MAXNAMELEN = 42
-};
-
-#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX
-#define ENCODING_SHIFT RUBY_ENCODING_SHIFT
-#define ENCODING_MASK RUBY_ENCODING_MASK
-
-#define RB_ENCODING_SET_INLINED(obj,i) do {\
- RBASIC(obj)->flags &= ~RUBY_ENCODING_MASK;\
- RBASIC(obj)->flags |= (VALUE)(i) << RUBY_ENCODING_SHIFT;\
-} while (0)
-#define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i))
-
-#define RB_ENCODING_GET_INLINED(obj) \
- (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT)
-#define RB_ENCODING_GET(obj) \
- (RB_ENCODING_GET_INLINED(obj) != RUBY_ENCODING_INLINE_MAX ? \
- RB_ENCODING_GET_INLINED(obj) : \
- rb_enc_get_index(obj))
-
-#define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0)
-
-#define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i)
-#define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i)
-#define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj)
-#define ENCODING_GET(obj) RB_ENCODING_GET(obj)
-#define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj)
-#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN
-
-enum ruby_coderange_type {
- RUBY_ENC_CODERANGE_UNKNOWN = 0,
- RUBY_ENC_CODERANGE_7BIT = ((int)RUBY_FL_USER8),
- RUBY_ENC_CODERANGE_VALID = ((int)RUBY_FL_USER9),
- RUBY_ENC_CODERANGE_BROKEN = ((int)(RUBY_FL_USER8|RUBY_FL_USER9)),
- RUBY_ENC_CODERANGE_MASK = (RUBY_ENC_CODERANGE_7BIT|
- RUBY_ENC_CODERANGE_VALID|
- RUBY_ENC_CODERANGE_BROKEN)
-};
-
-static inline int
-rb_enc_coderange_clean_p(int cr)
-{
- return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT;
-}
-#define RB_ENC_CODERANGE_CLEAN_P(cr) rb_enc_coderange_clean_p(cr)
-#define RB_ENC_CODERANGE(obj) ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK)
-#define RB_ENC_CODERANGE_ASCIIONLY(obj) (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT)
-#define RB_ENC_CODERANGE_SET(obj,cr) (\
- RBASIC(obj)->flags = \
- (RBASIC(obj)->flags & ~RUBY_ENC_CODERANGE_MASK) | (cr))
-#define RB_ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_SET((obj),0)
-
-/* assumed ASCII compatibility */
-#define RB_ENC_CODERANGE_AND(a, b) \
- ((a) == RUBY_ENC_CODERANGE_7BIT ? (b) : \
- (a) != RUBY_ENC_CODERANGE_VALID ? RUBY_ENC_CODERANGE_UNKNOWN : \
- (b) == RUBY_ENC_CODERANGE_7BIT ? RUBY_ENC_CODERANGE_VALID : (b))
-
-#define RB_ENCODING_CODERANGE_SET(obj, encindex, cr) \
- do { \
- VALUE rb_encoding_coderange_obj = (obj); \
- RB_ENCODING_SET(rb_encoding_coderange_obj, (encindex)); \
- RB_ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); \
- } while (0)
-
-#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK
-#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN
-#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT
-#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID
-#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN
-#define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr)
-#define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj)
-#define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj)
-#define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr)
-#define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj)
-#define ENC_CODERANGE_AND(a, b) RB_ENC_CODERANGE_AND(a, b)
-#define ENCODING_CODERANGE_SET(obj, encindex, cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr)
-
-typedef const OnigEncodingType rb_encoding;
-
-int rb_char_to_option_kcode(int c, int *option, int *kcode);
-
-int rb_enc_replicate(const char *, rb_encoding *);
-int rb_define_dummy_encoding(const char *);
-PUREFUNC(int rb_enc_dummy_p(rb_encoding *enc));
-PUREFUNC(int rb_enc_to_index(rb_encoding *enc));
-int rb_enc_get_index(VALUE obj);
-void rb_enc_set_index(VALUE obj, int encindex);
-int rb_enc_capable(VALUE obj);
-int rb_enc_find_index(const char *name);
-int rb_enc_alias(const char *alias, const char *orig);
-int rb_to_encoding_index(VALUE);
-rb_encoding *rb_to_encoding(VALUE);
-rb_encoding *rb_find_encoding(VALUE);
-rb_encoding *rb_enc_get(VALUE);
-rb_encoding *rb_enc_compatible(VALUE,VALUE);
-rb_encoding *rb_enc_check(VALUE,VALUE);
-VALUE rb_enc_associate_index(VALUE, int);
-VALUE rb_enc_associate(VALUE, rb_encoding*);
-void rb_enc_copy(VALUE dst, VALUE src);
-
-VALUE rb_enc_str_new(const char*, long, rb_encoding*);
-VALUE rb_enc_str_new_cstr(const char*, rb_encoding*);
-VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
-VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
-PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
-VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
-long rb_enc_strlen(const char*, const char*, rb_encoding*);
-char* rb_enc_nth(const char*, const char*, long, rb_encoding*);
-VALUE rb_obj_encoding(VALUE);
-VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
-VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
-
-VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *);
-VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
-VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
-VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
-
-#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
-#define rb_enc_str_new(str, len, enc) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
- rb_enc_str_new_static((str), (len), (enc)) : \
- rb_enc_str_new((str), (len), (enc)) \
-)
-#define rb_enc_str_new_cstr(str, enc) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_enc_str_new_static((str), (long)strlen(str), (enc)) : \
- rb_enc_str_new_cstr((str), (enc)) \
-)
-#endif
-
-PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
-
-/* index -> rb_encoding */
-rb_encoding *rb_enc_from_index(int idx);
-
-/* name -> rb_encoding */
-rb_encoding *rb_enc_find(const char *name);
-
-/* rb_encoding * -> name */
-#define rb_enc_name(enc) (enc)->name
-
-/* rb_encoding * -> minlen/maxlen */
-#define rb_enc_mbminlen(enc) (enc)->min_enc_len
-#define rb_enc_mbmaxlen(enc) (enc)->max_enc_len
-
-/* -> mbclen (no error notification: 0 < ret <= e-p, no exception) */
-int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
-
-/* -> mbclen (only for valid encoding) */
-int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc);
-
-/* -> chlen, invalid or needmore */
-int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
-#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
-#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
-#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
-#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
-#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
-
-/* -> 0x00..0x7f, -1 */
-int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
-
-
-/* -> code (and len) or raise exception */
-unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc);
-
-/* prototype for obsolete function */
-unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc);
-/* overriding macro */
-#define rb_enc_codepoint(p,e,enc) rb_enc_codepoint_len((p),(e),0,(enc))
-#define rb_enc_mbc_to_codepoint(p, e, enc) ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e))
-
-/* -> codelen>0 or raise exception */
-int rb_enc_codelen(int code, rb_encoding *enc);
-/* -> 0 for invalid codepoint */
-int rb_enc_code_to_mbclen(int code, rb_encoding *enc);
-#define rb_enc_code_to_mbclen(c, enc) ONIGENC_CODE_TO_MBCLEN((enc), (c));
-
-/* code,ptr,encoding -> write buf */
-#define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf))
-
-/* start, ptr, end, encoding -> prev_char */
-#define rb_enc_prev_char(s,p,e,enc) ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
-/* start, ptr, end, encoding -> next_char */
-#define rb_enc_left_char_head(s,p,e,enc) ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
-#define rb_enc_right_char_head(s,p,e,enc) ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
-#define rb_enc_step_back(s,p,e,n,enc) ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n)))
-
-/* ptr, ptr, encoding -> newline_or_not */
-#define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end))
-
-#define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE((enc),(c),(t))
-#define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c)
-#define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA((enc),(c))
-#define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER((enc),(c))
-#define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER((enc),(c))
-#define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT((enc),(c))
-#define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM((enc),(c))
-#define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT((enc),(c))
-#define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c))
-#define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c))
-
-static inline int
-rb_enc_asciicompat_inline(rb_encoding *enc)
-{
- return rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc);
-}
-#define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc)
-
-int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc);
-CONSTFUNC(int rb_enc_toupper(int c, rb_encoding *enc));
-CONSTFUNC(int rb_enc_tolower(int c, rb_encoding *enc));
-ID rb_intern3(const char*, long, rb_encoding*);
-ID rb_interned_id_p(const char *, long, rb_encoding *);
-int rb_enc_symname_p(const char*, rb_encoding*);
-int rb_enc_symname2_p(const char*, long, rb_encoding*);
-int rb_enc_str_coderange(VALUE);
-long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*);
-int rb_enc_str_asciionly_p(VALUE);
-#define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str))
-VALUE rb_enc_from_encoding(rb_encoding *enc);
-PUREFUNC(int rb_enc_unicode_p(rb_encoding *enc));
-rb_encoding *rb_ascii8bit_encoding(void);
-rb_encoding *rb_utf8_encoding(void);
-rb_encoding *rb_usascii_encoding(void);
-rb_encoding *rb_locale_encoding(void);
-rb_encoding *rb_filesystem_encoding(void);
-rb_encoding *rb_default_external_encoding(void);
-rb_encoding *rb_default_internal_encoding(void);
-#ifndef rb_ascii8bit_encindex
-CONSTFUNC(int rb_ascii8bit_encindex(void));
-#endif
-#ifndef rb_utf8_encindex
-CONSTFUNC(int rb_utf8_encindex(void));
-#endif
-#ifndef rb_usascii_encindex
-CONSTFUNC(int rb_usascii_encindex(void));
-#endif
-int rb_locale_encindex(void);
-int rb_filesystem_encindex(void);
-VALUE rb_enc_default_external(void);
-VALUE rb_enc_default_internal(void);
-void rb_enc_set_default_external(VALUE encoding);
-void rb_enc_set_default_internal(VALUE encoding);
-VALUE rb_locale_charmap(VALUE klass);
-long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
-char *rb_enc_path_next(const char *,const char *,rb_encoding*);
-char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*);
-char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*);
-char *rb_enc_path_end(const char *,const char *,rb_encoding*);
-const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
-const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
-ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
-VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
-
-RUBY_EXTERN VALUE rb_cEncoding;
-
-/* econv stuff */
-
-typedef enum {
- econv_invalid_byte_sequence,
- econv_undefined_conversion,
- econv_destination_buffer_full,
- econv_source_buffer_empty,
- econv_finished,
- econv_after_output,
- econv_incomplete_input
-} rb_econv_result_t;
-
-typedef struct rb_econv_t rb_econv_t;
-
-VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
-int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
-
-int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
-int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
-
-rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags);
-rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
-
-rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
- const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
- unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
- int flags);
-void rb_econv_close(rb_econv_t *ec);
-
-/* result: 0:success -1:failure */
-int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname);
-
-/* result: 0:success -1:failure */
-int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name);
-int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name);
-
-VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
-
-/* result: 0:success -1:failure */
-int rb_econv_insert_output(rb_econv_t *ec,
- const unsigned char *str, size_t len, const char *str_encoding);
-
-/* encoding that rb_econv_insert_output doesn't need conversion */
-const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec);
-
-/* raise an error if the last rb_econv_convert is error */
-void rb_econv_check_error(rb_econv_t *ec);
-
-/* returns an exception object or nil */
-VALUE rb_econv_make_exception(rb_econv_t *ec);
-
-int rb_econv_putbackable(rb_econv_t *ec);
-void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
-
-/* returns the corresponding ASCII compatible encoding for encname,
- * or NULL if encname is not ASCII incompatible encoding. */
-const char *rb_econv_asciicompat_encoding(const char *encname);
-
-VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
-VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
-VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
-VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
-VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
-
-void rb_econv_binmode(rb_econv_t *ec);
-
-enum ruby_econv_flag_type {
-/* flags for rb_econv_open */
- RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff,
-
- RUBY_ECONV_INVALID_MASK = 0x0000000f,
- RUBY_ECONV_INVALID_REPLACE = 0x00000002,
-
- RUBY_ECONV_UNDEF_MASK = 0x000000f0,
- RUBY_ECONV_UNDEF_REPLACE = 0x00000020,
- RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030,
-
- RUBY_ECONV_DECORATOR_MASK = 0x0000ff00,
- RUBY_ECONV_NEWLINE_DECORATOR_MASK = 0x00003f00,
- RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK = 0x00000f00,
- RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK = 0x00003000,
-
- RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR = 0x00000100,
- RUBY_ECONV_CRLF_NEWLINE_DECORATOR = 0x00001000,
- RUBY_ECONV_CR_NEWLINE_DECORATOR = 0x00002000,
- RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000,
- RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR = 0x00008000,
-
- RUBY_ECONV_STATEFUL_DECORATOR_MASK = 0x00f00000,
- RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR = 0x00100000,
-
- RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR =
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
- RUBY_ECONV_CRLF_NEWLINE_DECORATOR,
-#else
- 0,
-#endif
-#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK
-#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK
-#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE
-#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK
-#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE
-#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF
-#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK
-#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK
-#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
-#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
-#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
-#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR
-#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR
-#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR
-#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
-#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK
-#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
-#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
-/* end of flags for rb_econv_open */
-
-/* flags for rb_econv_convert */
- RUBY_ECONV_PARTIAL_INPUT = 0x00010000,
- RUBY_ECONV_AFTER_OUTPUT = 0x00020000,
-#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT
-#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT
-/* end of flags for rb_econv_convert */
-RUBY_ECONV_FLAGS_PLACEHOLDER};
-
-RUBY_SYMBOL_EXPORT_END
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+#include "ruby/internal/encoding/coderange.h"
+#include "ruby/internal/encoding/ctype.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/encoding/pathname.h"
+#include "ruby/internal/encoding/re.h"
+#include "ruby/internal/encoding/sprintf.h"
+#include "ruby/internal/encoding/string.h"
+#include "ruby/internal/encoding/symbol.h"
+#include "ruby/internal/encoding/transcode.h"
#endif /* RUBY_ENCODING_H */
diff --git a/include/ruby/fiber/scheduler.h b/include/ruby/fiber/scheduler.h
new file mode 100644
index 0000000000..250b39b6df
--- /dev/null
+++ b/include/ruby/fiber/scheduler.h
@@ -0,0 +1,374 @@
+#ifndef RUBY_FIBER_SCHEDULER_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_FIBER_SCHEDULER_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Scheduler APIs.
+ */
+#include "ruby/internal/config.h"
+
+#include <errno.h>
+
+#ifdef STDC_HEADERS
+#include <stddef.h> /* size_t */
+#endif
+
+#include "ruby/ruby.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/arithmetic.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+#define RUBY_FIBER_SCHEDULER_VERSION 2
+
+struct timeval;
+
+/**
+ * Wrap a `ssize_t` and `int errno` into a single `VALUE`. This interface should
+ * be used to safely capture results from system calls like `read` and `write`.
+ *
+ * You should use `rb_fiber_scheduler_io_result_apply` to unpack the result of
+ * this value and update `int errno`.
+ *
+ * You should not directly try to interpret the result value as it is considered
+ * an opaque representation. However, the general representation is an integer
+ * in the range of `[-int errno, size_t size]`. Linux generally restricts the
+ * result of system calls like `read` and `write` to `<= 2^31` which means this
+ * will typically fit within a single FIXNUM.
+ *
+ * @param[in] result The result of the system call.
+ * @param[in] error The value of `errno`.
+ * @return A `VALUE` which contains the result and/or errno.
+ */
+static inline VALUE
+rb_fiber_scheduler_io_result(ssize_t result, int error)
+{
+ if (result == -1) {
+ return RB_INT2NUM(-error);
+ }
+ else {
+ return RB_SIZE2NUM(result);
+ }
+}
+
+/**
+ * Apply an io result to the local thread, returning the value of the original
+ * system call that created it and updating `int errno`.
+ *
+ * You should not directly try to interpret the result value as it is considered
+ * an opaque representation.
+ *
+ * @param[in] result The `VALUE` which contains an errno and/or result size.
+ * @post Updates `int errno` with the value if negative.
+ * @return The original result of the system call.
+ */
+static inline ssize_t
+rb_fiber_scheduler_io_result_apply(VALUE result)
+{
+ if (RB_FIXNUM_P(result) && RB_NUM2INT(result) < 0) {
+ errno = -RB_NUM2INT(result);
+ return -1;
+ }
+ else {
+ return RB_NUM2SIZE(result);
+ }
+}
+
+/**
+ * Queries the current scheduler of the current thread that is calling this
+ * function.
+ *
+ * @retval RUBY_Qnil No scheduler has been set so far to this thread (which
+ * is the default).
+ * @retval otherwise The scheduler that was last set for the current thread
+ * with rb_fiber_scheduler_set().
+ */
+VALUE rb_fiber_scheduler_get(void);
+
+/**
+ * Destructively assigns the passed scheduler to that of the current thread
+ * that is calling this function. If the scheduler is set, non-blocking fibers
+ * (created by `Fiber.new` with `blocking: false`, or by `Fiber.schedule`) call
+ * that scheduler's hook methods on potentially blocking operations, and the
+ * current thread will call scheduler's `#close` method on finalisation
+ * (allowing the scheduler to properly manage all non-finished fibers).
+ * `scheduler` can be an object of any class corresponding to
+ * `Fiber::SchedulerInterface`. Its implementation is up to the user.
+ *
+ * @param[in] scheduler The scheduler to set.
+ * @exception rb_eArgError `scheduler` does not conform the interface.
+ * @post Current thread's scheduler is `scheduler`.
+ */
+VALUE rb_fiber_scheduler_set(VALUE scheduler);
+
+/**
+ * Identical to rb_fiber_scheduler_get(), except it also returns ::RUBY_Qnil in
+ * case of a blocking fiber. As blocking fibers do not participate schedulers'
+ * scheduling this function can be handy.
+ *
+ * @retval RUBY_Qnil No scheduler is in effect.
+ * @retval otherwise The scheduler that is in effect, if any.
+ */
+VALUE rb_fiber_scheduler_current(void);
+
+/**
+ * Identical to rb_fiber_scheduler_current(), except it queries for that of the
+ * passed thread instead of the implicit current one.
+ *
+ * @param[in] thread Target thread.
+ * @exception rb_eTypeError `thread` is not a thread.
+ * @retval RUBY_Qnil No scheduler is in effect in `thread`.
+ * @retval otherwise The scheduler that is in effect in `thread`.
+ */
+VALUE rb_fiber_scheduler_current_for_thread(VALUE thread);
+
+/**
+ * Converts the passed timeout to an expression that rb_fiber_scheduler_block()
+ * etc. expects.
+ *
+ * @param[in] timeout A duration (can be `NULL`).
+ * @retval RUBY_Qnil No timeout (blocks indefinitely).
+ * @retval otherwise A timeout object.
+ */
+VALUE rb_fiber_scheduler_make_timeout(struct timeval *timeout);
+
+/**
+ * Closes the passed scheduler object. This expects the scheduler to wait for
+ * all fibers. Thus the scheduler's main loop tends to start here.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @return What `scheduler.close` returns.
+ */
+VALUE rb_fiber_scheduler_close(VALUE scheduler);
+
+/**
+ * Non-blocking `sleep`. Depending on scheduler implementation, this for
+ * instance switches to another fiber etc.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] duration Passed as-is to `scheduler.kernel_sleep`.
+ * @return What `scheduler.kernel_sleep` returns.
+ */
+VALUE rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE duration);
+
+/**
+ * Identical to rb_fiber_scheduler_kernel_sleep(), except it can pass multiple
+ * arguments.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed as-is to `scheduler.kernel_sleep`
+ * @return What `scheduler.kernel_sleep` returns.
+ */
+VALUE rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv);
+
+/* Description TBW */
+#if 0
+VALUE rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message);
+VALUE rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv);
+int rb_fiber_scheduler_supports_process_wait(VALUE scheduler);
+#endif
+
+/**
+ * Non-blocking `waitpid`. Depending on scheduler implementation, this for
+ * instance switches to another fiber etc.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] pid Process ID to wait.
+ * @param[in] flags Wait flags, e.g. `WUNTRACED`.
+ * @return What `scheduler.process_wait` returns.
+ */
+VALUE rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags);
+
+/**
+ * Non-blocking wait for the passed "blocker", which is for instance
+ * `Thread.join` or `Mutex.lock`. Depending on scheduler implementation, this
+ * for instance switches to another fiber etc.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] blocker What blocks the current fiber.
+ * @param[in] timeout Numeric timeout.
+ * @return What `scheduler.block` returns.
+ */
+VALUE rb_fiber_scheduler_block(VALUE scheduler, VALUE blocker, VALUE timeout);
+
+/**
+ * Wakes up a fiber previously blocked using rb_fiber_scheduler_block().
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] blocker What was awaited for.
+ * @param[in] fiber What to unblock.
+ * @return What `scheduler.unblock` returns.
+ */
+VALUE rb_fiber_scheduler_unblock(VALUE scheduler, VALUE blocker, VALUE fiber);
+
+/**
+ * Non-blocking version of rb_io_wait(). Depending on scheduler
+ * implementation, this for instance switches to another fiber etc.
+ *
+ * The "events" here is a Ruby level integer, which is an OR-ed value of
+ * `IO::READABLE`, `IO::WRITABLE`, and `IO::PRIORITY`.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] io An io object to wait.
+ * @param[in] events An integer set of interests.
+ * @param[in] timeout Numeric timeout.
+ * @return What `scheduler.io_wait` returns.
+ */
+VALUE rb_fiber_scheduler_io_wait(VALUE scheduler, VALUE io, VALUE events, VALUE timeout);
+
+/**
+ * Non-blocking wait until the passed IO is ready for reading. This is a
+ * special case of rb_fiber_scheduler_io_wait(), where the interest is
+ * `IO::READABLE` and timeout is never.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] io An io object to wait.
+ * @return What `scheduler.io_wait` returns.
+ */
+VALUE rb_fiber_scheduler_io_wait_readable(VALUE scheduler, VALUE io);
+
+/**
+ * Non-blocking wait until the passed IO is ready for writing. This is a
+ * special case of rb_fiber_scheduler_io_wait(), where the interest is
+ * `IO::WRITABLE` and timeout is never.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] io An io object to wait.
+ * @return What `scheduler.io_wait` returns.
+ */
+VALUE rb_fiber_scheduler_io_wait_writable(VALUE scheduler, VALUE io);
+
+/**
+ * Non-blocking version of `IO.select`.
+ *
+ * It's possible that this will be emulated using a thread, so you should not
+ * rely on it for high performance.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] readables An array of readable objects.
+ * @param[in] writables An array of writable objects.
+ * @param[in] exceptables An array of objects that might encounter exceptional conditions.
+ * @param[in] timeout Numeric timeout or nil.
+ * @return What `scheduler.io_select` returns, normally a 3-tuple of arrays of ready objects.
+ */
+VALUE rb_fiber_scheduler_io_select(VALUE scheduler, VALUE readables, VALUE writables, VALUE exceptables, VALUE timeout);
+
+/**
+ * Non-blocking version of `IO.select`, `argv` variant.
+ */
+VALUE rb_fiber_scheduler_io_selectv(VALUE scheduler, int argc, VALUE *argv);
+
+/**
+ * Non-blocking read from the passed IO.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to read from.
+ * @param[out] buffer Return buffer.
+ * @param[in] length Requested number of bytes to read.
+ * @param[in] offset The offset in the buffer to read to.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
+ * @return otherwise What `scheduler.io_read` returns `[-errno, size]`.
+ */
+VALUE rb_fiber_scheduler_io_read(VALUE scheduler, VALUE io, VALUE buffer, size_t length, size_t offset);
+
+/**
+ * Non-blocking write to the passed IO.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to write to.
+ * @param[in] buffer What to write.
+ * @param[in] length Number of bytes to write.
+ * @param[in] offset The offset in the buffer to write from.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
+ * @return otherwise What `scheduler.io_write` returns `[-errno, size]`.
+ */
+VALUE rb_fiber_scheduler_io_write(VALUE scheduler, VALUE io, VALUE buffer, size_t length, size_t offset);
+
+/**
+ * Non-blocking read from the passed IO at the specified offset.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to read from.
+ * @param[in] from The offset in the given IO to read the data from.
+ * @param[out] buffer The buffer to read the data to.
+ * @param[in] length Requested number of bytes to read.
+ * @param[in] offset The offset in the buffer to read to.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
+ * @return otherwise What `scheduler.io_read` returns.
+ */
+VALUE rb_fiber_scheduler_io_pread(VALUE scheduler, VALUE io, rb_off_t from, VALUE buffer, size_t length, size_t offset);
+
+/**
+ * Non-blocking write to the passed IO at the specified offset.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to write to.
+ * @param[in] from The offset in the given IO to write the data to.
+ * @param[in] buffer The buffer to write the data from.
+ * @param[in] length Number of bytes to write.
+ * @param[in] offset The offset in the buffer to write from.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
+ * @return otherwise What `scheduler.io_write` returns.
+ */
+VALUE rb_fiber_scheduler_io_pwrite(VALUE scheduler, VALUE io, rb_off_t from, VALUE buffer, size_t length, size_t offset);
+
+/**
+ * Non-blocking read from the passed IO using a native buffer.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to read from.
+ * @param[out] buffer Return buffer.
+ * @param[in] size Size of the return buffer.
+ * @param[in] length Requested number of bytes to read.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
+ * @return otherwise What `scheduler.io_read` returns.
+ */
+VALUE rb_fiber_scheduler_io_read_memory(VALUE scheduler, VALUE io, void *buffer, size_t size, size_t length);
+
+/**
+ * Non-blocking write to the passed IO using a native buffer.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[out] io An io object to write to.
+ * @param[in] buffer What to write.
+ * @param[in] size Size of the buffer.
+ * @param[in] length Number of bytes to write.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
+ * @return otherwise What `scheduler.io_write` returns.
+ */
+VALUE rb_fiber_scheduler_io_write_memory(VALUE scheduler, VALUE io, const void *buffer, size_t size, size_t length);
+
+/**
+ * Non-blocking close the given IO.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] io An io object to close.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_close`.
+ * @return otherwise What `scheduler.io_close` returns.
+ */
+VALUE rb_fiber_scheduler_io_close(VALUE scheduler, VALUE io);
+
+/**
+ * Non-blocking DNS lookup.
+ *
+ * @param[in] scheduler Target scheduler.
+ * @param[in] hostname A host name to query.
+ * @retval RUBY_Qundef `scheduler` doesn't have `#address_resolve`.
+ * @return otherwise What `scheduler.address_resolve` returns.
+ */
+VALUE rb_fiber_scheduler_address_resolve(VALUE scheduler, VALUE hostname);
+
+/**
+ * Create and schedule a non-blocking fiber.
+ *
+ */
+VALUE rb_fiber_scheduler_fiber(VALUE scheduler, int argc, VALUE *argv, int kw_splat);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_FIBER_SCHEDULER_H */
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 2f60fb569e..2480e2e703 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -1,1230 +1,64 @@
-/**********************************************************************
-
- intern.h -
-
- $Author$
- created at: Thu Jun 10 14:22:17 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-#ifndef RUBY_INTERN_H
+#ifndef RUBY_INTERN_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_INTERN_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#if !defined(__has_attribute)
-#define __has_attribute(x) 0
-#endif
-
+/**
+ * @file
+ * @author $Author$
+ * @date Thu Jun 10 14:22:17 JST 1993
+ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
+ * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/config.h"
#include "ruby/defines.h"
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
-#endif
-#ifdef HAVE_STDARG_PROTOTYPES
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
#include "ruby/st.h"
-/* On mswin, MJIT header transformation can't be used since cl.exe can't output
- preprocessed output preserving macros. So this `MJIT_STATIC` is needed
- to force non-static function to static on MJIT header to avoid symbol conflict. */
-#ifdef MJIT_HEADER
-# define MJIT_STATIC static
-#else
-# define MJIT_STATIC
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
/*
* Functions and variables that are used by more than one source file of
* the kernel.
*/
-#define UNLIMITED_ARGUMENTS (-1)
-
-/* array.c */
-void rb_mem_clear(VALUE*, long);
-VALUE rb_assoc_new(VALUE, VALUE);
-VALUE rb_check_array_type(VALUE);
-VALUE rb_ary_new(void);
-VALUE rb_ary_new_capa(long capa);
-VALUE rb_ary_new_from_args(long n, ...);
-VALUE rb_ary_new_from_values(long n, const VALUE *elts);
-VALUE rb_ary_tmp_new(long);
-void rb_ary_free(VALUE);
-void rb_ary_modify(VALUE);
-VALUE rb_ary_freeze(VALUE);
-VALUE rb_ary_shared_with_p(VALUE, VALUE);
-VALUE rb_ary_aref(int, const VALUE*, VALUE);
-VALUE rb_ary_subseq(VALUE, long, long);
-void rb_ary_store(VALUE, long, VALUE);
-VALUE rb_ary_dup(VALUE);
-VALUE rb_ary_resurrect(VALUE ary);
-VALUE rb_ary_to_ary(VALUE);
-VALUE rb_ary_to_s(VALUE);
-VALUE rb_ary_cat(VALUE, const VALUE *, long);
-VALUE rb_ary_push(VALUE, VALUE);
-VALUE rb_ary_pop(VALUE);
-VALUE rb_ary_shift(VALUE);
-VALUE rb_ary_unshift(VALUE, VALUE);
-VALUE rb_ary_entry(VALUE, long);
-VALUE rb_ary_each(VALUE);
-VALUE rb_ary_join(VALUE, VALUE);
-VALUE rb_ary_reverse(VALUE);
-VALUE rb_ary_rotate(VALUE, long);
-VALUE rb_ary_sort(VALUE);
-VALUE rb_ary_sort_bang(VALUE);
-VALUE rb_ary_delete(VALUE, VALUE);
-VALUE rb_ary_delete_at(VALUE, long);
-VALUE rb_ary_clear(VALUE);
-VALUE rb_ary_plus(VALUE, VALUE);
-VALUE rb_ary_concat(VALUE, VALUE);
-VALUE rb_ary_assoc(VALUE, VALUE);
-VALUE rb_ary_rassoc(VALUE, VALUE);
-VALUE rb_ary_includes(VALUE, VALUE);
-VALUE rb_ary_cmp(VALUE, VALUE);
-VALUE rb_ary_replace(VALUE copy, VALUE orig);
-VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
-VALUE rb_ary_resize(VALUE ary, long len);
-#define rb_ary_new2 rb_ary_new_capa
-#define rb_ary_new3 rb_ary_new_from_args
-#define rb_ary_new4 rb_ary_new_from_values
-/* bignum.c */
-VALUE rb_big_new(size_t, int);
-int rb_bigzero_p(VALUE x);
-VALUE rb_big_clone(VALUE);
-void rb_big_2comp(VALUE);
-VALUE rb_big_norm(VALUE);
-void rb_big_resize(VALUE big, size_t len);
-VALUE rb_cstr_to_inum(const char*, int, int);
-VALUE rb_str_to_inum(VALUE, int, int);
-VALUE rb_cstr2inum(const char*, int);
-VALUE rb_str2inum(VALUE, int);
-VALUE rb_big2str(VALUE, int);
-long rb_big2long(VALUE);
-#define rb_big2int(x) rb_big2long(x)
-unsigned long rb_big2ulong(VALUE);
-#define rb_big2uint(x) rb_big2ulong(x)
-#if HAVE_LONG_LONG
-LONG_LONG rb_big2ll(VALUE);
-unsigned LONG_LONG rb_big2ull(VALUE);
-#endif /* HAVE_LONG_LONG */
-void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
-VALUE rb_big_unpack(unsigned long *buf, long num_longs);
-int rb_uv_to_utf8(char[6],unsigned long);
-VALUE rb_dbl2big(double);
-double rb_big2dbl(VALUE);
-VALUE rb_big_cmp(VALUE, VALUE);
-VALUE rb_big_eq(VALUE, VALUE);
-VALUE rb_big_eql(VALUE, VALUE);
-VALUE rb_big_plus(VALUE, VALUE);
-VALUE rb_big_minus(VALUE, VALUE);
-VALUE rb_big_mul(VALUE, VALUE);
-VALUE rb_big_div(VALUE, VALUE);
-VALUE rb_big_idiv(VALUE, VALUE);
-VALUE rb_big_modulo(VALUE, VALUE);
-VALUE rb_big_divmod(VALUE, VALUE);
-VALUE rb_big_pow(VALUE, VALUE);
-VALUE rb_big_and(VALUE, VALUE);
-VALUE rb_big_or(VALUE, VALUE);
-VALUE rb_big_xor(VALUE, VALUE);
-VALUE rb_big_lshift(VALUE, VALUE);
-VALUE rb_big_rshift(VALUE, VALUE);
-
-/* For rb_integer_pack and rb_integer_unpack: */
-/* "MS" in MSWORD and MSBYTE means "most significant" */
-/* "LS" in LSWORD and LSBYTE means "least significant" */
-#define INTEGER_PACK_MSWORD_FIRST 0x01
-#define INTEGER_PACK_LSWORD_FIRST 0x02
-#define INTEGER_PACK_MSBYTE_FIRST 0x10
-#define INTEGER_PACK_LSBYTE_FIRST 0x20
-#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
-#define INTEGER_PACK_2COMP 0x80
-#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
-/* For rb_integer_unpack: */
-#define INTEGER_PACK_FORCE_BIGNUM 0x100
-#define INTEGER_PACK_NEGATIVE 0x200
-/* Combinations: */
-#define INTEGER_PACK_LITTLE_ENDIAN \
- (INTEGER_PACK_LSWORD_FIRST | \
- INTEGER_PACK_LSBYTE_FIRST)
-#define INTEGER_PACK_BIG_ENDIAN \
- (INTEGER_PACK_MSWORD_FIRST | \
- INTEGER_PACK_MSBYTE_FIRST)
-int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
-VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
-size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
-size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
-int rb_absint_singlebit_p(VALUE val);
-
-/* rational.c */
-VALUE rb_rational_raw(VALUE, VALUE);
-#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
-#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
-VALUE rb_rational_new(VALUE, VALUE);
-#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
-#define rb_rational_new2(x,y) rb_rational_new((x), (y))
-VALUE rb_Rational(VALUE, VALUE);
-#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
-#define rb_Rational2(x,y) rb_Rational((x), (y))
-VALUE rb_rational_num(VALUE rat);
-VALUE rb_rational_den(VALUE rat);
-VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
-VALUE rb_flt_rationalize(VALUE);
-/* complex.c */
-VALUE rb_complex_raw(VALUE, VALUE);
-#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
-#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
-VALUE rb_complex_new(VALUE, VALUE);
-#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
-#define rb_complex_new2(x,y) rb_complex_new((x), (y))
-VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
-DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg));
-VALUE rb_complex_real(VALUE z);
-VALUE rb_complex_imag(VALUE z);
-VALUE rb_complex_plus(VALUE x, VALUE y);
-VALUE rb_complex_minus(VALUE x, VALUE y);
-VALUE rb_complex_mul(VALUE x, VALUE y);
-VALUE rb_complex_div(VALUE x, VALUE y);
-VALUE rb_complex_uminus(VALUE z);
-VALUE rb_complex_conjugate(VALUE z);
-VALUE rb_complex_abs(VALUE z);
-VALUE rb_complex_arg(VALUE z);
-VALUE rb_complex_pow(VALUE base, VALUE exp);
-VALUE rb_dbl_complex_new(double real, double imag);
-#define rb_complex_add rb_complex_plus
-#define rb_complex_sub rb_complex_minus
-#define rb_complex_nagate rb_complex_uminus
-
-VALUE rb_Complex(VALUE, VALUE);
-#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
-#define rb_Complex2(x,y) rb_Complex((x), (y))
-/* class.c */
-VALUE rb_class_new(VALUE);
-VALUE rb_mod_init_copy(VALUE, VALUE);
-VALUE rb_singleton_class_clone(VALUE);
-void rb_singleton_class_attached(VALUE,VALUE);
-void rb_check_inheritable(VALUE);
-VALUE rb_define_class_id(ID, VALUE);
-VALUE rb_define_class_id_under(VALUE, ID, VALUE);
-VALUE rb_module_new(void);
-VALUE rb_define_module_id(ID);
-VALUE rb_define_module_id_under(VALUE, ID);
-VALUE rb_mod_included_modules(VALUE);
-VALUE rb_mod_include_p(VALUE, VALUE);
-VALUE rb_mod_ancestors(VALUE);
-VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
-VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
-VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
-VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
-VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
-void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
-void rb_undef(VALUE, ID);
-void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
-void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
-void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
-VALUE rb_singleton_class(VALUE);
-/* compar.c */
-int rb_cmpint(VALUE, VALUE, VALUE);
-NORETURN(void rb_cmperr(VALUE, VALUE));
-/* cont.c */
-VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
-VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
-VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
-VALUE rb_fiber_yield(int argc, const VALUE *argv);
-VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
-VALUE rb_fiber_current(void);
-VALUE rb_fiber_alive_p(VALUE);
-/* enum.c */
-VALUE rb_enum_values_pack(int, const VALUE*);
-/* enumerator.c */
-VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
-typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
-VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
-VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
-#ifndef RUBY_EXPORT
-#define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
- rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
-#define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) \
- rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat)
-#endif
-#define SIZED_ENUMERATOR(obj, argc, argv, size_fn) \
- rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \
- (argc), (argv), (size_fn))
-#define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \
- rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), \
- (argc), (argv), (size_fn), (kw_splat))
-#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
- if (!rb_block_given_p()) \
- return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \
- } while (0)
-#define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \
- if (!rb_block_given_p()) \
- return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); \
- } while (0)
-#define RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
-#define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
-typedef struct {
- VALUE begin;
- VALUE end;
- VALUE step;
- int exclude_end;
-} rb_arithmetic_sequence_components_t;
-int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *);
-/* error.c */
-VALUE rb_exc_new(VALUE, const char*, long);
-VALUE rb_exc_new_cstr(VALUE, const char*);
-VALUE rb_exc_new_str(VALUE, VALUE);
-#define rb_exc_new2 rb_exc_new_cstr
-#define rb_exc_new3 rb_exc_new_str
-PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
-PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3);
-PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
-PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3);
-PRINTF_ARGS(NORETURN(void rb_frozen_error_raise(VALUE, const char*, ...)), 2, 3);
-NORETURN(void rb_invalid_str(const char*, const char*));
-NORETURN(void rb_error_frozen(const char*));
-NORETURN(void rb_error_frozen_object(VALUE));
-void rb_error_untrusted(VALUE);
-void rb_check_frozen(VALUE);
-void rb_check_trusted(VALUE);
-#define rb_check_frozen_internal(obj) do { \
- VALUE frozen_obj = (obj); \
- if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \
- rb_error_frozen_object(frozen_obj); \
- } \
- } while (0)
-#ifdef __GNUC__
-#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
-#else
-static inline void
-rb_check_frozen_inline(VALUE obj)
-{
- rb_check_frozen_internal(obj);
-}
-#define rb_check_frozen(obj) rb_check_frozen_inline(obj)
-static inline void
-rb_check_trusted_inline(VALUE obj)
-{
- rb_check_trusted(obj);
-}
-#define rb_check_trusted(obj) rb_check_trusted_inline(obj)
-#endif
-void rb_check_copyable(VALUE obj, VALUE orig);
-
-#define RB_OBJ_INIT_COPY(obj, orig) \
- ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
-#define OBJ_INIT_COPY(obj, orig) RB_OBJ_INIT_COPY(obj, orig)
-
-/* eval.c */
-int rb_sourceline(void);
-const char *rb_sourcefile(void);
-VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
-VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
-
-NORETURN(MJIT_STATIC void rb_error_arity(int, int, int));
-static inline int
-rb_check_arity(int argc, int min, int max)
-{
- if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max))
- rb_error_arity(argc, min, max);
- return argc;
-}
-#define rb_check_arity rb_check_arity /* for ifdef */
-
-#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
-typedef struct {
- int maxfd;
- fd_set *fdset;
-} rb_fdset_t;
-
-void rb_fd_init(rb_fdset_t *);
-void rb_fd_term(rb_fdset_t *);
-void rb_fd_zero(rb_fdset_t *);
-void rb_fd_set(int, rb_fdset_t *);
-void rb_fd_clr(int, rb_fdset_t *);
-int rb_fd_isset(int, const rb_fdset_t *);
-void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
-void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
-
-struct timeval;
-int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
-
-#define rb_fd_ptr(f) ((f)->fdset)
-#define rb_fd_max(f) ((f)->maxfd)
-
-#elif defined(_WIN32)
-
-typedef struct {
- int capa;
- fd_set *fdset;
-} rb_fdset_t;
-
-void rb_fd_init(rb_fdset_t *);
-void rb_fd_term(rb_fdset_t *);
-#define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
-void rb_fd_set(int, rb_fdset_t *);
-#define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
-#define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
-#define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
-void rb_w32_fd_copy(rb_fdset_t *, const fd_set *, int);
-#define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
-void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
-static inline int
-rb_fd_select(int n, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
-{
- return rb_w32_select(n,
- rfds ? rfds->fdset : NULL,
- wfds ? wfds->fdset : NULL,
- efds ? efds->fdset : NULL,
- timeout);
-}
-#define rb_fd_resize(n, f) ((void)(f))
-
-#define rb_fd_ptr(f) ((f)->fdset)
-#define rb_fd_max(f) ((f)->fdset->fd_count)
-
-#else
-
-typedef fd_set rb_fdset_t;
-#define rb_fd_zero(f) FD_ZERO(f)
-#define rb_fd_set(n, f) FD_SET((n), (f))
-#define rb_fd_clr(n, f) FD_CLR((n), (f))
-#define rb_fd_isset(n, f) FD_ISSET((n), (f))
-#define rb_fd_copy(d, s, n) (*(d) = *(s))
-#define rb_fd_dup(d, s) (*(d) = *(s))
-#define rb_fd_resize(n, f) ((void)(f))
-#define rb_fd_ptr(f) (f)
-#define rb_fd_init(f) FD_ZERO(f)
-#define rb_fd_init_copy(d, s) (*(d) = *(s))
-#define rb_fd_term(f) ((void)(f))
-#define rb_fd_max(f) FD_SETSIZE
-#define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
-
-#endif
-
-NORETURN(void rb_exc_raise(VALUE));
-NORETURN(void rb_exc_fatal(VALUE));
-NORETURN(VALUE rb_f_exit(int, const VALUE*));
-NORETURN(VALUE rb_f_abort(int, const VALUE*));
-void rb_remove_method(VALUE, const char*);
-void rb_remove_method_id(VALUE, ID);
-#define HAVE_RB_DEFINE_ALLOC_FUNC 1
-typedef VALUE (*rb_alloc_func_t)(VALUE);
-void rb_define_alloc_func(VALUE, rb_alloc_func_t);
-void rb_undef_alloc_func(VALUE);
-rb_alloc_func_t rb_get_alloc_func(VALUE);
-void rb_clear_constant_cache(void);
-void rb_clear_method_cache_by_class(VALUE);
-void rb_alias(VALUE, ID, ID);
-void rb_attr(VALUE,ID,int,int,int);
-int rb_method_boundp(VALUE, ID, int);
-int rb_method_basic_definition_p(VALUE, ID);
-VALUE rb_eval_cmd(VALUE, VALUE, int);
-VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
-int rb_obj_respond_to(VALUE, ID, int);
-int rb_respond_to(VALUE, ID);
-NORETURN(VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker));
-#if !defined(RUBY_EXPORT) && defined(_WIN32)
-RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker);
-#define rb_f_notimplement (*rb_f_notimplement_)
-#endif
-NORETURN(void rb_interrupt(void));
-VALUE rb_apply(VALUE, ID, VALUE);
-void rb_backtrace(void);
-ID rb_frame_this_func(void);
-VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
-VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
-VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
-VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
-void rb_load(VALUE, int);
-void rb_load_protect(VALUE, int, int*);
-NORETURN(void rb_jump_tag(int));
-int rb_provided(const char*);
-int rb_feature_provided(const char *, const char **);
-void rb_provide(const char*);
-VALUE rb_f_require(VALUE, VALUE);
-VALUE rb_require_safe(VALUE, int); /* Remove in 3.0 */
-VALUE rb_require_string(VALUE);
-void rb_obj_call_init(VALUE, int, const VALUE*);
-void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
-VALUE rb_class_new_instance(int, const VALUE*, VALUE);
-VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);
-VALUE rb_block_proc(void);
-VALUE rb_block_lambda(void);
-VALUE rb_proc_new(rb_block_call_func_t, VALUE);
-VALUE rb_obj_is_proc(VALUE);
-VALUE rb_proc_call(VALUE, VALUE);
-VALUE rb_proc_call_kw(VALUE, VALUE, int);
-VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
-VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int);
-int rb_proc_arity(VALUE);
-VALUE rb_proc_lambda_p(VALUE);
-VALUE rb_binding_new(void);
-VALUE rb_obj_method(VALUE, VALUE);
-VALUE rb_obj_is_method(VALUE);
-VALUE rb_method_call(int, const VALUE*, VALUE);
-VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
-VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
-VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
-int rb_mod_method_arity(VALUE, ID);
-int rb_obj_method_arity(VALUE, ID);
-VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
-void rb_set_end_proc(void (*)(VALUE), VALUE);
-void rb_thread_schedule(void);
-void rb_thread_wait_fd(int);
-int rb_thread_fd_writable(int);
-void rb_thread_fd_close(int);
-int rb_thread_alone(void);
-void rb_thread_sleep(int);
-void rb_thread_sleep_forever(void);
-void rb_thread_sleep_deadly(void);
-VALUE rb_thread_stop(void);
-VALUE rb_thread_wakeup(VALUE);
-VALUE rb_thread_wakeup_alive(VALUE);
-VALUE rb_thread_run(VALUE);
-VALUE rb_thread_kill(VALUE);
-VALUE rb_thread_create(VALUE (*)(void *), void*);
-int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
-void rb_thread_wait_for(struct timeval);
-VALUE rb_thread_current(void);
-VALUE rb_thread_main(void);
-VALUE rb_thread_local_aref(VALUE, ID);
-VALUE rb_thread_local_aset(VALUE, ID, VALUE);
-void rb_thread_atfork(void);
-void rb_thread_atfork_before_exec(void);
-VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
-VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
-VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
-VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
-/* dir.c */
-VALUE rb_dir_getwd(void);
-/* file.c */
-VALUE rb_file_s_expand_path(int, const VALUE *);
-VALUE rb_file_expand_path(VALUE, VALUE);
-VALUE rb_file_s_absolute_path(int, const VALUE *);
-VALUE rb_file_absolute_path(VALUE, VALUE);
-VALUE rb_file_dirname(VALUE fname);
-int rb_find_file_ext_safe(VALUE*, const char* const*, int); /* Remove in 3.0 */
-VALUE rb_find_file_safe(VALUE, int); /* Remove in 3.0 */
-int rb_find_file_ext(VALUE*, const char* const*);
-VALUE rb_find_file(VALUE);
-VALUE rb_file_directory_p(VALUE,VALUE);
-VALUE rb_str_encode_ospath(VALUE);
-int rb_is_absolute_path(const char *);
-/* gc.c */
-COLDFUNC NORETURN(void rb_memerror(void));
-PUREFUNC(int rb_during_gc(void));
-void rb_gc_mark_locations(const VALUE*, const VALUE*);
-void rb_mark_tbl(struct st_table*);
-void rb_mark_tbl_no_pin(struct st_table*);
-void rb_mark_set(struct st_table*);
-void rb_mark_hash(struct st_table*);
-void rb_gc_update_tbl_refs(st_table *ptr);
-void rb_gc_mark_maybe(VALUE);
-void rb_gc_mark(VALUE);
-void rb_gc_mark_movable(VALUE);
-VALUE rb_gc_location(VALUE);
-void rb_gc_force_recycle(VALUE);
-void rb_gc(void);
-void rb_gc_copy_finalizer(VALUE,VALUE);
-VALUE rb_gc_enable(void);
-VALUE rb_gc_disable(void);
-VALUE rb_gc_start(void);
-VALUE rb_define_finalizer(VALUE, VALUE);
-VALUE rb_undefine_finalizer(VALUE);
-size_t rb_gc_count(void);
-size_t rb_gc_stat(VALUE);
-VALUE rb_gc_latest_gc_info(VALUE);
-void rb_gc_adjust_memory_usage(ssize_t);
-/* hash.c */
-void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
-#define st_foreach_safe rb_st_foreach_safe
-VALUE rb_check_hash_type(VALUE);
-void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
-VALUE rb_hash(VALUE);
-VALUE rb_hash_new(void);
-VALUE rb_hash_dup(VALUE);
-VALUE rb_hash_freeze(VALUE);
-VALUE rb_hash_aref(VALUE, VALUE);
-VALUE rb_hash_lookup(VALUE, VALUE);
-VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
-VALUE rb_hash_fetch(VALUE, VALUE);
-VALUE rb_hash_aset(VALUE, VALUE, VALUE);
-VALUE rb_hash_clear(VALUE);
-VALUE rb_hash_delete_if(VALUE);
-VALUE rb_hash_delete(VALUE,VALUE);
-VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
-void rb_hash_bulk_insert(long, const VALUE *, VALUE);
-typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
-VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
-struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
-int rb_path_check(const char*);
-int rb_env_path_tainted(void);
-VALUE rb_env_clear(void);
-VALUE rb_hash_size(VALUE);
-void rb_hash_free(VALUE);
-/* io.c */
-#define rb_defout rb_stdout
-RUBY_EXTERN VALUE rb_fs;
-RUBY_EXTERN VALUE rb_output_fs;
-RUBY_EXTERN VALUE rb_rs;
-RUBY_EXTERN VALUE rb_default_rs;
-RUBY_EXTERN VALUE rb_output_rs;
-VALUE rb_io_write(VALUE, VALUE);
-VALUE rb_io_gets(VALUE);
-VALUE rb_io_getbyte(VALUE);
-VALUE rb_io_ungetc(VALUE, VALUE);
-VALUE rb_io_ungetbyte(VALUE, VALUE);
-VALUE rb_io_close(VALUE);
-VALUE rb_io_flush(VALUE);
-VALUE rb_io_eof(VALUE);
-VALUE rb_io_binmode(VALUE);
-VALUE rb_io_ascii8bit_binmode(VALUE);
-VALUE rb_io_addstr(VALUE, VALUE);
-VALUE rb_io_printf(int, const VALUE*, VALUE);
-VALUE rb_io_print(int, const VALUE*, VALUE);
-VALUE rb_io_puts(int, const VALUE*, VALUE);
-VALUE rb_io_fdopen(int, int, const char*);
-VALUE rb_io_get_io(VALUE);
-VALUE rb_file_open(const char*, const char*);
-VALUE rb_file_open_str(VALUE, const char*);
-VALUE rb_gets(void);
-void rb_write_error(const char*);
-void rb_write_error2(const char*, long);
-void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
-int rb_pipe(int *pipes);
-int rb_reserved_fd_p(int fd);
-int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
-int rb_cloexec_dup(int oldfd);
-int rb_cloexec_dup2(int oldfd, int newfd);
-int rb_cloexec_pipe(int fildes[2]);
-int rb_cloexec_fcntl_dupfd(int fd, int minfd);
-#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
-void rb_update_max_fd(int fd);
-void rb_fd_fix_cloexec(int fd);
-/* marshal.c */
-VALUE rb_marshal_dump(VALUE, VALUE);
-VALUE rb_marshal_load(VALUE);
-void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
-/* numeric.c */
-NORETURN(void rb_num_zerodiv(void));
-#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
-VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
-VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
-VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
-VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
-VALUE rb_num2fix(VALUE);
-VALUE rb_fix2str(VALUE, int);
-CONSTFUNC(VALUE rb_dbl_cmp(double, double));
-/* object.c */
-int rb_eql(VALUE, VALUE);
-VALUE rb_any_to_s(VALUE);
-VALUE rb_inspect(VALUE);
-VALUE rb_obj_is_instance_of(VALUE, VALUE);
-VALUE rb_obj_is_kind_of(VALUE, VALUE);
-VALUE rb_obj_alloc(VALUE);
-VALUE rb_obj_clone(VALUE);
-VALUE rb_obj_dup(VALUE);
-VALUE rb_obj_init_copy(VALUE,VALUE);
-VALUE rb_obj_taint(VALUE);
-PUREFUNC(VALUE rb_obj_tainted(VALUE));
-VALUE rb_obj_untaint(VALUE);
-VALUE rb_obj_untrust(VALUE);
-PUREFUNC(VALUE rb_obj_untrusted(VALUE));
-VALUE rb_obj_trust(VALUE);
-VALUE rb_obj_freeze(VALUE);
-PUREFUNC(VALUE rb_obj_frozen_p(VALUE));
-VALUE rb_obj_id(VALUE);
-VALUE rb_memory_id(VALUE);
-VALUE rb_obj_class(VALUE);
-PUREFUNC(VALUE rb_class_real(VALUE));
-PUREFUNC(VALUE rb_class_inherited_p(VALUE, VALUE));
-VALUE rb_class_superclass(VALUE);
-VALUE rb_class_get_superclass(VALUE);
-VALUE rb_convert_type(VALUE,int,const char*,const char*);
-VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
-VALUE rb_check_to_integer(VALUE, const char *);
-VALUE rb_check_to_float(VALUE);
-VALUE rb_to_int(VALUE);
-VALUE rb_check_to_int(VALUE);
-VALUE rb_Integer(VALUE);
-VALUE rb_to_float(VALUE);
-VALUE rb_Float(VALUE);
-VALUE rb_String(VALUE);
-VALUE rb_Array(VALUE);
-VALUE rb_Hash(VALUE);
-double rb_cstr_to_dbl(const char*, int);
-double rb_str_to_dbl(VALUE, int);
-/* parse.y */
-ID rb_id_attrset(ID);
-CONSTFUNC(int rb_is_const_id(ID));
-CONSTFUNC(int rb_is_global_id(ID));
-CONSTFUNC(int rb_is_instance_id(ID));
-CONSTFUNC(int rb_is_attrset_id(ID));
-CONSTFUNC(int rb_is_class_id(ID));
-CONSTFUNC(int rb_is_local_id(ID));
-CONSTFUNC(int rb_is_junk_id(ID));
-int rb_symname_p(const char*);
-int rb_sym_interned_p(VALUE);
-VALUE rb_backref_get(void);
-void rb_backref_set(VALUE);
-VALUE rb_lastline_get(void);
-void rb_lastline_set(VALUE);
-/* process.c */
-void rb_last_status_set(int status, rb_pid_t pid);
-VALUE rb_last_status_get(void);
-int rb_proc_exec(const char*);
-NORETURN(VALUE rb_f_exec(int, const VALUE*));
-rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
-void rb_syswait(rb_pid_t pid);
-rb_pid_t rb_spawn(int, const VALUE*);
-rb_pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
-VALUE rb_proc_times(VALUE);
-VALUE rb_detach_process(rb_pid_t pid);
-/* range.c */
-VALUE rb_range_new(VALUE, VALUE, int);
-VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
-int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
-/* random.c */
-unsigned int rb_genrand_int32(void);
-double rb_genrand_real(void);
-void rb_reset_random_seed(void);
-VALUE rb_random_bytes(VALUE rnd, long n);
-VALUE rb_random_int(VALUE rnd, VALUE max);
-unsigned int rb_random_int32(VALUE rnd);
-double rb_random_real(VALUE rnd);
-unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
-unsigned long rb_genrand_ulong_limited(unsigned long i);
-/* re.c */
-#define rb_memcmp memcmp
-int rb_memcicmp(const void*,const void*,long);
-void rb_match_busy(VALUE);
-VALUE rb_reg_nth_defined(int, VALUE);
-VALUE rb_reg_nth_match(int, VALUE);
-int rb_reg_backref_number(VALUE match, VALUE backref);
-VALUE rb_reg_last_match(VALUE);
-VALUE rb_reg_match_pre(VALUE);
-VALUE rb_reg_match_post(VALUE);
-VALUE rb_reg_match_last(VALUE);
-#define HAVE_RB_REG_NEW_STR 1
-VALUE rb_reg_new_str(VALUE, int);
-VALUE rb_reg_new(const char *, long, int);
-VALUE rb_reg_alloc(void);
-VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
-VALUE rb_reg_match(VALUE, VALUE);
-VALUE rb_reg_match2(VALUE);
-int rb_reg_options(VALUE);
-/* ruby.c */
-#define rb_argv rb_get_argv()
-RUBY_EXTERN VALUE rb_argv0;
-VALUE rb_get_argv(void);
-void *rb_load_file(const char*);
-void *rb_load_file_str(VALUE);
-/* signal.c */
-VALUE rb_f_kill(int, const VALUE*);
-#ifdef POSIX_SIGNAL
-#define posix_signal ruby_posix_signal
-RETSIGTYPE (*posix_signal(int, RETSIGTYPE (*)(int)))(int);
-#endif
-const char *ruby_signal_name(int);
-void ruby_default_signal(int);
-/* sprintf.c */
-VALUE rb_f_sprintf(int, const VALUE*);
-PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
-VALUE rb_vsprintf(const char*, va_list);
-PRINTF_ARGS(VALUE rb_str_catf(VALUE, const char*, ...), 2, 3);
-VALUE rb_str_vcatf(VALUE, const char*, va_list);
-VALUE rb_str_format(int, const VALUE *, VALUE);
-/* string.c */
-VALUE rb_str_new(const char*, long);
-VALUE rb_str_new_cstr(const char*);
-VALUE rb_str_new_shared(VALUE);
-VALUE rb_str_new_frozen(VALUE);
-VALUE rb_str_new_with_class(VALUE, const char*, long);
-VALUE rb_tainted_str_new_cstr(const char*);
-VALUE rb_tainted_str_new(const char*, long);
-VALUE rb_external_str_new(const char*, long);
-VALUE rb_external_str_new_cstr(const char*);
-VALUE rb_locale_str_new(const char*, long);
-VALUE rb_locale_str_new_cstr(const char*);
-VALUE rb_filesystem_str_new(const char*, long);
-VALUE rb_filesystem_str_new_cstr(const char*);
-VALUE rb_str_buf_new(long);
-VALUE rb_str_buf_new_cstr(const char*);
-VALUE rb_str_buf_new2(const char*);
-VALUE rb_str_tmp_new(long);
-VALUE rb_usascii_str_new(const char*, long);
-VALUE rb_usascii_str_new_cstr(const char*);
-VALUE rb_utf8_str_new(const char*, long);
-VALUE rb_utf8_str_new_cstr(const char*);
-VALUE rb_str_new_static(const char *, long);
-VALUE rb_usascii_str_new_static(const char *, long);
-VALUE rb_utf8_str_new_static(const char *, long);
-void rb_str_free(VALUE);
-void rb_str_shared_replace(VALUE, VALUE);
-VALUE rb_str_buf_append(VALUE, VALUE);
-VALUE rb_str_buf_cat(VALUE, const char*, long);
-VALUE rb_str_buf_cat2(VALUE, const char*);
-VALUE rb_str_buf_cat_ascii(VALUE, const char*);
-VALUE rb_obj_as_string(VALUE);
-VALUE rb_check_string_type(VALUE);
-void rb_must_asciicompat(VALUE);
-VALUE rb_str_dup(VALUE);
-VALUE rb_str_resurrect(VALUE str);
-VALUE rb_str_locktmp(VALUE);
-VALUE rb_str_unlocktmp(VALUE);
-VALUE rb_str_dup_frozen(VALUE);
-#define rb_str_dup_frozen rb_str_new_frozen
-VALUE rb_str_plus(VALUE, VALUE);
-VALUE rb_str_times(VALUE, VALUE);
-long rb_str_sublen(VALUE, long);
-VALUE rb_str_substr(VALUE, long, long);
-VALUE rb_str_subseq(VALUE, long, long);
-char *rb_str_subpos(VALUE, long, long*);
-void rb_str_modify(VALUE);
-void rb_str_modify_expand(VALUE, long);
-VALUE rb_str_freeze(VALUE);
-void rb_str_set_len(VALUE, long);
-VALUE rb_str_resize(VALUE, long);
-VALUE rb_str_cat(VALUE, const char*, long);
-VALUE rb_str_cat_cstr(VALUE, const char*);
-VALUE rb_str_cat2(VALUE, const char*);
-VALUE rb_str_append(VALUE, VALUE);
-VALUE rb_str_concat(VALUE, VALUE);
-st_index_t rb_memhash(const void *ptr, long len);
-st_index_t rb_hash_start(st_index_t);
-st_index_t rb_hash_uint32(st_index_t, uint32_t);
-st_index_t rb_hash_uint(st_index_t, st_index_t);
-st_index_t rb_hash_end(st_index_t);
-#define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
-#define rb_hash_uint(h, i) st_hash_uint((h), (i))
-#define rb_hash_end(h) st_hash_end(h)
-st_index_t rb_str_hash(VALUE);
-int rb_str_hash_cmp(VALUE,VALUE);
-int rb_str_comparable(VALUE, VALUE);
-int rb_str_cmp(VALUE, VALUE);
-VALUE rb_str_equal(VALUE str1, VALUE str2);
-VALUE rb_str_drop_bytes(VALUE, long);
-void rb_str_update(VALUE, long, long, VALUE);
-VALUE rb_str_replace(VALUE, VALUE);
-VALUE rb_str_inspect(VALUE);
-VALUE rb_str_dump(VALUE);
-VALUE rb_str_split(VALUE, const char*);
-rb_gvar_setter_t rb_str_setter;
-VALUE rb_str_intern(VALUE);
-VALUE rb_sym_to_s(VALUE);
-long rb_str_strlen(VALUE);
-VALUE rb_str_length(VALUE);
-long rb_str_offset(VALUE, long);
-PUREFUNC(size_t rb_str_capacity(VALUE));
-VALUE rb_str_ellipsize(VALUE, long);
-VALUE rb_str_scrub(VALUE, VALUE);
-/* symbol.c */
-VALUE rb_sym_all_symbols(void);
-
-#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
-#define rb_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
- rb_str_new_static((str), (len)) : \
- rb_str_new((str), (len)) \
-)
-#define rb_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_str_new_static((str), (long)strlen(str)) : \
- rb_str_new_cstr(str) \
-)
-#define rb_usascii_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
- rb_usascii_str_new_static((str), (len)) : \
- rb_usascii_str_new((str), (len)) \
-)
-#define rb_utf8_str_new(str, len) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
- rb_utf8_str_new_static((str), (len)) : \
- rb_utf8_str_new((str), (len)) \
-)
-#define rb_tainted_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_tainted_str_new((str), (long)strlen(str)) : \
- rb_tainted_str_new_cstr(str) \
-)
-#define rb_usascii_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_usascii_str_new_static((str), (long)strlen(str)) : \
- rb_usascii_str_new_cstr(str) \
-)
-#define rb_utf8_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_utf8_str_new_static((str), (long)strlen(str)) : \
- rb_utf8_str_new_cstr(str) \
-)
-#define rb_external_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_external_str_new((str), (long)strlen(str)) : \
- rb_external_str_new_cstr(str) \
-)
-#define rb_locale_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_locale_str_new((str), (long)strlen(str)) : \
- rb_locale_str_new_cstr(str) \
-)
-#define rb_str_buf_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
- (str), (long)strlen(str)) : \
- rb_str_buf_new_cstr(str) \
-)
-#define rb_str_cat_cstr(str, ptr) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(ptr)) ? \
- rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
- rb_str_cat_cstr((str), (ptr)) \
-)
-#define rb_exc_new_cstr(klass, ptr) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(ptr)) ? \
- rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
- rb_exc_new_cstr((klass), (ptr)) \
-)
-#endif
-#define rb_str_new2 rb_str_new_cstr
-#define rb_str_new3 rb_str_new_shared
-#define rb_str_new4 rb_str_new_frozen
-#define rb_str_new5 rb_str_new_with_class
-#define rb_tainted_str_new2 rb_tainted_str_new_cstr
-#define rb_str_buf_new2 rb_str_buf_new_cstr
-#define rb_usascii_str_new2 rb_usascii_str_new_cstr
-#define rb_str_buf_cat rb_str_cat
-#define rb_str_buf_cat2 rb_str_cat_cstr
-#define rb_str_cat2 rb_str_cat_cstr
-#define rb_strlen_lit(str) (sizeof(str "") - 1)
-#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
-#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
-#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
-#define rb_enc_str_new_lit(str, enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
-#define rb_str_new_literal(str) rb_str_new_lit(str)
-#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
-#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
-#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_lit(str, enc)
-
-/* struct.c */
-VALUE rb_struct_new(VALUE, ...);
-VALUE rb_struct_define(const char*, ...);
-VALUE rb_struct_define_under(VALUE, const char*, ...);
-VALUE rb_struct_alloc(VALUE, VALUE);
-VALUE rb_struct_initialize(VALUE, VALUE);
-VALUE rb_struct_aref(VALUE, VALUE);
-VALUE rb_struct_aset(VALUE, VALUE, VALUE);
-VALUE rb_struct_getmember(VALUE, ID);
-VALUE rb_struct_s_members(VALUE);
-VALUE rb_struct_members(VALUE);
-VALUE rb_struct_size(VALUE s);
-VALUE rb_struct_alloc_noinit(VALUE);
-VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
-VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
-
-/* thread.c */
-typedef void rb_unblock_function_t(void *);
-typedef VALUE rb_blocking_function_t(void *);
-void rb_thread_check_ints(void);
-int rb_thread_interrupted(VALUE thval);
-
-#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
-#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
-VALUE rb_mutex_new(void);
-VALUE rb_mutex_locked_p(VALUE mutex);
-VALUE rb_mutex_trylock(VALUE mutex);
-VALUE rb_mutex_lock(VALUE mutex);
-VALUE rb_mutex_unlock(VALUE mutex);
-VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
-VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
-/* time.c */
-struct timespec;
-void rb_timespec_now(struct timespec *);
-VALUE rb_time_new(time_t, long);
-VALUE rb_time_nano_new(time_t, long);
-VALUE rb_time_timespec_new(const struct timespec *, int);
-VALUE rb_time_num_new(VALUE, VALUE);
-struct timeval rb_time_interval(VALUE num);
-struct timeval rb_time_timeval(VALUE time);
-struct timespec rb_time_timespec(VALUE time);
-struct timespec rb_time_timespec_interval(VALUE num);
-VALUE rb_time_utc_offset(VALUE time);
-/* variable.c */
-VALUE rb_mod_name(VALUE);
-VALUE rb_class_path(VALUE);
-VALUE rb_class_path_cached(VALUE);
-void rb_set_class_path(VALUE, VALUE, const char*);
-void rb_set_class_path_string(VALUE, VALUE, VALUE);
-VALUE rb_path_to_class(VALUE);
-VALUE rb_path2class(const char*);
-VALUE rb_class_name(VALUE);
-VALUE rb_autoload_load(VALUE, ID);
-VALUE rb_autoload_p(VALUE, ID);
-VALUE rb_f_trace_var(int, const VALUE*);
-VALUE rb_f_untrace_var(int, const VALUE*);
-VALUE rb_f_global_variables(void);
-void rb_alias_variable(ID, ID);
-void rb_copy_generic_ivar(VALUE,VALUE);
-void rb_free_generic_ivar(VALUE);
-VALUE rb_ivar_get(VALUE, ID);
-VALUE rb_ivar_set(VALUE, ID, VALUE);
-VALUE rb_ivar_defined(VALUE, ID);
-void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
-st_index_t rb_ivar_count(VALUE);
-VALUE rb_attr_get(VALUE, ID);
-VALUE rb_obj_instance_variables(VALUE);
-VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
-void *rb_mod_const_at(VALUE, void*);
-void *rb_mod_const_of(VALUE, void*);
-VALUE rb_const_list(void*);
-VALUE rb_mod_constants(int, const VALUE *, VALUE);
-VALUE rb_mod_remove_const(VALUE, VALUE);
-int rb_const_defined(VALUE, ID);
-int rb_const_defined_at(VALUE, ID);
-int rb_const_defined_from(VALUE, ID);
-VALUE rb_const_get(VALUE, ID);
-VALUE rb_const_get_at(VALUE, ID);
-VALUE rb_const_get_from(VALUE, ID);
-void rb_const_set(VALUE, ID, VALUE);
-VALUE rb_const_remove(VALUE, ID);
-#if 0 /* EXPERIMENTAL: remove if no problem */
-NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
-#endif
-VALUE rb_cvar_defined(VALUE, ID);
-void rb_cvar_set(VALUE, ID, VALUE);
-VALUE rb_cvar_get(VALUE, ID);
-void rb_cv_set(VALUE, const char*, VALUE);
-VALUE rb_cv_get(VALUE, const char*);
-void rb_define_class_variable(VALUE, const char*, VALUE);
-VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
-VALUE rb_mod_remove_cvar(VALUE, VALUE);
-
-ID rb_frame_callee(void);
-int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
-VALUE rb_str_succ(VALUE);
-VALUE rb_time_succ(VALUE);
-VALUE rb_make_backtrace(void);
-VALUE rb_make_exception(int, const VALUE*);
-
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-extern "C++" {
-#endif
-
-#if defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
-# define rb_f_notimplement_p(f) __builtin_types_compatible_p(__typeof__(f),__typeof__(rb_f_notimplement))
-#else
-# define rb_f_notimplement_p(f) 0
-#endif
-
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) && !defined(_WIN32) && !defined(__CYGWIN__)
-#if defined(__has_attribute) && __has_attribute(transparent_union) && __has_attribute(unused) && __has_attribute(weakref) && __has_attribute(nonnull)
-#define RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
- __attribute__((__unused__,__weakref__(#def),__nonnull__ nonnull))static void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity);
-#endif
-#endif
-
-#if defined(RB_METHOD_DEFINITION_DECL_C) || defined(__cplusplus)
-#ifndef RB_METHOD_DEFINITION_DECL_C
-#define RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
- static inline void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity) \
- { \
- def(RB_UNWRAP_MACRO vars,(VALUE(*)(ANYARGS))(func),arity); \
- }
-#endif
-
-#define RB_UNWRAP_MACRO(...) __VA_ARGS__
-
-#ifdef __cplusplus
-#define RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) template <int Arity> struct def##_tmpl {};
-#define RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity) \
- template <> struct def##_tmpl<arity> { \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)funcargs) {::defname(RB_UNWRAP_MACRO vars, func, arity);} \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(...)) {::defname(RB_UNWRAP_MACRO vars, reinterpret_cast<VALUE(*)funcargs>(func), arity);} \
- };
-#else
-#define RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) /* nothing */
-#define RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity) /* nothing */
-#endif
-#define RB_METHOD_DEFINITION_DECL_1(def,nonnull,defname,arity,decl,vars,funcargs) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) \
- RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity)
-
-#define RB_METHOD_DEFINITION_DECL(def,nonnull,decl,vars) \
-RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##0 ,0 ,decl,vars,(VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##1 ,1 ,decl,vars,(VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##2 ,2 ,decl,vars,(VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##3 ,3 ,decl,vars,(VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##4 ,4 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##5 ,5 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##6 ,6 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##7 ,7 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##8 ,8 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##9 ,9 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##10,10,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##11,11,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##12,12,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##13,13,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##14,14,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##15,15,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_M3(def,nonnull,def##m3,decl,vars) \
-RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##m2,-2,decl,vars,(VALUE,VALUE)) \
-RB_METHOD_DEFINITION_DECL_M1(def,nonnull,def##m1,decl,vars) /* END */
-#ifdef __cplusplus
-#define RB_METHOD_DEFINITION_DECL_M1(def,nonnull,defname,decl,vars) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,VALUE*,VALUE)) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,const VALUE*,VALUE)) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,const VALUE*,VALUE,VALUE)) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(...)) \
- template <> struct def##_tmpl<-1> { \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,VALUE*,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,const VALUE*,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(int,const VALUE*,VALUE,VALUE)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
- static void define(RB_UNWRAP_MACRO decl, VALUE (*func)(...)) {::defname(RB_UNWRAP_MACRO vars, func, -1);} \
- };
-#define RB_METHOD_DEFINITION_DECL_M3(def,nonnull,defname,decl,vars) /* nothing */
-#else
-#define RB_METHOD_DEFINITION_DECL_M1(def,nonnull,defname,decl,vars) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE))
-#define RB_METHOD_DEFINITION_DECL_M3(def,nonnull,defname,decl,vars) \
- RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,())
-#endif
-
-#endif
-
-#ifdef RB_METHOD_DEFINITION_DECL
-
-RB_METHOD_DEFINITION_DECL(rb_define_method_id, (3), (VALUE klass, ID name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_method_id(m, n, f, a) rb_define_method_id_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_method_id_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_method_id15,rb_define_method_idm3)
-#define rb_define_method_id_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_method_id14,rb_define_method_id_choose_prototype15(n))
-#define rb_define_method_id_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_method_id13,rb_define_method_id_choose_prototype14(n))
-#define rb_define_method_id_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_method_id12,rb_define_method_id_choose_prototype13(n))
-#define rb_define_method_id_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_method_id11,rb_define_method_id_choose_prototype12(n))
-#define rb_define_method_id_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_method_id10,rb_define_method_id_choose_prototype11(n))
-#define rb_define_method_id_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_method_id9, rb_define_method_id_choose_prototype10(n))
-#define rb_define_method_id_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_method_id8, rb_define_method_id_choose_prototype9(n))
-#define rb_define_method_id_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_method_id7, rb_define_method_id_choose_prototype8(n))
-#define rb_define_method_id_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_method_id6, rb_define_method_id_choose_prototype7(n))
-#define rb_define_method_id_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_method_id5, rb_define_method_id_choose_prototype6(n))
-#define rb_define_method_id_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_method_id4, rb_define_method_id_choose_prototype5(n))
-#define rb_define_method_id_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_method_id3, rb_define_method_id_choose_prototype4(n))
-#define rb_define_method_id_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_method_id2, rb_define_method_id_choose_prototype3(n))
-#define rb_define_method_id_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_method_id1, rb_define_method_id_choose_prototype2(n))
-#define rb_define_method_id_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_method_id0, rb_define_method_id_choose_prototype1(n))
-#define rb_define_method_id_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_method_idm1,rb_define_method_id_choose_prototype0(n))
-#define rb_define_method_id_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_method_idm2,rb_define_method_id_choose_prototypem1(n))
-#define rb_define_method_id_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_method_idm3,rb_define_method_id_choose_prototypem2(n))
-#define rb_define_method_id(klass, mid, func, arity) rb_define_method_id_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-RB_METHOD_DEFINITION_DECL(rb_define_protected_method, (2,3), (VALUE klass, const char *name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_protected_method(m, n, f, a) rb_define_protected_method_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_protected_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_protected_method15,rb_define_protected_methodm3)
-#define rb_define_protected_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_protected_method14,rb_define_protected_method_choose_prototype15(n))
-#define rb_define_protected_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_protected_method13,rb_define_protected_method_choose_prototype14(n))
-#define rb_define_protected_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_protected_method12,rb_define_protected_method_choose_prototype13(n))
-#define rb_define_protected_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_protected_method11,rb_define_protected_method_choose_prototype12(n))
-#define rb_define_protected_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_protected_method10,rb_define_protected_method_choose_prototype11(n))
-#define rb_define_protected_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_protected_method9, rb_define_protected_method_choose_prototype10(n))
-#define rb_define_protected_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_protected_method8, rb_define_protected_method_choose_prototype9(n))
-#define rb_define_protected_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_protected_method7, rb_define_protected_method_choose_prototype8(n))
-#define rb_define_protected_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_protected_method6, rb_define_protected_method_choose_prototype7(n))
-#define rb_define_protected_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_protected_method5, rb_define_protected_method_choose_prototype6(n))
-#define rb_define_protected_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_protected_method4, rb_define_protected_method_choose_prototype5(n))
-#define rb_define_protected_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_protected_method3, rb_define_protected_method_choose_prototype4(n))
-#define rb_define_protected_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_protected_method2, rb_define_protected_method_choose_prototype3(n))
-#define rb_define_protected_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_protected_method1, rb_define_protected_method_choose_prototype2(n))
-#define rb_define_protected_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_protected_method0, rb_define_protected_method_choose_prototype1(n))
-#define rb_define_protected_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_protected_methodm1,rb_define_protected_method_choose_prototype0(n))
-#define rb_define_protected_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_protected_methodm2,rb_define_protected_method_choose_prototypem1(n))
-#define rb_define_protected_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_protected_methodm3,rb_define_protected_method_choose_prototypem2(n))
-#define rb_define_protected_method(klass, mid, func, arity) rb_define_protected_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-RB_METHOD_DEFINITION_DECL(rb_define_private_method, (2,3), (VALUE klass, const char *name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_private_method(m, n, f, a) rb_define_private_method_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_private_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_private_method15,rb_define_private_methodm3)
-#define rb_define_private_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_private_method14,rb_define_private_method_choose_prototype15(n))
-#define rb_define_private_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_private_method13,rb_define_private_method_choose_prototype14(n))
-#define rb_define_private_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_private_method12,rb_define_private_method_choose_prototype13(n))
-#define rb_define_private_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_private_method11,rb_define_private_method_choose_prototype12(n))
-#define rb_define_private_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_private_method10,rb_define_private_method_choose_prototype11(n))
-#define rb_define_private_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_private_method9, rb_define_private_method_choose_prototype10(n))
-#define rb_define_private_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_private_method8, rb_define_private_method_choose_prototype9(n))
-#define rb_define_private_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_private_method7, rb_define_private_method_choose_prototype8(n))
-#define rb_define_private_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_private_method6, rb_define_private_method_choose_prototype7(n))
-#define rb_define_private_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_private_method5, rb_define_private_method_choose_prototype6(n))
-#define rb_define_private_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_private_method4, rb_define_private_method_choose_prototype5(n))
-#define rb_define_private_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_private_method3, rb_define_private_method_choose_prototype4(n))
-#define rb_define_private_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_private_method2, rb_define_private_method_choose_prototype3(n))
-#define rb_define_private_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_private_method1, rb_define_private_method_choose_prototype2(n))
-#define rb_define_private_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_private_method0, rb_define_private_method_choose_prototype1(n))
-#define rb_define_private_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_private_methodm1,rb_define_private_method_choose_prototype0(n))
-#define rb_define_private_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_private_methodm2,rb_define_private_method_choose_prototypem1(n))
-#define rb_define_private_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_private_methodm3,rb_define_private_method_choose_prototypem2(n))
-#define rb_define_private_method(klass, mid, func, arity) rb_define_private_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-RB_METHOD_DEFINITION_DECL(rb_define_singleton_method, (2,3), (VALUE klass, const char *name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_singleton_method(m, n, f, a) rb_define_singleton_method_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_singleton_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_singleton_method15,rb_define_singleton_methodm3)
-#define rb_define_singleton_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_singleton_method14,rb_define_singleton_method_choose_prototype15(n))
-#define rb_define_singleton_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_singleton_method13,rb_define_singleton_method_choose_prototype14(n))
-#define rb_define_singleton_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_singleton_method12,rb_define_singleton_method_choose_prototype13(n))
-#define rb_define_singleton_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_singleton_method11,rb_define_singleton_method_choose_prototype12(n))
-#define rb_define_singleton_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_singleton_method10,rb_define_singleton_method_choose_prototype11(n))
-#define rb_define_singleton_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_singleton_method9, rb_define_singleton_method_choose_prototype10(n))
-#define rb_define_singleton_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_singleton_method8, rb_define_singleton_method_choose_prototype9(n))
-#define rb_define_singleton_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_singleton_method7, rb_define_singleton_method_choose_prototype8(n))
-#define rb_define_singleton_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_singleton_method6, rb_define_singleton_method_choose_prototype7(n))
-#define rb_define_singleton_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_singleton_method5, rb_define_singleton_method_choose_prototype6(n))
-#define rb_define_singleton_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_singleton_method4, rb_define_singleton_method_choose_prototype5(n))
-#define rb_define_singleton_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_singleton_method3, rb_define_singleton_method_choose_prototype4(n))
-#define rb_define_singleton_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_singleton_method2, rb_define_singleton_method_choose_prototype3(n))
-#define rb_define_singleton_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_singleton_method1, rb_define_singleton_method_choose_prototype2(n))
-#define rb_define_singleton_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_singleton_method0, rb_define_singleton_method_choose_prototype1(n))
-#define rb_define_singleton_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_singleton_methodm1,rb_define_singleton_method_choose_prototype0(n))
-#define rb_define_singleton_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_singleton_methodm2,rb_define_singleton_method_choose_prototypem1(n))
-#define rb_define_singleton_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_singleton_methodm3,rb_define_singleton_method_choose_prototypem2(n))
-#define rb_define_singleton_method(klass, mid, func, arity) rb_define_singleton_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-#endif
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C++" { */
-#endif
+#include "ruby/internal/intern/array.h"
+#include "ruby/internal/intern/bignum.h"
+#include "ruby/internal/intern/class.h"
+#include "ruby/internal/intern/compar.h"
+#include "ruby/internal/intern/complex.h"
+#include "ruby/internal/intern/cont.h"
+#include "ruby/internal/intern/dir.h"
+#include "ruby/internal/intern/enum.h"
+#include "ruby/internal/intern/enumerator.h"
+#include "ruby/internal/intern/error.h"
+#include "ruby/internal/intern/eval.h"
+#include "ruby/internal/intern/file.h"
+#include "ruby/internal/intern/gc.h"
+#include "ruby/internal/intern/hash.h"
+#include "ruby/internal/intern/io.h"
+#include "ruby/internal/intern/load.h"
+#include "ruby/internal/intern/marshal.h"
+#include "ruby/internal/intern/numeric.h"
+#include "ruby/internal/intern/object.h"
+#include "ruby/internal/intern/parse.h"
+#include "ruby/internal/intern/proc.h"
+#include "ruby/internal/intern/process.h"
+#include "ruby/internal/intern/random.h"
+#include "ruby/internal/intern/range.h"
+#include "ruby/internal/intern/rational.h"
+#include "ruby/internal/intern/re.h"
+#include "ruby/internal/intern/ruby.h"
+#include "ruby/internal/intern/select.h"
+#include "ruby/internal/intern/signal.h"
+#include "ruby/internal/intern/sprintf.h"
+#include "ruby/internal/intern/string.h"
+#include "ruby/internal/intern/struct.h"
+#include "ruby/internal/intern/thread.h"
+#include "ruby/internal/intern/time.h"
+#include "ruby/internal/intern/variable.h"
+#include "ruby/internal/intern/vm.h"
#endif /* RUBY_INTERN_H */
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
new file mode 100644
index 0000000000..44111a0055
--- /dev/null
+++ b/include/ruby/internal/abi.h
@@ -0,0 +1,58 @@
+#ifndef RUBY_ABI_H
+#define RUBY_ABI_H
+
+#ifdef RUBY_ABI_VERSION /* should match the definition in config.h */
+
+/* This number represents Ruby's ABI version.
+ *
+ * In development Ruby, it should be bumped every time an ABI incompatible
+ * change is introduced. This will force other developers to rebuild extension
+ * gems.
+ *
+ * The following cases are considered as ABI incompatible changes:
+ * - Changing any data structures.
+ * - Changing macros or inline functions causing a change in behavior.
+ * - Deprecating or removing function declarations.
+ *
+ * The following cases are NOT considered as ABI incompatible changes:
+ * - Any changes that does not involve the header files in the `include`
+ * directory.
+ * - Adding macros, inline functions, or function declarations.
+ * - Backwards compatible refactors.
+ * - Editing comments.
+ *
+ * In released versions of Ruby, this number is not defined since teeny
+ * versions of Ruby should guarantee ABI compatibility.
+ */
+#define RUBY_ABI_VERSION 3
+
+/* Windows does not support weak symbols so ruby_abi_version will not exist
+ * in the shared library. */
+#if defined(HAVE_FUNC_WEAK) && !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
+# define RUBY_DLN_CHECK_ABI
+#endif
+#endif /* RUBY_ABI_VERSION */
+
+#ifdef RUBY_DLN_CHECK_ABI
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak))
+ruby_abi_version(void)
+{
+# ifdef RUBY_ABI_VERSION
+ return RUBY_ABI_VERSION;
+# else
+ return 0;
+# endif
+}
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+#endif
diff --git a/include/ruby/internal/anyargs.h b/include/ruby/internal/anyargs.h
new file mode 100644
index 0000000000..e4c6d155cc
--- /dev/null
+++ b/include/ruby/internal/anyargs.h
@@ -0,0 +1,398 @@
+#ifndef RBIMPL_ANYARGS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ANYARGS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Function overloads to issue warnings around #ANYARGS.
+ *
+ * For instance ::rb_define_method takes a pointer to #ANYARGS -ed functions,
+ * which in fact varies 18 different prototypes. We still need to preserve
+ * #ANYARGS for storages but why not check the consistencies if possible. With
+ * those complex macro overlays defined in this header file, use of a function
+ * pointer gets checked against the corresponding arity argument.
+ *
+ * ### Q&A ###
+ *
+ * - Q: Where did the magic number "18" came from in the description above?
+ *
+ * - A: Count the case branch of `vm_method.c:call_cfunc_invoker_func()`. Note
+ * also that the 18 branches has lasted for at least 25 years. See also
+ * commit 200e0ee2fd3c1c006c528874a88f684447215524.
+ *
+ * - Q: What is this `__weakref__` thing?
+ *
+ * - A: That is a kind of function overloading mechanism that GCC provides. In
+ * this case for instance `rb_define_method_00` is an alias of
+ * ::rb_define_method, with a strong type.
+ *
+ * - Q: What is this `__transparent_union__` thing?
+ *
+ * A: That is another kind of function overloading mechanism that GCC
+ * provides. In this case the attributed function pointer is either
+ * `VALUE(*)(int,VALUE*,VALUE)` or `VALUE(*)(int,const VALUE*,VALUE)`.
+ *
+ * This is better than `void*` or #ANYARGS because we can reject all other
+ * possibilities than the two.
+ *
+ * - Q: What does this #rb_define_method macro mean?
+ *
+ * - A: It selects appropriate alias of the ::rb_define_method function,
+ * depending on the last (arity) argument.
+ *
+ * - Q: Why the special case for ::rb_f_notimplement ?
+ *
+ * - A: Function pointer to ::rb_f_notimplement is special cased in
+ * `vm_method.c:rb_add_method_cfunc()`. That should be handled by the
+ * `__builtin_choose_expr` chain inside of #rb_define_method macro
+ * expansion. In order to do so, comparison like
+ * `(func == rb_f_notimplement)` is inappropriate for
+ * `__builtin_choose_expr`'s expression (which must be a compile-time
+ * integer constant but the address of ::rb_f_notimplement is not fixed
+ * until the linker). Instead we are using
+ * `__builtin_types_compatible_p`, and in doing so we need to distinguish
+ * ::rb_f_notimplement from others, by type.
+ */
+#include "ruby/internal/attr/maybe_unused.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/weakref.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/config.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/intern/class.h"
+#include "ruby/internal/intern/vm.h"
+#include "ruby/internal/method.h"
+#include "ruby/internal/value.h"
+#include "ruby/backward/2/stdarg.h"
+
+#if defined(__cplusplus)
+# include "ruby/backward/cxxanyargs.hpp"
+
+#elif defined(_WIN32) || defined(__CYGWIN__)
+# /* Skip due to [Bug #16134] */
+# define RBIMPL_CAST_FN_PTR 1
+
+#elif ! RBIMPL_HAS_ATTRIBUTE(transparent_union)
+# /* :TODO: improve here, please find a way to support. */
+# define RBIMPL_CAST_FN_PTR 1
+
+#elif ! defined(HAVE_VA_ARGS_MACRO)
+# /* :TODO: improve here, please find a way to support. */
+# define RBIMPL_CAST_FN_PTR 1
+
+#else
+# /** @cond INTERNAL_MACRO */
+# if ! defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
+# define RBIMPL_CFUNC_IS_rb_f_notimplement(f) 0
+# else
+# define RBIMPL_CFUNC_IS_rb_f_notimplement(f) \
+ __builtin_types_compatible_p( \
+ __typeof__(f), \
+ __typeof__(rb_f_notimplement))
+# endif
+
+# if ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
+# define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) (falsy)
+# else
+# define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) \
+ __builtin_choose_expr( \
+ __builtin_choose_expr( \
+ __builtin_constant_p(expr), \
+ (expr), 0), \
+ (truthy), (falsy))
+# endif
+
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_notimpl, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n))
+# define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL(()) RBIMPL_ATTR_WEAKREF(sym)
+# define RBIMPL_ANYARGS_DECL(sym, ...) \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _notimpl(__VA_ARGS__, VALUE(*)(int, const VALUE *, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
+RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_protected_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_private_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_global_function, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_method_id, VALUE, ID)
+RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
+/** @endcond */
+
+/**
+ * @brief Defines klass\#mid.
+ * @see ::rb_define_method
+ * @param klass Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of klass\#mid.
+ * @param arity Arity of klass\#mid.
+ */
+#define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
+
+/**
+ * @brief Defines klass\#mid.
+ * @see ::rb_define_method_id
+ * @param klass Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of klass\#mid.
+ * @param arity Arity of klass\#mid.
+ */
+#define rb_define_method_id(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
+
+/**
+ * @brief Defines obj.mid.
+ * @see ::rb_define_singleton_method
+ * @param obj Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of obj.mid.
+ * @param arity Arity of obj.mid.
+ */
+#define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
+
+/**
+ * @brief Defines klass\#mid and make it protected.
+ * @see ::rb_define_protected_method
+ * @param klass Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of klass\#mid.
+ * @param arity Arity of klass\#mid.
+ */
+#define rb_define_protected_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
+
+/**
+ * @brief Defines klass\#mid and make it private.
+ * @see ::rb_define_private_method
+ * @param klass Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of klass\#mid.
+ * @param arity Arity of klass\#mid.
+ */
+#define rb_define_private_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
+
+/**
+ * @brief Defines mod\#mid and make it a module function.
+ * @see ::rb_define_module_function
+ * @param mod Where the method lives.
+ * @param mid Name of the defining method.
+ * @param func Implementation of mod\#mid.
+ * @param arity Arity of mod\#mid.
+ */
+#define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
+
+/**
+ * @brief Defines ::rb_mKerbel \#mid.
+ * @see ::rb_define_global_function
+ * @param mid Name of the defining method.
+ * @param func Implementation of ::rb_mKernel \#mid.
+ * @param arity Arity of ::rb_mKernel \#mid.
+ */
+#define rb_define_global_function(mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
+
+#endif /* __cplusplus */
+
+#if defined(RBIMPL_CAST_FN_PTR) && !defined(__cplusplus)
+/* In C23, K&R style prototypes are gone and so `void foo(ANYARGS)` became
+ * equivalent to `void foo(void)` unlike in earlier versions. This is a problem
+ * for rb_define_* functions since that makes all valid functions one can pass
+ * trip -Wincompatible-pointer-types, which we treat as errors. This is mostly
+ * not a problem for the __builtin_choose_expr path, but outside of that we
+ * need to add a cast for compatibility.
+ */
+#define rb_define_method(klass, mid, func, arity) rb_define_method((klass), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_method_id(klass, mid, func, arity) rb_define_method_id((klass), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_singleton_method(obj, mid, func, arity) rb_define_singleton_method((obj), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_protected_method(klass, mid, func, arity) rb_define_protected_method((klass), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_private_method(klass, mid, func, arity) rb_define_private_method((klass), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_module_function(mod, mid, func, arity) rb_define_module_function((mod), (mid), (VALUE (*)(ANYARGS))(func), (arity))
+#define rb_define_global_function(mid, func, arity) rb_define_global_function((mid), (VALUE (*)(ANYARGS))(func), (arity))
+
+#undef RBIMPL_CAST_FN_PTR
+#endif /* defined(RBIMPL_CAST_FN_PTR) && !defined(__cplusplus) */
+
+/**
+ * This macro is to properly cast a function parameter of *_define_method
+ * family. It has been around since 1.x era so you can maximise backwards
+ * compatibility by using it.
+ *
+ * ```CXX
+ * rb_define_method(klass, "method", RUBY_METHOD_FUNC(func), arity);
+ * ```
+ *
+ * @param func A pointer to a function that implements a method.
+ */
+#if ! defined(RUBY_DEVEL)
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
+
+#elif ! RUBY_DEVEL
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
+
+#elif ! defined(rb_define_method)
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
+
+#else
+# define RUBY_METHOD_FUNC(func) (func)
+
+#endif
+
+#endif /* RBIMPL_ANYARGS_H */
diff --git a/include/ruby/internal/arithmetic.h b/include/ruby/internal/arithmetic.h
new file mode 100644
index 0000000000..7ebb4a86f1
--- /dev/null
+++ b/include/ruby/internal/arithmetic.h
@@ -0,0 +1,39 @@
+#ifndef RBIMPL_ARITHMETIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Conversion between C's arithmetic types and Ruby's numeric
+ * types.
+ */
+#include "ruby/internal/arithmetic/char.h"
+#include "ruby/internal/arithmetic/double.h"
+#include "ruby/internal/arithmetic/fixnum.h"
+#include "ruby/internal/arithmetic/gid_t.h"
+#include "ruby/internal/arithmetic/int.h"
+#include "ruby/internal/arithmetic/intptr_t.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/arithmetic/long_long.h"
+#include "ruby/internal/arithmetic/mode_t.h"
+#include "ruby/internal/arithmetic/off_t.h"
+#include "ruby/internal/arithmetic/pid_t.h"
+#include "ruby/internal/arithmetic/short.h"
+#include "ruby/internal/arithmetic/size_t.h"
+#include "ruby/internal/arithmetic/st_data_t.h"
+#include "ruby/internal/arithmetic/uid_t.h"
+#endif /* RBIMPL_ARITHMETIC_H */
diff --git a/include/ruby/internal/arithmetic/char.h b/include/ruby/internal/arithmetic/char.h
new file mode 100644
index 0000000000..920fdc0c9d
--- /dev/null
+++ b/include/ruby/internal/arithmetic/char.h
@@ -0,0 +1,81 @@
+#ifndef RBIMPL_ARITHMETIC_CHAR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_CHAR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `char` and Ruby's.
+ */
+#include "ruby/internal/arithmetic/int.h" /* NUM2INT is here, but */
+#include "ruby/internal/arithmetic/long.h" /* INT2FIX is here.*/
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rstring.h"
+#include "ruby/internal/value_type.h"
+
+#define RB_NUM2CHR rb_num2char_inline /**< @alias{rb_num2char_inline} */
+#define NUM2CHR RB_NUM2CHR /**< @old{RB_NUM2CHR} */
+#define CHR2FIX RB_CHR2FIX /**< @old{RB_CHR2FIX} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_CHR2FIX RB_CHR2FIX
+/** @endcond */
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Converts a C's `unsigned char` into an instance of ::rb_cInteger.
+ *
+ * @param[in] c Arbitrary `unsigned char` value.
+ * @return An instance of ::rb_cInteger.
+ *
+ * @internal
+ *
+ * Nobody explicitly states this but in Ruby, a char means an unsigned integer
+ * value of range 0..255. This is a general principle. AFAIK there is no
+ * single line of code where char is signed.
+ */
+static inline VALUE
+RB_CHR2FIX(unsigned char c)
+{
+ return RB_INT2FIX(c);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `char`. At the same time it
+ * accepts a String of more than one character, and returns its first byte. In
+ * the early days there was a Ruby level "character" literal `?c`, which
+ * roughly worked this way.
+ *
+ * @param[in] x Either a string or a numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `unsigned int`.
+ * @return The passed value converted into C's `char`.
+ */
+static inline char
+rb_num2char_inline(VALUE x)
+{
+ if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1))
+ return RSTRING_PTR(x)[0];
+ else
+ return RBIMPL_CAST((char)RB_NUM2INT(x));
+}
+
+#endif /* RBIMPL_ARITHMETIC_CHAR_H */
diff --git a/include/ruby/internal/arithmetic/double.h b/include/ruby/internal/arithmetic/double.h
new file mode 100644
index 0000000000..229de47aef
--- /dev/null
+++ b/include/ruby/internal/arithmetic/double.h
@@ -0,0 +1,72 @@
+#ifndef RBIMPL_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_DOUBLE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `double` and Ruby's.
+ */
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+#define NUM2DBL rb_num2dbl /**< @old{rb_num2dbl} */
+#define RFLOAT_VALUE rb_float_value /**< @old{rb_float_value} */
+#define DBL2NUM rb_float_new /**< @old{rb_float_new} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Converts an instance of ::rb_cNumeric into C's `double`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @return The passed value converted into C's `double`.
+ */
+double rb_num2dbl(VALUE num);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Extracts its double value from an instance of ::rb_cFloat.
+ *
+ * @param[in] num An instance of ::rb_cFloat.
+ * @pre Must not pass anything other than a Fixnum.
+ * @return The passed value converted into C's `double`.
+ */
+double rb_float_value(VALUE num);
+
+/**
+ * Converts a C's `double` into an instance of ::rb_cFloat.
+ *
+ * @param[in] d Arbitrary `double` value.
+ * @return An instance of ::rb_cFloat.
+ */
+VALUE rb_float_new(double d);
+
+/**
+ * Identical to rb_float_new(), except it does not generate Flonums.
+ *
+ * @param[in] d Arbitrary `double` value.
+ * @return An instance of ::rb_cFloat.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea why it is here.
+ */
+VALUE rb_float_new_in_heap(double d);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_ARITHMETIC_DOUBLE_H */
diff --git a/include/ruby/internal/arithmetic/fixnum.h b/include/ruby/internal/arithmetic/fixnum.h
new file mode 100644
index 0000000000..c8927ac824
--- /dev/null
+++ b/include/ruby/internal/arithmetic/fixnum.h
@@ -0,0 +1,60 @@
+#ifndef RBIMPL_ARITHMETIC_FIXNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_FIXNUM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Handling of integers formerly known as Fixnums.
+ */
+#include "ruby/backward/2/limits.h"
+
+#define FIXABLE RB_FIXABLE /**< @old{RB_FIXABLE} */
+#define FIXNUM_MAX RUBY_FIXNUM_MAX /**< @old{RUBY_FIXNUM_MAX} */
+#define FIXNUM_MIN RUBY_FIXNUM_MIN /**< @old{RUBY_FIXNUM_MIN} */
+#define NEGFIXABLE RB_NEGFIXABLE /**< @old{RB_NEGFIXABLE} */
+#define POSFIXABLE RB_POSFIXABLE /**< @old{RB_POSFIXABLE} */
+
+/**
+ * Checks if the passed value is in range of fixnum, assuming it is a positive
+ * number. Can sometimes be useful for C's unsigned integer types.
+ *
+ * @internal
+ *
+ * FIXABLE can be applied to anything, from double to intmax_t. The problem is
+ * double. On a 64bit system RUBY_FIXNUM_MAX is 4,611,686,018,427,387,903,
+ * which is not representable by a double. The nearest value that a double can
+ * represent is 4,611,686,018,427,387,904, which is not fixable. The
+ * seemingly-strange "< FIXNUM_MAX + 1" expression below is due to this.
+ */
+#define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1)
+
+/**
+ * Checks if the passed value is in range of fixnum, assuming it is a negative
+ * number. This is an implementation of #RB_FIXABLE. Rarely used stand alone.
+ */
+#define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN)
+
+/** Checks if the passed value is in range of fixnum */
+#define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_))
+
+/** Maximum possible value that a fixnum can represent. */
+#define RUBY_FIXNUM_MAX (LONG_MAX / 2)
+
+/** Minimum possible value that a fixnum can represent. */
+#define RUBY_FIXNUM_MIN (LONG_MIN / 2)
+
+#endif /* RBIMPL_ARITHMETIC_FIXNUM_H */
diff --git a/include/ruby/internal/arithmetic/gid_t.h b/include/ruby/internal/arithmetic/gid_t.h
new file mode 100644
index 0000000000..361220bfab
--- /dev/null
+++ b/include/ruby/internal/arithmetic/gid_t.h
@@ -0,0 +1,41 @@
+#ifndef RBIMPL_ARITHMETIC_GID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_GID_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `gid_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/long.h"
+
+/** Converts a C's `gid_t` into an instance of ::rb_cInteger. */
+#ifndef GIDT2NUM
+# define GIDT2NUM RB_LONG2NUM
+#endif
+
+/** Converts an instance of ::rb_cNumeric into C's `gid_t`. */
+#ifndef NUM2GIDT
+# define NUM2GIDT RB_NUM2LONG
+#endif
+
+/** A rb_sprintf() format prefix to be used for a `gid_t` parameter. */
+#ifndef PRI_GIDT_PREFIX
+# define PRI_GIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
+#endif /* RBIMPL_ARITHMETIC_GID_T_H */
diff --git a/include/ruby/internal/arithmetic/int.h b/include/ruby/internal/arithmetic/int.h
new file mode 100644
index 0000000000..6bd8ec2184
--- /dev/null
+++ b/include/ruby/internal/arithmetic/int.h
@@ -0,0 +1,264 @@
+#ifndef RBIMPL_ARITHMETIC_INT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_INT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `int` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/fixnum.h"
+#include "ruby/internal/arithmetic/intptr_t.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/compiler_is.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/warning_push.h"
+#include "ruby/assert.h"
+
+#define RB_INT2NUM rb_int2num_inline /**< @alias{rb_int2num_inline} */
+#define RB_NUM2INT rb_num2int_inline /**< @alias{rb_num2int_inline} */
+#define RB_UINT2NUM rb_uint2num_inline /**< @alias{rb_uint2num_inline} */
+
+#define FIX2INT RB_FIX2INT /**< @old{RB_FIX2INT} */
+#define FIX2UINT RB_FIX2UINT /**< @old{RB_FIX2UINT} */
+#define INT2NUM RB_INT2NUM /**< @old{RB_INT2NUM} */
+#define NUM2INT RB_NUM2INT /**< @old{RB_NUM2INT} */
+#define NUM2UINT RB_NUM2UINT /**< @old{RB_NUM2UINT} */
+#define UINT2NUM RB_UINT2NUM /**< @old{RB_UINT2NUM} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_FIX2INT RB_FIX2INT
+#define RB_NUM2UINT RB_NUM2UINT
+#define RB_FIX2UINT RB_FIX2UINT
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `int`.
+ * @return The passed value converted into C's `long`.
+ *
+ * @internal
+ *
+ * Yes, the API is really strange. It returns `long`, but raises when the
+ * value is out of `int`. This seems to be due to the fact that Matz favoured
+ * K&R before, and his machine at that moment was an ILP32 architecture.
+ */
+long rb_num2int(VALUE num);
+
+/**
+ * Identical to rb_num2int().
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `int`.
+ * @return The passed value converted into C's `long`.
+ *
+ * @internal
+ *
+ * This function seems to be a complete waste of disk space. @shyouhei has no
+ * idea why this is a different thing from rb_num2short().
+ */
+long rb_fix2int(VALUE num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned int`.
+ * @return The passed value converted into C's `unsigned long`.
+ *
+ * @internal
+ *
+ * Yes, the API is really strange. It returns `unsigned long`, but raises when
+ * the value is out of `unsigned int`. This seems to be due to the fact that
+ * Matz favoured K&R before, and his machine at that moment was an ILP32
+ * architecture.
+ */
+unsigned long rb_num2uint(VALUE num);
+
+/**
+ * Identical to rb_num2uint().
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned int`.
+ * @return The passed value converted into C's `unsigned long`.
+ *
+ * @internal
+ *
+ * This function seems to be a complete waste of disk space. @shyouhei has no
+ * idea why this is a different thing from rb_num2short().
+ */
+unsigned long rb_fix2uint(VALUE num);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Converts a Fixnum into C's `int`.
+ *
+ * @param[in] x Some Fixnum.
+ * @pre Must not pass anything other than a Fixnum.
+ * @return The passed value converted into C's `int`.
+ */
+static inline int
+RB_FIX2INT(VALUE x)
+{
+ /* "FIX2INT raises a TypeError if passed nil", says rubyspec. Not sure if
+ * that is a desired behaviour but just preserve backwards compatilibily.
+ */
+#if 0
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+#endif
+ long ret;
+
+ if /* constexpr */ (sizeof(int) < sizeof(long)) {
+ ret = rb_fix2int(x);
+ }
+ else {
+ ret = RB_FIX2LONG(x);
+ }
+
+ return RBIMPL_CAST((int)ret);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `int`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `int`.
+ * @return The passed value converted into C's `int`.
+ */
+static inline int
+rb_num2int_inline(VALUE x)
+{
+ long ret;
+
+ if /* constexpr */ (sizeof(int) == sizeof(long)) {
+ ret = RB_NUM2LONG(x);
+ }
+ else if (RB_FIXNUM_P(x)) {
+ ret = rb_fix2int(x);
+ }
+ else {
+ ret = rb_num2int(x);
+ }
+
+ return RBIMPL_CAST((int)ret);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned int`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `unsigned int`.
+ * @return The passed value converted into C's `unsigned int`.
+ */
+RBIMPL_ATTR_ARTIFICIAL()
+static inline unsigned int
+RB_NUM2UINT(VALUE x)
+{
+ unsigned long ret;
+
+ if /* constexpr */ (sizeof(int) < sizeof(long)) {
+ ret = rb_num2uint(x);
+ }
+ else {
+ ret = RB_NUM2ULONG(x);
+ }
+
+ return RBIMPL_CAST((unsigned int)ret);
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Converts a Fixnum into C's `int`.
+ *
+ * @param[in] x Some Fixnum.
+ * @pre Must not pass anything other than a Fixnum.
+ * @return The passed value converted into C's `int`.
+ */
+static inline unsigned int
+RB_FIX2UINT(VALUE x)
+{
+#if 0 /* Ditto for RB_FIX2INT. */
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+#endif
+ unsigned long ret;
+
+ if /* constexpr */ (sizeof(int) < sizeof(long)) {
+ ret = rb_fix2uint(x);
+ }
+ else {
+ ret = RB_FIX2ULONG(x);
+ }
+
+ return RBIMPL_CAST((unsigned int)ret);
+}
+
+RBIMPL_WARNING_PUSH()
+#if RBIMPL_COMPILER_IS(GCC)
+RBIMPL_WARNING_IGNORED(-Wtype-limits) /* We can ignore them here. */
+#elif RBIMPL_HAS_WARNING("-Wtautological-constant-out-of-range-compare")
+RBIMPL_WARNING_IGNORED(-Wtautological-constant-out-of-range-compare)
+#endif
+
+/**
+ * Converts a C's `int` into an instance of ::rb_cInteger.
+ *
+ * @param[in] v Arbitrary `int` value.
+ * @return An instance of ::rb_cInteger.
+ */
+static inline VALUE
+rb_int2num_inline(int v)
+{
+ if (RB_FIXABLE(v))
+ return RB_INT2FIX(v);
+ else
+ return rb_int2big(v);
+}
+
+/**
+ * Converts a C's `unsigned int` into an instance of ::rb_cInteger.
+ *
+ * @param[in] v Arbitrary `unsigned int` value.
+ * @return An instance of ::rb_cInteger.
+ */
+static inline VALUE
+rb_uint2num_inline(unsigned int v)
+{
+ if (RB_POSFIXABLE(v))
+ return RB_LONG2FIX(v);
+ else
+ return rb_uint2big(v);
+}
+
+RBIMPL_WARNING_POP()
+
+#endif /* RBIMPL_ARITHMETIC_INT_H */
diff --git a/include/ruby/internal/arithmetic/intptr_t.h b/include/ruby/internal/arithmetic/intptr_t.h
new file mode 100644
index 0000000000..a354f4469c
--- /dev/null
+++ b/include/ruby/internal/arithmetic/intptr_t.h
@@ -0,0 +1,74 @@
+#ifndef RBIMPL_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_INTPTR_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `intptr_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "ruby/internal/value.h"
+#include "ruby/internal/dllexport.h"
+
+#define rb_int_new rb_int2inum /**< @alias{rb_int2inum} */
+#define rb_uint_new rb_uint2inum /**< @alias{rb_uint2inum} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i Arbitrary `intptr_t` value.
+ * @return An instance of ::rb_cInteger.
+ * @note This function always allocates Bignums, even if the given number
+ * is small enough to fit into a Fixnum.
+ */
+VALUE rb_int2big(intptr_t i);
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i Arbitrary `intptr_t` value.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_int2inum(intptr_t i);
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i Arbitrary `intptr_t` value.
+ * @return An instance of ::rb_cInteger.
+ * @note This function always allocates Bignums, even if the given number
+ * is small enough to fit into a Fixnum.
+ */
+VALUE rb_uint2big(uintptr_t i);
+
+/**
+ * Converts a C's `uintptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i Arbitrary `uintptr_t` value.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_uint2inum(uintptr_t i);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_ARITHMETIC_INTPTR_T_H */
diff --git a/include/ruby/internal/arithmetic/long.h b/include/ruby/internal/arithmetic/long.h
new file mode 100644
index 0000000000..6b8fd8ffc3
--- /dev/null
+++ b/include/ruby/internal/arithmetic/long.h
@@ -0,0 +1,356 @@
+#ifndef RBIMPL_ARITHMETIC_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_LONG_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `long` and Ruby's.
+ *
+ * ### Q&A ###
+ *
+ * - Q: Why are INT2FIX etc. here, not in `int.h`?
+ *
+ * - A: Because they are in fact handling `long`. It seems someone did not
+ * understand the difference of `int` and `long` when they designed those
+ * macros.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/fixnum.h" /* FIXABLE */
+#include "ruby/internal/arithmetic/intptr_t.h" /* rb_int2big etc.*/
+#include "ruby/internal/assume.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h" /* FIXNUM_FLAG */
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+
+#define FIX2LONG RB_FIX2LONG /**< @old{RB_FIX2LONG} */
+#define FIX2ULONG RB_FIX2ULONG /**< @old{RB_FIX2ULONG} */
+#define INT2FIX RB_INT2FIX /**< @old{RB_INT2FIX} */
+#define LONG2FIX RB_INT2FIX /**< @old{RB_INT2FIX} */
+#define LONG2NUM RB_LONG2NUM /**< @old{RB_LONG2NUM} */
+#define NUM2LONG RB_NUM2LONG /**< @old{RB_NUM2LONG} */
+#define NUM2ULONG RB_NUM2ULONG /**< @old{RB_NUM2ULONG} */
+#define RB_FIX2LONG rb_fix2long /**< @alias{rb_fix2long} */
+#define RB_FIX2ULONG rb_fix2ulong /**< @alias{rb_fix2ulong} */
+#define RB_LONG2FIX RB_INT2FIX /**< @alias{RB_INT2FIX} */
+#define RB_LONG2NUM rb_long2num_inline /**< @alias{rb_long2num_inline} */
+#define RB_NUM2LONG rb_num2long_inline /**< @alias{rb_num2long_inline} */
+#define RB_NUM2ULONG rb_num2ulong_inline /**< @alias{rb_num2ulong_inline} */
+#define RB_ULONG2NUM rb_ulong2num_inline /**< @alias{rb_ulong2num_inline} */
+#define ULONG2NUM RB_ULONG2NUM /**< @old{RB_ULONG2NUM} */
+#define rb_fix_new RB_INT2FIX /**< @alias{RB_INT2FIX} */
+#define rb_long2int rb_long2int_inline /**< @alias{rb_long2int_inline} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_INT2FIX RB_INT2FIX
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_COLD()
+/**
+ * This is an utility function to raise an ::rb_eRangeError.
+ *
+ * @param[in] num A signed value about to overflow.
+ * @exception rb_eRangeError `num` is out of range of `int`.
+ */
+void rb_out_of_int(SIGNED_VALUE num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `long`.
+ * @return The passed value converted into C's `long`.
+ */
+long rb_num2long(VALUE num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned long`.
+ * @return The passed value converted into C's `unsigned long`.
+ */
+unsigned long rb_num2ulong(VALUE num);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Converts a C's `long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i Arbitrary `long` value.
+ * @return An instance of ::rb_cInteger.
+ */
+static inline VALUE
+RB_INT2FIX(long i)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(i));
+
+ /* :NOTE: VALUE can be wider than long. As j being unsigned, 2j+1 is fully
+ * defined. Also it can be compiled into a single LEA instruction. */
+ const unsigned long j = i;
+ const unsigned long k = (j << 1) + RUBY_FIXNUM_FLAG;
+ const long l = k;
+ const SIGNED_VALUE m = l; /* Sign extend */
+ const VALUE n = m;
+
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(n));
+ return n;
+}
+
+/**
+ * Checks if `int` can hold the given integer.
+ *
+ * @param[in] n Arbitrary `long` value.
+ * @exception rb_eRangeError `n` is out of range of `int`.
+ * @return Identical value of type `int`
+ */
+static inline int
+rb_long2int_inline(long n)
+{
+ int i = RBIMPL_CAST((int)n);
+
+ if /* constexpr */ (sizeof(long) <= sizeof(int)) {
+ RBIMPL_ASSUME(i == n);
+ }
+
+ if (i != n)
+ rb_out_of_int(n);
+
+ return i;
+}
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_fix2long(). People don't use it
+ * directly.
+ *
+ * @param[in] x A Fixnum.
+ * @return Identical value of type `long`
+ * @pre Must not pass anything other than a Fixnum.
+ */
+static inline long
+rbimpl_fix2long_by_idiv(VALUE x)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+
+ /* :NOTE: VALUE can be wider than long. (x-1)/2 never overflows because
+ * RB_FIXNUM_P(x) holds. Also it has no portability issue like y>>1
+ * below. */
+ const SIGNED_VALUE y = x - RUBY_FIXNUM_FLAG;
+ const SIGNED_VALUE z = y / 2;
+ const long w = RBIMPL_CAST((long)z);
+
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w));
+ return w;
+}
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_fix2long(). People don't use it
+ * directly.
+ *
+ * @param[in] x A Fixnum.
+ * @return Identical value of type `long`
+ * @pre Must not pass anything other than a Fixnum.
+ */
+static inline long
+rbimpl_fix2long_by_shift(VALUE x)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+
+ /* :NOTE: VALUE can be wider than long. If right shift is arithmetic, this
+ * is noticeably faster than above. */
+ const SIGNED_VALUE y = x;
+ const SIGNED_VALUE z = y >> 1;
+ const long w = RBIMPL_CAST((long)z);
+
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w));
+ return w;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_fix2long(). People don't use it
+ * directly.
+ *
+ * @retval true This C compiler's right shift operator is arithmetic.
+ * @retval false This C compiler's right shift operator is logical.
+ */
+static inline bool
+rbimpl_right_shift_is_arithmetic_p(void)
+{
+ return (-1 >> 1) == -1;
+}
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+/**
+ * Converts a Fixnum into C's `long`.
+ *
+ * @param[in] x Some Fixnum.
+ * @pre Must not pass anything other than a Fixnum.
+ * @return The passed value converted into C's `long`.
+ */
+static inline long
+rb_fix2long(VALUE x)
+{
+ if /* constexpr */ (rbimpl_right_shift_is_arithmetic_p()) {
+ return rbimpl_fix2long_by_shift(x);
+ }
+ else {
+ return rbimpl_fix2long_by_idiv(x);
+ }
+}
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+/**
+ * Converts a Fixnum into C's `unsigned long`.
+ *
+ * @param[in] x Some Fixnum.
+ * @pre Must not pass anything other than a Fixnum.
+ * @return The passed value converted into C's `unsigned long`.
+ * @note Negative fixnums will be converted into large unsigned longs.
+ */
+static inline unsigned long
+rb_fix2ulong(VALUE x)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ return rb_fix2long(x);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `long`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `long`.
+ * @return The passed value converted into C's `long`.
+ */
+static inline long
+rb_num2long_inline(VALUE x)
+{
+ if (RB_FIXNUM_P(x))
+ return RB_FIX2LONG(x);
+ else
+ return rb_num2long(x);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned long`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `unsigned long`.
+ * @return The passed value converted into C's `unsigned long`.
+ *
+ * @internal
+ *
+ * This (negative fixnum would become a large unsigned long while negative
+ * bignum is an exception) has been THE behaviour of NUM2ULONG since the
+ * beginning. It is strange, but we can no longer change how it works at this
+ * moment. We have to get by with it.
+ *
+ * @see https://bugs.ruby-lang.org/issues/9089
+ */
+static inline unsigned long
+rb_num2ulong_inline(VALUE x)
+{
+ if (RB_FIXNUM_P(x))
+ return RB_FIX2ULONG(x);
+ else
+ return rb_num2ulong(x);
+}
+
+/**
+ * Converts a C's `long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] v Arbitrary `long` value.
+ * @return An instance of ::rb_cInteger.
+ */
+static inline VALUE
+rb_long2num_inline(long v)
+{
+ if (RB_FIXABLE(v))
+ return RB_LONG2FIX(v);
+ else
+ return rb_int2big(v);
+}
+
+/**
+ * Converts a C's `unsigned long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] v Arbitrary `unsigned long` value.
+ * @return An instance of ::rb_cInteger.
+ */
+static inline VALUE
+rb_ulong2num_inline(unsigned long v)
+{
+ if (RB_POSFIXABLE(v))
+ return RB_LONG2FIX(v);
+ else
+ return rb_uint2big(v);
+}
+
+/**
+ * @cond INTERNAL_MACRO
+ *
+ * Following overload is necessary because sometimes INT2FIX is used as a enum
+ * value (e.g. `enum { FOO = INT2FIX(0) };`). THIS IS NG in theory because a
+ * VALUE does not fit into an enum (which must be a signed int). But we cannot
+ * break existing codes.
+ */
+#if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14
+# /* C++ can write constexpr as enum values. */
+
+#elif ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
+# undef INT2FIX
+# define INT2FIX(i) (RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG)
+
+#else
+# undef INT2FIX
+# define INT2FIX(i) \
+ __builtin_choose_expr( \
+ __builtin_constant_p(i), \
+ RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, \
+ RB_INT2FIX(i))
+#endif
+/** @endcond */
+
+#endif /* RBIMPL_ARITHMETIC_LONG_H */
diff --git a/include/ruby/internal/arithmetic/long_long.h b/include/ruby/internal/arithmetic/long_long.h
new file mode 100644
index 0000000000..65dec8729d
--- /dev/null
+++ b/include/ruby/internal/arithmetic/long_long.h
@@ -0,0 +1,135 @@
+#ifndef RBIMPL_ARITHMETIC_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_LONG_LONG_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `long long` and Ruby's.
+ */
+#include "ruby/internal/value.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/backward/2/long_long.h"
+
+#define RB_LL2NUM rb_ll2num_inline /**< @alias{rb_ll2num_inline} */
+#define RB_ULL2NUM rb_ull2num_inline /**< @alias{rb_ull2num_inline} */
+#define LL2NUM RB_LL2NUM /**< @old{RB_LL2NUM} */
+#define ULL2NUM RB_ULL2NUM /**< @old{RB_ULL2NUM} */
+#define RB_NUM2LL rb_num2ll_inline /**< @alias{rb_num2ll_inline} */
+#define RB_NUM2ULL rb_num2ull_inline /**< @alias{rb_num2ull_inline} */
+#define NUM2LL RB_NUM2LL /**< @old{RB_NUM2LL} */
+#define NUM2ULL RB_NUM2ULL /**< @old{RB_NUM2ULL} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Converts a C's `long long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] num Arbitrary `long long` value.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_ll2inum(LONG_LONG num);
+
+/**
+ * Converts a C's `unsigned long long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] num Arbitrary `unsigned long long` value.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_ull2inum(unsigned LONG_LONG num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `long long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `long long`.
+ * @return The passed value converted into C's `long long`.
+ */
+LONG_LONG rb_num2ll(VALUE num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned long long`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned long long`.
+ * @return The passed value converted into C's `unsigned long long`.
+ */
+unsigned LONG_LONG rb_num2ull(VALUE num);
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Converts a C's `long long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] n Arbitrary `long long` value.
+ * @return An instance of ::rb_cInteger
+ */
+static inline VALUE
+rb_ll2num_inline(LONG_LONG n)
+{
+ if (FIXABLE(n)) return LONG2FIX((long)n);
+ return rb_ll2inum(n);
+}
+
+/**
+ * Converts a C's `unsigned long long` into an instance of ::rb_cInteger.
+ *
+ * @param[in] n Arbitrary `unsigned long long` value.
+ * @return An instance of ::rb_cInteger
+ */
+static inline VALUE
+rb_ull2num_inline(unsigned LONG_LONG n)
+{
+ if (POSFIXABLE(n)) return LONG2FIX((long)n);
+ return rb_ull2inum(n);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `long long`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `long long`.
+ * @return The passed value converted into C's `long long`.
+ */
+static inline LONG_LONG
+rb_num2ll_inline(VALUE x)
+{
+ if (RB_FIXNUM_P(x))
+ return RB_FIX2LONG(x);
+ else
+ return rb_num2ll(x);
+}
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned long long`.
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `unsigned long long`.
+ * @return The passed value converted into C's `unsigned long long`.
+ */
+static inline unsigned LONG_LONG
+rb_num2ull_inline(VALUE x)
+{
+ if (RB_FIXNUM_P(x))
+ return RB_FIX2LONG(x);
+ else
+ return rb_num2ull(x);
+}
+
+#endif /* RBIMPL_ARITHMETIC_LONG_LONG_H */
diff --git a/include/ruby/internal/arithmetic/mode_t.h b/include/ruby/internal/arithmetic/mode_t.h
new file mode 100644
index 0000000000..5b7ad35fbc
--- /dev/null
+++ b/include/ruby/internal/arithmetic/mode_t.h
@@ -0,0 +1,41 @@
+#ifndef RBIMPL_ARITHMETIC_MODE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_MODE_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `mode_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/int.h"
+
+/** Converts a C's `mode_t` into an instance of ::rb_cInteger. */
+#ifndef NUM2MODET
+# define NUM2MODET RB_NUM2INT
+#endif
+
+/** Converts an instance of ::rb_cNumeric into C's `mode_t`. */
+#ifndef MODET2NUM
+# define MODET2NUM RB_INT2NUM
+#endif
+
+/** A rb_sprintf() format prefix to be used for a `mode_t` parameter. */
+#ifndef PRI_MODET_PREFIX
+# define PRI_MODET_PREFIX PRI_INT_PREFIX
+#endif
+
+#endif /* RBIMPL_ARITHMETIC_MODE_T_H */
diff --git a/include/ruby/internal/arithmetic/off_t.h b/include/ruby/internal/arithmetic/off_t.h
new file mode 100644
index 0000000000..0ec9362cc9
--- /dev/null
+++ b/include/ruby/internal/arithmetic/off_t.h
@@ -0,0 +1,62 @@
+#ifndef RBIMPL_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_OFF_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `off_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/int.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/arithmetic/long_long.h"
+#include "ruby/backward/2/long_long.h"
+
+/** Converts a C's `off_t` into an instance of ::rb_cInteger. */
+#ifdef OFFT2NUM
+# /* take that. */
+#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
+# define OFFT2NUM RB_LL2NUM
+#elif SIZEOF_OFF_T == SIZEOF_LONG
+# define OFFT2NUM RB_LONG2NUM
+#else
+# define OFFT2NUM RB_INT2NUM
+#endif
+
+/** Converts an instance of ::rb_cNumeric into C's `off_t`. */
+#ifdef NUM2OFFT
+# /* take that. */
+#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
+# define NUM2OFFT RB_NUM2LL
+#elif SIZEOF_OFF_T == SIZEOF_LONG
+# define NUM2OFFT RB_NUM2LONG
+#else
+# define NUM2OFFT RB_NUM2INT
+#endif
+
+/** A rb_sprintf() format prefix to be used for an `off_t` parameter. */
+#ifdef PRI_OFFT_PREFIX
+# /* take that. */
+#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
+# define PRI_OFFT_PREFIX PRI_LL_PREFIX
+#elif SIZEOF_OFF_T == SIZEOF_LONG
+# define PRI_OFFT_PREFIX PRI_LONG_PREFIX
+#else
+# define PRI_OFFT_PREFIX PRI_INT_PREFIX
+#endif
+
+#endif /* RBIMPL_ARITHMETIC_OFF_T_H */
diff --git a/include/ruby/internal/arithmetic/pid_t.h b/include/ruby/internal/arithmetic/pid_t.h
new file mode 100644
index 0000000000..df9704e8f5
--- /dev/null
+++ b/include/ruby/internal/arithmetic/pid_t.h
@@ -0,0 +1,41 @@
+#ifndef RBIMPL_ARITHMETIC_PID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_PID_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `pid_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/long.h"
+
+/** Converts a C's `pid_t` into an instance of ::rb_cInteger. */
+#ifndef PIDT2NUM
+# define PIDT2NUM RB_LONG2NUM
+#endif
+
+/** Converts an instance of ::rb_cNumeric into C's `pid_t`. */
+#ifndef NUM2PIDT
+# define NUM2PIDT RB_NUM2LONG
+#endif
+
+/** A rb_sprintf() format prefix to be used for a `pid_t` parameter. */
+#ifndef PRI_PIDT_PREFIX
+# define PRI_PIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
+#endif /* RBIMPL_ARITHMETIC_PID_T_H */
diff --git a/include/ruby/internal/arithmetic/short.h b/include/ruby/internal/arithmetic/short.h
new file mode 100644
index 0000000000..7a324d945b
--- /dev/null
+++ b/include/ruby/internal/arithmetic/short.h
@@ -0,0 +1,113 @@
+#ifndef RBIMPL_ARITHMETIC_SHORT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_SHORT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `short` and Ruby's.
+ *
+ * Shyouhei wonders: why there is no SHORT2NUM, given there are both
+ * #USHORT2NUM and #CHR2FIX?
+ */
+#include "ruby/internal/value.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h"
+
+#define RB_NUM2SHORT rb_num2short_inline /**< @alias{rb_num2short_inline} */
+#define RB_NUM2USHORT rb_num2ushort /**< @alias{rb_num2ushort} */
+#define NUM2SHORT RB_NUM2SHORT /**< @old{RB_NUM2SHORT} */
+#define NUM2USHORT RB_NUM2USHORT /**< @old{RB_NUM2USHORT} */
+#define USHORT2NUM RB_INT2FIX /**< @old{RB_INT2FIX} */
+#define RB_FIX2SHORT rb_fix2short /**< @alias{rb_fix2ushort} */
+#define FIX2SHORT RB_FIX2SHORT /**< @old{RB_FIX2SHORT} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `short`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `short`.
+ * @return The passed value converted into C's `short`.
+ */
+short rb_num2short(VALUE num);
+
+/**
+ * Converts an instance of ::rb_cNumeric into C's `unsigned short`.
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned short`.
+ * @return The passed value converted into C's `unsigned short`.
+ */
+unsigned short rb_num2ushort(VALUE num);
+
+/**
+ * Identical to rb_num2short().
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `short`.
+ * @return The passed value converted into C's `short`.
+ *
+ * @internal
+ *
+ * This function seems to be a complete waste of disk space. @shyouhei has no
+ * idea why this is a different thing from rb_num2short().
+ */
+short rb_fix2short(VALUE num);
+
+/**
+ * Identical to rb_num2ushort().
+ *
+ * @param[in] num Something numeric.
+ * @exception rb_eTypeError `num` is not a numeric.
+ * @exception rb_eRangeError `num` is out of range of `unsigned short`.
+ * @return The passed value converted into C's `unsigned short`.
+ *
+ * @internal
+ *
+ * This function seems to be a complete waste of disk space. @shyouhei has no
+ * idea why this is a different thing from rb_num2ushort().
+ */
+unsigned short rb_fix2ushort(VALUE num);
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Identical to rb_num2short().
+ *
+ * @param[in] x Something numeric.
+ * @exception rb_eTypeError `x` is not a numeric.
+ * @exception rb_eRangeError `x` is out of range of `short`.
+ * @return The passed value converted into C's `short`.
+ *
+ * @internal
+ *
+ * This function seems to be a complete waste of time. @shyouhei has no idea
+ * why this is a different thing from rb_num2short().
+ */
+static inline short
+rb_num2short_inline(VALUE x)
+{
+ if (RB_FIXNUM_P(x))
+ return rb_fix2short(x);
+ else
+ return rb_num2short(x);
+}
+
+#endif /* RBIMPL_ARITHMETIC_SHORT_H */
diff --git a/include/ruby/internal/arithmetic/size_t.h b/include/ruby/internal/arithmetic/size_t.h
new file mode 100644
index 0000000000..1082160b8e
--- /dev/null
+++ b/include/ruby/internal/arithmetic/size_t.h
@@ -0,0 +1,66 @@
+#ifndef RBIMPL_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_SIZE_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `size_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/int.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/arithmetic/long_long.h"
+#include "ruby/backward/2/long_long.h"
+
+#if defined(__DOXYGEN__)
+# /** Converts a C's `size_t` into an instance of ::rb_cInteger. */
+# define RB_SIZE2NUM RB_ULONG2NUM
+# /** Converts a C's `ssize_t` into an instance of ::rb_cInteger. */
+# define RB_SSIZE2NUM RB_LONG2NUM
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define RB_SIZE2NUM RB_ULL2NUM
+# define RB_SSIZE2NUM RB_LL2NUM
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define RB_SIZE2NUM RB_ULONG2NUM
+# define RB_SSIZE2NUM RB_LONG2NUM
+#else
+# define RB_SIZE2NUM RB_UINT2NUM
+# define RB_SSIZE2NUM RB_INT2NUM
+#endif
+
+#if defined(__DOXYGEN__)
+# /** Converts an instance of ::rb_cInteger into C's `size_t`. */
+# define RB_NUM2SIZE RB_NUM2ULONG
+# /** Converts an instance of ::rb_cInteger into C's `ssize_t`. */
+# define RB_NUM2SSIZE RB_NUM2LONG
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define RB_NUM2SIZE RB_NUM2ULL
+# define RB_NUM2SSIZE RB_NUM2LL
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define RB_NUM2SIZE RB_NUM2ULONG
+# define RB_NUM2SSIZE RB_NUM2LONG
+#else
+# define RB_NUM2SIZE RB_NUM2UINT
+# define RB_NUM2SSIZE RB_NUM2INT
+#endif
+
+#define NUM2SIZET RB_NUM2SIZE /**< @old{RB_NUM2SIZE} */
+#define SIZET2NUM RB_SIZE2NUM /**< @old{RB_SIZE2NUM} */
+#define NUM2SSIZET RB_NUM2SSIZE /**< @old{RB_NUM2SSIZE} */
+#define SSIZET2NUM RB_SSIZE2NUM /**< @old{RB_SSIZE2NUM} */
+
+#endif /* RBIMPL_ARITHMETIC_SIZE_T_H */
diff --git a/include/ruby/internal/arithmetic/st_data_t.h b/include/ruby/internal/arithmetic/st_data_t.h
new file mode 100644
index 0000000000..3bff4ffc0b
--- /dev/null
+++ b/include/ruby/internal/arithmetic/st_data_t.h
@@ -0,0 +1,75 @@
+#ifndef RBIMPL_ARITHMERIC_ST_DATA_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMERIC_ST_DATA_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `st_data_t` and Ruby's.
+ */
+#include "ruby/internal/arithmetic/fixnum.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+#include "ruby/st.h"
+
+#define ST2FIX RB_ST2FIX /**< @old{RB_ST2FIX} */
+/** @cond INTERNAL_MACRO */
+#define RB_ST2FIX RB_ST2FIX
+/** @endcond */
+
+RBIMPL_ATTR_CONST_UNLESS_DEBUG()
+RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Converts a C's `st_data_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in] i The data in question.
+ * @return A converted result
+ * @warning THIS CONVERSION LOSES DATA! Be warned.
+ * @see https://bugs.ruby-lang.org/issues/13877
+ * @see https://bugs.ruby-lang.org/issues/14218
+ *
+ * @internal
+ *
+ * This is needed because of hash functions. Hash functions return
+ * `st_data_t`, which could theoretically be bigger than Fixnums. However
+ * allocating Bignums for them every time we calculate hash values is just too
+ * heavy. To avoid penalty we need to ignore some upper bit(s) and stick to
+ * Fixnums. This function is used for that purpose.
+ */
+static inline VALUE
+RB_ST2FIX(st_data_t i)
+{
+ SIGNED_VALUE x = i;
+
+ if (x >= 0) {
+ x &= RUBY_FIXNUM_MAX;
+ }
+ else {
+ x |= RUBY_FIXNUM_MIN;
+ }
+
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(x));
+ unsigned long y = RBIMPL_CAST((unsigned long)x);
+ return RB_LONG2FIX(y);
+}
+
+#endif /* RBIMPL_ARITHMETIC_ST_DATA_T_H */
diff --git a/include/ruby/internal/arithmetic/uid_t.h b/include/ruby/internal/arithmetic/uid_t.h
new file mode 100644
index 0000000000..12cde2a9c8
--- /dev/null
+++ b/include/ruby/internal/arithmetic/uid_t.h
@@ -0,0 +1,41 @@
+#ifndef RBIMPL_ARITHMETIC_UID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_UID_T_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Arithmetic conversion between C's `uid_t` and Ruby's.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/long.h"
+
+/** Converts a C's `uid_t` into an instance of ::rb_cInteger. */
+#ifndef UIDT2NUM
+# define UIDT2NUM RB_LONG2NUM
+#endif
+
+/** Converts an instance of ::rb_cNumeric into C's `uid_t`. */
+#ifndef NUM2UIDT
+# define NUM2UIDT RB_NUM2LONG
+#endif
+
+/** A rb_sprintf() format prefix to be used for a `uid_t` parameter. */
+#ifndef PRI_UIDT_PREFIX
+# define PRI_UIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
+#endif /* RBIMPL_ARITHMETIC_UID_T_H */
diff --git a/include/ruby/internal/assume.h b/include/ruby/internal/assume.h
new file mode 100644
index 0000000000..4c183e8af9
--- /dev/null
+++ b/include/ruby/internal/assume.h
@@ -0,0 +1,87 @@
+#ifndef RBIMPL_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ASSUME_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ASSUME / #RBIMPL_UNREACHABLE.
+ *
+ * These macros must be defined at once because:
+ *
+ * - #RBIMPL_ASSUME could fallback to #RBIMPL_UNREACHABLE.
+ * - #RBIMPL_UNREACHABLE could fallback to #RBIMPL_ASSUME.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/builtin.h"
+#include "ruby/internal/warning_push.h"
+
+/** @cond INTERNAL_MACRO */
+#if defined(HAVE___ASSUME)
+# define RBIMPL_HAVE___ASSUME
+#endif
+/** @endcond */
+
+/** Wraps (or simulates) `__builtin_unreachable`. */
+#if RBIMPL_HAS_BUILTIN(__builtin_unreachable)
+# define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable()
+
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_UNREACHABLE_RETURN(_) return (__assume(0), (_))
+
+#else
+# define RBIMPL_UNREACHABLE_RETURN(_) return (_)
+#endif
+
+/** Wraps (or simulates) `__builtin_unreachable`. */
+#if RBIMPL_HAS_BUILTIN(__builtin_unreachable)
+# define RBIMPL_UNREACHABLE __builtin_unreachable
+
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_UNREACHABLE() __assume(0)
+#endif
+
+/** Wraps (or simulates) `__assume`. */
+#if RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# /* icc warnings are false positives. Ignore them. */
+# /* "warning #2261: __assume expression with side effects discarded" */
+# define RBIMPL_ASSUME(expr) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(2261) \
+ __assume(expr) \
+ RBIMPL_WARNING_POP()
+
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_ASSUME __assume
+
+#elif RBIMPL_HAS_BUILTIN(__builtin_assume)
+# define RBIMPL_ASSUME __builtin_assume
+
+#elif ! defined(RBIMPL_UNREACHABLE)
+# define RBIMPL_ASSUME(_) RBIMPL_CAST((void)(_))
+
+#else
+# define RBIMPL_ASSUME(_) \
+ (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE())
+#endif
+
+#if ! defined(RBIMPL_UNREACHABLE)
+# define RBIMPL_UNREACHABLE() RBIMPL_ASSUME(0)
+#endif
+
+#endif /* RBIMPL_ASSUME_H */
diff --git a/include/ruby/internal/attr/alloc_size.h b/include/ruby/internal/attr/alloc_size.h
new file mode 100644
index 0000000000..954a2010f6
--- /dev/null
+++ b/include/ruby/internal/attr/alloc_size.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_ALLOC_SIZE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ALLOC_SIZE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_ALLOC_SIZE.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((alloc_size))` */
+#if RBIMPL_HAS_ATTRIBUTE(alloc_size)
+# define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
+#else
+# define RBIMPL_ATTR_ALLOC_SIZE(tuple) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_ALLOC_SIZE_H */
diff --git a/include/ruby/internal/attr/artificial.h b/include/ruby/internal/attr/artificial.h
new file mode 100644
index 0000000000..ef5f36abff
--- /dev/null
+++ b/include/ruby/internal/attr/artificial.h
@@ -0,0 +1,46 @@
+#ifndef RBIMPL_ATTR_ARTIFICIAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ARTIFICIAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_ARTIFICIAL.
+ *
+ * ### Q&A ###
+ *
+ * - Q: What is this attribute? I don't get what GCC manual is talking about.
+ *
+ * - A: In short it is an attribute to manipulate GDB backtraces. The
+ * attribute makes the best sense when it comes with
+ * __attribute__((always_inline)). When a function annotated with this
+ * attribute gets inlined, and when you somehow look at a backtrace which
+ * includes such inlined call site, then the backtrace shows the caller
+ * and not the callee. This is handy for instance when an identical
+ * function is inlined more than once in a single big function. On such
+ * case it gets vital to know where the inlining happened in the callee.
+ * See also https://stackoverflow.com/a/21936099
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((artificial))` */
+#if RBIMPL_HAS_ATTRIBUTE(artificial)
+# define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__))
+#else
+# define RBIMPL_ATTR_ARTIFICIAL() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_ARTIFICIAL_H */
diff --git a/include/ruby/internal/attr/cold.h b/include/ruby/internal/attr/cold.h
new file mode 100644
index 0000000000..c68b3ae784
--- /dev/null
+++ b/include/ruby/internal/attr/cold.h
@@ -0,0 +1,37 @@
+#ifndef RBIMPL_ATTR_COLD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_COLD_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_COLD.
+ */
+#include "ruby/internal/compiler_is.h"
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((cold))` */
+#if RBIMPL_COMPILER_IS(SunPro)
+# /* Recent SunPro has __has_attribute, and is broken. */
+# /* It reports it has attribute cold, reality isn't (warnings issued). */
+# define RBIMPL_ATTR_COLD() /* void */
+#elif RBIMPL_HAS_ATTRIBUTE(cold)
+# define RBIMPL_ATTR_COLD() __attribute__((__cold__))
+#else
+# define RBIMPL_ATTR_COLD() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_COLD_H */
diff --git a/include/ruby/internal/attr/const.h b/include/ruby/internal/attr/const.h
new file mode 100644
index 0000000000..e66aa17c70
--- /dev/null
+++ b/include/ruby/internal/attr/const.h
@@ -0,0 +1,46 @@
+#ifndef RBIMPL_ATTR_CONST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_CONST_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_CONST.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+
+/** Wraps (or simulates) `__attribute__((const))` */
+#if RBIMPL_HAS_ATTRIBUTE(const)
+# define RBIMPL_ATTR_CONST() __attribute__((__const__))
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
+# /* If a function can be a const, that is also a noalias. */
+# define RBIMPL_ATTR_CONST() __declspec(noalias)
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_CONST() _Pragma("no_side_effect")
+#else
+# define RBIMPL_ATTR_CONST() /* void */
+#endif
+
+/** Enables #RBIMPL_ATTR_CONST if and only if. ! #RUBY_DEBUG. */
+#if !defined(RUBY_DEBUG) || !RUBY_DEBUG
+# define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
+#else
+# define RBIMPL_ATTR_CONST_UNLESS_DEBUG() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_CONST_H */
diff --git a/include/ruby/internal/attr/constexpr.h b/include/ruby/internal/attr/constexpr.h
new file mode 100644
index 0000000000..abc4f238b5
--- /dev/null
+++ b/include/ruby/internal/attr/constexpr.h
@@ -0,0 +1,84 @@
+#ifndef RBIMPL_ATTR_CONSTEXPR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_CONSTEXPR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief #RBIMPL_ATTR_CONSTEXPR.
+ */
+#include "ruby/internal/has/feature.h"
+#include "ruby/internal/compiler_is.h"
+
+/** @cond INTERNAL_MACRO */
+#if ! defined(__cplusplus)
+# /* Makes no sense. */
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
+
+#elif defined(__cpp_constexpr)
+# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cpp_constexpr >= 200704L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cpp_constexpr >= 201304L)
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 00)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 00)
+
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 13, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
+
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
+
+#elif RBIMPL_HAS_FEATURE(cxx_relaxed_constexpr)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 1
+
+#elif RBIMPL_HAS_FEATURE(cxx_constexpr)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
+
+#else
+# /* :FIXME: icpc must have constexpr but don't know how to detect. */
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
+#endif
+/** @endcond */
+
+/** Wraps (or simulates) C++11 `constexpr`. */
+#if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14
+# define RBIMPL_ATTR_CONSTEXPR(_) constexpr
+
+#elif RBIMPL_HAS_ATTR_CONSTEXPR_CXX11
+# define RBIMPL_ATTR_CONSTEXPR(_) RBIMPL_ATTR_CONSTEXPR_ ## _
+# define RBIMPL_ATTR_CONSTEXPR_CXX11 constexpr
+# define RBIMPL_ATTR_CONSTEXPR_CXX14 /* void */
+
+#else
+# define RBIMPL_ATTR_CONSTEXPR(_) /* void */
+#endif
+
+/** Enables #RBIMPL_ATTR_CONSTEXPR if and only if. ! #RUBY_DEBUG. */
+#if !RUBY_DEBUG
+# define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
+#else
+# define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_CONSTEXPR_H */
diff --git a/include/ruby/internal/attr/deprecated.h b/include/ruby/internal/attr/deprecated.h
new file mode 100644
index 0000000000..e1bbdbd15a
--- /dev/null
+++ b/include/ruby/internal/attr/deprecated.h
@@ -0,0 +1,75 @@
+#ifndef RBIMPL_ATTR_DEPRECATED_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_DEPRECATED_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_DEPRECATED.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/c_attribute.h"
+#include "ruby/internal/has/cpp_attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+#include "ruby/internal/has/extension.h"
+
+/** Wraps (or simulates) `[[deprecated]]` */
+#if defined(__COVERITY__)
+/* Coverity Scan emulates gcc but seems not to support this attribute correctly */
+# define RBIMPL_ATTR_DEPRECATED(msg)
+
+#elif RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+
+#elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(GCC, 10, 1, 0) && RBIMPL_COMPILER_BEFORE(GCC, 10, 3, 0)
+# /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302 */
+# define RBIMPL_ATTR_DEPRECATED(msg) /* disable until they fix this bug */
+
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+
+#elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+
+#elif RBIMPL_HAS_ATTRIBUTE(deprecated) /* but not with message. */
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__))
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated msg)
+
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated)
+
+#elif RBIMPL_HAS_CPP_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]]
+
+#elif RBIMPL_HAS_C_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]]
+
+#else
+# define RBIMPL_ATTR_DEPRECATED(msg) /* void */
+#endif
+
+/** This is when a function is used internally (for backwards compatibility
+ * etc.), but extension libraries must consider it deprecated. */
+#if defined(RUBY_EXPORT)
+# define RBIMPL_ATTR_DEPRECATED_EXT(msg) /* void */
+#else
+# define RBIMPL_ATTR_DEPRECATED_EXT(msg) RBIMPL_ATTR_DEPRECATED(msg)
+#endif
+
+#endif /* RBIMPL_ATTR_DEPRECATED_H */
diff --git a/include/ruby/internal/attr/diagnose_if.h b/include/ruby/internal/attr/diagnose_if.h
new file mode 100644
index 0000000000..cadc6ce258
--- /dev/null
+++ b/include/ruby/internal/attr/diagnose_if.h
@@ -0,0 +1,42 @@
+#ifndef RBIMPL_ATTR_DIAGNOSE_IF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_DIAGNOSE_IF_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_DIAGNOSE_IF.
+ */
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/warning_push.h"
+
+/** Wraps (or simulates) `__attribute__((diagnose_if))` */
+#if RBIMPL_COMPILER_BEFORE(Clang, 5, 0, 0)
+# /* https://bugs.llvm.org/show_bug.cgi?id=34319 */
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
+
+#elif RBIMPL_HAS_ATTRIBUTE(diagnose_if)
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wgcc-compat) \
+ __attribute__((__diagnose_if__(_, __, ___))) \
+ RBIMPL_WARNING_POP()
+
+#else
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_DIAGNOSE_IF_H */
diff --git a/include/ruby/internal/attr/enum_extensibility.h b/include/ruby/internal/attr/enum_extensibility.h
new file mode 100644
index 0000000000..eb0d5b6e9b
--- /dev/null
+++ b/include/ruby/internal/attr/enum_extensibility.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_ENUM_EXTENSIBILITY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief #RBIMPL_ATTR_ENUM_EXTENSIBILITY.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((enum_extensibility))` */
+#if RBIMPL_HAS_ATTRIBUTE(enum_extensibility)
+# define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_)))
+#else
+# define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_ENUM_EXTENSIBILITY_H */
diff --git a/include/ruby/internal/attr/error.h b/include/ruby/internal/attr/error.h
new file mode 100644
index 0000000000..2ed388a770
--- /dev/null
+++ b/include/ruby/internal/attr/error.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ERROR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_ERROR.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((error))` */
+#if RBIMPL_HAS_ATTRIBUTE(error)
+# define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg))
+#else
+# define RBIMPL_ATTR_ERROR(msg) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_ERROR_H */
diff --git a/include/ruby/internal/attr/flag_enum.h b/include/ruby/internal/attr/flag_enum.h
new file mode 100644
index 0000000000..3053d75074
--- /dev/null
+++ b/include/ruby/internal/attr/flag_enum.h
@@ -0,0 +1,33 @@
+#ifndef RBIMPL_ATTR_FLAG_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FLAG_ENUM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_FLAG_ENUM.
+ * @see https://clang.llvm.org/docs/AttributeReference.html#flag_enum
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((flag_enum)` */
+#if RBIMPL_HAS_ATTRIBUTE(flag_enum)
+# define RBIMPL_ATTR_FLAG_ENUM() __attribute__((__flag_enum__))
+#else
+# define RBIMPL_ATTR_FLAG_ENUM() /* void */
+#endif
+
+#endif /* RBIMPLATTR_FLAG_ENUM_H */
diff --git a/include/ruby/internal/attr/forceinline.h b/include/ruby/internal/attr/forceinline.h
new file mode 100644
index 0000000000..b7daafede7
--- /dev/null
+++ b/include/ruby/internal/attr/forceinline.h
@@ -0,0 +1,40 @@
+#ifndef RBIMPL_ATTR_FORCEINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FORCEINLINE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_FORCEINLINE.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+
+/**
+ * Wraps (or simulates) `__forceinline`. MSVC complains on declarations like
+ * `static inline __forceinline void foo()`. It seems MSVC's `inline` and
+ * `__forceinline` are mutually exclusive. We have to mimic that behaviour for
+ * non-MSVC compilers.
+ */
+#if RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
+# define RBIMPL_ATTR_FORCEINLINE() __forceinline
+#elif RBIMPL_HAS_ATTRIBUTE(always_inline)
+# define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
+#else
+# define RBIMPL_ATTR_FORCEINLINE() inline
+#endif
+
+#endif /* RBIMPL_ATTR_FORCEINLINE_H */
diff --git a/include/ruby/internal/attr/format.h b/include/ruby/internal/attr/format.h
new file mode 100644
index 0000000000..b3488ee00a
--- /dev/null
+++ b/include/ruby/internal/attr/format.h
@@ -0,0 +1,38 @@
+#ifndef RBIMPL_ATTR_FORMAT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FORMAT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_FORMAT.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((format))` */
+#if RBIMPL_HAS_ATTRIBUTE(format)
+# define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))
+#else
+# define RBIMPL_ATTR_FORMAT(x, y, z) /* void */
+#endif
+
+#if defined(__MINGW_PRINTF_FORMAT)
+# define RBIMPL_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
+#else
+# define RBIMPL_PRINTF_FORMAT __printf__
+#endif
+
+#endif /* RBIMPL_ATTR_FORMAT_H */
diff --git a/include/ruby/internal/attr/maybe_unused.h b/include/ruby/internal/attr/maybe_unused.h
new file mode 100644
index 0000000000..3ee8be4540
--- /dev/null
+++ b/include/ruby/internal/attr/maybe_unused.h
@@ -0,0 +1,38 @@
+#ifndef RBIMPL_ATTR_MAYBE_UNUSED_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_MAYBE_UNUSED_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_MAYBE_UNUSED.
+ */
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/c_attribute.h"
+#include "ruby/internal/has/cpp_attribute.h"
+
+/** Wraps (or simulates) `[[maybe_unused]]` */
+#if RBIMPL_HAS_CPP_ATTRIBUTE(maybe_unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
+#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
+#elif RBIMPL_HAS_ATTRIBUTE(unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__))
+#else
+# define RBIMPL_ATTR_MAYBE_UNUSED() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_MAYBE_UNUSED */
diff --git a/include/ruby/internal/attr/noalias.h b/include/ruby/internal/attr/noalias.h
new file mode 100644
index 0000000000..0790ef60e5
--- /dev/null
+++ b/include/ruby/internal/attr/noalias.h
@@ -0,0 +1,69 @@
+#ifndef RBIMPL_ATTR_NOALIAS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOALIAS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NOALIAS.
+ *
+ * ### Q&A ###
+ *
+ * - Q: There are seemingly similar attributes named #RBIMPL_ATTR_CONST,
+ * #RBIMPL_ATTR_PURE, and #RBIMPL_ATTR_NOALIAS. What are the difference?
+ *
+ * - A: Allowed operations are different.
+ *
+ * - #RBIMPL_ATTR_CONST ... Functions attributed by this are not allowed to
+ * read/write _any_ pointers at all (there are exceptional situations
+ * when reading a pointer is possible but forget that; they are too
+ * exceptional to be useful). Just remember that everything pointer-
+ * related are NG.
+ *
+ * - #RBIMPL_ATTR_PURE ... Functions attributed by this can read any
+ * nonvolatile pointers, but no writes are allowed at all. The ability
+ * to read _any_ nonvolatile pointers makes it possible to mark ::VALUE-
+ * taking functions as being pure, as long as they are read-only.
+ *
+ * - #RBIMPL_ATTR_NOALIAS ... Can both read/write, but only through
+ * pointers passed to the function as parameters. This is a typical
+ * situation when you create a C++ non-static member function which only
+ * concerns `this`. No global variables are allowed to read/write. So
+ * this is not a super-set of being pure. If you want to read something,
+ * that has to be passed to the function as a pointer. ::VALUE -taking
+ * functions thus cannot be attributed as such.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/declspec_attribute.h"
+
+/** Wraps (or simulates) `__declspec((noalias))` */
+#if RBIMPL_COMPILER_BEFORE(Clang, 12, 0, 0)
+# /*
+# * `::llvm::Attribute::ArgMemOnly` was buggy before. Maybe because nobody
+# * actually seriously used it. It seems they somehow mitigated the situation
+# * in LLVM 12. Still not found the exact changeset which fiexed the
+# * attribute, though.
+# *
+# * :FIXME: others (armclang, xlclang, ...) can also be affected?
+# */
+# define RBIMPL_ATTR_NOALIAS() /* void */
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
+# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
+#else
+# define RBIMPL_ATTR_NOALIAS() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NOALIAS_H */
diff --git a/include/ruby/internal/attr/nodiscard.h b/include/ruby/internal/attr/nodiscard.h
new file mode 100644
index 0000000000..c3ae118942
--- /dev/null
+++ b/include/ruby/internal/attr/nodiscard.h
@@ -0,0 +1,45 @@
+#ifndef RBIMPL_ATTR_NODISCARD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NODISCARD_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NODISCARD.
+ */
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/c_attribute.h"
+#include "ruby/internal/has/cpp_attribute.h"
+
+/**
+ * Wraps (or simulates) `[[nodiscard]]`. In C++ (at least since C++20) a
+ * nodiscard attribute can have a message why the result shall not be ignored.
+ * However GCC attribute and SAL annotation cannot take them.
+ */
+#if RBIMPL_HAS_CPP_ATTRIBUTE(nodiscard)
+# define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
+#elif RBIMPL_HAS_C_ATTRIBUTE(nodiscard)
+# define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
+#elif RBIMPL_HAS_ATTRIBUTE(warn_unused_result)
+# define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__))
+#elif defined(_Check_return_)
+# /* Take SAL definition. */
+# define RBIMPL_ATTR_NODISCARD() _Check_return_
+#else
+# define RBIMPL_ATTR_NODISCARD() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NODISCARD_H */
diff --git a/include/ruby/internal/attr/noexcept.h b/include/ruby/internal/attr/noexcept.h
new file mode 100644
index 0000000000..ea3001df2a
--- /dev/null
+++ b/include/ruby/internal/attr/noexcept.h
@@ -0,0 +1,91 @@
+#ifndef RBIMPL_ATTR_NOEXCEPT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOEXCEPT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NOEXCEPT.
+ *
+ * This isn't actually an attribute in C++ but who cares...
+ *
+ * Mainly due to aesthetic reasons, this one is rarely used in the project.
+ * But can be handy on occasions, especially when a function's noexcept-ness
+ * depends on its calling functions.
+ *
+ * ### Q&A ###
+ *
+ * - Q: Can a function that raises Ruby exceptions be attributed `noexcept`?
+ *
+ * - A: Yes. `noexcept` is about C++ exceptions, not Ruby's. They don't
+ * interface each other. You can safely attribute a function that raises
+ * Ruby exceptions as `noexcept`.
+ *
+ * - Q: How, then, can I assert that a function I wrote doesn't raise any Ruby
+ * exceptions?
+ *
+ * - A: `__attribute__((__leaf__))` is for that purpose. A function attributed
+ * as leaf can still throw C++ exceptions, but not Ruby's. Note however,
+ * that it's extremely difficult -- if not impossible -- to assert that a
+ * function doesn't raise any Ruby exceptions at all. Use of that
+ * attribute is not recommended; mere mortals can't properly use that by
+ * hand.
+ *
+ * - Q: Does it make sense to attribute an inline function `noexcept`?
+ *
+ * - A: I thought so before. But no, I don't think they are useful any longer.
+ *
+ * - When an inline function attributed `noexcept` actually doesn't throw
+ * any exceptions at all: these days I don't see any difference in
+ * generated assembly by adding/removing this attribute. C++ compilers
+ * get smarter and smarter. Today they can infer if it actually throws
+ * or not without any annotations by humans (correct me if I'm wrong).
+ *
+ * - When an inline function attributed `noexcepr` actually _does_ throw an
+ * exception: they have to call `std::terminate` then (C++ standard
+ * mandates so). This means exception handling routines are actually
+ * enforced, not omitted. This doesn't impact runtime performance (The
+ * Itanium C++ ABI has zero-cost exception handling), but does impact on
+ * generated binary size. This is bad.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/feature.h"
+
+/** Wraps (or simulates) C++11 `noexcept` */
+#if ! defined(__cplusplus)
+# /* Doesn't make sense. */
+# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
+
+#elif RBIMPL_HAS_FEATURE(cxx_noexcept)
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+
+#elif defined(__INTEL_CXX11_MODE__)
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+
+#elif __cplusplus >= 201103L
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+
+#else
+# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NOEXCEPT_H */
diff --git a/include/ruby/internal/attr/noinline.h b/include/ruby/internal/attr/noinline.h
new file mode 100644
index 0000000000..b7605a0c91
--- /dev/null
+++ b/include/ruby/internal/attr/noinline.h
@@ -0,0 +1,35 @@
+#ifndef RBIMPL_ATTR_NOINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOINLINE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NOINLINE.
+ */
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+
+/** Wraps (or simulates) `__declspec(noinline)` */
+#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noinline)
+# define RBIMPL_ATTR_NOINLINE() __declspec(noinline)
+#elif RBIMPL_HAS_ATTRIBUTE(noinline)
+# define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__))
+#else
+# define RBIMPL_ATTR_NOINLINE() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NOINLINE_H */
diff --git a/include/ruby/internal/attr/nonnull.h b/include/ruby/internal/attr/nonnull.h
new file mode 100644
index 0000000000..778d5be208
--- /dev/null
+++ b/include/ruby/internal/attr/nonnull.h
@@ -0,0 +1,34 @@
+#ifndef RBIMPL_ATTR_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NONNULL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NONNULL.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((nonnull))` */
+#if RBIMPL_HAS_ATTRIBUTE(nonnull)
+# define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
+# define RBIMPL_NONNULL_ARG(arg) RBIMPL_ASSERT_NOTHING
+#else
+# define RBIMPL_ATTR_NONNULL(list) /* void */
+# define RBIMPL_NONNULL_ARG(arg) RUBY_ASSERT(arg)
+#endif
+
+#endif /* RBIMPL_ATTR_NONNULL_H */
diff --git a/include/ruby/internal/attr/nonstring.h b/include/ruby/internal/attr/nonstring.h
new file mode 100644
index 0000000000..de26e926d4
--- /dev/null
+++ b/include/ruby/internal/attr/nonstring.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_NONSTRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NONSTRING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NONSTRING.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((nonstring))` */
+#if RBIMPL_HAS_ATTRIBUTE(nonstring)
+# define RBIMPL_ATTR_NONSTRING() __attribute__((nonstring))
+#else
+# define RBIMPL_ATTR_NONSTRING() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NONSTRING_H */
diff --git a/include/ruby/internal/attr/noreturn.h b/include/ruby/internal/attr/noreturn.h
new file mode 100644
index 0000000000..5839212037
--- /dev/null
+++ b/include/ruby/internal/attr/noreturn.h
@@ -0,0 +1,48 @@
+#ifndef RBIMPL_ATTR_NORETURN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NORETURN_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_NORETURN.
+ */
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/cpp_attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+
+/** Wraps (or simulates) `[[noreturn]]` */
+#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
+
+#elif RBIMPL_HAS_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__))
+
+#elif RBIMPL_HAS_CPP_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() [[noreturn]]
+
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112)
+# define RBIMPL_ATTR_NORETURN() _Noreturn
+
+#elif defined(_Noreturn)
+# /* glibc <sys/cdefs.h> has this macro. */
+# define RBIMPL_ATTR_NORETURN() _Noreturn
+
+#else
+# define RBIMPL_ATTR_NORETURN() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_NORETURN_H */
diff --git a/include/ruby/internal/attr/pure.h b/include/ruby/internal/attr/pure.h
new file mode 100644
index 0000000000..015711bdab
--- /dev/null
+++ b/include/ruby/internal/attr/pure.h
@@ -0,0 +1,43 @@
+#ifndef RBIMPL_ATTR_PURE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_PURE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_PURE.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/assert.h"
+
+/** Wraps (or simulates) `__attribute__((pure))` */
+#if RBIMPL_HAS_ATTRIBUTE(pure)
+# define RBIMPL_ATTR_PURE() __attribute__((__pure__))
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_PURE() _Pragma("does_not_write_global_data")
+#else
+# define RBIMPL_ATTR_PURE() /* void */
+#endif
+
+/** Enables #RBIMPL_ATTR_PURE if and only if. ! #RUBY_DEBUG. */
+#if !RUBY_DEBUG
+# define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE()
+#else
+# define RBIMPL_ATTR_PURE_UNLESS_DEBUG() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_PURE_H */
diff --git a/include/ruby/internal/attr/restrict.h b/include/ruby/internal/attr/restrict.h
new file mode 100644
index 0000000000..e39104138c
--- /dev/null
+++ b/include/ruby/internal/attr/restrict.h
@@ -0,0 +1,44 @@
+#ifndef RBIMPL_ATTR_RESTRICT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_RESTRICT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_RESTRICT.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+
+/* :FIXME: config.h includes conflicting `#define restrict`. MSVC can be
+ * detected using `RBIMPL_COMPILER_SINCE()`, but Clang & family cannot use
+ * `__has_declspec_attribute()` which involves macro substitution. */
+
+/** Wraps (or simulates) `__declspec(restrict)` */
+#if RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0)
+# define RBIMPL_ATTR_RESTRICT() __declspec(re ## strict)
+
+#elif RBIMPL_HAS_ATTRIBUTE(malloc)
+# define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__))
+
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_RESTRICT() _Pragma("returns_new_memory")
+
+#else
+# define RBIMPL_ATTR_RESTRICT() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_RESTRICT_H */
diff --git a/include/ruby/internal/attr/returns_nonnull.h b/include/ruby/internal/attr/returns_nonnull.h
new file mode 100644
index 0000000000..5d6f1d1459
--- /dev/null
+++ b/include/ruby/internal/attr/returns_nonnull.h
@@ -0,0 +1,37 @@
+#ifndef RBIMPL_ATTR_RETURNS_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_RETURNS_NONNULL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_RETURNS_NONNULL.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((returns_nonnull))` */
+#if defined(_Ret_nonnull_)
+# /* Take SAL definition. */
+# define RBIMPL_ATTR_RETURNS_NONNULL() _Ret_nonnull_
+
+#elif RBIMPL_HAS_ATTRIBUTE(returns_nonnull)
+# define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
+
+#else
+# define RBIMPL_ATTR_RETURNS_NONNULL() /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_RETURNS_NONNULL_H */
diff --git a/include/ruby/internal/attr/warning.h b/include/ruby/internal/attr/warning.h
new file mode 100644
index 0000000000..e5ced269b8
--- /dev/null
+++ b/include/ruby/internal/attr/warning.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_WARNING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_WARNING.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((warning))` */
+#if RBIMPL_HAS_ATTRIBUTE(warning)
+# define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg))
+#else
+# define RBIMPL_ATTR_WARNING(msg) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_WARNING_H */
diff --git a/include/ruby/internal/attr/weakref.h b/include/ruby/internal/attr/weakref.h
new file mode 100644
index 0000000000..f118bb62b8
--- /dev/null
+++ b/include/ruby/internal/attr/weakref.h
@@ -0,0 +1,32 @@
+#ifndef RBIMPL_ATTR_WEAKREF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_WEAKREF_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ATTR_WEAKREF.
+ */
+#include "ruby/internal/has/attribute.h"
+
+/** Wraps (or simulates) `__attribute__((weakref))` */
+#if RBIMPL_HAS_ATTRIBUTE(weakref)
+# define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym)))
+#else
+# define RBIMPL_ATTR_WEAKREF(sym) /* void */
+#endif
+
+#endif /* RBIMPL_ATTR_WEAKREF_H */
diff --git a/include/ruby/internal/cast.h b/include/ruby/internal/cast.h
new file mode 100644
index 0000000000..a31fddbe4c
--- /dev/null
+++ b/include/ruby/internal/cast.h
@@ -0,0 +1,50 @@
+#ifndef RBIMPL_CAST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CAST_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_CAST.
+ *
+ * This casting macro makes sense only inside of other macros that are part of
+ * public headers. They could be used from C++, and C-style casts could issue
+ * warnings. Ruby internals are pure C so they should not bother.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/warning.h"
+#include "ruby/internal/warning_push.h"
+
+#if ! defined(__cplusplus)
+# define RBIMPL_CAST(expr) (expr)
+
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# /* g++ has -Wold-style-cast since 1997 or so, but its _Pragma is broken. */
+# /* See https://gcc.godbolt.org/z/XWhU6J */
+# define RBIMPL_CAST(expr) (expr)
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+
+#elif RBIMPL_HAS_WARNING("-Wold-style-cast")
+# define RBIMPL_CAST(expr) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wold-style-cast) \
+ (expr) \
+ RBIMPL_WARNING_POP()
+
+#else
+# define RBIMPL_CAST(expr) (expr)
+#endif
+
+#endif /* RBIMPL_CAST_H */
diff --git a/include/ruby/internal/compiler_is.h b/include/ruby/internal/compiler_is.h
new file mode 100644
index 0000000000..7070b033a0
--- /dev/null
+++ b/include/ruby/internal/compiler_is.h
@@ -0,0 +1,45 @@
+#ifndef RBIMPL_COMPILER_IS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_COMPILER_IS.
+ */
+
+/**
+ * @brief Checks if the compiler is of given brand.
+ * @param cc Compiler brand, like `MSVC`.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+#define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc
+
+#include "ruby/internal/compiler_is/apple.h"
+#include "ruby/internal/compiler_is/clang.h"
+#include "ruby/internal/compiler_is/gcc.h"
+#include "ruby/internal/compiler_is/intel.h"
+#include "ruby/internal/compiler_is/msvc.h"
+#include "ruby/internal/compiler_is/sunpro.h"
+/* :TODO: Other possible compilers to support:
+ *
+ * - IBM XL: recent XL are clang-backended so some tweaks like we do for
+ * Apple's might be needed.
+ *
+ * - ARM's armclang: ditto, it can be clang-backended. */
+
+#endif /* RBIMPL_COMPILER_IS_H */
diff --git a/include/ruby/internal/compiler_is/apple.h b/include/ruby/internal/compiler_is/apple.h
new file mode 100644
index 0000000000..a81f1f2c8f
--- /dev/null
+++ b/include/ruby/internal/compiler_is/apple.h
@@ -0,0 +1,40 @@
+#ifndef RBIMPL_COMPILER_IS_APPLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_APPLE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_Apple.
+ *
+ * Apple ships clang. Problem is, its `__clang_major__` etc. are not the
+ * upstream LLVM version, but XCode's. We have to think Apple's is distinct
+ * from LLVM's, when it comes to compiler detection business in this header
+ * file.
+ */
+#if ! defined(__clang__)
+# define RBIMPL_COMPILER_IS_Apple 0
+
+#elif ! defined(__apple_build_version__)
+# define RBIMPL_COMPILER_IS_Apple 0
+
+#else
+# define RBIMPL_COMPILER_IS_Apple 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__
+# define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__
+# define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_APPLE_H */
diff --git a/include/ruby/internal/compiler_is/clang.h b/include/ruby/internal/compiler_is/clang.h
new file mode 100644
index 0000000000..169ff789f6
--- /dev/null
+++ b/include/ruby/internal/compiler_is/clang.h
@@ -0,0 +1,37 @@
+#ifndef RBIMPL_COMPILER_IS_CLANG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_CLANG_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_Clang.
+ */
+#include "ruby/internal/compiler_is/apple.h"
+
+#if ! defined(__clang__)
+# define RBIMPL_COMPILER_IS_Clang 0
+
+#elif RBIMPL_COMPILER_IS(Apple)
+# define RBIMPL_COMPILER_IS_Clang 0
+
+#else
+# define RBIMPL_COMPILER_IS_Clang 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__
+# define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__
+# define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_CLANG_H */
diff --git a/include/ruby/internal/compiler_is/gcc.h b/include/ruby/internal/compiler_is/gcc.h
new file mode 100644
index 0000000000..accc80e9aa
--- /dev/null
+++ b/include/ruby/internal/compiler_is/gcc.h
@@ -0,0 +1,45 @@
+#ifndef RBIMPL_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_GCC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_GCC.
+ */
+#include "ruby/internal/compiler_is/apple.h"
+#include "ruby/internal/compiler_is/clang.h"
+#include "ruby/internal/compiler_is/intel.h"
+
+#if ! defined(__GNUC__)
+# define RBIMPL_COMPILER_IS_GCC 0
+
+#elif RBIMPL_COMPILER_IS(Apple)
+# define RBIMPL_COMPILER_IS_GCC 0
+
+#elif RBIMPL_COMPILER_IS(Clang)
+# define RBIMPL_COMPILER_IS_GCC 0
+
+#elif RBIMPL_COMPILER_IS(Intel)
+# define RBIMPL_COMPILER_IS_GCC 0
+
+#else
+# define RBIMPL_COMPILER_IS_GCC 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__
+# define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__
+# define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_GCC_H */
diff --git a/include/ruby/internal/compiler_is/intel.h b/include/ruby/internal/compiler_is/intel.h
new file mode 100644
index 0000000000..377946ace0
--- /dev/null
+++ b/include/ruby/internal/compiler_is/intel.h
@@ -0,0 +1,40 @@
+#ifndef RBIMPL_COMPILER_IS_INTEL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_INTEL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_Intel.
+ */
+#if ! defined(__INTEL_COMPILER)
+# define RBIMPL_COMPILER_IS_Intel 0
+
+#elif ! defined(__INTEL_COMPILER_UPDATE)
+# define RBIMPL_COMPILER_IS_Intel 1
+# /* __INTEL_COMPILER = XXYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
+# define RBIMPL_COMPILER_VERSION_PATCH (__INTEL_COMPILER % 10)
+
+#else
+# define RBIMPL_COMPILER_IS_Intel 1
+# /* __INTEL_COMPILER = XXYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
+# define RBIMPL_COMPILER_VERSION_PATCH __INTEL_COMPILER_UPDATE
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_INTEL_H */
diff --git a/include/ruby/internal/compiler_is/msvc.h b/include/ruby/internal/compiler_is/msvc.h
new file mode 100644
index 0000000000..8a864ea558
--- /dev/null
+++ b/include/ruby/internal/compiler_is/msvc.h
@@ -0,0 +1,56 @@
+#ifndef RBIMPL_COMPILER_IS_MSVC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_MSVC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_MSVC.
+ */
+#include "ruby/internal/compiler_is/clang.h"
+#include "ruby/internal/compiler_is/intel.h"
+
+#if ! defined(_MSC_VER)
+# define RBIMPL_COMPILER_IS_MSVC 0
+
+#elif RBIMPL_COMPILER_IS(Clang)
+# define RBIMPL_COMPILER_IS_MSVC 0
+
+#elif RBIMPL_COMPILER_IS(Intel)
+# define RBIMPL_COMPILER_IS_MSVC 0
+
+#elif _MSC_VER >= 1400
+# define RBIMPL_COMPILER_IS_MSVC 1
+# /* _MSC_FULL_VER = XXYYZZZZZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 10000000)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 10000000 / 100000)
+# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 100000)
+
+#elif defined(_MSC_FULL_VER)
+# define RBIMPL_COMPILER_IS_MSVC 1
+# /* _MSC_FULL_VER = XXYYZZZZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 1000000)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 1000000 / 10000)
+# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 10000)
+
+#else
+# define RBIMPL_COMPILER_IS_MSVC 1
+# /* _MSC_VER = XXYY */
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_VER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_VER % 100)
+# define RBIMPL_COMPILER_VERSION_PATCH 0
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_MSVC_H */
diff --git a/include/ruby/internal/compiler_is/sunpro.h b/include/ruby/internal/compiler_is/sunpro.h
new file mode 100644
index 0000000000..c11c8452e7
--- /dev/null
+++ b/include/ruby/internal/compiler_is/sunpro.h
@@ -0,0 +1,54 @@
+#ifndef RBIMPL_COMPILER_IS_SUNPRO_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_SUNPRO_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines RBIMPL_COMPILER_IS_SunPro.
+ */
+#if ! (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
+# define RBIMPL_COMPILER_IS_SunPro 0
+
+#elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5100
+# define RBIMPL_COMPILER_IS_SunPro 1
+# /* __SUNPRO_C = 0xXYYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 12)
+# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_C >> 8 & 0xF) * 10 + (__SUNPRO_C >> 4 & 0xF))
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
+
+#elif defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5100
+# define RBIMPL_COMPILER_IS_SunPro 1
+# /* __SUNPRO_CC = 0xXYYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 12)
+# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_CC >> 8 & 0xF) * 10 + (__SUNPRO_CC >> 4 & 0xF))
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
+
+#elif defined(__SUNPRO_C)
+# define RBIMPL_COMPILER_IS_SunPro 1
+# /* __SUNPRO_C = 0xXYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 8)
+# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_C >> 4 & 0xF)
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
+
+#else
+# define RBIMPL_COMPILER_IS_SunPro 1
+# /* __SUNPRO_CC = 0xXYZ */
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 8)
+# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF)
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
+#endif
+
+#endif /* RBIMPL_COMPILER_IS_SUNPRO_H */
diff --git a/include/ruby/internal/compiler_since.h b/include/ruby/internal/compiler_since.h
new file mode 100644
index 0000000000..1929032884
--- /dev/null
+++ b/include/ruby/internal/compiler_since.h
@@ -0,0 +1,61 @@
+#ifndef RBIMPL_COMPILER_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_SINCE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_COMPILER_SINCE.
+ */
+#include "ruby/internal/compiler_is.h"
+
+/**
+ * @brief Checks if the compiler is of given brand and is newer than or equal
+ * to the passed version.
+ * @param cc Compiler brand, like `MSVC`.
+ * @param x Major version.
+ * @param y Minor version.
+ * @param z Patchlevel.
+ * @retval true cc >= x.y.z.
+ * @retval false otherwise.
+ */
+#define RBIMPL_COMPILER_SINCE(cc, x, y, z) \
+ (RBIMPL_COMPILER_IS(cc) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
+
+/**
+ * @brief Checks if the compiler is of given brand and is older than the
+ * passed version.
+ * @param cc Compiler brand, like `MSVC`.
+ * @param x Major version.
+ * @param y Minor version.
+ * @param z Patchlevel.
+ * @retval true cc < x.y.z.
+ * @retval false otherwise.
+ */
+#define RBIMPL_COMPILER_BEFORE(cc, x, y, z) \
+ (RBIMPL_COMPILER_IS(cc) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
+
+#endif /* RBIMPL_COMPILER_SINCE_H */
diff --git a/include/ruby/internal/config.h b/include/ruby/internal/config.h
new file mode 100644
index 0000000000..aa63376d7c
--- /dev/null
+++ b/include/ruby/internal/config.h
@@ -0,0 +1,155 @@
+#ifndef RBIMPL_CONFIG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CONFIG_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Thin wrapper to ruby/config.h
+ */
+#include "ruby/config.h"
+
+#ifdef RUBY_EXTCONF_H
+# include RUBY_EXTCONF_H
+#endif
+
+#include "ruby/internal/compiler_since.h"
+
+#undef HAVE_PROTOTYPES
+#define HAVE_PROTOTYPES 1
+
+#undef HAVE_STDARG_PROTOTYPES
+#define HAVE_STDARG_PROTOTYPES 1
+
+#undef TOKEN_PASTE
+#define TOKEN_PASTE(x,y) x##y
+
+#if defined(__cplusplus)
+#/* __builtin_choose_expr and __builtin_types_compatible aren't available
+# * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
+# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P
+
+/* HAVE_VA_ARGS_MACRO is for C. C++ situations might be different. */
+# undef HAVE_VA_ARGS_MACRO
+# if __cplusplus >= 201103L
+# define HAVE_VA_ARGS_MACRO
+# elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
+# define HAVE_VA_ARGS_MACRO
+# elif defined(__INTEL_CXX11_MODE__)
+# define HAVE_VA_ARGS_MACRO
+# elif RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0)
+# define HAVE_VA_ARGS_MACRO
+# else
+# /* NG, not known. */
+# endif
+#endif
+
+#if RBIMPL_COMPILER_BEFORE(GCC, 4, 9, 0)
+# /* See https://bugs.ruby-lang.org/issues/14221 */
+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
+#endif
+
+#if RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0)
+# /* GCC 4.9.2 reportedly has this feature and is broken. The function is not
+# * officially documented below. Seems we should not use it.
+# * https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Other-Builtins.html */
+# undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
+#endif
+
+#if defined(__SUNPRO_CC)
+# /* Oracle Developer Studio 12.5: GCC compatibility guide says it supports
+# * statement expressions. But to our knowledge they support the extension
+# * only for C and not for C++. Prove me wrong. Am happy to support them if
+# * there is a way. */
+# undef HAVE_STMT_AND_DECL_IN_EXPR
+#endif
+
+#ifndef STRINGIZE0
+# define STRINGIZE(expr) STRINGIZE0(expr)
+# define STRINGIZE0(expr) #expr
+#endif
+
+#ifdef AC_APPLE_UNIVERSAL_BUILD
+# undef WORDS_BIGENDIAN
+# ifdef __BIG_ENDIAN__
+# define WORDS_BIGENDIAN
+# endif
+#endif
+
+#ifndef DLEXT_MAXLEN
+# define DLEXT_MAXLEN 4
+#endif
+
+#ifndef RUBY_PLATFORM
+# define RUBY_PLATFORM "unknown-unknown"
+#endif
+
+#ifdef UNALIGNED_WORD_ACCESS
+# /* Take that. */
+#elif defined(__i386)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__i386__)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(_M_IX86)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__x86_64)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__x86_64__)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(_M_AMD64)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__powerpc64__)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__POWERPC__) // __POWERPC__ is defined for ppc and ppc64 on Darwin
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__aarch64__)
+# define UNALIGNED_WORD_ACCESS 1
+#elif defined(__mc68020__)
+# define UNALIGNED_WORD_ACCESS 1
+#else
+# define UNALIGNED_WORD_ACCESS 0
+#endif
+
+/* Detection of __VA_OPT__ */
+#if ! defined(HAVE_VA_ARGS_MACRO)
+# undef HAVE___VA_OPT__
+
+#elif defined(__cplusplus)
+# if __cplusplus > 201703L
+# define HAVE___VA_OPT__
+# else
+# undef HAVE___VA_OPT__
+# endif
+#else
+# /* Idea taken from: https://stackoverflow.com/a/48045656 */
+# define RBIMPL_TEST3(q, w, e, ...) e
+# define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0)
+# define RBIMPL_TEST1() RBIMPL_TEST2("ruby")
+# if RBIMPL_TEST1()
+# define HAVE___VA_OPT__
+# else
+# undef HAVE___VA_OPT__
+# endif
+# undef RBIMPL_TEST1
+# undef RBIMPL_TEST2
+# undef RBIMPL_TEST3
+#endif /* HAVE_VA_ARGS_MACRO */
+
+#ifndef USE_RVARGC
+# define USE_RVARGC 1
+#endif
+
+#endif /* RBIMPL_CONFIG_H */
diff --git a/include/ruby/internal/constant_p.h b/include/ruby/internal/constant_p.h
new file mode 100644
index 0000000000..92d69cb972
--- /dev/null
+++ b/include/ruby/internal/constant_p.h
@@ -0,0 +1,38 @@
+#ifndef RBIMPL_CONSTANT_P_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CONSTANT_P_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_CONSTANT_P.
+ *
+ * Note that __builtin_constant_p can be applicable inside of inline functions,
+ * according to GCC manual. Clang lacks that feature, though.
+ *
+ * @see https://bugs.llvm.org/show_bug.cgi?id=4898
+ * @see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
+ */
+#include "ruby/internal/has/builtin.h"
+
+/** Wraps (or simulates) `__builtin_constant_p` */
+#if RBIMPL_HAS_BUILTIN(__builtin_constant_p)
+# define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
+#else
+# define RBIMPL_CONSTANT_P(expr) 0
+#endif
+
+#endif /* RBIMPL_CONSTANT_P_H */
diff --git a/include/ruby/internal/core.h b/include/ruby/internal/core.h
new file mode 100644
index 0000000000..3f4561c6a6
--- /dev/null
+++ b/include/ruby/internal/core.h
@@ -0,0 +1,35 @@
+#ifndef RBIMPL_CORE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CORE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Core data structures, definitions and manipulations.
+ */
+#include "ruby/internal/core/rarray.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/core/rbignum.h"
+#include "ruby/internal/core/rclass.h"
+#include "ruby/internal/core/rdata.h"
+#include "ruby/internal/core/rfile.h"
+#include "ruby/internal/core/rhash.h"
+#include "ruby/internal/core/robject.h"
+#include "ruby/internal/core/rregexp.h"
+#include "ruby/internal/core/rstring.h"
+#include "ruby/internal/core/rstruct.h"
+#include "ruby/internal/core/rtypeddata.h"
+#endif /* RBIMPL_CORE_H */
diff --git a/include/ruby/internal/core/rarray.h b/include/ruby/internal/core/rarray.h
new file mode 100644
index 0000000000..c3bb40be25
--- /dev/null
+++ b/include/ruby/internal/core/rarray.h
@@ -0,0 +1,585 @@
+#ifndef RBIMPL_RARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RARRAY_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RArray.
+ */
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/maybe_unused.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/rgengc.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/assert.h"
+
+/**
+ * @private
+ * @warning Do not touch this macro.
+ * @warning It is an implementation detail.
+ * @warning The value of this macro must match for ruby itself and all
+ * extension libraries, otherwise serious memory corruption shall
+ * occur.
+ */
+#ifndef USE_TRANSIENT_HEAP
+# define USE_TRANSIENT_HEAP 1
+#endif
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RArray.
+ * @return The passed object casted to ::RArray.
+ */
+#define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj))
+/** @cond INTERNAL_MACRO */
+#define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG
+#define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK
+#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
+#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
+#if USE_TRANSIENT_HEAP
+# define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
+#else
+# define RARRAY_TRANSIENT_FLAG 0
+#endif
+/** @endcond */
+#define RARRAY_LEN rb_array_len /**< @alias{rb_array_len} */
+#define RARRAY_CONST_PTR rb_array_const_ptr /**< @alias{rb_array_const_ptr} */
+#define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient /**< @alias{rb_array_const_ptr_transient} */
+
+/** @cond INTERNAL_MACRO */
+#if defined(__fcc__) || defined(__fcc_version) || \
+ defined(__FCC__) || defined(__FCC_VERSION)
+/* workaround for old version of Fujitsu C Compiler (fcc) */
+# define FIX_CONST_VALUE_PTR(x) ((const VALUE *)(x))
+#else
+# define FIX_CONST_VALUE_PTR(x) (x)
+#endif
+
+#define RARRAY_EMBED_LEN RARRAY_EMBED_LEN
+#define RARRAY_LENINT RARRAY_LENINT
+#define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P
+#define RARRAY_ASET RARRAY_ASET
+#define RARRAY_PTR RARRAY_PTR
+/** @endcond */
+
+/**
+ * @private
+ *
+ * Bits that you can set to ::RBasic::flags.
+ *
+ * @warning These enums are not the only bits we use for arrays.
+ *
+ * @internal
+ *
+ * Unlike strings, flag usages for arrays are scattered across the entire
+ * source codes. @shyouhei doesn't know the complete list. But what is listed
+ * here is at least incomplete.
+ */
+enum ruby_rarray_flags {
+ /**
+ * This flag has something to do with memory footprint. If the array is
+ * "small" enough, ruby tries to be creative to abuse padding bits of
+ * struct ::RArray for storing its contents. This flag denotes that
+ * situation.
+ *
+ * @warning This bit has to be considered read-only. Setting/clearing
+ * this bit without corresponding fix up must cause immediate
+ * SEGV. Also, internal structures of an array change
+ * dynamically and transparently throughout of its lifetime.
+ * Don't assume it being persistent.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store array elements. It was a bad idea to expose this to them.
+ */
+ RARRAY_EMBED_FLAG = RUBY_FL_USER1,
+
+ /* RUBY_FL_USER2 is for ELTS_SHARED */
+
+ /**
+ * When an array employs embedded strategy (see ::RARRAY_EMBED_FLAG), these
+ * bits are used to store the number of elements actually filled into
+ * ::RArray::ary.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store array elements. It was a bad idea to expose this to them.
+ */
+#if USE_RVARGC
+ RARRAY_EMBED_LEN_MASK = RUBY_FL_USER9 | RUBY_FL_USER8 | RUBY_FL_USER7 | RUBY_FL_USER6 |
+ RUBY_FL_USER5 | RUBY_FL_USER4 | RUBY_FL_USER3
+#else
+ RARRAY_EMBED_LEN_MASK = RUBY_FL_USER4 | RUBY_FL_USER3
+#endif
+
+#if USE_TRANSIENT_HEAP
+ ,
+
+ /**
+ * This flag has something to do with an array's "transiency". A transient
+ * array is an array of young generation (of generational GC), who stores
+ * its elements inside of dedicated memory pages called a transient heap.
+ * Not every young generation share that storage scheme, but elder
+ * generations must no join.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store array elements. It was a bad idea to expose this to them.
+ */
+ RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13
+#endif
+};
+
+/**
+ * This is an enum because GDB wants it (rather than a macro). People need not
+ * bother.
+ */
+enum ruby_rarray_consts {
+ /** Where ::RARRAY_EMBED_LEN_MASK resides. */
+ RARRAY_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 3
+
+#if !USE_RVARGC
+ ,
+
+ /** Max possible number elements that can be embedded. */
+ RARRAY_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE)
+#endif
+};
+
+/** Ruby's array. */
+struct RArray {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /** Array's specific fields. */
+ union {
+
+ /**
+ * Arrays that use separated memory region for elements use this
+ * pattern.
+ */
+ struct {
+
+ /** Number of elements of the array. */
+ long len;
+
+ /** Auxiliary info. */
+ union {
+
+ /**
+ * Capacity of `*ptr`. A continuous memory region of at least
+ * `capa` elements is expected to exist at `*ptr`. This can be
+ * bigger than `len`.
+ */
+ long capa;
+
+ /**
+ * Parent of the array. Nowadays arrays can share their
+ * backend memory regions each other, constructing gigantic
+ * nest of objects. This situation is called "shared", and
+ * this is the field to control such properties.
+ */
+#if defined(__clang__) /* <- clang++ is sane */ || \
+ !defined(__cplusplus) /* <- C99 is sane */ || \
+ (__cplusplus > 199711L) /* <- C++11 is sane */
+ const
+#endif
+ VALUE shared_root;
+ } aux;
+
+ /**
+ * Pointer to the C array that holds the elements of the array. In
+ * the old days each array had dedicated memory regions. That is
+ * no longer true today, but there still are arrays of such
+ * properties. This field could be used to point such things.
+ */
+ const VALUE *ptr;
+ } heap;
+
+ /**
+ * Embedded elements. When an array is short enough, it uses this area
+ * to store its elements. In this case the length is encoded into the
+ * flags.
+ */
+#if USE_RVARGC
+ /* This is a length 1 array because:
+ * 1. GCC has a bug that does not optimize C flexible array members
+ * (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
+ * 2. Zero length arrays are not supported by all compilers
+ */
+ const VALUE ary[1];
+#else
+ const VALUE ary[RARRAY_EMBED_LEN_MAX];
+#endif
+ } as;
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * @private
+ *
+ * Declares a section of code where raw pointers are used. This is an
+ * implementation detail of #RARRAY_PTR_USE. People don't use it directly.
+ *
+ * @param[in] ary An object of ::RArray.
+ * @return `ary`'s backend C array.
+ */
+VALUE *rb_ary_ptr_use_start(VALUE ary);
+
+/**
+ * @private
+ *
+ * Declares an end of a section formerly started by rb_ary_ptr_use_start().
+ * This is an implementation detail of #RARRAY_PTR_USE. People don't use it
+ * directly.
+ *
+ * @param[in] a An object of ::RArray.
+ */
+void rb_ary_ptr_use_end(VALUE a);
+
+#if USE_TRANSIENT_HEAP
+/**
+ * Destructively converts an array of transient backend into ordinal one.
+ *
+ * @param[out] a An object of ::RArray.
+ * @pre `a` must be a transient array.
+ * @post `a` gets out of transient heap, destructively.
+ */
+void rb_ary_detransient(VALUE a);
+#endif
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the length of the array.
+ *
+ * @param[in] ary Array in question.
+ * @return Its number of elements.
+ * @pre `ary` must be an instance of ::RArray, and must has its
+ * ::RARRAY_EMBED_FLAG flag set.
+ *
+ * @internal
+ *
+ * This was a macro before. It was inevitable to be public, since macros are
+ * global constructs. But should it be forever? Now that it is a function,
+ * @shyouhei thinks it could just be eliminated, hidden into implementation
+ * details.
+ */
+static inline long
+RARRAY_EMBED_LEN(VALUE ary)
+{
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ANY_RAW(ary, RARRAY_EMBED_FLAG));
+
+ VALUE f = RBASIC(ary)->flags;
+ f &= RARRAY_EMBED_LEN_MASK;
+ f >>= RARRAY_EMBED_LEN_SHIFT;
+ return RBIMPL_CAST((long)f);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * Queries the length of the array.
+ *
+ * @param[in] a Array in question.
+ * @return Its number of elements.
+ * @pre `a` must be an instance of ::RArray.
+ */
+static inline long
+rb_array_len(VALUE a)
+{
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
+
+ if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
+ return RARRAY_EMBED_LEN(a);
+ }
+ else {
+ return RARRAY(a)->as.heap.len;
+ }
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to rb_array_len(), except it differs for the return type.
+ *
+ * @param[in] ary Array in question.
+ * @exception rb_eRangeError Too long.
+ * @return Its number of elements.
+ * @pre `ary` must be an instance of ::RArray.
+ *
+ * @internal
+ *
+ * This API seems redundant but has actual usages.
+ */
+static inline int
+RARRAY_LENINT(VALUE ary)
+{
+ return rb_long2int(RARRAY_LEN(ary));
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries if the array is a transient array.
+ *
+ * @param[in] ary Array in question.
+ * @retval true Yes it is.
+ * @retval false No it isn't.
+ * @pre `ary` must be an instance of ::RArray.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't understand the benefit of this function called from
+ * extension libraries.
+ */
+static inline bool
+RARRAY_TRANSIENT_P(VALUE ary)
+{
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+
+#if USE_TRANSIENT_HEAP
+ return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG);
+#else
+ return false;
+#endif
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * @private
+ *
+ * This is an implementation detail of RARRAY_PTR(). People do not use it
+ * directly.
+ *
+ * @param[in] a An object of ::RArray.
+ * @return Its backend storage.
+ */
+static inline const VALUE *
+rb_array_const_ptr_transient(VALUE a)
+{
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
+
+ if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
+ return FIX_CONST_VALUE_PTR(RARRAY(a)->as.ary);
+ }
+ else {
+ return FIX_CONST_VALUE_PTR(RARRAY(a)->as.heap.ptr);
+ }
+}
+
+#if ! USE_TRANSIENT_HEAP
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+#endif
+/**
+ * @private
+ *
+ * This is an implementation detail of RARRAY_PTR(). People do not use it
+ * directly.
+ *
+ * @param[in] a An object of ::RArray.
+ * @return Its backend storage.
+ * @post `a` is not a transient array.
+ */
+static inline const VALUE *
+rb_array_const_ptr(VALUE a)
+{
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
+
+#if USE_TRANSIENT_HEAP
+ if (RARRAY_TRANSIENT_P(a)) {
+ rb_ary_detransient(a);
+ }
+#endif
+ return rb_array_const_ptr_transient(a);
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RARRAY_PTR_USE. People do not use it
+ * directly.
+ *
+ * @param[in] a An object of ::RArray.
+ * @param[in] allow_transient Whether `a` can be transient or not.
+ * @return Its backend storage.
+ * @post `a` is not a transient array unless `allow_transient`.
+ */
+static inline VALUE *
+rb_array_ptr_use_start(VALUE a,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ int allow_transient)
+{
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
+
+#if USE_TRANSIENT_HEAP
+ if (!allow_transient) {
+ if (RARRAY_TRANSIENT_P(a)) {
+ rb_ary_detransient(a);
+ }
+ }
+#endif
+
+ return rb_ary_ptr_use_start(a);
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RARRAY_PTR_USE. People do not use it
+ * directly.
+ *
+ * @param[in] a An object of ::RArray.
+ * @param[in] allow_transient Whether `a` can be transient or not.
+ */
+static inline void
+rb_array_ptr_use_end(VALUE a,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ int allow_transient)
+{
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ rb_ary_ptr_use_end(a);
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RARRAY_PTR_USE. People do not use it
+ * directly.
+ */
+#define RBIMPL_RARRAY_STMT(flag, ary, var, expr) do { \
+ RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); \
+ const VALUE rbimpl_ary = (ary); \
+ VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); \
+ expr; \
+ rb_array_ptr_use_end(rbimpl_ary, (flag)); \
+} while (0)
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RARRAY_PTR_USE. People do not use it
+ * directly.
+ */
+#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
+
+/**
+ * Declares a section of code where raw pointers are used. In case you need to
+ * touch the raw C array instead of polite CAPIs, then that operation shall be
+ * wrapped using this macro.
+ *
+ * ```CXX
+ * const auto ary = rb_eval_string("[...]");
+ * const auto len = RARRAY_LENINT(ary);
+ * const auto symwrite = rb_intern("write");
+ *
+ * RARRAY_PTR_USE(ary, ptr, {
+ * rb_funcallv(rb_stdout, symwrite, len, ptr);
+ * });
+ * ```
+ *
+ * @param ary An object of ::RArray.
+ * @param ptr_name A variable name which points the C array in `expr`.
+ * @param expr The expression that touches `ptr_name`.
+ *
+ * @internal
+ *
+ * For historical reasons use of this macro is not enforced. There are
+ * extension libraries in the wild which call RARRAY_PTR() without it. We want
+ * them use it... Maybe some transition path can be implemented later.
+ */
+#define RARRAY_PTR_USE(ary, ptr_name, expr) \
+ RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr)
+
+/**
+ * Identical to #RARRAY_PTR_USE, except the pointer can be a transient one.
+ *
+ * @param ary An object of ::RArray.
+ * @param ptr_name A variable name which points the C array in `expr`.
+ * @param expr The expression that touches `ptr_name`.
+ */
+#define RARRAY_PTR_USE_TRANSIENT(ary, ptr_name, expr) \
+ RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr)
+
+/**
+ * Wild use of a C pointer. This function accesses the backend storage
+ * directly. This is slower than #RARRAY_PTR_USE_TRANSIENT. It exercises
+ * extra manoeuvres to protect our generational GC. Use of this function is
+ * considered archaic. Use a modern way instead.
+ *
+ * @param[in] ary An object of ::RArray.
+ * @return The backend C array.
+ *
+ * @internal
+ *
+ * That said... there are extension libraries in the wild who uses it. We
+ * cannot but continue supporting.
+ */
+static inline VALUE *
+RARRAY_PTR(VALUE ary)
+{
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+
+ VALUE tmp = RB_OBJ_WB_UNPROTECT_FOR(ARRAY, ary);
+ return RBIMPL_CAST((VALUE *)RARRAY_CONST_PTR(tmp));
+}
+
+/**
+ * Assigns an object in an array.
+ *
+ * @param[out] ary Destination array object.
+ * @param[in] i Index of `ary`.
+ * @param[in] v Arbitrary ruby object.
+ * @pre `ary` must be an instance of ::RArray.
+ * @pre `ary`'s length must be longer than or equal to `i`.
+ * @pre `i` must be greater than or equal to zero.
+ * @post `ary`'s `i`th element is set to `v`.
+ */
+static inline void
+RARRAY_ASET(VALUE ary, long i, VALUE v)
+{
+ RARRAY_PTR_USE_TRANSIENT(ary, ptr,
+ RB_OBJ_WRITE(ary, &ptr[i], v));
+}
+
+/**
+ * @deprecated
+ *
+ * :FIXME: we want to convert RARRAY_AREF into an inline function (to add rooms
+ * for more sanity checks). However there were situations where the address of
+ * this macro is taken i.e. &RARRAY_AREF(...). They cannot be possible if this
+ * is not a macro. Such usages are abuse, and we eliminated them internally.
+ * However we are afraid of similar things to remain in the wild. This macro
+ * remains as it is due to that. If we could warn such usages we can set a
+ * transition path, but currently no way is found to do so.
+ */
+#define RARRAY_AREF(a, i) RARRAY_CONST_PTR_TRANSIENT(a)[i]
+
+#endif /* RBIMPL_RARRAY_H */
diff --git a/include/ruby/internal/core/rbasic.h b/include/ruby/internal/core/rbasic.h
new file mode 100644
index 0000000000..4617f743a7
--- /dev/null
+++ b/include/ruby/internal/core/rbasic.h
@@ -0,0 +1,158 @@
+#ifndef RBIMPL_RBASIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RBASIC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RBasic.
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/forceinline.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj Arbitrary Ruby object.
+ * @return The passed object casted to ::RBasic.
+ */
+#define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj))
+/** @cond INTERNAL_MACRO */
+#define RBASIC_CLASS RBASIC_CLASS
+#define RBIMPL_RVALUE_EMBED_LEN_MAX 3
+#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
+#define RBIMPL_EMBED_LEN_MAX_OF(T) \
+ RBIMPL_CAST((int)(sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]) / (sizeof(T))))
+/** @endcond */
+
+/**
+ * This is an enum because GDB wants it (rather than a macro). People need not
+ * bother.
+ */
+enum ruby_rvalue_flags {
+ /** Max possible number of objects that can be embedded. */
+ RVALUE_EMBED_LEN_MAX = RBIMPL_RVALUE_EMBED_LEN_MAX
+};
+
+/**
+ * Ruby's object's, base components. Every single ruby objects have them in
+ * common.
+ */
+struct
+RUBY_ALIGNAS(SIZEOF_VALUE)
+RBasic {
+
+ /**
+ * Per-object flags. Each ruby objects have their own characteristics
+ * apart from their classes. For instance whether an object is frozen or
+ * not is not controlled by its class. This is where such properties are
+ * stored.
+ *
+ * @see enum ::ruby_fl_type
+ *
+ * @note This is ::VALUE rather than an enum for alignment purpose. Back
+ * in the 1990s there were no such thing like `_Alignas` in C.
+ */
+ VALUE flags;
+
+ /**
+ * Class of an object. Every object has its class. Also, everything is an
+ * object in Ruby. This means classes are also objects. Classes have
+ * their own classes, classes of classes have their classes, too ... and
+ * it recursively continues forever.
+ *
+ * Also note the `const` qualifier. In ruby an object cannot "change" its
+ * class.
+ */
+ const VALUE klass;
+
+#ifdef __cplusplus
+ public:
+ RBIMPL_ATTR_CONSTEXPR(CXX11)
+ RBIMPL_ATTR_ARTIFICIAL()
+ RBIMPL_ATTR_FORCEINLINE()
+ RBIMPL_ATTR_NOALIAS()
+ /**
+ * We need to define this explicit constructor because the field `klass` is
+ * const-qualified above, which effectively defines the implicit default
+ * constructor as "deleted" (as of C++11) -- No way but to define one by
+ * ourselves.
+ */
+ RBasic() :
+ flags(RBIMPL_VALUE_NULL),
+ klass(RBIMPL_VALUE_NULL)
+ {
+ }
+#endif
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Make the object invisible from Ruby code.
+ *
+ * It is useful to let Ruby's GC manage your internal data structure -- The
+ * object keeps being managed by GC, but `ObjectSpace.each_object` never yields
+ * the object.
+ *
+ * Note that the object also lose a way to call a method on it.
+ *
+ * @param[out] obj A Ruby object.
+ * @return The passed object.
+ * @post The object is destructively modified to be invisible.
+ * @see rb_obj_reveal
+ */
+VALUE rb_obj_hide(VALUE obj);
+
+/**
+ * Make a hidden object visible again.
+ *
+ * It is the caller's responsibility to pass the right `klass` which `obj`
+ * originally used to belong to.
+ *
+ * @param[out] obj A Ruby object.
+ * @param[in] klass Class of `obj`.
+ * @return Passed `obj`.
+ * @pre `obj` was previously hidden.
+ * @post `obj`'s class is `klass`.
+ * @see rb_obj_hide
+ */
+VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change klass information */
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the class of an object.
+ *
+ * @param[in] obj An object.
+ * @return Its class.
+ */
+static inline VALUE
+RBASIC_CLASS(VALUE obj)
+{
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+ return RBASIC(obj)->klass;
+}
+
+#endif /* RBIMPL_RBASIC_H */
diff --git a/include/ruby/internal/core/rbignum.h b/include/ruby/internal/core/rbignum.h
new file mode 100644
index 0000000000..1d31743235
--- /dev/null
+++ b/include/ruby/internal/core/rbignum.h
@@ -0,0 +1,80 @@
+#ifndef RBIMPL_RBIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RBIGNUM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate struct RBignum.
+ * @note The struct RBignum itself is opaque.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/internal/stdbool.h"
+
+#define RBIGNUM_SIGN rb_big_sign /**< @alias{rb_big_sign} */
+
+/** @cond INTERNAL_MACRO */
+#define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P
+#define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * The "sign" of a bignum.
+ *
+ * @param[in] num An object of RBignum.
+ * @retval 1 It is greater than or equal to zero.
+ * @retval 0 It is less than zero.
+ *
+ * @internal
+ *
+ * Implementation wise, unlike fixnums (which are 2's complement), bignums are
+ * signed magnitude system. Theoretically it could be possible to have
+ * negative zero instances. But in reality there is no way to create such
+ * thing. Nobody ever needed that kind of insanity.
+ */
+int rb_big_sign(VALUE num);
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Checks if the bignum is positive.
+ * @param[in] b An object of RBignum.
+ * @retval false `b` is less than zero.
+ * @retval true Otherwise.
+ */
+static inline bool
+RBIGNUM_POSITIVE_P(VALUE b)
+{
+ RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM);
+ return RBIGNUM_SIGN(b);
+}
+
+/**
+ * Checks if the bignum is negative.
+ * @param[in] b An object of RBignum.
+ * @retval true `b` is less than zero.
+ * @retval false Otherwise.
+ */
+static inline bool
+RBIGNUM_NEGATIVE_P(VALUE b)
+{
+ RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM);
+ return ! RBIGNUM_POSITIVE_P(b);
+}
+
+#endif /* RBIMPL_RBIGNUM_H */
diff --git a/include/ruby/internal/core/rclass.h b/include/ruby/internal/core/rclass.h
new file mode 100644
index 0000000000..b0b6bfc80c
--- /dev/null
+++ b/include/ruby/internal/core/rclass.h
@@ -0,0 +1,93 @@
+#ifndef RBIMPL_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RCLASS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate struct RClass.
+ * @note The struct RClass itself is opaque.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/cast.h"
+
+/** @cond INTERNAL_MACRO */
+#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
+/** @endcond */
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an RClass.
+ * @return The passed object casted to RClass.
+ */
+#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
+
+/** @alias{RCLASS} */
+#define RMODULE RCLASS
+
+/** @alias{rb_class_get_superclass} */
+#define RCLASS_SUPER rb_class_get_superclass
+
+/**
+ * @private
+ *
+ * Bits that you can set to ::RBasic::flags.
+ *
+ * @internal
+ *
+ * Why is it here, given RClass itself is not?
+ */
+enum ruby_rmodule_flags {
+ /**
+ * This flag has something to do with refinements. A module created using
+ * rb_mod_refine() has this flag set. This is the bit which controls
+ * difference between normal inclusion versus refinements.
+ */
+ RMODULE_IS_REFINEMENT = RUBY_FL_USER3
+};
+
+struct RClass; /* Opaque, declared here for RCLASS() macro. */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Returns the superclass of a class.
+ * @param[in] klass An object of RClass.
+ * @retval RUBY_Qfalse `klass` has no super class.
+ * @retval otherwise Raw superclass of `klass`
+ * @see rb_class_superclass
+ *
+ * ### Q&A ###
+ *
+ * - Q: How can a class have no super class?
+ *
+ * - A: `klass` could be a module. Or it could be ::rb_cBasicObject.
+ *
+ * - Q: What do you mean by "raw" superclass?
+ *
+ * - A: This is a really good question. The answer is that this function
+ * returns something different from what you would normally expect. On
+ * occasions ruby inserts hidden classes in a hierarchy of class
+ * inheritance behind-the-scene. Such classes are called "iclass"es and
+ * distinguished using ::RUBY_T_ICLASS in C level. They are truly
+ * transparent from Ruby level but can be accessed from C, by using this
+ * API.
+ */
+VALUE rb_class_get_superclass(VALUE klass);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_RCLASS_H */
diff --git a/include/ruby/internal/core/rdata.h b/include/ruby/internal/core/rdata.h
new file mode 100644
index 0000000000..43ab3c01e7
--- /dev/null
+++ b/include/ruby/internal/core/rdata.h
@@ -0,0 +1,386 @@
+#ifndef RBIMPL_RDATA_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RDATA_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RData.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/warning.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/defines.h"
+
+/** @cond INTERNAL_MACRO */
+#ifdef RUBY_UNTYPED_DATA_WARNING
+# /* Take that. */
+#elif defined(RUBY_EXPORT)
+# define RUBY_UNTYPED_DATA_WARNING 1
+#else
+# define RUBY_UNTYPED_DATA_WARNING 0
+#endif
+
+#define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f))
+#define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() \
+ RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) \
+ RBIMPL_ATTR_DEPRECATED(("by TypedData"))
+
+#define RBIMPL_MACRO_SELECT(x, y) x ## y
+#define RUBY_MACRO_SELECT(x, y) RBIMPL_MACRO_SELECT(x, y)
+/** @endcond */
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RData.
+ * @return The passed object casted to ::RData.
+ */
+#define RDATA(obj) RBIMPL_CAST((struct RData *)(obj))
+
+/**
+ * Convenient getter macro.
+ *
+ * @param obj An object, which is in fact an ::RData.
+ * @return The passed object's ::RData::data field.
+ */
+#define DATA_PTR(obj) RDATA(obj)->data
+
+/**
+ * This is a value you can set to ::RData::dfree. Setting this means the data
+ * was allocated using ::ruby_xmalloc() (or variants), and shall be freed using
+ * ::ruby_xfree().
+ *
+ * @warning Do not use this if you want to use system malloc, because the
+ * system and Ruby might or might not share the same malloc
+ * implementation.
+ */
+#define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1)
+
+/**
+ * This is a value you can set to ::RData::dfree. Setting this means the data
+ * is managed by someone else, like, statically allocated. Of course you are
+ * on your own then.
+ */
+#define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0)
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
+
+/*
+#define RUBY_DATA_FUNC(func) ((void (*)(void*))(func))
+*/
+
+/**
+ * This is the type of callbacks registered to ::RData. The argument is the
+ * `data` field.
+ */
+typedef void (*RUBY_DATA_FUNC)(void*);
+
+/**
+ * @deprecated
+ *
+ * Old "untyped" user data. It has roughly the same usage as struct
+ * ::RTypedData, but lacked several features such as support for compaction GC.
+ * Use of this struct is not recommended any longer. If it is dead necessary,
+ * please inform the core devs about your usage.
+ *
+ * @internal
+ *
+ * @shyouhei tried to add RBIMPL_ATTR_DEPRECATED for this type but that yielded
+ * too many warnings in the core. Maybe we want to retry later... Just add
+ * deprecated document for now.
+ */
+struct RData {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /**
+ * This function is called when the object is experiencing GC marks. If it
+ * contains references to other Ruby objects, you need to mark them also.
+ * Otherwise GC will smash your data.
+ *
+ * @see rb_gc_mark()
+ * @warning This is called during GC runs. Object allocations are
+ * impossible at that moment (that is why GC runs).
+ */
+ RUBY_DATA_FUNC dmark;
+
+ /**
+ * This function is called when the object is no longer used. You need to
+ * do whatever necessary to avoid memory leaks.
+ *
+ * @warning This is called during GC runs. Object allocations are
+ * impossible at that moment (that is why GC runs).
+ */
+ RUBY_DATA_FUNC dfree;
+
+ /** Pointer to the actual C level struct that you want to wrap. */
+ void *data;
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * This is the primitive way to wrap an existing C struct into ::RData.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] datap Pointer to the target C struct.
+ * @param[in] dmark Mark function.
+ * @param[in] dfree Free function.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return An allocated object that wraps `datap`.
+ */
+VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
+
+/**
+ * Identical to rb_data_object_wrap(), except it allocates a new data region
+ * internally instead of taking an existing one. The allocation is done using
+ * ruby_calloc(). Hence it makes no sense to pass anything other than
+ * ::RUBY_DEFAULT_FREE to the last argument.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] size Requested size of memory to allocate.
+ * @param[in] dmark Mark function.
+ * @param[in] dfree Free function.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return An allocated object that wraps a new `size` byte region.
+ */
+VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
+
+/**
+ * @private
+ * Documented in include/ruby/internal/globals.h
+ */
+RUBY_EXTERN VALUE rb_cObject;
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Converts sval, a pointer to your struct, into a Ruby object.
+ *
+ * @param klass A ruby level class.
+ * @param mark Mark function.
+ * @param free Free function.
+ * @param sval A pointer to your struct.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ */
+#define Data_Wrap_Struct(klass, mark, free, sval) \
+ rb_data_object_wrap( \
+ (klass), \
+ (sval), \
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free))
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #Data_Make_Struct. People don't use it
+ * directly.
+ *
+ * @param result Variable name of created Ruby object.
+ * @param klass Ruby level class of the object.
+ * @param type Type name of the C struct.
+ * @param size Size of the C struct.
+ * @param mark Mark function.
+ * @param free Free function.
+ * @param sval Variable name of created C struct.
+ */
+#define Data_Make_Struct0(result, klass, type, size, mark, free, sval) \
+ VALUE result = rb_data_object_zalloc( \
+ (klass), \
+ (size), \
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free)); \
+ (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); \
+ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval))
+
+/**
+ * Identical to #Data_Wrap_Struct, except it allocates a new data region
+ * internally instead of taking an existing one. The allocation is done using
+ * ruby_calloc(). Hence it makes no sense to pass anything other than
+ * ::RUBY_DEFAULT_FREE to the `free` argument.
+ *
+ * @param klass Ruby level class of the returning object.
+ * @param type Type name of the C struct.
+ * @param mark Mark function.
+ * @param free Free function.
+ * @param sval Variable name of created C struct.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ */
+#ifdef HAVE_STMT_AND_DECL_IN_EXPR
+#define Data_Make_Struct(klass, type, mark, free, sval) \
+ RB_GNUC_EXTENSION({ \
+ Data_Make_Struct0( \
+ data_struct_obj, \
+ klass, \
+ type, \
+ sizeof(type), \
+ mark, \
+ free, \
+ sval); \
+ data_struct_obj; \
+ })
+#else
+#define Data_Make_Struct(klass, type, mark, free, sval) \
+ rb_data_object_make( \
+ (klass), \
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free), \
+ RBIMPL_CAST((void **)&(sval)), \
+ sizeof(type))
+#endif
+
+/**
+ * Obtains a C struct from inside of a wrapper Ruby object.
+ *
+ * @param obj An instance of ::RData.
+ * @param type Type name of the C struct.
+ * @param sval Variable name of obtained C struct.
+ * @return Unwrapped C struct that `obj` holds.
+ */
+#define Data_Get_Struct(obj, type, sval) \
+ ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj)))
+
+RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_data_object_wrap(). People don't use
+ * it directly.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] ptr Pointer to the target C struct.
+ * @param[in] mark Mark function.
+ * @param[in] free Free function.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return An allocated object that wraps `datap`.
+ */
+static inline VALUE
+rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
+{
+ return rb_data_object_wrap(klass, ptr, mark, free);
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #Data_Get_Struct. People don't use it
+ * directly.
+ *
+ * @param[in] obj An instance of ::RData.
+ * @return Unwrapped C struct that `obj` holds.
+ */
+static inline void *
+rb_data_object_get(VALUE obj)
+{
+ Check_Type(obj, RUBY_T_DATA);
+ return DATA_PTR(obj);
+}
+
+RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
+/**
+ * @private
+ *
+ * This is an implementation detail of #Data_Get_Struct. People don't use it
+ * directly.
+ *
+ * @param[in] obj An instance of ::RData.
+ * @return Unwrapped C struct that `obj` holds.
+ */
+static inline void *
+rb_data_object_get_warning(VALUE obj)
+{
+ return rb_data_object_get(obj);
+}
+
+#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
+# define rb_data_object_wrap_warning(klass, ptr, mark, free) \
+ RB_GNUC_EXTENSION( \
+ __builtin_choose_expr( \
+ __builtin_constant_p(klass) && !(klass), \
+ rb_data_object_wrap(klass, ptr, mark, free), \
+ (rb_data_object_wrap_warning)(klass, ptr, mark, free)))
+#endif
+
+/**
+ * This is an implementation detail of #Data_Make_Struct. People don't use it
+ * directly.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] mark_func Mark function.
+ * @param[in] free_func Free function.
+ * @param[in] datap Variable of created C struct.
+ * @param[in] size Requested size of allocation.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ * @post `*datap` holds the created C struct.
+ */
+static inline VALUE
+rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
+{
+ Data_Make_Struct0(result, klass, void, size, mark_func, free_func, *datap);
+ return result;
+}
+
+RBIMPL_ATTR_DEPRECATED(("by: rb_data_object_wrap"))
+/** @deprecated This function was renamed to rb_data_object_wrap(). */
+static inline VALUE
+rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
+{
+ return rb_data_object_wrap(klass, data, dmark, dfree);
+}
+
+/** @cond INTERNAL_MACRO */
+#define rb_data_object_wrap_0 rb_data_object_wrap
+#define rb_data_object_wrap_1 rb_data_object_wrap_warning
+#define rb_data_object_wrap_2 rb_data_object_wrap_ /* Used here vvvv */
+#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_2, RUBY_UNTYPED_DATA_WARNING)
+#define rb_data_object_get_0 rb_data_object_get
+#define rb_data_object_get_1 rb_data_object_get_warning
+#define rb_data_object_get_2 rb_data_object_get_ /* Used here vvvv */
+#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_2, RUBY_UNTYPED_DATA_WARNING)
+#define rb_data_object_make_0 rb_data_object_make
+#define rb_data_object_make_1 rb_data_object_make_warning
+#define rb_data_object_make_2 rb_data_object_make_ /* Used here vvvv */
+#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_2, RUBY_UNTYPED_DATA_WARNING)
+/** @endcond */
+#endif /* RBIMPL_RDATA_H */
diff --git a/include/ruby/internal/core/rfile.h b/include/ruby/internal/core/rfile.h
new file mode 100644
index 0000000000..f8dddde9e5
--- /dev/null
+++ b/include/ruby/internal/core/rfile.h
@@ -0,0 +1,51 @@
+#ifndef RBIMPL_RFILE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RFILE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RFile.
+ */
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/cast.h"
+
+/* rb_io_t is in ruby/io.h. The header file has historically not been included
+ * into ruby/ruby.h. We follow that tradition. */
+struct rb_io_t;
+
+/**
+ * Ruby's File and IO. Ruby's IO are not just file descriptors. They have
+ * buffers. They also have encodings. Various information are controlled
+ * using this struct.
+ */
+struct RFile {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /** IO's specific fields. */
+ struct rb_io_t *fptr;
+};
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RFile.
+ * @return The passed object casted to ::RFile.
+ */
+#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
+#endif /* RBIMPL_RFILE_H */
diff --git a/include/ruby/internal/core/rhash.h b/include/ruby/internal/core/rhash.h
new file mode 100644
index 0000000000..61d2c15d87
--- /dev/null
+++ b/include/ruby/internal/core/rhash.h
@@ -0,0 +1,144 @@
+#ifndef RBIMPL_RHASH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RHASH_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate struct RHash.
+ * @note The struct RHash itself is opaque.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY
+# include "ruby/backward.h"
+#endif
+
+/**
+ * Retrieves the internal table.
+ *
+ * @param[in] h An instance of RHash.
+ * @pre `h` must be of ::RUBY_T_HASH.
+ * @return A struct st_table which has the contents of this hash.
+ * @note Nowadays as Ruby evolved over ages, RHash has multiple backend
+ * storage engines. `h`'s backend is not guaranteed to be a
+ * st_table. This function creates one when necessary.
+ */
+#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * Declaration of rb_hash_iter_lev() is at include/ruby/backward.h.
+ */
+#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * Declaration of rb_hash_ifnone() is at include/ruby/backward.h.
+ */
+#define RHASH_IFNONE(h) rb_hash_ifnone(h)
+
+/**
+ * Queries the size of the hash. Size here means the number of keys that the
+ * hash stores.
+ *
+ * @param[in] h An instance of RHash.
+ * @pre `h` must be of ::RUBY_T_HASH.
+ * @return The size of the hash.
+ */
+#define RHASH_SIZE(h) rb_hash_size_num(h)
+
+/**
+ * Checks if the hash is empty.
+ *
+ * @param[in] h An instance of RHash.
+ * @pre `h` must be of ::RUBY_T_HASH.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
+
+/**
+ * Destructively updates the default value of the hash.
+ *
+ * @param[out] h An instance of RHash.
+ * @param[in] ifnone Arbitrary default value.
+ * @pre `h` must be of ::RUBY_T_HASH.
+ *
+ * @internal
+ *
+ * But why you can set this, given rb_hash_ifnone() doesn't exist?
+ */
+#define RHASH_SET_IFNONE(h, ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
+
+struct st_table; /* in ruby/st.h */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * This is the implementation detail of #RHASH_SIZE. People don't call this
+ * directly.
+ *
+ * @param[in] hash An instance of RHash.
+ * @pre `hash` must be of ::RUBY_T_HASH.
+ * @return The size of the hash.
+ */
+size_t rb_hash_size_num(VALUE hash);
+
+/**
+ * This is the implementation detail of #RHASH_TBL. People don't call this
+ * directly.
+ *
+ * @param[in] hash An instance of RHash.
+ * @param[in] file The `__FILE__`.
+ * @param[in] line The `__LINE__`.
+ * @pre `hash` must be of ::RUBY_T_HASH.
+ * @return Table that has the contents of the hash.
+ */
+struct st_table *rb_hash_tbl(VALUE hash, const char *file, int line);
+
+/**
+ * This is the implementation detail of #RHASH_SET_IFNONE. People don't call
+ * this directly.
+ *
+ * @param[out] hash An instance of RHash.
+ * @param[in] ifnone Arbitrary default value.
+ * @pre `hash` must be of ::RUBY_T_HASH.
+ */
+VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_RHASH_H */
diff --git a/include/ruby/internal/core/rmatch.h b/include/ruby/internal/core/rmatch.h
new file mode 100644
index 0000000000..2d2fd897f5
--- /dev/null
+++ b/include/ruby/internal/core/rmatch.h
@@ -0,0 +1,146 @@
+#ifndef RBIMPL_RMATCH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RMATCH_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RMatch.
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/assert.h"
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RMatch.
+ * @return The passed object casted to ::RMatch.
+ */
+#define RMATCH(obj) RBIMPL_CAST((struct RMatch *)(obj))
+/** @cond INTERNAL_MACRO */
+#define RMATCH_REGS RMATCH_REGS
+/** @endcond */
+
+struct re_patter_buffer; /* a.k.a. OnigRegexType, defined in onigmo.h */
+struct re_registers; /* Also in onigmo.h */
+
+/**
+ * @old{re_pattern_buffer}
+ *
+ * @internal
+ *
+ * @shyouhei wonders: is anyone actively using this typedef ...?
+ */
+typedef struct re_pattern_buffer Regexp;
+
+/**
+ * Represents the region of a capture group. This is basically for caching
+ * purpose. re_registers have similar concepts (`beg` and `end`) but they are
+ * in `ptrdiff_t*`. In order for us to implement `MatchData#offset` that info
+ * has to be converted to offset integers. This is the struct to hold such
+ * things.
+ *
+ * @internal
+ *
+ * But why on earth it has to be visible from extension libraries?
+ */
+struct rmatch_offset {
+ long beg; /**< Beginning of a group. */
+ long end; /**< End of a group. */
+};
+
+/** Represents a match. */
+struct rmatch {
+ /**
+ * "Registers" of a match. This is a quasi-opaque struct that holds
+ * execution result of a match. Roughly resembles `&~`.
+ */
+ struct re_registers regs;
+
+ /** Capture group offsets, in C array. */
+ struct rmatch_offset *char_offset;
+
+ /** Number of ::rmatch_offset that ::rmatch::char_offset holds. */
+ int char_offset_num_allocated;
+};
+
+/**
+ * Regular expression execution context. When a regular expression "matches"
+ * to a string, it generates capture groups etc. This struct holds that info.
+ * Visible from Ruby as an instance of `MatchData`.
+ *
+ * @note There is no way for extension libraries to manually generate this
+ * struct except by actually exercising the match operation of a regular
+ * expression.
+ */
+struct RMatch {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /**
+ * The target string that the match was made against.
+ */
+ VALUE str;
+
+ /**
+ * The result of this match.
+ */
+ struct rmatch *rmatch;
+
+ /**
+ * The expression of this match.
+ */
+ VALUE regexp; /* RRegexp */
+};
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the raw ::re_registers.
+ *
+ * @param[in] match A match object
+ * @pre `match` must be of ::RMatch.
+ * @return Its execution result.
+ * @note Good. So you are aware of the fact that it could return NULL.
+ * Yes. It actually does. This is a really bizarre thing. The
+ * situation is about `String#gsub` and its family. They take
+ * strings as arguments, like `"foo".sub("bar", "baz")`. On such
+ * situations, in order to optimise memory allocations, these
+ * methods do not involve regular expressions at all. They just
+ * sequentially scan the receiver. Okay. The story begins here.
+ * Even when they do not kick our regexp engine, there must be
+ * backref objects e.g. `$&`. But how? You know what? Ruby fakes
+ * them. It allocates an empty ::RMatch and behaves as if there
+ * were execution contexts. In reality there weren't. No
+ * ::re_registers are allocated then. There is no way for this
+ * function but to return NULL for those fake ::RMatch. This is
+ * the reason for the nullability of this function.
+ */
+static inline struct re_registers *
+RMATCH_REGS(VALUE match)
+{
+ RBIMPL_ASSERT_TYPE(match, RUBY_T_MATCH);
+ RBIMPL_ASSERT_OR_ASSUME(RMATCH(match)->rmatch != NULL);
+ return &RMATCH(match)->rmatch->regs;
+}
+
+#endif /* RBIMPL_RMATCH_H */
diff --git a/include/ruby/internal/core/robject.h b/include/ruby/internal/core/robject.h
new file mode 100644
index 0000000000..b1c2e1b0a9
--- /dev/null
+++ b/include/ruby/internal/core/robject.h
@@ -0,0 +1,176 @@
+#ifndef RBIMPL_ROBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ROBJECT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RObject.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RObject.
+ * @return The passed object casted to ::RObject.
+ */
+#define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj))
+/** @cond INTERNAL_MACRO */
+#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
+#define ROBJECT_EMBED ROBJECT_EMBED
+#define ROBJECT_IV_CAPACITY ROBJECT_IV_CAPACITY
+#define ROBJECT_IVPTR ROBJECT_IVPTR
+/** @endcond */
+
+/**
+ * @private
+ *
+ * Bits that you can set to ::RBasic::flags.
+ */
+enum ruby_robject_flags {
+ /**
+ * This flag has something to do with memory footprint. If the object is
+ * "small" enough, ruby tries to be creative to abuse padding bits of
+ * struct ::RObject for storing instance variables. This flag denotes that
+ * situation.
+ *
+ * @warning This bit has to be considered read-only. Setting/clearing
+ * this bit without corresponding fix up must cause immediate
+ * SEGV. Also, internal structures of an object change
+ * dynamically and transparently throughout of its lifetime.
+ * Don't assume it being persistent.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store instance variables. Might better be hidden.
+ */
+ ROBJECT_EMBED = RUBY_FL_USER1
+};
+
+#if !USE_RVARGC
+/**
+ * This is an enum because GDB wants it (rather than a macro). People need not
+ * bother.
+ */
+enum ruby_robject_consts {
+ /** Max possible number of instance variables that can be embedded. */
+ ROBJECT_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE)
+};
+#endif
+
+struct st_table;
+
+/**
+ * Ruby's ordinal objects. Unless otherwise special cased, all predefined and
+ * user-defined classes share this struct to hold their instances.
+ */
+struct RObject {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /** Object's specific fields. */
+ union {
+
+ /**
+ * Object that use separated memory region for instance variables use
+ * this pattern.
+ */
+ struct {
+ /** Pointer to a C array that holds instance variables. */
+ VALUE *ivptr;
+
+ /**
+ * This is a table that holds instance variable name to index
+ * mapping. Used when accessing instance variables using names.
+ *
+ * @internal
+ *
+ * This is a shortcut for `RCLASS_IV_INDEX_TBL(rb_obj_class(obj))`.
+ */
+ struct rb_id_table *iv_index_tbl;
+ } heap;
+
+#if USE_RVARGC
+ /* Embedded instance variables. When an object is small enough, it
+ * uses this area to store the instance variables.
+ *
+ * This is a length 1 array because:
+ * 1. GCC has a bug that does not optimize C flexible array members
+ * (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
+ * 2. Zero length arrays are not supported by all compilers
+ */
+ VALUE ary[1];
+#else
+ /**
+ * Embedded instance variables. When an object is small enough, it
+ * uses this area to store the instance variables.
+ */
+ VALUE ary[ROBJECT_EMBED_LEN_MAX];
+#endif
+ } as;
+};
+
+/* Offsets for YJIT */
+#ifndef __cplusplus
+static const int32_t ROBJECT_OFFSET_AS_HEAP_IVPTR = offsetof(struct RObject, as.heap.ivptr);
+static const int32_t ROBJECT_OFFSET_AS_HEAP_IV_INDEX_TBL = offsetof(struct RObject, as.heap.iv_index_tbl);
+static const int32_t ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary);
+#endif
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the instance variables.
+ *
+ * @param[in] obj Object in question.
+ * @return Its instance variables, in C array.
+ * @pre `obj` must be an instance of ::RObject.
+ *
+ * @internal
+ *
+ * @shyouhei finds no reason for this to be visible from extension libraries.
+ */
+static inline VALUE *
+ROBJECT_IVPTR(VALUE obj)
+{
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
+
+ struct RObject *const ptr = ROBJECT(obj);
+
+ if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
+ return ptr->as.ary;
+ }
+ else {
+ return ptr->as.heap.ivptr;
+ }
+}
+
+#endif /* RBIMPL_ROBJECT_H */
diff --git a/include/ruby/internal/core/rregexp.h b/include/ruby/internal/core/rregexp.h
new file mode 100644
index 0000000000..cf54a399f1
--- /dev/null
+++ b/include/ruby/internal/core/rregexp.h
@@ -0,0 +1,168 @@
+#ifndef RBIMPL_RREGEXP_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RREGEXP_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RRegexp.
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/core/rstring.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RRegexp.
+ * @return The passed object casted to ::RRegexp.
+ */
+#define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
+
+/**
+ * Convenient accessor macro.
+ *
+ * @param obj An object, which is in fact an ::RRegexp.
+ * @return The passed object's pattern buffer.
+ */
+#define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
+/** @cond INTERNAL_MACRO */
+#define RREGEXP_SRC RREGEXP_SRC
+#define RREGEXP_SRC_PTR RREGEXP_SRC_PTR
+#define RREGEXP_SRC_LEN RREGEXP_SRC_LEN
+#define RREGEXP_SRC_END RREGEXP_SRC_END
+/** @endcond */
+
+struct re_patter_buffer; /* a.k.a. OnigRegexType, defined in onigmo.h */
+
+/**
+ * Ruby's regular expression. A regexp is compiled into its own intermediate
+ * representation. This one holds that info. Regexp "match" operation then
+ * executes that IR.
+ */
+struct RRegexp {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /**
+ * The pattern buffer. This is a quasi-opaque struct that holds compiled
+ * intermediate representation of the regular expression.
+ *
+ * @note Compilation of a regexp could be delayed until actual match.
+ */
+ struct re_pattern_buffer *ptr;
+
+ /** Source code of this expression. */
+ const VALUE src;
+
+ /**
+ * Reference count. A regexp match can take extraordinarily long time to
+ * run. Ruby's regular expression is heavily extended and not a regular
+ * language any longer; runs in NP-time in practice. Now, Ruby also has
+ * threads and GVL. In order to prevent long GVL lockup, our regexp engine
+ * can release it on occasions. This means that multiple threads can touch
+ * a regular expressions at once. That itself is okay. But their cleanup
+ * phase shall wait for all the concurrent runs, to prevent use-after-free
+ * situation. This field is used to count such threads that are executing
+ * this particular pattern buffer.
+ *
+ * @warning Of course, touching this field from extension libraries causes
+ * catastrophic effects. Just leave it.
+ */
+ unsigned long usecnt;
+};
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Convenient getter function.
+ *
+ * @param[in] rexp The regular expression in question.
+ * @return The source code of the regular expression.
+ * @pre `rexp` must be of ::RRegexp.
+ */
+static inline VALUE
+RREGEXP_SRC(VALUE rexp)
+{
+ RBIMPL_ASSERT_TYPE(rexp, RUBY_T_REGEXP);
+ VALUE ret = RREGEXP(rexp)->src;
+ RBIMPL_ASSERT_TYPE(ret, RUBY_T_STRING);
+ return ret;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Convenient getter function.
+ *
+ * @param[in] rexp The regular expression in question.
+ * @return The source code of the regular expression, in C's string.
+ * @pre `rexp` must be of ::RRegexp.
+ *
+ * @internal
+ *
+ * It seems nobody uses this function in the wild. Subject to hide?
+ */
+static inline char *
+RREGEXP_SRC_PTR(VALUE rexp)
+{
+ return RSTRING_PTR(RREGEXP_SRC(rexp));
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Convenient getter function.
+ *
+ * @param[in] rexp The regular expression in question.
+ * @return The length of the source code of the regular expression.
+ * @pre `rexp` must be of ::RRegexp.
+ *
+ * @internal
+ *
+ * It seems nobody uses this function in the wild. Subject to hide?
+ */
+static inline long
+RREGEXP_SRC_LEN(VALUE rexp)
+{
+ return RSTRING_LEN(RREGEXP_SRC(rexp));
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Convenient getter function.
+ *
+ * @param[in] rexp The regular expression in question.
+ * @return The end of the source code of the regular expression.
+ * @pre `rexp` must be of ::RRegexp.
+ *
+ * @internal
+ *
+ * It seems nobody uses this function in the wild. Subject to hide?
+ */
+static inline char *
+RREGEXP_SRC_END(VALUE rexp)
+{
+ return RSTRING_END(RREGEXP_SRC(rexp));
+}
+
+#endif /* RBIMPL_RREGEXP_H */
diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h
new file mode 100644
index 0000000000..e394ab7dca
--- /dev/null
+++ b/include/ruby/internal/core/rstring.h
@@ -0,0 +1,578 @@
+#ifndef RBIMPL_RSTRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RSTRING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RString.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/internal/warning_push.h"
+#include "ruby/assert.h"
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RString.
+ * @return The passed object casted to ::RString.
+ */
+#define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj))
+
+/** @cond INTERNAL_MACRO */
+#define RSTRING_NOEMBED RSTRING_NOEMBED
+#if !USE_RVARGC
+#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
+#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
+#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
+#endif
+#define RSTRING_FSTR RSTRING_FSTR
+#define RSTRING_EMBED_LEN RSTRING_EMBED_LEN
+#define RSTRING_LEN RSTRING_LEN
+#define RSTRING_LENINT RSTRING_LENINT
+#define RSTRING_PTR RSTRING_PTR
+#define RSTRING_END RSTRING_END
+/** @endcond */
+
+/**
+ * @name Conversion of Ruby strings into C's
+ *
+ * @{
+ */
+
+/**
+ * Ensures that the parameter object is a String. This is done by calling its
+ * `to_str` method.
+ *
+ * @param[in,out] v Arbitrary Ruby object.
+ * @exception rb_eTypeError No implicit conversion defined.
+ * @post `v` is a String.
+ */
+#define StringValue(v) rb_string_value(&(v))
+
+/**
+ * Identical to #StringValue, except it returns a `char*`.
+ *
+ * @param[in,out] v Arbitrary Ruby object.
+ * @exception rb_eTypeError No implicit conversion defined.
+ * @return Converted Ruby string's backend C string.
+ * @post `v` is a String.
+ */
+#define StringValuePtr(v) rb_string_value_ptr(&(v))
+
+/**
+ * Identical to #StringValuePtr, except it additionally checks for the contents
+ * for viability as a C string. Ruby can accept wider range of contents as
+ * strings, compared to C. This function is to check that.
+ *
+ * @param[in,out] v Arbitrary Ruby object.
+ * @exception rb_eTypeError No implicit conversion defined.
+ * @exception rb_eArgError String is not C-compatible.
+ * @return Converted Ruby string's backend C string.
+ * @post `v` is a String.
+ */
+#define StringValueCStr(v) rb_string_value_cstr(&(v))
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define SafeStringValue(v) StringValue(v)
+
+/**
+ * Identical to #StringValue, except it additionally converts the string's
+ * encoding to default external encoding. Ruby has a concept called encodings.
+ * A string can have different encoding than the environment expects. Someone
+ * has to make sure its contents be converted to something suitable. This is
+ * that routine. Call it when necessary.
+ *
+ * @param[in,out] v Arbitrary Ruby object.
+ * @exception rb_eTypeError No implicit conversion defined.
+ * @return Converted Ruby string's backend C string.
+ * @post `v` is a String.
+ *
+ * @internal
+ *
+ * Not sure but it seems this macro does not raise on encoding
+ * incompatibilities? Doesn't sound right to @shyouhei.
+ */
+#define ExportStringValue(v) do { \
+ StringValue(v); \
+ (v) = rb_str_export(v); \
+} while (0)
+
+/** @} */
+
+/**
+ * @private
+ *
+ * Bits that you can set to ::RBasic::flags.
+ *
+ * @warning These enums are not the only bits we use for strings.
+ *
+ * @internal
+ *
+ * Actually all bits through FL_USER1 to FL_USER19 are used for strings. Why
+ * only this tiny part of them are made public here? @shyouhei can find no
+ * reason.
+ */
+enum ruby_rstring_flags {
+
+ /**
+ * This flag has something to do with memory footprint. If the string is
+ * short enough, ruby tries to be creative to abuse padding bits of struct
+ * ::RString for storing contents. If this flag is set that string does
+ * _not_ do that, to resort to good old fashioned external allocation
+ * strategy instead.
+ *
+ * @warning This bit has to be considered read-only. Setting/clearing
+ * this bit without corresponding fix up must cause immediate
+ * SEGV. Also, internal structures of a string change
+ * dynamically and transparently throughout of its lifetime.
+ * Don't assume it being persistent.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store a string. Might better be hidden.
+ */
+ RSTRING_NOEMBED = RUBY_FL_USER1,
+
+#if !USE_RVARGC
+ /**
+ * When a string employs embedded strategy (see ::RSTRING_NOEMBED), these
+ * bits are used to store the number of bytes actually filled into
+ * ::RString::ary.
+ *
+ * @internal
+ *
+ * 3rd parties must not be aware that there even is more than one way to
+ * store a string. Might better be hidden.
+ */
+ RSTRING_EMBED_LEN_MASK = RUBY_FL_USER2 | RUBY_FL_USER3 | RUBY_FL_USER4 |
+ RUBY_FL_USER5 | RUBY_FL_USER6,
+#endif
+
+ /* Actually, string encodings are also encoded into the flags, using
+ * remaining bits.*/
+
+ /**
+ * This flag has something to do with infamous "f"string. What is a
+ * fstring? Well it is a special subkind of strings that is immutable,
+ * deduped globally, and managed by our GC. It is much like a Symbol (in
+ * fact Symbols are dynamic these days and are backended using fstrings).
+ * This concept has been silently introduced at some point in 2.x era.
+ * Since then it gained wider acceptance in the core. But extension
+ * libraries could not know that until very recently. Strings of this flag
+ * live in a special Limbo deep inside of the interpreter. Never try to
+ * manipulate it by hand.
+ *
+ * @internal
+ *
+ * Fstrings are not the only variant strings that we implement today.
+ * Other things are behind-the-scene. This is the only one that is visible
+ * from extension library. There is no clear reason why it has to be.
+ * Given there are more "polite" ways to create fstrings, it seems this bit
+ * need not be exposed to extension libraries. Might better be hidden.
+ */
+ RSTRING_FSTR = RUBY_FL_USER17
+};
+
+#if !USE_RVARGC
+/**
+ * This is an enum because GDB wants it (rather than a macro). People need not
+ * bother.
+ */
+enum ruby_rstring_consts {
+ /** Where ::RSTRING_EMBED_LEN_MASK resides. */
+ RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2,
+
+ /** Max possible number of characters that can be embedded. */
+ RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1
+};
+#endif
+
+/**
+ * Ruby's String. A string in ruby conceptually has these information:
+ *
+ * - Encoding of the string.
+ * - Length of the string.
+ * - Contents of the string.
+ *
+ * It is worth noting that a string is _not_ an array of characters in ruby.
+ * It has never been. In 1.x a string was an array of integers. Since 2.x a
+ * string is no longer an array of anything. A string is a string -- just like
+ * a Time is not an integer.
+ */
+struct RString {
+
+ /** Basic part, including flags and class. */
+ struct RBasic basic;
+
+ /** String's specific fields. */
+ union {
+
+ /**
+ * Strings that use separated memory region for contents use this
+ * pattern.
+ */
+ struct {
+
+ /**
+ * Length of the string, not including terminating NUL character.
+ *
+ * @note This is in bytes.
+ */
+ long len;
+
+ /**
+ * Pointer to the contents of the string. In the old days each
+ * string had dedicated memory regions. That is no longer true
+ * today, but there still are strings of such properties. This
+ * field could be used to point such things.
+ */
+ char *ptr;
+
+ /** Auxiliary info. */
+ union {
+
+ /**
+ * Capacity of `*ptr`. A continuous memory region of at least
+ * `capa` bytes is expected to exist at `*ptr`. This can be
+ * bigger than `len`.
+ */
+ long capa;
+
+ /**
+ * Parent of the string. Nowadays strings can share their
+ * contents each other, constructing gigantic nest of objects.
+ * This situation is called "shared", and this is the field to
+ * control such properties.
+ */
+ VALUE shared;
+ } aux;
+ } heap;
+
+ /** Embedded contents. */
+ struct {
+#if USE_RVARGC
+ long len;
+ /* This is a length 1 array because:
+ * 1. GCC has a bug that does not optimize C flexible array members
+ * (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)
+ * 2. Zero length arrays are not supported by all compilers
+ */
+ char ary[1];
+#else
+ /**
+ * When a string is short enough, it uses this area to store the
+ * contents themselves. This was impractical in the 20th century,
+ * but these days 64 bit machines can typically hold 24 bytes here.
+ * Could be sufficiently large. In this case the length is encoded
+ * into the flags.
+ */
+ char ary[RSTRING_EMBED_LEN_MAX + 1];
+#endif
+ } embed;
+ } as;
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Identical to rb_check_string_type(), except it raises exceptions in case of
+ * conversion failures.
+ *
+ * @param[in] obj Target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @return Return value of `obj.to_str`.
+ * @see rb_io_get_io
+ * @see rb_ary_to_ary
+ */
+VALUE rb_str_to_str(VALUE obj);
+
+/**
+ * Identical to rb_str_to_str(), except it fills the passed pointer with the
+ * converted object.
+ *
+ * @param[in,out] ptr Pointer to a variable of target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @return Return value of `obj.to_str`.
+ * @post `*ptr` is the return value.
+ */
+VALUE rb_string_value(volatile VALUE *ptr);
+
+/**
+ * Identical to rb_str_to_str(), except it returns the converted string's
+ * backend memory region.
+ *
+ * @param[in,out] ptr Pointer to a variable of target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @post `*ptr` is the return value of `obj.to_str`.
+ * @return Pointer to the contents of the return value.
+ */
+char *rb_string_value_ptr(volatile VALUE *ptr);
+
+/**
+ * Identical to rb_string_value_ptr(), except it additionally checks for the
+ * contents for viability as a C string. Ruby can accept wider range of
+ * contents as strings, compared to C. This function is to check that.
+ *
+ * @param[in,out] ptr Pointer to a variable of target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @exception rb_eArgError String is not C-compatible.
+ * @post `*ptr` is the return value of `obj.to_str`.
+ * @return Pointer to the contents of the return value.
+ */
+char *rb_string_value_cstr(volatile VALUE *ptr);
+
+/**
+ * Identical to rb_str_to_str(), except it additionally converts the string
+ * into default external encoding. Ruby has a concept called encodings. A
+ * string can have different encoding than the environment expects. Someone
+ * has to make sure its contents be converted to something suitable. This is
+ * that routine. Call it when necessary.
+ *
+ * @param[in] obj Target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @return Converted ruby string of default external encoding.
+ */
+VALUE rb_str_export(VALUE obj);
+
+/**
+ * Identical to rb_str_export(), except it converts into the locale encoding
+ * instead.
+ *
+ * @param[in] obj Target object.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @return Converted ruby string of locale encoding.
+ */
+VALUE rb_str_export_locale(VALUE obj);
+
+RBIMPL_ATTR_ERROR(("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead"))
+/**
+ * @private
+ *
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ */
+void rb_check_safe_str(VALUE);
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v)))
+
+/**
+ * @private
+ *
+ * Prints diagnostic message to stderr when RSTRING_PTR or RSTRING_END
+ * is NULL.
+ *
+ * @param[in] func The function name where encountered NULL pointer.
+ */
+void rb_debug_rstring_null_ptr(const char *func);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the length of the string.
+ *
+ * @param[in] str String in question.
+ * @return Its length, in bytes.
+ * @pre `str` must be an instance of ::RString, and must has its
+ * ::RSTRING_NOEMBED flag off.
+ *
+ * @internal
+ *
+ * This was a macro before. It was inevitable to be public, since macros are
+ * global constructs. But should it be forever? Now that it is a function,
+ * @shyouhei thinks it could just be eliminated, hidden into implementation
+ * details.
+ */
+static inline long
+RSTRING_EMBED_LEN(VALUE str)
+{
+ RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING);
+ RBIMPL_ASSERT_OR_ASSUME(! RB_FL_ANY_RAW(str, RSTRING_NOEMBED));
+
+#if USE_RVARGC
+ long f = RSTRING(str)->as.embed.len;
+ return f;
+#else
+ VALUE f = RBASIC(str)->flags;
+ f &= RSTRING_EMBED_LEN_MASK;
+ f >>= RSTRING_EMBED_LEN_SHIFT;
+ return RBIMPL_CAST((long)f);
+#endif
+}
+
+RBIMPL_WARNING_PUSH()
+#if RBIMPL_COMPILER_IS(Intel)
+RBIMPL_WARNING_IGNORED(413)
+#endif
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ *
+ * "Expands" an embedded string into an ordinal one. This is a function that
+ * returns aggregated type. The returned struct always has its `as.heap.len`
+ * an `as.heap.ptr` fields set appropriately.
+ *
+ * This is an implementation detail that 3rd parties should never bother.
+ */
+static inline struct RString
+rbimpl_rstring_getmem(VALUE str)
+{
+ RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING);
+
+ if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) {
+ return *RSTRING(str);
+ }
+ else {
+ /* Expecting compilers to optimize this on-stack struct away. */
+ struct RString retval;
+ retval.as.heap.len = RSTRING_EMBED_LEN(str);
+ retval.as.heap.ptr = RSTRING(str)->as.embed.ary;
+ return retval;
+ }
+}
+
+RBIMPL_WARNING_POP()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the length of the string.
+ *
+ * @param[in] str String in question.
+ * @return Its length, in bytes.
+ * @pre `str` must be an instance of ::RString.
+ */
+static inline long
+RSTRING_LEN(VALUE str)
+{
+ return rbimpl_rstring_getmem(str).as.heap.len;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the contents pointer of the string.
+ *
+ * @param[in] str String in question.
+ * @return Pointer to its contents.
+ * @pre `str` must be an instance of ::RString.
+ */
+static inline char *
+RSTRING_PTR(VALUE str)
+{
+ char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr;
+
+ if (RB_UNLIKELY(! ptr)) {
+ /* :BEWARE: @shyouhei thinks that currently, there are rooms for this
+ * function to return NULL. In the 20th century that was a pointless
+ * concern. However struct RString can hold fake strings nowadays. It
+ * seems no check against NULL are exercised around handling of them
+ * (one of such usages is located in marshal.c, which scares
+ * @shyouhei). Better check here for maximum safety.
+ *
+ * Also, this is not rb_warn() because RSTRING_PTR() can be called
+ * during GC (see what obj_info() does). rb_warn() needs to allocate
+ * Ruby objects. That is not possible at this moment. */
+ rb_debug_rstring_null_ptr("RSTRING_PTR");
+ }
+
+ return ptr;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the end of the contents pointer of the string.
+ *
+ * @param[in] str String in question.
+ * @return Pointer to its end of contents.
+ * @pre `str` must be an instance of ::RString.
+ */
+static inline char *
+RSTRING_END(VALUE str)
+{
+ struct RString buf = rbimpl_rstring_getmem(str);
+
+ if (RB_UNLIKELY(! buf.as.heap.ptr)) {
+ /* Ditto. */
+ rb_debug_rstring_null_ptr("RSTRING_END");
+ }
+
+ return &buf.as.heap.ptr[buf.as.heap.len];
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to RSTRING_LEN(), except it differs for the return type.
+ *
+ * @param[in] str String in question.
+ * @exception rb_eRangeError Too long.
+ * @return Its length, in bytes.
+ * @pre `str` must be an instance of ::RString.
+ *
+ * @internal
+ *
+ * This API seems redundant but has actual usages.
+ */
+static inline int
+RSTRING_LENINT(VALUE str)
+{
+ return rb_long2int(RSTRING_LEN(str));
+}
+
+/**
+ * Convenient macro to obtain the contents and length at once.
+ *
+ * @param str String in question.
+ * @param ptrvar Variable where its contents is stored.
+ * @param lenvar Variable where its length is stored.
+ */
+#ifdef HAVE_STMT_AND_DECL_IN_EXPR
+# define RSTRING_GETMEM(str, ptrvar, lenvar) \
+ __extension__ ({ \
+ struct RString rbimpl_str = rbimpl_rstring_getmem(str); \
+ (ptrvar) = rbimpl_str.as.heap.ptr; \
+ (lenvar) = rbimpl_str.as.heap.len; \
+ })
+#else
+# define RSTRING_GETMEM(str, ptrvar, lenvar) \
+ ((ptrvar) = RSTRING_PTR(str), \
+ (lenvar) = RSTRING_LEN(str))
+#endif /* HAVE_STMT_AND_DECL_IN_EXPR */
+#endif /* RBIMPL_RSTRING_H */
diff --git a/include/ruby/internal/core/rstruct.h b/include/ruby/internal/core/rstruct.h
new file mode 100644
index 0000000000..69be487b59
--- /dev/null
+++ b/include/ruby/internal/core/rstruct.h
@@ -0,0 +1,121 @@
+#ifndef RBIMPL_RSTRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RSTRUCT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate struct RStruct.
+ * @note The struct RStruct itself is opaque.
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/internal/arithmetic/long.h"
+#include "ruby/internal/arithmetic/int.h"
+#if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY
+# include "ruby/backward.h"
+#endif
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * Declaration of rb_struct_ptr() is at include/ruby/backward.h.
+ */
+#define RSTRUCT_PTR(st) rb_struct_ptr(st)
+/** @cond INTERNAL_MACRO */
+#define RSTRUCT_LEN RSTRUCT_LEN
+#define RSTRUCT_SET RSTRUCT_SET
+#define RSTRUCT_GET RSTRUCT_GET
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * Returns the number of struct members.
+ *
+ * @param[in] st An instance of RStruct.
+ * @return The number of members of `st`.
+ * @pre `st` must be of ::RUBY_T_STRUCT.
+ */
+VALUE rb_struct_size(VALUE st);
+
+/**
+ * Resembles `Struct#[]`.
+ *
+ * @param[in] st An instance of RStruct.
+ * @param[in] k Index a.k.a. key of the struct.
+ * @exception rb_eTypeError `k` is neither Numeric, Symbol, nor String.
+ * @exception rb_eIndexError Numerical index out of range.
+ * @exception rb_eNameError No such key.
+ * @return The member stored at `k` in `st`.
+ * @pre `st` must be of ::RUBY_T_STRUCT.
+ */
+VALUE rb_struct_aref(VALUE st, VALUE k);
+
+/**
+ * Resembles `Struct#[]=`.
+ *
+ * @param[out] st An instance of RStruct.
+ * @param[in] k Index a.k.a. key of the struct.
+ * @param[in] v Value to store.
+ * @exception rb_eTypeError `k` is neither Numeric, Symbol, nor String.
+ * @exception rb_eIndexError Numerical index out of range.
+ * @exception rb_eNameError No such key.
+ * @return Passed `v`.
+ * @pre `st` must be of ::RUBY_T_STRUCT.
+ * @post `v` is stored at `k` in `st`.
+ */
+VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_ARTIFICIAL()
+/** @copydoc rb_struct_size() */
+static inline long
+RSTRUCT_LEN(VALUE st)
+{
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
+
+ return RB_NUM2LONG(rb_struct_size(st));
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/** @copydoc rb_struct_aset() */
+static inline VALUE
+RSTRUCT_SET(VALUE st, int k, VALUE v)
+{
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
+
+ return rb_struct_aset(st, INT2NUM(k), (v));
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/** @copydoc rb_struct_aref() */
+static inline VALUE
+RSTRUCT_GET(VALUE st, int k)
+{
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
+
+ return rb_struct_aref(st, INT2NUM(k));
+}
+
+#endif /* RBIMPL_RSTRUCT_H */
diff --git a/include/ruby/internal/core/rtypeddata.h b/include/ruby/internal/core/rtypeddata.h
new file mode 100644
index 0000000000..bbf208867d
--- /dev/null
+++ b/include/ruby/internal/core/rtypeddata.h
@@ -0,0 +1,604 @@
+#ifndef RBIMPL_RTYPEDDATA_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RTYPEDDATA_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines struct ::RTypedData.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#include "ruby/internal/assume.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/flag_enum.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/core/rdata.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/error.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value_type.h"
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_TYPE_RB_DATA_TYPE_T 1
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_RB_DATA_TYPE_T_PARENT 1
+
+/**
+ * This is a value you can set to ::rb_data_type_struct::dfree. Setting this
+ * means the data was allocated using ::ruby_xmalloc() (or variants), and shall
+ * be freed using ::ruby_xfree().
+ *
+ * @warning Do not use this if you want to use system malloc, because the
+ * system and Ruby might or might not share the same malloc
+ * implementation.
+ */
+#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
+
+/**
+ * This is a value you can set to ::rb_data_type_struct::dfree. Setting this
+ * means the data is managed by someone else, like, statically allocated. Of
+ * course you are on your own then.
+ */
+#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
+
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RTypedData.
+ * @return The passed object casted to ::RTypedData.
+ */
+#define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj))
+
+/**
+ * Convenient getter macro.
+ *
+ * @param v An object, which is in fact an ::RTypedData.
+ * @return The passed object's ::RTypedData::data field.
+ */
+#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
+
+/** @old{rb_check_typeddata} */
+#define Check_TypedStruct(v, t) \
+ rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t))
+
+/** @cond INTERNAL_MACRO */
+#define RTYPEDDATA_P RTYPEDDATA_P
+#define RTYPEDDATA_TYPE RTYPEDDATA_TYPE
+#define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY
+#define RUBY_TYPED_FROZEN_SHAREABLE RUBY_TYPED_FROZEN_SHAREABLE
+#define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED
+#define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1
+/** @endcond */
+
+/**
+ * @private
+ *
+ * Bits for rb_data_type_struct::flags.
+ */
+enum
+RBIMPL_ATTR_FLAG_ENUM()
+rbimpl_typeddata_flags {
+ /**
+ * This flag has something to do with Ruby's global interpreter lock. For
+ * maximum safety, Ruby locks the entire VM during GC. However your
+ * callback functions could unintentionally unlock it, for instance when
+ * they try to flush an IO buffer. Such operations are dangerous (threads
+ * then run alongside of GC). By default, to prevent those scenario,
+ * callbacks are deferred until the GC engine is 100% sure threads can run.
+ * This flag skips that; structs with it are deallocated during the sweep
+ * phase.
+ *
+ * Using this flag needs deep understanding of both GC and threads. You
+ * would better leave it unspecified.
+ */
+ RUBY_TYPED_FREE_IMMEDIATELY = 1,
+
+ /**
+ * This flag has something to do with Ractor. Multiple Ractors run without
+ * protecting each other. Sharing an object among Ractors is basically
+ * dangerous, disabled by default. This flag is used to bypass that
+ * restriction. but setting it is not enough. In addition to do so, an
+ * object also has to be frozen, and be passed to
+ * rb_ractor_make_shareable() before being actually shareable. Of course,
+ * you have to manually prevent race conditions then.
+ *
+ * Using this flag needs deep understanding of multithreaded programming.
+ * You would better leave it unspecified.
+ */
+ RUBY_TYPED_FROZEN_SHAREABLE = RUBY_FL_SHAREABLE,
+
+ /**
+ * This flag has something to do with our garbage collector. These days
+ * ruby objects are "generational". There are those who are young and
+ * those who are old. Young objects are prone to die; monitored relatively
+ * extensively by the garbage collector. OTOH old objects tend to live
+ * longer. They are relatively rarely considered. This basically works.
+ * But there is one tweak that has to be exercised. When an elder object
+ * has reference(s) to younger one(s), that referenced objects must not
+ * die. In order to detect additions of such references, old generations
+ * are protected by write barriers. It is a very difficult hack to
+ * appropriately insert write barriers everywhere. This mechanism is
+ * disabled by default for 3rd party extensions (they never get aged). By
+ * specifying this flag you can enable the generational feature to your
+ * data structure. Of course, you have to manually insert write barriers
+ * then.
+ *
+ * Using this flag needs deep understanding of GC internals, often at the
+ * level of source code. You would better leave it unspecified.
+ */
+ RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED, /* THIS FLAG DEPENDS ON Ruby version */
+
+ /**
+ * This flag is mysterious. It seems nobody is currently using it. The
+ * intention of this flag is also unclear. We need further investigations.
+ */
+ RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1 /* THIS FLAG DEPENDS ON Ruby version */
+};
+
+/**
+ * This is the struct that holds necessary info for a struct. It roughly
+ * resembles a Ruby level class; multiple objects can share a ::rb_data_type_t
+ * instance.
+ */
+typedef struct rb_data_type_struct rb_data_type_t;
+
+/** @copydoc rb_data_type_t */
+struct rb_data_type_struct {
+
+ /**
+ * Name of structs of this kind. This is used for diagnostic purposes.
+ * This has to be unique in the process, but doesn't has to be a valid
+ * C/Ruby identifier.
+ */
+ const char *wrap_struct_name;
+
+ /** Function pointers. Resembles C++ `vtbl`.*/
+ struct {
+
+ /**
+ * This function is called when the object is experiencing GC marks.
+ * If it contains references to other Ruby objects, you need to mark
+ * them also. Otherwise GC will smash your data.
+ *
+ * @see rb_gc_mark()
+ * @warning This is called during GC runs. Object allocations are
+ * impossible at that moment (that is why GC runs).
+ */
+ RUBY_DATA_FUNC dmark;
+
+ /**
+ * This function is called when the object is no longer used. You need
+ * to do whatever necessary to avoid memory leaks.
+ *
+ * @warning This is called during GC runs. Object allocations are
+ * impossible at that moment (that is why GC runs).
+ */
+ RUBY_DATA_FUNC dfree;
+
+ /**
+ * This function is to query the size of the underlying memory regions.
+ *
+ * @internal
+ *
+ * This function has only one usage, which is form inside of
+ * `ext/objspace`.
+ */
+ size_t (*dsize)(const void *);
+
+ /**
+ * This function is called when the object is relocated. Like
+ * ::rb_data_type_struct::dmark, you need to update references to Ruby
+ * objects inside of your structs.
+ *
+ * @see rb_gc_location()
+ * @warning This is called during GC runs. Object allocations are
+ * impossible at that moment (that is why GC runs).
+ */
+ RUBY_DATA_FUNC dcompact;
+
+ /**
+ * This field is reserved for future extension. For now, it must be
+ * filled with zeros.
+ */
+ void *reserved[1]; /* For future extension.
+ This array *must* be filled with ZERO. */
+ } function;
+
+ /**
+ * Parent of this class. Sometimes C structs have inheritance-like
+ * relationships. An example is `struct sockaddr` and its family. If you
+ * design such things, make ::rb_data_type_t for each of them and connect
+ * using this field. Ruby can then transparently cast your data back and
+ * forth when you call #TypedData_Get_Struct().
+ *
+ * ```CXX
+ * struct parent { };
+ * static inline const rb_data_type_t parent_type = {
+ * .wrap_struct_name = "parent",
+ * };
+ *
+ * struct child: public parent { };
+ * static inline const rb_data_type_t child_type = {
+ * .wrap_struct_name = "child",
+ * .parent = &parent_type,
+ * };
+ *
+ * // This function can take both parent_class and child_class.
+ * static inline struct parent *
+ * get_parent(VALUE v)
+ * {
+ * struct parent *p;
+ * TypedData_Get_Struct(v, parent_type, struct parent, p);
+ * return p;
+ * }
+ * ```
+ */
+ const rb_data_type_t *parent;
+
+ /**
+ * Type-specific static data. This area can be used for any purpose by a
+ * programmer who define the type. Ruby does not manage this at all.
+ */
+ void *data; /* This area can be used for any purpose
+ by a programmer who define the type. */
+
+ /**
+ * Type-specific behavioural characteristics. This is a bitfield. It is
+ * an EXTREMELY WISE IDEA to leave this field blank. It is designed so
+ * that setting zero is the safest thing to do. If you risk to set any
+ * bits on, you have to know exactly what you are doing.
+ *
+ * @internal
+ *
+ * Why it has to be a ::VALUE? @shyouhei doesn't understand the design.
+ */
+ VALUE flags; /* RUBY_FL_WB_PROTECTED */
+};
+
+/**
+ * "Typed" user data. By using this, extension libraries can wrap a C struct
+ * to make it visible from Ruby. For instance if you have a `struct timeval`,
+ * and you want users to use it,
+ *
+ * ```CXX
+ * static inline const rb_data_type_t timeval_type = {
+ * // Note that unspecified fields are 0-filled by default.
+ * .wrap_struct_name = "timeval",
+ * .function = {
+ * .dmark = nullptr, // no need to mark
+ * .dfree = RUBY_TYPED_DEFAULT_FREE, // use ruby_xfree()
+ * .dsize = [](auto) {
+ * return sizeof(struct timeval);
+ * },
+ * },
+ * };
+ *
+ * extern "C" void
+ * Init_timeval(void)
+ * {
+ * auto klass = rb_define_class("YourName", rb_cObject);
+ *
+ * rb_define_alloc_func(klass, [](auto klass) {
+ * struct timeval *t;
+ * auto ret = TypedData_Make_Struct(
+ * klass, struct timeval, &timeval_type, t);
+ *
+ * if (auto i = gettimeofday(t, nullptr); i == -1) {
+ * rb_sys_fail("gettimeofday(3)");
+ * }
+ * else {
+ * return ret;
+ * }
+ * });
+ * }
+ * ```
+ */
+struct RTypedData {
+
+ /** The part that all ruby objects have in common. */
+ struct RBasic basic;
+
+ /**
+ * This field stores various information about how Ruby should handle a
+ * data. This roughly resembles a Ruby level class (apart from method
+ * definition etc.)
+ */
+ const rb_data_type_t *type;
+
+ /**
+ * This has to be always 1.
+ *
+ * @internal
+ *
+ * Why, then, this is not a const ::VALUE?
+ */
+ VALUE typed_flag;
+
+ /** Pointer to the actual C level struct that you want to wrap. */
+ void *data;
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NONNULL((3))
+/**
+ * This is the primitive way to wrap an existing C struct into ::RTypedData.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] datap Pointer to the target C struct.
+ * @param[in] type The characteristics of the passed data.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return An allocated object that wraps `datap`.
+ */
+VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type);
+
+/**
+ * Identical to rb_data_typed_object_wrap(), except it allocates a new data
+ * region internally instead of taking an existing one. The allocation is done
+ * using ruby_calloc(). Hence it makes no sense for `type->function.dfree` to
+ * be anything other than ::RUBY_TYPED_DEFAULT_FREE.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] size Requested size of memory to allocate.
+ * @param[in] type The characteristics of the passed data.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return An allocated object that wraps a new `size` byte region.
+ */
+VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
+
+/**
+ * Checks for the domestic relationship between the two.
+ *
+ * @param[in] child A data type supposed to be a child of `parent`.
+ * @param[in] parent A data type supposed to be a parent of `child`.
+ * @retval true `child` is a descendent of `parent`.
+ * @retval false Otherwise.
+ *
+ * @internal
+ *
+ * You can path NULL to both arguments, don't know what that means though.
+ */
+int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
+
+/**
+ * Checks if the given object is of given kind.
+ *
+ * @param[in] obj An instance of ::RTypedData.
+ * @param[in] data_type Expected data type of `obj`.
+ * @retval true `obj` is of `data_type`.
+ * @retval false Otherwise.
+ */
+int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type);
+
+/**
+ * Identical to rb_typeddata_is_kind_of(), except it raises exceptions instead
+ * of returning false.
+ *
+ * @param[in] obj An instance of ::RTypedData.
+ * @param[in] data_type Expected data type of `obj`.
+ * @exception rb_eTypeError obj is not of `data_type`.
+ * @return Unwrapped C struct that `obj` holds.
+ * @post Upon successful return `obj`'s type is guaranteed `data_type`.
+ */
+void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type);
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Converts sval, a pointer to your struct, into a Ruby object.
+ *
+ * @param klass A ruby level class.
+ * @param data_type The type of `sval`.
+ * @param sval A pointer to your struct.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ */
+#define TypedData_Wrap_Struct(klass,data_type,sval)\
+ rb_data_typed_object_wrap((klass),(sval),(data_type))
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #TypedData_Make_Struct. People don't
+ * use it directly.
+ *
+ * @param result Variable name of created Ruby object.
+ * @param klass Ruby level class of the object.
+ * @param type Type name of the C struct.
+ * @param size Size of the C struct.
+ * @param data_type The data type describing `type`.
+ * @param sval Variable name of created C struct.
+ */
+#define TypedData_Make_Struct0(result, klass, type, size, data_type, sval) \
+ VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); \
+ (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); \
+ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval))
+
+/**
+ * Identical to #TypedData_Wrap_Struct, except it allocates a new data region
+ * internally instead of taking an existing one. The allocation is done using
+ * ruby_calloc(). Hence it makes no sense for `data_type->function.dfree` to
+ * be anything other than ::RUBY_TYPED_DEFAULT_FREE.
+ *
+ * @param klass Ruby level class of the object.
+ * @param type Type name of the C struct.
+ * @param data_type The data type describing `type`.
+ * @param sval Variable name of created C struct.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ */
+#ifdef HAVE_STMT_AND_DECL_IN_EXPR
+#define TypedData_Make_Struct(klass, type, data_type, sval) \
+ RB_GNUC_EXTENSION({ \
+ TypedData_Make_Struct0( \
+ data_struct_obj, \
+ klass, \
+ type, \
+ sizeof(type), \
+ data_type, \
+ sval); \
+ data_struct_obj; \
+ })
+#else
+#define TypedData_Make_Struct(klass, type, data_type, sval) \
+ rb_data_typed_object_make( \
+ (klass), \
+ (data_type), \
+ RBIMPL_CAST((void **)&(sval)), \
+ sizeof(type))
+#endif
+
+/**
+ * Obtains a C struct from inside of a wrapper Ruby object.
+ *
+ * @param obj An instance of ::RTypedData.
+ * @param type Type name of the C struct.
+ * @param data_type The data type describing `type`.
+ * @param sval Variable name of obtained C struct.
+ * @exception rb_eTypeError `obj` is not a kind of `data_type`.
+ * @return Unwrapped C struct that `obj` holds.
+ */
+#define TypedData_Get_Struct(obj,type,data_type,sval) \
+ ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type))))
+
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ *
+ * This is an implementation detail of Check_Type(). People don't use it
+ * directly.
+ *
+ * @param[in] obj Object in question
+ * @retval true `obj` is an instance of ::RTypedData.
+ * @retval false `obj` is an instance of ::RData.
+ * @pre `obj` must be a Ruby object of ::RUBY_T_DATA.
+ */
+static inline bool
+rbimpl_rtypeddata_p(VALUE obj)
+{
+ return RTYPEDDATA(obj)->typed_flag == 1;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks whether the passed object is ::RTypedData or ::RData.
+ *
+ * @param[in] obj Object in question
+ * @retval true `obj` is an instance of ::RTypedData.
+ * @retval false `obj` is an instance of ::RData.
+ * @pre `obj` must be a Ruby object of ::RUBY_T_DATA.
+ */
+static inline bool
+RTYPEDDATA_P(VALUE obj)
+{
+#if RUBY_DEBUG
+ if (RB_UNLIKELY(! RB_TYPE_P(obj, RUBY_T_DATA))) {
+ Check_Type(obj, RUBY_T_DATA);
+ RBIMPL_UNREACHABLE_RETURN(false);
+ }
+#endif
+
+ return rbimpl_rtypeddata_p(obj);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
+/**
+ * Queries for the type of given object.
+ *
+ * @param[in] obj Object in question
+ * @return Data type struct that corresponds to `obj`.
+ * @pre `obj` must be an instance of ::RTypedData.
+ */
+static inline const struct rb_data_type_struct *
+RTYPEDDATA_TYPE(VALUE obj)
+{
+#if RUBY_DEBUG
+ if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) {
+ rb_unexpected_type(obj, RUBY_T_DATA);
+ RBIMPL_UNREACHABLE_RETURN(NULL);
+ }
+#endif
+
+ return RTYPEDDATA(obj)->type;
+}
+
+/**
+ * While we don't stop you from using this function, it seems to be an
+ * implementation detail of #TypedData_Make_Struct, which is preferred over
+ * this one.
+ *
+ * @param[in] klass Ruby level class of the returning object.
+ * @param[in] type The data type
+ * @param[out] datap Return pointer.
+ * @param[in] size Size of the C struct.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eNoMemError Out of memory.
+ * @return A created Ruby object.
+ * @post `*datap` points to the C struct wrapped by the returned object.
+ */
+static inline VALUE
+rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
+{
+ TypedData_Make_Struct0(result, klass, void, size, type, *datap);
+ return result;
+}
+
+RBIMPL_ATTR_DEPRECATED(("by: rb_data_typed_object_wrap"))
+/** @deprecated This function was renamed to rb_data_typed_object_wrap(). */
+static inline VALUE
+rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
+{
+ return rb_data_typed_object_wrap(klass, datap, type);
+}
+
+#endif /* RBIMPL_RTYPEDDATA_H */
diff --git a/include/ruby/internal/ctype.h b/include/ruby/internal/ctype.h
new file mode 100644
index 0000000000..0f7ca6c516
--- /dev/null
+++ b/include/ruby/internal/ctype.h
@@ -0,0 +1,545 @@
+#ifndef RBIMPL_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CTYPE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Our own, locale independent, character handling routines.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <ctype.h>
+#endif
+
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+
+/**
+ * @name Old character classification macros
+ *
+ * What is this #ISPRINT business? Well, according to our VCS and some
+ * internet surfing, it appears that the initial intent of these macros were to
+ * mimic codes appear in common in several GNU projects. As far as @shyouhei
+ * detects they seem to originate GNU regex (that standalone one rather than
+ * Gnulib or Glibc), and at least date back to 1995.
+ *
+ * Let me lawfully quote from a GNU coreutils commit
+ * https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=49803907f5dbd7646184a8912c9db9b09dcd0f22
+ *
+ * > Jim Meyering writes:
+ * >
+ * > "... Some ctype macros are valid only for character codes that
+ * > isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
+ * > using /bin/cc or gcc but without giving an ansi option). So, all
+ * > ctype uses should be through macros like ISPRINT... If
+ * > STDC_HEADERS is defined, then autoconf has verified that the ctype
+ * > macros don't need to be guarded with references to isascii. ...
+ * > Defining isascii to 1 should let any compiler worth its salt
+ * > eliminate the && through constant folding."
+ * >
+ * > Bruno Haible adds:
+ * >
+ * > "... Furthermore, isupper(c) etc. have an undefined result if c is
+ * > outside the range -1 <= c <= 255. One is tempted to write isupper(c)
+ * > with c being of type `char', but this is wrong if c is an 8-bit
+ * > character >= 128 which gets sign-extended to a negative value.
+ * > The macro ISUPPER protects against this as well."
+ *
+ * So the intent was to reroute old problematic systems that no longer exist.
+ * At the same time the problems described above no longer hurt us, because we
+ * decided to completely avoid using system-provided isupper etc. to reinvent
+ * the wheel. These macros are entirely legacy; please ignore them.
+ *
+ * But let me also put stress that GNU people are wise; they use those macros
+ * only inside of their own implementations and never let them be public. On
+ * the other hand ruby has thoughtlessly publicised them to 3rd party libraries
+ * since its beginning, which is a very bad idea. These macros are too easy to
+ * get conflicted with definitions elsewhere.
+ *
+ * New programs should stick to the `rb_` prefixed names.
+ *
+ * @note It seems we just mimic the API. We do not share their implementation
+ * with GPL-ed programs.
+ *
+ * @{
+ */
+#ifndef ISPRINT
+# define ISASCII rb_isascii /**< @old{rb_isascii}*/
+# define ISPRINT rb_isprint /**< @old{rb_isprint}*/
+# define ISGRAPH rb_isgraph /**< @old{rb_isgraph}*/
+# define ISSPACE rb_isspace /**< @old{rb_isspace}*/
+# define ISUPPER rb_isupper /**< @old{rb_isupper}*/
+# define ISLOWER rb_islower /**< @old{rb_islower}*/
+# define ISALNUM rb_isalnum /**< @old{rb_isalnum}*/
+# define ISALPHA rb_isalpha /**< @old{rb_isalpha}*/
+# define ISDIGIT rb_isdigit /**< @old{rb_isdigit}*/
+# define ISXDIGIT rb_isxdigit /**< @old{rb_isxdigit}*/
+# define ISBLANK rb_isblank /**< @old{rb_isblank}*/
+# define ISCNTRL rb_iscntrl /**< @old{rb_iscntrl}*/
+# define ISPUNCT rb_ispunct /**< @old{rb_ispunct}*/
+#endif
+
+#define TOUPPER rb_toupper /**< @old{rb_toupper}*/
+#define TOLOWER rb_tolower /**< @old{rb_tolower}*/
+#define STRCASECMP st_locale_insensitive_strcasecmp /**< @old{st_locale_insensitive_strcasecmp}*/
+#define STRNCASECMP st_locale_insensitive_strncasecmp /**< @old{st_locale_insensitive_strncasecmp}*/
+#define STRTOUL ruby_strtoul /**< @old{ruby_strtoul}*/
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/** @name locale insensitive functions
+ * @{
+ */
+
+/* In descriptions below, `the POSIX Locale` and `the "C" locale` are tactfully
+ * used as to whether the described function mimics POSIX or C99. */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Our own locale-insensitive version of `strcasecmp(3)`. The "case" here
+ * always means that of the POSIX Locale. It doesn't depend on runtime locale
+ * settings.
+ *
+ * @param[in] s1 Comparison LHS.
+ * @param[in] s2 Comparison RHS.
+ * @retval -1 `s1` is "less" than `s2`.
+ * @retval 0 Both strings converted into lowercase would be identical.
+ * @retval 1 `s1` is "greater" than `s2`.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ */
+int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Our own locale-insensitive version of `strcnasecmp(3)`. The "case" here
+ * always means that of the POSIX Locale. It doesn't depend on runtime locale
+ * settings.
+ *
+ * @param[in] s1 Comparison LHS.
+ * @param[in] s2 Comparison RHS.
+ * @param[in] n Comparison shall stop after first `n` bytes are scanned.
+ * @retval -1 `s1` is "less" than `s2`.
+ * @retval 0 Both strings converted into lowercase would be identical.
+ * @retval 1 `s1` is "greater" than `s2`.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning This function is _not_ timing safe.
+ */
+int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Our own locale-insensitive version of `strtoul(3)`. The conversion is done
+ * as if the current locale is set to the "C" locale, no matter actual runtime
+ * locale settings.
+ *
+ * @note This is needed because `strtoul("i", 0, 36)` would return zero
+ * if it is locale sensitive and the current locale is `tr_TR`.
+ * @param[in] str String of digits, optionally preceded with whitespaces
+ * (ignored) and optionally `+` or `-` sign.
+ * @param[out] endptr NULL, or an arbitrary pointer (overwritten on return).
+ * @param[in] base `2` to `36` inclusive for each base, or special case
+ * `0` to detect the base from the contents of the string.
+ * @return Converted integer, casted to unsigned long.
+ * @post If `endptr` is not NULL, it is updated to point the first such
+ * byte where conversion failed.
+ * @note This function sets `errno` on failure.
+ * - `EINVAL`: Passed `base` is out of range.
+ * - `ERANGE`: Converted integer is out of range of `long`.
+ * @warning As far as @shyouhei reads ISO/IEC 9899:2018 section 7.22.1.4, a
+ * conforming `strtoul` implementation shall render `ERANGE`
+ * whenever it finds the input string represents a negative
+ * integer. Such thing can never be representable using `unsigned
+ * long`. However this implementation does not honour that
+ * language. It just casts such negative value to the return
+ * type, resulting a very big return value. This behaviour is at
+ * least questionable. But we can no longer change that at this
+ * point.
+ * @note Not only does this function works under the "C" locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ */
+unsigned long ruby_strtoul(const char *str, char **endptr, int base);
+RBIMPL_SYMBOL_EXPORT_END()
+
+/*
+ * We are making the functions below to return `int` instead of `bool`. They
+ * have been as such since their birth at 5f237d79033b2109afb768bc889611fa9630.
+ */
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isascii(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval false `c` is out of range of ASCII character set.
+ * @retval true Yes it is.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isascii(int c)
+{
+ return '\0' <= c && c <= '\x7f';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isupper(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "upper".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isupper(int c)
+{
+ return 'A' <= c && c <= 'Z';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `islower(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "lower".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_islower(int c)
+{
+ return 'a' <= c && c <= 'z';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isalpha(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in either IEEE 1003.1 section 7.3.1.1
+ * "upper" or "lower".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isalpha(int c)
+{
+ return rb_isupper(c) || rb_islower(c);
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isdigit(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "digit".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isdigit(int c)
+{
+ return '0' <= c && c <= '9';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isalnum(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in either IEEE 1003.1 section 7.3.1.1
+ * "upper", "lower", or "digit".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isalnum(int c)
+{
+ return rb_isalpha(c) || rb_isdigit(c);
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isxdigit(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "xdigit".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isxdigit(int c)
+{
+ return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isblank(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "blank".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isblank(int c)
+{
+ return c == ' ' || c == '\t';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isspace(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "space".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isspace(int c)
+{
+ return c == ' ' || ('\t' <= c && c <= '\r');
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `iscntrl(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "cntrl".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_iscntrl(int c)
+{
+ return ('\0' <= c && c < ' ') || c == '\x7f';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to rb_isgraph(), except it also returns true for `' '`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in either IEEE 1003.1 section 7.3.1.1
+ * "upper", "lower", "digit", "punct", or a `' '`.
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isprint(int c)
+{
+ return ' ' <= c && c <= '\x7e';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `ispunct(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in IEEE 1003.1 section 7.3.1.1 "punct".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_ispunct(int c)
+{
+ return !rb_isalnum(c);
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `isgraph(3)`.
+ *
+ * @param[in] c Byte in question to query.
+ * @retval true `c` is listed in either IEEE 1003.1 section 7.3.1.1
+ * "upper", "lower", "digit", or "punct".
+ * @retval false Anything else.
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_isgraph(int c)
+{
+ return '!' <= c && c <= '\x7e';
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `tolower(3)`.
+ *
+ * @param[in] c Byte in question to convert.
+ * @retval c The byte is not listed in in IEEE 1003.1 section
+ * 7.3.1.1 "upper".
+ * @retval otherwise Byte converted using the map defined in IEEE 1003.1
+ * section 7.3.1 "tolower".
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_tolower(int c)
+{
+ return rb_isupper(c) ? (c|0x20) : c;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Our own locale-insensitive version of `toupper(3)`.
+ *
+ * @param[in] c Byte in question to convert.
+ * @retval c The byte is not listed in in IEEE 1003.1 section
+ * 7.3.1.1 "lower".
+ * @retval otherwise Byte converted using the map defined in IEEE 1003.1
+ * section 7.3.1 "toupper".
+ * @note Not only does this function works under the POSIX Locale, but
+ * also assumes its execution character set be what ruby calls an
+ * ASCII-compatible character set; which does not include for
+ * instance EBCDIC or UTF-16LE.
+ * @warning `c` is an int. This means that when you pass a `char` value
+ * here, it experiences "integer promotion" as defined in ISO/IEC
+ * 9899:2018 section 6.3.1.1 paragraph 1.
+ */
+static inline int
+rb_toupper(int c)
+{
+ return rb_islower(c) ? (c&0x5f) : c;
+}
+
+/** @} */
+#endif /* RBIMPL_CTYPE_H */
diff --git a/include/ruby/internal/dllexport.h b/include/ruby/internal/dllexport.h
new file mode 100644
index 0000000000..08a262209d
--- /dev/null
+++ b/include/ruby/internal/dllexport.h
@@ -0,0 +1,112 @@
+#ifndef RBIMPL_DLLEXPORT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_DLLEXPORT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Tweaking visibility of C variables/functions.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/compiler_is.h"
+
+/**
+ * Declaration of externally visible global variables. Here "externally" means
+ * they should be visible from extension libraries. Depending on operating
+ * systems (dynamic linkers, to be precise), global variables inside of a DLL
+ * may or may not be visible form outside of that DLL by default. This
+ * declaration manually tweaks that default and ensures the declared variable
+ * be truly globally visible.
+ *
+ * ```CXX
+ * extern VALUE foo; // hidden on some OS
+ * RUBY_EXTERN VALUE foo; // ensure visible
+ * ```
+ */
+#undef RUBY_EXTERN
+#if defined(MJIT_HEADER) && defined(_WIN32)
+# define RUBY_EXTERN extern __declspec(dllimport)
+#elif defined(RUBY_EXPORT)
+# define RUBY_EXTERN extern
+#elif defined(_WIN32)
+# define RUBY_EXTERN extern __declspec(dllimport)
+#else
+# define RUBY_EXTERN extern
+#endif
+
+#ifndef RUBY_SYMBOL_EXPORT_BEGIN
+# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
+#endif
+
+#ifndef RUBY_SYMBOL_EXPORT_END
+# define RUBY_SYMBOL_EXPORT_END /* end */
+#endif
+
+#ifndef RUBY_FUNC_EXPORTED
+# define RUBY_FUNC_EXPORTED /* void */
+#endif
+
+/**
+ * @cond INTERNAL_MACRO
+ *
+ * These MJIT related macros are placed here because translate_mjit_header can
+ * need them. Extension libraries should not touch.
+ */
+
+/* These macros are used for functions which are exported only for MJIT
+ and NOT ensured to be exported in future versions. */
+
+#if ! defined(MJIT_HEADER)
+# define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
+#elif ! RBIMPL_COMPILER_IS(MSVC)
+# define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
+#else
+# define MJIT_FUNC_EXPORTED static
+#endif
+
+#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
+#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
+
+/* On mswin, MJIT header transformation can't be used since cl.exe can't output
+ preprocessed output preserving macros. So this `MJIT_STATIC` is needed
+ to force non-static function to static on MJIT header to avoid symbol conflict. */
+#ifdef MJIT_HEADER
+# define MJIT_STATIC static
+#else
+# define MJIT_STATIC
+#endif
+
+/** @endcond */
+
+/** Shortcut macro equivalent to `RUBY_SYMBOL_EXPORT_BEGIN extern "C" {`.
+ * \@shyouhei finds it handy. */
+#if defined(__DOXYGEN__)
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() /* void */
+#elif defined(__cplusplus)
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN extern "C" {
+#else
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
+#endif
+
+/** Counterpart of #RBIMPL_SYMBOL_EXPORT_BEGIN */
+#if defined(__DOXYGEN__)
+# define RBIMPL_SYMBOL_EXPORT_END() /* void */
+#elif defined(__cplusplus)
+# define RBIMPL_SYMBOL_EXPORT_END() } RUBY_SYMBOL_EXPORT_END
+#else
+# define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
+#endif
+#endif /* RBIMPL_DLLEXPORT_H */
diff --git a/include/ruby/internal/dosish.h b/include/ruby/internal/dosish.h
new file mode 100644
index 0000000000..7d354ddd1a
--- /dev/null
+++ b/include/ruby/internal/dosish.h
@@ -0,0 +1,89 @@
+#ifndef RBIMPL_DOSISH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_DOSISH_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Support for so-called dosish systems.
+ */
+#ifdef __CYGWIN__
+#undef _WIN32
+#endif
+
+#if defined(_WIN32)
+/*
+ DOSISH mean MS-Windows style filesystem.
+ But you should use more precise macros like DOSISH_DRIVE_LETTER, PATH_SEP,
+ ENV_IGNORECASE or CASEFOLD_FILESYSTEM.
+ */
+#define DOSISH 1
+# define DOSISH_DRIVE_LETTER
+#endif
+
+#ifdef _WIN32
+#include "ruby/win32.h"
+#endif
+
+/** The delimiter of `PATH` environment variable. */
+#if defined(DOSISH)
+#define PATH_SEP ";"
+#else
+#define PATH_SEP ":"
+#endif
+
+/** Identical to #PATH_SEP, except it is of type `char`. */
+#define PATH_SEP_CHAR PATH_SEP[0]
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * For historical interests: there was an operating system called Human68k
+ * which used an environment variable called `"path"` for this purpose.
+ */
+#define PATH_ENV "PATH"
+
+#if defined(DOSISH)
+#define ENV_IGNORECASE
+#endif
+
+/**
+ * Stone age assumption was that an operating system supports only one file
+ * system at a moment. This macro was to detect if such (one and only) file
+ * system has case sensitivity. This assumption is largely not true any
+ * longer; most operating systems can mount many kinds of file systems side by
+ * side. Also there are file systems that do or do not ignore cases depending
+ * on configuration (e.g. EXT4's `casefold` feature).
+ *
+ * This macro is still used internally (for instance Ruby level constant
+ * `File::FNM_SYSCASE` depends on it), but it is basically a wrong idea for you
+ * to use it today. Please just find another way.
+ */
+#ifndef CASEFOLD_FILESYSTEM
+# if defined DOSISH
+# define CASEFOLD_FILESYSTEM 1
+# else
+# define CASEFOLD_FILESYSTEM 0
+# endif
+#endif
+
+#endif /* RBIMPL_DOSISH_H */
diff --git a/include/ruby/internal/encoding/coderange.h b/include/ruby/internal/encoding/coderange.h
new file mode 100644
index 0000000000..7a81208c9e
--- /dev/null
+++ b/include/ruby/internal/encoding/coderange.h
@@ -0,0 +1,202 @@
+#ifndef RUBY_INTERNAL_ENCODING_CODERANGE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_CODERANGE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines for code ranges.
+ */
+
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/** What rb_enc_str_coderange() returns. */
+enum ruby_coderange_type {
+
+ /** The object's coderange is unclear yet. */
+ RUBY_ENC_CODERANGE_UNKNOWN = 0,
+
+ /** The object holds 0 to 127 inclusive and nothing else. */
+ RUBY_ENC_CODERANGE_7BIT = ((int)RUBY_FL_USER8),
+
+ /** The object's encoding and contents are consistent each other */
+ RUBY_ENC_CODERANGE_VALID = ((int)RUBY_FL_USER9),
+
+ /** The object holds invalid/malformed/broken character(s). */
+ RUBY_ENC_CODERANGE_BROKEN = ((int)(RUBY_FL_USER8|RUBY_FL_USER9)),
+
+ /** Where the coderange resides. */
+ RUBY_ENC_CODERANGE_MASK = (RUBY_ENC_CODERANGE_7BIT|
+ RUBY_ENC_CODERANGE_VALID|
+ RUBY_ENC_CODERANGE_BROKEN)
+};
+
+RBIMPL_ATTR_CONST()
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ENC_CODERANGE_CLEAN_P. People don't
+ * use it directly.
+ *
+ * @param[in] cr An enum ::ruby_coderange_type.
+ * @retval 1 It is.
+ * @retval 0 It isn't.
+ */
+static inline int
+rb_enc_coderange_clean_p(int cr)
+{
+ return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT;
+}
+
+RBIMPL_ATTR_CONST()
+/**
+ * Queries if a code range is "clean". "Clean" in this context means it is
+ * known and valid.
+ *
+ * @param[in] cr An enum ::ruby_coderange_type.
+ * @retval 1 It is.
+ * @retval 0 It isn't.
+ */
+static inline bool
+RB_ENC_CODERANGE_CLEAN_P(enum ruby_coderange_type cr)
+{
+ return rb_enc_coderange_clean_p(cr);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * Queries the (inline) code range of the passed object. The object must be
+ * capable of having inline encoding. Using this macro needs deep
+ * understanding of bit level object binary layout.
+ *
+ * @param[in] obj Target object.
+ * @return An enum ::ruby_coderange_type.
+ */
+static inline enum ruby_coderange_type
+RB_ENC_CODERANGE(VALUE obj)
+{
+ VALUE ret = RB_FL_TEST_RAW(obj, RUBY_ENC_CODERANGE_MASK);
+
+ return RBIMPL_CAST((enum ruby_coderange_type)ret);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * Queries the (inline) code range of the passed object is
+ * ::RUBY_ENC_CODERANGE_7BIT. The object must be capable of having inline
+ * encoding. Using this macro needs deep understanding of bit level object
+ * binary layout.
+ *
+ * @param[in] obj Target object.
+ * @retval 1 It is ascii only.
+ * @retval 0 Otherwise (including cases when the range is not known).
+ */
+static inline bool
+RB_ENC_CODERANGE_ASCIIONLY(VALUE obj)
+{
+ return RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT;
+}
+
+/**
+ * Destructively modifies the passed object so that its (inline) code range is
+ * the passed one. The object must be capable of having inline encoding.
+ * Using this macro needs deep understanding of bit level object binary layout.
+ *
+ * @param[out] obj Target object.
+ * @param[out] cr An enum ::ruby_coderange_type.
+ * @post `obj`'s code range is `cr`.
+ */
+static inline void
+RB_ENC_CODERANGE_SET(VALUE obj, enum ruby_coderange_type cr)
+{
+ RB_FL_UNSET_RAW(obj, RUBY_ENC_CODERANGE_MASK);
+ RB_FL_SET_RAW(obj, cr);
+}
+
+/**
+ * Destructively clears the passed object's (inline) code range. The object
+ * must be capable of having inline encoding. Using this macro needs deep
+ * understanding of bit level object binary layout.
+ *
+ * @param[out] obj Target object.
+ * @post `obj`'s code range is ::RUBY_ENC_CODERANGE_UNKNOWN.
+ */
+static inline void
+RB_ENC_CODERANGE_CLEAR(VALUE obj)
+{
+ RB_FL_UNSET_RAW(obj, RUBY_ENC_CODERANGE_MASK);
+}
+
+RBIMPL_ATTR_CONST()
+/* assumed ASCII compatibility */
+/**
+ * "Mix" two code ranges into one. This is handy for instance when you
+ * concatenate two strings into one. Consider one of then is valid but the
+ * other isn't. The result must be invalid. This macro computes that kind of
+ * mixture.
+ *
+ * @param[in] a An enum ::ruby_coderange_type.
+ * @param[in] b Another enum ::ruby_coderange_type.
+ * @return The `a` "and" `b`.
+ */
+static inline enum ruby_coderange_type
+RB_ENC_CODERANGE_AND(enum ruby_coderange_type a, enum ruby_coderange_type b)
+{
+ if (a == RUBY_ENC_CODERANGE_7BIT) {
+ return b;
+ }
+ else if (a != RUBY_ENC_CODERANGE_VALID) {
+ return RUBY_ENC_CODERANGE_UNKNOWN;
+ }
+ else if (b == RUBY_ENC_CODERANGE_7BIT) {
+ return RUBY_ENC_CODERANGE_VALID;
+ }
+ else {
+ return b;
+ }
+}
+
+#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK /**< @old{RUBY_ENC_CODERANGE_MASK} */
+#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN /**< @old{RUBY_ENC_CODERANGE_UNKNOWN} */
+#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT /**< @old{RUBY_ENC_CODERANGE_7BIT} */
+#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID /**< @old{RUBY_ENC_CODERANGE_VALID} */
+#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN /**< @old{RUBY_ENC_CODERANGE_BROKEN} */
+#define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr) /**< @old{RB_ENC_CODERANGE_CLEAN_P} */
+#define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj) /**< @old{RB_ENC_CODERANGE} */
+#define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj) /**< @old{RB_ENC_CODERANGE_ASCIIONLY} */
+#define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr) /**< @old{RB_ENC_CODERANGE_SET} */
+#define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj) /**< @old{RB_ENC_CODERANGE_CLEAR} */
+#define ENC_CODERANGE_AND(a, b) RB_ENC_CODERANGE_AND(a, b) /**< @old{RB_ENC_CODERANGE_AND} */
+#define ENCODING_CODERANGE_SET(obj, encindex, cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr) /**< @old{RB_ENCODING_CODERANGE_SET} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_ENC_CODERANGE RB_ENC_CODERANGE
+#define RB_ENC_CODERANGE_AND RB_ENC_CODERANGE_AND
+#define RB_ENC_CODERANGE_ASCIIONLY RB_ENC_CODERANGE_ASCIIONLY
+#define RB_ENC_CODERANGE_CLEAN_P RB_ENC_CODERANGE_CLEAN_P
+#define RB_ENC_CODERANGE_CLEAR RB_ENC_CODERANGE_CLEAR
+#define RB_ENC_CODERANGE_SET RB_ENC_CODERANGE_SET
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_CODERANGE_H */
diff --git a/include/ruby/internal/encoding/ctype.h b/include/ruby/internal/encoding/ctype.h
new file mode 100644
index 0000000000..05c314aeb3
--- /dev/null
+++ b/include/ruby/internal/encoding/ctype.h
@@ -0,0 +1,258 @@
+#ifndef RUBY_INTERNAL_ENCODING_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_CTYPE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to query chacater types.
+ */
+
+#include "ruby/onigmo.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Queries if the passed pointer points to a newline character. What is a
+ * newline and what is not depends on the passed encoding.
+ *
+ * @param[in] p Pointer to a possibly-middle of a character.
+ * @param[in] end End of the string.
+ * @param[in] enc Encoding.
+ * @retval false It isn't.
+ * @retval true It is.
+ */
+static inline bool
+rb_enc_is_newline(const char *p, const char *e, rb_encoding *enc)
+{
+ OnigUChar *up = RBIMPL_CAST((OnigUChar *)p);
+ OnigUChar *ue = RBIMPL_CAST((OnigUChar *)e);
+
+ return ONIGENC_IS_MBC_NEWLINE(enc, up, ue);
+}
+
+/**
+ * Queries if the passed code point is of passed character type in the passed
+ * encoding. The "character type" here is a set of macros defined in onigmo.h,
+ * like `ONIGENC_CTYPE_PUNCT`.
+ *
+ * @param[in] c An `OnigCodePoint` value.
+ * @param[in] t An `OnigCtype` value.
+ * @param[in] enc A `rb_encoding*` value.
+ * @retval true `c` is of `t` in `enc`.
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isctype(OnigCodePoint c, OnigCtype t, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_CTYPE(enc, c, t);
+}
+
+/**
+ * Identical to rb_isascii(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval false `c` is out of range of ASCII character set in `enc`.
+ * @retval true Otherwise.
+ *
+ * @internal
+ *
+ * `enc` is ignored. This is at least an intentional implementation detail
+ * (not a bug). But there could be rooms for future extensions.
+ */
+static inline bool
+rb_enc_isascii(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_ASCII(c);
+}
+
+/**
+ * Identical to rb_isalpha(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "ALPHA".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isalpha(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_ALPHA(enc, c);
+}
+
+/**
+ * Identical to rb_islower(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "LOWER".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_islower(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_LOWER(enc, c);
+}
+
+/**
+ * Identical to rb_isupper(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "UPPER".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isupper(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_UPPER(enc, c);
+}
+
+/**
+ * Identical to rb_iscntrl(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "CNTRL".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_iscntrl(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_CNTRL(enc, c);
+}
+
+/**
+ * Identical to rb_ispunct(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "PUNCT".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_ispunct(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_PUNCT(enc, c);
+}
+
+/**
+ * Identical to rb_isalnum(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "ANUM".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isalnum(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_ALNUM(enc, c);
+}
+
+/**
+ * Identical to rb_isprint(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "PRINT".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isprint(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_PRINT(enc, c);
+}
+
+/**
+ * Identical to rb_isspace(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "PRINT".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isspace(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_SPACE(enc, c);
+}
+
+/**
+ * Identical to rb_isdigit(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @retval true `enc` classifies `c` as "DIGIT".
+ * @retval false Otherwise.
+ */
+static inline bool
+rb_enc_isdigit(OnigCodePoint c, rb_encoding *enc)
+{
+ return ONIGENC_IS_CODE_DIGIT(enc, c);
+}
+
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_toupper(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @return `c`'s (Ruby's definition of) upper case counterpart.
+ *
+ * @internal
+ *
+ * As `RBIMPL_ATTR_CONST` implies this function ignores `enc`.
+ */
+int rb_enc_toupper(int c, rb_encoding *enc);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_tolower(), except it additionally takes an encoding.
+ *
+ * @param[in] c A code point.
+ * @param[in] enc An encoding.
+ * @return `c`'s (Ruby's definition of) lower case counterpart.
+ *
+ * @internal
+ *
+ * As `RBIMPL_ATTR_CONST` implies this function ignores `enc`.
+ */
+int rb_enc_tolower(int c, rb_encoding *enc);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/** @cond INTERNAL_MACRO */
+#define rb_enc_is_newline rb_enc_is_newline
+#define rb_enc_isalnum rb_enc_isalnum
+#define rb_enc_isalpha rb_enc_isalpha
+#define rb_enc_isascii rb_enc_isascii
+#define rb_enc_isctype rb_enc_isctype
+#define rb_enc_isdigit rb_enc_isdigit
+#define rb_enc_islower rb_enc_islower
+#define rb_enc_isprint rb_enc_isprint
+#define rb_enc_iscntrl rb_enc_iscntrl
+#define rb_enc_ispunct rb_enc_ispunct
+#define rb_enc_isspace rb_enc_isspace
+#define rb_enc_isupper rb_enc_isupper
+/** @endcond */
+
+#endif /* RUBY_INTERNAL_ENCODING_CTYPE_H */
diff --git a/include/ruby/internal/encoding/encoding.h b/include/ruby/internal/encoding/encoding.h
new file mode 100644
index 0000000000..4748ca806b
--- /dev/null
+++ b/include/ruby/internal/encoding/encoding.h
@@ -0,0 +1,1060 @@
+#ifndef RUBY_INTERNAL_ENCODING_ENCODING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_ENCODING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines ::rb_encoding
+ */
+
+#include "ruby/oniguruma.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/fl_type.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * `Encoding` class.
+ *
+ * @ingroup object
+ */
+RUBY_EXTERN VALUE rb_cEncoding;
+
+/**
+ * @private
+ *
+ * Bit constants used when embedding encodings into ::RBasic::flags. Extension
+ * libraries must not bother such things.
+ */
+enum ruby_encoding_consts {
+
+ /** Max possible number of embeddable encodings. */
+ RUBY_ENCODING_INLINE_MAX = 127,
+
+ /** Where inline encodings reside. */
+ RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
+
+ /** Bits we use to store inline encodings. */
+ RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
+ /* RUBY_FL_USER10..RUBY_FL_USER16 */),
+
+ /** Max possible length of an encoding name. */
+ RUBY_ENCODING_MAXNAMELEN = 42
+};
+
+#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX /**< @old{RUBY_ENCODING_INLINE_MAX} */
+#define ENCODING_SHIFT RUBY_ENCODING_SHIFT /**< @old{RUBY_ENCODING_SHIFT} */
+#define ENCODING_MASK RUBY_ENCODING_MASK /**< @old{RUBY_ENCODING_MASK} */
+
+/**
+ * Destructively assigns the passed encoding to the passed object. The object
+ * must be capable of having inline encoding. Using this macro needs deep
+ * understanding of bit level object binary layout.
+ *
+ * @param[out] obj Target object to modify.
+ * @param[in] ecindex Encoding in encindex format.
+ * @post `obj`'s encoding is `encindex`.
+ */
+static inline void
+RB_ENCODING_SET_INLINED(VALUE obj, int encindex)
+{
+ VALUE f = /* upcast */ encindex;
+
+ f <<= RUBY_ENCODING_SHIFT;
+ RB_FL_UNSET_RAW(obj, RUBY_ENCODING_MASK);
+ RB_FL_SET_RAW(obj, f);
+}
+
+/**
+ * Queries the encoding of the passed object. The encoding must be smaller
+ * than ::RUBY_ENCODING_INLINE_MAX, which means you have some assumption on the
+ * return value. This means the API is for internal use only.
+ *
+ * @param[in] obj Target object.
+ * @return `obj`'s encoding index.
+ */
+static inline int
+RB_ENCODING_GET_INLINED(VALUE obj)
+{
+ VALUE ret = RB_FL_TEST_RAW(obj, RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT;
+
+ return RBIMPL_CAST((int)ret);
+}
+
+#define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i) /**< @old{RB_ENCODING_SET_INLINED} */
+#define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i) /**< @old{RB_ENCODING_SET} */
+#define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj) /**< @old{RB_ENCODING_GET_INLINED} */
+#define ENCODING_GET(obj) RB_ENCODING_GET(obj) /**< @old{RB_ENCODING_GET} */
+#define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj) /**< @old{RB_ENCODING_IS_ASCII8BIT} */
+#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN /**< @old{RUBY_ENCODING_MAXNAMELEN} */
+
+/**
+ * The type of encoding. Our design here is we take Oniguruma/Onigmo's
+ * multilingualisation schema as our base data structure.
+ */
+typedef const OnigEncodingType rb_encoding;
+
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Converts a character option to its encoding. It only supports a very
+ * limited set of Japanese encodings due to its Japanese origin. Ruby still
+ * has this in-core for backwards compatibility. But new codes must not bother
+ * such concept like one-character encoding option. Consider deprecated in
+ * practice.
+ *
+ * @param[in] c One of `['n', 'e', 's', 'u', 'i', 'x', 'm']`.
+ * @param[out] option Return buffer.
+ * @param[out] kcode Return buffer.
+ * @retval 1 `c` understood properly.
+ * @retval 0 `c` is not understood.
+ * @post `option` is a ::OnigOptionType.
+ * @post `kcode` is an enum `ruby_preserved_encindex`.
+ *
+ * @internal
+ *
+ * `kcode` is opaque because `ruby_preserved_encindex` is not visible from
+ * extension libraries. But who cares?
+ */
+int rb_char_to_option_kcode(int c, int *option, int *kcode);
+
+/**
+ * Creates a new encoding, using the passed one as a template.
+ *
+ * @param[in] name Name of the creating encoding.
+ * @param[in] src Template.
+ * @exception rb_eArgError Duplicated or malformed `name`.
+ * @return Replicated new encoding's index.
+ * @post Encoding named `name` is created as a copy of `src`, whose index
+ * is the return value.
+ *
+ * @internal
+ *
+ * `name` can be `NULL`, but that just raises an exception. OTOH it seems no
+ * sanity check is done against `src`...?
+ */
+int rb_enc_replicate(const char *name, rb_encoding *src);
+
+/**
+ * Creates a new "dummy" encoding. Roughly speaking, an encoding is dummy when
+ * it is stateful. Notable example of dummy encoding are those defined in
+ * ISO/IEC 2022
+ *
+ * @param[in] name Name of the creating encoding.
+ * @exception rb_eArgError Duplicated or malformed `name`.
+ * @return New dummy encoding's index.
+ * @post Encoding named `name` is created, whose index is the return
+ * value.
+ */
+int rb_define_dummy_encoding(const char *name);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the passed encoding is dummy.
+ *
+ * @param[in] enc Encoding in question.
+ * @retval 1 It is.
+ * @retval 0 It isn't.
+ */
+int rb_enc_dummy_p(rb_encoding *enc);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the index of the encoding. An encoding's index is a Ruby-local
+ * concept. It is a (sequential) number assigned to each encoding.
+ *
+ * @param[in] enc Encoding in question.
+ * @return Its index.
+ * @note You can pass null pointers to this function. It is equivalent
+ * to rb_usascii_encindex() then.
+ */
+int rb_enc_to_index(rb_encoding *enc);
+
+/**
+ * Queries the index of the encoding of the passed object, if any.
+ *
+ * @param[in] obj Object in question.
+ * @retval -1 `obj` is incapable of having an encoding.
+ * @retval otherwise `obj`'s encoding's index.
+ */
+int rb_enc_get_index(VALUE obj);
+
+/**
+ * @alias{rb_enc_get_index}
+ *
+ * @internal
+ *
+ * Implementation wise this is not a verbatim alias of rb_enc_get_index(). But
+ * the API is consistent. Don't bother.
+ */
+static inline int
+RB_ENCODING_GET(VALUE obj)
+{
+ int encindex = RB_ENCODING_GET_INLINED(obj);
+
+ if (encindex == RUBY_ENCODING_INLINE_MAX) {
+ return rb_enc_get_index(obj);
+ }
+ else {
+ return encindex;
+ }
+}
+
+/**
+ * Destructively assigns an encoding (via its index) to an object.
+ *
+ * @param[out] obj Object in question.
+ * @param[in] encindex An encoding index.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @exception rb_eArgError `obj` is incapable of having an encoding.
+ * @exception rb_eEncodingError `encindex` is out of bounds.
+ * @exception rb_eLoadError Failed to load the encoding.
+ */
+void rb_enc_set_index(VALUE obj, int encindex);
+
+/** @alias{rb_enc_set_index} */
+static inline void
+RB_ENCODING_SET(VALUE obj, int encindex)
+{
+ rb_enc_set_index(obj, encindex);
+}
+
+/**
+ * This is #RB_ENCODING_SET + RB_ENC_CODERANGE_SET combo. The object must be
+ * capable of having inline encoding. Using this macro needs deep
+ * understanding of bit level object binary layout.
+ *
+ * @param[out] obj Target object.
+ * @param[in] encindex Encoding in encindex format.
+ * @param[in] cr An enum ::ruby_coderange_type.
+ * @post `obj`'s encoding is `encindex`.
+ * @post `obj`'s code range is `cr`.
+ */
+static inline void
+RB_ENCODING_CODERANGE_SET(VALUE obj, int encindex, enum ruby_coderange_type cr)
+{
+ RB_ENCODING_SET(obj, encindex);
+ RB_ENC_CODERANGE_SET(obj, cr);
+}
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the passed object can have its encoding.
+ *
+ * @param[in] obj Object in question.
+ * @retval 1 It can.
+ * @retval 0 It cannot.
+ */
+int rb_enc_capable(VALUE obj);
+
+/**
+ * Queries the index of the encoding.
+ *
+ * @param[in] name Name of the encoding to find.
+ * @exception rb_eArgError No such encoding named `name`.
+ * @retval -1 `name` exists, but unable to load.
+ * @retval otherwise Index of encoding named `name`.
+ */
+int rb_enc_find_index(const char *name);
+
+/**
+ * Registers an "alias" name. In the wild, an encoding can be called using
+ * multiple names. For instance an encoding known as `"CP932"` is also called
+ * `"SJIS"` on occasions. This API registers such relationships.
+ *
+ * @param[in] alias New name.
+ * @param[in] orig Old name.
+ * @exception rb_eArgError `alias` is duplicated or malformed.
+ * @retval -1 Failed to load `orig`.
+ * @retval otherwise The index of `orig` and `alias`.
+ * @post `alias` is a synonym of `orig`. They refer to the identical
+ * encoding.
+ */
+int rb_enc_alias(const char *alias, const char *orig);
+
+/**
+ * Obtains a encoding index from a wider range of objects (than
+ * rb_enc_find_index()).
+ *
+ * @param[in] obj An ::rb_cEncoding, or its name in ::rb_cString.
+ * @retval -1 `obj` is unexpected type/contents.
+ * @retval otherwise Index corresponding to `obj`.
+ */
+int rb_to_encoding_index(VALUE obj);
+
+/**
+ * Identical to rb_find_encoding(), except it raises an exception instead of
+ * returning NULL.
+ *
+ * @param[in] obj An ::rb_cEncoding, or its name in ::rb_cString.
+ * @exception rb_eTypeError `obj` is neither ::rb_cEncoding nor ::rb_cString.
+ * @exception rb_eArgError `obj` is an unknown encoding name.
+ * @return Encoding of `obj`.
+ */
+rb_encoding *rb_to_encoding(VALUE obj);
+
+/**
+ * Identical to rb_to_encoding_index(), except the return type.
+ *
+ * @param[in] obj An ::rb_cEncoding, or its name in ::rb_cString.
+ * @exception rb_eTypeError `obj` is neither ::rb_cEncoding nor ::rb_cString.
+ * @retval NULL No such encoding.
+ * @return otherwise Encoding of `obj`.
+ */
+rb_encoding *rb_find_encoding(VALUE obj);
+
+/**
+ * Identical to rb_enc_get_index(), except the return type.
+ *
+ * @param[in] obj Object in question.
+ * @retval NULL Obj is incapable of having an encoding.
+ * @retval otherwise `obj`'s encoding.
+ */
+rb_encoding *rb_enc_get(VALUE obj);
+
+/**
+ * Look for the "common" encoding between the two. One character can or cannot
+ * be expressed depending on an encoding. This function finds the super-set of
+ * encodings that satisfy contents of both arguments. If that is impossible
+ * returns NULL.
+ *
+ * @param[in] str1 An object.
+ * @param[in] str2 Another object.
+ * @retval NULL No encoding can satisfy both at once.
+ * @retval otherwise Common encoding between the two.
+ * @note Arguments can be non-string, e.g. Regexp.
+ */
+rb_encoding *rb_enc_compatible(VALUE str1, VALUE str2);
+
+/**
+ * Identical to rb_enc_compatible(), except it raises an exception instead of
+ * returning NULL.
+ *
+ * @param[in] str1 An object.
+ * @param[in] str2 Another object.
+ * @exception rb_eEncCompatError No encoding can satisfy both.
+ * @return Common encoding between the two.
+ * @note Arguments can be non-string, e.g. Regexp.
+ */
+rb_encoding *rb_enc_check(VALUE str1,VALUE str2);
+
+/**
+ * Identical to rb_enc_set_index(), except it additionally does contents fix-up
+ * depending on the passed object. It for instance changes the byte length of
+ * terminating `U+0000` according to the passed encoding.
+ *
+ * @param[out] obj Object in question.
+ * @param[in] encindex An encoding index.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @exception rb_eArgError `obj` is incapable of having an encoding.
+ * @exception rb_eEncodingError `encindex` is out of bounds.
+ * @exception rb_eLoadError Failed to load the encoding.
+ * @return The passed `obj`.
+ * @post `obj`'s contents might be fixed according to `encindex`.
+ */
+VALUE rb_enc_associate_index(VALUE obj, int encindex);
+
+/**
+ * Identical to rb_enc_associate_index(), except it takes an encoding itself
+ * instead of its index.
+ *
+ * @param[out] obj Object in question.
+ * @param[in] enc An encoding.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @exception rb_eArgError `obj` is incapable of having an encoding.
+ * @return The passed `obj`.
+ * @post `obj`'s contents might be fixed according to `enc`.
+ */
+VALUE rb_enc_associate(VALUE obj, rb_encoding *enc);
+
+/**
+ * Destructively copies the encoding of the latter object to that of former
+ * one. It can also be seen as a routine identical to
+ * rb_enc_associate_index(), except it takes an object's encoding instead of an
+ * encoding's index.
+ *
+ * @param[out] dst Object to modify.
+ * @param[in] src Object to reference.
+ * @exception rb_eFrozenError `dst` is frozen.
+ * @exception rb_eArgError `dst` is incapable of having an encoding.
+ * @exception rb_eEncodingError `src` is incapable of having an encoding.
+ * @post `dst`'s encoding is that of `src`'s.
+ */
+void rb_enc_copy(VALUE dst, VALUE src);
+
+
+/**
+ * Identical to rb_find_encoding(), except it takes an encoding index instead
+ * of a Ruby object.
+ *
+ * @param[in] idx An encoding index.
+ * @retval NULL No such encoding.
+ * @retval otherwise An encoding whose index is `idx`.
+ */
+rb_encoding *rb_enc_from_index(int idx);
+
+/**
+ * Identical to rb_find_encoding(), except it takes a C's string instead of
+ * Ruby's.
+ *
+ * @param[in] name Name of the encoding to query.
+ * @retval NULL No such encoding.
+ * @retval otherwise An encoding whose index is `idx`.
+ */
+rb_encoding *rb_enc_find(const char *name);
+
+/**
+ * Queries the (canonical) name of the passed encoding.
+ *
+ * @param[in] enc An encoding.
+ * @return Its name.
+ */
+static inline const char *
+rb_enc_name(rb_encoding *enc)
+{
+ return enc->name;
+}
+
+/**
+ * Queries the minimum number of bytes that the passed encoding needs to
+ * represent a character. For ASCII and compatible encodings this is typically
+ * 1. There are however encodings whose minimum is not 1; they are
+ * historically called wide characters.
+ *
+ * @param[in] enc An encoding.
+ * @return Its least possible number of bytes except 0.
+ */
+static inline int
+rb_enc_mbminlen(rb_encoding *enc)
+{
+ return enc->min_enc_len;
+}
+
+/**
+ * Queries the maximum number of bytes that the passed encoding needs to
+ * represent a character. Fixed-width encodings have the same value for this
+ * one and #rb_enc_mbminlen. However there are variable-width encodings.
+ * UTF-8, for instance, takes from 1 up to 6 bytes.
+ *
+ * @param[in] enc An encoding.
+ * @return Its maximum possible number of bytes of a character.
+ */
+static inline int
+rb_enc_mbmaxlen(rb_encoding *enc)
+{
+ return enc->max_enc_len;
+}
+
+/**
+ * Queries the number of bytes of the character at the passed pointer.
+ *
+ * @param[in] p Pointer to a character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] enc Encoding of the string.
+ * @return If the character at `p` does not end until `e`, number of bytes
+ * between `p` and `e`. Otherwise the number of bytes that the
+ * character at `p` is encoded.
+ *
+ * @internal
+ *
+ * Strictly speaking there are chances when `p` points to a middle byte of a
+ * wide character. This function returns "the number of bytes from `p` to
+ * nearest of either `e` or the next character boundary", if you go strict.
+ */
+int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_mbclen() unless the character at `p` overruns `e`. That
+ * can happen for instance when you read from a socket and its partial read
+ * cuts a wide character in-between. In those situations this function
+ * "estimates" theoretical length of the character in question. Typically it
+ * tends to be possible to know how many bytes a character needs before
+ * actually reaching its end; for instance UTF-8 encodes a character's length
+ * in the first byte of it. This function returns that info.
+ *
+ * @note This implies that the string is not broken.
+ *
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] enc Encoding of the string.
+ * @return Number of bytes of character at `p`, measured or estimated.
+ */
+int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc);
+
+/**
+ * Queries the number of bytes of the character at the passed pointer. This
+ * function returns 3 different types of information:
+ *
+ * ```CXX
+ * auto n = rb_enc_precise_mbclen(p, q, r);
+ *
+ * if (ONIGENC_MBCLEN_CHARFOUND_P(n)) {
+ * // Character found. Normal return.
+ * auto found_length = ONIGENC_MBCLEN_CHARFOUND_LEN(n);
+ * }
+ * else if (ONIGENC_MBCLEN_NEEDMORE_P(n)) {
+ * // Character overruns past `q`; needs more.
+ * auto requested_length = ONIGENC_MBCLEN_NEEDMORE_LEN(n);
+ * }
+ * else {
+ * // `p` is broken.
+ * assert(ONIGENC_MBCLEN_INVALID_P(n));
+ * }
+ * ```
+ *
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] enc Encoding of the string.
+ * @return Encoded read/needed number of bytes (see above).
+ */
+int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
+
+#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret) /**< @old{ONIGENC_MBCLEN_CHARFOUND_P} */
+#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret) /**< @old{ONIGENC_MBCLEN_CHARFOUND_LEN} */
+#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret) /**< @old{ONIGENC_MBCLEN_INVALID_P} */
+#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret) /**< @old{ONIGENC_MBCLEN_NEEDMORE_P} */
+#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret) /**< @old{ONIGENC_MBCLEN_NEEDMORE_LEN} */
+
+/**
+ * Queries the code point of character pointed by the passed pointer. If that
+ * code point is included in ASCII that code point is returned. Otherwise -1.
+ * This can be different from just looking at the first byte. For instance it
+ * reads 2 bytes in case of UTF-16BE.
+ *
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] len Return buffer.
+ * @param[in] enc Encoding of the string.
+ * @retval -1 The character at `p` is not i ASCII.
+ * @retval otherwise A code point of the character at `p`.
+ * @post `len` (if set) is the number of bytes of `p`.
+ */
+int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
+
+/**
+ * Queries the code point of character pointed by the passed pointer.
+ * Exceptions happen in case of broken input.
+ *
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] len Return buffer.
+ * @param[in] enc Encoding of the string.
+ * @exception rb_eArgError `p` is broken.
+ * @return Code point of the character pointed by `p`.
+ * @post `len` (if set) is the number of bytes of `p`.
+ */
+unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc);
+
+/**
+ * Queries the code point of character pointed by the passed pointer.
+ * Exceptions happen in case of broken input.
+ *
+ * @deprecated Use rb_enc_codepoint_len() instead.
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] enc Encoding of the string.
+ * @exception rb_eArgError `p` is broken.
+ * @return Code point of the character pointed by `p`.
+ *
+ * @internal
+ *
+ * @matz says in commit 91e5ba1cb865a2385d3e1cbfacd824496898e098 that the line
+ * below is a "prototype for obsolete function". However even today there
+ * still are some use cases of it throughout our repository. It seems it has
+ * its own niche.
+ */
+static inline unsigned int
+rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
+{
+ return rb_enc_codepoint_len(p, e, 0, enc);
+ /* ^^^
+ * This can be `NULL` in C, `nullptr` in C++, and `0` for both.
+ * We choose the most portable one here.
+ */
+}
+
+
+/**
+ * Identical to rb_enc_codepoint(), except it assumes the passed character is
+ * not broken.
+ *
+ * @param[in] p Pointer to the character's first byte.
+ * @param[in] e End of the string that has `p`.
+ * @param[in] enc Encoding of the string.
+ * @return Code point of the character pointed by `p`.
+ */
+static inline OnigCodePoint
+rb_enc_mbc_to_codepoint(const char *p, const char *e, rb_encoding *enc)
+{
+ const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);
+ const OnigUChar *ue = RBIMPL_CAST((const OnigUChar *)e);
+
+ return ONIGENC_MBC_TO_CODE(enc, up, ue);
+}
+
+/**
+ * Queries the number of bytes requested to represent the passed code point
+ * using the passed encoding.
+ *
+ * @param[in] code Code point in question.
+ * @param[in] enc Encoding to convert the code into a byte sequence.
+ * @exception rb_eArgError `enc` does not glean `code`.
+ * @return Number of bytes requested to represent `code` using `enc`.
+ */
+int rb_enc_codelen(int code, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_codelen(), except it returns 0 for invalid code points.
+ *
+ * @param[in] c Code point in question.
+ * @param[in] enc Encoding to convert `c` into a byte sequence.
+ * @retval 0 `c` is invalid.
+ * @return otherwise Number of bytes needed for `enc` to encode `c`.
+ */
+static inline int
+rb_enc_code_to_mbclen(int c, rb_encoding *enc)
+{
+ OnigCodePoint uc = RBIMPL_CAST((OnigCodePoint)c);
+
+ return ONIGENC_CODE_TO_MBCLEN(enc, uc);
+}
+
+/**
+ * Identical to rb_enc_uint_chr(), except it writes back to the passed buffer
+ * instead of allocating one.
+ *
+ * @param[in] c Code point.
+ * @param[out] buf Return buffer.
+ * @param[in] enc Target encoding scheme.
+ * @retval <= 0 `c` is invalid in `enc`.
+ * @return otherwise Number of bytes written to `buf`.
+ * @post `c` is encoded according to `enc`, then written to `buf`.
+ *
+ * @internal
+ *
+ * The second argument must be typed. But its current usages prevent us from
+ * being any stricter than this. :FIXME:
+ */
+static inline int
+rb_enc_mbcput(unsigned int c, void *buf, rb_encoding *enc)
+{
+ OnigCodePoint uc = RBIMPL_CAST((OnigCodePoint)c);
+ OnigUChar *ubuf = RBIMPL_CAST((OnigUChar *)buf);
+
+ return ONIGENC_CODE_TO_MBC(enc, uc, ubuf);
+}
+
+/**
+ * Queries the previous (left) character.
+ *
+ * @param[in] s Start of the string.
+ * @param[in] p Pointer to a character.
+ * @param[in] e End of the string.
+ * @param[in] enc Encoding.
+ * @retval NULL No previous character.
+ * @retval otherwise Pointer to the head of the previous character.
+ */
+static inline char *
+rb_enc_prev_char(const char *s, const char *p, const char *e, rb_encoding *enc)
+{
+ const OnigUChar *us = RBIMPL_CAST((const OnigUChar *)s);
+ const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);
+ const OnigUChar *ue = RBIMPL_CAST((const OnigUChar *)e);
+ OnigUChar *ur = onigenc_get_prev_char_head(enc, us, up, ue);
+
+ return RBIMPL_CAST((char *)ur);
+}
+
+/**
+ * Queries the left boundary of a character. This function takes a pointer
+ * that is not necessarily a head of a character, and searches for its head.
+ *
+ * @param[in] s Start of the string.
+ * @param[in] p Pointer to a possibly-middle of a character.
+ * @param[in] e End of the string.
+ * @param[in] enc Encoding.
+ * @return Pointer to the head of the character that contains `p`.
+ */
+static inline char *
+rb_enc_left_char_head(const char *s, const char *p, const char *e, rb_encoding *enc)
+{
+ const OnigUChar *us = RBIMPL_CAST((const OnigUChar *)s);
+ const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);
+ const OnigUChar *ue = RBIMPL_CAST((const OnigUChar *)e);
+ OnigUChar *ur = onigenc_get_left_adjust_char_head(enc, us, up, ue);
+
+ return RBIMPL_CAST((char *)ur);
+}
+
+/**
+ * Queries the right boundary of a character. This function takes a pointer
+ * that is not necessarily a head of a character, and searches for its tail.
+ *
+ * @param[in] s Start of the string.
+ * @param[in] p Pointer to a possibly-middle of a character.
+ * @param[in] e End of the string.
+ * @param[in] enc Encoding.
+ * @return Pointer to the end of the character that contains `p`.
+ */
+static inline char *
+rb_enc_right_char_head(const char *s, const char *p, const char *e, rb_encoding *enc)
+{
+ const OnigUChar *us = RBIMPL_CAST((const OnigUChar *)s);
+ const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);
+ const OnigUChar *ue = RBIMPL_CAST((const OnigUChar *)e);
+ OnigUChar *ur = onigenc_get_right_adjust_char_head(enc, us, up, ue);
+
+ return RBIMPL_CAST((char *)ur);
+}
+
+/**
+ * Scans the string backwards for n characters.
+ *
+ * @param[in] s Start of the string.
+ * @param[in] p Pointer to a character.
+ * @param[in] e End of the string.
+ * @param[in] n Steps.
+ * @param[in] enc Encoding.
+ * @retval NULL There are no `n` characters left.
+ * @retval otherwise Pointer to `n` character before `p`.
+ */
+static inline char *
+rb_enc_step_back(const char *s, const char *p, const char *e, int n, rb_encoding *enc)
+{
+ const OnigUChar *us = RBIMPL_CAST((const OnigUChar *)s);
+ const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);
+ const OnigUChar *ue = RBIMPL_CAST((const OnigUChar *)e);
+ const OnigUChar *ur = onigenc_step_back(enc, us, up, ue, n);
+
+ return RBIMPL_CAST((char *)ur);
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_enc_asciicompat(). People don't use
+ * it directly. Just always use rb_enc_asciicompat().
+ *
+ * @param[in] enc Encoding in question.
+ * @retval 1 It is ASCII compatible.
+ * @retval 0 It isn't.
+ */
+static inline int
+rb_enc_asciicompat_inline(rb_encoding *enc)
+{
+ return rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc);
+}
+
+/**
+ * Queries if the passed encoding is _in some sense_ compatible with ASCII.
+ * The concept of ASCII compatibility is nuanced, and private to our
+ * implementation. For instance SJIS is ASCII compatible to us, despite their
+ * having different characters at code point `0x5C`. This is based on some
+ * practical consideration that Japanese people confuses SJIS to be "upper
+ * compatible" with ASCII (which is in fact a wrong idea, but we just don't go
+ * strict here). An example of ASCII incompatible encoding is UTF-16. UTF-16
+ * shares code points with ASCII, but employs a completely different encoding
+ * scheme.
+ *
+ * @param[in] enc Encoding in question.
+ * @retval 0 It is incompatible.
+ * @retval 1 It is compatible.
+ */
+static inline bool
+rb_enc_asciicompat(rb_encoding *enc)
+{
+ if (rb_enc_mbminlen(enc) != 1) {
+ return false;
+ }
+ else if (rb_enc_dummy_p(enc)) {
+ return false;
+ }
+ else {
+ return true;
+ }
+}
+
+/**
+ * Queries if the passed string is in an ASCII-compatible encoding.
+ *
+ * @param[in] str A Ruby's string to query.
+ * @retval 0 `str` is not a String, or an ASCII-incompatible string.
+ * @retval 1 Otherwise.
+ */
+static inline bool
+rb_enc_str_asciicompat_p(VALUE str)
+{
+ rb_encoding *enc = rb_enc_get(str);
+
+ return rb_enc_asciicompat(enc);
+}
+
+/**
+ * Queries the Ruby-level counterpart instance of ::rb_cEncoding that
+ * corresponds to the passed encoding.
+ *
+ * @param[in] enc An encoding
+ * @retval RUBY_Qnil `enc` is a null pointer.
+ * @retval otherwise An instance of ::rb_cEncoding.
+ */
+VALUE rb_enc_from_encoding(rb_encoding *enc);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the passed encoding is either one of UTF-8/16/32.
+ *
+ * @note It does not take UTF-7, which we actually support, into account.
+ *
+ * @param[in] enc Encoding in question.
+ * @retval 0 It is not a Unicode variant.
+ * @retval otherwise It is.
+ *
+ * @internal
+ *
+ * In reality it returns 1/0, but the value is abstracted as
+ * `ONIGENC_FLAG_UNICODE`.
+ */
+int rb_enc_unicode_p(rb_encoding *enc);
+
+RBIMPL_ATTR_RETURNS_NONNULL()
+/**
+ * Queries the encoding that represents ASCII-8BIT a.k.a. binary.
+ *
+ * @return The encoding that represents ASCII-8BIT.
+ *
+ * @internal
+ *
+ * This can not return NULL once the process properly boots up.
+ */
+rb_encoding *rb_ascii8bit_encoding(void);
+
+RBIMPL_ATTR_RETURNS_NONNULL()
+/**
+ * Queries the encoding that represents UTF-8.
+ *
+ * @return The encoding that represents UTF-8.
+ *
+ * @internal
+ *
+ * This can not return NULL once the process properly boots up.
+ */
+rb_encoding *rb_utf8_encoding(void);
+
+RBIMPL_ATTR_RETURNS_NONNULL()
+/**
+ * Queries the encoding that represents US-ASCII.
+ *
+ * @return The encoding that represents US-ASCII.
+ *
+ * @internal
+ *
+ * This can not return NULL once the process properly boots up.
+ */
+rb_encoding *rb_usascii_encoding(void);
+
+/**
+ * Queries the encoding that represents the current locale.
+ *
+ * @return The encoding that represents the process' locale.
+ *
+ * @internal
+ *
+ * This is dynamic. If you change the process' locale by e.g. calling
+ * `setlocale(3)`, that should also change the return value of this function.
+ *
+ * There is no official way for Ruby scripts to manipulate locales, though.
+ */
+rb_encoding *rb_locale_encoding(void);
+
+/**
+ * Queries the "filesystem" encoding. This is the encoding that ruby expects
+ * info from the OS' file system are in. This affects for instance return
+ * value of rb_dir_getwd(). Most notably on Windows it can be an alias of OS
+ * codepage. Most notably on Linux users can set this via default external
+ * encoding.
+ *
+ * @return The "filesystem" encoding.
+ */
+rb_encoding *rb_filesystem_encoding(void);
+
+/**
+ * Queries the "default external" encoding. This is used to interact with
+ * outer-process things such as File. Though not recommended, you can set this
+ * using rb_enc_set_default_external().
+ *
+ * @return The "default external" encoding.
+ */
+rb_encoding *rb_default_external_encoding(void);
+
+/**
+ * Queries the "default internal" encoding. This could be a null pointer.
+ * Otherwise, outer-process info are transcoded from default external encoding
+ * to this one during reading from an IO.
+ *
+ * @return The "default internal" encoding (if any).
+ */
+rb_encoding *rb_default_internal_encoding(void);
+
+#ifndef rb_ascii8bit_encindex
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_ascii8bit_encoding(), except it returns the encoding's index
+ * instead of the encoding itself.
+ *
+ * @return The index of encoding of ASCII-8BIT.
+ *
+ * @internal
+ *
+ * This happens to be 0.
+ */
+int rb_ascii8bit_encindex(void);
+#endif
+
+/**
+ * Queries if the passed object is in ascii 8bit (== binary) encoding. The
+ * object must be capable of having inline encoding. Using this macro needs
+ * deep understanding of bit level object binary layout.
+ *
+ * @param[in] obj An object to check.
+ * @retval 1 It is.
+ * @retval 0 It isn't.
+ */
+static inline bool
+RB_ENCODING_IS_ASCII8BIT(VALUE obj)
+{
+ return RB_ENCODING_GET_INLINED(obj) == rb_ascii8bit_encindex();
+}
+
+#ifndef rb_utf8_encindex
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_utf8_encoding(), except it returns the encoding's index
+ * instead of the encoding itself.
+ *
+ * @return The index of encoding of UTF-8.
+ */
+int rb_utf8_encindex(void);
+#endif
+
+#ifndef rb_usascii_encindex
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_usascii_encoding(), except it returns the encoding's index
+ * instead of the encoding itself.
+ *
+ * @return The index of encoding of UTF-8.
+ */
+int rb_usascii_encindex(void);
+#endif
+
+/**
+ * Identical to rb_locale_encoding(), except it returns the encoding's index
+ * instead of the encoding itself.
+ *
+ * @return The index of the locale encoding.
+ */
+int rb_locale_encindex(void);
+
+/**
+ * Identical to rb_filesystem_encoding(), except it returns the encoding's
+ * index instead of the encoding itself.
+ *
+ * @return The index of the filesystem encoding.
+ */
+int rb_filesystem_encindex(void);
+
+/**
+ * Identical to rb_default_external_encoding(), except it returns the
+ * Ruby-level counterpart instance of ::rb_cEncoding that corresponds to the
+ * default external encoding.
+ *
+ * @return An instance of ::rb_cEncoding of default external.
+ */
+VALUE rb_enc_default_external(void);
+
+/**
+ * Identical to rb_default_internal_encoding(), except it returns the
+ * Ruby-level counterpart instance of ::rb_cEncoding that corresponds to the
+ * default internal encoding.
+ *
+ * @return An instance of ::rb_cEncoding of default internal.
+ */
+VALUE rb_enc_default_internal(void);
+
+/**
+ * Destructively assigns the passed encoding as the default external encoding.
+ * You should not use this API. It has process-global side effects. Also it
+ * doesn't change encodings of strings that have already been read.
+ *
+ * @param[in] encoding Ruby level encoding.
+ * @exception rb_eArgError `encoding` is ::RUBY_Qnil.
+ * @post The default external encoding is `encoding`.
+ */
+void rb_enc_set_default_external(VALUE encoding);
+
+/**
+ * Destructively assigns the passed encoding as the default internal encoding.
+ * You should not use this API. It has process-global side effects. Also it
+ * doesn't change encodings of strings that have already been read.
+ *
+ * @param[in] encoding Ruby level encoding.
+ * @post The default internal encoding is `encoding`.
+ * @note Unlike rb_enc_set_default_external() you can pass ::RUBY_Qnil.
+ */
+void rb_enc_set_default_internal(VALUE encoding);
+
+/**
+ * Returns a platform-depended "charmap" of the current locale. This
+ * information is called a "Codeset name" in IEEE 1003.1 section 13
+ * (`<langinfo.h>`). This is a very low-level API. The return value can have
+ * no corresponding encoding when passed to rb_find_encoding().
+ *
+ * @param[in] klass Ignored for no reason (why...)
+ * @return The low-level locale charmap, in Ruby's String.
+ */
+VALUE rb_locale_charmap(VALUE klass);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/** @cond INTERNAL_MACRO */
+#define RB_ENCODING_GET RB_ENCODING_GET
+#define RB_ENCODING_GET_INLINED RB_ENCODING_GET_INLINED
+#define RB_ENCODING_IS_ASCII8BIT RB_ENCODING_IS_ASCII8BIT
+#define RB_ENCODING_SET RB_ENCODING_SET
+#define RB_ENCODING_SET_INLINED RB_ENCODING_SET_INLINED
+#define rb_enc_asciicompat rb_enc_asciicompat
+#define rb_enc_code_to_mbclen rb_enc_code_to_mbclen
+#define rb_enc_codepoint rb_enc_codepoint
+#define rb_enc_left_char_head rb_enc_left_char_head
+#define rb_enc_mbc_to_codepoint rb_enc_mbc_to_codepoint
+#define rb_enc_mbcput rb_enc_mbcput
+#define rb_enc_mbmaxlen rb_enc_mbmaxlen
+#define rb_enc_mbminlen rb_enc_mbminlen
+#define rb_enc_name rb_enc_name
+#define rb_enc_prev_char rb_enc_prev_char
+#define rb_enc_right_char_head rb_enc_right_char_head
+#define rb_enc_step_back rb_enc_step_back
+#define rb_enc_str_asciicompat_p rb_enc_str_asciicompat_p
+/** @endcond */
+
+#endif /* RUBY_INTERNAL_ENCODING_ENCODING_H */
diff --git a/include/ruby/internal/encoding/pathname.h b/include/ruby/internal/encoding/pathname.h
new file mode 100644
index 0000000000..0b5e85a524
--- /dev/null
+++ b/include/ruby/internal/encoding/pathname.h
@@ -0,0 +1,184 @@
+#ifndef RUBY_INTERNAL_ENCODING_PATHNAME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_PATHNAME_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate encodings of pathnames.
+ */
+
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Returns a path component directly adjacent to the passed pointer.
+ *
+ * ```
+ * "/multi/byte/encoded/pathname.txt"
+ * ^ ^ ^
+ * | | +--- end
+ * | +--- @return
+ * +--- path
+ * ```
+ *
+ * @param[in] path Where to start scanning.
+ * @param[in] end End of the path string.
+ * @param[in] enc Encoding of the string.
+ * @return A pointer in the passed string where the next path component
+ * resides, or `end` if there is no next path component.
+ */
+char *rb_enc_path_next(const char *path, const char *end, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Seeks for non-prefix part of a pathname. This can be a no-op when the OS
+ * has no such concept like a path prefix. But there are OSes where path
+ * prefixes do exist.
+ *
+ * ```
+ * "C:\multi\byte\encoded\pathname.txt"
+ * ^ ^ ^
+ * | | +--- end
+ * | +--- @return
+ * +--- path
+ * ```
+ *
+ * @param[in] path Where to start scanning.
+ * @param[in] end End of the path string.
+ * @param[in] enc Encoding of the string.
+ * @return A pointer in the passed string where non-prefix part starts, or
+ * `path` if the OS does not have path prefix.
+ */
+char *rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Returns the last path component.
+ *
+ * ```
+ * "/multi/byte/encoded/pathname.txt"
+ * ^ ^ ^
+ * | | +--- end
+ * | +--- @return
+ * +--- path
+ * ```
+ *
+ * @param[in] path Where to start scanning.
+ * @param[in] end End of the path string.
+ * @param[in] enc Encoding of the string.
+ * @return A pointer in the passed string where the last path component
+ * resides, or `end` if there is no more path component.
+ */
+char *rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This just returns the passed end basically. It makes difference in case the
+ * passed string ends with tons of path separators like the following:
+ *
+ * ```
+ * "/path/that/ends/with/lots/of/slashes//////////////"
+ * ^ ^ ^
+ * | | +--- end
+ * | +--- @return
+ * +--- path
+ * ```
+ *
+ * @param[in] path Where to start scanning.
+ * @param[in] end End of the path string.
+ * @param[in] enc Encoding of the string.
+ * @return A pointer in the passed string where the trailing path
+ * separators start, or `end` if there is no trailing path
+ * separators.
+ *
+ * @internal
+ *
+ * It seems this function was introduced to mimic what POSIX says about
+ * `basename(3)`.
+ */
+char *rb_enc_path_end(const char *path, const char *end, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL((1, 4))
+/**
+ * Our own encoding-aware version of `basename(3)`. Normally, this function
+ * returns the last path component of the given name. However in case the
+ * passed name ends with a path separator, it returns the name of the
+ * directory, not the last (empty) component. Also if the passed name is a
+ * root directory, it returns that root directory. Note however that Windows
+ * filesystem have drive letters, which this function does not return.
+ *
+ * @param[in] name Target path.
+ * @param[out] baselen Return buffer.
+ * @param[in,out] alllen Number of bytes of `name`.
+ * @param[enc] enc Encoding of `name`.
+ * @return The rightmost component of `name`.
+ * @post `baselen`, if passed, is updated to be the number of bytes
+ * of the returned basename.
+ * @post `alllen`, if passed, is updated to be the number of bytes of
+ * strings not considered as the basename.
+ */
+const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL((1, 3))
+/**
+ * Our own encoding-aware version of `extname`. This function first applies
+ * rb_enc_path_last_separator() to the passed name and only concerns its return
+ * value (ignores any parent directories). This function returns complicated
+ * results:
+ *
+ * ```CXX
+ * auto path = "...";
+ * auto len = strlen(path);
+ * auto ret = ruby_enc_find_extname(path, &len, rb_ascii8bit_encoding());
+ *
+ * switch(len) {
+ * case 0:
+ * if (ret == 0) {
+ * // `path` is a file without extensions.
+ * }
+ * else {
+ * // `path` is a dotfile.
+ * // `ret` is the file's name.
+ * }
+ * break;
+ *
+ * case 1:
+ * // `path` _ends_ with a dot.
+ * // `ret` is that dot.
+ * break;
+ *
+ * default:
+ * // `path` has an extension.
+ * // `ret` is that extension.
+ * }
+ * ```
+ *
+ * @param[in] name Target path.
+ * @param[in,out] len Number of bytes of `name`.
+ * @param[in] enc Encoding of `name`.
+ * @return See above.
+ * @post `len`, if passed, is updated (see above).
+ */
+const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_PATHNAME_H */
diff --git a/include/ruby/internal/encoding/re.h b/include/ruby/internal/encoding/re.h
new file mode 100644
index 0000000000..d0de23bc83
--- /dev/null
+++ b/include/ruby/internal/encoding/re.h
@@ -0,0 +1,46 @@
+#ifndef RUBY_INTERNAL_ENCODING_RE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_RE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate encodings of symbols.
+ */
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Identical to rb_reg_new(), except it additionally takes an encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @param[in] enc Encoding of `ptr`.
+ * @param[in] opts Options e.g. ONIG_OPTION_MULTILINE.
+ * @exception rb_eRegexpError Failed to compile `ptr`.
+ * @return An allocated new instance of ::rb_cRegexp, of `enc` encoding,
+ * whose expression is compiled according to `ptr`.
+ */
+VALUE rb_enc_reg_new(const char *ptr, long len, rb_encoding *enc, int opts);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_RE_H */
diff --git a/include/ruby/internal/encoding/sprintf.h b/include/ruby/internal/encoding/sprintf.h
new file mode 100644
index 0000000000..cb8737b414
--- /dev/null
+++ b/include/ruby/internal/encoding/sprintf.h
@@ -0,0 +1,78 @@
+#ifndef RUBY_INTERNAL_ENCODING_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_SPRINTF_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate encodings of symbols.
+ */
+#include "ruby/internal/config.h"
+#include <stdarg.h>
+#include "ruby/internal/attr/format.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_sprintf(), except it additionally takes an encoding. The
+ * passed encoding rules both the incoming format specifier and the resulting
+ * string.
+ *
+ * @param[in] enc Encoding of `fmt`.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ... Variadic number of contents to format.
+ * @return A rendered new instance of ::rb_cString, of `enc` encoding.
+ */
+VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
+/**
+ * Identical to rb_enc_sprintf(), except it takes a `va_list` instead of
+ * variadic arguments. It can also be seen as a routine identical to
+ * rb_vsprintf(), except it additionally takes an encoding.
+ *
+ * @param[in] enc Encoding of `fmt`.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ap Contents to format.
+ * @return A rendered new instance of ::rb_cString, of `enc` encoding.
+ */
+VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((3))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
+/**
+ * Identical to rb_raise(), except it additionally takes an encoding.
+ *
+ * @param[in] enc Encoding of the generating exception.
+ * @param[in] exc A subclass of ::rb_eException.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @param[in] ... Contents of the message.
+ * @exception exc The specified exception.
+ * @note It never returns.
+ */
+void rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_SPRINTF_H */
diff --git a/include/ruby/internal/encoding/string.h b/include/ruby/internal/encoding/string.h
new file mode 100644
index 0000000000..6ed7ca1c90
--- /dev/null
+++ b/include/ruby/internal/encoding/string.h
@@ -0,0 +1,346 @@
+#ifndef RUBY_INTERNAL_ENCODING_STRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_STRING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate encodings of strings.
+ */
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/intern/string.h" /* rbimpl_strlen */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Identical to rb_enc_str_new(), except it additionally takes an encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of `enc`
+ * encoding, whose contents are verbatim copy of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ * @note `enc` can be a null pointer. It can also be seen as a routine
+ * identical to rb_usascii_str_new() then.
+ */
+VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_enc_str_new(), except it assumes the passed pointer is a
+ * pointer to a C string. It can also be seen as a routine identical to
+ * rb_str_new_cstr(), except it additionally takes an encoding.
+ *
+ * @param[in] ptr A C string.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of `enc` encoding, whose contents
+ * are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ * @pre Because `ptr` is a C string it makes no sense for `enc` to be
+ * something like UTF-32.
+ * @note `enc` can be a null pointer. It can also be seen as a routine
+ * identical to rb_usascii_str_new_cstr() then.
+ */
+VALUE rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_str_new(), except it takes a C string literal. It can
+ * also be seen as a routine identical to rb_str_new_static(), except it
+ * additionally takes an encoding.
+ *
+ * @param[in] ptr A C string literal.
+ * @param[in] len `strlen(ptr)`.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eArgError `len` out of range of `size_t`.
+ * @pre `ptr` must be a C string constant.
+ * @return An instance of ::rb_cString, of `enc` encoding, whose backend
+ * storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ * @note `enc` can be a null pointer. It can also be seen as a routine
+ * identical to rb_usascii_str_new_static() then.
+ */
+VALUE rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_str_new(), except it returns a "f"string. It can also
+ * be seen as a routine identical to rb_interned_str(), except it additionally
+ * takes an encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eArgError `len` is negative.
+ * @return A found or created instance of ::rb_cString, of `len` bytes
+ * length, of `enc` encoding, whose contents are identical to that
+ * of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ * @note `enc` can be a null pointer.
+ */
+VALUE rb_enc_interned_str(const char *ptr, long len, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_enc_str_new_cstr(), except it returns a "f"string. It can
+ * also be seen as a routine identical to rb_interned_str_cstr(), except it
+ * additionally takes an encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] enc Encoding of `ptr`.
+ * @return A found or created instance of ::rb_cString of `enc` encoding,
+ * whose contents are identical to that of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ * @note `enc` can be a null pointer.
+ */
+VALUE rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc);
+
+/**
+ * Counts the number of characters of the passed string, according to the
+ * passed encoding. This has to be complicated. The passed string could be
+ * invalid and/or broken. This routine would scan from the beginning til the
+ * end, byte by byte, to seek out character boundaries. Could be super slow.
+ *
+ * @param[in] head Leftmost pointer to the string.
+ * @param[in] tail Rightmost pointer to the string.
+ * @param[in] enc Encoding of the string.
+ * @return Number of characters exist in `head` .. `tail`. The definition
+ * of "character" depends on the passed `enc`.
+ */
+long rb_enc_strlen(const char *head, const char *tail, rb_encoding *enc);
+
+/**
+ * Queries the n-th character. Like rb_enc_strlen() this function can be fast
+ * or slow depending on the contents. Don't expect characters to be uniformly
+ * distributed across the entire string.
+ *
+ * @param[in] head Leftmost pointer to the string.
+ * @param[in] tail Rightmost pointer to the string.
+ * @param[in] nth Requested index of characters.
+ * @param[in] enc Encoding of the string.
+ * @return Pointer to the first byte of the character that is `nth`
+ * character ahead of `head`, or `tail` if there is no such
+ * character (OOB etc). The definition of "character" depends on
+ * the passed `enc`.
+ */
+char *rb_enc_nth(const char *head, const char *tail, long nth, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_get_index(), except the return type.
+ *
+ * @param[in] obj Object in question.
+ * @exception rb_eTypeError `obj` is incapable of having an encoding.
+ * @return `obj`'s encoding.
+ */
+VALUE rb_obj_encoding(VALUE obj);
+
+/**
+ * Identical to rb_str_cat(), except it additionally takes an encoding.
+ *
+ * @param[out] str Destination object.
+ * @param[in] ptr Contents to append.
+ * @param[in] len Length of `src`, in bytes.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eArgError `len` is negative.
+ * @exception rb_eEncCompatError `enc` is not compatible with `str`.
+ * @return The passed `dst`.
+ * @post The contents of `ptr` is copied, transcoded into `dst`'s
+ * encoding, then pasted into `dst`'s end.
+ */
+VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
+
+/**
+ * Encodes the passed code point into a series of bytes.
+ *
+ * @param[in] code Code point.
+ * @param[in] enc Target encoding scheme.
+ * @exception rb_eRangeError `enc` does not glean `code`.
+ * @return An instance of ::rb_cString, of `enc` encoding, whose sole
+ * contents is `code` represented in `enc`.
+ * @note No way to encode code points bigger than UINT_MAX.
+ *
+ * @internal
+ *
+ * In other languages, APIs like this one could be seen as the primitive
+ * routines where encodings' "encode" feature are implemented. However in case
+ * of Ruby this is not the primitive one. We directly manipulate encoded
+ * strings. Encoding conversion routines transcode an encoded string directly
+ * to another one; not via a code point array.
+ */
+VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
+
+/**
+ * Identical to rb_external_str_new(), except it additionally takes an
+ * encoding. However the whole point of rb_external_str_new() is to encode a
+ * string into default external encoding. Being able to specify arbitrary
+ * encoding just ruins the designed purpose the function meseems.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @param[in] enc Target encoding scheme.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to `enc` is fully defined over the given
+ * contents, then the return value is a string of `enc` encoding,
+ * whose contents are the converted ones. Otherwise the string is
+ * a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea why this one does not follow the naming convention
+ * that others obey. It seems to him that this should have been called
+ * `rb_enc_external_str_new`.
+ */
+VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *enc);
+
+/**
+ * Identical to rb_str_export(), except it additionally takes an encoding.
+ *
+ * @param[in] obj Target object.
+ * @param[in] enc Target encoding.
+ * @exception rb_eTypeError No implicit conversion to String.
+ * @return Converted ruby string of `enc` encoding.
+ */
+VALUE rb_str_export_to_enc(VALUE obj, rb_encoding *enc);
+
+/**
+ * Encoding conversion main routine.
+ *
+ * @param[in] str String to convert.
+ * @param[in] from Source encoding.
+ * @param[in] to Destination encoding.
+ * @return A copy of `str`, with conversion from `from` to `to` applied.
+ * @note `from` can be a null pointer. `str`'s encoding is taken then.
+ * @note `to` can be a null pointer. No-op then.
+ */
+VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
+
+/**
+ * Identical to rb_str_conv_enc(), except it additionally takes IO encoder
+ * options. The extra arguments can be constructed using io_extract_modeenc()
+ * etc.
+ *
+ * @param[in] str String to convert.
+ * @param[in] from Source encoding.
+ * @param[in] to Destination encoding.
+ * @param[in] ecflags A set of enum ::ruby_econv_flag_type.
+ * @param[in] ecopts Optional hash.
+ * @return A copy of `str`, with conversion from `from` to `to` applied.
+ * @note `from` can be a null pointer. `str`'s encoding is taken then.
+ * @note `to` can be a null pointer. No-op then.
+ * @note `ecopts` can be ::RUBY_Qnil, which is equivalent to passing an
+ * empty hash.
+ */
+VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
+
+/**
+ * Scans the passed string to collect its code range. Because a Ruby's string
+ * is mutable, its contents change from time to time; so does its code range.
+ * A long-lived string tends to fall back to ::RUBY_ENC_CODERANGE_UNKNOWN.
+ * This API scans it and re-assigns a fine-grained code range constant.
+ *
+ * @param[out] str A string.
+ * @return An enum ::ruby_coderange_type.
+ */
+int rb_enc_str_coderange(VALUE str);
+
+/**
+ * Scans the passed string until it finds something odd. Returns the number of
+ * bytes scanned. As the name implies this is suitable for repeated call. One
+ * of its application is `IO#readlines`. The method reads from its receiver's
+ * read buffer, maybe more than once, looking for newlines. But "newline" can
+ * be different among encodings. This API is used to detect broken contents to
+ * properly mark them as such.
+ *
+ * @param[in] str String to scan.
+ * @param[in] end End of `str`.
+ * @param[in] enc `str`'s encoding.
+ * @param[out] cr Return buffer.
+ * @return Distance between `str` and first such byte where broken.
+ * @post `cr` has the code range type.
+ */
+long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr);
+
+/**
+ * Queries if the passed string is "ASCII only". An ASCII only string is a
+ * string who doesn't have any non-ASCII characters at all. This doesn't
+ * necessarily mean the string is in ASCII encoding. For instance a String of
+ * CP932 encoding can quite much be ASCII only, depending on its contents.
+ *
+ * @param[in] str String in question.
+ * @retval 1 It doesn't have non-ASCII characters.
+ * @retval 0 It has characters that are out of ASCII.
+ */
+int rb_enc_str_asciionly_p(VALUE str);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Looks for the passed string in the passed buffer.
+ *
+ * @param[in] x Buffer that potentially includes `y`.
+ * @param[in] m Number of bytes of `x`.
+ * @param[in] y Query string.
+ * @param[in] n Number of bytes of `y`.
+ * @param[in] enc Encoding of both `x` and `y`.
+ * @retval -1 Not found.
+ * @retval otherwise Found index in `x`.
+ * @note This API can match at a non-character-boundary.
+ */
+long rb_memsearch(const void *x, long m, const void *y, long n, rb_encoding *enc);
+
+/** @cond INTERNAL_MACRO */
+RBIMPL_ATTR_NONNULL(())
+static inline VALUE
+rbimpl_enc_str_new_cstr(const char *str, rb_encoding *enc)
+{
+ long len = rbimpl_strlen(str);
+
+ return rb_enc_str_new_static(str, len, enc);
+}
+
+#define rb_enc_str_new(str, len, enc) \
+ ((RBIMPL_CONSTANT_P(str) && \
+ RBIMPL_CONSTANT_P(len) ? \
+ rb_enc_str_new_static: \
+ rb_enc_str_new) ((str), (len), (enc)))
+
+#define rb_enc_str_new_cstr(str, enc) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_enc_str_new_cstr : \
+ rb_enc_str_new_cstr) ((str), (enc)))
+
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_STRING_H */
diff --git a/include/ruby/internal/encoding/symbol.h b/include/ruby/internal/encoding/symbol.h
new file mode 100644
index 0000000000..9cd1b0dbf4
--- /dev/null
+++ b/include/ruby/internal/encoding/symbol.h
@@ -0,0 +1,100 @@
+#ifndef RUBY_INTERNAL_ENCODING_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_SYMBOL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Routines to manipulate encodings of symbols.
+ */
+
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/encoding/encoding.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Identical to rb_intern2(), except it additionally takes an encoding.
+ *
+ * @param[in] name The name of the id.
+ * @param[in] len Length of `name`.
+ * @param[in] enc `name`'s encoding.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given name.
+ * @note These days Ruby internally has two kinds of symbols
+ * (static/dynamic). Symbols created using this function would
+ * become static ones; i.e. would never be garbage collected. It
+ * is up to you to avoid memory leaks. Think twice before using
+ * it.
+ */
+ID rb_intern3(const char *name, long len, rb_encoding *enc);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_symname_p(), except it additionally takes an encoding.
+ *
+ * @param[in] str A C string to check.
+ * @param[in] enc `str`'s encoding.
+ * @retval 1 It is a valid symbol name.
+ * @retval 0 It is invalid as a symbol name.
+ */
+int rb_enc_symname_p(const char *str, rb_encoding *enc);
+
+/**
+ * Identical to rb_enc_symname_p(), except it additionally takes the passed
+ * string's length. This is needed for strings containing NUL bytes, like in
+ * case of UTF-32.
+ *
+ * @param[in] name A C string to check.
+ * @param[in] len Number of bytes of `str`.
+ * @param[in] enc `str`'s encoding.
+ * @retval 1 It is a valid symbol name.
+ * @retval 0 It is invalid as a symbol name.
+ */
+int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc);
+
+/**
+ * Identical to rb_check_id(), except it takes a pointer to a memory region
+ * instead of Ruby's string.
+ *
+ * @param[in] ptr A pointer to a memory region.
+ * @param[in] len Number of bytes of `ptr`.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eEncodingError `ptr` contains non-ASCII according to `enc`.
+ * @retval 0 No such id ever existed in the history.
+ * @retval otherwise The id that represents the given name.
+ */
+ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
+
+/**
+ * Identical to rb_check_id_cstr(), except for the return type. It can also be
+ * seen as a routine identical to rb_check_symbol(), except it takes a pointer
+ * to a memory region instead of Ruby's string.
+ *
+ * @param[in] ptr A pointer to a memory region.
+ * @param[in] len Number of bytes of `ptr`.
+ * @param[in] enc Encoding of `ptr`.
+ * @exception rb_eEncodingError `ptr` contains non-ASCII according to `enc`.
+ * @retval RUBY_Qnil No such id ever existed in the history.
+ * @retval otherwise The id that represents the given name.
+ */
+VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_SYMBOL_H */
diff --git a/include/ruby/internal/encoding/transcode.h b/include/ruby/internal/encoding/transcode.h
new file mode 100644
index 0000000000..7f26d2eae9
--- /dev/null
+++ b/include/ruby/internal/encoding/transcode.h
@@ -0,0 +1,562 @@
+#ifndef RUBY_INTERNAL_ENCODING_TRANSCODE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_INTERNAL_ENCODING_TRANSCODE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief econv stuff
+ */
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/** return value of rb_econv_convert() */
+typedef enum {
+
+ /**
+ * The conversion stopped when it found an invalid sequence.
+ */
+ econv_invalid_byte_sequence,
+
+ /**
+ * The conversion stopped when it found a character in the input which
+ * cannot be representable in the output.
+ */
+ econv_undefined_conversion,
+
+ /**
+ * The conversion stopped because there is no destination.
+ */
+ econv_destination_buffer_full,
+
+ /**
+ * The conversion stopped because there is no input.
+ */
+ econv_source_buffer_empty,
+
+ /**
+ * The conversion stopped after converting everything. This is arguably
+ * the expected normal end of conversion.
+ */
+ econv_finished,
+
+ /**
+ * The conversion stopped after writing something to somewhere, before
+ * reading everything.
+ */
+ econv_after_output,
+
+ /**
+ * The conversion stopped in middle of reading a character, possibly due to
+ * a partial read of a socket etc.
+ */
+ econv_incomplete_input
+} rb_econv_result_t;
+
+/** An opaque struct that represents a lowest level of encoding conversion. */
+typedef struct rb_econv_t rb_econv_t;
+
+/**
+ * Converts the contents of the passed string from its encoding to the passed
+ * one.
+ *
+ * @param[in] str Target string.
+ * @param[in] to Destination encoding.
+ * @param[in] ecflags A set of enum
+ * ::ruby_econv_flag_type.
+ * @param[in] ecopts A keyword hash, like
+ * ::rb_io_t::rb_io_enc_t::ecopts.
+ * @exception rb_eArgError Not fully converted.
+ * @exception rb_eInvalidByteSequenceError `str` is malformed.
+ * @exception rb_eUndefinedConversionError `str` has a character not
+ * representable using `to`.
+ * @exception rb_eConversionNotFoundError There is no known conversion from
+ * `str`'s encoding to `to`.
+ * @return A string whose encoding is `to`, and whose contents is converted
+ * contents of `str`.
+ * @note Use rb_econv_prepare_options() to generate `ecopts`.
+ */
+VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
+
+/**
+ * Queries if there is more than one way to convert between the passed two
+ * encodings. Encoding conversion are has_and_belongs_to_many relationships.
+ * There could be no direct conversion defined for the passed pair. Ruby tries
+ * to find an indirect way to do so then. For instance ISO-8859-1 has no
+ * direct conversion to ISO-2022-JP. But there is ISO-8859-1 to UTF-8
+ * conversion; then there is UTF-8 to EUC-JP conversion; finally there also is
+ * EUC-JP to ISO-2022-JP conversion. So in short ISO-8859-1 can be converted
+ * to ISO-2022-JP using that path. This function returns true. Obviously not
+ * everything that can be represented using UTF-8 can also be represented using
+ * EUC-JP. Conversions in practice can fail depending on the actual input, and
+ * that renders exceptions in case of rb_str_encode().
+ *
+ * @param[in] from_encoding One encoding.
+ * @param[in] to_encoding Another encoding.
+ * @retval 0 No way to convert the two.
+ * @retval 1 At least one way to convert the two.
+ *
+ * @internal
+ *
+ * Practically @shyouhei knows no way for this function to return 0. It seems
+ * everything can eventually be converted to/from UTF-8, which connects
+ * everything.
+ */
+int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
+
+/**
+ * Identical to rb_econv_prepare_opts(), except it additionally takes the
+ * initial value of flags. The extra bits are bitwise-ORed to the return
+ * value.
+ *
+ * @param[in] opthash Keyword arguments.
+ * @param[out] ecopts Return buffer.
+ * @param[in] ecflags Default set of enum ::ruby_econv_flag_type.
+ * @exception rb_eArgError Unknown/Broken values passed.
+ * @return Calculated set of enum ::ruby_econv_flag_type.
+ * @post `ecopts` holds a hash object suitable for
+ * ::rb_io_t::rb_io_enc_t::ecopts.
+ */
+int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
+
+/**
+ * Splits a keyword arguments hash (that for instance `String#encode` took)
+ * into a set of enum ::ruby_econv_flag_type and a hash storing replacement
+ * characters etc.
+ *
+ * @param[in] opthash Keyword arguments.
+ * @param[out] ecopts Return buffer.
+ * @exception rb_eArgError Unknown/Broken values passed.
+ * @return Calculated set of enum ::ruby_econv_flag_type.
+ * @post `ecopts` holds a hash object suitable for
+ * ::rb_io_t::rb_io_enc_t::ecopts.
+ */
+int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
+
+/**
+ * Creates a new instance of struct ::rb_econv_t.
+ *
+ * @param[in] source_encoding Name of an encoding.
+ * @param[in] destination_encoding Name of another encoding.
+ * @param[in] ecflags A set of enum ::ruby_econv_flag_type.
+ * @exception rb_eArgError No such encoding.
+ * @retval NULL Failed to create a struct ::rb_econv_t.
+ * @retval otherwise Allocated struct ::rb_econv_t.
+ * @warning Return value must be passed to rb_econv_close() exactly once.
+ */
+rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags);
+
+/**
+ * Identical to rb_econv_open(), except it additionally takes a hash of
+ * optional strings.
+ *
+ *
+ * @param[in] source_encoding Name of an encoding.
+ * @param[in] destination_encoding Name of another encoding.
+ * @param[in] ecflags A set of enum ::ruby_econv_flag_type.
+ * @param[in] ecopts Optional set of strings.
+ * @exception rb_eArgError No such encoding.
+ * @retval NULL Failed to create a struct ::rb_econv_t.
+ * @retval otherwise Allocated struct ::rb_econv_t.
+ * @warning Return value must be passed to rb_econv_close() exactly once.
+ */
+rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
+
+/**
+ * Converts a string from an encoding to another.
+ *
+ * Possible flags are either ::RUBY_ECONV_PARTIAL_INPUT (means the source
+ * buffer is a part of much larger one), ::RUBY_ECONV_AFTER_OUTPUT (instructs
+ * the converter to stop after output before input), or both of them.
+ *
+ * @param[in,out] ec Conversion specification/state etc.
+ * @param[in] source_buffer_ptr Target string.
+ * @param[in] source_buffer_end End of target string.
+ * @param[out] destination_buffer_ptr Return buffer.
+ * @param[out] destination_buffer_end End of return buffer.
+ * @param[in] flags Flags (see above).
+ * @return The status of the conversion.
+ * @post `destination_buffer_ptr` holds conversion results.
+ */
+rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
+ const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
+ unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
+ int flags);
+
+/**
+ * Destructs a converter. Note that a converter can have a buffer, and can be
+ * non-empty. Calling this would lose your data then.
+ *
+ * @param[out] ec The converter to destroy.
+ * @post `ec` is no longer a valid pointer.
+ */
+void rb_econv_close(rb_econv_t *ec);
+
+/**
+ * Assigns the replacement string. The string passed here would appear in
+ * converted string when it cannot represent its source counterpart. This can
+ * happen for instance you convert an emoji to ISO-8859-1.
+ *
+ * @param[out] ec Target converter.
+ * @param[in] str Replacement string.
+ * @param[in] len Number of bytes of `str`.
+ * @param[in] encname Name of encoding of `str`.
+ * @retval 0 Success.
+ * @retval -1 Failure (ENOMEM etc.).
+ * @post `ec`'s replacement string is set to `str`.
+ */
+int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname);
+
+/**
+ * "Decorate"s a converter. There are special kind of converters that
+ * transforms the contents, like replacing CR into CRLF. You can add such
+ * decorators to a converter using this API. By using this function a
+ * decorator is prepended at the beginning of a conversion sequence: in case of
+ * CRLF conversion, newlines are converted before encodings are converted.
+ *
+ * @param[out] ec Target converter to decorate.
+ * @param[in] decorator_name Name of decorator to prepend.
+ * @retval 0 Success.
+ * @retval -1 Failure (no such decorator etc.).
+ * @post Decorator works before encoding conversion happens.
+ *
+ * @internal
+ *
+ * What is the possible value of the `decorator_name` is not public. You have
+ * to read through `transcode.c` carefully.
+ */
+int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name);
+
+/**
+ * Identical to rb_econv_decorate_at_first(), except it adds to the opposite
+ * direction. For instance CRLF conversion would run _after_ encodings are
+ * converted.
+ *
+ * @param[out] ec Target converter to decorate.
+ * @param[in] decorator_name Name of decorator to prepend.
+ * @retval 0 Success.
+ * @retval -1 Failure (no such decorator etc.).
+ * @post Decorator works after encoding conversion happens.
+ */
+int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name);
+
+/**
+ * Creates a `rb_eConverterNotFoundError` exception object (but does not
+ * raise).
+ *
+ * @param[in] senc Name of source encoding.
+ * @param[in] denc Name of destination encoding.
+ * @param[in] ecflags A set of enum ::ruby_econv_flag_type.
+ * @return An instance of `rb_eConverterNotFoundError`.
+ */
+VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
+
+/**
+ * Appends the passed string to the passed converter's output buffer. This can
+ * be handy when an encoding needs bytes out of thin air; for instance
+ * ISO-2022-JP has "shift function" which does not correspond to any
+ * characters.
+ *
+ * @param[out] ec Target converter.
+ * @param[in] str String to insert.
+ * @param[in] len Number of bytes of `str`.
+ * @param[in] str_encoding Encoding of `str`.
+ * @retval 0 Success.
+ * @retval -1 Failure (conversion error etc.).
+ * @note `str_encoding` can be anything, and `str` itself is converted
+ * when necessary.
+ */
+int rb_econv_insert_output(rb_econv_t *ec,
+ const unsigned char *str, size_t len, const char *str_encoding);
+
+/**
+ * Queries an encoding name which best suits for rb_econv_insert_output()'s
+ * last parameter. Strings in this encoding need no conversion when inserted;
+ * can be both time/space efficient.
+ *
+ * @param[in] ec Target converter.
+ * @return Its encoding for insertion.
+ */
+const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec);
+
+/**
+ * This is a rb_econv_make_exception() + rb_exc_raise() combo.
+ *
+ * @param[in] ec (Possibly failed) conversion.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @note This function can return when no error.
+ */
+void rb_econv_check_error(rb_econv_t *ec);
+
+/**
+ * This function makes sense right after rb_econv_convert() returns. As listed
+ * in ::rb_econv_result_t, rb_econv_convert() can bail out for various reasons.
+ * This function checks the passed converter's internal state and convert it to
+ * an appropriate exception object.
+ *
+ * @param[in] ec Target converter.
+ * @retval RUBY_Qnil The converter has no error.
+ * @retval otherwise Conversion error turned into an exception.
+ */
+VALUE rb_econv_make_exception(rb_econv_t *ec);
+
+/**
+ * Queries if rb_econv_putback() makes sense, i.e. there are invalid byte
+ * sequences remain in the buffer.
+ *
+ * @param[in] ec Target converter.
+ * @return Number of bytes that can be pushed back.
+ */
+int rb_econv_putbackable(rb_econv_t *ec);
+
+/**
+ * Puts back the bytes. In case of ::econv_invalid_byte_sequence, some of
+ * those invalid bytes are discarded and the others are buffered to be
+ * converted later. The latter bytes can be put back using this API.
+ *
+ * @param[out] ec Target converter (invalid byte sequence).
+ * @param[out] p Return buffer.
+ * @param[in] n Max number of bytes to put back.
+ * @post At most `n` bytes of what was put back is written to `p`.
+ */
+void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
+
+/**
+ * Queries the passed encoding's corresponding ASCII compatible encoding. "The
+ * corresponding ASCII compatible encoding" in this context is an ASCII
+ * compatible encoding which can represent exactly the same character sets as
+ * the given ASCII incompatible encoding. For instance that of UTF-16LE is
+ * UTF-8.
+ *
+ * @param[in] encname Name of an ASCII incompatible encoding.
+ * @retval NULL `encname` is already ASCII compatible.
+ * @retval otherwise The corresponding ASCII compatible encoding.
+ */
+const char *rb_econv_asciicompat_encoding(const char *encname);
+
+/**
+ * Identical to rb_econv_convert(), except it takes Ruby's string instead of
+ * C's pointer.
+ *
+ * @param[in,out] ec Target converter.
+ * @param[in] src Source string.
+ * @param[in] flags Flags (see rb_econv_convert).
+ * @exception rb_eArgError Converted string is too long.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @return The conversion result.
+ */
+VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
+
+/**
+ * Identical to rb_econv_str_convert(), except it converts only a part of the
+ * passed string. Can be handy when you for instance want to do line-buffered
+ * conversion.
+ *
+ * @param[in,out] ec Target converter.
+ * @param[in] src Source string.
+ * @param[in] byteoff Number of bytes to seek.
+ * @param[in] bytesize Number of bytes to read.
+ * @param[in] flags Flags (see rb_econv_convert).
+ * @exception rb_eArgError Converted string is too long.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @return The conversion result.
+ */
+VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
+
+/**
+ * Identical to rb_econv_str_convert(), except it appends the conversion result
+ * to the additionally passed string instead of creating a new string. It can
+ * also be seen as a routine identical to rb_econv_append(), except it takes a
+ * Ruby's string instead of C's pointer.
+ *
+ * @param[in,out] ec Target converter.
+ * @param[in] src Source string.
+ * @param[in] dst Return buffer.
+ * @param[in] flags Flags (see rb_econv_convert).
+ * @exception rb_eArgError Converted string is too long.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @return The conversion result.
+ */
+VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
+
+/**
+ * Identical to rb_econv_str_append(), except it appends only a part of the
+ * passed string with conversion. It can also be seen as a routine identical
+ * to rb_econv_substr_convert(), except it appends the conversion result to the
+ * additionally passed string instead of creating a new string.
+ *
+ * @param[in,out] ec Target converter.
+ * @param[in] src Source string.
+ * @param[in] byteoff Number of bytes to seek.
+ * @param[in] bytesize Number of bytes to read.
+ * @param[in] dst Return buffer.
+ * @param[in] flags Flags (see rb_econv_convert).
+ * @exception rb_eArgError Converted string is too long.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @return The conversion result.
+ */
+VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
+
+/**
+ * Converts the passed C's pointer according to the passed converter, then
+ * append the conversion result to the passed Ruby's string. This way buffer
+ * overflow is properly avoided to resize the destination properly.
+ *
+ * @param[in,out] ec Target converter.
+ * @param[in] bytesrc Target string.
+ * @param[in] bytesize Number of bytes of `bytesrc`.
+ * @param[in] dst Return buffer.
+ * @param[in] flags Flags (see rb_econv_convert).
+ * @exception rb_eArgError Converted string is too long.
+ * @exception rb_eInvalidByteSequenceError Invalid byte sequence.
+ * @exception rb_eUndefinedConversionError Conversion undefined.
+ * @return The conversion result.
+ */
+VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
+
+/**
+ * This badly named function does not set the destination encoding to binary,
+ * but instead just nullifies newline conversion decorators if any. Other
+ * ordinal character conversions still happen after this; something non-binary
+ * would still be generated.
+ *
+ * @param[out] ec Target converter to modify.
+ * @post Any newline conversions, if any, would be killed.
+ */
+void rb_econv_binmode(rb_econv_t *ec);
+
+/**
+ * This enum is kind of omnibus. Gathers various constants.
+ */
+enum ruby_econv_flag_type {
+
+ /**
+ * @name Flags for rb_econv_open()
+ *
+ * @{
+ */
+
+ /** Mask for error handling related bits. */
+ RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff,
+
+ /** Special handling of invalid sequences are there. */
+ RUBY_ECONV_INVALID_MASK = 0x0000000f,
+
+ /** Invalid sequences shall be replaced. */
+ RUBY_ECONV_INVALID_REPLACE = 0x00000002,
+
+ /** Special handling of undefined conversion are there. */
+ RUBY_ECONV_UNDEF_MASK = 0x000000f0,
+
+ /** Undefined characters shall be replaced. */
+ RUBY_ECONV_UNDEF_REPLACE = 0x00000020,
+
+ /** Undefined characters shall be escaped. */
+ RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030,
+
+ /** Decorators are there. */
+ RUBY_ECONV_DECORATOR_MASK = 0x0001ff00,
+
+ /** Newline converters are there. */
+ RUBY_ECONV_NEWLINE_DECORATOR_MASK = 0x00007f00,
+
+ /** (Unclear; seems unused). */
+ RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK = 0x00000f00,
+
+ /** (Unclear; seems unused). */
+ RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK = 0x00007000,
+
+ /** Universal newline mode. */
+ RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR = 0x00000100,
+
+ /** CR to CRLF conversion shall happen. */
+ RUBY_ECONV_CRLF_NEWLINE_DECORATOR = 0x00001000,
+
+ /** CRLF to CR conversion shall happen. */
+ RUBY_ECONV_CR_NEWLINE_DECORATOR = 0x00002000,
+
+ /** CRLF to LF conversion shall happen. */
+ RUBY_ECONV_LF_NEWLINE_DECORATOR = 0x00004000,
+
+ /** Texts shall be XML-escaped. */
+ RUBY_ECONV_XML_TEXT_DECORATOR = 0x00008000,
+
+ /** Texts shall be AttrValue escaped */
+ RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR = 0x00010000,
+
+ /** (Unclear; seems unused). */
+ RUBY_ECONV_STATEFUL_DECORATOR_MASK = 0x00f00000,
+
+ /** Texts shall be AttrValue escaped. */
+ RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR = 0x00100000,
+
+ /** Newline decorator's default. */
+ RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR =
+#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+ RUBY_ECONV_CRLF_NEWLINE_DECORATOR,
+#else
+ 0,
+#endif
+
+#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK /**< @old{RUBY_ECONV_ERROR_HANDLER_MASK} */
+#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK /**< @old{RUBY_ECONV_INVALID_MASK} */
+#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE /**< @old{RUBY_ECONV_INVALID_REPLACE} */
+#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK /**< @old{RUBY_ECONV_UNDEF_MASK} */
+#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE /**< @old{RUBY_ECONV_UNDEF_REPLACE} */
+#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF /**< @old{RUBY_ECONV_UNDEF_HEX_CHARREF} */
+#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK /**< @old{RUBY_ECONV_DECORATOR_MASK} */
+#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK /**< @old{RUBY_ECONV_NEWLINE_DECORATOR_MASK} */
+#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK /**< @old{RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK} */
+#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK /**< @old{RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK} */
+#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR /**< @old{RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR} */
+#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR /**< @old{RUBY_ECONV_CRLF_NEWLINE_DECORATOR} */
+#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR /**< @old{RUBY_ECONV_CR_NEWLINE_DECORATOR} */
+#define ECONV_LF_NEWLINE_DECORATOR RUBY_ECONV_LF_NEWLINE_DECORATOR /**< @old{RUBY_ECONV_LF_NEWLINE_DECORATOR} */
+#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR /**< @old{RUBY_ECONV_XML_TEXT_DECORATOR} */
+#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR /**< @old{RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR} */
+#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK /**< @old{RUBY_ECONV_STATEFUL_DECORATOR_MASK} */
+#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR /**< @old{RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR} */
+#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR /**< @old{RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR} */
+ /** @} */
+
+ /**
+ * @name Flags for rb_econv_convert()
+ *
+ * @{
+ */
+
+ /** Indicates the input is a part of much larger one. */
+ RUBY_ECONV_PARTIAL_INPUT = 0x00020000,
+
+ /** Instructs the converter to stop after output. */
+ RUBY_ECONV_AFTER_OUTPUT = 0x00040000,
+#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT /**< @old{RUBY_ECONV_PARTIAL_INPUT} */
+#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT /**< @old{RUBY_ECONV_AFTER_OUTPUT} */
+
+ RUBY_ECONV_FLAGS_PLACEHOLDER /**< Placeholder (not used) */
+};
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_INTERNAL_ENCODING_TRANSCODE_H */
diff --git a/include/ruby/internal/error.h b/include/ruby/internal/error.h
new file mode 100644
index 0000000000..49e2276cb9
--- /dev/null
+++ b/include/ruby/internal/error.h
@@ -0,0 +1,582 @@
+#ifndef RBIMPL_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ERROR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Declares ::rb_raise().
+ */
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/format.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+/**
+ * @defgroup exception Exception handlings
+ * @{
+ */
+
+/**
+ * Warning categories. A warning issued using this API can be selectively
+ * requested / suppressed by the end-users. For instance passing
+ * `-W:no-deprecated` to the ruby process would suppress those warnings in
+ * deprecated category.
+ *
+ * @warning There is no way to declare a new category (for now).
+ */
+typedef enum {
+ /** Category unspecified. */
+ RB_WARN_CATEGORY_NONE,
+
+ /** Warning is for deprecated features. */
+ RB_WARN_CATEGORY_DEPRECATED,
+
+ /** Warning is for experimental features. */
+ RB_WARN_CATEGORY_EXPERIMENTAL,
+
+ RB_WARN_CATEGORY_ALL_BITS = 0x6 /* no RB_WARN_CATEGORY_NONE bit */
+} rb_warning_category_t;
+
+/** for rb_readwrite_sys_fail first argument */
+enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
+/** @cond INTERNAL_MACRO */
+#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
+#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * This is the same as `$!` in Ruby.
+ *
+ * @retval RUBY_Qnil Not handling exceptions at the moment.
+ * @retval otherwise The current exception in the current thread.
+ * @ingroup exception
+ */
+VALUE rb_errinfo(void);
+
+/**
+ * Sets the current exception (`$!`) to the given value.
+ *
+ * @param[in] err An instance of ::rb_eException, or ::RUBY_Qnil.
+ * @exception rb_eTypeError What is given was neither ::rb_eException nor
+ * ::RUBY_Qnil.
+ * @note Use rb_raise() instead to raise `err`. This function just
+ * assigns the given object to the global variable.
+ * @ingroup exception
+ */
+void rb_set_errinfo(VALUE err);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Exception entry point. By calling this function the execution of your
+ * program gets interrupted to "raise" an exception up to the callee entities.
+ * Programs could "rescue" that exception, or could "ensure" some part of them.
+ * If nobody cares about such things, the raised exception reaches at the top
+ * of execution. This yields abnormal end of the process.
+ *
+ * @param[in] exc A subclass of ::rb_eException.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception exc The specified exception.
+ * @note It never returns.
+ */
+void rb_raise(VALUE exc, const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Raises the unsung "fatal" exception. This is considered severe. Nobody can
+ * rescue the exception. Once raised, process termination is inevitable.
+ * However ensure clauses still run, so that resources are properly cleaned up.
+ *
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eFatal An exception that you cannot rescue.
+ * @note It never returns.
+ */
+void rb_fatal(const char *fmt, ...);
+
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Interpreter panic switch. Immediate process termination without any
+ * synchronisations shall occur. LOTS of internal states, stack traces, and
+ * even machine registers are displayed if possible for debugging purposes
+ * then.
+ *
+ * @warning Do not use this API.
+ * @warning You are not expected to use this API.
+ * @warning Why not just fix your code instead of calling this API?
+ * @warning It was a bad idea to expose this API to extension libraries at
+ * the first place. We just cannot delete it at this point for
+ * backwards compatibility. That doesn't mean everyone are
+ * welcomed to call this function at will.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @note It never returns.
+ */
+void rb_bug(const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is a wrapper of rb_bug() which automatically constructs appropriate
+ * message from the passed errno.
+ *
+ * @param[in] msg Additional message to display.
+ * @exception err C level errno.
+ * @note It never returns.
+ */
+void rb_bug_errno(const char *msg, int err);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Converts a C errno into a Ruby exception, then raises it. For instance:
+ *
+ * ```CXX
+ * static VALUE
+ * foo(VALUE argv)
+ * {
+ * const auto cmd = StringValueCStr(argv);
+ * const auto waitr = system(cmd);
+ * if (waitr == -1) {
+ * rb_sys_fail("system(3posix)"); // <-------------- this
+ * }
+ * else {
+ * return INT2FIX(fd);
+ * }
+ * }
+ * ```
+ *
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing errno.
+ * @note It never returns.
+ */
+void rb_sys_fail(const char *msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_sys_fail(), except it takes the message in Ruby's String
+ * instead of C's.
+ *
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing errno.
+ * @note It never returns.
+ */
+void rb_sys_fail_str(VALUE msg);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+/**
+ * Identical to rb_sys_fail(), except it takes additional module to extend the
+ * exception object before raising.
+ *
+ * @param[in] mod A ::rb_cModule instance.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing errno.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * Does anybody use it?
+ */
+void rb_mod_sys_fail(VALUE mod, const char *msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String
+ * instead of C's.
+ *
+ * @param[in] mod A ::rb_cModule instance.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing errno.
+ * @note It never returns.
+ */
+void rb_mod_sys_fail_str(VALUE mod, VALUE msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Raises appropriate exception using the parameters.
+ *
+ * In Ruby level there are rb_eEAGAINWaitReadable etc. This function maps the
+ * given parameter to an appropriate exception class, then raises it.
+ *
+ * @param[in] waiting Reason for the IO to wait.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eEAGAINWaitWritable
+ * @exception rb_eEWOULDBLOCKWaitWritable
+ * @exception rb_eEINPROGRESSWaitWritable
+ * @exception rb_eEAGAINWaitReadable
+ * @exception rb_eEWOULDBLOCKWaitReadable
+ * @exception rb_eEINPROGRESSWaitReadable
+ * @exception rb_eSystemCallError
+ * @note It never returns.
+ */
+void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Breaks from a block. Because you are using a CAPI this is not as intuitive
+ * as it sounds. In order for this function to properly work, make a
+ * ::rb_block_call_func_t function that calls it internally, and pass that
+ * function to rb_block_call().
+ *
+ * @exception rb_eLocalJumpError Called from outside of a block.
+ * @note It never returns.
+ */
+void rb_iter_break(void);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_iter_break(), except it additionally takes the "value" of
+ * this breakage. It will be the evaluation result of the iterator. This is
+ * kind of complicated; you cannot see this as a "return from a block"
+ * behaviour. Take a look at this example:
+ *
+ * ```ruby
+ * def foo(q)
+ * puts(w = yield(q))
+ * puts(e = yield(w))
+ * puts(r = yield(e))
+ * puts(t = yield(r))
+ * puts(y = yield(t))
+ * return "howdy!"
+ * end
+ *
+ * x = foo(0) {|i|
+ * if i > 2
+ * break "hello!"
+ * else
+ * next i + 1
+ * end
+ * }
+ *
+ * puts x
+ * ```
+ *
+ * This script outputs 1, 2, 3, and hello. Note that the value passed to break
+ * becomes the return value of foo method, not the value of yield. This is
+ * confusing, but can be handy on occasions e.g. when you want to bring a
+ * local variable out of a block.
+ *
+ * @param[in] val The value of the iterator.
+ * @exception rb_eLocalJumpError Called from outside of a block.
+ * @note It never returns.
+ */
+void rb_iter_break_value(VALUE val);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Terminates the current execution context. This API is the entry point of a
+ * "well-mannered" termination sequence. When called from an extension
+ * library, it raises ::rb_eSystemExit exception. Programs could rescue that
+ * exception. Can cancel process exit then. Otherwise, that exception results
+ * in a process termination with the status passed to this function.
+ *
+ * @param[in] status Exit status, see also exit(3).
+ * @exception rb_eSystemExit Exception representing the exit status.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * "When called from an extension library"? You might wonder. In fact there
+ * are chances for this function to be called from outside of it, for instance
+ * when dlopen(3) failed. In case it is not possible for this function to
+ * raise an exception, it does not (silently enters to process cleanup). But
+ * that is a kind of implementation detail which extension library authors
+ * should not bother.
+ */
+void rb_exit(int status);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * @exception rb_eNotImpError
+ * @note It never returns.
+ */
+void rb_notimplement(void);
+
+/**
+ * Creates an exception object that represents the given C errno.
+ *
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message.
+ * @retval rb_eSystemCallError An exception for the errno.
+ */
+VALUE rb_syserr_new(int err, const char * msg);
+
+/**
+ * Identical to rb_syserr_new(), except it takes the message in Ruby's String
+ * instead of C's.
+ *
+ * @param[in] n C level errno.
+ * @param[in] arg Additional message.
+ * @retval rb_eSystemCallError An exception for the errno.
+ */
+VALUE rb_syserr_new_str(int n, VALUE arg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Raises appropriate exception that represents a C errno.
+ *
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing `err`.
+ * @note It never returns.
+ */
+void rb_syserr_fail(int err, const char *msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_syserr_fail(), except it takes the message in Ruby's String
+ * instead of C's.
+ *
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing `err`.
+ * @note It never returns.
+ */
+void rb_syserr_fail_str(int err, VALUE msg);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_mod_sys_fail(), except it does not depend on C global
+ * variable errno. Pass it explicitly.
+ *
+ * @param[in] mod A ::rb_cModule instance.
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing `err`.
+ * @note It never returns.
+ */
+void rb_mod_syserr_fail(VALUE mod, int err, const char *msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's
+ * String instead of C's.
+ *
+ * @param[in] mod A ::rb_cModule instance.
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eSystemCallError An exception representing `err`.
+ * @note It never returns.
+ */
+void rb_mod_syserr_fail_str(VALUE mod, int err, VALUE msg);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_readwrite_sys_fail(), except it does not depend on C global
+ * variable errno. Pass it explicitly.
+ *
+ * @param[in] waiting Reason for the IO to wait.
+ * @param[in] err C level errno.
+ * @param[in] msg Additional message to raise.
+ * @exception rb_eEAGAINWaitWritable
+ * @exception rb_eEWOULDBLOCKWaitWritable
+ * @exception rb_eEINPROGRESSWaitWritable
+ * @exception rb_eEAGAINWaitReadable
+ * @exception rb_eEWOULDBLOCKWaitReadable
+ * @exception rb_eEINPROGRESSWaitReadable
+ * @exception rb_eSystemCallError
+ * @note It never returns.
+ */
+void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg);
+
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NORETURN()
+/**
+ * Fails with the given object's type incompatibility to the type.
+ *
+ * It seems this function is visible from extension libraries only because
+ * RTYPEDDATA_TYPE() uses it on RUBY_DEBUG. So you can basically ignore it;
+ * use some other fine-grained method instead.
+ *
+ * @param[in] self The object in question.
+ * @param[in] t Expected type of the object.
+ * @exception rb_eTypeError `self` not in type `t`.
+ * @note It never returns.
+ * @note The second argument must have been an enum ::ruby_value_type,
+ * but for historical reasons it remains to be an int (in other
+ * words we see no benefits fixing this bug).
+ */
+void rb_unexpected_type(VALUE self, int t);
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #ruby_verbose. Please don't use it
+ * directly.
+ *
+ * @retval Qnil Interpreter is quiet.
+ * @retval Qfalse Interpreter is kind of chatty.
+ * @retval otherwise Interpreter is very verbose.
+ */
+VALUE *rb_ruby_verbose_ptr(void);
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #ruby_debug. Please don't use it
+ * directly.
+ *
+ * @retval Qnil Interpreter not in debug mode.
+ * @retval Qfalse Interpreter not in debug mode.
+ * @retval otherwise Interpreter is in debug mode.
+ */
+VALUE *rb_ruby_debug_ptr(void);
+
+/**
+ * This variable controls whether the interpreter is in debug mode. Setting
+ * this to some truthy value is equivalent to passing `-W` flag to the
+ * interpreter. Setting this to ::Qfalse is equivalent to passing `-W1` flag
+ * to the interpreter. Setting this to ::Qnil is equivalent to passing `-W0`
+ * flag to the interpreter.
+ *
+ * @retval Qnil Interpreter is quiet.
+ * @retval Qfalse Interpreter is kind of chatty.
+ * @retval otherwise Interpreter is very verbose.
+ */
+#define ruby_verbose (*rb_ruby_verbose_ptr())
+
+/**
+ * This variable controls whether the interpreter is in debug mode. Setting
+ * this to some truthy value is equivalent to passing `-d` flag to the
+ * interpreter.
+ *
+ * @retval Qnil Interpreter not in debug mode.
+ * @retval Qfalse Interpreter not in debug mode.
+ * @retval otherwise Interpreter is in debug mode.
+ */
+#define ruby_debug (*rb_ruby_debug_ptr())
+
+/* reports if `-W' specified */
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Issues a warning.
+ *
+ * In ruby, warnings these days are tightly coupled with the rb_mWarning
+ * constant and its `warn` singleton method. This CAPI is just a thin wrapper
+ * of it; everything passed are formatted like what rb_sprintf() does, then
+ * passed through to the method. Programs can have their own `def
+ * Warning.warn` at will to do whatever they want, from ignoring the warnings
+ * at all to sinking them to some BigQuery data set via a Fluentd cluster. By
+ * default, the method just emits its passed contents to ::rb_stderr using
+ * rb_io_write().
+ *
+ * @note This function is affected by the `-W` flag.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_warning(const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_warning(), except it takes additional "category" parameter.
+ *
+ * @param[in] cat Name of a known category.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_category_warning(rb_warning_category_t cat, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((1, 3))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
+/**
+ * Issues a compile-time warning that happens at `__file__:__line__`. Purpose
+ * of this function being exposed to CAPI is unclear.
+ *
+ * @note This function is affected by the `-W` flag.
+ * @param[in] file The path corresponding to Ruby level `__FILE__`.
+ * @param[in] line The number corresponding to Ruby level `__LINE__`.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_compile_warning(const char *file, int line, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Identical to rb_sys_fail(), except it does not raise an exception to render
+ * a warning instead.
+ *
+ * @note This function is affected by the `-W` flag.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_sys_warning(const char *fmt, ...);
+
+/* reports always */
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Identical to rb_warning(), except it reports always regardless of runtime
+ * `-W` flag.
+ *
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_warn(const char *fmt, ...);
+
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_category_warning(), except it reports always regardless of
+ * runtime `-W` flag.
+ *
+ * @param[in] cat Category e.g. deprecated.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_category_warn(rb_warning_category_t cat, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((1, 3))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
+/**
+ * Identical to rb_compile_warning(), except it reports always regardless of
+ * runtime `-W` flag.
+ *
+ * @param[in] file The path corresponding to Ruby level `__FILE__`.
+ * @param[in] line The number corresponding to Ruby level `__LINE__`.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_compile_warn(const char *file, int line, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((2, 4))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 5)
+/**
+ * Identical to rb_compile_warn(), except it also accepts category.
+ *
+ * @param[in] cat Category e.g. deprecated.
+ * @param[in] file The path corresponding to Ruby level `__FILE__`.
+ * @param[in] line The number corresponding to Ruby level `__LINE__`.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ */
+void rb_category_compile_warn(rb_warning_category_t cat, const char *file, int line, const char *fmt, ...);
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_ERROR_H */
diff --git a/include/ruby/internal/eval.h b/include/ruby/internal/eval.h
new file mode 100644
index 0000000000..5bcbb97746
--- /dev/null
+++ b/include/ruby/internal/eval.h
@@ -0,0 +1,400 @@
+#ifndef RBIMPL_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_EVAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Declares ::rb_eval_string().
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Evaluates the given string.
+ *
+ * In case it is called from within a C-backended method, the evaluation is
+ * done under the current binding. However there can be no method. On such
+ * situation this function evaluates in an isolated binding, like `require`
+ * runs in a separate one.
+ *
+ * `__FILE__` will be `"(eval)"`, and `__LINE__` starts from 1 in the
+ * evaluation.
+ *
+ * @param[in] str Ruby code to evaluate.
+ * @exception rb_eException Raises an exception on error.
+ * @return The evaluated result.
+ *
+ * @internal
+ *
+ * @shyouhei's old tale about the birth and growth of this function:
+ *
+ * At the beginning, there was no rb_eval_string(). @shyouhei heard that
+ * @shugo, author of Apache httpd's mod_ruby module, requested @matz for this
+ * API. He wanted a way so that mod_ruby can evaluate ruby scripts one by one,
+ * separately, in each different contexts. So this function was made. It was
+ * designed to be a global interpreter entry point like ruby_run_node().
+ *
+ * The way it is implemented however allows extension libraries (not just
+ * programs like Apache httpd) to call this function. Because its name says
+ * nothing about the initial design, people started to think of it as an
+ * orthodox way to call ruby level `eval` method from their extension
+ * libraries. Even our `extension.rdoc` has had a description of this function
+ * basically according to this understanding.
+ *
+ * The old (mod_ruby like) usage still works. But over time, usages of this
+ * function from extension libraries got popular, while mod_ruby faded out; is
+ * no longer maintained now. Devs decided to actively support both. This
+ * function now auto-detects how it is called, and switches how it works
+ * depending on it.
+ *
+ * @see https://bugs.ruby-lang.org/issues/18780
+ */
+VALUE rb_eval_string(const char *str);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_eval_string(), except it avoids potential global escapes.
+ * Such global escapes include exceptions, `throw`, `break`, for example.
+ *
+ * It first evaluates the given string as rb_eval_string() does. If no global
+ * escape occurred during the evaluation, it returns the result and `*state` is
+ * zero. Otherwise, it returns some undefined value and sets `*state` to
+ * nonzero. If state is `NULL`, it is not set in both cases.
+ *
+ * @param[in] str Ruby code to evaluate.
+ * @param[out] state State of execution.
+ * @return The evaluated result if succeeded, an undefined value if
+ * otherwise.
+ * @post `*state` is set to zero if succeeded. Nonzero otherwise.
+ * @warning You have to clear the error info with `rb_set_errinfo(Qnil)` if
+ * you decide to ignore the caught exception.
+ * @see rb_eval_string
+ * @see rb_protect
+ *
+ * @internal
+ *
+ * The "undefined value" described above is in fact ::RUBY_Qnil for now. But
+ * @shyouhei doesn't think that we would never change that.
+ *
+ * Though not a part of our public API, `state` is in fact an
+ * enum ruby_tag_type. You can see the potential "nonzero" values by looking
+ * at vm_core.h.
+ */
+VALUE rb_eval_string_protect(const char *str, int *state);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_eval_string_protect(), except it evaluates the given string
+ * under a module binding in an isolated binding. This is the same as a
+ * binding for loaded libraries on `rb_load(something, true)`.
+ *
+ * @param[in] str Ruby code to evaluate.
+ * @param[out] state State of execution.
+ * @return The evaluated result if succeeded, an undefined value if
+ * otherwise.
+ * @post `*state` is set to zero if succeeded. Nonzero otherwise.
+ * @warning You have to clear the error info with `rb_set_errinfo(Qnil)` if
+ * you decide to ignore the caught exception.
+ * @see rb_eval_string
+ */
+VALUE rb_eval_string_wrap(const char *str, int *state);
+
+/**
+ * Calls a method. Can call both public and private methods.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] n Number of arguments that follow.
+ * @param[in] ... Arbitrary number of method arguments.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcall(VALUE recv, ID mid, int n, ...);
+
+/**
+ * Identical to rb_funcall(), except it takes the method arguments as a C
+ * array.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_funcallv(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * Identical to rb_funcallv(), except it only takes public methods into
+ * account. This is roughly Ruby's `Object#public_send`.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_funcallv_public(), except you can specify how to handle the
+ * last element of the given array. It can also be seen as a routine identical
+ * to rb_funcallv_kw(), except it only takes public methods into account.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * @deprecated This is an old name of rb_funcallv(). Provided here for
+ * backwards compatibility to 2.x programs (introduced in 2.1).
+ * It is not a good name. Please don't use it any longer.
+ */
+#define rb_funcall2 rb_funcallv
+
+/**
+ * @deprecated This is an old name of rb_funcallv_public(). Provided here
+ * for backwards compatibility to 2.x programs (introduced in
+ * 2.1). It is not a good name. Please don't use it any longer.
+ */
+#define rb_funcall3 rb_funcallv_public
+
+/**
+ * Identical to rb_funcallv_public(), except you can pass the passed block.
+ *
+ * Sometimes you want to "pass" a block parameter form one method to another.
+ * Suppose you have this Ruby method `foo`:
+ *
+ * ```ruby
+ * def foo(x, y, &z)
+ * x.open(y, &z)
+ * end
+ * ```
+ *
+ * And suppose you want to translate this into C. Then
+ * rb_funcall_passing_block() function is usable in this situation.
+ *
+ * ```CXX
+ * VALUE
+ * foo_translated_into_C(VALUE self, VALUE x, VALUE y)
+ * {
+ * const auto open = rb_intern("open");
+ *
+ * return rb_funcall_passing_block(x, open, 1, &y);
+ * }
+ * ```
+ *
+ * @see rb_yield_block
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_funcallv_passing_block(), except you can specify how to
+ * handle the last element of the given array. It can also be seen as a
+ * routine identical to rb_funcallv_public_kw(), except you can pass the passed
+ * block.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * Identical to rb_funcallv_public(), except you can pass a block. A block
+ * here basically is an instance of ::rb_cProc. If you want to exercise
+ * `to_proc` conversion, do so before passing it here. However nil and symbols
+ * are special-case allowed.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] procval An instance of Proc, Symbol, or NilClass.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ *
+ * @internal
+ *
+ * Implementation-wise, `procval` is in fact a "block handler" object. You
+ * could also pass an IFUNC (block_handler_ifunc) here to say precise. --- But
+ * AFAIK there is no 3rd party way to even know that there are objects called
+ * IFUNC behind-the-scene.
+ */
+VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval);
+
+/**
+ * Identical to rb_funcallv_with_block(), except you can specify how to handle
+ * the last element of the given array. It can also be seen as a routine
+ * identical to rb_funcallv_public_kw(), except you can pass a block.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] procval An instance of Proc, Symbol, or NilClass.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eNoMethodError The method is private or protected.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ */
+VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat);
+
+/**
+ * This resembles ruby's `super`.
+ *
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @exception rb_eNoMethodError No super method are there.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the super method evaluates to.
+ */
+VALUE rb_call_super(int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_call_super(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No super method are there.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the super method evaluates to.
+ */
+VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * This resembles ruby's `self`.
+ *
+ * @exception rb_eRuntimeError Called from outside of method context.
+ * @return Current receiver.
+ */
+VALUE rb_current_receiver(void);
+
+RBIMPL_ATTR_NONNULL((2))
+/**
+ * Keyword argument deconstructor.
+ *
+ * Retrieves argument values bound to keywords, which directed by `table` into
+ * `values`, deleting retrieved entries from `keyword_hash` along the way.
+ * First `required` number of IDs referred by `table` are mandatory, and
+ * succeeding `optional` (`-optional-1` if `optional` is negative) number of
+ * IDs are optional. If a mandatory key is not contained in `keyword_hash`,
+ * raises ::rb_eArgError. If an optional key is not present in `keyword_hash`,
+ * the corresponding element in `values` is set to ::RUBY_Qundef. If
+ * `optional` is negative, rest of `keyword_hash` are ignored, otherwise raises
+ * ::rb_eArgError.
+ *
+ * @warning Handling keyword arguments in the C API is less efficient than
+ * handling them in Ruby. Consider using a Ruby wrapper method
+ * around a non-keyword C function.
+ * @see https://bugs.ruby-lang.org/issues/11339
+ * @param[out] keyword_hash Target hash to deconstruct.
+ * @param[in] table List of keywords that you are interested in.
+ * @param[in] required Number of mandatory keywords.
+ * @param[in] optional Number of optional keywords (can be negative).
+ * @param[out] values Buffer to be filled.
+ * @exception rb_eArgError Absence of a mandatory keyword.
+ * @exception rb_eArgError Found an unknown keyword.
+ * @return Number of found values that are stored into `values`.
+ */
+int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Splits a hash into two.
+ *
+ * Takes a hash of various keys, and split it into symbol-keyed parts and
+ * others. Symbol-keyed part becomes the return value. What remains are
+ * returned as a new hash object stored at the argument pointer.
+ *
+ * @param[in,out] orighash Pointer to a target hash to split.
+ * @return An extracted keyword hash.
+ * @post Upon successful return `orighash` points to another hash
+ * object, whose contents are the remainder of the operation.
+ * @note The argument hash object is not modified.
+ */
+VALUE rb_extract_keywords(VALUE *orighash);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_EVAL_H */
diff --git a/include/ruby/internal/event.h b/include/ruby/internal/event.h
new file mode 100644
index 0000000000..04b137a193
--- /dev/null
+++ b/include/ruby/internal/event.h
@@ -0,0 +1,154 @@
+#ifndef RBIMPL_EVENT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_EVENT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Debugging and tracing APIs.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+/* These macros are not enums because they are wider than int.*/
+
+/**
+ * @name Traditional set_trace_func events
+ *
+ * @{
+ */
+#define RUBY_EVENT_NONE 0x0000 /**< No events. */
+#define RUBY_EVENT_LINE 0x0001 /**< Encountered a new line. */
+#define RUBY_EVENT_CLASS 0x0002 /**< Encountered a new class. */
+#define RUBY_EVENT_END 0x0004 /**< Encountered an end of a class clause. */
+#define RUBY_EVENT_CALL 0x0008 /**< A method, written in Ruby, is called. */
+#define RUBY_EVENT_RETURN 0x0010 /**< Encountered a `return` statement. */
+#define RUBY_EVENT_C_CALL 0x0020 /**< A method, written in C, is called. */
+#define RUBY_EVENT_C_RETURN 0x0040 /**< Return from a method, written in C. */
+#define RUBY_EVENT_RAISE 0x0080 /**< Encountered a `raise` statement. */
+#define RUBY_EVENT_ALL 0x00ff /**< Bitmask of traditional events. */
+
+/** @} */
+
+/**
+ * @name TracePoint extended events
+ *
+ * @{
+ */
+#define RUBY_EVENT_B_CALL 0x0100 /**< Encountered an `yield` statement. */
+#define RUBY_EVENT_B_RETURN 0x0200 /**< Encountered a `next` statement. */
+#define RUBY_EVENT_THREAD_BEGIN 0x0400 /**< Encountered a new thread. */
+#define RUBY_EVENT_THREAD_END 0x0800 /**< Encountered an end of a thread. */
+#define RUBY_EVENT_FIBER_SWITCH 0x1000 /**< Encountered a `Fiber#yield`. */
+#define RUBY_EVENT_SCRIPT_COMPILED 0x2000 /**< Encountered an `eval`. */
+#define RUBY_EVENT_TRACEPOINT_ALL 0xffff /**< Bitmask of extended events. */
+
+/** @} */
+
+/**
+ * @name Special events
+ *
+ * @internal
+ *
+ * These bits are actually used internally. See vm_core.h if you are curious.
+ *
+ * @endinternal
+ *
+ * @{
+ */
+#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 /**< Opaque bits. */
+
+/** @} */
+
+/**
+ * @name Internal events
+ *
+ * @shyouhei's understanding is that some of them are visible from extension
+ * libraries because of `ext/objspace`. But it seems that doesn't describe
+ * everything? The ultimate reason why they are here remains unclear.
+ *
+ * @{
+ */
+#define RUBY_INTERNAL_EVENT_SWITCH 0x040000 /**< Thread switched. */
+#define RUBY_EVENT_SWITCH 0x040000 /**< @old{RUBY_INTERNAL_EVENT_SWITCH} */
+ /* 0x080000 */
+#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000 /**< Object allocated. */
+#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000 /**< Object swept. */
+#define RUBY_INTERNAL_EVENT_GC_START 0x400000 /**< GC started. */
+#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000 /**< GC ended mark phase. */
+#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000 /**< GC ended sweep phase. */
+#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000 /**< `gc_enter()` is called. */
+#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000 /**< `gc_exit()` is called. */
+#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000 /**< Bitmask of GC events. */
+#define RUBY_INTERNAL_EVENT_MASK 0xffff0000 /**< Bitmask of internal events. */
+
+/** @} */
+
+/**
+ * Represents event(s). As the name implies events are bit flags.
+ */
+typedef uint32_t rb_event_flag_t;
+
+/**
+ * Type of event hooks. When an event happens registered functions are kicked
+ * with appropriate parameters.
+ *
+ * @param[in] evflag The kind of event that happened.
+ * @param[in] data The `data` passed to rb_add_event_hook().
+ * @param[in] self Current receiver.
+ * @param[in] mid Name of the current method.
+ * @param[in] klass Current class.
+ */
+typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Registers an event hook function.
+ *
+ * @param[in] func A callback.
+ * @param[in] events A set of events that `func` should run.
+ * @param[in] data Passed as-is to `func`.
+ */
+void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
+
+/**
+ * Removes the passed function from the list of event hooks.
+ *
+ * @param[in] func A callback.
+ * @return Number of deleted event hooks.
+ * @note As multiple events can share the same `func` it is quite
+ * possible for the return value to become more than one.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know if this is an Easter egg or an official feature, but
+ * you can pass 0 to the argument. That effectively swipes everything out from
+ * the hook list.
+ */
+int rb_remove_event_hook(rb_event_hook_func_t func);
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_EVENT_H */
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
new file mode 100644
index 0000000000..7383426b23
--- /dev/null
+++ b/include/ruby/internal/fl_type.h
@@ -0,0 +1,948 @@
+#ifndef RBIMPL_FL_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_FL_TYPE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines enum ::ruby_fl_type.
+ */
+#include "ruby/internal/config.h" /* for ENUM_OVER_INT */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/flag_enum.h"
+#include "ruby/internal/attr/forceinline.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/has/extension.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/assert.h"
+#include "ruby/defines.h"
+
+/** @cond INTERNAL_MACRO */
+#if RBIMPL_HAS_EXTENSION(enumerator_attributes)
+# define RBIMPL_HAVE_ENUM_ATTRIBUTE 1
+#elif RBIMPL_COMPILER_SINCE(GCC, 6, 0, 0)
+# define RBIMPL_HAVE_ENUM_ATTRIBUTE 1
+#endif
+
+#ifdef ENUM_OVER_INT
+# define RBIMPL_WIDER_ENUM 1
+#elif SIZEOF_INT * CHAR_BIT > 12+19+1
+# define RBIMPL_WIDER_ENUM 1
+#else
+# define RBIMPL_WIDER_ENUM 0
+#endif
+/** @endcond */
+
+#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON) /**< @old{RUBY_FL_SINGLETON} */
+#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED) /**< @old{RUBY_FL_WB_PROTECTED} */
+#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0) /**< @old{RUBY_FL_PROMOTED0} */
+#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1) /**< @old{RUBY_FL_PROMOTED1} */
+#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE) /**< @old{RUBY_FL_FINALIZE} */
+#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT) /**< @old{RUBY_FL_TAINT} */
+#define FL_SHAREABLE RBIMPL_CAST((VALUE)RUBY_FL_SHAREABLE) /**< @old{RUBY_FL_SHAREABLE} */
+#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED) /**< @old{RUBY_FL_UNTRUSTED} */
+#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID) /**< @old{RUBY_FL_SEEN_OBJ_ID} */
+#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR) /**< @old{RUBY_FL_EXIVAR} */
+#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE) /**< @old{RUBY_FL_FREEZE} */
+
+#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT) /**< @old{RUBY_FL_USHIFT} */
+
+#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0) /**< @old{RUBY_FL_USER0} */
+#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1) /**< @old{RUBY_FL_USER1} */
+#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2) /**< @old{RUBY_FL_USER2} */
+#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3) /**< @old{RUBY_FL_USER3} */
+#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4) /**< @old{RUBY_FL_USER4} */
+#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5) /**< @old{RUBY_FL_USER5} */
+#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6) /**< @old{RUBY_FL_USER6} */
+#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7) /**< @old{RUBY_FL_USER7} */
+#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8) /**< @old{RUBY_FL_USER8} */
+#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9) /**< @old{RUBY_FL_USER9} */
+#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10) /**< @old{RUBY_FL_USER10} */
+#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11) /**< @old{RUBY_FL_USER11} */
+#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12) /**< @old{RUBY_FL_USER12} */
+#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13) /**< @old{RUBY_FL_USER13} */
+#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14) /**< @old{RUBY_FL_USER14} */
+#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15) /**< @old{RUBY_FL_USER15} */
+#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16) /**< @old{RUBY_FL_USER16} */
+#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17) /**< @old{RUBY_FL_USER17} */
+#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18) /**< @old{RUBY_FL_USER18} */
+#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19) /**< @old{RUBY_FL_USER19} */
+
+#define ELTS_SHARED RUBY_ELTS_SHARED /**< @old{RUBY_ELTS_SHARED} */
+#define RB_OBJ_FREEZE rb_obj_freeze_inline /**< @alias{rb_obj_freeze_inline} */
+
+/** @cond INTERNAL_MACRO */
+#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
+#define RB_FL_ABLE RB_FL_ABLE
+#define RB_FL_ALL RB_FL_ALL
+#define RB_FL_ALL_RAW RB_FL_ALL_RAW
+#define RB_FL_ANY RB_FL_ANY
+#define RB_FL_ANY_RAW RB_FL_ANY_RAW
+#define RB_FL_REVERSE RB_FL_REVERSE
+#define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW
+#define RB_FL_SET RB_FL_SET
+#define RB_FL_SET_RAW RB_FL_SET_RAW
+#define RB_FL_TEST RB_FL_TEST
+#define RB_FL_TEST_RAW RB_FL_TEST_RAW
+#define RB_FL_UNSET RB_FL_UNSET
+#define RB_FL_UNSET_RAW RB_FL_UNSET_RAW
+#define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
+#define RB_OBJ_FROZEN RB_OBJ_FROZEN
+#define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
+#define RB_OBJ_INFECT RB_OBJ_INFECT
+#define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
+#define RB_OBJ_TAINT RB_OBJ_TAINT
+#define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE
+#define RB_OBJ_TAINTED RB_OBJ_TAINTED
+#define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
+#define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
+#define RB_OBJ_UNTRUST RB_OBJ_TAINT
+#define RB_OBJ_UNTRUSTED RB_OBJ_TAINTED
+/** @endcond */
+
+/**
+ * @defgroup deprecated_macros Deprecated macro APIs
+ * @{
+ * These macros are deprecated. Prefer their `RB_`-prefixed versions.
+ */
+#define FL_ABLE RB_FL_ABLE /**< @old{RB_FL_ABLE} */
+#define FL_ALL RB_FL_ALL /**< @old{RB_FL_ALL} */
+#define FL_ALL_RAW RB_FL_ALL_RAW /**< @old{RB_FL_ALL_RAW} */
+#define FL_ANY RB_FL_ANY /**< @old{RB_FL_ANY} */
+#define FL_ANY_RAW RB_FL_ANY_RAW /**< @old{RB_FL_ANY_RAW} */
+#define FL_REVERSE RB_FL_REVERSE /**< @old{RB_FL_REVERSE} */
+#define FL_REVERSE_RAW RB_FL_REVERSE_RAW /**< @old{RB_FL_REVERSE_RAW} */
+#define FL_SET RB_FL_SET /**< @old{RB_FL_SET} */
+#define FL_SET_RAW RB_FL_SET_RAW /**< @old{RB_FL_SET_RAW} */
+#define FL_TEST RB_FL_TEST /**< @old{RB_FL_TEST} */
+#define FL_TEST_RAW RB_FL_TEST_RAW /**< @old{RB_FL_TEST_RAW} */
+#define FL_UNSET RB_FL_UNSET /**< @old{RB_FL_UNSET} */
+#define FL_UNSET_RAW RB_FL_UNSET_RAW /**< @old{RB_FL_UNSET_RAW} */
+#define OBJ_FREEZE RB_OBJ_FREEZE /**< @old{RB_OBJ_FREEZE} */
+#define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW /**< @old{RB_OBJ_FREEZE_RAW} */
+#define OBJ_FROZEN RB_OBJ_FROZEN /**< @old{RB_OBJ_FROZEN} */
+#define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW /**< @old{RB_OBJ_FROZEN_RAW} */
+#define OBJ_INFECT RB_OBJ_INFECT /**< @old{RB_OBJ_INFECT} */
+#define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW /**< @old{RB_OBJ_INFECT_RAW} */
+#define OBJ_TAINT RB_OBJ_TAINT /**< @old{RB_OBJ_TAINT} */
+#define OBJ_TAINTABLE RB_OBJ_TAINTABLE /**< @old{RB_OBJ_TAINT_RAW} */
+#define OBJ_TAINTED RB_OBJ_TAINTED /**< @old{RB_OBJ_TAINTED} */
+#define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW /**< @old{RB_OBJ_TAINTED_RAW} */
+#define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW /**< @old{RB_OBJ_TAINT_RAW} */
+#define OBJ_UNTRUST RB_OBJ_UNTRUST /**< @old{RB_OBJ_TAINT} */
+#define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED /**< @old{RB_OBJ_TAINTED} */
+/** @} */
+
+/**
+ * This is an enum because GDB wants it (rather than a macro). People need not
+ * bother.
+ */
+enum ruby_fl_ushift {
+ /**
+ * Number of bits in ::ruby_fl_type that are _not_ open to users. This is
+ * an implementation detail. Please ignore.
+ */
+ RUBY_FL_USHIFT = 12
+};
+
+/* > The expression that defines the value of an enumeration constant shall be
+ * > an integer constant expression that has a value representable as an `int`.
+ *
+ * -- ISO/IEC 9899:2018 section 6.7.2.2
+ *
+ * So ENUM_OVER_INT situation is an extension to the standard. Note however
+ * that we do not support 16 bit `int` environment. */
+RB_GNUC_EXTENSION
+/**
+ * The flags. Each ruby objects have their own characteristics apart from
+ * their classes. For instance whether an object is frozen or not is not
+ * controlled by its class. This is the type that represents such properties.
+ *
+ * @note About the `FL_USER` terminology: the "user" here does not necessarily
+ * mean only you. For instance struct ::RString instances use these
+ * bits to cache their encodings etc. Devs discussed about this topic,
+ * reached their consensus that ::RUBY_T_DATA is the only valid data
+ * structure that can use these bits; other data structures including
+ * ::RUBY_T_OBJECT use these bits for their own purpose. See also
+ * https://bugs.ruby-lang.org/issues/18059
+ */
+enum
+RBIMPL_ATTR_FLAG_ENUM()
+ruby_fl_type {
+
+ /**
+ * @deprecated This flag once was a thing back in the old days, but makes
+ * no sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * The reality is our GC no longer remembers write barriers inside of each
+ * objects, to use dedicated bitmap instead. But this flag is still used
+ * internally. The current usages of this flag should be something
+ * different, which is unclear to @shyouhei.
+ */
+ RUBY_FL_WB_PROTECTED = (1<<5),
+
+ /**
+ * This flag has something to do with our garbage collector. These days
+ * ruby objects are "generational". There are those who are young and
+ * those who are old. Young objects are prone to die; monitored relatively
+ * extensively by the garbage collector. OTOH old objects tend to live
+ * longer. They are relatively rarely considered. This flag is set when a
+ * object experienced promotion i.e. survived a garbage collection.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_PROMOTED0 = (1<<5),
+
+ /**
+ * This flag has something to do with our garbage collector. These days
+ * ruby objects are "generational". There are those who are young and
+ * those who are old. Young objects are prone to die; monitored relatively
+ * extensively by the garbage collector. OTOH old objects tend to live
+ * longer. They are relatively rarely considered. This flag is set when a
+ * object experienced two promotions i.e. survived garbage collections
+ * twice.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_PROMOTED1 = (1<<6),
+
+ /**
+ * This flag has something to do with our garbage collector. These days
+ * ruby objects are "generational". There are those who are young and
+ * those who are old. Young objects are prone to die; monitored relatively
+ * extensively by the garbage collector. OTOH old objects tend to live
+ * longer. They are relatively rarely considered. This flag is set when a
+ * object experienced promotions i.e. survived more than one garbage
+ * collections.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1,
+
+ /**
+ * This flag has something to do with finalisers. A ruby object can have
+ * its finaliser, which is another object that evaluates when the target
+ * object is about to die. This flag is used to denote that there is an
+ * attached finaliser.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_FINALIZE = (1<<7),
+
+ /**
+ * @deprecated This flag once was a thing back in the old days, but makes
+ * no sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ */
+ RUBY_FL_TAINT
+
+#if defined(RBIMPL_HAVE_ENUM_ATTRIBUTE)
+ RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+#elif defined(_MSC_VER)
+# pragma deprecated(RUBY_FL_TAINT)
+#endif
+
+ = (1<<8),
+
+ /**
+ * This flag has something to do with Ractor. Multiple Ractors run without
+ * protecting each other. Sharing an object among Ractors are basically
+ * dangerous, disabled by default. This flag is used to bypass that
+ * restriction. Of course, you have to manually prevent race conditions
+ * then.
+ *
+ * This flag needs deep understanding of multithreaded programming. You
+ * would better not use it.
+ */
+ RUBY_FL_SHAREABLE = (1<<8),
+
+ /**
+ * @deprecated This flag once was a thing back in the old days, but makes
+ * no sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ */
+ RUBY_FL_UNTRUSTED
+
+#if defined(RBIMPL_HAVE_ENUM_ATTRIBUTE)
+ RBIMPL_ATTR_DEPRECATED(("trustedness turned out to be a wrong idea."))
+#elif defined(_MSC_VER)
+# pragma deprecated(RUBY_FL_UNTRUSTED)
+#endif
+
+ = (1<<8),
+
+ /**
+ * This flag has something to do with object IDs. Unlike in the old days,
+ * an object's object ID (that a user can query using `Object#object_id`)
+ * is no longer its physical address represented using Ruby level integers.
+ * It is now a monotonic-increasing integer unrelated to the underlying
+ * memory arrangement. Object IDs are assigned when necessary; objects are
+ * born without one, and will eventually have such property when queried.
+ * The interpreter has to manage which one is which. This is the flag that
+ * helps the management. Objects with this flag set are the ones with
+ * object IDs assigned.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_SEEN_OBJ_ID = (1<<9),
+
+ /**
+ * This flag has something to do with instance variables. 3rd parties need
+ * not know, but there are several ways to store an object's instance
+ * variables. Objects with this flag use so-called "generic" backend
+ * storage. This distinction is purely an implementation detail. People
+ * need not be aware of this working behind-the-scene.
+ *
+ * @internal
+ *
+ * As of writing everything except ::RObject and RModule use this scheme.
+ */
+ RUBY_FL_EXIVAR = (1<<10),
+
+ /**
+ * This flag has something to do with data immutability. When this flag is
+ * set an object is considered "frozen". No modification are expected to
+ * happen beyond that point for the particular object. Immutability is
+ * basically considered to be a good property these days. Library authors
+ * are expected to obey. Test this bit before you touch a data structure.
+ *
+ * @see rb_check_frozen()
+ */
+ RUBY_FL_FREEZE = (1<<11),
+
+/** (@shyouhei doesn't know how to excude this macro from doxygen). */
+#define RBIMPL_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
+ RBIMPL_FL_USER_N(0), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(1), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(2), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(3), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(4), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(5), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(6), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(7), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(8), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(9), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(10), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(11), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(12), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(13), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(14), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(15), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(16), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(17), /**< User-defined flag. */
+ RBIMPL_FL_USER_N(18), /**< User-defined flag. */
+#ifdef ENUM_OVER_INT
+ RBIMPL_FL_USER_N(19), /**< User-defined flag. */
+#else
+# define RUBY_FL_USER19 (RBIMPL_VALUE_ONE<<(RUBY_FL_USHIFT+19))
+#endif
+#undef RBIMPL_FL_USER_N
+#undef RBIMPL_WIDER_ENUM
+
+ /**
+ * This flag has something to do with data structures. Over time, ruby
+ * evolved to reduce memory footprints. One of such attempt is so-called
+ * copy-on-write, which delays duplication of resources until ultimately
+ * necessary. Some data structures share this scheme. For example
+ * multiple instances of struct ::RArray could point identical memory
+ * region in common, as long as they don't differ. As people favour
+ * immutable style of programming than before, this situation is getting
+ * more and more common. Because such "shared" memory regions have nuanced
+ * ownership by nature, each structures need special care for them. This
+ * flag is used to distinguish such shared constructs.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_ELTS_SHARED = RUBY_FL_USER2,
+
+ /**
+ * This flag has something to do with an object's class. There are kind of
+ * classes called "singleton class", each of which have exactly one
+ * instance. What is interesting about singleton classes is that they are
+ * created _after_ their instance were instantiated, like this:
+ *
+ * ```ruby
+ * foo = Object.new # foo is an instance of Object...
+ * bar = foo.singleton_class # foo is now an instance of bar.
+ * ```
+ *
+ * Here as you see `bar` is a singleton class of `foo`, which is injected
+ * into `foo`'s inheritance tree in a different statement (== distinct
+ * sequence point). In order to achieve this property singleton classes
+ * are special-cased in the interpreter. There is one bit flag that
+ * distinguishes if a class is a singleton class or not, and this is it.
+ *
+ * @internal
+ *
+ * But honestly, @shyouhei doesn't think this flag should be visible from
+ * 3rd parties. It must be an implementation detail that they should never
+ * know. Might better be hidden.
+ */
+ RUBY_FL_SINGLETON = RUBY_FL_USER0,
+};
+
+enum {
+ /**
+ * @deprecated This flag once was a thing back in the old days, but makes
+ * no sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ */
+ RUBY_FL_DUPPED
+
+#if defined(RBIMPL_HAVE_ENUM_ATTRIBUTE)
+ RBIMPL_ATTR_DEPRECATED(("It seems there is no actual usage of this enum."))
+#elif defined(_MSC_VER)
+# pragma deprecated(RUBY_FL_DUPPED)
+#endif
+
+ = (int)RUBY_T_MASK | (int)RUBY_FL_EXIVAR
+};
+
+#undef RBIMPL_HAVE_ENUM_ATTRIBUTE
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * This is an implementation detail of #RB_OBJ_FREEZE(). People don't use it
+ * directly.
+ *
+ * @param[out] klass A singleton class.
+ * @post `klass` gets frozen.
+ */
+void rb_freeze_singleton_class(VALUE klass);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_FORCEINLINE()
+/**
+ * Checks if the object is flaggable. There are some special cases (most
+ * notably ::RUBY_Qfalse) where appending a flag to an object is not possible.
+ * This function can detect that.
+ *
+ * @param[in] obj Object in question
+ * @retval true It is flaggable.
+ * @retval false No it isn't.
+ */
+static bool
+RB_FL_ABLE(VALUE obj)
+{
+ if (RB_SPECIAL_CONST_P(obj)) {
+ return false;
+ }
+ else if (RB_TYPE_P(obj, RUBY_T_NODE)) {
+ return false;
+ }
+ else {
+ return true;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_TEST(). 3rd parties need not use
+ * this. Just always use RB_FL_TEST().
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @pre The object must not be an enum ::ruby_special_consts.
+ * @return `obj`'s flags, masked by `flags`.
+ */
+static inline VALUE
+RB_FL_TEST_RAW(VALUE obj, VALUE flags)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ return RBASIC(obj)->flags & flags;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Tests if the given flag(s) are set or not. You can pass multiple flags at
+ * once:
+ *
+ * ```CXX
+ * auto obj = rb_eval_string("...");
+ * if (RB_FL_TEST(obj, RUBY_FL_FREEZE | RUBY_FL_SHAREABLE)) {
+ * printf("Ractor ready!\n");
+ * }
+ * ```
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @return `obj`'s flags, masked by `flags`.
+ * @note It is intentional for this function to return ::VALUE. The
+ * return value could be passed to RB_FL_STE() etc.
+ */
+static inline VALUE
+RB_FL_TEST(VALUE obj, VALUE flags)
+{
+ if (RB_FL_ABLE(obj)) {
+ return RB_FL_TEST_RAW(obj, flags);
+ }
+ else {
+ return RBIMPL_VALUE_NULL;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_ANY(). 3rd parties need not use
+ * this. Just always use RB_FL_ANY().
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @retval true The object has any of the flags set.
+ * @retval false No it doesn't at all.
+ * @pre The object must not be an enum ::ruby_special_consts.
+ */
+static inline bool
+RB_FL_ANY_RAW(VALUE obj, VALUE flags)
+{
+ return RB_FL_TEST_RAW(obj, flags);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to RB_FL_TEST(), except it returns bool.
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @retval true The object has any of the flags set.
+ * @retval false No it doesn't at all.
+ */
+static inline bool
+RB_FL_ANY(VALUE obj, VALUE flags)
+{
+ return RB_FL_TEST(obj, flags);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_ALL(). 3rd parties need not use
+ * this. Just always use RB_FL_ALL().
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @retval true The object has all of the flags set.
+ * @retval false The object lacks any of the flags.
+ * @pre The object must not be an enum ::ruby_special_consts.
+ */
+static inline bool
+RB_FL_ALL_RAW(VALUE obj, VALUE flags)
+{
+ return RB_FL_TEST_RAW(obj, flags) == flags;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to RB_FL_ANY(), except it mandates all passed flags be set.
+ *
+ * @param[in] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @retval true The object has all of the flags set.
+ * @retval false The object lacks any of the flags.
+ */
+static inline bool
+RB_FL_ALL(VALUE obj, VALUE flags)
+{
+ return RB_FL_TEST(obj, flags) == flags;
+}
+
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ *
+ * This is an implenentation detail of RB_FL_SET(). 3rd parties need not use
+ * this. Just always use RB_FL_SET().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` set.
+ *
+ * @internal
+ *
+ * This is function is here to annotate a part of RB_FL_SET_RAW() as
+ * `__declspec(noalias)`.
+ */
+static inline void
+rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
+{
+ obj->flags |= flags;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_SET(). 3rd parties need not use
+ * this. Just always use RB_FL_SET().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` set.
+ */
+static inline void
+RB_FL_SET_RAW(VALUE obj, VALUE flags)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ rbimpl_fl_set_raw_raw(RBASIC(obj), flags);
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Sets the given flag(s).
+ *
+ * ```CXX
+ * auto v = rb_eval_string("...");
+ * RB_FL_SET(v, RUBY_FL_FREEZE);
+ * ```
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` set.
+ */
+static inline void
+RB_FL_SET(VALUE obj, VALUE flags)
+{
+ if (RB_FL_ABLE(obj)) {
+ RB_FL_SET_RAW(obj, flags);
+ }
+}
+
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ *
+ * This is an implenentation detail of RB_FL_UNSET(). 3rd parties need not use
+ * this. Just always use RB_FL_UNSET().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` cleared.
+ *
+ * @internal
+ *
+ * This is function is here to annotate a part of RB_FL_UNSET_RAW() as
+ * `__declspec(noalias)`.
+ */
+static inline void
+rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
+{
+ obj->flags &= ~flags;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_UNSET(). 3rd parties need not use
+ * this. Just always use RB_FL_UNSET().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` cleared.
+ */
+static inline void
+RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ rbimpl_fl_unset_raw_raw(RBASIC(obj), flags);
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Clears the given flag(s).
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` cleard.
+ */
+static inline void
+RB_FL_UNSET(VALUE obj, VALUE flags)
+{
+ if (RB_FL_ABLE(obj)) {
+ RB_FL_UNSET_RAW(obj, flags);
+ }
+}
+
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ *
+ * This is an implenentation detail of RB_FL_REVERSE(). 3rd parties need not
+ * use this. Just always use RB_FL_REVERSE().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` reversed.
+ *
+ * @internal
+ *
+ * This is function is here to annotate a part of RB_FL_REVERSE_RAW() as
+ * `__declspec(noalias)`.
+ */
+static inline void
+rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
+{
+ obj->flags ^= flags;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_FL_REVERSE(). 3rd parties need not
+ * use this. Just always use RB_FL_REVERSE().
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` cleared.
+ */
+static inline void
+RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ rbimpl_fl_reverse_raw_raw(RBASIC(obj), flags);
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Reverses the flags. This function is here mainly for symmetry on set/unset.
+ * Rarely used in practice.
+ *
+ * @param[out] obj Object in question.
+ * @param[in] flags A set of enum ::ruby_fl_type.
+ * @post `obj` has `flags` reversed.
+ */
+static inline void
+RB_FL_REVERSE(VALUE obj, VALUE flags)
+{
+ if (RB_FL_ABLE(obj)) {
+ RB_FL_REVERSE_RAW(obj, flags);
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ * @return false always.
+ */
+static inline bool
+RB_OBJ_TAINTABLE(VALUE obj)
+{
+ return false;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ * @return false always.
+ */
+static inline VALUE
+RB_OBJ_TAINTED_RAW(VALUE obj)
+{
+ return false;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ * @return false always.
+ */
+static inline bool
+RB_OBJ_TAINTED(VALUE obj)
+{
+ return false;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ */
+static inline void
+RB_OBJ_TAINT_RAW(VALUE obj)
+{
+ return;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ */
+static inline void
+RB_OBJ_TAINT(VALUE obj)
+{
+ return;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] dst Victim object.
+ * @param[in] src Infectant object.
+ */
+static inline void
+RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
+{
+ return;
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea."))
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] dst Victim object.
+ * @param[in] src Infectant object.
+ */
+static inline void
+RB_OBJ_INFECT(VALUE dst, VALUE src)
+{
+ return;
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_OBJ_FROZEN(). 3rd parties need not
+ * use this. Just always use RB_OBJ_FROZEN().
+ *
+ * @param[in] obj Object in question.
+ * @retval RUBY_FL_FREEZE Yes it is.
+ * @retval 0 No it isn't.
+ *
+ * @internal
+ *
+ * It is intentional not to return bool here. There is a place in ruby core
+ * (namely `class.c:singleton_class_of()`) where return value of this function
+ * is passed to RB_FL_SET_RAW().
+ */
+static inline VALUE
+RB_OBJ_FROZEN_RAW(VALUE obj)
+{
+ return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if an object is frozen.
+ *
+ * @param[in] obj Object in question.
+ * @retval true Yes it is.
+ * @retval false No it isn't.
+ */
+static inline bool
+RB_OBJ_FROZEN(VALUE obj)
+{
+ if (! RB_FL_ABLE(obj)) {
+ return true;
+ }
+ else {
+ return RB_OBJ_FROZEN_RAW(obj);
+ }
+}
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is an implenentation detail of RB_OBJ_FREEZE(). 3rd parties need not
+ * use this. Just always use RB_OBJ_FREEZE().
+ *
+ * @param[out] obj Object in question.
+ */
+static inline void
+RB_OBJ_FREEZE_RAW(VALUE obj)
+{
+ RB_FL_SET_RAW(obj, RUBY_FL_FREEZE);
+}
+
+RUBY_SYMBOL_EXPORT_BEGIN
+void rb_obj_freeze_inline(VALUE obj);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* RBIMPL_FL_TYPE_H */
diff --git a/include/ruby/internal/gc.h b/include/ruby/internal/gc.h
new file mode 100644
index 0000000000..054e4b0f9c
--- /dev/null
+++ b/include/ruby/internal/gc.h
@@ -0,0 +1,62 @@
+#ifndef RBIMPL_GC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Registering values to the GC.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Inform the garbage collector that the global or static variable pointed by
+ * `valptr` stores a live Ruby object that should not be moved. Note that
+ * extensions should use this API on global constants instead of assuming
+ * constants defined in Ruby are always alive. Ruby code can remove global
+ * constants.
+ *
+ * Because this registration itself has a possibility to trigger a GC, this
+ * function must be called before any GC-able objects is assigned to the
+ * address pointed by `valptr`.
+ */
+void rb_gc_register_address(VALUE *valptr);
+
+/**
+ * An alias for `rb_gc_register_address()`.
+ */
+void rb_global_variable(VALUE *);
+
+/**
+ * Inform the garbage collector that a pointer previously passed to
+ * `rb_gc_register_address()` no longer points to a live Ruby object.
+ */
+void rb_gc_unregister_address(VALUE *valptr);
+
+/**
+ * Inform the garbage collector that `object` is a live Ruby object that should
+ * not be moved.
+ *
+ * See also: rb_gc_register_address()
+ */
+void rb_gc_register_mark_object(VALUE object);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_GC_H */
diff --git a/include/ruby/internal/glob.h b/include/ruby/internal/glob.h
new file mode 100644
index 0000000000..adbccbdc5e
--- /dev/null
+++ b/include/ruby/internal/glob.h
@@ -0,0 +1,113 @@
+#ifndef RBIMPL_GLOB_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GLOB_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Declares ::rb_glob().
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Type of a glob callback function. Called every time glob scans a path.
+ *
+ * @param[in] path The path in question.
+ * @param[in] arg The argument passed to rb_glob().
+ * @param[in] enc Encoding of the path.
+ * @retval -1 Not enough memory to do the operation.
+ * @retval 0 Operation successful.
+ * @retval otherwise Opaque exception state.
+ * @note You can use rb_protect() to generate the return value.
+ *
+ * @internal
+ *
+ * This is a wrong design. Type of `enc` should have been `rb_encoding*`
+ * instead of just `void*`. But we cannot change the API any longer.
+ *
+ * Though not a part of our public API, the "opaque exception state" is in fact
+ * an enum ruby_tag_type. You can see the potential "otherwise" values by
+ * looking at vm_core.h.
+ */
+typedef int ruby_glob_func(const char *path, VALUE arg, void *enc);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * The "glob" operator. Expands the given pattern against the actual local
+ * filesystem, then iterates over the expanded filenames by calling the
+ * callback function.
+ *
+ * @param[in] pattern A glob pattern.
+ * @param[in] func Identical to ruby_glob_func, except it can raise
+ * exceptions instead of returning opaque state.
+ * @param[in] arg Extra argument passed to func.
+ * @exception rb_eException Can propagate what `func` raises.
+ * @note The language accepted as the pattern is not a regular
+ * expression. It resembles shell's glob.
+ */
+void rb_glob(const char *pattern, void (*func)(const char *path, VALUE arg, void *enc), VALUE arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_glob(), except it returns opaque exception states instead of
+ * raising exceptions.
+ *
+ * @param[in] pattern A glob pattern.
+ * @param[in] flags No, you are not allowed to use this. Just pass 0.
+ * @param[in] func A callback function.
+ * @param[in] arg Extra argument passed to func.
+ * @return Return value of `func`.
+ *
+ * @internal
+ *
+ * This function is completely broken by design... Not only is there no sane
+ * way to pass flags, but there also is no sane way to know what a return value
+ * is meant to be.
+ *
+ * Though not a part of our public API, and @shyouhei thinks it's a failure not
+ * to be a public API, the flags can be `FNM_EXTGLOB`, `FNM_DOTMATCH` etc.
+ * Look at dir.c for the list.
+ *
+ * Though not a part of our public API, the return value is in fact an
+ * enum ruby_tag_type. You can see the potential values by looking at
+ * vm_core.h.
+ */
+int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to ruby_glob(), @shyouhei currently suspects. Historically you
+ * had to call this function instead of ruby_glob() if the pattern included
+ * "{x,y,...}" syntax. However since commit 0f63d961169989a7f6dcf7c0487fe29da,
+ * ruby_glob() also supports that syntax. It seems as of writing these two
+ * functions provide basically the same functionality in a different
+ * implementation. Is this analysis right? Correct me! :FIXME:
+ *
+ * @param[in] pattern A glob pattern.
+ * @param[in] flags No, you are not allowed to use this. Just pass 0.
+ * @param[in] func A callback function.
+ * @param[in] arg Extra argument passed to func.
+ * @return Return value of `func`.
+ */
+int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_GLOB_H */
diff --git a/include/ruby/internal/globals.h b/include/ruby/internal/globals.h
new file mode 100644
index 0000000000..5a414fc472
--- /dev/null
+++ b/include/ruby/internal/globals.h
@@ -0,0 +1,209 @@
+#ifndef RBIMPL_GLOBALS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GLOBALS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Ruby-level global variables / constants, visible from C.
+ */
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+
+/**
+ * @defgroup object Core objects and their operations
+ *
+ * @internal
+ *
+ * There are several questionable constants listed in this header file. They
+ * are intentionally left untouched for purely academic backwards compatibility
+ * concerns. But for instance do any one of 3rd party extension libraries even
+ * need to know that there is NameError::Message?
+ *
+ * @endinternal
+ *
+ * @{
+ */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RUBY_INTEGER_UNIFICATION 1
+
+RUBY_EXTERN VALUE rb_mKernel; /**< `Kernel` module. */
+RUBY_EXTERN VALUE rb_mComparable; /**< `Comparable` module. */
+RUBY_EXTERN VALUE rb_mEnumerable; /**< `Enumerable` module. */
+RUBY_EXTERN VALUE rb_mErrno; /**< `Errno` module. */
+RUBY_EXTERN VALUE rb_mFileTest; /**< `FileTest` module. */
+RUBY_EXTERN VALUE rb_mGC; /**< `GC` module. */
+RUBY_EXTERN VALUE rb_mMath; /**< `Math` module. */
+RUBY_EXTERN VALUE rb_mProcess; /**< `Process` module. */
+RUBY_EXTERN VALUE rb_mWaitReadable; /**< `IO::WaitReadable` module. */
+RUBY_EXTERN VALUE rb_mWaitWritable; /**< `IO::WaitReadable` module. */
+
+RUBY_EXTERN VALUE rb_cBasicObject; /**< `BasicObject` class. */
+RUBY_EXTERN VALUE rb_cObject; /**< `Object` class. */
+RUBY_EXTERN VALUE rb_cArray; /**< `Array` class. */
+RUBY_EXTERN VALUE rb_cBinding; /**< `Binding` class. */
+RUBY_EXTERN VALUE rb_cClass; /**< `Class` class. */
+RUBY_EXTERN VALUE rb_cDir; /**< `Dir` class. */
+RUBY_EXTERN VALUE rb_cEncoding; /**< `Encoding` class. */
+RUBY_EXTERN VALUE rb_cEnumerator; /**< `Enumerator` class. */
+RUBY_EXTERN VALUE rb_cFalseClass; /**< `FalseClass` class. */
+RUBY_EXTERN VALUE rb_cFile; /**< `File` class. */
+RUBY_EXTERN VALUE rb_cComplex; /**< `Complex` class. */
+RUBY_EXTERN VALUE rb_cFloat; /**< `Float` class. */
+RUBY_EXTERN VALUE rb_cHash; /**< `Hash` class. */
+RUBY_EXTERN VALUE rb_cIO; /**< `IO` class. */
+RUBY_EXTERN VALUE rb_cInteger; /**< `Module` class. */
+RUBY_EXTERN VALUE rb_cMatch; /**< `MatchData` class. */
+RUBY_EXTERN VALUE rb_cMethod; /**< `Method` class. */
+RUBY_EXTERN VALUE rb_cModule; /**< `Module` class. */
+RUBY_EXTERN VALUE rb_cRefinement; /**< `Refinement` class. */
+RUBY_EXTERN VALUE rb_cNameErrorMesg; /**< `NameError::Message` class. */
+RUBY_EXTERN VALUE rb_cNilClass; /**< `NilClass` class. */
+RUBY_EXTERN VALUE rb_cNumeric; /**< `Numeric` class. */
+RUBY_EXTERN VALUE rb_cProc; /**< `Proc` class. */
+RUBY_EXTERN VALUE rb_cRandom; /**< `Random` class. */
+RUBY_EXTERN VALUE rb_cRange; /**< `Range` class. */
+RUBY_EXTERN VALUE rb_cRational; /**< `Rational` class. */
+RUBY_EXTERN VALUE rb_cRegexp; /**< `Regexp` class. */
+RUBY_EXTERN VALUE rb_cStat; /**< `File::Stat` class. */
+RUBY_EXTERN VALUE rb_cString; /**< `String` class. */
+RUBY_EXTERN VALUE rb_cStruct; /**< `Struct` class. */
+RUBY_EXTERN VALUE rb_cSymbol; /**< `Sumbol` class. */
+RUBY_EXTERN VALUE rb_cThread; /**< `Thread` class. */
+RUBY_EXTERN VALUE rb_cTime; /**< `Time` class. */
+RUBY_EXTERN VALUE rb_cTrueClass; /**< `TrueClass` class. */
+RUBY_EXTERN VALUE rb_cUnboundMethod; /**< `UnboundMethod` class. */
+
+/**
+ * @}
+ * @addtogroup exception
+ * @{
+ */
+
+RUBY_EXTERN VALUE rb_eException; /**< Mother of all exceptions. */
+RUBY_EXTERN VALUE rb_eStandardError; /**< `StandardError` exception. */
+RUBY_EXTERN VALUE rb_eSystemExit; /**< `SystemExit` exception. */
+RUBY_EXTERN VALUE rb_eInterrupt; /**< `Interrupt` exception. */
+RUBY_EXTERN VALUE rb_eSignal; /**< `SignalException` exception. */
+RUBY_EXTERN VALUE rb_eFatal; /**< `fatal` exception. */
+RUBY_EXTERN VALUE rb_eArgError; /**< `ArgumentError` exception. */
+RUBY_EXTERN VALUE rb_eEOFError; /**< `EOFError` exception. */
+RUBY_EXTERN VALUE rb_eIndexError; /**< `IndexError` exception. */
+RUBY_EXTERN VALUE rb_eStopIteration; /**< `StopIteration` exception. */
+RUBY_EXTERN VALUE rb_eKeyError; /**< `KeyError` exception. */
+RUBY_EXTERN VALUE rb_eRangeError; /**< `RangeError` exception. */
+RUBY_EXTERN VALUE rb_eIOError; /**< `IOError` exception. */
+RUBY_EXTERN VALUE rb_eRuntimeError; /**< `RuntimeError` exception. */
+RUBY_EXTERN VALUE rb_eFrozenError; /**< `FrozenError` exception. */
+RUBY_EXTERN VALUE rb_eSecurityError; /**< `SecurityError` exception. */
+RUBY_EXTERN VALUE rb_eSystemCallError; /**< `SystemCallError` exception. */
+RUBY_EXTERN VALUE rb_eThreadError; /**< `ThreadError` exception. */
+RUBY_EXTERN VALUE rb_eTypeError; /**< `TypeError` exception. */
+RUBY_EXTERN VALUE rb_eZeroDivError; /**< `ZeroDivisionError` exception. */
+RUBY_EXTERN VALUE rb_eNotImpError; /**< `NotImplementedError` exception. */
+RUBY_EXTERN VALUE rb_eNoMemError; /**< `NoMemoryError` exception. */
+RUBY_EXTERN VALUE rb_eNoMethodError; /**< `NoMethodError` exception. */
+RUBY_EXTERN VALUE rb_eFloatDomainError; /**< `FloatDomainError` exception. */
+RUBY_EXTERN VALUE rb_eLocalJumpError; /**< `LocalJumpError` exception. */
+RUBY_EXTERN VALUE rb_eSysStackError; /**< `SystemStackError` exception. */
+RUBY_EXTERN VALUE rb_eRegexpError; /**< `RegexpError` exception. */
+RUBY_EXTERN VALUE rb_eEncodingError; /**< `EncodingError` exception. */
+RUBY_EXTERN VALUE rb_eEncCompatError; /**< `Encoding::CompatibilityError` exception. */
+RUBY_EXTERN VALUE rb_eNoMatchingPatternError; /**< `NoMatchingPatternError` exception. */
+RUBY_EXTERN VALUE rb_eNoMatchingPatternKeyError; /**< `NoMatchingPatternKeyError` exception. */
+
+RUBY_EXTERN VALUE rb_eScriptError; /**< `ScriptError` exception. */
+RUBY_EXTERN VALUE rb_eNameError; /**< `NameError` exception. */
+RUBY_EXTERN VALUE rb_eSyntaxError; /**< `SyntaxError` exception. */
+RUBY_EXTERN VALUE rb_eLoadError; /**< `LoadError` exception. */
+
+RUBY_EXTERN VALUE rb_eMathDomainError; /**< `Math::DomainError` exception. */
+
+/**
+ * @}
+ * @addtogroup object
+ * @{
+ */
+
+RUBY_EXTERN VALUE rb_stdin; /**< `STDIN` constant. */
+RUBY_EXTERN VALUE rb_stdout; /**< `STDOUT` constant. */
+RUBY_EXTERN VALUE rb_stderr; /**< `STDERR` constant. */
+
+RBIMPL_ATTR_PURE()
+/**
+ * Object to class mapping function. Every object have its class. This
+ * function obtains that.
+ *
+ * @param[in] obj Target object to query.
+ * @return The class of the given object.
+ *
+ * @internal
+ *
+ * This function is a super-duper hot path. Optimised targeting modern C
+ * compilers and x86_64 architecture.
+ */
+static inline VALUE
+rb_class_of(VALUE obj)
+{
+ if (! RB_SPECIAL_CONST_P(obj)) {
+ return RBASIC_CLASS(obj);
+ }
+ else if (obj == RUBY_Qfalse) {
+ return rb_cFalseClass;
+ }
+ else if (obj == RUBY_Qnil) {
+ return rb_cNilClass;
+ }
+ else if (obj == RUBY_Qtrue) {
+ return rb_cTrueClass;
+ }
+ else if (RB_FIXNUM_P(obj)) {
+ return rb_cInteger;
+ }
+ else if (RB_STATIC_SYM_P(obj)) {
+ return rb_cSymbol;
+ }
+ else if (RB_FLONUM_P(obj)) {
+ return rb_cFloat;
+ }
+
+#if !RUBY_DEBUG
+ RBIMPL_UNREACHABLE_RETURN(Qfalse);
+#else
+ RUBY_ASSERT_FAIL("unexpected type");
+#endif
+}
+
+#define CLASS_OF rb_class_of /**< @old{rb_class_of} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/** @} */
+
+#endif /* RBIMPL_GLOBALS_H */
diff --git a/include/ruby/internal/has/attribute.h b/include/ruby/internal/has/attribute.h
new file mode 100644
index 0000000000..f068a65caf
--- /dev/null
+++ b/include/ruby/internal/has/attribute.h
@@ -0,0 +1,163 @@
+#ifndef RBIMPL_HAS_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_ATTRIBUTE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_ATTRIBUTE.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/compiler_since.h"
+
+#if defined(__has_attribute)
+# if __has_attribute(pure) || RBIMPL_COMPILER_IS(GCC)
+# /* FreeBSD's <sys/cdefs.h> defines its own *broken* version of
+# * __has_attribute. Cygwin copied that content to be a victim of the
+# * broken-ness. We don't take them into account. */
+# define RBIMPL_HAVE___HAS_ATTRIBUTE 1
+# endif
+#endif
+
+/** Wraps (or simulates) `__has_attribute`. */
+#if defined(RBIMPL_HAVE___HAS_ATTRIBUTE)
+# define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_)
+
+#elif RBIMPL_COMPILER_IS(GCC)
+# /* GCC <= 4 lack __has_attribute predefined macro, while have attributes
+# * themselves. We can simulate the macro like the following: */
+# define RBIMPL_HAS_ATTRIBUTE(_) (RBIMPL_HAS_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_alloc_size RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_artificial RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_cdecl RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_cold RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(GCC, 2, 6, 0)
+# define RBIMPL_HAS_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_error RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_format RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_hot RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_leaf RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_undefined RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_nonnull RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(GCC, 2, 5, 0)
+# define RBIMPL_HAS_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(GCC, 2,96, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_nonnull RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(GCC, 4, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_stdcall RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_unused RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_warn_unused_result RBIMPL_COMPILER_SINCE(GCC, 3, 4, 0)
+# define RBIMPL_HAS_ATTRIBUTE_warning RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# /* Note that "0, 0, 0" might be inaccurate. */
+
+#elif RBIMPL_COMPILER_IS(SunPro)
+# /* Oracle Solaris Studio 12.4 (cc version 5.11) introduced __has_attribute.
+# * Before that, following attributes were available. */
+# /* See https://docs.oracle.com/cd/F24633_01/index.html */
+# define RBIMPL_HAS_ATTRIBUTE(_) (RBIMPL_HAS_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_ATTRIBUTE_alias RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_constructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_destructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_packed RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_vector_size RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+
+#elif defined (_MSC_VER)
+# define RBIMPL_HAS_ATTRIBUTE(_) 0
+# /* Fallback below doesn't work: see win32/Makefile.sub */
+
+#else
+# /* Take config.h definition when available. */
+# define RBIMPL_HAS_ATTRIBUTE(_) ((RBIMPL_HAS_ATTRIBUTE_ ## _)+0)
+# ifdef ALWAYS_INLINE
+# define RBIMPL_HAS_ATTRIBUTE_always_inline 1
+# endif
+# ifdef FUNC_CDECL
+# define RBIMPL_HAS_ATTRIBUTE_cdecl 1
+# endif
+# ifdef CONSTFUNC
+# define RBIMPL_HAS_ATTRIBUTE_const 1
+# endif
+# ifdef DEPRECATED
+# define RBIMPL_HAS_ATTRIBUTE_deprecated 1
+# endif
+# ifdef ERRORFUNC
+# define RBIMPL_HAS_ATTRIBUTE_error 1
+# endif
+# ifdef FUNC_FASTCALL
+# define RBIMPL_HAS_ATTRIBUTE_fastcall 1
+# endif
+# ifdef PUREFUNC
+# define RBIMPL_HAS_ATTRIBUTE_pure 1
+# endif
+# ifdef NO_ADDRESS_SAFETY_ANALYSIS
+# define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis 1
+# endif
+# ifdef NO_SANITIZE
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize 1
+# endif
+# ifdef NO_SANITIZE_ADDRESS
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address 1
+# endif
+# ifdef NOINLINE
+# define RBIMPL_HAS_ATTRIBUTE_noinline 1
+# endif
+# ifdef RBIMPL_FUNC_NONNULL
+# define RBIMPL_HAS_ATTRIBUTE_nonnull 1
+# endif
+# ifdef NORETURN
+# define RBIMPL_HAS_ATTRIBUTE_noreturn 1
+# endif
+# ifdef FUNC_OPTIMIZED
+# define RBIMPL_HAS_ATTRIBUTE_optimize 1
+# endif
+# ifdef FUNC_STDCALL
+# define RBIMPL_HAS_ATTRIBUTE_stdcall 1
+# endif
+# ifdef MAYBE_UNUSED
+# define RBIMPL_HAS_ATTRIBUTE_unused 1
+# endif
+# ifdef WARN_UNUSED_RESULT
+# define RBIMPL_HAS_ATTRIBUTE_warn_unused_result 1
+# endif
+# ifdef WARNINGFUNC
+# define RBIMPL_HAS_ATTRIBUTE_warning 1
+# endif
+# ifdef WEAK
+# define RBIMPL_HAS_ATTRIBUTE_weak 1
+# endif
+#endif
+
+#endif /* RBIMPL_HAS_ATTRIBUTE_H */
diff --git a/include/ruby/internal/has/builtin.h b/include/ruby/internal/has/builtin.h
new file mode 100644
index 0000000000..243ba2a34c
--- /dev/null
+++ b/include/ruby/internal/has/builtin.h
@@ -0,0 +1,117 @@
+#ifndef RBIMPL_HAS_BUILTIN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_BUILTIN_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_BUILTIN.
+ */
+#include "ruby/internal/config.h"
+#include "ruby/internal/compiler_since.h"
+
+#if defined(__has_builtin)
+# if RBIMPL_COMPILER_IS(Intel)
+# /* :TODO: Intel C Compiler has __has_builtin (since 19.1 maybe?), and is
+# * reportedly broken. We have to skip them. However the situation can
+# * change. They might improve someday. We need to revisit here later. */
+# elif RBIMPL_COMPILER_IS(GCC) && ! __has_builtin(__builtin_alloca)
+# /* FreeBSD's <sys/cdefs.h> defines its own *broken* version of
+# * __has_builtin. Cygwin copied that content to be a victim of the
+# * broken-ness. We don't take them into account. */
+# else
+# define RBIMPL_HAVE___HAS_BUILTIN 1
+# endif
+#endif
+
+/** Wraps (or simulates) `__has_builtin`. */
+#if defined(RBIMPL_HAVE___HAS_BUILTIN)
+# define RBIMPL_HAS_BUILTIN(_) __has_builtin(_)
+
+#elif RBIMPL_COMPILER_IS(GCC)
+# /* :FIXME: Historically GCC has had tons of builtins, but it implemented
+# * __has_builtin only since GCC 10. This section can be made more
+# * granular. */
+# /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */
+# define RBIMPL_HAS_BUILTIN(_) (RBIMPL_HAS_BUILTIN_ ## _)
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_assume 0
+# /* See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for bswap16. */
+# define RBIMPL_HAS_BUILTIN___builtin_bswap16 RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+#ifndef __OpenBSD__
+# define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_bswap64 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+#endif
+# define RBIMPL_HAS_BUILTIN___builtin_clz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_clzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_clzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_constant_p RBIMPL_COMPILER_SINCE(GCC, 2,95, 3)
+# define RBIMPL_HAS_BUILTIN___builtin_ctz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_ctzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_ctzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_expect RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcountl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcountll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_rotateleft32 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateleft64 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateright32 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
+# /* Note that "0, 0, 0" might be inaccurate. */
+
+#else
+# /* Take config.h definition when available */
+# define RBIMPL_HAS_BUILTIN(_) ((RBIMPL_HAS_BUILTIN_ ## _)+0)
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_alloca 0
+# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
+# define RBIMPL_HAS_BUILTIN___builtin_assume 0
+# define RBIMPL_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
+# define RBIMPL_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16
+# define RBIMPL_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32
+# define RBIMPL_HAS_BUILTIN___builtin_bswap64 HAVE_BUILTIN___BUILTIN_BSWAP64
+# define RBIMPL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ
+# define RBIMPL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL
+# define RBIMPL_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL
+# define RBIMPL_HAS_BUILTIN___builtin_constant_p HAVE_BUILTIN___BUILTIN_CONSTANT_P
+# define RBIMPL_HAS_BUILTIN___builtin_ctz HAVE_BUILTIN___BUILTIN_CTZ
+# define RBIMPL_HAS_BUILTIN___builtin_ctzl 0
+# define RBIMPL_HAS_BUILTIN___builtin_ctzll HAVE_BUILTIN___BUILTIN_CTZLL
+# define RBIMPL_HAS_BUILTIN___builtin_expect HAVE_BUILTIN___BUILTIN_EXPECT
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
+# define RBIMPL_HAS_BUILTIN___builtin_popcount HAVE_BUILTIN___BUILTIN_POPCOUNT
+# define RBIMPL_HAS_BUILTIN___builtin_popcountl 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateleft32 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateleft64 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateright32 0
+# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
+# define RBIMPL_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
+# if defined(HAVE___BUILTIN_UNREACHABLE)
+# define RBIMPL_HAS_BUILTIN___builtin_unreachable 1
+# else
+# define RBIMPL_HAS_BUILTIN___builtin_unreachable 0
+# endif
+#endif
+
+#endif /* RBIMPL_HAS_BUILTIN_H */
diff --git a/include/ruby/internal/has/c_attribute.h b/include/ruby/internal/has/c_attribute.h
new file mode 100644
index 0000000000..c5c48867bf
--- /dev/null
+++ b/include/ruby/internal/has/c_attribute.h
@@ -0,0 +1,38 @@
+#ifndef RBIMPL_HAS_C_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_C_ATTRIBUTE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_C_ATTRIBUTE.
+ */
+
+/** Wraps (or simulates) `__has_c_attribute`. */
+#if defined(__cplusplus)
+# /* Makes no sense. */
+# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
+
+#elif defined(__has_c_attribute)
+# define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
+
+#else
+# /* As of writing everything that lacks __has_c_attribute also completely
+# * lacks C2x attributes as well. Might change in future? */
+# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
+#endif
+
+#endif /* RBIMPL_HAS_C_ATTRIBUTE_H */
diff --git a/include/ruby/internal/has/cpp_attribute.h b/include/ruby/internal/has/cpp_attribute.h
new file mode 100644
index 0000000000..6a393b1a24
--- /dev/null
+++ b/include/ruby/internal/has/cpp_attribute.h
@@ -0,0 +1,86 @@
+#ifndef RBIMPL_HAS_CPP_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_CPP_ATTRIBUTE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_CPP_ATTRIBUTE.
+ */
+#include "ruby/internal/compiler_is.h"
+#include "ruby/internal/compiler_since.h"
+
+/** @cond INTERNAL_MACRO */
+#if RBIMPL_COMPILER_IS(SunPro)
+# /* Oracle Developer Studio 12.5's C++ preprocessor is reportedly broken. We
+# * could simulate __has_cpp_attribute like below, but don't know the exact
+# * list of which version supported which attribute. Just kill everything for
+# * now. If you can please :FIXME: */
+# /* https://unicode-org.atlassian.net/browse/ICU-12893 */
+# /* https://github.com/boostorg/config/pull/95 */
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0
+
+#elif defined(__has_cpp_attribute)
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
+
+#elif RBIMPL_COMPILER_IS(MSVC)
+# /* MSVC has never updated its __cplusplus since forever (unless specified
+# * explicitly by a compiler flag). They also lack __has_cpp_attribute until
+# * 2019. However, they do have attributes since 2015 or so. */
+# /* https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance */
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) (RBIMPL_HAS_CPP_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_carries_dependency 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_fallthrough 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_maybe_unused 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_nodiscard 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0)
+
+#elif RBIMPL_COMPILER_BEFORE(Clang, 3, 6, 0)
+# /* Clang 3.6.0 introduced __has_cpp_attribute. Prior to that following
+# * attributes were already there. */
+# /* https://clang.llvm.org/cxx_status.html */
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) (RBIMPL_HAS_CPP_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(Clang, 3, 3, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(Clang, 3, 4, 0)
+
+#elif RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0)
+# /* GCC 5+ have __has_cpp_attribute, while 4.x had following attributes. */
+# /* https://gcc.gnu.org/projects/cxx-status.html */
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) (RBIMPL_HAS_CPP_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+
+#else
+# /* :FIXME:
+# * Candidate compilers to list here:
+# * - icpc: They have __INTEL_CXX11_MODE__.
+# */
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0
+#endif
+/** @endcond */
+
+/** Wraps (or simulates) `__has_cpp_attribute`. */
+#if ! defined(__cplusplus)
+# /* Makes no sense. */
+# define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0
+#else
+# /* GCC needs workarounds. See https://gcc.godbolt.org/z/jdz3pa */
+# define RBIMPL_HAS_CPP_ATTRIBUTE(_) \
+ ((RBIMPL_HAS_CPP_ATTRIBUTE0(_) <= __cplusplus) ? RBIMPL_HAS_CPP_ATTRIBUTE0(_) : 0)
+#endif
+
+#endif /* RBIMPL_HAS_CPP_ATTRIBUTE_H */
diff --git a/include/ruby/internal/has/declspec_attribute.h b/include/ruby/internal/has/declspec_attribute.h
new file mode 100644
index 0000000000..1c526daf78
--- /dev/null
+++ b/include/ruby/internal/has/declspec_attribute.h
@@ -0,0 +1,47 @@
+#ifndef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_DECLSPEC_ATTRIBUTE.
+ */
+#include "ruby/internal/compiler_since.h"
+
+/** Wraps (or simulates) `__has_declspec_attribute`. */
+#if defined(__has_declspec_attribute)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) __has_declspec_attribute(_)
+#else
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) (RBIMPL_HAS_DECLSPEC_ATTRIBUTE_ ## _)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0)
+# /* Note that "8, 0, 0" might be inaccurate. */
+# if ! defined(__cplusplus)
+# /* Clang has this in both C/C++, but MSVC has this in C++ only.*/
+# undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow
+# endif
+#endif
+
+#endif /* RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H */
diff --git a/include/ruby/internal/has/extension.h b/include/ruby/internal/has/extension.h
new file mode 100644
index 0000000000..da8c0d3cc2
--- /dev/null
+++ b/include/ruby/internal/has/extension.h
@@ -0,0 +1,33 @@
+#ifndef RBIMPL_HAS_EXTENSION_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_EXTENSION_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_EXTENSION.
+ */
+#include "ruby/internal/has/feature.h"
+
+/** Wraps (or simulates) `__has_extension`. */
+#if defined(__has_extension)
+# define RBIMPL_HAS_EXTENSION(_) __has_extension(_)
+#else
+# /* Pre-3.0 clang had __has_feature but not __has_extension. */
+# define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_)
+#endif
+
+#endif /* RBIMPL_HAS_EXTENSION_H */
diff --git a/include/ruby/internal/has/feature.h b/include/ruby/internal/has/feature.h
new file mode 100644
index 0000000000..7be8d27314
--- /dev/null
+++ b/include/ruby/internal/has/feature.h
@@ -0,0 +1,31 @@
+#ifndef RBIMPL_HAS_FEATURE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_FEATURE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_FEATURE.
+ */
+
+/** Wraps (or simulates) `__has_feature`. */
+#if defined(__has_feature)
+# define RBIMPL_HAS_FEATURE(_) __has_feature(_)
+#else
+# define RBIMPL_HAS_FEATURE(_) 0
+#endif
+
+#endif /* RBIMPL_HAS_FEATURE_H */
diff --git a/include/ruby/internal/has/warning.h b/include/ruby/internal/has/warning.h
new file mode 100644
index 0000000000..12d7db183b
--- /dev/null
+++ b/include/ruby/internal/has/warning.h
@@ -0,0 +1,31 @@
+#ifndef RBIMPL_HAS_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_WARNING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_HAS_WARNING.
+ */
+
+/** Wraps (or simulates) `__has_warning`. */
+#if defined(__has_warning)
+# define RBIMPL_HAS_WARNING(_) __has_warning(_)
+#else
+# define RBIMPL_HAS_WARNING(_) 0
+#endif
+
+#endif /* RBIMPL_HAS_WARNING_H */
diff --git a/include/ruby/internal/intern/array.h b/include/ruby/internal/intern/array.h
new file mode 100644
index 0000000000..2262c6f0c6
--- /dev/null
+++ b/include/ruby/internal/intern/array.h
@@ -0,0 +1,657 @@
+#ifndef RBIMPL_INTERN_ARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ARRAY_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cArray.
+ */
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/noexcept.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* array.c */
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Fills the memory region with a series of ::RUBY_Qnil.
+ *
+ * @param[out] buf Buffer to squash.
+ * @param[in] len Number of objects of `buf`.
+ * @post `buf` is filled with ::RUBY_Qnil.
+ */
+void rb_mem_clear(VALUE *buf, long len)
+ RBIMPL_ATTR_NOEXCEPT(true)
+ ;
+
+/**
+ * Identical to rb_ary_new_from_values(), except it expects exactly two
+ * parameters.
+ *
+ * @param[in] car Arbitrary ruby object.
+ * @param[in] cdr Arbitrary ruby object.
+ * @return An allocated new array, of length 2, whose contents are the
+ * passed objects.
+ */
+VALUE rb_assoc_new(VALUE car, VALUE cdr);
+
+/**
+ * Try converting an object to its array representation using its `to_ary`
+ * method, if any. If there is no such thing, returns ::RUBY_Qnil.
+ *
+ * @param[in] obj Arbitrary ruby object to convert.
+ * @exception rb_eTypeError `obj.to_ary` returned something non-Array.
+ * @retval RUBY_Qnil No conversion from `obj` to array defined.
+ * @retval otherwise Converted array representation of `obj`.
+ * @see rb_io_check_io
+ * @see rb_check_string_type
+ * @see rb_check_hash_type
+ */
+VALUE rb_check_array_type(VALUE obj);
+
+/**
+ * Allocates a new, empty array.
+ *
+ * @return An allocated new array, whose length is 0.
+ */
+VALUE rb_ary_new(void);
+
+/**
+ * Identical to rb_ary_new(), except it additionally specifies how many rooms
+ * of objects it should allocate. This way you can create an array whose
+ * capacity is bigger than the length of it. If you can say that an array
+ * grows to a specific amount, this could be effective than resizing an array
+ * over and over again and again.
+ *
+ * @param[in] capa Designed capacity of the generating array.
+ * @return An empty array, whose capacity is `capa`.
+ */
+VALUE rb_ary_new_capa(long capa);
+
+/**
+ * Constructs an array from the passed objects.
+ *
+ * @param[in] n Number of passed objects.
+ * @param[in] ... Arbitrary ruby objects, filled into the returning array.
+ * @return An array of size `n`, whose contents are the passed objects.
+ */
+VALUE rb_ary_new_from_args(long n, ...);
+
+/**
+ * Identical to rb_ary_new_from_args(), except how objects are passed.
+ *
+ * @param[in] n Number of objects of `elts`.
+ * @param[in] elts Arbitrary ruby objects, filled into the returning array.
+ * @return An array of size `n`, whose contents are the passed objects.
+ */
+VALUE rb_ary_new_from_values(long n, const VALUE *elts);
+
+/**
+ * Allocates a hidden (no class) empty array.
+ *
+ * @param[in] capa Designed capacity of the array.
+ * @return A hidden, empty array.
+ * @see rb_obj_hide()
+ */
+VALUE rb_ary_hidden_new(long capa);
+#define rb_ary_tmp_new rb_ary_hidden_new
+
+/**
+ * Destroys the given array for no reason.
+ *
+ * @warning DO NOT USE IT.
+ * @warning Leave this task to our GC.
+ * @warning It was a wrong indea at the first place to let you know about it.
+ *
+ * @param[out] ary The array to be executed.
+ * @post The given array no longer exists.
+ * @note Maybe `Array#clear` could be what you want.
+ *
+ * @internal
+ *
+ * Should have moved this to `internal/array.h`.
+ */
+void rb_ary_free(VALUE ary);
+
+/**
+ * Declares that the array is about to be modified. This for instance let the
+ * array have a dedicated backend storage.
+ *
+ * @param[out] ary Array about to be modified.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @post Upon successful return the passed array is eligible to be
+ * modified.
+ */
+void rb_ary_modify(VALUE ary);
+
+/** @alias{rb_obj_freeze} */
+VALUE rb_ary_freeze(VALUE obj);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the passed two arrays share the same backend storage. A use-case
+ * for knowing such property is to take a snapshot of an array (using
+ * e.g. rb_ary_replace()), then check later if that snapshot still shares the
+ * storage with the original. Taking a snapshot is ultra-cheap. If nothing
+ * happens the impact shall be minimal. But if someone modifies the original,
+ * that entity shall pay the cost of copy-on-write. You can detect that using
+ * this API.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval RUBY_Qtrue They share the same backend storage.
+ * @retval RUBY_Qfalse They are distinct.
+ * @pre Both arguments must be of ::RUBY_T_ARRAY.
+ */
+VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs);
+
+/**
+ * Queries element(s) of an array. This is complicated! Refer `Array#slice`
+ * document for the complete description of how it behaves.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Up to 2 objects.
+ * @param[in] ary Target array.
+ * @exception rb_eTypeError `argv` (or its part) includes non-Integer.
+ * @exception rb_eRangeError rb_cArithSeq is passed, and is OOB.
+ * @return An element (if requested), or an array of elements (if
+ * requested), or ::RUBY_Qnil (if index OOB).
+ *
+ * @internal
+ *
+ * ```rbs
+ * # "int" is ::Integer or `#to_int`, defined in builtin.rbs
+ *
+ * class ::Array[unchecked out T]
+ * def slice
+ * : (int i) -> T?
+ * | (int beg, int len) -> ::Array[T]?
+ * | (Range[int] r) -> ::Array[T]?
+ * | (ArithmeticSequence as) -> ::Array[T]? # This also raises RagneError.
+ * end
+ * ```
+ */
+VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary);
+
+/**
+ * Obtains a part of the passed array.
+ *
+ * @param[in] ary Target array.
+ * @param[in] beg Subpart index.
+ * @param[in] len Requested length of returning array.
+ * @retval RUBY_Qnil Requested range out of bounds of `ary`.
+ * @retval otherwise An allocated new array whose contents are `ary`'s
+ * `beg` to `len`.
+ * @note Return array can be shorter than `len` when for instance
+ * `[0, 1, 2, 3]`'s 4th to 1,000,000,000th is requested.
+ */
+VALUE rb_ary_subseq(VALUE ary, long beg, long len);
+
+/**
+ * Destructively stores the passed value to the passed array's passed index.
+ * It also resizes the array's backend storage so that the requested index is
+ * not out of bounds.
+ *
+ * @param[out] ary Target array to modify.
+ * @param[in] key Where to store `val`.
+ * @param[in] val What to store at `key`.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @exception rb_eIndexError `key` is negative.
+ * @post `ary`'s `key`th position is occupied with `val`.
+ * @post Depending on `key` and previous length of `ary` this operation
+ * can also create a series of "hole" positions inside of the
+ * backend storage. They are filled with ::RUBY_Qnil.
+ */
+void rb_ary_store(VALUE ary, long key, VALUE val);
+
+/**
+ * Duplicates an array.
+ *
+ * @param[in] ary Target to duplicate.
+ * @return An allocated new array whose contents are identical to `ary`.
+ *
+ * @internal
+ *
+ * Not sure why this has to be something different from `ary_make_shared_copy`,
+ * which seems much efficient.
+ */
+VALUE rb_ary_dup(VALUE ary);
+
+/**
+ * I guess there is no use case of this function in extension libraries, but
+ * this is a routine identical to rb_ary_dup(). This makes the most sense when
+ * the passed array is formerly hidden by rb_obj_hide().
+ *
+ * @param[in] ary An array, possibly hidden.
+ * @return A duplicated new instance of ::rb_cArray.
+ */
+VALUE rb_ary_resurrect(VALUE ary);
+
+/**
+ * Force converts an object to an array. It first tries its `#to_ary` method.
+ * Takes the result if any. Otherwise creates an array of size 1 whose sole
+ * element is the passed object.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return An array representation of `obj`.
+ * @note Unlike rb_str_to_str() which is a variant of
+ * rb_check_string_type(), rb_ary_to_ary() is not a variant of
+ * rb_check_array_type().
+ */
+VALUE rb_ary_to_ary(VALUE obj);
+
+/**
+ * Converts an array into a human-readable string. Historically its behaviour
+ * changed over time. Currently it is identical to calling `inspect` method.
+ * This behaviour is from that of python (!!) circa 2006.
+ *
+ * @param[in] ary Array to inspect.
+ * @return Recursively inspected representation of `ary`.
+ * @see `[ruby-dev:29520]`
+ */
+VALUE rb_ary_to_s(VALUE ary);
+
+/**
+ * Destructively appends multiple elements at the end of the array.
+ *
+ * @param[out] ary Where to push `train`.
+ * @param[in] train Arbitrary ruby objects to push to `ary`.
+ * @param[in] len Number of objects of `train`.
+ * @exception rb_eIndexError `len` too large.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return The passed `ary`.
+ * @post `ary` has contents from `train` appended at its end.
+ */
+VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len);
+
+/**
+ * Special case of rb_ary_cat() that it adds only one element.
+ *
+ * @param[out] ary Where to push `elem`.
+ * @param[in] elem Arbitrary ruby object to push.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return The passed `ary`.
+ * @post `ary` has `elem` appended at its end.
+ */
+VALUE rb_ary_push(VALUE ary, VALUE elem);
+
+/**
+ * Destructively deletes an element from the end of the passed array and
+ * returns what was deleted.
+ *
+ * @param[out] ary Target array to modify.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return What was at the end of `ary`, or ::RUBY_Qnil if there is
+ * nothing to remove.
+ * @post `ary`'s last element, if any, is removed.
+ * @note There is no way to distinguish whether `ary` was an 1-element
+ * array whose content was ::RUBY_Qnil, or was empty.
+ */
+VALUE rb_ary_pop(VALUE ary);
+
+/**
+ * Destructively deletes an element from the beginning of the passed array and
+ * returns what was deleted. It can also be seen as a routine identical to
+ * rb_ary_pop(), except which side of the array to scrub.
+ *
+ * @param[out] ary Target array to modify.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return What was at the beginning of `ary`, or ::RUBY_Qnil if there is
+ * nothing to remove.
+ * @post `ary`'s first element, if any, is removed. As the name implies
+ * everything else remaining in `ary` gets moved towards `ary`'s
+ * beginning.
+ * @note There is no way to distinguish whether `ary` was an 1-element
+ * array whose content was ::RUBY_Qnil, or was empty.
+ */
+VALUE rb_ary_shift(VALUE ary);
+
+/**
+ * Destructively prepends the passed item at the beginning of the passed array.
+ * It can also be seen as a routine identical to rb_ary_push(), except which
+ * side of the array to modify.
+ *
+ * @param[out] ary Target array to modify.
+ * @param[in] elem Arbitrary ruby object to unshift.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return The passed `ary`.
+ * @post `ary` has `elem` prepended at this beginning.
+ */
+VALUE rb_ary_unshift(VALUE ary, VALUE elem);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries an element of an array. When passed offset is negative it counts
+ * backwards.
+ *
+ * @param[in] ary An array to look into.
+ * @param[in] off Offset (can be negative).
+ * @return ::RUBY_Qnil when `off` is out of bounds of `ary`. Otherwise
+ * what is stored at `off`-th position of `ary`.
+ * @note `ary`'s `off`-th element can happen to be ::RUBY_Qnil.
+ */
+VALUE rb_ary_entry(VALUE ary, long off);
+
+/**
+ * Iteratively yields each element of the passed array to the implicitly passed
+ * block if any. In case there is no block given, an enumerator that does the
+ * thing is generated instead.
+ *
+ * @param[in] ary Array to iterate over.
+ * @retval ary Passed block was evaluated.
+ * @retval otherwise An instance of ::rb_cEnumerator for `Array#each`.
+ */
+VALUE rb_ary_each(VALUE ary);
+
+/**
+ * Recursively stringises the elements of the passed array, flattens that
+ * result, then joins the sequence using the passed separator.
+ *
+ * @param[in] ary Target array to convert.
+ * @param[in] sep Separator. Either a string, or ::RUBY_Qnil
+ * if you want no separator.
+ * @exception rb_eArgError Infinite recursion in `ary`.
+ * @exception rb_eTypeError `sep` is not a string.
+ * @exception rb_eEncCompatError Strings do not agree with their encodings.
+ * @return An instance of ::rb_cString which concatenates stringised
+ * contents of `ary`, using `sep` as separator.
+ */
+VALUE rb_ary_join(VALUE ary, VALUE sep);
+
+/**
+ * _Destructively_ reverses the passed array in-place.
+ *
+ * @warning This is `Array#reverse!`, not `Array#reverse`.
+ * @param[out] ary Target array to modify.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return Passed `ary`.
+ * @post `ary` is reversed.
+ */
+VALUE rb_ary_reverse(VALUE ary);
+
+/**
+ * _Destructively_ rotates the passed array in-place to towards its end. The
+ * amount can be negative. Would rotate to the opposite direction then.
+ *
+ * @warning This is `Array#rotate!`, not `Array#rotate`.
+ * @param[out] ary Target array to modify.
+ * @param[in] rot Amount of rotation.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @retval RUBY_Qnil Not rotated.
+ * @retval ary Rotated.
+ * @post `ary` is rotated.
+ */
+VALUE rb_ary_rotate(VALUE ary, long rot);
+
+/**
+ * Creates a copy of the passed array, whose elements are sorted according to
+ * their `<=>` result.
+ *
+ * @param[in] ary Array to sort.
+ * @exception rb_eArgError Comparison not defined among elements.
+ * @exception rb_eRuntimeError Infinite recursion in `<=>`.
+ * @return A copy of `ary`, sorted.
+ * @note As of writing this function uses `qsort` as backend algorithm,
+ * which means the result is unstable (in terms of sort stability).
+ */
+VALUE rb_ary_sort(VALUE ary);
+
+/**
+ * Destructively sorts the passed array in-place, according to each elements'
+ * `<=>` result.
+ *
+ * @param[in] ary Target array to modify.
+ * @exception rb_eArgError Comparison not defined among elements.
+ * @exception rb_eRuntimeError Infinite recursion in `<=>`.
+ * @return Passed `ary`.
+ * @post `ary` is sorted.
+ * @note As of writing this function uses `qsort` as backend algorithm,
+ * which means the result is unstable (in terms of sort stability).
+ */
+VALUE rb_ary_sort_bang(VALUE ary);
+
+/**
+ * Destructively removes elements from the passed array, so that there would be
+ * no elements inside that satisfy `==` relationship with the passed object.
+ * Returns the last deleted element if any. But in case there was nothing to
+ * delete it gets complicated. It checks for the implicitly passed block. If
+ * there is a block the return value would be what the block evaluates to.
+ * Otherwise it resorts to ::RUBY_Qnil.
+ *
+ * @param[out] ary Target array to modify.
+ * @param[in] elem Template object to match against each element.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return What was deleted, or what was the block returned, or
+ * ::RUBY_Qnil (see above).
+ * @post All elements that have `==` relationship with `elem` are purged
+ * from `ary`. Elements shift their positions so that `ary` gets
+ * compact.
+ *
+ * @internal
+ *
+ * Internally there also is `rb_ary_delete_same`, which compares by identity.
+ */
+VALUE rb_ary_delete(VALUE ary, VALUE elem);
+
+/**
+ * Destructively removes an element which resides at the specific index of the
+ * passed array. Unlike rb_ary_stre() the index can be negative, which means
+ * the index counts backwards from the array's tail.
+ *
+ * @param[out] ary Target array to modify.
+ * @param[in] pos Position (can be negative).
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return What was deleted, or ::RUBY_Qnil in case of OOB.
+ * @post `ary`'s `pos`-th element is deleted if any.
+ * @note There is no way to distinguish whether `pos` is out of bound,
+ * or `pos` did exist but stored ::RUBY_Qnil as an ordinal value.
+ */
+VALUE rb_ary_delete_at(VALUE ary, long pos);
+
+/**
+ * Destructively removes everything form an array.
+ *
+ * @param[out] ary Target array to modify.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @return The passed `ary`.
+ * @post `ary` is an empty array.
+ */
+VALUE rb_ary_clear(VALUE ary);
+
+/**
+ * Creates a new array, concatenating the former to the latter.
+ *
+ * @param[in] lhs Source array #1.
+ * @param[in] rhs Source array #2.
+ * @exception rb_eIndexError Result array too big.
+ * @return A new array containing `rhs` concatenated to `lhs`.
+ * @note This operation doesn't commute. Don't get confused by the
+ * "plus" terminology. For historical reasons there are some
+ * noncommutative `+`s in Ruby. This is one of such things. There
+ * has been a long discussion around `+`s in programming languages.
+ *
+ * @internal
+ *
+ * rb_ary_concat() is not a destructive version of rb_ary_plus(). They raise
+ * different exceptions. Don't know why though.
+ */
+VALUE rb_ary_plus(VALUE lhs, VALUE rhs);
+
+/**
+ * Destructively appends the contents of latter into the end of former.
+ *
+ * @param[out] lhs Destination array.
+ * @param[in] rhs Source array.
+ * @exception rb_eFrozenError `lhs` is frozen.
+ * @exception rb_eIndexError Result array too big.
+ * @exception rb_eTypeError `rhs` doesn't respond to `#to_ary`.
+ * @return The passed `lhs`.
+ * @post `lhs` has contents of `rhs` appended to its end.
+ */
+VALUE rb_ary_concat(VALUE lhs, VALUE rhs);
+
+/**
+ * Looks up the passed key, assuming the passed array is an alist. An "alist"
+ * here is a list of "association"s, much like that of Emacs. Emacs has
+ * `assoc` function that behaves exactly the same as this one.
+ *
+ * ```ruby
+ * # This is an example of aliist.
+ * auto_mode_alist = [
+ * [ /\.[ch]\z/, :"c-mode" ],
+ * [ /\.[ch]pp\z/, :"c++-mode" ],
+ * [ /\.awk\z/, :"awk-mode" ],
+ * [ /\.cs\z/, :"csharp-mode" ],
+ * [ /\.go\z/, :"go-mode" ],
+ * [ /\.java\z/, :"java-mode" ],
+ * [ /\.pas\z/, :"pascal-mode" ],
+ * [ /\.rs\z/, :"rust-mode" ],
+ * [ /\.txt\z/, :"text-mode" ],
+ * ]
+ * ```
+ *
+ * This function scans the passed array looking for an element, which itself is
+ * an array, whose first element is the passed key. If no such element is
+ * found, returns ::RUBY_Qnil.
+ *
+ * Although this function expects the passed array be an array of arrays, it
+ * can happily accept non-array elements; it just ignores such things.
+ *
+ * @param[in] alist An array of arrays.
+ * @param[in] key Needle.
+ * @retval RUBY_Qnil Nothing was found.
+ * @retval otherwise An element in `alist` whose first element is in `==`
+ * relationship with `key`.
+ */
+VALUE rb_ary_assoc(VALUE alist, VALUE key);
+
+/**
+ * Identical to rb_ary_assoc(), except it scans the passed array from the
+ * opposite direction.
+ *
+ * @param[in] alist An array of arrays.
+ * @param[in] key Needle.
+ * @retval RUBY_Qnil Nothing was found.
+ * @retval otherwise An element in `alist` whose first element is in `==`
+ * relationship with `key`.
+ */
+VALUE rb_ary_rassoc(VALUE alist, VALUE key);
+
+/**
+ * Queries if the passed array has the passed entry.
+ *
+ * @param[in] ary Target array to scan.
+ * @param[in] elem Target array to find.
+ * @retval RUBY_Qfalse No element in `ary` is in `==` relationship with
+ * `elem`.
+ * @retval RUBY_Qtrue There is at least one element in `ary` which is in
+ * `==` relationship with `elem`.
+ *
+ * @internal
+ *
+ * This is the only function in the entire C API that is named using third
+ * person singular form of a verb (except #ISASCII etc., which are not our
+ * naming). The counterpart Ruby API of this function is `Array#include?`.
+ */
+VALUE rb_ary_includes(VALUE ary, VALUE elem);
+
+/**
+ * Recursively compares each elements of the two arrays one-by-one using `<=>`.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval RUBY_Qnil `lhs` and `rhs` are not comparable.
+ * @retval -1 `lhs` is less than `rhs`.
+ * @retval 0 They are equal.
+ * @retval 1 `rhs` is less then `lhs`.
+ */
+VALUE rb_ary_cmp(VALUE lhs, VALUE rhs);
+
+/**
+ * Replaces the contents of the former object with the contents of the latter.
+ *
+ * @param[out] copy Destination object.
+ * @param[in] orig Source object.
+ * @exception rb_eTypeError `orig` has no implicit conversion to Array.
+ * @exception rb_eFrozenError `copy` is frozen.
+ * @return The passed `copy`.
+ * @post `copy`'s former components are abandoned. It now has the
+ * identical length and contents to `orig`.
+ */
+VALUE rb_ary_replace(VALUE copy, VALUE orig);
+
+/**
+ * This _was_ a generalisation of `Array#values_at`, `Struct#values_at`, and
+ * `MatchData#values_at`. It begun its life as a refactoring effort. However
+ * as Ruby evolves over time, as of writing none of aforementioned methods
+ * share their implementations at all. This function is not deprecated; still
+ * works as it has been. But it is now kind of like a rudimentum.
+ *
+ * This function takes an object, which is a receiver, and a series of
+ * "indices", which are either integers, or ranges of integers. Calls the
+ * passed callback for each of those indices, along with the receiver. This
+ * callback is expected to do something like rb_ary_aref(), rb_struct_aref(),
+ * etc. In case of a range index rb_range_beg_len() expands the range.
+ * Finally return values of the callback are gathered as an array, then
+ * returned.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @param[in] olen "Length" of `obj`.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv List of "indices", described above.
+ * @param[in] func Callback function.
+ * @return A new instance of ::rb_cArray gathering `func`outputs.
+ *
+ * @internal
+ *
+ * `Array#values_at` no longer uses this function. There is no reason apart
+ * from historical ones to list this function here.
+ */
+VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE (*func)(VALUE obj, long oidx));
+
+/**
+ * Expands or shrinks the passed array to the passed length.
+ *
+ * @param[out] ary An array to modify.
+ * @param[in] len Desired length of `ary`.
+ * @exception rb_eFrozenError `ary` is frozen.
+ * @exception rb_eIndexError `len` too long.
+ * @return The passed `ary`.
+ * @post `ary`'s length is `len`.
+ * @post Depending on `len` and previous length of `ary` this operation
+ * can also create a series of "hole" positions inside of the
+ * backend storage. They are filled with ::RUBY_Qnil.
+ *
+ * @internal
+ *
+ * `len` is signed. Intentional or...?
+ */
+VALUE rb_ary_resize(VALUE ary, long len);
+
+#define rb_ary_new2 rb_ary_new_capa /**< @old{rb_ary_new_capa} */
+#define rb_ary_new3 rb_ary_new_from_args /**< @old{rb_ary_new_from_args} */
+#define rb_ary_new4 rb_ary_new_from_values /**< @old{rb_ary_new_from_values} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_ARRAY_H */
diff --git a/include/ruby/internal/intern/bignum.h b/include/ruby/internal/intern/bignum.h
new file mode 100644
index 0000000000..43d68018de
--- /dev/null
+++ b/include/ruby/internal/intern/bignum.h
@@ -0,0 +1,846 @@
+#ifndef RBIMPL_INTERN_BIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_BIGNUM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to so-called rb_cBignum.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/backward/2/long_long.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* bignum.c */
+
+/**
+ * Allocates a bignum object.
+ *
+ * @param[in] len Length of the bignum's backend storage, in words.
+ * @param[in] sign Sign of the bignum.
+ * @return An allocated new bignum instance.
+ * @note This only allocates an object, doesn't fill its value in.
+ *
+ * @internal
+ *
+ * @shyouhei finds it hard to use from extension libraries. `len` is per
+ * `BDIGIT` but its definition is hidden.
+ */
+VALUE rb_big_new(size_t len, int sign);
+
+/**
+ * Queries if the passed bignum instance is a "bigzro". What is a bigzero?
+ * Well, bignums are for very big integers, but can also represent tiny ones
+ * like -1, 0, 1. Bigzero are instances of bignums whose values are zero.
+ * Knowing if a bignum is bigzero can be handy on occasions, like for instance
+ * detecting division by zero situation.
+ *
+ * @param[in] x A bignum.
+ * @retval 1 It is a bigzero.
+ * @retval 0 Otherwise.
+ */
+int rb_bigzero_p(VALUE x);
+
+/**
+ * Duplicates the given bignum.
+ *
+ * @param[in] num A bignum.
+ * @return An allocated bignum, who is equivalent to `num`.
+ */
+VALUE rb_big_clone(VALUE num);
+
+/**
+ * Destructively modify the passed bignum into 2's complement representation.
+ *
+ * @note By default bignums are in signed magnitude system.
+ *
+ * @param[out] num A bignum to modify.
+ */
+void rb_big_2comp(VALUE num);
+
+/**
+ * Normalises the passed bignum. It for instance returns a fixnum of the same
+ * value if fixnum can represent that number.
+ *
+ * @param[out] x Target bignum (can be destructively modified).
+ * @return An integer of the identical value (can be `x` itself).
+ */
+VALUE rb_big_norm(VALUE x);
+
+/**
+ * Destructively resizes the backend storage of the passed bignum.
+ *
+ * @param[out] big A bignum.
+ * @param[in] len New length of `big`'s backend, in words.
+ */
+void rb_big_resize(VALUE big, size_t len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Parses C's string to convert into a Ruby's integer. It understands prefixes
+ * (e.g. `0x`) and underscores.
+ *
+ * @param[in] str Stringised representation of the return value.
+ * @param[in] base Base of conversion. Must be `-36..36` inclusive,
+ * except `1`. `2..36` means the conversion is done
+ * according to it, with unmatched prefix understood
+ * as a part of the result. `-36..-2` means the
+ * conversion honours prefix when present, or use
+ * `-base` when absent. `0` is equivalent to `-10`.
+ * `-1` mandates a prefix. `1` is an error.
+ * @param[in] badcheck Whether to raise ::rb_eArgError on failure. If
+ * `0` is passed here this function can return
+ * `INT2FIX(0)` for parse errors.
+ * @exception rb_eArgError Failed to parse (and `badcheck` is truthy).
+ * @return An instance of ::rb_cInteger, which is a numeric interpretation
+ * of what is written in `str`.
+ *
+ * @internal
+ *
+ * Not sure if it intentionally accepts `base == -1` or is just buggy. Nobody
+ * practically uses negative bases these days.
+ */
+VALUE rb_cstr_to_inum(const char *str, int base, int badcheck);
+
+/**
+ * Identical to rb_cstr2inum(), except it takes Ruby's strings instead of C's.
+ *
+ * @param[in] str Stringised representation of the return
+ * value.
+ * @param[in] base Base of conversion. Must be `-36..36`
+ * inclusive, except `1`. `2..36` means the
+ * conversion is done according to it, with
+ * unmatched prefix understood as a part of the
+ * result. `-36..-2` means the conversion
+ * honours prefix when present, or use `-base`
+ * when absent. `0` is equivalent to `-10`.
+ * `-1` mandates a prefix. `1` is an error.
+ * @param[in] badcheck Whether to raise ::rb_eArgError on failure.
+ * If `0` is passed here this function can
+ * return `INT2FIX(0)` for parse errors.
+ * @exception rb_eArgError Failed to parse (and `badcheck` is truthy).
+ * @exception rb_eTypeError `str` is not a string.
+ * @exception rb_eEncCompatError `str` is not ASCII compatible.
+ * @return An instance of ::rb_cInteger, which is a numeric interpretation
+ * of what is written in `str`.
+ */
+VALUE rb_str_to_inum(VALUE str, int base, int badcheck);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_cstr_to_inum(), except the second argument controls the base
+ * and badcheck at once. It basically doesn't raise for parse errors, unless
+ * the base is zero.
+ *
+ * This is an older API. New codes might prefer rb_cstr_to_inum().
+ *
+ * @param[in] str Stringised representation of the return value.
+ * @param[in] base Base of conversion. Must be `-36..36` inclusive,
+ * except `1`. `2..36` means the conversion is done
+ * according to it, with unmatched prefix understood
+ * as a part of the result. `-36..-2` means the
+ * conversion honours prefix when present, or use
+ * `-base` when absent. `0` is equivalent to `-10`.
+ * `-1` mandates a prefix. `1` is an error.
+ * @exception rb_eArgError Failed to parse (and `base` is zero).
+ * @return An instance of ::rb_cInteger, which is a numeric interpretation
+ * of what is written in `str`.
+ */
+VALUE rb_cstr2inum(const char *str, int base);
+
+/**
+ * Identical to rb_str_to_inum(), except the second argument controls the base
+ * and badcheck at once. It can also be seen as a routine identical to
+ * rb_cstr2inum(), except it takes Ruby's strings instead of C's.
+ *
+ * This is an older API. New codes might prefer rb_cstr_to_inum().
+ *
+ * @param[in] str Stringised representation of the return
+ * value.
+ * @param[in] base Base of conversion. Must be `-36..36`
+ * inclusive, except `1`. `2..36` means the
+ * conversion is done according to it, with
+ * unmatched prefix understood as a part of the
+ * result. `-36..-2` means the conversion
+ * honours prefix when present, or use `-base`
+ * when absent. `0` is equivalent to `-10`.
+ * `-1` mandates a prefix. `1` is an error.
+ * @exception rb_eArgError Failed to parse (and `base` is zero).
+ * @exception rb_eTypeError `str` is not a string.
+ * @exception rb_eEncCompatError `str` is not ASCII compatible.
+ * @return An instance of ::rb_cInteger, which is a numeric interpretation
+ * of what is written in `str`.
+ */
+VALUE rb_str2inum(VALUE str, int base);
+
+/**
+ * Generates a place-value representation of the passed integer.
+ *
+ * @param[in] x An integer to stringify.
+ * @param[in] base `2` to `36` inclusive for each radix.
+ * @exception rb_eArgError `base` is out of range.
+ * @exception rb_eRangeError `x` is too big, cannot represent in string.
+ * @return An instance of ::rb_cString which represents `x`.
+ */
+VALUE rb_big2str(VALUE x, int base);
+
+/**
+ * Converts a bignum into C's `long`.
+ *
+ * @param[in] x A bignum.
+ * @exception rb_eRangeError `x` is out of range of `long`.
+ * @return The passed value converted into C's `long`.
+ */
+long rb_big2long(VALUE x);
+
+/** @alias{rb_big2long} */
+#define rb_big2int(x) rb_big2long(x)
+
+/**
+ * Converts a bignum into C's `unsigned long`.
+ *
+ * @param[in] x A bignum.
+ * @exception rb_eRangeError `x` is out of range of `unsigned long`.
+ * @return The passed value converted into C's `unsigned long`.
+ *
+ * @internal
+ *
+ * This function can generate a very large positive integer for a negative
+ * input. For instance applying Ruby's -4,611,686,018,427,387,905 to this
+ * function yields C's 13,835,058,055,282,163,711 on my machine. This is how
+ * it has been. Cannot change any longer.
+ */
+unsigned long rb_big2ulong(VALUE x);
+
+/** @alias{rb_big2long} */
+#define rb_big2uint(x) rb_big2ulong(x)
+
+#if HAVE_LONG_LONG
+/**
+ * Converts a bignum into C's `long long`.
+ *
+ * @param[in] x A bignum.
+ * @exception rb_eRangeError `x` is out of range of `long long`.
+ * @return The passed value converted into C's `long long`.
+ */
+LONG_LONG rb_big2ll(VALUE);
+
+/**
+ * Converts a bignum into C's `unsigned long long`.
+ *
+ * @param[in] x A bignum.
+ * @exception rb_eRangeError `x` is out of range of `unsigned long long`.
+ * @return The passed value converted into C's `unsigned long long`.
+ *
+ * @internal
+ *
+ * This function can generate a very large positive integer for a negative
+ * input. For instance applying Ruby's -4,611,686,018,427,387,905 to this
+ * function yields C's 13,835,058,055,282,163,711 on my machine. This is how
+ * it has been. Cannot change any longer.
+ */
+unsigned LONG_LONG rb_big2ull(VALUE);
+
+#endif /* HAVE_LONG_LONG */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Converts a bignum into a series of its parts.
+ *
+ * @param[in] val An integer.
+ * @param[out] buf Return buffer.
+ * @param[in] num_longs Number of words of `buf`.
+ * @exception rb_eTypeError `val` doesn't respond to `#to_int`.
+ * @post `buf` is filled with `val`'s 2's complement representation, in
+ * the host CPU's native byte order, from least significant word
+ * towards the most significant one, for `num_longs` words.
+ * @note The "pack" terminology comes from `Array#pack`.
+ */
+void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Constructs a (possibly very big) bignum from a series of integers. `buf[0]`
+ * would be the return value's least significant word; `buf[num_longs-1]` would
+ * be that of most significant.
+ *
+ * @param[in] buf A series of integers.
+ * @param[in] num_longs Number of words of `buf`.
+ * @exception rb_eArgError Result would be too big.
+ * @return An instance of ::rb_cInteger which is an "unpack"-ed value of
+ * the parameters.
+ * @note The "unpack" terminology comes from `String#pack`.
+ */
+VALUE rb_big_unpack(unsigned long *buf, long num_longs);
+
+/* pack.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Encodes a Unicode codepoint into its UTF-8 representation.
+ *
+ * @param[out] buf Return buffer, must at least be 6 bytes width.
+ * @param[in] uv An Unicode codepoint.
+ * @exception rb_eRangeError `uv` is out of Unicode.
+ * @return Number of bytes written to `buf`
+ * @post `buf` holds a UTF-8 representation of `uv`.
+ */
+int rb_uv_to_utf8(char buf[6], unsigned long uv);
+
+/* bignum.c */
+
+/**
+ * Converts a C's `double` into a bignum.
+ *
+ * @param[in] d A value to convert.
+ * @exception rb_eFloatDomainError `d` is Inf/NaN.
+ * @return An instance of ::rb_cInteger whose value is approximately `d`.
+ *
+ * @internal
+ *
+ * @shyouhei is not sure if the result is guaranteed to be the nearest integer
+ * of `d`.
+ */
+VALUE rb_dbl2big(double d);
+
+/**
+ * Converts a bignum into C's `double`.
+ *
+ * @param[in] x A bignum.
+ * @return The passed value converted into C's `double`.
+ *
+ * @internal
+ *
+ * @shyouhei is not sure if the result is guaranteed to be `x`'s nearest value
+ * that a `double` can represent.
+ */
+double rb_big2dbl(VALUE x);
+
+/**
+ * Compares the passed two bignums.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval -1 `rhs` is bigger than `lhs`.
+ * @retval 0 They are identical.
+ * @retval 1 `lhs` is bigger than `rhs`.
+ * @see rb_num_coerce_cmp()
+ */
+VALUE rb_big_cmp(VALUE lhs, VALUE rhs);
+
+/**
+ * Equality, in terms of `==`. This checks if the _value_ is the same, not the
+ * identity. For instance `1 == 1.0` must hold.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval RUBY_Qtrue They are the same.
+ * @retval RUBY_Qfalse They are different.
+ */
+VALUE rb_big_eq(VALUE lhs, VALUE rhs);
+
+/**
+ * Equality, in terms of `eql?`. Unlike rb_big_eq() it does not convert
+ * ::rb_cFloat etc. This function returns ::RUBY_Qtrue if and only if both
+ * parameters are bignums, which represent the identical numerical value.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval RUBY_Qtrue They are identical.
+ * @retval RUBY_Qfalse They are distinct.
+ */
+VALUE rb_big_eql(VALUE lhs, VALUE rhs);
+
+/**
+ * Performs addition of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x + y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_plus(VALUE x, VALUE y);
+
+/**
+ * Performs subtraction of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x - y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_minus(VALUE x, VALUE y);
+
+/**
+ * Performs multiplication of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x * y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_mul(VALUE x, VALUE y);
+
+/**
+ * Performs division of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x / y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_div(VALUE x, VALUE y);
+
+/**
+ * Performs "integer division". This is different from rb_big_div().
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x.div y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_idiv(VALUE x, VALUE y);
+
+/**
+ * Performs modulo of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x % y` evaluates to.
+ * @see rb_num_coerce_bin()
+ *
+ * @internal
+ *
+ * There also is `rb_big_remainder()` internally, which is different from this
+ * one.
+ */
+VALUE rb_big_modulo(VALUE x, VALUE y);
+
+/**
+ * Performs "divmod" operation. The operation in bignum's context is that it
+ * calculates rb_big_idiv() and rb_big_modulo() at once.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x.divmod y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_big_divmod(VALUE x, VALUE y);
+
+/**
+ * Raises `x` to the powerof `y`.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x ** y` evaluates to.
+ * @see rb_num_coerce_bin()
+ * @note This can return an instance of ::rb_cFloat, even when both `x`
+ * and `y` are bignums. Or an instance of ::rb_cRational, when for
+ * instance `y` is negative.
+ */
+VALUE rb_big_pow(VALUE x, VALUE y);
+
+/**
+ * Performs bitwise and of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x & y` evaluates to.
+ * @see rb_num_coerce_bit()
+ */
+VALUE rb_big_and(VALUE x, VALUE y);
+
+/**
+ * Performs bitwise or of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x | y` evaluates to.
+ * @see rb_num_coerce_bit()
+ */
+VALUE rb_big_or(VALUE x, VALUE y);
+
+/**
+ * Performs exclusive or of the passed two objects.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x ^ y` evaluates to.
+ * @see rb_num_coerce_bit()
+ */
+VALUE rb_big_xor(VALUE x, VALUE y);
+
+/**
+ * Performs shift left.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Shift amount.
+ * @exception rb_eTypeError `y` is not an integer.
+ * @exception rb_eArgError `y` is too big.
+ * @return `x` shifted left to `y` bits.
+ * @note `y` can be negative. Shifts right then.
+ */
+VALUE rb_big_lshift(VALUE x, VALUE y);
+
+/**
+ * Performs shift right.
+ *
+ * @param[in] x A bignum.
+ * @param[in] y Shift amount.
+ * @exception rb_eTypeError `y` is not an integer.
+ * @return `x` shifted right to `y` bits.
+ * @note This is arithmetic. Because bignums are not bitfields there is
+ * no shift right logical operator.
+ */
+VALUE rb_big_rshift(VALUE x, VALUE y);
+
+/**
+ * @name Flags for rb_integer_pack()/rb_integer_unpack()
+ * @{
+ */
+
+/** Stores/interprets the most significant word as the first word. */
+#define INTEGER_PACK_MSWORD_FIRST 0x01
+
+/** Stores/interprets the least significant word as the first word. */
+#define INTEGER_PACK_LSWORD_FIRST 0x02
+
+/**
+ * Stores/interprets the most significant byte in a word as the first byte in
+ * the word.
+ */
+#define INTEGER_PACK_MSBYTE_FIRST 0x10
+
+/**
+ * Stores/interprets the least significant byte in a word as the first byte in
+ * the word.
+ */
+#define INTEGER_PACK_LSBYTE_FIRST 0x20
+
+/**
+ * Means either #INTEGER_PACK_MSBYTE_FIRST or #INTEGER_PACK_LSBYTE_FIRST,
+ * depending on the host processor's endian.
+ */
+#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
+
+/** Uses 2's complement representation. */
+#define INTEGER_PACK_2COMP 0x80
+
+/** Uses "generic" implementation (handy on test). */
+#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
+
+/**
+ * Always generates a bignum object even if the integer can be representable
+ * using fixnum scheme (unpack only)
+ */
+#define INTEGER_PACK_FORCE_BIGNUM 0x100
+
+/**
+ * Interprets the input as a signed negative number (unpack only). If not
+ * specified returns a positive number.
+ */
+#define INTEGER_PACK_NEGATIVE 0x200
+
+/** Little endian combination. */
+#define INTEGER_PACK_LITTLE_ENDIAN \
+ (INTEGER_PACK_LSWORD_FIRST | \
+ INTEGER_PACK_LSBYTE_FIRST)
+
+/** Big endian combination */
+#define INTEGER_PACK_BIG_ENDIAN \
+ (INTEGER_PACK_MSWORD_FIRST | \
+ INTEGER_PACK_MSBYTE_FIRST)
+
+/** @} */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Exports an integer into a buffer. This function fills the buffer specified
+ * by `words` and `numwords` as `val` in the format specified by `wordsize`,
+ * `nails` and `flags`.
+ *
+ * @param[in] val Integer or integer-like object which has
+ * `#to_int` method.
+ * @param[out] words Return buffer.
+ * @param[in] numwords Number of words of `words`.
+ * @param[in] wordsize Number of bytes per word.
+ * @param[in] nails Number of padding bits in a word. Most
+ * significant nails bits of each word are filled
+ * by zero.
+ * @param[in] flags Bitwise or of constants whose name starts
+ * "INTEGER_PACK_".
+ * @exception rb_eTypeError `val` doesn't respond to `#to_int`.
+ *
+ * Possible flags are:
+ *
+ * - #INTEGER_PACK_MSWORD_FIRST:
+ * Stores the most significant word as the first word.
+ *
+ * - #INTEGER_PACK_LSWORD_FIRST:
+ * Stores the least significant word as the first word.
+ *
+ * - #INTEGER_PACK_MSBYTE_FIRST:
+ * Stores the most significant byte in a word as the first byte in the
+ * word.
+ *
+ * - #INTEGER_PACK_LSBYTE_FIRST:
+ * Stores the least significant byte in a word as the first byte in the
+ * word.
+ *
+ * - #INTEGER_PACK_NATIVE_BYTE_ORDER:
+ * Either #INTEGER_PACK_MSBYTE_FIRST or #INTEGER_PACK_LSBYTE_FIRST
+ * corresponding to the host's endian.
+ *
+ * - #INTEGER_PACK_2COMP:
+ * Uses 2's complement representation.
+ *
+ * - #INTEGER_PACK_LITTLE_ENDIAN: Shorthand of
+ * `INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_LSBYTE_FIRST`.
+ *
+ * - #INTEGER_PACK_BIG_ENDIAN: Shorthand of
+ * `INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_MSBYTE_FIRST`.
+ *
+ * - #INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION:
+ * Uses generic implementation (for test and debug).
+ *
+ * This function fills the buffer specified by `words` as `val`'s 2's
+ * complement representation if #INTEGER_PACK_2COMP is specified in `flags`.
+ * Otherwise it fills `words` as `abs(val)` and signedness is returned via the
+ * return value.
+ *
+ * @return The signedness and overflow condition. The overflow condition
+ * depends on #INTEGER_PACK_2COMP.
+ *
+ * When #INTEGER_PACK_2COMP is not specified:
+ *
+ * - `-2` :
+ * Negative overflow. `val <= -2**(numwords*(wordsize*CHAR_BIT-nails))`
+ *
+ * - `-1` :
+ * Negative without overflow.
+ * `-2**(numwords*(wordsize*CHAR_BIT-nails)) < val < 0`
+ *
+ * - `0` : zero. `val == 0`
+ *
+ * - `1` :
+ * Positive without overflow.
+ * `0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))`
+ *
+ * - `2` :
+ * Positive overflow. `2**(numwords*(wordsize*CHAR_BIT-nails)) <= val`
+ *
+ * When #INTEGER_PACK_2COMP is specified:
+ *
+ * - `-2` :
+ * Negative overflow. `val < -2**(numwords*(wordsize*CHAR_BIT-nails))`
+ *
+ * - `-1` :
+ * Negative without overflow.
+ * `-2**(numwords*(wordsize*CHAR_BIT-nails)) <= val < 0`
+ *
+ * - `0` : zero. `val == 0`
+ *
+ * - `1` :
+ * Positive without overflow.
+ * `0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))`
+ *
+ * - `2` :
+ * Positive overflow. `2**(numwords*(wordsize*CHAR_BIT-nails)) <= val`
+ *
+ * The value, `-2**(numwords*(wordsize*CHAR_BIT-nails))`, is representable in
+ * 2's complement representation but not representable in absolute value. So
+ * `-1` is returned for the value if #INTEGER_PACK_2COMP is specified but
+ * returns `-2` if #INTEGER_PACK_2COMP is not specified.
+ *
+ * The least significant words are filled in the buffer when overflow occur.
+ */
+int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Import an integer from a buffer.
+ *
+ * @param[in] words Buffer to import.
+ * @param[in] numwords Number of words of `words`.
+ * @param[in] wordsize Number of bytes per word.
+ * @param[in] nails Number of padding bits in a word. Most
+ * significant nails bits of each word are ignored.
+ * @param[in] flags Bitwise or of constants whose name starts
+ * "INTEGER_PACK_".
+ * @exception rb_eArgError `numwords * wordsize` too big.
+ *
+ * Possible flags are:
+ *
+ * - #INTEGER_PACK_MSWORD_FIRST:
+ * Interpret the first word as the most significant word.
+ *
+ * - #INTEGER_PACK_LSWORD_FIRST:
+ * Interpret the first word as the least significant word.
+ *
+ * - #INTEGER_PACK_MSBYTE_FIRST:
+ * Interpret the first byte in a word as the most significant byte in the
+ * word.
+ *
+ * - #INTEGER_PACK_LSBYTE_FIRST:
+ * Interpret the first byte in a word as the least significant byte in
+ * the word.
+ *
+ * - #INTEGER_PACK_NATIVE_BYTE_ORDER:
+ * Either #INTEGER_PACK_MSBYTE_FIRST or #INTEGER_PACK_LSBYTE_FIRST
+ * corresponding to the host's endian.
+ *
+ * - #INTEGER_PACK_2COMP:
+ * Uses 2's complement representation.
+ *
+ * - #INTEGER_PACK_LITTLE_ENDIAN: Shorthand of
+ * `INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_LSBYTE_FIRST`
+ *
+ * - #INTEGER_PACK_BIG_ENDIAN: Shorthand of
+ * `INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_MSBYTE_FIRST`
+ *
+ * - #INTEGER_PACK_FORCE_BIGNUM:
+ * Returns a bignum even if its value is representable as a fixnum.
+ *
+ * - #INTEGER_PACK_NEGATIVE:
+ * Returns a non-positive value. (Returns a non-negative value if not
+ * specified.)
+ *
+ * - #INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION:
+ * Uses generic implementation (for test and debug).
+ *
+ * @return An instance of ::rb_cInteger whose value is the interpreted
+ * `words`. The range of the result value depends on
+ * #INTEGER_PACK_2COMP and #INTEGER_PACK_NEGATIVE.
+ *
+ * When #INTEGER_PACK_2COMP is not set:
+ *
+ * - `0 <= val < 2**(numwords*(wordsize*CHAR_BIT-nails))` if
+ * `!INTEGER_PACK_NEGATIVE`
+ *
+ * - `-2**(numwords*(wordsize*CHAR_BIT-nails)) < val <= 0` if
+ * `INTEGER_PACK_NEGATIVE`
+ *
+ * When #INTEGER_PACK_2COMP is set:
+ *
+ * - `-2**(numwords*(wordsize*CHAR_BIT-nails)-1)` `<= val <=`
+ * `2**(numwords*(wordsize*CHAR_BIT-nails)-1)-1` if
+ * `!INTEGER_PACK_NEGATIVE`
+ *
+ * - `-2**(numwords*(wordsize*CHAR_BIT-nails)) <= val <= -1` if
+ * `INTEGER_PACK_NEGATIVE`
+ *
+ * Passing #INTEGER_PACK_2COMP without #INTEGER_PACK_NEGATIVE means sign
+ * extension. #INTEGER_PACK_2COMP with #INTEGER_PACK_NEGATIVE means assuming
+ * the higher bits are `1`.
+ *
+ * Note that this function returns 0 when `numwords` is zero and
+ * #INTEGER_PACK_2COMP is set but #INTEGER_PACK_NEGATIVE is not set.
+ */
+VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
+
+/**
+ * Calculates the number of bytes needed to represent the absolute value of the
+ * passed integer.
+ *
+ * @param[in] val Integer or integer-like object which has
+ * `#to_int` method.
+ * @param[out] nlz_bits_ret Number of leading zero bits in the most
+ * significant byte is returned if not `NULL`.
+ * @exception rb_eTypeError `val` doesn't respond to `#to_int`.
+ * @return `((val_numbits * CHAR_BIT + CHAR_BIT - 1) / CHAR_BIT)`, where
+ * val_numbits is the number of bits of `abs(val)`.
+ * @post If `nlz_bits_ret` is not `NULL`,
+ * `(return_value * CHAR_BIT - val_numbits)` is stored in
+ * `*nlz_bits_ret`. In this case,
+ * `0 <= *nlz_bits_ret < CHAR_BIT`.
+ *
+ * This function should not overflow.
+ */
+size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
+
+/**
+ * Calculates the number of words needed represent the absolute value of the
+ * passed integer. Unlike rb_absint_size() this function can overflow. It
+ * returns `(size_t)-1` then.
+ *
+ * @param[in] val Integer or integer-like object which has
+ * `#to_int` method.
+ * @param[in] word_numbits Number of bits per word.
+ * @param[out] nlz_bits_ret Number of leading zero bits in the most
+ * significant word is returned if not `NULL`.
+ * @exception rb_eTypeError `val` doesn't respond to `#to_int`.
+ * @retval (size_t)-1 Overflowed.
+ * @retval otherwise
+ `((val_numbits * CHAR_BIT + word_numbits - 1) / word_numbits)`,
+ * where val_numbits is the number of bits of `abs(val)`.
+ * @post If `nlz_bits_ret` is not `NULL` and there is no overflow,
+ * `(return_value * word_numbits - val_numbits)` is stored in
+ * `*nlz_bits_ret`. In this case,
+ * `0 <= *nlz_bits_ret < word_numbits.`
+ *
+ */
+size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
+
+/**
+ * Tests `abs(val)` consists only of a bit or not.
+ *
+ * @param[in] val Integer or integer-like object which has
+ * `#to_int` method.
+ * @exception rb_eTypeError `val` doesn't respond to `#to_int`.
+ * @retval 1 `abs(val) == 1 << n` for some `n >= 0`.
+ * @retval 0 Otherwise.
+ *
+ * rb_absint_singlebit_p() can be used to determine required buffer size for
+ * rb_integer_pack() used with #INTEGER_PACK_2COMP (two's complement).
+ *
+ * Following example calculates number of bits required to represent val in
+ * two's complement number, without sign bit.
+ *
+ * ```CXX
+ * size_t size;
+ * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
+ * size = rb_absint_numwords(val, 1, NULL)
+ * if (size == (size_t)-1) ...overflow...
+ * if (neg && rb_absint_singlebit_p(val))
+ * size--;
+ * ```
+ *
+ * Following example calculates number of bytes required to represent val in
+ * two's complement number, with sign bit.
+ *
+ * ```CXX
+ * size_t size;
+ * int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : BIGNUM_NEGATIVE_P(val);
+ * int nlz_bits;
+ * size = rb_absint_size(val, &nlz_bits);
+ * if (nlz_bits == 0 && !(neg && rb_absint_singlebit_p(val)))
+ * size++;
+ * ```
+ */
+int rb_absint_singlebit_p(VALUE val);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_BIGNUM_H */
diff --git a/include/ruby/internal/intern/class.h b/include/ruby/internal/intern/class.h
new file mode 100644
index 0000000000..0fb2d001bc
--- /dev/null
+++ b/include/ruby/internal/intern/class.h
@@ -0,0 +1,394 @@
+#ifndef RBIMPL_INTERN_CLASS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_CLASS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cClass/::rb_cModule.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/backward/2/stdarg.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* class.c */
+
+/**
+ * Creates a new, anonymous class.
+ *
+ * @param[in] super What would become a parent class.
+ * @exception rb_eTypeError `super` is not something inheritable.
+ * @return An anonymous class that inherits `super`.
+ */
+VALUE rb_class_new(VALUE super);
+
+/**
+ * The comment that comes with this function says `:nodoc:`. Not sure what
+ * that means though.
+ *
+ * @param[out] clone Destination object.
+ * @param[in] orig Source object.
+ * @exception rb_eTypeError Cannot copy `orig`.
+ * @return The passed `clone`.
+ */
+VALUE rb_mod_init_copy(VALUE clone, VALUE orig);
+
+/**
+ * Asserts that the given class can derive a child class. A class might or
+ * might not be able to do so; for instance a singleton class cannot.
+ *
+ * @param[in] super Possible super class.
+ * @exception rb_eTypeError No it cannot.
+ * @post Upon successful return `super` can derive.
+ */
+void rb_check_inheritable(VALUE super);
+
+/**
+ * This is a very badly designed API that creates an anonymous class.
+ *
+ * @param[in] id Discarded for no reason (why...).
+ * @param[in] super What would become a parent class. 0 means
+ * ::rb_cObject.
+ * @exception rb_eTypeError `super` is not something inheritable.
+ * @return An anonymous class that inherits `super`.
+ * @warning You must explicitly name the return value.
+ */
+VALUE rb_define_class_id(ID id, VALUE super);
+
+/**
+ * Identical to rb_define_class_under(), except it takes the name in ::ID
+ * instead of C's string.
+ *
+ * @param[out] outer A class which contains the new class.
+ * @param[in] id Name of the new class
+ * @param[in] super A class from which the new class will derive.
+ * 0 means ::rb_cObject.
+ * @exception rb_eTypeError The constant name `id` is already taken but the
+ * constant is not a class.
+ * @exception rb_eTypeError The class is already defined but the class can
+ * not be reopened because its superclass is not
+ * `super`.
+ * @exception rb_eArgError `super` is NULL.
+ * @return The created class.
+ * @post `outer::id` refers the returned class.
+ * @note If a class named `id` is already defined and its superclass is
+ * `super`, the function just returns the defined class.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ */
+VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super);
+
+/**
+ * Creates a new, anonymous module.
+ *
+ * @return An anonymous module.
+ */
+VALUE rb_module_new(void);
+
+
+/**
+ * Creates a new, anonymous refinement.
+ *
+ * @return An anonymous refinement.
+ */
+VALUE rb_refinement_new(void);
+
+/**
+ * This is a very badly designed API that creates an anonymous module.
+ *
+ * @param[in] id Discarded for no reason (why...).
+ * @return An anonymous module.
+ * @warning You must explicitly name the return value.
+ */
+VALUE rb_define_module_id(ID id);
+
+/**
+ * Identical to rb_define_module_under(), except it takes the name in ::ID
+ * instead of C's string.
+ *
+ * @param[out] outer A class which contains the new module.
+ * @param[in] id Name of the new module
+ * @exception rb_eTypeError The constant name `id` is already taken but the
+ * constant is not a module.
+ * @return The created module.
+ * @post `outer::id` refers the returned module.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ */
+VALUE rb_define_module_id_under(VALUE outer, ID id);
+
+/**
+ * Queries the list of included modules. It can also be seen as a routine to
+ * first call rb_mod_ancestors(), then rejects non-modules from the return
+ * value.
+ *
+ * @param[in] mod Class or Module.
+ * @return An array of modules that are either included or prepended in any
+ * of `mod`'s ancestry tree (including itself).
+ */
+VALUE rb_mod_included_modules(VALUE mod);
+
+/**
+ * Queries if the passed module is included by the module. It can also be seen
+ * as a routine to first call rb_mod_included_modules(), then see if the return
+ * value contains the passed module.
+ *
+ * @param[in] child A Module.
+ * @param[in] parent Another Module.
+ * @exception rb_eTypeError `child` is not an instance of ::rb_cModule.
+ * @retval RUBY_Qtrue `parent` is either included or prepended in any
+ * of `child`'s ancestry tree (including itself).
+ * @return RUBY_Qfalse Otherwise.
+ */
+VALUE rb_mod_include_p(VALUE child, VALUE parent);
+
+/**
+ * Queries the module's ancestors. This routine gathers classes and modules
+ * that the passed module either inherits, includes, or prepends, then
+ * recursively applies that routine again and again to the collected entries
+ * until the list doesn't grow up.
+ *
+ * @param[in] mod A module or a class.
+ * @return An array of classes or modules that `mod` possibly recursively
+ * inherits, includes, or prepends.
+ *
+ * @internal
+ *
+ * Above description is written in a recursive language but in practice it
+ * computes the return value iteratively.
+ */
+VALUE rb_mod_ancestors(VALUE mod);
+
+/**
+ * Queries the class's descendants. This routine gathers classes that are
+ * subclasses of the given class (or subclasses of those subclasses, etc.),
+ * returning an array of classes that have the given class as an ancestor.
+ * The returned array does not include the given class or singleton classes.
+ *
+ * @param[in] klass A class.
+ * @return An array of classes where `klass` is an ancestor.
+ *
+ * @internal
+ */
+VALUE rb_class_descendants(VALUE klass);
+
+/**
+ * Queries the class's direct descendants. This routine gathers classes that are
+ * direct subclasses of the given class,
+ * returning an array of classes that have the given class as a superclass.
+ * The returned array does not include singleton classes.
+ *
+ * @param[in] klass A class.
+ * @return An array of classes where `klass` is the `superclass`.
+ *
+ * @internal
+ */
+VALUE rb_class_subclasses(VALUE klass);
+
+
+/**
+ * Returns the attached object for a singleton class.
+ * If the given class is not a singleton class, raises a TypeError.
+ *
+ * @param[in] klass A class.
+ * @return The object which has the singleton class `klass`.
+ *
+ * @internal
+ */
+VALUE rb_class_attached_object(VALUE klass);
+
+/**
+ * Generates an array of symbols, which are the list of method names defined in
+ * the passed class.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Array of at most one object, which controls (if
+ * any) whether the return array includes the names
+ * of methods defined in ancestors or not.
+ * @param[in] mod A module or a class.
+ * @exception rb_eArgError `argc` out of range.
+ * @return An array of symbols collecting names of instance methods that
+ * are not private, defined at `mod`.
+ */
+VALUE rb_class_instance_methods(int argc, const VALUE *argv, VALUE mod);
+
+/**
+ * Identical to rb_class_instance_methods(), except it returns names of methods
+ * that are public only.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Array of at most one object, which controls (if
+ * any) whether the return array includes the names
+ * of methods defined in ancestors or not.
+ * @param[in] mod A module or a class.
+ * @exception rb_eArgError `argc` out of range.
+ * @return An array of symbols collecting names of instance methods that
+ * are public, defined at `mod`.
+ */
+VALUE rb_class_public_instance_methods(int argc, const VALUE *argv, VALUE mod);
+
+/**
+ * Identical to rb_class_instance_methods(), except it returns names of methods
+ * that are protected only.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Array of at most one object, which controls (if
+ * any) whether the return array includes the names
+ * of methods defined in ancestors or not.
+ * @param[in] mod A module or a class.
+ * @exception rb_eArgError `argc` out of range.
+ * @return An array of symbols collecting names of instance methods that
+ * are protected, defined at `mod`.
+ */
+VALUE rb_class_protected_instance_methods(int argc, const VALUE *argv, VALUE mod);
+
+/**
+ * Identical to rb_class_instance_methods(), except it returns names of methods
+ * that are private only.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Array of at most one object, which controls (if
+ * any) whether the return array includes the names
+ * of methods defined in ancestors or not.
+ * @param[in] mod A module or a class.
+ * @exception rb_eArgError `argc` out of range.
+ * @return An array of symbols collecting names of instance methods that
+ * are protected, defined at `mod`.
+ */
+VALUE rb_class_private_instance_methods(int argc, const VALUE *argv, VALUE mod);
+
+/**
+ * Identical to rb_class_instance_methods(), except it returns names of
+ * singleton methods instead of instance methods.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Array of at most one object, which controls (if
+ * any) whether the return array includes the names
+ * of methods defined in ancestors or not.
+ * @param[in] obj Arbitrary ruby object.
+ * @exception rb_eArgError `argc` out of range.
+ * @return An array of symbols collecting names of instance methods that
+ * are not private, defined at the singleton class of `obj`.
+ */
+VALUE rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj);
+
+/**
+ * Identical to rb_define_method(), except it takes the name of the method in
+ * ::ID instead of C's string.
+ *
+ * @param[out] klass A module or a class.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_method_id
+ */
+void rb_define_method_id(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int arity);
+
+/* vm_method.c */
+
+/**
+ * Inserts a method entry that hides previous method definition of the given
+ * name. This is not a deletion of a method. Method of the same name defined
+ * in a parent class is kept invisible in this way.
+ *
+ * @param[out] mod The module to insert an undef.
+ * @param[in] mid Name of the undef.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError No such method named `klass#name`.
+ * @post `klass#name` is undefined.
+ * @see rb_undef_method
+ *
+ * @internal
+ *
+ * @shyouhei doesn't understand why this is not the ::ID -taking variant of
+ * rb_undef_method(), given rb_remove_method() has its ::ID -taking counterpart
+ * named rb_remove_method_id().
+ */
+void rb_undef(VALUE mod, ID mid);
+
+/* class.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_define_method(), except it defines a protected method.
+ *
+ * @param[out] klass A module or a class.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_protected_method
+ */
+void rb_define_protected_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_define_method(), except it defines a private method.
+ *
+ * @param[out] klass A module or a class.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_protected_method
+ */
+void rb_define_private_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_define_method(), except it defines a singleton method.
+ *
+ * @param[out] obj Arbitrary ruby object.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_singleton_method
+ */
+void rb_define_singleton_method(VALUE obj, const char *mid, VALUE(*func)(ANYARGS), int arity);
+
+/**
+ * Finds or creates the singleton class of the passed object.
+ *
+ * @param[out] obj Arbitrary ruby object.
+ * @exception rb_eTypeError `obj` cannot have its singleton class.
+ * @return A (possibly newly allocated) instance of ::rb_cClass.
+ * @post `obj` has its singleton class, which is the return value.
+ * @post In case `obj` is a class, the returned singleton class also has
+ * its own singleton class in order to keep consistency of the
+ * inheritance structure of metaclasses.
+ * @note A new singleton class will be created if `obj` did not have
+ * one.
+ * @note The singleton classes for ::RUBY_Qnil, ::RUBY_Qtrue, and
+ * ::RUBY_Qfalse are ::rb_cNilClass, ::rb_cTrueClass, and
+ * ::rb_cFalseClass respectively.
+ *
+ * @internal
+ *
+ * You can _create_ a singleton class of a frozen object. Intentional or ...?
+ *
+ * Nowadays there are wider range of objects who cannot have singleton classes
+ * than before. For instance some string instances cannot for some reason.
+ */
+VALUE rb_singleton_class(VALUE obj);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_CLASS_H */
diff --git a/include/ruby/internal/intern/compar.h b/include/ruby/internal/intern/compar.h
new file mode 100644
index 0000000000..dc3b377b01
--- /dev/null
+++ b/include/ruby/internal/intern/compar.h
@@ -0,0 +1,62 @@
+#ifndef RBIMPL_INTERN_COMPAR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_COMPAR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_mComparable.
+ */
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* bignum.c */
+
+/**
+ * Canonicalises the passed `val`, which is the return value of `a <=> b`, into
+ * C's `{-1, 0, 1}`. This can be handy when you implement a callback function
+ * to pass to `qsort(3)` etc.
+ *
+ * @param[in] val Return value of a space ship operator.
+ * @param[in] a Comparison LHS.
+ * @param[in] b Comparison RHS.
+ * @exception rb_eArgError `a` and `b` are not comparable each other.
+ * @retval -1 `val` is less than zero.
+ * @retval 0 `val` is equal to zero.
+ * @retval 1 `val` is greater than zero.
+ */
+int rb_cmpint(VALUE val, VALUE a, VALUE b);
+
+/* compar.c */
+
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NORETURN()
+/**
+ * Raises "comparison failed" error.
+ *
+ * @param[in] a Comparison LHS.
+ * @param[in] b Comparison RHS.
+ * @exception rb_eArgError `a` and `b` are not comparable each other.
+ */
+void rb_cmperr(VALUE a, VALUE b);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_COMPAR_H */
diff --git a/include/ruby/internal/intern/complex.h b/include/ruby/internal/intern/complex.h
new file mode 100644
index 0000000000..e111bd8ced
--- /dev/null
+++ b/include/ruby/internal/intern/complex.h
@@ -0,0 +1,253 @@
+#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_COMPLEX_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cComplex.
+ */
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* complex.c */
+
+/**
+ * Identical to rb_complex_new(), except it assumes both arguments are not
+ * instances of ::rb_cComplex. It is thus dangerous for extension libraries.
+ *
+ * @param[in] real Real part, in any numeric except Complex.
+ * @param[in] imag Imaginary part, in any numeric except Complex.
+ * @return An instance of ::rb_cComplex whose value is `real + (imag)i`.
+ */
+VALUE rb_complex_raw(VALUE real, VALUE imag);
+
+/**
+ * Shorthand of `x+0i`. It practically converts `x` into a Complex of the
+ * identical value.
+ *
+ * @param[in] x Any numeric except Complex.
+ * @return An instance of ::rb_cComplex, whose value is `x + 0i`.
+ */
+#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
+
+/** @alias{rb_complex_raw} */
+#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
+
+/**
+ * Constructs a Complex, by first multiplying the imaginary part with `1i` then
+ * adds it to the real part. This definition doesn't need both arguments be
+ * real numbers. It can happily combine two instances of ::rb_cComplex (with
+ * rotating the latter one).
+ *
+ * @param[in] real An instance of ::rb_cNumeric.
+ * @param[in] imag Another instance of ::rb_cNumeric.
+ * @return An instance of ::rb_cComplex whose value is `imag * 1i + real`.
+ */
+VALUE rb_complex_new(VALUE real, VALUE imag);
+
+/**
+ * Shorthand of `x+0i`. It practically converts `x` into a Complex of the
+ * identical value.
+ *
+ * @param[in] x Any numeric value.
+ * @return An instance of ::rb_cComplex, whose value is `x + 0i`.
+ */
+#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
+
+/** @alias{rb_complex_new} */
+#define rb_complex_new2(x,y) rb_complex_new((x), (y))
+
+/**
+ * Constructs a Complex using polar representations. Unlike rb_complex_new()
+ * it makes no sense to pass non-real instances to this function.
+ *
+ * @param[in] abs Magnitude, in any numeric except Complex.
+ * @param[in] arg Angle, in radians, in any numeric except Complex.
+ * @return An instance of ::rb_cComplex which denotes the given polar
+ * coordinates.
+ */
+VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
+
+RBIMPL_ATTR_DEPRECATED(("by: rb_complex_new_polar"))
+/** @old{rb_complex_new_polar} */
+VALUE rb_complex_polar(VALUE abs, VALUE arg);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the real part of the passed Complex.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return Its real part, which is an instance of ::rb_cNumeric.
+ */
+VALUE rb_complex_real(VALUE z);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the imaginary part of the passed Complex.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return Its imaginary part, which is an instance of ::rb_cNumeric.
+ */
+VALUE rb_complex_imag(VALUE z);
+
+/**
+ * Performs addition of the passed two objects.
+ *
+ * @param[in] x An instance of ::rb_cComplex.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x + y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_complex_plus(VALUE x, VALUE y);
+
+/**
+ * Performs subtraction of the passed two objects.
+ *
+ * @param[in] x An instance of ::rb_cComplex.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x - y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_complex_minus(VALUE x, VALUE y);
+
+/**
+ * Performs multiplication of the passed two objects.
+ *
+ * @param[in] x An instance of ::rb_cComplex.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x * y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_complex_mul(VALUE x, VALUE y);
+
+/**
+ * Performs division of the passed two objects.
+ *
+ * @param[in] x An instance of ::rb_cComplex.
+ * @param[in] y Arbitrary ruby object.
+ * @return What `x / y` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_complex_div(VALUE x, VALUE y);
+
+/**
+ * Performs negation of the passed object.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return What `-z` evaluates to.
+ */
+VALUE rb_complex_uminus(VALUE z);
+
+/**
+ * Performs complex conjugation of the passed object.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return Its complex conjugate, in ::rb_cComplex.
+ */
+VALUE rb_complex_conjugate(VALUE z);
+
+/**
+ * Queries the absolute (or the magnitude) of the passed object.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return Its magnitude, in ::rb_cFloat.
+ */
+VALUE rb_complex_abs(VALUE z);
+
+/**
+ * Queries the argument (or the angle) of the passed object.
+ *
+ * @param[in] z An instance of ::rb_cComplex.
+ * @return Its magnitude, in ::rb_cFloat.
+ */
+VALUE rb_complex_arg(VALUE z);
+
+/**
+ * Performs exponentiation of the passed two objects.
+ *
+ * @param[in] base An instance of ::rb_cComplex.
+ * @param[in] exp Arbitrary ruby object.
+ * @return What `base ** exp` evaluates to.
+ * @see rb_num_coerce_bin()
+ */
+VALUE rb_complex_pow(VALUE base, VALUE exp);
+
+/**
+ * Identical to rb_complex_new(), except it takes the arguments as C's double
+ * instead of Ruby's object.
+ *
+ * @param[in] real Real part.
+ * @param[in] imag Imaginary part.
+ * @return An instance of ::rb_cComplex whose value is `real + (imag)i`.
+ */
+VALUE rb_dbl_complex_new(double real, double imag);
+
+/** @alias{rb_complex_plus} */
+#define rb_complex_add rb_complex_plus
+
+/** @alias{rb_complex_minus} */
+#define rb_complex_sub rb_complex_minus
+
+/** @alias{rb_complex_uminus} */
+#define rb_complex_nagate rb_complex_uminus
+
+/**
+ * Converts various values into a Complex. This function accepts:
+ *
+ * - Instances of ::rb_cComplex (taken as-is),
+ * - Instances of ::rb_cNumeric (adds `0i`),
+ * - Instances of ::rb_cString (parses),
+ * - Other objects that respond to `#to_c`.
+ *
+ * It (possibly recursively) applies `#to_c` until both sides become a Complex
+ * value, then computes `imag * 1i + real`.
+ *
+ * As a special case, passing ::RUBY_Qundef to `imag` is the same as passing
+ * `RB_INT2NUM(0)`.
+ *
+ * @param[in] real Real part (see above).
+ * @param[in] imag Imaginary part (see above).
+ * @exception rb_eTypeError Passed something not described above.
+ * @return An instance of ::rb_cComplex whose value is `1i * imag + real`.
+ *
+ * @internal
+ *
+ * This was the implementation of `Kernel#Complex` before, but they diverged.
+ */
+VALUE rb_Complex(VALUE real, VALUE imag);
+
+/**
+ * Shorthand of `x+0i`. It practically converts `x` into a Complex of the
+ * identical value.
+ *
+ * @param[in] x ::rb_cNumeric, ::rb_cString, or something that responds to
+ * `#to_c`.
+ * @return An instance of ::rb_cComplex, whose value is `x + 0i`.
+ */
+#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
+
+/** @alias{rb_Complex} */
+#define rb_Complex2(x,y) rb_Complex((x), (y))
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_COMPLEX_H */
diff --git a/include/ruby/internal/intern/cont.h b/include/ruby/internal/intern/cont.h
new file mode 100644
index 0000000000..32647f48aa
--- /dev/null
+++ b/include/ruby/internal/intern/cont.h
@@ -0,0 +1,282 @@
+#ifndef RBIMPL_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_CONT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to rb_cFiber.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/iterator.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* cont.c */
+
+/**
+ * Creates a Fiber instance from a C-backended block.
+ *
+ * @param[in] func A function, to become the fiber's body.
+ * @param[in] callback_obj Passed as-is to `func`.
+ * @return An allocated new instance of rb_cFiber, which is ready to be
+ * "resume"d.
+ */
+VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj);
+
+/**
+ * Creates a Fiber instance from a C-backended block with the specified
+ * storage.
+ *
+ * If the given storage is Qundef or Qtrue, this function is equivalent to
+ * rb_fiber_new() which inherits storage from the current fiber.
+ *
+ * Specifying Qtrue is experimental and may be changed in the future.
+ *
+ * If the given storage is Qnil, this function will lazy initialize the
+ * internal storage which starts of empty (without any inheritance).
+ *
+ * Otherwise, the given storage is used as the internal storage.
+ *
+ * @param[in] func A function, to become the fiber's body.
+ * @param[in] callback_obj Passed as-is to `func`.
+ * @param[in] storage The way to set up the storage for the fiber.
+ * @return An allocated new instance of rb_cFiber, which is ready to be
+ * "resume"d.
+ */
+VALUE rb_fiber_new_storage(rb_block_call_func_t func, VALUE callback_obj, VALUE storage);
+
+/**
+ * Queries the fiber which is calling this function. Any ruby execution
+ * context has its fiber, either explicitly or implicitly.
+ *
+ * @return The current fiber.
+ */
+VALUE rb_fiber_current(void);
+
+/**
+ * Queries the liveness of the passed fiber. "Alive" in this context means
+ * that the fiber can still be resumed. Once it reaches is its end of
+ * execution, this function returns ::RUBY_Qfalse.
+ *
+ * @param[in] fiber A target fiber.
+ * @retval RUBY_Qtrue It is.
+ * @retval RUBY_Qfalse It isn't.
+ */
+VALUE rb_fiber_alive_p(VALUE fiber);
+
+/**
+ * Queries if an object is a fiber.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @retval RUBY_Qtrue It is.
+ * @retval RUBY_Qfalse It isn't.
+ */
+VALUE rb_obj_is_fiber(VALUE obj);
+
+/**
+ * Resumes the execution of the passed fiber, either from the point at which
+ * the last rb_fiber_yield() was called if any, or at the beginning of the
+ * fiber body if it is the first call to this function.
+ *
+ * Other arguments are passed into the fiber's body, either as return values of
+ * rb_fiber_yield() in case it switches to there, or as the block parameter of
+ * the fiber body if it switches to the beginning of the fiber.
+ *
+ * The return value of this function is either the value passed to previous
+ * rb_fiber_yield() call, or the ultimate evaluated value of the entire fiber
+ * body if the execution reaches the end of it.
+ *
+ * When an exception happens inside of a fiber it propagates to this function.
+ *
+ * ```ruby
+ * f = Fiber.new do |i|
+ * puts "<x> =>> #{i}"
+ * puts "<y> <-- #{i + 1}"
+ * j = Fiber.yield(i + 1)
+ * puts "<z> =>> #{j}"
+ * puts "<w> <-- #{j + 1}"
+ * next j + 1
+ * end
+ *
+ * puts "[a] <-- 1"
+ * p = f.resume(1)
+ * puts "[b] =>> #{p}"
+ * puts "[c] <-- #{p + 1}"
+ * q = f.resume(p + 1)
+ * puts "[d] =>> #{q}"
+ * ```
+ *
+ * Above program executes in `[a] <x> <y> [b] [c] <z> <w> [d]`.
+ *
+ * @param[out] fiber The fiber to resume.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed (somehow) to `fiber`.
+ * @exception rb_eFiberError `fib` is terminated etc.
+ * @exception rb_eException Any exceptions happen in `fiber`.
+ * @return (See above)
+ * @note This function _does_ return.
+ *
+ * @internal
+ *
+ * @shyouhei expected this function to raise ::rb_eFrozenError for frozen
+ * fibers but it doesn't in practice. Intentional or ...?
+ */
+VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_fiber_resume(), except you can specify how to handle the
+ * last element of the given array.
+ *
+ * @param[out] fiber The fiber to resume.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed (somehow) to `fiber`.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eFiberError `fiber` is terminated etc.
+ * @exception rb_eException Any exceptions happen in `fiber`.
+ * @return Either what was yielded or the last value of the fiber body.
+ */
+VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * Yields the control back to the point where the current fiber was resumed.
+ * The passed objects would be the return value of rb_fiber_resume(). This
+ * fiber then suspends its execution until next time it is resumed.
+ *
+ * This function can also raise arbitrary exceptions injected from outside of
+ * the fiber using rb_fiber_raise().
+ *
+ * ```ruby
+ * exc = Class.new Exception
+ *
+ * f = Fiber.new do
+ * Fiber.yield
+ * rescue exc => e
+ * puts e.message
+ * end
+ *
+ * f.resume
+ * f.raise exc, "Hi!"
+ * ```
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed to rb_fiber_resume().
+ * @exception rb_eException (See above)
+ * @return (See rb_fiber_resume() for details)
+ */
+VALUE rb_fiber_yield(int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_fiber_yield(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed to rb_fiber_resume().
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eException What was raised using `Fiber#raise`.
+ * @return (See rb_fiber_resume() for details)
+ */
+VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * Transfers control to another fiber, resuming it from where it last stopped
+ * or starting it if it was not resumed before. The calling fiber will be
+ * suspended much like in a call to rb_fiber_yield().
+ *
+ * The fiber which receives the transfer call treats it much like a resume
+ * call. Arguments passed to transfer are treated like those passed to resume.
+ *
+ * The two style of control passing to and from fiber (one is rb_fiber_resume()
+ * and rb_fiber_yield(), another is rb_fiber_transfer() to and from fiber)
+ * can't be freely mixed.
+ *
+ * - If the Fiber's lifecycle had started with transfer, it will never be
+ * able to yield or be resumed control passing, only finish or transfer
+ * back. (It still can resume other fibers that are allowed to be
+ * resumed.)
+ *
+ * - If the Fiber's lifecycle had started with resume, it can yield or
+ * transfer to another Fiber, but can receive control back only the way
+ * compatible with the way it was given away: if it had transferred, it
+ * only can be transferred back, and if it had yielded, it only can be
+ * resumed back. After that, it again can transfer or yield.
+ *
+ * If those rules are broken, rb_eFiberError is raised.
+ *
+ * For an individual Fiber design, yield/resume is easier to use (the Fiber
+ * just gives away control, it doesn't need to think about who the control is
+ * given to), while transfer is more flexible for complex cases, allowing to
+ * build arbitrary graphs of Fibers dependent on each other.
+ *
+ * @param[out] fiber Explicit control destination.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed to rb_fiber_resume().
+ * @exception rb_eFiberError (See above)
+ * @exception rb_eException What was raised using `Fiber#raise`.
+ * @return (See rb_fiber_resume() for details)
+ */
+VALUE rb_fiber_transfer(VALUE fiber, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_fiber_transfer(), except you can specify how to handle the
+ * last element of the given array.
+ *
+ * @param[out] fiber Explicit control destination.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed to rb_fiber_resume().
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eFiberError (See above)
+ * @exception rb_eException What was raised using `Fiber#raise`.
+ * @return (See rb_fiber_resume() for details)
+ */
+VALUE rb_fiber_transfer_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * Identical to rb_fiber_resume() but instead of resuming normal execution of
+ * the passed fiber, it raises the given exception in it. From inside of the
+ * fiber this would be seen as if rb_fiber_yield() raised.
+ *
+ * This function does return in case the passed fiber gracefully handled the
+ * passed exception. But if it does not, the raised exception propagates out
+ * of the passed fiber; this function then does not return.
+ *
+ * Parameters are passed to rb_make_exception() to create an exception object.
+ * See its document for what are allowed here.
+ *
+ * It is a failure to call this function against a fiber which is resuming,
+ * have never run yet, or has already finished running.
+ *
+ * @param[out] fiber Where exception is raised.
+ * @param[in] argc Passed as-is to rb_make_exception().
+ * @param[in] argv Passed as-is to rb_make_exception().
+ * @exception rb_eFiberError `fiber` is terminated etc.
+ * @return (See rb_fiber_resume() for details)
+ */
+VALUE rb_fiber_raise(VALUE fiber, int argc, const VALUE *argv);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_CONT_H */
diff --git a/include/ruby/internal/intern/dir.h b/include/ruby/internal/intern/dir.h
new file mode 100644
index 0000000000..da1873e068
--- /dev/null
+++ b/include/ruby/internal/intern/dir.h
@@ -0,0 +1,42 @@
+#ifndef RBIMPL_INTERN_DIR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_DIR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cDir.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* dir.c */
+
+/**
+ * Queries the path of the current working directory of the current process.
+ *
+ * @return An instance of ::rb_cString that holds the working directory.
+ * @note The returned string is in "filesystem" encoding. Most notably on
+ * Linux this is an alias of default external encoding. Most notably
+ * on Windows it can be an alias of OS codepage.
+ */
+VALUE rb_dir_getwd(void);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_DIR_H */
diff --git a/include/ruby/internal/intern/enum.h b/include/ruby/internal/intern/enum.h
new file mode 100644
index 0000000000..215ad82672
--- /dev/null
+++ b/include/ruby/internal/intern/enum.h
@@ -0,0 +1,73 @@
+#ifndef RBIMPL_INTERN_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ENUM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_mEnumerable.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* enum.c */
+
+/**
+ * Basically identical to rb_ary_new_form_values(), except it returns something
+ * different when `argc` < 2.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary objects.
+ * @retval RUBY_Qnil `argc` is zero.
+ * @retval argv[0] `argc` is one.
+ * @retval otherwise Otherwise.
+ *
+ * @internal
+ *
+ * What is this business? Well, this function is about `yield`'s taking
+ * multiple values. Consider following user-defined class:
+ *
+ * ```ruby
+ * class Foo
+ * include Enumerable
+ *
+ * def each
+ * yield :q, :w, :e, :r
+ * end
+ * end
+ *
+ * Foo.new.each_with_object([]) do |i, j|
+ * j << i # ^^^ <- What to expect for `i`?
+ * end
+ * ```
+ *
+ * Here, `Foo#each_with_object` is in fact `Enumerable#each_with_object`, which
+ * doesn't know what would be yielded. Yet, it has to take a block of arity 2.
+ * This function is used here, to "pack" arbitrary number of yielded objects
+ * into one.
+ *
+ * If people want to implement their own `Enumerable#each_with_object` this API
+ * can be handy. Though @shyouhei suspects it is relatively rare for 3rd party
+ * extension libraries to have such things. Also `Enumerable#each_entry` is
+ * basically this function exposed as a Ruby method.
+ */
+VALUE rb_enum_values_pack(int argc, const VALUE *argv);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_ENUM_H */
diff --git a/include/ruby/internal/intern/enumerator.h b/include/ruby/internal/intern/enumerator.h
new file mode 100644
index 0000000000..20e5d7c6fc
--- /dev/null
+++ b/include/ruby/internal/intern/enumerator.h
@@ -0,0 +1,259 @@
+#ifndef RBIMPL_INTERN_ENUMERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ENUMERATOR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cEnumerator.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/intern/eval.h" /* rb_frame_this_func */
+#include "ruby/internal/iterator.h" /* rb_block_given_p */
+#include "ruby/internal/symbol.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * This is the type of functions that rb_enumeratorize_with_size() expects. In
+ * theory an enumerator can have indefinite number of elements, but in practice
+ * it often is the case we can compute the size of an enumerator beforehand.
+ * If your enumerator has such property, supply a function that calculates such
+ * values.
+ *
+ * @param[in] recv The original receiver of the enumerator.
+ * @param[in] argv Arguments passed to `Object#enum_for` etc.
+ * @param[in] eobj The enumerator object.
+ * @return The size of `eobj`, in ::rb_cNumeric, or ::RUBY_Qnil if the size
+ * is not known until we actually iterate.
+ */
+typedef VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj);
+
+/**
+ * Decomposed `Enumerator::ArithmeicSequence`. This is a subclass of
+ * ::rb_cEnumerator, which represents a sequence of numbers with common
+ * difference. Internal data structure of the class is opaque to users, but
+ * you can obtain a decomposed one using rb_arithmetic_sequence_extract().
+ */
+typedef struct {
+ VALUE begin; /**< "Left" or "lowest" endpoint of the sequence. */
+ VALUE end; /**< "Right" or "highest" endpoint of the sequence.*/
+ VALUE step; /**< Step between a sequence. */
+ int exclude_end; /**< Whether the endpoint is open or closed. */
+} rb_arithmetic_sequence_components_t;
+
+/* enumerator.c */
+
+/**
+ * Constructs an enumerator. This roughly resembles `Object#enum_for`.
+ *
+ * @param[in] recv A receiver of `meth`.
+ * @param[in] meth Method ID in a symbol object.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to `meth`.
+ * @exception rb_eTypeError `meth` is not an instance of ::rb_cSymbol.
+ * @return A new instance of ::rb_cEnumerator which, when yielded,
+ * enumerates by calling `meth` on `recv` with `argv`.
+ */
+VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_enumeratorize(), except you can additionally specify the
+ * size function of return value.
+ *
+ * @param[in] recv A receiver of `meth`.
+ * @param[in] meth Method ID in a symbol object.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to `meth`.
+ * @param[in] func Size calculator.
+ * @exception rb_eTypeError `meth` is not an instance of ::rb_cSymbol.
+ * @return A new instance of ::rb_cEnumerator which, when yielded,
+ * enumerates by calling `meth` on `recv` with `argv`.
+ * @note `func` can be zero, which means the size is unknown.
+ */
+VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func);
+
+/**
+ * Identical to rb_enumeratorize_with_func(), except you can specify how to
+ * handle the last element of the given array.
+ *
+ * @param[in] recv A receiver of `meth`.
+ * @param[in] meth Method ID in a symbol object.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to `meth`.
+ * @param[in] func Size calculator.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eTypeError `meth` is not an instance of ::rb_cSymbol.
+ * @return A new instance of ::rb_cEnumerator which, when yielded,
+ * enumerates by calling `meth` on `recv` with `argv`.
+ * @note `func` can be zero, which means the size is unknown.
+ */
+VALUE rb_enumeratorize_with_size_kw(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func, int kw_splat);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Extracts components of the passed arithmetic sequence. This can be seen as
+ * an extended version of rb_range_values().
+ *
+ * @param[in] as Target instance of `Enumerator::ArithmericSequence`.
+ * @param[out] buf Decomposed results buffer.
+ * @return 0 `as` is not `Enumerator::ArithmericSequence`.
+ * @return 1 Success.
+ * @post `buf` is filled.
+ */
+int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_range_beg_len(), except it takes an instance of
+ * `Enumerator::ArithmericSequence`.
+ *
+ * @param[in] as An `Enumerator::ArithmericSequence` instance.
+ * @param[out] begp Return value buffer.
+ * @param[out] lenp Return value buffer.
+ * @param[out] stepp Return value buffer.
+ * @param[in] len Updated length.
+ * @param[in] err In case `len` is out of range...
+ * - `0`: returns ::RUBY_Qnil.
+ * - `1`: raises ::rb_eRangeError.
+ * - `2`: `beg` and `len` expanded accordingly.
+ * @exception rb_eRangeError `as` cannot fit into `long`.
+ * @retval RUBY_Qfalse `as` is not `Enumerator::ArithmericSequence`.
+ * @retval RUBY_Qnil `len` is out of `as` but `err` is zero.
+ * @retval RUBY_Qtrue Otherwise.
+ * @post `beg` is the (possibly updated) left endpoint.
+ * @post `len` is the (possibly updated) length of the range.
+ *
+ * @internal
+ *
+ * Currently no 3rd party applications of this function is found. But that can
+ * be because this function is relatively new.
+ */
+VALUE rb_arithmetic_sequence_beg_len_step(VALUE as, long *begp, long *lenp, long *stepp, long len, int err);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/** @cond INTERNAL_MACRO */
+#ifndef RUBY_EXPORT
+# define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
+ rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
+# define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) \
+ rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat)
+#endif
+/** @endcond */
+
+/**
+ * This is an implementation detail of #RETURN_SIZED_ENUMERATOR(). You could
+ * use it directly, but can hardly be handy.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @param[in] size_fn Size calculator.
+ * @return A new instance of ::rb_cEnumerator which, when yielded,
+ * enumerates by calling the current method on `recv` with `argv`.
+ */
+#define SIZED_ENUMERATOR(obj, argc, argv, size_fn) \
+ rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \
+ (argc), (argv), (size_fn))
+
+/**
+ * This is an implementation detail of #RETURN_SIZED_ENUMERATOR_KW(). You
+ * could use it directly, but can hardly be handy.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @param[in] size_fn Size calculator.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @return A new instance of ::rb_cEnumerator which, when yielded,
+ * enumerates by calling the current method on `recv` with `argv`.
+ */
+#define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \
+ rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), \
+ (argc), (argv), (size_fn), (kw_splat))
+
+/**
+ * This roughly resembles `return enum_for(__callee__) unless block_given?`.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @param[in] size_fn Size calculator.
+ * @note This macro may return inside.
+ */
+#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
+ if (!rb_block_given_p()) \
+ return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \
+ } while (0)
+
+
+/**
+ * Identical to #RETURN_SIZED_ENUMERATOR(), except you can specify how to
+ * handle the last element of the given array.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @param[in] size_fn Size calculator.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @note This macro may return inside.
+ */
+#define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \
+ if (!rb_block_given_p()) \
+ return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); \
+ } while (0)
+
+/**
+ * Identical to #RETURN_SIZED_ENUMERATOR(), except its size is unknown.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @note This macro may return inside.
+ */
+#define RETURN_ENUMERATOR(obj, argc, argv) \
+ RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
+
+/**
+ * Identical to #RETURN_SIZED_ENUMERATOR_KW(), except its size is unknown. It
+ * can also be seen as a routine identical to #RETURN_ENUMERATOR(), except you
+ * can specify how to handle the last element of the given array.
+ *
+ * @param[in] obj A receiver.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to the current method.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @note This macro may return inside.
+ */
+#define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) \
+ RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
+
+#endif /* RBIMPL_INTERN_ENUMERATOR_H */
diff --git a/include/ruby/internal/intern/error.h b/include/ruby/internal/intern/error.h
new file mode 100644
index 0000000000..9c153cbac5
--- /dev/null
+++ b/include/ruby/internal/intern/error.h
@@ -0,0 +1,287 @@
+#ifndef RBIMPL_INTERN_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ERROR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_eException.
+ */
+#include "ruby/internal/attr/format.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/backward/2/assume.h"
+
+/**
+ * This macro is used in conjunction with rb_check_arity(). If you pass it to
+ * the function's last (max) argument, that means the function does not check
+ * upper limit.
+ */
+#define UNLIMITED_ARGUMENTS (-1)
+
+#define rb_exc_new2 rb_exc_new_cstr /**< @old{rb_exc_new_cstr} */
+#define rb_exc_new3 rb_exc_new_str /**< @old{rb_exc_new_str} */
+
+/** @cond INTERNAL_MACRO */
+#define rb_check_arity rb_check_arity
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* error.c */
+
+/**
+ * Creates an instance of the passed exception class.
+ *
+ * @param[in] etype A subclass of ::rb_eException.
+ * @param[in] ptr Buffer contains error message.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eTypeError `etype` is not a class.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of `etype`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ *
+ * @internal
+ *
+ * This function works for non-exception classes as well, as long as they take
+ * one string argument.
+ */
+VALUE rb_exc_new(VALUE etype, const char *ptr, long len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_exc_new(), except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[in] etype A subclass of ::rb_eException.
+ * @param[in] str A C string (becomes an error message).
+ * @exception rb_eTypeError `etype` is not a class.
+ * @return An instance of `etype`.
+ */
+VALUE rb_exc_new_cstr(VALUE etype, const char *str);
+
+/**
+ * Identical to rb_exc_new_cstr(), except it takes a Ruby's string instead of
+ * C's.
+ *
+ * @param[in] etype A subclass of ::rb_eException.
+ * @param[in] str An instance of ::rb_cString.
+ * @exception rb_eTypeError `etype` is not a class.
+ * @return An instance of `etype`.
+ */
+VALUE rb_exc_new_str(VALUE etype, VALUE str);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Raises an instance of ::rb_eLoadError.
+ *
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eLoadError Always raises this.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * Who needs this? Except ruby itself?
+ */
+void rb_loaderror(const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_loaderror(), except it additionally takes which file is
+ * unable to load. The path can be obtained later using `LoadError#path` of
+ * the raising exception.
+ *
+ * @param[in] path What failed.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eLoadError Always raises this.
+ * @note It never returns.
+ */
+void rb_loaderror_with_path(VALUE path, const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Raises an instance of ::rb_eNameError. The name can be obtained later using
+ * `NameError#name` of the raising exception.
+ *
+ * @param[in] name What failed.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eNameError Always raises this.
+ * @note It never returns.
+ */
+void rb_name_error(ID name, const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_name_error(), except it takes a ::VALUE instead of ::ID.
+ *
+ * @param[in] name What failed.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eNameError Always raises this.
+ * @note It never returns.
+ */
+void rb_name_error_str(VALUE name, const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Raises an instance of ::rb_eFrozenError. The object can be obtained later
+ * using `FrozenError#receiver` of the raising exception.
+ *
+ * @param[in] recv What is frozen.
+ * @param[in] fmt Format specifier string compatible with rb_sprintf().
+ * @exception rb_eFrozenError Always raises this.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * Note however, that it is often not possible to inspect a frozen object,
+ * because the inspection itself could be forbidden by the frozen-ness.
+ */
+void rb_frozen_error_raise(VALUE recv, const char *fmt, ...);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Honestly I don't understand the name, but it raises an instance of
+ * ::rb_eArgError.
+ *
+ * @param[in] str A message.
+ * @param[in] type Another message.
+ * @exception rb_eArgError Always raises this.
+ * @note It never returns.
+ */
+void rb_invalid_str(const char *str, const char *type);
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_frozen_error_raise(), except its raising exception has a
+ * message like "can't modify frozen /what/".
+ *
+ * @param[in] what What was frozen.
+ * @exception rb_eFrozenError Always raises this.
+ * @note It never returns.
+ */
+void rb_error_frozen(const char *what);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_error_frozen(), except it takes arbitrary Ruby object
+ * instead of C's string.
+ *
+ * @param[in] what What was frozen.
+ * @exception rb_eFrozenError Always raises this.
+ * @note It never returns.
+ */
+void rb_error_frozen_object(VALUE what);
+
+/**
+ * Queries if the passed object is frozen.
+ *
+ * @param[in] obj Target object to test frozen-ness.
+ * @exception rb_eFrozenError It is frozen.
+ * @post Upon successful return it is guaranteed _not_ frozen.
+ */
+void rb_check_frozen(VALUE obj);
+
+/**
+ * Ensures that the passed object can be `initialize_copy` relationship. When
+ * you implement your own one you would better call this at the right beginning
+ * of your implementation.
+ *
+ * @param[in] obj Destination object.
+ * @param[in] orig Source object.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @post Upon successful return obj is guaranteed safe to copy orig.
+ */
+void rb_check_copyable(VALUE obj, VALUE orig);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_scan_args(). You don't have to
+ * bother.
+ *
+ * @pre `argc` is out of range of `min`..`max`, both inclusive.
+ * @param[in] argc Arbitrary integer.
+ * @param[in] min Minimum allowed `argc`.
+ * @param[in] max Maximum allowed `argc`.
+ * @exception rb_eArgError Always.
+ */
+MJIT_STATIC void rb_error_arity(int argc, int min, int max);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * @deprecated
+ *
+ * Does anyone use this? Remain not deleted for compatibility.
+ */
+#define rb_check_frozen_internal(obj) do { \
+ VALUE frozen_obj = (obj); \
+ if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \
+ rb_error_frozen_object(frozen_obj); \
+ } \
+ } while (0)
+
+/** @alias{rb_check_frozen} */
+static inline void
+rb_check_frozen_inline(VALUE obj)
+{
+ if (RB_UNLIKELY(RB_OBJ_FROZEN(obj))) {
+ rb_error_frozen_object(obj);
+ }
+}
+
+/** @alias{rb_check_frozen} */
+#define rb_check_frozen rb_check_frozen_inline
+
+/**
+ * Ensures that the passed integer is in the passed range. When you can use
+ * rb_scan_args() that is preferred over this one (powerful, descriptive). But
+ * it can have its own application area.
+ *
+ * @param[in] argc Arbitrary integer.
+ * @param[in] min Minimum allowed `argv`.
+ * @param[in] max Maximum allowed `argv`, or `UNLIMITED_ARGUMENTS`.
+ * @exception rb_eArgError `argc` out of range.
+ * @return The passed `argc`.
+ * @post Upon successful return `argc` is in range of `min`..`max`, both
+ * inclusive.
+ */
+static inline int
+rb_check_arity(int argc, int min, int max)
+{
+ if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max))
+ rb_error_arity(argc, min, max);
+ return argc;
+}
+
+#endif /* RBIMPL_INTERN_ERROR_H */
diff --git a/include/ruby/internal/intern/eval.h b/include/ruby/internal/intern/eval.h
new file mode 100644
index 0000000000..2230f7ab0c
--- /dev/null
+++ b/include/ruby/internal/intern/eval.h
@@ -0,0 +1,222 @@
+#ifndef RBIMPL_INTERN_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_EVAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Pre-1.9 era evaluator APIs (now considered miscellaneous).
+ */
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* eval.c */
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_raise(), except it raises the passed exception instance as-
+ * is instead of creating new one.
+ *
+ * @param[in] exc An instance of a subclass of ::rb_eException.
+ * @exception exc What is passed.
+ * @exception rb_eTypeError `exc` is not an exception.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * Wellll actually, it can take more than what is described above. This
+ * function tries to call `exception` method of the passed object. If that
+ * function returns an exception object that is used instead.
+ */
+void rb_exc_raise(VALUE exc);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_fatal(), except it raises the passed exception instance as-
+ * is instead of creating new one.
+ *
+ * @param[in] exc An instance of a subclass of ::rb_eException.
+ * @exception exc What is passed.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * You know what...? Using this API you can make arbitrary exceptions, like
+ * `RuntimeError`, that doesn't interface with `rescue` clause. This is very
+ * confusing.
+ */
+void rb_exc_fatal(VALUE exc);
+
+/* process.c */
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_exit(), except how arguments are passed.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Contains at most one of the following:
+ * - ::RUBY_Qtrue - means `EXIT_SUCCESS`.
+ * - ::RUBY_Qfalse - means `EXIT_FAILURE`.
+ * - Numerical value - takes that value.
+ * @exception rb_eArgError Wrong `argc`.
+ * @exception rb_eSystemExit Exception representing the exit status.
+ * @note It never returns.
+ */
+VALUE rb_f_exit(int argc, const VALUE *argv);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * This is similar to rb_f_exit(). In fact on some situation it internally
+ * calls rb_exit(). But can be very esoteric on occasions.
+ *
+ * It takes up to one argument. If an argument is passed, it tries to display
+ * that. Otherwise if there is `$!`, displays that exception instead. It
+ * finally raise ::rb_eSystemExit in both cases.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Contains at most one string-ish object.
+ * @exception rb_eArgError Wrong `argc`.
+ * @exception rb_eTypeError No conversion from `argv[0]` to String.
+ * @exception rb_eSystemExit Exception representing `EXIT_FAILURE`.
+ * @note It never returns.
+ */
+VALUE rb_f_abort(int argc, const VALUE *argv);
+
+/* eval.c*/
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Raises an instance of ::rb_eInterrupt.
+ *
+ * @exception rb_eInterrupt Always raises this exception.
+ * @note It never returns.
+ */
+void rb_interrupt(void);
+
+/**
+ * Queries the name of the Ruby level method that is calling this function.
+ * The "name" in this context is the one assigned to the function for the first
+ * time (note that methods can have multiple names via aliases).
+ *
+ * @retval 0 There is no method (e.g. toplevel context).
+ * @retval otherwise The name of the current method.
+ */
+ID rb_frame_this_func(void);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * This function is to re-throw global escapes. Such global escapes include
+ * exceptions, `throw`, `break`, for example.
+ *
+ * It makes sense only when used in conjunction with "protect" series APIs
+ * e.g. rb_protect(), rb_load_protect(), rb_eval_string_protect(), etc. In
+ * case these functions experience global escapes, they fill their opaque
+ * `state` return buffer. You can ignore such escapes. But if you decide
+ * otherwise, you have to somehow escape globally again. This function is used
+ * for that purpose.
+ *
+ * @param[in] state Opaque state of execution.
+ * @note It never returns.
+ *
+ * @internal
+ *
+ * Though not a part of our public API, `state` is in fact an enum
+ * ruby_tag_type. You can see the potential values by looking at vm_core.h.
+ */
+void rb_jump_tag(int state);
+
+/**
+ * Calls `initialize` method of the passed object with the passed arguments.
+ * It also forwards the implicitly passed block to the method.
+ *
+ * @param[in] obj Receiver object.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed as-is to `obj.initialize`.
+ * @exception rb_eException Any exceptions happen inside.
+ */
+void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_obj_call_init(), except you can specify how to handle the
+ * last element of the given array.
+ *
+ * @param[in] obj Receiver object.
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Passed as-is to `obj.initialize`.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eException Any exceptions happen inside.
+ */
+void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
+
+/**
+ * Identical to rb_frame_this_func(), except it returns the named used to call
+ * the method.
+ *
+ * @retval 0 There is no method (e.g. toplevel context).
+ * @retval otherwise The name of the current method.
+ */
+ID rb_frame_callee(void);
+
+/**
+ * Constructs an exception object from the list of arguments, in a manner
+ * similar to Ruby's `raise`. This function can take:
+ *
+ * - No arguments at all, i.e. `argc == 0`. This is not a failure. It
+ * returns ::RUBY_Qnil then.
+ *
+ * - An object, which is an instance of ::rb_cString. In this case an
+ * instance of ::rb_eRuntimeError whose message is the passed string is
+ * created then returned.
+ *
+ * - An object, which responds to `exception` method, and optionally its
+ * argument, and optionally its backtrace. For example instances of
+ * subclasses of ::rb_eException have this method. What is returned from
+ * the method is returned.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv 0 up to 3 objects.
+ * @exception rb_eArgError Wrong `argc`.
+ * @exception rb_eTypeError `argv[0].exception` returned non-exception.
+ * @return An instance of a subclass of ::rb_eException.
+ *
+ * @internal
+ *
+ * Historically this was _the_ way `raise` converted its arguments to an
+ * exception. However they diverged.
+ */
+VALUE rb_make_exception(int argc, const VALUE *argv);
+
+/* eval_jump.c */
+
+/**
+ * Registers a function that shall run on process exit. Registered functions
+ * run in reverse-chronological order, mixed with syntactic `END` block and
+ * `Kernel#at_exit`.
+ *
+ * @param[in] func Function to run at process exit.
+ * @param[in] arg Passed as-is to `func`.
+ */
+void rb_set_end_proc(void (*func)(VALUE arg), VALUE arg);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_EVAL_H */
diff --git a/include/ruby/internal/intern/file.h b/include/ruby/internal/intern/file.h
new file mode 100644
index 0000000000..79820fdc61
--- /dev/null
+++ b/include/ruby/internal/intern/file.h
@@ -0,0 +1,213 @@
+#ifndef RBIMPL_INTERN_FILE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_FILE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cFile.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* file.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_file_expand_path(), except how arguments are passed.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Filename, and base directory, in that order.
+ * @exception rb_eArgError Wrong `argc`.
+ * @exception rb_eTypeError Non-string passed.
+ * @exception rb_eEncCompatError No conversion from arguments to a path.
+ * @return Expanded path.
+ *
+ * @internal
+ *
+ * It seems nobody actually uses this function right now. Maybe delete it?
+ */
+VALUE rb_file_s_expand_path(int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_file_absolute_path(), except it additionally understands
+ * `~`. If a given pathname starts with `~someone/`, that part expands to the
+ * user's home directory (or that of current process' owner's in case of `~/`).
+ *
+ * @param[in] fname Relative file name.
+ * @param[in] dname Lookup base directory name, or in case
+ * ::RUBY_Qnil is passed the process' current
+ * working directory is assumed.
+ * @exception rb_eArgError Home directory is not absolute.
+ * @exception rb_eTypeError Non-string passed.
+ * @exception rb_eEncCompatError No conversion from arguments to a path.
+ * @return Expanded path.
+ */
+VALUE rb_file_expand_path(VALUE fname, VALUE dname);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_file_absolute_path(), except how arguments are passed.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Filename, and base directory, in that order.
+ * @exception rb_eArgError Wrong `argc`.
+ * @exception rb_eTypeError Non-string passed.
+ * @exception rb_eEncCompatError No conversion from arguments to a path.
+ * @return Expanded path.
+ *
+ * @internal
+ *
+ * It seems nobody actually uses this function right now. Maybe delete it?
+ */
+VALUE rb_file_s_absolute_path(int argc, const VALUE *argv);
+
+/**
+ * Maps a relative path to its absolute representation. Relative paths are
+ * referenced from the passed directory name, or from the process' current
+ * working directory in case ::RUBY_Qnil is passed.
+ *
+ * @param[in] fname Relative file name.
+ * @param[in] dname Lookup base directory name, or in case
+ * ::RUBY_Qnil is passed the process' current
+ * working directory is assumed.
+ * @exception rb_eArgError Strings contain NUL bytes.
+ * @exception rb_eTypeError Non-string passed.
+ * @exception rb_eEncCompatError No conversion from arguments to a path.
+ * @return Expanded path.
+ */
+VALUE rb_file_absolute_path(VALUE fname, VALUE dname);
+
+/**
+ * Strips a file path's last component (and trailing separators if any). This
+ * function is relatively simple on POSIX environments; just splits the input
+ * with `/`, strips the last one, if something remains joins them again,
+ * otherwise the return value is `"."`. However when it comes to Windows this
+ * function is quite very much complicated. We have to take UNC etc. into
+ * account. So for instance `"C:foo"`'s dirname is `"C:."`.
+ *
+ * @param[in] fname File name to strip.
+ * @exception rb_eTypeError `fname` is not a String.
+ * @exception rb_eArgError `fname` contains NUL bytes.
+ * @exception rb_eEncCompatError `fname`'s encoding is not path-compat.
+ * @return A dirname of `fname`.
+ * @note This is a "pure" operation; it computes the return value solely
+ * from the passed object and never does any file IO.
+ */
+VALUE rb_file_dirname(VALUE fname);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Resolves a feature's path. This function takes for instance `"json"` and
+ * `[".so", ".rb"]`, and iterates over the `$LOAD_PATH` to see if there is
+ * either `json.so` or `json.rb` in the directory.
+ *
+ * This is not what everything `require` does, but at least `require` is built
+ * on top of it.
+ *
+ * @param[in,out] feature File to search, and return buffer.
+ * @param[in] exts List of file extensions.
+ * @exception rb_eTypeError `feature` is not a String.
+ * @exception rb_eArgError `feature` contains NUL bytes.
+ * @exception rb_eEncCompatError `feature`'s encoding is not path-compat.
+ * @retval 0 Not found
+ * @retval otherwise Found index in `ext`, plus one.
+ * @post `*feature` is a resolved path.
+ */
+int rb_find_file_ext(VALUE *feature, const char *const *exts);
+
+/**
+ * Identical to rb_find_file_ext(), except it takes a feature name and is
+ * extension at once, e.g. `"json.rb"`. This difference is much like how
+ * `require` and `load` are different.
+ *
+ * @param[in] path A path relative to `$LOAD_PATH`.
+ * @exception rb_eTypeError `path` is not a String.
+ * @exception rb_eArgError `path` contains NUL bytes.
+ * @exception rb_eEncCompatError `path`'s encoding is not path-compat.
+ * @return Expanded path.
+ */
+VALUE rb_find_file(VALUE path);
+
+/**
+ * Queries if the given path is either a directory, or a symlink that
+ * (potentially recursively) points to such thing.
+ *
+ * @param[in] _ Ignored (why...?)
+ * @param[in] path String, or IO. In case of IO it issues
+ * `fstat(2)` instead of `stat(2)`.
+ * @exception rb_eFrozenError `path` is a frozen IO (why...?)
+ * @exception rb_eTypeError `path` is neither String nor IO.
+ * @exception rb_eArgError `path` contains NUL bytes.
+ * @exception rb_eEncCompatError `path`'s encoding is not path-compat.
+ * @retval RUBY_Qtrue `path` is a directory.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_file_directory_p(VALUE _, VALUE path);
+
+/**
+ * Converts a string into an "OS Path" encoding, if any. In most operating
+ * systems there are no such things like per-OS default encoding of filename.
+ * For them this function is no-op. However most notably on MacOS, pathnames
+ * are UTF-8 encoded. It converts the given string into such encoding.
+ *
+ * @param[in] path An instance of ::rb_cString.
+ * @exception rb_eEncCompatError `path`'s encoding is not path-compat.
+ * @return `path`'s contents converted to the OS' path encoding.
+ */
+VALUE rb_str_encode_ospath(VALUE path);
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the given path is an absolute path. On POSIX environments it is
+ * as easy as `path[0] == '/'`. However on Windows, drive letters and UNC
+ * paths are also taken into account.
+ *
+ * @param[in] path A possibly relative path string.
+ * @retval 1 `path` is absolute.
+ * @retval 0 `path` is relative.
+ */
+int rb_is_absolute_path(const char *path);
+
+/**
+ * Queries the file size of the given file. Because this function calls
+ * `fstat(2)` internally, it is a failure to pass a closed file to this
+ * function.
+ *
+ * This function flushes the passed file's buffer if any. Can take time.
+ *
+ * @param[in] file A file object.
+ * @exception rb_eFrozenError `file` is frozen.
+ * @exception rb_eIOError `file` is closed.
+ * @exception rb_eSystemCallError Permission denied etc.
+ * @exception rb_eNoMethodError The given non-file object doesn't respond
+ * to `#size`.
+ * @return The size of the passed file.
+ * @note Passing a non-regular file such as a UNIX domain socket to this
+ * function is not a failure. But the return value is
+ * unpredictable. POSIX's `<sys/stat.h>` states that "the use of
+ * this field is unspecified" then.
+ */
+rb_off_t rb_file_size(VALUE file);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_FILE_H */
diff --git a/include/ruby/internal/intern/gc.h b/include/ruby/internal/intern/gc.h
new file mode 100644
index 0000000000..2ee1d257db
--- /dev/null
+++ b/include/ruby/internal/intern/gc.h
@@ -0,0 +1,392 @@
+#ifndef RBIMPL_INTERN_GC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_GC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_mGC.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h> /* size_t */
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* ssize_t */
+#endif
+
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* gc.c */
+
+RBIMPL_ATTR_COLD()
+RBIMPL_ATTR_NORETURN()
+/**
+ * Triggers out-of-memory error. If possible it raises ::rb_eNoMemError. But
+ * because we are running out of memory that is not always doable. This
+ * function tries hard to show something, but ultimately can die silently.
+ *
+ * @exception rb_eNoMemError Raises it if possible.
+ */
+void rb_memerror(void);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the GC is busy.
+ *
+ * @retval 0 It isn't.
+ * @retval 1 It is.
+ */
+int rb_during_gc(void);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Marks objects between the two pointers. This is one of the GC utility
+ * functions that you can call when you design your own
+ * ::rb_data_type_struct::dmark.
+ *
+ * @pre Continuous memory region from `start` to `end` shall be fully
+ * addressable.
+ * @param[out] start Pointer to an array of objects.
+ * @param[out] end Pointer that terminates the array of objects.
+ * @post Objects from `start` (included) to `end` (excluded) are marked.
+ *
+ * @internal
+ *
+ * `end` can be NULL... But that just results in no-op.
+ */
+void rb_gc_mark_locations(const VALUE *start, const VALUE *end);
+
+/**
+ * Identical to rb_mark_hash(), except it marks only values of the table and
+ * leave their associated keys unmarked. This is one of the GC utility
+ * functions that you can call when you design your own
+ * ::rb_data_type_struct::dmark.
+ *
+ * @warning Of course it can break GC. Leave it unused if unsure.
+ * @param[in] tbl A table to mark.
+ * @post Values stored in `tbl` are marked.
+ */
+void rb_mark_tbl(struct st_table *tbl);
+
+/**
+ * Identical to rb_mark_tbl(), except it marks objects using
+ * rb_gc_mark_movable(). This is one of the GC utility functions that you can
+ * call when you design your own ::rb_data_type_struct::dmark.
+ *
+ * @warning Of course it can break GC. Leave it unused if unsure.
+ * @param[in] tbl A table to mark.
+ * @post Values stored in `tbl` are marked.
+ */
+void rb_mark_tbl_no_pin(struct st_table *tbl);
+
+/**
+ * Identical to rb_mark_hash(), except it marks only keys of the table and
+ * leave their associated values unmarked. This is one of the GC utility
+ * functions that you can call when you design your own
+ * ::rb_data_type_struct::dmark.
+ *
+ * @warning Of course it can break GC. Leave it unused if unsure.
+ * @param[in] tbl A table to mark.
+ * @post Keys stored in `tbl` are marked.
+ */
+void rb_mark_set(struct st_table *tbl);
+
+/**
+ * Marks keys and values associated inside of the given table. This is one of
+ * the GC utility functions that you can call when you design your own
+ * ::rb_data_type_struct::dmark.
+ *
+ * @param[in] tbl A table to mark.
+ * @post Objects stored in `tbl` are marked.
+ */
+void rb_mark_hash(struct st_table *tbl);
+
+/**
+ * Updates references inside of tables. After you marked values using
+ * rb_mark_tbl_no_pin(), the objects inside of the table could of course be
+ * moved. This function is to fixup those references. You can call this from
+ * your ::rb_data_type_struct::dcompact.
+ *
+ * @param[out] ptr A table that potentially includes moved references.
+ * @post Moved references, if any, are corrected.
+ */
+void rb_gc_update_tbl_refs(st_table *ptr);
+
+/**
+ * Identical to rb_gc_mark(), except it allows the passed value be a
+ * non-object. For instance pointers to different type of memory regions are
+ * allowed here. Such values are silently ignored. This is one of the GC
+ * utility functions that you can call when you design your own
+ * ::rb_data_type_struct::dmark.
+ *
+ * @param[out] obj A possible object.
+ * @post `obj` is marked, if possible.
+ */
+void rb_gc_mark_maybe(VALUE obj);
+
+/**
+ * Marks an object. This is one of the GC utility functions that you can call
+ * when you design your own ::rb_data_type_struct::dmark.
+ *
+ * @param[out] obj Arbitrary Ruby object.
+ * @post `obj` is marked.
+ */
+void rb_gc_mark(VALUE obj);
+
+/**
+ * Maybe this is the only function provided for C extensions to control the
+ * pinning of objects, so let us describe it in detail. These days Ruby's GC
+ * is copying. As far as an object's physical address is guaranteed unused, it
+ * can move around the object space. Our GC engine rearranges these objects
+ * after it reclaims unreachable objects from our object space, so that the
+ * space is compact (improves memory locality). This is called the
+ * "compaction" phase, and works well most of the time... as far as there are
+ * no C extensions. C extensions complicate the scenario because Ruby core
+ * cannot detect any use of the physical address of an object inside of C
+ * functions. In order to prevent memory corruptions, objects observable from
+ * C extensions are "pinned"; they stick to where they are born until they die,
+ * just in case any C extensions touch their raw pointers. This variant of
+ * scheme is called "Mostly-Copying" garbage collector. Authors of C
+ * extensions, however, can extremely carefully write them to become
+ * compaction-aware. To do so avoid referring to a Ruby object from inside of
+ * your struct in the first place. But if that is not possible, use this
+ * function from your ::rb_data_type_struct::dmark then. This way objects
+ * marked using it are considered movable. If you chose this way you have to
+ * manually fix up locations of such moved pointers using rb_gc_location().
+ *
+ * @see Bartlett, Joel F., "Compacting Garbage Collection with Ambiguous
+ * Roots", ACM SIGPLAN Lisp Pointers Volume 1 Issue 6 pp. 3-12,
+ * April-May-June, 1988. https://doi.org/10.1145/1317224.1317225
+ *
+ * @param[in] obj Object that is movable.
+ * @post Values stored in `tbl` are marked.
+ */
+void rb_gc_mark_movable(VALUE obj);
+
+/**
+ * Finds a new "location" of an object. An object can be moved on compaction.
+ * This function projects its new abode, or just returns the passed object if
+ * not moved. This is one of the GC utility functions that you can call when
+ * you design your own ::rb_data_type_struct::dcompact.
+ *
+ * @param[in] obj An object, possibly already moved to somewhere else.
+ * @return An object, which holds the current contents of former `obj`.
+ */
+VALUE rb_gc_location(VALUE obj);
+
+/**
+ * Asserts that the passed object is no longer needed. Such objects are
+ * reclaimed sooner or later so this function is not mandatory. But sometimes
+ * you can know from your application knowledge that an object is surely dead
+ * at some point. Calling this as a hint can be a polite way.
+ *
+ * @param[out] obj Object, dead.
+ * @pre `obj` have never been passed to this function before.
+ * @post `obj` could be invalidated.
+ * @warning It is a failure to pass an object multiple times to this
+ * function.
+ * @deprecated This is now a no-op function.
+ */
+RBIMPL_ATTR_DEPRECATED(("this is now a no-op function"))
+void rb_gc_force_recycle(VALUE obj);
+
+/**
+ * Triggers a GC process. This was the only GC entry point that we had at the
+ * beginning. Over time our GC evolved. Now what this function does is just a
+ * very simplified variation of the entire GC algorithms. A series of
+ * procedures kicked by this API is called a "full" GC.
+ *
+ * - It immediately scans the entire object space to sort the dead.
+ * - It immediately reclaims any single dead bodies to reuse later.
+ *
+ * It is worth noting that the procedures above do not include evaluations of
+ * finalisers. They run later.
+ *
+ * @internal
+ *
+ * Finalisers are deferred until we can handle interrupts. See
+ * `rb_postponed_job_flush` in vm_trace.c.
+ *
+ * Of course there are GC that are not "full". For instance this one and the
+ * GC which runs when we are running out of memory are different. See
+ * `gc_profile_record_flag` defined in gc.c for the kinds of GC.
+ *
+ * In spite of the name this is not what everything that a GC can trigger. As
+ * of writing it seems this function does not trigger compaction. But this
+ * might change in future.
+ */
+void rb_gc(void);
+
+/**
+ * Copy&paste an object's finaliser to another. This is one of the GC utility
+ * functions that you can call when you design your own `initialize_copy`,
+ * `initialize_dup`, `initialize_clone`.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object.
+ * @post `dst` and `src` share the same finaliser.
+ *
+ * @internal
+ *
+ * But isn't it easier for you to call super, and let `Object#initialize_copy`
+ * call this function instead?
+ */
+void rb_gc_copy_finalizer(VALUE dst, VALUE src);
+
+/**
+ * (Re-) enables GC. This makes sense only after you called rb_gc_disable().
+ *
+ * @retval RUBY_Qtrue GC was disabled before.
+ * @retval RUBY_Qfalse GC was enabled before.
+ * @post GC is enabled.
+ *
+ * @internal
+ *
+ * This is one of such exceptional functions that does not raise both Ruby
+ * exceptions and C++ exceptions.
+ */
+VALUE rb_gc_enable(void);
+
+/**
+ * Disables GC. This prevents automatic GC runs when the process is running
+ * out of memory. Such situations shall result in rb_memerror(). However this
+ * does not prevent users from manually invoking rb_gc(). That should work.
+ * People abused this by disabling GC at the beginning of an event loop,
+ * process events without GC overheads, then manually force reclaiming garbage
+ * at the bottom of the loop. However because our GC is now much smarter than
+ * just calling rb_gc(), this technique is proven to be sub-optimal these days.
+ * It is believed that there is currently practically no needs of this
+ * function.
+ *
+ * @retval RUBY_Qtrue GC was disabled before.
+ * @retval RUBY_Qfalse GC was enabled before.
+ * @post GC is disabled.
+ */
+VALUE rb_gc_disable(void);
+
+/**
+ * Identical to rb_gc(), except the return value.
+ *
+ * @return Always returns ::RUBY_Qnil.
+ */
+VALUE rb_gc_start(void);
+
+/**
+ * Assigns a finaliser for an object. Each objects can have objects (typically
+ * blocks) that run immediately after that object dies. They are called
+ * finalisers of an object. This function associates a finaliser object with a
+ * target object.
+ *
+ * @note Note that finalisers run _after_ the object they finalise dies. You
+ * cannot for instance call its methods.
+ * @note If your finaliser references the object it finalises that object
+ * loses any chance to become a garbage; effectively leaks memory until
+ * the end of the process.
+ *
+ * @param[in] obj Target to finalise.
+ * @param[in] block Something `call`able.
+ * @exception rb_eRuntimeError Somehow `obj` cannot have finalisers.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @exception rb_eArgError `block` doesn't respond to `call`.
+ * @return The passed `block`.
+ * @post `block` runs after `obj` dies.
+ */
+VALUE rb_define_finalizer(VALUE obj, VALUE block);
+
+/**
+ * Modifies the object so that it has no finalisers at all. This function is
+ * mainly provided for symmetry. No practical usages can be thought of.
+ *
+ * @param[out] obj Object to clear its finalisers.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @return The passed `obj`.
+ * @post `obj` has no finalisers.
+ * @note There is no way to undefine a specific part of many finalisers
+ * that `obj` could have. All you can do is to clear them all.
+ */
+VALUE rb_undefine_finalizer(VALUE obj);
+
+/**
+ * Identical to rb_gc_stat(), with "count" parameter.
+ *
+ * @return Lifetime total number of runs of GC.
+ */
+size_t rb_gc_count(void);
+
+/**
+ * Obtains various GC related profiles. The parameter can be either a Symbol
+ * or a Hash. If a Hash is passed, it is filled with everything currently
+ * available. If a Symbol is passed just that portion is returned.
+ *
+ * Possible variations of keys you can pass here change from version to
+ * version. You can get the list of known keys by passing an empty hash and
+ * let it be filled.
+ *
+ * @param[in,out] key_or_buf A Symbol, or a Hash.
+ * @exception rb_eTypeError Neither Symbol nor Hash.
+ * @exception rb_eFrozenError Frozen hash is passed.
+ * @return In case a Hash is passed it returns 0. Otherwise the
+ * profile value associated with the given key is returned.
+ * @post In case a Hash is passed it is filled with values.
+ */
+size_t rb_gc_stat(VALUE key_or_buf);
+
+/**
+ * Obtains various info regarding the most recent GC run. This includes for
+ * instance the reason of the GC. The parameter can be either a Symbol or a
+ * Hash. If a Hash is passed, it is filled with everything currently
+ * available. If a Symbol is passed just that portion is returned.
+ *
+ * Possible variations of keys you can pass here change from version to
+ * version. You can get the list of known keys by passing an empty hash and
+ * let it be filled.
+ *
+ * @param[in,out] key_or_buf A Symbol, or a Hash.
+ * @exception rb_eTypeError Neither Symbol nor Hash.
+ * @exception rb_eFrozenError Frozen hash is passed.
+ * @return In case a Hash is passed it returns that hash. Otherwise
+ * the profile value associated with the given key is returned.
+ * @post In case a Hash is passed it is filled with values.
+ */
+VALUE rb_gc_latest_gc_info(VALUE key_or_buf);
+
+/**
+ * Informs that there are external memory usages. Our GC runs when we are
+ * running out of memory. The amount of memory, however, can increase/decrease
+ * behind-the-scene. For instance DLLs can allocate memories using `mmap(2)`
+ * etc, which are opaque to us. Registering such external allocations using
+ * this function enables proper detection of how much memories an object used
+ * as a whole. That will trigger GCs more often than it would otherwise. You
+ * can also pass negative numbers here, to indicate that such external
+ * allocations are gone.
+ *
+ * @param[in] diff Amount of memory increased(+)/decreased(-).
+ */
+void rb_gc_adjust_memory_usage(ssize_t diff);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_GC_H */
diff --git a/include/ruby/internal/intern/hash.h b/include/ruby/internal/intern/hash.h
new file mode 100644
index 0000000000..af8dfd5d8f
--- /dev/null
+++ b/include/ruby/internal/intern/hash.h
@@ -0,0 +1,320 @@
+#ifndef RBIMPL_INTERN_HASH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_HASH_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cHash.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/st.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* hash.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_st_foreach(), except it raises exceptions when the callback
+ * function tampers the table during iterating over it.
+ *
+ * @param[in] st Table to iterate over.
+ * @param[in] func Callback function to apply.
+ * @param[in] arg Passed as-is to `func`.
+ * @exception rb_eRuntimeError `st` was tampered during iterating.
+ *
+ * @internal
+ *
+ * This is declared here because exceptions are Ruby level concept.
+ *
+ * This is in fact a very thin wrapper of rb_st_foreach_check().
+ */
+void rb_st_foreach_safe(struct st_table *st, st_foreach_callback_func *func, st_data_t arg);
+
+/** @alias{rb_st_foreach_safe} */
+#define st_foreach_safe rb_st_foreach_safe
+
+/**
+ * Try converting an object to its hash representation using its `to_hash`
+ * method, if any. If there is no such thing, returns ::RUBY_Qnil.
+ *
+ * @param[in] obj Arbitrary ruby object to convert.
+ * @exception rb_eTypeError `obj.to_hash` returned something non-Hash.
+ * @retval RUBY_Qnil No conversion from `obj` to hash defined.
+ * @retval otherwise Converted hash representation of `obj`.
+ * @see rb_io_check_io
+ * @see rb_check_array_type
+ * @see rb_check_string_type
+ *
+ * @internal
+ *
+ * There is no rb_hash_to_hash() that analogous to rb_str_to_str().
+ * Intentional or ...?
+ */
+VALUE rb_check_hash_type(VALUE obj);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Iterates over a hash. This basically does the same thing as
+ * rb_st_foreach(). But because the passed hash is a Ruby object, its keys and
+ * values are both Ruby objects.
+ *
+ * @param[in] hash An instance of ::rb_cHash to iterate over.
+ * @param[in] func Callback function to yield.
+ * @param[in] arg Passed as-is to `func`.
+ * @exception rb_eRuntimeError `hash` was tampered during iterating.
+ */
+void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);
+
+/**
+ * Calculates a message authentication code of the passed object. The return
+ * value is a very small integer used as an index of a key of a table. In
+ * order to calculate the value this function calls `#hash` method of the
+ * passed object. Ruby provides you a default implementation. But if you
+ * implement your class in C, that default implementation cannot know the
+ * underlying data structure. You must implement your own `#hash` method then,
+ * which must return an integer of uniform distribution in a sufficiently
+ * instant manner.
+ *
+ * @param[in] obj Arbitrary Ruby object.
+ * @exception rb_eTypeError `obj.hash` returned something non-Integer.
+ * @return A small integer.
+ * @note `#hash` can return very big integers, but they get truncated.
+ */
+VALUE rb_hash(VALUE obj);
+
+/**
+ * Creates a new, empty hash object.
+ *
+ * @return An allocated new instance of ::rb_cHash.
+ */
+VALUE rb_hash_new(void);
+
+/**
+ * Identical to rb_hash_new(), except it additionally specifies how many keys
+ * it is expected to contain. This way you can create a hash that is large enough
+ * for your need. For large hashes it means it won't need to be reallocated and
+ * rehashed as much, improving performance.
+ *
+ * @param[in] capa Designed capacity of the hash.
+ * @return An empty Hash, whose capacity is `capa`.
+ */
+VALUE rb_hash_new_capa(long capa);
+
+/**
+ * Duplicates a hash.
+ *
+ * @param[in] hash An instance of ::rb_cHash.
+ * @return An allocated new instance of ::rb_cHash, whose contents are
+ * a verbatim copy of from `hash`.
+ */
+VALUE rb_hash_dup(VALUE hash);
+
+/** @alias{rb_obj_freeze} */
+VALUE rb_hash_freeze(VALUE obj);
+
+/**
+ * Queries the given key in the given hash table. If there is the key in the
+ * hash, returns the value associated with the key. Otherwise it returns the
+ * "default" value (defined per hash table).
+ *
+ * @param[in] hash Hash table to look into.
+ * @param[in] key Hash key to look for.
+ * @return Either the value associated with the key, or the default one if
+ * absent.
+ */
+VALUE rb_hash_aref(VALUE hash, VALUE key);
+
+/**
+ * Identical to rb_hash_aref(), except it always returns ::RUBY_Qnil for
+ * misshits.
+ *
+ * @param[in] hash Hash table to look into.
+ * @param[in] key Hash key to look for.
+ * @return Either the value associated with the key, or ::RUBY_Qnil if
+ * absent.
+ * @note A hash can store ::RUBY_Qnil as an ordinary value. You cannot
+ * distinguish whether the key is missing, or just its associated
+ * value happens to be ::RUBY_Qnil, as far as you use this API.
+ */
+VALUE rb_hash_lookup(VALUE hash, VALUE key);
+
+/**
+ * Identical to rb_hash_lookup(), except you can specify what to return on
+ * misshits. This is much like 2-arguments version of `Hash#fetch`.
+ *
+ * ```CXX
+ * VALUE hash;
+ * VALUE key;
+ * VALUE tmp = rb_obj_alloc(rb_cObject);
+ * VALUE val = rb_hash_lookup2(hash, key, tmp);
+ * if (val == tmp) {
+ * printf("misshit");
+ * }
+ * else {
+ * printf("hit");
+ * }
+ * ```
+ *
+ * @param[in] hash Hash table to look into.
+ * @param[in] key Hash key to look for.
+ * @param[in] def Default value.
+ * @retval def `hash` does not have `key`.
+ * @retval otherwise The value associated with `key`.
+ */
+VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def);
+
+/**
+ * Identical to rb_hash_lookup(), except it yields the (implicitly) passed
+ * block instead of returning ::RUBY_Qnil.
+ *
+ * @param[in] hash Hash table to look into.
+ * @param[in] key Hash key to look for.
+ * @exception rb_eKeyError No block given.
+ * @return Either the value associated with the key, or what the block
+ * evaluates to if absent.
+ */
+VALUE rb_hash_fetch(VALUE hash, VALUE key);
+
+/**
+ * Inserts or replaces ("upsert"s) the objects into the given hash table. This
+ * basically associates the given value with the given key. On duplicate key
+ * this function updates its associated value with the given one. Otherwise it
+ * inserts the association at the end of the table.
+ *
+ * @param[out] hash Target hash table to modify.
+ * @param[in] key Arbitrary Ruby object.
+ * @param[in] val A value to be associated with `key`.
+ * @exception rb_eFrozenError `hash` is frozen.
+ * @return The passed `val`
+ * @post `val` is associated with `key` in `hash`.
+ */
+VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val);
+
+/**
+ * Swipes everything out of the passed hash table.
+ *
+ * @param[out] hash Target to clear.
+ * @exception rb_eFrozenError `hash`is frozen.
+ * @return The passed `hash`
+ * @post `hash` has no contents.
+ */
+VALUE rb_hash_clear(VALUE hash);
+
+/**
+ * Deletes each entry for which the block returns a truthy value. If there is
+ * no block given, it returns an enumerator that does the thing.
+ *
+ * @param[out] hash Target hash to modify.
+ * @exception rb_eFrozenError `hash` is frozen.
+ * @retval hash The hash is modified.
+ * @retval otherwise An instance of ::rb_cEnumerator that does it.
+ */
+VALUE rb_hash_delete_if(VALUE hash);
+
+/**
+ * Deletes the passed key from the passed hash table, if any.
+ *
+ * @param[out] hash Target hash to modify.
+ * @param[in] key Key to delete.
+ * @retval RUBY_Qnil `hash` has no such key as `key`.
+ * @retval otherwise What was associated with `key`.
+ * @post `hash` has no such key as `key`.
+ */
+VALUE rb_hash_delete(VALUE hash, VALUE key);
+
+/**
+ * Inserts a list of key-value pairs into a hash table at once. It is
+ * semantically identical to repeatedly calling rb_hash_aset(), but can be
+ * faster than that.
+ *
+ * @param[in] argc Length of `argv`, must be even.
+ * @param[in] argv A list of key, value, key, value, ...
+ * @param[out] hash Target hash table to modify.
+ * @post `hash` has contents from `argv`.
+ * @note `argv` is allowed to be NULL as long as `argc` is zero.
+ *
+ * @internal
+ *
+ * What happens for duplicated keys? Well it silently discards older ones to
+ * accept the newest (rightmost) one. This behaviour also mimics repeated call
+ * of rb_hash_aset().
+ */
+void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash);
+
+/**
+ * Type of callback functions to pass to rb_hash_update_by().
+ *
+ * @param[in] newkey A key of the table.
+ * @param[in] oldkey Value associated with `key` in hash1.
+ * @param[in] value Value associated with `key` in hash2.
+ * @return Either one of the passed values to take.
+ */
+typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
+
+/**
+ * Destructively merges two hash tables into one. It resolves key conflicts by
+ * calling the passed function and take its return value.
+ *
+ * @param[out] hash1 Target hash to be modified.
+ * @param[in] hash2 A hash to merge into `hash1`.
+ * @param[in] func Conflict reconciler.
+ * @exception rb_eFrozenError `hash1` is frozen.
+ * @exception rb_eRuntimeError `hash2` is updated instead.
+ * @return The passed `hash1`.
+ * @post Contents of `hash2` is merged into `hash1`.
+ * @note You can pass zero to `func`. This means values from `hash2`
+ * are always taken.
+ */
+VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
+
+/* file.c */
+
+/**
+ * This function is mysterious. What it does is not immediately obvious. Also
+ * what it does seems platform dependent.
+ *
+ * @param[in] path A local path.
+ * @retval 0 The "check" succeeded.
+ * @retval otherwise The "check" failed.
+ */
+int rb_path_check(const char *path);
+
+/* hash.c */
+
+/**
+ * Destructively removes every environment variables of the running process.
+ *
+ * @return The `ENV` object.
+ * @post The process has no environment variables.
+ */
+VALUE rb_env_clear(void);
+
+/**
+ * Identical to #RHASH_SIZE(), except it returns the size in Ruby's integer
+ * instead of C's.
+ *
+ * @param[in] hash A hash object.
+ * @return The size of the hash.
+ */
+VALUE rb_hash_size(VALUE hash);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_HASH_H */
diff --git a/include/ruby/internal/intern/io.h b/include/ruby/internal/intern/io.h
new file mode 100644
index 0000000000..02c249723e
--- /dev/null
+++ b/include/ruby/internal/intern/io.h
@@ -0,0 +1,661 @@
+#ifndef RBIMPL_INTERN_IO_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_IO_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cIO.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* io.c */
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define rb_defout rb_stdout
+
+/* string.c */ /* ...why? moved in commit de7161526014b781468cea5d84411e23be */
+
+/**
+ * The field separator character for inputs, or the `$;`. This affects how
+ * `String#split` works. You can set this via the `-F` command line option.
+ * You can also assign arbitrary ruby objects programmatically, but it makes
+ * best sense for you to assign a regular expression here.
+ *
+ * @internal
+ *
+ * Tidbit: "fs" comes from AWK's `FS` variable.
+ */
+RUBY_EXTERN VALUE rb_fs;
+
+/* io.c */ /* ...why? given rb_fs is in string.c? */
+
+/**
+ * The field separator character for outputs, or the `$,`. This affects how
+ * `Array#join` works.
+ *
+ * @deprecated Assigning anything other than ::RUBY_Qnil to this variable is
+ * deprecated.
+ */
+RUBY_EXTERN VALUE rb_output_fs;
+
+/**
+ * The record separator character for inputs, or the `$/`. This affects how
+ * `IO#gets` works. You can set this via the `-0` command line option.
+ *
+ * @deprecated Assigning anything other than ::RUBY_Qnil to this variable is
+ * deprecated.
+ *
+ * @internal
+ *
+ * Tidbit: "rs" comes from AWK's `RS` variable.
+ */
+RUBY_EXTERN VALUE rb_rs;
+
+/**
+ * This is the default value of ::rb_rs, i.e. `"\n"`. It seems it has always
+ * been just a newline string since the beginning. Not sure why C codes has to
+ * use this, given there is no way for ruby programs to interface.
+ *
+ * Also it has not been deprecated for unknown reasons.
+ */
+RUBY_EXTERN VALUE rb_default_rs;
+
+/**
+ * The record separator character for outputs, or the `$\`. This affects how
+ * `IO#print` works.
+ *
+ * @deprecated Assigning anything other than ::RUBY_Qnil to this variable is
+ * deprecated.
+ */
+RUBY_EXTERN VALUE rb_output_rs;
+
+/**
+ * Writes the given string to the given IO.
+ *
+ * @param[out] io An IO, opened for writing.
+ * @param[in] str A String-like object to write to `io`.
+ * @exception rb_eIOError `io` isn't opened for writing.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `str` to String.
+ * @exception rb_eSystemCallError `write(2)` failed for some reason.
+ * @return The number of bytes written to the `io`.
+ * @post `str` (up to the length of return value) is written to `io`.
+ * @note This function blocks.
+ * @note Partial write is a thing. It must be at least questionable not
+ * to check the return value.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This function can take arbitrary
+ * objects, and calls their `write` method. What is written above in fact
+ * describes how `IO#write` works. You can pass StringIO etc. here, and would
+ * work completely differently.
+ */
+VALUE rb_io_write(VALUE io, VALUE str);
+
+/**
+ * Reads a "line" from the given IO. A line here means a chunk of characters
+ * which is terminated by either `"\n"` or an EOF.
+ *
+ * @param[in,out] io An IO, opened for reading.
+ * @exception rb_eIOError `io` isn't opened for reading.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @retval RUBY_Qnil `io` is at EOF.
+ * @retval otherwise An instance of ::rb_cString.
+ * @post `io` is read.
+ * @note Unlike `IO#gets` it doesn't set `$_`.
+ * @note Unlike `IO#gets` it doesn't consider `$/`.
+ */
+VALUE rb_io_gets(VALUE io);
+
+/**
+ * Reads a byte from the given IO.
+ *
+ * @note In Ruby a "byte" always means an 8 bit integer ranging from
+ * 0 to 255 inclusive.
+ * @param[in,out] io An IO, opened for reading.
+ * @exception rb_eIOError `io` is not opened for reading.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @retval RUBY_Qnil `io` is at EOF.
+ * @retval otherwise An instance of ::rb_cInteger.
+ * @post `io` is read.
+ *
+ * @internal
+ *
+ * Of course there was a function called `rb_io_getc()`. It was removed in
+ * commit a25fbe3b3e531bbe479f344af24eaf9d2eeae6ea.
+ */
+VALUE rb_io_getbyte(VALUE io);
+
+/**
+ * "Unget"s a string. This function pushes back the passed string onto the
+ * passed IO, such that a subsequent buffered read will return it. If the
+ * passed content is in fact an integer, a single character string of that
+ * codepoint of the encoding of the IO will be pushed back instead.
+ *
+ * It might be counter-intuitive but this function can push back multiple
+ * characters at once. Also this function can be called multiple times on a
+ * same IO. Also a "character" can be wider than a byte, depending on the
+ * encoding of the IO.
+ *
+ * @param[out] io An IO, opened for reading.
+ * @param[in] c Either a String, or an Integer.
+ * @exception rb_eIOError `io` is not opened for reading.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `c` to ::rb_cString.
+ * @return Always returns ::RUBY_Qnil.
+ *
+ * @internal
+ *
+ * Why there is ungetc, given there is no getc?
+ */
+VALUE rb_io_ungetc(VALUE io, VALUE c);
+
+/**
+ * Identical to rb_io_ungetc(), except it doesn't take the encoding of the
+ * passed IO into account. When an integer is passed, it just casts that value
+ * to C's `unsigned char`, and pushes that back.
+ *
+ * @param[out] io An IO, opened for reading.
+ * @param[in] b Either a String, or an Integer.
+ * @exception rb_eIOError `io` is not opened for reading.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `b` to ::rb_cString.
+ * @return Always returns ::RUBY_Qnil.
+ */
+VALUE rb_io_ungetbyte(VALUE io, VALUE b);
+
+/**
+ * Closes the IO. Any buffered contents are flushed to the operating system.
+ * Any future operations against the IO would raise ::rb_eIOError. In case the
+ * io was created using `IO.popen`, it also sets the `$?`.
+ *
+ * @param[out] io Target IO to close.
+ * @return Always returns ::RUBY_Qnil.
+ * @post `$?` is set in case IO is a pipe.
+ * @post No operations are possible against `io` any further.
+ * @note This can block to flush the contents.
+ * @note This can wake other threads up, especially those who are
+ * `select()`-ing the passed IO.
+ * @note Multiple invocations of this function over the same IO again
+ * and again is not an error, since Ruby 2.3.
+ *
+ * @internal
+ *
+ * You can close a frozen IO... Is this intentional?
+ */
+VALUE rb_io_close(VALUE io);
+
+/**
+ * Flushes any buffered data within the passed IO to the underlying operating
+ * system.
+ *
+ * @param[out] io Target IO to flush.
+ * @exception rb_eIOError `io` is closed.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eSystemCallError `write(2)` failed for some reason.
+ * @return The passed `io`.
+ * @post `io`'s buffers are empty.
+ * @note This operation also discards the read buffer. Should basically
+ * be harmless, but in an esoteric situation like when user pushed
+ * something different from what was read using `ungetc`, this
+ * operation in fact changes the behaviour of the `io`.
+ * @note Buffering is difficult. This operation flushes the data from
+ * our userspace to the kernel, but that doesn't always mean you
+ * can expect them stored persistently onto your hard drive.
+ */
+VALUE rb_io_flush(VALUE io);
+
+/**
+ * Queries if the passed IO is at the end of file. "The end of file" here mans
+ * that there are no more data to read. This function blocks until the read
+ * buffer is filled in, and if that operation reached the end of file, it still
+ * returns ::RUBY_Qfalse (because there are data yet in that buffer). It
+ * returns ::RUBY_Qtrue once after the buffer is cleared.
+ *
+ * @param[in,out] io Target io to query.
+ * @exception rb_eIOError `io` is not opened for reading.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @retval RUBY_Qfalse There are things yet to be read.
+ * @retval RUBY_Qtrue "The end of file" situation.
+ */
+VALUE rb_io_eof(VALUE io);
+
+/**
+ * Sets the binmode. This operation nullifies the effect of textmode (newline
+ * conversion from `"\r\n"` to `"\n"` or vice versa). Note that it doesn't
+ * stop character encodings conversions. For instance an IO created using:
+ *
+ * ```ruby
+ * File.open(
+ * "/dev/urandom",
+ * textmode: true,
+ * external_encoding: Encoding::GB18030,
+ * internal_encoding: Encoding::Windows_31J)
+ * ```
+ *
+ * has both newline and character conversions. If you pass such IO to this
+ * function, only the `textmode:true` part is cancelled. Texts read through
+ * the IO would still be encoded in Windows-31J; texts written to the IO will
+ * be encoded in GB18030.
+ *
+ * @param[out] io Target IO to modify.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @return The passed `io`.
+ * @post `io` is in binmode.
+ * @note There is no equivalent operation in Ruby. You can do this only
+ * in C.
+ */
+VALUE rb_io_binmode(VALUE io);
+
+/**
+ * Forces no conversions be applied to the passed IO. Unlike rb_io_binmode(),
+ * this cancels any newline conversions as well as encoding conversions. Any
+ * texts read/written through the IO will be the verbatim binary contents.
+ *
+ * @param[out] io Target IO to modify.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @return The passed `io`.
+ * @post `io` is in binmode. Both external/internal encoding are set to
+ * rb_ascii8bit_encoding().
+ * @note This is the implementation of `IO#binmode`.
+ */
+VALUE rb_io_ascii8bit_binmode(VALUE io);
+
+/**
+ * Identical to rb_io_write(), except it always returns the passed IO.
+ *
+ * @param[out] io An IO, opened for writing.
+ * @param[in] str A String-like object to write to `io`.
+ * @exception rb_eIOError `io` isn't opened for writing.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `str` to String.
+ * @exception rb_eSystemCallError `write(2)` failed.
+ * @return The passed `io`.
+ * @post `str` is written to `io`.
+ * @note This function blocks.
+ *
+ * @internal
+ *
+ * As rb_io_write(), above description is a fake.
+ */
+VALUE rb_io_addstr(VALUE io, VALUE str);
+
+/**
+ * This is a rb_f_sprintf() + rb_io_write() combo.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv A format string followed by its arguments.
+ * @param[out] io An IO, opened for writing.
+ * @exception rb_eIOError `io` isn't opened for writing.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `str` to String.
+ * @exception rb_eSystemCallError `write(2)` failed.
+ * @return Always returns ::RUBY_Qnil.
+ * @post `argv` is formatted, then written to `io`.
+ * @note This function blocks.
+ *
+ * @internal
+ *
+ * As rb_io_write(), above descriptions include fakes.
+ */
+VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io);
+
+/**
+ * Iterates over the passed array to apply rb_io_write() individually. If
+ * there is `$,`, this function inserts the string in middle of each
+ * iterations. If there is `$\`, this function appends the string at the end.
+ * If the array is empty, this function outputs `$_`.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv An array of strings to display.
+ * @param[out] io An IO, opened for writing.
+ * @exception rb_eIOError `io` isn't opened for writing.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `str` to String.
+ * @exception rb_eSystemCallError `write(2)` failed.
+ * @return Always returns ::RUBY_Qnil.
+ * @post `argv` is written to `io`.
+ * @note This function blocks.
+ * @note This function calls rb_io_write() multiple times. Which means,
+ * it is not an atomic operation. Outputs from multiple threads
+ * can interleave.
+ *
+ * @internal
+ *
+ * As rb_io_write(), above descriptions include fakes.
+ */
+VALUE rb_io_print(int argc, const VALUE *argv, VALUE io);
+
+/**
+ * Iterates over the passed array to apply rb_io_write() individually. Unlike
+ * rb_io_print(), this function prints a newline per each element. It also
+ * flattens the passed array (OTOH rb_io_print() just resorts to
+ * rb_ary_to_s()).
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv An array of strings to display.
+ * @param[out] io An IO, opened for writing.
+ * @exception rb_eIOError `io` isn't opened for writing.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eTypeError No conversion from `str` to String.
+ * @exception rb_eSystemCallError `write(2)` failed.
+ * @return Always returns ::RUBY_Qnil.
+ * @post `argv` is written to `io`.
+ * @note This function blocks.
+ * @note This function calls rb_io_write() multiple times. Which means,
+ * it is not an atomic operation. Outputs from multiple threads
+ * can interleave.
+ *
+ * @internal
+ *
+ * As rb_io_write(), above descriptions include fakes.
+ */
+VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io);
+
+/**
+ * Creates an IO instance whose backend is the given file descriptor. C
+ * extension libraries sometimes have file descriptors created elsewhere (maybe
+ * deep inside of another shared library), which they want ruby programs to
+ * handle. This function is handy for such situations.
+ *
+ * @param[in] fd Target file descriptor.
+ * @param[in] flags Flags, e.g. `O_CREAT|O_EXCL`
+ * @param[in] path The path of the file that backs `fd`, for diagnostics.
+ * @return An allocated instance of ::rb_cIO.
+ * @note Leave `path` NULL if you don't know.
+ */
+VALUE rb_io_fdopen(int fd, int flags, const char *path);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Opens a file located at the given path.
+ *
+ * `fmode` is a C string that represents the open mode. It can be one of:
+ *
+ * - `r` (means `O_RDONLY`),
+ * - `w` (means `O_WRONLY | O_TRUNC | O_CREAT`),
+ * - `a` (means `O_WRONLY | O_APPEND | O_CREAT`),
+ *
+ * Followed by zero or more combinations of:
+ *
+ * - `b` (means `_O_BINARY`),
+ * - `t` (means `_O_TEXT`),
+ * - `+` (means `O_RDWR`),
+ * - `x` (means `O_TRUNC`), or
+ * - `:[BOM|]enc[:enc]` (see below).
+ *
+ * This last one specifies external (and internal if any) encodings,
+ * respectively. If optional `BOM|` is specified and the specified external
+ * encoding is capable of expressing BOMs, opening file's contents' byte order
+ * is auto-detected using the mechanism.
+ *
+ * So for instance, fmode of `"rt|BOM:utf-16le:utf-8"` specifies that...
+ *
+ * - the physical representation of the contents of the file is in UTF-16;
+ * - honours its BOM but assumes little endian if absent;
+ * - opens the file for reading;
+ * - what is read is converted into UTF-8;
+ * - with newlines cannibalised to `\n`.
+ *
+ * @param[in] fname Path to open.
+ * @param[in] fmode Mode specifier much like `fopen(3)`.
+ * @exception rb_eArgError `fmode` contradicted (e.g. `"bt"`).
+ * @exception rb_eSystemCallError `open(2)` failed for some reason.
+ * @return An instance of ::rb_cIO.
+ */
+VALUE rb_file_open(const char *fname, const char *fmode);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_file_open(), except it takes the pathname as a Ruby's string
+ * instead of C's. In case the passed Ruby object is a non-String it tries to
+ * call `#to_path`.
+ *
+ * @param[in] fname Path to open.
+ * @param[in] fmode Mode specifier much like `fopen(3)`.
+ * @exception rb_eTypeError `fname` is not a String.
+ * @exception rb_eEncCompatError `fname` is not ASCII-compatible.
+ * @exception rb_eArgError `fmode` contradicted (e.g. `"bt"`).
+ * @exception rb_eSystemCallError `open(2)` failed for some reason.
+ * @return An instance of ::rb_cIO.
+ */
+VALUE rb_file_open_str(VALUE fname, const char *fmode);
+
+/**
+ * Much like rb_io_gets(), but it reads from the mysterious ARGF object. ARGF
+ * in this context can be seen as a virtual IO which concatenates contents of
+ * the files passed to the process via the ARGV, or just STDIN if there are no
+ * such files.
+ *
+ * Unlike rb_io_gets() this function sets `$_`.
+ *
+ * @exception rb_eFrozenError ARGF resorts to STDIN but it is frozen.
+ * @retval RUBY_Qnil ARGF is at EOF.
+ * @retval otherwise An instance of ::rb_cString.
+ * @post ARGF is read.
+ * @post `$_` is set.
+ *
+ * @internal
+ *
+ * In reality, this function can call `ARGF.gets`. Its redefinition can affect
+ * the behaviour.
+ *
+ * Also, you can tamper ARGV on-the-fly in middle of ARGF usages:
+ *
+ * ```
+ * gets # Reads the first file.
+ * ARGV << '/proc/self/limits' # Adds a file.
+ * gets # Can read from /proc/self/limits.
+ * ```
+ */
+VALUE rb_gets(void);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Writes the given error message to somewhere applicable. On Windows it goes
+ * to the console. On POSIX environments it goes to the standard error.
+ *
+ * @warning IT IS A BAD IDEA to use this function form your C extensions.
+ * It is often annoying when GUI applications write to consoles;
+ * users don't want to look at there. Programmers also want to
+ * control the cause of the message itself, like by rescuing an
+ * exception. Just let ruby handle errors. That must be better than
+ * going your own way.
+ *
+ * @param[in] str Error message to display.
+ * @post `str` is written to somewhere.
+ *
+ * @internal
+ *
+ * AFAIK this function is listed here without marked deprecated because there
+ * are usages of this function in the wild.
+ */
+void rb_write_error(const char *str);
+
+/**
+ * Identical to rb_write_error(), except it additionally takes the message's
+ * length. Necessary when you want to handle wide characters.
+ *
+ * @param[in] str Error message to display.
+ * @param[in] len Length of `str`, in bytes.
+ * @post `str` is written to somewhere.
+ */
+void rb_write_error2(const char *str, long len);
+
+/**
+ * Closes everything. In case of POSIX environments, a child process inherits
+ * its parent's opened file descriptors. Which is nowadays considered as one
+ * of the UNIX mistakes. This function closes such inherited file descriptors.
+ * When your C extension needs to have a child process, don't forget to call
+ * this from your child process right before exec.
+ *
+ * @param[in] lowfd Lower bound of FDs (you want STDIN to remain, no?).
+ * @param[in] maxhint Hint of max FDs.
+ * @param[in] noclose_fds A hash, whose keys are an allowlist.
+ *
+ * @internal
+ *
+ * As of writing, in spite of the name, this function does not actually close
+ * anything. It just sets `FD_CLOEXEC` for everything and let `execve(2)` to
+ * atomically close them at once. This is because as far as we know there are
+ * no such platform that has `fork(2)` but lacks `FD_CLOEXEC`.
+ *
+ * Because this function is expected to run on a forked process it is entirely
+ * async-signal-safe.
+ */
+void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is an rb_cloexec_pipe() + rb_update_max_fd() combo.
+ *
+ * @param[out] pipes Return buffer. Must at least hold 2 elements.
+ * @retval 0 Successful creation of a pipe.
+ * @retval -1 Failure in underlying system call(s).
+ * @post `pipes` is filled with file descriptors.
+ * @post `errno` is set on failure.
+ */
+int rb_pipe(int *pipes);
+
+/**
+ * Queries if the given FD is reserved or not. Occasionally Ruby interpreter
+ * opens files for its own purposes. Use this function to prevent touching
+ * such behind-the-scene descriptors.
+ *
+ * @param[in] fd Target file descriptor.
+ * @retval 1 `fd` is reserved.
+ * @retval 0 Otherwise.
+ */
+int rb_reserved_fd_p(int fd);
+
+/** @alias{rb_reserved_fd_p} */
+#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
+
+/**
+ * Opens a file that closes on exec. In case of POSIX environments, a child
+ * process inherits its parent's opened file descriptors. Which is nowadays
+ * considered as one of the UNIX mistakes. This function opens a file
+ * descriptor as `open(2)` does, but additionally instructs the operating
+ * system that we don't want it be seen from child processes.
+ *
+ * @param[in] pathname File path to open.
+ * @param[in] flags Open mode, as in `open(2)`.
+ * @param[in] mode File mode, in case of `O_CREAT`.
+ * @retval -1 `open(2)` failed for some reason.
+ * @retval otherwise An allocated new file descriptor.
+ * @note This function does not raise.
+ *
+ * @internal
+ *
+ * Whether this function can take NULL or not depends on the underlying open(2)
+ * system call implementation but @shyouhei doesn't think it's worth trying.
+ */
+int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
+
+/**
+ * Identical to rb_cloexec_fcntl_dupfd(), except it implies minfd is 3.
+ *
+ * @param[in] oldfd File descriptor to duplicate.
+ * @retval -1 `dup2(2)` failed for some reason.
+ * @retval otherwise An allocated new file descriptor.
+ * @note This function does not raise.
+ */
+int rb_cloexec_dup(int oldfd);
+
+/**
+ * Identical to rb_cloexec_dup(), except you can specify the destination file
+ * descriptor. If the destination is already squatted by another file
+ * descriptor that gets silently closed without any warnings. (This is a spec
+ * requested by POSIX.)
+ *
+ * @param[in] oldfd File descriptor to duplicate.
+ * @param[in] newfd Return value destination.
+ * @retval -1 `dup2(2)` failed for some reason.
+ * @retval newfd An allocated new file descriptor.
+ * @post Whatever sat at `newfd` gets closed with no notifications.
+ * @post In case return value is -1 `newfd` is untouched.
+ * @note This function does not raise.
+ */
+int rb_cloexec_dup2(int oldfd, int newfd);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Opens a pipe with closing on exec. In case of POSIX environments, a child
+ * process inherits its parent's opened file descriptors. Which is nowadays
+ * considered as one of the UNIX mistakes. This function opens a pipe as
+ * `pipe(2)` does, but additionally instructs the operating system that we
+ * don't want the duplicated FDs be seen from child processes.
+ *
+ * @param[out] fildes Return buffer. Must at least hold 2 elements.
+ * @retval 0 Successful creation of a pipe.
+ * @retval -1 Failure in underlying system call(s).
+ * @post `pipes` is filled with file descriptors.
+ * @post `errno` is set on failure.
+ */
+int rb_cloexec_pipe(int fildes[2]);
+
+/**
+ * Duplicates a file descriptor with closing on exec. In case of POSIX
+ * environments, a child process inherits its parent's opened file descriptors.
+ * Which is nowadays considered as one of the UNIX mistakes. This function
+ * duplicates a file descriptor as `dup(2)` does, but additionally instructs
+ * the operating system that we don't want the duplicated FD be seen from child
+ * processes.
+ *
+ * @param[in] fd File descriptor to duplicate.
+ * @param[in] minfd Minimum allowed FD to return.
+ * @retval -1 `dup(2)` failed for some reason.
+ * @retval otherwise An allocated new file descriptor.
+ * @note This function does not raise.
+ *
+ * `minfd` is handy when for instance STDERR is closed but you don't want to
+ * use fd 2.
+ */
+int rb_cloexec_fcntl_dupfd(int fd, int minfd);
+
+/**
+ * Informs the interpreter that the passed fd can be the max. This information
+ * is used from rb_close_before_exec().
+ *
+ * @param[in] fd An open FD, which can be large.
+ */
+void rb_update_max_fd(int fd);
+
+/**
+ * Sets or clears the close-on-exec flag of the passed file descriptor to the
+ * desired state. STDIN, STDOUT, STDERR are the exceptional file descriptors
+ * that shall remain open. All others are to be closed on exec. When a C
+ * extension library opens a file descriptor using anything other than
+ * rb_cloexec_open() etc., that file descriptor shall experience this function.
+ *
+ * @param[in] fd An open file descriptor.
+ */
+void rb_fd_fix_cloexec(int fd);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_IO_H */
diff --git a/include/ruby/internal/intern/load.h b/include/ruby/internal/intern/load.h
new file mode 100644
index 0000000000..288a16c2ec
--- /dev/null
+++ b/include/ruby/internal/intern/load.h
@@ -0,0 +1,218 @@
+#ifndef RBIMPL_INTERN_LOAD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_LOAD_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_f_require().
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* load.c */
+
+/**
+ * Loads and executes the Ruby program in the given file.
+ *
+ * If the path is an absolute path (e.g. starts with `'/'`), the file will be
+ * loaded directly using the absolute path. If the path is an explicit
+ * relative path (e.g. starts with `'./'` or `'../'`), the file will be loaded
+ * using the relative path from the current directory. Otherwise, the file
+ * will be searched for in the library directories listed in the `$LOAD_PATH`.
+ * If the file is found in a directory, this function will attempt to load the
+ * file relative to that directory. If the file is not found in any of the
+ * directories in the `$LOAD_PATH`, the file will be loaded using the relative
+ * path from the current directory.
+ *
+ * If the file doesn't exist when there is an attempt to load it, a LoadError
+ * will be raised.
+ *
+ * If the `wrap` parameter is true, the loaded script will be executed under an
+ * anonymous module, protecting the calling program's global namespace. In no
+ * circumstance will any local variables in the loaded file be propagated to
+ * the loading environment.
+ *
+ * @param[in] path Pathname of a file to load.
+ * @param[in] wrap Either to load under an anonymous module.
+ * @exception rb_eTypeError `path` is not a string.
+ * @exception rb_eArgError `path` is broken as a pathname.
+ * @exception rb_eEncCompatError `path` is incompatible with pathnames.
+ * @exception rb_eLoadError `path` not found.
+ * @exception rb_eException Any exceptions while loading the contents.
+ *
+ * @internal
+ *
+ * It seems this function is under the rule of bootsnap's regime?
+ */
+void rb_load(VALUE path, int wrap);
+
+/**
+ * Identical to rb_load(), except it avoids potential global escapes. Such
+ * global escapes include exceptions, `throw`, `break`, for example.
+ *
+ * It first evaluates the given file as rb_load() does. If no global escape
+ * occurred during the evaluation, it `*state` is set to zero on return.
+ * Otherwise, it sets `*state` to nonzero. If state is `NULL`, it is not set
+ * in both cases.
+ *
+ * @param[in] path Pathname of a file to load.
+ * @param[in] wrap Either to load under an anonymous module.
+ * @param[out] state State of execution.
+ * @post `*state` is set to zero if succeeded. Nonzero otherwise.
+ * @warning You have to clear the error info with `rb_set_errinfo(Qnil)` if
+ * you decide to ignore the caught exception.
+ * @see rb_load
+ * @see rb_protect
+ *
+ * @internal
+ *
+ * Though not a part of our public API, `state` is in fact an
+ * enum ruby_tag_type. You can see the potential "nonzero" values by looking
+ * at vm_core.h.
+ */
+void rb_load_protect(VALUE path, int wrap, int *state);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries if the given feature has already been loaded into the execution
+ * context. The "feature" head are things like `"json"` or `"socket"`.
+ *
+ * @param[in] feature Name of a library you want to know about.
+ * @retval 1 Yes there is.
+ * @retval 0 Not yet.
+ */
+int rb_provided(const char *feature);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_provided(), except it additionally returns the "canonical"
+ * name of the loaded feature. This can be handy when for instance you want to
+ * know the actually loaded library is either `foo.rb` or `foo.so`.
+ *
+ * @param[in] feature Name of a library you want to know about.
+ * @param[out] loading Return buffer.
+ * @retval 1 Yes there is.
+ * @retval 0 Not yet.
+ */
+int rb_feature_provided(const char *feature, const char **loading);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Declares that the given feature is already provided by someone else. This
+ * API can be handy when you have an extension called `foo.so` which, when
+ * required, also provides functionality of `bar.so`.
+ *
+ * @param[in] feature Name of a library which had already been provided.
+ * @post No further `require` would search `feature`.
+ */
+void rb_provide(const char *feature);
+
+/**
+ * Identical to rb_require_string(), except it ignores the first argument for
+ * no reason. There seems to be no reason for 3rd party extension libraries to
+ * use it.
+ *
+ * @param[in] self Ignored. Can be anything.
+ * @param[in] feature Name of a feature, e.g. `"json"`.
+ * @exception rb_eLoadError No such feature.
+ * @exception rb_eRuntimeError `$"` is frozen; unable to push.
+ * @retval RUBY_Qtrue The feature is loaded for the first time.
+ * @retval RUBY_Qfalse The feature has already been loaded.
+ * @post `$"` is updated.
+ */
+VALUE rb_f_require(VALUE self, VALUE feature);
+
+/**
+ * Finds and loads the given feature, if absent.
+ *
+ * If the feature is an absolute path (e.g. starts with `'/'`), the feature
+ * will be loaded directly using the absolute path. If the feature is an
+ * explicit relative path (e.g. starts with `'./'` or `'../'`), the feature
+ * will be loaded using the relative path from the current directory.
+ * Otherwise, the feature will be searched for in the library directories
+ * listed in the `$LOAD_PATH`.
+ *
+ * If the feature has the extension `".rb"`, it is loaded as a source file; if
+ * the extension is `".so"`, `".o"`, or `".dll"`, or the default shared library
+ * extension on the current platform, Ruby loads the shared library as a Ruby
+ * extension. Otherwise, Ruby tries adding `".rb"`, `".so"`, and so on to the
+ * name until found. If the file named cannot be found, a LoadError will be
+ * raised.
+ *
+ * For extension libraries the given feature may use any shared library
+ * extension. For example, on Linux you can require `"socket.dll"` to actually
+ * load `socket.so`.
+ *
+ * The absolute path of the loaded file is added to `$LOADED_FEATURES`. A file
+ * will not be loaded again if its path already appears in there.
+ *
+ * Any constants or globals within the loaded source file will be available in
+ * the calling program's global namespace. However, local variables will not
+ * be propagated to the loading environment.
+ *
+ * @param[in] feature Name of a feature, e.g. `"json"`.
+ * @exception rb_eLoadError No such feature.
+ * @exception rb_eRuntimeError `$"` is frozen; unable to push.
+ * @retval RUBY_Qtrue The feature is loaded for the first time.
+ * @retval RUBY_Qfalse The feature has already been loaded.
+ * @post `$"` is updated.
+ */
+VALUE rb_require_string(VALUE feature);
+
+/**
+ * @name extension configuration
+ * @{
+ */
+
+/**
+ * Asserts that the extension library that calls this function is aware of
+ * Ractor. Multiple Ractors run without protecting each other. This doesn't
+ * interface well with C programs, unless designed with an in-depth
+ * understanding of how Ractors work. Extension libraries are shut out from
+ * Ractors by default. This API is to bypass that restriction. Once after it
+ * was called, successive calls to rb_define_method() etc. become definitions
+ * of methods that are aware of Ractors. The amendment would be in effect
+ * until the end of rb_require_string() etc.
+ *
+ * @param[in] flag Either the library is aware of Ractors or not.
+ * @post Methods would be callable form Ractors, if `flag` is true.
+ */
+void rb_ext_ractor_safe(bool flag);
+
+/** @alias{rb_ext_ractor_safe} */
+#define RB_EXT_RACTOR_SAFE(f) rb_ext_ractor_safe(f)
+
+/**
+ * This macro is to provide backwards compatibility. It must be safe to do
+ * something like:
+ *
+ * ```CXX
+ * #ifdef HAVE_RB_EXT_RACTOR_SAFE
+ * rb_ext_ractor_safe(true);
+ * #endif
+ * ```
+ */
+#define HAVE_RB_EXT_RACTOR_SAFE 1
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_LOAD_H */
diff --git a/include/ruby/internal/intern/marshal.h b/include/ruby/internal/intern/marshal.h
new file mode 100644
index 0000000000..118d78a4a0
--- /dev/null
+++ b/include/ruby/internal/intern/marshal.h
@@ -0,0 +1,112 @@
+#ifndef RBIMPL_INTERN_MARSHAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_MARSHAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to rb_mMarshal.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* marshal.c */
+
+/**
+ * Serialises the given object and all its referring objects, to write them
+ * down to the passed port.
+ *
+ * @param[in] obj Target object to dump.
+ * @param[out] port IO-like destination buffer.
+ * @exception rb_eTypeError `obj` cannot be dumped for some reason.
+ * @exception rb_eRuntimeError `obj` was tampered during dumping.
+ * @exception rb_eArgError Traversal too deep.
+ * @return The passed `port` as-is.
+ * @post Serialised representation of `obj` is written to `port`.
+ * @note `port` is basically an IO but StringIO is also possible.
+ */
+VALUE rb_marshal_dump(VALUE obj, VALUE port);
+
+/**
+ * Deserialises a previous output of rb_marshal_dump() into a network of
+ * objects.
+ *
+ * @param[in,out] port Either IO or String.
+ * @exception rb_eTypeError `port` is in unexpected type.
+ * @exception rb_eArgError Contents of `port` is broken.
+ * @return Object(s) rebuilt using the info from `port`.
+ *
+ * SECURITY CONSIDERATIONS
+ * ========================
+ *
+ * @warning By design, rb_marshal_load() can deserialise almost any
+ * class loaded into the Ruby process. In many cases this can
+ * lead to remote code execution if the Marshal data is loaded
+ * from an untrusted source.
+ * @warning As a result, rb_marshal_load() is not suitable as a general
+ * purpose serialisation format and you should never unmarshal
+ * user supplied input or other untrusted data.
+ * @warning If you need to deserialise untrusted data, use JSON or
+ * another serialisation format that is only able to load
+ * simple, 'primitive' types such as String, Array, Hash, etc.
+ * Never allow user input to specify arbitrary types to
+ * deserialise into.
+ */
+VALUE rb_marshal_load(VALUE port);
+
+/**
+ * Marshal format compatibility layer. Over time, classes evolve, so that
+ * their internal data structure change drastically. For instance an instance
+ * of ::rb_cRange was made of ::RUBY_T_OBJECT in 1.x., but in 3.x it is a
+ * ::RUBY_T_STRUCT now. In order to keep binary compatibility, we "fake" the
+ * marshalled representation to stick to old types. This is the API to enable
+ * that manoeuvre. Here is how:
+ *
+ * First, because you are going to keep backwards compatibility, you need to
+ * retain the old implementation of your class. Rename it, and keep the class
+ * somewhere (for instance rb_register_global_address() could help). Next
+ * create your new class. Do whatever you want.
+ *
+ * Then, this is the key point. Create two new "bridge" functions that convert
+ * the structs back and forth:
+ *
+ * - the "dumper" function that takes an instance of the new class, and
+ * returns an instance of the old one. This is called from
+ * rb_marshal_dump(), to keep it possible for old programs to read your new
+ * data.
+ *
+ * - the "loader" function that takes two arguments, new one and old one, in
+ * that order. rb_marshal_load() calls this function when it finds a
+ * representation of the retained old class. The old one passed to this
+ * function is the reconstructed instance of the old class.
+ * Reverse-engineer that to modify the new one, to have the identical
+ * contents.
+ *
+ * Finally, connect all of them using this function.
+ *
+ * @param[in] newclass The class that needs conversion.
+ * @param[in] oldclass Old implementation of `newclass`.
+ * @param[in] dumper Function that converts `newclass` to `oldclass`.
+ * @param[in] loader Function that converts `oldclass` to `newclass`.
+ * @exception rb_eTypeError `newclass` has no allocator.
+ */
+void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_MARSHAL_H */
diff --git a/include/ruby/internal/intern/numeric.h b/include/ruby/internal/intern/numeric.h
new file mode 100644
index 0000000000..30863fb0c8
--- /dev/null
+++ b/include/ruby/internal/intern/numeric.h
@@ -0,0 +1,208 @@
+#ifndef RBIMPL_INTERN_NUMERIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_NUMERIC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cNumeric.
+ */
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* numeric.c */
+
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_COLD()
+/**
+ * Just always raises an exception.
+ *
+ * @exception rb_eZeroDivError Division by zero error.
+ */
+void rb_num_zerodiv(void);
+
+/**
+ * @name Coercion operators.
+ *
+ * What is a coercion? Well Ruby is basically an OOPL but it also has
+ * arithmetic operators. They are implemented in OO manners. For instance
+ * `a+b` is a binary operation `+`, whose receiver is `a`, and whose (sole)
+ * argument is `b`.
+ *
+ * The problem is, you often want `a+b == b+a` to hold. That is easy if both
+ * `a` and `b` belongs to the same class... Ensuring `1 + 2 == 2 + 1` is kind
+ * of intuitive. But if you want `1.0 + 2 == 2 + 1.0`, things start getting
+ * complicated. `1.0+2` is `Float#+`, while `2+1.0` is `Integer#+`. In order
+ * to achieve the equality Float's and Integer's methods must agree with their
+ * behaviours.
+ *
+ * Now. Floats versus Integers situation is still controllable because they
+ * are both built-in. But in Ruby you can define your own numeric classes.
+ * BigDecimal, which is a rubygems gem distributed along with the interpreter,
+ * is one of such examples. Rational was another such example before. In
+ * short you cannot create list of all possible combination of the classes that
+ * could be the operand of `+` operator. Then how do we achieve the
+ * commutativity?
+ *
+ * Here comes the concept of coercion. If a definition of an operator
+ * encounters an object which is unknown to the author, just assumes that the
+ * unknown object knows how to handle the situation. So for instance when
+ * `1+x` has unknown `x`, it lets the `x` handle this.
+ *
+ * ```ruby
+ * class Foo
+ * def +(x)
+ * if we_know_what_is_x? then
+ * ... # handle here
+ * else
+ * y, z = x.coerce self
+ * return y + z
+ * end
+ * end
+ * end
+ * ```
+ *
+ * The `x.coerce` method returns a 2-element array which are "casted" versions
+ * of `x` and `self`.
+ *
+ * @{
+ */
+
+/**
+ * Coerced binary operation. This function first coerces the two objects, then
+ * applies the operation.
+ *
+ * @param[in] lhs LHS operand.
+ * @param[in] rhs RHS operand.
+ * @param[in] op Operator method name.
+ * @exception rb_eTypeError Coercion failed for some reason.
+ * @return `lhs op rhs`, in a coerced way.
+ */
+VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op);
+
+/**
+ * Identical to rb_num_coerce_bin(), except for return values. This function
+ * best suits for comparison operators e.g. `<=>`.
+ *
+ * @param[in] lhs LHS operand.
+ * @param[in] rhs RHS operand.
+ * @param[in] op Operator method name.
+ * @retval RUBY_Qnil Coercion failed for some reason.
+ * @retval otherwise `lhs op rhs`, in a coerced way.
+ */
+VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op);
+
+/**
+ * Identical to rb_num_coerce_cmp(), except for return values. This function
+ * best suits for relationship operators e.g. `<=`.
+ *
+ * @param[in] lhs LHS operand.
+ * @param[in] rhs RHS operand.
+ * @param[in] op Operator method name.
+ * @exception rb_eArgError Coercion failed for some reason.
+ * @return `lhs op rhs`, in a coerced way.
+ */
+VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op);
+
+/**
+ * This one is optimised for bitwise operations, but the API is identical to
+ * rb_num_coerce_bin().
+ *
+ * @param[in] lhs LHS operand.
+ * @param[in] rhs RHS operand.
+ * @param[in] op Operator method name.
+ * @exception rb_eArgError Coercion failed for some reason.
+ * @return `lhs op rhs`, in a coerced way.
+ */
+VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op);
+
+/** @} */
+
+/**
+ * Converts a numeric value into a Fixnum. This is not a preserving
+ * conversion; for instance 1.5 would be converted into 1.
+ *
+ * @param[in] val A numeric object.
+ * @exception rb_eTypeError No conversion from `val` to Integer.
+ * @exception rb_eRangeError `val` out of range.
+ * @return A fixnum converted from `val`.
+ *
+ * @internal
+ *
+ * This seems used from nowhere?
+ */
+VALUE rb_num2fix(VALUE val);
+
+/**
+ * Generates a place-value representation of the given Fixnum, with given
+ * radix.
+ *
+ * @param[in] val A fixnum to stringify.
+ * @param[in] base `2` to `36` inclusive for each radix.
+ * @exception rb_eArgError `base` is out of range.
+ * @return An instance of ::rb_cString representing `val`.
+ * @pre `val` must be a Fixnum (no checks performed).
+ */
+VALUE rb_fix2str(VALUE val, int base);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Compares two `double`s. Handy when implementing a spaceship operator.
+ *
+ * @param[in] lhs A value.
+ * @param[in] rhs Another value.
+ * @retval RB_INT2FIX(-1) `lhs` is "bigger than" `rhs`.
+ * @retval RB_INT2FIX(1) `rhs` is "bigger than" `lhs`.
+ * @retval RB_INT2FIX(0) They are equal.
+ * @retval RUBY_Qnil Not comparable, e.g. NaN.
+ */
+VALUE rb_dbl_cmp(double lhs, double rhs);
+
+/**
+ * Raises the passed `x` to the power of `y`.
+ *
+ * @note The return value can be really big.
+ * @note Also the return value can be really small, in case `x` is a
+ * negative number.
+ * @param[in] x A number.
+ * @param[in] y Another number.
+ * @retval Inf Cannot express the result.
+ * @retval 1 Either `y` is 0 or `x` is 1.
+ * @retval otherwise An instance of ::rb_cInteger whose value is `x ** y`.
+ *
+ * @internal
+ *
+ * This function returns Infinity when `y` is big enough not to fit into a
+ * Fixnum. Warning is issued then.
+ */
+RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_NUMERIC_H */
diff --git a/include/ruby/internal/intern/object.h b/include/ruby/internal/intern/object.h
new file mode 100644
index 0000000000..b9ffa57c06
--- /dev/null
+++ b/include/ruby/internal/intern/object.h
@@ -0,0 +1,501 @@
+#ifndef RBIMPL_INTERN_OBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_OBJECT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cObject.
+ */
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * This macro is (used but) mysterious. Why on earth do we need this?
+ *
+ * - `obj != orig` check is done anyways inside of rb_obj_init_copy().
+ * - rb_obj_init_copy() returns something. No need are there to add `, 1`.
+ */
+#define RB_OBJ_INIT_COPY(obj, orig) \
+ ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
+/** @old{RB_OBJ_INIT_COPY} */
+#define OBJ_INIT_COPY(obj, orig) RB_OBJ_INIT_COPY(obj, orig)
+
+/* object.c */
+
+/**
+ * Identical to rb_class_new_instance(), except it passes the passed keywords
+ * if any to the `#initialize` method.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] klass An instance of ::rb_cClass.
+ * @exception rb_eTypeError `klass`'s allocator is undefined.
+ * @exception rb_eException Any exceptions can happen inside.
+ * @return An allocated new instance of `klass`.
+ * @note This is _the_ implementation of `Object.new`.
+ */
+VALUE rb_class_new_instance_pass_kw(int argc, const VALUE *argv, VALUE klass);
+
+/**
+ * Allocates, then initialises an instance of the given class. It first calls
+ * the passed class' allocator to obtain an uninitialised object, then calls
+ * its initialiser with the remaining arguments.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arguments passed to `#initialize`.
+ * @param[in] klass An instance of ::rb_cClass.
+ * @exception rb_eTypeError `klass`'s allocator is undefined.
+ * @exception rb_eException Any exceptions can happen inside.
+ * @return An allocated new instance of `klass`.
+ */
+VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass);
+
+/**
+ * Identical to rb_class_new_instance(), except you can specify how to handle
+ * the last element of the given array.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] klass An instance of ::rb_cClass.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eTypeError `klass`'s allocator is undefined.
+ * @exception rb_eException Any exceptions can happen inside.
+ * @return An allocated new instance of `klass`.
+ */
+VALUE rb_class_new_instance_kw(int argc, const VALUE *argv, VALUE klass, int kw_splat);
+
+/**
+ * Checks for equality of the passed objects, in terms of `Object#eql?`.
+ *
+ * @param[in] lhs Comparison left hand side.
+ * @param[in] rhs Comparison right hand side.
+ * @retval non-zero They are equal.
+ * @retval 0 Otherwise.
+ * @note This function actually calls `lhs.eql?(rhs)` so you cannot
+ * implement your class' `#eql?` method using it.
+ */
+int rb_eql(VALUE lhs, VALUE rhs);
+
+/**
+ * Generates a textual representation of the given object.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return An instance of ::rb_cString that represents `obj`.
+ * @note This is the default implementation of `Object#to_s` that each
+ * subclasses want to override.
+ */
+VALUE rb_any_to_s(VALUE obj);
+
+/**
+ * Generates a human-readable textual representation of the given object. This
+ * is largely similar to Ruby level `Object#inspect` but not the same; it
+ * additionally escapes the inspection result so that the string be compatible
+ * with that of default internal (or default external, if absent).
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return An instance of ::rb_cString that represents `obj`.
+ */
+VALUE rb_inspect(VALUE obj);
+
+/**
+ * Queries if the given object is a direct instance of the given class.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @param[in] klass An instance of ::rb_cModule.
+ * @exception rb_eTypeError `klass` is neither module nor class.
+ * @retval RUBY_Qtrue `obj` is an instance of `klass`.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_obj_is_instance_of(VALUE obj, VALUE klass);
+
+/**
+ * Queries if the given object is an instance (of possibly descendants) of the
+ * given class.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @param[in] klass An instance of ::rb_cModule.
+ * @exception rb_eTypeError `klass` is neither module nor class.
+ * @retval RUBY_Qtrue `obj` is a `klass`.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_obj_is_kind_of(VALUE obj, VALUE klass);
+
+/**
+ * Allocates an instance of the given class.
+ *
+ * @param[in] klass A class to instantiate.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @return An allocated, not yet initialised instance of `klass`.
+ * @note It calls the allocator defined by rb_define_alloc_func(). You
+ * cannot use this function to define an allocator. Use
+ * rb_newobj_of(), #TypedData_Make_Struct or others, instead.
+ * @note Usually prefer rb_class_new_instance() to rb_obj_alloc() and
+ * rb_obj_call_init().
+ * @see rb_class_new_instance()
+ * @see rb_obj_call_init()
+ * @see rb_define_alloc_func()
+ * @see rb_newobj_of()
+ * @see #TypedData_Make_Struct
+ */
+VALUE rb_obj_alloc(VALUE klass);
+
+/**
+ * Produces a shallow copy of the given object. Its list of instance variables
+ * are copied, but not the objects they reference. It also copies the frozen
+ * value state.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @exception rb_eException `#initialize_copy` can raise anything.
+ * @return A "clone" of `obj`.
+ *
+ * @internal
+ *
+ * Unlike ruby-level `Object#clone`, there is no way to control the frozen-ness
+ * of the return value.
+ */
+VALUE rb_obj_clone(VALUE obj);
+
+/**
+ * Duplicates the given object. This does almost the same thing as
+ * rb_obj_clone() do. However it does not copy the singleton class (if any).
+ * It also doesn't copy frozen-ness.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @exception rb_eException `#initialize_copy` can raise anything.
+ * @return A shallow copy of `obj`.
+ */
+VALUE rb_obj_dup(VALUE obj);
+
+/**
+ * Default implementation of `#initialize_copy`, `#initialize_dup` and
+ * `#initialize_clone`. It does almost nothing. Just raises exceptions for
+ * checks.
+ *
+ * @param[in] dst The destination object.
+ * @param[in] src The source object.
+ * @exception rb_eFrozenError `dst` is frozen.
+ * @exception rb_eTypeError `dst` and `src` have different classes.
+ * @return Always returns `dst`.
+ */
+VALUE rb_obj_init_copy(VALUE src, VALUE dst);
+
+/**
+ * Just calls rb_obj_freeze_inline() inside. Does this make any sens to
+ * extension libraries?
+ *
+ * @param[out] obj Object to freeze.
+ * @return Verbatim `obj`.
+ */
+VALUE rb_obj_freeze(VALUE obj);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Just calls RB_OBJ_FROZEN() inside. Does this make any sens to extension
+ * libraries?
+ *
+ * @param[in] obj Object in question.
+ * @retval RUBY_Qtrue Yes it is.
+ * @retval RUBY_Qfalse No it isn't.
+ */
+VALUE rb_obj_frozen_p(VALUE obj);
+
+/* gc.c */
+
+/**
+ * Finds or creates an integer primary key of the given object. In the old
+ * days this function was a purely arithmetic operation that maps the
+ * underlying memory address where the object resides into a Ruby's integer.
+ * Some time around 2.x this changed. It no longer relates its return values
+ * to C level pointers. This function assigns some random number to the given
+ * object if absent. The same number will be returned on all subsequent
+ * requests. No two active objects share a number.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return An instance of ::rb_cInteger which is an "identifier" of `obj`.
+ *
+ * @internal
+ *
+ * The "some random number" is in fact a monotonic-increasing process-global
+ * unique integer, much like an `INTEGER AUTO_INCREMENT PRIMARY KEY` column in
+ * a MySQL table.
+ */
+VALUE rb_obj_id(VALUE obj);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Identical to rb_obj_id(), except it hesitates from allocating a new instance
+ * of ::rb_cInteger. rb_obj_id() could allocate ::RUBY_T_BIGNUM objects. That
+ * allocation might perhaps impact negatively. On such situations, this
+ * function instead returns one-shot temporary small integers that need no
+ * allocations at all. The values are guaranteed unique at the moment, but no
+ * future promise is made; could be reused. Use of this API should be very
+ * instant. It is a failure to store the returned integer to somewhere else.
+ *
+ * In short it is difficult to use.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return An instance of ::rb_cInteger unique at the moment.
+ *
+ * @internal
+ *
+ * This is roughly the old behaviour of rb_obj_id().
+ */
+VALUE rb_memory_id(VALUE obj);
+
+/* object.c */
+
+RBIMPL_ATTR_PURE()
+/**
+ * Finds a "real" class. As the name implies there are class objects that are
+ * surreal. This function takes a class, traverses its ancestry tree, and
+ * returns its nearest ancestor which is neither a module nor a singleton
+ * class.
+ *
+ * @param[in] klass An instance of ::rb_cClass.
+ * @retval RUBY_Qfalse No real class in `klass`' ancestry tree.
+ * @retval klass `klass` itself is a real class.
+ * @retval otherwise Nearest ancestor of `klass` who is real.
+ */
+VALUE rb_class_real(VALUE klass);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Determines if the given two modules are relatives.
+ *
+ * @param[in] scion Possible subclass.
+ * @param[in] ascendant Possible superclass.
+ * @exception rb_eTypeError `ascendant` is not a module.
+ * @retval RUBY_Qtrue `scion` inherits, or is equal to `ascendant`.
+ * @retval RUBY_Qfalse `ascendant` inherits `scion`.
+ * @retval RUBY_Qnil They are not relatives.
+ */
+VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the parent of the given class.
+ *
+ * @param[in] klass A child class.
+ * @exception rb_eTypeError `klass` is a `Class.allocate`.
+ * @retval RUBY_Qfalse `klass` has no superclass.
+ * @retval otherwise `klass`' superclass.
+ *
+ * @internal
+ *
+ * Is there any class except ::rb_cBasicObject, that has no superclass?
+ */
+VALUE rb_class_superclass(VALUE klass);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Converts an object into another type. Calls the specified conversion method
+ * if necessary.
+ *
+ * @param[in] val An object to convert.
+ * @param[in] type A value of enum ::ruby_value_type.
+ * @param[in] name Name to display on error (e.g. "Array").
+ * @param[in] mid Conversion method (e.g. "to_ary").
+ * @exception rb_eTypeError Failed to convert.
+ * @return An object of the specified type.
+ */
+VALUE rb_convert_type(VALUE val, int type, const char *name, const char *mid);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_convert_type(), except it returns ::RUBY_Qnil instead of
+ * raising exceptions, in case of conversion failure. It still raises
+ * exceptions for various reasons, like when the conversion method itself
+ * raises, though.
+ *
+ * @param[in] val An object to convert.
+ * @param[in] type A value of enum ::ruby_value_type.
+ * @param[in] name Name to display on error (e.g. "Array").
+ * @param[in] mid Conversion method (e.g. "to_ary").
+ * @exception rb_eTypeError The `mid` does not generate `type`.
+ * @retval RUBY_Qnil No conversion defined.
+ * @retval otherwise An object of the specified type.
+ */
+VALUE rb_check_convert_type(VALUE val, int type, const char *name, const char *mid);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_check_convert_type(), except the return value type is fixed
+ * to ::rb_cInteger.
+ *
+ * @param[in] val An object to convert.
+ * @param[in] mid Conversion method (e.g. "to_ary").
+ * @exception rb_eTypeError The `mid` does not generate an integer.
+ * @retval RUBY_Qnil No conversion defined.
+ * @retval otherwise An instance of ::rb_cInteger.
+ */
+VALUE rb_check_to_integer(VALUE val, const char *mid);
+
+/**
+ * This is complicated.
+ *
+ * - When the passed object is already an instance of ::rb_cFloat, just
+ * returns it as-is.
+ *
+ * - When the passed object is something numeric, the function tries to
+ * convert it using `#to_f` method.
+ *
+ * - If that conversion fails (this happens for instance when the numeric
+ * is a complex) it returns ::RUBY_Qnil.
+ *
+ * - Otherwise returns the conversion result.
+ *
+ * - Otherwise it also returns ::RUBY_Qnil.
+ *
+ * @param[in] val An object to convert.
+ * @retval RUBY_Qnil Conversion from `val` to float is undefined.
+ * @retval otherwise Converted result.
+ */
+VALUE rb_check_to_float(VALUE val);
+
+/**
+ * Identical to rb_check_to_int(), except it raises in case of conversion
+ * mismatch.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eTypeError `#to_int` does not generate an integer.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_to_int(VALUE val);
+
+/**
+ * Identical to rb_check_to_integer(), except it uses `#to_int` for conversion.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eTypeError `#to_int` does not return an integer.
+ * @retval RUBY_Qnil No conversion defined.
+ * @retval otherwise An instance of ::rb_cInteger.
+ */
+VALUE rb_check_to_int(VALUE val);
+
+/**
+ * This is the logic behind `Kernel#Integer`. Numeric types are converted
+ * directly, with floating point numbers being truncated. Strings are
+ * interpreted strictly; only leading/trailing whitespaces, plus/minus sign,
+ * radix indicators such as `0x`, digits, and underscores are allowed.
+ * Anything else are converted by first trying `#to_int`, then `#to_i`.
+ *
+ * This is slightly stricter than `String#to_i`.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eArgError Malformed `val` passed.
+ * @exception rb_eTypeError No conversion defined.
+ * @return An instance of ::rb_cInteger.
+ */
+VALUE rb_Integer(VALUE val);
+
+/**
+ * Identical to rb_check_to_float(), except it raises on error.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eTypeError No conversion defined.
+ * @return An instance of ::rb_cFloat.
+ */
+VALUE rb_to_float(VALUE val);
+
+/**
+ * This is the logic behind `Kernel#Float`. Numeric types are converted
+ * directly to the nearest value that a Float can represent. Strings are
+ * interpreted strictly; only leading/trailing whitespaces are allowed except
+ * what `strtod` understands. Anything else are converted using `#to_f`.
+ *
+ * This is slightly stricter than `String#to_f`.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eArgError Malformed `val` passed.
+ * @exception rb_eTypeError No conversion defined.
+ * @return An instance of ::rb_cFloat.
+ */
+VALUE rb_Float(VALUE val);
+
+/**
+ * This is the logic behind `Kernel#String`. Arguments are converted by first
+ * trying `#to_str`, then `#to_s`.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eTypeError No conversion defined.
+ * @return An instance of ::rb_cString.
+ */
+VALUE rb_String(VALUE val);
+
+/**
+ * This is the logic behind `Kernel#Array`. Arguments are converted by first
+ * trying `#to_ary`, then `#to_a`, and if both failed, returns an array of
+ * length 1 that contains the passed argument as the sole contents.
+ *
+ * @param[in] val An object to convert.
+ * @return An instance of ::rb_cArray.
+ */
+VALUE rb_Array(VALUE val);
+
+/**
+ * This is the logic behind `Kernel#Hash`. Arguments are converted by first
+ * trying `#to_hash`. if it failed, and the argument is either ::RUBY_Qnil or
+ * an empty array, returns an empty hash. Otherwise an exception is raised.
+ *
+ * @param[in] val An object to convert.
+ * @exception rb_eTypeError No conversion defined.
+ * @return An instance of ::rb_cHash.
+ */
+VALUE rb_Hash(VALUE val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Converts a textual representation of a real number into a numeric, which is
+ * the nearest value that the return type can represent, of the value that the
+ * argument represents. This is in fact a 2-in-1 function whose behaviour can
+ * be controlled using the second (mode) argument. If the mode is zero, this
+ * function is in "historical" mode which only understands "floating-constant"
+ * defined at ISO/IEC 9899:1990 section 6.1.3.1. If the mode is nonzero, it is
+ * in "extended" mode, which also accepts "hexadecimal-floating-constant"
+ * defined at ISO/IEC 9899:2018 section 6.4.4.2.
+ *
+ * @param[in] str A textual representation of a real number.
+ * @param[in] mode Conversion mode, as described above.
+ * @exception rb_eArgError Malformed `str` passed.
+ * @see https://bugs.ruby-lang.org/issues/2969
+ * @note Null pointers are allowed, and it returns 0.0 then.
+ */
+double rb_cstr_to_dbl(const char *str, int mode);
+
+/**
+ * Identical to rb_cstr_to_dbl(), except it accepts a Ruby's string instead of
+ * C's.
+ *
+ * @param[in] str A textual representation of a real number.
+ * @param[in] mode Conversion mode, as described in rb_cstr_to_dbl().
+ * @exception rb_eArgError Malformed `str` passed.
+ * @see https://bugs.ruby-lang.org/issues/2969
+ */
+double rb_str_to_dbl(VALUE str, int mode);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_OBJECT_H */
diff --git a/include/ruby/internal/intern/parse.h b/include/ruby/internal/intern/parse.h
new file mode 100644
index 0000000000..7c4e9925b9
--- /dev/null
+++ b/include/ruby/internal/intern/parse.h
@@ -0,0 +1,194 @@
+#ifndef RBIMPL_INTERN_PARSE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PARSE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cSymbol.
+ */
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* symbol.c */
+
+/**
+ * Calculates an ID of attribute writer. For instance it returns `:foo=` when
+ * passed `:foo`.
+ *
+ * @param[in] id An id.
+ * @exception rb_eNameError `id` is not for attributes (e.g. operator).
+ * @return Calculated name of attribute writer.
+ */
+ID rb_id_attrset(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is a constant. In case an ID is in
+ * Unicode (likely), its "constant"-ness is determined if its first character
+ * is either upper case or title case. Otherwise it is detected if case-
+ * folding the first character changes its case or not.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is a constant.
+ * @retval 0 It isn't.
+ */
+int rb_is_const_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is a global variable. A global
+ * variable must start with `$`.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is a global variable.
+ * @retval 0 It isn't.
+ */
+int rb_is_global_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is an instance variable. An
+ * instance variable must start with `@`, but not `@@`.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is an instance variable.
+ * @retval 0 It isn't.
+ */
+int rb_is_instance_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is an attribute writer. An
+ * attribute writer is otherwise a local variable, except it ends with `=`.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is an attribute writer.
+ * @retval 0 It isn't.
+ */
+int rb_is_attrset_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is a class variable. A class
+ * variable is must start with `@@`.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is a class variable.
+ * @retval 0 It isn't.
+ */
+int rb_is_class_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is a local variable. A local
+ * variable starts with a lowercase character, followed by some alphanumeric
+ * characters or `_`, then ends with anything other than `!`, `?`, or `=`.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is a local variable.
+ * @retval 0 It isn't.
+ */
+int rb_is_local_id(ID id);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Classifies the given ID, then sees if it is a junk ID. An ID with no
+ * special syntactic structure is considered junk. This category includes for
+ * instance punctuation.
+ *
+ * @param[in] id An id to classify.
+ * @retval 1 It is a junk.
+ * @retval 0 It isn't.
+ */
+int rb_is_junk_id(ID);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Sees if the passed C string constructs a valid syntactic symbol. Invalid
+ * ones for instance includes whitespaces.
+ *
+ * @param[in] str A C string to check.
+ * @retval 1 It is a valid symbol name.
+ * @retval 0 It is invalid as a symbol name.
+ */
+int rb_symname_p(const char *str);
+
+/* vm.c */
+
+/**
+ * Queries the last match, or `Regexp.last_match`, or the `$~`. You don't have
+ * to use it, because in reality you can get `$~` using rb_gv_get() as usual.
+ *
+ * @retval RUBY_Qnil The method has not ran a regular expression.
+ * @retval otherwise An instance of ::rb_cMatch.
+ */
+VALUE rb_backref_get(void);
+
+/**
+ * Updates `$~`. You don't have to use it, because in reality you can set `$~`
+ * using rb_gv_set() as usual.
+ *
+ * @param[in] md Arbitrary Ruby object.
+ * @post The passed object is assigned to `$~`.
+ *
+ * @internal
+ *
+ * Yes, this function bypasses the Check_Type() that would normally prevent
+ * evil souls from assigning evil objects to `$~`. Use of this function is a
+ * really bad smell.
+ */
+void rb_backref_set(VALUE md);
+
+/**
+ * Queries the last line, or the `$_`. You don't have to use it, because in
+ * reality you can get `$_` using rb_gv_get() as usual.
+ *
+ * @retval RUBY_Qnil There has never been a "line" yet.
+ * @retval otherwise The last set `$_` value.
+ */
+VALUE rb_lastline_get(void);
+
+/**
+ * Updates `$_`. You don't have to use it, because in reality you can set `$_`
+ * using rb_gv_set() as usual.
+ *
+ * @param[in] str Arbitrary Ruby object.
+ * @post The passed object is assigned to `$_`.
+ *
+ * @internal
+ *
+ * Unlike `$~`, you can assign non-strings to `$_`, even from ruby scripts.
+ */
+void rb_lastline_set(VALUE str);
+
+/* symbol.c */
+
+/**
+ * Collects every single bits of symbols that have ever interned in the entire
+ * history of the current process.
+ *
+ * @return An array that contains all symbols that have ever existed.
+ */
+VALUE rb_sym_all_symbols(void);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_PARSE_H */
diff --git a/include/ruby/internal/intern/proc.h b/include/ruby/internal/intern/proc.h
new file mode 100644
index 0000000000..b8c3c5e146
--- /dev/null
+++ b/include/ruby/internal/intern/proc.h
@@ -0,0 +1,353 @@
+#ifndef RBIMPL_INTERN_PROC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PROC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cProc.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/iterator.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* proc.c */
+
+/**
+ * Constructs a Proc object from implicitly passed components. When a ruby
+ * method is called with a block, that block is not explicitly passed around
+ * using C level function parameters. This function gathers all the necessary
+ * info to turn them into a Ruby level instance of ::rb_cProc.
+ *
+ * @exception rb_eArgError There is no passed block.
+ * @return An instance of ::rb_cProc.
+ */
+VALUE rb_block_proc(void);
+
+/**
+ * Identical to rb_proc_new(), except it returns a lambda.
+ *
+ * @exception rb_eArgError There is no passed block.
+ * @return An instance of ::rb_cProc.
+ */
+VALUE rb_block_lambda(void);
+
+/**
+ * This is an rb_iterate() + rb_block_proc() combo.
+ *
+ * ```CXX
+ * VALUE
+ * my_own_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(y, c))
+ * {
+ * const auto plus = rb_intern("+");
+ * return rb_funcall(c, plus, 1, y);
+ * }
+ *
+ * VALUE
+ * my_own_method(VALUE self)
+ * {
+ * return rb_proc_new(my_own_iterator, self);
+ * }
+ * ```
+ *
+ * @param[in] func A backend function of a proc.
+ * @param[in] callback_arg Passed to `func`'s callback_arg.
+ * @return A C-backended proc object.
+ *
+ */
+VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg);
+
+/**
+ * Queries if the given object is a proc.
+ *
+ * @note This is about the object's data structure, not its class etc.
+ * @param[in] recv Object in question.
+ * @retval RUBY_Qtrue It is a proc.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_obj_is_proc(VALUE recv);
+
+/**
+ * Evaluates the passed proc with the passed arguments.
+ *
+ * @param[in] recv The proc to call.
+ * @param[in] args An instance of ::RArray which is the arguments.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the proc evaluates to.
+ */
+VALUE rb_proc_call(VALUE recv, VALUE args);
+
+/**
+ * Identical to rb_proc_call(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in] recv The proc to call.
+ * @param[in] args An instance of ::RArray which is the arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `args`' last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `args`' last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the proc evaluates to.
+ */
+VALUE rb_proc_call_kw(VALUE recv, VALUE args, int kw_splat);
+
+/**
+ * Identical to rb_proc_call(), except you can additionally pass another proc
+ * object, as a block. Nowadays procs can take blocks:
+ *
+ * ```ruby
+ * l = -> (positional, optional=nil, *rest, kwarg:, **kwrest, &block) {
+ * # ... how can we pass this `&block`? ^^^^^^
+ * }
+ * ```
+ *
+ * And this function is to pass one to such procs.
+ *
+ * @param[in] recv The proc to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of proc arguments.
+ * @param[in] proc Proc as a passed block.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the proc evaluates to.
+ */
+VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc);
+
+/**
+ * Identical to rb_proc_call_with_block(), except you can specify how to handle
+ * the last element of the given array. It can also be seen as a routine
+ * identical to rb_proc_call_kw(), except you can additionally pass another
+ * proc object as a block.
+ *
+ * @param[in] recv The proc to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of proc arguments.
+ * @param[in] proc Proc as a passed block.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `args`' last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `args`' last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the proc evaluates to.
+ */
+VALUE rb_proc_call_with_block_kw(VALUE recv, int argc, const VALUE *argv, VALUE proc, int kw_splat);
+
+/**
+ * Queries the number of mandatory arguments of the given Proc. If its block
+ * is declared to take no arguments, returns `0`. If the block is known to
+ * take exactly `n` arguments, returns `n`. If the block has optional
+ * arguments, returns `-n-1`, where `n` is the number of mandatory arguments,
+ * with the exception for blocks that are not lambdas and have only a finite
+ * number of optional arguments; in this latter case, returns `n`. Keyword
+ * arguments will be considered as a single additional argument, that argument
+ * being mandatory if any keyword argument is mandatory.
+ *
+ * @param[in] recv Target Proc object.
+ * @retval 0 It takes no arguments.
+ * @retval >0 It takes exactly this number of arguments.
+ * @retval <0 It takes optional arguments.
+ */
+int rb_proc_arity(VALUE recv);
+
+/**
+ * Queries if the given object is a lambda. Instances of ::rb_cProc are either
+ * lambda or proc. They differ in several points. This function can
+ * distinguish them without actually evaluating their contents.
+ *
+ * @param[in] recv Target proc object.
+ * @retval RUBY_Qtrue It is a lambda.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_proc_lambda_p(VALUE recv);
+
+/**
+ * Snapshots the current execution context and turn it into an instance of
+ * ::rb_cBinding.
+ *
+ * @return An instance of ::rb_cBinding.
+ */
+VALUE rb_binding_new(void);
+
+/**
+ * Creates a method object. A method object is a proc-like object that you can
+ * "call". Note that a method object snapshots the method at the time the
+ * object is created:
+ *
+ * ```ruby
+ * class Foo
+ * def foo
+ * return 1
+ * end
+ * end
+ *
+ * obj = Foo.new.method(:foo)
+ *
+ * class Foo
+ * def foo
+ * return 2
+ * end
+ * end
+ *
+ * obj.call # => 1, not 2.
+ * ```
+ *
+ * @param[in] recv Receiver of the method.
+ * @param[in] mid Method name, in either String or Symbol.
+ * @exception rb_eNoMethodError No such method.
+ * @return An instance of ::rb_cMethod.
+ */
+VALUE rb_obj_method(VALUE recv, VALUE mid);
+
+/**
+ * Queries if the given object is a method.
+ *
+ * @note This is about the object's data structure, not its class etc.
+ * @param[in] recv Object in question.
+ * @retval RUBY_Qtrue It is a method.
+ * @retval RUBY_Qfalse Otherwise.
+ */
+VALUE rb_obj_is_method(VALUE recv);
+
+/**
+ * Evaluates the passed method with the passed arguments.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] recv The method object to call.
+ * @exception rb_eTypeError `recv` is not a method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method returns.
+ */
+VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv);
+
+/**
+ * Identical to rb_method_call(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] recv The method object to call.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `args`' last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `args`' last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eTypeError `recv` is not a method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method returns.
+ */
+VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE recv, int kw_splat);
+
+/**
+ * Identical to rb_proc_call(), except you can additionally pass a proc as a
+ * block.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] recv The method object to call.
+ * @param[in] proc Proc as a passed block.
+ * @exception rb_eTypeError `recv` is not a method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method returns.
+ */
+VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc);
+
+/**
+ * Identical to rb_method_call_with_block(), except you can specify how to
+ * handle the last element of the given array. It can also be seen as a
+ * routine identical to rb_method_call_kw(), except you can additionally pass
+ * another proc object as a block.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] recv The method object to call.
+ * @param[in] proc Proc as a passed block.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `args`' last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `args`' last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @exception rb_eTypeError `recv` is not a method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method returns.
+ */
+VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE recv, VALUE proc, int kw_splat);
+
+/**
+ * Queries the number of mandatory arguments of the method defined in the given
+ * module. If it is declared to take no arguments, returns `0`. If it takes
+ * exactly `n` arguments, returns `n`. If it has optional arguments, returns
+ * `-n-1`, where `n` is the number of mandatory arguments. Keyword arguments
+ * will be considered as a single additional argument, that argument being
+ * mandatory if any keyword argument is mandatory.
+ *
+ * @param[in] mod Namespace to search a method for.
+ * @param[in] mid Method id.
+ * @retval 0 It takes no arguments.
+ * @retval >0 It takes exactly this number of arguments.
+ * @retval <0 It takes optional arguments.
+ */
+int rb_mod_method_arity(VALUE mod, ID mid);
+
+/**
+ * Identical to rb_mod_method_arity(), except it searches for singleton methods
+ * rather than instance methods.
+ *
+ * @param[in] obj Object to search for a singleton method.
+ * @param[in] mid Method id.
+ * @retval 0 It takes no arguments.
+ * @retval >0 It takes exactly this number of arguments.
+ * @retval <0 It takes optional arguments.
+ */
+int rb_obj_method_arity(VALUE obj, ID mid);
+
+/* eval.c */
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Protects a function call from potential global escapes from the function.
+ * Such global escapes include exceptions, `throw`, `break`, for example.
+ *
+ * It first calls the function func with `args` as the argument. If no global
+ * escape occurred during the function, it returns the result and `*state` is
+ * zero. Otherwise, it returns ::RUBY_Qnil and sets `*state` to nonzero. If
+ * `state` is `NULL`, it is not set in both cases.
+ *
+ * @param[in] func A function that potentially escapes globally.
+ * @param[in] args Passed as-is to `func`.
+ * @param[out] state State of execution.
+ * @return What `func` returns, or an undefined value when it did not
+ * return.
+ * @post `*state` is set to zero if succeeded. Nonzero otherwise.
+ * @warning You have to clear the error info with `rb_set_errinfo(Qnil)` if
+ * you decide to ignore the caught exception.
+ * @see rb_eval_string_protect()
+ * @see rb_load_protect()
+ *
+ * @internal
+ *
+ * The "undefined value" described above is in fact ::RUBY_Qnil for now. But
+ * @shyouhei doesn't think that we would never change that.
+ *
+ * Though not a part of our public API, `state` is in fact an
+ * enum ruby_tag_type. You can see the potential "nonzero" values by looking
+ * at vm_core.h.
+ */
+VALUE rb_protect(VALUE (*func)(VALUE args), VALUE args, int *state);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_PROC_H */
diff --git a/include/ruby/internal/intern/process.h b/include/ruby/internal/intern/process.h
new file mode 100644
index 0000000000..7a7b24ed4b
--- /dev/null
+++ b/include/ruby/internal/intern/process.h
@@ -0,0 +1,273 @@
+#ifndef RBIMPL_INTERN_PROCESS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PROCESS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_mProcess.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/config.h" /* rb_pid_t is defined here. */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* process.c */
+
+/**
+ * Sets the "last status", or the `$?`.
+ *
+ * @param[in] status The termination status, as defined in `waitpid(3posix)`.
+ * @param[in] pid The last child of the current process.
+ * @post `$?` is updated.
+ */
+void rb_last_status_set(int status, rb_pid_t pid);
+
+/**
+ * Queries the "last status", or the `$?`.
+ *
+ * @retval RUBY_Qnil The current thread has no dead children.
+ * @retval otherwise An instance of Process::Status describing the status of
+ * the child that was most recently `wait`-ed.
+ */
+VALUE rb_last_status_get(void);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Executes a shell command.
+ *
+ * @warning THIS FUNCTION RETURNS on error!
+ * @param[in] cmd Passed to the shell.
+ * @retval -1 Something prevented the command execution.
+ * @post Upon successful execution this function doesn't return.
+ * @post In case it returns the `errno` is set properly.
+ */
+int rb_proc_exec(const char *cmd);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Replaces the current process by running the given external command. This is
+ * the implementation of `Kernel#exec`.
+ *
+ * @param[in] argc Number of objects in `argv`.
+ * @param[in] argv Command and its options to execute.
+ * @exception rb_eTypeError Invalid options e.g. non-String argv.
+ * @exception rb_eArgError Invalid options e.g. redirection cycle.
+ * @exception rb_eNotImpError Not implemented e.g. no `setuid(2)`.
+ * @exception rb_eRuntimeError `Process::UID.switch` in operation.
+ * @exception rb_eSystemCallError `execve(2)` failed.
+ * @warning This function doesn't return.
+ * @warning On failure it raises. On success the process is replaced.
+ *
+ * @internal
+ *
+ * @shyouhei have to say that the rdoc for `Kernel#exec` is fairly incomplete.
+ * AFAIK this function ultimately takes the following signature:
+ *
+ * ```rbs
+ * type boolx = bool | nil # != `boolish`
+ *
+ * type rlim_t = Integer # rlim_cur
+ * | [ Integer, Integer ] # rlim_cur, rlim_max
+ *
+ * type uid_t = String # e.g. "root"
+ * | Integer # e.g. 0
+ *
+ * type gid_t = String # e.g. "wheel"
+ * | Integer # e.g. 0
+ *
+ * type fmode = String # e.g. "rb"
+ * | Integer # e.g. O_RDONLY | O_BINARY
+ *
+ * type mode_t = Integer # e.g. 0644
+ *
+ * type pgrp = true # Creates a dedicated pgroup
+ * | 0 # ditto
+ * | nil # Uses the current one
+ * | Integer # Uses this specific pgroup
+ *
+ * type fd = :in # STDIN
+ * | :out # STDOUT
+ * | :err # STDERR
+ * | IO # This specific IO
+ * | Integer # A file descriptor of this #
+ *
+ * type src = fd | [ fd ]
+ * type dst = :close # Intuitive
+ * | fd # Intuitive
+ * | String # Open a file at this path
+ * | [ String ] # ... using O_RDONLY
+ * | [ String, fmode ] # ... using this mode
+ * | [ String, fmode, mode_t ] # ... with a permission
+ * | [ :child, fd ] # fd of child side
+ *
+ * type redir = Hash[ src, dst ]
+ *
+ * # ----
+ *
+ * # Key-value pair of environment variables
+ * type envp = Hash[ String, String ]
+ *
+ * # Actual name (and the name passed to the subprocess if any)
+ * type arg0 = String | [ String, String ]
+ *
+ * # Arbitrary string parameters
+ * type argv = String
+ *
+ * # Exec options:
+ * type argh = redir | {
+ * chdir: String, # Working directory
+ * close_others: boolx, # O_CLOEXEC like behaviour
+ * gid: gid_t, # setegid(2)
+ * pgrooup: pgrp, # setpgrp(2)
+ * rlimit_as: rlim_t, # setrlimit(2)
+ * rlimit_core: rlim_t, # ditto
+ * rlimit_cpu: rlim_t, # ditto
+ * rlimit_data: rlim_t, # ditto
+ * rlimit_fsize: rlim_t, # ditto
+ * rlimit_memlock: rlim_t, # ditto
+ * rlimit_msgqueue: rlim_t, # ditto
+ * rlimit_nice: rlim_t, # ditto
+ * rlimit_nofile: rlim_t, # ditto
+ * rlimit_nproc: rlim_t, # ditto
+ * rlimit_rss: rlim_t, # ditto
+ * rlimit_rtprio: rlim_t, # ditto
+ * rlimit_rttime: rlim_t, # ditto
+ * rlimit_sbsize: rlim_t, # ditto
+ * rlimit_sigpending: rlim_t, # ditto
+ * rlimit_stack: rlim_t, # ditto
+ * uid: uid_t, # seteuid(2)
+ * umask: mode_t, # umask(2)
+ * unsetenv_others: boolx # Unset everything except the passed envp
+ * }
+ *
+ * # ====
+ *
+ * class Kernel
+ * def self?.exec
+ * : ( arg0 cmd, *argv args ) -> void
+ * | ( arg0 cmd, *argv args, argh opts) -> void
+ * | (envp env, arg0 cmd, *argv args ) -> void
+ * | (envp env, arg0 cmd, *argv args, argh opts) -> void
+ * end
+ * ```
+ */
+VALUE rb_f_exec(int argc, const VALUE *argv);
+
+/**
+ * Waits for a process, with releasing GVL.
+ *
+ * @param[in] pid Process ID.
+ * @param[out] status The wait status is filled back.
+ * @param[in] flags Wait options.
+ * @retval -1 System call failed, errno set.
+ * @retval 0 WNOHANG but no waitable children.
+ * @retval otherwise A process ID that was `wait()`-ed.
+ * @post Upon successful return `status` is updated to have the process'
+ * status.
+ * @note `status` can be NULL.
+ * @note The arguments are passed through to underlying system call(s).
+ * Can have special meanings. For instance passing `(rb_pid_t)-1`
+ * to `pid` means it waits for any processes, under
+ * POSIX-compliant situations.
+ */
+rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
+
+/**
+ * This is a shorthand of rb_waitpid without status and flags. It has been
+ * like this since the very beginning. The initial revision already did the
+ * same thing. Not sure why, then, it has been named `syswait`. AFAIK this is
+ * different from how `wait(3posix)` works.
+ *
+ * @param[in] pid Passed to rb_waitpid().
+ */
+void rb_syswait(rb_pid_t pid);
+
+/**
+ * Identical to rb_f_exec(), except it spawns a child process instead of
+ * replacing the current one.
+ *
+ * @param[in] argc Number of objects in `argv`.
+ * @param[in] argv Command and its options to execute.
+ * @exception rb_eTypeError Invalid options e.g. non-String argv.
+ * @exception rb_eArgError Invalid options e.g. redirection cycle.
+ * @exception rb_eNotImpError Not implemented e.g. no `setuid(2)`.
+ * @exception rb_eRuntimeError `Process::UID.switch` in operation.
+ * @retval -1 Child process died for some reason.
+ * @retval otherwise The ID of the born child.
+ *
+ * @internal
+ *
+ * This is _really_ identical to rb_f_exec() until ultimately calling the
+ * system call. Almost everything are shared among these two (and
+ * rb_f_system()).
+ */
+rb_pid_t rb_spawn(int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_spawn(), except you can additionally know the detailed
+ * situation in case of abnormal parturitions.
+ *
+ * @param[in] argc Number of objects in `argv`.
+ * @param[in] argv Command and its options to execute.
+ * @param[out] errbuf Error description write-back buffer.
+ * @param[in] buflen Number of bytes of `errbuf`, including NUL.
+ * @exception rb_eTypeError Invalid options e.g. non-String argv.
+ * @exception rb_eArgError Invalid options e.g. redirection cycle.
+ * @exception rb_eNotImpError Not implemented e.g. no `setuid(2)`.
+ * @exception rb_eRuntimeError `Process::UID.switch` in operation.
+ * @retval -1 Child process died for some reason.
+ * @retval otherwise The ID of the born child.
+ * @post In case of `-1`, at most `buflen` bytes of the reason why is
+ * written back to `errbuf`.
+ */
+rb_pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen);
+
+/**
+ * Gathers info about resources consumed by the current process.
+ *
+ * @param[in] _ Not used. Pass anything.
+ * @return An instance of `Process::Tms`.
+ *
+ * @internal
+ *
+ * This function might or might not exist depending on `./confiugre` result.
+ * It must be a portability hell. Better not use.
+ */
+VALUE rb_proc_times(VALUE _);
+
+/**
+ * "Detaches" a subprocess. In POSIX systems every child processes that a
+ * process creates must be `wait(2)`-ed. A child process that died yet has not
+ * been waited so far is called a "zombie", which more or less consumes
+ * resources. This function automates reclamation of such processes. Once
+ * after this function successfully returns you can basically forget about the
+ * child process.
+ *
+ * @param[in] pid Process to wait.
+ * @return An instance of ::rb_cThread which is `waitpid(2)`-ing `pid`.
+ * @post You can just forget about the return value. GC reclaims it.
+ * @post You can know the exit status by querying `#value` of the
+ * return value (which is a blocking operation).
+ */
+VALUE rb_detach_process(rb_pid_t pid);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_PROCESS_H */
diff --git a/include/ruby/internal/intern/random.h b/include/ruby/internal/intern/random.h
new file mode 100644
index 0000000000..5577f53cb4
--- /dev/null
+++ b/include/ruby/internal/intern/random.h
@@ -0,0 +1,116 @@
+#ifndef RBIMPL_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RANDOM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief MT19937 backended pseudo random number generator.
+ * @see Matsumoto, M., Nishimura, T., "Mersenne Twister: A 623-
+ * dimensionally equidistributed uniform pseudorandom number
+ * generator", ACM Trans. on Modeling and Computer Simulation, 8
+ * (1): pp 3-30, 1998. https://doi.org/10.1145/272991.272995
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* random.c */
+
+/**
+ * Generates a 32 bit random number.
+ *
+ * @return A random number.
+ * @note Now that we have ractors, the RNG behind this function is
+ * per-ractor.
+ */
+unsigned int rb_genrand_int32(void);
+
+/**
+ * Generates a `double` random number.
+ *
+ * @return A random number.
+ * @note This function shares the RNG with rb_genrand_int32().
+ */
+double rb_genrand_real(void);
+
+/**
+ * Resets the RNG behind rb_genrand_int32()/rb_genrand_real().
+ *
+ * @post The (now per-ractor) default RNG's internal state is cleared.
+ */
+void rb_reset_random_seed(void);
+
+/**
+ * Generates a String of random bytes.
+ *
+ * @param[in,out] rnd An instance of ::rb_cRandom.
+ * @param[in] n Requested number of bytes.
+ * @return An instance of ::rb_cString, of binary, of `n` bytes length,
+ * whose contents are random bits.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know if this is an Easter egg or an official feature, but
+ * this function can take a wider range of objects, such as `Socket::Ifaddr`.
+ * The arguments are just silently ignored and the default RNG is used instead,
+ * if they are non-RNG.
+ */
+VALUE rb_random_bytes(VALUE rnd, long n);
+
+/**
+ * Identical to rb_genrand_int32(), except it generates using the passed RNG.
+ *
+ * @param[in,out] rnd An instance of ::rb_cRandom.
+ * @return A random number.
+ */
+unsigned int rb_random_int32(VALUE rnd);
+
+/**
+ * Identical to rb_genrand_real(), except it generates using the passed RNG.
+ *
+ * @param[in,out] rnd An instance of ::rb_cRandom.
+ * @return A random number.
+ */
+double rb_random_real(VALUE rnd);
+
+/**
+ * Identical to rb_genrand_ulong_limited(), except it generates using the
+ * passed RNG.
+ *
+ * @param[in,out] rnd An instance of ::rb_cRandom.
+ * @param[in] limit Max possible return value.
+ * @return A random number, distributed in `[0, limit]` interval.
+ * @note Note it can return `limit`.
+ * @note Whether the return value distributes uniformly in the
+ * interval or not depends on how the argument RNG behaves; at
+ * least in case of MT19937 it does.
+ */
+unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
+
+/**
+ * Generates a random number whose upper limit is `i`.
+ *
+ * @param[in] i Max possible return value.
+ * @return A random number, uniformly distributed in `[0, limit]` interval.
+ * @note Note it can return `i`.
+ */
+unsigned long rb_genrand_ulong_limited(unsigned long i);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_RANDOM_H */
diff --git a/include/ruby/internal/intern/range.h b/include/ruby/internal/intern/range.h
new file mode 100644
index 0000000000..1f7d7c313f
--- /dev/null
+++ b/include/ruby/internal/intern/range.h
@@ -0,0 +1,89 @@
+#ifndef RBIMPL_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RANGE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cRange.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* range.c */
+
+/**
+ * Creates a new Range.
+ *
+ * @param[in] beg "Left" or "lowest" endpoint of the range.
+ * @param[in] end "Right" or "highest" endpoint of the range.
+ * @param[in] excl Whether the range is open-ended.
+ * @exception rb_eArgError `beg` and `end` are not comparable.
+ * @note These days both endpoints can be ::RUBY_Qnil, which means that
+ * endpoint is unbound.
+ */
+VALUE rb_range_new(VALUE beg, VALUE end, int excl);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Deconstructs a numerical range. As the arguments are `long` based, it
+ * expects everything are in the `long` domain.
+ *
+ * @param[in] range A range of numerical endpoints.
+ * @param[out] begp Return value buffer.
+ * @param[out] lenp Return value buffer.
+ * @param[in] len Updated length.
+ * @param[in] err In case `len` is out of range...
+ * - `0`: returns ::RUBY_Qnil.
+ * - `1`: raises ::rb_eRangeError.
+ * - `2`: `beg` and `len` expanded accordingly.
+ * @exception rb_eTypeError `range` is not a numerical range.
+ * @exception rb_eRangeError `range` cannot fit into `long`.
+ * @retval RUBY_Qfalse `range` is not an ::rb_cRange.
+ * @retval RUBY_Qnil `len` is out of `range` but `err` is zero.
+ * @retval RUBY_Qtrue Otherwise.
+ * @post `beg` is the (possibly updated) left endpoint.
+ * @post `len` is the (possibly updated) length of the range.
+ *
+ * @internal
+ *
+ * The complex error handling switch reflects the fact that `Array#[]=` and
+ * `String#[]=` behave differently when they take ranges.
+ */
+VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Deconstructs a range into its components.
+ *
+ * @param[in] range Range or range-ish object.
+ * @param[out] begp Return value buffer.
+ * @param[out] endp Return value buffer.
+ * @param[out] exclp Return value buffer.
+ * @retval RUBY_Qfalse `range` is not an instance of ::rb_cRange.
+ * @retval RUBY_Qtrue Argument pointers are updated.
+ * @post `*begp` is the left endpoint of the range.
+ * @post `*endp` is the right endpoint of the range.
+ * @post `*exclp` is whether the range is open-ended or not.
+ */
+int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_RANGE_H */
diff --git a/include/ruby/internal/intern/rational.h b/include/ruby/internal/intern/rational.h
new file mode 100644
index 0000000000..ff4beca297
--- /dev/null
+++ b/include/ruby/internal/intern/rational.h
@@ -0,0 +1,172 @@
+#ifndef RBIMPL_INTERN_RATIONAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RATIONAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cRational.
+ */
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* rational.c */
+
+/**
+ * Identical to rb_rational_new(), except it skips argument validations. It is
+ * thus dangerous for extension libraries. For instance `1/0r` could be
+ * constructed using this.
+ *
+ * @param[in] num Numerator, an instance of ::rb_cInteger.
+ * @param[in] den Denominator, an instance of ::rb_cInteger.
+ * @exception rb_eTypeError Either argument is not an Integer.
+ * @return An instance of ::rb_cRational whose value is `(num/den)r`.
+ */
+VALUE rb_rational_raw(VALUE num, VALUE den);
+
+/**
+ * Shorthand of `(x/1)r`. As `x` is already an Integer, it practically
+ * converts it into a Rational of the identical value.
+ *
+ * @param[in] x An instance of ::rb_cInteger.
+ * @return An instance of ::rb_cRational, whose value is `(x/1)r`.
+ */
+#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
+
+/** @alias{rb_rational_raw} */
+#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
+
+/**
+ * Constructs a Rational, with reduction. This returns for instance `(2/3)r`
+ * for `rb_rational_new(INT2NUM(-384), INT2NUM(-576))`.
+ *
+ * @param[in] num Numerator, an instance of ::rb_cInteger.
+ * @param[in] den Denominator, an instance of ::rb_cInteger.
+ * @exception rb_eZeroDivError `den` is zero.
+ * @return An instance of ::rb_cRational whose value is `(num/den)r`.
+ */
+VALUE rb_rational_new(VALUE num, VALUE den);
+
+/**
+ * Shorthand of `(x/1)r`. As `x` is already an Integer, it practically
+ * converts it into a Rational of the identical value.
+ *
+ * @param[in] x An instance of ::rb_cInteger.
+ * @return An instance of ::rb_cRational, whose value is `(x/1)r`.
+ */
+#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
+
+/** @alias{rb_rational_new} */
+#define rb_rational_new2(x,y) rb_rational_new((x), (y))
+
+/**
+ * Converts various values into a Rational. This function accepts:
+ *
+ * - Instances of ::rb_cInteger (taken as-is),
+ * - Instances of ::rb_cRational (taken as-is),
+ * - Instances of ::rb_cFloat (applies `#to_r`),
+ * - Instances of ::rb_cComplex (applies `#to_r`),
+ * - Instances of ::rb_cString (applies `#to_r`),
+ * - Other objects that respond to `#to_r`.
+ *
+ * It (possibly recursively) applies `#to_r` until both sides become either
+ * Integer or Rational, then divides them.
+ *
+ * As a special case, passing ::RUBY_Qundef to `den` is the same as passing
+ * `RB_INT2NUM(1)`.
+ *
+ * @param[in] num Numerator (see above).
+ * @param[in] den Denominator (see above).
+ * @exception rb_eTypeError Passed something not described above.
+ * @exception rb_eFloatDomainError `#to_r` produced Nan/Inf.
+ * @exception rb_eZeroDivError `#to_r` produced zero for `den`.
+ * @return An instance of ::rb_cRational whose value is `(num/den)r`.
+ *
+ * @internal
+ *
+ * This was the implementation of `Kernel#Rational` before, but they diverged.
+ */
+VALUE rb_Rational(VALUE num, VALUE den);
+
+/**
+ * Shorthand of `(x/1)r`. It practically converts it into a Rational of the
+ * identical value.
+ *
+ * @param[in] x ::rb_cInteger, ::rb_cRational, or something that responds to
+ * `#to_r`.
+ * @return An instance of ::rb_cRational, whose value is `(x/1)r`.
+ */
+#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
+
+/** @alias{rb_Rational} */
+#define rb_Rational2(x,y) rb_Rational((x), (y))
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the numerator of the passed Rational.
+ *
+ * @param[in] rat An instance of ::rb_cRational.
+ * @return Its numerator part, which is an instance of ::rb_cInteger.
+ */
+VALUE rb_rational_num(VALUE rat);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the denominator of the passed Rational.
+ *
+ * @param[in] rat An instance of ::rb_cRational.
+ * @return Its denominator part, which is an instance of ::rb_cInteger
+ * greater than or equal to one..
+ */
+VALUE rb_rational_den(VALUE rat);
+
+/**
+ * Simplified approximation of a float. It returns a rational `rat` which
+ * satisfies:
+ *
+ * ```
+ * flt - |prec| <= rat <= flt + |prec|
+ * ```
+ *
+ * ```ruby
+ * 3.141592.rationalize(0.001) # => (201/64)r
+ * 3.141592.rationalize(0.01)' # => (22/7)r
+ * 3.141592.rationalize(0.1)' # => (16/5)r
+ * 3.141592.rationalize(1)' # => (3/1)r
+ * ```
+ *
+ * @param[in] flt An instance of ::rb_cFloat to rationalise.
+ * @param[in] prec Another ::rb_cFloat, which is the "precision".
+ * @return Approximation of `flt`, in ::rb_cRational.
+ */
+VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec);
+
+/**
+ * Identical to rb_flt_rationalize_with_prec(), except it auto-detects
+ * appropriate precision depending on the passed value.
+ *
+ * @param[in] flt An instance of ::rb_cFloat to rationalise.
+ * @return Approximation of `flt`, in ::rb_cRational.
+ */
+VALUE rb_flt_rationalize(VALUE flt);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_RATIONAL_H */
diff --git a/include/ruby/internal/intern/re.h b/include/ruby/internal/intern/re.h
new file mode 100644
index 0000000000..31f5593275
--- /dev/null
+++ b/include/ruby/internal/intern/re.h
@@ -0,0 +1,249 @@
+#ifndef RBIMPL_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cRegexp.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* re.c */
+
+/**
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * This was a function that switched between memcmp and rb_memcicmp depending
+ * on then-called `ruby_ignorecase`, or the `$=` global variable. That feature
+ * was abandoned in sometime around version 1.9.0.
+ */
+#define rb_memcmp memcmp
+
+/**
+ * Identical to st_locale_insensitive_strcasecmp(), except it is timing safe
+ * and returns something different.
+ *
+ * @param[in] s1 Comparison LHS.
+ * @param[in] s2 Comparison RHS.
+ * @param[in] n Comparison shall stop after first `n` bytes are scanned.
+ * @retval <0 `s1` is "less" than `s2`.
+ * @retval 0 Both sides converted into lowercase would be identical.
+ * @retval >0 `s1` is "greater" than `s2`.
+ * @note The "case" here means that of the POSIX Locale.
+ *
+ * @internal
+ *
+ * Can accept NULLs as long as n is also 0, and returns 0.
+ */
+int rb_memcicmp(const void *s1,const void *s2, long n);
+
+/**
+ * Asserts that the given MatchData is "occupied". MatchData shares its
+ * backend storages with its Regexp object. But programs can destructively
+ * tamper its contents. Calling this function beforehand shall prevent such
+ * modifications to spill over into other objects.
+ *
+ * @param[out] md Target instance of ::rb_cMatch.
+ * @post The object is "busy".
+ *
+ * @internal
+ *
+ * There is rb_match_unbusy internally, but extension libraries are left unable
+ * to do so.
+ */
+void rb_match_busy(VALUE md);
+
+/**
+ * Identical to rb_reg_nth_match(), except it just returns Boolean. This could
+ * skip allocating a returning string, resulting in reduced memory footprints
+ * if applicable.
+ *
+ * @param[in] n Match index.
+ * @param[in] md An instance of ::rb_cMatch.
+ * @exception rb_eTypeError `md` is not initialised.
+ * @retval RUBY_Qnil There is no `n`-th capture.
+ * @retval RUBY_Qfalse There is a `n`-th capture and is empty.
+ * @retval RUBY_Qtrue There is a `n`-th capture that has something.
+ *
+ * @internal
+ *
+ * @shyouhei wonders: why there are both rb_reg_match_defined() and
+ * rb_match_nth_defined, which are largely the same things, but do not share
+ * their implementations at all?
+ */
+VALUE rb_reg_nth_defined(int n, VALUE md);
+
+/**
+ * Queries the nth captured substring.
+ *
+ * @param[in] n Match index.
+ * @param[in] md An instance of ::rb_cMatch.
+ * @exception rb_eTypeError `md` is not initialised.
+ * @retval RUBY_Qnil There is no `n`-th capture.
+ * @retval otherwise An allocated instance of ::rb_cString containing
+ * the contents captured.
+ */
+VALUE rb_reg_nth_match(int n, VALUE md);
+
+/**
+ * Queries the index of the given named capture. Captures could be named. But
+ * that doesn't mean named ones are not indexed. A regular expression can mix
+ * named and non-named captures, and they are all indexed. This function
+ * converts from a name to its index.
+ *
+ * @param[in] match An instance of ::rb_cMatch.
+ * @param[in] backref Capture name, in String, Symbol, or Numeric.
+ * @exception rb_eIndexError No such named capture.
+ * @return The index of the given name.
+ */
+int rb_reg_backref_number(VALUE match, VALUE backref);
+
+/**
+ * This just returns the argument, stringified. What a poor name.
+ *
+ * @param[in] md An instance of ::rb_cMatch.
+ * @return Its 0th capture (i.e. entire matched string).
+ */
+VALUE rb_reg_last_match(VALUE md);
+
+/**
+ * The portion of the original string before the given match.
+ *
+ * @param[in] md An instance of ::rb_cMatch.
+ * @return Its "prematch". This is perl's ``$```.
+ */
+VALUE rb_reg_match_pre(VALUE md);
+
+/**
+ * The portion of the original string after the given match.
+ *
+ * @param[in] md An instance of ::rb_cMatch.
+ * @return Its "postmatch". This is perl's `$'`.
+ */
+VALUE rb_reg_match_post(VALUE md);
+
+/**
+ * The portion of the original string that captured at the very last.
+ *
+ * @param[in] md An instance of ::rb_cMatch.
+ * @return Its "lastmatch". This is perl's `$+`.
+ */
+VALUE rb_reg_match_last(VALUE md);
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_RB_REG_NEW_STR 1
+
+/**
+ * Identical to rb_reg_new(), except it takes the expression in Ruby's string
+ * instead of C's.
+ *
+ * @param[in] src Source code in String.
+ * @param[in] opts Options e.g. ONIG_OPTION_MULTILINE.
+ * @exception rb_eRegexpError `src` and `opts` do not interface.
+ * @return Allocated new instance of ::rb_cRegexp.
+ */
+VALUE rb_reg_new_str(VALUE src, int opts);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Creates a new Regular expression.
+ *
+ * @param[in] src Source code.
+ * @param[in] len `strlen(src)`.
+ * @param[in] opts Options e.g. ONIG_OPTION_MULTILINE.
+ * @return Allocated new instance of ::rb_cRegexp.
+ */
+VALUE rb_reg_new(const char *src, long len, int opts);
+
+/**
+ * Allocates an instance of ::rb_cRegexp.
+ *
+ * @private
+ *
+ * Nobody should call this function. Regular expressions that are not
+ * initialised must not exist in the wild.
+ */
+VALUE rb_reg_alloc(void);
+
+/**
+ * Initialises an instance of ::rb_cRegexp.
+ *
+ * @private
+ *
+ * This just raises for ordinal regexp objects. Extension libraries must not
+ * use.
+ */
+VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
+
+/**
+ * This is the match operator.
+ *
+ * @param[in] re An instance of ::rb_cRegexp.
+ * @param[in] str An instance of ::rb_cString.
+ * @exception rb_eTypeError `str` is not a string.
+ * @exception rb_eRegexpError Error inside of Onigmo (unlikely).
+ * @retval RUBY_Qnil Match failed.
+ * @retval otherwise Matched position (character index inside of
+ * `str`).
+ * @post `Regexp.last_match` is updated.
+ * @post `$&`, `$~`, etc., are updated.
+ * @note If you do this in ruby, named captures are assigned to local
+ * variable of the local scope. But that doesn't happen here. The
+ * assignment is done by the interpreter.
+ */
+VALUE rb_reg_match(VALUE re, VALUE str);
+
+/**
+ * Identical to rb_reg_match(), except it matches against rb_lastline_get()
+ * (or, the `$_`).
+ *
+ * @param[in] re An instance of ::rb_cRegexp.
+ * @exception rb_eRegexpError Error inside of Onigmo (unlikely).
+ * @retval RUBY_Qnil Match failed or `$_` is absent.
+ * @retval otherwise Matched position (character index inside of
+ * `$_`).
+ * @post `Regexp.last_match` is updated.
+ * @post `$&`, `$~`, etc., are updated.
+ */
+VALUE rb_reg_match2(VALUE re);
+
+/**
+ * Queries the options of the passed regular expression.
+ *
+ * @param[in] re An instance of ::rb_cRegexp.
+ * @return Its options.
+ * @note Possible return values are defined in Onigmo.h.
+ */
+int rb_reg_options(VALUE re);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_RE_H */
diff --git a/include/ruby/internal/intern/ruby.h b/include/ruby/internal/intern/ruby.h
new file mode 100644
index 0000000000..efe61424ca
--- /dev/null
+++ b/include/ruby/internal/intern/ruby.h
@@ -0,0 +1,77 @@
+#ifndef RBIMPL_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RUBY_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Process-global APIs.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* ruby.c */
+/** @alias{rb_get_argv} */
+#define rb_argv rb_get_argv()
+
+/**
+ * The value of `$0` at process bootup.
+ *
+ * @note This is just a snapshot of `$0`, not the backend storage of it. `$0`
+ * could become something different because it is a writable global
+ * variable. Modifying it for instance affects `ps(1)` output. Don't
+ * assume they are synced.
+ */
+RUBY_EXTERN VALUE rb_argv0;
+
+/* io.c */
+
+/**
+ * Queries the arguments passed to the current process that you can access from
+ * Ruby as `ARGV`.
+ *
+ * @return An array of strings containing arguments passed to the process.
+ */
+VALUE rb_get_argv(void);
+
+/* ruby.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Loads the given file. This function opens the given pathname for reading,
+ * parses the contents as a Ruby script, and returns an opaque "node" pointer.
+ * You can then pass it to ruby_run_node() for evaluation.
+ *
+ * @param[in] file File name, or "-" to read from stdin.
+ * @return Opaque "node" pointer.
+ */
+void *rb_load_file(const char *file);
+
+/**
+ * Identical to rb_load_file(), except it takes the argument as a Ruby's string
+ * instead of C's.
+ *
+ * @param[in] file File name, or "-" to read from stdin.
+ * @return Opaque "node" pointer.
+ */
+void *rb_load_file_str(VALUE file);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_RUBY_H */
diff --git a/include/ruby/internal/intern/select.h b/include/ruby/internal/intern/select.h
new file mode 100644
index 0000000000..fabc287cd1
--- /dev/null
+++ b/include/ruby/internal/intern/select.h
@@ -0,0 +1,86 @@
+#ifndef RBIMPL_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs to provide ::rb_fd_select().
+ * @note Functions and structs defined in this header file are not
+ * necessarily ruby-specific. They don't need ::VALUE etc.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* for NFDBITS (BSD Net/2) */
+#endif
+
+#include "ruby/internal/dllexport.h"
+
+/* thread.c */
+#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
+# include "ruby/internal/intern/select/largesize.h"
+#elif defined(_WIN32)
+# include "ruby/internal/intern/select/win32.h"
+# /** Does nothing (defined for compatibility). */
+# define rb_fd_resize(n, f) ((void)(f))
+#else
+# include "ruby/internal/intern/select/posix.h"
+# /** Does nothing (defined for compatibility). */
+# define rb_fd_resize(n, f) ((void)(f))
+#endif
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+struct timeval;
+
+/**
+ * Waits for multiple file descriptors at once. This is basically a wrapper of
+ * system-provided select() with releasing GVL, to allow other Ruby threads run
+ * in parallel.
+ *
+ * @param[in] nfds Max FD in everything passed, plus one.
+ * @param[in,out] rfds Set of FDs to wait for reads.
+ * @param[in,out] wfds Set of FDs to wait for writes.
+ * @param[in,out] efds Set of FDs to wait for OOBs.
+ * @param[in,out] timeout Max blocking duration.
+ * @retval -1 Failed, errno set.
+ * @retval 0 Timeout exceeded.
+ * @retval otherwise Total number of file descriptors returned.
+ * @post `rfds` contains readable FDs.
+ * @post `wfds` contains writable FDs.
+ * @post `efds` contains exceptional FDs.
+ * @post `timeout` is the time left.
+ * @note All pointers are allowed to be null pointers.
+ *
+ * Although backend threads can run in parallel of this function, touching a
+ * file descriptor from multiple threads could be problematic. For instance
+ * what happens when a thread closes a file descriptor that is selected by
+ * someone else, vastly varies among operating systems. You would better avoid
+ * touching an fd from more than one threads.
+ *
+ * @internal
+ *
+ * Although any file descriptors are possible here, it makes completely no
+ * sense to pass a descriptor that is not `O_NONBLOCK`. If you want to know
+ * the reason for this limitatuon in detail, you might find this thread super
+ * interesting: https://lkml.org/lkml/2004/10/6/117
+ */
+int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_SELECT_H */
diff --git a/include/ruby/internal/intern/select/largesize.h b/include/ruby/internal/intern/select/largesize.h
new file mode 100644
index 0000000000..d65f088c06
--- /dev/null
+++ b/include/ruby/internal/intern/select/largesize.h
@@ -0,0 +1,214 @@
+#ifndef RBIMPL_INTERN_SELECT_LARGESIZE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_LARGESIZE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs to provide ::rb_fd_select().
+ *
+ * Several Unix platforms support file descriptors bigger than FD_SETSIZE in
+ * `select(2)` system call.
+ *
+ * - Linux 2.2.12 (?)
+ *
+ * - NetBSD 1.2 (src/sys/kern/sys_generic.c:1.25)
+ * `select(2)` documents how to allocate fd_set dynamically.
+ * http://netbsd.gw.com/cgi-bin/man-cgi?select++NetBSD-4.0
+ *
+ * - FreeBSD 2.2 (src/sys/kern/sys_generic.c:1.19)
+ *
+ * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4)
+ * `select(2)` documents how to allocate fd_set dynamically.
+ * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4
+ *
+ * - Solaris 8 has `select_large_fdset`
+ *
+ * - Mac OS X 10.7 (Lion)
+ * `select(2)` returns `EINVAL` if `nfds` is greater than `FD_SET_SIZE` and
+ * `_DARWIN_UNLIMITED_SELECT` (or `_DARWIN_C_SOURCE`) isn't defined.
+ * http://developer.apple.com/library/mac/#releasenotes/Darwin/SymbolVariantsRelNotes/_index.html
+ *
+ * When `fd_set` is not big enough to hold big file descriptors, it should be
+ * allocated dynamically. Note that this assumes `fd_set` is structured as
+ * bitmap.
+ *
+ * `rb_fd_init` allocates the memory.
+ * `rb_fd_term` frees the memory.
+ * `rb_fd_set` may re-allocate bitmap.
+ *
+ * So `rb_fd_set` doesn't reject file descriptors bigger than `FD_SETSIZE`.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+
+/**@cond INTERNAL_MACRO */
+#define rb_fd_ptr rb_fd_ptr
+#define rb_fd_max rb_fd_max
+/** @endcond */
+
+struct timeval;
+
+/**
+ * The data structure which wraps the fd_set bitmap used by select(2). This
+ * allows Ruby to use FD sets larger than that allowed by historic limitations
+ * on modern platforms.
+ */
+typedef struct {
+ int maxfd; /**< Maximum allowed number of FDs. */
+ fd_set *fdset; /**< File descriptors buffer */
+} rb_fdset_t;
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * (Re-)initialises a fdset. One must be initialised before other `rb_fd_*`
+ * operations. Analogous to calling `malloc(3)` to allocate an `fd_set`.
+ *
+ * @param[out] f An fdset to squash.
+ * @post `f` holds no file descriptors.
+ */
+void rb_fd_init(rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Destroys the ::rb_fdset_t, releasing any memory and resources it used. It
+ * must be reinitialised using rb_fd_init() before future use. Analogous to
+ * calling `free(3)` to release memory for an `fd_set`.
+ *
+ * @param[out] f An fdset to squash.
+ * @post `f` holds no file descriptors.
+ */
+void rb_fd_term(rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Wipes out the current set of FDs.
+ *
+ * @param[out] f The fdset to clear.
+ * @post `f` has no FDs.
+ */
+void rb_fd_zero(rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Sets an fd to a fdset.
+ *
+ * @param[in] fd A file descriptor.
+ * @param[out] f Target fdset.
+ * @post `f` holds `fd`.
+ */
+void rb_fd_set(int fd, rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Releases a specific FD from the given fdset.
+ *
+ * @param[in] fd Target FD.
+ * @param[out] f The fdset that holds `fd`.
+ * @post `f` doesn't hold n.
+ */
+void rb_fd_clr(int fd, rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the given FD is in the given set.
+ *
+ * @param[in] fd Target FD.
+ * @param[in] f The fdset to scan.
+ * @retval 1 Yes there is.
+ * @retval 0 No there isn't.
+ * @see http://www.freebsd.org/cgi/query-pr.cgi?pr=91421
+ */
+int rb_fd_isset(int fd, const rb_fdset_t *f);
+
+/**
+ * Destructively overwrites an fdset with another.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @param[in] max Maximum number of file descriptors to copy.
+ * @post `dst` is a copy of `src`.
+ */
+void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max);
+
+/**
+ * Identical to rb_fd_copy(), except it copies unlimited number of file
+ * descriptors.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @post `dst` is a copy of `src`.
+ */
+void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
+
+/**
+ * Waits for multiple file descriptors at once.
+ *
+ * @param[in] nfds Max FD in everything passed, plus one.
+ * @param[in,out] rfds Set of FDs to wait for reads.
+ * @param[in,out] wfds Set of FDs to wait for writes.
+ * @param[in,out] efds Set of FDs to wait for OOBs.
+ * @param[in,out] timeout Max blocking duration.
+ * @retval -1 Failed, errno set.
+ * @retval 0 Timeout exceeded.
+ * @retval otherwise Total number of file descriptors returned.
+ * @post `rfds` contains readable FDs.
+ * @post `wfds` contains writable FDs.
+ * @post `efds` contains exceptional FDs.
+ * @post `timeout` is the time left.
+ * @note All pointers are allowed to be null pointers.
+ */
+int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+/**
+ * Raw pointer to `fd_set`.
+ *
+ * @param[in] f Target fdset.
+ * @retval NULL `f` is already terminated by rb_fd_term().
+ * @retval otherwise Underlying fd_set.
+ *
+ * @internal
+ *
+ * Extension library must not touch raw pointers. It was a bad idea to let
+ * them use it.
+ */
+static inline fd_set *
+rb_fd_ptr(const rb_fdset_t *f)
+{
+ return f->fdset;
+}
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+/**
+ * It seems this function has no use. Maybe just remove?
+ *
+ * @param[in] f A set.
+ * @return Number of file descriptors stored.
+ */
+static inline int
+rb_fd_max(const rb_fdset_t *f)
+{
+ return f->maxfd;
+}
+
+#endif /* RBIMPL_INTERN_SELECT_LARGESIZE_H */
diff --git a/include/ruby/internal/intern/select/posix.h b/include/ruby/internal/intern/select/posix.h
new file mode 100644
index 0000000000..0a9b0b2e51
--- /dev/null
+++ b/include/ruby/internal/intern/select/posix.h
@@ -0,0 +1,144 @@
+#ifndef RBIMPL_INTERN_SELECT_POSIX_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_POSIX_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs to provide ::rb_fd_select().
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h> /* for select(2) (modern POSIX) */
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h> /* for select(2) (archaic UNIX) */
+#endif
+
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+
+/**
+ * The data structure which wraps the fd_set bitmap used by `select(2)`. This
+ * allows Ruby to use FD sets larger than what has been historically allowed on
+ * modern platforms.
+ *
+ * @internal
+ *
+ * ... but because this header file is included only when the system is with
+ * that "historic restrictions", this is nothing more than an alias of fd_set.
+ */
+typedef fd_set rb_fdset_t;
+
+/** Clears the given ::rb_fdset_t. */
+#define rb_fd_zero FD_ZERO
+
+/** Sets the given fd to the ::rb_fdset_t. */
+#define rb_fd_set FD_SET
+
+/** Unsets the given fd from the ::rb_fdset_t. */
+#define rb_fd_clr FD_CLR
+
+/** Queries if the given fd is in the ::rb_fdset_t. */
+#define rb_fd_isset FD_ISSET
+
+/** Initialises the :given :rb_fdset_t. */
+#define rb_fd_init FD_ZERO
+
+/** Waits for multiple file descriptors at once. */
+#define rb_fd_select select
+
+/**@cond INTERNAL_MACRO */
+#define rb_fd_copy rb_fd_copy
+#define rb_fd_dup rb_fd_dup
+#define rb_fd_ptr rb_fd_ptr
+#define rb_fd_max rb_fd_max
+/** @endcond */
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Destructively overwrites an fdset with another.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @param[in] n Unused parameter.
+ * @post `dst` is a copy of `src`.
+ */
+static inline void
+rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int n)
+{
+ *dst = *src;
+}
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Destructively overwrites an fdset with another.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @post `dst` is a copy of `src`.
+ */
+static inline void
+rb_fd_dup(rb_fdset_t *dst, const fd_set *src)
+{
+ *dst = *src;
+}
+
+RBIMPL_ATTR_PURE()
+/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
+/**
+ * Raw pointer to `fd_set`.
+ *
+ * @param[in] f Target fdset.
+ * @return Underlying fd_set.
+ *
+ * @internal
+ *
+ * Extension library must not touch raw pointers. It was a bad idea to let
+ * them use it.
+ */
+static inline fd_set *
+rb_fd_ptr(rb_fdset_t *f)
+{
+ return f;
+}
+
+RBIMPL_ATTR_CONST()
+/**
+ * It seems this function has no use. Maybe just remove?
+ *
+ * @param[in] f A set.
+ * @return Number of file descriptors stored.
+ */
+static inline int
+rb_fd_max(const rb_fdset_t *f)
+{
+ return FD_SETSIZE;
+}
+
+/** @cond INTERNAL_MACRO */
+/* :FIXME: What are these? They don't exist for sibling implementations. */
+#define rb_fd_init_copy(d, s) (*(d) = *(s))
+#define rb_fd_term(f) ((void)(f))
+/** @endcond */
+
+#endif /* RBIMPL_INTERN_SELECT_POSIX_H */
diff --git a/include/ruby/internal/intern/select/win32.h b/include/ruby/internal/intern/select/win32.h
new file mode 100644
index 0000000000..edaf7a8523
--- /dev/null
+++ b/include/ruby/internal/intern/select/win32.h
@@ -0,0 +1,259 @@
+#ifndef RBIMPL_INTERN_SELECT_WIN32_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_WIN32_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs to provide ::rb_fd_select().
+ */
+#include "ruby/internal/dosish.h" /* for rb_w32_select */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/assert.h"
+
+/**@cond INTERNAL_MACRO */
+#define rb_fd_zero rb_fd_zero
+#define rb_fd_clr rb_fd_clr
+#define rb_fd_isset rb_fd_isset
+#define rb_fd_copy rb_fd_copy
+#define rb_fd_dup rb_fd_dup
+#define rb_fd_ptr rb_fd_ptr
+#define rb_fd_max rb_fd_max
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+struct timeval;
+
+/**
+ * The data structure which wraps the fd_set bitmap used by select(2). This
+ * allows Ruby to use FD sets larger than that allowed by historic limitations
+ * on modern platforms.
+ */
+typedef struct {
+ int capa; /**< Maximum allowed number of FDs. */
+ fd_set *fdset; /**< File descriptors buffer. */
+} rb_fdset_t;
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * (Re-)initialises a fdset. One must be initialised before other `rb_fd_*`
+ * operations. Analogous to calling `malloc(3)` to allocate an `fd_set`.
+ *
+ * @param[out] f An fdset to squash.
+ * @post `f` holds no file descriptors.
+ *
+ * @internal
+ *
+ * Can't this leak memory if the same `f` is passed twice...?
+ */
+void rb_fd_init(rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Destroys the ::rb_fdset_t, releasing any memory and resources it used. It
+ * must be reinitialised using rb_fd_init() before future use. Analogous to
+ * calling `free(3)` to release memory for an `fd_set`.
+ *
+ * @param[out] f An fdset to squash.
+ * @post `f` holds no file descriptors.
+ */
+void rb_fd_term(rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Sets an fd to a fdset.
+ *
+ * @param[in] fd A file descriptor.
+ * @param[out] f Target fdset.
+ * @post `f` holds `fd`.
+ */
+void rb_fd_set(int fd, rb_fdset_t *f);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Destructively overwrites an fdset with another.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @param[in] max Maximum number of file descriptors to copy.
+ * @post `dst` is a copy of `src`.
+ */
+void rb_w32_fd_copy(rb_fdset_t *dst, const fd_set *src, int max);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_w32_fd_copy(), except it copies unlimited number of file
+ * descriptors.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @post `dst` is a copy of `src`.
+ */
+void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Wipes out the current set of FDs.
+ *
+ * @param[out] f The fdset to clear.
+ * @post `f` has no FDs.
+ */
+static inline void
+rb_fd_zero(rb_fdset_t *f)
+{
+ f->fdset->fd_count = 0;
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Releases a specific FD from the given fdset.
+ *
+ * @param[in] n Target FD.
+ * @param[out] f The fdset that holds `n`.
+ * @post `f` doesn't hold n.
+ */
+static inline void
+rb_fd_clr(int n, rb_fdset_t *f)
+{
+ rb_w32_fdclr(n, f->fdset);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Queries if the given FD is in the given set.
+ *
+ * @param[in] n Target FD.
+ * @param[in] f The fdset to scan.
+ * @retval 1 Yes there is.
+ * @retval 0 No there isn't.
+ */
+static inline int
+rb_fd_isset(int n, rb_fdset_t *f)
+{
+ return rb_w32_fdisset(n, f->fdset);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Destructively overwrites an fdset with another.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @param[in] n Maximum number of file descriptors to copy.
+ * @post `dst` is a copy of `src`.
+ */
+static inline void
+rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int n)
+{
+ rb_w32_fd_copy(dst, src, n);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_fd_copy(), except it copies unlimited number of file
+ * descriptors.
+ *
+ * @param[out] dst Target fdset.
+ * @param[in] src Source fdset.
+ * @post `dst` is a copy of `src`.
+ */
+static inline void
+rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
+{
+ rb_w32_fd_dup(dst, src);
+}
+
+/**
+ * Waits for multiple file descriptors at once.
+ *
+ * @param[in] n Max FD in everything passed, plus one.
+ * @param[in,out] rfds Set of FDs to wait for reads.
+ * @param[in,out] wfds Set of FDs to wait for writes.
+ * @param[in,out] efds Set of FDs to wait for OOBs.
+ * @param[in,out] timeout Max blocking duration.
+ * @retval -1 Failed, errno set.
+ * @retval 0 Timeout exceeded.
+ * @retval otherwise Total number of file descriptors returned.
+ * @post `rfds` contains readable FDs.
+ * @post `wfds` contains writable FDs.
+ * @post `efds` contains exceptional FDs.
+ * @post `timeout` is the time left.
+ * @note All pointers are allowed to be null pointers.
+ *
+ * @internal
+ *
+ * This can wait for `SOCKET` and `HANDLE` at once. In order to achieve that
+ * property we heavily touch the internals of MSVCRT. We `CreateFile` a
+ * `"NUL"` alongside of a socket and directly manipulate its `struct ioinfo`.
+ * This is of course a very dirty hack. If we could design the API today we
+ * could use `CancellIoEx`. But we are older than that Win32 API.
+ */
+static inline int
+rb_fd_select(int n, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
+{
+ return rb_w32_select(
+ n,
+ rfds ? rfds->fdset : NULL,
+ wfds ? wfds->fdset : NULL,
+ efds ? efds->fdset : NULL,
+ timeout);
+}
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+/**
+ * Raw pointer to `fd_set`.
+ *
+ * @param[in] f Target fdset.
+ * @retval NULL `f` is already terminated by rb_fd_term().
+ * @retval otherwise Underlying fd_set.
+ *
+ * @internal
+ *
+ * Extension library must not touch raw pointers. It was a bad idea to let
+ * them use it.
+ */
+static inline fd_set *
+rb_fd_ptr(const rb_fdset_t *f)
+{
+ return f->fdset;
+}
+
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * It seems this function has no use. Maybe just remove?
+ *
+ * @param[in] f A set.
+ * @return Number of file descriptors stored.
+ */
+static inline int
+rb_fd_max(const rb_fdset_t *f)
+{
+ const fd_set *p = f->fdset;
+
+ RBIMPL_ASSERT_OR_ASSUME(p);
+ return p->fd_count;
+}
+
+#endif /* RBIMPL_INTERN_SELECT_WIN32_H */
diff --git a/include/ruby/internal/intern/signal.h b/include/ruby/internal/intern/signal.h
new file mode 100644
index 0000000000..84f7558404
--- /dev/null
+++ b/include/ruby/internal/intern/signal.h
@@ -0,0 +1,152 @@
+#ifndef RBIMPL_INTERN_SIGNAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SIGNAL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Signal handling APIs.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* signal.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Sends a signal ("kills") to processes.
+ *
+ * The first argument is the signal, either in:
+ *
+ * - Numerical representation (e.g. `9`), or
+ * - Textual representation of canonical (e.g. `:SIGKILL`) name or
+ * abbreviated (e.g. `:KILL`) name, either in ::rb_cSymbol or ::rb_cString.
+ *
+ * All the remaining arguments are numerical representations of process IDs.
+ * This function iterates over them to send the specified signal.
+ *
+ * You can specify both negative PIDs and negative signo to this function:
+ *
+ * ```
+ * sig \ pid | >= 1 | == 0 | == -1 | <= -2
+ * ===========+======+======+=======+=======
+ * > 0 | #1 | #2 | #3 | #4
+ * == 0 | #5 | #6 | #7 | #8
+ * < 0 | #9 | #10 | #11
+ * ```
+ *
+ * - Case #1: When signo and PID are both positive, this function sends the
+ * specified signal to the specified process (intuitive).
+ *
+ * - Case #2: When signo is positive and PID is zero, this function sends
+ * that signal to the current process group.
+ *
+ * - Case #3: When signo is positive and PID is -1, this function sends that
+ * signal to everything that the current process is allowed to kill.
+ *
+ * - Case #4: When signo is positive and PID is negative (but not -1), this
+ * function sends that signal to every processes in a process group, whose
+ * process group ID is the absolute value of the passed PID.
+ *
+ * - Case #5: When signo is zero and PID is positive, this function just
+ * checks for the existence of the specified process and doesn't send
+ * anything to anyone. In case the process is absent `Errno::ESRCH` is
+ * raised.
+ *
+ * - Case #6: When signo and PID are both zero, this function checks for the
+ * existence of the current process group. And it must do. This function
+ * is effectively a no-op then.
+ *
+ * - Case #7: When signo is zero and PID is -1, this function checks if there
+ * is any other process that the current process can kill. At least init
+ * (PID 1) must exist, so this must not fail.
+ *
+ * - Case #8: When signo is zero and PID is negative (but not -1), this
+ * function checks if there is a process group whose process group ID is
+ * the absolute value of the passed PID. In case the process group is
+ * absent `Errno::ESRCH` is raised.
+ *
+ * - Case #9: When signo is negative and PID is positive, this function sends
+ * the absolute value of the passed signo to the process group specified as
+ * the PID.
+ *
+ * - Case #10: When signo is negative and PID is zero, it is highly expected
+ * that this function sends the absolute value of the passed signo to the
+ * current process group. Strictly speaking, IEEE Std 1003.1-2017
+ * specifies that this (`killpg(3posix)` with an argument of zero) is an
+ * undefined behaviour. But no operating system is known so far that does
+ * things differently.
+ *
+ * - Case #11: When signo and PID are both negative, the behaviour of this
+ * function depends on how `killpg(3)` works. On Linux, it seems such
+ * attempt is strictly prohibited and `Errno::EINVAL` is raised. But on
+ * macOS, it seems it tries to to send the signal actually to the process
+ * group.
+ *
+ * @note Above description is in fact different from how `kill(2)` works.
+ * We interpret the passed arguments before passing them through to
+ * system calls.
+ * @param[in] argc Number of objects in `argv`.
+ * @param[in] argv Signal, followed by target PIDs.
+ * @exception rb_eArgError Unknown signal name.
+ * @exception rb_eSystemCallError Various errors sending signal to processes.
+ * @return Something numeric. The meaning of this return value is unclear.
+ * It seems in case of #1 above, this could be the body count. But
+ * other cases remain mysterious.
+ */
+VALUE rb_f_kill(int argc, const VALUE *argv);
+
+/* This must be private, @shyouhei guesses. */
+#ifdef POSIX_SIGNAL
+#define posix_signal ruby_posix_signal
+void (*posix_signal(int, void (*)(int)))(int);
+#endif
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the name of the signal. It returns for instance `"KILL"` for
+ * SIGKILL.
+ *
+ * @param[in] signo Signal number to query.
+ * @retval 0 No such signal.
+ * @retval otherwise A pointer to a static C string that is the name of
+ * the signal.
+ * @warning Don't free the return value.
+ */
+const char *ruby_signal_name(int signo);
+
+/**
+ * Pretends as if there was no custom signal handler. This function sets the
+ * signal action to SIG_DFL, then kills itself.
+ *
+ * @param[in] sig The signal.
+ * @post Previous signal handler is lost.
+ * @post Passed signal is sent to the current process.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't understand the needs of this function being visible from
+ * extension libraries.
+ */
+void ruby_default_signal(int sig);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_SIGNAL_H */
diff --git a/include/ruby/internal/intern/sprintf.h b/include/ruby/internal/intern/sprintf.h
new file mode 100644
index 0000000000..aedc0f9ab1
--- /dev/null
+++ b/include/ruby/internal/intern/sprintf.h
@@ -0,0 +1,159 @@
+#ifndef RBIMPL_INTERN_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SPRINTF_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Our own private `printf(3)`.
+ */
+#include "ruby/internal/attr/format.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* sprintf.c */
+
+/**
+ * Identical to rb_str_format(), except how the arguments are arranged.
+ *
+ * @param[in] argc Number of objects of `argv`.
+ * @param[in] argv A format string, followed by its arguments.
+ * @return A rendered new instance of ::rb_cString.
+ *
+ * @internal
+ *
+ * You can safely pass NULL to `argv`. Doesn't make any sense though.
+ */
+VALUE rb_f_sprintf(int argc, const VALUE *argv);
+
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
+/**
+ * Ruby's extended `sprintf(3)`. We ended up reinventing the entire `printf`
+ * business because we don't want to depend on locales. OS-provided `printf`
+ * routines might or might not, which caused instabilities of the result
+ * strings.
+ *
+ * The format sequence is a mixture of format specifiers and other verbatim
+ * contents. Each format specifier starts with a `%`, and has the following
+ * structure:
+ *
+ * ```
+ * %[flags][width][.precision][length]conversion
+ * ```
+ *
+ * This function supports flags of ` `, `#`, `+`, `-`, `0`, width of
+ * non-negative decimal integer and `*`, precision of non-negative decimal
+ * integers and `*`, length of `L`, `h`, `t`, `z`, `l`, `ll`, `q`, conversions
+ * of `A`, `D`, `E`, `G`, `O`, `U`, `X`, `a`, `c`, `d`, `e`, `f`, `g`, `i`,
+ * `n`, `o`, `p`, `s`, `u`, `x`, and `%`. In case of `_WIN32` it also supports
+ * `I`. And additionally, it supports magical `PRIsVALUE` macro that can
+ * stringise arbitrary Ruby objects:
+ *
+ * ```CXX
+ * rb_sprintf("|%"PRIsVALUE"|", RUBY_Qtrue); // => "|true|"
+ * rb_sprintf("%+"PRIsVALUE, rb_stdin); // => "#<IO:<STDIN>>"
+ * ```
+ *
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ... Variadic number of contents to format.
+ * @return A rendered new instance of ::rb_cString.
+ *
+ * @internal
+ *
+ * :FIXME: We can improve this document.
+ */
+VALUE rb_sprintf(const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
+/**
+ * Identical to rb_sprintf(), except it takes a `va_list`.
+ *
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ap Contents to format.
+ * @return A rendered new instance of ::rb_cString.
+ */
+VALUE rb_vsprintf(const char *fmt, va_list ap);
+
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
+/**
+ * Identical to rb_sprintf(), except it renders the output to the specified
+ * object rather than creating a new one.
+ *
+ * @param[out] dst String to modify.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ... Variadic number of contents to format.
+ * @exception rb_eTypeError `dst` is not a String.
+ * @return Passed `dst`.
+ * @post `dst` has the rendered output appended to its end.
+ */
+VALUE rb_str_catf(VALUE dst, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((2))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
+/**
+ * Identical to rb_str_catf(), except it takes a `va_list`. It can also be
+ * seen as a routine identical to rb_vsprintf(), except it renders the output
+ * to the specified object rather than creating a new one.
+ *
+ * @param[out] dst String to modify.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ap Contents to format.
+ * @exception rb_eTypeError `dst` is not a String.
+ * @return Passed `dst`.
+ * @post `dst` has the rendered output appended to its end.
+ */
+VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap);
+
+/**
+ * Formats a string.
+ *
+ * Returns the string resulting from applying `fmt` to `argv`. The format
+ * sequence is a mixture of format specifiers and other verbatim contents.
+ * Each format specifier starts with a `%`, and has the following structure:
+ *
+ * ```
+ * %[flags][width][.precision]type
+ * ```
+ *
+ * ... which is different from that of rb_sprintf(). Because ruby has no
+ * `short` or `long`, there is no way to specify a "length" of an argument.
+ *
+ * This function supports flags of ` `, `#`, `+`, `-`, `<>`, `{}`, with of
+ * non-negative decimal integer and `$`, `*`, precision of non-negative decimal
+ * integer and `$`, `*`, type of `A`, `B`, `E`, `G`, `X`, `a`, `b`, `c`, `d`,
+ * `e`, `f`, `g`, `i`, `o`, `p`, `s`, `u`, `x`, `%`. This list is also
+ * (largely the same but) not identical to that of rb_sprintf().
+ *
+ * @param[in] argc Number of objects in `argv`.
+ * @param[in] argv Format arguments.
+ * @param[in] fmt A printf-like format specifier.
+ * @exception rb_eTypeError `fmt` is not a string.
+ * @exception rb_eArgError Failed to parse `fmt`.
+ * @return A rendered new instance of ::rb_cString.
+ * @note Everything it takes must be Ruby objects.
+ *
+ */
+VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_SPRINTF_H */
diff --git a/include/ruby/internal/intern/string.h b/include/ruby/internal/intern/string.h
new file mode 100644
index 0000000000..3083125e56
--- /dev/null
+++ b/include/ruby/internal/intern/string.h
@@ -0,0 +1,1757 @@
+#ifndef RBIMPL_INTERN_STRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_STRING_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cString.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/constant_p.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/variable.h" /* rb_gvar_setter_t */
+#include "ruby/st.h" /* st_index_t */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* string.c */
+
+/**
+ * Allocates an instance of ::rb_cString.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "binary" encoding, whose contents are verbatim copy of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ */
+VALUE rb_str_new(const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new(), except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @exception rb_eArgError `ptr` is a null pointer.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose
+ * contents are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_str_new_cstr(const char *ptr);
+
+/**
+ * Identical to rb_str_new_cstr(), except it takes a Ruby's string instead of
+ * C's. Implementation wise it creates a string that shares the backend memory
+ * region with the receiver. So the name. But there is no way for extension
+ * libraries to know if a string is of such variant.
+ *
+ * @param[in] str An object of ::RString.
+ * @return An allocated instance of ::rb_cString, which shares the
+ * encoding, length, and contents with the passed string.
+ * @pre `str` must not be any arbitrary object except ::RString.
+ * @note Use #StringValue to enforce the precondition.
+ */
+VALUE rb_str_new_shared(VALUE str);
+
+/**
+ * Creates a frozen copy of the string, if necessary. This function does
+ * nothing when the passed string is already frozen. Otherwise, it allocates a
+ * copy of it, which is frozen. The passed string is untouched either ways.
+ *
+ * @param[in] str An object of ::RString.
+ * @return Something frozen.
+ * @pre `str` must not be any arbitrary object except ::RString.
+ * @note Use #StringValue to enforce the precondition.
+ */
+VALUE rb_str_new_frozen(VALUE str);
+
+/**
+ * Identical to rb_str_new(), except it takes the class of the allocating
+ * object.
+ *
+ * @param[in] obj A string-ish object.
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of the class of `obj`, of `len` bytes length, of
+ * "binary" encoding, whose contents are verbatim copy of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ *
+ * @internal
+ *
+ * Why it doesn't take an instance of ::rb_cClass?
+ */
+VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new(), except it generates a string of "default
+ * external" encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "default external" is fully defined over
+ * the given contents, then the return value is a string of
+ * "default external" encoding, whose contents are the converted
+ * ones. Otherwise the string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ */
+VALUE rb_external_str_new(const char *ptr, long len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_external_str_new(), except it assumes the passed pointer is
+ * a pointer to a C string. It can also be seen as a routine identical to
+ * rb_str_new_cstr(), except it generates a string of "default external"
+ * encoding.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "default external" is fully defined over
+ * the given contents, then the return value is a string of
+ * "default external" encoding, whose contents are the converted
+ * ones. Otherwise the string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_external_str_new_cstr(const char *ptr);
+
+/**
+ * Identical to rb_str_new(), except it generates a string of "locale"
+ * encoding. It can also be seen as a routine identical to
+ * rb_external_str_new(), except it generates a string of "locale" encoding
+ * instead of "default external" encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "locale" is fully defined over the given
+ * contents, then the return value is a string of "locale"
+ * encoding, whose contents are the converted ones. Otherwise the
+ * string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ */
+VALUE rb_locale_str_new(const char *ptr, long len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_locale_str_new(), except it assumes the passed pointer is a
+ * pointer to a C string. It can also be seen as a routine identical to
+ * rb_external_str_new_cstr(), except it generates a string of "locale"
+ * encoding instead of "default external".
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "locale" is fully defined over the given
+ * contents, then the return value is a string of "locale"
+ * encoding, whose contents are the converted ones. Otherwise the
+ * string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_locale_str_new_cstr(const char *ptr);
+
+/**
+ * Identical to rb_str_new(), except it generates a string of "filesystem"
+ * encoding. It can also be seen as a routine identical to
+ * rb_external_str_new(), except it generates a string of "filesystem" encoding
+ * instead of "default external" encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "filesystem" is fully defined over the
+ * given contents, then the return value is a string of
+ * "filesystem" encoding, whose contents are the converted ones.
+ * Otherwise the string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ */
+VALUE rb_filesystem_str_new(const char *ptr, long len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_filesystem_str_new(), except it assumes the passed pointer
+ * is a pointer to a C string. It can also be seen as a routine identical to
+ * rb_external_str_new_cstr(), except it generates a string of "filesystem"
+ * encoding instead of "default external".
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "filesystem" is fully defined over the
+ * given contents, then the return value is a string of
+ * "filesystem" encoding, whose contents are the converted ones.
+ * Otherwise the string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_filesystem_str_new_cstr(const char *ptr);
+
+/**
+ * Allocates a "string buffer". A string buffer here is an instance of
+ * ::rb_cString, whose capacity is bigger than the length of it. If you can
+ * say that a string grows to a specific amount of bytes, this could be
+ * effective than resizing a string over and over again and again.
+ *
+ * @param[in] capa Designed capacity of the generating string.
+ * @return An empty string, of "binary" encoding, whose capacity is `capa`.
+ */
+VALUE rb_str_buf_new(long capa);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is a rb_str_buf_new() + rb_str_buf_cat() combo.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose
+ * contents are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ *
+ * @internal
+ *
+ * This must be identical to rb_str_new_cstr(), except done in inefficient way?
+ * @shyouhei doesn't understand why this is not a simple alias.
+ */
+VALUE rb_str_buf_new_cstr(const char *ptr);
+
+/**
+ * Allocates a "temporary" string. This is a hidden empty string. Handy on
+ * occasions.
+ *
+ * @param[in] len Designed length of the string.
+ * @return A hidden, empty string.
+ * @see rb_obj_hide()
+ */
+VALUE rb_str_tmp_new(long len);
+
+/**
+ * Identical to rb_str_new(), except it generates a string of "US ASCII"
+ * encoding. This is different from rb_external_str_new(), not only for the
+ * output encoding, but also it doesn't convert the contents.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "US ASCII" encoding, whose contents are verbatim copy of `ptr`.
+ */
+VALUE rb_usascii_str_new(const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new_cstr(), except it generates a string of "US ASCII"
+ * encoding. It can also be seen as a routine Identical to
+ * rb_usascii_str_new(), except it assumes the passed pointer is a pointer to a
+ * C string.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @exception rb_eArgError `ptr` is a null pointer.
+ * @return An instance of ::rb_cString, of "US ASCII" encoding, whose
+ * contents are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_usascii_str_new_cstr(const char *ptr);
+
+/**
+ * Identical to rb_str_new(), except it generates a string of "UTF-8" encoding.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "UTF-8" encoding, whose contents are verbatim copy of `ptr`.
+ */
+VALUE rb_utf8_str_new(const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new_cstr(), except it generates a string of "UTF-8"
+ * encoding. It can also be seen as a routine Identical to
+ * rb_usascii_str_new(), except it assumes the passed pointer is a pointer to a
+ * C string.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @exception rb_eArgError `ptr` is a null pointer.
+ * @return An instance of ::rb_cString, of "UTF-8" encoding, whose contents
+ * are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_utf8_str_new_cstr(const char *ptr);
+
+/**
+ * @name Special strings that are backended by C string literals.
+ *
+ * *_str_new_static functions are intended for C string literals.
+ * They require memory in the range [ptr, ptr+len] to always be readable.
+ * Note that this range covers a total of len + 1 bytes.
+ *
+ * @{
+ */
+
+/**
+ * Identical to rb_str_new(), except it takes a C string literal.
+ *
+ * @param[in] ptr A C string literal.
+ * @param[in] len `strlen(ptr)`.
+ * @exception rb_eArgError `len` out of range of `size_t`.
+ * @pre `ptr` must be a C string constant.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose backend
+ * storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ *
+ * @internal
+ *
+ * Surprisingly it can take NULL, and generates an empty string.
+ */
+VALUE rb_str_new_static(const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new_static(), except it generates a string of "US ASCII"
+ * encoding instead of "binary". It can also be seen as a routine identical to
+ * rb_usascii_str_new(), except it takes a C string literal.
+ *
+ * @param[in] ptr A C string literal.
+ * @param[in] len `strlen(ptr)`.
+ * @exception rb_eArgError `len` out of range of `size_t`.
+ * @pre `ptr` must be a C string constant.
+ * @return An instance of ::rb_cString, of "US ASCII" encoding, whose
+ * backend storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+VALUE rb_usascii_str_new_static(const char *ptr, long len);
+
+/**
+ * Identical to rb_str_new_static(), except it generates a string of "UTF-8"
+ * encoding instead of "binary". It can also be seen as a routine identical to
+ * rb_utf8_str_new(), except it takes a C string literal.
+ *
+ * @param[in] ptr A C string literal.
+ * @param[in] len `strlen(ptr)`.
+ * @exception rb_eArgError `len` out of range of `size_t`.
+ * @pre `ptr` must be a C string constant.
+ * @return An instance of ::rb_cString, of "UTF-8" encoding, whose backend
+ * storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+VALUE rb_utf8_str_new_static(const char *ptr, long len);
+
+/** @} */
+
+/**
+ * Identical to rb_interned_str(), except it takes a Ruby's string instead of
+ * C's. It can also be seen as a routine identical to to rb_str_new_shared(),
+ * except it returns an infamous "f"string.
+ *
+ * @param[in] str An object of ::RString.
+ * @return An instance of ::rb_cString, either cached or allocated, which
+ * has the identical encoding, length, and contents with the passed
+ * string.
+ * @pre `str` must not be any arbitrary object except ::RString.
+ * @note Use #StringValue to enforce the precondition.
+ *
+ * @internal
+ *
+ * It actually finds or creates a fstring of the needed property, and
+ * destructively modifies the receiver behind-the-scene so that it becomes a
+ * shared string whose parent is the returning fstring.
+ */
+VALUE rb_str_to_interned_str(VALUE str);
+
+/**
+ * Identical to rb_str_new(), except it returns an infamous "f"string. What is
+ * a fstring? Well it is a special subkind of strings that is immutable,
+ * deduped globally, and managed by our GC. It is much like a Symbol (in fact
+ * Symbols are dynamic these days and are backended using fstrings). This
+ * concept has been silently introduced at some point in 2.x era. Since then
+ * it gained wider acceptance in the core. Starting from 3.x extension
+ * libraries can also generate ones.
+ *
+ * @param[in] ptr A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eArgError `len` is negative.
+ * @return A found or created instance of ::rb_cString, of `len` bytes
+ * length, of "binary" encoding, whose contents are identical to
+ * that of `ptr`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `ptr`.
+ */
+VALUE rb_interned_str(const char *ptr, long len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_interned_str(), except it assumes the passed pointer is a
+ * pointer to a C's string. It can also be seen as a routine identical to to
+ * rb_str_to_interned_str(), except it takes a C's string instead of Ruby's.
+ * Or it can also be seen as a routine identical to rb_str_new_cstr(), except
+ * it returns an infamous "f"string.
+ *
+ * @param[in] ptr A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose
+ * contents are verbatim copy of `ptr`.
+ * @pre `ptr` must not be a null pointer.
+ */
+VALUE rb_interned_str_cstr(const char *ptr);
+
+/**
+ * Destroys the given string for no reason.
+ *
+ * @warning DO NOT USE IT.
+ * @warning Leave this task to our GC.
+ * @warning It was a bad idea at the first place to let you know about it.
+ *
+ * @param[out] str The string to be executed.
+ * @post The given string no longer exists.
+ * @note Maybe `String#clear` could be what you want.
+ *
+ * @internal
+ *
+ * Should have moved this to `internal/string.h`.
+ */
+void rb_str_free(VALUE str);
+
+/**
+ * Replaces the contents of the former with the latter.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object.
+ * @pre Both objects must not be any arbitrary objects except
+ * ::RString.
+ * @post `dst`'s former components are abandoned. It now has the
+ * identical encoding, length, and contents to `src`.
+ * @see rb_str_replace()
+ *
+ * @internal
+ *
+ * @shyouhei doesn't understand why this is useful to extension libraries.
+ * Just use rb_str_replace(). What's wrong with that?
+ */
+void rb_str_shared_replace(VALUE dst, VALUE src);
+
+/**
+ * Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of
+ * C's. It can also be seen as a routine identical to rb_str_shared_replace(),
+ * except it appends instead of replaces.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object.
+ * @exception rb_eEncCompatError Can't mix the encodings.
+ * @exception rb_eArgError Result string too big.
+ * @return The passed `dst`.
+ * @pre Both objects must not be any arbitrary objects except
+ * ::RString.
+ * @post `dst` has the contents of `src` appended, with encoding
+ * converted into `dst`'s one, into the end of `dst`.
+ */
+VALUE rb_str_buf_append(VALUE dst, VALUE src);
+
+/** @alias{rb_str_cat} */
+VALUE rb_str_buf_cat(VALUE, const char*, long);
+
+/** @alias{rb_str_cat_cstr} */
+VALUE rb_str_buf_cat2(VALUE, const char*);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_str_cat_cstr(), except it additionally assumes the source
+ * string be a NUL terminated ASCII string.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source string.
+ * @exception rb_eArgError Result string too big.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary object except ::RString.
+ * @pre `src` must be a NUL terminated ASCII string.
+ * @post `dst` has the contents of `src` appended, with encoding
+ * converted into `dst`'s one, into the end of `dst`.
+ */
+VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src);
+
+/**
+ * Try converting an object to its stringised representation using its `to_s`
+ * method, if any. If there is no such thing, it resorts to rb_any_to_s()
+ * output.
+ *
+ * @param[in] obj Arbitrary ruby object to stringise.
+ * @return An instance of ::rb_cString.
+ */
+VALUE rb_obj_as_string(VALUE obj);
+
+/**
+ * Try converting an object to its stringised representation using its `to_str`
+ * method, if any. If there is no such thing, returns ::RUBY_Qnil.
+ *
+ * @param[in] obj Arbitrary ruby object to stringise.
+ * @exception rb_eTypeError `obj.to_str` returned something non-String.
+ * @retval RUBY_Qnil No conversion from obj to String defined.
+ * @return otherwise Stringised representation of `obj`.
+ * @see rb_io_check_io
+ * @see rb_check_array_type
+ * @see rb_check_hash_type
+ */
+VALUE rb_check_string_type(VALUE obj);
+
+/**
+ * Asserts that the given string's encoding is (Ruby's definition of) ASCII
+ * compatible.
+ *
+ * @param[in] obj An instance of ::rb_cString.
+ * @exception rb_eEncCompatError `obj` is ASCII incompatible.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know if this is an Easter egg or an official feature, but
+ * this function can in fact take non-strings such as Symbols, Regexps, IOs,
+ * etc. However if something unsupported is passed, it causes SEGV. It seems
+ * the feature is kind of untested.
+ */
+void rb_must_asciicompat(VALUE obj);
+
+/**
+ * Duplicates a string.
+ *
+ * @param[in] str String in question to duplicate.
+ * @return A duplicated new instance.
+ * @pre `str` must be of ::RString.
+ */
+VALUE rb_str_dup(VALUE str);
+
+/**
+ * I guess there is no use case of this function in extension libraries, but
+ * this is a routine identical to rb_str_dup(), except it always creates an
+ * instance of ::rb_cString regardless of the given object's class. This makes
+ * the most sense when the passed string is formerly hidden by rb_obj_hide().
+ *
+ * @param[in] str A string, possibly hidden.
+ * @return A duplicated new instance of ::rb_cString.
+ */
+VALUE rb_str_resurrect(VALUE str);
+
+/**
+ * Obtains a "temporary lock" of the string. This advisory locking mechanism
+ * prevents other cooperating threads from tampering the receiver. The same
+ * thing could be done via freeze mechanism, but this one can also be unlocked
+ * using rb_str_unlocktmp().
+ *
+ * @param[out] str String to lock.
+ * @exception rb_eRuntimeError `str` already locked.
+ * @return The given string.
+ * @post The string is locked.
+ */
+VALUE rb_str_locktmp(VALUE str);
+
+/**
+ * Releases a lock formerly obtained by rb_str_locktmp().
+ *
+ * @param[out] str String to unlock.
+ * @exception rb_eRuntimeError `str` already unlocked.
+ * @return The given string.
+ * @post The string is locked.
+ */
+VALUE rb_str_unlocktmp(VALUE str);
+
+/** @alias{rb_str_new_frozen} */
+VALUE rb_str_dup_frozen(VALUE);
+
+/** @alias{rb_str_new_frozen} */
+#define rb_str_dup_frozen rb_str_new_frozen
+
+/**
+ * Generates a new string, concatenating the former to the latter. It can also
+ * be seen as a routine identical to rb_str_append(), except it doesn't tamper
+ * the passed strings to create a new one instead.
+ *
+ * @param[in] lhs Source string #1.
+ * @param[in] rhs Source string #2.
+ * @exception rb_eEncCompatError Can't mix the encodings.
+ * @exception rb_eArgError Result string too big.
+ * @return A new string containing `rhs` concatenated to `lhs`.
+ * @pre Both objects must not be any arbitrary objects except ::RString.
+ * @note This operation doesn't commute. Don't get confused by the
+ * "plus" terminology. For historical reasons there are some
+ * noncommutative `+`s in Ruby. This is one of such things. There
+ * has been a long discussion around `+`s in programming languages.
+ */
+VALUE rb_str_plus(VALUE lhs, VALUE rhs);
+
+/**
+ * Repetition of a string.
+ *
+ * @param[in] str String to repeat.
+ * @param[in] num Count, something numeric.
+ * @exception rb_eArgError `num` is negative.
+ * @return A new string repeating `num` times of `str`.
+ */
+VALUE rb_str_times(VALUE str, VALUE num);
+
+/**
+ * Byte offset to character offset conversion. This makes sense when the
+ * receiver is in a multibyte encoding. The string's i-th character does not
+ * always sit at its i-th byte. This function scans the contents to find the
+ * character index that matches the byte index. Generally speaking this is an
+ * `O(n)` operation. Could be slow.
+ *
+ * @param[in] str The string to scan.
+ * @param[in] pos Offset, in bytes.
+ * @return Offset, in characters.
+ */
+long rb_str_sublen(VALUE str, long pos);
+
+/**
+ * This is the implementation of two-argumented `String#slice`.
+ *
+ * - Returns the substring of the given `len` found in `str` at offset `beg`:
+ *
+ * ```ruby
+ * 'foo'[0, 2] # => "fo"
+ * 'foo'[0, 0] # => ""
+ * ```
+ *
+ * - Counts backward from the end of `str` if `beg` is negative:
+ *
+ * ```ruby
+ * 'foo'[-2, 2] # => "oo"
+ * ```
+ *
+ * - Special case: returns a new empty string if `beg` is equal to the length
+ * of `str`:
+ *
+ * ```ruby
+ * 'foo'[3, 2] # => ""
+ * ```
+ *
+ * - Returns a null pointer if `beg` is out of range:
+ *
+ * ```ruby
+ * 'foo'[4, 2] # => nil
+ * 'foo'[-4, 2] # => nil
+ * ```
+ *
+ * - Returns the trailing substring of `str` if `len` is large:
+ *
+ * ```ruby
+ * 'foo'[1, 50] # => "oo"
+ * ```
+ *
+ * - Returns a null pointer if `len` is negative:
+ *
+ * ```ruby
+ * 'foo'[0, -1] # => nil
+ * ```
+ *
+ * @param[in] str The string to slice.
+ * @param[in] beg Requested offset of the substring.
+ * @param[in] len Requested length of the substring.
+ * @retval RUBY_Qnil Parameters out of range.
+ * @retval otherwise A new string whose contents is the specified
+ * substring of `str`.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ */
+VALUE rb_str_substr(VALUE str, long beg, long len);
+
+/**
+ * Identical to rb_str_substr(), except the numbers are interpreted as byte
+ * offsets instead of character offsets.
+ *
+ * @param[in] str The string to slice.
+ * @param[in] beg Requested offset of the substring.
+ * @param[in] len Requested length of the substring.
+ * @return A new string whose contents is the specified substring of `str`.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @pre `beg` and `len` must not point to OOB contents.
+ */
+VALUE rb_str_subseq(VALUE str, long beg, long len);
+
+/**
+ * Identical to rb_str_substr(), except it returns a C's string instead of
+ * Ruby's.
+ *
+ * @param[in] str The string to slice.
+ * @param[in] beg Requested offset of the substring.
+ * @param[in,out] len Requested length of the substring.
+ * @retval NULL Parameters out of range.
+ * @retval otherwise A pointer inside of `str`'s backend storage where
+ * the specified substring exist.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post `len` is updated to have the length of the return value.
+ */
+char *rb_str_subpos(VALUE str, long beg, long *len);
+
+/**
+ * Declares that the string is about to be modified. This for instance let the
+ * string have a dedicated backend storage.
+ *
+ * @param[out] str String about to be modified.
+ * @exception rb_eRuntimeError `str` is `locktmp`-ed.
+ * @exception rb_eFrozenError `str` is frozen.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post Upon successful return the passed string is eligible to be
+ * modified.
+ */
+void rb_str_modify(VALUE str);
+
+/**
+ * Identical to rb_str_modify(), except it additionally expands the capacity of
+ * the receiver.
+ *
+ * @param[out] str Target string to modify.
+ * @param[in] capa Additional capacity to add.
+ * @exception rb_eArgError `capa` is negative.
+ * @exception rb_eRuntimeError `str` is `locktmp`-ed.
+ * @exception rb_eFrozenError `str` is frozen.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post Upon successful return the passed string is modified so that
+ * its capacity is increased for `capa` bytes.
+ */
+void rb_str_modify_expand(VALUE str, long capa);
+
+/**
+ * This is the implementation of `String#freeze`.
+ *
+ * @param[out] str Target string to freeze.
+ * @return The passed string.
+ * @post Upon successful return the passed string is frozen.
+ */
+VALUE rb_str_freeze(VALUE str);
+
+/**
+ * Overwrites the length of the string. Typically this is used to shrink a
+ * string that was formerly expanded.
+ *
+ * ```CXX
+ * extern int fd;
+ * auto str = rb_eval_string("'...'");
+ * rb_str_modify_expand(str, BUFSIZ);
+ * if (auto len = recv(fd, RSTRING_PTR(str), BUFSIZ, 0); len >= 0) {
+ * rb_str_set_len(str, len);
+ * }
+ * else {
+ * rb_sys_fail("recv(2)");
+ * }
+ * ```
+ *
+ * @param[out] str String to shrink.
+ * @param[in] len New length of the string.
+ * @exception rb_eRuntimeError `str` is `locktmp`-ed.
+ * @exception rb_eFrozenError `str` is frozen.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post Upon successful return `str`'s length is set to `len`.
+ */
+void rb_str_set_len(VALUE str, long len);
+
+/**
+ * Overwrites the length of the string. In contrast to rb_str_set_len(), this
+ * function can also expand a string.
+ *
+ * @param[out] str String to shrink.
+ * @param[in] len New length of the string.
+ * @exception rb_eArgError `len` is negative.
+ * @exception rb_eRuntimeError `str` is `locktmp`-ed.
+ * @exception rb_eFrozenError `str` is frozen.
+ * @return The passed `str`.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post Upon successful return `str` is either expanded or shrunken to
+ * have its length be `len`.
+ */
+VALUE rb_str_resize(VALUE str, long len);
+
+/**
+ * Destructively appends the passed contents to the string.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Contents to append.
+ * @param[in] srclen Length of `src`.
+ * @exception rb_eArgError `srclen` is negative.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary objects except ::RString.
+ * @post `dst` has the contents of `ptr` appended.
+ */
+VALUE rb_str_cat(VALUE dst, const char *src, long srclen);
+
+/**
+ * Identical to rb_str_cat(), except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Contents to append.
+ * @exception rb_eArgError Result string too big.
+ * @exception rb_eArgError `src` is a null pointer.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary objects except ::RString.
+ * @pre `src` must not be a null pointer.
+ * @post `dst` has the contents of `src` appended.
+ */
+VALUE rb_str_cat_cstr(VALUE dst, const char *src);
+
+/** @alias{rb_str_cat_cstr} */
+VALUE rb_str_cat2(VALUE, const char*);
+
+/**
+ * Identical to rb_str_buf_append(), except it converts the right hand side
+ * before concatenating.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object.
+ * @exception rb_eEncCompatError Can't mix the encodings.
+ * @exception rb_eArgError Result string too big.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary objects except ::RString.
+ * @post `dst` has the contents of `src` appended, with encoding
+ * converted into `dst`'s one, into the end of `dst`.
+ */
+VALUE rb_str_append(VALUE dst, VALUE src);
+
+/**
+ * Identical to rb_str_append(), except it also accepts an integer as a
+ * codepoint. This resembles `String#<<`.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object, String or Numeric.
+ * @exception rb_eRangeError Source numeric is out of range.
+ * @exception rb_eEncCompatError Source string too long.
+ * @exception rb_eArgError Result string too big.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary objects except ::RString.
+ * @post `dst` has the contents of `src` appended, with encoding
+ * converted into `dst`'s one, into the end of `dst`.
+ */
+VALUE rb_str_concat(VALUE dst, VALUE src);
+
+/* random.c */
+
+/**
+ * This is a universal hash function.
+ *
+ * @warning This function changes its value per process.
+ * @param[in] ptr Target message.
+ * @param[in] len Length of `ptr` in bytes.
+ * @return A pseudorandom number suitable for Hash's hash value.
+ * @see Aumasson, JP., Bernstein, D.J., "SipHash: A Fast Short-Input
+ * PRF", In proceedings of 13th International Conference on
+ * Cryptology in India (INDOCRYPT 2012), LNCS 7668, pp. 489-508,
+ * 2012. http://doi.org/10.1007/978-3-642-34931-7_28
+*/
+st_index_t rb_memhash(const void *ptr, long len);
+
+/**
+ * Starts a series of hashing. Suppose you have a struct:
+ *
+ * ```CXX
+ * struct foo_tag {
+ * unsigned char bar;
+ * uint32_t baz;
+ * };
+ * ```
+ *
+ * It is not a wise idea to call rb_memhash() over it, because there could be
+ * padding bits. Instead you should explicitly iterate over each fields:
+ *
+ * ```CXX
+ * foo_tag foo = { 0, 0, };
+ * st_index_t hash = 0;
+ *
+ * hash = rb_hash_start(0);
+ * hash = rb_hash_uint(hash, foo.bar);
+ * hash = rb_hash_uint32(hash, foo.baz);
+ * hash = rb_hash_end(hash);
+ * ```
+ *
+ * @param[in] i Initial value.
+ * @return A hash value.
+ */
+st_index_t rb_hash_start(st_index_t i);
+
+/** @alias{st_hash_uint32} */
+#define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
+
+/** @alias{st_hash_uint} */
+#define rb_hash_uint(h, i) st_hash_uint((h), (i))
+
+/** @alias{st_hash_end} */
+#define rb_hash_end(h) st_hash_end(h)
+
+/* string.c */
+
+/**
+ * Calculates a hash value of a string. This is one of the two functions that
+ * constructs struct ::st_hash_type.
+ *
+ * @param[in] str An object of ::RString.
+ * @return A hash value.
+ * @pre `str` must not be any arbitrary object except ::RString.
+ *
+ * @internal
+ *
+ * Although safe to call, there must be no particular use case of this function
+ * for extension libraries. Only ruby internals must know about it.
+ *
+ * This is not a simple alias of rb_memhash(), because it considers the passed
+ * string's encoding as well as its contents.
+ */
+st_index_t rb_str_hash(VALUE str);
+
+/**
+ * Compares two strings. This is one of the two functions that constructs
+ * struct ::st_hash_type.
+ *
+ * @param[in] str1 A string.
+ * @param[in] str2 Another string.
+ * @retval 1 They have identical contents, length, and encodings.
+ * @retval 0 Otherwise.
+ * @pre Both objects must not be any arbitrary objects except
+ * ::RString.
+ *
+ * @internal
+ *
+ * In contrast to rb_str_hash(), this could be handy for comparison that only
+ * concerns equality. rb_str_cmp() returns 1, 0, -1.
+ */
+int rb_str_hash_cmp(VALUE str1, VALUE str2);
+
+/**
+ * Checks if two strings are comparable each other or not. Because
+ * rb_str_cmp() must return "lesser than" or "greater than" information,
+ * comparing two strings needs a stricter restriction. Both sides must be in a
+ * same set of strings which have total order. This is to check that property.
+ * Intuitive it sounds? But they can have different encodings. A character
+ * and another might or might not appear in the same order in their codepoints.
+ * It is complicated than you think.
+ *
+ * @param[in] str1 A string.
+ * @param[in] str2 Another string.
+ * @retval 1 They agree on a total order.
+ * @retval 0 Otherwise.
+ * @pre Both objects must not be any arbitrary objects except
+ * ::RString.
+ */
+int rb_str_comparable(VALUE str1, VALUE str2);
+
+/**
+ * Compares two strings, as in `strcmp(3)`. This does not consider the current
+ * locale, but considers the encodings of both sides instead.
+ *
+ * @param[in] lhs A string.
+ * @param[in] rhs Another string.
+ * @retval -1 `lhs` is "bigger than" `rhs`.
+ * @retval 1 `rhs` is "bigger than" `lhs`.
+ * @retval 0 Otherwise, e.g. not comparable.
+ * @pre Both objects must not be any arbitrary objects except
+ * ::RString.
+ */
+int rb_str_cmp(VALUE lhs, VALUE rhs);
+
+/**
+ * Equality of two strings.
+ *
+ * If `str2` is not a String, it resorts to `str2 == str1`. Otherwise if they
+ * are not comparable, returns ::RUBY_Qfalse. Otherwise if they have the same
+ * contents and the length, returns ::RUBY_Qtrue. Otherwise, returns
+ * ::RUBY_Qfalse.
+ *
+ * @param[in] str1 A string.
+ * @param[in] str2 Another string.
+ * @retval RUBY_Qtrue They are equal.
+ * @retval RUBY_Qfalse They are either different, or not comparable.
+ */
+VALUE rb_str_equal(VALUE str1, VALUE str2);
+
+/**
+ * Shrinks the given string for the given number of bytes.
+ *
+ * @param[out] str String to squash.
+ * @param[in] len Number of bytes to reduce.
+ * @exception rb_eRuntimeError `str` is `locktmp`-ed.
+ * @exception rb_eFrozenError `str` is frozen.
+ * @return The passed `str`.
+ * @pre `str` must not be any arbitrary objects except ::RString.
+ * @post `str` is shrunken.
+ * @warning Can break a multibyte character in middle.
+ *
+ * @internal
+ *
+ * What if `len` is negative?
+ */
+VALUE rb_str_drop_bytes(VALUE str, long len);
+
+/**
+ * Replaces some (or all) of the contents of the given string. This is the
+ * implementation of three-argumented `String#[]=`.
+ *
+ * @param[out] dst Target string to update.
+ * @param[in] beg Offset of the affected portion.
+ * @param[in] len Length of the affected portion.
+ * @param[in] src Object to be assigned.
+ * @exception rb_eTypeError `src` has no implicit conversion to String.
+ * @exception rb_eIndexError `len` is negative, or `beg` is OOB.
+ * @exception rb_eRuntimeError `dst` is `locktmp`-ed.
+ * @exception rb_eFrozenError `dst` is frozen.
+ * @note Unlike rb_str_substr(), this function raises.
+ * @post A portion of `dst` from `beg` to `len` is the stringised
+ * representation of `src`. If that replacement string is not the
+ * same length as the portion it is replacing, `dst` will be
+ * resized accordingly.
+ */
+void rb_str_update(VALUE dst, long beg, long len, VALUE src);
+
+/**
+ * Replaces the contents of the former object with the stringised contents of
+ * the latter.
+ *
+ * @param[out] dst Destination object.
+ * @param[in] src Source object.
+ * @exception rb_eTypeError `src` has no implicit conversion to String.
+ * @exception rb_eRuntimeError `dst` is `locktmp`-ed.
+ * @exception rb_eFrozenError `dst` is frozen.
+ * @return The passed `dst`.
+ * @pre `dst` must not be any arbitrary object except ::RString.
+ * @post `dst`'s former components are abandoned. It now has the
+ * identical encoding, length, and contents to `src`.
+ */
+VALUE rb_str_replace(VALUE dst, VALUE src);
+
+/**
+ * Generates a "readable" version of the receiver.
+ *
+ * @warning The output is _insecure_. Never feed one to `eval`.
+ * @warning The output is not always in the same encoding as the given one.
+ * @warning A character might or might not be escaped, depending on the
+ * result encoding.
+ * @param[in] str String to inspect.
+ * @return Its inspection, either in default internal encoding if any, or
+ * in default external encoding otherwise.
+ * @see rb_str_dump()
+ *
+ * @internal
+ *
+ * This is a (silent) fix of an actual vulnerability feeding `inspect` output
+ * strings to `eval`:
+ * https://github.com/hiki/hiki/commit/8771a6e25198e264a2bf9dc1c102fea2cc8ff975
+ *
+ * ... and its advisory:
+ * http://hikiwiki.org/en/advisory20040712.html
+ */
+VALUE rb_str_inspect(VALUE str);
+
+/**
+ * "Inverse" of rb_eval_string(). Returns a quoted version of the string. All
+ * non-printing characters are replaced by `\uNNNN` or `\xHH` notation and all
+ * special characters are escaped. The result string is guaranteed to render a
+ * string of the same contents when passed to `eval` and friends.
+ *
+ * @param[in] str String to dump.
+ * @exception rb_eRuntimeError Too many escape sequences causes integer
+ * overflow on the length of the string.
+ * @return An US-ASCII string that includes all the necessary info to
+ * reconstruct the original string.
+ */
+VALUE rb_str_dump(VALUE str);
+
+/**
+ * Divides the given string based on the given delimiter. This is the
+ * 1-argument 0-block version of `String#split`.
+ *
+ * @param[in] str Object in question to split.
+ * @param[in] delim Delimiter, in C string.
+ * @exception rb_eTypeError `str` has no implicit conversion to String.
+ * @exception rb_eArgError `delim` is a null pointer.
+ * @return An array of strings, which are substrings of the passed `str`.
+ * If `delim` is an empty C string (i.e. `""`), `str` is split into
+ * each characters. If `delim` is a C string whose sole content is
+ * a whitespace (i.e. `" "`), `str` is split on whitespaces, with
+ * leading and trailing whitespace and runs of contiguous
+ * whitespace characters ignored. Otherwise, `str` is split
+ * according to `delim`.
+ */
+VALUE rb_str_split(VALUE str, const char *delim);
+
+/**
+ * This is a ::rb_gvar_setter_t that refutes non-string assignments.
+ *
+ * @exception rb_eTypeError Passed something non-string.
+ */
+rb_gvar_setter_t rb_str_setter;
+
+/* symbol.c */
+
+/**
+ * Identical to rb_to_symbol(), except it assumes the receiver being an
+ * instance of ::RString.
+ *
+ * @param[in] str The name of the id.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given `str`.
+ * @pre `str` must not be any arbitrary object except ::RString.
+ * @note These days Ruby internally has two kinds of symbols
+ * (static/dynamic). Symbols created using this function would
+ * become dynamic ones; i.e. would be garbage collected. It could
+ * be safer for you to use it than alternatives, when applicable.
+ */
+VALUE rb_str_intern(VALUE str);
+
+/* string.c */
+
+/**
+ * This is an rb_sym2str() + rb_str_dup() combo.
+ *
+ * @param[in] sym A symbol to query.
+ * @return A string duplicating the symbol's backend storage.
+ *
+ * @internal
+ *
+ * This function causes SEGV when the passed value is a static symbol that
+ * doesn't exist.
+ */
+VALUE rb_sym_to_s(VALUE sym);
+
+/**
+ * Counts the number of characters (not bytes) that are stored inside of the
+ * given string. This of course depends on its encoding. Also this function
+ * generally runs in O(n), because for instance you have to scan the entire
+ * string to know how many characters are there in a UTF-8 string.
+ *
+ * @param[in] str Target string to query.
+ * @return Its number of characters.
+ */
+long rb_str_strlen(VALUE str);
+
+/**
+ * Identical to rb_str_strlen(), except it returns the value in ::rb_cInteger.
+ *
+ * @param[in] str Target string to query.
+ * @return Its number of characters.
+ */
+VALUE rb_str_length(VALUE);
+
+/**
+ * "Inverse" of rb_str_sublen(). This function scans the contents to find the
+ * byte index that matches the character index. Generally speaking this is an
+ * `O(n)` operation. Could be slow.
+ *
+ * @param[in] str The string to scan.
+ * @param[in] pos Offset, in characters.
+ * @return Offset, in bytes.
+ */
+long rb_str_offset(VALUE str, long pos);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries the capacity of the given string.
+ *
+ * @see ::RString::capa
+ * @param[in] str String in question.
+ * @return Its capacity.
+ */
+size_t rb_str_capacity(VALUE str);
+
+/**
+ * Shortens `str` and adds three dots, an ellipsis, if it is longer than `len`
+ * characters. The length of the returned string in characters is less than or
+ * equal to `len`. If the length of `str` is less than or equal `len`, returns
+ * `str` itself. The encoding of returned string is equal to that of passed
+ * one. The class of returned string is equal to that of passed one.
+ *
+ * @param[in] str The string to shorten.
+ * @param[in] len The maximum string length.
+ * @exception rb_eIndexError `len` is negative.
+ * @retval str No need to add ellipsis.
+ * @retval otherwise A new, shortened string.
+ * @note The length is counted in characters.
+ */
+VALUE rb_str_ellipsize(VALUE str, long len);
+
+/**
+ * "Cleanses" the string. A string has its encoding and its contents. They,
+ * in practice, do not always fit. There are strings in the wild that are
+ * "broken"; include bit patterns that are not allowed by its encoding. That
+ * can happen when a user copy&pasted something bad, network input got
+ * clobbered by a middleman, cosmic rays hit the physical memory, and many more
+ * occasions. This function takes such strings, and fills the "broken" portion
+ * with the passed replacement bit pattern.
+ *
+ * This function also takes a ruby block. That is a neat way to do things, but
+ * can be annoying when the caller function want to use a block for another
+ * purpose.
+ *
+ * @param[in] str Target string to scrub.
+ * @param[in] repl Replacement string. When it is a string,
+ * this function takes that as a replacement.
+ * When it is ::RUBY_Qnil, this function tries
+ * to yield a block (if any) and takes its
+ * evaluated value as a replacement. In case
+ * of ::RUBY_Qnil without a block, this
+ * function takes an encoding-specific default
+ * character (`U+FFFD`, for instance) as a last
+ * resort.
+ * @exception rb_eTypeError `repl` is neither string nor nil.
+ * @exception rb_eArgError `repl` itself is broken.
+ * @exception rb_eEncCompatError `repl` and `str` are incompatible.
+ * @retval RUBY_Qnil `str` is already clean.
+ * @retval otherwise A new, clean string.
+ */
+VALUE rb_str_scrub(VALUE str, VALUE repl);
+
+/**
+ * Searches for the "successor" of a string. This function is complicated!
+ * This is the only function in the entire ruby API (either C or Ruby) that
+ * generates a string out of thin air. First, the successor to an empty string
+ * is a new empty string:
+ *
+ * ```ruby
+ * ''.succ # => ""
+ * ```
+ *
+ * Otherwise the successor is calculated by "incrementing" characters. The
+ * first character to be incremented is the rightmost alphanumeric: or, if no
+ * alphanumerics, the rightmost character:
+ *
+ * ```ruby
+ * 'THX1138'.succ # => "THX1139"
+ * '<<koala>>'.succ # => "<<koalb>>"
+ * '***'.succ # => '**+'
+ * ```
+ *
+ * The successor to a digit is another digit, "carrying" to the next-left
+ * character for a "rollover" from 9 to 0, and prepending another digit if
+ * necessary:
+ *
+ * ```ruby
+ * '00'.succ # => "01"
+ * '09'.succ # => "10"
+ * '99'.succ # => "100"
+ * '-9'.succ # => "-10"
+ * ```
+ *
+ * The successor to a letter is another letter of the same case, carrying to
+ * the next-left character for a rollover, and prepending another same-case
+ * letter if necessary:
+ *
+ * ```ruby
+ * 'aa'.succ # => "ab"
+ * 'az'.succ # => "ba"
+ * 'zz'.succ # => "aaa"
+ * 'AA'.succ # => "AB"
+ * 'AZ'.succ # => "BA"
+ * 'ZZ'.succ # => "AAA"
+ * ```
+ *
+ * The successor to a non-alphanumeric character is the next character in the
+ * underlying character set's collating sequence, carrying to the next-left
+ * character for a rollover, and prepending another character if necessary:
+ *
+ * ```ruby
+ * s = "\u03A1"
+ * s.succ # => "\u03A3" # There is no such thing like \u03A2.
+ * s = 255.chr * 3
+ * s # => "\xFF\xFF\xFF"
+ * s.succ # => "\x01\x00\x00\x00"
+ * ```
+ *
+ * Carrying can occur between and among mixtures of alphanumeric characters:
+ *
+ * ```ruby
+ * s = 'zz99zz99'
+ * s.succ # => "aaa00aa00"
+ * s = '99zz99zz'
+ * s.succ # => "100aa00aa"
+ * s = '1.9.9'
+ * s.succ # => "2.0.0"
+ * ```
+ *
+ * @param[in] orig Predecessor string.
+ * @return Successor string.
+ */
+VALUE rb_str_succ(VALUE orig);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string.
+ * @return `strlen`, casted to `long`.
+ */
+static inline long
+rbimpl_strlen(const char *str)
+{
+ return RBIMPL_CAST((long)strlen(str));
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_str_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_str_new_static(str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_usascii_str_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_usascii_str_new_static(str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_utf8_str_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_utf8_str_new_static(str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_external_str_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_external_str_new(str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_locale_str_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_locale_str_new(str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] str A C string literal.
+ * @return Corresponding Ruby string.
+ */
+static inline VALUE
+rbimpl_str_buf_new_cstr(const char *str)
+{
+ long len = rbimpl_strlen(str);
+ VALUE buf = rb_str_buf_new(len);
+ return rb_str_buf_cat(buf, str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[out] buf A string buffer.
+ * @param[in] str A C string literal.
+ * @return `buf` itself.
+ */
+static inline VALUE
+rbimpl_str_cat_cstr(VALUE buf, const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_str_cat(buf, str, len);
+}
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail. Don't bother.
+ *
+ * @param[in] exc An exception class.
+ * @param[in] str A C string literal.
+ * @return An instance of `exc`.
+ */
+static inline VALUE
+rbimpl_exc_new_cstr(VALUE exc, const char *str)
+{
+ long len = rbimpl_strlen(str);
+ return rb_exc_new(exc, str, len);
+}
+
+/**
+ * Allocates an instance of ::rb_cString.
+ *
+ * @param[in] str A memory region of `len` bytes length.
+ * @param[in] len Length of `ptr`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "binary" encoding, whose contents are verbatim copy of `str`.
+ * @pre At least `len` bytes of continuous memory region shall be
+ * accessible via `str`.
+ */
+#define rb_str_new(str, len) \
+ ((RBIMPL_CONSTANT_P(str) && \
+ RBIMPL_CONSTANT_P(len) ? \
+ rb_str_new_static : \
+ rb_str_new) ((str), (len)))
+
+/**
+ * Identical to #rb_str_new, except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose
+ * contents are verbatim copy of `str`.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_str_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_str_new_cstr : \
+ rb_str_new_cstr) (str))
+
+/**
+ * Identical to #rb_str_new, except it generates a string of "US ASCII"
+ * encoding. This is different from rb_external_str_new(), not only for the
+ * output encoding, but also it doesn't convert the contents.
+ *
+ * @param[in] str A memory region of `len` bytes length.
+ * @param[in] len Length of `str`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "US ASCII" encoding, whose contents are verbatim copy of `str`.
+ */
+#define rb_usascii_str_new(str, len) \
+ ((RBIMPL_CONSTANT_P(str) && \
+ RBIMPL_CONSTANT_P(len) ? \
+ rb_usascii_str_new_static : \
+ rb_usascii_str_new) ((str), (len)))
+
+/**
+ * Identical to #rb_str_new, except it generates a string of "UTF-8" encoding.
+ *
+ * @param[in] str A memory region of `len` bytes length.
+ * @param[in] len Length of `str`, in bytes, not including the
+ * terminating NUL character.
+ * @exception rb_eNoMemError Failed to allocate `len+1` bytes.
+ * @exception rb_eArgError `len` is negative.
+ * @return An instance of ::rb_cString, of `len` bytes length, of
+ * "UTF-8" encoding, whose contents are verbatim copy of `str`.
+ */
+#define rb_utf8_str_new(str, len) \
+ ((RBIMPL_CONSTANT_P(str) && \
+ RBIMPL_CONSTANT_P(len) ? \
+ rb_utf8_str_new_static : \
+ rb_utf8_str_new) ((str), (len)))
+
+/**
+ * Identical to #rb_str_new_cstr, except it generates a string of "US ASCII"
+ * encoding. It can also be seen as a routine Identical to
+ * #rb_usascii_str_new, except it assumes the passed pointer is a pointer to a
+ * C string.
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "US ASCII" encoding, whose
+ * contents are verbatim copy of `str`.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_usascii_str_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_usascii_str_new_cstr : \
+ rb_usascii_str_new_cstr) (str))
+
+/**
+ * Identical to #rb_str_new_cstr, except it generates a string of "UTF-8"
+ * encoding. It can also be seen as a routine Identical to #rb_utf8_str_new,
+ * except it assumes the passed pointer is a pointer to a C string.
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "UTF-8" encoding, whose contents
+ * are verbatim copy of `str`.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_utf8_str_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_utf8_str_new_cstr : \
+ rb_utf8_str_new_cstr) (str))
+
+/**
+ * Identical to #rb_str_new_cstr, except it generates a string of "default
+ * external" encoding.
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "default external" is fully defined over
+ * the given contents, then the return value is a string of
+ * "default external" encoding, whose contents are the converted
+ * ones. Otherwise the string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_external_str_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_external_str_new_cstr : \
+ rb_external_str_new_cstr) (str))
+
+/**
+ * Identical to #rb_external_str_new_cstr, except it generates a string of
+ * "locale" encoding instead of "default external".
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString. In case encoding conversion from
+ * "default internal" to "locale" is fully defined over the given
+ * contents, then the return value is a string of "locale"
+ * encoding, whose contents are the converted ones. Otherwise the
+ * string is a junk.
+ * @warning It doesn't raise on a conversion failure and silently ends up in
+ * a corrupted output. You can know the failure by querying
+ * `valid_encoding?` of the result object.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_locale_str_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_locale_str_new_cstr : \
+ rb_locale_str_new_cstr) (str))
+
+/**
+ * Identical to #rb_str_new_cstr, except done differently.
+ *
+ * @param[in] str A C string.
+ * @exception rb_eNoMemError Failed to allocate memory.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose
+ * contents are verbatim copy of `str`.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_str_buf_new_cstr(str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_str_buf_new_cstr : \
+ rb_str_buf_new_cstr) (str))
+
+/**
+ * Identical to rb_str_cat(), except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[out] buf Destination object.
+ * @param[in] str Contents to append.
+ * @exception rb_eArgError Result string too big.
+ * @return The passed `buf`.
+ * @pre `buf` must not be any arbitrary objects except ::RString.
+ * @pre `str` must not be a null pointer.
+ * @post `buf` has the contents of `str` appended.
+ */
+#define rb_str_cat_cstr(buf, str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_str_cat_cstr : \
+ rb_str_cat_cstr) ((buf), (str)))
+
+/**
+ * Identical to rb_exc_new(), except it assumes the passed pointer is a pointer
+ * to a C string.
+ *
+ * @param[out] exc A subclass of ::rb_eException.
+ * @param[in] str Message to raise.
+ * @return An instance of `exc` whose message is `str`.
+ * @pre `str` must not be a null pointer.
+ */
+#define rb_exc_new_cstr(exc, str) \
+ ((RBIMPL_CONSTANT_P(str) ? \
+ rbimpl_exc_new_cstr : \
+ rb_exc_new_cstr) ((exc), (str)))
+
+#define rb_str_new2 rb_str_new_cstr /**< @old{rb_str_new_cstr} */
+#define rb_str_new3 rb_str_new_shared /**< @old{rb_str_new_shared} */
+#define rb_str_new4 rb_str_new_frozen /**< @old{rb_str_new_frozen} */
+#define rb_str_new5 rb_str_new_with_class /**< @old{rb_str_new_with_class} */
+#define rb_str_buf_new2 rb_str_buf_new_cstr /**< @old{rb_str_buf_new_cstr} */
+#define rb_usascii_str_new2 rb_usascii_str_new_cstr /**< @old{rb_usascii_str_new_cstr} */
+#define rb_str_buf_cat rb_str_cat /**< @alias{rb_str_cat} */
+#define rb_str_buf_cat2 rb_str_cat_cstr /**< @old{rb_usascii_str_new_cstr} */
+#define rb_str_cat2 rb_str_cat_cstr /**< @old{rb_str_cat_cstr} */
+
+/**
+ * Length of a string literal.
+ *
+ * @param[in] str A C String literal.
+ * @return An integer constant expression that represents `str`'s length,
+ * in bytes, not including the terminating NUL character.
+ */
+#define rb_strlen_lit(str) (sizeof(str "") - 1)
+
+/**
+ * Identical to rb_str_new_static(), except it cannot take string variables.
+ *
+ * @param[in] str A C string literal.
+ * @pre `str` must not be a variable.
+ * @return An instance of ::rb_cString, of "binary" encoding, whose backend
+ * storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
+
+/**
+ * Identical to rb_usascii_str_new_static(), except it cannot take string
+ * variables.
+ *
+ * @param[in] str A C string literal.
+ * @pre `str` must not be a variable.
+ * @return An instance of ::rb_cString, of "US ASCII" encoding, whose
+ * backend storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
+
+/**
+ * Identical to rb_utf8_str_new_static(), except it cannot take string
+ * variables.
+ *
+ * @param[in] str A C string literal.
+ * @pre `str` must not be a variable.
+ * @return An instance of ::rb_cString, of "UTF-8" encoding, whose backend
+ * storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
+
+/**
+ * Identical to rb_enc_str_new_static(), except it cannot take string
+ * variables.
+ *
+ * @param[in] str A C string literal.
+ * @param[in] enc A pointer to an encoding.
+ * @pre `str` must not be a variable.
+ * @return An instance of ::rb_cString, of the passed encoding, whose
+ * backend storage is the passed C string literal.
+ * @warning It is a very bad idea to write to a C string literal (often
+ * immediate SEGV shall occur). Consider return values of this
+ * function be read-only.
+ */
+#define rb_enc_str_new_lit(str, enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
+
+#define rb_str_new_literal(str) rb_str_new_lit(str) /**< @alias{rb_str_new_lit} */
+#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str) /**< @alias{rb_usascii_str_new_lit} */
+#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str) /**< @alias{rb_utf8_str_new_lit} */
+#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_lit(str, enc) /**< @alias{rb_enc_str_new_lit} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_STRING_H */
diff --git a/include/ruby/internal/intern/struct.h b/include/ruby/internal/intern/struct.h
new file mode 100644
index 0000000000..312cf444e2
--- /dev/null
+++ b/include/ruby/internal/intern/struct.h
@@ -0,0 +1,203 @@
+#ifndef RBIMPL_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_STRUCT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cStruct.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/intern/vm.h" /* rb_alloc_func_t */
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* struct.c */
+
+/**
+ * Creates an instance of the given struct.
+ *
+ * @param[in] klass The class of the instance to allocate.
+ * @param[in] ... The fields.
+ * @return Allocated instance of `klass`.
+ * @pre `klass` must be a subclass of ::rb_cStruct.
+ * @note Number of variadic arguments must much that of the passed klass'
+ * fields.
+ */
+VALUE rb_struct_new(VALUE klass, ...);
+
+/**
+ * Defines a struct class.
+ *
+ * @param[in] name Name of the class.
+ * @param[in] ... Arbitrary number of `const char*`, terminated by
+ * zero. Each of which are the name of fields.
+ * @exception rb_eNameError `name` is not a constant name.
+ * @exception rb_eTypeError `name` is already taken.
+ * @exception rb_eArgError Duplicated field name.
+ * @return The defined class.
+ * @post Global toplevel constant `name` is defined.
+ * @note `name` is allowed to be a null pointer. This function creates
+ * an anonymous struct class then.
+ *
+ * @internal
+ *
+ * Not seriously checked but it seems this function does not share its
+ * implementation with how `Struct.new` is implemented...?
+ */
+VALUE rb_struct_define(const char *name, ...);
+
+RBIMPL_ATTR_NONNULL((2))
+/**
+ * Identical to rb_struct_define(), except it defines the class under the
+ * specified namespace instead of global toplevel.
+ *
+ * @param[out] space Namespace that the defining class shall reside.
+ * @param[in] name Name of the class.
+ * @param[in] ... Arbitrary number of `const char*`, terminated by
+ * zero. Each of which are the name of fields.
+ * @exception rb_eNameError `name` is not a constant name.
+ * @exception rb_eTypeError `name` is already taken.
+ * @exception rb_eArgError Duplicated field name.
+ * @return The defined class.
+ * @post `name` is a constant under `space`.
+ * @note In contrast to rb_struct_define(), it doesn't make any sense to
+ * pass a null pointer to this function.
+ */
+VALUE rb_struct_define_under(VALUE space, const char *name, ...);
+
+/**
+ * Identical to rb_struct_new(), except it takes the field values as a Ruby
+ * array.
+ *
+ * @param[in] klass The class of the instance to allocate.
+ * @param[in] values Field values.
+ * @return Allocated instance of `klass`.
+ * @pre `klass` must be a subclass of ::rb_cStruct.
+ * @pre `values` must be an instance of struct ::RArray.
+ */
+VALUE rb_struct_alloc(VALUE klass, VALUE values);
+
+/**
+ * Mass-assigns a struct's fields.
+ *
+ * @param[out] self An instance of a struct class to squash.
+ * @param[in] values New values.
+ * @return ::RUBY_Qnil.
+ */
+VALUE rb_struct_initialize(VALUE self, VALUE values);
+
+/**
+ * Identical to rb_struct_aref(), except it takes ::ID instead of ::VALUE.
+ *
+ * @param[in] self An instance of a struct class.
+ * @param[in] key Key to query.
+ * @exception rb_eTypeError `self` is not a struct.
+ * @exception rb_eNameError No such field.
+ * @return The value stored at `key` in `self`.
+ */
+VALUE rb_struct_getmember(VALUE self, ID key);
+
+/**
+ * Queries the list of the names of the fields of the given struct class.
+ *
+ * @param[in] klass A subclass of ::rb_cStruct.
+ * @return The list of the names of the fields of `klass`.
+ */
+VALUE rb_struct_s_members(VALUE klass);
+
+/**
+ * Queries the list of the names of the fields of the class of the given struct
+ * object. This is almost the same as calling rb_struct_s_members() over the
+ * class of the receiver.
+ *
+ * @internal
+ *
+ * "Almost"? What exactly is the difference?
+ *
+ * @endinternal
+ *
+ * @param[in] self An instance of a subclass of ::rb_cStruct.
+ * @return The list of the names of the fields.
+ */
+VALUE rb_struct_members(VALUE self);
+
+/**
+ * Allocates an instance of the given class. This consequential name is of
+ * course because rb_struct_alloc() not only allocates but also initialises an
+ * instance. The API design is broken.
+ *
+ * @param[in] klass A subclass of ::rb_cStruct.
+ * @return An allocated instance of `klass`, not initialised.
+ */
+VALUE rb_struct_alloc_noinit(VALUE klass);
+
+/**
+ * Identical to rb_struct_define(), except it does not define accessor methods.
+ * You have to define them yourself. Forget about the allocator function
+ * parameter; it is for internal use only. Extension libraries are unable to
+ * properly allocate a ruby struct, because `RStruct` is opaque.
+ *
+ * @internal
+ *
+ * Several flags must be set up properly for ::RUBY_T_STRUCT objects, which are
+ * also missing for extension libraries.
+ *
+ * @endinternal
+ *
+ * @param[in] name Name of the class.
+ * @param[in] super Superclass of the defining class.
+ * @param[in] func Must be 0 for extension libraries.
+ * @param[in] ... Arbitrary number of `const char*`, terminated by
+ * zero. Each of which are the name of fields.
+ * @exception rb_eNameError `name` is not a constant name.
+ * @exception rb_eTypeError `name` is already taken.
+ * @exception rb_eArgError Duplicated field name.
+ * @return The defined class.
+ * @post Global toplevel constant `name` is defined.
+ * @note `name` is allowed to be a null pointer. This function creates
+ * an anonymous struct class then.
+ */
+VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func, ...);
+
+RBIMPL_ATTR_NONNULL((2))
+/**
+ * Identical to rb_struct_define_without_accessor(), except it defines the
+ * class under the specified namespace instead of global toplevel. It can also
+ * be seen as a routine identical to rb_struct_define_under(), except it does
+ * not define accessor methods.
+ *
+ * @param[out] outer Namespace that the defining class shall reside.
+ * @param[in] class_name Name of the class.
+ * @param[in] super Superclass of the defining class.
+ * @param[in] alloc Must be 0 for extension libraries.
+ * @param[in] ... Arbitrary number of `const char*`, terminated by
+ * zero. Each of which are the name of fields.
+ * @exception rb_eNameError `class_name` is not a constant name.
+ * @exception rb_eTypeError `class_name` is already taken.
+ * @exception rb_eArgError Duplicated field name.
+ * @return The defined class.
+ * @post `class_name` is a constant under `outer`.
+ * @note In contrast to rb_struct_define_without_accessor(), it doesn't
+ * make any sense to pass a null name.
+ */
+VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_STRUCT_H */
diff --git a/include/ruby/internal/intern/thread.h b/include/ruby/internal/intern/thread.h
new file mode 100644
index 0000000000..716375acd7
--- /dev/null
+++ b/include/ruby/internal/intern/thread.h
@@ -0,0 +1,492 @@
+#ifndef RBIMPL_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_THREAD_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cThread.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/config.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+struct timeval;
+
+/* thread.c */
+
+/**
+ * Tries to switch to another thread. This function blocks until the current
+ * thread re-acquires the GVL.
+ *
+ * @exception rb_eInterrupt Operation interrupted.
+ */
+void rb_thread_schedule(void);
+
+/**
+ * Blocks the current thread until the given file descriptor is ready to be
+ * read.
+ *
+ * @param[in] fd A file descriptor.
+ * @exception rb_eIOError Closed stream.
+ * @exception rb_eSystemCallError Situations like EBADF.
+ */
+int rb_thread_wait_fd(int fd);
+
+/**
+ * Identical to rb_thread_wait_fd(), except it blocks the current thread until
+ * the given file descriptor is ready to be written.
+ *
+ * @param[in] fd A file descriptor.
+ * @exception rb_eIOError Closed stream.
+ * @exception rb_eSystemCallError Situations like EBADF.
+ */
+int rb_thread_fd_writable(int fd);
+
+/**
+ * Notifies a closing of a file descriptor to other threads. Multiple threads
+ * can wait for the given file descriptor at once. If such file descriptor is
+ * closed, threads need to start propagating their exceptions. This is the API
+ * to kick that process.
+ *
+ * @param[in] fd A file descriptor.
+ * @note This function blocks until all the threads waiting for such fd
+ * have woken up.
+ */
+void rb_thread_fd_close(int fd);
+
+/**
+ * Checks if the thread this function is running is the only thread that is
+ * currently alive.
+ *
+ * @retval 1 Yes it is.
+ * @retval 0 No it isn't.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. There are Ractors these days.
+ */
+int rb_thread_alone(void);
+
+/**
+ * Blocks for the given period of time.
+ *
+ * @warning This function can be interrupted by signals.
+ * @param[in] sec Duration in seconds.
+ * @exception rb_eInterrupt Interrupted.
+ */
+void rb_thread_sleep(int sec);
+
+/**
+ * Blocks indefinitely.
+ *
+ * @exception rb_eInterrupt Interrupted.
+ */
+void rb_thread_sleep_forever(void);
+
+/**
+ * Identical to rb_thread_sleep_forever(), except the thread calling this
+ * function is considered "dead" when our deadlock checker is triggered.
+ *
+ * @exception rb_eInterrupt Interrupted.
+ */
+void rb_thread_sleep_deadly(void);
+
+/**
+ * Stops the current thread. This is not the end of the thread's lifecycle. A
+ * stopped thread can later be woken up.
+ *
+ * @exception rb_eThreadError Stopping this thread would deadlock.
+ * @retval ::RUBY_Qnil Always.
+ *
+ * @internal
+ *
+ * The return value makes no sense at all.
+ */
+VALUE rb_thread_stop(void);
+
+/**
+ * Marks a given thread as eligible for scheduling.
+ *
+ * @note It may still remain blocked on I/O.
+ * @note This does not invoke the scheduler itself.
+ *
+ * @param[out] thread Thread in question to wake up.
+ * @exception rb_eThreadError Stop flogging a dead horse.
+ * @return The passed thread.
+ * @post The passed thread is made runnable.
+ */
+VALUE rb_thread_wakeup(VALUE thread);
+
+/**
+ * Identical to rb_thread_wakeup(), except it doesn't raise on an already
+ * killed thread.
+ *
+ * @param[out] thread A thread to wake up.
+ * @retval RUBY_Qnil `thread` is already killed.
+ * @retval otherwise `thread` is alive.
+ * @post The passed thread is made runnable, unless killed.
+ */
+VALUE rb_thread_wakeup_alive(VALUE thread);
+
+/**
+ * This is a rb_thread_wakeup() + rb_thread_schedule() combo.
+ *
+ * @note There is no guarantee that this function yields to the passed
+ * thread. It may still remain blocked on I/O.
+ * @param[out] thread Thread in question to wake up.
+ * @exception rb_eThreadError Stop flogging a dead horse.
+ * @return The passed thread.
+ */
+VALUE rb_thread_run(VALUE thread);
+
+/**
+ * Terminates the given thread. Unlike a stopped thread, a killed thread could
+ * never be revived. This function does return, when passed e.g. an already
+ * killed thread. But if the passed thread is the only one, or a special
+ * thread called "main", then it also terminates the entire process.
+ *
+ * @param[out] thread The thread to terminate.
+ * @exception rb_eFatal The passed thread is the running thread.
+ * @exception rb_eSystemExit The passed thread is the last thread.
+ * @return The passed thread.
+ * @post Either the passed thread, or the process entirely, is killed.
+ *
+ * @internal
+ *
+ * It seems killing the main thread also kills the entire process even if there
+ * are multiple running ractors. No idea why.
+ */
+VALUE rb_thread_kill(VALUE thread);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Creates a Ruby thread that is backended by a C function.
+ *
+ * @param[in] f The function to run on a thread.
+ * @param[in,out] g Passed through to `f`.
+ * @exception rb_eThreadError Could not create a ruby thread.
+ * @exception rb_eSystemCallError Situations like `EPERM`.
+ * @return Allocated instance of ::rb_cThread.
+ * @note This doesn't wait for anything.
+ */
+VALUE rb_thread_create(VALUE (*f)(void *g), void *g);
+
+/**
+ * Identical to rb_thread_sleep(), except it takes struct `timeval` instead.
+ *
+ * @warning This function can be interrupted by signals.
+ * @param[in] time Duration.
+ * @exception rb_eInterrupt Interrupted.
+ */
+void rb_thread_wait_for(struct timeval time);
+
+/**
+ * Obtains the "current" thread.
+ *
+ * @return The current thread of the current ractor of the current execution
+ * context.
+ * @pre This function must be called from a thread controlled by ruby.
+ */
+VALUE rb_thread_current(void);
+
+/**
+ * Obtains the "main" thread. There are threads called main. Historically the
+ * (only) main thread was the one which runs when the process boots. Now that
+ * we have Ractor, there are more than one main threads.
+ *
+ * @return The main thread of the current ractor of the current execution
+ * context.
+ * @pre This function must be called from a thread controlled by ruby.
+ */
+VALUE rb_thread_main(void);
+
+/**
+ * This badly named function reads from a Fiber local storage. When this
+ * function was born there was no such thing like a Fiber. The world was
+ * innocent. But now... This is a Fiber local storage. Sorry.
+ *
+ * @param[in] thread Thread that the target Fiber is running.
+ * @param[in] key The name of the Fiber local storage to read.
+ * @retval RUBY_Qnil No such storage.
+ * @retval otherwise The value stored at `key`.
+ * @note There in fact are "true" thread local storage, but Ruby doesn't
+ * provide any interface of them to you, C programmers.
+ */
+VALUE rb_thread_local_aref(VALUE thread, ID key);
+
+/**
+ * This badly named function writes to a Fiber local storage. When this
+ * function was born there was no such thing like a Fiber. The world was
+ * innocent. But now... This is a Fiber local storage. Sorry.
+ *
+ * @param[in] thread Thread that the target Fiber is running.
+ * @param[in] key The name of the Fiber local storage to write.
+ * @param[in] val The new value of the storage.
+ * @exception rb_eFrozenError `thread` is frozen.
+ * @return The passed `val` as-is.
+ * @post Fiber local storage `key` has value of `val`.
+ * @note There in fact are "true" thread local storage, but Ruby doesn't
+ * provide any interface of them to you, C programmers.
+ */
+VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val);
+
+/**
+ * A `pthread_atfork(3posix)`-like API. Ruby expects its child processes to
+ * call this function at the very beginning of their processes. If you plan to
+ * fork a process don't forget to call it.
+ */
+void rb_thread_atfork(void);
+
+/**
+ * :FIXME: situation of this function is unclear. It seems nobody uses it.
+ * Maybe a good idea to KonMari.
+ */
+void rb_thread_atfork_before_exec(void);
+
+/**
+ * "Recursion" API entry point. This basically calls the given function with
+ * the given arguments, but additionally with recursion flag. The flag is set
+ * to 1 if the execution have already experienced the passed `g` parameter
+ * before.
+ *
+ * @param[in] f The function that possibly recurs.
+ * @param[in,out] g Passed as-is to `f`.
+ * @param[in,out] h Passed as-is to `f`.
+ * @return The return value of f.
+ */
+VALUE rb_exec_recursive(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h);
+
+/**
+ * Identical to rb_exec_recursive(), except it checks for the recursion on the
+ * ordered pair of `{ g, p }` instead of just `g`.
+ *
+ * @param[in] f The function that possibly recurs.
+ * @param[in,out] g Passed as-is to `f`.
+ * @param[in] p Paired object for recursion detection.
+ * @param[in,out] h Passed as-is to `f`.
+ */
+VALUE rb_exec_recursive_paired(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h);
+
+/**
+ * Identical to rb_exec_recursive(), except it calls `f` for outermost
+ * recursion only. Inner recursions yield calls to rb_throw_obj().
+ *
+ * @param[in] f The function that possibly recurs.
+ * @param[in,out] g Passed as-is to `f`.
+ * @param[in,out] h Passed as-is to `f`.
+ * @return The return value of f.
+ *
+ * @internal
+ *
+ * It seems nobody uses the "it calls rb_throw_obj()" part of this function.
+ * @shyouhei doesn't understand the needs.
+ */
+VALUE rb_exec_recursive_outer(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h);
+
+/**
+ * Identical to rb_exec_recursive_outer(), except it checks for the recursion
+ * on the ordered pair of `{ g, p }` instead of just `g`. It can also be seen
+ * as a routine identical to rb_exec_recursive_paired(), except it calls `f`
+ * for outermost recursion only. Inner recursions yield calls to
+ * rb_throw_obj().
+ *
+ * @param[in] f The function that possibly recurs.
+ * @param[in,out] g Passed as-is to `f`.
+ * @param[in] p Paired object for recursion detection.
+ * @param[in,out] h Passed as-is to `f`.
+ *
+ * @internal
+ *
+ * It seems nobody uses the "it calls rb_throw_obj()" part of this function.
+ * @shyouhei doesn't understand the needs.
+ */
+VALUE rb_exec_recursive_paired_outer(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h);
+
+/**
+ * This is the type of UBFs. An UBF is a function that unblocks a blocking
+ * region. For instance when a thread is blocking due to `pselect(3posix)`, it
+ * is highly expected that `pthread_kill(3posix)` can interrupt the system call
+ * and the thread could revive. Or when a thread is blocking due to
+ * `waitpid(3posix)`, it is highly expected that killing the waited process
+ * should suffice. An UBF is a function that does such things. Designing your
+ * own UBF needs deep understanding of why your blocking region blocks, how
+ * threads work in ruby, and a matter of luck. It often is the case you simply
+ * cannot cancel something that had already begun.
+ *
+ * @see rb_thread_call_without_gvl()
+ */
+typedef void rb_unblock_function_t(void *);
+
+/**
+ * @private
+ *
+ * This is an implementation detail. Must be a mistake to be here.
+ *
+ * @internal
+ *
+ * Why is this function type different from what rb_thread_call_without_gvl()
+ * takes?
+ */
+typedef VALUE rb_blocking_function_t(void *);
+
+/**
+ * Checks for interrupts. In ruby, signals are masked by default. You can
+ * call this function at will to check if there are pending signals. In case
+ * there are, they would be handled in this function.
+ *
+ * If your extension library has a function that takes a long time, consider
+ * calling it periodically.
+ *
+ * @note It might switch to another thread.
+ */
+void rb_thread_check_ints(void);
+
+/**
+ * Checks if the thread's execution was recently interrupted. If called from
+ * that thread, this function can be used to detect spurious wake-ups.
+ *
+ * @param[in] thval Thread in question.
+ * @retval 0 The thread was not interrupted.
+ * @retval otherwise The thread was interrupted recently.
+ *
+ * @internal
+ *
+ * Above description is not a lie. But actually the return value is an opaque
+ * trap vector. If you know which bit means which, you can know what happened.
+ */
+int rb_thread_interrupted(VALUE thval);
+
+/**
+ * A special UBF for blocking IO operations. You need deep understanding of
+ * what this actually do before using. Basically you should not use it from
+ * extension libraries. It is too easy to mess up.
+ */
+#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
+
+/**
+ * A special UBF for blocking process operations. You need deep understanding
+ * of what this actually do before using. Basically you should not use it from
+ * extension libraries. It is too easy to mess up.
+ */
+#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
+
+/* thread_sync.c */
+
+/**
+ * Creates a mutex.
+ *
+ * @return An allocated instance of rb_cMutex.
+ */
+VALUE rb_mutex_new(void);
+
+/**
+ * Queries if there are any threads that holds the lock.
+ *
+ * @param[in] mutex The mutex in question.
+ * @retval RUBY_Qtrue The mutex is locked by someone.
+ * @retval RUBY_Qfalse The mutex is not locked by anyone.
+ */
+VALUE rb_mutex_locked_p(VALUE mutex);
+
+/**
+ * Attempts to lock the mutex, without waiting for other threads to unlock it.
+ * Failure in locking the mutex can be detected by the return value.
+ *
+ * @param[out] mutex The mutex to lock.
+ * @retval RUBY_Qtrue Successfully locked by the current thread.
+ * @retval RUBY_Qfalse Otherwise.
+ * @note This function also returns ::RUBY_Qfalse when the mutex is
+ * already owned by the calling thread itself.
+ */
+VALUE rb_mutex_trylock(VALUE mutex);
+
+/**
+ * Attempts to lock the mutex. It waits until the mutex gets available.
+ *
+ * @param[out] mutex The mutex to lock.
+ * @exception rb_eThreadError Recursive deadlock situation.
+ * @return The passed mutex.
+ * @post The mutex is owned by the current thread.
+ */
+VALUE rb_mutex_lock(VALUE mutex);
+
+/**
+ * Releases the mutex.
+ *
+ * @param[out] mutex The mutex to unlock.
+ * @exception rb_eThreadError The mutex is not owned by the current thread.
+ * @return The passed mutex.
+ * @post Upon successful return the passed mutex is no longer owned by
+ * the current thread.
+ */
+VALUE rb_mutex_unlock(VALUE mutex);
+
+/**
+ * Releases the lock held in the mutex and waits for the period of time;
+ * reacquires the lock on wakeup.
+ *
+ * @pre The lock has to be owned by the current thread beforehand.
+ * @param[out] self The target mutex.
+ * @param[in] timeout Duration, in seconds, in ::rb_cNumeric.
+ * @exception rb_eArgError `timeout` is negative.
+ * @exception rb_eRangeError `timeout` is out of range of `time_t`.
+ * @exception rb_eThreadError The mutex is not owned by the current thread.
+ * @return Number of seconds it actually slept.
+ * @warning It is a failure not to check the return value. This function
+ * can return spuriously for various reasons. Maybe other threads
+ * can rb_thread_wakeup(). Maybe an end user can press the
+ * Control and C key from the interactive console. On the other
+ * hand it can also take longer than the specified. The mutex
+ * could be locked by someone else. It waits then.
+ * @post Upon successful return the passed mutex is owned by the current
+ * thread.
+ *
+ * @internal
+ *
+ * This function is called from `ConditionVariable#wait`. So it is not a
+ * deprecated feature. However @shyouhei have never seen any similar mutex
+ * primitive available in any other languages than Ruby.
+ *
+ * EDIT: In 2021, @shyouhei asked @ko1 in person about this API. He answered
+ * that it is his invention. The motivation behind its design is to eliminate
+ * needs of condition variables as primitives. Unlike other languages, Ruby's
+ * `ConditionVariable` class was written in pure-Ruby initially. We don't have
+ * to implement machine-native condition variables in assembly each time we
+ * port Ruby to a new architecture. This function made it possible. "I felt I
+ * was a genius when this idea came to me", said @ko1.
+ *
+ * `rb_cConditionVariable` is now written in C for speed, though.
+ */
+VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
+
+/**
+ * Obtains the lock, runs the passed function, and releases the lock when it
+ * completes.
+ *
+ * @param[out] mutex The mutex to lock.
+ * @param[in] func What to do during the mutex is locked.
+ * @param[in,out] arg Passed as-is to `func`.
+ */
+VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_THREAD_H */
diff --git a/include/ruby/internal/intern/time.h b/include/ruby/internal/intern/time.h
new file mode 100644
index 0000000000..df482862eb
--- /dev/null
+++ b/include/ruby/internal/intern/time.h
@@ -0,0 +1,161 @@
+#ifndef RBIMPL_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_TIME_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to ::rb_cTime.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_TIME_H
+# include <time.h> /* for time_t */
+#endif
+
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+struct timespec;
+struct timeval;
+
+/* time.c */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Fills the current time into the given struct.
+ *
+ * @param[out] ts Return buffer.
+ * @exception rb_eSystemCallError Access denied for hardware clock.
+ * @post Current time is stored in `*ts`.
+ */
+void rb_timespec_now(struct timespec *ts);
+
+/**
+ * Creates an instance of ::rb_cTime with the given time and the local
+ * timezone.
+ *
+ * @param[in] sec Seconds since the UNIX epoch.
+ * @param[in] usec Subsecond part, in microseconds resolution.
+ * @exception rb_eRangeError Cannot express the time.
+ * @return An allocated instance of ::rb_cTime.
+ */
+VALUE rb_time_new(time_t sec, long usec);
+
+/**
+ * Identical to rb_time_new(), except it accepts the time in nanoseconds
+ * resolution.
+ *
+ * @param[in] sec Seconds since the UNIX epoch.
+ * @param[in] nsec Subsecond part, in nanoseconds resolution.
+ * @exception rb_eRangeError Cannot express the time.
+ * @return An allocated instance of ::rb_cTime.
+ */
+VALUE rb_time_nano_new(time_t sec, long nsec);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Creates an instance of ::rb_cTime, with given time and offset.
+ *
+ * @param[in] ts Time specifier.
+ * @param[in] offset Offset specifier, can take following values:
+ * - `INT_MAX`: `ts` is in local time.
+ * - `INT_MAX - 1`: `ts` is in UTC.
+ * - `-86400` to `86400`: fixed timezone.
+ * @exception rb_eArgError Malformed `offset`.
+ * @return An allocated instance of ::rb_cTime.
+ */
+VALUE rb_time_timespec_new(const struct timespec *ts, int offset);
+
+/**
+ * Identical to rb_time_timespec_new(), except it takes Ruby values instead of
+ * C structs.
+ *
+ * @param[in] timev Something numeric. Currently Integers, Rationals,
+ * and Floats are accepted.
+ * @param[in] off Offset specifier. As of 2.7 this argument is
+ * heavily extended to take following kinds of
+ * objects:
+ * - ::RUBY_Qundef ... means UTC.
+ * - ::rb_cString ... "+12:34" etc.
+ * - A mysterious "zone" object. This is largely
+ * undocumented. However the initial intent was
+ * that we want to accept
+ * `ActiveSupport::TimeZone` here. Other gems
+ * could also be possible... But how to make an
+ * acceptable class is beyond this document.
+ * @exception rb_eArgError Malformed `off`.
+ * @return An allocated instance of ::rb_cTime.
+ */
+VALUE rb_time_num_new(VALUE timev, VALUE off);
+
+/**
+ * Creates a "time interval". This basically converts an instance of
+ * ::rb_cNumeric into a struct `timeval`, but for instance negative time
+ * interval must not exist.
+ *
+ * @param[in] num An instance of ::rb_cNumeric.
+ * @exception rb_eArgError `num` is negative.
+ * @exception rb_eRangeError `num` is out of range of `timeval::tv_sec`.
+ * @return A struct that represents the identical time to `num`.
+ */
+struct timeval rb_time_interval(VALUE num);
+
+/**
+ * Converts an instance of rb_cTime to a struct timeval that represents the
+ * identical point of time. It can also take something numeric; would consider
+ * it as a UNIX time then.
+ *
+ * @param[in] time Instance of either ::rb_cTime or ::rb_cNumeric.
+ * @exception rb_eRangeError `time` is out of range of `timeval::tv_sec`.
+ * @return A struct that represents the identical time to `num`.
+ */
+struct timeval rb_time_timeval(VALUE time);
+
+/**
+ * Identical to rb_time_timeval(), except for return type.
+ *
+ * @param[in] time Instance of either ::rb_cTime or ::rb_cNumeric.
+ * @exception rb_eRangeError `time` is out of range of `timeval::tv_sec`.
+ * @return A struct that represents the identical time to `num`.
+ */
+struct timespec rb_time_timespec(VALUE time);
+
+/**
+ * Identical to rb_time_interval(), except for return type.
+ *
+ * @param[in] num An instance of ::rb_cNumeric.
+ * @exception rb_eArgError `num` is negative.
+ * @exception rb_eRangeError `num` is out of range of `timespec::tv_sec`.
+ * @return A struct that represents the identical time to `num`.
+ */
+struct timespec rb_time_timespec_interval(VALUE num);
+
+/**
+ * Queries the offset, in seconds between the time zone of the time and the
+ * UTC.
+ *
+ * @param[in] time An instance of ::rb_cTime.
+ * @return Numeric offset.
+ */
+VALUE rb_time_utc_offset(VALUE time);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_TIME_H */
diff --git a/include/ruby/internal/intern/variable.h b/include/ruby/internal/intern/variable.h
new file mode 100644
index 0000000000..479c3950c1
--- /dev/null
+++ b/include/ruby/internal/intern/variable.h
@@ -0,0 +1,628 @@
+#ifndef RBIMPL_INTERN_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_VARIABLE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to names inside of a Ruby program.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/st.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* variable.c */
+
+/**
+ * Queries the name of a module.
+ *
+ * @param[in] mod An instance of ::rb_cModule.
+ * @retval RUBY_Qnil `mod` is anonymous.
+ * @retval otherwise `mod` is onymous.
+ */
+VALUE rb_mod_name(VALUE mod);
+
+/**
+ * Identical to rb_mod_name(), except it returns `#<Class: ...>` style
+ * inspection for anonymous modules.
+ *
+ * @param[in] mod An instance of ::rb_cModule.
+ * @return An instance of ::rb_cString representing `mod`'s path.
+ */
+VALUE rb_class_path(VALUE mod);
+
+/**
+ * @alias{rb_mod_name}
+ *
+ * @internal
+ *
+ * Am I missing something? Why we have the same thing in different names?
+ */
+VALUE rb_class_path_cached(VALUE mod);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Names a class.
+ *
+ * @param[out] klass Target module to name.
+ * @param[out] space Namespace that `klass` shall reside.
+ * @param[in] name Name of `klass`.
+ * @post `klass` has `space::klass` name.
+ */
+void rb_set_class_path(VALUE klass, VALUE space, const char *name);
+
+/**
+ * Identical to rb_set_class_path(), except it accepts the name as Ruby's
+ * string instead of C's.
+ *
+ * @param[out] klass Target module to name.
+ * @param[out] space Namespace that `klass` shall reside.
+ * @param[in] name Name of `klass`.
+ * @post `klass` has `space::klass` name.
+ */
+void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name);
+
+/**
+ * Identical to rb_path2class(), except it accepts the path as Ruby's string
+ * instead of C's.
+ *
+ * @param[in] path Path to query.
+ * @exception rb_eArgError No such constant.
+ * @exception rb_eTypeError The path resolved to a non-module.
+ * @return Resolved class.
+ */
+VALUE rb_path_to_class(VALUE path);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Resolves a `Q::W::E::R`-style path string to the actual class it points.
+ *
+ * @param[in] path Path to query.
+ * @exception rb_eArgError No such constant.
+ * @exception rb_eTypeError The path resolved to a non-module.
+ * @return Resolved class.
+ */
+VALUE rb_path2class(const char *path);
+
+/**
+ * Queries the name of the given object's class.
+ *
+ * @param[in] obj Arbitrary object.
+ * @return An instance of ::rb_cString representing `obj`'s class' path.
+ */
+VALUE rb_class_name(VALUE obj);
+
+/**
+ * Kicks the autoload procedure as if it was "touched".
+ *
+ * @param[out] space Namespace where autoload is defined.
+ * @param[in] name Name of the autoloaded constant.
+ * @retval RUBY_Qfalse No such autoload.
+ * @retval RUBY_Qtrue Autoload successfully initiated.
+ * @note As an autoloaded library is expected to define `space::name`,
+ * it is a nature of this function to have process-global side
+ * effects.
+ * @note Multiple threads can simultaneously call this API. It blocks
+ * then. That must not last indefinitely but can take longer than
+ * you expect.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea why extension libraries should use this API.
+ */
+VALUE rb_autoload_load(VALUE space, ID name);
+
+/**
+ * Queries if an autoload is defined at a point.
+ *
+ * @param[in] space Namespace where autoload is defined.
+ * @param[in] name Name of the autoloaded constant.
+ * @retval RUBY_Qnil No such autoload.
+ * @retval otherwise The feature (path) registered at `space::name`.
+ */
+VALUE rb_autoload_p(VALUE space, ID name);
+
+/**
+ * Traces a global variable.
+ *
+ * @param[in] argc Either 1 or 2.
+ * @param[in] argv Variable name, optionally a Proc.
+ * @retval RUBY_Qnil No previous tracers.
+ * @retval otherwise Previous tracers.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea why extension libraries should use this API.
+ */
+VALUE rb_f_trace_var(int argc, const VALUE *argv);
+
+/**
+ * Deletes the passed tracer from the passed global variable, or if omitted,
+ * deletes everything.
+ *
+ * @param[in] argc Either 1 or 2.
+ * @param[in] argv Variable name, optionally a Proc.
+ * @retval RUBY_Qnil No previous tracers.
+ * @retval otherwise Deleted tracers.
+ *
+ * @internal
+ *
+ * @shyouhei has no idea why extension libraries should use this API.
+ */
+VALUE rb_f_untrace_var(int argc, const VALUE *argv);
+
+/**
+ * Queries the list of global variables.
+ *
+ * @return The list of the name of the global variables.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_f_global_variables(void);
+
+/**
+ * Aliases a global variable. Did you know that you can alias a global
+ * variable? It is like aliasing methods:
+ *
+ * ```ruby
+ * alias $dst $src
+ * ```
+ *
+ * This C function does the same thing.
+ *
+ * @param[in] dst Destination name.
+ * @param[in] src Source name.
+ * @post A global variable named `dst` is defined to be an alias of a
+ * global variable named `src`.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_alias_variable(ID dst, ID src);
+
+/**
+ * Frees the list of instance variables. 3rd parties need not know, but there
+ * are several ways to store an object's instance variables, depending on its
+ * internal structure. This function makes sense when the passed objects is
+ * using so-called "generic" backend storage. People need not be aware of this
+ * working behind-the-scenes.
+ *
+ * @param[out] obj The object in question.
+ *
+ * @internal
+ *
+ * This just destroys the given object. @shyouhei has no idea why extension
+ * libraries should use this API.
+ */
+void rb_free_generic_ivar(VALUE obj);
+
+/**
+ * Identical to rb_iv_get(), except it accepts the name as an ::ID instead of a
+ * C string.
+ *
+ * @param[in] obj Target object.
+ * @param[in] name Target instance variable to query.
+ * @retval RUBY_nil No such instance variable.
+ * @retval otherwise The value assigned to the instance variable.
+ */
+VALUE rb_ivar_get(VALUE obj, ID name);
+
+/**
+ * Identical to rb_iv_set(), except it accepts the name as an ::ID instead of a
+ * C string.
+ *
+ * @param[out] obj Target object.
+ * @param[in] name Target instance variable.
+ * @param[in] val Value to assign.
+ * @exception rb_eFrozenError Can't modify `obj`.
+ * @exception rb_eArgError `obj` has too many instance variables.
+ * @return Passed value.
+ * @post An instance variable named `name` is defined if absent on
+ * `obj`, whose value is set to `val`.
+ */
+VALUE rb_ivar_set(VALUE obj, ID name, VALUE val);
+
+/**
+ * Queries if the instance variable is defined at the object. This roughly
+ * resembles `defined?(@name)` in `obj`'s context.
+ *
+ * @param[in] obj Target object.
+ * @param[in] name Target instance variable to query.
+ * @retval RUBY_Qtrue There is an instance variable.
+ * @retval RUBY_Qfalse No such instance variable.
+ */
+VALUE rb_ivar_defined(VALUE obj, ID name);
+
+/**
+ * Iterates over an object's instance variables.
+ *
+ * @param[in] obj Target object.
+ * @param[in] func Callback function.
+ * @param[in] arg Passed as-is to the last argument of `func`.
+ */
+void rb_ivar_foreach(VALUE obj, int (*func)(ID name, VALUE val, st_data_t arg), st_data_t arg);
+
+/**
+ * Number of instance variables defined on an object.
+ *
+ * @param[in] obj Target object.
+ * @return Number of instance variables defined on `obj`.
+ */
+st_index_t rb_ivar_count(VALUE obj);
+
+/**
+ * Identical to rb_ivar_get()
+ *
+ * @param[in] obj Target object.
+ * @param[in] name Target instance variable to query.
+ * @retval RUBY_nil No such instance variable.
+ * @retval otherwise The value assigned to the instance variable.
+ *
+ * @internal
+ *
+ * Am I missing something? Why we have the same thing in different names?
+ */
+VALUE rb_attr_get(VALUE obj, ID name);
+
+/**
+ * Resembles `Object#instance_variables`.
+ *
+ * @param[in] obj Target object to query.
+ * @return An array of instance variable names for the receiver.
+ * @note Simply defining an accessor does not create the corresponding
+ * instance variable.
+ */
+VALUE rb_obj_instance_variables(VALUE obj);
+
+/**
+ * Resembles `Object#remove_instance_variable`.
+ *
+ * @param[out] obj Target object.
+ * @param[in] name Variable name to remove, either in Symbol or String.
+ * @return What was removed.
+ * @pre Instance variable named `name` is deleted from `obj`.
+ */
+VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name);
+
+/**
+ * This API is mysterious. It has been there since the initial revision. No
+ * single bits of documents has ever been written. The function name doesn't
+ * describe anything. What should be passed to the argument, or what should be
+ * the return value, are not obvious. Yet it has evolved over time. The
+ * source code is written in counter-intuitive way (as of 3.0).
+ *
+ * Simply put, don't try to understand this API.
+ */
+void *rb_mod_const_at(VALUE, void*);
+
+/**
+ * This is a variant of rb_mod_const_at(). As a result, it is also mysterious.
+ * It _seems_ it iterates over the ancestry tree of the module. But what that
+ * means is beyond a human brain.
+ */
+void *rb_mod_const_of(VALUE, void*);
+
+/**
+ * This is another mysterious API that comes with no documents at all. It
+ * seems it expects some specific data structure for the passed pointer. But
+ * the details has never been made explicit. It seems nobody should use this
+ * API.
+ */
+VALUE rb_const_list(void*);
+
+/**
+ * Resembles `Module#constants`. List up the constants defined at the
+ * receiver. This includes the names of constants in any included modules,
+ * unless `argv[0]` is ::RUBY_Qfalse.
+ *
+ * The implementation makes no guarantees about the order in which the
+ * constants are yielded.
+ *
+ * @param[in] argc Either 0 or 1.
+ * @param[in] argv Pointer to ::RUBY_Qfalse, if `argc == 1`.
+ * @param[in] recv Target namespace.
+ * @return An array of symbols, which are constant names under `recv`.
+ */
+VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv);
+
+/**
+ * Resembles `Module#remove_const`.
+ *
+ * @param[out] space Target namespace.
+ * @param[in] name Variable name to remove, either in Symbol or String.
+ * @return What was removed.
+ * @pre Constant named `space::name` is deleted.
+ * @note In case what was removed was in fact a module or a class, this
+ * operation does not affect its name. Which means when people
+ * for instance look at it using `p` etc., it still introduces
+ * itself using the deleted name. Can confuse people.
+ */
+VALUE rb_mod_remove_const(VALUE space, VALUE name);
+
+/**
+ * Queries if the constant is defined at the namespace.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @retval RUBY_Qtrue There is a constant.
+ * @retval RUBY_Qfalse No such constant.
+ *
+ * @internal
+ *
+ * The return values are not typo! This function returns ruby values casted to
+ * `int`. Completely brain-damaged design.
+ */
+int rb_const_defined(VALUE space, ID name);
+
+/**
+ * Identical to rb_const_defined(), except it doesn't look for parent classes.
+ * For instance `Array` is a toplevel constant, which is visible from
+ * everywhere. But this function does not take such things into account. It
+ * concerns only what is directly defined inside of the given namespace.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @retval RUBY_Qtrue There is a constant.
+ * @retval RUBY_Qfalse No such constant.
+ *
+ * @internal
+ *
+ * The return values are not typo! This function returns ruby values casted to
+ * `int`. Completely brain-damaged design.
+ */
+int rb_const_defined_at(VALUE space, ID name);
+
+/**
+ * Identical to rb_const_defined(), except it returns false for private
+ * constants.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @retval RUBY_Qtrue There is a constant.
+ * @retval RUBY_Qfalse No such constant.
+ *
+ * @internal
+ *
+ * What does "from" mean? The name sounds quite cryptic.
+ *
+ * The return values are not typo! This function returns ruby values casted to
+ * `int`. Completely brain-damaged design.
+ */
+int rb_const_defined_from(VALUE space, ID name);
+
+/**
+ * Identical to rb_const_defined(), except it returns the actual defined value.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @exception rb_eNameError No such constant.
+ * @return The defined constant.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_const_get(VALUE space, ID name);
+
+/**
+ * Identical to rb_const_defined_at(), except it returns the actual defined
+ * value. It can also be seen as a routine identical to rb_const_get(), except
+ * it doesn't look for parent classes.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @exception rb_eNameError No such constant.
+ * @return The defined constant.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_const_get_at(VALUE space, ID name);
+
+/**
+ * Identical to rb_const_defined_at(), except it returns the actual defined
+ * value. It can also be seen as a routine identical to rb_const_get(), except
+ * it doesn't return a private constant.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name to query.
+ * @exception rb_eNameError No such constant.
+ * @return The defined constant.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_const_get_from(VALUE space, ID name);
+
+/**
+ * Names a constant.
+ *
+ * @param[out] space Target namespace.
+ * @param[in] name Target name to query.
+ * @param[in] val Value to define.
+ * @exception rb_eTypeError `space` is not a module.
+ * @post `name` is a constant under `space`, whose value is `val`.
+ * @note You can reassign.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_const_set(VALUE space, ID name, VALUE val);
+
+/**
+ * Identical to rb_mod_remove_const(), except it takes the name as ::ID instead
+ * of ::VALUE.
+ *
+ * @param[out] space Target namespace.
+ * @param[in] name Variable name to remove, either in Symbol or String.
+ * @return What was removed.
+ * @pre Constant named `space::name` is deleted.
+ * @note In case what was removed was in fact a module or a class, this
+ * operation does not affect its name. Which means when people
+ * for instance look at it using `p` etc., it still introduces
+ * itself using the deleted name. Can confuse people.
+ */
+VALUE rb_const_remove(VALUE space, ID name);
+
+#if 0 /* EXPERIMENTAL: remove if no problem */
+RBIMPL_ATTR_NORETURN()
+/**
+ * This is the default implementation of `Module#const_missing`.
+ *
+ * @param[in] space Target namespace.
+ * @param[in] name Target name that is nonexistent.
+ * @exception rb_eNameError Always.
+ */
+VALUE rb_mod_const_missing(VALUE space, VALUE name);
+#endif
+
+/**
+ * Queries if the given class has the given class variable.
+ *
+ * @param[in] klass Target class.
+ * @param[in] name Name to query.
+ * @return RUBY_Qtrue Yes there is.
+ * @return RUBY_Qfalse No there isn't.
+ * @pre `klass` must be an instance of rb_cModule.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_cvar_defined(VALUE klass, ID name);
+
+/**
+ * Assigns a value to a class variable.
+ *
+ * @param[out] klass Target class.
+ * @param[in] name Variable name.
+ * @param[in] val Value to be assigned.
+ * @post `klass` has a class variable named `name` whose value is `val`.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_cvar_set(VALUE klass, ID name, VALUE val);
+
+/**
+ * Obtains a value from a class variable.
+ *
+ * @param[in] klass Target class.
+ * @param[in] name Variable name.
+ * @exception rb_eNameError Uninitialised class variable.
+ * @exception rb_eRuntimeError `[Bug#14541]` situation.
+ * @return Class variable named `name` under `klass`.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_cvar_get(VALUE klass, ID name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_cvar_get(), except it takes additional "front" pointer.
+ * This extra parameter is a buffer, which will have the class where the
+ * queried class variable actually resides.
+ *
+ * @param[in] klass Target class.
+ * @param[in] name Variable name.
+ * @param[out] front Return buffer.
+ * @exception rb_eNameError Uninitialised class variable.
+ * @exception rb_eRuntimeError `[Bug#14541]` situation.
+ * @return Class variable named `name` under `klass`.
+ * @post `front` has the class object, which is an ancestor of `klass`,
+ * where the queried class variable actually resides.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+VALUE rb_cvar_find(VALUE klass, ID name, VALUE *front);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_cvar_set(), except it accepts C's string instead of ::ID.
+ *
+ * @param[out] klass Target class.
+ * @param[in] name Variable name.
+ * @param[in] val Value to be assigned.
+ * @post `klass` has a class variable named `name` whose value is `val`.
+ */
+void rb_cv_set(VALUE klass, const char *name, VALUE val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_cvar_get(), except it accepts C's string instead of ::ID.
+ *
+ * @param[in] klass Target class.
+ * @param[in] name Variable name.
+ * @exception rb_eNameError Uninitialised class variable.
+ * @exception rb_eRuntimeError `[Bug#14541]` situation.
+ * @return Class variable named `name` under `klass`.
+ */
+VALUE rb_cv_get(VALUE klass, const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @alias{rb_cv_set}
+ *
+ * @internal
+ *
+ * Am I missing something? Why we have the same thing in different names?
+ */
+void rb_define_class_variable(VALUE, const char*, VALUE);
+
+/**
+ * Resembles `Module#class_variables`. List up the variables defined at the
+ * receiver. This includes the names of constants in any included modules,
+ * unless `argv[0]` is ::RUBY_Qfalse.
+ *
+ * The implementation makes no guarantees about the order in which the
+ * constants are yielded.
+ *
+ * @param[in] argc Either 0 or 1.
+ * @param[in] argv Pointer to ::RUBY_Qfalse, if `argc == 1`.
+ * @param[in] recv Target class.
+ * @return An array of symbols, which are class variable names under
+ * `recv`.
+ */
+VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv);
+
+/**
+ * Resembles `Module#remove_class_variable`.
+ *
+ * @param[out] mod Target class.
+ * @param[in] name Variable name to remove, either in Symbol or String.
+ * @return What was removed.
+ * @pre Instance variable named `name` is deleted from `obj`.
+ */
+VALUE rb_mod_remove_cvar(VALUE mod, VALUE name);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_VARIABLE_H */
diff --git a/include/ruby/internal/intern/vm.h b/include/ruby/internal/intern/vm.h
new file mode 100644
index 0000000000..76af796b54
--- /dev/null
+++ b/include/ruby/internal/intern/vm.h
@@ -0,0 +1,431 @@
+#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_VM_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Public APIs related to rb_cRubyVM.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* vm.c */
+
+/**
+ * Resembles `__LINE__`.
+ *
+ * @retval 0 Current execution context not in a ruby method.
+ * @retval otherwise The current line number of the current thread of the
+ * current ractor of the current execution context.
+ */
+int rb_sourceline(void);
+
+/**
+ * Resembles `__FILE__`.
+ *
+ * @retval 0 Current execution context not in a ruby method.
+ * @retval otherwise The current source path of the current thread of the
+ * current ractor of the current execution context.
+ * @note This may or may not be an absolute path.
+ */
+const char *rb_sourcefile(void);
+
+/**
+ * Resembles `__method__`.
+ *
+ * @param[out] idp Return buffer for method id.
+ * @param[out] klassp Return buffer for class.
+ * @retval 0 Current execution context not in a method.
+ * @retval 1 Successful return.
+ * @post Upon successful return `*idp` and `*klassp` are updated to have
+ * the current method name and its defined class respectively.
+ * @note Both parameters can be `NULL`.
+ */
+int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
+
+/* vm_eval.c */
+
+/**
+ * Identical to rb_funcallv(), except it returns ::RUBY_Qundef instead of
+ * raising ::rb_eNoMethodError.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @retval RUBY_Qundef `recv` doesn't respond to `mid`.
+ * @retval otherwise What the method evaluates to.
+ */
+VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv);
+
+/**
+ * Identical to rb_check_funcall(), except you can specify how to handle the
+ * last element of the given array. It can also be seen as a routine identical
+ * to rb_funcallv_kw(), except it returns ::RUBY_Qundef instead of raising
+ * ::rb_eNoMethodError.
+ *
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arbitrary number of method arguments.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @retval RUBY_Qundef `recv` doesn't respond to `mid`.
+ * @retval otherwise What the method evaluates to.
+ */
+VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat);
+
+/**
+ * This API is practically a variant of rb_proc_call_kw() now. Historically
+ * when there still was a concept called `$SAFE`, this was an API for that.
+ * But we no longer have that. This function basically ended its role. It
+ * just remains here because of no harm.
+ *
+ * @param[in] cmd A string, or something callable.
+ * @param[in] arg Argument passed to the call.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `arg`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `arg`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @return What the command evaluates to.
+ */
+VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat);
+
+/**
+ * Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
+ * @param[in,out] recv Receiver of the method.
+ * @param[in] mid Name of the method to call.
+ * @param[in] args An instance of ::RArray.
+ * @exception rb_eNoMethodError No such method.
+ * @exception rb_eException Any exceptions happen inside.
+ * @return What the method evaluates to.
+ * @pre `args` must be an ::RArray. Call `to_ary` beforehand when
+ * necessary.
+ */
+VALUE rb_apply(VALUE recv, ID mid, VALUE args);
+
+/**
+ * Evaluates a string containing Ruby source code, or the given block, within
+ * the context of the receiver. In order to set the context, the variable
+ * `self` is set to `recv` while the code is executing, giving the code access
+ * to `recv`'s instance variables and private methods.
+ *
+ * When given a block, `recv` is also passed in as the block's only argument.
+ *
+ * When given a string, the optional second and third parameters supply a
+ * filename and starting line number that are used when reporting compilation
+ * errors.
+ *
+ * @param[in] argc Number of objects in `argv`
+ * @param[in] argv C array of 0 up to 3 elements.
+ * @param[in] recv The object in question.
+ * @return What was evaluated.
+ */
+VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv);
+
+/**
+ * Executes the given block within the context of the receiver. In order to
+ * set the context, the variable `self` is set to `recv` while the code is
+ * executing, giving the code access to `recv`'s instance variables. Arguments
+ * are passed as block parameters.
+ *
+ * @param[in] argc Number of objects in `argv`
+ * @param[in] argv Arbitrary parameters to be passed to the block.
+ * @param[in] recv The object in question.
+ * @return What was evaluated.
+ * @note Don't confuse this with rb_obj_instance_eval(). The key
+ * difference is whether you can pass arbitrary parameters to the
+ * block, like this:
+ *
+ * ```ruby
+ * class Foo
+ * def initialize
+ * @foo = 5
+ * end
+ * end
+ * Foo.new.instance_exec(7) {|i| @foo + i } # => 12
+ * ```
+ */
+VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv);
+
+/**
+ * Identical to rb_obj_instance_eval(), except it evaluates within the context
+ * of module.
+ *
+ * @param[in] argc Number of objects in `argv`
+ * @param[in] argv C array of 0 up to 3 elements.
+ * @param[in] mod The module in question.
+ * @pre `mod` must be a Module.
+ * @return What was evaluated.
+ */
+VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod);
+
+/**
+ * Identical to rb_obj_instance_exec(), except it evaluates within the context
+ * of module.
+ *
+ * @param[in] argc Number of objects in `argv`
+ * @param[in] argv Arbitrary parameters to be passed to the block.
+ * @param[in] mod The module in question.
+ * @pre `mod` must be a Module.
+ * @return What was evaluated.
+ */
+VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod);
+
+/* vm_method.c */
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_RB_DEFINE_ALLOC_FUNC 1
+
+/**
+ * This is the type of functions that ruby calls when trying to allocate an
+ * object. It is sometimes necessary to allocate extra memory regions for an
+ * object. When you define a class that uses ::RTypedData, it is typically the
+ * case. On such situations define a function of this type and pass it to
+ * rb_define_alloc_func().
+ *
+ * @param[in] klass The class that this function is registered.
+ * @return A newly allocated instance of `klass`.
+ */
+typedef VALUE (*rb_alloc_func_t)(VALUE klass);
+
+/**
+ * Sets the allocator function of a class.
+ *
+ * @param[out] klass The class to modify.
+ * @param[in] func An allocator function for the class.
+ * @pre `klass` must be an instance of Class.
+ */
+void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func);
+
+/**
+ * Deletes the allocator function of a class. It is sometimes desirable to
+ * restrict creation of an instance of a class. For example it rarely makes
+ * sense for a DB adaptor class to allow programmers creating DB row objects
+ * without querying the DB itself. You can kill sporadic creation of such
+ * objects then, by nullifying the allocator function using this API. Your
+ * object shall be allocated using #RB_NEWOBJ_OF() directly.
+ *
+ * @param[out] klass The class to modify.
+ * @pre `klass` must be an instance of Class.
+ */
+void rb_undef_alloc_func(VALUE klass);
+
+/**
+ * Queries the allocator function of a class.
+ *
+ * @param[in] klass The class in question.
+ * @pre `klass` must be an instance of Class.
+ * @retval 0 No allocator function is registered.
+ * @retval otherwise The allocator function.
+ *
+ * @internal
+ *
+ * Who cares? @shyouhei finds no practical usage of the return value. Maybe we
+ * need KonMari.
+ */
+rb_alloc_func_t rb_get_alloc_func(VALUE klass);
+
+/**
+ * Clears the inline constant caches associated with a particular ID. Extension
+ * libraries should not bother with such things. Just forget about this API (or
+ * even, the presence of constant caches).
+ */
+void rb_clear_constant_cache_for_id(ID id);
+
+/**
+ * Resembles `alias`.
+ *
+ * @param[out] klass Where to define an alias.
+ * @param[in] dst New name.
+ * @param[in] src Existing name.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError No such method named `src`.
+ * @post `klass` has a method named `dst`, which is the identical to its
+ * method named `src`.
+ */
+void rb_alias(VALUE klass, ID dst, ID src);
+
+/**
+ * This function resembles now-deprecated `Module#attr`.
+ *
+ * @param[out] klass Where to define an attribute.
+ * @param[in] name Name of an instance variable.
+ * @param[in] need_reader Whether attr_reader is needed.
+ * @param[in] need_writer Whether attr_writer is needed.
+ * @param[in] honour_visibility Whether to use the current visibility.
+ * @exception rb_eTypeError `klass` is not a class.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @post If `need_reader` is set `klass` has a method named `name`.
+ * @post If `need_writer` is set `klass` has a method named `name=`.
+ *
+ * @internal
+ *
+ * The three `int` arguments should have been bool, but there was no such thing
+ * like a bool when K&R was used in this project.
+ */
+void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Removes a method. Don't confuse this to rb_undef_method(), which doesn't
+ * remove a method. This one resembles `Module#remove_method`.
+ *
+ * @param[out] klass The class to remove a method.
+ * @param[in] name Name of a method to be removed.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError No such method.
+ * @see rb_undef_method
+ */
+void rb_remove_method(VALUE klass, const char *name);
+
+/**
+ * Identical to rb_remove_method(), except it accepts the method name as ::ID.
+ *
+ * @param[out] klass The class to remove a method.
+ * @param[in] mid Name of a method to be removed.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError No such method.
+ * @see rb_undef
+ */
+void rb_remove_method_id(VALUE klass, ID mid);
+
+/**
+ * Queries if the klass has this method. This function has only one line of
+ * document in the implementation that states "// deprecated". Don't know what
+ * that means though.
+ *
+ * @param[in] klass The class in question.
+ * @param[in] id The method name to query.
+ * @param[in] ex Undocumented magic value.
+ * @retval false Method not found.
+ * @retval true There is a method.
+ * @pre `klass` must be a module.
+ *
+ * @internal
+ *
+ * @shyouhei has no motivation to describe what should be passed to `ex`. It
+ * seems this function should just be trashed.
+ */
+int rb_method_boundp(VALUE klass, ID id, int ex);
+
+/**
+ * Well... Let us hesitate from describing what a "basic definition" is. This
+ * nuanced concept should have been kept private. Just please. Don't touch
+ * it. This function is a badly distributed random number generator. Right?
+ *
+ * @param[in] klass The class in question.
+ * @param[in] mid The method name in question.
+ * @retval 1 It is.
+ * @retval 0 It isn't.
+ */
+int rb_method_basic_definition_p(VALUE klass, ID mid);
+
+/**
+ * Identical to rb_respond_to(), except it additionally takes the visibility
+ * parameter. This does not make difference unless the object has
+ * `respond_to?` undefined, but has `respond_to_missing?` defined. That case
+ * the passed argument becomes the second argument of `respond_to_missing?`.
+ *
+ * @param[in] obj The object in question.
+ * @param[in] mid The method name in question.
+ * @param[in] private_p This is the second argument of `obj`'s
+ * `respond_to_missing?`.
+ * @retval 1 Yes it does.
+ * @retval 0 No it doesn't.
+ */
+int rb_obj_respond_to(VALUE obj, ID mid, int private_p);
+
+/**
+ * Queries if the object responds to the method. This involves calling the
+ * object's `respond_to?` method.
+ *
+ * @param[in] obj The object in question.
+ * @param[in] mid The method name in question.
+ * @retval 1 Yes it does.
+ * @retval 0 No it doesn't.
+ */
+int rb_respond_to(VALUE obj, ID mid);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Raises ::rb_eNotImpError. This function is used as an argument to
+ * rb_define_method() etc.
+ *
+ * ```CXX
+ * rb_define_method(rb_cFoo, "foo", rb_f_notimplement, -1);
+ * ```
+ *
+ * @param argc Unused parameter.
+ * @param argv Unused parameter.
+ * @param obj Unused parameter.
+ * @param marker Unused parameter.
+ * @exception rb_eNotImpError Always.
+ * @return Never returns.
+ *
+ * @internal
+ *
+ * See also the Q&A section of include/ruby/internal/anyargs.h.
+ */
+VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
+#if !defined(RUBY_EXPORT) && defined(_WIN32)
+RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker);
+#define rb_f_notimplement (*rb_f_notimplement_)
+#endif
+
+/* vm_backtrace.c */
+
+/**
+ * Prints the backtrace out to the standard error. This just confuses people
+ * for no reason. Evil souls must only use it.
+ *
+ * @internal
+ *
+ * Actually it is very useful when called from an interactive GDB session.
+ */
+void rb_backtrace(void);
+
+/**
+ * Creates the good old fashioned array-of-strings style backtrace info.
+ *
+ * @return An array which contains strings, which are the textual
+ * representations of the backtrace locations of the current thread of
+ * the current ractor of the current execution context.
+ * @note Ruby scripts can access more sophisticated
+ * `Thread::Backtrace::Location`. But it seems there is no way for C
+ * extensions to use that API.
+ */
+VALUE rb_make_backtrace(void);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERN_VM_H */
diff --git a/include/ruby/internal/interpreter.h b/include/ruby/internal/interpreter.h
new file mode 100644
index 0000000000..662d39c0ec
--- /dev/null
+++ b/include/ruby/internal/interpreter.h
@@ -0,0 +1,304 @@
+#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERPRETER_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Interpreter embedding APIs.
+ */
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * @defgroup embed CRuby Embedding APIs
+ *
+ * CRuby interpreter APIs. These are APIs to embed MRI interpreter into your
+ * program.
+ * These functions are not a part of Ruby extension library API.
+ * Extension libraries of Ruby should not depend on these functions.
+ *
+ * @{
+ */
+
+/**
+ * @defgroup ruby1 ruby(1) implementation
+ *
+ * A part of the implementation of ruby(1) command.
+ * Other programs that embed Ruby interpreter do not always need to use these
+ * functions.
+ *
+ * @{
+ */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Initializes the process for libruby.
+ *
+ * This function assumes this process is `ruby(1)` and it has just started.
+ * Usually programs that embed CRuby interpreter may not call this function,
+ * and may do their own initialization.
+ *
+ * @param[in] argc Pointer to process main's `argc`.
+ * @param[in] argv Pointer to process main's `argv`.
+ * @warning `argc` and `argv` cannot be `NULL`.
+ *
+ * @internal
+ *
+ * AFAIK Ruby does write to argv, especially `argv[0][0]`, via setproctitle(3).
+ * It is intentional that the argument is not const-qualified.
+ */
+void ruby_sysinit(int *argc, char ***argv);
+
+/**
+ * Calls ruby_setup() and check error.
+ *
+ * Prints errors and calls exit(3) if an error occurred.
+ */
+void ruby_init(void);
+
+/**
+ * Processes command line arguments and compiles the Ruby source to execute.
+ *
+ * This function does:
+ * - Processes the given command line flags and arguments for `ruby(1)`
+ * - Compiles the source code from the given argument, `-e` or `stdin`, and
+ * - Returns the compiled source as an opaque pointer to an internal data
+ * structure
+ *
+ * @param[in] argc Process main's `argc`.
+ * @param[in] argv Process main's `argv`.
+ * @return An opaque pointer to the compiled source or an internal special
+ * value. Pass it to ruby_executable_node() to detect which.
+ * @see ruby_executable_node
+ */
+void* ruby_options(int argc, char** argv);
+
+/**
+ * Checks the return value of ruby_options().
+ *
+ * ruby_options() sometimes returns a special value to indicate this process
+ * should immediately exit. This function checks if the case. Also stores the
+ * exit status that the caller have to pass to exit(3) into `*status`.
+ *
+ * @param[in] n A return value of ruby_options().
+ * @param[out] status Pointer to the exit status of this process.
+ * @retval 0 The given value is such a special value.
+ * @retval otherwise The given opaque pointer is actually a compiled
+ * source.
+ */
+int ruby_executable_node(void *n, int *status);
+
+/**
+ * Runs the given compiled source and exits this process.
+ *
+ * @param[in] n Opaque "node" pointer.
+ * @retval EXIT_SUCCESS Successfully run the source.
+ * @retval EXIT_FAILURE An error occurred.
+ */
+int ruby_run_node(void *n);
+
+/* version.c */
+/** Prints the version information of the CRuby interpreter to stdout. */
+void ruby_show_version(void);
+
+#ifndef ruby_show_copyright
+/** Prints the copyright notice of the CRuby interpreter to stdout. */
+void ruby_show_copyright(void);
+#endif
+
+/**
+ * A convenience macro to call ruby_init_stack().
+ * Must be placed just after variable declarations.
+ */
+#define RUBY_INIT_STACK \
+ VALUE variable_in_this_stack_frame; \
+ ruby_init_stack(&variable_in_this_stack_frame);
+/** @} */
+
+/**
+ * Set stack bottom of Ruby implementation.
+ *
+ * You must call this function before any heap allocation by Ruby
+ * implementation. Or GC will break living objects.
+ *
+ * @param[in] addr A pointer somewhere on the stack, near its bottom.
+ */
+void ruby_init_stack(volatile VALUE *addr);
+
+/**
+ * Initializes the VM and builtin libraries.
+ *
+ * @retval 0 Initialization succeeded.
+ * @retval otherwise An error occurred.
+ *
+ * @internal
+ *
+ * Though not a part of our public API, the return value is in fact an enum
+ * ruby_tag_type. You can see the potential "otherwise" values by looking at
+ * vm_core.h.
+ */
+int ruby_setup(void);
+
+/**
+ * Destructs the VM.
+ *
+ * Runs the VM finalization processes as well as ruby_finalize(), and frees
+ * resources used by the VM.
+ *
+ * @param[in] ex Default value to the return value.
+ * @retval EXIT_FAILURE An error occurred.
+ * @retval ex Successful cleanup.
+ * @note This function does not raise any exception.
+ */
+int ruby_cleanup(int ex);
+
+/**
+ * Runs the VM finalization processes.
+ *
+ * `END{}` and procs registered by `Kernel.#at_exit` are executed here. See the
+ * Ruby language spec for more details.
+ *
+ * @note This function is allowed to raise an exception if an error occurred.
+ */
+void ruby_finalize(void);
+
+RBIMPL_ATTR_NORETURN()
+/** Calls ruby_cleanup() and exits the process. */
+void ruby_stop(int);
+
+/**
+ * Checks for stack overflow.
+ *
+ * @retval true NG machine stack is about to overflow.
+ * @retval false OK there still is a room in the stack.
+ *
+ * @internal
+ *
+ * Does anybody use it? So far @shyouhei have never seen any actual use-case.
+ */
+int ruby_stack_check(void);
+
+/**
+ * Queries what Ruby thinks is the machine stack. Ruby manages a region of
+ * memory. It calls that area the "machine stack". By calling this function,
+ * in spite of its name, you can obtain both one end of the stack and its
+ * length at once. Which means you can know the entire region.
+ *
+ * @param[out] topnotch On return the pointer points to the upmost address of
+ * the macihne stack that Ruby knows.
+ * @return Length of the machine stack that Ruby knows.
+ *
+ * @internal
+ *
+ * Does anybody use it? @shyouhei is quite skeptical if this is useful outside
+ * of the VM. Maybe it was a wrong idea to expose this API to 3rd parties.
+ */
+size_t ruby_stack_length(VALUE **topnotch);
+
+/**
+ * Identical to ruby_run_node(), except it returns an opaque execution status.
+ * You can pass it to rb_cleanup().
+ *
+ * @param[in] n Opaque "node" pointer.
+ * @retval 0 Successful end-of-execution.
+ * @retval otherwise An error occurred.
+ *
+ * @internal
+ *
+ * Though not a part of our public API, the return value is in fact an enum
+ * ruby_tag_type. You can see the potential "otherwise" values by looking at
+ * vm_core.h.
+ */
+int ruby_exec_node(void *n);
+
+/**
+ * Sets the current script name to this value.
+ *
+ * This is similar to `$0 = name` in Ruby level but also affects
+ * `Method#location` and others.
+ *
+ * @param[in] name File name to set.
+ */
+void ruby_script(const char* name);
+
+/**
+ * Identical to ruby_script(), except it takes the name as a Ruby String
+ * instance.
+ *
+ * @param[in] name File name to set.
+ */
+void ruby_set_script_name(VALUE name);
+
+/** Defines built-in variables */
+void ruby_prog_init(void);
+
+/**
+ * Sets argv that ruby understands. Your program might have its own command
+ * line parameters etc. Handle them as you wish, and pass remaining parts of
+ * argv here.
+ *
+ * @param[in] argc Number of elements of `argv`.
+ * @param[in] argv Command line arguments.
+ */
+void ruby_set_argv(int argc, char **argv);
+
+/**
+ * Identical to ruby_options(), except it raises ruby-level exceptions on
+ * failure.
+ *
+ * @param[in] argc Process main's `argc`.
+ * @param[in] argv Process main's `argv`.
+ * @return An opaque "node" pointer.
+ */
+void *ruby_process_options(int argc, char **argv);
+
+/**
+ * Sets up `$LOAD_PATH`.
+ *
+ * @internal
+ *
+ * @shyouhei guesses this has to be called at very later stage, at least after
+ * the birth of object system. But is not exactly sure when.
+ */
+void ruby_init_loadpath(void);
+
+/**
+ * Appends the given path to the end of the load path.
+ *
+ * @pre ruby_init_loadpath() must be done beforehand.
+ * @param[in] path The path you want to push to the load path.
+ */
+void ruby_incpush(const char *path);
+
+/**
+ * Clear signal handlers.
+ *
+ * Ruby installs its own signal handler (apart from those which user scripts
+ * set). This is to clear that. Must be called when the ruby part terminates,
+ * before switching to your program's own logic.
+ */
+void ruby_sig_finalize(void);
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_INTERPRETER_H */
diff --git a/include/ruby/internal/iterator.h b/include/ruby/internal/iterator.h
new file mode 100644
index 0000000000..5f706460f8
--- /dev/null
+++ b/include/ruby/internal/iterator.h
@@ -0,0 +1,513 @@
+#ifndef RBIMPL_ITERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ITERATOR_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Block related APIs.
+ */
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RB_BLOCK_CALL_FUNC_STRICT 1
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
+
+/**
+ * Shim for block function parameters. Historically ::rb_block_call_func_t had
+ * only two parameters. Over time it evolved to have much more than that. By
+ * using this macro you can absorb such API differences.
+ *
+ * ```CXX
+ * // This works since 2.1.0
+ * VALUE my_own_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(y, c));
+ * ```
+ */
+#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \
+ VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
+
+/**
+ * This is the type of a function that the interpreter expect for C-backended
+ * blocks. Blocks are often written in Ruby. But C extensions might want to
+ * have their own blocks. In order to do so authors have to create a separate
+ * C function of this type, and pass its pointer to rb_block_call().
+ *
+ * ```CXX
+ * VALUE
+ * my_own_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(y, c))
+ * {
+ * const auto plus = rb_intern("+");
+ * return rb_funcall(c, plus, 1, y);
+ * }
+ *
+ * VALUE
+ * my_own_method(VALUE self)
+ * {
+ * const auto each = rb_intern("each");
+ * return rb_block_call(self, each, 0, 0, my_own_iterator, self);
+ * }
+ * ```
+ */
+typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg));
+
+/**
+ * Shorthand type that represents an iterator-written-in-C function pointer.
+ */
+typedef rb_block_call_func *rb_block_call_func_t;
+
+/**
+ * This is a shorthand of calling `obj.each`.
+ *
+ * @param[in] obj The receiver.
+ * @return What `obj.each` returns.
+ *
+ * @internal
+ *
+ * Does anyone still need it? This API was to use with rb_iterate(), which is
+ * marked deprecated (see below). Old idiom to call an iterator was:
+ *
+ * ```CXX
+ * VALUE recv;
+ * VALUE iter_func(ANYARGS);
+ * VALUE iter_data;
+ * rb_iterate(rb_each, recv, iter_func, iter_data);
+ * ```
+ */
+VALUE rb_each(VALUE obj);
+
+/**
+ * Yields the block. In Ruby there is a concept called a block. You can pass
+ * one to a method. In a method, when called with a block, you can yield it
+ * using this function.
+ *
+ * ```CXX
+ * VALUE
+ * iterate(VALUE self)
+ * {
+ * extern int get_n(VALUE);
+ * extern VALUE get_v(VALUE, VALUE);
+ * const auto n = get_n(self);
+ *
+ * for (int i=0; i<n; i++) {
+ * auto v = get_v(self, i);
+ *
+ * rb_yield(v);
+ * }
+ * return self;
+ * }
+ * ```
+ *
+ * @param[in] val Passed to the block.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield(VALUE val);
+
+/**
+ * Identical to rb_yield(), except it takes variadic number of parameters and
+ * pass them to the block.
+ *
+ * @param[in] n Number of parameters.
+ * @param[in] ... List of arguments passed to the block.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield_values(int n, ...);
+
+/**
+ * Identical to rb_yield_values(), except it takes the parameters as a C array
+ * instead of variadic arguments.
+ *
+ * @param[in] n Number of parameters.
+ * @param[in] argv List of arguments passed to the block.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield_values2(int n, const VALUE *argv);
+
+/**
+ * Identical to rb_yield_values2(), except you can specify how to handle the
+ * last element of the given array.
+ *
+ * @param[in] n Number of parameters.
+ * @param[in] argv List of arguments passed to the block.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `ary`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `ary`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS makes no sense here.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
+
+/**
+ * Identical to rb_yield_values(), except it splats an array to generate the
+ * list of parameters.
+ *
+ * @param[in] ary Array to splat.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield_splat(VALUE ary);
+
+/**
+ * Identical to rb_yield_splat(), except you can specify how to handle the last
+ * element of the given array.
+ *
+ * @param[in] ary Array to splat.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `ary`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `ary`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS makes no sense here.
+ * @exception rb_eLocalJumpError There is no block given.
+ * @return Evaluated value of the given block.
+ */
+VALUE rb_yield_splat_kw(VALUE ary, int kw_splat);
+
+/**
+ * Pass a passed block.
+ *
+ * Sometimes you want to "pass" a block form one method to another. Suppose
+ * you have this Ruby method `foo`:
+ *
+ * ```ruby
+ * def foo(x, y)
+ * x.open(y) do |*z|
+ * yield(*z)
+ * end
+ * end
+ * ```
+ *
+ * And suppose you want to translate this into C. Then rb_yield_block()
+ * function is usable in this situation.
+ *
+ * ```CXX
+ * VALUE
+ * foo_translated_into_C(VALUE self, VALUE x, VALUE y)
+ * {
+ * const auto open = rb_intern("open");
+ *
+ * return rb_block_call(x, open, 1, &y, rb_yield_block, Qfalse);
+ * // ^^^^^^^^^^^^^^ Here.
+ * }
+ * ```
+ *
+ * @see rb_funcall_passing_block
+ *
+ * @internal
+ *
+ * @shyouhei honestly doesn't understand why this is needed, given there
+ * already was rb_funcall_passing_block() at the time it was implemented. If
+ * somebody knows its raison d'etre, please improve the document :FIXME:
+ */
+VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */
+
+/**
+ * Determines if the current method is given a keyword argument.
+ *
+ * @retval false No keyword argument is given.
+ * @retval true Keyword argument(s) are given.
+ * @ingroup defmethod
+ */
+int rb_keyword_given_p(void);
+
+/**
+ * Determines if the current method is given a block.
+ *
+ * @retval false No block is given.
+ * @retval true A block is given.
+ * @ingroup defmethod
+ *
+ * @internal
+ *
+ * This function should have returned a bool. But at the time it was designed
+ * the project was entirely written in K&R C.
+ */
+int rb_block_given_p(void);
+
+/**
+ * Declares that the current method needs a block.
+ *
+ * @exception rb_eLocalJumpError No block given.
+ * @ingroup defmethod
+ */
+void rb_need_block(void);
+
+#ifndef __cplusplus
+RBIMPL_ATTR_DEPRECATED(("by: rb_block_call since 1.9"))
+#endif
+/**
+ * Old way to iterate a block.
+ *
+ * @deprecated This is an old API. Use rb_block_call() instead.
+ * @warning The passed function must at least once call a ruby method
+ * (to handle interrupts etc.)
+ * @param[in] func1 A function that could yield a value.
+ * @param[in,out] data1 Passed to `func1`
+ * @param[in] proc A function acts as a block.
+ * @param[in,out] data2 Passed to `proc` as the data2 parameter.
+ * @return What `func1` returns.
+ */
+VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2);
+
+#ifdef __cplusplus
+namespace ruby {
+namespace backward {
+/**
+ * Old way to iterate a block.
+ *
+ * @deprecated This is an old API. Use rb_block_call() instead.
+ * @warning The passed function must at least once call a ruby method
+ * (to handle interrupts etc.)
+ * @param[in] iter A function that could yield a value.
+ * @param[in,out] data1 Passed to `func1`
+ * @param[in] bl A function acts as a block.
+ * @param[in,out] data2 Passed to `proc` as the data2 parameter.
+ * @return What `func1` returns.
+ */
+static inline VALUE
+rb_iterate_deprecated(VALUE (*iter)(VALUE), VALUE data1, rb_block_call_func_t bl, VALUE data2)
+{
+ return ::rb_iterate(iter, data1, bl, data2);
+}}}
+
+RBIMPL_ATTR_DEPRECATED(("by: rb_block_call since 1.9"))
+VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2);
+#endif
+
+/**
+ * Identical to rb_funcallv(), except it additionally passes a function as a
+ * block. When the method yields, `proc` is called with the yielded value as
+ * its first argument, and `data2` as the second. Yielded values would be
+ * packed into an array if multiple values are yielded at once.
+ *
+ * @param[in,out] obj Receiver.
+ * @param[in] mid Method signature.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Arguments passed to `obj.mid`.
+ * @param[in] proc A function acts as a block.
+ * @param[in,out] data2 Passed to `proc` as the data2 parameter.
+ * @return What `obj.mid` returns.
+ */
+VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2);
+
+/**
+ * Identical to rb_funcallv_kw(), except it additionally passes a function as a
+ * block. It can also be seen as a routine identical to rb_block_call(),
+ * except it handles keyword-ness of `argv[argc-1]`.
+ *
+ * @param[in,out] obj Receiver.
+ * @param[in] mid Method signature.
+ * @param[in] argc Number of arguments including the keywords.
+ * @param[in] argv Arguments passed to `obj.mid`.
+ * @param[in] proc A function acts as a block.
+ * @param[in,out] data2 Passed to `proc` as the data2 parameter.
+ * @param[in] kw_splat Handling of keyword parameters:
+ * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument.
+ * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument.
+ * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block.
+ * @return What `obj.mid` returns.
+ */
+VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat);
+
+/**
+ * Identical to rb_rescue2(), except it does not take a list of exception
+ * classes. This is a shorthand of:
+ *
+ * ```CXX
+ * rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
+ * ```
+ *
+ * @param[in] b_proc A function which potentially raises an exception.
+ * @param[in,out] data1 Passed to `b_proc`.
+ * @param[in] r_proc A function which rescues an exception in `b_proc`.
+ * @param[in,out] data2 The first argument of `r_proc`.
+ * @return The return value of `b_proc` if no exception occurs, or the
+ * return value of `r_proc` otherwise.
+ * @see rb_rescue
+ * @see rb_ensure
+ * @see rb_protect
+ * @ingroup exception
+ */
+VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
+
+/**
+ * An equivalent of `rescue` clause.
+ *
+ * First it calls the function `b_proc` with `data1` as the argument. If
+ * nothing is thrown the function happily returns the return value of `b_proc`.
+ * When `b_proc` raises an exception, and the exception is a kind of one of the
+ * given exception classes, it then calls `r_proc` with `data2` and that
+ * exception. If the exception does not match any of them, it propagates.
+ *
+ * @param[in] b_proc A function which potentially raises an exception.
+ * @param[in,out] data1 Passed to `b_proc`.
+ * @param[in] r_proc A function which rescues an exception in `b_proc`.
+ * @param[in,out] data2 The first argument of `r_proc`.
+ * @param[in] ... 1 or more exception classes. Must be terminated by
+ * `(VALUE)0`
+ * @return The return value of `b_proc` if no exception occurs, or the
+ * return value of `r_proc` otherwise.
+ * @see rb_rescue
+ * @see rb_ensure
+ * @see rb_protect
+ * @ingroup exception
+ */
+VALUE rb_rescue2(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2, ...);
+
+/**
+ * Identical to rb_rescue2(), except it takes `va_list` instead of variadic
+ * number of arguments. This is exposed to 3rd parties because inline
+ * functions use it. Basically you don't have to bother.
+ *
+ * @param[in] b_proc A function which potentially raises an exception.
+ * @param[in,out] data1 Passed to `b_proc`.
+ * @param[in] r_proc A function which rescues an exception in `b_proc`.
+ * @param[in,out] data2 The first argument of `r_proc`.
+ * @param[in] ap 1 or more exception classes. Must be terminated by
+ * `(VALUE)0`
+ * @return The return value of `b_proc` if no exception occurs, or the
+ * return value of `r_proc` otherwise.
+ * @see rb_rescue
+ * @see rb_ensure
+ * @see rb_protect
+ * @ingroup exception
+ */
+VALUE rb_vrescue2(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2, va_list ap);
+
+/**
+ * An equivalent to `ensure` clause. Calls the function `b_proc` with `data1`
+ * as the argument, then calls `e_proc` with `data2` when execution terminated.
+ *
+ * @param[in] b_proc A function representing begin clause.
+ * @param[in,out] data1 Passed to `b_proc`.
+ * @param[in] e_proc A function representing ensure clause.
+ * @param[in,out] data2 Passed to `e_proc`.
+ * @retval RUBY_Qnil exception occurred inside of `b_proc`.
+ * @retval otherwise The return value of `b_proc`.
+ * @see rb_rescue
+ * @see rb_rescue2
+ * @see rb_protect
+ * @ingroup exception
+ */
+VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2);
+
+/**
+ * Executes the passed block and catches values thrown from inside of it.
+ *
+ * In case the block does not contain any throw`, this function returns the
+ * value of the last expression evaluated.
+ *
+ * ```CXX
+ * VALUE
+ * iter(RB_BLOCK_CALL_FUNC_ARGLIST(yielded, callback))
+ * {
+ * return INT2FIX(123);
+ * }
+ *
+ * VALUE
+ * method(VALUE self)
+ * {
+ * return rb_catch("tag", iter, Qnil); // returns 123
+ * }
+ * ```
+ *
+ * In case there do exist `throw`, Ruby searches up its execution context for a
+ * `catch` block. When a matching catch is found, the block stops executing
+ * and returns that thrown value instead.
+ *
+ * ```CXX
+ * VALUE
+ * iter(RB_BLOCK_CALL_FUNC_ARGLIST(yielded, callback))
+ * {
+ * rb_throw("tag", 456);
+ * return INT2FIX(123);
+ * }
+ *
+ * VALUE
+ * method(VALUE self)
+ * {
+ * return rb_catch("tag", iter, Qnil); // returns 456
+ * }
+ * ```
+ *
+ * @param[in] tag Arbitrary tag string.
+ * @param[in] func Function pointer that acts as a block.
+ * @param[in,out] data Extra parameter passed to `func`.
+ * @return Either caught value for `tag`, or the return value of `func`
+ * if nothing is thrown.
+ */
+VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data);
+
+/**
+ * Identical to rb_catch(), except it catches arbitrary Ruby objects.
+ *
+ * @param[in] tag Arbitrary tag object.
+ * @param[in] func Function pointer that acts as a block.
+ * @param[in,out] data Extra parameter passed to `func`.
+ * @return Either caught value for `tag`, or the return value of `func`
+ * if nothing is thrown.
+ */
+VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Transfers control to the end of the active `catch` block waiting for `tag`.
+ * Raises rb_eUncughtThrow if there is no `catch` block for the tag. The
+ * second parameter supplies a return value for the `catch` block, which
+ * otherwise defaults to ::RUBY_Qnil. For examples, see rb_catch().
+ *
+ * @param[in] tag Tag string.
+ * @param[in] val Value to throw.
+ * @exception rb_eUncughtThrow There is no corresponding `catch` clause.
+ * @note It never returns.
+ */
+void rb_throw(const char *tag, VALUE val);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Identical to rb_throw(), except it allows arbitrary Ruby object to become a
+ * tag.
+ *
+ * @param[in] tag Arbitrary object.
+ * @param[in] val Value to throw.
+ * @exception rb_eUncughtThrow There is no corresponding `catch` clause.
+ * @note It never returns.
+ */
+void rb_throw_obj(VALUE tag, VALUE val);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_ITERATOR_H */
diff --git a/include/ruby/internal/memory.h b/include/ruby/internal/memory.h
new file mode 100644
index 0000000000..6884db195d
--- /dev/null
+++ b/include/ruby/internal/memory.h
@@ -0,0 +1,666 @@
+#ifndef RBIMPL_MEMORY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_MEMORY_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Memory management stuff.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#if defined(_MSC_VER) && defined(_WIN64)
+# include <intrin.h>
+# pragma intrinsic(_umul128)
+#endif
+
+#include "ruby/internal/attr/alloc_size.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/attr/restrict.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/has/builtin.h"
+#include "ruby/internal/stdalign.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/xmalloc.h"
+#include "ruby/backward/2/limits.h"
+#include "ruby/backward/2/long_long.h"
+#include "ruby/backward/2/assume.h"
+#include "ruby/defines.h"
+
+/** @cond INTENAL_MACRO */
+
+/* Make alloca work the best possible way. */
+#if defined(alloca)
+# /* Take that. */
+#elif RBIMPL_HAS_BUILTIN(__builtin_alloca)
+# define alloca __builtin_alloca
+#elif defined(_AIX)
+# pragma alloca
+#elif defined(__cplusplus)
+extern "C" void *alloca(size_t);
+#else
+extern void *alloca();
+#endif
+
+/** @endcond */
+
+#if defined(__DOXYGEN__)
+/**
+ * @private
+ *
+ * Type that is as twice wider as size_t. This is an implementation detail of
+ * rb_mul_size_overflow(). People should not use it. This is not a good name
+ * either.
+ */
+typedef uint128_t DSIZE_T;
+#elif defined(HAVE_INT128_T) && SIZEOF_SIZE_T <= 8
+# define DSIZE_T uint128_t
+#elif SIZEOF_SIZE_T * 2 <= SIZEOF_LONG_LONG
+# define DSIZE_T unsigned LONG_LONG
+#endif
+
+/**
+ * @private
+ *
+ * Maximum possible number of bytes that #RB_ALLOCV can allocate using
+ * `alloca`. Anything beyond this is allocated using rb_alloc_tmp_buffer().
+ * This selection is transparent to users. People don't have to bother.
+ */
+#ifdef C_ALLOCA
+# define RUBY_ALLOCV_LIMIT 0
+#else
+# define RUBY_ALLOCV_LIMIT 1024
+#endif
+
+/**
+ * Prevents premature destruction of local objects. Ruby's garbage collector
+ * is conservative; it scans the C level machine stack as well. Possible in-
+ * use Ruby objects must remain visible on stack, to be properly marked as
+ * such. However contemporary C compilers do not interface well with this.
+ * Consider the following example:
+ *
+ * ```CXX
+ * auto s = rb_str_new_cstr(" world");
+ * auto sptr = RSTRING_PTR(s);
+ * auto t = rb_str_new_cstr("hello,"); // Possible GC invocation
+ * auto u = rb_str_cat_cstr(t, sptr);
+ *
+ * RB_GC_GUARD(s); // ensure `s` (and thus `sptr`) do not get GC-ed
+ * ```
+ *
+ * Here, without the #RB_GC_GUARD, the last use of `s` is _before_ the last use
+ * of `sptr`. Compilers could thus think `s` and `t` are allowed to overlap.
+ * That would eliminate `s` from the stack, while `sptr` is still in use. If
+ * our GC ran at that very moment, `s` gets swept out, which also destroys
+ * `sptr`. Boom! You got a SEGV.
+ *
+ * In order to prevent this scenario #RB_GC_GUARD must be placed _after_ the
+ * last use of `sptr`. Placing #RB_GC_GUARD before dereferencing `sptr` would
+ * be of no use.
+ *
+ * #RB_GC_GUARD would not be necessary at all in the above example if non-
+ * inlined function calls are made on the `s` variable after `sptr` is
+ * dereferenced. Thus, in the above example, calling any un-inlined function
+ * on `s` such as `rb_str_modify(s);` will ensure `s` stays on the stack or
+ * register to prevent a GC invocation from prematurely freeing it.
+ *
+ * Using the #RB_GC_GUARD macro is preferable to using the `volatile` keyword
+ * in C. #RB_GC_GUARD has the following advantages:
+ *
+ * - the intent of the macro use is clear.
+ *
+ * - #RB_GC_GUARD only affects its call site. OTOH `volatile` generates some
+ * extra code every time the variable is used, hurting optimisation.
+ *
+ * - `volatile` implementations may be buggy/inconsistent in some compilers
+ * and architectures. #RB_GC_GUARD is customisable for broken
+ * systems/compilers without negatively affecting other systems.
+ *
+ * - C++ since C++20 deprecates `volatile`. If you write your extension
+ * library in that language there is no escape but to use this macro.
+ *
+ * @param v A variable of ::VALUE type.
+ * @post `v` is still alive.
+ */
+#ifdef __GNUC__
+#define RB_GC_GUARD(v) \
+ (*__extension__ ({ \
+ volatile VALUE *rb_gc_guarded_ptr = &(v); \
+ __asm__("" : : "m"(rb_gc_guarded_ptr)); \
+ rb_gc_guarded_ptr; \
+ }))
+#elif defined _MSC_VER
+#define RB_GC_GUARD(v) (*rb_gc_guarded_ptr(&(v)))
+#else
+#define HAVE_RB_GC_GUARDED_PTR_VAL 1
+#define RB_GC_GUARD(v) (*rb_gc_guarded_ptr_val(&(v),(v)))
+#endif
+
+/* Casts needed because void* is NOT compatible with others in C++. */
+
+/**
+ * Convenient macro that allocates an array of n elements.
+ *
+ * @param type Type of array elements.
+ * @param n Length of the array.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError Integer overflow trying to calculate the length
+ * of continuous memory region of `n` elements of
+ * `type`.
+ * @return Storage instance that is capable of storing at least `n`
+ * elements of type `type`.
+ * @note It doesn't return NULL, even when `n` is zero.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+#define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
+
+/**
+ * Shorthand of #RB_ALLOC_N with `n=1`.
+ *
+ * @param type Type of allocation.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @return Storage instance that can hold an `type` object.
+ * @note It doesn't return NULL.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+#define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type)))
+
+/**
+ * Identical to #RB_ALLOC_N() but also nullifies the allocated region before
+ * returning.
+ *
+ * @param type Type of array elements.
+ * @param n Length of the array.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError Integer overflow trying to calculate the length
+ * of continuous memory region of `n` elements of
+ * `type`.
+ * @return Storage instance that is capable of storing at least `n`
+ * elements of type `type`.
+ * @post Returned array is filled with zeros.
+ * @note It doesn't return NULL, even when `n` is zero.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+#define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type)))
+
+/**
+ * Shorthand of #RB_ZALLOC_N with `n=1`.
+ *
+ * @param type Type of allocation.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @return Storage instance that can hold an `type` object.
+ * @post Returned object is filled with zeros.
+ * @note It doesn't return NULL.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+#define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1))
+
+/**
+ * Convenient macro that reallocates an array with a new size.
+ *
+ * @param var A variable of `type`, which points to a storage
+ * instance that was previously returned from
+ * either
+ * - ruby_xmalloc(),
+ * - ruby_xmalloc2(),
+ * - ruby_xcalloc(),
+ * - ruby_xrealloc(), or
+ * - ruby_xrealloc2().
+ * @param type Type of allocation.
+ * @param n Requested new size of each element.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError Integer overflow trying to calculate the length
+ * of continuous memory region of `n` elements of
+ * `type`.
+ * @return Storage instance that is capable of storing at least `n`
+ * elements of type `type`.
+ * @pre The passed variable must point to a valid live storage instance.
+ * It is a failure to pass a variable that holds an already-freed
+ * pointer.
+ * @note It doesn't return NULL, even when `n` is zero.
+ * @warning Do not assume anything on the alignment of the return value.
+ * There is no guarantee that it inherits the passed argument's
+ * one.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+#define RB_REALLOC_N(var,type,n) \
+ ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
+
+/**
+ * @deprecated This macro is dangerous (does not bother stack overflow at
+ * all). #RB_ALLOCV is the modern way to do the same thing.
+ * @param type Type of array elements.
+ * @param n Length of the array.
+ * @return A pointer on stack.
+ */
+#define ALLOCA_N(type,n) \
+ RBIMPL_CAST((type *)alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))
+
+/**
+ * Identical to #RB_ALLOCV_N(), except that it allocates a number of bytes and
+ * returns a void* .
+ *
+ * @param v A variable to hold the just-in-case opaque Ruby object.
+ * @param n Size of allocation, in bytes.
+ * @return A void pointer to `n` bytes storage.
+ * @note `n` may be evaluated twice.
+ */
+#define RB_ALLOCV(v, n) \
+ ((n) < RUBY_ALLOCV_LIMIT ? \
+ ((v) = 0, alloca(n)) : \
+ rb_alloc_tmp_buffer(&(v), (n)))
+
+/**
+ * Allocates a memory region, possibly on stack. If the given size exceeds
+ * #RUBY_ALLOCV_LIMIT, it allocates a dedicated opaque ruby object instead and
+ * let our GC sweep that region after use. Either way you can fire-and-forget.
+ *
+ * ```CXX
+ * #include <sys/types.h>
+ *
+ * VALUE
+ * foo(int n)
+ * {
+ * VALUE v;
+ * auto ptr = RB_ALLOCV(struct tms, v, n);
+ * ...
+ * // no need to free `ptr`.
+ * }
+ * ```
+ *
+ * If you want to be super-duper polite you can also explicitly state the end
+ * of use of such memory region by calling #RB_ALLOCV_END().
+ *
+ * @param type The type of array elements.
+ * @param v A variable to hold the just-in-case opaque Ruby object.
+ * @param n Number of elements requested to allocate.
+ * @return An array of `n` elements of `type`.
+ * @note `n` may be evaluated twice.
+ */
+#define RB_ALLOCV_N(type, v, n) \
+ RBIMPL_CAST((type *) \
+ (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? \
+ ((v) = 0, alloca((n) * sizeof(type))) : \
+ rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))))
+
+/**
+ * Polite way to declare that the given array is not used any longer. Calling
+ * this not mandatory. Our GC can baby-sit you. However it is not a very bad
+ * idea to use it when possible. Doing so could reduce memory footprint.
+ *
+ * @param v A variable previously passed to either #RB_ALLOCV/#RB_ALLOCV_N.
+ */
+#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
+
+/**
+ * Handy macro to erase a region of memory.
+ *
+ * @param p Target pointer.
+ * @param type Type of `p[0]`
+ * @param n Length of `p`.
+ * @return `p`.
+ * @post First `n` elements of `p` are squashed.
+ */
+#define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n)))
+
+/**
+ * Handy macro to call memcpy.
+ *
+ * @param p1 Destination pointer.
+ * @param p2 Source pointer.
+ * @param type Type of `p2[0]`
+ * @param n Length of `p2`.
+ * @return `p1`.
+ * @post First `n` elements of `p2` are copied into `p1`.
+ */
+#define MEMCPY(p1,p2,type,n) ruby_nonempty_memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
+
+/**
+ * Handy macro to call memmove.
+ *
+ * @param p1 Destination pointer.
+ * @param p2 Source pointer.
+ * @param type Type of `p2[0]`
+ * @param n Length of `p2`.
+ * @return `p1`.
+ * @post First `n` elements of `p2` are copied into `p1`.
+ */
+#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
+
+/**
+ * Handy macro to call memcmp
+ *
+ * @param p1 Target LHS.
+ * @param p2 Target RHS.
+ * @param type Type of `p1[0]`
+ * @param n Length of `p1`.
+ * @retval <0 `p1` is "less" than `p2`.
+ * @retval 0 `p1` is equal to `p2`.
+ * @retval >0 `p1` is "greater" than `p2`.
+ */
+#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
+
+#define ALLOC_N RB_ALLOC_N /**< @old{RB_ALLOC_N} */
+#define ALLOC RB_ALLOC /**< @old{RB_ALLOC} */
+#define ZALLOC_N RB_ZALLOC_N /**< @old{RB_ZALLOC_N} */
+#define ZALLOC RB_ZALLOC /**< @old{RB_ZALLOC} */
+#define REALLOC_N RB_REALLOC_N /**< @old{RB_REALLOC_N} */
+#define ALLOCV RB_ALLOCV /**< @old{RB_ALLOCV} */
+#define ALLOCV_N RB_ALLOCV_N /**< @old{RB_ALLOCV_N} */
+#define ALLOCV_END RB_ALLOCV_END /**< @old{RB_ALLOCV_END} */
+
+/**
+ * @private
+ *
+ * This is an implementation detail of rbimpl_size_mul_overflow().
+ *
+ * @internal
+ *
+ * Expecting this struct to be eliminated by function inlinings. This is
+ * nothing more than std::variant<std::size_t> if we could use recent C++, but
+ * reality is we cannot.
+ */
+struct rbimpl_size_mul_overflow_tag {
+ bool left; /**< Whether overflow happened or not. */
+ size_t right; /**< Multiplication result. */
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV(). People don't use this
+ * directly.
+ *
+ * @param[out] store Pointer to a variable.
+ * @param[in] len Requested number of bytes to allocate.
+ * @return Allocated `len` bytes array.
+ * @post `store` holds the corresponding tmp buffer object.
+ */
+void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
+
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV_N(). People don't use this
+ * directly.
+ *
+ * @param[out] store Pointer to a variable.
+ * @param[in] len Requested number of bytes to allocate.
+ * @param[in] count Number of elements in an array.
+ * @return Allocated `len` bytes array.
+ * @post `store` holds the corresponding tmp buffer object.
+ *
+ * @internal
+ *
+ * Although the meaning of `count` variable is clear, @shyouhei doesn't
+ * understand its needs.
+ */
+void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count);
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV_END(). People don't use this
+ * directly.
+ *
+ * @param[out] store Pointer to a variable.
+ * @pre `store` is a NULL, or a pointer to a tmp buffer object.
+ * @post `*store` is ::RUBY_Qfalse.
+ * @post The object formerly stored in `store` is destroyed.
+ */
+void rb_free_tmp_buffer(volatile VALUE *store);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV_N(). People don't use this
+ * directly.
+ *
+ * @param[in] x Arbitrary value.
+ * @param[in] y Arbitrary value.
+ * @exception rb_eArgError `x` * `y` would integer overflow.
+ */
+void ruby_malloc_size_overflow(size_t x, size_t y);
+
+#ifdef HAVE_RB_GC_GUARDED_PTR_VAL
+volatile VALUE *rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val);
+#endif
+RBIMPL_SYMBOL_EXPORT_END()
+
+#ifdef _MSC_VER
+# pragma optimize("", off)
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_GC_GUARD(). People don't use this
+ * directly.
+ *
+ * @param[in] ptr A pointer to an on-stack C variable.
+ * @return `ptr` as-is.
+ */
+static inline volatile VALUE *
+rb_gc_guarded_ptr(volatile VALUE *ptr)
+{
+ return ptr;
+}
+
+# pragma optimize("", on)
+#endif
+
+/**
+ * @deprecated This function was an implementation detail of old
+ * #RB_ALLOCV_N(). We no longer use it. @shyouhei suspects that
+ * there are no actual usage now. However it was not marked as
+ * private before. We cannot delete it any longer.
+ * @param[in] a Arbitrary value.
+ * @param[in] b Arbitrary value.
+ * @param[in] max Possible maximum value.
+ * @param[out] c A pointer to return the computation result.
+ * @retval 1 `c` is insane.
+ * @retval 0 `c` is sane.
+ * @post `c` holds `a` * `b`, but could be overflowed.
+ */
+static inline int
+rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
+{
+#ifdef DSIZE_T
+ RB_GNUC_EXTENSION DSIZE_T da, db, c2;
+ da = a;
+ db = b;
+ c2 = da * db;
+ if (c2 > max) return 1;
+ *c = RBIMPL_CAST((size_t)c2);
+#else
+ if (b != 0 && a > max / b) return 1;
+ *c = a * b;
+#endif
+ return 0;
+}
+
+#if defined(__DOXYGEN__)
+RBIMPL_ATTR_CONSTEXPR(CXX14)
+#elif RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
+RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70507 */
+#elif RBIMPL_COMPILER_SINCE(Clang, 7, 0, 0)
+RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://bugs.llvm.org/show_bug.cgi?id=37633 */
+#endif
+RBIMPL_ATTR_CONST()
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV_N(). People don't use this
+ * directly.
+ *
+ * @param[in] x Arbitrary value.
+ * @param[in] y Arbitrary value.
+ * @return `{ left, right }`, where `left` is whether there is an integer
+ * overflow or not, and `right` is a (possibly overflowed) result
+ * of `x` * `y`.
+ *
+ * @internal
+ *
+ * This is in fact also an implementation detail of ruby_xmalloc2() etc.
+ */
+static inline struct rbimpl_size_mul_overflow_tag
+rbimpl_size_mul_overflow(size_t x, size_t y)
+{
+ struct rbimpl_size_mul_overflow_tag ret = { false, 0, };
+
+#if RBIMPL_HAS_BUILTIN(__builtin_mul_overflow)
+ ret.left = __builtin_mul_overflow(x, y, &ret.right);
+
+#elif defined(DSIZE_T)
+ RB_GNUC_EXTENSION DSIZE_T dx = x;
+ RB_GNUC_EXTENSION DSIZE_T dy = y;
+ RB_GNUC_EXTENSION DSIZE_T dz = dx * dy;
+ ret.left = dz > SIZE_MAX;
+ ret.right = RBIMPL_CAST((size_t)dz);
+
+#elif defined(_MSC_VER) && defined(_WIN64)
+ unsigned __int64 dp = 0;
+ unsigned __int64 dz = _umul128(x, y, &dp);
+ ret.left = RBIMPL_CAST((bool)dp);
+ ret.right = RBIMPL_CAST((size_t)dz);
+
+#else
+ /* https://wiki.sei.cmu.edu/confluence/display/c/INT30-C.+Ensure+that+unsigned+integer+operations+do+not+wrap */
+ ret.left = (y != 0) && (x > SIZE_MAX / y);
+ ret.right = x * y;
+#endif
+
+ return ret;
+}
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_ALLOCV_N(). People don't use this
+ * directly.
+ *
+ * @param[in] x Arbitrary value.
+ * @param[in] y Arbitrary value.
+ * @exception rb_eArgError Multiplication could integer overflow.
+ * @return `x` * `y`.
+ *
+ * @internal
+ *
+ * This is in fact also an implementation detail of ruby_xmalloc2() etc.
+ */
+static inline size_t
+rbimpl_size_mul_or_raise(size_t x, size_t y)
+{
+ struct rbimpl_size_mul_overflow_tag size =
+ rbimpl_size_mul_overflow(x, y);
+
+ if (RB_LIKELY(! size.left)) {
+ return size.right;
+ }
+ else {
+ ruby_malloc_size_overflow(x, y);
+ RBIMPL_UNREACHABLE_RETURN(0);
+ }
+}
+
+/**
+ * This is an implementation detail of #RB_ALLOCV_N(). People don't use this
+ * directly.
+ *
+ * @param[out] store Pointer to a variable.
+ * @param[in] count Number of elements in an array.
+ * @param[in] elsize Size of each elements.
+ * @return Region of `count` * `elsize` bytes.
+ * @post `store` holds the corresponding tmp buffer object.
+ *
+ * @internal
+ *
+ * We might want to deprecate this function and make a `rbimpl_` counterpart.
+ */
+static inline void *
+rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
+{
+ const size_t total_size = rbimpl_size_mul_or_raise(count, elsize);
+ const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE);
+ return rb_alloc_tmp_buffer_with_count(store, total_size, cnt);
+}
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_RETURNS_NONNULL()
+/* At least since 2004, glibc's <string.h> annotates memcpy to be
+ * __attribute__((__nonnull__(1, 2))). However it is safe to pass NULL to the
+ * source pointer, if n is 0. Let's wrap memcpy. */
+static inline void *
+ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
+{
+ if (n) {
+ return memcpy(dest, src, n);
+ }
+ else {
+ return dest;
+ }
+}
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_MEMORY_H */
diff --git a/include/ruby/internal/method.h b/include/ruby/internal/method.h
new file mode 100644
index 0000000000..19feb0c10b
--- /dev/null
+++ b/include/ruby/internal/method.h
@@ -0,0 +1,205 @@
+#ifndef RBIMPL_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_METHOD_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Creation and modification of Ruby methods.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/backward/2/stdarg.h"
+
+/**
+ * @defgroup defmethod Defining methods
+ *
+ * There are some APIs to define a method from C.
+ * These API takes a C function as a method body.
+ *
+ * ### Method body functions
+ *
+ * Method body functions must return a VALUE and
+ * can be one of the following form:
+ *
+ * #### Fixed number of parameters
+ *
+ * This form is a normal C function, excepting it takes
+ * a receiver object as the first argument.
+ *
+ * ```CXX
+ * static VALUE my_method(VALUE self, VALUE x, VALUE y);
+ * ```
+ *
+ * #### argc and argv style
+ *
+ * This form takes three parameters: argc, argv and self.
+ * self is the receiver. argc is the number of arguments.
+ * argv is a pointer to an array of the arguments.
+ *
+ * ```CXX
+ * static VALUE my_method(int argc, VALUE *argv, VALUE self);
+ * ```
+ *
+ * #### Ruby array style
+ *
+ * This form takes two parameters: self and args.
+ * self is the receiver. args is an Array object which
+ * contains the arguments.
+ *
+ * ```CXX
+ * static VALUE my_method(VALUE self, VALUE args);
+ * ```
+ *
+ * ### Number of parameters
+ *
+ * Method defining APIs takes the number of parameters which the
+ * method will takes. This number is called argc.
+ * argc can be:
+ *
+ * - Zero or positive number.
+ * This means the method body function takes a fixed number of parameters.
+ *
+ * - `-1`.
+ * This means the method body function is "argc and argv" style.
+ *
+ * - `-2`.
+ * This means the method body function is "self and args" style.
+ *
+ * @{
+ */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a method.
+ *
+ * @param[out] klass A module or a class.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_method
+ */
+void rb_define_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a module function for a module.
+ *
+ * @param[out] klass A module or a class.
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_module_function
+ */
+void rb_define_module_function(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a global function.
+ *
+ * @param[in] mid Name of the function.
+ * @param[in] func The method body.
+ * @param[in] arity The number of parameters. See @ref defmethod.
+ * @note There are in fact 18 different prototypes for func.
+ * @see ::ruby::backward::cxxanyargs::define_method::rb_define_global_function
+ */
+void rb_define_global_function(const char *mid, VALUE (*func)(ANYARGS), int arity);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines an undef of a method. -- What?
+ *
+ * In ruby, there are two separate concepts called "undef" and "remove_method".
+ * The thing you imagine when you "un-define" a method is remove_method. This
+ * one on the other hand is masking of a previous method definition. Suppose
+ * for instance:
+ *
+ * ```ruby
+ * class Foo
+ * def foo
+ * end
+ * end
+ *
+ * class Bar < Foo
+ * def bar
+ * foo
+ * end
+ * end
+ *
+ * class Baz < Foo
+ * undef foo # <--- (*1)
+ * end
+ * ```
+ *
+ * This `undef foo` at `(*1)` must not eliminate `Foo#foo`, because that method
+ * is also used from `Bar#bar`. So instead of physically executing the target
+ * method, `undef` inserts a special filtering entry to the class (`Baz` this
+ * case). That entry, when called, acts as if there were no methods at all.
+ * But the original can still be accessible, via ways like `Bar#bar` above.
+ *
+ * @param[out] klass The class to insert an undef.
+ * @param[in] name Name of the undef.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @see rb_remove_method
+ */
+void rb_undef_method(VALUE klass, const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines an alias of a method.
+ *
+ * @param[in,out] klass The class which the original method belongs
+ * to; this is also where the new method will
+ * belong to.
+ * @param[in] dst A new name for the method.
+ * @param[in] src The original name of the method.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError There is no such method named as `src` in
+ * `klass`.
+ *
+ * @internal
+ *
+ * Above description is in fact a bit inaccurate because it ignores
+ * Refinements.
+ */
+void rb_define_alias(VALUE klass, const char *dst, const char *src);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines public accessor method(s) for an attribute.
+ *
+ * @param[out] klass The class which the attribute will belong to.
+ * @param[in] name Name of the attribute.
+ * @param[in] read Whether to define a getter method.
+ * @param[in] write Whether to define a setter method.
+ * @exception rb_eTypeError `klass` is a non-module.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @exception rb_eNameError `name` invalid as an attr e.g. an operator.
+ */
+void rb_define_attr(VALUE klass, const char *name, int read, int write);
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_METHOD_H */
diff --git a/include/ruby/internal/module.h b/include/ruby/internal/module.h
new file mode 100644
index 0000000000..d678dd2102
--- /dev/null
+++ b/include/ruby/internal/module.h
@@ -0,0 +1,177 @@
+#ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_MODULE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Creation and modification of Ruby modules.
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+
+/**
+ * @defgroup class Classes and their hierarchy.
+ *
+ * @par Terminology
+ * - class: same as in Ruby.
+ * - singleton class: class for a particular object.
+ * - eigenclass: = singleton class
+ * - metaclass: class of a class. Metaclass is a kind of singleton class.
+ * - metametaclass: class of a metaclass.
+ * - meta^(n)-class: class of a meta^(n-1)-class.
+ * - attached object: A singleton class knows its unique instance.
+ * The instance is called the attached object for the singleton class.
+ * @{
+ */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a top-level class.
+ *
+ * @param[in] name Name of the class.
+ * @param[in] super A class from which the new class will derive.
+ * @exception rb_eTypeError The constant name `name` is already taken but the
+ * constant is not a class.
+ * @exception rb_eTypeError The class is already defined but the class can
+ * not be reopened because its superclass is not
+ * `super`.
+ * @exception rb_eArgError `super` is NULL.
+ * @return The created class.
+ * @post Top-level constant named `name` refers the returned class.
+ * @note If a class named `name` is already defined and its superclass is
+ * `super`, the function just returns the defined class.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ *
+ * @internal
+ *
+ * There are classes without names, but you can't pass NULL here. You have to
+ * use other ways to create one.
+ */
+VALUE rb_define_class(const char *name, VALUE super);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a top-level module.
+ *
+ * @param[in] name Name of the module.
+ * @exception rb_eTypeError The constant name `name` is already taken but the
+ * constant is not a module.
+ * @return The created module.
+ * @post Top-level constant named `name` refers the returned module.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ *
+ * @internal
+ *
+ * There are modules without names, but you can't pass NULL here. You have to
+ * use other ways to create one.
+ */
+VALUE rb_define_module(const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a class under the namespace of `outer`.
+ *
+ * @param[out] outer A class which contains the new class.
+ * @param[in] name Name of the new class
+ * @param[in] super A class from which the new class will derive.
+ * 0 means ::rb_cObject.
+ * @exception rb_eTypeError The constant name `name` is already taken but
+ * the constant is not a class.
+ * @exception rb_eTypeError The class is already defined but the class can
+ * not be reopened because its superclass is not
+ * `super`.
+ * @exception rb_eArgError `super` is NULL.
+ * @return The created class.
+ * @post `outer::name` refers the returned class.
+ * @note If a class named `name` is already defined and its superclass
+ * is `super`, the function just returns the defined class.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ */
+VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a module under the namespace of `outer`.
+ *
+ * @param[out] outer A class which contains the new module.
+ * @param[in] name Name of the new module
+ * @exception rb_eTypeError The constant name `name` is already taken but
+ * the constant is not a class.
+ * @return The created module.
+ * @post `outer::name` refers the returned module.
+ * @note The compaction GC does not move classes returned by this
+ * function.
+ */
+VALUE rb_define_module_under(VALUE outer, const char *name);
+
+/**
+ * Includes a module to a class.
+ *
+ * @param[out] klass Inclusion destination.
+ * @param[in] module Inclusion source.
+ * @exception rb_eArgError Cyclic inclusion.
+ *
+ * @internal
+ *
+ * :FIXME: @shyouhei suspects this function lacks assertion that the arguments
+ * being modules... Could silently SEGV if non-module was passed?
+ */
+void rb_include_module(VALUE klass, VALUE module);
+
+/**
+ * Extend the object with the module.
+ *
+ * @warning This is the same as `Module#extend_object`, not
+ * `Object#extend`! These two methods are very similar, but not
+ * identical. The difference is the hook. `Module#extend_object`
+ * does not invoke `Module#extended`, while `Object#extend` does.
+ * @param[out] obj Object to extend.
+ * @param[in] mod Module of extension.
+ */
+void rb_extend_object(VALUE obj, VALUE mod);
+
+/**
+ * Identical to rb_include_module(), except it "prepends" the passed module to
+ * the klass, instead of includes. This affects how `super` resolves. For
+ * instance:
+ *
+ * ```ruby
+ * class Q; def foo; "<q/>" end end
+ * module W; def foo; "<w>#{super}</w>" end end
+ * class E < Q; include W; def foo; "<e>#{super}</e>" end end
+ * class R < Q; prepend W; def foo; "<r>#{super}</r>" end end
+ *
+ * E.new.foo # => "<e><w><q/></w></e>"
+ * r.new.foo # => "<W><r><q/></r></w>"
+ * ```
+ *
+ * @param[out] klass Target class to modify.
+ * @param[in] module Module to prepend.
+ * @exception rb_eArgError Cyclic inclusion.
+ */
+void rb_prepend_module(VALUE klass, VALUE module);
+
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_MODULE_H */
diff --git a/include/ruby/internal/newobj.h b/include/ruby/internal/newobj.h
new file mode 100644
index 0000000000..a8a5557a25
--- /dev/null
+++ b/include/ruby/internal/newobj.h
@@ -0,0 +1,195 @@
+#ifndef RBIMPL_NEWOBJ_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_NEWOBJ_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #NEWOBJ.
+ */
+#include "ruby/internal/attr/deprecated.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+
+/**
+ * Declares, allocates, then assigns a new object to the given variable.
+ *
+ * @param obj Variable name.
+ * @param type Variable type.
+ * @exception rb_eNoMemError No space left.
+ * @return An allocated object, not initialised.
+ * @note Modern programs tend to use #NEWOBJ_OF instead.
+ *
+ * @internal
+ *
+ * :FIXME: Should we deprecate it?
+ */
+#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
+
+/**
+ * Identical to #RB_NEWOBJ, except it also accepts the allocating object's
+ * class and flags.
+ *
+ * @param obj Variable name.
+ * @param type Variable type.
+ * @param klass Object's class.
+ * @param flags Object's flags.
+ * @exception rb_eNoMemError No space left.
+ * @return An allocated object, filled with the arguments.
+ */
+#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
+
+#define NEWOBJ RB_NEWOBJ /**< @old{RB_NEWOBJ} */
+#define NEWOBJ_OF RB_NEWOBJ_OF /**< @old{RB_NEWOBJ_OF} */
+#define OBJSETUP rb_obj_setup /**< @old{rb_obj_setup} */
+#define CLONESETUP rb_clone_setup /**< @old{rb_clone_setup} */
+#define DUPSETUP rb_dup_setup /**< @old{rb_dup_setup} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * This is the implementation detail of #RB_NEWOBJ.
+ *
+ * @exception rb_eNoMemError No space left.
+ * @return An allocated object, not initialised.
+ */
+VALUE rb_newobj(void);
+
+/**
+ * This is the implementation detail of #RB_NEWOBJ_OF.
+ *
+ * @param klass Object's class.
+ * @param flags Object's flags.
+ * @exception rb_eNoMemError No space left.
+ * @return An allocated object, filled with the arguments.
+ */
+VALUE rb_newobj_of(VALUE klass, VALUE flags);
+
+/**
+ * Fills common fields in the object.
+ *
+ * @note Prefer rb_newobj_of() to this function.
+ * @param[in,out] obj A Ruby object to be set up.
+ * @param[in] klass `obj` will belong to this class.
+ * @param[in] type One of ::ruby_value_type.
+ * @return The passed object.
+ *
+ * @internal
+ *
+ * Historically, authors of Ruby has described the `type` argument as "one of
+ * ::ruby_value_type". In reality it accepts either ::ruby_value_type,
+ * ::ruby_fl_type, or any combinations of the two. For instance
+ * `RUBY_T_STRING | RUBY_FL_FREEZE` is a valid value that this function takes,
+ * and means this is a frozen string.
+ *
+ * 3rd party extension libraries rarely need to allocate Strings this way.
+ * They normally only concern ::RUBY_T_DATA. This argument is mainly used for
+ * specifying flags, @shyouhei suspects.
+ */
+VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
+
+/**
+ * Queries the class of an object. This is not always identical to
+ * `RBASIC_CLASS(obj)`. It searches for the nearest ancestor skipping
+ * singleton classes or included modules.
+ *
+ * @param[in] obj Object in question.
+ * @return The object's class, in a normal sense.
+ */
+VALUE rb_obj_class(VALUE obj);
+
+/**
+ * Clones a singleton class. An object can have its own singleton class. OK.
+ * Then what happens when a program clones such object? The singleton class
+ * that is attached to the source object must also be cloned. Otherwise a
+ * singleton object gets shared with two objects, which breaks "singleton"-ness
+ * of such class.
+ *
+ * This is basically an implementation detail of rb_clone_setup(). People
+ * need not be aware of this working behind-the-scene.
+ *
+ * @param[in] obj The object that has its own singleton class.
+ * @return Cloned singleton class.
+ */
+VALUE rb_singleton_class_clone(VALUE obj);
+
+/**
+ * Attaches a singleton class to its corresponding object.
+ *
+ * This is basically an implementation detail of rb_clone_setup(). People
+ * need not be aware of this working behind-the-scene.
+ *
+ * @param[in] klass The singleton class.
+ * @param[out] obj The object to attach a class.
+ * @pre The passed two objects must agree with each other that `klass`
+ * becomes a singleton class of `obj`.
+ * @post `klass` becomes the singleton class of `obj`.
+ */
+void rb_singleton_class_attached(VALUE klass, VALUE obj);
+
+/**
+ * Copies the list of instance variables. 3rd parties need not know, but there
+ * are several ways to store an object's instance variables, depending on its
+ * internal structure. This function makes sense when either of the passed
+ * objects are using so-called "generic" backend storage. This distinction is
+ * purely an implementation detail of rb_clone_setup(). People need not be
+ * aware of this working behind-the-scenes.
+ *
+ * @param[out] clone The destination object.
+ * @param[in] obj The source object.
+ */
+void rb_copy_generic_ivar(VALUE clone, VALUE obj);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#clone works."))
+/**
+ * @deprecated Not sure exactly when but at some time, the implementation of
+ * `Object#clone` stopped using this function. It remained
+ * untouched for a while, and then @shyouhei realised that they
+ * are no longer doing the same thing. It seems nobody seriously
+ * uses this function any longer. Let's just abandon it.
+ *
+ * @param[out] clone The destination object.
+ * @param[in] obj The source object.
+ */
+static inline void
+rb_clone_setup(VALUE clone, VALUE obj)
+{
+ return;
+}
+
+RBIMPL_ATTR_DEPRECATED(("This is no longer how Object#dup works."))
+/**
+ * @deprecated Not sure exactly when but at some time, the implementation of
+ * `Object#dup` stopped using this function. It remained
+ * untouched for a while, and then @shyouhei realised that they
+ * are no longer the same thing. It seems nobody seriously uses
+ * this function any longer. Let's just abandon it.
+ *
+ * @param[out] dup The destination object.
+ * @param[in] obj The source object.
+ */
+static inline void
+rb_dup_setup(VALUE dup, VALUE obj)
+{
+ return;
+}
+
+#endif /* RBIMPL_NEWOBJ_H */
diff --git a/include/ruby/internal/rgengc.h b/include/ruby/internal/rgengc.h
new file mode 100644
index 0000000000..7ea04442f6
--- /dev/null
+++ b/include/ruby/internal/rgengc.h
@@ -0,0 +1,443 @@
+#ifndef RBIMPL_RGENGC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RGENGC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief RGENGC write-barrier APIs.
+ * @see Sasada, K., "Gradual write-barrier insertion into a Ruby
+ * interpreter", in proceedings of the 2019 ACM SIGPLAN
+ * International Symposium on Memory Management (ISMM 2019), pp
+ * 115-121, 2019. https://doi.org/10.1145/3315573.3329986
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/maybe_unused.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#undef USE_RGENGC
+#define USE_RGENGC 1
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable incremental GC feature. It
+ * has to be set at the time ruby itself compiles. Makes no sense for 3rd
+ * parties. It is safe for them to set this though; that just doesn't change
+ * anything.
+ */
+#ifndef USE_RINCGC
+# define USE_RINCGC 1
+#endif
+
+/**
+ * @deprecated This macro seems broken. Setting this to anything other than
+ * zero just doesn't compile. We need to KonMari.
+ */
+#ifndef USE_RGENGC_LOGGING_WB_UNPROTECT
+# define USE_RGENGC_LOGGING_WB_UNPROTECT 0
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RArray. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_ARRAY
+# define RGENGC_WB_PROTECTED_ARRAY 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RHash. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_HASH
+# define RGENGC_WB_PROTECTED_HASH 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RStruct. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_STRUCT
+# define RGENGC_WB_PROTECTED_STRUCT 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RString. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_STRING
+# define RGENGC_WB_PROTECTED_STRING 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RObject. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_OBJECT
+# define RGENGC_WB_PROTECTED_OBJECT 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RRegexp. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_REGEXP
+# define RGENGC_WB_PROTECTED_REGEXP 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RClass. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_CLASS
+# define RGENGC_WB_PROTECTED_CLASS 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RFloat. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_FLOAT
+# define RGENGC_WB_PROTECTED_FLOAT 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RComplex. It has to be set at the time ruby itself compiles.
+ * Makes no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_COMPLEX
+# define RGENGC_WB_PROTECTED_COMPLEX 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RRational. It has to be set at the time ruby itself compiles.
+ * Makes no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_RATIONAL
+# define RGENGC_WB_PROTECTED_RATIONAL 1
+#endif
+
+/**
+ * @private
+ *
+ * This is a compile-time flag to enable/disable write barrier for
+ * struct ::RBignum. It has to be set at the time ruby itself compiles. Makes
+ * no sense for 3rd parties.
+ */
+#ifndef RGENGC_WB_PROTECTED_BIGNUM
+# define RGENGC_WB_PROTECTED_BIGNUM 1
+#endif
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't think anybody uses this right now.
+ */
+#ifndef RGENGC_WB_PROTECTED_NODE_CREF
+# define RGENGC_WB_PROTECTED_NODE_CREF 1
+#endif
+
+/**
+ * @defgroup rgengc Write barrier (WB) interfaces:
+ *
+ * @note The following core interfaces can be changed in the future. Please
+ * catch up if you want to insert WB into C-extensions correctly.
+ *
+ * @{
+ */
+
+/**
+ * Declaration of a "back" pointer. This is a write barrier for new reference
+ * from "old" generation to "young" generation. It writes `young` into
+ * `*slot`, which is a pointer inside of `old`.
+ *
+ * @param[in] old An old object.
+ * @param[in] slot A pointer inside of `old`.
+ * @param[out] young A young object.
+ */
+#define RB_OBJ_WRITE(old, slot, young) \
+ RBIMPL_CAST(rb_obj_write((VALUE)(old), (VALUE *)(slot), (VALUE)(young), __FILE__, __LINE__))
+
+/**
+ * Identical to #RB_OBJ_WRITE(), except it doesn't write any values, but only a
+ * WB declaration. `oldv` is replaced value with `b` (not used in current
+ * Ruby).
+ *
+ * @param[in] old An old object.
+ * @param[in] oldv An object previously stored inside of `old`.
+ * @param[out] young A young object.
+ */
+#define RB_OBJ_WRITTEN(old, oldv, young) \
+ RBIMPL_CAST(rb_obj_written((VALUE)(old), (VALUE)(oldv), (VALUE)(young), __FILE__, __LINE__))
+/** @} */
+
+#define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW /**< @old{RB_OBJ_PROMOTED_RAW} */
+#define OBJ_PROMOTED RB_OBJ_PROMOTED /**< @old{RB_OBJ_PROMOTED} */
+#define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT /**< @old{RB_OBJ_WB_UNPROTECT} */
+
+/**
+ * Asserts that the passed object is not fenced by write barriers. Objects of
+ * such property do not contribute to generational GCs. They are scanned
+ * always.
+ *
+ * @param[out] x An object that would not be protected by the barrier.
+ */
+#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
+
+/**
+ * Identical to #RB_OBJ_WB_UNPROTECT(), except it can also assert that the
+ * given object is of given type.
+ *
+ * @param[in] type One of `ARRAY`, `STRING`, etc.
+ * @param[out] obj An object of `type` that would not be protected.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't understand why this has to be visible from extensions.
+ */
+#define RB_OBJ_WB_UNPROTECT_FOR(type, obj) \
+ (RGENGC_WB_PROTECTED_##type ? OBJ_WB_UNPROTECT(obj) : obj)
+
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_obj_wb_unprotect(). People don't use
+ * it directly.
+ */
+#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
+
+/** @cond INTERNAL_MACRO */
+#define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
+#define RB_OBJ_PROMOTED RB_OBJ_PROMOTED
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/**
+ * This is the implementation of #RB_OBJ_WRITE(). People don't use it
+ * directly.
+ *
+ * @param[in] old An object that points to `young`.
+ * @param[out] young An object that is referenced from `old`.
+ */
+void rb_gc_writebarrier(VALUE old, VALUE young);
+
+/**
+ * This is the implementation of #RB_OBJ_WB_UNPROTECT(). People don't use it
+ * directly.
+ *
+ * @param[out] obj An object that does not participate in WB.
+ */
+void rb_gc_writebarrier_unprotect(VALUE obj);
+
+#if USE_RGENGC_LOGGING_WB_UNPROTECT
+/**
+ * @private
+ *
+ * This is the implementation of #RGENGC_LOGGING_WB_UNPROTECT(). People
+ * don't use it directly.
+ *
+ * @param[in] objptr Don't know why this is a pointer to void but in
+ * reality this is a pointer to an object that is about
+ * to be un-protected.
+ * @param[in] filename Pass C's `__FILE__` here.
+ * @param[in] line Pass C's `__LINE__` here.
+ */
+void rb_gc_unprotect_logging(void *objptr, const char *filename, int line);
+#endif
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * This is the implementation of #RB_OBJ_PROMOTED(). People don't use it
+ * directly.
+ *
+ * @param[in] obj An object to query.
+ * @retval true The object is "promoted".
+ * @retval false The object is young. Have not experienced GC at all.
+ */
+static inline bool
+RB_OBJ_PROMOTED_RAW(VALUE obj)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Tests if the object is "promoted" -- that is, whether the object experienced
+ * one or more GC marks.
+ *
+ * @param[in] obj An object to query.
+ * @retval true The object is "promoted".
+ * @retval false The object is young. Have not experienced GC at all.
+ * @note Hello, is anyone actively calling this function? @shyouhei have
+ * never seen any actual usages outside of the GC implementation
+ * itself.
+ */
+static inline bool
+RB_OBJ_PROMOTED(VALUE obj)
+{
+ if (! RB_FL_ABLE(obj)) {
+ return false;
+ }
+ else {
+ return RB_OBJ_PROMOTED_RAW(obj);
+ }
+}
+
+/**
+ * This is the implementation of #RB_OBJ_WB_UNPROTECT(). People don't use it
+ * directly.
+ *
+ * @param[out] x An object that does not participate in WB.
+ * @param[in] filename C's `__FILE__` of the caller function.
+ * @param[in] line C's `__LINE__` of the caller function.
+ * @return x
+ */
+static inline VALUE
+rb_obj_wb_unprotect(
+ VALUE x,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ const char *filename,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ int line)
+{
+#if USE_RGENGC_LOGGING_WB_UNPROTECT
+ RGENGC_LOGGING_WB_UNPROTECT(RBIMPL_CAST((void *)x), filename, line);
+#endif
+ rb_gc_writebarrier_unprotect(x);
+ return x;
+}
+
+/**
+ * @private
+ *
+ * This is the implementation of #RB_OBJ_WRITTEN(). People don't use it
+ * directly.
+ *
+ * @param[in] a An old object.
+ * @param[in] oldv An object previously stored inside of `old`.
+ * @param[out] b A young object.
+ * @param[in] filename C's `__FILE__` of the caller function.
+ * @param[in] line C's `__LINE__` of the caller function.
+ * @return a
+ */
+static inline VALUE
+rb_obj_written(
+ VALUE a,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ VALUE oldv,
+ VALUE b,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ const char *filename,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ int line)
+{
+#if USE_RGENGC_LOGGING_WB_UNPROTECT
+ RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line);
+#endif
+
+ if (!RB_SPECIAL_CONST_P(b)) {
+ rb_gc_writebarrier(a, b);
+ }
+
+ return a;
+}
+
+/**
+ * @private
+ *
+ * This is the implementation of #RB_OBJ_WRITE(). People don't use it
+ * directly.
+ *
+ * @param[in] a An old object.
+ * @param[in] slot A pointer inside of `old`.
+ * @param[out] b A young object.
+ * @param[in] filename C's `__FILE__` of the caller function.
+ * @param[in] line C's `__LINE__` of the caller function.
+ * @return a
+ */
+static inline VALUE
+rb_obj_write(
+ VALUE a, VALUE *slot, VALUE b,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ const char *filename,
+ RBIMPL_ATTR_MAYBE_UNUSED()
+ int line)
+{
+#ifdef RGENGC_LOGGING_WRITE
+ RGENGC_LOGGING_WRITE(a, slot, b, filename, line);
+#endif
+
+ *slot = b;
+
+ rb_obj_written(a, RUBY_Qundef /* ignore `oldv' now */, b, filename, line);
+ return a;
+}
+
+#endif /* RBIMPL_RGENGC_H */
diff --git a/include/ruby/internal/scan_args.h b/include/ruby/internal/scan_args.h
new file mode 100644
index 0000000000..1ed2bf6368
--- /dev/null
+++ b/include/ruby/internal/scan_args.h
@@ -0,0 +1,534 @@
+#ifndef RBIMPL_SCAN_ARGS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SCAN_ARGS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Compile-time static implementation of ::rb_scan_args().
+ *
+ * This is a beast. It statically analyses the argument spec string, and
+ * expands the assignment of variables into dedicated codes.
+ */
+#include "ruby/assert.h"
+#include "ruby/internal/attr/diagnose_if.h"
+#include "ruby/internal/attr/error.h"
+#include "ruby/internal/attr/forceinline.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/config.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/intern/array.h" /* rb_ary_new_from_values */
+#include "ruby/internal/intern/error.h" /* rb_error_arity */
+#include "ruby/internal/intern/hash.h" /* rb_hash_dup */
+#include "ruby/internal/intern/proc.h" /* rb_block_proc */
+#include "ruby/internal/iterator.h" /* rb_block_given_p / rb_keyword_given_p */
+#include "ruby/internal/static_assert.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+
+/**
+ * @name Possible values that you should pass to rb_scan_args_kw().
+ * @{
+ */
+
+/** Same behaviour as rb_scan_args(). */
+#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
+
+/** The final argument should be a hash treated as keywords.*/
+#define RB_SCAN_ARGS_KEYWORDS 1
+
+/**
+ * Treat a final argument as keywords if it is a hash, and not as keywords
+ * otherwise.
+ */
+#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
+
+/** @} */
+
+/**
+ * @name Possible values that you should pass to rb_funcallv_kw().
+ * @{
+ */
+
+/** Do not pass keywords. */
+#define RB_NO_KEYWORDS 0
+
+/** Pass keywords, final argument should be a hash of keywords. */
+#define RB_PASS_KEYWORDS 1
+
+/**
+ * Pass keywords if current method is called with keywords, useful for argument
+ * delegation
+ */
+#define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p()
+
+/** @} */
+
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NONNULL((2, 3))
+/**
+ * Retrieves argument from argc and argv to given ::VALUE references according
+ * to the format string. The format can be described in ABNF as follows:
+ *
+ * ```
+ * scan-arg-spec := param-arg-spec [keyword-arg-spec] [block-arg-spec]
+ *
+ * param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec /
+ * pre-opt-post-arg-spec
+ * pre-arg-spec := num-of-leading-mandatory-args
+ * [num-of-optional-args]
+ * post-arg-spec := sym-for-variable-length-args
+ * [num-of-trailing-mandatory-args]
+ * pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args
+ * num-of-trailing-mandatory-args
+ * keyword-arg-spec := sym-for-keyword-arg
+ * block-arg-spec := sym-for-block-arg
+ *
+ * num-of-leading-mandatory-args := DIGIT ; The number of leading mandatory
+ * ; arguments
+ * num-of-optional-args := DIGIT ; The number of optional arguments
+ * sym-for-variable-length-args := "*" ; Indicates that variable length
+ * ; arguments are captured as a ruby
+ * ; array
+ * num-of-trailing-mandatory-args := DIGIT ; The number of trailing mandatory
+ * ; arguments
+ * sym-for-keyword-arg := ":" ; Indicates that keyword argument
+ * ; captured as a hash.
+ * ; If keyword arguments are not
+ * ; provided, returns nil.
+ * sym-for-block-arg := "&" ; Indicates that an iterator block
+ * ; should be captured if given
+ * ```
+ *
+ * For example, "12" means that the method requires at least one argument, and
+ * at most receives three (1+2) arguments. So, the format string must be
+ * followed by three variable references, which are to be assigned to captured
+ * arguments. For omitted arguments, variables are set to ::RUBY_Qnil. `NULL`
+ * can be put in place of a variable reference, which means the corresponding
+ * captured argument(s) should be just dropped.
+ *
+ * The number of given arguments, excluding an option hash or iterator block,
+ * is returned.
+ *
+ * @param[in] argc Length of `argv`.
+ * @param[in] argv Pointer to the arguments to parse.
+ * @param[in] fmt Format, in the language described above.
+ * @param[out] ... Variables to fill in.
+ * @exception rb_eFatal Malformed `fmt`.
+ * @exception rb_eArgError Arity mismatch.
+ * @return Actually parsed number of given arguments.
+ * @post Each values passed to `argv` is filled into the variadic
+ * arguments, according to the format.
+ */
+int rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...);
+
+RBIMPL_ATTR_NONNULL((3, 4))
+/**
+ * Identical to rb_scan_args(), except it also accepts `kw_splat`.
+ *
+ * @param[in] kw_splat How to understand the keyword arguments.
+ * - RB_SCAN_ARGS_PASS_CALLED_KEYWORDS: Same behaviour as rb_scan_args().
+ * - RB_SCAN_ARGS_KEYWORDS: The final argument is a kwarg.
+ * - RB_SCAN_ARGS_LAST_HASH_KEYWORDS: The final argument is a kwarg, iff it
+ * is a hash.
+ * @param[in] argc Length of `argv`.
+ * @param[in] argv Pointer to the arguments to parse.
+ * @param[in] fmt Format, in the language described above.
+ * @param[out] ... Variables to fill in.
+ * @exception rb_eFatal Malformed `fmt`.
+ * @exception rb_eArgError Arity mismatch.
+ * @return Actually parsed number of given arguments.
+ * @post Each values passed to `argv` is filled into the variadic
+ * arguments, according to the format.
+ */
+int rb_scan_args_kw(int kw_splat, int argc, const VALUE *argv, const char *fmt, ...);
+
+RBIMPL_ATTR_ERROR(("bad scan arg format"))
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_scan_args(). People don't use it
+ * directly.
+ */
+void rb_scan_args_bad_format(const char*);
+
+RBIMPL_ATTR_ERROR(("variable argument length doesn't match"))
+/**
+ * @private
+ *
+ * This is an implementation detail of rb_scan_args(). People don't use it
+ * directly.
+ */
+void rb_scan_args_length_mismatch(const char*,int);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/** @cond INTERNAL_MACRO */
+
+/* If we could use constexpr the following macros could be inline functions
+ * ... but sadly we cannot. */
+
+#define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10)
+
+#define rb_scan_args_count_end(fmt, ofs, vari) \
+ ((fmt)[ofs] ? -1 : (vari))
+
+#define rb_scan_args_count_block(fmt, ofs, vari) \
+ ((fmt)[ofs]!='&' ? \
+ rb_scan_args_count_end(fmt, ofs, vari) : \
+ rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1))
+
+#define rb_scan_args_count_hash(fmt, ofs, vari) \
+ ((fmt)[ofs]!=':' ? \
+ rb_scan_args_count_block(fmt, ofs, vari) : \
+ rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1))
+
+#define rb_scan_args_count_trail(fmt, ofs, vari) \
+ (!rb_scan_args_isdigit((fmt)[ofs]) ? \
+ rb_scan_args_count_hash(fmt, ofs, vari) : \
+ rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0')))
+
+#define rb_scan_args_count_var(fmt, ofs, vari) \
+ ((fmt)[ofs]!='*' ? \
+ rb_scan_args_count_trail(fmt, ofs, vari) : \
+ rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1))
+
+#define rb_scan_args_count_opt(fmt, ofs, vari) \
+ (!rb_scan_args_isdigit((fmt)[ofs]) ? \
+ rb_scan_args_count_var(fmt, ofs, vari) : \
+ rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
+
+#define rb_scan_args_count_lead(fmt, ofs, vari) \
+ (!rb_scan_args_isdigit((fmt)[ofs]) ? \
+ rb_scan_args_count_var(fmt, ofs, vari) : \
+ rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
+
+#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
+
+#if RBIMPL_HAS_ATTRIBUTE(diagnose_if)
+# /* Assertions done in the attribute. */
+# define rb_scan_args_verify(fmt, varc) RBIMPL_ASSERT_NOTHING
+#else
+# /* At one sight it _seems_ the expressions below could be written using
+# * static assertions. The reality is no, they don't. Because fmt is a
+# * string literal, any operations against fmt cannot produce the "integer
+# * constant expression"s, as defined in ISO/IEC 9899:2018 section 6.6
+# * paragraph #6. Static assertions need such integer constant expressions as
+# * defined in ISO/IEC 9899:2018 section 6.7.10 paragraph #3.
+# *
+# * GCC nonetheless constant-folds this into a no-op, though. */
+# define rb_scan_args_verify(fmt, varc) \
+ (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? \
+ rb_scan_args_bad_format(fmt) : \
+ sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? \
+ rb_scan_args_length_mismatch(fmt, varc) : \
+ RBIMPL_ASSERT_NOTHING)
+#endif
+
+static inline bool
+rb_scan_args_keyword_p(int kw_flag, VALUE last)
+{
+ switch (kw_flag) {
+ case RB_SCAN_ARGS_PASS_CALLED_KEYWORDS:
+ return !! rb_keyword_given_p();
+ case RB_SCAN_ARGS_KEYWORDS:
+ return true;
+ case RB_SCAN_ARGS_LAST_HASH_KEYWORDS:
+ return RB_TYPE_P(last, T_HASH);
+ default:
+ return false;
+ }
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static bool
+rb_scan_args_lead_p(const char *fmt)
+{
+ return rb_scan_args_isdigit(fmt[0]);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_n_lead(const char *fmt)
+{
+ return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static bool
+rb_scan_args_opt_p(const char *fmt)
+{
+ return (rb_scan_args_lead_p(fmt) && rb_scan_args_isdigit(fmt[1]));
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_n_opt(const char *fmt)
+{
+ return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_var_idx(const char *fmt)
+{
+ return (!rb_scan_args_lead_p(fmt) ? 0 : !rb_scan_args_isdigit(fmt[1]) ? 1 : 2);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static bool
+rb_scan_args_f_var(const char *fmt)
+{
+ return (fmt[rb_scan_args_var_idx(fmt)]=='*');
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_trail_idx(const char *fmt)
+{
+ const int idx = rb_scan_args_var_idx(fmt);
+ return idx+(fmt[idx]=='*');
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_n_trail(const char *fmt)
+{
+ const int idx = rb_scan_args_trail_idx(fmt);
+ return (rb_scan_args_isdigit(fmt[idx]) ? fmt[idx]-'0' : 0);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_hash_idx(const char *fmt)
+{
+ const int idx = rb_scan_args_trail_idx(fmt);
+ return idx+rb_scan_args_isdigit(fmt[idx]);
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static bool
+rb_scan_args_f_hash(const char *fmt)
+{
+ return (fmt[rb_scan_args_hash_idx(fmt)]==':');
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_block_idx(const char *fmt)
+{
+ const int idx = rb_scan_args_hash_idx(fmt);
+ return idx+(fmt[idx]==':');
+}
+
+RBIMPL_ATTR_FORCEINLINE()
+static bool
+rb_scan_args_f_block(const char *fmt)
+{
+ return (fmt[rb_scan_args_block_idx(fmt)]=='&');
+}
+
+# if 0
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_end_idx(const char *fmt)
+{
+ const int idx = rb_scan_args_block_idx(fmt);
+ return idx+(fmt[idx]=='&');
+}
+# endif
+
+/* NOTE: Use `char *fmt` instead of `const char *fmt` because of clang's bug*/
+/* https://bugs.llvm.org/show_bug.cgi?id=38095 */
+# define rb_scan_args0(argc, argv, fmt, varc, vars) \
+ rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, \
+ rb_scan_args_n_lead(fmt), \
+ rb_scan_args_n_opt(fmt), \
+ rb_scan_args_n_trail(fmt), \
+ rb_scan_args_f_var(fmt), \
+ rb_scan_args_f_hash(fmt), \
+ rb_scan_args_f_block(fmt), \
+ (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
+# define rb_scan_args_kw0(kw_flag, argc, argv, fmt, varc, vars) \
+ rb_scan_args_set(kw_flag, argc, argv, \
+ rb_scan_args_n_lead(fmt), \
+ rb_scan_args_n_opt(fmt), \
+ rb_scan_args_n_trail(fmt), \
+ rb_scan_args_f_var(fmt), \
+ rb_scan_args_f_hash(fmt), \
+ rb_scan_args_f_block(fmt), \
+ (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
+
+RBIMPL_ATTR_FORCEINLINE()
+static int
+rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
+ int n_lead, int n_opt, int n_trail,
+ bool f_var, bool f_hash, bool f_block,
+ VALUE *vars[], RB_UNUSED_VAR(const char *fmt), RB_UNUSED_VAR(int varc))
+ RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) < 0, "bad scan arg format", "error")
+ RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) != varc, "variable argument length doesn't match", "error")
+{
+ int i, argi = 0, vari = 0;
+ VALUE *var, hash = Qnil;
+#define rb_scan_args_next_param() vars[vari++]
+ const int n_mand = n_lead + n_trail;
+
+ /* capture an option hash - phase 1: pop from the argv */
+ if (f_hash && argc > 0) {
+ VALUE last = argv[argc - 1];
+ if (rb_scan_args_keyword_p(kw_flag, last)) {
+ hash = rb_hash_dup(last);
+ argc--;
+ }
+ }
+
+ if (argc < n_mand) {
+ goto argc_error;
+ }
+
+ /* capture leading mandatory arguments */
+ for (i = 0; i < n_lead; i++) {
+ var = rb_scan_args_next_param();
+ if (var) *var = argv[argi];
+ argi++;
+ }
+
+ /* capture optional arguments */
+ for (i = 0; i < n_opt; i++) {
+ var = rb_scan_args_next_param();
+ if (argi < argc - n_trail) {
+ if (var) *var = argv[argi];
+ argi++;
+ }
+ else {
+ if (var) *var = Qnil;
+ }
+ }
+
+ /* capture variable length arguments */
+ if (f_var) {
+ int n_var = argc - argi - n_trail;
+
+ var = rb_scan_args_next_param();
+ if (0 < n_var) {
+ if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]);
+ argi += n_var;
+ }
+ else {
+ if (var) *var = rb_ary_new();
+ }
+ }
+
+ /* capture trailing mandatory arguments */
+ for (i = 0; i < n_trail; i++) {
+ var = rb_scan_args_next_param();
+ if (var) *var = argv[argi];
+ argi++;
+ }
+
+ /* capture an option hash - phase 2: assignment */
+ if (f_hash) {
+ var = rb_scan_args_next_param();
+ if (var) *var = hash;
+ }
+
+ /* capture iterator block */
+ if (f_block) {
+ var = rb_scan_args_next_param();
+ if (rb_block_given_p()) {
+ *var = rb_block_proc();
+ }
+ else {
+ *var = Qnil;
+ }
+ }
+
+ if (argi == argc) {
+ return argc;
+ }
+
+ argc_error:
+ rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt);
+ UNREACHABLE_RETURN(-1);
+#undef rb_scan_args_next_param
+}
+
+/** @endcond */
+
+#if defined(__DOXYGEN__)
+# /* don't bother */
+
+#elif ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
+# /* skip */
+
+#elif ! defined(HAVE_VA_ARGS_MACRO)
+# /* skip */
+
+#elif ! defined(__OPTIMIZE__)
+# /* skip */
+
+#elif defined(HAVE___VA_OPT__)
+# define rb_scan_args(argc, argvp, fmt, ...) \
+ __builtin_choose_expr( \
+ __builtin_constant_p(fmt), \
+ rb_scan_args0( \
+ argc, argvp, fmt, \
+ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \
+ ((VALUE*[]){__VA_ARGS__})), \
+ (rb_scan_args)(argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
+# define rb_scan_args_kw(kw_flag, argc, argvp, fmt, ...) \
+ __builtin_choose_expr( \
+ __builtin_constant_p(fmt), \
+ rb_scan_args_kw0( \
+ kw_flag, argc, argvp, fmt, \
+ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \
+ ((VALUE*[]){__VA_ARGS__})), \
+ (rb_scan_args_kw)(kw_flag, argc, argvp, fmt __VA_OPT__(, __VA_ARGS__)))
+
+#elif defined(__STRICT_ANSI__)
+# /* skip */
+
+#elif defined(__GNUC__)
+# define rb_scan_args(argc, argvp, fmt, ...) \
+ __builtin_choose_expr( \
+ __builtin_constant_p(fmt), \
+ rb_scan_args0( \
+ argc, argvp, fmt, \
+ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \
+ ((VALUE*[]){__VA_ARGS__})), \
+ (rb_scan_args)(argc, argvp, fmt, __VA_ARGS__))
+# define rb_scan_args_kw(kw_flag, argc, argvp, fmt, ...) \
+ __builtin_choose_expr( \
+ __builtin_constant_p(fmt), \
+ rb_scan_args_kw0( \
+ kw_flag, argc, argvp, fmt, \
+ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \
+ ((VALUE*[]){__VA_ARGS__})), \
+ (rb_scan_args_kw)(kw_flag, argc, argvp, fmt, __VA_ARGS__ /**/))
+#endif
+
+#endif /* RBIMPL_SCAN_ARGS_H */
diff --git a/include/ruby/internal/special_consts.h b/include/ruby/internal/special_consts.h
new file mode 100644
index 0000000000..dc0a6b41d6
--- /dev/null
+++ b/include/ruby/internal/special_consts.h
@@ -0,0 +1,362 @@
+#ifndef RBIMPL_SPECIAL_CONSTS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SPECIAL_CONSTS_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines enum ::ruby_special_consts.
+ * @see Sasada, K., "A Lightweight Representation of Floating-Point
+ * Numbers on Ruby Interpreter", in proceedings of 10th JSSST
+ * SIGPPL Workshop on Programming and Programming Languages
+ * (PPL2008), pp. 9-16, 2008.
+ */
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/constexpr.h"
+#include "ruby/internal/attr/enum_extensibility.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+
+/**
+ * @private
+ * @warning Do not touch this macro.
+ * @warning It is an implementation detail.
+ * @warning The value of this macro must match for ruby itself and all
+ * extension libraries, otherwise serious memory corruption shall
+ * occur.
+ */
+#if defined(USE_FLONUM)
+# /* Take that. */
+#elif SIZEOF_VALUE >= SIZEOF_DOUBLE
+# define USE_FLONUM 1
+#else
+# define USE_FLONUM 0
+#endif
+
+/** This is an old name of #RB_TEST. Not sure which name is preferred. */
+#define RTEST RB_TEST
+
+#define FIXNUM_P RB_FIXNUM_P /**< @old{RB_FIXNUM_P} */
+#define IMMEDIATE_P RB_IMMEDIATE_P /**< @old{RB_IMMEDIATE_P} */
+#define NIL_P RB_NIL_P /**< @old{RB_NIL_P} */
+#define SPECIAL_CONST_P RB_SPECIAL_CONST_P /**< @old{RB_SPECIAL_CONST_P} */
+#define STATIC_SYM_P RB_STATIC_SYM_P /**< @old{RB_STATIC_SYM_P} */
+
+#define Qfalse RUBY_Qfalse /**< @old{RUBY_Qfalse} */
+#define Qnil RUBY_Qnil /**< @old{RUBY_Qnil} */
+#define Qtrue RUBY_Qtrue /**< @old{RUBY_Qtrue} */
+#define Qundef RUBY_Qundef /**< @old{RUBY_Qundef} */
+
+#define FIXNUM_FLAG RUBY_FIXNUM_FLAG /**< @old{RUBY_FIXNUM_FLAG} */
+#define FLONUM_FLAG RUBY_FLONUM_FLAG /**< @old{RUBY_FLONUM_FLAG} */
+#define FLONUM_MASK RUBY_FLONUM_MASK /**< @old{RUBY_FLONUM_MASK} */
+#define FLONUM_P RB_FLONUM_P /**< @old{RB_FLONUM_P} */
+#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK /**< @old{RUBY_IMMEDIATE_MASK} */
+#define SYMBOL_FLAG RUBY_SYMBOL_FLAG /**< @old{RUBY_SYMBOL_FLAG} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_FIXNUM_P RB_FIXNUM_P
+#define RB_FLONUM_P RB_FLONUM_P
+#define RB_IMMEDIATE_P RB_IMMEDIATE_P
+#define RB_NIL_P RB_NIL_P
+#define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P
+#define RB_STATIC_SYM_P RB_STATIC_SYM_P
+#define RB_TEST RB_TEST
+#define RB_UNDEF_P RB_UNDEF_P
+#define RB_NIL_OR_UNDEF_P RB_NIL_OR_UNDEF_P
+/** @endcond */
+
+/** special constants - i.e. non-zero and non-fixnum constants */
+enum
+RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed)
+ruby_special_consts {
+#if defined(__DOXYGEN__)
+ RUBY_Qfalse, /**< @see ::rb_cFalseClass */
+ RUBY_Qtrue, /**< @see ::rb_cTrueClass */
+ RUBY_Qnil, /**< @see ::rb_cNilClass */
+ RUBY_Qundef, /**< Represents so-called undef. */
+ RUBY_IMMEDIATE_MASK, /**< Bit mask detecting special consts. */
+ RUBY_FIXNUM_FLAG, /**< Flag to denote a fixnum. */
+ RUBY_FLONUM_MASK, /**< Bit mask detecting a flonum. */
+ RUBY_FLONUM_FLAG, /**< Flag to denote a flonum. */
+ RUBY_SYMBOL_FLAG, /**< Flag to denote a static symbol. */
+#elif USE_FLONUM
+ RUBY_Qfalse = 0x00, /* ...0000 0000 */
+ RUBY_Qnil = 0x04, /* ...0000 0100 */
+ RUBY_Qtrue = 0x14, /* ...0001 0100 */
+ RUBY_Qundef = 0x24, /* ...0010 0100 */
+ RUBY_IMMEDIATE_MASK = 0x07, /* ...0000 0111 */
+ RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */
+ RUBY_FLONUM_MASK = 0x03, /* ...0000 0011 */
+ RUBY_FLONUM_FLAG = 0x02, /* ...xxxx xx10 */
+ RUBY_SYMBOL_FLAG = 0x0c, /* ...xxxx 1100 */
+#else
+ RUBY_Qfalse = 0x00, /* ...0000 0000 */
+ RUBY_Qnil = 0x02, /* ...0000 0010 */
+ RUBY_Qtrue = 0x06, /* ...0000 0110 */
+ RUBY_Qundef = 0x0a, /* ...0000 1010 */
+ RUBY_IMMEDIATE_MASK = 0x03, /* ...0000 0011 */
+ RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */
+ RUBY_FLONUM_MASK = 0x00, /* any values ANDed with FLONUM_MASK cannot be FLONUM_FLAG */
+ RUBY_FLONUM_FLAG = 0x02, /* ...0000 0010 */
+ RUBY_SYMBOL_FLAG = 0x0e, /* ...xxxx 1110 */
+#endif
+
+ RUBY_SPECIAL_SHIFT = 8 /**< Least significant 8 bits are reserved. */
+};
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Emulates Ruby's "if" statement.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval false `obj` is either ::RUBY_Qfalse or ::RUBY_Qnil.
+ * @retval true Anything else.
+ *
+ * @internal
+ *
+ * It HAS to be `__attribute__((const))` in order for clang to properly deduce
+ * `__builtin_assume()`.
+ */
+static inline bool
+RB_TEST(VALUE obj)
+{
+ /*
+ * if USE_FLONUM
+ * Qfalse: ....0000 0000
+ * Qnil: ....0000 0100
+ * ~Qnil: ....1111 1011
+ * v ....xxxx xxxx
+ * ----------------------------
+ * RTEST(v) ....xxxx x0xx
+ *
+ * if ! USE_FLONUM
+ * Qfalse: ....0000 0000
+ * Qnil: ....0000 0010
+ * ~Qnil: ....1111 1101
+ * v ....xxxx xxxx
+ * ----------------------------
+ * RTEST(v) ....xxxx xx0x
+ *
+ * RTEST(v) can be 0 if and only if (v == Qfalse || v == Qnil).
+ */
+ return obj & ~RUBY_Qnil;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is nil.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is ::RUBY_Qnil.
+ * @retval false Anything else.
+ */
+static inline bool
+RB_NIL_P(VALUE obj)
+{
+ return obj == RUBY_Qnil;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is undef.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is ::RUBY_Qundef.
+ * @retval false Anything else.
+ */
+static inline bool
+RB_UNDEF_P(VALUE obj)
+{
+ return obj == RUBY_Qundef;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is nil or undef. Can be used to see if
+ * a keyword argument is not given or given `nil`.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is ::RUBY_Qnil or ::RUBY_Qundef.
+ * @retval false Anything else.
+ */
+static inline bool
+RB_NIL_OR_UNDEF_P(VALUE obj)
+{
+ /*
+ * if USE_FLONUM
+ * Qundef: ....0010 0100
+ * Qnil: ....0000 0100
+ * mask: ....1101 1111
+ * common_bits: ....0000 0100
+ * ---------------------------------
+ * Qnil & mask ....0000 0100
+ * Qundef & mask ....0000 0100
+ *
+ * if ! USE_FLONUM
+ * Qundef: ....0000 1010
+ * Qnil: ....0000 0010
+ * mask: ....1111 0111
+ * common_bits: ....0000 0010
+ * ----------------------------
+ * Qnil & mask ....0000 0010
+ * Qundef & mask ....0000 0010
+ *
+ * NIL_OR_UNDEF_P(v) can be true only when v is Qundef or Qnil.
+ */
+ const VALUE mask = ~(RUBY_Qundef ^ RUBY_Qnil);
+ const VALUE common_bits = RUBY_Qundef & RUBY_Qnil;
+ return (obj & mask) == common_bits;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is a so-called Fixnum.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is a Fixnum.
+ * @retval false Anything else.
+ * @note Fixnum was a thing in the 20th century, but it is rather an
+ * implementation detail today.
+ */
+static inline bool
+RB_FIXNUM_P(VALUE obj)
+{
+ return obj & RUBY_FIXNUM_FLAG;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is a static symbol.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is a static symbol
+ * @retval false Anything else.
+ * @see RB_DYNAMIC_SYM_P()
+ * @see RB_SYMBOL_P()
+ * @note These days there are static and dynamic symbols, just like we
+ * once had Fixnum/Bignum back in the old days.
+ */
+static inline bool
+RB_STATIC_SYM_P(VALUE obj)
+{
+ RBIMPL_ATTR_CONSTEXPR(CXX14)
+ const VALUE mask = ~(RBIMPL_VALUE_FULL << RUBY_SPECIAL_SHIFT);
+ return (obj & mask) == RUBY_SYMBOL_FLAG;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is a so-called Flonum.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is a Flonum.
+ * @retval false Anything else.
+ * @see RB_FLOAT_TYPE_P()
+ * @note These days there are Flonums and non-Flonum floats, just like we
+ * once had Fixnum/Bignum back in the old days.
+ */
+static inline bool
+RB_FLONUM_P(VALUE obj)
+{
+#if USE_FLONUM
+ return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG;
+#else
+ return false;
+#endif
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is an immediate i.e. an object which has no
+ * corresponding storage inside of the object space.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is a Flonum.
+ * @retval false Anything else.
+ * @see RB_FLOAT_TYPE_P()
+ * @note The concept of "immediate" is purely C specific.
+ */
+static inline bool
+RB_IMMEDIATE_P(VALUE obj)
+{
+ return obj & RUBY_IMMEDIATE_MASK;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Checks if the given object is of enum ::ruby_special_consts.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval true `obj` is a special constant.
+ * @retval false Anything else.
+ */
+static inline bool
+RB_SPECIAL_CONST_P(VALUE obj)
+{
+ return RB_IMMEDIATE_P(obj) || obj == RUBY_Qfalse;
+}
+
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+/**
+ * Identical to RB_SPECIAL_CONST_P, except it returns a ::VALUE.
+ *
+ * @param[in] obj An arbitrary ruby object.
+ * @retval RUBY_Qtrue `obj` is a special constant.
+ * @retval RUBY_Qfalse Anything else.
+ *
+ * @internal
+ *
+ * This function is to mimic old rb_special_const_p macro but have anyone
+ * actually used its return value? Wasn't it just something no one needed?
+ */
+static inline VALUE
+rb_special_const_p(VALUE obj)
+{
+ return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
+}
+
+/**
+ * @cond INTERNAL_MACRO
+ * See [ruby-dev:27513] for the following macros.
+ */
+#define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse)
+#define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue)
+#define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil)
+#define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef)
+/** @endcond */
+
+#endif /* RBIMPL_SPECIAL_CONSTS_H */
diff --git a/include/ruby/internal/static_assert.h b/include/ruby/internal/static_assert.h
new file mode 100644
index 0000000000..594c2b2917
--- /dev/null
+++ b/include/ruby/internal/static_assert.h
@@ -0,0 +1,77 @@
+#ifndef RBIMPL_STATIC_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STATIC_ASSERT_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_STATIC_ASSERT.
+ */
+#include <assert.h>
+#include "ruby/internal/has/extension.h"
+#include "ruby/internal/compiler_since.h"
+
+/** @cond INTERNAL_MACRO */
+#if defined(__cplusplus) && defined(__cpp_static_assert)
+# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
+# define RBIMPL_STATIC_ASSERT0 static_assert
+
+#elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0)
+# define RBIMPL_STATIC_ASSERT0 static_assert
+
+#elif defined(__INTEL_CXX11_MODE__)
+# define RBIMPL_STATIC_ASSERT0 static_assert
+
+#elif defined(__cplusplus) && __cplusplus >= 201103L
+# define RBIMPL_STATIC_ASSERT0 static_assert
+
+#elif defined(__cplusplus) && RBIMPL_HAS_EXTENSION(cxx_static_assert)
+# define RBIMPL_STATIC_ASSERT0 __extension__ static_assert
+
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
+# define RBIMPL_STATIC_ASSERT0 __extension__ static_assert
+
+#elif defined(__STDC_VERSION__) && RBIMPL_HAS_EXTENSION(c_static_assert)
+# define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
+
+#elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
+
+#elif defined(static_assert)
+# /* Take <assert.h> definition */
+# define RBIMPL_STATIC_ASSERT0 static_assert
+#endif
+/** @endcond */
+
+/**
+ * @brief Wraps (or simulates) `static_assert`
+ * @param name Valid C/C++ identifier, describing the assertion.
+ * @param expr Expression to assert.
+ * @note `name` shall not be a string literal.
+ */
+#if defined(__DOXYGEN__)
+# define RBIMPL_STATIC_ASSERT static_assert
+
+#elif defined(RBIMPL_STATIC_ASSERT0)
+# define RBIMPL_STATIC_ASSERT(name, expr) \
+ RBIMPL_STATIC_ASSERT0(expr, # name ": " # expr)
+
+#else
+# define RBIMPL_STATIC_ASSERT(name, expr) \
+ typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
+#endif
+
+#endif /* RBIMPL_STATIC_ASSERT_H */
diff --git a/include/ruby/internal/stdalign.h b/include/ruby/internal/stdalign.h
new file mode 100644
index 0000000000..ec68f6a882
--- /dev/null
+++ b/include/ruby/internal/stdalign.h
@@ -0,0 +1,135 @@
+#ifndef RBIMPL_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STDALIGN_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_ALIGNAS / #RBIMPL_ALIGNOF
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#include "ruby/internal/compiler_is.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+#include "ruby/internal/has/feature.h"
+
+/**
+ * Wraps (or simulates) `alignas`. This is C++11's `alignas` and is _different_
+ * from C11 `_Alignas`. For instance,
+ *
+ * ```CXX
+ * typedef struct alignas(128) foo { int foo } foo;
+ * ```
+ *
+ * is a valid C++ while
+ *
+ * ```C
+ * typedef struct _Alignas(128) foo { int foo } foo;
+ * ```
+ *
+ * is an invalid C because:
+ *
+ * - You cannot `struct _Alignas`.
+ * - A `typedef` cannot have alignments.
+ */
+#if defined(__cplusplus) && RBIMPL_HAS_FEATURE(cxx_alignas)
+# define RBIMPL_ALIGNAS alignas
+
+#elif defined(__cplusplus) && (__cplusplus >= 201103L)
+# define RBIMPL_ALIGNAS alignas
+
+#elif defined(__INTEL_CXX11_MODE__)
+# define RBIMPL_ALIGNAS alignas
+
+#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define RBIMPL_ALIGNAS alignas
+
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(align)
+# define RBIMPL_ALIGNAS(_) __declspec(align(_))
+
+#elif RBIMPL_HAS_ATTRIBUTE(aligned)
+# define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_)))
+
+#else
+# define RBIMPL_ALIGNAS(_) /* void */
+#endif
+
+/**
+ * Wraps (or simulates) `alignof`.
+ *
+ * We want C11's `_Alignof`. However in spite of its clear language, compilers
+ * (including GCC and clang) tend to have buggy implementations. We have to
+ * avoid such things to resort to our own version.
+ *
+ * @see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
+ * @see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560
+ * @see https://bugs.llvm.org/show_bug.cgi?id=26547
+ */
+#if defined(__DOXYGEN__)
+# define RBIMPL_ALIGNOF alignof
+#elif defined(__cplusplus)
+# /* C++11 `alignof()` can be buggy. */
+# /* see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 */
+# /* But don't worry, we can use templates. */
+# define RBIMPL_ALIGNOF(T) (static_cast<size_t>(ruby::rbimpl_alignof<T>::value))
+
+namespace ruby {
+template<typename T>
+struct rbimpl_alignof {
+ typedef struct {
+ char _;
+ T t;
+ } type;
+
+ enum {
+ value = offsetof(type, t)
+ };
+};
+}
+
+#elif RBIMPL_COMPILER_IS(MSVC)
+# /* Windows have no alignment glitch.*/
+# define RBIMPL_ALIGNOF __alignof
+
+#elif defined(HAVE__ALIGNOF)
+# /* Autoconf detected availability of a sane `_Alignof()`. */
+# define RBIMPL_ALIGNOF(T) RB_GNUC_EXTENSION(_Alignof(T))
+
+#else
+# /* :BEWARE: This is the last resort. If your compiler somehow supports
+# * querying the alignment of a type, you definitely should use that instead.
+# * There are 2 known pitfalls for this fallback implementation:
+# *
+# * First, it is either an undefined behaviour (C) or an explicit error (C++)
+# * to define a struct inside of `offsetof`. C compilers tend to accept such
+# * things, but AFAIK C++ has no room to allow.
+# *
+# * Second, there exist T such that `struct { char _; T t; }` is invalid. A
+# * known example is when T is a struct with a flexible array member. Such
+# * struct cannot be enclosed into another one.
+# */
+# /* see: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2083.htm */
+# /* see: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm */
+# define RBIMPL_ALIGNOF(T) offsetof(struct { char _; T t; }, t)
+
+#endif
+
+#endif /* RBIMPL_STDALIGN_H */
diff --git a/include/ruby/internal/stdbool.h b/include/ruby/internal/stdbool.h
new file mode 100644
index 0000000000..1ca61136ba
--- /dev/null
+++ b/include/ruby/internal/stdbool.h
@@ -0,0 +1,51 @@
+#ifndef RBIMPL_STDBOOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STDBOOL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief C99 shim for <stdbool.h>
+ */
+#include "ruby/internal/config.h"
+
+#if defined(__bool_true_false_are_defined)
+# /* Take that. */
+
+#elif defined(__cplusplus)
+# /* bool is a keyword in C++. */
+# if defined(HAVE_STDBOOL_H) && (__cplusplus >= 201103L)
+# include <cstdbool>
+# endif
+#
+# ifndef __bool_true_false_are_defined
+# define __bool_true_false_are_defined
+# endif
+
+#elif defined(HAVE_STDBOOL_H)
+# /* Take stdbool.h definition. */
+# include <stdbool.h>
+
+#elif !defined(HAVE__BOOL)
+typedef unsigned char _Bool;
+# /* See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2229.htm */
+# define bool _Bool
+# define true ((_Bool)+1)
+# define false ((_Bool)+0)
+# define __bool_true_false_are_defined
+#endif
+
+#endif /* RBIMPL_STDBOOL_H */
diff --git a/include/ruby/internal/symbol.h b/include/ruby/internal/symbol.h
new file mode 100644
index 0000000000..869a31115c
--- /dev/null
+++ b/include/ruby/internal/symbol.h
@@ -0,0 +1,332 @@
+#ifndef RBIMPL_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SYMBOL_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #rb_intern
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/constant_p.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/has/builtin.h"
+#include "ruby/internal/value.h"
+
+#define RB_ID2SYM rb_id2sym /**< @alias{rb_id2sym} */
+#define RB_SYM2ID rb_sym2id /**< @alias{rb_sym2id} */
+#define ID2SYM RB_ID2SYM /**< @old{RB_ID2SYM} */
+#define SYM2ID RB_SYM2ID /**< @old{RB_SYM2ID} */
+#define CONST_ID_CACHE RUBY_CONST_ID_CACHE /**< @old{RUBY_CONST_ID_CACHE} */
+#define CONST_ID RUBY_CONST_ID /**< @old{RUBY_CONST_ID} */
+
+/** @cond INTERNAL_MACRO */
+#define rb_intern_const rb_intern_const
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Converts an instance of ::rb_cSymbol into an ::ID.
+ *
+ * @param[in] obj An instance of ::rb_cSymbol.
+ * @exception rb_eTypeError `obj` is not an instance of ::rb_cSymbol.
+ * @return An ::ID of the identical symbol.
+ */
+ID rb_sym2id(VALUE obj);
+
+/**
+ * Allocates an instance of ::rb_cSymbol that has the given id.
+ *
+ * @param[in] id An id.
+ * @retval RUBY_Qfalse No such id ever existed in the history.
+ * @retval Otherwise An allocated ::rb_cSymbol instance.
+ */
+VALUE rb_id2sym(ID id);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Finds or creates a symbol of the given name.
+ *
+ * @param[in] name The name of the id.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given name.
+ * @note These days Ruby internally has two kinds of symbols (static /
+ * dynamic). Symbols created using this function would become a
+ * static one; i.e. would never be garbage collected. It is up to
+ * you to avoid memory leaks. Think twice before using it.
+ */
+ID rb_intern(const char *name);
+
+/**
+ * Identical to rb_intern(), except it additionally takes the length of the
+ * string. This way you can have a symbol that contains NUL characters.
+ *
+ * @param[in] name The name of the id.
+ * @param[in] len Length of `name`.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given name.
+ * @note These days Ruby internally has two kinds of symbols
+ * (static/dynamic). Symbols created using this function would
+ * become static ones; i.e. would never be garbage collected. It
+ * is up to you to avoid memory leaks. Think twice before using
+ * it.
+ */
+ID rb_intern2(const char *name, long len);
+
+/**
+ * Identical to rb_intern(), except it takes an instance of ::rb_cString.
+ *
+ * @param[in] str The name of the id.
+ * @pre `str` must either be an instance of ::rb_cSymbol, or an instance
+ * of ::rb_cString, or responds to `#to_str` method.
+ * @exception rb_eTypeError Can't convert `str` into ::rb_cString.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given str.
+ * @note These days Ruby internally has two kinds of symbols
+ * (static/dynamic). Symbols created using this function would
+ * become static ones; i.e. would never be garbage collected. It
+ * is up to you to avoid memory leaks. Think twice before using
+ * it.
+ */
+ID rb_intern_str(VALUE str);
+
+/**
+ * Retrieves the name mapped to the given id.
+ *
+ * @param[in] id An id to query.
+ * @retval NULL No such id ever existed in the history.
+ * @retval otherwise A name that the id represents.
+ * @note The return value is managed by the interpreter. Don't pass it
+ * to free().
+ */
+const char *rb_id2name(ID id);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Detects if the given name is already interned or not. It first tries to
+ * convert the argument to an instance of ::rb_cString if it is neither an
+ * instance of ::rb_cString nor ::rb_cSymbol. The conversion result is written
+ * back to the variable. Then queries if that name was already interned
+ * before. If found it returns such id, otherwise zero.
+ *
+ * We eventually introduced this API to avoid inadvertent symbol pin-down.
+ * Before, there was no way to know if an ID was already interned or not
+ * without actually creating one (== leaking memory). By using this API you
+ * can avoid such situations:
+ *
+ * ```CXX
+ * bool does_interning_this_leak_memory(VALUE obj)
+ * {
+ * auto tmp = obj;
+ * if (auto id = rb_check_id(&tmp); id) {
+ * return false;
+ * }
+ * else {
+ * return true; // Let GC sweep tmp if necessary.
+ * }
+ * }
+ * ```
+ *
+ * @param[in,out] namep A pointer to a name to query.
+ * @pre The object referred by `*namep` must either be an instance
+ * of ::rb_cSymbol, or an instance of ::rb_cString, or responds
+ * to `#to_str` method.
+ * @exception rb_eTypeError Can't convert `*namep` into ::rb_cString.
+ * @exception rb_eEncodingError Given string is non-ASCII.
+ * @retval 0 No such id ever existed in the history.
+ * @retval otherwise The id that represents the given name.
+ * @post The object that `*namep` points to is a converted result
+ * object, which is always an instance of either ::rb_cSymbol
+ * or ::rb_cString.
+ * @see https://bugs.ruby-lang.org/issues/5072
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know why this has to raise rb_eEncodingError.
+ */
+ID rb_check_id(volatile VALUE *namep);
+
+/**
+ * @copydoc rb_intern_str()
+ *
+ * @internal
+ *
+ * :FIXME: Can anyone tell us what is the difference between this one and
+ * rb_intern_str()? As far as @shyouhei reads the implementation it seems what
+ * rb_to_id() does is is just waste some CPU time, then call rb_intern_str().
+ * He hopes he is wrong.
+ */
+ID rb_to_id(VALUE str);
+
+/**
+ * Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
+ *
+ * @param[in] id An id to query.
+ * @retval RUBY_Qfalse No such id ever existed in the history.
+ * @retval otherwise An instance of ::rb_cString with the name of id.
+ *
+ * @internal
+ *
+ * In reality "rb_id2str() is identical to rb_id2name() except it returns Ruby
+ * string" is just describing things upside down; truth is `rb_id2name(foo)` is
+ * a shorthand of `RSTRING_PTR(rb_id2str(foo))`.
+ */
+VALUE rb_id2str(ID id);
+
+/**
+ * Identical to rb_id2str(), except it takes an instance of ::rb_cSymbol rather
+ * than an ::ID.
+ *
+ * @param[in] id An id to query.
+ * @retval RUBY_Qfalse No such id ever existed in the history.
+ * @retval otherwise An instance of ::rb_cString with the name of id.
+ */
+VALUE rb_sym2str(VALUE id);
+
+/**
+ * Identical to rb_intern_str(), except it generates a dynamic symbol if
+ * necessary.
+ *
+ * @param[in] name The name of the id.
+ * @pre `name` must either be an instance of ::rb_cSymbol, or an
+ * instance of ::rb_cString, or responds to `#to_str` method.
+ * @exception rb_eTypeError Can't convert `name` into ::rb_cString.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given name.
+ * @note These days Ruby internally has two kinds of symbols
+ * (static/dynamic). Symbols created using this function would
+ * become dynamic ones; i.e. would be garbage collected. It could
+ * be safer for you to use it than alternatives, when applicable.
+ */
+VALUE rb_to_symbol(VALUE name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_check_id(), except it returns an instance of ::rb_cSymbol
+ * instead.
+ *
+ * @param[in,out] namep A pointer to a name to query.
+ * @pre The object referred by `*namep` must either be an instance
+ * of ::rb_cSymbol, or an instance of ::rb_cString, or responds
+ * to `#to_str` method.
+ * @exception rb_eTypeError Can't convert `*namep` into ::rb_cString.
+ * @exception rb_eEncodingError Given string is non-ASCII.
+ * @retval RUBY_Qnil No such id ever existed in the history.
+ * @retval otherwise The id that represents the given name.
+ * @post The object that `*namep` points to is a converted result
+ * object, which is always an instance of either ::rb_cSymbol
+ * or ::rb_cString.
+ * @see https://bugs.ruby-lang.org/issues/5072
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know why this has to raise rb_eEncodingError.
+ */
+VALUE rb_check_symbol(volatile VALUE *namep);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is a "tiny optimisation" over rb_intern(). If you pass a string
+ * _literal_, and if your C compiler can special-case strlen of such literal to
+ * strength-reduce into an integer constant expression, then this inline
+ * function can precalc a part of conversion.
+ *
+ * @note This function also works happily for non-constant strings. Why
+ * bother then? Just apply liberally to everything.
+ * @note But #rb_intern() could be faster on compilers with statement
+ * expressions, because they can cache the created ::ID.
+ * @param[in] str The name of the id.
+ * @exception rb_eRuntimeError Too many symbols.
+ * @return A (possibly new) id whose value is the given str.
+ * @note These days Ruby internally has two kinds of symbols (static /
+ * dynamic). Symbols created using this function would become a
+ * static one; i.e. would never be garbage collected. It is up to
+ * you to avoid memory leaks. Think twice before using it.
+ */
+static inline ID
+rb_intern_const(const char *str)
+{
+ size_t len = strlen(str);
+ return rb_intern2(str, RBIMPL_CAST((long)len));
+}
+
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * @private
+ *
+ * This is an implementation detail of #rb_intern(). Just don't use it.
+ */
+static inline ID
+rbimpl_intern_const(ID *ptr, const char *str)
+{
+ while (! *ptr) {
+ *ptr = rb_intern_const(str);
+ }
+
+ return *ptr;
+}
+
+/**
+ * Old implementation detail of rb_intern().
+ * @deprecated Does anyone use it? Preserved for backward compat.
+ */
+#define RUBY_CONST_ID_CACHE(result, str) \
+ { \
+ static ID rb_intern_id_cache; \
+ rbimpl_intern_const(&rb_intern_id_cache, (str)); \
+ result rb_intern_id_cache; \
+ }
+
+/**
+ * Old implementation detail of rb_intern().
+ * @deprecated Does anyone use it? Preserved for backward compat.
+ */
+#define RUBY_CONST_ID(var, str) \
+ do { \
+ static ID rbimpl_id; \
+ (var) = rbimpl_intern_const(&rbimpl_id, (str)); \
+ } while (0)
+
+#if defined(HAVE_STMT_AND_DECL_IN_EXPR)
+/* __builtin_constant_p and statement expression is available
+ * since gcc-2.7.2.3 at least. */
+#define rb_intern(str) \
+ (RBIMPL_CONSTANT_P(str) ? \
+ __extension__ ({ \
+ static ID rbimpl_id; \
+ rbimpl_intern_const(&rbimpl_id, (str)); \
+ }) : \
+ (rb_intern)(str))
+#endif
+
+#endif /* RBIMPL_SYMBOL_H */
diff --git a/include/ruby/internal/value.h b/include/ruby/internal/value.h
new file mode 100644
index 0000000000..805cd83513
--- /dev/null
+++ b/include/ruby/internal/value.h
@@ -0,0 +1,133 @@
+#ifndef RBIMPL_VALUE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VALUE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines ::VALUE and ::ID.
+ */
+#include "ruby/internal/static_assert.h"
+#include "ruby/backward/2/long_long.h"
+#include "ruby/backward/2/limits.h"
+
+#if defined(__DOXYGEN__)
+
+/**
+ * Type that represents a Ruby object. It is an unsigned integer of some kind,
+ * depending on platforms.
+ *
+ * ```CXX
+ * VALUE value = rb_eval_string("ARGF.readlines.map.with_index");
+ * ```
+ *
+ * @warning ::VALUE is not a pointer.
+ * @warning ::VALUE can be wider than `long`.
+ */
+typedef uintptr_t VALUE;
+
+/**
+ * Type that represents a Ruby identifier such as a variable name.
+ *
+ * ```CXX
+ * ID method = rb_intern("method");
+ * VALUE result = rb_funcall(obj, method, 0);
+ * ```
+ *
+ * @note ::rb_cSymbol is a Ruby-level data type for the same thing.
+ */
+typedef uintptr_t ID;
+
+/**
+ * A signed integer type that has the same width with ::VALUE.
+ *
+ * @internal
+ *
+ * @shyouhei wonders: is it guaranteed that `uintptr_t` and `intptr_t` are the
+ * same width? As far as I read ISO/IEC 9899:2018 section 7.20.1.4 paragraph 1
+ * no such description is given... or defined elsewhere?
+ */
+typedef intptr_t SIGNED_VALUE;
+
+/**
+ * Identical to `sizeof(VALUE)`, except it is a macro that can also be used
+ * inside of preprocessor directives such as `#if`. Handy on occasions.
+ */
+#define SIZEOF_VALUE SIZEOF_UINTPTR_T
+
+/**
+ * @private
+ *
+ * A compile-time constant of type ::VALUE whose value is 0.
+ */
+#define RBIMPL_VALUE_NULL UINTPTR_C(0)
+
+/**
+ * @private
+ *
+ * A compile-time constant of type ::VALUE whose value is 1.
+ */
+#define RBIMPL_VALUE_ONE UINTPTR_C(1)
+
+/**
+ * @private
+ *
+ * Maximum possible value that a ::VALUE can take.
+ */
+#define RBIMPL_VALUE_FULL UINTPTR_MAX
+
+#elif defined HAVE_UINTPTR_T && 0
+typedef uintptr_t VALUE;
+typedef uintptr_t ID;
+# define SIGNED_VALUE intptr_t
+# define SIZEOF_VALUE SIZEOF_UINTPTR_T
+# undef PRI_VALUE_PREFIX
+# define RBIMPL_VALUE_NULL UINTPTR_C(0)
+# define RBIMPL_VALUE_ONE UINTPTR_C(1)
+# define RBIMPL_VALUE_FULL UINTPTR_MAX
+
+#elif SIZEOF_LONG == SIZEOF_VOIDP
+typedef unsigned long VALUE;
+typedef unsigned long ID;
+# define SIGNED_VALUE long
+# define SIZEOF_VALUE SIZEOF_LONG
+# define PRI_VALUE_PREFIX "l"
+# define RBIMPL_VALUE_NULL 0UL
+# define RBIMPL_VALUE_ONE 1UL
+# define RBIMPL_VALUE_FULL ULONG_MAX
+
+#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
+typedef unsigned LONG_LONG VALUE;
+typedef unsigned LONG_LONG ID;
+# define SIGNED_VALUE LONG_LONG
+# define LONG_LONG_VALUE 1
+# define SIZEOF_VALUE SIZEOF_LONG_LONG
+# define PRI_VALUE_PREFIX PRI_LL_PREFIX
+# define RBIMPL_VALUE_NULL 0ULL
+# define RBIMPL_VALUE_ONE 1ULL
+# define RBIMPL_VALUE_FULL ULLONG_MAX
+
+#else
+# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
+#endif
+
+/** @cond INTERNAL_MACRO */
+RBIMPL_STATIC_ASSERT(sizeof_int, SIZEOF_INT == sizeof(int));
+RBIMPL_STATIC_ASSERT(sizeof_long, SIZEOF_LONG == sizeof(long));
+RBIMPL_STATIC_ASSERT(sizeof_long_long, SIZEOF_LONG_LONG == sizeof(LONG_LONG));
+RBIMPL_STATIC_ASSERT(sizeof_voidp, SIZEOF_VOIDP == sizeof(void *));
+/** @endcond */
+#endif /* RBIMPL_VALUE_H */
diff --git a/include/ruby/internal/value_type.h b/include/ruby/internal/value_type.h
new file mode 100644
index 0000000000..977f60a009
--- /dev/null
+++ b/include/ruby/internal/value_type.h
@@ -0,0 +1,449 @@
+#ifndef RBIMPL_VALUE_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VALUE_TYPE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines enum ::ruby_value_type.
+ */
+#include "ruby/internal/assume.h"
+#include "ruby/internal/attr/artificial.h"
+#include "ruby/internal/attr/cold.h"
+#include "ruby/internal/attr/enum_extensibility.h"
+#include "ruby/internal/attr/forceinline.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/cast.h"
+#include "ruby/internal/constant_p.h"
+#include "ruby/internal/core/rbasic.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/error.h"
+#include "ruby/internal/has/builtin.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/stdbool.h"
+#include "ruby/internal/value.h"
+#include "ruby/assert.h"
+
+#if defined(T_DATA)
+/*
+ * :!BEWARE!: (Recent?) Solaris' <nfs/nfs.h> have conflicting definition of
+ * T_DATA. Let us stop here. Please have a workaround like this:
+ *
+ * ```C
+ * #include <ruby/ruby.h> // <- Include this one first.
+ * #undef T_DATA // <- ... and stick to RUBY_T_DATA forever.
+ * #include <nfs/nfs.h> // <- OS-provided T_DATA introduced.
+ * ```
+ *
+ * See also [ruby-core:4261]
+ */
+# error Bail out due to conflicting definition of T_DATA.
+#endif
+
+#define T_ARRAY RUBY_T_ARRAY /**< @old{RUBY_T_ARRAY} */
+#define T_BIGNUM RUBY_T_BIGNUM /**< @old{RUBY_T_BIGNUM} */
+#define T_CLASS RUBY_T_CLASS /**< @old{RUBY_T_CLASS} */
+#define T_COMPLEX RUBY_T_COMPLEX /**< @old{RUBY_T_COMPLEX} */
+#define T_DATA RUBY_T_DATA /**< @old{RUBY_T_DATA} */
+#define T_FALSE RUBY_T_FALSE /**< @old{RUBY_T_FALSE} */
+#define T_FILE RUBY_T_FILE /**< @old{RUBY_T_FILE} */
+#define T_FIXNUM RUBY_T_FIXNUM /**< @old{RUBY_T_FIXNUM} */
+#define T_FLOAT RUBY_T_FLOAT /**< @old{RUBY_T_FLOAT} */
+#define T_HASH RUBY_T_HASH /**< @old{RUBY_T_HASH} */
+#define T_ICLASS RUBY_T_ICLASS /**< @old{RUBY_T_ICLASS} */
+#define T_IMEMO RUBY_T_IMEMO /**< @old{RUBY_T_IMEMO} */
+#define T_MASK RUBY_T_MASK /**< @old{RUBY_T_MASK} */
+#define T_MATCH RUBY_T_MATCH /**< @old{RUBY_T_MATCH} */
+#define T_MODULE RUBY_T_MODULE /**< @old{RUBY_T_MODULE} */
+#define T_MOVED RUBY_T_MOVED /**< @old{RUBY_T_MOVED} */
+#define T_NIL RUBY_T_NIL /**< @old{RUBY_T_NIL} */
+#define T_NODE RUBY_T_NODE /**< @old{RUBY_T_NODE} */
+#define T_NONE RUBY_T_NONE /**< @old{RUBY_T_NONE} */
+#define T_OBJECT RUBY_T_OBJECT /**< @old{RUBY_T_OBJECT} */
+#define T_RATIONAL RUBY_T_RATIONAL /**< @old{RUBY_T_RATIONAL} */
+#define T_REGEXP RUBY_T_REGEXP /**< @old{RUBY_T_REGEXP} */
+#define T_STRING RUBY_T_STRING /**< @old{RUBY_T_STRING} */
+#define T_STRUCT RUBY_T_STRUCT /**< @old{RUBY_T_STRUCT} */
+#define T_SYMBOL RUBY_T_SYMBOL /**< @old{RUBY_T_SYMBOL} */
+#define T_TRUE RUBY_T_TRUE /**< @old{RUBY_T_TRUE} */
+#define T_UNDEF RUBY_T_UNDEF /**< @old{RUBY_T_UNDEF} */
+#define T_ZOMBIE RUBY_T_ZOMBIE /**< @old{RUBY_T_ZOMBIE} */
+
+#define BUILTIN_TYPE RB_BUILTIN_TYPE /**< @old{RB_BUILTIN_TYPE} */
+#define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P /**< @old{RB_DYNAMIC_SYM_P} */
+#define RB_INTEGER_TYPE_P rb_integer_type_p /**< @old{rb_integer_type_p} */
+#define SYMBOL_P RB_SYMBOL_P /**< @old{RB_SYMBOL_P} */
+#define rb_type_p RB_TYPE_P /**< @alias{RB_TYPE_P} */
+
+/** @cond INTERNAL_MACRO */
+#define RB_BUILTIN_TYPE RB_BUILTIN_TYPE
+#define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
+#define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P
+#define RB_SYMBOL_P RB_SYMBOL_P
+#define RB_TYPE_P RB_TYPE_P
+#define Check_Type Check_Type
+
+#if !RUBY_DEBUG
+# define RBIMPL_ASSERT_TYPE(v, t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
+#else
+# define RBIMPL_ASSERT_TYPE Check_Type
+#endif
+/** @endcond */
+
+/** @old{rb_type} */
+#define TYPE(_) RBIMPL_CAST((int)rb_type(_))
+
+/** C-level type of an object. */
+enum
+RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed)
+ruby_value_type {
+ RUBY_T_NONE = 0x00, /**< Non-object (swept etc.) */
+
+ RUBY_T_OBJECT = 0x01, /**< @see struct ::RObject */
+ RUBY_T_CLASS = 0x02, /**< @see struct ::RClass and ::rb_cClass */
+ RUBY_T_MODULE = 0x03, /**< @see struct ::RClass and ::rb_cModule */
+ RUBY_T_FLOAT = 0x04, /**< @see struct ::RFloat */
+ RUBY_T_STRING = 0x05, /**< @see struct ::RString */
+ RUBY_T_REGEXP = 0x06, /**< @see struct ::RRegexp */
+ RUBY_T_ARRAY = 0x07, /**< @see struct ::RArray */
+ RUBY_T_HASH = 0x08, /**< @see struct ::RHash */
+ RUBY_T_STRUCT = 0x09, /**< @see struct ::RStruct */
+ RUBY_T_BIGNUM = 0x0a, /**< @see struct ::RBignum */
+ RUBY_T_FILE = 0x0b, /**< @see struct ::RFile */
+ RUBY_T_DATA = 0x0c, /**< @see struct ::RTypedData */
+ RUBY_T_MATCH = 0x0d, /**< @see struct ::RMatch */
+ RUBY_T_COMPLEX = 0x0e, /**< @see struct ::RComplex */
+ RUBY_T_RATIONAL = 0x0f, /**< @see struct ::RRational */
+
+ RUBY_T_NIL = 0x11, /**< @see ::RUBY_Qnil */
+ RUBY_T_TRUE = 0x12, /**< @see ::RUBY_Qfalse */
+ RUBY_T_FALSE = 0x13, /**< @see ::RUBY_Qtrue */
+ RUBY_T_SYMBOL = 0x14, /**< @see struct ::RSymbol */
+ RUBY_T_FIXNUM = 0x15, /**< Integers formerly known as Fixnums. */
+ RUBY_T_UNDEF = 0x16, /**< @see ::RUBY_Qundef */
+
+ RUBY_T_IMEMO = 0x1a, /**< @see struct ::RIMemo */
+ RUBY_T_NODE = 0x1b, /**< @see struct ::RNode */
+ RUBY_T_ICLASS = 0x1c, /**< Hidden classes known as IClasses. */
+ RUBY_T_ZOMBIE = 0x1d, /**< @see struct ::RZombie */
+ RUBY_T_MOVED = 0x1e, /**< @see struct ::RMoved */
+
+ RUBY_T_MASK = 0x1f /**< Bitmask of ::ruby_value_type. */
+};
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_COLD()
+/**
+ * @private
+ *
+ * This was the old implementation of Check_Type(), but they diverged. This
+ * one remains for theoretical backwards compatibility. People normally need
+ * not use it.
+ *
+ * @param[in] obj An object.
+ * @param[in] t A type.
+ * @exception rb_eTypeError `obj` is not of type `t`.
+ * @exception rb_eFatal `obj` is corrupt.
+ * @post Upon successful return `obj` is guaranteed to have type `t`.
+ *
+ * @internal
+ *
+ * The second argument shall have been enum ::ruby_value_type. But at the time
+ * matz designed this function he still used K&R C. There was no such thing
+ * like a function prototype. We can no longer change this API.
+ */
+void rb_check_type(VALUE obj, int t);
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries the type of the object.
+ *
+ * @param[in] obj Object in question.
+ * @pre `obj` must not be a special constant.
+ * @return The type of `obj`.
+ */
+static inline enum ruby_value_type
+RB_BUILTIN_TYPE(VALUE obj)
+{
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+
+#if 0 && defined __GNUC__ && !defined __clang__
+ /* Don't move the access to `flags` before the preceding
+ * RB_SPECIAL_CONST_P check. */
+ __asm volatile("": : :"memory");
+#endif
+ VALUE ret = RBASIC(obj)->flags & RUBY_T_MASK;
+ return RBIMPL_CAST((enum ruby_value_type)ret);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * Queries if the object is an instance of ::rb_cInteger.
+ *
+ * @param[in] obj Object in question.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+static inline bool
+rb_integer_type_p(VALUE obj)
+{
+ if (RB_FIXNUM_P(obj)) {
+ return true;
+ }
+ else if (RB_SPECIAL_CONST_P(obj)) {
+ return false;
+ }
+ else {
+ return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/**
+ * Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
+ *
+ * @param[in] obj Object in question.
+ * @return The type of `obj`.
+ */
+static inline enum ruby_value_type
+rb_type(VALUE obj)
+{
+ if (! RB_SPECIAL_CONST_P(obj)) {
+ return RB_BUILTIN_TYPE(obj);
+ }
+ else if (obj == RUBY_Qfalse) {
+ return RUBY_T_FALSE;
+ }
+ else if (obj == RUBY_Qnil) {
+ return RUBY_T_NIL;
+ }
+ else if (obj == RUBY_Qtrue) {
+ return RUBY_T_TRUE;
+ }
+ else if (obj == RUBY_Qundef) {
+ return RUBY_T_UNDEF;
+ }
+ else if (RB_FIXNUM_P(obj)) {
+ return RUBY_T_FIXNUM;
+ }
+ else if (RB_STATIC_SYM_P(obj)) {
+ return RUBY_T_SYMBOL;
+ }
+ else {
+ RBIMPL_ASSUME(RB_FLONUM_P(obj));
+ return RUBY_T_FLOAT;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries if the object is an instance of ::rb_cFloat.
+ *
+ * @param[in] obj Object in question.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+static inline bool
+RB_FLOAT_TYPE_P(VALUE obj)
+{
+ if (RB_FLONUM_P(obj)) {
+ return true;
+ }
+ else if (RB_SPECIAL_CONST_P(obj)) {
+ return false;
+ }
+ else {
+ return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries if the object is a dynamic symbol.
+ *
+ * @param[in] obj Object in question.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+static inline bool
+RB_DYNAMIC_SYM_P(VALUE obj)
+{
+ if (RB_SPECIAL_CONST_P(obj)) {
+ return false;
+ }
+ else {
+ return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries if the object is an instance of ::rb_cSymbol.
+ *
+ * @param[in] obj Object in question.
+ * @retval true It is.
+ * @retval false It isn't.
+ */
+static inline bool
+RB_SYMBOL_P(VALUE obj)
+{
+ return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj);
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_FORCEINLINE()
+/**
+ * @private
+ *
+ * This is an implementation detail of RB_TYPE_P(). Just don't use it.
+ *
+ * @param[in] obj An object.
+ * @param[in] t A type.
+ * @retval true `obj` is of type `t`.
+ * @retval false Otherwise.
+ */
+static bool
+rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
+{
+ if (t == RUBY_T_TRUE) {
+ return obj == RUBY_Qtrue;
+ }
+ else if (t == RUBY_T_FALSE) {
+ return obj == RUBY_Qfalse;
+ }
+ else if (t == RUBY_T_NIL) {
+ return obj == RUBY_Qnil;
+ }
+ else if (t == RUBY_T_UNDEF) {
+ return obj == RUBY_Qundef;
+ }
+ else if (t == RUBY_T_FIXNUM) {
+ return RB_FIXNUM_P(obj);
+ }
+ else if (t == RUBY_T_SYMBOL) {
+ return RB_SYMBOL_P(obj);
+ }
+ else if (t == RUBY_T_FLOAT) {
+ return RB_FLOAT_TYPE_P(obj);
+ }
+ else if (RB_SPECIAL_CONST_P(obj)) {
+ return false;
+ }
+ else if (t == RB_BUILTIN_TYPE(obj)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Queries if the given object is of given type.
+ *
+ * @param[in] obj An object.
+ * @param[in] t A type.
+ * @retval true `obj` is of type `t`.
+ * @retval false Otherwise.
+ *
+ * @internal
+ *
+ * This function is a super-duper hot path. Optimised targeting modern C
+ * compilers and x86_64 architecture.
+ */
+static inline bool
+RB_TYPE_P(VALUE obj, enum ruby_value_type t)
+{
+ if (RBIMPL_CONSTANT_P(t)) {
+ return rbimpl_RB_TYPE_P_fastpath(obj, t);
+ }
+ else {
+ return t == rb_type(obj);
+ }
+}
+
+/** @cond INTERNAL_MACRO */
+/* Clang, unlike GCC, cannot propagate __builtin_constant_p beyond function
+ * boundary. */
+#if defined(__clang__)
+# undef RB_TYPE_P
+# define RB_TYPE_P(obj, t) \
+ (RBIMPL_CONSTANT_P(t) ? \
+ rbimpl_RB_TYPE_P_fastpath((obj), (t)) : \
+ (RB_TYPE_P)((obj), (t)))
+#endif
+
+/* clang 3.x (4.2 compatible) can't eliminate CSE of RB_BUILTIN_TYPE
+ * in inline function and caller function
+ * See also 8998c06461ea0bef11b3aeb30b6d2ab71c8762ba
+ */
+#if RBIMPL_COMPILER_BEFORE(Clang, 4, 0, 0)
+# undef rb_integer_type_p
+# define rb_integer_type_p(obj) \
+ __extension__ ({ \
+ const VALUE integer_type_obj = (obj); \
+ (RB_FIXNUM_P(integer_type_obj) || \
+ (!RB_SPECIAL_CONST_P(integer_type_obj) && \
+ RB_BUILTIN_TYPE(integer_type_obj) == RUBY_T_BIGNUM)); \
+ })
+#endif
+/** @endcond */
+
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * @private
+ * Defined in ruby/internal/core/rtypeddata.h
+ */
+static inline bool rbimpl_rtypeddata_p(VALUE obj);
+
+RBIMPL_ATTR_ARTIFICIAL()
+/**
+ * Identical to RB_TYPE_P(), except it raises exceptions on predication
+ * failure.
+ *
+ * @param[in] v An object.
+ * @param[in] t A type.
+ * @exception rb_eTypeError `obj` is not of type `t`.
+ * @exception rb_eFatal `obj` is corrupt.
+ * @post Upon successful return `obj` is guaranteed to have type `t`.
+ */
+static inline void
+Check_Type(VALUE v, enum ruby_value_type t)
+{
+ if (RB_UNLIKELY(! RB_TYPE_P(v, t))) {
+ goto unexpected_type;
+ }
+ else if (t == RUBY_T_DATA && rbimpl_rtypeddata_p(v)) {
+ /* Typed data is not simple `T_DATA`, see `rb_check_type` */
+ goto unexpected_type;
+ }
+ else {
+ return;
+ }
+
+ unexpected_type:
+ rb_unexpected_type(v, t);
+}
+
+#endif /* RBIMPL_VALUE_TYPE_H */
diff --git a/include/ruby/internal/variable.h b/include/ruby/internal/variable.h
new file mode 100644
index 0000000000..c017ffe3f7
--- /dev/null
+++ b/include/ruby/internal/variable.h
@@ -0,0 +1,337 @@
+#ifndef RBIMPL_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VARIABLE_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Declares rb_define_variable().
+ */
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/noreturn.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Type that represents a global variable getter function.
+ *
+ * @param[in] id The variable name.
+ * @param[in,out] data Where the value is stored.
+ * @return The value that shall be visible from Ruby.
+ */
+typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
+
+/**
+ * Type that represents a global variable setter function.
+ *
+ * @param[in] val The value to set.
+ * @param[in] id The variable name.
+ * @param[in,out] data Where the value is to be stored.
+ */
+typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
+
+/**
+ * Type that represents a global variable marker function.
+ *
+ * @param[in] var Where the value is to be stored.
+ */
+typedef void rb_gvar_marker_t(VALUE *var);
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_getter_t rb_gvar_undef_getter;
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_setter_t rb_gvar_undef_setter;
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_marker_t rb_gvar_undef_marker;
+
+/**
+ * This is the getter function that backs global variables defined from a ruby
+ * script. Extension libraries can use this if its global variable needs no
+ * custom logic.
+ */
+rb_gvar_getter_t rb_gvar_val_getter;
+
+/**
+ * This is the setter function that backs global variables defined from a ruby
+ * script. Extension libraries can use this if its global variable needs no
+ * custom logic.
+ */
+rb_gvar_setter_t rb_gvar_val_setter;
+
+/**
+ * This is the setter function that backs global variables defined from a ruby
+ * script. Extension libraries can use this if its global variable needs no
+ * custom logic.
+ */
+rb_gvar_marker_t rb_gvar_val_marker;
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_getter_t rb_gvar_var_getter;
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_setter_t rb_gvar_var_setter;
+
+/**
+ * @deprecated
+ *
+ * This function has no actual usage (than in ruby itself). Please ignore. It
+ * was a bad idea to expose this function to 3rd parties, but we can no longer
+ * delete it.
+ */
+rb_gvar_marker_t rb_gvar_var_marker;
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * This function just raises ::rb_eNameError. Handy when you want to prohibit
+ * a global variable from being squashed by someone.
+ */
+rb_gvar_setter_t rb_gvar_readonly_setter;
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * "Shares" a global variable between Ruby and C. Normally a Ruby-level global
+ * variable is stored somewhere deep inside of the interpreter's execution
+ * context, but this way you can explicitly specify its storage.
+ *
+ * ```CXX
+ * static VALUE foo;
+ *
+ * extern "C" void
+ * init_Foo(void)
+ * {
+ * foo = rb_eval_string("...");
+ * rb_define_variable("$foo", &foo);
+ * }
+ * ```
+ *
+ * In the above example a Ruby global variable named `$foo` is stored in a C
+ * global variable named `foo`.
+ *
+ * @param[in] name Variable (Ruby side).
+ * @param[in] var Variable (C side).
+ * @post Ruby level global variable named `name` is defined if absent,
+ * and its storage is set to `var`.
+ */
+void rb_define_variable(const char *name, VALUE *var);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Defines a global variable that is purely function-backended. By using this
+ * API a programmer can define a global variable that dynamically changes from
+ * time to time.
+ *
+ * @param[in] name Variable name, in C's string.
+ * @param[in] getter A getter function.
+ * @param[in] setter A setter function.
+ * @post Ruby level global variable named `name` is defined if absent.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't know if this is an Easter egg or an official feature, but
+ * you can pass 0 to the third argument (setter). That effectively nullifies
+ * any efforts to write to the defining global variable.
+ */
+void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_define_virtual_variable(), but can also specify a storage.
+ * A programmer can use the storage for e.g. memoisation, storing intermediate
+ * computation result, etc.
+ *
+ * Also you can pass 0 to this function, unlike other variants:
+ *
+ * - When getter is 0 ::rb_gvar_var_getter is used instead.
+ * - When setter is 0 ::rb_gvar_var_setter is used instead.
+ * - When data is 0, you must specify a non-zero setter function. Otherwise
+ * ::rb_gvar_var_setter tries to write to `*NULL`, and just causes SEGV.
+ *
+ * @param[in] name Variable name, in C's string.
+ * @param[in] var Variable storage.
+ * @param[in] getter A getter function.
+ * @param[in] setter A setter function.
+ * @post Ruby level global variable named `name` is defined if absent.
+ */
+void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_define_variable(), except it does not allow Ruby programs to
+ * assign values to such global variable. C codes can still set values at
+ * will. This could be handy for you when implementing an `errno`-like
+ * experience, where a method updates a read-only global variable as a side-
+ * effect.
+ *
+ * @param[in] name Variable (Ruby side).
+ * @param[in] var Variable (C side).
+ * @post Ruby level global variable named `name` is defined if absent,
+ * and its storage is set to `var`.
+ */
+void rb_define_readonly_variable(const char *name, const VALUE *var);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Defines a Ruby level constant under a namespace.
+ *
+ * @param[out] klass Namespace for the constant to reside.
+ * @param[in] name Name of the constant.
+ * @param[in] val Value of the constant.
+ * @exception rb_eTypeError `klass` is not a kind of ::rb_cModule.
+ * @exception rb_eFrozenError `klass` is frozen.
+ * @post Ruby level constant `klass::name` is defined to be `val`.
+ * @note This API does not stop you from defining a constant that is
+ * unable to reach from ruby (like for instance passing
+ * non-capital letter to `name`).
+ * @note This API does not stop you from overwriting a constant that
+ * already exist.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_define_const(VALUE klass, const char *name, VALUE val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Identical to rb_define_const(), except it defines that of "global",
+ * i.e. toplevel constant.
+ *
+ * @param[in] name Name of the constant.
+ * @param[in] val Value of the constant.
+ * @exception rb_eFrozenError ::rb_cObject is frozen.
+ * @post Ruby level constant \::name is defined to be `val`.
+ * @note This API does not stop you from defining a constant that is
+ * unable to reach from ruby (like for instance passing
+ * non-capital letter to `name`).
+ * @note This API does not stop you from overwriting a constant that
+ * already exist.
+ */
+void rb_define_global_const(const char *name, VALUE val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Asserts that the given constant is deprecated. Attempt to refer such
+ * constant will produce a warning.
+ *
+ * @param[in] mod Namespace of the target constant.
+ * @param[in] name Name of the constant.
+ * @exception rb_eNameError No such constant.
+ * @exception rb_eFrozenError `mod` is frozen.
+ * @post `name` under `mod` is deprecated.
+ */
+void rb_deprecate_constant(VALUE mod, const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Assigns to a global variable.
+ *
+ * @param[in] name Target global variable.
+ * @param[in] val Value to assign.
+ * @return Passed value.
+ * @post Ruby level global variable named `name` is defined if absent,
+ * whose value is set to `val`.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with
+ * `set_trace_func`.
+ */
+VALUE rb_gv_set(const char *name, VALUE val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Obtains a global variable.
+ *
+ * @param[in] name Global variable to query.
+ * @retval RUBY_Qnil The global variable does not exist.
+ * @retval otherwise The value assigned to the global variable.
+ *
+ * @internal
+ *
+ * Unlike rb_gv_set(), there is no way to trace this function.
+ */
+VALUE rb_gv_get(const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Obtains an instance variable.
+ *
+ * @param[in] obj Target object.
+ * @param[in] name Target instance variable to query.
+ * @exception rb_eEncodingError `name` is corrupt (contains Hanzi etc.).
+ * @retval RUBY_nil No such instance variable.
+ * @retval otherwise The value assigned to the instance variable.
+ */
+VALUE rb_iv_get(VALUE obj, const char *name);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Assigns to an instance variable.
+ *
+ * @param[out] obj Target object.
+ * @param[in] name Target instance variable.
+ * @param[in] val Value to assign.
+ * @exception rb_eFrozenError Can't modify `obj`.
+ * @exception rb_eArgError `obj` has too many instance variables.
+ * @return Passed value.
+ * @post An instance variable named `name` is defined if absent on
+ * `obj`, whose value is set to `val`.
+ *
+ * @internal
+ *
+ * This function does not stop you form creating an ASCII-incompatible instance
+ * variable, but there is no way to get one because rb_iv_get raises exceptions
+ * for such things. This design seems broken... But no idea why.
+ */
+VALUE rb_iv_set(VALUE obj, const char *name, VALUE val);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_VARIABLE_H */
diff --git a/include/ruby/internal/warning_push.h b/include/ruby/internal/warning_push.h
new file mode 100644
index 0000000000..f5981633f8
--- /dev/null
+++ b/include/ruby/internal/warning_push.h
@@ -0,0 +1,124 @@
+#ifndef RBIMPL_WARNING_PUSH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_WARNING_PUSH_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Defines #RBIMPL_WARNING_PUSH.
+ *
+ * ### Q&A ###
+ *
+ * Q: Why all the macros defined in this file are function-like macros?
+ *
+ * A: Sigh. This is because of Doxygen. Its `SKIP_FUNCTION_MACROS = YES`
+ * configuration setting requests us that if we want it to ignore these
+ * macros, then we have to do two things: (1) let them be defined as
+ * function-like macros, and (2) place them separately in their own line,
+ * like below:
+ *
+ * ```CXX
+ * // NG -- foo's type considered something like `unsigned int`.
+ * RBIMPL_WARNING_PUSH
+ * int foo(void);
+ * RBIMPL_WARNING_POP
+ *
+ * // OK -- the macros are ignored by Doxygen.
+ * RBIMPL_WARNING_PUSH()
+ * int foo(void);
+ * RBIMPL_WARNING_POP()
+ * ```
+ */
+#include "ruby/internal/compiler_is.h"
+#include "ruby/internal/compiler_since.h"
+
+#if defined(__DOXYGEN__)
+
+/**
+ * @private
+ *
+ * Pushes compiler warning state.
+ */
+#define RBIMPL_WARNING_PUSH() __pragma(warning(push))
+
+/**
+ * @private
+ *
+ * Pops compiler warning state.
+ */
+#define RBIMPL_WARNING_POP() __pragma(warning(pop))
+
+/**
+ * @private
+ *
+ * Turns a warning into a fatal error.
+ *
+ * @param flag A flag that represents the kind of warnings.
+ */
+#define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
+
+/**
+ * @private
+ *
+ * Suppresses a warning.
+ *
+ * @param flag A flag that represents the kind of warnings.
+ */
+#define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
+
+#elif RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
+# /* Not sure exactly when but it seems VC++ 6.0 is a version with it.*/
+# define RBIMPL_WARNING_PUSH() __pragma(warning(push))
+# define RBIMPL_WARNING_POP() __pragma(warning(pop))
+# define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
+# define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
+
+#elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# define RBIMPL_WARNING_PUSH() __pragma(warning(push))
+# define RBIMPL_WARNING_POP() __pragma(warning(pop))
+# define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
+# define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
+
+#elif RBIMPL_COMPILER_IS(Clang) || RBIMPL_COMPILER_IS(Apple)
+# /* Not sure exactly when but it seems LLVM 2.6.0 is a version with it. */
+# define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
+# define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(clang diagnostic x)
+# define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
+# define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
+# define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
+# define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
+# define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
+
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# /* https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html */
+# define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
+# define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x)
+# define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
+# define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
+# define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
+# define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
+# define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
+
+#else
+# /* :FIXME: improve here */
+# define RBIMPL_WARNING_PUSH() /* void */
+# define RBIMPL_WARNING_POP() /* void */
+# define RBIMPL_WARNING_ERROR(flag) /* void */
+# define RBIMPL_WARNING_IGNORED(flag) /* void */
+#endif /* _MSC_VER */
+/** @endcond */
+
+#endif /* RBIMPL_WARNING_PUSH_H */
diff --git a/include/ruby/internal/xmalloc.h b/include/ruby/internal/xmalloc.h
new file mode 100644
index 0000000000..57552e4e7d
--- /dev/null
+++ b/include/ruby/internal/xmalloc.h
@@ -0,0 +1,392 @@
+#ifndef RBIMPL_XMALLOC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_XMALLOC_H
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
+ * implementation details. Don't take them as canon. They could
+ * rapidly appear then vanish. The name (path) of this header file
+ * is also an implementation detail. Do not expect it to persist
+ * at the place it is now. Developers are free to move it anywhere
+ * anytime at will.
+ * @note To ruby-core: remember that this header can be possibly
+ * recursively included from extension libraries written in C++.
+ * Do not expect for instance `__VA_ARGS__` is always available.
+ * We assume C99 for ruby itself but we don't assume languages of
+ * extension libraries. They could be written in C++98.
+ * @brief Declares ::ruby_xmalloc().
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include "ruby/internal/attr/alloc_size.h"
+#include "ruby/internal/attr/nodiscard.h"
+#include "ruby/internal/attr/noexcept.h"
+#include "ruby/internal/attr/restrict.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/dllexport.h"
+
+/**
+ * @private
+ * @warning Do not touch this macro.
+ * @warning It is an implementation detail.
+ * @warning It was a failure at the first place to let you know about it.
+ * @warning The value of this macro must match for ruby itself and all
+ * extension libraries, otherwise serious memory corruption shall
+ * occur.
+ */
+#ifndef USE_GC_MALLOC_OBJ_INFO_DETAILS
+# define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
+#endif
+
+#define xmalloc ruby_xmalloc /**< @old{ruby_xmalloc} */
+#define xmalloc2 ruby_xmalloc2 /**< @old{ruby_xmalloc2} */
+#define xcalloc ruby_xcalloc /**< @old{ruby_xcalloc} */
+#define xrealloc ruby_xrealloc /**< @old{ruby_xrealloc} */
+#define xrealloc2 ruby_xrealloc2 /**< @old{ruby_xrealloc2} */
+#define xfree ruby_xfree /**< @old{ruby_xfree} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1))
+/**
+ * Allocates a storage instance. It is largely the same as system malloc(),
+ * except:
+ *
+ * - It raises Ruby exceptions instead of returning NULL, and
+ * - In case of `ENOMEM` it tries to GC to make some room.
+ *
+ * @param[in] size Requested amount of memory.
+ * @exception rb_eNoMemError No space left for `size` bytes allocation.
+ * @return A valid pointer to an allocated storage instance; which has at
+ * least `size` bytes width, with appropriate alignment detected by
+ * the underlying malloc() routine.
+ * @note It doesn't return NULL.
+ * @note Unlike some malloc() implementations, it allocates something and
+ * returns a meaningful value even when `size` is equal to zero.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+void *ruby_xmalloc(size_t size)
+RBIMPL_ATTR_NOEXCEPT(malloc(size))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
+/**
+ * Identical to ruby_xmalloc(), except it allocates `nelems` * `elemsiz` bytes.
+ * This is needed because the multiplication could integer overflow. On such
+ * situations Ruby does not try to allocate at all but raises Ruby level
+ * exceptions instead. If there is no integer overflow the behaviour is
+ * exactly the same as `ruby_xmalloc(nelems*elemsiz)`.
+ *
+ * @param[in] nelems Number of elements.
+ * @param[in] elemsiz Size of an element.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError `nelems` * `elemsiz` would overflow.
+ * @return A valid pointer to an allocated storage instance; which has at
+ * least `nelems` * `elemsiz` bytes width, with appropriate
+ * alignment detected by the underlying malloc() routine.
+ * @note It doesn't return NULL.
+ * @note Unlike some malloc() implementations, it allocates something and
+ * returns a meaningful value even when `nelems` or `elemsiz` or
+ * both are zero.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+void *ruby_xmalloc2(size_t nelems, size_t elemsiz)
+RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
+/**
+ * Identical to ruby_xmalloc2(), except it returns a zero-filled storage
+ * instance. It can also be seen as a routine identical to ruby_xmalloc(),
+ * except it calls calloc() instead of malloc().
+ *
+ * @param[in] nelems Number of elements.
+ * @param[in] elemsiz Size of an element.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError `nelems` * `elemsiz` would overflow.
+ * @return A valid pointer to an allocated storage instance; which has at
+ * least `nelems` * `elemsiz` bytes width, with appropriate
+ * alignment detected by the underlying calloc() routine.
+ * @post The returned storage instance is filled with zeros.
+ * @note It doesn't return NULL.
+ * @note Unlike some calloc() implementations, it allocates something and
+ * returns a meaningful value even when `nelems` or `elemsiz` or
+ * both are zero.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+void *ruby_xcalloc(size_t nelems, size_t elemsiz)
+RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
+/**
+ * Resize the storage instance.
+ *
+ * @param[in] ptr A valid pointer to a storage instance that was
+ * previously returned from either:
+ * - ruby_xmalloc(),
+ * - ruby_xmalloc2(),
+ * - ruby_xcalloc(),
+ * - ruby_xrealloc(), or
+ * - ruby_xrealloc2().
+ * @param[in] newsiz Requested new amount of memory.
+ * @exception rb_eNoMemError No space left for `newsiz` bytes allocation.
+ * @return A valid pointer to a (possibly newly allocated) storage
+ * instance; which has at least `newsiz` bytes width, with
+ * appropriate alignment detected by the underlying realloc()
+ * routine.
+ * @pre The passed pointer must point to a valid live storage instance.
+ * It is a failure to pass an already freed pointer.
+ * @post In case the function returns the passed pointer as-is, the
+ * storage instance that the pointer holds is either grown or
+ * shrunken to have at least `newsiz` bytes. Otherwise a valid
+ * pointer to a newly allocated storage instance is returned. In
+ * this case `ptr` is invalidated as if it was passed to
+ * ruby_xfree().
+ * @note It doesn't return NULL.
+ * @warning Unlike some realloc() implementations, passing zero to `newsiz`
+ * is not the same as calling ruby_xfree(), because this function
+ * never returns NULL. Something meaningful still returns then.
+ * @warning It is a failure not to check the return value. Do not assume
+ * anything on it. It could be either identical to, or distinct
+ * form the passed argument.
+ * @warning Do not assume anything on the alignment of the return value.
+ * There is no guarantee that it inherits the passed argument's
+ * one.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+void *ruby_xrealloc(void *ptr, size_t newsiz)
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
+/**
+ * Identical to ruby_xrealloc(), except it resizes the given storage instance
+ * to `newelems` * `newsiz` bytes. This is needed because the multiplication
+ * could integer overflow. On such situations Ruby does not try to touch the
+ * contents of argument pointer at all but raises Ruby level exceptions
+ * instead. If there is no integer overflow the behaviour is exactly the same
+ * as `ruby_xrealloc(ptr,nelems*elemsiz)`.
+ *
+ * This is roughly the same as reallocarray() function that OpenBSD
+ * etc. provides, but also interacts with our GC.
+ *
+ * @param[in] ptr A valid pointer to a storage instance that was
+ * previously returned from either:
+ * - ruby_xmalloc(),
+ * - ruby_xmalloc2(),
+ * - ruby_xcalloc(),
+ * - ruby_xrealloc(), or
+ * - ruby_xrealloc2().
+ * @param[in] newelems Requested new number of elements.
+ * @param[in] newsiz Requested new size of each element.
+ * @exception rb_eNoMemError No space left for allocation.
+ * @exception rb_eArgError `newelems` * `newsiz` would overflow.
+ * @return A valid pointer to a (possibly newly allocated) storage
+ * instance; which has at least `newelems` * `newsiz` bytes width,
+ * with appropriate alignment detected by the underlying realloc()
+ * routine.
+ * @pre The passed pointer must point to a valid live storage instance.
+ * It is a failure to pass an already freed pointer.
+ * @post In case the function returns the passed pointer as-is, the
+ * storage instance that the pointer holds is either grown or
+ * shrunken to have at least `newelems` * `newsiz` bytes.
+ * Otherwise a valid pointer to a newly allocated storage instance
+ * is returned. In this case `ptr` is invalidated as if it was
+ * passed to ruby_xfree().
+ * @note It doesn't return NULL.
+ * @warning Unlike some realloc() implementations, passing zero to either
+ * `newelems` or `elemsiz` are not the same as calling
+ * ruby_xfree(), because this function never returns NULL.
+ * Something meaningful still returns then.
+ * @warning It is a failure not to check the return value. Do not assume
+ * anything on it. It could be either identical to, or distinct
+ * form the passed argument.
+ * @warning Do not assume anything on the alignment of the return value.
+ * There is no guarantee that it inherits the passed argument's
+ * one.
+ * @warning The return value shall be invalidated exactly once by either
+ * ruby_xfree(), ruby_xrealloc(), or ruby_xrealloc2(). It is a
+ * failure to pass it to system free(), because the system and Ruby
+ * might or might not share the same malloc() implementation.
+ */
+void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
+;
+
+/**
+ * Deallocates a storage instance.
+ *
+ * @param[out] ptr Either
+ * - NULL, or
+ * - a valid pointer previously returned from one of:
+ * - ruby_xmalloc(),
+ * - ruby_xmalloc2(),
+ * - ruby_xcalloc(),
+ * - ruby_xrealloc(), or
+ * - ruby_xrealloc2().
+ * @pre The passed pointer must point to a valid live storage instance.
+ * It is a failure to pass an already freed pointer.
+ * @post The storage instance pointed by the passed pointer gets
+ * invalidated; it is no longer addressable.
+ * @warning Every single storage instance that was previously allocated by
+ * either ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(),
+ * ruby_xrealloc(), or ruby_xrealloc2() shall be invalidated
+ * exactly once by either passing it to ruby_xfree(), or passing
+ * it to either ruby_xrealloc(), ruby_xrealloc2() then check the
+ * return value for invalidation.
+ * @warning Do not pass anything other than pointers described above. For
+ * instance pointers returned from malloc() or mmap() shall not be
+ * passed to this function, because the underlying memory
+ * management mechanism could differ.
+ * @warning Do not pass any invalid pointers to this function e.g. by
+ * calling it twice with a same argument.
+ */
+void ruby_xfree(void *ptr)
+RBIMPL_ATTR_NOEXCEPT(free(ptr))
+;
+
+#if USE_GC_MALLOC_OBJ_INFO_DETAILS
+# define ruby_xmalloc(s1) ruby_xmalloc_with_location(s1, __FILE__, __LINE__)
+# define ruby_xmalloc2(s1, s2) ruby_xmalloc2_with_location(s1, s2, __FILE__, __LINE__)
+# define ruby_xcalloc(s1, s2) ruby_xcalloc_with_location(s1, s2, __FILE__, __LINE__)
+# define ruby_xrealloc(ptr, s1) ruby_xrealloc_with_location(ptr, s1, __FILE__, __LINE__)
+# define ruby_xrealloc2(ptr, s1, s2) ruby_xrealloc2_with_location(ptr, s1, s2, __FILE__, __LINE__)
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1))
+void *ruby_xmalloc_body(size_t size)
+RBIMPL_ATTR_NOEXCEPT(malloc(size))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
+void *ruby_xmalloc2_body(size_t nelems, size_t elemsiz)
+RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
+void *ruby_xcalloc_body(size_t nelems, size_t elemsiz)
+RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
+void *ruby_xrealloc_body(void *ptr, size_t newsiz)
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz))
+;
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
+void *ruby_xrealloc2_body(void *ptr, size_t newelems, size_t newsiz)
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
+;
+
+RUBY_EXTERN const char *ruby_malloc_info_file;
+RUBY_EXTERN int ruby_malloc_info_line;
+
+static inline void *
+ruby_xmalloc_with_location(size_t s, const char *file, int line)
+{
+ void *ptr;
+ ruby_malloc_info_file = file;
+ ruby_malloc_info_line = line;
+ ptr = ruby_xmalloc_body(s);
+ ruby_malloc_info_file = NULL;
+ return ptr;
+}
+
+static inline void *
+ruby_xmalloc2_with_location(size_t s1, size_t s2, const char *file, int line)
+{
+ void *ptr;
+ ruby_malloc_info_file = file;
+ ruby_malloc_info_line = line;
+ ptr = ruby_xmalloc2_body(s1, s2);
+ ruby_malloc_info_file = NULL;
+ return ptr;
+}
+
+static inline void *
+ruby_xcalloc_with_location(size_t s1, size_t s2, const char *file, int line)
+{
+ void *ptr;
+ ruby_malloc_info_file = file;
+ ruby_malloc_info_line = line;
+ ptr = ruby_xcalloc_body(s1, s2);
+ ruby_malloc_info_file = NULL;
+ return ptr;
+}
+
+static inline void *
+ruby_xrealloc_with_location(void *ptr, size_t s, const char *file, int line)
+{
+ void *rptr;
+ ruby_malloc_info_file = file;
+ ruby_malloc_info_line = line;
+ rptr = ruby_xrealloc_body(ptr, s);
+ ruby_malloc_info_file = NULL;
+ return rptr;
+}
+
+static inline void *
+ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file, int line)
+{
+ void *rptr;
+ ruby_malloc_info_file = file;
+ ruby_malloc_info_line = line;
+ rptr = ruby_xrealloc2_body(ptr, s1, s2);
+ ruby_malloc_info_file = NULL;
+ return rptr;
+}
+#endif
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RBIMPL_XMALLOC_H */
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 152f4ef763..88029b1bb9 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -1,27 +1,16 @@
-/**********************************************************************
-
- rubyio.h -
-
- $Author$
- created at: Fri Nov 12 16:47:09 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_IO_H
+#ifndef RUBY_IO_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_IO_H 1
-
-#ifdef RUBY_INTERNAL_H
-#error "Include this file before internal.h"
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
+/**
+ * @file
+ * @author $Author$
+ * @date Fri Nov 12 16:47:09 JST 1993
+ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/config.h"
#include <stdio.h>
#include "ruby/encoding.h"
@@ -30,8 +19,9 @@ extern "C" {
#include <stdio_ext.h>
#endif
-#include "ruby/config.h"
#include <errno.h>
+
+/** @cond INTERNAL_MACRO */
#if defined(HAVE_POLL)
# ifdef _AIX
# define reqevents events
@@ -45,141 +35,988 @@ extern "C" {
# undef revents
# endif
# define RB_WAITFD_IN POLLIN
-# define RB_WAITFD_PRI POLLPRI
+# if defined(POLLPRI)
+# define RB_WAITFD_PRI POLLPRI
+# else
+# define RB_WAITFD_PRI 0
+# endif
# define RB_WAITFD_OUT POLLOUT
#else
# define RB_WAITFD_IN 0x001
# define RB_WAITFD_PRI 0x002
# define RB_WAITFD_OUT 0x004
#endif
+/** @endcond */
+
+#include "ruby/internal/attr/const.h"
+#include "ruby/internal/attr/pure.h"
+#include "ruby/internal/attr/noreturn.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/value.h"
+#include "ruby/backward/2/attributes.h" /* PACKED_STRUCT_UNALIGNED */
+
+// IO#wait, IO#wait_readable, IO#wait_writable, IO#wait_priority are defined by this implementation.
+#define RUBY_IO_WAIT_METHODS
-RUBY_SYMBOL_EXPORT_BEGIN
+// Used as the default timeout argument to `rb_io_wait` to use the `IO#timeout` value.
+#define RUBY_IO_TIMEOUT_DEFAULT Qnil
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+struct stat;
+struct timeval;
+
+/**
+ * Indicates that a timeout has occurred while performing an IO operation.
+ */
+RUBY_EXTERN VALUE rb_eIOTimeoutError;
+
+/**
+ * Type of events that an IO can wait.
+ *
+ * @internal
+ *
+ * This is visible from extension libraries because `io/wait` wants it.
+ */
+typedef enum {
+ RUBY_IO_READABLE = RB_WAITFD_IN, /**< `IO::READABLE` */
+ RUBY_IO_WRITABLE = RB_WAITFD_OUT, /**< `IO::WRITABLE` */
+ RUBY_IO_PRIORITY = RB_WAITFD_PRI, /**< `IO::PRIORITY` */
+} rb_io_event_t;
+
+/**
+ * IO buffers. This is an implementation detail of ::rb_io_t::wbuf and
+ * ::rb_io_t::rbuf. People don't manipulate it directly.
+ */
PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t {
+
+ /** Pointer to the underlying memory region, of at least `capa` bytes. */
char *ptr; /* off + len <= capa */
+
+ /** Offset inside of `ptr`. */
int off;
+
+ /** Length of the buffer. */
int len;
+
+ /** Designed capacity of the buffer. */
int capa;
});
+
+/** @alias{rb_io_buffer_t} */
typedef struct rb_io_buffer_t rb_io_buffer_t;
+/** Decomposed encoding flags (e.g. `"enc:enc2""`). */
+/*
+ * enc enc2 read action write action
+ * NULL NULL force_encoding(default_external) write the byte sequence of str
+ * e1 NULL force_encoding(e1) convert str.encoding to e1
+ * e1 e2 convert from e2 to e1 convert str.encoding to e2
+ */
+struct rb_io_enc_t {
+ /** Internal encoding. */
+ rb_encoding *enc;
+ /** External encoding. */
+ rb_encoding *enc2;
+ /**
+ * Flags.
+ *
+ * @see enum ::ruby_econv_flag_type
+ */
+ int ecflags;
+ /**
+ * Flags as Ruby hash.
+ *
+ * @internal
+ *
+ * This is set. But used from nowhere maybe?
+ */
+ VALUE ecopts;
+};
+
+/** Ruby's IO, metadata and buffers. */
typedef struct rb_io_t {
- FILE *stdio_file; /* stdio ptr for read/write if available */
- int fd; /* file descriptor */
- int mode; /* mode flags: FMODE_XXXs */
- rb_pid_t pid; /* child's pid (for pipes) */
- int lineno; /* number of lines read */
- VALUE pathv; /* pathname for file */
- void (*finalize)(struct rb_io_t*,int); /* finalize proc */
- rb_io_buffer_t wbuf, rbuf;
+ /** The IO's Ruby level counterpart. */
+ VALUE self;
- VALUE tied_io_for_writing;
+ /** stdio ptr for read/write, if available. */
+ FILE *stdio_file;
+
+ /** file descriptor. */
+ int fd;
+
+ /** mode flags: FMODE_XXXs */
+ int mode;
+
+ /** child's pid (for pipes) */
+ rb_pid_t pid;
+
+ /** number of lines read */
+ int lineno;
+
+ /** pathname for file */
+ VALUE pathv;
+
+ /** finalize proc */
+ void (*finalize)(struct rb_io_t*,int);
+
+ /** Write buffer. */
+ rb_io_buffer_t wbuf;
- /*
- * enc enc2 read action write action
- * NULL NULL force_encoding(default_external) write the byte sequence of str
- * e1 NULL force_encoding(e1) convert str.encoding to e1
- * e1 e2 convert from e2 to e1 convert str.encoding to e2
+ /**
+ * (Byte) read buffer. Note also that there is a field called
+ * ::rb_io_t::cbuf, which also concerns read IO.
*/
- struct rb_io_enc_t {
- rb_encoding *enc;
- rb_encoding *enc2;
- int ecflags;
- VALUE ecopts;
- } encs;
+ rb_io_buffer_t rbuf;
+ /**
+ * Duplex IO object, if set.
+ *
+ * @see rb_io_set_write_io()
+ */
+ VALUE tied_io_for_writing;
+
+ struct rb_io_enc_t encs; /**< Decomposed encoding flags. */
+
+ /** Encoding converter used when reading from this IO. */
rb_econv_t *readconv;
+
+ /**
+ * rb_io_ungetc() destination. This buffer is read before checking
+ * ::rb_io_t::rbuf
+ */
rb_io_buffer_t cbuf;
+ /** Encoding converter used when writing to this IO. */
rb_econv_t *writeconv;
+
+ /**
+ * This is, when set, an instance of ::rb_cString which holds the "common"
+ * encoding. Write conversion can convert strings twice... In case
+ * conversion from encoding X to encoding Y does not exist, Ruby finds an
+ * encoding Z that bridges the two, so that X to Z to Y conversion happens.
+ */
VALUE writeconv_asciicompat;
+
+ /** Whether ::rb_io_t::writeconv is already set up. */
int writeconv_initialized;
+
+ /**
+ * Value of ::rb_io_t::rb_io_enc_t::ecflags stored right before
+ * initialising ::rb_io_t::writeconv.
+ */
int writeconv_pre_ecflags;
+
+ /**
+ * Value of ::rb_io_t::rb_io_enc_t::ecopts stored right before initialising
+ * ::rb_io_t::writeconv.
+ */
VALUE writeconv_pre_ecopts;
+ /**
+ * This is a Ruby level mutex. It avoids multiple threads to write to an
+ * IO at once; helps for instance rb_io_puts() to ensure newlines right
+ * next to its arguments.
+ *
+ * This of course doesn't help inter-process IO interleaves, though.
+ */
VALUE write_lock;
+
+ /**
+ * The timeout associated with this IO when performing blocking operations.
+ */
+ VALUE timeout;
} rb_io_t;
+/** @alias{rb_io_enc_t} */
typedef struct rb_io_enc_t rb_io_enc_t;
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
#define HAVE_RB_IO_T 1
+/**
+ * @name Possible flags for ::rb_io_t::mode
+ *
+ * @{
+ */
+
+/** The IO is opened for reading. */
#define FMODE_READABLE 0x00000001
+
+/** The IO is opened for writing. */
#define FMODE_WRITABLE 0x00000002
+
+/** The IO is opened for both read/write. */
#define FMODE_READWRITE (FMODE_READABLE|FMODE_WRITABLE)
+
+/**
+ * The IO is in "binary mode". This is not what everything rb_io_binmode()
+ * concerns. This low-level flag is to stop CR <-> CRLF conversions that would
+ * happen in the underlying operating system.
+ *
+ * Setting this one and #FMODE_TEXTMODE at the same time is a contradiction.
+ * Setting this one and #ECONV_NEWLINE_DECORATOR_MASK at the same time is also
+ * a contradiction.
+ */
#define FMODE_BINMODE 0x00000004
+
+/**
+ * The IO is in "sync mode". All output is immediately flushed to the
+ * underlying operating system then. Can be set via rb_io_synchronized(), but
+ * there is no way except calling `IO#sync=` to reset.
+ */
#define FMODE_SYNC 0x00000008
+
+/**
+ * The IO is a TTY. What is a TTY and what isn't depends on the underlying
+ * operating system's `isatty(3)` output. You cannot change this.
+ */
#define FMODE_TTY 0x00000010
+
+/**
+ * Ruby eventually detects that the IO is bidirectional. For instance a TTY
+ * has such property. There are several other things known to be duplexed.
+ * Additionally you (extension library authors) can also implement your own
+ * bidirectional IO subclasses. One of such example is `Socket`.
+ */
#define FMODE_DUPLEX 0x00000020
+
+/**
+ * The IO is opened for appending. This mode always writes at the end of the
+ * IO. Ruby manages this flag for record but basically the logic behind this
+ * mode is at the underlying operating system. We almost do nothing.
+ */
#define FMODE_APPEND 0x00000040
+
+/**
+ * The IO is opened for creating. This makes sense only when the destination
+ * file does not exist at the time the IO object was created. This is the
+ * default mode for writing, but you can pass `"r+"` to `IO.open` etc., to
+ * reroute this creation.
+ */
#define FMODE_CREATE 0x00000080
/* #define FMODE_NOREVLOOKUP 0x00000100 */
+
+/**
+ * This flag amends the effect of #FMODE_CREATE, so that if there already is a
+ * file at the given path the operation fails. Using this you can be sure that
+ * the file you get is a fresh new one.
+ */
#define FMODE_EXCL 0x00000400
+
+/**
+ * This flag amends the effect of #FMODE_CREATE, so that if there already is a
+ * file at the given path it gets truncated.
+ */
#define FMODE_TRUNC 0x00000800
+
+/**
+ * The IO is in "text mode". On systems where such mode make sense, this flag
+ * changes the way the IO handles the contents. On POSIX systems it is
+ * basically a no-op, but with this flag set you can optionally let Ruby
+ * manually convert newlines, unlike when in binary mode:
+ *
+ * ```ruby
+ * IO.open("/p/a/t/h", "wt", crlf_newline: true) # "wb" is NG.
+ * ```
+ *
+ * Setting this one and #FMODE_BINMODE at the same time is a contradiction.
+ */
#define FMODE_TEXTMODE 0x00001000
/* #define FMODE_PREP 0x00010000 */
+/* #define FMODE_SIGNAL_ON_EPIPE 0x00020000 */
+
+/**
+ * This flag amends the encoding of the IO so that the BOM of the contents of
+ * the IO takes effect.
+ */
#define FMODE_SETENC_BY_BOM 0x00100000
/* #define FMODE_UNIX 0x00200000 */
/* #define FMODE_INET 0x00400000 */
/* #define FMODE_INET6 0x00800000 */
-#define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
-
-#define MakeOpenFile(obj, fp) do {\
+/** @} */
+
+/**
+ * Queries the underlying IO pointer.
+ *
+ * @param[in] obj An IO object.
+ * @param[out] fp A variable of type ::rb_io_t.
+ * @exception rb_eFrozenError `obj` is frozen.
+ * @exception rb_eIOError `obj` is closed.
+ * @post `fp` holds `obj`'s underlying IO.
+ */
+#define RB_IO_POINTER(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
+
+/**
+ * This is an old name of #RB_IO_POINTER. Not sure if we want to deprecate
+ * this macro. There still are tons of usages out there in the wild.
+ */
+#define GetOpenFile RB_IO_POINTER
+
+/**
+ * Fills an IO object. This makes the best sense when called from inside of an
+ * `#initialize` method of a 3rd party extension library that inherits
+ * ::rb_cIO.
+ *
+ * If the passed IO is already opened for something it first closes that and
+ * opens a new one instead.
+ *
+ * @param[out] obj An IO object to fill in.
+ * @param[out] fp A variable of type ::rb_io_t.
+ * @exception rb_eTypeError `obj` is not ::RUBY_T_FILE.
+ * @post `fp` holds `obj`'s underlying IO.
+ */
+#define RB_IO_OPEN(obj, fp) do {\
(fp) = rb_io_make_open_file(obj);\
} while (0)
+/**
+ * This is an old name of #RB_IO_OPEN. Not sure if we want to deprecate this
+ * macro. There still are usages out there in the wild.
+ */
+#define MakeOpenFile RB_IO_OPEN
+
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_IO_OPEN. People don't use it
+ * directly.
+ *
+ * @param[out] obj An IO object to fill in.
+ * @exception rb_eTypeError `obj` is not ::RUBY_T_FILE.
+ * @return `obj`'s backend IO.
+ * @post `obj` is initialised.
+ */
rb_io_t *rb_io_make_open_file(VALUE obj);
+/**
+ * Finds or creates a stdio's file structure from a Ruby's one. This can be
+ * handy if you want to call an external API that accepts `FILE *`.
+ *
+ * @note Note however, that `FILE`s can have their own buffer. Mixing Ruby's
+ * and stdio's file are basically dangerous. Use with care.
+ *
+ * @param[in,out] fptr Target IO.
+ * @return A stdio's file, created if absent.
+ * @post `fptr` has its corresponding stdio's file.
+ *
+ * @internal
+ *
+ * We had rich support for `FILE` before! In the days of 1.8.x ::rb_io_t was
+ * like this:
+ *
+ * ```CXX
+ * typedef struct rb_io_t {
+ * FILE *f; // stdio ptr for read/write
+ * FILE *f2; // additional ptr for rw pipes
+ * int mode; // mode flags
+ * int pid; // child's pid (for pipes)
+ * int lineno; // number of lines read
+ * char *path; // pathname for file
+ * void (*finalize) _((struct rb_io_t*,int)); // finalize proc
+ * } rb_io_t;
+ *```
+ *
+ * But we eventually abandoned this layout. It was too difficult. We could
+ * not have fine-grained control over the `f` field.
+ *
+ * - `FILE` tends to be an opaque struct. It does not interface well with
+ * `select(2)` etc. This makes IO multiplexing quite hard. Using stdio,
+ * there is arguably no portable way to know if `fwrite(3)` blocks.
+ *
+ * - Nonblocking mode, which is another core concept that enables IO
+ * multiplexing, does not interface with stdio routines at all.
+ *
+ * - Detection of duplexed IO is also hard for the same reason.
+ *
+ * - `feof(3)` is not portable.
+ * https://mail.python.org/pipermail/python-dev/2001-January/011390.html
+ *
+ * - Solaris was a thing back then. They could not have more than 256 `FILE`
+ * structures at a time. Their file descriptors ware stored in an
+ * `unsigned char`.
+ *
+ * - It is next to impossible to avoid SEGV, especially when a thread tries to
+ * `ungetc(3)`-ing from a `FILE` which is `fread(3)`-ed by another one.
+ *
+ * In short, it is a bad idea to let someone else manage IO buffers, especially
+ * someone you cannot control. This still applies to extension libraries
+ * methinks. Ruby doesn't prevent you from shooting yourself in the foot, but
+ * consider yourself warned here.
+ */
FILE *rb_io_stdio_file(rb_io_t *fptr);
-FILE *rb_fdopen(int, const char*);
+/**
+ * Identical to rb_io_stdio_file(), except it takes file descriptors instead of
+ * Ruby's IO. It can also be seen as a compatibility layer to wrap
+ * `fdopen(3)`. Nowadays all supporting systems, including Windows, have
+ * `fdopen`. Why not use them.
+ *
+ * @param[in] fd A file descriptor.
+ * @param[in] modestr C string, something like `"r+"`.
+ * @exception rb_eSystemCallError `fdopen` failed for some reason.
+ * @return A stdio's file associated with `fd`.
+ * @note Interpretation of `modestr` depends on the underlying operating
+ * system. On glibc you might be able to pass e.g. `"rm"`, but
+ * that's an extension to POSIX.
+ */
+FILE *rb_fdopen(int fd, const char *modestr);
+
+/**
+ * Maps a file mode string (that rb_file_open() takes) into a mixture of
+ * `FMODE_` flags. This for instance returns
+ * `FMODE_WRITABLE | FMODE_TRUNC | FMODE_CREATE | FMODE_EXCL` for `"wx"`.
+ *
+ * @note You cannot pass this return value to OS provided `open(2)` etc.
+ *
+ * @param[in] modestr File mode, in C's string.
+ * @exception rb_eArgError `modestr` is broken.
+ * @return A set of flags.
+ *
+ * @internal
+ *
+ * rb_io_modestr_fmode() is not a pure function because it raises.
+ */
int rb_io_modestr_fmode(const char *modestr);
+
+/**
+ * Identical to rb_io_modestr_fmode(), except it returns a mixture of `O_`
+ * flags. This for instance returns `O_WRONLY | O_TRUNC | O_CREAT | O_EXCL` for
+ * `"wx"`.
+ *
+ * @param[in] modestr File mode, in C's string.
+ * @exception rb_eArgError `modestr` is broken.
+ * @return A set of flags.
+ *
+ * @internal
+ *
+ * rb_io_modestr_oflags() is not a pure function because it raises.
+ */
int rb_io_modestr_oflags(const char *modestr);
-CONSTFUNC(int rb_io_oflags_fmode(int oflags));
-void rb_io_check_writable(rb_io_t*);
-void rb_io_check_readable(rb_io_t*);
+
+RBIMPL_ATTR_CONST()
+/**
+ * Converts an oflags (that rb_io_modestr_oflags() returns) to a fmode (that
+ * rb_io_mode_flags() returns). This is a purely functional operation.
+ *
+ * @param[in] oflags A set of `O_` flags.
+ * @return Corresponding set of `FMODE_` flags.
+ */
+int rb_io_oflags_fmode(int oflags);
+
+/**
+ * Asserts that an IO is opened for writing.
+ *
+ * @param[in] fptr An IO you want to write to.
+ * @exception rb_eIOError `fptr` is not for writing.
+ * @post Upon successful return `fptr` is ready for writing.
+ *
+ * @internal
+ *
+ * The parameter must have been `const rb_io_t *`.
+ */
+void rb_io_check_writable(rb_io_t *fptr);
+
+/** @alias{rb_io_check_byte_readable} */
+void rb_io_check_readable(rb_io_t *fptr);
+
+/**
+ * Asserts that an IO is opened for character-based reading. A character can
+ * be wider than a byte. Because of this we have to buffer reads from
+ * descriptors. This fiction checks if that is possible.
+ *
+ * @param[in] fptr An IO you want to read characters from.
+ * @exception rb_eIOError `fptr` is not for reading.
+ * @post Upon successful return `fptr` is ready for reading characters.
+ *
+ * @internal
+ *
+ * Unlike rb_io_check_writable() the parameter cannot be `const rb_io_t *`.
+ * Behind the scene this operation flushes its write buffers. This is because
+ * of OpenSSL. They mandate this way.
+ *
+ * @see "Can I use OpenSSL's SSL library with non-blocking I/O?"
+ * https://www.openssl.org/docs/faq.html
+ */
void rb_io_check_char_readable(rb_io_t *fptr);
+
+/**
+ * Asserts that an IO is opened for byte-based reading. Byte-based and
+ * character-based reading operations cannot be mixed at a time.
+ *
+ * @param[in] fptr An IO you want to read characters from.
+ * @exception rb_eIOError `fptr` is not for reading.
+ * @post Upon successful return `fptr` is ready for reading bytes.
+ */
void rb_io_check_byte_readable(rb_io_t *fptr);
-int rb_io_fptr_finalize(rb_io_t*);
-void rb_io_synchronized(rb_io_t*);
-void rb_io_check_initialized(rb_io_t*);
-void rb_io_check_closed(rb_io_t*);
+
+/**
+ * Destroys the given IO. Any pending operations are flushed.
+ *
+ * @note It makes no sense to call this function from anywhere outside of your
+ * class' ::rb_data_type_struct::dfree.
+ *
+ * @param[out] fptr IO to close.
+ * @post `fptr` is no longer a valid pointer.
+ */
+int rb_io_fptr_finalize(rb_io_t *fptr);
+
+/**
+ * Sets #FMODE_SYNC.
+ *
+ * @note There is no way for C extensions to undo this operation.
+ *
+ * @param[out] fptr IO to set the flag.
+ * @exception rb_eIOError `fptr` is not opened.
+ * @post `fptr` is in sync mode.
+ */
+void rb_io_synchronized(rb_io_t *fptr);
+
+/**
+ * Asserts that the passed IO is initialised.
+ *
+ * @param[in] fptr IO that you expect be initialised.
+ * @exception rb_eIOError `fptr` is not initialised.
+ * @post `fptr` is initialised.
+ */
+void rb_io_check_initialized(rb_io_t *fptr);
+
+/**
+ * This badly named function asserts that the passed IO is _open_.
+ *
+ * @param[in] fptr An IO
+ * @exception rb_eIOError `fptr` is closed.
+ * @post `fptr` is open.
+ */
+void rb_io_check_closed(rb_io_t *fptr);
+
+/**
+ * Identical to rb_io_check_io(), except it raises exceptions on conversion
+ * failures.
+ *
+ * @param[in] io Target object.
+ * @exception rb_eTypeError No implicit conversion to IO.
+ * @return Return value of `obj.to_io`.
+ * @see rb_str_to_str
+ * @see rb_ary_to_ary
+ */
VALUE rb_io_get_io(VALUE io);
+
+/**
+ * Try converting an object to its IO representation using its `to_io` method,
+ * if any. If there is no such thing, returns ::RUBY_Qnil.
+ *
+ * @param[in] io Arbitrary ruby object to convert.
+ * @exception rb_eTypeError `obj.to_io` returned something non-IO.
+ * @retval RUBY_Qnil No conversion from `obj` to IO defined.
+ * @retval otherwise Converted IO representation of `obj`.
+ * @see rb_check_array_type
+ * @see rb_check_string_type
+ * @see rb_check_hash_type
+ */
VALUE rb_io_check_io(VALUE io);
+
+/**
+ * Queries the tied IO for writing. An IO can be duplexed. Fine. The thing
+ * is, that characteristics could sometimes be achieved by the underlying
+ * operating system (for instance a socket's duplexity is by nature) but
+ * sometimes by us. Notable example is a bidirectional pipe. Suppose you
+ * have:
+ *
+ * ```ruby
+ * fp = IO.popen("-", "r+")
+ * ```
+ *
+ * This pipe is duplexed (the `"r+"`). You can both read from/write to it.
+ * However your operating system may or may not implement bidirectional pipes.
+ * FreeBSD is one of such operating systems known to have one; OTOH Linux is
+ * known to lack such things. So to achieve maximum portability, Ruby's
+ * bidirectional pipes are done purely in user land. A pipe in ruby can have
+ * multiple file descriptors; one for reading and the other for writing. This
+ * API is to obtain the IO port which corresponds to the passed one, for
+ * writing.
+ *
+ * @param[in] io An IO.
+ * @return Its tied IO for writing, if any, or `io` itself otherwise.
+ */
VALUE rb_io_get_write_io(VALUE io);
+
+/**
+ * Assigns the tied IO for writing. See rb_io_get_write_io() for what a "tied
+ * IO for writing" is.
+ *
+ * @param[out] io An IO.
+ * @param[in] w Another IO.
+ * @retval RUBY_Qnil There was no tied IO for writing for `io`.
+ * @retval otherwise The IO formerly tied to `io`.
+ * @post `io` ties `w` for writing.
+ *
+ * @internal
+ *
+ * @shyouhei doesn't think there is any needs of this function for 3rd party
+ * extension libraries.
+ */
VALUE rb_io_set_write_io(VALUE io, VALUE w);
-int rb_io_wait_readable(int);
-int rb_io_wait_writable(int);
-int rb_wait_for_single_fd(int fd, int events, struct timeval *tv);
+
+/**
+ * Instructs the OS to put its internal file structure into "nonblocking mode".
+ * This is an in-Kernel concept. Reading from/writing to that file using C
+ * function calls would return -1 with errno set. However when it comes to a
+ * ruby program, we hide that error behind our `IO#read` method. Ruby level
+ * `IO#read` blocks regardless of this flag. If you want to avoid blocking,
+ * you should consider using methods like `IO#readpartial`.
+ *
+ * ```ruby
+ * require 'io/nonblock'
+ * STDIN.nonblock = true
+ * STDIN.gets # blocks.
+ * ```
+ *
+ * As of writing there is a room of this API in Fiber schedulers. A Fiber
+ * scheduler could be written in a way its behaviour depends on this property.
+ * You need an in-depth understanding of how schedulers work to properly
+ * leverage this, though.
+ *
+ * @note Note however that nonblocking-ness propagates across process
+ * boundaries. You must really carefully watch your step when turning
+ * for instance `stderr` into nonblock mode (it tends to be shared
+ * across many processes). Also it is a complete disaster to mix a
+ * nonblocking file and stdio, and `stderr` tends to be under control of
+ * stdio in other processes.
+ *
+ * @param[out] fptr An IO that is to ne nonblocking.
+ * @post Descriptor that `fptr` describes is under nonblocking mode.
+ *
+ * @internal
+ *
+ * There is `O_NONBLOCK` but not `FMODE_NONBLOCK`. You cannot atomically
+ * create a nonblocking file descriptor using our API.
+ */
void rb_io_set_nonblock(rb_io_t *fptr);
+
+/**
+ * Returns an integer representing the numeric file descriptor for
+ * <em>io</em>.
+ *
+ * @param[in] io An IO.
+ * @retval int A file descriptor.
+ */
+int rb_io_descriptor(VALUE io);
+
+/**
+ * This function breaks down the option hash that `IO#initialize` takes into
+ * components. This is an implementation detail of rb_io_extract_modeenc()
+ * today. People prefer that API instead.
+ *
+ * @param[in] opt The hash to decompose.
+ * @param[out] enc_p Return value buffer.
+ * @param[out] enc2_p Return value buffer.
+ * @param[out] fmode_p Return value buffer.
+ * @exception rb_eTypeError `opt` is broken.
+ * @exception rb_eArgError Specified encoding does not exist.
+ * @retval 1 Components got extracted.
+ * @retval 0 Otherwise.
+ * @post `enc_p` is the specified internal encoding.
+ * @post `enc2_p` is the specified external encoding.
+ * @post `fmode_p` is the specified set of `FMODE_` modes.
+ */
int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p);
+
+/**
+ * This function can be seen as an extended version of
+ * rb_io_extract_encoding_option() that not only concerns the option hash but
+ * also mode string and so on. This should be mixed with rb_scan_args() like:
+ *
+ * ```CXX
+ * // This method mimics File.new
+ * static VALUE
+ * your_method(int argc, const VALUE *argv, VALUE self)
+ * {
+ * VALUE f; // file name
+ * VALUE m; // open mode
+ * VALUE p; // permission (O_CREAT)
+ * VALUE k; // keywords
+ * rb_io_enc_t c; // converter
+ * int oflags;
+ * int fmode;
+ *
+ * int n = rb_scan_args(argc, argv, "12:", &f, &m, &p, &k);
+ * rb_io_extract_modeenc(&m, &p, k, &oflags, &fmode, &c);
+ *
+ * // Every local variables declared so far has been properly filled here.
+ * ...
+ * }
+ * ```
+ *
+ * @param[in,out] vmode_p Pointer to a mode object.
+ * @param[in,out] vperm_p Pointer to a permission object.
+ * @param[in] opthash Keyword arguments
+ * @param[out] oflags_p `O_` flags return buffer.
+ * @param[out] fmode_p `FMODE_` flags return buffer.
+ * @param[out] convconfig_p Encoding config return buffer.
+ * @exception rb_eTypeError Unexpected object (e.g. Time) passed.
+ * @exception rb_eArgError Contradiction inside of params.
+ * @post `*vmode_p` is a mode object (filled if any).
+ * @post `*vperm_p` is a permission object (filled if any).
+ * @post `*oflags_p` is filled with `O_` flags.
+ * @post `*fmode_p` is filled with `FMODE_` flags.
+ * @post `*convconfig_p` is filled with conversion instructions.
+ *
+ * @internal
+ *
+ * ```rbs
+ * class File
+ * def initialize: (
+ * (String | int) path,
+ * ?(String | int) fmode,
+ * ?(String | int) perm,
+ * ?mode: (String | int),
+ * ?flags: int,
+ * ?external_encoding: (Encoding | String),
+ * ?internal_encoding: (Encoding | String),
+ * ?encoding: String,
+ * ?textmode: bool,
+ * ?binmode: bool,
+ * ?autoclose: bool,
+ * ?invalid: :replace,
+ * ?undef: :replace,
+ * ?replace: String,
+ * ?fallback: (Hash | Proc | Method),
+ * ?xml: (:text | :attr),
+ * ?crlf_newline: bool,
+ * ?cr_newline: bool,
+ * ?universal_newline: bool
+ * ) -> void
+ * ```
+ */
void rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash, int *oflags_p, int *fmode_p, rb_io_enc_t *convconfig_p);
+
+/* :TODO: can this function be __attribute__((warn_unused_result)) or not? */
+/**
+ * Buffered write to the passed IO.
+ *
+ * @param[out] io Destination IO.
+ * @param[in] buf Contents to go to `io`.
+ * @param[in] size Number of bytes of `buf`.
+ * @exception rb_eFrozenError `io` is frozen.
+ * @exception rb_eIOError `io` is not open for writing.
+ * @exception rb_eSystemCallError `writev(2)` failed for some reason.
+ * @retval -1 Write failed.
+ * @retval otherwise Number of bytes actually written.
+ * @post `buf` is written to `io`.
+ * @note Partial write is a thing. It is a failure not to check the
+ * return value.
+ */
ssize_t rb_io_bufwrite(VALUE io, const void *buf, size_t size);
+//RBIMPL_ATTR_DEPRECATED(("use rb_io_maybe_wait_readable"))
+/**
+ * Blocks until the passed file descriptor gets readable.
+ *
+ * @deprecated We now prefer rb_io_maybe_wait_readable() over this one.
+ * @param[in] fd The file descriptor to wait.
+ * @exception rb_eIOError Bad file descriptor.
+ * @return 0 or 1 (meaning unclear).
+ * @post `fd` is ready for reading.
+ */
+int rb_io_wait_readable(int fd);
+
+//RBIMPL_ATTR_DEPRECATED(("use rb_io_maybe_wait_writable"))
+/**
+ * Blocks until the passed file descriptor gets writable.
+ *
+ * @deprecated We now prefer rb_io_maybe_wait_writable() over this one.
+ * @param[in] fd The file descriptor to wait.
+ * @exception rb_eIOError Bad file descriptor.
+ * @return 0 or 1 (meaning unclear).
+ */
+int rb_io_wait_writable(int fd);
+
+//RBIMPL_ATTR_DEPRECATED(("use rb_io_wait"))
+/**
+ * Blocks until the passed file descriptor is ready for the passed events.
+ *
+ * @deprecated We now prefer rb_io_maybe_wait() over this one.
+ * @param[in] fd The file descriptor to wait.
+ * @param[in] events A set of enum ::rb_io_event_t.
+ * @param[in,out] tv Timeout.
+ * @retval 0 Operation timed out.
+ * @retval -1 `select(2)` failed for some reason.
+ * @retval otherwise A set of enum ::rb_io_event_t.
+ * @note Depending on your operating system `tv` might or might not
+ * be updated (POSIX permits both). Portable programs must
+ * have no assumptions.
+ */
+int rb_wait_for_single_fd(int fd, int events, struct timeval *tv);
+
+/**
+ * Get the timeout associated with the specified io object.
+ *
+ * @param[in] io An IO object.
+ * @retval RUBY_Qnil There is no associated timeout.
+ * @retval Otherwise The timeout value.
+ */
+VALUE rb_io_timeout(VALUE io);
+
+/**
+ * Set the timeout associated with the specified io object. This timeout is
+ * used as a best effort timeout to prevent operations from blocking forever.
+ *
+ * @param[in] io An IO object.
+ * @param[in] timeout A timeout value. Must respond to #to_f.
+ * @
+ */
+VALUE rb_io_set_timeout(VALUE io, VALUE timeout);
+
+/**
+ * Blocks until the passed IO is ready for the passed events. The "events"
+ * here is a Ruby level integer, which is an OR-ed value of `IO::READABLE`,
+ * `IO::WRITable`, and `IO::PRIORITY`.
+ *
+ * If timeout is `Qnil`, it will use the default timeout as given by
+ * `rb_io_timeout(io)`.
+ *
+ * @param[in] io An IO object to wait.
+ * @param[in] events See above.
+ * @param[in] timeout Time, or numeric seconds since UNIX epoch.
+ * If Qnil, use the default timeout. If Qfalse
+ * or Qundef, wait forever.
+ * @exception rb_eIOError `io` is not open.
+ * @exception rb_eRangeError `timeout` is out of range.
+ * @exception rb_eSystemCallError `select(2)` failed for some reason.
+ * @retval RUBY_Qfalse Operation timed out.
+ * @retval Otherwise Actual events reached.
+ */
+VALUE rb_io_wait(VALUE io, VALUE events, VALUE timeout);
+
+/**
+ * Identical to rb_io_wait() except it additionally takes previous errno. If
+ * the passed errno indicates for instance `EINTR`, this function returns
+ * immediately. This is expected to be called in a loop.
+ *
+ * ```CXX
+ * while (true) {
+ *
+ * ... // Your interesting operation here
+ * // `errno` could be updated
+ *
+ * rb_io_maybe_wait(errno, io, ev, Qnil);
+ * }
+ * ```
+ *
+ * @param[in] error System errno.
+ * @param[in] io An IO object to wait.
+ * @param[in] events An integer set of interests.
+ * @param[in] timeout Time, or numeric seconds since UNIX epoch.
+ * @exception rb_eIOError `io` is not open.
+ * @exception rb_eRangeError `timeout` is out of range.
+ * @exception rb_eSystemCallError `select(2)` failed for some reason.
+ * @retval RUBY_Qfalse Operation timed out.
+ * @retval Otherwise Actual events reached.
+ *
+ * @internal
+ *
+ * This function to return ::RUBY_Qfalse on timeout could be unintended. It
+ * seems timeout feature has some rough edge.
+ */
+VALUE rb_io_maybe_wait(int error, VALUE io, VALUE events, VALUE timeout);
+
+/**
+ * Blocks until the passed IO is ready for reading, if that makes sense for the
+ * passed errno. This is a special case of rb_io_maybe_wait() that only
+ * concerns for reading.
+ *
+ * @param[in] error System errno.
+ * @param[in] io An IO object to wait.
+ * @param[in] timeout Time, or numeric seconds since UNIX epoch.
+ * @exception rb_eIOError `io` is not open.
+ * @exception rb_eRangeError `timeout` is out of range.
+ * @exception rb_eSystemCallError `select(2)` failed for some reason.
+ * @retval 0 Operation timed out.
+ * @retval Otherwise Always returns ::RUBY_IO_READABLE.
+ */
+int rb_io_maybe_wait_readable(int error, VALUE io, VALUE timeout);
+
+/**
+ * Blocks until the passed IO is ready for writing, if that makes sense for the
+ * passed errno. This is a special case of rb_io_maybe_wait() that only
+ * concernsfor writing.
+ *
+ * @param[in] error System errno.
+ * @param[in] io An IO object to wait.
+ * @param[in] timeout Time, or numeric seconds since UNIX epoch.
+ * @exception rb_eIOError `io` is not open.
+ * @exception rb_eRangeError `timeout` is out of range.
+ * @exception rb_eSystemCallError `select(2)` failed for some reason.
+ * @retval 0 Operation timed out.
+ * @retval Otherwise Always returns ::RUBY_IO_WRITABLE.
+ */
+int rb_io_maybe_wait_writable(int error, VALUE io, VALUE timeout);
+
+/** @cond INTERNAL_MACRO */
/* compatibility for ruby 1.8 and older */
#define rb_io_mode_flags(modestr) [<"rb_io_mode_flags() is obsolete; use rb_io_modestr_fmode()">]
#define rb_io_modenum_flags(oflags) [<"rb_io_modenum_flags() is obsolete; use rb_io_oflags_fmode()">]
-
-VALUE rb_io_taint_check(VALUE);
-NORETURN(void rb_eof_error(void));
-
-void rb_io_read_check(rb_io_t*);
-int rb_io_read_pending(rb_io_t*);
-
-struct stat;
-VALUE rb_stat_new(const struct stat *);
+/** @endcond */
+
+/**
+ * @deprecated This function once was a thing in the old days, but makes no
+ * sense any longer today. Exists here for backwards
+ * compatibility only. You can safely forget about it.
+ *
+ * @param[in] obj Object in question.
+ * @exception rb_eFrozenError obj is frozen.
+ * @return The passed `obj`
+ */
+VALUE rb_io_taint_check(VALUE obj);
+
+RBIMPL_ATTR_NORETURN()
+/**
+ * Utility function to raise ::rb_eEOFError.
+ *
+ * @exception rb_eEOFError End of file situation.
+ * @note It never returns.
+ */
+void rb_eof_error(void);
+
+/**
+ * Blocks until there is a pending read in the passed IO. If there already is
+ * it just returns.
+ *
+ * @param[out] fptr An IO to wait for reading.
+ * @post The are bytes to be read.
+ */
+void rb_io_read_check(rb_io_t *fptr);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Queries if the passed IO has any pending reads. Unlike rb_io_read_check()
+ * this doesn't block; has no side effects.
+ *
+ * @param[in] fptr An IO which can have pending reads.
+ * @retval 0 The IO is empty.
+ * @retval 1 There is something buffered.
+ */
+int rb_io_read_pending(rb_io_t *fptr);
+
+/**
+ * Constructs an instance of ::rb_cStat from the passed information.
+ *
+ * @param[in] st A stat.
+ * @return Allocated new instance of ::rb_cStat.
+ */
+VALUE rb_stat_new(const struct stat *st);
/* gc.c */
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_IO_H */
diff --git a/include/ruby/io/buffer.h b/include/ruby/io/buffer.h
new file mode 100644
index 0000000000..e4b855d8e7
--- /dev/null
+++ b/include/ruby/io/buffer.h
@@ -0,0 +1,92 @@
+#ifndef RUBY_IO_BUFFER_H
+#define RUBY_IO_BUFFER_H
+/**
+ * @file
+ * @author Samuel Williams
+ * @date Fri 2 Jul 2021 16:29:01 NZST
+ * @copyright Copyright (C) 2021 Samuel Williams
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+
+#pragma once
+
+#include "ruby/ruby.h"
+#include "ruby/internal/config.h"
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+// WARNING: This entire interface is experimental and may change in the future!
+#define RB_IO_BUFFER_EXPERIMENTAL 1
+
+#define RUBY_IO_BUFFER_VERSION 2
+
+RUBY_EXTERN VALUE rb_cIOBuffer;
+RUBY_EXTERN size_t RUBY_IO_BUFFER_PAGE_SIZE;
+RUBY_EXTERN size_t RUBY_IO_BUFFER_DEFAULT_SIZE;
+
+enum rb_io_buffer_flags {
+ // The memory in the buffer is owned by someone else.
+ // More specifically, it means that someone else owns the buffer and we shouldn't try to resize it.
+ RB_IO_BUFFER_EXTERNAL = 1,
+ // The memory in the buffer is allocated internally.
+ RB_IO_BUFFER_INTERNAL = 2,
+ // The memory in the buffer is mapped.
+ // A non-private mapping is marked as external.
+ RB_IO_BUFFER_MAPPED = 4,
+
+ // A mapped buffer that is also shared.
+ RB_IO_BUFFER_SHARED = 8,
+
+ // The buffer is locked and cannot be resized.
+ // More specifically, it means we can't change the base address or size.
+ // A buffer is typically locked before a system call that uses the data.
+ RB_IO_BUFFER_LOCKED = 32,
+
+ // The buffer mapping is private and will not impact other processes or the underlying file.
+ RB_IO_BUFFER_PRIVATE = 64,
+
+ // The buffer is read-only and cannot be modified.
+ RB_IO_BUFFER_READONLY = 128
+};
+
+enum rb_io_buffer_endian {
+ RB_IO_BUFFER_LITTLE_ENDIAN = 4,
+ RB_IO_BUFFER_BIG_ENDIAN = 8,
+
+#if defined(WORDS_BIGENDIAN)
+ RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_BIG_ENDIAN,
+#else
+ RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_LITTLE_ENDIAN,
+#endif
+
+ RB_IO_BUFFER_NETWORK_ENDIAN = RB_IO_BUFFER_BIG_ENDIAN
+};
+
+VALUE rb_io_buffer_new(void *base, size_t size, enum rb_io_buffer_flags flags);
+VALUE rb_io_buffer_map(VALUE io, size_t size, rb_off_t offset, enum rb_io_buffer_flags flags);
+
+VALUE rb_io_buffer_lock(VALUE self);
+VALUE rb_io_buffer_unlock(VALUE self);
+int rb_io_buffer_try_unlock(VALUE self);
+VALUE rb_io_buffer_free(VALUE self);
+
+int rb_io_buffer_get_bytes(VALUE self, void **base, size_t *size);
+void rb_io_buffer_get_bytes_for_reading(VALUE self, const void **base, size_t *size);
+void rb_io_buffer_get_bytes_for_writing(VALUE self, void **base, size_t *size);
+
+VALUE rb_io_buffer_transfer(VALUE self);
+void rb_io_buffer_resize(VALUE self, size_t size);
+void rb_io_buffer_clear(VALUE self, uint8_t value, size_t offset, size_t length);
+
+// The length is the minimum required length.
+VALUE rb_io_buffer_read(VALUE self, VALUE io, size_t length, size_t offset);
+VALUE rb_io_buffer_pread(VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset);
+VALUE rb_io_buffer_write(VALUE self, VALUE io, size_t length, size_t offset);
+VALUE rb_io_buffer_pwrite(VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+#endif /* RUBY_IO_BUFFER_H */
diff --git a/include/ruby/memory_view.h b/include/ruby/memory_view.h
new file mode 100644
index 0000000000..1ddca2d46f
--- /dev/null
+++ b/include/ruby/memory_view.h
@@ -0,0 +1,325 @@
+#ifndef RUBY_MEMORY_VIEW_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_MEMORY_VIEW_H 1
+/**
+ * @file
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Memory View.
+ */
+
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h> /* size_t */
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* ssize_t */
+#endif
+
+#include "ruby/internal/attr/pure.h" /* RBIMPL_ATTR_PURE */
+#include "ruby/internal/core/rtypeddata.h" /* rb_data_type_t */
+#include "ruby/internal/dllexport.h" /* RUBY_EXTERN */
+#include "ruby/internal/stdbool.h" /* bool */
+#include "ruby/internal/value.h" /* VALUE */
+
+/**
+ * Flags passed to rb_memory_view_get(), then to ::rb_memory_view_get_func_t.
+ */
+enum ruby_memory_view_flags {
+ RUBY_MEMORY_VIEW_SIMPLE = 0,
+ RUBY_MEMORY_VIEW_WRITABLE = (1<<0),
+ RUBY_MEMORY_VIEW_FORMAT = (1<<1),
+ RUBY_MEMORY_VIEW_MULTI_DIMENSIONAL = (1<<2),
+ RUBY_MEMORY_VIEW_STRIDES = (1<<3) | RUBY_MEMORY_VIEW_MULTI_DIMENSIONAL,
+ RUBY_MEMORY_VIEW_ROW_MAJOR = (1<<4) | RUBY_MEMORY_VIEW_STRIDES,
+ RUBY_MEMORY_VIEW_COLUMN_MAJOR = (1<<5) | RUBY_MEMORY_VIEW_STRIDES,
+ RUBY_MEMORY_VIEW_ANY_CONTIGUOUS = RUBY_MEMORY_VIEW_ROW_MAJOR | RUBY_MEMORY_VIEW_COLUMN_MAJOR,
+ RUBY_MEMORY_VIEW_INDIRECT = (1<<6) | RUBY_MEMORY_VIEW_STRIDES,
+};
+
+/** Memory view component metadata. */
+typedef struct {
+ /** @see ::rb_memory_view_t::format */
+ char format;
+
+ /** :FIXME: what is a "native" size is unclear. */
+ unsigned native_size_p: 1;
+
+ /** Endian of the component */
+ unsigned little_endian_p: 1;
+
+ /** The component's offset. */
+ size_t offset;
+
+ /** The component's size. */
+ size_t size;
+
+ /**
+ * How many numbers of components are there. For instance "CCC"'s repeat is
+ * 3.
+ */
+ size_t repeat;
+} rb_memory_view_item_component_t;
+
+/**
+ * A MemoryView structure, `rb_memory_view_t`, is used for exporting objects'
+ * MemoryView.
+ *
+ * This structure contains the reference of the object, which is the owner of
+ * the MemoryView, the pointer to the head of exported memory, and the metadata
+ * that describes the structure of the memory. The metadata can describe
+ * multidimensional arrays with strides.
+ */
+typedef struct {
+ /**
+ * The original object that has the memory exported via this memory view.
+ */
+ VALUE obj;
+
+ /** The pointer to the exported memory. */
+ void *data;
+
+ /** The number of bytes in data. */
+ ssize_t byte_size;
+
+ /** true for readonly memory, false for writable memory. */
+ bool readonly;
+
+ /**
+ * A string to describe the format of an element, or NULL for unsigned bytes.
+ * The format string is a sequence of the following pack-template specifiers:
+ *
+ * c, C, s, s!, S, S!, n, v, i, i!, I, I!, l, l!, L, L!,
+ * N, V, f, e, g, q, q!, Q, Q!, d, E, G, j, J, x
+ *
+ * For example, "dd" for an element that consists of two double values,
+ * and "CCC" for an element that consists of three bytes, such as
+ * an RGB color triplet.
+ *
+ * Also, the value endianness can be explicitly specified by '<' or '>'
+ * following a value type specifier.
+ *
+ * The items are packed contiguously. When you emulate the alignment of
+ * structure members, put '|' at the beginning of the format string,
+ * like "|iqc". On x86_64 Linux ABI, the size of the item by this format
+ * is 24 bytes instead of 13 bytes.
+ */
+ const char *format;
+
+ /**
+ * The number of bytes in each element.
+ * item_size should equal to rb_memory_view_item_size_from_format(format). */
+ ssize_t item_size;
+
+ /** Description of each components. */
+ struct {
+ /**
+ * The array of rb_memory_view_item_component_t that describes the
+ * item structure. rb_memory_view_prepare_item_desc and
+ * rb_memory_view_get_item allocate this memory if needed,
+ * and rb_memory_view_release frees it. */
+ const rb_memory_view_item_component_t *components;
+
+ /** The number of components in an item. */
+ size_t length;
+ } item_desc;
+
+ /** The number of dimension. */
+ ssize_t ndim;
+
+ /**
+ * ndim size array indicating the number of elements in each dimension.
+ * This can be NULL when ndim == 1. */
+ const ssize_t *shape;
+
+ /**
+ * ndim size array indicating the number of bytes to skip to go to the
+ * next element in each dimension. */
+ const ssize_t *strides;
+
+ /**
+ * The offset in each dimension when this memory view exposes a nested array.
+ * Or, NULL when this memory view exposes a flat array. */
+ const ssize_t *sub_offsets;
+
+ /** The private data for managing this exported memory */
+ void *private_data;
+
+ /** DO NOT TOUCH THIS: The memory view entry for the internal use */
+ const struct rb_memory_view_entry *_memory_view_entry;
+} rb_memory_view_t;
+
+/** Type of function of ::rb_memory_view_entry_t::get_func. */
+typedef bool (* rb_memory_view_get_func_t)(VALUE obj, rb_memory_view_t *view, int flags);
+
+/** Type of function of ::rb_memory_view_entry_t::release_func. */
+typedef bool (* rb_memory_view_release_func_t)(VALUE obj, rb_memory_view_t *view);
+
+/** Type of function of ::rb_memory_view_entry_t::available_p_func. */
+typedef bool (* rb_memory_view_available_p_func_t)(VALUE obj);
+
+/** Operations applied to a specific kind of a memory view. */
+typedef struct rb_memory_view_entry {
+ /**
+ * Exports a memory view from a Ruby object.
+ */
+ rb_memory_view_get_func_t get_func;
+
+ /**
+ * Releases a memory view that was previously generated using
+ * ::rb_memory_view_entry_t::get_func.
+ */
+ rb_memory_view_release_func_t release_func;
+
+ /**
+ * Queries if an object understands memory view protocol.
+ */
+ rb_memory_view_available_p_func_t available_p_func;
+} rb_memory_view_entry_t;
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/* memory_view.c */
+
+/**
+ * Associates the passed class with the passed memory view entry. This has to
+ * be called before actually creating a memory view from an instance.
+ */
+bool rb_memory_view_register(VALUE klass, const rb_memory_view_entry_t *entry);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Return `true` if the data in the MemoryView `view` is row-major contiguous.
+ *
+ * Return `false` otherwise.
+ */
+bool rb_memory_view_is_row_major_contiguous(const rb_memory_view_t *view);
+
+RBIMPL_ATTR_PURE()
+/**
+ * Return `true` if the data in the MemoryView `view` is column-major
+ * contiguous.
+ *
+ * Return `false` otherwise.
+ */
+bool rb_memory_view_is_column_major_contiguous(const rb_memory_view_t *view);
+
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Fill the `strides` array with byte-Strides of a contiguous array of the
+ * given shape with the given element size.
+ */
+void rb_memory_view_fill_contiguous_strides(const ssize_t ndim, const ssize_t item_size, const ssize_t *const shape, const bool row_major_p, ssize_t *const strides);
+
+RBIMPL_ATTR_NOALIAS()
+/**
+ * Fill the members of `view` as an 1-dimensional byte array.
+ */
+bool rb_memory_view_init_as_byte_array(rb_memory_view_t *view, VALUE obj, void *data, const ssize_t len, const bool readonly);
+
+/**
+ * Deconstructs the passed format string, as describe in
+ * ::rb_memory_view_t::format.
+ */
+ssize_t rb_memory_view_parse_item_format(const char *format,
+ rb_memory_view_item_component_t **members,
+ size_t *n_members, const char **err);
+
+/**
+ * Calculate the number of bytes occupied by an element.
+ *
+ * When the calculation fails, the failed location in `format` is stored into
+ * `err`, and returns `-1`.
+ */
+ssize_t rb_memory_view_item_size_from_format(const char *format, const char **err);
+
+/**
+ * Calculate the location of the item indicated by the given `indices`.
+ *
+ * The length of `indices` must equal to `view->ndim`.
+ *
+ * This function initializes `view->item_desc` if needed.
+ */
+void *rb_memory_view_get_item_pointer(rb_memory_view_t *view, const ssize_t *indices);
+
+/**
+ * Return a value that consists of item members.
+ *
+ * When an item is a single member, the return value is a single value.
+ *
+ * When an item consists of multiple members, an array will be returned.
+ */
+VALUE rb_memory_view_extract_item_members(const void *ptr, const rb_memory_view_item_component_t *members, const size_t n_members);
+
+/** Fill the `item_desc` member of `view`. */
+void rb_memory_view_prepare_item_desc(rb_memory_view_t *view);
+
+/** * Return a value that consists of item members in the given memory view. */
+VALUE rb_memory_view_get_item(rb_memory_view_t *view, const ssize_t *indices);
+
+/**
+ * Return `true` if `obj` supports to export a MemoryView. Return `false`
+ * otherwise.
+ *
+ * If this function returns `true`, it doesn't mean the function
+ * `rb_memory_view_get` will succeed.
+ */
+bool rb_memory_view_available_p(VALUE obj);
+
+/**
+ * If the given `obj` supports to export a MemoryView that conforms the given
+ * `flags`, this function fills `view` by the information of the MemoryView and
+ * returns `true`. In this case, the reference count of `obj` is increased.
+ *
+ * If the given combination of `obj` and `flags` cannot export a MemoryView,
+ * this function returns `false`. The content of `view` is not touched in this
+ * case.
+ *
+ * The exported MemoryView must be released by `rb_memory_view_release` when
+ * the MemoryView is no longer needed.
+ */
+bool rb_memory_view_get(VALUE obj, rb_memory_view_t* memory_view, int flags);
+
+/**
+ * Release the given MemoryView `view` and decrement the reference count of
+ * `memory_view->obj`.
+ *
+ * Consumers must call this function when the MemoryView is no longer needed.
+ * Missing to call this function leads memory leak.
+ */
+bool rb_memory_view_release(rb_memory_view_t* memory_view);
+
+/* for testing */
+/** @cond INTERNAL_MACRO */
+RUBY_EXTERN VALUE rb_memory_view_exported_object_registry;
+RUBY_EXTERN const rb_data_type_t rb_memory_view_exported_object_registry_data_type;
+/** @endcond */
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE()
+/**
+ * Return `true` if the data in the MemoryView `view` is row-major or
+ * column-major contiguous.
+ *
+ * Return `false` otherwise.
+ */
+static inline bool
+rb_memory_view_is_contiguous(const rb_memory_view_t *view)
+{
+ if (rb_memory_view_is_row_major_contiguous(view)) {
+ return true;
+ }
+ else if (rb_memory_view_is_column_major_contiguous(view)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+#endif /* RUBY_BUFFER_H */
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 03657042ce..aea6c9088d 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -1,42 +1,57 @@
-/************************************************
-
- missing.h - prototype for *.c in ./missing, and
- for missing timeval struct
-
- $Author$
- created at: Sat May 11 23:46:03 JST 2002
-
-************************************************/
-
-#ifndef RUBY_MISSING_H
+#ifndef RUBY_MISSING_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_MISSING_H 1
+/**
+ * @author $Author$
+ * @date Sat May 11 23:46:03 JST 2002
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Prototype for *.c in ./missing, and for missing timeval struct.
+ */
+#include "ruby/internal/config.h"
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
+#ifdef STDC_HEADERS
+# include <stddef.h>
#endif
+
+#if defined(__cplusplus)
+# include <cmath>
+#else
+# include <math.h> /* for INFINITY and NAN */
#endif
-#include "ruby/config.h"
-#include <stddef.h>
-#include <math.h> /* for INFINITY and NAN */
#ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
# include RUBY_ALTERNATIVE_MALLOC_HEADER
#endif
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
-#endif
-#if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
#if defined(HAVE_TIME_H)
# include <time.h>
#endif
+
#if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
#endif
+
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/attr/format.h"
+
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
@@ -44,11 +59,6 @@ extern "C" {
# define M_PI_2 (M_PI/2)
#endif
-#ifndef RUBY_SYMBOL_EXPORT_BEGIN
-# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
-# define RUBY_SYMBOL_EXPORT_END /* end */
-#endif
-
#if !defined(HAVE_STRUCT_TIMEVAL)
struct timeval {
time_t tv_sec; /* seconds */
@@ -57,6 +67,10 @@ struct timeval {
#endif /* HAVE_STRUCT_TIMEVAL */
#if !defined(HAVE_STRUCT_TIMESPEC)
+/* :BEWARE: @shyouhei warns that IT IS A WRONG IDEA to define our own version
+ * of struct timespec here. `clock_gettime` is a system call, and your kernel
+ * could expect something other than just `long` (results stack smashing if
+ * that happens). See also https://ewontfix.com/19/ */
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
@@ -70,14 +84,7 @@ struct timezone {
};
#endif
-#ifdef RUBY_EXPORT
-#undef RUBY_EXTERN
-#endif
-#ifndef RUBY_EXTERN
-#define RUBY_EXTERN extern
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#ifndef HAVE_ACOSH
RUBY_EXTERN double acosh(double);
@@ -89,10 +96,6 @@ RUBY_EXTERN double atanh(double);
RUBY_EXTERN char *crypt(const char *, const char *);
#endif
-#ifndef HAVE_DUP2
-RUBY_EXTERN int dup2(int, int);
-#endif
-
#ifndef HAVE_EACCESS
RUBY_EXTERN int eaccess(const char*, int);
#endif
@@ -101,10 +104,6 @@ RUBY_EXTERN int eaccess(const char*, int);
RUBY_EXTERN double round(double); /* numeric.c */
#endif
-#ifndef HAVE_FINITE
-RUBY_EXTERN int finite(double);
-#endif
-
#ifndef HAVE_FLOCK
RUBY_EXTERN int flock(int, int);
#endif
@@ -161,36 +160,9 @@ RUBY_EXTERN const union bytesequence4_or_float rb_nan;
# define HUGE_VAL ((double)INFINITY)
#endif
-#ifndef isinf
-# ifndef HAVE_ISINF
-# if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
-# ifdef HAVE_IEEEFP_H
-# include <ieeefp.h>
-# endif
-# define isinf(x) (!finite(x) && !isnan(x))
-# elif defined(__cplusplus) && __cplusplus >= 201103L
-# include <cmath> // it must include constexpr bool isinf(double);
-# else
-RUBY_EXTERN int isinf(double);
-# endif
-# endif
-#endif
-
-#ifndef isnan
-# ifndef HAVE_ISNAN
-# if defined(__cplusplus) && __cplusplus >= 201103L
-# include <cmath> // it must include constexpr bool isnan(double);
-# else
-RUBY_EXTERN int isnan(double);
-# endif
-# endif
-#endif
-
-#ifndef isfinite
-# ifndef HAVE_ISFINITE
-# define HAVE_ISFINITE 1
-# define isfinite(x) finite(x)
-# endif
+#ifndef HAVE_FINITE
+# define HAVE_FINITE 1
+# define finite(x) isfinite(x)
#endif
#ifndef HAVE_NAN
@@ -238,17 +210,13 @@ RUBY_EXTERN size_t strlcpy(char *, const char*, size_t);
RUBY_EXTERN size_t strlcat(char *, const char*, size_t);
#endif
-#ifndef HAVE_SIGNBIT
-RUBY_EXTERN int signbit(double x);
-#endif
-
#ifndef HAVE_FFS
RUBY_EXTERN int ffs(int);
#endif
#ifdef BROKEN_CLOSE
-#include <sys/types.h>
-#include <sys/socket.h>
+# include <sys/types.h>
+# include <sys/socket.h>
RUBY_EXTERN int ruby_getpeername(int, struct sockaddr *, socklen_t *);
RUBY_EXTERN int ruby_getsockname(int, struct sockaddr *, socklen_t *);
RUBY_EXTERN int ruby_shutdown(int, int);
@@ -256,23 +224,119 @@ RUBY_EXTERN int ruby_close(int);
#endif
#ifndef HAVE_SETPROCTITLE
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
RUBY_EXTERN void setproctitle(const char *fmt, ...);
#endif
-#ifndef HAVE_EXPLICIT_BZERO
+#ifdef HAVE_EXPLICIT_BZERO
+# /* Take that. */
+#elif defined(SecureZeroMemory)
+# define explicit_bzero(b, len) SecureZeroMemory(b, len)
+#else
RUBY_EXTERN void explicit_bzero(void *b, size_t len);
-# if defined SecureZeroMemory
-# define explicit_bzero(b, len) SecureZeroMemory(b, len)
-# endif
#endif
-RUBY_SYMBOL_EXPORT_END
+#ifndef HAVE_TZSET
+RUBY_EXTERN void tzset(void);
+#endif
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
+#ifndef HAVE_POSIX_MADVISE
+RUBY_EXTERN int posix_madvise(void *, size_t, int);
+#endif
+
+#ifndef HAVE_GETEUID
+RUBY_EXTERN rb_uid_t geteuid(void);
+#endif
+
+#ifndef HAVE_GETUID
+RUBY_EXTERN rb_uid_t getuid(void);
+#endif
+
+#ifndef HAVE_GETEGID
+RUBY_EXTERN rb_gid_t getegid(void);
+#endif
+
+#ifndef HAVE_GETGID
+RUBY_EXTERN rb_gid_t getgid(void);
+#endif
+
+#ifndef HAVE_GETLOGIN
+RUBY_EXTERN char *getlogin(void);
+#endif
+
+#ifndef HAVE_GETPPID
+RUBY_EXTERN rb_pid_t getppid(void);
+#endif
+
+#ifndef HAVE_UMASK
+RUBY_EXTERN rb_mode_t umask(rb_mode_t);
+#endif
+
+#ifndef HAVE_CHMOD
+RUBY_EXTERN int chmod(const char *, rb_mode_t);
#endif
-} /* extern "C" { */
+
+#ifndef HAVE_CHOWN
+RUBY_EXTERN int chown(const char *, rb_uid_t, rb_gid_t);
+#endif
+
+#ifndef HAVE_PCLOSE
+RUBY_EXTERN int pclose(FILE *);
#endif
+#ifndef HAVE_POPEN
+RUBY_EXTERN FILE *popen(const char *, const char *);
+#endif
+
+#ifndef HAVE_PIPE
+RUBY_EXTERN int pipe(int [2]);
+#endif
+
+#ifndef HAVE_DUP
+RUBY_EXTERN int dup(int);
+#endif
+
+#ifndef HAVE_DUP2
+RUBY_EXTERN int dup2(int, int);
+#endif
+
+#ifndef HAVE_KILL
+RUBY_EXTERN int kill(rb_pid_t, int);
+#endif
+
+#ifndef HAVE_EXECL
+RUBY_EXTERN int execl(const char *, const char *, ...);
+#endif
+
+#ifndef HAVE_EXECLE
+RUBY_EXTERN int execle(const char *, const char *, ...);
+#endif
+
+#ifndef HAVE_EXECV
+RUBY_EXTERN int execv(const char *, char *const []);
+#endif
+
+#ifndef HAVE_EXECVE
+RUBY_EXTERN int execve(const char *, char *const [], char *const []);
+#endif
+
+#ifndef HAVE_SHUTDOWN
+RUBY_EXTERN int shutdown(int, int);
+#endif
+
+#ifndef HAVE_SYSTEM
+RUBY_EXTERN int system(const char *);
+#endif
+
+#ifndef WNOHANG
+# define WNOHANG 0
+#endif
+
+#ifndef HAVE_WAITPID
+# define HAVE_WAITPID 1
+RUBY_EXTERN rb_pid_t waitpid(rb_pid_t, int *, int);
+#endif
+
+RBIMPL_SYMBOL_EXPORT_END()
+
#endif /* RUBY_MISSING_H */
diff --git a/include/ruby/onigmo.h b/include/ruby/onigmo.h
index 6187b37dc3..8d7c601703 100644
--- a/include/ruby/onigmo.h
+++ b/include/ruby/onigmo.h
@@ -356,9 +356,9 @@ int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, c
#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc)
ONIG_EXTERN
-int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
+int onigenc_mbclen(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
-#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc)
+#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen(p,e,enc)
#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len)
#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len)
@@ -744,6 +744,8 @@ typedef struct {
typedef struct {
int lower;
int upper;
+ long base_num;
+ long inner_num;
} OnigRepeatRange;
typedef void (*OnigWarnFunc)(const char* s);
@@ -793,6 +795,13 @@ typedef struct re_pattern_buffer {
OnigDistance dmin; /* min-distance of exact or map */
OnigDistance dmax; /* max-distance of exact or map */
+ /* rb_hrtime_t from hrtime.h */
+#ifdef MY_RUBY_BUILD_MAY_TIME_TRAVEL
+ int128_t timelimit;
+#else
+ uint64_t timelimit;
+#endif
+
/* regex_t link chain */
struct re_pattern_buffer* chain; /* escape compile-conflict */
} OnigRegexType;
@@ -845,6 +854,8 @@ OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar*
ONIG_EXTERN
OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option);
ONIG_EXTERN
+int onig_check_linear_time(OnigRegex reg);
+ONIG_EXTERN
OnigRegion* onig_region_new(void);
ONIG_EXTERN
void onig_region_init(OnigRegion* region);
diff --git a/include/ruby/ractor.h b/include/ruby/ractor.h
new file mode 100644
index 0000000000..7811616f6d
--- /dev/null
+++ b/include/ruby/ractor.h
@@ -0,0 +1,264 @@
+#ifndef RUBY_RACTOR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_RACTOR_H 1
+
+/**
+ * @file
+ * @author Koichi Sasada
+ * @date Tue Nov 17 16:39:15 2020
+ * @copyright Copyright (C) 2020 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "internal/dllexport.h" /* RUBY_EXTERN is here */
+#include "internal/fl_type.h" /* FL_TEST_RAW is here */
+#include "internal/special_consts.h" /* RB_SPECIAL_CONSTS_P is here */
+#include "internal/stdbool.h" /* bool is here */
+#include "internal/value.h" /* VALUE is here */
+
+/** Type that defines a ractor-local storage. */
+struct rb_ractor_local_storage_type {
+
+ /**
+ * A function to mark a ractor-local storage.
+ *
+ * @param[out] ptr A ractor-local storage.
+ * @post Ruby objects inside of `ptr` are marked.
+ */
+ void (*mark)(void *ptr);
+
+ /**
+ * A function to destruct a ractor-local storage.
+ *
+ * @param[out] ptr A ractor-local storage.
+ * @post `ptr` is not a valid pointer.
+ */
+ void (*free)(void *ptr);
+ // TODO: update
+};
+
+/** (Opaque) struct that holds a ractor-local storage key. */
+typedef struct rb_ractor_local_key_struct *rb_ractor_local_key_t;
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * `Ractor` class.
+ *
+ * @ingroup object
+ */
+RUBY_EXTERN VALUE rb_cRactor;
+
+/**
+ * Queries the standard input of the current Ractor that is calling this
+ * function.
+ *
+ * @return An IO.
+ * @note This can be different from the process-global one.
+ */
+VALUE rb_ractor_stdin(void);
+
+/**
+ * Queries the standard output of the current Ractor that is calling this
+ * function.
+ *
+ * @return An IO.
+ * @note This can be different from the process-global one.
+ */
+VALUE rb_ractor_stdout(void);
+
+/**
+ * Queries the standard error of the current Ractor that is calling this
+ * function.
+ *
+ * @return An IO.
+ * @note This can be different from the process-global one.
+ */
+VALUE rb_ractor_stderr(void);
+
+/**
+ * Assigns an IO to the standard input of the Ractor that is calling this
+ * function.
+ *
+ * @param[in] io An IO.
+ * @post `io` is the standard input of the current ractor.
+ * @post In case the calling Ractor is the main Ractor, it also updates
+ * the process global ::rb_stdin.
+ */
+void rb_ractor_stdin_set(VALUE io);
+
+/**
+ * Assigns an IO to the standard output of the Ractor that is calling this
+ * function.
+ *
+ * @param[in] io An IO.
+ * @post `io` is the standard input of the current ractor.
+ * @post In case the calling Ractor is the main Ractor, it also updates
+ * the process global ::rb_stdout.
+ */
+void rb_ractor_stdout_set(VALUE io);
+
+/**
+ * Assigns an IO to the standard error of the Ractor that is calling this
+ * function.
+ *
+ * @param[in] io An IO.
+ * @post `io` is the standard input of the current ractor.
+ * @post In case the calling Ractor is the main Ractor, it also updates
+ * the process global ::rb_stderr.
+ */
+void rb_ractor_stderr_set(VALUE io);
+
+/**
+ * Issues a new key.
+ *
+ * @return A newly issued ractor-local storage key. Keys issued using this
+ * key can be associated to a Ruby object per Ractor.
+ */
+rb_ractor_local_key_t rb_ractor_local_storage_value_newkey(void);
+
+/**
+ * Queries the key.
+ *
+ * @param[in] key A ractor-local storage key to lookup.
+ * @retval RUBY_Qnil No such key.
+ * @retval otherwise A value corresponds to `key` in the current Ractor.
+ * @note This cannot distinguish between a nonexistent key and a key
+ * exists and corresponds to ::RUBY_Qnil.
+ */
+VALUE rb_ractor_local_storage_value(rb_ractor_local_key_t key);
+
+/**
+ * Queries the key.
+ *
+ * @param[in] key A ractor-local storage key to lookup.
+ * @param[out] val Return value buffer.
+ * @retval false `key` not found.
+ * @retval true `key` found.
+ * @post `val` is updated so that it has the value corresponds to `key`
+ * in the current Ractor.
+ */
+bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val);
+
+/**
+ * Associates the passed value to the passed key.
+ *
+ * @param[in] key A ractor-local storage key.
+ * @param[in] val Arbitrary ruby object.
+ * @post `val` corresponds to `key` in the current Ractor.
+ */
+void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val);
+
+/**
+ * A type of ractor-local storage that destructs itself using ::ruby_xfree.
+ *
+ * @internal
+ *
+ * Why it is visible from 3rd party extension libraries is not obvious to
+ * @shyouhei.
+ */
+RUBY_EXTERN const struct rb_ractor_local_storage_type rb_ractor_local_storage_type_free;
+
+/** @alias{rb_ractor_local_storage_type_free} */
+#define RB_RACTOR_LOCAL_STORAGE_TYPE_FREE (&rb_ractor_local_storage_type_free)
+
+/**
+ * Extended version of rb_ractor_local_storage_value_newkey(). It additionally
+ * takes the type of the issuing key.
+ *
+ * @param[in] type How the value associated with the issuing key should
+ * behave.
+ * @return A newly issued ractor-local storage key, of type `type`.
+ */
+rb_ractor_local_key_t rb_ractor_local_storage_ptr_newkey(const struct rb_ractor_local_storage_type *type);
+
+/**
+ * Identical to rb_ractor_local_storage_value() except the return type.
+ *
+ * @param[in] key A ractor-local storage key to lookup.
+ * @retval NULL No such key.
+ * @retval otherwise A value corresponds to `key` in the current Ractor.
+ */
+void *rb_ractor_local_storage_ptr(rb_ractor_local_key_t key);
+
+/**
+ * Identical to rb_ractor_local_storage_value_set() except the parameter type.
+ *
+ * @param[in] key A ractor-local storage key.
+ * @param[in] ptr A pointer that conforms `key`'s type.
+ * @post `ptr` corresponds to `key` in the current Ractor.
+ */
+void rb_ractor_local_storage_ptr_set(rb_ractor_local_key_t key, void *ptr);
+
+/**
+ * Destructively transforms the passed object so that multiple Ractors can
+ * share it. What is a shareable object and what is not is a nuanced concept,
+ * and @ko1 says the definition can still change. However extension library
+ * authors might interest to learn how to use #RUBY_TYPED_FROZEN_SHAREABLE.
+ *
+ * @param[out] obj Arbitrary ruby object to modify.
+ * @exception rb_eRactorError Ractors cannot share `obj` by nature.
+ * @return Passed `obj`.
+ * @post Multiple Ractors can share `obj`.
+ *
+ * @internal
+ *
+ * In case an exception is raised, `obj` remains in an intermediate state where
+ * some of its part is frozen and others are not. @shyouhei is not sure if it
+ * is either an intended behaviour, current implementation limitation, or
+ * simply a bug. Note also that there is no way to "melt" a frozen object.
+ */
+VALUE rb_ractor_make_shareable(VALUE obj);
+
+/**
+ * Identical to rb_ractor_make_shareable(), except it returns a (deep) copy of
+ * the passed one instead of modifying it in-place.
+ *
+ * @param[in] obj Arbitrary ruby object to duplicate.
+ * @exception rb_eRactorError Ractors cannot share `obj` by nature.
+ * @return A deep copy of `obj` which is sharable among Ractors.
+ */
+VALUE rb_ractor_make_shareable_copy(VALUE obj);
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+/**
+ * Queries if the passed object has previously classified as shareable or not.
+ * This doesn't mean anything in practice... Objects can be shared later.
+ * Always use rb_ractor_shareable_p() instead.
+ *
+ * @param[in] obj Object in question.
+ * @retval RUBY_FL_SHAREABLE It once was shareable before.
+ * @retval 0 Otherwise.
+ */
+#define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE)
+
+/**
+ * Queries if multiple Ractors can share the passed object or not. Ractors run
+ * without protecting each other. Sharing an object among them is basically
+ * dangerous, disabled by default. However there are objects that are
+ * extremely carefully implemented to be Ractor-safe; for instance integers
+ * have such property. This function can classify that.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @retval true `obj` is capable of shared across ractors.
+ * @retval false `obj` cannot travel across ractor boundaries.
+ */
+static inline bool
+rb_ractor_shareable_p(VALUE obj)
+{
+ bool rb_ractor_shareable_p_continue(VALUE obj);
+
+ if (RB_SPECIAL_CONST_P(obj)) {
+ return true;
+ }
+ else if (RB_OBJ_SHAREABLE_P(obj)) {
+ return true;
+ }
+ else {
+ return rb_ractor_shareable_p_continue(obj);
+ }
+}
+
+#endif /* RUBY_RACTOR_H */
diff --git a/include/ruby/random.h b/include/ruby/random.h
new file mode 100644
index 0000000000..39bdb6f3e3
--- /dev/null
+++ b/include/ruby/random.h
@@ -0,0 +1,359 @@
+#ifndef RUBY_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_RANDOM_H 1
+/**
+ * @file
+ * @date Sat May 7 11:51:14 JST 2016
+ * @copyright 2007-2020 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ *
+ * This is a set of APIs to roll your own subclass of ::rb_cRandom. An
+ * illustrative example of such PRNG can be found at
+ * `ext/-test-/ramdom/loop.c`.
+ */
+
+#include "ruby/ruby.h"
+
+/*
+ * version
+ * 0: before versioning; deprecated
+ * 1: added version, flags and init_32bit function
+ */
+#define RUBY_RANDOM_INTERFACE_VERSION_MAJOR 1
+#define RUBY_RANDOM_INTERFACE_VERSION_MINOR 0
+
+#define RUBY_RANDOM_PASTE_VERSION_SUFFIX(x, y, z) x##_##y##_##z
+#define RUBY_RANDOM_WITH_VERSION_SUFFIX(name, major, minor) \
+ RUBY_RANDOM_PASTE_VERSION_SUFFIX(name, major, minor)
+#define rb_random_data_type \
+ RUBY_RANDOM_WITH_VERSION_SUFFIX(rb_random_data_type, \
+ RUBY_RANDOM_INTERFACE_VERSION_MAJOR, \
+ RUBY_RANDOM_INTERFACE_VERSION_MINOR)
+#define RUBY_RANDOM_INTERFACE_VERSION_INITIALIZER \
+ {RUBY_RANDOM_INTERFACE_VERSION_MAJOR, RUBY_RANDOM_INTERFACE_VERSION_MINOR}
+#define RUBY_RANDOM_INTERFACE_VERSION_MAJOR_MAX 0xff
+#define RUBY_RANDOM_INTERFACE_VERSION_MINOR_MAX 0xff
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Base components of the random interface.
+ *
+ * @internal
+ *
+ * Ideally this could be an empty class if we could assume C++, but in C a
+ * struct must have at least one field.
+ */
+struct rb_random_struct {
+ /** Seed, passed through e.g. `Random.new` */
+ VALUE seed;
+};
+typedef struct rb_random_struct rb_random_t; /**< @see ::rb_random_struct */
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is the type of functions called when your random object is initialised.
+ * Passed buffer is the seed object basically. But in Ruby a number can be
+ * really big. This type of functions accept such big integers as a series of
+ * machine words.
+ *
+ * @param[out] rng Your random struct to fill in.
+ * @param[in] buf Seed, maybe converted from a bignum.
+ * @param[in] len Number of words of `buf`.
+ * @post `rng` is initialised using the passed seeds.
+ */
+typedef void rb_random_init_func(rb_random_t *rng, const uint32_t *buf, size_t len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is the type of functions called when your random object is initialised.
+ * Passed data is the seed integer.
+ *
+ * @param[out] rng Your random struct to fill in.
+ * @param[in] data Seed, single word.
+ * @post `rng` is initialised using the passed seeds.
+ */
+typedef void rb_random_init_int32_func(rb_random_t *rng, uint32_t data);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is the type of functions called from your object's `#rand` method.
+ *
+ * @param[out] rng Your random struct to extract an integer from.
+ * @return A random number.
+ * @post `rng` is consumed somehow.
+ */
+typedef unsigned int rb_random_get_int32_func(rb_random_t *rng);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is the type of functions called from your object's `#bytes` method.
+ *
+ * @param[out] rng Your random struct to extract an integer from.
+ * @param[out] buf Return buffer of at least `len` bytes length.
+ * @param[in] len Number of bytes of `buf`.
+ * @post `rng` is consumed somehow.
+ * @post `buf` is filled with random bytes.
+ */
+typedef void rb_random_get_bytes_func(rb_random_t *rng, void *buf, size_t len);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is the type of functions called from your object's `#rand` method.
+ *
+ * @param[out] rng Your random struct to extract an integer from.
+ * @param[in] excl Pass nonzero value here to indicate you don't want 1.0.
+ * @return A random number of range 0.0 to 1.0.
+ * @post `rng` is consumed somehow.
+ */
+typedef double rb_random_get_real_func(rb_random_t *rng, int excl);
+
+/** PRNG algorithmic interface, analogous to Ruby level classes. */
+typedef struct {
+ /** Number of bits of seed numbers. */
+ size_t default_seed_bits;
+
+ /**
+ * Major/minor versions of this interface
+ */
+ struct {
+ uint8_t major, minor;
+ } version;
+
+ /**
+ * Reserved flags
+ */
+ uint16_t flags;
+
+ /** Function to initialize from uint32_t array. */
+ rb_random_init_func *init;
+
+ /** Function to initialize from single uint32_t. */
+ rb_random_init_int32_func *init_int32;
+
+ /** Function to obtain a random integer. */
+ rb_random_get_int32_func *get_int32;
+
+ /**
+ * Function to obtain a series of random bytes. If your PRNG have a native
+ * method to yield arbitrary number of bytes use that to implement this.
+ * But in case you lack such things, you can do so by using
+ * rb_rand_bytes_int32()
+ *
+ * ```CXX
+ * extern rb_random_get_int32_func your_get_int32_func;
+ *
+ * void
+ * your_get_byes_func(rb_random_t *rng, void *buf, size_t len)
+ * {
+ * rb_rand_bytes_int32(your_get_int32_func, rng, buf, len);
+ * }
+ * ```
+ */
+ rb_random_get_bytes_func *get_bytes;
+
+ /**
+ * Function to obtain a random double. If your PRNG have a native method
+ * to yield a floating point random number use that to implement this. But
+ * in case you lack such things, you can do so by using
+ * rb_int_pair_to_real().
+ *
+ * ```CXX
+ * extern rb_random_get_int32_func your_get_int32_func;
+ *
+ * void
+ * your_get_real_func(rb_random_t *rng, int excl)
+ * {
+ * auto a = your_get_int32_func(rng);
+ * auto b = your_get_int32_func(rng);
+ * return rb_int_pair_to_real(a, b, excl);
+ * }
+ * ```
+ */
+ rb_random_get_real_func *get_real;
+} rb_random_interface_t;
+
+/**
+ * This utility macro defines 4 functions named prefix_init, prefix_init_int32,
+ * prefix_get_int32, prefix_get_bytes.
+ */
+#define RB_RANDOM_INTERFACE_DECLARE(prefix) \
+ static void prefix##_init(rb_random_t *, const uint32_t *, size_t); \
+ static void prefix##_init_int32(rb_random_t *, uint32_t); \
+ static unsigned int prefix##_get_int32(rb_random_t *); \
+ static void prefix##_get_bytes(rb_random_t *, void *, size_t)
+
+/**
+ * Identical to #RB_RANDOM_INTERFACE_DECLARE except it also declares
+ * prefix_get_real.
+ */
+#define RB_RANDOM_INTERFACE_DECLARE_WITH_REAL(prefix) \
+ RB_RANDOM_INTERFACE_DECLARE(prefix); \
+ static double prefix##_get_real(rb_random_t *, int)
+
+/**
+ * This utility macro expands to the names declared using
+ * #RB_RANDOM_INTERFACE_DECLARE. Expected to be used inside of a
+ * ::rb_random_interface_t initialiser:
+ *
+ * ```CXX
+ * RB_RANDOM_INTERFACE_DECLARE(foo);
+ *
+ * static inline constexpr rb_random_interface_t foo_interface = {
+ * 32768, // bits
+ * RB_RANDOM_INTERFACE_DEFINE(foo),
+ * };
+ * ```
+ */
+#define RB_RANDOM_INTERFACE_DEFINE(prefix) \
+ RUBY_RANDOM_INTERFACE_VERSION_INITIALIZER, 0, \
+ prefix##_init, \
+ prefix##_init_int32, \
+ prefix##_get_int32, \
+ prefix##_get_bytes
+
+/**
+ * Identical to #RB_RANDOM_INTERFACE_DEFINE except it also defines
+ * prefix_get_real.
+ */
+#define RB_RANDOM_INTERFACE_DEFINE_WITH_REAL(prefix) \
+ RB_RANDOM_INTERFACE_DEFINE(prefix), \
+ prefix##_get_real
+
+#define RB_RANDOM_DEFINE_INIT_INT32_FUNC(prefix) \
+ static void prefix##_init_int32(rb_random_t *rnd, uint32_t data) \
+ { \
+ prefix##_init(rnd, &data, 1); \
+ }
+
+#if defined _WIN32 && !defined __CYGWIN__
+typedef rb_data_type_t rb_random_data_type_t;
+# define RB_RANDOM_PARENT 0
+#else
+
+/** This is the type of ::rb_random_data_type. */
+typedef const rb_data_type_t rb_random_data_type_t;
+
+/**
+ * This utility macro can be used when you define your own PRNG type:
+ *
+ * ```CXX
+ * static inline constexpr rb_random_interface_t your_if = {
+ * 0, RB_RANDOM_INTERFACE_DEFINE(your),
+ * };
+ *
+ * static inline constexpr rb_random_data_type_t your_prng_type = {
+ * "your PRNG",
+ * { rb_random_mark, },
+ * RB_RANDOM_PARENT, // <<-- HERE
+ * &your_if,
+ * 0,
+ * }
+ * ```
+ */
+# define RB_RANDOM_PARENT &rb_random_data_type
+#endif
+
+/**
+ * This macro is expected to be called exactly once at the beginning of a
+ * program, possibly from inside of your `Init_Foo()` function. Depending on
+ * platforms #RB_RANDOM_PARENT can require a fixup. This routine does that
+ * when necessary.
+ */
+#define RB_RANDOM_DATA_INIT_PARENT(random_data) \
+ rbimpl_random_data_init_parent(&random_data)
+
+/**
+ * This is the implementation of ::rb_data_type_struct::dmark for
+ * ::rb_random_data_type. In case your PRNG does not involve Ruby objects at
+ * all (which is quite likely), you can simply reuse it.
+ *
+ * @param[out] ptr Target to mark, which is a ::rb_random_t this case.
+ */
+void rb_random_mark(void *ptr);
+
+/**
+ * Initialises an allocated ::rb_random_t instance. Call it from your own
+ * initialiser appropriately.
+ *
+ * @param[out] rnd Your PRNG's base part.
+ * @post `rnd` is filled with an initial state.
+ */
+void rb_random_base_init(rb_random_t *rnd);
+
+/**
+ * Generates a 64 bit floating point number by concatenating two 32bit unsigned
+ * integers.
+ *
+ * @param[in] a Most significant 32 bits of the result.
+ * @param[in] b Least significant 32 bits of the result.
+ * @param[in] excl Whether the result should exclude 1.0 or not.
+ * @return A double, whose range is either `[0, 1)` or `[0, 1]`.
+ * @see ::rb_random_interface_t::get_real()
+ *
+ * @internal
+ *
+ * This in fact has nothing to do with PRNGs.
+ */
+double rb_int_pair_to_real(uint32_t a, uint32_t b, int excl);
+
+/**
+ * Repeatedly calls the passed function over and over again until the passed
+ * buffer is filled with random bytes.
+ *
+ * @param[in] func Generator function.
+ * @param[out] prng Passed as-is to `func`.
+ * @param[out] buff Return buffer.
+ * @param[in] size Number of words of `buff`.
+ * @post `buff` is filled with random bytes.
+ * @post `prng` is updated by `func`.
+ * @see ::rb_random_interface_t::get_bytes()
+ */
+void rb_rand_bytes_int32(rb_random_get_int32_func *func, rb_random_t *prng, void *buff, size_t size);
+
+/**
+ * The data that holds the backend type of ::rb_cRandom. Used as your PRNG's
+ * ::rb_data_type_struct::parent.
+ */
+RUBY_EXTERN const rb_data_type_t rb_random_data_type;
+
+RBIMPL_SYMBOL_EXPORT_END()
+
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
+/**
+ * Queries the interface of the passed random object.
+ *
+ * @param[in] obj An instance (of a subclass) of ::rb_cRandom.
+ * @return Its corresponding ::rb_random_interface_t interface.
+ */
+static inline const rb_random_interface_t *
+rb_rand_if(VALUE obj)
+{
+ RBIMPL_ASSERT_OR_ASSUME(RTYPEDDATA_P(obj));
+ const struct rb_data_type_struct *t = RTYPEDDATA_TYPE(obj);
+ const void *ret = t->data;
+ return RBIMPL_CAST((const rb_random_interface_t *)ret);
+}
+
+RBIMPL_ATTR_NOALIAS()
+/**
+ * @private
+ *
+ * This is an implementation detail of #RB_RANDOM_DATA_INIT_PARENT. People
+ * don't use it directly.
+ *
+ * @param[out] random_data Region to fill.
+ * @post ::rb_random_data_type is filled appropriately.
+ */
+static inline void
+rbimpl_random_data_init_parent(rb_random_data_type_t *random_data)
+{
+#if defined _WIN32 && !defined __CYGWIN__
+ random_data->parent = &rb_random_data_type;
+#endif
+}
+
+#endif /* RUBY_RANDOM_H */
diff --git a/include/ruby/re.h b/include/ruby/re.h
index 7102c7ace4..3892d6e7f2 100644
--- a/include/ruby/re.h
+++ b/include/ruby/re.h
@@ -1,71 +1,147 @@
-/**********************************************************************
-
- re.h -
-
- $Author$
- created at: Thu Sep 30 14:18:32 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_RE_H
+#ifndef RUBY_RE_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_RE_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
+/**
+ * @file
+ * @author $Author$
+ * @date Thu Sep 30 14:18:32 JST 1993
+ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/config.h"
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
#endif
-#include <sys/types.h>
#include <stdio.h>
#include "ruby/regex.h"
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
-typedef struct re_pattern_buffer Regexp;
-
-struct rmatch_offset {
- long beg;
- long end;
-};
-
-struct rmatch {
- struct re_registers regs;
-
- struct rmatch_offset *char_offset;
- int char_offset_num_allocated;
-};
-
-struct RMatch {
- struct RBasic basic;
- VALUE str;
- struct rmatch *rmatch;
- VALUE regexp; /* RRegexp */
-};
-
-#define RMATCH(obj) (R_CAST(RMatch)(obj))
-#define RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)
-
-VALUE rb_reg_regcomp(VALUE);
-long rb_reg_search(VALUE, VALUE, long, int);
-VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE);
-long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
-void rb_match_busy(VALUE);
-VALUE rb_reg_quote(VALUE);
+#include "ruby/internal/core/rmatch.h"
+#include "ruby/internal/dllexport.h"
+
+struct re_registers; /* Defined in onigmo.h */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Creates a new instance of ::rb_cRegexp. It can be seen as a specialised
+ * version of rb_reg_new_str() where it does not take options.
+ *
+ * @param[in] str Source code in String.
+ * @return Allocated new instance of ::rb_cRegexp.
+ */
+VALUE rb_reg_regcomp(VALUE str);
+
+/**
+ * Runs the passed regular expression over the passed string. Unlike
+ * rb_reg_search() this function also takes position and direction of the
+ * search, which make it possible for this function to run from in middle of
+ * the string.
+ *
+ * @param[in] re Regular expression to execute.
+ * @param[in] str Target string to search.
+ * @param[in] pos Offset in `str` to start searching, in bytes.
+ * @param[in] dir `pos`' direction; 0 means left-to-right, 1 for
+ * the opposite.
+ * @exception rb_eArgError `re` is broken.
+ * @exception rb_eRegexpError `re` is malformed.
+ * @retval -1 Match failed.
+ * @retval otherwise Offset of first such byte where match happened.
+ * @post `Regexp.last_match` is updated.
+ * @post `$&`, `$~`, etc., are updated.
+ *
+ * @internal
+ *
+ * Distinction between raising ::rb_eArgError and ::rb_eRegexpError is not
+ * obvious, at least to @shyouhei.
+ */
+long rb_reg_search(VALUE re, VALUE str, long pos, int dir);
+
+/**
+ * Substitution. This is basically the implementation of `String#sub`. Also
+ * `String#gsub` repeatedly calls this function.
+ *
+ * @param[in] repl Replacement string, e.g. `"\\1\\2"`
+ * @param[in] src Source string, to be replaced.
+ * @param[in] regs Matched data generated by applying `rexp` to `src`.
+ * @param[in] rexp Regular expression.
+ * @return A substituted string.
+ *
+ * @internal
+ *
+ * This function does not check for encoding compatibility. `String#sub!`
+ * etc. employ their own checker.
+ *
+ * `regs` should have been `const struct re_registers *` because it is read
+ * only. Kept as-is for compatibility.
+ */
+VALUE rb_reg_regsub(VALUE repl, VALUE src, struct re_registers *regs, VALUE rexp);
+
+/**
+ * Tell us if this is a wrong idea, but it seems this function has no usage at
+ * all. Just remains here for theoretical backwards compatibility.
+ *
+ * @param[in] re Regular expression to execute.
+ * @param[in] str Target string to search.
+ * @param[in] pos Offset in `str` to start searching, in bytes.
+ * @param[in] dir `pos`' direction; 0 means left-to-right, 1 for
+ * the opposite.
+ * @return Adjusted nearest offset to `pos` inside of `str`, where is a
+ * character boundary.
+ *
+ */
+long rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, int dir);
+
+/**
+ * Escapes any characters that would have special meaning in a regular
+ * expression.
+ *
+ * @param[in] str Target string to escape.
+ * @return A copy of `str` whose contents are escaped.
+ */
+VALUE rb_reg_quote(VALUE str);
+
+/**
+ * Exercises various checks and preprocesses so that the given regular
+ * expression can be applied to the given string. The preprocess here includes
+ * (but not limited to) for instance encoding conversion.
+ *
+ * @param[in] re Target regular expression.
+ * @param[in] str What `re` is about to run on.
+ * @exception rb_eArgError `re` does not fit for `str`.
+ * @exception rb_eEncCompatError `re` and `str` are incompatible.
+ * @exception rb_eRegexpError `re` is malformed.
+ * @return A preprocessesed pattern buffer ready to be applied to `str`.
+ * @note The return value is manages by our GC. Don't free.
+ *
+ * @internal
+ *
+ * The return type, `regex_t *`, is defined in `<ruby/onigmo.h>`, _and_
+ * _conflicts_ with POSIX's `<regex.h>`. We can no longer save the situation
+ * at this point. Just don't mix the two.
+ */
regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
-int rb_reg_region_copy(struct re_registers *, const struct re_registers *);
-
-RUBY_SYMBOL_EXPORT_END
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+/**
+ * Duplicates a match data. This is roughly the same as `onig_region_copy()`,
+ * except it tries to GC when there is not enough memory.
+ *
+ * @param[out] dst Target registers to fill.
+ * @param[in] src Source registers to duplicate.
+ * @exception rb_eNoMemError Not enough memory.
+ * @retval 0 Successful
+ * @retval ONIGERR_MEMORY Not enough memory, even after GC (unlikely).
+ * @post `dst` has identical contents to `src`.
+ *
+ * @internal
+ *
+ * It seems this function is here for `ext/strscan` and nothing else.
+ */
+int rb_reg_region_copy(struct re_registers *dst, const struct re_registers *src);
+
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_RE_H */
diff --git a/include/ruby/regex.h b/include/ruby/regex.h
index 024bed4a4e..53278173f8 100644
--- a/include/ruby/regex.h
+++ b/include/ruby/regex.h
@@ -1,16 +1,13 @@
-/**********************************************************************
-
- regex.h -
-
- $Author$
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef ONIGURUMA_REGEX_H
+#ifndef ONIGURUMA_REGEX_H /*-*-C++-*-vi:se ft=cpp:*/
#define ONIGURUMA_REGEX_H 1
-
+/**
+ * @author $Author$
+ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
#if defined(__cplusplus)
extern "C" {
#if 0
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 9b7c9842f8..444940ca3a 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1,2871 +1,312 @@
-/**********************************************************************
-
- ruby/ruby.h -
-
- $Author$
- created at: Thu Jun 10 14:26:32 JST 1993
-
- Copyright (C) 1993-2008 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-#ifndef RUBY_RUBY_H
+#ifndef RUBY_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_RUBY_H 1
+/**
+ * @file
+ * @author $Author$
+ * @date Thu Jun 10 14:26:32 JST 1993
+ * @copyright Copyright (C) 1993-2008 Yukihiro Matsumoto
+ * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
+ * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/config.h"
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#include "ruby/config.h"
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
-#endif
-
-#include "defines.h"
-#include "ruby/assert.h"
-
-/* For MinGW, we need __declspec(dllimport) for RUBY_EXTERN on MJIT.
- mswin's RUBY_EXTERN already has that. See also: win32/Makefile.sub */
-#if defined(MJIT_HEADER) && defined(_WIN32) && defined(__GNUC__)
-# undef RUBY_EXTERN
-# define RUBY_EXTERN extern __declspec(dllimport)
-#endif
-
-#if defined(__cplusplus)
-/* __builtin_choose_expr and __builtin_types_compatible aren't available
- * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
-# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
-# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P
-#elif GCC_VERSION_BEFORE(4,8,6) /* Bug #14221 */
-# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
-#endif
-
-#ifndef ASSUME
-# ifdef UNREACHABLE
-# define ASSUME(x) (RB_LIKELY(!!(x)) ? (void)0 : UNREACHABLE)
-# else
-# define ASSUME(x) ((void)(x))
-# endif
-#endif
-#ifndef UNREACHABLE_RETURN
-# ifdef UNREACHABLE
-# define UNREACHABLE_RETURN(val) UNREACHABLE
-# else
-# define UNREACHABLE_RETURN(val) return (val)
-# endif
-#endif
-#ifndef UNREACHABLE
-# define UNREACHABLE ((void)0) /* unreachable */
-#endif
-
-#define RUBY_MACRO_SELECT(base, n) TOKEN_PASTE(base, n)
-
+/* @shyouhei doesn't understand why we need <intrinsics.h> at this very
+ * beginning of the entire <ruby.h> circus. */
#ifdef HAVE_INTRINSICS_H
# include <intrinsics.h>
#endif
#include <stdarg.h>
-RUBY_SYMBOL_EXPORT_BEGIN
-
-/* Make alloca work the best possible way. */
-#ifdef __GNUC__
-# ifndef alloca
-# define alloca __builtin_alloca
-# endif
-#else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
-#pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca();
-# endif
-# endif /* AIX */
-# endif /* HAVE_ALLOCA_H */
-#endif /* __GNUC__ */
-
-#if defined HAVE_UINTPTR_T && 0
-typedef uintptr_t VALUE;
-typedef uintptr_t ID;
-# define SIGNED_VALUE intptr_t
-# define SIZEOF_VALUE SIZEOF_UINTPTR_T
-# undef PRI_VALUE_PREFIX
-#elif SIZEOF_LONG == SIZEOF_VOIDP
-typedef unsigned long VALUE;
-typedef unsigned long ID;
-# define SIGNED_VALUE long
-# define SIZEOF_VALUE SIZEOF_LONG
-# define PRI_VALUE_PREFIX "l"
-#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
-typedef unsigned LONG_LONG VALUE;
-typedef unsigned LONG_LONG ID;
-# define SIGNED_VALUE LONG_LONG
-# define LONG_LONG_VALUE 1
-# define SIZEOF_VALUE SIZEOF_LONG_LONG
-# define PRI_VALUE_PREFIX PRI_LL_PREFIX
-#else
-# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
-#endif
-
-typedef char ruby_check_sizeof_int[SIZEOF_INT == sizeof(int) ? 1 : -1];
-typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
-#ifdef HAVE_LONG_LONG
-typedef char ruby_check_sizeof_long_long[SIZEOF_LONG_LONG == sizeof(LONG_LONG) ? 1 : -1];
-#endif
-typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
-
-#ifndef PRI_INT_PREFIX
-#define PRI_INT_PREFIX ""
-#endif
-#ifndef PRI_LONG_PREFIX
-#define PRI_LONG_PREFIX "l"
-#endif
-#ifndef PRI_SHORT_PREFIX
-#define PRI_SHORT_PREFIX "h"
-#endif
-
-#ifndef PRI_64_PREFIX
-#if SIZEOF_LONG == 8
-#define PRI_64_PREFIX PRI_LONG_PREFIX
-#elif SIZEOF_LONG_LONG == 8
-#define PRI_64_PREFIX PRI_LL_PREFIX
-#endif
-#endif
-
-#ifndef PRIdPTR
-#define PRIdPTR PRI_PTR_PREFIX"d"
-#define PRIiPTR PRI_PTR_PREFIX"i"
-#define PRIoPTR PRI_PTR_PREFIX"o"
-#define PRIuPTR PRI_PTR_PREFIX"u"
-#define PRIxPTR PRI_PTR_PREFIX"x"
-#define PRIXPTR PRI_PTR_PREFIX"X"
-#endif
-
-#define RUBY_PRI_VALUE_MARK "\v"
-#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
-#define PRIdVALUE PRIdPTR
-#define PRIoVALUE PRIoPTR
-#define PRIuVALUE PRIuPTR
-#define PRIxVALUE PRIxPTR
-#define PRIXVALUE PRIXPTR
-#define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK
-#else
-#define PRIdVALUE PRI_VALUE_PREFIX"d"
-#define PRIoVALUE PRI_VALUE_PREFIX"o"
-#define PRIuVALUE PRI_VALUE_PREFIX"u"
-#define PRIxVALUE PRI_VALUE_PREFIX"x"
-#define PRIXVALUE PRI_VALUE_PREFIX"X"
-#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
-#endif
-#ifndef PRI_VALUE_PREFIX
-# define PRI_VALUE_PREFIX ""
-#endif
-
-#ifndef PRI_TIMET_PREFIX
-# if SIZEOF_TIME_T == SIZEOF_INT
-# define PRI_TIMET_PREFIX
-# elif SIZEOF_TIME_T == SIZEOF_LONG
-# define PRI_TIMET_PREFIX "l"
-# elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
-# define PRI_TIMET_PREFIX PRI_LL_PREFIX
-# endif
-#endif
-
-#if defined PRI_PTRDIFF_PREFIX
-#elif SIZEOF_PTRDIFF_T == SIZEOF_INT
-# define PRI_PTRDIFF_PREFIX ""
-#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
-# define PRI_PTRDIFF_PREFIX "l"
-#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
-# define PRI_PTRDIFF_PREFIX PRI_LL_PREFIX
-#endif
-#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
-#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
-#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
-#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
-#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
-#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
-
-#if defined PRI_SIZE_PREFIX
-#elif SIZEOF_SIZE_T == SIZEOF_INT
-# define PRI_SIZE_PREFIX ""
-#elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define PRI_SIZE_PREFIX "l"
-#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
-# define PRI_SIZE_PREFIX PRI_LL_PREFIX
-#endif
-#define PRIdSIZE PRI_SIZE_PREFIX"d"
-#define PRIiSIZE PRI_SIZE_PREFIX"i"
-#define PRIoSIZE PRI_SIZE_PREFIX"o"
-#define PRIuSIZE PRI_SIZE_PREFIX"u"
-#define PRIxSIZE PRI_SIZE_PREFIX"x"
-#define PRIXSIZE PRI_SIZE_PREFIX"X"
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# ifndef LONG_MAX
-# ifdef HAVE_LIMITS_H
-# include <limits.h>
-# else
- /* assuming 32bit(2's complement) long */
-# define LONG_MAX 2147483647
-# endif
-# endif
-# ifndef LONG_MIN
-# define LONG_MIN (-LONG_MAX-1)
-# endif
-# ifndef CHAR_BIT
-# define CHAR_BIT 8
-# endif
-#endif
-
-#ifdef HAVE_LONG_LONG
-# ifndef LLONG_MAX
-# ifdef LONG_LONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
-# else
-# ifdef _I64_MAX
-# define LLONG_MAX _I64_MAX
-# else
- /* assuming 64bit(2's complement) long long */
-# define LLONG_MAX 9223372036854775807LL
-# endif
-# endif
-# endif
-# ifndef LLONG_MIN
-# ifdef LONG_LONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
-# else
-# ifdef _I64_MIN
-# define LLONG_MIN _I64_MIN
-# else
-# define LLONG_MIN (-LLONG_MAX-1)
-# endif
-# endif
-# endif
-#endif
-
-#define RUBY_FIXNUM_MAX (LONG_MAX>>1)
-#define RUBY_FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
-#define FIXNUM_MAX RUBY_FIXNUM_MAX
-#define FIXNUM_MIN RUBY_FIXNUM_MIN
-
-#define RB_INT2FIX(i) (((VALUE)(i))<<1 | RUBY_FIXNUM_FLAG)
-#define INT2FIX(i) RB_INT2FIX(i)
-#define RB_LONG2FIX(i) RB_INT2FIX(i)
-#define LONG2FIX(i) RB_INT2FIX(i)
-#define rb_fix_new(v) RB_INT2FIX(v)
-VALUE rb_int2inum(intptr_t);
-
-#define rb_int_new(v) rb_int2inum(v)
-VALUE rb_uint2inum(uintptr_t);
-
-#define rb_uint_new(v) rb_uint2inum(v)
-
-#ifdef HAVE_LONG_LONG
-VALUE rb_ll2inum(LONG_LONG);
-#define LL2NUM(v) rb_ll2inum(v)
-VALUE rb_ull2inum(unsigned LONG_LONG);
-#define ULL2NUM(v) rb_ull2inum(v)
-#endif
-
-#ifndef OFFT2NUM
-#if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
-# define OFFT2NUM(v) LL2NUM(v)
-#elif SIZEOF_OFF_T == SIZEOF_LONG
-# define OFFT2NUM(v) LONG2NUM(v)
-#else
-# define OFFT2NUM(v) INT2NUM(v)
-#endif
-#endif
-
-#if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
-# define SIZET2NUM(v) ULL2NUM(v)
-# define SSIZET2NUM(v) LL2NUM(v)
-#elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define SIZET2NUM(v) ULONG2NUM(v)
-# define SSIZET2NUM(v) LONG2NUM(v)
-#else
-# define SIZET2NUM(v) UINT2NUM(v)
-# define SSIZET2NUM(v) INT2NUM(v)
-#endif
-
-#ifndef SIZE_MAX
-# if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
-# define SIZE_MAX ULLONG_MAX
-# define SIZE_MIN ULLONG_MIN
-# elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define SIZE_MAX ULONG_MAX
-# define SIZE_MIN ULONG_MIN
-# elif SIZEOF_SIZE_T == SIZEOF_INT
-# define SIZE_MAX UINT_MAX
-# define SIZE_MIN UINT_MIN
-# else
-# define SIZE_MAX USHRT_MAX
-# define SIZE_MIN USHRT_MIN
-# endif
-#endif
-
-#ifndef SSIZE_MAX
-# if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
-# define SSIZE_MAX LLONG_MAX
-# define SSIZE_MIN LLONG_MIN
-# elif SIZEOF_SIZE_T == SIZEOF_LONG
-# define SSIZE_MAX LONG_MAX
-# define SSIZE_MIN LONG_MIN
-# elif SIZEOF_SIZE_T == SIZEOF_INT
-# define SSIZE_MAX INT_MAX
-# define SSIZE_MIN INT_MIN
-# else
-# define SSIZE_MAX SHRT_MAX
-# define SSIZE_MIN SHRT_MIN
-# endif
-#endif
-
-#if SIZEOF_INT < SIZEOF_VALUE
-NORETURN(void rb_out_of_int(SIGNED_VALUE num));
-#endif
-
-#if SIZEOF_INT < SIZEOF_LONG
-static inline int
-rb_long2int_inline(long n)
-{
- int i = (int)n;
- if ((long)i != n)
- rb_out_of_int(n);
-
- return i;
-}
-#define rb_long2int(n) rb_long2int_inline(n)
-#else
-#define rb_long2int(n) ((int)(n))
-#endif
-
-#ifndef PIDT2NUM
-#define PIDT2NUM(v) LONG2NUM(v)
-#endif
-#ifndef NUM2PIDT
-#define NUM2PIDT(v) NUM2LONG(v)
-#endif
-#ifndef UIDT2NUM
-#define UIDT2NUM(v) LONG2NUM(v)
-#endif
-#ifndef NUM2UIDT
-#define NUM2UIDT(v) NUM2LONG(v)
-#endif
-#ifndef GIDT2NUM
-#define GIDT2NUM(v) LONG2NUM(v)
-#endif
-#ifndef NUM2GIDT
-#define NUM2GIDT(v) NUM2LONG(v)
-#endif
-#ifndef NUM2MODET
-#define NUM2MODET(v) NUM2INT(v)
-#endif
-#ifndef MODET2NUM
-#define MODET2NUM(v) INT2NUM(v)
-#endif
-
-#define RB_FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
-static inline long
-rb_fix2long(VALUE x)
-{
- return RB_FIX2LONG(x);
-}
-#define RB_FIX2ULONG(x) ((unsigned long)RB_FIX2LONG(x))
-static inline unsigned long
-rb_fix2ulong(VALUE x)
-{
- return RB_FIX2ULONG(x);
-}
-#define RB_FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&RUBY_FIXNUM_FLAG)
-#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
-#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
-#define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
-#define FIX2LONG(x) RB_FIX2LONG(x)
-#define FIX2ULONG(x) RB_FIX2ULONG(x)
-#define FIXNUM_P(f) RB_FIXNUM_P(f)
-#define POSFIXABLE(f) RB_POSFIXABLE(f)
-#define NEGFIXABLE(f) RB_NEGFIXABLE(f)
-#define FIXABLE(f) RB_FIXABLE(f)
-
-#define RB_IMMEDIATE_P(x) ((VALUE)(x) & RUBY_IMMEDIATE_MASK)
-#define IMMEDIATE_P(x) RB_IMMEDIATE_P(x)
-
-ID rb_sym2id(VALUE);
-VALUE rb_id2sym(ID);
-#define RB_STATIC_SYM_P(x) (((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)
-#define RB_DYNAMIC_SYM_P(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) == (RUBY_T_SYMBOL))
-#define RB_SYMBOL_P(x) (RB_STATIC_SYM_P(x)||RB_DYNAMIC_SYM_P(x))
-#define RB_ID2SYM(x) (rb_id2sym(x))
-#define RB_SYM2ID(x) (rb_sym2id(x))
-#define STATIC_SYM_P(x) RB_STATIC_SYM_P(x)
-#define DYNAMIC_SYM_P(x) RB_DYNAMIC_SYM_P(x)
-#define SYMBOL_P(x) RB_SYMBOL_P(x)
-#define ID2SYM(x) RB_ID2SYM(x)
-#define SYM2ID(x) RB_SYM2ID(x)
-
-#ifndef USE_FLONUM
-#if SIZEOF_VALUE >= SIZEOF_DOUBLE
-#define USE_FLONUM 1
-#else
-#define USE_FLONUM 0
-#endif
-#endif
+#include "defines.h"
+#include "ruby/internal/abi.h"
+#include "ruby/internal/anyargs.h"
+#include "ruby/internal/arithmetic.h"
+#include "ruby/internal/core.h"
+#include "ruby/internal/ctype.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/internal/error.h"
+#include "ruby/internal/eval.h"
+#include "ruby/internal/event.h"
+#include "ruby/internal/fl_type.h"
+#include "ruby/internal/gc.h"
+#include "ruby/internal/glob.h"
+#include "ruby/internal/globals.h"
+#include "ruby/internal/has/warning.h"
+#include "ruby/internal/interpreter.h"
+#include "ruby/internal/iterator.h"
+#include "ruby/internal/memory.h"
+#include "ruby/internal/method.h"
+#include "ruby/internal/module.h"
+#include "ruby/internal/newobj.h"
+#include "ruby/internal/rgengc.h"
+#include "ruby/internal/scan_args.h"
+#include "ruby/internal/special_consts.h"
+#include "ruby/internal/symbol.h"
+#include "ruby/internal/value.h"
+#include "ruby/internal/value_type.h"
+#include "ruby/internal/variable.h"
+#include "ruby/assert.h"
+#include "ruby/backward/2/assume.h"
+#include "ruby/backward/2/inttypes.h"
+#include "ruby/backward/2/limits.h"
-#if USE_FLONUM
-#define RB_FLONUM_P(x) ((((int)(SIGNED_VALUE)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)
-#else
-#define RB_FLONUM_P(x) 0
-#endif
-#define FLONUM_P(x) RB_FLONUM_P(x)
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* Module#methods, #singleton_methods and so on return Symbols */
-#define USE_SYMBOL_AS_METHOD_NAME 1
-
-/* special constants - i.e. non-zero and non-fixnum constants */
-enum ruby_special_consts {
-#if USE_FLONUM
- RUBY_Qfalse = 0x00, /* ...0000 0000 */
- RUBY_Qtrue = 0x14, /* ...0001 0100 */
- RUBY_Qnil = 0x08, /* ...0000 1000 */
- RUBY_Qundef = 0x34, /* ...0011 0100 */
-
- RUBY_IMMEDIATE_MASK = 0x07,
- RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */
- RUBY_FLONUM_MASK = 0x03,
- RUBY_FLONUM_FLAG = 0x02, /* ...xxxx xx10 */
- RUBY_SYMBOL_FLAG = 0x0c, /* ...0000 1100 */
-#else
- RUBY_Qfalse = 0, /* ...0000 0000 */
- RUBY_Qtrue = 2, /* ...0000 0010 */
- RUBY_Qnil = 4, /* ...0000 0100 */
- RUBY_Qundef = 6, /* ...0000 0110 */
-
- RUBY_IMMEDIATE_MASK = 0x03,
- RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */
- RUBY_FLONUM_MASK = 0x00, /* any values ANDed with FLONUM_MASK cannot be FLONUM_FLAG */
- RUBY_FLONUM_FLAG = 0x02,
- RUBY_SYMBOL_FLAG = 0x0e, /* ...0000 1110 */
-#endif
- RUBY_SPECIAL_SHIFT = 8
-};
-
-#define RUBY_Qfalse ((VALUE)RUBY_Qfalse)
-#define RUBY_Qtrue ((VALUE)RUBY_Qtrue)
-#define RUBY_Qnil ((VALUE)RUBY_Qnil)
-#define RUBY_Qundef ((VALUE)RUBY_Qundef) /* undefined value for placeholder */
-#define Qfalse RUBY_Qfalse
-#define Qtrue RUBY_Qtrue
-#define Qnil RUBY_Qnil
-#define Qundef RUBY_Qundef
-#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
-#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
-#if USE_FLONUM
-#define FLONUM_MASK RUBY_FLONUM_MASK
-#define FLONUM_FLAG RUBY_FLONUM_FLAG
-#endif
-#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
-
-#define RB_TEST(v) !(((VALUE)(v) & (VALUE)~RUBY_Qnil) == 0)
-#define RB_NIL_P(v) !((VALUE)(v) != RUBY_Qnil)
-#define RTEST(v) RB_TEST(v)
-#define NIL_P(v) RB_NIL_P(v)
-
-#define CLASS_OF(v) rb_class_of((VALUE)(v))
-
-enum ruby_value_type {
- RUBY_T_NONE = 0x00,
-
- RUBY_T_OBJECT = 0x01,
- RUBY_T_CLASS = 0x02,
- RUBY_T_MODULE = 0x03,
- RUBY_T_FLOAT = 0x04,
- RUBY_T_STRING = 0x05,
- RUBY_T_REGEXP = 0x06,
- RUBY_T_ARRAY = 0x07,
- RUBY_T_HASH = 0x08,
- RUBY_T_STRUCT = 0x09,
- RUBY_T_BIGNUM = 0x0a,
- RUBY_T_FILE = 0x0b,
- RUBY_T_DATA = 0x0c,
- RUBY_T_MATCH = 0x0d,
- RUBY_T_COMPLEX = 0x0e,
- RUBY_T_RATIONAL = 0x0f,
-
- RUBY_T_NIL = 0x11,
- RUBY_T_TRUE = 0x12,
- RUBY_T_FALSE = 0x13,
- RUBY_T_SYMBOL = 0x14,
- RUBY_T_FIXNUM = 0x15,
- RUBY_T_UNDEF = 0x16,
-
- RUBY_T_IMEMO = 0x1a, /*!< @see imemo_type */
- RUBY_T_NODE = 0x1b,
- RUBY_T_ICLASS = 0x1c,
- RUBY_T_ZOMBIE = 0x1d,
- RUBY_T_MOVED = 0x1e,
-
- RUBY_T_MASK = 0x1f
-};
-
-#define T_NONE RUBY_T_NONE
-#define T_NIL RUBY_T_NIL
-#define T_OBJECT RUBY_T_OBJECT
-#define T_CLASS RUBY_T_CLASS
-#define T_ICLASS RUBY_T_ICLASS
-#define T_MODULE RUBY_T_MODULE
-#define T_FLOAT RUBY_T_FLOAT
-#define T_STRING RUBY_T_STRING
-#define T_REGEXP RUBY_T_REGEXP
-#define T_ARRAY RUBY_T_ARRAY
-#define T_HASH RUBY_T_HASH
-#define T_STRUCT RUBY_T_STRUCT
-#define T_BIGNUM RUBY_T_BIGNUM
-#define T_FILE RUBY_T_FILE
-#define T_FIXNUM RUBY_T_FIXNUM
-#define T_TRUE RUBY_T_TRUE
-#define T_FALSE RUBY_T_FALSE
-#define T_DATA RUBY_T_DATA
-#define T_MATCH RUBY_T_MATCH
-#define T_SYMBOL RUBY_T_SYMBOL
-#define T_RATIONAL RUBY_T_RATIONAL
-#define T_COMPLEX RUBY_T_COMPLEX
-#define T_IMEMO RUBY_T_IMEMO
-#define T_UNDEF RUBY_T_UNDEF
-#define T_NODE RUBY_T_NODE
-#define T_ZOMBIE RUBY_T_ZOMBIE
-#define T_MOVED RUBY_T_MOVED
-#define T_MASK RUBY_T_MASK
-
-#define RB_BUILTIN_TYPE(x) (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK)
-#define BUILTIN_TYPE(x) RB_BUILTIN_TYPE(x)
-
-static inline int rb_type(VALUE obj);
-#define TYPE(x) rb_type((VALUE)(x))
-
-#define RB_FLOAT_TYPE_P(obj) (\
- RB_FLONUM_P(obj) || \
- (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT))
-
-#define RB_TYPE_P(obj, type) ( \
- ((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : \
- ((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : \
- ((type) == RUBY_T_FALSE) ? ((obj) == RUBY_Qfalse) : \
- ((type) == RUBY_T_NIL) ? ((obj) == RUBY_Qnil) : \
- ((type) == RUBY_T_UNDEF) ? ((obj) == RUBY_Qundef) : \
- ((type) == RUBY_T_SYMBOL) ? RB_SYMBOL_P(obj) : \
- ((type) == RUBY_T_FLOAT) ? RB_FLOAT_TYPE_P(obj) : \
- (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == (type)))
-
-#ifdef __GNUC__
-#define RB_GC_GUARD(v) \
- (*__extension__ ({ \
- volatile VALUE *rb_gc_guarded_ptr = &(v); \
- __asm__("" : : "m"(rb_gc_guarded_ptr)); \
- rb_gc_guarded_ptr; \
- }))
-#elif defined _MSC_VER
-#pragma optimize("", off)
-static inline volatile VALUE *rb_gc_guarded_ptr(volatile VALUE *ptr) {return ptr;}
-#pragma optimize("", on)
-#define RB_GC_GUARD(v) (*rb_gc_guarded_ptr(&(v)))
-#else
-volatile VALUE *rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val);
-#define HAVE_RB_GC_GUARDED_PTR_VAL 1
-#define RB_GC_GUARD(v) (*rb_gc_guarded_ptr_val(&(v),(v)))
-#endif
-
-#ifdef __GNUC__
-#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
-#else
-#define RB_UNUSED_VAR(x) x
-#endif
-
-void rb_check_type(VALUE,int);
-#define Check_Type(v,t) rb_check_type((VALUE)(v),(t))
-
-VALUE rb_str_to_str(VALUE);
-VALUE rb_string_value(volatile VALUE*);
-char *rb_string_value_ptr(volatile VALUE*);
-char *rb_string_value_cstr(volatile VALUE*);
-
-#define StringValue(v) rb_string_value(&(v))
-#define StringValuePtr(v) rb_string_value_ptr(&(v))
-#define StringValueCStr(v) rb_string_value_cstr(&(v))
-
-void rb_check_safe_obj(VALUE);
-#define SafeStringValue(v) StringValue(v)
-#if GCC_VERSION_SINCE(4,4,0)
-void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")));
-# define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
-#else
-# define rb_check_safe_str(x) [<"rb_check_safe_str() is obsolete; use StringValue() instead">]
-# define Check_SafeStr(v) [<"Check_SafeStr() is obsolete; use StringValue() instead">]
-#endif
-
-VALUE rb_str_export(VALUE);
-#define ExportStringValue(v) do {\
- StringValue(v);\
- (v) = rb_str_export(v);\
-} while (0)
-VALUE rb_str_export_locale(VALUE);
-
-VALUE rb_get_path(VALUE);
-#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
-
-VALUE rb_get_path_no_checksafe(VALUE);
-#define FilePathStringValue(v) ((v) = rb_get_path(v))
-
-/* Remove in 3.0 */
-#define RUBY_SAFE_LEVEL_MAX 1
-void rb_secure(int);
-int rb_safe_level(void);
-void rb_set_safe_level(int);
-#if GCC_VERSION_SINCE(4,4,0)
-int ruby_safe_level_2_error(void) __attribute__((error("$SAFE=2 to 4 are obsolete")));
-int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 are obsolete")));
-# ifdef RUBY_EXPORT
-# define ruby_safe_level_2_warning() ruby_safe_level_2_error()
-# endif
-# if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-# define RUBY_SAFE_LEVEL_INVALID_P(level) \
- __extension__(\
- __builtin_choose_expr(\
- __builtin_constant_p(level), \
- ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)), 0))
-# define RUBY_SAFE_LEVEL_CHECK(level, type) \
- __extension__(__builtin_choose_expr(RUBY_SAFE_LEVEL_INVALID_P(level), ruby_safe_level_2_##type(), (level)))
-# else
-/* in gcc 4.8 or earlier, __builtin_choose_expr() does not consider
- * __builtin_constant_p(variable) a constant expression.
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
*/
-# define RUBY_SAFE_LEVEL_INVALID_P(level) \
- __extension__(__builtin_constant_p(level) && \
- ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)))
-# define RUBY_SAFE_LEVEL_CHECK(level, type) \
- (RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby_safe_level_2_##type() : (level))
-# endif
-# define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level, warning))
-# define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
-#endif
-void rb_set_safe_level_force(int);
-void rb_secure_update(VALUE);
-NORETURN(void rb_insecure_operation(void));
-
-VALUE rb_errinfo(void);
-void rb_set_errinfo(VALUE);
-
-long rb_num2long(VALUE);
-unsigned long rb_num2ulong(VALUE);
-static inline long
-rb_num2long_inline(VALUE x)
-{
- if (RB_FIXNUM_P(x))
- return RB_FIX2LONG(x);
- else
- return rb_num2long(x);
-}
-#define RB_NUM2LONG(x) rb_num2long_inline(x)
-#define NUM2LONG(x) RB_NUM2LONG(x)
-static inline unsigned long
-rb_num2ulong_inline(VALUE x)
-{
- if (RB_FIXNUM_P(x))
- return RB_FIX2ULONG(x);
- else
- return rb_num2ulong(x);
-}
-#define RB_NUM2ULONG(x) rb_num2ulong_inline(x)
-#define NUM2ULONG(x) RB_NUM2ULONG(x)
-#if SIZEOF_INT < SIZEOF_LONG
-long rb_num2int(VALUE);
-long rb_fix2int(VALUE);
-#define RB_FIX2INT(x) ((int)rb_fix2int((VALUE)(x)))
-
-static inline int
-rb_num2int_inline(VALUE x)
-{
- if (RB_FIXNUM_P(x))
- return (int)rb_fix2int(x);
- else
- return (int)rb_num2int(x);
-}
-#define RB_NUM2INT(x) rb_num2int_inline(x)
-
-unsigned long rb_num2uint(VALUE);
-#define RB_NUM2UINT(x) ((unsigned int)rb_num2uint(x))
-unsigned long rb_fix2uint(VALUE);
-#define RB_FIX2UINT(x) ((unsigned int)rb_fix2uint(x))
-#else /* SIZEOF_INT < SIZEOF_LONG */
-#define RB_NUM2INT(x) ((int)RB_NUM2LONG(x))
-#define RB_NUM2UINT(x) ((unsigned int)RB_NUM2ULONG(x))
-#define RB_FIX2INT(x) ((int)RB_FIX2LONG(x))
-#define RB_FIX2UINT(x) ((unsigned int)RB_FIX2ULONG(x))
-#endif /* SIZEOF_INT < SIZEOF_LONG */
-#define NUM2INT(x) RB_NUM2INT(x)
-#define NUM2UINT(x) RB_NUM2UINT(x)
-#define FIX2INT(x) RB_FIX2INT(x)
-#define FIX2UINT(x) RB_FIX2UINT(x)
-
-short rb_num2short(VALUE);
-unsigned short rb_num2ushort(VALUE);
-short rb_fix2short(VALUE);
-unsigned short rb_fix2ushort(VALUE);
-#define RB_FIX2SHORT(x) (rb_fix2short((VALUE)(x)))
-#define FIX2SHORT(x) RB_FIX2SHORT(x)
-static inline short
-rb_num2short_inline(VALUE x)
-{
- if (RB_FIXNUM_P(x))
- return rb_fix2short(x);
- else
- return rb_num2short(x);
-}
-
-#define RB_NUM2SHORT(x) rb_num2short_inline(x)
-#define RB_NUM2USHORT(x) rb_num2ushort(x)
-#define NUM2SHORT(x) RB_NUM2SHORT(x)
-#define NUM2USHORT(x) RB_NUM2USHORT(x)
-
-#ifdef HAVE_LONG_LONG
-LONG_LONG rb_num2ll(VALUE);
-unsigned LONG_LONG rb_num2ull(VALUE);
-static inline LONG_LONG
-rb_num2ll_inline(VALUE x)
-{
- if (RB_FIXNUM_P(x))
- return RB_FIX2LONG(x);
- else
- return rb_num2ll(x);
-}
-# define RB_NUM2LL(x) rb_num2ll_inline(x)
-# define RB_NUM2ULL(x) rb_num2ull(x)
-# define NUM2LL(x) RB_NUM2LL(x)
-# define NUM2ULL(x) RB_NUM2ULL(x)
-#endif
-
-#if !defined(NUM2OFFT)
-# if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG
-# define NUM2OFFT(x) ((off_t)NUM2LL(x))
-# else
-# define NUM2OFFT(x) NUM2LONG(x)
-# endif
-#endif
-
-#if defined(HAVE_LONG_LONG) && SIZEOF_SIZE_T > SIZEOF_LONG
-# define NUM2SIZET(x) ((size_t)NUM2ULL(x))
-# define NUM2SSIZET(x) ((ssize_t)NUM2LL(x))
-#else
-# define NUM2SIZET(x) NUM2ULONG(x)
-# define NUM2SSIZET(x) NUM2LONG(x)
-#endif
-
-double rb_num2dbl(VALUE);
-#define NUM2DBL(x) rb_num2dbl((VALUE)(x))
-
-VALUE rb_uint2big(uintptr_t);
-VALUE rb_int2big(intptr_t);
-
-VALUE rb_newobj(void);
-VALUE rb_newobj_of(VALUE, VALUE);
-VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
-#define RB_NEWOBJ(obj,type) type *(obj) = (type*)rb_newobj()
-#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)rb_newobj_of(klass, flags)
-#define NEWOBJ(obj,type) RB_NEWOBJ(obj,type)
-#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags) /* core has special NEWOBJ_OF() in internal.h */
-#define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t) /* use NEWOBJ_OF instead of NEWOBJ()+OBJSETUP() */
-#define CLONESETUP(clone,obj) rb_clone_setup(clone,obj)
-#define DUPSETUP(dup,obj) rb_dup_setup(dup,obj)
-
-#ifndef USE_RGENGC
-#define USE_RGENGC 1
-#ifndef USE_RINCGC
-#define USE_RINCGC 1
-#endif
-#endif
-
-#if USE_RGENGC == 0
-#define USE_RINCGC 0
-#endif
-
-#ifndef RGENGC_WB_PROTECTED_ARRAY
-#define RGENGC_WB_PROTECTED_ARRAY 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_HASH
-#define RGENGC_WB_PROTECTED_HASH 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_STRUCT
-#define RGENGC_WB_PROTECTED_STRUCT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_STRING
-#define RGENGC_WB_PROTECTED_STRING 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_OBJECT
-#define RGENGC_WB_PROTECTED_OBJECT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_REGEXP
-#define RGENGC_WB_PROTECTED_REGEXP 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_CLASS
-#define RGENGC_WB_PROTECTED_CLASS 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_FLOAT
-#define RGENGC_WB_PROTECTED_FLOAT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_COMPLEX
-#define RGENGC_WB_PROTECTED_COMPLEX 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_RATIONAL
-#define RGENGC_WB_PROTECTED_RATIONAL 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_BIGNUM
-#define RGENGC_WB_PROTECTED_BIGNUM 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_NODE_CREF
-#define RGENGC_WB_PROTECTED_NODE_CREF 1
-#endif
-
-#ifdef __GNUC__
-__extension__
-#endif
-enum ruby_fl_type {
- RUBY_FL_WB_PROTECTED = (1<<5),
- RUBY_FL_PROMOTED0 = (1<<5),
- RUBY_FL_PROMOTED1 = (1<<6),
- RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0|RUBY_FL_PROMOTED1,
- RUBY_FL_FINALIZE = (1<<7),
- RUBY_FL_TAINT = (1<<8),
- RUBY_FL_UNTRUSTED = RUBY_FL_TAINT,
- RUBY_FL_SEEN_OBJ_ID = (1<<9),
- RUBY_FL_EXIVAR = (1<<10),
- RUBY_FL_FREEZE = (1<<11),
-
- RUBY_FL_USHIFT = 12,
-
-#define RUBY_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
- RUBY_FL_USER_N(0),
- RUBY_FL_USER_N(1),
- RUBY_FL_USER_N(2),
- RUBY_FL_USER_N(3),
- RUBY_FL_USER_N(4),
- RUBY_FL_USER_N(5),
- RUBY_FL_USER_N(6),
- RUBY_FL_USER_N(7),
- RUBY_FL_USER_N(8),
- RUBY_FL_USER_N(9),
- RUBY_FL_USER_N(10),
- RUBY_FL_USER_N(11),
- RUBY_FL_USER_N(12),
- RUBY_FL_USER_N(13),
- RUBY_FL_USER_N(14),
- RUBY_FL_USER_N(15),
- RUBY_FL_USER_N(16),
- RUBY_FL_USER_N(17),
- RUBY_FL_USER_N(18),
-#if defined ENUM_OVER_INT || SIZEOF_INT*CHAR_BIT>12+19+1
- RUBY_FL_USER_N(19),
-#else
-#define RUBY_FL_USER19 (((VALUE)1)<<(RUBY_FL_USHIFT+19))
-#endif
-
- RUBY_ELTS_SHARED = RUBY_FL_USER2,
- RUBY_FL_DUPPED = (RUBY_T_MASK|RUBY_FL_EXIVAR|RUBY_FL_TAINT),
- RUBY_FL_SINGLETON = RUBY_FL_USER0
-};
-
-struct RUBY_ALIGNAS(SIZEOF_VALUE) RBasic {
- VALUE flags;
- const VALUE klass;
-};
-
-VALUE rb_obj_hide(VALUE obj);
-VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change klass information */
-
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-# define RB_OBJ_WB_UNPROTECT_FOR(type, obj) \
- __extension__( \
- __builtin_choose_expr( \
- RGENGC_WB_PROTECTED_##type, \
- OBJ_WB_UNPROTECT((VALUE)(obj)), ((VALUE)(obj))))
-#else
-# define RB_OBJ_WB_UNPROTECT_FOR(type, obj) \
- (RGENGC_WB_PROTECTED_##type ? \
- OBJ_WB_UNPROTECT((VALUE)(obj)) : ((VALUE)(obj)))
-#endif
-
-#define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
-
-#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
-enum ruby_rvalue_flags {
- RVALUE_EMBED_LEN_MAX = 3,
-};
-
-#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
-#define ROBJECT_EMBED ROBJECT_EMBED
-enum ruby_robject_flags {
- ROBJECT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
- ROBJECT_EMBED = RUBY_FL_USER1,
-
- ROBJECT_ENUM_END
-};
-
-struct RObject {
- struct RBasic basic;
- union {
- struct {
- uint32_t numiv;
- VALUE *ivptr;
- void *iv_index_tbl; /* shortcut for RCLASS_IV_INDEX_TBL(rb_obj_class(obj)) */
- } heap;
- VALUE ary[ROBJECT_EMBED_LEN_MAX];
- } as;
-};
-#define ROBJECT_NUMIV(o) \
- ((RBASIC(o)->flags & ROBJECT_EMBED) ? \
- ROBJECT_EMBED_LEN_MAX : \
- ROBJECT(o)->as.heap.numiv)
-#define ROBJECT_IVPTR(o) \
- ((RBASIC(o)->flags & ROBJECT_EMBED) ? \
- ROBJECT(o)->as.ary : \
- ROBJECT(o)->as.heap.ivptr)
-#define ROBJECT_IV_INDEX_TBL(o) \
- ((RBASIC(o)->flags & ROBJECT_EMBED) ? \
- RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \
- ROBJECT(o)->as.heap.iv_index_tbl)
-
-#define RCLASS_SUPER(c) rb_class_get_superclass(c)
-#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
-#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
-#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
-#define RMODULE_SUPER(m) RCLASS_SUPER(m)
-#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
-#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
-#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
-enum ruby_rmodule_flags {
- RMODULE_IS_OVERLAID = RUBY_FL_USER2,
- RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
- RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4,
-
- RMODULE_ENUM_END
-};
-
-PUREFUNC(double rb_float_value(VALUE));
-VALUE rb_float_new(double);
-VALUE rb_float_new_in_heap(double);
-
-#define RFLOAT_VALUE(v) rb_float_value(v)
-#define DBL2NUM(dbl) rb_float_new(dbl)
-
-#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
-#define ELTS_SHARED RUBY_ELTS_SHARED
-
-#define RSTRING_NOEMBED RSTRING_NOEMBED
-#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
-#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
-#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
-#define RSTRING_FSTR RSTRING_FSTR
-enum ruby_rstring_flags {
- RSTRING_NOEMBED = RUBY_FL_USER1,
- RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
- RUBY_FL_USER5|RUBY_FL_USER6),
- RSTRING_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+2),
- RSTRING_EMBED_LEN_MAX = (int)((sizeof(VALUE)*RVALUE_EMBED_LEN_MAX)/sizeof(char)-1),
- RSTRING_FSTR = RUBY_FL_USER17,
-
- RSTRING_ENUM_END
-};
-
-struct RString {
- struct RBasic basic;
- union {
- struct {
- long len;
- char *ptr;
- union {
- long capa;
- VALUE shared;
- } aux;
- } heap;
- char ary[RSTRING_EMBED_LEN_MAX + 1];
- } as;
-};
-#define RSTRING_EMBED_LEN(str) \
- (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
- (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT))
-#define RSTRING_LEN(str) \
- (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
- RSTRING_EMBED_LEN(str) : \
- RSTRING(str)->as.heap.len)
-#define RSTRING_PTR(str) \
- (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
- RSTRING(str)->as.ary : \
- RSTRING(str)->as.heap.ptr)
-#define RSTRING_END(str) \
- (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
- (RSTRING(str)->as.ary + RSTRING_EMBED_LEN(str)) : \
- (RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len))
-#define RSTRING_LENINT(str) rb_long2int(RSTRING_LEN(str))
-#define RSTRING_GETMEM(str, ptrvar, lenvar) \
- (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
- ((ptrvar) = RSTRING(str)->as.ary, (lenvar) = RSTRING_EMBED_LEN(str)) : \
- ((ptrvar) = RSTRING(str)->as.heap.ptr, (lenvar) = RSTRING(str)->as.heap.len))
-
-#ifndef USE_TRANSIENT_HEAP
-#define USE_TRANSIENT_HEAP 1
-#endif
-
-enum ruby_rarray_flags {
- RARRAY_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
- RARRAY_EMBED_FLAG = RUBY_FL_USER1,
- /* RUBY_FL_USER2 is for ELTS_SHARED */
- RARRAY_EMBED_LEN_MASK = (RUBY_FL_USER4|RUBY_FL_USER3),
- RARRAY_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+3),
-
-#if USE_TRANSIENT_HEAP
- RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13,
-#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
-#else
-#define RARRAY_TRANSIENT_FLAG 0
-#endif
-
- RARRAY_ENUM_END
-};
-#define RARRAY_EMBED_FLAG (VALUE)RARRAY_EMBED_FLAG
-#define RARRAY_EMBED_LEN_MASK (VALUE)RARRAY_EMBED_LEN_MASK
-#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
-#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
-
-struct RArray {
- struct RBasic basic;
- union {
- struct {
- long len;
- union {
- long capa;
-#if defined(__clang__) /* <- clang++ is sane */ || \
- !defined(__cplusplus) /* <- C99 is sane */ || \
- (__cplusplus > 199711L) /* <- C++11 is sane */
- const
-#endif
- VALUE shared_root;
- } aux;
- const VALUE *ptr;
- } heap;
- const VALUE ary[RARRAY_EMBED_LEN_MAX];
- } as;
-};
-#define RARRAY_EMBED_LEN(a) \
- (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
- (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))
-#define RARRAY_LEN(a) rb_array_len(a)
-#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
-#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
-#define RARRAY_CONST_PTR_TRANSIENT(a) rb_array_const_ptr_transient(a)
-
-#if USE_TRANSIENT_HEAP
-#define RARRAY_TRANSIENT_P(ary) FL_TEST_RAW((ary), RARRAY_TRANSIENT_FLAG)
-#else
-#define RARRAY_TRANSIENT_P(ary) 0
-#endif
-
-#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
-#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
-
-#define RARRAY_PTR_USE_TRANSIENT(ary, ptr_name, expr) do { \
- const VALUE _ary = (ary); \
- VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); \
- expr; \
- RARRAY_PTR_USE_END_TRANSIENT(_ary); \
-} while (0)
-
-#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
-#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
-
-#define RARRAY_PTR_USE(ary, ptr_name, expr) do { \
- const VALUE _ary = (ary); \
- VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START(_ary); \
- expr; \
- RARRAY_PTR_USE_END(_ary); \
-} while (0)
-
-#define RARRAY_AREF(a, i) (RARRAY_CONST_PTR_TRANSIENT(a)[i])
-#define RARRAY_ASET(a, i, v) do { \
- const VALUE _ary = (a); \
- const VALUE _v = (v); \
- VALUE *ptr = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); \
- RB_OBJ_WRITE(_ary, &ptr[i], _v); \
- RARRAY_PTR_USE_END_TRANSIENT(_ary); \
-} while (0)
-
-#define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(ARRAY, a)))
-
-struct RRegexp {
- struct RBasic basic;
- struct re_pattern_buffer *ptr;
- const VALUE src;
- unsigned long usecnt;
-};
-#define RREGEXP_PTR(r) (RREGEXP(r)->ptr)
-#define RREGEXP_SRC(r) (RREGEXP(r)->src)
-#define RREGEXP_SRC_PTR(r) RSTRING_PTR(RREGEXP(r)->src)
-#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
-#define RREGEXP_SRC_END(r) RSTRING_END(RREGEXP(r)->src)
-
-/* RHash is defined at internal.h */
-size_t rb_hash_size_num(VALUE hash);
-
-#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
-#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
-#define RHASH_IFNONE(h) rb_hash_ifnone(h)
-#define RHASH_SIZE(h) rb_hash_size_num(h)
-#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
-#define RHASH_SET_IFNONE(h, ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
-
-struct RFile {
- struct RBasic basic;
- struct rb_io_t *fptr;
-};
-
-struct RData {
- struct RBasic basic;
- void (*dmark)(void*);
- void (*dfree)(void*);
- void *data;
-};
-
-typedef struct rb_data_type_struct rb_data_type_t;
-
-struct rb_data_type_struct {
- const char *wrap_struct_name;
- struct {
- void (*dmark)(void*);
- void (*dfree)(void*);
- size_t (*dsize)(const void *);
- void (*dcompact)(void*);
- void *reserved[1]; /* For future extension.
- This array *must* be filled with ZERO. */
- } function;
- const rb_data_type_t *parent;
- void *data; /* This area can be used for any purpose
- by a programmer who define the type. */
- VALUE flags; /* RUBY_FL_WB_PROTECTED */
-};
-
-#define HAVE_TYPE_RB_DATA_TYPE_T 1
-#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
-#define HAVE_RB_DATA_TYPE_T_PARENT 1
-
-struct RTypedData {
- struct RBasic basic;
- const rb_data_type_t *type;
- VALUE typed_flag; /* 1 or not */
- void *data;
-};
-
-#define DATA_PTR(dta) (RDATA(dta)->data)
-
-#define RTYPEDDATA_P(v) (RTYPEDDATA(v)->typed_flag == 1)
-#define RTYPEDDATA_TYPE(v) (RTYPEDDATA(v)->type)
-#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
-
-/*
-#define RUBY_DATA_FUNC(func) ((void (*)(void*))(func))
-*/
-typedef void (*RUBY_DATA_FUNC)(void*);
-
-#ifndef RUBY_UNTYPED_DATA_WARNING
-# if defined RUBY_EXPORT
-# define RUBY_UNTYPED_DATA_WARNING 1
-# else
-# define RUBY_UNTYPED_DATA_WARNING 0
-# endif
-#endif
-VALUE rb_data_object_wrap(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
-VALUE rb_data_object_zalloc(VALUE,size_t,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
-VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
-VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
-int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
-int rb_typeddata_is_kind_of(VALUE, const rb_data_type_t *);
-void *rb_check_typeddata(VALUE, const rb_data_type_t *);
-#define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t))
-#define RUBY_DEFAULT_FREE ((RUBY_DATA_FUNC)-1)
-#define RUBY_NEVER_FREE ((RUBY_DATA_FUNC)0)
-#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
-#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
-
-/* bits for rb_data_type_struct::flags */
-#define RUBY_TYPED_FREE_IMMEDIATELY 1 /* TYPE field */
-#define RUBY_TYPED_WB_PROTECTED RUBY_FL_WB_PROTECTED /* THIS FLAG DEPENDS ON Ruby version */
-#define RUBY_TYPED_PROMOTED1 RUBY_FL_PROMOTED1 /* THIS FLAG DEPENDS ON Ruby version */
-
-#define Data_Wrap_Struct(klass,mark,free,sval)\
- rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
-
-#define Data_Make_Struct0(result, klass, type, size, mark, free, sval) \
- VALUE result = rb_data_object_zalloc((klass), (size), \
- (RUBY_DATA_FUNC)(mark), \
- (RUBY_DATA_FUNC)(free)); \
- (void)((sval) = (type *)DATA_PTR(result));
-
-#ifdef __GNUC__
-#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION_BLOCK(\
- Data_Make_Struct0(data_struct_obj, klass, type, sizeof(type), mark, free, sval); \
- data_struct_obj \
-)
-#else
-#define Data_Make_Struct(klass,type,mark,free,sval) (\
- rb_data_object_make((klass),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free),(void **)&(sval),sizeof(type)) \
-)
-#endif
-
-#define TypedData_Wrap_Struct(klass,data_type,sval)\
- rb_data_typed_object_wrap((klass),(sval),(data_type))
-
-#define TypedData_Make_Struct0(result, klass, type, size, data_type, sval) \
- VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); \
- (void)((sval) = (type *)DATA_PTR(result));
-
-#ifdef __GNUC__
-#define TypedData_Make_Struct(klass, type, data_type, sval) RB_GNUC_EXTENSION_BLOCK(\
- TypedData_Make_Struct0(data_struct_obj, klass, type, sizeof(type), data_type, sval); \
- data_struct_obj \
-)
-#else
-#define TypedData_Make_Struct(klass, type, data_type, sval) (\
- rb_data_typed_object_make((klass),(data_type),(void **)&(sval),sizeof(type)) \
-)
-#endif
-
-#define Data_Get_Struct(obj,type,sval) \
- ((sval) = (type*)rb_data_object_get(obj))
-
-#define TypedData_Get_Struct(obj,type,data_type,sval) \
- ((sval) = (type*)rb_check_typeddata((obj), (data_type)))
-
-#define RSTRUCT_LEN(st) NUM2LONG(rb_struct_size(st))
-#define RSTRUCT_PTR(st) rb_struct_ptr(st)
-#define RSTRUCT_SET(st, idx, v) rb_struct_aset(st, INT2NUM(idx), (v))
-#define RSTRUCT_GET(st, idx) rb_struct_aref(st, INT2NUM(idx))
-
-int rb_big_sign(VALUE);
-#define RBIGNUM_SIGN(b) (rb_big_sign(b))
-#define RBIGNUM_POSITIVE_P(b) (RBIGNUM_SIGN(b)!=0)
-#define RBIGNUM_NEGATIVE_P(b) (RBIGNUM_SIGN(b)==0)
-
-#define R_CAST(st) (struct st*)
-#define RMOVED(obj) (R_CAST(RMoved)(obj))
-#define RBASIC(obj) (R_CAST(RBasic)(obj))
-#define ROBJECT(obj) (R_CAST(RObject)(obj))
-#define RCLASS(obj) (R_CAST(RClass)(obj))
-#define RMODULE(obj) RCLASS(obj)
-#define RSTRING(obj) (R_CAST(RString)(obj))
-#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
-#define RARRAY(obj) (R_CAST(RArray)(obj))
-#define RDATA(obj) (R_CAST(RData)(obj))
-#define RTYPEDDATA(obj) (R_CAST(RTypedData)(obj))
-#define RFILE(obj) (R_CAST(RFile)(obj))
-
-#define FL_SINGLETON ((VALUE)RUBY_FL_SINGLETON)
-#define FL_WB_PROTECTED ((VALUE)RUBY_FL_WB_PROTECTED)
-#define FL_PROMOTED0 ((VALUE)RUBY_FL_PROMOTED0)
-#define FL_PROMOTED1 ((VALUE)RUBY_FL_PROMOTED1)
-#define FL_FINALIZE ((VALUE)RUBY_FL_FINALIZE)
-#define FL_TAINT ((VALUE)RUBY_FL_TAINT)
-#define FL_UNTRUSTED ((VALUE)RUBY_FL_UNTRUSTED)
-#define FL_SEEN_OBJ_ID ((VALUE)RUBY_FL_SEEN_OBJ_ID)
-#define FL_EXIVAR ((VALUE)RUBY_FL_EXIVAR)
-#define FL_FREEZE ((VALUE)RUBY_FL_FREEZE)
-
-#define FL_USHIFT ((VALUE)RUBY_FL_USHIFT)
-
-#define FL_USER0 ((VALUE)RUBY_FL_USER0)
-#define FL_USER1 ((VALUE)RUBY_FL_USER1)
-#define FL_USER2 ((VALUE)RUBY_FL_USER2)
-#define FL_USER3 ((VALUE)RUBY_FL_USER3)
-#define FL_USER4 ((VALUE)RUBY_FL_USER4)
-#define FL_USER5 ((VALUE)RUBY_FL_USER5)
-#define FL_USER6 ((VALUE)RUBY_FL_USER6)
-#define FL_USER7 ((VALUE)RUBY_FL_USER7)
-#define FL_USER8 ((VALUE)RUBY_FL_USER8)
-#define FL_USER9 ((VALUE)RUBY_FL_USER9)
-#define FL_USER10 ((VALUE)RUBY_FL_USER10)
-#define FL_USER11 ((VALUE)RUBY_FL_USER11)
-#define FL_USER12 ((VALUE)RUBY_FL_USER12)
-#define FL_USER13 ((VALUE)RUBY_FL_USER13)
-#define FL_USER14 ((VALUE)RUBY_FL_USER14)
-#define FL_USER15 ((VALUE)RUBY_FL_USER15)
-#define FL_USER16 ((VALUE)RUBY_FL_USER16)
-#define FL_USER17 ((VALUE)RUBY_FL_USER17)
-#define FL_USER18 ((VALUE)RUBY_FL_USER18)
-#define FL_USER19 ((VALUE)(unsigned int)RUBY_FL_USER19)
-
-#define RB_SPECIAL_CONST_P(x) (RB_IMMEDIATE_P(x) || !RB_TEST(x))
-#define SPECIAL_CONST_P(x) RB_SPECIAL_CONST_P(x)
-
-#define RB_FL_ABLE(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) != RUBY_T_NODE)
-#define RB_FL_TEST_RAW(x,f) (RBASIC(x)->flags&(f))
-#define RB_FL_TEST(x,f) (RB_FL_ABLE(x)?RB_FL_TEST_RAW((x),(f)):0)
-#define RB_FL_ANY_RAW(x,f) RB_FL_TEST_RAW((x),(f))
-#define RB_FL_ANY(x,f) RB_FL_TEST((x),(f))
-#define RB_FL_ALL_RAW(x,f) (RB_FL_TEST_RAW((x),(f)) == (f))
-#define RB_FL_ALL(x,f) (RB_FL_TEST((x),(f)) == (f))
-#define RB_FL_SET_RAW(x,f) (void)(RBASIC(x)->flags |= (f))
-#define RB_FL_SET(x,f) (RB_FL_ABLE(x) ? RB_FL_SET_RAW(x, f) : (void)0)
-#define RB_FL_UNSET_RAW(x,f) (void)(RBASIC(x)->flags &= ~(VALUE)(f))
-#define RB_FL_UNSET(x,f) (RB_FL_ABLE(x) ? RB_FL_UNSET_RAW(x, f) : (void)0)
-#define RB_FL_REVERSE_RAW(x,f) (void)(RBASIC(x)->flags ^= (f))
-#define RB_FL_REVERSE(x,f) (RB_FL_ABLE(x) ? RB_FL_REVERSE_RAW(x, f) : (void)0)
-
-#define RB_OBJ_TAINTABLE(x) (RB_FL_ABLE(x) && RB_BUILTIN_TYPE(x) != RUBY_T_BIGNUM && RB_BUILTIN_TYPE(x) != RUBY_T_FLOAT)
-#define RB_OBJ_TAINTED_RAW(x) RB_FL_TEST_RAW(x, RUBY_FL_TAINT)
-#define RB_OBJ_TAINTED(x) (!!RB_FL_TEST((x), RUBY_FL_TAINT))
-#define RB_OBJ_TAINT_RAW(x) RB_FL_SET_RAW(x, RUBY_FL_TAINT)
-#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : (void)0)
-#define RB_OBJ_UNTRUSTED(x) RB_OBJ_TAINTED(x)
-#define RB_OBJ_UNTRUST(x) RB_OBJ_TAINT(x)
-#define RB_OBJ_INFECT_RAW(x,s) RB_FL_SET_RAW(x, RB_OBJ_TAINTED_RAW(s))
-#define RB_OBJ_INFECT(x,s) ( \
- (RB_OBJ_TAINTABLE(x) && RB_FL_ABLE(s)) ? \
- RB_OBJ_INFECT_RAW(x, s) : (void)0)
-
-#define RB_OBJ_FROZEN_RAW(x) (RBASIC(x)->flags&RUBY_FL_FREEZE)
-#define RB_OBJ_FROZEN(x) (!RB_FL_ABLE(x) || RB_OBJ_FROZEN_RAW(x))
-#define RB_OBJ_FREEZE_RAW(x) (void)(RBASIC(x)->flags |= RUBY_FL_FREEZE)
-#define RB_OBJ_FREEZE(x) rb_obj_freeze_inline((VALUE)x)
+#define USE_SYMBOL_AS_METHOD_NAME 1
-/*!
- * \defgroup deprecated_macros deprecated macro APIs
- * \{
- * \par These macros are deprecated. Prefer their `RB_`-prefixed versions.
+/**
+ * Converts an object to a path. It first tries `#to_path` method if any, then
+ * falls back to `#to_str` method.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @exception rb_eArgError `obj` contains a NUL byte.
+ * @exception rb_eTypeError `obj` is not path-ish.
+ * @exception rb_eEncCompatError No encoding conversion from `obj` to path.
+ * @return Converted path object.
*/
-#define FL_ABLE(x) RB_FL_ABLE(x)
-#define FL_TEST_RAW(x,f) RB_FL_TEST_RAW(x,f)
-#define FL_TEST(x,f) RB_FL_TEST(x,f)
-#define FL_ANY_RAW(x,f) RB_FL_ANY_RAW(x,f)
-#define FL_ANY(x,f) RB_FL_ANY(x,f)
-#define FL_ALL_RAW(x,f) RB_FL_ALL_RAW(x,f)
-#define FL_ALL(x,f) RB_FL_ALL(x,f)
-#define FL_SET_RAW(x,f) RB_FL_SET_RAW(x,f)
-#define FL_SET(x,f) RB_FL_SET(x,f)
-#define FL_UNSET_RAW(x,f) RB_FL_UNSET_RAW(x,f)
-#define FL_UNSET(x,f) RB_FL_UNSET(x,f)
-#define FL_REVERSE_RAW(x,f) RB_FL_REVERSE_RAW(x,f)
-#define FL_REVERSE(x,f) RB_FL_REVERSE(x,f)
-
-#define OBJ_TAINTABLE(x) RB_OBJ_TAINTABLE(x)
-#define OBJ_TAINTED_RAW(x) RB_OBJ_TAINTED_RAW(x)
-#define OBJ_TAINTED(x) RB_OBJ_TAINTED(x)
-#define OBJ_TAINT_RAW(x) RB_OBJ_TAINT_RAW(x)
-#define OBJ_TAINT(x) RB_OBJ_TAINT(x)
-#define OBJ_UNTRUSTED(x) RB_OBJ_UNTRUSTED(x)
-#define OBJ_UNTRUST(x) RB_OBJ_UNTRUST(x)
-#define OBJ_INFECT_RAW(x,s) RB_OBJ_INFECT_RAW(x,s)
-#define OBJ_INFECT(x,s) RB_OBJ_INFECT(x,s)
-#define OBJ_FROZEN_RAW(x) RB_OBJ_FROZEN_RAW(x)
-#define OBJ_FROZEN(x) RB_OBJ_FROZEN(x)
-#define OBJ_FREEZE_RAW(x) RB_OBJ_FREEZE_RAW(x)
-#define OBJ_FREEZE(x) RB_OBJ_FREEZE(x)
-
-/* \} */
-
-void rb_freeze_singleton_class(VALUE klass);
-
-static inline void
-rb_obj_freeze_inline(VALUE x)
-{
- if (RB_FL_ABLE(x)) {
- RB_OBJ_FREEZE_RAW(x);
- if (RBASIC_CLASS(x) && !(RBASIC(x)->flags & RUBY_FL_SINGLETON)) {
- rb_freeze_singleton_class(x);
- }
- }
-}
-
-#if GCC_VERSION_SINCE(4,4,0)
-# define RUBY_UNTYPED_DATA_FUNC(func) func __attribute__((warning("untyped Data is unsafe; use TypedData instead")))
-#else
-# define RUBY_UNTYPED_DATA_FUNC(func) DEPRECATED(func)
-#endif
-
-#if defined(__GNUC__) && !defined(__NO_INLINE__)
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-RUBY_UNTYPED_DATA_FUNC(static inline VALUE rb_data_object_wrap_warning(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
-#endif
-RUBY_UNTYPED_DATA_FUNC(static inline void *rb_data_object_get_warning(VALUE));
-
-static inline VALUE
-rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
-{
- return rb_data_object_wrap(klass, ptr, mark, free);
-}
-
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-#define rb_data_object_wrap_warning(klass, ptr, mark, free) \
- __extension__( \
- __builtin_choose_expr( \
- __builtin_constant_p(klass) && !(klass), \
- rb_data_object_wrap(klass, ptr, mark, free), \
- rb_data_object_wrap_warning(klass, ptr, mark, free)))
-#endif
-#endif
-
-static inline void *
-rb_data_object_get(VALUE obj)
-{
- Check_Type(obj, RUBY_T_DATA);
- return ((struct RData *)obj)->data;
-}
-
-#if defined(__GNUC__) && !defined(__NO_INLINE__)
-static inline void *
-rb_data_object_get_warning(VALUE obj)
-{
- return rb_data_object_get(obj);
-}
-#endif
+VALUE rb_get_path(VALUE obj);
-static inline VALUE
-rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
-{
- Data_Make_Struct0(result, klass, void, size, mark_func, free_func, *datap);
- return result;
-}
-
-static inline VALUE
-rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
-{
- TypedData_Make_Struct0(result, klass, void, size, type, *datap);
- return result;
-}
-
-#ifndef rb_data_object_alloc
-DEPRECATED_BY(rb_data_object_wrap, static inline VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
-static inline VALUE
-rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
-{
- return rb_data_object_wrap(klass, data, dmark, dfree);
-}
-#endif
-
-#ifndef rb_data_typed_object_alloc
-DEPRECATED_BY(rb_data_typed_object_wrap, static inline VALUE rb_data_typed_object_alloc(VALUE,void*,const rb_data_type_t*));
-static inline VALUE
-rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
-{
- return rb_data_typed_object_wrap(klass, datap, type);
-}
-#endif
-
-#if defined(__GNUC__) && !defined(__NO_INLINE__)
-#define rb_data_object_wrap_0 rb_data_object_wrap
-#define rb_data_object_wrap_1 rb_data_object_wrap_warning
-#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
-#define rb_data_object_get_0 rb_data_object_get
-#define rb_data_object_get_1 rb_data_object_get_warning
-#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
-#define rb_data_object_make_0 rb_data_object_make
-#define rb_data_object_make_1 rb_data_object_make_warning
-#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
-#endif
-
-#if USE_RGENGC
-#define RB_OBJ_PROMOTED_RAW(x) RB_FL_ALL_RAW(x, RUBY_FL_PROMOTED)
-#define RB_OBJ_PROMOTED(x) (RB_SPECIAL_CONST_P(x) ? 0 : RB_OBJ_PROMOTED_RAW(x))
-#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
-
-void rb_gc_writebarrier(VALUE a, VALUE b);
-void rb_gc_writebarrier_unprotect(VALUE obj);
-
-#else /* USE_RGENGC */
-#define RB_OBJ_PROMOTED(x) 0
-#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
-#endif
-#define OBJ_PROMOTED_RAW(x) RB_OBJ_PROMOTED_RAW(x)
-#define OBJ_PROMOTED(x) RB_OBJ_PROMOTED(x)
-#define OBJ_WB_UNPROTECT(x) RB_OBJ_WB_UNPROTECT(x)
-
-/* Write barrier (WB) interfaces:
- * - RB_OBJ_WRITE(a, slot, b): WB for new reference from `a' to `b'.
- * Write `b' into `*slot'. `slot' is a pointer in `a'.
- * - RB_OBJ_WRITTEN(a, oldv, b): WB for new reference from `a' to `b'.
- * This doesn't write any values, but only a WB declaration.
- * `oldv' is replaced value with `b' (not used in current Ruby).
+/**
+ * Ensures that the parameter object is a path.
*
- * NOTE: The following core interfaces can be changed in the future.
- * Please catch up if you want to insert WB into C-extensions
- * correctly.
+ * @param[in,out] v Arbitrary ruby object.
+ * @exception rb_eArgError `v` contains a NUL byte.
+ * @exception rb_eTypeError `v` is not path-ish.
+ * @exception rb_eEncCompatError `v` is not path-compatible.
+ * @post `v` is a path.
*/
-#define RB_OBJ_WRITE(a, slot, b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
-#define RB_OBJ_WRITTEN(a, oldv, b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
-
-#ifndef USE_RGENGC_LOGGING_WB_UNPROTECT
-#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
-#endif
-
-#if USE_RGENGC_LOGGING_WB_UNPROTECT
-void rb_gc_unprotect_logging(void *objptr, const char *filename, int line);
-#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
-#endif
-
-static inline VALUE
-rb_obj_wb_unprotect(VALUE x, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_WB_UNPROTECT
- RGENGC_LOGGING_WB_UNPROTECT((void *)x, filename, line);
-#endif
-#if USE_RGENGC
- rb_gc_writebarrier_unprotect(x);
-#endif
- return x;
-}
-
-static inline VALUE
-rb_obj_written(VALUE a, RB_UNUSED_VAR(VALUE oldv), VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_OBJ_WRITTEN
- RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line);
-#endif
-
-#if USE_RGENGC
- if (!RB_SPECIAL_CONST_P(b)) {
- rb_gc_writebarrier(a, b);
- }
-#endif
-
- return a;
-}
-
-static inline VALUE
-rb_obj_write(VALUE a, VALUE *slot, VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_WRITE
- RGENGC_LOGGING_WRITE(a, slot, b, filename, line);
-#endif
-
- *slot = b;
-
-#if USE_RGENGC
- rb_obj_written(a, RUBY_Qundef /* ignore `oldv' now */, b, filename, line);
-#endif
- return a;
-}
-
-#define RUBY_INTEGER_UNIFICATION 1
-#define RB_INTEGER_TYPE_P(obj) rb_integer_type_p(obj)
-#if defined __GNUC__ && !GCC_VERSION_SINCE(4, 3, 0)
-/* clang 3.x (4.2 compatible) can't eliminate CSE of RB_BUILTIN_TYPE
- * in inline function and caller function */
-#define rb_integer_type_p(obj) \
- __extension__ ({ \
- const VALUE integer_type_obj = (obj); \
- (RB_FIXNUM_P(integer_type_obj) || \
- (!RB_SPECIAL_CONST_P(integer_type_obj) && \
- RB_BUILTIN_TYPE(integer_type_obj) == RUBY_T_BIGNUM)); \
- })
-#else
-static inline int
-rb_integer_type_p(VALUE obj)
-{
- return (RB_FIXNUM_P(obj) ||
- (!RB_SPECIAL_CONST_P(obj) &&
- RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM));
-}
-#endif
-
-#if SIZEOF_INT < SIZEOF_LONG
-# define RB_INT2NUM(v) RB_INT2FIX((int)(v))
-# define RB_UINT2NUM(v) RB_LONG2FIX((unsigned int)(v))
-#else
-static inline VALUE
-rb_int2num_inline(int v)
-{
- if (RB_FIXABLE(v))
- return RB_INT2FIX(v);
- else
- return rb_int2big(v);
-}
-#define RB_INT2NUM(x) rb_int2num_inline(x)
-
-static inline VALUE
-rb_uint2num_inline(unsigned int v)
-{
- if (RB_POSFIXABLE(v))
- return RB_LONG2FIX(v);
- else
- return rb_uint2big(v);
-}
-#define RB_UINT2NUM(x) rb_uint2num_inline(x)
-#endif
-#define INT2NUM(x) RB_INT2NUM(x)
-#define UINT2NUM(x) RB_UINT2NUM(x)
-
-static inline VALUE
-rb_long2num_inline(long v)
-{
- if (RB_FIXABLE(v))
- return RB_LONG2FIX(v);
- else
- return rb_int2big(v);
-}
-#define RB_LONG2NUM(x) rb_long2num_inline(x)
-
-static inline VALUE
-rb_ulong2num_inline(unsigned long v)
-{
- if (RB_POSFIXABLE(v))
- return RB_LONG2FIX(v);
- else
- return rb_uint2big(v);
-}
-#define RB_ULONG2NUM(x) rb_ulong2num_inline(x)
-
-static inline char
-rb_num2char_inline(VALUE x)
-{
- if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1))
- return RSTRING_PTR(x)[0];
- else
- return (char)(NUM2INT(x) & 0xff);
-}
-#define RB_NUM2CHR(x) rb_num2char_inline(x)
-
-#define RB_CHR2FIX(x) RB_INT2FIX((long)((x)&0xff))
-
-#define LONG2NUM(x) RB_LONG2NUM(x)
-#define ULONG2NUM(x) RB_ULONG2NUM(x)
-#define USHORT2NUM(x) RB_INT2FIX(x)
-#define NUM2CHR(x) RB_NUM2CHR(x)
-#define CHR2FIX(x) RB_CHR2FIX(x)
-
-#if SIZEOF_LONG < SIZEOF_VALUE
-#define RB_ST2FIX(h) RB_LONG2FIX((long)((h) > 0 ? (h) & (unsigned long)-1 >> 2 : (h) | ~((unsigned long)-1 >> 2)))
-#else
-#define RB_ST2FIX(h) RB_LONG2FIX((long)(h))
-#endif
-#define ST2FIX(h) RB_ST2FIX(h)
-
-#define RB_ALLOC_N(type,n) ((type*)ruby_xmalloc2((size_t)(n),sizeof(type)))
-#define RB_ALLOC(type) ((type*)ruby_xmalloc(sizeof(type)))
-#define RB_ZALLOC_N(type,n) ((type*)ruby_xcalloc((size_t)(n),sizeof(type)))
-#define RB_ZALLOC(type) (RB_ZALLOC_N(type,1))
-#define RB_REALLOC_N(var,type,n) ((var)=(type*)ruby_xrealloc2((char*)(var),(size_t)(n),sizeof(type)))
-
-#define ALLOC_N(type,n) RB_ALLOC_N(type,n)
-#define ALLOC(type) RB_ALLOC(type)
-#define ZALLOC_N(type,n) RB_ZALLOC_N(type,n)
-#define ZALLOC(type) RB_ZALLOC(type)
-#define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
-
-#if GCC_VERSION_BEFORE(4,9,5)
-/* GCC 4.9.2 reportedly has this feature and is broken.
- * The function is not officially documented below.
- * Seems we should not use it.
- * https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Other-Builtins.html#Other-Builtins */
-# undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
-#endif
-
-#if defined(HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN) && defined(RUBY_ALIGNOF)
-/* I don't know why but __builtin_alloca_with_align's second argument
- takes bits rather than bytes. */
-#define ALLOCA_N(type, n) \
- (type*)__builtin_alloca_with_align((sizeof(type)*(n)), \
- RUBY_ALIGNOF(type) * CHAR_BIT)
-#else
-#define ALLOCA_N(type,n) ((type*)alloca(sizeof(type)*(n)))
-#endif
-
-void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) RUBY_ATTR_ALLOC_SIZE((2));
-void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count) RUBY_ATTR_ALLOC_SIZE((2,3));
-void rb_free_tmp_buffer(volatile VALUE *store);
-NORETURN(void ruby_malloc_size_overflow(size_t, size_t));
-#if HAVE_LONG_LONG && SIZEOF_SIZE_T * 2 <= SIZEOF_LONG_LONG
-# define DSIZE_T unsigned LONG_LONG
-#elif defined(HAVE_INT128_T)
-# define DSIZE_T uint128_t
-#endif
-static inline int
-rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
-{
-#ifdef DSIZE_T
-# ifdef __GNUC__
- __extension__
-# endif
- DSIZE_T c2 = (DSIZE_T)a * (DSIZE_T)b;
- if (c2 > max) return 1;
- *c = (size_t)c2;
-#else
- if (b != 0 && a > max / b) return 1;
- *c = a * b;
-#endif
- return 0;
-}
-static inline void *
-rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
-{
- size_t cnt = (size_t)count;
- if (elsize == sizeof(VALUE)) {
- if (RB_UNLIKELY(cnt > LONG_MAX / sizeof(VALUE))) {
- ruby_malloc_size_overflow(cnt, elsize);
- }
- }
- else {
- size_t size, max = LONG_MAX - sizeof(VALUE) + 1;
- if (RB_UNLIKELY(rb_mul_size_overflow(cnt, elsize, max, &size))) {
- ruby_malloc_size_overflow(cnt, elsize);
- }
- cnt = (size + sizeof(VALUE) - 1) / sizeof(VALUE);
- }
- return rb_alloc_tmp_buffer_with_count(store, cnt * sizeof(VALUE), cnt);
-}
-/* allocates _n_ bytes temporary buffer and stores VALUE including it
- * in _v_. _n_ may be evaluated twice. */
-#ifdef C_ALLOCA
-# define RB_ALLOCV(v, n) rb_alloc_tmp_buffer(&(v), (n))
-# define RB_ALLOCV_N(type, v, n) \
- rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))
-#else
-# define RUBY_ALLOCV_LIMIT 1024
-# define RB_ALLOCV(v, n) ((n) < RUBY_ALLOCV_LIMIT ? \
- ((v) = 0, alloca(n)) : \
- rb_alloc_tmp_buffer(&(v), (n)))
-# define RB_ALLOCV_N(type, v, n) \
- ((type*)(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? \
- ((v) = 0, alloca((size_t)(n) * sizeof(type))) : \
- rb_alloc_tmp_buffer2(&(v), (long)(n), sizeof(type))))
-#endif
-#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
-
-#define ALLOCV(v, n) RB_ALLOCV(v, n)
-#define ALLOCV_N(type, v, n) RB_ALLOCV_N(type, v, n)
-#define ALLOCV_END(v) RB_ALLOCV_END(v)
-
-#define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(size_t)(n))
-#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(size_t)(n))
-#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(size_t)(n))
-#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(size_t)(n))
-#ifdef __GLIBC__
-static inline void *
-ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
-{
- /* if nothing to be copied, src may be NULL */
- return (n ? memcpy(dest, src, n) : dest);
-}
-#define memcpy(p1,p2,n) ruby_nonempty_memcpy(p1, p2, n)
-#endif
-
-void rb_obj_infect(VALUE victim, VALUE carrier);
-
-typedef int ruby_glob_func(const char*,VALUE, void*);
-void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
-int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
-int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
-
-VALUE rb_define_class(const char*,VALUE);
-VALUE rb_define_module(const char*);
-VALUE rb_define_class_under(VALUE, const char*, VALUE);
-VALUE rb_define_module_under(VALUE, const char*);
-
-void rb_include_module(VALUE,VALUE);
-void rb_extend_object(VALUE,VALUE);
-void rb_prepend_module(VALUE,VALUE);
-
-typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
-typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
-typedef void rb_gvar_marker_t(VALUE *var);
-
-rb_gvar_getter_t rb_gvar_undef_getter;
-rb_gvar_setter_t rb_gvar_undef_setter;
-rb_gvar_marker_t rb_gvar_undef_marker;
-
-rb_gvar_getter_t rb_gvar_val_getter;
-rb_gvar_setter_t rb_gvar_val_setter;
-rb_gvar_marker_t rb_gvar_val_marker;
-
-rb_gvar_getter_t rb_gvar_var_getter;
-rb_gvar_setter_t rb_gvar_var_setter;
-rb_gvar_marker_t rb_gvar_var_marker;
-
-NORETURN(rb_gvar_setter_t rb_gvar_readonly_setter);
-
-void rb_define_variable(const char*,VALUE*);
-void rb_define_virtual_variable(const char*,rb_gvar_getter_t*,rb_gvar_setter_t*);
-void rb_define_hooked_variable(const char*,VALUE*,rb_gvar_getter_t*,rb_gvar_setter_t*);
-void rb_define_readonly_variable(const char*,const VALUE*);
-void rb_define_const(VALUE,const char*,VALUE);
-void rb_define_global_const(const char*,VALUE);
-
-void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
-void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
-void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
-
-void rb_undef_method(VALUE,const char*);
-void rb_define_alias(VALUE,const char*,const char*);
-void rb_define_attr(VALUE,const char*,int,int);
+#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
-void rb_global_variable(VALUE*);
-void rb_gc_register_mark_object(VALUE);
-void rb_gc_register_address(VALUE*);
-void rb_gc_unregister_address(VALUE*);
+/**
+ * @deprecated This function is an alias of rb_get_path() now. The part that
+ * did "no_checksafe" was deleted. It remains here because of no
+ * harm.
+ */
+VALUE rb_get_path_no_checksafe(VALUE);
-ID rb_intern(const char*);
-ID rb_intern2(const char*, long);
-ID rb_intern_str(VALUE str);
-const char *rb_id2name(ID);
-ID rb_check_id(volatile VALUE *);
-ID rb_to_id(VALUE);
-VALUE rb_id2str(ID);
-VALUE rb_sym2str(VALUE);
-VALUE rb_to_symbol(VALUE name);
-VALUE rb_check_symbol(volatile VALUE *namep);
+/**
+ * @deprecated This macro is an alias of #FilePathValue now. The part that did
+ * "String" was deleted. It remains here because of no harm.
+ */
+#define FilePathStringValue(v) ((v) = rb_get_path(v))
-#define RUBY_CONST_ID_CACHE(result, str) \
- { \
- static ID rb_intern_id_cache; \
- if (!rb_intern_id_cache) \
- rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); \
- result rb_intern_id_cache; \
- }
-#define RUBY_CONST_ID(var, str) \
- do RUBY_CONST_ID_CACHE((var) =, (str)) while (0)
-#define CONST_ID_CACHE(result, str) RUBY_CONST_ID_CACHE(result, str)
-#define CONST_ID(var, str) RUBY_CONST_ID(var, str)
+/** @cond INTERNAL_MACRO */
#if defined(HAVE_BUILTIN___BUILTIN_CONSTANT_P) && defined(HAVE_STMT_AND_DECL_IN_EXPR)
-/* __builtin_constant_p and statement expression is available
- * since gcc-2.7.2.3 at least. */
-#define rb_intern(str) \
- (__builtin_constant_p(str) ? \
- __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
- rb_intern(str))
-#define rb_intern_const(str) \
- (__builtin_constant_p(str) ? \
- __extension__ (rb_intern2((str), (long)strlen(str))) : \
- (rb_intern)(str))
-
# define rb_varargs_argc_check_runtime(argc, vargc) \
(((argc) <= (vargc)) ? (argc) : \
(rb_fatal("argc(%d) exceeds actual arguments(%d)", \
- argc, vargc), 0))
+ argc, vargc), 0))
# define rb_varargs_argc_valid_p(argc, vargc) \
((argc) == 0 ? (vargc) <= 1 : /* [ruby-core:85266] [Bug #14425] */ \
(argc) == (vargc))
# if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-# if HAVE_ATTRIBUTE_ERRORFUNC
+# ifdef HAVE_ATTRIBUTE_ERRORFUNC
ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int));
# else
# define rb_varargs_bad_length(argc, vargc) \
- ((argc)/rb_varargs_argc_valid_p(argc, vargc))
+ ((argc)/rb_varargs_argc_valid_p(argc, vargc))
# endif
# define rb_varargs_argc_check(argc, vargc) \
__builtin_choose_expr(__builtin_constant_p(argc), \
- (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : \
- rb_varargs_bad_length(argc, vargc)), \
- rb_varargs_argc_check_runtime(argc, vargc))
+ (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : \
+ rb_varargs_bad_length(argc, vargc)), \
+ rb_varargs_argc_check_runtime(argc, vargc))
# else
# define rb_varargs_argc_check(argc, vargc) \
- rb_varargs_argc_check_runtime(argc, vargc)
+ rb_varargs_argc_check_runtime(argc, vargc)
# endif
-
-#else
-#define rb_intern_const(str) rb_intern2((str), (long)strlen(str))
-#endif
-
-const char *rb_class2name(VALUE);
-const char *rb_obj_classname(VALUE);
-
-void rb_p(VALUE);
-
-VALUE rb_eval_string(const char*);
-VALUE rb_eval_string_protect(const char*, int*);
-VALUE rb_eval_string_wrap(const char*, int*);
-VALUE rb_funcall(VALUE, ID, int, ...);
-VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
-VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int);
-VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
-VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int);
-#define rb_funcall2 rb_funcallv
-#define rb_funcall3 rb_funcallv_public
-VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
-VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int);
-VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
-VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int);
-int rb_scan_args(int, const VALUE*, const char*, ...);
-#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
-#define RB_SCAN_ARGS_KEYWORDS 1
-#define RB_SCAN_ARGS_EMPTY_KEYWORDS 2 /* Will be removed in 3.0 */
-#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
-int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
-VALUE rb_call_super(int, const VALUE*);
-VALUE rb_call_super_kw(int, const VALUE*, int);
-VALUE rb_current_receiver(void);
-int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
-VALUE rb_extract_keywords(VALUE *orighash);
-
-/* rb_scan_args() format allows ':' for optional hash */
-#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
-
-VALUE rb_gv_set(const char*, VALUE);
-VALUE rb_gv_get(const char*);
-VALUE rb_iv_get(VALUE, const char*);
-VALUE rb_iv_set(VALUE, const char*, VALUE);
-
-VALUE rb_equal(VALUE,VALUE);
-
-VALUE *rb_ruby_verbose_ptr(void);
-VALUE *rb_ruby_debug_ptr(void);
-#define ruby_verbose (*rb_ruby_verbose_ptr())
-#define ruby_debug (*rb_ruby_debug_ptr())
-
-/* for rb_readwrite_sys_fail first argument */
-enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
-#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
-#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
-
-PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
-PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
-COLDFUNC PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
-NORETURN(void rb_bug_errno(const char*, int));
-NORETURN(void rb_sys_fail(const char*));
-NORETURN(void rb_sys_fail_str(VALUE));
-NORETURN(void rb_mod_sys_fail(VALUE, const char*));
-NORETURN(void rb_mod_sys_fail_str(VALUE, VALUE));
-NORETURN(void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*));
-NORETURN(void rb_iter_break(void));
-NORETURN(void rb_iter_break_value(VALUE));
-NORETURN(void rb_exit(int));
-NORETURN(void rb_notimplement(void));
-VALUE rb_syserr_new(int, const char *);
-VALUE rb_syserr_new_str(int n, VALUE arg);
-NORETURN(void rb_syserr_fail(int, const char*));
-NORETURN(void rb_syserr_fail_str(int, VALUE));
-NORETURN(void rb_mod_syserr_fail(VALUE, int, const char*));
-NORETURN(void rb_mod_syserr_fail_str(VALUE, int, VALUE));
-NORETURN(void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*));
-
-/* reports if `-W' specified */
-PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2);
-PRINTF_ARGS(void rb_compile_warning(const char *, int, const char*, ...), 3, 4);
-PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
-/* reports always */
-COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
-PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
-
-#define RB_BLOCK_CALL_FUNC_STRICT 1
-#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
-#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \
- VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
-typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg));
-typedef rb_block_call_func *rb_block_call_func_t;
-
-VALUE rb_each(VALUE);
-VALUE rb_yield(VALUE);
-VALUE rb_yield_values(int n, ...);
-VALUE rb_yield_values2(int n, const VALUE *argv);
-VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
-VALUE rb_yield_splat(VALUE);
-VALUE rb_yield_splat_kw(VALUE, int);
-VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */
-#define RB_NO_KEYWORDS 0
-#define RB_PASS_KEYWORDS 1
-#define RB_PASS_EMPTY_KEYWORDS 2 /* Will be removed in 3.0 */
-#define RB_PASS_CALLED_KEYWORDS 3
-int rb_keyword_given_p(void);
-int rb_block_given_p(void);
-void rb_need_block(void);
-VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
-VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
-VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
-VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
-VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
-VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
-VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
-VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
-VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
-NORETURN(void rb_throw(const char*,VALUE));
-NORETURN(void rb_throw_obj(VALUE,VALUE));
-
-VALUE rb_require(const char*);
-
-RUBY_EXTERN VALUE rb_mKernel;
-RUBY_EXTERN VALUE rb_mComparable;
-RUBY_EXTERN VALUE rb_mEnumerable;
-RUBY_EXTERN VALUE rb_mErrno;
-RUBY_EXTERN VALUE rb_mFileTest;
-RUBY_EXTERN VALUE rb_mGC;
-RUBY_EXTERN VALUE rb_mMath;
-RUBY_EXTERN VALUE rb_mProcess;
-RUBY_EXTERN VALUE rb_mWaitReadable;
-RUBY_EXTERN VALUE rb_mWaitWritable;
-
-RUBY_EXTERN VALUE rb_cBasicObject;
-RUBY_EXTERN VALUE rb_cObject;
-RUBY_EXTERN VALUE rb_cArray;
-#ifndef RUBY_INTEGER_UNIFICATION
-RUBY_EXTERN VALUE rb_cBignum;
-#endif
-RUBY_EXTERN VALUE rb_cBinding;
-RUBY_EXTERN VALUE rb_cClass;
-RUBY_EXTERN VALUE rb_cCont;
-RUBY_EXTERN VALUE rb_cData;
-RUBY_EXTERN VALUE rb_cDir;
-RUBY_EXTERN VALUE rb_cEncoding;
-RUBY_EXTERN VALUE rb_cEnumerator;
-RUBY_EXTERN VALUE rb_cFalseClass;
-RUBY_EXTERN VALUE rb_cFile;
-#ifndef RUBY_INTEGER_UNIFICATION
-RUBY_EXTERN VALUE rb_cFixnum;
#endif
-RUBY_EXTERN VALUE rb_cComplex;
-RUBY_EXTERN VALUE rb_cFloat;
-RUBY_EXTERN VALUE rb_cHash;
-RUBY_EXTERN VALUE rb_cIO;
-RUBY_EXTERN VALUE rb_cInteger;
-RUBY_EXTERN VALUE rb_cMatch;
-RUBY_EXTERN VALUE rb_cMethod;
-RUBY_EXTERN VALUE rb_cModule;
-RUBY_EXTERN VALUE rb_cNameErrorMesg;
-RUBY_EXTERN VALUE rb_cNilClass;
-RUBY_EXTERN VALUE rb_cNumeric;
-RUBY_EXTERN VALUE rb_cProc;
-RUBY_EXTERN VALUE rb_cRandom;
-RUBY_EXTERN VALUE rb_cRange;
-RUBY_EXTERN VALUE rb_cRational;
-RUBY_EXTERN VALUE rb_cRegexp;
-RUBY_EXTERN VALUE rb_cStat;
-RUBY_EXTERN VALUE rb_cString;
-RUBY_EXTERN VALUE rb_cStruct;
-RUBY_EXTERN VALUE rb_cSymbol;
-RUBY_EXTERN VALUE rb_cThread;
-RUBY_EXTERN VALUE rb_cTime;
-RUBY_EXTERN VALUE rb_cTrueClass;
-RUBY_EXTERN VALUE rb_cUnboundMethod;
+/** @endcond */
-RUBY_EXTERN VALUE rb_eException;
-RUBY_EXTERN VALUE rb_eStandardError;
-RUBY_EXTERN VALUE rb_eSystemExit;
-RUBY_EXTERN VALUE rb_eInterrupt;
-RUBY_EXTERN VALUE rb_eSignal;
-RUBY_EXTERN VALUE rb_eFatal;
-RUBY_EXTERN VALUE rb_eArgError;
-RUBY_EXTERN VALUE rb_eEOFError;
-RUBY_EXTERN VALUE rb_eIndexError;
-RUBY_EXTERN VALUE rb_eStopIteration;
-RUBY_EXTERN VALUE rb_eKeyError;
-RUBY_EXTERN VALUE rb_eRangeError;
-RUBY_EXTERN VALUE rb_eIOError;
-RUBY_EXTERN VALUE rb_eRuntimeError;
-RUBY_EXTERN VALUE rb_eFrozenError;
-RUBY_EXTERN VALUE rb_eSecurityError;
-RUBY_EXTERN VALUE rb_eSystemCallError;
-RUBY_EXTERN VALUE rb_eThreadError;
-RUBY_EXTERN VALUE rb_eTypeError;
-RUBY_EXTERN VALUE rb_eZeroDivError;
-RUBY_EXTERN VALUE rb_eNotImpError;
-RUBY_EXTERN VALUE rb_eNoMemError;
-RUBY_EXTERN VALUE rb_eNoMethodError;
-RUBY_EXTERN VALUE rb_eFloatDomainError;
-RUBY_EXTERN VALUE rb_eLocalJumpError;
-RUBY_EXTERN VALUE rb_eSysStackError;
-RUBY_EXTERN VALUE rb_eRegexpError;
-RUBY_EXTERN VALUE rb_eEncodingError;
-RUBY_EXTERN VALUE rb_eEncCompatError;
-RUBY_EXTERN VALUE rb_eNoMatchingPatternError;
-
-RUBY_EXTERN VALUE rb_eScriptError;
-RUBY_EXTERN VALUE rb_eNameError;
-RUBY_EXTERN VALUE rb_eSyntaxError;
-RUBY_EXTERN VALUE rb_eLoadError;
-
-RUBY_EXTERN VALUE rb_eMathDomainError;
-
-RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
+/**
+ * Queries the name of the passed class.
+ *
+ * @param[in] klass An instance of a class.
+ * @return The name of `klass`.
+ * @note Return value is managed by our GC. Don't free.
+ */
+const char *rb_class2name(VALUE klass);
-static inline VALUE
-rb_class_of(VALUE obj)
-{
- if (RB_IMMEDIATE_P(obj)) {
- if (RB_FIXNUM_P(obj)) return rb_cInteger;
- if (RB_FLONUM_P(obj)) return rb_cFloat;
- if (obj == RUBY_Qtrue) return rb_cTrueClass;
- if (RB_STATIC_SYM_P(obj)) return rb_cSymbol;
- }
- else if (!RB_TEST(obj)) {
- if (obj == RUBY_Qnil) return rb_cNilClass;
- if (obj == RUBY_Qfalse) return rb_cFalseClass;
- }
- return RBASIC(obj)->klass;
-}
+/**
+ * Queries the name of the class of the passed object.
+ *
+ * @param[in] obj Arbitrary ruby object.
+ * @return The name of the class of `obj`.
+ * @note Return value is managed by our GC. Don't free.
+ */
+const char *rb_obj_classname(VALUE obj);
-static inline int
-rb_type(VALUE obj)
-{
- if (RB_IMMEDIATE_P(obj)) {
- if (RB_FIXNUM_P(obj)) return RUBY_T_FIXNUM;
- if (RB_FLONUM_P(obj)) return RUBY_T_FLOAT;
- if (obj == RUBY_Qtrue) return RUBY_T_TRUE;
- if (RB_STATIC_SYM_P(obj)) return RUBY_T_SYMBOL;
- if (obj == RUBY_Qundef) return RUBY_T_UNDEF;
- }
- else if (!RB_TEST(obj)) {
- if (obj == RUBY_Qnil) return RUBY_T_NIL;
- if (obj == RUBY_Qfalse) return RUBY_T_FALSE;
- }
- return RB_BUILTIN_TYPE(obj);
-}
+/**
+ * Inspects an object. It first calls the argument's `#inspect` method, then
+ * feeds its result string into ::rb_stdout.
+ *
+ * This is identical to Ruby level `Kernel#p`, except it takes only one object.
+ *
+ * @internal
+ *
+ * Above description is in fact inaccurate. This API interfaces with Ractors.
+ */
+void rb_p(VALUE obj);
-#ifdef __GNUC__
-#define rb_type_p(obj, type) \
- __extension__ (__builtin_constant_p(type) ? RB_TYPE_P((obj), (type)) : \
- rb_type(obj) == (type))
-#else
-#define rb_type_p(obj, type) (rb_type(obj) == (type))
-#endif
+/**
+ * This function is an optimised version of calling `#==`. It checks equality
+ * between two objects by first doing a fast identity check using using C's
+ * `==` (same as `BasicObject#equal?`). If that check fails, it calls `#==`
+ * dynamically. This optimisation actually affects semantics, because when
+ * `#==` returns false for the same object obj, `rb_equal(obj, obj)` would
+ * still return true. This happens for `Float::NAN`, where `Float::NAN ==
+ * Float::NAN` is `false`, but `rb_equal(Float::NAN, Float::NAN)` is `true`.
+ *
+ * @param[in] lhs Comparison LHS.
+ * @param[in] rhs Comparison RHS.
+ * @retval RUBY_Qtrue They are the same.
+ * @retval RUBY_Qfalse They are different.
+ */
+VALUE rb_equal(VALUE lhs, VALUE rhs);
-#ifdef __GNUC__
-#define rb_special_const_p(obj) \
- __extension__ ({ \
- VALUE special_const_obj = (obj); \
- (int)(RB_SPECIAL_CONST_P(special_const_obj) ? RUBY_Qtrue : RUBY_Qfalse); \
- })
-#else
-static inline int
-rb_special_const_p(VALUE obj)
-{
- if (RB_SPECIAL_CONST_P(obj)) return (int)RUBY_Qtrue;
- return (int)RUBY_Qfalse;
-}
-#endif
+/**
+ * Identical to rb_require_string(), except it takes C's string instead of
+ * Ruby's.
+ *
+ * @param[in] feature Name of a feature, e.g. `"json"`.
+ * @exception rb_eLoadError No such feature.
+ * @exception rb_eRuntimeError `$"` is frozen; unable to push.
+ * @retval RUBY_Qtrue The feature is loaded for the first time.
+ * @retval RUBY_Qfalse The feature has already been loaded.
+ * @post `$"` is updated.
+ */
+VALUE rb_require(const char *feature);
#include "ruby/intern.h"
-static inline void
-rb_clone_setup(VALUE clone, VALUE obj)
-{
- rb_obj_setup(clone, rb_singleton_class_clone(obj),
- RBASIC(obj)->flags & ~(FL_PROMOTED0|FL_PROMOTED1|FL_FINALIZE));
- rb_singleton_class_attached(RBASIC_CLASS(clone), clone);
- if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(clone, obj);
-}
-
-static inline void
-rb_dup_setup(VALUE dup, VALUE obj)
-{
- rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED));
- if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj);
-}
-
-static inline long
-rb_array_len(VALUE a)
-{
- return (RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
- RARRAY_EMBED_LEN(a) : RARRAY(a)->as.heap.len;
-}
-
-#if defined(__fcc__) || defined(__fcc_version) || \
- defined(__FCC__) || defined(__FCC_VERSION)
-/* workaround for old version of Fujitsu C Compiler (fcc) */
-# define FIX_CONST_VALUE_PTR(x) ((const VALUE *)(x))
-#else
-# define FIX_CONST_VALUE_PTR(x) (x)
-#endif
-
-/* internal function. do not use this function */
-static inline const VALUE *
-rb_array_const_ptr_transient(VALUE a)
-{
- return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
- RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
-}
-
-/* internal function. do not use this function */
-static inline const VALUE *
-rb_array_const_ptr(VALUE a)
-{
-#if USE_TRANSIENT_HEAP
- void rb_ary_detransient(VALUE a);
-
- if (RARRAY_TRANSIENT_P(a)) {
- rb_ary_detransient(a);
- }
-#endif
- return rb_array_const_ptr_transient(a);
-}
-
-/* internal function. do not use this function */
-static inline VALUE *
-rb_array_ptr_use_start(VALUE a, int allow_transient)
-{
- VALUE *rb_ary_ptr_use_start(VALUE ary);
-
-#if USE_TRANSIENT_HEAP
- if (!allow_transient) {
- if (RARRAY_TRANSIENT_P(a)) {
- void rb_ary_detransient(VALUE a);
- rb_ary_detransient(a);
- }
- }
-#endif
- (void)allow_transient;
-
- return rb_ary_ptr_use_start(a);
-}
-
-/* internal function. do not use this function */
-static inline void
-rb_array_ptr_use_end(VALUE a, int allow_transient)
-{
- void rb_ary_ptr_use_end(VALUE a);
- rb_ary_ptr_use_end(a);
- (void)allow_transient;
-}
-
-#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
-/* hook for external modules */
-static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
-#endif
-
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
#define RUBY_VM 1 /* YARV */
-#define HAVE_NATIVETHREAD
-int ruby_native_thread_p(void);
-
-/* traditional set_trace_func events */
-#define RUBY_EVENT_NONE 0x0000
-#define RUBY_EVENT_LINE 0x0001
-#define RUBY_EVENT_CLASS 0x0002
-#define RUBY_EVENT_END 0x0004
-#define RUBY_EVENT_CALL 0x0008
-#define RUBY_EVENT_RETURN 0x0010
-#define RUBY_EVENT_C_CALL 0x0020
-#define RUBY_EVENT_C_RETURN 0x0040
-#define RUBY_EVENT_RAISE 0x0080
-#define RUBY_EVENT_ALL 0x00ff
-
-/* for TracePoint extended events */
-#define RUBY_EVENT_B_CALL 0x0100
-#define RUBY_EVENT_B_RETURN 0x0200
-#define RUBY_EVENT_THREAD_BEGIN 0x0400
-#define RUBY_EVENT_THREAD_END 0x0800
-#define RUBY_EVENT_FIBER_SWITCH 0x1000
-#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
-#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
-
-/* special events */
-#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
-
-/* internal events */
-#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
-#define RUBY_EVENT_SWITCH 0x040000 /* obsolete name. this macro is for compatibility */
- /* 0x080000 */
-#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
-#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
-#define RUBY_INTERNAL_EVENT_GC_START 0x400000
-#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
-#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
-#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
-#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
-#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
-#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
-
-typedef uint32_t rb_event_flag_t;
-typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
-
-#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
-void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
-int rb_remove_event_hook(rb_event_hook_func_t func);
-
-/* locale insensitive functions */
-
-static inline int rb_isascii(int c){ return '\0' <= c && c <= '\x7f'; }
-static inline int rb_isupper(int c){ return 'A' <= c && c <= 'Z'; }
-static inline int rb_islower(int c){ return 'a' <= c && c <= 'z'; }
-static inline int rb_isalpha(int c){ return rb_isupper(c) || rb_islower(c); }
-static inline int rb_isdigit(int c){ return '0' <= c && c <= '9'; }
-static inline int rb_isalnum(int c){ return rb_isalpha(c) || rb_isdigit(c); }
-static inline int rb_isxdigit(int c){ return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); }
-static inline int rb_isblank(int c){ return c == ' ' || c == '\t'; }
-static inline int rb_isspace(int c){ return c == ' ' || ('\t' <= c && c <= '\r'); }
-static inline int rb_iscntrl(int c){ return ('\0' <= c && c < ' ') || c == '\x7f'; }
-static inline int rb_isprint(int c){ return ' ' <= c && c <= '\x7e'; }
-static inline int rb_ispunct(int c){ return !rb_isalnum(c); }
-static inline int rb_isgraph(int c){ return '!' <= c && c <= '\x7e'; }
-static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; }
-static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; }
-
-#ifndef ISPRINT
-#define ISASCII(c) rb_isascii(c)
-#define ISPRINT(c) rb_isprint(c)
-#define ISGRAPH(c) rb_isgraph(c)
-#define ISSPACE(c) rb_isspace(c)
-#define ISUPPER(c) rb_isupper(c)
-#define ISLOWER(c) rb_islower(c)
-#define ISALNUM(c) rb_isalnum(c)
-#define ISALPHA(c) rb_isalpha(c)
-#define ISDIGIT(c) rb_isdigit(c)
-#define ISXDIGIT(c) rb_isxdigit(c)
-#define ISBLANK(c) rb_isblank(c)
-#define ISCNTRL(c) rb_iscntrl(c)
-#define ISPUNCT(c) rb_ispunct(c)
-#endif
-#define TOUPPER(c) rb_toupper(c)
-#define TOLOWER(c) rb_tolower(c)
-int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
-int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
-#define STRCASECMP(s1, s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
-#define STRNCASECMP(s1, s2, n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
+#define HAVE_NATIVETHREAD
-unsigned long ruby_strtoul(const char *str, char **endptr, int base);
-#define STRTOUL(str, endptr, base) (ruby_strtoul((str), (endptr), (base)))
+/**
+ * Queries if the thread which calls this function is a ruby's thread.
+ * "Ruby's" in this context is a thread created using one of our APIs like
+ * rb_thread_create(). There are distinctions between ruby's and other
+ * threads. For instance calling ruby methods are allowed only from inside of
+ * a ruby's thread.
+ *
+ * @retval 1 The current thread is a Ruby's thread.
+ * @retval 0 The current thread is a random thread from outside of Ruby.
+ */
+int ruby_native_thread_p(void);
+/**
+ * @private
+ *
+ * This macro is for internal use. Must be a mistake to place here.
+ */
#define InitVM(ext) {void InitVM_##ext(void);InitVM_##ext();}
-PRINTF_ARGS(int ruby_snprintf(char *str, size_t n, char const *fmt, ...), 3, 4);
-int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-
-/* -- Remove In 3.0, Only public for rb_scan_args optimized version -- */
-int rb_empty_keyword_given_p(void);
-
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) && defined(HAVE_VA_ARGS_MACRO) && defined(__OPTIMIZE__)
-# define rb_scan_args(argc,argvp,fmt,...) \
- __builtin_choose_expr(__builtin_constant_p(fmt), \
- rb_scan_args0(argc,argvp,fmt,\
- (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \
- ((VALUE*[]){__VA_ARGS__})), \
- rb_scan_args(argc,argvp,fmt,##__VA_ARGS__))
-# if HAVE_ATTRIBUTE_ERRORFUNC
-ERRORFUNC(("bad scan arg format"), void rb_scan_args_bad_format(const char*));
-ERRORFUNC(("variable argument length doesn't match"), void rb_scan_args_length_mismatch(const char*,int));
-# else
-# define rb_scan_args_bad_format(fmt) ((void)0)
-# define rb_scan_args_length_mismatch(fmt, varc) ((void)0)
-# endif
-
-# define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
-
-# define rb_scan_args_count_end(fmt, ofs, vari) \
- (fmt[ofs] ? -1 : (vari))
-
-# define rb_scan_args_count_block(fmt, ofs, vari) \
- (fmt[ofs]!='&' ? \
- rb_scan_args_count_end(fmt, ofs, vari) : \
- rb_scan_args_count_end(fmt, ofs+1, vari+1))
-
-# define rb_scan_args_count_hash(fmt, ofs, vari) \
- (fmt[ofs]!=':' ? \
- rb_scan_args_count_block(fmt, ofs, vari) : \
- rb_scan_args_count_block(fmt, ofs+1, vari+1))
-
-# define rb_scan_args_count_trail(fmt, ofs, vari) \
- (!rb_scan_args_isdigit(fmt[ofs]) ? \
- rb_scan_args_count_hash(fmt, ofs, vari) : \
- rb_scan_args_count_hash(fmt, ofs+1, vari+(fmt[ofs]-'0')))
-
-# define rb_scan_args_count_var(fmt, ofs, vari) \
- (fmt[ofs]!='*' ? \
- rb_scan_args_count_trail(fmt, ofs, vari) : \
- rb_scan_args_count_trail(fmt, ofs+1, vari+1))
-
-# define rb_scan_args_count_opt(fmt, ofs, vari) \
- (!rb_scan_args_isdigit(fmt[ofs]) ? \
- rb_scan_args_count_var(fmt, ofs, vari) : \
- rb_scan_args_count_var(fmt, ofs+1, vari+fmt[ofs]-'0'))
-
-# define rb_scan_args_count_lead(fmt, ofs, vari) \
- (!rb_scan_args_isdigit(fmt[ofs]) ? \
- rb_scan_args_count_var(fmt, ofs, vari) : \
- rb_scan_args_count_opt(fmt, ofs+1, vari+fmt[ofs]-'0'))
-
-# define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
-
-# if defined(__has_attribute) && __has_attribute(diagnose_if)
-# define rb_scan_args_verify(fmt, varc) (void)0
-# else
-# define rb_scan_args_verify(fmt, varc) \
- (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? \
- rb_scan_args_bad_format(fmt) : \
- sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? \
- rb_scan_args_length_mismatch(fmt, varc) : \
- (void)0)
-# endif
-
-ALWAYS_INLINE(static int rb_scan_args_lead_p(const char *fmt));
-static inline int
-rb_scan_args_lead_p(const char *fmt)
-{
- return rb_scan_args_isdigit(fmt[0]);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_n_lead(const char *fmt));
-static inline int
-rb_scan_args_n_lead(const char *fmt)
-{
- return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_opt_p(const char *fmt));
-static inline int
-rb_scan_args_opt_p(const char *fmt)
-{
- return (rb_scan_args_lead_p(fmt) && rb_scan_args_isdigit(fmt[1]));
-}
-
-ALWAYS_INLINE(static int rb_scan_args_n_opt(const char *fmt));
-static inline int
-rb_scan_args_n_opt(const char *fmt)
-{
- return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_var_idx(const char *fmt));
-static inline int
-rb_scan_args_var_idx(const char *fmt)
-{
- return (!rb_scan_args_lead_p(fmt) ? 0 : !rb_scan_args_isdigit(fmt[1]) ? 1 : 2);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_f_var(const char *fmt));
-static inline int
-rb_scan_args_f_var(const char *fmt)
-{
- return (fmt[rb_scan_args_var_idx(fmt)]=='*');
-}
-
-ALWAYS_INLINE(static int rb_scan_args_trail_idx(const char *fmt));
-static inline int
-rb_scan_args_trail_idx(const char *fmt)
-{
- const int idx = rb_scan_args_var_idx(fmt);
- return idx+(fmt[idx]=='*');
-}
-
-ALWAYS_INLINE(static int rb_scan_args_n_trail(const char *fmt));
-static inline int
-rb_scan_args_n_trail(const char *fmt)
-{
- const int idx = rb_scan_args_trail_idx(fmt);
- return (rb_scan_args_isdigit(fmt[idx]) ? fmt[idx]-'0' : 0);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_hash_idx(const char *fmt));
-static inline int
-rb_scan_args_hash_idx(const char *fmt)
-{
- const int idx = rb_scan_args_trail_idx(fmt);
- return idx+rb_scan_args_isdigit(fmt[idx]);
-}
-
-ALWAYS_INLINE(static int rb_scan_args_f_hash(const char *fmt));
-static inline int
-rb_scan_args_f_hash(const char *fmt)
-{
- return (fmt[rb_scan_args_hash_idx(fmt)]==':');
-}
-
-ALWAYS_INLINE(static int rb_scan_args_block_idx(const char *fmt));
-static inline int
-rb_scan_args_block_idx(const char *fmt)
-{
- const int idx = rb_scan_args_hash_idx(fmt);
- return idx+(fmt[idx]==':');
-}
-
-ALWAYS_INLINE(static int rb_scan_args_f_block(const char *fmt));
-static inline int
-rb_scan_args_f_block(const char *fmt)
-{
- return (fmt[rb_scan_args_block_idx(fmt)]=='&');
-}
-
-# if 0
-ALWAYS_INLINE(static int rb_scan_args_end_idx(const char *fmt));
-static inline int
-rb_scan_args_end_idx(const char *fmt)
-{
- const int idx = rb_scan_args_block_idx(fmt);
- return idx+(fmt[idx]=='&');
-}
-# endif
-
-/* NOTE: Use `char *fmt` instead of `const char *fmt` because of clang's bug*/
-/* https://bugs.llvm.org/show_bug.cgi?id=38095 */
-# define rb_scan_args0(argc, argv, fmt, varc, vars) \
- rb_scan_args_set(argc, argv, \
- rb_scan_args_n_lead(fmt), \
- rb_scan_args_n_opt(fmt), \
- rb_scan_args_n_trail(fmt), \
- rb_scan_args_f_var(fmt), \
- rb_scan_args_f_hash(fmt), \
- rb_scan_args_f_block(fmt), \
- (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
-ALWAYS_INLINE(static int
-rb_scan_args_set(int argc, const VALUE *argv,
- int n_lead, int n_opt, int n_trail,
- int f_var, int f_hash, int f_block,
- VALUE *vars[], char *fmt, int varc));
-
-inline int
-rb_scan_args_set(int argc, const VALUE *argv,
- int n_lead, int n_opt, int n_trail,
- int f_var, int f_hash, int f_block,
- VALUE *vars[], RB_UNUSED_VAR(char *fmt), RB_UNUSED_VAR(int varc))
-# if defined(__has_attribute) && __has_attribute(diagnose_if)
- __attribute__((diagnose_if(rb_scan_args_count(fmt)<0,"bad scan arg format","error")))
- __attribute__((diagnose_if(rb_scan_args_count(fmt)!=varc,"variable argument length doesn't match","error")))
-# endif
-{
- int i, argi = 0, vari = 0, last_idx = -1;
- VALUE *var, hash = Qnil, last_hash = 0;
- const int n_mand = n_lead + n_trail;
- int keyword_given = rb_keyword_given_p();
- int empty_keyword_given = 0;
- VALUE tmp_buffer = 0;
-
- if (!keyword_given) {
- empty_keyword_given = rb_empty_keyword_given_p();
- }
-
- /* capture an option hash - phase 1: pop */
- /* Ignore final positional hash if empty keywords given */
- if (argc > 0 && !(f_hash && empty_keyword_given)) {
- VALUE last = argv[argc - 1];
-
- if (f_hash && n_mand < argc) {
- if (keyword_given) {
- if (!RB_TYPE_P(last, T_HASH)) {
- rb_warn("Keyword flag set when calling rb_scan_args, but last entry is not a hash");
- }
- else {
- hash = last;
- }
- }
- else if (NIL_P(last)) {
- /* For backwards compatibility, nil is taken as an empty
- option hash only if it is not ambiguous; i.e. '*' is
- not specified and arguments are given more than sufficient.
- This will be removed in Ruby 3. */
- if (!f_var && n_mand + n_opt < argc) {
- rb_warn("The last argument is nil, treating as empty keywords");
- argc--;
- }
- }
- else {
- hash = rb_check_hash_type(last);
- }
-
- /* Ruby 3: Remove if branch, as it will not attempt to split hashes */
- if (!NIL_P(hash)) {
- VALUE opts = rb_extract_keywords(&hash);
-
- if (!(last_hash = hash)) {
- if (!keyword_given) {
- /* Warn if treating positional as keyword, as in Ruby 3,
- this will be an error */
- rb_warn("Using the last argument as keyword parameters is deprecated");
- }
- argc--;
- }
- else {
- /* Warn if splitting either positional hash to keywords or keywords
- to positional hash, as in Ruby 3, no splitting will be done */
- rb_warn("The last argument is split into positional and keyword parameters");
- last_idx = argc - 1;
- }
- hash = opts ? opts : Qnil;
- }
- }
- else if (f_hash && keyword_given && n_mand == argc) {
- /* Warn if treating keywords as positional, as in Ruby 3, this will be an error */
- rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
- }
- }
- if (f_hash && n_mand > 0 && n_mand == argc+1 && empty_keyword_given) {
- VALUE *ptr = (VALUE *)rb_alloc_tmp_buffer2(&tmp_buffer, argc+1, sizeof(VALUE));
- memcpy(ptr, argv, sizeof(VALUE)*argc);
- ptr[argc] = rb_hash_new();
- argc++;
- *(&argv) = ptr;
- rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
- }
-
-
- if (argc < n_mand) {
- goto argc_error;
- }
-
- /* capture leading mandatory arguments */
- for (i = n_lead; i-- > 0; ) {
- var = vars[vari++];
- if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
- argi++;
- }
- /* capture optional arguments */
- for (i = n_opt; i-- > 0; ) {
- var = vars[vari++];
- if (argi < argc - n_trail) {
- if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
- argi++;
- }
- else {
- if (var) *var = Qnil;
- }
- }
- /* capture variable length arguments */
- if (f_var) {
- int n_var = argc - argi - n_trail;
-
- var = vars[vari++];
- if (0 < n_var) {
- if (var) {
- int f_last = (last_idx + 1 == argc - n_trail);
- *var = rb_ary_new4(n_var-f_last, &argv[argi]);
- if (f_last) rb_ary_push(*var, last_hash);
- }
- argi += n_var;
- }
- else {
- if (var) *var = rb_ary_new();
- }
- }
- /* capture trailing mandatory arguments */
- for (i = n_trail; i-- > 0; ) {
- var = vars[vari++];
- if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
- argi++;
- }
- /* capture an option hash - phase 2: assignment */
- if (f_hash) {
- var = vars[vari++];
- if (var) *var = hash;
- }
- /* capture iterator block */
- if (f_block) {
- var = vars[vari++];
- if (rb_block_given_p()) {
- *var = rb_block_proc();
- }
- else {
- *var = Qnil;
- }
- }
-
- if (argi < argc) {
- argc_error:
- if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
- rb_error_arity(argc, n_mand, f_var ? UNLIMITED_ARGUMENTS : n_mand + n_opt);
- }
+RBIMPL_ATTR_NONNULL((3))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
+/**
+ * Our own locale-insensitive version of `snprintf(3)`. It can also be seen as
+ * a routine identical to rb_sprintf(), except it writes back to the passed
+ * buffer instead of allocating a new Ruby object.
+ *
+ * @param[out] str Return buffer
+ * @param[in] n Number of bytes of `str`.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ... Variadic number of contents to format.
+ * @return Number of bytes that would have been written to `str`, if `n`
+ * was large enough. Comparing this to `n` can give you insights
+ * that the buffer is too small or too big. Especially passing 0
+ * to `n` gives you the exact number of bytes necessary to hold
+ * the result string without writing anything to anywhere.
+ * @post `str` holds up to `n-1` bytes of formatted contents (and the
+ * terminating NUL character.)
+ */
+int ruby_snprintf(char *str, size_t n, char const *fmt, ...);
- if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
- return argc;
-}
-#endif
+RBIMPL_ATTR_NONNULL((3))
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 0)
+/**
+ * Identical to ruby_snprintf(), except it takes a `va_list`. It can also be
+ * seen as a routine identical to rb_vsprintf(), except it writes back to the
+ * passed buffer instead of allocating a new Ruby object.
+ *
+ * @param[out] str Return buffer
+ * @param[in] n Number of bytes of `str`.
+ * @param[in] fmt A `printf`-like format specifier.
+ * @param[in] ap Contents to format.
+ * @return Number of bytes that would have been written to `str`, if `n`
+ * was large enough. Comparing this to `n` can give you insights
+ * that the buffer is too small or too big. Especially passing 0
+ * to `n` gives you the exact number of bytes necessary to hold
+ * the result string without writing anything to anywhere.
+ * @post `str` holds up to `n-1` bytes of formatted contents (and the
+ * terminating NUL character.)
+ */
+int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#if defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) && defined(__OPTIMIZE__)
+/** @cond INTERNAL_MACRO */
+#if RBIMPL_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments")
+# /* Skip it; clang -pedantic doesn't like the following */
+#elif defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) && defined(__OPTIMIZE__)
# define rb_yield_values(argc, ...) \
__extension__({ \
- const int rb_yield_values_argc = (argc); \
- const VALUE rb_yield_values_args[] = {__VA_ARGS__}; \
- const int rb_yield_values_nargs = \
- (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); \
- rb_yield_values2( \
- rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), \
- rb_yield_values_nargs ? rb_yield_values_args : NULL); \
+ const int rb_yield_values_argc = (argc); \
+ const VALUE rb_yield_values_args[] = {__VA_ARGS__}; \
+ const int rb_yield_values_nargs = \
+ (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); \
+ rb_yield_values2( \
+ rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), \
+ rb_yield_values_nargs ? rb_yield_values_args : NULL); \
})
# define rb_funcall(recv, mid, argc, ...) \
__extension__({ \
- const int rb_funcall_argc = (argc); \
- const VALUE rb_funcall_args[] = {__VA_ARGS__}; \
- const int rb_funcall_nargs = \
- (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); \
+ const int rb_funcall_argc = (argc); \
+ const VALUE rb_funcall_args[] = {__VA_ARGS__}; \
+ const int rb_funcall_nargs = \
+ (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); \
rb_funcallv(recv, mid, \
- rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
- rb_funcall_nargs ? rb_funcall_args : NULL); \
+ rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \
+ rb_funcall_nargs ? rb_funcall_args : NULL); \
})
#endif
+/** @endcond */
#ifndef RUBY_DONT_SUBST
#include "ruby/subst.h"
#endif
-/**
- * @defgroup embed CRuby Embedding APIs
- * CRuby interpreter APIs. These are APIs to embed MRI interpreter into your
- * program.
- * These functions are not a part of Ruby extension library API.
- * Extension libraries of Ruby should not depend on these functions.
- * @{
- */
-
-/** @defgroup ruby1 ruby(1) implementation
- * A part of the implementation of ruby(1) command.
- * Other programs that embed Ruby interpreter do not always need to use these
- * functions.
- * @{
- */
-
-void ruby_sysinit(int *argc, char ***argv);
-void ruby_init(void);
-void* ruby_options(int argc, char** argv);
-int ruby_executable_node(void *n, int *status);
-int ruby_run_node(void *n);
-
-/* version.c */
-void ruby_show_version(void);
-void ruby_show_copyright(void);
-
-
-/*! A convenience macro to call ruby_init_stack(). Must be placed just after
- * variable declarations */
-#define RUBY_INIT_STACK \
- VALUE variable_in_this_stack_frame; \
- ruby_init_stack(&variable_in_this_stack_frame);
-/*! @} */
-
-void ruby_init_stack(volatile VALUE*);
-
-int ruby_setup(void);
-int ruby_cleanup(volatile int);
-
-void ruby_finalize(void);
-NORETURN(void ruby_stop(int));
-
-void ruby_set_stack_size(size_t);
-int ruby_stack_check(void);
-size_t ruby_stack_length(VALUE**);
-
-int ruby_exec_node(void *n);
-
-void ruby_script(const char* name);
-void ruby_set_script_name(VALUE name);
-
-void ruby_prog_init(void);
-void ruby_set_argv(int, char**);
-void *ruby_process_options(int, char**);
-void ruby_init_loadpath(void);
-void ruby_incpush(const char*);
-void ruby_sig_finalize(void);
-
-/*! @} */
-
#if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY
# include "ruby/backward.h"
#endif
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-extern "C++" {
-#endif
-
-#ifdef RB_METHOD_DEFINITION_DECL
-
-RB_METHOD_DEFINITION_DECL(rb_define_method, (2,3), (VALUE klass, const char *name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_method(m, n, f, a) rb_define_method_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_method_if_constexpr(x, t, f) __builtin_choose_expr(__builtin_choose_expr(__builtin_constant_p(x),(x),0),(t),(f))
-#define rb_define_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_method15,rb_define_methodm3)
-#define rb_define_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_method14,rb_define_method_choose_prototype15(n))
-#define rb_define_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_method13,rb_define_method_choose_prototype14(n))
-#define rb_define_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_method12,rb_define_method_choose_prototype13(n))
-#define rb_define_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_method11,rb_define_method_choose_prototype12(n))
-#define rb_define_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_method10,rb_define_method_choose_prototype11(n))
-#define rb_define_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_method9, rb_define_method_choose_prototype10(n))
-#define rb_define_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_method8, rb_define_method_choose_prototype9(n))
-#define rb_define_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_method7, rb_define_method_choose_prototype8(n))
-#define rb_define_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_method6, rb_define_method_choose_prototype7(n))
-#define rb_define_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_method5, rb_define_method_choose_prototype6(n))
-#define rb_define_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_method4, rb_define_method_choose_prototype5(n))
-#define rb_define_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_method3, rb_define_method_choose_prototype4(n))
-#define rb_define_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_method2, rb_define_method_choose_prototype3(n))
-#define rb_define_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_method1, rb_define_method_choose_prototype2(n))
-#define rb_define_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_method0, rb_define_method_choose_prototype1(n))
-#define rb_define_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_methodm1,rb_define_method_choose_prototype0(n))
-#define rb_define_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_methodm2,rb_define_method_choose_prototypem1(n))
-#define rb_define_method_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_methodm3,rb_define_method_choose_prototypem2(n))
-#define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-RB_METHOD_DEFINITION_DECL(rb_define_module_function, (2,3), (VALUE klass, const char *name), (klass, name))
-#ifdef __cplusplus
-#define rb_define_module_function(m, n, f, a) rb_define_module_function_tmpl<a>::define(m, n, f)
-#else
-#define rb_define_module_function_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_module_function15,rb_define_module_functionm3)
-#define rb_define_module_function_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_module_function14,rb_define_module_function_choose_prototype15(n))
-#define rb_define_module_function_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_module_function13,rb_define_module_function_choose_prototype14(n))
-#define rb_define_module_function_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_module_function12,rb_define_module_function_choose_prototype13(n))
-#define rb_define_module_function_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_module_function11,rb_define_module_function_choose_prototype12(n))
-#define rb_define_module_function_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_module_function10,rb_define_module_function_choose_prototype11(n))
-#define rb_define_module_function_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_module_function9, rb_define_module_function_choose_prototype10(n))
-#define rb_define_module_function_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_module_function8, rb_define_module_function_choose_prototype9(n))
-#define rb_define_module_function_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_module_function7, rb_define_module_function_choose_prototype8(n))
-#define rb_define_module_function_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_module_function6, rb_define_module_function_choose_prototype7(n))
-#define rb_define_module_function_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_module_function5, rb_define_module_function_choose_prototype6(n))
-#define rb_define_module_function_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_module_function4, rb_define_module_function_choose_prototype5(n))
-#define rb_define_module_function_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_module_function3, rb_define_module_function_choose_prototype4(n))
-#define rb_define_module_function_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_module_function2, rb_define_module_function_choose_prototype3(n))
-#define rb_define_module_function_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_module_function1, rb_define_module_function_choose_prototype2(n))
-#define rb_define_module_function_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_module_function0, rb_define_module_function_choose_prototype1(n))
-#define rb_define_module_function_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_module_functionm1,rb_define_module_function_choose_prototype0(n))
-#define rb_define_module_function_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_module_functionm2,rb_define_module_function_choose_prototypem1(n))
-#define rb_define_module_function_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_module_functionm3,rb_define_module_function_choose_prototypem2(n))
-#define rb_define_module_function(klass, mid, func, arity) rb_define_module_function_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
-#endif
-
-RB_METHOD_DEFINITION_DECL(rb_define_global_function, (1,2), (const char *name), (name))
-#ifdef __cplusplus
-#define rb_define_global_function(n, f, a) rb_define_global_function_tmpl<a>::define(n, f)
-#else
-#define rb_define_global_function_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_global_function15,rb_define_global_functionm3)
-#define rb_define_global_function_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_global_function14,rb_define_global_function_choose_prototype15(n))
-#define rb_define_global_function_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_global_function13,rb_define_global_function_choose_prototype14(n))
-#define rb_define_global_function_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_global_function12,rb_define_global_function_choose_prototype13(n))
-#define rb_define_global_function_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_global_function11,rb_define_global_function_choose_prototype12(n))
-#define rb_define_global_function_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_global_function10,rb_define_global_function_choose_prototype11(n))
-#define rb_define_global_function_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_global_function9, rb_define_global_function_choose_prototype10(n))
-#define rb_define_global_function_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_global_function8, rb_define_global_function_choose_prototype9(n))
-#define rb_define_global_function_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_global_function7, rb_define_global_function_choose_prototype8(n))
-#define rb_define_global_function_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_global_function6, rb_define_global_function_choose_prototype7(n))
-#define rb_define_global_function_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_global_function5, rb_define_global_function_choose_prototype6(n))
-#define rb_define_global_function_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_global_function4, rb_define_global_function_choose_prototype5(n))
-#define rb_define_global_function_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_global_function3, rb_define_global_function_choose_prototype4(n))
-#define rb_define_global_function_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_global_function2, rb_define_global_function_choose_prototype3(n))
-#define rb_define_global_function_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_global_function1, rb_define_global_function_choose_prototype2(n))
-#define rb_define_global_function_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_global_function0, rb_define_global_function_choose_prototype1(n))
-#define rb_define_global_function_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_global_functionm1,rb_define_global_function_choose_prototype0(n))
-#define rb_define_global_function_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_global_functionm2,rb_define_global_function_choose_prototypem1(n))
-#define rb_define_global_function_choose_prototypem3(n, f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_global_functionm3,rb_define_global_function_choose_prototypem2(n))
-#define rb_define_global_function(mid, func, arity) rb_define_global_function_choose_prototypem3((arity),(func))((mid),(func),(arity));
-#endif
-
-#endif
-
-#if defined(RUBY_DEVEL) && RUBY_DEVEL && (!defined(__cplusplus) || defined(RB_METHOD_DEFINITION_DECL))
-# define RUBY_METHOD_FUNC(func) (func)
-#else
-# define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
-#endif
-
-#ifdef __cplusplus
-#include "backward/cxxanyargs.hpp"
-
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C++" { */
-#endif
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_RUBY_H */
diff --git a/include/ruby/st.h b/include/ruby/st.h
index ea1637bd9f..f35ab43603 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -1,7 +1,7 @@
/* This is a public domain general purpose hash table package
originally written by Peter Moore @ UCB.
- The hash table data strutures were redesigned and the package was
+ The hash table data structures were redesigned and the package was
rewritten by Vladimir Makarov <vmakarov@redhat.com>. */
#ifndef RUBY_ST_H
@@ -98,6 +98,8 @@ struct st_table {
enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
+size_t rb_st_table_size(const struct st_table *tbl);
+#define st_table_size rb_st_table_size
st_table *rb_st_init_table(const struct st_hash_type *);
#define st_init_table rb_st_init_table
st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);
diff --git a/include/ruby/subst.h b/include/ruby/subst.h
index 1f0e6db5a4..d7b9a63050 100644
--- a/include/ruby/subst.h
+++ b/include/ruby/subst.h
@@ -1,5 +1,12 @@
-#ifndef RUBY_SUBST_H
+#ifndef RUBY_SUBST_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_SUBST_H 1
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
#undef snprintf
#undef vsnprintf
diff --git a/include/ruby/thread.h b/include/ruby/thread.h
index d398cc127e..0b5b1ca0f3 100644
--- a/include/ruby/thread.h
+++ b/include/ruby/thread.h
@@ -1,57 +1,235 @@
-/**********************************************************************
-
- thread.h -
-
- $Author: matz $
- created at: Tue Jul 10 17:35:43 JST 2012
-
- Copyright (C) 2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_THREAD_H
+#ifndef RUBY_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_THREAD_H 1
+/**
+ * @file
+ * @author $Author: matz $
+ * @date Tue Jul 10 17:35:43 JST 2012
+ * @copyright Copyright (C) 2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/intern/thread.h" /* rb_unblock_function_t */
+#include "ruby/internal/dllexport.h"
+
+/**
+ * @name Flags for rb_nogvl()
+ *
+ * @{
+ */
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#include "ruby/intern.h"
-
-/* flags for rb_nogvl */
+/**
+ * Passing this flag to rb_nogvl() prevents it from checking interrupts.
+ * Interrupts can impact your program negatively. For instance consider
+ * following callback function:
+ *
+ * ```CXX
+ * static inline int fd; // set elsewhere.
+ * static inline auto callback(auto buf) {
+ * auto tmp = ruby_xmalloc(BUFSIZ);
+ * auto ret = ruby_xmalloc(sizeof(ssize_t)); // (a)
+ * auto n = read(fd, tmp, BUFSIZ); // (b)
+ * memcpy(buf, tmp, n); // (c)
+ * memcpy(ret, n, sizeof(n));
+ * ruby_xfree(tmp);
+ * return ret;
+ * }
+ * ```
+ *
+ * Here, if it gets interrupted at (a) or (b), `read(2)` is cancelled and this
+ * function leaks memory (which is not a good thing of course, but...). But if
+ * it gets interrupted at (c), where `read(2)` is already done, interruption is
+ * way more catastrophic because what was read gets lost. To reroute this kind
+ * of problem you should set this flag. And check interrupts elsewhere at your
+ * own risk.
+ */
#define RB_NOGVL_INTR_FAIL (0x1)
-#define RB_NOGVL_UBF_ASYNC_SAFE (0x2)
-RUBY_SYMBOL_EXPORT_BEGIN
+/**
+ * Passing this flag to rb_nogvl() indicates that the passed UBF is
+ * async-signal-safe. An UBF could be async safe, and that makes things
+ * simpler. However async unsafe UBFs are just okay. If unsure, you can
+ * safely leave it unspecified.
+ *
+ * @internal
+ *
+ * This makes sense only in case of POSIX threads.
+ */
+#define RB_NOGVL_UBF_ASYNC_SAFE (0x2)
+/** @} */
+
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * (Re-)acquires the GVL. This manoeuvre makes it possible for an out-of-GVL
+ * routine to one-shot call a ruby method.
+ *
+ * What this function does:
+ *
+ * 1. Blocks until it acquires the GVL.
+ * 2. Calls the passed function.
+ * 3. Releases the GVL.
+ * 4. Returns what was returned form the passed function.
+ *
+ * @param[in] func What to call with GVL.
+ * @param[in,out] data1 Passed as-is to `func`.
+ * @return What was returned from `func`.
+ * @warning `func` must not return a Ruby object. If it did such return
+ * value would escape from GC's scope; would not be marked.
+ * @warning Global escapes from this function just yield whatever fatal
+ * undefined behaviours. You must make sure that `func` does
+ * not raise, by properly rescuing everything using
+ * e.g. rb_protect().
+ * @warning You cannot convert a non-Ruby thread into a Ruby thread
+ * using this API. This function makes sense only from inside
+ * of a rb_thread_call_without_gvl()'s callback.
+ */
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Allows the passed function to run in parallel with other Ruby threads.
+ *
+ * What this function does:
+ *
+ * 1. Checks (and handles) pending interrupts.
+ * 2. Releases the GVL. (Others can run here in parallel...)
+ * 3. Calls the passed function.
+ * 4. Blocks until it re-acquires the GVL.
+ * 5. Checks interrupts that happened between 2 to 4.
+ *
+ * In case other threads interfaced with this thread using rb_thread_kill()
+ * etc., the passed UBF is additionally called. See ::rb_unblock_function_t
+ * for details.
+ *
+ * Unlike rb_thread_call_without_gvl2() this function also reacts to signals
+ * etc.
+ *
+ * @param[in] func A function to call without GVL.
+ * @param[in,out] data1 Passed as-is to `func`.
+ * @param[in] ubf An UBF to cancel `func`.
+ * @param[in,out] data2 Passed as-is to `ubf`.
+ * @return What `func` returned, or 0 in case `ubf` cancelled `func`.
+ * @warning You cannot use most of Ruby C APIs like calling methods or
+ * raising exceptions from any of the functions passed to it.
+ * If that is dead necessary use rb_thread_call_with_gvl() to
+ * re-acquire the GVL.
+ * @warning In short, this API is difficult. @ko1 recommends you to use
+ * other ways if any. We lack experiences to use this API. If
+ * you find any corner cases etc., please report it to the
+ * devs.
+ * @warning Releasing and re-acquiring the GVL are expensive operations.
+ * For a short-running `func`, it might be faster to just call
+ * `func` with blocking everything else. Be sure to benchmark
+ * your code to see if it is actually worth releasing the GVL.
+ */
void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
- rb_unblock_function_t *ubf, void *data2);
+ rb_unblock_function_t *ubf, void *data2);
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_thread_call_without_gvl(), except it does not interface with
+ * signals etc. As described in #RB_NOGVL_INTR_FAIL, interrupts can hurt you.
+ * In case this function detects an interrupt, it returns immediately. You can
+ * record progress of your callback and check it after returning from this
+ * function.
+ *
+ * What this function does:
+ *
+ * 1. Checks for pending interrupts and if any, just returns.
+ * 2. Releases the GVL. (Others can run here in parallel...)
+ * 3. Calls the passed function.
+ * 4. Blocks until it re-acquires the GVL.
+ *
+ * @param[in] func A function to call without GVL.
+ * @param[in,out] data1 Passed as-is to `func`.
+ * @param[in] ubf An UBF to cancel `func`.
+ * @param[in,out] data2 Passed as-is to `ubf`.
+ * @return What `func` returned, or 0 in case `func` did not return.
+ */
void *rb_thread_call_without_gvl2(void *(*func)(void *), void *data1,
- rb_unblock_function_t *ubf, void *data2);
+ rb_unblock_function_t *ubf, void *data2);
/*
* XXX: unstable/unapproved - out-of-tree code should NOT not depend
* on this until it hits Ruby 2.6.1
*/
+
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Identical to rb_thread_call_without_gvl(), except it additionally takes
+ * "flags" that change the behaviour.
+ *
+ * @param[in] func A function to call without GVL.
+ * @param[in,out] data1 Passed as-is to `func`.
+ * @param[in] ubf An UBF to cancel `func`.
+ * @param[in,out] data2 Passed as-is to `ubf`.
+ * @param[in] flags Flags.
+ * @return What `func` returned, or 0 in case `func` did not return.
+ */
void *rb_nogvl(void *(*func)(void *), void *data1,
rb_unblock_function_t *ubf, void *data2,
int flags);
+/**
+ * @private
+ *
+ * @deprecated This macro once was a thing in the old days, but makes no sense
+ * any longer today. Exists here for backwards compatibility
+ * only. You can safely forget about it.
+ */
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
-#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
-RUBY_SYMBOL_EXPORT_END
+/**
+ * @private
+ * @deprecated It seems even in the old days it made no sense...?
+ */
+#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+#define RUBY_INTERNAL_THREAD_EVENT_STARTED 1 << 0 /** thread started */
+#define RUBY_INTERNAL_THREAD_EVENT_READY 1 << 1 /** acquiring GVL */
+#define RUBY_INTERNAL_THREAD_EVENT_RESUMED 1 << 2 /** acquired GVL */
+#define RUBY_INTERNAL_THREAD_EVENT_SUSPENDED 1 << 3 /** released GVL */
+#define RUBY_INTERNAL_THREAD_EVENT_EXITED 1 << 4 /** thread terminated */
+#define RUBY_INTERNAL_THREAD_EVENT_MASK 0xff /** All Thread events */
+
+typedef void rb_internal_thread_event_data_t; // for future extension.
+
+typedef void (*rb_internal_thread_event_callback)(rb_event_flag_t event,
+ const rb_internal_thread_event_data_t *event_data,
+ void *user_data);
+typedef struct rb_internal_thread_event_hook rb_internal_thread_event_hook_t;
+
+/**
+ * Registers a thread event hook function.
+ *
+ * @param[in] func A callback.
+ * @param[in] events A set of events that `func` should run.
+ * @param[in] data Passed as-is to `func`.
+ * @return An opaque pointer to the hook, to unregister it later.
+ * @note This functionality is a noop on Windows.
+ * @warning This function MUST not be called from a thread event callback.
+ */
+rb_internal_thread_event_hook_t *rb_internal_thread_add_event_hook(
+ rb_internal_thread_event_callback func, rb_event_flag_t events,
+ void *data);
+
+
+/**
+ * Unregister the passed hook.
+ *
+ * @param[in] hook. The hook to unregister.
+ * @return Wether the hook was found and unregistered.
+ * @note This functionality is a noop on Windows.
+ * @warning This function MUST not be called from a thread event callback.
+*/
+bool rb_internal_thread_remove_event_hook(
+ rb_internal_thread_event_hook_t * hook);
+
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_THREAD_H */
diff --git a/include/ruby/thread_native.h b/include/ruby/thread_native.h
index 8e500c5a13..c23b15e133 100644
--- a/include/ruby/thread_native.h
+++ b/include/ruby/thread_native.h
@@ -1,28 +1,24 @@
-/**********************************************************************
-
- thread_native.h -
-
- $Author: ko1 $
- created at: Wed May 14 19:37:31 2014
-
- Copyright (C) 2014 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_THREAD_NATIVE_H
+#ifndef RUBY_THREAD_NATIVE_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_THREAD_NATIVE_H 1
-
-/*
+/**
+ * @file
+ * @author $Author: ko1 $
+ * @date Wed May 14 19:37:31 2014
+ * @copyright Copyright (C) 2014 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ *
* This file contains wrapper APIs for native thread primitives
* which Ruby interpreter uses.
*
- * Now, we only suppors pthread and Windows threads.
+ * Now, we only support pthread and Windows threads.
*
* If you want to use Ruby's Mutex and so on to synchronize Ruby Threads,
* please use Mutex directly.
*/
-
#if defined(_WIN32)
#include <windows.h>
typedef HANDLE rb_nativethread_id_t;
@@ -32,25 +28,178 @@ typedef union rb_thread_lock_union {
CRITICAL_SECTION crit;
} rb_nativethread_lock_t;
+typedef struct rb_thread_cond_struct rb_nativethread_cond_t;
+
#elif defined(HAVE_PTHREAD_H)
+
#include <pthread.h>
typedef pthread_t rb_nativethread_id_t;
typedef pthread_mutex_t rb_nativethread_lock_t;
+typedef pthread_cond_t rb_nativethread_cond_t;
+
+#elif defined(__wasi__) // no-thread platforms
+
+typedef struct rb_nativethread_id_t *rb_nativethread_id_t;
+typedef struct rb_nativethread_lock_t *rb_nativethread_lock_t;
+typedef struct rb_nativethread_cond_t *rb_nativethread_cond_t;
+
+#elif defined(__DOXYGEN__)
+
+/** Opaque type that holds an ID of a native thread. */
+struct rb_nativethread_id_t;
+
+/** Opaque type that holds a lock. */
+struct rb_nativethread_lock_t;
+
+/** Opaque type that holds a condition variable. */
+struct rb_nativethread_cond_t;
#else
#error "unsupported thread type"
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+RBIMPL_SYMBOL_EXPORT_BEGIN()
-rb_nativethread_id_t rb_nativethread_self();
+/**
+ * Queries the ID of the native thread that is calling this function.
+ *
+ * @return The caller thread's native ID.
+ */
+rb_nativethread_id_t rb_nativethread_self(void);
+/**
+ * Fills the passed lock with an initial value.
+ *
+ * @param[out] lock A mutex to initialise.
+ * @post `lock` is updated to its initial state.
+ *
+ * @internal
+ *
+ * There is no data structure that analogous to pthread_once_t in ruby. It is
+ * pretty much tricky (if not impossible) to properly initialise a mutex
+ * exactly once.
+ */
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock);
+
+/**
+ * Destroys the passed mutex.
+ *
+ * @param[out] lock A mutex to kill.
+ * @post `lock` is no longer eligible for other functions.
+ *
+ * @internal
+ *
+ * It is an undefined behaviour (see `pthread_mutex_destroy(3posix)`) to
+ * destroy a locked mutex. So it has to be unlocked. But an unlocked mutex
+ * can of course be locked by another thread. That's the ultimate reason why
+ * we do mutex. There is an inevitable race condition here. 2017 edition of
+ * IEEE 1003.1 issue 7 says in its rationale that "care must be taken". Care?
+ * How?
+ *
+ * @shyouhei thinks that POSIX is broken by design.
+ */
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock);
+
+/**
+ * Blocks until the current thread obtains a lock.
+ *
+ * @param[out] lock A mutex to lock.
+ * @post `lock` is owned by the current native thread.
+ */
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock);
+
+/**
+ * Releases a lock.
+ *
+ * @param[out] lock A mutex to unlock.
+ * @pre `lock` is owned by the current native thread.
+ * @post `lock` is not owned by the current native thread.
+ */
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock);
-RUBY_SYMBOL_EXPORT_END
+/** @alias{rb_nativethread_lock_lock} */
+void rb_native_mutex_lock(rb_nativethread_lock_t *lock);
+
+/**
+ * Identical to rb_native_mutex_lock(), except it doesn't block in case
+ * rb_native_mutex_lock() would.
+ *
+ * @param[out] lock A mutex to lock.
+ * @retval 0 `lock` is successfully owned by the current thread.
+ * @retval EBUSY `lock` is owned by someone else.
+ */
+int rb_native_mutex_trylock(rb_nativethread_lock_t *lock);
+
+/** @alias{rb_nativethread_lock_unlock} */
+void rb_native_mutex_unlock(rb_nativethread_lock_t *lock);
+
+/** @alias{rb_nativethread_lock_initialize} */
+void rb_native_mutex_initialize(rb_nativethread_lock_t *lock);
+
+/** @alias{rb_nativethread_lock_destroy} */
+void rb_native_mutex_destroy(rb_nativethread_lock_t *lock);
+
+/**
+ * Signals a condition variable.
+ *
+ * @param[out] cond A condition variable to ping.
+ * @post More than one threads waiting for `cond` gets signalled.
+ * @note This function can spuriously wake multiple threads up.
+ * `pthread_cond_signal(3posix)` says it can even be "impossible
+ * to avoid the unblocking of more than one thread blocked on a
+ * condition variable". Just brace spurious wakeups.
+ */
+void rb_native_cond_signal(rb_nativethread_cond_t *cond);
+
+/**
+ * Signals a condition variable.
+ *
+ * @param[out] cond A condition variable to ping.
+ * @post All threads waiting for `cond` gets signalled.
+ */
+void rb_native_cond_broadcast(rb_nativethread_cond_t *cond);
+
+/**
+ * Waits for the passed condition variable to be signalled.
+ *
+ * @param[out] cond A condition variable to wait.
+ * @param[out] mutex A mutex.
+ * @pre `mutex` is owned by the current thread.
+ * @post `mutex` is owned by the current thread.
+ * @note This can wake up spuriously.
+ */
+void rb_native_cond_wait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex);
+
+/**
+ * Identical to rb_native_cond_wait(), except it additionally takes timeout in
+ * msec resolution. Timeouts can be detected by catching exceptions.
+ *
+ * @param[out] cond A condition variable to wait.
+ * @param[out] mutex A mutex.
+ * @param[in] msec Timeout.
+ * @exception rb_eSystemCallError `Errno::ETIMEDOUT` for timeout.
+ * @pre `mutex` is owned by the current thread.
+ * @post `mutex` is owned by the current thread.
+ * @note This can wake up spuriously.
+ */
+void rb_native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, unsigned long msec);
+
+/**
+ * Fills the passed condition variable with an initial value.
+ *
+ * @param[out] cond A condition variable to initialise.
+ * @post `cond` is updated to its initial state.
+ */
+void rb_native_cond_initialize(rb_nativethread_cond_t *cond);
+
+/**
+ * Destroys the passed condition variable.
+ *
+ * @param[out] cond A condition variable to kill.
+ * @post `cond` is no longer eligible for other functions.
+ */
+void rb_native_cond_destroy(rb_nativethread_cond_t *cond);
+RBIMPL_SYMBOL_EXPORT_END()
#endif
diff --git a/include/ruby/util.h b/include/ruby/util.h
index 3fecba8ebc..e8727a3200 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -1,89 +1,228 @@
-/**********************************************************************
-
- util.h -
-
- $Author$
- created at: Thu Mar 9 11:55:53 JST 1995
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_UTIL_H
+#ifndef RUBY_UTIL_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_UTIL_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
+/**
+ * @file
+ * @author $Author$
+ * @date Thu Mar 9 11:55:53 JST 1995
+ * @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @warning DO NOT ADD RANDOM GARBAGES IN THIS FILE! Contents of this file
+ * reside here for historical reasons. Find a right place for your
+ * API!
+ */
+#include "ruby/internal/config.h"
+
+#ifdef STDC_HEADERS
+# include <stddef.h> /* size_t */
#endif
-#include "ruby/defines.h"
-#ifdef RUBY_EXTCONF_H
-#include RUBY_EXTCONF_H
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* ssize_t */
#endif
-#ifndef _
-#ifdef __cplusplus
-# ifndef HAVE_PROTOTYPES
-# define HAVE_PROTOTYPES 1
-# endif
-# ifndef HAVE_STDARG_PROTOTYPES
-# define HAVE_STDARG_PROTOTYPES 1
-# endif
-#endif
-#ifdef HAVE_PROTOTYPES
-# define _(args) args
-#else
-# define _(args) ()
-#endif
-#ifdef HAVE_STDARG_PROTOTYPES
-# define __(args) args
-#else
-# define __(args) ()
-#endif
-#endif
+#include "ruby/internal/attr/noalias.h"
+#include "ruby/internal/attr/nodiscard.h"
+#include "ruby/internal/attr/nonnull.h"
+#include "ruby/internal/attr/restrict.h"
+#include "ruby/internal/attr/returns_nonnull.h"
+#include "ruby/internal/dllexport.h"
+#include "ruby/defines.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+/** an approximation of ceil(n * log10(2)), up to 65536 at least */
#define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999)
-/* an approximation of ceil(n * log10(2)), up to 65536 at least */
+/**
+ * Character to number mapping like `'a'` -> `10`, `'b'` -> `11` etc. For
+ * punctuation etc., the value is -1. "36" terminology comes from the fact
+ * that this is the table behind `str.to_i(36)`.
+ */
+RUBY_EXTERN const signed char ruby_digit36_to_number_table[];
+
+/**
+ * Characters that Ruby accepts as hexadecimal digits. This is `/\h/` expanded
+ * into an array.
+ */
+RUBY_EXTERN const char ruby_hexdigits[];
+
+/**
+ * Scans the passed string, assuming the string is a textual representation of
+ * an integer. Stops when encountering something non-digit for the passed
+ * base.
+ *
+ * @note This does not understand minus sign.
+ * @note This does not understand e.g. `0x` prefix.
+ * @note It is a failure to pass `0` to `base`, unlike ruby_strtoul().
+ * @param[in] str Target string of digits to interpret.
+ * @param[in] len Number of bytes of `str`, or -1 to detect `NUL`.
+ * @param[in] base Base, `2` to `36` inclusive.
+ * @param[out] retlen Return value buffer.
+ * @param[out] overflow Return value buffer.
+ * @return Interpreted numeric representation of `str`.
+ * @post `retlen` is the number of bytes scanned so far.
+ * @post `overflow` is set to true if the string represents something
+ * bigger than `ULONG_MAX`. Something meaningful still returns;
+ * which is the designed belabour of C's unsigned arithmetic.
+ */
+unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
+
+/** @old{ruby_scan_oct} */
#define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
-unsigned long ruby_scan_oct(const char *, size_t, size_t *);
+
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Interprets the passed string as an octal unsigned integer. Stops when
+ * encounters something not understood.
+ *
+ * @param[in] str C string to scan.
+ * @param[in] len Length of `str`.
+ * @param[out] consumed Return value buffer.
+ * @return Parsed integer.
+ * @post `ret` is the number of characters read.
+ *
+ * @internal
+ *
+ * No consideration is made for integer overflows. As the return value is
+ * unsigned this function has fully defined behaviour, but you cannot know if
+ * there was an integer wrap-around or not.
+ */
+unsigned long ruby_scan_oct(const char *str, size_t len, size_t *consumed);
+
+/** @old{ruby_scan_hex} */
#define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e)))
-unsigned long ruby_scan_hex(const char *, size_t, size_t *);
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Interprets the passed string a hexadecimal unsigned integer. Stops when
+ * encounters something not understood.
+ *
+ * @param[in] str C string to scan.
+ * @param[in] len Length of `str`.
+ * @param[out] ret Return value buffer.
+ * @return Parsed integer.
+ * @post `ret` is the number of characters read.
+ *
+ * @internal
+ *
+ * No consideration is made for integer overflows. As the return value is
+ * unsigned this function has fully defined behaviour, but you cannot know if
+ * there was an integer wrap-around or not.
+ */
+unsigned long ruby_scan_hex(const char *str, size_t len, size_t *ret);
+
+/**
+ * Reentrant implementation of quick sort. If your system provides something
+ * (like C11 qsort_s), this is a thin wrapper of that routine. Otherwise
+ * resorts to our own version.
+ */
#ifdef HAVE_GNU_QSORT_R
# define ruby_qsort qsort_r
#else
void ruby_qsort(void *, const size_t, const size_t,
- int (*)(const void *, const void *, void *), void *);
+ int (*)(const void *, const void *, void *), void *);
#endif
-void ruby_setenv(const char *, const char *);
-void ruby_unsetenv(const char *);
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Sets an environment variable. In case of POSIX this is a wrapper of
+ * `setenv(3)`. But there are systems which lack one. We try hard emulating.
+ *
+ * @param[in] key An environment variable.
+ * @param[in] val A value to be associated with `key`, or 0.
+ * @exception rb_eSystemCallError `setenv(3)` failed for some reason.
+ * @post Environment variable `key` is created if necessary. Its value
+ * is updated to be `val`.
+ */
+void ruby_setenv(const char *key, const char *val);
+
+RBIMPL_ATTR_NONNULL(())
+/**
+ * Deletes the passed environment variable, if any.
+ *
+ * @param[in] key An environment variable.
+ * @exception rb_eSystemCallError `unsetenv(3)` failed for some reason.
+ * @post Environment variable `key` does not exist.
+ */
+void ruby_unsetenv(const char *key);
+
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_NONNULL(())
+/**
+ * This is our own version of `strdup(3)` that uses ruby_xmalloc() instead of
+ * system malloc (benefits our GC).
+ *
+ * @param[in] str Target C string to duplicate.
+ * @return An allocated C string holding the identical contents.
+ * @note Return value must be discarded using ruby_xfree().
+ */
+char *ruby_strdup(const char *str);
-char *ruby_strdup(const char *);
#undef strdup
+/**
+ * @alias{ruby_strdup}
+ *
+ * @internal
+ *
+ * @shyouhei doesn't think it is a wise idea. ruby_strdup()'s return value
+ * must be passed to ruby_xfree(), but this macro makes it almost impossible.
+ */
#define strdup(s) ruby_strdup(s)
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+/**
+ * This is our own version of `getcwd(3)` that uses ruby_xmalloc() instead of
+ * system malloc (benefits our GC).
+ *
+ * @return An allocated C string holding the process working directory.
+ * @note Return value must be discarded using ruby_xfree().
+ */
char *ruby_getcwd(void);
-double ruby_strtod(const char *, char **);
+RBIMPL_ATTR_NONNULL((1))
+/**
+ * Our own locale-insensitive version of `strtod(3)`. The conversion is done
+ * as if the current locale is set to the "C" locale, no matter actual runtime
+ * locale settings.
+ *
+ * @param[in] str Decimal or hexadecimal representation of a floating
+ * point number.
+ * @param[out] endptr NULL, or an arbitrary pointer (overwritten on return).
+ * @return Converted number.
+ * @post If `endptr` is not NULL, it is updated to point the first such
+ * byte where conversion failed.
+ * @note This function sets `errno` on failure.
+ * - `ERANGE`: Converted integer is out of range of `double`.
+ * @see William D. Clinger, "How to Read Floating Point Numbers
+ * Accurately" in Proc. ACM SIGPLAN '90, pp. 92-101.
+ * https://doi.org/10.1145/93542.93557
+ */
+double ruby_strtod(const char *str, char **endptr);
+
#undef strtod
+/** @alias{ruby_strtod} */
#define strtod(s,e) ruby_strtod((s),(e))
-void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
-
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+RBIMPL_ATTR_NONNULL((2))
+/**
+ * Scans the passed string, with calling the callback function every time it
+ * encounters a "word". A word here is a series of characters separated by
+ * either a space (of IEEE 1003.1 section 7.3.1.1), or a `','`.
+ *
+ * @param[in] str Target string to split into each words.
+ * @param[in] func Callback function.
+ * @param[in,out] argv Passed as-is to `func`.
+ */
+void ruby_each_words(const char *str, void (*func)(const char *word, int len, void *argv), void *argv);
+
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_UTIL_H */
diff --git a/include/ruby/version.h b/include/ruby/version.h
index 64c5c614e0..18b3abc8d7 100644
--- a/include/ruby/version.h
+++ b/include/ruby/version.h
@@ -1,17 +1,17 @@
-/**********************************************************************
-
- ruby/version.h -
-
- $Author$
- created at: Wed May 13 12:56:56 JST 2009
-
- Copyright (C) 1993-2009 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-/*
+#ifndef RUBY_VERSION_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RUBY_VERSION_H 1
+/**
+ * @file
+ * @author $Author$
+ * @date Wed May 13 12:56:56 JST 2009
+ * @copyright Copyright (C) 1993-2009 Yukihiro Matsumoto
+ * @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
+ * @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ *
* This file contains only
* - never-changeable information, and
* - interfaces accessible from extension libraries.
@@ -20,55 +20,140 @@
* check the features with mkmf.rb instead.
*/
-#ifndef RUBY_VERSION_H
-#define RUBY_VERSION_H 1
+/**
+ * @name The origin.
+ *
+ * These information never change. Just written here to remember.
+ *
+ * @{
+ */
-/* The origin. */
+/** Author of this project. */
#define RUBY_AUTHOR "Yukihiro Matsumoto"
+
+/** Ruby's birth year. */
#define RUBY_BIRTH_YEAR 1993
+
+/** Ruby's birth month. */
#define RUBY_BIRTH_MONTH 2
+
+/** Ruby's birth day. */
#define RUBY_BIRTH_DAY 24
-/* API version */
-#define RUBY_API_VERSION_MAJOR 2
-#define RUBY_API_VERSION_MINOR 7
+/** @} */
+
+/**
+ * @name The API version.
+ *
+ * API version is different from binary version. These numbers are for API
+ * stability. When you have distinct API versions x and y, you cannot expect
+ * codes targeted to x also works for y.
+ *
+ * However let us repeat here that it's a BAD idea to check
+ * #RUBY_API_VERSION_CODE form extension libraries. Different API versions are
+ * just different. There is no such thing like upper compatibility.
+ *
+ * @{
+ */
+
+/**
+ * Major version. This digit changes sometimes for various reasons, but that
+ * doesn't mean a total rewrite. Practically when it comes to API versioning,
+ * major and minor version changes are equally catastrophic.
+ */
+#define RUBY_API_VERSION_MAJOR 3
+
+/**
+ * Minor version. As of writing this version changes annually. Greater
+ * version doesn't mean "better"; they just mean years passed.
+ */
+#define RUBY_API_VERSION_MINOR 2
+
+/**
+ * Teeny version. This digit is kind of reserved these days. Kept 0 for the
+ * entire 2.x era. Waiting for future uses.
+ */
#define RUBY_API_VERSION_TEENY 0
+
+/**
+ * This macro is API versions encoded into a C integer.
+ *
+ * @note Use mkmf.
+ * @note Don't rely on it.
+ */
#define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY)
-#ifdef RUBY_EXTERN
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
+/** @} */
-RUBY_SYMBOL_EXPORT_BEGIN
+#ifdef RUBY_EXTERN
+/* Internal note: this file could be included from verconf.mk _before_
+ * generating config.h, on Windows. The #ifdef above is to trick such
+ * situation. */
+RBIMPL_SYMBOL_EXPORT_BEGIN()
-/*
- * Interfaces from extension libraries.
+/**
+ * @name Interfaces from extension libraries.
*
* Before using these infos, think thrice whether they are really
* necessary or not, and if the answer was yes, think twice a week
* later again.
+ *
+ * @{
*/
+
+/** API versions, in { major, minor, teeny } order. */
RUBY_EXTERN const int ruby_api_version[3];
+
+/**
+ * Stringised version.
+ *
+ * @note This is the runtime version, not the API version. For instance it
+ * was `"2.5.9"` when ::ruby_api_version was `{ 2, 5, 0 }`.
+ */
RUBY_EXTERN const char ruby_version[];
+
+/** Date of release, in a C string. */
RUBY_EXTERN const char ruby_release_date[];
+
+/**
+ * Target platform identifier, in a C string.
+ *
+ * @note Seasoned UNIX programmers should beware that this "platform
+ * identifier" is our invention; not always identical to so-called
+ * target triplets that GNU systems use. For instance on @shyouhei's
+ * machine, ::ruby_platform is `"x64_64-linux"` while its target triplet
+ * is `x86_64-pc-linux-gnu`.
+ * @note Note also that we support Windows.
+ */
RUBY_EXTERN const char ruby_platform[];
+
+/**
+ * This is a monotonic increasing integer that describes specific "patch"
+ * level. You can know the exact changeset your binary is running by this info
+ * (and ::ruby_version), unless this is -1. -1 means there is no release yet
+ * for the version; ruby is actively developed. 0 means the initial GA version.
+ */
RUBY_EXTERN const int ruby_patchlevel;
+
+/**
+ * This is what `ruby -v` prints to the standard error. Something like:
+ * `"ruby 2.5.9p229 (2021-04-05 revision 67829) [x86_64-linux]"`. This doesn't
+ * include runtime options like a JIT being enabled.
+ */
RUBY_EXTERN const char ruby_description[];
+
+/** Copyright notice. */
RUBY_EXTERN const char ruby_copyright[];
+
+/**
+ * This is just `"ruby"` for us. But different implementations can have
+ * different strings here.
+ */
RUBY_EXTERN const char ruby_engine[];
-RUBY_SYMBOL_EXPORT_END
+/** @} */
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+RBIMPL_SYMBOL_EXPORT_END()
#endif
#endif
diff --git a/include/ruby/vm.h b/include/ruby/vm.h
index b137a280c9..3458c28be7 100644
--- a/include/ruby/vm.h
+++ b/include/ruby/vm.h
@@ -1,36 +1,34 @@
-/**********************************************************************
-
- ruby/vm.h -
-
- $Author$
- created at: Sat May 31 15:17:36 2008
-
- Copyright (C) 2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_VM_H
+#ifndef RUBY_VM_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_VM_H 1
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-RUBY_SYMBOL_EXPORT_BEGIN
-
-/* Place holder.
- *
- * We will prepare VM creation/control APIs on 1.9.2 or later.
+/**
+ * @file
+ * @author $Author$
+ * @date Sat May 31 15:17:36 2008
+ * @copyright Copyright (C) 2008 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
*
+ * We planned to have multiple VMs run side-by-side. The API here was a
+ * preparation of that feature. The topic branch was eventually abandoned, and
+ * we now have Ractor. This file is kind of obsolescent.
*/
+#include "ruby/internal/dllexport.h"
-/* VM type declaration */
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * The opaque struct to hold VM internals. Its fields are intentionally hidden
+ * from extension libraries because it changes drastically time to time.
+ */
typedef struct rb_vm_struct ruby_vm_t;
-/* core API */
+/**
+ * Destructs the passed VM. You don't have to call this API directly now,
+ * because there is no way to create one. There is only one VM at one time.
+ * ruby_stop() should just suffice.
+ */
int ruby_vm_destruct(ruby_vm_t *vm);
/**
@@ -51,13 +49,6 @@ int ruby_vm_destruct(ruby_vm_t *vm);
*/
void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
-RUBY_SYMBOL_EXPORT_END
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_VM_H */
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index b29470b0c4..18de3a17d8 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -19,11 +19,6 @@ RUBY_SYMBOL_EXPORT_BEGIN
*/
/*
- * Definitions for NT port of Perl
- */
-
-
-/*
* Ok now we can include the normal include files.
*/
@@ -130,46 +125,57 @@ typedef unsigned int uintptr_t;
#define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */
typedef int clockid_t;
+#if defined(__MINGW32__)
+#undef CLOCK_PROCESS_CPUTIME_ID
+#undef CLOCK_THREAD_CPUTIME_ID
+#undef CLOCK_REALTIME_COARSE
+#endif
+#if defined(HAVE_CLOCK_GETTIME) && !defined(CLOCK_REALTIME)
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1
+#endif
#undef utime
#undef lseek
#undef stat
#undef fstat
#ifdef RUBY_EXPORT
-#define utime(_p, _t) rb_w32_utime(_p, _t)
+#define utime(_p, _t) rb_w32_uutime(_p, _t)
#undef HAVE_UTIMES
#define HAVE_UTIMES 1
-#define utimes(_p, _t) rb_w32_utimes(_p, _t)
+#define utimes(_p, _t) rb_w32_uutimes(_p, _t)
#undef HAVE_UTIMENSAT
#define HAVE_UTIMENSAT 1
#define AT_FDCWD -100
-#define utimensat(_d, _p, _t, _f) rb_w32_utimensat(_d, _p, _t, _f)
+#define utimensat(_d, _p, _t, _f) rb_w32_uutimensat(_d, _p, _t, _f)
#define lseek(_f, _o, _w) rb_w32_lseek(_f, _o, _w)
#define pipe(p) rb_w32_pipe(p)
-#define open rb_w32_open
+#define open rb_w32_uopen
#define close(h) rb_w32_close(h)
#define fclose(f) rb_w32_fclose(f)
#define read(f, b, s) rb_w32_read(f, b, s)
#define write(f, b, s) rb_w32_write(f, b, s)
#define getpid() rb_w32_getpid()
+#undef HAVE_GETPPID
+#define HAVE_GETPPID 1
#define getppid() rb_w32_getppid()
#define sleep(x) rb_w32_Sleep((x)*1000)
#define Sleep(msec) (void)rb_w32_Sleep(msec)
+#undef HAVE_EXECV
+#define HAVE_EXECV 1
#undef execv
-#define execv(path,argv) rb_w32_aspawn(P_OVERLAY,path,argv)
+#define execv(path,argv) rb_w32_uaspawn(P_OVERLAY,path,argv)
#undef isatty
#define isatty(h) rb_w32_isatty(h)
#undef mkdir
-#define mkdir(p, m) rb_w32_mkdir(p, m)
+#define mkdir(p, m) rb_w32_umkdir(p, m)
#undef rmdir
-#define rmdir(p) rb_w32_rmdir(p)
+#define rmdir(p) rb_w32_urmdir(p)
#undef unlink
-#define unlink(p) rb_w32_unlink(p)
+#define unlink(p) rb_w32_uunlink(p)
#endif /* RUBY_EXPORT */
/* same with stati64 except the size of st_ino and nanosecond timestamps */
@@ -191,8 +197,6 @@ struct stati128 {
long st_ctimensec;
};
-#if SIZEOF_OFF_T == 8
-#define off_t __int64
#define stat stati128
#undef SIZEOF_STRUCT_STAT_ST_INO
#define SIZEOF_STRUCT_STAT_ST_INO sizeof(unsigned __int64)
@@ -201,15 +205,9 @@ struct stati128 {
#define HAVE_STRUCT_STAT_ST_MTIMENSEC
#define HAVE_STRUCT_STAT_ST_CTIMENSEC
#define fstat(fd,st) rb_w32_fstati128(fd,st)
-#define stati128(path, st) rb_w32_stati128(path,st)
-#else
-#define stat(path,st) rb_w32_stat(path,st)
-#define fstat(fd,st) rb_w32_fstat(fd,st)
-extern int rb_w32_stat(const char *, struct stat *);
-extern int rb_w32_fstat(int, struct stat *);
-#endif
-#define lstat(path,st) rb_w32_lstati128(path,st)
-#define access(path,mode) rb_w32_access(path,mode)
+#define stati128(path, st) rb_w32_ustati128(path,st)
+#define lstat(path,st) rb_w32_ulstati128(path,st)
+#define access(path,mode) rb_w32_uaccess(path,mode)
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
@@ -258,7 +256,6 @@ struct ifaddrs {
extern void rb_w32_sysinit(int *, char ***);
extern DWORD rb_w32_osid(void);
-extern rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *, int *);
extern int flock(int fd, int oper);
extern int rb_w32_io_cancelable_p(int);
extern int rb_w32_is_socket(int);
@@ -294,10 +291,8 @@ extern struct servent *WSAAPI rb_w32_getservbyport(int, const char *);
extern int socketpair(int, int, int, int *);
extern int getifaddrs(struct ifaddrs **);
extern void freeifaddrs(struct ifaddrs *);
-extern char * rb_w32_getcwd(char *, int);
+extern char * rb_w32_ugetcwd(char *, int);
extern char * rb_w32_ugetenv(const char *);
-extern char * rb_w32_getenv(const char *);
-extern int rb_w32_rename(const char *, const char *);
extern int rb_w32_urename(const char *, const char *);
extern char **rb_w32_get_environ(void);
extern void rb_w32_free_environ(char **);
@@ -306,44 +301,33 @@ extern const char *WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t);
extern int WSAAPI rb_w32_inet_pton(int,const char *,void *);
extern DWORD rb_w32_osver(void);
-extern int chown(const char *, int, int);
extern int rb_w32_uchown(const char *, int, int);
-extern int link(const char *, const char *);
extern int rb_w32_ulink(const char *, const char *);
-extern ssize_t readlink(const char *, char *, size_t);
extern ssize_t rb_w32_ureadlink(const char *, char *, size_t);
-extern ssize_t rb_w32_wreadlink(const WCHAR *, WCHAR *, size_t);
-extern int symlink(const char *src, const char *link);
extern int rb_w32_usymlink(const char *src, const char *link);
extern int gettimeofday(struct timeval *, struct timezone *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_getres(clockid_t, struct timespec *);
-extern rb_pid_t waitpid (rb_pid_t, int *, int);
-extern rb_pid_t rb_w32_spawn(int, const char *, const char*);
-extern rb_pid_t rb_w32_aspawn(int, const char *, char *const *);
-extern rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD);
+extern rb_pid_t waitpid(rb_pid_t, int *, int);
+extern rb_pid_t wait(int *);
extern rb_pid_t rb_w32_uspawn(int, const char *, const char*);
extern rb_pid_t rb_w32_uaspawn(int, const char *, char *const *);
extern rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD);
-extern int kill(int, int);
+#undef HAVE_KILL
+#define HAVE_KILL 1
+extern int kill(rb_pid_t, int);
extern int fcntl(int, int, ...);
extern int rb_w32_set_nonblock(int);
extern rb_pid_t rb_w32_getpid(void);
extern rb_pid_t rb_w32_getppid(void);
extern int rb_w32_isatty(int);
extern int rb_w32_uchdir(const char *);
-extern int rb_w32_mkdir(const char *, int);
extern int rb_w32_umkdir(const char *, int);
-extern int rb_w32_rmdir(const char *);
extern int rb_w32_urmdir(const char *);
-extern int rb_w32_unlink(const char *);
extern int rb_w32_uunlink(const char *);
extern int rb_w32_uchmod(const char *, int);
-extern int rb_w32_stati128(const char *, struct stati128 *);
extern int rb_w32_ustati128(const char *, struct stati128 *);
-extern int rb_w32_lstati128(const char *, struct stati128 *);
extern int rb_w32_ulstati128(const char *, struct stati128 *);
-extern int rb_w32_access(const char *, int);
extern int rb_w32_uaccess(const char *, int);
extern char rb_w32_fd_is_text(int);
extern int rb_w32_fstati128(int, struct stati128 *);
@@ -365,14 +349,6 @@ rb_infinity_float(void)
#endif
#if !defined __MINGW32__ || defined __NO_ISOCEXT
-#ifndef isnan
-#define isnan(x) _isnan(x)
-#endif
-static inline int
-finite(double x)
-{
- return _finite(x);
-}
#ifndef copysign
#define copysign(a, b) _copysign(a, b)
#endif
@@ -381,8 +357,6 @@ scalb(double a, long b)
{
return _scalb(a, b);
}
-#else
-__declspec(dllimport) extern int finite(double);
#endif
#if !defined S_IFIFO && defined _S_IFIFO
@@ -420,6 +394,7 @@ __declspec(dllimport) extern int finite(double);
#endif
#define S_IFLNK 0xa000
+#define S_IFSOCK 0xc000
/*
* define this so we can do inplace editing
@@ -427,9 +402,9 @@ __declspec(dllimport) extern int finite(double);
#define SUFFIX
-extern int rb_w32_ftruncate(int fd, off_t length);
-extern int rb_w32_truncate(const char *path, off_t length);
-extern int rb_w32_utruncate(const char *path, off_t length);
+extern int rb_w32_ftruncate(int fd, rb_off_t length);
+extern int rb_w32_truncate(const char *path, rb_off_t length);
+extern int rb_w32_utruncate(const char *path, rb_off_t length);
#undef HAVE_FTRUNCATE
#define HAVE_FTRUNCATE 1
@@ -441,11 +416,7 @@ extern int rb_w32_utruncate(const char *path, off_t length);
#undef HAVE_TRUNCATE
#define HAVE_TRUNCATE 1
-#if defined HAVE_TRUNCATE64
-#define truncate truncate64
-#else
-#define truncate rb_w32_truncate
-#endif
+#define truncate rb_w32_utruncate
#if defined(_MSC_VER) && _MSC_VER >= 1400 && _MSC_VER < 1800
#define strtoll _strtoi64
@@ -683,6 +654,8 @@ extern char *rb_w32_strerror(int);
#undef setsockopt
#define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
+#undef HAVE_SHUTDOWN
+#define HAVE_SHUTDOWN 1
#undef shutdown
#define shutdown(s, h) rb_w32_shutdown(s, h)
@@ -714,13 +687,13 @@ extern char *rb_w32_strerror(int);
#define get_osfhandle(h) rb_w32_get_osfhandle(h)
#undef getcwd
-#define getcwd(b, s) rb_w32_getcwd(b, s)
+#define getcwd(b, s) rb_w32_ugetcwd(b, s)
#undef getenv
-#define getenv(n) rb_w32_getenv(n)
+#define getenv(n) rb_w32_ugetenv(n)
#undef rename
-#define rename(o, n) rb_w32_rename(o, n)
+#define rename(o, n) rb_w32_urename(o, n)
#undef times
#define times(t) rb_w32_times(t)
@@ -730,10 +703,10 @@ extern char *rb_w32_strerror(int);
#endif
struct tms {
- long tms_utime;
- long tms_stime;
- long tms_cutime;
- long tms_cstime;
+ long tms_utime;
+ long tms_stime;
+ long tms_cutime;
+ long tms_cstime;
};
int rb_w32_times(struct tms *);
@@ -743,7 +716,6 @@ struct tm *localtime_r(const time_t *, struct tm *);
/* thread stuff */
int rb_w32_sleep(unsigned long msec);
-int rb_w32_open(const char *, int, ...);
int rb_w32_uopen(const char *, int, ...);
int rb_w32_wopen(const WCHAR *, int, ...);
int rb_w32_close(int);
@@ -751,12 +723,9 @@ int rb_w32_fclose(FILE*);
int rb_w32_pipe(int[2]);
ssize_t rb_w32_read(int, void *, size_t);
ssize_t rb_w32_write(int, const void *, size_t);
-off_t rb_w32_lseek(int, off_t, int);
-int rb_w32_utime(const char *, const struct utimbuf *);
+rb_off_t rb_w32_lseek(int, rb_off_t, int);
int rb_w32_uutime(const char *, const struct utimbuf *);
-int rb_w32_utimes(const char *, const struct timeval *);
int rb_w32_uutimes(const char *, const struct timeval *);
-int rb_w32_utimensat(int /* must be AT_FDCWD */, const char *, const struct timespec *, int /* must be 0 */);
int rb_w32_uutimensat(int /* must be AT_FDCWD */, const char *, const struct timespec *, int /* must be 0 */);
long rb_w32_write_console(uintptr_t, int); /* use uintptr_t instead of VALUE because it's not defined yet here */
int WINAPI rb_w32_Sleep(unsigned long msec);
@@ -767,6 +736,27 @@ int rb_w32_unwrap_io_handle(int);
WCHAR *rb_w32_mbstr_to_wstr(UINT, const char *, int, long *);
char *rb_w32_wstr_to_mbstr(UINT, const WCHAR *, int, long *);
+DEPRECATED_BY(rb_w32_ugetcwd, char *rb_w32_getcwd(char *, int));
+DEPRECATED_BY(rb_w32_ugetenv, char *rb_w32_getenv(const char *));
+DEPRECATED_BY(rb_w32_urename, int rb_w32_rename(const char *, const char *));
+DEPRECATED_BY(rb_w32_uopen, int rb_w32_open(const char *, int, ...));
+DEPRECATED_BY(rb_w32_uchown, int chown(const char *, int, int));
+DEPRECATED_BY(rb_w32_ulink, int link(const char *, const char *));
+DEPRECATED_BY(rb_w32_ureadlink, ssize_t readlink(const char *, char *, size_t));
+DEPRECATED_BY(rb_w32_usymlink, int symlink(const char *src, const char *link));
+DEPRECATED_BY(rb_w32_umkdir, int rb_w32_mkdir(const char *, int));
+DEPRECATED_BY(rb_w32_urmdir, int rb_w32_rmdir(const char *));
+DEPRECATED_BY(rb_w32_uunlink, int rb_w32_unlink(const char *));
+DEPRECATED_BY(rb_w32_uutime, int rb_w32_utime(const char *, const struct utimbuf *));
+DEPRECATED_BY(rb_w32_uutimes, int rb_w32_utimes(const char *, const struct timeval *));
+DEPRECATED_BY(rb_w32_uutimensat, int rb_w32_utimensat(int, const char *, const struct timespec *, int));
+DEPRECATED_BY(rb_w32_ustati128, int rb_w32_stati128(const char *, struct stati128 *));
+DEPRECATED_BY(rb_w32_ulstati128, int rb_w32_lstati128(const char *, struct stati128 *));
+DEPRECATED_BY(rb_w32_uaccess, int rb_w32_access(const char *, int));
+DEPRECATED_BY(rb_w32_uspawn, rb_pid_t rb_w32_spawn(int, const char *, const char*));
+DEPRECATED_BY(rb_w32_uaspawn, rb_pid_t rb_w32_aspawn(int, const char *, char *const *));
+DEPRECATED_BY(rb_w32_uaspawn_flags, rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD));
+
/*
== ***CAUTION***
Since this function is very dangerous, ((*NEVER*))
@@ -815,6 +805,25 @@ double rb_w32_pow(double x, double y);
#define pow rb_w32_pow
#endif
+// mmap tiny emulation
+#define MAP_FAILED ((void *)-1)
+
+#define PROT_READ 0x01
+#define PROT_WRITE 0x02
+#define PROT_EXEC 0x04
+
+#define MAP_PRIVATE 0x0002
+#define MAP_ANON 0x1000
+#define MAP_ANONYMOUS MAP_ANON
+
+extern void *rb_w32_mmap(void *, size_t, int, int, int, rb_off_t);
+extern int rb_w32_munmap(void *, size_t);
+extern int rb_w32_mprotect(void *, size_t, int);
+
+#define mmap(a, l, p, f, d, o) rb_w32_mmap(a, l, p, f, d, o)
+#define munmap(a, l) rb_w32_munmap(a, l)
+#define mprotect(a, l, prot) rb_w32_mprotect(a, l, prot)
+
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
diff --git a/inits.c b/inits.c
index 79a6cf014e..e809b56cc9 100644
--- a/inits.c
+++ b/inits.c
@@ -9,8 +9,10 @@
**********************************************************************/
-#include "internal.h"
+#include "internal/inits.h"
+#include "ruby.h"
#include "builtin.h"
+static void Init_builtin_prelude(void);
#include "prelude.rbinc"
#define CALL(n) {void Init_##n(void); Init_##n();}
@@ -18,6 +20,8 @@
void
rb_call_inits(void)
{
+ CALL(default_shapes);
+ CALL(Thread_Mutex);
#if USE_TRANSIENT_HEAP
CALL(TransientHeap);
#endif
@@ -35,7 +39,6 @@ rb_call_inits(void)
CALL(String);
CALL(Exception);
CALL(eval);
- CALL(safe);
CALL(jump);
CALL(Numeric);
CALL(Bignum);
@@ -44,10 +47,12 @@ rb_call_inits(void)
CALL(Hash);
CALL(Struct);
CALL(Regexp);
+ CALL(pack);
CALL(transcode);
CALL(marshal);
CALL(Range);
CALL(IO);
+ CALL(IO_Buffer)
CALL(Dir);
CALL(Time);
CALL(Random);
@@ -56,27 +61,54 @@ rb_call_inits(void)
CALL(Proc);
CALL(Binding);
CALL(Math);
+ CALL(GC);
CALL(Enumerator);
+ CALL(Ractor);
CALL(VM);
CALL(ISeq);
CALL(Thread);
+ CALL(Fiber_Scheduler);
CALL(process);
CALL(Cont);
CALL(Rational);
CALL(Complex);
+ CALL(MemoryView);
CALL(version);
+ CALL(vm_trace);
CALL(vm_stack_canary);
+ CALL(ast);
CALL(gc_stress);
+ CALL(shape);
// enable builtin loading
CALL(builtin);
+}
- CALL(GC);
- CALL(IO_nonblock);
- CALL(ast);
- CALL(vm_trace);
- CALL(pack);
- CALL(warning);
- load_prelude();
+void
+rb_call_builtin_inits(void)
+{
+#define BUILTIN(n) CALL(builtin_##n)
+ BUILTIN(gc);
+ BUILTIN(ractor);
+ BUILTIN(numeric);
+ BUILTIN(io);
+ BUILTIN(dir);
+ BUILTIN(ast);
+ BUILTIN(trace_point);
+ BUILTIN(pack);
+ BUILTIN(warning);
+ BUILTIN(array);
+ BUILTIN(kernel);
+ BUILTIN(symbol);
+ BUILTIN(timev);
+ BUILTIN(thread_sync);
+ BUILTIN(yjit);
+ BUILTIN(nilclass);
+ BUILTIN(marshal);
+#if USE_MJIT
+ BUILTIN(mjit);
+ BUILTIN(mjit_c);
+#endif
+ Init_builtin_prelude();
}
#undef CALL
diff --git a/insns.def b/insns.def
index bd1bffbe02..9f5ee7095a 100644
--- a/insns.def
+++ b/insns.def
@@ -109,14 +109,14 @@ getblockparam
VM_ASSERT(VM_ENV_LOCAL_P(ep));
if (!VM_ENV_FLAGS(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM)) {
- val = rb_vm_bh_to_procval(ec, VM_ENV_BLOCK_HANDLER(ep));
- vm_env_write(ep, -(int)idx, val);
- VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
+ val = rb_vm_bh_to_procval(ec, VM_ENV_BLOCK_HANDLER(ep));
+ vm_env_write(ep, -(int)idx, val);
+ VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
}
else {
- val = *(ep - idx);
- RB_DEBUG_COUNTER_INC(lvar_get);
- (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
+ val = *(ep - idx);
+ RB_DEBUG_COUNTER_INC(lvar_get);
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
}
@@ -150,35 +150,35 @@ getblockparamproxy
VM_ASSERT(VM_ENV_LOCAL_P(ep));
if (!VM_ENV_FLAGS(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM)) {
- VALUE block_handler = VM_ENV_BLOCK_HANDLER(ep);
-
- if (block_handler) {
- switch (vm_block_handler_type(block_handler)) {
- case block_handler_type_iseq:
- case block_handler_type_ifunc:
- val = rb_block_param_proxy;
- break;
- case block_handler_type_symbol:
- val = rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
- goto INSN_LABEL(set);
- case block_handler_type_proc:
- val = VM_BH_TO_PROC(block_handler);
- goto INSN_LABEL(set);
- default:
- VM_UNREACHABLE(getblockparamproxy);
- }
- }
- else {
- val = Qnil;
- INSN_LABEL(set):
- vm_env_write(ep, -(int)idx, val);
- VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
- }
+ VALUE block_handler = VM_ENV_BLOCK_HANDLER(ep);
+
+ if (block_handler) {
+ switch (vm_block_handler_type(block_handler)) {
+ case block_handler_type_iseq:
+ case block_handler_type_ifunc:
+ val = rb_block_param_proxy;
+ break;
+ case block_handler_type_symbol:
+ val = rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
+ goto INSN_LABEL(set);
+ case block_handler_type_proc:
+ val = VM_BH_TO_PROC(block_handler);
+ goto INSN_LABEL(set);
+ default:
+ VM_UNREACHABLE(getblockparamproxy);
+ }
+ }
+ else {
+ val = Qnil;
+ INSN_LABEL(set):
+ vm_env_write(ep, -(int)idx, val);
+ VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
+ }
}
else {
- val = *(ep - idx);
- RB_DEBUG_COUNTER_INC(lvar_get);
- (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
+ val = *(ep - idx);
+ RB_DEBUG_COUNTER_INC(lvar_get);
+ (void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
}
@@ -210,10 +210,10 @@ getinstancevariable
(ID id, IVC ic)
()
(VALUE val)
-/* "instance variable not initialized" warning can be hooked. */
-// attr bool leaf = false; /* has rb_warning() */
+/* Ractor crashes when it accesses class/module-level instances variables. */
+// attr bool leaf = false; /* has IVAR_ACCESSOR_SHOULD_BE_MAIN_RACTOR() */
{
- val = vm_getinstancevariable(GET_SELF(), id, ic);
+ val = vm_getinstancevariable(GET_ISEQ(), GET_SELF(), id, ic);
}
/* Set value of instance variable id of self to val. */
@@ -224,32 +224,56 @@ setinstancevariable
()
// attr bool leaf = false; /* has rb_check_frozen_internal() */
{
- vm_setinstancevariable(GET_SELF(), id, val, ic);
+ vm_setinstancevariable(GET_ISEQ(), GET_SELF(), id, val, ic);
}
/* Get value of class variable id of klass as val. */
DEFINE_INSN
getclassvariable
-(ID id)
+(ID id, ICVARC ic)
()
(VALUE val)
/* "class variable access from toplevel" warning can be hooked. */
// attr bool leaf = false; /* has rb_warning() */
{
- val = rb_cvar_get(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP()), id);
+ rb_control_frame_t *cfp = GET_CFP();
+ val = vm_getclassvariable(GET_ISEQ(), cfp, id, ic);
}
/* Set value of class variable id of klass as val. */
DEFINE_INSN
setclassvariable
-(ID id)
+(ID id, ICVARC ic)
(VALUE val)
()
/* "class variable access from toplevel" warning can be hooked. */
// attr bool leaf = false; /* has rb_warning() */
{
vm_ensure_not_refinement_module(GET_SELF());
- rb_cvar_set(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP()), id, val);
+ vm_setclassvariable(GET_ISEQ(), GET_CFP(), id, val, ic);
+}
+
+DEFINE_INSN
+opt_getconstant_path
+(IC ic)
+()
+(VALUE val)
+// attr bool leaf = false; /* may autoload or raise */
+{
+ const ID *segments = ic->segments;
+ struct iseq_inline_constant_cache_entry *ice = ic->entry;
+ if (ice && vm_ic_hit_p(ice, GET_EP())) {
+ val = ice->value;
+
+ VM_ASSERT(val == vm_get_ev_const_chain(ec, segments));
+ } else {
+ ruby_vm_constant_cache_misses++;
+ val = vm_get_ev_const_chain(ec, segments);
+ vm_ic_track_const_chain(GET_CFP(), ic, segments);
+ // Because leaf=false, we need to undo the PC increment to get the address to this instruction
+ // INSN_ATTR(width) == 2
+ vm_ic_update(GET_ISEQ(), ic, val, GET_EP(), GET_PC() - 2);
+ }
}
/* Get constant variable id. If klass is Qnil and allow_nil is Qtrue, constants
@@ -288,25 +312,23 @@ setconstant
/* get global variable id. */
DEFINE_INSN
getglobal
-(GENTRY entry)
+(ID gid)
()
(VALUE val)
-// attr bool leaf = leafness_of_getglobal(entry);
+// attr bool leaf = false;
{
- struct rb_global_entry *gentry = (void *)entry;
- val = rb_gvar_get(gentry);
+ val = rb_gvar_get(gid);
}
/* set global variable id as val. */
DEFINE_INSN
setglobal
-(GENTRY entry)
+(ID gid)
(VALUE val)
()
-// attr bool leaf = leafness_of_setglobal(entry);
+// attr bool leaf = false;
{
- struct rb_global_entry *gentry = (void *)entry;
- rb_gvar_set(gentry, val);
+ rb_gvar_set(gid, val);
}
/**********************************************************/
@@ -351,6 +373,7 @@ putspecialobject
(rb_num_t value_type)
()
(VALUE val)
+// attr bool leaf = (value_type == VM_SPECIAL_OBJECT_VMCORE); /* others may raise when allocating singleton */
{
enum vm_special_object_type type;
@@ -365,7 +388,7 @@ putstring
()
(VALUE val)
{
- val = rb_str_resurrect(str);
+ val = rb_ec_str_resurrect(ec, str);
}
/* put concatenate strings */
@@ -375,16 +398,17 @@ concatstrings
(...)
(VALUE val)
/* This instruction can concat UTF-8 and binary strings, resulting in
- * Encoding::CompatiblityError. */
+ * Encoding::CompatibilityError. */
// attr bool leaf = false; /* has rb_enc_cr_str_buf_cat() */
// attr rb_snum_t sp_inc = 1 - (rb_snum_t)num;
{
val = rb_str_concat_literals(num, STACK_ADDR_FROM_TOP(num));
}
-/* push the result of to_s. */
+/* Convert the result to string if not already a string.
+ This is used as a backup if to_s does not return a string. */
DEFINE_INSN
-tostring
+anytostring
()
(VALUE val, VALUE str)
(VALUE val)
@@ -392,16 +416,6 @@ tostring
val = rb_obj_as_string_result(str, val);
}
-/* Freeze (dynamically) created strings. if debug_info is given, set it. */
-DEFINE_INSN
-freezestring
-(VALUE debug_info)
-(VALUE str)
-(VALUE str)
-{
- vm_freezestring(str, debug_info);
-}
-
/* compile str to Regexp and push it.
opt is the option for the Regexp.
*/
@@ -438,7 +452,7 @@ newarray
(VALUE val)
// attr rb_snum_t sp_inc = 1 - (rb_snum_t)num;
{
- val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num));
+ val = rb_ec_ary_new_from_values(ec, num, STACK_ADDR_FROM_TOP(num));
}
/* put new array initialized with num values on the stack. There
@@ -536,11 +550,13 @@ newhash
{
RUBY_DTRACE_CREATE_HOOK(HASH, num);
- val = rb_hash_new_with_size(num / 2);
-
if (num) {
+ val = rb_hash_new_with_size(num / 2);
rb_hash_bulk_insert(num, STACK_ADDR_FROM_TOP(num), val);
}
+ else {
+ val = rb_hash_new();
+ }
}
/* put new Range object.(Range.new(low, high, flag)) */
@@ -606,7 +622,7 @@ swap
/* reverse stack top N order. */
DEFINE_INSN
-reverse
+opt_reverse
(rb_num_t n)
(...)
(...)
@@ -674,19 +690,22 @@ adjuststack
/* defined? */
DEFINE_INSN
defined
-(rb_num_t op_type, VALUE obj, VALUE needstr)
+(rb_num_t op_type, VALUE obj, VALUE pushval)
(VALUE v)
(VALUE val)
// attr bool leaf = leafness_of_defined(op_type);
{
- val = vm_defined(ec, GET_CFP(), op_type, obj, needstr, v);
+ val = Qnil;
+ if (vm_defined(ec, GET_CFP(), op_type, obj, v)) {
+ val = pushval;
+ }
}
/* check `target' matches `pattern'.
`flag & VM_CHECKMATCH_TYPE_MASK' describe how to check pattern.
VM_CHECKMATCH_TYPE_WHEN: ignore target and check pattern is truthy.
VM_CHECKMATCH_TYPE_CASE: check `patten === target'.
- VM_CHECKMATCH_TYPE_RESCUE: check `pattern.kind_op?(Module) && pattern === target'.
+ VM_CHECKMATCH_TYPE_RESCUE: check `pattern.kind_of?(Module) && pattern === target'.
if `flag & VM_CHECKMATCH_ARRAY' is not 0, then `patten' is array of patterns.
*/
DEFINE_INSN
@@ -716,7 +735,7 @@ checktype
(VALUE val)
(VALUE ret)
{
- ret = (TYPE(val) == (int)type) ? Qtrue : Qfalse;
+ ret = RBOOL(TYPE(val) == (int)type);
}
/**********************************************************/
@@ -724,7 +743,7 @@ checktype
/**********************************************************/
/* enter class definition scope. if super is Qfalse, and class
- "klass" is defined, it's redefine. otherwise, define "klass" class.
+ "klass" is defined, it's redefined. Otherwise, define "klass" class.
*/
DEFINE_INSN
defineclass
@@ -738,11 +757,11 @@ defineclass
/* enter scope */
vm_push_frame(ec, class_iseq, VM_FRAME_MAGIC_CLASS | VM_ENV_FLAG_LOCAL, klass,
- GET_BLOCK_HANDLER(),
- (VALUE)vm_cref_push(ec, klass, NULL, FALSE),
- class_iseq->body->iseq_encoded, GET_SP(),
- class_iseq->body->local_table_size,
- class_iseq->body->stack_max);
+ GET_BLOCK_HANDLER(),
+ (VALUE)vm_cref_push(ec, klass, NULL, FALSE, FALSE),
+ ISEQ_BODY(class_iseq)->iseq_encoded, GET_SP(),
+ ISEQ_BODY(class_iseq)->local_table_size,
+ ISEQ_BODY(class_iseq)->stack_max);
RESTORE_REGS();
NEXT_INSN();
}
@@ -775,11 +794,11 @@ send
(CALL_DATA cd, ISEQ blockiseq)
(...)
(VALUE val)
-// attr rb_snum_t sp_inc = sp_inc_of_sendish(&cd->ci);
+// attr rb_snum_t sp_inc = sp_inc_of_sendish(cd->ci);
// attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci);
{
- VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), &cd->ci, blockiseq, false);
- val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap);
+ VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, false);
+ val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method);
if (val == Qundef) {
RESTORE_REGS();
@@ -794,11 +813,11 @@ opt_send_without_block
(...)
(VALUE val)
// attr bool handles_sp = true;
-// attr rb_snum_t sp_inc = sp_inc_of_sendish(&cd->ci);
+// attr rb_snum_t sp_inc = sp_inc_of_sendish(cd->ci);
// attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci);
{
VALUE bh = VM_BLOCK_HANDLER_NONE;
- val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap);
+ val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method);
if (val == Qundef) {
RESTORE_REGS();
@@ -806,6 +825,21 @@ opt_send_without_block
}
}
+/* Convert object to string using to_s or equivalent. */
+DEFINE_INSN
+objtostring
+(CALL_DATA cd)
+(VALUE recv)
+(VALUE val)
+// attr bool leaf = false;
+{
+ val = vm_objtostring(GET_ISEQ(), recv, cd);
+
+ if (val == Qundef) {
+ CALL_SIMPLE_METHOD();
+ }
+}
+
DEFINE_INSN
opt_str_freeze
(VALUE str, CALL_DATA cd)
@@ -827,7 +861,7 @@ opt_nil_p
(VALUE recv)
(VALUE val)
{
- val = vm_opt_nil_p(cd, recv);
+ val = vm_opt_nil_p(GET_ISEQ(), cd, recv);
if (val == Qundef) {
CALL_SIMPLE_METHOD();
@@ -860,7 +894,7 @@ opt_newarray_max
// attr bool leaf = false; /* has rb_funcall() */
// attr rb_snum_t sp_inc = 1 - (rb_snum_t)num;
{
- val = vm_opt_newarray_max(num, STACK_ADDR_FROM_TOP(num));
+ val = vm_opt_newarray_max(ec, num, STACK_ADDR_FROM_TOP(num));
}
DEFINE_INSN
@@ -872,7 +906,7 @@ opt_newarray_min
// attr bool leaf = false; /* has rb_funcall() */
// attr rb_snum_t sp_inc = 1 - (rb_snum_t)num;
{
- val = vm_opt_newarray_min(num, STACK_ADDR_FROM_TOP(num));
+ val = vm_opt_newarray_min(ec, num, STACK_ADDR_FROM_TOP(num));
}
/* super(args) # args.size => num */
@@ -881,11 +915,11 @@ invokesuper
(CALL_DATA cd, ISEQ blockiseq)
(...)
(VALUE val)
-// attr rb_snum_t sp_inc = sp_inc_of_sendish(&cd->ci);
+// attr rb_snum_t sp_inc = sp_inc_of_sendish(cd->ci);
// attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci);
{
- VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), &cd->ci, blockiseq, true);
- val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_super_method);
+ VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, true);
+ val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_super);
if (val == Qundef) {
RESTORE_REGS();
@@ -900,15 +934,11 @@ invokeblock
(...)
(VALUE val)
// attr bool handles_sp = true;
-// attr rb_snum_t sp_inc = sp_inc_of_invokeblock(&cd->ci);
+// attr rb_snum_t sp_inc = sp_inc_of_invokeblock(cd->ci);
// attr rb_snum_t comptime_sp_inc = sp_inc_of_invokeblock(ci);
{
- if (UNLIKELY(cd->cc.call != vm_invokeblock_i)) {
- cd->cc.call = vm_invokeblock_i; // check before setting to avoid CoW
- }
-
VALUE bh = VM_BLOCK_HANDLER_NONE;
- val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_invokeblock);
+ val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_invokeblock);
if (val == Qundef) {
RESTORE_REGS();
@@ -932,19 +962,19 @@ leave
const VALUE *const bp = vm_base_ptr(GET_CFP());
if (GET_SP() != bp) {
vm_stack_consistency_error(ec, GET_CFP(), bp);
- }
+ }
}
if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
#if OPT_CALL_THREADED_CODE
- rb_ec_thread_ptr(ec)->retval = val;
- return 0;
+ rb_ec_thread_ptr(ec)->retval = val;
+ return 0;
#else
- return val;
+ return val;
#endif
}
else {
- RESTORE_REGS();
+ RESTORE_REGS();
}
}
@@ -977,7 +1007,7 @@ jump
()
()
/* Same discussion as leave. */
-// attr bool leaf = false; /* has rb_threadptr_execute_interrupts() */
+// attr bool leaf = leafness_of_check_ints; /* has rb_threadptr_execute_interrupts() */
{
RUBY_VM_CHECK_INTS(ec);
JUMP(dst);
@@ -990,11 +1020,11 @@ branchif
(VALUE val)
()
/* Same discussion as jump. */
-// attr bool leaf = false; /* has rb_threadptr_execute_interrupts() */
+// attr bool leaf = leafness_of_check_ints; /* has rb_threadptr_execute_interrupts() */
{
if (RTEST(val)) {
- RUBY_VM_CHECK_INTS(ec);
- JUMP(dst);
+ RUBY_VM_CHECK_INTS(ec);
+ JUMP(dst);
}
}
@@ -1005,11 +1035,11 @@ branchunless
(VALUE val)
()
/* Same discussion as jump. */
-// attr bool leaf = false; /* has rb_threadptr_execute_interrupts() */
+// attr bool leaf = leafness_of_check_ints; /* has rb_threadptr_execute_interrupts() */
{
if (!RTEST(val)) {
- RUBY_VM_CHECK_INTS(ec);
- JUMP(dst);
+ RUBY_VM_CHECK_INTS(ec);
+ JUMP(dst);
}
}
@@ -1020,11 +1050,11 @@ branchnil
(VALUE val)
()
/* Same discussion as jump. */
-// attr bool leaf = false; /* has rb_threadptr_execute_interrupts() */
+// attr bool leaf = leafness_of_check_ints; /* has rb_threadptr_execute_interrupts() */
{
if (NIL_P(val)) {
- RUBY_VM_CHECK_INTS(ec);
- JUMP(dst);
+ RUBY_VM_CHECK_INTS(ec);
+ JUMP(dst);
}
}
@@ -1032,32 +1062,6 @@ branchnil
/* for optimize */
/**********************************************************/
-/* push inline-cached value and go to dst if it is valid */
-DEFINE_INSN
-opt_getinlinecache
-(OFFSET dst, IC ic)
-()
-(VALUE val)
-{
- if (vm_ic_hit_p(ic, GET_EP())) {
- val = ic->value;
- JUMP(dst);
- }
- else {
- val = Qnil;
- }
-}
-
-/* set inline cache */
-DEFINE_INSN
-opt_setinlinecache
-(IC ic)
-(VALUE val)
-(VALUE val)
-{
- vm_ic_update(ic, val, GET_EP());
-}
-
/* run iseq only once */
DEFINE_INSN
once
@@ -1079,7 +1083,7 @@ opt_case_dispatch
OFFSET dst = vm_case_dispatch(hash, else_offset, key);
if (dst) {
- JUMP(dst);
+ JUMP(dst);
}
}
@@ -1150,7 +1154,7 @@ opt_mod
(CALL_DATA cd)
(VALUE recv, VALUE obj)
(VALUE val)
-/* Same discussion as opt_mod. */
+/* Same discussion as opt_div. */
// attr bool leaf = false;
{
val = vm_opt_mod(recv, obj);
@@ -1167,7 +1171,7 @@ opt_eq
(VALUE recv, VALUE obj)
(VALUE val)
{
- val = opt_eq_func(recv, obj, cd);
+ val = opt_equality(GET_ISEQ(), recv, obj, cd);
if (val == Qundef) {
CALL_SIMPLE_METHOD();
@@ -1181,7 +1185,7 @@ opt_neq
(VALUE recv, VALUE obj)
(VALUE val)
{
- val = vm_opt_neq(cd, cd_eq, recv, obj);
+ val = vm_opt_neq(GET_ISEQ(), cd, cd_eq, recv, obj);
if (val == Qundef) {
CALL_SIMPLE_METHOD();
@@ -1338,12 +1342,12 @@ opt_aset_with
VALUE tmp = vm_opt_aset_with(recv, key, val);
if (tmp != Qundef) {
- val = tmp;
+ val = tmp;
}
else {
#ifndef MJIT_HEADER
- TOPN(0) = rb_str_resurrect(key);
- PUSH(val);
+ TOPN(0) = rb_str_resurrect(key);
+ PUSH(val);
#endif
CALL_SIMPLE_METHOD();
}
@@ -1362,7 +1366,7 @@ opt_aref_with
if (val == Qundef) {
#ifndef MJIT_HEADER
- PUSH(rb_str_resurrect(key));
+ PUSH(rb_str_resurrect(key));
#endif
CALL_SIMPLE_METHOD();
}
@@ -1431,7 +1435,7 @@ opt_not
(VALUE recv)
(VALUE val)
{
- val = vm_opt_not(cd, recv);
+ val = vm_opt_not(GET_ISEQ(), cd, recv);
if (val == Qundef) {
CALL_SIMPLE_METHOD();
@@ -1454,7 +1458,7 @@ opt_regexpmatch2
}
/* call native compiled method */
-DEFINE_INSN
+DEFINE_INSN_IF(SUPPORT_CALL_C_FUNCTION)
opt_call_c_function
(rb_insn_func_t funcptr)
()
@@ -1465,9 +1469,9 @@ opt_call_c_function
reg_cfp = (funcptr)(ec, reg_cfp);
if (reg_cfp == 0) {
- VALUE err = ec->errinfo;
- ec->errinfo = Qnil;
- THROW_EXCEPTION(err);
+ VALUE err = ec->errinfo;
+ ec->errinfo = Qnil;
+ THROW_EXCEPTION(err);
}
RESTORE_REGS();
@@ -1479,11 +1483,11 @@ DEFINE_INSN
invokebuiltin
(RB_BUILTIN bf)
(...)
-(VALUE ret)
+(VALUE val)
// attr bool leaf = false; /* anything can happen inside */
// attr rb_snum_t sp_inc = 1 - bf->argc;
{
- ret = vm_invoke_builtin(ec, reg_cfp, bf, STACK_ADDR_FROM_TOP(bf->argc));
+ val = vm_invoke_builtin(ec, reg_cfp, bf, STACK_ADDR_FROM_TOP(bf->argc));
}
/* call specific function with args (same parameters) */
@@ -1491,10 +1495,10 @@ DEFINE_INSN
opt_invokebuiltin_delegate
(RB_BUILTIN bf, rb_num_t index)
()
-(VALUE ret)
+(VALUE val)
// attr bool leaf = false; /* anything can happen inside */
{
- ret = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
+ val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
}
/* call specific function with args (same parameters) and leave */
@@ -1508,7 +1512,7 @@ opt_invokebuiltin_delegate_leave
val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
/* leave fastpath */
- /* TracePoint/return should fallback this insn to opt_invokebuiltin_delegate */
+ /* TracePoint/return fallbacks this insn to opt_invokebuiltin_delegate */
if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
#if OPT_CALL_THREADED_CODE
rb_ec_thread_ptr(ec)->retval = val;
diff --git a/internal.h b/internal.h
index baefb36c02..b63af50616 100644
--- a/internal.h
+++ b/internal.h
@@ -1,2697 +1,113 @@
-/**********************************************************************
-
- internal.h -
-
- $Author$
- created at: Tue May 17 11:42:20 JST 2011
-
- Copyright (C) 2011 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_INTERNAL_H
+#ifndef RUBY_INTERNAL_H /*-*-C-*-vi:se ft=c:*/
#define RUBY_INTERNAL_H 1
+/**
+ * @author $Author$
+ * @date Tue May 17 11:42:20 JST 2011
+ * @copyright Copyright (C) 2011 Yukihiro Matsumoto
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ */
+#include "ruby/internal/config.h"
-#include "ruby.h"
-
-#if defined(__cplusplus)
-extern "C" {
-#if 0
-} /* satisfy cc-mode */
-#endif
-#endif
-
-#ifdef HAVE_STDBOOL_H
-# include <stdbool.h>
-#else
-# include "missing/stdbool.h"
+#ifdef __cplusplus
+# error not for C++
#endif
-/* The most significant bit of the lower part of half-long integer.
- * If sizeof(long) == 4, this is 0x8000.
- * If sizeof(long) == 8, this is 0x80000000.
- */
-#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
-
#define LIKELY(x) RB_LIKELY(x)
#define UNLIKELY(x) RB_UNLIKELY(x)
-#ifndef MAYBE_UNUSED
-# define MAYBE_UNUSED(x) x
-#endif
-
-#ifndef WARN_UNUSED_RESULT
-# define WARN_UNUSED_RESULT(x) x
-#endif
-
-#ifndef __has_feature
-# define __has_feature(x) 0
-#endif
-
-#ifndef __has_extension
-# define __has_extension __has_feature
-#endif
-
-#if 0
-#elif defined(NO_SANITIZE) && __has_feature(memory_sanitizer)
-# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
- NO_SANITIZE("memory", NO_SANITIZE("address", NOINLINE(x)))
-#elif defined(NO_SANITIZE)
-# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
- NO_SANITIZE("address", NOINLINE(x))
-#elif defined(NO_SANITIZE_ADDRESS)
-# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
- NO_SANITIZE_ADDRESS(NOINLINE(x))
-#elif defined(NO_ADDRESS_SAFETY_ANALYSIS)
-# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
- NO_ADDRESS_SAFETY_ANALYSIS(NOINLINE(x))
-#else
-# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) x
-#endif
-
-#if defined(NO_SANITIZE) && defined(__GNUC__) &&! defined(__clang__)
-/* GCC warns about unknown sanitizer, which is annoying. */
-#undef NO_SANITIZE
-#define NO_SANITIZE(x, y) \
- COMPILER_WARNING_PUSH; \
- COMPILER_WARNING_IGNORED(-Wattributes); \
- __attribute__((__no_sanitize__(x))) y; \
- COMPILER_WARNING_POP
-#endif
-
-#ifndef NO_SANITIZE
-# define NO_SANITIZE(x, y) y
-#endif
-
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-# include <valgrind/memcheck.h>
-# ifndef VALGRIND_MAKE_MEM_DEFINED
-# define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
-# endif
-# ifndef VALGRIND_MAKE_MEM_UNDEFINED
-# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
-# endif
-#else
-# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
-# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
-#endif
-
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
-
-#ifndef MJIT_HEADER
-
-#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
-# include <sanitizer/asan_interface.h>
-#endif
-
-#if !__has_feature(address_sanitizer)
-# define __asan_poison_memory_region(x, y)
-# define __asan_unpoison_memory_region(x, y)
-# define __asan_region_is_poisoned(x, y) 0
-#endif
-
-#ifdef HAVE_SANITIZER_MSAN_INTERFACE_H
-# if __has_feature(memory_sanitizer)
-# include <sanitizer/msan_interface.h>
-# endif
-#endif
-
-#if !__has_feature(memory_sanitizer)
-# define __msan_allocated_memory(x, y) ((void)(x), (void)(y))
-# define __msan_poison(x, y) ((void)(x), (void)(y))
-# define __msan_unpoison(x, y) ((void)(x), (void)(y))
-# define __msan_unpoison_string(x) ((void)(x))
-#endif
-
-/*!
- * This function asserts that a (continuous) memory region from ptr to size
- * being "poisoned". Both read / write access to such memory region are
- * prohibited until properly unpoisoned. The region must be previously
- * allocated (do not pass a freed pointer here), but not necessarily be an
- * entire object that the malloc returns. You can punch hole a part of a
- * gigantic heap arena. This is handy when you do not free an allocated memory
- * region to reuse later: poison when you keep it unused, and unpoison when you
- * reuse.
- *
- * \param[in] ptr pointer to the beginning of the memory region to poison.
- * \param[in] size the length of the memory region to poison.
- */
-static inline void
-asan_poison_memory_region(const volatile void *ptr, size_t size)
-{
- __msan_poison(ptr, size);
- __asan_poison_memory_region(ptr, size);
-}
-
-/*!
- * This is a variant of asan_poison_memory_region that takes a VALUE.
- *
- * \param[in] obj target object.
- */
-static inline void
-asan_poison_object(VALUE obj)
-{
- MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
- asan_poison_memory_region(ptr, SIZEOF_VALUE);
-}
-
-#if !__has_feature(address_sanitizer)
-#define asan_poison_object_if(ptr, obj) ((void)(ptr), (void)(obj))
-#else
-#define asan_poison_object_if(ptr, obj) do { \
- if (ptr) asan_poison_object(obj); \
- } while (0)
-#endif
-
-/*!
- * This function predicates if the given object is fully addressable or not.
- *
- * \param[in] obj target object.
- * \retval 0 the given object is fully addressable.
- * \retval otherwise pointer to first such byte who is poisoned.
- */
-static inline void *
-asan_poisoned_object_p(VALUE obj)
-{
- MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
- return __asan_region_is_poisoned(ptr, SIZEOF_VALUE);
-}
-
-/*!
- * This function asserts that a (formally poisoned) memory region from ptr to
- * size is now addressable. Write access to such memory region gets allowed.
- * However read access might or might not be possible depending on situations,
- * because the region can have contents of previous usages. That information
- * should be passed by the malloc_p flag. If that is true, the contents of the
- * region is _not_ fully defined (like the return value of malloc behaves).
- * Reading from there is NG; write something first. If malloc_p is false on
- * the other hand, that memory region is fully defined and can be read
- * immediately.
- *
- * \param[in] ptr pointer to the beginning of the memory region to unpoison.
- * \param[in] size the length of the memory region.
- * \param[in] malloc_p if the memory region is like a malloc's return value or not.
- */
-static inline void
-asan_unpoison_memory_region(const volatile void *ptr, size_t size, bool malloc_p)
-{
- __asan_unpoison_memory_region(ptr, size);
- if (malloc_p) {
- __msan_allocated_memory(ptr, size);
- }
- else {
- __msan_unpoison(ptr, size);
- }
-}
-
-/*!
- * This is a variant of asan_unpoison_memory_region that takes a VALUE.
- *
- * \param[in] obj target object.
- * \param[in] malloc_p if the memory region is like a malloc's return value or not.
- */
-static inline void
-asan_unpoison_object(VALUE obj, bool newobj_p)
-{
- MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
- asan_unpoison_memory_region(ptr, SIZEOF_VALUE, newobj_p);
-}
-
-#endif
+#define roomof(x, y) (((x) + (y) - 1) / (y))
+#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
/* Prevent compiler from reordering access */
#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-# define STATIC_ASSERT(name, expr) _Static_assert(expr, #name ": " #expr)
-#elif GCC_VERSION_SINCE(4, 6, 0) || __has_extension(c_static_assert)
-# define STATIC_ASSERT(name, expr) RB_GNUC_EXTENSION _Static_assert(expr, #name ": " #expr)
-#else
-# define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
-#endif
-
-#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
-#define SIGNED_INTEGER_MAX(sint_type) \
- (sint_type) \
- ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | \
- ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
-#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
-#define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
-
-#if SIGNEDNESS_OF_TIME_T < 0 /* signed */
-# define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
-# define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
-#elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
-# define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
-# define TIMET_MIN ((time_t)0)
-#endif
-#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
-
-#ifdef HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
-#define MUL_OVERFLOW_P(a, b) \
- __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
-#elif defined HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW
-#define MUL_OVERFLOW_P(a, b) \
- RB_GNUC_EXTENSION_BLOCK(__typeof__(a) c; __builtin_mul_overflow((a), (b), &c))
-#endif
-
-#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
- (a) == 0 ? 0 : \
- (a) == -1 ? (b) < -(max) : \
- (a) > 0 ? \
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
-
-#ifdef HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
-/* __builtin_mul_overflow_p can take bitfield */
-/* and GCC permits bitfields for integers other than int */
-#define MUL_OVERFLOW_FIXNUM_P(a, b) RB_GNUC_EXTENSION_BLOCK( \
- struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; \
- __builtin_mul_overflow_p((a), (b), c.fixnum); \
-)
-#else
-#define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
-#endif
-
-#ifdef MUL_OVERFLOW_P
-#define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
-#define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
-#define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_P(a, b)
-#else
-#define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LLONG_MIN, LLONG_MAX)
-#define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
-#define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
-#endif
-
-#ifndef swap16
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP16
-# define swap16(x) __builtin_bswap16(x)
-# endif
-#endif
-
-#ifndef swap16
-# define swap16(x) ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))
-#endif
-
-#ifndef swap32
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP32
-# define swap32(x) __builtin_bswap32(x)
-# endif
-#endif
-
-#ifndef swap32
-# define swap32(x) ((uint32_t)((((x)&0xFF)<<24) \
- |(((x)>>24)&0xFF) \
- |(((x)&0x0000FF00)<<8) \
- |(((x)&0x00FF0000)>>8) ))
-#endif
-
-#ifndef swap64
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP64
-# define swap64(x) __builtin_bswap64(x)
-# endif
-#endif
-
-#ifndef swap64
-# ifdef HAVE_INT64_T
-# define byte_in_64bit(n) ((uint64_t)0xff << (n))
-# define swap64(x) ((uint64_t)((((x)&byte_in_64bit(0))<<56) \
- |(((x)>>56)&0xFF) \
- |(((x)&byte_in_64bit(8))<<40) \
- |(((x)&byte_in_64bit(48))>>40) \
- |(((x)&byte_in_64bit(16))<<24) \
- |(((x)&byte_in_64bit(40))>>24) \
- |(((x)&byte_in_64bit(24))<<8) \
- |(((x)&byte_in_64bit(32))>>8)))
-# endif
-#endif
-
-static inline unsigned int
-nlz_int(unsigned int x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZ)
- if (x == 0) return SIZEOF_INT * CHAR_BIT;
- return (unsigned int)__builtin_clz(x);
-#else
- unsigned int y;
-# if 64 < SIZEOF_INT * CHAR_BIT
- unsigned int n = 128;
-# elif 32 < SIZEOF_INT * CHAR_BIT
- unsigned int n = 64;
-# else
- unsigned int n = 32;
-# endif
-# if 64 < SIZEOF_INT * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_INT * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (unsigned int)(n - x);
-#endif
-}
-
-static inline unsigned int
-nlz_long(unsigned long x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZL)
- if (x == 0) return SIZEOF_LONG * CHAR_BIT;
- return (unsigned int)__builtin_clzl(x);
-#else
- unsigned long y;
-# if 64 < SIZEOF_LONG * CHAR_BIT
- unsigned int n = 128;
-# elif 32 < SIZEOF_LONG * CHAR_BIT
- unsigned int n = 64;
-# else
- unsigned int n = 32;
-# endif
-# if 64 < SIZEOF_LONG * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_LONG * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (unsigned int)(n - x);
-#endif
-}
-
-#ifdef HAVE_LONG_LONG
-static inline unsigned int
-nlz_long_long(unsigned LONG_LONG x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZLL)
- if (x == 0) return SIZEOF_LONG_LONG * CHAR_BIT;
- return (unsigned int)__builtin_clzll(x);
-#else
- unsigned LONG_LONG y;
-# if 64 < SIZEOF_LONG_LONG * CHAR_BIT
- unsigned int n = 128;
-# elif 32 < SIZEOF_LONG_LONG * CHAR_BIT
- unsigned int n = 64;
-# else
- unsigned int n = 32;
-# endif
-# if 64 < SIZEOF_LONG_LONG * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_LONG_LONG * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (unsigned int)(n - x);
-#endif
-}
-#endif
-
-#ifdef HAVE_UINT128_T
-static inline unsigned int
-nlz_int128(uint128_t x)
-{
- uint128_t y;
- unsigned int n = 128;
- y = x >> 64; if (y) {n -= 64; x = y;}
- y = x >> 32; if (y) {n -= 32; x = y;}
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (unsigned int)(n - x);
-}
-#endif
-
-static inline unsigned int
-nlz_intptr(uintptr_t x)
-{
-#if SIZEOF_UINTPTR_T == SIZEOF_INT
- return nlz_int(x);
-#elif SIZEOF_UINTPTR_T == SIZEOF_LONG
- return nlz_long(x);
-#elif SIZEOF_UINTPTR_T == SIZEOF_LONG_LONG
- return nlz_long_long(x);
-#else
- #error no known integer type corresponds uintptr_t
- return /* sane compiler */ ~0;
-#endif
-}
-
-static inline unsigned int
-rb_popcount32(uint32_t x)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_POPCOUNT
- return (unsigned int)__builtin_popcount(x);
-#else
- x = (x & 0x55555555) + (x >> 1 & 0x55555555);
- x = (x & 0x33333333) + (x >> 2 & 0x33333333);
- x = (x & 0x0f0f0f0f) + (x >> 4 & 0x0f0f0f0f);
- x = (x & 0x001f001f) + (x >> 8 & 0x001f001f);
- return (x & 0x0000003f) + (x >>16 & 0x0000003f);
-#endif
-}
-
-static inline int
-rb_popcount64(uint64_t x)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_POPCOUNT
- return __builtin_popcountll(x);
-#else
- x = (x & 0x5555555555555555) + (x >> 1 & 0x5555555555555555);
- x = (x & 0x3333333333333333) + (x >> 2 & 0x3333333333333333);
- x = (x & 0x0707070707070707) + (x >> 4 & 0x0707070707070707);
- x = (x & 0x001f001f001f001f) + (x >> 8 & 0x001f001f001f001f);
- x = (x & 0x0000003f0000003f) + (x >>16 & 0x0000003f0000003f);
- return (x & 0x7f) + (x >>32 & 0x7f);
-#endif
-}
-
-static inline int
-rb_popcount_intptr(uintptr_t x)
-{
-#if SIZEOF_VOIDP == 8
- return rb_popcount64(x);
-#elif SIZEOF_VOIDP == 4
- return rb_popcount32(x);
-#endif
-}
-
-static inline int
-ntz_int32(uint32_t x)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_CTZ
- return __builtin_ctz(x);
-#else
- return rb_popcount32((~x) & (x-1));
-#endif
-}
-
-static inline int
-ntz_int64(uint64_t x)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_CTZLL
- return __builtin_ctzll(x);
-#else
- return rb_popcount64((~x) & (x-1));
-#endif
-}
-
-static inline int
-ntz_intptr(uintptr_t x)
-{
-#if SIZEOF_VOIDP == 8
- return ntz_int64(x);
-#elif SIZEOF_VOIDP == 4
- return ntz_int32(x);
-#endif
-}
-
-#if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
-# define DLONG LONG_LONG
-# define DL2NUM(x) LL2NUM(x)
-#elif defined(HAVE_INT128_T)
-# define DLONG int128_t
-# define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
-VALUE rb_int128t2big(int128_t n);
-#endif
-
-static inline long
-rb_overflowed_fix_to_int(long x)
-{
- return (long)((unsigned long)(x >> 1) ^ (1LU << (SIZEOF_LONG * CHAR_BIT - 1)));
-}
-
-static inline VALUE
-rb_fix_plus_fix(VALUE x, VALUE y)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
- long lz;
- /* NOTE
- * (1) `LONG2FIX(FIX2LONG(x)+FIX2LONG(y))`
- + = `((lx*2+1)/2 + (ly*2+1)/2)*2+1`
- + = `lx*2 + ly*2 + 1`
- + = `(lx*2+1) + (ly*2+1) - 1`
- + = `x + y - 1`
- * (2) Fixnum's LSB is always 1.
- * It means you can always run `x - 1` without overflow.
- * (3) Of course `z = x + (y-1)` may overflow.
- * At that time true value is
- * * positive: 0b0 1xxx...1, and z = 0b1xxx...1
- * * nevative: 0b1 0xxx...1, and z = 0b0xxx...1
- * To convert this true value to long,
- * (a) Use arithmetic shift
- * * positive: 0b11xxx...
- * * negative: 0b00xxx...
- * (b) invert MSB
- * * positive: 0b01xxx...
- * * negative: 0b10xxx...
- */
- if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
- return rb_int2big(rb_overflowed_fix_to_int(lz));
- }
- else {
- return (VALUE)lz;
- }
-#else
- long lz = FIX2LONG(x) + FIX2LONG(y);
- return LONG2NUM(lz);
-#endif
-}
-
-static inline VALUE
-rb_fix_minus_fix(VALUE x, VALUE y)
-{
-#ifdef HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
- long lz;
- if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
- return rb_int2big(rb_overflowed_fix_to_int(lz));
- }
- else {
- return (VALUE)lz;
- }
-#else
- long lz = FIX2LONG(x) - FIX2LONG(y);
- return LONG2NUM(lz);
-#endif
-}
-
-/* arguments must be Fixnum */
-static inline VALUE
-rb_fix_mul_fix(VALUE x, VALUE y)
-{
- long lx = FIX2LONG(x);
- long ly = FIX2LONG(y);
-#ifdef DLONG
- return DL2NUM((DLONG)lx * (DLONG)ly);
-#else
- if (MUL_OVERFLOW_FIXNUM_P(lx, ly)) {
- return rb_big_mul(rb_int2big(lx), rb_int2big(ly));
- }
- else {
- return LONG2FIX(lx * ly);
- }
-#endif
-}
-
-/*
- * This behaves different from C99 for negative arguments.
- * Note that div may overflow fixnum.
- */
-static inline void
-rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
-{
- /* assume / and % comply C99.
- * ldiv(3) won't be inlined by GCC and clang.
- * I expect / and % are compiled as single idiv.
- */
- long x = FIX2LONG(a);
- long y = FIX2LONG(b);
- long div, mod;
- if (x == FIXNUM_MIN && y == -1) {
- if (divp) *divp = LONG2NUM(-FIXNUM_MIN);
- if (modp) *modp = LONG2FIX(0);
- return;
- }
- div = x / y;
- mod = x % y;
- if (y > 0 ? mod < 0 : mod > 0) {
- mod += y;
- div -= 1;
- }
- if (divp) *divp = LONG2FIX(div);
- if (modp) *modp = LONG2FIX(mod);
-}
-
-/* div() for Ruby
- * This behaves different from C99 for negative arguments.
- */
-static inline VALUE
-rb_fix_div_fix(VALUE x, VALUE y)
-{
- VALUE div;
- rb_fix_divmod_fix(x, y, &div, NULL);
- return div;
-}
-
-/* mod() for Ruby
- * This behaves different from C99 for negative arguments.
- */
-static inline VALUE
-rb_fix_mod_fix(VALUE x, VALUE y)
-{
- VALUE mod;
- rb_fix_divmod_fix(x, y, NULL, &mod);
- return mod;
-}
-
-#if defined(HAVE_UINT128_T) && defined(HAVE_LONG_LONG)
-# define bit_length(x) \
- (unsigned int) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
- sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : \
- SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
-#elif defined(HAVE_UINT128_T)
-# define bit_length(x) \
- (unsigned int) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
- SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
-#elif defined(HAVE_LONG_LONG)
-# define bit_length(x) \
- (unsigned int) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
- SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)))
-#else
-# define bit_length(x) \
- (unsigned int) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)))
-#endif
-
-#ifndef BDIGIT
-# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGIT SIZEOF_INT
-# define BDIGIT_DBL unsigned LONG_LONG
-# define BDIGIT_DBL_SIGNED LONG_LONG
-# define PRI_BDIGIT_PREFIX ""
-# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
-# elif SIZEOF_INT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGIT SIZEOF_INT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX ""
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# elif SIZEOF_SHORT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGIT SIZEOF_SHORT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX "h"
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# else
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGIT (SIZEOF_LONG/2)
-# define SIZEOF_ACTUAL_BDIGIT SIZEOF_LONG
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX "h"
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# endif
-#endif
-#ifndef SIZEOF_ACTUAL_BDIGIT
-# define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
-#endif
-
-#ifdef PRI_BDIGIT_PREFIX
-# define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
-# define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
-# define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
-# define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
-# define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
-# define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
-#endif
-
-#ifdef PRI_BDIGIT_DBL_PREFIX
-# define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
-# define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
-# define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
-# define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
-# define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
-# define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
-#endif
-
-#define BIGNUM_EMBED_LEN_NUMBITS 3
-#ifndef BIGNUM_EMBED_LEN_MAX
-# if (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) < (1 << BIGNUM_EMBED_LEN_NUMBITS)-1
-# define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
-# else
-# define BIGNUM_EMBED_LEN_MAX ((1 << BIGNUM_EMBED_LEN_NUMBITS)-1)
-# endif
-#endif
-
-struct RBignum {
- struct RBasic basic;
- union {
- struct {
- size_t len;
- BDIGIT *digits;
- } heap;
- BDIGIT ary[BIGNUM_EMBED_LEN_MAX];
- } as;
-};
-#define BIGNUM_SIGN_BIT ((VALUE)FL_USER1)
-/* sign: positive:1, negative:0 */
-#define BIGNUM_SIGN(b) ((RBASIC(b)->flags & BIGNUM_SIGN_BIT) != 0)
-#define BIGNUM_SET_SIGN(b,sign) \
- ((sign) ? (RBASIC(b)->flags |= BIGNUM_SIGN_BIT) \
- : (RBASIC(b)->flags &= ~BIGNUM_SIGN_BIT))
-#define BIGNUM_POSITIVE_P(b) BIGNUM_SIGN(b)
-#define BIGNUM_NEGATIVE_P(b) (!BIGNUM_SIGN(b))
-#define BIGNUM_NEGATE(b) (RBASIC(b)->flags ^= BIGNUM_SIGN_BIT)
-
-#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
-#define BIGNUM_EMBED_LEN_MASK \
- (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
-#define BIGNUM_EMBED_LEN_SHIFT \
- (FL_USHIFT+3) /* bit offset of BIGNUM_EMBED_LEN_MASK */
-#define BIGNUM_LEN(b) \
- ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? \
- (size_t)((RBASIC(b)->flags >> BIGNUM_EMBED_LEN_SHIFT) & \
- (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT)) : \
- RBIGNUM(b)->as.heap.len)
-/* LSB:BIGNUM_DIGITS(b)[0], MSB:BIGNUM_DIGITS(b)[BIGNUM_LEN(b)-1] */
-#define BIGNUM_DIGITS(b) \
- ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? \
- RBIGNUM(b)->as.ary : \
- RBIGNUM(b)->as.heap.digits)
-#define BIGNUM_LENINT(b) rb_long2int(BIGNUM_LEN(b))
-
-#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
-
-struct RRational {
- struct RBasic basic;
- VALUE num;
- VALUE den;
-};
-
-#define RRATIONAL(obj) (R_CAST(RRational)(obj))
-#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
-#define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
-
-struct RFloat {
- struct RBasic basic;
- double float_value;
-};
+#define UNDEF_P RB_UNDEF_P
+#define NIL_OR_UNDEF_P RB_NIL_OR_UNDEF_P
-#define RFLOAT(obj) (R_CAST(RFloat)(obj))
-
-struct RComplex {
- struct RBasic basic;
- VALUE real;
- VALUE imag;
-};
-
-#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
-
-/* shortcut macro for internal only */
-#define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
-#define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
-
-enum ruby_rhash_flags {
- RHASH_PASS_AS_KEYWORDS = FL_USER1, /* FL 1 */
- RHASH_PROC_DEFAULT = FL_USER2, /* FL 2 */
- RHASH_ST_TABLE_FLAG = FL_USER3, /* FL 3 */
-#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
- RHASH_AR_TABLE_SIZE_MASK = (FL_USER4|FL_USER5|FL_USER6|FL_USER7), /* FL 4..7 */
- RHASH_AR_TABLE_SIZE_SHIFT = (FL_USHIFT+4),
- RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
- RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
-
- // we can not put it in "enum" because it can exceed "int" range.
-#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
- FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
-
-#if USE_TRANSIENT_HEAP
- RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */
-#endif
+#include "ruby/ruby.h"
- RHASH_LEV_SHIFT = (FL_USHIFT + 13),
- RHASH_LEV_MAX = 127, /* 7 bits */
+/* Following macros were formerly defined in this header but moved to somewhere
+ * else. In order to detect them we undef here. */
- RHASH_ENUM_END
-};
+/* internal/array.h */
+#undef RARRAY_AREF
-#define RHASH_AR_TABLE_SIZE_RAW(h) \
- ((unsigned int)((RBASIC(h)->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT))
-
-void rb_hash_st_table_set(VALUE hash, st_table *st);
-
-#if 0 /* for debug */
-int rb_hash_ar_table_p(VALUE hash);
-struct ar_table_struct *rb_hash_ar_table(VALUE hash);
-st_table *rb_hash_st_table(VALUE hash);
-#define RHASH_AR_TABLE_P(hash) rb_hash_ar_table_p(hash)
-#define RHASH_AR_TABLE(h) rb_hash_ar_table(h)
-#define RHASH_ST_TABLE(h) rb_hash_st_table(h)
-#else
-#define RHASH_AR_TABLE_P(hash) (!FL_TEST_RAW((hash), RHASH_ST_TABLE_FLAG))
-#define RHASH_AR_TABLE(hash) (RHASH(hash)->as.ar)
-#define RHASH_ST_TABLE(hash) (RHASH(hash)->as.st)
-#endif
-
-#define RHASH(obj) (R_CAST(RHash)(obj))
-#define RHASH_ST_SIZE(h) (RHASH_ST_TABLE(h)->num_entries)
-#define RHASH_ST_TABLE_P(h) (!RHASH_AR_TABLE_P(h))
-#define RHASH_ST_CLEAR(h) (FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG), RHASH(h)->as.ar = NULL)
-
-#define RHASH_AR_TABLE_SIZE_MASK (VALUE)RHASH_AR_TABLE_SIZE_MASK
-#define RHASH_AR_TABLE_SIZE_SHIFT RHASH_AR_TABLE_SIZE_SHIFT
-#define RHASH_AR_TABLE_BOUND_MASK (VALUE)RHASH_AR_TABLE_BOUND_MASK
-#define RHASH_AR_TABLE_BOUND_SHIFT RHASH_AR_TABLE_BOUND_SHIFT
-
-#if USE_TRANSIENT_HEAP
-#define RHASH_TRANSIENT_P(hash) FL_TEST_RAW((hash), RHASH_TRANSIENT_FLAG)
-#define RHASH_SET_TRANSIENT_FLAG(h) FL_SET_RAW(h, RHASH_TRANSIENT_FLAG)
-#define RHASH_UNSET_TRANSIENT_FLAG(h) FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG)
-#else
-#define RHASH_TRANSIENT_P(hash) 0
-#define RHASH_SET_TRANSIENT_FLAG(h) ((void)0)
-#define RHASH_UNSET_TRANSIENT_FLAG(h) ((void)0)
-#endif
-
-#if SIZEOF_VALUE / RHASH_AR_TABLE_MAX_SIZE == 2
-typedef uint16_t ar_hint_t;
-#elif SIZEOF_VALUE / RHASH_AR_TABLE_MAX_SIZE == 1
-typedef unsigned char ar_hint_t;
-#else
-#error unsupported
-#endif
-
-struct RHash {
- struct RBasic basic;
- union {
- st_table *st;
- struct ar_table_struct *ar; /* possibly 0 */
- } as;
- const VALUE ifnone;
- union {
- ar_hint_t ary[RHASH_AR_TABLE_MAX_SIZE];
- VALUE word;
- } ar_hint;
-};
-
-#ifdef RHASH_IFNONE
-# undef RHASH_IFNONE
-# undef RHASH_SIZE
-
-# define RHASH_IFNONE(h) (RHASH(h)->ifnone)
-# define RHASH_SIZE(h) (RHASH_AR_TABLE_P(h) ? RHASH_AR_TABLE_SIZE_RAW(h) : RHASH_ST_SIZE(h))
-#endif /* ifdef RHASH_IFNONE */
-
-struct RMoved {
- VALUE flags;
- VALUE destination;
- VALUE next;
-};
-
-/* missing/setproctitle.c */
-#ifndef HAVE_SETPROCTITLE
-extern void ruby_init_setproctitle(int argc, char *argv[]);
-#endif
-
-#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
-#define RSTRUCT_EMBED_LEN_MASK RSTRUCT_EMBED_LEN_MASK
-#define RSTRUCT_EMBED_LEN_SHIFT RSTRUCT_EMBED_LEN_SHIFT
-
-enum {
- RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
- RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
- RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
- RSTRUCT_TRANSIENT_FLAG = FL_USER3,
-
- RSTRUCT_ENUM_END
-};
+/* internal/class.h */
+#undef RClass
+#undef RCLASS_SUPER
-#if USE_TRANSIENT_HEAP
-#define RSTRUCT_TRANSIENT_P(st) FL_TEST_RAW((obj), RSTRUCT_TRANSIENT_FLAG)
-#define RSTRUCT_TRANSIENT_SET(st) FL_SET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
-#define RSTRUCT_TRANSIENT_UNSET(st) FL_UNSET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
-#else
-#define RSTRUCT_TRANSIENT_P(st) 0
-#define RSTRUCT_TRANSIENT_SET(st) ((void)0)
-#define RSTRUCT_TRANSIENT_UNSET(st) ((void)0)
-#endif
+/* internal/gc.h */
+#undef NEWOBJ_OF
+#undef RB_NEWOBJ_OF
+#undef RB_OBJ_WRITE
-struct RStruct {
- struct RBasic basic;
- union {
- struct {
- long len;
- const VALUE *ptr;
- } heap;
- const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
- } as;
-};
+/* internal/hash.h */
+#undef RHASH_IFNONE
+#undef RHASH_SIZE
+#undef RHASH_TBL
+#undef RHASH_EMPTY_P
+/* internal/struct.h */
#undef RSTRUCT_LEN
#undef RSTRUCT_PTR
#undef RSTRUCT_SET
#undef RSTRUCT_GET
-#define RSTRUCT_EMBED_LEN(st) \
- (long)((RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & \
- (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT))
-#define RSTRUCT_LEN(st) rb_struct_len(st)
-#define RSTRUCT_LENINT(st) rb_long2int(RSTRUCT_LEN(st))
-#define RSTRUCT_CONST_PTR(st) rb_struct_const_ptr(st)
-#define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(STRUCT, st)))
-#define RSTRUCT_SET(st, idx, v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
-#define RSTRUCT_GET(st, idx) (RSTRUCT_CONST_PTR(st)[idx])
-#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
-
-static inline long
-rb_struct_len(VALUE st)
-{
- return (RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ?
- RSTRUCT_EMBED_LEN(st) : RSTRUCT(st)->as.heap.len;
-}
-
-static inline const VALUE *
-rb_struct_const_ptr(VALUE st)
-{
- return FIX_CONST_VALUE_PTR((RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ?
- RSTRUCT(st)->as.ary : RSTRUCT(st)->as.heap.ptr);
-}
-
-static inline const VALUE *
-rb_struct_const_heap_ptr(VALUE st)
-{
- /* TODO: check embed on debug mode */
- return RSTRUCT(st)->as.heap.ptr;
-}
-
-/* class.c */
-struct rb_deprecated_classext_struct {
- char conflict[sizeof(VALUE) * 3];
-};
+/* Also, we keep the following macros here. They are expected to be
+ * overridden in each headers. */
-struct rb_subclass_entry;
-typedef struct rb_subclass_entry rb_subclass_entry_t;
+/* internal/array.h */
+#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
-struct rb_subclass_entry {
- VALUE klass;
- rb_subclass_entry_t *next;
-};
-
-#if defined(HAVE_LONG_LONG)
-typedef unsigned LONG_LONG rb_serial_t;
-#define SERIALT2NUM ULL2NUM
-#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
-#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
-#elif defined(HAVE_UINT64_T)
-typedef uint64_t rb_serial_t;
-#define SERIALT2NUM SIZET2NUM
-#define PRI_SERIALT_PREFIX PRI_64_PREFIX
-#define SIZEOF_SERIAL_T SIZEOF_UINT64_T
-#else
-typedef unsigned long rb_serial_t;
-#define SERIALT2NUM ULONG2NUM
-#define PRI_SERIALT_PREFIX PRI_LONG_PREFIX
-#define SIZEOF_SERIAL_T SIZEOF_LONG
-#endif
-
-struct rb_classext_struct {
- struct st_table *iv_index_tbl;
- struct st_table *iv_tbl;
-#if SIZEOF_SERIAL_T == SIZEOF_VALUE /* otherwise m_tbl is in struct RClass */
- struct rb_id_table *m_tbl;
-#endif
- struct rb_id_table *const_tbl;
- struct rb_id_table *callable_m_tbl;
- rb_subclass_entry_t *subclasses;
- rb_subclass_entry_t **parent_subclasses;
- /**
- * In the case that this is an `ICLASS`, `module_subclasses` points to the link
- * in the module's `subclasses` list that indicates that the klass has been
- * included. Hopefully that makes sense.
- */
- rb_subclass_entry_t **module_subclasses;
-#if SIZEOF_SERIAL_T != SIZEOF_VALUE /* otherwise class_serial is in struct RClass */
- rb_serial_t class_serial;
-#endif
- const VALUE origin_;
- const VALUE refined_class;
- rb_alloc_func_t allocator;
- const VALUE includer;
-};
-
-typedef struct rb_classext_struct rb_classext_t;
-
-#undef RClass
-struct RClass {
- struct RBasic basic;
- VALUE super;
- rb_classext_t *ptr;
-#if SIZEOF_SERIAL_T == SIZEOF_VALUE
- /* Class serial is as wide as VALUE. Place it here. */
- rb_serial_t class_serial;
-#else
- /* Class serial does not fit into struct RClass. Place m_tbl instead. */
- struct rb_id_table *m_tbl;
-#endif
-};
-
-void rb_class_subclass_add(VALUE super, VALUE klass);
-void rb_class_remove_from_super_subclasses(VALUE);
-int rb_singleton_class_internal_p(VALUE sklass);
-
-#define RCLASS_EXT(c) (RCLASS(c)->ptr)
-#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
-#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
-#if SIZEOF_SERIAL_T == SIZEOF_VALUE
-# define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
-#else
-# define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
-#endif
-#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
-#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
-#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
-#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
-#if SIZEOF_SERIAL_T == SIZEOF_VALUE
-# define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
-#else
-# define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
-#endif
-#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
-
-#define RCLASS_CLONED FL_USER6
-#define RICLASS_IS_ORIGIN FL_USER5
-#define RCLASS_REFINED_BY_ANY FL_USER7
-
-static inline void
-RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
-{
- RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
- if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
-}
-
-static inline void
-RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
-{
- RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
-}
-
-#undef RCLASS_SUPER
-static inline VALUE
-RCLASS_SUPER(VALUE klass)
-{
- return RCLASS(klass)->super;
-}
-
-static inline VALUE
-RCLASS_SET_SUPER(VALUE klass, VALUE super)
-{
- if (super) {
- rb_class_remove_from_super_subclasses(klass);
- rb_class_subclass_add(super, klass);
- }
- RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
- return super;
-}
-/* IMEMO: Internal memo object */
-
-#ifndef IMEMO_DEBUG
-#define IMEMO_DEBUG 0
-#endif
-
-struct RIMemo {
- VALUE flags;
- VALUE v0;
- VALUE v1;
- VALUE v2;
- VALUE v3;
-};
-
-enum imemo_type {
- imemo_env = 0,
- imemo_cref = 1, /*!< class reference */
- imemo_svar = 2, /*!< special variable */
- imemo_throw_data = 3,
- imemo_ifunc = 4, /*!< iterator function */
- imemo_memo = 5,
- imemo_ment = 6,
- imemo_iseq = 7,
- imemo_tmpbuf = 8,
- imemo_ast = 9,
- imemo_parser_strterm = 10
-};
-#define IMEMO_MASK 0x0f
-
-static inline enum imemo_type
-imemo_type(VALUE imemo)
-{
- return (RBASIC(imemo)->flags >> FL_USHIFT) & IMEMO_MASK;
-}
-
-static inline int
-imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
-{
- if (LIKELY(!RB_SPECIAL_CONST_P(imemo))) {
- /* fixed at compile time if imemo_type is given. */
- const VALUE mask = (IMEMO_MASK << FL_USHIFT) | RUBY_T_MASK;
- const VALUE expected_type = (imemo_type << FL_USHIFT) | T_IMEMO;
- /* fixed at runtime. */
- return expected_type == (RBASIC(imemo)->flags & mask);
- }
- else {
- return 0;
- }
-}
-
-VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
-
-/* FL_USER0 to FL_USER3 is for type */
-#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
-#define IMEMO_FL_USER0 FL_USER4
-#define IMEMO_FL_USER1 FL_USER5
-#define IMEMO_FL_USER2 FL_USER6
-#define IMEMO_FL_USER3 FL_USER7
-#define IMEMO_FL_USER4 FL_USER8
-
-/* CREF (Class REFerence) is defined in method.h */
-
-/*! SVAR (Special VARiable) */
-struct vm_svar {
- VALUE flags;
- const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */
- const VALUE lastline;
- const VALUE backref;
- const VALUE others;
-};
-
-
-#define THROW_DATA_CONSUMED IMEMO_FL_USER0
-
-/*! THROW_DATA */
-struct vm_throw_data {
- VALUE flags;
- VALUE reserved;
- const VALUE throw_obj;
- const struct rb_control_frame_struct *catch_frame;
- int throw_state;
-};
-
-#define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
-
-/* IFUNC (Internal FUNCtion) */
-
-struct vm_ifunc_argc {
-#if SIZEOF_INT * 2 > SIZEOF_VALUE
- signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
- signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
-#else
- int min, max;
-#endif
-};
-
-/*! IFUNC (Internal FUNCtion) */
-struct vm_ifunc {
- VALUE flags;
- VALUE reserved;
- rb_block_call_func_t func;
- const void *data;
- struct vm_ifunc_argc argc;
-};
-
-#define IFUNC_NEW(a, b, c) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
-struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
-static inline struct vm_ifunc *
-rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
-{
- return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
-}
-
-typedef struct rb_imemo_tmpbuf_struct {
- VALUE flags;
- VALUE reserved;
- VALUE *ptr; /* malloc'ed buffer */
- struct rb_imemo_tmpbuf_struct *next; /* next imemo */
- size_t cnt; /* buffer size in VALUE */
-} rb_imemo_tmpbuf_t;
-
-#define rb_imemo_tmpbuf_auto_free_pointer() rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0)
-rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
-
-#define RB_IMEMO_TMPBUF_PTR(v) \
- ((void *)(((const struct rb_imemo_tmpbuf_struct *)(v))->ptr))
-
-static inline void *
-rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
-{
- return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
-}
-
-static inline VALUE
-rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
-{
- const void *src;
- VALUE imemo;
- rb_imemo_tmpbuf_t *tmpbuf;
- void *dst;
- size_t len;
-
- SafeStringValue(str);
- /* create tmpbuf to keep the pointer before xmalloc */
- imemo = rb_imemo_tmpbuf_auto_free_pointer();
- tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
- len = RSTRING_LEN(str);
- src = RSTRING_PTR(str);
- dst = ruby_xmalloc(len);
- memcpy(dst, src, len);
- tmpbuf->ptr = dst;
- return imemo;
-}
-
-void rb_strterm_mark(VALUE obj);
-
-/*! MEMO
- *
- * @see imemo_type
- * */
-struct MEMO {
- VALUE flags;
- VALUE reserved;
- const VALUE v1;
- const VALUE v2;
- union {
- long cnt;
- long state;
- const VALUE value;
- void (*func)(void);
- } u3;
-};
-
-#define MEMO_V1_SET(m, v) RB_OBJ_WRITE((m), &(m)->v1, (v))
-#define MEMO_V2_SET(m, v) RB_OBJ_WRITE((m), &(m)->v2, (v))
-
-#define MEMO_CAST(m) ((struct MEMO *)m)
-
-#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
-
-#define roomof(x, y) (((x) + (y) - 1) / (y))
-#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
-#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
-#define NEW_MEMO_FOR(type, value) \
- ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
-#define NEW_PARTIAL_MEMO_FOR(type, value, member) \
- ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), \
- rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
- MEMO_FOR(type, value))
-
-#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
-
-#ifdef RUBY_INTEGER_UNIFICATION
-# define rb_cFixnum rb_cInteger
-# define rb_cBignum rb_cInteger
-#endif
+/* internal/io.h */
+#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
-enum {
- cmp_opt_Fixnum,
- cmp_opt_String,
- cmp_opt_Float,
- cmp_optimizable_count
-};
+/* internal/string.h */
+#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
-struct cmp_opt_data {
- unsigned int opt_methods;
- unsigned int opt_inited;
-};
+/* internal/symbol.h */
+#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
-#define NEW_CMP_OPT_MEMO(type, value) \
- NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
-#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
-#define CMP_OPTIMIZABLE(data, type) \
- (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? \
- ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : \
- (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), \
- rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \
- ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
+/* internal/vm.h */
+#define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
+#define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
-#define OPTIMIZED_CMP(a, b, data) \
- ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? \
- (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : \
- (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? \
- rb_str_cmp(a, b) : \
- (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? \
- rb_float_cmp(a, b) : \
- rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
-
-/* ment is in method.h */
-
-/* global variable */
-
-struct rb_global_entry {
- struct rb_global_variable *var;
- ID id;
-};
-
-struct rb_global_entry *rb_global_entry(ID);
-VALUE rb_gvar_get(struct rb_global_entry *);
-VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
-VALUE rb_gvar_defined(struct rb_global_entry *);
-
-/* array.c */
-
-#ifndef ARRAY_DEBUG
-#define ARRAY_DEBUG (0+RUBY_DEBUG)
-#endif
-
-#ifdef ARRAY_DEBUG
-#define RARRAY_PTR_IN_USE_FLAG FL_USER14
-#define ARY_PTR_USING_P(ary) FL_TEST_RAW((ary), RARRAY_PTR_IN_USE_FLAG)
-#else
-
-/* disable debug function */
-#undef RARRAY_PTR_USE_START_TRANSIENT
-#undef RARRAY_PTR_USE_END_TRANSIENT
-#define RARRAY_PTR_USE_START_TRANSIENT(a) ((VALUE *)RARRAY_CONST_PTR_TRANSIENT(a))
-#define RARRAY_PTR_USE_END_TRANSIENT(a)
-#define ARY_PTR_USING_P(ary) 0
-
-#endif
-
-#if USE_TRANSIENT_HEAP
-#define RARY_TRANSIENT_SET(ary) FL_SET_RAW((ary), RARRAY_TRANSIENT_FLAG);
-#define RARY_TRANSIENT_UNSET(ary) FL_UNSET_RAW((ary), RARRAY_TRANSIENT_FLAG);
-#else
-#undef RARRAY_TRANSIENT_P
-#define RARRAY_TRANSIENT_P(a) 0
-#define RARY_TRANSIENT_SET(ary) ((void)0)
-#define RARY_TRANSIENT_UNSET(ary) ((void)0)
-#endif
-
-
-VALUE rb_ary_last(int, const VALUE *, VALUE);
-void rb_ary_set_len(VALUE, long);
-void rb_ary_delete_same(VALUE, VALUE);
-VALUE rb_ary_tmp_new_fill(long capa);
-VALUE rb_ary_at(VALUE, VALUE);
-VALUE rb_ary_aref1(VALUE ary, VALUE i);
-size_t rb_ary_memsize(VALUE);
-VALUE rb_to_array_type(VALUE obj);
-VALUE rb_check_to_array(VALUE ary);
-VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
-VALUE rb_ary_behead(VALUE, long);
-#if defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO)
-#define rb_ary_new_from_args(n, ...) \
- __extension__ ({ \
- const VALUE args_to_new_ary[] = {__VA_ARGS__}; \
- if (__builtin_constant_p(n)) { \
- STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); \
- } \
- rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); \
- })
-#endif
-
-static inline VALUE
-rb_ary_entry_internal(VALUE ary, long offset)
-{
- long len = RARRAY_LEN(ary);
- const VALUE *ptr = RARRAY_CONST_PTR_TRANSIENT(ary);
- if (len == 0) return Qnil;
- if (offset < 0) {
- offset += len;
- if (offset < 0) return Qnil;
- }
- else if (len <= offset) {
- return Qnil;
- }
- return ptr[offset];
-}
/* MRI debug support */
+
+/* gc.c */
void rb_obj_info_dump(VALUE obj);
void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
+
+/* debug.c */
+
+RUBY_SYMBOL_EXPORT_BEGIN
void ruby_debug_breakpoint(void);
+PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
+RUBY_SYMBOL_EXPORT_END
// show obj data structure without any side-effect
-#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, __func__)
+#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
// same as rp, but add message header
#define rp_m(msg, obj) do { \
- fprintf(stderr, "%s", (msg)); \
- rb_obj_info_dump((VALUE)obj); \
+ fputs((msg), stderr); \
+ rb_obj_info_dump((VALUE)(obj)); \
} while (0)
// `ruby_debug_breakpoint()` does nothing,
// but breakpoint is set in run.gdb, so `make gdb` can stop here.
#define bp() ruby_debug_breakpoint()
-/* bignum.c */
-extern const char ruby_digitmap[];
-double rb_big_fdiv_double(VALUE x, VALUE y);
-VALUE rb_big_uminus(VALUE x);
-VALUE rb_big_hash(VALUE);
-VALUE rb_big_odd_p(VALUE);
-VALUE rb_big_even_p(VALUE);
-size_t rb_big_size(VALUE);
-VALUE rb_integer_float_cmp(VALUE x, VALUE y);
-VALUE rb_integer_float_eq(VALUE x, VALUE y);
-VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
-VALUE rb_big_comp(VALUE x);
-VALUE rb_big_aref(VALUE x, VALUE y);
-VALUE rb_big_abs(VALUE x);
-VALUE rb_big_size_m(VALUE big);
-VALUE rb_big_bit_length(VALUE big);
-VALUE rb_big_remainder(VALUE x, VALUE y);
-VALUE rb_big_gt(VALUE x, VALUE y);
-VALUE rb_big_ge(VALUE x, VALUE y);
-VALUE rb_big_lt(VALUE x, VALUE y);
-VALUE rb_big_le(VALUE x, VALUE y);
-VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
-
-/* class.c */
-VALUE rb_class_boot(VALUE);
-VALUE rb_class_inherited(VALUE, VALUE);
-VALUE rb_make_metaclass(VALUE, VALUE);
-VALUE rb_include_class_new(VALUE, VALUE);
-void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
-void rb_class_detach_subclasses(VALUE);
-void rb_class_detach_module_subclasses(VALUE);
-void rb_class_remove_from_module_subclasses(VALUE);
-VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
-VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
-VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
-VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
-VALUE rb_special_singleton_class(VALUE);
-VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
-VALUE rb_singleton_class_get(VALUE obj);
-void Init_class_hierarchy(void);
-
-int rb_class_has_methods(VALUE c);
-void rb_undef_methods_from(VALUE klass, VALUE super);
-
-/* compar.c */
-VALUE rb_invcmp(VALUE, VALUE);
-
-/* compile.c */
-struct rb_block;
-struct rb_iseq_struct;
-int rb_dvar_defined(ID, const struct rb_iseq_struct *);
-int rb_local_defined(ID, const struct rb_iseq_struct *);
-const char * rb_insns_name(int i);
-VALUE rb_insns_name_array(void);
-int rb_vm_insn_addr2insn(const void *);
-
-/* complex.c */
-VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
-
-struct rb_thread_struct;
-/* cont.c */
-VALUE rb_obj_is_fiber(VALUE);
-void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
-void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
-
-/* debug.c */
-PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
-
-/* dir.c */
-VALUE rb_dir_getwd_ospath(void);
-
-/* dmyext.c */
-void Init_enc(void);
-void Init_ext(void);
-
-/* encoding.c */
-ID rb_id_encoding(void);
-#ifdef RUBY_ENCODING_H
-rb_encoding *rb_enc_get_from_index(int index);
-rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
-#endif
-int rb_encdb_replicate(const char *alias, const char *orig);
-int rb_encdb_alias(const char *alias, const char *orig);
-int rb_encdb_dummy(const char *name);
-void rb_encdb_declare(const char *name);
-void rb_enc_set_base(const char *name, const char *orig);
-int rb_enc_set_dummy(int index);
-void rb_encdb_set_unicode(int index);
-PUREFUNC(int rb_data_is_encoding(VALUE obj));
-
-/* enum.c */
-extern VALUE rb_cArithSeq;
-VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
-VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
-
-/* error.c */
-extern VALUE rb_eEAGAIN;
-extern VALUE rb_eEWOULDBLOCK;
-extern VALUE rb_eEINPROGRESS;
-void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
-NORETURN(void rb_async_bug_errno(const char *,int));
-const char *rb_builtin_type_name(int t);
-const char *rb_builtin_class_name(VALUE x);
-PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
-#ifdef RUBY_ENCODING_H
-VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
-PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
-PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
-PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
-#endif
-
-typedef enum {
- RB_WARN_CATEGORY_NONE,
- RB_WARN_CATEGORY_DEPRECATED,
- RB_WARN_CATEGORY_EXPERIMENTAL,
-} rb_warning_category_t;
-rb_warning_category_t rb_warning_category_from_name(VALUE category);
-bool rb_warning_category_enabled_p(rb_warning_category_t category);
-
-#define rb_raise_cstr(etype, mesg) \
- rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
-#define rb_raise_static(etype, mesg) \
- rb_exc_raise(rb_exc_new_str(etype, rb_str_new_static(mesg, rb_strlen_lit(mesg))))
-
-VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
-#define rb_name_err_raise_str(mesg, recv, name) \
- rb_exc_raise(rb_name_err_new(mesg, recv, name))
-#define rb_name_err_raise(mesg, recv, name) \
- rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name))
-VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
-VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
-#define rb_key_err_raise(mesg, recv, name) \
- rb_exc_raise(rb_key_err_new(mesg, recv, name))
-PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2);
-NORETURN(void rb_vraise(VALUE, const char *, va_list));
-
-/* eval.c */
-VALUE rb_refinement_module_get_refined_class(VALUE module);
-extern ID ruby_static_id_signo, ruby_static_id_status;
-void rb_class_modify_check(VALUE);
-#define id_signo ruby_static_id_signo
-#define id_status ruby_static_id_status
-NORETURN(VALUE rb_f_raise(int argc, VALUE *argv));
-
-/* eval_error.c */
-VALUE rb_get_backtrace(VALUE info);
-
-/* eval_jump.c */
-void rb_call_end_proc(VALUE data);
-void rb_mark_end_proc(void);
-
-/* file.c */
-extern const char ruby_null_device[];
-VALUE rb_home_dir_of(VALUE user, VALUE result);
-VALUE rb_default_home_dir(VALUE result);
-VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
-#ifdef RUBY_ENCODING_H
-VALUE rb_check_realpath(VALUE basedir, VALUE path, rb_encoding *origenc);
-#endif
-void rb_file_const(const char*, VALUE);
-int rb_file_load_ok(const char *);
-VALUE rb_file_expand_path_fast(VALUE, VALUE);
-VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
-VALUE rb_get_path_check_to_string(VALUE);
-VALUE rb_get_path_check_convert(VALUE);
-void Init_File(void);
-int ruby_is_fd_loadable(int fd);
-
-#ifdef RUBY_FUNCTION_NAME_STRING
-# if defined __GNUC__ && __GNUC__ >= 4
-# pragma GCC visibility push(default)
-# endif
-NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
-NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
-# if defined __GNUC__ && __GNUC__ >= 4
-# pragma GCC visibility pop
-# endif
-# define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
-# define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
-#else
-# define rb_sys_fail_path(path) rb_sys_fail_str(path)
-# define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
-#endif
-
-/* gc.c */
-extern VALUE *ruby_initial_gc_stress_ptr;
-extern int ruby_disable_gc;
-void Init_heap(void);
-void *ruby_mimmalloc(size_t size) RUBY_ATTR_MALLOC;
-void ruby_mimfree(void *ptr);
-void rb_objspace_set_event_hook(const rb_event_flag_t event);
-#if USE_RGENGC
-void rb_gc_writebarrier_remember(VALUE obj);
-#else
-#define rb_gc_writebarrier_remember(obj) 0
-#endif
-void ruby_gc_set_params(void);
-void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
-
-#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
-#define ruby_sized_xrealloc(ptr, new_size, old_size) ruby_xrealloc(ptr, new_size)
-#define ruby_sized_xrealloc2(ptr, new_count, element_size, old_count) ruby_xrealloc2(ptr, new_count, element_size)
-#define ruby_sized_xfree(ptr, size) ruby_xfree(ptr)
-#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
-#else
-RUBY_SYMBOL_EXPORT_BEGIN
-void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
-void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
-void ruby_sized_xfree(void *x, size_t size);
-RUBY_SYMBOL_EXPORT_END
-#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc2((void*)(var), (n), sizeof(type), (old_n)))
-#endif
-
-/* optimized version of NEWOBJ() */
-#undef NEWOBJF_OF
-#undef RB_NEWOBJ_OF
-#define RB_NEWOBJ_OF(obj,type,klass,flags) \
- type *(obj) = (type*)(((flags) & FL_WB_PROTECTED) ? \
- rb_wb_protected_newobj_of(klass, (flags) & ~FL_WB_PROTECTED) : \
- rb_wb_unprotected_newobj_of(klass, flags))
-#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
-
-#ifdef __has_attribute
-#if __has_attribute(alloc_align)
-__attribute__((__alloc_align__(1)))
-#endif
-#endif
-void *rb_aligned_malloc(size_t, size_t) RUBY_ATTR_MALLOC RUBY_ATTR_ALLOC_SIZE((2));
-
-size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
-size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
-void *rb_xmalloc_mul_add(size_t, size_t, size_t) RUBY_ATTR_MALLOC;
-void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
-void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t) RUBY_ATTR_MALLOC;
-void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t) RUBY_ATTR_MALLOC;
-
-/* hash.c */
-#if RHASH_CONVERT_TABLE_DEBUG
-struct st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
-#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
-#else
-struct st_table *rb_hash_tbl_raw(VALUE hash);
-#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
-#endif
-
-VALUE rb_hash_new_with_size(st_index_t size);
-VALUE rb_hash_has_key(VALUE hash, VALUE key);
-VALUE rb_hash_default_value(VALUE hash, VALUE key);
-VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
-long rb_dbl_long_hash(double d);
-st_table *rb_init_identtable(void);
-VALUE rb_hash_compare_by_id_p(VALUE hash);
-VALUE rb_to_hash_type(VALUE obj);
-VALUE rb_hash_key_str(VALUE);
-VALUE rb_hash_keys(VALUE hash);
-VALUE rb_hash_values(VALUE hash);
-VALUE rb_hash_rehash(VALUE hash);
-VALUE rb_hash_resurrect(VALUE hash);
-int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
-VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
-
-int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
-int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
-RUBY_SYMBOL_EXPORT_BEGIN
-int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
-RUBY_SYMBOL_EXPORT_END
-int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
-int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func func, st_data_t arg);
-
-/* inits.c */
-void rb_call_inits(void);
-
-/* io.c */
-void ruby_set_inplace_mode(const char *);
-void rb_stdio_set_default_encoding(void);
-VALUE rb_io_flush_raw(VALUE, int);
-#ifdef RUBY_IO_H
-size_t rb_io_memsize(const rb_io_t *);
-#endif
-int rb_stderr_tty_p(void);
-void rb_io_fptr_finalize_internal(void *ptr);
-#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
-
-/* load.c */
-VALUE rb_get_expanded_load_path(void);
-int rb_require_internal(VALUE fname);
-NORETURN(void rb_load_fail(VALUE, const char*));
-
-/* loadpath.c */
-extern const char ruby_exec_prefix[];
-extern const char ruby_initial_load_paths[];
-
-/* localeinit.c */
-int Init_enc_set_filesystem_encoding(void);
+#define RBOOL(v) ((v) ? Qtrue : Qfalse)
+#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
-/* math.c */
-VALUE rb_math_atan2(VALUE, VALUE);
-VALUE rb_math_cos(VALUE);
-VALUE rb_math_cosh(VALUE);
-VALUE rb_math_exp(VALUE);
-VALUE rb_math_hypot(VALUE, VALUE);
-VALUE rb_math_log(int argc, const VALUE *argv);
-VALUE rb_math_sin(VALUE);
-VALUE rb_math_sinh(VALUE);
-
-/* mjit.c */
-
-#if USE_MJIT
-extern bool mjit_enabled;
-VALUE mjit_pause(bool wait_p);
-VALUE mjit_resume(void);
-void mjit_finish(bool close_handle_p);
-#else
-#define mjit_enabled 0
-static inline VALUE mjit_pause(bool wait_p){ return Qnil; } // unreachable
-static inline VALUE mjit_resume(void){ return Qnil; } // unreachable
-static inline void mjit_finish(bool close_handle_p){}
+#ifndef __MINGW32__
+#undef memcpy
+#define memcpy ruby_nonempty_memcpy
#endif
-
-/* newline.c */
-void Init_newline(void);
-
-/* numeric.c */
-
-#define FIXNUM_POSITIVE_P(num) ((SIGNED_VALUE)(num) > (SIGNED_VALUE)INT2FIX(0))
-#define FIXNUM_NEGATIVE_P(num) ((SIGNED_VALUE)(num) < 0)
-#define FIXNUM_ZERO_P(num) ((num) == INT2FIX(0))
-
-#define INT_NEGATIVE_P(x) (FIXNUM_P(x) ? FIXNUM_NEGATIVE_P(x) : BIGNUM_NEGATIVE_P(x))
-
-#define FLOAT_ZERO_P(x) (RFLOAT_VALUE(x) == 0.0)
-
-#ifndef ROUND_DEFAULT
-# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
-#endif
-enum ruby_num_rounding_mode {
- RUBY_NUM_ROUND_HALF_UP,
- RUBY_NUM_ROUND_HALF_EVEN,
- RUBY_NUM_ROUND_HALF_DOWN,
- RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT
-};
-#define ROUND_TO(mode, even, up, down) \
- ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
- (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
-#define ROUND_FUNC(mode, name) \
- ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
-#define ROUND_CALL(mode, name, args) \
- ROUND_TO(mode, name##_half_even args, \
- name##_half_up args, name##_half_down args)
-
-int rb_num_to_uint(VALUE val, unsigned int *ret);
-VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
-double ruby_float_step_size(double beg, double end, double unit, int excl);
-int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
-double ruby_float_mod(double x, double y);
-int rb_num_negative_p(VALUE);
-VALUE rb_int_succ(VALUE num);
-VALUE rb_int_uminus(VALUE num);
-VALUE rb_float_uminus(VALUE num);
-VALUE rb_int_plus(VALUE x, VALUE y);
-VALUE rb_float_plus(VALUE x, VALUE y);
-VALUE rb_int_minus(VALUE x, VALUE y);
-VALUE rb_int_mul(VALUE x, VALUE y);
-VALUE rb_float_mul(VALUE x, VALUE y);
-VALUE rb_float_div(VALUE x, VALUE y);
-VALUE rb_int_idiv(VALUE x, VALUE y);
-VALUE rb_int_modulo(VALUE x, VALUE y);
-VALUE rb_int2str(VALUE num, int base);
-VALUE rb_fix_plus(VALUE x, VALUE y);
-VALUE rb_fix_aref(VALUE fix, VALUE idx);
-VALUE rb_int_gt(VALUE x, VALUE y);
-int rb_float_cmp(VALUE x, VALUE y);
-VALUE rb_float_gt(VALUE x, VALUE y);
-VALUE rb_int_ge(VALUE x, VALUE y);
-enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
-double rb_int_fdiv_double(VALUE x, VALUE y);
-VALUE rb_int_pow(VALUE x, VALUE y);
-VALUE rb_float_pow(VALUE x, VALUE y);
-VALUE rb_int_cmp(VALUE x, VALUE y);
-VALUE rb_int_equal(VALUE x, VALUE y);
-VALUE rb_int_divmod(VALUE x, VALUE y);
-VALUE rb_int_and(VALUE x, VALUE y);
-VALUE rb_int_lshift(VALUE x, VALUE y);
-VALUE rb_int_div(VALUE x, VALUE y);
-VALUE rb_int_abs(VALUE num);
-VALUE rb_int_odd_p(VALUE num);
-int rb_int_positive_p(VALUE num);
-int rb_int_negative_p(VALUE num);
-VALUE rb_num_pow(VALUE x, VALUE y);
-VALUE rb_float_ceil(VALUE num, int ndigits);
-
-static inline VALUE
-rb_num_compare_with_zero(VALUE num, ID mid)
-{
- VALUE zero = INT2FIX(0);
- VALUE r = rb_check_funcall(num, mid, 1, &zero);
- if (r == Qundef) {
- rb_cmperr(num, zero);
- }
- return r;
-}
-
-static inline int
-rb_num_positive_int_p(VALUE num)
-{
- const ID mid = '>';
-
- if (FIXNUM_P(num)) {
- if (rb_method_basic_definition_p(rb_cInteger, mid))
- return FIXNUM_POSITIVE_P(num);
- }
- else if (RB_TYPE_P(num, T_BIGNUM)) {
- if (rb_method_basic_definition_p(rb_cInteger, mid))
- return BIGNUM_POSITIVE_P(num);
- }
- return RTEST(rb_num_compare_with_zero(num, mid));
-}
-
-
-static inline int
-rb_num_negative_int_p(VALUE num)
-{
- const ID mid = '<';
-
- if (FIXNUM_P(num)) {
- if (rb_method_basic_definition_p(rb_cInteger, mid))
- return FIXNUM_NEGATIVE_P(num);
- }
- else if (RB_TYPE_P(num, T_BIGNUM)) {
- if (rb_method_basic_definition_p(rb_cInteger, mid))
- return BIGNUM_NEGATIVE_P(num);
- }
- return RTEST(rb_num_compare_with_zero(num, mid));
-}
-
-
-VALUE rb_float_abs(VALUE flt);
-VALUE rb_float_equal(VALUE x, VALUE y);
-VALUE rb_float_eql(VALUE x, VALUE y);
-VALUE rb_flo_div_flo(VALUE x, VALUE y);
-
-#if USE_FLONUM
-#define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
-#define RUBY_BIT_ROTR(v, n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
-#endif
-
-static inline double
-rb_float_flonum_value(VALUE v)
-{
-#if USE_FLONUM
- if (v != (VALUE)0x8000000000000002) { /* LIKELY */
- union {
- double d;
- VALUE v;
- } t;
-
- VALUE b63 = (v >> 63);
- /* e: xx1... -> 011... */
- /* xx0... -> 100... */
- /* ^b63 */
- t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
- return t.d;
- }
-#endif
- return 0.0;
-}
-
-static inline double
-rb_float_noflonum_value(VALUE v)
-{
- return ((struct RFloat *)v)->float_value;
-}
-
-static inline double
-rb_float_value_inline(VALUE v)
-{
- if (FLONUM_P(v)) {
- return rb_float_flonum_value(v);
- }
- return rb_float_noflonum_value(v);
-}
-
-static inline VALUE
-rb_float_new_inline(double d)
-{
-#if USE_FLONUM
- union {
- double d;
- VALUE v;
- } t;
- int bits;
-
- t.d = d;
- bits = (int)((VALUE)(t.v >> 60) & 0x7);
- /* bits contains 3 bits of b62..b60. */
- /* bits - 3 = */
- /* b011 -> b000 */
- /* b100 -> b001 */
-
- if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
- !((bits-3) & ~0x01)) {
- return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
- }
- else if (t.v == (VALUE)0) {
- /* +0.0 */
- return 0x8000000000000002;
- }
- /* out of range */
-#endif
- return rb_float_new_in_heap(d);
-}
-
-#define rb_float_value(v) rb_float_value_inline(v)
-#define rb_float_new(d) rb_float_new_inline(d)
-
-/* object.c */
-void rb_obj_copy_ivar(VALUE dest, VALUE obj);
-CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
-CONSTFUNC(VALUE rb_obj_not(VALUE obj));
-VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
-NORETURN(void rb_undefined_alloc(VALUE klass));
-double rb_num_to_dbl(VALUE val);
-VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
-VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
-VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
-VALUE rb_convert_type_with_id(VALUE,int,const char*,ID);
-VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
-int rb_bool_expected(VALUE, const char *);
-
-struct RBasicRaw {
- VALUE flags;
- VALUE klass;
-};
-
-#define RBASIC_CLEAR_CLASS(obj) memset(&(((struct RBasicRaw *)((VALUE)(obj)))->klass), 0, sizeof(VALUE))
-#define RBASIC_SET_CLASS_RAW(obj, cls) memcpy(&((struct RBasicRaw *)((VALUE)(obj)))->klass, &(cls), sizeof(VALUE))
-#define RBASIC_SET_CLASS(obj, cls) do { \
- VALUE _obj_ = (obj); \
- RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); \
-} while (0)
-
-/* parse.y */
-#ifndef USE_SYMBOL_GC
-#define USE_SYMBOL_GC 1
-#endif
-VALUE rb_parser_set_yydebug(VALUE, VALUE);
-RUBY_SYMBOL_EXPORT_BEGIN
-VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
-RUBY_SYMBOL_EXPORT_END
-void *rb_parser_load_file(VALUE parser, VALUE name);
-int rb_is_const_name(VALUE name);
-int rb_is_class_name(VALUE name);
-int rb_is_instance_name(VALUE name);
-int rb_is_local_name(VALUE name);
-PUREFUNC(int rb_is_const_sym(VALUE sym));
-PUREFUNC(int rb_is_attrset_sym(VALUE sym));
-ID rb_make_internal_id(void);
-void rb_gc_free_dsymbol(VALUE);
-
-/* proc.c */
-VALUE rb_proc_location(VALUE self);
-st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
-int rb_block_arity(void);
-int rb_block_min_max_arity(int *max);
-VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
-VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
-VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
-
-/* process.c */
-#define RB_MAX_GROUPS (65536)
-
-struct waitpid_state;
-struct rb_execarg {
- union {
- struct {
- VALUE shell_script;
- } sh;
- struct {
- VALUE command_name;
- VALUE command_abspath; /* full path string or nil */
- VALUE argv_str;
- VALUE argv_buf;
- } cmd;
- } invoke;
- VALUE redirect_fds;
- VALUE envp_str;
- VALUE envp_buf;
- VALUE dup2_tmpbuf;
- unsigned use_shell : 1;
- unsigned pgroup_given : 1;
- unsigned umask_given : 1;
- unsigned unsetenv_others_given : 1;
- unsigned unsetenv_others_do : 1;
- unsigned close_others_given : 1;
- unsigned close_others_do : 1;
- unsigned chdir_given : 1;
- unsigned new_pgroup_given : 1;
- unsigned new_pgroup_flag : 1;
- unsigned uid_given : 1;
- unsigned gid_given : 1;
- unsigned exception : 1;
- unsigned exception_given : 1;
- struct waitpid_state *waitpid_state; /* for async process management */
- rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0<V). */
- VALUE rlimit_limits; /* Qfalse or [[rtype, softlim, hardlim], ...] */
- mode_t umask_mask;
- rb_uid_t uid;
- rb_gid_t gid;
- int close_others_maxhint;
- VALUE fd_dup2;
- VALUE fd_close;
- VALUE fd_open;
- VALUE fd_dup2_child;
- VALUE env_modification; /* Qfalse or [[k1,v1], ...] */
- VALUE path_env;
- VALUE chdir_dir;
-};
-
-/* argv_str contains extra two elements.
- * The beginning one is for /bin/sh used by exec_with_sh.
- * The last one for terminating NULL used by execve.
- * See rb_exec_fillarg() in process.c. */
-#define ARGVSTR2ARGV(argv_str) ((char **)RB_IMEMO_TMPBUF_PTR(argv_str) + 1)
-
-static inline size_t
-ARGVSTR2ARGC(VALUE argv_str)
-{
- size_t i = 0;
- char *const *p = ARGVSTR2ARGV(argv_str);
- while (p[i++])
- ;
- return i - 1;
-}
-
-rb_pid_t rb_fork_ruby(int *status);
-void rb_last_status_clear(void);
-
-/* range.c */
-#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
-#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
-#define RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2])
-
-/* rational.c */
-VALUE rb_rational_canonicalize(VALUE x);
-VALUE rb_rational_uminus(VALUE self);
-VALUE rb_rational_plus(VALUE self, VALUE other);
-VALUE rb_rational_mul(VALUE self, VALUE other);
-VALUE rb_lcm(VALUE x, VALUE y);
-VALUE rb_rational_reciprocal(VALUE x);
-VALUE rb_cstr_to_rat(const char *, int);
-VALUE rb_rational_abs(VALUE self);
-VALUE rb_rational_cmp(VALUE self, VALUE other);
-VALUE rb_rational_pow(VALUE self, VALUE other);
-VALUE rb_numeric_quo(VALUE x, VALUE y);
-VALUE rb_float_numerator(VALUE x);
-VALUE rb_float_denominator(VALUE x);
-
-/* re.c */
-VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
-VALUE rb_reg_check_preprocess(VALUE);
-long rb_reg_search0(VALUE, VALUE, long, int, int);
-VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
-bool rb_reg_start_with_p(VALUE re, VALUE str);
-void rb_backref_set_string(VALUE string, long pos, long len);
-void rb_match_unbusy(VALUE);
-int rb_match_count(VALUE match);
-int rb_match_nth_defined(int nth, VALUE match);
-VALUE rb_reg_new_ary(VALUE ary, int options);
-
-/* signal.c */
-extern int ruby_enable_coredump;
-int rb_get_next_signal(void);
-
-/* string.c */
-VALUE rb_fstring(VALUE);
-VALUE rb_fstring_new(const char *ptr, long len);
-#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
-#define rb_fstring_literal(str) rb_fstring_lit(str)
-VALUE rb_fstring_cstr(const char *str);
-#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
-# define rb_fstring_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
- (__builtin_constant_p(str)) ? \
- rb_fstring_new((str), (long)strlen(str)) : \
- rb_fstring_cstr(str) \
-)
-#endif
-#ifdef RUBY_ENCODING_H
-VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
-#define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
-#define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
-#endif
-int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
-int rb_str_symname_p(VALUE);
-VALUE rb_str_quote_unprintable(VALUE);
-VALUE rb_id_quote_unprintable(ID);
-#define QUOTE(str) rb_str_quote_unprintable(str)
-#define QUOTE_ID(id) rb_id_quote_unprintable(id)
-char *rb_str_fill_terminator(VALUE str, const int termlen);
-void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
-VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
-VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
-#ifdef RUBY_ENCODING_H
-VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
-VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len,
- rb_encoding *from, int ecflags, VALUE ecopts);
-VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl);
-VALUE rb_str_initialize(VALUE str, const char *ptr, long len, rb_encoding *enc);
-#endif
-#define STR_NOEMBED FL_USER1
-#define STR_SHARED FL_USER2 /* = ELTS_SHARED */
-#define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
-#define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
-#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
-#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
-size_t rb_str_memsize(VALUE);
-VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
-VALUE rb_sym_to_proc(VALUE sym);
-char *rb_str_to_cstr(VALUE str);
-VALUE rb_str_eql(VALUE str1, VALUE str2);
-VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
-const char *ruby_escaped_char(int c);
-VALUE rb_str_opt_plus(VALUE, VALUE);
-
-/* expect tail call optimization */
-static inline VALUE
-rb_str_eql_internal(const VALUE str1, const VALUE str2)
-{
- const long len = RSTRING_LEN(str1);
- const char *ptr1, *ptr2;
-
- if (len != RSTRING_LEN(str2)) return Qfalse;
- if (!rb_str_comparable(str1, str2)) return Qfalse;
- if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2)))
- return Qtrue;
- if (memcmp(ptr1, ptr2, len) == 0)
- return Qtrue;
- return Qfalse;
-}
-
-/* symbol.c */
-#ifdef RUBY_ENCODING_H
-VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
-#endif
-VALUE rb_sym_intern_ascii(const char *ptr, long len);
-VALUE rb_sym_intern_ascii_cstr(const char *ptr);
-#ifdef __GNUC__
-#define rb_sym_intern_ascii_cstr(ptr) __extension__ ( \
-{ \
- (__builtin_constant_p(ptr)) ? \
- rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : \
- rb_sym_intern_ascii_cstr(ptr); \
-})
-#endif
-VALUE rb_to_symbol_type(VALUE obj);
-
-/* struct.c */
-VALUE rb_struct_init_copy(VALUE copy, VALUE s);
-VALUE rb_struct_lookup(VALUE s, VALUE idx);
-VALUE rb_struct_s_keyword_init(VALUE klass);
-
-/* time.c */
-struct timeval rb_time_timeval(VALUE);
-
-/* thread.c */
-#define COVERAGE_INDEX_LINES 0
-#define COVERAGE_INDEX_BRANCHES 1
-#define COVERAGE_TARGET_LINES 1
-#define COVERAGE_TARGET_BRANCHES 2
-#define COVERAGE_TARGET_METHODS 4
-#define COVERAGE_TARGET_ONESHOT_LINES 8
-
-VALUE rb_obj_is_mutex(VALUE obj);
-VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
-void rb_thread_execute_interrupts(VALUE th);
-VALUE rb_get_coverages(void);
-int rb_get_coverage_mode(void);
-VALUE rb_default_coverage(int);
-VALUE rb_thread_shield_new(void);
-VALUE rb_thread_shield_wait(VALUE self);
-VALUE rb_thread_shield_release(VALUE self);
-VALUE rb_thread_shield_destroy(VALUE self);
-int rb_thread_to_be_killed(VALUE thread);
-void rb_mutex_allow_trap(VALUE self, int val);
-VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
-VALUE rb_mutex_owned_p(VALUE self);
-
-/* transcode.c */
-extern VALUE rb_cEncodingConverter;
-#ifdef RUBY_ENCODING_H
-size_t rb_econv_memsize(rb_econv_t *);
-#endif
-
-/* us_ascii.c */
-#ifdef RUBY_ENCODING_H
-extern rb_encoding OnigEncodingUS_ASCII;
-#endif
-
-/* util.c */
-char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
-char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
-
-/* utf_8.c */
-#ifdef RUBY_ENCODING_H
-extern rb_encoding OnigEncodingUTF_8;
-#endif
-
-/* variable.c */
-#if USE_TRANSIENT_HEAP
-#define ROBJECT_TRANSIENT_FLAG FL_USER13
-#define ROBJ_TRANSIENT_P(obj) FL_TEST_RAW((obj), ROBJECT_TRANSIENT_FLAG)
-#define ROBJ_TRANSIENT_SET(obj) FL_SET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
-#define ROBJ_TRANSIENT_UNSET(obj) FL_UNSET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
-#else
-#define ROBJ_TRANSIENT_P(obj) 0
-#define ROBJ_TRANSIENT_SET(obj) ((void)0)
-#define ROBJ_TRANSIENT_UNSET(obj) ((void)0)
-#endif
-void rb_gc_mark_global_tbl(void);
-size_t rb_generic_ivar_memsize(VALUE);
-VALUE rb_search_class_path(VALUE);
-VALUE rb_attr_delete(VALUE, ID);
-VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
-void rb_autoload_str(VALUE mod, ID id, VALUE file);
-VALUE rb_autoload_at_p(VALUE, ID, int);
-void rb_deprecate_constant(VALUE mod, const char *name);
-NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
-rb_gvar_getter_t *rb_gvar_getter_function_of(const struct rb_global_entry *);
-rb_gvar_setter_t *rb_gvar_setter_function_of(const struct rb_global_entry *);
-bool rb_gvar_is_traced(const struct rb_global_entry *);
-void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
-
-/* vm_insnhelper.h */
-rb_serial_t rb_next_class_serial(void);
-
-/* vm.c */
-VALUE rb_obj_is_thread(VALUE obj);
-void rb_vm_mark(void *ptr);
-void Init_BareVM(void);
-void Init_vm_objects(void);
-PUREFUNC(VALUE rb_vm_top_self(void));
-void rb_vm_inc_const_missing_count(void);
-const void **rb_vm_get_insns_address_table(void);
-VALUE rb_source_location(int *pline);
-const char *rb_source_location_cstr(int *pline);
-MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
-int rb_vm_add_root_module(ID id, VALUE module);
-void rb_vm_check_redefinition_by_prepend(VALUE klass);
-int rb_vm_check_optimizable_mid(VALUE mid);
-VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
-MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
-PUREFUNC(st_table *rb_vm_fstring_table(void));
-
-
-/* vm_dump.c */
-void rb_print_backtrace(void);
-
-/* vm_eval.c */
-void Init_vm_eval(void);
-VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *);
-VALUE rb_current_realfilepath(void);
-VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
-typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
-VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
- rb_check_funcall_hook *hook, VALUE arg);
-VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
- rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
-const char *rb_type_str(enum ruby_value_type type);
-VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
-VALUE rb_yield_1(VALUE val);
-VALUE rb_yield_force_blockarg(VALUE values);
-VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
- rb_block_call_func_t bl_proc, int min_argc, int max_argc,
- VALUE data2);
-
-/* vm_insnhelper.c */
-VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
-VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
-void Init_vm_stack_canary(void);
-
-/* vm_method.c */
-void Init_eval_method(void);
-
-enum method_missing_reason {
- MISSING_NOENTRY = 0x00,
- MISSING_PRIVATE = 0x01,
- MISSING_PROTECTED = 0x02,
- MISSING_FCALL = 0x04,
- MISSING_VCALL = 0x08,
- MISSING_SUPER = 0x10,
- MISSING_MISSING = 0x20,
- MISSING_NONE = 0x40
-};
-struct rb_callable_method_entry_struct;
-struct rb_method_definition_struct;
-struct rb_execution_context_struct;
-struct rb_control_frame_struct;
-struct rb_calling_info;
-struct rb_call_data;
-/* I have several reasons to chose 64 here:
- *
- * - A cache line must be a power-of-two size.
- * - Setting this to anything less than or equal to 32 boosts nothing.
- * - I have never seen an architecture that has 128 byte L1 cache line.
- * - I know Intel Core and Sparc T4 at least uses 64.
- * - I know jemalloc internally has this exact same `#define CACHE_LINE 64`.
- * https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/internal/jemalloc_internal_types.h
- */
-#define CACHELINE 64
-struct rb_call_cache {
- /* inline cache: keys */
- rb_serial_t method_state;
- rb_serial_t class_serial[
- (CACHELINE
- - sizeof(rb_serial_t) /* method_state */
- - sizeof(struct rb_callable_method_entry_struct *) /* me */
- - sizeof(uintptr_t) /* method_serial */
- - sizeof(enum method_missing_reason) /* aux */
- - sizeof(VALUE (*)( /* call */
- struct rb_execution_context_struct *e,
- struct rb_control_frame_struct *,
- struct rb_calling_info *,
- const struct rb_call_data *)))
- / sizeof(rb_serial_t)
- ];
-
- /* inline cache: values */
- const struct rb_callable_method_entry_struct *me;
- uintptr_t method_serial; /* me->def->method_serial */
-
- VALUE (*call)(struct rb_execution_context_struct *ec,
- struct rb_control_frame_struct *cfp,
- struct rb_calling_info *calling,
- struct rb_call_data *cd);
-
- union {
- unsigned int index; /* used by ivar */
- enum method_missing_reason method_missing_reason; /* used by method_missing */
- } aux;
-};
-STATIC_ASSERT(cachelined, sizeof(struct rb_call_cache) <= CACHELINE);
-struct rb_call_info {
- /* fixed at compile time */
- ID mid;
- unsigned int flag;
- int orig_argc;
-};
-struct rb_call_data {
- struct rb_call_cache cc;
- struct rb_call_info ci;
-};
-RUBY_FUNC_EXPORTED
-RUBY_FUNC_NONNULL(1, VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*));
-RUBY_FUNC_EXPORTED
-RUBY_FUNC_NONNULL(1, bool rb_method_basic_definition_p_with_cc(struct rb_call_data *, VALUE, ID));
-
-#ifdef __GNUC__
-# define rb_funcallv(recv, mid, argc, argv) \
- __extension__({ \
- static struct rb_call_data rb_funcallv_data; \
- rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \
- })
-# define rb_method_basic_definition_p(klass, mid) \
- __extension__({ \
- static struct rb_call_data rb_mbdp; \
- (klass == Qfalse) ? /* hidden object cannot be overridden */ true : \
- rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \
- })
-#endif
-
-/* vm_backtrace.c */
-void Init_vm_backtrace(void);
-VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
-VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
-
-VALUE rb_make_backtrace(void);
-void rb_backtrace_print_as_bugreport(void);
-int rb_backtrace_p(VALUE obj);
-VALUE rb_backtrace_to_str_ary(VALUE obj);
-VALUE rb_backtrace_to_location_ary(VALUE obj);
-void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
-
-RUBY_SYMBOL_EXPORT_BEGIN
-const char *rb_objspace_data_type_name(VALUE obj);
-
-/* Temporary. This API will be removed (renamed). */
-VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
-
-/* array.c (export) */
-void rb_ary_detransient(VALUE a);
-VALUE *rb_ary_ptr_use_start(VALUE ary);
-void rb_ary_ptr_use_end(VALUE ary);
-
-/* bignum.c (export) */
-VALUE rb_big_mul_normal(VALUE x, VALUE y);
-VALUE rb_big_mul_balance(VALUE x, VALUE y);
-VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
-VALUE rb_big_mul_toom3(VALUE x, VALUE y);
-VALUE rb_big_sq_fast(VALUE x);
-VALUE rb_big_divrem_normal(VALUE x, VALUE y);
-VALUE rb_big2str_poweroftwo(VALUE x, int base);
-VALUE rb_big2str_generic(VALUE x, int base);
-VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
-VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
-VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-VALUE rb_big_mul_gmp(VALUE x, VALUE y);
-VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
-VALUE rb_big2str_gmp(VALUE x, int base);
-VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
-#endif
-enum rb_int_parse_flags {
- RB_INT_PARSE_SIGN = 0x01,
- RB_INT_PARSE_UNDERSCORE = 0x02,
- RB_INT_PARSE_PREFIX = 0x04,
- RB_INT_PARSE_ALL = 0x07,
- RB_INT_PARSE_DEFAULT = 0x07
-};
-VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
-
-/* enumerator.c (export) */
-VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
- rb_enumerator_size_func *size_fn,
- VALUE beg, VALUE end, VALUE step, int excl);
-
-/* error.c (export) */
-int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
-NORETURN(void rb_unexpected_type(VALUE,int));
-#undef Check_Type
-#define Check_Type(v, t) \
- (!RB_TYPE_P((VALUE)(v), (t)) || \
- ((t) == RUBY_T_DATA && RTYPEDDATA_P(v)) ? \
- rb_unexpected_type((VALUE)(v), (t)) : (void)0)
-
-static inline int
-rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
-{
- return RB_TYPE_P(obj, T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
-}
-#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
-
-/* file.c (export) */
-#if defined HAVE_READLINK && defined RUBY_ENCODING_H
-VALUE rb_readlink(VALUE path, rb_encoding *enc);
-#endif
-#ifdef __APPLE__
-VALUE rb_str_normalize_ospath(const char *ptr, long len);
-#endif
-
-/* hash.c (export) */
-VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
-VALUE rb_ident_hash_new(void);
-
-/* io.c (export) */
-void rb_maygvl_fd_fix_cloexec(int fd);
-int rb_gc_for_fd(int err);
-void rb_write_error_str(VALUE mesg);
-
-/* numeric.c (export) */
-VALUE rb_int_positive_pow(long x, unsigned long y);
-
-/* object.c (export) */
-int rb_opts_exception_p(VALUE opts, int default_value);
-
-/* process.c (export) */
-int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
-rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
-VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
-struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */
-int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
-void rb_execarg_parent_start(VALUE execarg_obj);
-void rb_execarg_parent_end(VALUE execarg_obj);
-int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
-VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
-void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
-
-/* rational.c (export) */
-VALUE rb_gcd(VALUE x, VALUE y);
-VALUE rb_gcd_normal(VALUE self, VALUE other);
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-VALUE rb_gcd_gmp(VALUE x, VALUE y);
-#endif
-
-/* signal.c (export) */
-int rb_grantpt(int fd);
-
-/* string.c (export) */
-VALUE rb_str_tmp_frozen_acquire(VALUE str);
-void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
-#ifdef RUBY_ENCODING_H
-/* internal use */
-VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
-#endif
-VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
-VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
-
-/* thread.c (export) */
-int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */
-
-/* time.c (export) */
-void ruby_reset_leap_second_info(void);
-
-/* util.c (export) */
-extern const signed char ruby_digit36_to_number_table[];
-extern const char ruby_hexdigits[];
-extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
-
-/* variable.c (export) */
-void rb_mark_generic_ivar(VALUE);
-void rb_mv_generic_ivar(VALUE src, VALUE dst);
-VALUE rb_const_missing(VALUE klass, VALUE name);
-int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
-void rb_iv_tbl_copy(VALUE dst, VALUE src);
-
-/* gc.c (export) */
-VALUE rb_wb_protected_newobj_of(VALUE, VALUE);
-VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE);
-
-size_t rb_obj_memsize_of(VALUE);
-void rb_gc_verify_internal_consistency(void);
-
-#define RB_OBJ_GC_FLAGS_MAX 6
-size_t rb_obj_gc_flags(VALUE, ID[], size_t);
-void rb_gc_mark_values(long n, const VALUE *values);
-void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
-
-#if IMEMO_DEBUG
-VALUE rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0, const char *file, int line);
-#define rb_imemo_new(type, v1, v2, v3, v0) rb_imemo_new_debug(type, v1, v2, v3, v0, __FILE__, __LINE__)
-#else
-VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
-#endif
-
-/* random.c */
-int ruby_fill_random_bytes(void *, size_t, int);
-
-RUBY_SYMBOL_EXPORT_END
-
-#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
- RUBY_DTRACE_HOOK(name##_CREATE, arg)
-#define RUBY_DTRACE_HOOK(name, arg) \
-do { \
- if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
- int dtrace_line; \
- const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
- if (!dtrace_file) dtrace_file = ""; \
- RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
- } \
-} while (0)
-
-#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
-#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
-#ifdef __GNUC__
-#define rb_obj_builtin_type(obj) \
-__extension__({ \
- VALUE arg_obj = (obj); \
- RB_SPECIAL_CONST_P(arg_obj) ? -1 : \
- RB_BUILTIN_TYPE(arg_obj); \
- })
-#else
-static inline int
-rb_obj_builtin_type(VALUE obj)
-{
- return RB_SPECIAL_CONST_P(obj) ? -1 :
- RB_BUILTIN_TYPE(obj);
-}
-#endif
-
-/* A macro for defining a flexible array, like: VALUE ary[FLEX_ARY_LEN]; */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define FLEX_ARY_LEN /* VALUE ary[]; */
-#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
-# define FLEX_ARY_LEN 0 /* VALUE ary[0]; */
-#else
-# define FLEX_ARY_LEN 1 /* VALUE ary[1]; */
-#endif
-
-/*
- * For declaring bitfields out of non-unsigned int types:
- * struct date {
- * BITFIELD(enum months, month, 4);
- * ...
- * };
- */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define BITFIELD(type, name, size) type name : size
-#else
-# define BITFIELD(type, name, size) unsigned int name : size
-#endif
-
-#if defined(_MSC_VER)
-# define COMPILER_WARNING_PUSH __pragma(warning(push))
-# define COMPILER_WARNING_POP __pragma(warning(pop))
-# define COMPILER_WARNING_ERROR(flag) __pragma(warning(error: flag)))
-# define COMPILER_WARNING_IGNORED(flag) __pragma(warning(suppress: flag)))
-
-#elif defined(__clang__) /* clang 2.6 already had this feature */
-# define COMPILER_WARNING_PUSH _Pragma("clang diagnostic push")
-# define COMPILER_WARNING_POP _Pragma("clang diagnostic pop")
-# define COMPILER_WARNING_SPECIFIER(kind, msg) \
- clang diagnostic kind # msg
-# define COMPILER_WARNING_ERROR(flag) \
- COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(error, flag))
-# define COMPILER_WARNING_IGNORED(flag) \
- COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(ignored, flag))
-
-#elif GCC_VERSION_SINCE(4, 6, 0)
-/* https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Diagnostic-Pragmas.html */
-# define COMPILER_WARNING_PUSH _Pragma("GCC diagnostic push")
-# define COMPILER_WARNING_POP _Pragma("GCC diagnostic pop")
-# define COMPILER_WARNING_SPECIFIER(kind, msg) \
- GCC diagnostic kind # msg
-# define COMPILER_WARNING_ERROR(flag) \
- COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(error, flag))
-# define COMPILER_WARNING_IGNORED(flag) \
- COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(ignored, flag))
-
-#else /* other compilers to follow? */
-# define COMPILER_WARNING_PUSH /* nop */
-# define COMPILER_WARNING_POP /* nop */
-# define COMPILER_WARNING_ERROR(flag) /* nop */
-# define COMPILER_WARNING_IGNORED(flag) /* nop */
-#endif
-
-#define COMPILER_WARNING_PRAGMA(str) COMPILER_WARNING_PRAGMA_(str)
-#define COMPILER_WARNING_PRAGMA_(str) _Pragma(#str)
-
-#if defined(USE_UNALIGNED_MEMBER_ACCESS) && USE_UNALIGNED_MEMBER_ACCESS && \
- (defined(__clang__) || GCC_VERSION_SINCE(9, 0, 0))
-# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \
- COMPILER_WARNING_PUSH; \
- COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
- typeof(expr) unaligned_member_access_result = (expr); \
- COMPILER_WARNING_POP; \
- unaligned_member_access_result; \
-})
-#else
-# define UNALIGNED_MEMBER_ACCESS(expr) expr
-#endif
-#define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
-
-#undef RB_OBJ_WRITE
-#define RB_OBJ_WRITE(a, slot, b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
-
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
-
#endif /* RUBY_INTERNAL_H */
diff --git a/internal/array.h b/internal/array.h
new file mode 100644
index 0000000000..a0d16dec3f
--- /dev/null
+++ b/internal/array.h
@@ -0,0 +1,163 @@
+#ifndef INTERNAL_ARRAY_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ARRAY_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Array.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "internal/static_assert.h" /* for STATIC_ASSERT */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for RARRAY_LEN */
+
+#ifndef ARRAY_DEBUG
+# define ARRAY_DEBUG (0+RUBY_DEBUG)
+#endif
+
+#define RARRAY_SHARED_FLAG ELTS_SHARED
+#define RARRAY_SHARED_ROOT_FLAG FL_USER12
+#define RARRAY_PTR_IN_USE_FLAG FL_USER14
+
+/* array.c */
+VALUE rb_ary_last(int, const VALUE *, VALUE);
+void rb_ary_set_len(VALUE, long);
+void rb_ary_delete_same(VALUE, VALUE);
+VALUE rb_ary_hidden_new_fill(long capa);
+VALUE rb_ary_at(VALUE, VALUE);
+size_t rb_ary_memsize(VALUE);
+VALUE rb_to_array_type(VALUE obj);
+VALUE rb_to_array(VALUE obj);
+void rb_ary_cancel_sharing(VALUE ary);
+size_t rb_ary_size_as_embedded(VALUE ary);
+void rb_ary_make_embedded(VALUE ary);
+bool rb_ary_embeddable_p(VALUE ary);
+VALUE rb_ary_diff(VALUE ary1, VALUE ary2);
+
+static inline VALUE rb_ary_entry_internal(VALUE ary, long offset);
+static inline bool ARY_PTR_USING_P(VALUE ary);
+static inline void RARY_TRANSIENT_SET(VALUE ary);
+static inline void RARY_TRANSIENT_UNSET(VALUE ary);
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
+VALUE rb_check_to_array(VALUE ary);
+VALUE rb_ary_behead(VALUE, long);
+VALUE rb_ary_aref1(VALUE ary, VALUE i);
+
+struct rb_execution_context_struct;
+VALUE rb_ec_ary_new_from_values(struct rb_execution_context_struct *ec, long n, const VALUE *elts);
+MJIT_SYMBOL_EXPORT_END
+
+// YJIT needs this function to never allocate and never raise
+static inline VALUE
+rb_ary_entry_internal(VALUE ary, long offset)
+{
+ long len = RARRAY_LEN(ary);
+ const VALUE *ptr = RARRAY_CONST_PTR_TRANSIENT(ary);
+ if (len == 0) return Qnil;
+ if (offset < 0) {
+ offset += len;
+ if (offset < 0) return Qnil;
+ }
+ else if (len <= offset) {
+ return Qnil;
+ }
+ return ptr[offset];
+}
+
+static inline bool
+ARY_PTR_USING_P(VALUE ary)
+{
+ return FL_TEST_RAW(ary, RARRAY_PTR_IN_USE_FLAG);
+}
+
+RBIMPL_ATTR_MAYBE_UNUSED()
+static inline int
+ary_should_not_be_shared_and_embedded(VALUE ary)
+{
+ return !FL_ALL_RAW(ary, RARRAY_SHARED_FLAG|RARRAY_EMBED_FLAG);
+}
+
+static inline bool
+ARY_SHARED_P(VALUE ary)
+{
+ assert(RB_TYPE_P(ary, T_ARRAY));
+ assert(ary_should_not_be_shared_and_embedded(ary));
+ return FL_TEST_RAW(ary, RARRAY_SHARED_FLAG);
+}
+
+static inline bool
+ARY_EMBED_P(VALUE ary)
+{
+ assert(RB_TYPE_P(ary, T_ARRAY));
+ assert(ary_should_not_be_shared_and_embedded(ary));
+ return FL_TEST_RAW(ary, RARRAY_EMBED_FLAG);
+}
+
+static inline VALUE
+ARY_SHARED_ROOT(VALUE ary)
+{
+ assert(ARY_SHARED_P(ary));
+ return RARRAY(ary)->as.heap.aux.shared_root;
+}
+
+static inline bool
+ARY_SHARED_ROOT_P(VALUE ary)
+{
+ assert(RB_TYPE_P(ary, T_ARRAY));
+ return FL_TEST_RAW(ary, RARRAY_SHARED_ROOT_FLAG);
+}
+
+static inline long
+ARY_SHARED_ROOT_REFCNT(VALUE ary)
+{
+ assert(ARY_SHARED_ROOT_P(ary));
+ return RARRAY(ary)->as.heap.aux.capa;
+}
+
+static inline void
+RARY_TRANSIENT_SET(VALUE ary)
+{
+#if USE_TRANSIENT_HEAP
+ FL_SET_RAW(ary, RARRAY_TRANSIENT_FLAG);
+#endif
+}
+
+static inline void
+RARY_TRANSIENT_UNSET(VALUE ary)
+{
+#if USE_TRANSIENT_HEAP
+ FL_UNSET_RAW(ary, RARRAY_TRANSIENT_FLAG);
+#endif
+}
+
+#undef rb_ary_new_from_args
+#if RBIMPL_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments")
+# /* Skip it; clang -pedantic doesn't like the following */
+#elif defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO)
+#define rb_ary_new_from_args(n, ...) \
+ __extension__ ({ \
+ const VALUE args_to_new_ary[] = {__VA_ARGS__}; \
+ if (__builtin_constant_p(n)) { \
+ STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); \
+ } \
+ rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); \
+ })
+#endif
+
+#undef RARRAY_AREF
+RBIMPL_ATTR_PURE_UNLESS_DEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+static inline VALUE
+RARRAY_AREF(VALUE ary, long i)
+{
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+
+ return RARRAY_CONST_PTR_TRANSIENT(ary)[i];
+}
+
+#endif /* INTERNAL_ARRAY_H */
diff --git a/internal/basic_operators.h b/internal/basic_operators.h
new file mode 100644
index 0000000000..2cd9f50073
--- /dev/null
+++ b/internal/basic_operators.h
@@ -0,0 +1,64 @@
+#ifndef INTERNAL_BOP_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_BOP_H
+
+#include "internal.h"
+#include "ruby/internal/dllexport.h"
+
+enum ruby_basic_operators {
+ BOP_PLUS,
+ BOP_MINUS,
+ BOP_MULT,
+ BOP_DIV,
+ BOP_MOD,
+ BOP_EQ,
+ BOP_EQQ,
+ BOP_LT,
+ BOP_LE,
+ BOP_LTLT,
+ BOP_AREF,
+ BOP_ASET,
+ BOP_LENGTH,
+ BOP_SIZE,
+ BOP_EMPTY_P,
+ BOP_NIL_P,
+ BOP_SUCC,
+ BOP_GT,
+ BOP_GE,
+ BOP_NOT,
+ BOP_NEQ,
+ BOP_MATCH,
+ BOP_FREEZE,
+ BOP_UMINUS,
+ BOP_MAX,
+ BOP_MIN,
+ BOP_CALL,
+ BOP_AND,
+ BOP_OR,
+ BOP_CMP,
+ BOP_DEFAULT,
+
+ BOP_LAST_
+};
+
+MJIT_SYMBOL_EXPORT_BEGIN
+RUBY_EXTERN short ruby_vm_redefined_flag[BOP_LAST_];
+MJIT_SYMBOL_EXPORT_END
+
+/* optimize insn */
+#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
+#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
+#define STRING_REDEFINED_OP_FLAG (1 << 2)
+#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
+#define HASH_REDEFINED_OP_FLAG (1 << 4)
+/* #define BIGNUM_REDEFINED_OP_FLAG (1 << 5) */
+#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
+#define TIME_REDEFINED_OP_FLAG (1 << 7)
+#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
+#define NIL_REDEFINED_OP_FLAG (1 << 9)
+#define TRUE_REDEFINED_OP_FLAG (1 << 10)
+#define FALSE_REDEFINED_OP_FLAG (1 << 11)
+#define PROC_REDEFINED_OP_FLAG (1 << 12)
+
+#define BASIC_OP_UNREDEFINED_P(op, klass) (LIKELY((ruby_vm_redefined_flag[(op)]&(klass)) == 0))
+
+#endif
diff --git a/internal/bignum.h b/internal/bignum.h
new file mode 100644
index 0000000000..5cd35ede8a
--- /dev/null
+++ b/internal/bignum.h
@@ -0,0 +1,246 @@
+#ifndef INTERNAL_BIGNUM_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_BIGNUM_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Bignums.
+ */
+#include "ruby/internal/config.h" /* for HAVE_LIBGMP */
+#include <stddef.h> /* for size_t */
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
+#endif /* `#define`d in ruby/config.h) */
+
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for struct RBasic */
+
+#ifndef BDIGIT
+# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
+# define BDIGIT unsigned int
+# define SIZEOF_BDIGIT SIZEOF_INT
+# define BDIGIT_DBL unsigned LONG_LONG
+# define BDIGIT_DBL_SIGNED LONG_LONG
+# define PRI_BDIGIT_PREFIX ""
+# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
+# elif SIZEOF_INT*2 <= SIZEOF_LONG
+# define BDIGIT unsigned int
+# define SIZEOF_BDIGIT SIZEOF_INT
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX ""
+# define PRI_BDIGIT_DBL_PREFIX "l"
+# elif SIZEOF_SHORT*2 <= SIZEOF_LONG
+# define BDIGIT unsigned short
+# define SIZEOF_BDIGIT SIZEOF_SHORT
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX "h"
+# define PRI_BDIGIT_DBL_PREFIX "l"
+# else
+# define BDIGIT unsigned short
+# define SIZEOF_BDIGIT (SIZEOF_LONG/2)
+# define SIZEOF_ACTUAL_BDIGIT SIZEOF_LONG
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX "h"
+# define PRI_BDIGIT_DBL_PREFIX "l"
+# endif
+#endif
+
+#ifndef SIZEOF_ACTUAL_BDIGIT
+# define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
+#endif
+
+#ifdef PRI_BDIGIT_PREFIX
+# define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
+# define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
+# define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
+# define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
+# define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
+# define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
+#endif
+
+#ifdef PRI_BDIGIT_DBL_PREFIX
+# define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
+# define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
+# define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
+# define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
+# define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
+# define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
+#endif
+
+#define RBIGNUM(obj) ((struct RBignum *)(obj))
+#define BIGNUM_SIGN_BIT FL_USER1
+#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
+#define BIGNUM_EMBED_LEN_NUMBITS 3
+#define BIGNUM_EMBED_LEN_MASK \
+ (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
+#define BIGNUM_EMBED_LEN_SHIFT \
+ (FL_USHIFT+3) /* bit offset of BIGNUM_EMBED_LEN_MASK */
+#ifndef BIGNUM_EMBED_LEN_MAX
+# if (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT) < (1 << BIGNUM_EMBED_LEN_NUMBITS)-1
+# define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RBIMPL_RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
+# else
+# define BIGNUM_EMBED_LEN_MAX ((1 << BIGNUM_EMBED_LEN_NUMBITS)-1)
+# endif
+#endif
+
+enum rb_int_parse_flags {
+ RB_INT_PARSE_SIGN = 0x01,
+ RB_INT_PARSE_UNDERSCORE = 0x02,
+ RB_INT_PARSE_PREFIX = 0x04,
+ RB_INT_PARSE_ALL = 0x07,
+ RB_INT_PARSE_DEFAULT = 0x07,
+};
+
+struct RBignum {
+ struct RBasic basic;
+ union {
+ struct {
+ size_t len;
+ BDIGIT *digits;
+ } heap;
+ BDIGIT ary[BIGNUM_EMBED_LEN_MAX];
+ } as;
+};
+
+/* bignum.c */
+extern const char ruby_digitmap[];
+double rb_big_fdiv_double(VALUE x, VALUE y);
+VALUE rb_big_uminus(VALUE x);
+VALUE rb_big_hash(VALUE);
+VALUE rb_big_odd_p(VALUE);
+VALUE rb_big_even_p(VALUE);
+size_t rb_big_size(VALUE);
+VALUE rb_integer_float_cmp(VALUE x, VALUE y);
+VALUE rb_integer_float_eq(VALUE x, VALUE y);
+VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
+VALUE rb_big_comp(VALUE x);
+VALUE rb_big_aref(VALUE x, VALUE y);
+VALUE rb_big_abs(VALUE x);
+VALUE rb_big_size_m(VALUE big);
+VALUE rb_big_bit_length(VALUE big);
+VALUE rb_big_remainder(VALUE x, VALUE y);
+VALUE rb_big_gt(VALUE x, VALUE y);
+VALUE rb_big_ge(VALUE x, VALUE y);
+VALUE rb_big_lt(VALUE x, VALUE y);
+VALUE rb_big_le(VALUE x, VALUE y);
+VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
+VALUE rb_big_isqrt(VALUE n);
+static inline bool BIGNUM_SIGN(VALUE b);
+static inline bool BIGNUM_POSITIVE_P(VALUE b);
+static inline bool BIGNUM_NEGATIVE_P(VALUE b);
+static inline void BIGNUM_SET_SIGN(VALUE b, bool sign);
+static inline void BIGNUM_NEGATE(VALUE b);
+static inline size_t BIGNUM_LEN(VALUE b);
+static inline BDIGIT *BIGNUM_DIGITS(VALUE b);
+static inline int BIGNUM_LENINT(VALUE b);
+static inline bool BIGNUM_EMBED_P(VALUE b);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* bignum.c (export) */
+VALUE rb_big_mul_normal(VALUE x, VALUE y);
+VALUE rb_big_mul_balance(VALUE x, VALUE y);
+VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
+VALUE rb_big_mul_toom3(VALUE x, VALUE y);
+VALUE rb_big_sq_fast(VALUE x);
+VALUE rb_big_divrem_normal(VALUE x, VALUE y);
+VALUE rb_big2str_poweroftwo(VALUE x, int base);
+VALUE rb_big2str_generic(VALUE x, int base);
+VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
+VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
+VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
+#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
+VALUE rb_big_mul_gmp(VALUE x, VALUE y);
+VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
+VALUE rb_big2str_gmp(VALUE x, int base);
+VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
+#endif
+VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+#if defined(HAVE_INT128_T)
+VALUE rb_int128t2big(int128_t n);
+#endif
+MJIT_SYMBOL_EXPORT_END
+
+/* sign: positive:1, negative:0 */
+static inline bool
+BIGNUM_SIGN(VALUE b)
+{
+ return FL_TEST_RAW(b, BIGNUM_SIGN_BIT);
+}
+
+static inline bool
+BIGNUM_POSITIVE_P(VALUE b)
+{
+ return BIGNUM_SIGN(b);
+}
+
+static inline bool
+BIGNUM_NEGATIVE_P(VALUE b)
+{
+ return ! BIGNUM_POSITIVE_P(b);
+}
+
+static inline void
+BIGNUM_SET_SIGN(VALUE b, bool sign)
+{
+ if (sign) {
+ FL_SET_RAW(b, BIGNUM_SIGN_BIT);
+ }
+ else {
+ FL_UNSET_RAW(b, BIGNUM_SIGN_BIT);
+ }
+}
+
+static inline void
+BIGNUM_NEGATE(VALUE b)
+{
+ FL_REVERSE_RAW(b, BIGNUM_SIGN_BIT);
+}
+
+static inline size_t
+BIGNUM_LEN(VALUE b)
+{
+ if (! BIGNUM_EMBED_P(b)) {
+ return RBIGNUM(b)->as.heap.len;
+ }
+ else {
+ size_t ret = RBASIC(b)->flags;
+ ret &= BIGNUM_EMBED_LEN_MASK;
+ ret >>= BIGNUM_EMBED_LEN_SHIFT;
+ return ret;
+ }
+}
+
+static inline int
+BIGNUM_LENINT(VALUE b)
+{
+ return rb_long2int(BIGNUM_LEN(b));
+}
+
+/* LSB:BIGNUM_DIGITS(b)[0], MSB:BIGNUM_DIGITS(b)[BIGNUM_LEN(b)-1] */
+static inline BDIGIT *
+BIGNUM_DIGITS(VALUE b)
+{
+ if (BIGNUM_EMBED_P(b)) {
+ return RBIGNUM(b)->as.ary;
+ }
+ else {
+ return RBIGNUM(b)->as.heap.digits;
+ }
+}
+
+static inline bool
+BIGNUM_EMBED_P(VALUE b)
+{
+ return FL_TEST_RAW(b, BIGNUM_EMBED_FLAG);
+}
+
+#endif /* INTERNAL_BIGNUM_H */
diff --git a/internal/bits.h b/internal/bits.h
new file mode 100644
index 0000000000..2602ff7a31
--- /dev/null
+++ b/internal/bits.h
@@ -0,0 +1,565 @@
+#ifndef INTERNAL_BITS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_BITS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for bitwise integer algorithms.
+ * @see Henry S. Warren Jr., "Hacker's Delight" (2nd ed.), 2013.
+ * @see SEI CERT C Coding Standard INT32-C. "Ensure that operations on
+ * signed integers do not result in overflow"
+ * @see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
+ * @see https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateleft
+ * @see https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateright
+ * @see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort
+ * @see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rotl-rotl64-rotr-rotr64
+ * @see https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64
+ * @see https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanreverse-bitscanreverse64
+ * @see https://docs.microsoft.com/en-us/cpp/intrinsics/lzcnt16-lzcnt-lzcnt64
+ * @see https://docs.microsoft.com/en-us/cpp/intrinsics/popcnt16-popcnt-popcnt64
+ * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_lzcnt_u32
+ * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_tzcnt_u32
+ * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rotl64
+ * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rotr64
+ * @see https://stackoverflow.com/a/776523
+ */
+#include "ruby/internal/config.h"
+#include <limits.h> /* for CHAR_BITS */
+#include <stdint.h> /* for uintptr_t */
+#include "internal/compilers.h" /* for MSC_VERSION_SINCE */
+
+#if MSC_VERSION_SINCE(1310)
+# include <stdlib.h> /* for _byteswap_uint64 */
+#endif
+
+#if defined(HAVE_X86INTRIN_H) && ! defined(MJIT_HEADER)
+# /* Rule out MJIT_HEADER, which does not interface well with <immintrin.h> */
+# include <x86intrin.h> /* for _lzcnt_u64 */
+#elif MSC_VERSION_SINCE(1310)
+# include <intrin.h> /* for the following intrinsics */
+#endif
+
+#if defined(_MSC_VER) && defined(__AVX__)
+# pragma intrinsic(__popcnt)
+# pragma intrinsic(__popcnt64)
+#endif
+
+#if defined(_MSC_VER) && defined(__AVX2__)
+# pragma intrinsic(__lzcnt)
+# pragma intrinsic(__lzcnt64)
+#endif
+
+#if MSC_VERSION_SINCE(1310)
+# pragma intrinsic(_rotl)
+# pragma intrinsic(_rotr)
+# ifdef _WIN64
+# pragma intrinsic(_rotl64)
+# pragma intrinsic(_rotr64)
+# endif
+#endif
+
+#if MSC_VERSION_SINCE(1400)
+# pragma intrinsic(_BitScanForward)
+# pragma intrinsic(_BitScanReverse)
+# ifdef _WIN64
+# pragma intrinsic(_BitScanForward64)
+# pragma intrinsic(_BitScanReverse64)
+# endif
+#endif
+
+#include "ruby/ruby.h" /* for VALUE */
+#include "internal/static_assert.h" /* for STATIC_ASSERT */
+
+/* The most significant bit of the lower part of half-long integer.
+ * If sizeof(long) == 4, this is 0x8000.
+ * If sizeof(long) == 8, this is 0x80000000.
+ */
+#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
+
+#define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1)
+
+#define SIGNED_INTEGER_MIN(T) \
+ ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : \
+ ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : \
+ ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : \
+ ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : \
+ 0))))
+
+#define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0)))
+
+#define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0)
+
+#if __has_builtin(__builtin_mul_overflow_p)
+# define MUL_OVERFLOW_P(a, b) \
+ __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
+#elif __has_builtin(__builtin_mul_overflow)
+# define MUL_OVERFLOW_P(a, b) \
+ __extension__ ({ __typeof__(a) c; __builtin_mul_overflow((a), (b), &c); })
+#endif
+
+#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
+ (a) == 0 ? 0 : \
+ (a) == -1 ? (b) < -(max) : \
+ (a) > 0 ? \
+ ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
+ ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
+
+#if __has_builtin(__builtin_mul_overflow_p)
+/* __builtin_mul_overflow_p can take bitfield */
+/* and GCC permits bitfields for integers other than int */
+# define MUL_OVERFLOW_FIXNUM_P(a, b) \
+ __extension__ ({ \
+ struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; \
+ __builtin_mul_overflow_p((a), (b), c.fixnum); \
+ })
+#else
+# define MUL_OVERFLOW_FIXNUM_P(a, b) \
+ MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
+#endif
+
+#ifdef MUL_OVERFLOW_P
+# define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
+# define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
+# define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_P(a, b)
+#else
+# define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LLONG_MIN, LLONG_MAX)
+# define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
+# define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
+#endif
+
+#ifdef HAVE_UINT128_T
+# define bit_length(x) \
+ (unsigned int) \
+ (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
+ sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : \
+ 128 - nlz_int128((uint128_t)(x)))
+#else
+# define bit_length(x) \
+ (unsigned int) \
+ (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
+ 64 - nlz_int64((uint64_t)(x)))
+#endif
+
+#ifndef swap16
+# define swap16 ruby_swap16
+#endif
+
+#ifndef swap32
+# define swap32 ruby_swap32
+#endif
+
+#ifndef swap64
+# define swap64 ruby_swap64
+#endif
+
+static inline uint16_t ruby_swap16(uint16_t);
+static inline uint32_t ruby_swap32(uint32_t);
+static inline uint64_t ruby_swap64(uint64_t);
+static inline unsigned nlz_int(unsigned x);
+static inline unsigned nlz_long(unsigned long x);
+static inline unsigned nlz_long_long(unsigned long long x);
+static inline unsigned nlz_intptr(uintptr_t x);
+static inline unsigned nlz_int32(uint32_t x);
+static inline unsigned nlz_int64(uint64_t x);
+#ifdef HAVE_UINT128_T
+static inline unsigned nlz_int128(uint128_t x);
+#endif
+static inline unsigned rb_popcount32(uint32_t x);
+static inline unsigned rb_popcount64(uint64_t x);
+static inline unsigned rb_popcount_intptr(uintptr_t x);
+static inline int ntz_int32(uint32_t x);
+static inline int ntz_int64(uint64_t x);
+static inline int ntz_intptr(uintptr_t x);
+static inline VALUE RUBY_BIT_ROTL(VALUE, int);
+static inline VALUE RUBY_BIT_ROTR(VALUE, int);
+
+static inline uint16_t
+ruby_swap16(uint16_t x)
+{
+#if __has_builtin(__builtin_bswap16)
+ return __builtin_bswap16(x);
+
+#elif MSC_VERSION_SINCE(1310)
+ return _byteswap_ushort(x);
+
+#else
+ return (x << 8) | (x >> 8);
+
+#endif
+}
+
+static inline uint32_t
+ruby_swap32(uint32_t x)
+{
+#if __has_builtin(__builtin_bswap32)
+ return __builtin_bswap32(x);
+
+#elif MSC_VERSION_SINCE(1310)
+ return _byteswap_ulong(x);
+
+#else
+ x = ((x & 0x0000FFFF) << 16) | ((x & 0xFFFF0000) >> 16);
+ x = ((x & 0x00FF00FF) << 8) | ((x & 0xFF00FF00) >> 8);
+ return x;
+
+#endif
+}
+
+static inline uint64_t
+ruby_swap64(uint64_t x)
+{
+#if __has_builtin(__builtin_bswap64)
+ return __builtin_bswap64(x);
+
+#elif MSC_VERSION_SINCE(1310)
+ return _byteswap_uint64(x);
+
+#else
+ x = ((x & 0x00000000FFFFFFFFULL) << 32) | ((x & 0xFFFFFFFF00000000ULL) >> 32);
+ x = ((x & 0x0000FFFF0000FFFFULL) << 16) | ((x & 0xFFFF0000FFFF0000ULL) >> 16);
+ x = ((x & 0x00FF00FF00FF00FFULL) << 8) | ((x & 0xFF00FF00FF00FF00ULL) >> 8);
+ return x;
+
+#endif
+}
+
+static inline unsigned int
+nlz_int32(uint32_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX2__)
+ /* Note: It seems there is no such thing like __LZCNT__ predefined in MSVC.
+ * AMD CPUs have had this instruction for decades (since K10) but for
+ * Intel, Haswell is the oldest one. We need to use __AVX2__ for maximum
+ * safety. */
+ return (unsigned int)__lzcnt(x);
+
+#elif defined(__x86_64__) && defined(__LZCNT__) && ! defined(MJIT_HEADER)
+ return (unsigned int)_lzcnt_u32(x);
+
+#elif MSC_VERSION_SINCE(1400) /* &&! defined(__AVX2__) */
+ unsigned long r;
+ return _BitScanReverse(&r, x) ? (31 - (int)r) : 32;
+
+#elif __has_builtin(__builtin_clz)
+ STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32);
+ return x ? (unsigned int)__builtin_clz(x) : 32;
+
+#else
+ uint32_t y;
+ unsigned n = 32;
+ y = x >> 16; if (y) {n -= 16; x = y;}
+ y = x >> 8; if (y) {n -= 8; x = y;}
+ y = x >> 4; if (y) {n -= 4; x = y;}
+ y = x >> 2; if (y) {n -= 2; x = y;}
+ y = x >> 1; if (y) {return n - 2;}
+ return (unsigned int)(n - x);
+#endif
+}
+
+static inline unsigned int
+nlz_int64(uint64_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX2__)
+ return (unsigned int)__lzcnt64(x);
+
+#elif defined(__x86_64__) && defined(__LZCNT__) && ! defined(MJIT_HEADER)
+ return (unsigned int)_lzcnt_u64(x);
+
+#elif defined(_WIN64) && MSC_VERSION_SINCE(1400) /* &&! defined(__AVX2__) */
+ unsigned long r;
+ return _BitScanReverse64(&r, x) ? (63u - (unsigned int)r) : 64;
+
+#elif __has_builtin(__builtin_clzl)
+ if (x == 0) {
+ return 64;
+ }
+ else if (sizeof(long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_clzl((unsigned long)x);
+ }
+ else if (sizeof(long long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_clzll((unsigned long long)x);
+ }
+ else {
+ /* :FIXME: Is there a way to make this branch a compile-time error? */
+ UNREACHABLE_RETURN(~0);
+ }
+
+#else
+ uint64_t y;
+ unsigned int n = 64;
+ y = x >> 32; if (y) {n -= 32; x = y;}
+ y = x >> 16; if (y) {n -= 16; x = y;}
+ y = x >> 8; if (y) {n -= 8; x = y;}
+ y = x >> 4; if (y) {n -= 4; x = y;}
+ y = x >> 2; if (y) {n -= 2; x = y;}
+ y = x >> 1; if (y) {return n - 2;}
+ return (unsigned int)(n - x);
+
+#endif
+}
+
+#ifdef HAVE_UINT128_T
+static inline unsigned int
+nlz_int128(uint128_t x)
+{
+ uint64_t y = (uint64_t)(x >> 64);
+
+ if (x == 0) {
+ return 128;
+ }
+ else if (y == 0) {
+ return (unsigned int)nlz_int64(x) + 64;
+ }
+ else {
+ return (unsigned int)nlz_int64(y);
+ }
+}
+#endif
+
+static inline unsigned int
+nlz_int(unsigned int x)
+{
+ if (sizeof(unsigned int) * CHAR_BIT == 32) {
+ return nlz_int32((uint32_t)x);
+ }
+ else if (sizeof(unsigned int) * CHAR_BIT == 64) {
+ return nlz_int64((uint64_t)x);
+ }
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline unsigned int
+nlz_long(unsigned long x)
+{
+ if (sizeof(unsigned long) * CHAR_BIT == 32) {
+ return nlz_int32((uint32_t)x);
+ }
+ else if (sizeof(unsigned long) * CHAR_BIT == 64) {
+ return nlz_int64((uint64_t)x);
+ }
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline unsigned int
+nlz_long_long(unsigned long long x)
+{
+ if (sizeof(unsigned long long) * CHAR_BIT == 64) {
+ return nlz_int64((uint64_t)x);
+ }
+#ifdef HAVE_UINT128_T
+ else if (sizeof(unsigned long long) * CHAR_BIT == 128) {
+ return nlz_int128((uint128_t)x);
+ }
+#endif
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline unsigned int
+nlz_intptr(uintptr_t x)
+{
+ if (sizeof(uintptr_t) == sizeof(unsigned int)) {
+ return nlz_int((unsigned int)x);
+ }
+ if (sizeof(uintptr_t) == sizeof(unsigned long)) {
+ return nlz_long((unsigned long)x);
+ }
+ if (sizeof(uintptr_t) == sizeof(unsigned long long)) {
+ return nlz_long_long((unsigned long long)x);
+ }
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline unsigned int
+rb_popcount32(uint32_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX__)
+ /* Note: CPUs since Nehalem and Barcelona have had this instruction so SSE
+ * 4.2 should suffice, but it seems there is no such thing like __SSE_4_2__
+ * predefined macro in MSVC. They do have __AVX__ so use it instead. */
+ return (unsigned int)__popcnt(x);
+
+#elif __has_builtin(__builtin_popcount)
+ STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT >= 32);
+ return (unsigned int)__builtin_popcount(x);
+
+#else
+ x = (x & 0x55555555) + (x >> 1 & 0x55555555);
+ x = (x & 0x33333333) + (x >> 2 & 0x33333333);
+ x = (x & 0x0f0f0f0f) + (x >> 4 & 0x0f0f0f0f);
+ x = (x & 0x001f001f) + (x >> 8 & 0x001f001f);
+ x = (x & 0x0000003f) + (x >>16 & 0x0000003f);
+ return (unsigned int)x;
+
+#endif
+}
+
+static inline unsigned int
+rb_popcount64(uint64_t x)
+{
+#if defined(_MSC_VER) && defined(__AVX__)
+ return (unsigned int)__popcnt64(x);
+
+#elif __has_builtin(__builtin_popcount)
+ if (sizeof(long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_popcountl((unsigned long)x);
+ }
+ else if (sizeof(long long) * CHAR_BIT == 64) {
+ return (unsigned int)__builtin_popcountll((unsigned long long)x);
+ }
+ else {
+ /* :FIXME: Is there a way to make this branch a compile-time error? */
+ UNREACHABLE_RETURN(~0);
+ }
+
+#else
+ x = (x & 0x5555555555555555) + (x >> 1 & 0x5555555555555555);
+ x = (x & 0x3333333333333333) + (x >> 2 & 0x3333333333333333);
+ x = (x & 0x0707070707070707) + (x >> 4 & 0x0707070707070707);
+ x = (x & 0x001f001f001f001f) + (x >> 8 & 0x001f001f001f001f);
+ x = (x & 0x0000003f0000003f) + (x >>16 & 0x0000003f0000003f);
+ x = (x & 0x000000000000007f) + (x >>32 & 0x000000000000007f);
+ return (unsigned int)x;
+
+#endif
+}
+
+static inline unsigned int
+rb_popcount_intptr(uintptr_t x)
+{
+ if (sizeof(uintptr_t) * CHAR_BIT == 64) {
+ return rb_popcount64((uint64_t)x);
+ }
+ else if (sizeof(uintptr_t) * CHAR_BIT == 32) {
+ return rb_popcount32((uint32_t)x);
+ }
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline int
+ntz_int32(uint32_t x)
+{
+#if defined(__x86_64__) && defined(__BMI__) && ! defined(MJIT_HEADER)
+ return (unsigned)_tzcnt_u32(x);
+
+#elif MSC_VERSION_SINCE(1400)
+ /* :FIXME: Is there any way to issue TZCNT instead of BSF, apart from using
+ * assembly? Because issuing LZCNT seems possible (see nlz.h). */
+ unsigned long r;
+ return _BitScanForward(&r, x) ? (int)r : 32;
+
+#elif __has_builtin(__builtin_ctz)
+ STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32);
+ return x ? (unsigned)__builtin_ctz(x) : 32;
+
+#else
+ return rb_popcount32((~x) & (x-1));
+
+#endif
+}
+
+static inline int
+ntz_int64(uint64_t x)
+{
+#if defined(__x86_64__) && defined(__BMI__) && ! defined(MJIT_HEADER)
+ return (unsigned)_tzcnt_u64(x);
+
+#elif defined(_WIN64) && MSC_VERSION_SINCE(1400)
+ unsigned long r;
+ return _BitScanForward64(&r, x) ? (int)r : 64;
+
+#elif __has_builtin(__builtin_ctzl)
+ if (x == 0) {
+ return 64;
+ }
+ else if (sizeof(long) * CHAR_BIT == 64) {
+ return (unsigned)__builtin_ctzl((unsigned long)x);
+ }
+ else if (sizeof(long long) * CHAR_BIT == 64) {
+ return (unsigned)__builtin_ctzll((unsigned long long)x);
+ }
+ else {
+ /* :FIXME: Is there a way to make this branch a compile-time error? */
+ UNREACHABLE_RETURN(~0);
+ }
+
+#else
+ return rb_popcount64((~x) & (x-1));
+
+#endif
+}
+
+static inline int
+ntz_intptr(uintptr_t x)
+{
+ if (sizeof(uintptr_t) * CHAR_BIT == 64) {
+ return ntz_int64((uint64_t)x);
+ }
+ else if (sizeof(uintptr_t) * CHAR_BIT == 32) {
+ return ntz_int32((uint32_t)x);
+ }
+ else {
+ UNREACHABLE_RETURN(~0);
+ }
+}
+
+static inline VALUE
+RUBY_BIT_ROTL(VALUE v, int n)
+{
+#if __has_builtin(__builtin_rotateleft32) && (SIZEOF_VALUE * CHAR_BIT == 32)
+ return __builtin_rotateleft32(v, n);
+
+#elif __has_builtin(__builtin_rotateleft64) && (SIZEOF_VALUE * CHAR_BIT == 64)
+ return __builtin_rotateleft64(v, n);
+
+#elif MSC_VERSION_SINCE(1310) && (SIZEOF_VALUE * CHAR_BIT == 32)
+ return _rotl(v, n);
+
+#elif MSC_VERSION_SINCE(1310) && (SIZEOF_VALUE * CHAR_BIT == 64)
+ return _rotl64(v, n);
+
+#elif defined(_lrotl) && (SIZEOF_VALUE == SIZEOF_LONG)
+ return _lrotl(v, n);
+
+#else
+ const int m = (sizeof(VALUE) * CHAR_BIT) - 1;
+ return (v << (n & m)) | (v >> (-n & m));
+#endif
+}
+
+static inline VALUE
+RUBY_BIT_ROTR(VALUE v, int n)
+{
+#if __has_builtin(__builtin_rotateright32) && (SIZEOF_VALUE * CHAR_BIT == 32)
+ return __builtin_rotateright32(v, n);
+
+#elif __has_builtin(__builtin_rotateright64) && (SIZEOF_VALUE * CHAR_BIT == 64)
+ return __builtin_rotateright64(v, n);
+
+#elif MSC_VERSION_SINCE(1310) && (SIZEOF_VALUE * CHAR_BIT == 32)
+ return _rotr(v, n);
+
+#elif MSC_VERSION_SINCE(1310) && (SIZEOF_VALUE * CHAR_BIT == 64)
+ return _rotr64(v, n);
+
+#elif defined(_lrotr) && (SIZEOF_VALUE == SIZEOF_LONG)
+ return _lrotr(v, n);
+
+#else
+ const int m = (sizeof(VALUE) * CHAR_BIT) - 1;
+ return (v << (-n & m)) | (v >> (n & m));
+#endif
+}
+
+#endif /* INTERNAL_BITS_H */
diff --git a/internal/class.h b/internal/class.h
new file mode 100644
index 0000000000..63917e867f
--- /dev/null
+++ b/internal/class.h
@@ -0,0 +1,187 @@
+#ifndef INTERNAL_CLASS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_CLASS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Class.
+ */
+#include "id_table.h" /* for struct rb_id_table */
+#include "internal/gc.h" /* for RB_OBJ_WRITE */
+#include "internal/serial.h" /* for rb_serial_t */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/intern.h" /* for rb_alloc_func_t */
+#include "ruby/ruby.h" /* for struct RBasic */
+#include "shape.h"
+#include "ruby_assert.h"
+#include "vm_core.h"
+#include "method.h" /* for rb_cref_t */
+
+#ifdef RCLASS_SUPER
+# undef RCLASS_SUPER
+#endif
+
+struct rb_subclass_entry {
+ VALUE klass;
+ struct rb_subclass_entry *next;
+ struct rb_subclass_entry *prev;
+};
+
+struct rb_cvar_class_tbl_entry {
+ uint32_t index;
+ rb_serial_t global_cvar_state;
+ const rb_cref_t * cref;
+ VALUE class_value;
+};
+
+struct rb_classext_struct {
+ VALUE *iv_ptr;
+ struct rb_id_table *const_tbl;
+ struct rb_id_table *callable_m_tbl;
+ struct rb_id_table *cc_tbl; /* ID -> [[ci, cc1], cc2, ...] */
+ struct rb_id_table *cvc_tbl;
+ size_t superclass_depth;
+ VALUE *superclasses;
+ struct rb_subclass_entry *subclasses;
+ struct rb_subclass_entry *subclass_entry;
+ /**
+ * In the case that this is an `ICLASS`, `module_subclasses` points to the link
+ * in the module's `subclasses` list that indicates that the klass has been
+ * included. Hopefully that makes sense.
+ */
+ struct rb_subclass_entry *module_subclass_entry;
+ const VALUE origin_;
+ const VALUE refined_class;
+ rb_alloc_func_t allocator;
+ const VALUE includer;
+ uint32_t max_iv_count;
+ uint32_t variation_count;
+#if !SHAPE_IN_BASIC_FLAGS
+ shape_id_t shape_id;
+#endif
+};
+
+struct RClass {
+ struct RBasic basic;
+ VALUE super;
+ struct rb_id_table *m_tbl;
+#if SIZE_POOL_COUNT == 1
+ struct rb_classext_struct *ptr;
+#endif
+};
+
+typedef struct rb_subclass_entry rb_subclass_entry_t;
+typedef struct rb_classext_struct rb_classext_t;
+
+#if RCLASS_EXT_EMBEDDED
+# define RCLASS_EXT(c) ((rb_classext_t *)((char *)(c) + sizeof(struct RClass)))
+#else
+# define RCLASS_EXT(c) (RCLASS(c)->ptr)
+#endif
+#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
+#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
+#define RCLASS_IVPTR(c) (RCLASS_EXT(c)->iv_ptr)
+#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
+#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
+#define RCLASS_CVC_TBL(c) (RCLASS_EXT(c)->cvc_tbl)
+#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
+#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
+#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
+#define RCLASS_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->subclass_entry)
+#define RCLASS_MODULE_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->module_subclass_entry)
+#define RCLASS_ALLOCATOR(c) (RCLASS_EXT(c)->allocator)
+#define RCLASS_SUBCLASSES(c) (RCLASS_EXT(c)->subclasses)
+#define RCLASS_SUPERCLASS_DEPTH(c) (RCLASS_EXT(c)->superclass_depth)
+#define RCLASS_SUPERCLASSES(c) (RCLASS_EXT(c)->superclasses)
+
+#define RICLASS_IS_ORIGIN FL_USER0
+#define RCLASS_CLONED FL_USER1
+#define RCLASS_SUPERCLASSES_INCLUDE_SELF FL_USER2
+#define RICLASS_ORIGIN_SHARED_MTBL FL_USER3
+
+/* class.c */
+void rb_class_subclass_add(VALUE super, VALUE klass);
+void rb_class_remove_from_super_subclasses(VALUE);
+void rb_class_update_superclasses(VALUE);
+size_t rb_class_superclasses_memsize(VALUE);
+void rb_class_remove_subclass_head(VALUE);
+int rb_singleton_class_internal_p(VALUE sklass);
+VALUE rb_class_boot(VALUE);
+VALUE rb_class_s_alloc(VALUE klass);
+VALUE rb_module_s_alloc(VALUE klass);
+void rb_module_set_initialized(VALUE module);
+void rb_module_check_initializable(VALUE module);
+VALUE rb_make_metaclass(VALUE, VALUE);
+VALUE rb_include_class_new(VALUE, VALUE);
+void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
+void rb_class_detach_subclasses(VALUE);
+void rb_class_detach_module_subclasses(VALUE);
+void rb_class_remove_from_module_subclasses(VALUE);
+VALUE rb_define_class_id_under_no_pin(VALUE outer, ID id, VALUE super);
+VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
+VALUE rb_class_undefined_instance_methods(VALUE mod);
+VALUE rb_special_singleton_class(VALUE);
+VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
+VALUE rb_singleton_class_get(VALUE obj);
+void rb_undef_methods_from(VALUE klass, VALUE super);
+
+static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
+static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
+static inline VALUE RCLASS_SUPER(VALUE klass);
+static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
+static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_class_inherited(VALUE, VALUE);
+VALUE rb_keyword_error_new(const char *, VALUE);
+MJIT_SYMBOL_EXPORT_END
+
+static inline void
+RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
+{
+ RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
+ if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
+}
+
+static inline void
+RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
+{
+ FL_SET(iclass, RICLASS_ORIGIN_SHARED_MTBL);
+}
+
+static inline bool
+RICLASS_OWNS_M_TBL_P(VALUE iclass)
+{
+ return FL_TEST_RAW(iclass, RICLASS_IS_ORIGIN | RICLASS_ORIGIN_SHARED_MTBL) == RICLASS_IS_ORIGIN;
+}
+
+static inline void
+RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
+{
+ RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
+}
+
+static inline VALUE
+RCLASS_SUPER(VALUE klass)
+{
+ return RCLASS(klass)->super;
+}
+
+static inline VALUE
+RCLASS_SET_SUPER(VALUE klass, VALUE super)
+{
+ if (super) {
+ rb_class_remove_from_super_subclasses(klass);
+ rb_class_subclass_add(super, klass);
+ }
+ RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
+ rb_class_update_superclasses(klass);
+ return super;
+}
+
+#endif /* INTERNAL_CLASS_H */
diff --git a/internal/cmdlineopt.h b/internal/cmdlineopt.h
new file mode 100644
index 0000000000..bf52f1214b
--- /dev/null
+++ b/internal/cmdlineopt.h
@@ -0,0 +1,61 @@
+#ifndef INTERNAL_CMDLINEOPT_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_CMDLINEOPT_H
+
+#include "mjit.h"
+#include "yjit.h"
+
+typedef struct {
+ unsigned int mask;
+ unsigned int set;
+} ruby_features_t;
+
+typedef struct ruby_cmdline_options {
+ const char *script;
+ VALUE script_name;
+ VALUE e_script;
+ struct {
+ struct {
+ VALUE name;
+ int index;
+ } enc;
+ } src, ext, intern;
+ VALUE req_list;
+ ruby_features_t features;
+ ruby_features_t warn;
+ unsigned int dump;
+#if USE_MJIT
+ struct mjit_options mjit;
+#endif
+
+ int sflag, xflag;
+ unsigned int warning: 1;
+ unsigned int verbose: 1;
+ unsigned int do_loop: 1;
+ unsigned int do_print: 1;
+ unsigned int do_line: 1;
+ unsigned int do_split: 1;
+ unsigned int do_search: 1;
+ unsigned int setids: 2;
+#if USE_YJIT
+ unsigned int yjit: 1;
+#endif
+} ruby_cmdline_options_t;
+
+struct ruby_opt_message {
+ const char *str;
+ unsigned short namelen, secondlen;
+};
+
+#define RUBY_OPT_MESSAGE(shortopt, longopt, desc) { \
+ shortopt " " longopt " " desc, \
+ (unsigned short)sizeof(shortopt), \
+ (unsigned short)sizeof(longopt), \
+}
+
+#define opt_match(s, l, name) \
+ ((((l) > rb_strlen_lit(name)) ? (s)[rb_strlen_lit(name)] == '=' : \
+ (l) == rb_strlen_lit(name)) && \
+ memcmp((s), name, rb_strlen_lit(name)) == 0 && \
+ (((s) += rb_strlen_lit(name)), 1))
+
+#endif
diff --git a/internal/compar.h b/internal/compar.h
new file mode 100644
index 0000000000..9115e4bd63
--- /dev/null
+++ b/internal/compar.h
@@ -0,0 +1,29 @@
+#ifndef INTERNAL_COMPAR_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_COMPAR_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Comparable.
+ */
+#include "internal/basic_operators.h"
+
+#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
+
+#define CMP_OPTIMIZABLE(type) BASIC_OP_UNREDEFINED_P(BOP_CMP, type##_REDEFINED_OP_FLAG)
+
+#define OPTIMIZED_CMP(a, b) \
+ ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(INTEGER)) ? \
+ (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : \
+ (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(STRING)) ? \
+ rb_str_cmp(a, b) : \
+ (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(FLOAT)) ? \
+ rb_float_cmp(a, b) : \
+ rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
+
+/* compar.c */
+VALUE rb_invcmp(VALUE, VALUE);
+
+#endif /* INTERNAL_COMPAR_H */
diff --git a/internal/compile.h b/internal/compile.h
new file mode 100644
index 0000000000..d32c2233c9
--- /dev/null
+++ b/internal/compile.h
@@ -0,0 +1,35 @@
+#ifndef INTERNAL_COMPILE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_COMPILE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for the compiler.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "ruby/ruby.h" /* for rb_event_flag_t */
+
+struct rb_iseq_struct; /* in vm_core.h */
+
+/* compile.c */
+int rb_dvar_defined(ID, const struct rb_iseq_struct *);
+int rb_local_defined(ID, const struct rb_iseq_struct *);
+const char *rb_insns_name(int i);
+VALUE rb_insns_name_array(void);
+int rb_iseq_cdhash_cmp(VALUE val, VALUE lit);
+st_index_t rb_iseq_cdhash_hash(VALUE a);
+
+/* iseq.c */
+int rb_vm_insn_addr2insn(const void *);
+int rb_vm_insn_decode(const VALUE encoded);
+extern bool ruby_vm_keep_script_lines;
+
+MJIT_SYMBOL_EXPORT_BEGIN
+/* iseq.c (export) */
+rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos);
+MJIT_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_COMPILE_H */
diff --git a/internal/compilers.h b/internal/compilers.h
new file mode 100644
index 0000000000..26c2f05cc0
--- /dev/null
+++ b/internal/compilers.h
@@ -0,0 +1,107 @@
+#ifndef INTERNAL_COMPILERS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_COMPILERS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header absorbing C compiler differences.
+ */
+#include "ruby/internal/compiler_since.h"
+#include "ruby/internal/has/attribute.h"
+#include "ruby/internal/has/builtin.h"
+#include "ruby/internal/has/c_attribute.h"
+#include "ruby/internal/has/declspec_attribute.h"
+#include "ruby/internal/has/extension.h"
+#include "ruby/internal/has/feature.h"
+#include "ruby/internal/has/warning.h"
+#include "ruby/backward/2/gcc_version_since.h"
+
+#define MSC_VERSION_SINCE(_) RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
+#define MSC_VERSION_BEFORE(_) RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
+
+#ifndef __has_attribute
+# define __has_attribute(...) RBIMPL_HAS_ATTRIBUTE(__VA_ARGS__)
+#endif
+
+#ifndef __has_c_attribute
+# /* As of writing everything that lacks __has_c_attribute also completely
+# * lacks C2x attributes as well. Might change in future? */
+# define __has_c_attribute(...) 0
+#endif
+
+#ifndef __has_declspec_attribute
+# define __has_declspec_attribute(...) RBIMPL_HAS_DECLSPEC_ATTRIBUTE(__VA_ARGS__)
+#endif
+
+#ifndef __has_builtin
+# define __has_builtin(...) RBIMPL_HAS_BUILTIN(__VA_ARGS__)
+#endif
+
+#ifndef __has_feature
+# define __has_feature(...) RBIMPL_HAS_FEATURE(__VA_ARGS__)
+#endif
+
+#ifndef __has_extension
+# define __has_extension(...) RBIMPL_HAS_EXTENSION(__VA_ARGS__)
+#endif
+
+#ifndef __has_warning
+# define __has_warning(...) RBIMPL_HAS_WARNING(__VA_ARGS__)
+#endif
+
+#ifndef __GNUC__
+# define __extension__ /* void */
+#endif
+
+#ifndef MAYBE_UNUSED
+# define MAYBE_UNUSED(x) x
+#endif
+
+#ifndef WARN_UNUSED_RESULT
+# define WARN_UNUSED_RESULT(x) x
+#endif
+
+#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
+#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
+#ifdef __GNUC__
+#define rb_obj_builtin_type(obj) \
+__extension__({ \
+ VALUE arg_obj = (obj); \
+ RB_SPECIAL_CONST_P(arg_obj) ? -1 : \
+ (int)RB_BUILTIN_TYPE(arg_obj); \
+ })
+#else
+# include "ruby/ruby.h"
+static inline int
+rb_obj_builtin_type(VALUE obj)
+{
+ return RB_SPECIAL_CONST_P(obj) ? -1 :
+ (int)RB_BUILTIN_TYPE(obj);
+}
+#endif
+
+/* A macro for defining a flexible array, like: VALUE ary[FLEX_ARY_LEN]; */
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define FLEX_ARY_LEN /* VALUE ary[]; */
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
+# define FLEX_ARY_LEN 0 /* VALUE ary[0]; */
+#else
+# define FLEX_ARY_LEN 1 /* VALUE ary[1]; */
+#endif
+
+/*
+ * For declaring bitfields out of non-unsigned int types:
+ * struct date {
+ * BITFIELD(enum months, month, 4);
+ * ...
+ * };
+ */
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define BITFIELD(type, name, size) type name : size
+#else
+# define BITFIELD(type, name, size) unsigned int name : size
+#endif
+
+#endif /* INTERNAL_COMPILERS_H */
diff --git a/internal/complex.h b/internal/complex.h
new file mode 100644
index 0000000000..42151652b7
--- /dev/null
+++ b/internal/complex.h
@@ -0,0 +1,29 @@
+#ifndef INTERNAL_COMPLEX_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_COMPLEX_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Complex.
+ */
+#include "ruby/internal/value.h" /* for struct RBasic */
+
+struct RComplex {
+ struct RBasic basic;
+ VALUE real;
+ VALUE imag;
+};
+
+#define RCOMPLEX(obj) ((struct RComplex *)(obj))
+
+/* shortcut macro for internal only */
+#define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->real, (r))
+#define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->imag, (i))
+
+/* complex.c */
+VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
+st_index_t rb_complex_hash(VALUE comp);
+
+#endif /* INTERNAL_COMPLEX_H */
diff --git a/internal/cont.h b/internal/cont.h
new file mode 100644
index 0000000000..c3b091668a
--- /dev/null
+++ b/internal/cont.h
@@ -0,0 +1,32 @@
+#ifndef INTERNAL_CONT_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_CONT_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Fiber.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "iseq.h"
+
+struct rb_thread_struct; /* in vm_core.h */
+struct rb_fiber_struct; /* in cont.c */
+struct rb_execution_context_struct; /* in vm_core.c */
+
+/* cont.c */
+void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
+void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
+void rb_jit_cont_init(void);
+void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
+void rb_jit_cont_finish(void);
+
+// Copy locals from the current execution to the specified fiber.
+VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
+
+VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
+unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
+struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber);
+
+#endif /* INTERNAL_CONT_H */
diff --git a/internal/dir.h b/internal/dir.h
new file mode 100644
index 0000000000..0a4dc90ece
--- /dev/null
+++ b/internal/dir.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_DIR_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_DIR_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Dir.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* dir.c */
+VALUE rb_dir_getwd_ospath(void);
+
+#endif /* INTERNAL_DIR_H */
diff --git a/internal/enc.h b/internal/enc.h
new file mode 100644
index 0000000000..a005dc810d
--- /dev/null
+++ b/internal/enc.h
@@ -0,0 +1,19 @@
+#ifndef INTERNAL_ENC_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ENC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Encoding.
+ */
+#include "ruby/encoding.h" /* for rb_encoding */
+
+/* us_ascii.c */
+extern rb_encoding OnigEncodingUS_ASCII;
+
+/* utf_8.c */
+extern rb_encoding OnigEncodingUTF_8;
+
+#endif /* INTERNAL_ENC_H */
diff --git a/internal/encoding.h b/internal/encoding.h
new file mode 100644
index 0000000000..a3b81bd388
--- /dev/null
+++ b/internal/encoding.h
@@ -0,0 +1,32 @@
+#ifndef INTERNAL_ENCODING_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ENCODING_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Encoding.
+ */
+#include "ruby/ruby.h" /* for ID */
+#include "ruby/encoding.h" /* for rb_encoding */
+
+#define rb_enc_autoload_p(enc) (!rb_enc_mbmaxlen(enc))
+#define rb_is_usascii_enc(enc) ((enc) == rb_usascii_encoding())
+#define rb_is_ascii8bit_enc(enc) ((enc) == rb_ascii8bit_encoding())
+#define rb_is_locale_enc(enc) ((enc) == rb_locale_encoding())
+
+/* encoding.c */
+ID rb_id_encoding(void);
+rb_encoding *rb_enc_get_from_index(int index);
+rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
+int rb_encdb_replicate(const char *alias, const char *orig);
+int rb_encdb_alias(const char *alias, const char *orig);
+int rb_enc_autoload(rb_encoding *enc);
+int rb_encdb_dummy(const char *name);
+void rb_encdb_declare(const char *name);
+void rb_enc_set_base(const char *name, const char *orig);
+int rb_enc_set_dummy(int index);
+PUREFUNC(int rb_data_is_encoding(VALUE obj));
+
+#endif /* INTERNAL_ENCODING_H */
diff --git a/internal/enum.h b/internal/enum.h
new file mode 100644
index 0000000000..282464436f
--- /dev/null
+++ b/internal/enum.h
@@ -0,0 +1,18 @@
+#ifndef INTERNAL_ENUM_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ENUM_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Enumerable.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* enum.c */
+extern VALUE rb_cArithSeq;
+VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
+VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
+
+#endif /* INTERNAL_ENUM_H */
diff --git a/internal/enumerator.h b/internal/enumerator.h
new file mode 100644
index 0000000000..e11a684c5b
--- /dev/null
+++ b/internal/enumerator.h
@@ -0,0 +1,21 @@
+#ifndef INTERNAL_ENUMERATOR_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ENUMERATOR_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Enumerator.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/intern.h" /* for rb_enumerator_size_func */
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* enumerator.c (export) */
+VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
+ rb_enumerator_size_func *size_fn,
+ VALUE beg, VALUE end, VALUE step, int excl);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_ENUMERATOR_H */
diff --git a/internal/error.h b/internal/error.h
new file mode 100644
index 0000000000..11601858f4
--- /dev/null
+++ b/internal/error.h
@@ -0,0 +1,191 @@
+#ifndef INTERNAL_ERROR_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_ERROR_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Exception.
+ */
+#include "ruby/internal/config.h"
+#include <stdarg.h> /* for va_list */
+#include "internal/string.h" /* for rb_fstring_cstr */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/encoding.h" /* for rb_encoding */
+#include "ruby/intern.h" /* for rb_exc_raise */
+#include "ruby/ruby.h" /* for enum ruby_value_type */
+
+#ifdef Check_Type
+# undef Check_Type /* in ruby/ruby.h */
+#endif
+
+#ifdef rb_raise_static
+# undef rb_raise_static
+# undef rb_sys_fail_path
+# undef rb_syserr_fail_path
+#endif
+
+#define rb_raise_static(e, m) \
+ rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
+#ifdef RUBY_FUNCTION_NAME_STRING
+# define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
+# define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
+# define rb_syserr_new_path(err, path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
+#else
+# define rb_sys_fail_path(path) rb_sys_fail_str(path)
+# define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
+# define rb_syserr_new_path(err, path) rb_syserr_new_str((err), (path))
+#endif
+
+/* error.c */
+extern long rb_backtrace_length_limit;
+extern VALUE rb_eEAGAIN;
+extern VALUE rb_eEWOULDBLOCK;
+extern VALUE rb_eEINPROGRESS;
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 0)
+void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
+NORETURN(void rb_async_bug_errno(const char *,int));
+const char *rb_builtin_type_name(int t);
+const char *rb_builtin_class_name(VALUE x);
+PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
+PRINTF_ARGS(void rb_warn_deprecated_to_remove(const char *removal, const char *fmt, const char *suggest, ...), 2, 4);
+#if RUBY_DEBUG
+# include "ruby/version.h"
+# define RUBY_VERSION_SINCE(major, minor) (RUBY_API_VERSION_CODE >= (major * 10000) + (minor) * 100)
+# define RUBY_VERSION_BEFORE(major, minor) (RUBY_API_VERSION_CODE < (major * 10000) + (minor) * 100)
+# if defined(RBIMPL_WARNING_PRAGMA0)
+# define RBIMPL_TODO0(x) RBIMPL_WARNING_PRAGMA0(message(x))
+# elif RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
+# define RBIMPL_TODO0(x) __pragma(message(x))
+# endif
+
+# if RBIMPL_HAS_ATTRIBUTE(diagnose_if) || defined(__OPTIMIZE__)
+
+#define RUBY_VERSION_isdigit(c) ('0'<=(c)&&(c)<='9')
+// upto 99
+#define RUBY_VERSION__number_len(v, ofs) \
+ (!RUBY_VERSION_isdigit((v)[ofs]) ? \
+ 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? 1 : 2)
+#define RUBY_VERSION__to_number(v, ofs) \
+ (!RUBY_VERSION_isdigit((v)[ofs]) ? \
+ 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? \
+ ((v)[ofs]-'0') : \
+ (((v)[ofs]-'0')*10+(v)[(ofs)+1]-'0'))
+
+#define RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v) \
+ (RUBY_VERSION__to_number(v, 0) * 10000 + \
+ ((v)[RUBY_VERSION__number_len(v, 0)] == '.' ? \
+ RUBY_VERSION__to_number(v, RUBY_VERSION__number_len(v, 0)+1) * 100 : 0))
+#define RUBY_VERSION_STRING_SINCE(v) (RUBY_API_VERSION_CODE >= RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v))
+#define RUBY_VERSION_STRING_BEFORE(v) (RUBY_API_VERSION_CODE < RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v))
+
+# if RBIMPL_HAS_ATTRIBUTE(diagnose_if)
+RBIMPL_ATTR_FORCEINLINE()
+static void
+rb_deprecated_method_to_be_removed(const char *removal)
+ RBIMPL_ATTR_DIAGNOSE_IF(!RUBY_VERSION_isdigit(removal[0]), "malformed version number", "error")
+ RBIMPL_ATTR_DIAGNOSE_IF(RUBY_VERSION_STRING_SINCE(removal), "deprecated method to be removed", "error")
+{
+}
+# else
+RBIMPL_ATTR_ERROR(("deprecated"))
+void rb_deprecated_method_to_be_removed(const char *);
+# define rb_deprecated_method_to_be_removed(removal) \
+ (sizeof(char[1-2*(!RUBY_VERSION_isdigit(removal[0]) || RUBY_VERSION_STRING_SINCE(removal))])!=1 ? \
+ rb_deprecated_method_to_be_removed(removal) : \
+ RBIMPL_ASSERT_NOTHING)
+# endif
+# define rb_warn_deprecated_to_remove_at(removal, ...) \
+ (rb_deprecated_method_to_be_removed(#removal), \
+ rb_warn_deprecated_to_remove(#removal, __VA_ARGS__))
+# endif
+#endif
+#ifndef rb_warn_deprecated_to_remove_at
+# define rb_warn_deprecated_to_remove_at(removal, ...) \
+ rb_warn_deprecated_to_remove(#removal, __VA_ARGS__)
+#endif
+#ifndef RUBY_VERSION_SINCE
+# define RUBY_VERSION_SINCE(major, minor) 0
+#endif
+#ifndef RUBY_VERSION_BEFORE
+# define RUBY_VERSION_BEFORE(major, minor) 0
+#endif
+#ifndef RBIMPL_TODO0
+# define RBIMPL_TODO0(x)
+#endif
+#define RBIMPL_TODO(message) RBIMPL_TODO0("TODO: " message)
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 6, 0)
+VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
+PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
+PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
+PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
+rb_warning_category_t rb_warning_category_from_name(VALUE category);
+bool rb_warning_category_enabled_p(rb_warning_category_t category);
+VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
+VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
+VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
+PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2);
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
+NORETURN(void rb_vraise(VALUE, const char *, va_list));
+NORETURN(static inline void rb_raise_cstr(VALUE etype, const char *mesg));
+NORETURN(static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg));
+NORETURN(static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name));
+NORETURN(static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name));
+NORETURN(static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name));
+static inline void Check_Type(VALUE v, enum ruby_value_type t);
+static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
+#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* error.c (export) */
+int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
+#ifdef RUBY_FUNCTION_NAME_STRING
+NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
+NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
+VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
+#endif
+RUBY_SYMBOL_EXPORT_END
+
+static inline void
+rb_raise_cstr_i(VALUE etype, VALUE mesg)
+{
+ VALUE exc = rb_exc_new_str(etype, mesg);
+ rb_exc_raise(exc);
+}
+
+static inline void
+rb_raise_cstr(VALUE etype, const char *mesg)
+{
+ VALUE str = rb_str_new_cstr(mesg);
+ rb_raise_cstr_i(etype, str);
+}
+
+static inline void
+rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
+{
+ VALUE exc = rb_name_err_new(mesg, recv, name);
+ rb_exc_raise(exc);
+}
+
+static inline void
+rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
+{
+ VALUE str = rb_fstring_cstr(mesg);
+ rb_name_err_raise_str(str, recv, name);
+}
+
+static inline void
+rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
+{
+ VALUE exc = rb_key_err_new(mesg, recv, name);
+ rb_exc_raise(exc);
+}
+
+static inline bool
+rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
+{
+ return RB_TYPE_P(obj, T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
+}
+
+#endif /* INTERNAL_ERROR_H */
diff --git a/internal/eval.h b/internal/eval.h
new file mode 100644
index 0000000000..e594d8516d
--- /dev/null
+++ b/internal/eval.h
@@ -0,0 +1,33 @@
+#ifndef INTERNAL_EVAL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_EVAL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for the evaluator.
+ * @note There also is eval_intern.h, which is evaluator's internal
+ * header (related to this file, but not the same role).
+ */
+#include "ruby/ruby.h" /* for ID */
+
+#define id_signo ruby_static_id_signo
+#define id_status ruby_static_id_status
+
+/* eval.c */
+extern ID ruby_static_id_signo;
+extern ID ruby_static_id_status;
+VALUE rb_refinement_module_get_refined_class(VALUE module);
+void rb_class_modify_check(VALUE);
+NORETURN(VALUE rb_f_raise(int argc, VALUE *argv));
+VALUE rb_top_main_class(const char *method);
+
+/* eval_error.c */
+VALUE rb_get_backtrace(VALUE info);
+
+/* eval_jump.c */
+void rb_call_end_proc(VALUE data);
+void rb_mark_end_proc(void);
+
+#endif /* INTERNAL_EVAL_H */
diff --git a/internal/file.h b/internal/file.h
new file mode 100644
index 0000000000..9c192ff4d1
--- /dev/null
+++ b/internal/file.h
@@ -0,0 +1,38 @@
+#ifndef INTERNAL_FILE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_FILE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for File.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/encoding.h" /* for rb_encodinng */
+
+/* file.c */
+extern const char ruby_null_device[];
+VALUE rb_home_dir_of(VALUE user, VALUE result);
+VALUE rb_default_home_dir(VALUE result);
+VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
+VALUE rb_check_realpath(VALUE basedir, VALUE path, rb_encoding *origenc);
+void rb_file_const(const char*, VALUE);
+int rb_file_load_ok(const char *);
+VALUE rb_file_expand_path_fast(VALUE, VALUE);
+VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
+VALUE rb_get_path_check_to_string(VALUE);
+VALUE rb_get_path_check_convert(VALUE);
+int ruby_is_fd_loadable(int fd);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* file.c (export) */
+#ifdef HAVE_READLINK
+VALUE rb_readlink(VALUE path, rb_encoding *enc);
+#endif
+#ifdef __APPLE__
+VALUE rb_str_normalize_ospath(const char *ptr, long len);
+#endif
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_FILE_H */
diff --git a/internal/fixnum.h b/internal/fixnum.h
new file mode 100644
index 0000000000..8c251adef1
--- /dev/null
+++ b/internal/fixnum.h
@@ -0,0 +1,184 @@
+#ifndef INTERNAL_FIXNUM_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_FIXNUM_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Fixnums.
+ */
+#include "ruby/internal/config.h" /* for HAVE_LONG_LONG */
+#include <limits.h> /* for CHAR_BIT */
+#include "internal/compilers.h" /* for __has_builtin */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/intern.h" /* for rb_big_mul */
+#include "ruby/ruby.h" /* for RB_FIXABLE */
+
+#if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
+# define DLONG LONG_LONG
+# define DL2NUM(x) LL2NUM(x)
+#elif defined(HAVE_INT128_T) && !(defined(__OpenBSD__) && defined(__mips64__))
+# define DLONG int128_t
+# define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
+VALUE rb_int128t2big(int128_t n); /* in bignum.c */
+#endif
+
+static inline long rb_overflowed_fix_to_int(long x);
+static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y);
+static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y);
+static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y);
+static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp);
+static inline VALUE rb_fix_div_fix(VALUE x, VALUE y);
+static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y);
+static inline bool FIXNUM_POSITIVE_P(VALUE num);
+static inline bool FIXNUM_NEGATIVE_P(VALUE num);
+static inline bool FIXNUM_ZERO_P(VALUE num);
+
+static inline long
+rb_overflowed_fix_to_int(long x)
+{
+ return (long)((unsigned long)(x >> 1) ^ (1LU << (SIZEOF_LONG * CHAR_BIT - 1)));
+}
+
+static inline VALUE
+rb_fix_plus_fix(VALUE x, VALUE y)
+{
+#if !__has_builtin(__builtin_add_overflow)
+ long lz = FIX2LONG(x) + FIX2LONG(y);
+ return LONG2NUM(lz);
+#else
+ long lz;
+ /* NOTE
+ * (1) `LONG2FIX(FIX2LONG(x)+FIX2LONG(y))`
+ + = `((lx*2+1)/2 + (ly*2+1)/2)*2+1`
+ + = `lx*2 + ly*2 + 1`
+ + = `(lx*2+1) + (ly*2+1) - 1`
+ + = `x + y - 1`
+ * (2) Fixnum's LSB is always 1.
+ * It means you can always run `x - 1` without overflow.
+ * (3) Of course `z = x + (y-1)` may overflow.
+ * At that time true value is
+ * * positive: 0b0 1xxx...1, and z = 0b1xxx...1
+ * * negative: 0b1 0xxx...1, and z = 0b0xxx...1
+ * To convert this true value to long,
+ * (a) Use arithmetic shift
+ * * positive: 0b11xxx...
+ * * negative: 0b00xxx...
+ * (b) invert MSB
+ * * positive: 0b01xxx...
+ * * negative: 0b10xxx...
+ */
+ if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
+ return rb_int2big(rb_overflowed_fix_to_int(lz));
+ }
+ else {
+ return (VALUE)lz;
+ }
+#endif
+}
+
+static inline VALUE
+rb_fix_minus_fix(VALUE x, VALUE y)
+{
+#if !__has_builtin(__builtin_sub_overflow)
+ long lz = FIX2LONG(x) - FIX2LONG(y);
+ return LONG2NUM(lz);
+#else
+ long lz;
+ if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
+ return rb_int2big(rb_overflowed_fix_to_int(lz));
+ }
+ else {
+ return (VALUE)lz;
+ }
+#endif
+}
+
+/* arguments must be Fixnum */
+static inline VALUE
+rb_fix_mul_fix(VALUE x, VALUE y)
+{
+ long lx = FIX2LONG(x);
+ long ly = FIX2LONG(y);
+#ifdef DLONG
+ return DL2NUM((DLONG)lx * (DLONG)ly);
+#else
+ if (MUL_OVERFLOW_FIXNUM_P(lx, ly)) {
+ return rb_big_mul(rb_int2big(lx), rb_int2big(ly));
+ }
+ else {
+ return LONG2FIX(lx * ly);
+ }
+#endif
+}
+
+/*
+ * This behaves different from C99 for negative arguments.
+ * Note that div may overflow fixnum.
+ */
+static inline void
+rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
+{
+ /* assume / and % comply C99.
+ * ldiv(3) won't be inlined by GCC and clang.
+ * I expect / and % are compiled as single idiv.
+ */
+ long x = FIX2LONG(a);
+ long y = FIX2LONG(b);
+ long div, mod;
+ if (x == FIXNUM_MIN && y == -1) {
+ if (divp) *divp = LONG2NUM(-FIXNUM_MIN);
+ if (modp) *modp = LONG2FIX(0);
+ return;
+ }
+ div = x / y;
+ mod = x % y;
+ if (y > 0 ? mod < 0 : mod > 0) {
+ mod += y;
+ div -= 1;
+ }
+ if (divp) *divp = LONG2FIX(div);
+ if (modp) *modp = LONG2FIX(mod);
+}
+
+/* div() for Ruby
+ * This behaves different from C99 for negative arguments.
+ */
+static inline VALUE
+rb_fix_div_fix(VALUE x, VALUE y)
+{
+ VALUE div;
+ rb_fix_divmod_fix(x, y, &div, NULL);
+ return div;
+}
+
+/* mod() for Ruby
+ * This behaves different from C99 for negative arguments.
+ */
+static inline VALUE
+rb_fix_mod_fix(VALUE x, VALUE y)
+{
+ VALUE mod;
+ rb_fix_divmod_fix(x, y, NULL, &mod);
+ return mod;
+}
+
+static inline bool
+FIXNUM_POSITIVE_P(VALUE num)
+{
+ return (SIGNED_VALUE)num > (SIGNED_VALUE)INT2FIX(0);
+}
+
+static inline bool
+FIXNUM_NEGATIVE_P(VALUE num)
+{
+ return (SIGNED_VALUE)num < 0;
+}
+
+static inline bool
+FIXNUM_ZERO_P(VALUE num)
+{
+ return num == INT2FIX(0);
+}
+#endif /* INTERNAL_FIXNUM_H */
diff --git a/internal/gc.h b/internal/gc.h
new file mode 100644
index 0000000000..e54a5dce9d
--- /dev/null
+++ b/internal/gc.h
@@ -0,0 +1,192 @@
+#ifndef INTERNAL_GC_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_GC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for GC.
+ */
+#include "ruby/internal/config.h"
+
+#include <stddef.h> /* for size_t */
+
+#include "internal/compilers.h" /* for __has_attribute */
+#include "ruby/ruby.h" /* for rb_event_flag_t */
+
+struct rb_execution_context_struct; /* in vm_core.h */
+struct rb_objspace; /* in vm_core.h */
+
+#ifdef NEWOBJ_OF
+# undef NEWOBJ_OF
+# undef RB_NEWOBJ_OF
+# undef RB_OBJ_WRITE
+#endif
+
+#define RVALUE_SIZE (sizeof(struct RBasic) + sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]))
+
+#define RB_RVARGC_NEWOBJ_OF(var, T, c, f, s) \
+ T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? \
+ rb_wb_protected_newobj_of((c), (f) & ~FL_WB_PROTECTED, s) : \
+ rb_wb_unprotected_newobj_of((c), (f), s))
+
+#define RB_RVARGC_EC_NEWOBJ_OF(ec, var, T, c, f, s) \
+ T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? \
+ rb_ec_wb_protected_newobj_of((ec), (c), (f) & ~FL_WB_PROTECTED, s) : \
+ rb_wb_unprotected_newobj_of((c), (f), s))
+
+/* optimized version of NEWOBJ() */
+#define RB_NEWOBJ_OF(var, T, c, f) RB_RVARGC_NEWOBJ_OF(var, T, c, f, RVALUE_SIZE)
+
+#define RB_EC_NEWOBJ_OF(ec, var, T, c, f) RB_RVARGC_EC_NEWOBJ_OF(ec, var, T, c, f, RVALUE_SIZE)
+
+#define NEWOBJ_OF(var, T, c, f) RB_NEWOBJ_OF((var), T, (c), (f))
+#define RVARGC_NEWOBJ_OF(var, T, c, f, s) RB_RVARGC_NEWOBJ_OF((var), T, (c), (f), (s))
+#define RB_OBJ_GC_FLAGS_MAX 6 /* used in ext/objspace */
+
+#ifndef USE_UNALIGNED_MEMBER_ACCESS
+# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
+#elif ! USE_UNALIGNED_MEMBER_ACCESS
+# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
+#elif ! (__has_warning("-Waddress-of-packed-member") || GCC_VERSION_SINCE(9, 0, 0))
+# define UNALIGNED_MEMBER_ACCESS(expr) (expr)
+#else
+# include "internal/warnings.h"
+# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \
+ COMPILER_WARNING_PUSH; \
+ COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \
+ __typeof__(expr) unaligned_member_access_result = (expr); \
+ COMPILER_WARNING_POP; \
+ unaligned_member_access_result; \
+})
+#endif
+
+#define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
+#define RB_OBJ_WRITE(a, slot, b) \
+ rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \
+ (VALUE)(b), __FILE__, __LINE__)
+
+// We use SIZE_POOL_COUNT number of shape IDs for transitions out of different size pools
+// The next available shapd ID will be the SPECIAL_CONST_SHAPE_ID
+#if USE_RVARGC && (SIZEOF_UINT64_T == SIZEOF_VALUE)
+# define SIZE_POOL_COUNT 5
+#else
+# define SIZE_POOL_COUNT 1
+#endif
+
+#define RCLASS_EXT_EMBEDDED (SIZE_POOL_COUNT > 1)
+
+typedef struct ractor_newobj_size_pool_cache {
+ struct RVALUE *freelist;
+ struct heap_page *using_page;
+} rb_ractor_newobj_size_pool_cache_t;
+
+typedef struct ractor_newobj_cache {
+ size_t incremental_mark_step_allocated_slots;
+ rb_ractor_newobj_size_pool_cache_t size_pool_caches[SIZE_POOL_COUNT];
+} rb_ractor_newobj_cache_t;
+
+/* gc.c */
+extern VALUE *ruby_initial_gc_stress_ptr;
+extern int ruby_disable_gc;
+RUBY_ATTR_MALLOC void *ruby_mimmalloc(size_t size);
+void ruby_mimfree(void *ptr);
+void rb_objspace_set_event_hook(const rb_event_flag_t event);
+VALUE rb_objspace_gc_enable(struct rb_objspace *);
+VALUE rb_objspace_gc_disable(struct rb_objspace *);
+void ruby_gc_set_params(void);
+void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
+#if __has_attribute(alloc_align)
+__attribute__((__alloc_align__(1)))
+#endif
+RUBY_ATTR_MALLOC void *rb_aligned_malloc(size_t, size_t) RUBY_ATTR_ALLOC_SIZE((2));
+size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
+size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
+RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add(size_t, size_t, size_t);
+RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add(size_t, size_t, size_t);
+void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
+RUBY_ATTR_MALLOC void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
+RUBY_ATTR_MALLOC void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
+static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
+static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
+static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
+VALUE rb_class_allocate_instance(VALUE klass);
+void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache);
+size_t rb_gc_obj_slot_size(VALUE obj);
+bool rb_gc_size_allocatable_p(size_t size);
+int rb_objspace_garbage_object_p(VALUE obj);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* gc.c (export) */
+const char *rb_objspace_data_type_name(VALUE obj);
+VALUE rb_wb_protected_newobj_of(VALUE, VALUE, size_t);
+VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE, size_t);
+VALUE rb_ec_wb_protected_newobj_of(struct rb_execution_context_struct *ec, VALUE klass, VALUE flags, size_t);
+size_t rb_obj_memsize_of(VALUE);
+void rb_gc_verify_internal_consistency(void);
+size_t rb_obj_gc_flags(VALUE, ID[], size_t);
+void rb_gc_mark_values(long n, const VALUE *values);
+void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
+void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
+void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2, 3));
+void ruby_sized_xfree(void *x, size_t size);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+int rb_ec_stack_check(struct rb_execution_context_struct *ec);
+void rb_gc_writebarrier_remember(VALUE obj);
+const char *rb_obj_info(VALUE obj);
+MJIT_SYMBOL_EXPORT_END
+
+#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
+
+static inline void *
+ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
+{
+ return ruby_xrealloc(ptr, new_size);
+}
+
+static inline void *
+ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
+{
+ return ruby_xrealloc2(ptr, new_count, elemsiz);
+}
+
+static inline void
+ruby_sized_xfree_inlined(void *ptr, size_t size)
+{
+ ruby_xfree(ptr);
+}
+
+# define SIZED_REALLOC_N(x, y, z, w) REALLOC_N(x, y, z)
+
+#else
+
+static inline void *
+ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
+{
+ return ruby_sized_xrealloc(ptr, new_size, old_size);
+}
+
+static inline void *
+ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
+{
+ return ruby_sized_xrealloc2(ptr, new_count, elemsiz, old_count);
+}
+
+static inline void
+ruby_sized_xfree_inlined(void *ptr, size_t size)
+{
+ ruby_sized_xfree(ptr, size);
+}
+
+# define SIZED_REALLOC_N(v, T, m, n) \
+ ((v) = (T *)ruby_sized_xrealloc2((void *)(v), (m), sizeof(T), (n)))
+
+#endif /* HAVE_MALLOC_USABLE_SIZE */
+
+#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
+#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
+#define ruby_sized_xfree ruby_sized_xfree_inlined
+#endif /* INTERNAL_GC_H */
diff --git a/internal/hash.h b/internal/hash.h
new file mode 100644
index 0000000000..64832c9610
--- /dev/null
+++ b/internal/hash.h
@@ -0,0 +1,244 @@
+#ifndef INTERNAL_HASH_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_HASH_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Hash.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for struct RBasic */
+#include "ruby/st.h" /* for struct st_table */
+
+#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
+
+struct ar_table_struct;
+typedef unsigned char ar_hint_t;
+
+enum ruby_rhash_flags {
+ RHASH_PASS_AS_KEYWORDS = FL_USER1, /* FL 1 */
+ RHASH_PROC_DEFAULT = FL_USER2, /* FL 2 */
+ RHASH_ST_TABLE_FLAG = FL_USER3, /* FL 3 */
+ RHASH_AR_TABLE_SIZE_MASK = (FL_USER4|FL_USER5|FL_USER6|FL_USER7), /* FL 4..7 */
+ RHASH_AR_TABLE_SIZE_SHIFT = (FL_USHIFT+4),
+ RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
+ RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
+
+#if USE_TRANSIENT_HEAP
+ RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */
+#endif
+
+ // we can not put it in "enum" because it can exceed "int" range.
+#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
+ FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
+
+ RHASH_LEV_SHIFT = (FL_USHIFT + 13),
+ RHASH_LEV_MAX = 127, /* 7 bits */
+};
+
+struct RHash {
+ struct RBasic basic;
+ union {
+ st_table *st;
+ struct ar_table_struct *ar; /* possibly 0 */
+ } as;
+ const VALUE ifnone;
+ union {
+ ar_hint_t ary[RHASH_AR_TABLE_MAX_SIZE];
+ VALUE word;
+ } ar_hint;
+};
+
+#define RHASH(obj) ((struct RHash *)(obj))
+
+#ifdef RHASH_IFNONE
+# undef RHASH_IFNONE
+#endif
+
+#ifdef RHASH_SIZE
+# undef RHASH_SIZE
+#endif
+
+#ifdef RHASH_EMPTY_P
+# undef RHASH_EMPTY_P
+#endif
+
+/* hash.c */
+void rb_hash_st_table_set(VALUE hash, st_table *st);
+VALUE rb_hash_default_value(VALUE hash, VALUE key);
+VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
+long rb_dbl_long_hash(double d);
+st_table *rb_init_identtable(void);
+st_index_t rb_any_hash(VALUE a);
+VALUE rb_to_hash_type(VALUE obj);
+VALUE rb_hash_key_str(VALUE);
+VALUE rb_hash_values(VALUE hash);
+VALUE rb_hash_rehash(VALUE hash);
+int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
+VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
+int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
+int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
+int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
+extern st_table *rb_hash_st_table(VALUE hash);
+VALUE rb_ident_hash_new_with_size(st_index_t size);
+
+static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
+static inline VALUE RHASH_IFNONE(VALUE h);
+static inline size_t RHASH_SIZE(VALUE h);
+static inline bool RHASH_EMPTY_P(VALUE h);
+static inline bool RHASH_AR_TABLE_P(VALUE h);
+static inline bool RHASH_ST_TABLE_P(VALUE h);
+static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
+static inline st_table *RHASH_ST_TABLE(VALUE h);
+static inline size_t RHASH_ST_SIZE(VALUE h);
+static inline void RHASH_ST_CLEAR(VALUE h);
+static inline bool RHASH_TRANSIENT_P(VALUE h);
+static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h);
+static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* hash.c (export) */
+VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
+VALUE rb_ident_hash_new(void);
+int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_hash_new_with_size(st_index_t size);
+VALUE rb_hash_resurrect(VALUE hash);
+int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
+VALUE rb_hash_keys(VALUE hash);
+VALUE rb_hash_has_key(VALUE hash, VALUE key);
+VALUE rb_hash_compare_by_id_p(VALUE hash);
+
+st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
+#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
+MJIT_SYMBOL_EXPORT_END
+
+VALUE rb_hash_compare_by_id(VALUE hash);
+
+#if 0 /* for debug */
+
+static inline bool
+RHASH_AR_TABLE_P(VALUE h)
+{
+ extern int rb_hash_ar_table_p(VALUE hash);
+ return rb_hash_ar_table_p(h)
+}
+
+static inline struct ar_table_struct *
+RHASH_AR_TABLE(VALUE h)
+{
+ extern struct ar_table_struct *rb_hash_ar_table(VALUE hash);
+ return rb_hash_ar_table(h)
+}
+
+static inline st_table *
+RHASH_ST_TABLE(VALUE h)
+{
+ return rb_hash_st_table(h)
+}
+
+#else
+
+static inline bool
+RHASH_AR_TABLE_P(VALUE h)
+{
+ return ! FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
+}
+
+static inline struct ar_table_struct *
+RHASH_AR_TABLE(VALUE h)
+{
+ return RHASH(h)->as.ar;
+}
+
+static inline st_table *
+RHASH_ST_TABLE(VALUE h)
+{
+ return RHASH(h)->as.st;
+}
+
+#endif
+
+static inline VALUE
+RHASH_IFNONE(VALUE h)
+{
+ return RHASH(h)->ifnone;
+}
+
+static inline size_t
+RHASH_SIZE(VALUE h)
+{
+ if (RHASH_AR_TABLE_P(h)) {
+ return RHASH_AR_TABLE_SIZE_RAW(h);
+ }
+ else {
+ return RHASH_ST_SIZE(h);
+ }
+}
+
+static inline bool
+RHASH_EMPTY_P(VALUE h)
+{
+ return RHASH_SIZE(h) == 0;
+}
+
+static inline bool
+RHASH_ST_TABLE_P(VALUE h)
+{
+ return ! RHASH_AR_TABLE_P(h);
+}
+
+static inline size_t
+RHASH_ST_SIZE(VALUE h)
+{
+ return RHASH_ST_TABLE(h)->num_entries;
+}
+
+static inline void
+RHASH_ST_CLEAR(VALUE h)
+{
+ FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG);
+ RHASH(h)->as.ar = NULL;
+}
+
+static inline unsigned
+RHASH_AR_TABLE_SIZE_RAW(VALUE h)
+{
+ VALUE ret = FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
+ ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
+ return (unsigned)ret;
+}
+
+static inline bool
+RHASH_TRANSIENT_P(VALUE h)
+{
+#if USE_TRANSIENT_HEAP
+ return FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG);
+#else
+ return false;
+#endif
+}
+
+static inline void
+RHASH_SET_TRANSIENT_FLAG(VALUE h)
+{
+#if USE_TRANSIENT_HEAP
+ FL_SET_RAW(h, RHASH_TRANSIENT_FLAG);
+#endif
+}
+
+static inline void
+RHASH_UNSET_TRANSIENT_FLAG(VALUE h)
+{
+#if USE_TRANSIENT_HEAP
+ FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG);
+#endif
+}
+
+#endif /* INTERNAL_HASH_H */
diff --git a/internal/imemo.h b/internal/imemo.h
new file mode 100644
index 0000000000..91b524e0a6
--- /dev/null
+++ b/internal/imemo.h
@@ -0,0 +1,242 @@
+#ifndef INTERNAL_IMEMO_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_IMEMO_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief IMEMO: Internal memo object.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "internal/array.h" /* for rb_ary_hidden_new_fill */
+#include "internal/gc.h" /* for RB_OBJ_WRITE */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for rb_block_call_func_t */
+
+#ifndef IMEMO_DEBUG
+# define IMEMO_DEBUG 0
+#endif
+
+#define IMEMO_MASK 0x0f
+
+/* FL_USER0 to FL_USER3 is for type */
+#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
+#define IMEMO_FL_USER0 FL_USER4
+#define IMEMO_FL_USER1 FL_USER5
+#define IMEMO_FL_USER2 FL_USER6
+#define IMEMO_FL_USER3 FL_USER7
+#define IMEMO_FL_USER4 FL_USER8
+#define IMEMO_FL_USER5 FL_USER9
+
+enum imemo_type {
+ imemo_env = 0,
+ imemo_cref = 1, /*!< class reference */
+ imemo_svar = 2, /*!< special variable */
+ imemo_throw_data = 3,
+ imemo_ifunc = 4, /*!< iterator function */
+ imemo_memo = 5,
+ imemo_ment = 6,
+ imemo_iseq = 7,
+ imemo_tmpbuf = 8,
+ imemo_ast = 9,
+ imemo_parser_strterm = 10,
+ imemo_callinfo = 11,
+ imemo_callcache = 12,
+ imemo_constcache = 13,
+};
+
+/* CREF (Class REFerence) is defined in method.h */
+
+/*! SVAR (Special VARiable) */
+struct vm_svar {
+ VALUE flags;
+ const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */
+ const VALUE lastline;
+ const VALUE backref;
+ const VALUE others;
+};
+
+/*! THROW_DATA */
+struct vm_throw_data {
+ VALUE flags;
+ VALUE reserved;
+ const VALUE throw_obj;
+ const struct rb_control_frame_struct *catch_frame;
+ int throw_state;
+};
+
+#define THROW_DATA_CONSUMED IMEMO_FL_USER0
+
+/* IFUNC (Internal FUNCtion) */
+
+struct vm_ifunc_argc {
+#if SIZEOF_INT * 2 > SIZEOF_VALUE
+ signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
+ signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
+#else
+ int min, max;
+#endif
+};
+
+/*! IFUNC (Internal FUNCtion) */
+struct vm_ifunc {
+ VALUE flags;
+ VALUE reserved;
+ rb_block_call_func_t func;
+ const void *data;
+ struct vm_ifunc_argc argc;
+};
+
+struct rb_imemo_tmpbuf_struct {
+ VALUE flags;
+ VALUE reserved;
+ VALUE *ptr; /* malloc'ed buffer */
+ struct rb_imemo_tmpbuf_struct *next; /* next imemo */
+ size_t cnt; /* buffer size in VALUE */
+};
+
+/*! MEMO
+ *
+ * @see imemo_type
+ * */
+struct MEMO {
+ VALUE flags;
+ VALUE reserved;
+ const VALUE v1;
+ const VALUE v2;
+ union {
+ long cnt;
+ long state;
+ const VALUE value;
+ void (*func)(void);
+ } u3;
+};
+
+/* ment is in method.h */
+
+#define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
+#define MEMO_CAST(m) ((struct MEMO *)(m))
+#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
+#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
+#define NEW_MEMO_FOR(type, value) \
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
+#define NEW_PARTIAL_MEMO_FOR(type, value, member) \
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), \
+ rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
+ MEMO_FOR(type, value))
+
+typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
+rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
+struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
+void rb_strterm_mark(VALUE obj);
+static inline enum imemo_type imemo_type(VALUE imemo);
+static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
+static inline bool imemo_throw_data_p(VALUE imemo);
+static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
+static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
+static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
+static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
+static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
+static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
+static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+#if IMEMO_DEBUG
+VALUE rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0, const char *file, int line);
+#define rb_imemo_new(type, v1, v2, v3, v0) rb_imemo_new_debug(type, v1, v2, v3, v0, __FILE__, __LINE__)
+#else
+VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
+#endif
+const char *rb_imemo_name(enum imemo_type type);
+RUBY_SYMBOL_EXPORT_END
+
+static inline enum imemo_type
+imemo_type(VALUE imemo)
+{
+ return (RBASIC(imemo)->flags >> FL_USHIFT) & IMEMO_MASK;
+}
+
+static inline int
+imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
+{
+ if (LIKELY(!RB_SPECIAL_CONST_P(imemo))) {
+ /* fixed at compile time if imemo_type is given. */
+ const VALUE mask = (IMEMO_MASK << FL_USHIFT) | RUBY_T_MASK;
+ const VALUE expected_type = (imemo_type << FL_USHIFT) | T_IMEMO;
+ /* fixed at runtime. */
+ return expected_type == (RBASIC(imemo)->flags & mask);
+ }
+ else {
+ return 0;
+ }
+}
+
+#define IMEMO_TYPE_P(v, t) imemo_type_p((VALUE)v, t)
+
+static inline bool
+imemo_throw_data_p(VALUE imemo)
+{
+ return RB_TYPE_P(imemo, T_IMEMO);
+}
+
+static inline struct vm_ifunc *
+rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
+{
+ return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
+}
+
+static inline VALUE
+rb_imemo_tmpbuf_auto_free_pointer(void)
+{
+ return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
+}
+
+static inline void *
+RB_IMEMO_TMPBUF_PTR(VALUE v)
+{
+ const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
+ return p->ptr;
+}
+
+static inline void *
+rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
+{
+ return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
+}
+
+static inline VALUE
+rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
+{
+ const void *src;
+ VALUE imemo;
+ rb_imemo_tmpbuf_t *tmpbuf;
+ void *dst;
+ size_t len;
+
+ SafeStringValue(str);
+ /* create tmpbuf to keep the pointer before xmalloc */
+ imemo = rb_imemo_tmpbuf_auto_free_pointer();
+ tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
+ len = RSTRING_LEN(str);
+ src = RSTRING_PTR(str);
+ dst = ruby_xmalloc(len);
+ memcpy(dst, src, len);
+ tmpbuf->ptr = dst;
+ return imemo;
+}
+
+static inline void
+MEMO_V1_SET(struct MEMO *m, VALUE v)
+{
+ RB_OBJ_WRITE(m, &m->v1, v);
+}
+
+static inline void
+MEMO_V2_SET(struct MEMO *m, VALUE v)
+{
+ RB_OBJ_WRITE(m, &m->v2, v);
+}
+
+#endif /* INTERNAL_IMEMO_H */
diff --git a/internal/inits.h b/internal/inits.h
new file mode 100644
index 0000000000..03e180f77b
--- /dev/null
+++ b/internal/inits.h
@@ -0,0 +1,50 @@
+#ifndef INTERNAL_INITS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_INITS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header aggregating init functions.
+ */
+
+/* class.c */
+void Init_class_hierarchy(void);
+
+/* dmyext.c */
+void Init_enc(void);
+void Init_ext(void);
+
+/* file.c */
+void Init_File(void);
+
+/* gc.c */
+void Init_heap(void);
+
+/* localeinit.c */
+int Init_enc_set_filesystem_encoding(void);
+
+/* newline.c */
+void Init_newline(void);
+
+/* vm.c */
+void Init_BareVM(void);
+void Init_vm_objects(void);
+
+/* vm_backtrace.c */
+void Init_vm_backtrace(void);
+
+/* vm_eval.c */
+void Init_vm_eval(void);
+
+/* vm_insnhelper.c */
+void Init_vm_stack_canary(void);
+
+/* vm_method.c */
+void Init_eval_method(void);
+
+/* inits.c */
+void rb_call_inits(void);
+
+#endif /* INTERNAL_INITS_H */
diff --git a/internal/io.h b/internal/io.h
new file mode 100644
index 0000000000..b5f15499d7
--- /dev/null
+++ b/internal/io.h
@@ -0,0 +1,38 @@
+#ifndef INTERNAL_IO_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_IO_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for IO.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/io.h" /* for rb_io_t */
+
+/* io.c */
+void ruby_set_inplace_mode(const char *);
+void rb_stdio_set_default_encoding(void);
+VALUE rb_io_flush_raw(VALUE, int);
+size_t rb_io_memsize(const rb_io_t *);
+int rb_stderr_tty_p(void);
+void rb_io_fptr_finalize_internal(void *ptr);
+#ifdef rb_io_fptr_finalize
+# undef rb_io_fptr_finalize
+#endif
+#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
+VALUE rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt);
+
+VALUE rb_io_prep_stdin(void);
+VALUE rb_io_prep_stdout(void);
+VALUE rb_io_prep_stderr(void);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* io.c (export) */
+void rb_maygvl_fd_fix_cloexec(int fd);
+int rb_gc_for_fd(int err);
+void rb_write_error_str(VALUE mesg);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_IO_H */
diff --git a/internal/load.h b/internal/load.h
new file mode 100644
index 0000000000..d4c0bb91ba
--- /dev/null
+++ b/internal/load.h
@@ -0,0 +1,18 @@
+#ifndef INTERNAL_LOAD_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_LOAD_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for require.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* load.c */
+VALUE rb_get_expanded_load_path(void);
+int rb_require_internal(VALUE fname);
+NORETURN(void rb_load_fail(VALUE, const char*));
+
+#endif /* INTERNAL_LOAD_H */
diff --git a/internal/loadpath.h b/internal/loadpath.h
new file mode 100644
index 0000000000..b3a85e7b41
--- /dev/null
+++ b/internal/loadpath.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_LOADPATH_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_LOADPATH_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for $LOAD_PATH.
+ */
+
+/* loadpath.c */
+extern const char ruby_exec_prefix[];
+extern const char ruby_initial_load_paths[];
+
+#endif /* INTERNAL_LOADPATH_H */
diff --git a/internal/math.h b/internal/math.h
new file mode 100644
index 0000000000..08f852ffc1
--- /dev/null
+++ b/internal/math.h
@@ -0,0 +1,23 @@
+#ifndef INTERNAL_MATH_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_MATH_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Math.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* math.c */
+VALUE rb_math_atan2(VALUE, VALUE);
+VALUE rb_math_cos(VALUE);
+VALUE rb_math_cosh(VALUE);
+VALUE rb_math_exp(VALUE);
+VALUE rb_math_hypot(VALUE, VALUE);
+VALUE rb_math_log(int argc, const VALUE *argv);
+VALUE rb_math_sin(VALUE);
+VALUE rb_math_sinh(VALUE);
+
+#endif /* INTERNAL_MATH_H */
diff --git a/internal/missing.h b/internal/missing.h
new file mode 100644
index 0000000000..c0992a151a
--- /dev/null
+++ b/internal/missing.h
@@ -0,0 +1,18 @@
+#ifndef INTERNAL_MISSING_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_MISSING_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header corresponding missing.
+ */
+#include "ruby/internal/config.h" /* for HAVE_SETPROCTITLE */
+
+/* missing/setproctitle.c */
+#ifndef HAVE_SETPROCTITLE
+extern void ruby_init_setproctitle(int argc, char *argv[]);
+#endif
+
+#endif /* INTERNAL_MISSING_H */
diff --git a/internal/numeric.h b/internal/numeric.h
new file mode 100644
index 0000000000..89bc54b307
--- /dev/null
+++ b/internal/numeric.h
@@ -0,0 +1,275 @@
+#ifndef INTERNAL_NUMERIC_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_NUMERIC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Numeric.
+ */
+#include "internal/bignum.h" /* for BIGNUM_POSITIVE_P */
+#include "internal/bits.h" /* for RUBY_BIT_ROTL */
+#include "internal/fixnum.h" /* for FIXNUM_POSITIVE_P */
+#include "internal/vm.h" /* for rb_method_basic_definition_p */
+#include "ruby/intern.h" /* for rb_cmperr */
+#include "ruby/ruby.h" /* for USE_FLONUM */
+
+#define ROUND_TO(mode, even, up, down) \
+ ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : \
+ (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
+#define ROUND_FUNC(mode, name) \
+ ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
+#define ROUND_CALL(mode, name, args) \
+ ROUND_TO(mode, name##_half_even args, \
+ name##_half_up args, name##_half_down args)
+
+#ifndef ROUND_DEFAULT
+# define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
+#endif
+
+enum ruby_num_rounding_mode {
+ RUBY_NUM_ROUND_HALF_UP,
+ RUBY_NUM_ROUND_HALF_EVEN,
+ RUBY_NUM_ROUND_HALF_DOWN,
+ RUBY_NUM_ROUND_DEFAULT = ROUND_DEFAULT,
+};
+
+/* same as internal.h */
+#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
+#define roomof(x, y) (((x) + (y) - 1) / (y))
+#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
+
+#if SIZEOF_DOUBLE <= SIZEOF_VALUE
+typedef double rb_float_value_type;
+#else
+typedef struct {
+ VALUE values[roomof(SIZEOF_DOUBLE, SIZEOF_VALUE)];
+} rb_float_value_type;
+#endif
+
+struct RFloat {
+ struct RBasic basic;
+ rb_float_value_type float_value;
+};
+
+#define RFLOAT(obj) ((struct RFloat *)(obj))
+
+/* numeric.c */
+int rb_num_to_uint(VALUE val, unsigned int *ret);
+VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
+double ruby_float_step_size(double beg, double end, double unit, int excl);
+int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
+int rb_num_negative_p(VALUE);
+VALUE rb_int_succ(VALUE num);
+VALUE rb_float_uminus(VALUE num);
+VALUE rb_int_plus(VALUE x, VALUE y);
+VALUE rb_float_plus(VALUE x, VALUE y);
+VALUE rb_int_minus(VALUE x, VALUE y);
+VALUE rb_float_minus(VALUE x, VALUE y);
+VALUE rb_int_mul(VALUE x, VALUE y);
+VALUE rb_float_mul(VALUE x, VALUE y);
+VALUE rb_float_div(VALUE x, VALUE y);
+VALUE rb_int_idiv(VALUE x, VALUE y);
+VALUE rb_int_modulo(VALUE x, VALUE y);
+VALUE rb_int2str(VALUE num, int base);
+VALUE rb_fix_plus(VALUE x, VALUE y);
+VALUE rb_int_gt(VALUE x, VALUE y);
+VALUE rb_float_gt(VALUE x, VALUE y);
+VALUE rb_int_ge(VALUE x, VALUE y);
+enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
+double rb_int_fdiv_double(VALUE x, VALUE y);
+VALUE rb_int_pow(VALUE x, VALUE y);
+VALUE rb_float_pow(VALUE x, VALUE y);
+VALUE rb_int_cmp(VALUE x, VALUE y);
+VALUE rb_int_equal(VALUE x, VALUE y);
+VALUE rb_int_divmod(VALUE x, VALUE y);
+VALUE rb_int_and(VALUE x, VALUE y);
+VALUE rb_int_lshift(VALUE x, VALUE y);
+VALUE rb_int_div(VALUE x, VALUE y);
+int rb_int_positive_p(VALUE num);
+int rb_int_negative_p(VALUE num);
+VALUE rb_check_integer_type(VALUE);
+VALUE rb_num_pow(VALUE x, VALUE y);
+VALUE rb_float_ceil(VALUE num, int ndigits);
+VALUE rb_float_floor(VALUE x, int ndigits);
+VALUE rb_float_abs(VALUE flt);
+static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
+static inline int rb_num_positive_int_p(VALUE num);
+static inline int rb_num_negative_int_p(VALUE num);
+static inline double rb_float_flonum_value(VALUE v);
+static inline double rb_float_noflonum_value(VALUE v);
+static inline double rb_float_value_inline(VALUE v);
+static inline VALUE rb_float_new_inline(double d);
+static inline bool INT_POSITIVE_P(VALUE num);
+static inline bool INT_NEGATIVE_P(VALUE num);
+static inline bool FLOAT_ZERO_P(VALUE num);
+#define rb_float_value rb_float_value_inline
+#define rb_float_new rb_float_new_inline
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* numeric.c (export) */
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_flo_div_flo(VALUE x, VALUE y);
+double ruby_float_mod(double x, double y);
+VALUE rb_float_equal(VALUE x, VALUE y);
+int rb_float_cmp(VALUE x, VALUE y);
+VALUE rb_float_eql(VALUE x, VALUE y);
+VALUE rb_fix_aref(VALUE fix, VALUE idx);
+VALUE rb_int_zero_p(VALUE num);
+VALUE rb_int_even_p(VALUE num);
+VALUE rb_int_odd_p(VALUE num);
+VALUE rb_int_abs(VALUE num);
+VALUE rb_int_bit_length(VALUE num);
+VALUE rb_int_uminus(VALUE num);
+VALUE rb_int_comp(VALUE num);
+MJIT_SYMBOL_EXPORT_END
+
+static inline bool
+INT_POSITIVE_P(VALUE num)
+{
+ if (FIXNUM_P(num)) {
+ return FIXNUM_POSITIVE_P(num);
+ }
+ else {
+ return BIGNUM_POSITIVE_P(num);
+ }
+}
+
+static inline bool
+INT_NEGATIVE_P(VALUE num)
+{
+ if (FIXNUM_P(num)) {
+ return FIXNUM_NEGATIVE_P(num);
+ }
+ else {
+ return BIGNUM_NEGATIVE_P(num);
+ }
+}
+
+static inline bool
+FLOAT_ZERO_P(VALUE num)
+{
+ return RFLOAT_VALUE(num) == 0.0;
+}
+
+static inline VALUE
+rb_num_compare_with_zero(VALUE num, ID mid)
+{
+ VALUE zero = INT2FIX(0);
+ VALUE r = rb_check_funcall(num, mid, 1, &zero);
+ if (r == Qundef) {
+ rb_cmperr(num, zero);
+ }
+ return r;
+}
+
+static inline int
+rb_num_positive_int_p(VALUE num)
+{
+ const ID mid = '>';
+
+ if (FIXNUM_P(num)) {
+ if (rb_method_basic_definition_p(rb_cInteger, mid))
+ return FIXNUM_POSITIVE_P(num);
+ }
+ else if (RB_TYPE_P(num, T_BIGNUM)) {
+ if (rb_method_basic_definition_p(rb_cInteger, mid))
+ return BIGNUM_POSITIVE_P(num);
+ }
+ return RTEST(rb_num_compare_with_zero(num, mid));
+}
+
+static inline int
+rb_num_negative_int_p(VALUE num)
+{
+ const ID mid = '<';
+
+ if (FIXNUM_P(num)) {
+ if (rb_method_basic_definition_p(rb_cInteger, mid))
+ return FIXNUM_NEGATIVE_P(num);
+ }
+ else if (RB_TYPE_P(num, T_BIGNUM)) {
+ if (rb_method_basic_definition_p(rb_cInteger, mid))
+ return BIGNUM_NEGATIVE_P(num);
+ }
+ return RTEST(rb_num_compare_with_zero(num, mid));
+}
+
+static inline double
+rb_float_flonum_value(VALUE v)
+{
+#if USE_FLONUM
+ if (v != (VALUE)0x8000000000000002) { /* LIKELY */
+ union {
+ double d;
+ VALUE v;
+ } t;
+
+ VALUE b63 = (v >> 63);
+ /* e: xx1... -> 011... */
+ /* xx0... -> 100... */
+ /* ^b63 */
+ t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
+ return t.d;
+ }
+#endif
+ return 0.0;
+}
+
+static inline double
+rb_float_noflonum_value(VALUE v)
+{
+#if SIZEOF_DOUBLE <= SIZEOF_VALUE
+ return RFLOAT(v)->float_value;
+#else
+ union {
+ rb_float_value_type v;
+ double d;
+ } u = {RFLOAT(v)->float_value};
+ return u.d;
+#endif
+}
+
+static inline double
+rb_float_value_inline(VALUE v)
+{
+ if (FLONUM_P(v)) {
+ return rb_float_flonum_value(v);
+ }
+ return rb_float_noflonum_value(v);
+}
+
+static inline VALUE
+rb_float_new_inline(double d)
+{
+#if USE_FLONUM
+ union {
+ double d;
+ VALUE v;
+ } t;
+ int bits;
+
+ t.d = d;
+ bits = (int)((VALUE)(t.v >> 60) & 0x7);
+ /* bits contains 3 bits of b62..b60. */
+ /* bits - 3 = */
+ /* b011 -> b000 */
+ /* b100 -> b001 */
+
+ if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
+ !((bits-3) & ~0x01)) {
+ return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
+ }
+ else if (t.v == (VALUE)0) {
+ /* +0.0 */
+ return 0x8000000000000002;
+ }
+ /* out of range */
+#endif
+ return rb_float_new_in_heap(d);
+}
+
+#endif /* INTERNAL_NUMERIC_H */
diff --git a/internal/object.h b/internal/object.h
new file mode 100644
index 0000000000..7b54e13dd2
--- /dev/null
+++ b/internal/object.h
@@ -0,0 +1,61 @@
+#ifndef INTERNAL_OBJECT_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_OBJECT_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Object.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* object.c */
+VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
+NORETURN(void rb_undefined_alloc(VALUE klass));
+double rb_num_to_dbl(VALUE val);
+VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
+VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
+VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
+int rb_bool_expected(VALUE, const char *, int raise);
+static inline void RBASIC_CLEAR_CLASS(VALUE obj);
+static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
+static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* object.c (export) */
+int rb_opts_exception_p(VALUE opts, int default_value);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
+CONSTFUNC(VALUE rb_obj_not(VALUE obj));
+VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
+void rb_obj_copy_ivar(VALUE dest, VALUE obj);
+VALUE rb_false(VALUE obj);
+VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
+VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
+VALUE rb_get_freeze_opt(int argc, VALUE *argv);
+MJIT_SYMBOL_EXPORT_END
+
+static inline void
+RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
+{
+ const VALUE *ptr = &RBASIC(obj)->klass;
+ *(VALUE *)ptr = klass;
+}
+
+static inline void
+RBASIC_CLEAR_CLASS(VALUE obj)
+{
+ RBASIC_SET_CLASS_RAW(obj, 0);
+}
+
+static inline void
+RBASIC_SET_CLASS(VALUE obj, VALUE klass)
+{
+ VALUE oldv = RBASIC_CLASS(obj);
+ RBASIC_SET_CLASS_RAW(obj, klass);
+ RB_OBJ_WRITTEN(obj, oldv, klass);
+}
+#endif /* INTERNAL_OBJECT_H */
diff --git a/internal/parse.h b/internal/parse.h
new file mode 100644
index 0000000000..f242c384ad
--- /dev/null
+++ b/internal/parse.h
@@ -0,0 +1,25 @@
+#ifndef INTERNAL_PARSE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_PARSE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for the parser.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+struct rb_iseq_struct; /* in vm_core.h */
+
+/* parse.y */
+VALUE rb_parser_set_yydebug(VALUE, VALUE);
+void *rb_parser_load_file(VALUE parser, VALUE name);
+void rb_parser_keep_script_lines(VALUE vparser);
+void rb_parser_error_tolerant(VALUE vparser);
+void rb_parser_keep_tokens(VALUE vparser);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_PARSE_H */
diff --git a/internal/proc.h b/internal/proc.h
new file mode 100644
index 0000000000..2416c31e14
--- /dev/null
+++ b/internal/proc.h
@@ -0,0 +1,32 @@
+#ifndef INTERNAL_PROC_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_PROC_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Proc.
+ */
+#include "ruby/ruby.h" /* for rb_block_call_func_t */
+#include "ruby/st.h" /* for st_index_t */
+struct rb_block; /* in vm_core.h */
+struct rb_iseq_struct; /* in vm_core.h */
+
+/* proc.c */
+VALUE rb_proc_location(VALUE self);
+st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
+int rb_block_pair_yield_optimizable(void);
+int rb_block_arity(void);
+int rb_block_min_max_arity(int *max);
+VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
+VALUE rb_callable_receiver(VALUE);
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
+VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
+VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
+VALUE rb_sym_to_proc(VALUE sym);
+MJIT_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_PROC_H */
diff --git a/internal/process.h b/internal/process.h
new file mode 100644
index 0000000000..ceadfdcbbb
--- /dev/null
+++ b/internal/process.h
@@ -0,0 +1,137 @@
+#ifndef INTERNAL_PROCESS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_PROCESS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Process.
+ */
+#include "ruby/internal/config.h" /* for rb_pid_t */
+#include <stddef.h> /* for size_t */
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* for mode_t */
+#endif
+
+#ifdef _WIN32
+# include "ruby/win32.h" /* for mode_t */
+#endif
+
+#include "ruby/ruby.h" /* for VALUE */
+#include "internal/imemo.h" /* for RB_IMEMO_TMPBUF_PTR */
+#include "internal/warnings.h" /* for COMPILER_WARNING_PUSH */
+
+#define RB_MAX_GROUPS (65536)
+
+struct waitpid_state;
+struct rb_process_status;
+struct rb_execarg {
+ union {
+ struct {
+ VALUE shell_script;
+ } sh;
+ struct {
+ VALUE command_name;
+ VALUE command_abspath; /* full path string or nil */
+ VALUE argv_str;
+ VALUE argv_buf;
+ } cmd;
+ } invoke;
+ VALUE redirect_fds;
+ VALUE envp_str;
+ VALUE envp_buf;
+ VALUE dup2_tmpbuf;
+ unsigned use_shell : 1;
+ unsigned pgroup_given : 1;
+ unsigned umask_given : 1;
+ unsigned unsetenv_others_given : 1;
+ unsigned unsetenv_others_do : 1;
+ unsigned close_others_given : 1;
+ unsigned close_others_do : 1;
+ unsigned chdir_given : 1;
+ unsigned new_pgroup_given : 1;
+ unsigned new_pgroup_flag : 1;
+ unsigned uid_given : 1;
+ unsigned gid_given : 1;
+ unsigned exception : 1;
+ unsigned exception_given : 1;
+ struct rb_process_status *status;
+ struct waitpid_state *waitpid_state; /* for async process management */
+ rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0<V). */
+ VALUE rlimit_limits; /* Qfalse or [[rtype, softlim, hardlim], ...] */
+ mode_t umask_mask;
+ rb_uid_t uid;
+ rb_gid_t gid;
+ int close_others_maxhint;
+ VALUE fd_dup2;
+ VALUE fd_close;
+ VALUE fd_open;
+ VALUE fd_dup2_child;
+ VALUE env_modification; /* Qfalse or [[k1,v1], ...] */
+ VALUE path_env;
+ VALUE chdir_dir;
+};
+
+/* process.c */
+rb_pid_t rb_call_proc__fork(void);
+void rb_last_status_clear(void);
+static inline char **ARGVSTR2ARGV(VALUE argv_str);
+static inline size_t ARGVSTR2ARGC(VALUE argv_str);
+
+#ifdef HAVE_PWD_H
+VALUE rb_getlogin(void);
+VALUE rb_getpwdirnam_for_login(VALUE login); /* read as: "get pwd db home dir by username for login" */
+VALUE rb_getpwdiruid(void); /* read as: "get pwd db home dir for getuid()" */
+#endif
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* process.c (export) */
+int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
+rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
+VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
+struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */
+int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
+void rb_execarg_parent_start(VALUE execarg_obj);
+void rb_execarg_parent_end(VALUE execarg_obj);
+int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
+VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
+void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
+RUBY_SYMBOL_EXPORT_END
+
+/* argv_str contains extra two elements.
+ * The beginning one is for /bin/sh used by exec_with_sh.
+ * The last one for terminating NULL used by execve.
+ * See rb_exec_fillarg() in process.c. */
+static inline char **
+ARGVSTR2ARGV(VALUE argv_str)
+{
+ char **buf = RB_IMEMO_TMPBUF_PTR(argv_str);
+ return &buf[1];
+}
+
+static inline size_t
+ARGVSTR2ARGC(VALUE argv_str)
+{
+ size_t i = 0;
+ char *const *p = ARGVSTR2ARGV(argv_str);
+ while (p[i++])
+ ;
+ return i - 1;
+}
+
+#ifdef HAVE_WORKING_FORK
+COMPILER_WARNING_PUSH
+#if __has_warning("-Wdeprecated-declarations") || RBIMPL_COMPILER_IS(GCC)
+COMPILER_WARNING_IGNORED(-Wdeprecated-declarations)
+#endif
+static inline rb_pid_t
+rb_fork(void)
+{
+ return fork();
+}
+COMPILER_WARNING_POP
+#endif
+
+#endif /* INTERNAL_PROCESS_H */
diff --git a/internal/ractor.h b/internal/ractor.h
new file mode 100644
index 0000000000..eef5ffdb89
--- /dev/null
+++ b/internal/ractor.h
@@ -0,0 +1,6 @@
+#ifndef INTERNAL_RACTOR_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_RACTOR_H
+
+void rb_ractor_ensure_main_ractor(const char *msg);
+
+#endif /* INTERNAL_RACTOR_H */
diff --git a/internal/random.h b/internal/random.h
new file mode 100644
index 0000000000..231e2d5d7e
--- /dev/null
+++ b/internal/random.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_RANDOM_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_RANDOM_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Random.
+ */
+#include <stddef.h> /* for size_t */
+
+/* random.c */
+int ruby_fill_random_bytes(void *, size_t, int);
+
+#endif /* INTERNAL_RANDOM_H */
diff --git a/internal/range.h b/internal/range.h
new file mode 100644
index 0000000000..8daba0ecab
--- /dev/null
+++ b/internal/range.h
@@ -0,0 +1,40 @@
+#ifndef INTERNAL_RANGE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_RANGE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Range.
+ */
+#include "internal/struct.h" /* for RSTRUCT */
+
+/* range.c */
+static inline VALUE RANGE_BEG(VALUE r);
+static inline VALUE RANGE_END(VALUE r);
+static inline VALUE RANGE_EXCL(VALUE r);
+
+static inline VALUE
+RANGE_BEG(VALUE r)
+{
+ return RSTRUCT(r)->as.ary[0];
+}
+
+static inline VALUE
+RANGE_END(VALUE r)
+{
+ return RSTRUCT(r)->as.ary[1];
+}
+
+static inline VALUE
+RANGE_EXCL(VALUE r)
+{
+ return RSTRUCT(r)->as.ary[2];
+}
+
+VALUE
+rb_range_component_beg_len(VALUE b, VALUE e, int excl,
+ long *begp, long *lenp, long len, int err);
+
+#endif /* INTERNAL_RANGE_H */
diff --git a/internal/rational.h b/internal/rational.h
new file mode 100644
index 0000000000..61ddbf089a
--- /dev/null
+++ b/internal/rational.h
@@ -0,0 +1,72 @@
+#ifndef INTERNAL_RATIONAL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_RATIONAL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Rational.
+ */
+#include "ruby/internal/config.h" /* for HAVE_LIBGMP */
+#include "ruby/ruby.h" /* for struct RBasic */
+#include "internal/gc.h" /* for RB_OBJ_WRITE */
+#include "internal/numeric.h" /* for INT_POSITIVE_P */
+#include "ruby_assert.h" /* for assert */
+
+struct RRational {
+ struct RBasic basic;
+ VALUE num;
+ VALUE den;
+};
+
+#define RRATIONAL(obj) ((struct RRational *)(obj))
+
+/* rational.c */
+VALUE rb_rational_canonicalize(VALUE x);
+VALUE rb_rational_uminus(VALUE self);
+VALUE rb_rational_plus(VALUE self, VALUE other);
+VALUE rb_rational_minus(VALUE self, VALUE other);
+VALUE rb_rational_mul(VALUE self, VALUE other);
+VALUE rb_rational_div(VALUE self, VALUE other);
+VALUE rb_lcm(VALUE x, VALUE y);
+VALUE rb_rational_reciprocal(VALUE x);
+VALUE rb_cstr_to_rat(const char *, int);
+VALUE rb_rational_hash(VALUE self);
+VALUE rb_rational_abs(VALUE self);
+VALUE rb_rational_cmp(VALUE self, VALUE other);
+VALUE rb_rational_pow(VALUE self, VALUE other);
+VALUE rb_rational_floor(VALUE self, int ndigits);
+VALUE rb_numeric_quo(VALUE x, VALUE y);
+VALUE rb_flo_round_by_rational(int argc, VALUE *argv, VALUE num);
+VALUE rb_float_numerator(VALUE x);
+VALUE rb_float_denominator(VALUE x);
+
+static inline void RATIONAL_SET_NUM(VALUE r, VALUE n);
+static inline void RATIONAL_SET_DEN(VALUE r, VALUE d);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* rational.c (export) */
+VALUE rb_gcd(VALUE x, VALUE y);
+VALUE rb_gcd_normal(VALUE self, VALUE other);
+#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
+VALUE rb_gcd_gmp(VALUE x, VALUE y);
+#endif
+RUBY_SYMBOL_EXPORT_END
+
+static inline void
+RATIONAL_SET_NUM(VALUE r, VALUE n)
+{
+ assert(RB_INTEGER_TYPE_P(n));
+ RB_OBJ_WRITE(r, &RRATIONAL(r)->num, n);
+}
+
+static inline void
+RATIONAL_SET_DEN(VALUE r, VALUE d)
+{
+ assert(RB_INTEGER_TYPE_P(d));
+ assert(INT_POSITIVE_P(d));
+ RB_OBJ_WRITE(r, &RRATIONAL(r)->den, d);
+}
+
+#endif /* INTERNAL_RATIONAL_H */
diff --git a/internal/re.h b/internal/re.h
new file mode 100644
index 0000000000..8b31b3d8a5
--- /dev/null
+++ b/internal/re.h
@@ -0,0 +1,30 @@
+#ifndef INTERNAL_RE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_RE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Regexp.
+ */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for VALUE */
+
+/* re.c */
+VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
+VALUE rb_reg_check_preprocess(VALUE);
+long rb_reg_search0(VALUE, VALUE, long, int, int);
+VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
+bool rb_reg_start_with_p(VALUE re, VALUE str);
+VALUE rb_reg_hash(VALUE re);
+VALUE rb_reg_equal(VALUE re1, VALUE re2);
+void rb_backref_set_string(VALUE string, long pos, long len);
+void rb_match_unbusy(VALUE);
+int rb_match_count(VALUE match);
+int rb_match_nth_defined(int nth, VALUE match);
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_reg_new_ary(VALUE ary, int options);
+MJIT_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_RE_H */
diff --git a/internal/sanitizers.h b/internal/sanitizers.h
new file mode 100644
index 0000000000..6e2d81137f
--- /dev/null
+++ b/internal/sanitizers.h
@@ -0,0 +1,190 @@
+#ifndef INTERNAL_SANITIZERS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_SANITIZERS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for ASAN / MSAN / etc.
+ */
+#include "ruby/internal/config.h"
+#include "internal/compilers.h" /* for __has_feature */
+
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+# include <valgrind/memcheck.h>
+#endif
+
+#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
+# include <sanitizer/asan_interface.h>
+#endif
+
+#ifdef HAVE_SANITIZER_MSAN_INTERFACE_H
+# if __has_feature(memory_sanitizer)
+# include <sanitizer/msan_interface.h>
+# endif
+#endif
+
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for VALUE */
+
+#if 0
+#elif __has_feature(memory_sanitizer) && __has_feature(address_sanitizer)
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
+ __attribute__((__no_sanitize__("memory, address"), __noinline__)) x
+#elif __has_feature(address_sanitizer)
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
+ __attribute__((__no_sanitize__("address"), __noinline__)) x
+#elif defined(NO_SANITIZE_ADDRESS)
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
+ NO_SANITIZE_ADDRESS(NOINLINE(x))
+#elif defined(NO_ADDRESS_SAFETY_ANALYSIS)
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
+ NO_ADDRESS_SAFETY_ANALYSIS(NOINLINE(x))
+#else
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) x
+#endif
+
+#if defined(NO_SANITIZE) && RBIMPL_COMPILER_IS(GCC)
+/* GCC warns about unknown sanitizer, which is annoying. */
+# include "internal/warnings.h"
+# undef NO_SANITIZE
+# define NO_SANITIZE(x, y) \
+ COMPILER_WARNING_PUSH; \
+ COMPILER_WARNING_IGNORED(-Wattributes); \
+ __attribute__((__no_sanitize__(x))) y; \
+ COMPILER_WARNING_POP
+#endif
+
+#ifndef NO_SANITIZE
+# define NO_SANITIZE(x, y) y
+#endif
+
+#if !__has_feature(address_sanitizer)
+# define __asan_poison_memory_region(x, y)
+# define __asan_unpoison_memory_region(x, y)
+# define __asan_region_is_poisoned(x, y) 0
+#endif
+
+#if !__has_feature(memory_sanitizer)
+# define __msan_allocated_memory(x, y) ((void)(x), (void)(y))
+# define __msan_poison(x, y) ((void)(x), (void)(y))
+# define __msan_unpoison(x, y) ((void)(x), (void)(y))
+# define __msan_unpoison_string(x) ((void)(x))
+#endif
+
+#ifdef VALGRIND_MAKE_READABLE
+# define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
+#endif
+
+#ifdef VALGRIND_MAKE_WRITABLE
+# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
+#endif
+
+#ifndef VALGRIND_MAKE_MEM_DEFINED
+# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
+#endif
+
+#ifndef VALGRIND_MAKE_MEM_UNDEFINED
+# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
+#endif
+
+#ifndef MJIT_HEADER
+
+/*!
+ * This function asserts that a (continuous) memory region from ptr to size
+ * being "poisoned". Both read / write access to such memory region are
+ * prohibited until properly unpoisoned. The region must be previously
+ * allocated (do not pass a freed pointer here), but not necessarily be an
+ * entire object that the malloc returns. You can punch hole a part of a
+ * gigantic heap arena. This is handy when you do not free an allocated memory
+ * region to reuse later: poison when you keep it unused, and unpoison when you
+ * reuse.
+ *
+ * \param[in] ptr pointer to the beginning of the memory region to poison.
+ * \param[in] size the length of the memory region to poison.
+ */
+static inline void
+asan_poison_memory_region(const volatile void *ptr, size_t size)
+{
+ __msan_poison(ptr, size);
+ __asan_poison_memory_region(ptr, size);
+}
+
+/*!
+ * This is a variant of asan_poison_memory_region that takes a VALUE.
+ *
+ * \param[in] obj target object.
+ */
+static inline void
+asan_poison_object(VALUE obj)
+{
+ MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
+ asan_poison_memory_region(ptr, SIZEOF_VALUE);
+}
+
+#if !__has_feature(address_sanitizer)
+#define asan_poison_object_if(ptr, obj) ((void)(ptr), (void)(obj))
+#else
+#define asan_poison_object_if(ptr, obj) do { \
+ if (ptr) asan_poison_object(obj); \
+ } while (0)
+#endif
+
+/*!
+ * This function predicates if the given object is fully addressable or not.
+ *
+ * \param[in] obj target object.
+ * \retval 0 the given object is fully addressable.
+ * \retval otherwise pointer to first such byte who is poisoned.
+ */
+static inline void *
+asan_poisoned_object_p(VALUE obj)
+{
+ MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
+ return __asan_region_is_poisoned(ptr, SIZEOF_VALUE);
+}
+
+/*!
+ * This function asserts that a (formally poisoned) memory region from ptr to
+ * size is now addressable. Write access to such memory region gets allowed.
+ * However read access might or might not be possible depending on situations,
+ * because the region can have contents of previous usages. That information
+ * should be passed by the malloc_p flag. If that is true, the contents of the
+ * region is _not_ fully defined (like the return value of malloc behaves).
+ * Reading from there is NG; write something first. If malloc_p is false on
+ * the other hand, that memory region is fully defined and can be read
+ * immediately.
+ *
+ * \param[in] ptr pointer to the beginning of the memory region to unpoison.
+ * \param[in] size the length of the memory region.
+ * \param[in] malloc_p if the memory region is like a malloc's return value or not.
+ */
+static inline void
+asan_unpoison_memory_region(const volatile void *ptr, size_t size, bool malloc_p)
+{
+ __asan_unpoison_memory_region(ptr, size);
+ if (malloc_p) {
+ __msan_allocated_memory(ptr, size);
+ }
+ else {
+ __msan_unpoison(ptr, size);
+ }
+}
+
+/*!
+ * This is a variant of asan_unpoison_memory_region that takes a VALUE.
+ *
+ * \param[in] obj target object.
+ * \param[in] malloc_p if the memory region is like a malloc's return value or not.
+ */
+static inline void
+asan_unpoison_object(VALUE obj, bool newobj_p)
+{
+ MAYBE_UNUSED(struct RVALUE *) ptr = (void *)obj;
+ asan_unpoison_memory_region(ptr, SIZEOF_VALUE, newobj_p);
+}
+
+#endif /* MJIT_HEADER */
+
+#endif /* INTERNAL_SANITIZERS_H */
diff --git a/internal/serial.h b/internal/serial.h
new file mode 100644
index 0000000000..df9e9a44f0
--- /dev/null
+++ b/internal/serial.h
@@ -0,0 +1,23 @@
+#ifndef INTERNAL_SERIAL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_SERIAL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for rb_serial_t.
+ */
+#include "ruby/internal/config.h" /* for HAVE_LONG_LONG */
+#include "ruby/defines.h" /* for LONG_LONG */
+
+#ifndef HAVE_LONG_LONG
+# error need C99+
+#endif
+
+typedef unsigned LONG_LONG rb_serial_t;
+#define SERIALT2NUM ULL2NUM
+#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
+#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
+
+#endif /* INTERNAL_SERIAL_H */
diff --git a/internal/signal.h b/internal/signal.h
new file mode 100644
index 0000000000..86fb54e949
--- /dev/null
+++ b/internal/signal.h
@@ -0,0 +1,21 @@
+#ifndef INTERNAL_SIGNAL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_SIGNAL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for SignalException.
+ */
+
+/* signal.c */
+extern int ruby_enable_coredump;
+int rb_get_next_signal(void);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* signal.c (export) */
+int rb_grantpt(int fd);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_SIGNAL_H */
diff --git a/internal/static_assert.h b/internal/static_assert.h
new file mode 100644
index 0000000000..70dd0b7a1e
--- /dev/null
+++ b/internal/static_assert.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_STATIC_ASSERT_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_STATIC_ASSERT_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief C11 shim for _Static_assert.
+ */
+#include "ruby/internal/static_assert.h"
+#ifndef STATIC_ASSERT
+# define STATIC_ASSERT RBIMPL_STATIC_ASSERT
+#endif
+
+#endif /* INTERNAL_STATIC_ASSERT_H */
diff --git a/internal/string.h b/internal/string.h
new file mode 100644
index 0000000000..12edbff2b1
--- /dev/null
+++ b/internal/string.h
@@ -0,0 +1,147 @@
+#ifndef INTERNAL_STRING_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_STRING_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for String.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "internal/compilers.h" /* for __has_builtin */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/encoding.h" /* for rb_encoding */
+#include "ruby/ruby.h" /* for VALUE */
+
+#define STR_NOEMBED FL_USER1
+#define STR_SHARED FL_USER2 /* = ELTS_SHARED */
+
+#ifdef rb_fstring_cstr
+# undef rb_fstring_cstr
+#endif
+
+/* string.c */
+VALUE rb_fstring(VALUE);
+VALUE rb_fstring_cstr(const char *str);
+VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
+int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
+int rb_str_symname_p(VALUE);
+VALUE rb_str_quote_unprintable(VALUE);
+char *rb_str_fill_terminator(VALUE str, const int termlen);
+void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
+VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
+VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
+VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
+VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len,
+ rb_encoding *from, int ecflags, VALUE ecopts);
+VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl);
+VALUE rb_str_escape(VALUE str);
+size_t rb_str_memsize(VALUE);
+char *rb_str_to_cstr(VALUE str);
+const char *ruby_escaped_char(int c);
+void rb_str_make_independent(VALUE str);
+int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc);
+int rb_ascii8bit_appendable_encoding_index(rb_encoding *enc, unsigned int code);
+VALUE rb_str_include(VALUE str, VALUE arg);
+
+static inline bool STR_EMBED_P(VALUE str);
+static inline bool STR_SHARED_P(VALUE str);
+static inline VALUE QUOTE(VALUE v);
+static inline VALUE QUOTE_ID(ID v);
+static inline bool is_ascii_string(VALUE str);
+static inline bool is_broken_string(VALUE str);
+static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* string.c (export) */
+VALUE rb_str_tmp_frozen_acquire(VALUE str);
+void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
+VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
+VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
+VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
+void rb_str_make_embedded(VALUE);
+size_t rb_str_size_as_embedded(VALUE);
+bool rb_str_reembeddable_p(VALUE);
+void rb_str_update_shared_ary(VALUE str, VALUE old_root, VALUE new_root);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_fstring_new(const char *ptr, long len);
+VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
+VALUE rb_str_opt_plus(VALUE x, VALUE y);
+VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
+VALUE rb_str_eql(VALUE str1, VALUE str2);
+VALUE rb_id_quote_unprintable(ID);
+VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
+
+struct rb_execution_context_struct;
+VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str);
+MJIT_SYMBOL_EXPORT_END
+
+#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
+#define rb_fstring_literal(str) rb_fstring_lit(str)
+#define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
+#define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
+
+static inline VALUE
+QUOTE(VALUE v)
+{
+ return rb_str_quote_unprintable(v);
+}
+
+static inline VALUE
+QUOTE_ID(ID i)
+{
+ return rb_id_quote_unprintable(i);
+}
+
+static inline bool
+STR_EMBED_P(VALUE str)
+{
+ return ! FL_TEST_RAW(str, STR_NOEMBED);
+}
+
+static inline bool
+STR_SHARED_P(VALUE str)
+{
+ return FL_ALL_RAW(str, STR_NOEMBED | STR_SHARED);
+}
+
+static inline bool
+is_ascii_string(VALUE str)
+{
+ return rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT;
+}
+
+static inline bool
+is_broken_string(VALUE str)
+{
+ return rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN;
+}
+
+/* expect tail call optimization */
+// YJIT needs this function to never allocate and never raise
+static inline VALUE
+rb_str_eql_internal(const VALUE str1, const VALUE str2)
+{
+ const long len = RSTRING_LEN(str1);
+ const char *ptr1, *ptr2;
+
+ if (len != RSTRING_LEN(str2)) return Qfalse;
+ if (!rb_str_comparable(str1, str2)) return Qfalse;
+ if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2)))
+ return Qtrue;
+ if (memcmp(ptr1, ptr2, len) == 0)
+ return Qtrue;
+ return Qfalse;
+}
+
+#if __has_builtin(__builtin_constant_p)
+# define rb_fstring_cstr(str) \
+ (__builtin_constant_p(str) ? \
+ rb_fstring_new((str), (long)strlen(str)) : \
+ (rb_fstring_cstr)(str))
+#endif
+#endif /* INTERNAL_STRING_H */
diff --git a/internal/struct.h b/internal/struct.h
new file mode 100644
index 0000000000..8acc00ec3c
--- /dev/null
+++ b/internal/struct.h
@@ -0,0 +1,153 @@
+#ifndef INTERNAL_STRUCT_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_STRUCT_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Struct.
+ */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "internal/gc.h" /* for RB_OBJ_WRITE */
+#include "ruby/ruby.h" /* for struct RBasic */
+
+enum {
+ RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
+ RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
+ RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
+ RSTRUCT_TRANSIENT_FLAG = FL_USER3,
+};
+
+struct RStruct {
+ struct RBasic basic;
+ union {
+ struct {
+ long len;
+ const VALUE *ptr;
+ } heap;
+ const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
+ } as;
+};
+
+#define RSTRUCT(obj) ((struct RStruct *)(obj))
+
+#ifdef RSTRUCT_LEN
+# undef RSTRUCT_LEN
+#endif
+
+#ifdef RSTRUCT_PTR
+# undef RSTRUCT_PTR
+#endif
+
+#ifdef RSTRUCT_SET
+# undef RSTRUCT_SET
+#endif
+
+#ifdef RSTRUCT_GET
+# undef RSTRUCT_GET
+#endif
+
+#define RSTRUCT_LEN internal_RSTRUCT_LEN
+#define RSTRUCT_SET internal_RSTRUCT_SET
+#define RSTRUCT_GET internal_RSTRUCT_GET
+
+/* struct.c */
+VALUE rb_struct_init_copy(VALUE copy, VALUE s);
+VALUE rb_struct_lookup(VALUE s, VALUE idx);
+VALUE rb_struct_s_keyword_init(VALUE klass);
+static inline const VALUE *rb_struct_const_heap_ptr(VALUE st);
+static inline bool RSTRUCT_TRANSIENT_P(VALUE st);
+static inline void RSTRUCT_TRANSIENT_SET(VALUE st);
+static inline void RSTRUCT_TRANSIENT_UNSET(VALUE st);
+static inline long RSTRUCT_EMBED_LEN(VALUE st);
+static inline long RSTRUCT_LEN(VALUE st);
+static inline int RSTRUCT_LENINT(VALUE st);
+static inline const VALUE *RSTRUCT_CONST_PTR(VALUE st);
+static inline void RSTRUCT_SET(VALUE st, long k, VALUE v);
+static inline VALUE RSTRUCT_GET(VALUE st, long k);
+
+static inline bool
+RSTRUCT_TRANSIENT_P(VALUE st)
+{
+#if USE_TRANSIENT_HEAP
+ return FL_TEST_RAW(st, RSTRUCT_TRANSIENT_FLAG);
+#else
+ return false;
+#endif
+}
+
+static inline void
+RSTRUCT_TRANSIENT_SET(VALUE st)
+{
+#if USE_TRANSIENT_HEAP
+ FL_SET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
+#endif
+}
+
+static inline void
+RSTRUCT_TRANSIENT_UNSET(VALUE st)
+{
+#if USE_TRANSIENT_HEAP
+ FL_UNSET_RAW(st, RSTRUCT_TRANSIENT_FLAG);
+#endif
+}
+
+static inline long
+RSTRUCT_EMBED_LEN(VALUE st)
+{
+ long ret = FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK);
+ ret >>= RSTRUCT_EMBED_LEN_SHIFT;
+ return ret;
+}
+
+static inline long
+RSTRUCT_LEN(VALUE st)
+{
+ if (FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK)) {
+ return RSTRUCT_EMBED_LEN(st);
+ }
+ else {
+ return RSTRUCT(st)->as.heap.len;
+ }
+}
+
+static inline int
+RSTRUCT_LENINT(VALUE st)
+{
+ return rb_long2int(RSTRUCT_LEN(st));
+}
+
+static inline const VALUE *
+RSTRUCT_CONST_PTR(VALUE st)
+{
+ const struct RStruct *p = RSTRUCT(st);
+
+ if (FL_TEST_RAW(st, RSTRUCT_EMBED_LEN_MASK)) {
+ return p->as.ary;
+ }
+ else {
+ return p->as.heap.ptr;
+ }
+}
+
+static inline void
+RSTRUCT_SET(VALUE st, long k, VALUE v)
+{
+ RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[k], v);
+}
+
+static inline VALUE
+RSTRUCT_GET(VALUE st, long k)
+{
+ return RSTRUCT_CONST_PTR(st)[k];
+}
+
+static inline const VALUE *
+rb_struct_const_heap_ptr(VALUE st)
+{
+ /* TODO: check embed on debug mode */
+ return RSTRUCT(st)->as.heap.ptr;
+}
+
+#endif /* INTERNAL_STRUCT_H */
diff --git a/internal/symbol.h b/internal/symbol.h
new file mode 100644
index 0000000000..30c81ea004
--- /dev/null
+++ b/internal/symbol.h
@@ -0,0 +1,42 @@
+#ifndef INTERNAL_SYMBOL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_SYMBOL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Symbol.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/encoding.h" /* for rb_encoding */
+#include "internal/compilers.h" /* for __has_builtin */
+
+#ifdef rb_sym_intern_ascii_cstr
+# undef rb_sym_intern_ascii_cstr
+#endif
+
+/* symbol.c */
+VALUE rb_to_symbol_type(VALUE obj);
+VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
+VALUE rb_sym_intern_ascii(const char *ptr, long len);
+VALUE rb_sym_intern_ascii_cstr(const char *ptr);
+int rb_is_const_name(VALUE name);
+int rb_is_class_name(VALUE name);
+int rb_is_instance_name(VALUE name);
+int rb_is_local_name(VALUE name);
+PUREFUNC(int rb_is_const_sym(VALUE sym));
+PUREFUNC(int rb_is_attrset_sym(VALUE sym));
+ID rb_make_internal_id(void);
+ID rb_make_temporary_id(size_t n);
+void rb_gc_free_dsymbol(VALUE);
+int rb_static_id_valid_p(ID id);
+
+#if __has_builtin(__builtin_constant_p)
+#define rb_sym_intern_ascii_cstr(ptr) \
+ (__builtin_constant_p(ptr) ? \
+ rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : \
+ rb_sym_intern_ascii_cstr(ptr))
+#endif
+
+#endif /* INTERNAL_SYMBOL_H */
diff --git a/internal/thread.h b/internal/thread.h
new file mode 100644
index 0000000000..c3e54de683
--- /dev/null
+++ b/internal/thread.h
@@ -0,0 +1,56 @@
+#ifndef INTERNAL_THREAD_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_THREAD_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Thread.
+ */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/intern.h" /* for rb_blocking_function_t */
+
+struct rb_thread_struct; /* in vm_core.h */
+
+/* thread.c */
+#define COVERAGE_INDEX_LINES 0
+#define COVERAGE_INDEX_BRANCHES 1
+#define COVERAGE_TARGET_LINES 1
+#define COVERAGE_TARGET_BRANCHES 2
+#define COVERAGE_TARGET_METHODS 4
+#define COVERAGE_TARGET_ONESHOT_LINES 8
+#define COVERAGE_TARGET_EVAL 16
+
+VALUE rb_obj_is_mutex(VALUE obj);
+VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
+void rb_thread_execute_interrupts(VALUE th);
+VALUE rb_get_coverages(void);
+int rb_get_coverage_mode(void);
+VALUE rb_default_coverage(int);
+VALUE rb_thread_shield_new(void);
+bool rb_thread_shield_owned(VALUE self);
+VALUE rb_thread_shield_wait(VALUE self);
+VALUE rb_thread_shield_release(VALUE self);
+VALUE rb_thread_shield_destroy(VALUE self);
+int rb_thread_to_be_killed(VALUE thread);
+void rb_mutex_allow_trap(VALUE self, int val);
+VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
+VALUE rb_mutex_owned_p(VALUE self);
+VALUE rb_exec_recursive_outer_mid(VALUE (*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h, ID mid);
+
+int rb_thread_wait_for_single_fd(int fd, int events, struct timeval * timeout);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* Temporary. This API will be removed (renamed). */
+VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
+
+/* thread.c (export) */
+int ruby_thread_has_gvl_p(void); /* for ext/fiddle/closure.c */
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+int rb_threadptr_execute_interrupts(struct rb_thread_struct *th, int blocking_timing);
+MJIT_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_THREAD_H */
diff --git a/internal/time.h b/internal/time.h
new file mode 100644
index 0000000000..e21b3574f6
--- /dev/null
+++ b/internal/time.h
@@ -0,0 +1,37 @@
+#ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_TIME_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Time.
+ */
+#include "ruby/internal/config.h" /* for SIGNEDNESS_OF_TIME_T */
+#include "internal/bits.h" /* for SIGNED_INTEGER_MAX */
+#include "ruby/ruby.h" /* for VALUE */
+
+#if SIGNEDNESS_OF_TIME_T < 0 /* signed */
+# define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
+# define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
+#elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
+# define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
+# define TIMET_MIN ((time_t)0)
+#endif
+
+struct timeval; /* <- in <sys/time.h> or <winsock2.h> */
+
+/* time.c */
+struct timeval rb_time_timeval(VALUE);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* time.c (export) */
+void ruby_reset_leap_second_info(void);
+#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY
+RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY()
+#endif
+void ruby_reset_timezone(const char *);
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_TIME_H */
diff --git a/internal/transcode.h b/internal/transcode.h
new file mode 100644
index 0000000000..9922332ea9
--- /dev/null
+++ b/internal/transcode.h
@@ -0,0 +1,20 @@
+#ifndef INTERNAL_TRANSCODE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_TRANSCODE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for Encoding::Converter.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "ruby/ruby.h" /* for VALUE */
+#include "ruby/encoding.h" /* for rb_econv_t */
+
+/* transcode.c */
+extern VALUE rb_cEncodingConverter;
+size_t rb_econv_memsize(rb_econv_t *);
+
+#endif /* INTERNAL_TRANSCODE_H */
diff --git a/internal/util.h b/internal/util.h
new file mode 100644
index 0000000000..6eadbb9f94
--- /dev/null
+++ b/internal/util.h
@@ -0,0 +1,27 @@
+#ifndef INTERNAL_UTIL_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_UTIL_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header corresponding util.c.
+ * @warning DO NOT ADD RANDOM GARBAGE HERE THIS FILE IS FOR util.c
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
+#endif /* `#define`d in ruby/config.h) */
+
+/* util.c */
+char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
+char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* util.c (export) */
+RUBY_SYMBOL_EXPORT_END
+
+#endif /* INTERNAL_UTIL_H */
diff --git a/internal/variable.h b/internal/variable.h
new file mode 100644
index 0000000000..6dec6a6759
--- /dev/null
+++ b/internal/variable.h
@@ -0,0 +1,90 @@
+#ifndef INTERNAL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_VARIABLE_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for variables.
+ */
+#include "ruby/internal/config.h"
+#include <stddef.h> /* for size_t */
+#include "constant.h" /* for rb_const_entry_t */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "ruby/ruby.h" /* for VALUE */
+#include "shape.h" /* for rb_shape_t */
+
+/* global variable */
+
+#define ROBJECT_TRANSIENT_FLAG FL_USER2
+
+/* variable.c */
+void rb_gc_mark_global_tbl(void);
+void rb_gc_update_global_tbl(void);
+size_t rb_generic_ivar_memsize(VALUE);
+VALUE rb_search_class_path(VALUE);
+VALUE rb_attr_delete(VALUE, ID);
+void rb_autoload_str(VALUE mod, ID id, VALUE file);
+VALUE rb_autoload_at_p(VALUE, ID, int);
+NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
+rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
+rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
+void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
+void rb_gvar_ractor_local(const char *name);
+static inline bool ROBJ_TRANSIENT_P(VALUE obj);
+static inline void ROBJ_TRANSIENT_SET(VALUE obj);
+static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
+
+struct gen_ivtbl;
+int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
+int rb_obj_evacuate_ivs_to_hash_table(ID key, VALUE val, st_data_t arg);
+
+RUBY_SYMBOL_EXPORT_BEGIN
+/* variable.c (export) */
+void rb_mark_generic_ivar(VALUE);
+void rb_mv_generic_ivar(VALUE src, VALUE dst);
+VALUE rb_const_missing(VALUE klass, VALUE name);
+int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
+void rb_iv_tbl_copy(VALUE dst, VALUE src);
+RUBY_SYMBOL_EXPORT_END
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
+VALUE rb_gvar_get(ID);
+VALUE rb_gvar_set(ID, VALUE);
+VALUE rb_gvar_defined(ID);
+void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
+rb_shape_t * rb_grow_iv_list(VALUE obj);
+void rb_ensure_iv_list_size(VALUE obj, uint32_t len, uint32_t newsize);
+struct gen_ivtbl *rb_ensure_generic_iv_list_size(VALUE obj, rb_shape_t *shape, uint32_t newsize);
+attr_index_t rb_obj_ivar_set(VALUE obj, ID id, VALUE val);
+MJIT_SYMBOL_EXPORT_END
+
+static inline bool
+ROBJ_TRANSIENT_P(VALUE obj)
+{
+#if USE_TRANSIENT_HEAP
+ return FL_TEST_RAW(obj, ROBJECT_TRANSIENT_FLAG);
+#else
+ return false;
+#endif
+}
+
+static inline void
+ROBJ_TRANSIENT_SET(VALUE obj)
+{
+#if USE_TRANSIENT_HEAP
+ FL_SET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
+#endif
+}
+
+static inline void
+ROBJ_TRANSIENT_UNSET(VALUE obj)
+{
+#if USE_TRANSIENT_HEAP
+ FL_UNSET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
+#endif
+}
+
+#endif /* INTERNAL_VARIABLE_H */
diff --git a/internal/vm.h b/internal/vm.h
new file mode 100644
index 0000000000..cf245c6579
--- /dev/null
+++ b/internal/vm.h
@@ -0,0 +1,134 @@
+#ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_VM_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header for RubyVM.
+ */
+#include "ruby/internal/stdbool.h" /* for bool */
+#include "internal/serial.h" /* for rb_serial_t */
+#include "internal/static_assert.h" /* for STATIC_ASSERT */
+#include "ruby/ruby.h" /* for ID */
+#include "ruby/st.h" /* for st_table */
+
+#ifdef rb_funcallv
+# undef rb_funcallv
+#endif
+
+#ifdef rb_method_basic_definition_p
+# undef rb_method_basic_definition_p
+#endif
+
+struct rb_callable_method_entry_struct; /* in method.h */
+struct rb_method_definition_struct; /* in method.h */
+struct rb_execution_context_struct; /* in vm_core.h */
+struct rb_control_frame_struct; /* in vm_core.h */
+struct rb_callinfo; /* in vm_core.h */
+
+enum method_missing_reason {
+ MISSING_NOENTRY = 0x00,
+ MISSING_PRIVATE = 0x01,
+ MISSING_PROTECTED = 0x02,
+ MISSING_FCALL = 0x04,
+ MISSING_VCALL = 0x08,
+ MISSING_SUPER = 0x10,
+ MISSING_MISSING = 0x20,
+ MISSING_NONE = 0x40
+};
+
+/* vm_insnhelper.h */
+VALUE rb_vm_push_frame_fname(struct rb_execution_context_struct *ec, VALUE fname);
+
+/* vm.c */
+VALUE rb_obj_is_thread(VALUE obj);
+void rb_vm_mark(void *ptr);
+void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
+PUREFUNC(VALUE rb_vm_top_self(void));
+const void **rb_vm_get_insns_address_table(void);
+VALUE rb_source_location(int *pline);
+const char *rb_source_location_cstr(int *pline);
+MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
+int rb_vm_add_root_module(VALUE module);
+void rb_vm_check_redefinition_by_prepend(VALUE klass);
+int rb_vm_check_optimizable_mid(VALUE mid);
+VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
+MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
+PUREFUNC(st_table *rb_vm_fstring_table(void));
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
+MJIT_SYMBOL_EXPORT_END
+
+/* vm_eval.c */
+VALUE rb_current_realfilepath(void);
+VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
+typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
+VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
+ rb_check_funcall_hook *hook, VALUE arg);
+VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
+ rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
+const char *rb_type_str(enum ruby_value_type type);
+VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
+VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
+VALUE rb_yield_1(VALUE val);
+VALUE rb_yield_force_blockarg(VALUE values);
+VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
+ rb_block_call_func_t bl_proc, int min_argc, int max_argc,
+ VALUE data2);
+void rb_check_stack_overflow(void);
+
+/* vm_insnhelper.c */
+VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
+VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
+
+struct rb_iseq_struct;
+MJIT_SYMBOL_EXPORT_BEGIN
+const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
+MJIT_SYMBOL_EXPORT_END
+
+/* vm_method.c */
+struct rb_execution_context_struct;
+MJIT_SYMBOL_EXPORT_BEGIN
+int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
+MJIT_SYMBOL_EXPORT_END
+
+void rb_clear_constant_cache(void);
+
+/* vm_dump.c */
+void rb_print_backtrace(void);
+
+/* vm_backtrace.c */
+VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
+VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
+VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
+VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
+VALUE rb_make_backtrace(void);
+void rb_backtrace_print_as_bugreport(void);
+int rb_backtrace_p(VALUE obj);
+VALUE rb_backtrace_to_str_ary(VALUE obj);
+VALUE rb_backtrace_to_location_ary(VALUE obj);
+void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
+int rb_frame_info_p(VALUE obj);
+int rb_get_node_id_from_frame_info(VALUE obj);
+const struct rb_iseq_struct *rb_get_iseq_from_frame_info(VALUE obj);
+
+MJIT_SYMBOL_EXPORT_BEGIN
+VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
+void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
+MJIT_SYMBOL_EXPORT_END
+
+#define RUBY_DTRACE_CREATE_HOOK(name, arg) \
+ RUBY_DTRACE_HOOK(name##_CREATE, arg)
+#define RUBY_DTRACE_HOOK(name, arg) \
+do { \
+ if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
+ int dtrace_line; \
+ const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
+ if (!dtrace_file) dtrace_file = ""; \
+ RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
+ } \
+} while (0)
+#endif /* INTERNAL_VM_H */
diff --git a/internal/warnings.h b/internal/warnings.h
new file mode 100644
index 0000000000..020212ebd8
--- /dev/null
+++ b/internal/warnings.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_WARNINGS_H /*-*-C-*-vi:se ft=c:*/
+#define INTERNAL_WARNINGS_H
+/**
+ * @author Ruby developers <ruby-core@ruby-lang.org>
+ * @copyright This file is a part of the programming language Ruby.
+ * Permission is hereby granted, to either redistribute and/or
+ * modify this file, provided that the conditions mentioned in the
+ * file COPYING are met. Consult the file for details.
+ * @brief Internal header to suppress / mandate warnings.
+ */
+#include "ruby/internal/warning_push.h"
+#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
+#define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
+#define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
+#define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
+#endif /* INTERNAL_WARNINGS_H */
diff --git a/io.c b/io.c
index 42528c0fd5..99ec59da29 100644
--- a/io.c
+++ b/io.c
@@ -11,38 +11,34 @@
**********************************************************************/
-#include "ruby/encoding.h"
-#include "ruby/io.h"
-#include "ruby/thread.h"
-#include "internal.h"
-#include "dln.h"
-#include "encindex.h"
-#include "id.h"
+#include "ruby/internal/config.h"
+
+#include "ruby/fiber/scheduler.h"
+#include "ruby/io/buffer.h"
+
+#ifdef _WIN32
+# include "ruby/ruby.h"
+# include "ruby/io.h"
+#endif
+
#include <ctype.h>
#include <errno.h>
-#include "ruby_atomic.h"
-#include "ccan/list/list.h"
+#include <stddef.h>
/* non-Linux poll may not work on all FDs */
#if defined(HAVE_POLL)
-# if defined(__linux__)
-# define USE_POLL 1
-# endif
-# if defined(__FreeBSD_version) && __FreeBSD_version >= 1100000
-# define USE_POLL 1
-# endif
+# if defined(__linux__)
+# define USE_POLL 1
+# endif
+# if defined(__FreeBSD_version) && __FreeBSD_version >= 1100000
+# define USE_POLL 1
+# endif
#endif
#ifndef USE_POLL
-# define USE_POLL 0
-#endif
-
-#if !USE_POLL
-# include "vm_core.h"
+# define USE_POLL 0
#endif
-#include "builtin.h"
-
#undef free
#define free(x) xfree(x)
@@ -79,10 +75,6 @@
#include <sys/fcntl.h>
#endif
-#if !HAVE_OFF_T && !defined(off_t)
-# define off_t long
-#endif
-
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -119,14 +111,38 @@
# include <copyfile.h>
#endif
+#include "ruby/internal/stdbool.h"
+#include "ccan/list/list.h"
+#include "dln.h"
+#include "encindex.h"
+#include "id.h"
+#include "internal.h"
+#include "internal/encoding.h"
+#include "internal/error.h"
+#include "internal/inits.h"
+#include "internal/io.h"
+#include "internal/numeric.h"
+#include "internal/object.h"
+#include "internal/process.h"
+#include "internal/thread.h"
+#include "internal/transcode.h"
+#include "internal/variable.h"
+#include "ruby/io.h"
+#include "ruby/io/buffer.h"
+#include "ruby/missing.h"
+#include "ruby/thread.h"
#include "ruby/util.h"
+#include "ruby_atomic.h"
+#include "ruby/ractor.h"
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
+#if !USE_POLL
+# include "vm_core.h"
#endif
-#if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
-# error off_t is bigger than long, but you have no long long...
+#include "builtin.h"
+
+#ifndef O_ACCMODE
+#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
#ifndef PIPE_BUF
@@ -151,6 +167,8 @@ off_t __syscall(quad_t number, ...);
#define IO_RBUF_CAPA_FOR(fptr) (NEED_READCONV(fptr) ? IO_CBUF_CAPA_MIN : IO_RBUF_CAPA_MIN)
#define IO_WBUF_CAPA_MIN 8192
+#define IO_MAX_BUFFER_GROWTH 8 * 1024 * 1024 // 8MB
+
/* define system APIs */
#ifdef _WIN32
#undef open
@@ -159,18 +177,10 @@ off_t __syscall(quad_t number, ...);
#define rename(f, t) rb_w32_urename((f), (t))
#endif
-#if defined(_WIN32)
-# define RUBY_PIPE_NONBLOCK_DEFAULT (0)
-#elif defined(O_NONBLOCK)
- /* disabled for [Bug #15356] (Rack::Deflater + rails) failure: */
-# define RUBY_PIPE_NONBLOCK_DEFAULT (0)
-#else /* any platforms where O_NONBLOCK does not exist? */
-# define RUBY_PIPE_NONBLOCK_DEFAULT (0)
-#endif
-
VALUE rb_cIO;
VALUE rb_eEOFError;
VALUE rb_eIOError;
+VALUE rb_eIOTimeoutError;
VALUE rb_mWaitReadable;
VALUE rb_mWaitWritable;
@@ -191,7 +201,7 @@ VALUE rb_default_rs;
static VALUE argf;
-static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding;
+static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding, id_fileno;
static VALUE sym_mode, sym_perm, sym_flags, sym_extenc, sym_intenc, sym_encoding, sym_open_args;
static VALUE sym_textmode, sym_binmode, sym_autoclose;
static VALUE sym_SET, sym_CUR, sym_END;
@@ -203,6 +213,8 @@ static VALUE sym_DATA;
static VALUE sym_HOLE;
#endif
+static VALUE prep_io(int fd, int fmode, VALUE klass, const char *path);
+
struct argf {
VALUE filename, current_file;
long last_lineno; /* $. */
@@ -237,7 +249,7 @@ rb_update_max_fd(int fd)
}
while (max_fd < afd) {
- max_fd = ATOMIC_CAS(max_file_descriptor, max_fd, afd);
+ max_fd = ATOMIC_CAS(max_file_descriptor, max_fd, afd);
}
}
@@ -282,34 +294,53 @@ rb_fix_detect_o_cloexec(int fd)
rb_bug("rb_fix_detect_o_cloexec: fcntl(%d, F_GETFD) failed: %s", fd, strerror(errno));
if (flags & FD_CLOEXEC)
- return 1;
+ return 1;
#endif /* fall through if O_CLOEXEC does not work: */
rb_maygvl_fd_fix_cloexec(fd);
return 0;
}
+static inline bool
+io_again_p(int e)
+{
+ return (e == EWOULDBLOCK) || (e == EAGAIN);
+}
+
int
rb_cloexec_open(const char *pathname, int flags, mode_t mode)
{
int ret;
static int o_cloexec_state = -1; /* <0: unknown, 0: ignored, >0: working */
+ static const int retry_interval = 0;
+ static const int retry_max_count = 10000;
+
+ int retry_count = 0;
+
#ifdef O_CLOEXEC
/* O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */
flags |= O_CLOEXEC;
#elif defined O_NOINHERIT
flags |= O_NOINHERIT;
#endif
- ret = open(pathname, flags, mode);
+
+ while ((ret = open(pathname, flags, mode)) == -1) {
+ int e = errno;
+ if (!io_again_p(e)) break;
+ if (retry_count++ >= retry_max_count) break;
+
+ sleep(retry_interval);
+ }
+
if (ret < 0) return ret;
if (ret <= 2 || o_cloexec_state == 0) {
- rb_maygvl_fd_fix_cloexec(ret);
+ rb_maygvl_fd_fix_cloexec(ret);
}
else if (o_cloexec_state > 0) {
- return ret;
+ return ret;
}
else {
- o_cloexec_state = rb_fix_detect_o_cloexec(ret);
+ o_cloexec_state = rb_fix_detect_o_cloexec(ret);
}
return ret;
}
@@ -375,44 +406,37 @@ rb_fd_set_nonblock(int fd)
}
int
-rb_cloexec_pipe(int fildes[2])
+rb_cloexec_pipe(int descriptors[2])
{
- int ret;
-
-#if defined(HAVE_PIPE2)
- static int try_pipe2 = 1;
- if (try_pipe2) {
- ret = pipe2(fildes, O_CLOEXEC | RUBY_PIPE_NONBLOCK_DEFAULT);
- if (ret != -1)
- return ret;
- /* pipe2 is available since Linux 2.6.27, glibc 2.9. */
- if (errno == ENOSYS) {
- try_pipe2 = 0;
- ret = pipe(fildes);
- }
- }
- else {
- ret = pipe(fildes);
- }
+#ifdef HAVE_PIPE2
+ int result = pipe2(descriptors, O_CLOEXEC | O_NONBLOCK);
#else
- ret = pipe(fildes);
+ int result = pipe(descriptors);
#endif
- if (ret < 0) return ret;
+
+ if (result < 0)
+ return result;
+
#ifdef __CYGWIN__
- if (ret == 0 && fildes[1] == -1) {
- close(fildes[0]);
- fildes[0] = -1;
- errno = ENFILE;
- return -1;
+ if (result == 0 && descriptors[1] == -1) {
+ close(descriptors[0]);
+ descriptors[0] = -1;
+ errno = ENFILE;
+ return -1;
}
#endif
- rb_maygvl_fd_fix_cloexec(fildes[0]);
- rb_maygvl_fd_fix_cloexec(fildes[1]);
- if (RUBY_PIPE_NONBLOCK_DEFAULT) {
- rb_fd_set_nonblock(fildes[0]);
- rb_fd_set_nonblock(fildes[1]);
- }
- return ret;
+
+#ifndef HAVE_PIPE2
+ rb_maygvl_fd_fix_cloexec(descriptors[0]);
+ rb_maygvl_fd_fix_cloexec(descriptors[1]);
+
+#ifndef _WIN32
+ rb_fd_set_nonblock(descriptors[0]);
+ rb_fd_set_nonblock(descriptors[1]);
+#endif
+#endif
+
+ return result;
}
int
@@ -442,7 +466,7 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd)
}
#elif defined(HAVE_FCNTL) && defined(F_DUPFD)
ret = fcntl(fd, F_DUPFD, minfd);
-#elif defined(HAVE_DUP)
+#else
ret = dup(fd);
if (ret >= 0 && ret < minfd) {
const int prev_fd = ret;
@@ -450,8 +474,6 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd)
close(prev_fd);
}
return ret;
-#else
-# error "dup() or fcntl(F_DUPFD) must be supported."
#endif
if (ret < 0) return ret;
rb_maygvl_fd_fix_cloexec(ret);
@@ -474,15 +496,15 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd)
#if defined(_WIN32)
#define WAIT_FD_IN_WIN32(fptr) \
- (rb_w32_io_cancelable_p((fptr)->fd) ? 0 : rb_thread_wait_fd((fptr)->fd))
+ (rb_w32_io_cancelable_p((fptr)->fd) ? Qnil : rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_READABLE), RUBY_IO_TIMEOUT_DEFAULT))
#else
#define WAIT_FD_IN_WIN32(fptr)
#endif
#define READ_CHECK(fptr) do {\
if (!READ_DATA_PENDING(fptr)) {\
- WAIT_FD_IN_WIN32(fptr);\
- rb_io_check_closed(fptr);\
+ WAIT_FD_IN_WIN32(fptr);\
+ rb_io_check_closed(fptr);\
}\
} while(0)
@@ -503,9 +525,51 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd)
static int io_fflush(rb_io_t *);
static rb_io_t *flush_before_seek(rb_io_t *fptr);
+#define FMODE_PREP (1<<16)
+#define FMODE_SIGNAL_ON_EPIPE (1<<17)
+
+#define fptr_signal_on_epipe(fptr) \
+ (((fptr)->mode & FMODE_SIGNAL_ON_EPIPE) != 0)
+
+#define fptr_set_signal_on_epipe(fptr, flag) \
+ ((flag) ? \
+ (fptr)->mode |= FMODE_SIGNAL_ON_EPIPE : \
+ (fptr)->mode &= ~FMODE_SIGNAL_ON_EPIPE)
+
+extern ID ruby_static_id_signo;
+
+NORETURN(static void raise_on_write(rb_io_t *fptr, int e, VALUE errinfo));
+static void
+raise_on_write(rb_io_t *fptr, int e, VALUE errinfo)
+{
+#if defined EPIPE
+ if (fptr_signal_on_epipe(fptr) && (e == EPIPE)) {
+ const VALUE sig =
+# if defined SIGPIPE
+ INT2FIX(SIGPIPE) - INT2FIX(0) +
+# endif
+ INT2FIX(0);
+ rb_ivar_set(errinfo, ruby_static_id_signo, sig);
+ }
+#endif
+ rb_exc_raise(errinfo);
+}
+
+#define rb_sys_fail_on_write(fptr) \
+ do { \
+ int e = errno; \
+ raise_on_write(fptr, e, rb_syserr_new_path(e, (fptr)->pathv)); \
+ } while (0)
+
#define NEED_NEWLINE_DECORATOR_ON_READ(fptr) ((fptr)->mode & FMODE_TEXTMODE)
#define NEED_NEWLINE_DECORATOR_ON_WRITE(fptr) ((fptr)->mode & FMODE_TEXTMODE)
#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+# define RUBY_CRLF_ENVIRONMENT 1
+#else
+# define RUBY_CRLF_ENVIRONMENT 0
+#endif
+
+#if RUBY_CRLF_ENVIRONMENT
/* Windows */
# define DEFAULT_TEXTMODE FMODE_TEXTMODE
# define TEXTMODE_NEWLINE_DECORATOR_ON_WRITE ECONV_CRLF_NEWLINE_DECORATOR
@@ -529,19 +593,19 @@ static rb_io_t *flush_before_seek(rb_io_t *fptr);
#define NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr) do {\
if (NEED_NEWLINE_DECORATOR_ON_READ(fptr)) {\
- if (((fptr)->mode & FMODE_READABLE) &&\
- !((fptr)->encs.ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {\
- setmode((fptr)->fd, O_BINARY);\
- }\
- else {\
- setmode((fptr)->fd, O_TEXT);\
- }\
+ if (((fptr)->mode & FMODE_READABLE) &&\
+ !((fptr)->encs.ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {\
+ setmode((fptr)->fd, O_BINARY);\
+ }\
+ else {\
+ setmode((fptr)->fd, O_TEXT);\
+ }\
}\
} while(0)
#define SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags) do {\
if ((enc2) && ((ecflags) & ECONV_DEFAULT_NEWLINE_DECORATOR)) {\
- (ecflags) |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;\
+ (ecflags) |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;\
}\
} while(0)
@@ -551,7 +615,7 @@ static rb_io_t *flush_before_seek(rb_io_t *fptr);
static void
io_unread(rb_io_t *fptr)
{
- off_t r, pos;
+ rb_off_t r, pos;
ssize_t read_size;
long i;
long newlines = 0;
@@ -561,28 +625,28 @@ io_unread(rb_io_t *fptr)
rb_io_check_closed(fptr);
if (fptr->rbuf.len == 0 || fptr->mode & FMODE_DUPLEX) {
- return;
+ return;
}
errno = 0;
if (!rb_w32_fd_is_text(fptr->fd)) {
- r = lseek(fptr->fd, -fptr->rbuf.len, SEEK_CUR);
- if (r < 0 && errno) {
- if (errno == ESPIPE)
- fptr->mode |= FMODE_DUPLEX;
- return;
- }
+ r = lseek(fptr->fd, -fptr->rbuf.len, SEEK_CUR);
+ if (r < 0 && errno) {
+ if (errno == ESPIPE)
+ fptr->mode |= FMODE_DUPLEX;
+ return;
+ }
- fptr->rbuf.off = 0;
- fptr->rbuf.len = 0;
- return;
+ fptr->rbuf.off = 0;
+ fptr->rbuf.len = 0;
+ return;
}
pos = lseek(fptr->fd, 0, SEEK_CUR);
if (pos < 0 && errno) {
- if (errno == ESPIPE)
- fptr->mode |= FMODE_DUPLEX;
- return;
+ if (errno == ESPIPE)
+ fptr->mode |= FMODE_DUPLEX;
+ return;
}
/* add extra offset for removed '\r' in rbuf */
@@ -591,36 +655,36 @@ io_unread(rb_io_t *fptr)
/* if the end of rbuf is '\r', rbuf doesn't have '\r' within rbuf.len */
if (*(fptr->rbuf.ptr + fptr->rbuf.capa - 1) == '\r') {
- newlines++;
+ newlines++;
}
for (i = 0; i < fptr->rbuf.len; i++) {
- if (*p == '\n') newlines++;
- if (extra_max == newlines) break;
- p++;
+ if (*p == '\n') newlines++;
+ if (extra_max == newlines) break;
+ p++;
}
buf = ALLOC_N(char, fptr->rbuf.len + newlines);
while (newlines >= 0) {
- r = lseek(fptr->fd, pos - fptr->rbuf.len - newlines, SEEK_SET);
- if (newlines == 0) break;
- if (r < 0) {
- newlines--;
- continue;
- }
- read_size = _read(fptr->fd, buf, fptr->rbuf.len + newlines);
- if (read_size < 0) {
- int e = errno;
- free(buf);
- rb_syserr_fail_path(e, fptr->pathv);
- }
- if (read_size == fptr->rbuf.len) {
- lseek(fptr->fd, r, SEEK_SET);
- break;
- }
- else {
- newlines--;
- }
+ r = lseek(fptr->fd, pos - fptr->rbuf.len - newlines, SEEK_SET);
+ if (newlines == 0) break;
+ if (r < 0) {
+ newlines--;
+ continue;
+ }
+ read_size = _read(fptr->fd, buf, fptr->rbuf.len + newlines);
+ if (read_size < 0) {
+ int e = errno;
+ free(buf);
+ rb_syserr_fail_path(e, fptr->pathv);
+ }
+ if (read_size == fptr->rbuf.len) {
+ lseek(fptr->fd, r, SEEK_SET);
+ break;
+ }
+ else {
+ newlines--;
+ }
}
free(buf);
fptr->rbuf.off = 0;
@@ -641,7 +705,7 @@ set_binary_mode_with_seek_cur(rb_io_t *fptr)
if (!rb_w32_fd_is_text(fptr->fd)) return O_BINARY;
if (fptr->rbuf.len == 0 || fptr->mode & FMODE_DUPLEX) {
- return setmode(fptr->fd, O_BINARY);
+ return setmode(fptr->fd, O_BINARY);
}
flush_before_seek(fptr);
return setmode(fptr->fd, O_BINARY);
@@ -710,7 +774,7 @@ void
rb_io_check_initialized(rb_io_t *fptr)
{
if (!fptr) {
- rb_raise(rb_eIOError, "uninitialized stream");
+ rb_raise(rb_eIOError, "uninitialized stream");
}
}
@@ -758,10 +822,10 @@ rb_io_set_write_io(VALUE io, VALUE w)
VALUE write_io;
rb_io_t *fptr = rb_io_get_fptr(io);
if (!RTEST(w)) {
- w = 0;
+ w = 0;
}
else {
- GetWriteIO(w);
+ GetWriteIO(w);
}
write_io = fptr->tied_io_for_writing;
fptr->tied_io_for_writing = w;
@@ -770,19 +834,62 @@ rb_io_set_write_io(VALUE io, VALUE w)
/*
* call-seq:
- * IO.try_convert(obj) -> io or nil
+ * timeout -> duration or nil
+ *
+ * Get the internal timeout duration or nil if it was not set.
+ *
+ */
+VALUE
+rb_io_timeout(VALUE self)
+{
+ rb_io_t *fptr = rb_io_get_fptr(self);
+
+ return fptr->timeout;
+}
+
+/*
+ * call-seq:
+ * timeout = duration -> duration
+ * timeout = nil -> nil
+ *
+ * Set the internal timeout to the specified duration or nil. The timeout
+ * applies to all blocking operations where possible.
+ *
+ * This affects the following methods (but is not limited to): #gets, #puts,
+ * #read, #write, #wait_readable and #wait_writable. This also affects
+ * blocking socket operations like Socket#accept and Socket#connect.
*
- * Try to convert <i>obj</i> into an IO, using to_io method.
- * Returns converted IO or +nil+ if <i>obj</i> cannot be converted
- * for any reason.
+ * Some operations like File#open and IO#close are not affected by the
+ * timeout. A timeout during a write operation may leave the IO in an
+ * inconsistent state, e.g. data was partially written. Generally speaking, a
+ * timeout is a last ditch effort to prevent an application from hanging on
+ * slow I/O operations, such as those that occur during a slowloris attack.
+ */
+VALUE
+rb_io_set_timeout(VALUE self, VALUE timeout)
+{
+ // Validate it:
+ if (RTEST(timeout)) {
+ rb_time_interval(timeout);
+ }
+
+ rb_io_t *fptr = rb_io_get_fptr(self);
+
+ fptr->timeout = timeout;
+
+ return self;
+}
+
+/*
+ * call-seq:
+ * IO.try_convert(object) -> new_io or nil
*
- * IO.try_convert(STDOUT) #=> STDOUT
- * IO.try_convert("STDOUT") #=> nil
+ * Attempts to convert +object+ into an \IO object via method +to_io+;
+ * returns the new \IO object if successful, or +nil+ otherwise:
*
- * require 'zlib'
- * f = open("/tmp/zz.gz") #=> #<File:/tmp/zz.gz>
- * z = Zlib::GzipReader.open(f) #=> #<Zlib::GzipReader:0x81d8744>
- * IO.try_convert(z) #=> #<File:/tmp/zz.gz>
+ * IO.try_convert(STDOUT) # => #<IO:<STDOUT>>
+ * IO.try_convert(ARGF) # => #<IO:<STDIN>>
+ * IO.try_convert('STDOUT') # => nil
*
*/
static VALUE
@@ -791,11 +898,11 @@ rb_io_s_try_convert(VALUE dummy, VALUE io)
return rb_io_check_io(io);
}
-#if !(defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32))
+#if !RUBY_CRLF_ENVIRONMENT
static void
io_unread(rb_io_t *fptr)
{
- off_t r;
+ rb_off_t r;
rb_io_check_closed(fptr);
if (fptr->rbuf.len == 0 || fptr->mode & FMODE_DUPLEX)
return;
@@ -825,17 +932,17 @@ io_ungetbyte(VALUE str, rb_io_t *fptr)
fptr->rbuf.off = 0;
fptr->rbuf.len = 0;
#if SIZEOF_LONG > SIZEOF_INT
- if (len > INT_MAX)
- rb_raise(rb_eIOError, "ungetbyte failed");
+ if (len > INT_MAX)
+ rb_raise(rb_eIOError, "ungetbyte failed");
#endif
- if (len > min_capa)
- fptr->rbuf.capa = (int)len;
- else
- fptr->rbuf.capa = min_capa;
+ if (len > min_capa)
+ fptr->rbuf.capa = (int)len;
+ else
+ fptr->rbuf.capa = min_capa;
fptr->rbuf.ptr = ALLOC_N(char, fptr->rbuf.capa);
}
if (fptr->rbuf.capa < len + fptr->rbuf.len) {
- rb_raise(rb_eIOError, "ungetbyte failed");
+ rb_raise(rb_eIOError, "ungetbyte failed");
}
if (fptr->rbuf.off < len) {
MEMMOVE(fptr->rbuf.ptr+fptr->rbuf.capa-fptr->rbuf.len,
@@ -852,7 +959,7 @@ static rb_io_t *
flush_before_seek(rb_io_t *fptr)
{
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
io_unread(fptr);
errno = 0;
return fptr;
@@ -872,17 +979,17 @@ rb_io_check_char_readable(rb_io_t *fptr)
{
rb_io_check_closed(fptr);
if (!(fptr->mode & FMODE_READABLE)) {
- rb_raise(rb_eIOError, "not opened for reading");
+ rb_raise(rb_eIOError, "not opened for reading");
}
if (fptr->wbuf.len) {
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
}
if (fptr->tied_io_for_writing) {
- rb_io_t *wfptr;
- GetOpenFile(fptr->tied_io_for_writing, wfptr);
+ rb_io_t *wfptr;
+ GetOpenFile(fptr->tied_io_for_writing, wfptr);
if (io_fflush(wfptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(wfptr);
}
}
@@ -891,7 +998,7 @@ rb_io_check_byte_readable(rb_io_t *fptr)
{
rb_io_check_char_readable(fptr);
if (READ_CHAR_PENDING(fptr)) {
- rb_raise(rb_eIOError, "byte oriented read for character buffered IO");
+ rb_raise(rb_eIOError, "byte oriented read for character buffered IO");
}
}
@@ -905,7 +1012,7 @@ static rb_encoding*
io_read_encoding(rb_io_t *fptr)
{
if (fptr->encs.enc) {
- return fptr->encs.enc;
+ return fptr->encs.enc;
}
return rb_default_external_encoding();
}
@@ -914,7 +1021,7 @@ static rb_encoding*
io_input_encoding(rb_io_t *fptr)
{
if (fptr->encs.enc2) {
- return fptr->encs.enc2;
+ return fptr->encs.enc2;
}
return io_read_encoding(fptr);
}
@@ -924,7 +1031,7 @@ rb_io_check_writable(rb_io_t *fptr)
{
rb_io_check_closed(fptr);
if (!(fptr->mode & FMODE_WRITABLE)) {
- rb_raise(rb_eIOError, "not opened for writing");
+ rb_raise(rb_eIOError, "not opened for writing");
}
if (fptr->rbuf.len) {
io_unread(fptr);
@@ -944,7 +1051,7 @@ void
rb_io_read_check(rb_io_t *fptr)
{
if (!READ_DATA_PENDING(fptr)) {
- rb_thread_wait_fd(fptr->fd);
+ rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_READABLE), RUBY_IO_TIMEOUT_DEFAULT);
}
return;
}
@@ -953,8 +1060,8 @@ int
rb_gc_for_fd(int err)
{
if (err == EMFILE || err == ENFILE || err == ENOMEM) {
- rb_gc();
- return 1;
+ rb_gc();
+ return 1;
}
return 0;
}
@@ -966,13 +1073,13 @@ ruby_dup(int orig)
fd = rb_cloexec_dup(orig);
if (fd < 0) {
- int e = errno;
- if (rb_gc_for_fd(e)) {
- fd = rb_cloexec_dup(orig);
- }
- if (fd < 0) {
- rb_syserr_fail(e, 0);
- }
+ int e = errno;
+ if (rb_gc_for_fd(e)) {
+ fd = rb_cloexec_dup(orig);
+ }
+ if (fd < 0) {
+ rb_syserr_fail(e, 0);
+ }
}
rb_update_max_fd(fd);
return fd;
@@ -993,64 +1100,127 @@ io_alloc(VALUE klass)
#endif
struct io_internal_read_struct {
- int fd;
+ VALUE th;
+ rb_io_t *fptr;
int nonblock;
+ int fd;
+
void *buf;
size_t capa;
+ struct timeval *timeout;
};
struct io_internal_write_struct {
+ VALUE th;
+ rb_io_t *fptr;
+ int nonblock;
int fd;
+
const void *buf;
size_t capa;
+ struct timeval *timeout;
};
#ifdef HAVE_WRITEV
struct io_internal_writev_struct {
+ VALUE th;
+ rb_io_t *fptr;
+ int nonblock;
int fd;
+
int iovcnt;
const struct iovec *iov;
+ struct timeval *timeout;
};
#endif
-static int nogvl_wait_for_single_fd(int fd, short events);
+static int nogvl_wait_for(VALUE th, rb_io_t *fptr, short events, struct timeval *timeout);
+
+/**
+ * Wait for the given events on the given file descriptor.
+ * Returns -1 if an error or timeout occurred. +errno+ will be set.
+ * Returns the event mask if an event occurred.
+ */
+static inline int
+io_internal_wait(VALUE thread, rb_io_t *fptr, int error, int events, struct timeval *timeout)
+{
+ int ready = nogvl_wait_for(thread, fptr, events, timeout);
+
+ if (ready > 0) {
+ return ready;
+ }
+ else if (ready == 0) {
+ errno = ETIMEDOUT;
+ return -1;
+ }
+
+ errno = error;
+ return -1;
+}
+
static VALUE
internal_read_func(void *ptr)
{
struct io_internal_read_struct *iis = ptr;
- ssize_t r;
-retry:
- r = read(iis->fd, iis->buf, iis->capa);
- if (r < 0 && !iis->nonblock) {
- int e = errno;
- if (e == EAGAIN || e == EWOULDBLOCK) {
- if (nogvl_wait_for_single_fd(iis->fd, RB_WAITFD_IN) != -1) {
+ ssize_t result;
+
+ if (iis->timeout && !iis->nonblock) {
+ if (io_internal_wait(iis->th, iis->fptr, 0, RB_WAITFD_IN, iis->timeout) == -1) {
+ return -1;
+ }
+ }
+
+ retry:
+ result = read(iis->fd, iis->buf, iis->capa);
+
+ if (result < 0 && !iis->nonblock) {
+ if (io_again_p(errno)) {
+ if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_IN, iis->timeout) == -1) {
+ return -1;
+ }
+ else {
goto retry;
}
- errno = e;
}
}
- return r;
+
+ return result;
}
#if defined __APPLE__
-# define do_write_retry(code) do {ret = code;} while (ret == -1 && errno == EPROTOTYPE)
+# define do_write_retry(code) do {result = code;} while (result == -1 && errno == EPROTOTYPE)
#else
-# define do_write_retry(code) ret = code
+# define do_write_retry(code) result = code
#endif
+
static VALUE
internal_write_func(void *ptr)
{
struct io_internal_write_struct *iis = ptr;
- ssize_t ret;
+ ssize_t result;
+
+ if (iis->timeout && !iis->nonblock) {
+ if (io_internal_wait(iis->th, iis->fptr, 0, RB_WAITFD_OUT, iis->timeout) == -1) {
+ return -1;
+ }
+ }
+
+ retry:
do_write_retry(write(iis->fd, iis->buf, iis->capa));
- return (VALUE)ret;
-}
-static void*
-internal_write_func2(void *ptr)
-{
- return (void*)internal_write_func(ptr);
+ if (result < 0 && !iis->nonblock) {
+ int e = errno;
+ if (io_again_p(e)) {
+ if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
+ return -1;
+ }
+ else {
+ goto retry;
+ }
+ }
+ }
+
+ return result;
}
#ifdef HAVE_WRITEV
@@ -1058,58 +1228,133 @@ static VALUE
internal_writev_func(void *ptr)
{
struct io_internal_writev_struct *iis = ptr;
- ssize_t ret;
+ ssize_t result;
+
+ if (iis->timeout && !iis->nonblock) {
+ if (io_internal_wait(iis->th, iis->fptr, 0, RB_WAITFD_OUT, iis->timeout) == -1) {
+ return -1;
+ }
+ }
+
+ retry:
do_write_retry(writev(iis->fd, iis->iov, iis->iovcnt));
- return (VALUE)ret;
+
+ if (result < 0 && !iis->nonblock) {
+ if (io_again_p(errno)) {
+ if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
+ return -1;
+ }
+ else {
+ goto retry;
+ }
+ }
+ }
+
+ return result;
}
#endif
static ssize_t
-rb_read_internal(int fd, void *buf, size_t count)
+rb_io_read_memory(rb_io_t *fptr, void *buf, size_t count)
{
- struct io_internal_read_struct iis;
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_read_memory(scheduler, fptr->self, buf, count, 0);
- iis.fd = fd;
- iis.nonblock = 0;
- iis.buf = buf;
- iis.capa = count;
+ if (!UNDEF_P(result)) {
+ return rb_fiber_scheduler_io_result_apply(result);
+ }
+ }
- return (ssize_t)rb_thread_io_blocking_region(internal_read_func, &iis, fd);
-}
+ struct io_internal_read_struct iis = {
+ .th = rb_thread_current(),
+ .fptr = fptr,
+ .nonblock = 0,
+ .fd = fptr->fd,
-static ssize_t
-rb_write_internal(int fd, const void *buf, size_t count)
-{
- struct io_internal_write_struct iis;
- iis.fd = fd;
- iis.buf = buf;
- iis.capa = count;
+ .buf = buf,
+ .capa = count,
+ .timeout = NULL,
+ };
+
+ struct timeval timeout_storage;
+
+ if (fptr->timeout != Qnil) {
+ timeout_storage = rb_time_interval(fptr->timeout);
+ iis.timeout = &timeout_storage;
+ }
- return (ssize_t)rb_thread_io_blocking_region(internal_write_func, &iis, fd);
+ return (ssize_t)rb_thread_io_blocking_region(internal_read_func, &iis, fptr->fd);
}
static ssize_t
-rb_write_internal2(int fd, const void *buf, size_t count)
+rb_io_write_memory(rb_io_t *fptr, const void *buf, size_t count)
{
- struct io_internal_write_struct iis;
- iis.fd = fd;
- iis.buf = buf;
- iis.capa = count;
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_write_memory(scheduler, fptr->self, buf, count, 0);
+
+ if (!UNDEF_P(result)) {
+ return rb_fiber_scheduler_io_result_apply(result);
+ }
+ }
+
+ struct io_internal_write_struct iis = {
+ .th = rb_thread_current(),
+ .fptr = fptr,
+ .nonblock = 0,
+ .fd = fptr->fd,
- return (ssize_t)rb_thread_call_without_gvl2(internal_write_func2, &iis,
- RUBY_UBF_IO, NULL);
+ .buf = buf,
+ .capa = count,
+ .timeout = NULL
+ };
+
+ struct timeval timeout_storage;
+
+ if (fptr->timeout != Qnil) {
+ timeout_storage = rb_time_interval(fptr->timeout);
+ iis.timeout = &timeout_storage;
+ }
+
+ return (ssize_t)rb_thread_io_blocking_region(internal_write_func, &iis, fptr->fd);
}
#ifdef HAVE_WRITEV
static ssize_t
-rb_writev_internal(int fd, const struct iovec *iov, int iovcnt)
+rb_writev_internal(rb_io_t *fptr, const struct iovec *iov, int iovcnt)
{
- struct io_internal_writev_struct iis;
- iis.fd = fd;
- iis.iov = iov;
- iis.iovcnt = iovcnt;
+ if (!iovcnt) return 0;
+
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ // This path assumes at least one `iov`:
+ VALUE result = rb_fiber_scheduler_io_write_memory(scheduler, fptr->self, iov[0].iov_base, iov[0].iov_len, 0);
- return (ssize_t)rb_thread_io_blocking_region(internal_writev_func, &iis, fd);
+ if (!UNDEF_P(result)) {
+ return rb_fiber_scheduler_io_result_apply(result);
+ }
+ }
+
+ struct io_internal_writev_struct iis = {
+ .th = rb_thread_current(),
+ .fptr = fptr,
+ .nonblock = 0,
+ .fd = fptr->fd,
+
+ .iov = iov,
+ .iovcnt = iovcnt,
+ .timeout = NULL
+ };
+
+ struct timeval timeout_storage;
+
+ if (fptr->timeout != Qnil) {
+ timeout_storage = rb_time_interval(fptr->timeout);
+ iis.timeout = &timeout_storage;
+ }
+
+ return (ssize_t)rb_thread_io_blocking_region(internal_writev_func, &iis, fptr->fd);
}
#endif
@@ -1121,28 +1366,18 @@ io_flush_buffer_sync(void *arg)
ssize_t r = write(fptr->fd, fptr->wbuf.ptr+fptr->wbuf.off, (size_t)l);
if (fptr->wbuf.len <= r) {
- fptr->wbuf.off = 0;
- fptr->wbuf.len = 0;
- return 0;
+ fptr->wbuf.off = 0;
+ fptr->wbuf.len = 0;
+ return 0;
}
+
if (0 <= r) {
- fptr->wbuf.off += (int)r;
- fptr->wbuf.len -= (int)r;
- errno = EAGAIN;
+ fptr->wbuf.off += (int)r;
+ fptr->wbuf.len -= (int)r;
+ errno = EAGAIN;
}
- return (VALUE)-1;
-}
-static void*
-io_flush_buffer_sync2(void *arg)
-{
- VALUE result = io_flush_buffer_sync(arg);
-
- /*
- * rb_thread_call_without_gvl2 uses 0 as interrupted.
- * So, we need to avoid to use 0.
- */
- return !result ? (void*)1 : (void*)result;
+ return (VALUE)-1;
}
static VALUE
@@ -1152,37 +1387,14 @@ io_flush_buffer_async(VALUE arg)
return rb_thread_io_blocking_region(io_flush_buffer_sync, fptr, fptr->fd);
}
-static VALUE
-io_flush_buffer_async2(VALUE arg)
-{
- rb_io_t *fptr = (rb_io_t *)arg;
- VALUE ret;
-
- ret = (VALUE)rb_thread_call_without_gvl2(io_flush_buffer_sync2, fptr,
- RUBY_UBF_IO, NULL);
-
- if (!ret) {
- /* pending async interrupt is there. */
- errno = EAGAIN;
- return -1;
- }
- else if (ret == 1) {
- return 0;
- }
- return ret;
-}
-
static inline int
io_flush_buffer(rb_io_t *fptr)
{
- if (fptr->write_lock) {
- if (rb_mutex_owned_p(fptr->write_lock))
- return (int)io_flush_buffer_async2((VALUE)fptr);
- else
- return (int)rb_mutex_synchronize(fptr->write_lock, io_flush_buffer_async2, (VALUE)fptr);
+ if (!NIL_P(fptr->write_lock) && rb_mutex_owned_p(fptr->write_lock)) {
+ return (int)io_flush_buffer_async((VALUE)fptr);
}
else {
- return (int)io_flush_buffer_async((VALUE)fptr);
+ return (int)rb_mutex_synchronize(fptr->write_lock, io_flush_buffer_async, (VALUE)fptr);
}
}
@@ -1190,37 +1402,112 @@ static int
io_fflush(rb_io_t *fptr)
{
rb_io_check_closed(fptr);
+
if (fptr->wbuf.len == 0)
return 0;
+
while (fptr->wbuf.len > 0 && io_flush_buffer(fptr) != 0) {
- if (!rb_io_wait_writable(fptr->fd))
- return -1;
+ if (!rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT))
+ return -1;
+
rb_io_check_closed(fptr);
}
+
return 0;
}
+VALUE
+rb_io_wait(VALUE io, VALUE events, VALUE timeout)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+
+ if (scheduler != Qnil) {
+ return rb_fiber_scheduler_io_wait(scheduler, io, events, timeout);
+ }
+
+ rb_io_t * fptr = NULL;
+ RB_IO_POINTER(io, fptr);
+
+ struct timeval tv_storage;
+ struct timeval *tv = NULL;
+
+ if (NIL_OR_UNDEF_P(timeout)) {
+ timeout = fptr->timeout;
+ }
+
+ if (timeout != Qnil) {
+ tv_storage = rb_time_interval(timeout);
+ tv = &tv_storage;
+ }
+
+ int ready = rb_thread_wait_for_single_fd(fptr->fd, RB_NUM2INT(events), tv);
+
+ if (ready < 0) {
+ rb_sys_fail(0);
+ }
+
+ // Not sure if this is necessary:
+ rb_io_check_closed(fptr);
+
+ if (ready) {
+ return RB_INT2NUM(ready);
+ }
+ else {
+ return Qfalse;
+ }
+}
+
+static VALUE
+io_from_fd(int fd)
+{
+ return prep_io(fd, FMODE_PREP, rb_cIO, NULL);
+}
+
+static int
+io_wait_for_single_fd(int fd, int events, struct timeval *timeout)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+
+ if (scheduler != Qnil) {
+ return RTEST(
+ rb_fiber_scheduler_io_wait(scheduler, io_from_fd(fd), RB_INT2NUM(events), rb_fiber_scheduler_make_timeout(timeout))
+ );
+ }
+
+ return rb_thread_wait_for_single_fd(fd, events, timeout);
+}
+
int
rb_io_wait_readable(int f)
{
io_fd_check_closed(f);
+
+ VALUE scheduler = rb_fiber_scheduler_current();
+
switch (errno) {
case EINTR:
#if defined(ERESTART)
case ERESTART:
#endif
- rb_thread_check_ints();
- return TRUE;
+ rb_thread_check_ints();
+ return TRUE;
case EAGAIN:
-#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
+#if EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
- rb_thread_wait_fd(f);
- return TRUE;
+ if (scheduler != Qnil) {
+ return RTEST(
+ rb_fiber_scheduler_io_wait_readable(scheduler, io_from_fd(f))
+ );
+ }
+ else {
+ io_wait_for_single_fd(f, RUBY_IO_READABLE, NULL);
+ }
+ return TRUE;
default:
- return FALSE;
+ return FALSE;
}
}
@@ -1228,32 +1515,127 @@ int
rb_io_wait_writable(int f)
{
io_fd_check_closed(f);
+
+ VALUE scheduler = rb_fiber_scheduler_current();
+
switch (errno) {
case EINTR:
#if defined(ERESTART)
case ERESTART:
#endif
- /*
- * In old Linux, several special files under /proc and /sys don't handle
- * select properly. Thus we need avoid to call if don't use O_NONBLOCK.
- * Otherwise, we face nasty hang up. Sigh.
- * e.g. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31b07093c44a7a442394d44423e21d783f5523b8
- * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31b07093c44a7a442394d44423e21d783f5523b8
- * In EINTR case, we only need to call RUBY_VM_CHECK_INTS_BLOCKING().
- * Then rb_thread_check_ints() is enough.
- */
- rb_thread_check_ints();
- return TRUE;
+ /*
+ * In old Linux, several special files under /proc and /sys don't handle
+ * select properly. Thus we need avoid to call if don't use O_NONBLOCK.
+ * Otherwise, we face nasty hang up. Sigh.
+ * e.g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=31b07093c44a7a442394d44423e21d783f5523b8
+ * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=31b07093c44a7a442394d44423e21d783f5523b8
+ * In EINTR case, we only need to call RUBY_VM_CHECK_INTS_BLOCKING().
+ * Then rb_thread_check_ints() is enough.
+ */
+ rb_thread_check_ints();
+ return TRUE;
case EAGAIN:
-#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
+#if EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
- rb_thread_fd_writable(f);
- return TRUE;
+ if (scheduler != Qnil) {
+ return RTEST(
+ rb_fiber_scheduler_io_wait_writable(scheduler, io_from_fd(f))
+ );
+ }
+ else {
+ io_wait_for_single_fd(f, RUBY_IO_WRITABLE, NULL);
+ }
+ return TRUE;
default:
- return FALSE;
+ return FALSE;
+ }
+}
+
+int
+rb_wait_for_single_fd(int fd, int events, struct timeval *timeout)
+{
+ return io_wait_for_single_fd(fd, events, timeout);
+}
+
+int
+rb_thread_wait_fd(int fd)
+{
+ return rb_wait_for_single_fd(fd, RUBY_IO_READABLE, NULL);
+}
+
+int
+rb_thread_fd_writable(int fd)
+{
+ return rb_wait_for_single_fd(fd, RUBY_IO_WRITABLE, NULL);
+}
+
+VALUE
+rb_io_maybe_wait(int error, VALUE io, VALUE events, VALUE timeout)
+{
+ // fptr->fd can be set to -1 at any time by another thread when the GVL is
+ // released. Many code, e.g. `io_bufread` didn't check this correctly and
+ // instead relies on `read(-1) -> -1` which causes this code path. We then
+ // check here whether the IO was in fact closed. Probably it's better to
+ // check that `fptr->fd != -1` before using it in syscall.
+ rb_io_check_closed(RFILE(io)->fptr);
+
+ switch (error) {
+ // In old Linux, several special files under /proc and /sys don't handle
+ // select properly. Thus we need avoid to call if don't use O_NONBLOCK.
+ // Otherwise, we face nasty hang up. Sigh.
+ // e.g. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=31b07093c44a7a442394d44423e21d783f5523b8
+ // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=31b07093c44a7a442394d44423e21d783f5523b8
+ // In EINTR case, we only need to call RUBY_VM_CHECK_INTS_BLOCKING().
+ // Then rb_thread_check_ints() is enough.
+ case EINTR:
+#if defined(ERESTART)
+ case ERESTART:
+#endif
+ // We might have pending interrupts since the previous syscall was interrupted:
+ rb_thread_check_ints();
+
+ // The operation was interrupted, so retry it immediately:
+ return events;
+
+ case EAGAIN:
+#if EWOULDBLOCK != EAGAIN
+ case EWOULDBLOCK:
+#endif
+ // The operation would block, so wait for the specified events:
+ return rb_io_wait(io, events, timeout);
+
+ default:
+ // Non-specific error, no event is ready:
+ return Qfalse;
+ }
+}
+
+int
+rb_io_maybe_wait_readable(int error, VALUE io, VALUE timeout)
+{
+ VALUE result = rb_io_maybe_wait(error, io, RB_INT2NUM(RUBY_IO_READABLE), timeout);
+
+ if (RTEST(result)) {
+ return RB_NUM2INT(result);
+ }
+ else {
+ return 0;
+ }
+}
+
+int
+rb_io_maybe_wait_writable(int error, VALUE io, VALUE timeout)
+{
+ VALUE result = rb_io_maybe_wait(error, io, RB_INT2NUM(RUBY_IO_WRITABLE), timeout);
+
+ if (RTEST(result)) {
+ return RB_NUM2INT(result);
+ }
+ else {
+ return 0;
}
}
@@ -1271,7 +1653,7 @@ make_writeconv(rb_io_t *fptr)
ecflags = fptr->encs.ecflags & ~ECONV_NEWLINE_DECORATOR_READ_MASK;
ecopts = fptr->encs.ecopts;
- if (!fptr->encs.enc || (fptr->encs.enc == rb_ascii8bit_encoding() && !fptr->encs.enc2)) {
+ if (!fptr->encs.enc || (rb_is_ascii8bit_enc(fptr->encs.enc) && !fptr->encs.enc2)) {
/* no encoding conversion */
fptr->writeconv_pre_ecflags = 0;
fptr->writeconv_pre_ecopts = Qnil;
@@ -1327,133 +1709,180 @@ struct write_arg {
};
#ifdef HAVE_WRITEV
-static VALUE
-io_binwrite_string(VALUE arg)
+static ssize_t
+io_binwrite_string_internal(rb_io_t *fptr, const char *ptr, long length)
{
- struct binwrite_arg *p = (struct binwrite_arg *)arg;
- rb_io_t *fptr = p->fptr;
- long r;
-
if (fptr->wbuf.len) {
- struct iovec iov[2];
+ struct iovec iov[2];
+
+ iov[0].iov_base = fptr->wbuf.ptr+fptr->wbuf.off;
+ iov[0].iov_len = fptr->wbuf.len;
+ iov[1].iov_base = (void*)ptr;
+ iov[1].iov_len = length;
- iov[0].iov_base = fptr->wbuf.ptr+fptr->wbuf.off;
- iov[0].iov_len = fptr->wbuf.len;
- iov[1].iov_base = (char *)p->ptr;
- iov[1].iov_len = p->length;
+ ssize_t result = rb_writev_internal(fptr, iov, 2);
- r = rb_writev_internal(fptr->fd, iov, 2);
+ if (result < 0)
+ return result;
- if (r < 0)
- return r;
+ if (result >= fptr->wbuf.len) {
+ // We wrote more than the internal buffer:
+ result -= fptr->wbuf.len;
+ fptr->wbuf.off = 0;
+ fptr->wbuf.len = 0;
+ }
+ else {
+ // We only wrote less data than the internal buffer:
+ fptr->wbuf.off += (int)result;
+ fptr->wbuf.len -= (int)result;
+
+ result = 0;
+ }
- if (fptr->wbuf.len <= r) {
- r -= fptr->wbuf.len;
- fptr->wbuf.off = 0;
- fptr->wbuf.len = 0;
- }
- else {
- fptr->wbuf.off += (int)r;
- fptr->wbuf.len -= (int)r;
- r = 0L;
- }
+ return result;
}
else {
- r = rb_write_internal(fptr->fd, p->ptr, p->length);
+ return rb_io_write_memory(fptr, ptr, length);
}
-
- return r;
}
#else
+static ssize_t
+io_binwrite_string_internal(rb_io_t *fptr, const char *ptr, long length)
+{
+ long remaining = length;
+
+ if (fptr->wbuf.len) {
+ if (fptr->wbuf.len+length <= fptr->wbuf.capa) {
+ if (fptr->wbuf.capa < fptr->wbuf.off+fptr->wbuf.len+length) {
+ MEMMOVE(fptr->wbuf.ptr, fptr->wbuf.ptr+fptr->wbuf.off, char, fptr->wbuf.len);
+ fptr->wbuf.off = 0;
+ }
+
+ MEMMOVE(fptr->wbuf.ptr+fptr->wbuf.off+fptr->wbuf.len, ptr, char, length);
+ fptr->wbuf.len += (int)length;
+
+ // We copied the entire incoming data to the internal buffer:
+ remaining = 0;
+ }
+
+ // Flush the internal buffer:
+ if (io_fflush(fptr) < 0) {
+ return -1;
+ }
+
+ // If all the data was buffered, we are done:
+ if (remaining == 0) {
+ return length;
+ }
+ }
+
+ // Otherwise, we should write the data directly:
+ return rb_io_write_memory(fptr, ptr, length);
+}
+#endif
+
static VALUE
io_binwrite_string(VALUE arg)
{
struct binwrite_arg *p = (struct binwrite_arg *)arg;
- rb_io_t *fptr = p->fptr;
- long l, len;
- l = len = p->length;
+ const char *ptr = p->ptr;
+ size_t remaining = p->length;
- if (fptr->wbuf.len) {
- if (fptr->wbuf.len+len <= fptr->wbuf.capa) {
- if (fptr->wbuf.capa < fptr->wbuf.off+fptr->wbuf.len+len) {
- MEMMOVE(fptr->wbuf.ptr, fptr->wbuf.ptr+fptr->wbuf.off, char, fptr->wbuf.len);
- fptr->wbuf.off = 0;
- }
- MEMMOVE(fptr->wbuf.ptr+fptr->wbuf.off+fptr->wbuf.len, p->ptr, char, len);
- fptr->wbuf.len += (int)len;
- l = 0;
- }
- if (io_fflush(fptr) < 0)
- return -2L; /* fail in fflush */
- if (l == 0)
- return len;
+ while (remaining) {
+ // Write as much as possible:
+ ssize_t result = io_binwrite_string_internal(p->fptr, ptr, remaining);
+
+ if (result == 0) {
+ // If only the internal buffer is written, result will be zero [bytes of given data written]. This means we
+ // should try again immediately.
+ }
+ else if (result > 0) {
+ if ((size_t)result == remaining) break;
+ ptr += result;
+ remaining -= result;
+ }
+ // Wait for it to become writable:
+ else if (rb_io_maybe_wait_writable(errno, p->fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
+ rb_io_check_closed(p->fptr);
+ }
+ else {
+ // The error was unrelated to waiting for it to become writable, so we fail:
+ return -1;
+ }
}
- if (fptr->stdio_file != stderr && !rb_thread_fd_writable(fptr->fd))
- rb_io_check_closed(fptr);
+ return p->length;
+}
- return rb_write_internal(p->fptr->fd, p->ptr, p->length);
+inline static void
+io_allocate_write_buffer(rb_io_t *fptr, int sync)
+{
+ if (fptr->wbuf.ptr == NULL && !(sync && (fptr->mode & FMODE_SYNC))) {
+ fptr->wbuf.off = 0;
+ fptr->wbuf.len = 0;
+ fptr->wbuf.capa = IO_WBUF_CAPA_MIN;
+ fptr->wbuf.ptr = ALLOC_N(char, fptr->wbuf.capa);
+ }
+
+ if (NIL_P(fptr->write_lock)) {
+ fptr->write_lock = rb_mutex_new();
+ rb_mutex_allow_trap(fptr->write_lock, 1);
+ }
+}
+
+static inline int
+io_binwrite_requires_flush_write(rb_io_t *fptr, long len, int nosync)
+{
+ // If the requested operation was synchronous and the output mode is synchronus or a TTY:
+ if (!nosync && (fptr->mode & (FMODE_SYNC|FMODE_TTY)))
+ return 1;
+
+ // If the amount of data we want to write exceeds the internal buffer:
+ if (fptr->wbuf.ptr && fptr->wbuf.capa <= fptr->wbuf.len + len)
+ return 1;
+
+ // Otherwise, we can append to the internal buffer:
+ return 0;
}
-#endif
static long
io_binwrite(VALUE str, const char *ptr, long len, rb_io_t *fptr, int nosync)
{
- long n, r, offset = 0;
+ if (len <= 0) return len;
- /* don't write anything if current thread has a pending interrupt. */
+ // Don't write anything if current thread has a pending interrupt:
rb_thread_check_ints();
- if ((n = len) <= 0) return n;
- if (fptr->wbuf.ptr == NULL && !(!nosync && (fptr->mode & FMODE_SYNC))) {
- fptr->wbuf.off = 0;
- fptr->wbuf.len = 0;
- fptr->wbuf.capa = IO_WBUF_CAPA_MIN;
- fptr->wbuf.ptr = ALLOC_N(char, fptr->wbuf.capa);
- fptr->write_lock = rb_mutex_new();
- rb_mutex_allow_trap(fptr->write_lock, 1);
- }
- if ((!nosync && (fptr->mode & (FMODE_SYNC|FMODE_TTY))) ||
- (fptr->wbuf.ptr && fptr->wbuf.capa <= fptr->wbuf.len + len)) {
- struct binwrite_arg arg;
+ io_allocate_write_buffer(fptr, !nosync);
- arg.fptr = fptr;
- arg.str = str;
- retry:
- arg.ptr = ptr + offset;
- arg.length = n;
- if (fptr->write_lock) {
- r = rb_mutex_synchronize(fptr->write_lock, io_binwrite_string, (VALUE)&arg);
- }
- else {
- r = io_binwrite_string((VALUE)&arg);
- }
- /* xxx: other threads may modify given string. */
- if (r == n) return len;
- if (0 <= r) {
- offset += r;
- n -= r;
- errno = EAGAIN;
- }
- if (r == -2L)
- return -1L;
- if (rb_io_wait_writable(fptr->fd)) {
- rb_io_check_closed(fptr);
- if (offset < len)
- goto retry;
+ if (io_binwrite_requires_flush_write(fptr, len, nosync)) {
+ struct binwrite_arg arg;
+
+ arg.fptr = fptr;
+ arg.str = str;
+ arg.ptr = ptr;
+ arg.length = len;
+
+ if (!NIL_P(fptr->write_lock)) {
+ return rb_mutex_synchronize(fptr->write_lock, io_binwrite_string, (VALUE)&arg);
+ }
+ else {
+ return io_binwrite_string((VALUE)&arg);
}
- return -1L;
}
+ else {
+ if (fptr->wbuf.off) {
+ if (fptr->wbuf.len)
+ MEMMOVE(fptr->wbuf.ptr, fptr->wbuf.ptr+fptr->wbuf.off, char, fptr->wbuf.len);
+ fptr->wbuf.off = 0;
+ }
- if (fptr->wbuf.off) {
- if (fptr->wbuf.len)
- MEMMOVE(fptr->wbuf.ptr, fptr->wbuf.ptr+fptr->wbuf.off, char, fptr->wbuf.len);
- fptr->wbuf.off = 0;
+ MEMMOVE(fptr->wbuf.ptr+fptr->wbuf.off+fptr->wbuf.len, ptr, char, len);
+ fptr->wbuf.len += (int)len;
+
+ return len;
}
- MEMMOVE(fptr->wbuf.ptr+fptr->wbuf.off+fptr->wbuf.len, ptr+offset, char, len);
- fptr->wbuf.len += (int)len;
- return len;
}
# define MODE_BTMODE(a,b,c) ((fmode & FMODE_BINMODE) ? (b) : \
@@ -1468,7 +1897,7 @@ do_writeconv(VALUE str, rb_io_t *fptr, int *converted)
{
if (NEED_WRITECONV(fptr)) {
VALUE common_encoding = Qnil;
- SET_BINARY_MODE(fptr);
+ SET_BINARY_MODE(fptr);
make_writeconv(fptr);
@@ -1492,27 +1921,27 @@ do_writeconv(VALUE str, rb_io_t *fptr, int *converted)
if (!NIL_P(common_encoding)) {
str = rb_str_encode(str, common_encoding,
fptr->writeconv_pre_ecflags, fptr->writeconv_pre_ecopts);
- *converted = 1;
+ *converted = 1;
}
if (fptr->writeconv) {
str = rb_econv_str_convert(fptr->writeconv, str, ECONV_PARTIAL_INPUT);
- *converted = 1;
+ *converted = 1;
}
}
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
#define fmode (fptr->mode)
else if (MODE_BTMODE(DEFAULT_TEXTMODE,0,1)) {
- if ((fptr->mode & FMODE_READABLE) &&
- !(fptr->encs.ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {
- setmode(fptr->fd, O_BINARY);
- }
- else {
- setmode(fptr->fd, O_TEXT);
- }
- if (!rb_enc_asciicompat(rb_enc_get(str))) {
- rb_raise(rb_eArgError, "ASCII incompatible string written for text mode IO without encoding conversion: %s",
- rb_enc_name(rb_enc_get(str)));
+ if ((fptr->mode & FMODE_READABLE) &&
+ !(fptr->encs.ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {
+ setmode(fptr->fd, O_BINARY);
+ }
+ else {
+ setmode(fptr->fd, O_TEXT);
+ }
+ if (!rb_enc_asciicompat(rb_enc_get(str))) {
+ rb_raise(rb_eArgError, "ASCII incompatible string written for text mode IO without encoding conversion: %s",
+ rb_enc_name(rb_enc_get(str)));
}
}
#undef fmode
@@ -1527,15 +1956,17 @@ io_fwrite(VALUE str, rb_io_t *fptr, int nosync)
VALUE tmp;
long n, len;
const char *ptr;
+
#ifdef _WIN32
if (fptr->mode & FMODE_TTY) {
- long len = rb_w32_write_console(str, fptr->fd);
- if (len > 0) return len;
+ long len = rb_w32_write_console(str, fptr->fd);
+ if (len > 0) return len;
}
#endif
+
str = do_writeconv(str, fptr, &converted);
if (converted)
- OBJ_FREEZE(str);
+ OBJ_FREEZE(str);
tmp = rb_str_tmp_frozen_acquire(str);
RSTRING_GETMEM(tmp, ptr, len);
@@ -1565,10 +1996,12 @@ io_write(VALUE io, VALUE str, int nosync)
io = GetWriteIO(io);
str = rb_obj_as_string(str);
tmp = rb_io_check_io(io);
+
if (NIL_P(tmp)) {
- /* port is not IO, call write method for it. */
- return rb_funcall(io, id_write, 1, str);
+ /* port is not IO, call write method for it. */
+ return rb_funcall(io, id_write, 1, str);
}
+
io = tmp;
if (RSTRING_LEN(str) == 0) return INT2FIX(0);
@@ -1576,7 +2009,7 @@ io_write(VALUE io, VALUE str, int nosync)
rb_io_check_writable(fptr);
n = io_fwrite(str, fptr, nosync);
- if (n < 0L) rb_sys_fail_path(fptr->pathv);
+ if (n < 0L) rb_sys_fail_on_write(fptr);
return LONG2FIX(n);
}
@@ -1584,108 +2017,128 @@ io_write(VALUE io, VALUE str, int nosync)
#ifdef HAVE_WRITEV
struct binwritev_arg {
rb_io_t *fptr;
- const struct iovec *iov;
+ struct iovec *iov;
int iovcnt;
+ size_t total;
};
static VALUE
-call_writev_internal(VALUE arg)
+io_binwritev_internal(VALUE arg)
{
struct binwritev_arg *p = (struct binwritev_arg *)arg;
- return rb_writev_internal(p->fptr->fd, p->iov, p->iovcnt);
+
+ size_t remaining = p->total;
+ size_t offset = 0;
+
+ rb_io_t *fptr = p->fptr;
+ struct iovec *iov = p->iov;
+ int iovcnt = p->iovcnt;
+
+ while (remaining) {
+ long result = rb_writev_internal(fptr, iov, iovcnt);
+
+ if (result >= 0) {
+ offset += result;
+ if (fptr->wbuf.ptr && fptr->wbuf.len) {
+ if (offset < (size_t)fptr->wbuf.len) {
+ fptr->wbuf.off += result;
+ fptr->wbuf.len -= result;
+ }
+ else {
+ offset -= (size_t)fptr->wbuf.len;
+ fptr->wbuf.off = 0;
+ fptr->wbuf.len = 0;
+ }
+ }
+
+ if (offset == p->total) {
+ return p->total;
+ }
+
+ while (result >= (ssize_t)iov->iov_len) {
+ /* iovcnt > 0 */
+ result -= iov->iov_len;
+ iov->iov_len = 0;
+ iov++;
+
+ if (!--iovcnt) {
+ // I don't believe this code path can ever occur.
+ return offset;
+ }
+ }
+
+ iov->iov_base = (char *)iov->iov_base + result;
+ iov->iov_len -= result;
+ }
+ else if (rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
+ rb_io_check_closed(fptr);
+ }
+ else {
+ return -1;
+ }
+ }
+
+ return offset;
}
static long
io_binwritev(struct iovec *iov, int iovcnt, rb_io_t *fptr)
{
- int i;
- long r, total = 0, written_len = 0;
-
- /* don't write anything if current thread has a pending interrupt. */
+ // Don't write anything if current thread has a pending interrupt:
rb_thread_check_ints();
if (iovcnt == 0) return 0;
- for (i = 1; i < iovcnt; i++) total += iov[i].iov_len;
- if (fptr->wbuf.ptr == NULL && !(fptr->mode & FMODE_SYNC)) {
- fptr->wbuf.off = 0;
- fptr->wbuf.len = 0;
- fptr->wbuf.capa = IO_WBUF_CAPA_MIN;
- fptr->wbuf.ptr = ALLOC_N(char, fptr->wbuf.capa);
- fptr->write_lock = rb_mutex_new();
- rb_mutex_allow_trap(fptr->write_lock, 1);
- }
+ size_t total = 0;
+ for (int i = 1; i < iovcnt; i++) total += iov[i].iov_len;
+
+ io_allocate_write_buffer(fptr, 1);
if (fptr->wbuf.ptr && fptr->wbuf.len) {
- long offset = fptr->wbuf.off + fptr->wbuf.len;
- if (offset + total <= fptr->wbuf.capa) {
- for (i = 1; i < iovcnt; i++) {
- memcpy(fptr->wbuf.ptr+offset, iov[i].iov_base, iov[i].iov_len);
- offset += iov[i].iov_len;
- }
- fptr->wbuf.len += total;
- return total;
- }
- else {
- iov[0].iov_base = fptr->wbuf.ptr + fptr->wbuf.off;
- iov[0].iov_len = fptr->wbuf.len;
- }
- }
- else {
- iov++;
- if (!--iovcnt) return 0;
- }
+ // The end of the buffered data:
+ size_t offset = fptr->wbuf.off + fptr->wbuf.len;
- retry:
- if (fptr->write_lock) {
- struct binwritev_arg arg;
- arg.fptr = fptr;
- arg.iov = iov;
- arg.iovcnt = iovcnt;
- r = rb_mutex_synchronize(fptr->write_lock, call_writev_internal, (VALUE)&arg);
+ if (offset + total <= (size_t)fptr->wbuf.capa) {
+ for (int i = 1; i < iovcnt; i++) {
+ memcpy(fptr->wbuf.ptr+offset, iov[i].iov_base, iov[i].iov_len);
+ offset += iov[i].iov_len;
+ }
+
+ fptr->wbuf.len += total;
+
+ return total;
+ }
+ else {
+ iov[0].iov_base = fptr->wbuf.ptr + fptr->wbuf.off;
+ iov[0].iov_len = fptr->wbuf.len;
+ }
}
else {
- r = rb_writev_internal(fptr->fd, iov, iovcnt);
- }
+ // The first iov is reserved for the internal buffer, and it's empty.
+ iov++;
- if (r >= 0) {
- written_len += r;
- if (fptr->wbuf.ptr && fptr->wbuf.len) {
- if (written_len < fptr->wbuf.len) {
- fptr->wbuf.off += r;
- fptr->wbuf.len -= r;
- }
- else {
- written_len -= fptr->wbuf.len;
- fptr->wbuf.off = 0;
- fptr->wbuf.len = 0;
- }
- }
- if (written_len == total) return total;
+ if (!--iovcnt) {
+ // If there are no other io vectors we are done.
+ return 0;
+ }
+ }
- while (r >= (ssize_t)iov->iov_len) {
- /* iovcnt > 0 */
- r -= iov->iov_len;
- iov->iov_len = 0;
- iov++;
- if (!--iovcnt) return total;
- /* defensive check: written_len should == total */
- }
- iov->iov_base = (char *)iov->iov_base + r;
- iov->iov_len -= r;
+ struct binwritev_arg arg;
+ arg.fptr = fptr;
+ arg.iov = iov;
+ arg.iovcnt = iovcnt;
+ arg.total = total;
- errno = EAGAIN;
+ if (!NIL_P(fptr->write_lock)) {
+ return rb_mutex_synchronize(fptr->write_lock, io_binwritev_internal, (VALUE)&arg);
}
- if (rb_io_wait_writable(fptr->fd)) {
- rb_io_check_closed(fptr);
- goto retry;
+ else {
+ return io_binwritev_internal((VALUE)&arg);
}
-
- return -1L;
}
static long
-io_fwritev(int argc, VALUE *argv, rb_io_t *fptr)
+io_fwritev(int argc, const VALUE *argv, rb_io_t *fptr)
{
int i, converted, iovcnt = argc + 1;
long n;
@@ -1696,24 +2149,26 @@ io_fwritev(int argc, VALUE *argv, rb_io_t *fptr)
tmp_array = ALLOCV_N(VALUE, v2, argc);
for (i = 0; i < argc; i++) {
- str = rb_obj_as_string(argv[i]);
- converted = 0;
- str = do_writeconv(str, fptr, &converted);
- if (converted)
- OBJ_FREEZE(str);
+ str = rb_obj_as_string(argv[i]);
+ converted = 0;
+ str = do_writeconv(str, fptr, &converted);
+
+ if (converted)
+ OBJ_FREEZE(str);
- tmp = rb_str_tmp_frozen_acquire(str);
- tmp_array[i] = tmp;
- /* iov[0] is reserved for buffer of fptr */
- iov[i+1].iov_base = RSTRING_PTR(tmp);
- iov[i+1].iov_len = RSTRING_LEN(tmp);
+ tmp = rb_str_tmp_frozen_acquire(str);
+ tmp_array[i] = tmp;
+
+ /* iov[0] is reserved for buffer of fptr */
+ iov[i+1].iov_base = RSTRING_PTR(tmp);
+ iov[i+1].iov_len = RSTRING_LEN(tmp);
}
n = io_binwritev(iov, iovcnt, fptr);
if (v1) ALLOCV_END(v1);
for (i = 0; i < argc; i++) {
- rb_str_tmp_frozen_release(argv[i], tmp_array[i]);
+ rb_str_tmp_frozen_release(argv[i], tmp_array[i]);
}
if (v2) ALLOCV_END(v2);
@@ -1733,7 +2188,7 @@ iovcnt_ok(int iovcnt)
#endif /* HAVE_WRITEV */
static VALUE
-io_writev(int argc, VALUE *argv, VALUE io)
+io_writev(int argc, const VALUE *argv, VALUE io)
{
rb_io_t *fptr;
long n;
@@ -1742,10 +2197,12 @@ io_writev(int argc, VALUE *argv, VALUE io)
io = GetWriteIO(io);
tmp = rb_io_check_io(io);
+
if (NIL_P(tmp)) {
- /* port is not IO, call write method for it. */
- return rb_funcallv(io, id_write, argc, argv);
+ /* port is not IO, call write method for it. */
+ return rb_funcallv(io, id_write, argc, argv);
}
+
io = tmp;
GetOpenFile(io, fptr);
@@ -1753,18 +2210,21 @@ io_writev(int argc, VALUE *argv, VALUE io)
for (i = 0; i < argc; i += cnt) {
#ifdef HAVE_WRITEV
- if ((fptr->mode & (FMODE_SYNC|FMODE_TTY)) && iovcnt_ok(cnt = argc - i)) {
- n = io_fwritev(cnt, &argv[i], fptr);
- }
- else
+ if ((fptr->mode & (FMODE_SYNC|FMODE_TTY)) && iovcnt_ok(cnt = argc - i)) {
+ n = io_fwritev(cnt, &argv[i], fptr);
+ }
+ else
#endif
- {
- cnt = 1;
- /* sync at last item */
- n = io_fwrite(rb_obj_as_string(argv[i]), fptr, (i < argc-1));
- }
- if (n < 0L) rb_sys_fail_path(fptr->pathv);
- total = rb_fix_plus(LONG2FIX(n), total);
+ {
+ cnt = 1;
+ /* sync at last item */
+ n = io_fwrite(rb_obj_as_string(argv[i]), fptr, (i < argc-1));
+ }
+
+ if (n < 0L)
+ rb_sys_fail_on_write(fptr);
+
+ total = rb_fix_plus(LONG2FIX(n), total);
}
return total;
@@ -1772,31 +2232,34 @@ io_writev(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.write(string, ...) -> integer
+ * write(*objects) -> integer
*
- * Writes the given strings to <em>ios</em>. The stream must be opened
- * for writing. Arguments that are not a string will be converted
- * to a string using <code>to_s</code>. Returns the number of bytes
- * written in total.
+ * Writes each of the given +objects+ to +self+,
+ * which must be opened for writing
+ * (see {Access Modes}[rdoc-ref:File@Access+Modes]);
+ * returns the total number bytes written;
+ * each of +objects+ that is not a string is converted via method +to_s+:
*
- * count = $stdout.write("This is", " a test\n")
- * puts "That was #{count} bytes of data"
+ * $stdout.write('Hello', ', ', 'World!', "\n") # => 14
+ * $stdout.write('foo', :bar, 2, "\n") # => 8
*
- * <em>produces:</em>
+ * Output:
*
- * This is a test
- * That was 15 bytes of data
+ * Hello, World!
+ * foobar2
+ *
+ * Related: IO#read.
*/
static VALUE
io_write_m(int argc, VALUE *argv, VALUE io)
{
if (argc != 1) {
- return io_writev(argc, argv, io);
+ return io_writev(argc, argv, io);
}
else {
- VALUE str = argv[0];
- return io_write(io, str, 0);
+ VALUE str = argv[0];
+ return io_write(io, str, 0);
}
}
@@ -1807,35 +2270,44 @@ rb_io_write(VALUE io, VALUE str)
}
static VALUE
-rb_io_writev(VALUE io, int argc, VALUE *argv)
+rb_io_writev(VALUE io, int argc, const VALUE *argv)
{
if (argc > 1 && rb_obj_method_arity(io, id_write) == 1) {
- if (io != rb_stderr && RTEST(ruby_verbose)) {
- VALUE klass = CLASS_OF(io);
- char sep = FL_TEST(klass, FL_SINGLETON) ? (klass = io, '.') : '#';
- rb_warning("%+"PRIsVALUE"%c""write is outdated interface"
- " which accepts just one argument",
- klass, sep);
- }
- do rb_io_write(io, *argv++); while (--argc);
- return argv[0]; /* unused right now */
+ if (io != rb_ractor_stderr() && RTEST(ruby_verbose)) {
+ VALUE klass = CLASS_OF(io);
+ char sep = FL_TEST(klass, FL_SINGLETON) ? (klass = io, '.') : '#';
+ rb_category_warning(
+ RB_WARN_CATEGORY_DEPRECATED, "%+"PRIsVALUE"%c""write is outdated interface"
+ " which accepts just one argument",
+ klass, sep
+ );
+ }
+
+ do rb_io_write(io, *argv++); while (--argc);
+
+ return Qnil;
}
+
return rb_funcallv(io, id_write, argc, argv);
}
/*
* call-seq:
- * ios << obj -> ios
+ * self << object -> self
*
- * String Output---Writes <i>obj</i> to <em>ios</em>.
- * <i>obj</i> will be converted to a string using
- * <code>to_s</code>.
+ * Writes the given +object+ to +self+,
+ * which must be opened for writing (see {Access Modes}[rdoc-ref:File@Access+Modes]);
+ * returns +self+;
+ * if +object+ is not a string, it is converted via method +to_s+:
*
- * $stdout << "Hello " << "world!\n"
+ * $stdout << 'Hello' << ', ' << 'World!' << "\n"
+ * $stdout << 'foo' << :bar << 2 << "\n"
*
- * <em>produces:</em>
+ * Output:
+ *
+ * Hello, World!
+ * foobar2
*
- * Hello world!
*/
@@ -1854,7 +2326,7 @@ nogvl_fsync(void *ptr)
#ifdef _WIN32
if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) != FILE_TYPE_DISK)
- return 0;
+ return 0;
#endif
return (VALUE)fsync(fptr->fd);
}
@@ -1874,7 +2346,7 @@ rb_io_flush_raw(VALUE io, int sync)
if (fptr->mode & FMODE_WRITABLE) {
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
}
if (fptr->mode & FMODE_READABLE) {
io_unread(fptr);
@@ -1885,18 +2357,14 @@ rb_io_flush_raw(VALUE io, int sync)
/*
* call-seq:
- * ios.flush -> ios
+ * flush -> self
*
- * Flushes any buffered data within <em>ios</em> to the underlying
- * operating system (note that this is Ruby internal buffering only;
- * the OS may buffer the data as well).
+ * Flushes data buffered in +self+ to the operating system
+ * (but does not necessarily flush data buffered in the operating system):
*
- * $stdout.print "no newline"
- * $stdout.flush
+ * $stdout.print 'no newline' # Not necessarily flushed.
+ * $stdout.flush # Flushed.
*
- * <em>produces:</em>
- *
- * no newline
*/
VALUE
@@ -1907,22 +2375,28 @@ rb_io_flush(VALUE io)
/*
* call-seq:
- * ios.pos -> integer
- * ios.tell -> integer
+ * tell -> integer
+ *
+ * Returns the current position (in bytes) in +self+
+ * (see {Position}[rdoc-ref:IO@Position]):
+ *
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.gets # => "First line\n"
+ * f.tell # => 12
+ * f.close
*
- * Returns the current offset (in bytes) of <em>ios</em>.
+ * Related: IO#pos=, IO#seek.
+ *
+ * IO#pos is an alias for IO#tell.
*
- * f = File.new("testfile")
- * f.pos #=> 0
- * f.gets #=> "This is line one\n"
- * f.pos #=> 17
*/
static VALUE
rb_io_tell(VALUE io)
{
rb_io_t *fptr;
- off_t pos;
+ rb_off_t pos;
GetOpenFile(io, fptr);
pos = io_tell(fptr);
@@ -1935,7 +2409,7 @@ static VALUE
rb_io_seek(VALUE io, VALUE offset, int whence)
{
rb_io_t *fptr;
- off_t pos;
+ rb_off_t pos;
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
@@ -1967,23 +2441,49 @@ interpret_seek_whence(VALUE vwhence)
/*
* call-seq:
- * ios.seek(amount, whence=IO::SEEK_SET) -> 0
+ * seek(offset, whence = IO::SEEK_SET) -> 0
*
- * Seeks to a given offset <i>anInteger</i> in the stream according to
- * the value of <i>whence</i>:
+ * Seeks to the position given by integer +offset+
+ * (see {Position}[rdoc-ref:IO@Position])
+ * and constant +whence+, which is one of:
*
- * :CUR or IO::SEEK_CUR | Seeks to _amount_ plus current position
- * ----------------------+--------------------------------------------------
- * :END or IO::SEEK_END | Seeks to _amount_ plus end of stream (you
- * | probably want a negative value for _amount_)
- * ----------------------+--------------------------------------------------
- * :SET or IO::SEEK_SET | Seeks to the absolute location given by _amount_
+ * - +:CUR+ or <tt>IO::SEEK_CUR</tt>:
+ * Repositions the stream to its current position plus the given +offset+:
*
- * Example:
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.seek(20, :CUR) # => 0
+ * f.tell # => 20
+ * f.seek(-10, :CUR) # => 0
+ * f.tell # => 10
+ * f.close
+ *
+ * - +:END+ or <tt>IO::SEEK_END</tt>:
+ * Repositions the stream to its end plus the given +offset+:
+ *
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.seek(0, :END) # => 0 # Repositions to stream end.
+ * f.tell # => 52
+ * f.seek(-20, :END) # => 0
+ * f.tell # => 32
+ * f.seek(-40, :END) # => 0
+ * f.tell # => 12
+ * f.close
+ *
+ * - +:SET+ or <tt>IO:SEEK_SET</tt>:
+ * Repositions the stream to the given +offset+:
+ *
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.seek(20, :SET) # => 0
+ * f.tell # => 20
+ * f.seek(40, :SET) # => 0
+ * f.tell # => 40
+ * f.close
+ *
+ * Related: IO#pos=, IO#tell.
*
- * f = File.new("testfile")
- * f.seek(-13, IO::SEEK_END) #=> 0
- * f.readline #=> "And so on...\n"
*/
static VALUE
@@ -1993,7 +2493,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
int whence = SEEK_SET;
if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
- whence = interpret_seek_whence(ptrname);
+ whence = interpret_seek_whence(ptrname);
}
return rb_io_seek(io, offset, whence);
@@ -2001,22 +2501,26 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.pos = integer -> integer
+ * pos = new_position -> new_position
+ *
+ * Seeks to the given +new_position+ (in bytes);
+ * see {Position}[rdoc-ref:IO@Position]:
*
- * Seeks to the given position (in bytes) in <em>ios</em>.
- * It is not guaranteed that seeking to the right position when <em>ios</em>
- * is textmode.
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.pos = 20 # => 20
+ * f.tell # => 20
+ * f.close
+ *
+ * Related: IO#seek, IO#tell.
*
- * f = File.new("testfile")
- * f.pos = 17
- * f.gets #=> "This is line two\n"
*/
static VALUE
rb_io_set_pos(VALUE io, VALUE offset)
{
rb_io_t *fptr;
- off_t pos;
+ rb_off_t pos;
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
@@ -2030,18 +2534,26 @@ static void clear_readconv(rb_io_t *fptr);
/*
* call-seq:
- * ios.rewind -> 0
+ * rewind -> 0
+ *
+ * Repositions the stream to its beginning,
+ * setting both the position and the line number to zero;
+ * see {Position}[rdoc-ref:IO@Position]
+ * and {Line Number}[rdoc-ref:IO@Line+Number]:
*
- * Positions <em>ios</em> to the beginning of input, resetting
- * #lineno to zero.
+ * f = File.open('t.txt')
+ * f.tell # => 0
+ * f.lineno # => 0
+ * f.gets # => "First line\n"
+ * f.tell # => 12
+ * f.lineno # => 1
+ * f.rewind # => 0
+ * f.tell # => 0
+ * f.lineno # => 0
+ * f.close
*
- * f = File.new("testfile")
- * f.readline #=> "This is line one\n"
- * f.rewind #=> 0
- * f.lineno #=> 0
- * f.readline #=> "This is line one\n"
+ * Note that this method cannot be used with streams such as pipes, ttys, and sockets.
*
- * Note that it cannot be used with streams such as pipes, ttys, and sockets.
*/
static VALUE
@@ -2052,11 +2564,11 @@ rb_io_rewind(VALUE io)
GetOpenFile(io, fptr);
if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
if (io == ARGF.current_file) {
- ARGF.lineno -= fptr->lineno;
+ ARGF.lineno -= fptr->lineno;
}
fptr->lineno = 0;
if (fptr->readconv) {
- clear_readconv(fptr);
+ clear_readconv(fptr);
}
return INT2FIX(0);
@@ -2065,11 +2577,12 @@ rb_io_rewind(VALUE io)
static int
fptr_wait_readable(rb_io_t *fptr)
{
- int ret = rb_io_wait_readable(fptr->fd);
+ int result = rb_io_maybe_wait_readable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT);
- if (ret)
+ if (result)
rb_io_check_closed(fptr);
- return ret;
+
+ return result;
}
static int
@@ -2083,27 +2596,26 @@ io_fillbuf(rb_io_t *fptr)
fptr->rbuf.capa = IO_RBUF_CAPA_FOR(fptr);
fptr->rbuf.ptr = ALLOC_N(char, fptr->rbuf.capa);
#ifdef _WIN32
- fptr->rbuf.capa--;
+ fptr->rbuf.capa--;
#endif
}
if (fptr->rbuf.len == 0) {
retry:
- {
- r = rb_read_internal(fptr->fd, fptr->rbuf.ptr, fptr->rbuf.capa);
- }
+ r = rb_io_read_memory(fptr, fptr->rbuf.ptr, fptr->rbuf.capa);
+
if (r < 0) {
if (fptr_wait_readable(fptr))
goto retry;
- {
- int e = errno;
- VALUE path = rb_sprintf("fd:%d ", fptr->fd);
- if (!NIL_P(fptr->pathv)) {
- rb_str_append(path, fptr->pathv);
- }
- rb_syserr_fail_path(e, path);
- }
- }
- if (r > 0) rb_io_check_closed(fptr);
+
+ int e = errno;
+ VALUE path = rb_sprintf("fd:%d ", fptr->fd);
+ if (!NIL_P(fptr->pathv)) {
+ rb_str_append(path, fptr->pathv);
+ }
+
+ rb_syserr_fail_path(e, path);
+ }
+ if (r > 0) rb_io_check_closed(fptr);
fptr->rbuf.off = 0;
fptr->rbuf.len = (int)r; /* r should be <= rbuf_capa */
if (r == 0)
@@ -2114,35 +2626,40 @@ io_fillbuf(rb_io_t *fptr)
/*
* call-seq:
- * ios.eof -> true or false
- * ios.eof? -> true or false
+ * eof -> true or false
+ *
+ * Returns +true+ if the stream is positioned at its end, +false+ otherwise;
+ * see {Position}[rdoc-ref:IO@Position]:
*
- * Returns true if <em>ios</em> is at end of file that means
- * there are no more data to read.
- * The stream must be opened for reading or an IOError will be
- * raised.
+ * f = File.open('t.txt')
+ * f.eof # => false
+ * f.seek(0, :END) # => 0
+ * f.eof # => true
+ * f.close
*
- * f = File.new("testfile")
- * dummy = f.readlines
- * f.eof #=> true
+ * Raises an exception unless the stream is opened for reading;
+ * see {Mode}[rdoc-ref:File@Access+Modes].
*
- * If <em>ios</em> is a stream such as pipe or socket, IO#eof?
- * blocks until the other end sends some data or closes it.
+ * If +self+ is a stream such as pipe or socket, this method
+ * blocks until the other end sends some data or closes it:
*
- * r, w = IO.pipe
- * Thread.new { sleep 1; w.close }
- * r.eof? #=> true after 1 second blocking
+ * r, w = IO.pipe
+ * Thread.new { sleep 1; w.close }
+ * r.eof? # => true # After 1-second wait.
*
- * r, w = IO.pipe
- * Thread.new { sleep 1; w.puts "a" }
- * r.eof? #=> false after 1 second blocking
+ * r, w = IO.pipe
+ * Thread.new { sleep 1; w.puts "a" }
+ * r.eof? # => false # After 1-second wait.
*
- * r, w = IO.pipe
- * r.eof? # blocks forever
+ * r, w = IO.pipe
+ * r.eof? # blocks forever
*
- * Note that IO#eof? reads data to the input byte buffer. So
+ * Note that this method reads data to the input byte buffer. So
* IO#sysread may not behave as you intend with IO#eof?, unless you
* call IO#rewind first (which is not available for some streams).
+ *
+ * IO#eof? is an alias for IO#eof.
+ *
*/
VALUE
@@ -2156,28 +2673,28 @@ rb_io_eof(VALUE io)
if (READ_CHAR_PENDING(fptr)) return Qfalse;
if (READ_DATA_PENDING(fptr)) return Qfalse;
READ_CHECK(fptr);
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
if (!NEED_READCONV(fptr) && NEED_NEWLINE_DECORATOR_ON_READ(fptr)) {
- return eof(fptr->fd) ? Qtrue : Qfalse;
+ return RBOOL(eof(fptr->fd));;
}
#endif
- if (io_fillbuf(fptr) < 0) {
- return Qtrue;
- }
- return Qfalse;
+ return RBOOL(io_fillbuf(fptr) < 0);
}
/*
* call-seq:
- * ios.sync -> true or false
+ * sync -> true or false
*
- * Returns the current ``sync mode'' of <em>ios</em>. When sync mode is
- * true, all output is immediately flushed to the underlying operating
- * system and is not buffered by Ruby internally. See also
- * IO#fsync.
+ * Returns the current sync mode of the stream.
+ * When sync mode is true, all output is immediately flushed to the underlying
+ * operating system and is not buffered by Ruby internally. See also #fsync.
+ *
+ * f = File.open('t.tmp', 'w')
+ * f.sync # => false
+ * f.sync = true
+ * f.sync # => true
+ * f.close
*
- * f = File.new("testfile")
- * f.sync #=> false
*/
static VALUE
@@ -2187,22 +2704,34 @@ rb_io_sync(VALUE io)
io = GetWriteIO(io);
GetOpenFile(io, fptr);
- return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
+ return RBOOL(fptr->mode & FMODE_SYNC);
}
#ifdef HAVE_FSYNC
/*
* call-seq:
- * ios.sync = boolean -> boolean
+ * sync = boolean -> boolean
+ *
+ * Sets the _sync_ _mode_ for the stream to the given value;
+ * returns the given value.
*
- * Sets the ``sync mode'' to <code>true</code> or <code>false</code>.
- * When sync mode is true, all output is immediately flushed to the
- * underlying operating system and is not buffered internally. Returns
- * the new state. See also IO#fsync.
+ * Values for the sync mode:
+ *
+ * - +true+: All output is immediately flushed to the
+ * underlying operating system and is not buffered internally.
+ * - +false+: Output may be buffered internally.
+ *
+ * Example;
+ *
+ * f = File.open('t.tmp', 'w')
+ * f.sync # => false
+ * f.sync = true
+ * f.sync # => true
+ * f.close
+ *
+ * Related: IO#fsync.
*
- * f = File.new("testfile")
- * f.sync = true
*/
static VALUE
@@ -2213,25 +2742,30 @@ rb_io_set_sync(VALUE io, VALUE sync)
io = GetWriteIO(io);
GetOpenFile(io, fptr);
if (RTEST(sync)) {
- fptr->mode |= FMODE_SYNC;
+ fptr->mode |= FMODE_SYNC;
}
else {
- fptr->mode &= ~FMODE_SYNC;
+ fptr->mode &= ~FMODE_SYNC;
}
return sync;
}
/*
* call-seq:
- * ios.fsync -> 0 or nil
+ * fsync -> 0
*
- * Immediately writes all buffered data in <em>ios</em> to disk.
- * Note that #fsync differs from using IO#sync=. The latter ensures
- * that data is flushed from Ruby's buffers, but does not guarantee
- * that the underlying operating system actually writes it to disk.
+ * Immediately writes to disk all data buffered in the stream,
+ * via the operating system's <tt>fsync(2)</tt>.
+
+ * Note this difference:
+ *
+ * - IO#sync=: Ensures that data is flushed from the stream's internal buffers,
+ * but does not guarantee that the operating system actually writes the data to disk.
+ * - IO#fsync: Ensures both that data is flushed from internal buffers,
+ * and that data is written to disk.
+ *
+ * Raises an exception if the operating system does not support <tt>fsync(2)</tt>.
*
- * NotImplementedError is raised
- * if the underlying operating system does not support <em>fsync(2)</em>.
*/
static VALUE
@@ -2243,9 +2777,9 @@ rb_io_fsync(VALUE io)
GetOpenFile(io, fptr);
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
if ((int)rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd) < 0)
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
return INT2FIX(0);
}
#else
@@ -2267,20 +2801,20 @@ nogvl_fdatasync(void *ptr)
#ifdef _WIN32
if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) != FILE_TYPE_DISK)
- return 0;
+ return 0;
#endif
return (VALUE)fdatasync(fptr->fd);
}
/*
* call-seq:
- * ios.fdatasync -> 0 or nil
+ * fdatasync -> 0
*
- * Immediately writes all buffered data in <em>ios</em> to disk.
+ * Immediately writes to disk all data buffered in the stream,
+ * via the operating system's: <tt>fdatasync(2)</tt>, if supported,
+ * otherwise via <tt>fsync(2)</tt>, if supported;
+ * otherwise raises an exception.
*
- * If the underlying operating system does not support <em>fdatasync(2)</em>,
- * IO#fsync is called instead (which might raise a
- * NotImplementedError).
*/
static VALUE
@@ -2292,10 +2826,10 @@ rb_io_fdatasync(VALUE io)
GetOpenFile(io, fptr);
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
if ((int)rb_thread_io_blocking_region(nogvl_fdatasync, fptr, fptr->fd) == 0)
- return INT2FIX(0);
+ return INT2FIX(0);
/* fall back */
return rb_io_fsync(io);
@@ -2306,14 +2840,18 @@ rb_io_fdatasync(VALUE io)
/*
* call-seq:
- * ios.fileno -> integer
- * ios.to_i -> integer
+ * fileno -> integer
*
- * Returns an integer representing the numeric file descriptor for
- * <em>ios</em>.
+ * Returns the integer file descriptor for the stream:
+ *
+ * $stdin.fileno # => 0
+ * $stdout.fileno # => 1
+ * $stderr.fileno # => 2
+ * File.open('t.txt').fileno # => 10
+ * f.close
+ *
+ * IO#to_i is an alias for IO#fileno.
*
- * $stdin.fileno #=> 0
- * $stdout.fileno #=> 1
*/
static VALUE
@@ -2327,25 +2865,39 @@ rb_io_fileno(VALUE io)
return INT2FIX(fd);
}
+int
+rb_io_descriptor(VALUE io)
+{
+ if (RB_TYPE_P(io, T_FILE)) {
+ rb_io_t *fptr = RFILE(io)->fptr;
+ rb_io_check_closed(fptr);
+ return fptr->fd;
+ }
+ else {
+ return RB_NUM2INT(rb_funcall(io, id_fileno, 0));
+ }
+}
/*
* call-seq:
- * ios.pid -> integer
+ * pid -> integer or nil
*
- * Returns the process ID of a child process associated with
- * <em>ios</em>. This will be set by IO.popen.
+ * Returns the process ID of a child process associated with the stream,
+ * which will have been set by IO#popen, or +nil+ if the stream was not
+ * created by IO#popen:
*
- * pipe = IO.popen("-")
- * if pipe
- * $stderr.puts "In parent, child pid is #{pipe.pid}"
- * else
- * $stderr.puts "In child, pid is #{$$}"
- * end
+ * pipe = IO.popen("-")
+ * if pipe
+ * $stderr.puts "In parent, child pid is #{pipe.pid}"
+ * else
+ * $stderr.puts "In child, pid is #{$$}"
+ * end
*
- * <em>produces:</em>
+ * Output:
+ *
+ * In child, pid is 26209
+ * In parent, child pid is 26209
*
- * In child, pid is 26209
- * In parent, child pid is 26209
*/
static VALUE
@@ -2355,16 +2907,44 @@ rb_io_pid(VALUE io)
GetOpenFile(io, fptr);
if (!fptr->pid)
- return Qnil;
+ return Qnil;
return PIDT2NUM(fptr->pid);
}
+/*
+ * call-seq:
+ * path -> string or nil
+ *
+ * Returns the path associated with the IO, or +nil+ if there is no path
+ * associated with the IO. It is not guaranteed that the path exists on
+ * the filesystem.
+ *
+ * $stdin.path # => "<STDIN>"
+ *
+ * File.open("testfile") {|f| f.path} # => "testfile"
+ */
+
+static VALUE
+rb_io_path(VALUE io)
+{
+ rb_io_t *fptr = RFILE(io)->fptr;
+
+ if (!fptr)
+ return Qnil;
+
+ return rb_obj_dup(fptr->pathv);
+}
/*
- * call-seq:
- * ios.inspect -> string
+ * call-seq:
+ * inspect -> string
+ *
+ * Returns a string representation of +self+:
+ *
+ * f = File.open('t.txt')
+ * f.inspect # => "#<File:t.txt>"
+ * f.close
*
- * Return a string describing this IO object.
*/
static VALUE
@@ -2381,16 +2961,16 @@ rb_io_inspect(VALUE obj)
rb_str_cat2(result, ":");
if (NIL_P(fptr->pathv)) {
if (fptr->fd < 0) {
- rb_str_cat(result, closed+1, strlen(closed)-1);
+ rb_str_cat(result, closed+1, strlen(closed)-1);
}
else {
- rb_str_catf(result, "fd %d", fptr->fd);
+ rb_str_catf(result, "fd %d", fptr->fd);
}
}
else {
- rb_str_append(result, fptr->pathv);
+ rb_str_append(result, fptr->pathv);
if (fptr->fd < 0) {
- rb_str_cat(result, closed, strlen(closed));
+ rb_str_cat(result, closed, strlen(closed));
}
}
return rb_str_cat2(result, ">");
@@ -2398,9 +2978,10 @@ rb_io_inspect(VALUE obj)
/*
* call-seq:
- * ios.to_io -> ios
+ * to_io -> self
+ *
+ * Returns +self+.
*
- * Returns <em>ios</em>.
*/
static VALUE
@@ -2432,31 +3013,32 @@ io_bufread(char *ptr, long len, rb_io_t *fptr)
long c;
if (READ_DATA_PENDING(fptr) == 0) {
- while (n > 0) {
+ while (n > 0) {
again:
- c = rb_read_internal(fptr->fd, ptr+offset, n);
- if (c == 0) break;
- if (c < 0) {
+ rb_io_check_closed(fptr);
+ c = rb_io_read_memory(fptr, ptr+offset, n);
+ if (c == 0) break;
+ if (c < 0) {
if (fptr_wait_readable(fptr))
goto again;
- return -1;
- }
- offset += c;
- if ((n -= c) <= 0) break;
- }
- return len - n;
+ return -1;
+ }
+ offset += c;
+ if ((n -= c) <= 0) break;
+ }
+ return len - n;
}
while (n > 0) {
- c = read_buffered_data(ptr+offset, n, fptr);
- if (c > 0) {
- offset += c;
- if ((n -= c) <= 0) break;
- }
- rb_io_check_closed(fptr);
- if (io_fillbuf(fptr) < 0) {
- break;
- }
+ c = read_buffered_data(ptr+offset, n, fptr);
+ if (c > 0) {
+ offset += c;
+ if ((n -= c) <= 0) break;
+ }
+ rb_io_check_closed(fptr);
+ if (io_fillbuf(fptr) < 0) {
+ break;
+ }
}
return len - n;
}
@@ -2497,27 +3079,27 @@ static long
remain_size(rb_io_t *fptr)
{
struct stat st;
- off_t siz = READ_DATA_PENDING_COUNT(fptr);
- off_t pos;
+ rb_off_t siz = READ_DATA_PENDING_COUNT(fptr);
+ rb_off_t pos;
if (fstat(fptr->fd, &st) == 0 && S_ISREG(st.st_mode)
#if defined(__HAIKU__)
- && (st.st_dev > 3)
+ && (st.st_dev > 3)
#endif
- )
+ )
{
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
- pos = lseek(fptr->fd, 0, SEEK_CUR);
- if (st.st_size >= pos && pos >= 0) {
- siz += st.st_size - pos;
- if (siz > LONG_MAX) {
- rb_raise(rb_eIOError, "file too big for single read");
- }
- }
+ rb_sys_fail_on_write(fptr);
+ pos = lseek(fptr->fd, 0, SEEK_CUR);
+ if (st.st_size >= pos && pos >= 0) {
+ siz += st.st_size - pos;
+ if (siz > LONG_MAX) {
+ rb_raise(rb_eIOError, "file too big for single read");
+ }
+ }
}
else {
- siz += BUFSIZ;
+ siz += BUFSIZ;
}
return (long)siz;
}
@@ -2529,6 +3111,8 @@ io_enc_str(VALUE str, rb_io_t *fptr)
return str;
}
+static rb_encoding *io_read_encoding(rb_io_t *fptr);
+
static void
make_readconv(rb_io_t *fptr, int size)
{
@@ -2540,7 +3124,7 @@ make_readconv(rb_io_t *fptr, int size)
ecopts = fptr->encs.ecopts;
if (fptr->encs.enc2) {
sname = rb_enc_name(fptr->encs.enc2);
- dname = rb_enc_name(fptr->encs.enc);
+ dname = rb_enc_name(io_read_encoding(fptr));
}
else {
sname = dname = "";
@@ -2550,7 +3134,7 @@ make_readconv(rb_io_t *fptr, int size)
rb_exc_raise(rb_econv_open_exc(sname, dname, ecflags));
fptr->cbuf.off = 0;
fptr->cbuf.len = 0;
- if (size < IO_CBUF_CAPA_MIN) size = IO_CBUF_CAPA_MIN;
+ if (size < IO_CBUF_CAPA_MIN) size = IO_CBUF_CAPA_MIN;
fptr->cbuf.capa = size;
fptr->cbuf.ptr = ALLOC_N(char, fptr->cbuf.capa);
}
@@ -2607,27 +3191,27 @@ fill_cbuf(rb_io_t *fptr, int ec_flags)
if (res == econv_finished) {
return MORE_CHAR_FINISHED;
- }
+ }
if (res == econv_source_buffer_empty) {
if (fptr->rbuf.len == 0) {
- READ_CHECK(fptr);
+ READ_CHECK(fptr);
if (io_fillbuf(fptr) < 0) {
- if (!fptr->readconv) {
- return MORE_CHAR_FINISHED;
- }
+ if (!fptr->readconv) {
+ return MORE_CHAR_FINISHED;
+ }
ds = dp = (unsigned char *)fptr->cbuf.ptr + fptr->cbuf.off + fptr->cbuf.len;
de = (unsigned char *)fptr->cbuf.ptr + fptr->cbuf.capa;
res = rb_econv_convert(fptr->readconv, NULL, NULL, &dp, de, 0);
fptr->cbuf.len += (int)(dp - ds);
rb_econv_check_error(fptr->readconv);
- break;
+ break;
}
}
}
}
if (cbuf_len0 != fptr->cbuf.len)
- return MORE_CHAR_SUSPENDED;
+ return MORE_CHAR_SUSPENDED;
return MORE_CHAR_FINISHED;
}
@@ -2647,14 +3231,14 @@ io_shift_cbuf(rb_io_t *fptr, int len, VALUE *strp)
{
VALUE str = Qnil;
if (strp) {
- str = *strp;
- if (NIL_P(str)) {
- *strp = str = rb_str_new(fptr->cbuf.ptr+fptr->cbuf.off, len);
- }
- else {
- rb_str_cat(str, fptr->cbuf.ptr+fptr->cbuf.off, len);
- }
- rb_enc_associate(str, fptr->encs.enc);
+ str = *strp;
+ if (NIL_P(str)) {
+ *strp = str = rb_str_new(fptr->cbuf.ptr+fptr->cbuf.off, len);
+ }
+ else {
+ rb_str_cat(str, fptr->cbuf.ptr+fptr->cbuf.off, len);
+ }
+ rb_enc_associate(str, fptr->encs.enc);
}
fptr->cbuf.off += len;
fptr->cbuf.len -= len;
@@ -2672,22 +3256,25 @@ static int
io_setstrbuf(VALUE *str, long len)
{
#ifdef _WIN32
- len = (len + 1) & ~1L; /* round up for wide char */
+ if (len > 0)
+ len = (len + 1) & ~1L; /* round up for wide char */
#endif
if (NIL_P(*str)) {
- *str = rb_str_new(0, len);
- return TRUE;
+ *str = rb_str_new(0, len);
+ return TRUE;
}
else {
- VALUE s = StringValue(*str);
- long clen = RSTRING_LEN(s);
- if (clen >= len) {
- rb_str_modify(s);
- return FALSE;
- }
- len -= clen;
- }
- rb_str_modify_expand(*str, len);
+ VALUE s = StringValue(*str);
+ long clen = RSTRING_LEN(s);
+ if (clen >= len) {
+ rb_str_modify(s);
+ return FALSE;
+ }
+ len -= clen;
+ }
+ if ((rb_str_capacity(*str) - (size_t)RSTRING_LEN(*str)) < (size_t)len) {
+ rb_str_modify_expand(*str, len);
+ }
return FALSE;
}
@@ -2696,7 +3283,7 @@ static void
io_shrink_read_string(VALUE str, long n)
{
if (rb_str_capacity(str) - n > MAX_REALLOC_GAP) {
- rb_str_resize(str, n);
+ rb_str_resize(str, n);
}
}
@@ -2704,9 +3291,9 @@ static void
io_set_read_length(VALUE str, long n, int shrinkable)
{
if (RSTRING_LEN(str) != n) {
- rb_str_modify(str);
- rb_str_set_len(str, n);
- if (shrinkable) io_shrink_read_string(str, n);
+ rb_str_modify(str);
+ rb_str_set_len(str, n);
+ if (shrinkable) io_shrink_read_string(str, n);
}
}
@@ -2721,28 +3308,28 @@ read_all(rb_io_t *fptr, long siz, VALUE str)
int shrinkable;
if (NEED_READCONV(fptr)) {
- int first = !NIL_P(str);
- SET_BINARY_MODE(fptr);
- shrinkable = io_setstrbuf(&str,0);
+ int first = !NIL_P(str);
+ SET_BINARY_MODE(fptr);
+ shrinkable = io_setstrbuf(&str,0);
make_readconv(fptr, 0);
while (1) {
VALUE v;
if (fptr->cbuf.len) {
- if (first) rb_str_set_len(str, first = 0);
+ if (first) rb_str_set_len(str, first = 0);
io_shift_cbuf(fptr, fptr->cbuf.len, &str);
}
v = fill_cbuf(fptr, 0);
if (v != MORE_CHAR_SUSPENDED && v != MORE_CHAR_FINISHED) {
if (fptr->cbuf.len) {
- if (first) rb_str_set_len(str, first = 0);
+ if (first) rb_str_set_len(str, first = 0);
io_shift_cbuf(fptr, fptr->cbuf.len, &str);
}
rb_exc_raise(v);
}
if (v == MORE_CHAR_FINISHED) {
clear_readconv(fptr);
- if (first) rb_str_set_len(str, first = 0);
- if (shrinkable) io_shrink_read_string(str, RSTRING_LEN(str));
+ if (first) rb_str_set_len(str, first = 0);
+ if (shrinkable) io_shrink_read_string(str, RSTRING_LEN(str));
return io_enc_str(str, fptr);
}
}
@@ -2758,19 +3345,29 @@ read_all(rb_io_t *fptr, long siz, VALUE str)
if (siz == 0) siz = BUFSIZ;
shrinkable = io_setstrbuf(&str, siz);
for (;;) {
- READ_CHECK(fptr);
- n = io_fread(str, bytes, siz - bytes, fptr);
- if (n == 0 && bytes == 0) {
- rb_str_set_len(str, 0);
- break;
- }
- bytes += n;
- rb_str_set_len(str, bytes);
- if (cr != ENC_CODERANGE_BROKEN)
- pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr);
- if (bytes < siz) break;
- siz += BUFSIZ;
- rb_str_modify_expand(str, BUFSIZ);
+ READ_CHECK(fptr);
+ n = io_fread(str, bytes, siz - bytes, fptr);
+ if (n == 0 && bytes == 0) {
+ rb_str_set_len(str, 0);
+ break;
+ }
+ bytes += n;
+ rb_str_set_len(str, bytes);
+ if (cr != ENC_CODERANGE_BROKEN)
+ pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr);
+ if (bytes < siz) break;
+ siz += BUFSIZ;
+
+ size_t capa = rb_str_capacity(str);
+ if (capa < (size_t)RSTRING_LEN(str) + BUFSIZ) {
+ if (capa < BUFSIZ) {
+ capa = BUFSIZ;
+ }
+ else if (capa > IO_MAX_BUFFER_GROWTH) {
+ capa = IO_MAX_BUFFER_GROWTH;
+ }
+ rb_str_modify_expand(str, capa);
+ }
}
if (shrinkable) io_shrink_read_string(str, RSTRING_LEN(str));
str = io_enc_str(str, fptr);
@@ -2782,22 +3379,32 @@ void
rb_io_set_nonblock(rb_io_t *fptr)
{
if (rb_fd_set_nonblock(fptr->fd) != 0) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
}
static VALUE
-read_internal_call(VALUE arg)
+io_read_memory_call(VALUE arg)
{
struct io_internal_read_struct *iis = (struct io_internal_read_struct *)arg;
- return rb_thread_io_blocking_region(internal_read_func, iis, iis->fd);
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_read_memory(scheduler, iis->fptr->self, iis->buf, iis->capa, 0);
+
+ if (!UNDEF_P(result)) {
+ // This is actually returned as a pseudo-VALUE and later cast to a long:
+ return (VALUE)rb_fiber_scheduler_io_result_apply(result);
+ }
+ }
+
+ return rb_thread_io_blocking_region(internal_read_func, iis, iis->fptr->fd);
}
static long
-read_internal_locktmp(VALUE str, struct io_internal_read_struct *iis)
+io_read_memory_locktmp(VALUE str, struct io_internal_read_struct *iis)
{
- return (long)rb_str_locktmp_ensure(str, read_internal_call, (VALUE)iis);
+ return (long)rb_str_locktmp_ensure(str, io_read_memory_call, (VALUE)iis);
}
#define no_exception_p(opts) !rb_opts_exception_p((opts), TRUE)
@@ -2814,7 +3421,7 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int no_exception, int nonblock)
rb_scan_args(argc, argv, "11", &length, &str);
if ((len = NUM2LONG(length)) < 0) {
- rb_raise(rb_eArgError, "negative length %ld given", len);
+ rb_raise(rb_eArgError, "negative length %ld given", len);
}
shrinkable = io_setstrbuf(&str, len);
@@ -2822,8 +3429,10 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int no_exception, int nonblock)
GetOpenFile(io, fptr);
rb_io_check_byte_readable(fptr);
- if (len == 0)
- return str;
+ if (len == 0) {
+ io_set_read_length(str, 0, shrinkable);
+ return str;
+ }
if (!nonblock)
READ_CHECK(fptr);
@@ -2833,22 +3442,25 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int no_exception, int nonblock)
if (nonblock) {
rb_io_set_nonblock(fptr);
}
- io_setstrbuf(&str, len);
- iis.fd = fptr->fd;
+ io_setstrbuf(&str, len);
+ iis.th = rb_thread_current();
+ iis.fptr = fptr;
iis.nonblock = nonblock;
+ iis.fd = fptr->fd;
iis.buf = RSTRING_PTR(str);
iis.capa = len;
- n = read_internal_locktmp(str, &iis);
+ iis.timeout = NULL;
+ n = io_read_memory_locktmp(str, &iis);
if (n < 0) {
- int e = errno;
+ int e = errno;
if (!nonblock && fptr_wait_readable(fptr))
goto again;
- if (nonblock && (e == EWOULDBLOCK || e == EAGAIN)) {
+ if (nonblock && (io_again_p(e))) {
if (no_exception)
return sym_wait_readable;
else
- rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
- e, "read would block");
+ rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
+ e, "read would block");
}
rb_syserr_fail_path(e, fptr->pathv);
}
@@ -2863,67 +3475,94 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int no_exception, int nonblock)
/*
* call-seq:
- * ios.readpartial(maxlen) -> string
- * ios.readpartial(maxlen, outbuf) -> outbuf
+ * readpartial(maxlen) -> string
+ * readpartial(maxlen, out_string) -> out_string
*
- * Reads at most <i>maxlen</i> bytes from the I/O stream.
- * It blocks only if <em>ios</em> has no data immediately available.
- * It doesn't block if some data available.
+ * Reads up to +maxlen+ bytes from the stream;
+ * returns a string (either a new string or the given +out_string+).
+ * Its encoding is:
*
- * If the optional _outbuf_ argument is present,
- * it must reference a String, which will receive the data.
- * The _outbuf_ will contain only the received data after the method call
- * even if it is not empty at the beginning.
+ * - The unchanged encoding of +out_string+, if +out_string+ is given.
+ * - ASCII-8BIT, otherwise.
*
- * It raises EOFError on end of file.
- *
- * readpartial is designed for streams such as pipe, socket, tty, etc.
- * It blocks only when no data immediately available.
- * This means that it blocks only when following all conditions hold.
- * * the byte buffer in the IO object is empty.
- * * the content of the stream is empty.
- * * the stream is not reached to EOF.
- *
- * When readpartial blocks, it waits data or EOF on the stream.
- * If some data is reached, readpartial returns with the data.
- * If EOF is reached, readpartial raises EOFError.
- *
- * When readpartial doesn't blocks, it returns or raises immediately.
- * If the byte buffer is not empty, it returns the data in the buffer.
- * Otherwise if the stream has some content,
- * it returns the data in the stream.
- * Otherwise if the stream is reached to EOF, it raises EOFError.
- *
- * r, w = IO.pipe # buffer pipe content
- * w << "abc" # "" "abc".
- * r.readpartial(4096) #=> "abc" "" ""
- * r.readpartial(4096) # blocks because buffer and pipe is empty.
- *
- * r, w = IO.pipe # buffer pipe content
- * w << "abc" # "" "abc"
- * w.close # "" "abc" EOF
- * r.readpartial(4096) #=> "abc" "" EOF
- * r.readpartial(4096) # raises EOFError
+ * - Contains +maxlen+ bytes from the stream, if available.
+ * - Otherwise contains all available bytes, if any available.
+ * - Otherwise is an empty string.
+ *
+ * With the single non-negative integer argument +maxlen+ given,
+ * returns a new string:
+ *
+ * f = File.new('t.txt')
+ * f.readpartial(20) # => "First line\nSecond l"
+ * f.readpartial(20) # => "ine\n\nFourth line\n"
+ * f.readpartial(20) # => "Fifth line\n"
+ * f.readpartial(20) # Raises EOFError.
+ * f.close
+ *
+ * With both argument +maxlen+ and string argument +out_string+ given,
+ * returns modified +out_string+:
+ *
+ * f = File.new('t.txt')
+ * s = 'foo'
+ * f.readpartial(20, s) # => "First line\nSecond l"
+ * s = 'bar'
+ * f.readpartial(0, s) # => ""
+ * f.close
+ *
+ * This method is useful for a stream such as a pipe, a socket, or a tty.
+ * It blocks only when no data is immediately available.
+ * This means that it blocks only when _all_ of the following are true:
+ *
+ * - The byte buffer in the stream is empty.
+ * - The content of the stream is empty.
+ * - The stream is not at EOF.
+ *
+ * When blocked, the method waits for either more data or EOF on the stream:
+ *
+ * - If more data is read, the method returns the data.
+ * - If EOF is reached, the method raises EOFError.
+ *
+ * When not blocked, the method responds immediately:
+ *
+ * - Returns data from the buffer if there is any.
+ * - Otherwise returns data from the stream if there is any.
+ * - Otherwise raises EOFError if the stream has reached EOF.
*
- * r, w = IO.pipe # buffer pipe content
- * w << "abc\ndef\n" # "" "abc\ndef\n"
- * r.gets #=> "abc\n" "def\n" ""
- * w << "ghi\n" # "def\n" "ghi\n"
- * r.readpartial(4096) #=> "def\n" "" "ghi\n"
- * r.readpartial(4096) #=> "ghi\n" "" ""
+ * Note that this method is similar to sysread. The differences are:
*
- * Note that readpartial behaves similar to sysread.
- * The differences are:
- * * If the byte buffer is not empty, read from the byte buffer
+ * - If the byte buffer is not empty, read from the byte buffer
* instead of "sysread for buffered IO (IOError)".
- * * It doesn't cause Errno::EWOULDBLOCK and Errno::EINTR. When
+ * - It doesn't cause Errno::EWOULDBLOCK and Errno::EINTR. When
* readpartial meets EWOULDBLOCK and EINTR by read system call,
- * readpartial retry the system call.
+ * readpartial retries the system call.
*
- * The latter means that readpartial is nonblocking-flag insensitive.
+ * The latter means that readpartial is non-blocking-flag insensitive.
* It blocks on the situation IO#sysread causes Errno::EWOULDBLOCK as
* if the fd is blocking mode.
*
+ * Examples:
+ *
+ * # # Returned Buffer Content Pipe Content
+ * r, w = IO.pipe #
+ * w << 'abc' # "" "abc".
+ * r.readpartial(4096) # => "abc" "" ""
+ * r.readpartial(4096) # (Blocks because buffer and pipe are empty.)
+ *
+ * # # Returned Buffer Content Pipe Content
+ * r, w = IO.pipe #
+ * w << 'abc' # "" "abc"
+ * w.close # "" "abc" EOF
+ * r.readpartial(4096) # => "abc" "" EOF
+ * r.readpartial(4096) # raises EOFError
+ *
+ * # # Returned Buffer Content Pipe Content
+ * r, w = IO.pipe #
+ * w << "abc\ndef\n" # "" "abc\ndef\n"
+ * r.gets # => "abc\n" "def\n" ""
+ * w << "ghi\n" # "def\n" "ghi\n"
+ * r.readpartial(4096) # => "def\n" "" "ghi\n"
+ * r.readpartial(4096) # => "ghi\n" "" ""
+ *
*/
static VALUE
@@ -2956,33 +3595,37 @@ io_read_nonblock(rb_execution_context_t *ec, VALUE io, VALUE length, VALUE str,
int shrinkable;
if ((len = NUM2LONG(length)) < 0) {
- rb_raise(rb_eArgError, "negative length %ld given", len);
+ rb_raise(rb_eArgError, "negative length %ld given", len);
}
shrinkable = io_setstrbuf(&str, len);
- rb_bool_expected(ex, "exception");
+ rb_bool_expected(ex, "exception", TRUE);
GetOpenFile(io, fptr);
rb_io_check_byte_readable(fptr);
- if (len == 0)
- return str;
+ if (len == 0) {
+ io_set_read_length(str, 0, shrinkable);
+ return str;
+ }
n = read_buffered_data(RSTRING_PTR(str), len, fptr);
if (n <= 0) {
- rb_io_set_nonblock(fptr);
- shrinkable |= io_setstrbuf(&str, len);
- iis.fd = fptr->fd;
+ rb_fd_set_nonblock(fptr->fd);
+ shrinkable |= io_setstrbuf(&str, len);
+ iis.fptr = fptr;
iis.nonblock = 1;
+ iis.fd = fptr->fd;
iis.buf = RSTRING_PTR(str);
iis.capa = len;
- n = read_internal_locktmp(str, &iis);
+ iis.timeout = NULL;
+ n = io_read_memory_locktmp(str, &iis);
if (n < 0) {
- int e = errno;
- if ((e == EWOULDBLOCK || e == EAGAIN)) {
+ int e = errno;
+ if (io_again_p(e)) {
if (!ex) return sym_wait_readable;
- rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
- e, "read would block");
+ rb_readwrite_syserr_fail(RB_IO_WAIT_READABLE,
+ e, "read would block");
}
rb_syserr_fail_path(e, fptr->pathv);
}
@@ -2991,7 +3634,7 @@ io_read_nonblock(rb_execution_context_t *ec, VALUE io, VALUE length, VALUE str,
if (n == 0) {
if (!ex) return Qnil;
- rb_eof_error();
+ rb_eof_error();
}
return str;
@@ -3005,31 +3648,31 @@ io_write_nonblock(rb_execution_context_t *ec, VALUE io, VALUE str, VALUE ex)
long n;
if (!RB_TYPE_P(str, T_STRING))
- str = rb_obj_as_string(str);
- rb_bool_expected(ex, "exception");
+ str = rb_obj_as_string(str);
+ rb_bool_expected(ex, "exception", TRUE);
io = GetWriteIO(io);
GetOpenFile(io, fptr);
rb_io_check_writable(fptr);
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
- rb_io_set_nonblock(fptr);
+ rb_fd_set_nonblock(fptr->fd);
n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
RB_GC_GUARD(str);
if (n < 0) {
- int e = errno;
- if (e == EWOULDBLOCK || e == EAGAIN) {
+ int e = errno;
+ if (io_again_p(e)) {
if (!ex) {
- return sym_wait_writable;
- }
- else {
- rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e, "write would block");
- }
- }
- rb_syserr_fail_path(e, fptr->pathv);
+ return sym_wait_writable;
+ }
+ else {
+ rb_readwrite_syserr_fail(RB_IO_WAIT_WRITABLE, e, "write would block");
+ }
+ }
+ rb_syserr_fail_path(e, fptr->pathv);
}
return LONG2FIX(n);
@@ -3037,69 +3680,73 @@ io_write_nonblock(rb_execution_context_t *ec, VALUE io, VALUE str, VALUE ex)
/*
* call-seq:
- * ios.read([length [, outbuf]]) -> string, outbuf, or nil
+ * read(maxlen = nil, out_string = nil) -> new_string, out_string, or nil
*
- * Reads _length_ bytes from the I/O stream.
+ * Reads bytes from the stream; the stream must be opened for reading
+ * (see {Access Modes}[rdoc-ref:File@Access+Modes]):
*
- * _length_ must be a non-negative integer or +nil+.
+ * - If +maxlen+ is +nil+, reads all bytes using the stream's data mode.
+ * - Otherwise reads up to +maxlen+ bytes in binary mode.
*
- * If _length_ is a positive integer, +read+ tries to read
- * _length_ bytes without any conversion (binary mode).
- * It returns +nil+ if an EOF is encountered before anything can be read.
- * Fewer than _length_ bytes are returned if an EOF is encountered during
- * the read.
- * In the case of an integer _length_, the resulting string is always
- * in ASCII-8BIT encoding.
+ * Returns a string (either a new string or the given +out_string+)
+ * containing the bytes read.
+ * The encoding of the string depends on both +maxLen+ and +out_string+:
*
- * If _length_ is omitted or is +nil+, it reads until EOF
- * and the encoding conversion is applied, if applicable.
- * A string is returned even if EOF is encountered before any data is read.
+ * - +maxlen+ is +nil+: uses internal encoding of +self+
+ * (regardless of whether +out_string+ was given).
+ * - +maxlen+ not +nil+:
*
- * If _length_ is zero, it returns an empty string (<code>""</code>).
+ * - +out_string+ given: encoding of +out_string+ not modified.
+ * - +out_string+ not given: ASCII-8BIT is used.
*
- * If the optional _outbuf_ argument is present,
- * it must reference a String, which will receive the data.
- * The _outbuf_ will contain only the received data after the method call
- * even if it is not empty at the beginning.
+ * <b>Without Argument +out_string+</b>
*
- * When this method is called at end of file, it returns +nil+
- * or <code>""</code>, depending on _length_:
- * +read+, <code>read(nil)</code>, and <code>read(0)</code> return
- * <code>""</code>,
- * <code>read(<i>positive_integer</i>)</code> returns +nil+.
+ * When argument +out_string+ is omitted,
+ * the returned value is a new string:
*
- * f = File.new("testfile")
- * f.read(16) #=> "This is line one"
+ * f = File.new('t.txt')
+ * f.read
+ * # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.rewind
+ * f.read(30) # => "First line\r\nSecond line\r\n\r\nFou"
+ * f.read(30) # => "rth line\r\nFifth line\r\n"
+ * f.read(30) # => nil
+ * f.close
*
- * # read whole file
- * open("file") do |f|
- * data = f.read # This returns a string even if the file is empty.
- * # ...
- * end
+ * If +maxlen+ is zero, returns an empty string.
*
- * # iterate over fixed length records
- * open("fixed-record-file") do |f|
- * while record = f.read(256)
- * # ...
- * end
- * end
+ * <b> With Argument +out_string+</b>
*
- * # iterate over variable length records,
- * # each record is prefixed by its 32-bit length
- * open("variable-record-file") do |f|
- * while len = f.read(4)
- * len = len.unpack("N")[0] # 32-bit length
- * record = f.read(len) # This returns a string even if len is 0.
- * end
- * end
+ * When argument +out_string+ is given,
+ * the returned value is +out_string+, whose content is replaced:
+ *
+ * f = File.new('t.txt')
+ * s = 'foo' # => "foo"
+ * f.read(nil, s) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * s # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.rewind
+ * s = 'bar'
+ * f.read(30, s) # => "First line\r\nSecond line\r\n\r\nFou"
+ * s # => "First line\r\nSecond line\r\n\r\nFou"
+ * s = 'baz'
+ * f.read(30, s) # => "rth line\r\nFifth line\r\n"
+ * s # => "rth line\r\nFifth line\r\n"
+ * s = 'bat'
+ * f.read(30, s) # => nil
+ * s # => ""
+ * f.close
*
* Note that this method behaves like the fread() function in C.
* This means it retries to invoke read(2) system calls to read data
- * with the specified length (or until EOF).
- * This behavior is preserved even if <i>ios</i> is in non-blocking mode.
- * (This method is non-blocking flag insensitive as other methods.)
+ * with the specified maxlen (or until EOF).
+ *
+ * This behavior is preserved even if the stream is in non-blocking mode.
+ * (This method is non-blocking-flag insensitive as other methods.)
+ *
* If you need the behavior like a single read(2) system call,
* consider #readpartial, #read_nonblock, and #sysread.
+ *
+ * Related: IO#write.
*/
static VALUE
@@ -3109,20 +3756,20 @@ io_read(int argc, VALUE *argv, VALUE io)
long n, len;
VALUE length, str;
int shrinkable;
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
int previous_mode;
#endif
rb_scan_args(argc, argv, "02", &length, &str);
if (NIL_P(length)) {
- GetOpenFile(io, fptr);
- rb_io_check_char_readable(fptr);
- return read_all(fptr, remain_size(fptr), str);
+ GetOpenFile(io, fptr);
+ rb_io_check_char_readable(fptr);
+ return read_all(fptr, remain_size(fptr), str);
}
len = NUM2LONG(length);
if (len < 0) {
- rb_raise(rb_eArgError, "negative length %ld given", len);
+ rb_raise(rb_eArgError, "negative length %ld given", len);
}
shrinkable = io_setstrbuf(&str,len);
@@ -3130,19 +3777,19 @@ io_read(int argc, VALUE *argv, VALUE io)
GetOpenFile(io, fptr);
rb_io_check_byte_readable(fptr);
if (len == 0) {
- io_set_read_length(str, 0, shrinkable);
- return str;
+ io_set_read_length(str, 0, shrinkable);
+ return str;
}
READ_CHECK(fptr);
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
previous_mode = set_binary_mode_with_seek_cur(fptr);
#endif
n = io_fread(str, 0, len, fptr);
io_set_read_length(str, n, shrinkable);
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
if (previous_mode == O_TEXT) {
- setmode(fptr->fd, O_TEXT);
+ setmode(fptr->fd, O_TEXT);
}
#endif
if (n == 0) return Qnil;
@@ -3155,17 +3802,42 @@ rscheck(const char *rsptr, long rslen, VALUE rs)
{
if (!rs) return;
if (RSTRING_PTR(rs) != rsptr && RSTRING_LEN(rs) != rslen)
- rb_raise(rb_eRuntimeError, "rs modified");
+ rb_raise(rb_eRuntimeError, "rs modified");
+}
+
+static const char *
+search_delim(const char *p, long len, int delim, rb_encoding *enc)
+{
+ if (rb_enc_mbminlen(enc) == 1) {
+ p = memchr(p, delim, len);
+ if (p) return p + 1;
+ }
+ else {
+ const char *end = p + len;
+ while (p < end) {
+ int r = rb_enc_precise_mbclen(p, end, enc);
+ if (!MBCLEN_CHARFOUND_P(r)) {
+ p += rb_enc_mbminlen(enc);
+ continue;
+ }
+ int n = MBCLEN_CHARFOUND_LEN(r);
+ if (rb_enc_mbc_to_codepoint(p, end, enc) == (unsigned int)delim) {
+ return p + n;
+ }
+ p += n;
+ }
+ }
+ return NULL;
}
static int
-appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
+appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp, rb_encoding *enc)
{
VALUE str = *strp;
long limit = *lp;
if (NEED_READCONV(fptr)) {
- SET_BINARY_MODE(fptr);
+ SET_BINARY_MODE(fptr);
make_readconv(fptr, 0);
do {
const char *p, *e;
@@ -3174,9 +3846,9 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
p = READ_CHAR_PENDING_PTR(fptr);
if (0 < limit && limit < searchlen)
searchlen = (int)limit;
- e = memchr(p, delim, searchlen);
+ e = search_delim(p, searchlen, delim, enc);
if (e) {
- int len = (int)(e-p+1);
+ int len = (int)(e-p);
if (NIL_P(str))
*strp = str = rb_str_new(p, len);
else
@@ -3209,32 +3881,32 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
do {
- long pending = READ_DATA_PENDING_COUNT(fptr);
- if (pending > 0) {
- const char *p = READ_DATA_PENDING_PTR(fptr);
- const char *e;
- long last;
-
- if (limit > 0 && pending > limit) pending = limit;
- e = memchr(p, delim, pending);
- if (e) pending = e - p + 1;
- if (!NIL_P(str)) {
- last = RSTRING_LEN(str);
- rb_str_resize(str, last + pending);
- }
- else {
+ long pending = READ_DATA_PENDING_COUNT(fptr);
+ if (pending > 0) {
+ const char *p = READ_DATA_PENDING_PTR(fptr);
+ const char *e;
+ long last;
+
+ if (limit > 0 && pending > limit) pending = limit;
+ e = search_delim(p, pending, delim, enc);
+ if (e) pending = e - p;
+ if (!NIL_P(str)) {
+ last = RSTRING_LEN(str);
+ rb_str_resize(str, last + pending);
+ }
+ else {
last = 0;
- *strp = str = rb_str_buf_new(pending);
- rb_str_set_len(str, pending);
- }
- read_buffered_data(RSTRING_PTR(str) + last, pending, fptr); /* must not fail */
- limit -= pending;
- *lp = limit;
- if (e) return delim;
- if (limit == 0)
- return (unsigned char)RSTRING_PTR(str)[RSTRING_LEN(str)-1];
- }
- READ_CHECK(fptr);
+ *strp = str = rb_str_buf_new(pending);
+ rb_str_set_len(str, pending);
+ }
+ read_buffered_data(RSTRING_PTR(str) + last, pending, fptr); /* must not fail */
+ limit -= pending;
+ *lp = limit;
+ if (e) return delim;
+ if (limit == 0)
+ return (unsigned char)RSTRING_PTR(str)[RSTRING_LEN(str)-1];
+ }
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) >= 0);
*lp = limit;
return EOF;
@@ -3244,47 +3916,47 @@ static inline int
swallow(rb_io_t *fptr, int term)
{
if (NEED_READCONV(fptr)) {
- rb_encoding *enc = io_read_encoding(fptr);
- int needconv = rb_enc_mbminlen(enc) != 1;
- SET_BINARY_MODE(fptr);
- make_readconv(fptr, 0);
- do {
- size_t cnt;
- while ((cnt = READ_CHAR_PENDING_COUNT(fptr)) > 0) {
- const char *p = READ_CHAR_PENDING_PTR(fptr);
- int i;
- if (!needconv) {
- if (*p != term) return TRUE;
- i = (int)cnt;
- while (--i && *++p == term);
- }
- else {
- const char *e = p + cnt;
- if (rb_enc_ascget(p, e, &i, enc) != term) return TRUE;
- while ((p += i) < e && rb_enc_ascget(p, e, &i, enc) == term);
- i = (int)(e - p);
- }
- io_shift_cbuf(fptr, (int)cnt - i, NULL);
- }
- } while (more_char(fptr) != MORE_CHAR_FINISHED);
- return FALSE;
+ rb_encoding *enc = io_read_encoding(fptr);
+ int needconv = rb_enc_mbminlen(enc) != 1;
+ SET_BINARY_MODE(fptr);
+ make_readconv(fptr, 0);
+ do {
+ size_t cnt;
+ while ((cnt = READ_CHAR_PENDING_COUNT(fptr)) > 0) {
+ const char *p = READ_CHAR_PENDING_PTR(fptr);
+ int i;
+ if (!needconv) {
+ if (*p != term) return TRUE;
+ i = (int)cnt;
+ while (--i && *++p == term);
+ }
+ else {
+ const char *e = p + cnt;
+ if (rb_enc_ascget(p, e, &i, enc) != term) return TRUE;
+ while ((p += i) < e && rb_enc_ascget(p, e, &i, enc) == term);
+ i = (int)(e - p);
+ }
+ io_shift_cbuf(fptr, (int)cnt - i, NULL);
+ }
+ } while (more_char(fptr) != MORE_CHAR_FINISHED);
+ return FALSE;
}
NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
do {
- size_t cnt;
- while ((cnt = READ_DATA_PENDING_COUNT(fptr)) > 0) {
- char buf[1024];
- const char *p = READ_DATA_PENDING_PTR(fptr);
- int i;
- if (cnt > sizeof buf) cnt = sizeof buf;
- if (*p != term) return TRUE;
- i = (int)cnt;
- while (--i && *++p == term);
- if (!read_buffered_data(buf, cnt - i, fptr)) /* must not fail */
- rb_sys_fail_path(fptr->pathv);
- }
- READ_CHECK(fptr);
+ size_t cnt;
+ while ((cnt = READ_DATA_PENDING_COUNT(fptr)) > 0) {
+ char buf[1024];
+ const char *p = READ_DATA_PENDING_PTR(fptr);
+ int i;
+ if (cnt > sizeof buf) cnt = sizeof buf;
+ if (*p != term) return TRUE;
+ i = (int)cnt;
+ while (--i && *++p == term);
+ if (!read_buffered_data(buf, cnt - i, fptr)) /* must not fail */
+ rb_sys_fail_path(fptr->pathv);
+ }
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) == 0);
return FALSE;
}
@@ -3298,43 +3970,43 @@ rb_io_getline_fast(rb_io_t *fptr, rb_encoding *enc, int chomp)
int cr = 0;
do {
- int pending = READ_DATA_PENDING_COUNT(fptr);
+ int pending = READ_DATA_PENDING_COUNT(fptr);
- if (pending > 0) {
- const char *p = READ_DATA_PENDING_PTR(fptr);
- const char *e;
- int chomplen = 0;
+ if (pending > 0) {
+ const char *p = READ_DATA_PENDING_PTR(fptr);
+ const char *e;
+ int chomplen = 0;
- e = memchr(p, '\n', pending);
- if (e) {
+ e = memchr(p, '\n', pending);
+ if (e) {
pending = (int)(e - p + 1);
- if (chomp) {
- chomplen = (pending > 1 && *(e-1) == '\r') + 1;
- }
- }
- if (NIL_P(str)) {
- str = rb_str_new(p, pending - chomplen);
- fptr->rbuf.off += pending;
- fptr->rbuf.len -= pending;
- }
- else {
- rb_str_resize(str, len + pending - chomplen);
- read_buffered_data(RSTRING_PTR(str)+len, pending - chomplen, fptr);
- fptr->rbuf.off += chomplen;
- fptr->rbuf.len -= chomplen;
+ if (chomp) {
+ chomplen = (pending > 1 && *(e-1) == '\r') + 1;
+ }
+ }
+ if (NIL_P(str)) {
+ str = rb_str_new(p, pending - chomplen);
+ fptr->rbuf.off += pending;
+ fptr->rbuf.len -= pending;
+ }
+ else {
+ rb_str_resize(str, len + pending - chomplen);
+ read_buffered_data(RSTRING_PTR(str)+len, pending - chomplen, fptr);
+ fptr->rbuf.off += chomplen;
+ fptr->rbuf.len -= chomplen;
if (pending == 1 && chomplen == 1 && len > 0) {
if (RSTRING_PTR(str)[len-1] == '\r') {
rb_str_resize(str, --len);
break;
}
}
- }
- len += pending - chomplen;
- if (cr != ENC_CODERANGE_BROKEN)
- pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + len, enc, &cr);
- if (e) break;
- }
- READ_CHECK(fptr);
+ }
+ len += pending - chomplen;
+ if (cr != ENC_CODERANGE_BROKEN)
+ pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + len, enc, &cr);
+ if (e) break;
+ }
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) >= 0);
if (NIL_P(str)) return Qnil;
@@ -3357,13 +4029,13 @@ extract_getline_opts(VALUE opts, struct getline_arg *args)
{
int chomp = FALSE;
if (!NIL_P(opts)) {
- static ID kwds[1];
- VALUE vchomp;
- if (!kwds[0]) {
- kwds[0] = rb_intern_const("chomp");
- }
- rb_get_kwargs(opts, kwds, 0, -2, &vchomp);
- chomp = (vchomp != Qundef) && RTEST(vchomp);
+ static ID kwds[1];
+ VALUE vchomp;
+ if (!kwds[0]) {
+ kwds[0] = rb_intern_const("chomp");
+ }
+ rb_get_kwargs(opts, kwds, 0, -2, &vchomp);
+ chomp = (!UNDEF_P(vchomp)) && RTEST(vchomp);
}
args->chomp = chomp;
}
@@ -3384,7 +4056,7 @@ extract_getline_args(int argc, VALUE *argv, struct getline_arg *args)
}
}
else if (2 <= argc) {
- rs = argv[0], lim = argv[1];
+ rs = argv[0], lim = argv[1];
if (!NIL_P(rs))
StringValue(rs);
}
@@ -3399,25 +4071,25 @@ check_getline_args(VALUE *rsp, long *limit, VALUE io)
VALUE rs = *rsp;
if (!NIL_P(rs)) {
- rb_encoding *enc_rs, *enc_io;
-
- GetOpenFile(io, fptr);
- enc_rs = rb_enc_get(rs);
- enc_io = io_read_encoding(fptr);
- if (enc_io != enc_rs &&
- (rb_enc_str_coderange(rs) != ENC_CODERANGE_7BIT ||
- (RSTRING_LEN(rs) > 0 && !rb_enc_asciicompat(enc_io)))) {
+ rb_encoding *enc_rs, *enc_io;
+
+ GetOpenFile(io, fptr);
+ enc_rs = rb_enc_get(rs);
+ enc_io = io_read_encoding(fptr);
+ if (enc_io != enc_rs &&
+ (!is_ascii_string(rs) ||
+ (RSTRING_LEN(rs) > 0 && !rb_enc_asciicompat(enc_io)))) {
if (rs == rb_default_rs) {
rs = rb_enc_str_new(0, 0, enc_io);
rb_str_buf_cat_ascii(rs, "\n");
- *rsp = rs;
+ *rsp = rs;
}
else {
rb_raise(rb_eArgError, "encoding mismatch: %s IO with %s RS",
rb_enc_name(enc_io),
rb_enc_name(enc_rs));
}
- }
+ }
}
}
@@ -3440,77 +4112,86 @@ rb_io_getline_0(VALUE rs, long limit, int chomp, rb_io_t *fptr)
rb_io_check_char_readable(fptr);
if (NIL_P(rs) && limit < 0) {
- str = read_all(fptr, 0, Qnil);
- if (RSTRING_LEN(str) == 0) return Qnil;
- if (chomp) rb_str_chomp_string(str, rb_default_rs);
+ str = read_all(fptr, 0, Qnil);
+ if (RSTRING_LEN(str) == 0) return Qnil;
}
else if (limit == 0) {
- return rb_enc_str_new(0, 0, io_read_encoding(fptr));
+ return rb_enc_str_new(0, 0, io_read_encoding(fptr));
}
else if (rs == rb_default_rs && limit < 0 && !NEED_READCONV(fptr) &&
rb_enc_asciicompat(enc = io_read_encoding(fptr))) {
- NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
- return rb_io_getline_fast(fptr, enc, chomp);
+ NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
+ return rb_io_getline_fast(fptr, enc, chomp);
}
else {
- int c, newline = -1;
- const char *rsptr = 0;
- long rslen = 0;
- int rspara = 0;
+ int c, newline = -1;
+ const char *rsptr = 0;
+ long rslen = 0;
+ int rspara = 0;
int extra_limit = 16;
- int chomp_cr = chomp;
+ int chomp_cr = chomp;
- SET_BINARY_MODE(fptr);
+ SET_BINARY_MODE(fptr);
enc = io_read_encoding(fptr);
- if (!NIL_P(rs)) {
- rslen = RSTRING_LEN(rs);
- if (rslen == 0) {
- rsptr = "\n\n";
- rslen = 2;
- rspara = 1;
- swallow(fptr, '\n');
- rs = 0;
- if (!rb_enc_asciicompat(enc)) {
- rs = rb_usascii_str_new(rsptr, rslen);
- rs = rb_str_encode(rs, rb_enc_from_encoding(enc), 0, Qnil);
- OBJ_FREEZE(rs);
- rsptr = RSTRING_PTR(rs);
- rslen = RSTRING_LEN(rs);
- }
- }
- else {
- rsptr = RSTRING_PTR(rs);
- }
- newline = (unsigned char)rsptr[rslen - 1];
- chomp_cr = chomp && rslen == 1 && newline == '\n';
- }
-
- /* MS - Optimization */
- while ((c = appendline(fptr, newline, &str, &limit)) != EOF) {
+ if (!NIL_P(rs)) {
+ rslen = RSTRING_LEN(rs);
+ if (rslen == 0) {
+ rsptr = "\n\n";
+ rslen = 2;
+ rspara = 1;
+ swallow(fptr, '\n');
+ rs = 0;
+ if (!rb_enc_asciicompat(enc)) {
+ rs = rb_usascii_str_new(rsptr, rslen);
+ rs = rb_str_encode(rs, rb_enc_from_encoding(enc), 0, Qnil);
+ OBJ_FREEZE(rs);
+ rsptr = RSTRING_PTR(rs);
+ rslen = RSTRING_LEN(rs);
+ }
+ newline = '\n';
+ }
+ else if (rb_enc_mbminlen(enc) == 1) {
+ rsptr = RSTRING_PTR(rs);
+ newline = (unsigned char)rsptr[rslen - 1];
+ }
+ else {
+ rs = rb_str_encode(rs, rb_enc_from_encoding(enc), 0, Qnil);
+ rsptr = RSTRING_PTR(rs);
+ const char *e = rsptr + rslen;
+ const char *last = rb_enc_prev_char(rsptr, e, e, enc);
+ int n;
+ newline = rb_enc_codepoint_len(last, e, &n, enc);
+ if (last + n != e) rb_raise(rb_eArgError, "broken separator");
+ }
+ chomp_cr = chomp && newline == '\n' && rslen == rb_enc_mbminlen(enc);
+ }
+
+ /* MS - Optimization */
+ while ((c = appendline(fptr, newline, &str, &limit, enc)) != EOF) {
const char *s, *p, *pp, *e;
- if (c == newline) {
- if (RSTRING_LEN(str) < rslen) continue;
- s = RSTRING_PTR(str);
+ if (c == newline) {
+ if (RSTRING_LEN(str) < rslen) continue;
+ s = RSTRING_PTR(str);
e = RSTRING_END(str);
- p = e - rslen;
- pp = rb_enc_left_char_head(s, p, e, enc);
- if (pp != p) continue;
- if (!rspara) rscheck(rsptr, rslen, rs);
- if (memcmp(p, rsptr, rslen) == 0) {
- if (chomp) {
- if (chomp_cr && p > s && *(p-1) == '\r') --p;
- rb_str_set_len(str, p - s);
- }
- break;
- }
- }
- if (limit == 0) {
- s = RSTRING_PTR(str);
- p = RSTRING_END(str);
- pp = rb_enc_left_char_head(s, p-1, p, enc);
- if (extra_limit &&
+ p = e - rslen;
+ pp = rb_enc_left_char_head(s, p, e, enc);
+ if (pp != p) continue;
+ if (!rspara) rscheck(rsptr, rslen, rs);
+ if (memcmp(p, rsptr, rslen) == 0) {
+ if (chomp) {
+ if (chomp_cr && p > s && *(p-1) == '\r') --p;
+ rb_str_set_len(str, p - s);
+ }
+ break;
+ }
+ }
+ if (limit == 0) {
+ s = RSTRING_PTR(str);
+ p = RSTRING_END(str);
+ pp = rb_enc_prev_char(s, p, p, enc);
+ if (extra_limit && pp &&
MBCLEN_NEEDMORE_P(rb_enc_precise_mbclen(pp, p, enc))) {
/* relax the limit while incomplete character.
* extra_limit limits the relax length */
@@ -3521,17 +4202,17 @@ rb_io_getline_0(VALUE rs, long limit, int chomp, rb_io_t *fptr)
nolimit = 1;
break;
}
- }
- }
+ }
+ }
- if (rspara && c != EOF)
- swallow(fptr, '\n');
- if (!NIL_P(str))
+ if (rspara && c != EOF)
+ swallow(fptr, '\n');
+ if (!NIL_P(str))
str = io_enc_str(str, fptr);
}
if (!NIL_P(str) && !nolimit) {
- fptr->lineno++;
+ fptr->lineno++;
}
return str;
@@ -3548,13 +4229,13 @@ rb_io_getline_1(VALUE rs, long limit, int chomp, VALUE io)
old_lineno = fptr->lineno;
str = rb_io_getline_0(rs, limit, chomp, fptr);
if (!NIL_P(str) && (new_lineno = fptr->lineno) != old_lineno) {
- if (io == ARGF.current_file) {
- ARGF.lineno += new_lineno - old_lineno;
- ARGF.last_lineno = ARGF.lineno;
- }
- else {
- ARGF.last_lineno = new_lineno;
- }
+ if (io == ARGF.current_file) {
+ ARGF.lineno += new_lineno - old_lineno;
+ ARGF.last_lineno = ARGF.lineno;
+ }
+ else {
+ ARGF.last_lineno = new_lineno;
+ }
}
return str;
@@ -3585,35 +4266,77 @@ rb_io_gets_internal(VALUE io)
/*
* call-seq:
- * ios.gets(sep=$/ [, getline_args]) -> string or nil
- * ios.gets(limit [, getline_args]) -> string or nil
- * ios.gets(sep, limit [, getline_args]) -> string or nil
+ * gets(sep = $/, chomp: false) -> string or nil
+ * gets(limit, chomp: false) -> string or nil
+ * gets(sep, limit, chomp: false) -> string or nil
*
- * Reads the next ``line'' from the I/O stream; lines are separated by
- * <i>sep</i>. A separator of +nil+ reads the entire
- * contents, and a zero-length separator reads the input a paragraph at
- * a time (two successive newlines in the input separate paragraphs).
- * The stream must be opened for reading or an IOError will be raised.
- * The line read in will be returned and also assigned to
- * <code>$_</code>. Returns +nil+ if called at end of file. If the
- * first argument is an integer, or optional second argument is given,
- * the returning string would not be longer than the given value in
- * bytes.
+ * Reads and returns a line from the stream;
+ * assigns the return value to <tt>$_</tt>.
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * File.new("testfile").gets #=> "This is line one\n"
- * $_ #=> "This is line one\n"
+ * With no arguments given, returns the next line
+ * as determined by line separator <tt>$/</tt>, or +nil+ if none:
*
- * File.new("testfile").gets(4)#=> "This"
+ * f = File.open('t.txt')
+ * f.gets # => "First line\n"
+ * $_ # => "First line\n"
+ * f.gets # => "\n"
+ * f.gets # => "Fourth line\n"
+ * f.gets # => "Fifth line\n"
+ * f.gets # => nil
+ * f.close
*
- * If IO contains multibyte characters byte then <code>gets(1)</code>
- * returns character entirely:
+ * With only string argument +sep+ given,
+ * returns the next line as determined by line separator +sep+,
+ * or +nil+ if none;
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
+ *
+ * f = File.new('t.txt')
+ * f.gets('l') # => "First l"
+ * f.gets('li') # => "ine\nSecond li"
+ * f.gets('lin') # => "ne\n\nFourth lin"
+ * f.gets # => "e\n"
+ * f.close
+ *
+ * The two special values for +sep+ are honored:
+ *
+ * f = File.new('t.txt')
+ * # Get all.
+ * f.gets(nil) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.rewind
+ * # Get paragraph (up to two line separators).
+ * f.gets('') # => "First line\nSecond line\n\n"
+ * f.close
+ *
+ * With only integer argument +limit+ given,
+ * limits the number of bytes in the line;
+ * see {Line Limit}[rdoc-ref:IO@Line+Limit]:
+ *
+ * # No more than one line.
+ * File.open('t.txt') {|f| f.gets(10) } # => "First line"
+ * File.open('t.txt') {|f| f.gets(11) } # => "First line\n"
+ * File.open('t.txt') {|f| f.gets(12) } # => "First line\n"
+ *
+ * With arguments +sep+ and +limit+ given,
+ * combines the two behaviors:
+ *
+ * - Returns the next line as determined by line separator +sep+,
+ * or +nil+ if none.
+ * - But returns no more bytes than are allowed by the limit.
+ *
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted:
+ *
+ * f = File.open('t.txt')
+ * # Chomp the lines.
+ * f.gets(chomp: true) # => "First line"
+ * f.gets(chomp: true) # => "Second line"
+ * f.gets(chomp: true) # => ""
+ * f.gets(chomp: true) # => "Fourth line"
+ * f.gets(chomp: true) # => "Fifth line"
+ * f.gets(chomp: true) # => nil
+ * f.close
*
- * # Russian characters take 2 bytes
- * File.write("testfile", "\u{442 435 441 442}")
- * File.open("testfile") {|f|f.gets(1)} #=> "\u0442"
- * File.open("testfile") {|f|f.gets(2)} #=> "\u0442"
- * File.open("testfile") {|f|f.gets(3)} #=> "\u0442\u0435"
- * File.open("testfile") {|f|f.gets(4)} #=> "\u0442\u0435"
*/
static VALUE
@@ -3629,24 +4352,11 @@ rb_io_gets_m(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.lineno -> integer
- *
- * Returns the current line number in <em>ios</em>. The stream must be
- * opened for reading. #lineno counts the number of times #gets is called
- * rather than the number of newlines encountered. The two values will
- * differ if #gets is called with a separator other than newline.
+ * lineno -> integer
*
- * Methods that use <code>$/</code> like #each, #lines and #readline will
- * also increment #lineno.
+ * Returns the current line number for the stream;
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
*
- * See also the <code>$.</code> variable.
- *
- * f = File.new("testfile")
- * f.lineno #=> 0
- * f.gets #=> "This is line one\n"
- * f.lineno #=> 1
- * f.gets #=> "This is line two\n"
- * f.lineno #=> 2
*/
static VALUE
@@ -3661,19 +4371,11 @@ rb_io_lineno(VALUE io)
/*
* call-seq:
- * ios.lineno = integer -> integer
+ * lineno = integer -> integer
*
- * Manually sets the current line number to the given value.
- * <code>$.</code> is updated only on the next read.
+ * Sets and returns the line number for the stream;
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
*
- * f = File.new("testfile")
- * f.gets #=> "This is line one\n"
- * $. #=> 1
- * f.lineno = 1000
- * f.lineno #=> 1000
- * $. #=> 1 # lineno of last read
- * f.gets #=> "This is line two\n"
- * $. #=> 1001 # lineno of last read
*/
static VALUE
@@ -3689,11 +4391,14 @@ rb_io_set_lineno(VALUE io, VALUE lineno)
/*
* call-seq:
- * ios.readline(sep=$/ [, getline_args]) -> string
- * ios.readline(limit [, getline_args]) -> string
- * ios.readline(sep, limit [, getline_args]) -> string
+ * readline(sep = $/, chomp: false) -> string
+ * readline(limit, chomp: false) -> string
+ * readline(sep, limit, chomp: false) -> string
+ *
+ * Reads a line as with IO#gets, but raises EOFError if already at end-of-stream.
*
- * Reads a line as with IO#gets, but raises an EOFError on end of file.
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted.
*/
static VALUE
@@ -3702,7 +4407,7 @@ rb_io_readline(int argc, VALUE *argv, VALUE io)
VALUE line = rb_io_gets_m(argc, argv, io);
if (NIL_P(line)) {
- rb_eof_error();
+ rb_eof_error();
}
return line;
}
@@ -3711,26 +4416,68 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io);
/*
* call-seq:
- * ios.readlines(sep=$/ [, getline_args]) -> array
- * ios.readlines(limit [, getline_args]) -> array
- * ios.readlines(sep, limit [, getline_args]) -> array
+ * readlines(sep = $/, chomp: false) -> array
+ * readlines(limit, chomp: false) -> array
+ * readlines(sep, limit, chomp: false) -> array
*
- * Reads all of the lines in <em>ios</em>, and returns them in
- * an array. Lines are separated by the optional <i>sep</i>. If
- * <i>sep</i> is +nil+, the rest of the stream is returned
- * as a single record.
- * If the first argument is an integer, or an
- * optional second argument is given, the returning string would not be
- * longer than the given value in bytes. The stream must be opened for
- * reading or an IOError will be raised.
+ * Reads and returns all remaining line from the stream;
+ * does not modify <tt>$_</tt>.
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * f = File.new("testfile")
- * f.readlines[0] #=> "This is line one\n"
+ * With no arguments given, returns lines
+ * as determined by line separator <tt>$/</tt>, or +nil+ if none:
*
- * f = File.new("testfile", chomp: true)
- * f.readlines[0] #=> "This is line one"
+ * f = File.new('t.txt')
+ * f.readlines
+ * # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ * f.readlines # => []
+ * f.close
+ *
+ * With only string argument +sep+ given,
+ * returns lines as determined by line separator +sep+,
+ * or +nil+ if none;
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
+ *
+ * f = File.new('t.txt')
+ * f.readlines('li')
+ * # => ["First li", "ne\nSecond li", "ne\n\nFourth li", "ne\nFifth li", "ne\n"]
+ * f.close
+ *
+ * The two special values for +sep+ are honored:
+ *
+ * f = File.new('t.txt')
+ * # Get all into one string.
+ * f.readlines(nil)
+ * # => ["First line\nSecond line\n\nFourth line\nFifth line\n"]
+ * # Get paragraphs (up to two line separators).
+ * f.rewind
+ * f.readlines('')
+ * # => ["First line\nSecond line\n\n", "Fourth line\nFifth line\n"]
+ * f.close
+ *
+ * With only integer argument +limit+ given,
+ * limits the number of bytes in each line;
+ * see {Line Limit}[rdoc-ref:IO@Line+Limit]:
+ *
+ * f = File.new('t.txt')
+ * f.readlines(8)
+ * # => ["First li", "ne\n", "Second l", "ine\n", "\n", "Fourth l", "ine\n", "Fifth li", "ne\n"]
+ * f.close
+ *
+ * With arguments +sep+ and +limit+ given,
+ * combines the two behaviors:
+ *
+ * - Returns lines as determined by line separator +sep+.
+ * - But returns no more bytes in a line than are allowed by the limit.
+ *
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted:
+ *
+ * f = File.new('t.txt')
+ * f.readlines(chomp: true)
+ * # => ["First line", "Second line", "", "Fourth line", "Fifth line"]
+ * f.close
*
- * See IO.readlines for details about getline_args.
*/
static VALUE
@@ -3748,43 +4495,123 @@ io_readlines(const struct getline_arg *arg, VALUE io)
VALUE line, ary;
if (arg->limit == 0)
- rb_raise(rb_eArgError, "invalid limit: 0 for readlines");
+ rb_raise(rb_eArgError, "invalid limit: 0 for readlines");
ary = rb_ary_new();
while (!NIL_P(line = rb_io_getline_1(arg->rs, arg->limit, arg->chomp, io))) {
- rb_ary_push(ary, line);
+ rb_ary_push(ary, line);
}
return ary;
}
/*
* call-seq:
- * ios.each(sep=$/ [, getline_args]) {|line| block } -> ios
- * ios.each(limit [, getline_args]) {|line| block } -> ios
- * ios.each(sep, limit [, getline_args]) {|line| block } -> ios
- * ios.each(...) -> an_enumerator
+ * each_line(sep = $/, chomp: false) {|line| ... } -> self
+ * each_line(limit, chomp: false) {|line| ... } -> self
+ * each_line(sep, limit, chomp: false) {|line| ... } -> self
+ * each_line -> enumerator
*
- * ios.each_line(sep=$/ [, getline_args]) {|line| block } -> ios
- * ios.each_line(limit [, getline_args]) {|line| block } -> ios
- * ios.each_line(sep, limit [, getline_args]) {|line| block } -> ios
- * ios.each_line(...) -> an_enumerator
+ * Calls the block with each remaining line read from the stream;
+ * returns +self+.
+ * Does nothing if already at end-of-stream;
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * Executes the block for every line in <em>ios</em>, where lines are
- * separated by <i>sep</i>. <em>ios</em> must be opened for
- * reading or an IOError will be raised.
+ * With no arguments given, reads lines
+ * as determined by line separator <tt>$/</tt>:
*
- * If no block is given, an enumerator is returned instead.
+ * f = File.new('t.txt')
+ * f.each_line {|line| p line }
+ * f.each_line {|line| fail 'Cannot happen' }
+ * f.close
*
- * f = File.new("testfile")
- * f.each {|line| puts "#{f.lineno}: #{line}" }
+ * Output:
*
- * <em>produces:</em>
+ * "First line\n"
+ * "Second line\n"
+ * "\n"
+ * "Fourth line\n"
+ * "Fifth line\n"
*
- * 1: This is line one
- * 2: This is line two
- * 3: This is line three
- * 4: And so on...
+ * With only string argument +sep+ given,
+ * reads lines as determined by line separator +sep+;
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
+ *
+ * f = File.new('t.txt')
+ * f.each_line('li') {|line| p line }
+ * f.close
+ *
+ * Output:
+ *
+ * "First li"
+ * "ne\nSecond li"
+ * "ne\n\nFourth li"
+ * "ne\nFifth li"
+ * "ne\n"
+ *
+ * The two special values for +sep+ are honored:
+ *
+ * f = File.new('t.txt')
+ * # Get all into one string.
+ * f.each_line(nil) {|line| p line }
+ * f.close
+ *
+ * Output:
+ *
+ * "First line\nSecond line\n\nFourth line\nFifth line\n"
+ *
+ * f.rewind
+ * # Get paragraphs (up to two line separators).
+ * f.each_line('') {|line| p line }
+ *
+ * Output:
+ *
+ * "First line\nSecond line\n\n"
+ * "Fourth line\nFifth line\n"
+ *
+ * With only integer argument +limit+ given,
+ * limits the number of bytes in each line;
+ * see {Line Limit}[rdoc-ref:IO@Line+Limit]:
+ *
+ * f = File.new('t.txt')
+ * f.each_line(8) {|line| p line }
+ * f.close
+ *
+ * Output:
+ *
+ * "First li"
+ * "ne\n"
+ * "Second l"
+ * "ine\n"
+ * "\n"
+ * "Fourth l"
+ * "ine\n"
+ * "Fifth li"
+ * "ne\n"
+ *
+ * With arguments +sep+ and +limit+ given,
+ * combines the two behaviors:
+ *
+ * - Calls with the next line as determined by line separator +sep+.
+ * - But returns no more bytes than are allowed by the limit.
+ *
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted:
+ *
+ * f = File.new('t.txt')
+ * f.each_line(chomp: true) {|line| p line }
+ * f.close
+ *
+ * Output:
+ *
+ * "First line"
+ * "Second line"
+ * ""
+ * "Fourth line"
+ * "Fifth line"
+ *
+ * Returns an Enumerator if no block is given.
+ *
+ * IO#each is an alias for IO#each_line.
*
- * See IO.readlines for details about getline_args.
*/
static VALUE
@@ -3796,41 +4623,31 @@ rb_io_each_line(int argc, VALUE *argv, VALUE io)
RETURN_ENUMERATOR(io, argc, argv);
prepare_getline_args(argc, argv, &args, io);
if (args.limit == 0)
- rb_raise(rb_eArgError, "invalid limit: 0 for each_line");
+ rb_raise(rb_eArgError, "invalid limit: 0 for each_line");
while (!NIL_P(str = rb_io_getline_1(args.rs, args.limit, args.chomp, io))) {
- rb_yield(str);
+ rb_yield(str);
}
return io;
}
/*
- * This is a deprecated alias for #each_line.
- */
-
-static VALUE
-rb_io_lines(int argc, VALUE *argv, VALUE io)
-{
- rb_warn_deprecated("IO#lines", "#each_line");
- if (!rb_block_given_p())
- return rb_enumeratorize(io, ID2SYM(rb_intern("each_line")), argc, argv);
- return rb_io_each_line(argc, argv, io);
-}
-
-/*
* call-seq:
- * ios.each_byte {|byte| block } -> ios
- * ios.each_byte -> an_enumerator
+ * each_byte {|byte| ... } -> self
+ * each_byte -> enumerator
*
- * Calls the given block once for each byte (0..255) in <em>ios</em>,
- * passing the byte as an argument. The stream must be opened for
- * reading or an IOError will be raised.
+ * Calls the given block with each byte (0..255) in the stream; returns +self+.
+ * See {Byte IO}[rdoc-ref:IO@Byte+IO].
*
- * If no block is given, an enumerator is returned instead.
+ * f = File.new('t.rus')
+ * a = []
+ * f.each_byte {|b| a << b }
+ * a # => [209, 130, 208, 181, 209, 129, 209, 130]
+ * f.close
+ *
+ * Returns an Enumerator if no block is given.
+ *
+ * Related: IO#each_char, IO#each_codepoint.
*
- * f = File.new("testfile")
- * checksum = 0
- * f.each_byte {|x| checksum ^= x } #=> #<File:testfile>
- * checksum #=> 12
*/
static VALUE
@@ -3842,31 +4659,18 @@ rb_io_each_byte(VALUE io)
GetOpenFile(io, fptr);
do {
- while (fptr->rbuf.len > 0) {
- char *p = fptr->rbuf.ptr + fptr->rbuf.off++;
- fptr->rbuf.len--;
- rb_yield(INT2FIX(*p & 0xff));
- errno = 0;
- }
- rb_io_check_byte_readable(fptr);
- READ_CHECK(fptr);
+ while (fptr->rbuf.len > 0) {
+ char *p = fptr->rbuf.ptr + fptr->rbuf.off++;
+ fptr->rbuf.len--;
+ rb_yield(INT2FIX(*p & 0xff));
+ rb_io_check_byte_readable(fptr);
+ errno = 0;
+ }
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) >= 0);
return io;
}
-/*
- * This is a deprecated alias for #each_byte.
- */
-
-static VALUE
-rb_io_bytes(VALUE io)
-{
- rb_warn_deprecated("IO#bytes", "#each_byte");
- if (!rb_block_given_p())
- return rb_enumeratorize(io, ID2SYM(rb_intern("each_byte")), 0, 0);
- return rb_io_each_byte(io);
-}
-
static VALUE
io_getc(rb_io_t *fptr, rb_encoding *enc)
{
@@ -3874,17 +4678,17 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
VALUE str;
if (NEED_READCONV(fptr)) {
- rb_encoding *read_enc = io_read_encoding(fptr);
+ rb_encoding *read_enc = io_read_encoding(fptr);
- str = Qnil;
- SET_BINARY_MODE(fptr);
+ str = Qnil;
+ SET_BINARY_MODE(fptr);
make_readconv(fptr, 0);
while (1) {
if (fptr->cbuf.len) {
- r = rb_enc_precise_mbclen(fptr->cbuf.ptr+fptr->cbuf.off,
- fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
- read_enc);
+ r = rb_enc_precise_mbclen(fptr->cbuf.ptr+fptr->cbuf.off,
+ fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
+ read_enc);
if (!MBCLEN_NEEDMORE_P(r))
break;
if (fptr->cbuf.len == fptr->cbuf.capa) {
@@ -3894,16 +4698,16 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
if (more_char(fptr) == MORE_CHAR_FINISHED) {
if (fptr->cbuf.len == 0) {
- clear_readconv(fptr);
- return Qnil;
- }
+ clear_readconv(fptr);
+ return Qnil;
+ }
/* return an unit of an incomplete character just before EOF */
- str = rb_enc_str_new(fptr->cbuf.ptr+fptr->cbuf.off, 1, read_enc);
- fptr->cbuf.off += 1;
- fptr->cbuf.len -= 1;
+ str = rb_enc_str_new(fptr->cbuf.ptr+fptr->cbuf.off, 1, read_enc);
+ fptr->cbuf.off += 1;
+ fptr->cbuf.len -= 1;
if (fptr->cbuf.len == 0) clear_readconv(fptr);
- ENC_CODERANGE_SET(str, ENC_CODERANGE_BROKEN);
- return str;
+ ENC_CODERANGE_SET(str, ENC_CODERANGE_BROKEN);
+ return str;
}
}
if (MBCLEN_INVALID_P(r)) {
@@ -3911,62 +4715,62 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
read_enc);
io_shift_cbuf(fptr, r, &str);
- cr = ENC_CODERANGE_BROKEN;
- }
- else {
- io_shift_cbuf(fptr, MBCLEN_CHARFOUND_LEN(r), &str);
- cr = ENC_CODERANGE_VALID;
- if (MBCLEN_CHARFOUND_LEN(r) == 1 && rb_enc_asciicompat(read_enc) &&
- ISASCII(RSTRING_PTR(str)[0])) {
- cr = ENC_CODERANGE_7BIT;
- }
- }
- str = io_enc_str(str, fptr);
- ENC_CODERANGE_SET(str, cr);
- return str;
+ cr = ENC_CODERANGE_BROKEN;
+ }
+ else {
+ io_shift_cbuf(fptr, MBCLEN_CHARFOUND_LEN(r), &str);
+ cr = ENC_CODERANGE_VALID;
+ if (MBCLEN_CHARFOUND_LEN(r) == 1 && rb_enc_asciicompat(read_enc) &&
+ ISASCII(RSTRING_PTR(str)[0])) {
+ cr = ENC_CODERANGE_7BIT;
+ }
+ }
+ str = io_enc_str(str, fptr);
+ ENC_CODERANGE_SET(str, cr);
+ return str;
}
NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
if (io_fillbuf(fptr) < 0) {
- return Qnil;
+ return Qnil;
}
if (rb_enc_asciicompat(enc) && ISASCII(fptr->rbuf.ptr[fptr->rbuf.off])) {
- str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, 1);
- fptr->rbuf.off += 1;
- fptr->rbuf.len -= 1;
- cr = ENC_CODERANGE_7BIT;
+ str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, 1);
+ fptr->rbuf.off += 1;
+ fptr->rbuf.len -= 1;
+ cr = ENC_CODERANGE_7BIT;
}
else {
- r = rb_enc_precise_mbclen(fptr->rbuf.ptr+fptr->rbuf.off, fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
- if (MBCLEN_CHARFOUND_P(r) &&
- (n = MBCLEN_CHARFOUND_LEN(r)) <= fptr->rbuf.len) {
- str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, n);
- fptr->rbuf.off += n;
- fptr->rbuf.len -= n;
- cr = ENC_CODERANGE_VALID;
- }
- else if (MBCLEN_NEEDMORE_P(r)) {
- str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, fptr->rbuf.len);
- fptr->rbuf.len = 0;
- getc_needmore:
- if (io_fillbuf(fptr) != -1) {
- rb_str_cat(str, fptr->rbuf.ptr+fptr->rbuf.off, 1);
- fptr->rbuf.off++;
- fptr->rbuf.len--;
- r = rb_enc_precise_mbclen(RSTRING_PTR(str), RSTRING_PTR(str)+RSTRING_LEN(str), enc);
- if (MBCLEN_NEEDMORE_P(r)) {
- goto getc_needmore;
- }
- else if (MBCLEN_CHARFOUND_P(r)) {
- cr = ENC_CODERANGE_VALID;
- }
- }
- }
- else {
- str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, 1);
- fptr->rbuf.off++;
- fptr->rbuf.len--;
- }
+ r = rb_enc_precise_mbclen(fptr->rbuf.ptr+fptr->rbuf.off, fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
+ if (MBCLEN_CHARFOUND_P(r) &&
+ (n = MBCLEN_CHARFOUND_LEN(r)) <= fptr->rbuf.len) {
+ str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, n);
+ fptr->rbuf.off += n;
+ fptr->rbuf.len -= n;
+ cr = ENC_CODERANGE_VALID;
+ }
+ else if (MBCLEN_NEEDMORE_P(r)) {
+ str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, fptr->rbuf.len);
+ fptr->rbuf.len = 0;
+ getc_needmore:
+ if (io_fillbuf(fptr) != -1) {
+ rb_str_cat(str, fptr->rbuf.ptr+fptr->rbuf.off, 1);
+ fptr->rbuf.off++;
+ fptr->rbuf.len--;
+ r = rb_enc_precise_mbclen(RSTRING_PTR(str), RSTRING_PTR(str)+RSTRING_LEN(str), enc);
+ if (MBCLEN_NEEDMORE_P(r)) {
+ goto getc_needmore;
+ }
+ else if (MBCLEN_CHARFOUND_P(r)) {
+ cr = ENC_CODERANGE_VALID;
+ }
+ }
+ }
+ else {
+ str = rb_str_new(fptr->rbuf.ptr+fptr->rbuf.off, 1);
+ fptr->rbuf.off++;
+ fptr->rbuf.len--;
+ }
}
if (!cr) cr = ENC_CODERANGE_BROKEN;
str = io_enc_str(str, fptr);
@@ -3976,17 +4780,22 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
/*
* call-seq:
- * ios.each_char {|c| block } -> ios
- * ios.each_char -> an_enumerator
+ * each_char {|c| ... } -> self
+ * each_char -> enumerator
*
- * Calls the given block once for each character in <em>ios</em>,
- * passing the character as an argument. The stream must be opened for
- * reading or an IOError will be raised.
+ * Calls the given block with each character in the stream; returns +self+.
+ * See {Character IO}[rdoc-ref:IO@Character+IO].
*
- * If no block is given, an enumerator is returned instead.
+ * f = File.new('t.rus')
+ * a = []
+ * f.each_char {|c| a << c.ord }
+ * a # => [1090, 1077, 1089, 1090]
+ * f.close
+ *
+ * Returns an Enumerator if no block is given.
+ *
+ * Related: IO#each_byte, IO#each_codepoint.
*
- * f = File.new("testfile")
- * f.each_char {|c| print c, ' ' } #=> #<File:testfile>
*/
static VALUE
@@ -4009,31 +4818,21 @@ rb_io_each_char(VALUE io)
}
/*
- * This is a deprecated alias for #each_char.
- */
-
-static VALUE
-rb_io_chars(VALUE io)
-{
- rb_warn_deprecated("IO#chars", "#each_char");
- if (!rb_block_given_p())
- return rb_enumeratorize(io, ID2SYM(rb_intern("each_char")), 0, 0);
- return rb_io_each_char(io);
-}
-
-
-/*
* call-seq:
- * ios.each_codepoint {|c| block } -> ios
- * ios.codepoints {|c| block } -> ios
- * ios.each_codepoint -> an_enumerator
- * ios.codepoints -> an_enumerator
+ * each_codepoint {|c| ... } -> self
+ * each_codepoint -> enumerator
*
- * Passes the Integer ordinal of each character in <i>ios</i>,
- * passing the codepoint as an argument. The stream must be opened for
- * reading or an IOError will be raised.
+ * Calls the given block with each codepoint in the stream; returns +self+:
*
- * If no block is given, an enumerator is returned instead.
+ * f = File.new('t.rus')
+ * a = []
+ * f.each_codepoint {|c| a << c }
+ * a # => [1090, 1077, 1089, 1090]
+ * f.close
+ *
+ * Returns an Enumerator if no block is given.
+ *
+ * Related: IO#each_byte, IO#each_char.
*
*/
@@ -4051,115 +4850,113 @@ rb_io_each_codepoint(VALUE io)
READ_CHECK(fptr);
if (NEED_READCONV(fptr)) {
- SET_BINARY_MODE(fptr);
- r = 1; /* no invalid char yet */
- for (;;) {
- make_readconv(fptr, 0);
- for (;;) {
- if (fptr->cbuf.len) {
- if (fptr->encs.enc)
- r = rb_enc_precise_mbclen(fptr->cbuf.ptr+fptr->cbuf.off,
- fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
- fptr->encs.enc);
- else
- r = ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
- if (!MBCLEN_NEEDMORE_P(r))
- break;
- if (fptr->cbuf.len == fptr->cbuf.capa) {
- rb_raise(rb_eIOError, "too long character");
- }
- }
- if (more_char(fptr) == MORE_CHAR_FINISHED) {
+ SET_BINARY_MODE(fptr);
+ r = 1; /* no invalid char yet */
+ for (;;) {
+ make_readconv(fptr, 0);
+ for (;;) {
+ if (fptr->cbuf.len) {
+ if (fptr->encs.enc)
+ r = rb_enc_precise_mbclen(fptr->cbuf.ptr+fptr->cbuf.off,
+ fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
+ fptr->encs.enc);
+ else
+ r = ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
+ if (!MBCLEN_NEEDMORE_P(r))
+ break;
+ if (fptr->cbuf.len == fptr->cbuf.capa) {
+ rb_raise(rb_eIOError, "too long character");
+ }
+ }
+ if (more_char(fptr) == MORE_CHAR_FINISHED) {
clear_readconv(fptr);
- if (!MBCLEN_CHARFOUND_P(r)) {
- enc = fptr->encs.enc;
- goto invalid;
- }
- return io;
- }
- }
- if (MBCLEN_INVALID_P(r)) {
- enc = fptr->encs.enc;
- goto invalid;
- }
- n = MBCLEN_CHARFOUND_LEN(r);
- if (fptr->encs.enc) {
- c = rb_enc_codepoint(fptr->cbuf.ptr+fptr->cbuf.off,
- fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
- fptr->encs.enc);
- }
- else {
- c = (unsigned char)fptr->cbuf.ptr[fptr->cbuf.off];
- }
- fptr->cbuf.off += n;
- fptr->cbuf.len -= n;
- rb_yield(UINT2NUM(c));
- }
+ if (!MBCLEN_CHARFOUND_P(r)) {
+ enc = fptr->encs.enc;
+ goto invalid;
+ }
+ return io;
+ }
+ }
+ if (MBCLEN_INVALID_P(r)) {
+ enc = fptr->encs.enc;
+ goto invalid;
+ }
+ n = MBCLEN_CHARFOUND_LEN(r);
+ if (fptr->encs.enc) {
+ c = rb_enc_codepoint(fptr->cbuf.ptr+fptr->cbuf.off,
+ fptr->cbuf.ptr+fptr->cbuf.off+fptr->cbuf.len,
+ fptr->encs.enc);
+ }
+ else {
+ c = (unsigned char)fptr->cbuf.ptr[fptr->cbuf.off];
+ }
+ fptr->cbuf.off += n;
+ fptr->cbuf.len -= n;
+ rb_yield(UINT2NUM(c));
+ rb_io_check_byte_readable(fptr);
+ }
}
NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
enc = io_input_encoding(fptr);
while (io_fillbuf(fptr) >= 0) {
- r = rb_enc_precise_mbclen(fptr->rbuf.ptr+fptr->rbuf.off,
- fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
- if (MBCLEN_CHARFOUND_P(r) &&
- (n = MBCLEN_CHARFOUND_LEN(r)) <= fptr->rbuf.len) {
- c = rb_enc_codepoint(fptr->rbuf.ptr+fptr->rbuf.off,
- fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
- fptr->rbuf.off += n;
- fptr->rbuf.len -= n;
- rb_yield(UINT2NUM(c));
- }
- else if (MBCLEN_INVALID_P(r)) {
- invalid:
- rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
- }
- else if (MBCLEN_NEEDMORE_P(r)) {
- char cbuf[8], *p = cbuf;
- int more = MBCLEN_NEEDMORE_LEN(r);
- if (more > numberof(cbuf)) goto invalid;
- more += n = fptr->rbuf.len;
- if (more > numberof(cbuf)) goto invalid;
- while ((n = (int)read_buffered_data(p, more, fptr)) > 0 &&
- (p += n, (more -= n) > 0)) {
- if (io_fillbuf(fptr) < 0) goto invalid;
- if ((n = fptr->rbuf.len) > more) n = more;
- }
- r = rb_enc_precise_mbclen(cbuf, p, enc);
- if (!MBCLEN_CHARFOUND_P(r)) goto invalid;
- c = rb_enc_codepoint(cbuf, p, enc);
- rb_yield(UINT2NUM(c));
- }
- else {
- continue;
- }
+ r = rb_enc_precise_mbclen(fptr->rbuf.ptr+fptr->rbuf.off,
+ fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
+ if (MBCLEN_CHARFOUND_P(r) &&
+ (n = MBCLEN_CHARFOUND_LEN(r)) <= fptr->rbuf.len) {
+ c = rb_enc_codepoint(fptr->rbuf.ptr+fptr->rbuf.off,
+ fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
+ fptr->rbuf.off += n;
+ fptr->rbuf.len -= n;
+ rb_yield(UINT2NUM(c));
+ }
+ else if (MBCLEN_INVALID_P(r)) {
+ goto invalid;
+ }
+ else if (MBCLEN_NEEDMORE_P(r)) {
+ char cbuf[8], *p = cbuf;
+ int more = MBCLEN_NEEDMORE_LEN(r);
+ if (more > numberof(cbuf)) goto invalid;
+ more += n = fptr->rbuf.len;
+ if (more > numberof(cbuf)) goto invalid;
+ while ((n = (int)read_buffered_data(p, more, fptr)) > 0 &&
+ (p += n, (more -= n) > 0)) {
+ if (io_fillbuf(fptr) < 0) goto invalid;
+ if ((n = fptr->rbuf.len) > more) n = more;
+ }
+ r = rb_enc_precise_mbclen(cbuf, p, enc);
+ if (!MBCLEN_CHARFOUND_P(r)) goto invalid;
+ c = rb_enc_codepoint(cbuf, p, enc);
+ rb_yield(UINT2NUM(c));
+ }
+ else {
+ continue;
+ }
+ rb_io_check_byte_readable(fptr);
}
return io;
-}
-
-/*
- * This is a deprecated alias for #each_codepoint.
- */
-static VALUE
-rb_io_codepoints(VALUE io)
-{
- rb_warn_deprecated("IO#codepoints", "#each_codepoint");
- if (!rb_block_given_p())
- return rb_enumeratorize(io, ID2SYM(rb_intern("each_codepoint")), 0, 0);
- return rb_io_each_codepoint(io);
+ invalid:
+ rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
+ UNREACHABLE_RETURN(Qundef);
}
-
/*
* call-seq:
- * ios.getc -> string or nil
+ * getc -> character or nil
*
- * Reads a one-character string from <em>ios</em>. Returns
- * +nil+ if called at end of file.
+ * Reads and returns the next 1-character string from the stream;
+ * returns +nil+ if already at end-of-stream.
+ * See {Character IO}[rdoc-ref:IO@Character+IO].
+ *
+ * f = File.open('t.txt')
+ * f.getc # => "F"
+ * f.close
+ * f = File.open('t.rus')
+ * f.getc.ord # => 1090
+ * f.close
+ *
+ * Related: IO#readchar (may raise EOFError).
*
- * f = File.new("testfile")
- * f.getc #=> "h"
- * f.getc #=> "e"
*/
static VALUE
@@ -4178,14 +4975,21 @@ rb_io_getc(VALUE io)
/*
* call-seq:
- * ios.readchar -> string
+ * readchar -> string
+ *
+ * Reads and returns the next 1-character string from the stream;
+ * raises EOFError if already at end-of-stream.
+ * See {Character IO}[rdoc-ref:IO@Character+IO].
+ *
+ * f = File.open('t.txt')
+ * f.readchar # => "F"
+ * f.close
+ * f = File.open('t.rus')
+ * f.readchar.ord # => 1090
+ * f.close
*
- * Reads a one-character string from <em>ios</em>. Raises an
- * EOFError on end of file.
+ * Related: IO#getc (will not raise EOFError).
*
- * f = File.new("testfile")
- * f.readchar #=> "h"
- * f.readchar #=> "e"
*/
static VALUE
@@ -4194,21 +4998,27 @@ rb_io_readchar(VALUE io)
VALUE c = rb_io_getc(io);
if (NIL_P(c)) {
- rb_eof_error();
+ rb_eof_error();
}
return c;
}
/*
* call-seq:
- * ios.getbyte -> integer or nil
+ * getbyte -> integer or nil
+ *
+ * Reads and returns the next byte (in range 0..255) from the stream;
+ * returns +nil+ if already at end-of-stream.
+ * See {Byte IO}[rdoc-ref:IO@Byte+IO].
*
- * Gets the next 8-bit byte (0..255) from <em>ios</em>. Returns
- * +nil+ if called at end of file.
+ * f = File.open('t.txt')
+ * f.getbyte # => 70
+ * f.close
+ * f = File.open('t.rus')
+ * f.getbyte # => 209
+ * f.close
*
- * f = File.new("testfile")
- * f.getbyte #=> 84
- * f.getbyte #=> 104
+ * Related: IO#readbyte (may raise EOFError).
*/
VALUE
@@ -4220,15 +5030,16 @@ rb_io_getbyte(VALUE io)
GetOpenFile(io, fptr);
rb_io_check_byte_readable(fptr);
READ_CHECK(fptr);
- if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && RB_TYPE_P(rb_stdout, T_FILE)) {
+ VALUE r_stdout = rb_ractor_stdout();
+ if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && RB_TYPE_P(r_stdout, T_FILE)) {
rb_io_t *ofp;
- GetOpenFile(rb_stdout, ofp);
+ GetOpenFile(r_stdout, ofp);
if (ofp->mode & FMODE_TTY) {
- rb_io_flush(rb_stdout);
+ rb_io_flush(r_stdout);
}
}
if (io_fillbuf(fptr) < 0) {
- return Qnil;
+ return Qnil;
}
fptr->rbuf.off++;
fptr->rbuf.len--;
@@ -4238,10 +5049,21 @@ rb_io_getbyte(VALUE io)
/*
* call-seq:
- * ios.readbyte -> integer
+ * readbyte -> integer
+ *
+ * Reads and returns the next byte (in range 0..255) from the stream;
+ * raises EOFError if already at end-of-stream.
+ * See {Byte IO}[rdoc-ref:IO@Byte+IO].
+ *
+ * f = File.open('t.txt')
+ * f.readbyte # => 70
+ * f.close
+ * f = File.open('t.rus')
+ * f.readbyte # => 209
+ * f.close
+ *
+ * Related: IO#getbyte (will not raise EOFError).
*
- * Reads a byte as with IO#getbyte, but raises an EOFError on end of
- * file.
*/
static VALUE
@@ -4250,26 +5072,47 @@ rb_io_readbyte(VALUE io)
VALUE c = rb_io_getbyte(io);
if (NIL_P(c)) {
- rb_eof_error();
+ rb_eof_error();
}
return c;
}
/*
* call-seq:
- * ios.ungetbyte(string) -> nil
- * ios.ungetbyte(integer) -> nil
+ * ungetbyte(integer) -> nil
+ * ungetbyte(string) -> nil
+ *
+ * Pushes back ("unshifts") the given data onto the stream's buffer,
+ * placing the data so that it is next to be read; returns +nil+.
+ * See {Byte IO}[rdoc-ref:IO@Byte+IO].
+ *
+ * Note that:
+ *
+ * - Calling the method has no effect with unbuffered reads (such as IO#sysread).
+ * - Calling #rewind on the stream discards the pushed-back data.
+ *
+ * When argument +integer+ is given, uses only its low-order byte:
+ *
+ * File.write('t.tmp', '012')
+ * f = File.open('t.tmp')
+ * f.ungetbyte(0x41) # => nil
+ * f.read # => "A012"
+ * f.rewind
+ * f.ungetbyte(0x4243) # => nil
+ * f.read # => "C012"
+ * f.close
*
- * Pushes back bytes (passed as a parameter) onto <em>ios</em>,
- * such that a subsequent buffered read will return it. Only one byte
- * may be pushed back before a subsequent read operation (that is,
- * you will be able to read only the last of several bytes that have been pushed
- * back). Has no effect with unbuffered reads (such as IO#sysread).
+ * When argument +string+ is given, uses all bytes:
+ *
+ * File.write('t.tmp', '012')
+ * f = File.open('t.tmp')
+ * f.ungetbyte('A') # => nil
+ * f.read # => "A012"
+ * f.rewind
+ * f.ungetbyte('BCDE') # => nil
+ * f.read # => "BCDE012"
+ * f.close
*
- * f = File.new("testfile") #=> #<File:testfile>
- * b = f.getbyte #=> 0x38
- * f.ungetbyte(b) #=> nil
- * f.getbyte #=> 0x38
*/
VALUE
@@ -4297,18 +5140,43 @@ rb_io_ungetbyte(VALUE io, VALUE b)
/*
* call-seq:
- * ios.ungetc(string) -> nil
+ * ungetc(integer) -> nil
+ * ungetc(string) -> nil
+ *
+ * Pushes back ("unshifts") the given data onto the stream's buffer,
+ * placing the data so that it is next to be read; returns +nil+.
+ * See {Character IO}[rdoc-ref:IO@Character+IO].
+ *
+ * Note that:
+ *
+ * - Calling the method has no effect with unbuffered reads (such as IO#sysread).
+ * - Calling #rewind on the stream discards the pushed-back data.
*
- * Pushes back one character (passed as a parameter) onto <em>ios</em>,
- * such that a subsequent buffered character read will return it. Only one character
- * may be pushed back before a subsequent read operation (that is,
- * you will be able to read only the last of several characters that have been pushed
- * back). Has no effect with unbuffered reads (such as IO#sysread).
+ * When argument +integer+ is given, interprets the integer as a character:
+ *
+ * File.write('t.tmp', '012')
+ * f = File.open('t.tmp')
+ * f.ungetc(0x41) # => nil
+ * f.read # => "A012"
+ * f.rewind
+ * f.ungetc(0x0442) # => nil
+ * f.getc.ord # => 1090
+ * f.close
+ *
+ * When argument +string+ is given, uses all characters:
+ *
+ * File.write('t.tmp', '012')
+ * f = File.open('t.tmp')
+ * f.ungetc('A') # => nil
+ * f.read # => "A012"
+ * f.rewind
+ * f.ungetc("\u0442\u0435\u0441\u0442") # => nil
+ * f.getc.ord # => 1090
+ * f.getc.ord # => 1077
+ * f.getc.ord # => 1089
+ * f.getc.ord # => 1090
+ * f.close
*
- * f = File.new("testfile") #=> #<File:testfile>
- * c = f.getc #=> "8"
- * f.ungetc(c) #=> nil
- * f.getc #=> "8"
*/
VALUE
@@ -4319,22 +5187,21 @@ rb_io_ungetc(VALUE io, VALUE c)
GetOpenFile(io, fptr);
rb_io_check_char_readable(fptr);
- if (NIL_P(c)) return Qnil;
if (FIXNUM_P(c)) {
- c = rb_enc_uint_chr(FIX2UINT(c), io_read_encoding(fptr));
+ c = rb_enc_uint_chr(FIX2UINT(c), io_read_encoding(fptr));
}
- else if (RB_TYPE_P(c, T_BIGNUM)) {
- c = rb_enc_uint_chr(NUM2UINT(c), io_read_encoding(fptr));
+ else if (RB_BIGNUM_TYPE_P(c)) {
+ c = rb_enc_uint_chr(NUM2UINT(c), io_read_encoding(fptr));
}
else {
- SafeStringValue(c);
+ SafeStringValue(c);
}
if (NEED_READCONV(fptr)) {
- SET_BINARY_MODE(fptr);
+ SET_BINARY_MODE(fptr);
len = RSTRING_LEN(c);
#if SIZEOF_LONG > SIZEOF_INT
- if (len > INT_MAX)
- rb_raise(rb_eIOError, "ungetc failed");
+ if (len > INT_MAX)
+ rb_raise(rb_eIOError, "ungetc failed");
#endif
make_readconv(fptr, (int)len);
if (fptr->cbuf.capa - fptr->cbuf.len < len)
@@ -4350,7 +5217,7 @@ rb_io_ungetc(VALUE io, VALUE c)
MEMMOVE(fptr->cbuf.ptr+fptr->cbuf.off, RSTRING_PTR(c), char, len);
}
else {
- NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
+ NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
io_ungetbyte(c, fptr);
}
return Qnil;
@@ -4358,14 +5225,18 @@ rb_io_ungetc(VALUE io, VALUE c)
/*
* call-seq:
- * ios.isatty -> true or false
- * ios.tty? -> true or false
+ * isatty -> true or false
*
- * Returns <code>true</code> if <em>ios</em> is associated with a
- * terminal device (tty), <code>false</code> otherwise.
+ * Returns +true+ if the stream is associated with a terminal device (tty),
+ * +false+ otherwise:
+ *
+ * f = File.new('t.txt').isatty #=> false
+ * f.close
+ * f = File.new('/dev/tty').isatty #=> true
+ * f.close
+ *
+ * IO#tty? is an alias for IO#isatty.
*
- * File.new("testfile").isatty #=> false
- * File.new("/dev/tty").isatty #=> true
*/
static VALUE
@@ -4374,24 +5245,22 @@ rb_io_isatty(VALUE io)
rb_io_t *fptr;
GetOpenFile(io, fptr);
- if (isatty(fptr->fd) == 0)
- return Qfalse;
- return Qtrue;
+ return RBOOL(isatty(fptr->fd) != 0);
}
#if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
/*
* call-seq:
- * ios.close_on_exec? -> true or false
+ * close_on_exec? -> true or false
*
- * Returns <code>true</code> if <em>ios</em> will be closed on exec.
+ * Returns +true+ if the stream will be closed on exec, +false+ otherwise:
+ *
+ * f = File.open('t.txt')
+ * f.close_on_exec? # => true
+ * f.close_on_exec = false
+ * f.close_on_exec? # => false
+ * f.close
*
- * f = open("/dev/null")
- * f.close_on_exec? #=> false
- * f.close_on_exec = true
- * f.close_on_exec? #=> true
- * f.close_on_exec = false
- * f.close_on_exec? #=> false
*/
static VALUE
@@ -4424,7 +5293,7 @@ rb_io_close_on_exec_p(VALUE io)
#if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
/*
* call-seq:
- * ios.close_on_exec = bool -> true or false
+ * self.close_on_exec = bool -> true or false
*
* Sets a close-on-exec flag.
*
@@ -4479,7 +5348,6 @@ rb_io_set_close_on_exec(VALUE io, VALUE arg)
#define rb_io_set_close_on_exec rb_f_notimplement
#endif
-#define FMODE_PREP (1<<16)
#define IS_PREP_STDIO(f) ((f)->mode & FMODE_PREP)
#define PREP_STDIO_NAME(f) (RSTRING_PTR((f)->pathv))
@@ -4491,7 +5359,6 @@ finish_writeconv(rb_io_t *fptr, int noalloc)
if (!fptr->wbuf.ptr) {
unsigned char buf[1024];
- long r;
res = econv_destination_buffer_full;
while (res == econv_destination_buffer_full) {
@@ -4499,22 +5366,20 @@ finish_writeconv(rb_io_t *fptr, int noalloc)
de = buf + sizeof(buf);
res = rb_econv_convert(fptr->writeconv, NULL, NULL, &dp, de, 0);
while (dp-ds) {
- retry:
- if (fptr->write_lock && rb_mutex_owned_p(fptr->write_lock))
- r = rb_write_internal2(fptr->fd, ds, dp-ds);
- else
- r = rb_write_internal(fptr->fd, ds, dp-ds);
- if (r == dp-ds)
- break;
- if (0 <= r) {
- ds += r;
+ size_t remaining = dp-ds;
+ long result = rb_io_write_memory(fptr, ds, remaining);
+
+ if (result > 0) {
+ ds += result;
+ if ((size_t)result == remaining) break;
}
- if (rb_io_wait_writable(fptr->fd)) {
+ else if (rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT)) {
if (fptr->fd < 0)
return noalloc ? Qtrue : rb_exc_new3(rb_eIOError, rb_str_new_cstr(closed_stream));
- goto retry;
}
- return noalloc ? Qtrue : INT2NUM(errno);
+ else {
+ return noalloc ? Qtrue : INT2NUM(errno);
+ }
}
if (res == econv_invalid_byte_sequence ||
res == econv_incomplete_input ||
@@ -4529,8 +5394,9 @@ finish_writeconv(rb_io_t *fptr, int noalloc)
res = econv_destination_buffer_full;
while (res == econv_destination_buffer_full) {
if (fptr->wbuf.len == fptr->wbuf.capa) {
- if (io_fflush(fptr) < 0)
+ if (io_fflush(fptr) < 0) {
return noalloc ? Qtrue : INT2NUM(errno);
+ }
}
ds = dp = (unsigned char *)fptr->wbuf.ptr + fptr->wbuf.off + fptr->wbuf.len;
@@ -4570,7 +5436,7 @@ static int
maygvl_close(int fd, int keepgvl)
{
if (keepgvl)
- return close(fd);
+ return close(fd);
/*
* close() may block for certain file types (NFS, SO_LINGER sockets,
@@ -4591,7 +5457,7 @@ static int
maygvl_fclose(FILE *file, int keepgvl)
{
if (keepgvl)
- return fclose(file);
+ return fclose(file);
return (int)(intptr_t)rb_thread_call_without_gvl(nogvl_fclose, file, RUBY_UBF_IO, 0);
}
@@ -4601,72 +5467,92 @@ static void clear_codeconv(rb_io_t *fptr);
static void
fptr_finalize_flush(rb_io_t *fptr, int noraise, int keepgvl,
- struct list_head *busy)
+ struct ccan_list_head *busy)
{
- VALUE err = Qnil;
+ VALUE error = Qnil;
int fd = fptr->fd;
FILE *stdio_file = fptr->stdio_file;
int mode = fptr->mode;
if (fptr->writeconv) {
- if (fptr->write_lock && !noraise) {
+ if (!NIL_P(fptr->write_lock) && !noraise) {
struct finish_writeconv_arg arg;
arg.fptr = fptr;
arg.noalloc = noraise;
- err = rb_mutex_synchronize(fptr->write_lock, finish_writeconv_sync, (VALUE)&arg);
- }
- else {
- err = finish_writeconv(fptr, noraise);
- }
+ error = rb_mutex_synchronize(fptr->write_lock, finish_writeconv_sync, (VALUE)&arg);
+ }
+ else {
+ error = finish_writeconv(fptr, noraise);
+ }
}
if (fptr->wbuf.len) {
- if (noraise) {
- io_flush_buffer_sync(fptr);
- }
- else {
- if (io_fflush(fptr) < 0 && NIL_P(err))
- err = INT2NUM(errno);
- }
+ if (noraise) {
+ io_flush_buffer_sync(fptr);
+ }
+ else {
+ if (io_fflush(fptr) < 0 && NIL_P(error)) {
+ error = INT2NUM(errno);
+ }
+ }
+ }
+
+ int done = 0;
+
+ if (IS_PREP_STDIO(fptr) || fd <= 2) {
+ // Need to keep FILE objects of stdin, stdout and stderr, so we are done:
+ done = 1;
}
fptr->fd = -1;
fptr->stdio_file = 0;
fptr->mode &= ~(FMODE_READABLE|FMODE_WRITABLE);
- /*
- * ensure waiting_fd users do not hit EBADF, wait for them
- * to exit before we call close().
- */
+ // Ensure waiting_fd users do not hit EBADF.
if (busy) {
- do rb_thread_schedule(); while (!list_empty(busy));
- }
+ // Wait for them to exit before we call close().
+ do rb_thread_schedule(); while (!ccan_list_empty(busy));
+ }
+
+ // Disable for now.
+ // if (!done && fd >= 0) {
+ // VALUE scheduler = rb_fiber_scheduler_current();
+ // if (scheduler != Qnil) {
+ // VALUE result = rb_fiber_scheduler_io_close(scheduler, fptr->self);
+ // if (!UNDEF_P(result)) done = 1;
+ // }
+ // }
+
+ if (!done && stdio_file) {
+ // stdio_file is deallocated anyway even if fclose failed.
+ if ((maygvl_fclose(stdio_file, noraise) < 0) && NIL_P(error)) {
+ if (!noraise) {
+ error = INT2NUM(errno);
+ }
+ }
- if (IS_PREP_STDIO(fptr) || fd <= 2) {
- /* need to keep FILE objects of stdin, stdout and stderr */
+ done = 1;
}
- else if (stdio_file) {
- /* stdio_file is deallocated anyway
- * even if fclose failed. */
- if ((maygvl_fclose(stdio_file, noraise) < 0) && NIL_P(err))
- if (!noraise) err = INT2NUM(errno);
- }
- else if (0 <= fd) {
- /* fptr->fd may be closed even if close fails.
- * POSIX doesn't specify it.
- * We assumes it is closed. */
- /**/
- keepgvl |= !(mode & FMODE_WRITABLE);
- keepgvl |= noraise;
- if ((maygvl_close(fd, keepgvl) < 0) && NIL_P(err))
- if (!noraise) err = INT2NUM(errno);
+ if (!done && fd >= 0) {
+ // fptr->fd may be closed even if close fails. POSIX doesn't specify it.
+ // We assumes it is closed.
+
+ keepgvl |= !(mode & FMODE_WRITABLE);
+ keepgvl |= noraise;
+ if ((maygvl_close(fd, keepgvl) < 0) && NIL_P(error)) {
+ if (!noraise) {
+ error = INT2NUM(errno);
+ }
+ }
+
+ done = 1;
}
- if (!NIL_P(err) && !noraise) {
- if (RB_INTEGER_TYPE_P(err))
- rb_syserr_fail_path(NUM2INT(err), fptr->pathv);
- else
- rb_exc_raise(err);
+ if (!NIL_P(error) && !noraise) {
+ if (RB_INTEGER_TYPE_P(error))
+ rb_syserr_fail_path(NUM2INT(error), fptr->pathv);
+ else
+ rb_exc_raise(error);
}
}
@@ -4683,10 +5569,10 @@ static void
rb_io_fptr_cleanup(rb_io_t *fptr, int noraise)
{
if (fptr->finalize) {
- (*fptr->finalize)(fptr, noraise);
+ (*fptr->finalize)(fptr, noraise);
}
else {
- fptr_finalize(fptr, noraise);
+ fptr_finalize(fptr, noraise);
}
}
@@ -4735,7 +5621,7 @@ rb_io_fptr_finalize_internal(void *ptr)
fptr->pathv = Qnil;
if (0 <= fptr->fd)
rb_io_fptr_cleanup(fptr, TRUE);
- fptr->write_lock = 0;
+ fptr->write_lock = Qnil;
free_io_buffer(&fptr->rbuf);
free_io_buffer(&fptr->wbuf);
clear_codeconv(fptr);
@@ -4775,16 +5661,16 @@ rb_io_memsize(const rb_io_t *fptr)
# define KEEPGVL FALSE
#endif
-int rb_notify_fd_close(int fd, struct list_head *);
+int rb_notify_fd_close(int fd, struct ccan_list_head *);
static rb_io_t *
io_close_fptr(VALUE io)
{
rb_io_t *fptr;
VALUE write_io;
rb_io_t *write_fptr;
- struct list_head busy;
+ struct ccan_list_head busy;
- list_head_init(&busy);
+ ccan_list_head_init(&busy);
write_io = GetWriteIO(io);
if (io != write_io) {
write_fptr = RFILE(write_io)->fptr;
@@ -4810,9 +5696,9 @@ fptr_waitpid(rb_io_t *fptr, int nohang)
{
int status;
if (fptr->pid) {
- rb_last_status_clear();
- rb_waitpid(fptr->pid, &status, nohang ? WNOHANG : 0);
- fptr->pid = 0;
+ rb_last_status_clear();
+ rb_waitpid(fptr->pid, &status, nohang ? WNOHANG : 0);
+ fptr->pid = 0;
}
}
@@ -4826,17 +5712,34 @@ rb_io_close(VALUE io)
/*
* call-seq:
- * ios.close -> nil
+ * close -> nil
+ *
+ * Closes the stream for both reading and writing
+ * if open for either or both; returns +nil+.
+ * See {Open and Closed Streams}[rdoc-ref:IO@Open+and+Closed+Streams].
+ *
+ * If the stream is open for writing, flushes any buffered writes
+ * to the operating system before closing.
*
- * Closes <em>ios</em> and flushes any pending writes to the operating
- * system. The stream is unavailable for any further data operations;
- * an IOError is raised if such an attempt is made. I/O streams are
- * automatically closed when they are claimed by the garbage collector.
+ * If the stream was opened by IO.popen, sets global variable <tt>$?</tt>
+ * (child exit status).
*
- * If <em>ios</em> is opened by IO.popen, #close sets
- * <code>$?</code>.
+ * Example:
+ *
+ * IO.popen('ruby', 'r+') do |pipe|
+ * puts pipe.closed?
+ * pipe.close
+ * puts $?
+ * puts pipe.closed?
+ * end
+ *
+ * Output:
*
- * Calling this method on closed IO object is just ignored since Ruby 2.3.
+ * false
+ * pid 13760 exit 0
+ * true
+ *
+ * Related: IO#close_read, IO#close_write, IO#closed?.
*/
static VALUE
@@ -4863,9 +5766,9 @@ ignore_closed_stream(VALUE io, VALUE exc)
enum {mesg_len = sizeof(closed_stream)-1};
VALUE mesg = rb_attr_get(exc, idMesg);
if (!RB_TYPE_P(mesg, T_STRING) ||
- RSTRING_LEN(mesg) != mesg_len ||
- memcmp(RSTRING_PTR(mesg), closed_stream, mesg_len)) {
- rb_exc_raise(exc);
+ RSTRING_LEN(mesg) != mesg_len ||
+ memcmp(RSTRING_PTR(mesg), closed_stream, mesg_len)) {
+ rb_exc_raise(exc);
}
return io;
}
@@ -4874,28 +5777,35 @@ static VALUE
io_close(VALUE io)
{
VALUE closed = rb_check_funcall(io, rb_intern("closed?"), 0, 0);
- if (closed != Qundef && RTEST(closed)) return io;
+ if (!UNDEF_P(closed) && RTEST(closed)) return io;
rb_rescue2(io_call_close, io, ignore_closed_stream, io,
- rb_eIOError, (VALUE)0);
+ rb_eIOError, (VALUE)0);
return io;
}
/*
* call-seq:
- * ios.closed? -> true or false
+ * closed? -> true or false
+ *
+ * Returns +true+ if the stream is closed for both reading and writing,
+ * +false+ otherwise.
+ * See {Open and Closed Streams}[rdoc-ref:IO@Open+and+Closed+Streams].
+ *
+ * IO.popen('ruby', 'r+') do |pipe|
+ * puts pipe.closed?
+ * pipe.close_read
+ * puts pipe.closed?
+ * pipe.close_write
+ * puts pipe.closed?
+ * end
*
- * Returns <code>true</code> if <em>ios</em> is completely closed (for
- * duplex streams, both reader and writer), <code>false</code>
- * otherwise.
+ * Output:
*
- * f = File.new("testfile")
- * f.close #=> nil
- * f.closed? #=> true
- * f = IO.popen("/bin/sh","r+")
- * f.close_write #=> nil
- * f.closed? #=> false
- * f.close_read #=> nil
- * f.closed? #=> true
+ * false
+ * false
+ * true
+ *
+ * Related: IO#close_read, IO#close_write, IO#close.
*/
@@ -4915,27 +5825,39 @@ rb_io_closed(VALUE io)
}
fptr = rb_io_get_fptr(io);
- return 0 <= fptr->fd ? Qfalse : Qtrue;
+ return RBOOL(0 > fptr->fd);
}
/*
* call-seq:
- * ios.close_read -> nil
+ * close_read -> nil
*
- * Closes the read end of a duplex I/O stream (i.e., one that contains
- * both a read and a write stream, such as a pipe). Will raise an
- * IOError if the stream is not duplexed.
+ * Closes the stream for reading if open for reading;
+ * returns +nil+.
+ * See {Open and Closed Streams}[rdoc-ref:IO@Open+and+Closed+Streams].
*
- * f = IO.popen("/bin/sh","r+")
- * f.close_read
- * f.readlines
+ * If the stream was opened by IO.popen and is also closed for writing,
+ * sets global variable <tt>$?</tt> (child exit status).
*
- * <em>produces:</em>
+ * Example:
+ *
+ * IO.popen('ruby', 'r+') do |pipe|
+ * puts pipe.closed?
+ * pipe.close_write
+ * puts pipe.closed?
+ * pipe.close_read
+ * puts $?
+ * puts pipe.closed?
+ * end
+ *
+ * Output:
*
- * prog.rb:3:in `readlines': not opened for reading (IOError)
- * from prog.rb:3
+ * false
+ * false
+ * pid 14748 exit 0
+ * true
*
- * Calling this method on closed IO object is just ignored since Ruby 2.3.
+ * Related: IO#close, IO#close_write, IO#closed?.
*/
static VALUE
@@ -4960,44 +5882,55 @@ rb_io_close_read(VALUE io)
write_io = GetWriteIO(io);
if (io != write_io) {
- rb_io_t *wfptr;
- wfptr = rb_io_get_fptr(rb_io_taint_check(write_io));
- wfptr->pid = fptr->pid;
- fptr->pid = 0;
+ rb_io_t *wfptr;
+ wfptr = rb_io_get_fptr(rb_io_taint_check(write_io));
+ wfptr->pid = fptr->pid;
+ fptr->pid = 0;
RFILE(io)->fptr = wfptr;
- /* bind to write_io temporarily to get rid of memory/fd leak */
- fptr->tied_io_for_writing = 0;
- RFILE(write_io)->fptr = fptr;
- rb_io_fptr_cleanup(fptr, FALSE);
- /* should not finalize fptr because another thread may be reading it */
+ /* bind to write_io temporarily to get rid of memory/fd leak */
+ fptr->tied_io_for_writing = 0;
+ RFILE(write_io)->fptr = fptr;
+ rb_io_fptr_cleanup(fptr, FALSE);
+ /* should not finalize fptr because another thread may be reading it */
return Qnil;
}
if ((fptr->mode & (FMODE_DUPLEX|FMODE_WRITABLE)) == FMODE_WRITABLE) {
- rb_raise(rb_eIOError, "closing non-duplex IO for reading");
+ rb_raise(rb_eIOError, "closing non-duplex IO for reading");
}
return rb_io_close(io);
}
/*
* call-seq:
- * ios.close_write -> nil
+ * close_write -> nil
*
- * Closes the write end of a duplex I/O stream (i.e., one that contains
- * both a read and a write stream, such as a pipe). Will raise an
- * IOError if the stream is not duplexed.
+ * Closes the stream for writing if open for writing;
+ * returns +nil+.
+ * See {Open and Closed Streams}[rdoc-ref:IO@Open+and+Closed+Streams].
*
- * f = IO.popen("/bin/sh","r+")
- * f.close_write
- * f.print "nowhere"
+ * Flushes any buffered writes to the operating system before closing.
*
- * <em>produces:</em>
+ * If the stream was opened by IO.popen and is also closed for reading,
+ * sets global variable <tt>$?</tt> (child exit status).
*
- * prog.rb:3:in `write': not opened for writing (IOError)
- * from prog.rb:3:in `print'
- * from prog.rb:3
+ * IO.popen('ruby', 'r+') do |pipe|
+ * puts pipe.closed?
+ * pipe.close_read
+ * puts pipe.closed?
+ * pipe.close_write
+ * puts $?
+ * puts pipe.closed?
+ * end
*
- * Calling this method on closed IO object is just ignored since Ruby 2.3.
+ * Output:
+ *
+ * false
+ * false
+ * pid 15044 exit 0
+ * true
+ *
+ * Related: IO#close, IO#close_read, IO#closed?.
*/
static VALUE
@@ -5017,17 +5950,17 @@ rb_io_close_write(VALUE io)
rb_sys_fail_path(fptr->pathv);
fptr->mode &= ~FMODE_WRITABLE;
if (!(fptr->mode & FMODE_READABLE))
- return rb_io_close(write_io);
+ return rb_io_close(write_io);
return Qnil;
}
if ((fptr->mode & (FMODE_DUPLEX|FMODE_READABLE)) == FMODE_READABLE) {
- rb_raise(rb_eIOError, "closing non-duplex IO for writing");
+ rb_raise(rb_eIOError, "closing non-duplex IO for writing");
}
if (io != write_io) {
- fptr = rb_io_get_fptr(rb_io_taint_check(io));
- fptr->tied_io_for_writing = 0;
+ fptr = rb_io_get_fptr(rb_io_taint_check(io));
+ fptr->tied_io_for_writing = 0;
}
rb_io_close(write_io);
return Qnil;
@@ -5035,15 +5968,13 @@ rb_io_close_write(VALUE io)
/*
* call-seq:
- * ios.sysseek(offset, whence=IO::SEEK_SET) -> integer
+ * sysseek(offset, whence = IO::SEEK_SET) -> integer
*
- * Seeks to a given <i>offset</i> in the stream according to the value
- * of <i>whence</i> (see IO#seek for values of <i>whence</i>). Returns
- * the new offset into the file.
+ * Behaves like IO#seek, except that it:
+ *
+ * - Uses low-level system functions.
+ * - Returns the new position.
*
- * f = File.new("testfile")
- * f.sysseek(-13, IO::SEEK_END) #=> 53
- * f.sysread(10) #=> "And so on."
*/
static VALUE
@@ -5052,19 +5983,19 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
VALUE offset, ptrname;
int whence = SEEK_SET;
rb_io_t *fptr;
- off_t pos;
+ rb_off_t pos;
if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
- whence = interpret_seek_whence(ptrname);
+ whence = interpret_seek_whence(ptrname);
}
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
if ((fptr->mode & FMODE_READABLE) &&
(READ_DATA_BUFFERED(fptr) || READ_CHAR_PENDING(fptr))) {
- rb_raise(rb_eIOError, "sysseek for buffered IO");
+ rb_raise(rb_eIOError, "sysseek for buffered IO");
}
if ((fptr->mode & FMODE_WRITABLE) && fptr->wbuf.len) {
- rb_warn("sysseek for buffered IO");
+ rb_warn("sysseek for buffered IO");
}
errno = 0;
pos = lseek(fptr->fd, pos, whence);
@@ -5075,15 +6006,20 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.syswrite(string) -> integer
+ * syswrite(object) -> integer
+ *
+ * Writes the given +object+ to self, which must be opened for writing (see Modes);
+ * returns the number bytes written.
+ * If +object+ is not a string is converted via method to_s:
*
- * Writes the given string to <em>ios</em> using a low-level write.
- * Returns the number of bytes written. Do not mix with other methods
- * that write to <em>ios</em> or you may get unpredictable results.
- * Raises SystemCallError on error.
+ * f = File.new('t.tmp', 'w')
+ * f.syswrite('foo') # => 3
+ * f.syswrite(30) # => 2
+ * f.syswrite(:foo) # => 3
+ * f.close
+ *
+ * This methods should not be used with other stream-writer methods.
*
- * f = File.new("out", "w")
- * f.syswrite("ABCDEF") #=> 6
*/
static VALUE
@@ -5095,19 +6031,19 @@ rb_io_syswrite(VALUE io, VALUE str)
const char *ptr;
if (!RB_TYPE_P(str, T_STRING))
- str = rb_obj_as_string(str);
+ str = rb_obj_as_string(str);
io = GetWriteIO(io);
GetOpenFile(io, fptr);
rb_io_check_writable(fptr);
if (fptr->wbuf.len) {
- rb_warn("syswrite for buffered IO");
+ rb_warn("syswrite for buffered IO");
}
tmp = rb_str_tmp_frozen_acquire(str);
RSTRING_GETMEM(tmp, ptr, len);
- n = rb_write_internal(fptr->fd, ptr, len);
+ n = rb_io_write_memory(fptr, ptr, len);
if (n < 0) rb_sys_fail_path(fptr->pathv);
rb_str_tmp_frozen_release(str, tmp);
@@ -5116,21 +6052,13 @@ rb_io_syswrite(VALUE io, VALUE str)
/*
* call-seq:
- * ios.sysread(maxlen[, outbuf]) -> string
+ * sysread(maxlen) -> string
+ * sysread(maxlen, out_string) -> string
*
- * Reads <i>maxlen</i> bytes from <em>ios</em> using a low-level
- * read and returns them as a string. Do not mix with other methods
- * that read from <em>ios</em> or you may get unpredictable results.
+ * Behaves like IO#readpartial, except that it uses low-level system functions.
*
- * If the optional _outbuf_ argument is present,
- * it must reference a String, which will receive the data.
- * The _outbuf_ will contain only the received data after the method call
- * even if it is not empty at the beginning.
- *
- * Raises SystemCallError on error and EOFError at end of file.
+ * This method should not be used with other stream-reader methods.
*
- * f = File.new("testfile")
- * f.sysread(16) #=> "This is line one"
*/
static VALUE
@@ -5152,33 +6080,29 @@ rb_io_sysread(int argc, VALUE *argv, VALUE io)
rb_io_check_byte_readable(fptr);
if (READ_DATA_BUFFERED(fptr)) {
- rb_raise(rb_eIOError, "sysread for buffered IO");
+ rb_raise(rb_eIOError, "sysread for buffered IO");
}
- /*
- * FIXME: removing rb_thread_wait_fd() here changes sysread semantics
- * on non-blocking IOs. However, it's still currently possible
- * for sysread to raise Errno::EAGAIN if another thread read()s
- * the IO after we return from rb_thread_wait_fd() but before
- * we call read()
- */
- rb_thread_wait_fd(fptr->fd);
-
rb_io_check_closed(fptr);
io_setstrbuf(&str, ilen);
+ iis.th = rb_thread_current();
+ iis.fptr = fptr;
+ iis.nonblock = 0;
iis.fd = fptr->fd;
- iis.nonblock = 1; /* for historical reasons, maybe (see above) */
iis.buf = RSTRING_PTR(str);
iis.capa = ilen;
- n = read_internal_locktmp(str, &iis);
+ iis.timeout = NULL;
+ n = io_read_memory_locktmp(str, &iis);
if (n < 0) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
+
io_set_read_length(str, n, shrinkable);
+
if (n == 0 && ilen > 0) {
- rb_eof_error();
+ rb_eof_error();
}
return str;
@@ -5189,7 +6113,7 @@ struct prdwr_internal_arg {
int fd;
void *buf;
size_t count;
- off_t offset;
+ rb_off_t offset;
};
#endif /* HAVE_PREAD || HAVE_PWRITE */
@@ -5210,25 +6134,31 @@ pread_internal_call(VALUE arg)
/*
* call-seq:
- * ios.pread(maxlen, offset[, outbuf]) -> string
+ * pread(maxlen, offset) -> string
+ * pread(maxlen, offset, out_string) -> string
*
- * Reads <i>maxlen</i> bytes from <em>ios</em> using the pread system call
- * and returns them as a string without modifying the underlying
- * descriptor offset. This is advantageous compared to combining IO#seek
- * and IO#read in that it is atomic, allowing multiple threads/process to
- * share the same IO object for reading the file at various locations.
- * This bypasses any userspace buffering of the IO layer.
- * If the optional <i>outbuf</i> argument is present, it must
- * reference a String, which will receive the data.
- * Raises SystemCallError on error, EOFError at end of file and
- * NotImplementedError if platform does not implement the system call.
+ * Behaves like IO#readpartial, except that it:
+ *
+ * - Reads at the given +offset+ (in bytes).
+ * - Disregards, and does not modify, the stream's position
+ * (see {Position}[rdoc-ref:IO@Position]).
+ * - Bypasses any user space buffering in the stream.
+ *
+ * Because this method does not disturb the stream's state
+ * (its position, in particular), +pread+ allows multiple threads and processes
+ * to use the same \IO object for reading at various offsets.
+ *
+ * f = File.open('t.txt')
+ * f.read # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.pos # => 52
+ * # Read 12 bytes at offset 0.
+ * f.pread(12, 0) # => "First line\n"
+ * # Read 9 bytes at offset 8.
+ * f.pread(9, 8) # => "ne\nSecon"
+ * f.close
+ *
+ * Not available on some platforms.
*
- * File.write("testfile", "This is line one\nThis is line two\n")
- * File.open("testfile") do |f|
- * p f.read # => "This is line one\nThis is line two\n"
- * p f.pread(12, 0) # => "This is line"
- * p f.pread(9, 8) # => "line one\n"
- * end
*/
static VALUE
rb_io_pread(int argc, VALUE *argv, VALUE io)
@@ -5257,11 +6187,11 @@ rb_io_pread(int argc, VALUE *argv, VALUE io)
n = (ssize_t)rb_ensure(pread_internal_call, (VALUE)&arg, rb_str_unlocktmp, str);
if (n < 0) {
- rb_sys_fail_path(fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
}
io_set_read_length(str, n, shrinkable);
if (n == 0 && arg.count > 0) {
- rb_eof_error();
+ rb_eof_error();
}
return str;
@@ -5281,22 +6211,28 @@ internal_pwrite_func(void *ptr)
/*
* call-seq:
- * ios.pwrite(string, offset) -> integer
+ * pwrite(object, offset) -> integer
*
- * Writes the given string to <em>ios</em> at <i>offset</i> using pwrite()
- * system call. This is advantageous to combining IO#seek and IO#write
- * in that it is atomic, allowing multiple threads/process to share the
- * same IO object for reading the file at various locations.
- * This bypasses any userspace buffering of the IO layer.
- * Returns the number of bytes written.
- * Raises SystemCallError on error and NotImplementedError
- * if platform does not implement the system call.
+ * Behaves like IO#write, except that it:
*
- * File.open("out", "w") do |f|
- * f.pwrite("ABCDEF", 3) #=> 6
- * end
+ * - Writes at the given +offset+ (in bytes).
+ * - Disregards, and does not modify, the stream's position
+ * (see {Position}[rdoc-ref:IO@Position]).
+ * - Bypasses any user space buffering in the stream.
+ *
+ * Because this method does not disturb the stream's state
+ * (its position, in particular), +pwrite+ allows multiple threads and processes
+ * to use the same \IO object for writing at various offsets.
+ *
+ * f = File.open('t.tmp', 'w+')
+ * # Write 6 bytes at offset 3.
+ * f.pwrite('ABCDEF', 3) # => 6
+ * f.rewind
+ * f.read # => "\u0000\u0000\u0000ABCDEF"
+ * f.close
+ *
+ * Not available on some platforms.
*
- * File.read("out") #=> "\u0000\u0000\u0000ABCDEF"
*/
static VALUE
rb_io_pwrite(VALUE io, VALUE str, VALUE offset)
@@ -5307,7 +6243,7 @@ rb_io_pwrite(VALUE io, VALUE str, VALUE offset)
VALUE tmp;
if (!RB_TYPE_P(str, T_STRING))
- str = rb_obj_as_string(str);
+ str = rb_obj_as_string(str);
arg.offset = NUM2OFFT(offset);
@@ -5345,10 +6281,10 @@ rb_io_binmode(VALUE io)
fptr->writeconv_pre_ecflags &= ~ECONV_NEWLINE_DECORATOR_MASK;
#ifdef O_BINARY
if (!fptr->readconv) {
- SET_BINARY_MODE_WITH_SEEK_CUR(fptr);
+ SET_BINARY_MODE_WITH_SEEK_CUR(fptr);
}
else {
- setmode(fptr->fd, O_BINARY);
+ setmode(fptr->fd, O_BINARY);
}
#endif
return io;
@@ -5389,14 +6325,13 @@ rb_io_ascii8bit_binmode(VALUE io)
/*
* call-seq:
- * ios.binmode -> ios
+ * binmode -> self
*
- * Puts <em>ios</em> into binary mode.
- * Once a stream is in binary mode, it cannot be reset to nonbinary mode.
+ * Sets the stream's data mode as binary
+ * (see {Data Mode}[rdoc-ref:File@Data+Mode]).
+ *
+ * A stream's data mode may not be changed from binary to text.
*
- * - newline conversion disabled
- * - encoding conversion disabled
- * - content is treated as ASCII-8BIT
*/
static VALUE
@@ -5414,39 +6349,41 @@ rb_io_binmode_m(VALUE io)
/*
* call-seq:
- * ios.binmode? -> true or false
+ * binmode? -> true or false
+ *
+ * Returns +true+ if the stream is on binary mode, +false+ otherwise.
+ * See {Data Mode}[rdoc-ref:File@Data+Mode].
*
- * Returns <code>true</code> if <em>ios</em> is binmode.
*/
static VALUE
rb_io_binmode_p(VALUE io)
{
rb_io_t *fptr;
GetOpenFile(io, fptr);
- return fptr->mode & FMODE_BINMODE ? Qtrue : Qfalse;
+ return RBOOL(fptr->mode & FMODE_BINMODE);
}
static const char*
rb_io_fmode_modestr(int fmode)
{
if (fmode & FMODE_APPEND) {
- if ((fmode & FMODE_READWRITE) == FMODE_READWRITE) {
- return MODE_BTMODE("a+", "ab+", "at+");
- }
- return MODE_BTMODE("a", "ab", "at");
+ if ((fmode & FMODE_READWRITE) == FMODE_READWRITE) {
+ return MODE_BTMODE("a+", "ab+", "at+");
+ }
+ return MODE_BTMODE("a", "ab", "at");
}
switch (fmode & FMODE_READWRITE) {
default:
- rb_raise(rb_eArgError, "invalid access fmode 0x%x", fmode);
+ rb_raise(rb_eArgError, "invalid access fmode 0x%x", fmode);
case FMODE_READABLE:
- return MODE_BTMODE("r", "rb", "rt");
+ return MODE_BTMODE("r", "rb", "rt");
case FMODE_WRITABLE:
- return MODE_BTXMODE("w", "wb", "wt", "wx", "wbx", "wtx");
+ return MODE_BTXMODE("w", "wb", "wt", "wx", "wbx", "wtx");
case FMODE_READWRITE:
- if (fmode & FMODE_CREATE) {
+ if (fmode & FMODE_CREATE) {
return MODE_BTXMODE("w+", "wb+", "wt+", "w+x", "wb+x", "wt+x");
- }
- return MODE_BTMODE("r+", "rb+", "rt+");
+ }
+ return MODE_BTMODE("r+", "rb+", "rt+");
}
}
@@ -5469,28 +6406,27 @@ rb_io_modestr_fmode(const char *modestr)
switch (*m++) {
case 'r':
- fmode |= FMODE_READABLE;
- break;
+ fmode |= FMODE_READABLE;
+ break;
case 'w':
- fmode |= FMODE_WRITABLE | FMODE_TRUNC | FMODE_CREATE;
- break;
+ fmode |= FMODE_WRITABLE | FMODE_TRUNC | FMODE_CREATE;
+ break;
case 'a':
- fmode |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
- break;
+ fmode |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
+ break;
default:
- error:
- rb_raise(rb_eArgError, "invalid access mode %s", modestr);
+ goto error;
}
while (*m) {
switch (*m++) {
- case 'b':
+ case 'b':
fmode |= FMODE_BINMODE;
break;
- case 't':
+ case 't':
fmode |= FMODE_TEXTMODE;
break;
- case '+':
+ case '+':
fmode |= FMODE_READWRITE;
break;
case 'x':
@@ -5498,12 +6434,12 @@ rb_io_modestr_fmode(const char *modestr)
goto error;
fmode |= FMODE_EXCL;
break;
- default:
+ default:
goto error;
- case ':':
- p = strchr(m, ':');
- if (io_encname_bom_p(m, p ? (long)(p - m) : (long)strlen(m)))
- fmode |= FMODE_SETENC_BY_BOM;
+ case ':':
+ p = strchr(m, ':');
+ if (io_encname_bom_p(m, p ? (long)(p - m) : (long)strlen(m)))
+ fmode |= FMODE_SETENC_BY_BOM;
goto finished;
}
}
@@ -5513,6 +6449,10 @@ rb_io_modestr_fmode(const char *modestr)
goto error;
return fmode;
+
+ error:
+ rb_raise(rb_eArgError, "invalid access mode %s", modestr);
+ UNREACHABLE_RETURN(Qundef);
}
int
@@ -5522,31 +6462,31 @@ rb_io_oflags_fmode(int oflags)
switch (oflags & O_ACCMODE) {
case O_RDONLY:
- fmode = FMODE_READABLE;
- break;
+ fmode = FMODE_READABLE;
+ break;
case O_WRONLY:
- fmode = FMODE_WRITABLE;
- break;
+ fmode = FMODE_WRITABLE;
+ break;
case O_RDWR:
- fmode = FMODE_READWRITE;
- break;
+ fmode = FMODE_READWRITE;
+ break;
}
if (oflags & O_APPEND) {
- fmode |= FMODE_APPEND;
+ fmode |= FMODE_APPEND;
}
if (oflags & O_TRUNC) {
- fmode |= FMODE_TRUNC;
+ fmode |= FMODE_TRUNC;
}
if (oflags & O_CREAT) {
- fmode |= FMODE_CREATE;
+ fmode |= FMODE_CREATE;
}
if (oflags & O_EXCL) {
fmode |= FMODE_EXCL;
}
#ifdef O_BINARY
if (oflags & O_BINARY) {
- fmode |= FMODE_BINMODE;
+ fmode |= FMODE_BINMODE;
}
#endif
@@ -5611,25 +6551,25 @@ rb_io_oflags_modestr(int oflags)
}
accmode = oflags & (O_RDONLY|O_WRONLY|O_RDWR);
if (oflags & O_APPEND) {
- if (accmode == O_WRONLY) {
- return MODE_BINARY("a", "ab");
- }
- if (accmode == O_RDWR) {
- return MODE_BINARY("a+", "ab+");
- }
+ if (accmode == O_WRONLY) {
+ return MODE_BINARY("a", "ab");
+ }
+ if (accmode == O_RDWR) {
+ return MODE_BINARY("a+", "ab+");
+ }
}
switch (accmode) {
default:
- rb_raise(rb_eArgError, "invalid access oflags 0x%x", oflags);
+ rb_raise(rb_eArgError, "invalid access oflags 0x%x", oflags);
case O_RDONLY:
- return MODE_BINARY("r", "rb");
+ return MODE_BINARY("r", "rb");
case O_WRONLY:
- return MODE_BINARY("w", "wb");
+ return MODE_BINARY("w", "wb");
case O_RDWR:
- if (oflags & O_TRUNC) {
- return MODE_BINARY("w+", "wb+");
- }
- return MODE_BINARY("r+", "rb+");
+ if (oflags & O_TRUNC) {
+ return MODE_BINARY("w+", "wb+");
+ }
+ return MODE_BINARY("r+", "rb+");
}
}
@@ -5644,25 +6584,25 @@ rb_io_ext_int_to_encs(rb_encoding *ext, rb_encoding *intern, rb_encoding **enc,
int default_ext = 0;
if (ext == NULL) {
- ext = rb_default_external_encoding();
- default_ext = 1;
+ ext = rb_default_external_encoding();
+ default_ext = 1;
}
- if (ext == rb_ascii8bit_encoding()) {
- /* If external is ASCII-8BIT, no transcoding */
- intern = NULL;
+ if (rb_is_ascii8bit_enc(ext)) {
+ /* If external is ASCII-8BIT, no transcoding */
+ intern = NULL;
}
else if (intern == NULL) {
- intern = rb_default_internal_encoding();
+ intern = rb_default_internal_encoding();
}
if (intern == NULL || intern == (rb_encoding *)Qnil ||
- (!(fmode & FMODE_SETENC_BY_BOM) && (intern == ext))) {
- /* No internal encoding => use external + no transcoding */
- *enc = (default_ext && intern != ext) ? NULL : ext;
- *enc2 = NULL;
+ (!(fmode & FMODE_SETENC_BY_BOM) && (intern == ext))) {
+ /* No internal encoding => use external + no transcoding */
+ *enc = (default_ext && intern != ext) ? NULL : ext;
+ *enc2 = NULL;
}
else {
- *enc = intern;
- *enc2 = ext;
+ *enc = intern;
+ *enc2 = ext;
}
}
@@ -5674,7 +6614,7 @@ unsupported_encoding(const char *name, rb_encoding *enc)
static void
parse_mode_enc(const char *estr, rb_encoding *estr_enc,
- rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p)
+ rb_encoding **enc_p, rb_encoding **enc2_p, int *fmode_p)
{
const char *p;
char encname[ENCODING_MAXNAMELEN+1];
@@ -5688,53 +6628,53 @@ parse_mode_enc(const char *estr, rb_encoding *estr_enc,
p = strrchr(estr, ':');
len = p ? (p++ - estr) : (long)strlen(estr);
if ((fmode & FMODE_SETENC_BY_BOM) || io_encname_bom_p(estr, len)) {
- estr += bom_prefix_len;
- len -= bom_prefix_len;
- if (!STRNCASECMP(estr, utf_prefix, utf_prefix_len)) {
- fmode |= FMODE_SETENC_BY_BOM;
- }
- else {
- rb_enc_warn(estr_enc, "BOM with non-UTF encoding %s is nonsense", estr);
- fmode &= ~FMODE_SETENC_BY_BOM;
- }
+ estr += bom_prefix_len;
+ len -= bom_prefix_len;
+ if (!STRNCASECMP(estr, utf_prefix, utf_prefix_len)) {
+ fmode |= FMODE_SETENC_BY_BOM;
+ }
+ else {
+ rb_enc_warn(estr_enc, "BOM with non-UTF encoding %s is nonsense", estr);
+ fmode &= ~FMODE_SETENC_BY_BOM;
+ }
}
if (len == 0 || len > ENCODING_MAXNAMELEN) {
- idx = -1;
+ idx = -1;
}
else {
- if (p) {
- memcpy(encname, estr, len);
- encname[len] = '\0';
- estr = encname;
- }
- idx = rb_enc_find_index(estr);
+ if (p) {
+ memcpy(encname, estr, len);
+ encname[len] = '\0';
+ estr = encname;
+ }
+ idx = rb_enc_find_index(estr);
}
if (fmode_p) *fmode_p = fmode;
if (idx >= 0)
- ext_enc = rb_enc_from_index(idx);
+ ext_enc = rb_enc_from_index(idx);
else {
- if (idx != -2)
- unsupported_encoding(estr, estr_enc);
- ext_enc = NULL;
+ if (idx != -2)
+ unsupported_encoding(estr, estr_enc);
+ ext_enc = NULL;
}
int_enc = NULL;
if (p) {
- if (*p == '-' && *(p+1) == '\0') {
- /* Special case - "-" => no transcoding */
- int_enc = (rb_encoding *)Qnil;
- }
- else {
- idx2 = rb_enc_find_index(p);
- if (idx2 < 0)
- unsupported_encoding(p, estr_enc);
- else if (!(fmode & FMODE_SETENC_BY_BOM) && (idx2 == idx)) {
- int_enc = (rb_encoding *)Qnil;
- }
- else
- int_enc = rb_enc_from_index(idx2);
- }
+ if (*p == '-' && *(p+1) == '\0') {
+ /* Special case - "-" => no transcoding */
+ int_enc = (rb_encoding *)Qnil;
+ }
+ else {
+ idx2 = rb_enc_find_index(p);
+ if (idx2 < 0)
+ unsupported_encoding(p, estr_enc);
+ else if (!(fmode & FMODE_SETENC_BY_BOM) && (idx2 == idx)) {
+ int_enc = (rb_encoding *)Qnil;
+ }
+ else
+ int_enc = rb_enc_from_index(idx2);
+ }
}
rb_io_ext_int_to_encs(ext_enc, int_enc, enc_p, enc2_p, fmode);
@@ -5749,62 +6689,62 @@ rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2
rb_encoding *intencoding = NULL;
if (!NIL_P(opt)) {
- VALUE v;
- v = rb_hash_lookup2(opt, sym_encoding, Qnil);
- if (v != Qnil) encoding = v;
- v = rb_hash_lookup2(opt, sym_extenc, Qundef);
- if (v != Qnil) extenc = v;
- v = rb_hash_lookup2(opt, sym_intenc, Qundef);
- if (v != Qundef) intenc = v;
- }
- if ((extenc != Qundef || intenc != Qundef) && !NIL_P(encoding)) {
- if (!NIL_P(ruby_verbose)) {
- int idx = rb_to_encoding_index(encoding);
- if (idx >= 0) encoding = rb_enc_from_encoding(rb_enc_from_index(idx));
- rb_warn("Ignoring encoding parameter '%"PRIsVALUE"': %s_encoding is used",
- encoding, extenc == Qundef ? "internal" : "external");
- }
- encoding = Qnil;
- }
- if (extenc != Qundef && !NIL_P(extenc)) {
- extencoding = rb_to_encoding(extenc);
- }
- if (intenc != Qundef) {
- if (NIL_P(intenc)) {
- /* internal_encoding: nil => no transcoding */
- intencoding = (rb_encoding *)Qnil;
- }
- else if (!NIL_P(tmp = rb_check_string_type(intenc))) {
- char *p = StringValueCStr(tmp);
-
- if (*p == '-' && *(p+1) == '\0') {
- /* Special case - "-" => no transcoding */
- intencoding = (rb_encoding *)Qnil;
- }
- else {
- intencoding = rb_to_encoding(intenc);
- }
- }
- else {
- intencoding = rb_to_encoding(intenc);
- }
- if (extencoding == intencoding) {
- intencoding = (rb_encoding *)Qnil;
- }
+ VALUE v;
+ v = rb_hash_lookup2(opt, sym_encoding, Qnil);
+ if (v != Qnil) encoding = v;
+ v = rb_hash_lookup2(opt, sym_extenc, Qundef);
+ if (v != Qnil) extenc = v;
+ v = rb_hash_lookup2(opt, sym_intenc, Qundef);
+ if (!UNDEF_P(v)) intenc = v;
+ }
+ if ((!UNDEF_P(extenc) || !UNDEF_P(intenc)) && !NIL_P(encoding)) {
+ if (!NIL_P(ruby_verbose)) {
+ int idx = rb_to_encoding_index(encoding);
+ if (idx >= 0) encoding = rb_enc_from_encoding(rb_enc_from_index(idx));
+ rb_warn("Ignoring encoding parameter '%"PRIsVALUE"': %s_encoding is used",
+ encoding, UNDEF_P(extenc) ? "internal" : "external");
+ }
+ encoding = Qnil;
+ }
+ if (!UNDEF_P(extenc) && !NIL_P(extenc)) {
+ extencoding = rb_to_encoding(extenc);
+ }
+ if (!UNDEF_P(intenc)) {
+ if (NIL_P(intenc)) {
+ /* internal_encoding: nil => no transcoding */
+ intencoding = (rb_encoding *)Qnil;
+ }
+ else if (!NIL_P(tmp = rb_check_string_type(intenc))) {
+ char *p = StringValueCStr(tmp);
+
+ if (*p == '-' && *(p+1) == '\0') {
+ /* Special case - "-" => no transcoding */
+ intencoding = (rb_encoding *)Qnil;
+ }
+ else {
+ intencoding = rb_to_encoding(intenc);
+ }
+ }
+ else {
+ intencoding = rb_to_encoding(intenc);
+ }
+ if (extencoding == intencoding) {
+ intencoding = (rb_encoding *)Qnil;
+ }
}
if (!NIL_P(encoding)) {
- extracted = 1;
- if (!NIL_P(tmp = rb_check_string_type(encoding))) {
- parse_mode_enc(StringValueCStr(tmp), rb_enc_get(tmp),
- enc_p, enc2_p, fmode_p);
- }
- else {
- rb_io_ext_int_to_encs(rb_to_encoding(encoding), NULL, enc_p, enc2_p, 0);
- }
- }
- else if (extenc != Qundef || intenc != Qundef) {
extracted = 1;
- rb_io_ext_int_to_encs(extencoding, intencoding, enc_p, enc2_p, 0);
+ if (!NIL_P(tmp = rb_check_string_type(encoding))) {
+ parse_mode_enc(StringValueCStr(tmp), rb_enc_get(tmp),
+ enc_p, enc2_p, fmode_p);
+ }
+ else {
+ rb_io_ext_int_to_encs(rb_to_encoding(encoding), NULL, enc_p, enc2_p, 0);
+ }
+ }
+ else if (!UNDEF_P(extenc) || !UNDEF_P(intenc)) {
+ extracted = 1;
+ rb_io_ext_int_to_encs(extencoding, intencoding, enc_p, enc2_p, 0);
}
return extracted;
}
@@ -5823,17 +6763,17 @@ validate_enc_binmode(int *fmode_p, int ecflags, rb_encoding *enc, rb_encoding *e
rb_raise(rb_eArgError, "ASCII incompatible encoding needs binmode");
if ((fmode & FMODE_BINMODE) && (ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {
- rb_raise(rb_eArgError, "newline decorator with binary mode");
+ rb_raise(rb_eArgError, "newline decorator with binary mode");
}
if (!(fmode & FMODE_BINMODE) &&
- (DEFAULT_TEXTMODE || (ecflags & ECONV_NEWLINE_DECORATOR_MASK))) {
- fmode |= FMODE_TEXTMODE;
- *fmode_p = fmode;
+ (DEFAULT_TEXTMODE || (ecflags & ECONV_NEWLINE_DECORATOR_MASK))) {
+ fmode |= FMODE_TEXTMODE;
+ *fmode_p = fmode;
}
#if !DEFAULT_TEXTMODE
else if (!(ecflags & ECONV_NEWLINE_DECORATOR_MASK)) {
- fmode &= ~FMODE_TEXTMODE;
- *fmode_p = fmode;
+ fmode &= ~FMODE_TEXTMODE;
+ *fmode_p = fmode;
}
#endif
}
@@ -5842,28 +6782,28 @@ static void
extract_binmode(VALUE opthash, int *fmode)
{
if (!NIL_P(opthash)) {
- VALUE v;
- v = rb_hash_aref(opthash, sym_textmode);
- if (!NIL_P(v)) {
- if (*fmode & FMODE_TEXTMODE)
- rb_raise(rb_eArgError, "textmode specified twice");
- if (*fmode & FMODE_BINMODE)
- rb_raise(rb_eArgError, "both textmode and binmode specified");
- if (RTEST(v))
- *fmode |= FMODE_TEXTMODE;
- }
- v = rb_hash_aref(opthash, sym_binmode);
- if (!NIL_P(v)) {
- if (*fmode & FMODE_BINMODE)
- rb_raise(rb_eArgError, "binmode specified twice");
- if (*fmode & FMODE_TEXTMODE)
- rb_raise(rb_eArgError, "both textmode and binmode specified");
- if (RTEST(v))
- *fmode |= FMODE_BINMODE;
- }
-
- if ((*fmode & FMODE_BINMODE) && (*fmode & FMODE_TEXTMODE))
- rb_raise(rb_eArgError, "both textmode and binmode specified");
+ VALUE v;
+ v = rb_hash_aref(opthash, sym_textmode);
+ if (!NIL_P(v)) {
+ if (*fmode & FMODE_TEXTMODE)
+ rb_raise(rb_eArgError, "textmode specified twice");
+ if (*fmode & FMODE_BINMODE)
+ rb_raise(rb_eArgError, "both textmode and binmode specified");
+ if (RTEST(v))
+ *fmode |= FMODE_TEXTMODE;
+ }
+ v = rb_hash_aref(opthash, sym_binmode);
+ if (!NIL_P(v)) {
+ if (*fmode & FMODE_BINMODE)
+ rb_raise(rb_eArgError, "binmode specified twice");
+ if (*fmode & FMODE_TEXTMODE)
+ rb_raise(rb_eArgError, "both textmode and binmode specified");
+ if (RTEST(v))
+ *fmode |= FMODE_BINMODE;
+ }
+
+ if ((*fmode & FMODE_BINMODE) && (*fmode & FMODE_TEXTMODE))
+ rb_raise(rb_eArgError, "both textmode and binmode specified");
}
}
@@ -5906,78 +6846,90 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
has_enc = 1;
parse_mode_enc(p+1, rb_enc_get(vmode), &enc, &enc2, &fmode);
}
- else {
- rb_encoding *e;
+ else {
+ rb_encoding *e;
- e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
- rb_io_ext_int_to_encs(e, NULL, &enc, &enc2, fmode);
- }
+ e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
+ rb_io_ext_int_to_encs(e, NULL, &enc, &enc2, fmode);
+ }
}
if (NIL_P(opthash)) {
- ecflags = (fmode & FMODE_READABLE) ?
- MODE_BTMODE(ECONV_DEFAULT_NEWLINE_DECORATOR,
- 0, ECONV_UNIVERSAL_NEWLINE_DECORATOR) : 0;
+ ecflags = (fmode & FMODE_READABLE) ?
+ MODE_BTMODE(ECONV_DEFAULT_NEWLINE_DECORATOR,
+ 0, ECONV_UNIVERSAL_NEWLINE_DECORATOR) : 0;
#ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
- ecflags |= (fmode & FMODE_WRITABLE) ?
- MODE_BTMODE(TEXTMODE_NEWLINE_DECORATOR_ON_WRITE,
- 0, TEXTMODE_NEWLINE_DECORATOR_ON_WRITE) : 0;
+ ecflags |= (fmode & FMODE_WRITABLE) ?
+ MODE_BTMODE(TEXTMODE_NEWLINE_DECORATOR_ON_WRITE,
+ 0, TEXTMODE_NEWLINE_DECORATOR_ON_WRITE) : 0;
#endif
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecopts = Qnil;
+ if (fmode & FMODE_BINMODE) {
+#ifdef O_BINARY
+ oflags |= O_BINARY;
+#endif
+ if (!has_enc)
+ rb_io_ext_int_to_encs(rb_ascii8bit_encoding(), NULL, &enc, &enc2, fmode);
+ }
+#if DEFAULT_TEXTMODE
+ else if (NIL_P(vmode)) {
+ fmode |= DEFAULT_TEXTMODE;
+ }
+#endif
}
else {
- VALUE v;
- if (!has_vmode) {
- v = rb_hash_aref(opthash, sym_mode);
- if (!NIL_P(v)) {
- if (!NIL_P(vmode)) {
- rb_raise(rb_eArgError, "mode specified twice");
- }
- has_vmode = 1;
- vmode = v;
- goto vmode_handle;
- }
- }
- v = rb_hash_aref(opthash, sym_flags);
- if (!NIL_P(v)) {
- v = rb_to_int(v);
- oflags |= NUM2INT(v);
- vmode = INT2NUM(oflags);
- fmode = rb_io_oflags_fmode(oflags);
- }
- extract_binmode(opthash, &fmode);
- if (fmode & FMODE_BINMODE) {
+ VALUE v;
+ if (!has_vmode) {
+ v = rb_hash_aref(opthash, sym_mode);
+ if (!NIL_P(v)) {
+ if (!NIL_P(vmode)) {
+ rb_raise(rb_eArgError, "mode specified twice");
+ }
+ has_vmode = 1;
+ vmode = v;
+ goto vmode_handle;
+ }
+ }
+ v = rb_hash_aref(opthash, sym_flags);
+ if (!NIL_P(v)) {
+ v = rb_to_int(v);
+ oflags |= NUM2INT(v);
+ vmode = INT2NUM(oflags);
+ fmode = rb_io_oflags_fmode(oflags);
+ }
+ extract_binmode(opthash, &fmode);
+ if (fmode & FMODE_BINMODE) {
#ifdef O_BINARY
oflags |= O_BINARY;
#endif
- if (!has_enc)
- rb_io_ext_int_to_encs(rb_ascii8bit_encoding(), NULL, &enc, &enc2, fmode);
- }
+ if (!has_enc)
+ rb_io_ext_int_to_encs(rb_ascii8bit_encoding(), NULL, &enc, &enc2, fmode);
+ }
#if DEFAULT_TEXTMODE
- else if (NIL_P(vmode)) {
- fmode |= DEFAULT_TEXTMODE;
- }
-#endif
- v = rb_hash_aref(opthash, sym_perm);
- if (!NIL_P(v)) {
- if (vperm_p) {
- if (!NIL_P(*vperm_p)) {
- rb_raise(rb_eArgError, "perm specified twice");
- }
- *vperm_p = v;
- }
- else {
- /* perm no use, just ignore */
- }
- }
- ecflags = (fmode & FMODE_READABLE) ?
- MODE_BTMODE(ECONV_DEFAULT_NEWLINE_DECORATOR,
- 0, ECONV_UNIVERSAL_NEWLINE_DECORATOR) : 0;
+ else if (NIL_P(vmode)) {
+ fmode |= DEFAULT_TEXTMODE;
+ }
+#endif
+ v = rb_hash_aref(opthash, sym_perm);
+ if (!NIL_P(v)) {
+ if (vperm_p) {
+ if (!NIL_P(*vperm_p)) {
+ rb_raise(rb_eArgError, "perm specified twice");
+ }
+ *vperm_p = v;
+ }
+ else {
+ /* perm no use, just ignore */
+ }
+ }
+ ecflags = (fmode & FMODE_READABLE) ?
+ MODE_BTMODE(ECONV_DEFAULT_NEWLINE_DECORATOR,
+ 0, ECONV_UNIVERSAL_NEWLINE_DECORATOR) : 0;
#ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
- ecflags |= (fmode & FMODE_WRITABLE) ?
- MODE_BTMODE(TEXTMODE_NEWLINE_DECORATOR_ON_WRITE,
- 0, TEXTMODE_NEWLINE_DECORATOR_ON_WRITE) : 0;
+ ecflags |= (fmode & FMODE_WRITABLE) ?
+ MODE_BTMODE(TEXTMODE_NEWLINE_DECORATOR_ON_WRITE,
+ 0, TEXTMODE_NEWLINE_DECORATOR_ON_WRITE) : 0;
#endif
if (rb_io_extract_encoding_option(opthash, &enc, &enc2, &fmode)) {
@@ -5985,8 +6937,8 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
rb_raise(rb_eArgError, "encoding specified twice");
}
}
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
- ecflags = rb_econv_prepare_options(opthash, &ecopts, ecflags);
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ ecflags = rb_econv_prepare_options(opthash, &ecopts, ecflags);
}
validate_enc_binmode(&fmode, ecflags, enc, enc2);
@@ -6038,13 +6990,13 @@ rb_sysopen(VALUE fname, int oflags, mode_t perm)
fd = rb_sysopen_internal(&data);
if (fd < 0) {
- int e = errno;
- if (rb_gc_for_fd(e)) {
- fd = rb_sysopen_internal(&data);
- }
- if (fd < 0) {
- rb_syserr_fail_path(e, fname);
- }
+ int e = errno;
+ if (rb_gc_for_fd(e)) {
+ fd = rb_sysopen_internal(&data);
+ }
+ if (fd < 0) {
+ rb_syserr_fail_path(e, fname);
+ }
}
return fd;
}
@@ -6059,32 +7011,32 @@ rb_fdopen(int fd, const char *modestr)
#endif
file = fdopen(fd, modestr);
if (!file) {
- int e = errno;
+ int e = errno;
#if defined(__sun)
- if (e == 0) {
- rb_gc();
- errno = 0;
- file = fdopen(fd, modestr);
- }
- else
-#endif
- if (rb_gc_for_fd(e)) {
- file = fdopen(fd, modestr);
- }
- if (!file) {
+ if (e == 0) {
+ rb_gc();
+ errno = 0;
+ file = fdopen(fd, modestr);
+ }
+ else
+#endif
+ if (rb_gc_for_fd(e)) {
+ file = fdopen(fd, modestr);
+ }
+ if (!file) {
#ifdef _WIN32
- if (e == 0) e = EINVAL;
+ if (e == 0) e = EINVAL;
#elif defined(__sun)
- if (e == 0) e = EMFILE;
+ if (e == 0) e = EMFILE;
#endif
- rb_syserr_fail(e, 0);
- }
+ rb_syserr_fail(e, 0);
+ }
}
/* xxx: should be _IONBF? A buffer in FILE may have trouble. */
#ifdef USE_SETVBUF
if (setvbuf(file, NULL, _IOFBF, 0) != 0)
- rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
+ rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
#endif
return file;
}
@@ -6112,53 +7064,53 @@ io_strip_bom(VALUE io)
if (NIL_P(b1 = rb_io_getbyte(io))) return 0;
switch (b1) {
case INT2FIX(0xEF):
- if (NIL_P(b2 = rb_io_getbyte(io))) break;
- if (b2 == INT2FIX(0xBB) && !NIL_P(b3 = rb_io_getbyte(io))) {
- if (b3 == INT2FIX(0xBF)) {
- return rb_utf8_encindex();
- }
- rb_io_ungetbyte(io, b3);
- }
- rb_io_ungetbyte(io, b2);
- break;
+ if (NIL_P(b2 = rb_io_getbyte(io))) break;
+ if (b2 == INT2FIX(0xBB) && !NIL_P(b3 = rb_io_getbyte(io))) {
+ if (b3 == INT2FIX(0xBF)) {
+ return rb_utf8_encindex();
+ }
+ rb_io_ungetbyte(io, b3);
+ }
+ rb_io_ungetbyte(io, b2);
+ break;
case INT2FIX(0xFE):
- if (NIL_P(b2 = rb_io_getbyte(io))) break;
- if (b2 == INT2FIX(0xFF)) {
- return ENCINDEX_UTF_16BE;
- }
- rb_io_ungetbyte(io, b2);
- break;
+ if (NIL_P(b2 = rb_io_getbyte(io))) break;
+ if (b2 == INT2FIX(0xFF)) {
+ return ENCINDEX_UTF_16BE;
+ }
+ rb_io_ungetbyte(io, b2);
+ break;
case INT2FIX(0xFF):
- if (NIL_P(b2 = rb_io_getbyte(io))) break;
- if (b2 == INT2FIX(0xFE)) {
- b3 = rb_io_getbyte(io);
- if (b3 == INT2FIX(0) && !NIL_P(b4 = rb_io_getbyte(io))) {
- if (b4 == INT2FIX(0)) {
- return ENCINDEX_UTF_32LE;
- }
- rb_io_ungetbyte(io, b4);
- }
+ if (NIL_P(b2 = rb_io_getbyte(io))) break;
+ if (b2 == INT2FIX(0xFE)) {
+ b3 = rb_io_getbyte(io);
+ if (b3 == INT2FIX(0) && !NIL_P(b4 = rb_io_getbyte(io))) {
+ if (b4 == INT2FIX(0)) {
+ return ENCINDEX_UTF_32LE;
+ }
+ rb_io_ungetbyte(io, b4);
+ }
rb_io_ungetbyte(io, b3);
return ENCINDEX_UTF_16LE;
- }
- rb_io_ungetbyte(io, b2);
- break;
+ }
+ rb_io_ungetbyte(io, b2);
+ break;
case INT2FIX(0):
- if (NIL_P(b2 = rb_io_getbyte(io))) break;
- if (b2 == INT2FIX(0) && !NIL_P(b3 = rb_io_getbyte(io))) {
- if (b3 == INT2FIX(0xFE) && !NIL_P(b4 = rb_io_getbyte(io))) {
- if (b4 == INT2FIX(0xFF)) {
- return ENCINDEX_UTF_32BE;
- }
- rb_io_ungetbyte(io, b4);
- }
- rb_io_ungetbyte(io, b3);
- }
- rb_io_ungetbyte(io, b2);
- break;
+ if (NIL_P(b2 = rb_io_getbyte(io))) break;
+ if (b2 == INT2FIX(0) && !NIL_P(b3 = rb_io_getbyte(io))) {
+ if (b3 == INT2FIX(0xFE) && !NIL_P(b4 = rb_io_getbyte(io))) {
+ if (b4 == INT2FIX(0xFF)) {
+ return ENCINDEX_UTF_32BE;
+ }
+ rb_io_ungetbyte(io, b4);
+ }
+ rb_io_ungetbyte(io, b3);
+ }
+ rb_io_ungetbyte(io, b2);
+ break;
}
rb_io_ungetbyte(io, b1);
return 0;
@@ -6178,27 +7130,27 @@ io_set_encoding_by_bom(VALUE io)
rb_io_internal_encoding(io), Qnil);
}
else {
- fptr->encs.enc2 = NULL;
+ fptr->encs.enc2 = NULL;
}
return extenc;
}
static VALUE
rb_file_open_generic(VALUE io, VALUE filename, int oflags, int fmode,
- const convconfig_t *convconfig, mode_t perm)
+ const convconfig_t *convconfig, mode_t perm)
{
VALUE pathv;
rb_io_t *fptr;
convconfig_t cc;
if (!convconfig) {
- /* Set to default encodings */
- rb_io_ext_int_to_encs(NULL, NULL, &cc.enc, &cc.enc2, fmode);
+ /* Set to default encodings */
+ rb_io_ext_int_to_encs(NULL, NULL, &cc.enc, &cc.enc2, fmode);
cc.ecflags = 0;
cc.ecopts = Qnil;
convconfig = &cc;
}
validate_enc_binmode(&fmode, convconfig->ecflags,
- convconfig->enc, convconfig->enc2);
+ convconfig->enc, convconfig->enc2);
MakeOpenFile(io, fptr);
fptr->mode = fmode;
@@ -6227,16 +7179,16 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *modestr)
if (p) {
parse_mode_enc(p+1, rb_usascii_encoding(),
- &convconfig.enc, &convconfig.enc2, &fmode);
+ &convconfig.enc, &convconfig.enc2, &fmode);
convconfig.ecflags = 0;
convconfig.ecopts = Qnil;
}
else {
- rb_encoding *e;
- /* Set to default encodings */
+ rb_encoding *e;
+ /* Set to default encodings */
- e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
- rb_io_ext_int_to_encs(e, NULL, &convconfig.enc, &convconfig.enc2, fmode);
+ e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
+ rb_io_ext_int_to_encs(e, NULL, &convconfig.enc, &convconfig.enc2, fmode);
convconfig.ecflags = 0;
convconfig.ecopts = Qnil;
}
@@ -6285,12 +7237,12 @@ pipe_del_fptr(rb_io_t *fptr)
struct pipe_list *tmp;
while ((tmp = *prev) != 0) {
- if (tmp->fptr == fptr) {
- *prev = tmp->next;
- free(tmp);
- return;
- }
- prev = &tmp->next;
+ if (tmp->fptr == fptr) {
+ *prev = tmp->next;
+ free(tmp);
+ return;
+ }
+ prev = &tmp->next;
}
}
@@ -6302,9 +7254,9 @@ pipe_atexit(void)
struct pipe_list *tmp;
while (list) {
- tmp = list->next;
- rb_io_fptr_finalize(list->fptr);
- list = tmp;
+ tmp = list->next;
+ rb_io_fptr_finalize(list->fptr);
+ list = tmp;
}
}
#endif
@@ -6315,7 +7267,7 @@ pipe_finalize(rb_io_t *fptr, int noraise)
#if !defined(HAVE_WORKING_FORK) && !defined(_WIN32)
int status = 0;
if (fptr->stdio_file) {
- status = pclose(fptr->stdio_file);
+ status = pclose(fptr->stdio_file);
}
fptr->fd = -1;
fptr->stdio_file = 0;
@@ -6340,14 +7292,14 @@ fptr_copy_finalizer(rb_io_t *fptr, const rb_io_t *orig)
#if defined(__CYGWIN__) || !defined(HAVE_WORKING_FORK)
if (old_finalize != pipe_finalize) {
- struct pipe_list *list;
- for (list = pipe_list; list; list = list->next) {
- if (list->fptr == fptr) break;
- }
- if (!list) pipe_add_fptr(fptr);
+ struct pipe_list *list;
+ for (list = pipe_list; list; list = list->next) {
+ if (list->fptr == fptr) break;
+ }
+ if (!list) pipe_add_fptr(fptr);
}
else {
- pipe_del_fptr(fptr);
+ pipe_del_fptr(fptr);
}
#endif
}
@@ -6399,6 +7351,7 @@ struct popen_arg {
#endif
#ifdef HAVE_WORKING_FORK
+# ifndef __EMSCRIPTEN__
static void
popen_redirect(struct popen_arg *p)
{
@@ -6429,6 +7382,7 @@ popen_redirect(struct popen_arg *p)
}
}
}
+# endif
#if defined(__linux__)
/* Linux /proc/self/status contains a line: "FDSize:\t<nnn>\n"
@@ -6496,19 +7450,20 @@ rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
if (!NIL_P(noclose_fds) &&
RTEST(rb_hash_lookup(noclose_fds, INT2FIX(fd)))) /* async-signal-safe */
continue;
- ret = fcntl(fd, F_GETFD); /* async-signal-safe */
- if (ret != -1 && !(ret & FD_CLOEXEC)) {
+ ret = fcntl(fd, F_GETFD); /* async-signal-safe */
+ if (ret != -1 && !(ret & FD_CLOEXEC)) {
fcntl(fd, F_SETFD, ret|FD_CLOEXEC); /* async-signal-safe */
}
# define CONTIGUOUS_CLOSED_FDS 20
if (ret != -1) {
- if (max < fd + CONTIGUOUS_CLOSED_FDS)
- max = fd + CONTIGUOUS_CLOSED_FDS;
- }
+ if (max < fd + CONTIGUOUS_CLOSED_FDS)
+ max = fd + CONTIGUOUS_CLOSED_FDS;
+ }
}
#endif
}
+# ifndef __EMSCRIPTEN__
static int
popen_exec(void *pp, char *errmsg, size_t errmsg_len)
{
@@ -6516,9 +7471,10 @@ popen_exec(void *pp, char *errmsg, size_t errmsg_len)
return rb_exec_async_signal_safe(p->eargp, errmsg, errmsg_len);
}
+# endif
#endif
-#if defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)
+#if (defined(HAVE_WORKING_FORK) || defined(HAVE_SPAWNV)) && !defined __EMSCRIPTEN__
static VALUE
rb_execarg_fixup_v(VALUE execarg_obj)
{
@@ -6529,9 +7485,10 @@ rb_execarg_fixup_v(VALUE execarg_obj)
char *rb_execarg_commandline(const struct rb_execarg *eargp, VALUE *prog);
#endif
+#ifndef __EMSCRIPTEN__
static VALUE
pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
- const convconfig_t *convconfig)
+ const convconfig_t *convconfig)
{
struct rb_execarg *eargp = NIL_P(execarg_obj) ? NULL : rb_execarg_get(execarg_obj);
VALUE prog = eargp ? (eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name) : Qfalse ;
@@ -6552,12 +7509,12 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
#if defined(HAVE_SPAWNV)
# if defined(HAVE_SPAWNVE)
# define DO_SPAWN(cmd, args, envp) ((args) ? \
- spawnve(P_NOWAIT, (cmd), (args), (envp)) : \
- spawne(P_NOWAIT, (cmd), (envp)))
+ spawnve(P_NOWAIT, (cmd), (args), (envp)) : \
+ spawne(P_NOWAIT, (cmd), (envp)))
# else
# define DO_SPAWN(cmd, args, envp) ((args) ? \
- spawnv(P_NOWAIT, (cmd), (args)) : \
- spawn(P_NOWAIT, (cmd)))
+ spawnv(P_NOWAIT, (cmd), (args)) : \
+ spawn(P_NOWAIT, (cmd)))
# endif
# if !defined(HAVE_WORKING_FORK)
char **args = NULL;
@@ -6604,19 +7561,19 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
rb_execarg_addopt(execarg_obj, INT2FIX(0), INT2FIX(arg.write_pair[0]));
rb_execarg_addopt(execarg_obj, INT2FIX(1), INT2FIX(arg.pair[1]));
}
- break;
+ break;
case FMODE_READABLE:
if (rb_pipe(arg.pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
rb_execarg_addopt(execarg_obj, INT2FIX(1), INT2FIX(arg.pair[1]));
- break;
+ break;
case FMODE_WRITABLE:
if (rb_pipe(arg.pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
rb_execarg_addopt(execarg_obj, INT2FIX(0), INT2FIX(arg.pair[0]));
- break;
+ break;
default:
rb_sys_fail_str(prog);
}
@@ -6632,60 +7589,59 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
}
# if defined(HAVE_WORKING_FORK)
- pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.eargp->redirect_fds, errmsg, sizeof(errmsg));
+ pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.eargp->redirect_fds, errmsg, sizeof(errmsg));
# else
- rb_execarg_run_options(eargp, sargp, NULL, 0);
+ rb_execarg_run_options(eargp, sargp, NULL, 0);
# if defined(HAVE_SPAWNVE)
- if (eargp->envp_str) envp = (char **)RSTRING_PTR(eargp->envp_str);
+ if (eargp->envp_str) envp = (char **)RSTRING_PTR(eargp->envp_str);
# endif
while ((pid = DO_SPAWN(cmd, args, envp)) < 0) {
- /* exec failed */
- switch (e = errno) {
- case EAGAIN:
-# if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ /* exec failed */
+ switch (e = errno) {
+ case EAGAIN:
+# if EWOULDBLOCK != EAGAIN
+ case EWOULDBLOCK:
# endif
- rb_thread_sleep(1);
- continue;
- }
- break;
- }
- if (eargp)
- rb_execarg_run_options(sargp, NULL, NULL, 0);
+ rb_thread_sleep(1);
+ continue;
+ }
+ break;
+ }
+ if (eargp)
+ rb_execarg_run_options(sargp, NULL, NULL, 0);
# endif
rb_execarg_parent_end(execarg_obj);
}
else {
# if defined(HAVE_WORKING_FORK)
- pid = rb_fork_ruby(&status);
- if (pid == 0) { /* child */
- rb_thread_atfork();
- popen_redirect(&arg);
- rb_io_synchronized(RFILE(orig_stdout)->fptr);
- rb_io_synchronized(RFILE(orig_stderr)->fptr);
- return Qnil;
- }
+ pid = rb_call_proc__fork();
+ if (pid == 0) { /* child */
+ popen_redirect(&arg);
+ rb_io_synchronized(RFILE(orig_stdout)->fptr);
+ rb_io_synchronized(RFILE(orig_stderr)->fptr);
+ return Qnil;
+ }
# else
- rb_notimplement();
+ rb_notimplement();
# endif
}
/* parent */
if (pid < 0) {
# if defined(HAVE_WORKING_FORK)
- e = errno;
+ e = errno;
# endif
- close(arg.pair[0]);
- close(arg.pair[1]);
+ close(arg.pair[0]);
+ close(arg.pair[1]);
if ((fmode & (FMODE_READABLE|FMODE_WRITABLE)) == (FMODE_READABLE|FMODE_WRITABLE)) {
close(arg.write_pair[0]);
close(arg.write_pair[1]);
}
# if defined(HAVE_WORKING_FORK)
if (errmsg[0])
- rb_syserr_fail(e, errmsg);
+ rb_syserr_fail(e, errmsg);
# endif
- rb_syserr_fail_str(e, prog);
+ rb_syserr_fail_str(e, prog);
}
if ((fmode & FMODE_READABLE) && (fmode & FMODE_WRITABLE)) {
close(arg.pair[1]);
@@ -6704,14 +7660,14 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
#else
cmd = rb_execarg_commandline(eargp, &prog);
if (!NIL_P(execarg_obj)) {
- rb_execarg_parent_start(execarg_obj);
- rb_execarg_run_options(eargp, sargp, NULL, 0);
+ rb_execarg_parent_start(execarg_obj);
+ rb_execarg_run_options(eargp, sargp, NULL, 0);
}
fp = popen(cmd, modestr);
e = errno;
if (eargp) {
rb_execarg_parent_end(execarg_obj);
- rb_execarg_run_options(sargp, NULL, NULL, 0);
+ rb_execarg_run_options(sargp, NULL, NULL, 0);
}
if (!fp) rb_syserr_fail_path(e, prog);
fd = fileno(fp);
@@ -6724,20 +7680,20 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
fptr->mode = fmode | FMODE_SYNC|FMODE_DUPLEX;
if (convconfig) {
fptr->encs = *convconfig;
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
- if (fptr->encs.ecflags & ECONV_DEFAULT_NEWLINE_DECORATOR) {
- fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
- }
+#if RUBY_CRLF_ENVIRONMENT
+ if (fptr->encs.ecflags & ECONV_DEFAULT_NEWLINE_DECORATOR) {
+ fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
+ }
#endif
}
else {
- if (NEED_NEWLINE_DECORATOR_ON_READ(fptr)) {
- fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
- }
+ if (NEED_NEWLINE_DECORATOR_ON_READ(fptr)) {
+ fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
+ }
#ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
- if (NEED_NEWLINE_DECORATOR_ON_WRITE(fptr)) {
- fptr->encs.ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
- }
+ if (NEED_NEWLINE_DECORATOR_ON_WRITE(fptr)) {
+ fptr->encs.ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
+ }
#endif
}
fptr->pid = pid;
@@ -6758,16 +7714,24 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
#endif
return port;
}
+#else
+static VALUE
+pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
+ const convconfig_t *convconfig)
+{
+ rb_raise(rb_eNotImpError, "popen() is not available");
+}
+#endif
static int
is_popen_fork(VALUE prog)
{
if (RSTRING_LEN(prog) == 1 && RSTRING_PTR(prog)[0] == '-') {
#if !defined(HAVE_WORKING_FORK)
- rb_raise(rb_eNotImpError,
- "fork() function is unimplemented on this machine");
+ rb_raise(rb_eNotImpError,
+ "fork() function is unimplemented on this machine");
#else
- return TRUE;
+ return TRUE;
#endif
}
return FALSE;
@@ -6775,7 +7739,7 @@ is_popen_fork(VALUE prog)
static VALUE
pipe_open_s(VALUE prog, const char *modestr, int fmode,
- const convconfig_t *convconfig)
+ const convconfig_t *convconfig)
{
int argc = 1;
VALUE *argv = &prog;
@@ -6791,74 +7755,145 @@ pipe_close(VALUE io)
{
rb_io_t *fptr = io_close_fptr(io);
if (fptr) {
- fptr_waitpid(fptr, rb_thread_to_be_killed(rb_thread_current()));
+ fptr_waitpid(fptr, rb_thread_to_be_killed(rb_thread_current()));
}
return Qnil;
}
+static VALUE popen_finish(VALUE port, VALUE klass);
+
/*
* call-seq:
- * IO.popen([env,] cmd, mode="r" [, opt]) -> io
- * IO.popen([env,] cmd, mode="r" [, opt]) {|io| block } -> obj
+ * IO.popen(env = {}, cmd, mode = 'r', **opts) -> io
+ * IO.popen(env = {}, cmd, mode = 'r', **opts) {|io| ... } -> object
*
- * Runs the specified command as a subprocess; the subprocess's
- * standard input and output will be connected to the returned
- * IO object.
+ * Executes the given command +cmd+ as a subprocess
+ * whose $stdin and $stdout are connected to a new stream +io+.
*
- * The PID of the started process can be obtained by IO#pid method.
+ * This method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * _cmd_ is a string or an array as follows.
+ * If no block is given, returns the new stream,
+ * which depending on given +mode+ may be open for reading, writing, or both.
+ * The stream should be explicitly closed (eventually) to avoid resource leaks.
*
- * cmd:
- * "-" : fork
- * commandline : command line string which is passed to a shell
- * [env, cmdname, arg1, ..., opts] : command name and zero or more arguments (no shell)
- * [env, [cmdname, argv0], arg1, ..., opts] : command name, argv[0] and zero or more arguments (no shell)
- * (env and opts are optional.)
+ * If a block is given, the stream is passed to the block
+ * (again, open for reading, writing, or both);
+ * when the block exits, the stream is closed,
+ * and the block's value is assigned to global variable <tt>$?</tt> and returned.
*
- * If _cmd_ is a +String+ ``<code>-</code>'',
- * then a new instance of Ruby is started as the subprocess.
+ * Optional argument +mode+ may be any valid \IO mode.
+ * See {Access Modes}[rdoc-ref:File@Access+Modes].
*
- * If <i>cmd</i> is an +Array+ of +String+,
- * then it will be used as the subprocess's +argv+ bypassing a shell.
- * The array can contain a hash at first for environments and
- * a hash at last for options similar to #spawn.
+ * Required argument +cmd+ determines which of the following occurs:
*
- * The default mode for the new file object is ``r'',
- * but <i>mode</i> may be set to any of the modes listed in the description for class IO.
- * The last argument <i>opt</i> qualifies <i>mode</i>.
+ * - The process forks.
+ * - A specified program runs in a shell.
+ * - A specified program runs with specified arguments.
+ * - A specified program runs with specified arguments and a specified +argv0+.
*
- * # set IO encoding
- * IO.popen("nkf -e filename", :external_encoding=>"EUC-JP") {|nkf_io|
- * euc_jp_string = nkf_io.read
- * }
+ * Each of these is detailed below.
*
- * # merge standard output and standard error using
- * # spawn option. See the document of Kernel.spawn.
- * IO.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
- * ls_result_with_error = ls_io.read
- * }
+ * The optional hash argument +env+ specifies name/value pairs that are to be added
+ * to the environment variables for the subprocess:
*
- * # spawn options can be mixed with IO options
- * IO.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
- * ls_result_with_error = ls_io.read
- * }
+ * IO.popen({'FOO' => 'bar'}, 'ruby', 'r+') do |pipe|
+ * pipe.puts 'puts ENV["FOO"]'
+ * pipe.close_write
+ * pipe.gets
+ * end => "bar\n"
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ * - Options for Kernel#spawn.
+ *
+ * <b>Forked \Process</b>
+ *
+ * When argument +cmd+ is the 1-character string <tt>'-'</tt>, causes the process to fork:
+ * IO.popen('-') do |pipe|
+ * if pipe
+ * $stderr.puts "In parent, child pid is #{pipe.pid}\n"
+ * else
+ * $stderr.puts "In child, pid is #{$$}\n"
+ * end
+ * end
+ *
+ * Output:
+ *
+ * In parent, child pid is 26253
+ * In child, pid is 26253
+ *
+ * Note that this is not supported on all platforms.
+ *
+ * <b>Shell Subprocess</b>
+ *
+ * When argument +cmd+ is a single string (but not <tt>'-'</tt>),
+ * the program named +cmd+ is run as a shell command:
+ *
+ * IO.popen('uname') do |pipe|
+ * pipe.readlines
+ * end
+ *
+ * Output:
+ *
+ * ["Linux\n"]
+ *
+ * Another example:
+ *
+ * IO.popen('/bin/sh', 'r+') do |pipe|
+ * pipe.puts('ls')
+ * pipe.close_write
+ * $stderr.puts pipe.readlines.size
+ * end
*
- * Raises exceptions which IO.pipe and Kernel.spawn raise.
+ * Output:
*
- * If a block is given, Ruby will run the command as a child connected
- * to Ruby with a pipe. Ruby's end of the pipe will be passed as a
- * parameter to the block.
- * At the end of block, Ruby closes the pipe and sets <code>$?</code>.
- * In this case IO.popen returns the value of the block.
+ * 213
*
- * If a block is given with a _cmd_ of ``<code>-</code>'',
- * the block will be run in two separate processes: once in the parent,
- * and once in a child. The parent process will be passed the pipe
- * object as a parameter to the block, the child version of the block
- * will be passed +nil+, and the child's standard in and
- * standard out will be connected to the parent through the pipe. Not
- * available on all platforms.
+ * <b>Program Subprocess</b>
+ *
+ * When argument +cmd+ is an array of strings,
+ * the program named <tt>cmd[0]</tt> is run with all elements of +cmd+ as its arguments:
+ *
+ * IO.popen(['du', '..', '.']) do |pipe|
+ * $stderr.puts pipe.readlines.size
+ * end
+ *
+ * Output:
+ *
+ * 1111
+ *
+ * <b>Program Subprocess with <tt>argv0</tt></b>
+ *
+ * When argument +cmd+ is an array whose first element is a 2-element string array
+ * and whose remaining elements (if any) are strings:
+ *
+ * - <tt>cmd[0][0]</tt> (the first string in the nested array) is the name of a program that is run.
+ * - <tt>cmd[0][1]</tt> (the second string in the nested array) is set as the program's <tt>argv[0]</tt>.
+ * - <tt>cmd[1..-1]</tt> (the strings in the outer array) are the program's arguments.
+ *
+ * Example (sets <tt>$0</tt> to 'foo'):
+ *
+ * IO.popen([['/bin/sh', 'foo'], '-c', 'echo $0']).read # => "foo\n"
+ *
+ * <b>Some Special Examples</b>
+ *
+ * # Set IO encoding.
+ * IO.popen("nkf -e filename", :external_encoding=>"EUC-JP") {|nkf_io|
+ * euc_jp_string = nkf_io.read
+ * }
+ *
+ * # Merge standard output and standard error using Kernel#spawn option. See Kernel#spawn.
+ * IO.popen(["ls", "/", :err=>[:child, :out]]) do |io|
+ * ls_result_with_error = io.read
+ * end
+ *
+ * # Use mixture of spawn options and IO options.
+ * IO.popen(["ls", "/"], :err=>[:child, :out]) do |io|
+ * ls_result_with_error = io.read
+ * end
*
* f = IO.popen("uname")
* p f.readlines
@@ -6871,7 +7906,7 @@ pipe_close(VALUE io)
* f.puts "bar"; f.close_write; puts f.gets
* }
*
- * <em>produces:</em>
+ * Output (from last section):
*
* ["Linux\n"]
* Parent is 21346
@@ -6880,71 +7915,86 @@ pipe_close(VALUE io)
* 21352 is here, f is nil
* #<Process::Status: pid 21352 exit 0>
* <foo>bar;zot;
+ *
+ * Raises exceptions that IO.pipe and Kernel.spawn raise.
+ *
*/
static VALUE
rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
{
- const char *modestr;
- VALUE pname, pmode = Qnil, port, tmp, opt = Qnil, env = Qnil, execarg_obj = Qnil;
- int oflags, fmode;
- convconfig_t convconfig;
+ VALUE pname, pmode = Qnil, opt = Qnil, env = Qnil;
if (argc > 1 && !NIL_P(opt = rb_check_hash_type(argv[argc-1]))) --argc;
if (argc > 1 && !NIL_P(env = rb_check_hash_type(argv[0]))) --argc, ++argv;
switch (argc) {
case 2:
- pmode = argv[1];
+ pmode = argv[1];
case 1:
- pname = argv[0];
- break;
+ pname = argv[0];
+ break;
default:
- {
- int ex = !NIL_P(opt);
- rb_error_arity(argc + ex, 1 + ex, 2 + ex);
- }
+ {
+ int ex = !NIL_P(opt);
+ rb_error_arity(argc + ex, 1 + ex, 2 + ex);
+ }
}
+ return popen_finish(rb_io_popen(pname, pmode, env, opt), klass);
+}
+
+VALUE
+rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt)
+{
+ const char *modestr;
+ VALUE tmp, execarg_obj = Qnil;
+ int oflags, fmode;
+ convconfig_t convconfig;
tmp = rb_check_array_type(pname);
if (!NIL_P(tmp)) {
- long len = RARRAY_LEN(tmp);
+ long len = RARRAY_LEN(tmp);
#if SIZEOF_LONG > SIZEOF_INT
- if (len > INT_MAX) {
- rb_raise(rb_eArgError, "too many arguments");
- }
+ if (len > INT_MAX) {
+ rb_raise(rb_eArgError, "too many arguments");
+ }
#endif
execarg_obj = rb_execarg_new((int)len, RARRAY_CONST_PTR(tmp), FALSE, FALSE);
- RB_GC_GUARD(tmp);
+ RB_GC_GUARD(tmp);
}
else {
- SafeStringValue(pname);
- execarg_obj = Qnil;
- if (!is_popen_fork(pname))
+ SafeStringValue(pname);
+ execarg_obj = Qnil;
+ if (!is_popen_fork(pname))
execarg_obj = rb_execarg_new(1, &pname, TRUE, FALSE);
}
if (!NIL_P(execarg_obj)) {
- if (!NIL_P(opt))
- opt = rb_execarg_extract_options(execarg_obj, opt);
- if (!NIL_P(env))
- rb_execarg_setenv(execarg_obj, env);
+ if (!NIL_P(opt))
+ opt = rb_execarg_extract_options(execarg_obj, opt);
+ if (!NIL_P(env))
+ rb_execarg_setenv(execarg_obj, env);
}
rb_io_extract_modeenc(&pmode, 0, opt, &oflags, &fmode, &convconfig);
modestr = rb_io_oflags_modestr(oflags);
- port = pipe_open(execarg_obj, modestr, fmode, &convconfig);
+ return pipe_open(execarg_obj, modestr, fmode, &convconfig);
+}
+
+static VALUE
+popen_finish(VALUE port, VALUE klass)
+{
if (NIL_P(port)) {
- /* child */
- if (rb_block_given_p()) {
- rb_yield(Qnil);
- rb_io_flush(rb_stdout);
- rb_io_flush(rb_stderr);
- _exit(0);
- }
- return Qnil;
+ /* child */
+ if (rb_block_given_p()) {
+ rb_protect(rb_yield, Qnil, NULL);
+ rb_io_flush(rb_ractor_stdout());
+ rb_io_flush(rb_ractor_stderr());
+ _exit(0);
+ }
+ return Qnil;
}
RBASIC_SET_CLASS(port, klass);
if (rb_block_given_p()) {
- return rb_ensure(rb_yield, port, pipe_close, port);
+ return rb_ensure(rb_yield, port, pipe_close, port);
}
return port;
}
@@ -6985,41 +8035,36 @@ rb_open_file(int argc, const VALUE *argv, VALUE io)
return io;
}
-
/*
* Document-method: File::open
*
* call-seq:
- * File.open(filename, mode="r" [, opt]) -> file
- * File.open(filename [, mode [, perm]] [, opt]) -> file
- * File.open(filename, mode="r" [, opt]) {|file| block } -> obj
- * File.open(filename [, mode [, perm]] [, opt]) {|file| block } -> obj
+ * File.open(path, mode = 'r', perm = 0666, **opts) -> file
+ * File.open(path, mode = 'r', perm = 0666, **opts) {|f| ... } -> object
+ *
+ * Creates a new \File object, via File.new with the given arguments.
*
- * With no associated block, File.open is a synonym for
- * File.new. If the optional code block is given, it will
- * be passed the opened +file+ as an argument and the File object will
- * automatically be closed when the block terminates. The value of the block
- * will be returned from File.open.
+ * With no block given, returns the \File object.
*
- * If a file is being created, its initial permissions may be set using the
- * +perm+ parameter. See File.new for further discussion.
+ * With a block given, calls the block with the \File object
+ * and returns the block's value.
*
- * See IO.new for a description of the +mode+ and +opt+ parameters.
*/
/*
* Document-method: IO::open
*
* call-seq:
- * IO.open(fd, mode="r" [, opt]) -> io
- * IO.open(fd, mode="r" [, opt]) {|io| block } -> obj
+ * IO.open(fd, mode = 'r', **opts) -> io
+ * IO.open(fd, mode = 'r', **opts) {|io| ... } -> object
*
- * With no associated block, IO.open is a synonym for IO.new. If
- * the optional code block is given, it will be passed +io+ as an argument,
- * and the IO object will automatically be closed when the block terminates.
- * In this instance, IO.open returns the value of the block.
+ * Creates a new \IO object, via IO.new with the given arguments.
+ *
+ * With no block given, returns the \IO object.
+ *
+ * With a block given, calls the block with the \IO object
+ * and returns the block's value.
*
- * See IO.new for a description of the +fd+, +mode+ and +opt+ parameters.
*/
static VALUE
@@ -7028,7 +8073,7 @@ rb_io_s_open(int argc, VALUE *argv, VALUE klass)
VALUE io = rb_class_new_instance_kw(argc, argv, klass, RB_PASS_CALLED_KEYWORDS);
if (rb_block_given_p()) {
- return rb_ensure(rb_yield, io, io_close, io);
+ return rb_ensure(rb_yield, io, io_close, io);
}
return io;
@@ -7036,12 +8081,20 @@ rb_io_s_open(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * IO.sysopen(path, [mode, [perm]]) -> integer
+ * IO.sysopen(path, mode = 'r', perm = 0666) -> integer
+ *
+ * Opens the file at the given path with the given mode and permissions;
+ * returns the integer file descriptor.
+ *
+ * If the file is to be readable, it must exist;
+ * if the file is to be writable and does not exist,
+ * it is created with the given permissions:
+ *
+ * File.write('t.tmp', '') # => 0
+ * IO.sysopen('t.tmp') # => 8
+ * IO.sysopen('t.tmp', 'w') # => 9
*
- * Opens the given path, returning the underlying file descriptor as a
- * Integer.
*
- * IO.sysopen("testfile") #=> 3
*/
static VALUE
@@ -7060,8 +8113,8 @@ rb_io_s_sysopen(int argc, VALUE *argv, VALUE _)
else if (!NIL_P(intmode = rb_check_to_integer(vmode, "to_int")))
oflags = NUM2INT(intmode);
else {
- SafeStringValue(vmode);
- oflags = rb_io_modestr_oflags(StringValueCStr(vmode));
+ SafeStringValue(vmode);
+ oflags = rb_io_modestr_oflags(StringValueCStr(vmode));
}
if (NIL_P(vperm)) perm = 0666;
else perm = NUM2MODET(vperm);
@@ -7088,100 +8141,100 @@ check_pipe_command(VALUE filename_or_command)
/*
* call-seq:
- * open(path [, mode [, perm]] [, opt]) -> io or nil
- * open(path [, mode [, perm]] [, opt]) {|io| block } -> obj
+ * open(path, mode = 'r', perm = 0666, **opts) -> io or nil
+ * open(path, mode = 'r', perm = 0666, **opts) {|io| ... } -> obj
*
* Creates an IO object connected to the given stream, file, or subprocess.
*
- * If +path+ does not start with a pipe character (<code>|</code>), treat it
- * as the name of a file to open using the specified mode (defaulting to
- * "r").
+ * Required string argument +path+ determines which of the following occurs:
*
- * The +mode+ is either a string or an integer. If it is an integer, it
- * must be bitwise-or of open(2) flags, such as File::RDWR or File::EXCL. If
- * it is a string, it is either "fmode", "fmode:ext_enc", or
- * "fmode:ext_enc:int_enc".
+ * - The file at the specified +path+ is opened.
+ * - The process forks.
+ * - A subprocess is created.
*
- * See the documentation of IO.new for full documentation of the +mode+ string
- * directives.
+ * Each of these is detailed below.
*
- * If a file is being created, its initial permissions may be set using the
- * +perm+ parameter. See File.new and the open(2) and chmod(2) man pages for
- * a description of permissions.
+ * <b>File Opened</b>
+
+ * If +path+ does _not_ start with a pipe character (<tt>'|'</tt>),
+ * a file stream is opened with <tt>File.open(path, mode, perm, **opts)</tt>.
*
- * If a block is specified, it will be invoked with the IO object as a
- * parameter, and the IO will be automatically closed when the block
- * terminates. The call returns the value of the block.
+ * With no block given, file stream is returned:
*
- * If +path+ starts with a pipe character (<code>"|"</code>), a subprocess is
- * created, connected to the caller by a pair of pipes. The returned IO
- * object may be used to write to the standard input and read from the
- * standard output of this subprocess.
+ * open('t.txt') # => #<File:t.txt>
*
- * If the command following the pipe is a single minus sign
- * (<code>"|-"</code>), Ruby forks, and this subprocess is connected to the
- * parent. If the command is not <code>"-"</code>, the subprocess runs the
- * command.
+ * With a block given, calls the block with the open file stream,
+ * then closes the stream:
*
- * When the subprocess is Ruby (opened via <code>"|-"</code>), the +open+
- * call returns +nil+. If a block is associated with the open call, that
- * block will run twice --- once in the parent and once in the child.
+ * open('t.txt') {|f| p f } # => #<File:t.txt (closed)>
*
- * The block parameter will be an IO object in the parent and +nil+ in the
- * child. The parent's +IO+ object will be connected to the child's $stdin
- * and $stdout. The subprocess will be terminated at the end of the block.
+ * Output:
*
- * === Examples
+ * #<File:t.txt>
*
- * Reading from "testfile":
+ * See File.open for details.
*
- * open("testfile") do |f|
- * print f.gets
- * end
+ * <b>Process Forked</b>
*
- * Produces:
+ * If +path+ is the 2-character string <tt>'|-'</tt>, the process forks
+ * and the child process is connected to the parent.
*
- * This is line one
+ * With no block given:
+ *
+ * io = open('|-')
+ * if io
+ * $stderr.puts "In parent, child pid is #{io.pid}."
+ * else
+ * $stderr.puts "In child, pid is #{$$}."
+ * end
+ *
+ * Output:
*
- * Open a subprocess and read its output:
+ * In parent, child pid is 27903.
+ * In child, pid is 27903.
*
- * cmd = open("|date")
- * print cmd.gets
- * cmd.close
+ * With a block given:
*
- * Produces:
+ * open('|-') do |io|
+ * if io
+ * $stderr.puts "In parent, child pid is #{io.pid}."
+ * else
+ * $stderr.puts "In child, pid is #{$$}."
+ * end
+ * end
*
- * Wed Apr 9 08:56:31 CDT 2003
+ * Output:
*
- * Open a subprocess running the same Ruby program:
+ * In parent, child pid is 28427.
+ * In child, pid is 28427.
*
- * f = open("|-", "w+")
- * if f.nil?
- * puts "in Child"
- * exit
- * else
- * puts "Got: #{f.gets}"
- * end
+ * <b>Subprocess Created</b>
*
- * Produces:
+ * If +path+ is <tt>'|command'</tt> (<tt>'command' != '-'</tt>),
+ * a new subprocess runs the command; its open stream is returned.
+ * Note that the command may be processed by shell if it contains
+ * shell metacharacters.
*
- * Got: in Child
+ * With no block given:
*
- * Open a subprocess using a block to receive the IO object:
+ * io = open('|echo "Hi!"') # => #<IO:fd 12>
+ * print io.gets
+ * io.close
*
- * open "|-" do |f|
- * if f then
- * # parent process
- * puts "Got: #{f.gets}"
- * else
- * # child process
- * puts "in Child"
- * end
- * end
+ * Output:
+ *
+ * "Hi!"
+ *
+ * With a block given, calls the block with the stream, then closes the stream:
+ *
+ * open('|echo "Hi!"') do |io|
+ * print io.gets
+ * end
*
- * Produces:
+ * Output:
+ *
+ * "Hi!"
*
- * Got: in Child
*/
static VALUE
@@ -7191,32 +8244,32 @@ rb_f_open(int argc, VALUE *argv, VALUE _)
int redirect = FALSE;
if (argc >= 1) {
- CONST_ID(to_open, "to_open");
- if (rb_respond_to(argv[0], to_open)) {
- redirect = TRUE;
- }
- else {
- VALUE tmp = argv[0];
- FilePathValue(tmp);
- if (NIL_P(tmp)) {
- redirect = TRUE;
- }
- else {
+ CONST_ID(to_open, "to_open");
+ if (rb_respond_to(argv[0], to_open)) {
+ redirect = TRUE;
+ }
+ else {
+ VALUE tmp = argv[0];
+ FilePathValue(tmp);
+ if (NIL_P(tmp)) {
+ redirect = TRUE;
+ }
+ else {
VALUE cmd = check_pipe_command(tmp);
if (!NIL_P(cmd)) {
- argv[0] = cmd;
- return rb_io_s_popen(argc, argv, rb_cIO);
- }
- }
- }
+ argv[0] = cmd;
+ return rb_io_s_popen(argc, argv, rb_cIO);
+ }
+ }
+ }
}
if (redirect) {
VALUE io = rb_funcallv_kw(argv[0], to_open, argc-1, argv+1, RB_PASS_CALLED_KEYWORDS);
- if (rb_block_given_p()) {
- return rb_ensure(rb_yield, io, io_close, io);
- }
- return io;
+ if (rb_block_given_p()) {
+ return rb_ensure(rb_yield, io, io_close, io);
+ }
+ return io;
}
return rb_io_s_open(argc, argv, rb_cFile);
}
@@ -7237,15 +8290,15 @@ rb_io_open(VALUE io, VALUE filename, VALUE vmode, VALUE vperm, VALUE opt)
static VALUE
rb_io_open_generic(VALUE klass, VALUE filename, int oflags, int fmode,
- const convconfig_t *convconfig, mode_t perm)
+ const convconfig_t *convconfig, mode_t perm)
{
VALUE cmd;
if (klass == rb_cIO && !NIL_P(cmd = check_pipe_command(filename))) {
- return pipe_open_s(cmd, rb_io_oflags_modestr(oflags), fmode, convconfig);
+ return pipe_open_s(cmd, rb_io_oflags_modestr(oflags), fmode, convconfig);
}
else {
- return rb_file_open_generic(io_alloc(klass), filename,
- oflags, fmode, convconfig, perm);
+ return rb_file_open_generic(io_alloc(klass), filename,
+ oflags, fmode, convconfig, perm);
}
}
@@ -7254,7 +8307,7 @@ io_reopen(VALUE io, VALUE nfile)
{
rb_io_t *fptr, *orig;
int fd, fd2;
- off_t pos = 0;
+ rb_off_t pos = 0;
nfile = rb_io_get_io(nfile);
GetOpenFile(io, fptr);
@@ -7265,25 +8318,25 @@ io_reopen(VALUE io, VALUE nfile)
if ((fptr->stdio_file == stdin && !(orig->mode & FMODE_READABLE)) ||
(fptr->stdio_file == stdout && !(orig->mode & FMODE_WRITABLE)) ||
(fptr->stdio_file == stderr && !(orig->mode & FMODE_WRITABLE))) {
- rb_raise(rb_eArgError,
- "%s can't change access mode from \"%s\" to \"%s\"",
- PREP_STDIO_NAME(fptr), rb_io_fmode_modestr(fptr->mode),
- rb_io_fmode_modestr(orig->mode));
- }
+ rb_raise(rb_eArgError,
+ "%s can't change access mode from \"%s\" to \"%s\"",
+ PREP_STDIO_NAME(fptr), rb_io_fmode_modestr(fptr->mode),
+ rb_io_fmode_modestr(orig->mode));
+ }
}
if (fptr->mode & FMODE_WRITABLE) {
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
}
else {
flush_before_seek(fptr);
}
if (orig->mode & FMODE_READABLE) {
- pos = io_tell(orig);
+ pos = io_tell(orig);
}
if (orig->mode & FMODE_WRITABLE) {
if (io_fflush(orig) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
}
/* copy rb_io_t structure */
@@ -7297,13 +8350,13 @@ io_reopen(VALUE io, VALUE nfile)
fd = fptr->fd;
fd2 = orig->fd;
if (fd != fd2) {
- if (IS_PREP_STDIO(fptr) || fd <= 2 || !fptr->stdio_file) {
- /* need to keep FILE objects of stdin, stdout and stderr */
- if (rb_cloexec_dup2(fd2, fd) < 0)
- rb_sys_fail_path(orig->pathv);
+ if (IS_PREP_STDIO(fptr) || fd <= 2 || !fptr->stdio_file) {
+ /* need to keep FILE objects of stdin, stdout and stderr */
+ if (rb_cloexec_dup2(fd2, fd) < 0)
+ rb_sys_fail_path(orig->pathv);
rb_update_max_fd(fd);
- }
- else {
+ }
+ else {
fclose(fptr->stdio_file);
fptr->stdio_file = 0;
fptr->fd = -1;
@@ -7311,20 +8364,20 @@ io_reopen(VALUE io, VALUE nfile)
rb_sys_fail_path(orig->pathv);
rb_update_max_fd(fd);
fptr->fd = fd;
- }
- rb_thread_fd_close(fd);
- if ((orig->mode & FMODE_READABLE) && pos >= 0) {
- if (io_seek(fptr, pos, SEEK_SET) < 0 && errno) {
- rb_sys_fail_path(fptr->pathv);
- }
- if (io_seek(orig, pos, SEEK_SET) < 0 && errno) {
- rb_sys_fail_path(orig->pathv);
- }
- }
+ }
+ rb_thread_fd_close(fd);
+ if ((orig->mode & FMODE_READABLE) && pos >= 0) {
+ if (io_seek(fptr, pos, SEEK_SET) < 0 && errno) {
+ rb_sys_fail_path(fptr->pathv);
+ }
+ if (io_seek(orig, pos, SEEK_SET) < 0 && errno) {
+ rb_sys_fail_path(orig->pathv);
+ }
+ }
}
if (fptr->mode & FMODE_BINMODE) {
- rb_io_binmode(io);
+ rb_io_binmode(io);
}
RBASIC_SET_CLASS(io, rb_obj_class(nfile));
@@ -7338,8 +8391,8 @@ static int
rb_freopen(VALUE fname, const char *mode, FILE *fp)
{
if (!freopen(RSTRING_PTR(fname), mode, fp)) {
- RB_GC_GUARD(fname);
- return errno;
+ RB_GC_GUARD(fname);
+ return errno;
}
return 0;
}
@@ -7347,19 +8400,36 @@ rb_freopen(VALUE fname, const char *mode, FILE *fp)
/*
* call-seq:
- * ios.reopen(other_IO) -> ios
- * ios.reopen(path, mode [, opt]) -> ios
+ * reopen(other_io) -> self
+ * reopen(path, mode = 'r', **opts) -> self
+ *
+ * Reassociates the stream with another stream,
+ * which may be of a different class.
+ * This method may be used to redirect an existing stream
+ * to a new destination.
+ *
+ * With argument +other_io+ given, reassociates with that stream:
+ *
+ * # Redirect $stdin from a file.
+ * f = File.open('t.txt')
+ * $stdin.reopen(f)
+ * f.close
+ *
+ * # Redirect $stdout to a file.
+ * f = File.open('t.tmp', 'w')
+ * $stdout.reopen(f)
+ * f.close
+ *
+ * With argument +path+ given, reassociates with a new stream to that file path:
*
- * Reassociates <em>ios</em> with the I/O stream given in
- * <i>other_IO</i> or to a new stream opened on <i>path</i>. This may
- * dynamically change the actual class of this stream.
- * The +mode+ and +opt+ parameters accept the same values as IO.open.
+ * $stdin.reopen('t.txt')
+ * $stdout.reopen('t.tmp', 'w')
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * f1 = File.new("testfile")
- * f2 = File.new("testfile")
- * f2.readlines[0] #=> "This is line one\n"
- * f2.reopen(f1) #=> #<File:testfile>
- * f2.readlines[0] #=> "This is line one\n"
*/
static VALUE
@@ -7370,57 +8440,57 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
rb_io_t *fptr;
if (rb_scan_args(argc, argv, "11:", &fname, &nmode, &opt) == 1) {
- VALUE tmp = rb_io_check_io(fname);
- if (!NIL_P(tmp)) {
- return io_reopen(file, tmp);
- }
+ VALUE tmp = rb_io_check_io(fname);
+ if (!NIL_P(tmp)) {
+ return io_reopen(file, tmp);
+ }
}
FilePathValue(fname);
rb_io_taint_check(file);
fptr = RFILE(file)->fptr;
if (!fptr) {
- fptr = RFILE(file)->fptr = ZALLOC(rb_io_t);
+ fptr = RFILE(file)->fptr = ZALLOC(rb_io_t);
}
if (!NIL_P(nmode) || !NIL_P(opt)) {
- int fmode;
- convconfig_t convconfig;
+ int fmode;
+ convconfig_t convconfig;
- rb_io_extract_modeenc(&nmode, 0, opt, &oflags, &fmode, &convconfig);
- if (IS_PREP_STDIO(fptr) &&
+ rb_io_extract_modeenc(&nmode, 0, opt, &oflags, &fmode, &convconfig);
+ if (IS_PREP_STDIO(fptr) &&
((fptr->mode & FMODE_READWRITE) & (fmode & FMODE_READWRITE)) !=
(fptr->mode & FMODE_READWRITE)) {
- rb_raise(rb_eArgError,
- "%s can't change access mode from \"%s\" to \"%s\"",
- PREP_STDIO_NAME(fptr), rb_io_fmode_modestr(fptr->mode),
- rb_io_fmode_modestr(fmode));
- }
- fptr->mode = fmode;
- fptr->encs = convconfig;
+ rb_raise(rb_eArgError,
+ "%s can't change access mode from \"%s\" to \"%s\"",
+ PREP_STDIO_NAME(fptr), rb_io_fmode_modestr(fptr->mode),
+ rb_io_fmode_modestr(fmode));
+ }
+ fptr->mode = fmode;
+ fptr->encs = convconfig;
}
else {
- oflags = rb_io_fmode_oflags(fptr->mode);
+ oflags = rb_io_fmode_oflags(fptr->mode);
}
fptr->pathv = fname;
if (fptr->fd < 0) {
fptr->fd = rb_sysopen(fptr->pathv, oflags, 0666);
- fptr->stdio_file = 0;
- return file;
+ fptr->stdio_file = 0;
+ return file;
}
if (fptr->mode & FMODE_WRITABLE) {
if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
+ rb_sys_fail_on_write(fptr);
}
fptr->rbuf.off = fptr->rbuf.len = 0;
if (fptr->stdio_file) {
- int e = rb_freopen(rb_str_encode_ospath(fptr->pathv),
- rb_io_oflags_modestr(oflags),
- fptr->stdio_file);
- if (e) rb_syserr_fail_path(e, fptr->pathv);
+ int e = rb_freopen(rb_str_encode_ospath(fptr->pathv),
+ rb_io_oflags_modestr(oflags),
+ fptr->stdio_file);
+ if (e) rb_syserr_fail_path(e, fptr->pathv);
fptr->fd = fileno(fptr->stdio_file);
rb_fd_fix_cloexec(fptr->fd);
#ifdef USE_SETVBUF
@@ -7437,14 +8507,14 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
}
}
else {
- int tmpfd = rb_sysopen(fptr->pathv, oflags, 0666);
- int err = 0;
- if (rb_cloexec_dup2(tmpfd, fptr->fd) < 0)
- err = errno;
- (void)close(tmpfd);
- if (err) {
- rb_syserr_fail_path(err, fptr->pathv);
- }
+ int tmpfd = rb_sysopen(fptr->pathv, oflags, 0666);
+ int err = 0;
+ if (rb_cloexec_dup2(tmpfd, fptr->fd) < 0)
+ err = errno;
+ (void)close(tmpfd);
+ if (err) {
+ rb_syserr_fail_path(err, fptr->pathv);
+ }
}
return file;
@@ -7457,7 +8527,7 @@ rb_io_init_copy(VALUE dest, VALUE io)
rb_io_t *fptr, *orig;
int fd;
VALUE write_io;
- off_t pos;
+ rb_off_t pos;
io = rb_io_get_io(io);
if (!OBJ_INIT_COPY(dest, io)) return dest;
@@ -7471,6 +8541,7 @@ rb_io_init_copy(VALUE dest, VALUE io)
fptr->encs = orig->encs;
fptr->pid = orig->pid;
fptr->lineno = orig->lineno;
+ fptr->timeout = orig->timeout;
if (!NIL_P(orig->pathv)) fptr->pathv = orig->pathv;
fptr_copy_finalizer(fptr, orig);
@@ -7480,7 +8551,7 @@ rb_io_init_copy(VALUE dest, VALUE io)
if (0 <= pos)
io_seek(fptr, pos, SEEK_SET);
if (fptr->mode & FMODE_BINMODE) {
- rb_io_binmode(dest);
+ rb_io_binmode(dest);
}
write_io = GetWriteIO(io);
@@ -7495,10 +8566,13 @@ rb_io_init_copy(VALUE dest, VALUE io)
/*
* call-seq:
- * ios.printf(format_string [, obj, ...]) -> nil
+ * printf(format_string, *objects) -> nil
+ *
+ * Formats and writes +objects+ to the stream.
+ *
+ * For details on +format_string+, see
+ * {Format Specifications}[rdoc-ref:format_specifications.rdoc].
*
- * Formats and writes to <em>ios</em>, converting parameters under
- * control of the format string. See Kernel#sprintf for details.
*/
VALUE
@@ -7510,13 +8584,36 @@ rb_io_printf(int argc, const VALUE *argv, VALUE out)
/*
* call-seq:
- * printf(io, string [, obj ... ]) -> nil
- * printf(string [, obj ... ]) -> nil
+ * printf(format_string, *objects) -> nil
+ * printf(io, format_string, *objects) -> nil
*
* Equivalent to:
- * io.write(sprintf(string, obj, ...))
- * or
- * $stdout.write(sprintf(string, obj, ...))
+ *
+ * io.write(sprintf(format_string, *objects))
+ *
+ * For details on +format_string+, see
+ * {Format Specifications}[rdoc-ref:format_specifications.rdoc].
+ *
+ * With the single argument +format_string+, formats +objects+ into the string,
+ * then writes the formatted string to $stdout:
+ *
+ * printf('%4.4d %10s %2.2f', 24, 24, 24.0)
+ *
+ * Output (on $stdout):
+ *
+ * 0024 24 24.00#
+ *
+ * With arguments +io+ and +format_string+, formats +objects+ into the string,
+ * then writes the formatted string to +io+:
+ *
+ * printf($stderr, '%4.4d %10s %2.2f', 24, 24, 24.0)
+ *
+ * Output (on $stderr):
+ *
+ * 0024 24 24.00# => nil
+ *
+ * With no arguments, does nothing.
+ *
*/
static VALUE
@@ -7526,12 +8623,12 @@ rb_f_printf(int argc, VALUE *argv, VALUE _)
if (argc == 0) return Qnil;
if (RB_TYPE_P(argv[0], T_STRING)) {
- out = rb_stdout;
+ out = rb_ractor_stdout();
}
else {
- out = argv[0];
- argv++;
- argc--;
+ out = argv[0];
+ argv++;
+ argc--;
}
rb_io_write(out, rb_f_sprintf(argc, argv));
@@ -7539,37 +8636,69 @@ rb_f_printf(int argc, VALUE *argv, VALUE _)
}
static void
-rb_output_fs_setter(VALUE val, ID id, VALUE *var)
+deprecated_str_setter(VALUE val, ID id, VALUE *var)
{
rb_str_setter(val, id, &val);
if (!NIL_P(val)) {
- rb_warn_deprecated("`$,'", NULL);
+ rb_warn_deprecated("`%s'", NULL, rb_id2name(id));
}
*var = val;
}
/*
* call-seq:
- * ios.print -> nil
- * ios.print(obj, ...) -> nil
+ * print(*objects) -> nil
*
- * Writes the given object(s) to <em>ios</em>. Returns +nil+.
+ * Writes the given objects to the stream; returns +nil+.
+ * Appends the output record separator <tt>$OUTPUT_RECORD_SEPARATOR</tt>
+ * (<tt>$\\</tt>), if it is not +nil+.
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * The stream must be opened for writing.
- * Each given object that isn't a string will be converted by calling
- * its <code>to_s</code> method.
- * When called without arguments, prints the contents of <code>$_</code>.
+ * With argument +objects+ given, for each object:
*
- * If the output field separator (<code>$,</code>) is not +nil+,
- * it is inserted between objects.
- * If the output record separator (<code>$\\</code>) is not +nil+,
- * it is appended to the output.
+ * - Converts via its method +to_s+ if not a string.
+ * - Writes to the stream.
+ * - If not the last object, writes the output field separator
+ * <tt>$OUTPUT_FIELD_SEPARATOR</tt> (<tt>$,</tt>) if it is not +nil+.
*
- * $stdout.print("This is ", 100, " percent.\n")
+ * With default separators:
*
- * <em>produces:</em>
+ * f = File.open('t.tmp', 'w+')
+ * objects = [0, 0.0, Rational(0, 1), Complex(0, 0), :zero, 'zero']
+ * p $OUTPUT_RECORD_SEPARATOR
+ * p $OUTPUT_FIELD_SEPARATOR
+ * f.print(*objects)
+ * f.rewind
+ * p f.read
+ * f.close
+ *
+ * Output:
+ *
+ * nil
+ * nil
+ * "00.00/10+0izerozero"
+ *
+ * With specified separators:
+ *
+ * $\ = "\n"
+ * $, = ','
+ * f.rewind
+ * f.print(*objects)
+ * f.rewind
+ * p f.read
+ *
+ * Output:
+ *
+ * "0,0.0,0/1,0+0i,zero,zero\n"
+ *
+ * With no argument given, writes the content of <tt>$_</tt>
+ * (which is usually the most recent user input):
+ *
+ * f = File.open('t.tmp', 'w+')
+ * gets # Sets $_ to the most recent user input.
+ * f.print
+ * f.close
*
- * This is 100 percent.
*/
VALUE
@@ -7580,18 +8709,21 @@ rb_io_print(int argc, const VALUE *argv, VALUE out)
/* if no argument given, print `$_' */
if (argc == 0) {
- argc = 1;
- line = rb_lastline_get();
- argv = &line;
+ argc = 1;
+ line = rb_lastline_get();
+ argv = &line;
+ }
+ if (argc > 1 && !NIL_P(rb_output_fs)) {
+ rb_category_warn(RB_WARN_CATEGORY_DEPRECATED, "$, is set to non-nil value");
}
for (i=0; i<argc; i++) {
- if (!NIL_P(rb_output_fs) && i>0) {
- rb_io_write(out, rb_output_fs);
- }
- rb_io_write(out, argv[i]);
+ if (!NIL_P(rb_output_fs) && i>0) {
+ rb_io_write(out, rb_output_fs);
+ }
+ rb_io_write(out, argv[i]);
}
if (argc > 0 && !NIL_P(rb_output_rs)) {
- rb_io_write(out, rb_output_rs);
+ rb_io_write(out, rb_output_rs);
}
return Qnil;
@@ -7599,49 +8731,79 @@ rb_io_print(int argc, const VALUE *argv, VALUE out)
/*
* call-seq:
- * print(obj, ...) -> nil
+ * print(*objects) -> nil
*
- * Prints each object in turn to <code>$stdout</code>. If the output
- * field separator (<code>$,</code>) is not +nil+, its
- * contents will appear between each field. If the output record
- * separator (<code>$\\</code>) is not +nil+, it will be
- * appended to the output. If no arguments are given, prints
- * <code>$_</code>. Objects that aren't strings will be converted by
- * calling their <code>to_s</code> method.
+ * Equivalent to <tt>$stdout.print(*objects)</tt>,
+ * this method is the straightforward way to write to <tt>$stdout</tt>.
*
- * print "cat", [1,2,3], 99, "\n"
- * $, = ", "
- * $\ = "\n"
- * print "cat", [1,2,3], 99
+ * Writes the given objects to <tt>$stdout</tt>; returns +nil+.
+ * Appends the output record separator <tt>$OUTPUT_RECORD_SEPARATOR</tt>
+ * <tt>$\\</tt>), if it is not +nil+.
*
- * <em>produces:</em>
+ * With argument +objects+ given, for each object:
+ *
+ * - Converts via its method +to_s+ if not a string.
+ * - Writes to <tt>stdout</tt>.
+ * - If not the last object, writes the output field separator
+ * <tt>$OUTPUT_FIELD_SEPARATOR</tt> (<tt>$,</tt> if it is not +nil+.
+ *
+ * With default separators:
+ *
+ * objects = [0, 0.0, Rational(0, 1), Complex(0, 0), :zero, 'zero']
+ * $OUTPUT_RECORD_SEPARATOR
+ * $OUTPUT_FIELD_SEPARATOR
+ * print(*objects)
+ *
+ * Output:
+ *
+ * nil
+ * nil
+ * 00.00/10+0izerozero
+ *
+ * With specified separators:
+ *
+ * $OUTPUT_RECORD_SEPARATOR = "\n"
+ * $OUTPUT_FIELD_SEPARATOR = ','
+ * print(*objects)
+ *
+ * Output:
+ *
+ * 0,0.0,0/1,0+0i,zero,zero
+ *
+ * With no argument given, writes the content of <tt>$_</tt>
+ * (which is usually the most recent user input):
+ *
+ * gets # Sets $_ to the most recent user input.
+ * print # Prints $_.
*
- * cat12399
- * cat, 1, 2, 3, 99
*/
static VALUE
rb_f_print(int argc, const VALUE *argv, VALUE _)
{
- rb_io_print(argc, argv, rb_stdout);
+ rb_io_print(argc, argv, rb_ractor_stdout());
return Qnil;
}
/*
* call-seq:
- * ios.putc(obj) -> obj
+ * putc(object) -> object
*
- * If <i>obj</i> is Numeric, write the character whose code is the
- * least-significant byte of <i>obj</i>. If <i>obj</i> is String,
- * write the first character of <i>obj</i> to <em>ios</em>. Otherwise,
- * raise TypeError.
+ * Writes a character to the stream.
+ * See {Character IO}[rdoc-ref:IO@Character+IO].
*
- * $stdout.putc "A"
- * $stdout.putc 65
+ * If +object+ is numeric, converts to integer if necessary,
+ * then writes the character whose code is the
+ * least significant byte;
+ * if +object+ is a string, writes the first character:
*
- * <em>produces:</em>
+ * $stdout.putc "A"
+ * $stdout.putc 65
+ *
+ * Output:
*
* AA
+ *
*/
static VALUE
@@ -7649,35 +8811,43 @@ rb_io_putc(VALUE io, VALUE ch)
{
VALUE str;
if (RB_TYPE_P(ch, T_STRING)) {
- str = rb_str_substr(ch, 0, 1);
+ str = rb_str_substr(ch, 0, 1);
}
else {
- char c = NUM2CHR(ch);
- str = rb_str_new(&c, 1);
+ char c = NUM2CHR(ch);
+ str = rb_str_new(&c, 1);
}
rb_io_write(io, str);
return ch;
}
+#define forward(obj, id, argc, argv) \
+ rb_funcallv_kw(obj, id, argc, argv, RB_PASS_CALLED_KEYWORDS)
+#define forward_public(obj, id, argc, argv) \
+ rb_funcallv_public_kw(obj, id, argc, argv, RB_PASS_CALLED_KEYWORDS)
+#define forward_current(id, argc, argv) \
+ forward_public(ARGF.current_file, id, argc, argv)
+
/*
* call-seq:
- * putc(int) -> int
+ * putc(int) -> int
*
* Equivalent to:
*
* $stdout.putc(int)
*
- * Refer to the documentation for IO#putc for important information regarding
- * multi-byte characters.
+ * See IO#putc for important information regarding multi-byte characters.
+ *
*/
static VALUE
rb_f_putc(VALUE recv, VALUE ch)
{
- if (recv == rb_stdout) {
- return rb_io_putc(recv, ch);
+ VALUE r_stdout = rb_ractor_stdout();
+ if (recv == r_stdout) {
+ return rb_io_putc(recv, ch);
}
- return rb_funcallv(rb_stdout, rb_intern("putc"), 1, &ch);
+ return forward(r_stdout, rb_intern("putc"), 1, &ch);
}
@@ -7691,7 +8861,7 @@ rb_str_end_with_asciichar(VALUE str, int c)
if (len == 0) return 0;
if ((n = rb_enc_mbminlen(enc)) == 1) {
- return ptr[len - 1] == c;
+ return ptr[len - 1] == c;
}
return rb_enc_ascget(ptr + ((len - 1) / n) * n, ptr + len, &n, enc) == c;
}
@@ -7703,74 +8873,101 @@ io_puts_ary(VALUE ary, VALUE out, int recur)
long i;
if (recur) {
- tmp = rb_str_new2("[...]");
- rb_io_puts(1, &tmp, out);
- return Qtrue;
+ tmp = rb_str_new2("[...]");
+ rb_io_puts(1, &tmp, out);
+ return Qtrue;
}
ary = rb_check_array_type(ary);
if (NIL_P(ary)) return Qfalse;
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
- rb_io_puts(1, &tmp, out);
+ tmp = RARRAY_AREF(ary, i);
+ rb_io_puts(1, &tmp, out);
}
return Qtrue;
}
/*
* call-seq:
- * ios.puts(obj, ...) -> nil
+ * puts(*objects) -> nil
*
- * Writes the given object(s) to <em>ios</em>.
- * Writes a newline after any that do not already end
- * with a newline sequence. Returns +nil+.
+ * Writes the given +objects+ to the stream, which must be open for writing;
+ * returns +nil+.\
+ * Writes a newline after each that does not already end with a newline sequence.
+ * If called without arguments, writes a newline.
+ * See {Line IO}[rdoc-ref:IO@Line+IO].
*
- * The stream must be opened for writing.
- * If called with an array argument, writes each element on a new line.
- * Each given object that isn't a string or array will be converted
- * by calling its +to_s+ method.
- * If called without arguments, outputs a single newline.
+ * Note that each added newline is the character <tt>"\n"<//tt>,
+ * not the output record separator (<tt>$\\</tt>).
*
- * $stdout.puts("this", "is", ["a", "test"])
+ * Treatment for each object:
*
- * <em>produces:</em>
+ * - \String: writes the string.
+ * - Neither string nor array: writes <tt>object.to_s</tt>.
+ * - \Array: writes each element of the array; arrays may be nested.
+ *
+ * To keep these examples brief, we define this helper method:
+ *
+ * def show(*objects)
+ * # Puts objects to file.
+ * f = File.new('t.tmp', 'w+')
+ * f.puts(objects)
+ * # Return file content.
+ * f.rewind
+ * p f.read
+ * f.close
+ * end
+ *
+ * # Strings without newlines.
+ * show('foo', 'bar', 'baz') # => "foo\nbar\nbaz\n"
+ * # Strings, some with newlines.
+ * show("foo\n", 'bar', "baz\n") # => "foo\nbar\nbaz\n"
+ *
+ * # Neither strings nor arrays:
+ * show(0, 0.0, Rational(0, 1), Complex(9, 0), :zero)
+ * # => "0\n0.0\n0/1\n9+0i\nzero\n"
*
- * this
- * is
- * a
- * test
+ * # Array of strings.
+ * show(['foo', "bar\n", 'baz']) # => "foo\nbar\nbaz\n"
+ * # Nested arrays.
+ * show([[[0, 1], 2, 3], 4, 5]) # => "0\n1\n2\n3\n4\n5\n"
*
- * Note that +puts+ always uses newlines and is not affected
- * by the output record separator (<code>$\\</code>).
*/
VALUE
rb_io_puts(int argc, const VALUE *argv, VALUE out)
{
- int i, n;
VALUE line, args[2];
/* if no argument given, print newline. */
if (argc == 0) {
- rb_io_write(out, rb_default_rs);
- return Qnil;
+ rb_io_write(out, rb_default_rs);
+ return Qnil;
}
- for (i=0; i<argc; i++) {
- if (RB_TYPE_P(argv[i], T_STRING)) {
- line = argv[i];
- goto string;
- }
- if (rb_exec_recursive(io_puts_ary, argv[i], out)) {
- continue;
- }
- line = rb_obj_as_string(argv[i]);
- string:
- n = 0;
- args[n++] = line;
- if (RSTRING_LEN(line) == 0 ||
- !rb_str_end_with_asciichar(line, '\n')) {
- args[n++] = rb_default_rs;
- }
- rb_io_writev(out, n, args);
+ for (int i = 0; i < argc; i++) {
+ // Convert the argument to a string:
+ if (RB_TYPE_P(argv[i], T_STRING)) {
+ line = argv[i];
+ }
+ else if (rb_exec_recursive(io_puts_ary, argv[i], out)) {
+ continue;
+ }
+ else {
+ line = rb_obj_as_string(argv[i]);
+ }
+
+ // Write the line:
+ int n = 0;
+ if (RSTRING_LEN(line) == 0) {
+ args[n++] = rb_default_rs;
+ }
+ else {
+ args[n++] = line;
+ if (!rb_str_end_with_asciichar(line, '\n')) {
+ args[n++] = rb_default_rs;
+ }
+ }
+
+ rb_io_writev(out, n, args);
}
return Qnil;
@@ -7778,116 +8975,118 @@ rb_io_puts(int argc, const VALUE *argv, VALUE out)
/*
* call-seq:
- * puts(obj, ...) -> nil
+ * puts(*objects) -> nil
*
* Equivalent to
*
- * $stdout.puts(obj, ...)
+ * $stdout.puts(objects)
*/
static VALUE
rb_f_puts(int argc, VALUE *argv, VALUE recv)
{
- if (recv == rb_stdout) {
- return rb_io_puts(argc, argv, recv);
+ VALUE r_stdout = rb_ractor_stdout();
+ if (recv == r_stdout) {
+ return rb_io_puts(argc, argv, recv);
}
- return rb_funcallv(rb_stdout, rb_intern("puts"), argc, argv);
+ return forward(r_stdout, rb_intern("puts"), argc, argv);
}
-void
-rb_p(VALUE obj) /* for debug print within C code */
+static VALUE
+rb_p_write(VALUE str)
{
VALUE args[2];
- args[0] = rb_obj_as_string(rb_inspect(obj));
+ args[0] = str;
args[1] = rb_default_rs;
- if (RB_TYPE_P(rb_stdout, T_FILE) &&
- rb_method_basic_definition_p(CLASS_OF(rb_stdout), id_write)) {
- io_writev(2, args, rb_stdout);
+ VALUE r_stdout = rb_ractor_stdout();
+ if (RB_TYPE_P(r_stdout, T_FILE) &&
+ rb_method_basic_definition_p(CLASS_OF(r_stdout), id_write)) {
+ io_writev(2, args, r_stdout);
}
else {
- rb_io_writev(rb_stdout, 2, args);
+ rb_io_writev(r_stdout, 2, args);
}
+ return Qnil;
}
-struct rb_f_p_arg {
- int argc;
- VALUE *argv;
-};
+void
+rb_p(VALUE obj) /* for debug print within C code */
+{
+ rb_p_write(rb_obj_as_string(rb_inspect(obj)));
+}
static VALUE
-rb_f_p_internal(VALUE arg)
+rb_p_result(int argc, const VALUE *argv)
{
- struct rb_f_p_arg *arg1 = (struct rb_f_p_arg*)arg;
- int argc = arg1->argc;
- VALUE *argv = arg1->argv;
- int i;
VALUE ret = Qnil;
- for (i=0; i<argc; i++) {
- rb_p(argv[i]);
- }
if (argc == 1) {
- ret = argv[0];
+ ret = argv[0];
}
else if (argc > 1) {
- ret = rb_ary_new4(argc, argv);
+ ret = rb_ary_new4(argc, argv);
}
- if (RB_TYPE_P(rb_stdout, T_FILE)) {
- rb_io_flush(rb_stdout);
+ VALUE r_stdout = rb_ractor_stdout();
+ if (RB_TYPE_P(r_stdout, T_FILE)) {
+ rb_uninterruptible(rb_io_flush, r_stdout);
}
return ret;
}
/*
* call-seq:
- * p(obj) -> obj
- * p(obj1, obj2, ...) -> [obj, ...]
- * p() -> nil
+ * p(object) -> obj
+ * p(*objects) -> array of objects
+ * p -> nil
*
- * For each object, directly writes _obj_.+inspect+ followed by a
- * newline to the program's standard output.
+ * For each object +obj+, executes:
*
- * S = Struct.new(:name, :state)
- * s = S['dave', 'TX']
- * p s
+ * $stdout.write(obj.inspect, "\n")
*
- * <em>produces:</em>
+ * With one object given, returns the object;
+ * with multiple objects given, returns an array containing the objects;
+ * with no object given, returns +nil+.
+ *
+ * Examples:
+ *
+ * r = Range.new(0, 4)
+ * p r # => 0..4
+ * p [r, r, r] # => [0..4, 0..4, 0..4]
+ * p # => nil
+ *
+ * Output:
+ *
+ * 0..4
+ * [0..4, 0..4, 0..4]
*
- * #<S name="dave", state="TX">
*/
static VALUE
rb_f_p(int argc, VALUE *argv, VALUE self)
{
- struct rb_f_p_arg arg;
- arg.argc = argc;
- arg.argv = argv;
-
- return rb_uninterruptible(rb_f_p_internal, (VALUE)&arg);
+ int i;
+ for (i=0; i<argc; i++) {
+ VALUE inspected = rb_obj_as_string(rb_inspect(argv[i]));
+ rb_uninterruptible(rb_p_write, inspected);
+ }
+ return rb_p_result(argc, argv);
}
/*
* call-seq:
- * obj.display(port=$>) -> nil
- *
- * Prints <i>obj</i> on the given port (default <code>$></code>).
- * Equivalent to:
+ * display(port = $>) -> nil
*
- * def display(port=$>)
- * port.write self
- * nil
- * end
- *
- * For example:
+ * Writes +self+ on the given port:
*
* 1.display
* "cat".display
* [ 4, 5, 6 ].display
* puts
*
- * <em>produces:</em>
+ * Output:
*
* 1cat[4, 5, 6]
+ *
*/
static VALUE
@@ -7895,34 +9094,35 @@ rb_obj_display(int argc, VALUE *argv, VALUE self)
{
VALUE out;
- out = (!rb_check_arity(argc, 0, 1) ? rb_stdout : argv[0]);
+ out = (!rb_check_arity(argc, 0, 1) ? rb_ractor_stdout() : argv[0]);
rb_io_write(out, self);
return Qnil;
}
static int
-rb_stderr_to_original_p(void)
+rb_stderr_to_original_p(VALUE err)
{
- return (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0);
+ return (err == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0);
}
void
rb_write_error2(const char *mesg, long len)
{
- if (rb_stderr_to_original_p()) {
+ VALUE out = rb_ractor_stderr();
+ if (rb_stderr_to_original_p(out)) {
#ifdef _WIN32
- if (isatty(fileno(stderr))) {
- if (rb_w32_write_console(rb_str_new(mesg, len), fileno(stderr)) > 0) return;
- }
+ if (isatty(fileno(stderr))) {
+ if (rb_w32_write_console(rb_str_new(mesg, len), fileno(stderr)) > 0) return;
+ }
#endif
- if (fwrite(mesg, sizeof(char), (size_t)len, stderr) < (size_t)len) {
- /* failed to write to stderr, what can we do? */
- return;
- }
+ if (fwrite(mesg, sizeof(char), (size_t)len, stderr) < (size_t)len) {
+ /* failed to write to stderr, what can we do? */
+ return;
+ }
}
else {
- rb_io_write(rb_stderr, rb_str_new(mesg, len));
+ rb_io_write(out, rb_str_new(mesg, len));
}
}
@@ -7935,30 +9135,31 @@ rb_write_error(const char *mesg)
void
rb_write_error_str(VALUE mesg)
{
+ VALUE out = rb_ractor_stderr();
/* a stopgap measure for the time being */
- if (rb_stderr_to_original_p()) {
- size_t len = (size_t)RSTRING_LEN(mesg);
+ if (rb_stderr_to_original_p(out)) {
+ size_t len = (size_t)RSTRING_LEN(mesg);
#ifdef _WIN32
- if (isatty(fileno(stderr))) {
- if (rb_w32_write_console(mesg, fileno(stderr)) > 0) return;
- }
+ if (isatty(fileno(stderr))) {
+ if (rb_w32_write_console(mesg, fileno(stderr)) > 0) return;
+ }
#endif
- if (fwrite(RSTRING_PTR(mesg), sizeof(char), len, stderr) < len) {
- RB_GC_GUARD(mesg);
- return;
- }
+ if (fwrite(RSTRING_PTR(mesg), sizeof(char), len, stderr) < len) {
+ RB_GC_GUARD(mesg);
+ return;
+ }
}
else {
- /* may unlock GVL, and */
- rb_io_write(rb_stderr, mesg);
+ /* may unlock GVL, and */
+ rb_io_write(out, mesg);
}
}
int
rb_stderr_tty_p(void)
{
- if (rb_stderr_to_original_p())
- return isatty(fileno(stderr));
+ if (rb_stderr_to_original_p(rb_ractor_stderr()))
+ return isatty(fileno(stderr));
return 0;
}
@@ -7966,17 +9167,48 @@ static void
must_respond_to(ID mid, VALUE val, ID id)
{
if (!rb_respond_to(val, mid)) {
- rb_raise(rb_eTypeError, "%"PRIsVALUE" must have %"PRIsVALUE" method, %"PRIsVALUE" given",
- rb_id2str(id), rb_id2str(mid),
- rb_obj_class(val));
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" must have %"PRIsVALUE" method, %"PRIsVALUE" given",
+ rb_id2str(id), rb_id2str(mid),
+ rb_obj_class(val));
}
}
static void
-stdout_setter(VALUE val, ID id, VALUE *variable)
+stdin_setter(VALUE val, ID id, VALUE *ptr)
+{
+ rb_ractor_stdin_set(val);
+}
+
+static VALUE
+stdin_getter(ID id, VALUE *ptr)
+{
+ return rb_ractor_stdin();
+}
+
+static void
+stdout_setter(VALUE val, ID id, VALUE *ptr)
{
must_respond_to(id_write, val, id);
- *variable = val;
+ rb_ractor_stdout_set(val);
+}
+
+static VALUE
+stdout_getter(ID id, VALUE *ptr)
+{
+ return rb_ractor_stdout();
+}
+
+static void
+stderr_setter(VALUE val, ID id, VALUE *ptr)
+{
+ must_respond_to(id_write, val, id);
+ rb_ractor_stderr_set(val);
+}
+
+static VALUE
+stderr_getter(ID id, VALUE *ptr)
+{
+ return rb_ractor_stderr();
}
static VALUE
@@ -7986,12 +9218,14 @@ prep_io(int fd, int fmode, VALUE klass, const char *path)
VALUE io = io_alloc(klass);
MakeOpenFile(io, fp);
+ fp->self = io;
fp->fd = fd;
fp->mode = fmode;
+ fp->timeout = Qnil;
if (!io_check_tty(fp)) {
#ifdef __CYGWIN__
- fp->mode |= FMODE_BINMODE;
- setmode(fd, O_BINARY);
+ fp->mode |= FMODE_BINMODE;
+ setmode(fd, O_BINARY);
#endif
}
if (path) fp->pathv = rb_obj_freeze(rb_str_new_cstr(path));
@@ -8020,7 +9254,7 @@ prep_stdio(FILE *f, int fmode, VALUE klass, const char *path)
#ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
fptr->encs.ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
if (fmode & FMODE_READABLE) {
- fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
+ fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
}
#endif
fptr->stdio_file = f;
@@ -8028,6 +9262,24 @@ prep_stdio(FILE *f, int fmode, VALUE klass, const char *path)
return io;
}
+VALUE
+rb_io_prep_stdin(void)
+{
+ return prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>");
+}
+
+VALUE
+rb_io_prep_stdout(void)
+{
+ return prep_stdio(stdout, FMODE_WRITABLE|FMODE_SIGNAL_ON_EPIPE, rb_cIO, "<STDOUT>");
+}
+
+VALUE
+rb_io_prep_stderr(void)
+{
+ return prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");
+}
+
FILE *
rb_io_stdio_file(rb_io_t *fptr)
{
@@ -8051,6 +9303,7 @@ static inline rb_io_t *
rb_io_fptr_new(void)
{
rb_io_t *fp = ALLOC(rb_io_t);
+ fp->self = Qnil;
fp->fd = -1;
fp->stdio_file = NULL;
fp->mode = 0;
@@ -8072,7 +9325,8 @@ rb_io_fptr_new(void)
fp->encs.enc2 = NULL;
fp->encs.ecflags = 0;
fp->encs.ecopts = Qnil;
- fp->write_lock = 0;
+ fp->write_lock = Qnil;
+ fp->timeout = Qnil;
return fp;
}
@@ -8083,166 +9337,55 @@ rb_io_make_open_file(VALUE obj)
Check_Type(obj, T_FILE);
if (RFILE(obj)->fptr) {
- rb_io_close(obj);
- rb_io_fptr_finalize(RFILE(obj)->fptr);
- RFILE(obj)->fptr = 0;
+ rb_io_close(obj);
+ rb_io_fptr_finalize(RFILE(obj)->fptr);
+ RFILE(obj)->fptr = 0;
}
fp = rb_io_fptr_new();
+ fp->self = obj;
RFILE(obj)->fptr = fp;
return fp;
}
/*
* call-seq:
- * IO.new(fd [, mode] [, opt]) -> io
- *
- * Returns a new IO object (a stream) for the given integer file descriptor
- * +fd+ and +mode+ string. +opt+ may be used to specify parts of +mode+ in a
- * more readable fashion. See also IO.sysopen and IO.for_fd.
- *
- * IO.new is called by various File and IO opening methods such as IO::open,
- * Kernel#open, and File::open.
- *
- * === Open Mode
- *
- * When +mode+ is an integer it must be combination of the modes defined in
- * File::Constants (+File::RDONLY+, <code>File::WRONLY|File::CREAT</code>).
- * See the open(2) man page for more information.
- *
- * When +mode+ is a string it must be in one of the following forms:
- *
- * fmode
- * fmode ":" ext_enc
- * fmode ":" ext_enc ":" int_enc
- * fmode ":" "BOM|UTF-*"
- *
- * +fmode+ is an IO open mode string, +ext_enc+ is the external encoding for
- * the IO and +int_enc+ is the internal encoding.
- *
- * ==== IO Open Mode
- *
- * Ruby allows the following open modes:
- *
- * "r" Read-only, starts at beginning of file (default mode).
- *
- * "r+" Read-write, starts at beginning of file.
- *
- * "w" Write-only, truncates existing file
- * to zero length or creates a new file for writing.
- *
- * "w+" Read-write, truncates existing file to zero length
- * or creates a new file for reading and writing.
- *
- * "a" Write-only, each write call appends data at end of file.
- * Creates a new file for writing if file does not exist.
- *
- * "a+" Read-write, each write call appends data at end of file.
- * Creates a new file for reading and writing if file does
- * not exist.
- *
- * The following modes must be used separately, and along with one or more of
- * the modes seen above.
- *
- * "b" Binary file mode
- * Suppresses EOL <-> CRLF conversion on Windows. And
- * sets external encoding to ASCII-8BIT unless explicitly
- * specified.
- *
- * "t" Text file mode
- *
- * The exclusive access mode ("x") can be used together with "w" to ensure
- * the file is created. Errno::EEXIST is raised when it already exists.
- * It may not be supported with all kinds of streams (e.g. pipes).
- *
- * When the open mode of original IO is read only, the mode cannot be
- * changed to be writable. Similarly, the open mode cannot be changed from
- * write only to readable.
- *
- * When such a change is attempted the error is raised in different locations
- * according to the platform.
- *
- * === IO Encoding
- *
- * When +ext_enc+ is specified, strings read will be tagged by the encoding
- * when reading, and strings output will be converted to the specified
- * encoding when writing.
- *
- * When +ext_enc+ and +int_enc+ are specified read strings will be converted
- * from +ext_enc+ to +int_enc+ upon input, and written strings will be
- * converted from +int_enc+ to +ext_enc+ upon output. See Encoding for
- * further details of transcoding on input and output.
- *
- * If "BOM|UTF-8", "BOM|UTF-16LE" or "BOM|UTF16-BE" are used, Ruby checks for
- * a Unicode BOM in the input document to help determine the encoding. For
- * UTF-16 encodings the file open mode must be binary. When present, the BOM
- * is stripped and the external encoding from the BOM is used. When the BOM
- * is missing the given Unicode encoding is used as +ext_enc+. (The BOM-set
- * encoding option is case insensitive, so "bom|utf-8" is also valid.)
- *
- * === Options
+ * IO.new(fd, mode = 'r', **opts) -> io
*
- * +opt+ can be used instead of +mode+ for improved readability. The
- * following keys are supported:
+ * Creates and returns a new \IO object (file stream) from a file descriptor.
*
- * :mode ::
- * Same as +mode+ parameter
+ * \IO.new may be useful for interaction with low-level libraries.
+ * For higher-level interactions, it may be simpler to create
+ * the file stream using File.open.
*
- * :flags ::
- * Specifies file open flags as integer.
- * If +mode+ parameter is given, this parameter will be bitwise-ORed.
+ * Argument +fd+ must be a valid file descriptor (integer):
*
- * :\external_encoding ::
- * External encoding for the IO.
+ * path = 't.tmp'
+ * fd = IO.sysopen(path) # => 3
+ * IO.new(fd) # => #<IO:fd 3>
*
- * :\internal_encoding ::
- * Internal encoding for the IO. "-" is a synonym for the default internal
- * encoding.
+ * The new \IO object does not inherit encoding
+ * (because the integer file descriptor does not have an encoding):
*
- * If the value is +nil+ no conversion occurs.
- *
- * :encoding ::
- * Specifies external and internal encodings as "extern:intern".
- *
- * :textmode ::
- * If the value is truth value, same as "t" in argument +mode+.
- *
- * :binmode ::
- * If the value is truth value, same as "b" in argument +mode+.
- *
- * :autoclose ::
- * If the value is +false+, the +fd+ will be kept open after this IO
- * instance gets finalized.
- *
- * Also, +opt+ can have same keys in String#encode for controlling conversion
- * between the external encoding and the internal encoding.
- *
- * === Example 1
- *
- * fd = IO.sysopen("/dev/tty", "w")
- * a = IO.new(fd,"w")
- * $stderr.puts "Hello"
- * a.puts "World"
+ * fd = IO.sysopen('t.rus', 'rb')
+ * io = IO.new(fd)
+ * io.external_encoding # => #<Encoding:UTF-8> # Not ASCII-8BIT.
*
- * Produces:
+ * Optional argument +mode+ (defaults to 'r') must specify a valid mode;
+ * see {Access Modes}[rdoc-ref:File@Access+Modes]:
*
- * Hello
- * World
+ * IO.new(fd, 'w') # => #<IO:fd 3>
+ * IO.new(fd, File::WRONLY) # => #<IO:fd 3>
*
- * === Example 2
+ * Optional keyword arguments +opts+ specify:
*
- * require 'fcntl'
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * fd = STDERR.fcntl(Fcntl::F_DUPFD)
- * io = IO.new(fd, mode: 'w:UTF-16LE', cr_newline: true)
- * io.puts "Hello, World!"
+ * Examples:
*
- * fd = STDERR.fcntl(Fcntl::F_DUPFD)
- * io = IO.new(fd, mode: 'w', cr_newline: true,
- * external_encoding: Encoding::UTF_16LE)
- * io.puts "Hello, World!"
+ * IO.new(fd, internal_encoding: nil) # => #<IO:fd 3>
+ * IO.new(fd, autoclose: true) # => #<IO:fd 3>
*
- * Both of above print "Hello, World!" in UTF-16LE to standard error output
- * with converting EOL generated by #puts to CR.
*/
static VALUE
@@ -8265,7 +9408,7 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
fd = NUM2INT(fnum);
if (rb_reserved_fd_p(fd)) {
- rb_raise(rb_eArgError, "The given fd is not accessible because RubyVM reserves it");
+ rb_raise(rb_eArgError, "The given fd is not accessible because RubyVM reserves it");
}
#if defined(HAVE_FCNTL) && defined(F_GETFL)
oflags = fcntl(fd, F_GETFL);
@@ -8277,28 +9420,42 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
#if defined(HAVE_FCNTL) && defined(F_GETFL)
ofmode = rb_io_oflags_fmode(oflags);
if (NIL_P(vmode)) {
- fmode = ofmode;
+ fmode = ofmode;
}
else if ((~ofmode & fmode) & FMODE_READWRITE) {
- VALUE error = INT2FIX(EINVAL);
- rb_exc_raise(rb_class_new_instance(1, &error, rb_eSystemCallError));
+ VALUE error = INT2FIX(EINVAL);
+ rb_exc_raise(rb_class_new_instance(1, &error, rb_eSystemCallError));
}
#endif
- if (!NIL_P(opt) && rb_hash_aref(opt, sym_autoclose) == Qfalse) {
- fmode |= FMODE_PREP;
+ VALUE path = Qnil;
+
+ if (!NIL_P(opt)) {
+ if (rb_hash_aref(opt, sym_autoclose) == Qfalse) {
+ fmode |= FMODE_PREP;
+ }
+
+ path = rb_hash_aref(opt, RB_ID2SYM(idPath));
+ if (!NIL_P(path)) {
+ StringValue(path);
+ path = rb_str_new_frozen(path);
+ }
}
+
MakeOpenFile(io, fp);
+ fp->self = io;
fp->fd = fd;
fp->mode = fmode;
fp->encs = convconfig;
+ fp->pathv = path;
+ fp->timeout = Qnil;
clear_codeconv(fp);
io_check_tty(fp);
if (fileno(stdin) == fd)
- fp->stdio_file = stdin;
+ fp->stdio_file = stdin;
else if (fileno(stdout) == fd)
- fp->stdio_file = stdout;
+ fp->stdio_file = stdout;
else if (fileno(stderr) == fd)
- fp->stdio_file = stderr;
+ fp->stdio_file = stderr;
if (fmode & FMODE_SETENC_BY_BOM) io_set_encoding_by_bom(io);
return io;
@@ -8306,20 +9463,26 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * ios.set_encoding_by_bom -> encoding or nil
+ * set_encoding_by_bom -> encoding or nil
+ *
+ * If the stream begins with a BOM
+ * ({byte order marker}[https://en.wikipedia.org/wiki/Byte_order_mark]),
+ * consumes the BOM and sets the external encoding accordingly;
+ * returns the result encoding if found, or +nil+ otherwise:
*
- * Checks if +ios+ starts with a BOM, and then consumes it and sets
- * the external encoding. Returns the result encoding if found, or
- * nil. If +ios+ is not binmode or its encoding has been set
- * already, an exception will be raised.
+ * File.write('t.tmp', "\u{FEFF}abc")
+ * io = File.open('t.tmp', 'rb')
+ * io.set_encoding_by_bom # => #<Encoding:UTF-8>
+ * io.close
*
- * File.write("bom.txt", "\u{FEFF}abc")
- * ios = File.open("bom.txt", "rb")
- * ios.set_encoding_by_bom #=> #<Encoding:UTF-8>
+ * File.write('t.tmp', 'abc')
+ * io = File.open('t.tmp', 'rb')
+ * io.set_encoding_by_bom # => nil
+ * io.close
+ *
+ * Raises an exception if the stream is not binmode
+ * or its encoding has already been set.
*
- * File.write("nobom.txt", "abc")
- * ios = File.open("nobom.txt", "rb")
- * ios.set_encoding_by_bom #=> nil
*/
static VALUE
@@ -8344,42 +9507,58 @@ rb_io_set_encoding_by_bom(VALUE io)
/*
* call-seq:
- * File.new(filename, mode="r" [, opt]) -> file
- * File.new(filename [, mode [, perm]] [, opt]) -> file
+ * File.new(path, mode = 'r', perm = 0666, **opts) -> file
+ *
+ * Opens the file at the given +path+ according to the given +mode+;
+ * creates and returns a new \File object for that file.
*
- * Opens the file named by +filename+ according to the given +mode+ and
- * returns a new File object.
+ * The new \File object is buffered mode (or non-sync mode), unless
+ * +filename+ is a tty.
+ * See IO#flush, IO#fsync, IO#fdatasync, and IO#sync=.
*
- * See IO.new for a description of +mode+ and +opt+.
+ * Argument +path+ must be a valid file path:
*
- * If a file is being created, permission bits may be given in +perm+. These
- * mode and permission bits are platform dependent; on Unix systems, see
- * open(2) and chmod(2) man pages for details.
+ * f = File.new('/etc/fstab')
+ * f.close
+ * f = File.new('t.txt')
+ * f.close
*
- * The new File object is buffered mode (or non-sync mode), unless
- * +filename+ is a tty.
- * See IO#flush, IO#fsync, IO#fdatasync, and IO#sync= about sync mode.
+ * Optional argument +mode+ (defaults to 'r') must specify a valid mode;
+ * see {Access Modes}[rdoc-ref:File@Access+Modes]:
+ *
+ * f = File.new('t.tmp', 'w')
+ * f.close
+ * f = File.new('t.tmp', File::RDONLY)
+ * f.close
+ *
+ * Optional argument +perm+ (defaults to 0666) must specify valid permissions
+ * see {File Permissions}[rdoc-ref:File@File+Permissions]:
+ *
+ * f = File.new('t.tmp', File::CREAT, 0644)
+ * f.close
+ * f = File.new('t.tmp', File::CREAT, 0444)
+ * f.close
+ *
+ * Optional keyword arguments +opts+ specify:
*
- * === Examples
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * f = File.new("testfile", "r")
- * f = File.new("newfile", "w+")
- * f = File.new("newfile", File::CREAT|File::TRUNC|File::RDWR, 0644)
*/
static VALUE
rb_file_initialize(int argc, VALUE *argv, VALUE io)
{
if (RFILE(io)->fptr) {
- rb_raise(rb_eRuntimeError, "reinitializing File");
+ rb_raise(rb_eRuntimeError, "reinitializing File");
}
if (0 < argc && argc < 3) {
- VALUE fd = rb_check_to_int(argv[0]);
+ VALUE fd = rb_check_to_int(argv[0]);
- if (!NIL_P(fd)) {
- argv[0] = fd;
- return rb_io_initialize(argc, argv, io);
- }
+ if (!NIL_P(fd)) {
+ argv[0] = fd;
+ return rb_io_initialize(argc, argv, io);
+ }
}
rb_open_file(argc, argv, io);
@@ -8391,10 +9570,10 @@ static VALUE
rb_io_s_new(int argc, VALUE *argv, VALUE klass)
{
if (rb_block_given_p()) {
- VALUE cname = rb_obj_as_string(klass);
+ VALUE cname = rb_obj_as_string(klass);
- rb_warn("%"PRIsVALUE"::new() does not take block; use %"PRIsVALUE"::open() instead",
- cname, cname);
+ rb_warn("%"PRIsVALUE"::new() does not take block; use %"PRIsVALUE"::open() instead",
+ cname, cname);
}
return rb_class_new_instance_kw(argc, argv, klass, RB_PASS_CALLED_KEYWORDS);
}
@@ -8402,7 +9581,7 @@ rb_io_s_new(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * IO.for_fd(fd, mode [, opt]) -> io
+ * IO.for_fd(fd, mode = 'r', **opts) -> io
*
* Synonym for IO.new.
*
@@ -8429,7 +9608,7 @@ rb_io_autoclose_p(VALUE io)
{
rb_io_t *fptr = RFILE(io)->fptr;
rb_io_check_closed(fptr);
- return (fptr->mode & FMODE_PREP) ? Qfalse : Qtrue;
+ return RBOOL(!(fptr->mode & FMODE_PREP));
}
/*
@@ -8455,12 +9634,223 @@ rb_io_set_autoclose(VALUE io, VALUE autoclose)
rb_io_t *fptr;
GetOpenFile(io, fptr);
if (!RTEST(autoclose))
- fptr->mode |= FMODE_PREP;
+ fptr->mode |= FMODE_PREP;
else
- fptr->mode &= ~FMODE_PREP;
+ fptr->mode &= ~FMODE_PREP;
return autoclose;
}
+static VALUE
+io_wait_event(VALUE io, int event, VALUE timeout, int return_io)
+{
+ VALUE result = rb_io_wait(io, RB_INT2NUM(event), timeout);
+
+ if (!RB_TEST(result)) {
+ return Qnil;
+ }
+
+ int mask = RB_NUM2INT(result);
+
+ if (mask & event) {
+ if (return_io)
+ return io;
+ else
+ return result;
+ }
+ else {
+ return Qfalse;
+ }
+}
+
+/*
+ * call-seq:
+ * io.wait_readable -> truthy or falsy
+ * io.wait_readable(timeout) -> truthy or falsy
+ *
+ * Waits until IO is readable and returns a truthy value, or a falsy
+ * value when times out. Returns a truthy value immediately when
+ * buffered data is available.
+ */
+
+static VALUE
+io_wait_readable(int argc, VALUE *argv, VALUE io)
+{
+ rb_io_t *fptr;
+
+ RB_IO_POINTER(io, fptr);
+ rb_io_check_readable(fptr);
+
+ if (rb_io_read_pending(fptr)) return Qtrue;
+
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = (argc == 1 ? argv[0] : Qnil);
+
+ return io_wait_event(io, RUBY_IO_READABLE, timeout, 1);
+}
+
+/*
+ * call-seq:
+ * io.wait_writable -> truthy or falsy
+ * io.wait_writable(timeout) -> truthy or falsy
+ *
+ * Waits until IO is writable and returns a truthy value or a falsy
+ * value when times out.
+ */
+static VALUE
+io_wait_writable(int argc, VALUE *argv, VALUE io)
+{
+ rb_io_t *fptr;
+
+ RB_IO_POINTER(io, fptr);
+ rb_io_check_writable(fptr);
+
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = (argc == 1 ? argv[0] : Qnil);
+
+ return io_wait_event(io, RUBY_IO_WRITABLE, timeout, 1);
+}
+
+/*
+ * call-seq:
+ * io.wait_priority -> truthy or falsy
+ * io.wait_priority(timeout) -> truthy or falsy
+ *
+ * Waits until IO is priority and returns a truthy value or a falsy
+ * value when times out. Priority data is sent and received using
+ * the Socket::MSG_OOB flag and is typically limited to streams.
+ */
+static VALUE
+io_wait_priority(int argc, VALUE *argv, VALUE io)
+{
+ rb_io_t *fptr = NULL;
+
+ RB_IO_POINTER(io, fptr);
+ rb_io_check_readable(fptr);
+
+ if (rb_io_read_pending(fptr)) return Qtrue;
+
+ rb_check_arity(argc, 0, 1);
+ VALUE timeout = argc == 1 ? argv[0] : Qnil;
+
+ return io_wait_event(io, RUBY_IO_PRIORITY, timeout, 1);
+}
+
+static int
+wait_mode_sym(VALUE mode)
+{
+ if (mode == ID2SYM(rb_intern("r"))) {
+ return RB_WAITFD_IN;
+ }
+ if (mode == ID2SYM(rb_intern("read"))) {
+ return RB_WAITFD_IN;
+ }
+ if (mode == ID2SYM(rb_intern("readable"))) {
+ return RB_WAITFD_IN;
+ }
+ if (mode == ID2SYM(rb_intern("w"))) {
+ return RB_WAITFD_OUT;
+ }
+ if (mode == ID2SYM(rb_intern("write"))) {
+ return RB_WAITFD_OUT;
+ }
+ if (mode == ID2SYM(rb_intern("writable"))) {
+ return RB_WAITFD_OUT;
+ }
+ if (mode == ID2SYM(rb_intern("rw"))) {
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
+ }
+ if (mode == ID2SYM(rb_intern("read_write"))) {
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
+ }
+ if (mode == ID2SYM(rb_intern("readable_writable"))) {
+ return RB_WAITFD_IN|RB_WAITFD_OUT;
+ }
+
+ rb_raise(rb_eArgError, "unsupported mode: %"PRIsVALUE, mode);
+}
+
+static inline rb_io_event_t
+io_event_from_value(VALUE value)
+{
+ int events = RB_NUM2INT(value);
+
+ if (events <= 0) rb_raise(rb_eArgError, "Events must be positive integer!");
+
+ return events;
+}
+
+/*
+ * call-seq:
+ * io.wait(events, timeout) -> event mask, false or nil
+ * io.wait(timeout = nil, mode = :read) -> self, true, or false
+ *
+ * Waits until the IO becomes ready for the specified events and returns the
+ * subset of events that become ready, or a falsy value when times out.
+ *
+ * The events can be a bit mask of +IO::READABLE+, +IO::WRITABLE+ or
+ * +IO::PRIORITY+.
+ *
+ * Returns an event mask (truthy value) immediately when buffered data is available.
+ *
+ * Optional parameter +mode+ is one of +:read+, +:write+, or
+ * +:read_write+.
+ */
+
+static VALUE
+io_wait(int argc, VALUE *argv, VALUE io)
+{
+ VALUE timeout = Qundef;
+ rb_io_event_t events = 0;
+ int return_io = 0;
+
+ // The documented signature for this method is actually incorrect.
+ // A single timeout is allowed in any position, and multiple symbols can be given.
+ // Whether this is intentional or not, I don't know, and as such I consider this to
+ // be a legacy/slow path.
+ if (argc != 2 || (RB_SYMBOL_P(argv[0]) || RB_SYMBOL_P(argv[1]))) {
+ // We'd prefer to return the actual mask, but this form would return the io itself:
+ return_io = 1;
+
+ // Slow/messy path:
+ for (int i = 0; i < argc; i += 1) {
+ if (RB_SYMBOL_P(argv[i])) {
+ events |= wait_mode_sym(argv[i]);
+ }
+ else if (UNDEF_P(timeout)) {
+ rb_time_interval(timeout = argv[i]);
+ }
+ else {
+ rb_raise(rb_eArgError, "timeout given more than once");
+ }
+ }
+
+ if (UNDEF_P(timeout)) timeout = Qnil;
+
+ if (events == 0) {
+ events = RUBY_IO_READABLE;
+ }
+ }
+ else /* argc == 2 and neither are symbols */ {
+ // This is the fast path:
+ events = io_event_from_value(argv[0]);
+ timeout = argv[1];
+ }
+
+ if (events & RUBY_IO_READABLE) {
+ rb_io_t *fptr = NULL;
+ RB_IO_POINTER(io, fptr);
+
+ if (rb_io_read_pending(fptr)) {
+ // This was the original behaviour:
+ if (return_io) return Qtrue;
+ // New behaviour always returns an event mask:
+ else return RB_INT2NUM(RUBY_IO_READABLE);
+ }
+ }
+
+ return io_wait_event(io, events, timeout, return_io);
+}
+
static void
argf_mark(void *ptr)
{
@@ -8531,11 +9921,11 @@ argf_initialize_copy(VALUE argf, VALUE orig)
* call-seq:
* ARGF.lineno = integer -> integer
*
- * Sets the line number of +ARGF+ as a whole to the given +Integer+.
+ * Sets the line number of ARGF as a whole to the given Integer.
*
- * +ARGF+ sets the line number automatically as you read data, so normally
+ * ARGF sets the line number automatically as you read data, so normally
* you will not need to set it explicitly. To access the current line number
- * use +ARGF.lineno+.
+ * use ARGF.lineno.
*
* For example:
*
@@ -8550,7 +9940,7 @@ argf_set_lineno(VALUE argf, VALUE val)
{
ARGF.lineno = NUM2INT(val);
ARGF.last_lineno = ARGF.lineno;
- return Qnil;
+ return val;
}
/*
@@ -8558,7 +9948,7 @@ argf_set_lineno(VALUE argf, VALUE val)
* ARGF.lineno -> integer
*
* Returns the current line number of ARGF as a whole. This value
- * can be set manually with +ARGF.lineno=+.
+ * can be set manually with ARGF.lineno=.
*
* For example:
*
@@ -8575,7 +9965,7 @@ argf_lineno(VALUE argf)
static VALUE
argf_forward(int argc, VALUE *argv, VALUE argf)
{
- return rb_funcall3(ARGF.current_file, rb_frame_this_func(), argc, argv);
+ return forward_current(rb_frame_this_func(), argc, argv);
}
#define next_argv() argf_next_argv(argf)
@@ -8583,7 +9973,7 @@ argf_forward(int argc, VALUE *argv, VALUE argf)
(ARGF.current_file == rb_stdin && !RB_TYPE_P(ARGF.current_file, T_FILE))
#define ARGF_FORWARD(argc, argv) do {\
if (ARGF_GENERIC_INPUT_P())\
- return argf_forward((argc), (argv), argf);\
+ return argf_forward((argc), (argv), argf);\
} while (0)
#define NEXT_ARGF_FORWARD(argc, argv) do {\
if (!next_argv()) return Qnil;\
@@ -8596,7 +9986,7 @@ argf_close(VALUE argf)
VALUE file = ARGF.current_file;
if (file == rb_stdin) return;
if (RB_TYPE_P(file, T_FILE)) {
- rb_io_set_write_io(file, Qnil);
+ rb_io_set_write_io(file, Qnil);
}
io_close(file);
ARGF.init_p = -1;
@@ -8610,170 +10000,172 @@ argf_next_argv(VALUE argf)
int stdout_binmode = 0;
int fmode;
- if (RB_TYPE_P(rb_stdout, T_FILE)) {
- GetOpenFile(rb_stdout, fptr);
+ VALUE r_stdout = rb_ractor_stdout();
+
+ if (RB_TYPE_P(r_stdout, T_FILE)) {
+ GetOpenFile(r_stdout, fptr);
if (fptr->mode & FMODE_BINMODE)
stdout_binmode = 1;
}
if (ARGF.init_p == 0) {
- if (!NIL_P(ARGF.argv) && RARRAY_LEN(ARGF.argv) > 0) {
- ARGF.next_p = 1;
- }
- else {
- ARGF.next_p = -1;
- }
- ARGF.init_p = 1;
+ if (!NIL_P(ARGF.argv) && RARRAY_LEN(ARGF.argv) > 0) {
+ ARGF.next_p = 1;
+ }
+ else {
+ ARGF.next_p = -1;
+ }
+ ARGF.init_p = 1;
}
else {
- if (NIL_P(ARGF.argv)) {
- ARGF.next_p = -1;
- }
- else if (ARGF.next_p == -1 && RARRAY_LEN(ARGF.argv) > 0) {
- ARGF.next_p = 1;
- }
+ if (NIL_P(ARGF.argv)) {
+ ARGF.next_p = -1;
+ }
+ else if (ARGF.next_p == -1 && RARRAY_LEN(ARGF.argv) > 0) {
+ ARGF.next_p = 1;
+ }
}
if (ARGF.next_p == 1) {
- if (ARGF.init_p == 1) argf_close(argf);
+ if (ARGF.init_p == 1) argf_close(argf);
retry:
- if (RARRAY_LEN(ARGF.argv) > 0) {
- VALUE filename = rb_ary_shift(ARGF.argv);
- FilePathValue(filename);
- ARGF.filename = filename;
- filename = rb_str_encode_ospath(filename);
- fn = StringValueCStr(filename);
- if (RSTRING_LEN(filename) == 1 && fn[0] == '-') {
- ARGF.current_file = rb_stdin;
- if (ARGF.inplace) {
- rb_warn("Can't do inplace edit for stdio; skipping");
- goto retry;
- }
- }
- else {
- VALUE write_io = Qnil;
- int fr = rb_sysopen(filename, O_RDONLY, 0);
-
- if (ARGF.inplace) {
- struct stat st;
+ if (RARRAY_LEN(ARGF.argv) > 0) {
+ VALUE filename = rb_ary_shift(ARGF.argv);
+ FilePathValue(filename);
+ ARGF.filename = filename;
+ filename = rb_str_encode_ospath(filename);
+ fn = StringValueCStr(filename);
+ if (RSTRING_LEN(filename) == 1 && fn[0] == '-') {
+ ARGF.current_file = rb_stdin;
+ if (ARGF.inplace) {
+ rb_warn("Can't do inplace edit for stdio; skipping");
+ goto retry;
+ }
+ }
+ else {
+ VALUE write_io = Qnil;
+ int fr = rb_sysopen(filename, O_RDONLY, 0);
+
+ if (ARGF.inplace) {
+ struct stat st;
#ifndef NO_SAFE_RENAME
- struct stat st2;
-#endif
- VALUE str;
- int fw;
-
- if (RB_TYPE_P(rb_stdout, T_FILE) && rb_stdout != orig_stdout) {
- rb_io_close(rb_stdout);
- }
- fstat(fr, &st);
- str = filename;
- if (!NIL_P(ARGF.inplace)) {
- VALUE suffix = ARGF.inplace;
- str = rb_str_dup(str);
- if (NIL_P(rb_str_cat_conv_enc_opts(str, RSTRING_LEN(str),
- RSTRING_PTR(suffix), RSTRING_LEN(suffix),
- rb_enc_get(suffix), 0, Qnil))) {
- rb_str_append(str, suffix);
- }
+ struct stat st2;
+#endif
+ VALUE str;
+ int fw;
+
+ if (RB_TYPE_P(r_stdout, T_FILE) && r_stdout != orig_stdout) {
+ rb_io_close(r_stdout);
+ }
+ fstat(fr, &st);
+ str = filename;
+ if (!NIL_P(ARGF.inplace)) {
+ VALUE suffix = ARGF.inplace;
+ str = rb_str_dup(str);
+ if (NIL_P(rb_str_cat_conv_enc_opts(str, RSTRING_LEN(str),
+ RSTRING_PTR(suffix), RSTRING_LEN(suffix),
+ rb_enc_get(suffix), 0, Qnil))) {
+ rb_str_append(str, suffix);
+ }
#ifdef NO_SAFE_RENAME
- (void)close(fr);
- (void)unlink(RSTRING_PTR(str));
- if (rename(fn, RSTRING_PTR(str)) < 0) {
- rb_warn("Can't rename %"PRIsVALUE" to %"PRIsVALUE": %s, skipping file",
- filename, str, strerror(errno));
- goto retry;
- }
- fr = rb_sysopen(str, O_RDONLY, 0);
+ (void)close(fr);
+ (void)unlink(RSTRING_PTR(str));
+ if (rename(fn, RSTRING_PTR(str)) < 0) {
+ rb_warn("Can't rename %"PRIsVALUE" to %"PRIsVALUE": %s, skipping file",
+ filename, str, strerror(errno));
+ goto retry;
+ }
+ fr = rb_sysopen(str, O_RDONLY, 0);
#else
- if (rename(fn, RSTRING_PTR(str)) < 0) {
- rb_warn("Can't rename %"PRIsVALUE" to %"PRIsVALUE": %s, skipping file",
- filename, str, strerror(errno));
- close(fr);
- goto retry;
- }
-#endif
- }
- else {
+ if (rename(fn, RSTRING_PTR(str)) < 0) {
+ rb_warn("Can't rename %"PRIsVALUE" to %"PRIsVALUE": %s, skipping file",
+ filename, str, strerror(errno));
+ close(fr);
+ goto retry;
+ }
+#endif
+ }
+ else {
#ifdef NO_SAFE_RENAME
- rb_fatal("Can't do inplace edit without backup");
+ rb_fatal("Can't do inplace edit without backup");
#else
- if (unlink(fn) < 0) {
- rb_warn("Can't remove %"PRIsVALUE": %s, skipping file",
- filename, strerror(errno));
- close(fr);
- goto retry;
- }
-#endif
- }
- fw = rb_sysopen(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666);
+ if (unlink(fn) < 0) {
+ rb_warn("Can't remove %"PRIsVALUE": %s, skipping file",
+ filename, strerror(errno));
+ close(fr);
+ goto retry;
+ }
+#endif
+ }
+ fw = rb_sysopen(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666);
#ifndef NO_SAFE_RENAME
- fstat(fw, &st2);
+ fstat(fw, &st2);
#ifdef HAVE_FCHMOD
- fchmod(fw, st.st_mode);
+ fchmod(fw, st.st_mode);
#else
- chmod(fn, st.st_mode);
+ chmod(fn, st.st_mode);
#endif
- if (st.st_uid!=st2.st_uid || st.st_gid!=st2.st_gid) {
- int err;
+ if (st.st_uid!=st2.st_uid || st.st_gid!=st2.st_gid) {
+ int err;
#ifdef HAVE_FCHOWN
- err = fchown(fw, st.st_uid, st.st_gid);
+ err = fchown(fw, st.st_uid, st.st_gid);
#else
- err = chown(fn, st.st_uid, st.st_gid);
-#endif
- if (err && getuid() == 0 && st2.st_uid == 0) {
- const char *wkfn = RSTRING_PTR(filename);
- rb_warn("Can't set owner/group of %"PRIsVALUE" to same as %"PRIsVALUE": %s, skipping file",
- filename, str, strerror(errno));
- (void)close(fr);
- (void)close(fw);
- (void)unlink(wkfn);
- goto retry;
- }
- }
-#endif
- write_io = prep_io(fw, FMODE_WRITABLE, rb_cFile, fn);
- rb_stdout = write_io;
- if (stdout_binmode) rb_io_binmode(rb_stdout);
- }
- fmode = FMODE_READABLE;
- if (!ARGF.binmode) {
- fmode |= DEFAULT_TEXTMODE;
- }
- ARGF.current_file = prep_io(fr, fmode, rb_cFile, fn);
- if (!NIL_P(write_io)) {
- rb_io_set_write_io(ARGF.current_file, write_io);
- }
- RB_GC_GUARD(filename);
- }
- if (ARGF.binmode) rb_io_ascii8bit_binmode(ARGF.current_file);
- GetOpenFile(ARGF.current_file, fptr);
- if (ARGF.encs.enc) {
- fptr->encs = ARGF.encs;
+ err = chown(fn, st.st_uid, st.st_gid);
+#endif
+ if (err && getuid() == 0 && st2.st_uid == 0) {
+ const char *wkfn = RSTRING_PTR(filename);
+ rb_warn("Can't set owner/group of %"PRIsVALUE" to same as %"PRIsVALUE": %s, skipping file",
+ filename, str, strerror(errno));
+ (void)close(fr);
+ (void)close(fw);
+ (void)unlink(wkfn);
+ goto retry;
+ }
+ }
+#endif
+ write_io = prep_io(fw, FMODE_WRITABLE, rb_cFile, fn);
+ rb_ractor_stdout_set(write_io);
+ if (stdout_binmode) rb_io_binmode(rb_stdout);
+ }
+ fmode = FMODE_READABLE;
+ if (!ARGF.binmode) {
+ fmode |= DEFAULT_TEXTMODE;
+ }
+ ARGF.current_file = prep_io(fr, fmode, rb_cFile, fn);
+ if (!NIL_P(write_io)) {
+ rb_io_set_write_io(ARGF.current_file, write_io);
+ }
+ RB_GC_GUARD(filename);
+ }
+ if (ARGF.binmode) rb_io_ascii8bit_binmode(ARGF.current_file);
+ GetOpenFile(ARGF.current_file, fptr);
+ if (ARGF.encs.enc) {
+ fptr->encs = ARGF.encs;
clear_codeconv(fptr);
- }
- else {
- fptr->encs.ecflags &= ~ECONV_NEWLINE_DECORATOR_MASK;
- if (!ARGF.binmode) {
- fptr->encs.ecflags |= ECONV_DEFAULT_NEWLINE_DECORATOR;
+ }
+ else {
+ fptr->encs.ecflags &= ~ECONV_NEWLINE_DECORATOR_MASK;
+ if (!ARGF.binmode) {
+ fptr->encs.ecflags |= ECONV_DEFAULT_NEWLINE_DECORATOR;
#ifdef TEXTMODE_NEWLINE_DECORATOR_ON_WRITE
- fptr->encs.ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
+ fptr->encs.ecflags |= TEXTMODE_NEWLINE_DECORATOR_ON_WRITE;
#endif
- }
- }
- ARGF.next_p = 0;
- }
- else {
- ARGF.next_p = 1;
- return FALSE;
- }
+ }
+ }
+ ARGF.next_p = 0;
+ }
+ else {
+ ARGF.next_p = 1;
+ return FALSE;
+ }
}
else if (ARGF.next_p == -1) {
- ARGF.current_file = rb_stdin;
- ARGF.filename = rb_str_new2("-");
- if (ARGF.inplace) {
- rb_warn("Can't do inplace edit for stdio");
- rb_stdout = orig_stdout;
- }
+ ARGF.current_file = rb_stdin;
+ ARGF.filename = rb_str_new2("-");
+ if (ARGF.inplace) {
+ rb_warn("Can't do inplace edit for stdio");
+ rb_ractor_stdout_set(orig_stdout);
+ }
}
if (ARGF.init_p == -1) ARGF.init_p = 1;
return TRUE;
@@ -8788,24 +10180,24 @@ argf_getline(int argc, VALUE *argv, VALUE argf)
retry:
if (!next_argv()) return Qnil;
if (ARGF_GENERIC_INPUT_P()) {
- line = rb_funcall3(ARGF.current_file, idGets, argc, argv);
+ line = forward_current(idGets, argc, argv);
}
else {
- if (argc == 0 && rb_rs == rb_default_rs) {
- line = rb_io_gets(ARGF.current_file);
- }
- else {
- line = rb_io_getline(argc, argv, ARGF.current_file);
- }
- if (NIL_P(line) && ARGF.next_p != -1) {
- argf_close(argf);
- ARGF.next_p = 1;
- goto retry;
- }
+ if (argc == 0 && rb_rs == rb_default_rs) {
+ line = rb_io_gets(ARGF.current_file);
+ }
+ else {
+ line = rb_io_getline(argc, argv, ARGF.current_file);
+ }
+ if (NIL_P(line) && ARGF.next_p != -1) {
+ argf_close(argf);
+ ARGF.next_p = 1;
+ goto retry;
+ }
}
if (!NIL_P(line)) {
- ARGF.lineno = ++lineno;
- ARGF.last_lineno = ARGF.lineno;
+ ARGF.lineno = ++lineno;
+ ARGF.last_lineno = ARGF.lineno;
}
return line;
}
@@ -8825,6 +10217,12 @@ argf_lineno_setter(VALUE val, ID id, VALUE *var)
ARGF.last_lineno = ARGF.lineno = n;
}
+void
+rb_reset_argf_lineno(long n)
+{
+ ARGF.last_lineno = ARGF.lineno = n;
+}
+
static VALUE argf_gets(int, VALUE *, VALUE);
/*
@@ -8864,9 +10262,9 @@ static VALUE
rb_f_gets(int argc, VALUE *argv, VALUE recv)
{
if (recv == argf) {
- return argf_gets(argc, argv, argf);
+ return argf_gets(argc, argv, argf);
}
- return rb_funcallv(argf, idGets, argc, argv);
+ return forward(argf, idGets, argc, argv);
}
/*
@@ -8875,10 +10273,10 @@ rb_f_gets(int argc, VALUE *argv, VALUE recv)
* ARGF.gets(limit [, getline_args]) -> string or nil
* ARGF.gets(sep, limit [, getline_args]) -> string or nil
*
- * Returns the next line from the current file in +ARGF+.
+ * Returns the next line from the current file in ARGF.
*
* By default lines are assumed to be separated by <code>$/</code>;
- * to use a different character as a separator, supply it as a +String+
+ * to use a different character as a separator, supply it as a String
* for the _sep_ argument.
*
* The optional _limit_ argument specifies how many characters of each line
@@ -8904,21 +10302,21 @@ rb_gets(void)
VALUE line;
if (rb_rs != rb_default_rs) {
- return rb_f_gets(0, 0, argf);
+ return rb_f_gets(0, 0, argf);
}
retry:
if (!next_argv()) return Qnil;
line = rb_io_gets(ARGF.current_file);
if (NIL_P(line) && ARGF.next_p != -1) {
- rb_io_close(ARGF.current_file);
- ARGF.next_p = 1;
- goto retry;
+ rb_io_close(ARGF.current_file);
+ ARGF.next_p = 1;
+ goto retry;
}
rb_lastline_set(line);
if (!NIL_P(line)) {
- ARGF.lineno++;
- ARGF.last_lineno = ARGF.lineno;
+ ARGF.lineno++;
+ ARGF.last_lineno = ARGF.lineno;
}
return line;
@@ -8928,21 +10326,28 @@ static VALUE argf_readline(int, VALUE *, VALUE);
/*
* call-seq:
- * readline(sep=$/) -> string
- * readline(limit) -> string
- * readline(sep, limit) -> string
+ * readline(sep = $/, chomp: false) -> string
+ * readline(limit, chomp: false) -> string
+ * readline(sep, limit, chomp: false) -> string
*
- * Equivalent to Kernel::gets, except
- * +readline+ raises +EOFError+ at end of file.
+ * Equivalent to method Kernel#gets, except that it raises an exception
+ * if called at end-of-stream:
+ *
+ * $ cat t.txt | ruby -e "p readlines; readline"
+ * ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ * in `readline': end of file reached (EOFError)
+ *
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted.
*/
static VALUE
rb_f_readline(int argc, VALUE *argv, VALUE recv)
{
if (recv == argf) {
- return argf_readline(argc, argv, argf);
+ return argf_readline(argc, argv, argf);
}
- return rb_funcallv(argf, rb_intern("readline"), argc, argv);
+ return forward(argf, rb_intern("readline"), argc, argv);
}
@@ -8952,16 +10357,16 @@ rb_f_readline(int argc, VALUE *argv, VALUE recv)
* ARGF.readline(limit) -> string
* ARGF.readline(sep, limit) -> string
*
- * Returns the next line from the current file in +ARGF+.
+ * Returns the next line from the current file in ARGF.
*
* By default lines are assumed to be separated by <code>$/</code>;
- * to use a different character as a separator, supply it as a +String+
+ * to use a different character as a separator, supply it as a String
* for the _sep_ argument.
*
* The optional _limit_ argument specifies how many characters of each line
* to return. By default all characters are returned.
*
- * An +EOFError+ is raised at the end of the file.
+ * An EOFError is raised at the end of the file.
*/
static VALUE
argf_readline(int argc, VALUE *argv, VALUE argf)
@@ -8972,7 +10377,7 @@ argf_readline(int argc, VALUE *argv, VALUE argf)
ARGF_FORWARD(argc, argv);
line = argf_gets(argc, argv, argf);
if (NIL_P(line)) {
- rb_eof_error();
+ rb_eof_error();
}
return line;
@@ -8982,35 +10387,83 @@ static VALUE argf_readlines(int, VALUE *, VALUE);
/*
* call-seq:
- * readlines(sep=$/) -> array
- * readlines(limit) -> array
- * readlines(sep, limit) -> array
+ * readlines(sep = $/, chomp: false, **enc_opts) -> array
+ * readlines(limit, chomp: false, **enc_opts) -> array
+ * readlines(sep, limit, chomp: false, **enc_opts) -> array
*
* Returns an array containing the lines returned by calling
- * <code>Kernel.gets(<i>sep</i>)</code> until the end of file.
+ * Kernel#gets until the end-of-stream is reached;
+ * (see {Line IO}[rdoc-ref:IO@Line+IO]).
+ *
+ * With only string argument +sep+ given,
+ * returns the remaining lines as determined by line separator +sep+,
+ * or +nil+ if none;
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator]:
+ *
+ * # Default separator.
+ * $ cat t.txt | ruby -e "p readlines"
+ * ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ *
+ * # Specified separator.
+ * $ cat t.txt | ruby -e "p readlines 'li'"
+ * ["First li", "ne\nSecond li", "ne\n\nFourth li", "ne\nFifth li", "ne\n"]
+ *
+ * # Get-all separator.
+ * $ cat t.txt | ruby -e "p readlines nil"
+ * ["First line\nSecond line\n\nFourth line\nFifth line\n"]
+ *
+ * # Get-paragraph separator.
+ * $ cat t.txt | ruby -e "p readlines ''"
+ * ["First line\nSecond line\n\n", "Fourth line\nFifth line\n"]
+ *
+ * With only integer argument +limit+ given,
+ * limits the number of bytes in the line;
+ * see {Line Limit}[rdoc-ref:IO@Line+Limit]:
+ *
+ * $cat t.txt | ruby -e "p readlines 10"
+ * ["First line", "\n", "Second lin", "e\n", "\n", "Fourth lin", "e\n", "Fifth line", "\n"]
+ *
+ * $cat t.txt | ruby -e "p readlines 11"
+ * ["First line\n", "Second line", "\n", "\n", "Fourth line", "\n", "Fifth line\n"]
+ *
+ * $cat t.txt | ruby -e "p readlines 12"
+ * ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ *
+ * With arguments +sep+ and +limit+ given, combines the two behaviors;
+ * see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit].
+ *
+ * Optional keyword argument +chomp+ specifies whether line separators
+ * are to be omitted:
+ *
+ * $ cat t.txt | ruby -e "p readlines(chomp: true)"
+ * ["First line", "Second line", "", "Fourth line", "Fifth line"]
+ *
+ * Optional keyword arguments +enc_opts+ specify encoding options;
+ * see {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ *
*/
static VALUE
rb_f_readlines(int argc, VALUE *argv, VALUE recv)
{
if (recv == argf) {
- return argf_readlines(argc, argv, argf);
+ return argf_readlines(argc, argv, argf);
}
- return rb_funcallv(argf, rb_intern("readlines"), argc, argv);
+ return forward(argf, rb_intern("readlines"), argc, argv);
}
/*
* call-seq:
- * ARGF.readlines(sep=$/) -> array
+ * ARGF.readlines(sep = $/) -> array
* ARGF.readlines(limit) -> array
* ARGF.readlines(sep, limit) -> array
*
- * ARGF.to_a(sep=$/) -> array
+ * ARGF.to_a(sep = $/) -> array
* ARGF.to_a(limit) -> array
* ARGF.to_a(sep, limit) -> array
*
- * Reads +ARGF+'s current file in its entirety, returning an +Array+ of its
- * lines, one line per element. Lines are assumed to be separated by _sep_.
+ * Reads each file in ARGF in its entirety, returning an Array containing
+ * lines from the files. Lines are assumed to be separated by _sep_.
*
* lines = ARGF.readlines
* lines[0] #=> "This is line one\n"
@@ -9023,17 +10476,17 @@ argf_readlines(int argc, VALUE *argv, VALUE argf)
ary = rb_ary_new();
while (next_argv()) {
- if (ARGF_GENERIC_INPUT_P()) {
- lines = rb_funcall3(ARGF.current_file, rb_intern("readlines"), argc, argv);
- }
- else {
- lines = rb_io_readlines(argc, argv, ARGF.current_file);
- argf_close(argf);
- }
- ARGF.next_p = 1;
- rb_ary_concat(ary, lines);
- ARGF.lineno = lineno + RARRAY_LEN(ary);
- ARGF.last_lineno = ARGF.lineno;
+ if (ARGF_GENERIC_INPUT_P()) {
+ lines = forward_current(rb_intern("readlines"), argc, argv);
+ }
+ else {
+ lines = rb_io_readlines(argc, argv, ARGF.current_file);
+ argf_close(argf);
+ }
+ ARGF.next_p = 1;
+ rb_ary_concat(ary, lines);
+ ARGF.lineno = lineno + RARRAY_LEN(ary);
+ ARGF.last_lineno = ARGF.lineno;
}
ARGF.init_p = 0;
return ary;
@@ -9041,16 +10494,23 @@ argf_readlines(int argc, VALUE *argv, VALUE argf)
/*
* call-seq:
- * `cmd` -> string
+ * `command` -> string
+ *
+ * Returns the <tt>$stdout</tt> output from running +command+ in a subshell;
+ * sets global variable <tt>$?</tt> to the process status.
+ *
+ * This method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
+ *
+ * Examples:
+ *
+ * $ `date` # => "Wed Apr 9 08:56:30 CDT 2003\n"
+ * $ `echo oops && exit 99` # => "oops\n"
+ * $ $? # => #<Process::Status: pid 17088 exit 99>
+ * $ $?.status # => 99>
*
- * Returns the standard output of running _cmd_ in a subshell.
- * The built-in syntax <code>%x{...}</code> uses
- * this method. Sets <code>$?</code> to the process status.
+ * The built-in syntax <tt>%x{...}</tt> uses this method.
*
- * `date` #=> "Wed Apr 9 08:56:30 CDT 2003\n"
- * `ls testdir`.split[1] #=> "main.rb"
- * `echo oops && exit 99` #=> "oops\n"
- * $?.exitstatus #=> 99
*/
static VALUE
@@ -9070,7 +10530,7 @@ rb_f_backquote(VALUE obj, VALUE str)
rb_io_close(port);
RFILE(port)->fptr = NULL;
rb_io_fptr_finalize(fptr);
- rb_gc_force_recycle(port); /* also guards from premature GC */
+ RB_GC_GUARD(port);
return result;
}
@@ -9091,63 +10551,63 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
struct timeval timerec;
if (!NIL_P(read)) {
- Check_Type(read, T_ARRAY);
- for (i=0; i<RARRAY_LEN(read); i++) {
- GetOpenFile(rb_io_get_io(RARRAY_AREF(read, i)), fptr);
- rb_fd_set(fptr->fd, &fds[0]);
- if (READ_DATA_PENDING(fptr) || READ_CHAR_PENDING(fptr)) { /* check for buffered data */
- pending++;
- rb_fd_set(fptr->fd, &fds[3]);
- }
- if (max < fptr->fd) max = fptr->fd;
- }
- if (pending) { /* no blocking if there's buffered data */
- timerec.tv_sec = timerec.tv_usec = 0;
- tp = &timerec;
- }
- rp = &fds[0];
+ Check_Type(read, T_ARRAY);
+ for (i=0; i<RARRAY_LEN(read); i++) {
+ GetOpenFile(rb_io_get_io(RARRAY_AREF(read, i)), fptr);
+ rb_fd_set(fptr->fd, &fds[0]);
+ if (READ_DATA_PENDING(fptr) || READ_CHAR_PENDING(fptr)) { /* check for buffered data */
+ pending++;
+ rb_fd_set(fptr->fd, &fds[3]);
+ }
+ if (max < fptr->fd) max = fptr->fd;
+ }
+ if (pending) { /* no blocking if there's buffered data */
+ timerec.tv_sec = timerec.tv_usec = 0;
+ tp = &timerec;
+ }
+ rp = &fds[0];
}
else
- rp = 0;
+ rp = 0;
if (!NIL_P(write)) {
- Check_Type(write, T_ARRAY);
- for (i=0; i<RARRAY_LEN(write); i++) {
+ Check_Type(write, T_ARRAY);
+ for (i=0; i<RARRAY_LEN(write); i++) {
VALUE write_io = GetWriteIO(rb_io_get_io(RARRAY_AREF(write, i)));
- GetOpenFile(write_io, fptr);
- rb_fd_set(fptr->fd, &fds[1]);
- if (max < fptr->fd) max = fptr->fd;
- }
- wp = &fds[1];
+ GetOpenFile(write_io, fptr);
+ rb_fd_set(fptr->fd, &fds[1]);
+ if (max < fptr->fd) max = fptr->fd;
+ }
+ wp = &fds[1];
}
else
- wp = 0;
+ wp = 0;
if (!NIL_P(except)) {
- Check_Type(except, T_ARRAY);
- for (i=0; i<RARRAY_LEN(except); i++) {
+ Check_Type(except, T_ARRAY);
+ for (i=0; i<RARRAY_LEN(except); i++) {
VALUE io = rb_io_get_io(RARRAY_AREF(except, i));
VALUE write_io = GetWriteIO(io);
- GetOpenFile(io, fptr);
- rb_fd_set(fptr->fd, &fds[2]);
- if (max < fptr->fd) max = fptr->fd;
+ GetOpenFile(io, fptr);
+ rb_fd_set(fptr->fd, &fds[2]);
+ if (max < fptr->fd) max = fptr->fd;
if (io != write_io) {
GetOpenFile(write_io, fptr);
rb_fd_set(fptr->fd, &fds[2]);
if (max < fptr->fd) max = fptr->fd;
}
- }
- ep = &fds[2];
+ }
+ ep = &fds[2];
}
else {
- ep = 0;
+ ep = 0;
}
max++;
n = rb_thread_fd_select(max, rp, wp, ep, tp);
if (n < 0) {
- rb_sys_fail(0);
+ rb_sys_fail(0);
}
if (!pending && n == 0) return Qnil; /* returns nil on timeout */
@@ -9157,48 +10617,48 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
if (rp) {
- list = RARRAY_AREF(res, 0);
- for (i=0; i< RARRAY_LEN(read); i++) {
- VALUE obj = rb_ary_entry(read, i);
- VALUE io = rb_io_get_io(obj);
- GetOpenFile(io, fptr);
- if (rb_fd_isset(fptr->fd, &fds[0]) ||
- rb_fd_isset(fptr->fd, &fds[3])) {
- rb_ary_push(list, obj);
- }
- }
+ list = RARRAY_AREF(res, 0);
+ for (i=0; i< RARRAY_LEN(read); i++) {
+ VALUE obj = rb_ary_entry(read, i);
+ VALUE io = rb_io_get_io(obj);
+ GetOpenFile(io, fptr);
+ if (rb_fd_isset(fptr->fd, &fds[0]) ||
+ rb_fd_isset(fptr->fd, &fds[3])) {
+ rb_ary_push(list, obj);
+ }
+ }
}
if (wp) {
- list = RARRAY_AREF(res, 1);
- for (i=0; i< RARRAY_LEN(write); i++) {
- VALUE obj = rb_ary_entry(write, i);
- VALUE io = rb_io_get_io(obj);
- VALUE write_io = GetWriteIO(io);
- GetOpenFile(write_io, fptr);
- if (rb_fd_isset(fptr->fd, &fds[1])) {
- rb_ary_push(list, obj);
- }
- }
+ list = RARRAY_AREF(res, 1);
+ for (i=0; i< RARRAY_LEN(write); i++) {
+ VALUE obj = rb_ary_entry(write, i);
+ VALUE io = rb_io_get_io(obj);
+ VALUE write_io = GetWriteIO(io);
+ GetOpenFile(write_io, fptr);
+ if (rb_fd_isset(fptr->fd, &fds[1])) {
+ rb_ary_push(list, obj);
+ }
+ }
}
if (ep) {
- list = RARRAY_AREF(res, 2);
- for (i=0; i< RARRAY_LEN(except); i++) {
- VALUE obj = rb_ary_entry(except, i);
- VALUE io = rb_io_get_io(obj);
- VALUE write_io = GetWriteIO(io);
- GetOpenFile(io, fptr);
- if (rb_fd_isset(fptr->fd, &fds[2])) {
- rb_ary_push(list, obj);
- }
- else if (io != write_io) {
- GetOpenFile(write_io, fptr);
- if (rb_fd_isset(fptr->fd, &fds[2])) {
- rb_ary_push(list, obj);
- }
- }
- }
+ list = RARRAY_AREF(res, 2);
+ for (i=0; i< RARRAY_LEN(except); i++) {
+ VALUE obj = rb_ary_entry(except, i);
+ VALUE io = rb_io_get_io(obj);
+ VALUE write_io = GetWriteIO(io);
+ GetOpenFile(io, fptr);
+ if (rb_fd_isset(fptr->fd, &fds[2])) {
+ rb_ary_push(list, obj);
+ }
+ else if (io != write_io) {
+ GetOpenFile(write_io, fptr);
+ if (rb_fd_isset(fptr->fd, &fds[2])) {
+ rb_ary_push(list, obj);
+ }
+ }
+ }
}
return res; /* returns an empty array on interrupt */
@@ -9225,7 +10685,7 @@ select_end(VALUE arg)
int i;
for (i = 0; i < numberof(p->fdsets); ++i)
- rb_fd_term(&p->fdsets[i]);
+ rb_fd_term(&p->fdsets[i]);
return Qnil;
}
@@ -9236,8 +10696,8 @@ static VALUE sym_normal, sym_sequential, sym_random,
struct io_advise_struct {
int fd;
int advice;
- off_t offset;
- off_t len;
+ rb_off_t offset;
+ rb_off_t len;
};
static VALUE
@@ -9252,39 +10712,39 @@ io_advise_sym_to_const(VALUE sym)
{
#ifdef POSIX_FADV_NORMAL
if (sym == sym_normal)
- return INT2NUM(POSIX_FADV_NORMAL);
+ return INT2NUM(POSIX_FADV_NORMAL);
#endif
#ifdef POSIX_FADV_RANDOM
if (sym == sym_random)
- return INT2NUM(POSIX_FADV_RANDOM);
+ return INT2NUM(POSIX_FADV_RANDOM);
#endif
#ifdef POSIX_FADV_SEQUENTIAL
if (sym == sym_sequential)
- return INT2NUM(POSIX_FADV_SEQUENTIAL);
+ return INT2NUM(POSIX_FADV_SEQUENTIAL);
#endif
#ifdef POSIX_FADV_WILLNEED
if (sym == sym_willneed)
- return INT2NUM(POSIX_FADV_WILLNEED);
+ return INT2NUM(POSIX_FADV_WILLNEED);
#endif
#ifdef POSIX_FADV_DONTNEED
if (sym == sym_dontneed)
- return INT2NUM(POSIX_FADV_DONTNEED);
+ return INT2NUM(POSIX_FADV_DONTNEED);
#endif
#ifdef POSIX_FADV_NOREUSE
if (sym == sym_noreuse)
- return INT2NUM(POSIX_FADV_NOREUSE);
+ return INT2NUM(POSIX_FADV_NOREUSE);
#endif
return Qnil;
}
static VALUE
-do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
+do_io_advise(rb_io_t *fptr, VALUE advice, rb_off_t offset, rb_off_t len)
{
int rv;
struct io_advise_struct ias;
@@ -9297,7 +10757,7 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
* silently ignore it. Because IO::advise is only hint.
*/
if (NIL_P(num_adv))
- return Qnil;
+ return Qnil;
ias.fd = fptr->fd;
ias.advice = NUM2INT(num_adv);
@@ -9306,14 +10766,14 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
rv = (int)rb_thread_io_blocking_region(io_advise_internal, &ias, fptr->fd);
if (rv && rv != ENOSYS) {
- /* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise
- it returns the error code. */
- VALUE message = rb_sprintf("%"PRIsVALUE" "
- "(%"PRI_OFFT_PREFIX"d, "
- "%"PRI_OFFT_PREFIX"d, "
- "%"PRIsVALUE")",
- fptr->pathv, offset, len, advice);
- rb_syserr_fail_str(rv, message);
+ /* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise
+ it returns the error code. */
+ VALUE message = rb_sprintf("%"PRIsVALUE" "
+ "(%"PRI_OFFT_PREFIX"d, "
+ "%"PRI_OFFT_PREFIX"d, "
+ "%"PRIsVALUE")",
+ fptr->pathv, offset, len, advice);
+ rb_syserr_fail_str(rv, message);
}
return Qnil;
@@ -9325,65 +10785,56 @@ static void
advice_arg_check(VALUE advice)
{
if (!SYMBOL_P(advice))
- rb_raise(rb_eTypeError, "advice must be a Symbol");
+ rb_raise(rb_eTypeError, "advice must be a Symbol");
if (advice != sym_normal &&
- advice != sym_sequential &&
- advice != sym_random &&
- advice != sym_willneed &&
- advice != sym_dontneed &&
- advice != sym_noreuse) {
- rb_raise(rb_eNotImpError, "Unsupported advice: %+"PRIsVALUE, advice);
+ advice != sym_sequential &&
+ advice != sym_random &&
+ advice != sym_willneed &&
+ advice != sym_dontneed &&
+ advice != sym_noreuse) {
+ rb_raise(rb_eNotImpError, "Unsupported advice: %+"PRIsVALUE, advice);
}
}
/*
* call-seq:
- * ios.advise(advice, offset=0, len=0) -> nil
+ * advise(advice, offset = 0, len = 0) -> nil
*
- * Announce an intention to access data from the current file in a
- * specific pattern. On platforms that do not support the
- * <em>posix_fadvise(2)</em> system call, this method is a no-op.
+ * Invokes Posix system call
+ * {posix_fadvise(2)}[https://linux.die.net/man/2/posix_fadvise],
+ * which announces an intention to access data from the current file
+ * in a particular manner.
*
- * _advice_ is one of the following symbols:
+ * The arguments and results are platform-dependent.
*
- * :normal:: No advice to give; the default assumption for an open file.
- * :sequential:: The data will be accessed sequentially
- * with lower offsets read before higher ones.
- * :random:: The data will be accessed in random order.
- * :willneed:: The data will be accessed in the near future.
- * :dontneed:: The data will not be accessed in the near future.
- * :noreuse:: The data will only be accessed once.
+ * The relevant data is specified by:
*
- * The semantics of a piece of advice are platform-dependent. See
- * <em>man 2 posix_fadvise</em> for details.
+ * - +offset+: The offset of the first byte of data.
+ * - +len+: The number of bytes to be accessed;
+ * if +len+ is zero, or is larger than the number of bytes remaining,
+ * all remaining bytes will be accessed.
*
- * "data" means the region of the current file that begins at
- * _offset_ and extends for _len_ bytes. If _len_ is 0, the region
- * ends at the last byte of the file. By default, both _offset_ and
- * _len_ are 0, meaning that the advice applies to the entire file.
+ * Argument +advice+ is one of the following symbols:
*
- * If an error occurs, one of the following exceptions will be raised:
+ * - +:normal+: The application has no advice to give
+ * about its access pattern for the specified data.
+ * If no advice is given for an open file, this is the default assumption.
+ * - +:sequential+: The application expects to access the specified data sequentially
+ * (with lower offsets read before higher ones).
+ * - +:random+: The specified data will be accessed in random order.
+ * - +:noreuse+: The specified data will be accessed only once.
+ * - +:willneed+: The specified data will be accessed in the near future.
+ * - +:dontneed+: The specified data will not be accessed in the near future.
*
- * IOError:: The IO stream is closed.
- * Errno::EBADF::
- * The file descriptor of the current file is invalid.
- * Errno::EINVAL:: An invalid value for _advice_ was given.
- * Errno::ESPIPE::
- * The file descriptor of the current file refers to a FIFO or
- * pipe. (Linux raises Errno::EINVAL in this case).
- * TypeError::
- * Either _advice_ was not a Symbol, or one of the
- * other arguments was not an Integer.
- * RangeError:: One of the arguments given was too big/small.
+ * Not implemented on all platforms.
*
- * This list is not exhaustive; other Errno:: exceptions are also possible.
*/
static VALUE
rb_io_advise(int argc, VALUE *argv, VALUE io)
{
VALUE advice, offset, len;
- off_t off, l;
+ rb_off_t off, l;
rb_io_t *fptr;
rb_scan_args(argc, argv, "12", &advice, &offset, &len);
@@ -9405,31 +10856,45 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * IO.select(read_array [, write_array [, error_array [, timeout]]]) -> array or nil
+ * IO.select(read_ios, write_ios = [], error_ios = [], timeout = nil) -> array or nil
*
- * Calls select(2) system call.
- * It monitors given arrays of IO objects, waits until one or more of
- * IO objects are ready for reading, are ready for writing, and have
- * pending exceptions respectively, and returns an array that contains
- * arrays of those IO objects. It will return +nil+ if optional
- * <i>timeout</i> value is given and no IO object is ready in
- * <i>timeout</i> seconds.
+ * Invokes system call {select(2)}[https://linux.die.net/man/2/select],
+ * which monitors multiple file descriptors,
+ * waiting until one or more of the file descriptors
+ * becomes ready for some class of I/O operation.
*
- * IO.select peeks the buffer of IO objects for testing readability.
- * If the IO buffer is not empty, IO.select immediately notifies
- * readability. This "peek" only happens for IO objects. It does not
+ * Not implemented on all platforms.
+ *
+ * Each of the arguments +read_ios+, +write_ios+, and +error_ios+
+ * is an array of IO objects.
+ *
+ * Argument +timeout+ is an integer timeout interval in seconds.
+ *
+ * The method monitors the \IO objects given in all three arrays,
+ * waiting for some to be ready;
+ * returns a 3-element array whose elements are:
+ *
+ * - An array of the objects in +read_ios+ that are ready for reading.
+ * - An array of the objects in +write_ios+ that are ready for writing.
+ * - An array of the objects in +error_ios+ have pending exceptions.
+ *
+ * If no object becomes ready within the given +timeout+, +nil+ is returned.
+ *
+ * \IO.select peeks the buffer of \IO objects for testing readability.
+ * If the \IO buffer is not empty, \IO.select immediately notifies
+ * readability. This "peek" only happens for \IO objects. It does not
* happen for IO-like objects such as OpenSSL::SSL::SSLSocket.
*
- * The best way to use IO.select is invoking it after nonblocking
+ * The best way to use \IO.select is invoking it after non-blocking
* methods such as #read_nonblock, #write_nonblock, etc. The methods
* raise an exception which is extended by IO::WaitReadable or
* IO::WaitWritable. The modules notify how the caller should wait
- * with IO.select. If IO::WaitReadable is raised, the caller should
+ * with \IO.select. If IO::WaitReadable is raised, the caller should
* wait for reading. If IO::WaitWritable is raised, the caller should
* wait for writing.
*
* So, blocking read (#readpartial) can be emulated using
- * #read_nonblock and IO.select as follows:
+ * #read_nonblock and \IO.select as follows:
*
* begin
* result = io_like.read_nonblock(maxlen)
@@ -9441,16 +10906,16 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* retry
* end
*
- * Especially, the combination of nonblocking methods and IO.select is
+ * Especially, the combination of non-blocking methods and \IO.select is
* preferred for IO like objects such as OpenSSL::SSL::SSLSocket. It
* has #to_io method to return underlying IO object. IO.select calls
* #to_io to obtain the file descriptor to wait.
*
- * This means that readability notified by IO.select doesn't mean
+ * This means that readability notified by \IO.select doesn't mean
* readability from OpenSSL::SSL::SSLSocket object.
*
* The most likely situation is that OpenSSL::SSL::SSLSocket buffers
- * some data. IO.select doesn't see the buffer. So IO.select can
+ * some data. \IO.select doesn't see the buffer. So \IO.select can
* block when OpenSSL::SSL::SSLSocket#readpartial doesn't block.
*
* However, several more complicated situations exist.
@@ -9470,23 +10935,23 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* So, the caller should wait for ready for writability as above
* example.
*
- * The combination of nonblocking methods and IO.select is also useful
+ * The combination of non-blocking methods and \IO.select is also useful
* for streams such as tty, pipe socket socket when multiple processes
* read from a stream.
*
* Finally, Linux kernel developers don't guarantee that
* readability of select(2) means readability of following read(2) even
- * for a single process.
- * See select(2) manual on GNU/Linux system.
+ * for a single process;
+ * see {select(2)}[https://linux.die.net/man/2/select]
*
- * Invoking IO.select before IO#readpartial works well as usual.
- * However it is not the best way to use IO.select.
+ * Invoking \IO.select before IO#readpartial works well as usual.
+ * However it is not the best way to use \IO.select.
*
* The writability notified by select(2) doesn't show
* how many bytes are writable.
* IO#write method blocks until given whole string is written.
- * So, <code>IO#write(two or more bytes)</code> can block after
- * writability is notified by IO.select. IO#write_nonblock is required
+ * So, <tt>IO#write(two or more bytes)</tt> can block after
+ * writability is notified by \IO.select. IO#write_nonblock is required
* to avoid the blocking.
*
* Blocking write (#write) can be emulated using #write_nonblock and
@@ -9506,13 +10971,7 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* string = string.byteslice(written..-1)
* end
*
- * === Parameters
- * read_array:: an array of IO objects that wait until ready for read
- * write_array:: an array of IO objects that wait until ready for write
- * error_array:: an array of IO objects that wait for exceptions
- * timeout:: a numeric value in second
- *
- * === Example
+ * Example:
*
* rp, wp = IO.pipe
* mesg = "ping "
@@ -9534,18 +10993,26 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* end
* }
*
- * <em>produces:</em>
+ * Output:
*
* ping pong
* ping pong
* ping pong
* (snipped)
* ping
+ *
*/
static VALUE
rb_f_select(int argc, VALUE *argv, VALUE obj)
{
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ // It's optionally supported.
+ VALUE result = rb_fiber_scheduler_io_selectv(scheduler, argc, argv);
+ if (!UNDEF_P(result)) return result;
+ }
+
VALUE timeout;
struct select_args args;
struct timeval timerec;
@@ -9553,22 +11020,21 @@ rb_f_select(int argc, VALUE *argv, VALUE obj)
rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
if (NIL_P(timeout)) {
- args.timeout = 0;
+ args.timeout = 0;
}
else {
- timerec = rb_time_interval(timeout);
- args.timeout = &timerec;
+ timerec = rb_time_interval(timeout);
+ args.timeout = &timerec;
}
for (i = 0; i < numberof(args.fdsets); ++i)
- rb_fd_init(&args.fdsets[i]);
+ rb_fd_init(&args.fdsets[i]);
return rb_ensure(select_call, (VALUE)&args, select_end, (VALUE)&args);
}
-#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
- typedef unsigned long ioctl_req_t;
-# define NUM2IOCTLREQ(num) NUM2ULONG(num)
+#ifdef IOCTL_REQ_TYPE
+ typedef IOCTL_REQ_TYPE ioctl_req_t;
#else
typedef int ioctl_req_t;
# define NUM2IOCTLREQ(num) ((int)NUM2LONG(num))
@@ -9605,7 +11071,7 @@ do_ioctl(int fd, ioctl_req_t cmd, long narg)
}
#endif
-#define DEFULT_IOCTL_NARG_LEN (256)
+#define DEFAULT_IOCTL_NARG_LEN (256)
#if defined(__linux__) && defined(_IOC_SIZE)
static long
@@ -9614,20 +11080,21 @@ linux_iocparm_len(ioctl_req_t cmd)
long len;
if ((cmd & 0xFFFF0000) == 0) {
- /* legacy and unstructured ioctl number. */
- return DEFULT_IOCTL_NARG_LEN;
+ /* legacy and unstructured ioctl number. */
+ return DEFAULT_IOCTL_NARG_LEN;
}
len = _IOC_SIZE(cmd);
/* paranoia check for silly drivers which don't keep ioctl convention */
- if (len < DEFULT_IOCTL_NARG_LEN)
- len = DEFULT_IOCTL_NARG_LEN;
+ if (len < DEFAULT_IOCTL_NARG_LEN)
+ len = DEFAULT_IOCTL_NARG_LEN;
return len;
}
#endif
+#ifdef HAVE_IOCTL
static long
ioctl_narg_len(ioctl_req_t cmd)
{
@@ -9644,11 +11111,12 @@ ioctl_narg_len(ioctl_req_t cmd)
len = linux_iocparm_len(cmd);
#else
/* otherwise guess at what's safe */
- len = DEFULT_IOCTL_NARG_LEN;
+ len = DEFAULT_IOCTL_NARG_LEN;
#endif
return len;
}
+#endif
#ifdef HAVE_FCNTL
#ifdef __linux__
@@ -9659,181 +11127,196 @@ typedef int fcntl_arg_t;
#endif
static long
-fcntl_narg_len(int cmd)
+fcntl_narg_len(ioctl_req_t cmd)
{
long len;
switch (cmd) {
#ifdef F_DUPFD
case F_DUPFD:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_DUP2FD /* bsd specific */
case F_DUP2FD:
- len = sizeof(int);
- break;
+ len = sizeof(int);
+ break;
#endif
#ifdef F_DUPFD_CLOEXEC /* linux specific */
case F_DUPFD_CLOEXEC:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_GETFD
case F_GETFD:
- len = 1;
- break;
+ len = 1;
+ break;
#endif
#ifdef F_SETFD
case F_SETFD:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_GETFL
case F_GETFL:
- len = 1;
- break;
+ len = 1;
+ break;
#endif
#ifdef F_SETFL
case F_SETFL:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_GETOWN
case F_GETOWN:
- len = 1;
- break;
+ len = 1;
+ break;
#endif
#ifdef F_SETOWN
case F_SETOWN:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_GETOWN_EX /* linux specific */
case F_GETOWN_EX:
- len = sizeof(struct f_owner_ex);
- break;
+ len = sizeof(struct f_owner_ex);
+ break;
#endif
#ifdef F_SETOWN_EX /* linux specific */
case F_SETOWN_EX:
- len = sizeof(struct f_owner_ex);
- break;
+ len = sizeof(struct f_owner_ex);
+ break;
#endif
#ifdef F_GETLK
case F_GETLK:
- len = sizeof(struct flock);
- break;
+ len = sizeof(struct flock);
+ break;
#endif
#ifdef F_SETLK
case F_SETLK:
- len = sizeof(struct flock);
- break;
+ len = sizeof(struct flock);
+ break;
#endif
#ifdef F_SETLKW
case F_SETLKW:
- len = sizeof(struct flock);
- break;
+ len = sizeof(struct flock);
+ break;
#endif
#ifdef F_READAHEAD /* bsd specific */
case F_READAHEAD:
- len = sizeof(int);
- break;
+ len = sizeof(int);
+ break;
#endif
#ifdef F_RDAHEAD /* Darwin specific */
case F_RDAHEAD:
- len = sizeof(int);
- break;
+ len = sizeof(int);
+ break;
#endif
#ifdef F_GETSIG /* linux specific */
case F_GETSIG:
- len = 1;
- break;
+ len = 1;
+ break;
#endif
#ifdef F_SETSIG /* linux specific */
case F_SETSIG:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_GETLEASE /* linux specific */
case F_GETLEASE:
- len = 1;
- break;
+ len = 1;
+ break;
#endif
#ifdef F_SETLEASE /* linux specific */
case F_SETLEASE:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
#ifdef F_NOTIFY /* linux specific */
case F_NOTIFY:
- len = sizeof(fcntl_arg_t);
- break;
+ len = sizeof(fcntl_arg_t);
+ break;
#endif
default:
- len = 256;
- break;
+ len = 256;
+ break;
}
return len;
}
#else /* HAVE_FCNTL */
static long
-fcntl_narg_len(int cmd)
+fcntl_narg_len(ioctl_req_t cmd)
{
return 0;
}
#endif /* HAVE_FCNTL */
+#define NARG_SENTINEL 17
+
static long
-setup_narg(ioctl_req_t cmd, VALUE *argp, int io_p)
+setup_narg(ioctl_req_t cmd, VALUE *argp, long (*narg_len)(ioctl_req_t))
{
long narg = 0;
VALUE arg = *argp;
- if (NIL_P(arg) || arg == Qfalse) {
- narg = 0;
+ if (!RTEST(arg)) {
+ narg = 0;
}
else if (FIXNUM_P(arg)) {
- narg = FIX2LONG(arg);
+ narg = FIX2LONG(arg);
}
else if (arg == Qtrue) {
- narg = 1;
+ narg = 1;
}
else {
- VALUE tmp = rb_check_string_type(arg);
-
- if (NIL_P(tmp)) {
- narg = NUM2LONG(arg);
- }
- else {
- char *ptr;
- long len, slen;
-
- *argp = arg = tmp;
- if (io_p)
- len = ioctl_narg_len(cmd);
- else
- len = fcntl_narg_len((int)cmd);
- rb_str_modify(arg);
-
- slen = RSTRING_LEN(arg);
- /* expand for data + sentinel. */
- if (slen < len+1) {
- rb_str_resize(arg, len+1);
- MEMZERO(RSTRING_PTR(arg)+slen, char, len-slen);
- slen = len+1;
- }
- /* a little sanity check here */
- ptr = RSTRING_PTR(arg);
- ptr[slen - 1] = 17;
- narg = (long)(SIGNED_VALUE)ptr;
- }
+ VALUE tmp = rb_check_string_type(arg);
+
+ if (NIL_P(tmp)) {
+ narg = NUM2LONG(arg);
+ }
+ else {
+ char *ptr;
+ long len, slen;
+
+ *argp = arg = tmp;
+ len = narg_len(cmd);
+ rb_str_modify(arg);
+
+ slen = RSTRING_LEN(arg);
+ /* expand for data + sentinel. */
+ if (slen < len+1) {
+ rb_str_resize(arg, len+1);
+ MEMZERO(RSTRING_PTR(arg)+slen, char, len-slen);
+ slen = len+1;
+ }
+ /* a little sanity check here */
+ ptr = RSTRING_PTR(arg);
+ ptr[slen - 1] = NARG_SENTINEL;
+ narg = (long)(SIGNED_VALUE)ptr;
+ }
}
return narg;
}
+static VALUE
+finish_narg(int retval, VALUE arg, const rb_io_t *fptr)
+{
+ if (retval < 0) rb_sys_fail_path(fptr->pathv);
+ if (RB_TYPE_P(arg, T_STRING)) {
+ char *ptr;
+ long slen;
+ RSTRING_GETMEM(arg, ptr, slen);
+ if (ptr[slen-1] != NARG_SENTINEL)
+ rb_raise(rb_eArgError, "return value overflowed string");
+ ptr[slen-1] = '\0';
+ }
+
+ return INT2NUM(retval);
+}
+
#ifdef HAVE_IOCTL
static VALUE
rb_ioctl(VALUE io, VALUE req, VALUE arg)
@@ -9843,32 +11326,28 @@ rb_ioctl(VALUE io, VALUE req, VALUE arg)
long narg;
int retval;
- narg = setup_narg(cmd, &arg, 1);
+ narg = setup_narg(cmd, &arg, ioctl_narg_len);
GetOpenFile(io, fptr);
retval = do_ioctl(fptr->fd, cmd, narg);
- if (retval < 0) rb_sys_fail_path(fptr->pathv);
- if (RB_TYPE_P(arg, T_STRING)) {
- char *ptr;
- long slen;
- RSTRING_GETMEM(arg, ptr, slen);
- if (ptr[slen-1] != 17)
- rb_raise(rb_eArgError, "return value overflowed string");
- ptr[slen-1] = '\0';
- }
-
- return INT2NUM(retval);
+ return finish_narg(retval, arg, fptr);
}
/*
* call-seq:
- * ios.ioctl(integer_cmd, arg) -> integer
+ * ioctl(integer_cmd, argument) -> integer
+ *
+ * Invokes Posix system call {ioctl(2)}[https://linux.die.net/man/2/ioctl],
+ * which issues a low-level command to an I/O device.
+ *
+ * Issues a low-level command to an I/O device.
+ * The arguments and returned value are platform-dependent.
+ * The effect of the call is platform-dependent.
+ *
+ * If argument +argument+ is an integer, it is passed directly;
+ * if it is a string, it is interpreted as a binary sequence of bytes.
+ *
+ * Not implemented on all platforms.
*
- * Provides a mechanism for issuing low-level commands to control or
- * query I/O devices. Arguments and results are platform dependent. If
- * <i>arg</i> is a number, its value is passed directly. If it is a
- * string, it is interpreted as a binary sequence of bytes. On Unix
- * platforms, see <code>ioctl(2)</code> for details. Not implemented on
- * all platforms.
*/
static VALUE
@@ -9897,7 +11376,7 @@ nogvl_fcntl(void *ptr)
#if defined(F_DUPFD)
if (arg->cmd == F_DUPFD)
- return (VALUE)rb_cloexec_fcntl_dupfd(arg->fd, (int)arg->narg);
+ return (VALUE)rb_cloexec_fcntl_dupfd(arg->fd, (int)arg->narg);
#endif
return (VALUE)fcntl(arg->fd, arg->cmd, arg->narg);
}
@@ -9914,15 +11393,15 @@ do_fcntl(int fd, int cmd, long narg)
retval = (int)rb_thread_io_blocking_region(nogvl_fcntl, &arg, fd);
if (retval != -1) {
- switch (cmd) {
+ switch (cmd) {
#if defined(F_DUPFD)
- case F_DUPFD:
+ case F_DUPFD:
#endif
#if defined(F_DUPFD_CLOEXEC)
- case F_DUPFD_CLOEXEC:
+ case F_DUPFD_CLOEXEC:
#endif
- rb_update_max_fd(retval);
- }
+ rb_update_max_fd(retval);
+ }
}
return retval;
@@ -9936,33 +11415,27 @@ rb_fcntl(VALUE io, VALUE req, VALUE arg)
long narg;
int retval;
- narg = setup_narg(cmd, &arg, 0);
+ narg = setup_narg(cmd, &arg, fcntl_narg_len);
GetOpenFile(io, fptr);
retval = do_fcntl(fptr->fd, cmd, narg);
- if (retval < 0) rb_sys_fail_path(fptr->pathv);
- if (RB_TYPE_P(arg, T_STRING)) {
- char *ptr;
- long slen;
- RSTRING_GETMEM(arg, ptr, slen);
- if (ptr[slen-1] != 17)
- rb_raise(rb_eArgError, "return value overflowed string");
- ptr[slen-1] = '\0';
- }
-
- return INT2NUM(retval);
+ return finish_narg(retval, arg, fptr);
}
/*
* call-seq:
- * ios.fcntl(integer_cmd, arg) -> integer
+ * fcntl(integer_cmd, argument) -> integer
+ *
+ * Invokes Posix system call {fcntl(2)}[https://linux.die.net/man/2/fcntl],
+ * which provides a mechanism for issuing low-level commands to control or query
+ * a file-oriented I/O stream. Arguments and results are platform
+ * dependent.
+ *
+ * If +argument is a number, its value is passed directly;
+ * if it is a string, it is interpreted as a binary sequence of bytes.
+ * (Array#pack might be a useful way to build this string.)
+ *
+ * Not implemented on all platforms.
*
- * Provides a mechanism for issuing low-level commands to control or
- * query file-oriented I/O streams. Arguments and results are platform
- * dependent. If <i>arg</i> is a number, its value is passed
- * directly. If it is a string, it is interpreted as a binary sequence
- * of bytes (Array#pack might be a useful way to build this string). On
- * Unix platforms, see <code>fcntl(2)</code> for details. Not
- * implemented on all platforms.
*/
static VALUE
@@ -9980,36 +11453,29 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io)
#if defined(HAVE_SYSCALL) || defined(HAVE___SYSCALL)
/*
* call-seq:
- * syscall(num [, args...]) -> integer
+ * syscall(integer_callno, *arguments) -> integer
*
- * Calls the operating system function identified by _num_ and
- * returns the result of the function or raises SystemCallError if
- * it failed.
+ * Invokes Posix system call {syscall(2)}[https://linux.die.net/man/2/syscall],
+ * which calls a specified function.
*
- * Arguments for the function can follow _num_. They must be either
- * +String+ objects or +Integer+ objects. A +String+ object is passed
- * as a pointer to the byte sequence. An +Integer+ object is passed
- * as an integer whose bit size is same as a pointer.
- * Up to nine parameters may be passed.
+ * Calls the operating system function identified by +integer_callno+;
+ * returns the result of the function or raises SystemCallError if it failed.
+ * The effect of the call is platform-dependent.
+ * The arguments and returned value are platform-dependent.
*
- * The function identified by _num_ is system
- * dependent. On some Unix systems, the numbers may be obtained from a
- * header file called <code>syscall.h</code>.
+ * For each of +arguments+: if it is an integer, it is passed directly;
+ * if it is a string, it is interpreted as a binary sequence of bytes.
+ * There may be as many as nine such arguments.
*
- * syscall 4, 1, "hello\n", 6 # '4' is write(2) on our box
+ * Arguments +integer_callno+ and +argument+, as well as the returned value,
+ * are platform-dependent.
*
- * <em>produces:</em>
- *
- * hello
- *
- * Calling +syscall+ on a platform which does not have any way to
- * an arbitrary system function just fails with NotImplementedError.
- *
- * *Note:*
- * +syscall+ is essentially unsafe and unportable.
- * Feel free to shoot your foot.
+ * Note: Method +syscall+ is essentially unsafe and unportable.
* The DL (Fiddle) library is preferred for safer and a bit
* more portable programming.
+ *
+ * Not implemented on all platforms.
+ *
*/
static VALUE
@@ -10048,56 +11514,57 @@ rb_f_syscall(int argc, VALUE *argv, VALUE _)
int i;
if (RTEST(ruby_verbose)) {
- rb_warning("We plan to remove a syscall function at future release. DL(Fiddle) provides safer alternative.");
+ rb_category_warning(RB_WARN_CATEGORY_DEPRECATED,
+ "We plan to remove a syscall function at future release. DL(Fiddle) provides safer alternative.");
}
if (argc == 0)
- rb_raise(rb_eArgError, "too few arguments for syscall");
+ rb_raise(rb_eArgError, "too few arguments for syscall");
if (argc > numberof(arg))
- rb_raise(rb_eArgError, "too many arguments for syscall");
+ rb_raise(rb_eArgError, "too many arguments for syscall");
num = NUM2SYSCALLID(argv[0]); ++argv;
for (i = argc - 1; i--; ) {
- VALUE v = rb_check_string_type(argv[i]);
+ VALUE v = rb_check_string_type(argv[i]);
- if (!NIL_P(v)) {
- SafeStringValue(v);
- rb_str_modify(v);
- arg[i] = (VALUE)StringValueCStr(v);
- }
- else {
- arg[i] = (VALUE)NUM2LONG(argv[i]);
- }
+ if (!NIL_P(v)) {
+ SafeStringValue(v);
+ rb_str_modify(v);
+ arg[i] = (VALUE)StringValueCStr(v);
+ }
+ else {
+ arg[i] = (VALUE)NUM2LONG(argv[i]);
+ }
}
switch (argc) {
case 1:
- retval = SYSCALL(num);
- break;
+ retval = SYSCALL(num);
+ break;
case 2:
- retval = SYSCALL(num, arg[0]);
- break;
+ retval = SYSCALL(num, arg[0]);
+ break;
case 3:
- retval = SYSCALL(num, arg[0],arg[1]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1]);
+ break;
case 4:
- retval = SYSCALL(num, arg[0],arg[1],arg[2]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1],arg[2]);
+ break;
case 5:
- retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3]);
+ break;
case 6:
- retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4]);
+ break;
case 7:
- retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);
+ break;
case 8:
- retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]);
- break;
+ retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]);
+ break;
}
if (retval == -1)
- rb_sys_fail(0);
+ rb_sys_fail(0);
return RETVAL2NUM(retval);
#undef SYSCALL
#undef NUM2SYSCALLID
@@ -10129,51 +11596,51 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt)
VALUE ecopts, tmp;
if (!NIL_P(v2)) {
- enc2 = find_encoding(v1);
- tmp = rb_check_string_type(v2);
- if (!NIL_P(tmp)) {
- if (RSTRING_LEN(tmp) == 1 && RSTRING_PTR(tmp)[0] == '-') {
- /* Special case - "-" => no transcoding */
- enc = enc2;
- enc2 = NULL;
- }
- else
- enc = find_encoding(v2);
- if (enc == enc2) {
- /* Special case - "-" => no transcoding */
- enc2 = NULL;
- }
- }
- else {
- enc = find_encoding(v2);
- if (enc == enc2) {
- /* Special case - "-" => no transcoding */
- enc2 = NULL;
- }
- }
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
- ecflags = rb_econv_prepare_options(opt, &ecopts, ecflags);
+ enc2 = find_encoding(v1);
+ tmp = rb_check_string_type(v2);
+ if (!NIL_P(tmp)) {
+ if (RSTRING_LEN(tmp) == 1 && RSTRING_PTR(tmp)[0] == '-') {
+ /* Special case - "-" => no transcoding */
+ enc = enc2;
+ enc2 = NULL;
+ }
+ else
+ enc = find_encoding(v2);
+ if (enc == enc2) {
+ /* Special case - "-" => no transcoding */
+ enc2 = NULL;
+ }
+ }
+ else {
+ enc = find_encoding(v2);
+ if (enc == enc2) {
+ /* Special case - "-" => no transcoding */
+ enc2 = NULL;
+ }
+ }
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ ecflags = rb_econv_prepare_options(opt, &ecopts, ecflags);
}
else {
- if (NIL_P(v1)) {
- /* Set to default encodings */
- rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2, 0);
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ if (NIL_P(v1)) {
+ /* Set to default encodings */
+ rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2, 0);
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecopts = Qnil;
- }
- else {
- tmp = rb_check_string_type(v1);
- if (!NIL_P(tmp) && rb_enc_asciicompat(enc = rb_enc_get(tmp))) {
+ }
+ else {
+ tmp = rb_check_string_type(v1);
+ if (!NIL_P(tmp) && rb_enc_asciicompat(enc = rb_enc_get(tmp))) {
parse_mode_enc(RSTRING_PTR(tmp), enc, &enc, &enc2, NULL);
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecflags = rb_econv_prepare_options(opt, &ecopts, ecflags);
- }
- else {
- rb_io_ext_int_to_encs(find_encoding(v1), NULL, &enc, &enc2, 0);
- SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
+ }
+ else {
+ rb_io_ext_int_to_encs(find_encoding(v1), NULL, &enc, &enc2, 0);
+ SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecopts = Qnil;
- }
- }
+ }
+ }
}
validate_enc_binmode(&fptr->mode, ecflags, enc, enc2);
fptr->encs.enc = enc;
@@ -10208,62 +11675,81 @@ pipe_pair_close(VALUE rw)
/*
* call-seq:
- * IO.pipe -> [read_io, write_io]
- * IO.pipe(ext_enc) -> [read_io, write_io]
- * IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io]
- * IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io]
+ * IO.pipe(**opts) -> [read_io, write_io]
+ * IO.pipe(enc, **opts) -> [read_io, write_io]
+ * IO.pipe(ext_enc, int_enc, **opts) -> [read_io, write_io]
+ * IO.pipe(**opts) {|read_io, write_io] ...} -> object
+ * IO.pipe(enc, **opts) {|read_io, write_io] ...} -> object
+ * IO.pipe(ext_enc, int_enc, **opts) {|read_io, write_io] ...} -> object
*
- * IO.pipe(...) {|read_io, write_io| ... }
+ * Creates a pair of pipe endpoints, +read_io+ and +write_io+,
+ * connected to each other.
*
- * Creates a pair of pipe endpoints (connected to each other) and
- * returns them as a two-element array of IO objects:
- * <code>[</code> <i>read_io</i>, <i>write_io</i> <code>]</code>.
+ * If argument +enc_string+ is given, it must be a string containing one of:
*
- * If a block is given, the block is called and
- * returns the value of the block.
- * <i>read_io</i> and <i>write_io</i> are sent to the block as arguments.
- * If read_io and write_io are not closed when the block exits, they are closed.
- * i.e. closing read_io and/or write_io doesn't cause an error.
+ * - The name of the encoding to be used as the external encoding.
+ * - The colon-separated names of two encodings to be used as the external
+ * and internal encodings.
*
- * Not available on all platforms.
+ * If argument +int_enc+ is given, it must be an Encoding object
+ * or encoding name string that specifies the internal encoding to be used;
+ * if argument +ext_enc+ is also given, it must be an Encoding object
+ * or encoding name string that specifies the external encoding to be used.
+ *
+ * The string read from +read_io+ is tagged with the external encoding;
+ * if an internal encoding is also specified, the string is converted
+ * to, and tagged with, that encoding.
+ *
+ * If any encoding is specified,
+ * optional hash arguments specify the conversion option.
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding Options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ *
+ * With no block given, returns the two endpoints in an array:
+ *
+ * IO.pipe # => [#<IO:fd 4>, #<IO:fd 5>]
+ *
+ * With a block given, calls the block with the two endpoints;
+ * closes both endpoints and returns the value of the block:
*
- * If an encoding (encoding name or encoding object) is specified as an optional argument,
- * read string from pipe is tagged with the encoding specified.
- * If the argument is a colon separated two encoding names "A:B",
- * the read string is converted from encoding A (external encoding)
- * to encoding B (internal encoding), then tagged with B.
- * If two optional arguments are specified, those must be
- * encoding objects or encoding names,
- * and the first one is the external encoding,
- * and the second one is the internal encoding.
- * If the external encoding and the internal encoding is specified,
- * optional hash argument specify the conversion option.
+ * IO.pipe {|read_io, write_io| p read_io; p write_io }
+ *
+ * Output:
+ *
+ * #<IO:fd 6>
+ * #<IO:fd 7>
+ *
+ * Not available on all platforms.
*
* In the example below, the two processes close the ends of the pipe
* that they are not using. This is not just a cosmetic nicety. The
* read end of a pipe will not generate an end of file condition if
* there are any writers with the pipe still open. In the case of the
- * parent process, the <code>rd.read</code> will never return if it
- * does not first issue a <code>wr.close</code>.
- *
- * rd, wr = IO.pipe
- *
- * if fork
- * wr.close
- * puts "Parent got: <#{rd.read}>"
- * rd.close
- * Process.wait
- * else
- * rd.close
- * puts "Sending message to parent"
- * wr.write "Hi Dad"
- * wr.close
- * end
+ * parent process, the <tt>rd.read</tt> will never return if it
+ * does not first issue a <tt>wr.close</tt>:
+ *
+ * rd, wr = IO.pipe
+ *
+ * if fork
+ * wr.close
+ * puts "Parent got: <#{rd.read}>"
+ * rd.close
+ * Process.wait
+ * else
+ * rd.close
+ * puts 'Sending message to parent'
+ * wr.write "Hi Dad"
+ * wr.close
+ * end
*
* <em>produces:</em>
*
* Sending message to parent
* Parent got: <Hi Dad>
+ *
*/
static VALUE
@@ -10286,9 +11772,9 @@ rb_io_s_pipe(int argc, VALUE *argv, VALUE klass)
args[2] = INT2FIX(O_RDONLY);
r = rb_protect(io_new_instance, (VALUE)args, &state);
if (state) {
- close(pipes[0]);
- close(pipes[1]);
- rb_jump_tag(state);
+ close(pipes[0]);
+ close(pipes[1]);
+ rb_jump_tag(state);
}
GetOpenFile(r, fptr);
@@ -10298,55 +11784,55 @@ rb_io_s_pipe(int argc, VALUE *argv, VALUE klass)
ies_args.opt = opt;
rb_protect(io_encoding_set_v, (VALUE)&ies_args, &state);
if (state) {
- close(pipes[1]);
+ close(pipes[1]);
io_close(r);
- rb_jump_tag(state);
+ rb_jump_tag(state);
}
args[1] = INT2NUM(pipes[1]);
args[2] = INT2FIX(O_WRONLY);
w = rb_protect(io_new_instance, (VALUE)args, &state);
if (state) {
- close(pipes[1]);
- if (!NIL_P(r)) rb_io_close(r);
- rb_jump_tag(state);
+ close(pipes[1]);
+ if (!NIL_P(r)) rb_io_close(r);
+ rb_jump_tag(state);
}
GetOpenFile(w, fptr2);
rb_io_synchronized(fptr2);
extract_binmode(opt, &fmode);
- if ((fmode & FMODE_BINMODE) && v1 == Qnil) {
+ if ((fmode & FMODE_BINMODE) && NIL_P(v1)) {
rb_io_ascii8bit_binmode(r);
rb_io_ascii8bit_binmode(w);
}
#if DEFAULT_TEXTMODE
if ((fptr->mode & FMODE_TEXTMODE) && (fmode & FMODE_BINMODE)) {
- fptr->mode &= ~FMODE_TEXTMODE;
- setmode(fptr->fd, O_BINARY);
+ fptr->mode &= ~FMODE_TEXTMODE;
+ setmode(fptr->fd, O_BINARY);
}
-#if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
+#if RUBY_CRLF_ENVIRONMENT
if (fptr->encs.ecflags & ECONV_DEFAULT_NEWLINE_DECORATOR) {
- fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
+ fptr->encs.ecflags |= ECONV_UNIVERSAL_NEWLINE_DECORATOR;
}
#endif
#endif
fptr->mode |= fmode;
#if DEFAULT_TEXTMODE
if ((fptr2->mode & FMODE_TEXTMODE) && (fmode & FMODE_BINMODE)) {
- fptr2->mode &= ~FMODE_TEXTMODE;
- setmode(fptr2->fd, O_BINARY);
+ fptr2->mode &= ~FMODE_TEXTMODE;
+ setmode(fptr2->fd, O_BINARY);
}
#endif
fptr2->mode |= fmode;
ret = rb_assoc_new(r, w);
if (rb_block_given_p()) {
- VALUE rw[2];
- rw[0] = r;
- rw[1] = w;
- return rb_ensure(rb_yield, ret, pipe_pair_close, (VALUE)rw);
+ VALUE rw[2];
+ rw[0] = r;
+ rw[1] = w;
+ return rb_ensure(rb_yield, ret, pipe_pair_close, (VALUE)rw);
}
return ret;
}
@@ -10370,15 +11856,15 @@ open_key_args(VALUE klass, int argc, VALUE *argv, VALUE opt, struct foreach_arg
arg->argc = argc;
arg->argv = argv;
if (NIL_P(opt)) {
- vmode = INT2NUM(O_RDONLY);
- vperm = INT2FIX(0666);
+ vmode = INT2NUM(O_RDONLY);
+ vperm = INT2FIX(0666);
}
else if (!NIL_P(v = rb_hash_aref(opt, sym_open_args))) {
- int n;
+ int n;
- v = rb_to_array_type(v);
- n = RARRAY_LENINT(v);
- rb_check_arity(n, 0, 3); /* rb_io_open */
+ v = rb_to_array_type(v);
+ n = RARRAY_LENINT(v);
+ rb_check_arity(n, 0, 3); /* rb_io_open */
rb_scan_args_kw(RB_SCAN_ARGS_LAST_HASH_KEYWORDS, n, RARRAY_CONST_PTR(v), "02:", &vmode, &vperm, &opt);
}
arg->io = rb_io_open(klass, path, vmode, vperm, opt);
@@ -10390,9 +11876,11 @@ io_s_foreach(VALUE v)
struct getline_arg *arg = (void *)v;
VALUE str;
+ if (arg->limit == 0)
+ rb_raise(rb_eArgError, "invalid limit: 0 for foreach");
while (!NIL_P(str = rb_io_getline_1(arg->rs, arg->limit, arg->chomp, arg->io))) {
- rb_lastline_set(str);
- rb_yield(str);
+ rb_lastline_set(str);
+ rb_yield(str);
}
rb_lastline_set(Qnil);
return Qnil;
@@ -10400,28 +11888,93 @@ io_s_foreach(VALUE v)
/*
* call-seq:
- * IO.foreach(name, sep=$/ [, getline_args, open_args]) {|line| block } -> nil
- * IO.foreach(name, limit [, getline_args, open_args]) {|line| block } -> nil
- * IO.foreach(name, sep, limit [, getline_args, open_args]) {|line| block } -> nil
- * IO.foreach(...) -> an_enumerator
+ * IO.foreach(path, sep = $/, **opts) {|line| block } -> nil
+ * IO.foreach(path, limit, **opts) {|line| block } -> nil
+ * IO.foreach(path, sep, limit, **opts) {|line| block } -> nil
+ * IO.foreach(command, sep = $/, **opts) {|line| block } -> nil
+ * IO.foreach(command, limit, **opts) {|line| block } -> nil
+ * IO.foreach(command, sep, limit, **opts) {|line| block } -> nil
+ * IO.foreach(...) -> an_enumerator
*
- * Executes the block for every line in the named I/O port, where lines
- * are separated by <em>sep</em>.
+ * Calls the block with each successive line read from the stream.
*
- * If no block is given, an enumerator is returned instead.
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * IO.foreach("testfile") {|x| print "GOT ", x }
+ * The first argument must be a string that is one of the following:
*
- * <em>produces:</em>
+ * - Path: if +self+ is a subclass of \IO (\File, for example),
+ * or if the string _does_ _not_ start with the pipe character (<tt>'|'</tt>),
+ * the string is the path to a file.
+ * - Command: if +self+ is the class \IO,
+ * and if the string starts with the pipe character,
+ * the rest of the string is a command to be executed as a subprocess.
+ * This usage has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * GOT This is line one
- * GOT This is line two
- * GOT This is line three
- * GOT And so on...
+ * With only argument +path+ given, parses lines from the file at the given +path+,
+ * as determined by the default line separator,
+ * and calls the block with each successive line:
*
- * If the last argument is a hash, it's the keyword argument to open.
- * See IO.readlines for details about getline_args.
- * And see also IO.read for details about open_args.
+ * File.foreach('t.txt') {|line| p line }
+ *
+ * Output: the same as above.
+ *
+ * For both forms, command and path, the remaining arguments are the same.
+ *
+ * With argument +sep+ given, parses lines as determined by that line separator
+ * (see {Line Separator}[rdoc-ref:IO@Line+Separator]):
+ *
+ * File.foreach('t.txt', 'li') {|line| p line }
+ *
+ * Output:
+ *
+ * "First li"
+ * "ne\nSecond li"
+ * "ne\n\nThird li"
+ * "ne\nFourth li"
+ * "ne\n"
+ *
+ * Each paragraph:
+ *
+ * File.foreach('t.txt', '') {|paragraph| p paragraph }
+ *
+ * Output:
+ *
+ * "First line\nSecond line\n\n"
+ * "Third line\nFourth line\n"
+ *
+ * With argument +limit+ given, parses lines as determined by the default
+ * line separator and the given line-length limit
+ * (see {Line Limit}[rdoc-ref:IO@Line+Limit]):
+ *
+ * File.foreach('t.txt', 7) {|line| p line }
+ *
+ * Output:
+ *
+ * "First l"
+ * "ine\n"
+ * "Second "
+ * "line\n"
+ * "\n"
+ * "Third l"
+ * "ine\n"
+ * "Fourth l"
+ * "line\n"
+ *
+ * With arguments +sep+ and +limit+ given,
+ * parses lines as determined by the given
+ * line separator and the given line-length limit
+ * (see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]):
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ * - {Line Options}[rdoc-ref:IO@Line+Options].
+ *
+ * Returns an Enumerator if no block is given.
*
*/
@@ -10433,7 +11986,7 @@ rb_io_s_foreach(int argc, VALUE *argv, VALUE self)
struct foreach_arg arg;
struct getline_arg garg;
- argc = rb_scan_args(argc, argv, "13:", NULL, NULL, NULL, NULL, &opt);
+ argc = rb_scan_args(argc, argv, "12:", NULL, NULL, NULL, &opt);
RETURN_ENUMERATOR(self, orig_argc, argv);
extract_getline_args(argc-1, argv+1, &garg);
open_key_args(self, argc, argv, opt, &arg);
@@ -10452,32 +12005,73 @@ io_s_readlines(VALUE v)
/*
* call-seq:
- * IO.readlines(name, sep=$/ [, getline_args, open_args]) -> array
- * IO.readlines(name, limit [, getline_args, open_args]) -> array
- * IO.readlines(name, sep, limit [, getline_args, open_args]) -> array
+ * IO.readlines(command, sep = $/, **opts) -> array
+ * IO.readlines(command, limit, **opts) -> array
+ * IO.readlines(command, sep, limit, **opts) -> array
+ * IO.readlines(path, sep = $/, **opts) -> array
+ * IO.readlines(path, limit, **opts) -> array
+ * IO.readlines(path, sep, limit, **opts) -> array
+ *
+ * Returns an array of all lines read from the stream.
+ *
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
+ *
+ * The first argument must be a string;
+ * its meaning depends on whether it starts with the pipe character (<tt>'|'</tt>):
+ *
+ * - If so (and if +self+ is \IO),
+ * the rest of the string is a command to be executed as a subprocess.
+ * - Otherwise, the string is the path to a file.
+ *
+ * With only argument +command+ given, executes the command in a shell,
+ * parses its $stdout into lines, as determined by the default line separator,
+ * and returns those lines in an array:
+ *
+ * IO.readlines('| cat t.txt')
+ * # => ["First line\n", "Second line\n", "\n", "Third line\n", "Fourth line\n"]
+ *
+ * With only argument +path+ given, parses lines from the file at the given +path+,
+ * as determined by the default line separator,
+ * and returns those lines in an array:
+ *
+ * IO.readlines('t.txt')
+ * # => ["First line\n", "Second line\n", "\n", "Third line\n", "Fourth line\n"]
+ *
+ * For both forms, command and path, the remaining arguments are the same.
*
- * Reads the entire file specified by <i>name</i> as individual
- * lines, and returns those lines in an array. Lines are separated by
- * <i>sep</i>.
+ * With argument +sep+ given, parses lines as determined by that line separator
+ * (see {Line Separator}[rdoc-ref:IO@Line+Separator]):
*
- * a = IO.readlines("testfile")
- * a[0] #=> "This is line one\n"
+ * # Ordinary separator.
+ * IO.readlines('t.txt', 'li')
+ * # =>["First li", "ne\nSecond li", "ne\n\nThird li", "ne\nFourth li", "ne\n"]
+ * # Get-paragraphs separator.
+ * IO.readlines('t.txt', '')
+ * # => ["First line\nSecond line\n\n", "Third line\nFourth line\n"]
+ * # Get-all separator.
+ * IO.readlines('t.txt', nil)
+ * # => ["First line\nSecond line\n\nThird line\nFourth line\n"]
*
- * b = IO.readlines("testfile", chomp: true)
- * b[0] #=> "This is line one"
+ * With argument +limit+ given, parses lines as determined by the default
+ * line separator and the given line-length limit
+ * (see {Line Limit}[rdoc-ref:IO@Line+Limit]):
*
- * If the last argument is a hash, it's the keyword argument to open.
+ * IO.readlines('t.txt', 7)
+ * # => ["First l", "ine\n", "Second ", "line\n", "\n", "Third l", "ine\n", "Fourth ", "line\n"]
*
- * === Options for getline
+ * With arguments +sep+ and +limit+ given,
+ * parses lines as determined by the given
+ * line separator and the given line-length limit
+ * (see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]):
*
- * The options hash accepts the following keys:
+ * Optional keyword arguments +opts+ specify:
*
- * :chomp::
- * When the optional +chomp+ keyword argument has a true value,
- * <code>\n</code>, <code>\r</code>, and <code>\r\n</code>
- * will be removed from the end of each line.
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
+ * - {Line Options}[rdoc-ref:IO@Line+Options].
*
- * See also IO.read for details about open_args.
*/
static VALUE
@@ -10487,7 +12081,7 @@ rb_io_s_readlines(int argc, VALUE *argv, VALUE io)
struct foreach_arg arg;
struct getline_arg garg;
- argc = rb_scan_args(argc, argv, "13:", NULL, NULL, NULL, NULL, &opt);
+ argc = rb_scan_args(argc, argv, "12:", NULL, NULL, NULL, &opt);
extract_getline_args(argc-1, argv+1, &garg);
open_key_args(io, argc, argv, opt, &arg);
if (NIL_P(arg.io)) return Qnil;
@@ -10519,44 +12113,58 @@ seek_before_access(VALUE argp)
/*
* call-seq:
- * IO.read(name, [length [, offset]] [, opt] ) -> string
+ * IO.read(command, length = nil, offset = 0, **opts) -> string or nil
+ * IO.read(path, length = nil, offset = 0, **opts) -> string or nil
*
- * Opens the file, optionally seeks to the given +offset+, then returns
- * +length+ bytes (defaulting to the rest of the file). #read ensures
- * the file is closed before returning.
+ * Opens the stream, reads and returns some or all of its content,
+ * and closes the stream; returns +nil+ if no bytes were read.
*
- * If +name+ starts with a pipe character (<code>"|"</code>), a subprocess is
- * created in the same way as Kernel#open, and its output is returned.
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * === Options
+ * The first argument must be a string;
+ * its meaning depends on whether it starts with the pipe character (<tt>'|'</tt>):
*
- * The options hash accepts the following keys:
+ * - If so (and if +self+ is \IO),
+ * the rest of the string is a command to be executed as a subprocess.
+ * - Otherwise, the string is the path to a file.
*
- * :encoding::
- * string or encoding
+ * With only argument +command+ given, executes the command in a shell,
+ * returns its entire $stdout:
*
- * Specifies the encoding of the read string. +:encoding+ will be ignored
- * if +length+ is specified. See Encoding.aliases for possible encodings.
+ * IO.read('| cat t.txt')
+ * # => "First line\nSecond line\n\nThird line\nFourth line\n"
*
- * :mode::
- * string or integer
+ * With only argument +path+ given, reads in text mode and returns the entire content
+ * of the file at the given path:
*
- * Specifies the <i>mode</i> argument for open(). It must start
- * with an "r", otherwise it will cause an error.
- * See IO.new for the list of possible modes.
+ * IO.read('t.txt')
+ * # => "First line\nSecond line\n\nThird line\nFourth line\n"
*
- * :open_args::
- * array
+ * On Windows, text mode can terminate reading and leave bytes in the file
+ * unread when encountering certain special bytes. Consider using
+ * IO.binread if all bytes in the file should be read.
*
- * Specifies arguments for open() as an array. This key can not be used
- * in combination with either +:encoding+ or +:mode+.
+ * For both forms, command and path, the remaining arguments are the same.
*
- * Examples:
+ * With argument +length+, returns +length+ bytes if available:
+ *
+ * IO.read('t.txt', 7) # => "First l"
+ * IO.read('t.txt', 700)
+ * # => "First line\r\nSecond line\r\n\r\nFourth line\r\nFifth line\r\n"
+ *
+ * With arguments +length+ and +offset+, returns +length+ bytes
+ * if available, beginning at the given +offset+:
+ *
+ * IO.read('t.txt', 10, 2) # => "rst line\nS"
+ * IO.read('t.txt', 10, 200) # => nil
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * IO.read("testfile") #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
- * IO.read("testfile", 20) #=> "This is line one\nThi"
- * IO.read("testfile", 20, 10) #=> "ne one\nThis is line "
- * IO.read("binfile", mode: "rb") #=> "\xF7\x00\x00\x0E\x12"
*/
static VALUE
@@ -10569,33 +12177,33 @@ rb_io_s_read(int argc, VALUE *argv, VALUE io)
open_key_args(io, argc, argv, opt, &arg);
if (NIL_P(arg.io)) return Qnil;
if (!NIL_P(offset)) {
- struct seek_arg sarg;
- int state = 0;
- sarg.io = arg.io;
- sarg.offset = offset;
- sarg.mode = SEEK_SET;
- rb_protect(seek_before_access, (VALUE)&sarg, &state);
- if (state) {
- rb_io_close(arg.io);
- rb_jump_tag(state);
- }
- if (arg.argc == 2) arg.argc = 1;
+ struct seek_arg sarg;
+ int state = 0;
+ sarg.io = arg.io;
+ sarg.offset = offset;
+ sarg.mode = SEEK_SET;
+ rb_protect(seek_before_access, (VALUE)&sarg, &state);
+ if (state) {
+ rb_io_close(arg.io);
+ rb_jump_tag(state);
+ }
+ if (arg.argc == 2) arg.argc = 1;
}
return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
}
/*
* call-seq:
- * IO.binread(name, [length [, offset]] ) -> string
+ * IO.binread(command, length = nil, offset = 0) -> string or nil
+ * IO.binread(path, length = nil, offset = 0) -> string or nil
+ *
+ * Behaves like IO.read, except that the stream is opened in binary mode
+ * with ASCII-8BIT encoding.
*
- * Opens the file, optionally seeks to the given <i>offset</i>, then
- * returns <i>length</i> bytes (defaulting to the rest of the file).
- * #binread ensures the file is closed before returning. The open mode
- * would be <code>"rb:ASCII-8BIT"</code>.
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * IO.binread("testfile") #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
- * IO.binread("testfile", 20) #=> "This is line one\nThi"
- * IO.binread("testfile", 20, 10) #=> "ne one\nThis is line "
*/
static VALUE
@@ -10604,10 +12212,10 @@ rb_io_s_binread(int argc, VALUE *argv, VALUE io)
VALUE offset;
struct foreach_arg arg;
enum {
- fmode = FMODE_READABLE|FMODE_BINMODE,
- oflags = O_RDONLY
+ fmode = FMODE_READABLE|FMODE_BINMODE,
+ oflags = O_RDONLY
#ifdef O_BINARY
- |O_BINARY
+ |O_BINARY
#endif
};
convconfig_t convconfig = {NULL, NULL, 0, Qnil};
@@ -10620,16 +12228,16 @@ rb_io_s_binread(int argc, VALUE *argv, VALUE io)
arg.argv = argv+1;
arg.argc = (argc > 1) ? 1 : 0;
if (!NIL_P(offset)) {
- struct seek_arg sarg;
- int state = 0;
- sarg.io = arg.io;
- sarg.offset = offset;
- sarg.mode = SEEK_SET;
- rb_protect(seek_before_access, (VALUE)&sarg, &state);
- if (state) {
- rb_io_close(arg.io);
- rb_jump_tag(state);
- }
+ struct seek_arg sarg;
+ int state = 0;
+ sarg.io = arg.io;
+ sarg.offset = offset;
+ sarg.mode = SEEK_SET;
+ rb_protect(seek_before_access, (VALUE)&sarg, &state);
+ if (state) {
+ rb_io_close(arg.io);
+ rb_jump_tag(state);
+ }
}
return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
}
@@ -10637,7 +12245,7 @@ rb_io_s_binread(int argc, VALUE *argv, VALUE io)
static VALUE
io_s_write0(VALUE v)
{
- struct write_arg *arg = (void * )v;
+ struct write_arg *arg = (void *)v;
return io_write(arg->io,arg->str,arg->nosync);
}
@@ -10691,45 +12299,63 @@ io_s_write(int argc, VALUE *argv, VALUE klass, int binary)
/*
* call-seq:
- * IO.write(name, string [, offset]) -> integer
- * IO.write(name, string [, offset] [, opt]) -> integer
+ * IO.write(command, data, **opts) -> integer
+ * IO.write(path, data, offset = 0, **opts) -> integer
+ *
+ * Opens the stream, writes the given +data+ to it,
+ * and closes the stream; returns the number of bytes written.
+ *
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * Opens the file, optionally seeks to the given <i>offset</i>, writes
- * <i>string</i>, then returns the length written. #write ensures the
- * file is closed before returning. If <i>offset</i> is not given in
- * write mode, the file is truncated. Otherwise, it is not truncated.
+ * The first argument must be a string;
+ * its meaning depends on whether it starts with the pipe character (<tt>'|'</tt>):
*
- * IO.write("testfile", "0123456789", 20) #=> 10
- * # File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
- * IO.write("testfile", "0123456789") #=> 10
- * # File would now read: "0123456789"
+ * - If so (and if +self+ is \IO),
+ * the rest of the string is a command to be executed as a subprocess.
+ * - Otherwise, the string is the path to a file.
*
- * If the last argument is a hash, it specifies options for the internal
- * open(). It accepts the following keys:
+ * With argument +command+ given, executes the command in a shell,
+ * passes +data+ through standard input, writes its output to $stdout,
+ * and returns the length of the given +data+:
*
- * :encoding::
- * string or encoding
+ * IO.write('| cat', 'Hello World!') # => 12
*
- * Specifies the encoding of the read string.
- * See Encoding.aliases for possible encodings.
+ * Output:
*
- * :mode::
- * string or integer
+ * Hello World!
*
- * Specifies the <i>mode</i> argument for open(). It must start
- * with "w", "a", or "r+", otherwise it will cause an error.
- * See IO.new for the list of possible modes.
+ * With argument +path+ given, writes the given +data+ to the file
+ * at that path:
*
- * :perm::
- * integer
+ * IO.write('t.tmp', 'abc') # => 3
+ * File.read('t.tmp') # => "abc"
*
- * Specifies the <i>perm</i> argument for open().
+ * If +offset+ is zero (the default), the file is overwritten:
*
- * :open_args::
- * array
+ * IO.write('t.tmp', 'A') # => 1
+ * File.read('t.tmp') # => "A"
+ *
+ * If +offset+ in within the file content, the file is partly overwritten:
+ *
+ * IO.write('t.tmp', 'abcdef') # => 3
+ * File.read('t.tmp') # => "abcdef"
+ * # Offset within content.
+ * IO.write('t.tmp', '012', 2) # => 3
+ * File.read('t.tmp') # => "ab012f"
+ *
+ * If +offset+ is outside the file content,
+ * the file is padded with null characters <tt>"\u0000"</tt>:
+ *
+ * IO.write('t.tmp', 'xyz', 10) # => 3
+ * File.read('t.tmp') # => "ab012f\u0000\u0000\u0000\u0000xyz"
+ *
+ * Optional keyword arguments +opts+ specify:
+ *
+ * - {Open Options}[rdoc-ref:IO@Open+Options].
+ * - {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * Specifies arguments for open() as an array.
- * This key can not be used in combination with other keys.
*/
static VALUE
@@ -10740,11 +12366,16 @@ rb_io_s_write(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * IO.binwrite(name, string, [offset] ) -> integer
- * IO.binwrite(name, string, [offset], open_args ) -> integer
+ * IO.binwrite(command, string, offset = 0) -> integer
+ * IO.binwrite(path, string, offset = 0) -> integer
+ *
+ * Behaves like IO.write, except that the stream is opened in binary mode
+ * with ASCII-8BIT encoding.
+ *
+ * When called from class \IO (but not subclasses of \IO),
+ * this method has potential security vulnerabilities if called with untrusted input;
+ * see {Command Injection}[rdoc-ref:command_injection.rdoc].
*
- * Same as IO.write except opening the file in binary mode and
- * ASCII-8BIT encoding (<code>"wb:ASCII-8BIT"</code>).
*/
static VALUE
@@ -10756,15 +12387,15 @@ rb_io_s_binwrite(int argc, VALUE *argv, VALUE io)
struct copy_stream_struct {
VALUE src;
VALUE dst;
- off_t copy_length; /* (off_t)-1 if not specified */
- off_t src_offset; /* (off_t)-1 if not specified */
+ rb_off_t copy_length; /* (rb_off_t)-1 if not specified */
+ rb_off_t src_offset; /* (rb_off_t)-1 if not specified */
- int src_fd;
- int dst_fd;
+ rb_io_t *src_fptr;
+ rb_io_t *dst_fptr;
unsigned close_src : 1;
unsigned close_dst : 1;
int error_no;
- off_t total;
+ rb_off_t total;
const char *syserr;
const char *notimp;
VALUE th;
@@ -10796,36 +12427,85 @@ maygvl_copy_stream_continue_p(int has_gvl, struct copy_stream_struct *stp)
#if defined(ERESTART)
case ERESTART:
#endif
- if (rb_thread_interrupted(stp->th)) {
+ if (rb_thread_interrupted(stp->th)) {
if (has_gvl)
rb_thread_execute_interrupts(stp->th);
else
rb_thread_call_with_gvl(exec_interrupts, (void *)stp->th);
}
- return TRUE;
+ return TRUE;
}
return FALSE;
}
+struct fiber_scheduler_wait_for_arguments {
+ VALUE scheduler;
+
+ rb_io_t *fptr;
+ short events;
+
+ VALUE result;
+};
+
+static void *
+fiber_scheduler_wait_for(void * _arguments)
+{
+ struct fiber_scheduler_wait_for_arguments *arguments = (struct fiber_scheduler_wait_for_arguments *)_arguments;
+
+ arguments->result = rb_fiber_scheduler_io_wait(arguments->scheduler, arguments->fptr->self, INT2NUM(arguments->events), RUBY_IO_TIMEOUT_DEFAULT);
+
+ return NULL;
+}
+
#if USE_POLL
# define IOWAIT_SYSCALL "poll"
STATIC_ASSERT(pollin_expected, POLLIN == RB_WAITFD_IN);
STATIC_ASSERT(pollout_expected, POLLOUT == RB_WAITFD_OUT);
static int
-nogvl_wait_for_single_fd(int fd, short events)
+nogvl_wait_for(VALUE th, rb_io_t *fptr, short events, struct timeval *timeout)
{
+ VALUE scheduler = rb_fiber_scheduler_current_for_thread(th);
+ if (scheduler != Qnil) {
+ struct fiber_scheduler_wait_for_arguments args = {.scheduler = scheduler, .fptr = fptr, .events = events};
+ rb_thread_call_with_gvl(fiber_scheduler_wait_for, &args);
+ return RTEST(args.result);
+ }
+
+ int fd = fptr->fd;
+ if (fd == -1) return 0;
+
struct pollfd fds;
fds.fd = fd;
fds.events = events;
- return poll(&fds, 1, -1);
+ int timeout_milliseconds = -1;
+
+ if (timeout) {
+ timeout_milliseconds = (int)(timeout->tv_sec * 1000) + (int)(timeout->tv_usec / 1000);
+ }
+
+ return poll(&fds, 1, timeout_milliseconds);
}
#else /* !USE_POLL */
# define IOWAIT_SYSCALL "select"
static int
-nogvl_wait_for_single_fd(int fd, short events)
+nogvl_wait_for(VALUE th, rb_io_t *fptr, short events, struct timeval *timeout)
{
+ VALUE scheduler = rb_fiber_scheduler_current_for_thread(th);
+ if (scheduler != Qnil) {
+ struct fiber_scheduler_wait_for_arguments args = {.scheduler = scheduler, .fptr = fptr, .events = events};
+ rb_thread_call_with_gvl(fiber_scheduler_wait_for, &args);
+ return RTEST(args.result);
+ }
+
+ int fd = fptr->fd;
+
+ if (fd == -1) {
+ errno = EBADF;
+ return -1;
+ }
+
rb_fdset_t fds;
int ret;
@@ -10834,16 +12514,18 @@ nogvl_wait_for_single_fd(int fd, short events)
switch (events) {
case RB_WAITFD_IN:
- ret = rb_fd_select(fd + 1, &fds, 0, 0, 0);
+ ret = rb_fd_select(fd + 1, &fds, 0, 0, timeout);
break;
case RB_WAITFD_OUT:
- ret = rb_fd_select(fd + 1, 0, &fds, 0, 0);
+ ret = rb_fd_select(fd + 1, 0, &fds, 0, timeout);
break;
default:
- VM_UNREACHABLE(nogvl_wait_for_single_fd);
+ VM_UNREACHABLE(nogvl_wait_for);
}
rb_fd_term(&fds);
+
+ // On timeout, this returns 0.
return ret;
}
#endif /* !USE_POLL */
@@ -10854,12 +12536,12 @@ maygvl_copy_stream_wait_read(int has_gvl, struct copy_stream_struct *stp)
int ret;
do {
- if (has_gvl) {
- ret = rb_wait_for_single_fd(stp->src_fd, RB_WAITFD_IN, NULL);
- }
- else {
- ret = nogvl_wait_for_single_fd(stp->src_fd, RB_WAITFD_IN);
- }
+ if (has_gvl) {
+ ret = RB_NUM2INT(rb_io_wait(stp->src, RB_INT2NUM(RUBY_IO_READABLE), Qnil));
+ }
+ else {
+ ret = nogvl_wait_for(stp->th, stp->src_fptr, RB_WAITFD_IN, NULL);
+ }
} while (ret < 0 && maygvl_copy_stream_continue_p(has_gvl, stp));
if (ret < 0) {
@@ -10876,7 +12558,7 @@ nogvl_copy_stream_wait_write(struct copy_stream_struct *stp)
int ret;
do {
- ret = nogvl_wait_for_single_fd(stp->dst_fd, RB_WAITFD_OUT);
+ ret = nogvl_wait_for(stp->th, stp->dst_fptr, RB_WAITFD_OUT, NULL);
} while (ret < 0 && maygvl_copy_stream_continue_p(0, stp));
if (ret < 0) {
@@ -10887,14 +12569,10 @@ nogvl_copy_stream_wait_write(struct copy_stream_struct *stp)
return 0;
}
-#if defined HAVE_COPY_FILE_RANGE || (defined __linux__ && defined __NR_copy_file_range)
-# define USE_COPY_FILE_RANGE
-#endif
-
#ifdef USE_COPY_FILE_RANGE
static ssize_t
-simple_copy_file_range(int in_fd, off_t *in_offset, int out_fd, off_t *out_offset, size_t count, unsigned int flags)
+simple_copy_file_range(int in_fd, rb_off_t *in_offset, int out_fd, rb_off_t *out_offset, size_t count, unsigned int flags)
{
#ifdef HAVE_COPY_FILE_RANGE
return copy_file_range(in_fd, in_offset, out_fd, out_offset, count, flags);
@@ -10907,47 +12585,47 @@ static int
nogvl_copy_file_range(struct copy_stream_struct *stp)
{
ssize_t ss;
- off_t src_size;
- off_t copy_length, src_offset, *src_offset_ptr;
+ rb_off_t src_size;
+ rb_off_t copy_length, src_offset, *src_offset_ptr;
if (!S_ISREG(stp->src_stat.st_mode))
return 0;
src_size = stp->src_stat.st_size;
src_offset = stp->src_offset;
- if (src_offset >= (off_t)0) {
- src_offset_ptr = &src_offset;
+ if (src_offset >= (rb_off_t)0) {
+ src_offset_ptr = &src_offset;
}
else {
- src_offset_ptr = NULL; /* if src_offset_ptr is NULL, then bytes are read from in_fd starting from the file offset */
+ src_offset_ptr = NULL; /* if src_offset_ptr is NULL, then bytes are read from in_fd starting from the file offset */
}
copy_length = stp->copy_length;
- if (copy_length < (off_t)0) {
- if (src_offset < (off_t)0) {
- off_t current_offset;
+ if (copy_length < (rb_off_t)0) {
+ if (src_offset < (rb_off_t)0) {
+ rb_off_t current_offset;
errno = 0;
- current_offset = lseek(stp->src_fd, 0, SEEK_CUR);
- if (current_offset < (off_t)0 && errno) {
+ current_offset = lseek(stp->src_fptr->fd, 0, SEEK_CUR);
+ if (current_offset < (rb_off_t)0 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;
return (int)current_offset;
}
copy_length = src_size - current_offset;
- }
- else {
+ }
+ else {
copy_length = src_size - src_offset;
- }
+ }
}
retry_copy_file_range:
# if SIZEOF_OFF_T > SIZEOF_SIZE_T
/* we are limited by the 32-bit ssize_t return value on 32-bit */
- ss = (copy_length > (off_t)SSIZE_MAX) ? SSIZE_MAX : (ssize_t)copy_length;
+ ss = (copy_length > (rb_off_t)SSIZE_MAX) ? SSIZE_MAX : (ssize_t)copy_length;
# else
ss = (ssize_t)copy_length;
# endif
- ss = simple_copy_file_range(stp->src_fd, src_offset_ptr, stp->dst_fd, NULL, ss, 0);
+ ss = simple_copy_file_range(stp->src_fptr->fd, src_offset_ptr, stp->dst_fptr->fd, NULL, ss, 0);
if (0 < ss) {
stp->total += ss;
copy_length -= ss;
@@ -10956,39 +12634,39 @@ nogvl_copy_file_range(struct copy_stream_struct *stp)
}
}
if (ss < 0) {
- if (maygvl_copy_stream_continue_p(0, stp)) {
+ if (maygvl_copy_stream_continue_p(0, stp)) {
goto retry_copy_file_range;
- }
+ }
switch (errno) {
- case EINVAL:
- case EPERM: /* copy_file_range(2) doesn't exist (may happen in
- docker container) */
+ case EINVAL:
+ case EPERM: /* copy_file_range(2) doesn't exist (may happen in
+ docker container) */
#ifdef ENOSYS
- case ENOSYS:
+ case ENOSYS:
#endif
#ifdef EXDEV
- case EXDEV: /* in_fd and out_fd are not on the same filesystem */
+ case EXDEV: /* in_fd and out_fd are not on the same filesystem */
#endif
return 0;
- case EAGAIN:
-#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EAGAIN:
+#if EWOULDBLOCK != EAGAIN
+ case EWOULDBLOCK:
#endif
{
int ret = nogvl_copy_stream_wait_write(stp);
if (ret < 0) return ret;
}
goto retry_copy_file_range;
- case EBADF:
- {
- int e = errno;
- int flags = fcntl(stp->dst_fd, F_GETFL);
+ case EBADF:
+ {
+ int e = errno;
+ int flags = fcntl(stp->dst_fptr->fd, F_GETFL);
- if (flags != -1 && flags & O_APPEND) {
- return 0;
- }
- errno = e;
- }
+ if (flags != -1 && flags & O_APPEND) {
+ return 0;
+ }
+ errno = e;
+ }
}
stp->syserr = "copy_file_range";
stp->error_no = errno;
@@ -11002,11 +12680,11 @@ nogvl_copy_file_range(struct copy_stream_struct *stp)
static int
nogvl_fcopyfile(struct copy_stream_struct *stp)
{
- off_t cur, ss = 0;
- const off_t src_offset = stp->src_offset;
+ rb_off_t cur, ss = 0;
+ const rb_off_t src_offset = stp->src_offset;
int ret;
- if (stp->copy_length >= (off_t)0) {
+ if (stp->copy_length >= (rb_off_t)0) {
/* copy_length can't be specified in fcopyfile(3) */
return 0;
}
@@ -11016,40 +12694,47 @@ nogvl_fcopyfile(struct copy_stream_struct *stp)
if (!S_ISREG(stp->dst_stat.st_mode))
return 0;
- if (lseek(stp->dst_fd, 0, SEEK_CUR) > (off_t)0) /* if dst IO was already written */
+ if (lseek(stp->dst_fptr->fd, 0, SEEK_CUR) > (rb_off_t)0) /* if dst IO was already written */
return 0;
+ if (fcntl(stp->dst_fptr->fd, F_GETFL) & O_APPEND) {
+ /* fcopyfile(3) appends src IO to dst IO and then truncates
+ * dst IO to src IO's original size. */
+ rb_off_t end = lseek(stp->dst_fptr->fd, 0, SEEK_END);
+ lseek(stp->dst_fptr->fd, 0, SEEK_SET);
+ if (end > (rb_off_t)0) return 0;
+ }
- if (src_offset > (off_t)0) {
- off_t r;
+ if (src_offset > (rb_off_t)0) {
+ rb_off_t r;
/* get current offset */
errno = 0;
- cur = lseek(stp->src_fd, 0, SEEK_CUR);
- if (cur < (off_t)0 && errno) {
+ cur = lseek(stp->src_fptr->fd, 0, SEEK_CUR);
+ if (cur < (rb_off_t)0 && errno) {
stp->error_no = errno;
return 1;
}
errno = 0;
- r = lseek(stp->src_fd, src_offset, SEEK_SET);
- if (r < (off_t)0 && errno) {
+ r = lseek(stp->src_fptr->fd, src_offset, SEEK_SET);
+ if (r < (rb_off_t)0 && errno) {
stp->error_no = errno;
return 1;
}
}
stp->copyfile_state = copyfile_state_alloc(); /* this will be freed by copy_stream_finalize() */
- ret = fcopyfile(stp->src_fd, stp->dst_fd, stp->copyfile_state, COPYFILE_DATA);
+ ret = fcopyfile(stp->src_fptr->fd, stp->dst_fptr->fd, stp->copyfile_state, COPYFILE_DATA);
copyfile_state_get(stp->copyfile_state, COPYFILE_STATE_COPIED, &ss); /* get copied bytes */
if (ret == 0) { /* success */
stp->total = ss;
- if (src_offset > (off_t)0) {
- off_t r;
+ if (src_offset > (rb_off_t)0) {
+ rb_off_t r;
errno = 0;
/* reset offset */
- r = lseek(stp->src_fd, cur, SEEK_SET);
- if (r < (off_t)0 && errno) {
+ r = lseek(stp->src_fptr->fd, cur, SEEK_SET);
+ if (r < (rb_off_t)0 && errno) {
stp->error_no = errno;
return 1;
}
@@ -11080,7 +12765,7 @@ nogvl_fcopyfile(struct copy_stream_struct *stp)
# endif
static ssize_t
-simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count)
+simple_sendfile(int out_fd, int in_fd, rb_off_t *offset, rb_off_t count)
{
return sendfile(out_fd, in_fd, offset, (size_t)count);
}
@@ -11092,11 +12777,11 @@ simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count)
# define USE_SENDFILE
static ssize_t
-simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count)
+simple_sendfile(int out_fd, int in_fd, rb_off_t *offset, rb_off_t count)
{
int r;
- off_t pos = offset ? *offset : lseek(in_fd, 0, SEEK_CUR);
- off_t sbytes;
+ rb_off_t pos = offset ? *offset : lseek(in_fd, 0, SEEK_CUR);
+ rb_off_t sbytes;
# ifdef __APPLE__
r = sendfile(in_fd, out_fd, pos, &count, NULL, 0);
sbytes = count;
@@ -11105,10 +12790,10 @@ simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count)
# endif
if (r != 0 && sbytes == 0) return r;
if (offset) {
- *offset += sbytes;
+ *offset += sbytes;
}
else {
- lseek(in_fd, sbytes, SEEK_CUR);
+ lseek(in_fd, sbytes, SEEK_CUR);
}
return (ssize_t)sbytes;
}
@@ -11122,9 +12807,9 @@ static int
nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
{
ssize_t ss;
- off_t src_size;
- off_t copy_length;
- off_t src_offset;
+ rb_off_t src_size;
+ rb_off_t copy_length;
+ rb_off_t src_offset;
int use_pread;
if (!S_ISREG(stp->src_stat.st_mode))
@@ -11133,21 +12818,21 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
src_size = stp->src_stat.st_size;
#ifndef __linux__
if ((stp->dst_stat.st_mode & S_IFMT) != S_IFSOCK)
- return 0;
+ return 0;
#endif
src_offset = stp->src_offset;
- use_pread = src_offset >= (off_t)0;
+ use_pread = src_offset >= (rb_off_t)0;
copy_length = stp->copy_length;
- if (copy_length < (off_t)0) {
+ if (copy_length < (rb_off_t)0) {
if (use_pread)
copy_length = src_size - src_offset;
else {
- off_t cur;
+ rb_off_t cur;
errno = 0;
- cur = lseek(stp->src_fd, 0, SEEK_CUR);
- if (cur < (off_t)0 && errno) {
+ cur = lseek(stp->src_fptr->fd, 0, SEEK_CUR);
+ if (cur < (rb_off_t)0 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;
return (int)cur;
@@ -11159,15 +12844,15 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
retry_sendfile:
# if SIZEOF_OFF_T > SIZEOF_SIZE_T
/* we are limited by the 32-bit ssize_t return value on 32-bit */
- ss = (copy_length > (off_t)SSIZE_MAX) ? SSIZE_MAX : (ssize_t)copy_length;
+ ss = (copy_length > (rb_off_t)SSIZE_MAX) ? SSIZE_MAX : (ssize_t)copy_length;
# else
ss = (ssize_t)copy_length;
# endif
if (use_pread) {
- ss = simple_sendfile(stp->dst_fd, stp->src_fd, &src_offset, ss);
+ ss = simple_sendfile(stp->dst_fptr->fd, stp->src_fptr->fd, &src_offset, ss);
}
else {
- ss = simple_sendfile(stp->dst_fd, stp->src_fd, NULL, ss);
+ ss = simple_sendfile(stp->dst_fptr->fd, stp->src_fptr->fd, NULL, ss);
}
if (0 < ss) {
stp->total += ss;
@@ -11177,23 +12862,28 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
}
}
if (ss < 0) {
- if (maygvl_copy_stream_continue_p(0, stp))
- goto retry_sendfile;
+ if (maygvl_copy_stream_continue_p(0, stp))
+ goto retry_sendfile;
switch (errno) {
- case EINVAL:
+ case EINVAL:
#ifdef ENOSYS
- case ENOSYS:
+ case ENOSYS:
+#endif
+#ifdef EOPNOTSUP
+ /* some RedHat kernels may return EOPNOTSUP on an NFS mount.
+ see also: [Feature #16965] */
+ case EOPNOTSUP:
#endif
return 0;
- case EAGAIN:
-#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EAGAIN:
+#if EWOULDBLOCK != EAGAIN
+ case EWOULDBLOCK:
#endif
{
int ret;
#ifndef __linux__
/*
- * Linux requires stp->src_fd to be a mmap-able (regular) file,
+ * Linux requires stp->src_fptr->fd to be a mmap-able (regular) file,
* select() reports regular files to always be "ready", so
* there is no need to select() on it.
* Other OSes may have the same limitation for sendfile() which
@@ -11216,25 +12906,25 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
#endif
static ssize_t
-maygvl_read(int has_gvl, int fd, void *buf, size_t count)
+maygvl_read(int has_gvl, rb_io_t *fptr, void *buf, size_t count)
{
if (has_gvl)
- return rb_read_internal(fd, buf, count);
+ return rb_io_read_memory(fptr, buf, count);
else
- return read(fd, buf, count);
+ return read(fptr->fd, buf, count);
}
static ssize_t
-maygvl_copy_stream_read(int has_gvl, struct copy_stream_struct *stp, char *buf, size_t len, off_t offset)
+maygvl_copy_stream_read(int has_gvl, struct copy_stream_struct *stp, char *buf, size_t len, rb_off_t offset)
{
ssize_t ss;
retry_read:
- if (offset < (off_t)0) {
- ss = maygvl_read(has_gvl, stp->src_fd, buf, len);
+ if (offset < (rb_off_t)0) {
+ ss = maygvl_read(has_gvl, stp->src_fptr, buf, len);
}
else {
#ifdef HAVE_PREAD
- ss = pread(stp->src_fd, buf, len, offset);
+ ss = pread(stp->src_fptr->fd, buf, len, offset);
#else
stp->notimp = "pread";
return -1;
@@ -11244,12 +12934,12 @@ maygvl_copy_stream_read(int has_gvl, struct copy_stream_struct *stp, char *buf,
return 0;
}
if (ss < 0) {
- if (maygvl_copy_stream_continue_p(has_gvl, stp))
- goto retry_read;
+ if (maygvl_copy_stream_continue_p(has_gvl, stp))
+ goto retry_read;
switch (errno) {
- case EAGAIN:
-#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EWOULDBLOCK:
+ case EAGAIN:
+#if EWOULDBLOCK != EAGAIN
+ case EWOULDBLOCK:
#endif
{
int ret = maygvl_copy_stream_wait_read(has_gvl, stp);
@@ -11257,12 +12947,12 @@ maygvl_copy_stream_read(int has_gvl, struct copy_stream_struct *stp, char *buf,
}
goto retry_read;
#ifdef ENOSYS
- case ENOSYS:
+ case ENOSYS:
stp->notimp = "pread";
return ss;
#endif
}
- stp->syserr = offset < (off_t)0 ? "read" : "pread";
+ stp->syserr = offset < (rb_off_t)0 ? "read" : "pread";
stp->error_no = errno;
}
return ss;
@@ -11274,11 +12964,11 @@ nogvl_copy_stream_write(struct copy_stream_struct *stp, char *buf, size_t len)
ssize_t ss;
int off = 0;
while (len) {
- ss = write(stp->dst_fd, buf+off, len);
+ ss = write(stp->dst_fptr->fd, buf+off, len);
if (ss < 0) {
if (maygvl_copy_stream_continue_p(0, stp))
continue;
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
+ if (io_again_p(errno)) {
int ret = nogvl_copy_stream_wait_write(stp);
if (ret < 0) return ret;
continue;
@@ -11301,31 +12991,31 @@ nogvl_copy_stream_read_write(struct copy_stream_struct *stp)
size_t len;
ssize_t ss;
int ret;
- off_t copy_length;
+ rb_off_t copy_length;
+ rb_off_t src_offset;
int use_eof;
- off_t src_offset;
int use_pread;
copy_length = stp->copy_length;
- use_eof = copy_length < (off_t)0;
+ use_eof = copy_length < (rb_off_t)0;
src_offset = stp->src_offset;
- use_pread = src_offset >= (off_t)0;
+ use_pread = src_offset >= (rb_off_t)0;
if (use_pread && stp->close_src) {
- off_t r;
- errno = 0;
- r = lseek(stp->src_fd, src_offset, SEEK_SET);
- if (r < (off_t)0 && errno) {
+ rb_off_t r;
+ errno = 0;
+ r = lseek(stp->src_fptr->fd, src_offset, SEEK_SET);
+ if (r < (rb_off_t)0 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;
return;
}
- src_offset = (off_t)-1;
+ src_offset = (rb_off_t)-1;
use_pread = 0;
}
while (use_eof || 0 < copy_length) {
- if (!use_eof && copy_length < (off_t)sizeof(buf)) {
+ if (!use_eof && copy_length < (rb_off_t)sizeof(buf)) {
len = (size_t)copy_length;
}
else {
@@ -11337,7 +13027,7 @@ nogvl_copy_stream_read_write(struct copy_stream_struct *stp)
src_offset += ss;
}
else {
- ss = maygvl_copy_stream_read(0, stp, buf, len, (off_t)-1);
+ ss = maygvl_copy_stream_read(0, stp, buf, len, (rb_off_t)-1);
}
if (ss <= 0) /* EOF or error */
return;
@@ -11362,7 +13052,7 @@ nogvl_copy_stream_func(void *arg)
#ifdef USE_COPY_FILE_RANGE
ret = nogvl_copy_file_range(stp);
if (ret != 0)
- goto finish; /* error or success */
+ goto finish; /* error or success */
#endif
#ifdef HAVE_FCOPYFILE
@@ -11392,30 +13082,31 @@ copy_stream_fallback_body(VALUE arg)
const int buflen = 16*1024;
VALUE n;
VALUE buf = rb_str_buf_new(buflen);
- off_t rest = stp->copy_length;
- off_t off = stp->src_offset;
+ rb_off_t rest = stp->copy_length;
+ rb_off_t off = stp->src_offset;
ID read_method = id_readpartial;
- if (stp->src_fd < 0) {
- if (!rb_respond_to(stp->src, read_method)) {
- read_method = id_read;
- }
+ if (!stp->src_fptr) {
+ if (!rb_respond_to(stp->src, read_method)) {
+ read_method = id_read;
+ }
}
while (1) {
long numwrote;
long l;
- if (stp->copy_length < (off_t)0) {
+ rb_str_make_independent(buf);
+ if (stp->copy_length < (rb_off_t)0) {
l = buflen;
}
else {
- if (rest == 0) {
- rb_str_resize(buf, 0);
- break;
- }
+ if (rest == 0) {
+ rb_str_resize(buf, 0);
+ break;
+ }
l = buflen < rest ? buflen : (long)rest;
}
- if (stp->src_fd < 0) {
+ if (!stp->src_fptr) {
VALUE rc = rb_funcall(stp->src, read_method, 2, INT2FIX(l), buf);
if (read_method == id_read && NIL_P(rc))
@@ -11430,16 +13121,16 @@ copy_stream_fallback_body(VALUE arg)
return Qnil;
if (ss == 0)
rb_eof_error();
- if (off >= (off_t)0)
+ if (off >= (rb_off_t)0)
off += ss;
}
n = rb_io_write(stp->dst, buf);
numwrote = NUM2LONG(n);
stp->total += numwrote;
rest -= numwrote;
- if (read_method == id_read && RSTRING_LEN(buf) == 0) {
- break;
- }
+ if (read_method == id_read && RSTRING_LEN(buf) == 0) {
+ break;
+ }
}
return Qnil;
@@ -11448,8 +13139,8 @@ copy_stream_fallback_body(VALUE arg)
static VALUE
copy_stream_fallback(struct copy_stream_struct *stp)
{
- if (stp->src_fd < 0 && stp->src_offset >= (off_t)0) {
- rb_raise(rb_eArgError, "cannot specify src_offset for non-IO");
+ if (!stp->src_fptr && stp->src_offset >= (rb_off_t)0) {
+ rb_raise(rb_eArgError, "cannot specify src_offset for non-IO");
}
rb_rescue2(copy_stream_fallback_body, (VALUE)stp,
(VALUE (*) (VALUE, VALUE))0, (VALUE)0,
@@ -11462,127 +13153,121 @@ copy_stream_body(VALUE arg)
{
struct copy_stream_struct *stp = (struct copy_stream_struct *)arg;
VALUE src_io = stp->src, dst_io = stp->dst;
- rb_io_t *src_fptr = 0, *dst_fptr = 0;
- int src_fd, dst_fd;
const int common_oflags = 0
#ifdef O_NOCTTY
- | O_NOCTTY
+ | O_NOCTTY
#endif
- ;
+ ;
stp->th = rb_thread_current();
stp->total = 0;
if (src_io == argf ||
- !(RB_TYPE_P(src_io, T_FILE) ||
- RB_TYPE_P(src_io, T_STRING) ||
- rb_respond_to(src_io, rb_intern("to_path")))) {
- src_fd = -1;
+ !(RB_TYPE_P(src_io, T_FILE) ||
+ RB_TYPE_P(src_io, T_STRING) ||
+ rb_respond_to(src_io, rb_intern("to_path")))) {
+ stp->src_fptr = NULL;
}
else {
int stat_ret;
- VALUE tmp_io = rb_io_check_io(src_io);
- if (!NIL_P(tmp_io)) {
- src_io = tmp_io;
- }
- else if (!RB_TYPE_P(src_io, T_FILE)) {
- VALUE args[2];
- FilePathValue(src_io);
- args[0] = src_io;
- args[1] = INT2NUM(O_RDONLY|common_oflags);
- src_io = rb_class_new_instance(2, args, rb_cFile);
- stp->src = src_io;
- stp->close_src = 1;
- }
- GetOpenFile(src_io, src_fptr);
- rb_io_check_byte_readable(src_fptr);
- src_fd = src_fptr->fd;
-
- stat_ret = fstat(src_fd, &stp->src_stat);
+ VALUE tmp_io = rb_io_check_io(src_io);
+ if (!NIL_P(tmp_io)) {
+ src_io = tmp_io;
+ }
+ else if (!RB_TYPE_P(src_io, T_FILE)) {
+ VALUE args[2];
+ FilePathValue(src_io);
+ args[0] = src_io;
+ args[1] = INT2NUM(O_RDONLY|common_oflags);
+ src_io = rb_class_new_instance(2, args, rb_cFile);
+ stp->src = src_io;
+ stp->close_src = 1;
+ }
+ RB_IO_POINTER(src_io, stp->src_fptr);
+ rb_io_check_byte_readable(stp->src_fptr);
+
+ stat_ret = fstat(stp->src_fptr->fd, &stp->src_stat);
if (stat_ret < 0) {
stp->syserr = "fstat";
stp->error_no = errno;
return Qnil;
}
}
- stp->src_fd = src_fd;
if (dst_io == argf ||
- !(RB_TYPE_P(dst_io, T_FILE) ||
- RB_TYPE_P(dst_io, T_STRING) ||
- rb_respond_to(dst_io, rb_intern("to_path")))) {
- dst_fd = -1;
+ !(RB_TYPE_P(dst_io, T_FILE) ||
+ RB_TYPE_P(dst_io, T_STRING) ||
+ rb_respond_to(dst_io, rb_intern("to_path")))) {
+ stp->dst_fptr = NULL;
}
else {
int stat_ret;
VALUE tmp_io = rb_io_check_io(dst_io);
- if (!NIL_P(tmp_io)) {
- dst_io = GetWriteIO(tmp_io);
- }
- else if (!RB_TYPE_P(dst_io, T_FILE)) {
- VALUE args[3];
- FilePathValue(dst_io);
- args[0] = dst_io;
- args[1] = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC|common_oflags);
- args[2] = INT2FIX(0666);
- dst_io = rb_class_new_instance(3, args, rb_cFile);
- stp->dst = dst_io;
- stp->close_dst = 1;
- }
- else {
- dst_io = GetWriteIO(dst_io);
- stp->dst = dst_io;
- }
- GetOpenFile(dst_io, dst_fptr);
- rb_io_check_writable(dst_fptr);
- dst_fd = dst_fptr->fd;
-
- stat_ret = fstat(dst_fd, &stp->dst_stat);
+ if (!NIL_P(tmp_io)) {
+ dst_io = GetWriteIO(tmp_io);
+ }
+ else if (!RB_TYPE_P(dst_io, T_FILE)) {
+ VALUE args[3];
+ FilePathValue(dst_io);
+ args[0] = dst_io;
+ args[1] = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC|common_oflags);
+ args[2] = INT2FIX(0666);
+ dst_io = rb_class_new_instance(3, args, rb_cFile);
+ stp->dst = dst_io;
+ stp->close_dst = 1;
+ }
+ else {
+ dst_io = GetWriteIO(dst_io);
+ stp->dst = dst_io;
+ }
+ RB_IO_POINTER(dst_io, stp->dst_fptr);
+ rb_io_check_writable(stp->dst_fptr);
+
+ stat_ret = fstat(stp->dst_fptr->fd, &stp->dst_stat);
if (stat_ret < 0) {
stp->syserr = "fstat";
stp->error_no = errno;
return Qnil;
}
}
- stp->dst_fd = dst_fd;
#ifdef O_BINARY
- if (src_fptr)
- SET_BINARY_MODE_WITH_SEEK_CUR(src_fptr);
+ if (stp->src_fptr)
+ SET_BINARY_MODE_WITH_SEEK_CUR(stp->src_fptr);
#endif
- if (dst_fptr)
- io_ascii8bit_binmode(dst_fptr);
+ if (stp->dst_fptr)
+ io_ascii8bit_binmode(stp->dst_fptr);
- if (stp->src_offset < (off_t)0 && src_fptr && src_fptr->rbuf.len) {
- size_t len = src_fptr->rbuf.len;
+ if (stp->src_offset < (rb_off_t)0 && stp->src_fptr && stp->src_fptr->rbuf.len) {
+ size_t len = stp->src_fptr->rbuf.len;
VALUE str;
- if (stp->copy_length >= (off_t)0 && stp->copy_length < (off_t)len) {
+ if (stp->copy_length >= (rb_off_t)0 && stp->copy_length < (rb_off_t)len) {
len = (size_t)stp->copy_length;
}
str = rb_str_buf_new(len);
rb_str_resize(str,len);
- read_buffered_data(RSTRING_PTR(str), len, src_fptr);
- if (dst_fptr) { /* IO or filename */
- if (io_binwrite(str, RSTRING_PTR(str), RSTRING_LEN(str), dst_fptr, 0) < 0)
- rb_sys_fail(0);
+ read_buffered_data(RSTRING_PTR(str), len, stp->src_fptr);
+ if (stp->dst_fptr) { /* IO or filename */
+ if (io_binwrite(str, RSTRING_PTR(str), RSTRING_LEN(str), stp->dst_fptr, 0) < 0)
+ rb_sys_fail_on_write(stp->dst_fptr);
}
else /* others such as StringIO */
- rb_io_write(dst_io, str);
+ rb_io_write(dst_io, str);
rb_str_resize(str, 0);
stp->total += len;
- if (stp->copy_length >= (off_t)0)
+ if (stp->copy_length >= (rb_off_t)0)
stp->copy_length -= len;
}
- if (dst_fptr && io_fflush(dst_fptr) < 0) {
- rb_raise(rb_eIOError, "flush failed");
+ if (stp->dst_fptr && io_fflush(stp->dst_fptr) < 0) {
+ rb_raise(rb_eIOError, "flush failed");
}
if (stp->copy_length == 0)
return Qnil;
- if (src_fd < 0 || dst_fd < 0) {
+ if (stp->src_fptr == NULL || stp->dst_fptr == NULL) {
return copy_stream_fallback(stp);
}
@@ -11611,41 +13296,60 @@ copy_stream_finalize(VALUE arg)
rb_syserr_fail(stp->error_no, stp->syserr);
}
if (stp->notimp) {
- rb_raise(rb_eNotImpError, "%s() not implemented", stp->notimp);
+ rb_raise(rb_eNotImpError, "%s() not implemented", stp->notimp);
}
return Qnil;
}
/*
* call-seq:
- * IO.copy_stream(src, dst)
- * IO.copy_stream(src, dst, copy_length)
- * IO.copy_stream(src, dst, copy_length, src_offset)
+ * IO.copy_stream(src, dst, src_length = nil, src_offset = 0) -> integer
+ *
+ * Copies from the given +src+ to the given +dst+,
+ * returning the number of bytes copied.
*
- * IO.copy_stream copies <i>src</i> to <i>dst</i>.
- * <i>src</i> and <i>dst</i> is either a filename or an IO-like object.
- * IO-like object for <i>src</i> should have #readpartial or #read
- * method. IO-like object for <i>dst</i> should have #write method.
- * (Specialized mechanisms, such as sendfile system call, may be used
- * on appropriate situation.)
+ * - The given +src+ must be one of the following:
*
- * This method returns the number of bytes copied.
+ * - The path to a readable file, from which source data is to be read.
+ * - An \IO-like object, opened for reading and capable of responding
+ * to method +:readpartial+ or method +:read+.
*
- * If optional arguments are not given,
- * the start position of the copy is
- * the beginning of the filename or
- * the current file offset of the IO.
- * The end position of the copy is the end of file.
+ * - The given +dst+ must be one of the following:
*
- * If <i>copy_length</i> is given,
- * No more than <i>copy_length</i> bytes are copied.
+ * - The path to a writable file, to which data is to be written.
+ * - An \IO-like object, opened for writing and capable of responding
+ * to method +:write+.
*
- * If <i>src_offset</i> is given,
- * it specifies the start position of the copy.
+ * The examples here use file <tt>t.txt</tt> as source:
*
- * When <i>src_offset</i> is specified and
- * <i>src</i> is an IO,
- * IO.copy_stream doesn't move the current file offset.
+ * File.read('t.txt')
+ * # => "First line\nSecond line\n\nThird line\nFourth line\n"
+ * File.read('t.txt').size # => 47
+ *
+ * If only arguments +src+ and +dst+ are given,
+ * the entire source stream is copied:
+ *
+ * # Paths.
+ * IO.copy_stream('t.txt', 't.tmp') # => 47
+ *
+ * # IOs (recall that a File is also an IO).
+ * src_io = File.open('t.txt', 'r') # => #<File:t.txt>
+ * dst_io = File.open('t.tmp', 'w') # => #<File:t.tmp>
+ * IO.copy_stream(src_io, dst_io) # => 47
+ * src_io.close
+ * dst_io.close
+ *
+ * With argument +src_length+ a non-negative integer,
+ * no more than that many bytes are copied:
+ *
+ * IO.copy_stream('t.txt', 't.tmp', 10) # => 10
+ * File.read('t.tmp') # => "First line"
+ *
+ * With argument +src_offset+ also given,
+ * the source stream is read beginning at that offset:
+ *
+ * IO.copy_stream('t.txt', 't.tmp', 11, 11) # => 11
+ * IO.read('t.tmp') # => "Second line"
*
*/
static VALUE
@@ -11661,13 +13365,16 @@ rb_io_s_copy_stream(int argc, VALUE *argv, VALUE io)
st.src = src;
st.dst = dst;
+ st.src_fptr = NULL;
+ st.dst_fptr = NULL;
+
if (NIL_P(length))
- st.copy_length = (off_t)-1;
+ st.copy_length = (rb_off_t)-1;
else
st.copy_length = NUM2OFFT(length);
if (NIL_P(src_offset))
- st.src_offset = (off_t)-1;
+ st.src_offset = (rb_off_t)-1;
else
st.src_offset = NUM2OFFT(src_offset);
@@ -11678,64 +13385,74 @@ rb_io_s_copy_stream(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * io.external_encoding -> encoding
+ * external_encoding -> encoding or nil
+ *
+ * Returns the Encoding object that represents the encoding of the stream,
+ * or +nil+ if the stream is in write mode and no encoding is specified.
+ *
+ * See {Encodings}[rdoc-ref:File@Encodings].
*
- * Returns the Encoding object that represents the encoding of the file.
- * If _io_ is in write mode and no encoding is specified, returns +nil+.
*/
static VALUE
rb_io_external_encoding(VALUE io)
{
- rb_io_t *fptr;
+ rb_io_t *fptr = RFILE(rb_io_taint_check(io))->fptr;
- GetOpenFile(io, fptr);
if (fptr->encs.enc2) {
- return rb_enc_from_encoding(fptr->encs.enc2);
+ return rb_enc_from_encoding(fptr->encs.enc2);
}
if (fptr->mode & FMODE_WRITABLE) {
- if (fptr->encs.enc)
- return rb_enc_from_encoding(fptr->encs.enc);
- return Qnil;
+ if (fptr->encs.enc)
+ return rb_enc_from_encoding(fptr->encs.enc);
+ return Qnil;
}
return rb_enc_from_encoding(io_read_encoding(fptr));
}
/*
* call-seq:
- * io.internal_encoding -> encoding
+ * internal_encoding -> encoding or nil
+ *
+ * Returns the Encoding object that represents the encoding of the internal string,
+ * if conversion is specified,
+ * or +nil+ otherwise.
+ *
+ * See {Encodings}[rdoc-ref:File@Encodings].
*
- * Returns the Encoding of the internal string if conversion is
- * specified. Otherwise returns +nil+.
*/
static VALUE
rb_io_internal_encoding(VALUE io)
{
- rb_io_t *fptr;
+ rb_io_t *fptr = RFILE(rb_io_taint_check(io))->fptr;
- GetOpenFile(io, fptr);
if (!fptr->encs.enc2) return Qnil;
return rb_enc_from_encoding(io_read_encoding(fptr));
}
/*
* call-seq:
- * io.set_encoding(ext_enc) -> io
- * io.set_encoding("ext_enc:int_enc") -> io
- * io.set_encoding(ext_enc, int_enc) -> io
- * io.set_encoding("ext_enc:int_enc", opt) -> io
- * io.set_encoding(ext_enc, int_enc, opt) -> io
+ * set_encoding(ext_enc) -> self
+ * set_encoding(ext_enc, int_enc, **enc_opts) -> self
+ * set_encoding('ext_enc:int_enc', **enc_opts) -> self
+ *
+ * See {Encodings}[rdoc-ref:File@Encodings].
+ *
+ * Argument +ext_enc+, if given, must be an Encoding object;
+ * it is assigned as the encoding for the stream.
+ *
+ * Argument +int_enc+, if given, must be an Encoding object;
+ * it is assigned as the encoding for the internal string.
+ *
+ * Argument <tt>'ext_enc:int_enc'</tt>, if given, is a string
+ * containing two colon-separated encoding names;
+ * corresponding Encoding objects are assigned as the external
+ * and internal encodings for the stream.
+ *
+ * Optional keyword arguments +enc_opts+ specify
+ * {Encoding options}[rdoc-ref:encodings.rdoc@Encoding+Options].
*
- * If single argument is specified, read string from io is tagged
- * with the encoding specified. If encoding is a colon separated two
- * encoding names "A:B", the read string is converted from encoding A
- * (external encoding) to encoding B (internal encoding), then tagged
- * with B. If two arguments are specified, those must be encoding
- * objects or encoding names, and the first one is the external encoding, and the
- * second one is the internal encoding.
- * If the external encoding and the internal encoding is specified,
- * optional hash argument specify the conversion option.
*/
static VALUE
@@ -11745,7 +13462,7 @@ rb_io_set_encoding(int argc, VALUE *argv, VALUE io)
VALUE v1, v2, opt;
if (!RB_TYPE_P(io, T_FILE)) {
- return rb_funcallv(io, id_set_encoding, argc, argv);
+ return forward(io, id_set_encoding, argc, argv);
}
argc = rb_scan_args(argc, argv, "11:", &v1, &v2, &opt);
@@ -11759,6 +13476,18 @@ rb_stdio_set_default_encoding(void)
{
VALUE val = Qnil;
+#ifdef _WIN32
+ if (isatty(fileno(stdin))) {
+ rb_encoding *external = rb_locale_encoding();
+ rb_encoding *internal = rb_default_internal_encoding();
+ if (!internal) internal = rb_default_external_encoding();
+ io_encoding_set(RFILE(rb_stdin)->fptr,
+ rb_enc_from_encoding(external),
+ rb_enc_from_encoding(internal),
+ Qnil);
+ }
+ else
+#endif
rb_io_set_encoding(1, &val, rb_stdin);
rb_io_set_encoding(1, &val, rb_stdout);
rb_io_set_encoding(1, &val, rb_stderr);
@@ -11770,16 +13499,27 @@ global_argf_p(VALUE arg)
return arg == argf;
}
+typedef VALUE (*argf_encoding_func)(VALUE io);
+
+static VALUE
+argf_encoding(VALUE argf, argf_encoding_func func)
+{
+ if (!RTEST(ARGF.current_file)) {
+ return rb_enc_default_external();
+ }
+ return func(rb_io_check_io(ARGF.current_file));
+}
+
/*
* call-seq:
* ARGF.external_encoding -> encoding
*
- * Returns the external encoding for files read from +ARGF+ as an +Encoding+
+ * Returns the external encoding for files read from ARGF as an Encoding
* object. The external encoding is the encoding of the text as stored in a
- * file. Contrast with +ARGF.internal_encoding+, which is the encoding used
- * to represent this text within Ruby.
+ * file. Contrast with ARGF.internal_encoding, which is the encoding used to
+ * represent this text within Ruby.
*
- * To set the external encoding use +ARGF.set_encoding+.
+ * To set the external encoding use ARGF.set_encoding.
*
* For example:
*
@@ -11789,20 +13529,17 @@ global_argf_p(VALUE arg)
static VALUE
argf_external_encoding(VALUE argf)
{
- if (!RTEST(ARGF.current_file)) {
- return rb_enc_from_encoding(rb_default_external_encoding());
- }
- return rb_io_external_encoding(rb_io_check_io(ARGF.current_file));
+ return argf_encoding(argf, rb_io_external_encoding);
}
/*
* call-seq:
* ARGF.internal_encoding -> encoding
*
- * Returns the internal encoding for strings read from +ARGF+ as an
- * +Encoding+ object.
+ * Returns the internal encoding for strings read from ARGF as an
+ * Encoding object.
*
- * If +ARGF.set_encoding+ has been called with two encoding names, the second
+ * If ARGF.set_encoding has been called with two encoding names, the second
* is returned. Otherwise, if +Encoding.default_external+ has been set, that
* value is returned. Failing that, if a default external encoding was
* specified on the command-line, that value is used. If the encoding is
@@ -11811,10 +13548,7 @@ argf_external_encoding(VALUE argf)
static VALUE
argf_internal_encoding(VALUE argf)
{
- if (!RTEST(ARGF.current_file)) {
- return rb_enc_from_encoding(rb_default_external_encoding());
- }
- return rb_io_internal_encoding(rb_io_check_io(ARGF.current_file));
+ return argf_encoding(argf, rb_io_internal_encoding);
}
/*
@@ -11838,7 +13572,7 @@ argf_internal_encoding(VALUE argf)
* specifies the internal encoding.
*
* If the external encoding and the internal encoding are specified, the
- * optional +Hash+ argument can be used to adjust the conversion process. The
+ * optional Hash argument can be used to adjust the conversion process. The
* structure of this hash is explained in the String#encode documentation.
*
* For example:
@@ -11854,7 +13588,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf)
rb_io_t *fptr;
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream to set encoding");
+ rb_raise(rb_eArgError, "no stream to set encoding");
}
rb_io_set_encoding(argc, argv, ARGF.current_file);
GetOpenFile(ARGF.current_file, fptr);
@@ -11867,7 +13601,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf)
* ARGF.tell -> Integer
* ARGF.pos -> Integer
*
- * Returns the current offset (in bytes) of the current file in +ARGF+.
+ * Returns the current offset (in bytes) of the current file in ARGF.
*
* ARGF.pos #=> 0
* ARGF.gets #=> "This is line one\n"
@@ -11878,7 +13612,7 @@ static VALUE
argf_tell(VALUE argf)
{
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream to tell");
+ rb_raise(rb_eArgError, "no stream to tell");
}
ARGF_FORWARD(0, 0);
return rb_io_tell(ARGF.current_file);
@@ -11888,14 +13622,14 @@ argf_tell(VALUE argf)
* call-seq:
* ARGF.seek(amount, whence=IO::SEEK_SET) -> 0
*
- * Seeks to offset _amount_ (an +Integer+) in the +ARGF+ stream according to
+ * Seeks to offset _amount_ (an Integer) in the ARGF stream according to
* the value of _whence_. See IO#seek for further details.
*/
static VALUE
argf_seek_m(int argc, VALUE *argv, VALUE argf)
{
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream to seek");
+ rb_raise(rb_eArgError, "no stream to seek");
}
ARGF_FORWARD(argc, argv);
return rb_io_seek_m(argc, argv, ARGF.current_file);
@@ -11905,7 +13639,7 @@ argf_seek_m(int argc, VALUE *argv, VALUE argf)
* call-seq:
* ARGF.pos = position -> Integer
*
- * Seeks to the position given by _position_ (in bytes) in +ARGF+.
+ * Seeks to the position given by _position_ (in bytes) in ARGF.
*
* For example:
*
@@ -11916,7 +13650,7 @@ static VALUE
argf_set_pos(VALUE argf, VALUE offset)
{
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream to set position");
+ rb_raise(rb_eArgError, "no stream to set position");
}
ARGF_FORWARD(1, &offset);
return rb_io_set_pos(ARGF.current_file, offset);
@@ -11927,7 +13661,7 @@ argf_set_pos(VALUE argf, VALUE offset)
* ARGF.rewind -> 0
*
* Positions the current file to the beginning of input, resetting
- * +ARGF.lineno+ to zero.
+ * ARGF.lineno to zero.
*
* ARGF.readline #=> "This is line one\n"
* ARGF.rewind #=> 0
@@ -11941,13 +13675,13 @@ argf_rewind(VALUE argf)
int old_lineno;
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream to rewind");
+ rb_raise(rb_eArgError, "no stream to rewind");
}
ARGF_FORWARD(0, 0);
old_lineno = RFILE(ARGF.current_file)->fptr->lineno;
ret = rb_io_rewind(ARGF.current_file);
if (!global_argf_p(argf)) {
- ARGF.last_lineno = ARGF.lineno -= old_lineno;
+ ARGF.last_lineno = ARGF.lineno -= old_lineno;
}
return ret;
}
@@ -11958,7 +13692,7 @@ argf_rewind(VALUE argf)
* ARGF.to_i -> integer
*
* Returns an integer representing the numeric file descriptor for
- * the current file. Raises an +ArgumentError+ if there isn't a current file.
+ * the current file. Raises an ArgumentError if there isn't a current file.
*
* ARGF.fileno #=> 3
*/
@@ -11966,7 +13700,7 @@ static VALUE
argf_fileno(VALUE argf)
{
if (!next_argv()) {
- rb_raise(rb_eArgError, "no stream");
+ rb_raise(rb_eArgError, "no stream");
}
ARGF_FORWARD(0, 0);
return rb_io_fileno(ARGF.current_file);
@@ -11976,8 +13710,8 @@ argf_fileno(VALUE argf)
* call-seq:
* ARGF.to_io -> IO
*
- * Returns an +IO+ object representing the current file. This will be a
- * +File+ object unless the current file is a stream such as STDIN.
+ * Returns an IO object representing the current file. This will be a
+ * File object unless the current file is a stream such as STDIN.
*
* For example:
*
@@ -11997,8 +13731,8 @@ argf_to_io(VALUE argf)
* ARGF.eof? -> true or false
* ARGF.eof -> true or false
*
- * Returns true if the current file in +ARGF+ is at end of file, i.e. it has
- * no data to read. The stream must be opened for reading or an +IOError+
+ * Returns true if the current file in ARGF is at end of file, i.e. it has
+ * no data to read. The stream must be opened for reading or an IOError
* will be raised.
*
* $ echo "eof" | ruby argf.rb
@@ -12015,12 +13749,12 @@ argf_eof(VALUE argf)
{
next_argv();
if (RTEST(ARGF.current_file)) {
- if (ARGF.init_p == 0) return Qtrue;
- next_argv();
- ARGF_FORWARD(0, 0);
- if (rb_io_eof(ARGF.current_file)) {
- return Qtrue;
- }
+ if (ARGF.init_p == 0) return Qtrue;
+ next_argv();
+ ARGF_FORWARD(0, 0);
+ if (rb_io_eof(ARGF.current_file)) {
+ return Qtrue;
+ }
}
return Qfalse;
}
@@ -12081,40 +13815,39 @@ argf_read(int argc, VALUE *argv, VALUE argf)
rb_scan_args(argc, argv, "02", &length, &str);
if (!NIL_P(length)) {
- len = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[0]);
}
if (!NIL_P(str)) {
- StringValue(str);
- rb_str_resize(str,0);
- argv[1] = Qnil;
+ StringValue(str);
+ rb_str_resize(str,0);
+ argv[1] = Qnil;
}
retry:
if (!next_argv()) {
- return str;
+ return str;
}
if (ARGF_GENERIC_INPUT_P()) {
- tmp = argf_forward(argc, argv, argf);
+ tmp = argf_forward(argc, argv, argf);
}
else {
- tmp = io_read(argc, argv, ARGF.current_file);
+ tmp = io_read(argc, argv, ARGF.current_file);
}
if (NIL_P(str)) str = tmp;
else if (!NIL_P(tmp)) rb_str_append(str, tmp);
if (NIL_P(tmp) || NIL_P(length)) {
- if (ARGF.next_p != -1) {
- argf_close(argf);
- ARGF.next_p = 1;
- goto retry;
- }
+ if (ARGF.next_p != -1) {
+ argf_close(argf);
+ ARGF.next_p = 1;
+ goto retry;
+ }
}
else if (argc >= 1) {
- long slen = RSTRING_LEN(str);
- if (slen < len) {
- len -= slen;
- argv[0] = INT2NUM(len);
- goto retry;
- }
+ long slen = RSTRING_LEN(str);
+ if (slen < len) {
+ argv[0] = LONG2NUM(len - slen);
+ goto retry;
+ }
}
return str;
}
@@ -12197,18 +13930,18 @@ argf_getpartial(int argc, VALUE *argv, VALUE argf, VALUE opts, int nonblock)
no_exception = no_exception_p(opts);
if (!next_argv()) {
- if (!NIL_P(str)) {
- rb_str_resize(str, 0);
- }
+ if (!NIL_P(str)) {
+ rb_str_resize(str, 0);
+ }
rb_eof_error();
}
if (ARGF_GENERIC_INPUT_P()) {
VALUE (*const rescue_does_nothing)(VALUE, VALUE) = 0;
- struct argf_call_arg arg;
- arg.argc = argc;
- arg.argv = argv;
- arg.argf = argf;
- tmp = rb_rescue2(argf_forward_call, (VALUE)&arg,
+ struct argf_call_arg arg;
+ arg.argc = argc;
+ arg.argv = argv;
+ arg.argf = argf;
+ tmp = rb_rescue2(argf_forward_call, (VALUE)&arg,
rescue_does_nothing, Qnil, rb_eEOFError, (VALUE)0);
}
else {
@@ -12222,7 +13955,7 @@ argf_getpartial(int argc, VALUE *argv, VALUE argf, VALUE opts, int nonblock)
ARGF.next_p = 1;
if (RARRAY_LEN(ARGF.argv) == 0) {
return io_nonblock_eof(no_exception);
- }
+ }
if (NIL_P(str))
str = rb_str_new(NULL, 0);
return str;
@@ -12234,10 +13967,10 @@ argf_getpartial(int argc, VALUE *argv, VALUE argf, VALUE opts, int nonblock)
* call-seq:
* ARGF.getc -> String or nil
*
- * Reads the next character from +ARGF+ and returns it as a +String+. Returns
+ * Reads the next character from ARGF and returns it as a String. Returns
* +nil+ at the end of the stream.
*
- * +ARGF+ treats the files named on the command line as a single file created
+ * ARGF treats the files named on the command line as a single file created
* by concatenating their contents. After returning the last character of the
* first file, it returns the first character of the second file, and so on.
*
@@ -12261,15 +13994,15 @@ argf_getc(VALUE argf)
retry:
if (!next_argv()) return Qnil;
if (ARGF_GENERIC_INPUT_P()) {
- ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0);
+ ch = forward_current(rb_intern("getc"), 0, 0);
}
else {
- ch = rb_io_getc(ARGF.current_file);
+ ch = rb_io_getc(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
- ARGF.next_p = 1;
- goto retry;
+ argf_close(argf);
+ ARGF.next_p = 1;
+ goto retry;
}
return ch;
@@ -12279,7 +14012,7 @@ argf_getc(VALUE argf)
* call-seq:
* ARGF.getbyte -> Integer or nil
*
- * Gets the next 8-bit byte (0..255) from +ARGF+. Returns +nil+ if called at
+ * Gets the next 8-bit byte (0..255) from ARGF. Returns +nil+ if called at
* the end of the stream.
*
* For example:
@@ -12301,15 +14034,15 @@ argf_getbyte(VALUE argf)
retry:
if (!next_argv()) return Qnil;
if (!RB_TYPE_P(ARGF.current_file, T_FILE)) {
- ch = rb_funcall3(ARGF.current_file, rb_intern("getbyte"), 0, 0);
+ ch = forward_current(rb_intern("getbyte"), 0, 0);
}
else {
- ch = rb_io_getbyte(ARGF.current_file);
+ ch = rb_io_getbyte(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
- ARGF.next_p = 1;
- goto retry;
+ argf_close(argf);
+ ARGF.next_p = 1;
+ goto retry;
}
return ch;
@@ -12319,8 +14052,8 @@ argf_getbyte(VALUE argf)
* call-seq:
* ARGF.readchar -> String or nil
*
- * Reads the next character from +ARGF+ and returns it as a +String+. Raises
- * an +EOFError+ after the last character of the last file has been read.
+ * Reads the next character from ARGF and returns it as a String. Raises
+ * an EOFError after the last character of the last file has been read.
*
* For example:
*
@@ -12341,15 +14074,15 @@ argf_readchar(VALUE argf)
retry:
if (!next_argv()) rb_eof_error();
if (!RB_TYPE_P(ARGF.current_file, T_FILE)) {
- ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0);
+ ch = forward_current(rb_intern("getc"), 0, 0);
}
else {
- ch = rb_io_getc(ARGF.current_file);
+ ch = rb_io_getc(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
- ARGF.next_p = 1;
- goto retry;
+ argf_close(argf);
+ ARGF.next_p = 1;
+ goto retry;
}
return ch;
@@ -12359,8 +14092,8 @@ argf_readchar(VALUE argf)
* call-seq:
* ARGF.readbyte -> Integer
*
- * Reads the next 8-bit byte from ARGF and returns it as an +Integer+. Raises
- * an +EOFError+ after the last byte of the last file has been read.
+ * Reads the next 8-bit byte from ARGF and returns it as an Integer. Raises
+ * an EOFError after the last byte of the last file has been read.
*
* For example:
*
@@ -12381,7 +14114,7 @@ argf_readbyte(VALUE argf)
NEXT_ARGF_FORWARD(0, 0);
c = argf_getbyte(argf);
if (NIL_P(c)) {
- rb_eof_error();
+ rb_eof_error();
}
return c;
}
@@ -12394,23 +14127,27 @@ argf_block_call_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, argf))
const VALUE current = ARGF.current_file;
rb_yield_values2(argc, argv);
if (ARGF.init_p == -1 || current != ARGF.current_file) {
- rb_iter_break_value(Qundef);
+ rb_iter_break_value(Qundef);
}
return Qnil;
}
+#define ARGF_block_call(mid, argc, argv, func, argf) \
+ rb_block_call_kw(ARGF.current_file, mid, argc, argv, \
+ func, argf, rb_keyword_given_p())
+
static void
argf_block_call(ID mid, int argc, VALUE *argv, VALUE argf)
{
- VALUE ret = rb_block_call(ARGF.current_file, mid, argc, argv, argf_block_call_i, argf);
- if (ret != Qundef) ARGF.next_p = 1;
+ VALUE ret = ARGF_block_call(mid, argc, argv, argf_block_call_i, argf);
+ if (!UNDEF_P(ret)) ARGF.next_p = 1;
}
static VALUE
argf_block_call_line_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, argf))
{
if (!global_argf_p(argf)) {
- ARGF.last_lineno = ++ARGF.lineno;
+ ARGF.last_lineno = ++ARGF.lineno;
}
return argf_block_call_i(i, argf, argc, argv, blockarg);
}
@@ -12418,8 +14155,8 @@ argf_block_call_line_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, argf))
static void
argf_block_call_line(ID mid, int argc, VALUE *argv, VALUE argf)
{
- VALUE ret = rb_block_call(ARGF.current_file, mid, argc, argv, argf_block_call_line_i, argf);
- if (ret != Qundef) ARGF.next_p = 1;
+ VALUE ret = ARGF_block_call(mid, argc, argv, argf_block_call_line_i, argf);
+ if (!UNDEF_P(ret)) ARGF.next_p = 1;
}
/*
@@ -12436,15 +14173,15 @@ argf_block_call_line(ID mid, int argc, VALUE *argv, VALUE argf)
* which defaults to your platform's newline character) of each file in
* +ARGV+. If a block is supplied, each line in turn will be yielded to the
* block, otherwise an enumerator is returned.
- * The optional _limit_ argument is an +Integer+ specifying the maximum
+ * The optional _limit_ argument is an Integer specifying the maximum
* length of each line; longer lines will be split according to this limit.
*
* This method allows you to treat the files supplied on the command line as
* a single file consisting of the concatenation of each named file. After
* the last line of the first file has been returned, the first line of the
- * second file is returned. The +ARGF.filename+ and +ARGF.lineno+ methods can
- * be used to determine the filename of the current line and line number of
- * the whole input, respectively.
+ * second file is returned. The ARGF.filename and ARGF.lineno methods can be
+ * used to determine the filename of the current line and line number of the
+ * whole input, respectively.
*
* For example, the following code prints out each line of each named file
* prefixed with its line number, displaying the filename once per file:
@@ -12467,39 +14204,23 @@ argf_each_line(int argc, VALUE *argv, VALUE argf)
{
RETURN_ENUMERATOR(argf, argc, argv);
FOREACH_ARGF() {
- argf_block_call_line(rb_intern("each_line"), argc, argv, argf);
+ argf_block_call_line(rb_intern("each_line"), argc, argv, argf);
}
return argf;
}
/*
- * This is a deprecated alias for #each_line.
- */
-
-static VALUE
-argf_lines(int argc, VALUE *argv, VALUE argf)
-{
- rb_warn_deprecated("ARGF#lines", "#each_line");
- if (!rb_block_given_p())
- return rb_enumeratorize(argf, ID2SYM(rb_intern("each_line")), argc, argv);
- return argf_each_line(argc, argv, argf);
-}
-
-/*
* call-seq:
- * ARGF.bytes {|byte| block } -> ARGF
- * ARGF.bytes -> an_enumerator
- *
* ARGF.each_byte {|byte| block } -> ARGF
* ARGF.each_byte -> an_enumerator
*
* Iterates over each byte of each file in +ARGV+.
- * A byte is returned as an +Integer+ in the range 0..255.
+ * A byte is returned as an Integer in the range 0..255.
*
* This method allows you to treat the files supplied on the command line as
* a single file consisting of the concatenation of each named file. After
* the last byte of the first file has been returned, the first byte of the
- * second file is returned. The +ARGF.filename+ method can be used to
+ * second file is returned. The ARGF.filename method can be used to
* determine the filename of the current byte.
*
* If no block is given, an enumerator is returned instead.
@@ -12514,35 +14235,22 @@ argf_each_byte(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
FOREACH_ARGF() {
- argf_block_call(rb_intern("each_byte"), 0, 0, argf);
+ argf_block_call(rb_intern("each_byte"), 0, 0, argf);
}
return argf;
}
/*
- * This is a deprecated alias for #each_byte.
- */
-
-static VALUE
-argf_bytes(VALUE argf)
-{
- rb_warn_deprecated("ARGF#bytes", "#each_byte");
- if (!rb_block_given_p())
- return rb_enumeratorize(argf, ID2SYM(rb_intern("each_byte")), 0, 0);
- return argf_each_byte(argf);
-}
-
-/*
* call-seq:
* ARGF.each_char {|char| block } -> ARGF
* ARGF.each_char -> an_enumerator
*
- * Iterates over each character of each file in +ARGF+.
+ * Iterates over each character of each file in ARGF.
*
* This method allows you to treat the files supplied on the command line as
* a single file consisting of the concatenation of each named file. After
* the last character of the first file has been returned, the first
- * character of the second file is returned. The +ARGF.filename+ method can
+ * character of the second file is returned. The ARGF.filename method can
* be used to determine the name of the file in which the current character
* appears.
*
@@ -12553,35 +14261,22 @@ argf_each_char(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
FOREACH_ARGF() {
- argf_block_call(rb_intern("each_char"), 0, 0, argf);
+ argf_block_call(rb_intern("each_char"), 0, 0, argf);
}
return argf;
}
/*
- * This is a deprecated alias for #each_char.
- */
-
-static VALUE
-argf_chars(VALUE argf)
-{
- rb_warn_deprecated("ARGF#chars", "#each_char");
- if (!rb_block_given_p())
- return rb_enumeratorize(argf, ID2SYM(rb_intern("each_char")), 0, 0);
- return argf_each_char(argf);
-}
-
-/*
* call-seq:
* ARGF.each_codepoint {|codepoint| block } -> ARGF
* ARGF.each_codepoint -> an_enumerator
*
- * Iterates over each codepoint of each file in +ARGF+.
+ * Iterates over each codepoint of each file in ARGF.
*
* This method allows you to treat the files supplied on the command line as
* a single file consisting of the concatenation of each named file. After
* the last codepoint of the first file has been returned, the first
- * codepoint of the second file is returned. The +ARGF.filename+ method can
+ * codepoint of the second file is returned. The ARGF.filename method can
* be used to determine the name of the file in which the current codepoint
* appears.
*
@@ -12592,25 +14287,12 @@ argf_each_codepoint(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
FOREACH_ARGF() {
- argf_block_call(rb_intern("each_codepoint"), 0, 0, argf);
+ argf_block_call(rb_intern("each_codepoint"), 0, 0, argf);
}
return argf;
}
/*
- * This is a deprecated alias for #each_codepoint.
- */
-
-static VALUE
-argf_codepoints(VALUE argf)
-{
- rb_warn_deprecated("ARGF#codepoints", "#each_codepoint");
- if (!rb_block_given_p())
- return rb_enumeratorize(argf, ID2SYM(rb_intern("each_codepoint")), 0, 0);
- return argf_each_codepoint(argf);
-}
-
-/*
* call-seq:
* ARGF.filename -> String
* ARGF.path -> String
@@ -12649,7 +14331,7 @@ argf_filename_getter(ID id, VALUE *var)
* call-seq:
* ARGF.file -> IO or File object
*
- * Returns the current file as an +IO+ or +File+ object.
+ * Returns the current file as an IO or File object.
* <code>$stdin</code> is returned when the current file is STDIN.
*
* For example:
@@ -12674,7 +14356,7 @@ argf_file(VALUE argf)
* call-seq:
* ARGF.binmode -> ARGF
*
- * Puts +ARGF+ into binary mode. Once a stream is in binary mode, it cannot
+ * Puts ARGF into binary mode. Once a stream is in binary mode, it cannot
* be reset to non-binary mode. This option has the following effects:
*
* * Newline conversion is disabled.
@@ -12695,8 +14377,8 @@ argf_binmode_m(VALUE argf)
* call-seq:
* ARGF.binmode? -> true or false
*
- * Returns true if +ARGF+ is being read in binary mode; false otherwise.
- * To enable binary mode use +ARGF.binmode+.
+ * Returns true if ARGF is being read in binary mode; false otherwise.
+ * To enable binary mode use ARGF.binmode.
*
* For example:
*
@@ -12707,7 +14389,7 @@ argf_binmode_m(VALUE argf)
static VALUE
argf_binmode_p(VALUE argf)
{
- return ARGF.binmode ? Qtrue : Qfalse;
+ return RBOOL(ARGF.binmode);
}
/*
@@ -12728,8 +14410,8 @@ static VALUE
argf_skip(VALUE argf)
{
if (ARGF.init_p && ARGF.next_p == 0) {
- argf_close(argf);
- ARGF.next_p = 1;
+ argf_close(argf);
+ ARGF.next_p = 1;
}
return argf;
}
@@ -12739,7 +14421,7 @@ argf_skip(VALUE argf)
* ARGF.close -> ARGF
*
* Closes the current file and skips to the next file in ARGV. If there are
- * no more files to open, just closes the current file. +STDIN+ will not be
+ * no more files to open, just closes the current file. STDIN will not be
* closed.
*
* For example:
@@ -12757,7 +14439,7 @@ argf_close_m(VALUE argf)
next_argv();
argf_close(argf);
if (ARGF.next_p != -1) {
- ARGF.next_p = 1;
+ ARGF.next_p = 1;
}
ARGF.lineno = 0;
return argf;
@@ -12768,7 +14450,7 @@ argf_close_m(VALUE argf)
* ARGF.closed? -> true or false
*
* Returns _true_ if the current file has been closed; _false_ otherwise. Use
- * +ARGF.close+ to actually close the current file.
+ * ARGF.close to actually close the current file.
*/
static VALUE
argf_closed(VALUE argf)
@@ -12794,9 +14476,9 @@ argf_to_s(VALUE argf)
* call-seq:
* ARGF.inplace_mode -> String
*
- * Returns the file extension appended to the names of modified files under
- * in-place edit mode. This value can be set using +ARGF.inplace_mode=+ or
- * passing the +-i+ switch to the Ruby binary.
+ * Returns the file extension appended to the names of backup copies of
+ * modified files under in-place edit mode. This value can be set using
+ * ARGF.inplace_mode= or passing the +-i+ switch to the Ruby binary.
*/
static VALUE
argf_inplace_mode_get(VALUE argf)
@@ -12817,8 +14499,8 @@ opt_i_get(ID id, VALUE *var)
* ARGF.inplace_mode = ext -> ARGF
*
* Sets the filename extension for in-place editing mode to the given String.
- * Each file being edited has this value appended to its filename. The
- * modified file is saved under this new name.
+ * The backup copy of each file being edited has this value appended to its
+ * filename.
*
* For example:
*
@@ -12829,20 +14511,21 @@ opt_i_get(ID id, VALUE *var)
* print line.sub("foo","bar")
* end
*
- * Each line of _file.txt_ has the first occurrence of "foo" replaced with
- * "bar", then the new line is written out to _file.txt.bak_.
+ * First, _file.txt.bak_ is created as a backup copy of _file.txt_.
+ * Then, each line of _file.txt_ has the first occurrence of "foo" replaced with
+ * "bar".
*/
static VALUE
argf_inplace_mode_set(VALUE argf, VALUE val)
{
if (!RTEST(val)) {
- ARGF.inplace = Qfalse;
+ ARGF.inplace = Qfalse;
}
else if (StringValueCStr(val), !RSTRING_LEN(val)) {
- ARGF.inplace = Qnil;
+ ARGF.inplace = Qnil;
}
else {
- ARGF.inplace = rb_str_new_frozen(val);
+ ARGF.inplace = rb_str_new_frozen(val);
}
return argf;
}
@@ -12856,7 +14539,7 @@ opt_i_set(VALUE val, ID id, VALUE *var)
void
ruby_set_inplace_mode(const char *suffix)
{
- ARGF.inplace = !suffix ? Qfalse : !*suffix ? Qnil : rb_fstring_cstr(suffix);
+ ARGF.inplace = !suffix ? Qfalse : !*suffix ? Qnil : rb_str_new(suffix, strlen(suffix));
}
/*
@@ -12902,7 +14585,7 @@ static VALUE
argf_write_io(VALUE argf)
{
if (!RTEST(ARGF.current_file)) {
- rb_raise(rb_eIOError, "not opened for writing");
+ rb_raise(rb_eIOError, "not opened for writing");
}
return GetWriteIO(ARGF.current_file);
}
@@ -12920,53 +14603,55 @@ argf_write(VALUE argf, VALUE str)
}
void
-rb_readwrite_sys_fail(enum rb_io_wait_readwrite writable, const char *mesg)
+rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *mesg)
{
- rb_readwrite_syserr_fail(writable, errno, mesg);
+ rb_readwrite_syserr_fail(waiting, errno, mesg);
}
void
-rb_readwrite_syserr_fail(enum rb_io_wait_readwrite writable, int n, const char *mesg)
+rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int n, const char *mesg)
{
- VALUE arg;
+ VALUE arg, c = Qnil;
arg = mesg ? rb_str_new2(mesg) : Qnil;
- if (writable == RB_IO_WAIT_WRITABLE) {
- switch (n) {
- case EAGAIN:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEAGAINWaitWritable));
- break;
+ switch (waiting) {
+ case RB_IO_WAIT_WRITABLE:
+ switch (n) {
+ case EAGAIN:
+ c = rb_eEAGAINWaitWritable;
+ break;
#if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEWOULDBLOCKWaitWritable));
- break;
-#endif
- case EINPROGRESS:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEINPROGRESSWaitWritable));
- break;
- default:
- rb_mod_sys_fail_str(rb_mWaitWritable, arg);
- }
- }
- else if (writable == RB_IO_WAIT_READABLE) {
- switch (n) {
- case EAGAIN:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEAGAINWaitReadable));
- break;
+ case EWOULDBLOCK:
+ c = rb_eEWOULDBLOCKWaitWritable;
+ break;
+#endif
+ case EINPROGRESS:
+ c = rb_eEINPROGRESSWaitWritable;
+ break;
+ default:
+ rb_mod_syserr_fail_str(rb_mWaitWritable, n, arg);
+ }
+ break;
+ case RB_IO_WAIT_READABLE:
+ switch (n) {
+ case EAGAIN:
+ c = rb_eEAGAINWaitReadable;
+ break;
#if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEWOULDBLOCKWaitReadable));
- break;
+ case EWOULDBLOCK:
+ c = rb_eEWOULDBLOCKWaitReadable;
+ break;
#endif
- case EINPROGRESS:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEINPROGRESSWaitReadable));
- break;
- default:
- rb_mod_sys_fail_str(rb_mWaitReadable, arg);
- }
- }
- else {
- rb_bug("invalid read/write type passed to rb_readwrite_sys_fail: %d", writable);
+ case EINPROGRESS:
+ c = rb_eEINPROGRESSWaitReadable;
+ break;
+ default:
+ rb_mod_syserr_fail_str(rb_mWaitReadable, n, arg);
+ }
+ break;
+ default:
+ rb_bug("invalid read/write type passed to rb_readwrite_sys_fail: %d", waiting);
}
+ rb_exc_raise(rb_class_new_instance(1, &arg, c));
}
static VALUE
@@ -13006,24 +14691,25 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* methods exist in two forms,
*
* one that returns +nil+ when the end of file is reached, the other
- * raises +EOFError+.
+ * raises EOFError.
*
- * +EOFError+ is a subclass of +IOError+.
+ * EOFError is a subclass of IOError.
*
* file = File.open("/etc/hosts")
* file.read
* file.gets #=> nil
* file.readline #=> EOFError: end of file reached
+ * file.close
*/
/*
* Document-class: ARGF
*
- * +ARGF+ is a stream designed for use in scripts that process files given as
+ * ARGF is a stream designed for use in scripts that process files given as
* command-line arguments or passed in via STDIN.
*
* The arguments passed to your script are stored in the +ARGV+ Array, one
- * argument per element. +ARGF+ assumes that any arguments that aren't
+ * argument per element. ARGF assumes that any arguments that aren't
* filenames have been removed from +ARGV+. For example:
*
* $ ruby argf.rb --verbose file1 file2
@@ -13032,15 +14718,15 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* option = ARGV.shift #=> "--verbose"
* ARGV #=> ["file1", "file2"]
*
- * You can now use +ARGF+ to work with a concatenation of each of these named
- * files. For instance, +ARGF.read+ will return the contents of _file1_
+ * You can now use ARGF to work with a concatenation of each of these named
+ * files. For instance, ARGF.read will return the contents of _file1_
* followed by the contents of _file2_.
*
- * After a file in +ARGV+ has been read +ARGF+ removes it from the Array.
+ * After a file in +ARGV+ has been read ARGF removes it from the Array.
* Thus, after all files have been read +ARGV+ will be empty.
*
- * You can manipulate +ARGV+ yourself to control what +ARGF+ operates on. If
- * you remove a file from +ARGV+, it is ignored by +ARGF+; if you add files to
+ * You can manipulate +ARGV+ yourself to control what ARGF operates on. If
+ * you remove a file from +ARGV+, it is ignored by ARGF; if you add files to
* +ARGV+, they are treated as if they were named on the command line. For
* example:
*
@@ -13050,7 +14736,7 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
* ARGV.replace ["file2", "file3"]
* ARGF.read # Returns the contents of file2 and file3
*
- * If +ARGV+ is empty, +ARGF+ acts as if it contained STDIN, i.e. the data
+ * If +ARGV+ is empty, ARGF acts as if it contained STDIN, i.e. the data
* piped to your script. For example:
*
* $ echo "glark" | ruby -e 'p ARGF.read'
@@ -13058,100 +14744,577 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
*/
/*
- * The IO class is the basis for all input and output in Ruby.
- * An I/O stream may be <em>duplexed</em> (that is, bidirectional), and
- * so may use more than one native operating system stream.
+ * An instance of class \IO (commonly called a _stream_)
+ * represents an input/output stream in the underlying operating system.
+ * \Class \IO is the basis for input and output in Ruby.
*
- * Many of the examples in this section use the File class, the only standard
- * subclass of IO. The two classes are closely associated. Like the File
- * class, the Socket library subclasses from IO (such as TCPSocket or
- * UDPSocket).
+ * \Class File is the only class in the Ruby core that is a subclass of \IO.
+ * Some classes in the Ruby standard library are also subclasses of \IO;
+ * these include TCPSocket and UDPSocket.
*
- * The Kernel#open method can create an IO (or File) object for these types
- * of arguments:
+ * The global constant ARGF (also accessible as <tt>$<</tt>)
+ * provides an IO-like stream that allows access to all file paths
+ * found in ARGV (or found in STDIN if ARGV is empty).
+ * ARGF is not itself a subclass of \IO.
*
- * * A plain string represents a filename suitable for the underlying
- * operating system.
+ * \Class StringIO provides an IO-like stream that handles a String.
+ * \StringIO is not itself a subclass of \IO.
+ *
+ * Important objects based on \IO include:
+ *
+ * - $stdin.
+ * - $stdout.
+ * - $stderr.
+ * - Instances of class File.
+ *
+ * An instance of \IO may be created using:
+ *
+ * - IO.new: returns a new \IO object for the given integer file descriptor.
+ * - IO.open: passes a new \IO object to the given block.
+ * - IO.popen: returns a new \IO object that is connected to the $stdin and $stdout
+ * of a newly-launched subprocess.
+ * - Kernel#open: Returns a new \IO object connected to a given source:
+ * stream, file, or subprocess.
+ *
+ * Like a \File stream, an \IO stream has:
+ *
+ * - A read/write mode, which may be read-only, write-only, or read/write;
+ * see {Read/Write Mode}[rdoc-ref:File@Read-2FWrite+Mode].
+ * - A data mode, which may be text-only or binary;
+ * see {Data Mode}[rdoc-ref:File@Data+Mode].
+ * - Internal and external encodings;
+ * see {Encodings}[rdoc-ref:File@Encodings].
+ *
+ * And like other \IO streams, it has:
+ *
+ * - A position, which determines where in the stream the next
+ * read or write is to occur;
+ * see {Position}[rdoc-ref:IO@Position].
+ * - A line number, which is a special, line-oriented, "position"
+ * (different from the position mentioned above);
+ * see {Line Number}[rdoc-ref:IO@Line+Number].
+ *
+ * == Extension <tt>io/console</tt>
+ *
+ * Extension <tt>io/console</tt> provides numerous methods
+ * for interacting with the console;
+ * requiring it adds numerous methods to class \IO.
+ *
+ * == Example Files
+ *
+ * Many examples here use these variables:
+ *
+ * :include: doc/examples/files.rdoc
+ *
+ * == Open Options
+ *
+ * A number of \IO methods accept optional keyword arguments
+ * that determine how a new stream is to be opened:
+ *
+ * - +:mode+: Stream mode.
+ * - +:flags+: \Integer file open flags;
+ * If +mode+ is also given, the two are bitwise-ORed.
+ * - +:external_encoding+: External encoding for the stream.
+ * - +:internal_encoding+: Internal encoding for the stream.
+ * <tt>'-'</tt> is a synonym for the default internal encoding.
+ * If the value is +nil+ no conversion occurs.
+ * - +:encoding+: Specifies external and internal encodings as <tt>'extern:intern'</tt>.
+ * - +:textmode+: If a truthy value, specifies the mode as text-only, binary otherwise.
+ * - +:binmode+: If a truthy value, specifies the mode as binary, text-only otherwise.
+ * - +:autoclose+: If a truthy value, specifies that the +fd+ will close
+ * when the stream closes; otherwise it remains open.
+ * - +:path:+ If a string value is provided, it is used in #inspect and is available as
+ * #path method.
+ *
+ * Also available are the options offered in String#encode,
+ * which may control conversion between external internal encoding.
+ *
+ * == Basic \IO
+ *
+ * You can perform basic stream \IO with these methods,
+ * which typically operate on multi-byte strings:
+ *
+ * - IO#read: Reads and returns some or all of the remaining bytes from the stream.
+ * - IO#write: Writes zero or more strings to the stream;
+ * each given object that is not already a string is converted via +to_s+.
+ *
+ * === Position
+ *
+ * An \IO stream has a nonnegative integer _position_,
+ * which is the byte offset at which the next read or write is to occur.
+ * A new stream has position zero (and line number zero);
+ * method +rewind+ resets the position (and line number) to zero.
+ *
+ * The relevant methods:
+ *
+ * - IO#tell (aliased as +#pos+): Returns the current position (in bytes) in the stream.
+ * - IO#pos=: Sets the position of the stream to a given integer +new_position+ (in bytes).
+ * - IO#seek: Sets the position of the stream to a given integer +offset+ (in bytes),
+ * relative to a given position +whence+
+ * (indicating the beginning, end, or current position).
+ * - IO#rewind: Positions the stream at the beginning (also resetting the line number).
+ *
+ * === Open and Closed Streams
+ *
+ * A new \IO stream may be open for reading, open for writing, or both.
+ *
+ * A stream is automatically closed when claimed by the garbage collector.
+ *
+ * Attempted reading or writing on a closed stream raises an exception.
+ *
+ * The relevant methods:
+ *
+ * - IO#close: Closes the stream for both reading and writing.
+ * - IO#close_read: Closes the stream for reading.
+ * - IO#close_write: Closes the stream for writing.
+ * - IO#closed?: Returns whether the stream is closed.
+ *
+ * === End-of-Stream
+ *
+ * You can query whether a stream is positioned at its end:
+ *
+ * - IO#eof? (also aliased as +#eof+): Returns whether the stream is at end-of-stream.
+ *
+ * You can reposition to end-of-stream by using method IO#seek:
+ *
+ * f = File.new('t.txt')
+ * f.eof? # => false
+ * f.seek(0, :END)
+ * f.eof? # => true
+ * f.close
+ *
+ * Or by reading all stream content (which is slower than using IO#seek):
+ *
+ * f.rewind
+ * f.eof? # => false
+ * f.read # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.eof? # => true
+ *
+ * == Line \IO
+ *
+ * You can read an \IO stream line-by-line using these methods:
+ *
+ * - IO#each_line: Reads each remaining line, passing it to the given block.
+ * - IO#gets: Returns the next line.
+ * - IO#readline: Like #gets, but raises an exception at end-of-stream.
+ * - IO#readlines: Returns all remaining lines in an array.
+ *
+ * Each of these reader methods accepts:
+ *
+ * - An optional line separator, +sep+;
+ * see {Line Separator}[rdoc-ref:IO@Line+Separator].
+ * - An optional line-size limit, +limit+;
+ * see {Line Limit}[rdoc-ref:IO@Line+Limit].
+ *
+ * For each of these reader methods, reading may begin mid-line,
+ * depending on the stream's position;
+ * see {Position}[rdoc-ref:IO@Position]:
+ *
+ * f = File.new('t.txt')
+ * f.pos = 27
+ * f.each_line {|line| p line }
+ * f.close
+ *
+ * Output:
+ *
+ * "rth line\n"
+ * "Fifth line\n"
+ *
+ * You can write to an \IO stream line-by-line using this method:
*
- * * A string starting with <code>"|"</code> indicates a subprocess.
- * The remainder of the string following the <code>"|"</code> is
- * invoked as a process with appropriate input/output channels
- * connected to it.
- *
- * * A string equal to <code>"|-"</code> will create another Ruby
- * instance as a subprocess.
- *
- * The IO may be opened with different file modes (read-only, write-only) and
- * encodings for proper conversion. See IO.new for these options. See
- * Kernel#open for details of the various command formats described above.
- *
- * IO.popen, the Open3 library, or Process#spawn may also be used to
- * communicate with subprocesses through an IO.
- *
- * Ruby will convert pathnames between different operating system
- * conventions if possible. For instance, on a Windows system the
- * filename <code>"/gumby/ruby/test.rb"</code> will be opened as
- * <code>"\gumby\ruby\test.rb"</code>. When specifying a Windows-style
- * filename in a Ruby string, remember to escape the backslashes:
- *
- * "C:\\gumby\\ruby\\test.rb"
- *
- * Our examples here will use the Unix-style forward slashes;
- * File::ALT_SEPARATOR can be used to get the platform-specific separator
- * character.
- *
- * The global constant ARGF (also accessible as <code>$<</code>) provides an
- * IO-like stream which allows access to all files mentioned on the
- * command line (or STDIN if no files are mentioned). ARGF#path and its alias
- * ARGF#filename are provided to access the name of the file currently being
- * read.
- *
- * == io/console
- *
- * The io/console extension provides methods for interacting with the
- * console. The console can be accessed from IO.console or the standard
- * input/output/error IO objects.
- *
- * Requiring io/console adds the following methods:
- *
- * * IO::console
- * * IO#raw
- * * IO#raw!
- * * IO#cooked
- * * IO#cooked!
- * * IO#getch
- * * IO#echo=
- * * IO#echo?
- * * IO#noecho
- * * IO#winsize
- * * IO#winsize=
- * * IO#iflush
- * * IO#ioflush
- * * IO#oflush
+ * - IO#puts: Writes objects to the stream.
+ *
+ * === Line Separator
+ *
+ * Each of these methods uses a <i>line separator</i>,
+ * which is the string that delimits lines:
+ *
+ * - IO.foreach.
+ * - IO.readlines.
+ * - IO#each_line.
+ * - IO#gets.
+ * - IO#readline.
+ * - IO#readlines.
+ *
+ * The default line separator is the given by the global variable <tt>$/</tt>,
+ * whose value is by default <tt>"\n"</tt>.
+ * The line to be read next is all data from the current position
+ * to the next line separator:
+ *
+ * f = File.new('t.txt')
+ * f.gets # => "First line\n"
+ * f.gets # => "Second line\n"
+ * f.gets # => "\n"
+ * f.gets # => "Fourth line\n"
+ * f.gets # => "Fifth line\n"
+ * f.close
+ *
+ * You can specify a different line separator:
+ *
+ * f = File.new('t.txt')
+ * f.gets('l') # => "First l"
+ * f.gets('li') # => "ine\nSecond li"
+ * f.gets('lin') # => "ne\n\nFourth lin"
+ * f.gets # => "e\n"
+ * f.close
+ *
+ * There are two special line separators:
+ *
+ * - +nil+: The entire stream is read into a single string:
+ *
+ * f = File.new('t.txt')
+ * f.gets(nil) # => "First line\nSecond line\n\nFourth line\nFifth line\n"
+ * f.close
+ *
+ * - <tt>''</tt> (the empty string): The next "paragraph" is read
+ * (paragraphs being separated by two consecutive line separators):
+ *
+ * f = File.new('t.txt')
+ * f.gets('') # => "First line\nSecond line\n\n"
+ * f.gets('') # => "Fourth line\nFifth line\n"
+ * f.close
+ *
+ * === Line Limit
+ *
+ * Each of these methods uses a <i>line limit</i>,
+ * which specifies that the number of bytes returned may not be (much) longer
+ * than the given +limit+;
+ *
+ * - IO.foreach.
+ * - IO.readlines.
+ * - IO#each_line.
+ * - IO#gets.
+ * - IO#readline.
+ * - IO#readlines.
+ *
+ * A multi-byte character will not be split, and so a line may be slightly longer
+ * than the given limit.
+ *
+ * If +limit+ is not given, the line is determined only by +sep+.
+ *
+ * # Text with 1-byte characters.
+ * File.open('t.txt') {|f| f.gets(1) } # => "F"
+ * File.open('t.txt') {|f| f.gets(2) } # => "Fi"
+ * File.open('t.txt') {|f| f.gets(3) } # => "Fir"
+ * File.open('t.txt') {|f| f.gets(4) } # => "Firs"
+ * # No more than one line.
+ * File.open('t.txt') {|f| f.gets(10) } # => "First line"
+ * File.open('t.txt') {|f| f.gets(11) } # => "First line\n"
+ * File.open('t.txt') {|f| f.gets(12) } # => "First line\n"
+ *
+ * # Text with 2-byte characters, which will not be split.
+ * File.open('t.rus') {|f| f.gets(1).size } # => 1
+ * File.open('t.rus') {|f| f.gets(2).size } # => 1
+ * File.open('t.rus') {|f| f.gets(3).size } # => 2
+ * File.open('t.rus') {|f| f.gets(4).size } # => 2
+ *
+ * === Line Separator and Line Limit
+ *
+ * With arguments +sep+ and +limit+ given,
+ * combines the two behaviors:
+ *
+ * - Returns the next line as determined by line separator +sep+.
+ * - But returns no more bytes than are allowed by the limit.
*
* Example:
*
- * require 'io/console'
- * rows, columns = $stdout.winsize
- * puts "Your screen is #{columns} wide and #{rows} tall"
+ * File.open('t.txt') {|f| f.gets('li', 20) } # => "First li"
+ * File.open('t.txt') {|f| f.gets('li', 2) } # => "Fi"
+ *
+ * === Line Number
+ *
+ * A readable \IO stream has a non-negative integer <i>line number</i>.
+ *
+ * The relevant methods:
+ *
+ * - IO#lineno: Returns the line number.
+ * - IO#lineno=: Resets and returns the line number.
+ *
+ * Unless modified by a call to method IO#lineno=,
+ * the line number is the number of lines read
+ * by certain line-oriented methods,
+ * according to the given line separator +sep+:
+ *
+ * - IO.foreach: Increments the line number on each call to the block.
+ * - IO#each_line: Increments the line number on each call to the block.
+ * - IO#gets: Increments the line number.
+ * - IO#readline: Increments the line number.
+ * - IO#readlines: Increments the line number for each line read.
+ *
+ * A new stream is initially has line number zero (and position zero);
+ * method +rewind+ resets the line number (and position) to zero:
+ *
+ * f = File.new('t.txt')
+ * f.lineno # => 0
+ * f.gets # => "First line\n"
+ * f.lineno # => 1
+ * f.rewind
+ * f.lineno # => 0
+ * f.close
+ *
+ * Reading lines from a stream usually changes its line number:
+ *
+ * f = File.new('t.txt', 'r')
+ * f.lineno # => 0
+ * f.readline # => "This is line one.\n"
+ * f.lineno # => 1
+ * f.readline # => "This is the second line.\n"
+ * f.lineno # => 2
+ * f.readline # => "Here's the third line.\n"
+ * f.lineno # => 3
+ * f.eof? # => true
+ * f.close
+ *
+ * Iterating over lines in a stream usually changes its line number:
+ *
+ * File.open('t.txt') do |f|
+ * f.each_line do |line|
+ * p "position=#{f.pos} eof?=#{f.eof?} lineno=#{f.lineno}"
+ * end
+ * end
+ *
+ * Output:
+ *
+ * "position=11 eof?=false lineno=1"
+ * "position=23 eof?=false lineno=2"
+ * "position=24 eof?=false lineno=3"
+ * "position=36 eof?=false lineno=4"
+ * "position=47 eof?=true lineno=5"
+ *
+ * Unlike the stream's {position}[rdoc-ref:IO@Position],
+ * the line number does not affect where the next read or write will occur:
+ *
+ * f = File.new('t.txt')
+ * f.lineno = 1000
+ * f.lineno # => 1000
+ * f.gets # => "First line\n"
+ * f.lineno # => 1001
+ * f.close
+ *
+ * Associated with the line number is the global variable <tt>$.</tt>:
+ *
+ * - When a stream is opened, <tt>$.</tt> is not set;
+ * its value is left over from previous activity in the process:
+ *
+ * $. = 41
+ * f = File.new('t.txt')
+ * $. = 41
+ * # => 41
+ * f.close
+ *
+ * - When a stream is read, <tt>#.</tt> is set to the line number for that stream:
+ *
+ * f0 = File.new('t.txt')
+ * f1 = File.new('t.dat')
+ * f0.readlines # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ * $. # => 5
+ * f1.readlines # => ["\xFE\xFF\x99\x90\x99\x91\x99\x92\x99\x93\x99\x94"]
+ * $. # => 1
+ * f0.close
+ * f1.close
+ *
+ * - Methods IO#rewind and IO#seek do not affect <tt>$.</tt>:
+ *
+ * f = File.new('t.txt')
+ * f.readlines # => ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"]
+ * $. # => 5
+ * f.rewind
+ * f.seek(0, :SET)
+ * $. # => 5
+ * f.close
+ *
+ * == Character \IO
+ *
+ * You can process an \IO stream character-by-character using these methods:
+ *
+ * - IO#getc: Reads and returns the next character from the stream.
+ * - IO#readchar: Like #getc, but raises an exception at end-of-stream.
+ * - IO#ungetc: Pushes back ("unshifts") a character or integer onto the stream.
+ * - IO#putc: Writes a character to the stream.
+ * - IO#each_char: Reads each remaining character in the stream,
+ * passing the character to the given block.
+ * == Byte \IO
+ *
+ * You can process an \IO stream byte-by-byte using these methods:
+ *
+ * - IO#getbyte: Returns the next 8-bit byte as an integer in range 0..255.
+ * - IO#readbyte: Like #getbyte, but raises an exception if at end-of-stream.
+ * - IO#ungetbyte: Pushes back ("unshifts") a byte back onto the stream.
+ * - IO#each_byte: Reads each remaining byte in the stream,
+ * passing the byte to the given block.
+ *
+ * == Codepoint \IO
+ *
+ * You can process an \IO stream codepoint-by-codepoint:
+ *
+ * - IO#each_codepoint: Reads each remaining codepoint, passing it to the given block.
+ *
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \IO:
+ *
+ * - Inherits from {class Object}[rdoc-ref:Object@What-27s+Here].
+ * - Includes {module Enumerable}[rdoc-ref:Enumerable@What-27s+Here],
+ * which provides dozens of additional methods.
+ *
+ * Here, class \IO provides methods that are useful for:
+ *
+ * - {Creating}[rdoc-ref:IO@Creating]
+ * - {Reading}[rdoc-ref:IO@Reading]
+ * - {Writing}[rdoc-ref:IO@Writing]
+ * - {Positioning}[rdoc-ref:IO@Positioning]
+ * - {Iterating}[rdoc-ref:IO@Iterating]
+ * - {Settings}[rdoc-ref:IO@Settings]
+ * - {Querying}[rdoc-ref:IO@Querying]
+ * - {Buffering}[rdoc-ref:IO@Buffering]
+ * - {Low-Level Access}[rdoc-ref:IO@Low-Level+Access]
+ * - {Other}[rdoc-ref:IO@Other]
+ *
+ * === Creating
+ *
+ * - ::new (aliased as ::for_fd): Creates and returns a new \IO object for the given
+ * integer file descriptor.
+ * - ::open: Creates a new \IO object.
+ * - ::pipe: Creates a connected pair of reader and writer \IO objects.
+ * - ::popen: Creates an \IO object to interact with a subprocess.
+ * - ::select: Selects which given \IO instances are ready for reading,
+ * writing, or have pending exceptions.
+ *
+ * === Reading
+ *
+ * - ::binread: Returns a binary string with all or a subset of bytes
+ * from the given file.
+ * - ::read: Returns a string with all or a subset of bytes from the given file.
+ * - ::readlines: Returns an array of strings, which are the lines from the given file.
+ * - #getbyte: Returns the next 8-bit byte read from +self+ as an integer.
+ * - #getc: Returns the next character read from +self+ as a string.
+ * - #gets: Returns the line read from +self+.
+ * - #pread: Returns all or the next _n_ bytes read from +self+,
+ * not updating the receiver's offset.
+ * - #read: Returns all remaining or the next _n_ bytes read from +self+
+ * for a given _n_.
+ * - #read_nonblock: the next _n_ bytes read from +self+ for a given _n_,
+ * in non-block mode.
+ * - #readbyte: Returns the next byte read from +self+;
+ * same as #getbyte, but raises an exception on end-of-stream.
+ * - #readchar: Returns the next character read from +self+;
+ * same as #getc, but raises an exception on end-of-stream.
+ * - #readline: Returns the next line read from +self+;
+ * same as #getline, but raises an exception of end-of-stream.
+ * - #readlines: Returns an array of all lines read read from +self+.
+ * - #readpartial: Returns up to the given number of bytes from +self+.
+ *
+ * === Writing
+ *
+ * - ::binwrite: Writes the given string to the file at the given filepath,
+ * in binary mode.
+ * - ::write: Writes the given string to +self+.
+ * - #<<: Appends the given string to +self+.
+ * - #print: Prints last read line or given objects to +self+.
+ * - #printf: Writes to +self+ based on the given format string and objects.
+ * - #putc: Writes a character to +self+.
+ * - #puts: Writes lines to +self+, making sure line ends with a newline.
+ * - #pwrite: Writes the given string at the given offset,
+ * not updating the receiver's offset.
+ * - #write: Writes one or more given strings to +self+.
+ * - #write_nonblock: Writes one or more given strings to +self+ in non-blocking mode.
+ *
+ * === Positioning
+ *
+ * - #lineno: Returns the current line number in +self+.
+ * - #lineno=: Sets the line number is +self+.
+ * - #pos (aliased as #tell): Returns the current byte offset in +self+.
+ * - #pos=: Sets the byte offset in +self+.
+ * - #reopen: Reassociates +self+ with a new or existing \IO stream.
+ * - #rewind: Positions +self+ to the beginning of input.
+ * - #seek: Sets the offset for +self+ relative to given position.
+ *
+ * === Iterating
+ *
+ * - ::foreach: Yields each line of given file to the block.
+ * - #each (aliased as #each_line): Calls the given block
+ * with each successive line in +self+.
+ * - #each_byte: Calls the given block with each successive byte in +self+
+ * as an integer.
+ * - #each_char: Calls the given block with each successive character in +self+
+ * as a string.
+ * - #each_codepoint: Calls the given block with each successive codepoint in +self+
+ * as an integer.
+ *
+ * === Settings
+ *
+ * - #autoclose=: Sets whether +self+ auto-closes.
+ * - #binmode: Sets +self+ to binary mode.
+ * - #close: Closes +self+.
+ * - #close_on_exec=: Sets the close-on-exec flag.
+ * - #close_read: Closes +self+ for reading.
+ * - #close_write: Closes +self+ for writing.
+ * - #set_encoding: Sets the encoding for +self+.
+ * - #set_encoding_by_bom: Sets the encoding for +self+, based on its
+ * Unicode byte-order-mark.
+ * - #sync=: Sets the sync-mode to the given value.
+ *
+ * === Querying
+ *
+ * - #autoclose?: Returns whether +self+ auto-closes.
+ * - #binmode?: Returns whether +self+ is in binary mode.
+ * - #close_on_exec?: Returns the close-on-exec flag for +self+.
+ * - #closed?: Returns whether +self+ is closed.
+ * - #eof? (aliased as #eof): Returns whether +self+ is at end-of-stream.
+ * - #external_encoding: Returns the external encoding object for +self+.
+ * - #fileno (aliased as #to_i): Returns the integer file descriptor for +self+
+ * - #internal_encoding: Returns the internal encoding object for +self+.
+ * - #pid: Returns the process ID of a child process associated with +self+,
+ * if +self+ was created by ::popen.
+ * - #stat: Returns the File::Stat object containing status information for +self+.
+ * - #sync: Returns whether +self+ is in sync-mode.
+ * - #tty? (aliased as #isatty): Returns whether +self+ is a terminal.
+ *
+ * === Buffering
+ *
+ * - #fdatasync: Immediately writes all buffered data in +self+ to disk.
+ * - #flush: Flushes any buffered data within +self+ to the underlying
+ * operating system.
+ * - #fsync: Immediately writes all buffered data and attributes in +self+ to disk.
+ * - #ungetbyte: Prepends buffer for +self+ with given integer byte or string.
+ * - #ungetc: Prepends buffer for +self+ with given string.
+ *
+ * === Low-Level Access
+ *
+ * - ::sysopen: Opens the file given by its path,
+ * returning the integer file descriptor.
+ * - #advise: Announces the intention to access data from +self+ in a specific way.
+ * - #fcntl: Passes a low-level command to the file specified
+ * by the given file descriptor.
+ * - #ioctl: Passes a low-level command to the device specified
+ * by the given file descriptor.
+ * - #sysread: Returns up to the next _n_ bytes read from self using a low-level read.
+ * - #sysseek: Sets the offset for +self+.
+ * - #syswrite: Writes the given string to +self+ using a low-level write.
+ *
+ * === Other
+ *
+ * - ::copy_stream: Copies data from a source to a destination,
+ * each of which is a filepath or an \IO-like object.
+ * - ::try_convert: Returns a new \IO object resulting from converting
+ * the given object.
+ * - #inspect: Returns the string representation of +self+.
+ *
*/
void
Init_IO(void)
{
-#undef rb_intern
-#define rb_intern(str) rb_intern_const(str)
-
VALUE rb_cARGF;
#ifdef __CYGWIN__
#include <sys/cygwin.h>
static struct __cygwin_perfile pf[] =
{
- {"", O_RDONLY | O_BINARY},
- {"", O_WRONLY | O_BINARY},
- {"", O_RDWR | O_BINARY},
- {"", O_APPEND | O_BINARY},
- {NULL, 0}
+ {"", O_RDONLY | O_BINARY},
+ {"", O_WRONLY | O_BINARY},
+ {"", O_RDWR | O_BINARY},
+ {"", O_APPEND | O_BINARY},
+ {NULL, 0}
};
cygwin_internal(CW_PERFILE, pf);
#endif
@@ -13159,12 +15322,13 @@ Init_IO(void)
rb_eIOError = rb_define_class("IOError", rb_eStandardError);
rb_eEOFError = rb_define_class("EOFError", rb_eIOError);
- id_write = rb_intern("write");
- id_read = rb_intern("read");
- id_getc = rb_intern("getc");
- id_flush = rb_intern("flush");
- id_readpartial = rb_intern("readpartial");
- id_set_encoding = rb_intern("set_encoding");
+ id_write = rb_intern_const("write");
+ id_read = rb_intern_const("read");
+ id_getc = rb_intern_const("getc");
+ id_flush = rb_intern_const("flush");
+ id_readpartial = rb_intern_const("readpartial");
+ id_set_encoding = rb_intern_const("set_encoding");
+ id_fileno = rb_intern_const("fileno");
rb_define_global_function("syscall", rb_f_syscall, -1);
@@ -13187,6 +15351,12 @@ Init_IO(void)
rb_cIO = rb_define_class("IO", rb_cObject);
rb_include_module(rb_cIO, rb_mEnumerable);
+ rb_eIOTimeoutError = rb_define_class_under(rb_cIO, "TimeoutError", rb_eIOError);
+
+ rb_define_const(rb_cIO, "READABLE", INT2NUM(RUBY_IO_READABLE));
+ rb_define_const(rb_cIO, "WRITABLE", INT2NUM(RUBY_IO_WRITABLE));
+ rb_define_const(rb_cIO, "PRIORITY", INT2NUM(RUBY_IO_PRIORITY));
+
/* exception to wait for reading. see IO.select. */
rb_mWaitReadable = rb_define_module_under(rb_cIO, "WaitReadable");
/* exception to wait for writing. see IO.select. */
@@ -13244,17 +15414,18 @@ Init_IO(void)
rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);
rb_output_fs = Qnil;
- rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_output_fs_setter);
+ rb_define_hooked_variable("$,", &rb_output_fs, 0, deprecated_str_setter);
rb_default_rs = rb_fstring_lit("\n"); /* avoid modifying RS_default */
rb_gc_register_mark_object(rb_default_rs);
rb_rs = rb_default_rs;
rb_output_rs = Qnil;
- rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
- rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
- rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);
+ rb_define_hooked_variable("$/", &rb_rs, 0, deprecated_str_setter);
+ rb_define_hooked_variable("$-0", &rb_rs, 0, deprecated_str_setter);
+ rb_define_hooked_variable("$\\", &rb_output_rs, 0, deprecated_str_setter);
rb_define_virtual_variable("$_", get_LAST_READ_LINE, set_LAST_READ_LINE);
+ rb_gvar_ractor_local("$_");
rb_define_method(rb_cIO, "initialize_copy", rb_io_init_copy, 1);
rb_define_method(rb_cIO, "reopen", rb_io_reopen, -1);
@@ -13269,10 +15440,6 @@ Init_IO(void)
rb_define_method(rb_cIO, "each_byte", rb_io_each_byte, 0);
rb_define_method(rb_cIO, "each_char", rb_io_each_char, 0);
rb_define_method(rb_cIO, "each_codepoint", rb_io_each_codepoint, 0);
- rb_define_method(rb_cIO, "lines", rb_io_lines, -1);
- rb_define_method(rb_cIO, "bytes", rb_io_bytes, 0);
- rb_define_method(rb_cIO, "chars", rb_io_chars, 0);
- rb_define_method(rb_cIO, "codepoints", rb_io_codepoints, 0);
rb_define_method(rb_cIO, "syswrite", rb_io_syswrite, 1);
rb_define_method(rb_cIO, "sysread", rb_io_sysread, -1);
@@ -13284,23 +15451,26 @@ Init_IO(void)
rb_define_alias(rb_cIO, "to_i", "fileno");
rb_define_method(rb_cIO, "to_io", rb_io_to_io, 0);
- rb_define_method(rb_cIO, "fsync", rb_io_fsync, 0);
- rb_define_method(rb_cIO, "fdatasync", rb_io_fdatasync, 0);
- rb_define_method(rb_cIO, "sync", rb_io_sync, 0);
- rb_define_method(rb_cIO, "sync=", rb_io_set_sync, 1);
+ rb_define_method(rb_cIO, "timeout", rb_io_timeout, 0);
+ rb_define_method(rb_cIO, "timeout=", rb_io_set_timeout, 1);
- rb_define_method(rb_cIO, "lineno", rb_io_lineno, 0);
- rb_define_method(rb_cIO, "lineno=", rb_io_set_lineno, 1);
+ rb_define_method(rb_cIO, "fsync", rb_io_fsync, 0);
+ rb_define_method(rb_cIO, "fdatasync", rb_io_fdatasync, 0);
+ rb_define_method(rb_cIO, "sync", rb_io_sync, 0);
+ rb_define_method(rb_cIO, "sync=", rb_io_set_sync, 1);
- rb_define_method(rb_cIO, "readlines", rb_io_readlines, -1);
+ rb_define_method(rb_cIO, "lineno", rb_io_lineno, 0);
+ rb_define_method(rb_cIO, "lineno=", rb_io_set_lineno, 1);
- rb_define_method(rb_cIO, "readpartial", io_readpartial, -1);
- rb_define_method(rb_cIO, "read", io_read, -1);
+ rb_define_method(rb_cIO, "readlines", rb_io_readlines, -1);
+
+ rb_define_method(rb_cIO, "readpartial", io_readpartial, -1);
+ rb_define_method(rb_cIO, "read", io_read, -1);
rb_define_method(rb_cIO, "write", io_write_m, -1);
- rb_define_method(rb_cIO, "gets", rb_io_gets_m, -1);
- rb_define_method(rb_cIO, "readline", rb_io_readline, -1);
- rb_define_method(rb_cIO, "getc", rb_io_getc, 0);
- rb_define_method(rb_cIO, "getbyte", rb_io_getbyte, 0);
+ rb_define_method(rb_cIO, "gets", rb_io_gets_m, -1);
+ rb_define_method(rb_cIO, "readline", rb_io_readline, -1);
+ rb_define_method(rb_cIO, "getc", rb_io_getc, 0);
+ rb_define_method(rb_cIO, "getbyte", rb_io_getbyte, 0);
rb_define_method(rb_cIO, "readchar", rb_io_readchar, 0);
rb_define_method(rb_cIO, "readbyte", rb_io_readbyte, 0);
rb_define_method(rb_cIO, "ungetbyte",rb_io_ungetbyte, 1);
@@ -13347,6 +15517,10 @@ Init_IO(void)
rb_define_method(rb_cIO, "ioctl", rb_io_ioctl, -1);
rb_define_method(rb_cIO, "fcntl", rb_io_fcntl, -1);
rb_define_method(rb_cIO, "pid", rb_io_pid, 0);
+
+ rb_define_method(rb_cIO, "path", rb_io_path, 0);
+ rb_define_method(rb_cIO, "to_path", rb_io_path, 0);
+
rb_define_method(rb_cIO, "inspect", rb_io_inspect, 0);
rb_define_method(rb_cIO, "external_encoding", rb_io_external_encoding, 0);
@@ -13357,13 +15531,29 @@ Init_IO(void)
rb_define_method(rb_cIO, "autoclose?", rb_io_autoclose_p, 0);
rb_define_method(rb_cIO, "autoclose=", rb_io_set_autoclose, 1);
- rb_define_variable("$stdin", &rb_stdin);
- rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>");
- rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
- rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO, "<STDOUT>");
- rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
- rb_stderr = prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");
- rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);
+ rb_define_method(rb_cIO, "wait", io_wait, -1);
+
+ rb_define_method(rb_cIO, "wait_readable", io_wait_readable, -1);
+ rb_define_method(rb_cIO, "wait_writable", io_wait_writable, -1);
+ rb_define_method(rb_cIO, "wait_priority", io_wait_priority, -1);
+
+ rb_define_virtual_variable("$stdin", stdin_getter, stdin_setter);
+ rb_define_virtual_variable("$stdout", stdout_getter, stdout_setter);
+ rb_define_virtual_variable("$>", stdout_getter, stdout_setter);
+ rb_define_virtual_variable("$stderr", stderr_getter, stderr_setter);
+
+ rb_gvar_ractor_local("$stdin");
+ rb_gvar_ractor_local("$stdout");
+ rb_gvar_ractor_local("$>");
+ rb_gvar_ractor_local("$stderr");
+
+ rb_global_variable(&rb_stdin);
+ rb_stdin = rb_io_prep_stdin();
+ rb_global_variable(&rb_stdout);
+ rb_stdout = rb_io_prep_stdout();
+ rb_global_variable(&rb_stderr);
+ rb_stderr = rb_io_prep_stderr();
+
orig_stdout = rb_stdout;
orig_stderr = rb_stderr;
@@ -13400,10 +15590,6 @@ Init_IO(void)
rb_define_method(rb_cARGF, "each_byte", argf_each_byte, 0);
rb_define_method(rb_cARGF, "each_char", argf_each_char, 0);
rb_define_method(rb_cARGF, "each_codepoint", argf_each_codepoint, 0);
- rb_define_method(rb_cARGF, "lines", argf_lines, -1);
- rb_define_method(rb_cARGF, "bytes", argf_bytes, 0);
- rb_define_method(rb_cARGF, "chars", argf_chars, 0);
- rb_define_method(rb_cARGF, "codepoints", argf_codepoints, 0);
rb_define_method(rb_cARGF, "read", argf_read, -1);
rb_define_method(rb_cARGF, "readpartial", argf_readpartial, -1);
@@ -13465,6 +15651,8 @@ Init_IO(void)
ARGF.filename = rb_str_new2("-");
rb_define_hooked_variable("$-i", &argf, opt_i_get, opt_i_set);
+ rb_gvar_ractor_local("$-i");
+
rb_define_hooked_variable("$*", &argf, argf_argv_getter, rb_gvar_readonly_setter);
#if defined (_WIN32) || defined(__CYGWIN__)
@@ -13475,39 +15663,33 @@ Init_IO(void)
rb_define_method(rb_cFile, "initialize", rb_file_initialize, -1);
- sym_mode = ID2SYM(rb_intern("mode"));
- sym_perm = ID2SYM(rb_intern("perm"));
- sym_flags = ID2SYM(rb_intern("flags"));
- sym_extenc = ID2SYM(rb_intern("external_encoding"));
- sym_intenc = ID2SYM(rb_intern("internal_encoding"));
+ sym_mode = ID2SYM(rb_intern_const("mode"));
+ sym_perm = ID2SYM(rb_intern_const("perm"));
+ sym_flags = ID2SYM(rb_intern_const("flags"));
+ sym_extenc = ID2SYM(rb_intern_const("external_encoding"));
+ sym_intenc = ID2SYM(rb_intern_const("internal_encoding"));
sym_encoding = ID2SYM(rb_id_encoding());
- sym_open_args = ID2SYM(rb_intern("open_args"));
- sym_textmode = ID2SYM(rb_intern("textmode"));
- sym_binmode = ID2SYM(rb_intern("binmode"));
- sym_autoclose = ID2SYM(rb_intern("autoclose"));
- sym_normal = ID2SYM(rb_intern("normal"));
- sym_sequential = ID2SYM(rb_intern("sequential"));
- sym_random = ID2SYM(rb_intern("random"));
- sym_willneed = ID2SYM(rb_intern("willneed"));
- sym_dontneed = ID2SYM(rb_intern("dontneed"));
- sym_noreuse = ID2SYM(rb_intern("noreuse"));
- sym_SET = ID2SYM(rb_intern("SET"));
- sym_CUR = ID2SYM(rb_intern("CUR"));
- sym_END = ID2SYM(rb_intern("END"));
+ sym_open_args = ID2SYM(rb_intern_const("open_args"));
+ sym_textmode = ID2SYM(rb_intern_const("textmode"));
+ sym_binmode = ID2SYM(rb_intern_const("binmode"));
+ sym_autoclose = ID2SYM(rb_intern_const("autoclose"));
+ sym_normal = ID2SYM(rb_intern_const("normal"));
+ sym_sequential = ID2SYM(rb_intern_const("sequential"));
+ sym_random = ID2SYM(rb_intern_const("random"));
+ sym_willneed = ID2SYM(rb_intern_const("willneed"));
+ sym_dontneed = ID2SYM(rb_intern_const("dontneed"));
+ sym_noreuse = ID2SYM(rb_intern_const("noreuse"));
+ sym_SET = ID2SYM(rb_intern_const("SET"));
+ sym_CUR = ID2SYM(rb_intern_const("CUR"));
+ sym_END = ID2SYM(rb_intern_const("END"));
#ifdef SEEK_DATA
- sym_DATA = ID2SYM(rb_intern("DATA"));
+ sym_DATA = ID2SYM(rb_intern_const("DATA"));
#endif
#ifdef SEEK_HOLE
- sym_HOLE = ID2SYM(rb_intern("HOLE"));
+ sym_HOLE = ID2SYM(rb_intern_const("HOLE"));
#endif
- sym_wait_readable = ID2SYM(rb_intern("wait_readable"));
- sym_wait_writable = ID2SYM(rb_intern("wait_writable"));
+ sym_wait_readable = ID2SYM(rb_intern_const("wait_readable"));
+ sym_wait_writable = ID2SYM(rb_intern_const("wait_writable"));
}
#include "io.rbinc"
-
-void
-Init_IO_nonblock(void)
-{
- load_io();
-}
diff --git a/io.rb b/io.rb
index 1b6dddf9e5..40873ea4fd 100644
--- a/io.rb
+++ b/io.rb
@@ -60,7 +60,7 @@ class IO
# return the symbol +:wait_readable+ instead. At EOF, it will return nil
# instead of raising EOFError.
def read_nonblock(len, buf = nil, exception: true)
- __builtin_io_read_nonblock(len, buf, exception)
+ Primitive.io_read_nonblock(len, buf, exception)
end
# call-seq:
@@ -118,6 +118,6 @@ class IO
# that write_nonblock should not raise an IO::WaitWritable exception, but
# return the symbol +:wait_writable+ instead.
def write_nonblock(buf, exception: true)
- __builtin_io_write_nonblock(buf, exception)
+ Primitive.io_write_nonblock(buf, exception)
end
end
diff --git a/io_buffer.c b/io_buffer.c
new file mode 100644
index 0000000000..87b51c0b8c
--- /dev/null
+++ b/io_buffer.c
@@ -0,0 +1,3515 @@
+/**********************************************************************
+
+ io_buffer.c
+
+ Copyright (C) 2021 Samuel Grant Dawson Williams
+
+**********************************************************************/
+
+#include "ruby/io.h"
+#include "ruby/io/buffer.h"
+#include "ruby/fiber/scheduler.h"
+
+#include "internal.h"
+#include "internal/array.h"
+#include "internal/bits.h"
+#include "internal/error.h"
+#include "internal/numeric.h"
+#include "internal/string.h"
+#include "internal/thread.h"
+
+VALUE rb_cIOBuffer;
+VALUE rb_eIOBufferLockedError;
+VALUE rb_eIOBufferAllocationError;
+VALUE rb_eIOBufferAccessError;
+VALUE rb_eIOBufferInvalidatedError;
+VALUE rb_eIOBufferMaskError;
+
+size_t RUBY_IO_BUFFER_PAGE_SIZE;
+size_t RUBY_IO_BUFFER_DEFAULT_SIZE;
+
+#ifdef _WIN32
+#else
+#include <unistd.h>
+#include <sys/mman.h>
+#endif
+
+struct rb_io_buffer {
+ void *base;
+ size_t size;
+ enum rb_io_buffer_flags flags;
+
+#if defined(_WIN32)
+ HANDLE mapping;
+#endif
+
+ VALUE source;
+};
+
+static inline void *
+io_buffer_map_memory(size_t size, int flags)
+{
+#if defined(_WIN32)
+ void * base = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
+
+ if (!base) {
+ rb_sys_fail("io_buffer_map_memory:VirtualAlloc");
+ }
+#else
+ int mmap_flags = MAP_ANONYMOUS;
+ if (flags & RB_IO_BUFFER_SHARED) {
+ mmap_flags |= MAP_SHARED;
+ }
+ else {
+ mmap_flags |= MAP_PRIVATE;
+ }
+
+ void * base = mmap(NULL, size, PROT_READ | PROT_WRITE, mmap_flags, -1, 0);
+
+ if (base == MAP_FAILED) {
+ rb_sys_fail("io_buffer_map_memory:mmap");
+ }
+#endif
+
+ return base;
+}
+
+static void
+io_buffer_map_file(struct rb_io_buffer *buffer, int descriptor, size_t size, rb_off_t offset, enum rb_io_buffer_flags flags)
+{
+#if defined(_WIN32)
+ HANDLE file = (HANDLE)_get_osfhandle(descriptor);
+ if (!file) rb_sys_fail("io_buffer_map_descriptor:_get_osfhandle");
+
+ DWORD protect = PAGE_READONLY, access = FILE_MAP_READ;
+
+ if (flags & RB_IO_BUFFER_READONLY) {
+ buffer->flags |= RB_IO_BUFFER_READONLY;
+ }
+ else {
+ protect = PAGE_READWRITE;
+ access = FILE_MAP_WRITE;
+ }
+
+ HANDLE mapping = CreateFileMapping(file, NULL, protect, 0, 0, NULL);
+ if (!mapping) rb_sys_fail("io_buffer_map_descriptor:CreateFileMapping");
+
+ if (flags & RB_IO_BUFFER_PRIVATE) {
+ access |= FILE_MAP_COPY;
+ buffer->flags |= RB_IO_BUFFER_PRIVATE;
+ }
+ else {
+ // This buffer refers to external buffer.
+ buffer->flags |= RB_IO_BUFFER_EXTERNAL;
+ buffer->flags |= RB_IO_BUFFER_SHARED;
+ }
+
+ void *base = MapViewOfFile(mapping, access, (DWORD)(offset >> 32), (DWORD)(offset & 0xFFFFFFFF), size);
+
+ if (!base) {
+ CloseHandle(mapping);
+ rb_sys_fail("io_buffer_map_file:MapViewOfFile");
+ }
+
+ buffer->mapping = mapping;
+#else
+ int protect = PROT_READ, access = 0;
+
+ if (flags & RB_IO_BUFFER_READONLY) {
+ buffer->flags |= RB_IO_BUFFER_READONLY;
+ }
+ else {
+ protect |= PROT_WRITE;
+ }
+
+ if (flags & RB_IO_BUFFER_PRIVATE) {
+ buffer->flags |= RB_IO_BUFFER_PRIVATE;
+ }
+ else {
+ // This buffer refers to external buffer.
+ buffer->flags |= RB_IO_BUFFER_EXTERNAL;
+ buffer->flags |= RB_IO_BUFFER_SHARED;
+ access |= MAP_SHARED;
+ }
+
+ void *base = mmap(NULL, size, protect, access, descriptor, offset);
+
+ if (base == MAP_FAILED) {
+ rb_sys_fail("io_buffer_map_file:mmap");
+ }
+#endif
+
+ buffer->base = base;
+ buffer->size = size;
+
+ buffer->flags |= RB_IO_BUFFER_MAPPED;
+}
+
+static inline void
+io_buffer_unmap(void* base, size_t size)
+{
+#ifdef _WIN32
+ VirtualFree(base, 0, MEM_RELEASE);
+#else
+ munmap(base, size);
+#endif
+}
+
+static void
+io_buffer_experimental(void)
+{
+ static int warned = 0;
+
+ if (warned) return;
+
+ warned = 1;
+
+ if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL)) {
+ rb_category_warn(RB_WARN_CATEGORY_EXPERIMENTAL,
+ "IO::Buffer is experimental and both the Ruby and C interface may change in the future!"
+ );
+ }
+}
+
+static void
+io_buffer_zero(struct rb_io_buffer *buffer)
+{
+ buffer->base = NULL;
+ buffer->size = 0;
+#if defined(_WIN32)
+ buffer->mapping = NULL;
+#endif
+ buffer->source = Qnil;
+}
+
+static void
+io_buffer_initialize(struct rb_io_buffer *buffer, void *base, size_t size, enum rb_io_buffer_flags flags, VALUE source)
+{
+ if (base) {
+ // If we are provided a pointer, we use it.
+ }
+ else if (size) {
+ // If we are provided a non-zero size, we allocate it:
+ if (flags & RB_IO_BUFFER_INTERNAL) {
+ base = calloc(size, 1);
+ }
+ else if (flags & RB_IO_BUFFER_MAPPED) {
+ base = io_buffer_map_memory(size, flags);
+ }
+
+ if (!base) {
+ rb_raise(rb_eIOBufferAllocationError, "Could not allocate buffer!");
+ }
+ }
+ else {
+ // Otherwise we don't do anything.
+ return;
+ }
+
+ buffer->base = base;
+ buffer->size = size;
+ buffer->flags = flags;
+ buffer->source = source;
+}
+
+static int
+io_buffer_free(struct rb_io_buffer *buffer)
+{
+ if (buffer->base) {
+ if (buffer->flags & RB_IO_BUFFER_INTERNAL) {
+ free(buffer->base);
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_MAPPED) {
+ io_buffer_unmap(buffer->base, buffer->size);
+ }
+
+ // Previously we had this, but we found out due to the way GC works, we
+ // can't refer to any other Ruby objects here.
+ // if (RB_TYPE_P(buffer->source, T_STRING)) {
+ // rb_str_unlocktmp(buffer->source);
+ // }
+
+ buffer->base = NULL;
+
+#if defined(_WIN32)
+ if (buffer->mapping) {
+ CloseHandle(buffer->mapping);
+ buffer->mapping = NULL;
+ }
+#endif
+ buffer->size = 0;
+ buffer->flags = 0;
+ buffer->source = Qnil;
+
+ return 1;
+ }
+
+ return 0;
+}
+
+void
+rb_io_buffer_type_mark(void *_buffer)
+{
+ struct rb_io_buffer *buffer = _buffer;
+ rb_gc_mark(buffer->source);
+}
+
+void
+rb_io_buffer_type_free(void *_buffer)
+{
+ struct rb_io_buffer *buffer = _buffer;
+
+ io_buffer_free(buffer);
+
+ free(buffer);
+}
+
+size_t
+rb_io_buffer_type_size(const void *_buffer)
+{
+ const struct rb_io_buffer *buffer = _buffer;
+ size_t total = sizeof(struct rb_io_buffer);
+
+ if (buffer->flags) {
+ total += buffer->size;
+ }
+
+ return total;
+}
+
+static const rb_data_type_t rb_io_buffer_type = {
+ .wrap_struct_name = "IO::Buffer",
+ .function = {
+ .dmark = rb_io_buffer_type_mark,
+ .dfree = rb_io_buffer_type_free,
+ .dsize = rb_io_buffer_type_size,
+ },
+ .data = NULL,
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
+// Extract an offset argument, which must be a positive integer.
+static inline size_t
+io_buffer_extract_offset(VALUE argument)
+{
+ if (rb_int_negative_p(argument)) {
+ rb_raise(rb_eArgError, "Offset can't be negative!");
+ }
+
+ return NUM2SIZET(argument);
+}
+
+// Extract a length argument, which must be a positive integer.
+// Length is generally considered a mutable property of an object and
+// semantically should be considered a subset of "size" as a concept.
+static inline size_t
+io_buffer_extract_length(VALUE argument)
+{
+ if (rb_int_negative_p(argument)) {
+ rb_raise(rb_eArgError, "Length can't be negative!");
+ }
+
+ return NUM2SIZET(argument);
+}
+
+// Extract a size argument, which must be a positive integer.
+// Size is generally considered an immutable property of an object.
+static inline size_t
+io_buffer_extract_size(VALUE argument)
+{
+ if (rb_int_negative_p(argument)) {
+ rb_raise(rb_eArgError, "Size can't be negative!");
+ }
+
+ return NUM2SIZET(argument);
+}
+
+// Compute the default length for a buffer, given an offset into that buffer.
+// The default length is the size of the buffer minus the offset. The offset
+// must be less than the size of the buffer otherwise the length will be
+// invalid; in that case, an ArgumentError exception will be raised.
+static inline size_t
+io_buffer_default_length(const struct rb_io_buffer *buffer, size_t offset)
+{
+ if (offset > buffer->size) {
+ rb_raise(rb_eArgError, "The given offset is bigger than the buffer size!");
+ }
+
+ // Note that the "length" is computed by the size the offset.
+ return buffer->size - offset;
+}
+
+// Extract the optional length and offset arguments, returning the buffer.
+// The length and offset are optional, but if they are provided, they must be
+// positive integers. If the length is not provided, the default length is
+// computed from the buffer size and offset. If the offset is not provided, it
+// defaults to zero.
+static inline struct rb_io_buffer *
+io_buffer_extract_length_offset(VALUE self, int argc, VALUE argv[], size_t *length, size_t *offset)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (argc >= 2) {
+ *offset = io_buffer_extract_offset(argv[1]);
+ }
+ else {
+ *offset = 0;
+ }
+
+ if (argc >= 1 && !NIL_P(argv[0])) {
+ *length = io_buffer_extract_length(argv[0]);
+ }
+ else {
+ *length = io_buffer_default_length(buffer, *offset);
+ }
+
+ return buffer;
+}
+
+// Extract the optional offset and length arguments, returning the buffer.
+// Similar to `io_buffer_extract_length_offset` but with the order of
+// arguments reversed.
+static inline struct rb_io_buffer *
+io_buffer_extract_offset_length(VALUE self, int argc, VALUE argv[], size_t *offset, size_t *length)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (argc >= 1) {
+ *offset = io_buffer_extract_offset(argv[0]);
+ }
+ else {
+ *offset = 0;
+ }
+
+ if (argc >= 2) {
+ *length = io_buffer_extract_length(argv[1]);
+ }
+ else {
+ *length = io_buffer_default_length(buffer, *offset);
+ }
+
+ return buffer;
+}
+
+VALUE
+rb_io_buffer_type_allocate(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ VALUE instance = TypedData_Make_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_zero(buffer);
+
+ return instance;
+}
+
+static VALUE io_buffer_for_make_instance(VALUE klass, VALUE string, enum rb_io_buffer_flags flags)
+{
+ VALUE instance = rb_io_buffer_type_allocate(klass);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(instance, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ flags |= RB_IO_BUFFER_EXTERNAL;
+
+ if (RB_OBJ_FROZEN(string))
+ flags |= RB_IO_BUFFER_READONLY;
+
+ if (!(flags & RB_IO_BUFFER_READONLY))
+ rb_str_modify(string);
+
+ io_buffer_initialize(buffer, RSTRING_PTR(string), RSTRING_LEN(string), flags, string);
+
+ return instance;
+}
+
+struct io_buffer_for_yield_instance_arguments {
+ VALUE klass;
+ VALUE string;
+ VALUE instance;
+ enum rb_io_buffer_flags flags;
+};
+
+static VALUE
+io_buffer_for_yield_instance(VALUE _arguments)
+{
+ struct io_buffer_for_yield_instance_arguments *arguments = (struct io_buffer_for_yield_instance_arguments *)_arguments;
+
+ arguments->instance = io_buffer_for_make_instance(arguments->klass, arguments->string, arguments->flags);
+
+ rb_str_locktmp(arguments->string);
+
+ return rb_yield(arguments->instance);
+}
+
+static VALUE
+io_buffer_for_yield_instance_ensure(VALUE _arguments)
+{
+ struct io_buffer_for_yield_instance_arguments *arguments = (struct io_buffer_for_yield_instance_arguments *)_arguments;
+
+ if (arguments->instance != Qnil) {
+ rb_io_buffer_free(arguments->instance);
+ }
+
+ rb_str_unlocktmp(arguments->string);
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * IO::Buffer.for(string) -> readonly io_buffer
+ * IO::Buffer.for(string) {|io_buffer| ... read/write io_buffer ...}
+ *
+ * Creates a IO::Buffer from the given string's memory. Without a block a
+ * frozen internal copy of the string is created efficiently and used as the
+ * buffer source. When a block is provided, the buffer is associated directly
+ * with the string's internal buffer and updating the buffer will update the
+ * string.
+ *
+ * Until #free is invoked on the buffer, either explicitly or via the garbage
+ * collector, the source string will be locked and cannot be modified.
+ *
+ * If the string is frozen, it will create a read-only buffer which cannot be
+ * modified. If the string is shared, it may trigger a copy-on-write when
+ * using the block form.
+ *
+ * string = 'test'
+ * buffer = IO::Buffer.for(string)
+ * buffer.external? #=> true
+ *
+ * buffer.get_string(0, 1)
+ * # => "t"
+ * string
+ * # => "best"
+ *
+ * buffer.resize(100)
+ * # in `resize': Cannot resize external buffer! (IO::Buffer::AccessError)
+ *
+ * IO::Buffer.for(string) do |buffer|
+ * buffer.set_string("T")
+ * string
+ * # => "Test"
+ * end
+ */
+VALUE
+rb_io_buffer_type_for(VALUE klass, VALUE string)
+{
+ StringValue(string);
+
+ // If the string is frozen, both code paths are okay.
+ // If the string is not frozen, if a block is not given, it must be frozen.
+ if (rb_block_given_p()) {
+ struct io_buffer_for_yield_instance_arguments arguments = {
+ .klass = klass,
+ .string = string,
+ .instance = Qnil,
+ .flags = 0,
+ };
+
+ return rb_ensure(io_buffer_for_yield_instance, (VALUE)&arguments, io_buffer_for_yield_instance_ensure, (VALUE)&arguments);
+ }
+ else {
+ // This internally returns the source string if it's already frozen.
+ string = rb_str_tmp_frozen_acquire(string);
+ return io_buffer_for_make_instance(klass, string, RB_IO_BUFFER_READONLY);
+ }
+}
+
+VALUE
+rb_io_buffer_new(void *base, size_t size, enum rb_io_buffer_flags flags)
+{
+ VALUE instance = rb_io_buffer_type_allocate(rb_cIOBuffer);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(instance, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_initialize(buffer, base, size, flags, Qnil);
+
+ return instance;
+}
+
+VALUE
+rb_io_buffer_map(VALUE io, size_t size, rb_off_t offset, enum rb_io_buffer_flags flags)
+{
+ io_buffer_experimental();
+
+ VALUE instance = rb_io_buffer_type_allocate(rb_cIOBuffer);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(instance, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ int descriptor = rb_io_descriptor(io);
+
+ io_buffer_map_file(buffer, descriptor, size, offset, flags);
+
+ return instance;
+}
+
+/*
+ * call-seq: IO::Buffer.map(file, [size, [offset, [flags]]]) -> io_buffer
+ *
+ * Create an IO::Buffer for reading from +file+ by memory-mapping the file.
+ * +file_io+ should be a +File+ instance, opened for reading.
+ *
+ * Optional +size+ and +offset+ of mapping can be specified.
+ *
+ * By default, the buffer would be immutable (read only); to create a writable
+ * mapping, you need to open a file in read-write mode, and explicitly pass
+ * +flags+ argument without IO::Buffer::IMMUTABLE.
+ *
+ * Example:
+ *
+ * File.write('test.txt', 'test')
+ *
+ * buffer = IO::Buffer.map(File.open('test.txt'), nil, 0, IO::Buffer::READONLY)
+ * # => #<IO::Buffer 0x00000001014a0000+4 MAPPED READONLY>
+ *
+ * buffer.readonly? # => true
+ *
+ * buffer.get_string
+ * # => "test"
+ *
+ * buffer.set_string('b', 0)
+ * # `set_string': Buffer is not writable! (IO::Buffer::AccessError)
+ *
+ * # create read/write mapping: length 4 bytes, offset 0, flags 0
+ * buffer = IO::Buffer.map(File.open('test.txt', 'r+'), 4, 0)
+ * buffer.set_string('b', 0)
+ * # => 1
+ *
+ * # Check it
+ * File.read('test.txt')
+ * # => "best"
+ *
+ * Note that some operating systems may not have cache coherency between mapped
+ * buffers and file reads.
+ */
+static VALUE
+io_buffer_map(int argc, VALUE *argv, VALUE klass)
+{
+ rb_check_arity(argc, 1, 4);
+
+ // We might like to handle a string path?
+ VALUE io = argv[0];
+
+ size_t size;
+ if (argc >= 2 && !RB_NIL_P(argv[1])) {
+ size = io_buffer_extract_size(argv[1]);
+ }
+ else {
+ rb_off_t file_size = rb_file_size(io);
+
+ // Compiler can confirm that we handled file_size < 0 case:
+ if (file_size < 0) {
+ rb_raise(rb_eArgError, "Invalid negative file size!");
+ }
+ // Here, we assume that file_size is positive:
+ else if ((uintmax_t)file_size > SIZE_MAX) {
+ rb_raise(rb_eArgError, "File larger than address space!");
+ }
+ else {
+ // This conversion should be safe:
+ size = (size_t)file_size;
+ }
+ }
+
+ // This is the file offset, not the buffer offset:
+ rb_off_t offset = 0;
+ if (argc >= 3) {
+ offset = NUM2OFFT(argv[2]);
+ }
+
+ enum rb_io_buffer_flags flags = 0;
+ if (argc >= 4) {
+ flags = RB_NUM2UINT(argv[3]);
+ }
+
+ return rb_io_buffer_map(io, size, offset, flags);
+}
+
+// Compute the optimal allocation flags for a buffer of the given size.
+static inline enum rb_io_buffer_flags
+io_flags_for_size(size_t size)
+{
+ if (size >= RUBY_IO_BUFFER_PAGE_SIZE) {
+ return RB_IO_BUFFER_MAPPED;
+ }
+
+ return RB_IO_BUFFER_INTERNAL;
+}
+
+/*
+ * call-seq: IO::Buffer.new([size = DEFAULT_SIZE, [flags = 0]]) -> io_buffer
+ *
+ * Create a new zero-filled IO::Buffer of +size+ bytes.
+ * By default, the buffer will be _internal_: directly allocated chunk
+ * of the memory. But if the requested +size+ is more than OS-specific
+ * IO::Buffer::PAGE_SIZE, the buffer would be allocated using the
+ * virtual memory mechanism (anonymous +mmap+ on Unix, +VirtualAlloc+
+ * on Windows). The behavior can be forced by passing IO::Buffer::MAPPED
+ * as a second parameter.
+ *
+ * Examples
+ *
+ * buffer = IO::Buffer.new(4)
+ * # =>
+ * # #<IO::Buffer 0x000055b34497ea10+4 INTERNAL>
+ * # 0x00000000 00 00 00 00 ....
+ *
+ * buffer.get_string(0, 1) # => "\x00"
+ *
+ * buffer.set_string("test")
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x000055b34497ea10+4 INTERNAL>
+ * # 0x00000000 74 65 73 74 test
+ */
+VALUE
+rb_io_buffer_initialize(int argc, VALUE *argv, VALUE self)
+{
+ io_buffer_experimental();
+
+ rb_check_arity(argc, 0, 2);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ size_t size;
+ if (argc > 0) {
+ size = io_buffer_extract_size(argv[0]);
+ }
+ else {
+ size = RUBY_IO_BUFFER_DEFAULT_SIZE;
+ }
+
+ enum rb_io_buffer_flags flags = 0;
+ if (argc >= 2) {
+ flags = RB_NUM2UINT(argv[1]);
+ }
+ else {
+ flags |= io_flags_for_size(size);
+ }
+
+ io_buffer_initialize(buffer, NULL, size, flags, Qnil);
+
+ return self;
+}
+
+static int
+io_buffer_validate_slice(VALUE source, void *base, size_t size)
+{
+ void *source_base = NULL;
+ size_t source_size = 0;
+
+ if (RB_TYPE_P(source, T_STRING)) {
+ RSTRING_GETMEM(source, source_base, source_size);
+ }
+ else {
+ rb_io_buffer_get_bytes(source, &source_base, &source_size);
+ }
+
+ // Source is invalid:
+ if (source_base == NULL) return 0;
+
+ // Base is out of range:
+ if (base < source_base) return 0;
+
+ const void *source_end = (char*)source_base + source_size;
+ const void *end = (char*)base + size;
+
+ // End is out of range:
+ if (end > source_end) return 0;
+
+ // It seems okay:
+ return 1;
+}
+
+static int
+io_buffer_validate(struct rb_io_buffer *buffer)
+{
+ if (buffer->source != Qnil) {
+ // Only slices incur this overhead, unfortunately... better safe than sorry!
+ return io_buffer_validate_slice(buffer->source, buffer->base, buffer->size);
+ }
+ else {
+ return 1;
+ }
+}
+
+/*
+ * call-seq: to_s -> string
+ *
+ * Short representation of the buffer. It includes the address, size and
+ * symbolic flags. This format is subject to change.
+ *
+ * puts IO::Buffer.new(4) # uses to_s internally
+ * # #<IO::Buffer 0x000055769f41b1a0+4 INTERNAL>
+ */
+VALUE
+rb_io_buffer_to_s(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE result = rb_str_new_cstr("#<");
+
+ rb_str_append(result, rb_class_name(CLASS_OF(self)));
+ rb_str_catf(result, " %p+%"PRIdSIZE, buffer->base, buffer->size);
+
+ if (buffer->base == NULL) {
+ rb_str_cat2(result, " NULL");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_EXTERNAL) {
+ rb_str_cat2(result, " EXTERNAL");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_INTERNAL) {
+ rb_str_cat2(result, " INTERNAL");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_MAPPED) {
+ rb_str_cat2(result, " MAPPED");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_SHARED) {
+ rb_str_cat2(result, " SHARED");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_str_cat2(result, " LOCKED");
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_READONLY) {
+ rb_str_cat2(result, " READONLY");
+ }
+
+ if (buffer->source != Qnil) {
+ rb_str_cat2(result, " SLICE");
+ }
+
+ if (!io_buffer_validate(buffer)) {
+ rb_str_cat2(result, " INVALID");
+ }
+
+ return rb_str_cat2(result, ">");
+}
+
+static VALUE
+io_buffer_hexdump(VALUE string, size_t width, char *base, size_t size, int first)
+{
+ char *text = alloca(width+1);
+ text[width] = '\0';
+
+ for (size_t offset = 0; offset < size; offset += width) {
+ memset(text, '\0', width);
+ if (first) {
+ rb_str_catf(string, "0x%08" PRIxSIZE " ", offset);
+ first = 0;
+ }
+ else {
+ rb_str_catf(string, "\n0x%08" PRIxSIZE " ", offset);
+ }
+
+ for (size_t i = 0; i < width; i += 1) {
+ if (offset+i < size) {
+ unsigned char value = ((unsigned char*)base)[offset+i];
+
+ if (value < 127 && isprint(value)) {
+ text[i] = (char)value;
+ }
+ else {
+ text[i] = '.';
+ }
+
+ rb_str_catf(string, " %02x", value);
+ }
+ else {
+ rb_str_cat2(string, " ");
+ }
+ }
+
+ rb_str_catf(string, " %s", text);
+ }
+
+ return string;
+}
+
+static VALUE
+rb_io_buffer_hexdump(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE result = Qnil;
+
+ if (io_buffer_validate(buffer) && buffer->base) {
+ result = rb_str_buf_new(buffer->size*3 + (buffer->size/16)*12 + 1);
+
+ io_buffer_hexdump(result, 16, buffer->base, buffer->size, 1);
+ }
+
+ return result;
+}
+
+VALUE
+rb_io_buffer_inspect(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE result = rb_io_buffer_to_s(self);
+
+ if (io_buffer_validate(buffer)) {
+ // Limit the maximum size generated by inspect.
+ if (buffer->size <= 256) {
+ io_buffer_hexdump(result, 16, buffer->base, buffer->size, 0);
+ }
+ }
+
+ return result;
+}
+
+/*
+ * call-seq: size -> integer
+ *
+ * Returns the size of the buffer that was explicitly set (on creation with ::new
+ * or on #resize), or deduced on buffer's creation from string or file.
+ */
+VALUE
+rb_io_buffer_size(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return SIZET2NUM(buffer->size);
+}
+
+/*
+ * call-seq: valid? -> true or false
+ *
+ * Returns whether the buffer buffer is accessible.
+ *
+ * A buffer becomes invalid if it is a slice of another buffer which has been
+ * freed.
+ */
+static VALUE
+rb_io_buffer_valid_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(io_buffer_validate(buffer));
+}
+
+/*
+ * call-seq: null? -> true or false
+ *
+ * If the buffer was freed with #free or was never allocated in the first
+ * place.
+ */
+static VALUE
+rb_io_buffer_null_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->base == NULL);
+}
+
+/*
+ * call-seq: empty? -> true or false
+ *
+ * If the buffer has 0 size: it is created by ::new with size 0, or with ::for
+ * from an empty string. (Note that empty files can't be mapped, so the buffer
+ * created with ::map will never be empty.)
+ */
+static VALUE
+rb_io_buffer_empty_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->size == 0);
+}
+
+/*
+ * call-seq: external? -> true or false
+ *
+ * The buffer is _external_ if it references the memory which is not
+ * allocated or mapped by the buffer itself.
+ *
+ * A buffer created using ::for has an external reference to the string's
+ * memory.
+ *
+ * External buffer can't be resized.
+ */
+static VALUE
+rb_io_buffer_external_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->flags & RB_IO_BUFFER_EXTERNAL);
+}
+
+/*
+ * call-seq: internal? -> true or false
+ *
+ * If the buffer is _internal_, meaning it references memory allocated by the
+ * buffer itself.
+ *
+ * An internal buffer is not associated with any external memory (e.g. string)
+ * or file mapping.
+ *
+ * Internal buffers are created using ::new and is the default when the
+ * requested size is less than the IO::Buffer::PAGE_SIZE and it was not
+ * requested to be mapped on creation.
+ *
+ * Internal buffers can be resized, and such an operation will typically
+ * invalidate all slices, but not always.
+ */
+static VALUE
+rb_io_buffer_internal_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->flags & RB_IO_BUFFER_INTERNAL);
+}
+
+/*
+ * call-seq: mapped? -> true or false
+ *
+ * If the buffer is _mapped_, meaning it references memory mapped by the
+ * buffer.
+ *
+ * Mapped buffers are either anonymous, if created by ::new with the
+ * IO::Buffer::MAPPED flag or if the size was at least IO::Buffer::PAGE_SIZE,
+ * or backed by a file if created with ::map.
+ *
+ * Mapped buffers can usually be resized, and such an operation will typically
+ * invalidate all slices, but not always.
+ */
+static VALUE
+rb_io_buffer_mapped_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->flags & RB_IO_BUFFER_MAPPED);
+}
+
+/*
+ * call-seq: shared? -> true or false
+ *
+ * If the buffer is _shared_, meaning it references memory that can be shared
+ * with other processes (and thus might change without being modified
+ * locally).
+ */
+static VALUE
+rb_io_buffer_shared_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->flags & RB_IO_BUFFER_SHARED);
+}
+
+/*
+ * call-seq: locked? -> true or false
+ *
+ * If the buffer is _locked_, meaning it is inside #locked block execution.
+ * Locked buffer can't be resized or freed, and another lock can't be acquired
+ * on it.
+ *
+ * Locking is not thread safe, but is a semantic used to ensure buffers don't
+ * move while being used by a system call.
+ *
+ * Example:
+ *
+ * buffer.locked do
+ * buffer.write(io) # theoretical system call interface
+ * end
+ */
+static VALUE
+rb_io_buffer_locked_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return RBOOL(buffer->flags & RB_IO_BUFFER_LOCKED);
+}
+
+int
+rb_io_buffer_readonly_p(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ return buffer->flags & RB_IO_BUFFER_READONLY;
+}
+
+/*
+ * call-seq: readonly? -> true or false
+ *
+ * If the buffer is <i>read only</i>, meaning the buffer cannot be modified using
+ * #set_value, #set_string or #copy and similar.
+ *
+ * Frozen strings and read-only files create read-only buffers.
+ */
+static VALUE
+io_buffer_readonly_p(VALUE self)
+{
+ return RBOOL(rb_io_buffer_readonly_p(self));
+}
+
+static void
+io_buffer_lock(struct rb_io_buffer *buffer)
+{
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_raise(rb_eIOBufferLockedError, "Buffer already locked!");
+ }
+
+ buffer->flags |= RB_IO_BUFFER_LOCKED;
+}
+
+VALUE
+rb_io_buffer_lock(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_lock(buffer);
+
+ return self;
+}
+
+static void
+io_buffer_unlock(struct rb_io_buffer *buffer)
+{
+ if (!(buffer->flags & RB_IO_BUFFER_LOCKED)) {
+ rb_raise(rb_eIOBufferLockedError, "Buffer not locked!");
+ }
+
+ buffer->flags &= ~RB_IO_BUFFER_LOCKED;
+}
+
+VALUE
+rb_io_buffer_unlock(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_unlock(buffer);
+
+ return self;
+}
+
+int
+rb_io_buffer_try_unlock(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ buffer->flags &= ~RB_IO_BUFFER_LOCKED;
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * call-seq: locked { ... }
+ *
+ * Allows to process a buffer in exclusive way, for concurrency-safety. While
+ * the block is performed, the buffer is considered locked, and no other code
+ * can enter the lock. Also, locked buffer can't be changed with #resize or
+ * #free.
+ *
+ * The following operations acquire a lock: #resize, #free.
+ *
+ * Locking is not thread safe. It is designed as a safety net around
+ * non-blocking system calls. You can only share a buffer between threads with
+ * appropriate synchronisation techniques.
+ *
+ * Example:
+ *
+ * buffer = IO::Buffer.new(4)
+ * buffer.locked? #=> false
+ *
+ * Fiber.schedule do
+ * buffer.locked do
+ * buffer.write(io) # theoretical system call interface
+ * end
+ * end
+ *
+ * Fiber.schedule do
+ * # in `locked': Buffer already locked! (IO::Buffer::LockedError)
+ * buffer.locked do
+ * buffer.set_string("test", 0)
+ * end
+ * end
+ */
+VALUE
+rb_io_buffer_locked(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_raise(rb_eIOBufferLockedError, "Buffer already locked!");
+ }
+
+ buffer->flags |= RB_IO_BUFFER_LOCKED;
+
+ VALUE result = rb_yield(self);
+
+ buffer->flags &= ~RB_IO_BUFFER_LOCKED;
+
+ return result;
+}
+
+/*
+ * call-seq: free -> self
+ *
+ * If the buffer references memory, release it back to the operating system.
+ * * for a _mapped_ buffer (e.g. from file): unmap.
+ * * for a buffer created from scratch: free memory.
+ * * for a buffer created from string: undo the association.
+ *
+ * After the buffer is freed, no further operations can't be performed on it.
+ *
+ * You can resize a freed buffer to re-allocate it.
+ *
+ * Example:
+ *
+ * buffer = IO::Buffer.for('test')
+ * buffer.free
+ * # => #<IO::Buffer 0x0000000000000000+0 NULL>
+ *
+ * buffer.get_value(:U8, 0)
+ * # in `get_value': The buffer is not allocated! (IO::Buffer::AllocationError)
+ *
+ * buffer.get_string
+ * # in `get_string': The buffer is not allocated! (IO::Buffer::AllocationError)
+ *
+ * buffer.null?
+ * # => true
+ */
+VALUE
+rb_io_buffer_free(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_raise(rb_eIOBufferLockedError, "Buffer is locked!");
+ }
+
+ io_buffer_free(buffer);
+
+ return self;
+}
+
+// Validate that access to the buffer is within bounds, assuming you want to
+// access length bytes from the specified offset.
+static inline void
+io_buffer_validate_range(struct rb_io_buffer *buffer, size_t offset, size_t length)
+{
+ // We assume here that offset + length won't overflow:
+ if (offset + length > buffer->size) {
+ rb_raise(rb_eArgError, "Specified offset+length is bigger than the buffer size!");
+ }
+}
+
+static VALUE
+rb_io_buffer_slice(struct rb_io_buffer *buffer, VALUE self, size_t offset, size_t length)
+{
+ io_buffer_validate_range(buffer, offset, length);
+
+ VALUE instance = rb_io_buffer_type_allocate(rb_class_of(self));
+ struct rb_io_buffer *slice = NULL;
+ TypedData_Get_Struct(instance, struct rb_io_buffer, &rb_io_buffer_type, slice);
+
+ slice->flags |= (buffer->flags & RB_IO_BUFFER_READONLY);
+ slice->base = (char*)buffer->base + offset;
+ slice->size = length;
+
+ // The source should be the root buffer:
+ if (buffer->source != Qnil)
+ slice->source = buffer->source;
+ else
+ slice->source = self;
+
+ return instance;
+}
+
+/*
+ * call-seq: slice([offset, [length]]) -> io_buffer
+ *
+ * Produce another IO::Buffer which is a slice (or view into) the current one
+ * starting at +offset+ bytes and going for +length+ bytes.
+ *
+ * The slicing happens without copying of memory, and the slice keeps being
+ * associated with the original buffer's source (string, or file), if any.
+ *
+ * If the offset is not given, it will be zero. If the offset is negative, it
+ * will raise an ArgumentError.
+ *
+ * If the length is not given, the slice will be as long as the original
+ * buffer minus the specified offset. If the length is negative, it will raise
+ * an ArgumentError.
+ *
+ * Raises RuntimeError if the <tt>offset+length</tt> is out of the current
+ * buffer's bounds.
+ *
+ * Example:
+ *
+ * string = 'test'
+ * buffer = IO::Buffer.for(string)
+ *
+ * slice = buffer.slice
+ * # =>
+ * # #<IO::Buffer 0x0000000108338e68+4 SLICE>
+ * # 0x00000000 74 65 73 74 test
+ *
+ * buffer.slice(2)
+ * # =>
+ * # #<IO::Buffer 0x0000000108338e6a+2 SLICE>
+ * # 0x00000000 73 74 st
+ *
+ * slice = buffer.slice(1, 2)
+ * # =>
+ * # #<IO::Buffer 0x00007fc3d34ebc49+2 SLICE>
+ * # 0x00000000 65 73 es
+ *
+ * # Put "o" into 0s position of the slice
+ * slice.set_string('o', 0)
+ * slice
+ * # =>
+ * # #<IO::Buffer 0x00007fc3d34ebc49+2 SLICE>
+ * # 0x00000000 6f 73 os
+ *
+ * # it is also visible at position 1 of the original buffer
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x00007fc3d31e2d80+4 SLICE>
+ * # 0x00000000 74 6f 73 74 tost
+ *
+ * # ...and original string
+ * string
+ * # => tost
+ */
+static VALUE
+io_buffer_slice(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 0, 2);
+
+ size_t offset, length;
+ struct rb_io_buffer *buffer = io_buffer_extract_offset_length(self, argc, argv, &offset, &length);
+
+ return rb_io_buffer_slice(buffer, self, offset, length);
+}
+
+int
+rb_io_buffer_get_bytes(VALUE self, void **base, size_t *size)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (io_buffer_validate(buffer)) {
+ if (buffer->base) {
+ *base = buffer->base;
+ *size = buffer->size;
+
+ return buffer->flags;
+ }
+ }
+
+ *base = NULL;
+ *size = 0;
+
+ return 0;
+}
+
+static inline void
+io_buffer_get_bytes_for_writing(struct rb_io_buffer *buffer, void **base, size_t *size)
+{
+ if (buffer->flags & RB_IO_BUFFER_READONLY ||
+ (!NIL_P(buffer->source) && OBJ_FROZEN(buffer->source))) {
+ rb_raise(rb_eIOBufferAccessError, "Buffer is not writable!");
+ }
+
+ if (!io_buffer_validate(buffer)) {
+ rb_raise(rb_eIOBufferInvalidatedError, "Buffer is invalid!");
+ }
+
+ if (buffer->base) {
+ *base = buffer->base;
+ *size = buffer->size;
+
+ return;
+ }
+
+ rb_raise(rb_eIOBufferAllocationError, "The buffer is not allocated!");
+}
+
+void
+rb_io_buffer_get_bytes_for_writing(VALUE self, void **base, size_t *size)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_get_bytes_for_writing(buffer, base, size);
+}
+
+static void
+io_buffer_get_bytes_for_reading(struct rb_io_buffer *buffer, const void **base, size_t *size)
+{
+ if (!io_buffer_validate(buffer)) {
+ rb_raise(rb_eIOBufferInvalidatedError, "Buffer has been invalidated!");
+ }
+
+ if (buffer->base) {
+ *base = buffer->base;
+ *size = buffer->size;
+
+ return;
+ }
+
+ rb_raise(rb_eIOBufferAllocationError, "The buffer is not allocated!");
+}
+
+void
+rb_io_buffer_get_bytes_for_reading(VALUE self, const void **base, size_t *size)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_get_bytes_for_reading(buffer, base, size);
+}
+
+/*
+ * call-seq: transfer -> new_io_buffer
+ *
+ * Transfers ownership to a new buffer, deallocating the current one.
+ *
+ * Example:
+ *
+ * buffer = IO::Buffer.new('test')
+ * other = buffer.transfer
+ * other
+ * # =>
+ * # #<IO::Buffer 0x00007f136a15f7b0+4 SLICE>
+ * # 0x00000000 74 65 73 74 test
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x0000000000000000+0 NULL>
+ * buffer.null?
+ * # => true
+ */
+VALUE
+rb_io_buffer_transfer(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_raise(rb_eIOBufferLockedError, "Cannot transfer ownership of locked buffer!");
+ }
+
+ VALUE instance = rb_io_buffer_type_allocate(rb_class_of(self));
+ struct rb_io_buffer *transferred;
+ TypedData_Get_Struct(instance, struct rb_io_buffer, &rb_io_buffer_type, transferred);
+
+ *transferred = *buffer;
+ io_buffer_zero(buffer);
+
+ return instance;
+}
+
+static void
+io_buffer_resize_clear(struct rb_io_buffer *buffer, void* base, size_t size)
+{
+ if (size > buffer->size) {
+ memset((unsigned char*)base+buffer->size, 0, size - buffer->size);
+ }
+}
+
+static void
+io_buffer_resize_copy(struct rb_io_buffer *buffer, size_t size)
+{
+ // Slow path:
+ struct rb_io_buffer resized;
+ io_buffer_initialize(&resized, NULL, size, io_flags_for_size(size), Qnil);
+
+ if (buffer->base) {
+ size_t preserve = buffer->size;
+ if (preserve > size) preserve = size;
+ memcpy(resized.base, buffer->base, preserve);
+
+ io_buffer_resize_clear(buffer, resized.base, size);
+ }
+
+ io_buffer_free(buffer);
+ *buffer = resized;
+}
+
+void
+rb_io_buffer_resize(VALUE self, size_t size)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ rb_raise(rb_eIOBufferLockedError, "Cannot resize locked buffer!");
+ }
+
+ if (buffer->base == NULL) {
+ io_buffer_initialize(buffer, NULL, size, io_flags_for_size(size), Qnil);
+ return;
+ }
+
+ if (buffer->flags & RB_IO_BUFFER_EXTERNAL) {
+ rb_raise(rb_eIOBufferAccessError, "Cannot resize external buffer!");
+ }
+
+#if defined(HAVE_MREMAP) && defined(MREMAP_MAYMOVE)
+ if (buffer->flags & RB_IO_BUFFER_MAPPED) {
+ void *base = mremap(buffer->base, buffer->size, size, MREMAP_MAYMOVE);
+
+ if (base == MAP_FAILED) {
+ rb_sys_fail("rb_io_buffer_resize:mremap");
+ }
+
+ io_buffer_resize_clear(buffer, base, size);
+
+ buffer->base = base;
+ buffer->size = size;
+
+ return;
+ }
+#endif
+
+ if (buffer->flags & RB_IO_BUFFER_INTERNAL) {
+ if (size == 0) {
+ io_buffer_free(buffer);
+ return;
+ }
+
+ void *base = realloc(buffer->base, size);
+
+ if (!base) {
+ rb_sys_fail("rb_io_buffer_resize:realloc");
+ }
+
+ io_buffer_resize_clear(buffer, base, size);
+
+ buffer->base = base;
+ buffer->size = size;
+
+ return;
+ }
+
+ io_buffer_resize_copy(buffer, size);
+}
+
+/*
+ * call-seq: resize(new_size) -> self
+ *
+ * Resizes a buffer to a +new_size+ bytes, preserving its content.
+ * Depending on the old and new size, the memory area associated with
+ * the buffer might be either extended, or rellocated at different
+ * address with content being copied.
+ *
+ * buffer = IO::Buffer.new(4)
+ * buffer.set_string("test", 0)
+ * buffer.resize(8) # resize to 8 bytes
+ * # =>
+ * # #<IO::Buffer 0x0000555f5d1a1630+8 INTERNAL>
+ * # 0x00000000 74 65 73 74 00 00 00 00 test....
+ *
+ * External buffer (created with ::for), and locked buffer
+ * can not be resized.
+ */
+static VALUE
+io_buffer_resize(VALUE self, VALUE size)
+{
+ rb_io_buffer_resize(self, io_buffer_extract_size(size));
+
+ return self;
+}
+
+/*
+ * call-seq: <=>(other) -> true or false
+ *
+ * Buffers are compared by size and exact contents of the memory they are
+ * referencing using +memcmp+.
+ */
+static VALUE
+rb_io_buffer_compare(VALUE self, VALUE other)
+{
+ const void *ptr1, *ptr2;
+ size_t size1, size2;
+
+ rb_io_buffer_get_bytes_for_reading(self, &ptr1, &size1);
+ rb_io_buffer_get_bytes_for_reading(other, &ptr2, &size2);
+
+ if (size1 < size2) {
+ return RB_INT2NUM(-1);
+ }
+
+ if (size1 > size2) {
+ return RB_INT2NUM(1);
+ }
+
+ return RB_INT2NUM(memcmp(ptr1, ptr2, size1));
+}
+
+static void
+io_buffer_validate_type(size_t size, size_t offset)
+{
+ if (offset > size) {
+ rb_raise(rb_eArgError, "Type extends beyond end of buffer! (offset=%"PRIdSIZE" > size=%"PRIdSIZE")", offset, size);
+ }
+}
+
+// Lower case: little endian.
+// Upper case: big endian (network endian).
+//
+// :U8 | unsigned 8-bit integer.
+// :S8 | signed 8-bit integer.
+//
+// :u16, :U16 | unsigned 16-bit integer.
+// :s16, :S16 | signed 16-bit integer.
+//
+// :u32, :U32 | unsigned 32-bit integer.
+// :s32, :S32 | signed 32-bit integer.
+//
+// :u64, :U64 | unsigned 64-bit integer.
+// :s64, :S64 | signed 64-bit integer.
+//
+// :f32, :F32 | 32-bit floating point number.
+// :f64, :F64 | 64-bit floating point number.
+
+#define ruby_swap8(value) value
+
+union swapf32 {
+ uint32_t integral;
+ float value;
+};
+
+static float
+ruby_swapf32(float value)
+{
+ union swapf32 swap = {.value = value};
+ swap.integral = ruby_swap32(swap.integral);
+ return swap.value;
+}
+
+union swapf64 {
+ uint64_t integral;
+ double value;
+};
+
+static double
+ruby_swapf64(double value)
+{
+ union swapf64 swap = {.value = value};
+ swap.integral = ruby_swap64(swap.integral);
+ return swap.value;
+}
+
+#define IO_BUFFER_DECLARE_TYPE(name, type, endian, wrap, unwrap, swap) \
+static ID RB_IO_BUFFER_DATA_TYPE_##name; \
+\
+static VALUE \
+io_buffer_read_##name(const void* base, size_t size, size_t *offset) \
+{ \
+ io_buffer_validate_type(size, *offset + sizeof(type)); \
+ type value; \
+ memcpy(&value, (char*)base + *offset, sizeof(type)); \
+ if (endian != RB_IO_BUFFER_HOST_ENDIAN) value = swap(value); \
+ *offset += sizeof(type); \
+ return wrap(value); \
+} \
+\
+static void \
+io_buffer_write_##name(const void* base, size_t size, size_t *offset, VALUE _value) \
+{ \
+ io_buffer_validate_type(size, *offset + sizeof(type)); \
+ type value = unwrap(_value); \
+ if (endian != RB_IO_BUFFER_HOST_ENDIAN) value = swap(value); \
+ memcpy((char*)base + *offset, &value, sizeof(type)); \
+ *offset += sizeof(type); \
+} \
+\
+enum { \
+ RB_IO_BUFFER_DATA_TYPE_##name##_SIZE = sizeof(type) \
+};
+
+IO_BUFFER_DECLARE_TYPE(U8, uint8_t, RB_IO_BUFFER_BIG_ENDIAN, RB_UINT2NUM, RB_NUM2UINT, ruby_swap8)
+IO_BUFFER_DECLARE_TYPE(S8, int8_t, RB_IO_BUFFER_BIG_ENDIAN, RB_INT2NUM, RB_NUM2INT, ruby_swap8)
+
+IO_BUFFER_DECLARE_TYPE(u16, uint16_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_UINT2NUM, RB_NUM2UINT, ruby_swap16)
+IO_BUFFER_DECLARE_TYPE(U16, uint16_t, RB_IO_BUFFER_BIG_ENDIAN, RB_UINT2NUM, RB_NUM2UINT, ruby_swap16)
+IO_BUFFER_DECLARE_TYPE(s16, int16_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_INT2NUM, RB_NUM2INT, ruby_swap16)
+IO_BUFFER_DECLARE_TYPE(S16, int16_t, RB_IO_BUFFER_BIG_ENDIAN, RB_INT2NUM, RB_NUM2INT, ruby_swap16)
+
+IO_BUFFER_DECLARE_TYPE(u32, uint32_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_UINT2NUM, RB_NUM2UINT, ruby_swap32)
+IO_BUFFER_DECLARE_TYPE(U32, uint32_t, RB_IO_BUFFER_BIG_ENDIAN, RB_UINT2NUM, RB_NUM2UINT, ruby_swap32)
+IO_BUFFER_DECLARE_TYPE(s32, int32_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_INT2NUM, RB_NUM2INT, ruby_swap32)
+IO_BUFFER_DECLARE_TYPE(S32, int32_t, RB_IO_BUFFER_BIG_ENDIAN, RB_INT2NUM, RB_NUM2INT, ruby_swap32)
+
+IO_BUFFER_DECLARE_TYPE(u64, uint64_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_ULL2NUM, RB_NUM2ULL, ruby_swap64)
+IO_BUFFER_DECLARE_TYPE(U64, uint64_t, RB_IO_BUFFER_BIG_ENDIAN, RB_ULL2NUM, RB_NUM2ULL, ruby_swap64)
+IO_BUFFER_DECLARE_TYPE(s64, int64_t, RB_IO_BUFFER_LITTLE_ENDIAN, RB_LL2NUM, RB_NUM2LL, ruby_swap64)
+IO_BUFFER_DECLARE_TYPE(S64, int64_t, RB_IO_BUFFER_BIG_ENDIAN, RB_LL2NUM, RB_NUM2LL, ruby_swap64)
+
+IO_BUFFER_DECLARE_TYPE(f32, float, RB_IO_BUFFER_LITTLE_ENDIAN, DBL2NUM, NUM2DBL, ruby_swapf32)
+IO_BUFFER_DECLARE_TYPE(F32, float, RB_IO_BUFFER_BIG_ENDIAN, DBL2NUM, NUM2DBL, ruby_swapf32)
+IO_BUFFER_DECLARE_TYPE(f64, double, RB_IO_BUFFER_LITTLE_ENDIAN, DBL2NUM, NUM2DBL, ruby_swapf64)
+IO_BUFFER_DECLARE_TYPE(F64, double, RB_IO_BUFFER_BIG_ENDIAN, DBL2NUM, NUM2DBL, ruby_swapf64)
+#undef IO_BUFFER_DECLARE_TYPE
+
+static inline size_t
+io_buffer_buffer_type_size(ID buffer_type)
+{
+#define IO_BUFFER_DATA_TYPE_SIZE(name) if (buffer_type == RB_IO_BUFFER_DATA_TYPE_##name) return RB_IO_BUFFER_DATA_TYPE_##name##_SIZE;
+ IO_BUFFER_DATA_TYPE_SIZE(U8)
+ IO_BUFFER_DATA_TYPE_SIZE(S8)
+ IO_BUFFER_DATA_TYPE_SIZE(u16)
+ IO_BUFFER_DATA_TYPE_SIZE(U16)
+ IO_BUFFER_DATA_TYPE_SIZE(s16)
+ IO_BUFFER_DATA_TYPE_SIZE(S16)
+ IO_BUFFER_DATA_TYPE_SIZE(u32)
+ IO_BUFFER_DATA_TYPE_SIZE(U32)
+ IO_BUFFER_DATA_TYPE_SIZE(s32)
+ IO_BUFFER_DATA_TYPE_SIZE(S32)
+ IO_BUFFER_DATA_TYPE_SIZE(u64)
+ IO_BUFFER_DATA_TYPE_SIZE(U64)
+ IO_BUFFER_DATA_TYPE_SIZE(s64)
+ IO_BUFFER_DATA_TYPE_SIZE(S64)
+ IO_BUFFER_DATA_TYPE_SIZE(f32)
+ IO_BUFFER_DATA_TYPE_SIZE(F32)
+ IO_BUFFER_DATA_TYPE_SIZE(f64)
+ IO_BUFFER_DATA_TYPE_SIZE(F64)
+#undef IO_BUFFER_DATA_TYPE_SIZE
+
+ rb_raise(rb_eArgError, "Invalid type name!");
+}
+
+/*
+ * call-seq:
+ * size_of(buffer_type) -> byte size
+ * size_of(array of buffer_type) -> byte size
+ *
+ * Returns the size of the given buffer type(s) in bytes.
+ *
+ * Example:
+ *
+ * IO::Buffer.size_of(:u32) # => 4
+ * IO::Buffer.size_of([:u32, :u32]) # => 8
+ */
+static VALUE
+io_buffer_size_of(VALUE klass, VALUE buffer_type)
+{
+ if (RB_TYPE_P(buffer_type, T_ARRAY)) {
+ size_t total = 0;
+ for (long i = 0; i < RARRAY_LEN(buffer_type); i++) {
+ total += io_buffer_buffer_type_size(RB_SYM2ID(RARRAY_AREF(buffer_type, i)));
+ }
+ return SIZET2NUM(total);
+ }
+ else {
+ return SIZET2NUM(io_buffer_buffer_type_size(RB_SYM2ID(buffer_type)));
+ }
+}
+
+static inline VALUE
+rb_io_buffer_get_value(const void* base, size_t size, ID buffer_type, size_t *offset)
+{
+#define IO_BUFFER_GET_VALUE(name) if (buffer_type == RB_IO_BUFFER_DATA_TYPE_##name) return io_buffer_read_##name(base, size, offset);
+ IO_BUFFER_GET_VALUE(U8)
+ IO_BUFFER_GET_VALUE(S8)
+
+ IO_BUFFER_GET_VALUE(u16)
+ IO_BUFFER_GET_VALUE(U16)
+ IO_BUFFER_GET_VALUE(s16)
+ IO_BUFFER_GET_VALUE(S16)
+
+ IO_BUFFER_GET_VALUE(u32)
+ IO_BUFFER_GET_VALUE(U32)
+ IO_BUFFER_GET_VALUE(s32)
+ IO_BUFFER_GET_VALUE(S32)
+
+ IO_BUFFER_GET_VALUE(u64)
+ IO_BUFFER_GET_VALUE(U64)
+ IO_BUFFER_GET_VALUE(s64)
+ IO_BUFFER_GET_VALUE(S64)
+
+ IO_BUFFER_GET_VALUE(f32)
+ IO_BUFFER_GET_VALUE(F32)
+ IO_BUFFER_GET_VALUE(f64)
+ IO_BUFFER_GET_VALUE(F64)
+#undef IO_BUFFER_GET_VALUE
+
+ rb_raise(rb_eArgError, "Invalid type name!");
+}
+
+/*
+ * call-seq: get_value(buffer_type, offset) -> numeric
+ *
+ * Read from buffer a value of +type+ at +offset+. +buffer_type+ should be one
+ * of symbols:
+ *
+ * * +:U8+: unsigned integer, 1 byte
+ * * +:S8+: signed integer, 1 byte
+ * * +:u16+: unsigned integer, 2 bytes, little-endian
+ * * +:U16+: unsigned integer, 2 bytes, big-endian
+ * * +:s16+: signed integer, 2 bytes, little-endian
+ * * +:S16+: signed integer, 2 bytes, big-endian
+ * * +:u32+: unsigned integer, 4 bytes, little-endian
+ * * +:U32+: unsigned integer, 4 bytes, big-endian
+ * * +:s32+: signed integer, 4 bytes, little-endian
+ * * +:S32+: signed integer, 4 bytes, big-endian
+ * * +:u64+: unsigned integer, 8 bytes, little-endian
+ * * +:U64+: unsigned integer, 8 bytes, big-endian
+ * * +:s64+: signed integer, 8 bytes, little-endian
+ * * +:S64+: signed integer, 8 bytes, big-endian
+ * * +:f32+: float, 4 bytes, little-endian
+ * * +:F32+: float, 4 bytes, big-endian
+ * * +:f64+: double, 8 bytes, little-endian
+ * * +:F64+: double, 8 bytes, big-endian
+ *
+ * A buffer type refers specifically to the type of binary buffer that is stored
+ * in the buffer. For example, a +:u32+ buffer type is a 32-bit unsigned
+ * integer in little-endian format.
+ *
+ * Example:
+ *
+ * string = [1.5].pack('f')
+ * # => "\x00\x00\xC0?"
+ * IO::Buffer.for(string).get_value(:f32, 0)
+ * # => 1.5
+ */
+static VALUE
+io_buffer_get_value(VALUE self, VALUE type, VALUE _offset)
+{
+ const void *base;
+ size_t size;
+ size_t offset = io_buffer_extract_offset(_offset);
+
+ rb_io_buffer_get_bytes_for_reading(self, &base, &size);
+
+ return rb_io_buffer_get_value(base, size, RB_SYM2ID(type), &offset);
+}
+
+/*
+ * call-seq: get_values(buffer_types, offset) -> array
+ *
+ * Similar to #get_value, except that it can handle multiple buffer types and
+ * returns an array of values.
+ *
+ * Example:
+ *
+ * string = [1.5, 2.5].pack('ff')
+ * IO::Buffer.for(string).get_values([:f32, :f32], 0)
+ * # => [1.5, 2.5]
+ */
+static VALUE
+io_buffer_get_values(VALUE self, VALUE buffer_types, VALUE _offset)
+{
+ size_t offset = io_buffer_extract_offset(_offset);
+
+ const void *base;
+ size_t size;
+ rb_io_buffer_get_bytes_for_reading(self, &base, &size);
+
+ if (!RB_TYPE_P(buffer_types, T_ARRAY)) {
+ rb_raise(rb_eArgError, "Argument buffer_types should be an array!");
+ }
+
+ VALUE array = rb_ary_new_capa(RARRAY_LEN(buffer_types));
+
+ for (long i = 0; i < RARRAY_LEN(buffer_types); i++) {
+ VALUE type = rb_ary_entry(buffer_types, i);
+ VALUE value = rb_io_buffer_get_value(base, size, RB_SYM2ID(type), &offset);
+ rb_ary_push(array, value);
+ }
+
+ return array;
+}
+
+// Extract a count argument, which must be a positive integer.
+// Count is generally considered relative to the number of things.
+static inline size_t
+io_buffer_extract_count(VALUE argument)
+{
+ if (rb_int_negative_p(argument)) {
+ rb_raise(rb_eArgError, "Count can't be negative!");
+ }
+
+ return NUM2SIZET(argument);
+}
+
+static inline void
+io_buffer_extract_offset_count(ID buffer_type, size_t size, int argc, VALUE *argv, size_t *offset, size_t *count)
+{
+ if (argc >= 1) {
+ *offset = io_buffer_extract_offset(argv[0]);
+ }
+ else {
+ *offset = 0;
+ }
+
+ if (argc >= 2) {
+ *count = io_buffer_extract_count(argv[1]);
+ }
+ else {
+ if (*offset > size) {
+ rb_raise(rb_eArgError, "The given offset is bigger than the buffer size!");
+ }
+
+ *count = (size - *offset) / io_buffer_buffer_type_size(buffer_type);
+ }
+}
+
+/*
+ * call-seq:
+ * each(buffer_type, [offset, [count]]) {|offset, value| ...} -> self
+ * each(buffer_type, [offset, [count]]) -> enumerator
+ *
+ * Iterates over the buffer, yielding each +value+ of +buffer_type+ starting
+ * from +offset+.
+ *
+ * If +count+ is given, only +count+ values will be yielded.
+ *
+ * Example:
+ *
+ * IO::Buffer.for("Hello World").each(:U8, 2, 2) do |offset, value|
+ * puts "#{offset}: #{value}"
+ * end
+ * # 2: 108
+ * # 3: 108
+ */
+static VALUE
+io_buffer_each(int argc, VALUE *argv, VALUE self)
+{
+ RETURN_ENUMERATOR_KW(self, argc, argv, RB_NO_KEYWORDS);
+
+ const void *base;
+ size_t size;
+
+ rb_io_buffer_get_bytes_for_reading(self, &base, &size);
+
+ ID buffer_type;
+ if (argc >= 1) {
+ buffer_type = RB_SYM2ID(argv[0]);
+ }
+ else {
+ buffer_type = RB_IO_BUFFER_DATA_TYPE_U8;
+ }
+
+ size_t offset, count;
+ io_buffer_extract_offset_count(buffer_type, size, argc-1, argv+1, &offset, &count);
+
+ for (size_t i = 0; i < count; i++) {
+ size_t current_offset = offset;
+ VALUE value = rb_io_buffer_get_value(base, size, buffer_type, &offset);
+ rb_yield_values(2, SIZET2NUM(current_offset), value);
+ }
+
+ return self;
+}
+
+/*
+ * call-seq: values(buffer_type, [offset, [count]]) -> array
+ *
+ * Returns an array of values of +buffer_type+ starting from +offset+.
+ *
+ * If +count+ is given, only +count+ values will be returned.
+ *
+ * Example:
+ *
+ * IO::Buffer.for("Hello World").values(:U8, 2, 2)
+ * # => [108, 108]
+ */
+static VALUE
+io_buffer_values(int argc, VALUE *argv, VALUE self)
+{
+ const void *base;
+ size_t size;
+
+ rb_io_buffer_get_bytes_for_reading(self, &base, &size);
+
+ ID buffer_type;
+ if (argc >= 1) {
+ buffer_type = RB_SYM2ID(argv[0]);
+ }
+ else {
+ buffer_type = RB_IO_BUFFER_DATA_TYPE_U8;
+ }
+
+ size_t offset, count;
+ io_buffer_extract_offset_count(buffer_type, size, argc-1, argv+1, &offset, &count);
+
+ VALUE array = rb_ary_new_capa(count);
+
+ for (size_t i = 0; i < count; i++) {
+ VALUE value = rb_io_buffer_get_value(base, size, buffer_type, &offset);
+ rb_ary_push(array, value);
+ }
+
+ return array;
+}
+
+/*
+ * call-seq:
+ * each_byte([offset, [count]]) {|offset, byte| ...} -> self
+ * each_byte([offset, [count]]) -> enumerator
+ *
+ * Iterates over the buffer, yielding each byte starting from +offset+.
+ *
+ * If +count+ is given, only +count+ bytes will be yielded.
+ *
+ * Example:
+ *
+ * IO::Buffer.for("Hello World").each_byte(2, 2) do |offset, byte|
+ * puts "#{offset}: #{byte}"
+ * end
+ * # 2: 108
+ * # 3: 108
+ */
+static VALUE
+io_buffer_each_byte(int argc, VALUE *argv, VALUE self)
+{
+ RETURN_ENUMERATOR_KW(self, argc, argv, RB_NO_KEYWORDS);
+
+ const void *base;
+ size_t size;
+
+ rb_io_buffer_get_bytes_for_reading(self, &base, &size);
+
+ size_t offset, count;
+ io_buffer_extract_offset_count(RB_IO_BUFFER_DATA_TYPE_U8, size, argc-1, argv+1, &offset, &count);
+
+ for (size_t i = 0; i < count; i++) {
+ unsigned char *value = (unsigned char *)base + i + offset;
+ rb_yield(RB_INT2FIX(*value));
+ }
+
+ return self;
+}
+
+static inline void
+rb_io_buffer_set_value(const void* base, size_t size, ID buffer_type, size_t *offset, VALUE value)
+{
+#define IO_BUFFER_SET_VALUE(name) if (buffer_type == RB_IO_BUFFER_DATA_TYPE_##name) {io_buffer_write_##name(base, size, offset, value); return;}
+ IO_BUFFER_SET_VALUE(U8);
+ IO_BUFFER_SET_VALUE(S8);
+
+ IO_BUFFER_SET_VALUE(u16);
+ IO_BUFFER_SET_VALUE(U16);
+ IO_BUFFER_SET_VALUE(s16);
+ IO_BUFFER_SET_VALUE(S16);
+
+ IO_BUFFER_SET_VALUE(u32);
+ IO_BUFFER_SET_VALUE(U32);
+ IO_BUFFER_SET_VALUE(s32);
+ IO_BUFFER_SET_VALUE(S32);
+
+ IO_BUFFER_SET_VALUE(u64);
+ IO_BUFFER_SET_VALUE(U64);
+ IO_BUFFER_SET_VALUE(s64);
+ IO_BUFFER_SET_VALUE(S64);
+
+ IO_BUFFER_SET_VALUE(f32);
+ IO_BUFFER_SET_VALUE(F32);
+ IO_BUFFER_SET_VALUE(f64);
+ IO_BUFFER_SET_VALUE(F64);
+#undef IO_BUFFER_SET_VALUE
+
+ rb_raise(rb_eArgError, "Invalid type name!");
+}
+
+/*
+ * call-seq: set_value(type, offset, value) -> offset
+ *
+ * Write to a buffer a +value+ of +type+ at +offset+. +type+ should be one of
+ * symbols described in #get_value.
+ *
+ * buffer = IO::Buffer.new(8)
+ * # =>
+ * # #<IO::Buffer 0x0000555f5c9a2d50+8 INTERNAL>
+ * # 0x00000000 00 00 00 00 00 00 00 00
+ *
+ * buffer.set_value(:U8, 1, 111)
+ * # => 1
+ *
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x0000555f5c9a2d50+8 INTERNAL>
+ * # 0x00000000 00 6f 00 00 00 00 00 00 .o......
+ *
+ * Note that if the +type+ is integer and +value+ is Float, the implicit truncation is performed:
+ *
+ * buffer = IO::Buffer.new(8)
+ * buffer.set_value(:U32, 0, 2.5)
+ *
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x0000555f5c9a2d50+8 INTERNAL>
+ * # 0x00000000 00 00 00 02 00 00 00 00
+ * # ^^ the same as if we'd pass just integer 2
+ */
+static VALUE
+io_buffer_set_value(VALUE self, VALUE type, VALUE _offset, VALUE value)
+{
+ void *base;
+ size_t size;
+ size_t offset = io_buffer_extract_offset(_offset);
+
+ rb_io_buffer_get_bytes_for_writing(self, &base, &size);
+
+ rb_io_buffer_set_value(base, size, RB_SYM2ID(type), &offset, value);
+
+ return SIZET2NUM(offset);
+}
+
+/*
+ * call-seq: set_values(buffer_types, offset, values) -> offset
+ *
+ * Write +values+ of +buffer_types+ at +offset+ to the buffer. +buffer_types+
+ * should be an array of symbols as described in #get_value. +values+ should
+ * be an array of values to write.
+ *
+ * Example:
+ *
+ * buffer = IO::Buffer.new(8)
+ * buffer.set_values([:U8, :U16], 0, [1, 2])
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x696f717561746978+8 INTERNAL>
+ * # 0x00000000 01 00 02 00 00 00 00 00 ........
+ */
+static VALUE
+io_buffer_set_values(VALUE self, VALUE buffer_types, VALUE _offset, VALUE values)
+{
+ if (!RB_TYPE_P(buffer_types, T_ARRAY)) {
+ rb_raise(rb_eArgError, "Argument buffer_types should be an array!");
+ }
+
+ if (!RB_TYPE_P(values, T_ARRAY)) {
+ rb_raise(rb_eArgError, "Argument values should be an array!");
+ }
+
+ if (RARRAY_LEN(buffer_types) != RARRAY_LEN(values)) {
+ rb_raise(rb_eArgError, "Argument buffer_types and values should have the same length!");
+ }
+
+ size_t offset = io_buffer_extract_offset(_offset);
+
+ void *base;
+ size_t size;
+ rb_io_buffer_get_bytes_for_writing(self, &base, &size);
+
+ for (long i = 0; i < RARRAY_LEN(buffer_types); i++) {
+ VALUE type = rb_ary_entry(buffer_types, i);
+ VALUE value = rb_ary_entry(values, i);
+ rb_io_buffer_set_value(base, size, RB_SYM2ID(type), &offset, value);
+ }
+
+ return SIZET2NUM(offset);
+}
+
+static void
+io_buffer_memcpy(struct rb_io_buffer *buffer, size_t offset, const void *source_base, size_t source_offset, size_t source_size, size_t length)
+{
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ if (source_offset + length > source_size) {
+ rb_raise(rb_eArgError, "The computed source range exceeds the size of the source buffer!");
+ }
+
+ memcpy((unsigned char*)base+offset, (unsigned char*)source_base+source_offset, length);
+}
+
+// (offset, length, source_offset) -> length
+static VALUE
+io_buffer_copy_from(struct rb_io_buffer *buffer, const void *source_base, size_t source_size, int argc, VALUE *argv)
+{
+ size_t offset = 0;
+ size_t length;
+ size_t source_offset;
+
+ // The offset we copy into the buffer:
+ if (argc >= 1) {
+ offset = io_buffer_extract_offset(argv[0]);
+ }
+
+ // The offset we start from within the string:
+ if (argc >= 3) {
+ source_offset = io_buffer_extract_offset(argv[2]);
+
+ if (source_offset > source_size) {
+ rb_raise(rb_eArgError, "The given source offset is bigger than the source itself!");
+ }
+ }
+ else {
+ source_offset = 0;
+ }
+
+ // The length we are going to copy:
+ if (argc >= 2 && !RB_NIL_P(argv[1])) {
+ length = io_buffer_extract_length(argv[1]);
+ }
+ else {
+ // Default to the source offset -> source size:
+ length = source_size - source_offset;
+ }
+
+ io_buffer_memcpy(buffer, offset, source_base, source_offset, source_size, length);
+
+ return SIZET2NUM(length);
+}
+
+/*
+ * call-seq:
+ * dup -> io_buffer
+ * clone -> io_buffer
+ *
+ * Make an internal copy of the source buffer. Updates to the copy will not
+ * affect the source buffer.
+ *
+ * source = IO::Buffer.for("Hello World")
+ * # =>
+ * # #<IO::Buffer 0x00007fd598466830+11 EXTERNAL READONLY SLICE>
+ * # 0x00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 Hello World
+ * buffer = source.dup
+ * # =>
+ * # #<IO::Buffer 0x0000558cbec03320+11 INTERNAL>
+ * # 0x00000000 48 65 6c 6c 6f 20 57 6f 72 6c 64 Hello World
+ */
+static VALUE
+rb_io_buffer_initialize_copy(VALUE self, VALUE source)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ const void *source_base;
+ size_t source_size;
+
+ rb_io_buffer_get_bytes_for_reading(source, &source_base, &source_size);
+
+ io_buffer_initialize(buffer, NULL, source_size, io_flags_for_size(source_size), Qnil);
+
+ return io_buffer_copy_from(buffer, source_base, source_size, 0, NULL);
+}
+
+/*
+ * call-seq:
+ * copy(source, [offset, [length, [source_offset]]]) -> size
+ *
+ * Efficiently copy buffer from a source IO::Buffer into the buffer,
+ * at +offset+ using +memcpy+. For copying String instances, see #set_string.
+ *
+ * buffer = IO::Buffer.new(32)
+ * # =>
+ * # #<IO::Buffer 0x0000555f5ca22520+32 INTERNAL>
+ * # 0x00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+ * # 0x00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ *
+ *
+ * buffer.copy(IO::Buffer.for("test"), 8)
+ * # => 4 -- size of buffer copied
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x0000555f5cf8fe40+32 INTERNAL>
+ * # 0x00000000 00 00 00 00 00 00 00 00 74 65 73 74 00 00 00 00 ........test....
+ * # 0x00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ *
+ *
+ * #copy can be used to put buffer into strings associated with buffer:
+ *
+ * string= "buffer: "
+ * # => "buffer: "
+ * buffer = IO::Buffer.for(string)
+ * buffer.copy(IO::Buffer.for("test"), 5)
+ * # => 4
+ * string
+ * # => "buffer:test"
+ *
+ * Attempt to copy into a read-only buffer will fail:
+ *
+ * File.write('test.txt', 'test')
+ * buffer = IO::Buffer.map(File.open('test.txt'), nil, 0, IO::Buffer::READONLY)
+ * buffer.copy(IO::Buffer.for("test"), 8)
+ * # in `copy': Buffer is not writable! (IO::Buffer::AccessError)
+ *
+ * See ::map for details of creation of mutable file mappings, this will
+ * work:
+ *
+ * buffer = IO::Buffer.map(File.open('test.txt', 'r+'))
+ * buffer.copy(IO::Buffer.for("boom"), 0)
+ * # => 4
+ * File.read('test.txt')
+ * # => "boom"
+ *
+ * Attempt to copy the buffer which will need place outside of buffer's
+ * bounds will fail:
+ *
+ * buffer = IO::Buffer.new(2)
+ * buffer.copy(IO::Buffer.for('test'), 0)
+ * # in `copy': Specified offset+length is bigger than the buffer size! (ArgumentError)
+ */
+static VALUE
+io_buffer_copy(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, 4);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE source = argv[0];
+ const void *source_base;
+ size_t source_size;
+
+ rb_io_buffer_get_bytes_for_reading(source, &source_base, &source_size);
+
+ return io_buffer_copy_from(buffer, source_base, source_size, argc-1, argv+1);
+}
+
+/*
+ * call-seq: get_string([offset, [length, [encoding]]]) -> string
+ *
+ * Read a chunk or all of the buffer into a string, in the specified
+ * +encoding+. If no encoding is provided +Encoding::BINARY+ is used.
+ *
+ * buffer = IO::Buffer.for('test')
+ * buffer.get_string
+ * # => "test"
+ * buffer.get_string(2)
+ * # => "st"
+ * buffer.get_string(2, 1)
+ * # => "s"
+ */
+static VALUE
+io_buffer_get_string(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 0, 3);
+
+ size_t offset, length;
+ struct rb_io_buffer *buffer = io_buffer_extract_offset_length(self, argc, argv, &offset, &length);
+
+ const void *base;
+ size_t size;
+ io_buffer_get_bytes_for_reading(buffer, &base, &size);
+
+ rb_encoding *encoding;
+ if (argc >= 3) {
+ encoding = rb_find_encoding(argv[2]);
+ }
+ else {
+ encoding = rb_ascii8bit_encoding();
+ }
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ return rb_enc_str_new((const char*)base + offset, length, encoding);
+}
+
+/*
+ * call-seq: set_string(string, [offset, [length, [source_offset]]]) -> size
+ *
+ * Efficiently copy buffer from a source String into the buffer,
+ * at +offset+ using +memcpy+.
+ *
+ * buf = IO::Buffer.new(8)
+ * # =>
+ * # #<IO::Buffer 0x0000557412714a20+8 INTERNAL>
+ * # 0x00000000 00 00 00 00 00 00 00 00 ........
+ *
+ * # set buffer starting from offset 1, take 2 bytes starting from string's
+ * # second
+ * buf.set_string('test', 1, 2, 1)
+ * # => 2
+ * buf
+ * # =>
+ * # #<IO::Buffer 0x0000557412714a20+8 INTERNAL>
+ * # 0x00000000 00 65 73 00 00 00 00 00 .es.....
+ *
+ * See also #copy for examples of how buffer writing might be used for changing
+ * associated strings and files.
+ */
+static VALUE
+io_buffer_set_string(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, 4);
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE string = rb_str_to_str(argv[0]);
+
+ const void *source_base = RSTRING_PTR(string);
+ size_t source_size = RSTRING_LEN(string);
+
+ return io_buffer_copy_from(buffer, source_base, source_size, argc-1, argv+1);
+}
+
+void
+rb_io_buffer_clear(VALUE self, uint8_t value, size_t offset, size_t length)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ memset((char*)base + offset, value, length);
+}
+
+/*
+ * call-seq: clear(value = 0, [offset, [length]]) -> self
+ *
+ * Fill buffer with +value+, starting with +offset+ and going for +length+
+ * bytes.
+ *
+ * buffer = IO::Buffer.for('test')
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 74 65 73 74 test
+ *
+ * buffer.clear
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 00 00 00 00 ....
+ *
+ * buf.clear(1) # fill with 1
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 01 01 01 01 ....
+ *
+ * buffer.clear(2, 1, 2) # fill with 2, starting from offset 1, for 2 bytes
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 01 02 02 01 ....
+ *
+ * buffer.clear(2, 1) # fill with 2, starting from offset 1
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 01 02 02 02 ....
+ */
+static VALUE
+io_buffer_clear(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 0, 3);
+
+ uint8_t value = 0;
+ if (argc >= 1) {
+ value = NUM2UINT(argv[0]);
+ }
+
+ size_t offset, length;
+ io_buffer_extract_offset_length(self, argc-1, argv+1, &offset, &length);
+
+ rb_io_buffer_clear(self, value, offset, length);
+
+ return self;
+}
+
+static size_t
+io_buffer_default_size(size_t page_size)
+{
+ // Platform agnostic default size, based on empirical performance observation:
+ const size_t platform_agnostic_default_size = 64*1024;
+
+ // Allow user to specify custom default buffer size:
+ const char *default_size = getenv("RUBY_IO_BUFFER_DEFAULT_SIZE");
+ if (default_size) {
+ // For the purpose of setting a default size, 2^31 is an acceptable maximum:
+ int value = atoi(default_size);
+
+ // assuming sizeof(int) <= sizeof(size_t)
+ if (value > 0) {
+ return value;
+ }
+ }
+
+ if (platform_agnostic_default_size < page_size) {
+ return page_size;
+ }
+
+ return platform_agnostic_default_size;
+}
+
+struct io_buffer_blocking_region_argument {
+ struct rb_io_buffer *buffer;
+ rb_blocking_function_t *function;
+ void *data;
+ int descriptor;
+};
+
+static VALUE
+io_buffer_blocking_region_begin(VALUE _argument)
+{
+ struct io_buffer_blocking_region_argument *argument = (void*)_argument;
+
+ return rb_thread_io_blocking_region(argument->function, argument->data, argument->descriptor);
+}
+
+static VALUE
+io_buffer_blocking_region_ensure(VALUE _argument)
+{
+ struct io_buffer_blocking_region_argument *argument = (void*)_argument;
+
+ io_buffer_unlock(argument->buffer);
+
+ return Qnil;
+}
+
+static VALUE
+io_buffer_blocking_region(struct rb_io_buffer *buffer, rb_blocking_function_t *function, void *data, int descriptor)
+{
+ struct io_buffer_blocking_region_argument argument = {
+ .buffer = buffer,
+ .function = function,
+ .data = data,
+ .descriptor = descriptor,
+ };
+
+ // If the buffer is already locked, we can skip the ensure (unlock):
+ if (buffer->flags & RB_IO_BUFFER_LOCKED) {
+ return io_buffer_blocking_region_begin((VALUE)&argument);
+ }
+ else {
+ // The buffer should be locked for the duration of the blocking region:
+ io_buffer_lock(buffer);
+
+ return rb_ensure(io_buffer_blocking_region_begin, (VALUE)&argument, io_buffer_blocking_region_ensure, (VALUE)&argument);
+ }
+}
+
+struct io_buffer_read_internal_argument {
+ int descriptor;
+
+ // The base pointer to read from:
+ char *base;
+ // The size of the buffer:
+ size_t size;
+
+ // The minimum number of bytes to read:
+ size_t length;
+};
+
+static VALUE
+io_buffer_read_internal(void *_argument)
+{
+ size_t total = 0;
+ struct io_buffer_read_internal_argument *argument = _argument;
+
+ while (true) {
+ ssize_t result = read(argument->descriptor, argument->base, argument->size);
+
+ if (result < 0) {
+ return rb_fiber_scheduler_io_result(result, errno);
+ }
+ else if (result == 0) {
+ return rb_fiber_scheduler_io_result(total, 0);
+ }
+ else {
+ total += result;
+
+ if (total >= argument->length) {
+ return rb_fiber_scheduler_io_result(total, 0);
+ }
+
+ argument->base = argument->base + result;
+ argument->size = argument->size - result;
+ }
+ }
+}
+
+VALUE
+rb_io_buffer_read(VALUE self, VALUE io, size_t length, size_t offset)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_read(scheduler, io, self, length, offset);
+
+ if (!UNDEF_P(result)) {
+ return result;
+ }
+ }
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ int descriptor = rb_io_descriptor(io);
+
+ void * base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ base = (unsigned char*)base + offset;
+ size = size - offset;
+
+ struct io_buffer_read_internal_argument argument = {
+ .descriptor = descriptor,
+ .base = base,
+ .size = size,
+ .length = length,
+ };
+
+ return io_buffer_blocking_region(buffer, io_buffer_read_internal, &argument, descriptor);
+}
+
+/*
+ * call-seq: read(io, [length, [offset]]) -> read length or -errno
+ *
+ * Read at least +length+ bytes from the +io+, into the buffer starting at
+ * +offset+. If an error occurs, return <tt>-errno</tt>.
+ *
+ * If +length+ is not given or +nil+, it defaults to the size of the buffer
+ * minus the offset, i.e. the entire buffer.
+ *
+ * If +length+ is zero, exactly one <tt>read</tt> operation will occur.
+ *
+ * If +offset+ is not given, it defaults to zero, i.e. the beginning of the
+ * buffer.
+ *
+ * IO::Buffer.for('test') do |buffer|
+ * p buffer
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 74 65 73 74 test
+ * buffer.read(File.open('/dev/urandom', 'rb'), 2)
+ * p buffer
+ * # =>
+ * # <IO::Buffer 0x00007f3bc65f2a58+4 EXTERNAL SLICE>
+ * # 0x00000000 05 35 73 74 .5st
+ * end
+ */
+static VALUE
+io_buffer_read(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, 3);
+
+ VALUE io = argv[0];
+
+ size_t length, offset;
+ io_buffer_extract_length_offset(self, argc-1, argv+1, &length, &offset);
+
+ return rb_io_buffer_read(self, io, length, offset);
+}
+
+struct io_buffer_pread_internal_argument {
+ int descriptor;
+ void *base;
+ size_t size;
+ off_t offset;
+};
+
+static VALUE
+io_buffer_pread_internal(void *_argument)
+{
+ struct io_buffer_pread_internal_argument *argument = _argument;
+
+#if defined(HAVE_PREAD)
+ ssize_t result = pread(argument->descriptor, argument->base, argument->size, argument->offset);
+#else
+ // This emulation is not thread safe.
+ rb_off_t offset = lseek(argument->descriptor, 0, SEEK_CUR);
+ if (offset == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+
+ if (lseek(argument->descriptor, argument->offset, SEEK_SET) == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+
+ ssize_t result = read(argument->descriptor, argument->base, argument->size);
+
+ if (lseek(argument->descriptor, offset, SEEK_SET) == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+#endif
+
+ return rb_fiber_scheduler_io_result(result, errno);
+}
+
+VALUE
+rb_io_buffer_pread(VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_pread(scheduler, io, from, self, length, offset);
+
+ if (!UNDEF_P(result)) {
+ return result;
+ }
+ }
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ int descriptor = rb_io_descriptor(io);
+
+ void * base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ struct io_buffer_pread_internal_argument argument = {
+ .descriptor = descriptor,
+
+ // Move the base pointer to the offset:
+ .base = (unsigned char*)base + offset,
+
+ // And the size to the length of buffer we want to read:
+ .size = length,
+
+ // From the offset in the file we want to read from:
+ .offset = from,
+ };
+
+ return io_buffer_blocking_region(buffer, io_buffer_pread_internal, &argument, descriptor);
+}
+
+/*
+ * call-seq: pread(io, from, length, [offset]) -> read length or -errno
+ *
+ * Read at most +length+ bytes from +io+ into the buffer, starting at
+ * +from+, and put it in buffer starting from specified +offset+.
+ * If an error occurs, return <tt>-errno</tt>.
+ *
+ * If +offset+ is not given, put it at the beginning of the buffer.
+ *
+ * Example:
+ *
+ * IO::Buffer.for('test') do |buffer|
+ * p buffer
+ * # =>
+ * # <IO::Buffer 0x00007fca40087c38+4 SLICE>
+ * # 0x00000000 74 65 73 74 test
+ *
+ * # take 2 bytes from the beginning of urandom,
+ * # put them in buffer starting from position 2
+ * buffer.pread(File.open('/dev/urandom', 'rb'), 0, 2, 2)
+ * p buffer
+ * # =>
+ * # <IO::Buffer 0x00007f3bc65f2a58+4 EXTERNAL SLICE>
+ * # 0x00000000 05 35 73 74 te.5
+ * end
+ */
+static VALUE
+io_buffer_pread(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 2, 4);
+
+ VALUE io = argv[0];
+ rb_off_t from = NUM2OFFT(argv[1]);
+
+ size_t length, offset;
+ io_buffer_extract_length_offset(self, argc-2, argv+2, &length, &offset);
+
+ return rb_io_buffer_pread(self, io, from, length, offset);
+}
+
+struct io_buffer_write_internal_argument {
+ int descriptor;
+
+ // The base pointer to write from:
+ const char *base;
+ // The size of the buffer:
+ size_t size;
+
+ // The minimum length to write:
+ size_t length;
+};
+
+static VALUE
+io_buffer_write_internal(void *_argument)
+{
+ size_t total = 0;
+ struct io_buffer_write_internal_argument *argument = _argument;
+
+ while (true) {
+ ssize_t result = write(argument->descriptor, argument->base, argument->size);
+
+ if (result < 0) {
+ return rb_fiber_scheduler_io_result(result, errno);
+ }
+ else if (result == 0) {
+ return rb_fiber_scheduler_io_result(total, 0);
+ }
+ else {
+ total += result;
+
+ if (total >= argument->length) {
+ return rb_fiber_scheduler_io_result(total, 0);
+ }
+
+ argument->base = argument->base + result;
+ argument->size = argument->size - result;
+ }
+ }
+}
+
+VALUE
+rb_io_buffer_write(VALUE self, VALUE io, size_t length, size_t offset)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_write(scheduler, io, self, length, offset);
+
+ if (!UNDEF_P(result)) {
+ return result;
+ }
+ }
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ int descriptor = rb_io_descriptor(io);
+
+ const void * base;
+ size_t size;
+ io_buffer_get_bytes_for_reading(buffer, &base, &size);
+
+ base = (unsigned char*)base + offset;
+ size = size - offset;
+
+ struct io_buffer_write_internal_argument argument = {
+ .descriptor = descriptor,
+ .base = base,
+ .size = size,
+ .length = length,
+ };
+
+ return io_buffer_blocking_region(buffer, io_buffer_write_internal, &argument, descriptor);
+}
+
+/*
+ * call-seq: write(io, [length, [offset]]) -> written length or -errno
+ *
+ * Write at least +length+ bytes from the buffer starting at +offset+, into the +io+.
+ * If an error occurs, return <tt>-errno</tt>.
+ *
+ * If +length+ is not given or +nil+, it defaults to the size of the buffer
+ * minus the offset, i.e. the entire buffer.
+ *
+ * If +length+ is zero, exactly one <tt>write</tt> operation will occur.
+ *
+ * If +offset+ is not given, it defaults to zero, i.e. the beginning of the
+ * buffer.
+ *
+ * out = File.open('output.txt', 'wb')
+ * IO::Buffer.for('1234567').write(out, 3)
+ *
+ * This leads to +123+ being written into <tt>output.txt</tt>
+ */
+static VALUE
+io_buffer_write(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 1, 3);
+
+ VALUE io = argv[0];
+
+ size_t length, offset;
+ io_buffer_extract_length_offset(self, argc-1, argv+1, &length, &offset);
+
+ return rb_io_buffer_write(self, io, length, offset);
+}
+
+struct io_buffer_pwrite_internal_argument {
+ int descriptor;
+ const void *base;
+ size_t size;
+ off_t offset;
+};
+
+static VALUE
+io_buffer_pwrite_internal(void *_argument)
+{
+ struct io_buffer_pwrite_internal_argument *argument = _argument;
+
+#if defined(HAVE_PWRITE)
+ ssize_t result = pwrite(argument->descriptor, argument->base, argument->size, argument->offset);
+#else
+ // This emulation is not thread safe.
+ rb_off_t offset = lseek(argument->descriptor, 0, SEEK_CUR);
+ if (offset == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+
+ if (lseek(argument->descriptor, argument->offset, SEEK_SET) == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+
+ ssize_t result = write(argument->descriptor, argument->base, argument->size);
+
+ if (lseek(argument->descriptor, offset, SEEK_SET) == (rb_off_t)-1)
+ return rb_fiber_scheduler_io_result(-1, errno);
+#endif
+
+ return rb_fiber_scheduler_io_result(result, errno);
+}
+
+VALUE
+rb_io_buffer_pwrite(VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset)
+{
+ VALUE scheduler = rb_fiber_scheduler_current();
+ if (scheduler != Qnil) {
+ VALUE result = rb_fiber_scheduler_io_pwrite(scheduler, io, from, self, length, offset);
+
+ if (!UNDEF_P(result)) {
+ return result;
+ }
+ }
+
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ io_buffer_validate_range(buffer, offset, length);
+
+ int descriptor = rb_io_descriptor(io);
+
+ const void * base;
+ size_t size;
+ io_buffer_get_bytes_for_reading(buffer, &base, &size);
+
+ struct io_buffer_pwrite_internal_argument argument = {
+ .descriptor = descriptor,
+
+ // Move the base pointer to the offset:
+ .base = (unsigned char *)base + offset,
+
+ // And the size to the length of buffer we want to read:
+ .size = length,
+
+ // And the offset in the file we want to write from:
+ .offset = from,
+ };
+
+ return io_buffer_blocking_region(buffer, io_buffer_pwrite_internal, &argument, descriptor);
+}
+
+/*
+ * call-seq: pwrite(io, from, length, [offset]) -> written length or -errno
+ *
+ * Writes +length+ bytes from buffer into +io+, starting at
+ * +offset+ in the buffer. If an error occurs, return <tt>-errno</tt>.
+ *
+ * If +offset+ is not given, the bytes are taken from the beginning of the
+ * buffer. If the +offset+ is given and is beyond the end of the file, the
+ * gap will be filled with null (0 value) bytes.
+ *
+ * out = File.open('output.txt', File::RDWR) # open for read/write, no truncation
+ * IO::Buffer.for('1234567').pwrite(out, 2, 3, 1)
+ *
+ * This leads to +234+ (3 bytes, starting from position 1) being written into
+ * <tt>output.txt</tt>, starting from file position 2.
+ */
+static VALUE
+io_buffer_pwrite(int argc, VALUE *argv, VALUE self)
+{
+ rb_check_arity(argc, 2, 4);
+
+ VALUE io = argv[0];
+ rb_off_t from = NUM2OFFT(argv[1]);
+
+ size_t length, offset;
+ io_buffer_extract_length_offset(self, argc-2, argv+2, &length, &offset);
+
+ return rb_io_buffer_pwrite(self, io, from, length, offset);
+}
+
+static inline void
+io_buffer_check_mask(const struct rb_io_buffer *buffer)
+{
+ if (buffer->size == 0)
+ rb_raise(rb_eIOBufferMaskError, "Zero-length mask given!");
+}
+
+static void
+memory_and(unsigned char * restrict output, unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ output[offset] = base[offset] & mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source & mask -> io_buffer
+ *
+ * Generate a new buffer the same size as the source by applying the binary AND
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * IO::Buffer.for("1234567890") & IO::Buffer.for("\xFF\x00\x00\xFF")
+ * # =>
+ * # #<IO::Buffer 0x00005589b2758480+4 INTERNAL>
+ * # 0x00000000 31 00 00 34 35 00 00 38 39 00 1..45..89.
+ */
+static VALUE
+io_buffer_and(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+
+ VALUE output = rb_io_buffer_new(NULL, buffer->size, io_flags_for_size(buffer->size));
+ struct rb_io_buffer *output_buffer = NULL;
+ TypedData_Get_Struct(output, struct rb_io_buffer, &rb_io_buffer_type, output_buffer);
+
+ memory_and(output_buffer->base, buffer->base, buffer->size, mask_buffer->base, mask_buffer->size);
+
+ return output;
+}
+
+static void
+memory_or(unsigned char * restrict output, unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ output[offset] = base[offset] | mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source | mask -> io_buffer
+ *
+ * Generate a new buffer the same size as the source by applying the binary OR
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * IO::Buffer.for("1234567890") | IO::Buffer.for("\xFF\x00\x00\xFF")
+ * # =>
+ * # #<IO::Buffer 0x0000561785ae3480+10 INTERNAL>
+ * # 0x00000000 ff 32 33 ff ff 36 37 ff ff 30 .23..67..0
+ */
+static VALUE
+io_buffer_or(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+
+ VALUE output = rb_io_buffer_new(NULL, buffer->size, io_flags_for_size(buffer->size));
+ struct rb_io_buffer *output_buffer = NULL;
+ TypedData_Get_Struct(output, struct rb_io_buffer, &rb_io_buffer_type, output_buffer);
+
+ memory_or(output_buffer->base, buffer->base, buffer->size, mask_buffer->base, mask_buffer->size);
+
+ return output;
+}
+
+static void
+memory_xor(unsigned char * restrict output, unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ output[offset] = base[offset] ^ mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source ^ mask -> io_buffer
+ *
+ * Generate a new buffer the same size as the source by applying the binary XOR
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * IO::Buffer.for("1234567890") ^ IO::Buffer.for("\xFF\x00\x00\xFF")
+ * # =>
+ * # #<IO::Buffer 0x000055a2d5d10480+10 INTERNAL>
+ * # 0x00000000 ce 32 33 cb ca 36 37 c7 c6 30 .23..67..0
+ */
+static VALUE
+io_buffer_xor(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+
+ VALUE output = rb_io_buffer_new(NULL, buffer->size, io_flags_for_size(buffer->size));
+ struct rb_io_buffer *output_buffer = NULL;
+ TypedData_Get_Struct(output, struct rb_io_buffer, &rb_io_buffer_type, output_buffer);
+
+ memory_xor(output_buffer->base, buffer->base, buffer->size, mask_buffer->base, mask_buffer->size);
+
+ return output;
+}
+
+static void
+memory_not(unsigned char * restrict output, unsigned char * restrict base, size_t size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ output[offset] = ~base[offset];
+ }
+}
+
+/*
+ * call-seq:
+ * ~source -> io_buffer
+ *
+ * Generate a new buffer the same size as the source by applying the binary NOT
+ * operation to the source.
+ *
+ * ~IO::Buffer.for("1234567890")
+ * # =>
+ * # #<IO::Buffer 0x000055a5ac42f120+10 INTERNAL>
+ * # 0x00000000 ce cd cc cb ca c9 c8 c7 c6 cf ..........
+ */
+static VALUE
+io_buffer_not(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ VALUE output = rb_io_buffer_new(NULL, buffer->size, io_flags_for_size(buffer->size));
+ struct rb_io_buffer *output_buffer = NULL;
+ TypedData_Get_Struct(output, struct rb_io_buffer, &rb_io_buffer_type, output_buffer);
+
+ memory_not(output_buffer->base, buffer->base, buffer->size);
+
+ return output;
+}
+
+static inline int
+io_buffer_overlaps(const struct rb_io_buffer *a, const struct rb_io_buffer *b)
+{
+ if (a->base > b->base) {
+ return io_buffer_overlaps(b, a);
+ }
+
+ return (b->base >= a->base) && (b->base <= (void*)((unsigned char *)a->base + a->size));
+}
+
+static inline void
+io_buffer_check_overlaps(struct rb_io_buffer *a, struct rb_io_buffer *b)
+{
+ if (io_buffer_overlaps(a, b))
+ rb_raise(rb_eIOBufferMaskError, "Mask overlaps source buffer!");
+}
+
+static void
+memory_and_inplace(unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ base[offset] &= mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source.and!(mask) -> io_buffer
+ *
+ * Modify the source buffer in place by applying the binary AND
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * source = IO::Buffer.for("1234567890").dup # Make a read/write copy.
+ * # =>
+ * # #<IO::Buffer 0x000056307a0d0c20+10 INTERNAL>
+ * # 0x00000000 31 32 33 34 35 36 37 38 39 30 1234567890
+ *
+ * source.and!(IO::Buffer.for("\xFF\x00\x00\xFF"))
+ * # =>
+ * # #<IO::Buffer 0x000056307a0d0c20+10 INTERNAL>
+ * # 0x00000000 31 00 00 34 35 00 00 38 39 00 1..45..89.
+ */
+static VALUE
+io_buffer_and_inplace(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+ io_buffer_check_overlaps(buffer, mask_buffer);
+
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ memory_and_inplace(base, size, mask_buffer->base, mask_buffer->size);
+
+ return self;
+}
+
+static void
+memory_or_inplace(unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ base[offset] |= mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source.or!(mask) -> io_buffer
+ *
+ * Modify the source buffer in place by applying the binary OR
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * source = IO::Buffer.for("1234567890").dup # Make a read/write copy.
+ * # =>
+ * # #<IO::Buffer 0x000056307a272350+10 INTERNAL>
+ * # 0x00000000 31 32 33 34 35 36 37 38 39 30 1234567890
+ *
+ * source.or!(IO::Buffer.for("\xFF\x00\x00\xFF"))
+ * # =>
+ * # #<IO::Buffer 0x000056307a272350+10 INTERNAL>
+ * # 0x00000000 ff 32 33 ff ff 36 37 ff ff 30 .23..67..0
+ */
+static VALUE
+io_buffer_or_inplace(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+ io_buffer_check_overlaps(buffer, mask_buffer);
+
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ memory_or_inplace(base, size, mask_buffer->base, mask_buffer->size);
+
+ return self;
+}
+
+static void
+memory_xor_inplace(unsigned char * restrict base, size_t size, unsigned char * restrict mask, size_t mask_size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ base[offset] ^= mask[offset % mask_size];
+ }
+}
+
+/*
+ * call-seq:
+ * source.xor!(mask) -> io_buffer
+ *
+ * Modify the source buffer in place by applying the binary XOR
+ * operation to the source, using the mask, repeating as necessary.
+ *
+ * source = IO::Buffer.for("1234567890").dup # Make a read/write copy.
+ * # =>
+ * # #<IO::Buffer 0x000056307a25b3e0+10 INTERNAL>
+ * # 0x00000000 31 32 33 34 35 36 37 38 39 30 1234567890
+ *
+ * source.xor!(IO::Buffer.for("\xFF\x00\x00\xFF"))
+ * # =>
+ * # #<IO::Buffer 0x000056307a25b3e0+10 INTERNAL>
+ * # 0x00000000 ce 32 33 cb ca 36 37 c7 c6 30 .23..67..0
+ */
+static VALUE
+io_buffer_xor_inplace(VALUE self, VALUE mask)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ struct rb_io_buffer *mask_buffer = NULL;
+ TypedData_Get_Struct(mask, struct rb_io_buffer, &rb_io_buffer_type, mask_buffer);
+
+ io_buffer_check_mask(mask_buffer);
+ io_buffer_check_overlaps(buffer, mask_buffer);
+
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ memory_xor_inplace(base, size, mask_buffer->base, mask_buffer->size);
+
+ return self;
+}
+
+static void
+memory_not_inplace(unsigned char * restrict base, size_t size)
+{
+ for (size_t offset = 0; offset < size; offset += 1) {
+ base[offset] = ~base[offset];
+ }
+}
+
+/*
+ * call-seq:
+ * source.not! -> io_buffer
+ *
+ * Modify the source buffer in place by applying the binary NOT
+ * operation to the source.
+ *
+ * source = IO::Buffer.for("1234567890").dup # Make a read/write copy.
+ * # =>
+ * # #<IO::Buffer 0x000056307a33a450+10 INTERNAL>
+ * # 0x00000000 31 32 33 34 35 36 37 38 39 30 1234567890
+ *
+ * source.not!
+ * # =>
+ * # #<IO::Buffer 0x000056307a33a450+10 INTERNAL>
+ * # 0x00000000 ce cd cc cb ca c9 c8 c7 c6 cf ..........
+ */
+static VALUE
+io_buffer_not_inplace(VALUE self)
+{
+ struct rb_io_buffer *buffer = NULL;
+ TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, buffer);
+
+ void *base;
+ size_t size;
+ io_buffer_get_bytes_for_writing(buffer, &base, &size);
+
+ memory_not_inplace(base, size);
+
+ return self;
+}
+
+/*
+ * Document-class: IO::Buffer
+ *
+ * IO::Buffer is a low-level efficient buffer for input/output. There are three
+ * ways of using buffer:
+ *
+ * * Create an empty buffer with ::new, fill it with buffer using #copy or
+ * #set_value, #set_string, get buffer with #get_string;
+ * * Create a buffer mapped to some string with ::for, then it could be used
+ * both for reading with #get_string or #get_value, and writing (writing will
+ * change the source string, too);
+ * * Create a buffer mapped to some file with ::map, then it could be used for
+ * reading and writing the underlying file.
+ *
+ * Interaction with string and file memory is performed by efficient low-level
+ * C mechanisms like `memcpy`.
+ *
+ * The class is meant to be an utility for implementing more high-level mechanisms
+ * like Fiber::SchedulerInterface#io_read and Fiber::SchedulerInterface#io_write.
+ *
+ * <b>Examples of usage:</b>
+ *
+ * Empty buffer:
+ *
+ * buffer = IO::Buffer.new(8) # create empty 8-byte buffer
+ * # =>
+ * # #<IO::Buffer 0x0000555f5d1a5c50+8 INTERNAL>
+ * # ...
+ * buffer
+ * # =>
+ * # <IO::Buffer 0x0000555f5d156ab0+8 INTERNAL>
+ * # 0x00000000 00 00 00 00 00 00 00 00
+ * buffer.set_string('test', 2) # put there bytes of the "test" string, starting from offset 2
+ * # => 4
+ * buffer.get_string # get the result
+ * # => "\x00\x00test\x00\x00"
+ *
+ * \Buffer from string:
+ *
+ * string = 'buffer'
+ * buffer = IO::Buffer.for(string)
+ * # =>
+ * # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
+ * # ...
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
+ * # 0x00000000 64 61 74 61 buffer
+ *
+ * buffer.get_string(2) # read content starting from offset 2
+ * # => "ta"
+ * buffer.set_string('---', 1) # write content, starting from offset 1
+ * # => 3
+ * buffer
+ * # =>
+ * # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
+ * # 0x00000000 64 2d 2d 2d d---
+ * string # original string changed, too
+ * # => "d---"
+ *
+ * \Buffer from file:
+ *
+ * File.write('test.txt', 'test buffer')
+ * # => 9
+ * buffer = IO::Buffer.map(File.open('test.txt'))
+ * # =>
+ * # #<IO::Buffer 0x00007f3f0768c000+9 MAPPED IMMUTABLE>
+ * # ...
+ * buffer.get_string(5, 2) # read 2 bytes, starting from offset 5
+ * # => "da"
+ * buffer.set_string('---', 1) # attempt to write
+ * # in `set_string': Buffer is not writable! (IO::Buffer::AccessError)
+ *
+ * # To create writable file-mapped buffer
+ * # Open file for read-write, pass size, offset, and flags=0
+ * buffer = IO::Buffer.map(File.open('test.txt', 'r+'), 9, 0, 0)
+ * buffer.set_string('---', 1)
+ * # => 3 -- bytes written
+ * File.read('test.txt')
+ * # => "t--- buffer"
+ *
+ * <b>The class is experimental and the interface is subject to change.</b>
+ */
+void
+Init_IO_Buffer(void)
+{
+ rb_cIOBuffer = rb_define_class_under(rb_cIO, "Buffer", rb_cObject);
+ rb_eIOBufferLockedError = rb_define_class_under(rb_cIOBuffer, "LockedError", rb_eRuntimeError);
+ rb_eIOBufferAllocationError = rb_define_class_under(rb_cIOBuffer, "AllocationError", rb_eRuntimeError);
+ rb_eIOBufferAccessError = rb_define_class_under(rb_cIOBuffer, "AccessError", rb_eRuntimeError);
+ rb_eIOBufferInvalidatedError = rb_define_class_under(rb_cIOBuffer, "InvalidatedError", rb_eRuntimeError);
+ rb_eIOBufferMaskError = rb_define_class_under(rb_cIOBuffer, "MaskError", rb_eArgError);
+
+ rb_define_alloc_func(rb_cIOBuffer, rb_io_buffer_type_allocate);
+ rb_define_singleton_method(rb_cIOBuffer, "for", rb_io_buffer_type_for, 1);
+
+#ifdef _WIN32
+ SYSTEM_INFO info;
+ GetSystemInfo(&info);
+ RUBY_IO_BUFFER_PAGE_SIZE = info.dwPageSize;
+#else /* not WIN32 */
+ RUBY_IO_BUFFER_PAGE_SIZE = sysconf(_SC_PAGESIZE);
+#endif
+
+ RUBY_IO_BUFFER_DEFAULT_SIZE = io_buffer_default_size(RUBY_IO_BUFFER_PAGE_SIZE);
+
+ // Efficient sizing of mapped buffers:
+ rb_define_const(rb_cIOBuffer, "PAGE_SIZE", SIZET2NUM(RUBY_IO_BUFFER_PAGE_SIZE));
+ rb_define_const(rb_cIOBuffer, "DEFAULT_SIZE", SIZET2NUM(RUBY_IO_BUFFER_DEFAULT_SIZE));
+
+ rb_define_singleton_method(rb_cIOBuffer, "map", io_buffer_map, -1);
+
+ // General use:
+ rb_define_method(rb_cIOBuffer, "initialize", rb_io_buffer_initialize, -1);
+ rb_define_method(rb_cIOBuffer, "initialize_copy", rb_io_buffer_initialize_copy, 1);
+ rb_define_method(rb_cIOBuffer, "inspect", rb_io_buffer_inspect, 0);
+ rb_define_method(rb_cIOBuffer, "hexdump", rb_io_buffer_hexdump, 0);
+ rb_define_method(rb_cIOBuffer, "to_s", rb_io_buffer_to_s, 0);
+ rb_define_method(rb_cIOBuffer, "size", rb_io_buffer_size, 0);
+ rb_define_method(rb_cIOBuffer, "valid?", rb_io_buffer_valid_p, 0);
+
+ // Ownership:
+ rb_define_method(rb_cIOBuffer, "transfer", rb_io_buffer_transfer, 0);
+
+ // Flags:
+ rb_define_const(rb_cIOBuffer, "EXTERNAL", RB_INT2NUM(RB_IO_BUFFER_EXTERNAL));
+ rb_define_const(rb_cIOBuffer, "INTERNAL", RB_INT2NUM(RB_IO_BUFFER_INTERNAL));
+ rb_define_const(rb_cIOBuffer, "MAPPED", RB_INT2NUM(RB_IO_BUFFER_MAPPED));
+ rb_define_const(rb_cIOBuffer, "SHARED", RB_INT2NUM(RB_IO_BUFFER_SHARED));
+ rb_define_const(rb_cIOBuffer, "LOCKED", RB_INT2NUM(RB_IO_BUFFER_LOCKED));
+ rb_define_const(rb_cIOBuffer, "PRIVATE", RB_INT2NUM(RB_IO_BUFFER_PRIVATE));
+ rb_define_const(rb_cIOBuffer, "READONLY", RB_INT2NUM(RB_IO_BUFFER_READONLY));
+
+ // Endian:
+ rb_define_const(rb_cIOBuffer, "LITTLE_ENDIAN", RB_INT2NUM(RB_IO_BUFFER_LITTLE_ENDIAN));
+ rb_define_const(rb_cIOBuffer, "BIG_ENDIAN", RB_INT2NUM(RB_IO_BUFFER_BIG_ENDIAN));
+ rb_define_const(rb_cIOBuffer, "HOST_ENDIAN", RB_INT2NUM(RB_IO_BUFFER_HOST_ENDIAN));
+ rb_define_const(rb_cIOBuffer, "NETWORK_ENDIAN", RB_INT2NUM(RB_IO_BUFFER_NETWORK_ENDIAN));
+
+ rb_define_method(rb_cIOBuffer, "null?", rb_io_buffer_null_p, 0);
+ rb_define_method(rb_cIOBuffer, "empty?", rb_io_buffer_empty_p, 0);
+ rb_define_method(rb_cIOBuffer, "external?", rb_io_buffer_external_p, 0);
+ rb_define_method(rb_cIOBuffer, "internal?", rb_io_buffer_internal_p, 0);
+ rb_define_method(rb_cIOBuffer, "mapped?", rb_io_buffer_mapped_p, 0);
+ rb_define_method(rb_cIOBuffer, "shared?", rb_io_buffer_shared_p, 0);
+ rb_define_method(rb_cIOBuffer, "locked?", rb_io_buffer_locked_p, 0);
+ rb_define_method(rb_cIOBuffer, "readonly?", io_buffer_readonly_p, 0);
+
+ // Locking to prevent changes while using pointer:
+ // rb_define_method(rb_cIOBuffer, "lock", rb_io_buffer_lock, 0);
+ // rb_define_method(rb_cIOBuffer, "unlock", rb_io_buffer_unlock, 0);
+ rb_define_method(rb_cIOBuffer, "locked", rb_io_buffer_locked, 0);
+
+ // Manipulation:
+ rb_define_method(rb_cIOBuffer, "slice", io_buffer_slice, -1);
+ rb_define_method(rb_cIOBuffer, "<=>", rb_io_buffer_compare, 1);
+ rb_define_method(rb_cIOBuffer, "resize", io_buffer_resize, 1);
+ rb_define_method(rb_cIOBuffer, "clear", io_buffer_clear, -1);
+ rb_define_method(rb_cIOBuffer, "free", rb_io_buffer_free, 0);
+
+ rb_include_module(rb_cIOBuffer, rb_mComparable);
+
+#define IO_BUFFER_DEFINE_DATA_TYPE(name) RB_IO_BUFFER_DATA_TYPE_##name = rb_intern_const(#name)
+ IO_BUFFER_DEFINE_DATA_TYPE(U8);
+ IO_BUFFER_DEFINE_DATA_TYPE(S8);
+
+ IO_BUFFER_DEFINE_DATA_TYPE(u16);
+ IO_BUFFER_DEFINE_DATA_TYPE(U16);
+ IO_BUFFER_DEFINE_DATA_TYPE(s16);
+ IO_BUFFER_DEFINE_DATA_TYPE(S16);
+
+ IO_BUFFER_DEFINE_DATA_TYPE(u32);
+ IO_BUFFER_DEFINE_DATA_TYPE(U32);
+ IO_BUFFER_DEFINE_DATA_TYPE(s32);
+ IO_BUFFER_DEFINE_DATA_TYPE(S32);
+
+ IO_BUFFER_DEFINE_DATA_TYPE(u64);
+ IO_BUFFER_DEFINE_DATA_TYPE(U64);
+ IO_BUFFER_DEFINE_DATA_TYPE(s64);
+ IO_BUFFER_DEFINE_DATA_TYPE(S64);
+
+ IO_BUFFER_DEFINE_DATA_TYPE(f32);
+ IO_BUFFER_DEFINE_DATA_TYPE(F32);
+ IO_BUFFER_DEFINE_DATA_TYPE(f64);
+ IO_BUFFER_DEFINE_DATA_TYPE(F64);
+#undef IO_BUFFER_DEFINE_DATA_TYPE
+
+ rb_define_singleton_method(rb_cIOBuffer, "size_of", io_buffer_size_of, 1);
+
+ // Data access:
+ rb_define_method(rb_cIOBuffer, "get_value", io_buffer_get_value, 2);
+ rb_define_method(rb_cIOBuffer, "get_values", io_buffer_get_values, 2);
+ rb_define_method(rb_cIOBuffer, "each", io_buffer_each, -1);
+ rb_define_method(rb_cIOBuffer, "values", io_buffer_values, -1);
+ rb_define_method(rb_cIOBuffer, "each_byte", io_buffer_each_byte, -1);
+ rb_define_method(rb_cIOBuffer, "set_value", io_buffer_set_value, 3);
+ rb_define_method(rb_cIOBuffer, "set_values", io_buffer_set_values, 3);
+
+ rb_define_method(rb_cIOBuffer, "copy", io_buffer_copy, -1);
+
+ rb_define_method(rb_cIOBuffer, "get_string", io_buffer_get_string, -1);
+ rb_define_method(rb_cIOBuffer, "set_string", io_buffer_set_string, -1);
+
+ // Binary buffer manipulations:
+ rb_define_method(rb_cIOBuffer, "&", io_buffer_and, 1);
+ rb_define_method(rb_cIOBuffer, "|", io_buffer_or, 1);
+ rb_define_method(rb_cIOBuffer, "^", io_buffer_xor, 1);
+ rb_define_method(rb_cIOBuffer, "~", io_buffer_not, 0);
+
+ rb_define_method(rb_cIOBuffer, "and!", io_buffer_and_inplace, 1);
+ rb_define_method(rb_cIOBuffer, "or!", io_buffer_or_inplace, 1);
+ rb_define_method(rb_cIOBuffer, "xor!", io_buffer_xor_inplace, 1);
+ rb_define_method(rb_cIOBuffer, "not!", io_buffer_not_inplace, 0);
+
+ // IO operations:
+ rb_define_method(rb_cIOBuffer, "read", io_buffer_read, -1);
+ rb_define_method(rb_cIOBuffer, "pread", io_buffer_pread, -1);
+ rb_define_method(rb_cIOBuffer, "write", io_buffer_write, -1);
+ rb_define_method(rb_cIOBuffer, "pwrite", io_buffer_pwrite, -1);
+}
diff --git a/iseq.c b/iseq.c
index cbf62176bd..d17ce486c5 100644
--- a/iseq.c
+++ b/iseq.c
@@ -9,25 +9,40 @@
**********************************************************************/
-#include "internal.h"
-#include "ruby/util.h"
-#include "eval_intern.h"
+#define RUBY_VM_INSNS_INFO 1
+/* #define RUBY_MARK_FREE_DEBUG 1 */
+
+#include "ruby/internal/config.h"
#ifdef HAVE_DLADDR
# include <dlfcn.h>
#endif
-#define RUBY_VM_INSNS_INFO 1
-/* #define RUBY_MARK_FREE_DEBUG 1 */
+#include "eval_intern.h"
#include "gc.h"
-#include "vm_core.h"
-#include "iseq.h"
#include "id_table.h"
+#include "internal.h"
+#include "internal/bits.h"
+#include "internal/class.h"
+#include "internal/compile.h"
+#include "internal/error.h"
+#include "internal/file.h"
+#include "internal/hash.h"
+#include "internal/parse.h"
+#include "internal/sanitizers.h"
+#include "internal/symbol.h"
+#include "internal/thread.h"
+#include "internal/variable.h"
+#include "iseq.h"
+#include "mjit.h"
+#include "ruby/util.h"
+#include "vm_core.h"
+#include "vm_callinfo.h"
+#include "yjit.h"
+#include "ruby/ractor.h"
#include "builtin.h"
-
#include "insns.inc"
#include "insns_info.inc"
-#include "mjit.h"
VALUE rb_cISeq;
static VALUE iseqw_new(const rb_iseq_t *iseq);
@@ -45,17 +60,19 @@ static inline VALUE
obj_resurrect(VALUE obj)
{
if (hidden_obj_p(obj)) {
- switch (BUILTIN_TYPE(obj)) {
- case T_STRING:
- obj = rb_str_resurrect(obj);
- break;
- case T_ARRAY:
- obj = rb_ary_resurrect(obj);
- break;
+ switch (BUILTIN_TYPE(obj)) {
+ case T_STRING:
+ obj = rb_str_resurrect(obj);
+ break;
+ case T_ARRAY:
+ obj = rb_ary_resurrect(obj);
+ break;
case T_HASH:
obj = rb_hash_resurrect(obj);
break;
- }
+ default:
+ break;
+ }
}
return obj;
}
@@ -76,12 +93,68 @@ static void
compile_data_free(struct iseq_compile_data *compile_data)
{
if (compile_data) {
- free_arena(compile_data->node.storage_head);
- free_arena(compile_data->insn.storage_head);
- if (compile_data->ivar_cache_table) {
- rb_id_table_free(compile_data->ivar_cache_table);
- }
- ruby_xfree(compile_data);
+ free_arena(compile_data->node.storage_head);
+ free_arena(compile_data->insn.storage_head);
+ if (compile_data->ivar_cache_table) {
+ rb_id_table_free(compile_data->ivar_cache_table);
+ }
+ ruby_xfree(compile_data);
+ }
+}
+
+static void
+remove_from_constant_cache(ID id, IC ic)
+{
+ rb_vm_t *vm = GET_VM();
+ VALUE lookup_result;
+ st_data_t ic_data = (st_data_t)ic;
+
+ if (rb_id_table_lookup(vm->constant_cache, id, &lookup_result)) {
+ st_table *ics = (st_table *)lookup_result;
+ st_delete(ics, &ic_data, NULL);
+
+ if (ics->num_entries == 0 &&
+ // See comment in vm_track_constant_cache on why we need this check
+ id != vm->inserting_constant_cache_id) {
+ rb_id_table_delete(vm->constant_cache, id);
+ st_free_table(ics);
+ }
+ }
+}
+
+// When an ISEQ is being freed, all of its associated ICs are going to go away
+// as well. Because of this, we need to iterate over the ICs, and clear them
+// from the VM's constant cache.
+static void
+iseq_clear_ic_references(const rb_iseq_t *iseq)
+{
+ // In some cases (when there is a compilation error), we end up with
+ // ic_size greater than 0, but no allocated is_entries buffer.
+ // If there's no is_entries buffer to loop through, return early.
+ // [Bug #19173]
+ if (!ISEQ_BODY(iseq)->is_entries) {
+ return;
+ }
+
+ for (unsigned int ic_idx = 0; ic_idx < ISEQ_BODY(iseq)->ic_size; ic_idx++) {
+ IC ic = &ISEQ_IS_IC_ENTRY(ISEQ_BODY(iseq), ic_idx);
+
+ // Iterate over the IC's constant path's segments and clean any references to
+ // the ICs out of the VM's constant cache table.
+ const ID *segments = ic->segments;
+
+ // It's possible that segments is NULL if we overallocated an IC but
+ // optimizations removed the instruction using it
+ if (segments == NULL)
+ continue;
+
+ for (int i = 0; segments[i]; i++) {
+ ID id = segments[i];
+ if (id == idNULL) continue;
+ remove_from_constant_cache(id, ic);
+ }
+
+ ruby_xfree((void *)segments);
}
}
@@ -90,37 +163,43 @@ rb_iseq_free(const rb_iseq_t *iseq)
{
RUBY_FREE_ENTER("iseq");
- if (iseq && iseq->body) {
- struct rb_iseq_constant_body *const body = iseq->body;
- mjit_free_iseq(iseq); /* Notify MJIT */
- ruby_xfree((void *)body->iseq_encoded);
- ruby_xfree((void *)body->insns_info.body);
- if (body->insns_info.positions) ruby_xfree((void *)body->insns_info.positions);
+ if (iseq && ISEQ_BODY(iseq)) {
+ iseq_clear_ic_references(iseq);
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
+ mjit_free_iseq(iseq); /* Notify MJIT */
+#if USE_YJIT
+ rb_yjit_iseq_free(body->yjit_payload);
+#endif
+ ruby_xfree((void *)body->iseq_encoded);
+ ruby_xfree((void *)body->insns_info.body);
+ if (body->insns_info.positions) ruby_xfree((void *)body->insns_info.positions);
#if VM_INSN_INFO_TABLE_IMPL == 2
- if (body->insns_info.succ_index_table) ruby_xfree(body->insns_info.succ_index_table);
+ if (body->insns_info.succ_index_table) ruby_xfree(body->insns_info.succ_index_table);
#endif
if (LIKELY(body->local_table != rb_iseq_shared_exc_local_tbl))
ruby_xfree((void *)body->local_table);
- ruby_xfree((void *)body->is_entries);
+ ruby_xfree((void *)body->is_entries);
if (body->call_data) {
- unsigned int i;
- struct rb_kwarg_call_data *kw_calls = (struct rb_kwarg_call_data *)&body->call_data[body->ci_size];
- for (i=0; i<body->ci_kw_size; i++) {
- const struct rb_call_info_kw_arg *kw_arg = kw_calls[i].ci_kw.kw_arg;
- ruby_xfree((void *)kw_arg);
- }
ruby_xfree(body->call_data);
- }
- ruby_xfree((void *)body->catch_table);
- ruby_xfree((void *)body->param.opt_table);
+ }
+ ruby_xfree((void *)body->catch_table);
+ ruby_xfree((void *)body->param.opt_table);
+ if (ISEQ_MBITS_BUFLEN(body->iseq_size) > 1 && body->mark_bits.list) {
+ ruby_xfree((void *)body->mark_bits.list);
+ }
- if (body->param.keyword != NULL) {
- ruby_xfree((void *)body->param.keyword->default_values);
- ruby_xfree((void *)body->param.keyword);
- }
- compile_data_free(ISEQ_COMPILE_DATA(iseq));
- ruby_xfree(body);
+ ruby_xfree(body->variable.original_iseq);
+
+ if (body->param.keyword != NULL) {
+ if (body->param.keyword->table != &body->local_table[body->param.keyword->bits_start - body->param.keyword->num])
+ ruby_xfree((void *)body->param.keyword->table);
+ ruby_xfree((void *)body->param.keyword->default_values);
+ ruby_xfree((void *)body->param.keyword);
+ }
+ compile_data_free(ISEQ_COMPILE_DATA(iseq));
+ if (body->outer_variables) rb_id_table_free(body->outer_variables);
+ ruby_xfree(body);
}
if (iseq && ISEQ_EXECUTABLE_P(iseq) && iseq->aux.exec.local_hooks) {
@@ -130,64 +209,27 @@ rb_iseq_free(const rb_iseq_t *iseq)
RUBY_FREE_LEAVE("iseq");
}
-#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
-static VALUE
-rb_vm_insn_addr2insn2(const void *addr)
-{
- return (VALUE)rb_vm_insn_addr2insn(addr);
-}
-#endif
-
-static VALUE
-rb_vm_insn_null_translator(const void *addr)
-{
- return (VALUE)addr;
-}
-
typedef VALUE iseq_value_itr_t(void *ctx, VALUE obj);
-typedef VALUE rb_vm_insns_translator_t(const void *addr);
-
-static int
-iseq_extract_values(VALUE *code, size_t pos, iseq_value_itr_t * func, void *data, rb_vm_insns_translator_t * translator)
-{
- VALUE insn = translator((void *)code[pos]);
- int len = insn_len(insn);
- int op_no;
- const char *types = insn_op_types(insn);
- for (op_no = 0; types[op_no]; op_no++) {
- char type = types[op_no];
- switch (type) {
- case TS_CDHASH:
- case TS_ISEQ:
- case TS_VALUE:
- {
- VALUE op = code[pos + op_no + 1];
- if (!SPECIAL_CONST_P(op)) {
- VALUE newop = func(data, op);
- if (newop != op) {
- code[pos + op_no + 1] = newop;
- }
- }
- }
- break;
- case TS_ISE:
- {
- union iseq_inline_storage_entry *const is = (union iseq_inline_storage_entry *)code[pos + op_no + 1];
- if (is->once.value) {
- VALUE nv = func(data, is->once.value);
- if (is->once.value != nv) {
- is->once.value = nv;
- }
- }
+static inline void
+iseq_scan_bits(unsigned int page, iseq_bits_t bits, VALUE *code, iseq_value_itr_t *func, void *data)
+{
+ unsigned int offset;
+ unsigned int page_offset = (page * ISEQ_MBITS_BITLENGTH);
+
+ while (bits) {
+ offset = ntz_intptr(bits);
+ VALUE op = code[page_offset + offset];
+ VALUE newop = func(data, op);
+ if (newop != op) {
+ code[page_offset + offset] = newop;
+ if (data) {
+ VALUE *original_iseq = (VALUE *)data;
+ original_iseq[page_offset + offset] = newop;
}
- break;
- default:
- break;
- }
+ }
+ bits &= bits - 1; // Reset Lowest Set Bit (BLSR)
}
-
- return len;
}
static void
@@ -195,19 +237,66 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data)
{
unsigned int size;
VALUE *code;
- size_t n;
- rb_vm_insns_translator_t *const translator =
-#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
- (FL_TEST(iseq, ISEQ_TRANSLATED)) ? rb_vm_insn_addr2insn2 :
-#endif
- rb_vm_insn_null_translator;
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
size = body->iseq_size;
code = body->iseq_encoded;
- for (n = 0; n < size;) {
- n += iseq_extract_values(code, n, func, data, translator);
+ union iseq_inline_storage_entry *is_entries = body->is_entries;
+
+ if (body->is_entries) {
+ // Skip iterating over ivc caches
+ is_entries += body->ivc_size;
+
+ // ICVARC entries
+ for (unsigned int i = 0; i < body->icvarc_size; i++, is_entries++) {
+ ICVARC icvarc = (ICVARC)is_entries;
+ if (icvarc->entry) {
+ RUBY_ASSERT(!RB_TYPE_P(icvarc->entry->class_value, T_NONE));
+
+ VALUE nv = func(data, icvarc->entry->class_value);
+ if (icvarc->entry->class_value != nv) {
+ icvarc->entry->class_value = nv;
+ }
+ }
+ }
+
+ // ISE entries
+ for (unsigned int i = 0; i < body->ise_size; i++, is_entries++) {
+ union iseq_inline_storage_entry *const is = (union iseq_inline_storage_entry *)is_entries;
+ if (is->once.value) {
+ VALUE nv = func(data, is->once.value);
+ if (is->once.value != nv) {
+ is->once.value = nv;
+ }
+ }
+ }
+
+ // IC Entries
+ for (unsigned int i = 0; i < body->ic_size; i++, is_entries++) {
+ IC ic = (IC)is_entries;
+ if (ic->entry) {
+ VALUE nv = func(data, (VALUE)ic->entry);
+ if ((VALUE)ic->entry != nv) {
+ ic->entry = (void *)nv;
+ }
+ }
+ }
+ }
+
+ // Embedded VALUEs
+ if (body->mark_bits.list) {
+ if (ISEQ_MBITS_BUFLEN(size) == 1) {
+ iseq_scan_bits(0, body->mark_bits.single, code, func, data);
+ }
+ else {
+ if (body->mark_bits.list) {
+ for (unsigned int i = 0; i < ISEQ_MBITS_BUFLEN(size); i++) {
+ iseq_bits_t bits = body->mark_bits.list[i];
+ iseq_scan_bits(i, bits, code, func, data);
+ }
+ }
+ }
}
}
@@ -220,11 +309,12 @@ update_each_insn_value(void *ctx, VALUE obj)
void
rb_iseq_update_references(rb_iseq_t *iseq)
{
- if (iseq->body) {
- struct rb_iseq_constant_body *body = iseq->body;
+ if (ISEQ_BODY(iseq)) {
+ struct rb_iseq_constant_body *body = ISEQ_BODY(iseq);
body->variable.coverage = rb_gc_location(body->variable.coverage);
body->variable.pc2branchindex = rb_gc_location(body->variable.pc2branchindex);
+ body->variable.script_lines = rb_gc_location(body->variable.script_lines);
body->location.label = rb_gc_location(body->location.label);
body->location.base_label = rb_gc_location(body->location.base_label);
body->location.pathobj = rb_gc_location(body->location.pathobj);
@@ -234,17 +324,20 @@ rb_iseq_update_references(rb_iseq_t *iseq)
if (body->parent_iseq) {
body->parent_iseq = (struct rb_iseq_struct *)rb_gc_location((VALUE)body->parent_iseq);
}
- if (FL_TEST(iseq, ISEQ_MARKABLE_ISEQ)) {
- rb_iseq_each_value(iseq, update_each_insn_value, NULL);
- VALUE *original_iseq = ISEQ_ORIGINAL_ISEQ(iseq);
- if (original_iseq) {
- size_t n = 0;
- const unsigned int size = body->iseq_size;
- while (n < size) {
- n += iseq_extract_values(original_iseq, n, update_each_insn_value, NULL, rb_vm_insn_null_translator);
+ if (body->mandatory_only_iseq) {
+ body->mandatory_only_iseq = (struct rb_iseq_struct *)rb_gc_location((VALUE)body->mandatory_only_iseq);
+ }
+ if (body->call_data) {
+ for (unsigned int i=0; i<body->ci_size; i++) {
+ struct rb_call_data *cds = body->call_data;
+ if (!SPECIAL_CONST_P((VALUE)cds[i].ci)) {
+ cds[i].ci = (struct rb_callinfo *)rb_gc_location((VALUE)cds[i].ci);
}
+ cds[i].cc = (struct rb_callcache *)rb_gc_location((VALUE)cds[i].cc);
}
}
+ VALUE *original_iseq = ISEQ_ORIGINAL_ISEQ(iseq);
+ rb_iseq_each_value(iseq, update_each_insn_value, (void *)original_iseq);
if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
int i, j;
@@ -253,7 +346,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
for (j = 0; i < body->param.keyword->num; i++, j++) {
VALUE obj = body->param.keyword->default_values[j];
- if (obj != Qundef) {
+ if (!UNDEF_P(obj)) {
body->param.keyword->default_values[j] = rb_gc_location(obj);
}
}
@@ -273,6 +366,9 @@ rb_iseq_update_references(rb_iseq_t *iseq)
#if USE_MJIT
mjit_update_references(iseq);
#endif
+#if USE_YJIT
+ rb_yjit_iseq_update_references(body->yjit_payload);
+#endif
}
}
@@ -290,52 +386,84 @@ rb_iseq_mark(const rb_iseq_t *iseq)
RUBY_MARK_UNLESS_NULL(iseq->wrapper);
- if (iseq->body) {
- const struct rb_iseq_constant_body *const body = iseq->body;
+ if (ISEQ_BODY(iseq)) {
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
- if (FL_TEST(iseq, ISEQ_MARKABLE_ISEQ)) {
- rb_iseq_each_value(iseq, each_insn_value, NULL);
- }
+ rb_iseq_each_value(iseq, each_insn_value, NULL);
rb_gc_mark_movable(body->variable.coverage);
rb_gc_mark_movable(body->variable.pc2branchindex);
+ rb_gc_mark_movable(body->variable.script_lines);
rb_gc_mark_movable(body->location.label);
rb_gc_mark_movable(body->location.base_label);
rb_gc_mark_movable(body->location.pathobj);
- RUBY_MARK_NO_PIN_UNLESS_NULL((VALUE)body->parent_iseq);
+ RUBY_MARK_MOVABLE_UNLESS_NULL((VALUE)body->mandatory_only_iseq);
+ RUBY_MARK_MOVABLE_UNLESS_NULL((VALUE)body->parent_iseq);
+
+ if (body->call_data) {
+ struct rb_call_data *cds = (struct rb_call_data *)body->call_data;
+ for (unsigned int i=0; i<body->ci_size; i++) {
+ const struct rb_callinfo *ci = cds[i].ci;
+ const struct rb_callcache *cc = cds[i].cc;
- if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
- const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
- int i, j;
+ if (vm_ci_markable(ci)) {
+ rb_gc_mark_movable((VALUE)ci);
+ }
- i = keyword->required_num;
+ if (cc) {
+ VM_ASSERT((cc->flags & VM_CALLCACHE_ON_STACK) == 0);
- for (j = 0; i < keyword->num; i++, j++) {
- VALUE obj = keyword->default_values[j];
- if (!SPECIAL_CONST_P(obj)) {
+ if (vm_cc_markable(cc)) {
+ if (!vm_cc_invalidated_p(cc)) {
+ rb_gc_mark_movable((VALUE)cc);
+ }
+ else {
+ cds[i].cc = rb_vm_empty_cc();
+ }
+ }
+ }
+ }
+ }
+
+ if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
+ const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
+ int i, j;
+
+ i = keyword->required_num;
+
+ for (j = 0; i < keyword->num; i++, j++) {
+ VALUE obj = keyword->default_values[j];
+ if (!SPECIAL_CONST_P(obj)) {
rb_gc_mark_movable(obj);
- }
- }
- }
-
- if (body->catch_table) {
- const struct iseq_catch_table *table = body->catch_table;
- unsigned int i;
- for (i = 0; i < table->size; i++) {
- const struct iseq_catch_table_entry *entry;
- entry = UNALIGNED_MEMBER_PTR(table, entries[i]);
- if (entry->iseq) {
+ }
+ }
+ }
+
+ if (body->catch_table) {
+ const struct iseq_catch_table *table = body->catch_table;
+ unsigned int i;
+ for (i = 0; i < table->size; i++) {
+ const struct iseq_catch_table_entry *entry;
+ entry = UNALIGNED_MEMBER_PTR(table, entries[i]);
+ if (entry->iseq) {
rb_gc_mark_movable((VALUE)entry->iseq);
- }
- }
- }
+ }
+ }
+ }
+
+#if USE_MJIT
+ mjit_mark_cc_entries(body);
+#endif
+#if USE_YJIT
+ rb_yjit_iseq_mark(body->yjit_payload);
+#endif
}
- if (FL_TEST_RAW(iseq, ISEQ_NOT_LOADED_YET)) {
- rb_gc_mark(iseq->aux.loader.obj);
+ if (FL_TEST_RAW((VALUE)iseq, ISEQ_NOT_LOADED_YET)) {
+ rb_gc_mark(iseq->aux.loader.obj);
}
- else if (FL_TEST_RAW(iseq, ISEQ_USE_COMPILE_DATA)) {
- const struct iseq_compile_data *const compile_data = ISEQ_COMPILE_DATA(iseq);
+ else if (FL_TEST_RAW((VALUE)iseq, ISEQ_USE_COMPILE_DATA)) {
+ const struct iseq_compile_data *const compile_data = ISEQ_COMPILE_DATA(iseq);
rb_iseq_mark_insn_storage(compile_data->insn.storage_head);
@@ -373,18 +501,17 @@ size_t
rb_iseq_memsize(const rb_iseq_t *iseq)
{
size_t size = 0; /* struct already counted as RVALUE size */
- const struct rb_iseq_constant_body *body = iseq->body;
+ const struct rb_iseq_constant_body *body = ISEQ_BODY(iseq);
const struct iseq_compile_data *compile_data;
/* TODO: should we count original_iseq? */
if (ISEQ_EXECUTABLE_P(iseq) && body) {
- struct rb_kwarg_call_data *kw_calls = (struct rb_kwarg_call_data *)&body->call_data[body->ci_size];
-
size += sizeof(struct rb_iseq_constant_body);
size += body->iseq_size * sizeof(VALUE);
size += body->insns_info.size * (sizeof(struct iseq_insn_info_entry) + sizeof(unsigned int));
size += body->local_table_size * sizeof(ID);
+ size += ISEQ_MBITS_BUFLEN(body->iseq_size) * ISEQ_MBITS_SIZE;
if (body->catch_table) {
size += iseq_catch_table_bytes(body->catch_table->size);
}
@@ -392,49 +519,47 @@ rb_iseq_memsize(const rb_iseq_t *iseq)
size += param_keyword_size(body->param.keyword);
/* body->is_entries */
- size += body->is_size * sizeof(union iseq_inline_storage_entry);
-
- /* body->call_data */
- size += body->ci_size * sizeof(struct rb_call_data);
- size += body->ci_kw_size * sizeof(struct rb_kwarg_call_data);
-
- if (kw_calls) {
- unsigned int i;
-
- for (i = 0; i < body->ci_kw_size; i++) {
- const struct rb_call_info_kw_arg *kw_arg = kw_calls[i].ci_kw.kw_arg;
-
- if (kw_arg) {
- size += rb_call_info_kw_arg_bytes(kw_arg->keyword_len);
+ size += ISEQ_IS_SIZE(body) * sizeof(union iseq_inline_storage_entry);
+
+ if (ISEQ_BODY(iseq)->is_entries) {
+ /* IC entries constant segments */
+ for (unsigned int ic_idx = 0; ic_idx < body->ic_size; ic_idx++) {
+ IC ic = &ISEQ_IS_IC_ENTRY(body, ic_idx);
+ const ID *ids = ic->segments;
+ if (!ids) continue;
+ while (*ids++) {
+ size += sizeof(ID);
}
+ size += sizeof(ID); // null terminator
}
}
+
+ /* body->call_data */
+ size += body->ci_size * sizeof(struct rb_call_data);
+ // TODO: should we count imemo_callinfo?
}
compile_data = ISEQ_COMPILE_DATA(iseq);
if (compile_data) {
- struct iseq_compile_data_storage *cur;
+ struct iseq_compile_data_storage *cur;
- size += sizeof(struct iseq_compile_data);
+ size += sizeof(struct iseq_compile_data);
- cur = compile_data->node.storage_head;
- while (cur) {
- size += cur->size + offsetof(struct iseq_compile_data_storage, buff);
- cur = cur->next;
- }
+ cur = compile_data->node.storage_head;
+ while (cur) {
+ size += cur->size + offsetof(struct iseq_compile_data_storage, buff);
+ cur = cur->next;
+ }
}
return size;
}
-static uintptr_t fresh_iseq_unique_id = 0; /* -- Remove In 3.0 -- */
-
struct rb_iseq_constant_body *
rb_iseq_constant_body_alloc(void)
{
struct rb_iseq_constant_body *iseq_body;
iseq_body = ZALLOC(struct rb_iseq_constant_body);
- iseq_body->iseq_unique_id = fresh_iseq_unique_id++; /* -- Remove In 3.0 -- */
return iseq_body;
}
@@ -442,7 +567,7 @@ static rb_iseq_t *
iseq_alloc(void)
{
rb_iseq_t *iseq = iseq_imemo_alloc();
- iseq->body = rb_iseq_constant_body_alloc();
+ ISEQ_BODY(iseq) = rb_iseq_constant_body_alloc();
return iseq;
}
@@ -451,16 +576,16 @@ rb_iseq_pathobj_new(VALUE path, VALUE realpath)
{
VALUE pathobj;
VM_ASSERT(RB_TYPE_P(path, T_STRING));
- VM_ASSERT(realpath == Qnil || RB_TYPE_P(realpath, T_STRING));
+ VM_ASSERT(NIL_P(realpath) || RB_TYPE_P(realpath, T_STRING));
if (path == realpath ||
- (!NIL_P(realpath) && rb_str_cmp(path, realpath) == 0)) {
- pathobj = rb_fstring(path);
+ (!NIL_P(realpath) && rb_str_cmp(path, realpath) == 0)) {
+ pathobj = rb_fstring(path);
}
else {
- if (!NIL_P(realpath)) realpath = rb_fstring(realpath);
- pathobj = rb_ary_new_from_args(2, rb_fstring(path), realpath);
- rb_obj_freeze(pathobj);
+ if (!NIL_P(realpath)) realpath = rb_fstring(realpath);
+ pathobj = rb_ary_new_from_args(2, rb_fstring(path), realpath);
+ rb_obj_freeze(pathobj);
}
return pathobj;
}
@@ -468,14 +593,27 @@ rb_iseq_pathobj_new(VALUE path, VALUE realpath)
void
rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath)
{
- RB_OBJ_WRITE(iseq, &iseq->body->location.pathobj,
- rb_iseq_pathobj_new(path, realpath));
+ RB_OBJ_WRITE(iseq, &ISEQ_BODY(iseq)->location.pathobj,
+ rb_iseq_pathobj_new(path, realpath));
+}
+
+// Make a dummy iseq for a dummy frame that exposes a path for profilers to inspect
+rb_iseq_t *
+rb_iseq_alloc_with_dummy_path(VALUE fname)
+{
+ rb_iseq_t *dummy_iseq = iseq_alloc();
+
+ ISEQ_BODY(dummy_iseq)->type = ISEQ_TYPE_TOP;
+ RB_OBJ_WRITE(dummy_iseq, &ISEQ_BODY(dummy_iseq)->location.pathobj, fname);
+ RB_OBJ_WRITE(dummy_iseq, &ISEQ_BODY(dummy_iseq)->location.label, fname);
+
+ return dummy_iseq;
}
static rb_iseq_location_t *
-iseq_location_setup(rb_iseq_t *iseq, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_code_location_t *code_location, const int node_id)
+iseq_location_setup(rb_iseq_t *iseq, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_code_location_t *code_location, const int node_id)
{
- rb_iseq_location_t *loc = &iseq->body->location;
+ rb_iseq_location_t *loc = &ISEQ_BODY(iseq)->location;
rb_iseq_pathobj_set(iseq, path, realpath);
RB_OBJ_WRITE(iseq, &loc->label, name);
@@ -483,13 +621,13 @@ iseq_location_setup(rb_iseq_t *iseq, VALUE name, VALUE path, VALUE realpath, VAL
loc->first_lineno = first_lineno;
if (code_location) {
loc->node_id = node_id;
- loc->code_location = *code_location;
+ loc->code_location = *code_location;
}
else {
- loc->code_location.beg_pos.lineno = 0;
- loc->code_location.beg_pos.column = 0;
- loc->code_location.end_pos.lineno = -1;
- loc->code_location.end_pos.column = -1;
+ loc->code_location.beg_pos.lineno = 0;
+ loc->code_location.beg_pos.column = 0;
+ loc->code_location.end_pos.lineno = -1;
+ loc->code_location.end_pos.column = -1;
}
return loc;
@@ -498,26 +636,26 @@ iseq_location_setup(rb_iseq_t *iseq, VALUE name, VALUE path, VALUE realpath, VAL
static void
set_relation(rb_iseq_t *iseq, const rb_iseq_t *piseq)
{
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const VALUE type = body->type;
/* set class nest stack */
if (type == ISEQ_TYPE_TOP) {
- body->local_iseq = iseq;
+ body->local_iseq = iseq;
}
else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) {
- body->local_iseq = iseq;
+ body->local_iseq = iseq;
}
else if (piseq) {
- body->local_iseq = piseq->body->local_iseq;
+ body->local_iseq = ISEQ_BODY(piseq)->local_iseq;
}
if (piseq) {
- body->parent_iseq = piseq;
+ body->parent_iseq = piseq;
}
if (type == ISEQ_TYPE_MAIN) {
- body->local_iseq = iseq;
+ body->local_iseq = iseq;
}
}
@@ -538,16 +676,16 @@ new_arena(void)
static VALUE
prepare_iseq_build(rb_iseq_t *iseq,
- VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_code_location_t *code_location, const int node_id,
- const rb_iseq_t *parent, enum iseq_type type,
- const rb_compile_option_t *option)
+ VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_code_location_t *code_location, const int node_id,
+ const rb_iseq_t *parent, int isolated_depth, enum rb_iseq_type type,
+ VALUE script_lines, const rb_compile_option_t *option)
{
VALUE coverage = Qfalse;
VALUE err_info = Qnil;
- struct rb_iseq_constant_body *const body = iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
if (parent && (type == ISEQ_TYPE_MAIN || type == ISEQ_TYPE_TOP))
- err_info = Qfalse;
+ err_info = Qfalse;
body->type = type;
set_relation(iseq, parent);
@@ -555,34 +693,40 @@ prepare_iseq_build(rb_iseq_t *iseq,
name = rb_fstring(name);
iseq_location_setup(iseq, name, path, realpath, first_lineno, code_location, node_id);
if (iseq != body->local_iseq) {
- RB_OBJ_WRITE(iseq, &body->location.base_label, body->local_iseq->body->location.label);
+ RB_OBJ_WRITE(iseq, &body->location.base_label, ISEQ_BODY(body->local_iseq)->location.label);
}
ISEQ_COVERAGE_SET(iseq, Qnil);
ISEQ_ORIGINAL_ISEQ_CLEAR(iseq);
body->variable.flip_count = 0;
+ if (NIL_P(script_lines)) {
+ RB_OBJ_WRITE(iseq, &body->variable.script_lines, Qnil);
+ }
+ else {
+ RB_OBJ_WRITE(iseq, &body->variable.script_lines, rb_ractor_make_shareable(script_lines));
+ }
+
ISEQ_COMPILE_DATA_ALLOC(iseq);
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err_info);
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, Qnil);
ISEQ_COMPILE_DATA(iseq)->node.storage_head = ISEQ_COMPILE_DATA(iseq)->node.storage_current = new_arena();
ISEQ_COMPILE_DATA(iseq)->insn.storage_head = ISEQ_COMPILE_DATA(iseq)->insn.storage_current = new_arena();
+ ISEQ_COMPILE_DATA(iseq)->isolated_depth = isolated_depth;
ISEQ_COMPILE_DATA(iseq)->option = option;
-
ISEQ_COMPILE_DATA(iseq)->ivar_cache_table = NULL;
-
ISEQ_COMPILE_DATA(iseq)->builtin_function_table = GET_VM()->builtin_function_table;
if (option->coverage_enabled) {
- VALUE coverages = rb_get_coverages();
- if (RTEST(coverages)) {
- coverage = rb_hash_lookup(coverages, rb_iseq_path(iseq));
- if (NIL_P(coverage)) coverage = Qfalse;
- }
+ VALUE coverages = rb_get_coverages();
+ if (RTEST(coverages)) {
+ coverage = rb_hash_lookup(coverages, rb_iseq_path(iseq));
+ if (NIL_P(coverage)) coverage = Qfalse;
+ }
}
ISEQ_COVERAGE_SET(iseq, coverage);
if (coverage && ISEQ_BRANCH_COVERAGE(iseq))
- ISEQ_PC2BRANCHINDEX_SET(iseq, rb_ary_tmp_new(0));
+ ISEQ_PC2BRANCHINDEX_SET(iseq, rb_ary_hidden_new(0));
return Qtrue;
}
@@ -595,7 +739,8 @@ void
rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq)
{
#if VM_INSN_INFO_TABLE_IMPL == 2
- struct rb_iseq_constant_body *const body = iseq->body;
+ /* create succ_index_table */
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
int size = body->insns_info.size;
int max_pos = body->iseq_size;
int *data = (int *)body->insns_info.positions;
@@ -632,29 +777,25 @@ static VALUE
finish_iseq_build(rb_iseq_t *iseq)
{
struct iseq_compile_data *data = ISEQ_COMPILE_DATA(iseq);
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE err = data->err_info;
ISEQ_COMPILE_DATA_CLEAR(iseq);
compile_data_free(data);
-#if VM_INSN_INFO_TABLE_IMPL == 2 /* succinct bitvector */
- /* create succ_index_table */
- if (body->insns_info.succ_index_table == NULL) {
- rb_iseq_insns_info_encode_positions(iseq);
- }
-#endif
-
#if VM_CHECK_MODE > 0 && VM_INSN_INFO_TABLE_IMPL > 0
validate_get_insn_info(iseq);
#endif
if (RTEST(err)) {
- VALUE path = pathobj_path(body->location.pathobj);
- if (err == Qtrue) err = rb_exc_new_cstr(rb_eSyntaxError, "compile error");
- rb_funcallv(err, rb_intern("set_backtrace"), 1, &path);
- rb_exc_raise(err);
+ VALUE path = pathobj_path(body->location.pathobj);
+ if (err == Qtrue) err = rb_exc_new_cstr(rb_eSyntaxError, "compile error");
+ rb_funcallv(err, rb_intern("set_backtrace"), 1, &path);
+ rb_exc_raise(err);
}
+ RB_DEBUG_COUNTER_INC(iseq_num);
+ RB_DEBUG_COUNTER_ADD(iseq_cd_num, ISEQ_BODY(iseq)->ci_size);
+
rb_iseq_init_trace(iseq);
return Qtrue;
}
@@ -711,23 +852,23 @@ rb_iseq_make_compile_option(rb_compile_option_t *option, VALUE opt)
static void
make_compile_option(rb_compile_option_t *option, VALUE opt)
{
- if (opt == Qnil) {
- *option = COMPILE_OPTION_DEFAULT;
+ if (NIL_P(opt)) {
+ *option = COMPILE_OPTION_DEFAULT;
}
else if (opt == Qfalse) {
- *option = COMPILE_OPTION_FALSE;
+ *option = COMPILE_OPTION_FALSE;
}
else if (opt == Qtrue) {
- int i;
- for (i = 0; i < (int)(sizeof(rb_compile_option_t) / sizeof(int)); ++i)
- ((int *)option)[i] = 1;
+ int i;
+ for (i = 0; i < (int)(sizeof(rb_compile_option_t) / sizeof(int)); ++i)
+ ((int *)option)[i] = 1;
}
else if (RB_TYPE_P(opt, T_HASH)) {
- *option = COMPILE_OPTION_DEFAULT;
- set_compile_option_from_hash(option, opt);
+ *option = COMPILE_OPTION_DEFAULT;
+ set_compile_option_from_hash(option, opt);
}
else {
- rb_raise(rb_eTypeError, "Compile option must be Hash/true/false/nil");
+ rb_raise(rb_eTypeError, "Compile option must be Hash/true/false/nil");
}
}
@@ -736,21 +877,21 @@ make_compile_option_value(rb_compile_option_t *option)
{
VALUE opt = rb_hash_new_with_size(11);
#define SET_COMPILE_OPTION(o, h, mem) \
- rb_hash_aset((h), ID2SYM(rb_intern(#mem)), (o)->mem ? Qtrue : Qfalse)
+ rb_hash_aset((h), ID2SYM(rb_intern(#mem)), RBOOL((o)->mem))
#define SET_COMPILE_OPTION_NUM(o, h, mem) \
rb_hash_aset((h), ID2SYM(rb_intern(#mem)), INT2NUM((o)->mem))
{
- SET_COMPILE_OPTION(option, opt, inline_const_cache);
- SET_COMPILE_OPTION(option, opt, peephole_optimization);
- SET_COMPILE_OPTION(option, opt, tailcall_optimization);
- SET_COMPILE_OPTION(option, opt, specialized_instruction);
- SET_COMPILE_OPTION(option, opt, operands_unification);
- SET_COMPILE_OPTION(option, opt, instructions_unification);
- SET_COMPILE_OPTION(option, opt, stack_caching);
- SET_COMPILE_OPTION(option, opt, frozen_string_literal);
- SET_COMPILE_OPTION(option, opt, debug_frozen_string_literal);
- SET_COMPILE_OPTION(option, opt, coverage_enabled);
- SET_COMPILE_OPTION_NUM(option, opt, debug_level);
+ SET_COMPILE_OPTION(option, opt, inline_const_cache);
+ SET_COMPILE_OPTION(option, opt, peephole_optimization);
+ SET_COMPILE_OPTION(option, opt, tailcall_optimization);
+ SET_COMPILE_OPTION(option, opt, specialized_instruction);
+ SET_COMPILE_OPTION(option, opt, operands_unification);
+ SET_COMPILE_OPTION(option, opt, instructions_unification);
+ SET_COMPILE_OPTION(option, opt, stack_caching);
+ SET_COMPILE_OPTION(option, opt, frozen_string_literal);
+ SET_COMPILE_OPTION(option, opt, debug_frozen_string_literal);
+ SET_COMPILE_OPTION(option, opt, coverage_enabled);
+ SET_COMPILE_OPTION_NUM(option, opt, debug_level);
}
#undef SET_COMPILE_OPTION
#undef SET_COMPILE_OPTION_NUM
@@ -759,45 +900,94 @@ make_compile_option_value(rb_compile_option_t *option)
rb_iseq_t *
rb_iseq_new(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath,
- const rb_iseq_t *parent, enum iseq_type type)
+ const rb_iseq_t *parent, enum rb_iseq_type type)
{
- return rb_iseq_new_with_opt(ast, name, path, realpath, INT2FIX(0), parent, type,
- &COMPILE_OPTION_DEFAULT);
+ return rb_iseq_new_with_opt(ast, name, path, realpath, 0, parent,
+ 0, type, &COMPILE_OPTION_DEFAULT);
}
-rb_iseq_t *
-rb_iseq_new_top(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent)
+static int
+ast_line_count(const rb_ast_body_t *ast)
+{
+ if (ast->script_lines == Qfalse) {
+ // this occurs when failed to parse the source code with a syntax error
+ return 0;
+ }
+ if (RB_TYPE_P(ast->script_lines, T_ARRAY)){
+ return (int)RARRAY_LEN(ast->script_lines);
+ }
+ return FIX2INT(ast->script_lines);
+}
+
+static VALUE
+iseq_setup_coverage(VALUE coverages, VALUE path, const rb_ast_body_t *ast, int line_offset)
+{
+ int line_count = line_offset + ast_line_count(ast);
+
+ if (line_count >= 0) {
+ int len = (rb_get_coverage_mode() & COVERAGE_TARGET_ONESHOT_LINES) ? 0 : line_count;
+
+ VALUE coverage = rb_default_coverage(len);
+ rb_hash_aset(coverages, path, coverage);
+
+ return coverage;
+ }
+
+ return Qnil;
+}
+
+static inline void
+iseq_new_setup_coverage(VALUE path, const rb_ast_body_t *ast, int line_offset)
{
VALUE coverages = rb_get_coverages();
+
if (RTEST(coverages)) {
- if (ast->line_count >= 0) {
- int len = (rb_get_coverage_mode() & COVERAGE_TARGET_ONESHOT_LINES) ? 0 : ast->line_count;
- VALUE coverage = rb_default_coverage(len);
- rb_hash_aset(coverages, path, coverage);
- }
+ iseq_setup_coverage(coverages, path, ast, 0);
}
+}
+
+rb_iseq_t *
+rb_iseq_new_top(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent)
+{
+ iseq_new_setup_coverage(path, ast, 0);
- return rb_iseq_new_with_opt(ast, name, path, realpath, INT2FIX(0), parent, ISEQ_TYPE_TOP,
- &COMPILE_OPTION_DEFAULT);
+ return rb_iseq_new_with_opt(ast, name, path, realpath, 0, parent, 0,
+ ISEQ_TYPE_TOP, &COMPILE_OPTION_DEFAULT);
}
rb_iseq_t *
-rb_iseq_new_main(const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent)
+rb_iseq_new_main(const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt)
{
+ iseq_new_setup_coverage(path, ast, 0);
+
return rb_iseq_new_with_opt(ast, rb_fstring_lit("<main>"),
- path, realpath, INT2FIX(0),
- parent, ISEQ_TYPE_MAIN, &COMPILE_OPTION_DEFAULT);
+ path, realpath, 0,
+ parent, 0, ISEQ_TYPE_MAIN, opt ? &COMPILE_OPTION_DEFAULT : &COMPILE_OPTION_FALSE);
+}
+
+rb_iseq_t *
+rb_iseq_new_eval(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth)
+{
+ if (rb_get_coverage_mode() & COVERAGE_TARGET_EVAL) {
+ VALUE coverages = rb_get_coverages();
+ if (RTEST(coverages) && RTEST(path) && !RTEST(rb_hash_has_key(coverages, path))) {
+ iseq_setup_coverage(coverages, path, ast, first_lineno - 1);
+ }
+ }
+
+ return rb_iseq_new_with_opt(ast, name, path, realpath, first_lineno,
+ parent, isolated_depth, ISEQ_TYPE_EVAL, &COMPILE_OPTION_DEFAULT);
}
static inline rb_iseq_t *
iseq_translate(rb_iseq_t *iseq)
{
if (rb_respond_to(rb_cISeq, rb_intern("translate"))) {
- VALUE v1 = iseqw_new(iseq);
- VALUE v2 = rb_funcall(rb_cISeq, rb_intern("translate"), 1, v1);
- if (v1 != v2 && CLASS_OF(v2) == rb_cISeq) {
- iseq = (rb_iseq_t *)iseqw_check(v2);
- }
+ VALUE v1 = iseqw_new(iseq);
+ VALUE v2 = rb_funcall(rb_cISeq, rb_intern("translate"), 1, v1);
+ if (v1 != v2 && CLASS_OF(v2) == rb_cISeq) {
+ iseq = (rb_iseq_t *)iseqw_check(v2);
+ }
}
return iseq;
@@ -805,18 +995,33 @@ iseq_translate(rb_iseq_t *iseq)
rb_iseq_t *
rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath,
- VALUE first_lineno, const rb_iseq_t *parent,
- enum iseq_type type, const rb_compile_option_t *option)
+ int first_lineno, const rb_iseq_t *parent, int isolated_depth,
+ enum rb_iseq_type type, const rb_compile_option_t *option)
{
const NODE *node = ast ? ast->root : 0;
/* TODO: argument check */
rb_iseq_t *iseq = iseq_alloc();
rb_compile_option_t new_opt;
- new_opt = option ? *option : COMPILE_OPTION_DEFAULT;
+ if (option) {
+ new_opt = *option;
+ }
+ else {
+ new_opt = COMPILE_OPTION_DEFAULT;
+ }
if (ast && ast->compile_option) rb_iseq_make_compile_option(&new_opt, ast->compile_option);
- prepare_iseq_build(iseq, name, path, realpath, first_lineno, node ? &node->nd_loc : NULL, node ? nd_node_id(node) : -1, parent, type, &new_opt);
+ VALUE script_lines = Qnil;
+
+ if (ast && !FIXNUM_P(ast->script_lines) && ast->script_lines) {
+ script_lines = ast->script_lines;
+ }
+ else if (parent) {
+ script_lines = ISEQ_BODY(parent)->variable.script_lines;
+ }
+
+ prepare_iseq_build(iseq, name, path, realpath, first_lineno, node ? &node->nd_loc : NULL, node ? nd_node_id(node) : -1,
+ parent, isolated_depth, type, script_lines, &new_opt);
rb_iseq_compile_node(iseq, node);
finish_iseq_build(iseq);
@@ -828,19 +1033,19 @@ rb_iseq_t *
rb_iseq_new_with_callback(
const struct rb_iseq_new_with_callback_callback_func * ifunc,
VALUE name, VALUE path, VALUE realpath,
- VALUE first_lineno, const rb_iseq_t *parent,
- enum iseq_type type, const rb_compile_option_t *option)
+ int first_lineno, const rb_iseq_t *parent,
+ enum rb_iseq_type type, const rb_compile_option_t *option)
{
/* TODO: argument check */
rb_iseq_t *iseq = iseq_alloc();
if (!option) option = &COMPILE_OPTION_DEFAULT;
- prepare_iseq_build(iseq, name, path, realpath, first_lineno, NULL, -1, parent, type, option);
+ prepare_iseq_build(iseq, name, path, realpath, first_lineno, NULL, -1, parent, 0, type, Qnil, option);
rb_iseq_compile_callback(iseq, ifunc);
finish_iseq_build(iseq);
- return iseq_translate(iseq);
+ return iseq;
}
const rb_iseq_t *
@@ -849,7 +1054,7 @@ rb_iseq_load_iseq(VALUE fname)
VALUE iseqv = rb_check_funcall(rb_cISeq, rb_intern("load_iseq"), 1, &fname);
if (!SPECIAL_CONST_P(iseqv) && RBASIC_CLASS(iseqv) == rb_cISeq) {
- return iseqw_check(iseqv);
+ return iseqw_check(iseqv);
}
return NULL;
@@ -861,7 +1066,7 @@ rb_iseq_load_iseq(VALUE fname)
#define CHECK_SYMBOL(v) rb_to_symbol_type(v)
static inline VALUE CHECK_INTEGER(VALUE v) {(void)NUM2LONG(v); return v;}
-static enum iseq_type
+static enum rb_iseq_type
iseq_type_from_sym(VALUE type)
{
const ID id_top = rb_intern("top");
@@ -885,7 +1090,7 @@ iseq_type_from_sym(VALUE type)
if (typeid == id_eval) return ISEQ_TYPE_EVAL;
if (typeid == id_main) return ISEQ_TYPE_MAIN;
if (typeid == id_plain) return ISEQ_TYPE_PLAIN;
- return (enum iseq_type)-1;
+ return (enum rb_iseq_type)-1;
}
static VALUE
@@ -894,7 +1099,7 @@ iseq_load(VALUE data, const rb_iseq_t *parent, VALUE opt)
rb_iseq_t *iseq = iseq_alloc();
VALUE magic, version1, version2, format_type, misc;
- VALUE name, path, realpath, first_lineno, code_location, node_id;
+ VALUE name, path, realpath, code_location, node_id;
VALUE type, body, locals, params, exception;
st_data_t iseq_type;
@@ -920,7 +1125,7 @@ iseq_load(VALUE data, const rb_iseq_t *parent, VALUE opt)
path = CHECK_STRING(rb_ary_entry(data, i++));
realpath = rb_ary_entry(data, i++);
realpath = NIL_P(realpath) ? Qnil : CHECK_STRING(realpath);
- first_lineno = CHECK_INTEGER(rb_ary_entry(data, i++));
+ int first_lineno = RB_NUM2INT(rb_ary_entry(data, i++));
type = CHECK_SYMBOL(rb_ary_entry(data, i++));
locals = CHECK_ARRAY(rb_ary_entry(data, i++));
@@ -928,27 +1133,27 @@ iseq_load(VALUE data, const rb_iseq_t *parent, VALUE opt)
exception = CHECK_ARRAY(rb_ary_entry(data, i++));
body = CHECK_ARRAY(rb_ary_entry(data, i++));
- iseq->body->local_iseq = iseq;
+ ISEQ_BODY(iseq)->local_iseq = iseq;
iseq_type = iseq_type_from_sym(type);
- if (iseq_type == (enum iseq_type)-1) {
- rb_raise(rb_eTypeError, "unsupported type: :%"PRIsVALUE, rb_sym2str(type));
+ if (iseq_type == (enum rb_iseq_type)-1) {
+ rb_raise(rb_eTypeError, "unsupported type: :%"PRIsVALUE, rb_sym2str(type));
}
node_id = rb_hash_aref(misc, ID2SYM(rb_intern("node_id")));
code_location = rb_hash_aref(misc, ID2SYM(rb_intern("code_location")));
if (RB_TYPE_P(code_location, T_ARRAY) && RARRAY_LEN(code_location) == 4) {
- tmp_loc.beg_pos.lineno = NUM2INT(rb_ary_entry(code_location, 0));
- tmp_loc.beg_pos.column = NUM2INT(rb_ary_entry(code_location, 1));
- tmp_loc.end_pos.lineno = NUM2INT(rb_ary_entry(code_location, 2));
- tmp_loc.end_pos.column = NUM2INT(rb_ary_entry(code_location, 3));
+ tmp_loc.beg_pos.lineno = NUM2INT(rb_ary_entry(code_location, 0));
+ tmp_loc.beg_pos.column = NUM2INT(rb_ary_entry(code_location, 1));
+ tmp_loc.end_pos.lineno = NUM2INT(rb_ary_entry(code_location, 2));
+ tmp_loc.end_pos.column = NUM2INT(rb_ary_entry(code_location, 3));
}
make_compile_option(&option, opt);
option.peephole_optimization = FALSE; /* because peephole optimization can modify original iseq */
prepare_iseq_build(iseq, name, path, realpath, first_lineno, &tmp_loc, NUM2INT(node_id),
- parent, (enum iseq_type)iseq_type, &option);
+ parent, 0, (enum rb_iseq_type)iseq_type, Qnil, &option);
rb_iseq_build_from_ary(iseq, misc, locals, params, exception, body);
@@ -987,37 +1192,36 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, V
rb_ast_t *(*parse)(VALUE vparser, VALUE fname, VALUE file, int start);
int ln;
rb_ast_t *INITIALIZED ast;
+ VALUE name = rb_fstring_lit("<compiled>");
/* safe results first */
make_compile_option(&option, opt);
ln = NUM2INT(line);
StringValueCStr(file);
if (RB_TYPE_P(src, T_FILE)) {
- parse = rb_parser_compile_file_path;
+ parse = rb_parser_compile_file_path;
}
else {
- parse = rb_parser_compile_string_path;
- StringValue(src);
+ parse = rb_parser_compile_string_path;
+ StringValue(src);
}
{
- const VALUE parser = rb_parser_new();
- VALUE name = rb_fstring_lit("<compiled>");
+ const VALUE parser = rb_parser_new();
const rb_iseq_t *outer_scope = rb_iseq_new(NULL, name, name, Qnil, 0, ISEQ_TYPE_TOP);
VALUE outer_scope_v = (VALUE)outer_scope;
rb_parser_set_context(parser, outer_scope, FALSE);
RB_GC_GUARD(outer_scope_v);
- ast = (*parse)(parser, file, src, ln);
+ ast = (*parse)(parser, file, src, ln);
}
if (!ast->body.root) {
- rb_ast_dispose(ast);
- rb_exc_raise(GET_EC()->errinfo);
+ rb_ast_dispose(ast);
+ rb_exc_raise(GET_EC()->errinfo);
}
else {
- INITIALIZED VALUE label = rb_fstring_lit("<compiled>");
- iseq = rb_iseq_new_with_opt(&ast->body, label, file, realpath, line,
- 0, ISEQ_TYPE_TOP, &option);
- rb_ast_dispose(ast);
+ iseq = rb_iseq_new_with_opt(&ast->body, name, file, realpath, ln,
+ NULL, 0, ISEQ_TYPE_TOP, &option);
+ rb_ast_dispose(ast);
}
return iseq;
@@ -1026,13 +1230,13 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, V
VALUE
rb_iseq_path(const rb_iseq_t *iseq)
{
- return pathobj_path(iseq->body->location.pathobj);
+ return pathobj_path(ISEQ_BODY(iseq)->location.pathobj);
}
VALUE
rb_iseq_realpath(const rb_iseq_t *iseq)
{
- return pathobj_realpath(iseq->body->location.pathobj);
+ return pathobj_realpath(ISEQ_BODY(iseq)->location.pathobj);
}
VALUE
@@ -1041,47 +1245,61 @@ rb_iseq_absolute_path(const rb_iseq_t *iseq)
return rb_iseq_realpath(iseq);
}
+int
+rb_iseq_from_eval_p(const rb_iseq_t *iseq)
+{
+ return NIL_P(rb_iseq_realpath(iseq));
+}
+
VALUE
rb_iseq_label(const rb_iseq_t *iseq)
{
- return iseq->body->location.label;
+ return ISEQ_BODY(iseq)->location.label;
}
VALUE
rb_iseq_base_label(const rb_iseq_t *iseq)
{
- return iseq->body->location.base_label;
+ return ISEQ_BODY(iseq)->location.base_label;
}
VALUE
rb_iseq_first_lineno(const rb_iseq_t *iseq)
{
- return iseq->body->location.first_lineno;
+ return RB_INT2NUM(ISEQ_BODY(iseq)->location.first_lineno);
}
VALUE
rb_iseq_method_name(const rb_iseq_t *iseq)
{
- struct rb_iseq_constant_body *const body = iseq->body->local_iseq->body;
+ struct rb_iseq_constant_body *const body = ISEQ_BODY(ISEQ_BODY(iseq)->local_iseq);
if (body->type == ISEQ_TYPE_METHOD) {
- return body->location.base_label;
+ return body->location.base_label;
}
else {
- return Qnil;
+ return Qnil;
}
}
void
rb_iseq_code_location(const rb_iseq_t *iseq, int *beg_pos_lineno, int *beg_pos_column, int *end_pos_lineno, int *end_pos_column)
{
- const rb_code_location_t *loc = &iseq->body->location.code_location;
+ const rb_code_location_t *loc = &ISEQ_BODY(iseq)->location.code_location;
if (beg_pos_lineno) *beg_pos_lineno = loc->beg_pos.lineno;
if (beg_pos_column) *beg_pos_column = loc->beg_pos.column;
if (end_pos_lineno) *end_pos_lineno = loc->end_pos.lineno;
if (end_pos_column) *end_pos_column = loc->end_pos.column;
}
+static ID iseq_type_id(enum rb_iseq_type type);
+
+VALUE
+rb_iseq_type(const rb_iseq_t *iseq)
+{
+ return ID2SYM(iseq_type_id(ISEQ_BODY(iseq)->type));
+}
+
VALUE
rb_iseq_coverage(const rb_iseq_t *iseq)
{
@@ -1096,10 +1314,10 @@ remove_coverage_i(void *vstart, void *vend, size_t stride, void *data)
void *ptr = asan_poisoned_object_p(v);
asan_unpoison_object(v, false);
- if (rb_obj_is_iseq(v)) {
+ if (rb_obj_is_iseq(v)) {
rb_iseq_t *iseq = (rb_iseq_t *)v;
ISEQ_COVERAGE_SET(iseq, Qnil);
- }
+ }
asan_poison_object_if(ptr, v);
}
@@ -1240,7 +1458,7 @@ iseqw_s_compile(int argc, VALUE *argv, VALUE self)
static VALUE
iseqw_s_compile_file(int argc, VALUE *argv, VALUE self)
{
- VALUE file, line = INT2FIX(1), opt = Qnil;
+ VALUE file, opt = Qnil;
VALUE parser, f, exc = Qnil, ret;
rb_ast_t *ast;
rb_compile_option_t option;
@@ -1256,24 +1474,30 @@ iseqw_s_compile_file(int argc, VALUE *argv, VALUE self)
f = rb_file_open_str(file, "r");
+ rb_execution_context_t *ec = GET_EC();
+ VALUE v = rb_vm_push_frame_fname(ec, file);
+
parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
- ast = rb_parser_compile_file_path(parser, file, f, NUM2INT(line));
+ ast = (rb_ast_t *)rb_parser_load_file(parser, file);
if (!ast->body.root) exc = GET_EC()->errinfo;
rb_io_close(f);
if (!ast->body.root) {
- rb_ast_dispose(ast);
- rb_exc_raise(exc);
+ rb_ast_dispose(ast);
+ rb_exc_raise(exc);
}
make_compile_option(&option, opt);
ret = iseqw_new(rb_iseq_new_with_opt(&ast->body, rb_fstring_lit("<main>"),
- file,
- rb_realpath_internal(Qnil, file, 1),
- line, NULL, ISEQ_TYPE_TOP, &option));
+ file,
+ rb_realpath_internal(Qnil, file, 1),
+ 1, NULL, 0, ISEQ_TYPE_TOP, &option));
rb_ast_dispose(ast);
+
+ rb_vm_pop_frame(ec);
+ RB_GC_GUARD(v);
return ret;
}
@@ -1336,12 +1560,12 @@ iseqw_check(VALUE iseqw)
{
rb_iseq_t *iseq = DATA_PTR(iseqw);
- if (!iseq->body) {
- rb_ibf_load_iseq_complete(iseq);
+ if (!ISEQ_BODY(iseq)) {
+ rb_ibf_load_iseq_complete(iseq);
}
- if (!iseq->body->location.label) {
- rb_raise(rb_eTypeError, "uninitialized InstructionSequence");
+ if (!ISEQ_BODY(iseq)->location.label) {
+ rb_raise(rb_eTypeError, "uninitialized InstructionSequence");
}
return iseq;
}
@@ -1363,7 +1587,11 @@ rb_iseqw_to_iseq(VALUE iseqw)
static VALUE
iseqw_eval(VALUE self)
{
- return rb_iseq_eval(iseqw_check(self));
+ const rb_iseq_t *iseq = iseqw_check(self);
+ if (0 == ISEQ_BODY(iseq)->iseq_size) {
+ rb_raise(rb_eTypeError, "attempt to evaluate dummy InstructionSequence");
+ }
+ return rb_iseq_eval(iseq);
}
/*
@@ -1374,17 +1602,17 @@ static VALUE
iseqw_inspect(VALUE self)
{
const rb_iseq_t *iseq = iseqw_check(self);
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE klass = rb_class_name(rb_obj_class(self));
if (!body->location.label) {
- return rb_sprintf("#<%"PRIsVALUE": uninitialized>", klass);
+ return rb_sprintf("#<%"PRIsVALUE": uninitialized>", klass);
}
else {
- return rb_sprintf("<%"PRIsVALUE":%"PRIsVALUE"@%"PRIsVALUE":%d>",
- klass,
- body->location.label, rb_iseq_path(iseq),
- FIX2INT(rb_iseq_first_lineno(iseq)));
+ return rb_sprintf("<%"PRIsVALUE":%"PRIsVALUE"@%"PRIsVALUE":%d>",
+ klass,
+ body->location.label, rb_iseq_path(iseq),
+ FIX2INT(rb_iseq_first_lineno(iseq)));
}
}
@@ -1604,45 +1832,45 @@ iseqw_to_a(VALUE self)
static const struct iseq_insn_info_entry *
get_insn_info_binary_search(const rb_iseq_t *iseq, size_t pos)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
size_t size = body->insns_info.size;
const struct iseq_insn_info_entry *insns_info = body->insns_info.body;
const unsigned int *positions = body->insns_info.positions;
const int debug = 0;
if (debug) {
- printf("size: %"PRIuSIZE"\n", size);
- printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
- (size_t)0, positions[0], insns_info[0].line_no, pos);
+ printf("size: %"PRIuSIZE"\n", size);
+ printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
+ (size_t)0, positions[0], insns_info[0].line_no, pos);
}
if (size == 0) {
- return NULL;
+ return NULL;
}
else if (size == 1) {
- return &insns_info[0];
+ return &insns_info[0];
}
else {
- size_t l = 1, r = size - 1;
- while (l <= r) {
- size_t m = l + (r - l) / 2;
- if (positions[m] == pos) {
- return &insns_info[m];
- }
- if (positions[m] < pos) {
- l = m + 1;
- }
- else {
- r = m - 1;
- }
- }
- if (l >= size) {
- return &insns_info[size-1];
- }
- if (positions[l] > pos) {
- return &insns_info[l-1];
- }
- return &insns_info[l];
+ size_t l = 1, r = size - 1;
+ while (l <= r) {
+ size_t m = l + (r - l) / 2;
+ if (positions[m] == pos) {
+ return &insns_info[m];
+ }
+ if (positions[m] < pos) {
+ l = m + 1;
+ }
+ else {
+ r = m - 1;
+ }
+ }
+ if (l >= size) {
+ return &insns_info[size-1];
+ }
+ if (positions[l] > pos) {
+ return &insns_info[l-1];
+ }
+ return &insns_info[l];
}
}
@@ -1657,7 +1885,7 @@ get_insn_info(const rb_iseq_t *iseq, size_t pos)
static const struct iseq_insn_info_entry *
get_insn_info_succinct_bitvector(const rb_iseq_t *iseq, size_t pos)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
size_t size = body->insns_info.size;
const struct iseq_insn_info_entry *insns_info = body->insns_info.body;
const int debug = 0;
@@ -1676,16 +1904,16 @@ get_insn_info_succinct_bitvector(const rb_iseq_t *iseq, size_t pos)
}
if (size == 0) {
- return NULL;
+ return NULL;
}
else if (size == 1) {
- return &insns_info[0];
+ return &insns_info[0];
}
else {
- int index;
- VM_ASSERT(body->insns_info.succ_index_table != NULL);
- index = succ_index_lookup(body->insns_info.succ_index_table, (int)pos);
- return &insns_info[index-1];
+ int index;
+ VM_ASSERT(body->insns_info.succ_index_table != NULL);
+ index = succ_index_lookup(body->insns_info.succ_index_table, (int)pos);
+ return &insns_info[index-1];
}
}
@@ -1700,36 +1928,36 @@ get_insn_info(const rb_iseq_t *iseq, size_t pos)
static const struct iseq_insn_info_entry *
get_insn_info_linear_search(const rb_iseq_t *iseq, size_t pos)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
size_t i = 0, size = body->insns_info.size;
const struct iseq_insn_info_entry *insns_info = body->insns_info.body;
const unsigned int *positions = body->insns_info.positions;
const int debug = 0;
if (debug) {
- printf("size: %"PRIuSIZE"\n", size);
- printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
- i, positions[i], insns_info[i].line_no, pos);
+ printf("size: %"PRIuSIZE"\n", size);
+ printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
+ i, positions[i], insns_info[i].line_no, pos);
}
if (size == 0) {
- return NULL;
+ return NULL;
}
else if (size == 1) {
- return &insns_info[0];
+ return &insns_info[0];
}
else {
- for (i=1; i<size; i++) {
- if (debug) printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
- i, positions[i], insns_info[i].line_no, pos);
-
- if (positions[i] == pos) {
- return &insns_info[i];
- }
- if (positions[i] > pos) {
- return &insns_info[i-1];
- }
- }
+ for (i=1; i<size; i++) {
+ if (debug) printf("insns_info[%"PRIuSIZE"]: position: %d, line: %d, pos: %"PRIuSIZE"\n",
+ i, positions[i], insns_info[i].line_no, pos);
+
+ if (positions[i] == pos) {
+ return &insns_info[i];
+ }
+ if (positions[i] > pos) {
+ return &insns_info[i-1];
+ }
+ }
}
return &insns_info[i-1];
}
@@ -1747,12 +1975,12 @@ get_insn_info(const rb_iseq_t *iseq, size_t pos)
static void
validate_get_insn_info(const rb_iseq_t *iseq)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
size_t i;
for (i = 0; i < body->iseq_size; i++) {
- if (get_insn_info_linear_search(iseq, i) != get_insn_info(iseq, i)) {
- rb_bug("validate_get_insn_info: get_insn_info_linear_search(iseq, %"PRIuSIZE") != get_insn_info(iseq, %"PRIuSIZE")", i, i);
- }
+ if (get_insn_info_linear_search(iseq, i) != get_insn_info(iseq, i)) {
+ rb_bug("validate_get_insn_info: get_insn_info_linear_search(iseq, %"PRIuSIZE") != get_insn_info(iseq, %"PRIuSIZE")", i, i);
+ }
}
}
#endif
@@ -1763,22 +1991,37 @@ rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos)
const struct iseq_insn_info_entry *entry = get_insn_info(iseq, pos);
if (entry) {
- return entry->line_no;
+ return entry->line_no;
}
else {
- return 0;
+ return 0;
}
}
+#ifdef USE_ISEQ_NODE_ID
+int
+rb_iseq_node_id(const rb_iseq_t *iseq, size_t pos)
+{
+ const struct iseq_insn_info_entry *entry = get_insn_info(iseq, pos);
+
+ if (entry) {
+ return entry->node_id;
+ }
+ else {
+ return 0;
+ }
+}
+#endif
+
MJIT_FUNC_EXPORTED rb_event_flag_t
rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos)
{
const struct iseq_insn_info_entry *entry = get_insn_info(iseq, pos);
if (entry) {
- return entry->events;
+ return entry->events;
}
else {
- return 0;
+ return 0;
}
}
@@ -1804,30 +2047,31 @@ local_var_name(const rb_iseq_t *diseq, VALUE level, VALUE op)
int idx;
for (i = 0; i < level; i++) {
- diseq = diseq->body->parent_iseq;
+ diseq = ISEQ_BODY(diseq)->parent_iseq;
}
- idx = diseq->body->local_table_size - (int)op - 1;
- lid = diseq->body->local_table[idx];
+ idx = ISEQ_BODY(diseq)->local_table_size - (int)op - 1;
+ lid = ISEQ_BODY(diseq)->local_table[idx];
name = rb_id2str(lid);
if (!name) {
- name = rb_str_new_cstr("?");
+ name = rb_str_new_cstr("?");
}
else if (!rb_str_symname_p(name)) {
- name = rb_str_inspect(name);
+ name = rb_str_inspect(name);
}
else {
- name = rb_str_dup(name);
+ name = rb_str_dup(name);
}
rb_str_catf(name, "@%d", idx);
return name;
}
int rb_insn_unified_local_var_level(VALUE);
+VALUE rb_dump_literal(VALUE lit);
VALUE
rb_insn_operand_intern(const rb_iseq_t *iseq,
- VALUE insn, int op_no, VALUE op,
- int len, size_t pos, const VALUE *pnop, VALUE child)
+ VALUE insn, int op_no, VALUE op,
+ int len, size_t pos, const VALUE *pnop, VALUE child)
{
const char *types = insn_op_types(insn);
char type = types[op_no];
@@ -1835,160 +2079,167 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
switch (type) {
case TS_OFFSET: /* LONG */
- ret = rb_sprintf("%"PRIdVALUE, (VALUE)(pos + len + op));
- break;
+ ret = rb_sprintf("%"PRIdVALUE, (VALUE)(pos + len + op));
+ break;
case TS_NUM: /* ULONG */
- if (insn == BIN(defined) && op_no == 0) {
- enum defined_type deftype = (enum defined_type)op;
- switch (deftype) {
- case DEFINED_FUNC:
- ret = rb_fstring_lit("func");
- break;
- case DEFINED_REF:
- ret = rb_fstring_lit("ref");
- break;
- case DEFINED_CONST_FROM:
- ret = rb_fstring_lit("constant-from");
- break;
- default:
- ret = rb_iseq_defined_string(deftype);
- break;
- }
- if (ret) break;
- }
- else if (insn == BIN(checktype) && op_no == 0) {
- const char *type_str = rb_type_str((enum ruby_value_type)op);
- if (type_str) {
- ret = rb_str_new_cstr(type_str); break;
- }
- }
- ret = rb_sprintf("%"PRIuVALUE, op);
- break;
+ if (insn == BIN(defined) && op_no == 0) {
+ enum defined_type deftype = (enum defined_type)op;
+ switch (deftype) {
+ case DEFINED_FUNC:
+ ret = rb_fstring_lit("func");
+ break;
+ case DEFINED_REF:
+ ret = rb_fstring_lit("ref");
+ break;
+ case DEFINED_CONST_FROM:
+ ret = rb_fstring_lit("constant-from");
+ break;
+ default:
+ ret = rb_iseq_defined_string(deftype);
+ break;
+ }
+ if (ret) break;
+ }
+ else if (insn == BIN(checktype) && op_no == 0) {
+ const char *type_str = rb_type_str((enum ruby_value_type)op);
+ if (type_str) {
+ ret = rb_str_new_cstr(type_str); break;
+ }
+ }
+ ret = rb_sprintf("%"PRIuVALUE, op);
+ break;
case TS_LINDEX:{
- int level;
- if (types[op_no+1] == TS_NUM && pnop) {
- ret = local_var_name(iseq, *pnop, op - VM_ENV_DATA_SIZE);
- }
- else if ((level = rb_insn_unified_local_var_level(insn)) >= 0) {
- ret = local_var_name(iseq, (VALUE)level, op - VM_ENV_DATA_SIZE);
- }
- else {
- ret = rb_inspect(INT2FIX(op));
- }
- break;
+ int level;
+ if (types[op_no+1] == TS_NUM && pnop) {
+ ret = local_var_name(iseq, *pnop, op - VM_ENV_DATA_SIZE);
+ }
+ else if ((level = rb_insn_unified_local_var_level(insn)) >= 0) {
+ ret = local_var_name(iseq, (VALUE)level, op - VM_ENV_DATA_SIZE);
+ }
+ else {
+ ret = rb_inspect(INT2FIX(op));
+ }
+ break;
}
case TS_ID: /* ID (symbol) */
- ret = rb_inspect(ID2SYM(op));
- break;
+ ret = rb_inspect(ID2SYM(op));
+ break;
case TS_VALUE: /* VALUE */
- op = obj_resurrect(op);
- if (insn == BIN(defined) && op_no == 1 && FIXNUM_P(op)) {
- /* should be DEFINED_REF */
- int type = NUM2INT(op);
- if (type) {
- if (type & 1) {
- ret = rb_sprintf(":$%c", (type >> 1));
- }
- else {
- ret = rb_sprintf(":$%d", (type >> 1));
- }
- break;
- }
- }
- ret = rb_inspect(op);
- if (CLASS_OF(op) == rb_cISeq) {
- if (child) {
- rb_ary_push(child, op);
- }
- }
- break;
+ op = obj_resurrect(op);
+ if (insn == BIN(defined) && op_no == 1 && FIXNUM_P(op)) {
+ /* should be DEFINED_REF */
+ int type = NUM2INT(op);
+ if (type) {
+ if (type & 1) {
+ ret = rb_sprintf(":$%c", (type >> 1));
+ }
+ else {
+ ret = rb_sprintf(":$%d", (type >> 1));
+ }
+ break;
+ }
+ }
+ ret = rb_dump_literal(op);
+ if (CLASS_OF(op) == rb_cISeq) {
+ if (child) {
+ rb_ary_push(child, op);
+ }
+ }
+ break;
case TS_ISEQ: /* iseq */
- {
- if (op) {
- const rb_iseq_t *iseq = rb_iseq_check((rb_iseq_t *)op);
- ret = iseq->body->location.label;
- if (child) {
- rb_ary_push(child, (VALUE)iseq);
- }
- }
- else {
- ret = rb_str_new2("nil");
- }
- break;
- }
- case TS_GENTRY:
- {
- struct rb_global_entry *entry = (struct rb_global_entry *)op;
- ret = rb_str_dup(rb_id2str(entry->id));
- }
- break;
+ {
+ if (op) {
+ const rb_iseq_t *iseq = rb_iseq_check((rb_iseq_t *)op);
+ ret = ISEQ_BODY(iseq)->location.label;
+ if (child) {
+ rb_ary_push(child, (VALUE)iseq);
+ }
+ }
+ else {
+ ret = rb_str_new2("nil");
+ }
+ break;
+ }
case TS_IC:
+ {
+ ret = rb_sprintf("<ic:%"PRIdPTRDIFF" ", (union iseq_inline_storage_entry *)op - ISEQ_BODY(iseq)->is_entries);
+ const ID *segments = ((IC)op)->segments;
+ rb_str_cat2(ret, rb_id2name(*segments++));
+ while (*segments) {
+ rb_str_catf(ret, "::%s", rb_id2name(*segments++));
+ }
+ rb_str_cat2(ret, ">");
+ }
+ break;
case TS_IVC:
+ case TS_ICVARC:
case TS_ISE:
- ret = rb_sprintf("<is:%"PRIdPTRDIFF">", (union iseq_inline_storage_entry *)op - iseq->body->is_entries);
- break;
+ ret = rb_sprintf("<is:%"PRIdPTRDIFF">", (union iseq_inline_storage_entry *)op - ISEQ_BODY(iseq)->is_entries);
+ break;
case TS_CALLDATA:
- {
+ {
struct rb_call_data *cd = (struct rb_call_data *)op;
- struct rb_call_info *ci = &cd->ci;
- VALUE ary = rb_ary_new();
-
- if (ci->mid) {
- rb_ary_push(ary, rb_sprintf("mid:%"PRIsVALUE, rb_id2str(ci->mid)));
- }
-
- rb_ary_push(ary, rb_sprintf("argc:%d", ci->orig_argc));
-
- if (ci->flag & VM_CALL_KWARG) {
- struct rb_call_info_kw_arg *kw_args = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
- VALUE kw_ary = rb_ary_new_from_values(kw_args->keyword_len, kw_args->keywords);
- rb_ary_push(ary, rb_sprintf("kw:[%"PRIsVALUE"]", rb_ary_join(kw_ary, rb_str_new2(","))));
- }
-
- if (ci->flag) {
- VALUE flags = rb_ary_new();
-# define CALL_FLAG(n) if (ci->flag & VM_CALL_##n) rb_ary_push(flags, rb_str_new2(#n))
- CALL_FLAG(ARGS_SPLAT);
- CALL_FLAG(ARGS_BLOCKARG);
- CALL_FLAG(FCALL);
- CALL_FLAG(VCALL);
- CALL_FLAG(ARGS_SIMPLE);
- CALL_FLAG(BLOCKISEQ);
- CALL_FLAG(TAILCALL);
- CALL_FLAG(SUPER);
- CALL_FLAG(ZSUPER);
- CALL_FLAG(KWARG);
- CALL_FLAG(KW_SPLAT);
- CALL_FLAG(OPT_SEND); /* maybe not reachable */
- rb_ary_push(ary, rb_ary_join(flags, rb_str_new2("|")));
- }
+ const struct rb_callinfo *ci = cd->ci;
+ VALUE ary = rb_ary_new();
+ ID mid = vm_ci_mid(ci);
+
+ if (mid) {
+ rb_ary_push(ary, rb_sprintf("mid:%"PRIsVALUE, rb_id2str(mid)));
+ }
+
+ rb_ary_push(ary, rb_sprintf("argc:%d", vm_ci_argc(ci)));
+
+ if (vm_ci_flag(ci) & VM_CALL_KWARG) {
+ const struct rb_callinfo_kwarg *kw_args = vm_ci_kwarg(ci);
+ VALUE kw_ary = rb_ary_new_from_values(kw_args->keyword_len, kw_args->keywords);
+ rb_ary_push(ary, rb_sprintf("kw:[%"PRIsVALUE"]", rb_ary_join(kw_ary, rb_str_new2(","))));
+ }
+
+ if (vm_ci_flag(ci)) {
+ VALUE flags = rb_ary_new();
+# define CALL_FLAG(n) if (vm_ci_flag(ci) & VM_CALL_##n) rb_ary_push(flags, rb_str_new2(#n))
+ CALL_FLAG(ARGS_SPLAT);
+ CALL_FLAG(ARGS_BLOCKARG);
+ CALL_FLAG(FCALL);
+ CALL_FLAG(VCALL);
+ CALL_FLAG(ARGS_SIMPLE);
+ CALL_FLAG(BLOCKISEQ);
+ CALL_FLAG(TAILCALL);
+ CALL_FLAG(SUPER);
+ CALL_FLAG(ZSUPER);
+ CALL_FLAG(KWARG);
+ CALL_FLAG(KW_SPLAT);
+ CALL_FLAG(KW_SPLAT_MUT);
+ CALL_FLAG(OPT_SEND); /* maybe not reachable */
+ rb_ary_push(ary, rb_ary_join(flags, rb_str_new2("|")));
+ }
ret = rb_sprintf("<calldata!%"PRIsVALUE">", rb_ary_join(ary, rb_str_new2(", ")));
}
- break;
+ break;
case TS_CDHASH:
- ret = rb_str_new2("<cdhash>");
- break;
+ ret = rb_str_new2("<cdhash>");
+ break;
case TS_FUNCPTR:
- {
+ {
#ifdef HAVE_DLADDR
- Dl_info info;
- if (dladdr((void *)op, &info) && info.dli_sname) {
- ret = rb_str_new_cstr(info.dli_sname);
- break;
- }
+ Dl_info info;
+ if (dladdr((void *)op, &info) && info.dli_sname) {
+ ret = rb_str_new_cstr(info.dli_sname);
+ break;
+ }
#endif
- ret = rb_str_new2("<funcptr>");
- }
- break;
+ ret = rb_str_new2("<funcptr>");
+ }
+ break;
case TS_BUILTIN:
{
@@ -1999,7 +2250,7 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
break;
default:
- rb_bug("unknown operand type: %c", type);
+ rb_bug("unknown operand type: %c", type);
}
return ret;
}
@@ -2019,7 +2270,7 @@ right_strip(VALUE str)
*/
int
rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos,
- const rb_iseq_t *iseq, VALUE child)
+ const rb_iseq_t *iseq, VALUE child)
{
VALUE insn = code[pos];
int len = insn_len(insn);
@@ -2030,60 +2281,60 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos,
insn_name_buff = insn_name(insn);
if (1) {
- extern const int rb_vm_max_insn_name_size;
- rb_str_catf(str, "%04"PRIuSIZE" %-*s ", pos, rb_vm_max_insn_name_size, insn_name_buff);
+ extern const int rb_vm_max_insn_name_size;
+ rb_str_catf(str, "%04"PRIuSIZE" %-*s ", pos, rb_vm_max_insn_name_size, insn_name_buff);
}
else {
- rb_str_catf(str, "%04"PRIuSIZE" %-28.*s ", pos,
- (int)strcspn(insn_name_buff, "_"), insn_name_buff);
+ rb_str_catf(str, "%04"PRIuSIZE" %-28.*s ", pos,
+ (int)strcspn(insn_name_buff, "_"), insn_name_buff);
}
for (j = 0; types[j]; j++) {
- VALUE opstr = rb_insn_operand_intern(iseq, insn, j, code[pos + j + 1],
- len, pos, &code[pos + j + 2],
- child);
- rb_str_concat(str, opstr);
+ VALUE opstr = rb_insn_operand_intern(iseq, insn, j, code[pos + j + 1],
+ len, pos, &code[pos + j + 2],
+ child);
+ rb_str_concat(str, opstr);
- if (types[j + 1]) {
- rb_str_cat2(str, ", ");
- }
+ if (types[j + 1]) {
+ rb_str_cat2(str, ", ");
+ }
}
{
- unsigned int line_no = rb_iseq_line_no(iseq, pos);
- unsigned int prev = pos == 0 ? 0 : rb_iseq_line_no(iseq, pos - 1);
- if (line_no && line_no != prev) {
- long slen = RSTRING_LEN(str);
- slen = (slen > 70) ? 0 : (70 - slen);
- str = rb_str_catf(str, "%*s(%4d)", (int)slen, "", line_no);
- }
+ unsigned int line_no = rb_iseq_line_no(iseq, pos);
+ unsigned int prev = pos == 0 ? 0 : rb_iseq_line_no(iseq, pos - 1);
+ if (line_no && line_no != prev) {
+ long slen = RSTRING_LEN(str);
+ slen = (slen > 70) ? 0 : (70 - slen);
+ str = rb_str_catf(str, "%*s(%4d)", (int)slen, "", line_no);
+ }
}
{
- rb_event_flag_t events = rb_iseq_event_flags(iseq, pos);
- if (events) {
+ rb_event_flag_t events = rb_iseq_event_flags(iseq, pos);
+ if (events) {
str = rb_str_catf(str, "[%s%s%s%s%s%s%s%s%s%s%s]",
- events & RUBY_EVENT_LINE ? "Li" : "",
- events & RUBY_EVENT_CLASS ? "Cl" : "",
- events & RUBY_EVENT_END ? "En" : "",
- events & RUBY_EVENT_CALL ? "Ca" : "",
- events & RUBY_EVENT_RETURN ? "Re" : "",
- events & RUBY_EVENT_C_CALL ? "Cc" : "",
- events & RUBY_EVENT_C_RETURN ? "Cr" : "",
- events & RUBY_EVENT_B_CALL ? "Bc" : "",
+ events & RUBY_EVENT_LINE ? "Li" : "",
+ events & RUBY_EVENT_CLASS ? "Cl" : "",
+ events & RUBY_EVENT_END ? "En" : "",
+ events & RUBY_EVENT_CALL ? "Ca" : "",
+ events & RUBY_EVENT_RETURN ? "Re" : "",
+ events & RUBY_EVENT_C_CALL ? "Cc" : "",
+ events & RUBY_EVENT_C_RETURN ? "Cr" : "",
+ events & RUBY_EVENT_B_CALL ? "Bc" : "",
events & RUBY_EVENT_B_RETURN ? "Br" : "",
events & RUBY_EVENT_COVERAGE_LINE ? "Cli" : "",
events & RUBY_EVENT_COVERAGE_BRANCH ? "Cbr" : "");
- }
+ }
}
right_strip(str);
if (ret) {
- rb_str_cat2(str, "\n");
- rb_str_concat(ret, str);
+ rb_str_cat2(str, "\n");
+ rb_str_concat(ret, str);
}
else {
- printf("%.*s\n", (int)RSTRING_LEN(str), RSTRING_PTR(str));
+ printf("%.*s\n", (int)RSTRING_LEN(str), RSTRING_PTR(str));
}
return len;
}
@@ -2093,39 +2344,39 @@ catch_type(int type)
{
switch (type) {
case CATCH_TYPE_RESCUE:
- return "rescue";
+ return "rescue";
case CATCH_TYPE_ENSURE:
- return "ensure";
+ return "ensure";
case CATCH_TYPE_RETRY:
- return "retry";
+ return "retry";
case CATCH_TYPE_BREAK:
- return "break";
+ return "break";
case CATCH_TYPE_REDO:
- return "redo";
+ return "redo";
case CATCH_TYPE_NEXT:
- return "next";
+ return "next";
default:
- rb_bug("unknown catch type: %d", type);
- return 0;
+ rb_bug("unknown catch type: %d", type);
+ return 0;
}
}
static VALUE
iseq_inspect(const rb_iseq_t *iseq)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
if (!body->location.label) {
- return rb_sprintf("#<ISeq: uninitialized>");
+ return rb_sprintf("#<ISeq: uninitialized>");
}
else {
- const rb_code_location_t *loc = &body->location.code_location;
- return rb_sprintf("#<ISeq:%"PRIsVALUE"@%"PRIsVALUE":%d (%d,%d)-(%d,%d)>",
- body->location.label, rb_iseq_path(iseq),
- loc->beg_pos.lineno,
- loc->beg_pos.lineno,
- loc->beg_pos.column,
- loc->end_pos.lineno,
- loc->end_pos.column);
+ const rb_code_location_t *loc = &body->location.code_location;
+ return rb_sprintf("#<ISeq:%"PRIsVALUE"@%"PRIsVALUE":%d (%d,%d)-(%d,%d)>",
+ body->location.label, rb_iseq_path(iseq),
+ loc->beg_pos.lineno,
+ loc->beg_pos.lineno,
+ loc->beg_pos.column,
+ loc->end_pos.lineno,
+ loc->end_pos.column);
}
}
@@ -2138,10 +2389,10 @@ static const rb_data_type_t tmp_set = {
static VALUE
rb_iseq_disasm_recursive(const rb_iseq_t *iseq, VALUE indent)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE *code;
VALUE str = rb_str_new(0, 0);
- VALUE child = rb_ary_tmp_new(3);
+ VALUE child = rb_ary_hidden_new(3);
unsigned int size;
unsigned int i;
long l;
@@ -2161,113 +2412,113 @@ rb_iseq_disasm_recursive(const rb_iseq_t *iseq, VALUE indent)
rb_str_cat2(str, "== disasm: ");
rb_str_append(str, iseq_inspect(iseq));
- rb_str_catf(str, " (catch: %s)", body->catch_except_p ? "TRUE" : "FALSE");
+ rb_str_catf(str, " (catch: %s)", body->catch_except_p ? "true" : "false");
if ((l = RSTRING_LEN(str) - indent_len) < header_minlen) {
- rb_str_modify_expand(str, header_minlen - l);
- memset(RSTRING_END(str), '=', header_minlen - l);
+ rb_str_modify_expand(str, header_minlen - l);
+ memset(RSTRING_END(str), '=', header_minlen - l);
}
rb_str_cat2(str, "\n");
/* show catch table information */
if (body->catch_table) {
- rb_str_cat(str, indent_str, indent_len);
- rb_str_cat2(str, "== catch table\n");
+ rb_str_cat(str, indent_str, indent_len);
+ rb_str_cat2(str, "== catch table\n");
}
if (body->catch_table) {
- rb_str_cat_cstr(indent, "| ");
- indent_str = RSTRING_PTR(indent);
- for (i = 0; i < body->catch_table->size; i++) {
- const struct iseq_catch_table_entry *entry =
- UNALIGNED_MEMBER_PTR(body->catch_table, entries[i]);
- rb_str_cat(str, indent_str, indent_len);
- rb_str_catf(str,
- "| catch type: %-6s st: %04d ed: %04d sp: %04d cont: %04d\n",
- catch_type((int)entry->type), (int)entry->start,
- (int)entry->end, (int)entry->sp, (int)entry->cont);
- if (entry->iseq && !(done_iseq && st_is_member(done_iseq, (st_data_t)entry->iseq))) {
- rb_str_concat(str, rb_iseq_disasm_recursive(rb_iseq_check(entry->iseq), indent));
- if (!done_iseq) {
+ rb_str_cat_cstr(indent, "| ");
+ indent_str = RSTRING_PTR(indent);
+ for (i = 0; i < body->catch_table->size; i++) {
+ const struct iseq_catch_table_entry *entry =
+ UNALIGNED_MEMBER_PTR(body->catch_table, entries[i]);
+ rb_str_cat(str, indent_str, indent_len);
+ rb_str_catf(str,
+ "| catch type: %-6s st: %04d ed: %04d sp: %04d cont: %04d\n",
+ catch_type((int)entry->type), (int)entry->start,
+ (int)entry->end, (int)entry->sp, (int)entry->cont);
+ if (entry->iseq && !(done_iseq && st_is_member(done_iseq, (st_data_t)entry->iseq))) {
+ rb_str_concat(str, rb_iseq_disasm_recursive(rb_iseq_check(entry->iseq), indent));
+ if (!done_iseq) {
done_iseq = st_init_numtable();
done_iseq_wrapper = TypedData_Wrap_Struct(0, &tmp_set, done_iseq);
}
- st_insert(done_iseq, (st_data_t)entry->iseq, (st_data_t)0);
- indent_str = RSTRING_PTR(indent);
- }
- }
- rb_str_resize(indent, indent_len);
- indent_str = RSTRING_PTR(indent);
+ st_insert(done_iseq, (st_data_t)entry->iseq, (st_data_t)0);
+ indent_str = RSTRING_PTR(indent);
+ }
+ }
+ rb_str_resize(indent, indent_len);
+ indent_str = RSTRING_PTR(indent);
}
if (body->catch_table) {
- rb_str_cat(str, indent_str, indent_len);
- rb_str_cat2(str, "|-------------------------------------"
- "-----------------------------------\n");
+ rb_str_cat(str, indent_str, indent_len);
+ rb_str_cat2(str, "|-------------------------------------"
+ "-----------------------------------\n");
}
/* show local table information */
if (body->local_table) {
- const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
- rb_str_cat(str, indent_str, indent_len);
- rb_str_catf(str,
- "local table (size: %d, argc: %d "
- "[opts: %d, rest: %d, post: %d, block: %d, kw: %d@%d, kwrest: %d])\n",
- body->local_table_size,
- body->param.lead_num,
- body->param.opt_num,
- body->param.flags.has_rest ? body->param.rest_start : -1,
- body->param.post_num,
- body->param.flags.has_block ? body->param.block_start : -1,
- body->param.flags.has_kw ? keyword->num : -1,
- body->param.flags.has_kw ? keyword->required_num : -1,
- body->param.flags.has_kwrest ? keyword->rest_start : -1);
-
- for (i = body->local_table_size; i > 0;) {
- int li = body->local_table_size - --i - 1;
- long width;
- VALUE name = local_var_name(iseq, 0, i);
+ const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
+ rb_str_cat(str, indent_str, indent_len);
+ rb_str_catf(str,
+ "local table (size: %d, argc: %d "
+ "[opts: %d, rest: %d, post: %d, block: %d, kw: %d@%d, kwrest: %d])\n",
+ body->local_table_size,
+ body->param.lead_num,
+ body->param.opt_num,
+ body->param.flags.has_rest ? body->param.rest_start : -1,
+ body->param.post_num,
+ body->param.flags.has_block ? body->param.block_start : -1,
+ body->param.flags.has_kw ? keyword->num : -1,
+ body->param.flags.has_kw ? keyword->required_num : -1,
+ body->param.flags.has_kwrest ? keyword->rest_start : -1);
+
+ for (i = body->local_table_size; i > 0;) {
+ int li = body->local_table_size - --i - 1;
+ long width;
+ VALUE name = local_var_name(iseq, 0, i);
char argi[0x100];
char opti[0x100];
opti[0] = '\0';
- if (body->param.flags.has_opt) {
- int argc = body->param.lead_num;
- int opts = body->param.opt_num;
- if (li >= argc && li < argc + opts) {
- snprintf(opti, sizeof(opti), "Opt=%"PRIdVALUE,
- body->param.opt_table[li - argc]);
- }
- }
-
- snprintf(argi, sizeof(argi), "%s%s%s%s%s%s", /* arg, opts, rest, post, kwrest, block */
- body->param.lead_num > li ? "Arg" : "",
- opti,
- (body->param.flags.has_rest && body->param.rest_start == li) ? "Rest" : "",
- (body->param.flags.has_post && body->param.post_start <= li && li < body->param.post_start + body->param.post_num) ? "Post" : "",
- (body->param.flags.has_kwrest && keyword->rest_start == li) ? "Kwrest" : "",
- (body->param.flags.has_block && body->param.block_start == li) ? "Block" : "");
-
- rb_str_cat(str, indent_str, indent_len);
- rb_str_catf(str, "[%2d] ", i + 1);
- width = RSTRING_LEN(str) + 11;
- rb_str_append(str, name);
- if (*argi) rb_str_catf(str, "<%s>", argi);
- if ((width -= RSTRING_LEN(str)) > 0) rb_str_catf(str, "%*s", (int)width, "");
- }
- rb_str_cat_cstr(right_strip(str), "\n");
+ if (body->param.flags.has_opt) {
+ int argc = body->param.lead_num;
+ int opts = body->param.opt_num;
+ if (li >= argc && li < argc + opts) {
+ snprintf(opti, sizeof(opti), "Opt=%"PRIdVALUE,
+ body->param.opt_table[li - argc]);
+ }
+ }
+
+ snprintf(argi, sizeof(argi), "%s%s%s%s%s%s", /* arg, opts, rest, post, kwrest, block */
+ body->param.lead_num > li ? "Arg" : "",
+ opti,
+ (body->param.flags.has_rest && body->param.rest_start == li) ? "Rest" : "",
+ (body->param.flags.has_post && body->param.post_start <= li && li < body->param.post_start + body->param.post_num) ? "Post" : "",
+ (body->param.flags.has_kwrest && keyword->rest_start == li) ? "Kwrest" : "",
+ (body->param.flags.has_block && body->param.block_start == li) ? "Block" : "");
+
+ rb_str_cat(str, indent_str, indent_len);
+ rb_str_catf(str, "[%2d] ", i + 1);
+ width = RSTRING_LEN(str) + 11;
+ rb_str_append(str, name);
+ if (*argi) rb_str_catf(str, "<%s>", argi);
+ if ((width -= RSTRING_LEN(str)) > 0) rb_str_catf(str, "%*s", (int)width, "");
+ }
+ rb_str_cat_cstr(right_strip(str), "\n");
}
/* show each line */
code = rb_iseq_original_iseq(iseq);
for (n = 0; n < size;) {
- rb_str_cat(str, indent_str, indent_len);
- n += rb_iseq_disasm_insn(str, code, n, iseq, child);
+ rb_str_cat(str, indent_str, indent_len);
+ n += rb_iseq_disasm_insn(str, code, n, iseq, child);
}
for (l = 0; l < RARRAY_LEN(child); l++) {
- VALUE isv = rb_ary_entry(child, l);
- if (done_iseq && st_is_member(done_iseq, (st_data_t)isv)) continue;
- rb_str_cat_cstr(str, "\n");
- rb_str_concat(str, rb_iseq_disasm_recursive(rb_iseq_check((rb_iseq_t *)isv), indent));
- indent_str = RSTRING_PTR(indent);
+ VALUE isv = rb_ary_entry(child, l);
+ if (done_iseq && st_is_member(done_iseq, (st_data_t)isv)) continue;
+ rb_str_cat_cstr(str, "\n");
+ rb_str_concat(str, rb_iseq_disasm_recursive(rb_iseq_check((rb_iseq_t *)isv), indent));
+ indent_str = RSTRING_PTR(indent);
}
RB_GC_GUARD(done_iseq_wrapper);
@@ -2277,7 +2528,37 @@ rb_iseq_disasm_recursive(const rb_iseq_t *iseq, VALUE indent)
VALUE
rb_iseq_disasm(const rb_iseq_t *iseq)
{
- return rb_iseq_disasm_recursive(iseq, rb_str_new(0, 0));
+ VALUE str = rb_iseq_disasm_recursive(iseq, rb_str_new(0, 0));
+ rb_str_resize(str, RSTRING_LEN(str));
+ return str;
+}
+
+/*
+ * Estimates the number of instance variables that will be set on
+ * a given `class` with the initialize method defined in
+ * `initialize_iseq`
+ */
+attr_index_t
+rb_estimate_iv_count(VALUE klass, const rb_iseq_t * initialize_iseq)
+{
+ struct rb_id_table * iv_names = rb_id_table_create(0);
+
+ for (unsigned int i = 0; i < ISEQ_BODY(initialize_iseq)->ivc_size; i++) {
+ IVC cache = (IVC)&ISEQ_BODY(initialize_iseq)->is_entries[i];
+
+ if (cache->iv_set_name) {
+ rb_id_table_insert(iv_names, cache->iv_set_name, Qtrue);
+ }
+ }
+
+ attr_index_t count = (attr_index_t)rb_id_table_size(iv_names);
+
+ VALUE superclass = rb_class_superclass(klass);
+ count += RCLASS_EXT(superclass)->max_iv_count;
+
+ rb_id_table_free(iv_names);
+
+ return count;
}
/*
@@ -2309,7 +2590,7 @@ iseq_iterate_children(const rb_iseq_t *iseq, void (*iter_func)(const rb_iseq_t *
{
unsigned int i;
VALUE *code = rb_iseq_original_iseq(iseq);
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const rb_iseq_t *child;
VALUE all_children = rb_obj_hide(rb_ident_hash_new());
@@ -2319,7 +2600,7 @@ iseq_iterate_children(const rb_iseq_t *iseq, void (*iter_func)(const rb_iseq_t *
UNALIGNED_MEMBER_PTR(body->catch_table, entries[i]);
child = entry->iseq;
if (child) {
- if (rb_hash_aref(all_children, (VALUE)child) == Qnil) {
+ if (NIL_P(rb_hash_aref(all_children, (VALUE)child))) {
rb_hash_aset(all_children, (VALUE)child, Qtrue);
(*iter_func)(child, data);
}
@@ -2338,7 +2619,7 @@ iseq_iterate_children(const rb_iseq_t *iseq, void (*iter_func)(const rb_iseq_t *
case TS_ISEQ:
child = (const rb_iseq_t *)code[i+j+1];
if (child) {
- if (rb_hash_aref(all_children, (VALUE)child) == Qnil) {
+ if (NIL_P(rb_hash_aref(all_children, (VALUE)child))) {
rb_hash_aset(all_children, (VALUE)child, Qtrue);
(*iter_func)(child, data);
}
@@ -2401,15 +2682,15 @@ static VALUE
iseqw_trace_points(VALUE self)
{
const rb_iseq_t *iseq = iseqw_check(self);
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
unsigned int i;
VALUE ary = rb_ary_new();
for (i=0; i<body->insns_info.size; i++) {
- const struct iseq_insn_info_entry *entry = &body->insns_info.body[i];
- if (entry->events) {
- push_event_info(iseq, entry->events, entry->line_no, ary);
- }
+ const struct iseq_insn_info_entry *entry = &body->insns_info.body[i];
+ if (entry->events) {
+ push_event_info(iseq, entry->events, entry->line_no, ary);
+ }
}
return ary;
}
@@ -2536,17 +2817,11 @@ ruby_node_name(int node)
switch (node) {
#include "node_name.inc"
default:
- rb_bug("unknown node: %d", node);
- return 0;
+ rb_bug("unknown node: %d", node);
+ return 0;
}
}
-#define DECL_SYMBOL(name) \
- static ID sym_##name
-
-#define INIT_SYMBOL(name) \
- sym_##name = rb_intern(#name)
-
static VALUE
register_label(struct st_table *table, unsigned long idx)
{
@@ -2567,7 +2842,7 @@ exception_type2symbol(VALUE type)
case CATCH_TYPE_REDO: CONST_ID(id, "redo"); break;
case CATCH_TYPE_NEXT: CONST_ID(id, "next"); break;
default:
- rb_bug("unknown exception type: %d", (int)type);
+ rb_bug("unknown exception type: %d", (int)type);
}
return ID2SYM(id);
}
@@ -2586,12 +2861,58 @@ static const rb_data_type_t label_wrapper = {
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};
+#define DECL_ID(name) \
+ static ID id_##name
+
+#define INIT_ID(name) \
+ id_##name = rb_intern(#name)
+
+static VALUE
+iseq_type_id(enum rb_iseq_type type)
+{
+ DECL_ID(top);
+ DECL_ID(method);
+ DECL_ID(block);
+ DECL_ID(class);
+ DECL_ID(rescue);
+ DECL_ID(ensure);
+ DECL_ID(eval);
+ DECL_ID(main);
+ DECL_ID(plain);
+
+ if (id_top == 0) {
+ INIT_ID(top);
+ INIT_ID(method);
+ INIT_ID(block);
+ INIT_ID(class);
+ INIT_ID(rescue);
+ INIT_ID(ensure);
+ INIT_ID(eval);
+ INIT_ID(main);
+ INIT_ID(plain);
+ }
+
+ switch (type) {
+ case ISEQ_TYPE_TOP: return id_top;
+ case ISEQ_TYPE_METHOD: return id_method;
+ case ISEQ_TYPE_BLOCK: return id_block;
+ case ISEQ_TYPE_CLASS: return id_class;
+ case ISEQ_TYPE_RESCUE: return id_rescue;
+ case ISEQ_TYPE_ENSURE: return id_ensure;
+ case ISEQ_TYPE_EVAL: return id_eval;
+ case ISEQ_TYPE_MAIN: return id_main;
+ case ISEQ_TYPE_PLAIN: return id_plain;
+ };
+
+ rb_bug("unsupported iseq type: %d", (int)type);
+}
+
static VALUE
iseq_data_to_ary(const rb_iseq_t *iseq)
{
unsigned int i;
long l;
- const struct rb_iseq_constant_body *const iseq_body = iseq->body;
+ const struct rb_iseq_constant_body *const iseq_body = ISEQ_BODY(iseq);
const struct iseq_insn_info_entry *prev_insn_info;
unsigned int pos;
int last_line = 0;
@@ -2610,214 +2931,191 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
struct st_table *labels_table = st_init_numtable();
VALUE labels_wrapper = TypedData_Wrap_Struct(0, &label_wrapper, labels_table);
- DECL_SYMBOL(top);
- DECL_SYMBOL(method);
- DECL_SYMBOL(block);
- DECL_SYMBOL(class);
- DECL_SYMBOL(rescue);
- DECL_SYMBOL(ensure);
- DECL_SYMBOL(eval);
- DECL_SYMBOL(main);
- DECL_SYMBOL(plain);
-
- if (sym_top == 0) {
- int i;
- for (i=0; i<numberof(insn_syms); i++) {
+ if (insn_syms[0] == 0) {
+ int i;
+ for (i=0; i<numberof(insn_syms); i++) {
insn_syms[i] = rb_intern(insn_name(i));
- }
- INIT_SYMBOL(top);
- INIT_SYMBOL(method);
- INIT_SYMBOL(block);
- INIT_SYMBOL(class);
- INIT_SYMBOL(rescue);
- INIT_SYMBOL(ensure);
- INIT_SYMBOL(eval);
- INIT_SYMBOL(main);
- INIT_SYMBOL(plain);
+ }
}
/* type */
- switch (iseq_body->type) {
- case ISEQ_TYPE_TOP: type = sym_top; break;
- case ISEQ_TYPE_METHOD: type = sym_method; break;
- case ISEQ_TYPE_BLOCK: type = sym_block; break;
- case ISEQ_TYPE_CLASS: type = sym_class; break;
- case ISEQ_TYPE_RESCUE: type = sym_rescue; break;
- case ISEQ_TYPE_ENSURE: type = sym_ensure; break;
- case ISEQ_TYPE_EVAL: type = sym_eval; break;
- case ISEQ_TYPE_MAIN: type = sym_main; break;
- case ISEQ_TYPE_PLAIN: type = sym_plain; break;
- default: rb_bug("unsupported iseq type: %d", (int)iseq_body->type);
- };
+ type = iseq_type_id(iseq_body->type);
/* locals */
for (i=0; i<iseq_body->local_table_size; i++) {
- ID lid = iseq_body->local_table[i];
- if (lid) {
- if (rb_id2str(lid)) {
- rb_ary_push(locals, ID2SYM(lid));
- }
- else { /* hidden variable from id_internal() */
- rb_ary_push(locals, ULONG2NUM(iseq_body->local_table_size-i+1));
- }
- }
- else {
- rb_ary_push(locals, ID2SYM(rb_intern("#arg_rest")));
- }
+ ID lid = iseq_body->local_table[i];
+ if (lid) {
+ if (rb_id2str(lid)) {
+ rb_ary_push(locals, ID2SYM(lid));
+ }
+ else { /* hidden variable from id_internal() */
+ rb_ary_push(locals, ULONG2NUM(iseq_body->local_table_size-i+1));
+ }
+ }
+ else {
+ rb_ary_push(locals, ID2SYM(rb_intern("#arg_rest")));
+ }
}
/* params */
{
- const struct rb_iseq_param_keyword *const keyword = iseq_body->param.keyword;
- int j;
-
- if (iseq_body->param.flags.has_opt) {
- int len = iseq_body->param.opt_num + 1;
- VALUE arg_opt_labels = rb_ary_new2(len);
-
- for (j = 0; j < len; j++) {
- VALUE l = register_label(labels_table, iseq_body->param.opt_table[j]);
- rb_ary_push(arg_opt_labels, l);
- }
- rb_hash_aset(params, ID2SYM(rb_intern("opt")), arg_opt_labels);
- }
-
- /* commit */
- if (iseq_body->param.flags.has_lead) rb_hash_aset(params, ID2SYM(rb_intern("lead_num")), INT2FIX(iseq_body->param.lead_num));
- if (iseq_body->param.flags.has_post) rb_hash_aset(params, ID2SYM(rb_intern("post_num")), INT2FIX(iseq_body->param.post_num));
- if (iseq_body->param.flags.has_post) rb_hash_aset(params, ID2SYM(rb_intern("post_start")), INT2FIX(iseq_body->param.post_start));
- if (iseq_body->param.flags.has_rest) rb_hash_aset(params, ID2SYM(rb_intern("rest_start")), INT2FIX(iseq_body->param.rest_start));
- if (iseq_body->param.flags.has_block) rb_hash_aset(params, ID2SYM(rb_intern("block_start")), INT2FIX(iseq_body->param.block_start));
- if (iseq_body->param.flags.has_kw) {
- VALUE keywords = rb_ary_new();
- int i, j;
- for (i=0; i<keyword->required_num; i++) {
- rb_ary_push(keywords, ID2SYM(keyword->table[i]));
- }
- for (j=0; i<keyword->num; i++, j++) {
- VALUE key = rb_ary_new_from_args(1, ID2SYM(keyword->table[i]));
- if (keyword->default_values[j] != Qundef) {
- rb_ary_push(key, keyword->default_values[j]);
- }
- rb_ary_push(keywords, key);
- }
-
- rb_hash_aset(params, ID2SYM(rb_intern("kwbits")),
- INT2FIX(keyword->bits_start));
- rb_hash_aset(params, ID2SYM(rb_intern("keyword")), keywords);
- }
- if (iseq_body->param.flags.has_kwrest) rb_hash_aset(params, ID2SYM(rb_intern("kwrest")), INT2FIX(keyword->rest_start));
- if (iseq_body->param.flags.ambiguous_param0) rb_hash_aset(params, ID2SYM(rb_intern("ambiguous_param0")), Qtrue);
+ const struct rb_iseq_param_keyword *const keyword = iseq_body->param.keyword;
+ int j;
+
+ if (iseq_body->param.flags.has_opt) {
+ int len = iseq_body->param.opt_num + 1;
+ VALUE arg_opt_labels = rb_ary_new2(len);
+
+ for (j = 0; j < len; j++) {
+ VALUE l = register_label(labels_table, iseq_body->param.opt_table[j]);
+ rb_ary_push(arg_opt_labels, l);
+ }
+ rb_hash_aset(params, ID2SYM(rb_intern("opt")), arg_opt_labels);
+ }
+
+ /* commit */
+ if (iseq_body->param.flags.has_lead) rb_hash_aset(params, ID2SYM(rb_intern("lead_num")), INT2FIX(iseq_body->param.lead_num));
+ if (iseq_body->param.flags.has_post) rb_hash_aset(params, ID2SYM(rb_intern("post_num")), INT2FIX(iseq_body->param.post_num));
+ if (iseq_body->param.flags.has_post) rb_hash_aset(params, ID2SYM(rb_intern("post_start")), INT2FIX(iseq_body->param.post_start));
+ if (iseq_body->param.flags.has_rest) rb_hash_aset(params, ID2SYM(rb_intern("rest_start")), INT2FIX(iseq_body->param.rest_start));
+ if (iseq_body->param.flags.has_block) rb_hash_aset(params, ID2SYM(rb_intern("block_start")), INT2FIX(iseq_body->param.block_start));
+ if (iseq_body->param.flags.has_kw) {
+ VALUE keywords = rb_ary_new();
+ int i, j;
+ for (i=0; i<keyword->required_num; i++) {
+ rb_ary_push(keywords, ID2SYM(keyword->table[i]));
+ }
+ for (j=0; i<keyword->num; i++, j++) {
+ VALUE key = rb_ary_new_from_args(1, ID2SYM(keyword->table[i]));
+ if (!UNDEF_P(keyword->default_values[j])) {
+ rb_ary_push(key, keyword->default_values[j]);
+ }
+ rb_ary_push(keywords, key);
+ }
+
+ rb_hash_aset(params, ID2SYM(rb_intern("kwbits")),
+ INT2FIX(keyword->bits_start));
+ rb_hash_aset(params, ID2SYM(rb_intern("keyword")), keywords);
+ }
+ if (iseq_body->param.flags.has_kwrest) rb_hash_aset(params, ID2SYM(rb_intern("kwrest")), INT2FIX(keyword->rest_start));
+ if (iseq_body->param.flags.ambiguous_param0) rb_hash_aset(params, ID2SYM(rb_intern("ambiguous_param0")), Qtrue);
}
/* body */
iseq_original = rb_iseq_original_iseq((rb_iseq_t *)iseq);
for (seq = iseq_original; seq < iseq_original + iseq_body->iseq_size; ) {
- VALUE insn = *seq++;
- int j, len = insn_len(insn);
- VALUE *nseq = seq + len - 1;
- VALUE ary = rb_ary_new2(len);
+ VALUE insn = *seq++;
+ int j, len = insn_len(insn);
+ VALUE *nseq = seq + len - 1;
+ VALUE ary = rb_ary_new2(len);
rb_ary_push(ary, ID2SYM(insn_syms[insn%numberof(insn_syms)]));
- for (j=0; j<len-1; j++, seq++) {
- switch (insn_op_type(insn, j)) {
- case TS_OFFSET: {
- unsigned long idx = nseq - iseq_original + *seq;
- rb_ary_push(ary, register_label(labels_table, idx));
- break;
- }
- case TS_LINDEX:
- case TS_NUM:
- rb_ary_push(ary, INT2FIX(*seq));
- break;
- case TS_VALUE:
- rb_ary_push(ary, obj_resurrect(*seq));
- break;
- case TS_ISEQ:
- {
- const rb_iseq_t *iseq = (rb_iseq_t *)*seq;
- if (iseq) {
- VALUE val = iseq_data_to_ary(rb_iseq_check(iseq));
- rb_ary_push(ary, val);
- }
- else {
- rb_ary_push(ary, Qnil);
- }
- }
- break;
- case TS_GENTRY:
- {
- struct rb_global_entry *entry = (struct rb_global_entry *)*seq;
- rb_ary_push(ary, ID2SYM(entry->id));
- }
- break;
- case TS_IC:
+ for (j=0; j<len-1; j++, seq++) {
+ enum ruby_insn_type_chars op_type = insn_op_type(insn, j);
+
+ switch (op_type) {
+ case TS_OFFSET: {
+ unsigned long idx = nseq - iseq_original + *seq;
+ rb_ary_push(ary, register_label(labels_table, idx));
+ break;
+ }
+ case TS_LINDEX:
+ case TS_NUM:
+ rb_ary_push(ary, INT2FIX(*seq));
+ break;
+ case TS_VALUE:
+ rb_ary_push(ary, obj_resurrect(*seq));
+ break;
+ case TS_ISEQ:
+ {
+ const rb_iseq_t *iseq = (rb_iseq_t *)*seq;
+ if (iseq) {
+ VALUE val = iseq_data_to_ary(rb_iseq_check(iseq));
+ rb_ary_push(ary, val);
+ }
+ else {
+ rb_ary_push(ary, Qnil);
+ }
+ }
+ break;
+ case TS_IC:
+ {
+ VALUE list = rb_ary_new();
+ const ID *ids = ((IC)*seq)->segments;
+ while (*ids) {
+ rb_ary_push(list, ID2SYM(*ids++));
+ }
+ rb_ary_push(ary, list);
+ }
+ break;
case TS_IVC:
- case TS_ISE:
- {
- union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)*seq;
- rb_ary_push(ary, INT2FIX(is - iseq_body->is_entries));
- }
- break;
+ case TS_ICVARC:
+ case TS_ISE:
+ {
+ union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)*seq;
+ rb_ary_push(ary, INT2FIX(is - ISEQ_IS_ENTRY_START(ISEQ_BODY(iseq), op_type)));
+ }
+ break;
case TS_CALLDATA:
- {
+ {
struct rb_call_data *cd = (struct rb_call_data *)*seq;
- struct rb_call_info *ci = &cd->ci;
- VALUE e = rb_hash_new();
- int orig_argc = ci->orig_argc;
-
- rb_hash_aset(e, ID2SYM(rb_intern("mid")), ci->mid ? ID2SYM(ci->mid) : Qnil);
- rb_hash_aset(e, ID2SYM(rb_intern("flag")), UINT2NUM(ci->flag));
-
- if (ci->flag & VM_CALL_KWARG) {
- struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
- int i;
- VALUE kw = rb_ary_new2((long)ci_kw->kw_arg->keyword_len);
-
- orig_argc -= ci_kw->kw_arg->keyword_len;
- for (i = 0; i < ci_kw->kw_arg->keyword_len; i++) {
- rb_ary_push(kw, ci_kw->kw_arg->keywords[i]);
- }
- rb_hash_aset(e, ID2SYM(rb_intern("kw_arg")), kw);
- }
-
- rb_hash_aset(e, ID2SYM(rb_intern("orig_argc")),
- INT2FIX(orig_argc));
- rb_ary_push(ary, e);
- }
- break;
- case TS_ID:
- rb_ary_push(ary, ID2SYM(*seq));
- break;
- case TS_CDHASH:
- {
- VALUE hash = *seq;
- VALUE val = rb_ary_new();
- int i;
-
- rb_hash_foreach(hash, cdhash_each, val);
-
- for (i=0; i<RARRAY_LEN(val); i+=2) {
- VALUE pos = FIX2INT(rb_ary_entry(val, i+1));
- unsigned long idx = nseq - iseq_original + pos;
-
- rb_ary_store(val, i+1,
- register_label(labels_table, idx));
- }
- rb_ary_push(ary, val);
- }
- break;
- case TS_FUNCPTR:
- {
+ const struct rb_callinfo *ci = cd->ci;
+ VALUE e = rb_hash_new();
+ int argc = vm_ci_argc(ci);
+
+ ID mid = vm_ci_mid(ci);
+ rb_hash_aset(e, ID2SYM(rb_intern("mid")), mid ? ID2SYM(mid) : Qnil);
+ rb_hash_aset(e, ID2SYM(rb_intern("flag")), UINT2NUM(vm_ci_flag(ci)));
+
+ if (vm_ci_flag(ci) & VM_CALL_KWARG) {
+ const struct rb_callinfo_kwarg *kwarg = vm_ci_kwarg(ci);
+ int i;
+ VALUE kw = rb_ary_new2((long)kwarg->keyword_len);
+
+ argc -= kwarg->keyword_len;
+ for (i = 0; i < kwarg->keyword_len; i++) {
+ rb_ary_push(kw, kwarg->keywords[i]);
+ }
+ rb_hash_aset(e, ID2SYM(rb_intern("kw_arg")), kw);
+ }
+
+ rb_hash_aset(e, ID2SYM(rb_intern("orig_argc")),
+ INT2FIX(argc));
+ rb_ary_push(ary, e);
+ }
+ break;
+ case TS_ID:
+ rb_ary_push(ary, ID2SYM(*seq));
+ break;
+ case TS_CDHASH:
+ {
+ VALUE hash = *seq;
+ VALUE val = rb_ary_new();
+ int i;
+
+ rb_hash_foreach(hash, cdhash_each, val);
+
+ for (i=0; i<RARRAY_LEN(val); i+=2) {
+ VALUE pos = FIX2INT(rb_ary_entry(val, i+1));
+ unsigned long idx = nseq - iseq_original + pos;
+
+ rb_ary_store(val, i+1,
+ register_label(labels_table, idx));
+ }
+ rb_ary_push(ary, val);
+ }
+ break;
+ case TS_FUNCPTR:
+ {
#if SIZEOF_VALUE <= SIZEOF_LONG
- VALUE val = LONG2NUM((SIGNED_VALUE)*seq);
+ VALUE val = LONG2NUM((SIGNED_VALUE)*seq);
#else
- VALUE val = LL2NUM((SIGNED_VALUE)*seq);
+ VALUE val = LL2NUM((SIGNED_VALUE)*seq);
#endif
- rb_ary_push(ary, val);
- }
- break;
+ rb_ary_push(ary, val);
+ }
+ break;
case TS_BUILTIN:
{
VALUE val = rb_hash_new();
@@ -2833,71 +3131,77 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
rb_ary_push(ary, val);
}
break;
- default:
- rb_bug("unknown operand: %c", insn_op_type(insn, j));
- }
- }
- rb_ary_push(body, ary);
+ default:
+ rb_bug("unknown operand: %c", insn_op_type(insn, j));
+ }
+ }
+ rb_ary_push(body, ary);
}
nbody = body;
/* exception */
if (iseq_body->catch_table) for (i=0; i<iseq_body->catch_table->size; i++) {
- VALUE ary = rb_ary_new();
- const struct iseq_catch_table_entry *entry =
- UNALIGNED_MEMBER_PTR(iseq_body->catch_table, entries[i]);
- rb_ary_push(ary, exception_type2symbol(entry->type));
- if (entry->iseq) {
- rb_ary_push(ary, iseq_data_to_ary(rb_iseq_check(entry->iseq)));
- }
- else {
- rb_ary_push(ary, Qnil);
- }
- rb_ary_push(ary, register_label(labels_table, entry->start));
- rb_ary_push(ary, register_label(labels_table, entry->end));
- rb_ary_push(ary, register_label(labels_table, entry->cont));
- rb_ary_push(ary, UINT2NUM(entry->sp));
- rb_ary_push(exception, ary);
+ VALUE ary = rb_ary_new();
+ const struct iseq_catch_table_entry *entry =
+ UNALIGNED_MEMBER_PTR(iseq_body->catch_table, entries[i]);
+ rb_ary_push(ary, exception_type2symbol(entry->type));
+ if (entry->iseq) {
+ rb_ary_push(ary, iseq_data_to_ary(rb_iseq_check(entry->iseq)));
+ }
+ else {
+ rb_ary_push(ary, Qnil);
+ }
+ rb_ary_push(ary, register_label(labels_table, entry->start));
+ rb_ary_push(ary, register_label(labels_table, entry->end));
+ rb_ary_push(ary, register_label(labels_table, entry->cont));
+ rb_ary_push(ary, UINT2NUM(entry->sp));
+ rb_ary_push(exception, ary);
}
/* make body with labels and insert line number */
body = rb_ary_new();
prev_insn_info = NULL;
+#ifdef USE_ISEQ_NODE_ID
+ VALUE node_ids = rb_ary_new();
+#endif
for (l=0, pos=0; l<RARRAY_LEN(nbody); l++) {
- const struct iseq_insn_info_entry *info;
- VALUE ary = RARRAY_AREF(nbody, l);
- st_data_t label;
+ const struct iseq_insn_info_entry *info;
+ VALUE ary = RARRAY_AREF(nbody, l);
+ st_data_t label;
- if (st_lookup(labels_table, pos, &label)) {
- rb_ary_push(body, (VALUE)label);
- }
+ if (st_lookup(labels_table, pos, &label)) {
+ rb_ary_push(body, (VALUE)label);
+ }
- info = get_insn_info(iseq, pos);
+ info = get_insn_info(iseq, pos);
+#ifdef USE_ISEQ_NODE_ID
+ rb_ary_push(node_ids, INT2FIX(info->node_id));
+#endif
- if (prev_insn_info != info) {
- int line = info->line_no;
- rb_event_flag_t events = info->events;
+ if (prev_insn_info != info) {
+ int line = info->line_no;
+ rb_event_flag_t events = info->events;
- if (line > 0 && last_line != line) {
- rb_ary_push(body, INT2FIX(line));
- last_line = line;
- }
+ if (line > 0 && last_line != line) {
+ rb_ary_push(body, INT2FIX(line));
+ last_line = line;
+ }
#define CHECK_EVENT(ev) if (events & ev) rb_ary_push(body, ID2SYM(rb_intern(#ev)));
- CHECK_EVENT(RUBY_EVENT_LINE);
- CHECK_EVENT(RUBY_EVENT_CLASS);
- CHECK_EVENT(RUBY_EVENT_END);
- CHECK_EVENT(RUBY_EVENT_CALL);
- CHECK_EVENT(RUBY_EVENT_RETURN);
- CHECK_EVENT(RUBY_EVENT_B_CALL);
- CHECK_EVENT(RUBY_EVENT_B_RETURN);
+ CHECK_EVENT(RUBY_EVENT_LINE);
+ CHECK_EVENT(RUBY_EVENT_CLASS);
+ CHECK_EVENT(RUBY_EVENT_END);
+ CHECK_EVENT(RUBY_EVENT_CALL);
+ CHECK_EVENT(RUBY_EVENT_RETURN);
+ CHECK_EVENT(RUBY_EVENT_B_CALL);
+ CHECK_EVENT(RUBY_EVENT_B_RETURN);
#undef CHECK_EVENT
- prev_insn_info = info;
- }
+ prev_insn_info = info;
+ }
- rb_ary_push(body, ary);
- pos += RARRAY_LENINT(ary); /* reject too huge data */
+ rb_ary_push(body, ary);
+ pos += RARRAY_LENINT(ary); /* reject too huge data */
}
RB_GC_GUARD(nbody);
RB_GC_GUARD(labels_wrapper);
@@ -2907,11 +3211,14 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
rb_hash_aset(misc, ID2SYM(rb_intern("stack_max")), INT2FIX(iseq_body->stack_max));
rb_hash_aset(misc, ID2SYM(rb_intern("node_id")), INT2FIX(iseq_body->location.node_id));
rb_hash_aset(misc, ID2SYM(rb_intern("code_location")),
- rb_ary_new_from_args(4,
- INT2FIX(iseq_body->location.code_location.beg_pos.lineno),
- INT2FIX(iseq_body->location.code_location.beg_pos.column),
- INT2FIX(iseq_body->location.code_location.end_pos.lineno),
- INT2FIX(iseq_body->location.code_location.end_pos.column)));
+ rb_ary_new_from_args(4,
+ INT2FIX(iseq_body->location.code_location.beg_pos.lineno),
+ INT2FIX(iseq_body->location.code_location.beg_pos.column),
+ INT2FIX(iseq_body->location.code_location.end_pos.lineno),
+ INT2FIX(iseq_body->location.code_location.end_pos.column)));
+#ifdef USE_ISEQ_NODE_ID
+ rb_hash_aset(misc, ID2SYM(rb_intern("node_ids")), node_ids);
+#endif
/*
* [:magic, :major_version, :minor_version, :format_type, :misc,
@@ -2926,7 +3233,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
rb_ary_push(val, iseq_body->location.label);
rb_ary_push(val, rb_iseq_path(iseq));
rb_ary_push(val, rb_iseq_realpath(iseq));
- rb_ary_push(val, iseq_body->location.first_lineno);
+ rb_ary_push(val, RB_INT2NUM(iseq_body->location.first_lineno));
rb_ary_push(val, ID2SYM(type));
rb_ary_push(val, locals);
rb_ary_push(val, params);
@@ -2939,92 +3246,101 @@ VALUE
rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
{
int i, r;
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
VALUE a, args = rb_ary_new2(body->param.size);
ID req, opt, rest, block, key, keyrest;
#define PARAM_TYPE(type) rb_ary_push(a = rb_ary_new2(2), ID2SYM(type))
#define PARAM_ID(i) body->local_table[(i)]
#define PARAM(i, type) ( \
- PARAM_TYPE(type), \
- rb_id2str(PARAM_ID(i)) ? \
- rb_ary_push(a, ID2SYM(PARAM_ID(i))) : \
- a)
+ PARAM_TYPE(type), \
+ rb_id2str(PARAM_ID(i)) ? \
+ rb_ary_push(a, ID2SYM(PARAM_ID(i))) : \
+ a)
CONST_ID(req, "req");
CONST_ID(opt, "opt");
if (is_proc) {
- for (i = 0; i < body->param.lead_num; i++) {
- PARAM_TYPE(opt);
- rb_ary_push(a, rb_id2str(PARAM_ID(i)) ? ID2SYM(PARAM_ID(i)) : Qnil);
- rb_ary_push(args, a);
- }
+ for (i = 0; i < body->param.lead_num; i++) {
+ PARAM_TYPE(opt);
+ rb_ary_push(a, rb_id2str(PARAM_ID(i)) ? ID2SYM(PARAM_ID(i)) : Qnil);
+ rb_ary_push(args, a);
+ }
}
else {
- for (i = 0; i < body->param.lead_num; i++) {
- rb_ary_push(args, PARAM(i, req));
- }
+ for (i = 0; i < body->param.lead_num; i++) {
+ rb_ary_push(args, PARAM(i, req));
+ }
}
r = body->param.lead_num + body->param.opt_num;
for (; i < r; i++) {
- PARAM_TYPE(opt);
- if (rb_id2str(PARAM_ID(i))) {
- rb_ary_push(a, ID2SYM(PARAM_ID(i)));
- }
- rb_ary_push(args, a);
+ PARAM_TYPE(opt);
+ if (rb_id2str(PARAM_ID(i))) {
+ rb_ary_push(a, ID2SYM(PARAM_ID(i)));
+ }
+ rb_ary_push(args, a);
}
if (body->param.flags.has_rest) {
- CONST_ID(rest, "rest");
- rb_ary_push(args, PARAM(body->param.rest_start, rest));
+ CONST_ID(rest, "rest");
+ rb_ary_push(args, PARAM(body->param.rest_start, rest));
}
r = body->param.post_start + body->param.post_num;
if (is_proc) {
- for (i = body->param.post_start; i < r; i++) {
- PARAM_TYPE(opt);
- rb_ary_push(a, rb_id2str(PARAM_ID(i)) ? ID2SYM(PARAM_ID(i)) : Qnil);
- rb_ary_push(args, a);
- }
+ for (i = body->param.post_start; i < r; i++) {
+ PARAM_TYPE(opt);
+ rb_ary_push(a, rb_id2str(PARAM_ID(i)) ? ID2SYM(PARAM_ID(i)) : Qnil);
+ rb_ary_push(args, a);
+ }
}
else {
- for (i = body->param.post_start; i < r; i++) {
- rb_ary_push(args, PARAM(i, req));
- }
+ for (i = body->param.post_start; i < r; i++) {
+ rb_ary_push(args, PARAM(i, req));
+ }
}
if (body->param.flags.accepts_no_kwarg) {
- ID nokey;
- CONST_ID(nokey, "nokey");
- PARAM_TYPE(nokey);
- rb_ary_push(args, a);
+ ID nokey;
+ CONST_ID(nokey, "nokey");
+ PARAM_TYPE(nokey);
+ rb_ary_push(args, a);
}
if (body->param.flags.has_kw) {
- i = 0;
- if (keyword->required_num > 0) {
- ID keyreq;
- CONST_ID(keyreq, "keyreq");
- for (; i < keyword->required_num; i++) {
- PARAM_TYPE(keyreq);
- if (rb_id2str(keyword->table[i])) {
- rb_ary_push(a, ID2SYM(keyword->table[i]));
- }
- rb_ary_push(args, a);
- }
- }
- CONST_ID(key, "key");
- for (; i < keyword->num; i++) {
- PARAM_TYPE(key);
- if (rb_id2str(keyword->table[i])) {
- rb_ary_push(a, ID2SYM(keyword->table[i]));
- }
- rb_ary_push(args, a);
- }
- }
- if (body->param.flags.has_kwrest) {
- CONST_ID(keyrest, "keyrest");
- rb_ary_push(args, PARAM(keyword->rest_start, keyrest));
+ i = 0;
+ if (keyword->required_num > 0) {
+ ID keyreq;
+ CONST_ID(keyreq, "keyreq");
+ for (; i < keyword->required_num; i++) {
+ PARAM_TYPE(keyreq);
+ if (rb_id2str(keyword->table[i])) {
+ rb_ary_push(a, ID2SYM(keyword->table[i]));
+ }
+ rb_ary_push(args, a);
+ }
+ }
+ CONST_ID(key, "key");
+ for (; i < keyword->num; i++) {
+ PARAM_TYPE(key);
+ if (rb_id2str(keyword->table[i])) {
+ rb_ary_push(a, ID2SYM(keyword->table[i]));
+ }
+ rb_ary_push(args, a);
+ }
+ }
+ if (body->param.flags.has_kwrest || body->param.flags.ruby2_keywords) {
+ ID param;
+ CONST_ID(keyrest, "keyrest");
+ PARAM_TYPE(keyrest);
+ if (body->param.flags.has_kwrest &&
+ rb_id2str(param = PARAM_ID(keyword->rest_start))) {
+ rb_ary_push(a, ID2SYM(param));
+ }
+ else if (body->param.flags.ruby2_keywords) {
+ rb_ary_push(a, ID2SYM(idPow));
+ }
+ rb_ary_push(args, a);
}
if (body->param.flags.has_block) {
- CONST_ID(block, "block");
- rb_ary_push(args, PARAM(body->param.block_start, block));
+ CONST_ID(block, "block");
+ rb_ary_push(args, PARAM(body->param.block_start, block));
}
return args;
}
@@ -3033,40 +3349,26 @@ VALUE
rb_iseq_defined_string(enum defined_type type)
{
static const char expr_names[][18] = {
- "nil",
- "instance-variable",
- "local-variable",
- "global-variable",
- "class variable",
- "constant",
- "method",
- "yield",
- "super",
- "self",
- "true",
- "false",
- "assignment",
- "expression",
+ "nil",
+ "instance-variable",
+ "local-variable",
+ "global-variable",
+ "class variable",
+ "constant",
+ "method",
+ "yield",
+ "super",
+ "self",
+ "true",
+ "false",
+ "assignment",
+ "expression",
};
const char *estr;
- VALUE *defs, str;
- if ((unsigned)(type - 1) >= (unsigned)numberof(expr_names)) return 0;
+ if ((unsigned)(type - 1) >= (unsigned)numberof(expr_names)) rb_bug("unknown defined type %d", type);
estr = expr_names[type - 1];
- if (!estr[0]) return 0;
- defs = GET_VM()->defined_strings;
- if (!defs) {
- defs = ruby_xcalloc(numberof(expr_names), sizeof(VALUE));
- GET_VM()->defined_strings = defs;
- }
- str = defs[type-1];
- if (!str) {
- str = rb_str_new_cstr(estr);
- OBJ_FREEZE(str);
- defs[type-1] = str;
- rb_gc_register_mark_object(str);
- }
- return str;
+ return rb_fstring_cstr(estr);
}
/* A map from encoded_insn to insn_data: decoded insn number, its len,
@@ -3088,7 +3390,7 @@ rb_vm_encoded_insn_data_table_init(void)
const void * const *table = rb_vm_get_insns_address_table();
#define INSN_CODE(insn) ((VALUE)table[insn])
#else
-#define INSN_CODE(insn) (insn)
+#define INSN_CODE(insn) ((VALUE)(insn))
#endif
st_data_t insn;
encoded_insn_data = st_init_numtable_with_size(VM_INSTRUCTION_SIZE / 2);
@@ -3099,8 +3401,15 @@ rb_vm_encoded_insn_data_table_init(void)
insn_data[insn].insn = (int)insn;
insn_data[insn].insn_len = insn_len(insn);
- insn_data[insn].notrace_encoded_insn = (void *) key1;
- insn_data[insn].trace_encoded_insn = (void *) key2;
+
+ if (insn != BIN(opt_invokebuiltin_delegate_leave)) {
+ insn_data[insn].notrace_encoded_insn = (void *) key1;
+ insn_data[insn].trace_encoded_insn = (void *) key2;
+ }
+ else {
+ insn_data[insn].notrace_encoded_insn = (void *) INSN_CODE(BIN(opt_invokebuiltin_delegate));
+ insn_data[insn].trace_encoded_insn = (void *) INSN_CODE(BIN(opt_invokebuiltin_delegate) + VM_INSTRUCTION_SIZE/2);
+ }
st_add_direct(encoded_insn_data, key1, (st_data_t)&insn_data[insn]);
st_add_direct(encoded_insn_data, key2, (st_data_t)&insn_data[insn]);
@@ -3121,14 +3430,48 @@ rb_vm_insn_addr2insn(const void *addr)
rb_bug("rb_vm_insn_addr2insn: invalid insn address: %p", addr);
}
+// Unlike rb_vm_insn_addr2insn, this function can return trace opcode variants.
+int
+rb_vm_insn_addr2opcode(const void *addr)
+{
+ st_data_t key = (st_data_t)addr;
+ st_data_t val;
+
+ if (st_lookup(encoded_insn_data, key, &val)) {
+ insn_data_t *e = (insn_data_t *)val;
+ int opcode = e->insn;
+ if (addr == e->trace_encoded_insn) {
+ opcode += VM_INSTRUCTION_SIZE/2;
+ }
+ return opcode;
+ }
+
+ rb_bug("rb_vm_insn_addr2opcode: invalid insn address: %p", addr);
+}
+
+// Decode `ISEQ_BODY(iseq)->iseq_encoded[i]` to an insn.
+int
+rb_vm_insn_decode(const VALUE encoded)
+{
+#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
+ int insn = rb_vm_insn_addr2insn((void *)encoded);
+#else
+ int insn = (int)encoded;
+#endif
+ return insn;
+}
+
static inline int
-encoded_iseq_trace_instrument(VALUE *iseq_encoded_insn, rb_event_flag_t turnon)
+encoded_iseq_trace_instrument(VALUE *iseq_encoded_insn, rb_event_flag_t turnon, bool remain_current_trace)
{
st_data_t key = (st_data_t)*iseq_encoded_insn;
st_data_t val;
if (st_lookup(encoded_insn_data, key, &val)) {
insn_data_t *e = (insn_data_t *)val;
+ if (remain_current_trace && key == (st_data_t)e->trace_encoded_insn) {
+ turnon = 1;
+ }
*iseq_encoded_insn = (VALUE) (turnon ? e->trace_encoded_insn : e->notrace_encoded_insn);
return e->insn_len;
}
@@ -3139,17 +3482,34 @@ encoded_iseq_trace_instrument(VALUE *iseq_encoded_insn, rb_event_flag_t turnon)
void
rb_iseq_trace_flag_cleared(const rb_iseq_t *iseq, size_t pos)
{
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
- encoded_iseq_trace_instrument(&iseq_encoded[pos], 0);
+ encoded_iseq_trace_instrument(&iseq_encoded[pos], 0, false);
+}
+
+// We need to fire call events on instructions with b_call events if the block
+// is running as a method. So, if we are listening for call events, then
+// instructions that have b_call events need to become trace variants.
+// Use this function when making decisions about recompiling to trace variants.
+static inline rb_event_flag_t
+add_bmethod_events(rb_event_flag_t events)
+{
+ if (events & RUBY_EVENT_CALL) {
+ events |= RUBY_EVENT_B_CALL;
+ }
+ if (events & RUBY_EVENT_RETURN) {
+ events |= RUBY_EVENT_B_RETURN;
+ }
+ return events;
}
+// Note, to support call/return events for bmethods, turnon_event can have more events than tpval.
static int
iseq_add_local_tracepoint(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
{
unsigned int pc;
int n = 0;
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
VM_ASSERT(ISEQ_EXECUTABLE_P(iseq));
@@ -3170,12 +3530,13 @@ iseq_add_local_tracepoint(const rb_iseq_t *iseq, rb_event_flag_t turnon_events,
if (pc_events & target_events) {
n++;
}
- pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & (target_events | iseq->aux.exec.global_trace_events));
+ pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & (target_events | iseq->aux.exec.global_trace_events), true);
}
if (n > 0) {
if (iseq->aux.exec.local_hooks == NULL) {
((rb_iseq_t *)iseq)->aux.exec.local_hooks = RB_ZALLOC(rb_hook_list_t);
+ iseq->aux.exec.local_hooks->is_local = true;
}
rb_hook_list_connect_tracepoint((VALUE)iseq, iseq->aux.exec.local_hooks, tpval, target_line);
}
@@ -3199,9 +3560,12 @@ iseq_add_local_tracepoint_i(const rb_iseq_t *iseq, void *p)
}
int
-rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
+rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, bool target_bmethod)
{
struct trace_set_local_events_struct data;
+ if (target_bmethod) {
+ turnon_events = add_bmethod_events(turnon_events);
+ }
data.turnon_events = turnon_events;
data.tpval = tpval;
data.target_line = target_line;
@@ -3219,7 +3583,7 @@ iseq_remove_local_tracepoint(const rb_iseq_t *iseq, VALUE tpval)
if (iseq->aux.exec.local_hooks) {
unsigned int pc;
- const struct rb_iseq_constant_body *const body = iseq->body;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
rb_event_flag_t local_events = 0;
@@ -3227,15 +3591,14 @@ iseq_remove_local_tracepoint(const rb_iseq_t *iseq, VALUE tpval)
local_events = iseq->aux.exec.local_hooks->events;
if (local_events == 0) {
- if (iseq->aux.exec.local_hooks->running == 0) {
- rb_hook_list_free(iseq->aux.exec.local_hooks);
- }
+ rb_hook_list_free(iseq->aux.exec.local_hooks);
((rb_iseq_t *)iseq)->aux.exec.local_hooks = NULL;
}
+ local_events = add_bmethod_events(local_events);
for (pc = 0; pc<body->iseq_size;) {
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
- pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & (local_events | iseq->aux.exec.global_trace_events));
+ pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & (local_events | iseq->aux.exec.global_trace_events), false);
}
}
return n;
@@ -3269,29 +3632,55 @@ void
rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
{
if (iseq->aux.exec.global_trace_events == turnon_events) {
- return;
+ return;
}
if (!ISEQ_EXECUTABLE_P(iseq)) {
- /* this is building ISeq */
- return;
+ /* this is building ISeq */
+ return;
}
else {
unsigned int pc;
- const struct rb_iseq_constant_body *const body = iseq->body;
- VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
+ const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
+ VALUE *iseq_encoded = (VALUE *)body->iseq_encoded;
rb_event_flag_t enabled_events;
rb_event_flag_t local_events = iseq->aux.exec.local_hooks ? iseq->aux.exec.local_hooks->events : 0;
((rb_iseq_t *)iseq)->aux.exec.global_trace_events = turnon_events;
- enabled_events = turnon_events | local_events;
+ enabled_events = add_bmethod_events(turnon_events | local_events);
for (pc=0; pc<body->iseq_size;) {
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
- pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & enabled_events);
- }
+ pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & enabled_events, true);
+ }
}
}
+bool rb_vm_call_ivar_attrset_p(const vm_call_handler ch);
+void rb_vm_cc_general(const struct rb_callcache *cc);
+
+static int
+clear_attr_ccs_i(void *vstart, void *vend, size_t stride, void *data)
+{
+ VALUE v = (VALUE)vstart;
+ for (; v != (VALUE)vend; v += stride) {
+ void *ptr = asan_poisoned_object_p(v);
+ asan_unpoison_object(v, false);
+
+ if (imemo_type_p(v, imemo_callcache) && rb_vm_call_ivar_attrset_p(((const struct rb_callcache *)v)->call_)) {
+ rb_vm_cc_general((struct rb_callcache *)v);
+ }
+
+ asan_poison_object_if(ptr, v);
+ }
+ return 0;
+}
+
+void
+rb_clear_attr_ccs(void)
+{
+ rb_objspace_each_objects(clear_attr_ccs_i, NULL);
+}
+
static int
trace_set_i(void *vstart, void *vend, size_t stride, void *data)
{
@@ -3302,9 +3691,12 @@ trace_set_i(void *vstart, void *vend, size_t stride, void *data)
void *ptr = asan_poisoned_object_p(v);
asan_unpoison_object(v, false);
- if (rb_obj_is_iseq(v)) {
- rb_iseq_trace_set(rb_iseq_check((rb_iseq_t *)v), turnon_events);
- }
+ if (rb_obj_is_iseq(v)) {
+ rb_iseq_trace_set(rb_iseq_check((rb_iseq_t *)v), turnon_events);
+ }
+ else if (imemo_type_p(v, imemo_callcache) && rb_vm_call_ivar_attrset_p(((const struct rb_callcache *)v)->call_)) {
+ rb_vm_cc_general((struct rb_callcache *)v);
+ }
asan_poison_object_if(ptr, v);
}
@@ -3416,9 +3808,9 @@ iseqw_s_load_from_binary_extra_data(VALUE self, VALUE str)
struct succ_index_table {
uint64_t imm_part[IMMEDIATE_TABLE_SIZE / 9];
struct succ_dict_block {
- unsigned int rank;
- uint64_t small_block_ranks; /* 9 bits * 7 = 63 bits */
- uint64_t bits[512/64];
+ unsigned int rank;
+ uint64_t small_block_ranks; /* 9 bits * 7 = 63 bits */
+ uint64_t bits[512/64];
} succ_part[FLEX_ARY_LEN];
};
@@ -3440,27 +3832,27 @@ succ_index_table_create(int max_pos, int *data, int size)
r = 0;
for (j = 0; j < imm_size; j++) {
- for (i = 0; i < 9; i++) {
- if (r < size && data[r] == j * 9 + i) r++;
- imm_block_rank_set(sd->imm_part[j], i, r);
- }
+ for (i = 0; i < 9; i++) {
+ if (r < size && data[r] == j * 9 + i) r++;
+ imm_block_rank_set(sd->imm_part[j], i, r);
+ }
}
for (k = 0; k < succ_size; k++) {
- struct succ_dict_block *sd_block = &sd->succ_part[k];
- int small_rank = 0;
- sd_block->rank = r;
- for (j = 0; j < 8; j++) {
- uint64_t bits = 0;
- if (j) small_block_rank_set(sd_block->small_block_ranks, j, small_rank);
- for (i = 0; i < 64; i++) {
- if (r < size && data[r] == k * 512 + j * 64 + i + IMMEDIATE_TABLE_SIZE) {
- bits |= ((uint64_t)1) << i;
- r++;
- }
- }
- sd_block->bits[j] = bits;
- small_rank += rb_popcount64(bits);
- }
+ struct succ_dict_block *sd_block = &sd->succ_part[k];
+ int small_rank = 0;
+ sd_block->rank = r;
+ for (j = 0; j < 8; j++) {
+ uint64_t bits = 0;
+ if (j) small_block_rank_set(sd_block->small_block_ranks, j, small_rank);
+ for (i = 0; i < 64; i++) {
+ if (r < size && data[r] == k * 512 + j * 64 + i + IMMEDIATE_TABLE_SIZE) {
+ bits |= ((uint64_t)1) << i;
+ r++;
+ }
+ }
+ sd_block->bits[j] = bits;
+ small_rank += rb_popcount64(bits);
+ }
}
return sd;
}
@@ -3474,20 +3866,20 @@ succ_index_table_invert(int max_pos, struct succ_index_table *sd, int size)
int i, j, k, r = -1;
p = positions;
for (j = 0; j < imm_size; j++) {
- for (i = 0; i < 9; i++) {
- int nr = imm_block_rank_get(sd->imm_part[j], i);
- if (r != nr) *p++ = j * 9 + i;
- r = nr;
- }
+ for (i = 0; i < 9; i++) {
+ int nr = imm_block_rank_get(sd->imm_part[j], i);
+ if (r != nr) *p++ = j * 9 + i;
+ r = nr;
+ }
}
for (k = 0; k < succ_size; k++) {
- for (j = 0; j < 8; j++) {
- for (i = 0; i < 64; i++) {
- if (sd->succ_part[k].bits[j] & (((uint64_t)1) << i)) {
- *p++ = k * 512 + j * 64 + i + IMMEDIATE_TABLE_SIZE;
- }
- }
- }
+ for (j = 0; j < 8; j++) {
+ for (i = 0; i < 64; i++) {
+ if (sd->succ_part[k].bits[j] & (((uint64_t)1) << i)) {
+ *p++ = k * 512 + j * 64 + i + IMMEDIATE_TABLE_SIZE;
+ }
+ }
+ }
}
return positions;
}
@@ -3496,23 +3888,43 @@ static int
succ_index_lookup(const struct succ_index_table *sd, int x)
{
if (x < IMMEDIATE_TABLE_SIZE) {
- const int i = x / 9;
- const int j = x % 9;
- return imm_block_rank_get(sd->imm_part[i], j);
+ const int i = x / 9;
+ const int j = x % 9;
+ return imm_block_rank_get(sd->imm_part[i], j);
}
else {
- const int block_index = (x - IMMEDIATE_TABLE_SIZE) / 512;
- const struct succ_dict_block *block = &sd->succ_part[block_index];
- const int block_bit_index = (x - IMMEDIATE_TABLE_SIZE) % 512;
- const int small_block_index = block_bit_index / 64;
- const int small_block_popcount = small_block_rank_get(block->small_block_ranks, small_block_index);
- const int popcnt = rb_popcount64(block->bits[small_block_index] << (63 - block_bit_index % 64));
+ const int block_index = (x - IMMEDIATE_TABLE_SIZE) / 512;
+ const struct succ_dict_block *block = &sd->succ_part[block_index];
+ const int block_bit_index = (x - IMMEDIATE_TABLE_SIZE) % 512;
+ const int small_block_index = block_bit_index / 64;
+ const int small_block_popcount = small_block_rank_get(block->small_block_ranks, small_block_index);
+ const int popcnt = rb_popcount64(block->bits[small_block_index] << (63 - block_bit_index % 64));
- return block->rank + small_block_popcount + popcnt;
+ return block->rank + small_block_popcount + popcnt;
}
}
#endif
+
+/*
+ * call-seq:
+ * iseq.script_lines -> array or nil
+ *
+ * It returns recorded script lines if it is availalble.
+ * The script lines are not limited to the iseq range, but
+ * are entire lines of the source file.
+ *
+ * Note that this is an API for ruby internal use, debugging,
+ * and research. Do not use this for any other purpose.
+ * The compatibility is not guaranteed.
+ */
+static VALUE
+iseqw_script_lines(VALUE self)
+{
+ const rb_iseq_t *iseq = iseqw_check(self);
+ return ISEQ_BODY(iseq)->variable.script_lines;
+}
+
/*
* Document-class: RubyVM::InstructionSequence
*
@@ -3553,7 +3965,6 @@ Init_ISeq(void)
rb_define_singleton_method(rb_cISeq, "load_from_binary", iseqw_s_load_from_binary, 1);
rb_define_singleton_method(rb_cISeq, "load_from_binary_extra_data", iseqw_s_load_from_binary_extra_data, 1);
-
/* location APIs */
rb_define_method(rb_cISeq, "path", iseqw_path, 0);
rb_define_method(rb_cISeq, "absolute_path", iseqw_absolute_path, 0);
@@ -3580,6 +3991,9 @@ Init_ISeq(void)
rb_define_singleton_method(rb_cISeq, "disassemble", iseqw_s_disasm, 1);
rb_define_singleton_method(rb_cISeq, "of", iseqw_s_of, 1);
+ // script lines
+ rb_define_method(rb_cISeq, "script_lines", iseqw_script_lines, 0);
+
rb_undef_method(CLASS_OF(rb_cISeq), "translate");
rb_undef_method(CLASS_OF(rb_cISeq), "load_iseq");
}
diff --git a/iseq.h b/iseq.h
index 25c62a384f..2f83e7336d 100644
--- a/iseq.h
+++ b/iseq.h
@@ -1,3 +1,5 @@
+#ifndef RUBY_ISEQ_H
+#define RUBY_ISEQ_H 1
/**********************************************************************
iseq.h -
@@ -8,58 +10,60 @@
Copyright (C) 2004-2008 Koichi Sasada
**********************************************************************/
-
-#ifndef RUBY_ISEQ_H
-#define RUBY_ISEQ_H 1
+#include "internal/gc.h"
+#include "vm_core.h"
RUBY_EXTERN const int ruby_api_version[];
#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
+#define ISEQ_MBITS_SIZE sizeof(iseq_bits_t)
+#define ISEQ_MBITS_BITLENGTH (ISEQ_MBITS_SIZE * CHAR_BIT)
+#define ISEQ_MBITS_SET(buf, i) (buf[(i) / ISEQ_MBITS_BITLENGTH] |= ((iseq_bits_t)1 << ((i) % ISEQ_MBITS_BITLENGTH)))
+#define ISEQ_MBITS_SET_P(buf, i) ((buf[(i) / ISEQ_MBITS_BITLENGTH] >> ((i) % ISEQ_MBITS_BITLENGTH)) & 0x1)
+#define ISEQ_MBITS_BUFLEN(size) roomof(size, ISEQ_MBITS_BITLENGTH)
+
+#ifndef USE_ISEQ_NODE_ID
+#define USE_ISEQ_NODE_ID 1
+#endif
+
#ifndef rb_iseq_t
typedef struct rb_iseq_struct rb_iseq_t;
#define rb_iseq_t rb_iseq_t
#endif
+typedef void (*rb_iseq_callback)(const rb_iseq_t *, void *);
extern const ID rb_iseq_shared_exc_local_tbl[];
-static inline size_t
-rb_call_info_kw_arg_bytes(int keyword_len)
-{
- return rb_size_mul_add_or_raise(
- keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg),
- rb_eRuntimeError);
-}
-
-#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
-#define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
+#define ISEQ_COVERAGE(iseq) ISEQ_BODY(iseq)->variable.coverage
+#define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &ISEQ_BODY(iseq)->variable.coverage, cov)
#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
-#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
-#define ISEQ_PC2BRANCHINDEX_SET(iseq, h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
+#define ISEQ_PC2BRANCHINDEX(iseq) ISEQ_BODY(iseq)->variable.pc2branchindex
+#define ISEQ_PC2BRANCHINDEX_SET(iseq, h) RB_OBJ_WRITE(iseq, &ISEQ_BODY(iseq)->variable.pc2branchindex, h)
-#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
+#define ISEQ_FLIP_CNT(iseq) ISEQ_BODY(iseq)->variable.flip_count
static inline rb_snum_t
ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
{
- rb_snum_t cnt = iseq->body->variable.flip_count;
- iseq->body->variable.flip_count += 1;
+ rb_snum_t cnt = ISEQ_BODY(iseq)->variable.flip_count;
+ ISEQ_BODY(iseq)->variable.flip_count += 1;
return cnt;
}
static inline VALUE *
ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
{
- return iseq->body->variable.original_iseq;
+ return ISEQ_BODY(iseq)->variable.original_iseq;
}
static inline void
ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
{
- void *ptr = iseq->body->variable.original_iseq;
- iseq->body->variable.original_iseq = NULL;
+ void *ptr = ISEQ_BODY(iseq)->variable.original_iseq;
+ ISEQ_BODY(iseq)->variable.original_iseq = NULL;
if (ptr) {
ruby_xfree(ptr);
}
@@ -68,26 +72,27 @@ ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
static inline VALUE *
ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
{
- return iseq->body->variable.original_iseq =
+ return ISEQ_BODY(iseq)->variable.original_iseq =
ALLOC_N(VALUE, size);
}
#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | \
- RUBY_EVENT_CLASS | \
- RUBY_EVENT_END | \
- RUBY_EVENT_CALL | \
- RUBY_EVENT_RETURN| \
- RUBY_EVENT_B_CALL| \
- RUBY_EVENT_B_RETURN| \
+ RUBY_EVENT_CLASS | \
+ RUBY_EVENT_END | \
+ RUBY_EVENT_CALL | \
+ RUBY_EVENT_RETURN| \
+ RUBY_EVENT_C_CALL| \
+ RUBY_EVENT_C_RETURN| \
+ RUBY_EVENT_B_CALL| \
+ RUBY_EVENT_B_RETURN| \
RUBY_EVENT_COVERAGE_LINE| \
RUBY_EVENT_COVERAGE_BRANCH)
#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
#define ISEQ_TRANSLATED IMEMO_FL_USER3
-#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
-#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
+#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
struct iseq_compile_data {
/* GC is needed */
@@ -108,15 +113,19 @@ struct iseq_compile_data {
struct iseq_compile_data_storage *storage_head;
struct iseq_compile_data_storage *storage_current;
} insn;
+ bool in_rescue;
+ bool in_masgn;
int loopval_popped; /* used by NODE_BREAK */
int last_line;
int label_no;
int node_level;
+ int isolated_depth;
unsigned int ci_index;
- unsigned int ci_kw_index;
+ unsigned int ic_index;
const rb_compile_option_t *option;
struct rb_id_table *ivar_cache_table;
const struct rb_builtin_function *builtin_function_table;
+ const NODE *root_node;
#if OPT_SUPPORT_JOKE
st_table *labels_table;
#endif
@@ -126,10 +135,10 @@ static inline struct iseq_compile_data *
ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
{
if (iseq->flags & ISEQ_USE_COMPILE_DATA) {
- return iseq->aux.compile_data;
+ return iseq->aux.compile_data;
}
else {
- return NULL;
+ return NULL;
}
}
@@ -159,7 +168,7 @@ const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
VALUE rb_iseq_ibf_load_extra_data(VALUE str);
void rb_iseq_init_trace(rb_iseq_t *iseq);
-int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
+int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, bool target_bmethod);
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
@@ -167,6 +176,8 @@ const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
#endif
+int rb_vm_insn_addr2opcode(const void *addr);
+
RUBY_SYMBOL_EXPORT_BEGIN
/* compile.c */
@@ -174,14 +185,16 @@ VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
- VALUE locals, VALUE args,
- VALUE exception, VALUE body);
+ VALUE locals, VALUE args,
+ VALUE exception, VALUE body);
void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
-/* iseq.c */
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
+#ifdef USE_ISEQ_NODE_ID
+int rb_iseq_node_id(const rb_iseq_t *iseq, size_t pos);
+#endif
void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
@@ -191,6 +204,8 @@ VALUE rb_iseqw_new(const rb_iseq_t *iseq);
const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq); /* obsolete */
+int rb_iseq_from_eval_p(const rb_iseq_t *iseq);
+VALUE rb_iseq_type(const rb_iseq_t *iseq);
VALUE rb_iseq_label(const rb_iseq_t *iseq);
VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
@@ -219,31 +234,35 @@ struct rb_compile_option_struct {
struct iseq_insn_info_entry {
int line_no;
+#ifdef USE_ISEQ_NODE_ID
+ int node_id;
+#endif
rb_event_flag_t events;
};
+/*
+ * iseq type:
+ * CATCH_TYPE_RESCUE, CATCH_TYPE_ENSURE:
+ * use iseq as continuation.
+ *
+ * CATCH_TYPE_BREAK (iter):
+ * use iseq as key.
+ *
+ * CATCH_TYPE_BREAK (while), CATCH_TYPE_RETRY,
+ * CATCH_TYPE_REDO, CATCH_TYPE_NEXT:
+ * NULL.
+ */
+enum rb_catch_type {
+ CATCH_TYPE_RESCUE = INT2FIX(1),
+ CATCH_TYPE_ENSURE = INT2FIX(2),
+ CATCH_TYPE_RETRY = INT2FIX(3),
+ CATCH_TYPE_BREAK = INT2FIX(4),
+ CATCH_TYPE_REDO = INT2FIX(5),
+ CATCH_TYPE_NEXT = INT2FIX(6)
+};
+
struct iseq_catch_table_entry {
- enum catch_type {
- CATCH_TYPE_RESCUE = INT2FIX(1),
- CATCH_TYPE_ENSURE = INT2FIX(2),
- CATCH_TYPE_RETRY = INT2FIX(3),
- CATCH_TYPE_BREAK = INT2FIX(4),
- CATCH_TYPE_REDO = INT2FIX(5),
- CATCH_TYPE_NEXT = INT2FIX(6)
- } type;
-
- /*
- * iseq type:
- * CATCH_TYPE_RESCUE, CATCH_TYPE_ENSURE:
- * use iseq as continuation.
- *
- * CATCH_TYPE_BREAK (iter):
- * use iseq as key.
- *
- * CATCH_TYPE_BREAK (while), CATCH_TYPE_RETRY,
- * CATCH_TYPE_REDO, CATCH_TYPE_NEXT:
- * NULL.
- */
+ enum rb_catch_type type;
rb_iseq_t *iseq;
unsigned int start;
@@ -261,12 +280,12 @@ static inline int
iseq_catch_table_bytes(int n)
{
enum {
- catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
- catch_table_entries_max = (INT_MAX - offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
+ catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
+ catch_table_entries_max = (INT_MAX - offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
};
if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
return (int)(offsetof(struct iseq_catch_table, entries) +
- n * catch_table_entry_size);
+ n * catch_table_entry_size);
}
#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
@@ -296,7 +315,6 @@ enum defined_type {
DEFINED_FALSE,
DEFINED_ASGN,
DEFINED_EXPR,
- DEFINED_IVAR2,
DEFINED_REF,
DEFINED_FUNC,
DEFINED_CONST_FROM
diff --git a/kernel.rb b/kernel.rb
new file mode 100644
index 0000000000..9cc58bc1d9
--- /dev/null
+++ b/kernel.rb
@@ -0,0 +1,178 @@
+module Kernel
+ #
+ # call-seq:
+ # obj.class -> class
+ #
+ # Returns the class of <i>obj</i>. This method must always be called
+ # with an explicit receiver, as #class is also a reserved word in
+ # Ruby.
+ #
+ # 1.class #=> Integer
+ # self.class #=> Object
+ #--
+ # Equivalent to \c Object\#class in Ruby.
+ #
+ # Returns the class of \c obj, skipping singleton classes or module inclusions.
+ #++
+ #
+ def class
+ Primitive.attr! 'inline'
+ Primitive.cexpr! 'rb_obj_class(self)'
+ end
+
+ #
+ # call-seq:
+ # obj.clone(freeze: nil) -> an_object
+ #
+ # Produces a shallow copy of <i>obj</i>---the instance variables of
+ # <i>obj</i> are copied, but not the objects they reference.
+ # #clone copies the frozen value state of <i>obj</i>, unless the
+ # +:freeze+ keyword argument is given with a false or true value.
+ # See also the discussion under Object#dup.
+ #
+ # class Klass
+ # attr_accessor :str
+ # end
+ # s1 = Klass.new #=> #<Klass:0x401b3a38>
+ # s1.str = "Hello" #=> "Hello"
+ # s2 = s1.clone #=> #<Klass:0x401b3998 @str="Hello">
+ # s2.str[1,4] = "i" #=> "i"
+ # s1.inspect #=> "#<Klass:0x401b3a38 @str=\"Hi\">"
+ # s2.inspect #=> "#<Klass:0x401b3998 @str=\"Hi\">"
+ #
+ # This method may have class-specific behavior. If so, that
+ # behavior will be documented under the #+initialize_copy+ method of
+ # the class.
+ #
+ def clone(freeze: nil)
+ Primitive.rb_obj_clone2(freeze)
+ end
+
+ #
+ # call-seq:
+ # obj.frozen? -> true or false
+ #
+ # Returns the freeze status of <i>obj</i>.
+ #
+ # a = [ "a", "b", "c" ]
+ # a.freeze #=> ["a", "b", "c"]
+ # a.frozen? #=> true
+ #--
+ # Determines if the object is frozen. Equivalent to \c Object\#frozen? in Ruby.
+ # \param[in] obj the object to be determines
+ # \retval Qtrue if frozen
+ # \retval Qfalse if not frozen
+ #++
+ #
+ def frozen?
+ Primitive.attr! 'inline'
+ Primitive.cexpr! 'rb_obj_frozen_p(self)'
+ end
+
+ #
+ # call-seq:
+ # obj.tap {|x| block } -> obj
+ #
+ # Yields self to the block, and then returns self.
+ # The primary purpose of this method is to "tap into" a method chain,
+ # in order to perform operations on intermediate results within the chain.
+ #
+ # (1..10) .tap {|x| puts "original: #{x}" }
+ # .to_a .tap {|x| puts "array: #{x}" }
+ # .select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
+ # .map {|x| x*x } .tap {|x| puts "squares: #{x}" }
+ #
+ #--
+ # \private
+ #++
+ #
+ def tap
+ yield(self)
+ self
+ end
+
+ #
+ # call-seq:
+ # obj.then {|x| block } -> an_object
+ #
+ # Yields self to the block and returns the result of the block.
+ #
+ # 3.next.then {|x| x**x }.to_s #=> "256"
+ #
+ # Good usage for +then+ is value piping in method chains:
+ #
+ # require 'open-uri'
+ # require 'json'
+ #
+ # construct_url(arguments).
+ # then {|url| URI(url).read }.
+ # then {|response| JSON.parse(response) }
+ #
+ # When called without block, the method returns +Enumerator+,
+ # which can be used, for example, for conditional
+ # circuit-breaking:
+ #
+ # # meets condition, no-op
+ # 1.then.detect(&:odd?) # => 1
+ # # does not meet condition, drop value
+ # 2.then.detect(&:odd?) # => nil
+ #
+ def then
+ unless Primitive.block_given_p
+ return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)'
+ end
+ yield(self)
+ end
+
+ #
+ # call-seq:
+ # obj.yield_self {|x| block } -> an_object
+ #
+ # Yields self to the block and returns the result of the block.
+ #
+ # "my string".yield_self {|s| s.upcase } #=> "MY STRING"
+ #
+ # Good usage for +then+ is value piping in method chains:
+ #
+ # require 'open-uri'
+ # require 'json'
+ #
+ # construct_url(arguments).
+ # then {|url| URI(url).read }.
+ # then {|response| JSON.parse(response) }
+ #
+ def yield_self
+ unless Primitive.block_given_p
+ return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)'
+ end
+ yield(self)
+ end
+
+ module_function
+
+ #
+ # call-seq:
+ # Float(arg, exception: true) -> float or nil
+ #
+ # Returns <i>arg</i> converted to a float. Numeric types are
+ # converted directly, and with exception to String and
+ # <code>nil</code> the rest are converted using
+ # <i>arg</i><code>.to_f</code>. Converting a String with invalid
+ # characters will result in a ArgumentError. Converting
+ # <code>nil</code> generates a TypeError. Exceptions can be
+ # suppressed by passing <code>exception: false</code>.
+ #
+ # Float(1) #=> 1.0
+ # Float("123.456") #=> 123.456
+ # Float("123.0_badstring") #=> ArgumentError: invalid value for Float(): "123.0_badstring"
+ # Float(nil) #=> TypeError: can't convert nil into Float
+ # Float("123.0_badstring", exception: false) #=> nil
+ #
+ def Float(arg, exception: true)
+ if Primitive.mandatory_only?
+ Primitive.rb_f_float1(arg)
+ else
+ Primitive.rb_f_float(arg, exception)
+ end
+ end
+end
diff --git a/lex.c.blt b/lex.c.blt
index 92a4793b00..85727ed00f 100644
--- a/lex.c.blt
+++ b/lex.c.blt
@@ -34,7 +34,7 @@
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(/*const char *, unsigned int*/);
+static const struct kwtable *reserved_word(register const char *str, register size_t len);
#define rb_reserved_word(str, len) reserved_word(str, len)
#line 9 "defs/keywords"
struct kwtable;
diff --git a/lib/.document b/lib/.document
deleted file mode 100644
index 668152021d..0000000000
--- a/lib/.document
+++ /dev/null
@@ -1,25 +0,0 @@
-# Add files to this as they become documented
-
-*.rb
-
-bundler
-cgi
-csv
-drb
-forwardable
-irb
-matrix
-net
-optparse
-racc
-rdoc
-rexml
-rinda
-rss
-rubygems
-scanf.rb
-shell
-unicode_normalize
-uri
-webrick
-yaml
diff --git a/lib/English.gemspec b/lib/English.gemspec
new file mode 100644
index 0000000000..a08542bcda
--- /dev/null
+++ b/lib/English.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "english"
+ spec.version = "0.7.2"
+ spec.authors = ["Yukihiro Matsumoto"]
+ spec.email = ["matz@ruby-lang.org"]
+
+ spec.summary = %q{Require 'English.rb' to reference global variables with less cryptic names.}
+ spec.description = %q{Require 'English.rb' to reference global variables with less cryptic names.}
+ spec.homepage = "https://github.com/ruby/English"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/abbrev.gemspec b/lib/abbrev.gemspec
new file mode 100644
index 0000000000..c28b960c8c
--- /dev/null
+++ b/lib/abbrev.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "abbrev"
+ spec.version = "0.1.1"
+ spec.authors = ["Akinori MUSHA"]
+ spec.email = ["knu@idaemons.org"]
+
+ spec.summary = %q{Calculates a set of unique abbreviations for a given set of strings}
+ spec.description = %q{Calculates a set of unique abbreviations for a given set of strings}
+ spec.homepage = "https://github.com/ruby/abbrev"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/base64.gemspec b/lib/base64.gemspec
new file mode 100644
index 0000000000..daa0b7fa14
--- /dev/null
+++ b/lib/base64.gemspec
@@ -0,0 +1,20 @@
+Gem::Specification.new do |spec|
+ spec.name = "base64"
+ spec.version = "0.1.1"
+ spec.authors = ["Yusuke Endoh"]
+ spec.email = ["mame@ruby-lang.org"]
+
+ spec.summary = %q{Support for encoding and decoding binary data using a Base64 representation.}
+ spec.description = %q{Support for encoding and decoding binary data using a Base64 representation.}
+ spec.homepage = "https://github.com/ruby/base64"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = ["README.md", "LICENSE.txt", "lib/base64.rb"]
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/base64.rb b/lib/base64.rb
index 5c8df841f1..693aa1f519 100644
--- a/lib/base64.rb
+++ b/lib/base64.rb
@@ -82,8 +82,8 @@ module Base64
# You can remove the padding by setting +padding+ as false.
def urlsafe_encode64(bin, padding: true)
str = strict_encode64(bin)
+ str.chomp!("==") or str.chomp!("=") unless padding
str.tr!("+/", "-_")
- str.delete!("=") unless padding
str
end
@@ -99,9 +99,11 @@ module Base64
# NOTE: RFC 4648 does say nothing about unpadded input, but says that
# "the excess pad characters MAY also be ignored", so it is inferred that
# unpadded input is also acceptable.
- str = str.tr("-_", "+/")
if !str.end_with?("=") && str.length % 4 != 0
str = str.ljust((str.length + 3) & ~3, "=")
+ str.tr!("-_", "+/")
+ else
+ str = str.tr("-_", "+/")
end
strict_decode64(str)
end
diff --git a/lib/benchmark.rb b/lib/benchmark.rb
index 5ce9710586..79c782e262 100644
--- a/lib/benchmark.rb
+++ b/lib/benchmark.rb
@@ -128,6 +128,9 @@ module Benchmark
# benchmark tests. Reserves +label_width+ leading spaces for
# labels on each line. Prints +caption+ at the top of the
# report, and uses +format+ to format each line.
+ # (Note: +caption+ must contain a terminating newline character,
+ # see the default Benchmark::Tms::CAPTION for an example.)
+ #
# Returns an array of Benchmark::Tms objects.
#
# If the block returns an array of
@@ -163,8 +166,8 @@ module Benchmark
#
def benchmark(caption = "", label_width = nil, format = nil, *labels) # :yield: report
- sync = STDOUT.sync
- STDOUT.sync = true
+ sync = $stdout.sync
+ $stdout.sync = true
label_width ||= 0
label_width += 1
format ||= FORMAT
@@ -176,7 +179,7 @@ module Benchmark
}
report.list
ensure
- STDOUT.sync = sync unless sync.nil?
+ $stdout.sync = sync unless sync.nil?
end
@@ -247,8 +250,8 @@ module Benchmark
job = Job.new(width)
yield(job)
width = job.width + 1
- sync = STDOUT.sync
- STDOUT.sync = true
+ sync = $stdout.sync
+ $stdout.sync = true
# rehearsal
puts 'Rehearsal '.ljust(width+CAPTION.length,'-')
@@ -268,7 +271,7 @@ module Benchmark
Benchmark.measure(label, &item).tap { |res| print res }
}
ensure
- STDOUT.sync = sync unless sync.nil?
+ $stdout.sync = sync unless sync.nil?
end
#
@@ -527,6 +530,20 @@ module Benchmark
[@label, @utime, @stime, @cutime, @cstime, @real]
end
+ #
+ # Returns a hash containing the same data as `to_a`.
+ #
+ def to_h
+ {
+ label: @label,
+ utime: @utime,
+ stime: @stime,
+ cutime: @cutime,
+ cstime: @cstime,
+ real: @real
+ }
+ end
+
protected
#
diff --git a/lib/benchmark/benchmark.gemspec b/lib/benchmark/benchmark.gemspec
index aad5205f8d..58b47d95e1 100644
--- a/lib/benchmark/benchmark.gemspec
+++ b/lib/benchmark/benchmark.gemspec
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
spec.summary = %q{a performance benchmarking library}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/benchmark"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.executables = []
spec.require_paths = ["lib"]
end
diff --git a/lib/benchmark/version.rb b/lib/benchmark/version.rb
index d74cc74ee7..645966fd80 100644
--- a/lib/benchmark/version.rb
+++ b/lib/benchmark/version.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Benchmark
- VERSION = "0.1.0"
+ VERSION = "0.2.1"
end
diff --git a/lib/bundler.rb b/lib/bundler.rb
index df345539c8..f83268e9cd 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -19,7 +19,7 @@ require_relative "bundler/build_metadata"
#
# Since Ruby 2.6, Bundler is a part of Ruby's standard library.
#
-# Bunder is used by creating _gemfiles_ listing all the project dependencies
+# Bundler is used by creating _gemfiles_ listing all the project dependencies
# and (optionally) their versions and then using
#
# require 'bundler/setup'
@@ -34,15 +34,15 @@ require_relative "bundler/build_metadata"
# of loaded and required modules.
#
module Bundler
- environment_preserver = EnvironmentPreserver.new(ENV, EnvironmentPreserver::BUNDLER_KEYS)
+ environment_preserver = EnvironmentPreserver.from_env
ORIGINAL_ENV = environment_preserver.restore
- ENV.replace(environment_preserver.backup)
- SUDO_MUTEX = Mutex.new
+ environment_preserver.replace_with_backup
+ SUDO_MUTEX = Thread::Mutex.new
autoload :Definition, File.expand_path("bundler/definition", __dir__)
autoload :Dependency, File.expand_path("bundler/dependency", __dir__)
- autoload :DepProxy, File.expand_path("bundler/dep_proxy", __dir__)
autoload :Deprecate, File.expand_path("bundler/deprecate", __dir__)
+ autoload :Digest, File.expand_path("bundler/digest", __dir__)
autoload :Dsl, File.expand_path("bundler/dsl", __dir__)
autoload :EndpointSpecification, File.expand_path("bundler/endpoint_specification", __dir__)
autoload :Env, File.expand_path("bundler/env", __dir__)
@@ -57,28 +57,30 @@ module Bundler
autoload :Installer, File.expand_path("bundler/installer", __dir__)
autoload :LazySpecification, File.expand_path("bundler/lazy_specification", __dir__)
autoload :LockfileParser, File.expand_path("bundler/lockfile_parser", __dir__)
- autoload :MatchPlatform, File.expand_path("bundler/match_platform", __dir__)
+ autoload :MatchRemoteMetadata, File.expand_path("bundler/match_remote_metadata", __dir__)
autoload :ProcessLock, File.expand_path("bundler/process_lock", __dir__)
autoload :RemoteSpecification, File.expand_path("bundler/remote_specification", __dir__)
autoload :Resolver, File.expand_path("bundler/resolver", __dir__)
autoload :Retry, File.expand_path("bundler/retry", __dir__)
autoload :RubyDsl, File.expand_path("bundler/ruby_dsl", __dir__)
- autoload :RubyGemsGemInstaller, File.expand_path("bundler/rubygems_gem_installer", __dir__)
autoload :RubyVersion, File.expand_path("bundler/ruby_version", __dir__)
autoload :Runtime, File.expand_path("bundler/runtime", __dir__)
+ autoload :SelfManager, File.expand_path("bundler/self_manager", __dir__)
autoload :Settings, File.expand_path("bundler/settings", __dir__)
autoload :SharedHelpers, File.expand_path("bundler/shared_helpers", __dir__)
autoload :Source, File.expand_path("bundler/source", __dir__)
autoload :SourceList, File.expand_path("bundler/source_list", __dir__)
+ autoload :SourceMap, File.expand_path("bundler/source_map", __dir__)
autoload :SpecSet, File.expand_path("bundler/spec_set", __dir__)
autoload :StubSpecification, File.expand_path("bundler/stub_specification", __dir__)
autoload :UI, File.expand_path("bundler/ui", __dir__)
autoload :URICredentialsFilter, File.expand_path("bundler/uri_credentials_filter", __dir__)
- autoload :VersionRanges, File.expand_path("bundler/version_ranges", __dir__)
+ autoload :URINormalizer, File.expand_path("bundler/uri_normalizer", __dir__)
+ autoload :SafeMarshal, File.expand_path("bundler/safe_marshal", __dir__)
class << self
def configure
- @configured ||= configure_gem_home_and_path
+ @configure ||= configure_gem_home_and_path
end
def ui
@@ -95,6 +97,17 @@ module Bundler
@bundle_path ||= Pathname.new(configured_bundle_path.path).expand_path(root)
end
+ def create_bundle_path
+ SharedHelpers.filesystem_access(bundle_path.to_s) do |p|
+ mkdir_p(p)
+ end unless bundle_path.exist?
+
+ @bundle_path = bundle_path.realpath
+ rescue Errno::EEXIST
+ raise PathError, "Could not install to path `#{bundle_path}` " \
+ "because a file already exists at that path. Either remove or rename the file so the directory can be created."
+ end
+
def configured_bundle_path
@configured_bundle_path ||= settings.path.tap(&:validate!)
end
@@ -197,9 +210,10 @@ module Bundler
end
def frozen_bundle?
- frozen = settings[:deployment]
- frozen ||= settings[:frozen] unless feature_flag.deployment_means_frozen?
- frozen
+ frozen = settings[:frozen]
+ return frozen unless frozen.nil?
+
+ settings[:deployment]
end
def locked_gems
@@ -212,6 +226,12 @@ module Bundler
end
end
+ def most_specific_locked_platform?(platform)
+ return false unless defined?(@definition) && @definition
+
+ definition.most_specific_locked_platform == platform
+ end
+
def ruby_scope
"#{Bundler.rubygems.ruby_engine}/#{RbConfig::CONFIG["ruby_version"]}"
end
@@ -230,8 +250,9 @@ module Bundler
end
if warning
- user_home = tmp_home_path(warning)
- Bundler.ui.warn "#{warning}\nBundler will use `#{user_home}' as your home directory temporarily.\n"
+ Bundler.ui.warn "#{warning}\n"
+ user_home = tmp_home_path
+ Bundler.ui.warn "Bundler will use `#{user_home}' as your home directory temporarily.\n"
user_home
else
Pathname.new(home)
@@ -285,7 +306,13 @@ module Bundler
def app_config_path
if app_config = ENV["BUNDLE_APP_CONFIG"]
- Pathname.new(app_config).expand_path(root)
+ app_config_pathname = Pathname.new(app_config)
+
+ if app_config_pathname.absolute?
+ app_config_pathname
+ else
+ app_config_pathname.expand_path(root)
+ end
else
root.join(".bundle")
end
@@ -305,9 +332,9 @@ module Bundler
FileUtils.remove_entry_secure(path) if path && File.exist?(path)
rescue ArgumentError
message = <<EOF
-It is a security vulnerability to allow your home directory to be world-writable, and bundler can not continue.
+It is a security vulnerability to allow your home directory to be world-writable, and bundler cannot continue.
You should probably consider fixing this issue by running `chmod o-w ~` on *nix.
-Please refer to https://ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
+Please refer to https://ruby-doc.org/stdlib-3.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.
EOF
File.world_writable?(path) ? Bundler.ui.warn(message) : raise
raise PathError, "Please fix the world-writable issue with your #{path} directory"
@@ -347,12 +374,15 @@ EOF
env.delete_if {|k, _| k[0, 7] == "BUNDLE_" }
if env.key?("RUBYOPT")
- env["RUBYOPT"] = env["RUBYOPT"].sub "-rbundler/setup", ""
+ rubyopt = env["RUBYOPT"].split(" ")
+ rubyopt.delete("-r#{File.expand_path("bundler/setup", __dir__)}")
+ rubyopt.delete("-rbundler/setup")
+ env["RUBYOPT"] = rubyopt.join(" ")
end
if env.key?("RUBYLIB")
rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
- rubylib.delete(File.expand_path("..", __FILE__))
+ rubylib.delete(__dir__)
env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
end
@@ -447,49 +477,21 @@ EOF
# system binaries. If you put '-n foo' in your .gemrc, RubyGems will
# install binstubs there instead. Unfortunately, RubyGems doesn't expose
# that directory at all, so rather than parse .gemrc ourselves, we allow
- # the directory to be set as well, via `bundle config set bindir foo`.
+ # the directory to be set as well, via `bundle config set --local bindir foo`.
Bundler.settings[:system_bindir] || Bundler.rubygems.gem_bindir
end
- def use_system_gems?
- configured_bundle_path.use_system_gems?
+ def preferred_gemfile_name
+ Bundler.settings[:init_gems_rb] ? "gems.rb" : "Gemfile"
end
- def requires_sudo?
- return @requires_sudo if defined?(@requires_sudo_ran)
-
- sudo_present = which "sudo" if settings.allow_sudo?
-
- if sudo_present
- # the bundle path and subdirectories need to be writable for RubyGems
- # to be able to unpack and install gems without exploding
- path = bundle_path
- path = path.parent until path.exist?
-
- # bins are written to a different location on OS X
- bin_dir = Pathname.new(Bundler.system_bindir)
- bin_dir = bin_dir.parent until bin_dir.exist?
-
- # if any directory is not writable, we need sudo
- files = [path, bin_dir] | Dir[bundle_path.join("build_info/*").to_s] | Dir[bundle_path.join("*").to_s]
- unwritable_files = files.reject {|f| File.writable?(f) }
- sudo_needed = !unwritable_files.empty?
- if sudo_needed
- Bundler.ui.warn "Following files may not be writable, so sudo is needed:\n #{unwritable_files.map(&:to_s).sort.join("\n ")}"
- end
- end
-
- @requires_sudo_ran = true
- @requires_sudo = settings.allow_sudo? && sudo_present && sudo_needed
+ def use_system_gems?
+ configured_bundle_path.use_system_gems?
end
def mkdir_p(path, options = {})
- if requires_sudo? && !options[:no_sudo]
- sudo "mkdir -p '#{path}'" unless File.exist?(path)
- else
- SharedHelpers.filesystem_access(path, :write) do |p|
- FileUtils.mkdir_p(p)
- end
+ SharedHelpers.filesystem_access(path, :write) do |p|
+ FileUtils.mkdir_p(p)
end
end
@@ -497,7 +499,7 @@ EOF
if File.file?(executable) && File.executable?(executable)
executable
elsif paths = ENV["PATH"]
- quote = '"'.freeze
+ quote = '"'
paths.split(File::PATH_SEPARATOR).find do |path|
path = path[1..-2] if path.start_with?(quote) && path.end_with?(quote)
executable_path = File.expand_path(executable, path)
@@ -506,40 +508,14 @@ EOF
end
end
- def sudo(str)
- SUDO_MUTEX.synchronize do
- prompt = "\n\n" + <<-PROMPT.gsub(/^ {6}/, "").strip + " "
- Your user account isn't allowed to install to the system RubyGems.
- You can cancel this installation and run:
-
- bundle install --path vendor/bundle
-
- to install the gems into ./vendor/bundle/, or you can enter your password
- and install the bundled gems to RubyGems using sudo.
-
- Password:
- PROMPT
-
- unless @prompted_for_sudo ||= system(%(sudo -k -p "#{prompt}" true))
- raise SudoNotPermittedError,
- "Bundler requires sudo access to install at the moment. " \
- "Try installing again, granting Bundler sudo access when prompted, or installing into a different path."
- end
-
- `sudo -p "#{prompt}" #{str}`
- end
- end
-
def read_file(file)
SharedHelpers.filesystem_access(file, :read) do
File.open(file, "r:UTF-8", &:read)
end
end
- def load_marshal(data)
- Marshal.load(data)
- rescue StandardError => e
- raise MarshalError, "#{e.class}: #{e.message}"
+ def safe_load_marshal(data)
+ load_marshal(data, :marshal_proc => SafeMarshal.proc)
end
def load_gemspec(file, validate = false)
@@ -548,7 +524,7 @@ EOF
@gemspec_cache[key] ||= load_gemspec_uncached(file, validate)
# Protect against caching side-effected gemspecs by returning a
# new instance each time.
- @gemspec_cache[key].dup if @gemspec_cache[key]
+ @gemspec_cache[key]&.dup
end
def load_gemspec_uncached(file, validate = false)
@@ -575,7 +551,7 @@ EOF
def git_present?
return @git_present if defined?(@git_present)
- @git_present = Bundler.which("git") || Bundler.which("git.exe")
+ @git_present = Bundler.which("git#{RbConfig::CONFIG["EXEEXT"]}")
end
def feature_flag
@@ -588,11 +564,16 @@ EOF
reset_rubygems!
end
+ def reset_settings_and_root!
+ @settings = nil
+ @root = nil
+ end
+
def reset_paths!
@bin_path = nil
@bundler_major_version = nil
@bundle_path = nil
- @configured = nil
+ @configure = nil
@configured_bundle_path = nil
@definition = nil
@load = nil
@@ -610,15 +591,32 @@ EOF
@rubygems = nil
end
- private
+ def configure_gem_home_and_path(path = bundle_path)
+ configure_gem_path
+ configure_gem_home(path)
+ Bundler.rubygems.clear_paths
+ end
+
+ def self_manager
+ @self_manager ||= begin
+ require_relative "bundler/self_manager"
+ Bundler::SelfManager.new
+ end
+ end
+
+ private
+
+ def load_marshal(data, marshal_proc: nil)
+ Marshal.load(data, marshal_proc)
+ rescue TypeError => e
+ raise MarshalError, "#{e.class}: #{e.message}"
+ end
def eval_yaml_gemspec(path, contents)
- require_relative "bundler/psyched_yaml"
+ Kernel.require "psych"
- # If the YAML is invalid, Syck raises an ArgumentError, and Psych
- # raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
Gem::Specification.from_yaml(contents)
- rescue YamlLibrarySyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
+ rescue ::Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
eval_gemspec(path, contents)
end
@@ -627,47 +625,29 @@ EOF
rescue ScriptError, StandardError => e
msg = "There was an error while loading `#{path.basename}`: #{e.message}"
- if e.is_a?(LoadError)
- msg += "\nDoes it try to require a relative path? That's been removed in Ruby 1.9"
- end
-
raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
end
- def configure_gem_home_and_path
- configure_gem_path
- configure_gem_home
- bundle_path
- end
-
- def configure_gem_path(env = ENV)
- blank_home = env["GEM_HOME"].nil? || env["GEM_HOME"].empty?
- if !use_system_gems?
+ def configure_gem_path
+ unless use_system_gems?
# this needs to be empty string to cause
# PathSupport.split_gem_path to only load up the
# Bundler --path setting as the GEM_PATH.
- env["GEM_PATH"] = ""
- elsif blank_home
- possibles = [Bundler.rubygems.gem_dir, Bundler.rubygems.gem_path]
- paths = possibles.flatten.compact.uniq.reject(&:empty?)
- env["GEM_PATH"] = paths.join(File::PATH_SEPARATOR)
+ Bundler::SharedHelpers.set_env "GEM_PATH", ""
end
end
- def configure_gem_home
- Bundler::SharedHelpers.set_env "GEM_HOME", File.expand_path(bundle_path, root)
- Bundler.rubygems.clear_paths
+ def configure_gem_home(path)
+ Bundler::SharedHelpers.set_env "GEM_HOME", path.to_s
end
- def tmp_home_path(warning)
+ def tmp_home_path
Kernel.send(:require, "tmpdir")
SharedHelpers.filesystem_access(Dir.tmpdir) do
path = Bundler.tmp
at_exit { Bundler.rm_rf(path) }
path
end
- rescue RuntimeError => e
- raise e.exception("#{warning}\nBundler also failed to create a temporary home directory':\n#{e}")
end
# @param env [Hash]
diff --git a/lib/bundler/.document b/lib/bundler/.document
new file mode 100644
index 0000000000..238bbd8705
--- /dev/null
+++ b/lib/bundler/.document
@@ -0,0 +1 @@
+# not in RDoc
diff --git a/lib/bundler/build_metadata.rb b/lib/bundler/build_metadata.rb
index 4dfad2f8d8..8bffb2fae7 100644
--- a/lib/bundler/build_metadata.rb
+++ b/lib/bundler/build_metadata.rb
@@ -27,19 +27,11 @@ module Bundler
# If Bundler has been installed without its .git directory and without a
# commit instance variable then we can't determine its commits SHA.
- git_dir = File.join(File.expand_path("../../..", __FILE__), ".git")
+ git_dir = File.expand_path("../../../.git", __dir__)
if File.directory?(git_dir)
return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
end
- # If Bundler is a submodule in RubyGems, get the submodule commit
- git_sub_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
- if File.directory?(git_sub_dir)
- return @git_commit_sha = Dir.chdir(git_sub_dir) do
- `git ls-tree --abbrev=8 HEAD bundler`.split(/\s/).fetch(2, "").strip.freeze
- end
- end
-
@git_commit_sha ||= "unknown"
end
diff --git a/lib/bundler/bundler.gemspec b/lib/bundler/bundler.gemspec
index 30a21f155f..da50b46225 100644
--- a/lib/bundler/bundler.gemspec
+++ b/lib/bundler/bundler.gemspec
@@ -22,21 +22,20 @@ Gem::Specification.new do |s|
s.summary = "The best way to manage your application's dependencies"
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
- if s.respond_to?(:metadata=)
- s.metadata = {
- "bug_tracker_uri" => "https://github.com/bundler/bundler/issues",
- "changelog_uri" => "https://github.com/bundler/bundler/blob/master/CHANGELOG.md",
- "homepage_uri" => "https://bundler.io/",
- "source_code_uri" => "https://github.com/bundler/bundler/",
- }
- end
+ s.metadata = {
+ "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler",
+ "changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md",
+ "homepage_uri" => "https://bundler.io/",
+ "source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
+ }
- s.required_ruby_version = ">= 2.3.0"
- s.required_rubygems_version = ">= 2.5.2"
+ s.required_ruby_version = ">= 2.6.0"
+ s.required_rubygems_version = ">= 3.0.1"
- s.files = (Dir.glob("lib/bundler/**/*", File::FNM_DOTMATCH) + Dir.glob("man/bundler*") + Dir.glob("libexec/bundle*")).reject {|f| File.directory?(f) }
+ s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
- s.files += ["lib/bundler.rb"]
+ # include the gemspec itself because warbler breaks w/o it
+ s.files += %w[lib/bundler/bundler.gemspec]
s.bindir = "libexec"
s.executables = %w[bundle bundler]
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 443458f2d9..a3eb494db2 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -10,10 +10,12 @@ module Bundler
AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean].freeze
PARSEABLE_COMMANDS = %w[check config help exec platform show version].freeze
+ EXTENSIONS = ["c", "rust"].freeze
COMMAND_ALIASES = {
"check" => "c",
"install" => "i",
+ "plugin" => "",
"list" => "ls",
"exec" => ["e", "ex", "exe"],
"cache" => ["package", "pack"],
@@ -21,6 +23,8 @@ module Bundler
}.freeze
def self.start(*)
+ check_deprecated_ext_option(ARGV) if ARGV.include?("--ext")
+
super
ensure
Bundler::SharedHelpers.print_major_deprecations!
@@ -57,9 +61,11 @@ module Bundler
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
if custom_gemfile && !custom_gemfile.empty?
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", File.expand_path(custom_gemfile)
- Bundler.reset_paths!
+ Bundler.reset_settings_and_root!
end
+ Bundler.self_manager.restart_with_locked_bundler_if_needed
+
Bundler.settings.set_command_option_if_given :retry, options[:retry]
current_cmd = args.last[:current_command].name
@@ -72,14 +78,6 @@ module Bundler
Bundler.ui = UI::Shell.new(options)
Bundler.ui.level = "debug" if options["verbose"]
unprinted_warnings.each {|w| Bundler.ui.warn(w) }
-
- if ENV["RUBYGEMS_GEMDEPS"] && !ENV["RUBYGEMS_GEMDEPS"].empty?
- Bundler.ui.warn(
- "The RUBYGEMS_GEMDEPS environment variable is set. This enables RubyGems' " \
- "experimental Gemfile mode, which may conflict with Bundler and cause unexpected errors. " \
- "To remove this warning, unset RUBYGEMS_GEMDEPS.", :wrap => true
- )
- end
end
check_unknown_options!(:except => [:config, :exec])
@@ -122,16 +120,17 @@ module Bundler
else command = "bundle-#{cli}"
end
- man_path = File.expand_path("../../../man", __FILE__)
- man_pages = Hash[Dir.glob(File.join(man_path, "*")).grep(/.*\.\d*\Z/).collect do |f|
+ man_path = File.expand_path("man", __dir__)
+ man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f|
[File.basename(f, ".*"), f]
end]
if man_pages.include?(command)
+ man_page = man_pages[command]
if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
- Kernel.exec "man #{man_pages[command]}"
+ Kernel.exec "man #{man_page}"
else
- puts File.read("#{man_path}/#{File.basename(man_pages[command])}.txt")
+ puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
end
elsif command_path = Bundler.which("bundler-#{cli}")
Kernel.exec(command_path, "--help")
@@ -157,6 +156,7 @@ module Bundler
dependency listed in the gemspec file to the newly created Gemfile.
D
method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
+ method_option "gemfile", :type => :string, :banner => "Use the specified name for the gemfile instead of 'Gemfile'"
def init
require_relative "cli/init"
Init.new(options.dup).run
@@ -190,6 +190,7 @@ module Bundler
method_option "install", :type => :boolean, :banner =>
"Runs 'bundle install' after removing the gems from the Gemfile"
def remove(*gems)
+ SharedHelpers.major_deprecation(2, "The `--install` flag has been deprecated. `bundle install` is triggered by default.") if ARGV.include?("--install")
require_relative "cli/remove"
Remove.new(gems, options).run
end
@@ -221,6 +222,8 @@ module Bundler
"Specify the number of jobs to run in parallel"
method_option "local", :type => :boolean, :banner =>
"Do not attempt to fetch gems remotely and use the gem cache instead"
+ method_option "prefer-local", :type => :boolean, :banner =>
+ "Only attempt to fetch gems remotely if not present locally, even if newer versions are available remotely"
method_option "no-cache", :type => :boolean, :banner =>
"Don't update the existing gem cache."
method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
@@ -239,7 +242,7 @@ module Bundler
"Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application"
method_option "trust-policy", :alias => "P", :type => :string, :banner =>
"Gem trust policy (like gem install -P). Must be one of " +
- Bundler.rubygems.security_policy_keys.join("|")
+ Bundler.rubygems.security_policy_keys.join("|")
method_option "without", :type => :array, :banner =>
"Exclude gems that are part of the specified named group."
method_option "with", :type => :array, :banner =>
@@ -247,10 +250,12 @@ module Bundler
def install
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
- %w[clean deployment frozen no-cache no-prune path shebang system without with].each do |option|
+ %w[clean deployment frozen no-prune path shebang system without with].each do |option|
remembered_flag_deprecation(option)
end
+ remembered_negative_flag_deprecation("no-deployment")
+
require_relative "cli/install"
Bundler.settings.temporary(:no_install => false) do
Install.new(options.dup).run
@@ -291,6 +296,8 @@ module Bundler
"Prefer updating only to next minor version"
method_option "major", :type => :boolean, :banner =>
"Prefer updating to next major version (default)"
+ method_option "pre", :type => :boolean, :banner =>
+ "Always choose the highest allowed version when updating gems, regardless of prerelease status"
method_option "strict", :type => :boolean, :banner =>
"Do not allow any gem to be updated past latest --patch | --minor | --major"
method_option "conservative", :type => :boolean, :banner =>
@@ -305,45 +312,25 @@ module Bundler
end
end
- unless Bundler.feature_flag.bundler_3_mode?
- desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
- long_desc <<-D
- Show lists the names and versions of all gems that are required by your Gemfile.
- Calling show with [GEM] will list the exact location of that gem on your machine.
- D
- method_option "paths", :type => :boolean,
- :banner => "List the paths of all gems that are required by your Gemfile."
- method_option "outdated", :type => :boolean,
- :banner => "Show verbose output including whether gems are outdated."
- def show(gem_name = nil)
- if ARGV[0] == "show"
- rest = ARGV[1..-1]
-
- if flag = rest.find{|arg| ["--verbose", "--outdated"].include?(arg) }
- Bundler::SharedHelpers.major_deprecation(2, "the `#{flag}` flag to `bundle show` was undocumented and will be removed without replacement")
- else
- new_command = rest.find {|arg| !arg.start_with?("--") } ? "info" : "list"
-
- new_arguments = rest.map do |arg|
- next arg if arg != "--paths"
- next "--path" if new_command == "info"
- end
-
- old_argv = ARGV.join(" ")
- new_argv = [new_command, *new_arguments.compact].join(" ")
-
- Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
- end
- end
- require_relative "cli/show"
- Show.new(options, gem_name).run
- end
+ desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
+ long_desc <<-D
+ Show lists the names and versions of all gems that are required by your Gemfile.
+ Calling show with [GEM] will list the exact location of that gem on your machine.
+ D
+ method_option "paths", :type => :boolean,
+ :banner => "List the paths of all gems that are required by your Gemfile."
+ method_option "outdated", :type => :boolean,
+ :banner => "Show verbose output including whether gems are outdated."
+ def show(gem_name = nil)
+ SharedHelpers.major_deprecation(2, "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement") if ARGV.include?("--outdated")
+ require_relative "cli/show"
+ Show.new(options, gem_name).run
end
desc "list", "List all gems in the bundle"
method_option "name-only", :type => :boolean, :banner => "print only the gem names"
- method_option "only-group", :type => :string, :banner => "print gems from a particular group"
- method_option "without-group", :type => :string, :banner => "print all gems except from a group"
+ method_option "only-group", :type => :array, :default => [], :banner => "print gems from a given set of groups"
+ method_option "without-group", :type => :array, :default => [], :banner => "print all gems except from a given set of groups"
method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
def list
require_relative "cli/list"
@@ -354,6 +341,7 @@ module Bundler
desc "info GEM [OPTIONS]", "Show information for the given gem"
method_option "path", :type => :boolean, :banner => "Print full path to gem"
+ method_option "version", :type => :boolean, :banner => "Print gem version"
def info(gem_name)
require_relative "cli/info"
Info.new(options, gem_name).run
@@ -375,6 +363,8 @@ module Bundler
"Make binstubs that can work without the Bundler runtime"
method_option "all", :type => :boolean, :banner =>
"Install binstubs for all gems"
+ method_option "all-platforms", :type => :boolean, :default => false, :banner =>
+ "Install binstubs for all platforms"
def binstubs(*gems)
require_relative "cli/binstubs"
Binstubs.new(options, gems).run
@@ -387,8 +377,12 @@ module Bundler
method_option "version", :aliases => "-v", :type => :string
method_option "group", :aliases => "-g", :type => :string
method_option "source", :aliases => "-s", :type => :string
+ method_option "require", :aliases => "-r", :type => :string, :banner => "Adds require path to gem. Provide false, or a path as a string."
+ method_option "path", :type => :string
method_option "git", :type => :string
+ method_option "github", :type => :string
method_option "branch", :type => :string
+ method_option "ref", :type => :string
method_option "skip-install", :type => :boolean, :banner =>
"Adds gem to the Gemfile but does not install it"
method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
@@ -406,7 +400,7 @@ module Bundler
are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
For more information on patch level options (--major, --minor, --patch,
- --update-strict) see documentation on the same options on the update command.
+ --strict) see documentation on the same options on the update command.
D
method_option "group", :type => :string, :banner => "List gems from a specific group"
method_option "groups", :type => :boolean, :banner => "List gems organized by groups"
@@ -414,10 +408,9 @@ module Bundler
"Do not attempt to fetch gems remotely and use the gem cache instead"
method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
method_option "source", :type => :array, :banner => "Check against a specific source"
- strict_is_update = Bundler.feature_flag.forget_cli_options?
- method_option "filter-strict", :type => :boolean, :aliases => strict_is_update ? [] : %w[--strict], :banner =>
+ method_option "filter-strict", :type => :boolean, :aliases => "--strict", :banner =>
"Only list newer versions allowed by your Gemfile requirements"
- method_option "update-strict", :type => :boolean, :aliases => strict_is_update ? %w[--strict] : [], :banner =>
+ method_option "update-strict", :type => :boolean, :banner =>
"Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
method_option "minor", :type => :boolean, :banner => "Prefer updating only to next minor version"
method_option "major", :type => :boolean, :banner => "Prefer updating to next major version (default)"
@@ -434,11 +427,18 @@ module Bundler
Outdated.new(options, gems).run
end
- desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
- unless Bundler.feature_flag.cache_all?
- method_option "all", :type => :boolean,
- :banner => "Include all sources (including path and git)."
+ desc "fund [OPTIONS]", "Lists information about gems seeking funding assistance"
+ method_option "group", :aliases => "-g", :type => :array, :banner =>
+ "Fetch funding information for a specific group"
+ def fund
+ require_relative "cli/fund"
+ Fund.new(options).run
end
+
+ desc "cache [OPTIONS]", "Locks and then caches all of the gems into vendor/cache"
+ method_option "all", :type => :boolean,
+ :default => Bundler.feature_flag.cache_all?,
+ :banner => "Include all sources (including path and git)."
method_option "all-platforms", :type => :boolean, :banner => "Include gems for all platforms present in the lockfile, not only the current one"
method_option "cache-path", :type => :string, :banner =>
"Specify a different cache path than the default (vendor/cache)."
@@ -457,6 +457,18 @@ module Bundler
bundle without having to download any additional gems.
D
def cache
+ SharedHelpers.major_deprecation 2,
+ "The `--all` flag is deprecated because it relies on being " \
+ "remembered across bundler invocations, which bundler will no longer " \
+ "do in future versions. Instead please use `bundle config set cache_all true`, " \
+ "and stop using this flag" if ARGV.include?("--all")
+
+ SharedHelpers.major_deprecation 2,
+ "The `--path` flag is deprecated because its semantics are unclear. " \
+ "Use `bundle config cache_path` to configure the path of your cache of gems, " \
+ "and `bundle config path` to configure the path where your gems are installed, " \
+ "and stop using this flag" if ARGV.include?("--path")
+
require_relative "cli/cache"
Cache.new(options).run
end
@@ -464,7 +476,7 @@ module Bundler
map aliases_for("cache")
desc "exec [OPTIONS]", "Run the command in context of the bundle"
- method_option :keep_file_descriptors, :type => :boolean, :default => false
+ method_option :keep_file_descriptors, :type => :boolean, :default => true
method_option :gemfile, :type => :string, :required => false
long_desc <<-D
Exec runs a command, providing it access to the gems in the bundle. While using
@@ -472,6 +484,10 @@ module Bundler
into the system wide RubyGems repository.
D
def exec(*args)
+ if ARGV.include?("--no-keep-file-descriptors")
+ SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to")
+ end
+
require_relative "cli/exec"
Exec.new(options, args).run
end
@@ -486,14 +502,15 @@ module Bundler
By default, setting a configuration value sets it for all projects
on the machine.
- If a global setting is superceded by local configuration, this command
- will show the current value, as well as any superceded values and
+ If a global setting is superseded by local configuration, this command
+ will show the current value, as well as any superseded values and
where they were specified.
D
require_relative "cli/config"
subcommand "config", Config
desc "open GEM", "Opens the source directory of the given bundled gem"
+ method_option "path", :type => :string, :lazy_default => "", :banner => "Open relative path of the gem source."
def open(name)
require_relative "cli/open"
Open.new(options, name).run
@@ -507,7 +524,7 @@ module Bundler
end
end
- desc "version", "Prints the bundler's version information"
+ desc "version", "Prints Bundler version information"
def version
cli_help = current_command.name == "cli_help"
if cli_help || ARGV.include?("version")
@@ -550,7 +567,7 @@ module Bundler
method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
def viz
- SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
+ SharedHelpers.major_deprecation 2, "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
require_relative "cli/viz"
Viz.new(options.dup).run
end
@@ -560,15 +577,23 @@ module Bundler
desc "gem NAME [OPTIONS]", "Creates a skeleton for creating a rubygem"
method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
- method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set gem.coc true`."
+ method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config set --global gem.coc true`."
method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
:lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
:desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
- method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
+ method_option :ext, :type => :string, :desc => "Generate the boilerplate for C extension code.", :enum => EXTENSIONS
method_option :git, :type => :boolean, :default => true, :desc => "Initialize a git repo inside your library."
- method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set gem.mit true`."
- method_option :test, :type => :string, :lazy_default => "rspec", :aliases => "-t", :banner => "rspec",
- :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config set gem.test rspec`."
+ method_option :mit, :type => :boolean, :desc => "Generate an MIT license file. Set a default with `bundle config set --global gem.mit true`."
+ method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
+ method_option :changelog, :type => :boolean, :desc => "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
+ method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
+ :desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
+ method_option :ci, :type => :string, :lazy_default => Bundler.settings["gem.ci"] || "",
+ :desc => "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
+ method_option :linter, :type => :string, :lazy_default => Bundler.settings["gem.linter"] || "",
+ :desc => "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
+ method_option :github_username, :type => :string, :default => Bundler.settings["gem.github_username"], :banner => "Set your username on GitHub", :desc => "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
+
def gem(name)
end
@@ -595,14 +620,14 @@ module Bundler
private :gem
def self.source_root
- File.expand_path(File.join(File.dirname(__FILE__), "templates"))
+ File.expand_path("templates", __dir__)
end
desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory", :hide => true
method_option "dry-run", :type => :boolean, :default => false, :banner =>
"Only print out changes, do not clean gems"
method_option "force", :type => :boolean, :default => false, :banner =>
- "Forces clean even if --path is not set"
+ "Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application."
def clean
require_relative "cli/clean"
Clean.new(options.dup).run
@@ -650,10 +675,14 @@ module Bundler
"If updating, prefer updating only to next minor version"
method_option "major", :type => :boolean, :banner =>
"If updating, prefer updating to next major version (default)"
+ method_option "pre", :type => :boolean, :banner =>
+ "If updating, always choose the highest allowed version, regardless of prerelease status"
method_option "strict", :type => :boolean, :banner =>
"If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
method_option "conservative", :type => :boolean, :banner =>
"If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
+ method_option "bundler", :type => :string, :lazy_default => "> 0.a", :banner =>
+ "Update the locked version of bundler"
def lock
require_relative "cli/lock"
Lock.new(options).run
@@ -731,11 +760,43 @@ module Bundler
end
end
- private
+ def self.check_deprecated_ext_option(arguments)
+ # when deprecated version of `--ext` is called
+ # print out deprecation warning and pretend `--ext=c` was provided
+ if deprecated_ext_value?(arguments)
+ SharedHelpers.major_deprecation 2, "Extensions can now be generated using C or Rust, so `--ext` with no arguments has been deprecated. Please select a language, e.g. `--ext=rust` to generate a Rust extension. This gem will now be generated as if `--ext=c` was used."
+ arguments[arguments.index("--ext")] = "--ext=c"
+ end
+ end
+
+ def self.deprecated_ext_value?(arguments)
+ index = arguments.index("--ext")
+ next_argument = arguments[index+1]
+
+ # it is ok when --ext is followed with valid extension value
+ # for example `bundle gem hello --ext c`
+ return false if EXTENSIONS.include?(next_argument)
+
+ # deprecated call when --ext is called with no value in last position
+ # for example `bundle gem hello_gem --ext`
+ return true if next_argument.nil?
+
+ # deprecated call when --ext is followed by other parameter
+ # for example `bundle gem --ext --no-ci hello_gem`
+ return true if next_argument.start_with?("-")
+
+ # deprecated call when --ext is followed by gem name
+ # for example `bundle gem --ext hello_gem`
+ return true if next_argument
+
+ false
+ end
+
+ private
# Automatically invoke `bundle install` and resume if
# Bundler.settings[:auto_install] exists. This is set through config cmd
- # `bundle config set auto_install 1`.
+ # `bundle config set --global auto_install 1`.
#
# Note that this method `nil`s out the global Definition object, so it
# should be called first, before you instantiate anything like an
@@ -793,35 +854,40 @@ module Bundler
current = Gem::Version.new(VERSION)
return if current >= latest
- latest_installed = Bundler.rubygems.find_name("bundler").map(&:version).max
-
- installation = "To install the latest version, run `gem install bundler#{" --pre" if latest.prerelease?}`"
- if latest_installed && latest_installed > current
- suggestion = "To update to the most recent installed version (#{latest_installed}), run `bundle update --bundler`"
- suggestion = "#{installation}\n#{suggestion}" if latest_installed < latest
- else
- suggestion = installation
- end
- Bundler.ui.warn "The latest bundler is #{latest}, but you are currently running #{current}.\n#{suggestion}"
+ Bundler.ui.warn \
+ "The latest bundler is #{latest}, but you are currently running #{current}.\n" \
+ "To update to the most recent version, run `bundle update --bundler`"
rescue RuntimeError
nil
end
+ def remembered_negative_flag_deprecation(name)
+ positive_name = name.gsub(/\Ano-/, "")
+ option = current_command.options[positive_name]
+ flag_name = "--no-" + option.switch_name.gsub(/\A--/, "")
+
+ flag_deprecation(positive_name, flag_name, option)
+ end
+
def remembered_flag_deprecation(name)
option = current_command.options[name]
flag_name = option.switch_name
- name_index = ARGV.find {|arg| flag_name == arg }
+ flag_deprecation(name, flag_name, option)
+ end
+
+ def flag_deprecation(name, flag_name, option)
+ name_index = ARGV.find {|arg| flag_name == arg.split("=")[0] }
return unless name_index
value = options[name]
value = value.join(" ").to_s if option.type == :array
- Bundler::SharedHelpers.major_deprecation 2,\
+ Bundler::SharedHelpers.major_deprecation 2,
"The `#{flag_name}` flag is deprecated because it relies on being " \
"remembered across bundler invocations, which bundler will no longer " \
- "do in future versions. Instead please use `bundle config set #{name} " \
+ "do in future versions. Instead please use `bundle config set --local #{name.tr("-", "_")} " \
"'#{value}'`, and stop using this flag"
end
end
diff --git a/lib/bundler/cli/add.rb b/lib/bundler/cli/add.rb
index 07b951f1ef..08fa6547fb 100644
--- a/lib/bundler/cli/add.rb
+++ b/lib/bundler/cli/add.rb
@@ -17,7 +17,7 @@ module Bundler
perform_bundle_install unless options["skip-install"]
end
- private
+ private
def perform_bundle_install
Installer.install(Bundler.root, Bundler.definition)
@@ -40,7 +40,7 @@ module Bundler
raise InvalidOption, "Please specify gems to add." if gems.empty?
version.to_a.each do |v|
- raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN =~ v.to_s
+ raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN.match?(v.to_s)
end
end
end
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb
index 266396eedc..fc2fad47a5 100644
--- a/lib/bundler/cli/binstubs.rb
+++ b/lib/bundler/cli/binstubs.rb
@@ -11,12 +11,16 @@ module Bundler
def run
Bundler.definition.validate_runtime!
path_option = options["path"]
- path_option = nil if path_option && path_option.empty?
+ path_option = nil if path_option&.empty?
Bundler.settings.set_command_option :bin, path_option if options["path"]
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
installer = Installer.new(Bundler.root, Bundler.definition)
- installer_opts = { :force => options[:force], :binstubs_cmd => true }
+ installer_opts = {
+ :force => options[:force],
+ :binstubs_cmd => true,
+ :all_platforms => options["all-platforms"],
+ }
if options[:all]
raise InvalidOption, "Cannot specify --all with specific gems" unless gems.empty?
@@ -36,9 +40,13 @@ module Bundler
end
if options[:standalone]
- next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
+ if gem_name == "bundler"
+ Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") unless options[:all]
+ next
+ end
+
Bundler.settings.temporary(:path => (Bundler.settings[:path] || Bundler.root)) do
- installer.generate_standalone_bundler_executable_stubs(spec)
+ installer.generate_standalone_bundler_executable_stubs(spec, installer_opts)
end
else
installer.generate_bundler_executable_stubs(spec, installer_opts)
diff --git a/lib/bundler/cli/cache.rb b/lib/bundler/cli/cache.rb
index 5e8420990f..c8698ed7e3 100644
--- a/lib/bundler/cli/cache.rb
+++ b/lib/bundler/cli/cache.rb
@@ -9,7 +9,7 @@ module Bundler
end
def run
- Bundler.ui.level = "error" if options[:quiet]
+ Bundler.ui.level = "warn" if options[:quiet]
Bundler.settings.set_command_option_if_given :path, options[:path]
Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
@@ -24,12 +24,13 @@ module Bundler
end
end
- private
+ private
def install
require_relative "install"
options = self.options.dup
options["local"] = false if Bundler.settings[:cache_all_platforms]
+ options["no-cache"] = true
Bundler::CLI::Install.new(options).run
end
@@ -37,12 +38,6 @@ module Bundler
all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)
Bundler.settings.set_command_option_if_given :cache_all, all
-
- if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
- Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
- "to cache them as well, please pass the --all flag. This will be the default " \
- "on Bundler 3.0."
- end
end
end
end
diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb
index 19c0aaea06..cc1f37f0c3 100644
--- a/lib/bundler/cli/check.rb
+++ b/lib/bundler/cli/check.rb
@@ -11,11 +11,13 @@ module Bundler
def run
Bundler.settings.set_command_option_if_given :path, options[:path]
+ definition = Bundler.definition
+ definition.validate_runtime!
+
begin
- definition = Bundler.definition
- definition.validate_runtime!
+ definition.resolve_only_locally!
not_installed = definition.missing_specs
- rescue GemNotFound, VersionConflict
+ rescue GemNotFound, SolveFailure
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
Bundler.ui.warn "Install missing gems with `bundle install`."
exit 1
diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb
index 4a407fbae7..c6b0968e3e 100644
--- a/lib/bundler/cli/clean.rb
+++ b/lib/bundler/cli/clean.rb
@@ -13,7 +13,7 @@ module Bundler
Bundler.load.clean(options[:"dry-run"])
end
- protected
+ protected
def require_path_or_force
return unless Bundler.use_system_gems? && !options[:force]
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index cec7bcadb4..d654406f65 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -14,6 +14,21 @@ module Bundler
Bundler.ui.info msg
end
+ def self.output_fund_metadata_summary
+ return if Bundler.settings["ignore_funding_requests"]
+ definition = Bundler.definition
+ current_dependencies = definition.requested_dependencies
+ current_specs = definition.specs
+
+ count = current_dependencies.count {|dep| current_specs[dep.name].first.metadata.key?("funding_uri") }
+
+ return if count.zero?
+
+ intro = count > 1 ? "#{count} installed gems you directly depend on are" : "#{count} installed gem you directly depend on is"
+ message = "#{intro} looking for funding.\n Run `bundle fund` for details"
+ Bundler.ui.info message
+ end
+
def self.output_without_groups_message(command)
return if Bundler.settings[:without].empty?
Bundler.ui.confirm without_groups_message(command)
@@ -22,10 +37,15 @@ module Bundler
def self.without_groups_message(command)
command_in_past_tense = command == :install ? "installed" : "updated"
groups = Bundler.settings[:without]
+ "Gems in the #{verbalize_groups(groups)} were not #{command_in_past_tense}."
+ end
+
+ def self.verbalize_groups(groups)
+ groups.map! {|g| "'#{g}'" }
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
reject {|s| s.to_s.empty? }.join(" and ")
group_str = groups.size == 1 ? "group" : "groups"
- "Gems in the #{group_str} #{group_list} were not #{command_in_past_tense}."
+ "#{group_str} #{group_list}"
end
def self.select_spec(name, regex_match = nil)
@@ -39,7 +59,13 @@ module Bundler
case specs.count
when 0
- raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
+ dep_in_other_group = Bundler.definition.current_dependencies.find {|dep|dep.name == name }
+
+ if dep_in_other_group
+ raise GemNotFound, "Could not find gem '#{name}', because it's in the #{verbalize_groups(dep_in_other_group.groups)}, configured to be ignored."
+ else
+ raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
+ end
when 1
specs.first
else
@@ -69,6 +95,8 @@ module Bundler
end
def self.ensure_all_gems_in_lockfile!(names, locked_gems = Bundler.locked_gems)
+ return unless locked_gems
+
locked_names = locked_gems.specs.map(&:name).uniq
names.-(locked_names).each do |g|
raise GemNotFound, gem_not_found_message(g, locked_names)
@@ -82,7 +110,8 @@ module Bundler
definition.gem_version_promoter.tap do |gvp|
gvp.level = patch_level.first || :major
- gvp.strict = options[:strict] || options["update-strict"] || options["filter-strict"]
+ gvp.strict = options[:strict] || options["filter-strict"]
+ gvp.pre = options[:pre]
end
end
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 8d2aba0916..e1222c75dd 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -180,7 +180,7 @@ module Bundler
scopes = %w[global local].select {|s| options[s] }
case scopes.size
when 0
- @scope = "global"
+ @scope = inside_app? ? "local" : "global"
@explicit_scope = false
when 1
@scope = scopes.first
@@ -189,6 +189,15 @@ module Bundler
"The options #{scopes.join " and "} were specified. Please only use one of the switches at a time."
end
end
+
+ private
+
+ def inside_app?
+ Bundler.root
+ true
+ rescue GemfileNotFound
+ false
+ end
end
end
end
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index 6e0dfe28af..1eb8ea8254 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -12,7 +12,7 @@ module Bundler
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
"by `bin/console` generated by `bundle gem <name>`"
- group ? Bundler.require(:default, *group.split.map!(&:to_sym)) : Bundler.require
+ group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require
ARGV.clear
console = get_console(Bundler.settings[:console] || "irb")
@@ -30,9 +30,9 @@ module Bundler
def get_constant(name)
const_name = {
- "pry" => :Pry,
+ "pry" => :Pry,
"ripl" => :Ripl,
- "irb" => :IRB,
+ "irb" => :IRB,
}[name]
Object.const_get(const_name)
rescue NameError
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index fcf139ed1e..e299a5a8c2 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
require "rbconfig"
+require "shellwords"
+require "fiddle"
module Bundler
class CLI::Doctor
@@ -22,14 +24,14 @@ module Bundler
end
def dylibs_darwin(path)
- output = `/usr/bin/otool -L "#{path}"`.chomp
+ output = `/usr/bin/otool -L #{path.shellescape}`.chomp
dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
# ignore @rpath and friends
dylibs.reject {|dylib| dylib.start_with? "@" }
end
def dylibs_ldd(path)
- output = `/usr/bin/ldd "#{path}"`.chomp
+ output = `/usr/bin/ldd #{path.shellescape}`.chomp
output.split("\n").map do |l|
match = l.match(LDD_REGEX)
next if match.nil?
@@ -61,7 +63,7 @@ module Bundler
end
def run
- Bundler.ui.level = "error" if options[:quiet]
+ Bundler.ui.level = "warn" if options[:quiet]
Bundler.settings.validate!
check!
@@ -70,7 +72,12 @@ module Bundler
definition.specs.each do |spec|
bundles_for_gem(spec).each do |bundle|
- bad_paths = dylibs(bundle).select {|f| !File.exist?(f) }
+ bad_paths = dylibs(bundle).select do |f|
+ Fiddle.dlopen(f)
+ false
+ rescue Fiddle::DLError
+ true
+ end
if bad_paths.any?
broken_links[spec] ||= []
broken_links[spec].concat(bad_paths)
@@ -93,15 +100,18 @@ module Bundler
end
end
- private
+ private
def check_home_permissions
require "find"
files_not_readable_or_writable = []
files_not_rw_and_owned_by_different_user = []
files_not_owned_by_current_user_but_still_rw = []
+ broken_symlinks = []
Find.find(Bundler.bundle_path.to_s).each do |f|
- if !File.writable?(f) || !File.readable?(f)
+ if !File.exist?(f)
+ broken_symlinks << f
+ elsif !File.writable?(f) || !File.readable?(f)
if File.stat(f).uid != Process.uid
files_not_rw_and_owned_by_different_user << f
else
@@ -113,6 +123,13 @@ module Bundler
end
ok = true
+
+ if broken_symlinks.any?
+ Bundler.ui.warn "Broken links exist in the Bundler home. Please report them to the offending gem's upstream repo. These files are:\n - #{broken_symlinks.join("\n - ")}"
+
+ ok = false
+ end
+
if files_not_owned_by_current_user_but_still_rw.any?
Bundler.ui.warn "Files exist in the Bundler home that are owned by another " \
"user, but are still readable/writable. These files are:\n - #{files_not_owned_by_current_user_but_still_rw.join("\n - ")}"
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 0a1edbdbbd..42b602a055 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -12,12 +12,7 @@ module Bundler
@options = options
@cmd = args.shift
@args = args
-
- if !Bundler.current_ruby.jruby?
- @args << { :close_others => !options.keep_file_descriptors? }
- elsif options.keep_file_descriptors?
- Bundler.ui.warn "Ruby version #{RUBY_VERSION} defaults to keeping non-standard file descriptors on Kernel#exec."
- end
+ @args << { :close_others => !options.keep_file_descriptors? } unless Bundler.current_ruby.jruby?
end
def run
@@ -34,7 +29,7 @@ module Bundler
end
end
- private
+ private
def validate_cmd!
return unless cmd.nil?
@@ -63,10 +58,10 @@ module Bundler
Kernel.load(file)
rescue SystemExit, SignalException
raise
- rescue Exception => e # rubocop:disable Lint/RescueException
+ rescue Exception # rubocop:disable Lint/RescueException
Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
- backtrace = e.backtrace ? e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) } : []
- abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}"
+ Bundler::FriendlyErrors.disable!
+ raise
end
def process_title(file, args)
diff --git a/lib/bundler/cli/fund.rb b/lib/bundler/cli/fund.rb
new file mode 100644
index 0000000000..52db5aef68
--- /dev/null
+++ b/lib/bundler/cli/fund.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module Bundler
+ class CLI::Fund
+ attr_reader :options
+
+ def initialize(options)
+ @options = options
+ end
+
+ def run
+ Bundler.definition.validate_runtime!
+
+ groups = Array(options[:group]).map(&:to_sym)
+
+ deps = if groups.any?
+ Bundler.definition.dependencies_for(groups)
+ else
+ Bundler.definition.current_dependencies
+ end
+
+ fund_info = deps.each_with_object([]) do |dep, arr|
+ spec = Bundler.definition.specs[dep.name].first
+ if spec.metadata.key?("funding_uri")
+ arr << "* #{spec.name} (#{spec.version})\n Funding: #{spec.metadata["funding_uri"]}"
+ end
+ end
+
+ if fund_info.empty?
+ Bundler.ui.info "None of the installed gems you directly depend on are looking for funding."
+ else
+ Bundler.ui.info fund_info.join("\n")
+ end
+ end
+ end
+end
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index d3e5831759..7f1200f4a0 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -12,9 +12,10 @@ module Bundler
TEST_FRAMEWORK_VERSIONS = {
"rspec" => "3.0",
"minitest" => "5.0",
+ "test-unit" => "3.0",
}.freeze
- attr_reader :options, :gem_name, :thor, :name, :target
+ attr_reader :options, :gem_name, :thor, :name, :target, :extension
def initialize(options, gem_name, thor)
@options = options
@@ -27,7 +28,11 @@ module Bundler
@name = @gem_name
@target = SharedHelpers.pwd.join(gem_name)
- validate_ext_name if options[:ext]
+ @extension = options[:ext]
+
+ validate_ext_name if @extension
+ validate_rust_builder_rubygems_version if @extension == "rust"
+ travis_removal_info
end
def run
@@ -37,34 +42,48 @@ module Bundler
namespaced_path = name.tr("-", "/")
constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
constant_array = constant_name.split("::")
+ minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar
+
+ use_git = Bundler.git_present? && options[:git]
- git_installed = Bundler.git_present?
+ git_author_name = use_git ? `git config user.name`.chomp : ""
+ git_username = use_git ? `git config github.user`.chomp : ""
+ git_user_email = use_git ? `git config user.email`.chomp : ""
- git_author_name = git_installed ? `git config user.name`.chomp : ""
- github_username = git_installed ? `git config github.user`.chomp : ""
- git_user_email = git_installed ? `git config user.email`.chomp : ""
+ github_username = if options[:github_username].nil?
+ git_username
+ elsif options[:github_username] == false
+ ""
+ else
+ options[:github_username]
+ end
config = {
- :name => name,
+ :name => name,
:underscored_name => underscored_name,
- :namespaced_path => namespaced_path,
- :makefile_path => "#{underscored_name}/#{underscored_name}",
- :constant_name => constant_name,
- :constant_array => constant_array,
- :author => git_author_name.empty? ? "TODO: Write your name" : git_author_name,
- :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
- :test => options[:test],
- :ext => options[:ext],
- :exe => options[:exe],
- :bundler_version => bundler_dependency_version,
- :github_username => github_username.empty? ? "[USERNAME]" : github_username,
+ :namespaced_path => namespaced_path,
+ :makefile_path => "#{underscored_name}/#{underscored_name}",
+ :constant_name => constant_name,
+ :constant_array => constant_array,
+ :author => git_author_name.empty? ? "TODO: Write your name" : git_author_name,
+ :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
+ :test => options[:test],
+ :ext => extension,
+ :exe => options[:exe],
+ :bundler_version => bundler_dependency_version,
+ :git => use_git,
+ :github_username => github_username.empty? ? "[USERNAME]" : github_username,
+ :required_ruby_version => required_ruby_version,
+ :rust_builder_required_rubygems_version => rust_builder_required_rubygems_version,
+ :minitest_constant_name => minitest_constant_name,
}
ensure_safe_gem_name(name, constant_array)
templates = {
- "Gemfile.tt" => "Gemfile",
+ "#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
"lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
"lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
+ "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
"newgem.gemspec.tt" => "#{name}.gemspec",
"Rakefile.tt" => "Rakefile",
"README.md.tt" => "README.md",
@@ -77,14 +96,12 @@ module Bundler
bin/setup
]
- templates.merge!("gitignore.tt" => ".gitignore") if Bundler.git_present?
+ templates.merge!("gitignore.tt" => ".gitignore") if use_git
if test_framework = ask_and_set_test_framework
config[:test] = test_framework
config[:test_framework_version] = TEST_FRAMEWORK_VERSIONS[test_framework]
- templates.merge!("travis.yml.tt" => ".travis.yml")
-
case test_framework
when "rspec"
templates.merge!(
@@ -92,15 +109,39 @@ module Bundler
"spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
"spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
)
+ config[:test_task] = :spec
when "minitest"
+ # Generate path for minitest target file (FileList["test/**/test_*.rb"])
+ # foo => test/test_foo.rb
+ # foo-bar => test/foo/test_bar.rb
+ # foo_bar => test/test_foo_bar.rb
+ paths = namespaced_path.rpartition("/")
+ paths[2] = "test_#{paths[2]}"
+ minitest_namespaced_path = paths.join("")
+
templates.merge!(
- "test/test_helper.rb.tt" => "test/test_helper.rb",
- "test/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
+ "test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
+ "test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
)
+ config[:test_task] = :test
+ when "test-unit"
+ templates.merge!(
+ "test/test-unit/test_helper.rb.tt" => "test/test_helper.rb",
+ "test/test-unit/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
+ )
+ config[:test_task] = :test
end
end
- config[:test_task] = config[:test] == "minitest" ? "test" : "spec"
+ config[:ci] = ask_and_set_ci
+ case config[:ci]
+ when "github"
+ templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml")
+ when "gitlab"
+ templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml")
+ when "circle"
+ templates.merge!("circleci/config.yml.tt" => ".circleci/config.yml")
+ end
if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
"This means that any other developer or company will be legally allowed to use your code " \
@@ -124,34 +165,75 @@ module Bundler
templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
end
+ if ask_and_set(:changelog, "Do you want to include a changelog?",
+ "A changelog is a file which contains a curated, chronologically ordered list of notable " \
+ "changes for each version of a project. To make it easier for users and contributors to" \
+ " see precisely what notable changes have been made between each release (or version) of" \
+ " the project. Whether consumers or developers, the end users of software are" \
+ " human beings who care about what's in the software. When the software changes, people " \
+ "want to know why and how. see https://keepachangelog.com")
+ config[:changelog] = true
+ Bundler.ui.info "Changelog enabled in config"
+ templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
+ end
+
+ config[:linter] = ask_and_set_linter
+ case config[:linter]
+ when "rubocop"
+ config[:linter_version] = rubocop_version
+ Bundler.ui.info "RuboCop enabled in config"
+ templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
+ when "standard"
+ config[:linter_version] = standard_version
+ Bundler.ui.info "Standard enabled in config"
+ templates.merge!("standard.yml.tt" => ".standard.yml")
+ end
+
templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
- if options[:ext]
+ if extension == "c"
templates.merge!(
- "ext/newgem/extconf.rb.tt" => "ext/#{name}/extconf.rb",
+ "ext/newgem/extconf-c.rb.tt" => "ext/#{name}/extconf.rb",
"ext/newgem/newgem.h.tt" => "ext/#{name}/#{underscored_name}.h",
"ext/newgem/newgem.c.tt" => "ext/#{name}/#{underscored_name}.c"
)
end
+ if extension == "rust"
+ templates.merge!(
+ "Cargo.toml.tt" => "Cargo.toml",
+ "ext/newgem/Cargo.toml.tt" => "ext/#{name}/Cargo.toml",
+ "ext/newgem/extconf-rust.rb.tt" => "ext/#{name}/extconf.rb",
+ "ext/newgem/src/lib.rs.tt" => "ext/#{name}/src/lib.rs",
+ )
+ end
+
+ if target.exist? && !target.directory?
+ Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`."
+ exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
+ end
+
+ if use_git
+ Bundler.ui.info "Initializing git repo in #{target}"
+ require "shellwords"
+ `git init #{target.to_s.shellescape}`
+
+ config[:git_default_branch] = File.read("#{target}/.git/HEAD").split("/").last.chomp
+ end
+
templates.each do |src, dst|
destination = target.join(dst)
- SharedHelpers.filesystem_access(destination) do
- thor.template("newgem/#{src}", destination, config)
- end
+ thor.template("newgem/#{src}", destination, config)
end
executables.each do |file|
- SharedHelpers.filesystem_access(target.join(file)) do |path|
- executable = (path.stat.mode | 0o111)
- path.chmod(executable)
- end
+ path = target.join(file)
+ executable = (path.stat.mode | 0o111)
+ path.chmod(executable)
end
- if Bundler.git_present? && options[:git]
- Bundler.ui.info "Initializing git repo in #{target}"
+ if use_git
Dir.chdir(target) do
- `git init`
`git add .`
end
end
@@ -161,11 +243,9 @@ module Bundler
Bundler.ui.info "Gem '#{name}' was successfully created. " \
"For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
- rescue Errno::EEXIST => e
- raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
end
- private
+ private
def resolve_name(name)
SharedHelpers.pwd.join(name).basename.to_s
@@ -197,11 +277,12 @@ module Bundler
def ask_and_set_test_framework
test_framework = options[:test] || Bundler.settings["gem.test"]
- if test_framework.nil?
+ if test_framework.to_s.empty?
Bundler.ui.confirm "Do you want to generate tests with your gem?"
- result = Bundler.ui.ask "Type 'rspec' or 'minitest' to generate those test files now and " \
- "in the future. rspec/minitest/(none):"
- if result =~ /rspec|minitest/
+ Bundler.ui.info hint_text("test")
+
+ result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
+ if /rspec|minitest|test-unit/.match?(result)
test_framework = result
else
test_framework = false
@@ -212,9 +293,105 @@ module Bundler
Bundler.settings.set_global("gem.test", test_framework)
end
+ if options[:test] == Bundler.settings["gem.test"]
+ Bundler.ui.info "#{options[:test]} is already configured, ignoring --test flag."
+ end
+
test_framework
end
+ def hint_text(setting)
+ if Bundler.settings["gem.#{setting}"] == false
+ "Your choice will only be applied to this gem."
+ else
+ "Future `bundle gem` calls will use your choice. " \
+ "This setting can be changed anytime with `bundle config gem.#{setting}`."
+ end
+ end
+
+ def ask_and_set_ci
+ ci_template = options[:ci] || Bundler.settings["gem.ci"]
+
+ if ci_template.to_s.empty?
+ Bundler.ui.confirm "Do you want to set up continuous integration for your gem? " \
+ "Supported services:\n" \
+ "* CircleCI: https://circleci.com/\n" \
+ "* GitHub Actions: https://github.com/features/actions\n" \
+ "* GitLab CI: https://docs.gitlab.com/ee/ci/\n" \
+ "\n"
+ Bundler.ui.info hint_text("ci")
+
+ result = Bundler.ui.ask "Enter a CI service. github/gitlab/circle/(none):"
+ if /github|gitlab|circle/.match?(result)
+ ci_template = result
+ else
+ ci_template = false
+ end
+ end
+
+ if Bundler.settings["gem.ci"].nil?
+ Bundler.settings.set_global("gem.ci", ci_template)
+ end
+
+ if options[:ci] == Bundler.settings["gem.ci"]
+ Bundler.ui.info "#{options[:ci]} is already configured, ignoring --ci flag."
+ end
+
+ ci_template
+ end
+
+ def ask_and_set_linter
+ linter_template = options[:linter] || Bundler.settings["gem.linter"]
+ linter_template = deprecated_rubocop_option if linter_template.nil?
+
+ if linter_template.to_s.empty?
+ Bundler.ui.confirm "Do you want to add a code linter and formatter to your gem? " \
+ "Supported Linters:\n" \
+ "* RuboCop: https://rubocop.org\n" \
+ "* Standard: https://github.com/testdouble/standard\n" \
+ "\n"
+ Bundler.ui.info hint_text("linter")
+
+ result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
+ if /rubocop|standard/.match?(result)
+ linter_template = result
+ else
+ linter_template = false
+ end
+ end
+
+ if Bundler.settings["gem.linter"].nil?
+ Bundler.settings.set_global("gem.linter", linter_template)
+ end
+
+ # Once gem.linter safely set, unset the deprecated gem.rubocop
+ unless Bundler.settings["gem.rubocop"].nil?
+ Bundler.settings.set_global("gem.rubocop", nil)
+ end
+
+ if options[:linter] == Bundler.settings["gem.linter"]
+ Bundler.ui.info "#{options[:linter]} is already configured, ignoring --linter flag."
+ end
+
+ linter_template
+ end
+
+ def deprecated_rubocop_option
+ if !options[:rubocop].nil?
+ if options[:rubocop]
+ Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop"
+ "rubocop"
+ else
+ Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter"
+ false
+ end
+ elsif !Bundler.settings["gem.rubocop"].nil?
+ Bundler::SharedHelpers.major_deprecation 2,
+ "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead"
+ Bundler.settings["gem.rubocop"] ? "rubocop" : false
+ end
+ end
+
def bundler_dependency_version
v = Gem::Version.new(Bundler::VERSION)
req = v.segments[0..1]
@@ -223,7 +400,7 @@ module Bundler
end
def ensure_safe_gem_name(name, constant_array)
- if name =~ /^\d/
+ if /^\d/.match?(name)
Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
exit 1
end
@@ -248,5 +425,41 @@ module Bundler
def open_editor(editor, file)
thor.run(%(#{editor} "#{file}"))
end
+
+ def rust_builder_required_rubygems_version
+ "3.3.11"
+ end
+
+ def required_ruby_version
+ "2.6.0"
+ end
+
+ def rubocop_version
+ "1.21"
+ end
+
+ def standard_version
+ "1.3"
+ end
+
+ # TODO: remove at next minor release
+ def travis_removal_info
+ if options[:ci] == "travis"
+ Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator."
+ exit 1
+ end
+
+ if Bundler.settings["gem.ci"] == "travis"
+ Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator, but it is present in bundle config. Please configure another provider using `bundle config set gem.ci SERVICE` (where SERVICE is one of github/gitlab/circle) or unset configuration using `bundle config unset gem.ci`."
+ exit 1
+ end
+ end
+
+ def validate_rust_builder_rubygems_version
+ if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
+ Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
+ exit 1
+ end
+ end
end
end
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 4733675e8c..36c7a58f12 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -18,11 +18,12 @@ module Bundler
if spec
return print_gem_path(spec) if @options[:path]
+ return print_gem_version(spec) if @options[:version]
print_gem_info(spec)
end
end
- private
+ private
def spec_for_gem(gem_name)
spec = Bundler.definition.specs.find {|s| s.name == gem_name }
@@ -32,31 +33,62 @@ module Bundler
def default_gem_spec(gem_name)
return unless Gem::Specification.respond_to?(:find_all_by_name)
gem_spec = Gem::Specification.find_all_by_name(gem_name).last
- return gem_spec if gem_spec && gem_spec.respond_to?(:default_gem?) && gem_spec.default_gem?
+ return gem_spec if gem_spec&.default_gem?
end
def spec_not_found(gem_name)
raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
end
+ def print_gem_version(spec)
+ Bundler.ui.info spec.version.to_s
+ end
+
def print_gem_path(spec)
- path = if spec.name == "bundler"
- File.expand_path("../../../..", __FILE__)
+ name = spec.name
+ if name == "bundler"
+ path = File.expand_path("../../..", __dir__)
else
- spec.full_gem_path
+ path = spec.full_gem_path
+ if spec.deleted_gem?
+ return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
+ end
end
Bundler.ui.info path
end
def print_gem_info(spec)
+ metadata = spec.metadata
+ name = spec.name
gem_info = String.new
- gem_info << " * #{spec.name} (#{spec.version}#{spec.git_version})\n"
+ gem_info << " * #{name} (#{spec.version}#{spec.git_version})\n"
gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
+ gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
+ gem_info << "\tSource Code: #{metadata["source_code_uri"]}\n" if metadata.key?("source_code_uri")
+ gem_info << "\tFunding: #{metadata["funding_uri"]}\n" if metadata.key?("funding_uri")
+ gem_info << "\tWiki: #{metadata["wiki_uri"]}\n" if metadata.key?("wiki_uri")
+ gem_info << "\tChangelog: #{metadata["changelog_uri"]}\n" if metadata.key?("changelog_uri")
+ gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
+ gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
gem_info << "\tPath: #{spec.full_gem_path}\n"
- gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
+ gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
+ gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
+
+ if name != "bundler" && spec.deleted_gem?
+ return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
+ end
+
Bundler.ui.info gem_info
end
+
+ def gem_dependencies
+ @gem_dependencies ||= Bundler.definition.specs.map do |spec|
+ dependency = spec.dependencies.find {|dep| dep.name == gem_name }
+ next unless dependency
+ "#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
+ end.compact.sort
+ end
end
end
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index 65dd08dfe9..246b9d6460 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -32,16 +32,20 @@ module Bundler
file << spec.to_gemfile
end
else
- FileUtils.cp(File.expand_path("../../templates/#{gemfile}", __FILE__), gemfile)
+ File.open(File.expand_path("../templates/Gemfile", __dir__), "r") do |template|
+ File.open(gemfile, "wb") do |destination|
+ IO.copy_stream(template, destination)
+ end
+ end
end
puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
end
- private
+ private
def gemfile
- @gemfile ||= Bundler.settings[:init_gems_rb] ? "gems.rb" : "Gemfile"
+ @gemfile ||= options[:gemfile] || Bundler.preferred_gemfile_name
end
end
end
diff --git a/lib/bundler/cli/inject.rb b/lib/bundler/cli/inject.rb
index b00675d348..8093a85283 100644
--- a/lib/bundler/cli/inject.rb
+++ b/lib/bundler/cli/inject.rb
@@ -44,7 +44,7 @@ module Bundler
end
end
- private
+ private
def last_version_number
definition = Bundler.definition(true)
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index d823fb632f..c71bcf159f 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -8,11 +8,11 @@ module Bundler
end
def run
- Bundler.ui.level = "error" if options[:quiet]
+ Bundler.ui.level = "warn" if options[:quiet]
warn_if_root
- normalize_groups
+ Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
@@ -35,11 +35,8 @@ module Bundler
options[:local] = true if Bundler.app_cache.exist?
- if Bundler.feature_flag.deployment_means_frozen?
- Bundler.settings.set_command_option :deployment, true
- else
- Bundler.settings.set_command_option :frozen, true
- end
+ Bundler.settings.set_command_option :deployment, true if options[:deployment]
+ Bundler.settings.set_command_option :frozen, true if options[:frozen]
end
# When install is called with --no-deployment, disable deployment mode
@@ -54,7 +51,7 @@ module Bundler
if options["binstubs"]
Bundler::SharedHelpers.major_deprecation 2,
- "The --binstubs option will be removed in favor of `bundle binstubs`"
+ "The --binstubs option will be removed in favor of `bundle binstubs --all`"
end
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
@@ -63,7 +60,10 @@ module Bundler
definition.validate_runtime!
installer = Installer.install(Bundler.root, definition, options)
- Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
+
+ Bundler.settings.temporary(:cache_all_platforms => options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
+ Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
+ end
Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
Bundler::CLI::Common.output_without_groups_message(:install)
@@ -83,31 +83,19 @@ module Bundler
require_relative "clean"
Bundler::CLI::Clean.new(options).run
end
- rescue GemNotFound, VersionConflict => e
- if options[:local] && Bundler.app_cache.exist?
- Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
- end
- unless Bundler.definition.has_rubygems_remotes?
- Bundler.ui.warn <<-WARN, :wrap => true
- Your Gemfile has no gem server sources. If you need gems that are \
- not already on your machine, add a line like this to your Gemfile:
- source 'https://rubygems.org'
- WARN
- end
- raise e
- rescue Gem::InvalidSpecificationException => e
+ Bundler::CLI::Common.output_fund_metadata_summary
+ rescue Gem::InvalidSpecificationException
Bundler.ui.warn "You have one or more invalid gemspecs that need to be fixed."
- raise e
+ raise
end
- private
+ private
def warn_if_root
- return if Bundler.settings[:silence_root_warning] || Bundler::WINDOWS || !Process.uid.zero?
- Bundler.ui.warn "Don't run Bundler as root. Bundler can ask for sudo " \
- "if it is needed, and installing your bundle as root will break this " \
- "application for all non-root users on this machine.", :wrap => true
+ return if Bundler.settings[:silence_root_warning] || Gem.win_platform? || !Process.uid.zero?
+ Bundler.ui.warn "Don't run Bundler as root. Installing your bundle as root " \
+ "will break this application for all non-root users on this machine.", :wrap => true
end
def dependencies_count_for(definition)
@@ -146,38 +134,27 @@ module Bundler
end
def normalize_groups
- options[:with] &&= options[:with].join(":").tr(" ", ":").split(":")
- options[:without] &&= options[:without].join(":").tr(" ", ":").split(":")
-
check_for_group_conflicts_in_cli_options
- Bundler.settings.set_command_option :with, nil if options[:with] == []
- Bundler.settings.set_command_option :without, nil if options[:without] == []
-
- with = options.fetch(:with, [])
- with |= Bundler.settings[:with].map(&:to_s)
- with -= options[:without] if options[:without]
-
- without = options.fetch(:without, [])
- without |= Bundler.settings[:without].map(&:to_s)
- without -= options[:with] if options[:with]
-
- options[:with] = with
- options[:without] = without
+ # need to nil them out first to get around validation for backwards compatibility
+ Bundler.settings.set_command_option :without, nil
+ Bundler.settings.set_command_option :with, nil
+ Bundler.settings.set_command_option :without, options[:without]
+ Bundler.settings.set_command_option :with, options[:with]
end
def normalize_settings
Bundler.settings.set_command_option :path, nil if options[:system]
- Bundler.settings.temporary(:path_relative_to_cwd => false) do
- Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment]
- end
Bundler.settings.set_command_option_if_given :path, options[:path]
- Bundler.settings.temporary(:path_relative_to_cwd => false) do
- Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
+
+ if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
+ Bundler.settings.temporary(:path_relative_to_cwd => false) do
+ Bundler.settings.set_command_option :path, "bundle"
+ end
end
bin_option = options["binstubs"]
- bin_option = nil if bin_option && bin_option.empty?
+ bin_option = nil if bin_option&.empty?
Bundler.settings.set_command_option :bin, bin_option if options["binstubs"]
Bundler.settings.set_command_option_if_given :shebang, options["shebang"]
@@ -190,13 +167,7 @@ module Bundler
Bundler.settings.set_command_option_if_given :clean, options["clean"]
- unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
- # need to nil them out first to get around validation for backwards compatibility
- Bundler.settings.set_command_option :without, nil
- Bundler.settings.set_command_option :with, nil
- Bundler.settings.set_command_option :without, options[:without] - options[:with]
- Bundler.settings.set_command_option :with, options[:with]
- end
+ normalize_groups if options[:without] || options[:with]
options[:force] = options[:redownload]
end
diff --git a/lib/bundler/cli/issue.rb b/lib/bundler/cli/issue.rb
index 054ce76315..b891ecb1d2 100644
--- a/lib/bundler/cli/issue.rb
+++ b/lib/bundler/cli/issue.rb
@@ -10,7 +10,7 @@ module Bundler
be sure to check out these resources:
1. Check out our troubleshooting guide for quick fixes to common issues:
- https://github.com/bundler/bundler/blob/master/doc/TROUBLESHOOTING.md
+ https://github.com/rubygems/rubygems/blob/master/bundler/doc/TROUBLESHOOTING.md
2. Instructions for common Bundler uses can be found on the documentation
site: https://bundler.io/
@@ -20,9 +20,10 @@ module Bundler
Hopefully the troubleshooting steps above resolved your problem! If things
still aren't working the way you expect them to, please let us know so
- that we can diagnose and help fix the problem you're having. Please
- view the Filing Issues guide for more information:
- https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md
+ that we can diagnose and help fix the problem you're having, by filling
+ in the new issue form located at
+ https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md,
+ and copy and pasting the information below.
EOS
diff --git a/lib/bundler/cli/list.rb b/lib/bundler/cli/list.rb
index d1799196e7..f56bf5b86a 100644
--- a/lib/bundler/cli/list.rb
+++ b/lib/bundler/cli/list.rb
@@ -4,17 +4,25 @@ module Bundler
class CLI::List
def initialize(options)
@options = options
+ @without_group = options["without-group"].map(&:to_sym)
+ @only_group = options["only-group"].map(&:to_sym)
end
def run
- raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @options["only-group"] && @options["without-group"]
+ raise InvalidOption, "The `--only-group` and `--without-group` options cannot be used together" if @only_group.any? && @without_group.any?
raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options[:paths]
- specs = if @options["only-group"] || @options["without-group"]
+ specs = if @only_group.any? || @without_group.any?
filtered_specs_by_groups
else
- Bundler.load.specs
+ begin
+ Bundler.load.specs
+ rescue GemNotFound => e
+ Bundler.ui.error e.message
+ Bundler.ui.warn "Install missing gems with `bundle install`."
+ exit 1
+ end
end.reject {|s| s.name == "bundler" }.sort_by(&:name)
return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
@@ -29,12 +37,12 @@ module Bundler
Bundler.ui.info "Use `bundle info` to print more detailed information about a gem"
end
- private
+ private
def verify_group_exists(groups)
- raise InvalidOption, "`#{@options["without-group"]}` group could not be found." if @options["without-group"] && !groups.include?(@options["without-group"].to_sym)
-
- raise InvalidOption, "`#{@options["only-group"]}` group could not be found." if @options["only-group"] && !groups.include?(@options["only-group"].to_sym)
+ (@without_group + @only_group).each do |group|
+ raise InvalidOption, "`#{group}` group could not be found." unless groups.include?(group)
+ end
end
def filtered_specs_by_groups
@@ -44,10 +52,10 @@ module Bundler
verify_group_exists(groups)
show_groups =
- if @options["without-group"]
- groups.reject {|g| g == @options["without-group"].to_sym }
- elsif @options["only-group"]
- groups.select {|g| g == @options["only-group"].to_sym }
+ if @without_group.any?
+ groups.reject {|g| @without_group.include?(g) }
+ elsif @only_group.any?
+ groups.select {|g| @only_group.include?(g) }
else
groups
end.map(&:to_sym)
diff --git a/lib/bundler/cli/lock.rb b/lib/bundler/cli/lock.rb
index 7dd078b1ef..cb3ed27138 100644
--- a/lib/bundler/cli/lock.rb
+++ b/lib/bundler/cli/lock.rb
@@ -15,15 +15,22 @@ module Bundler
end
print = options[:print]
- ui = Bundler.ui
- Bundler.ui = UI::Silent.new if print
+ previous_ui_level = Bundler.ui.level
+ Bundler.ui.level = "silent" if print
Bundler::Fetcher.disable_endpoint = options["full-index"]
update = options[:update]
+ conservative = options[:conservative]
+ bundler = options[:bundler]
+
if update.is_a?(Array) # unlocking specific gems
Bundler::CLI::Common.ensure_all_gems_in_lockfile!(update)
- update = { :gems => update, :lock_shared_dependencies => options[:conservative] }
+ update = { :gems => update, :conservative => conservative }
+ elsif update && conservative
+ update = { :conservative => conservative }
+ elsif update && bundler
+ update = { :bundler => bundler }
end
definition = Bundler.definition(update)
@@ -57,7 +64,7 @@ module Bundler
definition.lock(file)
end
- Bundler.ui = ui
+ Bundler.ui.level = previous_ui_level
end
end
end
diff --git a/lib/bundler/cli/open.rb b/lib/bundler/cli/open.rb
index df32e2f38b..8522ec92d6 100644
--- a/lib/bundler/cli/open.rb
+++ b/lib/bundler/cli/open.rb
@@ -1,25 +1,26 @@
# frozen_string_literal: true
-require "shellwords"
-
module Bundler
class CLI::Open
- attr_reader :options, :name
+ attr_reader :options, :name, :path
def initialize(options, name)
@options = options
@name = name
+ @path = options[:path] unless options[:path].nil?
end
def run
+ raise InvalidOption, "Cannot specify `--path` option without a value" if !@path.nil? && @path.empty?
editor = [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? }
return Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") unless editor
return unless spec = Bundler::CLI::Common.select_spec(name, :regex_match)
if spec.default_gem?
Bundler.ui.info "Unable to open #{name} because it's a default gem, so the directory it would normally be installed to does not exist."
else
- path = spec.full_gem_path
- Dir.chdir(path) do
- command = Shellwords.split(editor) + [path]
+ root_path = spec.full_gem_path
+ Dir.chdir(root_path) do
+ require "shellwords"
+ command = Shellwords.split(editor) << File.join([root_path, path].compact)
Bundler.with_original_env do
system(*command)
end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 0b710e9782..68c701aefb 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -3,18 +3,16 @@
module Bundler
class CLI::Outdated
attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict
- attr_accessor :outdated_gems_by_groups, :outdated_gems_list
+ attr_accessor :outdated_gems
def initialize(options, gems)
@options = options
@gems = gems
@sources = Array(options[:source])
- @filter_options_patch = options.keys &
- %w[filter-major filter-minor filter-patch]
+ @filter_options_patch = options.keys & %w[filter-major filter-minor filter-patch]
- @outdated_gems_by_groups = {}
- @outdated_gems_list = []
+ @outdated_gems = []
@options_include_groups = [:group, :groups].any? do |v|
options.keys.include?(v.to_s)
@@ -22,8 +20,7 @@ module Bundler
# the patch level options imply strict is also true. It wouldn't make
# sense otherwise.
- @strict = options["filter-strict"] ||
- Bundler::CLI::Common.patch_level_options(options).any?
+ @strict = options["filter-strict"] || Bundler::CLI::Common.patch_level_options(options).any?
end
def run
@@ -49,7 +46,7 @@ module Bundler
Bundler::CLI::Common.configure_gem_version_promoter(
Bundler.definition,
- options
+ options.merge(:strict => @strict)
)
definition_resolution = proc do
@@ -75,85 +72,69 @@ module Bundler
gemfile_specs + dependency_specs
end
- specs.sort_by(&:name).each do |current_spec|
- next if !gems.empty? && !gems.include?(current_spec.name)
+ specs.sort_by(&:name).uniq(&:name).each do |current_spec|
+ next unless gems.empty? || gems.include?(current_spec.name)
- dependency = current_dependencies[current_spec.name]
active_spec = retrieve_active_spec(definition, current_spec)
+ next unless active_spec
- next if active_spec.nil?
- next if filter_options_patch.any? &&
- !update_present_via_semver_portions(current_spec, active_spec, options)
+ next unless filter_options_patch.empty? || update_present_via_semver_portions(current_spec, active_spec, options)
gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
next unless gem_outdated || (current_spec.git_version != active_spec.git_version)
- groups = nil
+
+ dependency = current_dependencies[current_spec.name]
+ groups = ""
if dependency && !options[:parseable]
groups = dependency.groups.join(", ")
end
- outdated_gems_list << { :active_spec => active_spec,
- :current_spec => current_spec,
- :dependency => dependency,
- :groups => groups }
-
- outdated_gems_by_groups[groups] ||= []
- outdated_gems_by_groups[groups] << outdated_gems_list[-1]
+ outdated_gems << {
+ :active_spec => active_spec,
+ :current_spec => current_spec,
+ :dependency => dependency,
+ :groups => groups,
+ }
end
- if outdated_gems_list.empty?
- display_nothing_outdated_message
- else
+ if outdated_gems.empty?
unless options[:parseable]
- Bundler.ui.info(header_outdated_message)
+ Bundler.ui.info(nothing_outdated_message)
end
-
+ else
if options_include_groups
- ordered_groups = outdated_gems_by_groups.keys.compact.sort
- ordered_groups.insert(0, nil).each do |groups|
- gems = outdated_gems_by_groups[groups]
- contains_group = if groups
- groups.split(", ").include?(options[:group])
- else
- options[:group] == "group"
- end
-
- next if (!options[:groups] && !contains_group) || gems.nil?
-
- unless options[:parseable]
- Bundler.ui.info(header_group_message(groups))
- end
-
- print_gems(gems)
+ relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems|
+ contains_group = groups.split(", ").include?(options[:group])
+ next unless options[:groups] || contains_group
+
+ gems
+ end.compact
+
+ if options[:parseable]
+ print_gems(relevant_outdated_gems)
+ else
+ print_gems_table(relevant_outdated_gems)
end
+ elsif options[:parseable]
+ print_gems(outdated_gems)
else
- print_gems(outdated_gems_list)
+ print_gems_table(outdated_gems)
end
exit 1
end
end
- private
+ private
- def groups_text(group_text, groups)
- "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
- end
+ def loaded_from_for(spec)
+ return unless spec.respond_to?(:loaded_from)
- def header_outdated_message
- if options[:pre]
- "Outdated gems included in the bundle (including pre-releases):"
- else
- "Outdated gems included in the bundle:"
- end
+ spec.loaded_from
end
- def header_group_message(groups)
- if groups
- "===== #{groups_text("Group", groups)} ====="
- else
- "===== Without group ====="
- end
+ def groups_text(group_text, groups)
+ "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
end
def nothing_outdated_message
@@ -169,23 +150,16 @@ module Bundler
end
def retrieve_active_spec(definition, current_spec)
- if strict
- active_spec = definition.find_resolved_spec(current_spec)
- else
- active_specs = definition.find_indexed_specs(current_spec)
- if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
- active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
- end
- active_spec = active_specs.last
- end
+ active_spec = definition.resolve.find_by_name_and_platform(current_spec.name, current_spec.platform)
+ return unless active_spec
- active_spec
- end
+ return active_spec if strict
- def display_nothing_outdated_message
- unless options[:parseable]
- Bundler.ui.info(nothing_outdated_message)
+ active_specs = active_spec.source.specs.search(current_spec.name).select {|spec| spec.match_platform(current_spec.platform) }.sort_by(&:version)
+ if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
+ active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
end
+ active_specs.last
end
def print_gems(gems_list)
@@ -199,12 +173,28 @@ module Bundler
end
end
+ def print_gems_table(gems_list)
+ data = gems_list.map do |gem|
+ gem_column_for(
+ gem[:current_spec],
+ gem[:active_spec],
+ gem[:dependency],
+ gem[:groups],
+ )
+ end
+
+ print_indented([table_header] + data)
+ end
+
def print_gem(current_spec, active_spec, dependency, groups)
spec_version = "#{active_spec.version}#{active_spec.git_version}"
- spec_version += " (from #{active_spec.loaded_from})" if Bundler.ui.debug? && active_spec.loaded_from
+ if Bundler.ui.debug?
+ loaded_from = loaded_from_for(active_spec)
+ spec_version += " (from #{loaded_from})" if loaded_from
+ end
current_version = "#{current_spec.version}#{current_spec.git_version}"
- if dependency && dependency.specific?
+ if dependency&.specific?
dependency_version = %(, requested #{dependency.requirement})
end
@@ -213,7 +203,7 @@ module Bundler
output_message = if options[:parseable]
spec_outdated_info.to_s
- elsif options_include_groups || !groups
+ elsif options_include_groups || groups.empty?
" * #{spec_outdated_info}"
else
" * #{spec_outdated_info} in #{groups_text("group", groups)}"
@@ -222,14 +212,22 @@ module Bundler
Bundler.ui.info output_message.rstrip
end
+ def gem_column_for(current_spec, active_spec, dependency, groups)
+ current_version = "#{current_spec.version}#{current_spec.git_version}"
+ spec_version = "#{active_spec.version}#{active_spec.git_version}"
+ dependency = dependency.requirement if dependency
+
+ ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s]
+ ret_val << loaded_from_for(active_spec).to_s if Bundler.ui.debug?
+ ret_val
+ end
+
def check_for_deployment_mode!
return unless Bundler.frozen_bundle?
- suggested_command = if Bundler.settings.locations("frozen")[:global]
+ suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
"bundle config unset frozen"
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
"bundle config unset deployment"
- else
- "bundle install --no-deployment"
end
raise ProductionError, "You are trying to check outdated gems in " \
"deployment mode. Run `bundle outdated` elsewhere.\n" \
@@ -266,5 +264,34 @@ module Bundler
version_section = spec.version.segments[version_portion_index, 1]
version_section.to_a[0].to_i
end
+
+ def print_indented(matrix)
+ header = matrix[0]
+ data = matrix[1..-1]
+
+ column_sizes = Array.new(header.size) do |index|
+ matrix.max_by {|row| row[index].length }[index].length
+ end
+
+ Bundler.ui.info justify(header, column_sizes)
+
+ data.sort_by! {|row| row[0] }
+
+ data.each do |row|
+ Bundler.ui.info justify(row, column_sizes)
+ end
+ end
+
+ def table_header
+ header = ["Gem", "Current", "Latest", "Requested", "Groups"]
+ header << "Path" if Bundler.ui.debug?
+ header
+ end
+
+ def justify(row, sizes)
+ row.each_with_index.map do |element, index|
+ element.ljust(sizes[index])
+ end.join(" ").strip + "\n"
+ end
end
end
diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb
deleted file mode 100644
index b31b67776d..0000000000
--- a/lib/bundler/cli/package.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler
- class CLI::Package
- attr_reader :options
-
- def initialize(options)
- @options = options
- end
-
- def run
- Bundler.ui.level = "error" if options[:quiet]
- Bundler.settings.set_command_option_if_given :path, options[:path]
- Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
-
- setup_cache_all
- install
-
- # TODO: move cache contents here now that all bundles are locked
- custom_path = Bundler.settings[:path] if options[:path]
-
- Bundler.settings.temporary(:cache_all_platforms => options["all-platforms"]) do
- Bundler.load.cache(custom_path)
- end
- end
-
- private
-
- def install
- require_relative "install"
- options = self.options.dup
- options["local"] = false if Bundler.settings[:cache_all_platforms]
- Bundler::CLI::Install.new(options).run
- end
-
- def setup_cache_all
- all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)
-
- Bundler.settings.set_command_option_if_given :cache_all, all
-
- if Bundler.definition.has_local_dependencies? && !Bundler.feature_flag.cache_all?
- Bundler.ui.warn "Your Gemfile contains path and git dependencies. If you want " \
- "to package them as well, please pass the --all flag. This will be the default " \
- "on Bundler 3.0."
- end
- end
- end
-end
diff --git a/lib/bundler/cli/platform.rb b/lib/bundler/cli/platform.rb
index e97cad49a4..32d68abbb1 100644
--- a/lib/bundler/cli/platform.rb
+++ b/lib/bundler/cli/platform.rb
@@ -8,12 +8,12 @@ module Bundler
end
def run
- platforms, ruby_version = Bundler.ui.silence do
- locked_ruby_version = Bundler.locked_gems && Bundler.locked_gems.ruby_version
- gemfile_ruby_version = Bundler.definition.ruby_version && Bundler.definition.ruby_version.single_version_string
- [Bundler.definition.platforms.map {|p| "* #{p}" },
- locked_ruby_version || gemfile_ruby_version]
+ ruby_version = if Bundler.locked_gems
+ Bundler.locked_gems.ruby_version&.gsub(/p\d+\Z/, "")
+ else
+ Bundler.definition.ruby_version&.single_version_string
end
+
output = []
if options[:ruby]
@@ -23,7 +23,9 @@ module Bundler
output << "No ruby version specified"
end
else
- output << "Your platform is: #{RUBY_PLATFORM}"
+ platforms = Bundler.definition.platforms.map {|p| "* #{p}" }
+
+ output << "Your platform is: #{Gem::Platform.local}"
output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}"
if ruby_version
diff --git a/lib/bundler/cli/plugin.rb b/lib/bundler/cli/plugin.rb
index 1155c4ec9b..fe3f4412fa 100644
--- a/lib/bundler/cli/plugin.rb
+++ b/lib/bundler/cli/plugin.rb
@@ -23,6 +23,16 @@ module Bundler
Bundler::Plugin.install(plugins, options)
end
+ desc "uninstall PLUGINS", "Uninstall the plugins"
+ long_desc <<-D
+ Uninstall given list of plugins. To uninstall all the plugins, use -all option.
+ D
+ method_option "all", :type => :boolean, :default => nil, :banner =>
+ "Uninstall all the installed plugins. If no plugin is installed, then it does nothing."
+ def uninstall(*plugins)
+ Bundler::Plugin.uninstall(plugins, options)
+ end
+
desc "list", "List the installed plugins and available commands"
def list
Bundler::Plugin.list
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index 532b3e0b5b..d6654f8053 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -29,6 +29,11 @@ module Bundler
FileUtils.rm_rf spec.full_gem_path
when Source::Git
+ if source.local?
+ Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is locally overridden.")
+ next
+ end
+
source.remote!
if extension_cache_path = source.extension_cache_path(spec)
FileUtils.rm_rf extension_cache_path
diff --git a/lib/bundler/cli/remove.rb b/lib/bundler/cli/remove.rb
index cd6a2cec28..44a4d891dd 100644
--- a/lib/bundler/cli/remove.rb
+++ b/lib/bundler/cli/remove.rb
@@ -11,8 +11,7 @@ module Bundler
raise InvalidOption, "Please specify gems to remove." if @gems.empty?
Injector.remove(@gems, {})
-
- Installer.install(Bundler.root, Bundler.definition) if @options["install"]
+ Installer.install(Bundler.root, Bundler.definition)
end
end
end
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 3748c25b89..2df13db1fa 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -18,7 +18,7 @@ module Bundler
if gem_name
if gem_name == "bundler"
- path = File.expand_path("../../../..", __FILE__)
+ path = File.expand_path("../../..", __dir__)
else
spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
return unless spec
@@ -53,7 +53,7 @@ module Bundler
end
end
- private
+ private
def fetch_latest_specs
definition = Bundler.definition(true)
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 529dd9c94d..b49182655b 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -9,14 +9,18 @@ module Bundler
end
def run
- Bundler.ui.level = "error" if options[:quiet]
+ Bundler.ui.level = "warn" if options[:quiet]
+
+ update_bundler = options[:bundler]
+
+ Bundler.self_manager.update_bundler_and_restart_with_it_if_needed(update_bundler) if update_bundler
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
sources = Array(options[:source])
groups = Array(options[:group]).map(&:to_sym)
- full_update = gems.empty? && sources.empty? && groups.empty? && !options[:ruby] && !options[:bundler]
+ full_update = gems.empty? && sources.empty? && groups.empty? && !options[:ruby] && !update_bundler
if full_update && !options[:all]
if Bundler.feature_flag.update_requires_all_flag?
@@ -27,9 +31,14 @@ module Bundler
raise InvalidOption, "Cannot specify --all along with specific options."
end
+ conservative = options[:conservative]
+
if full_update
- # We're doing a full update
- Bundler.definition(true)
+ if conservative
+ Bundler.definition(:conservative => conservative)
+ else
+ Bundler.definition(true)
+ end
else
unless Bundler.default_lockfile.exist?
raise GemfileLockNotFound, "This Bundle hasn't been installed yet. " \
@@ -43,8 +52,8 @@ module Bundler
end
Bundler.definition(:gems => gems, :sources => sources, :ruby => options[:ruby],
- :lock_shared_dependencies => options[:conservative],
- :bundler => options[:bundler])
+ :conservative => conservative,
+ :bundler => update_bundler)
end
Bundler::CLI::Common.configure_gem_version_promoter(Bundler.definition, options)
@@ -61,7 +70,7 @@ module Bundler
if locked_gems = Bundler.definition.locked_gems
previous_locked_info = locked_gems.specs.reduce({}) do |h, s|
- h[s.name] = { :spec => s, :version => s.version, :source => s.source.to_s }
+ h[s.name] = { :spec => s, :version => s.version, :source => s.source.identifier }
h
end
end
@@ -82,7 +91,7 @@ module Bundler
locked_spec = locked_info[:spec]
new_spec = Bundler.definition.specs[name].first
unless new_spec
- if Bundler.rubygems.platforms.none? {|p| locked_spec.match_platform(p) }
+ unless locked_spec.match_platform(Bundler.local_platform)
Bundler.ui.warn "Bundler attempted to update #{name} but it was not considered because it is for a different platform from the current one"
end
@@ -90,7 +99,7 @@ module Bundler
end
locked_source = locked_info[:source]
- new_source = new_spec.source.to_s
+ new_source = new_spec.source.identifier
next if locked_source != new_source
new_version = new_spec.version
@@ -106,6 +115,8 @@ module Bundler
Bundler.ui.confirm "Bundle updated!"
Bundler::CLI::Common.output_without_groups_message(:update)
Bundler::CLI::Common.output_post_install_messages installer.post_install_messages
+
+ Bundler::CLI::Common.output_fund_metadata_summary
end
end
end
diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb
index 644f9b25cf..5c09e00995 100644
--- a/lib/bundler/cli/viz.rb
+++ b/lib/bundler/cli/viz.rb
@@ -23,7 +23,7 @@ module Bundler
Bundler.ui.warn "Make sure you have the graphviz ruby gem. You can install it with:"
Bundler.ui.warn "`gem install ruby-graphviz`"
rescue StandardError => e
- raise unless e.message =~ /GraphViz not installed or dot not in PATH/
+ raise unless e.message.to_s.include?("GraphViz not installed or dot not in PATH")
Bundler.ui.error e.message
Bundler.ui.warn "Please install GraphViz. On a Mac with Homebrew, you can run `brew install graphviz`."
end
diff --git a/lib/bundler/compact_index_client.rb b/lib/bundler/compact_index_client.rb
index a5120dbba4..127a50e810 100644
--- a/lib/bundler/compact_index_client.rb
+++ b/lib/bundler/compact_index_client.rb
@@ -5,7 +5,7 @@ require "set"
module Bundler
class CompactIndexClient
- DEBUG_MUTEX = Mutex.new
+ DEBUG_MUTEX = Thread::Mutex.new
def self.debug
return unless ENV["DEBUG_COMPACT_INDEX"]
DEBUG_MUTEX.synchronize { warn("[#{self}] #{yield}") }
@@ -25,7 +25,7 @@ module Bundler
@endpoints = Set.new
@info_checksums_by_name = {}
@parsed_checksums = false
- @mutex = Mutex.new
+ @mutex = Thread::Mutex.new
end
def execution_mode=(block)
@@ -73,12 +73,6 @@ module Bundler
end.flatten(1)
end
- def spec(name, version, platform = nil)
- Bundler::CompactIndexClient.debug { "spec(name = #{name}, version = #{version}, platform = #{platform})" }
- update_info(name)
- @cache.specific_dependency(name, version, platform)
- end
-
def update_and_parse_checksums!
Bundler::CompactIndexClient.debug { "update_and_parse_checksums!" }
return @info_checksums_by_name if @parsed_checksums
@@ -87,7 +81,7 @@ module Bundler
@parsed_checksums = true
end
- private
+ private
def update(local_path, remote_path)
Bundler::CompactIndexClient.debug { "update(#{local_path}, #{remote_path})" }
diff --git a/lib/bundler/compact_index_client/cache.rb b/lib/bundler/compact_index_client/cache.rb
index f6105d3bb3..0b43581c11 100644
--- a/lib/bundler/compact_index_client/cache.rb
+++ b/lib/bundler/compact_index_client/cache.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require_relative "gem_parser"
+
module Bundler
class CompactIndexClient
class Cache
@@ -66,7 +68,7 @@ module Bundler
def info_path(name)
name = name.to_s
- if name =~ /[^a-z0-9_-]/
+ if /[^a-z0-9_-]/.match?(name)
name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}"
info_roots.last.join(name)
else
@@ -74,16 +76,7 @@ module Bundler
end
end
- def specific_dependency(name, version, platform)
- pattern = [version, platform].compact.join("-")
- return nil if pattern.empty?
-
- gem_lines = info_path(name).read
- gem_line = gem_lines[/^#{Regexp.escape(pattern)}\b.*/, 0]
- gem_line ? parse_gem(gem_line) : nil
- end
-
- private
+ private
def lines(path)
return [] unless path.file?
@@ -92,19 +85,9 @@ module Bundler
header ? lines[header + 1..-1] : lines
end
- def parse_gem(string)
- version_and_platform, rest = string.split(" ", 2)
- version, platform = version_and_platform.split("-", 2)
- dependencies, requirements = rest.split("|", 2).map {|s| s.split(",") } if rest
- dependencies = dependencies ? dependencies.map {|d| parse_dependency(d) } : []
- requirements = requirements ? requirements.map {|r| parse_dependency(r) } : []
- [version, platform, dependencies, requirements]
- end
-
- def parse_dependency(string)
- dependency = string.split(":")
- dependency[-1] = dependency[-1].split("&") if dependency.size > 1
- dependency
+ def parse_gem(line)
+ @dependency_parser ||= GemParser.new
+ @dependency_parser.parse(line)
end
def info_roots
diff --git a/lib/bundler/compact_index_client/gem_parser.rb b/lib/bundler/compact_index_client/gem_parser.rb
new file mode 100644
index 0000000000..e7bf4c6001
--- /dev/null
+++ b/lib/bundler/compact_index_client/gem_parser.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Bundler
+ class CompactIndexClient
+ if defined?(Gem::Resolver::APISet::GemParser)
+ GemParser = Gem::Resolver::APISet::GemParser
+ else
+ class GemParser
+ def parse(line)
+ version_and_platform, rest = line.split(" ", 2)
+ version, platform = version_and_platform.split("-", 2)
+ dependencies, requirements = rest.split("|", 2).map {|s| s.split(",") } if rest
+ dependencies = dependencies ? dependencies.map {|d| parse_dependency(d) } : []
+ requirements = requirements ? requirements.map {|d| parse_dependency(d) } : []
+ [version, platform, dependencies, requirements]
+ end
+
+ private
+
+ def parse_dependency(string)
+ dependency = string.split(":")
+ dependency[-1] = dependency[-1].split("&") if dependency.size > 1
+ dependency
+ end
+ end
+ end
+ end
+end
diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb
index 40232019bc..0f7bf9bb50 100644
--- a/lib/bundler/compact_index_client/updater.rb
+++ b/lib/bundler/compact_index_client/updater.rb
@@ -1,8 +1,6 @@
# frozen_string_literal: true
require_relative "../vendored_fileutils"
-require "stringio"
-require "zlib"
module Bundler
class CompactIndexClient
@@ -22,71 +20,64 @@ module Bundler
def initialize(fetcher)
@fetcher = fetcher
- require "tmpdir"
end
def update(local_path, remote_path, retrying = nil)
headers = {}
- Dir.mktmpdir("bundler-compact-index-") do |local_temp_dir|
- local_temp_path = Pathname.new(local_temp_dir).join(local_path.basename)
+ local_temp_path = local_path.sub(/$/, ".#{$$}")
+ local_temp_path = local_temp_path.sub(/$/, ".retrying") if retrying
+ local_temp_path = local_temp_path.sub(/$/, ".tmp")
- # first try to fetch any new bytes on the existing file
- if retrying.nil? && local_path.file?
- SharedHelpers.filesystem_access(local_temp_path) do
- FileUtils.cp local_path, local_temp_path
+ # first try to fetch any new bytes on the existing file
+ if retrying.nil? && local_path.file?
+ copy_file local_path, local_temp_path
+
+ headers["If-None-Match"] = etag_for(local_temp_path)
+ headers["Range"] =
+ if local_temp_path.size.nonzero?
+ # Subtract a byte to ensure the range won't be empty.
+ # Avoids 416 (Range Not Satisfiable) responses.
+ "bytes=#{local_temp_path.size - 1}-"
+ else
+ "bytes=#{local_temp_path.size}-"
end
- headers["If-None-Match"] = etag_for(local_temp_path)
- headers["Range"] =
- if local_temp_path.size.nonzero?
- # Subtract a byte to ensure the range won't be empty.
- # Avoids 416 (Range Not Satisfiable) responses.
- "bytes=#{local_temp_path.size - 1}-"
- else
- "bytes=#{local_temp_path.size}-"
- end
- else
- # Fastly ignores Range when Accept-Encoding: gzip is set
- headers["Accept-Encoding"] = "gzip"
- end
+ end
- response = @fetcher.call(remote_path, headers)
- return nil if response.is_a?(Net::HTTPNotModified)
+ response = @fetcher.call(remote_path, headers)
+ return nil if response.is_a?(Net::HTTPNotModified)
- content = response.body
- if response["Content-Encoding"] == "gzip"
- content = Zlib::GzipReader.new(StringIO.new(content)).read
- end
+ content = response.body
- SharedHelpers.filesystem_access(local_temp_path) do
- if response.is_a?(Net::HTTPPartialContent) && local_temp_path.size.nonzero?
- local_temp_path.open("a") {|f| f << slice_body(content, 1..-1) }
- else
- local_temp_path.open("w") {|f| f << content }
- end
- end
+ etag = (response["ETag"] || "").gsub(%r{\AW/}, "")
+ correct_response = SharedHelpers.filesystem_access(local_temp_path) do
+ if response.is_a?(Net::HTTPPartialContent) && local_temp_path.size.nonzero?
+ local_temp_path.open("a") {|f| f << slice_body(content, 1..-1) }
- response_etag = (response["ETag"] || "").gsub(%r{\AW/}, "")
- if etag_for(local_temp_path) == response_etag
- SharedHelpers.filesystem_access(local_path) do
- FileUtils.mv(local_temp_path, local_path)
- end
- return nil
+ etag_for(local_temp_path) == etag
+ else
+ local_temp_path.open("wb") {|f| f << content }
+
+ etag.length.zero? || etag_for(local_temp_path) == etag
end
+ end
- if retrying
- raise MisMatchedChecksumError.new(remote_path, response_etag, etag_for(local_temp_path))
+ if correct_response
+ SharedHelpers.filesystem_access(local_path) do
+ FileUtils.mv(local_temp_path, local_path)
end
+ return nil
+ end
- update(local_path, remote_path, :retrying)
+ if retrying
+ raise MisMatchedChecksumError.new(remote_path, etag, etag_for(local_temp_path))
end
- rescue Errno::EACCES
- raise Bundler::PermissionError,
- "Bundler does not have write access to create a temp directory " \
- "within #{Dir.tmpdir}. Bundler must have write access to your " \
- "systems temp directory to function properly. "
+
+ update(local_path, remote_path, :retrying)
rescue Zlib::GzipFile::Error
raise Bundler::HTTPError
+ ensure
+ FileUtils.remove_file(local_temp_path) if File.exist?(local_temp_path)
end
def etag_for(path)
@@ -100,11 +91,25 @@ module Bundler
def checksum_for_file(path)
return nil unless path.file?
- # This must use IO.read instead of Digest.file().hexdigest
+ # This must use File.read instead of Digest.file().hexdigest
# because we need to preserve \n line endings on windows when calculating
# the checksum
SharedHelpers.filesystem_access(path, :read) do
- SharedHelpers.digest(:MD5).hexdigest(IO.read(path))
+ SharedHelpers.digest(:MD5).hexdigest(File.read(path))
+ end
+ end
+
+ private
+
+ def copy_file(source, dest)
+ SharedHelpers.filesystem_access(source, :read) do
+ File.open(source, "r") do |s|
+ SharedHelpers.filesystem_access(dest, :write) do
+ File.open(dest, "wb", s.stat.mode) do |f|
+ IO.copy_stream(s, f)
+ end
+ end
+ end
end
end
end
diff --git a/lib/bundler/constants.rb b/lib/bundler/constants.rb
index 2e4ebb37ee..8dd8a53815 100644
--- a/lib/bundler/constants.rb
+++ b/lib/bundler/constants.rb
@@ -2,6 +2,6 @@
module Bundler
WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
- FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/
+ FREEBSD = RbConfig::CONFIG["host_os"].to_s.include?("bsd")
NULL = WINDOWS ? "NUL" : "/dev/null"
end
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb
index c132e8ecc0..f009b07ad7 100644
--- a/lib/bundler/current_ruby.rb
+++ b/lib/bundler/current_ruby.rb
@@ -20,6 +20,10 @@ module Bundler
2.5
2.6
2.7
+ 3.0
+ 3.1
+ 3.2
+ 3.3
].freeze
KNOWN_MAJOR_VERSIONS = KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze
@@ -34,17 +38,18 @@ module Bundler
rbx
ruby
truffleruby
+ windows
x64_mingw
].freeze
def ruby?
return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::RUBY
- !mswin? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
+ !windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
end
def mri?
- !mswin? && RUBY_ENGINE == "ruby"
+ !windows? && RUBY_ENGINE == "ruby"
end
def rbx?
@@ -63,20 +68,28 @@ module Bundler
RUBY_ENGINE == "truffleruby"
end
+ def windows?
+ Gem.win_platform?
+ end
+
def mswin?
- Bundler::WINDOWS
+ # For backwards compatibility
+ windows?
+
+ # TODO: This should correctly be:
+ # windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin32" && Bundler.local_platform.cpu == "x86"
end
def mswin64?
- Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin64" && Bundler.local_platform.cpu == "x64"
+ windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin64" && Bundler.local_platform.cpu == "x64"
end
def mingw?
- Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu != "x64"
+ windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu != "x64"
end
def x64_mingw?
- Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu == "x64"
+ Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os.start_with?("mingw") && Bundler.local_platform.cpu == "x64"
end
(KNOWN_MINOR_VERSIONS + KNOWN_MAJOR_VERSIONS).each do |version|
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d6fbb0b5b7..564530a98c 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -1,18 +1,21 @@
# frozen_string_literal: true
require_relative "lockfile_parser"
-require "set"
module Bundler
class Definition
include GemHelpers
+ class << self
+ # Do not create or modify a lockfile (Makes #lock a noop)
+ attr_accessor :no_lock
+ end
+
attr_reader(
:dependencies,
:locked_deps,
:locked_gems,
:platforms,
- :requires,
:ruby_version,
:lockfile,
:gemfiles
@@ -57,10 +60,8 @@ module Bundler
@unlocking_bundler = false
@unlocking = unlock
else
- unlock = unlock.dup
@unlocking_bundler = unlock.delete(:bundler)
- unlock.delete_if {|_k, v| Array(v).empty? }
- @unlocking = !unlock.empty?
+ @unlocking = unlock.any? {|_k, v| !Array(v).empty? }
end
@dependencies = dependencies
@@ -68,15 +69,20 @@ module Bundler
@unlock = unlock
@optional_groups = optional_groups
@remote = false
+ @prefer_local = false
@specs = nil
@ruby_version = ruby_version
@gemfiles = gemfiles
@lockfile = lockfile
@lockfile_contents = String.new
+
@locked_bundler_version = nil
- @locked_ruby_version = nil
- @locked_specs_incomplete_for_platform = false
+ @resolved_bundler_version = nil
+
+ @locked_ruby_version = nil
+ @new_platform = nil
+ @removed_platform = nil
if lockfile && File.exist?(lockfile)
@lockfile_contents = Bundler.read_file(lockfile)
@@ -85,10 +91,11 @@ module Bundler
@platforms = @locked_platforms.dup
@locked_bundler_version = @locked_gems.bundler_version
@locked_ruby_version = @locked_gems.ruby_version
+ @originally_locked_specs = SpecSet.new(@locked_gems.specs)
if unlock != true
@locked_deps = @locked_gems.dependencies
- @locked_specs = SpecSet.new(@locked_gems.specs)
+ @locked_specs = @originally_locked_specs
@locked_sources = @locked_gems.sources
else
@unlock = {}
@@ -102,11 +109,24 @@ module Bundler
@locked_gems = nil
@locked_deps = {}
@locked_specs = SpecSet.new([])
+ @originally_locked_specs = @locked_specs
@locked_sources = []
@locked_platforms = []
end
- @unlock[:gems] ||= []
+ locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
+ @multisource_allowed = locked_gem_sources.size == 1 && locked_gem_sources.first.multiple_remotes? && Bundler.frozen_bundle?
+
+ if @multisource_allowed
+ unless sources.aggregate_global_source?
+ msg = "Your lockfile contains a single rubygems source section with multiple remotes, which is insecure. Make sure you run `bundle install` in non frozen mode and commit the result to make your lockfile secure."
+
+ Bundler::SharedHelpers.major_deprecation 2, msg
+ end
+
+ @sources.merged_gem_lockfile_sections!(locked_gem_sources.first)
+ end
+
@unlock[:sources] ||= []
@unlock[:ruby] ||= if @ruby_version && locked_ruby_version_object
@ruby_version.diff(locked_ruby_version_object)
@@ -119,43 +139,55 @@ module Bundler
@path_changes = converge_paths
@source_changes = converge_sources
- unless @unlock[:lock_shared_dependencies]
- eager_unlock = expand_dependencies(@unlock[:gems], true)
- @unlock[:gems] = @locked_specs.for(eager_unlock, [], false, false, false).map(&:name)
+ if @unlock[:conservative]
+ @unlock[:gems] ||= @dependencies.map(&:name)
+ else
+ eager_unlock = (@unlock[:gems] || []).map {|name| Dependency.new(name, ">= 0") }
+ @unlock[:gems] = @locked_specs.for(eager_unlock, false, platforms).map(&:name).uniq
end
@dependency_changes = converge_dependencies
@local_changes = converge_locals
- @requires = compute_requires
+ @missing_lockfile_dep = check_missing_lockfile_dep
end
def gem_version_promoter
- @gem_version_promoter ||= begin
- locked_specs =
- if unlocking? && @locked_specs.empty? && !@lockfile_contents.empty?
- # Definition uses an empty set of locked_specs to indicate all gems
- # are unlocked, but GemVersionPromoter needs the locked_specs
- # for conservative comparison.
- Bundler::SpecSet.new(@locked_gems.specs)
- else
- @locked_specs
- end
- GemVersionPromoter.new(locked_specs, @unlock[:gems])
- end
+ @gem_version_promoter ||= GemVersionPromoter.new
+ end
+
+ def resolve_only_locally!
+ @remote = false
+ sources.local_only!
+ resolve
end
def resolve_with_cache!
- raise "Specs already loaded" if @specs
sources.cached!
- specs
+ resolve
end
def resolve_remotely!
- raise "Specs already loaded" if @specs
@remote = true
sources.remote!
- specs
+ resolve
+ end
+
+ def resolution_mode=(options)
+ if options["local"]
+ @remote = false
+ else
+ @remote = true
+ @prefer_local = options["prefer-local"]
+ end
+ end
+
+ def setup_sources_for_resolve
+ if @remote == false
+ sources.cached!
+ else
+ sources.remote!
+ end
end
# For given dependency list returns a SpecSet with Gemspec of all the required
@@ -165,25 +197,7 @@ module Bundler
#
# @return [Bundler::SpecSet]
def specs
- @specs ||= begin
- begin
- specs = resolve.materialize(requested_dependencies)
- rescue GemNotFound => e # Handle yanked gem
- gem_name, gem_version = extract_gem_info(e)
- locked_gem = @locked_specs[gem_name].last
- raise if locked_gem.nil? || locked_gem.version.to_s != gem_version || !@remote
- raise GemNotFound, "Your bundle is locked to #{locked_gem}, but that version could not " \
- "be found in any of the sources listed in your Gemfile. If you haven't changed sources, " \
- "that means the author of #{locked_gem} has removed it. You'll need to update your bundle " \
- "to a version other than #{locked_gem} that hasn't been removed in order to install."
- end
- unless specs["bundler"].any?
- bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
- specs["bundler"] = bundler
- end
-
- specs
- end
+ @specs ||= materialize(requested_dependencies)
end
def new_specs
@@ -194,14 +208,8 @@ module Bundler
@locked_specs - specs
end
- def new_platform?
- @new_platform
- end
-
def missing_specs
- missing = []
- resolve.materialize(requested_dependencies, missing)
- missing
+ resolve.materialize(requested_dependencies).missing_specs
end
def missing_specs?
@@ -210,8 +218,9 @@ module Bundler
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
true
rescue BundlerError => e
- @index = nil
@resolve = nil
+ @resolver = nil
+ @resolution_packages = nil
@specs = nil
@gem_version_promoter = nil
@@ -220,100 +229,77 @@ module Bundler
end
def requested_specs
- @requested_specs ||= begin
- groups = requested_groups
- groups.map!(&:to_sym)
- specs_for(groups)
- end
+ specs_for(requested_groups)
end
- def current_dependencies
- dependencies.select(&:should_include?)
+ def requested_dependencies
+ dependencies_for(requested_groups)
end
- def specs_for(groups)
- deps = dependencies.select {|d| (d.groups & groups).any? }
- deps.delete_if {|d| !d.should_include? }
- specs.for(expand_dependencies(deps))
+ def current_dependencies
+ filter_relevant(dependencies)
end
- # Resolve all the dependencies specified in Gemfile. It ensures that
- # dependencies that have been already resolved via locked file and are fresh
- # are reused when resolving dependencies
- #
- # @return [SpecSet] resolved dependencies
- def resolve
- @resolve ||= begin
- last_resolve = converge_locked_specs
- resolve =
- if Bundler.frozen_bundle?
- Bundler.ui.debug "Frozen, using resolution from the lockfile"
- last_resolve
- elsif !unlocking? && nothing_changed?
- Bundler.ui.debug("Found no changes, using resolution from the lockfile")
- last_resolve
- else
- # Run a resolve against the locally available gems
- Bundler.ui.debug("Found changes from the lockfile, re-resolving dependencies because #{change_reason}")
- last_resolve.merge Resolver.resolve(expanded_dependencies, index, source_requirements, last_resolve, gem_version_promoter, additional_base_requirements_for_resolve, platforms)
- end
+ def current_locked_dependencies
+ filter_relevant(locked_dependencies)
+ end
- # filter out gems that _can_ be installed on multiple platforms, but don't need
- # to be
- resolve.for(expand_dependencies(dependencies, true), [], false, false, false)
+ def filter_relevant(dependencies)
+ dependencies.select do |d|
+ d.should_include? && !d.gem_platforms([generic_local_platform]).empty?
end
end
- def index
- @index ||= Index.build do |idx|
- dependency_names = @dependencies.map(&:name)
-
- sources.all_sources.each do |source|
- source.dependency_names = dependency_names - pinned_spec_names(source)
- idx.add_source source.specs
- dependency_names.concat(source.unmet_deps).uniq!
- end
-
- double_check_for_index(idx, dependency_names)
- end
+ def locked_dependencies
+ @locked_deps.values
end
- # Suppose the gem Foo depends on the gem Bar. Foo exists in Source A. Bar has some versions that exist in both
- # sources A and B. At this point, the API request will have found all the versions of Bar in source A,
- # but will not have found any versions of Bar from source B, which is a problem if the requested version
- # of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
- # each spec we found, we add all possible versions from all sources to the index.
- def double_check_for_index(idx, dependency_names)
- pinned_names = pinned_spec_names
- loop do
- idxcount = idx.size
-
- names = :names # do this so we only have to traverse to get dependency_names from the index once
- unmet_dependency_names = lambda do
- return names unless names == :names
- new_names = sources.all_sources.map(&:dependency_names_to_double_check)
- return names = nil if new_names.compact!
- names = new_names.flatten(1).concat(dependency_names)
- names.uniq!
- names -= pinned_names
- names
- end
+ def new_deps
+ @new_deps ||= @dependencies - locked_dependencies
+ end
- sources.all_sources.each do |source|
- source.double_check_for(unmet_dependency_names)
- end
+ def deleted_deps
+ @deleted_deps ||= locked_dependencies - @dependencies
+ end
- break if idxcount == idx.size
- end
+ def specs_for(groups)
+ return specs if groups.empty?
+ deps = dependencies_for(groups)
+ materialize(deps)
end
- private :double_check_for_index
- def has_rubygems_remotes?
- sources.rubygems_sources.any? {|s| s.remotes.any? }
+ def dependencies_for(groups)
+ groups.map!(&:to_sym)
+ current_dependencies.reject do |d|
+ (d.groups & groups).empty?
+ end
end
- def has_local_dependencies?
- !sources.path_sources.empty? || !sources.git_sources.empty?
+ # Resolve all the dependencies specified in Gemfile. It ensures that
+ # dependencies that have been already resolved via locked file and are fresh
+ # are reused when resolving dependencies
+ #
+ # @return [SpecSet] resolved dependencies
+ def resolve
+ @resolve ||= if Bundler.frozen_bundle?
+ Bundler.ui.debug "Frozen, using resolution from the lockfile"
+ @locked_specs
+ elsif no_resolve_needed?
+ if deleted_deps.any?
+ Bundler.ui.debug "Some dependencies were deleted, using a subset of the resolution from the lockfile"
+ SpecSet.new(filter_specs(@locked_specs, @dependencies - deleted_deps))
+ else
+ Bundler.ui.debug "Found no changes, using resolution from the lockfile"
+ if @removed_platform || @locked_gems.may_include_redundant_platform_specific_gems?
+ SpecSet.new(filter_specs(@locked_specs, @dependencies))
+ else
+ @locked_specs
+ end
+ end
+ else
+ Bundler.ui.debug "Found changes from the lockfile, re-resolving dependencies because #{change_reason}"
+ start_resolution
+ end
end
def spec_git_paths
@@ -325,20 +311,19 @@ module Bundler
end
def lock(file, preserve_unknown_sections = false)
+ return if Definition.no_lock
+
contents = to_lock
# Convert to \r\n if the existing lock has them
# i.e., Windows with `git config core.autocrlf=true`
- contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match("\r\n")
+ contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match?("\r\n")
if @locked_bundler_version
locked_major = @locked_bundler_version.segments.first
- current_major = Gem::Version.create(Bundler::VERSION).segments.first
+ current_major = bundler_version_to_lock.segments.first
- if updating_major = locked_major < current_major
- Bundler.ui.warn "Warning: the lockfile is being updated to Bundler #{current_major}, " \
- "after which you will be unable to return to Bundler #{@locked_bundler_version.segments.first}."
- end
+ updating_major = locked_major < current_major
end
preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler))
@@ -355,14 +340,6 @@ module Bundler
end
end
- def locked_bundler_version
- if @locked_bundler_version && @locked_bundler_version < Gem::Version.new(Bundler::VERSION)
- new_version = Bundler::VERSION
- end
-
- new_version || @locked_bundler_version || Bundler::VERSION
- end
-
def locked_ruby_version
return unless ruby_version
if @unlock[:ruby] || !@locked_ruby_version
@@ -384,29 +361,16 @@ module Bundler
end
end
+ def bundler_version_to_lock
+ @resolved_bundler_version || Bundler.gem_version
+ end
+
def to_lock
require_relative "lockfile_generator"
LockfileGenerator.generate(self)
end
def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
- msg = String.new
- msg << "You are trying to install in deployment mode after changing\n" \
- "your Gemfile. Run `bundle install` elsewhere and add the\n" \
- "updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
-
- unless explicit_flag
- suggested_command = if Bundler.settings.locations("frozen")[:global]
- "bundle config unset frozen"
- elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
- "bundle config unset deployment"
- else
- "bundle install --no-deployment"
- end
- msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
- "freeze \nby running `#{suggested_command}`."
- end
-
added = []
deleted = []
changed = []
@@ -416,52 +380,40 @@ module Bundler
added.concat new_platforms.map {|p| "* platform: #{p}" }
deleted.concat deleted_platforms.map {|p| "* platform: #{p}" }
- gemfile_sources = sources.lock_sources
-
- new_sources = gemfile_sources - @locked_sources
- deleted_sources = @locked_sources - gemfile_sources
-
- new_deps = @dependencies - @locked_deps.values
- deleted_deps = @locked_deps.values - @dependencies
-
- # Check if it is possible that the source is only changed thing
- if (new_deps.empty? && deleted_deps.empty?) && (!new_sources.empty? && !deleted_sources.empty?)
- new_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
- deleted_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
- end
-
- if @locked_sources != gemfile_sources
- if new_sources.any?
- added.concat new_sources.map {|source| "* source: #{source}" }
- end
-
- if deleted_sources.any?
- deleted.concat deleted_sources.map {|source| "* source: #{source}" }
- end
- end
-
added.concat new_deps.map {|d| "* #{pretty_dep(d)}" } if new_deps.any?
- if deleted_deps.any?
- deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" }
- end
+ deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?
both_sources = Hash.new {|h, k| h[k] = [] }
- @dependencies.each {|d| both_sources[d.name][0] = d }
- @locked_deps.each {|name, d| both_sources[name][1] = d.source }
+ current_dependencies.each {|d| both_sources[d.name][0] = d }
+ current_locked_dependencies.each {|d| both_sources[d.name][1] = d }
+
+ both_sources.each do |name, (dep, lock_dep)|
+ next if dep.nil? || lock_dep.nil?
- both_sources.each do |name, (dep, lock_source)|
- next unless (dep.nil? && !lock_source.nil?) || (!dep.nil? && !lock_source.nil? && !lock_source.can_lock?(dep))
- gemfile_source_name = (dep && dep.source) || "no specified source"
- lockfile_source_name = lock_source || "no specified source"
- changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
+ gemfile_source = dep.source || default_source
+ lock_source = lock_dep.source || default_source
+ next if lock_source.include?(gemfile_source)
+
+ gemfile_source_name = dep.source ? gemfile_source.to_gemfile : "no specified source"
+ lockfile_source_name = lock_dep.source ? lock_source.to_gemfile : "no specified source"
+ changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
end
reason = change_reason
- msg << "\n\n#{reason.split(", ").map(&:capitalize).join("\n")}" unless reason.strip.empty?
+ msg = String.new
+ msg << "#{reason.capitalize.strip}, but the lockfile can't be updated because frozen mode is set"
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?
- msg << "\n"
+ msg << "\n\nRun `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n"
+
+ unless explicit_flag
+ suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
+ "bundle config set frozen false"
+ end
+ msg << "If this is a development machine, remove the #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)} " \
+ "freeze by running `#{suggested_command}`." if suggested_command
+ end
raise ProductionError, msg if added.any? || deleted.any? || changed.any? || !nothing_changed?
end
@@ -497,15 +449,11 @@ module Bundler
end
def validate_platforms!
- return if @platforms.any? do |bundle_platform|
- Bundler.rubygems.platforms.any? do |local_platform|
- MatchPlatform.platforms_match?(bundle_platform, local_platform)
- end
- end
+ return if current_platform_locked?
raise ProductionError, "Your bundle only supports platforms #{@platforms.map(&:to_s)} " \
- "but your local platforms are #{Bundler.rubygems.platforms.map(&:to_s)}, and " \
- "there's no compatible match between those two lists."
+ "but your local platform is #{Bundler.local_platform}. " \
+ "Add the current platform to the lockfile with\n`bundle lock --add-platform #{Bundler.local_platform}` and try again."
end
def add_platform(platform)
@@ -514,43 +462,154 @@ module Bundler
end
def remove_platform(platform)
- return if @platforms.delete(Gem::Platform.new(platform))
+ removed_platform = @platforms.delete(Gem::Platform.new(platform))
+ @removed_platform ||= removed_platform
+ return if removed_platform
raise InvalidOption, "Unable to remove the platform `#{platform}` since the only platforms are #{@platforms.join ", "}"
end
- def add_current_platform
- current_platforms.each {|platform| add_platform(platform) }
- end
-
- def find_resolved_spec(current_spec)
- specs.find_by_name_and_platform(current_spec.name, current_spec.platform)
- end
-
- def find_indexed_specs(current_spec)
- index[current_spec.name].select {|spec| spec.match_platform(current_spec.platform) }.sort_by(&:version)
+ def most_specific_locked_platform
+ @platforms.min_by do |bundle_platform|
+ platform_specificity_match(bundle_platform, local_platform)
+ end
end
attr_reader :sources
private :sources
def nothing_changed?
- !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@locked_specs_incomplete_for_platform
+ !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep && !@unlocking_bundler
+ end
+
+ def no_resolve_needed?
+ !unlocking? && nothing_changed?
end
def unlocking?
@unlocking
end
- private
+ private
+
+ def resolver
+ @resolver ||= Resolver.new(resolution_packages, gem_version_promoter)
+ end
+
+ def expanded_dependencies
+ dependencies_with_bundler + metadata_dependencies
+ end
+
+ def dependencies_with_bundler
+ return dependencies unless @unlocking_bundler
+ return dependencies if dependencies.map(&:name).include?("bundler")
+
+ [Dependency.new("bundler", @unlocking_bundler)] + dependencies
+ end
+
+ def resolution_packages
+ @resolution_packages ||= begin
+ last_resolve = converge_locked_specs
+ remove_ruby_from_platforms_if_necessary!(current_dependencies)
+ packages = Resolver::Base.new(source_requirements, expanded_dependencies, last_resolve, @platforms, :locked_specs => @originally_locked_specs, :unlock => @unlock[:gems], :prerelease => gem_version_promoter.pre?)
+ additional_base_requirements_for_resolve(packages, last_resolve)
+ end
+ end
+
+ def filter_specs(specs, deps)
+ SpecSet.new(specs).for(deps, false, platforms)
+ end
+
+ def materialize(dependencies)
+ specs = resolve.materialize(dependencies)
+ missing_specs = specs.missing_specs
+
+ if missing_specs.any?
+ missing_specs.each do |s|
+ locked_gem = @locked_specs[s.name].last
+ next if locked_gem.nil? || locked_gem.version != s.version || !@remote
+ raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
+ "no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
+ "You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
+ "removed in order to install."
+ end
+
+ missing_specs_list = missing_specs.group_by(&:source).map do |source, missing_specs_for_source|
+ "#{missing_specs_for_source.map(&:full_name).join(", ")} in #{source}"
+ end
+
+ raise GemNotFound, "Could not find #{missing_specs_list.join(" nor ")}"
+ end
+
+ incomplete_specs = specs.incomplete_specs
+ loop do
+ break if incomplete_specs.empty?
+
+ Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
+ setup_sources_for_resolve
+ resolution_packages.delete(incomplete_specs)
+ @resolve = start_resolution
+ specs = resolve.materialize(dependencies)
+
+ still_incomplete_specs = specs.incomplete_specs
+
+ if still_incomplete_specs == incomplete_specs
+ package = resolution_packages.get_package(incomplete_specs.first.name)
+ resolver.raise_not_found! package
+ end
+
+ incomplete_specs = still_incomplete_specs
+ end
+
+ bundler = sources.metadata_source.specs.search(["bundler", Bundler.gem_version]).last
+ specs["bundler"] = bundler
+
+ specs
+ end
+
+ def start_resolution
+ result = resolver.start
+
+ @resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
+
+ SpecSet.new(SpecSet.new(result).for(dependencies, false, @platforms))
+ end
- def current_platforms
- current_platform = Bundler.local_platform
- [].tap do |platforms|
- platforms << current_platform if Bundler.feature_flag.specific_platform?
- platforms << generic(current_platform)
+ def precompute_source_requirements_for_indirect_dependencies?
+ sources.non_global_rubygems_sources.all?(&:dependency_api_available?) && !sources.aggregate_global_source?
+ end
+
+ def pin_locally_available_names(source_requirements)
+ source_requirements.each_with_object({}) do |(name, original_source), new_source_requirements|
+ local_source = original_source.dup
+ local_source.local_only!
+
+ new_source_requirements[name] = if local_source.specs.search(name).any?
+ local_source
+ else
+ original_source
+ end
end
end
+ def current_ruby_platform_locked?
+ return false unless generic_local_platform == Gem::Platform::RUBY
+ return false if Bundler.settings[:force_ruby_platform] && !@platforms.include?(Gem::Platform::RUBY)
+
+ current_platform_locked?
+ end
+
+ def current_platform_locked?
+ @platforms.any? do |bundle_platform|
+ MatchPlatform.platforms_match?(bundle_platform, Bundler.local_platform)
+ end
+ end
+
+ def add_current_platform
+ return if current_ruby_platform_locked?
+
+ add_platform(local_platform)
+ end
+
def change_reason
if unlocking?
unlock_reason = @unlock.reject {|_k, v| Array(v).empty? }.map do |k, v|
@@ -569,12 +628,13 @@ module Bundler
[@new_platform, "you added a new platform to your gemfile"],
[@path_changes, "the gemspecs for path gems changed"],
[@local_changes, "the gemspecs for git local gems changed"],
- [@locked_specs_incomplete_for_platform, "the lockfile does not have all gems needed for the current platform"],
+ [@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
+ [@unlocking_bundler, "an update to the version of Bundler itself was requested"],
].select(&:first).map(&:last).join(", ")
end
- def pretty_dep(dep, source = false)
- SharedHelpers.pretty_dependency(dep, source)
+ def pretty_dep(dep)
+ SharedHelpers.pretty_dependency(dep)
end
# Check if the specs of the given source changed
@@ -587,9 +647,9 @@ module Bundler
def dependencies_for_source_changed?(source, locked_source = source)
deps_for_source = @dependencies.select {|s| s.source == source }
- locked_deps_for_source = @locked_deps.values.select {|dep| dep.source == locked_source }
+ locked_deps_for_source = locked_dependencies.select {|dep| dep.source == locked_source }
- Set.new(deps_for_source) != Set.new(locked_deps_for_source)
+ deps_for_source.uniq.sort != locked_deps_for_source.sort
end
def specs_for_source_changed?(source)
@@ -611,8 +671,8 @@ module Bundler
Bundler.settings.local_overrides.map do |k, v|
spec = @dependencies.find {|s| s.name == k }
- source = spec && spec.source
- if source && source.respond_to?(:local_override!)
+ source = spec&.source
+ if source&.respond_to?(:local_override!)
source.unlock! if @unlock[:gems].include?(spec.name)
locals << [source, source.local_override!(v)]
end
@@ -624,6 +684,26 @@ module Bundler
!sources_with_changes.each {|source| @unlock[:sources] << source.name }.empty?
end
+ def check_missing_lockfile_dep
+ all_locked_specs = @locked_specs.map(&:name) << "bundler"
+
+ missing = @locked_specs.select do |s|
+ s.dependencies.any? {|dep| !all_locked_specs.include?(dep.name) }
+ end
+
+ if missing.any?
+ @locked_specs.delete(missing)
+
+ return missing.first.name
+ end
+
+ return if @dependency_changes
+
+ current_dependencies.find do |d|
+ @locked_specs[d.name].empty? && d.name != "bundler"
+ end&.name
+ end
+
def converge_paths
sources.path_sources.any? do |source|
specs_changed?(source)
@@ -648,36 +728,11 @@ module Bundler
end
end
- def converge_rubygems_sources
- return false if Bundler.feature_flag.disable_multisource?
-
- changes = false
-
- # Get the RubyGems sources from the Gemfile.lock
- locked_gem_sources = @locked_sources.select {|s| s.is_a?(Source::Rubygems) }
- # Get the RubyGems remotes from the Gemfile
- actual_remotes = sources.rubygems_remotes
-
- # If there is a RubyGems source in both
- if !locked_gem_sources.empty? && !actual_remotes.empty?
- locked_gem_sources.each do |locked_gem|
- # Merge the remotes from the Gemfile into the Gemfile.lock
- changes |= locked_gem.replace_remotes(actual_remotes, Bundler.settings[:allow_deployment_source_credential_changes])
- end
- end
-
- changes
- end
-
def converge_sources
- changes = false
-
- changes |= converge_rubygems_sources
-
# Replace the sources from the Gemfile with the sources from the Gemfile.lock,
# if they exist in the Gemfile.lock and are `==`. If you can't find an equivalent
# source in the Gemfile.lock, use the one from the Gemfile.
- changes |= sources.replace_sources!(@locked_sources)
+ changes = sources.replace_sources!(@locked_sources)
sources.all_sources.each do |source|
# If the source is unlockable and the current command allows an unlock of
@@ -695,28 +750,16 @@ module Bundler
end
def converge_dependencies
- frozen = Bundler.frozen_bundle?
- (@dependencies + @locked_deps.values).each do |dep|
- locked_source = @locked_deps[dep.name]
- # This is to make sure that if bundler is installing in deployment mode and
- # after locked_source and sources don't match, we still use locked_source.
- if frozen && !locked_source.nil? &&
- locked_source.respond_to?(:source) && locked_source.source.instance_of?(Source::Path) && locked_source.source.path.exist?
- dep.source = locked_source.source
- elsif dep.source
+ changes = false
+
+ @dependencies.each do |dep|
+ if dep.source
dep.source = sources.get(dep.source)
end
- if dep.source.is_a?(Source::Gemspec)
- dep.platforms.concat(@platforms.map {|p| Dependency::REVERSE_PLATFORM_MAP[p] }.flatten(1)).uniq!
- end
- end
- changes = false
- # We want to know if all match, but don't want to check all entries
- # This means we need to return false if any dependency doesn't match
- # the lock or doesn't exist in the lock.
- @dependencies.each do |dependency|
- unless locked_dep = @locked_deps[dependency.name]
+ next if unlocking?
+
+ unless locked_dep = @locked_deps[dep.name]
changes = true
next
end
@@ -727,11 +770,11 @@ module Bundler
# directive, the lockfile dependencies and resolved dependencies end up
# with a mismatch on #type. Work around that by setting the type on the
# dep from the lockfile.
- locked_dep.instance_variable_set(:@type, dependency.type)
+ locked_dep.instance_variable_set(:@type, dep.type)
# We already know the name matches from the hash lookup
# so we only need to check the requirement now
- changes ||= dependency.requirement != locked_dep.requirement
+ changes ||= dep.requirement != locked_dep.requirement
end
changes
@@ -741,219 +784,146 @@ module Bundler
# commonly happen if the Gemfile has changed since the lockfile was last
# generated
def converge_locked_specs
- deps = []
+ converged = converge_specs(@locked_specs)
- # Build a list of dependencies that are the same in the Gemfile
- # and Gemfile.lock. If the Gemfile modified a dependency, but
- # the gem in the Gemfile.lock still satisfies it, this is fine
- # too.
- @dependencies.each do |dep|
- locked_dep = @locked_deps[dep.name]
+ resolve = SpecSet.new(converged.reject {|s| @unlock[:gems].include?(s.name) })
- # If the locked_dep doesn't match the dependency we're looking for then we ignore the locked_dep
- locked_dep = nil unless locked_dep == dep
+ diff = nil
- if in_locked_deps?(dep, locked_dep) || satisfies_locked_spec?(dep)
- deps << dep
- elsif dep.source.is_a?(Source::Path) && dep.current_platform? && (!locked_dep || dep.source != locked_dep.source)
- @locked_specs.each do |s|
- @unlock[:gems] << s.name if s.source == dep.source
- end
+ # Now, we unlock any sources that do not have anymore gems pinned to it
+ sources.all_sources.each do |source|
+ next unless source.respond_to?(:unlock!)
- dep.source.unlock! if dep.source.respond_to?(:unlock!)
- dep.source.specs.each {|s| @unlock[:gems] << s.name }
+ unless resolve.any? {|s| s.source == source }
+ diff ||= @locked_specs.to_a - resolve.to_a
+ source.unlock! if diff.any? {|s| s.source == source }
end
end
- unlock_source_unlocks_spec = Bundler.feature_flag.unlock_source_unlocks_spec?
+ resolve
+ end
+ def converge_specs(specs)
converged = []
- @locked_specs.each do |s|
- # Replace the locked dependency's source with the equivalent source from the Gemfile
+ deps = []
+
+ @specs_that_changed_sources = []
+
+ specs.each do |s|
+ name = s.name
dep = @dependencies.find {|d| s.satisfies?(d) }
- s.source = (dep && dep.source) || sources.get(s.source)
+ lockfile_source = s.source
- # Don't add a spec to the list if its source is expired. For example,
- # if you change a Git gem to RubyGems.
- next if s.source.nil?
- next if @unlock[:sources].include?(s.source.name)
+ if dep
+ gemfile_source = dep.source || default_source
- # XXX This is a backwards-compatibility fix to preserve the ability to
- # unlock a single gem by passing its name via `--source`. See issue #3759
- # TODO: delete in Bundler 2
- next if unlock_source_unlocks_spec && @unlock[:sources].include?(s.name)
+ @specs_that_changed_sources << s if gemfile_source != lockfile_source
+ deps << dep if !dep.source || lockfile_source.include?(dep.source)
+ @unlock[:gems] << name if lockfile_source.include?(dep.source) && lockfile_source != gemfile_source
+
+ # Replace the locked dependency's source with the equivalent source from the Gemfile
+ s.source = gemfile_source
+ else
+ # Replace the locked dependency's source with the default source, if the locked source is no longer in the Gemfile
+ s.source = default_source unless sources.get(lockfile_source)
+ end
- # If the spec is from a path source and it doesn't exist anymore
- # then we unlock it.
+ next if @unlock[:sources].include?(s.source.name)
# Path sources have special logic
if s.source.instance_of?(Source::Path) || s.source.instance_of?(Source::Gemspec)
new_specs = begin
s.source.specs
- rescue PathError, GitError
+ rescue PathError
# if we won't need the source (according to the lockfile),
- # don't error if the path/git source isn't available
- next if @locked_specs.
- for(requested_dependencies, [], false, true, false).
+ # don't error if the path source isn't available
+ next if specs.
+ for(requested_dependencies, false).
none? {|locked_spec| locked_spec.source == s.source }
raise
end
new_spec = new_specs[s].first
-
- # If the spec is no longer in the path source, unlock it. This
- # commonly happens if the version changed in the gemspec
- next unless new_spec
-
- new_runtime_deps = new_spec.dependencies.select {|d| d.type != :development }
- old_runtime_deps = s.dependencies.select {|d| d.type != :development }
- # If the dependencies of the path source have changed and locked spec can't satisfy new dependencies, unlock it
- next unless new_runtime_deps.sort == old_runtime_deps.sort || new_runtime_deps.all? {|d| satisfies_locked_spec?(d) }
-
- s.dependencies.replace(new_spec.dependencies)
+ if new_spec
+ s.dependencies.replace(new_spec.dependencies)
+ else
+ # If the spec is no longer in the path source, unlock it. This
+ # commonly happens if the version changed in the gemspec
+ @unlock[:gems] << name
+ end
end
- converged << s
- end
-
- resolve = SpecSet.new(converged)
- @locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(deps), @unlock[:gems], true, true)
- resolve = resolve.for(expand_dependencies(deps, true), @unlock[:gems], false, false, false)
- diff = nil
-
- # Now, we unlock any sources that do not have anymore gems pinned to it
- sources.all_sources.each do |source|
- next unless source.respond_to?(:unlock!)
-
- unless resolve.any? {|s| s.source == source }
- diff ||= @locked_specs.to_a - resolve.to_a
- source.unlock! if diff.any? {|s| s.source == source }
+ if dep.nil? && requested_dependencies.find {|d| name == d.name }
+ @unlock[:gems] << s.name
+ else
+ converged << s
end
end
- resolve
- end
-
- def in_locked_deps?(dep, locked_dep)
- # Because the lockfile can't link a dep to a specific remote, we need to
- # treat sources as equivalent anytime the locked dep has all the remotes
- # that the Gemfile dep does.
- locked_dep && locked_dep.source && dep.source && locked_dep.source.include?(dep.source)
- end
-
- def satisfies_locked_spec?(dep)
- @locked_specs[dep].any? {|s| s.satisfies?(dep) && (!dep.source || s.source.include?(dep.source)) }
- end
-
- # This list of dependencies is only used in #resolve, so it's OK to add
- # the metadata dependencies here
- def expanded_dependencies
- @expanded_dependencies ||= begin
- expand_dependencies(dependencies + metadata_dependencies, @remote)
- end
+ filter_specs(converged, deps)
end
def metadata_dependencies
- @metadata_dependencies ||= begin
- ruby_versions = concat_ruby_version_requirements(@ruby_version)
- if ruby_versions.empty? || !@ruby_version.exact?
- concat_ruby_version_requirements(RubyVersion.system)
- concat_ruby_version_requirements(locked_ruby_version_object) unless @unlock[:ruby]
- end
- [
- Dependency.new("Ruby\0", ruby_versions),
- Dependency.new("RubyGems\0", Gem::VERSION),
- ]
- end
- end
-
- def concat_ruby_version_requirements(ruby_version, ruby_versions = [])
- return ruby_versions unless ruby_version
- if ruby_version.patchlevel
- ruby_versions << ruby_version.to_gem_version_with_patchlevel
- else
- ruby_versions.concat(ruby_version.versions.map do |version|
- requirement = Gem::Requirement.new(version)
- if requirement.exact?
- "~> #{version}.0"
- else
- requirement
- end
- end)
- end
- end
-
- def expand_dependencies(dependencies, remote = false)
- sorted_platforms = Resolver.sort_platforms(@platforms)
- deps = []
- dependencies.each do |dep|
- dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
- next if !remote && !dep.current_platform?
- platforms = dep.gem_platforms(sorted_platforms)
- if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
- mapped_platforms = dep.expanded_platforms
- Bundler.ui.warn \
- "The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
- "Bundler is installing for #{@platforms.join ", "} but the dependency " \
- "is only for #{mapped_platforms.join ", "}. " \
- "To add those platforms to the bundle, " \
- "run `bundle lock --add-platform #{mapped_platforms.join " "}`."
- end
- platforms.each do |p|
- deps << DepProxy.new(dep, p) if remote || p == generic_local_platform
- end
- end
- deps
- end
-
- def requested_dependencies
- groups = requested_groups
- groups.map!(&:to_sym)
- dependencies.reject {|d| !d.should_include? || (d.groups & groups).empty? }
+ @metadata_dependencies ||= [
+ Dependency.new("Ruby\0", Gem.ruby_version),
+ Dependency.new("RubyGems\0", Gem::VERSION),
+ ]
end
def source_requirements
- # Load all specs from remote sources
- index
-
# Record the specs available in each gem's source, so that those
# specs will be available later when the resolver knows where to
# look for that gemspec (or its dependencies)
- default = sources.default_source
- source_requirements = { :default => default }
- default = nil unless Bundler.feature_flag.disable_multisource?
- dependencies.each do |dep|
- next unless source = dep.source || default
- source_requirements[dep.name] = source
+ source_requirements = if precompute_source_requirements_for_indirect_dependencies?
+ all_requirements = source_map.all_requirements
+ all_requirements = pin_locally_available_names(all_requirements) if @prefer_local
+ { :default => default_source }.merge(all_requirements)
+ else
+ { :default => Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
end
+ source_requirements.merge!(source_map.locked_requirements) unless @remote
metadata_dependencies.each do |dep|
source_requirements[dep.name] = sources.metadata_source
end
- source_requirements["bundler"] = sources.metadata_source # needs to come last to override
+
+ default_bundler_source = source_requirements["bundler"] || default_source
+
+ if @unlocking_bundler
+ default_bundler_source.add_dependency_names("bundler")
+ else
+ source_requirements[:default_bundler] = default_bundler_source
+ source_requirements["bundler"] = sources.metadata_source # needs to come last to override
+ end
+
+ verify_changed_sources!
source_requirements
end
- def pinned_spec_names(skip = nil)
- pinned_names = []
- default = Bundler.feature_flag.disable_multisource? && sources.default_source
- @dependencies.each do |dep|
- next unless dep_source = dep.source || default
- next if dep_source == skip
- pinned_names << dep.name
+ def default_source
+ sources.default_source
+ end
+
+ def verify_changed_sources!
+ @specs_that_changed_sources.each do |s|
+ if s.source.specs.search(s.name).empty?
+ raise GemNotFound, "Could not find gem '#{s.name}' in #{s.source}"
+ end
end
- pinned_names
end
def requested_groups
- groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
+ values = groups - Bundler.settings[:without] - @optional_groups + Bundler.settings[:with]
+ values &= Bundler.settings[:only] unless Bundler.settings[:only].empty?
+ values
end
def lockfiles_equal?(current, proposed, preserve_unknown_sections)
if preserve_unknown_sections
sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
- sections_to_ignore += LockfileParser::ENVIRONMENT_VERSION_SECTIONS
+ sections_to_ignore << LockfileParser::RUBY
+ sections_to_ignore << LockfileParser::BUNDLED unless @unlocking_bundler
pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
whitespace_cleanup = /\n{2,}/
current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
@@ -962,41 +932,30 @@ module Bundler
current == proposed
end
- def extract_gem_info(error)
- # This method will extract the error message like "Could not find foo-1.2.3 in any of the sources"
- # to an array. The first element will be the gem name (e.g. foo), the second will be the version number.
- error.message.scan(/Could not find (\w+)-(\d+(?:\.\d+)+)/).flatten
- end
-
- def compute_requires
- dependencies.reduce({}) do |requires, dep|
- next requires unless dep.should_include?
- requires[dep.name] = Array(dep.autorequire || dep.name).map do |file|
- # Allow `require: true` as an alias for `require: <name>`
- file == true ? dep.name : file
- end
- requires
+ def additional_base_requirements_for_resolve(resolution_packages, last_resolve)
+ return resolution_packages unless @locked_gems && !sources.expired_sources?(@locked_gems.sources)
+ converge_specs(@originally_locked_specs - last_resolve).each do |locked_spec|
+ next if locked_spec.source.is_a?(Source::Path)
+ resolution_packages.base_requirements[locked_spec.name] = Gem::Requirement.new(">= #{locked_spec.version}")
end
+ resolution_packages
end
- def additional_base_requirements_for_resolve
- return [] unless @locked_gems && Bundler.feature_flag.only_update_to_newer_versions?
- dependencies_by_name = dependencies.inject({}) {|memo, dep| memo.update(dep.name => dep) }
- @locked_gems.specs.reduce({}) do |requirements, locked_spec|
- name = locked_spec.name
- dependency = dependencies_by_name[name]
- next requirements if @locked_gems.dependencies[name] != dependency
- next requirements if dependency && dependency.source.is_a?(Source::Path)
- dep = Gem::Dependency.new(name, ">= #{locked_spec.version}")
- requirements[name] = DepProxy.new(dep, locked_spec.platform)
- requirements
- end.values
- end
+ def remove_ruby_from_platforms_if_necessary!(dependencies)
+ return if Bundler.frozen_bundle? ||
+ Bundler.local_platform == Gem::Platform::RUBY ||
+ !platforms.include?(Gem::Platform::RUBY) ||
+ (@new_platform && platforms.last == Gem::Platform::RUBY) ||
+ @path_changes ||
+ @dependency_changes ||
+ !@originally_locked_specs.incomplete_ruby_specs?(dependencies)
- def equivalent_rubygems_remotes?(source)
- return false unless source.is_a?(Source::Rubygems)
+ remove_platform(Gem::Platform::RUBY)
+ add_current_platform
+ end
- Bundler.settings[:allow_deployment_source_credential_changes] && source.equivalent_remotes?(sources.rubygems_remotes)
+ def source_map
+ @source_map ||= SourceMap.new(sources, dependencies, @locked_specs)
end
end
end
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
deleted file mode 100644
index 6c32179ac1..0000000000
--- a/lib/bundler/dep_proxy.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler
- class DepProxy
- attr_reader :__platform, :dep
-
- def initialize(dep, platform)
- @dep = dep
- @__platform = platform
- end
-
- def hash
- @hash ||= [dep, __platform].hash
- end
-
- def ==(other)
- return false if other.class != self.class
- dep == other.dep && __platform == other.__platform
- end
-
- alias_method :eql?, :==
-
- def type
- @dep.type
- end
-
- def name
- @dep.name
- end
-
- def requirement
- @dep.requirement
- end
-
- def to_s
- s = name.dup
- s << " (#{requirement})" unless requirement == Gem::Requirement.default
- s << " #{__platform}" unless __platform == Gem::Platform::RUBY
- s
- end
-
- private
-
- def method_missing(*args, &blk)
- @dep.send(*args, &blk)
- end
- end
-end
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 6c2642163e..5f17943629 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -7,80 +7,23 @@ require_relative "rubygems_ext"
module Bundler
class Dependency < Gem::Dependency
attr_reader :autorequire
- attr_reader :groups, :platforms, :gemfile, :git, :branch
+ attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref
+ ALL_RUBY_VERSIONS = ((18..27).to_a + (30..33).to_a).freeze
PLATFORM_MAP = {
- :ruby => Gem::Platform::RUBY,
- :ruby_18 => Gem::Platform::RUBY,
- :ruby_19 => Gem::Platform::RUBY,
- :ruby_20 => Gem::Platform::RUBY,
- :ruby_21 => Gem::Platform::RUBY,
- :ruby_22 => Gem::Platform::RUBY,
- :ruby_23 => Gem::Platform::RUBY,
- :ruby_24 => Gem::Platform::RUBY,
- :ruby_25 => Gem::Platform::RUBY,
- :ruby_26 => Gem::Platform::RUBY,
- :mri => Gem::Platform::RUBY,
- :mri_18 => Gem::Platform::RUBY,
- :mri_19 => Gem::Platform::RUBY,
- :mri_20 => Gem::Platform::RUBY,
- :mri_21 => Gem::Platform::RUBY,
- :mri_22 => Gem::Platform::RUBY,
- :mri_23 => Gem::Platform::RUBY,
- :mri_24 => Gem::Platform::RUBY,
- :mri_25 => Gem::Platform::RUBY,
- :mri_26 => Gem::Platform::RUBY,
- :rbx => Gem::Platform::RUBY,
- :truffleruby => Gem::Platform::RUBY,
- :jruby => Gem::Platform::JAVA,
- :jruby_18 => Gem::Platform::JAVA,
- :jruby_19 => Gem::Platform::JAVA,
- :mswin => Gem::Platform::MSWIN,
- :mswin_18 => Gem::Platform::MSWIN,
- :mswin_19 => Gem::Platform::MSWIN,
- :mswin_20 => Gem::Platform::MSWIN,
- :mswin_21 => Gem::Platform::MSWIN,
- :mswin_22 => Gem::Platform::MSWIN,
- :mswin_23 => Gem::Platform::MSWIN,
- :mswin_24 => Gem::Platform::MSWIN,
- :mswin_25 => Gem::Platform::MSWIN,
- :mswin_26 => Gem::Platform::MSWIN,
- :mswin64 => Gem::Platform::MSWIN64,
- :mswin64_19 => Gem::Platform::MSWIN64,
- :mswin64_20 => Gem::Platform::MSWIN64,
- :mswin64_21 => Gem::Platform::MSWIN64,
- :mswin64_22 => Gem::Platform::MSWIN64,
- :mswin64_23 => Gem::Platform::MSWIN64,
- :mswin64_24 => Gem::Platform::MSWIN64,
- :mswin64_25 => Gem::Platform::MSWIN64,
- :mswin64_26 => Gem::Platform::MSWIN64,
- :mingw => Gem::Platform::MINGW,
- :mingw_18 => Gem::Platform::MINGW,
- :mingw_19 => Gem::Platform::MINGW,
- :mingw_20 => Gem::Platform::MINGW,
- :mingw_21 => Gem::Platform::MINGW,
- :mingw_22 => Gem::Platform::MINGW,
- :mingw_23 => Gem::Platform::MINGW,
- :mingw_24 => Gem::Platform::MINGW,
- :mingw_25 => Gem::Platform::MINGW,
- :mingw_26 => Gem::Platform::MINGW,
- :x64_mingw => Gem::Platform::X64_MINGW,
- :x64_mingw_20 => Gem::Platform::X64_MINGW,
- :x64_mingw_21 => Gem::Platform::X64_MINGW,
- :x64_mingw_22 => Gem::Platform::X64_MINGW,
- :x64_mingw_23 => Gem::Platform::X64_MINGW,
- :x64_mingw_24 => Gem::Platform::X64_MINGW,
- :x64_mingw_25 => Gem::Platform::X64_MINGW,
- :x64_mingw_26 => Gem::Platform::X64_MINGW,
- }.freeze
-
- REVERSE_PLATFORM_MAP = {}.tap do |reverse_platform_map|
- PLATFORM_MAP.each do |key, value|
- reverse_platform_map[value] ||= []
- reverse_platform_map[value] << key
- end
-
- reverse_platform_map.each {|_, platforms| platforms.freeze }
+ :ruby => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
+ :mri => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
+ :rbx => [Gem::Platform::RUBY],
+ :truffleruby => [Gem::Platform::RUBY],
+ :jruby => [Gem::Platform::JAVA, [18, 19]],
+ :windows => [Gem::Platform::WINDOWS, ALL_RUBY_VERSIONS],
+ :mswin => [Gem::Platform::MSWIN, ALL_RUBY_VERSIONS],
+ :mswin64 => [Gem::Platform::MSWIN64, ALL_RUBY_VERSIONS - [18]],
+ :mingw => [Gem::Platform::MINGW, ALL_RUBY_VERSIONS],
+ :x64_mingw => [Gem::Platform::X64_MINGW, ALL_RUBY_VERSIONS - [18, 19]],
+ }.each_with_object({}) do |(platform, spec), hash|
+ hash[platform] = spec[0]
+ spec[1]&.each {|version| hash[:"#{platform}_#{version}"] = spec[0] }
end.freeze
def initialize(name, version, options = {}, &blk)
@@ -90,12 +33,16 @@ module Bundler
@autorequire = nil
@groups = Array(options["group"] || :default).map(&:to_sym)
@source = options["source"]
+ @path = options["path"]
@git = options["git"]
+ @github = options["github"]
@branch = options["branch"]
+ @ref = options["ref"]
@platforms = Array(options["platforms"])
@env = options["env"]
@should_include = options.fetch("should_include", true)
@gemfile = options["gemfile"]
+ @force_ruby_platform = options["force_ruby_platform"] if options.key?("force_ruby_platform")
@autorequire = Array(options["require"] || []) if options.key?("require")
end
@@ -103,15 +50,14 @@ module Bundler
# Returns the platforms this dependency is valid for, in the same order as
# passed in the `valid_platforms` parameter
def gem_platforms(valid_platforms)
+ return [Gem::Platform::RUBY] if force_ruby_platform
return valid_platforms if @platforms.empty?
- @gem_platforms ||= expanded_platforms.compact.uniq
-
- valid_platforms & @gem_platforms
+ valid_platforms.select {|p| expanded_platforms.include?(GemHelpers.generic(p)) }
end
def expanded_platforms
- @platforms.map {|pl| PLATFORM_MAP[pl] }
+ @expanded_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.flatten.uniq
end
def should_include?
@@ -139,7 +85,7 @@ module Bundler
def to_lock
out = super
out << "!" if source
- out << "\n"
+ out
end
def specific?
diff --git a/lib/bundler/digest.rb b/lib/bundler/digest.rb
new file mode 100644
index 0000000000..f11f5edd38
--- /dev/null
+++ b/lib/bundler/digest.rb
@@ -0,0 +1,71 @@
+# frozen_string_literal: true
+
+# This code was extracted from https://github.com/Solistra/ruby-digest which is under public domain
+module Bundler
+ module Digest
+ # The initial constant values for the 32-bit constant words A, B, C, D, and
+ # E, respectively.
+ SHA1_WORDS = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0].freeze
+
+ # The 8-bit field used for bitwise `AND` masking. Defaults to `0xFFFFFFFF`.
+ SHA1_MASK = 0xFFFFFFFF
+
+ class << self
+ def sha1(string)
+ unless string.is_a?(String)
+ raise TypeError, "can't convert #{string.class.inspect} into String"
+ end
+
+ buffer = string.b
+
+ words = SHA1_WORDS.dup
+ generate_split_buffer(buffer) do |chunk|
+ w = []
+ chunk.each_slice(4) do |a, b, c, d|
+ w << (((a << 8 | b) << 8 | c) << 8 | d)
+ end
+ a, b, c, d, e = *words
+ (16..79).each do |i|
+ w[i] = SHA1_MASK & rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1)
+ end
+ 0.upto(79) do |i|
+ case i
+ when 0..19
+ f = ((b & c) | (~b & d))
+ k = 0x5A827999
+ when 20..39
+ f = (b ^ c ^ d)
+ k = 0x6ED9EBA1
+ when 40..59
+ f = ((b & c) | (b & d) | (c & d))
+ k = 0x8F1BBCDC
+ when 60..79
+ f = (b ^ c ^ d)
+ k = 0xCA62C1D6
+ end
+ t = SHA1_MASK & rotate(a, 5) + f + e + k + w[i]
+ a, b, c, d, e = t, a, SHA1_MASK & rotate(b, 30), c, d # rubocop:disable Style/ParallelAssignment
+ end
+ mutated = [a, b, c, d, e]
+ words.map!.with_index {|word, index| SHA1_MASK & (word + mutated[index]) }
+ end
+
+ words.pack("N*").unpack("H*").first
+ end
+
+ private
+
+ def generate_split_buffer(string, &block)
+ size = string.bytesize * 8
+ buffer = string.bytes << 128
+ buffer << 0 while buffer.size % 64 != 56
+ buffer.concat([size].pack("Q>").bytes)
+ buffer.each_slice(64, &block)
+ end
+
+ def rotate(value, spaces)
+ value << spaces | value >> (32 - spaces)
+ end
+ end
+ end
+end
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 99a369281a..03c80a408c 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -16,7 +16,9 @@ module Bundler
VALID_PLATFORMS = Bundler::Dependency::PLATFORM_MAP.keys.freeze
VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
- platform platforms type source install_if gemfile].freeze
+ platform platforms type source install_if gemfile force_ruby_platform].freeze
+
+ GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}.freeze
attr_reader :gemspecs
attr_accessor :dependencies
@@ -39,12 +41,12 @@ module Bundler
end
def eval_gemfile(gemfile, contents = nil)
- expanded_gemfile_path = Pathname.new(gemfile).expand_path(@gemfile && @gemfile.parent)
+ expanded_gemfile_path = Pathname.new(gemfile).expand_path(@gemfile&.parent)
original_gemfile = @gemfile
@gemfile = expanded_gemfile_path
@gemfiles << expanded_gemfile_path
contents ||= Bundler.read_file(@gemfile.to_s)
- instance_eval(contents.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
+ instance_eval(contents.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
rescue Exception => e # rubocop:disable Lint/RescueException
message = "There was an error " \
"#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
@@ -63,9 +65,8 @@ module Bundler
development_group = opts[:development_group] || :development
expanded_path = gemfile_root.join(path)
- gemspecs = Dir[File.join(expanded_path, "{,*}.gemspec")].map {|g| Bundler.load_gemspec(g) }.compact
+ gemspecs = Gem::Util.glob_files_in_dir("{,*}.gemspec", expanded_path).map {|g| Bundler.load_gemspec(g) }.compact
gemspecs.reject! {|s| s.name != name } if name
- Index.sort_specs(gemspecs)
specs_by_name_and_version = gemspecs.group_by {|s| [s.name, s.version] }
case specs_by_name_and_version.size
@@ -75,8 +76,7 @@ module Bundler
@gemspecs << spec
- gem_platforms = Bundler::Dependency::REVERSE_PLATFORM_MAP[Bundler::GemHelpers.generic_local_platform]
- gem spec.name, :name => spec.name, :path => path, :glob => glob, :platforms => gem_platforms
+ gem spec.name, :name => spec.name, :path => path, :glob => glob
group(development_group) do
spec.development_dependencies.each do |dep|
@@ -104,8 +104,8 @@ module Bundler
if current = @dependencies.find {|d| d.name == dep.name }
deleted_dep = @dependencies.delete(current) if current.type == :development
- if current.requirement != dep.requirement
- unless deleted_dep
+ unless deleted_dep
+ if current.requirement != dep.requirement
return if dep.type == :development
update_prompt = ""
@@ -123,21 +123,16 @@ module Bundler
raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
"You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})" \
"#{update_prompt}"
- end
-
- else
- Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
- "You should probably keep only one of them.\n" \
- "Remove any duplicate entries and specify the gem only once.\n" \
- "While it's not a problem now, it could cause errors if you change the version of one of them later."
- end
-
- if current.source != dep.source
- unless deleted_dep
+ elsif current.source != dep.source
return if dep.type == :development
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
"#{current.source || "an unspecified source"} and #{dep.source}\n"
+ else
+ Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
+ "You should probably keep only one of them.\n" \
+ "Remove any duplicate entries and specify the gem only once.\n" \
+ "While it's not a problem now, it could cause errors if you change the version of one of them later."
end
end
end
@@ -165,8 +160,7 @@ module Bundler
elsif block_given?
with_source(@sources.add_rubygems_source("remotes" => source), &blk)
else
- check_primary_source_safety(@sources)
- @sources.global_rubygems_source = source
+ @sources.add_global_rubygems_remote(source)
end
end
@@ -184,24 +178,14 @@ module Bundler
end
def path(path, options = {}, &blk)
- unless block_given?
- msg = "You can no longer specify a path source by itself. Instead, \n" \
- "either use the :path option on a gem, or specify the gems that \n" \
- "bundler should find in the path source by passing a block to \n" \
- "the path method, like: \n\n" \
- " path 'dir/containing/rails' do\n" \
- " gem 'rails'\n" \
- " end\n\n"
-
- raise DeprecatedError, msg if Bundler.feature_flag.disable_multisource?
- SharedHelpers.major_deprecation(2, msg.strip)
- end
-
source_options = normalize_hash(options).merge(
"path" => Pathname.new(path),
"root_path" => gemfile_root,
"gemspec" => gemspecs.find {|g| g.name == options["name"] }
)
+
+ source_options["global"] = true unless block_given?
+
source = @sources.add_path_source(source_options)
with_source(source, &blk)
end
@@ -223,7 +207,6 @@ module Bundler
def github(repo, options = {})
raise ArgumentError, "GitHub sources require a block" unless block_given?
- raise DeprecatedError, "The #github method has been removed" if Bundler.feature_flag.skip_default_git_sources?
github_uri = @git_sources["github"].call(repo)
git_options = normalize_hash(options).merge("uri" => github_uri)
git_source = @sources.add_git_source(git_options)
@@ -231,6 +214,7 @@ module Bundler
end
def to_definition(lockfile, unlock)
+ check_primary_source_safety
Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version, @optional_groups, @gemfiles)
end
@@ -281,32 +265,33 @@ module Bundler
raise GemfileError, "Undefined local variable or method `#{name}' for Gemfile"
end
- private
+ def check_primary_source_safety
+ check_path_source_safety
+ check_rubygems_source_safety
+ end
- def add_git_sources
- return if Bundler.feature_flag.skip_default_git_sources?
+ private
+ def add_git_sources
git_source(:github) do |repo_name|
- warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
-"https://github.com/#{repo_name}.git"
- RUBY
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
- "https://github.com/#{repo_name}.git"
+ if repo_name =~ GITHUB_PULL_REQUEST_URL
+ {
+ "git" => "https://github.com/#{$1}.git",
+ "branch" => nil,
+ "ref" => "refs/pull/#{$2}/head",
+ "tag" => nil,
+ }
+ else
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
+ "https://github.com/#{repo_name}.git"
+ end
end
git_source(:gist) do |repo_name|
- warn_deprecated_git_source(:gist, '"https://gist.github.com/#{repo_name}.git"')
-
"https://gist.github.com/#{repo_name}.git"
end
git_source(:bitbucket) do |repo_name|
- warn_deprecated_git_source(:bitbucket, <<-'RUBY'.strip)
-user_name, repo_name = repo_name.split("/")
-repo_name ||= user_name
-"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
- RUBY
-
user_name, repo_name = repo_name.split("/")
repo_name ||= user_name
"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
@@ -339,7 +324,7 @@ repo_name ||= user_name
if name.is_a?(Symbol)
raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead)
end
- if name =~ /\s/
+ if /\s/.match?(name)
raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
end
raise GemfileError, %(an empty gem name is not valid) if name.empty?
@@ -377,7 +362,11 @@ repo_name ||= user_name
git_name = (git_names & opts.keys).last
if @git_sources[git_name]
- opts["git"] = @git_sources[git_name].call(opts[git_name])
+ git_opts = @git_sources[git_name].call(opts[git_name])
+ git_opts = { "git" => git_opts } if git_opts.is_a?(String)
+ opts.merge!(git_opts) do |key, _gemfile_value, _git_source_value|
+ raise GemfileError, %(The :#{key} option can't be used with `#{git_name}: #{opts[git_name].inspect}`)
+ end
end
%w[git path].each do |type|
@@ -444,42 +433,47 @@ repo_name ||= user_name
end
end
- def check_primary_source_safety(source_list)
- return if source_list.rubygems_primary_remotes.empty? && source_list.global_rubygems_source.nil?
+ def check_path_source_safety
+ return if @sources.global_path_source.nil?
+
+ msg = "You can no longer specify a path source by itself. Instead, \n" \
+ "either use the :path option on a gem, or specify the gems that \n" \
+ "bundler should find in the path source by passing a block to \n" \
+ "the path method, like: \n\n" \
+ " path 'dir/containing/rails' do\n" \
+ " gem 'rails'\n" \
+ " end\n\n"
+
+ SharedHelpers.major_deprecation(2, msg.strip)
+ end
+
+ def check_rubygems_source_safety
+ if @sources.implicit_global_source?
+ implicit_global_source_warning
+ elsif @sources.aggregate_global_source?
+ multiple_global_source_warning
+ end
+ end
- if Bundler.feature_flag.disable_multisource?
- msg = "This Gemfile contains multiple primary sources. " \
+ def implicit_global_source_warning
+ Bundler::SharedHelpers.major_deprecation 2, "This Gemfile does not include an explicit global source. " \
+ "Not using an explicit global source may result in a different lockfile being generated depending on " \
+ "the gems you have installed locally before bundler is run. " \
+ "Instead, define a global source in your Gemfile like this: source \"https://rubygems.org\"."
+ end
+
+ def multiple_global_source_warning
+ if Bundler.feature_flag.bundler_3_mode?
+ msg = "This Gemfile contains multiple global sources. " \
"Each source after the first must include a block to indicate which gems " \
"should come from that source"
- unless Bundler.feature_flag.bundler_2_mode?
- msg += ". To downgrade this error to a warning, run " \
- "`bundle config unset disable_multisource`"
- end
raise GemfileEvalError, msg
else
- Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple primary sources. " \
+ Bundler::SharedHelpers.major_deprecation 2, "Your Gemfile contains multiple global sources. " \
"Using `source` more than once without a block is a security risk, and " \
"may result in installing unexpected gems. To resolve this warning, use " \
- "a block to indicate which gems should come from the secondary source. " \
- "To upgrade this warning to an error, run `bundle config set " \
- "disable_multisource true`."
- end
- end
-
- def warn_deprecated_git_source(name, replacement, additional_message = nil)
- additional_message &&= " #{additional_message}"
- replacement = if replacement.count("\n").zero?
- "{|repo_name| #{replacement} }"
- else
- "do |repo_name|\n#{replacement.to_s.gsub(/^/, " ")}\n end"
+ "a block to indicate which gems should come from the secondary source."
end
-
- Bundler::SharedHelpers.major_deprecation 3, <<-EOS
-The :#{name} git source is deprecated, and will be removed in the future.#{additional_message} Add this code to the top of your Gemfile to ensure it continues to work:
-
- git_source(:#{name}) #{replacement}
-
- EOS
end
class DSLError < GemfileError
@@ -516,9 +510,7 @@ The :#{name} git source is deprecated, and will be removed in the future.#{addit
# be raised.
#
def contents
- @contents ||= begin
- dsl_path && File.exist?(dsl_path) && File.read(dsl_path)
- end
+ @contents ||= dsl_path && File.exist?(dsl_path) && File.read(dsl_path)
end
# The message of the exception reports the content of podspec for the
@@ -571,7 +563,7 @@ The :#{name} git source is deprecated, and will be removed in the future.#{addit
end
end
- private
+ private
def parse_line_number_from_description
description = self.description
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 9a00b64e0e..863544b1f9 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -3,17 +3,17 @@
module Bundler
# used for Creating Specifications from the Gemcutter Endpoint
class EndpointSpecification < Gem::Specification
- ILLFORMED_MESSAGE = 'Ill-formed requirement ["#<YAML::Syck::DefaultKey'.freeze
- include MatchPlatform
+ include MatchRemoteMetadata
- attr_reader :name, :version, :platform, :required_rubygems_version, :required_ruby_version, :checksum
+ attr_reader :name, :version, :platform, :checksum
attr_accessor :source, :remote, :dependencies
- def initialize(name, version, platform, dependencies, metadata = nil)
+ def initialize(name, version, platform, spec_fetcher, dependencies, metadata = nil)
super()
@name = name
@version = Gem::Version.create version
- @platform = platform
+ @platform = Gem::Platform.new(platform)
+ @spec_fetcher = spec_fetcher
@dependencies = dependencies.map {|dep, reqs| build_dependency(dep, reqs) }
@loaded_from = nil
@@ -104,14 +104,23 @@ module Bundler
@remote_specification = spec
end
- private
+ private
+
+ def _remote_specification
+ @_remote_specification ||= @spec_fetcher.fetch_spec([@name, @version, @platform])
+ end
def local_specification_path
"#{base_dir}/specifications/#{full_name}.gemspec"
end
def parse_metadata(data)
- return unless data
+ unless data
+ @required_ruby_version = nil
+ @required_rubygems_version = nil
+ return
+ end
+
data.each do |k, v|
next unless v
case k.to_s
@@ -129,13 +138,6 @@ module Bundler
def build_dependency(name, requirements)
Gem::Dependency.new(name, requirements)
- rescue ArgumentError => e
- raise unless e.message.include?(ILLFORMED_MESSAGE)
- puts # we shouldn't print the error message on the "fetching info" status line
- raise GemspecError,
- "Unfortunately, the gem #{name} (#{version}) has an invalid " \
- "gemspec.\nPlease ask the gem author to yank the bad version to fix " \
- "this issue. For more information, see http://bit.ly/syck-defaultkey."
end
end
end
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 17624b4fe9..7b1152930e 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -71,11 +71,11 @@ module Bundler
def self.ruby_version
str = String.new(RUBY_VERSION)
str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
- str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
+ str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{Gem::Platform.local}]"
end
def self.git_version
- Bundler::Source::Git::GitProxy.new(nil, nil, nil).full_version
+ Bundler::Source::Git::GitProxy.new(nil, nil).full_version
rescue Bundler::Source::Git::GitNotInstalledError
"not installed"
end
@@ -105,7 +105,7 @@ module Bundler
out << [" User Home", Gem.user_home]
out << [" User Path", Gem.user_dir]
out << [" Bin Dir", Gem.bindir]
- if defined?(OpenSSL)
+ if defined?(OpenSSL::SSL)
out << ["OpenSSL"]
out << [" Compiled", OpenSSL::OPENSSL_VERSION] if defined?(OpenSSL::OPENSSL_VERSION)
out << [" Loaded", OpenSSL::OPENSSL_LIBRARY_VERSION] if defined?(OpenSSL::OPENSSL_LIBRARY_VERSION)
@@ -122,7 +122,7 @@ module Bundler
specs = Bundler.rubygems.find_name(name)
out << [" #{name}", "(#{specs.map(&:version).join(",")})"] unless specs.empty?
end
- if (exe = caller.last.split(":").first) && exe =~ %r{(exe|bin)/bundler?\z}
+ if (exe = caller.last.split(":").first)&.match? %r{(exe|bin)/bundler?\z}
shebang = File.read(exe).lines.first
shebang.sub!(/^#!\s*/, "")
unless shebang.start_with?(Gem.ruby, "/usr/bin/env ruby")
diff --git a/lib/bundler/environment_preserver.rb b/lib/bundler/environment_preserver.rb
index c9014badad..57013f5d50 100644
--- a/lib/bundler/environment_preserver.rb
+++ b/lib/bundler/environment_preserver.rb
@@ -2,11 +2,12 @@
module Bundler
class EnvironmentPreserver
- INTENTIONALLY_NIL = "BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL".freeze
+ INTENTIONALLY_NIL = "BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL"
BUNDLER_KEYS = %w[
BUNDLE_BIN_PATH
BUNDLE_GEMFILE
BUNDLER_VERSION
+ BUNDLER_SETUP
GEM_HOME
GEM_PATH
MANPATH
@@ -15,16 +16,43 @@ module Bundler
RUBYLIB
RUBYOPT
].map(&:freeze).freeze
- BUNDLER_PREFIX = "BUNDLER_ORIG_".freeze
+ BUNDLER_PREFIX = "BUNDLER_ORIG_"
- # @param env [ENV]
+ def self.from_env
+ new(env_to_hash(ENV), BUNDLER_KEYS)
+ end
+
+ def self.env_to_hash(env)
+ to_hash = env.to_hash
+ return to_hash unless Gem.win_platform?
+
+ to_hash.each_with_object({}) {|(k,v), a| a[k.upcase] = v }
+ end
+
+ # @param env [Hash]
# @param keys [Array<String>]
def initialize(env, keys)
- @original = env.to_hash
+ @original = env
@keys = keys
@prefix = BUNDLER_PREFIX
end
+ # Replaces `ENV` with the bundler environment variables backed up
+ def replace_with_backup
+ unless Gem.win_platform?
+ ENV.replace(backup)
+ return
+ end
+
+ # Fallback logic for Windows below to workaround
+ # https://bugs.ruby-lang.org/issues/16798. Can be dropped once all
+ # supported rubies include the fix for that.
+
+ ENV.clear
+
+ backup.each {|k, v| ENV[k] = v }
+ end
+
# @return [Hash]
def backup
env = @original.clone
diff --git a/lib/bundler/errors.rb b/lib/bundler/errors.rb
index e471bce0b6..5839fc6a73 100644
--- a/lib/bundler/errors.rb
+++ b/lib/bundler/errors.rb
@@ -21,16 +21,7 @@ module Bundler
class InstallError < BundlerError; status_code(5); end
# Internal error, should be rescued
- class VersionConflict < BundlerError
- attr_reader :conflicts
-
- def initialize(conflicts, msg = nil)
- super(msg)
- @conflicts = conflicts
- end
-
- status_code(6)
- end
+ class SolveFailure < BundlerError; status_code(6); end
class GemNotFound < BundlerError; status_code(7); end
class InstallHookError < BundlerError; status_code(8); end
@@ -41,21 +32,23 @@ module Bundler
class GemspecError < BundlerError; status_code(14); end
class InvalidOption < BundlerError; status_code(15); end
class ProductionError < BundlerError; status_code(16); end
+
class HTTPError < BundlerError
status_code(17)
def filter_uri(uri)
URICredentialsFilter.credential_filtered_uri(uri)
end
end
+
class RubyVersionMismatch < BundlerError; status_code(18); end
class SecurityError < BundlerError; status_code(19); end
class LockfileError < BundlerError; status_code(20); end
class CyclicDependencyError < BundlerError; status_code(21); end
class GemfileLockNotFound < BundlerError; status_code(22); end
class PluginError < BundlerError; status_code(29); end
- class SudoNotPermittedError < BundlerError; status_code(30); end
class ThreadCreationError < BundlerError; status_code(33); end
class APIResponseMismatchError < BundlerError; status_code(34); end
+ class APIResponseInvalidDependenciesError < BundlerError; status_code(35); end
class GemfileEvalError < GemfileError; end
class MarshalError < StandardError; end
@@ -74,10 +67,22 @@ module Bundler
end
end
+ def permission_type
+ case @permission_type
+ when :create
+ "executable permissions for all parent directories and write permissions for `#{parent_folder}`"
+ else
+ "#{@permission_type} permissions for that path"
+ end
+ end
+
+ def parent_folder
+ File.dirname(@path)
+ end
+
def message
"There was an error while trying to #{action} `#{@path}`. " \
- "It is likely that you need to grant #{@permission_type} permissions " \
- "for that path."
+ "It is likely that you need to grant #{permission_type}."
end
status_code(23)
@@ -121,7 +126,7 @@ module Bundler
class VirtualProtocolError < BundlerError
def message
- "There was an error relating to virtualization and file access." \
+ "There was an error relating to virtualization and file access. " \
"It is likely that you need to grant access to or mount some file system correctly."
end
@@ -155,4 +160,16 @@ module Bundler
status_code(32)
end
+
+ class DirectoryRemovalError < BundlerError
+ def initialize(orig_exception, msg)
+ full_message = "#{msg}.\n" \
+ "The underlying error was #{orig_exception.class}: #{orig_exception.message}, with backtrace:\n" \
+ " #{orig_exception.backtrace.join("\n ")}\n\n" \
+ "Bundler Error Backtrace:"
+ super(full_message)
+ end
+
+ status_code(36)
+ end
end
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 01739ec4aa..ab2189f7f0 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -27,27 +27,17 @@ module Bundler
(1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } }
- settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? }
settings_flag(:allow_offline_install) { bundler_3_mode? }
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
- settings_flag(:auto_config_jobs) { bundler_3_mode? }
settings_flag(:cache_all) { bundler_3_mode? }
settings_flag(:default_install_uses_path) { bundler_3_mode? }
- settings_flag(:deployment_means_frozen) { bundler_3_mode? }
- settings_flag(:disable_multisource) { bundler_3_mode? }
settings_flag(:forget_cli_options) { bundler_3_mode? }
settings_flag(:global_gem_cache) { bundler_3_mode? }
- settings_flag(:only_update_to_newer_versions) { bundler_3_mode? }
settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
settings_flag(:print_only_version_number) { bundler_3_mode? }
settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
- settings_flag(:skip_default_git_sources) { bundler_3_mode? }
- settings_flag(:specific_platform) { bundler_3_mode? }
- settings_flag(:suppress_install_using_messages) { bundler_3_mode? }
- settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? }
settings_flag(:update_requires_all_flag) { bundler_4_mode? }
- settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? }
settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index caf33bcfc9..2119799f68 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -20,6 +20,7 @@ module Bundler
class TooManyRequestsError < HTTPError; end
# This error is raised if the API returns a 413 (only printed in verbose)
class FallbackError < HTTPError; end
+
# This is the error raised if OpenSSL fails the cert verification
class CertificateFailureError < HTTPError
def initialize(remote_uri)
@@ -28,28 +29,29 @@ module Bundler
" is a chance you are experiencing a man-in-the-middle attack, but" \
" most likely your system doesn't have the CA certificates needed" \
" for verification. For information about OpenSSL certificates, see" \
- " http://bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile" \
- " sources and change 'https' to 'http'."
+ " https://railsapps.github.io/openssl-certificate-verify-failed.html."
end
end
+
# This is the error raised when a source is HTTPS and OpenSSL didn't load
class SSLError < HTTPError
def initialize(msg = nil)
super msg || "Could not load OpenSSL.\n" \
- "You must recompile Ruby with OpenSSL support or change the sources in your " \
- "Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL " \
- "using RVM are available at rvm.io/packages/openssl."
+ "You must recompile Ruby with OpenSSL support."
end
end
+
# This error is raised if HTTP authentication is required, but not provided.
class AuthenticationRequiredError < HTTPError
def initialize(remote_uri)
remote_uri = filter_uri(remote_uri)
super "Authentication is required for #{remote_uri}.\n" \
"Please supply credentials for this source. You can do this by running:\n" \
- " bundle config set #{remote_uri} username:password"
+ "`bundle config set --global #{remote_uri} username:password`\n" \
+ "or by storing the credentials in the `#{Settings.key_for(remote_uri)}` environment variable"
end
end
+
# This error is raised if HTTP authentication is provided, but incorrect.
class BadAuthenticationError < HTTPError
def initialize(remote_uri)
@@ -59,6 +61,16 @@ module Bundler
end
end
+ # This error is raised if HTTP authentication is correct, but lacks
+ # necessary permissions.
+ class AuthenticationForbiddenError < HTTPError
+ def initialize(remote_uri)
+ remote_uri = filter_uri(remote_uri)
+ super "Access token could not be authenticated for #{remote_uri}.\n" \
+ "Make sure it's valid and has the necessary scopes configured."
+ end
+ end
+
# Exceptions classes that should bypass retry attempts. If your password didn't work the
# first time, it's not going to the third time.
NET_ERRORS = [:HTTPBadGateway, :HTTPBadRequest, :HTTPFailedDependency,
@@ -68,9 +80,9 @@ module Bundler
:HTTPRequestURITooLong, :HTTPUnauthorized, :HTTPUnprocessableEntity,
:HTTPUnsupportedMediaType, :HTTPVersionNotSupported].freeze
FAIL_ERRORS = begin
- fail_errors = [AuthenticationRequiredError, BadAuthenticationError, FallbackError]
- fail_errors << Gem::Requirement::BadRequirementError if defined?(Gem::Requirement::BadRequirementError)
- fail_errors.concat(NET_ERRORS.map {|e| SharedHelpers.const_get_safely(e, Net) }.compact)
+ fail_errors = [AuthenticationRequiredError, BadAuthenticationError, AuthenticationForbiddenError, FallbackError]
+ fail_errors << Gem::Requirement::BadRequirementError
+ fail_errors.concat(NET_ERRORS.map {|e| Net.const_get(e) })
end.freeze
class << self
@@ -100,11 +112,11 @@ module Bundler
uri = Bundler::URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
if uri.scheme == "file"
path = Bundler.rubygems.correct_for_windows_path(uri.path)
- Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(path))
+ Bundler.safe_load_marshal Bundler.rubygems.inflate(Gem.read_binary(path))
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
Bundler.load_gemspec(cached_spec_path)
else
- Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
+ Bundler.safe_load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
end
rescue MarshalError
raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \
@@ -120,7 +132,6 @@ module Bundler
# return the specs in the bundler format as an index
def specs(gem_names, source)
- old = Bundler.rubygems.sources
index = Bundler::Index.new
if Bundler::Fetcher.disable_endpoint
@@ -128,18 +139,15 @@ module Bundler
specs = fetchers.last.specs(gem_names)
else
specs = []
- fetchers.shift until fetchers.first.available? || fetchers.empty?
- fetchers.dup.each do |f|
- break unless f.api_fetcher? && !gem_names || !specs = f.specs(gem_names)
- fetchers.delete(f)
+ @fetchers = fetchers.drop_while do |f|
+ !f.available? || (f.api_fetcher? && !gem_names) || !specs = f.specs(gem_names)
end
@use_api = false if fetchers.none?(&:api_fetcher?)
end
specs.each do |name, version, platform, dependencies, metadata|
- next if name == "bundler"
spec = if dependencies
- EndpointSpecification.new(name, version, platform, dependencies, metadata)
+ EndpointSpecification.new(name, version, platform, self, dependencies, metadata)
else
RemoteSpecification.new(name, version, platform, self)
end
@@ -152,8 +160,6 @@ module Bundler
rescue CertificateFailureError
Bundler.ui.info "" if gem_names && use_api # newline after dots
raise
- ensure
- Bundler.rubygems.sources = old
end
def use_api
@@ -216,7 +222,7 @@ module Bundler
"#<#{self.class}:0x#{object_id} uri=#{uri}>"
end
- private
+ private
FETCHERS = [CompactIndex, Dependency, Index].freeze
@@ -229,6 +235,8 @@ module Bundler
"BUILDBOX" => "buildbox",
"GO_SERVER_URL" => "go",
"SNAP_CI" => "snap",
+ "GITLAB_CI" => "gitlab",
+ "GITHUB_ACTIONS" => "github",
"CI_NAME" => ENV["CI_NAME"],
"CI" => "ci",
}
@@ -238,12 +246,12 @@ module Bundler
def connection
@connection ||= begin
needs_ssl = remote_uri.scheme == "https" ||
- Bundler.settings[:ssl_verify_mode] ||
- Bundler.settings[:ssl_client_cert]
+ Bundler.settings[:ssl_verify_mode] ||
+ Bundler.settings[:ssl_client_cert]
raise SSLError if needs_ssl && !defined?(OpenSSL::SSL)
con = PersistentHTTP.new :name => "bundler", :proxy => :ENV
- if gem_proxy = Bundler.rubygems.configuration[:http_proxy]
+ if gem_proxy = Gem.configuration[:http_proxy]
con.proxy = Bundler::URI.parse(gem_proxy) if gem_proxy != :no_proxy
end
@@ -254,8 +262,8 @@ module Bundler
end
ssl_client_cert = Bundler.settings[:ssl_client_cert] ||
- (Bundler.rubygems.configuration.ssl_client_cert if
- Bundler.rubygems.configuration.respond_to?(:ssl_client_cert))
+ (Gem.configuration.ssl_client_cert if
+ Gem.configuration.respond_to?(:ssl_client_cert))
if ssl_client_cert
pem = File.read(ssl_client_cert)
con.cert = OpenSSL::X509::Certificate.new(pem)
@@ -273,8 +281,7 @@ module Bundler
# cached gem specification path, if one exists
def gemspec_cached_path(spec_file_name)
paths = Bundler.rubygems.spec_cache_dirs.map {|dir| File.join(dir, spec_file_name) }
- paths = paths.select {|path| File.file? path }
- paths.first
+ paths.find {|path| File.file? path }
end
HTTP_ERRORS = [
@@ -287,8 +294,8 @@ module Bundler
def bundler_cert_store
store = OpenSSL::X509::Store.new
ssl_ca_cert = Bundler.settings[:ssl_ca_cert] ||
- (Bundler.rubygems.configuration.ssl_ca_cert if
- Bundler.rubygems.configuration.respond_to?(:ssl_ca_cert))
+ (Gem.configuration.ssl_ca_cert if
+ Gem.configuration.respond_to?(:ssl_ca_cert))
if ssl_ca_cert
if File.directory? ssl_ca_cert
store.add_path ssl_ca_cert
@@ -302,8 +309,6 @@ module Bundler
store
end
- private
-
def remote_uri
@remote.uri
end
diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb
index 27987f670a..62cc75add8 100644
--- a/lib/bundler/fetcher/base.rb
+++ b/lib/bundler/fetcher/base.rb
@@ -19,14 +19,12 @@ module Bundler
end
def fetch_uri
- @fetch_uri ||= begin
- if remote_uri.host == "rubygems.org"
- uri = remote_uri.dup
- uri.host = "index.rubygems.org"
- uri
- else
- remote_uri
- end
+ @fetch_uri ||= if remote_uri.host == "rubygems.org"
+ uri = remote_uri.dup
+ uri.host = "index.rubygems.org"
+ uri
+ else
+ remote_uri
end
end
@@ -38,7 +36,7 @@ module Bundler
false
end
- private
+ private
def log_specs(debug_msg)
if Bundler.ui.debug?
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index f36d76d4ae..8d30dec471 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -12,17 +12,15 @@ module Bundler
method = instance_method(method_name)
undef_method(method_name)
define_method(method_name) do |*args, &blk|
- begin
- method.bind(self).call(*args, &blk)
- rescue NetworkDownError, CompactIndexClient::Updater::MisMatchedChecksumError => e
- raise HTTPError, e.message
- rescue AuthenticationRequiredError
- # Fail since we got a 401 from the server.
- raise
- rescue HTTPError => e
- Bundler.ui.trace(e)
- nil
- end
+ method.bind(self).call(*args, &blk)
+ rescue NetworkDownError, CompactIndexClient::Updater::MisMatchedChecksumError => e
+ raise HTTPError, e.message
+ rescue AuthenticationRequiredError, BadAuthenticationError
+ # Fail since we got a 401 from the server.
+ raise
+ rescue HTTPError => e
+ Bundler.ui.trace(e)
+ nil
end
end
@@ -42,7 +40,7 @@ module Bundler
deps = begin
parallel_compact_index_client.dependencies(remaining_gems)
rescue TooManyRequestsError
- @bundle_worker.stop if @bundle_worker
+ @bundle_worker&.stop
@bundle_worker = nil # reset it. Not sure if necessary
serial_compact_index_client.dependencies(remaining_gems)
end
@@ -51,28 +49,23 @@ module Bundler
complete_gems.concat(deps.map(&:first)).uniq!
remaining_gems = next_gems - complete_gems
end
- @bundle_worker.stop if @bundle_worker
+ @bundle_worker&.stop
@bundle_worker = nil # reset it. Not sure if necessary
gem_info
end
- def fetch_spec(spec)
- spec -= [nil, "ruby", ""]
- contents = compact_index_client.spec(*spec)
- return nil if contents.nil?
- contents.unshift(spec.first)
- contents[3].map! {|d| Gem::Dependency.new(*d) }
- EndpointSpecification.new(*contents)
- end
- compact_index_request :fetch_spec
-
def available?
- return nil unless SharedHelpers.md5_available?
- user_home = Bundler.user_home
- return nil unless user_home.directory? && user_home.writable?
+ unless SharedHelpers.md5_available?
+ Bundler.ui.debug("FIPS mode is enabled, bundler can't use the CompactIndex API")
+ return nil
+ end
+ if fetch_uri.scheme == "file"
+ Bundler.ui.debug("Using a local server, bundler won't use the CompactIndex API")
+ return false
+ end
# Read info file checksums out of /versions, so we can know if gems are up to date
- fetch_uri.scheme != "file" && compact_index_client.update_and_parse_checksums!
+ compact_index_client.update_and_parse_checksums!
rescue CompactIndexClient::Updater::MisMatchedChecksumError => e
Bundler.ui.debug(e.message)
nil
@@ -83,7 +76,7 @@ module Bundler
true
end
- private
+ private
def compact_index_client
@compact_index_client ||=
@@ -111,7 +104,7 @@ module Bundler
def bundle_worker(func = nil)
@bundle_worker ||= begin
worker_name = "Compact Index (#{display_uri.host})"
- Bundler::Worker.new(Bundler.current_ruby.rbx? ? 1 : 25, worker_name, func)
+ Bundler::Worker.new(Bundler.settings.processor_count, worker_name, func)
end
@bundle_worker.tap do |worker|
worker.instance_variable_set(:@func, func) if func
diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb
index c52c32fb5b..18b606abb6 100644
--- a/lib/bundler/fetcher/dependency.rb
+++ b/lib/bundler/fetcher/dependency.rb
@@ -34,14 +34,10 @@ module Bundler
returned_gems = spec_list.map(&:first).uniq
specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
- rescue MarshalError
+ rescue MarshalError, HTTPError, GemspecError
Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
Bundler.ui.debug "could not fetch from the dependency API, trying the full index"
nil
- rescue HTTPError, GemspecError
- Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
- Bundler.ui.debug "could not fetch from the dependency API\nit's suggested to retry using the full index via `bundle install --full-index`"
- nil
end
def dependency_specs(gem_names)
@@ -55,7 +51,7 @@ module Bundler
gem_list = []
gem_names.each_slice(Source::Rubygems::API_REQUEST_SIZE) do |names|
marshalled_deps = downloader.fetch(dependency_api_uri(names)).body
- gem_list.concat(Bundler.load_marshal(marshalled_deps))
+ gem_list.concat(Bundler.safe_load_marshal(marshalled_deps))
end
gem_list
end
diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb
index 498852c174..3062899e0e 100644
--- a/lib/bundler/fetcher/downloader.rb
+++ b/lib/bundler/fetcher/downloader.rb
@@ -14,8 +14,10 @@ module Bundler
def fetch(uri, headers = {}, counter = 0)
raise HTTPError, "Too many redirects" if counter >= redirect_limit
+ filtered_uri = URICredentialsFilter.credential_filtered_uri(uri)
+
response = request(uri, headers)
- Bundler.ui.debug("HTTP #{response.code} #{response.message} #{uri}")
+ Bundler.ui.debug("HTTP #{response.code} #{response.message} #{filtered_uri}")
case response
when Net::HTTPSuccess, Net::HTTPNotModified
@@ -39,8 +41,10 @@ module Bundler
when Net::HTTPUnauthorized
raise BadAuthenticationError, uri.host if uri.userinfo
raise AuthenticationRequiredError, uri.host
+ when Net::HTTPForbidden
+ raise AuthenticationForbiddenError, uri.host
when Net::HTTPNotFound
- raise FallbackError, "Net::HTTPNotFound: #{URICredentialsFilter.credential_filtered_uri(uri)}"
+ raise FallbackError, "Net::HTTPNotFound: #{filtered_uri}"
else
raise HTTPError, "#{response.class}#{": #{response.body}" unless response.body.empty?}"
end
@@ -49,7 +53,9 @@ module Bundler
def request(uri, headers)
validate_uri_scheme!(uri)
- Bundler.ui.debug "HTTP GET #{uri}"
+ filtered_uri = URICredentialsFilter.credential_filtered_uri(uri)
+
+ Bundler.ui.debug "HTTP GET #{filtered_uri}"
req = Net::HTTP::Get.new uri.request_uri, headers
if uri.user
user = CGI.unescape(uri.user)
@@ -57,27 +63,23 @@ module Bundler
req.basic_auth(user, password)
end
connection.request(uri, req)
- rescue NoMethodError => e
- raise unless ["undefined method", "use_ssl="].all? {|snippet| e.message.include? snippet }
- raise LoadError.new("cannot load such file -- openssl")
rescue OpenSSL::SSL::SSLError
raise CertificateFailureError.new(uri)
rescue *HTTP_ERRORS => e
Bundler.ui.trace e
- case e.message
- when /host down:/, /getaddrinfo: nodename nor servname provided/
+ if e.is_a?(SocketError) || e.message.to_s.include?("host down:")
raise NetworkDownError, "Could not reach host #{uri.host}. Check your network " \
"connection and try again."
else
- raise HTTPError, "Network error while fetching #{URICredentialsFilter.credential_filtered_uri(uri)}" \
+ raise HTTPError, "Network error while fetching #{filtered_uri}" \
" (#{e})"
end
end
- private
+ private
def validate_uri_scheme!(uri)
- return if uri.scheme =~ /\Ahttps?\z/
+ return if /\Ahttps?\z/.match?(uri.scheme)
raise InvalidOption,
"The request uri `#{uri}` has an invalid scheme (`#{uri.scheme}`). " \
"Did you mean `http` or `https`?"
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index 034a225198..c623647f01 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -1,14 +1,13 @@
# frozen_string_literal: true
require_relative "base"
-require "rubygems/remote_fetcher"
module Bundler
class Fetcher
class Index < Base
def specs(_gem_names)
Bundler.rubygems.fetch_all_remote_specs(remote)
- rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError, Net::HTTPFatalError => e
+ rescue Gem::RemoteFetcher::FetchError => e
case e.message
when /certificate verify failed/
raise CertificateFailureError.new(display_uri)
@@ -16,38 +15,10 @@ module Bundler
raise BadAuthenticationError, remote_uri if remote_uri.userinfo
raise AuthenticationRequiredError, remote_uri
when /403/
- raise BadAuthenticationError, remote_uri if remote_uri.userinfo
- raise AuthenticationRequiredError, remote_uri
- else
- Bundler.ui.trace e
- raise HTTPError, "Could not fetch specs from #{display_uri}"
- end
- end
-
- def fetch_spec(spec)
- spec -= [nil, "ruby", ""]
- spec_file_name = "#{spec.join "-"}.gemspec"
-
- uri = Bundler::URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
- if uri.scheme == "file"
- path = Bundler.rubygems.correct_for_windows_path(uri.path)
- Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(path))
- elsif cached_spec_path = gemspec_cached_path(spec_file_name)
- Bundler.load_gemspec(cached_spec_path)
+ raise AuthenticationForbiddenError, remote_uri
else
- Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
+ raise HTTPError, "Could not fetch specs from #{display_uri} due to underlying error <#{e.message}>"
end
- rescue MarshalError
- raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \
- "Your network or your gem server is probably having issues right now."
- end
-
- private
-
- # cached gem specification path, if one exists
- def gemspec_cached_path(spec_file_name)
- paths = Bundler.rubygems.spec_cache_dirs.map {|dir| File.join(dir, spec_file_name) }
- paths.find {|path| File.file? path }
end
end
end
diff --git a/lib/bundler/force_platform.rb b/lib/bundler/force_platform.rb
new file mode 100644
index 0000000000..249a24ecd1
--- /dev/null
+++ b/lib/bundler/force_platform.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Bundler
+ module ForcePlatform
+ private
+
+ # The `:force_ruby_platform` value used by dependencies for resolution, and
+ # by locked specifications for materialization is `false` by default, except
+ # for TruffleRuby. TruffleRuby generally needs to force the RUBY platform
+ # variant unless the name is explicitly allowlisted.
+
+ def default_force_ruby_platform
+ return false unless RUBY_ENGINE == "truffleruby"
+
+ !Gem::Platform::REUSE_AS_BINARY_ON_TRUFFLERUBY.include?(name)
+ end
+ end
+end
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 080697b02c..39afe8a071 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -4,7 +4,19 @@ require_relative "vendored_thor"
module Bundler
module FriendlyErrors
- module_function
+ module_function
+
+ def enable!
+ @disabled = false
+ end
+
+ def disabled?
+ @disabled
+ end
+
+ def disable!
+ @disabled = true
+ end
def log_error(error)
case error
@@ -17,19 +29,13 @@ module Bundler
Bundler.ui.error error.message
Bundler.ui.trace error.orig_exception
when BundlerError
- Bundler.ui.error error.message, :wrap => true
- Bundler.ui.trace error
+ if Bundler.ui.debug?
+ Bundler.ui.trace error
+ else
+ Bundler.ui.error error.message, :wrap => true
+ end
when Thor::Error
Bundler.ui.error error.message
- when LoadError
- raise error unless error.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
- Bundler.ui.error "\nCould not load OpenSSL."
- Bundler.ui.warn <<-WARN, :wrap => true
- You must recompile Ruby with OpenSSL support or change the sources in your \
- Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL \
- using RVM are available at https://rvm.io/packages/openssl.
- WARN
- Bundler.ui.trace error
when Interrupt
Bundler.ui.error "\nQuitting..."
Bundler.ui.trace error
@@ -43,8 +49,6 @@ module Bundler
"Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)."
else request_issue_report_for(error)
end
- rescue StandardError
- raise error
end
def exit_status(error)
@@ -57,40 +61,11 @@ module Bundler
end
def request_issue_report_for(e)
- Bundler.ui.info <<-EOS.gsub(/^ {8}/, "")
+ Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, nil
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- # Error Report
-
- ## Questions
-
- Please fill out answers to these questions, it'll help us figure out
- why things are going wrong.
-
- - **What did you do?**
-
- I ran the command `#{$PROGRAM_NAME} #{ARGV.join(" ")}`
-
- - **What did you expect to happen?**
-
- I expected Bundler to...
-
- - **What happened instead?**
-
- Instead, what happened was...
-
- - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?**
-
- I tried...
-
- - **Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?**
-
- ...
-
- ## Backtrace
```
- #{e.class}: #{e.message}
- #{e.backtrace && e.backtrace.join("\n ").chomp}
+ #{exception_message(e)}
```
#{Bundler::Env.report}
@@ -100,13 +75,27 @@ module Bundler
Bundler.ui.error "Unfortunately, an unexpected error occurred, and Bundler cannot continue."
- Bundler.ui.warn <<-EOS.gsub(/^ {8}/, "")
+ Bundler.ui.error <<-EOS.gsub(/^ {8}/, ""), nil, :yellow
First, try this link to see if there are any existing issue reports for this error:
#{issues_url(e)}
- If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
- https://github.com/bundler/bundler/issues/new
+ If there aren't any reports for this error yet, please fill in the new issue form located at #{new_issue_url}, and copy and paste the report template above in there.
+ EOS
+ end
+
+ def exception_message(error)
+ message = serialized_exception_for(error)
+ cause = error.cause
+ return message unless cause
+
+ message + serialized_exception_for(cause)
+ end
+
+ def serialized_exception_for(e)
+ <<-EOS.gsub(/^ {8}/, "")
+ #{e.class}: #{e.message}
+ #{e.backtrace&.join("\n ")&.chomp}
EOS
end
@@ -114,16 +103,23 @@ module Bundler
message = exception.message.lines.first.tr(":", " ").chomp
message = message.split("-").first if exception.is_a?(Errno)
require "cgi"
- "https://github.com/bundler/bundler/search?q=" \
+ "https://github.com/rubygems/rubygems/search?q=" \
"#{CGI.escape(message)}&type=Issues"
end
+
+ def new_issue_url
+ "https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
+ end
end
def self.with_friendly_errors
+ FriendlyErrors.enable!
yield
rescue SignalException
raise
rescue Exception => e # rubocop:disable Lint/RescueException
+ raise if FriendlyErrors.disabled?
+
FriendlyErrors.log_error(e)
exit FriendlyErrors.exit_status(e)
end
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 7d4e382be8..dcf759cded 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -15,21 +15,28 @@ module Bundler
new(opts[:dir], opts[:name]).install
end
+ def tag_prefix=(prefix)
+ instance.tag_prefix = prefix
+ end
+
def gemspec(&block)
gemspec = instance.gemspec
- block.call(gemspec) if block
+ block&.call(gemspec)
gemspec
end
end
attr_reader :spec_path, :base, :gemspec
+ attr_writer :tag_prefix
+
def initialize(base = nil, name = nil)
- @base = (base ||= SharedHelpers.pwd)
- gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "{,*}.gemspec")]
+ @base = File.expand_path(base || SharedHelpers.pwd)
+ gemspecs = name ? [File.join(@base, "#{name}.gemspec")] : Gem::Util.glob_files_in_dir("{,*}.gemspec", @base)
raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
@spec_path = gemspecs.first
@gemspec = Bundler.load_gemspec(@spec_path)
+ @tag_prefix = ""
end
def install
@@ -40,6 +47,11 @@ module Bundler
built_gem_path = build_gem
end
+ desc "Generate SHA512 checksum if #{name}-#{version}.gem into the checksums directory."
+ task "build:checksum" => "build" do
+ build_checksum(built_gem_path)
+ end
+
desc "Build and install #{name}-#{version}.gem into system gems."
task "install" => "build" do
install_gem(built_gem_path)
@@ -64,7 +76,7 @@ module Bundler
tag_version { git_push(args[:remote]) } unless already_tagged?
end
- task "release:rubygem_push" do
+ task "release:rubygem_push" => "build" do
rubygem_push(built_gem_path) if gem_push?
end
@@ -73,7 +85,7 @@ module Bundler
def build_gem
file_name = nil
- sh("#{gem_command} build -V #{spec_path}".shellsplit) do
+ sh([*gem_command, "build", "-V", spec_path]) do
file_name = File.basename(built_gem_path)
SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) }
FileUtils.mv(built_gem_path, "pkg")
@@ -84,36 +96,54 @@ module Bundler
def install_gem(built_gem_path = nil, local = false)
built_gem_path ||= build_gem
- cmd = "#{gem_command} install #{built_gem_path}"
- cmd += " --local" if local
- _, status = sh_with_status(cmd.shellsplit)
- unless status.success?
- raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output"
- end
+ cmd = [*gem_command, "install", built_gem_path.to_s]
+ cmd << "--local" if local
+ sh(cmd)
Bundler.ui.confirm "#{name} (#{version}) installed."
end
- protected
+ def build_checksum(built_gem_path = nil)
+ built_gem_path ||= build_gem
+ SharedHelpers.filesystem_access(File.join(base, "checksums")) {|p| FileUtils.mkdir_p(p) }
+ file_name = "#{File.basename(built_gem_path)}.sha512"
+ require "digest/sha2"
+ checksum = ::Digest::SHA512.file(built_gem_path).hexdigest
+ target = File.join(base, "checksums", file_name)
+ File.write(target, checksum + "\n")
+ Bundler.ui.confirm "#{name} #{version} checksum written to checksums/#{file_name}."
+ end
+
+ protected
def rubygem_push(path)
- cmd = %W[#{gem_command} push #{path}]
+ cmd = [*gem_command, "push", path]
cmd << "--key" << gem_key if gem_key
cmd << "--host" << allowed_push_host if allowed_push_host
- unless allowed_push_host || Bundler.user_home.join(".gem/credentials").file?
- raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
- end
sh_with_input(cmd)
Bundler.ui.confirm "Pushed #{name} #{version} to #{gem_push_host}"
end
def built_gem_path
- Dir[File.join(base, "#{name}-*.gem")].sort_by {|f| File.mtime(f) }.last
+ Gem::Util.glob_files_in_dir("#{name}-*.gem", base).sort_by {|f| File.mtime(f) }.last
end
- def git_push(remote = "")
- perform_git_push remote
- perform_git_push "#{remote} --tags"
- Bundler.ui.confirm "Pushed git commits and tags."
+ def git_push(remote = nil)
+ remote ||= default_remote
+ sh("git push #{remote} refs/heads/#{current_branch}".shellsplit)
+ sh("git push #{remote} refs/tags/#{version_tag}".shellsplit)
+ Bundler.ui.confirm "Pushed git commits and release tag."
+ end
+
+ def default_remote
+ remote_for_branch, status = sh_with_status(%W[git config --get branch.#{current_branch}.remote])
+ return "origin" unless status.success?
+
+ remote_for_branch.strip
+ end
+
+ def current_branch
+ # We can replace this with `git branch --show-current` once we drop support for git < 2.22.0
+ sh(%w[git rev-parse --abbrev-ref HEAD]).gsub(%r{\Aheads/}, "").strip
end
def allowed_push_host
@@ -122,20 +152,11 @@ module Bundler
def gem_push_host
env_rubygems_host = ENV["RUBYGEMS_HOST"]
- env_rubygems_host = nil if
- env_rubygems_host && env_rubygems_host.empty?
+ env_rubygems_host = nil if env_rubygems_host&.empty?
allowed_push_host || env_rubygems_host || "rubygems.org"
end
- def perform_git_push(options = "")
- cmd = "git push #{options}"
- out, status = sh_with_status(cmd)
- return if status.success?
- cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
- raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n"
- end
-
def already_tagged?
return false unless sh(%w[git tag]).split(/\n/).include?(version_tag)
Bundler.ui.confirm "Tag #{version_tag} has already been created."
@@ -169,7 +190,7 @@ module Bundler
end
def version_tag
- "v#{version}"
+ "#{@tag_prefix}v#{version}"
end
def name
@@ -186,8 +207,7 @@ module Bundler
def sh(cmd, &block)
out, status = sh_with_status(cmd, &block)
unless status.success?
- cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin)
- raise(out.empty? ? "Running `#{cmd}` failed. Run this command directly for more detailed output." : out)
+ raise("Running `#{cmd.shelljoin}` failed with the following output:\n\n#{out}\n")
end
out
end
@@ -197,7 +217,7 @@ module Bundler
SharedHelpers.chdir(base) do
outbuf = IO.popen(cmd, :err => [:child, :out], &:read)
status = $?
- block.call(outbuf) if status.success? && block
+ block&.call(outbuf) if status.success?
[outbuf, status]
end
end
@@ -211,7 +231,7 @@ module Bundler
end
def gem_command
- ENV["GEM_COMMAND"] ? ENV["GEM_COMMAND"] : "gem"
+ ENV["GEM_COMMAND"]&.shellsplit || ["gem"]
end
end
end
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index be047f4397..2e6d788f9c 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -10,6 +10,7 @@ module Bundler
[Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
[Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw32")],
[Gem::Platform.new("x86_64-mingw32"), Gem::Platform.new("x64-mingw32")],
+ [Gem::Platform.new("x64-mingw-ucrt"), Gem::Platform.new("x64-mingw-ucrt")],
[Gem::Platform.new("mingw32"), Gem::Platform.new("x86-mingw32")],
].freeze
@@ -24,46 +25,49 @@ module Bundler
module_function :generic
def generic_local_platform
- generic(Bundler.local_platform)
+ generic(local_platform)
end
module_function :generic_local_platform
+ def local_platform
+ Bundler.local_platform
+ end
+ module_function :local_platform
+
def platform_specificity_match(spec_platform, user_platform)
spec_platform = Gem::Platform.new(spec_platform)
- return PlatformMatch::EXACT_MATCH if spec_platform == user_platform
- return PlatformMatch::WORST_MATCH if spec_platform.nil? || spec_platform == Gem::Platform::RUBY || user_platform == Gem::Platform::RUBY
-
- PlatformMatch.new(
- PlatformMatch.os_match(spec_platform, user_platform),
- PlatformMatch.cpu_match(spec_platform, user_platform),
- PlatformMatch.platform_version_match(spec_platform, user_platform)
- )
+
+ PlatformMatch.specificity_score(spec_platform, user_platform)
end
module_function :platform_specificity_match
def select_best_platform_match(specs, platform)
- specs.select {|spec| spec.match_platform(platform) }.
- min_by {|spec| platform_specificity_match(spec.platform, platform) }
+ matching = specs.select {|spec| spec.match_platform(platform) }
+
+ sort_best_platform_match(matching, platform)
end
module_function :select_best_platform_match
- PlatformMatch = Struct.new(:os_match, :cpu_match, :platform_version_match)
- class PlatformMatch
- def <=>(other)
- return nil unless other.is_a?(PlatformMatch)
+ def sort_best_platform_match(matching, platform)
+ exact = matching.select {|spec| spec.platform == platform }
+ return exact if exact.any?
- m = os_match <=> other.os_match
- return m unless m.zero?
+ sorted_matching = matching.sort_by {|spec| platform_specificity_match(spec.platform, platform) }
+ exemplary_spec = sorted_matching.first
- m = cpu_match <=> other.cpu_match
- return m unless m.zero?
+ sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
+ end
+ module_function :sort_best_platform_match
- m = platform_version_match <=> other.platform_version_match
- m
- end
+ class PlatformMatch
+ def self.specificity_score(spec_platform, user_platform)
+ return -1 if spec_platform == user_platform
+ return 1_000_000 if spec_platform.nil? || spec_platform == Gem::Platform::RUBY || user_platform == Gem::Platform::RUBY
- EXACT_MATCH = new(-1, -1, -1).freeze
- WORST_MATCH = new(1_000_000, 1_000_000, 1_000_000).freeze
+ os_match(spec_platform, user_platform) +
+ cpu_match(spec_platform, user_platform) * 10 +
+ platform_version_match(spec_platform, user_platform) * 100
+ end
def self.os_match(spec_platform, user_platform)
if spec_platform.os == user_platform.os
@@ -95,5 +99,19 @@ module Bundler
end
end
end
+
+ def same_specificity(platform, spec, exemplary_spec)
+ platform_specificity_match(spec.platform, platform) == platform_specificity_match(exemplary_spec.platform, platform)
+ end
+ module_function :same_specificity
+
+ def same_deps(spec, exemplary_spec)
+ same_runtime_deps = spec.dependencies.sort == exemplary_spec.dependencies.sort
+ return same_runtime_deps unless spec.is_a?(Gem::Specification) && exemplary_spec.is_a?(Gem::Specification)
+
+ same_metadata_deps = spec.required_ruby_version == exemplary_spec.required_ruby_version && spec.required_rubygems_version == exemplary_spec.required_rubygems_version
+ same_runtime_deps && same_metadata_deps
+ end
+ module_function :same_deps
end
end
diff --git a/lib/bundler/gem_remote_fetcher.rb b/lib/bundler/gem_remote_fetcher.rb
deleted file mode 100644
index 9577535d63..0000000000
--- a/lib/bundler/gem_remote_fetcher.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require "rubygems/remote_fetcher"
-
-module Bundler
- # Adds support for setting custom HTTP headers when fetching gems from the
- # server.
- #
- # TODO: Get rid of this when and if gemstash only supports RubyGems versions
- # that contain https://github.com/rubygems/rubygems/commit/3db265cc20b2f813.
- class GemRemoteFetcher < Gem::RemoteFetcher
- attr_accessor :headers
-
- # Extracted from RubyGems 2.4.
- def fetch_http(uri, last_modified = nil, head = false, depth = 0)
- fetch_type = head ? Net::HTTP::Head : Net::HTTP::Get
- # beginning of change
- response = request uri, fetch_type, last_modified do |req|
- headers.each {|k, v| req.add_field(k, v) } if headers
- end
- # end of change
-
- case response
- when Net::HTTPOK, Net::HTTPNotModified then
- response.uri = uri if response.respond_to? :uri
- head ? response : response.body
- when Net::HTTPMovedPermanently, Net::HTTPFound, Net::HTTPSeeOther,
- Net::HTTPTemporaryRedirect then
- raise FetchError.new("too many redirects", uri) if depth > 10
-
- location = URI.parse response["Location"]
-
- if https?(uri) && !https?(location)
- raise FetchError.new("redirecting to non-https resource: #{location}", uri)
- end
-
- fetch_http(location, last_modified, head, depth + 1)
- else
- raise FetchError.new("bad response #{response.message} #{response.code}", uri)
- end
- end
- end
-end
diff --git a/lib/bundler/gem_version_promoter.rb b/lib/bundler/gem_version_promoter.rb
index 311b0cbbf3..d281f46eeb 100644
--- a/lib/bundler/gem_version_promoter.rb
+++ b/lib/bundler/gem_version_promoter.rb
@@ -7,14 +7,13 @@ module Bundler
# available dependency versions as found in its index, before returning it to
# to the resolution engine to select the best version.
class GemVersionPromoter
- DEBUG = ENV["DEBUG_RESOLVER"]
-
- attr_reader :level, :locked_specs, :unlock_gems
+ attr_reader :level
+ attr_accessor :pre
# By default, strict is false, meaning every available version of a gem
# is returned from sort_versions. The order gives preference to the
# requested level (:patch, :minor, :major) but in complicated requirement
- # cases some gems will by necessity by promoted past the requested level,
+ # cases some gems will by necessity be promoted past the requested level,
# or even reverted to older versions.
#
# If strict is set to true, the results from sort_versions will be
@@ -24,24 +23,13 @@ module Bundler
# existing in the referenced source.
attr_accessor :strict
- attr_accessor :prerelease_specified
-
- # Given a list of locked_specs and a list of gems to unlock creates a
- # GemVersionPromoter instance.
+ # Creates a GemVersionPromoter instance.
#
- # @param locked_specs [SpecSet] All current locked specs. Unlike Definition
- # where this list is empty if all gems are being updated, this should
- # always be populated for all gems so this class can properly function.
- # @param unlock_gems [String] List of gem names being unlocked. If empty,
- # all gems will be considered unlocked.
# @return [GemVersionPromoter]
- def initialize(locked_specs = SpecSet.new([]), unlock_gems = [])
+ def initialize
@level = :major
@strict = false
- @locked_specs = locked_specs
- @unlock_gems = unlock_gems
- @sort_versions = {}
- @prerelease_specified = {}
+ @pre = false
end
# @param value [Symbol] One of three Symbols: :major, :minor or :patch.
@@ -55,37 +43,19 @@ module Bundler
@level = v
end
- # Given a Dependency and an Array of SpecGroups of available versions for a
- # gem, this method will return the Array of SpecGroups sorted (and possibly
- # truncated if strict is true) in an order to give preference to the current
- # level (:major, :minor or :patch) when resolution is deciding what versions
- # best resolve all dependencies in the bundle.
- # @param dep [Dependency] The Dependency of the gem.
- # @param spec_groups [SpecGroup] An array of SpecGroups for the same gem
- # named in the @dep param.
- # @return [SpecGroup] A new instance of the SpecGroup Array sorted and
+ # Given a Resolver::Package and an Array of Specifications of available
+ # versions for a gem, this method will return the Array of Specifications
+ # sorted (and possibly truncated if strict is true) in an order to give
+ # preference to the current level (:major, :minor or :patch) when resolution
+ # is deciding what versions best resolve all dependencies in the bundle.
+ # @param package [Resolver::Package] The package being resolved.
+ # @param specs [Specification] An array of Specifications for the package.
+ # @return [Specification] A new instance of the Specification Array sorted and
# possibly filtered.
- def sort_versions(dep, spec_groups)
- before_result = "before sort_versions: #{debug_format_result(dep, spec_groups).inspect}" if DEBUG
-
- @sort_versions[dep] ||= begin
- gem_name = dep.name
+ def sort_versions(package, specs)
+ specs = filter_dep_specs(specs, package) if strict
- # An Array per version returned, different entries for different platforms.
- # We only need the version here so it's ok to hard code this to the first instance.
- locked_spec = locked_specs[gem_name].first
-
- if strict
- filter_dep_specs(spec_groups, locked_spec)
- else
- sort_dep_specs(spec_groups, locked_spec)
- end.tap do |specs|
- if DEBUG
- warn before_result
- warn " after sort_versions: #{debug_format_result(dep, specs).inspect}"
- end
- end
- end
+ sort_dep_specs(specs, package)
end
# @return [bool] Convenience method for testing value of level variable.
@@ -98,80 +68,72 @@ module Bundler
level == :minor
end
- private
+ # @return [bool] Convenience method for testing value of pre variable.
+ def pre?
+ pre == true
+ end
- def filter_dep_specs(spec_groups, locked_spec)
- res = spec_groups.select do |spec_group|
- if locked_spec && !major?
- gsv = spec_group.version
- lsv = locked_spec.version
+ private
- must_match = minor? ? [0] : [0, 1]
+ def filter_dep_specs(specs, package)
+ locked_version = package.locked_version
+ return specs if locked_version.nil? || major?
- matches = must_match.map {|idx| gsv.segments[idx] == lsv.segments[idx] }
- matches.uniq == [true] ? (gsv >= lsv) : false
- else
- true
- end
- end
+ specs.select do |spec|
+ gsv = spec.version
- sort_dep_specs(res, locked_spec)
- end
+ must_match = minor? ? [0] : [0, 1]
- def sort_dep_specs(spec_groups, locked_spec)
- return spec_groups unless locked_spec
- @gem_name = locked_spec.name
- @locked_version = locked_spec.version
+ all_match = must_match.all? {|idx| gsv.segments[idx] == locked_version.segments[idx] }
+ all_match && gsv >= locked_version
+ end
+ end
- result = spec_groups.sort do |a, b|
- @a_ver = a.version
- @b_ver = b.version
+ def sort_dep_specs(specs, package)
+ locked_version = package.locked_version
- unless @prerelease_specified[@gem_name]
- a_pre = @a_ver.prerelease?
- b_pre = @b_ver.prerelease?
+ result = specs.sort do |a, b|
+ unless package.prerelease_specified? || pre?
+ a_pre = a.prerelease?
+ b_pre = b.prerelease?
next -1 if a_pre && !b_pre
next 1 if b_pre && !a_pre
end
if major?
- @a_ver <=> @b_ver
- elsif either_version_older_than_locked
- @a_ver <=> @b_ver
- elsif segments_do_not_match(:major)
- @b_ver <=> @a_ver
- elsif !minor? && segments_do_not_match(:minor)
- @b_ver <=> @a_ver
+ a <=> b
+ elsif either_version_older_than_locked?(a, b, locked_version)
+ a <=> b
+ elsif segments_do_not_match?(a, b, :major)
+ b <=> a
+ elsif !minor? && segments_do_not_match?(a, b, :minor)
+ b <=> a
else
- @a_ver <=> @b_ver
+ a <=> b
end
end
- post_sort(result)
+ post_sort(result, package.unlock?, locked_version)
end
- def either_version_older_than_locked
- @a_ver < @locked_version || @b_ver < @locked_version
+ def either_version_older_than_locked?(a, b, locked_version)
+ locked_version && (a.version < locked_version || b.version < locked_version)
end
- def segments_do_not_match(level)
+ def segments_do_not_match?(a, b, level)
index = [:major, :minor].index(level)
- @a_ver.segments[index] != @b_ver.segments[index]
- end
-
- def unlocking_gem?
- unlock_gems.empty? || unlock_gems.include?(@gem_name)
+ a.segments[index] != b.segments[index]
end
# Specific version moves can't always reliably be done during sorting
# as not all elements are compared against each other.
- def post_sort(result)
+ def post_sort(result, unlock, locked_version)
# default :major behavior in Bundler does not do this
return result if major?
- if unlocking_gem?
+ if unlock || locked_version.nil?
result
else
- move_version_to_end(result, @locked_version)
+ move_version_to_end(result, locked_version)
end
end
@@ -179,12 +141,5 @@ module Bundler
move, keep = result.partition {|s| s.version.to_s == version.to_s }
keep.concat(move)
end
-
- def debug_format_result(dep, spec_groups)
- a = [dep.to_s,
- spec_groups.map {|sg| [sg.version, sg.dependencies_for_activated_platforms.map {|dp| [dp.name, dp.requirement.to_s] }] }]
- last_map = a.last.map {|sg_data| [sg_data.first.version, sg_data.last.map {|aa| aa.join(" ") }] }
- [a.first, last_map, level, strict ? :strict : :not_strict]
- end
end
end
diff --git a/lib/bundler/gemdeps.rb b/lib/bundler/gemdeps.rb
deleted file mode 100644
index cd4b25d0e6..0000000000
--- a/lib/bundler/gemdeps.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler
- class Gemdeps
- def initialize(runtime)
- @runtime = runtime
- end
-
- def requested_specs
- @runtime.requested_specs
- end
-
- def specs
- @runtime.specs
- end
-
- def dependencies
- @runtime.dependencies
- end
-
- def current_dependencies
- @runtime.current_dependencies
- end
-
- def requires
- @runtime.requires
- end
- end
-end
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 5644e41079..3c008e63e3 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -27,7 +27,7 @@ module Bundler
GraphVizClient.new(self).run
end
- private
+ private
def _populate_relations
parent_dependencies = _groups.values.to_set.flatten
@@ -114,10 +114,10 @@ module Bundler
@groups.each do |group|
g.add_nodes(
group, {
- :style => "filled",
+ :style => "filled",
:fillcolor => "#B9B9D5",
- :shape => "box3d",
- :fontsize => 16,
+ :shape => "box3d",
+ :fontsize => 16,
}.merge(@node_options[group])
)
end
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 9166a92738..b8c599f63a 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require "set"
-
module Bundler
class Index
include Enumerable
@@ -15,8 +13,8 @@ module Bundler
attr_reader :specs, :all_specs, :sources
protected :specs, :all_specs
- RUBY = "ruby".freeze
- NULL = "\0".freeze
+ RUBY = "ruby"
+ NULL = "\0"
def initialize
@sources = []
@@ -58,42 +56,21 @@ module Bundler
# Search this index's specs, and any source indexes that this index knows
# about, returning all of the results.
- def search(query, base = nil)
- sort_specs(unsorted_search(query, base))
- end
-
- def unsorted_search(query, base)
- results = local_search(query, base)
-
- seen = results.map(&:full_name).to_set unless @sources.empty?
+ def search(query)
+ results = local_search(query)
+ return results unless @sources.any?
@sources.each do |source|
- source.unsorted_search(query, base).each do |spec|
- results << spec if seen.add?(spec.full_name)
- end
- end
-
- results
- end
- protected :unsorted_search
-
- def self.sort_specs(specs)
- specs.sort_by do |s|
- platform_string = s.platform.to_s
- [s.version, platform_string == RUBY ? NULL : platform_string]
+ results.concat(source.search(query))
end
+ results.uniq(&:full_name)
end
- def sort_specs(specs)
- self.class.sort_specs(specs)
- end
-
- def local_search(query, base = nil)
+ def local_search(query)
case query
when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
when String then specs_by_name(query)
- when Gem::Dependency then search_by_dependency(query, base)
- when DepProxy then search_by_dependency(query.dep, base)
+ when Array then specs_by_name_and_version(*query)
else
raise "You can't search for a #{query.inspect}."
end
@@ -121,10 +98,9 @@ module Bundler
names
end
- # returns a list of the dependencies
def unmet_dependency_names
dependency_names.select do |name|
- name != "bundler" && search(name).empty?
+ search(name).empty?
end
end
@@ -170,7 +146,7 @@ module Bundler
def dependencies_eql?(spec, other_spec)
deps = spec.dependencies.select {|d| d.type != :development }
other_deps = other_spec.dependencies.select {|d| d.type != :development }
- Set.new(deps) == Set.new(other_deps)
+ deps.sort == other_deps.sort
end
def add_source(index)
@@ -179,28 +155,14 @@ module Bundler
@sources.uniq! # need to use uniq! here instead of checking for the item before adding
end
- private
+ private
- def specs_by_name(name)
- @specs[name].values
+ def specs_by_name_and_version(name, version)
+ specs_by_name(name).select {|spec| spec.version == version }
end
- def search_by_dependency(dependency, base = nil)
- @cache[base || false] ||= {}
- @cache[base || false][dependency] ||= begin
- specs = specs_by_name(dependency.name)
- specs += base if base
- found = specs.select do |spec|
- next true if spec.source.is_a?(Source::Gemspec)
- if base # allow all platforms when searching from a lockfile
- dependency.matches_spec?(spec)
- else
- dependency.matches_spec?(spec) && Gem::Platform.match(spec.platform)
- end
- end
-
- found
- end
+ def specs_by_name(name)
+ @specs[name].values
end
EMPTY_SEARCH = [].freeze
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb
index 2cdda578e2..cb644a7f69 100644
--- a/lib/bundler/injector.rb
+++ b/lib/bundler/injector.rb
@@ -2,7 +2,7 @@
module Bundler
class Injector
- INJECTED_GEMS = "injected gems".freeze
+ INJECTED_GEMS = "injected gems"
def self.inject(new_deps, options = {})
injector = new(new_deps, options)
@@ -70,11 +70,15 @@ module Bundler
show_warning("No gems were removed from the gemfile.") if deps.empty?
- deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep, false)} was removed." }
+ deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep)} was removed." }
end
+
+ # Invalidate the cached Bundler.definition.
+ # This prevents e.g. `bundle remove ...` from using outdated information.
+ Bundler.reset_paths!
end
- private
+ private
def conservative_version(spec)
version = spec.version
@@ -111,10 +115,14 @@ module Bundler
end
source = ", :source => \"#{d.source}\"" unless d.source.nil?
+ path = ", :path => \"#{d.path}\"" unless d.path.nil?
git = ", :git => \"#{d.git}\"" unless d.git.nil?
+ github = ", :github => \"#{d.github}\"" unless d.github.nil?
branch = ", :branch => \"#{d.branch}\"" unless d.branch.nil?
+ ref = ", :ref => \"#{d.ref}\"" unless d.ref.nil?
+ require_path = ", :require => #{convert_autorequire(d.autorequire)}" unless d.autorequire.nil?
- %(gem #{name}#{requirement}#{group}#{source}#{git}#{branch})
+ %(gem #{name}#{requirement}#{group}#{source}#{path}#{git}#{github}#{branch}#{ref}#{require_path})
end.join("\n")
end
@@ -128,7 +136,7 @@ module Bundler
# evaluates a gemfile to remove the specified gem
# from it.
def remove_deps(gemfile_path)
- initial_gemfile = IO.readlines(gemfile_path)
+ initial_gemfile = File.readlines(gemfile_path)
Bundler.ui.info "Removing gems from #{gemfile_path}"
@@ -179,11 +187,22 @@ module Bundler
# @param [Pathname] gemfile_path The Gemfile from which to remove dependencies.
def remove_gems_from_gemfile(gems, gemfile_path)
patterns = /gem\s+(['"])#{Regexp.union(gems)}\1|gem\s*\((['"])#{Regexp.union(gems)}\2\)/
+ new_gemfile = []
+ multiline_removal = false
+ File.readlines(gemfile_path).each do |line|
+ match_data = line.match(patterns)
+ if match_data && is_not_within_comment?(line, match_data)
+ multiline_removal = line.rstrip.end_with?(",")
+ # skip lines which match the regex
+ next
+ end
- # remove lines which match the regex
- new_gemfile = IO.readlines(gemfile_path).reject {|line| line.match(patterns) }
+ # skip followup lines until line does not end with ','
+ new_gemfile << line unless multiline_removal
+ multiline_removal = line.rstrip.end_with?(",") if multiline_removal
+ end
- # remove lone \n and append them with other strings
+ # remove line \n and append them with other strings
new_gemfile.each_with_index do |_line, index|
if new_gemfile[index + 1] == "\n"
new_gemfile[index] += new_gemfile[index + 1]
@@ -196,6 +215,13 @@ module Bundler
new_gemfile.join.chomp
end
+ # @param [String] line Individual line of gemfile content.
+ # @param [MatchData] match_data Data about Regex match.
+ def is_not_within_comment?(line, match_data)
+ match_start_index = match_data.offset(0).first
+ !line[0..match_start_index].include?("#")
+ end
+
# @param [Array] gemfile Array of gemfile contents.
# @param [String] block_name Name of block name to look for.
def remove_nested_blocks(gemfile, block_name)
@@ -209,7 +235,7 @@ module Bundler
gemfile.each_with_index do |line, index|
next unless !line.nil? && line.strip.start_with?(block_name)
- if gemfile[index + 1] =~ /^\s*end\s*$/
+ if /^\s*end\s*$/.match?(gemfile[index + 1])
gemfile[index] = nil
gemfile[index + 1] = nil
end
@@ -251,5 +277,11 @@ module Bundler
def show_warning(message)
Bundler.ui.info Bundler.ui.add_color(message, :yellow)
end
+
+ def convert_autorequire(autorequire)
+ autorequire = autorequire.first
+ return autorequire if autorequire == "false"
+ autorequire.inspect
+ end
end
end
diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index 5b2ddb7db6..5c184f67a1 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -31,34 +31,30 @@
#
def gemfile(install = false, options = {}, &gemfile)
require_relative "../bundler"
+ Bundler.reset!
opts = options.dup
ui = opts.delete(:ui) { Bundler::UI::Shell.new }
- ui.level = "silent" if opts.delete(:quiet)
+ ui.level = "silent" if opts.delete(:quiet) || !install
+ Bundler.ui = ui
raise ArgumentError, "Unknown options: #{opts.keys.join(", ")}" unless opts.empty?
- begin
- old_root = Bundler.method(:root)
- bundler_module = class << Bundler; self; end
- bundler_module.send(:remove_method, :root)
- def Bundler.root
- Bundler::SharedHelpers.pwd.expand_path
- end
- old_gemfile = ENV["BUNDLE_GEMFILE"]
+ Bundler.with_unbundled_env do
+ Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", "Gemfile"
Bundler::Plugin.gemfile_install(&gemfile) if Bundler.feature_flag.plugins?
builder = Bundler::Dsl.new
builder.instance_eval(&gemfile)
+ builder.check_primary_source_safety
- Bundler.settings.temporary(:frozen => false) do
+ Bundler.settings.temporary(:deployment => false, :frozen => false) do
definition = builder.to_definition(nil, true)
def definition.lock(*); end
definition.validate_runtime!
- Bundler.ui = install ? ui : Bundler::UI::Silent.new
if install || definition.missing_specs?
- Bundler.settings.temporary(:inline => true, :disable_platform_warnings => true) do
+ Bundler.settings.temporary(:inline => true, :no_install => false) do
installer = Bundler::Installer.install(Bundler.root, definition, :system => true)
installer.post_install_messages.each do |name, message|
Bundler.ui.info "Post-install message from #{name}:\n#{message}"
@@ -69,16 +65,9 @@ def gemfile(install = false, options = {}, &gemfile)
runtime = Bundler::Runtime.new(nil, definition)
runtime.setup.require
end
- ensure
- if bundler_module
- bundler_module.send(:remove_method, :root)
- bundler_module.send(:define_method, :root, old_root)
- end
+ end
- if old_gemfile
- ENV["BUNDLE_GEMFILE"] = old_gemfile
- else
- ENV.delete("BUNDLE_GEMFILE")
- end
+ if ENV["BUNDLE_GEMFILE"].nil?
+ ENV["BUNDLE_GEMFILE"] = ""
end
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 700f0a4737..59b6a6ad22 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require "erb"
-require "rubygems/dependency_installer"
require_relative "worker"
require_relative "installer/parallel_installer"
require_relative "installer/standalone"
@@ -15,7 +13,7 @@ module Bundler
Installer.ambiguous_gems = []
end
- attr_reader :post_install_messages
+ attr_reader :post_install_messages, :definition
# Begins the installation process for Bundler.
# For more information see the #run method on this class.
@@ -68,7 +66,7 @@ module Bundler
# require paths and save them in a `setup.rb` file. See `bundle standalone --help` for more
# information.
def run(options)
- create_bundle_path
+ Bundler.create_bundle_path
ProcessLock.lock do
if Bundler.frozen_bundle?
@@ -83,7 +81,6 @@ module Bundler
if resolve_if_needed(options)
ensure_specs_are_compatible!
- warn_on_incompatible_bundler_deps
load_plugins
options.delete(:jobs)
else
@@ -91,7 +88,9 @@ module Bundler
end
install(options)
- lock unless Bundler.frozen_bundle?
+ Gem::Specification.reset # invalidate gem specification cache so that installed gems are immediately available
+
+ lock
Standalone.new(options[:standalone], @definition).generate if options[:standalone]
end
end
@@ -120,7 +119,7 @@ module Bundler
relative_gemfile_path = relative_gemfile_path
ruby_command = Thor::Util.ruby_command
ruby_command = ruby_command
- template_path = File.expand_path("../templates/Executable", __FILE__)
+ template_path = File.expand_path("templates/Executable", __dir__)
if spec.name == "bundler"
template_path += ".bundler"
spec.executables = %(bundle)
@@ -135,12 +134,14 @@ module Bundler
next
end
- File.open(binstub_path, "w", 0o777 & ~File.umask) do |f|
- if RUBY_VERSION >= "2.6"
- f.puts ERB.new(template, :trim_mode => "-").result(binding)
- else
- f.puts ERB.new(template, nil, "-").result(binding)
- end
+ mode = Gem.win_platform? ? "wb:UTF-8" : "w"
+ require "erb"
+ content = ERB.new(template, :trim_mode => "-").result(binding)
+
+ File.write(binstub_path, content, :mode => mode, :perm => 0o777 & ~File.umask)
+ if Gem.win_platform? || options[:all_platforms]
+ prefix = "@ruby -x \"%~f0\" %*\n@exit /b %ERRORLEVEL%\n\n"
+ File.write("#{binstub_path}.cmd", prefix + content, :mode => mode)
end
end
@@ -159,7 +160,7 @@ module Bundler
end
end
- def generate_standalone_bundler_executable_stubs(spec)
+ def generate_standalone_bundler_executable_stubs(spec, options = {})
# double-assignment to avoid warnings about variables that will be used by ERB
bin_path = Bundler.bin_path
unless path = Bundler.settings[:path]
@@ -167,7 +168,7 @@ module Bundler
end
standalone_path = Bundler.root.join(path).relative_path_from(bin_path)
standalone_path = standalone_path
- template = File.read(File.expand_path("../templates/Executable.standalone", __FILE__))
+ template = File.read(File.expand_path("templates/Executable.standalone", __dir__))
ruby_command = Thor::Util.ruby_command
ruby_command = ruby_command
@@ -175,17 +176,20 @@ module Bundler
next if executable == "bundle"
executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
executable_path = executable_path
- File.open "#{bin_path}/#{executable}", "w", 0o755 do |f|
- if RUBY_VERSION >= "2.6"
- f.puts ERB.new(template, :trim_mode => "-").result(binding)
- else
- f.puts ERB.new(template, nil, "-").result(binding)
- end
+
+ mode = Gem.win_platform? ? "wb:UTF-8" : "w"
+ require "erb"
+ content = ERB.new(template, :trim_mode => "-").result(binding)
+
+ File.write("#{bin_path}/#{executable}", content, :mode => mode, :perm => 0o755)
+ if Gem.win_platform? || options[:all_platforms]
+ prefix = "@ruby -x \"%~f0\" %*\n@exit /b %ERRORLEVEL%\n\n"
+ File.write("#{bin_path}/#{executable}.cmd", prefix + content, :mode => mode)
end
end
end
- private
+ private
# the order that the resolver provides is significant, since
# dependencies might affect the installation of a gem.
@@ -202,27 +206,11 @@ module Bundler
return jobs
end
- return 1 unless can_install_in_parallel?
-
- auto_config_jobs = Bundler.feature_flag.auto_config_jobs?
if jobs = Bundler.settings[:jobs]
- if auto_config_jobs
- jobs
- else
- [jobs.pred, 1].max
- end
- elsif auto_config_jobs
- processor_count
- else
- 1
+ return jobs
end
- end
- def processor_count
- require "etc"
- Etc.nprocessors
- rescue StandardError
- 1
+ Bundler.settings.processor_count
end
def load_plugins
@@ -230,54 +218,28 @@ module Bundler
requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
path_plugin_files = requested_path_gems.map do |spec|
- begin
- Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
- rescue TypeError
- error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
- raise Gem::InvalidSpecificationException, error_message
- end
+ Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
+ rescue TypeError
+ error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
+ raise Gem::InvalidSpecificationException, error_message
end.flatten
Bundler.rubygems.load_plugin_files(path_plugin_files)
+ Bundler.rubygems.load_env_plugins
end
def ensure_specs_are_compatible!
- system_ruby = Bundler::RubyVersion.system
- rubygems_version = Gem::Version.create(Gem::VERSION)
@definition.specs.each do |spec|
- if required_ruby_version = spec.required_ruby_version
- unless required_ruby_version.satisfied_by?(system_ruby.gem_version)
- raise InstallError, "#{spec.full_name} requires ruby version #{required_ruby_version}, " \
- "which is incompatible with the current version, #{system_ruby}"
- end
- end
- next unless required_rubygems_version = spec.required_rubygems_version
- unless required_rubygems_version.satisfied_by?(rubygems_version)
- raise InstallError, "#{spec.full_name} requires rubygems version #{required_rubygems_version}, " \
- "which is incompatible with the current version, #{rubygems_version}"
+ unless spec.matches_current_ruby?
+ raise InstallError, "#{spec.full_name} requires ruby version #{spec.required_ruby_version}, " \
+ "which is incompatible with the current version, #{Gem.ruby_version}"
end
- end
- end
-
- def warn_on_incompatible_bundler_deps
- bundler_version = Gem::Version.create(Bundler::VERSION)
- @definition.specs.each do |spec|
- spec.dependencies.each do |dep|
- next if dep.type == :development
- next unless dep.name == "bundler".freeze
- next if dep.requirement.satisfied_by?(bundler_version)
-
- Bundler.ui.warn "#{spec.name} (#{spec.version}) has dependency" \
- " #{SharedHelpers.pretty_dependency(dep)}" \
- ", which is unsatisfied by the current bundler version #{VERSION}" \
- ", so the dependency is being ignored"
+ unless spec.matches_current_rubygems?
+ raise InstallError, "#{spec.full_name} requires rubygems version #{spec.required_rubygems_version}, " \
+ "which is incompatible with the current version, #{Gem.rubygems_version}"
end
end
end
- def can_install_in_parallel?
- true
- end
-
def install_in_parallel(size, standalone, force = false)
spec_installations = ParallelInstaller.call(self, @definition.specs, size, standalone, force)
spec_installations.each do |installation|
@@ -285,22 +247,16 @@ module Bundler
end
end
- def create_bundle_path
- SharedHelpers.filesystem_access(Bundler.bundle_path.to_s) do |p|
- Bundler.mkdir_p(p)
- end unless Bundler.bundle_path.exist?
- rescue Errno::EEXIST
- raise PathError, "Could not install to path `#{Bundler.bundle_path}` " \
- "because a file already exists at that path. Either remove or rename the file so the directory can be created."
- end
-
# returns whether or not a re-resolve was needed
def resolve_if_needed(options)
- if !@definition.unlocking? && !options["force"] && !options["all-platforms"] && !Bundler.settings[:inline] && Bundler.default_lockfile.file?
+ @definition.resolution_mode = options
+
+ if !@definition.unlocking? && !options["force"] && !Bundler.settings[:inline] && Bundler.default_lockfile.file?
return false if @definition.nothing_changed? && !@definition.missing_specs?
end
- options["local"] ? @definition.resolve_with_cache! : @definition.resolve_remotely!
+ @definition.setup_sources_for_resolve
+
true
end
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index 9689911d6c..9a013eea4d 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require "shellwords"
-
module Bundler
class GemInstaller
attr_reader :spec, :standalone, :worker, :force, :installer
@@ -15,61 +13,58 @@ module Bundler
end
def install_from_spec
- post_install_message = spec_settings ? install_with_settings : install
+ post_install_message = install
Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
generate_executable_stubs
return true, post_install_message
- rescue Bundler::InstallHookError, Bundler::SecurityError, APIResponseMismatchError
+ rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError
raise
rescue Errno::ENOSPC
return false, out_of_space_message
- rescue StandardError => e
+ rescue Bundler::BundlerError, Gem::InstallError, Bundler::APIResponseInvalidDependenciesError => e
return false, specific_failure_message(e)
end
- private
+ private
def specific_failure_message(e)
message = "#{e.class}: #{e.message}\n"
- message += " " + e.backtrace.join("\n ") + "\n\n" if Bundler.ui.debug?
+ message += " " + e.backtrace.join("\n ") + "\n\n"
message = message.lines.first + Bundler.ui.add_color(message.lines.drop(1).join, :clear)
message + Bundler.ui.add_color(failure_message, :red)
end
def failure_message
- return install_error_message if spec.source.options["git"]
- "#{install_error_message}\n#{gem_install_message}"
+ install_error_message
end
def install_error_message
"An error occurred while installing #{spec.name} (#{spec.version}), and Bundler cannot continue."
end
- def gem_install_message
- source = spec.source
- return unless source.respond_to?(:remotes)
-
- if source.remotes.size == 1
- "Make sure that `gem install #{spec.name} -v '#{spec.version}' --source '#{source.remotes.first}'` succeeds before bundling."
- else
- "Make sure that `gem install #{spec.name} -v '#{spec.version}'` succeeds before bundling."
- end
- end
-
def spec_settings
# Fetch the build settings, if there are any
if settings = Bundler.settings["build.#{spec.name}"]
+ require "shellwords"
Shellwords.shellsplit(settings)
end
end
def install
- spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings))
+ spec.source.install(
+ spec,
+ :force => force,
+ :ensure_builtin_gems_cached => standalone,
+ :build_args => Array(spec_settings),
+ :previous_spec => previous_spec,
+ )
end
- def install_with_settings
- # Build arguments are global, so this is mutexed
- Bundler.rubygems.install_with_build_args([spec_settings]) { install }
+ def previous_spec
+ locked_gems = installer.definition.locked_gems
+ return unless locked_gems
+
+ locked_gems.specs.find {|s| s.name == spec.name }
end
def out_of_space_message
diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb
index 391540af0b..83a381f592 100644
--- a/lib/bundler/installer/parallel_installer.rb
+++ b/lib/bundler/installer/parallel_installer.rb
@@ -6,10 +6,11 @@ require_relative "gem_installer"
module Bundler
class ParallelInstaller
class SpecInstallation
- attr_accessor :spec, :name, :post_install_message, :state, :error
+ attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error
def initialize(spec)
@spec = spec
@name = spec.name
+ @full_name = spec.full_name
@state = :none
@post_install_message = ""
@error = nil
@@ -27,13 +28,8 @@ module Bundler
state == :failed
end
- def installation_attempted?
- installed? || failed?
- end
-
- # Only true when spec in neither installed nor already enqueued
def ready_to_enqueue?
- !enqueued? && !installation_attempted?
+ state == :none
end
def has_post_install_message?
@@ -54,14 +50,7 @@ module Bundler
# Represents only the non-development dependencies, the ones that are
# itself and are in the total list.
def dependencies
- @dependencies ||= begin
- all_dependencies.reject {|dep| ignorable_dependency? dep }
- end
- end
-
- def missing_lockfile_dependencies(all_spec_names)
- deps = all_dependencies.reject {|dep| ignorable_dependency? dep }
- deps.reject {|dep| all_spec_names.include? dep.name }
+ @dependencies ||= all_dependencies.reject {|dep| ignorable_dependency? dep }
end
# Represents all dependencies
@@ -70,7 +59,7 @@ module Bundler
end
def to_s
- "#<#{self.class} #{@spec.full_name} (#{state})>"
+ "#<#{self.class} #{full_name} (#{state})>"
end
end
@@ -91,7 +80,10 @@ module Bundler
end
def call
- check_for_corrupt_lockfile
+ if @rake
+ do_install(@rake, 0)
+ Gem::Specification.reset
+ end
if @size > 1
install_with_worker
@@ -99,38 +91,43 @@ module Bundler
install_serially
end
- handle_error if @specs.any?(&:failed?)
+ check_for_unmet_dependencies
+
+ handle_error if failed_specs.any?
@specs
ensure
- worker_pool && worker_pool.stop
+ worker_pool&.stop
end
- def check_for_corrupt_lockfile
- missing_dependencies = @specs.map do |s|
+ def check_for_unmet_dependencies
+ unmet_dependencies = @specs.map do |s|
[
s,
- s.missing_lockfile_dependencies(@specs.map(&:name)),
+ s.dependencies.reject {|dep| @specs.any? {|spec| dep.matches_spec?(spec.spec) } },
]
end.reject {|a| a.last.empty? }
- return if missing_dependencies.empty?
+ return if unmet_dependencies.empty?
warning = []
- warning << "Your lockfile was created by an old Bundler that left some things out."
- if @size != 1
- warning << "Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing #{@size} at a time."
- @size = 1
- end
- warning << "You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile."
- warning << "The missing gems are:"
-
- missing_dependencies.each do |spec, missing|
- warning << "* #{missing.map(&:name).join(", ")} depended upon by #{spec.name}"
+ warning << "Your lockfile doesn't include a valid resolution."
+ warning << "You can fix this by regenerating your lockfile or manually editing the bad locked gems to a version that satisfies all dependencies."
+ warning << "The unmet dependencies are:"
+
+ unmet_dependencies.each do |spec, unmet_spec_dependencies|
+ unmet_spec_dependencies.each do |unmet_spec_dependency|
+ found = @specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }
+ warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}"
+ end
end
Bundler.ui.warn(warning.join("\n"))
end
- private
+ private
+
+ def failed_specs
+ @specs.select(&:failed?)
+ end
def install_with_worker
enqueue_specs
@@ -156,17 +153,13 @@ module Bundler
gem_installer = Bundler::GemInstaller.new(
spec_install.spec, @installer, @standalone, worker_num, @force
)
- success, message = begin
- gem_installer.install_from_spec
- rescue RuntimeError => e
- raise e, "#{e}\n\n#{require_tree_for_spec(spec_install.spec)}"
- end
+ success, message = gem_installer.install_from_spec
if success
spec_install.state = :installed
spec_install.post_install_message = message unless message.nil?
else
- spec_install.state = :failed
spec_install.error = "#{message}\n\n#{require_tree_for_spec(spec_install.spec)}"
+ spec_install.state = :failed
end
Plugin.hook(Plugin::Events::GEM_AFTER_INSTALL, spec_install)
spec_install
@@ -190,11 +183,11 @@ module Bundler
end
def handle_error
- errors = @specs.select(&:failed?).map(&:error)
+ errors = failed_specs.map(&:error)
if exception = errors.find {|e| e.is_a?(Bundler::BundlerError) }
raise exception
end
- raise Bundler::InstallError, errors.map(&:to_s).join("\n\n")
+ raise Bundler::InstallError, errors.join("\n\n")
end
def require_tree_for_spec(spec)
@@ -217,8 +210,6 @@ module Bundler
# are installed.
def enqueue_specs
@specs.select(&:ready_to_enqueue?).each do |spec|
- next if @rake && !@rake.installed? && spec.name != @rake.name
-
if spec.dependencies_installed? @specs
spec.state = :enqueued
worker_pool.enq spec
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index e1beb25ad1..2a8c9a432d 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -3,7 +3,7 @@
module Bundler
class Standalone
def initialize(groups, definition)
- @specs = groups.empty? ? definition.requested_specs : definition.specs_for(groups.map(&:to_sym))
+ @specs = definition.specs_for(groups)
end
def generate
@@ -12,41 +12,92 @@ module Bundler
end
File.open File.join(bundler_path, "setup.rb"), "w" do |file|
file.puts "require 'rbconfig'"
- file.puts "ruby_engine = RUBY_ENGINE"
- file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
- file.puts "path = File.expand_path('..', __FILE__)"
+ file.puts define_path_helpers
+ file.puts reverse_rubygems_kernel_mixin
paths.each do |path|
- file.puts %($:.unshift "\#{path}/#{path}")
+ if Pathname.new(path).absolute?
+ file.puts %($:.unshift "#{path}")
+ else
+ file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}"))
+ end
end
end
end
- private
+ private
def paths
@specs.map do |spec|
next if spec.name == "bundler"
Array(spec.require_paths).map do |path|
- gem_path(path, spec).sub(version_dir, '#{ruby_engine}/#{ruby_version}')
+ gem_path(path, spec).
+ sub(version_dir, '#{RUBY_ENGINE}/#{Gem.ruby_api_version}').
+ sub(extensions_dir, 'extensions/\k<platform>/#{Gem.extension_api_version}')
# This is a static string intentionally. It's interpolated at a later time.
end
- end.flatten
+ end.flatten.compact
end
def version_dir
- "#{Bundler::RubyVersion.system.engine}/#{RbConfig::CONFIG["ruby_version"]}"
+ "#{RUBY_ENGINE}/#{Gem.ruby_api_version}"
+ end
+
+ def extensions_dir
+ %r{extensions/(?<platform>[^/]+)/#{Regexp.escape(Gem.extension_api_version)}}
end
def bundler_path
- Bundler.root.join(Bundler.settings[:path], "bundler")
+ Bundler.root.join(Bundler.settings[:path].to_s, "bundler")
end
def gem_path(path, spec)
full_path = Pathname.new(path).absolute? ? path : File.join(spec.full_gem_path, path)
- Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
+ if spec.source.instance_of?(Source::Path) && spec.source.path.absolute?
+ full_path
+ else
+ Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s
+ end
rescue TypeError
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
raise Gem::InvalidSpecificationException.new(error_message)
end
+
+ def define_path_helpers
+ <<~'END'
+ unless defined?(Gem)
+ module Gem
+ def self.ruby_api_version
+ RbConfig::CONFIG["ruby_version"]
+ end
+
+ def self.extension_api_version
+ if 'no' == RbConfig::CONFIG['ENABLE_SHARED']
+ "#{ruby_api_version}-static"
+ else
+ ruby_api_version
+ end
+ end
+ end
+ end
+ END
+ end
+
+ def reverse_rubygems_kernel_mixin
+ <<~END
+ if Gem.respond_to?(:discover_gems_on_require=)
+ Gem.discover_gems_on_require = false
+ else
+ kernel = (class << ::Kernel; self; end)
+ [kernel, ::Kernel].each do |k|
+ if k.private_method_defined?(:gem_original_require)
+ private_require = k.private_method_defined?(:require)
+ k.send(:remove_method, :require)
+ k.send(:define_method, :require, k.instance_method(:gem_original_require))
+ k.send(:private, :require) if private_require
+ end
+ end
+ end
+ END
+ end
end
end
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 32c8bb9557..c9b161dc0e 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -1,29 +1,14 @@
# frozen_string_literal: true
-require_relative "match_platform"
+require_relative "force_platform"
module Bundler
class LazySpecification
- Identifier = Struct.new(:name, :version, :source, :platform, :dependencies)
- class Identifier
- include Comparable
- def <=>(other)
- return unless other.is_a?(Identifier)
- [name, version, platform_string] <=> [other.name, other.version, other.platform_string]
- end
-
- protected
-
- def platform_string
- platform_string = platform.to_s
- platform_string == Index::RUBY ? Index::NULL : platform_string
- end
- end
-
include MatchPlatform
+ include ForcePlatform
attr_reader :name, :version, :dependencies, :platform
- attr_accessor :source, :remote
+ attr_accessor :source, :remote, :force_ruby_platform
def initialize(name, version, platform, source = nil)
@name = name
@@ -31,11 +16,11 @@ module Bundler
@dependencies = []
@platform = platform || Gem::Platform::RUBY
@source = source
- @specification = nil
+ @force_ruby_platform = default_force_ruby_platform
end
def full_name
- if platform == Gem::Platform::RUBY || platform.nil?
+ @full_name ||= if platform == Gem::Platform::RUBY
"#{@name}-#{@version}"
else
"#{@name}-#{@version}-#{platform}"
@@ -43,17 +28,41 @@ module Bundler
end
def ==(other)
- identifier == other.identifier
+ full_name == other.full_name
end
+ def eql?(other)
+ full_name.eql?(other.full_name)
+ end
+
+ def hash
+ full_name.hash
+ end
+
+ ##
+ # Does this locked specification satisfy +dependency+?
+ #
+ # NOTE: Rubygems default requirement is ">= 0", which doesn't match
+ # prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
+ # bundler users expect those to work. We need to make sure that Gemfile
+ # dependencies without explicit requirements (which use ">= 0" under the
+ # hood by default) are still valid for locked specs using this kind of
+ # versions. The method implements an ad-hoc fix for that. A better solution
+ # might be to change default rubygems requirement of dependencies to be ">=
+ # 0.A" but that's a major refactoring likely to break things. Hopefully we
+ # can attempt it in the future.
+ #
+
def satisfies?(dependency)
- @name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
+ effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(">= 0.A") : dependency.requirement
+
+ @name == dependency.name && effective_requirement.satisfied_by?(Gem::Version.new(@version))
end
def to_lock
out = String.new
- if platform == Gem::Platform::RUBY || platform.nil?
+ if platform == Gem::Platform::RUBY
out << " #{name} (#{version})\n"
else
out << " #{name} (#{version}-#{platform})\n"
@@ -67,56 +76,84 @@ module Bundler
out
end
- def __materialize__
- search_object = Bundler.feature_flag.specific_platform? || Bundler.settings[:force_ruby_platform] ? self : Dependency.new(name, version)
- @specification = if source.is_a?(Source::Gemspec) && source.gemspec.name == name
- source.gemspec.tap {|s| s.source = source }
+ def materialize_for_installation
+ source.local!
+
+ matching_specs = source.specs.search(use_exact_resolved_specifications? ? self : [name, version])
+ return self if matching_specs.empty?
+
+ candidates = if use_exact_resolved_specifications?
+ matching_specs
else
- search = source.specs.search(search_object).last
- if search && Gem::Platform.new(search.platform) != Gem::Platform.new(platform) && !search.runtime_dependencies.-(dependencies.reject {|d| d.type == :development }).empty?
- Bundler.ui.warn "Unable to use the platform-specific (#{search.platform}) version of #{name} (#{version}) " \
- "because it has different dependencies from the #{platform} version. " \
- "To use the platform-specific version of the gem, run `bundle config set specific_platform true` and install again."
- search = source.specs.search(self).last
+ target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
+
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, target_platform)
+
+ specification = __materialize__(installable_candidates, :fallback_to_non_installable => false)
+ return specification unless specification.nil?
+
+ if target_platform != platform
+ installable_candidates = GemHelpers.select_best_platform_match(matching_specs, platform)
end
- search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
- search
+
+ installable_candidates
end
+
+ __materialize__(candidates)
end
- def respond_to?(*args)
- super || @specification ? @specification.respond_to?(*args) : nil
+ # If in frozen mode, we fallback to a non-installable candidate because by
+ # doing this we avoid re-resolving and potentially end up changing the
+ # lock file, which is not allowed. In that case, we will give a proper error
+ # about the mismatch higher up the stack, right before trying to install the
+ # bad gem.
+ def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bundle?)
+ search = candidates.reverse.find do |spec|
+ spec.is_a?(StubSpecification) ||
+ (spec.matches_current_ruby? &&
+ spec.matches_current_rubygems?)
+ end
+ if search.nil? && fallback_to_non_installable
+ search = candidates.last
+ else
+ search.dependencies = dependencies if search && search.full_name == full_name && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
+ end
+ search
end
def to_s
- @__to_s ||= if platform == Gem::Platform::RUBY || platform.nil?
+ @to_s ||= if platform == Gem::Platform::RUBY
"#{name} (#{version})"
else
"#{name} (#{version}-#{platform})"
end
end
- def identifier
- @__identifier ||= Identifier.new(name, version, source, platform, dependencies)
- end
-
def git_version
return unless source.is_a?(Bundler::Source::Git)
" #{source.revision[0..6]}"
end
- private
+ private
- def to_ary
- nil
+ def use_exact_resolved_specifications?
+ @use_exact_resolved_specifications ||= !source.is_a?(Source::Path) && ruby_platform_materializes_to_ruby_platform?
end
- def method_missing(method, *args, &blk)
- raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
-
- return super unless respond_to?(method)
-
- @specification.send(method, *args, &blk)
+ #
+ # For backwards compatibility with existing lockfiles, if the most specific
+ # locked platform is not a specific platform like x86_64-linux or
+ # universal-java-11, then we keep the previous behaviour of resolving the
+ # best platform variant at materiliazation time. For previous bundler
+ # versions (before 2.2.0) this was always the case (except when the lockfile
+ # only included non-ruby platforms), but we're also keeping this behaviour
+ # on newer bundlers unless users generate the lockfile from scratch or
+ # explicitly add a more specific platform.
+ #
+ def ruby_platform_materializes_to_ruby_platform?
+ generic_platform = generic_local_platform == Gem::Platform::JAVA ? Gem::Platform::JAVA : Gem::Platform::RUBY
+
+ !Bundler.most_specific_locked_platform?(generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
end
end
end
diff --git a/lib/bundler/lockfile_generator.rb b/lib/bundler/lockfile_generator.rb
index 585077d18d..f7ba51b3e6 100644
--- a/lib/bundler/lockfile_generator.rb
+++ b/lib/bundler/lockfile_generator.rb
@@ -25,7 +25,7 @@ module Bundler
out
end
- private
+ private
def add_sources
definition.send(:sources).lock_sources.each_with_index do |source, idx|
@@ -45,7 +45,7 @@ module Bundler
# gems with the same name, but different platform
# are ordered consistently
specs.sort_by(&:full_name).each do |spec|
- next if spec.name == "bundler".freeze
+ next if spec.name == "bundler"
out << spec.to_lock
end
end
@@ -60,7 +60,7 @@ module Bundler
handled = []
definition.dependencies.sort_by(&:to_s).each do |dep|
next if handled.include?(dep.name)
- out << dep.to_lock
+ out << dep.to_lock << "\n"
handled << dep.name
end
end
@@ -71,7 +71,7 @@ module Bundler
end
def add_bundled_with
- add_section("BUNDLED WITH", definition.locked_bundler_version.to_s)
+ add_section("BUNDLED WITH", definition.bundler_version_to_lock.to_s)
end
def add_section(name, value)
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index caabd524d4..7360a36752 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -1,29 +1,18 @@
# frozen_string_literal: true
-#--
-# Some versions of the Bundler 1.1 RC series introduced corrupted
-# lockfiles. There were two major problems:
-#
-# * multiple copies of the same GIT section appeared in the lockfile
-# * when this happened, those sections got multiple copies of gems
-# in those sections.
-#
-# As a result, Bundler 1.1 contains code that fixes the earlier
-# corruption. We will remove this fix-up code in Bundler 1.2.
-
module Bundler
class LockfileParser
attr_reader :sources, :dependencies, :specs, :platforms, :bundler_version, :ruby_version
- BUNDLED = "BUNDLED WITH".freeze
- DEPENDENCIES = "DEPENDENCIES".freeze
- PLATFORMS = "PLATFORMS".freeze
- RUBY = "RUBY VERSION".freeze
- GIT = "GIT".freeze
- GEM = "GEM".freeze
- PATH = "PATH".freeze
- PLUGIN = "PLUGIN SOURCE".freeze
- SPECS = " specs:".freeze
+ BUNDLED = "BUNDLED WITH"
+ DEPENDENCIES = "DEPENDENCIES"
+ PLATFORMS = "PLATFORMS"
+ RUBY = "RUBY VERSION"
+ GIT = "GIT"
+ GEM = "GEM"
+ PATH = "PATH"
+ PLUGIN = "PLUGIN SOURCE"
+ SPECS = " specs:"
OPTIONS = /^ ([a-z]+): (.*)$/i.freeze
SOURCE = [GIT, GEM, PATH, PLUGIN].freeze
@@ -37,6 +26,7 @@ module Bundler
KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
+ deprecate_constant(:ENVIRONMENT_VERSION_SECTIONS)
def self.sections_in_lockfile(lockfile_contents)
lockfile_contents.scan(/^\w[\w ]*$/).uniq
@@ -57,6 +47,16 @@ module Bundler
attributes
end
+ def self.bundled_with
+ lockfile = Bundler.default_lockfile
+ return unless lockfile.file?
+
+ lockfile_contents = Bundler.read_file(lockfile)
+ return unless lockfile_contents.include?(BUNDLED)
+
+ lockfile_contents.split(BUNDLED).last.strip
+ end
+
def initialize(lockfile)
@platforms = []
@sources = []
@@ -64,9 +64,7 @@ module Bundler
@state = nil
@specs = {}
- @rubygems_aggregate = Source::Rubygems.new
-
- if lockfile.match(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
+ if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
end
@@ -83,38 +81,29 @@ module Bundler
@state = :ruby
elsif line == BUNDLED
@state = :bundled_with
- elsif line =~ /^[^\s]/
+ elsif /^[^\s]/.match?(line)
@state = nil
elsif @state
send("parse_#{@state}", line)
end
end
- @sources << @rubygems_aggregate unless Bundler.feature_flag.disable_multisource?
- @specs = @specs.values.sort_by(&:identifier)
- warn_for_outdated_bundler_version
+ @specs = @specs.values.sort_by(&:full_name)
rescue ArgumentError => e
Bundler.ui.debug(e)
raise LockfileError, "Your lockfile is unreadable. Run `rm #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` " \
"and then `bundle install` to generate a new lockfile."
end
- def warn_for_outdated_bundler_version
- return unless bundler_version
- prerelease_text = bundler_version.prerelease? ? " --pre" : ""
- current_version = Gem::Version.create(Bundler::VERSION)
- return unless current_version < bundler_version
- Bundler.ui.warn "Warning: the running version of Bundler (#{current_version}) is older " \
- "than the version that created the lockfile (#{bundler_version}). We suggest you to " \
- "upgrade to the version that created the lockfile by running `gem install " \
- "bundler:#{bundler_version}#{prerelease_text}`.\n"
+ def may_include_redundant_platform_specific_gems?
+ bundler_version.nil? || bundler_version < Gem::Version.new("1.16.2")
end
- private
+ private
TYPES = {
- GIT => Bundler::Source::Git,
- GEM => Bundler::Source::Rubygems,
- PATH => Bundler::Source::Path,
+ GIT => Bundler::Source::Git,
+ GEM => Bundler::Source::Rubygems,
+ PATH => Bundler::Source::Path,
PLUGIN => Bundler::Plugin,
}.freeze
@@ -127,23 +116,11 @@ module Bundler
@sources << @current_source
when GIT
@current_source = TYPES[@type].from_lock(@opts)
- # Strip out duplicate GIT sections
- if @sources.include?(@current_source)
- @current_source = @sources.find {|s| s == @current_source }
- else
- @sources << @current_source
- end
+ @sources << @current_source
when GEM
- if Bundler.feature_flag.disable_multisource?
- @opts["remotes"] = @opts.delete("remote")
- @current_source = TYPES[@type].from_lock(@opts)
- @sources << @current_source
- else
- Array(@opts["remote"]).each do |url|
- @rubygems_aggregate.add_remote(url)
- end
- @current_source = @rubygems_aggregate
- end
+ @opts["remotes"] = Array(@opts.delete("remote")).reverse
+ @current_source = TYPES[@type].from_lock(@opts)
+ @sources << @current_source
when PLUGIN
@current_source = Plugin.source_from_lock(@opts)
@sources << @current_source
@@ -221,10 +198,9 @@ module Bundler
platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
@current_spec = LazySpecification.new(name, version, platform)
@current_spec.source = @current_source
+ @current_source.add_dependency_names(name)
- # Avoid introducing multiple copies of the same spec (caused by
- # duplicate GIT sections)
- @specs[@current_spec.identifier] ||= @current_spec
+ @specs[@current_spec.full_name] = @current_spec
elsif spaces.size == 6
version = version.split(",").map(&:strip) if version
dep = Gem::Dependency.new(name, version)
diff --git a/lib/bundler/man/.document b/lib/bundler/man/.document
new file mode 100644
index 0000000000..fb66f13c33
--- /dev/null
+++ b/lib/bundler/man/.document
@@ -0,0 +1 @@
+# Ignore all files in this directory
diff --git a/lib/bundler/man/bundle-add.1 b/lib/bundler/man/bundle-add.1
new file mode 100644
index 0000000000..8549855b0d
--- /dev/null
+++ b/lib/bundler/man/bundle-add.1
@@ -0,0 +1,82 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-ADD" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
+.
+.SH "SYNOPSIS"
+\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT] [\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-skip\-install] [\-\-strict] [\-\-optimistic]
+.
+.SH "DESCRIPTION"
+Adds the named gem to the Gemfile and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
+.
+.P
+Example:
+.
+.P
+bundle add rails
+.
+.P
+bundle add rails \-\-version "< 3\.0, > 1\.1"
+.
+.P
+bundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"
+.
+.P
+bundle add rails \-\-skip\-install
+.
+.P
+bundle add rails \-\-group "development, test"
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-version\fR, \fB\-v\fR
+Specify version requirements(s) for the added gem\.
+.
+.TP
+\fB\-\-group\fR, \fB\-g\fR
+Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
+.
+.TP
+\fB\-\-source\fR, \fB\-s\fR
+Specify the source for the added gem\.
+.
+.TP
+\fB\-\-require\fR, \fB\-r\fR
+Adds require path to gem\. Provide false, or a path as a string\.
+.
+.TP
+\fB\-\-path\fR
+Specify the file system path for the added gem\.
+.
+.TP
+\fB\-\-git\fR
+Specify the git source for the added gem\.
+.
+.TP
+\fB\-\-github\fR
+Specify the github source for the added gem\.
+.
+.TP
+\fB\-\-branch\fR
+Specify the git branch for the added gem\.
+.
+.TP
+\fB\-\-ref\fR
+Specify the git ref for the added gem\.
+.
+.TP
+\fB\-\-skip\-install\fR
+Adds the gem to the Gemfile but does not install it\.
+.
+.TP
+\fB\-\-optimistic\fR
+Adds optimistic declaration of version\.
+.
+.TP
+\fB\-\-strict\fR
+Adds strict declaration of version\.
+
diff --git a/lib/bundler/man/bundle-add.1.ronn b/lib/bundler/man/bundle-add.1.ronn
new file mode 100644
index 0000000000..37c92e5fcd
--- /dev/null
+++ b/lib/bundler/man/bundle-add.1.ronn
@@ -0,0 +1,58 @@
+bundle-add(1) -- Add gem to the Gemfile and run bundle install
+================================================================
+
+## SYNOPSIS
+
+`bundle add` <GEM_NAME> [--group=GROUP] [--version=VERSION] [--source=SOURCE] [--path=PATH] [--git=GIT] [--github=GITHUB] [--branch=BRANCH] [--ref=REF] [--skip-install] [--strict] [--optimistic]
+
+## DESCRIPTION
+Adds the named gem to the Gemfile and run `bundle install`. `bundle install` can be avoided by using the flag `--skip-install`.
+
+Example:
+
+bundle add rails
+
+bundle add rails --version "< 3.0, > 1.1"
+
+bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development"
+
+bundle add rails --skip-install
+
+bundle add rails --group "development, test"
+
+## OPTIONS
+* `--version`, `-v`:
+ Specify version requirements(s) for the added gem.
+
+* `--group`, `-g`:
+ Specify the group(s) for the added gem. Multiple groups should be separated by commas.
+
+* `--source`, `-s`:
+ Specify the source for the added gem.
+
+* `--require`, `-r`:
+ Adds require path to gem. Provide false, or a path as a string.
+
+* `--path`:
+ Specify the file system path for the added gem.
+
+* `--git`:
+ Specify the git source for the added gem.
+
+* `--github`:
+ Specify the github source for the added gem.
+
+* `--branch`:
+ Specify the git branch for the added gem.
+
+* `--ref`:
+ Specify the git ref for the added gem.
+
+* `--skip-install`:
+ Adds the gem to the Gemfile but does not install it.
+
+* `--optimistic`:
+ Adds optimistic declaration of version.
+
+* `--strict`:
+ Adds strict declaration of version.
diff --git a/lib/bundler/man/bundle-binstubs.1 b/lib/bundler/man/bundle-binstubs.1
new file mode 100644
index 0000000000..40c338916a
--- /dev/null
+++ b/lib/bundler/man/bundle-binstubs.1
@@ -0,0 +1,42 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-BINSTUBS" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
+.
+.SH "SYNOPSIS"
+\fBbundle binstubs\fR \fIGEM_NAME\fR [\-\-force] [\-\-path PATH] [\-\-standalone]
+.
+.SH "DESCRIPTION"
+Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it into \fBbin/\fR\. Binstubs are a shortcut\-or alternative\- to always using \fBbundle exec\fR\. This gives you a file that can be run directly, and one that will always run the correct gem version used by the application\.
+.
+.P
+For example, if you run \fBbundle binstubs rspec\-core\fR, Bundler will create the file \fBbin/rspec\fR\. That file will contain enough code to load Bundler, tell it to load the bundled gems, and then run rspec\.
+.
+.P
+This command generates binstubs for executables in \fBGEM_NAME\fR\. Binstubs are put into \fBbin\fR, or the \fB\-\-path\fR directory if one has been set\. Calling binstubs with [GEM [GEM]] will create binstubs for all given gems\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-force\fR
+Overwrite existing binstubs if they exist\.
+.
+.TP
+\fB\-\-path\fR
+The location to install the specified binstubs to\. This defaults to \fBbin\fR\.
+.
+.TP
+\fB\-\-standalone\fR
+Makes binstubs that can work without depending on Rubygems or Bundler at runtime\.
+.
+.TP
+\fB\-\-shebang\fR
+Specify a different shebang executable name than the default (default \'ruby\')
+.
+.TP
+\fB\-\-all\fR
+Create binstubs for all gems in the bundle\.
+
diff --git a/lib/bundler/man/bundle-binstubs.1.ronn b/lib/bundler/man/bundle-binstubs.1.ronn
new file mode 100644
index 0000000000..a96186929f
--- /dev/null
+++ b/lib/bundler/man/bundle-binstubs.1.ronn
@@ -0,0 +1,41 @@
+bundle-binstubs(1) -- Install the binstubs of the listed gems
+=============================================================
+
+## SYNOPSIS
+
+`bundle binstubs` <GEM_NAME> [--force] [--path PATH] [--standalone]
+
+## DESCRIPTION
+
+Binstubs are scripts that wrap around executables. Bundler creates a
+small Ruby file (a binstub) that loads Bundler, runs the command,
+and puts it into `bin/`. Binstubs are a shortcut-or alternative-
+to always using `bundle exec`. This gives you a file that can be run
+directly, and one that will always run the correct gem version
+used by the application.
+
+For example, if you run `bundle binstubs rspec-core`, Bundler will create
+the file `bin/rspec`. That file will contain enough code to load Bundler,
+tell it to load the bundled gems, and then run rspec.
+
+This command generates binstubs for executables in `GEM_NAME`.
+Binstubs are put into `bin`, or the `--path` directory if one has been set.
+Calling binstubs with [GEM [GEM]] will create binstubs for all given gems.
+
+## OPTIONS
+
+* `--force`:
+ Overwrite existing binstubs if they exist.
+
+* `--path`:
+ The location to install the specified binstubs to. This defaults to `bin`.
+
+* `--standalone`:
+ Makes binstubs that can work without depending on Rubygems or Bundler at
+ runtime.
+
+* `--shebang`:
+ Specify a different shebang executable name than the default (default 'ruby')
+
+* `--all`:
+ Create binstubs for all gems in the bundle.
diff --git a/lib/bundler/man/bundle-cache.1 b/lib/bundler/man/bundle-cache.1
new file mode 100644
index 0000000000..69b1e1e3dd
--- /dev/null
+++ b/lib/bundler/man/bundle-cache.1
@@ -0,0 +1,61 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CACHE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
+.
+.SH "SYNOPSIS"
+\fBbundle cache\fR
+.
+.P
+alias: \fBpackage\fR, \fBpack\fR
+.
+.SH "DESCRIPTION"
+Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
+.
+.SH "GIT AND PATH GEMS"
+The \fBbundle cache\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
+.
+.SH "SUPPORT FOR MULTIPLE PLATFORMS"
+When using gems that have different packages for different platforms, Bundler supports caching of gems for other platforms where the Gemfile has been resolved (i\.e\. present in the lockfile) in \fBvendor/cache\fR\. This needs to be enabled via the \fB\-\-all\-platforms\fR option\. This setting will be remembered in your local bundler configuration\.
+.
+.SH "REMOTE FETCHING"
+By default, if you run \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR after running bundle cache(1) \fIbundle\-cache\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
+.
+.P
+For instance, consider this Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you run \fBbundle cache\fR under C Ruby, bundler will retrieve the version of \fBnokogiri\fR for the \fB"ruby"\fR platform\. If you deploy to JRuby and run \fBbundle install\fR, bundler is forced to check to see whether a \fB"java"\fR platformed \fBnokogiri\fR exists\.
+.
+.P
+Even though the \fBnokogiri\fR gem for the Ruby platform is \fItechnically\fR acceptable on JRuby, it has a C extension that does not run on JRuby\. As a result, bundler will, by default, still connect to \fBrubygems\.org\fR to check whether it has a version of one of your gems more specific to your platform\.
+.
+.P
+This problem is also not limited to the \fB"java"\fR platform\. A similar (common) problem can happen when developing on Windows and deploying to Linux, or even when developing on OSX and deploying to Linux\.
+.
+.P
+If you know for sure that the gems packaged in \fBvendor/cache\fR are appropriate for the platform you are on, you can run \fBbundle install \-\-local\fR to skip checking for more appropriate gems, and use the ones in \fBvendor/cache\fR\.
+.
+.P
+One way to be sure that you have the right platformed versions of all your gems is to run \fBbundle cache\fR on an identical machine and check in the gems\. For instance, you can run \fBbundle cache\fR on an identical staging box during your staging process, and check in the \fBvendor/cache\fR before deploying to production\.
+.
+.P
+By default, bundle cache(1) \fIbundle\-cache\.1\.html\fR fetches and also installs the gems to the default location\. To package the dependencies to \fBvendor/cache\fR without installing them to the local install location, you can run \fBbundle cache \-\-no\-install\fR\.
+.
+.SH "HISTORY"
+In Bundler 2\.1, \fBcache\fR took in the functionalities of \fBpackage\fR and now \fBpackage\fR and \fBpack\fR are aliases of \fBcache\fR\.
diff --git a/lib/bundler/man/bundle-cache.1.ronn b/lib/bundler/man/bundle-cache.1.ronn
new file mode 100644
index 0000000000..8112c2c551
--- /dev/null
+++ b/lib/bundler/man/bundle-cache.1.ronn
@@ -0,0 +1,79 @@
+bundle-cache(1) -- Package your needed `.gem` files into your application
+===========================================================================
+
+## SYNOPSIS
+
+`bundle cache`
+
+alias: `package`, `pack`
+
+## DESCRIPTION
+
+Copy all of the `.gem` files needed to run the application into the
+`vendor/cache` directory. In the future, when running [`bundle install(1)`](bundle-install.1.html),
+use the gems in the cache in preference to the ones on `rubygems.org`.
+
+## GIT AND PATH GEMS
+
+The `bundle cache` command can also package `:git` and `:path` dependencies
+besides .gem files. This needs to be explicitly enabled via the `--all` option.
+Once used, the `--all` option will be remembered.
+
+## SUPPORT FOR MULTIPLE PLATFORMS
+
+When using gems that have different packages for different platforms, Bundler
+supports caching of gems for other platforms where the Gemfile has been resolved
+(i.e. present in the lockfile) in `vendor/cache`. This needs to be enabled via
+the `--all-platforms` option. This setting will be remembered in your local
+bundler configuration.
+
+## REMOTE FETCHING
+
+By default, if you run [`bundle install(1)`](bundle-install.1.html) after running
+[bundle cache(1)](bundle-cache.1.html), bundler will still connect to `rubygems.org`
+to check whether a platform-specific gem exists for any of the gems
+in `vendor/cache`.
+
+For instance, consider this Gemfile(5):
+
+ source "https://rubygems.org"
+
+ gem "nokogiri"
+
+If you run `bundle cache` under C Ruby, bundler will retrieve
+the version of `nokogiri` for the `"ruby"` platform. If you deploy
+to JRuby and run `bundle install`, bundler is forced to check to
+see whether a `"java"` platformed `nokogiri` exists.
+
+Even though the `nokogiri` gem for the Ruby platform is
+_technically_ acceptable on JRuby, it has a C extension
+that does not run on JRuby. As a result, bundler will, by default,
+still connect to `rubygems.org` to check whether it has a version
+of one of your gems more specific to your platform.
+
+This problem is also not limited to the `"java"` platform.
+A similar (common) problem can happen when developing on Windows
+and deploying to Linux, or even when developing on OSX and
+deploying to Linux.
+
+If you know for sure that the gems packaged in `vendor/cache`
+are appropriate for the platform you are on, you can run
+`bundle install --local` to skip checking for more appropriate
+gems, and use the ones in `vendor/cache`.
+
+One way to be sure that you have the right platformed versions
+of all your gems is to run `bundle cache` on an identical
+machine and check in the gems. For instance, you can run
+`bundle cache` on an identical staging box during your
+staging process, and check in the `vendor/cache` before
+deploying to production.
+
+By default, [bundle cache(1)](bundle-cache.1.html) fetches and also
+installs the gems to the default location. To package the
+dependencies to `vendor/cache` without installing them to the
+local install location, you can run `bundle cache --no-install`.
+
+## HISTORY
+
+In Bundler 2.1, `cache` took in the functionalities of `package` and now
+`package` and `pack` are aliases of `cache`.
diff --git a/lib/bundler/man/bundle-check.1 b/lib/bundler/man/bundle-check.1
new file mode 100644
index 0000000000..748a37e7d1
--- /dev/null
+++ b/lib/bundler/man/bundle-check.1
@@ -0,0 +1,31 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CHECK" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
+.
+.SH "SYNOPSIS"
+\fBbundle check\fR [\-\-dry\-run] [\-\-gemfile=FILE] [\-\-path=PATH]
+.
+.SH "DESCRIPTION"
+\fBcheck\fR searches the local machine for each of the gems requested in the Gemfile\. If all gems are found, Bundler prints a success message and exits with a status of 0\.
+.
+.P
+If not, the first missing gem is listed and Bundler exits status 1\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-dry\-run\fR
+Locks the [\fBGemfile(5)\fR][Gemfile(5)] before running the command\.
+.
+.TP
+\fB\-\-gemfile\fR
+Use the specified gemfile instead of the [\fBGemfile(5)\fR][Gemfile(5)]\.
+.
+.TP
+\fB\-\-path\fR
+Specify a different path than the system default (\fB$BUNDLE_PATH\fR or \fB$GEM_HOME\fR)\. Bundler will remember this value for future installs on this machine\.
+
diff --git a/man/bundle-check.ronn b/lib/bundler/man/bundle-check.1.ronn
index f2846b8ff2..f2846b8ff2 100644
--- a/man/bundle-check.ronn
+++ b/lib/bundler/man/bundle-check.1.ronn
diff --git a/lib/bundler/man/bundle-clean.1 b/lib/bundler/man/bundle-clean.1
new file mode 100644
index 0000000000..af8f13cd89
--- /dev/null
+++ b/lib/bundler/man/bundle-clean.1
@@ -0,0 +1,24 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CLEAN" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
+.
+.SH "SYNOPSIS"
+\fBbundle clean\fR [\-\-dry\-run] [\-\-force]
+.
+.SH "DESCRIPTION"
+This command will remove all unused gems in your bundler directory\. This is useful when you have made many changes to your gem dependencies\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-dry\-run\fR
+Print the changes, but do not clean the unused gems\.
+.
+.TP
+\fB\-\-force\fR
+Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\.
+
diff --git a/lib/bundler/man/bundle-clean.1.ronn b/lib/bundler/man/bundle-clean.1.ronn
new file mode 100644
index 0000000000..dae27c21ee
--- /dev/null
+++ b/lib/bundler/man/bundle-clean.1.ronn
@@ -0,0 +1,18 @@
+bundle-clean(1) -- Cleans up unused gems in your bundler directory
+==================================================================
+
+## SYNOPSIS
+
+`bundle clean` [--dry-run] [--force]
+
+## DESCRIPTION
+
+This command will remove all unused gems in your bundler directory. This is
+useful when you have made many changes to your gem dependencies.
+
+## OPTIONS
+
+* `--dry-run`:
+ Print the changes, but do not clean the unused gems.
+* `--force`:
+ Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application.
diff --git a/lib/bundler/man/bundle-config.1 b/lib/bundler/man/bundle-config.1
new file mode 100644
index 0000000000..4442f33105
--- /dev/null
+++ b/lib/bundler/man/bundle-config.1
@@ -0,0 +1,512 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CONFIG" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-config\fR \- Set bundler configuration options
+.
+.SH "SYNOPSIS"
+\fBbundle config\fR list
+.
+.br
+\fBbundle config\fR [get] NAME
+.
+.br
+\fBbundle config\fR [set] NAME VALUE
+.
+.br
+\fBbundle config\fR unset NAME
+.
+.SH "DESCRIPTION"
+This command allows you to interact with Bundler\'s configuration system\.
+.
+.P
+Bundler loads configuration settings in this order:
+.
+.IP "1." 4
+Local config (\fB<project_root>/\.bundle/config\fR or \fB$BUNDLE_APP_CONFIG/config\fR)
+.
+.IP "2." 4
+Environmental variables (\fBENV\fR)
+.
+.IP "3." 4
+Global config (\fB~/\.bundle/config\fR)
+.
+.IP "4." 4
+Bundler default config
+.
+.IP "" 0
+.
+.P
+Executing \fBbundle config list\fR will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
+.
+.P
+Executing \fBbundle config get <name>\fR will print the value of that configuration setting, and where it was set\.
+.
+.P
+Executing \fBbundle config set <name> <value>\fR defaults to setting \fBlocal\fR configuration if executing from within a local application, otherwise it will set \fBglobal\fR configuration\. See \fB\-\-local\fR and \fB\-\-global\fR options below\.
+.
+.P
+Executing \fBbundle config set \-\-local <name> <value>\fR will set that configuration in the directory for the local application\. The configuration will be stored in \fB<project_root>/\.bundle/config\fR\. If \fBBUNDLE_APP_CONFIG\fR is set, the configuration will be stored in \fB$BUNDLE_APP_CONFIG/config\fR\.
+.
+.P
+Executing \fBbundle config set \-\-global <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\. If \fIname\fR already is set, \fIname\fR will be overridden and user will be warned\.
+.
+.P
+Executing \fBbundle config unset <name>\fR will delete the configuration in both local and global sources\.
+.
+.P
+Executing \fBbundle config unset \-\-global <name>\fR will delete the configuration only from the user configuration\.
+.
+.P
+Executing \fBbundle config unset \-\-local <name>\fR will delete the configuration only from the local application\.
+.
+.P
+Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
+.
+.SH "REMEMBERING OPTIONS"
+Flags passed to \fBbundle install\fR or the Bundler runtime, such as \fB\-\-path foo\fR or \fB\-\-without production\fR, are remembered between commands and saved to your local application\'s configuration (normally, \fB\./\.bundle/config\fR)\.
+.
+.P
+However, this will be changed in bundler 3, so it\'s better not to rely on this behavior\. If these options must be remembered, it\'s better to set them using \fBbundle config\fR (e\.g\., \fBbundle config set \-\-local path foo\fR)\.
+.
+.P
+The options that can be configured are:
+.
+.TP
+\fBbin\fR
+Creates a directory (defaults to \fB~/bin\fR) and place any executables from the gem there\. These executables run in Bundler\'s context\. If used, you might add this directory to your environment\'s \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
+.
+.TP
+\fBdeployment\fR
+In deployment mode, Bundler will \'roll\-out\' the bundle for \fBproduction\fR use\. Please check carefully if you want to have this option enabled in \fBdevelopment\fR or \fBtest\fR environments\.
+.
+.TP
+\fBonly\fR
+A space\-separated list of groups to install only gems of the specified groups\.
+.
+.TP
+\fBpath\fR
+The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
+.
+.TP
+\fBwithout\fR
+A space\-separated list of groups referencing gems to skip during installation\.
+.
+.TP
+\fBwith\fR
+A space\-separated list of \fBoptional\fR groups referencing gems to include during installation\.
+.
+.SH "BUILD OPTIONS"
+You can use \fBbundle config\fR to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
+.
+.P
+A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
+.
+.IP "" 4
+.
+.nf
+
+gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
+.
+.fi
+.
+.IP "" 0
+.
+.P
+After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
+.
+.SH "CONFIGURATION KEYS"
+Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
+.
+.P
+For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
+.
+.P
+The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
+.
+.P
+Any periods in the configuration keys must be replaced with two underscores when setting it via environment variables\. The configuration key \fBlocal\.rack\fR becomes the environment variable \fBBUNDLE_LOCAL__RACK\fR\.
+.
+.SH "LIST OF AVAILABLE KEYS"
+The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
+.
+.IP "\(bu" 4
+\fBallow_deployment_source_credential_changes\fR (\fBBUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES\fR): When in deployment mode, allow changing the credentials to a gem\'s source\. Ex: \fBhttps://some\.host\.com/gems/path/\fR \-> \fBhttps://user_name:password@some\.host\.com/gems/path\fR
+.
+.IP "\(bu" 4
+\fBallow_offline_install\fR (\fBBUNDLE_ALLOW_OFFLINE_INSTALL\fR): Allow Bundler to use cached data when installing without network access\.
+.
+.IP "\(bu" 4
+\fBauto_clean_without_path\fR (\fBBUNDLE_AUTO_CLEAN_WITHOUT_PATH\fR): Automatically run \fBbundle clean\fR after installing when an explicit \fBpath\fR has not been set and Bundler is not installing into the system gems\.
+.
+.IP "\(bu" 4
+\fBauto_install\fR (\fBBUNDLE_AUTO_INSTALL\fR): Automatically run \fBbundle install\fR when gems are missing\.
+.
+.IP "\(bu" 4
+\fBbin\fR (\fBBUNDLE_BIN\fR): Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
+.
+.IP "\(bu" 4
+\fBcache_all\fR (\fBBUNDLE_CACHE_ALL\fR): Cache all gems, including path and git gems\. This needs to be explicitly configured on bundler 1 and bundler 2, but will be the default on bundler 3\.
+.
+.IP "\(bu" 4
+\fBcache_all_platforms\fR (\fBBUNDLE_CACHE_ALL_PLATFORMS\fR): Cache gems for all platforms\.
+.
+.IP "\(bu" 4
+\fBcache_path\fR (\fBBUNDLE_CACHE_PATH\fR): The directory that bundler will place cached gems in when running \fBbundle package\fR, and that bundler will look in when installing gems\. Defaults to \fBvendor/cache\fR\.
+.
+.IP "\(bu" 4
+\fBclean\fR (\fBBUNDLE_CLEAN\fR): Whether Bundler should run \fBbundle clean\fR automatically after \fBbundle install\fR\.
+.
+.IP "\(bu" 4
+\fBconsole\fR (\fBBUNDLE_CONSOLE\fR): The console that \fBbundle console\fR starts\. Defaults to \fBirb\fR\.
+.
+.IP "\(bu" 4
+\fBdefault_install_uses_path\fR (\fBBUNDLE_DEFAULT_INSTALL_USES_PATH\fR): Whether a \fBbundle install\fR without an explicit \fB\-\-path\fR argument defaults to installing gems in \fB\.bundle\fR\.
+.
+.IP "\(bu" 4
+\fBdeployment\fR (\fBBUNDLE_DEPLOYMENT\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\.
+.
+.IP "\(bu" 4
+\fBdisable_checksum_validation\fR (\fBBUNDLE_DISABLE_CHECKSUM_VALIDATION\fR): Allow installing gems even if they do not match the checksum provided by RubyGems\.
+.
+.IP "\(bu" 4
+\fBdisable_exec_load\fR (\fBBUNDLE_DISABLE_EXEC_LOAD\fR): Stop Bundler from using \fBload\fR to launch an executable in\-process in \fBbundle exec\fR\.
+.
+.IP "\(bu" 4
+\fBdisable_local_branch_check\fR (\fBBUNDLE_DISABLE_LOCAL_BRANCH_CHECK\fR): Allow Bundler to use a local git override without a branch specified in the Gemfile\.
+.
+.IP "\(bu" 4
+\fBdisable_local_revision_check\fR (\fBBUNDLE_DISABLE_LOCAL_REVISION_CHECK\fR): Allow Bundler to use a local git override without checking if the revision present in the lockfile is present in the repository\.
+.
+.IP "\(bu" 4
+\fBdisable_shared_gems\fR (\fBBUNDLE_DISABLE_SHARED_GEMS\fR): Stop Bundler from accessing gems installed to RubyGems\' normal location\.
+.
+.IP "\(bu" 4
+\fBdisable_version_check\fR (\fBBUNDLE_DISABLE_VERSION_CHECK\fR): Stop Bundler from checking if a newer Bundler version is available on rubygems\.org\.
+.
+.IP "\(bu" 4
+\fBforce_ruby_platform\fR (\fBBUNDLE_FORCE_RUBY_PLATFORM\fR): Ignore the current machine\'s platform and install only \fBruby\fR platform gems\. As a result, gems with native extensions will be compiled from source\.
+.
+.IP "\(bu" 4
+\fBfrozen\fR (\fBBUNDLE_FROZEN\fR): Disallow changes to the \fBGemfile\fR\. When the \fBGemfile\fR is changed and the lockfile has not been updated, running Bundler commands will be blocked\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
+.
+.IP "\(bu" 4
+\fBgem\.github_username\fR (\fBBUNDLE_GEM__GITHUB_USERNAME\fR): Sets a GitHub username or organization to be used in \fBREADME\fR file when you create a new gem via \fBbundle gem\fR command\. It can be overridden by passing an explicit \fB\-\-github\-username\fR flag to \fBbundle gem\fR\.
+.
+.IP "\(bu" 4
+\fBgem\.push_key\fR (\fBBUNDLE_GEM__PUSH_KEY\fR): Sets the \fB\-\-key\fR parameter for \fBgem push\fR when using the \fBrake release\fR command with a private gemstash server\.
+.
+.IP "\(bu" 4
+\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR): The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
+.
+.IP "\(bu" 4
+\fBglobal_gem_cache\fR (\fBBUNDLE_GLOBAL_GEM_CACHE\fR): Whether Bundler should cache all gems globally, rather than locally to the installing Ruby installation\.
+.
+.IP "\(bu" 4
+\fBignore_funding_requests\fR (\fBBUNDLE_IGNORE_FUNDING_REQUESTS\fR): When set, no funding requests will be printed\.
+.
+.IP "\(bu" 4
+\fBignore_messages\fR (\fBBUNDLE_IGNORE_MESSAGES\fR): When set, no post install messages will be printed\. To silence a single gem, use dot notation like \fBignore_messages\.httparty true\fR\.
+.
+.IP "\(bu" 4
+\fBinit_gems_rb\fR (\fBBUNDLE_INIT_GEMS_RB\fR): Generate a \fBgems\.rb\fR instead of a \fBGemfile\fR when running \fBbundle init\fR\.
+.
+.IP "\(bu" 4
+\fBjobs\fR (\fBBUNDLE_JOBS\fR): The number of gems Bundler can install in parallel\. Defaults to the number of available processors\.
+.
+.IP "\(bu" 4
+\fBno_install\fR (\fBBUNDLE_NO_INSTALL\fR): Whether \fBbundle package\fR should skip installing gems\.
+.
+.IP "\(bu" 4
+\fBno_prune\fR (\fBBUNDLE_NO_PRUNE\fR): Whether Bundler should leave outdated gems unpruned when caching\.
+.
+.IP "\(bu" 4
+\fBonly\fR (\fBBUNDLE_ONLY\fR): A space\-separated list of groups to install only gems of the specified groups\.
+.
+.IP "\(bu" 4
+\fBpath\fR (\fBBUNDLE_PATH\fR): The location on disk where all gems in your bundle will be located regardless of \fB$GEM_HOME\fR or \fB$GEM_PATH\fR values\. Bundle gems not found in this location will be installed by \fBbundle install\fR\. Defaults to \fBGem\.dir\fR\. When \-\-deployment is used, defaults to vendor/bundle\.
+.
+.IP "\(bu" 4
+\fBpath\.system\fR (\fBBUNDLE_PATH__SYSTEM\fR): Whether Bundler will install gems into the default system path (\fBGem\.dir\fR)\.
+.
+.IP "\(bu" 4
+\fBpath_relative_to_cwd\fR (\fBBUNDLE_PATH_RELATIVE_TO_CWD\fR) Makes \fB\-\-path\fR relative to the CWD instead of the \fBGemfile\fR\.
+.
+.IP "\(bu" 4
+\fBplugins\fR (\fBBUNDLE_PLUGINS\fR): Enable Bundler\'s experimental plugin system\.
+.
+.IP "\(bu" 4
+\fBprefer_patch\fR (BUNDLE_PREFER_PATCH): Prefer updating only to next patch version during updates\. Makes \fBbundle update\fR calls equivalent to \fBbundler update \-\-patch\fR\.
+.
+.IP "\(bu" 4
+\fBprint_only_version_number\fR (\fBBUNDLE_PRINT_ONLY_VERSION_NUMBER\fR): Print only version number from \fBbundler \-\-version\fR\.
+.
+.IP "\(bu" 4
+\fBredirect\fR (\fBBUNDLE_REDIRECT\fR): The number of redirects allowed for network requests\. Defaults to \fB5\fR\.
+.
+.IP "\(bu" 4
+\fBretry\fR (\fBBUNDLE_RETRY\fR): The number of times to retry failed network requests\. Defaults to \fB3\fR\.
+.
+.IP "\(bu" 4
+\fBsetup_makes_kernel_gem_public\fR (\fBBUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC\fR): Have \fBBundler\.setup\fR make the \fBKernel#gem\fR method public, even though RubyGems declares it as private\.
+.
+.IP "\(bu" 4
+\fBshebang\fR (\fBBUNDLE_SHEBANG\fR): The program name that should be invoked for generated binstubs\. Defaults to the ruby install name used to generate the binstub\.
+.
+.IP "\(bu" 4
+\fBsilence_deprecations\fR (\fBBUNDLE_SILENCE_DEPRECATIONS\fR): Whether Bundler should silence deprecation warnings for behavior that will be changed in the next major version\.
+.
+.IP "\(bu" 4
+\fBsilence_root_warning\fR (\fBBUNDLE_SILENCE_ROOT_WARNING\fR): Silence the warning Bundler prints when installing gems as root\.
+.
+.IP "\(bu" 4
+\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR): Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
+.
+.IP "\(bu" 4
+\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR): Path to a designated file containing a X\.509 client certificate and key in PEM format\.
+.
+.IP "\(bu" 4
+\fBssl_verify_mode\fR (\fBBUNDLE_SSL_VERIFY_MODE\fR): The SSL verification mode Bundler uses when making HTTPS requests\. Defaults to verify peer\.
+.
+.IP "\(bu" 4
+\fBsystem_bindir\fR (\fBBUNDLE_SYSTEM_BINDIR\fR): The location where RubyGems installs binstubs\. Defaults to \fBGem\.bindir\fR\.
+.
+.IP "\(bu" 4
+\fBtimeout\fR (\fBBUNDLE_TIMEOUT\fR): The seconds allowed before timing out for network requests\. Defaults to \fB10\fR\.
+.
+.IP "\(bu" 4
+\fBupdate_requires_all_flag\fR (\fBBUNDLE_UPDATE_REQUIRES_ALL_FLAG\fR): Require passing \fB\-\-all\fR to \fBbundle update\fR when everything should be updated, and disallow passing no options to \fBbundle update\fR\.
+.
+.IP "\(bu" 4
+\fBuser_agent\fR (\fBBUNDLE_USER_AGENT\fR): The custom user agent fragment Bundler includes in API requests\.
+.
+.IP "\(bu" 4
+\fBwith\fR (\fBBUNDLE_WITH\fR): A \fB:\fR\-separated list of groups whose gems bundler should install\.
+.
+.IP "\(bu" 4
+\fBwithout\fR (\fBBUNDLE_WITHOUT\fR): A \fB:\fR\-separated list of groups whose gems bundler should not install\.
+.
+.IP "" 0
+.
+.P
+In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR or bundle cache(1) \fIbundle\-cache\.1\.html\fR command\.
+.
+.P
+You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
+.
+.SH "LOCAL GIT REPOS"
+Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-local local\.GEM_NAME /path/to/local/git/repository
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, in order to use a local Rack repository, a developer could call:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-local local\.rack ~/Work/git/rack
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Now instead of checking out the remote git repository, the local override will be used\. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler\. This means a commit in the local git repo will update the revision in the \fBGemfile\.lock\fR to the local git repo revision\. This requires the same attention as git submodules\. Before pushing to the remote, you need to ensure the local override was pushed, otherwise you may point to a commit that only exists in your local machine\. You\'ll also need to CGI escape your usernames and passwords as well\.
+.
+.P
+Bundler does many checks to ensure a developer won\'t work with invalid references\. Particularly, we force a developer to specify a branch in the \fBGemfile\fR in order to use this feature\. If the branch specified in the \fBGemfile\fR and the current branch in the local git repository do not match, Bundler will abort\. This ensures that a developer is always working against the correct branches, and prevents accidental locking to a different branch\.
+.
+.P
+Finally, Bundler also ensures that the current revision in the \fBGemfile\.lock\fR exists in the local git repository\. By doing this, Bundler forces you to fetch the latest changes in the remotes\.
+.
+.SH "MIRRORS OF GEM SOURCES"
+Bundler supports overriding gem sources with mirrors\. This allows you to configure rubygems\.org as the gem source in your Gemfile while still using your mirror to fetch gems\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global mirror\.SOURCE_URL MIRROR_URL
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, to use a mirror of https://rubygems\.org hosted at https://example\.org:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global mirror\.https://rubygems\.org https://example\.org
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Each mirror also provides a fallback timeout setting\. If the mirror does not respond within the fallback timeout, Bundler will try to use the original server instead of the mirror\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global mirror\.SOURCE_URL\.fallback_timeout TIMEOUT
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, to fall back to rubygems\.org after 3 seconds:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global mirror\.https://rubygems\.org\.fallback_timeout 3
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The default fallback timeout is 0\.1 seconds, but the setting can currently only accept whole seconds (for example, 1, 15, or 30)\.
+.
+.SH "CREDENTIALS FOR GEM SOURCES"
+Bundler allows you to configure credentials for any gem source, which allows you to avoid putting secrets into your Gemfile\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global SOURCE_HOSTNAME USERNAME:PASSWORD
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, to save the credentials of user \fBclaudette\fR for the gem source at \fBgems\.longerous\.com\fR, you would run:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global gems\.longerous\.com claudette:s00pers3krit
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Or you can set the credentials as an environment variable like this:
+.
+.IP "" 4
+.
+.nf
+
+export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For gems with a git source with HTTP(S) URL you can specify credentials like so:
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-global https://github\.com/rubygems/rubygems\.git username:password
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Or you can set the credentials as an environment variable like so:
+.
+.IP "" 4
+.
+.nf
+
+export BUNDLE_GITHUB__COM=username:password
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This is especially useful for private repositories on hosts such as GitHub, where you can use personal OAuth tokens:
+.
+.IP "" 4
+.
+.nf
+
+export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Note that any configured credentials will be redacted by informative commands such as \fBbundle config list\fR or \fBbundle config get\fR, unless you use the \fB\-\-parseable\fR flag\. This is to avoid unintentionally leaking credentials when copy\-pasting bundler output\.
+.
+.P
+Also note that to guarantee a sane mapping between valid environment variable names and valid host names, bundler makes the following transformations:
+.
+.IP "\(bu" 4
+Any \fB\-\fR characters in a host name are mapped to a triple dash (\fB___\fR) in the corresponding environment variable\.
+.
+.IP "\(bu" 4
+Any \fB\.\fR characters in a host name are mapped to a double dash (\fB__\fR) in the corresponding environment variable\.
+.
+.IP "" 0
+.
+.P
+This means that if you have a gem server named \fBmy\.gem\-host\.com\fR, you\'ll need to use the \fBBUNDLE_MY__GEM___HOST__COM\fR variable to configure credentials for it through ENV\.
+.
+.SH "CONFIGURE BUNDLER DIRECTORIES"
+Bundler\'s home, config, cache and plugin directories are able to be configured through environment variables\. The default location for Bundler\'s home directory is \fB~/\.bundle\fR, which all directories inherit from by default\. The following outlines the available environment variables and their default values
+.
+.IP "" 4
+.
+.nf
+
+BUNDLE_USER_HOME : $HOME/\.bundle
+BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
+BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
+BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
+.
+.fi
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-config.1.ronn b/lib/bundler/man/bundle-config.1.ronn
new file mode 100644
index 0000000000..adc273ec62
--- /dev/null
+++ b/lib/bundler/man/bundle-config.1.ronn
@@ -0,0 +1,405 @@
+bundle-config(1) -- Set bundler configuration options
+=====================================================
+
+## SYNOPSIS
+
+`bundle config` list<br>
+`bundle config` [get] NAME<br>
+`bundle config` [set] NAME VALUE<br>
+`bundle config` unset NAME
+
+## DESCRIPTION
+
+This command allows you to interact with Bundler's configuration system.
+
+Bundler loads configuration settings in this order:
+
+1. Local config (`<project_root>/.bundle/config` or `$BUNDLE_APP_CONFIG/config`)
+2. Environmental variables (`ENV`)
+3. Global config (`~/.bundle/config`)
+4. Bundler default config
+
+Executing `bundle config list` will print a list of all bundler
+configuration for the current bundle, and where that configuration
+was set.
+
+Executing `bundle config get <name>` will print the value of that configuration
+setting, and where it was set.
+
+Executing `bundle config set <name> <value>` defaults to setting `local`
+configuration if executing from within a local application, otherwise it will
+set `global` configuration. See `--local` and `--global` options below.
+
+Executing `bundle config set --local <name> <value>` will set that configuration
+in the directory for the local application. The configuration will be stored in
+`<project_root>/.bundle/config`. If `BUNDLE_APP_CONFIG` is set, the configuration
+will be stored in `$BUNDLE_APP_CONFIG/config`.
+
+Executing `bundle config set --global <name> <value>` will set that
+configuration to the value specified for all bundles executed as the current
+user. The configuration will be stored in `~/.bundle/config`. If <name> already
+is set, <name> will be overridden and user will be warned.
+
+Executing `bundle config unset <name>` will delete the configuration in both
+local and global sources.
+
+Executing `bundle config unset --global <name>` will delete the configuration
+only from the user configuration.
+
+Executing `bundle config unset --local <name>` will delete the configuration
+only from the local application.
+
+Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
+cause it to ignore all configuration.
+
+## REMEMBERING OPTIONS
+
+Flags passed to `bundle install` or the Bundler runtime, such as `--path foo` or
+`--without production`, are remembered between commands and saved to your local
+application's configuration (normally, `./.bundle/config`).
+
+However, this will be changed in bundler 3, so it's better not to rely on this
+behavior. If these options must be remembered, it's better to set them using
+`bundle config` (e.g., `bundle config set --local path foo`).
+
+The options that can be configured are:
+
+* `bin`:
+ Creates a directory (defaults to `~/bin`) and place any executables from the
+ gem there. These executables run in Bundler's context. If used, you might add
+ this directory to your environment's `PATH` variable. For instance, if the
+ `rails` gem comes with a `rails` executable, this flag will create a
+ `bin/rails` executable that ensures that all referred dependencies will be
+ resolved using the bundled gems.
+
+* `deployment`:
+ In deployment mode, Bundler will 'roll-out' the bundle for
+ `production` use. Please check carefully if you want to have this option
+ enabled in `development` or `test` environments.
+
+* `only`:
+ A space-separated list of groups to install only gems of the specified groups.
+
+* `path`:
+ The location to install the specified gems to. This defaults to Rubygems'
+ setting. Bundler shares this location with Rubygems, `gem install ...` will
+ have gem installed there, too. Therefore, gems installed without a
+ `--path ...` setting will show up by calling `gem list`. Accordingly, gems
+ installed to other locations will not get listed.
+
+* `without`:
+ A space-separated list of groups referencing gems to skip during installation.
+
+* `with`:
+ A space-separated list of **optional** groups referencing gems to include during installation.
+
+## BUILD OPTIONS
+
+You can use `bundle config` to give Bundler the flags to pass to the gem
+installer every time bundler tries to install a particular gem.
+
+A very common example, the `mysql` gem, requires Snow Leopard users to
+pass configuration flags to `gem install` to specify where to find the
+`mysql_config` executable.
+
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
+
+Since the specific location of that executable can change from machine
+to machine, you can specify these flags on a per-machine basis.
+
+ bundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
+
+After running this command, every time bundler needs to install the
+`mysql` gem, it will pass along the flags you specified.
+
+## CONFIGURATION KEYS
+
+Configuration keys in bundler have two forms: the canonical form and the
+environment variable form.
+
+For instance, passing the `--without` flag to [bundle install(1)](bundle-install.1.html)
+prevents Bundler from installing certain groups specified in the Gemfile(5). Bundler
+persists this value in `app/.bundle/config` so that calls to `Bundler.setup`
+do not try to find gems from the `Gemfile` that you didn't install. Additionally,
+subsequent calls to [bundle install(1)](bundle-install.1.html) remember this setting
+and skip those groups.
+
+The canonical form of this configuration is `"without"`. To convert the canonical
+form to the environment variable form, capitalize it, and prepend `BUNDLE_`. The
+environment variable form of `"without"` is `BUNDLE_WITHOUT`.
+
+Any periods in the configuration keys must be replaced with two underscores when
+setting it via environment variables. The configuration key `local.rack` becomes
+the environment variable `BUNDLE_LOCAL__RACK`.
+
+## LIST OF AVAILABLE KEYS
+
+The following is a list of all configuration keys and their purpose. You can
+learn more about their operation in [bundle install(1)](bundle-install.1.html).
+
+* `allow_deployment_source_credential_changes` (`BUNDLE_ALLOW_DEPLOYMENT_SOURCE_CREDENTIAL_CHANGES`):
+ When in deployment mode, allow changing the credentials to a gem's source.
+ Ex: `https://some.host.com/gems/path/` -> `https://user_name:password@some.host.com/gems/path`
+* `allow_offline_install` (`BUNDLE_ALLOW_OFFLINE_INSTALL`):
+ Allow Bundler to use cached data when installing without network access.
+* `auto_clean_without_path` (`BUNDLE_AUTO_CLEAN_WITHOUT_PATH`):
+ Automatically run `bundle clean` after installing when an explicit `path`
+ has not been set and Bundler is not installing into the system gems.
+* `auto_install` (`BUNDLE_AUTO_INSTALL`):
+ Automatically run `bundle install` when gems are missing.
+* `bin` (`BUNDLE_BIN`):
+ Install executables from gems in the bundle to the specified directory.
+ Defaults to `false`.
+* `cache_all` (`BUNDLE_CACHE_ALL`):
+ Cache all gems, including path and git gems. This needs to be explicitly
+ configured on bundler 1 and bundler 2, but will be the default on bundler 3.
+* `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`):
+ Cache gems for all platforms.
+* `cache_path` (`BUNDLE_CACHE_PATH`):
+ The directory that bundler will place cached gems in when running
+ <code>bundle package</code>, and that bundler will look in when installing gems.
+ Defaults to `vendor/cache`.
+* `clean` (`BUNDLE_CLEAN`):
+ Whether Bundler should run `bundle clean` automatically after
+ `bundle install`.
+* `console` (`BUNDLE_CONSOLE`):
+ The console that `bundle console` starts. Defaults to `irb`.
+* `default_install_uses_path` (`BUNDLE_DEFAULT_INSTALL_USES_PATH`):
+ Whether a `bundle install` without an explicit `--path` argument defaults
+ to installing gems in `.bundle`.
+* `deployment` (`BUNDLE_DEPLOYMENT`):
+ Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
+ lockfile has not been updated, running Bundler commands will be blocked.
+* `disable_checksum_validation` (`BUNDLE_DISABLE_CHECKSUM_VALIDATION`):
+ Allow installing gems even if they do not match the checksum provided by
+ RubyGems.
+* `disable_exec_load` (`BUNDLE_DISABLE_EXEC_LOAD`):
+ Stop Bundler from using `load` to launch an executable in-process in
+ `bundle exec`.
+* `disable_local_branch_check` (`BUNDLE_DISABLE_LOCAL_BRANCH_CHECK`):
+ Allow Bundler to use a local git override without a branch specified in the
+ Gemfile.
+* `disable_local_revision_check` (`BUNDLE_DISABLE_LOCAL_REVISION_CHECK`):
+ Allow Bundler to use a local git override without checking if the revision
+ present in the lockfile is present in the repository.
+* `disable_shared_gems` (`BUNDLE_DISABLE_SHARED_GEMS`):
+ Stop Bundler from accessing gems installed to RubyGems' normal location.
+* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
+ Stop Bundler from checking if a newer Bundler version is available on
+ rubygems.org.
+* `force_ruby_platform` (`BUNDLE_FORCE_RUBY_PLATFORM`):
+ Ignore the current machine's platform and install only `ruby` platform gems.
+ As a result, gems with native extensions will be compiled from source.
+* `frozen` (`BUNDLE_FROZEN`):
+ Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
+ lockfile has not been updated, running Bundler commands will be blocked.
+ Defaults to `true` when `--deployment` is used.
+* `gem.github_username` (`BUNDLE_GEM__GITHUB_USERNAME`):
+ Sets a GitHub username or organization to be used in `README` file when you
+ create a new gem via `bundle gem` command. It can be overridden by passing an
+ explicit `--github-username` flag to `bundle gem`.
+* `gem.push_key` (`BUNDLE_GEM__PUSH_KEY`):
+ Sets the `--key` parameter for `gem push` when using the `rake release`
+ command with a private gemstash server.
+* `gemfile` (`BUNDLE_GEMFILE`):
+ The name of the file that bundler should use as the `Gemfile`. This location
+ of this file also sets the root of the project, which is used to resolve
+ relative paths in the `Gemfile`, among other things. By default, bundler
+ will search up from the current working directory until it finds a
+ `Gemfile`.
+* `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
+ Whether Bundler should cache all gems globally, rather than locally to the
+ installing Ruby installation.
+* `ignore_funding_requests` (`BUNDLE_IGNORE_FUNDING_REQUESTS`):
+ When set, no funding requests will be printed.
+* `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`):
+ When set, no post install messages will be printed. To silence a single gem,
+ use dot notation like `ignore_messages.httparty true`.
+* `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`):
+ Generate a `gems.rb` instead of a `Gemfile` when running `bundle init`.
+* `jobs` (`BUNDLE_JOBS`):
+ The number of gems Bundler can install in parallel. Defaults to the number of
+ available processors.
+* `no_install` (`BUNDLE_NO_INSTALL`):
+ Whether `bundle package` should skip installing gems.
+* `no_prune` (`BUNDLE_NO_PRUNE`):
+ Whether Bundler should leave outdated gems unpruned when caching.
+* `only` (`BUNDLE_ONLY`):
+ A space-separated list of groups to install only gems of the specified groups.
+* `path` (`BUNDLE_PATH`):
+ The location on disk where all gems in your bundle will be located regardless
+ of `$GEM_HOME` or `$GEM_PATH` values. Bundle gems not found in this location
+ will be installed by `bundle install`. Defaults to `Gem.dir`. When --deployment
+ is used, defaults to vendor/bundle.
+* `path.system` (`BUNDLE_PATH__SYSTEM`):
+ Whether Bundler will install gems into the default system path (`Gem.dir`).
+* `path_relative_to_cwd` (`BUNDLE_PATH_RELATIVE_TO_CWD`)
+ Makes `--path` relative to the CWD instead of the `Gemfile`.
+* `plugins` (`BUNDLE_PLUGINS`):
+ Enable Bundler's experimental plugin system.
+* `prefer_patch` (BUNDLE_PREFER_PATCH):
+ Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
+* `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`):
+ Print only version number from `bundler --version`.
+* `redirect` (`BUNDLE_REDIRECT`):
+ The number of redirects allowed for network requests. Defaults to `5`.
+* `retry` (`BUNDLE_RETRY`):
+ The number of times to retry failed network requests. Defaults to `3`.
+* `setup_makes_kernel_gem_public` (`BUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC`):
+ Have `Bundler.setup` make the `Kernel#gem` method public, even though
+ RubyGems declares it as private.
+* `shebang` (`BUNDLE_SHEBANG`):
+ The program name that should be invoked for generated binstubs. Defaults to
+ the ruby install name used to generate the binstub.
+* `silence_deprecations` (`BUNDLE_SILENCE_DEPRECATIONS`):
+ Whether Bundler should silence deprecation warnings for behavior that will
+ be changed in the next major version.
+* `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`):
+ Silence the warning Bundler prints when installing gems as root.
+* `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`):
+ Path to a designated CA certificate file or folder containing multiple
+ certificates for trusted CAs in PEM format.
+* `ssl_client_cert` (`BUNDLE_SSL_CLIENT_CERT`):
+ Path to a designated file containing a X.509 client certificate
+ and key in PEM format.
+* `ssl_verify_mode` (`BUNDLE_SSL_VERIFY_MODE`):
+ The SSL verification mode Bundler uses when making HTTPS requests.
+ Defaults to verify peer.
+* `system_bindir` (`BUNDLE_SYSTEM_BINDIR`):
+ The location where RubyGems installs binstubs. Defaults to `Gem.bindir`.
+* `timeout` (`BUNDLE_TIMEOUT`):
+ The seconds allowed before timing out for network requests. Defaults to `10`.
+* `update_requires_all_flag` (`BUNDLE_UPDATE_REQUIRES_ALL_FLAG`):
+ Require passing `--all` to `bundle update` when everything should be updated,
+ and disallow passing no options to `bundle update`.
+* `user_agent` (`BUNDLE_USER_AGENT`):
+ The custom user agent fragment Bundler includes in API requests.
+* `with` (`BUNDLE_WITH`):
+ A `:`-separated list of groups whose gems bundler should install.
+* `without` (`BUNDLE_WITHOUT`):
+ A `:`-separated list of groups whose gems bundler should not install.
+
+In general, you should set these settings per-application by using the applicable
+flag to the [bundle install(1)](bundle-install.1.html) or [bundle cache(1)](bundle-cache.1.html) command.
+
+You can set them globally either via environment variables or `bundle config`,
+whichever is preferable for your setup. If you use both, environment variables
+will take preference over global settings.
+
+## LOCAL GIT REPOS
+
+Bundler also allows you to work against a git repository locally
+instead of using the remote version. This can be achieved by setting
+up a local override:
+
+ bundle config set --local local.GEM_NAME /path/to/local/git/repository
+
+For example, in order to use a local Rack repository, a developer could call:
+
+ bundle config set --local local.rack ~/Work/git/rack
+
+Now instead of checking out the remote git repository, the local
+override will be used. Similar to a path source, every time the local
+git repository change, changes will be automatically picked up by
+Bundler. This means a commit in the local git repo will update the
+revision in the `Gemfile.lock` to the local git repo revision. This
+requires the same attention as git submodules. Before pushing to
+the remote, you need to ensure the local override was pushed, otherwise
+you may point to a commit that only exists in your local machine.
+You'll also need to CGI escape your usernames and passwords as well.
+
+Bundler does many checks to ensure a developer won't work with
+invalid references. Particularly, we force a developer to specify
+a branch in the `Gemfile` in order to use this feature. If the branch
+specified in the `Gemfile` and the current branch in the local git
+repository do not match, Bundler will abort. This ensures that
+a developer is always working against the correct branches, and prevents
+accidental locking to a different branch.
+
+Finally, Bundler also ensures that the current revision in the
+`Gemfile.lock` exists in the local git repository. By doing this, Bundler
+forces you to fetch the latest changes in the remotes.
+
+## MIRRORS OF GEM SOURCES
+
+Bundler supports overriding gem sources with mirrors. This allows you to
+configure rubygems.org as the gem source in your Gemfile while still using your
+mirror to fetch gems.
+
+ bundle config set --global mirror.SOURCE_URL MIRROR_URL
+
+For example, to use a mirror of https://rubygems.org hosted at https://example.org:
+
+ bundle config set --global mirror.https://rubygems.org https://example.org
+
+Each mirror also provides a fallback timeout setting. If the mirror does not
+respond within the fallback timeout, Bundler will try to use the original
+server instead of the mirror.
+
+ bundle config set --global mirror.SOURCE_URL.fallback_timeout TIMEOUT
+
+For example, to fall back to rubygems.org after 3 seconds:
+
+ bundle config set --global mirror.https://rubygems.org.fallback_timeout 3
+
+The default fallback timeout is 0.1 seconds, but the setting can currently
+only accept whole seconds (for example, 1, 15, or 30).
+
+## CREDENTIALS FOR GEM SOURCES
+
+Bundler allows you to configure credentials for any gem source, which allows
+you to avoid putting secrets into your Gemfile.
+
+ bundle config set --global SOURCE_HOSTNAME USERNAME:PASSWORD
+
+For example, to save the credentials of user `claudette` for the gem source at
+`gems.longerous.com`, you would run:
+
+ bundle config set --global gems.longerous.com claudette:s00pers3krit
+
+Or you can set the credentials as an environment variable like this:
+
+ export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit"
+
+For gems with a git source with HTTP(S) URL you can specify credentials like so:
+
+ bundle config set --global https://github.com/rubygems/rubygems.git username:password
+
+Or you can set the credentials as an environment variable like so:
+
+ export BUNDLE_GITHUB__COM=username:password
+
+This is especially useful for private repositories on hosts such as GitHub,
+where you can use personal OAuth tokens:
+
+ export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x-oauth-basic
+
+Note that any configured credentials will be redacted by informative commands
+such as `bundle config list` or `bundle config get`, unless you use the
+`--parseable` flag. This is to avoid unintentionally leaking credentials when
+copy-pasting bundler output.
+
+Also note that to guarantee a sane mapping between valid environment variable
+names and valid host names, bundler makes the following transformations:
+
+* Any `-` characters in a host name are mapped to a triple dash (`___`) in the
+ corresponding environment variable.
+
+* Any `.` characters in a host name are mapped to a double dash (`__`) in the
+ corresponding environment variable.
+
+This means that if you have a gem server named `my.gem-host.com`, you'll need to
+use the `BUNDLE_MY__GEM___HOST__COM` variable to configure credentials for it
+through ENV.
+
+## CONFIGURE BUNDLER DIRECTORIES
+
+Bundler's home, config, cache and plugin directories are able to be configured
+through environment variables. The default location for Bundler's home directory is
+`~/.bundle`, which all directories inherit from by default. The following
+outlines the available environment variables and their default values
+
+ BUNDLE_USER_HOME : $HOME/.bundle
+ BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache
+ BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config
+ BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin
diff --git a/lib/bundler/man/bundle-console.1 b/lib/bundler/man/bundle-console.1
new file mode 100644
index 0000000000..24fff46cec
--- /dev/null
+++ b/lib/bundler/man/bundle-console.1
@@ -0,0 +1,53 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CONSOLE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
+.
+.SH "SYNOPSIS"
+\fBbundle console\fR [GROUP]
+.
+.SH "DESCRIPTION"
+Starts an interactive Ruby console session in the context of the current bundle\.
+.
+.P
+If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR are preliminarily loaded\.
+.
+.P
+If \fBGROUP\fR is specified, all gems in the given group in the Gemfile in addition to the gems in \fBdefault\fR group are loaded\. Even if the given group does not exist in the Gemfile, IRB console starts without any warning or error\.
+.
+.P
+The environment variable \fBBUNDLE_CONSOLE\fR or \fBbundle config set console\fR can be used to change the shell from the following:
+.
+.IP "\(bu" 4
+\fBirb\fR (default)
+.
+.IP "\(bu" 4
+\fBpry\fR (https://github\.com/pry/pry)
+.
+.IP "\(bu" 4
+\fBripl\fR (https://github\.com/cldwalker/ripl)
+.
+.IP "" 0
+.
+.P
+\fBbundle console\fR uses irb by default\. An alternative Pry or Ripl can be used with \fBbundle console\fR by adjusting the \fBconsole\fR Bundler setting\. Also make sure that \fBpry\fR or \fBripl\fR is in your Gemfile\.
+.
+.SH "EXAMPLE"
+.
+.nf
+
+$ bundle config set console pry
+$ bundle console
+Resolving dependencies\.\.\.
+[1] pry(main)>
+.
+.fi
+.
+.SH "NOTES"
+This command was deprecated in Bundler 2\.1 and will be removed in 3\.0\. Use \fBbin/console\fR script, which can be generated by \fBbundle gem <NAME>\fR\.
+.
+.SH "SEE ALSO"
+Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
diff --git a/lib/bundler/man/bundle-console.1.ronn b/lib/bundler/man/bundle-console.1.ronn
new file mode 100644
index 0000000000..f9096d386a
--- /dev/null
+++ b/lib/bundler/man/bundle-console.1.ronn
@@ -0,0 +1,44 @@
+bundle-console(1) -- Deprecated way to open an IRB session with the bundle pre-loaded
+=====================================================================================
+
+## SYNOPSIS
+
+`bundle console` [GROUP]
+
+## DESCRIPTION
+
+Starts an interactive Ruby console session in the context of the current bundle.
+
+If no `GROUP` is specified, all gems in the `default` group in the [Gemfile(5)](https://bundler.io/man/gemfile.5.html) are
+preliminarily loaded.
+
+If `GROUP` is specified, all gems in the given group in the Gemfile in addition
+to the gems in `default` group are loaded. Even if the given group does not
+exist in the Gemfile, IRB console starts without any warning or error.
+
+The environment variable `BUNDLE_CONSOLE` or `bundle config set console` can be used to change
+the shell from the following:
+
+* `irb` (default)
+* `pry` (https://github.com/pry/pry)
+* `ripl` (https://github.com/cldwalker/ripl)
+
+`bundle console` uses irb by default. An alternative Pry or Ripl can be used with
+`bundle console` by adjusting the `console` Bundler setting. Also make sure that
+`pry` or `ripl` is in your Gemfile.
+
+## EXAMPLE
+
+ $ bundle config set console pry
+ $ bundle console
+ Resolving dependencies...
+ [1] pry(main)>
+
+## NOTES
+
+This command was deprecated in Bundler 2.1 and will be removed in 3.0.
+Use `bin/console` script, which can be generated by `bundle gem <NAME>`.
+
+## SEE ALSO
+
+[Gemfile(5)](https://bundler.io/man/gemfile.5.html)
diff --git a/lib/bundler/man/bundle-doctor.1 b/lib/bundler/man/bundle-doctor.1
new file mode 100644
index 0000000000..57da8216cb
--- /dev/null
+++ b/lib/bundler/man/bundle-doctor.1
@@ -0,0 +1,44 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-DOCTOR" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-doctor\fR \- Checks the bundle for common problems
+.
+.SH "SYNOPSIS"
+\fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
+.
+.SH "DESCRIPTION"
+Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
+.
+.P
+Examples of common problems caught by bundle\-doctor include:
+.
+.IP "\(bu" 4
+Invalid Bundler settings
+.
+.IP "\(bu" 4
+Mismatched Ruby versions
+.
+.IP "\(bu" 4
+Mismatched platforms
+.
+.IP "\(bu" 4
+Uninstalled gems
+.
+.IP "\(bu" 4
+Missing dependencies
+.
+.IP "" 0
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-quiet\fR
+Only output warnings and errors\.
+.
+.TP
+\fB\-\-gemfile=<gemfile>\fR
+The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
+
diff --git a/man/bundle-doctor.ronn b/lib/bundler/man/bundle-doctor.1.ronn
index 271ee800ad..271ee800ad 100644
--- a/man/bundle-doctor.ronn
+++ b/lib/bundler/man/bundle-doctor.1.ronn
diff --git a/lib/bundler/man/bundle-exec.1 b/lib/bundler/man/bundle-exec.1
new file mode 100644
index 0000000000..852788db7a
--- /dev/null
+++ b/lib/bundler/man/bundle-exec.1
@@ -0,0 +1,165 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-EXEC" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-exec\fR \- Execute a command in the context of the bundle
+.
+.SH "SYNOPSIS"
+\fBbundle exec\fR [\-\-keep\-file\-descriptors] \fIcommand\fR
+.
+.SH "DESCRIPTION"
+This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruby programs\.
+.
+.P
+Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
+.
+.P
+Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-keep\-file\-descriptors\fR
+Exec in Ruby 2\.0 began discarding non\-standard file descriptors\. When this flag is passed, exec will revert to the 1\.9 behaviour of passing all file descriptors to the new process\.
+.
+.SH "BUNDLE INSTALL \-\-BINSTUBS"
+If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
+.
+.P
+After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
+.
+.SH "ENVIRONMENT MODIFICATIONS"
+\fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
+.
+.IP "\(bu" 4
+make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
+.
+.IP "\(bu" 4
+put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
+.
+.IP "\(bu" 4
+make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
+.
+.IP "\(bu" 4
+add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
+.
+.IP "" 0
+.
+.P
+It also modifies Rubygems:
+.
+.IP "\(bu" 4
+disallow loading additional gems not in the bundle
+.
+.IP "\(bu" 4
+modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it\'s not
+.
+.IP "\(bu" 4
+Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment
+.
+.IP "\(bu" 4
+Override \fBGem\.bin_path\fR to use the gems in the bundle, making system executables work
+.
+.IP "\(bu" 4
+Add all gems in the bundle into Gem\.loaded_specs
+.
+.IP "" 0
+.
+.P
+Finally, \fBbundle exec\fR also implicitly modifies \fBGemfile\.lock\fR if the lockfile and the Gemfile do not match\. Bundler needs the Gemfile to determine things such as a gem\'s groups, \fBautorequire\fR, and platforms, etc\., and that information isn\'t stored in the lockfile\. The Gemfile and lockfile must be synced in order to \fBbundle exec\fR successfully, so \fBbundle exec\fR updates the lockfile beforehand\.
+.
+.SS "Loading"
+By default, when attempting to \fBbundle exec\fR to a file with a ruby shebang, Bundler will \fBKernel\.load\fR that file instead of using \fBKernel\.exec\fR\. For the vast majority of cases, this is a performance improvement\. In a rare few cases, this could cause some subtle side\-effects (such as dependence on the exact contents of \fB$0\fR or \fB__FILE__\fR) and the optimization can be disabled by enabling the \fBdisable_exec_load\fR setting\.
+.
+.SS "Shelling out"
+Any Ruby code that opens a subshell (like \fBsystem\fR, backticks, or \fB%x{}\fR) will automatically use the current Bundler environment\. If you need to shell out to a Ruby command that is not part of your current bundle, use the \fBwith_unbundled_env\fR method with a block\. Any subshells created inside the block will be given the environment present before Bundler was activated\. For example, Homebrew commands run Ruby, but don\'t work inside a bundle:
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.with_unbundled_env do
+ `brew install wget`
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Using \fBwith_unbundled_env\fR is also necessary if you are shelling out to a different bundle\. Any Bundler commands run in a subshell will inherit the current Gemfile, so commands that need to run in the context of a different bundle also need to use \fBwith_unbundled_env\fR\.
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.with_unbundled_env do
+ Dir\.chdir "/other/bundler/project" do
+ `bundle exec \./script`
+ end
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.clean_system(\'brew install wget\')
+Bundler\.clean_exec(\'brew install wget\')
+.
+.fi
+.
+.IP "" 0
+.
+.SH "RUBYGEMS PLUGINS"
+At present, the Rubygems plugin system requires all files named \fBrubygems_plugin\.rb\fR on the load path of \fIany\fR installed gem when any Ruby code requires \fBrubygems\.rb\fR\. This includes executables installed into the system, like \fBrails\fR, \fBrackup\fR, and \fBrspec\fR\.
+.
+.P
+Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies\.
+.
+.P
+For instance, the \fBgemcutter 0\.5\fR gem depended on \fBjson_pure\fR\. If you had that version of gemcutter installed (even if you \fIalso\fR had a newer version without this problem), Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
+.
+.P
+If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
+.
+.P
+If this happens, bundler will say:
+.
+.IP "" 4
+.
+.nf
+
+You have already activated json_pure 1\.4\.6 but your Gemfile
+requires json_pure 1\.4\.3\. Consider using bundle exec\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
+.
+.P
+You can find a list of all the gems containing gem plugins by running
+.
+.IP "" 4
+.
+.nf
+
+ruby \-e "puts Gem\.find_files(\'rubygems_plugin\.rb\')"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren\'t using (\fBgem uninstall gem_name\fR)\.
diff --git a/lib/bundler/man/bundle-exec.1.ronn b/lib/bundler/man/bundle-exec.1.ronn
new file mode 100644
index 0000000000..05948095e2
--- /dev/null
+++ b/lib/bundler/man/bundle-exec.1.ronn
@@ -0,0 +1,152 @@
+bundle-exec(1) -- Execute a command in the context of the bundle
+================================================================
+
+## SYNOPSIS
+
+`bundle exec` [--keep-file-descriptors] <command>
+
+## DESCRIPTION
+
+This command executes the command, making all gems specified in the
+[`Gemfile(5)`][Gemfile(5)] available to `require` in Ruby programs.
+
+Essentially, if you would normally have run something like
+`rspec spec/my_spec.rb`, and you want to use the gems specified
+in the [`Gemfile(5)`][Gemfile(5)] and installed via [bundle install(1)](bundle-install.1.html), you
+should run `bundle exec rspec spec/my_spec.rb`.
+
+Note that `bundle exec` does not require that an executable is
+available on your shell's `$PATH`.
+
+## OPTIONS
+
+* `--keep-file-descriptors`:
+ Exec in Ruby 2.0 began discarding non-standard file descriptors. When this
+ flag is passed, exec will revert to the 1.9 behaviour of passing all file
+ descriptors to the new process.
+
+## BUNDLE INSTALL --BINSTUBS
+
+If you use the `--binstubs` flag in [bundle install(1)](bundle-install.1.html), Bundler will
+automatically create a directory (which defaults to `app_root/bin`)
+containing all of the executables available from gems in the bundle.
+
+After using `--binstubs`, `bin/rspec spec/my_spec.rb` is identical
+to `bundle exec rspec spec/my_spec.rb`.
+
+## ENVIRONMENT MODIFICATIONS
+
+`bundle exec` makes a number of changes to the shell environment,
+then executes the command you specify in full.
+
+* make sure that it's still possible to shell out to `bundle`
+ from inside a command invoked by `bundle exec` (using
+ `$BUNDLE_BIN_PATH`)
+* put the directory containing executables (like `rails`, `rspec`,
+ `rackup`) for your bundle on `$PATH`
+* make sure that if bundler is invoked in the subshell, it uses
+ the same `Gemfile` (by setting `BUNDLE_GEMFILE`)
+* add `-rbundler/setup` to `$RUBYOPT`, which makes sure that
+ Ruby programs invoked in the subshell can see the gems in
+ the bundle
+
+It also modifies Rubygems:
+
+* disallow loading additional gems not in the bundle
+* modify the `gem` method to be a no-op if a gem matching
+ the requirements is in the bundle, and to raise a
+ `Gem::LoadError` if it's not
+* Define `Gem.refresh` to be a no-op, since the source
+ index is always frozen when using bundler, and to
+ prevent gems from the system leaking into the environment
+* Override `Gem.bin_path` to use the gems in the bundle,
+ making system executables work
+* Add all gems in the bundle into Gem.loaded_specs
+
+Finally, `bundle exec` also implicitly modifies `Gemfile.lock` if the lockfile
+and the Gemfile do not match. Bundler needs the Gemfile to determine things
+such as a gem's groups, `autorequire`, and platforms, etc., and that
+information isn't stored in the lockfile. The Gemfile and lockfile must be
+synced in order to `bundle exec` successfully, so `bundle exec`
+updates the lockfile beforehand.
+
+### Loading
+
+By default, when attempting to `bundle exec` to a file with a ruby shebang,
+Bundler will `Kernel.load` that file instead of using `Kernel.exec`. For the
+vast majority of cases, this is a performance improvement. In a rare few cases,
+this could cause some subtle side-effects (such as dependence on the exact
+contents of `$0` or `__FILE__`) and the optimization can be disabled by enabling
+the `disable_exec_load` setting.
+
+### Shelling out
+
+Any Ruby code that opens a subshell (like `system`, backticks, or `%x{}`) will
+automatically use the current Bundler environment. If you need to shell out to
+a Ruby command that is not part of your current bundle, use the
+`with_unbundled_env` method with a block. Any subshells created inside the block
+will be given the environment present before Bundler was activated. For
+example, Homebrew commands run Ruby, but don't work inside a bundle:
+
+ Bundler.with_unbundled_env do
+ `brew install wget`
+ end
+
+Using `with_unbundled_env` is also necessary if you are shelling out to a different
+bundle. Any Bundler commands run in a subshell will inherit the current
+Gemfile, so commands that need to run in the context of a different bundle also
+need to use `with_unbundled_env`.
+
+ Bundler.with_unbundled_env do
+ Dir.chdir "/other/bundler/project" do
+ `bundle exec ./script`
+ end
+ end
+
+Bundler provides convenience helpers that wrap `system` and `exec`, and they
+can be used like this:
+
+ Bundler.clean_system('brew install wget')
+ Bundler.clean_exec('brew install wget')
+
+
+## RUBYGEMS PLUGINS
+
+At present, the Rubygems plugin system requires all files
+named `rubygems_plugin.rb` on the load path of _any_ installed
+gem when any Ruby code requires `rubygems.rb`. This includes
+executables installed into the system, like `rails`, `rackup`,
+and `rspec`.
+
+Since Rubygems plugins can contain arbitrary Ruby code, they
+commonly end up activating themselves or their dependencies.
+
+For instance, the `gemcutter 0.5` gem depended on `json_pure`.
+If you had that version of gemcutter installed (even if
+you _also_ had a newer version without this problem), Rubygems
+would activate `gemcutter 0.5` and `json_pure <latest>`.
+
+If your Gemfile(5) also contained `json_pure` (or a gem
+with a dependency on `json_pure`), the latest version on
+your system might conflict with the version in your
+Gemfile(5), or the snapshot version in your `Gemfile.lock`.
+
+If this happens, bundler will say:
+
+ You have already activated json_pure 1.4.6 but your Gemfile
+ requires json_pure 1.4.3. Consider using bundle exec.
+
+In this situation, you almost certainly want to remove the
+underlying gem with the problematic gem plugin. In general,
+the authors of these plugins (in this case, the `gemcutter`
+gem) have released newer versions that are more careful in
+their plugins.
+
+You can find a list of all the gems containing gem plugins
+by running
+
+ ruby -e "puts Gem.find_files('rubygems_plugin.rb')"
+
+At the very least, you should remove all but the newest
+version of each gem plugin, and also remove all gem plugins
+that you aren't using (`gem uninstall gem_name`).
diff --git a/lib/bundler/man/bundle-gem.1 b/lib/bundler/man/bundle-gem.1
new file mode 100644
index 0000000000..8339b727ce
--- /dev/null
+++ b/lib/bundler/man/bundle-gem.1
@@ -0,0 +1,105 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-GEM" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
+.
+.SH "SYNOPSIS"
+\fBbundle gem\fR \fIGEM_NAME\fR \fIOPTIONS\fR
+.
+.SH "DESCRIPTION"
+Generates a directory named \fBGEM_NAME\fR with a \fBRakefile\fR, \fBGEM_NAME\.gemspec\fR, and other supporting files and directories that can be used to develop a rubygem with that name\.
+.
+.P
+Run \fBrake \-T\fR in the resulting project for a list of Rake tasks that can be used to test and publish the gem to rubygems\.org\.
+.
+.P
+The generated project skeleton can be customized with OPTIONS, as explained below\. Note that these options can also be specified via Bundler\'s global configuration file using the following names:
+.
+.IP "\(bu" 4
+\fBgem\.coc\fR
+.
+.IP "\(bu" 4
+\fBgem\.mit\fR
+.
+.IP "\(bu" 4
+\fBgem\.test\fR
+.
+.IP "" 0
+.
+.SH "OPTIONS"
+.
+.IP "\(bu" 4
+\fB\-\-exe\fR or \fB\-b\fR or \fB\-\-bin\fR: Specify that Bundler should create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by default\.
+.
+.IP "\(bu" 4
+\fB\-\-no\-exe\fR: Do not create a binary (overrides \fB\-\-exe\fR specified in the global config)\.
+.
+.IP "\(bu" 4
+\fB\-\-coc\fR: Add a \fBCODE_OF_CONDUCT\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
+.
+.IP "\(bu" 4
+\fB\-\-no\-coc\fR: Do not create a \fBCODE_OF_CONDUCT\.md\fR (overrides \fB\-\-coc\fR specified in the global config)\.
+.
+.IP "\(bu" 4
+\fB\-\-ext=c\fR, \fB\-\-ext=rust\fR Add boilerplate for C or Rust (currently magnus \fIhttps://docs\.rs/magnus\fR based) extension code to the generated project\. This behavior is disabled by default\.
+.
+.IP "\(bu" 4
+\fB\-\-no\-ext\fR: Do not add extension code (overrides \fB\-\-ext\fR specified in the global config)\.
+.
+.IP "\(bu" 4
+\fB\-\-mit\fR: Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
+.
+.IP "\(bu" 4
+\fB\-\-no\-mit\fR: Do not create a \fBLICENSE\.txt\fR (overrides \fB\-\-mit\fR specified in the global config)\.
+.
+.IP "\(bu" 4
+\fB\-t\fR, \fB\-\-test=minitest\fR, \fB\-\-test=rspec\fR, \fB\-\-test=test\-unit\fR: Specify the test framework that Bundler should use when generating the project\. Acceptable values are \fBminitest\fR, \fBrspec\fR and \fBtest\-unit\fR\. The \fBGEM_NAME\.gemspec\fR will be configured and a skeleton test/spec directory will be created based on this option\. Given no option is specified:
+.
+.IP
+When Bundler is configured to generate tests, this defaults to Bundler\'s global config setting \fBgem\.test\fR\.
+.
+.IP
+When Bundler is configured to not generate tests, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
+.
+.IP
+When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
+.
+.IP "\(bu" 4
+\fB\-\-ci\fR, \fB\-\-ci=github\fR, \fB\-\-ci=gitlab\fR, \fB\-\-ci=circle\fR: Specify the continuous integration service that Bundler should use when generating the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
+.
+.IP
+When Bundler is configured to generate CI files, this defaults to Bundler\'s global config setting \fBgem\.ci\fR\.
+.
+.IP
+When Bundler is configured to not generate CI files, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
+.
+.IP
+When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
+.
+.IP "\(bu" 4
+\fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR: Specify the linter and code formatter that Bundler should add to the project\'s development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
+.
+.IP
+When Bundler is configured to add a linter, this defaults to Bundler\'s global config setting \fBgem\.linter\fR\.
+.
+.IP
+When Bundler is configured not to add a linter, an interactive prompt will be displayed and the answer will be used for the current rubygem project\.
+.
+.IP
+When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
+.
+.IP "\(bu" 4
+\fB\-e\fR, \fB\-\-edit[=EDITOR]\fR: Open the resulting GEM_NAME\.gemspec in EDITOR, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
+.
+.IP "" 0
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+bundle config(1) \fIbundle\-config\.1\.html\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-gem.1.ronn b/lib/bundler/man/bundle-gem.1.ronn
new file mode 100644
index 0000000000..46fa2f179f
--- /dev/null
+++ b/lib/bundler/man/bundle-gem.1.ronn
@@ -0,0 +1,117 @@
+bundle-gem(1) -- Generate a project skeleton for creating a rubygem
+====================================================================
+
+## SYNOPSIS
+
+`bundle gem` <GEM_NAME> [OPTIONS]
+
+## DESCRIPTION
+
+Generates a directory named `GEM_NAME` with a `Rakefile`, `GEM_NAME.gemspec`,
+and other supporting files and directories that can be used to develop a
+rubygem with that name.
+
+Run `rake -T` in the resulting project for a list of Rake tasks that can be used
+to test and publish the gem to rubygems.org.
+
+The generated project skeleton can be customized with OPTIONS, as explained
+below. Note that these options can also be specified via Bundler's global
+configuration file using the following names:
+
+* `gem.coc`
+* `gem.mit`
+* `gem.test`
+
+## OPTIONS
+
+* `--exe` or `-b` or `--bin`:
+ Specify that Bundler should create a binary executable (as `exe/GEM_NAME`)
+ in the generated rubygem project. This binary will also be added to the
+ `GEM_NAME.gemspec` manifest. This behavior is disabled by default.
+
+* `--no-exe`:
+ Do not create a binary (overrides `--exe` specified in the global config).
+
+* `--coc`:
+ Add a `CODE_OF_CONDUCT.md` file to the root of the generated project. If
+ this option is unspecified, an interactive prompt will be displayed and the
+ answer will be saved in Bundler's global config for future `bundle gem` use.
+
+* `--no-coc`:
+ Do not create a `CODE_OF_CONDUCT.md` (overrides `--coc` specified in the
+ global config).
+
+* `--ext=c`, `--ext=rust`
+ Add boilerplate for C or Rust (currently [magnus](https://docs.rs/magnus) based) extension code to the generated project. This behavior
+ is disabled by default.
+
+* `--no-ext`:
+ Do not add extension code (overrides `--ext` specified in the global
+ config).
+
+* `--mit`:
+ Add an MIT license to a `LICENSE.txt` file in the root of the generated
+ project. Your name from the global git config is used for the copyright
+ statement. If this option is unspecified, an interactive prompt will be
+ displayed and the answer will be saved in Bundler's global config for future
+ `bundle gem` use.
+
+* `--no-mit`:
+ Do not create a `LICENSE.txt` (overrides `--mit` specified in the global
+ config).
+
+* `-t`, `--test=minitest`, `--test=rspec`, `--test=test-unit`:
+ Specify the test framework that Bundler should use when generating the
+ project. Acceptable values are `minitest`, `rspec` and `test-unit`. The
+ `GEM_NAME.gemspec` will be configured and a skeleton test/spec directory will
+ be created based on this option. Given no option is specified:
+
+ When Bundler is configured to generate tests, this defaults to Bundler's
+ global config setting `gem.test`.
+
+ When Bundler is configured to not generate tests, an interactive prompt will
+ be displayed and the answer will be used for the current rubygem project.
+
+ When Bundler is unconfigured, an interactive prompt will be displayed and
+ the answer will be saved in Bundler's global config for future `bundle gem`
+ use.
+
+* `--ci`, `--ci=github`, `--ci=gitlab`, `--ci=circle`:
+ Specify the continuous integration service that Bundler should use when
+ generating the project. Acceptable values are `github`, `gitlab`
+ and `circle`. A configuration file will be generated in the project directory.
+ Given no option is specified:
+
+ When Bundler is configured to generate CI files, this defaults to Bundler's
+ global config setting `gem.ci`.
+
+ When Bundler is configured to not generate CI files, an interactive prompt
+ will be displayed and the answer will be used for the current rubygem project.
+
+ When Bundler is unconfigured, an interactive prompt will be displayed and
+ the answer will be saved in Bundler's global config for future `bundle gem`
+ use.
+
+* `--linter`, `--linter=rubocop`, `--linter=standard`:
+ Specify the linter and code formatter that Bundler should add to the
+ project's development dependencies. Acceptable values are `rubocop` and
+ `standard`. A configuration file will be generated in the project directory.
+ Given no option is specified:
+
+ When Bundler is configured to add a linter, this defaults to Bundler's
+ global config setting `gem.linter`.
+
+ When Bundler is configured not to add a linter, an interactive prompt
+ will be displayed and the answer will be used for the current rubygem project.
+
+ When Bundler is unconfigured, an interactive prompt will be displayed and
+ the answer will be saved in Bundler's global config for future `bundle gem`
+ use.
+
+* `-e`, `--edit[=EDITOR]`:
+ Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
+ specified. The default is `$BUNDLER_EDITOR`, `$VISUAL`, or `$EDITOR`.
+
+## SEE ALSO
+
+* [bundle config(1)](bundle-config.1.html)
diff --git a/lib/bundler/man/bundle-help.1 b/lib/bundler/man/bundle-help.1
new file mode 100644
index 0000000000..9787c2d49f
--- /dev/null
+++ b/lib/bundler/man/bundle-help.1
@@ -0,0 +1,13 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-HELP" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-help\fR \- Displays detailed help for each subcommand
+.
+.SH "SYNOPSIS"
+\fBbundle help\fR [COMMAND]
+.
+.SH "DESCRIPTION"
+Displays detailed help for the given subcommand\. You can specify a single \fBCOMMAND\fR at the same time\. When \fBCOMMAND\fR is omitted, help for \fBhelp\fR command will be displayed\.
diff --git a/lib/bundler/man/bundle-help.1.ronn b/lib/bundler/man/bundle-help.1.ronn
new file mode 100644
index 0000000000..0e144aead7
--- /dev/null
+++ b/lib/bundler/man/bundle-help.1.ronn
@@ -0,0 +1,12 @@
+bundle-help(1) -- Displays detailed help for each subcommand
+============================================================
+
+## SYNOPSIS
+
+`bundle help` [COMMAND]
+
+## DESCRIPTION
+
+Displays detailed help for the given subcommand.
+You can specify a single `COMMAND` at the same time.
+When `COMMAND` is omitted, help for `help` command will be displayed.
diff --git a/lib/bundler/man/bundle-info.1 b/lib/bundler/man/bundle-info.1
new file mode 100644
index 0000000000..2cced71520
--- /dev/null
+++ b/lib/bundler/man/bundle-info.1
@@ -0,0 +1,20 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-INFO" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-info\fR \- Show information for the given gem in your bundle
+.
+.SH "SYNOPSIS"
+\fBbundle info\fR [GEM_NAME] [\-\-path]
+.
+.SH "DESCRIPTION"
+Given a gem name present in your bundle, print the basic information about it such as homepage, version, path and summary\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-path\fR
+Print the path of the given gem
+
diff --git a/lib/bundler/man/bundle-info.1.ronn b/lib/bundler/man/bundle-info.1.ronn
new file mode 100644
index 0000000000..cecdeb564f
--- /dev/null
+++ b/lib/bundler/man/bundle-info.1.ronn
@@ -0,0 +1,17 @@
+bundle-info(1) -- Show information for the given gem in your bundle
+=========================================================================
+
+## SYNOPSIS
+
+`bundle info` [GEM_NAME]
+ [--path]
+
+## DESCRIPTION
+
+Given a gem name present in your bundle, print the basic information about it
+ such as homepage, version, path and summary.
+
+## OPTIONS
+
+* `--path`:
+Print the path of the given gem
diff --git a/lib/bundler/man/bundle-init.1 b/lib/bundler/man/bundle-init.1
new file mode 100644
index 0000000000..c7a9a155b5
--- /dev/null
+++ b/lib/bundler/man/bundle-init.1
@@ -0,0 +1,29 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-INIT" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
+.
+.SH "SYNOPSIS"
+\fBbundle init\fR [\-\-gemspec=FILE]
+.
+.SH "DESCRIPTION"
+Init generates a default [\fBGemfile(5)\fR][Gemfile(5)] in the current working directory\. When adding a [\fBGemfile(5)\fR][Gemfile(5)] to a gem with a gemspec, the \fB\-\-gemspec\fR option will automatically add each dependency listed in the gemspec file to the newly created [\fBGemfile(5)\fR][Gemfile(5)]\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-gemspec\fR
+Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
+.
+.TP
+\fB\-\-gemfile\fR
+Use the specified name for the gemfile instead of \fBGemfile\fR
+.
+.SH "FILES"
+Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
+.
+.SH "SEE ALSO"
+Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR
diff --git a/lib/bundler/man/bundle-init.1.ronn b/lib/bundler/man/bundle-init.1.ronn
new file mode 100644
index 0000000000..7d3cede1f6
--- /dev/null
+++ b/lib/bundler/man/bundle-init.1.ronn
@@ -0,0 +1,31 @@
+bundle-init(1) -- Generates a Gemfile into the current working directory
+========================================================================
+
+## SYNOPSIS
+
+`bundle init` [--gemspec=FILE]
+
+## DESCRIPTION
+
+Init generates a default [`Gemfile(5)`][Gemfile(5)] in the current working directory. When
+adding a [`Gemfile(5)`][Gemfile(5)] to a gem with a gemspec, the `--gemspec` option will
+automatically add each dependency listed in the gemspec file to the newly
+created [`Gemfile(5)`][Gemfile(5)].
+
+## OPTIONS
+
+* `--gemspec`:
+ Use the specified .gemspec to create the [`Gemfile(5)`][Gemfile(5)]
+* `--gemfile`:
+ Use the specified name for the gemfile instead of `Gemfile`
+
+## FILES
+
+Included in the default [`Gemfile(5)`][Gemfile(5)]
+generated is the line `# frozen_string_literal: true`. This is a magic comment
+supported for the first time in Ruby 2.3. The presence of this line
+results in all string literals in the file being implicitly frozen.
+
+## SEE ALSO
+
+[Gemfile(5)](https://bundler.io/man/gemfile.5.html)
diff --git a/lib/bundler/man/bundle-inject.1 b/lib/bundler/man/bundle-inject.1
new file mode 100644
index 0000000000..9e25c29085
--- /dev/null
+++ b/lib/bundler/man/bundle-inject.1
@@ -0,0 +1,36 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-INJECT" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
+.
+.SH "SYNOPSIS"
+\fBbundle inject\fR [GEM] [VERSION]
+.
+.SH "DESCRIPTION"
+Adds the named gem(s) with their version requirements to the resolved [\fBGemfile(5)\fR][Gemfile(5)]\.
+.
+.P
+This command will add the gem to both your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock if it isn\'t listed yet\.
+.
+.P
+Example:
+.
+.IP "" 4
+.
+.nf
+
+bundle install
+bundle inject \'rack\' \'> 0\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This will inject the \'rack\' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock\.
+.
+.P
+The \fBbundle inject\fR command was deprecated in Bundler 2\.1 and will be removed in Bundler 3\.0\.
diff --git a/lib/bundler/man/bundle-inject.1.ronn b/lib/bundler/man/bundle-inject.1.ronn
new file mode 100644
index 0000000000..95704eddad
--- /dev/null
+++ b/lib/bundler/man/bundle-inject.1.ronn
@@ -0,0 +1,24 @@
+bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile
+=========================================================================
+
+## SYNOPSIS
+
+`bundle inject` [GEM] [VERSION]
+
+## DESCRIPTION
+
+Adds the named gem(s) with their version requirements to the resolved
+[`Gemfile(5)`][Gemfile(5)].
+
+This command will add the gem to both your [`Gemfile(5)`][Gemfile(5)] and Gemfile.lock if it
+isn't listed yet.
+
+Example:
+
+ bundle install
+ bundle inject 'rack' '> 0'
+
+This will inject the 'rack' gem with a version greater than 0 in your
+[`Gemfile(5)`][Gemfile(5)] and Gemfile.lock.
+
+The `bundle inject` command was deprecated in Bundler 2.1 and will be removed in Bundler 3.0.
diff --git a/lib/bundler/man/bundle-install.1 b/lib/bundler/man/bundle-install.1
new file mode 100644
index 0000000000..337683af06
--- /dev/null
+++ b/lib/bundler/man/bundle-install.1
@@ -0,0 +1,313 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-INSTALL" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
+.
+.SH "SYNOPSIS"
+\fBbundle install\fR [\-\-binstubs[=DIRECTORY]] [\-\-clean] [\-\-deployment] [\-\-frozen] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-no\-cache] [\-\-no\-prune] [\-\-path PATH] [\-\-quiet] [\-\-redownload] [\-\-retry=NUMBER] [\-\-shebang] [\-\-standalone[=GROUP[ GROUP\.\.\.]]] [\-\-system] [\-\-trust\-policy=POLICY] [\-\-with=GROUP[ GROUP\.\.\.]] [\-\-without=GROUP[ GROUP\.\.\.]]
+.
+.SH "DESCRIPTION"
+Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
+.
+.P
+If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), Bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
+.
+.P
+If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
+.
+.SH "OPTIONS"
+The \fB\-\-clean\fR, \fB\-\-deployment\fR, \fB\-\-frozen\fR, \fB\-\-no\-prune\fR, \fB\-\-path\fR, \fB\-\-shebang\fR, \fB\-\-system\fR, \fB\-\-without\fR and \fB\-\-with\fR options are deprecated because they only make sense if they are applied to every subsequent \fBbundle install\fR run automatically and that requires \fBbundler\fR to silently remember them\. Since \fBbundler\fR will no longer remember CLI flags in future versions, \fBbundle config\fR (see bundle\-config(1)) should be used to apply them permanently\.
+.
+.TP
+\fB\-\-binstubs[=<directory>]\fR
+Binstubs are scripts that wrap around executables\. Bundler creates a small Ruby file (a binstub) that loads Bundler, runs the command, and puts it in \fBbin/\fR\. This lets you link the binstub inside of an application to the exact gem version the application needs\.
+.
+.IP
+Creates a directory (defaults to \fB~/bin\fR) and places any executables from the gem there\. These executables run in Bundler\'s context\. If used, you might add this directory to your environment\'s \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
+.
+.TP
+\fB\-\-clean\fR
+On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don\'t worry, gems currently in use will not be removed\.
+.
+.IP
+This option is deprecated in favor of the \fBclean\fR setting\.
+.
+.TP
+\fB\-\-deployment\fR
+In \fIdeployment mode\fR, Bundler will \'roll\-out\' the bundle for production or CI use\. Please check carefully if you want to have this option enabled in your development environment\.
+.
+.IP
+This option is deprecated in favor of the \fBdeployment\fR setting\.
+.
+.TP
+\fB\-\-redownload\fR
+Force download every gem, even if the required versions are already available locally\.
+.
+.TP
+\fB\-\-frozen\fR
+Do not allow the Gemfile\.lock to be updated after this install\. Exits non\-zero if there are going to be changes to the Gemfile\.lock\.
+.
+.IP
+This option is deprecated in favor of the \fBfrozen\fR setting\.
+.
+.TP
+\fB\-\-full\-index\fR
+Bundler will not call Rubygems\' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldom change by enabling this option\.
+.
+.TP
+\fB\-\-gemfile=<gemfile>\fR
+The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
+.
+.TP
+\fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
+The maximum number of parallel download and install jobs\. The default is the number of available processors\.
+.
+.TP
+\fB\-\-local\fR
+Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if an appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
+.
+.TP
+\fB\-\-prefer\-local\fR
+Force using locally installed gems, or gems already present in Rubygems\' cache or in \fBvendor/cache\fR, when resolving, even if newer versions are available remotely\. Only attempt to connect to \fBrubygems\.org\fR for gems that are not present locally\.
+.
+.TP
+\fB\-\-no\-cache\fR
+Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any gems in the cache but keeps the newly bundled gems from being cached during the install\.
+.
+.TP
+\fB\-\-no\-prune\fR
+Don\'t remove stale gems from the cache when the installation finishes\.
+.
+.IP
+This option is deprecated in favor of the \fBno_prune\fR setting\.
+.
+.TP
+\fB\-\-path=<path>\fR
+The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
+.
+.IP
+This option is deprecated in favor of the \fBpath\fR setting\.
+.
+.TP
+\fB\-\-quiet\fR
+Do not print progress information to the standard output\. Instead, Bundler will exit using a status code (\fB$?\fR)\.
+.
+.TP
+\fB\-\-retry=[<number>]\fR
+Retry failed network or git requests for \fInumber\fR times\.
+.
+.TP
+\fB\-\-shebang=<ruby\-executable>\fR
+Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
+.
+.IP
+This option is deprecated in favor of the \fBshebang\fR setting\.
+.
+.TP
+\fB\-\-standalone[=<list>]\fR
+Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install has to be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup in the manner required\. Using this option implicitly sets \fBpath\fR, which is a [remembered option][REMEMBERED OPTIONS]\.
+.
+.TP
+\fB\-\-system\fR
+Installs the gems specified in the bundle to the system\'s Rubygems location\. This overrides any previous configuration of \fB\-\-path\fR\.
+.
+.IP
+This option is deprecated in favor of the \fBsystem\fR setting\.
+.
+.TP
+\fB\-\-trust\-policy=[<policy>]\fR
+Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
+.
+.TP
+\fB\-\-with=<list>\fR
+A space\-separated list of groups referencing gems to install\. If an optional group is given it is installed\. If a group is given that is in the remembered list of groups given to \-\-without, it is removed from that list\.
+.
+.IP
+This option is deprecated in favor of the \fBwith\fR setting\.
+.
+.TP
+\fB\-\-without=<list>\fR
+A space\-separated list of groups referencing gems to skip during installation\. If a group is given that is in the remembered list of groups given to \-\-with, it is removed from that list\.
+.
+.IP
+This option is deprecated in favor of the \fBwithout\fR setting\.
+.
+.SH "DEPLOYMENT MODE"
+Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment and for CI, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
+.
+.IP "1." 4
+A \fBGemfile\.lock\fR is required\.
+.
+.IP
+To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
+.
+.IP
+This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
+.
+.IP "2." 4
+The \fBGemfile\.lock\fR must be up to date
+.
+.IP
+In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
+.
+.IP
+In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
+.
+.IP "3." 4
+Gems are installed to \fBvendor/bundle\fR not your default system location
+.
+.IP
+In development, it\'s convenient to share the gems used in your application with other applications and other scripts that run on the system\.
+.
+.IP
+In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
+.
+.IP
+As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
+.
+.IP "" 0
+.
+.SH "INSTALLING GROUPS"
+By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
+.
+.P
+However, you can explicitly tell Bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
+.
+.P
+While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
+.
+.P
+This is so that installing a different set of groups on another machine (such as a production server) will not change the gems and versions that you have already developed and tested against\.
+.
+.P
+\fBBundler offers a rock\-solid guarantee that the third\-party code you are running in development and testing is also the third\-party code you are running in production\. You can choose to exclude some of that code in different environments, but you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
+.
+.P
+For a simple illustration, consider the following Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source \'https://rubygems\.org\'
+
+gem \'sinatra\'
+
+group :production do
+ gem \'rack\-perftools\-profiler\'
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR), while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
+.
+.P
+When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have Bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
+.
+.P
+This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
+.
+.P
+This also means that you cannot include different versions of the same gem in different groups, because doing so would result in different sets of dependencies used in development and production\. Because of the vagaries of the dependency resolution process, this usually affects more than the gems you list in your Gemfile(5), and can (surprisingly) radically change the gems you are using\.
+.
+.SH "THE GEMFILE\.LOCK"
+When you run \fBbundle install\fR, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
+.
+.P
+Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
+.
+.P
+Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
+.
+.P
+As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control, in both applications and gems\. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third\-party code being used if \fBany\fR of the gems in the Gemfile(5) or any of their dependencies have been updated\.
+.
+.P
+When Bundler first shipped, the \fBGemfile\.lock\fR was included in the \fB\.gitignore\fR file included with generated gems\. Over time, however, it became clear that this practice forces the pain of broken dependencies onto new contributors, while leaving existing contributors potentially unaware of the problem\. Since \fBbundle install\fR is usually the first step towards a contribution, the pain of broken dependencies would discourage new contributors from contributing\. As a result, we have revised our guidance for gem authors to now recommend checking in the lock for gems\.
+.
+.SH "CONSERVATIVE UPDATING"
+When you make a change to the Gemfile(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
+.
+.P
+In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
+.
+.P
+Let\'s take a look at an example\. Here\'s your original Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source \'https://rubygems\.org\'
+
+gem \'actionpack\', \'2\.3\.8\'
+gem \'activemerchant\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBactivesupport >= 2\.3\.2\fR, \fBbraintree >= 2\.0\.0\fR, and \fBbuilder >= 2\.0\.0\fR\.
+.
+.P
+When the dependencies are first resolved, Bundler will select \fBactivesupport 2\.3\.8\fR, which satisfies the requirements of both gems in your Gemfile(5)\.
+.
+.P
+Next, you modify your Gemfile(5) to:
+.
+.IP "" 4
+.
+.nf
+
+source \'https://rubygems\.org\'
+
+gem \'actionpack\', \'3\.0\.0\.rc\'
+gem \'activemerchant\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fBactionpack 3\.0\.0\.rc\fR gem has a number of new dependencies, and updates the \fBactivesupport\fR dependency to \fB= 3\.0\.0\.rc\fR and the \fBrack\fR dependency to \fB~> 1\.2\.1\fR\.
+.
+.P
+When you run \fBbundle install\fR, Bundler notices that you changed the \fBactionpack\fR gem, but not the \fBactivemerchant\fR gem\. It evaluates the gems currently being used to satisfy its requirements:
+.
+.TP
+\fBactivesupport 2\.3\.8\fR
+also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
+.
+.TP
+\fBrack ~> 1\.1\.0\fR
+not currently being used to satisfy another dependency
+.
+.P
+Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
+.
+.P
+Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, Bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
+.
+.P
+To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
+.
+.P
+\fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+Gem install docs \fIhttp://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
+.
+.IP "\(bu" 4
+Rubygems signing docs \fIhttp://guides\.rubygems\.org/security/\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-install.1.ronn b/lib/bundler/man/bundle-install.1.ronn
new file mode 100644
index 0000000000..be9ed0f974
--- /dev/null
+++ b/lib/bundler/man/bundle-install.1.ronn
@@ -0,0 +1,382 @@
+bundle-install(1) -- Install the dependencies specified in your Gemfile
+=======================================================================
+
+## SYNOPSIS
+
+`bundle install` [--binstubs[=DIRECTORY]]
+ [--clean]
+ [--deployment]
+ [--frozen]
+ [--full-index]
+ [--gemfile=GEMFILE]
+ [--jobs=NUMBER]
+ [--local]
+ [--no-cache]
+ [--no-prune]
+ [--path PATH]
+ [--quiet]
+ [--redownload]
+ [--retry=NUMBER]
+ [--shebang]
+ [--standalone[=GROUP[ GROUP...]]]
+ [--system]
+ [--trust-policy=POLICY]
+ [--with=GROUP[ GROUP...]]
+ [--without=GROUP[ GROUP...]]
+
+## DESCRIPTION
+
+Install the gems specified in your Gemfile(5). If this is the first
+time you run bundle install (and a `Gemfile.lock` does not exist),
+Bundler will fetch all remote sources, resolve dependencies and
+install all needed gems.
+
+If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
+Bundler will fetch all remote sources, but use the dependencies
+specified in the `Gemfile.lock` instead of resolving dependencies.
+
+If a `Gemfile.lock` does exist, and you have updated your Gemfile(5),
+Bundler will use the dependencies in the `Gemfile.lock` for all gems
+that you did not update, but will re-resolve the dependencies of
+gems that you did update. You can find more information about this
+update process below under [CONSERVATIVE UPDATING][].
+
+## OPTIONS
+
+The `--clean`, `--deployment`, `--frozen`, `--no-prune`, `--path`, `--shebang`,
+`--system`, `--without` and `--with` options are deprecated because they only
+make sense if they are applied to every subsequent `bundle install` run
+automatically and that requires `bundler` to silently remember them. Since
+`bundler` will no longer remember CLI flags in future versions, `bundle config`
+(see bundle-config(1)) should be used to apply them permanently.
+
+* `--binstubs[=<directory>]`:
+ Binstubs are scripts that wrap around executables. Bundler creates a small Ruby
+ file (a binstub) that loads Bundler, runs the command, and puts it in `bin/`.
+ This lets you link the binstub inside of an application to the exact gem
+ version the application needs.
+
+ Creates a directory (defaults to `~/bin`) and places any executables from the
+ gem there. These executables run in Bundler's context. If used, you might add
+ this directory to your environment's `PATH` variable. For instance, if the
+ `rails` gem comes with a `rails` executable, this flag will create a
+ `bin/rails` executable that ensures that all referred dependencies will be
+ resolved using the bundled gems.
+
+* `--clean`:
+ On finishing the installation Bundler is going to remove any gems not present
+ in the current Gemfile(5). Don't worry, gems currently in use will not be
+ removed.
+
+ This option is deprecated in favor of the `clean` setting.
+
+* `--deployment`:
+ In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for
+ production or CI use. Please check carefully if you want to have this option
+ enabled in your development environment.
+
+ This option is deprecated in favor of the `deployment` setting.
+
+* `--redownload`:
+ Force download every gem, even if the required versions are already available
+ locally.
+
+* `--frozen`:
+ Do not allow the Gemfile.lock to be updated after this install. Exits
+ non-zero if there are going to be changes to the Gemfile.lock.
+
+ This option is deprecated in favor of the `frozen` setting.
+
+* `--full-index`:
+ Bundler will not call Rubygems' API endpoint (default) but download and cache
+ a (currently big) index file of all gems. Performance can be improved for
+ large bundles that seldom change by enabling this option.
+
+* `--gemfile=<gemfile>`:
+ The location of the Gemfile(5) which Bundler should use. This defaults
+ to a Gemfile(5) in the current working directory. In general, Bundler
+ will assume that the location of the Gemfile(5) is also the project's
+ root and will try to find `Gemfile.lock` and `vendor/cache` relative
+ to this location.
+
+* `--jobs=[<number>]`, `-j[<number>]`:
+ The maximum number of parallel download and install jobs. The default is the
+ number of available processors.
+
+* `--local`:
+ Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the
+ gems already present in Rubygems' cache or in `vendor/cache`. Note that if an
+ appropriate platform-specific gem exists on `rubygems.org` it will not be
+ found.
+
+* `--prefer-local`:
+ Force using locally installed gems, or gems already present in Rubygems' cache
+ or in `vendor/cache`, when resolving, even if newer versions are available
+ remotely. Only attempt to connect to `rubygems.org` for gems that are not
+ present locally.
+
+* `--no-cache`:
+ Do not update the cache in `vendor/cache` with the newly bundled gems. This
+ does not remove any gems in the cache but keeps the newly bundled gems from
+ being cached during the install.
+
+* `--no-prune`:
+ Don't remove stale gems from the cache when the installation finishes.
+
+ This option is deprecated in favor of the `no_prune` setting.
+
+* `--path=<path>`:
+ The location to install the specified gems to. This defaults to Rubygems'
+ setting. Bundler shares this location with Rubygems, `gem install ...` will
+ have gem installed there, too. Therefore, gems installed without a
+ `--path ...` setting will show up by calling `gem list`. Accordingly, gems
+ installed to other locations will not get listed.
+
+ This option is deprecated in favor of the `path` setting.
+
+* `--quiet`:
+ Do not print progress information to the standard output. Instead, Bundler
+ will exit using a status code (`$?`).
+
+* `--retry=[<number>]`:
+ Retry failed network or git requests for <number> times.
+
+* `--shebang=<ruby-executable>`:
+ Uses the specified ruby executable (usually `ruby`) to execute the scripts
+ created with `--binstubs`. In addition, if you use `--binstubs` together with
+ `--shebang jruby` these executables will be changed to execute `jruby`
+ instead.
+
+ This option is deprecated in favor of the `shebang` setting.
+
+* `--standalone[=<list>]`:
+ Makes a bundle that can work without depending on Rubygems or Bundler at
+ runtime. A space separated list of groups to install has to be specified.
+ Bundler creates a directory named `bundle` and installs the bundle there. It
+ also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup
+ in the manner required. Using this option implicitly sets `path`, which is a
+ [remembered option][REMEMBERED OPTIONS].
+
+* `--system`:
+ Installs the gems specified in the bundle to the system's Rubygems location.
+ This overrides any previous configuration of `--path`.
+
+ This option is deprecated in favor of the `system` setting.
+
+* `--trust-policy=[<policy>]`:
+ Apply the Rubygems security policy <policy>, where policy is one of
+ `HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or
+ `NoSecurity`. For more details, please see the Rubygems signing documentation
+ linked below in [SEE ALSO][].
+
+* `--with=<list>`:
+ A space-separated list of groups referencing gems to install. If an
+ optional group is given it is installed. If a group is given that is
+ in the remembered list of groups given to --without, it is removed
+ from that list.
+
+ This option is deprecated in favor of the `with` setting.
+
+* `--without=<list>`:
+ A space-separated list of groups referencing gems to skip during installation.
+ If a group is given that is in the remembered list of groups given
+ to --with, it is removed from that list.
+
+ This option is deprecated in favor of the `without` setting.
+
+## DEPLOYMENT MODE
+
+Bundler's defaults are optimized for development. To switch to
+defaults optimized for deployment and for CI, use the `--deployment`
+flag. Do not activate deployment mode on development machines, as it
+will cause an error when the Gemfile(5) is modified.
+
+1. A `Gemfile.lock` is required.
+
+ To ensure that the same versions of the gems you developed with
+ and tested with are also used in deployments, a `Gemfile.lock`
+ is required.
+
+ This is mainly to ensure that you remember to check your
+ `Gemfile.lock` into version control.
+
+2. The `Gemfile.lock` must be up to date
+
+ In development, you can modify your Gemfile(5) and re-run
+ `bundle install` to [conservatively update][CONSERVATIVE UPDATING]
+ your `Gemfile.lock` snapshot.
+
+ In deployment, your `Gemfile.lock` should be up-to-date with
+ changes made in your Gemfile(5).
+
+3. Gems are installed to `vendor/bundle` not your default system location
+
+ In development, it's convenient to share the gems used in your
+ application with other applications and other scripts that run on
+ the system.
+
+ In deployment, isolation is a more important default. In addition,
+ the user deploying the application may not have permission to install
+ gems to the system, or the web server may not have permission to
+ read them.
+
+ As a result, `bundle install --deployment` installs gems to
+ the `vendor/bundle` directory in the application. This may be
+ overridden using the `--path` option.
+
+## INSTALLING GROUPS
+
+By default, `bundle install` will install all gems in all groups
+in your Gemfile(5), except those declared for a different platform.
+
+However, you can explicitly tell Bundler to skip installing
+certain groups with the `--without` option. This option takes
+a space-separated list of groups.
+
+While the `--without` option will skip _installing_ the gems in the
+specified groups, it will still _download_ those gems and use them to
+resolve the dependencies of every gem in your Gemfile(5).
+
+This is so that installing a different set of groups on another
+ machine (such as a production server) will not change the
+gems and versions that you have already developed and tested against.
+
+`Bundler offers a rock-solid guarantee that the third-party
+code you are running in development and testing is also the
+third-party code you are running in production. You can choose
+to exclude some of that code in different environments, but you
+will never be caught flat-footed by different versions of
+third-party code being used in different environments.`
+
+For a simple illustration, consider the following Gemfile(5):
+
+ source 'https://rubygems.org'
+
+ gem 'sinatra'
+
+ group :production do
+ gem 'rack-perftools-profiler'
+ end
+
+In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while
+`rack-perftools-profiler` depends on 1.x (`~> 1.0`).
+
+When you run `bundle install --without production` in development, we
+look at the dependencies of `rack-perftools-profiler` as well. That way,
+you do not spend all your time developing against Rack 2.0, using new
+APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2
+when the `production` group _is_ used.
+
+This should not cause any problems in practice, because we do not
+attempt to `install` the gems in the excluded groups, and only evaluate
+as part of the dependency resolution process.
+
+This also means that you cannot include different versions of the same
+gem in different groups, because doing so would result in different
+sets of dependencies used in development and production. Because of
+the vagaries of the dependency resolution process, this usually
+affects more than the gems you list in your Gemfile(5), and can
+(surprisingly) radically change the gems you are using.
+
+## THE GEMFILE.LOCK
+
+When you run `bundle install`, Bundler will persist the full names
+and versions of all gems that you used (including dependencies of
+the gems specified in the Gemfile(5)) into a file called `Gemfile.lock`.
+
+Bundler uses this file in all subsequent calls to `bundle install`,
+which guarantees that you always use the same exact code, even
+as your application moves across machines.
+
+Because of the way dependency resolution works, even a
+seemingly small change (for instance, an update to a point-release
+of a dependency of a gem in your Gemfile(5)) can result in radically
+different gems being needed to satisfy all dependencies.
+
+As a result, you `SHOULD` check your `Gemfile.lock` into version
+control, in both applications and gems. If you do not, every machine that
+checks out your repository (including your production server) will resolve all
+dependencies again, which will result in different versions of
+third-party code being used if `any` of the gems in the Gemfile(5)
+or any of their dependencies have been updated.
+
+When Bundler first shipped, the `Gemfile.lock` was included in the `.gitignore`
+file included with generated gems. Over time, however, it became clear that
+this practice forces the pain of broken dependencies onto new contributors,
+while leaving existing contributors potentially unaware of the problem. Since
+`bundle install` is usually the first step towards a contribution, the pain of
+broken dependencies would discourage new contributors from contributing. As a
+result, we have revised our guidance for gem authors to now recommend checking
+in the lock for gems.
+
+## CONSERVATIVE UPDATING
+
+When you make a change to the Gemfile(5) and then run `bundle install`,
+Bundler will update only the gems that you modified.
+
+In other words, if a gem that you `did not modify` worked before
+you called `bundle install`, it will continue to use the exact
+same versions of all dependencies as it used before the update.
+
+Let's take a look at an example. Here's your original Gemfile(5):
+
+ source 'https://rubygems.org'
+
+ gem 'actionpack', '2.3.8'
+ gem 'activemerchant'
+
+In this case, both `actionpack` and `activemerchant` depend on
+`activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
+and `rack ~> 1.1.0`, while the `activemerchant` gem depends on
+`activesupport >= 2.3.2`, `braintree >= 2.0.0`, and `builder >= 2.0.0`.
+
+When the dependencies are first resolved, Bundler will select
+`activesupport 2.3.8`, which satisfies the requirements of both
+gems in your Gemfile(5).
+
+Next, you modify your Gemfile(5) to:
+
+ source 'https://rubygems.org'
+
+ gem 'actionpack', '3.0.0.rc'
+ gem 'activemerchant'
+
+The `actionpack 3.0.0.rc` gem has a number of new dependencies,
+and updates the `activesupport` dependency to `= 3.0.0.rc` and
+the `rack` dependency to `~> 1.2.1`.
+
+When you run `bundle install`, Bundler notices that you changed
+the `actionpack` gem, but not the `activemerchant` gem. It
+evaluates the gems currently being used to satisfy its requirements:
+
+ * `activesupport 2.3.8`:
+ also used to satisfy a dependency in `activemerchant`,
+ which is not being updated
+ * `rack ~> 1.1.0`:
+ not currently being used to satisfy another dependency
+
+Because you did not explicitly ask to update `activemerchant`,
+you would not expect it to suddenly stop working after updating
+`actionpack`. However, satisfying the new `activesupport 3.0.0.rc`
+dependency of actionpack requires updating one of its dependencies.
+
+Even though `activemerchant` declares a very loose dependency
+that theoretically matches `activesupport 3.0.0.rc`, Bundler treats
+gems in your Gemfile(5) that have not changed as an atomic unit
+together with their dependencies. In this case, the `activemerchant`
+dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`,
+so `bundle install` will report that it cannot update `actionpack`.
+
+To explicitly update `actionpack`, including its dependencies
+which other gems in the Gemfile(5) still depend on, run
+`bundle update actionpack` (see `bundle update(1)`).
+
+`Summary`: In general, after making a change to the Gemfile(5) , you
+should first try to run `bundle install`, which will guarantee that no
+other gem in the Gemfile(5) is impacted by the change. If that
+does not work, run [bundle update(1)](bundle-update.1.html).
+
+## SEE ALSO
+
+* [Gem install docs](http://guides.rubygems.org/rubygems-basics/#installing-gems)
+* [Rubygems signing docs](http://guides.rubygems.org/security/)
diff --git a/lib/bundler/man/bundle-list.1 b/lib/bundler/man/bundle-list.1
new file mode 100644
index 0000000000..1680e6007a
--- /dev/null
+++ b/lib/bundler/man/bundle-list.1
@@ -0,0 +1,50 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-LIST" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-list\fR \- List all the gems in the bundle
+.
+.SH "SYNOPSIS"
+\fBbundle list\fR [\-\-name\-only] [\-\-paths] [\-\-without\-group=GROUP[ GROUP\.\.\.]] [\-\-only\-group=GROUP[ GROUP\.\.\.]]
+.
+.SH "DESCRIPTION"
+Prints a list of all the gems in the bundle including their version\.
+.
+.P
+Example:
+.
+.P
+bundle list \-\-name\-only
+.
+.P
+bundle list \-\-paths
+.
+.P
+bundle list \-\-without\-group test
+.
+.P
+bundle list \-\-only\-group dev
+.
+.P
+bundle list \-\-only\-group dev test \-\-paths
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-name\-only\fR
+Print only the name of each gem\.
+.
+.TP
+\fB\-\-paths\fR
+Print the path to each gem in the bundle\.
+.
+.TP
+\fB\-\-without\-group=<list>\fR
+A space\-separated list of groups of gems to skip during printing\.
+.
+.TP
+\fB\-\-only\-group=<list>\fR
+A space\-separated list of groups of gems to print\.
+
diff --git a/lib/bundler/man/bundle-list.1.ronn b/lib/bundler/man/bundle-list.1.ronn
new file mode 100644
index 0000000000..dc058ecd5f
--- /dev/null
+++ b/lib/bundler/man/bundle-list.1.ronn
@@ -0,0 +1,33 @@
+bundle-list(1) -- List all the gems in the bundle
+=========================================================================
+
+## SYNOPSIS
+
+`bundle list` [--name-only] [--paths] [--without-group=GROUP[ GROUP...]] [--only-group=GROUP[ GROUP...]]
+
+## DESCRIPTION
+
+Prints a list of all the gems in the bundle including their version.
+
+Example:
+
+bundle list --name-only
+
+bundle list --paths
+
+bundle list --without-group test
+
+bundle list --only-group dev
+
+bundle list --only-group dev test --paths
+
+## OPTIONS
+
+* `--name-only`:
+ Print only the name of each gem.
+* `--paths`:
+ Print the path to each gem in the bundle.
+* `--without-group=<list>`:
+ A space-separated list of groups of gems to skip during printing.
+* `--only-group=<list>`:
+ A space-separated list of groups of gems to print.
diff --git a/lib/bundler/man/bundle-lock.1 b/lib/bundler/man/bundle-lock.1
new file mode 100644
index 0000000000..8722c44b3d
--- /dev/null
+++ b/lib/bundler/man/bundle-lock.1
@@ -0,0 +1,84 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-LOCK" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
+.
+.SH "SYNOPSIS"
+\fBbundle lock\fR [\-\-update] [\-\-local] [\-\-print] [\-\-lockfile=PATH] [\-\-full\-index] [\-\-add\-platform] [\-\-remove\-platform] [\-\-patch] [\-\-minor] [\-\-major] [\-\-strict] [\-\-conservative]
+.
+.SH "DESCRIPTION"
+Lock the gems specified in Gemfile\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-update=<*gems>\fR
+Ignores the existing lockfile\. Resolve then updates lockfile\. Taking a list of gems or updating all gems if no list is given\.
+.
+.TP
+\fB\-\-local\fR
+Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
+.
+.TP
+\fB\-\-print\fR
+Prints the lockfile to STDOUT instead of writing to the file system\.
+.
+.TP
+\fB\-\-lockfile=<path>\fR
+The path where the lockfile should be written to\.
+.
+.TP
+\fB\-\-full\-index\fR
+Fall back to using the single\-file index of all gems\.
+.
+.TP
+\fB\-\-add\-platform\fR
+Add a new platform to the lockfile, re\-resolving for the addition of that platform\.
+.
+.TP
+\fB\-\-remove\-platform\fR
+Remove a platform from the lockfile\.
+.
+.TP
+\fB\-\-patch\fR
+If updating, prefer updating only to next patch version\.
+.
+.TP
+\fB\-\-minor\fR
+If updating, prefer updating only to next minor version\.
+.
+.TP
+\fB\-\-major\fR
+If updating, prefer updating to next major version (default)\.
+.
+.TP
+\fB\-\-strict\fR
+If updating, do not allow any gem to be updated past latest \-\-patch | \-\-minor | \-\-major\.
+.
+.TP
+\fB\-\-conservative\fR
+If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
+.
+.SH "UPDATING ALL GEMS"
+If you run \fBbundle lock\fR with \fB\-\-update\fR option without list of gems, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
+.
+.SH "UPDATING A LIST OF GEMS"
+Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
+.
+.P
+For instance, you only want to update \fBnokogiri\fR, run \fBbundle lock \-\-update nokogiri\fR\.
+.
+.P
+Bundler will update \fBnokogiri\fR and any of its dependencies, but leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
+.
+.SH "SUPPORTING OTHER PLATFORMS"
+If you want your bundle to support platforms other than the one you\'re running locally, you can run \fBbundle lock \-\-add\-platform PLATFORM\fR to add PLATFORM to the lockfile, force bundler to re\-resolve and consider the new platform when picking gems, all without needing to have a machine that matches PLATFORM handy to install those platform\-specific gems on\.
+.
+.P
+For a full explanation of gem platforms, see \fBgem help platform\fR\.
+.
+.SH "PATCH LEVEL OPTIONS"
+See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
diff --git a/man/bundle-lock.ronn b/lib/bundler/man/bundle-lock.1.ronn
index 3aa5920f5a..3aa5920f5a 100644
--- a/man/bundle-lock.ronn
+++ b/lib/bundler/man/bundle-lock.1.ronn
diff --git a/lib/bundler/man/bundle-open.1 b/lib/bundler/man/bundle-open.1
new file mode 100644
index 0000000000..3513f0d09b
--- /dev/null
+++ b/lib/bundler/man/bundle-open.1
@@ -0,0 +1,52 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-OPEN" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
+.
+.SH "SYNOPSIS"
+\fBbundle open\fR [GEM] [\-\-path=PATH]
+.
+.SH "DESCRIPTION"
+Opens the source directory of the provided GEM in your editor\.
+.
+.P
+For this to work the \fBEDITOR\fR or \fBBUNDLER_EDITOR\fR environment variable has to be set\.
+.
+.P
+Example:
+.
+.IP "" 4
+.
+.nf
+
+bundle open \'rack\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Will open the source directory for the \'rack\' gem in your bundle\.
+.
+.IP "" 4
+.
+.nf
+
+bundle open \'rack\' \-\-path \'README\.md\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Will open the README\.md file of the \'rack\' gem source in your bundle\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-path\fR
+Specify GEM source relative path to open\.
+
diff --git a/lib/bundler/man/bundle-open.1.ronn b/lib/bundler/man/bundle-open.1.ronn
new file mode 100644
index 0000000000..a857f3a965
--- /dev/null
+++ b/lib/bundler/man/bundle-open.1.ronn
@@ -0,0 +1,27 @@
+bundle-open(1) -- Opens the source directory for a gem in your bundle
+=====================================================================
+
+## SYNOPSIS
+
+`bundle open` [GEM] [--path=PATH]
+
+## DESCRIPTION
+
+Opens the source directory of the provided GEM in your editor.
+
+For this to work the `EDITOR` or `BUNDLER_EDITOR` environment variable has to
+be set.
+
+Example:
+
+ bundle open 'rack'
+
+Will open the source directory for the 'rack' gem in your bundle.
+
+ bundle open 'rack' --path 'README.md'
+
+Will open the README.md file of the 'rack' gem source in your bundle.
+
+## OPTIONS
+* `--path`:
+ Specify GEM source relative path to open.
diff --git a/lib/bundler/man/bundle-outdated.1 b/lib/bundler/man/bundle-outdated.1
new file mode 100644
index 0000000000..129ff00f58
--- /dev/null
+++ b/lib/bundler/man/bundle-outdated.1
@@ -0,0 +1,152 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-OUTDATED" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-outdated\fR \- List installed gems with newer versions available
+.
+.SH "SYNOPSIS"
+\fBbundle outdated\fR [GEM] [\-\-local] [\-\-pre] [\-\-source] [\-\-strict] [\-\-parseable | \-\-porcelain] [\-\-group=GROUP] [\-\-groups] [\-\-patch|\-\-minor|\-\-major] [\-\-filter\-major] [\-\-filter\-minor] [\-\-filter\-patch] [\-\-only\-explicit]
+.
+.SH "DESCRIPTION"
+Outdated lists the names and versions of gems that have a newer version available in the given source\. Calling outdated with [GEM [GEM]] will only check for newer versions of the given gems\. Prerelease gems are ignored by default\. If your gems are up to date, Bundler will exit with a status of 0\. Otherwise, it will exit 1\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-local\fR
+Do not attempt to fetch gems remotely and use the gem cache instead\.
+.
+.TP
+\fB\-\-pre\fR
+Check for newer pre\-release gems\.
+.
+.TP
+\fB\-\-source\fR
+Check against a specific source\.
+.
+.TP
+\fB\-\-strict\fR
+Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (\-\-patch, \-\-minor, \-\-major)\.
+.
+.TP
+\fB\-\-parseable\fR, \fB\-\-porcelain\fR
+Use minimal formatting for more parseable output\.
+.
+.TP
+\fB\-\-group\fR
+List gems from a specific group\.
+.
+.TP
+\fB\-\-groups\fR
+List gems organized by groups\.
+.
+.TP
+\fB\-\-minor\fR
+Prefer updating only to next minor version\.
+.
+.TP
+\fB\-\-major\fR
+Prefer updating to next major version (default)\.
+.
+.TP
+\fB\-\-patch\fR
+Prefer updating only to next patch version\.
+.
+.TP
+\fB\-\-filter\-major\fR
+Only list major newer versions\.
+.
+.TP
+\fB\-\-filter\-minor\fR
+Only list minor newer versions\.
+.
+.TP
+\fB\-\-filter\-patch\fR
+Only list patch newer versions\.
+.
+.TP
+\fB\-\-only\-explicit\fR
+Only list gems specified in your Gemfile, not their dependencies\.
+.
+.SH "PATCH LEVEL OPTIONS"
+See bundle update(1) \fIbundle\-update\.1\.html\fR for details\.
+.
+.SH "FILTERING OUTPUT"
+The 3 filtering options do not affect the resolution of versions, merely what versions are shown in the output\.
+.
+.P
+If the regular output shows the following:
+.
+.IP "" 4
+.
+.nf
+
+* Gem Current Latest Requested Groups
+* faker 1\.6\.5 1\.6\.6 ~> 1\.4 development, test
+* hashie 1\.2\.0 3\.4\.6 = 1\.2\.0 default
+* headless 2\.2\.3 2\.3\.1 = 2\.2\.3 test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fB\-\-filter\-major\fR would only show:
+.
+.IP "" 4
+.
+.nf
+
+* Gem Current Latest Requested Groups
+* hashie 1\.2\.0 3\.4\.6 = 1\.2\.0 default
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fB\-\-filter\-minor\fR would only show:
+.
+.IP "" 4
+.
+.nf
+
+* Gem Current Latest Requested Groups
+* headless 2\.2\.3 2\.3\.1 = 2\.2\.3 test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fB\-\-filter\-patch\fR would only show:
+.
+.IP "" 4
+.
+.nf
+
+* Gem Current Latest Requested Groups
+* faker 1\.6\.5 1\.6\.6 ~> 1\.4 development, test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Filter options can be combined\. \fB\-\-filter\-minor\fR and \fB\-\-filter\-patch\fR would show:
+.
+.IP "" 4
+.
+.nf
+
+* Gem Current Latest Requested Groups
+* faker 1\.6\.5 1\.6\.6 ~> 1\.4 development, test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Combining all three \fBfilter\fR options would be the same result as providing none of them\.
diff --git a/lib/bundler/man/bundle-outdated.1.ronn b/lib/bundler/man/bundle-outdated.1.ronn
new file mode 100644
index 0000000000..27bf21ab9d
--- /dev/null
+++ b/lib/bundler/man/bundle-outdated.1.ronn
@@ -0,0 +1,105 @@
+bundle-outdated(1) -- List installed gems with newer versions available
+=======================================================================
+
+## SYNOPSIS
+
+`bundle outdated` [GEM] [--local]
+ [--pre]
+ [--source]
+ [--strict]
+ [--parseable | --porcelain]
+ [--group=GROUP]
+ [--groups]
+ [--patch|--minor|--major]
+ [--filter-major]
+ [--filter-minor]
+ [--filter-patch]
+ [--only-explicit]
+
+## DESCRIPTION
+
+Outdated lists the names and versions of gems that have a newer version available
+in the given source. Calling outdated with [GEM [GEM]] will only check for newer
+versions of the given gems. Prerelease gems are ignored by default. If your gems
+are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
+
+## OPTIONS
+
+* `--local`:
+ Do not attempt to fetch gems remotely and use the gem cache instead.
+
+* `--pre`:
+ Check for newer pre-release gems.
+
+* `--source`:
+ Check against a specific source.
+
+* `--strict`:
+ Only list newer versions allowed by your Gemfile requirements, also respecting conservative update flags (--patch, --minor, --major).
+
+* `--parseable`, `--porcelain`:
+ Use minimal formatting for more parseable output.
+
+* `--group`:
+ List gems from a specific group.
+
+* `--groups`:
+ List gems organized by groups.
+
+* `--minor`:
+ Prefer updating only to next minor version.
+
+* `--major`:
+ Prefer updating to next major version (default).
+
+* `--patch`:
+ Prefer updating only to next patch version.
+
+* `--filter-major`:
+ Only list major newer versions.
+
+* `--filter-minor`:
+ Only list minor newer versions.
+
+* `--filter-patch`:
+ Only list patch newer versions.
+
+* `--only-explicit`:
+ Only list gems specified in your Gemfile, not their dependencies.
+
+## PATCH LEVEL OPTIONS
+
+See [bundle update(1)](bundle-update.1.html) for details.
+
+## FILTERING OUTPUT
+
+The 3 filtering options do not affect the resolution of versions, merely what versions are shown
+in the output.
+
+If the regular output shows the following:
+
+ * Gem Current Latest Requested Groups
+ * faker 1.6.5 1.6.6 ~> 1.4 development, test
+ * hashie 1.2.0 3.4.6 = 1.2.0 default
+ * headless 2.2.3 2.3.1 = 2.2.3 test
+
+`--filter-major` would only show:
+
+ * Gem Current Latest Requested Groups
+ * hashie 1.2.0 3.4.6 = 1.2.0 default
+
+`--filter-minor` would only show:
+
+ * Gem Current Latest Requested Groups
+ * headless 2.2.3 2.3.1 = 2.2.3 test
+
+`--filter-patch` would only show:
+
+ * Gem Current Latest Requested Groups
+ * faker 1.6.5 1.6.6 ~> 1.4 development, test
+
+Filter options can be combined. `--filter-minor` and `--filter-patch` would show:
+
+ * Gem Current Latest Requested Groups
+ * faker 1.6.5 1.6.6 ~> 1.4 development, test
+Combining all three `filter` options would be the same result as providing none of them.
diff --git a/lib/bundler/man/bundle-platform.1 b/lib/bundler/man/bundle-platform.1
new file mode 100644
index 0000000000..5021c46b4c
--- /dev/null
+++ b/lib/bundler/man/bundle-platform.1
@@ -0,0 +1,71 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-PLATFORM" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-platform\fR \- Displays platform compatibility information
+.
+.SH "SYNOPSIS"
+\fBbundle platform\fR [\-\-ruby]
+.
+.SH "DESCRIPTION"
+\fBplatform\fR displays information from your Gemfile, Gemfile\.lock, and Ruby VM about your platform\.
+.
+.P
+For instance, using this Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+ruby "3\.1\.2"
+
+gem "rack"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you run \fBbundle platform\fR on Ruby 3\.1\.2, it displays the following output:
+.
+.IP "" 4
+.
+.nf
+
+Your platform is: x86_64\-linux
+
+Your app has gems that work on these platforms:
+* arm64\-darwin\-21
+* ruby
+* x64\-mingw\-ucrt
+* x86_64\-linux
+
+Your Gemfile specifies a Ruby version requirement:
+* ruby 3\.1\.2
+
+Your current platform satisfies the Ruby version requirement\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fBplatform\fR lists all the platforms in your \fBGemfile\.lock\fR as well as the \fBruby\fR directive if applicable from your Gemfile(5)\. It also lets you know if the \fBruby\fR directive requirement has been met\. If \fBruby\fR directive doesn\'t match the running Ruby VM, it tells you what part does not\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-ruby\fR
+It will display the ruby directive information, so you don\'t have to parse it from the Gemfile(5)\.
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+bundle\-lock(1) \fIbundle\-lock\.1\.html\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-platform.1.ronn b/lib/bundler/man/bundle-platform.1.ronn
new file mode 100644
index 0000000000..744acd1b43
--- /dev/null
+++ b/lib/bundler/man/bundle-platform.1.ronn
@@ -0,0 +1,49 @@
+bundle-platform(1) -- Displays platform compatibility information
+=================================================================
+
+## SYNOPSIS
+
+`bundle platform` [--ruby]
+
+## DESCRIPTION
+
+`platform` displays information from your Gemfile, Gemfile.lock, and Ruby
+VM about your platform.
+
+For instance, using this Gemfile(5):
+
+ source "https://rubygems.org"
+
+ ruby "3.1.2"
+
+ gem "rack"
+
+If you run `bundle platform` on Ruby 3.1.2, it displays the following output:
+
+ Your platform is: x86_64-linux
+
+ Your app has gems that work on these platforms:
+ * arm64-darwin-21
+ * ruby
+ * x64-mingw-ucrt
+ * x86_64-linux
+
+ Your Gemfile specifies a Ruby version requirement:
+ * ruby 3.1.2
+
+ Your current platform satisfies the Ruby version requirement.
+
+`platform` lists all the platforms in your `Gemfile.lock` as well as the
+`ruby` directive if applicable from your Gemfile(5). It also lets you know
+if the `ruby` directive requirement has been met. If `ruby` directive doesn't
+match the running Ruby VM, it tells you what part does not.
+
+## OPTIONS
+
+* `--ruby`:
+ It will display the ruby directive information, so you don't have to
+ parse it from the Gemfile(5).
+
+## SEE ALSO
+
+* [bundle-lock(1)](bundle-lock.1.html)
diff --git a/lib/bundler/man/bundle-plugin.1 b/lib/bundler/man/bundle-plugin.1
new file mode 100644
index 0000000000..ec30e1d0fd
--- /dev/null
+++ b/lib/bundler/man/bundle-plugin.1
@@ -0,0 +1,81 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-PLUGIN" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-plugin\fR \- Manage Bundler plugins
+.
+.SH "SYNOPSIS"
+\fBbundle plugin\fR install PLUGINS [\-\-source=\fISOURCE\fR] [\-\-version=\fIversion\fR] [\-\-git|\-\-local_git=\fIgit\-url\fR] [\-\-branch=\fIbranch\fR|\-\-ref=\fIrev\fR]
+.
+.br
+\fBbundle plugin\fR uninstall PLUGINS
+.
+.br
+\fBbundle plugin\fR list
+.
+.br
+\fBbundle plugin\fR help [COMMAND]
+.
+.SH "DESCRIPTION"
+You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler\.
+.
+.SH "SUB\-COMMANDS"
+.
+.SS "install"
+Install the given plugin(s)\.
+.
+.IP "\(bu" 4
+\fBbundle plugin install bundler\-graph\fR: Install bundler\-graph gem from RubyGems\.org\. The global source, specified in source in Gemfile is ignored\.
+.
+.IP "\(bu" 4
+\fBbundle plugin install bundler\-graph \-\-source https://example\.com\fR: Install bundler\-graph gem from example\.com\. The global source, specified in source in Gemfile is not considered\.
+.
+.IP "\(bu" 4
+\fBbundle plugin install bundler\-graph \-\-version 0\.2\.1\fR: You can specify the version of the gem via \fB\-\-version\fR\.
+.
+.IP "\(bu" 4
+\fBbundle plugin install bundler\-graph \-\-git https://github\.com/rubygems/bundler\-graph\fR: Install bundler\-graph gem from Git repository\. \fB\-\-git\fR can be replaced with \fB\-\-local\-git\fR\. You cannot use both \fB\-\-git\fR and \fB\-\-local\-git\fR\. You can use standard Git URLs like:
+.
+.IP "\(bu" 4
+\fBssh://[user@]host\.xz[:port]/path/to/repo\.git\fR
+.
+.IP "\(bu" 4
+\fBhttp[s]://host\.xz[:port]/path/to/repo\.git\fR
+.
+.IP "\(bu" 4
+\fB/path/to/repo\fR
+.
+.IP "\(bu" 4
+\fBfile:///path/to/repo\fR
+.
+.IP "" 0
+.
+.IP
+When you specify \fB\-\-git\fR/\fB\-\-local\-git\fR, you can use \fB\-\-branch\fR or \fB\-\-ref\fR to specify any branch, tag, or commit hash (revision) to use\. When you specify both, only the latter is used\.
+.
+.IP "" 0
+.
+.SS "uninstall"
+Uninstall the plugin(s) specified in PLUGINS\.
+.
+.SS "list"
+List the installed plugins and available commands\.
+.
+.P
+No options\.
+.
+.SS "help"
+Describe subcommands or one specific subcommand\.
+.
+.P
+No options\.
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+How to write a Bundler plugin \fIhttps://bundler\.io/guides/bundler_plugins\.html\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-plugin.1.ronn b/lib/bundler/man/bundle-plugin.1.ronn
new file mode 100644
index 0000000000..4f234eeba7
--- /dev/null
+++ b/lib/bundler/man/bundle-plugin.1.ronn
@@ -0,0 +1,59 @@
+bundle-plugin(1) -- Manage Bundler plugins
+==========================================
+
+## SYNOPSIS
+
+`bundle plugin` install PLUGINS [--source=<SOURCE>] [--version=<version>]
+ [--git|--local_git=<git-url>] [--branch=<branch>|--ref=<rev>]<br>
+`bundle plugin` uninstall PLUGINS<br>
+`bundle plugin` list<br>
+`bundle plugin` help [COMMAND]
+
+## DESCRIPTION
+
+You can install, uninstall, and list plugin(s) with this command to extend functionalities of Bundler.
+
+## SUB-COMMANDS
+
+### install
+
+Install the given plugin(s).
+
+* `bundle plugin install bundler-graph`:
+ Install bundler-graph gem from RubyGems.org. The global source, specified in source in Gemfile is ignored.
+
+* `bundle plugin install bundler-graph --source https://example.com`:
+ Install bundler-graph gem from example.com. The global source, specified in source in Gemfile is not considered.
+
+* `bundle plugin install bundler-graph --version 0.2.1`:
+ You can specify the version of the gem via `--version`.
+
+* `bundle plugin install bundler-graph --git https://github.com/rubygems/bundler-graph`:
+ Install bundler-graph gem from Git repository. `--git` can be replaced with `--local-git`. You cannot use both `--git` and `--local-git`. You can use standard Git URLs like:
+
+ * `ssh://[user@]host.xz[:port]/path/to/repo.git`
+ * `http[s]://host.xz[:port]/path/to/repo.git`
+ * `/path/to/repo`
+ * `file:///path/to/repo`
+
+ When you specify `--git`/`--local-git`, you can use `--branch` or `--ref` to specify any branch, tag, or commit hash (revision) to use. When you specify both, only the latter is used.
+
+### uninstall
+
+Uninstall the plugin(s) specified in PLUGINS.
+
+### list
+
+List the installed plugins and available commands.
+
+No options.
+
+### help
+
+Describe subcommands or one specific subcommand.
+
+No options.
+
+## SEE ALSO
+
+* [How to write a Bundler plugin](https://bundler.io/guides/bundler_plugins.html)
diff --git a/lib/bundler/man/bundle-pristine.1 b/lib/bundler/man/bundle-pristine.1
new file mode 100644
index 0000000000..af81c48d2b
--- /dev/null
+++ b/lib/bundler/man/bundle-pristine.1
@@ -0,0 +1,34 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-PRISTINE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
+.
+.SH "SYNOPSIS"
+\fBbundle pristine\fR
+.
+.SH "DESCRIPTION"
+\fBpristine\fR restores the installed gems in the bundle to their pristine condition using the local gem cache from RubyGems\. For git gems, a forced checkout will be performed\.
+.
+.P
+For further explanation, \fBbundle pristine\fR ignores unpacked files on disk\. In other words, this command utilizes the local \fB\.gem\fR cache or the gem\'s git repository as if one were installing from scratch\.
+.
+.P
+Note: the Bundler gem cannot be restored to its original state with \fBpristine\fR\. One also cannot use \fBbundle pristine\fR on gems with a \'path\' option in the Gemfile, because bundler has no original copy it can restore from\.
+.
+.P
+When is it practical to use \fBbundle pristine\fR?
+.
+.P
+It comes in handy when a developer is debugging a gem\. \fBbundle pristine\fR is a great way to get rid of experimental changes to a gem that one may not want\.
+.
+.P
+Why use \fBbundle pristine\fR over \fBgem pristine \-\-all\fR?
+.
+.P
+Both commands are very similar\. For context: \fBbundle pristine\fR, without arguments, cleans all gems from the lockfile\. Meanwhile, \fBgem pristine \-\-all\fR cleans all installed gems for that Ruby version\.
+.
+.P
+If a developer forgets which gems in their project they might have been debugging, the Rubygems \fBgem pristine [GEMNAME]\fR command may be inconvenient\. One can avoid waiting for \fBgem pristine \-\-all\fR, and instead run \fBbundle pristine\fR\.
diff --git a/man/bundle-pristine.ronn b/lib/bundler/man/bundle-pristine.1.ronn
index e2d6b6a348..e2d6b6a348 100644
--- a/man/bundle-pristine.ronn
+++ b/lib/bundler/man/bundle-pristine.1.ronn
diff --git a/lib/bundler/man/bundle-remove.1 b/lib/bundler/man/bundle-remove.1
new file mode 100644
index 0000000000..d86cf134bd
--- /dev/null
+++ b/lib/bundler/man/bundle-remove.1
@@ -0,0 +1,31 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-REMOVE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-remove\fR \- Removes gems from the Gemfile
+.
+.SH "SYNOPSIS"
+\fBbundle remove [GEM [GEM \.\.\.]] [\-\-install]\fR
+.
+.SH "DESCRIPTION"
+Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid\. If a gem cannot be removed, a warning is printed\. If a gem is already absent from the Gemfile, and error is raised\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-install\fR
+Runs \fBbundle install\fR after the given gems have been removed from the Gemfile, which ensures that both the lockfile and the installed gems on disk are also updated to remove the given gem(s)\.
+.
+.P
+Example:
+.
+.P
+bundle remove rails
+.
+.P
+bundle remove rails rack
+.
+.P
+bundle remove rails rack \-\-install
diff --git a/man/bundle-remove.ronn b/lib/bundler/man/bundle-remove.1.ronn
index 40a239b4a2..40a239b4a2 100644
--- a/man/bundle-remove.ronn
+++ b/lib/bundler/man/bundle-remove.1.ronn
diff --git a/lib/bundler/man/bundle-show.1 b/lib/bundler/man/bundle-show.1
new file mode 100644
index 0000000000..aa91176bf2
--- /dev/null
+++ b/lib/bundler/man/bundle-show.1
@@ -0,0 +1,23 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-SHOW" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
+.
+.SH "SYNOPSIS"
+\fBbundle show\fR [GEM] [\-\-paths]
+.
+.SH "DESCRIPTION"
+Without the [GEM] option, \fBshow\fR will print a list of the names and versions of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by name\.
+.
+.P
+Calling show with [GEM] will list the exact location of that gem on your machine\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-paths\fR
+List the paths of all gems that are required by your [\fBGemfile(5)\fR][Gemfile(5)], sorted by gem name\.
+
diff --git a/man/bundle-show.ronn b/lib/bundler/man/bundle-show.1.ronn
index a6a59a1445..a6a59a1445 100644
--- a/man/bundle-show.ronn
+++ b/lib/bundler/man/bundle-show.1.ronn
diff --git a/lib/bundler/man/bundle-update.1 b/lib/bundler/man/bundle-update.1
new file mode 100644
index 0000000000..e4e10ad23b
--- /dev/null
+++ b/lib/bundler/man/bundle-update.1
@@ -0,0 +1,394 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-UPDATE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-update\fR \- Update your gems to the latest available versions
+.
+.SH "SYNOPSIS"
+\fBbundle update\fR \fI*gems\fR [\-\-all] [\-\-group=NAME] [\-\-source=NAME] [\-\-local] [\-\-ruby] [\-\-bundler[=VERSION]] [\-\-full\-index] [\-\-jobs=JOBS] [\-\-quiet] [\-\-patch|\-\-minor|\-\-major] [\-\-redownload] [\-\-strict] [\-\-conservative]
+.
+.SH "DESCRIPTION"
+Update the gems specified (all gems, if \fB\-\-all\fR flag is used), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
+.
+.P
+You would use \fBbundle update\fR to explicitly update the version of a gem\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-all\fR
+Update all gems specified in Gemfile\.
+.
+.TP
+\fB\-\-group=<name>\fR, \fB\-g=[<name>]\fR
+Only update the gems in the specified group\. For instance, you can update all gems in the development group with \fBbundle update \-\-group development\fR\. You can also call \fBbundle update rails \-\-group test\fR to update the rails gem and all gems in the test group, for example\.
+.
+.TP
+\fB\-\-source=<name>\fR
+The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
+.
+.TP
+\fB\-\-local\fR
+Do not attempt to fetch gems remotely and use the gem cache instead\.
+.
+.TP
+\fB\-\-ruby\fR
+Update the locked version of Ruby to the current version of Ruby\.
+.
+.TP
+\fB\-\-bundler\fR
+Update the locked version of bundler to the invoked bundler version\.
+.
+.TP
+\fB\-\-full\-index\fR
+Fall back to using the single\-file index of all gems\.
+.
+.TP
+\fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
+Specify the number of jobs to run in parallel\. The default is the number of available processors\.
+.
+.TP
+\fB\-\-retry=[<number>]\fR
+Retry failed network or git requests for \fInumber\fR times\.
+.
+.TP
+\fB\-\-quiet\fR
+Only output warnings and errors\.
+.
+.TP
+\fB\-\-redownload\fR
+Force downloading every gem\.
+.
+.TP
+\fB\-\-patch\fR
+Prefer updating only to next patch version\.
+.
+.TP
+\fB\-\-minor\fR
+Prefer updating only to next minor version\.
+.
+.TP
+\fB\-\-major\fR
+Prefer updating to next major version (default)\.
+.
+.TP
+\fB\-\-strict\fR
+Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
+.
+.TP
+\fB\-\-conservative\fR
+Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
+.
+.SH "UPDATING ALL GEMS"
+If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
+.
+.P
+Consider the following Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "rails", "3\.0\.0\.rc"
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need:
+.
+.IP "" 4
+.
+.nf
+
+Fetching gem metadata from https://rubygems\.org/\.\.\.\.\.\.\.\.\.
+Resolving dependencies\.\.\.
+Installing builder 2\.1\.2
+Installing abstract 1\.0\.0
+Installing rack 1\.2\.8
+Using bundler 1\.7\.6
+Installing rake 10\.4\.0
+Installing polyglot 0\.3\.5
+Installing mime\-types 1\.25\.1
+Installing i18n 0\.4\.2
+Installing mini_portile 0\.6\.1
+Installing tzinfo 0\.3\.42
+Installing rack\-mount 0\.6\.14
+Installing rack\-test 0\.5\.7
+Installing treetop 1\.4\.15
+Installing thor 0\.14\.6
+Installing activesupport 3\.0\.0\.rc
+Installing erubis 2\.6\.6
+Installing activemodel 3\.0\.0\.rc
+Installing arel 0\.4\.0
+Installing mail 2\.2\.20
+Installing activeresource 3\.0\.0\.rc
+Installing actionpack 3\.0\.0\.rc
+Installing activerecord 3\.0\.0\.rc
+Installing actionmailer 3\.0\.0\.rc
+Installing railties 3\.0\.0\.rc
+Installing rails 3\.0\.0\.rc
+Installing nokogiri 1\.6\.5
+
+Bundle complete! 2 Gemfile dependencies, 26 gems total\.
+Use `bundle show [gemname]` to see where a bundled gem is installed\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+As you can see, even though you have two gems in the Gemfile(5), your application needs 26 different gems in order to run\. Bundler remembers the exact versions it installed in \fBGemfile\.lock\fR\. The next time you run bundle install(1) \fIbundle\-install\.1\.html\fR, bundler skips the dependency resolution and installs the same gems as it installed last time\.
+.
+.P
+After checking in the \fBGemfile\.lock\fR into version control and cloning it on another machine, running bundle install(1) \fIbundle\-install\.1\.html\fR will \fIstill\fR install the gems that you installed last time\. You don\'t need to worry that a new release of \fBerubis\fR or \fBmail\fR changes the gems you use\.
+.
+.P
+However, from time to time, you might want to update the gems you are using to the newest versions that still match the gems in your Gemfile(5)\.
+.
+.P
+To do this, run \fBbundle update \-\-all\fR, which will ignore the \fBGemfile\.lock\fR, and resolve all the dependencies again\. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran \fBbundle update \-\-all\fR\.
+.
+.SH "UPDATING A LIST OF GEMS"
+Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
+.
+.P
+For instance, in the scenario above, imagine that \fBnokogiri\fR releases version \fB1\.4\.4\fR, and you want to update it \fIwithout\fR updating Rails and all of its dependencies\. To do this, run \fBbundle update nokogiri\fR\.
+.
+.P
+Bundler will update \fBnokogiri\fR and any of its dependencies, but leave alone Rails and its dependencies\.
+.
+.SH "OVERLAPPING DEPENDENCIES"
+Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same second\-level dependency\. For instance, consider the case of \fBthin\fR and \fBrack\-perftools\-profiler\fR\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "thin"
+gem "rack\-perftools\-profiler"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fBthin\fR gem depends on \fBrack >= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on \fBrack ~> 1\.0\fR\. If you run bundle install, you get:
+.
+.IP "" 4
+.
+.nf
+
+Fetching source index for https://rubygems\.org/
+Installing daemons (1\.1\.0)
+Installing eventmachine (0\.12\.10) with native extensions
+Installing open4 (1\.0\.1)
+Installing perftools\.rb (0\.4\.7) with native extensions
+Installing rack (1\.2\.1)
+Installing rack\-perftools_profiler (0\.0\.2)
+Installing thin (1\.2\.7) with native extensions
+Using bundler (1\.0\.0\.rc\.3)
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, the two gems have their own set of dependencies, but they share \fBrack\fR in common\. If you run \fBbundle update thin\fR, bundler will update \fBdaemons\fR, \fBeventmachine\fR and \fBrack\fR, which are dependencies of \fBthin\fR, but not \fBopen4\fR or \fBperftools\.rb\fR, which are dependencies of \fBrack\-perftools_profiler\fR\. Note that \fBbundle update thin\fR will update \fBrack\fR even though it\'s \fIalso\fR a dependency of \fBrack\-perftools_profiler\fR\.
+.
+.P
+In short, by default, when you update a gem using \fBbundle update\fR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem\.
+.
+.P
+To prevent updating indirect dependencies, prior to version 1\.14 the only option was the \fBCONSERVATIVE UPDATING\fR behavior in bundle install(1) \fIbundle\-install\.1\.html\fR:
+.
+.P
+In this scenario, updating the \fBthin\fR version manually in the Gemfile(5), and then running bundle install(1) \fIbundle\-install\.1\.html\fR will only update \fBdaemons\fR and \fBeventmachine\fR, but not \fBrack\fR\. For more information, see the \fBCONSERVATIVE UPDATING\fR section of bundle install(1) \fIbundle\-install\.1\.html\fR\.
+.
+.P
+Starting with 1\.14, specifying the \fB\-\-conservative\fR option will also prevent indirect dependencies from being updated\.
+.
+.SH "PATCH LEVEL OPTIONS"
+Version 1\.14 introduced 4 patch\-level options that will influence how gem versions are resolved\. One of the following options can be used: \fB\-\-patch\fR, \fB\-\-minor\fR or \fB\-\-major\fR\. \fB\-\-strict\fR can be added to further influence resolution\.
+.
+.TP
+\fB\-\-patch\fR
+Prefer updating only to next patch version\.
+.
+.TP
+\fB\-\-minor\fR
+Prefer updating only to next minor version\.
+.
+.TP
+\fB\-\-major\fR
+Prefer updating to next major version (default)\.
+.
+.TP
+\fB\-\-strict\fR
+Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
+.
+.P
+When Bundler is resolving what versions to use to satisfy declared requirements in the Gemfile or in parent gems, it looks up all available versions, filters out any versions that don\'t satisfy the requirement, and then, by default, sorts them from newest to oldest, considering them in that order\.
+.
+.P
+Providing one of the patch level options (e\.g\. \fB\-\-patch\fR) changes the sort order of the satisfying versions, causing Bundler to consider the latest \fB\-\-patch\fR or \fB\-\-minor\fR version available before other versions\. Note that versions outside the stated patch level could still be resolved to if necessary to find a suitable dependency graph\.
+.
+.P
+For example, if gem \'foo\' is locked at 1\.0\.2, with no gem requirement defined in the Gemfile, and versions 1\.0\.3, 1\.0\.4, 1\.1\.0, 1\.1\.1, 2\.0\.0 all exist, the default order of preference by default (\fB\-\-major\fR) will be "2\.0\.0, 1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2"\.
+.
+.P
+If the \fB\-\-patch\fR option is used, the order of preference will change to "1\.0\.4, 1\.0\.3, 1\.0\.2, 1\.1\.1, 1\.1\.0, 2\.0\.0"\.
+.
+.P
+If the \fB\-\-minor\fR option is used, the order of preference will change to "1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2, 2\.0\.0"\.
+.
+.P
+Combining the \fB\-\-strict\fR option with any of the patch level options will remove any versions beyond the scope of the patch level option, to ensure that no gem is updated that far\.
+.
+.P
+To continue the previous example, if both \fB\-\-patch\fR and \fB\-\-strict\fR options are used, the available versions for resolution would be "1\.0\.4, 1\.0\.3, 1\.0\.2"\. If \fB\-\-minor\fR and \fB\-\-strict\fR are used, it would be "1\.1\.1, 1\.1\.0, 1\.0\.4, 1\.0\.3, 1\.0\.2"\.
+.
+.P
+Gem requirements as defined in the Gemfile will still be the first determining factor for what versions are available\. If the gem requirement for \fBfoo\fR in the Gemfile is \'~> 1\.0\', that will accomplish the same thing as providing the \fB\-\-minor\fR and \fB\-\-strict\fR options\.
+.
+.SH "PATCH LEVEL EXAMPLES"
+Given the following gem specifications:
+.
+.IP "" 4
+.
+.nf
+
+foo 1\.4\.3, requires: ~> bar 2\.0
+foo 1\.4\.4, requires: ~> bar 2\.0
+foo 1\.4\.5, requires: ~> bar 2\.1
+foo 1\.5\.0, requires: ~> bar 2\.1
+foo 1\.5\.1, requires: ~> bar 3\.0
+bar with versions 2\.0\.3, 2\.0\.4, 2\.1\.0, 2\.1\.1, 3\.0\.0
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Gemfile:
+.
+.IP "" 4
+.
+.nf
+
+gem \'foo\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Gemfile\.lock:
+.
+.IP "" 4
+.
+.nf
+
+foo (1\.4\.3)
+ bar (~> 2\.0)
+bar (2\.0\.3)
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Cases:
+.
+.IP "" 4
+.
+.nf
+
+# Command Line Result
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+1 bundle update \-\-patch \'foo 1\.4\.5\', \'bar 2\.1\.1\'
+2 bundle update \-\-patch foo \'foo 1\.4\.5\', \'bar 2\.1\.1\'
+3 bundle update \-\-minor \'foo 1\.5\.1\', \'bar 3\.0\.0\'
+4 bundle update \-\-minor \-\-strict \'foo 1\.5\.0\', \'bar 2\.1\.1\'
+5 bundle update \-\-patch \-\-strict \'foo 1\.4\.4\', \'bar 2\.0\.4\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In case 1, bar is upgraded to 2\.1\.1, a minor version increase, because the dependency from foo 1\.4\.5 required it\.
+.
+.P
+In case 2, only foo is requested to be unlocked, but bar is also allowed to move because it\'s not a declared dependency in the Gemfile\.
+.
+.P
+In case 3, bar goes up a whole major release, because a minor increase is preferred now for foo, and when it goes to 1\.5\.1, it requires 3\.0\.0 of bar\.
+.
+.P
+In case 4, foo is preferred up to a minor version, but 1\.5\.1 won\'t work because the \-\-strict flag removes bar 3\.0\.0 from consideration since it\'s a major increment\.
+.
+.P
+In case 5, both foo and bar have any minor or major increments removed from consideration because of the \-\-strict flag, so the most they can move is up to 1\.4\.4 and 2\.0\.4\.
+.
+.SH "RECOMMENDED WORKFLOW"
+In general, when working with an application managed with bundler, you should use the following workflow:
+.
+.IP "\(bu" 4
+After you create your Gemfile(5) for the first time, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+Check the resulting \fBGemfile\.lock\fR into version control
+.
+.IP
+$ git add Gemfile\.lock
+.
+.IP "\(bu" 4
+When checking out this repository on another development machine, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+When checking out this repository on a deployment machine, run
+.
+.IP
+$ bundle install \-\-deployment
+.
+.IP "\(bu" 4
+After changing the Gemfile(5) to reflect a new or update dependency, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+Make sure to check the updated \fBGemfile\.lock\fR into version control
+.
+.IP
+$ git add Gemfile\.lock
+.
+.IP "\(bu" 4
+If bundle install(1) \fIbundle\-install\.1\.html\fR reports a conflict, manually update the specific gems that you changed in the Gemfile(5)
+.
+.IP
+$ bundle update rails thin
+.
+.IP "\(bu" 4
+If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run
+.
+.IP
+$ bundle update \-\-all
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-update.1.ronn b/lib/bundler/man/bundle-update.1.ronn
new file mode 100644
index 0000000000..fe500cdc96
--- /dev/null
+++ b/lib/bundler/man/bundle-update.1.ronn
@@ -0,0 +1,351 @@
+bundle-update(1) -- Update your gems to the latest available versions
+=====================================================================
+
+## SYNOPSIS
+
+`bundle update` <*gems> [--all]
+ [--group=NAME]
+ [--source=NAME]
+ [--local]
+ [--ruby]
+ [--bundler[=VERSION]]
+ [--full-index]
+ [--jobs=JOBS]
+ [--quiet]
+ [--patch|--minor|--major]
+ [--redownload]
+ [--strict]
+ [--conservative]
+
+## DESCRIPTION
+
+Update the gems specified (all gems, if `--all` flag is used), ignoring
+the previously installed gems specified in the `Gemfile.lock`. In
+general, you should use [bundle install(1)](bundle-install.1.html) to install the same exact
+gems and versions across machines.
+
+You would use `bundle update` to explicitly update the version of a
+gem.
+
+## OPTIONS
+
+* `--all`:
+ Update all gems specified in Gemfile.
+
+* `--group=<name>`, `-g=[<name>]`:
+ Only update the gems in the specified group. For instance, you can update all gems
+ in the development group with `bundle update --group development`. You can also
+ call `bundle update rails --group test` to update the rails gem and all gems in
+ the test group, for example.
+
+* `--source=<name>`:
+ The name of a `:git` or `:path` source used in the Gemfile(5). For
+ instance, with a `:git` source of `http://github.com/rails/rails.git`,
+ you would call `bundle update --source rails`
+
+* `--local`:
+ Do not attempt to fetch gems remotely and use the gem cache instead.
+
+* `--ruby`:
+ Update the locked version of Ruby to the current version of Ruby.
+
+* `--bundler`:
+ Update the locked version of bundler to the invoked bundler version.
+
+* `--full-index`:
+ Fall back to using the single-file index of all gems.
+
+* `--jobs=[<number>]`, `-j[<number>]`:
+ Specify the number of jobs to run in parallel. The default is the number of
+ available processors.
+
+* `--retry=[<number>]`:
+ Retry failed network or git requests for <number> times.
+
+* `--quiet`:
+ Only output warnings and errors.
+
+* `--redownload`:
+ Force downloading every gem.
+
+* `--patch`:
+ Prefer updating only to next patch version.
+
+* `--minor`:
+ Prefer updating only to next minor version.
+
+* `--major`:
+ Prefer updating to next major version (default).
+
+* `--strict`:
+ Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.
+
+* `--conservative`:
+ Use bundle install conservative update behavior and do not allow indirect dependencies to be updated.
+
+## UPDATING ALL GEMS
+
+If you run `bundle update --all`, bundler will ignore
+any previously installed gems and resolve all dependencies again
+based on the latest versions of all gems available in the sources.
+
+Consider the following Gemfile(5):
+
+ source "https://rubygems.org"
+
+ gem "rails", "3.0.0.rc"
+ gem "nokogiri"
+
+When you run [bundle install(1)](bundle-install.1.html) the first time, bundler will resolve
+all of the dependencies, all the way down, and install what you need:
+
+ Fetching gem metadata from https://rubygems.org/.........
+ Resolving dependencies...
+ Installing builder 2.1.2
+ Installing abstract 1.0.0
+ Installing rack 1.2.8
+ Using bundler 1.7.6
+ Installing rake 10.4.0
+ Installing polyglot 0.3.5
+ Installing mime-types 1.25.1
+ Installing i18n 0.4.2
+ Installing mini_portile 0.6.1
+ Installing tzinfo 0.3.42
+ Installing rack-mount 0.6.14
+ Installing rack-test 0.5.7
+ Installing treetop 1.4.15
+ Installing thor 0.14.6
+ Installing activesupport 3.0.0.rc
+ Installing erubis 2.6.6
+ Installing activemodel 3.0.0.rc
+ Installing arel 0.4.0
+ Installing mail 2.2.20
+ Installing activeresource 3.0.0.rc
+ Installing actionpack 3.0.0.rc
+ Installing activerecord 3.0.0.rc
+ Installing actionmailer 3.0.0.rc
+ Installing railties 3.0.0.rc
+ Installing rails 3.0.0.rc
+ Installing nokogiri 1.6.5
+
+ Bundle complete! 2 Gemfile dependencies, 26 gems total.
+ Use `bundle show [gemname]` to see where a bundled gem is installed.
+
+As you can see, even though you have two gems in the Gemfile(5), your application
+needs 26 different gems in order to run. Bundler remembers the exact versions
+it installed in `Gemfile.lock`. The next time you run [bundle install(1)](bundle-install.1.html), bundler skips
+the dependency resolution and installs the same gems as it installed last time.
+
+After checking in the `Gemfile.lock` into version control and cloning it on another
+machine, running [bundle install(1)](bundle-install.1.html) will _still_ install the gems that you installed
+last time. You don't need to worry that a new release of `erubis` or `mail` changes
+the gems you use.
+
+However, from time to time, you might want to update the gems you are using to the
+newest versions that still match the gems in your Gemfile(5).
+
+To do this, run `bundle update --all`, which will ignore the `Gemfile.lock`, and resolve
+all the dependencies again. Keep in mind that this process can result in a significantly
+different set of the 25 gems, based on the requirements of new gems that the gem
+authors released since the last time you ran `bundle update --all`.
+
+## UPDATING A LIST OF GEMS
+
+Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the
+gems that you specified locked to the versions in the `Gemfile.lock`.
+
+For instance, in the scenario above, imagine that `nokogiri` releases version `1.4.4`, and
+you want to update it _without_ updating Rails and all of its dependencies. To do this,
+run `bundle update nokogiri`.
+
+Bundler will update `nokogiri` and any of its dependencies, but leave alone Rails and
+its dependencies.
+
+## OVERLAPPING DEPENDENCIES
+
+Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same
+second-level dependency. For instance, consider the case of `thin` and
+`rack-perftools-profiler`.
+
+ source "https://rubygems.org"
+
+ gem "thin"
+ gem "rack-perftools-profiler"
+
+The `thin` gem depends on `rack >= 1.0`, while `rack-perftools-profiler` depends
+on `rack ~> 1.0`. If you run bundle install, you get:
+
+ Fetching source index for https://rubygems.org/
+ Installing daemons (1.1.0)
+ Installing eventmachine (0.12.10) with native extensions
+ Installing open4 (1.0.1)
+ Installing perftools.rb (0.4.7) with native extensions
+ Installing rack (1.2.1)
+ Installing rack-perftools_profiler (0.0.2)
+ Installing thin (1.2.7) with native extensions
+ Using bundler (1.0.0.rc.3)
+
+In this case, the two gems have their own set of dependencies, but they share
+`rack` in common. If you run `bundle update thin`, bundler will update `daemons`,
+`eventmachine` and `rack`, which are dependencies of `thin`, but not `open4` or
+`perftools.rb`, which are dependencies of `rack-perftools_profiler`. Note that
+`bundle update thin` will update `rack` even though it's _also_ a dependency of
+`rack-perftools_profiler`.
+
+In short, by default, when you update a gem using `bundle update`, bundler will
+update all dependencies of that gem, including those that are also dependencies
+of another gem.
+
+To prevent updating indirect dependencies, prior to version 1.14 the only option
+was the `CONSERVATIVE UPDATING` behavior in [bundle install(1)](bundle-install.1.html):
+
+In this scenario, updating the `thin` version manually in the Gemfile(5),
+and then running [bundle install(1)](bundle-install.1.html) will only update `daemons` and `eventmachine`,
+but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section
+of [bundle install(1)](bundle-install.1.html).
+
+Starting with 1.14, specifying the `--conservative` option will also prevent indirect
+dependencies from being updated.
+
+## PATCH LEVEL OPTIONS
+
+Version 1.14 introduced 4 patch-level options that will influence how gem
+versions are resolved. One of the following options can be used: `--patch`,
+`--minor` or `--major`. `--strict` can be added to further influence resolution.
+
+* `--patch`:
+ Prefer updating only to next patch version.
+
+* `--minor`:
+ Prefer updating only to next minor version.
+
+* `--major`:
+ Prefer updating to next major version (default).
+
+* `--strict`:
+ Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.
+
+When Bundler is resolving what versions to use to satisfy declared
+requirements in the Gemfile or in parent gems, it looks up all
+available versions, filters out any versions that don't satisfy
+the requirement, and then, by default, sorts them from newest to
+oldest, considering them in that order.
+
+Providing one of the patch level options (e.g. `--patch`) changes the
+sort order of the satisfying versions, causing Bundler to consider the
+latest `--patch` or `--minor` version available before other versions.
+Note that versions outside the stated patch level could still be
+resolved to if necessary to find a suitable dependency graph.
+
+For example, if gem 'foo' is locked at 1.0.2, with no gem requirement
+defined in the Gemfile, and versions 1.0.3, 1.0.4, 1.1.0, 1.1.1, 2.0.0
+all exist, the default order of preference by default (`--major`) will
+be "2.0.0, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2".
+
+If the `--patch` option is used, the order of preference will change to
+"1.0.4, 1.0.3, 1.0.2, 1.1.1, 1.1.0, 2.0.0".
+
+If the `--minor` option is used, the order of preference will change to
+"1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 2.0.0".
+
+Combining the `--strict` option with any of the patch level options
+will remove any versions beyond the scope of the patch level option,
+to ensure that no gem is updated that far.
+
+To continue the previous example, if both `--patch` and `--strict`
+options are used, the available versions for resolution would be
+"1.0.4, 1.0.3, 1.0.2". If `--minor` and `--strict` are used, it would
+be "1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2".
+
+Gem requirements as defined in the Gemfile will still be the first
+determining factor for what versions are available. If the gem
+requirement for `foo` in the Gemfile is '~> 1.0', that will accomplish
+the same thing as providing the `--minor` and `--strict` options.
+
+## PATCH LEVEL EXAMPLES
+
+Given the following gem specifications:
+
+ foo 1.4.3, requires: ~> bar 2.0
+ foo 1.4.4, requires: ~> bar 2.0
+ foo 1.4.5, requires: ~> bar 2.1
+ foo 1.5.0, requires: ~> bar 2.1
+ foo 1.5.1, requires: ~> bar 3.0
+ bar with versions 2.0.3, 2.0.4, 2.1.0, 2.1.1, 3.0.0
+
+Gemfile:
+
+ gem 'foo'
+
+Gemfile.lock:
+
+ foo (1.4.3)
+ bar (~> 2.0)
+ bar (2.0.3)
+
+Cases:
+
+ # Command Line Result
+ ------------------------------------------------------------
+ 1 bundle update --patch 'foo 1.4.5', 'bar 2.1.1'
+ 2 bundle update --patch foo 'foo 1.4.5', 'bar 2.1.1'
+ 3 bundle update --minor 'foo 1.5.1', 'bar 3.0.0'
+ 4 bundle update --minor --strict 'foo 1.5.0', 'bar 2.1.1'
+ 5 bundle update --patch --strict 'foo 1.4.4', 'bar 2.0.4'
+
+In case 1, bar is upgraded to 2.1.1, a minor version increase, because
+the dependency from foo 1.4.5 required it.
+
+In case 2, only foo is requested to be unlocked, but bar is also
+allowed to move because it's not a declared dependency in the Gemfile.
+
+In case 3, bar goes up a whole major release, because a minor increase
+is preferred now for foo, and when it goes to 1.5.1, it requires 3.0.0
+of bar.
+
+In case 4, foo is preferred up to a minor version, but 1.5.1 won't work
+because the --strict flag removes bar 3.0.0 from consideration since
+it's a major increment.
+
+In case 5, both foo and bar have any minor or major increments removed
+from consideration because of the --strict flag, so the most they can
+move is up to 1.4.4 and 2.0.4.
+
+## RECOMMENDED WORKFLOW
+
+In general, when working with an application managed with bundler, you should
+use the following workflow:
+
+* After you create your Gemfile(5) for the first time, run
+
+ $ bundle install
+
+* Check the resulting `Gemfile.lock` into version control
+
+ $ git add Gemfile.lock
+
+* When checking out this repository on another development machine, run
+
+ $ bundle install
+
+* When checking out this repository on a deployment machine, run
+
+ $ bundle install --deployment
+
+* After changing the Gemfile(5) to reflect a new or update dependency, run
+
+ $ bundle install
+
+* Make sure to check the updated `Gemfile.lock` into version control
+
+ $ git add Gemfile.lock
+
+* If [bundle install(1)](bundle-install.1.html) reports a conflict, manually update the specific
+ gems that you changed in the Gemfile(5)
+
+ $ bundle update rails thin
+
+* If you want to update all the gems to the latest possible versions that
+ still match the gems listed in the Gemfile(5), run
+
+ $ bundle update --all
diff --git a/lib/bundler/man/bundle-version.1 b/lib/bundler/man/bundle-version.1
new file mode 100644
index 0000000000..5e3ed44600
--- /dev/null
+++ b/lib/bundler/man/bundle-version.1
@@ -0,0 +1,35 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-VERSION" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-version\fR \- Prints Bundler version information
+.
+.SH "SYNOPSIS"
+\fBbundle version\fR
+.
+.SH "DESCRIPTION"
+Prints Bundler version information\.
+.
+.SH "OPTIONS"
+No options\.
+.
+.SH "EXAMPLE"
+Print the version of Bundler with build date and commit hash of the in the Git source\.
+.
+.IP "" 4
+.
+.nf
+
+bundle version
+.
+.fi
+.
+.IP "" 0
+.
+.P
+shows \fBBundler version 2\.3\.21 (2022\-08\-24 commit d54be5fdd8)\fR for example\.
+.
+.P
+cf\. \fBbundle \-\-version\fR shows \fBBundler version 2\.3\.21\fR\.
diff --git a/lib/bundler/man/bundle-version.1.ronn b/lib/bundler/man/bundle-version.1.ronn
new file mode 100644
index 0000000000..46c6f0b30a
--- /dev/null
+++ b/lib/bundler/man/bundle-version.1.ronn
@@ -0,0 +1,24 @@
+bundle-version(1) -- Prints Bundler version information
+=======================================================
+
+## SYNOPSIS
+
+`bundle version`
+
+## DESCRIPTION
+
+Prints Bundler version information.
+
+## OPTIONS
+
+No options.
+
+## EXAMPLE
+
+Print the version of Bundler with build date and commit hash of the in the Git source.
+
+ bundle version
+
+shows `Bundler version 2.3.21 (2022-08-24 commit d54be5fdd8)` for example.
+
+cf. `bundle --version` shows `Bundler version 2.3.21`.
diff --git a/lib/bundler/man/bundle-viz.1 b/lib/bundler/man/bundle-viz.1
new file mode 100644
index 0000000000..d5330ec754
--- /dev/null
+++ b/lib/bundler/man/bundle-viz.1
@@ -0,0 +1,42 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-VIZ" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
+.
+.SH "SYNOPSIS"
+\fBbundle viz\fR [\-\-file=FILE] [\-\-format=FORMAT] [\-\-requirements] [\-\-version] [\-\-without=GROUP GROUP]
+.
+.SH "DESCRIPTION"
+\fBviz\fR generates a PNG file of the current \fBGemfile(5)\fR as a dependency graph\. \fBviz\fR requires the ruby\-graphviz gem (and its dependencies)\.
+.
+.P
+The associated gems must also be installed via \fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR\.
+.
+.P
+\fBviz\fR command was deprecated in Bundler 2\.2\. Use bundler\-graph plugin \fIhttps://github\.com/rubygems/bundler\-graph\fR instead\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-file\fR, \fB\-f\fR
+The name to use for the generated file\. See \fB\-\-format\fR option
+.
+.TP
+\fB\-\-format\fR, \fB\-F\fR
+This is output format option\. Supported format is png, jpg, svg, dot \.\.\.
+.
+.TP
+\fB\-\-requirements\fR, \fB\-R\fR
+Set to show the version of each required dependency\.
+.
+.TP
+\fB\-\-version\fR, \fB\-v\fR
+Set to show each gem version\.
+.
+.TP
+\fB\-\-without\fR, \fB\-W\fR
+Exclude gems that are part of the specified named group\.
+
diff --git a/lib/bundler/man/bundle-viz.1.ronn b/lib/bundler/man/bundle-viz.1.ronn
new file mode 100644
index 0000000000..f220256943
--- /dev/null
+++ b/lib/bundler/man/bundle-viz.1.ronn
@@ -0,0 +1,32 @@
+bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
+=====================================================================
+
+## SYNOPSIS
+
+`bundle viz` [--file=FILE]
+ [--format=FORMAT]
+ [--requirements]
+ [--version]
+ [--without=GROUP GROUP]
+
+## DESCRIPTION
+
+`viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
+`viz` requires the ruby-graphviz gem (and its dependencies).
+
+The associated gems must also be installed via [`bundle install(1)`](bundle-install.1.html).
+
+`viz` command was deprecated in Bundler 2.2. Use [bundler-graph plugin](https://github.com/rubygems/bundler-graph) instead.
+
+## OPTIONS
+
+* `--file`, `-f`:
+ The name to use for the generated file. See `--format` option
+* `--format`, `-F`:
+ This is output format option. Supported format is png, jpg, svg, dot ...
+* `--requirements`, `-R`:
+ Set to show the version of each required dependency.
+* `--version`, `-v`:
+ Set to show each gem version.
+* `--without`, `-W`:
+ Exclude gems that are part of the specified named group.
diff --git a/lib/bundler/man/bundle.1 b/lib/bundler/man/bundle.1
new file mode 100644
index 0000000000..99c65a72b5
--- /dev/null
+++ b/lib/bundler/man/bundle.1
@@ -0,0 +1,141 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE" "1" "August 2023" "" ""
+.
+.SH "NAME"
+\fBbundle\fR \- Ruby Dependency Management
+.
+.SH "SYNOPSIS"
+\fBbundle\fR COMMAND [\-\-no\-color] [\-\-verbose] [ARGS]
+.
+.SH "DESCRIPTION"
+Bundler manages an \fBapplication\'s dependencies\fR through its entire life across many machines systematically and repeatably\.
+.
+.P
+See the bundler website \fIhttps://bundler\.io\fR for information on getting started, and Gemfile(5) for more information on the \fBGemfile\fR format\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-no\-color\fR
+Print all output without color
+.
+.TP
+\fB\-\-retry\fR, \fB\-r\fR
+Specify the number of times you wish to attempt network commands
+.
+.TP
+\fB\-\-verbose\fR, \fB\-V\fR
+Print out additional logging information
+.
+.SH "BUNDLE COMMANDS"
+We divide \fBbundle\fR subcommands into primary commands and utilities:
+.
+.SH "PRIMARY COMMANDS"
+.
+.TP
+\fBbundle install(1)\fR \fIbundle\-install\.1\.html\fR
+Install the gems specified by the \fBGemfile\fR or \fBGemfile\.lock\fR
+.
+.TP
+\fBbundle update(1)\fR \fIbundle\-update\.1\.html\fR
+Update dependencies to their latest versions
+.
+.TP
+\fBbundle cache(1)\fR \fIbundle\-cache\.1\.html\fR
+Package the \.gem files required by your application into the \fBvendor/cache\fR directory (aliases: \fBbundle package\fR, \fBbundle pack\fR)
+.
+.TP
+\fBbundle exec(1)\fR \fIbundle\-exec\.1\.html\fR
+Execute a script in the current bundle
+.
+.TP
+\fBbundle config(1)\fR \fIbundle\-config\.1\.html\fR
+Specify and read configuration options for Bundler
+.
+.TP
+\fBbundle help(1)\fR \fIbundle\-help\.1\.html\fR
+Display detailed help for each subcommand
+.
+.SH "UTILITIES"
+.
+.TP
+\fBbundle add(1)\fR \fIbundle\-add\.1\.html\fR
+Add the named gem to the Gemfile and run \fBbundle install\fR
+.
+.TP
+\fBbundle binstubs(1)\fR \fIbundle\-binstubs\.1\.html\fR
+Generate binstubs for executables in a gem
+.
+.TP
+\fBbundle check(1)\fR \fIbundle\-check\.1\.html\fR
+Determine whether the requirements for your application are installed and available to Bundler
+.
+.TP
+\fBbundle show(1)\fR \fIbundle\-show\.1\.html\fR
+Show the source location of a particular gem in the bundle
+.
+.TP
+\fBbundle outdated(1)\fR \fIbundle\-outdated\.1\.html\fR
+Show all of the outdated gems in the current bundle
+.
+.TP
+\fBbundle console(1)\fR (deprecated)
+Start an IRB session in the current bundle
+.
+.TP
+\fBbundle open(1)\fR \fIbundle\-open\.1\.html\fR
+Open an installed gem in the editor
+.
+.TP
+\fBbundle lock(1)\fR \fIbundle\-lock\.1\.html\fR
+Generate a lockfile for your dependencies
+.
+.TP
+\fBbundle viz(1)\fR \fIbundle\-viz\.1\.html\fR (deprecated)
+Generate a visual representation of your dependencies
+.
+.TP
+\fBbundle init(1)\fR \fIbundle\-init\.1\.html\fR
+Generate a simple \fBGemfile\fR, placed in the current directory
+.
+.TP
+\fBbundle gem(1)\fR \fIbundle\-gem\.1\.html\fR
+Create a simple gem, suitable for development with Bundler
+.
+.TP
+\fBbundle platform(1)\fR \fIbundle\-platform\.1\.html\fR
+Display platform compatibility information
+.
+.TP
+\fBbundle clean(1)\fR \fIbundle\-clean\.1\.html\fR
+Clean up unused gems in your Bundler directory
+.
+.TP
+\fBbundle doctor(1)\fR \fIbundle\-doctor\.1\.html\fR
+Display warnings about common problems
+.
+.TP
+\fBbundle remove(1)\fR \fIbundle\-remove\.1\.html\fR
+Removes gems from the Gemfile
+.
+.TP
+\fBbundle plugin(1)\fR \fIbundle\-plugin\.1\.html\fR
+Manage Bundler plugins
+.
+.TP
+\fBbundle version(1)\fR \fIbundle\-version\.1\.html\fR
+Prints Bundler version information
+.
+.SH "PLUGINS"
+When running a command that isn\'t listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named \fBbundler\-<command>\fR and execute it, passing down any extra arguments to it\.
+.
+.SH "OBSOLETE"
+These commands are obsolete and should no longer be used:
+.
+.IP "\(bu" 4
+\fBbundle inject(1)\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle.1.ronn b/lib/bundler/man/bundle.1.ronn
new file mode 100644
index 0000000000..8245effabd
--- /dev/null
+++ b/lib/bundler/man/bundle.1.ronn
@@ -0,0 +1,116 @@
+bundle(1) -- Ruby Dependency Management
+=======================================
+
+## SYNOPSIS
+
+`bundle` COMMAND [--no-color] [--verbose] [ARGS]
+
+## DESCRIPTION
+
+Bundler manages an `application's dependencies` through its entire life
+across many machines systematically and repeatably.
+
+See [the bundler website](https://bundler.io) for information on getting
+started, and Gemfile(5) for more information on the `Gemfile` format.
+
+## OPTIONS
+
+* `--no-color`:
+ Print all output without color
+
+* `--retry`, `-r`:
+ Specify the number of times you wish to attempt network commands
+
+* `--verbose`, `-V`:
+ Print out additional logging information
+
+## BUNDLE COMMANDS
+
+We divide `bundle` subcommands into primary commands and utilities:
+
+## PRIMARY COMMANDS
+
+* [`bundle install(1)`](bundle-install.1.html):
+ Install the gems specified by the `Gemfile` or `Gemfile.lock`
+
+* [`bundle update(1)`](bundle-update.1.html):
+ Update dependencies to their latest versions
+
+* [`bundle cache(1)`](bundle-cache.1.html):
+ Package the .gem files required by your application into the
+ `vendor/cache` directory (aliases: `bundle package`, `bundle pack`)
+
+* [`bundle exec(1)`](bundle-exec.1.html):
+ Execute a script in the current bundle
+
+* [`bundle config(1)`](bundle-config.1.html):
+ Specify and read configuration options for Bundler
+
+* [`bundle help(1)`](bundle-help.1.html):
+ Display detailed help for each subcommand
+
+## UTILITIES
+
+* [`bundle add(1)`](bundle-add.1.html):
+ Add the named gem to the Gemfile and run `bundle install`
+
+* [`bundle binstubs(1)`](bundle-binstubs.1.html):
+ Generate binstubs for executables in a gem
+
+* [`bundle check(1)`](bundle-check.1.html):
+ Determine whether the requirements for your application are installed
+ and available to Bundler
+
+* [`bundle show(1)`](bundle-show.1.html):
+ Show the source location of a particular gem in the bundle
+
+* [`bundle outdated(1)`](bundle-outdated.1.html):
+ Show all of the outdated gems in the current bundle
+
+* `bundle console(1)` (deprecated):
+ Start an IRB session in the current bundle
+
+* [`bundle open(1)`](bundle-open.1.html):
+ Open an installed gem in the editor
+
+* [`bundle lock(1)`](bundle-lock.1.html):
+ Generate a lockfile for your dependencies
+
+* [`bundle viz(1)`](bundle-viz.1.html) (deprecated):
+ Generate a visual representation of your dependencies
+
+* [`bundle init(1)`](bundle-init.1.html):
+ Generate a simple `Gemfile`, placed in the current directory
+
+* [`bundle gem(1)`](bundle-gem.1.html):
+ Create a simple gem, suitable for development with Bundler
+
+* [`bundle platform(1)`](bundle-platform.1.html):
+ Display platform compatibility information
+
+* [`bundle clean(1)`](bundle-clean.1.html):
+ Clean up unused gems in your Bundler directory
+
+* [`bundle doctor(1)`](bundle-doctor.1.html):
+ Display warnings about common problems
+
+* [`bundle remove(1)`](bundle-remove.1.html):
+ Removes gems from the Gemfile
+
+* [`bundle plugin(1)`](bundle-plugin.1.html):
+ Manage Bundler plugins
+
+* [`bundle version(1)`](bundle-version.1.html):
+ Prints Bundler version information
+
+## PLUGINS
+
+When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
+Bundler will try to find an executable on your path named `bundler-<command>`
+and execute it, passing down any extra arguments to it.
+
+## OBSOLETE
+
+These commands are obsolete and should no longer be used:
+
+* `bundle inject(1)`
diff --git a/lib/bundler/man/gemfile.5 b/lib/bundler/man/gemfile.5
new file mode 100644
index 0000000000..352fa0f545
--- /dev/null
+++ b/lib/bundler/man/gemfile.5
@@ -0,0 +1,736 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "GEMFILE" "5" "August 2023" "" ""
+.
+.SH "NAME"
+\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
+.
+.SH "SYNOPSIS"
+A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
+.
+.P
+Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
+.
+.SH "SYNTAX"
+A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
+.
+.SH "GLOBAL SOURCE"
+At the top of the \fBGemfile\fR, add a single line for the \fBRubyGems\fR source that contains the gems listed in the \fBGemfile\fR\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+You can add only one global source\. In Bundler 1\.13, adding multiple global sources was deprecated\. The \fBsource\fR \fBMUST\fR be a valid RubyGems repository\.
+.
+.P
+To use more than one source of RubyGems, you should use \fI\fBsource\fR block\fR\.
+.
+.P
+A source is checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
+.
+.P
+\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: If a gem is found in more than one global source, Bundler will print a warning after installing the gem indicating which source was used, and listing the other sources where the gem is available\. A specific source can be selected for gems that need to use a non\-standard repository, suppressing this warning, by using the \fI\fB:source\fR option\fR or \fBsource\fR block\.
+.
+.SS "CREDENTIALS"
+Some gem sources require a username and password\. Use bundle config(1) \fIbundle\-config\.1\.html\fR to set the username and password for any of the sources that need it\. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config gems\.example\.com user:password
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For some sources, like a company Gemfury account, it may be easier to include the credentials in the Gemfile as part of the source URL\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://user:password@gems\.example\.com"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Credentials in the source URL will take precedence over credentials set using \fBconfig\fR\.
+.
+.SH "RUBY"
+If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
+.
+.SS "VERSION (required)"
+The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "3\.1\.2"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you wish to derive your Ruby version from a version file (ie \.ruby\-version), you can use the \fBfile\fR option instead\.
+.
+.IP "" 4
+.
+.nf
+
+ruby file: "\.ruby\-version"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "ENGINE"
+Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
+.
+.P
+What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby language\.
+.
+.IP "\(bu" 4
+For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
+.
+.IP "\(bu" 4
+Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
+.
+.IP "" 0
+.
+.SS "ENGINE VERSION"
+Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "PATCHLEVEL"
+Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
+.
+.P
+This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "3\.1\.2", patchlevel: "20"
+.
+.fi
+.
+.IP "" 0
+.
+.SH "GEMS"
+Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
+.
+.SS "NAME (required)"
+For each gem requirement, list a single \fIgem\fR line\.
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "VERSION"
+Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri", ">= 1\.4\.2"
+gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "REQUIRE AS"
+Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
+.
+.IP "" 4
+.
+.nf
+
+gem "redis", require: ["redis/connection/hiredis", "redis"]
+gem "webmock", require: false
+gem "byebug", require: true
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The argument defaults to the name of the gem\. For example, these are identical:
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri"
+gem "nokogiri", require: "nokogiri"
+gem "nokogiri", require: true
+.
+.fi
+.
+.IP "" 0
+.
+.SS "GROUPS"
+Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rspec", group: :test
+gem "wirble", groups: [:development, :test]
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
+.
+.IP "" 4
+.
+.nf
+
+# setup adds gems to Ruby\'s load path
+Bundler\.setup # defaults to all groups
+require "bundler/setup" # same as Bundler\.setup
+Bundler\.setup(:default) # only set up the _default_ group
+Bundler\.setup(:test) # only set up the _test_ group (but `not` _default_)
+Bundler\.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
+
+# require requires all of the gems in the specified groups
+Bundler\.require # defaults to the _default_ group
+Bundler\.require(:default) # identical
+Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
+Bundler\.require(:test) # requires the _test_ group
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fBwithout\fR configuration\.
+.
+.P
+To specify multiple groups to ignore, specify a list of groups separated by spaces\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config set \-\-local without test
+bundle config set \-\-local without development test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
+.
+.P
+Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttps://bundler\.io/rationale\.html\fR\.
+.
+.SS "PLATFORMS"
+If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
+.
+.P
+There are a number of \fBGemfile\fR platforms:
+.
+.TP
+\fBruby\fR
+C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
+.
+.TP
+\fBmri\fR
+C Ruby (MRI) only, but not Windows
+.
+.TP
+\fBwindows\fR
+Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
+.
+.TP
+\fBmswin\fR
+Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
+.
+.TP
+\fBmswin64\fR
+Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
+.
+.TP
+\fBrbx\fR
+Rubinius
+.
+.TP
+\fBjruby\fR
+JRuby
+.
+.TP
+\fBtruffleruby\fR
+TruffleRuby
+.
+.P
+On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
+.
+.IP "" 4
+.
+.nf
+
+ruby_31
+.
+.fi
+.
+.IP "" 0
+.
+.P
+As with groups (above), you may specify one or more platforms:
+.
+.IP "" 4
+.
+.nf
+
+gem "weakling", platforms: :jruby
+gem "ruby\-debug", platforms: :mri_31
+gem "nokogiri", platforms: [:windows_31, :jruby]
+.
+.fi
+.
+.IP "" 0
+.
+.P
+All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
+.
+.SS "FORCE_RUBY_PLATFORM"
+If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
+.
+.IP "" 4
+.
+.nf
+
+gem "ffi", force_ruby_platform: true
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This can be handy (assuming the pure ruby variant works fine) when:
+.
+.IP "\(bu" 4
+You\'re having issues with the platform specific variant\.
+.
+.IP "\(bu" 4
+The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
+.
+.IP "" 0
+.
+.SS "SOURCE"
+You can select an alternate RubyGems repository for a gem using the \':source\' option\.
+.
+.IP "" 4
+.
+.nf
+
+gem "some_internal_gem", source: "https://gems\.example\.com"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+This forces the gem to be loaded from this source and ignores the global source declared at the top level of the file\. If the gem does not exist in this source, it will not be installed\.
+.
+.P
+Bundler will search for child dependencies of this gem by first looking in the source selected for the parent, but if they are not found there, it will fall back on the global source\.
+.
+.P
+\fBNote about a behavior of the feature deprecated in Bundler 1\.13\fR: Selecting a specific source repository this way also suppresses the ambiguous gem warning described above in \fIGLOBAL SOURCE\fR\.
+.
+.P
+Using the \fB:source\fR option for an individual gem will also make that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when adding gems with explicit sources, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources\.
+.
+.SS "GIT"
+If necessary, you can specify that a gem is located at a particular git repository using the \fB:git\fR parameter\. The repository can be accessed via several protocols:
+.
+.TP
+\fBHTTP(S)\fR
+gem "rails", git: "https://github\.com/rails/rails\.git"
+.
+.TP
+\fBSSH\fR
+gem "rails", git: "git@github\.com:rails/rails\.git"
+.
+.TP
+\fBgit\fR
+gem "rails", git: "git://github\.com/rails/rails\.git"
+.
+.P
+If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
+.
+.P
+\fBNOTE\fR: \fBhttp://\fR and \fBgit://\fR URLs should be avoided if at all possible\. These protocols are unauthenticated, so a man\-in\-the\-middle attacker can deliver malicious code and compromise your system\. HTTPS and SSH are strongly preferred\.
+.
+.P
+The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
+.
+.P
+A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\.
+.
+.P
+If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
+.
+.P
+If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
+# bundle install will fail, because the \.gemspec in the rails
+# repository\'s master branch specifies version 3\.0\.0
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
+.
+.P
+Git repositories support a number of additional options\.
+.
+.TP
+\fBbranch\fR, \fBtag\fR, and \fBref\fR
+You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
+.
+.IP
+gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
+.
+.IP
+gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
+.
+.IP
+gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
+.
+.TP
+\fBsubmodules\fR
+For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
+.
+.P
+If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
+.
+.IP "" 4
+.
+.nf
+
+|~rails [git root]
+| |\-rails\.gemspec [rails gem located here]
+|~actionpack
+| |\-actionpack\.gemspec [actionpack gem located here]
+|~activesupport
+| |\-activesupport\.gemspec [activesupport gem located here]
+|\.\.\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
+.
+.SS "GIT SOURCE"
+A custom git source can be defined via the \fBgit_source\fR method\. Provide the source\'s name as an argument, and a block which receives a single argument and interpolates it into a string to return the full repo address:
+.
+.IP "" 4
+.
+.nf
+
+git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
+gem \'rails\', stash: \'forks/rails\'
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In addition, if you wish to choose a specific branch:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", stash: "forks/rails", branch: "branch_name"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "GITHUB"
+\fBNOTE\fR: This shorthand should be avoided until Bundler 2\.0, since it currently expands to an insecure \fBgit://\fR URL\. This allows a man\-in\-the\-middle attacker to compromise your system\.
+.
+.P
+If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", github: "rails/rails"
+gem "rails", github: "rails"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Are both equivalent to
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", git: "https://github\.com/rails/rails\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
+.P
+You can also directly pass a pull request URL:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", github: "https://github\.com/rails/rails/pull/43753"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Which is equivalent to:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "GIST"
+If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
+.
+.IP "" 4
+.
+.nf
+
+gem "the_hatch", gist: "4815162342"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Is equivalent to:
+.
+.IP "" 4
+.
+.nf
+
+gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the \fBgist\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
+.SS "BITBUCKET"
+If the git repository you want to use is hosted on Bitbucket and is public, you can use the :bitbucket shorthand to specify the bitbucket username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", bitbucket: "rails/rails"
+gem "rails", bitbucket: "rails"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Are both equivalent to
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the \fBbitbucket\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
+.
+.SS "PATH"
+You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
+.
+.P
+Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
+.
+.P
+Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", path: "vendor/rails"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you would like to use multiple local gems directly from the filesystem, you can set a global \fBpath\fR option to the path containing the gem\'s files\. This will automatically load gemspec files from subdirectories\.
+.
+.IP "" 4
+.
+.nf
+
+path \'components\' do
+ gem \'admin_ui\'
+ gem \'public_ui\'
+end
+.
+.fi
+.
+.IP "" 0
+.
+.SH "BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS"
+The \fB:source\fR, \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://gems\.example\.com" do
+ gem "some_internal_gem"
+ gem "another_internal_gem"
+end
+
+git "https://github\.com/rails/rails\.git" do
+ gem "activesupport"
+ gem "actionpack"
+end
+
+platforms :ruby do
+ gem "ruby\-debug"
+ gem "sqlite3"
+end
+
+group :development, optional: true do
+ gem "wirble"
+ gem "faker"
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In the case of the group block form the :optional option can be given to prevent a group from being installed unless listed in the \fB\-\-with\fR option given to the \fBbundle install\fR command\.
+.
+.P
+In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
+.
+.P
+The presence of a \fBsource\fR block in a Gemfile also makes that source available as a possible global source for any other gems which do not specify explicit sources\. Thus, when defining source blocks, it is recommended that you also ensure all other gems in the Gemfile are using explicit sources, either via source blocks or \fB:source\fR directives on individual gems\.
+.
+.SH "INSTALL_IF"
+The \fBinstall_if\fR method allows gems to be installed based on a proc or lambda\. This is especially useful for optional gems that can only be used if certain software is installed or some other conditions are met\.
+.
+.IP "" 4
+.
+.nf
+
+install_if \-> { RUBY_PLATFORM =~ /darwin/ } do
+ gem "pasteboard"
+end
+.
+.fi
+.
+.IP "" 0
+.
+.SH "GEMSPEC"
+The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR file is where you provide metadata about your gem to Rubygems\. Some required Gemspec attributes include the name, description, and homepage of your gem\. This is also where you specify the dependencies your gem needs to run\.
+.
+.P
+If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
+.
+.P
+The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
+.
+.P
+The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
+.
+.P
+When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
+.
+.SH "SOURCE PRIORITY"
+When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
+.
+.IP "1." 4
+The source explicitly attached to the gem (using \fB:source\fR, \fB:path\fR, or \fB:git\fR)
+.
+.IP "2." 4
+For implicit gems (dependencies of explicit gems), any source, git, or path repository declared on the parent\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
+.
+.IP "3." 4
+If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/gemfile.5.ronn b/lib/bundler/man/gemfile.5.ronn
new file mode 100644
index 0000000000..6749c33f59
--- /dev/null
+++ b/lib/bundler/man/gemfile.5.ronn
@@ -0,0 +1,543 @@
+Gemfile(5) -- A format for describing gem dependencies for Ruby programs
+========================================================================
+
+## SYNOPSIS
+
+A `Gemfile` describes the gem dependencies required to execute associated
+Ruby code.
+
+Place the `Gemfile` in the root of the directory containing the associated
+code. For instance, in a Rails application, place the `Gemfile` in the same
+directory as the `Rakefile`.
+
+## SYNTAX
+
+A `Gemfile` is evaluated as Ruby code, in a context which makes available
+a number of methods used to describe the gem requirements.
+
+## GLOBAL SOURCE
+
+At the top of the `Gemfile`, add a single line for the `RubyGems` source that
+contains the gems listed in the `Gemfile`.
+
+ source "https://rubygems.org"
+
+You can add only one global source. In Bundler 1.13, adding multiple global
+sources was deprecated. The `source` `MUST` be a valid RubyGems repository.
+
+To use more than one source of RubyGems, you should use [`source` block
+](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
+
+A source is checked for gems following the heuristics described in
+[SOURCE PRIORITY][].
+
+**Note about a behavior of the feature deprecated in Bundler 1.13**:
+If a gem is found in more than one global source, Bundler
+will print a warning after installing the gem indicating which source was used,
+and listing the other sources where the gem is available. A specific source can
+be selected for gems that need to use a non-standard repository, suppressing
+this warning, by using the [`:source` option](#SOURCE) or `source` block.
+
+### CREDENTIALS
+
+Some gem sources require a username and password. Use [bundle config(1)](bundle-config.1.html) to set
+the username and password for any of the sources that need it. The command must
+be run once on each computer that will install the Gemfile, but this keeps the
+credentials from being stored in plain text in version control.
+
+ bundle config gems.example.com user:password
+
+For some sources, like a company Gemfury account, it may be easier to
+include the credentials in the Gemfile as part of the source URL.
+
+ source "https://user:password@gems.example.com"
+
+Credentials in the source URL will take precedence over credentials set using
+`config`.
+
+## RUBY
+
+If your application requires a specific Ruby version or engine, specify your
+requirements using the `ruby` method, with the following arguments.
+All parameters are `OPTIONAL` unless otherwise specified.
+
+### VERSION (required)
+
+The version of Ruby that your application requires. If your application
+requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc., this
+should be the Ruby version that the engine is compatible with.
+
+ ruby "3.1.2"
+
+If you wish to derive your Ruby version from a version file (ie .ruby-version),
+you can use the `file` option instead.
+
+ ruby file: ".ruby-version"
+
+### ENGINE
+
+Each application _may_ specify a Ruby engine. If an engine is specified, an
+engine version _must_ also be specified.
+
+What exactly is an Engine?
+ - A Ruby engine is an implementation of the Ruby language.
+
+ - For background: the reference or original implementation of the Ruby
+ programming language is called
+ [Matz's Ruby Interpreter](https://en.wikipedia.org/wiki/Ruby_MRI), or MRI
+ for short. This is named after Ruby creator Yukihiro Matsumoto,
+ also known as Matz. MRI is also known as CRuby, because it is written in C.
+ MRI is the most widely used Ruby engine.
+
+ - [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
+ Some of the more well-known implementations include
+ [JRuby](http://jruby.org/) and [TruffleRuby](https://www.graalvm.org/ruby/).
+ Rubinius is an alternative implementation of Ruby written in Ruby.
+ JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine.
+ TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM.
+
+### ENGINE VERSION
+
+Each application _may_ specify a Ruby engine version. If an engine version is
+specified, an engine _must_ also be specified. If the engine is "ruby" the
+engine version specified _must_ match the Ruby version.
+
+ ruby "2.6.8", engine: "jruby", engine_version: "9.3.8.0"
+
+### PATCHLEVEL
+
+Each application _may_ specify a Ruby patchlevel. Specifying the patchlevel has
+been meaningless since Ruby 2.1.0 was released as the patchlevel is now
+uniquely determined by a combination of major, minor, and teeny version numbers.
+
+This option was implemented in Bundler 1.4.0 for Ruby 2.0 or earlier.
+
+ ruby "3.1.2", patchlevel: "20"
+
+## GEMS
+
+Specify gem requirements using the `gem` method, with the following arguments.
+All parameters are `OPTIONAL` unless otherwise specified.
+
+### NAME (required)
+
+For each gem requirement, list a single _gem_ line.
+
+ gem "nokogiri"
+
+### VERSION
+
+Each _gem_ `MAY` have one or more version specifiers.
+
+ gem "nokogiri", ">= 1.4.2"
+ gem "RedCloth", ">= 4.1.0", "< 4.2.0"
+
+### REQUIRE AS
+
+Each _gem_ `MAY` specify files that should be used when autorequiring via
+`Bundler.require`. You may pass an array with multiple files or `true` if the file
+you want `required` has the same name as _gem_ or `false` to
+prevent any file from being autorequired.
+
+ gem "redis", require: ["redis/connection/hiredis", "redis"]
+ gem "webmock", require: false
+ gem "byebug", require: true
+
+The argument defaults to the name of the gem. For example, these are identical:
+
+ gem "nokogiri"
+ gem "nokogiri", require: "nokogiri"
+ gem "nokogiri", require: true
+
+### GROUPS
+
+Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
+not specify membership in any group is placed in the `default` group.
+
+ gem "rspec", group: :test
+ gem "wirble", groups: [:development, :test]
+
+The Bundler runtime allows its two main methods, `Bundler.setup` and
+`Bundler.require`, to limit their impact to particular groups.
+
+ # setup adds gems to Ruby's load path
+ Bundler.setup # defaults to all groups
+ require "bundler/setup" # same as Bundler.setup
+ Bundler.setup(:default) # only set up the _default_ group
+ Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
+ Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
+
+ # require requires all of the gems in the specified groups
+ Bundler.require # defaults to the _default_ group
+ Bundler.require(:default) # identical
+ Bundler.require(:default, :test) # requires the _default_ and _test_ groups
+ Bundler.require(:test) # requires the _test_ group
+
+The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
+not install with the `without` configuration.
+
+To specify multiple groups to ignore, specify a list of groups separated by spaces.
+
+ bundle config set --local without test
+ bundle config set --local without development test
+
+Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
+will setup all groups except for the ones you excluded via `--without` (since they
+are not available).
+
+Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
+create a single canonical list of all of the required gems and their dependencies.
+This means that you cannot list different versions of the same gems in different
+groups. For more details, see [Understanding Bundler](https://bundler.io/rationale.html).
+
+### PLATFORMS
+
+If a gem should only be used in a particular platform or set of platforms, you can
+specify them. Platforms are essentially identical to groups, except that you do not
+need to use the `--without` install-time flag to exclude groups of gems for other
+platforms.
+
+There are a number of `Gemfile` platforms:
+
+ * `ruby`:
+ C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
+ * `mri`:
+ C Ruby (MRI) only, but not Windows
+ * `windows`:
+ Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions
+ * `mswin`:
+ Windows C Ruby (MRI), including RubyInstaller 32-bit versions
+ * `mswin64`:
+ Windows C Ruby (MRI), including RubyInstaller 64-bit versions
+ * `rbx`:
+ Rubinius
+ * `jruby`:
+ JRuby
+ * `truffleruby`:
+ TruffleRuby
+
+On platforms `ruby`, `mri`, `mswin`, `mswin64`, and `windows`, you may
+additionally specify a version by appending the major and minor version numbers
+without a delimiter. For example, to specify that a gem should only be used on
+platform `ruby` version 3.1, use:
+
+ ruby_31
+
+As with groups (above), you may specify one or more platforms:
+
+ gem "weakling", platforms: :jruby
+ gem "ruby-debug", platforms: :mri_31
+ gem "nokogiri", platforms: [:windows_31, :jruby]
+
+All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
+`Bundler.require`) behave exactly the same as if any groups not
+matching the current platform were explicitly excluded.
+
+### FORCE_RUBY_PLATFORM
+
+If you always want the pure ruby variant of a gem to be chosen over platform
+specific variants, you can use the `force_ruby_platform` option:
+
+ gem "ffi", force_ruby_platform: true
+
+This can be handy (assuming the pure ruby variant works fine) when:
+
+* You're having issues with the platform specific variant.
+* The platform specific variant does not yet support a newer ruby (and thus has
+ a `required_ruby_version` upper bound), but you still want your Gemfile{.lock}
+ files to resolve under that ruby.
+
+### SOURCE
+
+You can select an alternate RubyGems repository for a gem using the ':source'
+option.
+
+ gem "some_internal_gem", source: "https://gems.example.com"
+
+This forces the gem to be loaded from this source and ignores the global source
+declared at the top level of the file. If the gem does not exist in this source,
+it will not be installed.
+
+Bundler will search for child dependencies of this gem by first looking in the
+source selected for the parent, but if they are not found there, it will fall
+back on the global source.
+
+**Note about a behavior of the feature deprecated in Bundler 1.13**:
+Selecting a specific source repository this way also suppresses the ambiguous
+gem warning described above in [GLOBAL SOURCE](#GLOBAL-SOURCE).
+
+Using the `:source` option for an individual gem will also make that source
+available as a possible global source for any other gems which do not specify
+explicit sources. Thus, when adding gems with explicit sources, it is
+recommended that you also ensure all other gems in the Gemfile are using
+explicit sources.
+
+### GIT
+
+If necessary, you can specify that a gem is located at a particular
+git repository using the `:git` parameter. The repository can be accessed via
+several protocols:
+
+ * `HTTP(S)`:
+ gem "rails", git: "https://github.com/rails/rails.git"
+ * `SSH`:
+ gem "rails", git: "git@github.com:rails/rails.git"
+ * `git`:
+ gem "rails", git: "git://github.com/rails/rails.git"
+
+If using SSH, the user that you use to run `bundle install` `MUST` have the
+appropriate keys available in their `$HOME/.ssh`.
+
+`NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These
+protocols are unauthenticated, so a man-in-the-middle attacker can deliver
+malicious code and compromise your system. HTTPS and SSH are strongly
+preferred.
+
+The `group`, `platforms`, and `require` options are available and behave
+exactly the same as they would for a normal gem.
+
+A git repository `SHOULD` have at least one file, at the root of the
+directory containing the gem, with the extension `.gemspec`. This file
+`MUST` contain a valid gem specification, as expected by the `gem build`
+command.
+
+If a git repository does not have a `.gemspec`, bundler will attempt to
+create one, but it will not contain any dependencies, executables, or
+C extension compilation instructions. As a result, it may fail to properly
+integrate into your application.
+
+If a git repository does have a `.gemspec` for the gem you attached it
+to, a version specifier, if provided, means that the git repository is
+only valid if the `.gemspec` specifies a version matching the version
+specifier. If not, bundler will print a warning.
+
+ gem "rails", "2.3.8", git: "https://github.com/rails/rails.git"
+ # bundle install will fail, because the .gemspec in the rails
+ # repository's master branch specifies version 3.0.0
+
+If a git repository does `not` have a `.gemspec` for the gem you attached
+it to, a version specifier `MUST` be provided. Bundler will use this
+version in the simple `.gemspec` it creates.
+
+Git repositories support a number of additional options.
+
+ * `branch`, `tag`, and `ref`:
+ You `MUST` only specify at most one of these options. The default
+ is `branch: "master"`. For example:
+
+ gem "rails", git: "https://github.com/rails/rails.git", branch: "5-0-stable"
+
+ gem "rails", git: "https://github.com/rails/rails.git", tag: "v5.0.0"
+
+ gem "rails", git: "https://github.com/rails/rails.git", ref: "4aded"
+
+ * `submodules`:
+ For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
+ lets you have another git repository within a subfolder of your repository.
+ Specify `submodules: true` to cause bundler to expand any
+ submodules included in the git repository
+
+If a git repository contains multiple `.gemspecs`, each `.gemspec`
+represents a gem located at the same place in the file system as
+the `.gemspec`.
+
+ |~rails [git root]
+ | |-rails.gemspec [rails gem located here]
+ |~actionpack
+ | |-actionpack.gemspec [actionpack gem located here]
+ |~activesupport
+ | |-activesupport.gemspec [activesupport gem located here]
+ |...
+
+To install a gem located in a git repository, bundler changes to
+the directory containing the gemspec, runs `gem build name.gemspec`
+and then installs the resulting gem. The `gem build` command,
+which comes standard with Rubygems, evaluates the `.gemspec` in
+the context of the directory in which it is located.
+
+### GIT SOURCE
+
+A custom git source can be defined via the `git_source` method. Provide the source's name
+as an argument, and a block which receives a single argument and interpolates it into a
+string to return the full repo address:
+
+ git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
+ gem 'rails', stash: 'forks/rails'
+
+In addition, if you wish to choose a specific branch:
+
+ gem "rails", stash: "forks/rails", branch: "branch_name"
+
+### GITHUB
+
+`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
+currently expands to an insecure `git://` URL. This allows a
+man-in-the-middle attacker to compromise your system.
+
+If the git repository you want to use is hosted on GitHub and is public, you can use the
+:github shorthand to specify the github username and repository name (without the
+trailing ".git"), separated by a slash. If both the username and repository name are the
+same, you can omit one.
+
+ gem "rails", github: "rails/rails"
+ gem "rails", github: "rails"
+
+Are both equivalent to
+
+ gem "rails", git: "https://github.com/rails/rails.git"
+
+Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+You can also directly pass a pull request URL:
+
+ gem "rails", github: "https://github.com/rails/rails/pull/43753"
+
+Which is equivalent to:
+
+ gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
+
+### GIST
+
+If the git repository you want to use is hosted as a GitHub Gist and is public, you can use
+the :gist shorthand to specify the gist identifier (without the trailing ".git").
+
+ gem "the_hatch", gist: "4815162342"
+
+Is equivalent to:
+
+ gem "the_hatch", git: "https://gist.github.com/4815162342.git"
+
+Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### BITBUCKET
+
+If the git repository you want to use is hosted on Bitbucket and is public, you can use the
+:bitbucket shorthand to specify the bitbucket username and repository name (without the
+trailing ".git"), separated by a slash. If both the username and repository name are the
+same, you can omit one.
+
+ gem "rails", bitbucket: "rails/rails"
+ gem "rails", bitbucket: "rails"
+
+Are both equivalent to
+
+ gem "rails", git: "https://rails@bitbucket.org/rails/rails.git"
+
+Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### PATH
+
+You can specify that a gem is located in a particular location
+on the file system. Relative paths are resolved relative to the
+directory containing the `Gemfile`.
+
+Similar to the semantics of the `:git` option, the `:path`
+option requires that the directory in question either contains
+a `.gemspec` for the gem, or that you specify an explicit
+version that bundler should use.
+
+Unlike `:git`, bundler does not compile C extensions for
+gems specified as paths.
+
+ gem "rails", path: "vendor/rails"
+
+If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories.
+
+ path 'components' do
+ gem 'admin_ui'
+ gem 'public_ui'
+ end
+
+## BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
+
+The `:source`, `:git`, `:path`, `:group`, and `:platforms` options may be
+applied to a group of gems by using block form.
+
+ source "https://gems.example.com" do
+ gem "some_internal_gem"
+ gem "another_internal_gem"
+ end
+
+ git "https://github.com/rails/rails.git" do
+ gem "activesupport"
+ gem "actionpack"
+ end
+
+ platforms :ruby do
+ gem "ruby-debug"
+ gem "sqlite3"
+ end
+
+ group :development, optional: true do
+ gem "wirble"
+ gem "faker"
+ end
+
+In the case of the group block form the :optional option can be given
+to prevent a group from being installed unless listed in the `--with`
+option given to the `bundle install` command.
+
+In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
+and `:submodules` options may be passed to the `git` method, and
+all gems in the block will inherit those options.
+
+The presence of a `source` block in a Gemfile also makes that source
+available as a possible global source for any other gems which do not specify
+explicit sources. Thus, when defining source blocks, it is
+recommended that you also ensure all other gems in the Gemfile are using
+explicit sources, either via source blocks or `:source` directives on
+individual gems.
+
+## INSTALL_IF
+
+The `install_if` method allows gems to be installed based on a proc or lambda.
+This is especially useful for optional gems that can only be used if certain
+software is installed or some other conditions are met.
+
+ install_if -> { RUBY_PLATFORM =~ /darwin/ } do
+ gem "pasteboard"
+ end
+
+## GEMSPEC
+
+The [`.gemspec`](http://guides.rubygems.org/specification-reference/) file is where
+ you provide metadata about your gem to Rubygems. Some required Gemspec
+ attributes include the name, description, and homepage of your gem. This is
+ also where you specify the dependencies your gem needs to run.
+
+If you wish to use Bundler to help install dependencies for a gem while it is
+being developed, use the `gemspec` method to pull in the dependencies listed in
+the `.gemspec` file.
+
+The `gemspec` method adds any runtime dependencies as gem requirements in the
+default group. It also adds development dependencies as gem requirements in the
+`development` group. Finally, it adds a gem requirement on your project (`path:
+'.'`). In conjunction with `Bundler.setup`, this allows you to require project
+files in your test code as you would if the project were installed as a gem; you
+need not manipulate the load path manually or require project files via relative
+paths.
+
+The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
+options, which control where bundler looks for the `.gemspec`, the glob it uses to look
+for the gemspec (defaults to: `{,*,*/*}.gemspec`), what named `.gemspec` it uses
+(if more than one is present), and which group development dependencies are included in.
+
+When a `gemspec` dependency encounters version conflicts during resolution, the
+local version under development will always be selected -- even if there are
+remote versions that better match other requirements for the `gemspec` gem.
+
+## SOURCE PRIORITY
+
+When attempting to locate a gem to satisfy a gem requirement,
+bundler uses the following priority order:
+
+ 1. The source explicitly attached to the gem (using `:source`, `:path`, or
+ `:git`)
+ 2. For implicit gems (dependencies of explicit gems), any source, git, or path
+ repository declared on the parent. This results in bundler prioritizing the
+ ActiveSupport gem from the Rails git repository over ones from
+ `rubygems.org`
+ 3. If neither of the above conditions are met, the global source will be used.
+ If multiple global sources are specified, they will be prioritized from
+ last to first, but this is deprecated since Bundler 1.13, so Bundler prints
+ a warning and will abort with an error in the future.
diff --git a/lib/bundler/man/index.txt b/lib/bundler/man/index.txt
new file mode 100644
index 0000000000..24f7633e66
--- /dev/null
+++ b/lib/bundler/man/index.txt
@@ -0,0 +1,29 @@
+Gemfile(5) gemfile.5
+bundle(1) bundle.1
+bundle-add(1) bundle-add.1
+bundle-binstubs(1) bundle-binstubs.1
+bundle-cache(1) bundle-cache.1
+bundle-check(1) bundle-check.1
+bundle-clean(1) bundle-clean.1
+bundle-config(1) bundle-config.1
+bundle-console(1) bundle-console.1
+bundle-doctor(1) bundle-doctor.1
+bundle-exec(1) bundle-exec.1
+bundle-gem(1) bundle-gem.1
+bundle-help(1) bundle-help.1
+bundle-info(1) bundle-info.1
+bundle-init(1) bundle-init.1
+bundle-inject(1) bundle-inject.1
+bundle-install(1) bundle-install.1
+bundle-list(1) bundle-list.1
+bundle-lock(1) bundle-lock.1
+bundle-open(1) bundle-open.1
+bundle-outdated(1) bundle-outdated.1
+bundle-platform(1) bundle-platform.1
+bundle-plugin(1) bundle-plugin.1
+bundle-pristine(1) bundle-pristine.1
+bundle-remove(1) bundle-remove.1
+bundle-show(1) bundle-show.1
+bundle-update(1) bundle-update.1
+bundle-version(1) bundle-version.1
+bundle-viz(1) bundle-viz.1
diff --git a/lib/bundler/match_metadata.rb b/lib/bundler/match_metadata.rb
new file mode 100644
index 0000000000..499036ca93
--- /dev/null
+++ b/lib/bundler/match_metadata.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Bundler
+ module MatchMetadata
+ def matches_current_ruby?
+ @required_ruby_version.satisfied_by?(Gem.ruby_version)
+ end
+
+ def matches_current_rubygems?
+ @required_rubygems_version.satisfied_by?(Gem.rubygems_version)
+ end
+ end
+end
diff --git a/lib/bundler/match_platform.rb b/lib/bundler/match_platform.rb
index 69074925a6..7f7e8227f9 100644
--- a/lib/bundler/match_platform.rb
+++ b/lib/bundler/match_platform.rb
@@ -15,7 +15,6 @@ module Bundler
return true if Gem::Platform::RUBY == gemspec_platform
return true if local_platform == gemspec_platform
gemspec_platform = Gem::Platform.new(gemspec_platform)
- return true if GemHelpers.generic(gemspec_platform) === local_platform
return true if gemspec_platform === local_platform
false
diff --git a/lib/bundler/match_remote_metadata.rb b/lib/bundler/match_remote_metadata.rb
new file mode 100644
index 0000000000..5e46d52441
--- /dev/null
+++ b/lib/bundler/match_remote_metadata.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+module Bundler
+ module FetchMetadata
+ # A fallback is included because the original version of the specification
+ # API didn't include that field, so some marshalled specs in the index have it
+ # set to +nil+.
+ def matches_current_ruby?
+ @required_ruby_version ||= _remote_specification.required_ruby_version || Gem::Requirement.default
+
+ super
+ end
+
+ def matches_current_rubygems?
+ # A fallback is included because the original version of the specification
+ # API didn't include that field, so some marshalled specs in the index have it
+ # set to +nil+.
+ @required_rubygems_version ||= _remote_specification.required_rubygems_version || Gem::Requirement.default
+
+ super
+ end
+ end
+
+ module MatchRemoteMetadata
+ include MatchMetadata
+
+ prepend FetchMetadata
+ end
+end
diff --git a/lib/bundler/mirror.rb b/lib/bundler/mirror.rb
index 0e554bcc3f..9d437a0951 100644
--- a/lib/bundler/mirror.rb
+++ b/lib/bundler/mirror.rb
@@ -43,7 +43,7 @@ module Bundler
config.update_mirror(mirror)
end
- private
+ private
def fetch_valid_mirror_for(uri)
downcased = uri.to_s.downcase
@@ -148,17 +148,15 @@ module Bundler
class TCPSocketProbe
def replies?(mirror)
MirrorSockets.new(mirror).any? do |socket, address, timeout|
- begin
- socket.connect_nonblock(address)
- rescue Errno::EINPROGRESS
- wait_for_writtable_socket(socket, address, timeout)
- rescue RuntimeError # Connection failed somehow, again
- false
- end
+ socket.connect_nonblock(address)
+ rescue Errno::EINPROGRESS
+ wait_for_writtable_socket(socket, address, timeout)
+ rescue RuntimeError # Connection failed somehow, again
+ false
end
end
- private
+ private
def wait_for_writtable_socket(socket, address, timeout)
if IO.select(nil, [socket], nil, timeout)
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index f4dd435df4..f3caff8963 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -13,10 +13,11 @@ module Bundler
class MalformattedPlugin < PluginError; end
class UndefinedCommandError < PluginError; end
class UnknownSourceError < PluginError; end
+ class PluginInstallError < PluginError; end
- PLUGIN_FILE_NAME = "plugins.rb".freeze
+ PLUGIN_FILE_NAME = "plugins.rb"
- module_function
+ module_function
def reset!
instance_variables.each {|i| remove_instance_variable(i) }
@@ -35,16 +36,42 @@ module Bundler
# @param [Hash] options various parameters as described in description.
# Refer to cli/plugin for available options
def install(names, options)
+ raise InvalidOption, "You cannot specify `--branch` and `--ref` at the same time." if options["branch"] && options["ref"]
+
specs = Installer.new.install(names, options)
save_plugins names, specs
- rescue PluginError => e
- if specs
- specs_to_delete = Hash[specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }]
- specs_to_delete.values.each {|spec| Bundler.rm_rf(spec.full_gem_path) }
+ rescue PluginError
+ specs_to_delete = specs.select {|k, _v| names.include?(k) && !index.commands.values.include?(k) }
+ specs_to_delete.each_value {|spec| Bundler.rm_rf(spec.full_gem_path) }
+
+ raise
+ end
+
+ # Uninstalls plugins by the given names
+ #
+ # @param [Array<String>] names the names of plugins to be uninstalled
+ def uninstall(names, options)
+ if names.empty? && !options[:all]
+ Bundler.ui.error "No plugins to uninstall. Specify at least 1 plugin to uninstall.\n"\
+ "Use --all option to uninstall all the installed plugins."
+ return
end
- Bundler.ui.error "Failed to install plugin #{name}: #{e.message}\n #{e.backtrace.join("\n ")}"
+ names = index.installed_plugins if options[:all]
+ if names.any?
+ names.each do |name|
+ if index.installed?(name)
+ Bundler.rm_rf(index.plugin_path(name))
+ index.unregister_plugin(name)
+ Bundler.ui.info "Uninstalled plugin #{name}"
+ else
+ Bundler.ui.error "Plugin #{name} is not installed \n"
+ end
+ end
+ else
+ Bundler.ui.info "No plugins installed"
+ end
end
# List installed plugins and commands
@@ -80,6 +107,7 @@ module Bundler
else
builder.eval_gemfile(gemfile)
end
+ builder.check_primary_source_safety
definition = builder.to_definition(nil, true)
return if definition.dependencies.empty?
@@ -138,7 +166,7 @@ module Bundler
end
# To be called from Cli class to pass the command and argument to
- # approriate plugin class
+ # appropriate plugin class
def exec_command(command, args)
raise UndefinedCommandError, "Command `#{command}` not found" unless command? command
@@ -157,7 +185,7 @@ module Bundler
!index.source_plugin(name.to_s).nil?
end
- # @return [Class] that handles the source. The calss includes API::Source
+ # @return [Class] that handles the source. The class includes API::Source
def source(name)
raise UnknownSourceError, "Source #{name} not found" unless source? name
@@ -219,10 +247,11 @@ module Bundler
# @param [Array<String>] names of inferred source plugins that can be ignored
def save_plugins(plugins, specs, optional_plugins = [])
plugins.each do |name|
+ next if index.installed?(name)
+
spec = specs[name]
- validate_plugin! Pathname.new(spec.full_gem_path)
- installed = register_plugin(name, spec, optional_plugins.include?(name))
- Bundler.ui.info "Installed plugin #{name}" if installed
+
+ save_plugin(name, spec, optional_plugins.include?(name))
end
end
@@ -237,6 +266,22 @@ module Bundler
raise MalformattedPlugin, "#{PLUGIN_FILE_NAME} was not found in the plugin." unless plugin_file.file?
end
+ # Validates and registers a plugin.
+ #
+ # @param [String] name the name of the plugin
+ # @param [Specification] spec of installed plugin
+ # @param [Boolean] optional_plugin, removed if there is conflict with any
+ # other plugin (used for default source plugins)
+ #
+ # @raise [PluginInstallError] if validation or registration raises any error
+ def save_plugin(name, spec, optional_plugin = false)
+ validate_plugin! Pathname.new(spec.full_gem_path)
+ installed = register_plugin(name, spec, optional_plugin)
+ Bundler.ui.info "Installed plugin #{name}" if installed
+ rescue PluginError => e
+ raise PluginInstallError, "Failed to install plugin `#{spec.name}`, due to #{e.class} (#{e.message})"
+ end
+
# Runs the plugins.rb file in an isolated namespace, records the plugin
# actions it registers for and then passes the data to index to be stored.
#
@@ -283,6 +328,8 @@ module Bundler
#
# @param [String] name of the plugin
def load_plugin(name)
+ return unless name && !name.empty?
+
# Need to ensure before this that plugin root where the rest of gems
# are installed to be on load path to support plugin deps. Currently not
# done to avoid conflicts
diff --git a/lib/bundler/plugin/api/source.rb b/lib/bundler/plugin/api/source.rb
index 56e97f4aa4..67c45bd204 100644
--- a/lib/bundler/plugin/api/source.rb
+++ b/lib/bundler/plugin/api/source.rb
@@ -140,6 +140,13 @@ module Bundler
end
end
+ # Set internal representation to fetch the gems/specs locally.
+ #
+ # When this is called, the source should try to fetch the specs and
+ # install from the local system.
+ def local!
+ end
+
# Set internal representation to fetch the gems/specs from remote.
#
# When this is called, the source should try to fetch the specs and
@@ -237,7 +244,21 @@ module Bundler
specs.unmet_dependency_names
end
+ # Used by definition.
+ #
+ # Note: Do not override if you don't know what you are doing.
+ def spec_names
+ specs.spec_names
+ end
+
+ # Used by definition.
+ #
# Note: Do not override if you don't know what you are doing.
+ def add_dependency_names(names)
+ @dependencies |= Array(names)
+ end
+
+ # NOTE: Do not override if you don't know what you are doing.
def can_lock?(spec)
spec.source == self
end
@@ -260,10 +281,11 @@ module Bundler
end
def to_s
- "plugin source for #{options[:type]} with uri #{uri}"
+ "plugin source for #{@type} with uri #{@uri}"
end
+ alias_method :identifier, :to_s
- # Note: Do not override if you don't know what you are doing.
+ # NOTE: Do not override if you don't know what you are doing.
def include?(other)
other == self
end
@@ -272,7 +294,7 @@ module Bundler
SharedHelpers.digest(:SHA1).hexdigest(uri)
end
- # Note: Do not override if you don't know what you are doing.
+ # NOTE: Do not override if you don't know what you are doing.
def gem_install_dir
Bundler.install_path
end
@@ -287,12 +309,6 @@ module Bundler
end
# @private
- # Returns true
- def bundler_plugin_api_source?
- true
- end
-
- # @private
# This API on source might not be stable, and for now we expect plugins
# to download all specs in `#specs`, so we implement the method for
# compatibility purposes and leave it undocumented (and don't support)
diff --git a/lib/bundler/plugin/dsl.rb b/lib/bundler/plugin/dsl.rb
index 4bfc8437e0..da751d1774 100644
--- a/lib/bundler/plugin/dsl.rb
+++ b/lib/bundler/plugin/dsl.rb
@@ -10,7 +10,7 @@ module Bundler
# So that we don't have to override all there methods to dummy ones
# explicitly.
# They will be handled by method_missing
- [:gemspec, :gem, :path, :install_if, :platforms, :env].each {|m| undef_method m }
+ [:gemspec, :gem, :install_if, :platforms, :env].each {|m| undef_method m }
# This lists the plugins that was added automatically and not specified by
# the user.
diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb
index 2d70a046bb..a2d5eaa38a 100644
--- a/lib/bundler/plugin/index.rb
+++ b/lib/bundler/plugin/index.rb
@@ -71,6 +71,18 @@ module Bundler
raise
end
+ def unregister_plugin(name)
+ @commands.delete_if {|_, v| v == name }
+ @sources.delete_if {|_, v| v == name }
+ @hooks.each do |hook, names|
+ names.delete(name)
+ @hooks.delete(hook) if names.empty?
+ end
+ @plugin_paths.delete(name)
+ @load_paths.delete(name)
+ save_index
+ end
+
# Path of default index file
def index_file
Plugin.root.join("index")
@@ -124,7 +136,7 @@ module Bundler
@hooks[event] || []
end
- private
+ private
# Reads the index file from the directory and initializes the instance
# variables.
@@ -134,7 +146,7 @@ module Bundler
# @param [Boolean] is the index file global index
def load_index(index_file, global = false)
SharedHelpers.filesystem_access(index_file, :read) do |index_f|
- valid_file = index_f && index_f.exist? && !index_f.size.zero?
+ valid_file = index_f&.exist? && !index_f.size.zero?
break unless valid_file
data = index_f.read
@@ -155,11 +167,11 @@ module Bundler
# to be only String key value pairs)
def save_index
index = {
- "commands" => @commands,
- "hooks" => @hooks,
- "load_paths" => @load_paths,
+ "commands" => @commands,
+ "hooks" => @hooks,
+ "load_paths" => @load_paths,
"plugin_paths" => @plugin_paths,
- "sources" => @sources,
+ "sources" => @sources,
}
require_relative "../yaml_serializer"
diff --git a/lib/bundler/plugin/installer.rb b/lib/bundler/plugin/installer.rb
index bcea3f0e45..c9ff12ce4b 100644
--- a/lib/bundler/plugin/installer.rb
+++ b/lib/bundler/plugin/installer.rb
@@ -16,15 +16,13 @@ module Bundler
version = options[:version] || [">= 0"]
- Bundler.settings.temporary(:disable_multisource => false) do
- if options[:git]
- install_git(names, version, options)
- elsif options[:local_git]
- install_local_git(names, version, options)
- else
- sources = options[:source] || Bundler.rubygems.sources
- install_rubygems(names, version, sources)
- end
+ if options[:git]
+ install_git(names, version, options)
+ elsif options[:local_git]
+ install_local_git(names, version, options)
+ else
+ sources = options[:source] || Gem.sources
+ install_rubygems(names, version, sources)
end
end
@@ -41,7 +39,7 @@ module Bundler
install_from_specs specs
end
- private
+ private
def check_sources_consistency!(options)
if options.key?(:git) && options.key?(:local_git)
@@ -79,12 +77,17 @@ module Bundler
source_list = SourceList.new
source_list.add_git_source(git_source_options) if git_source_options
- source_list.add_rubygems_source("remotes" => rubygems_source) if rubygems_source
+ Array(rubygems_source).each {|remote| source_list.add_global_rubygems_remote(remote) } if rubygems_source
deps = names.map {|name| Dependency.new name, version }
- definition = Definition.new(nil, deps, source_list, true)
- install_definition(definition)
+ Bundler.configure_gem_home_and_path(Plugin.root)
+
+ Bundler.settings.temporary(:deployment => false, :frozen => false) do
+ definition = Definition.new(nil, deps, source_list, true)
+
+ install_definition(definition)
+ end
end
# Installs the plugins and deps from the provided specs and returns map of
diff --git a/lib/bundler/plugin/installer/git.rb b/lib/bundler/plugin/installer/git.rb
index fbb6c5e40e..deec5e99b3 100644
--- a/lib/bundler/plugin/installer/git.rb
+++ b/lib/bundler/plugin/installer/git.rb
@@ -20,10 +20,6 @@ module Bundler
end
end
- def version_message(spec)
- "#{spec.name} #{spec.version}"
- end
-
def root
Plugin.root
end
diff --git a/lib/bundler/plugin/installer/rubygems.rb b/lib/bundler/plugin/installer/rubygems.rb
index 7ae74fa93b..cb5db9c30e 100644
--- a/lib/bundler/plugin/installer/rubygems.rb
+++ b/lib/bundler/plugin/installer/rubygems.rb
@@ -4,15 +4,7 @@ module Bundler
module Plugin
class Installer
class Rubygems < Bundler::Source::Rubygems
- def version_message(spec)
- "#{spec.name} #{spec.version}"
- end
-
- private
-
- def requires_sudo?
- false # Will change on implementation of project level plugins
- end
+ private
def rubygems_dir
Plugin.root
diff --git a/lib/bundler/plugin/source_list.rb b/lib/bundler/plugin/source_list.rb
index f0e212205f..547661cf2f 100644
--- a/lib/bundler/plugin/source_list.rb
+++ b/lib/bundler/plugin/source_list.rb
@@ -17,7 +17,11 @@ module Bundler
path_sources + git_sources + rubygems_sources + [metadata_source]
end
- private
+ def default_source
+ git_sources.first || global_rubygems_source
+ end
+
+ private
def rubygems_aggregate_class
Plugin::Installer::Rubygems
diff --git a/lib/bundler/process_lock.rb b/lib/bundler/process_lock.rb
index cba4fcdba5..0297f80e2c 100644
--- a/lib/bundler/process_lock.rb
+++ b/lib/bundler/process_lock.rb
@@ -12,7 +12,7 @@ module Bundler
yield
f.flock(File::LOCK_UN)
end
- rescue Errno::EACCES, Errno::ENOLCK, *[SharedHelpers.const_get_safely(:ENOTSUP, Errno)].compact
+ rescue Errno::EACCES, Errno::ENOLCK, Errno::ENOTSUP, Errno::EPERM, Errno::EROFS
# In the case the user does not have access to
# create the lock file or is using NFS where
# locks are not available we skip locking.
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
deleted file mode 100644
index c086b7651c..0000000000
--- a/lib/bundler/psyched_yaml.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-# Psych could be a gem, so try to ask for it
-begin
- gem "psych"
-rescue LoadError
-end if defined?(gem)
-
-# Psych could be in the stdlib
-# but it's too late if Syck is already loaded
-begin
- require "psych" unless defined?(Syck)
-rescue LoadError
- # Apparently Psych wasn't available. Oh well.
-end
-
-# At least load the YAML stdlib, whatever that may be
-require "yaml" unless defined?(YAML.dump)
-
-module Bundler
- # On encountering invalid YAML,
- # Psych raises Psych::SyntaxError
- if defined?(::Psych::SyntaxError)
- YamlLibrarySyntaxError = ::Psych::SyntaxError
- else # Syck raises ArgumentError
- YamlLibrarySyntaxError = ::ArgumentError
- end
-end
-
-require_relative "deprecate"
-begin
- Bundler::Deprecate.skip_during do
- require "rubygems/safe_yaml"
- end
-rescue LoadError
- # it's OK if the file isn't there
-end
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb
index f87a09b9a6..f626a3218e 100644
--- a/lib/bundler/remote_specification.rb
+++ b/lib/bundler/remote_specification.rb
@@ -6,6 +6,7 @@ module Bundler
# be seeded with what we're given from the source's abbreviated index - the
# full specification will only be fetched when necessary.
class RemoteSpecification
+ include MatchRemoteMetadata
include MatchPlatform
include Comparable
@@ -16,7 +17,8 @@ module Bundler
def initialize(name, version, platform, spec_fetcher)
@name = name
@version = Gem::Version.create version
- @platform = platform
+ @original_platform = platform || Gem::Platform::RUBY
+ @platform = Gem::Platform.new(platform)
@spec_fetcher = spec_fetcher
@dependencies = nil
end
@@ -28,10 +30,10 @@ module Bundler
end
def full_name
- if platform == Gem::Platform::RUBY || platform.nil?
+ @full_name ||= if @platform == Gem::Platform::RUBY
"#{@name}-#{@version}"
else
- "#{@name}-#{@version}-#{platform}"
+ "#{@name}-#{@version}-#{@platform}"
end
end
@@ -50,6 +52,8 @@ module Bundler
# once the remote gem is downloaded, the backend specification will
# be swapped out.
def __swap__(spec)
+ raise APIResponseInvalidDependenciesError unless spec.dependencies.all? {|d| d.is_a?(Gem::Dependency) }
+
SharedHelpers.ensure_same_dependencies(self, dependencies, spec.dependencies)
@_remote_specification = spec
end
@@ -76,7 +80,8 @@ module Bundler
deps = method_missing(:dependencies)
# allow us to handle when the specs dependencies are an array of array of string
- # see https://github.com/bundler/bundler/issues/5797
+ # in order to delay the crash to `#__swap__` where it results in a friendlier error
+ # see https://github.com/rubygems/bundler/issues/5797
deps = deps.map {|d| d.is_a?(Gem::Dependency) ? d : Gem::Dependency.new(*d) }
deps
@@ -88,16 +93,16 @@ module Bundler
" #{source.revision[0..6]}"
end
- private
+ private
def to_ary
nil
end
def _remote_specification
- @_remote_specification ||= @spec_fetcher.fetch_spec([@name, @version, @platform])
+ @_remote_specification ||= @spec_fetcher.fetch_spec([@name, @version, @original_platform])
@_remote_specification || raise(GemspecError, "Gemspec data for #{full_name} was" \
- " missing from the server! Try installing with `--full-index` as a workaround.")
+ " missing from the server!")
end
def method_missing(method, *args, &blk)
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index c7caf01c7d..2ad35bc931 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -1,173 +1,271 @@
# frozen_string_literal: true
module Bundler
+ #
+ # This class implements the interface needed by PubGrub for resolution. It is
+ # equivalent to the `PubGrub::BasicPackageSource` class provided by PubGrub by
+ # default and used by the most simple PubGrub consumers.
+ #
class Resolver
- require_relative "vendored_molinillo"
- require_relative "resolver/spec_group"
-
- # Figures out the best possible configuration of gems that satisfies
- # the list of passed dependencies and any child dependencies without
- # causing any gem activation errors.
- #
- # ==== Parameters
- # *dependencies<Gem::Dependency>:: The list of dependencies to resolve
- #
- # ==== Returns
- # <GemBundle>,nil:: If the list of dependencies can be resolved, a
- # collection of gemspecs is returned. Otherwise, nil is returned.
- def self.resolve(requirements, index, source_requirements = {}, base = [], gem_version_promoter = GemVersionPromoter.new, additional_base_requirements = [], platforms = nil)
- platforms = Set.new(platforms) if platforms
- base = SpecSet.new(base) unless base.is_a?(SpecSet)
- resolver = new(index, source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
- result = resolver.start(requirements)
- SpecSet.new(result)
- end
+ require_relative "vendored_pub_grub"
+ require_relative "resolver/base"
+ require_relative "resolver/candidate"
+ require_relative "resolver/incompatibility"
+ require_relative "resolver/root"
+
+ include GemHelpers
- def initialize(index, source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
- @index = index
- @source_requirements = source_requirements
+ def initialize(base, gem_version_promoter)
+ @source_requirements = base.source_requirements
@base = base
- @resolver = Molinillo::Resolver.new(self, self)
- @search_for = {}
- @base_dg = Molinillo::DependencyGraph.new
- @base.each do |ls|
- dep = Dependency.new(ls.name, ls.version)
- @base_dg.add_vertex(ls.name, DepProxy.new(dep, ls.platform), true)
- end
- additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
- @platforms = platforms
@gem_version_promoter = gem_version_promoter
- @allow_bundler_dependency_conflicts = Bundler.feature_flag.allow_bundler_dependency_conflicts?
- @use_gvp = Bundler.feature_flag.use_gem_version_promoter_for_major_updates? || !@gem_version_promoter.major?
- @lockfile_uses_separate_rubygems_sources = Bundler.feature_flag.disable_multisource?
end
- def start(requirements)
- @gem_version_promoter.prerelease_specified = @prerelease_specified = {}
- requirements.each {|dep| @prerelease_specified[dep.name] ||= dep.prerelease? }
-
- verify_gemfile_dependencies_are_found!(requirements)
- dg = @resolver.resolve(requirements, @base_dg)
- dg.
- tap {|resolved| validate_resolved_specs!(resolved) }.
- map(&:payload).
- reject {|sg| sg.name.end_with?("\0") }.
- map(&:to_specs).
- flatten
- rescue Molinillo::VersionConflict => e
- message = version_conflict_message(e)
- raise VersionConflict.new(e.conflicts.keys.uniq, message)
- rescue Molinillo::CircularDependencyError => e
- names = e.dependencies.sort_by(&:name).map {|d| "gem '#{d.name}'" }
- raise CyclicDependencyError, "Your bundle requires gems that depend" \
- " on each other, creating an infinite loop. Please remove" \
- " #{names.count > 1 ? "either " : ""}#{names.join(" or ")}" \
- " and try again."
+ def start
+ @requirements = @base.requirements
+ @packages = @base.packages
+
+ root, logger = setup_solver
+
+ Bundler.ui.info "Resolving dependencies...", true
+
+ solve_versions(:root => root, :logger => logger)
end
- include Molinillo::UI
-
- # Conveys debug information to the user.
- #
- # @param [Integer] depth the current depth of the resolution process.
- # @return [void]
- def debug(depth = 0)
- return unless debug?
- debug_info = yield
- debug_info = debug_info.inspect unless debug_info.is_a?(String)
- warn debug_info.split("\n").map {|s| " " * depth + s }
+ def setup_solver
+ root = Resolver::Root.new(name_for_explicit_dependency_source)
+ root_version = Resolver::Candidate.new(0)
+
+ @all_specs = Hash.new do |specs, name|
+ specs[name] = source_for(name).specs.search(name).reject do |s|
+ s.dependencies.any? {|d| d.name == name && !d.requirement.satisfied_by?(s.version) } # ignore versions that depend on themselves incorrectly
+ end.sort_by {|s| [s.version, s.platform.to_s] }
+ end
+
+ @sorted_versions = Hash.new do |candidates, package|
+ candidates[package] = if package.root?
+ [root_version]
+ else
+ all_versions_for(package).sort
+ end
+ end
+
+ root_dependencies = prepare_dependencies(@requirements, @packages)
+
+ @cached_dependencies = Hash.new do |dependencies, package|
+ dependencies[package] = if package.root?
+ { root_version => root_dependencies }
+ else
+ Hash.new do |versions, version|
+ versions[version] = to_dependency_hash(version.dependencies.reject {|d| d.name == package.name }, @packages)
+ end
+ end
+ end
+
+ logger = Bundler::UI::Shell.new
+ logger.level = debug? ? "debug" : "warn"
+
+ [root, logger]
end
- def debug?
- return @debug_mode if defined?(@debug_mode)
- @debug_mode = ENV["DEBUG_RESOLVER"] || ENV["DEBUG_RESOLVER_TREE"] || false
+ def solve_versions(root:, logger:)
+ solver = PubGrub::VersionSolver.new(:source => self, :root => root, :logger => logger)
+ result = solver.solve
+ result.map {|package, version| version.to_specs(package) }.flatten.uniq
+ rescue PubGrub::SolveFailure => e
+ incompatibility = e.incompatibility
+
+ names_to_unlock, names_to_allow_prereleases_for, extended_explanation = find_names_to_relax(incompatibility)
+
+ names_to_relax = names_to_unlock + names_to_allow_prereleases_for
+
+ if names_to_relax.any?
+ if names_to_unlock.any?
+ Bundler.ui.debug "Found conflicts with locked dependencies. Will retry with #{names_to_unlock.join(", ")} unlocked...", true
+
+ @base.unlock_names(names_to_unlock)
+ end
+
+ if names_to_allow_prereleases_for.any?
+ Bundler.ui.debug "Found conflicts with dependencies with prereleases. Will retrying considering prereleases for #{names_to_allow_prereleases_for.join(", ")}...", true
+
+ @base.include_prereleases(names_to_allow_prereleases_for)
+ end
+
+ root, logger = setup_solver
+
+ Bundler.ui.debug "Retrying resolution...", true
+ retry
+ end
+
+ explanation = e.message
+
+ if extended_explanation
+ explanation << "\n\n"
+ explanation << extended_explanation
+ end
+
+ raise SolveFailure.new(explanation)
end
- def before_resolution
- Bundler.ui.info "Resolving dependencies...", debug?
+ def find_names_to_relax(incompatibility)
+ names_to_unlock = []
+ names_to_allow_prereleases_for = []
+ extended_explanation = nil
+
+ while incompatibility.conflict?
+ cause = incompatibility.cause
+ incompatibility = cause.incompatibility
+
+ incompatibility.terms.each do |term|
+ package = term.package
+ name = package.name
+
+ if base_requirements[name]
+ names_to_unlock << name
+ elsif package.ignores_prereleases?
+ names_to_allow_prereleases_for << name
+ end
+
+ no_versions_incompat = [cause.incompatibility, cause.satisfier].find {|incompat| incompat.cause.is_a?(PubGrub::Incompatibility::NoVersions) }
+ next unless no_versions_incompat
+
+ extended_explanation = no_versions_incompat.extended_explanation
+ end
+ end
+
+ [names_to_unlock.uniq, names_to_allow_prereleases_for.uniq, extended_explanation]
end
- def after_resolution
- Bundler.ui.info ""
+ def parse_dependency(package, dependency)
+ range = if repository_for(package).is_a?(Source::Gemspec)
+ PubGrub::VersionRange.any
+ else
+ requirement_to_range(dependency)
+ end
+
+ PubGrub::VersionConstraint.new(package, :range => range)
end
- def indicate_progress
- Bundler.ui.info ".", false unless debug?
+ def versions_for(package, range=VersionRange.any)
+ versions = range.select_versions(@sorted_versions[package])
+
+ sort_versions(package, versions)
end
- include Molinillo::SpecificationProvider
+ def no_versions_incompatibility_for(package, unsatisfied_term)
+ cause = PubGrub::Incompatibility::NoVersions.new(unsatisfied_term)
+ name = package.name
+ constraint = unsatisfied_term.constraint
+ constraint_string = constraint.constraint_string
+ requirements = constraint_string.split(" OR ").map {|req| Gem::Requirement.new(req.split(",")) }
+
+ if name == "bundler" && bundler_pinned_to_current_version?
+ custom_explanation = "the current Bundler version (#{Bundler::VERSION}) does not satisfy #{constraint}"
+ extended_explanation = bundler_not_found_message(requirements)
+ else
+ specs_matching_other_platforms = filter_matching_specs(@all_specs[name], requirements)
+
+ platforms_explanation = specs_matching_other_platforms.any? ? " for any resolution platforms (#{package.platforms.join(", ")})" : ""
+ custom_explanation = "#{constraint} could not be found in #{repository_for(package)}#{platforms_explanation}"
- def dependencies_for(specification)
- specification.dependencies_for_activated_platforms
+ label = "#{name} (#{constraint_string})"
+ extended_explanation = other_specs_matching_message(specs_matching_other_platforms, label) if specs_matching_other_platforms.any?
+ end
+
+ Incompatibility.new([unsatisfied_term], :cause => cause, :custom_explanation => custom_explanation, :extended_explanation => extended_explanation)
end
- def search_for(dependency)
- platform = dependency.__platform
- dependency = dependency.dep unless dependency.is_a? Gem::Dependency
- search = @search_for[dependency] ||= begin
- index = index_for(dependency)
- results = index.search(dependency, @base[dependency.name])
+ def debug?
+ ENV["BUNDLER_DEBUG_RESOLVER"] ||
+ ENV["BUNDLER_DEBUG_RESOLVER_TREE"] ||
+ ENV["DEBUG_RESOLVER"] ||
+ ENV["DEBUG_RESOLVER_TREE"] ||
+ false
+ end
- if vertex = @base_dg.vertex_named(dependency.name)
- locked_requirement = vertex.payload.requirement
- end
+ def incompatibilities_for(package, version)
+ package_deps = @cached_dependencies[package]
+ sorted_versions = @sorted_versions[package]
+ package_deps[version].map do |dep_package, dep_constraint|
+ low = high = sorted_versions.index(version)
- if !@prerelease_specified[dependency.name] && (!@use_gvp || locked_requirement.nil?)
- # Move prereleases to the beginning of the list, so they're considered
- # last during resolution.
- pre, results = results.partition {|spec| spec.version.prerelease? }
- results = pre + results
+ # find version low such that all >= low share the same dep
+ while low > 0 && package_deps[sorted_versions[low - 1]][dep_package] == dep_constraint
+ low -= 1
end
-
- spec_groups = if results.any?
- nested = []
- results.each do |spec|
- version, specs = nested.last
- if version == spec.version
- specs << spec
- else
- nested << [spec.version, [spec]]
- end
- end
- nested.reduce([]) do |groups, (version, specs)|
- next groups if locked_requirement && !locked_requirement.satisfied_by?(version)
- spec_group = SpecGroup.new(specs)
- spec_group.ignores_bundler_dependencies = @allow_bundler_dependency_conflicts
- groups << spec_group
+ low =
+ if low == 0
+ nil
+ else
+ sorted_versions[low]
end
- else
- []
+
+ # find version high such that all < high share the same dep
+ while high < sorted_versions.length && package_deps[sorted_versions[high]][dep_package] == dep_constraint
+ high += 1
end
- # GVP handles major itself, but it's still a bit risky to trust it with it
- # until we get it settled with new behavior. For 2.x it can take over all cases.
- if !@use_gvp
- spec_groups
- else
- @gem_version_promoter.sort_versions(dependency, spec_groups)
+ high =
+ if high == sorted_versions.length
+ nil
+ else
+ sorted_versions[high]
+ end
+
+ range = PubGrub::VersionRange.new(:min => low, :max => high, :include_min => true)
+
+ self_constraint = PubGrub::VersionConstraint.new(package, :range => range)
+
+ dep_term = PubGrub::Term.new(dep_constraint, false)
+ self_term = PubGrub::Term.new(self_constraint, true)
+
+ custom_explanation = if dep_package.meta? && package.root?
+ "current #{dep_package} version is #{dep_constraint.constraint_string}"
end
+
+ PubGrub::Incompatibility.new([self_term, dep_term], :cause => :dependency, :custom_explanation => custom_explanation)
end
- search.select {|sg| sg.for?(platform) }.each {|sg| sg.activate_platform!(platform) }
end
- def index_for(dependency)
- source = @source_requirements[dependency.name]
- if source
- source.specs
- elsif @lockfile_uses_separate_rubygems_sources
- Index.build do |idx|
- if dependency.all_sources
- dependency.all_sources.each {|s| idx.add_source(s.specs) if s }
- else
- idx.add_source @source_requirements[:default].specs
- end
- end
- else
- @index
+ def all_versions_for(package)
+ name = package.name
+ results = (@base[name] + filter_prereleases(@all_specs[name], package)).uniq {|spec| [spec.version.hash, spec.platform] }
+
+ if name == "bundler" && !bundler_pinned_to_current_version?
+ bundler_spec = Gem.loaded_specs["bundler"]
+ results << bundler_spec if bundler_spec
+ end
+
+ locked_requirement = base_requirements[name]
+ results = filter_matching_specs(results, locked_requirement) if locked_requirement
+
+ versions = results.group_by(&:version).reduce([]) do |groups, (version, specs)|
+ platform_specs = package.platforms.flat_map {|platform| select_best_platform_match(specs, platform) }
+ next groups if platform_specs.empty?
+
+ ruby_specs = select_best_platform_match(specs, Gem::Platform::RUBY)
+ groups << Resolver::Candidate.new(version, :specs => ruby_specs) if ruby_specs.any?
+
+ next groups if platform_specs == ruby_specs || package.force_ruby_platform?
+
+ groups << Resolver::Candidate.new(version, :specs => platform_specs)
+
+ groups
end
+
+ sort_versions(package, versions)
+ end
+
+ def source_for(name)
+ @source_requirements[name] || @source_requirements[:default]
+ end
+
+ def default_bundler_source
+ @source_requirements[:default_bundler]
end
- def name_for(dependency)
- dependency.name
+ def bundler_pinned_to_current_version?
+ !default_bundler_source.nil?
end
def name_for_explicit_dependency_source
@@ -176,245 +274,153 @@ module Bundler
"Gemfile"
end
- def name_for_locking_dependency_source
- Bundler.default_lockfile.basename.to_s
- rescue StandardError
- "Gemfile.lock"
- end
+ def raise_not_found!(package)
+ name = package.name
+ source = source_for(name)
+ specs = @all_specs[name]
+ matching_part = name
+ requirement_label = SharedHelpers.pretty_dependency(package.dependency)
+ cache_message = begin
+ " or in gems cached in #{Bundler.settings.app_cache_path}" if Bundler.app_cache.exist?
+ rescue GemfileNotFound
+ nil
+ end
+ specs_matching_requirement = filter_matching_specs(specs, package.dependency.requirement)
+
+ if specs_matching_requirement.any?
+ specs = specs_matching_requirement
+ matching_part = requirement_label
+ platforms = package.platforms
+ platform_label = platforms.size == 1 ? "platform '#{platforms.first}" : "platforms '#{platforms.join("', '")}"
+ requirement_label = "#{requirement_label}' with #{platform_label}"
+ end
- def requirement_satisfied_by?(requirement, activated, spec)
- return false unless requirement.matches_spec?(spec) || spec.source.is_a?(Source::Gemspec)
- spec.activate_platform!(requirement.__platform) if !@platforms || @platforms.include?(requirement.__platform)
- true
- end
+ message = String.new("Could not find gem '#{requirement_label}' in #{source}#{cache_message}.\n")
- def relevant_sources_for_vertex(vertex)
- if vertex.root?
- [@source_requirements[vertex.name]]
- elsif @lockfile_uses_separate_rubygems_sources
- vertex.recursive_predecessors.map do |v|
- @source_requirements[v.name]
- end << @source_requirements[:default]
+ if specs.any?
+ message << "\n#{other_specs_matching_message(specs, matching_part)}"
end
+
+ raise GemNotFound, message
end
- def sort_dependencies(dependencies, activated, conflicts)
- dependencies.sort_by do |dependency|
- dependency.all_sources = relevant_sources_for_vertex(activated.vertex_named(dependency.name))
- name = name_for(dependency)
- vertex = activated.vertex_named(name)
- [
- @base_dg.vertex_named(name) ? 0 : 1,
- vertex.payload ? 0 : 1,
- vertex.root? ? 0 : 1,
- amount_constrained(dependency),
- conflicts[name] ? 0 : 1,
- vertex.payload ? 0 : search_for(dependency).count,
- self.class.platform_sort_key(dependency.__platform),
- ]
+ private
+
+ def filter_matching_specs(specs, requirements)
+ Array(requirements).flat_map do |requirement|
+ specs.select {| spec| requirement_satisfied_by?(requirement, spec) }
end
end
- # Sort platforms from most general to most specific
- def self.sort_platforms(platforms)
- platforms.sort_by do |platform|
- platform_sort_key(platform)
+ def filter_prereleases(specs, package)
+ return specs unless package.ignores_prereleases? && specs.size > 1
+
+ specs.reject {|s| s.version.prerelease? }
+ end
+
+ def requirement_satisfied_by?(requirement, spec)
+ requirement.satisfied_by?(spec.version) || spec.source.is_a?(Source::Gemspec)
+ end
+
+ def sort_versions(package, versions)
+ if versions.size > 1
+ @gem_version_promoter.sort_versions(package, versions).reverse
+ else
+ versions
end
end
- def self.platform_sort_key(platform)
- return ["", "", ""] if Gem::Platform::RUBY == platform
- platform.to_a.map {|part| part || "" }
+ def repository_for(package)
+ source_for(package.name)
end
- private
-
- # returns an integer \in (-\infty, 0]
- # a number closer to 0 means the dependency is less constraining
- #
- # dependencies w/ 0 or 1 possibilities (ignoring version requirements)
- # are given very negative values, so they _always_ sort first,
- # before dependencies that are unconstrained
- def amount_constrained(dependency)
- @amount_constrained ||= {}
- @amount_constrained[dependency.name] ||= begin
- if (base = @base[dependency.name]) && !base.empty?
- dependency.requirement.satisfied_by?(base.first.version) ? 0 : 1
- else
- all = index_for(dependency).search(dependency.name).size
+ def base_requirements
+ @base.base_requirements
+ end
- if all <= 1
- all - 1_000_000
- else
- search = search_for(dependency)
- search = @prerelease_specified[dependency.name] ? search.count : search.count {|s| !s.version.prerelease? }
- search - all
- end
+ def prepare_dependencies(requirements, packages)
+ to_dependency_hash(requirements, packages).map do |dep_package, dep_constraint|
+ name = dep_package.name
+
+ next [dep_package, dep_constraint] if name == "bundler"
+
+ versions = versions_for(dep_package, dep_constraint.range)
+ if versions.empty? && dep_package.ignores_prereleases?
+ @sorted_versions.delete(dep_package)
+ dep_package.consider_prereleases!
+ versions = versions_for(dep_package, dep_constraint.range)
end
- end
+ next [dep_package, dep_constraint] unless versions.empty?
+
+ next unless dep_package.current_platform?
+
+ raise_not_found!(dep_package)
+ end.compact.to_h
end
- def verify_gemfile_dependencies_are_found!(requirements)
- requirements.each do |requirement|
- name = requirement.name
- next if name == "bundler"
- next unless search_for(requirement).empty?
-
- cache_message = begin
- " or in gems cached in #{Bundler.settings.app_cache_path}" if Bundler.app_cache.exist?
- rescue GemfileNotFound
- nil
- end
-
- if (base = @base[name]) && !base.empty?
- version = base.first.version
- message = "You have requested:\n" \
- " #{name} #{requirement.requirement}\n\n" \
- "The bundle currently has #{name} locked at #{version}.\n" \
- "Try running `bundle update #{name}`\n\n" \
- "If you are updating multiple gems in your Gemfile at once,\n" \
- "try passing them all to `bundle update`"
- elsif source = @source_requirements[name]
- specs = source.specs[name]
- versions_with_platforms = specs.map {|s| [s.version, s.platform] }
- message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
- message << if versions_with_platforms.any?
- "The source contains '#{name}' at: #{formatted_versions_with_platforms(versions_with_platforms)}"
- else
- "The source does not contain any versions of '#{name}'"
- end
+ def other_specs_matching_message(specs, requirement)
+ message = String.new("The source contains the following gems matching '#{requirement}':\n")
+ message << specs.map {|s| " * #{s.full_name}" }.join("\n")
+ message
+ end
+
+ def requirement_to_range(requirement)
+ ranges = requirement.requirements.map do |(op, version)|
+ ver = Resolver::Candidate.new(version).generic!
+ platform_ver = Resolver::Candidate.new(version).platform_specific!
+
+ case op
+ when "~>"
+ name = "~> #{ver}"
+ bump = Resolver::Candidate.new(version.bump.to_s + ".A")
+ PubGrub::VersionRange.new(:name => name, :min => ver, :max => bump, :include_min => true)
+ when ">"
+ PubGrub::VersionRange.new(:min => platform_ver)
+ when ">="
+ PubGrub::VersionRange.new(:min => ver, :include_min => true)
+ when "<"
+ PubGrub::VersionRange.new(:max => ver)
+ when "<="
+ PubGrub::VersionRange.new(:max => platform_ver, :include_max => true)
+ when "="
+ PubGrub::VersionRange.new(:min => ver, :max => platform_ver, :include_min => true, :include_max => true)
+ when "!="
+ PubGrub::VersionRange.new(:min => ver, :max => platform_ver, :include_min => true, :include_max => true).invert
else
- message = "Could not find gem '#{requirement}' in any of the gem sources " \
- "listed in your Gemfile#{cache_message}."
+ raise "bad version specifier: #{op}"
end
- raise GemNotFound, message
end
- end
- def formatted_versions_with_platforms(versions_with_platforms)
- version_platform_strs = versions_with_platforms.map do |vwp|
- version = vwp.first
- platform = vwp.last
- version_platform_str = String.new(version.to_s)
- version_platform_str << " #{platform}" unless platform.nil? || platform == Gem::Platform::RUBY
- version_platform_str
- end
- version_platform_strs.join(", ")
+ ranges.inject(&:intersect)
end
- def version_conflict_message(e)
- # only show essential conflicts, if possible
- conflicts = e.conflicts.dup
- conflicts.delete_if do |_name, conflict|
- deps = conflict.requirement_trees.map(&:last).flatten(1)
- !Bundler::VersionRanges.empty?(*Bundler::VersionRanges.for_many(deps.map(&:requirement)))
- end
- e = Molinillo::VersionConflict.new(conflicts, e.specification_provider) unless conflicts.empty?
-
- solver_name = "Bundler"
- possibility_type = "gem"
- e.message_with_trees(
- :solver_name => solver_name,
- :possibility_type => possibility_type,
- :reduce_trees => lambda do |trees|
- # called first, because we want to reduce the amount of work required to find maximal empty sets
- trees = trees.uniq {|t| t.flatten.map {|dep| [dep.name, dep.requirement] } }
-
- # bail out if tree size is too big for Array#combination to make any sense
- return trees if trees.size > 15
- maximal = 1.upto(trees.size).map do |size|
- trees.map(&:last).flatten(1).combination(size).to_a
- end.flatten(1).select do |deps|
- Bundler::VersionRanges.empty?(*Bundler::VersionRanges.for_many(deps.map(&:requirement)))
- end.min_by(&:size)
-
- trees.reject! {|t| !maximal.include?(t.last) } if maximal
-
- trees.sort_by {|t| t.reverse.map(&:name) }
- end,
- :printable_requirement => lambda {|req| SharedHelpers.pretty_dependency(req) },
- :additional_message_for_conflict => lambda do |o, name, conflict|
- if name == "bundler"
- o << %(\n Current Bundler version:\n bundler (#{Bundler::VERSION}))
- other_bundler_required = !conflict.requirement.requirement.satisfied_by?(Gem::Version.new(Bundler::VERSION))
- end
+ def to_dependency_hash(dependencies, packages)
+ dependencies.inject({}) do |deps, dep|
+ package = packages[dep.name]
- if name == "bundler" && other_bundler_required
- o << "\n"
- o << "This Gemfile requires a different version of Bundler.\n"
- o << "Perhaps you need to update Bundler by running `gem install bundler`?\n"
- end
- if conflict.locked_requirement
- o << "\n"
- o << %(Running `bundle update` will rebuild your snapshot from scratch, using only\n)
- o << %(the gems in your Gemfile, which may resolve the conflict.\n)
- elsif !conflict.existing
- o << "\n"
-
- relevant_sources = if conflict.requirement.source
- [conflict.requirement.source]
- elsif conflict.requirement.all_sources
- conflict.requirement.all_sources
- elsif @lockfile_uses_separate_rubygems_sources
- # every conflict should have an explicit group of sources when we
- # enforce strict pinning
- raise "no source set for #{conflict}"
- else
- []
- end.compact.map(&:to_s).uniq.sort
-
- metadata_requirement = name.end_with?("\0")
-
- o << "Could not find gem '" unless metadata_requirement
- o << SharedHelpers.pretty_dependency(conflict.requirement)
- o << "'" unless metadata_requirement
- if conflict.requirement_trees.first.size > 1
- o << ", which is required by "
- o << "gem '#{SharedHelpers.pretty_dependency(conflict.requirement_trees.first[-2])}',"
- end
- o << " "
-
- o << if relevant_sources.empty?
- "in any of the sources.\n"
- elsif metadata_requirement
- "is not available in #{relevant_sources.join(" or ")}"
- else
- "in any of the relevant sources:\n #{relevant_sources * "\n "}\n"
- end
- end
- end,
- :version_for_spec => lambda {|spec| spec.version },
- :incompatible_version_message_for_conflict => lambda do |name, _conflict|
- if name.end_with?("\0")
- %(#{solver_name} found conflicting requirements for the #{name} version:)
- else
- %(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
- end
- end
- )
- end
+ current_req = deps[package]
+ new_req = parse_dependency(package, dep.requirement)
- def validate_resolved_specs!(resolved_specs)
- resolved_specs.each do |v|
- name = v.name
- next unless sources = relevant_sources_for_vertex(v)
- sources.compact!
- if default_index = sources.index(@source_requirements[:default])
- sources.delete_at(default_index)
+ deps[package] = if current_req
+ current_req.intersect(new_req)
+ else
+ new_req
end
- sources.reject! {|s| s.specs[name].empty? }
- sources.uniq!
- next if sources.size <= 1
- multisource_disabled = Bundler.feature_flag.disable_multisource?
+ deps
+ end
+ end
- msg = ["The gem '#{name}' was found in multiple relevant sources."]
- msg.concat sources.map {|s| " * #{s}" }.sort
- msg << "You #{multisource_disabled ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
- msg = msg.join("\n")
+ def bundler_not_found_message(conflict_dependencies)
+ candidate_specs = filter_matching_specs(default_bundler_source.specs.search("bundler"), conflict_dependencies)
- raise SecurityError, msg if multisource_disabled
- Bundler.ui.warn "Warning: #{msg}"
+ if candidate_specs.any?
+ target_version = candidate_specs.last.version
+ new_command = [File.basename($PROGRAM_NAME), "_#{target_version}_", *ARGV].join(" ")
+ "Your bundle requires a different version of Bundler than the one you're running.\n" \
+ "Install the necessary version with `gem install bundler:#{target_version}` and rerun bundler using `#{new_command}`\n"
+ else
+ "Your bundle requires a different version of Bundler than the one you're running, and that version could not be found.\n"
end
end
end
diff --git a/lib/bundler/resolver/base.rb b/lib/bundler/resolver/base.rb
new file mode 100644
index 0000000000..e5c3763c3f
--- /dev/null
+++ b/lib/bundler/resolver/base.rb
@@ -0,0 +1,107 @@
+# frozen_string_literal: true
+
+require_relative "package"
+
+module Bundler
+ class Resolver
+ class Base
+ attr_reader :packages, :requirements, :source_requirements
+
+ def initialize(source_requirements, dependencies, base, platforms, options)
+ @source_requirements = source_requirements
+
+ @base = base
+
+ @packages = Hash.new do |hash, name|
+ hash[name] = Package.new(name, platforms, **options)
+ end
+
+ @requirements = dependencies.map do |dep|
+ dep_platforms = dep.gem_platforms(platforms)
+
+ # Dependencies scoped to external platforms are ignored
+ next if dep_platforms.empty?
+
+ name = dep.name
+
+ @packages[name] = Package.new(name, dep_platforms, **options.merge(:dependency => dep))
+
+ dep
+ end.compact
+ end
+
+ def [](name)
+ @base[name]
+ end
+
+ def delete(specs)
+ @base.delete(specs)
+ end
+
+ def get_package(name)
+ @packages[name]
+ end
+
+ def base_requirements
+ @base_requirements ||= build_base_requirements
+ end
+
+ def unlock_names(names)
+ indirect_pins = indirect_pins(names)
+
+ if indirect_pins.any?
+ loosen_names(indirect_pins)
+ else
+ pins = pins(names)
+
+ if pins.any?
+ loosen_names(pins)
+ else
+ unrestrict_names(names)
+ end
+ end
+ end
+
+ def include_prereleases(names)
+ names.each do |name|
+ get_package(name).consider_prereleases!
+ end
+ end
+
+ private
+
+ def indirect_pins(names)
+ names.select {|name| @base_requirements[name].exact? && @requirements.none? {|dep| dep.name == name } }
+ end
+
+ def pins(names)
+ names.select {|name| @base_requirements[name].exact? }
+ end
+
+ def loosen_names(names)
+ names.each do |name|
+ version = @base_requirements[name].requirements.first[1]
+
+ @base_requirements[name] = Gem::Requirement.new(">= #{version}")
+
+ @base.delete_by_name(name)
+ end
+ end
+
+ def unrestrict_names(names)
+ names.each do |name|
+ @base_requirements.delete(name)
+ end
+ end
+
+ def build_base_requirements
+ base_requirements = {}
+ @base.each do |ls|
+ req = Gem::Requirement.new(ls.version)
+ base_requirements[ls.name] = req
+ end
+ base_requirements
+ end
+ end
+ end
+end
diff --git a/lib/bundler/resolver/candidate.rb b/lib/bundler/resolver/candidate.rb
new file mode 100644
index 0000000000..e695ef08ee
--- /dev/null
+++ b/lib/bundler/resolver/candidate.rb
@@ -0,0 +1,94 @@
+# frozen_string_literal: true
+
+require_relative "spec_group"
+
+module Bundler
+ class Resolver
+ #
+ # This class is a PubGrub compatible "Version" class that takes Bundler
+ # resolution complexities into account.
+ #
+ # Each Resolver::Candidate has a underlying `Gem::Version` plus a set of
+ # platforms. For example, 1.1.0-x86_64-linux is a different resolution candidate
+ # from 1.1.0 (generic). This is because different platform variants of the
+ # same gem version can bring different dependencies, so they need to be
+ # considered separately.
+ #
+ # Some candidates may also keep some information explicitly about the
+ # package the refer to. These candidates are referred to as "canonical" and
+ # are used when materializing resolution results back into RubyGems
+ # specifications that can be installed, written to lock files, and so on.
+ #
+ class Candidate
+ include Comparable
+
+ attr_reader :version
+
+ def initialize(version, specs: [])
+ @spec_group = Resolver::SpecGroup.new(specs)
+ @version = Gem::Version.new(version)
+ @ruby_only = specs.map(&:platform).uniq == [Gem::Platform::RUBY]
+ end
+
+ def dependencies
+ @spec_group.dependencies
+ end
+
+ def to_specs(package)
+ return [] if package.meta?
+
+ @spec_group.to_specs(package.force_ruby_platform?)
+ end
+
+ def generic!
+ @ruby_only = true
+
+ self
+ end
+
+ def platform_specific!
+ @ruby_only = false
+
+ self
+ end
+
+ def prerelease?
+ @version.prerelease?
+ end
+
+ def segments
+ @version.segments
+ end
+
+ def sort_obj
+ [@version, @ruby_only ? -1 : 1]
+ end
+
+ def <=>(other)
+ return unless other.is_a?(self.class)
+
+ sort_obj <=> other.sort_obj
+ end
+
+ def ==(other)
+ return unless other.is_a?(self.class)
+
+ sort_obj == other.sort_obj
+ end
+
+ def eql?(other)
+ return unless other.is_a?(self.class)
+
+ sort_obj.eql?(other.sort_obj)
+ end
+
+ def hash
+ sort_obj.hash
+ end
+
+ def to_s
+ @version.to_s
+ end
+ end
+ end
+end
diff --git a/lib/bundler/resolver/incompatibility.rb b/lib/bundler/resolver/incompatibility.rb
new file mode 100644
index 0000000000..c61151fbeb
--- /dev/null
+++ b/lib/bundler/resolver/incompatibility.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Bundler
+ class Resolver
+ class Incompatibility < PubGrub::Incompatibility
+ attr_reader :extended_explanation
+
+ def initialize(terms, cause:, custom_explanation: nil, extended_explanation: nil)
+ @extended_explanation = extended_explanation
+
+ super(terms, :cause => cause, :custom_explanation => custom_explanation)
+ end
+ end
+ end
+end
diff --git a/lib/bundler/resolver/package.rb b/lib/bundler/resolver/package.rb
new file mode 100644
index 0000000000..7499a75006
--- /dev/null
+++ b/lib/bundler/resolver/package.rb
@@ -0,0 +1,72 @@
+# frozen_string_literal: true
+
+module Bundler
+ class Resolver
+ #
+ # Represents a gem being resolved, in a format PubGrub likes.
+ #
+ # The class holds the following information:
+ #
+ # * Platforms this gem will be resolved on.
+ # * The locked version of this gem resolution should favor (if any).
+ # * Whether the gem should be unlocked to its latest version.
+ # * The dependency explicit set in the Gemfile for this gem (if any).
+ #
+ class Package
+ attr_reader :name, :platforms, :dependency, :locked_version
+
+ def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, dependency: nil)
+ @name = name
+ @platforms = platforms
+ @locked_version = locked_specs[name].first&.version
+ @unlock = unlock
+ @dependency = dependency || Dependency.new(name, @locked_version)
+ @prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
+ end
+
+ def to_s
+ @name.delete("\0")
+ end
+
+ def root?
+ false
+ end
+
+ def meta?
+ @name.end_with?("\0")
+ end
+
+ def ==(other)
+ self.class == other.class && @name == other.name
+ end
+
+ def hash
+ @name.hash
+ end
+
+ def unlock?
+ @unlock.empty? || @unlock.include?(name)
+ end
+
+ def ignores_prereleases?
+ @prerelease == :ignore
+ end
+
+ def prerelease_specified?
+ @prerelease == :consider_first
+ end
+
+ def consider_prereleases!
+ @prerelease = :consider_last
+ end
+
+ def force_ruby_platform?
+ @dependency.force_ruby_platform
+ end
+
+ def current_platform?
+ @dependency.current_platform?
+ end
+ end
+ end
+end
diff --git a/lib/bundler/resolver/root.rb b/lib/bundler/resolver/root.rb
new file mode 100644
index 0000000000..e5eb634fb8
--- /dev/null
+++ b/lib/bundler/resolver/root.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require_relative "package"
+
+module Bundler
+ class Resolver
+ #
+ # Represents the Gemfile from the resolver's perspective. It's the root
+ # package and Gemfile entries depend on it.
+ #
+ class Root < Package
+ def initialize(name)
+ @name = name
+ end
+
+ def meta?
+ true
+ end
+
+ def root?
+ true
+ end
+ end
+ end
+end
diff --git a/lib/bundler/resolver/spec_group.rb b/lib/bundler/resolver/spec_group.rb
index e5772eed81..b44c19a73f 100644
--- a/lib/bundler/resolver/spec_group.rb
+++ b/lib/bundler/resolver/spec_group.rb
@@ -3,105 +3,80 @@
module Bundler
class Resolver
class SpecGroup
- include GemHelpers
-
- attr_accessor :name, :version, :source
- attr_accessor :ignores_bundler_dependencies
-
- def initialize(all_specs)
- raise ArgumentError, "cannot initialize with an empty value" unless exemplary_spec = all_specs.first
- @name = exemplary_spec.name
- @version = exemplary_spec.version
- @source = exemplary_spec.source
-
- @activated_platforms = []
- @dependencies = nil
- @specs = Hash.new do |specs, platform|
- specs[platform] = select_best_platform_match(all_specs, platform)
- end
- @ignores_bundler_dependencies = true
+ def initialize(specs)
+ @specs = specs
end
- def to_specs
- @activated_platforms.map do |p|
- next unless s = @specs[p]
- lazy_spec = LazySpecification.new(name, version, s.platform, source)
- lazy_spec.dependencies.replace s.dependencies
- lazy_spec
- end.compact
+ def empty?
+ @specs.empty?
end
- def activate_platform!(platform)
- return unless for?(platform)
- return if @activated_platforms.include?(platform)
- @activated_platforms << platform
+ def name
+ @name ||= exemplary_spec.name
end
- def for?(platform)
- spec = @specs[platform]
- !spec.nil?
+ def version
+ @version ||= exemplary_spec.version
end
- def to_s
- @to_s ||= "#{name} (#{version})"
+ def source
+ @source ||= exemplary_spec.source
end
- def dependencies_for_activated_platforms
- dependencies = @activated_platforms.map {|p| __dependencies[p] }
- metadata_dependencies = @activated_platforms.map do |platform|
- metadata_dependencies(@specs[platform], platform)
+ def to_specs(force_ruby_platform)
+ @specs.map do |s|
+ lazy_spec = LazySpecification.new(name, version, s.platform, source)
+ lazy_spec.force_ruby_platform = force_ruby_platform
+ lazy_spec.dependencies.replace s.dependencies
+ lazy_spec
end
- dependencies.concat(metadata_dependencies).flatten
end
- def ==(other)
- return unless other.is_a?(SpecGroup)
- name == other.name &&
- version == other.version &&
- source == other.source
+ def to_s
+ sorted_spec_names.join(", ")
end
- def eql?(other)
- return unless other.is_a?(SpecGroup)
- name.eql?(other.name) &&
- version.eql?(other.version) &&
- source.eql?(other.source)
+ def dependencies
+ @dependencies ||= @specs.map do |spec|
+ __dependencies(spec) + metadata_dependencies(spec)
+ end.flatten.uniq
end
- def hash
- to_s.hash ^ source.hash
+ protected
+
+ def sorted_spec_names
+ @sorted_spec_names ||= @specs.map(&:full_name).sort
end
- private
-
- def __dependencies
- @dependencies = Hash.new do |dependencies, platform|
- dependencies[platform] = []
- if spec = @specs[platform]
- spec.dependencies.each do |dep|
- next if dep.type == :development
- next if @ignores_bundler_dependencies && dep.name == "bundler".freeze
- dependencies[platform] << DepProxy.new(dep, platform)
- end
- end
- dependencies[platform]
- end
+ private
+
+ def exemplary_spec
+ @specs.first
end
- def metadata_dependencies(spec, platform)
- return [] unless spec
- # Only allow endpoint specifications since they won't hit the network to
- # fetch the full gemspec when calling required_ruby_version
- return [] if !spec.is_a?(EndpointSpecification) && !spec.is_a?(Gem::Specification)
+ def __dependencies(spec)
dependencies = []
- if !spec.required_ruby_version.nil? && !spec.required_ruby_version.none?
- dependencies << DepProxy.new(Gem::Dependency.new("Ruby\0", spec.required_ruby_version), platform)
- end
- if !spec.required_rubygems_version.nil? && !spec.required_rubygems_version.none?
- dependencies << DepProxy.new(Gem::Dependency.new("RubyGems\0", spec.required_rubygems_version), platform)
+ spec.dependencies.each do |dep|
+ next if dep.type == :development
+ dependencies << Dependency.new(dep.name, dep.requirement)
end
dependencies
end
+
+ def metadata_dependencies(spec)
+ return [] if spec.is_a?(LazySpecification)
+
+ [
+ metadata_dependency("Ruby", spec.required_ruby_version),
+ metadata_dependency("RubyGems", spec.required_rubygems_version),
+ ].compact
+ end
+
+ def metadata_dependency(name, requirement)
+ return if requirement.nil? || requirement.none?
+
+ Dependency.new("#{name}\0", requirement)
+ end
end
end
end
diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb
index d64958ba70..2415ade200 100644
--- a/lib/bundler/retry.rb
+++ b/lib/bundler/retry.rb
@@ -32,7 +32,7 @@ module Bundler
end
alias_method :attempts, :attempt
- private
+ private
def run(&block)
@failed = false
@@ -49,7 +49,7 @@ module Bundler
raise e
end
return true unless name
- Bundler.ui.info "" unless Bundler.ui.debug? # Add new line incase dots preceded this
+ Bundler.ui.info "" unless Bundler.ui.debug? # Add new line in case dots preceded this
Bundler.ui.warn "Retrying #{name} due to error (#{current_run.next}/#{total_runs}): #{e.class} #{e.message}", Bundler.ui.debug?
end
diff --git a/lib/bundler/ruby_dsl.rb b/lib/bundler/ruby_dsl.rb
index f6ba220cd5..d054969e8d 100644
--- a/lib/bundler/ruby_dsl.rb
+++ b/lib/bundler/ruby_dsl.rb
@@ -5,11 +5,17 @@ module Bundler
def ruby(*ruby_version)
options = ruby_version.last.is_a?(Hash) ? ruby_version.pop : {}
ruby_version.flatten!
+
raise GemfileError, "Please define :engine_version" if options[:engine] && options[:engine_version].nil?
raise GemfileError, "Please define :engine" if options[:engine_version] && options[:engine].nil?
+ if options[:file]
+ raise GemfileError, "Cannot specify version when using the file option" if ruby_version.any?
+ ruby_version << Bundler.read_file(options[:file]).strip
+ end
+
if options[:engine] == "ruby" && options[:engine_version] &&
- ruby_version != Array(options[:engine_version])
+ ruby_version != Array(options[:engine_version])
raise GemfileEvalError, "ruby_version must match the :engine_version for MRI"
end
@ruby_version = RubyVersion.new(ruby_version, options[:patchlevel], options[:engine], options[:engine_version])
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index 7e403ce6fc..b5396abb6e 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -28,16 +28,16 @@ module Bundler
end
@gem_version = Gem::Requirement.create(@versions.first).requirements.first.last
- @input_engine = engine && engine.to_s
- @engine = engine && engine.to_s || "ruby"
+ @input_engine = engine&.to_s
+ @engine = engine&.to_s || "ruby"
@engine_versions = (engine_version && Array(engine_version)) || @versions
@engine_gem_version = Gem::Requirement.create(@engine_versions.first).requirements.first.last
- @patchlevel = patchlevel
+ @patchlevel = patchlevel || (@gem_version.prerelease? ? "-1" : nil)
end
def to_s(versions = self.versions)
output = String.new("ruby #{versions_string(versions)}")
- output << "p#{patchlevel}" if patchlevel
+ output << "p#{patchlevel}" if patchlevel && patchlevel != "-1"
output << " (#{engine} #{versions_string(engine_versions)})" unless engine == "ruby"
output
@@ -46,7 +46,7 @@ module Bundler
# @private
PATTERN = /
ruby\s
- ([\d.]+) # ruby version
+ (\d+\.\d+\.\d+(?:\.\S+)?) # ruby version
(?:p(-?\d+))? # optional patchlevel
(?:\s\((\S+)\s(.+)\))? # optional engine info
/xo.freeze
@@ -103,27 +103,14 @@ module Bundler
def self.system
ruby_engine = RUBY_ENGINE.dup
- ruby_version = ENV.fetch("BUNDLER_SPEC_RUBY_VERSION") { RUBY_VERSION }.dup
- ruby_engine_version = RUBY_ENGINE_VERSION.dup
+ ruby_version = Gem.ruby_version.to_s
+ ruby_engine_version = RUBY_ENGINE == "ruby" ? ruby_version : RUBY_ENGINE_VERSION.dup
patchlevel = RUBY_PATCHLEVEL.to_s
- @ruby_version ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)
+ @system ||= RubyVersion.new(ruby_version, patchlevel, ruby_engine, ruby_engine_version)
end
- def to_gem_version_with_patchlevel
- @gem_version_with_patch ||= begin
- Gem::Version.create("#{@gem_version}.#{@patchlevel}")
- rescue ArgumentError
- @gem_version
- end
- end
-
- def exact?
- return @exact if defined?(@exact)
- @exact = versions.all? {|v| Gem::Requirement.create(v).exact? }
- end
-
- private
+ private
def matches?(requirements, version)
# Handles RUBY_PATCHLEVEL of -1 for instances like ruby-head
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index eda826422f..8981612706 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -4,14 +4,35 @@ require "pathname"
require "rubygems/specification"
-# Possible use in Gem::Specification#source below and require
-# shouldn't be deferred.
+# We can't let `Gem::Source` be autoloaded in the `Gem::Specification#source`
+# redefinition below, so we need to load it upfront. The reason is that if
+# Bundler monkeypatches are loaded before RubyGems activates an executable (for
+# example, through `ruby -rbundler -S irb`), gem activation might end up calling
+# the redefined `Gem::Specification#source` and triggering the `Gem::Source`
+# autoload. That would result in requiring "rubygems/source" inside another
+# require, which would trigger a monitor error and cause the `autoload` to
+# eventually fail. A better solution is probably to completely avoid autoloading
+# `Gem::Source` from the redefined `Gem::Specification#source`.
require "rubygems/source"
+require_relative "match_metadata"
+require_relative "force_platform"
require_relative "match_platform"
+# Cherry-pick fixes to `Gem.ruby_version` to be useful for modern Bundler
+# versions and ignore patchlevels
+# (https://github.com/rubygems/rubygems/pull/5472,
+# https://github.com/rubygems/rubygems/pull/5486). May be removed once RubyGems
+# 3.3.12 support is dropped.
+unless Gem.ruby_version.to_s == RUBY_VERSION || RUBY_PATCHLEVEL == -1
+ Gem.instance_variable_set(:@ruby_version, Gem::Version.new(RUBY_VERSION))
+end
+
module Gem
class Specification
+ include ::Bundler::MatchMetadata
+ include ::Bundler::MatchPlatform
+
attr_accessor :remote, :location, :relative_loaded_from
remove_method :source
@@ -24,12 +45,8 @@ module Gem
alias_method :rg_loaded_from, :loaded_from
def full_gem_path
- # this cannot check source.is_a?(Bundler::Plugin::API::Source)
- # because that _could_ trip the autoload, and if there are unresolved
- # gems at that time, this method could be called inside another require,
- # thus raising with that constant being undefined. Better to check a method
- if source.respond_to?(:path) || (source.respond_to?(:bundler_plugin_api_source?) && source.bundler_plugin_api_source?)
- Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+ if source.respond_to?(:root)
+ Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
else
rg_full_gem_path
end
@@ -47,14 +64,15 @@ module Gem
full_require_paths
end
- if method_defined?(:extension_dir)
- alias_method :rg_extension_dir, :extension_dir
- def extension_dir
- @bundler_extension_dir ||= if source.respond_to?(:extension_dir_name)
- File.expand_path(File.join(extensions_dir, source.extension_dir_name))
- else
- rg_extension_dir
- end
+ alias_method :rg_extension_dir, :extension_dir
+ def extension_dir
+ # following instance variable is already used in original method
+ # and that is the reason to prefix it with bundler_ and add rubocop exception
+ @bundler_extension_dir ||= if source.respond_to?(:extension_dir_name) # rubocop:disable Naming/MemoizedInstanceVariableName
+ unique_extension_dir = [source.extension_dir_name, File.basename(full_gem_path)].uniq.join("-")
+ File.expand_path(File.join(extensions_dir, unique_extension_dir))
+ else
+ rg_extension_dir
end
end
@@ -63,6 +81,23 @@ module Gem
full_gem_path
end
+ unless const_defined?(:LATEST_RUBY_WITHOUT_PATCH_VERSIONS)
+ LATEST_RUBY_WITHOUT_PATCH_VERSIONS = Gem::Version.new("2.1")
+
+ alias_method :rg_required_ruby_version=, :required_ruby_version=
+ def required_ruby_version=(req)
+ self.rg_required_ruby_version = req
+
+ @required_ruby_version.requirements.map! do |op, v|
+ if v >= LATEST_RUBY_WITHOUT_PATCH_VERSIONS && v.release.segments.size == 4
+ [op == "~>" ? "=" : op, Gem::Version.new(v.segments.tap {|s| s.delete_at(3) }.join("."))]
+ else
+ [op, v]
+ end
+ end
+ end
+ end
+
def groups
@groups ||= []
end
@@ -82,11 +117,26 @@ module Gem
gemfile
end
+ # Backfill missing YAML require when not defined. Fixed since 3.1.0.pre1.
+ module YamlBackfiller
+ def to_yaml(opts = {})
+ Gem.load_yaml unless defined?(::YAML)
+
+ super(opts)
+ end
+ end
+
+ prepend YamlBackfiller
+
def nondevelopment_dependencies
dependencies - development_dependencies
end
- private
+ def deleted_gem?
+ !default_gem? && !File.directory?(full_gem_path)
+ end
+
+ private
def dependencies_to_gemfile(dependencies, group = nil)
gemfile = String.new
@@ -106,10 +156,18 @@ module Gem
end
class Dependency
- attr_accessor :source, :groups, :all_sources
+ include ::Bundler::ForcePlatform
+
+ attr_accessor :source, :groups
alias_method :eql?, :==
+ def force_ruby_platform
+ return @force_ruby_platform if defined?(@force_ruby_platform) && !@force_ruby_platform.nil?
+
+ @force_ruby_platform = default_force_ruby_platform
+ end
+
def encode_with(coder)
to_yaml_properties.each do |ivar|
coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar)
@@ -117,7 +175,7 @@ module Gem
end
def to_yaml_properties
- instance_variables.reject {|p| ["@source", "@groups", "@all_sources"].include?(p.to_s) }
+ instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) }
end
def to_lock
@@ -130,25 +188,168 @@ module Gem
end
end
+ # comparison is done order independently since rubygems 3.2.0.rc.2
+ unless Gem::Requirement.new("> 1", "< 2") == Gem::Requirement.new("< 2", "> 1")
+ class Requirement
+ module OrderIndependentComparison
+ def ==(other)
+ return unless Gem::Requirement === other
+
+ if _requirements_sorted? && other._requirements_sorted?
+ super
+ else
+ _with_sorted_requirements == other._with_sorted_requirements
+ end
+ end
+
+ protected
+
+ def _requirements_sorted?
+ return @_requirements_sorted if defined?(@_requirements_sorted)
+ strings = as_list
+ @_requirements_sorted = strings == strings.sort
+ end
+
+ def _with_sorted_requirements
+ @_with_sorted_requirements ||= _requirements_sorted? ? self : self.class.new(as_list.sort)
+ end
+ end
+
+ prepend OrderIndependentComparison
+ end
+ end
+
+ if Gem::Requirement.new("~> 2.0").hash == Gem::Requirement.new("~> 2.0.0").hash
+ class Requirement
+ module CorrectHashForLambdaOperator
+ def hash
+ if requirements.any? {|r| r.first == "~>" }
+ requirements.map {|r| r.first == "~>" ? [r[0], r[1].to_s] : r }.sort.hash
+ else
+ super
+ end
+ end
+ end
+
+ prepend CorrectHashForLambdaOperator
+ end
+ end
+
+ require "rubygems/platform"
+
class Platform
- JAVA = Gem::Platform.new("java") unless defined?(JAVA)
- MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN)
- MSWIN64 = Gem::Platform.new("mswin64") unless defined?(MSWIN64)
- MINGW = Gem::Platform.new("x86-mingw32") unless defined?(MINGW)
- X64_MINGW = Gem::Platform.new("x64-mingw32") unless defined?(X64_MINGW)
+ JAVA = Gem::Platform.new("java")
+ MSWIN = Gem::Platform.new("mswin32")
+ MSWIN64 = Gem::Platform.new("mswin64")
+ MINGW = Gem::Platform.new("x86-mingw32")
+ X64_MINGW = [Gem::Platform.new("x64-mingw32"),
+ Gem::Platform.new("x64-mingw-ucrt")].freeze
+ WINDOWS = [MSWIN, MSWIN64, MINGW, X64_MINGW].flatten.freeze
+ X64_LINUX = Gem::Platform.new("x86_64-linux")
+ X64_LINUX_MUSL = Gem::Platform.new("x86_64-linux-musl")
- undef_method :hash if method_defined? :hash
- def hash
- @cpu.hash ^ @os.hash ^ @version.hash
+ if X64_LINUX === X64_LINUX_MUSL
+ remove_method :===
+
+ def ===(other)
+ return nil unless Gem::Platform === other
+
+ # universal-mingw32 matches x64-mingw-ucrt
+ return true if (@cpu == "universal" || other.cpu == "universal") &&
+ @os.start_with?("mingw") && other.os.start_with?("mingw")
+
+ # cpu
+ ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
+ (@cpu == "arm" && other.cpu.start_with?("arm"))) &&
+
+ # os
+ @os == other.os &&
+
+ # version
+ (
+ (@os != "linux" && (@version.nil? || other.version.nil?)) ||
+ (@os == "linux" && (normalized_linux_version_ext == other.normalized_linux_version_ext || ["musl#{@version}", "musleabi#{@version}", "musleabihf#{@version}"].include?(other.version))) ||
+ @version == other.version
+ )
+ end
+
+ # This is a copy of RubyGems 3.3.23 or higher `normalized_linux_method`.
+ # Once only 3.3.23 is supported, we can use the method in RubyGems.
+ def normalized_linux_version_ext
+ return nil unless @version
+
+ without_gnu_nor_abi_modifiers = @version.sub(/\Agnu/, "").sub(/eabi(hf)?\Z/, "")
+ return nil if without_gnu_nor_abi_modifiers.empty?
+
+ without_gnu_nor_abi_modifiers
+ end
end
- undef_method :eql? if method_defined? :eql?
- alias_method :eql?, :==
+ if RUBY_ENGINE == "truffleruby" && !defined?(REUSE_AS_BINARY_ON_TRUFFLERUBY)
+ REUSE_AS_BINARY_ON_TRUFFLERUBY = %w[libv8 libv8-node sorbet-static].freeze
+ end
end
-end
-module Gem
+ Platform.singleton_class.module_eval do
+ unless Platform.singleton_methods.include?(:match_spec?)
+ def match_spec?(spec)
+ match_gem?(spec.platform, spec.name)
+ end
+
+ def match_gem?(platform, gem_name)
+ match_platforms?(platform, Gem.platforms)
+ end
+ end
+
+ match_platforms_defined = Gem::Platform.respond_to?(:match_platforms?, true)
+
+ if !match_platforms_defined || Gem::Platform.send(:match_platforms?, Gem::Platform::X64_LINUX_MUSL, [Gem::Platform::X64_LINUX])
+
+ private
+
+ remove_method :match_platforms? if match_platforms_defined
+
+ def match_platforms?(platform, platforms)
+ platforms.any? do |local_platform|
+ platform.nil? ||
+ local_platform == platform ||
+ (local_platform != Gem::Platform::RUBY && platform =~ local_platform)
+ end
+ end
+ end
+ end
+
+ # On universal Rubies, resolve the "universal" arch to the real CPU arch, without changing the extension directory.
class Specification
- include ::Bundler::MatchPlatform
+ if /^universal\.(?<arch>.*?)-/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
+ local_platform = Platform.local
+ if local_platform.cpu == "universal"
+ ORIGINAL_LOCAL_PLATFORM = local_platform.to_s.freeze
+
+ local_platform.cpu = if arch == "arm64e" # arm64e is only permitted for Apple system binaries
+ "arm64"
+ else
+ arch
+ end
+
+ def extensions_dir
+ Gem.default_ext_dir_for(base_dir) ||
+ File.join(base_dir, "extensions", ORIGINAL_LOCAL_PLATFORM,
+ Gem.extension_api_version)
+ end
+ end
+ end
+ end
+
+ require "rubygems/util"
+
+ Util.singleton_class.module_eval do
+ if Util.singleton_methods.include?(:glob_files_in_dir) # since 3.0.0.beta.2
+ remove_method :glob_files_in_dir
+ end
+
+ def glob_files_in_dir(glob, base_path)
+ Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) }
+ end
end
end
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index b1076b4554..38035a00ac 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -4,14 +4,60 @@ require "rubygems/installer"
module Bundler
class RubyGemsGemInstaller < Gem::Installer
- unless respond_to?(:at)
- def self.at(*args)
- new(*args)
+ def check_executable_overwrite(filename)
+ # Bundler needs to install gems regardless of binstub overwriting
+ end
+
+ def install
+ pre_install_checks
+
+ run_pre_install_hooks
+
+ spec.loaded_from = spec_file
+
+ # Completely remove any previous gem files
+ strict_rm_rf gem_dir
+ strict_rm_rf spec.extension_dir
+
+ SharedHelpers.filesystem_access(gem_dir, :create) do
+ FileUtils.mkdir_p gem_dir, :mode => 0o755
end
+
+ extract_files
+
+ build_extensions if spec.extensions.any?
+ write_build_info_file
+ run_post_build_hooks
+
+ generate_bin
+ generate_plugins
+
+ write_spec
+
+ SharedHelpers.filesystem_access("#{gem_home}/cache", :write) do
+ write_cache_file
+ end
+
+ say spec.post_install_message unless spec.post_install_message.nil?
+
+ run_post_install_hooks
+
+ spec
end
- def check_executable_overwrite(filename)
- # Bundler needs to install gems regardless of binstub overwriting
+ def generate_plugins
+ return unless Gem::Installer.instance_methods(false).include?(:generate_plugins)
+
+ latest = Gem::Specification.stubs_for(spec.name).first
+ return if latest && latest.version > spec.version
+
+ ensure_writable_dir @plugins_dir
+
+ if spec.plugins.empty?
+ remove_plugins_for(spec, @plugins_dir)
+ else
+ regenerate_plugins_for(spec, @plugins_dir)
+ end
end
def pre_install_checks
@@ -20,27 +66,54 @@ module Bundler
def build_extensions
extension_cache_path = options[:bundler_extension_cache_path]
- return super unless extension_cache_path && extension_dir = Bundler.rubygems.spec_extension_dir(spec)
+ extension_dir = spec.extension_dir
+ unless extension_cache_path && extension_dir
+ prepare_extension_build(extension_dir)
+ return super
+ end
- extension_dir = Pathname.new(extension_dir)
build_complete = SharedHelpers.filesystem_access(extension_cache_path.join("gem.build_complete"), :read, &:file?)
if build_complete && !options[:force]
- SharedHelpers.filesystem_access(extension_dir.parent, &:mkpath)
+ SharedHelpers.filesystem_access(File.dirname(extension_dir)) do |p|
+ FileUtils.mkpath p
+ end
SharedHelpers.filesystem_access(extension_cache_path) do
- FileUtils.cp_r extension_cache_path, spec.extension_dir
+ FileUtils.cp_r extension_cache_path, extension_dir
end
else
+ prepare_extension_build(extension_dir)
super
- if extension_dir.directory? # not made for gems without extensions
- SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath)
- SharedHelpers.filesystem_access(extension_cache_path) do
- FileUtils.cp_r extension_dir, extension_cache_path
- end
+ SharedHelpers.filesystem_access(extension_cache_path.parent, &:mkpath)
+ SharedHelpers.filesystem_access(extension_cache_path) do
+ FileUtils.cp_r extension_dir, extension_cache_path
end
end
end
- private
+ def spec
+ if Bundler.rubygems.provides?("< 3.3.12") # RubyGems implementation rescues and re-raises errors before 3.3.12 and we don't want that
+ @package.spec
+ else
+ super
+ end
+ end
+
+ private
+
+ def prepare_extension_build(extension_dir)
+ SharedHelpers.filesystem_access(extension_dir, :create) do
+ FileUtils.mkdir_p extension_dir
+ end
+ require "shellwords" unless Bundler.rubygems.provides?(">= 3.2.25")
+ end
+
+ def strict_rm_rf(dir)
+ Bundler.rm_rf dir
+ rescue StandardError => e
+ raise unless File.exist?(dir)
+
+ raise DirectoryRemovalError.new(e, "Could not delete previous installation of `#{dir}`")
+ end
def validate_bundler_checksum(checksum)
return true if Bundler.settings[:disable_checksum_validation]
@@ -66,7 +139,7 @@ module Bundler
If you wish to continue installing the downloaded gem, and are certain it does not pose a \
security issue despite the mismatching checksum, do the following:
- 1. run `bundle config set disable_checksum_validation true` to turn off checksum verification
+ 1. run `bundle config set --local disable_checksum_validation true` to turn off checksum verification
2. run `bundle install`
(More info: The expected SHA256 checksum was #{checksum.inspect}, but the \
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 88fcd4d9e0..d8b7886af7 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "rubygems" unless defined?(Gem)
+
module Bundler
class RubygemsIntegration
if defined?(Gem::Ext::Builder::CHDIR_MONITOR)
@@ -10,32 +12,30 @@ module Bundler
EXT_LOCK = Monitor.new
end
- def self.version
- @version ||= Gem::Version.new(Gem::VERSION)
- end
-
- def self.provides?(req_str)
- Gem::Requirement.new(req_str).satisfied_by?(version)
- end
-
def initialize
@replaced_methods = {}
backport_ext_builder_monitor
end
def version
- self.class.version
+ @version ||= Gem.rubygems_version
end
def provides?(req_str)
- self.class.provides?(req_str)
+ Gem::Requirement.new(req_str).satisfied_by?(version)
+ end
+
+ def supports_bundler_trampolining?
+ provides?(">= 3.3.0.a")
end
def build_args
+ require "rubygems/command"
Gem::Command.build_args
end
def build_args=(args)
+ require "rubygems/command"
Gem::Command.build_args = args
end
@@ -82,16 +82,12 @@ module Bundler
def spec_missing_extensions?(spec, default = true)
return spec.missing_extensions? if spec.respond_to?(:missing_extensions?)
- return false if spec_default_gem?(spec)
+ return false if spec.default_gem?
return false if spec.extensions.empty?
default
end
- def spec_default_gem?(spec)
- spec.respond_to?(:default_gem?) && spec.default_gem?
- end
-
def spec_matches_for_glob(spec, glob)
return spec.matches_for_glob(glob) if spec.respond_to?(:matches_for_glob)
@@ -100,11 +96,6 @@ module Bundler
end.flatten(1)
end
- def spec_extension_dir(spec)
- return unless spec.respond_to?(:extension_dir)
- spec.extension_dir
- end
-
def stub_set_spec(stub, spec)
stub.instance_variable_set(:@spec, spec)
end
@@ -113,23 +104,6 @@ module Bundler
obj.to_s
end
- def platforms
- return [Gem::Platform::RUBY] if Bundler.settings[:force_ruby_platform]
- Gem.platforms
- end
-
- def configuration
- require_relative "psyched_yaml"
- Gem.configuration
- rescue Gem::SystemExitException, LoadError => e
- Bundler.ui.error "#{e.class}: #{e.message}"
- Bundler.ui.trace e
- raise
- rescue YamlLibrarySyntaxError => e
- raise YamlSyntaxError.new(e, "Your RubyGems configuration, which is " \
- "usually located in ~/.gemrc, contains invalid YAML syntax.")
- end
-
def ruby_engine
Gem.ruby_engine
end
@@ -139,14 +113,10 @@ module Bundler
end
def inflate(obj)
- require "rubygems/util"
-
Gem::Util.inflate(obj)
end
def correct_for_windows_path(path)
- require "rubygems/util"
-
if Gem::Util.respond_to?(:correct_for_windows_path)
Gem::Util.correct_for_windows_path(path)
elsif path[0].chr == "/" && path[1].chr =~ /[a-z]/i && path[2].chr == ":"
@@ -156,19 +126,6 @@ module Bundler
end
end
- def sources=(val)
- # Gem.configuration creates a new Gem::ConfigFile, which by default will read ~/.gemrc
- # If that file exists, its settings (including sources) will overwrite the values we
- # are about to set here. In order to avoid that, we force memoizing the config file now.
- configuration
-
- Gem.sources = val
- end
-
- def sources
- Gem.sources
- end
-
def gem_dir
Gem.dir
end
@@ -221,11 +178,6 @@ module Bundler
Gem.bin_path(gem, bin, ver)
end
- def preserve_paths
- # this is a no-op outside of RubyGems 1.8
- yield
- end
-
def loaded_gem_paths
loaded_gem_paths = Gem.loaded_specs.map {|_, s| s.full_require_paths }
loaded_gem_paths.flatten
@@ -239,6 +191,10 @@ module Bundler
Gem.load_plugin_files(files) if Gem.respond_to?(:load_plugin_files)
end
+ def load_env_plugins
+ Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
+ end
+
def ui=(obj)
Gem::DefaultUserInteraction.ui = obj
end
@@ -247,34 +203,9 @@ module Bundler
EXT_LOCK
end
- def with_build_args(args)
- ext_lock.synchronize do
- old_args = build_args
- begin
- self.build_args = args
- yield
- ensure
- self.build_args = old_args
- end
- end
- end
-
- def spec_from_gem(path, policy = nil)
- require "rubygems/security"
- require_relative "psyched_yaml"
- gem_from_path(path, security_policies[policy]).spec
- rescue Gem::Package::FormatError
- raise GemspecError, "Could not read gem at #{path}. It may be corrupted."
- rescue Exception, Gem::Exception, Gem::Security::Exception => e # rubocop:disable Lint/RescueException
- if e.is_a?(Gem::Security::Exception) ||
- e.message =~ /unknown trust policy|unsigned gem/i ||
- e.message =~ /couldn't verify (meta)?data signature/i
- raise SecurityError,
- "The gem #{File.basename(path, ".gem")} can't be installed because " \
- "the security policy didn't allow it, with the message: #{e.message}"
- else
- raise e
- end
+ def spec_from_gem(path)
+ require "rubygems/package"
+ Gem::Package.new(path).spec
end
def build_gem(gem_dir, spec)
@@ -296,10 +227,14 @@ module Bundler
def reverse_rubygems_kernel_mixin
# Disable rubygems' gem activation system
- kernel = (class << ::Kernel; self; end)
- [kernel, ::Kernel].each do |k|
- if k.private_method_defined?(:gem_original_require)
- redefine_method(k, :require, k.instance_method(:gem_original_require))
+ if Gem.respond_to?(:discover_gems_on_require=)
+ Gem.discover_gems_on_require = false
+ else
+ kernel = (class << ::Kernel; self; end)
+ [kernel, ::Kernel].each do |k|
+ if k.private_method_defined?(:gem_original_require)
+ redefine_method(k, :require, k.instance_method(:gem_original_require))
+ end
end
end
end
@@ -312,7 +247,7 @@ module Bundler
kernel = (class << ::Kernel; self; end)
[kernel, ::Kernel].each do |kernel_class|
redefine_method(kernel_class, :gem) do |dep, *reqs|
- if executables && executables.include?(File.basename(caller.first.split(":").first))
+ if executables&.include?(File.basename(caller.first.split(":").first))
break
end
@@ -327,8 +262,13 @@ module Bundler
end
message = if spec.nil?
+ target_file = begin
+ Bundler.default_gemfile.basename
+ rescue GemfileNotFound
+ "inline Gemfile"
+ end
"#{dep.name} is not part of the bundle." \
- " Add it to your #{Bundler.default_gemfile.basename}."
+ " Add it to your #{target_file}."
else
"can't activate #{dep}, already activated #{spec.full_name}. " \
"Make sure all dependencies are added to Gemfile."
@@ -336,15 +276,11 @@ module Bundler
e = Gem::LoadError.new(message)
e.name = dep.name
- if e.respond_to?(:requirement=)
- e.requirement = dep.requirement
- elsif e.respond_to?(:version_requirement=)
- e.version_requirement = dep.requirement
- end
+ e.requirement = dep.requirement
raise e
end
- # backwards compatibility shim, see https://github.com/bundler/bundler/issues/5102
+ # backwards compatibility shim, see https://github.com/rubygems/bundler/issues/5102
kernel_class.send(:public, :gem) if Bundler.feature_flag.setup_makes_kernel_gem_public?
end
end
@@ -420,6 +356,17 @@ module Bundler
# Replace or hook into RubyGems to provide a bundlerized view
# of the world.
def replace_entrypoints(specs)
+ specs_by_name = add_default_gems_to(specs)
+
+ replace_gem(specs, specs_by_name)
+ stub_rubygems(specs)
+ replace_bin_path(specs_by_name)
+
+ Gem.clear_paths
+ end
+
+ # Add default gems not already present in specs, and return them as a hash.
+ def add_default_gems_to(specs)
specs_by_name = specs.reduce({}) do |h, s|
h[s.name] = s
h
@@ -434,40 +381,7 @@ module Bundler
specs_by_name[default_spec_name] = default_spec
end
- replace_gem(specs, specs_by_name)
- stub_rubygems(specs)
- replace_bin_path(specs_by_name)
-
- Gem.clear_paths
- end
-
- # This backports base_dir which replaces installation path
- # RubyGems 1.8+
- def backport_base_dir
- redefine_method(Gem::Specification, :base_dir) do
- return Gem.dir unless loaded_from
- File.dirname File.dirname loaded_from
- end
- end
-
- def backport_cache_file
- redefine_method(Gem::Specification, :cache_dir) do
- @cache_dir ||= File.join base_dir, "cache"
- end
-
- redefine_method(Gem::Specification, :cache_file) do
- @cache_file ||= File.join cache_dir, "#{full_name}.gem"
- end
- end
-
- def backport_spec_file
- redefine_method(Gem::Specification, :spec_dir) do
- @spec_dir ||= File.join base_dir, "specifications"
- end
-
- redefine_method(Gem::Specification, :spec_file) do
- @spec_file ||= File.join spec_dir, "#{full_name}.gemspec"
- end
+ specs_by_name
end
def undo_replacements
@@ -534,14 +448,15 @@ module Bundler
end
def fetch_specs(remote, name)
+ require "rubygems/remote_fetcher"
path = remote.uri.to_s + "#{name}.#{Gem.marshal_version}.gz"
fetcher = gem_remote_fetcher
fetcher.headers = { "X-Gemfile-Source" => remote.original_uri.to_s } if remote.original_uri
string = fetcher.fetch_path(path)
- Bundler.load_marshal(string)
- rescue Gem::RemoteFetcher::FetchError => e
+ Bundler.safe_load_marshal(string)
+ rescue Gem::RemoteFetcher::FetchError
# it's okay for prerelease to fail
- raise e unless name == "prerelease_specs"
+ raise unless name == "prerelease_specs"
end
def fetch_all_remote_specs(remote)
@@ -551,27 +466,41 @@ module Bundler
specs.concat(pres)
end
- def download_gem(spec, uri, path)
+ def download_gem(spec, uri, cache_dir)
+ require "rubygems/remote_fetcher"
uri = Bundler.settings.mirror_for(uri)
fetcher = gem_remote_fetcher
fetcher.headers = { "X-Gemfile-Source" => spec.remote.original_uri.to_s } if spec.remote.original_uri
Bundler::Retry.new("download gem from #{uri}").attempts do
- fetcher.download(spec, uri, path)
+ gem_file_name = spec.file_name
+ local_gem_path = File.join cache_dir, gem_file_name
+ return if File.exist? local_gem_path
+
+ begin
+ remote_gem_path = uri + "gems/#{gem_file_name}"
+ remote_gem_path = remote_gem_path.to_s if provides?("< 3.2.0.rc.1")
+
+ SharedHelpers.filesystem_access(local_gem_path) do
+ fetcher.cache_update_path remote_gem_path, local_gem_path
+ end
+ rescue Gem::RemoteFetcher::FetchError
+ raise if spec.original_platform == spec.platform
+
+ original_gem_file_name = "#{spec.original_name}.gem"
+ raise if gem_file_name == original_gem_file_name
+
+ gem_file_name = original_gem_file_name
+ retry
+ end
end
+ rescue Gem::RemoteFetcher::FetchError => e
+ raise Bundler::HTTPError, "Could not download gem from #{uri} due to underlying error <#{e.message}>"
end
def gem_remote_fetcher
- require "resolv"
- proxy = configuration[:http_proxy]
- dns = Resolv::DNS.new
- Gem::RemoteFetcher.new(proxy, dns)
- end
-
- def gem_from_path(path, policy = nil)
- require "rubygems/package"
- p = Gem::Package.new(path)
- p.security_policy = policy if policy
- p
+ require "rubygems/remote_fetcher"
+ proxy = Gem.configuration[:http_proxy]
+ Gem::RemoteFetcher.new(proxy)
end
def build(spec, skip_validation = false)
@@ -579,20 +508,11 @@ module Bundler
Gem::Package.build(spec, skip_validation)
end
- def repository_subdirectories
- Gem::REPOSITORY_SUBDIRECTORIES
- end
-
- def install_with_build_args(args)
- yield
- end
-
def path_separator
Gem.path_separator
end
def all_specs
- require_relative "remote_specification"
Gem::Specification.stubs.map do |stub|
StubSpecification.from_stub(stub)
end
@@ -600,10 +520,10 @@ module Bundler
def backport_ext_builder_monitor
# So we can avoid requiring "rubygems/ext" in its entirety
- Gem.module_eval <<-RB, __FILE__, __LINE__ + 1
+ Gem.module_eval <<-RUBY, __FILE__, __LINE__ + 1
module Ext
end
- RB
+ RUBY
require "rubygems/ext/builder"
@@ -617,6 +537,10 @@ module Bundler
end
end
+ def find_bundler(version)
+ find_name("bundler").find {|s| s.version.to_s == version }
+ end
+
def find_name(name)
Gem::Specification.stubs_for(name).map(&:to_spec)
end
@@ -630,14 +554,6 @@ module Bundler
Gem::Specification.send(:default_stubs, "*.gemspec")
end
end
-
- def use_gemdeps(gemfile)
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path(gemfile)
- require_relative "gemdeps"
- runtime = Bundler.setup
- activated_spec_names = runtime.requested_specs.map(&:to_spec).sort_by(&:name)
- [Gemdeps.new(runtime), activated_spec_names]
- end
end
def self.rubygems
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 93a801eb6c..95cf78dd41 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -12,22 +12,16 @@ module Bundler
def setup(*groups)
@definition.ensure_equivalent_gemfile_and_lockfile if Bundler.frozen_bundle?
- groups.map!(&:to_sym)
-
# Has to happen first
clean_load_path
- specs = groups.any? ? @definition.specs_for(groups) : requested_specs
+ specs = @definition.specs_for(groups)
SharedHelpers.set_bundle_environment
Bundler.rubygems.replace_entrypoints(specs)
# Activate the specs
load_paths = specs.map do |spec|
- unless spec.loaded_from
- raise GemNotFound, "#{spec.full_name} is missing. Run `bundle install` to get it."
- end
-
check_for_activated_spec!(spec)
Bundler.rubygems.mark_loaded(spec)
@@ -43,14 +37,6 @@ module Bundler
self
end
- REQUIRE_ERRORS = [
- /^no such file to load -- (.+)$/i,
- /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
- /^Missing API definition file in (.+)$/i,
- /^cannot load such file -- (.+)$/i,
- /^dlopen\([^)]*\): Library not loaded: (.+)$/i,
- ].freeze
-
def require(*groups)
groups.map!(&:to_sym)
groups = [:default] if groups.empty?
@@ -79,16 +65,14 @@ module Bundler
end
end
rescue LoadError => e
- REQUIRE_ERRORS.find {|r| r =~ e.message }
- raise if dep.autorequire || $1 != required_file
+ raise if dep.autorequire || e.path != required_file
if dep.autorequire.nil? && dep.name.include?("-")
begin
namespaced_file = dep.name.tr("-", "/")
Kernel.require namespaced_file
rescue LoadError => e
- REQUIRE_ERRORS.find {|r| r =~ e.message }
- raise if $1 != namespaced_file
+ raise if e.path != namespaced_file
end
end
end
@@ -110,13 +94,13 @@ module Bundler
definition_method :requires
def lock(opts = {})
- return if @definition.nothing_changed? && !@definition.unlocking?
+ return if @definition.no_resolve_needed?
@definition.lock(Bundler.default_lockfile, opts[:preserve_unknown_sections])
end
alias_method :gems, :specs
- def cache(custom_path = nil)
+ def cache(custom_path = nil, local = false)
cache_path = Bundler.app_cache(custom_path)
SharedHelpers.filesystem_access(cache_path) do |p|
FileUtils.mkdir_p(p)
@@ -124,11 +108,23 @@ module Bundler
Bundler.ui.info "Updating files in #{Bundler.settings.app_cache_path}"
- specs_to_cache = Bundler.settings[:cache_all_platforms] ? @definition.resolve.materialized_for_all_platforms : specs
+ specs_to_cache = if Bundler.settings[:cache_all_platforms]
+ @definition.resolve.materialized_for_all_platforms
+ else
+ begin
+ specs
+ rescue GemNotFound
+ if local
+ Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
+ end
+
+ raise
+ end
+ end
+
specs_to_cache.each do |spec|
next if spec.name == "bundler"
next if spec.source.is_a?(Source::Gemspec)
- spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true)
spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
end
@@ -165,7 +161,7 @@ module Bundler
spec_cache_paths = []
spec_gemspec_paths = []
spec_extension_paths = []
- specs.each do |spec|
+ Bundler.rubygems.add_default_gems_to(specs).values.each do |spec|
spec_gem_paths << spec.full_gem_path
# need to check here in case gems are nested like for the rails git repo
md = %r{(.+bundler/gems/.+-[a-f0-9]{7,12})}.match(spec.full_gem_path)
@@ -213,7 +209,7 @@ module Bundler
output
end
- private
+ private
def prune_gem_cache(resolve, cache_path)
cached = Dir["#{cache_path}/*.gem"]
@@ -268,7 +264,7 @@ module Bundler
return if manuals.empty?
Bundler::SharedHelpers.set_env "MANPATH", manuals.concat(
- ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR)
+ ENV["MANPATH"] ? ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR) : [""]
).uniq.join(File::PATH_SEPARATOR)
end
@@ -294,7 +290,7 @@ module Bundler
return unless activated_spec = Bundler.rubygems.loaded_specs(spec.name)
return if activated_spec.version == spec.version
- suggestion = if Bundler.rubygems.spec_default_gem?(activated_spec)
+ suggestion = if activated_spec.default_gem?
"Since #{spec.name} is a default gem, you can either remove your dependency on it" \
" or try updating to a newer version of bundler that supports #{spec.name} as a default gem."
else
@@ -304,11 +300,7 @@ module Bundler
e = Gem::LoadError.new "You have already activated #{activated_spec.name} #{activated_spec.version}, " \
"but your Gemfile requires #{spec.name} #{spec.version}. #{suggestion}"
e.name = spec.name
- if e.respond_to?(:requirement=)
- e.requirement = Gem::Requirement.new(spec.version.to_s)
- else
- e.version_requirement = Gem::Requirement.new(spec.version.to_s)
- end
+ e.requirement = Gem::Requirement.new(spec.version.to_s)
raise e
end
end
diff --git a/lib/bundler/safe_marshal.rb b/lib/bundler/safe_marshal.rb
new file mode 100644
index 0000000000..50aa0f60a6
--- /dev/null
+++ b/lib/bundler/safe_marshal.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+module Bundler
+ module SafeMarshal
+ ALLOWED_CLASSES = [
+ Array,
+ FalseClass,
+ Gem::Specification,
+ Gem::Version,
+ Hash,
+ String,
+ Symbol,
+ Time,
+ TrueClass,
+ ].freeze
+
+ ERROR = "Unexpected class %s present in marshaled data. Only %s are allowed."
+
+ PROC = proc do |object|
+ object.tap do
+ unless ALLOWED_CLASSES.include?(object.class)
+ raise TypeError, format(ERROR, object.class, ALLOWED_CLASSES.join(", "))
+ end
+ end
+ end
+
+ def self.proc
+ PROC
+ end
+ end
+end
diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb
new file mode 100644
index 0000000000..827f3f9222
--- /dev/null
+++ b/lib/bundler/self_manager.rb
@@ -0,0 +1,168 @@
+# frozen_string_literal: true
+
+module Bundler
+ #
+ # This class handles installing and switching to the version of bundler needed
+ # by an application.
+ #
+ class SelfManager
+ def restart_with_locked_bundler_if_needed
+ return unless needs_switching? && installed?
+
+ restart_with(lockfile_version)
+ end
+
+ def install_locked_bundler_and_restart_with_it_if_needed
+ return unless needs_switching?
+
+ Bundler.ui.info \
+ "Bundler #{current_version} is running, but your lockfile was generated with #{lockfile_version}. " \
+ "Installing Bundler #{lockfile_version} and restarting using that version."
+
+ install_and_restart_with(lockfile_version)
+ end
+
+ def update_bundler_and_restart_with_it_if_needed(target)
+ return unless autoswitching_applies?
+
+ spec = resolve_update_version_from(target)
+ return unless spec
+
+ version = spec.version
+
+ Bundler.ui.info "Updating bundler to #{version}."
+
+ install(spec)
+
+ restart_with(version)
+ end
+
+ private
+
+ def install_and_restart_with(version)
+ requirement = Gem::Requirement.new(version)
+ spec = find_latest_matching_spec(requirement)
+
+ if spec.nil?
+ Bundler.ui.warn "Your lockfile is locked to a version of bundler (#{lockfile_version}) that doesn't exist at https://rubygems.org/. Going on using #{current_version}"
+ return
+ end
+
+ install(spec)
+ rescue StandardError => e
+ Bundler.ui.trace e
+ Bundler.ui.warn "There was an error installing the locked bundler version (#{lockfile_version}), rerun with the `--verbose` flag for more details. Going on using bundler #{current_version}."
+ else
+ restart_with(version)
+ end
+
+ def install(spec)
+ spec.source.install(spec)
+ end
+
+ def restart_with(version)
+ configured_gem_home = ENV["GEM_HOME"]
+ configured_gem_path = ENV["GEM_PATH"]
+
+ cmd = [$PROGRAM_NAME, *ARGV]
+ cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME)
+
+ Bundler.with_original_env do
+ Kernel.exec(
+ { "GEM_HOME" => configured_gem_home, "GEM_PATH" => configured_gem_path, "BUNDLER_VERSION" => version.to_s },
+ *cmd
+ )
+ end
+ end
+
+ def needs_switching?
+ autoswitching_applies? &&
+ released?(lockfile_version) &&
+ !running?(lockfile_version) &&
+ !updating?
+ end
+
+ def autoswitching_applies?
+ ENV["BUNDLER_VERSION"].nil? &&
+ Bundler.rubygems.supports_bundler_trampolining? &&
+ SharedHelpers.in_bundle? &&
+ lockfile_version
+ end
+
+ def resolve_update_version_from(target)
+ requirement = Gem::Requirement.new(target)
+ update_candidate = find_latest_matching_spec(requirement)
+
+ if update_candidate.nil?
+ raise InvalidOption, "The `bundle update --bundler` target version (#{target}) does not exist"
+ end
+
+ resolved_version = update_candidate.version
+ needs_update = requirement.specific? ? !running?(resolved_version) : running_older_than?(resolved_version)
+
+ return unless needs_update
+
+ update_candidate
+ end
+
+ def local_specs
+ @local_specs ||= Bundler::Source::Rubygems.new("allow_local" => true).specs.select {|spec| spec.name == "bundler" }
+ end
+
+ def remote_specs
+ @remote_specs ||= begin
+ source = Bundler::Source::Rubygems.new("remotes" => "https://rubygems.org")
+ source.remote!
+ source.add_dependency_names("bundler")
+ source.specs
+ end
+ end
+
+ def find_latest_matching_spec(requirement)
+ local_result = find_latest_matching_spec_from_collection(local_specs, requirement)
+ return local_result if local_result && requirement.specific?
+
+ remote_result = find_latest_matching_spec_from_collection(remote_specs, requirement)
+ return remote_result if local_result.nil?
+
+ [local_result, remote_result].max
+ end
+
+ def find_latest_matching_spec_from_collection(specs, requirement)
+ specs.sort.reverse_each.find {|spec| requirement.satisfied_by?(spec.version) }
+ end
+
+ def running?(version)
+ version == current_version
+ end
+
+ def running_older_than?(version)
+ current_version < version
+ end
+
+ def released?(version)
+ !version.to_s.end_with?(".dev")
+ end
+
+ def updating?
+ "update".start_with?(ARGV.first || " ") && ARGV[1..-1].any? {|a| a.start_with?("--bundler") }
+ end
+
+ def installed?
+ Bundler.configure
+
+ Bundler.rubygems.find_bundler(lockfile_version.to_s)
+ end
+
+ def current_version
+ @current_version ||= Gem::Version.new(Bundler::VERSION)
+ end
+
+ def lockfile_version
+ return @lockfile_version if defined?(@lockfile_version)
+
+ parsed_version = Bundler::LockfileParser.bundled_with
+ @lockfile_version = parsed_version ? Gem::Version.new(parsed_version) : nil
+ end
+ end
+end
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index afbb02397c..0af2236a45 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -7,35 +7,34 @@ module Bundler
autoload :Validator, File.expand_path("settings/validator", __dir__)
BOOL_KEYS = %w[
- allow_bundler_dependency_conflicts
allow_deployment_source_credential_changes
allow_offline_install
auto_clean_without_path
auto_install
- auto_config_jobs
cache_all
cache_all_platforms
+ clean
default_install_uses_path
deployment
- deployment_means_frozen
disable_checksum_validation
disable_exec_load
disable_local_branch_check
- disable_multisource
- disable_platform_warnings
+ disable_local_revision_check
disable_shared_gems
disable_version_check
force_ruby_platform
forget_cli_options
frozen
+ gem.changelog
gem.coc
gem.mit
+ git.allow_insecure
global_gem_cache
ignore_messages
init_gems_rb
+ inline
no_install
no_prune
- only_update_to_newer_versions
path_relative_to_cwd
path.system
plugins
@@ -44,12 +43,7 @@ module Bundler
setup_makes_kernel_gem_public
silence_deprecations
silence_root_warning
- skip_default_git_sources
- specific_platform
- suppress_install_using_messages
- unlock_source_unlocks_spec
update_requires_all_flag
- use_gem_version_promoter_for_major_updates
].freeze
NUMBER_KEYS = %w[
@@ -61,35 +55,47 @@ module Bundler
].freeze
ARRAY_KEYS = %w[
+ only
with
without
].freeze
+ STRING_KEYS = %w[
+ bin
+ cache_path
+ console
+ gem.ci
+ gem.github_username
+ gem.linter
+ gem.rubocop
+ gem.test
+ gemfile
+ path
+ shebang
+ system_bindir
+ trust-policy
+ ].freeze
+
DEFAULT_CONFIG = {
- :silence_deprecations => false,
- :disable_version_check => true,
- :prefer_patch => false,
- :redirect => 5,
- :retry => 3,
- :timeout => 10,
+ "BUNDLE_SILENCE_DEPRECATIONS" => false,
+ "BUNDLE_DISABLE_VERSION_CHECK" => true,
+ "BUNDLE_PREFER_PATCH" => false,
+ "BUNDLE_REDIRECT" => 5,
+ "BUNDLE_RETRY" => 3,
+ "BUNDLE_TIMEOUT" => 10,
}.freeze
def initialize(root = nil)
@root = root
@local_config = load_config(local_config_file)
+ @env_config = ENV.to_h.select {|key, _value| key =~ /\ABUNDLE_.+/ }
@global_config = load_config(global_config_file)
@temporary = {}
end
def [](name)
key = key_for(name)
- value = @temporary.fetch(key) do
- @local_config.fetch(key) do
- ENV.fetch(key) do
- @global_config.fetch(key) do
- DEFAULT_CONFIG.fetch(name) do
- nil
- end end end end end
+ value = configs.values.map {|config| config[key] }.compact.first
converted_value(value, name)
end
@@ -132,13 +138,11 @@ module Bundler
end
def all
- env_keys = ENV.keys.grep(/\ABUNDLE_.+/)
-
- keys = @temporary.keys | @global_config.keys | @local_config.keys | env_keys
+ keys = @temporary.keys | @global_config.keys | @local_config.keys | @env_config.keys
keys.map do |key|
- key.sub(/^BUNDLE_/, "").gsub(/__/, ".").downcase
- end
+ key.sub(/^BUNDLE_/, "").gsub(/___/, "-").gsub(/__/, ".").downcase
+ end.sort
end
def local_overrides
@@ -171,13 +175,11 @@ module Bundler
def locations(key)
key = key_for(key)
- locations = {}
- locations[:temporary] = @temporary[key] if @temporary.key?(key)
- locations[:local] = @local_config[key] if @local_config.key?(key)
- locations[:env] = ENV[key] if ENV[key]
- locations[:global] = @global_config[key] if @global_config.key?(key)
- locations[:default] = DEFAULT_CONFIG[key] if DEFAULT_CONFIG.key?(key)
- locations
+ configs.keys.inject({}) do |partial_locations, level|
+ value_on_level = configs[level][key]
+ partial_locations[level] = value_on_level unless value_on_level.nil?
+ partial_locations
+ end
end
def pretty_values_for(exposed_key)
@@ -185,39 +187,50 @@ module Bundler
locations = []
- if @temporary.key?(key)
- locations << "Set for the current command: #{converted_value(@temporary[key], exposed_key).inspect}"
+ if value = @temporary[key]
+ locations << "Set for the current command: #{printable_value(value, exposed_key).inspect}"
end
- if @local_config.key?(key)
- locations << "Set for your local app (#{local_config_file}): #{converted_value(@local_config[key], exposed_key).inspect}"
+ if value = @local_config[key]
+ locations << "Set for your local app (#{local_config_file}): #{printable_value(value, exposed_key).inspect}"
end
- if value = ENV[key]
- locations << "Set via #{key}: #{converted_value(value, exposed_key).inspect}"
+ if value = @env_config[key]
+ locations << "Set via #{key}: #{printable_value(value, exposed_key).inspect}"
end
- if @global_config.key?(key)
- locations << "Set for the current user (#{global_config_file}): #{converted_value(@global_config[key], exposed_key).inspect}"
+ if value = @global_config[key]
+ locations << "Set for the current user (#{global_config_file}): #{printable_value(value, exposed_key).inspect}"
end
return ["You have not configured a value for `#{exposed_key}`"] if locations.empty?
locations
end
+ def processor_count
+ require "etc"
+ Etc.nprocessors
+ rescue StandardError
+ 1
+ end
+
# for legacy reasons, in Bundler 2, we do not respect :disable_shared_gems
def path
- key = key_for(:path)
- path = ENV[key] || @global_config[key]
- if path && !@temporary.key?(key) && !@local_config.key?(key)
- return Path.new(path, false, false)
+ configs.each do |_level, settings|
+ path = value_for("path", settings)
+ path_system = value_for("path.system", settings)
+ disabled_shared_gems = value_for("disable_shared_gems", settings)
+ next if path.nil? && path_system.nil? && disabled_shared_gems.nil?
+ system_path = path_system || (disabled_shared_gems == false)
+ return Path.new(path, system_path)
end
- system_path = self["path.system"] || (self[:disable_shared_gems] == false)
- Path.new(self[:path], system_path, Bundler.feature_flag.default_install_uses_path?)
+ path = "vendor/bundle" if self[:deployment]
+
+ Path.new(path, false)
end
- Path = Struct.new(:explicit_path, :system_path, :default_install_uses_path) do
+ Path = Struct.new(:explicit_path, :system_path) do
def path
path = base_path
path = File.join(path, Bundler.ruby_scope) unless use_system_gems?
@@ -227,7 +240,7 @@ module Bundler
def use_system_gems?
return true if system_path
return false if explicit_path
- !default_install_uses_path
+ !Bundler.feature_flag.default_install_uses_path?
end
def base_path
@@ -264,12 +277,6 @@ module Bundler
end
end
- def allow_sudo?
- key = key_for(:path)
- path_configured = @temporary.key?(key) || @local_config.key?(key)
- !path_configured
- end
-
def ignore_config?
ENV["BUNDLE_IGNORE_CONFIG"]
end
@@ -280,20 +287,32 @@ module Bundler
def validate!
all.each do |raw_key|
- [@local_config, ENV, @global_config].each do |settings|
- value = converted_value(settings[key_for(raw_key)], raw_key)
- Validator.validate!(raw_key, value, settings.to_hash.dup)
+ [@local_config, @env_config, @global_config].each do |settings|
+ value = value_for(raw_key, settings)
+ Validator.validate!(raw_key, value, settings.dup)
end
end
end
def key_for(key)
- key = Settings.normalize_uri(key).to_s if key.is_a?(String) && /https?:/ =~ key
- key = key.to_s.gsub(".", "__").upcase
- "BUNDLE_#{key}"
+ self.class.key_for(key)
+ end
+
+ private
+
+ def configs
+ {
+ :temporary => @temporary,
+ :local => @local_config,
+ :env => @env_config,
+ :global => @global_config,
+ :default => DEFAULT_CONFIG,
+ }
end
- private
+ def value_for(name, config)
+ converted_value(config[key_for(name)], name)
+ end
def parent_setting_for(name)
split_specific_setting_for(name)[0]
@@ -311,6 +330,10 @@ module Bundler
BOOL_KEYS.include?(name.to_s) || BOOL_KEYS.include?(parent_setting_for(name.to_s))
end
+ def is_string(name)
+ STRING_KEYS.include?(name.to_s) || name.to_s.start_with?("local.") || name.to_s.start_with?("mirror.") || name.to_s.start_with?("build.")
+ end
+
def to_bool(value)
case value
when nil, /\A(false|f|no|n|0|)\z/i, false
@@ -328,9 +351,17 @@ module Bundler
ARRAY_KEYS.include?(key.to_s)
end
+ def is_credential(key)
+ key == "gem.push_key"
+ end
+
+ def is_userinfo(value)
+ value.include?(":")
+ end
+
def to_array(value)
return [] unless value
- value.split(":").map(&:to_sym)
+ value.tr(" ", ":").split(":").map(&:to_sym)
end
def array_to_s(array)
@@ -374,15 +405,38 @@ module Bundler
end
end
+ def printable_value(value, key)
+ converted = converted_value(value, key)
+ return converted unless converted.is_a?(String)
+
+ if is_string(key)
+ converted
+ elsif is_credential(key)
+ "[REDACTED]"
+ elsif is_userinfo(converted)
+ username, pass = converted.split(":", 2)
+
+ if pass == "x-oauth-basic"
+ username = "[REDACTED]"
+ else
+ pass = "[REDACTED]"
+ end
+
+ [username, pass].join(":")
+ else
+ converted
+ end
+ end
+
def global_config_file
if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
Pathname.new(ENV["BUNDLE_CONFIG"])
- else
- begin
- Bundler.user_bundle_path("config")
- rescue PermissionError, GenericSystemCallError
- nil
- end
+ elsif ENV["BUNDLE_USER_CONFIG"] && !ENV["BUNDLE_USER_CONFIG"].empty?
+ Pathname.new(ENV["BUNDLE_USER_CONFIG"])
+ elsif ENV["BUNDLE_USER_HOME"] && !ENV["BUNDLE_USER_HOME"].empty?
+ Pathname.new(ENV["BUNDLE_USER_HOME"]).join("config")
+ elsif Bundler.rubygems.user_home && !Bundler.rubygems.user_home.empty?
+ Pathname.new(Bundler.rubygems.user_home).join(".bundle/config")
end
end
@@ -396,7 +450,20 @@ module Bundler
valid_file = file.exist? && !file.size.zero?
return {} unless valid_file
require_relative "yaml_serializer"
- YAMLSerializer.load file.read
+ YAMLSerializer.load(file.read).inject({}) do |config, (k, v)|
+ new_k = k
+
+ if k.include?("-")
+ Bundler.ui.warn "Your #{file} config includes `#{k}`, which contains the dash character (`-`).\n" \
+ "This is deprecated, because configuration through `ENV` should be possible, but `ENV` keys cannot include dashes.\n" \
+ "Please edit #{file} and replace any dashes in configuration keys with a triple underscore (`___`)."
+
+ new_k = k.gsub("-", "___")
+ end
+
+ config[new_k] = v
+ config
+ end
end
end
@@ -413,6 +480,12 @@ module Bundler
\z
/ix.freeze
+ def self.key_for(key)
+ key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
+ key = key.to_s.gsub(".", "__").gsub("-", "___").upcase
+ "BUNDLE_#{key}"
+ end
+
# TODO: duplicates Rubygems#normalize_uri
# TODO: is this the correct place to validate mirror URIs?
def self.normalize_uri(uri)
@@ -422,7 +495,7 @@ module Bundler
uri = $2
suffix = $3
end
- uri = "#{uri}/" unless uri.end_with?("/")
+ uri = URINormalizer.normalize_suffix(uri)
require_relative "vendored_uri"
uri = Bundler::URI(uri)
unless uri.absolute?
diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb
index 27911dc1ad..801fd5312a 100644
--- a/lib/bundler/setup.rb
+++ b/lib/bundler/setup.rb
@@ -9,10 +9,13 @@ if Bundler::SharedHelpers.in_bundle?
begin
Bundler.ui.silence { Bundler.setup }
rescue Bundler::BundlerError => e
- Bundler.ui.warn "\e[31m#{e.message}\e[0m"
+ Bundler.ui.error e.message
Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
if e.is_a?(Bundler::GemNotFound)
- Bundler.ui.warn "\e[33mRun `bundle install` to install missing gems.\e[0m"
+ suggested_cmd = "bundle install"
+ original_gemfile = Bundler.original_env["BUNDLE_GEMFILE"]
+ suggested_cmd += " --gemfile #{original_gemfile}" if original_gemfile
+ Bundler.ui.warn "Run `#{suggested_cmd}` to install missing gems."
end
exit e.status_code
end
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 6e83bc5ff4..d1d4e1d07a 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -13,13 +13,13 @@ module Bundler
def root
gemfile = find_gemfile
raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
- Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
+ Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
end
def default_gemfile
gemfile = find_gemfile
raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
- Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
+ Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
end
def default_lockfile
@@ -28,7 +28,7 @@ module Bundler
case gemfile.basename.to_s
when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
else Pathname.new("#{gemfile}.lock")
- end.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+ end.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
end
def default_bundle_dir
@@ -100,7 +100,7 @@ module Bundler
#
# @see {Bundler::PermissionError}
def filesystem_access(path, action = :write, &block)
- yield(path.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" })
+ yield(path.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" })
rescue Errno::EACCES
raise PermissionError.new(path, action)
rescue Errno::EAGAIN
@@ -109,7 +109,7 @@ module Bundler
raise VirtualProtocolError.new
rescue Errno::ENOSPC
raise NoSpaceOnDeviceError.new(path, action)
- rescue *[const_get_safely(:ENOTSUP, Errno)].compact
+ rescue Errno::ENOTSUP
raise OperationNotSupportedError.new(path, action)
rescue Errno::EEXIST, Errno::ENOENT
raise
@@ -117,13 +117,6 @@ module Bundler
raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.")
end
- def const_get_safely(constant_name, namespace)
- const_in_namespace = namespace.constants.include?(constant_name.to_s) ||
- namespace.constants.include?(constant_name.to_sym)
- return nil unless const_in_namespace
- namespace.const_get(constant_name)
- end
-
def major_deprecation(major_version, message, print_caller_location: false)
if print_caller_location
caller_location = caller_locations(2, 2).first
@@ -148,17 +141,10 @@ module Bundler
end
return unless multiple_gemfiles
message = "Multiple gemfiles (gems.rb and Gemfile) detected. " \
- "Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.rb.locked."
+ "Make sure you remove Gemfile and Gemfile.lock since bundler is ignoring them in favor of gems.rb and gems.locked."
Bundler.ui.warn message
end
- def trap(signal, override = false, &block)
- prior = Signal.trap(signal) do
- block.call
- prior.call unless override
- end
- end
-
def ensure_same_dependencies(spec, old_deps, new_deps)
new_deps = new_deps.reject {|d| d.type == :development }
old_deps = old_deps.reject {|d| d.type == :development }
@@ -174,10 +160,10 @@ module Bundler
" (was expecting #{old_deps.map(&:to_s)}, but the real spec has #{new_deps.map(&:to_s)})"
raise APIResponseMismatchError,
"Downloading #{spec.full_name} revealed dependencies not in the API or the lockfile (#{extra_deps.join(", ")})." \
- "\nEither installing with `--full-index` or running `bundle update #{spec.name}` should fix the problem."
+ "\nRunning `bundle update #{spec.name}` should fix the problem."
end
- def pretty_dependency(dep, print_source = false)
+ def pretty_dependency(dep)
msg = String.new(dep.name)
msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default
@@ -186,7 +172,6 @@ module Bundler
msg << " " << platform_string if !platform_string.empty? && platform_string != Gem::Platform::RUBY
end
- msg << " from the `#{dep.source}` source" if print_source && dep.source
msg
end
@@ -194,11 +179,11 @@ module Bundler
return @md5_available if defined?(@md5_available)
@md5_available = begin
require "openssl"
- OpenSSL::Digest::MD5.digest("")
+ ::OpenSSL::Digest.digest("MD5", "")
true
rescue LoadError
true
- rescue OpenSSL::Digest::DigestError
+ rescue ::OpenSSL::Digest::DigestError
false
end
end
@@ -212,7 +197,7 @@ module Bundler
filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } }
end
- private
+ private
def validate_bundle_path
path_separator = Bundler.rubygems.path_separator
@@ -250,10 +235,10 @@ module Bundler
def search_up(*names)
previous = nil
- current = File.expand_path(SharedHelpers.pwd).tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+ current = File.expand_path(SharedHelpers.pwd).tap {|x| x.untaint if RUBY_VERSION < "2.7" }
until !File.directory?(current) || current == previous
- if ENV["BUNDLE_SPEC_RUN"]
+ if ENV["BUNDLER_SPEC_RUN"]
# avoid stepping above the tmp directory when testing
gemspec = if ENV["GEM_COMMAND"]
# for Ruby Core
@@ -288,10 +273,10 @@ module Bundler
def set_bundle_variables
# bundler exe & lib folders have same root folder, typical gem installation
- exe_file = File.expand_path("../../../exe/bundle", __FILE__)
+ exe_file = File.expand_path("../../exe/bundle", __dir__)
# for Ruby core repository testing
- exe_file = File.expand_path("../../../libexec/bundle", __FILE__) unless File.exist?(exe_file)
+ exe_file = File.expand_path("../../libexec/bundle", __dir__) unless File.exist?(exe_file)
# bundler is a default gem, exe path is separate
exe_file = Bundler.rubygems.bin_path("bundler", "bundle", VERSION) unless File.exist?(exe_file)
@@ -299,6 +284,7 @@ module Bundler
Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", find_gemfile.to_s
Bundler::SharedHelpers.set_env "BUNDLER_VERSION", Bundler::VERSION
+ Bundler::SharedHelpers.set_env "BUNDLER_SETUP", File.expand_path("setup", __dir__) unless RUBY_VERSION < "2.7"
end
def set_path
@@ -323,16 +309,15 @@ module Bundler
end
def bundler_ruby_lib
- resolve_path File.expand_path("../..", __FILE__)
+ File.expand_path("..", __dir__)
end
def clean_load_path
- bundler_lib = bundler_ruby_lib
-
loaded_gem_paths = Bundler.rubygems.loaded_gem_paths
$LOAD_PATH.reject! do |p|
- next if resolve_path(p).start_with?(bundler_lib)
+ resolved_path = resolve_path(p)
+ next if $LOADED_FEATURES.any? {|lf| lf.start_with?(resolved_path) }
loaded_gem_paths.delete(p)
end
$LOAD_PATH.uniq!
@@ -340,7 +325,7 @@ module Bundler
def resolve_path(path)
expanded = File.expand_path(path)
- return expanded unless File.respond_to?(:realpath) && File.exist?(expanded)
+ return expanded unless File.exist?(expanded)
File.realpath(expanded)
end
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb
index bd9971f884..50e66b9cab 100644
--- a/lib/bundler/similarity_detector.rb
+++ b/lib/bundler/similarity_detector.rb
@@ -26,7 +26,7 @@ module Bundler
end
end
- protected
+ protected
# https://www.informit.com/articles/article.aspx?p=683059&seqNum=36
def levenshtein_distance(this, that, ins = 2, del = 2, sub = 1)
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 4b2e305bda..f7f5ea7865 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -7,6 +7,7 @@ module Bundler
autoload :Metadata, File.expand_path("source/metadata", __dir__)
autoload :Path, File.expand_path("source/path", __dir__)
autoload :Rubygems, File.expand_path("source/rubygems", __dir__)
+ autoload :RubygemsAggregate, File.expand_path("source/rubygems_aggregate", __dir__)
attr_accessor :dependency_names
@@ -14,13 +15,12 @@ module Bundler
specs.unmet_dependency_names
end
- def version_message(spec)
+ def version_message(spec, locked_spec = nil)
message = "#{spec.name} #{spec.version}"
message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?
- if Bundler.locked_gems
- locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
- locked_spec_version = locked_spec.version if locked_spec
+ if locked_spec
+ locked_spec_version = locked_spec.version
if locked_spec_version && spec.version != locked_spec_version
message += Bundler.ui.add_color(" (was #{locked_spec_version})", version_color(spec.version, locked_spec_version))
end
@@ -33,6 +33,18 @@ module Bundler
spec.source == self
end
+ def local!; end
+
+ def local_only!; end
+
+ def cached!; end
+
+ def remote!; end
+
+ def add_dependency_names(names)
+ @dependency_names = Array(dependency_names) | Array(names)
+ end
+
# it's possible that gems from one source depend on gems from some
# other source, so now we download gemspecs and iterate over those
# dependencies, looking for gems we don't have info on yet.
@@ -42,6 +54,10 @@ module Bundler
specs.dependency_names
end
+ def spec_names
+ specs.spec_names
+ end
+
def include?(other)
other == self
end
@@ -50,6 +66,10 @@ module Bundler
"#<#{self.class}:0x#{object_id} #{self}>"
end
+ def identifier
+ to_s
+ end
+
def path?
instance_of?(Bundler::Source::Path)
end
@@ -63,7 +83,7 @@ module Bundler
)
end
- private
+ private
def version_color(spec_version, locked_spec_version)
if Gem::Version.correct?(spec_version) && Gem::Version.correct?(locked_spec_version)
@@ -80,7 +100,7 @@ module Bundler
end
def print_using_message(message)
- if !message.include?("(was ") && Bundler.feature_flag.suppress_install_using_messages?
+ if !message.include?("(was ")
Bundler.ui.debug message
else
Bundler.ui.info message
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 7c1533ad90..adbce5fce4 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -19,10 +19,10 @@ module Bundler
# Stringify options that could be set as symbols
%w[ref branch tag revision].each {|k| options[k] = options[k].to_s if options[k] }
- @uri = options["uri"] || ""
+ @uri = URINormalizer.normalize_suffix(options["uri"] || "", :trailing_slash => false)
@safe_uri = URICredentialsFilter.credential_filtered_uri(@uri)
@branch = options["branch"]
- @ref = options["ref"] || options["branch"] || options["tag"] || "master"
+ @ref = options["ref"] || options["branch"] || options["tag"]
@submodules = options["submodules"]
@name = options["name"]
@version = options["version"].to_s.strip.gsub("-", ".pre.")
@@ -42,10 +42,18 @@ module Bundler
%w[ref branch tag submodules].each do |opt|
out << " #{opt}: #{options[opt]}\n" if options[opt]
end
- out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB
+ out << " glob: #{@glob}\n" unless default_glob?
out << " specs:\n"
end
+ def to_gemfile
+ specifiers = %w[ref branch tag submodules glob].map do |opt|
+ "#{opt}: #{options[opt]}" if options[opt]
+ end
+
+ uri_with_specifiers(specifiers)
+ end
+
def hash
[self.class, uri, ref, branch, name, version, glob, submodules].hash
end
@@ -59,26 +67,40 @@ module Bundler
alias_method :==, :eql?
+ def include?(other)
+ other.is_a?(Git) && uri == other.uri &&
+ name == other.name &&
+ glob == other.glob &&
+ submodules == other.submodules
+ end
+
def to_s
- at = if local?
- path
- elsif user_ref = options["ref"]
- if ref =~ /\A[a-z0-9]{4,}\z/i
- shortref_for_display(user_ref)
- else
- user_ref
- end
- else
- ref
+ begin
+ at = humanized_ref || current_branch
+
+ rev = "at #{at}@#{shortref_for_display(revision)}"
+ rescue GitError
+ ""
end
- rev = begin
- "@#{shortref_for_display(revision)}"
- rescue GitError
- nil
- end
+ uri_with_specifiers([rev, glob_for_display])
+ end
- "#{@safe_uri} (at #{at}#{rev})"
+ def identifier
+ uri_with_specifiers([humanized_ref, cached_revision, glob_for_display])
+ end
+
+ def uri_with_specifiers(specifiers)
+ specifiers.compact!
+
+ suffix =
+ if specifiers.any?
+ " (#{specifiers.join(", ")})"
+ else
+ ""
+ end
+
+ "#{@safe_uri}#{suffix}"
end
def name
@@ -92,13 +114,7 @@ module Bundler
@install_path ||= begin
git_scope = "#{base_name}-#{shortref_for_path(revision)}"
- path = Bundler.install_path.join(git_scope)
-
- if !path.exist? && Bundler.requires_sudo?
- Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope)
- else
- path
- end
+ Bundler.install_path.join(git_scope)
end
end
@@ -122,7 +138,7 @@ module Bundler
path = Pathname.new(path)
path = path.expand_path(Bundler.root) unless path.relative?
- unless options["branch"] || Bundler.settings[:disable_local_branch_check]
+ unless branch || Bundler.settings[:disable_local_branch_check]
raise GitError, "Cannot use local override for #{name} at #{path} because " \
":branch is not specified in Gemfile. Specify a branch or run " \
"`bundle config unset local.#{override_for(original_path)}` to remove the local override"
@@ -137,16 +153,16 @@ module Bundler
# Create a new git proxy without the cached revision
# so the Gemfile.lock always picks up the new revision.
- @git_proxy = GitProxy.new(path, uri, ref)
+ @git_proxy = GitProxy.new(path, uri, options)
- if git_proxy.branch != options["branch"] && !Bundler.settings[:disable_local_branch_check]
+ if current_branch != branch && !Bundler.settings[:disable_local_branch_check]
raise GitError, "Local override for #{name} at #{path} is using branch " \
- "#{git_proxy.branch} but Gemfile specifies #{options["branch"]}"
+ "#{current_branch} but Gemfile specifies #{branch}"
end
- changed = cached_revision && cached_revision != git_proxy.revision
+ changed = cached_revision && cached_revision != revision
- if changed && !@unlocked && !git_proxy.contains?(cached_revision)
+ if !Bundler.settings[:disable_local_revision_check] && changed && !@unlocked && !git_proxy.contains?(cached_revision)
raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(cached_revision)} " \
"but the current branch in your local override for #{name} does not contain such commit. " \
"Please make sure your branch is up to date."
@@ -169,9 +185,10 @@ module Bundler
end
def install(spec, options = {})
+ return if Bundler.settings[:no_install]
force = options[:force]
- print_using_message "Using #{version_message(spec)} from #{self}"
+ print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}"
if (requires_checkout? && !@copied) || force
Bundler.ui.debug " * Checking out revision: #{ref}"
@@ -209,13 +226,11 @@ module Bundler
# across different projects, this cache will be shared.
# When using local git repos, this is set to the local repo.
def cache_path
- @cache_path ||= begin
- if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache?
- Bundler.user_cache
- else
- Bundler.bundle_path.join("cache", "bundler")
- end.join("git", git_scope)
- end
+ @cache_path ||= if Bundler.feature_flag.global_gem_cache?
+ Bundler.user_cache
+ else
+ Bundler.bundle_path.join("cache", "bundler")
+ end.join("git", git_scope)
end
def app_cache_dirname
@@ -226,11 +241,33 @@ module Bundler
git_proxy.revision
end
+ def current_branch
+ git_proxy.current_branch
+ end
+
def allow_git_ops?
@allow_remote || @allow_cached
end
- private
+ def local?
+ @local
+ end
+
+ private
+
+ def humanized_ref
+ if local?
+ path
+ elsif user_ref = options["ref"]
+ if /\A[a-z0-9]{4,}\z/i.match?(ref)
+ shortref_for_display(user_ref)
+ else
+ user_ref
+ end
+ elsif ref
+ ref
+ end
+ end
def serialize_gemspecs_in(destination)
destination = destination.expand_path(Bundler.root) if destination.relative?
@@ -256,10 +293,6 @@ module Bundler
cached_revision && super
end
- def local?
- @local
- end
-
def requires_checkout?
allow_git_ops? && !local? && !cached_revision_checked_out?
end
@@ -280,8 +313,16 @@ module Bundler
ref[0..11]
end
+ def glob_for_display
+ default_glob? ? nil : "glob: #{@glob}"
+ end
+
+ def default_glob?
+ @glob == DEFAULT_GLOB
+ end
+
def uri_hash
- if uri =~ %r{^\w+://(\w+@)?}
+ if %r{^\w+://(\w+@)?}.match?(uri)
# Downcase the domain component of the URI
# and strip off a trailing slash, if one is present
input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
@@ -289,7 +330,9 @@ module Bundler
# If there is no URI scheme, assume it is an ssh/git URI
input = uri
end
- SharedHelpers.digest(:SHA1).hexdigest(input)
+ # We use SHA1 here for historical reason and to preserve backward compatibility.
+ # But a transition to a simpler mangling algorithm would be welcome.
+ Bundler::Digest.sha1(input)
end
def cached_revision
@@ -301,7 +344,7 @@ module Bundler
end
def git_proxy
- @git_proxy ||= GitProxy.new(cache_path, uri, ref, cached_revision, self)
+ @git_proxy ||= GitProxy.new(cache_path, uri, options, cached_revision, self)
end
def fetch
@@ -316,7 +359,7 @@ module Bundler
def load_gemspec(file)
stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
- stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+ stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
StubSpecification.from_stub(stub)
end
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 7612eb16c6..fdb738e52e 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require "shellwords"
-
module Bundler
class Source
class Git
@@ -17,8 +15,8 @@ module Bundler
class GitNotAllowedError < GitError
def initialize(command)
msg = String.new
- msg << "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "
- msg << "this error message could probably be more useful. Please submit a ticket at https://github.com/bundler/bundler/issues "
+ msg << "Bundler is trying to run `#{command}` at runtime. You probably need to run `bundle install`. However, "
+ msg << "this error message could probably be more useful. Please submit a ticket at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md "
msg << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
super msg
end
@@ -27,21 +25,21 @@ module Bundler
class GitCommandError < GitError
attr_reader :command
- def initialize(command, path = nil, extra_info = nil)
+ def initialize(command, path, extra_info = nil)
@command = command
- msg = String.new
- msg << "Git error: command `git #{command}` in directory #{SharedHelpers.pwd} has failed."
+ msg = String.new("Git error: command `#{command}`")
+ msg << " in directory #{path}" if path
+ msg << " has failed."
msg << "\n#{extra_info}" if extra_info
- msg << "\nIf this error persists you could try removing the cache directory '#{path}'" if path && path.exist?
super msg
end
end
class MissingGitRevisionError < GitCommandError
- def initialize(command, path, ref, repo)
+ def initialize(command, destination_path, ref, repo)
msg = "Revision #{ref} does not exist in the repository #{repo}. Maybe you misspelled it?"
- super command, path, msg
+ super command, destination_path, msg
end
end
@@ -49,72 +47,59 @@ module Bundler
# All actions required by the Git source is encapsulated in this
# object.
class GitProxy
- attr_accessor :path, :uri, :ref
+ attr_accessor :path, :uri, :branch, :tag, :ref, :explicit_ref
attr_writer :revision
- def initialize(path, uri, ref, revision = nil, git = nil)
+ def initialize(path, uri, options = {}, revision = nil, git = nil)
@path = path
@uri = uri
- @ref = ref
+ @branch = options["branch"]
+ @tag = options["tag"]
+ @ref = options["ref"]
+ @explicit_ref = branch || tag || ref
@revision = revision
@git = git
- raise GitNotInstalledError.new if allow? && !Bundler.git_present?
+ @commit_ref = nil
end
def revision
- return @revision if @revision
-
- begin
- @revision ||= find_local_revision
- rescue GitCommandError => e
- raise MissingGitRevisionError.new(e.command, path, ref, URICredentialsFilter.credential_filtered_uri(uri))
- end
-
- @revision
+ @revision ||= allowed_with_path { find_local_revision }
end
- def branch
- @branch ||= allowed_in_path do
- git("rev-parse --abbrev-ref HEAD").strip
+ def current_branch
+ @current_branch ||= with_path do
+ git_local("rev-parse", "--abbrev-ref", "HEAD", :dir => path).strip
end
end
def contains?(commit)
- allowed_in_path do
- result, status = git_null("branch --contains #{commit}")
+ allowed_with_path do
+ result, status = git_null("branch", "--contains", commit, :dir => path)
status.success? && result =~ /^\* (.*)$/
end
end
def version
- git("--version").match(/(git version\s*)?((\.?\d+)+).*/)[2]
+ @version ||= full_version.match(/((\.?\d+)+).*/)[1]
end
def full_version
- git("--version").sub("git version", "").strip
+ @full_version ||= git_local("--version").sub(/git version\s*/, "").strip
end
def checkout
- return if path.exist? && has_revision_cached?
- extra_ref = "#{Shellwords.shellescape(ref)}:#{Shellwords.shellescape(ref)}" if ref && ref.start_with?("refs/")
+ return if has_revision_cached?
- Bundler.ui.info "Fetching #{URICredentialsFilter.credential_filtered_uri(uri)}"
+ Bundler.ui.info "Fetching #{credential_filtered_uri}"
- unless path.exist?
- SharedHelpers.filesystem_access(path.dirname) do |p|
- FileUtils.mkdir_p(p)
- end
- git_retry %(clone #{uri_escaped_with_configured_credentials} "#{path}" --bare --no-hardlinks --quiet)
- return unless extra_ref
- end
+ extra_fetch_needed = clone_needs_extra_fetch?
+ unshallow_needed = clone_needs_unshallow?
+ return unless extra_fetch_needed || unshallow_needed
- in_path do
- git_retry %(fetch --force --quiet --tags #{uri_escaped_with_configured_credentials} "refs/heads/*:refs/heads/*" #{extra_ref})
- end
+ git_remote_fetch(unshallow_needed ? ["--unshallow"] : depth_args)
end
def copy_to(destination, submodules = false)
- # method 1
unless File.exist?(destination.join(".git"))
begin
SharedHelpers.filesystem_access(destination.dirname) do |p|
@@ -123,135 +108,322 @@ module Bundler
SharedHelpers.filesystem_access(destination) do |p|
FileUtils.rm_rf(p)
end
- git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}")
+ git "clone", "--no-checkout", "--quiet", path.to_s, destination.to_s
File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination)
rescue Errno::EEXIST => e
- file_path = e.message[%r{.*?(/.*)}, 1]
+ file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1]
raise GitError, "Bundler could not install a gem because it needs to " \
"create a directory, but a file exists - #{file_path}. Please delete " \
"this file and try again."
end
end
- # method 2
- SharedHelpers.chdir(destination) do
- git_retry %(fetch --force --quiet --tags "#{path}")
- begin
- git "reset --hard #{@revision}"
- rescue GitCommandError => e
- raise MissingGitRevisionError.new(e.command, path, @revision, URICredentialsFilter.credential_filtered_uri(uri))
+ git "fetch", "--force", "--quiet", *extra_fetch_args, :dir => destination if @commit_ref
+
+ git "reset", "--hard", @revision, :dir => destination
+
+ if submodules
+ git_retry "submodule", "update", "--init", "--recursive", :dir => destination
+ elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
+ inner_command = "git -C $toplevel submodule deinit --force $sm_path"
+ git_retry "submodule", "foreach", "--quiet", inner_command, :dir => destination
+ end
+ end
+
+ private
+
+ def git_remote_fetch(args)
+ command = ["fetch", "--force", "--quiet", "--no-tags", *args, "--", configured_uri, refspec].compact
+ command_with_no_credentials = check_allowed(command)
+
+ Bundler::Retry.new("`#{command_with_no_credentials}` at #{path}", [MissingGitRevisionError]).attempts do
+ out, err, status = capture(command, path)
+ return out if status.success?
+
+ if err.include?("couldn't find remote ref") || err.include?("not our ref")
+ raise MissingGitRevisionError.new(command_with_no_credentials, path, commit || explicit_ref, credential_filtered_uri)
+ else
+ raise GitCommandError.new(command_with_no_credentials, path, err)
end
+ end
+ end
+
+ def clone_needs_extra_fetch?
+ return true if path.exist?
- if submodules
- git_retry "submodule update --init --recursive"
- elsif Gem::Version.create(version) >= Gem::Version.create("2.9.0")
- git_retry "submodule deinit --all --force"
+ SharedHelpers.filesystem_access(path.dirname) do |p|
+ FileUtils.mkdir_p(p)
+ end
+
+ command = ["clone", "--bare", "--no-hardlinks", "--quiet", *extra_clone_args, "--", configured_uri, path.to_s]
+ command_with_no_credentials = check_allowed(command)
+
+ Bundler::Retry.new("`#{command_with_no_credentials}`", [MissingGitRevisionError]).attempts do
+ _, err, status = capture(command, nil)
+ return extra_ref if status.success?
+
+ if err.include?("Could not find remote branch") || # git up to 2.49
+ err.include?("Remote branch #{branch_option} not found") # git 2.49 or higher
+ raise MissingGitRevisionError.new(command_with_no_credentials, nil, explicit_ref, credential_filtered_uri)
+ else
+ raise GitCommandError.new(command_with_no_credentials, path, err)
end
end
end
- private
+ def clone_needs_unshallow?
+ return false unless path.join("shallow").exist?
+ return true if full_clone?
- def git_null(command)
- command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command, uri)
- raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
+ @revision && @revision != head_revision
+ end
- out, status = SharedHelpers.with_clean_git_env do
- capture_and_ignore_stderr("git #{command}")
+ def extra_ref
+ return false if not_pinned?
+ return true unless full_clone?
+
+ ref.start_with?("refs/")
+ end
+
+ def depth
+ return @depth if defined?(@depth)
+
+ @depth = if !supports_fetching_unreachable_refs?
+ nil
+ elsif not_pinned? || pinned_to_full_sha?
+ 1
+ elsif ref.include?("~")
+ parsed_depth = ref.split("~").last
+ parsed_depth.to_i + 1
+ end
+ end
+
+ def refspec
+ if commit
+ @commit_ref = "refs/#{commit}-sha"
+ return "#{commit}:#{@commit_ref}"
end
- [URICredentialsFilter.credential_filtered_string(out, uri), status]
+ reference = fully_qualified_ref
+
+ reference ||= if ref.include?("~")
+ ref.split("~").first
+ elsif ref.start_with?("refs/")
+ ref
+ else
+ "refs/*"
+ end
+
+ "#{reference}:#{reference}"
+ end
+
+ def commit
+ @commit ||= pinned_to_full_sha? ? ref : @revision
end
- def git_retry(command)
- Bundler::Retry.new("`git #{URICredentialsFilter.credential_filtered_string(command, uri)}`", GitNotAllowedError).attempts do
- git(command)
+ def fully_qualified_ref
+ if branch
+ "refs/heads/#{branch}"
+ elsif tag
+ "refs/tags/#{tag}"
+ elsif ref.nil?
+ "refs/heads/#{current_branch}"
end
end
- def git(command, check_errors = true, error_msg = nil)
- command_with_no_credentials = URICredentialsFilter.credential_filtered_string(command, uri)
- raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
+ def not_pinned?
+ branch_option || ref.nil?
+ end
+
+ def pinned_to_full_sha?
+ ref =~ /\A\h{40}\z/
+ end
+
+ def git_null(*command, dir: nil)
+ check_allowed(command)
+
+ capture(command, dir, :ignore_err => true)
+ end
+
+ def git_retry(*command, dir: nil)
+ command_with_no_credentials = check_allowed(command)
+
+ Bundler::Retry.new("`#{command_with_no_credentials}` at #{dir || SharedHelpers.pwd}").attempts do
+ git(*command, :dir => dir)
+ end
+ end
- out, status = SharedHelpers.with_clean_git_env do
- capture_and_filter_stderr(uri, "git #{command}")
+ def git(*command, dir: nil)
+ run_command(*command, :dir => dir) do |unredacted_command|
+ check_allowed(unredacted_command)
end
+ end
- stdout_with_no_credentials = URICredentialsFilter.credential_filtered_string(out, uri)
- raise GitCommandError.new(command_with_no_credentials, path, error_msg) if check_errors && !status.success?
- stdout_with_no_credentials
+ def git_local(*command, dir: nil)
+ run_command(*command, :dir => dir) do |unredacted_command|
+ redact_and_check_presence(unredacted_command)
+ end
end
def has_revision_cached?
- return unless @revision
- in_path { git("cat-file -e #{@revision}") }
+ return unless @revision && path.exist?
+ git("cat-file", "-e", @revision, :dir => path)
true
rescue GitError
false
end
- def remove_cache
- FileUtils.rm_rf(path)
+ def find_local_revision
+ return head_revision if explicit_ref.nil?
+
+ find_revision_for(explicit_ref)
end
- def find_local_revision
- allowed_in_path do
- git("rev-parse --verify #{Shellwords.shellescape(ref)}", true).strip
- end
+ def head_revision
+ verify("HEAD")
end
- # Escape the URI for git commands
- def uri_escaped_with_configured_credentials
- remote = configured_uri_for(uri)
- if Bundler::WINDOWS
- # Windows quoting requires double quotes only, with double quotes
- # inside the string escaped by being doubled.
- '"' + remote.gsub('"') { '""' } + '"'
- else
- # Bash requires single quoted strings, with the single quotes escaped
- # by ending the string, escaping the quote, and restarting the string.
- "'" + remote.gsub("'") { "'\\''" } + "'"
- end
+ def find_revision_for(reference)
+ verify(reference)
+ rescue GitCommandError => e
+ raise MissingGitRevisionError.new(e.command, path, reference, credential_filtered_uri)
end
- # Adds credentials to the URI as Fetcher#configured_uri_for does
- def configured_uri_for(uri)
- if /https?:/ =~ uri
+ def verify(reference)
+ git("rev-parse", "--verify", reference, :dir => path).strip
+ end
+
+ # Adds credentials to the URI
+ def configured_uri
+ if /https?:/.match?(uri)
remote = Bundler::URI(uri)
config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
remote.userinfo ||= config_auth
remote.to_s
+ elsif File.exist?(uri)
+ "file://#{uri}"
else
- uri
+ uri.to_s
end
end
+ # Removes credentials from the URI
+ def credential_filtered_uri
+ URICredentialsFilter.credential_filtered_uri(uri)
+ end
+
def allow?
- @git ? @git.allow_git_ops? : true
+ allowed = @git ? @git.allow_git_ops? : true
+
+ raise GitNotInstalledError.new if allowed && !Bundler.git_present?
+
+ allowed
end
- def in_path(&blk)
+ def with_path(&blk)
checkout unless path.exist?
- _ = URICredentialsFilter # load it before we chdir
- SharedHelpers.chdir(path, &blk)
+ blk.call
end
- def allowed_in_path
- return in_path { yield } if allow?
+ def allowed_with_path
+ return with_path { yield } if allow?
raise GitError, "The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application"
end
- def capture_and_filter_stderr(uri, cmd)
- require "open3"
- return_value, captured_err, status = Open3.capture3(cmd)
- Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) if uri && !captured_err.empty?
- [return_value, status]
+ def check_allowed(command)
+ command_with_no_credentials = redact_and_check_presence(command)
+ raise GitNotAllowedError.new(command_with_no_credentials) unless allow?
+ command_with_no_credentials
+ end
+
+ def redact_and_check_presence(command)
+ raise GitNotInstalledError.new unless Bundler.git_present?
+
+ require "shellwords"
+ URICredentialsFilter.credential_filtered_string("git #{command.shelljoin}", uri)
+ end
+
+ def run_command(*command, dir: nil)
+ command_with_no_credentials = yield(command)
+
+ out, err, status = capture(command, dir)
+
+ raise GitCommandError.new(command_with_no_credentials, dir || SharedHelpers.pwd, err) unless status.success?
+
+ Bundler.ui.warn err unless err.empty?
+
+ out
+ end
+
+ def capture(cmd, dir, ignore_err: false)
+ SharedHelpers.with_clean_git_env do
+ require "open3"
+ out, err, status = Open3.capture3(*capture3_args_for(cmd, dir))
+
+ filtered_out = URICredentialsFilter.credential_filtered_string(out, uri)
+ return [filtered_out, status] if ignore_err
+
+ filtered_err = URICredentialsFilter.credential_filtered_string(err, uri)
+ [filtered_out, filtered_err, status]
+ end
+ end
+
+ def capture3_args_for(cmd, dir)
+ return ["git", *cmd] unless dir
+
+ if Bundler.feature_flag.bundler_3_mode? || supports_minus_c?
+ ["git", "-C", dir.to_s, *cmd]
+ else
+ ["git", *cmd, { :chdir => dir.to_s }]
+ end
+ end
+
+ def extra_clone_args
+ args = depth_args
+ return [] if args.empty?
+
+ args += ["--single-branch"]
+ args.unshift("--no-tags") if supports_cloning_with_no_tags?
+
+ # If there's a locked revision, no need to clone any specific branch
+ # or tag, since we will end up checking out that locked revision
+ # anyways.
+ return args if @revision
+
+ args += ["--branch", branch_option] if branch_option
+ args
+ end
+
+ def depth_args
+ return [] if full_clone?
+
+ ["--depth", depth.to_s]
+ end
+
+ def extra_fetch_args
+ extra_args = [path.to_s, *depth_args]
+ extra_args.push(@commit_ref)
+ extra_args
+ end
+
+ def branch_option
+ branch || tag
+ end
+
+ def full_clone?
+ depth.nil?
+ end
+
+ def supports_minus_c?
+ @supports_minus_c ||= Gem::Version.new(version) >= Gem::Version.new("1.8.5")
+ end
+
+ def supports_fetching_unreachable_refs?
+ @supports_fetching_unreachable_refs ||= Gem::Version.new(version) >= Gem::Version.new("2.5.0")
end
- def capture_and_ignore_stderr(cmd)
- require "open3"
- return_value, _, status = Open3.capture3(cmd)
- [return_value, status]
+ def supports_cloning_with_no_tags?
+ @supports_cloning_with_no_tags ||= Gem::Version.new(version) >= Gem::Version.new("2.14.0-rc0")
end
end
end
diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb
index 0867879861..593da6d1a7 100644
--- a/lib/bundler/source/metadata.rb
+++ b/lib/bundler/source/metadata.rb
@@ -5,7 +5,7 @@ module Bundler
class Metadata < Source
def specs
@specs ||= Index.build do |idx|
- idx << Gem::Specification.new("Ruby\0", RubyVersion.system.to_gem_version_with_patchlevel)
+ idx << Gem::Specification.new("Ruby\0", Gem.ruby_version)
idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|
s.required_rubygems_version = Gem::Requirement.default
end
@@ -15,17 +15,16 @@ module Bundler
s.version = VERSION
s.license = "MIT"
s.platform = Gem::Platform::RUBY
- s.source = self
s.authors = ["bundler team"]
s.bindir = "exe"
s.homepage = "https://bundler.io"
s.summary = "The best way to manage your application's dependencies"
s.executables = %w[bundle]
# can't point to the actual gemspec or else the require paths will be wrong
- s.loaded_from = File.expand_path("..", __FILE__)
+ s.loaded_from = __dir__
end
- if local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
+ if local_spec = Bundler.rubygems.find_bundler(VERSION)
idx << local_spec
end
@@ -33,10 +32,6 @@ module Bundler
end
end
- def cached!; end
-
- def remote!; end
-
def options
{}
end
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index f98f5155fb..bdfcf8274a 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -11,7 +11,7 @@ module Bundler
protected :original_path
- DEFAULT_GLOB = "{,*,*/*}.gemspec".freeze
+ DEFAULT_GLOB = "{,*,*/*}.gemspec"
def initialize(options)
@options = options.dup
@@ -82,7 +82,9 @@ module Bundler
end
def install(spec, options = {})
- print_using_message "Using #{version_message(spec)} from #{self}"
+ using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
+ using_message += " and installing its executables" unless spec.executables.empty?
+ print_using_message using_message
generate_bin(spec, :disable_extensions => true)
nil # no post-install message
end
@@ -125,14 +127,18 @@ module Bundler
@expanded_original_path ||= expand(original_path)
end
- private
+ private
def expanded_path
@expanded_path ||= expand(path)
end
def expand(somepath)
- somepath.expand_path(root_path)
+ if Bundler.current_ruby.jruby? # TODO: Unify when https://github.com/rubygems/bundler/issues/7598 fixed upstream and all supported jrubies include the fix
+ somepath.expand_path(root_path).expand_path
+ else
+ somepath.expand_path(root_path)
+ end
rescue ArgumentError => e
Bundler.ui.debug(e)
raise PathError, "There was an error while trying to use the path " \
@@ -167,7 +173,7 @@ module Bundler
if File.directory?(expanded_path)
# We sort depth-first since `<<` will override the earlier-found specs
- Dir["#{expanded_path}/#{@glob}"].sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
+ Gem::Util.glob_files_in_dir(@glob, expanded_path).sort_by {|p| -p.split(File::SEPARATOR).size }.each do |file|
next unless spec = load_gemspec(file)
spec.source = self
@@ -218,13 +224,13 @@ module Bundler
# Some gem authors put absolute paths in their gemspec
# and we have to save them from themselves
- spec.files = spec.files.map do |p|
- next p unless p =~ /\A#{Pathname::SEPARATOR_PAT}/
- next if File.directory?(p)
+ spec.files = spec.files.map do |path|
+ next path unless /\A#{Pathname::SEPARATOR_PAT}/.match?(path)
+ next if File.directory?(path)
begin
- Pathname.new(p).relative_path_from(gem_dir).to_s
+ Pathname.new(path).relative_path_from(gem_dir).to_s
rescue ArgumentError
- p
+ path
end
end.compact
diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb
index a0357ffa39..0af28fe770 100644
--- a/lib/bundler/source/path/installer.rb
+++ b/lib/bundler/source/path/installer.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require_relative "../../rubygems_gem_installer"
+
module Bundler
class Source
class Path
@@ -16,47 +18,24 @@ module Bundler
@build_args = options[:build_args] || Bundler.rubygems.build_args
@gem_bin_dir = "#{Bundler.rubygems.gem_dir}/bin"
@disable_extensions = options[:disable_extensions]
-
- if Bundler.requires_sudo?
- @tmp_dir = Bundler.tmp(spec.full_name).to_s
- @bin_dir = "#{@tmp_dir}/bin"
- else
- @bin_dir = @gem_bin_dir
- end
+ @bin_dir = @gem_bin_dir
end
def post_install
- SharedHelpers.chdir(@gem_dir) do
- run_hooks(:pre_install)
-
- unless @disable_extensions
- build_extensions
- run_hooks(:post_build)
- end
-
- generate_bin unless spec.executables.nil? || spec.executables.empty?
+ run_hooks(:pre_install)
- run_hooks(:post_install)
+ unless @disable_extensions
+ build_extensions
+ run_hooks(:post_build)
end
- ensure
- Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
- end
-
- private
- def generate_bin
- super
+ generate_bin unless spec.executables.empty?
- if Bundler.requires_sudo?
- SharedHelpers.filesystem_access(@gem_bin_dir) do |p|
- Bundler.mkdir_p(p)
- end
- spec.executables.each do |exe|
- Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}"
- end
- end
+ run_hooks(:post_install)
end
+ private
+
def run_hooks(type)
hooks_meth = "#{type}_hooks"
return unless Gem.respond_to?(hooks_meth)
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 6c0de204e7..af57acbbc2 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -7,12 +7,10 @@ module Bundler
class Rubygems < Source
autoload :Remote, File.expand_path("rubygems/remote", __dir__)
- # Use the API when installing less than X gems
- API_REQUEST_LIMIT = 500
# Ask for X gems per API request
API_REQUEST_SIZE = 50
- attr_reader :remotes, :caches
+ attr_reader :remotes
def initialize(options = {})
@options = options
@@ -20,18 +18,41 @@ module Bundler
@dependency_names = []
@allow_remote = false
@allow_cached = false
- @caches = [cache_path, *Bundler.rubygems.gem_cache]
+ @allow_local = options["allow_local"] || false
- Array(options["remotes"] || []).reverse_each {|r| add_remote(r) }
+ Array(options["remotes"]).reverse_each {|r| add_remote(r) }
+ end
+
+ def caches
+ @caches ||= [cache_path, *Bundler.rubygems.gem_cache]
+ end
+
+ def local_only!
+ @specs = nil
+ @allow_local = true
+ @allow_cached = false
+ @allow_remote = false
+ end
+
+ def local!
+ return if @allow_local
+
+ @specs = nil
+ @allow_local = true
end
def remote!
+ return if @allow_remote
+
@specs = nil
@allow_remote = true
end
def cached!
+ return if @allow_cached
+
@specs = nil
+ @allow_local = true
@allow_cached = true
end
@@ -49,9 +70,17 @@ module Bundler
o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
end
+ def multiple_remotes?
+ @remotes.size > 1
+ end
+
+ def no_remotes?
+ @remotes.size == 0
+ end
+
def can_lock?(spec)
- return super if Bundler.feature_flag.disable_multisource?
- spec.source.is_a?(Rubygems)
+ return super unless multiple_remotes?
+ include?(spec.source)
end
def options
@@ -73,12 +102,28 @@ module Bundler
def to_s
if remotes.empty?
"locally installed gems"
- else
- remote_names = remotes.map(&:to_s).join(", ")
+ elsif @allow_remote && @allow_cached && @allow_local
+ "rubygems repository #{remote_names}, cached gems or installed locally"
+ elsif @allow_remote && @allow_local
"rubygems repository #{remote_names} or installed locally"
+ elsif @allow_remote
+ "rubygems repository #{remote_names}"
+ elsif @allow_cached && @allow_local
+ "cached gems or installed locally"
+ else
+ "locally installed gems"
+ end
+ end
+
+ def identifier
+ if remotes.empty?
+ "locally installed gems"
+ else
+ "rubygems repository #{remote_names}"
end
end
- alias_method :name, :to_s
+ alias_method :name, :identifier
+ alias_method :to_gemfile, :identifier
def specs
@specs ||= begin
@@ -87,120 +132,84 @@ module Bundler
# small_idx.use large_idx.
idx = @allow_remote ? remote_specs.dup : Index.new
idx.use(cached_specs, :override_dupes) if @allow_cached || @allow_remote
- idx.use(installed_specs, :override_dupes)
+ idx.use(installed_specs, :override_dupes) if @allow_local
idx
end
end
- def install(spec, opts = {})
- force = opts[:force]
- ensure_builtin_gems_cached = opts[:ensure_builtin_gems_cached]
+ def install(spec, options = {})
+ force = options[:force]
+ ensure_builtin_gems_cached = options[:ensure_builtin_gems_cached]
- if ensure_builtin_gems_cached && builtin_gem?(spec)
- if !cached_path(spec)
- cached_built_in_gem(spec) unless spec.remote
- force = true
- else
- spec.loaded_from = loaded_from(spec)
- end
+ if ensure_builtin_gems_cached && spec.default_gem? && !cached_path(spec)
+ cached_built_in_gem(spec) unless spec.remote
+ force = true
end
- if (installed?(spec) || Plugin.installed?(spec.name)) && !force
- print_using_message "Using #{version_message(spec)}"
+ if installed?(spec) && !force
+ print_using_message "Using #{version_message(spec, options[:previous_spec])}"
return nil # no post-install message
end
- # Download the gem to get the spec, because some specs that are returned
- # by rubygems.org are broken and wrong.
if spec.remote
# Check for this spec from other sources
- uris = [spec.remote.anonymized_uri]
- uris += remotes_for_spec(spec).map(&:anonymized_uri)
- uris.uniq!
+ uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
+ end
- path = fetch_gem(spec)
- begin
- s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
- spec.__swap__(s)
- rescue StandardError
+ path = fetch_gem_if_possible(spec, options[:previous_spec])
+ raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
+
+ return if Bundler.settings[:no_install]
+
+ install_path = rubygems_dir
+ bin_path = Bundler.system_bindir
+
+ require_relative "../rubygems_gem_installer"
+
+ installer = Bundler::RubyGemsGemInstaller.at(
+ path,
+ :security_policy => Bundler.rubygems.security_policies[Bundler.settings["trust-policy"]],
+ :install_dir => install_path.to_s,
+ :bin_dir => bin_path.to_s,
+ :ignore_dependencies => true,
+ :wrappers => true,
+ :env_shebang => true,
+ :build_args => options[:build_args],
+ :bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum,
+ :bundler_extension_cache_path => extension_cache_path(spec)
+ )
+
+ if spec.remote
+ s = begin
+ installer.spec
+ rescue Gem::Package::FormatError
Bundler.rm_rf(path)
raise
+ rescue Gem::Security::Exception => e
+ raise SecurityError,
+ "The gem #{File.basename(path, ".gem")} can't be installed because " \
+ "the security policy didn't allow it, with the message: #{e.message}"
end
+
+ spec.__swap__(s)
end
- unless Bundler.settings[:no_install]
- message = "Installing #{version_message(spec)}"
- message += " with native extensions" if spec.extensions.any?
- Bundler.ui.confirm message
+ message = "Installing #{version_message(spec, options[:previous_spec])}"
+ message += " with native extensions" if spec.extensions.any?
+ Bundler.ui.confirm message
- path = cached_gem(spec)
- if requires_sudo?
- install_path = Bundler.tmp(spec.full_name)
- bin_path = install_path.join("bin")
- else
- install_path = rubygems_dir
- bin_path = Bundler.system_bindir
- end
+ installed_spec = installer.install
- Bundler.mkdir_p bin_path, :no_sudo => true unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5")
-
- installed_spec = nil
- Bundler.rubygems.preserve_paths do
- installed_spec = Bundler::RubyGemsGemInstaller.at(
- path,
- :install_dir => install_path.to_s,
- :bin_dir => bin_path.to_s,
- :ignore_dependencies => true,
- :wrappers => true,
- :env_shebang => true,
- :build_args => opts[:build_args],
- :bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum,
- :bundler_extension_cache_path => extension_cache_path(spec)
- ).install
- end
- spec.full_gem_path = installed_spec.full_gem_path
-
- # SUDO HAX
- if requires_sudo?
- Bundler.rubygems.repository_subdirectories.each do |name|
- src = File.join(install_path, name, "*")
- dst = File.join(rubygems_dir, name)
- if name == "extensions" && Dir.glob(src).any?
- src = File.join(src, "*/*")
- ext_src = Dir.glob(src).first
- ext_src.gsub!(src[0..-6], "")
- dst = File.dirname(File.join(dst, ext_src))
- end
- SharedHelpers.filesystem_access(dst) do |p|
- Bundler.mkdir_p(p)
- end
- Bundler.sudo "cp -R #{src} #{dst}" if Dir[src].any?
- end
-
- spec.executables.each do |exe|
- SharedHelpers.filesystem_access(Bundler.system_bindir) do |p|
- Bundler.mkdir_p(p)
- end
- Bundler.sudo "cp -R #{install_path}/bin/#{exe} #{Bundler.system_bindir}/"
- end
- end
- installed_spec.loaded_from = loaded_from(spec)
- end
- spec.loaded_from = loaded_from(spec)
+ spec.full_gem_path = installed_spec.full_gem_path
+ spec.loaded_from = installed_spec.loaded_from
spec.post_install_message
- ensure
- Bundler.rm_rf(install_path) if requires_sudo?
end
def cache(spec, custom_path = nil)
- if builtin_gem?(spec)
- cached_path = cached_built_in_gem(spec)
- else
- cached_path = cached_gem(spec)
- end
- raise GemNotFound, "Missing gem file '#{spec.full_name}.gem'." unless cached_path
+ cached_path = Bundler.settings[:cache_all_platforms] ? fetch_gem_if_possible(spec) : cached_gem(spec)
+ raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path
return if File.dirname(cached_path) == Bundler.app_cache.to_s
Bundler.ui.info " * #{File.basename(cached_path)}"
FileUtils.cp(cached_path, Bundler.app_cache(custom_path))
@@ -227,25 +236,16 @@ module Bundler
@remotes.unshift(uri) unless @remotes.include?(uri)
end
- def equivalent_remotes?(other_remotes)
- other_remotes.map(&method(:remove_auth)) == @remotes.map(&method(:remove_auth))
- end
-
- def replace_remotes(other_remotes, allow_equivalent = false)
- return false if other_remotes == @remotes
-
- equivalent = allow_equivalent && equivalent_remotes?(other_remotes)
-
- @remotes = []
- other_remotes.reverse_each do |r|
- add_remote r.to_s
+ def spec_names
+ if @allow_remote && dependency_api_available?
+ remote_specs.spec_names
+ else
+ []
end
-
- !equivalent
end
def unmet_deps
- if @allow_remote && api_fetchers.any?
+ if @allow_remote && dependency_api_available?
remote_specs.unmet_dependency_names
else
[]
@@ -261,7 +261,7 @@ module Bundler
def double_check_for(unmet_dependency_names)
return unless @allow_remote
- return unless api_fetchers.any?
+ return unless dependency_api_available?
unmet_dependency_names = unmet_dependency_names.call
unless unmet_dependency_names.nil?
@@ -283,21 +283,32 @@ module Bundler
remote_specs.each do |spec|
case spec
when EndpointSpecification, Gem::Specification, StubSpecification, LazySpecification
- names.concat(spec.runtime_dependencies)
+ names.concat(spec.runtime_dependencies.map(&:name))
when RemoteSpecification # from the full index
return nil
else
raise "unhandled spec type (#{spec.inspect})"
end
end
- names.map!(&:name) if names
names
end
- protected
+ def dependency_api_available?
+ @allow_remote && api_fetchers.any?
+ end
+
+ protected
+
+ def remote_names
+ remotes.map(&:to_s).join(", ")
+ end
def credless_remotes
- remotes.map(&method(:suppress_configured_credentials))
+ if Bundler.settings[:allow_deployment_source_credential_changes]
+ remotes.map(&method(:remove_auth))
+ else
+ remotes.map(&method(:suppress_configured_credentials))
+ end
end
def remotes_for_spec(spec)
@@ -307,26 +318,28 @@ module Bundler
end
end
- def loaded_from(spec)
- "#{rubygems_dir}/specifications/#{spec.full_name}.gemspec"
- end
-
def cached_gem(spec)
- cached_gem = cached_path(spec)
- unless cached_gem
- raise Bundler::GemNotFound, "Could not find #{spec.file_name} for installation"
+ if spec.default_gem?
+ cached_built_in_gem(spec)
+ else
+ cached_path(spec)
end
- cached_gem
end
def cached_path(spec)
- possibilities = @caches.map {|p| "#{p}/#{spec.file_name}" }
+ global_cache_path = download_cache_path(spec)
+ caches << global_cache_path if global_cache_path
+
+ possibilities = caches.map {|p| package_path(p, spec) }
possibilities.find {|p| File.exist?(p) }
end
+ def package_path(cache_path, spec)
+ "#{cache_path}/#{spec.file_name}"
+ end
+
def normalize_uri(uri)
- uri = uri.to_s
- uri = "#{uri}/" unless uri =~ %r{/$}
+ uri = URINormalizer.normalize_suffix(uri.to_s)
require_relative "../vendored_uri"
uri = Bundler::URI(uri)
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
@@ -354,7 +367,6 @@ module Bundler
def installed_specs
@installed_specs ||= Index.build do |idx|
Bundler.rubygems.all_specs.reverse_each do |spec|
- next if spec.name == "bundler"
spec.source = self
if Bundler.rubygems.spec_missing_extensions?(spec, false)
Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions"
@@ -367,16 +379,11 @@ module Bundler
def cached_specs
@cached_specs ||= begin
- idx = installed_specs.dup
+ idx = @allow_local ? installed_specs.dup : Index.new
Dir["#{cache_path}/*.gem"].each do |gemfile|
- next if gemfile =~ /^bundler\-[\d\.]+?\.gem/
s ||= Bundler.rubygems.spec_from_gem(gemfile)
s.source = self
- if Bundler.rubygems.spec_missing_extensions?(s, false)
- Bundler.ui.debug "Source #{self} is ignoring #{s} because it is missing extensions"
- next
- end
idx << s
end
@@ -395,12 +402,11 @@ module Bundler
# gather lists from non-api sites
fetch_names(index_fetchers, nil, idx, false)
- # because ensuring we have all the gems we need involves downloading
- # the gemspecs of those gems, if the non-api sites contain more than
- # about 500 gems, we treat all sites as non-api for speed.
- allow_api = idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
- Bundler.ui.debug "Need to query more than #{API_REQUEST_LIMIT} gems." \
- " Downloading full index instead..." unless allow_api
+ # legacy multi-remote sources need special logic to figure out
+ # dependency names and that logic can be very costly if one remote
+ # uses the dependency API but others don't. So use full indexes
+ # consistently in that particular case.
+ allow_api = !multiple_remotes?
fetch_names(api_fetchers, allow_api && dependency_names, idx, false)
end
@@ -409,66 +415,56 @@ module Bundler
def fetch_names(fetchers, dependency_names, index, override_dupes)
fetchers.each do |f|
if dependency_names
- Bundler.ui.info "Fetching gem metadata from #{f.uri}", Bundler.ui.debug?
+ Bundler.ui.info "Fetching gem metadata from #{URICredentialsFilter.credential_filtered_uri(f.uri)}", Bundler.ui.debug?
index.use f.specs_with_retry(dependency_names, self), override_dupes
Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
else
- Bundler.ui.info "Fetching source index from #{f.uri}"
+ Bundler.ui.info "Fetching source index from #{URICredentialsFilter.credential_filtered_uri(f.uri)}"
index.use f.specs_with_retry(nil, self), override_dupes
end
end
end
- def fetch_gem(spec)
- return false unless spec.remote
+ def fetch_gem_if_possible(spec, previous_spec = nil)
+ if spec.remote
+ fetch_gem(spec, previous_spec)
+ else
+ cached_gem(spec)
+ end
+ end
+ def fetch_gem(spec, previous_spec = nil)
spec.fetch_platform
- download_path = requires_sudo? ? Bundler.tmp(spec.full_name) : rubygems_dir
- gem_path = "#{rubygems_dir}/cache/#{spec.full_name}.gem"
+ cache_path = download_cache_path(spec) || default_cache_path_for(rubygems_dir)
+ gem_path = package_path(cache_path, spec)
+ return gem_path if File.exist?(gem_path)
- SharedHelpers.filesystem_access("#{download_path}/cache") do |p|
+ SharedHelpers.filesystem_access(cache_path) do |p|
FileUtils.mkdir_p(p)
end
- download_gem(spec, download_path)
-
- if requires_sudo?
- SharedHelpers.filesystem_access("#{rubygems_dir}/cache") do |p|
- Bundler.mkdir_p(p)
- end
- Bundler.sudo "mv #{download_path}/cache/#{spec.full_name}.gem #{gem_path}"
- end
+ download_gem(spec, cache_path, previous_spec)
gem_path
- ensure
- Bundler.rm_rf(download_path) if requires_sudo?
- end
-
- def builtin_gem?(spec)
- # Ruby 2.1, where all included gems have this summary
- return true if spec.summary =~ /is bundled with Ruby/
-
- # Ruby 2.0, where gemspecs are stored in specifications/default/
- spec.loaded_from && spec.loaded_from.include?("specifications/default/")
end
def installed?(spec)
- installed_specs[spec].any?
+ installed_specs[spec].any? && !spec.deleted_gem?
end
- def requires_sudo?
- Bundler.requires_sudo?
+ def rubygems_dir
+ Bundler.bundle_path
end
- def rubygems_dir
- Bundler.rubygems.gem_dir
+ def default_cache_path_for(dir)
+ "#{dir}/cache"
end
def cache_path
Bundler.app_cache
end
- private
+ private
# Checks if the requested spec exists in the global cache. If it does,
# we copy it to the download path, and if it does not, we download it.
@@ -476,45 +472,16 @@ module Bundler
# @param [Specification] spec
# the spec we want to download or retrieve from the cache.
#
- # @param [String] download_path
+ # @param [String] download_cache_path
# the local directory the .gem will end up in.
#
- def download_gem(spec, download_path)
- local_path = File.join(download_path, "cache/#{spec.full_name}.gem")
-
- if (cache_path = download_cache_path(spec)) && cache_path.file?
- SharedHelpers.filesystem_access(local_path) do
- FileUtils.cp(cache_path, local_path)
- end
- else
- uri = spec.remote.uri
- Bundler.ui.confirm("Fetching #{version_message(spec)}")
- rubygems_local_path = Bundler.rubygems.download_gem(spec, uri, download_path)
- if rubygems_local_path != local_path
- FileUtils.mv(rubygems_local_path, local_path)
- end
- cache_globally(spec, local_path)
- end
- end
-
- # Checks if the requested spec exists in the global cache. If it does
- # not, we create the relevant global cache subdirectory if it does not
- # exist and copy the spec from the local cache to the global cache.
+ # @param [Specification] previous_spec
+ # the spec previously locked
#
- # @param [Specification] spec
- # the spec we want to copy to the global cache.
- #
- # @param [String] local_cache_path
- # the local directory from which we want to copy the .gem.
- #
- def cache_globally(spec, local_cache_path)
- return unless cache_path = download_cache_path(spec)
- return if cache_path.exist?
-
- SharedHelpers.filesystem_access(cache_path.dirname, &:mkpath)
- SharedHelpers.filesystem_access(cache_path) do
- FileUtils.cp(local_cache_path, cache_path)
- end
+ def download_gem(spec, download_cache_path, previous_spec = nil)
+ uri = spec.remote.uri
+ Bundler.ui.confirm("Fetching #{version_message(spec, previous_spec)}")
+ Bundler.rubygems.download_gem(spec, uri, download_cache_path)
end
# Returns the global cache path of the calling Rubygems::Source object.
@@ -533,7 +500,7 @@ module Bundler
return unless remote = spec.remote
return unless cache_slug = remote.cache_slug
- Bundler.user_cache.join("gems", cache_slug, spec.file_name)
+ Bundler.user_cache.join("gems", cache_slug)
end
def extension_cache_slug(spec)
diff --git a/lib/bundler/source/rubygems/remote.rb b/lib/bundler/source/rubygems/remote.rb
index 45ea61acb2..82c850ffbb 100644
--- a/lib/bundler/source/rubygems/remote.rb
+++ b/lib/bundler/source/rubygems/remote.rb
@@ -39,7 +39,7 @@ module Bundler
"rubygems remote at #{anonymized_uri}"
end
- private
+ private
def apply_auth(uri, auth)
if auth && uri.userinfo.nil?
diff --git a/lib/bundler/source/rubygems_aggregate.rb b/lib/bundler/source/rubygems_aggregate.rb
new file mode 100644
index 0000000000..99ef81ad54
--- /dev/null
+++ b/lib/bundler/source/rubygems_aggregate.rb
@@ -0,0 +1,68 @@
+# frozen_string_literal: true
+
+module Bundler
+ class Source
+ class RubygemsAggregate
+ attr_reader :source_map, :sources
+
+ def initialize(sources, source_map)
+ @sources = sources
+ @source_map = source_map
+
+ @index = build_index
+ end
+
+ def specs
+ @index
+ end
+
+ def identifier
+ to_s
+ end
+
+ def to_s
+ "any of the sources"
+ end
+
+ private
+
+ def build_index
+ Index.build do |idx|
+ dependency_names = source_map.pinned_spec_names
+
+ sources.all_sources.each do |source|
+ source.dependency_names = dependency_names - source_map.pinned_spec_names(source)
+ idx.add_source source.specs
+ dependency_names.concat(source.unmet_deps).uniq!
+ end
+
+ double_check_for_index(idx, dependency_names)
+ end
+ end
+
+ # Suppose the gem Foo depends on the gem Bar. Foo exists in Source A. Bar has some versions that exist in both
+ # sources A and B. At this point, the API request will have found all the versions of Bar in source A,
+ # but will not have found any versions of Bar from source B, which is a problem if the requested version
+ # of Foo specifically depends on a version of Bar that is only found in source B. This ensures that for
+ # each spec we found, we add all possible versions from all sources to the index.
+ def double_check_for_index(idx, dependency_names)
+ pinned_names = source_map.pinned_spec_names
+
+ names = :names # do this so we only have to traverse to get dependency_names from the index once
+ unmet_dependency_names = lambda do
+ return names unless names == :names
+ new_names = sources.all_sources.map(&:dependency_names_to_double_check)
+ return names = nil if new_names.compact!
+ names = new_names.flatten(1).concat(dependency_names)
+ names.uniq!
+ names -= pinned_names
+ names
+ end
+
+ sources.all_sources.each do |source|
+ source.double_check_for(unmet_dependency_names)
+ end
+ end
+ end
+ end
+end
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index d3f649a12c..4419695b7f 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -1,30 +1,53 @@
# frozen_string_literal: true
-require "set"
-
module Bundler
class SourceList
attr_reader :path_sources,
:git_sources,
:plugin_sources,
- :global_rubygems_source,
+ :global_path_source,
:metadata_source
+ def global_rubygems_source
+ @global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
+ end
+
def initialize
@path_sources = []
@git_sources = []
@plugin_sources = []
@global_rubygems_source = nil
- @rubygems_aggregate = rubygems_aggregate_class.new
+ @global_path_source = nil
@rubygems_sources = []
@metadata_source = Source::Metadata.new
+
+ @merged_gem_lockfile_sections = false
+ end
+
+ def merged_gem_lockfile_sections?
+ @merged_gem_lockfile_sections
+ end
+
+ def merged_gem_lockfile_sections!(replacement_source)
+ @merged_gem_lockfile_sections = true
+ @global_rubygems_source = replacement_source
+ end
+
+ def aggregate_global_source?
+ global_rubygems_source.multiple_remotes?
+ end
+
+ def implicit_global_source?
+ global_rubygems_source.no_remotes?
end
def add_path_source(options = {})
if options["gemspec"]
add_source_to_list Source::Gemspec.new(options), path_sources
else
- add_source_to_list Source::Path.new(options), path_sources
+ path_source = add_source_to_list Source::Path.new(options), path_sources
+ @global_path_source ||= path_source if options["global"]
+ path_source
end
end
@@ -35,32 +58,31 @@ module Bundler
end
def add_rubygems_source(options = {})
- add_source_to_list Source::Rubygems.new(options), @rubygems_sources
+ new_source = Source::Rubygems.new(options)
+ return @global_rubygems_source if @global_rubygems_source == new_source
+
+ add_source_to_list new_source, @rubygems_sources
end
def add_plugin_source(source, options = {})
add_source_to_list Plugin.source(source).new(options), @plugin_sources
end
- def global_rubygems_source=(uri)
- if Bundler.feature_flag.disable_multisource?
- @global_rubygems_source ||= rubygems_aggregate_class.new("remotes" => uri)
- end
- add_rubygems_remote(uri)
- end
-
- def add_rubygems_remote(uri)
- return if Bundler.feature_flag.disable_multisource?
- @rubygems_aggregate.add_remote(uri)
- @rubygems_aggregate
+ def add_global_rubygems_remote(uri)
+ global_rubygems_source.add_remote(uri)
+ global_rubygems_source
end
def default_source
- global_rubygems_source || @rubygems_aggregate
+ global_path_source || global_rubygems_source
end
def rubygems_sources
- @rubygems_sources + [default_source]
+ non_global_rubygems_sources + [global_rubygems_source]
+ end
+
+ def non_global_rubygems_sources
+ @rubygems_sources
end
def rubygems_remotes
@@ -71,37 +93,51 @@ module Bundler
path_sources + git_sources + plugin_sources + rubygems_sources + [metadata_source]
end
+ def non_default_explicit_sources
+ all_sources - [default_source, metadata_source]
+ end
+
def get(source)
- source_list_for(source).find {|s| equal_source?(source, s) || equivalent_source?(source, s) }
+ source_list_for(source).find {|s| equivalent_source?(source, s) }
end
def lock_sources
- lock_sources = (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
- if Bundler.feature_flag.disable_multisource?
- lock_sources + rubygems_sources.sort_by(&:to_s)
+ lock_other_sources + lock_rubygems_sources
+ end
+
+ def lock_other_sources
+ (path_sources + git_sources + plugin_sources).sort_by(&:identifier)
+ end
+
+ def lock_rubygems_sources
+ if merged_gem_lockfile_sections?
+ [combine_rubygems_sources]
else
- lock_sources << combine_rubygems_sources
+ rubygems_sources.sort_by(&:identifier)
end
end
# Returns true if there are changes
def replace_sources!(replacement_sources)
- return true if replacement_sources.empty?
+ return false if replacement_sources.empty?
- [path_sources, git_sources, plugin_sources].each do |source_list|
- source_list.map! do |source|
- replacement_sources.find {|s| s == source } || source
- end
- end
+ @rubygems_sources, @path_sources, @git_sources, @plugin_sources = map_sources(replacement_sources)
+ @global_rubygems_source = global_replacement_source(replacement_sources)
+
+ different_sources?(lock_sources, replacement_sources)
+ end
- replacement_rubygems = !Bundler.feature_flag.disable_multisource? &&
- replacement_sources.detect {|s| s.is_a?(Source::Rubygems) }
- @rubygems_aggregate = replacement_rubygems if replacement_rubygems
+ # Returns true if there are changes
+ def expired_sources?(replacement_sources)
+ return false if replacement_sources.empty?
+
+ lock_sources = dup_with_replaced_sources(replacement_sources).lock_sources
- return true if !equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
- return true if replacement_rubygems && rubygems_remotes.to_set != replacement_rubygems.remotes.to_set
+ different_sources?(lock_sources, replacement_sources)
+ end
- false
+ def local_only!
+ all_sources.each(&:local_only!)
end
def cached!
@@ -112,11 +148,39 @@ module Bundler
all_sources.each(&:remote!)
end
- def rubygems_primary_remotes
- @rubygems_aggregate.remotes
+ private
+
+ def dup_with_replaced_sources(replacement_sources)
+ new_source_list = dup
+ new_source_list.replace_sources!(replacement_sources)
+ new_source_list
end
- private
+ def map_sources(replacement_sources)
+ rubygems, git, plugin = [@rubygems_sources, @git_sources, @plugin_sources].map do |sources|
+ sources.map do |source|
+ replacement_sources.find {|s| s == source } || source
+ end
+ end
+
+ path = @path_sources.map do |source|
+ replacement_sources.find {|s| s == (source.is_a?(Source::Gemspec) ? source.as_path_source : source) } || source
+ end
+
+ [rubygems, path, git, plugin]
+ end
+
+ def global_replacement_source(replacement_sources)
+ replacement_source = replacement_sources.find {|s| s == global_rubygems_source }
+ return global_rubygems_source unless replacement_source
+
+ replacement_source.local!
+ replacement_source
+ end
+
+ def different_sources?(lock_sources, replacement_sources)
+ !equivalent_sources?(lock_sources, replacement_sources)
+ end
def rubygems_aggregate_class
Source::Rubygems
@@ -144,40 +208,20 @@ module Bundler
def warn_on_git_protocol(source)
return if Bundler.settings["git.allow_insecure"]
- if source.uri =~ /^git\:/
+ if /^git\:/.match?(source.uri)
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
"which transmits data without encryption. Disable this warning with " \
- "`bundle config set git.allow_insecure true`, or switch to the `https` " \
+ "`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
"protocol to keep your data secure."
end
end
- def equal_sources?(lock_sources, replacement_sources)
- lock_sources.to_set == replacement_sources.to_set
- end
-
- def equal_source?(source, other_source)
- source == other_source
- end
-
- def equivalent_source?(source, other_source)
- return false unless Bundler.settings[:allow_deployment_source_credential_changes] && source.is_a?(Source::Rubygems)
-
- equivalent_rubygems_sources?([source], [other_source])
- end
-
def equivalent_sources?(lock_sources, replacement_sources)
- return false unless Bundler.settings[:allow_deployment_source_credential_changes]
-
- lock_rubygems_sources, lock_other_sources = lock_sources.partition {|s| s.is_a?(Source::Rubygems) }
- replacement_rubygems_sources, replacement_other_sources = replacement_sources.partition {|s| s.is_a?(Source::Rubygems) }
-
- equivalent_rubygems_sources?(lock_rubygems_sources, replacement_rubygems_sources) && equal_sources?(lock_other_sources, replacement_other_sources)
+ lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier)
end
- def equivalent_rubygems_sources?(lock_sources, replacement_sources)
- actual_remotes = replacement_sources.map(&:remotes).flatten.uniq
- lock_sources.all? {|s| s.equivalent_remotes?(actual_remotes) }
+ def equivalent_source?(source, other_source)
+ source == other_source
end
end
end
diff --git a/lib/bundler/source_map.rb b/lib/bundler/source_map.rb
new file mode 100644
index 0000000000..ca73e01f9d
--- /dev/null
+++ b/lib/bundler/source_map.rb
@@ -0,0 +1,71 @@
+# frozen_string_literal: true
+
+module Bundler
+ class SourceMap
+ attr_reader :sources, :dependencies, :locked_specs
+
+ def initialize(sources, dependencies, locked_specs)
+ @sources = sources
+ @dependencies = dependencies
+ @locked_specs = locked_specs
+ end
+
+ def pinned_spec_names(skip = nil)
+ direct_requirements.reject {|_, source| source == skip }.keys
+ end
+
+ def all_requirements
+ requirements = direct_requirements.dup
+
+ unmet_deps = sources.non_default_explicit_sources.map do |source|
+ (source.spec_names - pinned_spec_names).each do |indirect_dependency_name|
+ previous_source = requirements[indirect_dependency_name]
+ if previous_source.nil?
+ requirements[indirect_dependency_name] = source
+ else
+ no_ambiguous_sources = Bundler.feature_flag.bundler_3_mode?
+
+ msg = ["The gem '#{indirect_dependency_name}' was found in multiple relevant sources."]
+ msg.concat [previous_source, source].map {|s| " * #{s}" }.sort
+ msg << "You #{no_ambiguous_sources ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
+ msg = msg.join("\n")
+
+ raise SecurityError, msg if no_ambiguous_sources
+ Bundler.ui.warn "Warning: #{msg}"
+ end
+ end
+
+ source.unmet_deps
+ end
+
+ sources.default_source.add_dependency_names(unmet_deps.flatten - requirements.keys)
+
+ requirements
+ end
+
+ def direct_requirements
+ @direct_requirements ||= begin
+ requirements = {}
+ default = sources.default_source
+ dependencies.each do |dep|
+ dep_source = dep.source || default
+ dep_source.add_dependency_names(dep.name)
+ requirements[dep.name] = dep_source
+ end
+ requirements
+ end
+ end
+
+ def locked_requirements
+ @locked_requirements ||= begin
+ requirements = {}
+ locked_specs.each do |locked_spec|
+ source = locked_spec.source
+ source.add_dependency_names(locked_spec.name)
+ requirements[locked_spec.name] = source
+ end
+ requirements
+ end
+ end
+ end
+end
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 463113ef8e..21630e3a3e 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -1,54 +1,55 @@
# frozen_string_literal: true
-require "tsort"
-require "set"
+require_relative "vendored_tsort"
module Bundler
class SpecSet
include Enumerable
include TSort
- def initialize(specs)
+ attr_reader :incomplete_specs
+
+ def initialize(specs, incomplete_specs = [])
@specs = specs
+ @incomplete_specs = incomplete_specs
end
- def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true)
- handled = Set.new
- deps = dependencies.dup
+ def for(dependencies, check = false, platforms = [nil])
+ handled = ["bundler"].product(platforms).map {|k| [k, true] }.to_h
+ deps = dependencies.product(platforms)
specs = []
- skip += ["bundler"]
loop do
break unless dep = deps.shift
- next if !handled.add?(dep) || skip.include?(dep.name)
- if spec = spec_for_dependency(dep, match_current_platform)
- specs << spec
+ name = dep[0].name
+ platform = dep[1]
+ incomplete = false
+
+ key = [name, platform]
+ next if handled.key?(key)
+
+ handled[key] = true
- spec.dependencies.each do |d|
+ specs_for_dep = specs_for_dependency(*dep)
+ if specs_for_dep.any?
+ specs.concat(specs_for_dep)
+
+ specs_for_dep.first.dependencies.each do |d|
next if d.type == :development
- d = DepProxy.new(d, dep.__platform) unless match_current_platform
- deps << d
+ incomplete = true if d.name != "bundler" && lookup[d.name].empty?
+ deps << [d, dep[1]]
end
- elsif check
- return false
- elsif raise_on_missing
- others = lookup[dep.name] if match_current_platform
- message = "Unable to find a spec satisfying #{dep} in the set. Perhaps the lockfile is corrupted?"
- message += " Found #{others.join(", ")} that did not match the current platform." if others && !others.empty?
- raise GemNotFound, message
+ else
+ incomplete = true
end
- end
- if spec = lookup["bundler"].first
- specs << spec
+ if incomplete && check
+ @incomplete_specs += lookup[name].any? ? lookup[name] : [LazySpecification.new(name, nil, nil)]
+ end
end
- check ? true : SpecSet.new(specs)
- end
-
- def valid_for?(deps)
- self.for(deps, [], true)
+ specs.uniq
end
def [](key)
@@ -62,6 +63,12 @@ module Bundler
@sorted = nil
end
+ def delete(specs)
+ specs.each {|spec| @specs.delete(spec) }
+ @lookup = nil
+ @sorted = nil
+ end
+
def sort!
self
end
@@ -74,38 +81,39 @@ module Bundler
lookup.dup
end
- def materialize(deps, missing_specs = nil)
- materialized = self.for(deps, [], false, true, !missing_specs).to_a
- deps = materialized.map(&:name).uniq
- materialized.map! do |s|
- next s unless s.is_a?(LazySpecification)
- s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=)
- spec = s.__materialize__
- unless spec
- unless missing_specs
- raise GemNotFound, "Could not find #{s.full_name} in any of the sources"
- end
- missing_specs << s
- end
- spec
- end
- SpecSet.new(missing_specs ? materialized.compact : materialized)
+ def materialize(deps)
+ materialized = self.for(deps, true)
+
+ SpecSet.new(materialized, incomplete_specs)
end
# Materialize for all the specs in the spec set, regardless of what platform they're for
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
# @return [Array<Gem::Specification>]
def materialized_for_all_platforms
- names = @specs.map(&:name).uniq
@specs.map do |s|
next s unless s.is_a?(LazySpecification)
- s.source.dependency_names = names if s.source.respond_to?(:dependency_names=)
- spec = s.__materialize__
+ s.source.remote!
+ spec = s.materialize_for_installation
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
spec
end
end
+ def incomplete_ruby_specs?(deps)
+ return false if @specs.empty?
+
+ @incomplete_specs = []
+
+ self.for(deps, true, [Gem::Platform::RUBY])
+
+ @incomplete_specs.any?
+ end
+
+ def missing_specs
+ @specs.select {|s| s.is_a?(LazySpecification) }
+ end
+
def merge(set)
arr = sorted.dup
set.each do |set_spec|
@@ -116,10 +124,20 @@ module Bundler
SpecSet.new(arr)
end
+ def -(other)
+ SpecSet.new(to_a - other.to_a)
+ end
+
def find_by_name_and_platform(name, platform)
@specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
end
+ def delete_by_name(name)
+ @specs.reject! {|spec| spec.name == name }
+ @lookup = nil
+ @sorted = nil
+ end
+
def what_required(spec)
unless req = find {|s| s.dependencies.any? {|d| d.type == :runtime && d.name == spec.name } }
return [spec]
@@ -147,7 +165,7 @@ module Bundler
sorted.each(&b)
end
- private
+ private
def sorted
rake = @specs.find {|s| s.name == "rake" }
@@ -157,7 +175,7 @@ module Bundler
cgems = extract_circular_gems(error)
raise CyclicDependencyError, "Your bundle requires gems that depend" \
" on each other, creating an infinite loop. Please remove either" \
- " gem '#{cgems[1]}' or gem '#{cgems[0]}' and try again."
+ " gem '#{cgems[0]}' or gem '#{cgems[1]}' and try again."
end
end
@@ -168,7 +186,7 @@ module Bundler
def lookup
@lookup ||= begin
lookup = Hash.new {|h, k| h[k] = [] }
- Index.sort_specs(@specs).reverse_each do |s|
+ @specs.each do |s|
lookup[s.name] << s
end
lookup
@@ -180,17 +198,12 @@ module Bundler
@specs.sort_by(&:name).each {|s| yield s }
end
- def spec_for_dependency(dep, match_current_platform)
- specs_for_platforms = lookup[dep.name]
- if match_current_platform
- Bundler.rubygems.platforms.reverse_each do |pl|
- match = GemHelpers.select_best_platform_match(specs_for_platforms, pl)
- return match if match
- end
- nil
- else
- GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform)
- end
+ def specs_for_dependency(dep, platform)
+ specs_for_name = lookup[dep.name]
+ target_platform = dep.force_ruby_platform ? Gem::Platform::RUBY : (platform || Bundler.local_platform)
+ matching_specs = GemHelpers.select_best_platform_match(specs_for_name, target_platform)
+ matching_specs.map!(&:materialize_for_installation).compact! if platform.nil?
+ matching_specs
end
def tsort_each_child(s)
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index d45f80a80a..88a4257fa4 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require_relative "remote_specification"
-
module Bundler
class StubSpecification < RemoteSpecification
def self.from_stub(stub)
@@ -28,9 +26,21 @@ module Bundler
# @!group Stub Delegates
- # This is defined directly to avoid having to load every installed spec
+ def manually_installed?
+ # This is for manually installed gems which are gems that were fixed in place after a
+ # failed installation. Once the issue was resolved, the user then manually created
+ # the gem specification using the instructions provided by `gem help install`
+ installed_by_version == Gem::Version.new(0)
+ end
+
+ # This is defined directly to avoid having to loading the full spec
def missing_extensions?
- stub.missing_extensions?
+ return false if default_gem?
+ return false if extensions.empty?
+ return false if File.exist? gem_build_complete_path
+ return false if manually_installed?
+
+ true
end
def activated
@@ -41,14 +51,24 @@ module Bundler
stub.instance_variable_set(:@activated, activated)
end
- def default_gem
- stub.default_gem
+ def extensions
+ stub.extensions
+ end
+
+ def gem_build_complete_path
+ File.join(extension_dir, "gem.build_complete")
+ end
+
+ def default_gem?
+ stub.default_gem?
end
def full_gem_path
- # deleted gems can have their stubs return nil, so in that case grab the
- # expired path from the full spec
- stub.full_gem_path || method_missing(:full_gem_path)
+ stub.full_gem_path
+ end
+
+ def full_gem_path=(path)
+ stub.full_gem_path = path
end
def full_require_paths
@@ -71,7 +91,7 @@ module Bundler
stub.raw_require_paths
end
- private
+ private
def _remote_specification
@_remote_specification ||= begin
diff --git a/lib/bundler/templates/Executable b/lib/bundler/templates/Executable
index 3e8d5b317a..9ff6f00898 100644
--- a/lib/bundler/templates/Executable
+++ b/lib/bundler/templates/Executable
@@ -8,14 +8,12 @@
# this file is here to facilitate running it.
#
-require "pathname"
-ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../<%= relative_gemfile_path %>",
- Pathname.new(__FILE__).realpath)
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("<%= relative_gemfile_path %>", __dir__)
-bundle_binstub = File.expand_path("../bundle", __FILE__)
+bundle_binstub = File.expand_path("bundle", __dir__)
if File.file?(bundle_binstub)
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
diff --git a/lib/bundler/templates/Executable.bundler b/lib/bundler/templates/Executable.bundler
index 69f26bb9c0..e290fe91eb 100644
--- a/lib/bundler/templates/Executable.bundler
+++ b/lib/bundler/templates/Executable.bundler
@@ -41,13 +41,13 @@ m = Module.new do
gemfile = ENV["BUNDLE_GEMFILE"]
return gemfile if gemfile && !gemfile.empty?
- File.expand_path("../<%= relative_gemfile_path %>", __FILE__)
+ File.expand_path("<%= relative_gemfile_path %>", __dir__)
end
def lockfile
lockfile =
case File.basename(gemfile)
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
+ when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
else "#{gemfile}.lock"
end
File.expand_path(lockfile)
@@ -60,24 +60,19 @@ m = Module.new do
Regexp.last_match(1)
end
- def bundler_version
- @bundler_version ||=
- env_var_version || cli_arg_version ||
- lockfile_version
- end
-
def bundler_requirement
- return "#{Gem::Requirement.default}.a" unless bundler_version
-
- bundler_gem_version = Gem::Version.new(bundler_version)
-
- requirement = bundler_gem_version.approximate_recommendation
+ @bundler_requirement ||=
+ env_var_version ||
+ cli_arg_version ||
+ bundler_requirement_for(lockfile_version)
+ end
- return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
+ def bundler_requirement_for(version)
+ return "#{Gem::Requirement.default}.a" unless version
- requirement += ".a" if bundler_gem_version.prerelease?
+ bundler_gem_version = Gem::Version.new(version)
- requirement
+ bundler_gem_version.approximate_recommendation
end
def load_bundler!
diff --git a/lib/bundler/templates/Executable.standalone b/lib/bundler/templates/Executable.standalone
index 4bf0753f44..3117a27e86 100644
--- a/lib/bundler/templates/Executable.standalone
+++ b/lib/bundler/templates/Executable.standalone
@@ -1,4 +1,6 @@
#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %>
+# frozen_string_literal: true
+
#
# This file was generated by Bundler.
#
@@ -6,9 +8,7 @@
# this file is here to facilitate running it.
#
-require "pathname"
-path = Pathname.new(__FILE__)
-$:.unshift File.expand_path "../<%= standalone_path %>", path.realpath
+$:.unshift File.expand_path "<%= standalone_path %>", __dir__
require "bundler/setup"
-load File.expand_path "../<%= executable_path %>", path.realpath
+load File.expand_path "<%= executable_path %>", __dir__
diff --git a/lib/bundler/templates/Gemfile b/lib/bundler/templates/Gemfile
index 1afd2cce67..d2403f18b2 100644
--- a/lib/bundler/templates/Gemfile
+++ b/lib/bundler/templates/Gemfile
@@ -2,6 +2,4 @@
source "https://rubygems.org"
-git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
-
# gem "rails"
diff --git a/lib/bundler/templates/gems.rb b/lib/bundler/templates/gems.rb
deleted file mode 100644
index 547cd6e8d9..0000000000
--- a/lib/bundler/templates/gems.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-# A sample gems.rb
-source "https://rubygems.org"
-
-git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
-
-# gem "rails"
diff --git a/lib/bundler/templates/newgem/CHANGELOG.md.tt b/lib/bundler/templates/newgem/CHANGELOG.md.tt
new file mode 100644
index 0000000000..c9ea96d453
--- /dev/null
+++ b/lib/bundler/templates/newgem/CHANGELOG.md.tt
@@ -0,0 +1,5 @@
+## [Unreleased]
+
+## [0.1.0] - <%= Time.now.strftime('%F') %>
+
+- Initial release
diff --git a/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
index 7dfd14aab9..175b821a62 100644
--- a/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
+++ b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt
@@ -2,73 +2,83 @@
## Our Pledge
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
+We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
## Our Standards
-Examples of behavior that contributes to creating a positive environment
-include:
+Examples of behavior that contributes to a positive environment for our community include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the overall community
-Examples of unacceptable behavior by participants include:
+Examples of unacceptable behavior include:
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
-## Our Responsibilities
+## Enforcement Responsibilities
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
+Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
+Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
## Scope
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
+This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at <%= config[:email] %>. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <%= config[:email] %>. All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series of actions.
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
+**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within the community.
## Attribution
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [https://contributor-covenant.org/version/1/4][version]
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
+available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
-[homepage]: https://contributor-covenant.org
-[version]: https://contributor-covenant.org/version/1/4/
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
diff --git a/lib/bundler/templates/newgem/Cargo.toml.tt b/lib/bundler/templates/newgem/Cargo.toml.tt
new file mode 100644
index 0000000000..f5a460c9bb
--- /dev/null
+++ b/lib/bundler/templates/newgem/Cargo.toml.tt
@@ -0,0 +1,7 @@
+# This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
+# a Rust project. Your extensions dependencies should be added to the Cargo.toml
+# in the ext/ directory.
+
+[workspace]
+members = ["./ext/<%= config[:name] %>"]
+resolver = "2"
diff --git a/lib/bundler/templates/newgem/Gemfile.tt b/lib/bundler/templates/newgem/Gemfile.tt
index 83878ec7f8..a0d2ac2826 100644
--- a/lib/bundler/templates/newgem/Gemfile.tt
+++ b/lib/bundler/templates/newgem/Gemfile.tt
@@ -1,12 +1,26 @@
+# frozen_string_literal: true
+
source "https://rubygems.org"
# Specify your gem's dependencies in <%= config[:name] %>.gemspec
gemspec
-gem "rake", "~> 12.0"
+gem "rake", "~> 13.0"
<%- if config[:ext] -%>
+
gem "rake-compiler"
+<%- if config[:ext] == 'rust' -%>
+gem "rb_sys", "~> 0.9.63"
+<%- end -%>
<%- end -%>
<%- if config[:test] -%>
+
gem "<%= config[:test] %>", "~> <%= config[:test_framework_version] %>"
<%- end -%>
+<%- if config[:linter] == "rubocop" -%>
+
+gem "rubocop", "~> <%= config[:linter_version] %>"
+<%- elsif config[:linter] == "standard" -%>
+
+gem "standard", "~> <%= config[:linter_version] %>"
+<%- end -%>
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index c2f5f9dca7..20eaac8a62 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -1,24 +1,20 @@
# <%= config[:constant_name] %>
-Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%= config[:namespaced_path] %>`. To experiment with that code, run `bin/console` for an interactive prompt.
+TODO: Delete this and the text below, and describe your gem
-TODO: Delete this and the text above, and describe your gem
+Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%= config[:namespaced_path] %>`. To experiment with that code, run `bin/console` for an interactive prompt.
## Installation
-Add this line to your application's Gemfile:
-
-```ruby
-gem '<%= config[:name] %>'
-```
+TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
-And then execute:
+Install the gem and add to the application's Gemfile by executing:
- $ bundle install
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
-Or install it yourself as:
+If bundler is not being used to manage dependencies, install the gem by executing:
- $ gem install <%= config[:name] %>
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
## Usage
@@ -28,21 +24,22 @@ TODO: Write usage instructions here
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test].sub('mini', '').sub('rspec', 'spec') %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+<% if config[:git] -%>
## Contributing
-Bug reports and pull requests are welcome on GitHub at https://github.com/<%= config[:github_username] %>/<%= config[:name] %>.<% if config[:coc] %> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md).<% end %>
-
+Bug reports and pull requests are welcome on GitHub at https://github.com/<%= config[:github_username] %>/<%= config[:name] %>.<% if config[:coc] %> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/<%= config[:git_default_branch] %>/CODE_OF_CONDUCT.md).<% end %>
+<% end -%>
<% if config[:mit] -%>
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
<% end -%>
-<% if config[:coc] -%>
+<% if config[:git] && config[:coc] -%>
## Code of Conduct
-Everyone interacting in the <%= config[:constant_name] %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md).
+Everyone interacting in the <%= config[:constant_name] %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/<%= config[:git_default_branch] %>/CODE_OF_CONDUCT.md).
<% end -%>
diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt
index 099da6f3ec..b5a5c4e392 100644
--- a/lib/bundler/templates/newgem/Rakefile.tt
+++ b/lib/bundler/templates/newgem/Rakefile.tt
@@ -1,5 +1,18 @@
+# frozen_string_literal: true
+
require "bundler/gem_tasks"
-<% if config[:test] == "minitest" -%>
+<% default_task_names = [config[:test_task]].compact -%>
+<% case config[:test] -%>
+<% when "minitest" -%>
+require "rake/testtask"
+
+Rake::TestTask.new(:test) do |t|
+ t.libs << "test"
+ t.libs << "lib"
+ t.test_files = FileList["test/**/test_*.rb"]
+end
+
+<% when "test-unit" -%>
require "rake/testtask"
Rake::TestTask.new(:test) do |t|
@@ -8,22 +21,47 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/*_test.rb"]
end
-<% elsif config[:test] == "rspec" -%>
+<% when "rspec" -%>
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
<% end -%>
+<% if config[:linter] == "rubocop" -%>
+<% default_task_names << :rubocop -%>
+require "rubocop/rake_task"
+
+RuboCop::RakeTask.new
+
+<% elsif config[:linter] == "standard" -%>
+<% default_task_names << :standard -%>
+require "standard/rake"
+
+<% end -%>
<% if config[:ext] -%>
+<% default_task_names.unshift(:compile) -%>
+<% default_task_names.unshift(:clobber) unless config[:ext] == 'rust' -%>
+<% if config[:ext] == 'rust' -%>
+require "rb_sys/extensiontask"
+
+task build: :compile
+
+RbSys::ExtensionTask.new(<%= config[:name].inspect %>) do |ext|
+ ext.lib_dir = "lib/<%= config[:namespaced_path] %>"
+end
+<% else -%>
require "rake/extensiontask"
-task :build => :compile
+task build: :compile
Rake::ExtensionTask.new("<%= config[:underscored_name] %>") do |ext|
ext.lib_dir = "lib/<%= config[:namespaced_path] %>"
end
+<% end -%>
-task :default => [:clobber, :compile, :<%= config[:test_task] %>]
+<% end -%>
+<% if default_task_names.size == 1 -%>
+task default: <%= default_task_names.first.inspect %>
<% else -%>
-task :default => :<%= config[:test_task] %>
+task default: %i[<%= default_task_names.join(" ") %>]
<% end -%>
diff --git a/lib/bundler/templates/newgem/bin/console.tt b/lib/bundler/templates/newgem/bin/console.tt
index a27f82430f..c91ee65f93 100644
--- a/lib/bundler/templates/newgem/bin/console.tt
+++ b/lib/bundler/templates/newgem/bin/console.tt
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
require "bundler/setup"
require "<%= config[:namespaced_path] %>"
@@ -6,9 +7,5 @@ require "<%= config[:namespaced_path] %>"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
-# (If you use this, don't forget to add pry to your Gemfile!)
-# require "pry"
-# Pry.start
-
require "irb"
IRB.start(__FILE__)
diff --git a/lib/bundler/templates/newgem/circleci/config.yml.tt b/lib/bundler/templates/newgem/circleci/config.yml.tt
new file mode 100644
index 0000000000..f40f029bf1
--- /dev/null
+++ b/lib/bundler/templates/newgem/circleci/config.yml.tt
@@ -0,0 +1,25 @@
+version: 2.1
+jobs:
+ build:
+ docker:
+ - image: ruby:<%= RUBY_VERSION %>
+<%- if config[:ext] == 'rust' -%>
+ environment:
+ RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN: 'true'
+<%- end -%>
+ steps:
+ - checkout
+<%- if config[:ext] == 'rust' -%>
+ - run:
+ name: Install Rust/Cargo dependencies
+ command: apt-get update && apt-get install -y clang
+ - run:
+ name: Install a RubyGems version that can compile rust extensions
+ command: gem update --system '<%= ::Gem.rubygems_version %>'
+<%- end -%>
+ - run:
+ name: Run the default task
+ command: |
+ gem install bundler -v <%= Bundler::VERSION %>
+ bundle install
+ bundle exec rake
diff --git a/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt b/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt
new file mode 100644
index 0000000000..c64385486e
--- /dev/null
+++ b/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt
@@ -0,0 +1,15 @@
+[package]
+name = <%= config[:name].inspect %>
+version = "0.1.0"
+edition = "2021"
+authors = ["<%= config[:author] %> <<%= config[:email] %>>"]
+<%- if config[:mit] -%>
+license = "MIT"
+<%- end -%>
+publish = false
+
+[lib]
+crate-type = ["cdylib"]
+
+[dependencies]
+magnus = { version = "0.6" }
diff --git a/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt b/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt
new file mode 100644
index 0000000000..0a0c5a3d09
--- /dev/null
+++ b/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require "mkmf"
+
+# Makes all symbols private by default to avoid unintended conflict
+# with other gems. To explicitly export symbols you can use RUBY_FUNC_EXPORTED
+# selectively, or entirely remove this flag.
+append_cflags("-fvisibility=hidden")
+
+create_makefile(<%= config[:makefile_path].inspect %>)
diff --git a/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt b/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt
new file mode 100644
index 0000000000..e24566a17a
--- /dev/null
+++ b/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+
+require "mkmf"
+require "rb_sys/mkmf"
+
+create_rust_makefile(<%= config[:makefile_path].inspect %>)
diff --git a/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt b/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
deleted file mode 100644
index 8cfc828f94..0000000000
--- a/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt
+++ /dev/null
@@ -1,3 +0,0 @@
-require "mkmf"
-
-create_makefile(<%= config[:makefile_path].inspect %>)
diff --git a/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt b/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
index 8177c4d202..bcd5148569 100644
--- a/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
+++ b/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt
@@ -2,7 +2,7 @@
VALUE rb_m<%= config[:constant_array].join %>;
-void
+RUBY_FUNC_EXPORTED void
Init_<%= config[:underscored_name] %>(void)
{
rb_m<%= config[:constant_array].join %> = rb_define_module(<%= config[:constant_name].inspect %>);
diff --git a/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt b/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt
new file mode 100644
index 0000000000..ba234529a3
--- /dev/null
+++ b/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt
@@ -0,0 +1,12 @@
+use magnus::{function, prelude::*, Error, Ruby};
+
+fn hello(subject: String) -> String {
+ format!("Hello from Rust, {subject}!")
+}
+
+#[magnus::init]
+fn init(ruby: &Ruby) -> Result<(), Error> {
+ let module = ruby.<%= config[:constant_array].map {|c| "define_module(#{c.dump})?"}.join(".") %>;
+ module.define_singleton_method("hello", function!(hello, 1))?;
+ Ok(())
+}
diff --git a/lib/bundler/templates/newgem/github/workflows/main.yml.tt b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
new file mode 100644
index 0000000000..be58dd8156
--- /dev/null
+++ b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
@@ -0,0 +1,37 @@
+name: Ruby
+
+on:
+ push:
+ branches:
+ - <%= config[:git_default_branch] %>
+
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Ruby ${{ matrix.ruby }}
+ strategy:
+ matrix:
+ ruby:
+ - '<%= RUBY_VERSION %>'
+
+ steps:
+ - uses: actions/checkout@v3
+<%- if config[:ext] == 'rust' -%>
+ - name: Set up Ruby & Rust
+ uses: oxidize-rb/actions/setup-ruby-and-rust@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler-cache: true
+ cargo-cache: true
+ rubygems: '<%= ::Gem.rubygems_version %>'
+<%- else -%>
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ bundler-cache: true
+<%- end -%>
+ - name: Run the default task
+ run: bundle exec rake
diff --git a/lib/bundler/templates/newgem/gitignore.tt b/lib/bundler/templates/newgem/gitignore.tt
index b1c9f9986c..9b40ba5a58 100644
--- a/lib/bundler/templates/newgem/gitignore.tt
+++ b/lib/bundler/templates/newgem/gitignore.tt
@@ -12,6 +12,9 @@
*.o
*.a
mkmf.log
+<%- if config[:ext] == 'rust' -%>
+target/
+<%- end -%>
<%- end -%>
<%- if config[:test] == "rspec" -%>
diff --git a/lib/bundler/templates/newgem/gitlab-ci.yml.tt b/lib/bundler/templates/newgem/gitlab-ci.yml.tt
new file mode 100644
index 0000000000..d2e1f33736
--- /dev/null
+++ b/lib/bundler/templates/newgem/gitlab-ci.yml.tt
@@ -0,0 +1,18 @@
+default:
+ image: ruby:<%= RUBY_VERSION %>
+
+ before_script:
+<%- if config[:ext] == 'rust' -%>
+ - apt-get update && apt-get install -y clang
+ - gem update --system '<%= ::Gem.rubygems_version %>'
+<%- end -%>
+ - gem install bundler -v <%= Bundler::VERSION %>
+ - bundle install
+
+example_job:
+<%- if config[:ext] == 'rust' -%>
+ variables:
+ RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN: 'true'
+<%- end -%>
+ script:
+ - bundle exec rake
diff --git a/lib/bundler/templates/newgem/lib/newgem.rb.tt b/lib/bundler/templates/newgem/lib/newgem.rb.tt
index fae6337c3e..caf6e32f4a 100644
--- a/lib/bundler/templates/newgem/lib/newgem.rb.tt
+++ b/lib/bundler/templates/newgem/lib/newgem.rb.tt
@@ -1,6 +1,8 @@
-require "<%= config[:namespaced_path] %>/version"
+# frozen_string_literal: true
+
+require_relative "<%= File.basename(config[:namespaced_path]) %>/version"
<%- if config[:ext] -%>
-require "<%= config[:namespaced_path] %>/<%= config[:underscored_name] %>"
+require_relative "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
<%- end -%>
<%- config[:constant_array].each_with_index do |c, i| -%>
diff --git a/lib/bundler/templates/newgem/lib/newgem/version.rb.tt b/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
index 389daf5048..b5cd4cb232 100644
--- a/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
+++ b/lib/bundler/templates/newgem/lib/newgem/version.rb.tt
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
<%- config[:constant_array].each_with_index do |c, i| -%>
<%= " " * i %>module <%= c %>
<%- end -%>
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index 9bb3d0ff50..bb76680379 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -1,20 +1,25 @@
-require_relative 'lib/<%=config[:namespaced_path]%>/version'
+# frozen_string_literal: true
+
+require_relative "lib/<%=config[:namespaced_path]%>/version"
Gem::Specification.new do |spec|
- spec.name = <%= config[:name].inspect %>
- spec.version = <%= config[:constant_name] %>::VERSION
- spec.authors = [<%= config[:author].inspect %>]
- spec.email = [<%= config[:email].inspect %>]
-
- spec.summary = %q{TODO: Write a short summary, because RubyGems requires one.}
- spec.description = %q{TODO: Write a longer description or delete this line.}
- spec.homepage = "TODO: Put your gem's website or public repo URL here."
+ spec.name = <%= config[:name].inspect %>
+ spec.version = <%= config[:constant_name] %>::VERSION
+ spec.authors = [<%= config[:author].inspect %>]
+ spec.email = [<%= config[:email].inspect %>]
+
+ spec.summary = "TODO: Write a short summary, because RubyGems requires one."
+ spec.description = "TODO: Write a longer description or delete this line."
+ spec.homepage = "TODO: Put your gem's website or public repo URL here."
<%- if config[:mit] -%>
- spec.license = "MIT"
+ spec.license = "MIT"
+<%- end -%>
+ spec.required_ruby_version = ">= <%= config[:required_ruby_version] %>"
+<%- if config[:ext] == 'rust' -%>
+ spec.required_rubygems_version = ">= <%= config[:rust_builder_required_rubygems_version] %>"
<%- end -%>
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
- spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
+ spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
@@ -22,13 +27,25 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ spec.files = Dir.chdir(__dir__) do
+ `git ls-files -z`.split("\x0").reject do |f|
+ (File.expand_path(f) == __FILE__) ||
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
+ end
end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
-<%- if config[:ext] -%>
- spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
+<%- if config[:ext] == 'c' -%>
+ spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
<%- end -%>
+<%- if config[:ext] == 'rust' -%>
+ spec.extensions = ["ext/<%= config[:underscored_name] %>/Cargo.toml"]
+<%- end -%>
+
+ # Uncomment to register a new dependency of your gem
+ # spec.add_dependency "example-gem", "~> 1.0"
+
+ # For more information and examples about making a new gem, check out our
+ # guide at: https://bundler.io/guides/creating_gem.html
end
diff --git a/lib/bundler/templates/newgem/rubocop.yml.tt b/lib/bundler/templates/newgem/rubocop.yml.tt
new file mode 100644
index 0000000000..9ecec78807
--- /dev/null
+++ b/lib/bundler/templates/newgem/rubocop.yml.tt
@@ -0,0 +1,13 @@
+AllCops:
+ TargetRubyVersion: <%= ::Gem::Version.new(config[:required_ruby_version]).segments[0..1].join(".") %>
+
+Style/StringLiterals:
+ Enabled: true
+ EnforcedStyle: double_quotes
+
+Style/StringLiteralsInInterpolation:
+ Enabled: true
+ EnforcedStyle: double_quotes
+
+Layout/LineLength:
+ Max: 120
diff --git a/lib/bundler/templates/newgem/sig/newgem.rbs.tt b/lib/bundler/templates/newgem/sig/newgem.rbs.tt
new file mode 100644
index 0000000000..eb7b380bbb
--- /dev/null
+++ b/lib/bundler/templates/newgem/sig/newgem.rbs.tt
@@ -0,0 +1,8 @@
+<%- config[:constant_array].each_with_index do |c, i| -%>
+<%= " " * i %>module <%= c %>
+<%- end -%>
+<%= " " * config[:constant_array].size %>VERSION: String
+<%= " " * config[:constant_array].size %># See the writing guide of rbs: https://github.com/ruby/rbs#guides
+<%- (config[:constant_array].size-1).downto(0) do |i| -%>
+<%= " " * i %>end
+<%- end -%>
diff --git a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
index c63b487830..82cada988c 100644
--- a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
+++ b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec.describe <%= config[:constant_name] %> do
it "has a version number" do
expect(<%= config[:constant_name] %>::VERSION).not_to be nil
diff --git a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
index 805cf57e01..70c6d1fcde 100644
--- a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
+++ b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
@@ -1,4 +1,5 @@
-require "bundler/setup"
+# frozen_string_literal: true
+
require "<%= config[:namespaced_path] %>"
RSpec.configure do |config|
diff --git a/lib/bundler/templates/newgem/standard.yml.tt b/lib/bundler/templates/newgem/standard.yml.tt
new file mode 100644
index 0000000000..934b0b2c37
--- /dev/null
+++ b/lib/bundler/templates/newgem/standard.yml.tt
@@ -0,0 +1,3 @@
+# For available configuration options, see:
+# https://github.com/testdouble/standard
+ruby_version: <%= ::Gem::Version.new(config[:required_ruby_version]).segments[0..1].join(".") %>
diff --git a/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt b/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
new file mode 100644
index 0000000000..e05c387bfa
--- /dev/null
+++ b/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+
+$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
+require "<%= config[:namespaced_path] %>"
+
+require "minitest/autorun"
diff --git a/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt b/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
new file mode 100644
index 0000000000..4b35a63071
--- /dev/null
+++ b/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+require "test_helper"
+
+class <%= config[:minitest_constant_name] %> < Minitest::Test
+ def test_that_it_has_a_version_number
+ refute_nil ::<%= config[:constant_name] %>::VERSION
+ end
+
+ def test_it_does_something_useful
+ assert false
+ end
+end
diff --git a/lib/bundler/templates/newgem/test/newgem_test.rb.tt b/lib/bundler/templates/newgem/test/newgem_test.rb.tt
deleted file mode 100644
index f2af9f90e0..0000000000
--- a/lib/bundler/templates/newgem/test/newgem_test.rb.tt
+++ /dev/null
@@ -1,11 +0,0 @@
-require "test_helper"
-
-class <%= config[:constant_name] %>Test < Minitest::Test
- def test_that_it_has_a_version_number
- refute_nil ::<%= config[:constant_name] %>::VERSION
- end
-
- def test_it_does_something_useful
- assert false
- end
-end
diff --git a/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt b/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
new file mode 100644
index 0000000000..5c61094e62
--- /dev/null
+++ b/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+require "test_helper"
+
+class <%= config[:constant_name] %>Test < Test::Unit::TestCase
+ test "VERSION" do
+ assert do
+ ::<%= config[:constant_name] %>.const_defined?(:VERSION)
+ end
+ end
+
+ test "something useful" do
+ assert_equal("expected", "actual")
+ end
+end
diff --git a/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt b/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
new file mode 100644
index 0000000000..6f633c6039
--- /dev/null
+++ b/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+
+$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
+require "<%= config[:namespaced_path] %>"
+
+require "test-unit"
diff --git a/lib/bundler/templates/newgem/test/test_helper.rb.tt b/lib/bundler/templates/newgem/test/test_helper.rb.tt
deleted file mode 100644
index 7d7db165ec..0000000000
--- a/lib/bundler/templates/newgem/test/test_helper.rb.tt
+++ /dev/null
@@ -1,4 +0,0 @@
-$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
-require "<%= config[:namespaced_path] %>"
-
-require "minitest/autorun"
diff --git a/lib/bundler/templates/newgem/travis.yml.tt b/lib/bundler/templates/newgem/travis.yml.tt
deleted file mode 100644
index eab16addca..0000000000
--- a/lib/bundler/templates/newgem/travis.yml.tt
+++ /dev/null
@@ -1,6 +0,0 @@
----
-language: ruby
-cache: bundler
-rvm:
- - <%= RUBY_VERSION %>
-before_install: gem install bundler -v <%= Bundler::VERSION %>
diff --git a/lib/bundler/ui/rg_proxy.rb b/lib/bundler/ui/rg_proxy.rb
index ef6def225b..b17ca65f53 100644
--- a/lib/bundler/ui/rg_proxy.rb
+++ b/lib/bundler/ui/rg_proxy.rb
@@ -12,7 +12,7 @@ module Bundler
end
def say(message)
- @ui && @ui.debug(message)
+ @ui&.debug(message)
end
end
end
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 92476be7d2..4139585c47 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -20,29 +20,52 @@ module Bundler
@shell.set_color(string, *color)
end
- def info(msg, newline = nil)
- tell_me(msg, nil, newline) if level("info")
+ def info(msg = nil, newline = nil)
+ return unless info?
+
+ tell_me(msg || yield, nil, newline)
end
- def confirm(msg, newline = nil)
- tell_me(msg, :green, newline) if level("confirm")
+ def confirm(msg = nil, newline = nil)
+ return unless confirm?
+
+ tell_me(msg || yield, :green, newline)
end
- def warn(msg, newline = nil)
- return unless level("warn")
+ def warn(msg = nil, newline = nil, color = :yellow)
+ return unless warn?
return if @warning_history.include? msg
@warning_history << msg
- tell_err(msg, :yellow, newline)
+ tell_err(msg || yield, color, newline)
+ end
+
+ def error(msg = nil, newline = nil, color = :red)
+ return unless error?
+
+ tell_err(msg || yield, color, newline)
+ end
+
+ def debug(msg = nil, newline = nil)
+ return unless debug?
+
+ tell_me(msg || yield, nil, newline)
+ end
+
+ def info?
+ level("info")
+ end
+
+ def confirm?
+ level("confirm")
end
- def error(msg, newline = nil)
- return unless level("error")
- tell_err(msg, :red, newline)
+ def warn?
+ level("warn")
end
- def debug(msg, newline = nil)
- tell_me(msg, nil, newline) if debug?
+ def error?
+ level("error")
end
def debug?
@@ -81,7 +104,7 @@ module Bundler
def trace(e, newline = nil, force = false)
return unless debug? || force
msg = "#{e.class}: #{e.message}\n#{e.backtrace.join("\n ")}"
- tell_me(msg, nil, newline)
+ tell_err(msg, nil, newline)
end
def silence(&blk)
@@ -92,7 +115,7 @@ module Bundler
[]
end
- private
+ private
# valimism
def tell_me(msg, color = nil, newline = nil)
diff --git a/lib/bundler/ui/silent.rb b/lib/bundler/ui/silent.rb
index dca1b2ac86..fa3292bdc9 100644
--- a/lib/bundler/ui/silent.rb
+++ b/lib/bundler/ui/silent.rb
@@ -13,30 +13,46 @@ module Bundler
string
end
- def info(message, newline = nil)
+ def info(message = nil, newline = nil)
end
- def confirm(message, newline = nil)
+ def confirm(message = nil, newline = nil)
end
- def warn(message, newline = nil)
+ def warn(message = nil, newline = nil)
@warnings |= [message]
end
- def error(message, newline = nil)
+ def error(message = nil, newline = nil)
end
- def debug(message, newline = nil)
+ def debug(message = nil, newline = nil)
+ end
+
+ def confirm?
+ false
+ end
+
+ def error?
+ false
end
def debug?
false
end
+ def info?
+ false
+ end
+
def quiet?
false
end
+ def warn?
+ false
+ end
+
def ask(message)
end
diff --git a/lib/bundler/uri_credentials_filter.rb b/lib/bundler/uri_credentials_filter.rb
index 9b9e9c2799..ccfaf0bc5d 100644
--- a/lib/bundler/uri_credentials_filter.rb
+++ b/lib/bundler/uri_credentials_filter.rb
@@ -2,12 +2,14 @@
module Bundler
module URICredentialsFilter
- module_function
+ module_function
def credential_filtered_uri(uri_to_anonymize)
return uri_to_anonymize if uri_to_anonymize.nil?
uri = uri_to_anonymize.dup
if uri.is_a?(String)
+ return uri if File.exist?(uri)
+
require_relative "vendored_uri"
uri = Bundler::URI(uri)
end
diff --git a/lib/bundler/uri_normalizer.rb b/lib/bundler/uri_normalizer.rb
new file mode 100644
index 0000000000..ad08593256
--- /dev/null
+++ b/lib/bundler/uri_normalizer.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module Bundler
+ module URINormalizer
+ module_function
+
+ # Normalizes uri to a consistent version, either with or without trailing
+ # slash.
+ #
+ # TODO: Currently gem sources are locked with a trailing slash, while git
+ # sources are locked without a trailing slash. This should be normalized but
+ # the inconsistency is there for now to avoid changing all lockfiles
+ # including GIT sources. We could normalize this on the next major.
+ #
+ def normalize_suffix(uri, trailing_slash: true)
+ if trailing_slash
+ uri.end_with?("/") ? uri : "#{uri}/"
+ else
+ uri.end_with?("/") ? uri.delete_suffix("/") : uri
+ end
+ end
+ end
+end
diff --git a/lib/bundler/vendor/.document b/lib/bundler/vendor/.document
new file mode 100644
index 0000000000..0c43bbd6b3
--- /dev/null
+++ b/lib/bundler/vendor/.document
@@ -0,0 +1 @@
+# Vendored files do not need to be documented
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
index fbcd26c765..455319efe3 100644
--- a/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
+++ b/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
@@ -1,14 +1,20 @@
-require_relative 'connection_pool/version'
-require_relative 'connection_pool/timed_stack'
+require "timeout"
+require_relative "connection_pool/version"
+class Bundler::ConnectionPool
+ class Error < ::RuntimeError; end
+
+ class PoolShuttingDownError < ::Bundler::ConnectionPool::Error; end
-# Generic connection pool class for e.g. sharing a limited number of network connections
-# among many threads. Note: Connections are lazily created.
+ class TimeoutError < ::Timeout::Error; end
+end
+
+# Generic connection pool class for sharing a limited number of objects or network connections
+# among many threads. Note: pool elements are lazily created.
#
# Example usage with block (faster):
#
# @pool = Bundler::ConnectionPool.new { Redis.new }
-#
# @pool.with do |redis|
# redis.lpop('my-list') if redis.llen('my-list') > 0
# end
@@ -34,29 +40,23 @@ require_relative 'connection_pool/timed_stack'
class Bundler::ConnectionPool
DEFAULTS = {size: 5, timeout: 5}
- class Error < RuntimeError
- end
-
def self.wrap(options, &block)
Wrapper.new(options, &block)
end
def initialize(options = {}, &block)
- raise ArgumentError, 'Connection pool requires a block' unless block
+ raise ArgumentError, "Connection pool requires a block" unless block
options = DEFAULTS.merge(options)
- @size = options.fetch(:size)
+ @size = Integer(options.fetch(:size))
@timeout = options.fetch(:timeout)
@available = TimedStack.new(@size, &block)
- @key = :"current-#{@available.object_id}"
- @key_count = :"current-#{@available.object_id}-count"
+ @key = :"pool-#{@available.object_id}"
+ @key_count = :"pool-#{@available.object_id}-count"
end
-if Thread.respond_to?(:handle_interrupt)
-
- # MRI
def with(options = {})
Thread.handle_interrupt(Exception => :never) do
conn = checkout(options)
@@ -69,28 +69,15 @@ if Thread.respond_to?(:handle_interrupt)
end
end
end
-
-else
-
- # jruby 1.7.x
- def with(options = {})
- conn = checkout(options)
- begin
- yield conn
- ensure
- checkin
- end
- end
-
-end
+ alias_method :then, :with
def checkout(options = {})
if ::Thread.current[@key]
- ::Thread.current[@key_count]+= 1
+ ::Thread.current[@key_count] += 1
::Thread.current[@key]
else
- ::Thread.current[@key_count]= 1
- ::Thread.current[@key]= @available.pop(options[:timeout] || @timeout)
+ ::Thread.current[@key_count] = 1
+ ::Thread.current[@key] = @available.pop(options[:timeout] || @timeout)
end
end
@@ -98,64 +85,44 @@ end
if ::Thread.current[@key]
if ::Thread.current[@key_count] == 1
@available.push(::Thread.current[@key])
- ::Thread.current[@key]= nil
+ ::Thread.current[@key] = nil
+ ::Thread.current[@key_count] = nil
else
- ::Thread.current[@key_count]-= 1
+ ::Thread.current[@key_count] -= 1
end
else
- raise Bundler::ConnectionPool::Error, 'no connections are checked out'
+ raise Bundler::ConnectionPool::Error, "no connections are checked out"
end
nil
end
+ ##
+ # Shuts down the Bundler::ConnectionPool by passing each connection to +block+ and
+ # then removing it from the pool. Attempting to checkout a connection after
+ # shutdown will raise +Bundler::ConnectionPool::PoolShuttingDownError+.
+
def shutdown(&block)
@available.shutdown(&block)
end
- # Size of this connection pool
- def size
- @size
+ ##
+ # Reloads the Bundler::ConnectionPool by passing each connection to +block+ and then
+ # removing it the pool. Subsequent checkouts will create new connections as
+ # needed.
+
+ def reload(&block)
+ @available.shutdown(reload: true, &block)
end
+ # Size of this connection pool
+ attr_reader :size
+
# Number of pool entries available for checkout at this instant.
def available
@available.length
end
-
- private
-
- class Wrapper < ::BasicObject
- METHODS = [:with, :pool_shutdown]
-
- def initialize(options = {}, &block)
- @pool = options.fetch(:pool) { ::Bundler::ConnectionPool.new(options, &block) }
- end
-
- def with(&block)
- @pool.with(&block)
- end
-
- def pool_shutdown(&block)
- @pool.shutdown(&block)
- end
-
- def pool_size
- @pool.size
- end
-
- def pool_available
- @pool.available
- end
-
- def respond_to?(id, *args)
- METHODS.include?(id) || with { |c| c.respond_to?(id, *args) }
- end
-
- def method_missing(name, *args, &block)
- with do |connection|
- connection.send(name, *args, &block)
- end
- end
- end
end
+
+require_relative "connection_pool/timed_stack"
+require_relative "connection_pool/wrapper"
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb
deleted file mode 100644
index 5a9c4a27bb..0000000000
--- a/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# Global monotonic clock from Concurrent Ruby 1.0.
-# Copyright (c) Jerry D'Antonio -- released under the MIT license.
-# Slightly modified; used with permission.
-# https://github.com/ruby-concurrency/concurrent-ruby
-
-require 'thread'
-
-class Bundler::ConnectionPool
-
- class_definition = Class.new do
-
- if defined?(Process::CLOCK_MONOTONIC)
-
- # @!visibility private
- def get_time
- Process.clock_gettime(Process::CLOCK_MONOTONIC)
- end
-
- elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
-
- # @!visibility private
- def get_time
- java.lang.System.nanoTime() / 1_000_000_000.0
- end
-
- else
-
- # @!visibility private
- def initialize
- @mutex = Mutex.new
- @last_time = Time.now.to_f
- end
-
- # @!visibility private
- def get_time
- @mutex.synchronize do
- now = Time.now.to_f
- if @last_time < now
- @last_time = now
- else # clock has moved back in time
- @last_time += 0.000_001
- end
- end
- end
- end
- end
-
- ##
- # Clock that cannot be set and represents monotonic time since
- # some unspecified starting point.
- #
- # @!visibility private
- GLOBAL_MONOTONIC_CLOCK = class_definition.new
- private_constant :GLOBAL_MONOTONIC_CLOCK
-
- class << self
- ##
- # Returns the current time a tracked by the application monotonic clock.
- #
- # @return [Float] The current monotonic time when `since` not given else
- # the elapsed monotonic time between `since` and the current time
- def monotonic_time
- GLOBAL_MONOTONIC_CLOCK.get_time
- end
- end
-end
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
index f3fe1e04ad..35d1d7cc35 100644
--- a/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
+++ b/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
@@ -1,13 +1,3 @@
-require 'thread'
-require 'timeout'
-require_relative 'monotonic_time'
-
-##
-# Raised when you attempt to retrieve a connection from a pool that has been
-# shut down.
-
-class Bundler::ConnectionPool::PoolShuttingDownError < RuntimeError; end
-
##
# The TimedStack manages a pool of homogeneous connections (or any resource
# you wish to manage). Connections are created lazily up to a given maximum
@@ -25,7 +15,7 @@ class Bundler::ConnectionPool::PoolShuttingDownError < RuntimeError; end
#
# conn = ts.pop
# ts.pop timeout: 5
-# #=> raises Timeout::Error after 5 seconds
+# #=> raises Bundler::ConnectionPool::TimeoutError after 5 seconds
class Bundler::ConnectionPool::TimedStack
attr_reader :max
@@ -39,8 +29,8 @@ class Bundler::ConnectionPool::TimedStack
@created = 0
@que = []
@max = size
- @mutex = Mutex.new
- @resource = ConditionVariable.new
+ @mutex = Thread::Mutex.new
+ @resource = Thread::ConditionVariable.new
@shutdown_block = nil
end
@@ -64,7 +54,7 @@ class Bundler::ConnectionPool::TimedStack
##
# Retrieves a connection from the stack. If a connection is available it is
# immediately returned. If no connection is available within the given
- # timeout a Timeout::Error is raised.
+ # timeout a Bundler::ConnectionPool::TimeoutError is raised.
#
# +:timeout+ is the only checked entry in +options+ and is preferred over
# the +timeout+ argument (which will be removed in a future release). Other
@@ -74,7 +64,7 @@ class Bundler::ConnectionPool::TimedStack
options, timeout = timeout, 0.5 if Hash === timeout
timeout = options.fetch :timeout, timeout
- deadline = Bundler::ConnectionPool.monotonic_time + timeout
+ deadline = current_time + timeout
@mutex.synchronize do
loop do
raise Bundler::ConnectionPool::PoolShuttingDownError if @shutdown_block
@@ -83,25 +73,28 @@ class Bundler::ConnectionPool::TimedStack
connection = try_create(options)
return connection if connection
- to_wait = deadline - Bundler::ConnectionPool.monotonic_time
- raise Timeout::Error, "Waited #{timeout} sec" if to_wait <= 0
+ to_wait = deadline - current_time
+ raise Bundler::ConnectionPool::TimeoutError, "Waited #{timeout} sec, #{length}/#{@max} available" if to_wait <= 0
@resource.wait(@mutex, to_wait)
end
end
end
##
- # Shuts down the TimedStack which prevents connections from being checked
- # out. The +block+ is called once for each connection on the stack.
+ # Shuts down the TimedStack by passing each connection to +block+ and then
+ # removing it from the pool. Attempting to checkout a connection after
+ # shutdown will raise +Bundler::ConnectionPool::PoolShuttingDownError+ unless
+ # +:reload+ is +true+.
- def shutdown(&block)
- raise ArgumentError, "shutdown must receive a block" unless block_given?
+ def shutdown(reload: false, &block)
+ raise ArgumentError, "shutdown must receive a block" unless block
@mutex.synchronize do
@shutdown_block = block
@resource.broadcast
shutdown_connections
+ @shutdown_block = nil if reload
end
end
@@ -121,6 +114,10 @@ class Bundler::ConnectionPool::TimedStack
private
+ def current_time
+ Process.clock_gettime(Process::CLOCK_MONOTONIC)
+ end
+
##
# This is an extension point for TimedStack and is called with a mutex.
#
@@ -149,6 +146,7 @@ class Bundler::ConnectionPool::TimedStack
conn = fetch_connection(options)
@shutdown_block.call(conn)
end
+ @created = 0
end
##
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
index b149c0e242..56ebf69902 100644
--- a/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
+++ b/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
@@ -1,3 +1,3 @@
class Bundler::ConnectionPool
- VERSION = "2.2.2"
+ VERSION = "2.3.0"
end
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
new file mode 100644
index 0000000000..dd796d1021
--- /dev/null
+++ b/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
@@ -0,0 +1,56 @@
+class Bundler::ConnectionPool
+ class Wrapper < ::BasicObject
+ METHODS = [:with, :pool_shutdown, :wrapped_pool]
+
+ def initialize(options = {}, &block)
+ @pool = options.fetch(:pool) { ::Bundler::ConnectionPool.new(options, &block) }
+ end
+
+ def wrapped_pool
+ @pool
+ end
+
+ def with(&block)
+ @pool.with(&block)
+ end
+
+ def pool_shutdown(&block)
+ @pool.shutdown(&block)
+ end
+
+ def pool_size
+ @pool.size
+ end
+
+ def pool_available
+ @pool.available
+ end
+
+ def respond_to?(id, *args)
+ METHODS.include?(id) || with { |c| c.respond_to?(id, *args) }
+ end
+
+ # rubocop:disable Style/MissingRespondToMissing
+ if ::RUBY_VERSION >= "3.0.0"
+ def method_missing(name, *args, **kwargs, &block)
+ with do |connection|
+ connection.send(name, *args, **kwargs, &block)
+ end
+ end
+ elsif ::RUBY_VERSION >= "2.7.0"
+ ruby2_keywords def method_missing(name, *args, &block)
+ with do |connection|
+ connection.send(name, *args, &block)
+ end
+ end
+ else
+ def method_missing(name, *args, &block)
+ with do |connection|
+ connection.send(name, *args, &block)
+ end
+ end
+ end
+ # rubocop:enable Style/MethodMissingSuper
+ # rubocop:enable Style/MissingRespondToMissing
+ end
+end
diff --git a/lib/bundler/vendor/fileutils/lib/fileutils.rb b/lib/bundler/vendor/fileutils/lib/fileutils.rb
index 8f8faf30c8..211311c069 100644
--- a/lib/bundler/vendor/fileutils/lib/fileutils.rb
+++ b/lib/bundler/vendor/fileutils/lib/fileutils.rb
@@ -3,106 +3,184 @@
begin
require 'rbconfig'
rescue LoadError
- # for make mjit-headers
+ # for make rjit-headers
end
+# Namespace for file utility methods for copying, moving, removing, etc.
#
-# = fileutils.rb
+# == What's Here
#
-# Copyright (c) 2000-2007 Minero Aoki
+# First, what’s elsewhere. \Module \Bundler::FileUtils:
#
-# This program is free software.
-# You can distribute/modify this program under the same terms of ruby.
+# - Inherits from {class Object}[rdoc-ref:Object].
+# - Supplements {class File}[rdoc-ref:File]
+# (but is not included or extended there).
#
-# == module Bundler::FileUtils
+# Here, module \Bundler::FileUtils provides methods that are useful for:
#
-# Namespace for several file utility methods for copying, moving, removing, etc.
+# - {Creating}[rdoc-ref:FileUtils@Creating].
+# - {Deleting}[rdoc-ref:FileUtils@Deleting].
+# - {Querying}[rdoc-ref:FileUtils@Querying].
+# - {Setting}[rdoc-ref:FileUtils@Setting].
+# - {Comparing}[rdoc-ref:FileUtils@Comparing].
+# - {Copying}[rdoc-ref:FileUtils@Copying].
+# - {Moving}[rdoc-ref:FileUtils@Moving].
+# - {Options}[rdoc-ref:FileUtils@Options].
#
-# === Module Functions
+# === Creating
#
-# require 'bundler/vendor/fileutils/lib/fileutils'
+# - ::mkdir: Creates directories.
+# - ::mkdir_p, ::makedirs, ::mkpath: Creates directories,
+# also creating ancestor directories as needed.
+# - ::link_entry: Creates a hard link.
+# - ::ln, ::link: Creates hard links.
+# - ::ln_s, ::symlink: Creates symbolic links.
+# - ::ln_sf: Creates symbolic links, overwriting if necessary.
+# - ::ln_sr: Creates symbolic links relative to targets
#
-# Bundler::FileUtils.cd(dir, **options)
-# Bundler::FileUtils.cd(dir, **options) {|dir| block }
-# Bundler::FileUtils.pwd()
-# Bundler::FileUtils.mkdir(dir, **options)
-# Bundler::FileUtils.mkdir(list, **options)
-# Bundler::FileUtils.mkdir_p(dir, **options)
-# Bundler::FileUtils.mkdir_p(list, **options)
-# Bundler::FileUtils.rmdir(dir, **options)
-# Bundler::FileUtils.rmdir(list, **options)
-# Bundler::FileUtils.ln(target, link, **options)
-# Bundler::FileUtils.ln(targets, dir, **options)
-# Bundler::FileUtils.ln_s(target, link, **options)
-# Bundler::FileUtils.ln_s(targets, dir, **options)
-# Bundler::FileUtils.ln_sf(target, link, **options)
-# Bundler::FileUtils.cp(src, dest, **options)
-# Bundler::FileUtils.cp(list, dir, **options)
-# Bundler::FileUtils.cp_r(src, dest, **options)
-# Bundler::FileUtils.cp_r(list, dir, **options)
-# Bundler::FileUtils.mv(src, dest, **options)
-# Bundler::FileUtils.mv(list, dir, **options)
-# Bundler::FileUtils.rm(list, **options)
-# Bundler::FileUtils.rm_r(list, **options)
-# Bundler::FileUtils.rm_rf(list, **options)
-# Bundler::FileUtils.install(src, dest, **options)
-# Bundler::FileUtils.chmod(mode, list, **options)
-# Bundler::FileUtils.chmod_R(mode, list, **options)
-# Bundler::FileUtils.chown(user, group, list, **options)
-# Bundler::FileUtils.chown_R(user, group, list, **options)
-# Bundler::FileUtils.touch(list, **options)
+# === Deleting
#
-# Possible <tt>options</tt> are:
+# - ::remove_dir: Removes a directory and its descendants.
+# - ::remove_entry: Removes an entry, including its descendants if it is a directory.
+# - ::remove_entry_secure: Like ::remove_entry, but removes securely.
+# - ::remove_file: Removes a file entry.
+# - ::rm, ::remove: Removes entries.
+# - ::rm_f, ::safe_unlink: Like ::rm, but removes forcibly.
+# - ::rm_r: Removes entries and their descendants.
+# - ::rm_rf, ::rmtree: Like ::rm_r, but removes forcibly.
+# - ::rmdir: Removes directories.
#
-# <tt>:force</tt> :: forced operation (rewrite files if exist, remove
-# directories if not empty, etc.);
-# <tt>:verbose</tt> :: print command to be run, in bash syntax, before
-# performing it;
-# <tt>:preserve</tt> :: preserve object's group, user and modification
-# time on copying;
-# <tt>:noop</tt> :: no changes are made (usable in combination with
-# <tt>:verbose</tt> which will print the command to run)
+# === Querying
#
-# Each method documents the options that it honours. See also ::commands,
-# ::options and ::options_of methods to introspect which command have which
-# options.
+# - ::pwd, ::getwd: Returns the path to the working directory.
+# - ::uptodate?: Returns whether a given entry is newer than given other entries.
#
-# All methods that have the concept of a "source" file or directory can take
-# either one file or a list of files in that argument. See the method
-# documentation for examples.
+# === Setting
#
-# There are some `low level' methods, which do not accept keyword arguments:
+# - ::cd, ::chdir: Sets the working directory.
+# - ::chmod: Sets permissions for an entry.
+# - ::chmod_R: Sets permissions for an entry and its descendants.
+# - ::chown: Sets the owner and group for entries.
+# - ::chown_R: Sets the owner and group for entries and their descendants.
+# - ::touch: Sets modification and access times for entries,
+# creating if necessary.
#
-# Bundler::FileUtils.copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
-# Bundler::FileUtils.copy_file(src, dest, preserve = false, dereference = true)
-# Bundler::FileUtils.copy_stream(srcstream, deststream)
-# Bundler::FileUtils.remove_entry(path, force = false)
-# Bundler::FileUtils.remove_entry_secure(path, force = false)
-# Bundler::FileUtils.remove_file(path, force = false)
-# Bundler::FileUtils.compare_file(path_a, path_b)
-# Bundler::FileUtils.compare_stream(stream_a, stream_b)
-# Bundler::FileUtils.uptodate?(file, cmp_list)
+# === Comparing
#
-# == module Bundler::FileUtils::Verbose
+# - ::compare_file, ::cmp, ::identical?: Returns whether two entries are identical.
+# - ::compare_stream: Returns whether two streams are identical.
#
-# This module has all methods of Bundler::FileUtils module, but it outputs messages
-# before acting. This equates to passing the <tt>:verbose</tt> flag to methods
-# in Bundler::FileUtils.
+# === Copying
#
-# == module Bundler::FileUtils::NoWrite
+# - ::copy_entry: Recursively copies an entry.
+# - ::copy_file: Copies an entry.
+# - ::copy_stream: Copies a stream.
+# - ::cp, ::copy: Copies files.
+# - ::cp_lr: Recursively creates hard links.
+# - ::cp_r: Recursively copies files, retaining mode, owner, and group.
+# - ::install: Recursively copies files, optionally setting mode,
+# owner, and group.
#
-# This module has all methods of Bundler::FileUtils module, but never changes
-# files/directories. This equates to passing the <tt>:noop</tt> flag to methods
-# in Bundler::FileUtils.
+# === Moving
#
-# == module Bundler::FileUtils::DryRun
+# - ::mv, ::move: Moves entries.
#
-# This module has all methods of Bundler::FileUtils module, but never changes
-# files/directories. This equates to passing the <tt>:noop</tt> and
-# <tt>:verbose</tt> flags to methods in Bundler::FileUtils.
+# === Options
+#
+# - ::collect_method: Returns the names of methods that accept a given option.
+# - ::commands: Returns the names of methods that accept options.
+# - ::have_option?: Returns whether a given method accepts a given option.
+# - ::options: Returns all option names.
+# - ::options_of: Returns the names of the options for a given method.
+#
+# == Path Arguments
+#
+# Some methods in \Bundler::FileUtils accept _path_ arguments,
+# which are interpreted as paths to filesystem entries:
+#
+# - If the argument is a string, that value is the path.
+# - If the argument has method +:to_path+, it is converted via that method.
+# - If the argument has method +:to_str+, it is converted via that method.
+#
+# == About the Examples
+#
+# Some examples here involve trees of file entries.
+# For these, we sometimes display trees using the
+# {tree command-line utility}[https://en.wikipedia.org/wiki/Tree_(command)],
+# which is a recursive directory-listing utility that produces
+# a depth-indented listing of files and directories.
+#
+# We use a helper method to launch the command and control the format:
+#
+# def tree(dirpath = '.')
+# command = "tree --noreport --charset=ascii #{dirpath}"
+# system(command)
+# end
+#
+# To illustrate:
+#
+# tree('src0')
+# # => src0
+# # |-- sub0
+# # | |-- src0.txt
+# # | `-- src1.txt
+# # `-- sub1
+# # |-- src2.txt
+# # `-- src3.txt
+#
+# == Avoiding the TOCTTOU Vulnerability
+#
+# For certain methods that recursively remove entries,
+# there is a potential vulnerability called the
+# {Time-of-check to time-of-use}[https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use],
+# or TOCTTOU, vulnerability that can exist when:
+#
+# - An ancestor directory of the entry at the target path is world writable;
+# such directories include <tt>/tmp</tt>.
+# - The directory tree at the target path includes:
+#
+# - A world-writable descendant directory.
+# - A symbolic link.
+#
+# To avoid that vulnerability, you can use this method to remove entries:
+#
+# - Bundler::FileUtils.remove_entry_secure: removes recursively
+# if the target path points to a directory.
+#
+# Also available are these methods,
+# each of which calls \Bundler::FileUtils.remove_entry_secure:
+#
+# - Bundler::FileUtils.rm_r with keyword argument <tt>secure: true</tt>.
+# - Bundler::FileUtils.rm_rf with keyword argument <tt>secure: true</tt>.
+#
+# Finally, this method for moving entries calls \Bundler::FileUtils.remove_entry_secure
+# if the source and destination are on different file systems
+# (which means that the "move" is really a copy and remove):
+#
+# - Bundler::FileUtils.mv with keyword argument <tt>secure: true</tt>.
+#
+# \Method \Bundler::FileUtils.remove_entry_secure removes securely
+# by applying a special pre-process:
+#
+# - If the target path points to a directory, this method uses methods
+# {File#chown}[rdoc-ref:File#chown]
+# and {File#chmod}[rdoc-ref:File#chmod]
+# in removing directories.
+# - The owner of the target directory should be either the current process
+# or the super user (root).
+#
+# WARNING: You must ensure that *ALL* parent directories cannot be
+# moved by other untrusted users. For example, parent directories
+# should not be owned by untrusted users, and should not be world
+# writable except when the sticky bit is set.
+#
+# For details of this security vulnerability, see Perl cases:
+#
+# - {CVE-2005-0448}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448].
+# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
#
module Bundler::FileUtils
- VERSION = "1.4.1"
+ VERSION = "1.7.0"
def self.private_module_function(name) #:nodoc:
module_function name
@@ -110,7 +188,13 @@ module Bundler::FileUtils
end
#
- # Returns the name of the current directory.
+ # Returns a string containing the path to the current directory:
+ #
+ # Bundler::FileUtils.pwd # => "/rdoc/fileutils"
+ #
+ # Bundler::FileUtils.getwd is an alias for Bundler::FileUtils.pwd.
+ #
+ # Related: Bundler::FileUtils.cd.
#
def pwd
Dir.pwd
@@ -120,19 +204,40 @@ module Bundler::FileUtils
alias getwd pwd
module_function :getwd
+ # Changes the working directory to the given +dir+, which
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:
+ #
+ # With no block given,
+ # changes the current directory to the directory at +dir+; returns zero:
+ #
+ # Bundler::FileUtils.pwd # => "/rdoc/fileutils"
+ # Bundler::FileUtils.cd('..')
+ # Bundler::FileUtils.pwd # => "/rdoc"
+ # Bundler::FileUtils.cd('fileutils')
+ #
+ # With a block given, changes the current directory to the directory
+ # at +dir+, calls the block with argument +dir+,
+ # and restores the original current directory; returns the block's value:
#
- # Changes the current directory to the directory +dir+.
+ # Bundler::FileUtils.pwd # => "/rdoc/fileutils"
+ # Bundler::FileUtils.cd('..') { |arg| [arg, Bundler::FileUtils.pwd] } # => ["..", "/rdoc"]
+ # Bundler::FileUtils.pwd # => "/rdoc/fileutils"
#
- # If this method is called with block, resumes to the previous
- # working directory after the block execution has finished.
+ # Keyword arguments:
#
- # Bundler::FileUtils.cd('/') # change directory
+ # - <tt>verbose: true</tt> - prints an equivalent command:
#
- # Bundler::FileUtils.cd('/', verbose: true) # change directory and report it
+ # Bundler::FileUtils.cd('..')
+ # Bundler::FileUtils.cd('fileutils')
#
- # Bundler::FileUtils.cd('/') do # change directory
- # # ... # do something
- # end # return to original directory
+ # Output:
+ #
+ # cd ..
+ # cd fileutils
+ #
+ # Bundler::FileUtils.chdir is an alias for Bundler::FileUtils.cd.
+ #
+ # Related: Bundler::FileUtils.pwd.
#
def cd(dir, verbose: nil, &block) # :yield: dir
fu_output_message "cd #{dir}" if verbose
@@ -146,11 +251,19 @@ module Bundler::FileUtils
module_function :chdir
#
- # Returns true if +new+ is newer than all +old_list+.
- # Non-existent files are older than any file.
+ # Returns +true+ if the file at path +new+
+ # is newer than all the files at paths in array +old_list+;
+ # +false+ otherwise.
+ #
+ # Argument +new+ and the elements of +old_list+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]:
#
- # Bundler::FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \
- # system 'make hello.o'
+ # Bundler::FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
+ # Bundler::FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false
+ #
+ # A non-existent file is considered to be infinitely old.
+ #
+ # Related: Bundler::FileUtils.touch.
#
def uptodate?(new, old_list)
return false unless File.exist?(new)
@@ -170,12 +283,39 @@ module Bundler::FileUtils
private_module_function :remove_trailing_slash
#
- # Creates one or more directories.
+ # Creates directories at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, creates a directory at each +path+ in +list+
+ # by calling: <tt>Dir.mkdir(path, mode)</tt>;
+ # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
+ #
+ # Bundler::FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
+ # Bundler::FileUtils.mkdir('tmp4') # => ["tmp4"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
+ # see {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not create directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.mkdir(%w[tmp0 tmp1], verbose: true)
+ # Bundler::FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true)
+ #
+ # Output:
#
- # Bundler::FileUtils.mkdir 'test'
- # Bundler::FileUtils.mkdir %w(tmp data)
- # Bundler::FileUtils.mkdir 'notexist', noop: true # Does not really create.
- # Bundler::FileUtils.mkdir 'tmp', mode: 0700
+ # mkdir tmp0 tmp1
+ # mkdir -m 700 tmp2 tmp3
+ #
+ # Raises an exception if any path points to an existing
+ # file or directory, or if for any reason a directory cannot be created.
+ #
+ # Related: Bundler::FileUtils.mkdir_p.
#
def mkdir(list, mode: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -189,40 +329,56 @@ module Bundler::FileUtils
module_function :mkdir
#
- # Creates a directory and all its parent directories.
- # For example,
+ # Creates directories at the paths in the given +list+
+ # (a single path or an array of paths),
+ # also creating ancestor directories as needed;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, creates a directory at each +path+ in +list+,
+ # along with any needed ancestor directories,
+ # by calling: <tt>Dir.mkdir(path, mode)</tt>;
+ # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
+ #
+ # Bundler::FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
+ # Bundler::FileUtils.mkdir_p('tmp4/tmp5') # => ["tmp4/tmp5"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
+ # see {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not create directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.mkdir_p(%w[tmp0 tmp1], verbose: true)
+ # Bundler::FileUtils.mkdir_p(%w[tmp2 tmp3], mode: 0700, verbose: true)
#
- # Bundler::FileUtils.mkdir_p '/usr/local/lib/ruby'
+ # Output:
#
- # causes to make following directories, if they do not exist.
+ # mkdir -p tmp0 tmp1
+ # mkdir -p -m 700 tmp2 tmp3
#
- # * /usr
- # * /usr/local
- # * /usr/local/lib
- # * /usr/local/lib/ruby
+ # Raises an exception if for any reason a directory cannot be created.
#
- # You can pass several directories at a time in a list.
+ # Bundler::FileUtils.mkpath and Bundler::FileUtils.makedirs are aliases for Bundler::FileUtils.mkdir_p.
+ #
+ # Related: Bundler::FileUtils.mkdir.
#
def mkdir_p(list, mode: nil, noop: nil, verbose: nil)
list = fu_list(list)
fu_output_message "mkdir -p #{mode ? ('-m %03o ' % mode) : ''}#{list.join ' '}" if verbose
return *list if noop
- list.map {|path| remove_trailing_slash(path)}.each do |path|
- # optimize for the most common case
- begin
- fu_mkdir path, mode
- next
- rescue SystemCallError
- next if File.directory?(path)
- end
+ list.each do |item|
+ path = remove_trailing_slash(item)
stack = []
- until path == stack.last # dirname("/")=="/", dirname("C:/")=="C:/"
+ until File.directory?(path) || File.dirname(path) == path
stack.push path
path = File.dirname(path)
end
- stack.pop # root directory should exist
stack.reverse_each do |dir|
begin
fu_mkdir dir, mode
@@ -253,12 +409,39 @@ module Bundler::FileUtils
private_module_function :fu_mkdir
#
- # Removes one or more directories.
+ # Removes directories at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, removes the directory at each +path+ in +list+,
+ # by calling: <tt>Dir.rmdir(path)</tt>;
+ # see {Dir.rmdir}[rdoc-ref:Dir.rmdir]:
+ #
+ # Bundler::FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
+ # Bundler::FileUtils.rmdir('tmp4/tmp5') # => ["tmp4/tmp5"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>parents: true</tt> - removes successive ancestor directories
+ # if empty.
+ # - <tt>noop: true</tt> - does not remove directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
#
- # Bundler::FileUtils.rmdir 'somedir'
- # Bundler::FileUtils.rmdir %w(somedir anydir otherdir)
- # # Does not really remove directory; outputs message.
- # Bundler::FileUtils.rmdir 'somedir', verbose: true, noop: true
+ # Bundler::FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3], parents: true, verbose: true)
+ # Bundler::FileUtils.rmdir('tmp4/tmp5', parents: true, verbose: true)
+ #
+ # Output:
+ #
+ # rmdir -p tmp0/tmp1 tmp2/tmp3
+ # rmdir -p tmp4/tmp5
+ #
+ # Raises an exception if a directory does not exist
+ # or if for any reason a directory cannot be removed.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rmdir(list, parents: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -279,26 +462,62 @@ module Bundler::FileUtils
end
module_function :rmdir
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # When +src+ is the path to an existing file
+ # and +dest+ is the path to a non-existent file,
+ # creates a hard link at +dest+ pointing to +src+; returns zero:
+ #
+ # Dir.children('tmp0/') # => ["t.txt"]
+ # Dir.children('tmp1/') # => []
+ # Bundler::FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk') # => 0
+ # Dir.children('tmp1/') # => ["t.lnk"]
+ #
+ # When +src+ is the path to an existing file
+ # and +dest+ is the path to an existing directory,
+ # creates a hard link at <tt>dest/src</tt> pointing to +src+; returns zero:
#
- # :call-seq:
- # Bundler::FileUtils.ln(target, link, force: nil, noop: nil, verbose: nil)
- # Bundler::FileUtils.ln(target, dir, force: nil, noop: nil, verbose: nil)
- # Bundler::FileUtils.ln(targets, dir, force: nil, noop: nil, verbose: nil)
+ # Dir.children('tmp2') # => ["t.dat"]
+ # Dir.children('tmp3') # => []
+ # Bundler::FileUtils.ln('tmp2/t.dat', 'tmp3') # => 0
+ # Dir.children('tmp3') # => ["t.dat"]
#
- # In the first form, creates a hard link +link+ which points to +target+.
- # If +link+ already exists, raises Errno::EEXIST.
- # But if the +force+ option is set, overwrites +link+.
+ # When +src+ is an array of paths to existing files
+ # and +dest+ is the path to an existing directory,
+ # then for each path +target+ in +src+,
+ # creates a hard link at <tt>dest/target</tt> pointing to +target+;
+ # returns +src+:
#
- # Bundler::FileUtils.ln 'gcc', 'cc', verbose: true
- # Bundler::FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs'
+ # Dir.children('tmp4/') # => []
+ # Bundler::FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/') # => ["tmp0/t.txt", "tmp2/t.dat"]
+ # Dir.children('tmp4/') # => ["t.dat", "t.txt"]
#
- # In the second form, creates a link +dir/target+ pointing to +target+.
- # In the third form, creates several hard links in the directory +dir+,
- # pointing to each item in +targets+.
- # If +dir+ is not a directory, raises Errno::ENOTDIR.
+ # Keyword arguments:
#
- # Bundler::FileUtils.cd '/sbin'
- # Bundler::FileUtils.ln %w(cp mv mkdir), '/bin' # Now /sbin/cp and /bin/cp are linked.
+ # - <tt>force: true</tt> - overwrites +dest+ if it exists.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk', verbose: true)
+ # Bundler::FileUtils.ln('tmp2/t.dat', 'tmp3', verbose: true)
+ # Bundler::FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/', verbose: true)
+ #
+ # Output:
+ #
+ # ln tmp0/t.txt tmp1/t.lnk
+ # ln tmp2/t.dat tmp3
+ # ln tmp0/t.txt tmp2/t.dat tmp4/
+ #
+ # Raises an exception if +dest+ is the path to an existing file
+ # and keyword argument +force+ is not +true+.
+ #
+ # Bundler::FileUtils#link is an alias for Bundler::FileUtils#ln.
+ #
+ # Related: Bundler::FileUtils.link_entry (has different options).
#
def ln(src, dest, force: nil, noop: nil, verbose: nil)
fu_output_message "ln#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -313,28 +532,103 @@ module Bundler::FileUtils
alias link ln
module_function :link
- #
- # Hard link +src+ to +dest+. If +src+ is a directory, this method links
- # all its contents recursively. If +dest+ is a directory, links
- # +src+ to +dest/src+.
- #
- # +src+ can be a list of files.
- #
- # If +dereference_root+ is true, this method dereference tree root.
- #
- # If +remove_destination+ is true, this method removes each destination file before copy.
- #
- # Bundler::FileUtils.rm_r site_ruby + '/mylib', force: true
- # Bundler::FileUtils.cp_lr 'lib/', site_ruby + '/mylib'
- #
- # # Examples of linking several files to target directory.
- # Bundler::FileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail'
- # Bundler::FileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true
- #
- # # If you want to link all contents of a directory instead of the
- # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y,
- # # use the following code.
- # Bundler::FileUtils.cp_lr 'src/.', 'dest' # cp_lr('src', 'dest') makes dest/src, but this doesn't.
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # creates links +dest+ and descendents pointing to +src+ and its descendents:
+ #
+ # tree('src0')
+ # # => src0
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # File.exist?('dest0') # => false
+ # Bundler::FileUtils.cp_lr('src0', 'dest0')
+ # tree('dest0')
+ # # => dest0
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ and +dest+ are both paths to directories,
+ # creates links <tt>dest/src</tt> and descendents
+ # pointing to +src+ and its descendents:
+ #
+ # tree('src1')
+ # # => src1
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.mkdir('dest1')
+ # Bundler::FileUtils.cp_lr('src1', 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # `-- src1
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ is an array of paths to entries and +dest+ is the path to a directory,
+ # for each path +filepath+ in +src+, creates a link at <tt>dest/filepath</tt>
+ # pointing to that path:
+ #
+ # tree('src2')
+ # # => src2
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.mkdir('dest2')
+ # Bundler::FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2')
+ # tree('dest2')
+ # # => dest2
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
+ # does not dereference it.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.cp_lr('src0', 'dest0', noop: true, verbose: true)
+ # Bundler::FileUtils.cp_lr('src1', 'dest1', noop: true, verbose: true)
+ # Bundler::FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp -lr src0 dest0
+ # cp -lr src1 dest1
+ # cp -lr src2/sub0 src2/sub1 dest2
+ #
+ # Raises an exception if +dest+ is the path to an existing file or directory
+ # and keyword argument <tt>remove_destination: true</tt> is not given.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp_lr(src, dest, noop: nil, verbose: nil,
dereference_root: true, remove_destination: false)
@@ -346,27 +640,81 @@ module Bundler::FileUtils
end
module_function :cp_lr
+ # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to an existing file:
+ #
+ # - When +dest+ is the path to a non-existent file,
+ # creates a symbolic link at +dest+ pointing to +src+:
+ #
+ # Bundler::FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.ln_s('src0.txt', 'dest0.txt')
+ # File.symlink?('dest0.txt') # => true
#
- # :call-seq:
- # Bundler::FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil)
- # Bundler::FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil)
- # Bundler::FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil)
+ # - When +dest+ is the path to an existing file,
+ # creates a symbolic link at +dest+ pointing to +src+
+ # if and only if keyword argument <tt>force: true</tt> is given
+ # (raises an exception otherwise):
#
- # In the first form, creates a symbolic link +link+ which points to +target+.
- # If +link+ already exists, raises Errno::EEXIST.
- # But if the <tt>force</tt> option is set, overwrites +link+.
+ # Bundler::FileUtils.touch('src1.txt')
+ # Bundler::FileUtils.touch('dest1.txt')
+ # Bundler::FileUtils.ln_s('src1.txt', 'dest1.txt', force: true)
+ # FileTest.symlink?('dest1.txt') # => true
#
- # Bundler::FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby'
- # Bundler::FileUtils.ln_s 'verylongsourcefilename.c', 'c', force: true
+ # Bundler::FileUtils.ln_s('src1.txt', 'dest1.txt') # Raises Errno::EEXIST.
#
- # In the second form, creates a link +dir/target+ pointing to +target+.
- # In the third form, creates several symbolic links in the directory +dir+,
- # pointing to each item in +targets+.
- # If +dir+ is not a directory, raises Errno::ENOTDIR.
+ # If +dest+ is the path to a directory,
+ # creates a symbolic link at <tt>dest/src</tt> pointing to +src+:
#
- # Bundler::FileUtils.ln_s Dir.glob('/bin/*.rb'), '/home/foo/bin'
+ # Bundler::FileUtils.touch('src2.txt')
+ # Bundler::FileUtils.mkdir('destdir2')
+ # Bundler::FileUtils.ln_s('src2.txt', 'destdir2')
+ # File.symlink?('destdir2/src2.txt') # => true
#
- def ln_s(src, dest, force: nil, noop: nil, verbose: nil)
+ # If +src+ is an array of paths to existing files and +dest+ is a directory,
+ # for each child +child+ in +src+ creates a symbolic link <tt>dest/child</tt>
+ # pointing to +child+:
+ #
+ # Bundler::FileUtils.mkdir('srcdir3')
+ # Bundler::FileUtils.touch('srcdir3/src0.txt')
+ # Bundler::FileUtils.touch('srcdir3/src1.txt')
+ # Bundler::FileUtils.mkdir('destdir3')
+ # Bundler::FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3')
+ # File.symlink?('destdir3/src0.txt') # => true
+ # File.symlink?('destdir3/src1.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - overwrites +dest+ if it exists.
+ # - <tt>relative: false</tt> - create links relative to +dest+.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.ln_s('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.ln_s('src1.txt', 'destdir1', noop: true, verbose: true)
+ # Bundler::FileUtils.ln_s('src2.txt', 'dest2.txt', force: true, noop: true, verbose: true)
+ # Bundler::FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # ln -s src0.txt dest0.txt
+ # ln -s src1.txt destdir1
+ # ln -sf src2.txt dest2.txt
+ # ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3
+ #
+ # Bundler::FileUtils.symlink is an alias for Bundler::FileUtils.ln_s.
+ #
+ # Related: Bundler::FileUtils.ln_sf.
+ #
+ def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil)
+ if relative
+ return ln_sr(src, dest, force: force, noop: noop, verbose: verbose)
+ end
fu_output_message "ln -s#{force ? 'f' : ''} #{[src,dest].flatten.join ' '}" if verbose
return if noop
fu_each_src_dest0(src, dest) do |s,d|
@@ -379,29 +727,95 @@ module Bundler::FileUtils
alias symlink ln_s
module_function :symlink
- #
- # :call-seq:
- # Bundler::FileUtils.ln_sf(*args)
- #
- # Same as
- #
- # Bundler::FileUtils.ln_s(*args, force: true)
+ # Like Bundler::FileUtils.ln_s, but always with keyword argument <tt>force: true</tt> given.
#
def ln_sf(src, dest, noop: nil, verbose: nil)
ln_s src, dest, force: true, noop: noop, verbose: verbose
end
module_function :ln_sf
+ # Like Bundler::FileUtils.ln_s, but create links relative to +dest+.
+ #
+ def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
+ options = "#{force ? 'f' : ''}#{target_directory ? '' : 'T'}"
+ dest = File.path(dest)
+ srcs = Array(src)
+ link = proc do |s, target_dir_p = true|
+ s = File.path(s)
+ if target_dir_p
+ d = File.join(destdirs = dest, File.basename(s))
+ else
+ destdirs = File.dirname(d = dest)
+ end
+ destdirs = fu_split_path(File.realpath(destdirs))
+ if fu_starting_path?(s)
+ srcdirs = fu_split_path((File.realdirpath(s) rescue File.expand_path(s)))
+ base = fu_relative_components_from(srcdirs, destdirs)
+ s = File.join(*base)
+ else
+ srcdirs = fu_clean_components(*fu_split_path(s))
+ base = fu_relative_components_from(fu_split_path(Dir.pwd), destdirs)
+ while srcdirs.first&. == ".." and base.last&.!=("..") and !fu_starting_path?(base.last)
+ srcdirs.shift
+ base.pop
+ end
+ s = File.join(*base, *srcdirs)
+ end
+ fu_output_message "ln -s#{options} #{s} #{d}" if verbose
+ next if noop
+ remove_file d, true if force
+ File.symlink s, d
+ end
+ case srcs.size
+ when 0
+ when 1
+ link[srcs[0], target_directory && File.directory?(dest)]
+ else
+ srcs.each(&link)
+ end
+ end
+ module_function :ln_sr
+
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]; returns +nil+.
#
- # Hard links a file system entry +src+ to +dest+.
- # If +src+ is a directory, this method links its contents recursively.
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Both of +src+ and +dest+ must be a path name.
- # +src+ must exist, +dest+ must not exist.
+ # If +src+ is the path to a file and +dest+ does not exist,
+ # creates a hard link at +dest+ pointing to +src+:
#
- # If +dereference_root+ is true, this method dereferences the tree root.
+ # Bundler::FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.link_entry('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # If +remove_destination+ is true, this method removes each destination file before copy.
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # recursively creates hard links at +dest+ pointing to paths in +src+:
+ #
+ # Bundler::FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
+ # src_file_paths = [
+ # 'src1/dir0/t0.txt',
+ # 'src1/dir0/t1.txt',
+ # 'src1/dir1/t2.txt',
+ # 'src1/dir1/t3.txt',
+ # ]
+ # Bundler::FileUtils.touch(src_file_paths)
+ # File.directory?('dest1') # => true
+ # Bundler::FileUtils.link_entry('src1', 'dest1')
+ # File.file?('dest1/dir0/t0.txt') # => true
+ # File.file?('dest1/dir0/t1.txt') # => true
+ # File.file?('dest1/dir1/t2.txt') # => true
+ # File.file?('dest1/dir1/t3.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: true</tt> - dereferences +src+ if it is a symbolic link.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
+ #
+ # Raises an exception if +dest+ is the path to an existing file or directory
+ # and keyword argument <tt>remove_destination: true</tt> is not given.
+ #
+ # Related: Bundler::FileUtils.ln (has different options).
#
def link_entry(src, dest, dereference_root = false, remove_destination = false)
Entry_.new(src, nil, dereference_root).traverse do |ent|
@@ -412,16 +826,59 @@ module Bundler::FileUtils
end
module_function :link_entry
+ # Copies files.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to a file and +dest+ is not the path to a directory,
+ # copies +src+ to +dest+:
+ #
+ # Bundler::FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.cp('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # Copies a file content +src+ to +dest+. If +dest+ is a directory,
- # copies +src+ to +dest/src+.
+ # If +src+ is the path to a file and +dest+ is the path to a directory,
+ # copies +src+ to <tt>dest/src</tt>:
#
- # If +src+ is a list of files, then +dest+ must be a directory.
+ # Bundler::FileUtils.touch('src1.txt')
+ # Bundler::FileUtils.mkdir('dest1')
+ # Bundler::FileUtils.cp('src1.txt', 'dest1')
+ # File.file?('dest1/src1.txt') # => true
#
- # Bundler::FileUtils.cp 'eval.c', 'eval.c.org'
- # Bundler::FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'
- # Bundler::FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', verbose: true
- # Bundler::FileUtils.cp 'symlink', 'dest' # copy content, "dest" is not a symlink
+ # If +src+ is an array of paths to files and +dest+ is the path to a directory,
+ # copies from each +src+ to +dest+:
+ #
+ # src_file_paths = ['src2.txt', 'src2.dat']
+ # Bundler::FileUtils.touch(src_file_paths)
+ # Bundler::FileUtils.mkdir('dest2')
+ # Bundler::FileUtils.cp(src_file_paths, 'dest2')
+ # File.file?('dest2/src2.txt') # => true
+ # File.file?('dest2/src2.dat') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>noop: true</tt> - does not copy files.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.cp('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.cp('src1.txt', 'dest1', noop: true, verbose: true)
+ # Bundler::FileUtils.cp(src_file_paths, 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp src0.txt dest0.txt
+ # cp src1.txt dest1
+ # cp src2.txt src2.dat dest2
+ #
+ # Raises an exception if +src+ is a directory.
+ #
+ # Bundler::FileUtils.copy is an alias for Bundler::FileUtils.cp.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp(src, dest, preserve: nil, noop: nil, verbose: nil)
fu_output_message "cp#{preserve ? ' -p' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -435,30 +892,105 @@ module Bundler::FileUtils
alias copy cp
module_function :copy
- #
- # Copies +src+ to +dest+. If +src+ is a directory, this method copies
- # all its contents recursively. If +dest+ is a directory, copies
- # +src+ to +dest/src+.
- #
- # +src+ can be a list of files.
- #
- # If +dereference_root+ is true, this method dereference tree root.
- #
- # If +remove_destination+ is true, this method removes each destination file before copy.
- #
- # # Installing Ruby library "mylib" under the site_ruby
- # Bundler::FileUtils.rm_r site_ruby + '/mylib', force: true
- # Bundler::FileUtils.cp_r 'lib/', site_ruby + '/mylib'
- #
- # # Examples of copying several files to target directory.
- # Bundler::FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail'
- # Bundler::FileUtils.cp_r Dir.glob('*.rb'), '/home/foo/lib/ruby', noop: true, verbose: true
- #
- # # If you want to copy all contents of a directory instead of the
- # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y,
- # # use following code.
- # Bundler::FileUtils.cp_r 'src/.', 'dest' # cp_r('src', 'dest') makes dest/src,
- # # but this doesn't.
+ # Recursively copies files.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # The mode, owner, and group are retained in the copy;
+ # to change those, use Bundler::FileUtils.install instead.
+ #
+ # If +src+ is the path to a file and +dest+ is not the path to a directory,
+ # copies +src+ to +dest+:
+ #
+ # Bundler::FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.cp_r('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
+ #
+ # If +src+ is the path to a file and +dest+ is the path to a directory,
+ # copies +src+ to <tt>dest/src</tt>:
+ #
+ # Bundler::FileUtils.touch('src1.txt')
+ # Bundler::FileUtils.mkdir('dest1')
+ # Bundler::FileUtils.cp_r('src1.txt', 'dest1')
+ # File.file?('dest1/src1.txt') # => true
+ #
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # recursively copies +src+ to +dest+:
+ #
+ # tree('src2')
+ # # => src2
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.exist?('dest2') # => false
+ # Bundler::FileUtils.cp_r('src2', 'dest2')
+ # tree('dest2')
+ # # => dest2
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ and +dest+ are paths to directories,
+ # recursively copies +src+ to <tt>dest/src</tt>:
+ #
+ # tree('src3')
+ # # => src3
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.mkdir('dest3')
+ # Bundler::FileUtils.cp_r('src3', 'dest3')
+ # tree('dest3')
+ # # => dest3
+ # # `-- src3
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ is an array of paths and +dest+ is a directory,
+ # recursively copies from each path in +src+ to +dest+;
+ # the paths in +src+ may point to files and/or directories.
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
+ # does not dereference it.
+ # - <tt>noop: true</tt> - does not copy files.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.cp_r('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.cp_r('src1.txt', 'dest1', noop: true, verbose: true)
+ # Bundler::FileUtils.cp_r('src2', 'dest2', noop: true, verbose: true)
+ # Bundler::FileUtils.cp_r('src3', 'dest3', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp -r src0.txt dest0.txt
+ # cp -r src1.txt dest1
+ # cp -r src2 dest2
+ # cp -r src3 dest3
+ #
+ # Raises an exception of +src+ is the path to a directory
+ # and +dest+ is the path to a file.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp_r(src, dest, preserve: nil, noop: nil, verbose: nil,
dereference_root: true, remove_destination: nil)
@@ -470,21 +1002,50 @@ module Bundler::FileUtils
end
module_function :cp_r
+ # Recursively copies files from +src+ to +dest+.
+ #
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Copies a file system entry +src+ to +dest+.
- # If +src+ is a directory, this method copies its contents recursively.
- # This method preserves file types, c.f. symlink, directory...
- # (FIFO, device files and etc. are not supported yet)
+ # If +src+ is the path to a file, copies +src+ to +dest+:
#
- # Both of +src+ and +dest+ must be a path name.
- # +src+ must exist, +dest+ must not exist.
+ # Bundler::FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.copy_entry('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # If +preserve+ is true, this method preserves owner, group, and
- # modified time. Permissions are copied regardless +preserve+.
+ # If +src+ is a directory, recursively copies +src+ to +dest+:
#
- # If +dereference_root+ is true, this method dereference tree root.
+ # tree('src1')
+ # # => src1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.copy_entry('src1', 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
#
- # If +remove_destination+ is true, this method removes each destination file before copy.
+ # The recursive copying preserves file types for regular files,
+ # directories, and symbolic links;
+ # other file types (FIFO streams, device files, etc.) are not supported.
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: true</tt> - if +src+ is a symbolic link,
+ # follows the link.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
if dereference_root
@@ -502,9 +1063,25 @@ module Bundler::FileUtils
end
module_function :copy_entry
+ # Copies file from +src+ to +dest+, which should not be directories.
+ #
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Examples:
#
- # Copies file contents of +src+ to +dest+.
- # Both of +src+ and +dest+ must be a path name.
+ # Bundler::FileUtils.touch('src0.txt')
+ # Bundler::FileUtils.copy_file('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference: false</tt> - if +src+ is a symbolic link,
+ # does not follow the link.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_file(src, dest, preserve = false, dereference = true)
ent = Entry_.new(src, nil, dereference)
@@ -513,25 +1090,81 @@ module Bundler::FileUtils
end
module_function :copy_file
+ # Copies \IO stream +src+ to \IO stream +dest+ via
+ # {IO.copy_stream}[rdoc-ref:IO.copy_stream].
#
- # Copies stream +src+ to +dest+.
- # +src+ must respond to #read(n) and
- # +dest+ must respond to #write(str).
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_stream(src, dest)
IO.copy_stream(src, dest)
end
module_function :copy_stream
- #
- # Moves file(s) +src+ to +dest+. If +file+ and +dest+ exist on the different
- # disk partition, the file is copied then the original file is removed.
- #
- # Bundler::FileUtils.mv 'badname.rb', 'goodname.rb'
- # Bundler::FileUtils.mv 'stuff.rb', '/notexist/lib/ruby', force: true # no error
- #
- # Bundler::FileUtils.mv %w(junk.txt dust.txt), '/home/foo/.trash/'
- # Bundler::FileUtils.mv Dir.glob('test*.rb'), 'test', noop: true, verbose: true
+ # Moves entries.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ and +dest+ are on different file systems,
+ # first copies, then removes +src+.
+ #
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # If +src+ is the path to a single file or directory and +dest+ does not exist,
+ # moves +src+ to +dest+:
+ #
+ # tree('src0')
+ # # => src0
+ # # |-- src0.txt
+ # # `-- src1.txt
+ # File.exist?('dest0') # => false
+ # Bundler::FileUtils.mv('src0', 'dest0')
+ # File.exist?('src0') # => false
+ # tree('dest0')
+ # # => dest0
+ # # |-- src0.txt
+ # # `-- src1.txt
+ #
+ # If +src+ is an array of paths to files and directories
+ # and +dest+ is the path to a directory,
+ # copies from each path in the array to +dest+:
+ #
+ # File.file?('src1.txt') # => true
+ # tree('src1')
+ # # => src1
+ # # |-- src.dat
+ # # `-- src.txt
+ # Dir.empty?('dest1') # => true
+ # Bundler::FileUtils.mv(['src1.txt', 'src1'], 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # |-- src1
+ # # | |-- src.dat
+ # # | `-- src.txt
+ # # `-- src1.txt
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - if the move includes removing +src+
+ # (that is, if +src+ and +dest+ are on different file systems),
+ # ignores raised exceptions of StandardError and its descendants.
+ # - <tt>noop: true</tt> - does not move files.
+ # - <tt>secure: true</tt> - removes +src+ securely;
+ # see details at Bundler::FileUtils.remove_entry_secure.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.mv('src0', 'dest0', noop: true, verbose: true)
+ # Bundler::FileUtils.mv(['src1.txt', 'src1'], 'dest1', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # mv src0 dest0
+ # mv src1.txt src1 dest1
+ #
+ # Bundler::FileUtils.move is an alias for Bundler::FileUtils.mv.
#
def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
fu_output_message "mv#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -565,13 +1198,34 @@ module Bundler::FileUtils
alias move mv
module_function :move
+ # Removes entries at the paths in the given +list+
+ # (a single path or an array of paths)
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, removes files at the paths given in +list+:
+ #
+ # Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
+ # Bundler::FileUtils.rm(['src0.dat', 'src0.txt']) # => ["src0.dat", "src0.txt"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
+ # and its descendants.
+ # - <tt>noop: true</tt> - does not remove files; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.rm(['src0.dat', 'src0.txt'], noop: true, verbose: true)
#
- # Remove file(s) specified in +list+. This method cannot remove directories.
- # All StandardErrors are ignored when the :force option is set.
+ # Output:
#
- # Bundler::FileUtils.rm %w( junk.txt dust.txt )
- # Bundler::FileUtils.rm Dir.glob('*.so')
- # Bundler::FileUtils.rm 'NotExistFile', force: true # never raises exception
+ # rm src0.dat src0.txt
+ #
+ # Bundler::FileUtils.remove is an alias for Bundler::FileUtils.rm.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm(list, force: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -587,10 +1241,18 @@ module Bundler::FileUtils
alias remove rm
module_function :remove
+ # Equivalent to:
+ #
+ # Bundler::FileUtils.rm(list, force: true, **kwargs)
+ #
+ # Argument +list+ (a single path or an array of paths)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # See Bundler::FileUtils.rm for keyword arguments.
#
- # Equivalent to
+ # Bundler::FileUtils.safe_unlink is an alias for Bundler::FileUtils.rm_f.
#
- # Bundler::FileUtils.rm(list, force: true)
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_f(list, noop: nil, verbose: nil)
rm list, force: true, noop: noop, verbose: verbose
@@ -600,24 +1262,55 @@ module Bundler::FileUtils
alias safe_unlink rm_f
module_function :safe_unlink
+ # Removes entries at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # For each file path, removes the file at that path:
+ #
+ # Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
+ # Bundler::FileUtils.rm_r(['src0.dat', 'src0.txt'])
+ # File.exist?('src0.txt') # => false
+ # File.exist?('src0.dat') # => false
#
- # remove files +list+[0] +list+[1]... If +list+[n] is a directory,
- # removes its all contents recursively. This method ignores
- # StandardError when :force option is set.
+ # For each directory path, recursively removes files and directories:
#
- # Bundler::FileUtils.rm_r Dir.glob('/tmp/*')
- # Bundler::FileUtils.rm_r 'some_dir', force: true
+ # tree('src1')
+ # # => src1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # Bundler::FileUtils.rm_r('src1')
+ # File.exist?('src1') # => false
#
- # WARNING: This method causes local vulnerability
- # if one of parent directories or removing directory tree are world
- # writable (including /tmp, whose permission is 1777), and the current
- # process has strong privilege such as Unix super user (root), and the
- # system has symbolic link. For secure removing, read the documentation
- # of remove_entry_secure carefully, and set :secure option to true.
- # Default is <tt>secure: false</tt>.
+ # Keyword arguments:
#
- # NOTE: This method calls remove_entry_secure if :secure option is set.
- # See also remove_entry_secure.
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
+ # and its descendants.
+ # - <tt>noop: true</tt> - does not remove entries; returns +nil+.
+ # - <tt>secure: true</tt> - removes +src+ securely;
+ # see details at Bundler::FileUtils.remove_entry_secure.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.rm_r(['src0.dat', 'src0.txt'], noop: true, verbose: true)
+ # Bundler::FileUtils.rm_r('src1', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # rm -r src0.dat src0.txt
+ # rm -r src1
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_r(list, force: nil, noop: nil, verbose: nil, secure: nil)
list = fu_list(list)
@@ -633,13 +1326,22 @@ module Bundler::FileUtils
end
module_function :rm_r
+ # Equivalent to:
#
- # Equivalent to
+ # Bundler::FileUtils.rm_r(list, force: true, **kwargs)
#
- # Bundler::FileUtils.rm_r(list, force: true)
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # WARNING: This method causes local vulnerability.
- # Read the documentation of rm_r first.
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # See Bundler::FileUtils.rm_r for keyword arguments.
+ #
+ # Bundler::FileUtils.rmtree is an alias for Bundler::FileUtils.rm_rf.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_rf(list, noop: nil, verbose: nil, secure: nil)
rm_r list, force: true, noop: noop, verbose: verbose, secure: secure
@@ -649,37 +1351,20 @@ module Bundler::FileUtils
alias rmtree rm_rf
module_function :rmtree
+ # Securely removes the entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
#
- # This method removes a file system entry +path+. +path+ shall be a
- # regular file, a directory, or something. If +path+ is a directory,
- # remove it recursively. This method is required to avoid TOCTTOU
- # (time-of-check-to-time-of-use) local security vulnerability of rm_r.
- # #rm_r causes security hole when:
- #
- # * Parent directory is world writable (including /tmp).
- # * Removing directory tree includes world writable directory.
- # * The system has symbolic link.
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # To avoid this security hole, this method applies special preprocess.
- # If +path+ is a directory, this method chown(2) and chmod(2) all
- # removing directories. This requires the current process is the
- # owner of the removing whole directory tree, or is the super user (root).
+ # Avoids a local vulnerability that can exist in certain circumstances;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
#
- # WARNING: You must ensure that *ALL* parent directories cannot be
- # moved by other untrusted users. For example, parent directories
- # should not be owned by untrusted users, and should not be world
- # writable except when the sticky bit set.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
#
- # WARNING: Only the owner of the removing directory tree, or Unix super
- # user (root) should invoke this method. Otherwise this method does not
- # work.
- #
- # For details of this security vulnerability, see Perl's case:
- #
- # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448
- # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452
- #
- # For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_entry_secure(path, force = false)
unless fu_have_symlink?
@@ -767,12 +1452,17 @@ module Bundler::FileUtils
end
private_module_function :fu_stat_identical_entry?
+ # Removes the entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
#
- # This method removes a file system entry +path+.
- # +path+ might be a regular file, a directory, or something.
- # If +path+ is a directory, remove it recursively.
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # See also remove_entry_secure.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: Bundler::FileUtils.remove_entry_secure.
#
def remove_entry(path, force = false)
Entry_.new(path).postorder_traverse do |ent|
@@ -787,9 +1477,16 @@ module Bundler::FileUtils
end
module_function :remove_entry
+ # Removes the file entry given by +path+,
+ # which should be the entry for a regular file or a symbolic link.
+ #
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Removes a file +path+.
- # This method ignores StandardError if +force+ is true.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_file(path, force = false)
Entry_.new(path).remove_file
@@ -798,20 +1495,32 @@ module Bundler::FileUtils
end
module_function :remove_file
+ # Recursively removes the directory entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
+ #
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Removes a directory +dir+ and its contents recursively.
- # This method ignores StandardError if +force+ is true.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_dir(path, force = false)
remove_entry path, force # FIXME?? check if it is a directory
end
module_function :remove_dir
+ # Returns +true+ if the contents of files +a+ and +b+ are identical,
+ # +false+ otherwise.
+ #
+ # Arguments +a+ and +b+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Returns true if the contents of a file +a+ and a file +b+ are identical.
+ # Bundler::FileUtils.identical? and Bundler::FileUtils.cmp are aliases for Bundler::FileUtils.compare_file.
#
- # Bundler::FileUtils.compare_file('somefile', 'somefile') #=> true
- # Bundler::FileUtils.compare_file('/dev/null', '/dev/urandom') #=> false
+ # Related: Bundler::FileUtils.compare_stream.
#
def compare_file(a, b)
return false unless File.size(a) == File.size(b)
@@ -828,19 +1537,19 @@ module Bundler::FileUtils
module_function :identical?
module_function :cmp
+ # Returns +true+ if the contents of streams +a+ and +b+ are identical,
+ # +false+ otherwise.
#
- # Returns true if the contents of a stream +a+ and +b+ are identical.
+ # Arguments +a+ and +b+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Related: Bundler::FileUtils.compare_file.
#
def compare_stream(a, b)
bsize = fu_stream_blksize(a, b)
- if RUBY_VERSION > "2.4"
- sa = String.new(capacity: bsize)
- sb = String.new(capacity: bsize)
- else
- sa = String.new
- sb = String.new
- end
+ sa = String.new(capacity: bsize)
+ sb = String.new(capacity: bsize)
begin
a.read(bsize, sa)
@@ -851,13 +1560,69 @@ module Bundler::FileUtils
end
module_function :compare_stream
+ # Copies a file entry.
+ # See {install(1)}[https://man7.org/linux/man-pages/man1/install.1.html].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments];
+ #
+ # If the entry at +dest+ does not exist, copies from +src+ to +dest+:
+ #
+ # File.read('src0.txt') # => "aaa\n"
+ # File.exist?('dest0.txt') # => false
+ # Bundler::FileUtils.install('src0.txt', 'dest0.txt')
+ # File.read('dest0.txt') # => "aaa\n"
+ #
+ # If +dest+ is a file entry, copies from +src+ to +dest+, overwriting:
+ #
+ # File.read('src1.txt') # => "aaa\n"
+ # File.read('dest1.txt') # => "bbb\n"
+ # Bundler::FileUtils.install('src1.txt', 'dest1.txt')
+ # File.read('dest1.txt') # => "aaa\n"
#
- # If +src+ is not same as +dest+, copies it and changes the permission
- # mode to +mode+. If +dest+ is a directory, destination is +dest+/+src+.
- # This method removes destination before copy.
+ # If +dest+ is a directory entry, copies from +src+ to <tt>dest/src</tt>,
+ # overwriting if necessary:
#
- # Bundler::FileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true
- # Bundler::FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true
+ # File.read('src2.txt') # => "aaa\n"
+ # File.read('dest2/src2.txt') # => "bbb\n"
+ # Bundler::FileUtils.install('src2.txt', 'dest2')
+ # File.read('dest2/src2.txt') # => "aaa\n"
+ #
+ # If +src+ is an array of paths and +dest+ points to a directory,
+ # copies each path +path+ in +src+ to <tt>dest/path</tt>:
+ #
+ # File.file?('src3.txt') # => true
+ # File.file?('src3.dat') # => true
+ # Bundler::FileUtils.mkdir('dest3')
+ # Bundler::FileUtils.install(['src3.txt', 'src3.dat'], 'dest3')
+ # File.file?('dest3/src3.txt') # => true
+ # File.file?('dest3/src3.dat') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>group: <i>group</i></tt> - changes the group if not +nil+,
+ # using {File.chown}[rdoc-ref:File.chown].
+ # - <tt>mode: <i>permissions</i></tt> - changes the permissions.
+ # using {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not copy entries; returns +nil+.
+ # - <tt>owner: <i>owner</i></tt> - changes the owner if not +nil+,
+ # using {File.chown}[rdoc-ref:File.chown].
+ # - <tt>preserve: true</tt> - preserve timestamps
+ # using {File.utime}[rdoc-ref:File.utime].
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.install('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.install('src1.txt', 'dest1.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.install('src2.txt', 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # install -c src0.txt dest0.txt
+ # install -c src1.txt dest1.txt
+ # install -c src2.txt dest2
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def install(src, dest, mode: nil, owner: nil, group: nil, preserve: nil,
noop: nil, verbose: nil)
@@ -917,11 +1682,8 @@ module Bundler::FileUtils
private_module_function :apply_mask
def symbolic_modes_to_i(mode_sym, path) #:nodoc:
- mode = if File::Stat === path
- path.mode
- else
- File.stat(path).mode
- end
+ path = File.stat(path) unless File::Stat === path
+ mode = path.mode
mode_sym.split(/,/).inject(mode & 07777) do |current_mode, clause|
target, *actions = clause.split(/([=+-])/)
raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty?
@@ -938,7 +1700,7 @@ module Bundler::FileUtils
when "x"
mask | 0111
when "X"
- if FileTest.directory? path
+ if path.directory?
mask | 0111
else
mask
@@ -978,37 +1740,78 @@ module Bundler::FileUtils
end
private_module_function :mode_to_s
+ # Changes permissions on the entries at the paths given in +list+
+ # (a single path or an array of paths)
+ # to the permissions given by +mode+;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
+ #
+ # - Modifies each entry that is a regular file using
+ # {File.chmod}[rdoc-ref:File.chmod].
+ # - Modifies each entry that is a symbolic link using
+ # {File.lchmod}[rdoc-ref:File.lchmod].
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Argument +mode+ may be either an integer or a string:
+ #
+ # - \Integer +mode+: represents the permission bits to be set:
+ #
+ # Bundler::FileUtils.chmod(0755, 'src0.txt')
+ # Bundler::FileUtils.chmod(0644, ['src0.txt', 'src0.dat'])
+ #
+ # - \String +mode+: represents the permissions to be set:
+ #
+ # The string is of the form <tt>[targets][[operator][perms[,perms]]</tt>, where:
+ #
+ # - +targets+ may be any combination of these letters:
+ #
+ # - <tt>'u'</tt>: permissions apply to the file's owner.
+ # - <tt>'g'</tt>: permissions apply to users in the file's group.
+ # - <tt>'o'</tt>: permissions apply to other users not in the file's group.
+ # - <tt>'a'</tt> (the default): permissions apply to all users.
+ #
+ # - +operator+ may be one of these letters:
+ #
+ # - <tt>'+'</tt>: adds permissions.
+ # - <tt>'-'</tt>: removes permissions.
+ # - <tt>'='</tt>: sets (replaces) permissions.
+ #
+ # - +perms+ (may be repeated, with separating commas)
+ # may be any combination of these letters:
+ #
+ # - <tt>'r'</tt>: Read.
+ # - <tt>'w'</tt>: Write.
+ # - <tt>'x'</tt>: Execute (search, for a directory).
+ # - <tt>'X'</tt>: Search (for a directories only;
+ # must be used with <tt>'+'</tt>)
+ # - <tt>'s'</tt>: Uid or gid.
+ # - <tt>'t'</tt>: Sticky bit.
+ #
+ # Examples:
+ #
+ # Bundler::FileUtils.chmod('u=wrx,go=rx', 'src1.txt')
+ # Bundler::FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby')
+ #
+ # Keyword arguments:
+ #
+ # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.chmod(0755, 'src0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.chmod(0644, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # Bundler::FileUtils.chmod('u=wrx,go=rx', 'src1.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # chmod 755 src0.txt
+ # chmod 644 src0.txt src0.dat
+ # chmod u=wrx,go=rx src1.txt
+ # chmod u=wrx,go=rx /usr/bin/ruby
+ #
+ # Related: Bundler::FileUtils.chmod_R.
#
- # Changes permission bits on the named files (in +list+) to the bit pattern
- # represented by +mode+.
- #
- # +mode+ is the symbolic and absolute mode can be used.
- #
- # Absolute mode is
- # Bundler::FileUtils.chmod 0755, 'somecommand'
- # Bundler::FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb)
- # Bundler::FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true
- #
- # Symbolic mode is
- # Bundler::FileUtils.chmod "u=wrx,go=rx", 'somecommand'
- # Bundler::FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb)
- # Bundler::FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true
- #
- # "a" :: is user, group, other mask.
- # "u" :: is user's mask.
- # "g" :: is group's mask.
- # "o" :: is other's mask.
- # "w" :: is write permission.
- # "r" :: is read permission.
- # "x" :: is execute permission.
- # "X" ::
- # is execute permission for directories only, must be used in conjunction with "+"
- # "s" :: is uid, gid.
- # "t" :: is sticky bit.
- # "+" :: is added to a class given the specified mode.
- # "-" :: Is removed from a given class given mode.
- # "=" :: Is the exact nature of the class will be given a specified mode.
-
def chmod(mode, list, noop: nil, verbose: nil)
list = fu_list(list)
fu_output_message sprintf('chmod %s %s', mode_to_s(mode), list.join(' ')) if verbose
@@ -1019,12 +1822,7 @@ module Bundler::FileUtils
end
module_function :chmod
- #
- # Changes permission bits on the named files (in +list+)
- # to the bit pattern represented by +mode+.
- #
- # Bundler::FileUtils.chmod_R 0700, "/tmp/app.#{$$}"
- # Bundler::FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}"
+ # Like Bundler::FileUtils.chmod, but changes permissions recursively.
#
def chmod_R(mode, list, noop: nil, verbose: nil, force: nil)
list = fu_list(list)
@@ -1044,15 +1842,68 @@ module Bundler::FileUtils
end
module_function :chmod_R
+ # Changes the owner and group on the entries at the paths given in +list+
+ # (a single path or an array of paths)
+ # to the given +user+ and +group+;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
+ #
+ # - Modifies each entry that is a regular file using
+ # {File.chown}[rdoc-ref:File.chown].
+ # - Modifies each entry that is a symbolic link using
+ # {File.lchown}[rdoc-ref:File.lchown].
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Changes owner and group on the named files (in +list+)
- # to the user +user+ and the group +group+. +user+ and +group+
- # may be an ID (Integer/String) or a name (String).
- # If +user+ or +group+ is nil, this method does not change
- # the attribute.
+ # User and group:
#
- # Bundler::FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby'
- # Bundler::FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true
+ # - Argument +user+ may be a user name or a user id;
+ # if +nil+ or +-1+, the user is not changed.
+ # - Argument +group+ may be a group name or a group id;
+ # if +nil+ or +-1+, the group is not changed.
+ # - The user must be a member of the group.
+ #
+ # Examples:
+ #
+ # # One path.
+ # # User and group as string names.
+ # File.stat('src0.txt').uid # => 1004
+ # File.stat('src0.txt').gid # => 1004
+ # Bundler::FileUtils.chown('user2', 'group1', 'src0.txt')
+ # File.stat('src0.txt').uid # => 1006
+ # File.stat('src0.txt').gid # => 1005
+ #
+ # # User and group as uid and gid.
+ # Bundler::FileUtils.chown(1004, 1004, 'src0.txt')
+ # File.stat('src0.txt').uid # => 1004
+ # File.stat('src0.txt').gid # => 1004
+ #
+ # # Array of paths.
+ # Bundler::FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'])
+ #
+ # # Directory (not recursive).
+ # Bundler::FileUtils.chown('user2', 'group1', '.')
+ #
+ # Keyword arguments:
+ #
+ # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.chown('user2', 'group1', 'src0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.chown(1004, 1004, 'src0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # Bundler::FileUtils.chown('user2', 'group1', path, noop: true, verbose: true)
+ # Bundler::FileUtils.chown('user2', 'group1', '.', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # chown user2:group1 src0.txt
+ # chown 1004:1004 src0.txt
+ # chown 1006:1005 src0.txt src0.dat
+ # chown user2:group1 src0.txt
+ # chown user2:group1 .
+ #
+ # Related: Bundler::FileUtils.chown_R.
#
def chown(user, group, list, noop: nil, verbose: nil)
list = fu_list(list)
@@ -1068,15 +1919,7 @@ module Bundler::FileUtils
end
module_function :chown
- #
- # Changes owner and group on the named files (in +list+)
- # to the user +user+ and the group +group+ recursively.
- # +user+ and +group+ may be an ID (Integer/String) or
- # a name (String). If +user+ or +group+ is nil, this
- # method does not change the attribute.
- #
- # Bundler::FileUtils.chown_R 'www', 'www', '/var/www/htdocs'
- # Bundler::FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true
+ # Like Bundler::FileUtils.chown, but changes owner and group recursively.
#
def chown_R(user, group, list, noop: nil, verbose: nil, force: nil)
list = fu_list(list)
@@ -1127,12 +1970,50 @@ module Bundler::FileUtils
end
private_module_function :fu_get_gid
+ # Updates modification times (mtime) and access times (atime)
+ # of the entries given by the paths in +list+
+ # (a single path or an array of paths);
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # By default, creates an empty file for any path to a non-existent entry;
+ # use keyword argument +nocreate+ to raise an exception instead.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Examples:
+ #
+ # # Single path.
+ # f = File.new('src0.txt') # Existing file.
+ # f.atime # => 2022-06-10 11:11:21.200277 -0700
+ # f.mtime # => 2022-06-10 11:11:21.200277 -0700
+ # Bundler::FileUtils.touch('src0.txt')
+ # f = File.new('src0.txt')
+ # f.atime # => 2022-06-11 08:28:09.8185343 -0700
+ # f.mtime # => 2022-06-11 08:28:09.8185343 -0700
#
- # Updates modification time (mtime) and access time (atime) of file(s) in
- # +list+. Files are created if they don't exist.
+ # # Array of paths.
+ # Bundler::FileUtils.touch(['src0.txt', 'src0.dat'])
#
- # Bundler::FileUtils.touch 'timestamp'
- # Bundler::FileUtils.touch Dir.glob('*.c'); system 'make'
+ # Keyword arguments:
+ #
+ # - <tt>mtime: <i>time</i></tt> - sets the entry's mtime to the given time,
+ # instead of the current time.
+ # - <tt>nocreate: true</tt> - raises an exception if the entry does not exist.
+ # - <tt>noop: true</tt> - does not touch entries; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # Bundler::FileUtils.touch('src0.txt', noop: true, verbose: true)
+ # Bundler::FileUtils.touch(['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # Bundler::FileUtils.touch(path, noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # touch src0.txt
+ # touch src0.txt src0.dat
+ # touch src0.txt
+ #
+ # Related: Bundler::FileUtils.uptodate?.
#
def touch(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil)
list = fu_list(list)
@@ -1290,14 +2171,9 @@ module Bundler::FileUtils
def entries
opts = {}
- opts[:encoding] = ::Encoding::UTF_8 if fu_windows?
+ opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
- files = if Dir.respond_to?(:children)
- Dir.children(path, **opts)
- else
- Dir.entries(path(), **opts)
- .reject {|n| n == '.' or n == '..' }
- end
+ files = Dir.children(path, **opts)
untaint = RUBY_VERSION < '2.7'
files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) }
@@ -1345,6 +2221,7 @@ module Bundler::FileUtils
else
File.chmod mode, path()
end
+ rescue Errno::EOPNOTSUPP
end
def chown(uid, gid)
@@ -1439,7 +2316,7 @@ module Bundler::FileUtils
if st.symlink?
begin
File.lchmod mode, path
- rescue NotImplementedError
+ rescue NotImplementedError, Errno::EOPNOTSUPP
end
else
File.chmod mode, path
@@ -1498,13 +2375,21 @@ module Bundler::FileUtils
def postorder_traverse
if directory?
- entries().each do |ent|
+ begin
+ children = entries()
+ rescue Errno::EACCES
+ # Failed to get the list of children.
+ # Assuming there is no children, try to process the parent directory.
+ yield self
+ return
+ end
+
+ children.each do |ent|
ent.postorder_traverse do |e|
yield e
end
end
end
- ensure
yield self
end
@@ -1559,7 +2444,15 @@ module Bundler::FileUtils
def join(dir, base)
return File.path(dir) if not base or base == '.'
return File.path(base) if not dir or dir == '.'
- File.join(dir, base)
+ begin
+ File.join(dir, base)
+ rescue EncodingError
+ if fu_windows?
+ File.join(dir.encode(::Encoding::UTF_8), base.encode(::Encoding::UTF_8))
+ else
+ raise
+ end
+ end
end
if File::ALT_SEPARATOR
@@ -1590,15 +2483,15 @@ module Bundler::FileUtils
end
private_module_function :fu_each_src_dest
- def fu_each_src_dest0(src, dest) #:nodoc:
+ def fu_each_src_dest0(src, dest, target_directory = true) #:nodoc:
if tmp = Array.try_convert(src)
tmp.each do |s|
s = File.path(s)
- yield s, File.join(dest, File.basename(s))
+ yield s, (target_directory ? File.join(dest, File.basename(s)) : dest)
end
else
src = File.path(src)
- if File.directory?(dest)
+ if target_directory and File.directory?(dest)
yield src, File.join(dest, File.basename(src))
else
yield src, File.path(dest)
@@ -1614,7 +2507,7 @@ module Bundler::FileUtils
def fu_output_message(msg) #:nodoc:
output = @fileutils_output if defined?(@fileutils_output)
- output ||= $stderr
+ output ||= $stdout
if defined?(@fileutils_label)
msg = @fileutils_label + msg
end
@@ -1622,6 +2515,56 @@ module Bundler::FileUtils
end
private_module_function :fu_output_message
+ def fu_split_path(path)
+ path = File.path(path)
+ list = []
+ until (parent, base = File.split(path); parent == path or parent == ".")
+ list << base
+ path = parent
+ end
+ list << path
+ list.reverse!
+ end
+ private_module_function :fu_split_path
+
+ def fu_relative_components_from(target, base) #:nodoc:
+ i = 0
+ while target[i]&.== base[i]
+ i += 1
+ end
+ Array.new(base.size-i, '..').concat(target[i..-1])
+ end
+ private_module_function :fu_relative_components_from
+
+ def fu_clean_components(*comp)
+ comp.shift while comp.first == "."
+ return comp if comp.empty?
+ clean = [comp.shift]
+ path = File.join(*clean, "") # ending with File::SEPARATOR
+ while c = comp.shift
+ if c == ".." and clean.last != ".." and !(fu_have_symlink? && File.symlink?(path))
+ clean.pop
+ path.chomp!(%r((?<=\A|/)[^/]+/\z), "")
+ else
+ clean << c
+ path << c << "/"
+ end
+ end
+ clean
+ end
+ private_module_function :fu_clean_components
+
+ if fu_windows?
+ def fu_starting_path?(path)
+ path&.start_with?(%r(\w:|/))
+ end
+ else
+ def fu_starting_path?(path)
+ path&.start_with?("/")
+ end
+ end
+ private_module_function :fu_starting_path?
+
# This hash table holds command options.
OPT_TABLE = {} #:nodoc: internal use only
(private_instance_methods & methods(false)).inject(OPT_TABLE) {|tbl, name|
@@ -1631,50 +2574,49 @@ module Bundler::FileUtils
public
+ # Returns an array of the string names of \Bundler::FileUtils methods
+ # that accept one or more keyword arguments:
#
- # Returns an Array of names of high-level methods that accept any keyword
- # arguments.
- #
- # p Bundler::FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...]
+ # Bundler::FileUtils.commands.sort.take(3) # => ["cd", "chdir", "chmod"]
#
def self.commands
OPT_TABLE.keys
end
+ # Returns an array of the string keyword names:
#
- # Returns an Array of option names.
- #
- # p Bundler::FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"]
+ # Bundler::FileUtils.options.take(3) # => ["noop", "verbose", "force"]
#
def self.options
OPT_TABLE.values.flatten.uniq.map {|sym| sym.to_s }
end
+ # Returns +true+ if method +mid+ accepts the given option +opt+, +false+ otherwise;
+ # the arguments may be strings or symbols:
#
- # Returns true if the method +mid+ have an option +opt+.
- #
- # p Bundler::FileUtils.have_option?(:cp, :noop) #=> true
- # p Bundler::FileUtils.have_option?(:rm, :force) #=> true
- # p Bundler::FileUtils.have_option?(:rm, :preserve) #=> false
+ # Bundler::FileUtils.have_option?(:chmod, :noop) # => true
+ # Bundler::FileUtils.have_option?('chmod', 'secure') # => false
#
def self.have_option?(mid, opt)
li = OPT_TABLE[mid.to_s] or raise ArgumentError, "no such method: #{mid}"
li.include?(opt)
end
+ # Returns an array of the string keyword name for method +mid+;
+ # the argument may be a string or a symbol:
#
- # Returns an Array of option names of the method +mid+.
- #
- # p Bundler::FileUtils.options_of(:rm) #=> ["noop", "verbose", "force"]
+ # Bundler::FileUtils.options_of(:rm) # => ["force", "noop", "verbose"]
+ # Bundler::FileUtils.options_of('mv') # => ["force", "noop", "verbose", "secure"]
#
def self.options_of(mid)
OPT_TABLE[mid.to_s].map {|sym| sym.to_s }
end
+ # Returns an array of the string method names of the methods
+ # that accept the given keyword option +opt+;
+ # the argument must be a symbol:
#
- # Returns an Array of methods names which have the option +opt+.
- #
- # p Bundler::FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"]
+ # Bundler::FileUtils.collect_method(:preserve) # => ["cp", "copy", "cp_r", "install"]
#
def self.collect_method(opt)
OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) }
diff --git a/lib/bundler/vendor/fileutils/lib/fileutils/version.rb b/lib/bundler/vendor/fileutils/lib/fileutils/version.rb
deleted file mode 100644
index b8f616e4fb..0000000000
--- a/lib/bundler/vendor/fileutils/lib/fileutils/version.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::FileUtils
- VERSION = "1.3.0"
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo.rb b/lib/bundler/vendor/molinillo/lib/molinillo.rb
deleted file mode 100644
index baedefe98b..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'molinillo/compatibility'
-require_relative 'molinillo/gem_metadata'
-require_relative 'molinillo/errors'
-require_relative 'molinillo/resolver'
-require_relative 'molinillo/modules/ui'
-require_relative 'molinillo/modules/specification_provider'
-
-# Bundler::Molinillo is a generic dependency resolution algorithm.
-module Bundler::Molinillo
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb b/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb
deleted file mode 100644
index 3eba8e4083..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # Hacks needed for old Ruby versions.
- module Compatibility
- module_function
-
- if [].respond_to?(:flat_map)
- # Flat map
- # @param [Enumerable] enum an enumerable object
- # @block the block to flat-map with
- # @return The enum, flat-mapped
- def flat_map(enum, &blk)
- enum.flat_map(&blk)
- end
- else
- # Flat map
- # @param [Enumerable] enum an enumerable object
- # @block the block to flat-map with
- # @return The enum, flat-mapped
- def flat_map(enum, &blk)
- enum.map(&blk).flatten(1)
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb b/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
deleted file mode 100644
index bcacf35243..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # @!visibility private
- module Delegates
- # Delegates all {Bundler::Molinillo::ResolutionState} methods to a `#state` property.
- module ResolutionState
- # (see Bundler::Molinillo::ResolutionState#name)
- def name
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.name
- end
-
- # (see Bundler::Molinillo::ResolutionState#requirements)
- def requirements
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.requirements
- end
-
- # (see Bundler::Molinillo::ResolutionState#activated)
- def activated
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.activated
- end
-
- # (see Bundler::Molinillo::ResolutionState#requirement)
- def requirement
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.requirement
- end
-
- # (see Bundler::Molinillo::ResolutionState#possibilities)
- def possibilities
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.possibilities
- end
-
- # (see Bundler::Molinillo::ResolutionState#depth)
- def depth
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.depth
- end
-
- # (see Bundler::Molinillo::ResolutionState#conflicts)
- def conflicts
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.conflicts
- end
-
- # (see Bundler::Molinillo::ResolutionState#unused_unwind_options)
- def unused_unwind_options
- current_state = state || Bundler::Molinillo::ResolutionState.empty
- current_state.unused_unwind_options
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb b/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
deleted file mode 100644
index ec9c770a28..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- module Delegates
- # Delegates all {Bundler::Molinillo::SpecificationProvider} methods to a
- # `#specification_provider` property.
- module SpecificationProvider
- # (see Bundler::Molinillo::SpecificationProvider#search_for)
- def search_for(dependency)
- with_no_such_dependency_error_handling do
- specification_provider.search_for(dependency)
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#dependencies_for)
- def dependencies_for(specification)
- with_no_such_dependency_error_handling do
- specification_provider.dependencies_for(specification)
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#requirement_satisfied_by?)
- def requirement_satisfied_by?(requirement, activated, spec)
- with_no_such_dependency_error_handling do
- specification_provider.requirement_satisfied_by?(requirement, activated, spec)
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#name_for)
- def name_for(dependency)
- with_no_such_dependency_error_handling do
- specification_provider.name_for(dependency)
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#name_for_explicit_dependency_source)
- def name_for_explicit_dependency_source
- with_no_such_dependency_error_handling do
- specification_provider.name_for_explicit_dependency_source
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#name_for_locking_dependency_source)
- def name_for_locking_dependency_source
- with_no_such_dependency_error_handling do
- specification_provider.name_for_locking_dependency_source
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#sort_dependencies)
- def sort_dependencies(dependencies, activated, conflicts)
- with_no_such_dependency_error_handling do
- specification_provider.sort_dependencies(dependencies, activated, conflicts)
- end
- end
-
- # (see Bundler::Molinillo::SpecificationProvider#allow_missing?)
- def allow_missing?(dependency)
- with_no_such_dependency_error_handling do
- specification_provider.allow_missing?(dependency)
- end
- end
-
- private
-
- # Ensures any raised {NoSuchDependencyError} has its
- # {NoSuchDependencyError#required_by} set.
- # @yield
- def with_no_such_dependency_error_handling
- yield
- rescue NoSuchDependencyError => error
- if state
- vertex = activated.vertex_named(name_for(error.dependency))
- error.required_by += vertex.incoming_edges.map { |e| e.origin.name }
- error.required_by << name_for_explicit_dependency_source unless vertex.explicit_requirements.empty?
- end
- raise
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
deleted file mode 100644
index 31578bb5bf..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
+++ /dev/null
@@ -1,223 +0,0 @@
-# frozen_string_literal: true
-
-require 'set'
-require 'tsort'
-
-require_relative 'dependency_graph/log'
-require_relative 'dependency_graph/vertex'
-
-module Bundler::Molinillo
- # A directed acyclic graph that is tuned to hold named dependencies
- class DependencyGraph
- include Enumerable
-
- # Enumerates through the vertices of the graph.
- # @return [Array<Vertex>] The graph's vertices.
- def each
- return vertices.values.each unless block_given?
- vertices.values.each { |v| yield v }
- end
-
- include TSort
-
- # @!visibility private
- alias tsort_each_node each
-
- # @!visibility private
- def tsort_each_child(vertex, &block)
- vertex.successors.each(&block)
- end
-
- # Topologically sorts the given vertices.
- # @param [Enumerable<Vertex>] vertices the vertices to be sorted, which must
- # all belong to the same graph.
- # @return [Array<Vertex>] The sorted vertices.
- def self.tsort(vertices)
- TSort.tsort(
- lambda { |b| vertices.each(&b) },
- lambda { |v, &b| (v.successors & vertices).each(&b) }
- )
- end
-
- # A directed edge of a {DependencyGraph}
- # @attr [Vertex] origin The origin of the directed edge
- # @attr [Vertex] destination The destination of the directed edge
- # @attr [Object] requirement The requirement the directed edge represents
- Edge = Struct.new(:origin, :destination, :requirement)
-
- # @return [{String => Vertex}] the vertices of the dependency graph, keyed
- # by {Vertex#name}
- attr_reader :vertices
-
- # @return [Log] the op log for this graph
- attr_reader :log
-
- # Initializes an empty dependency graph
- def initialize
- @vertices = {}
- @log = Log.new
- end
-
- # Tags the current state of the dependency as the given tag
- # @param [Object] tag an opaque tag for the current state of the graph
- # @return [Void]
- def tag(tag)
- log.tag(self, tag)
- end
-
- # Rewinds the graph to the state tagged as `tag`
- # @param [Object] tag the tag to rewind to
- # @return [Void]
- def rewind_to(tag)
- log.rewind_to(self, tag)
- end
-
- # Initializes a copy of a {DependencyGraph}, ensuring that all {#vertices}
- # are properly copied.
- # @param [DependencyGraph] other the graph to copy.
- def initialize_copy(other)
- super
- @vertices = {}
- @log = other.log.dup
- traverse = lambda do |new_v, old_v|
- return if new_v.outgoing_edges.size == old_v.outgoing_edges.size
- old_v.outgoing_edges.each do |edge|
- destination = add_vertex(edge.destination.name, edge.destination.payload)
- add_edge_no_circular(new_v, destination, edge.requirement)
- traverse.call(destination, edge.destination)
- end
- end
- other.vertices.each do |name, vertex|
- new_vertex = add_vertex(name, vertex.payload, vertex.root?)
- new_vertex.explicit_requirements.replace(vertex.explicit_requirements)
- traverse.call(new_vertex, vertex)
- end
- end
-
- # @return [String] a string suitable for debugging
- def inspect
- "#{self.class}:#{vertices.values.inspect}"
- end
-
- # @param [Hash] options options for dot output.
- # @return [String] Returns a dot format representation of the graph
- def to_dot(options = {})
- edge_label = options.delete(:edge_label)
- raise ArgumentError, "Unknown options: #{options.keys}" unless options.empty?
-
- dot_vertices = []
- dot_edges = []
- vertices.each do |n, v|
- dot_vertices << " #{n} [label=\"{#{n}|#{v.payload}}\"]"
- v.outgoing_edges.each do |e|
- label = edge_label ? edge_label.call(e) : e.requirement
- dot_edges << " #{e.origin.name} -> #{e.destination.name} [label=#{label.to_s.dump}]"
- end
- end
-
- dot_vertices.uniq!
- dot_vertices.sort!
- dot_edges.uniq!
- dot_edges.sort!
-
- dot = dot_vertices.unshift('digraph G {').push('') + dot_edges.push('}')
- dot.join("\n")
- end
-
- # @return [Boolean] whether the two dependency graphs are equal, determined
- # by a recursive traversal of each {#root_vertices} and its
- # {Vertex#successors}
- def ==(other)
- return false unless other
- return true if equal?(other)
- vertices.each do |name, vertex|
- other_vertex = other.vertex_named(name)
- return false unless other_vertex
- return false unless vertex.payload == other_vertex.payload
- return false unless other_vertex.successors.to_set == vertex.successors.to_set
- end
- end
-
- # @param [String] name
- # @param [Object] payload
- # @param [Array<String>] parent_names
- # @param [Object] requirement the requirement that is requiring the child
- # @return [void]
- def add_child_vertex(name, payload, parent_names, requirement)
- root = !parent_names.delete(nil) { true }
- vertex = add_vertex(name, payload, root)
- vertex.explicit_requirements << requirement if root
- parent_names.each do |parent_name|
- parent_vertex = vertex_named(parent_name)
- add_edge(parent_vertex, vertex, requirement)
- end
- vertex
- end
-
- # Adds a vertex with the given name, or updates the existing one.
- # @param [String] name
- # @param [Object] payload
- # @return [Vertex] the vertex that was added to `self`
- def add_vertex(name, payload, root = false)
- log.add_vertex(self, name, payload, root)
- end
-
- # Detaches the {#vertex_named} `name` {Vertex} from the graph, recursively
- # removing any non-root vertices that were orphaned in the process
- # @param [String] name
- # @return [Array<Vertex>] the vertices which have been detached
- def detach_vertex_named(name)
- log.detach_vertex_named(self, name)
- end
-
- # @param [String] name
- # @return [Vertex,nil] the vertex with the given name
- def vertex_named(name)
- vertices[name]
- end
-
- # @param [String] name
- # @return [Vertex,nil] the root vertex with the given name
- def root_vertex_named(name)
- vertex = vertex_named(name)
- vertex if vertex && vertex.root?
- end
-
- # Adds a new {Edge} to the dependency graph
- # @param [Vertex] origin
- # @param [Vertex] destination
- # @param [Object] requirement the requirement that this edge represents
- # @return [Edge] the added edge
- def add_edge(origin, destination, requirement)
- if destination.path_to?(origin)
- raise CircularDependencyError.new([origin, destination])
- end
- add_edge_no_circular(origin, destination, requirement)
- end
-
- # Deletes an {Edge} from the dependency graph
- # @param [Edge] edge
- # @return [Void]
- def delete_edge(edge)
- log.delete_edge(self, edge.origin.name, edge.destination.name, edge.requirement)
- end
-
- # Sets the payload of the vertex with the given name
- # @param [String] name the name of the vertex
- # @param [Object] payload the payload
- # @return [Void]
- def set_payload(name, payload)
- log.set_payload(self, name, payload)
- end
-
- private
-
- # Adds a new {Edge} to the dependency graph without checking for
- # circularity.
- # @param (see #add_edge)
- # @return (see #add_edge)
- def add_edge_no_circular(origin, destination, requirement)
- log.add_edge_no_circular(self, origin.name, destination.name, requirement)
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
deleted file mode 100644
index c04c7eec9c..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- class DependencyGraph
- # An action that modifies a {DependencyGraph} that is reversible.
- # @abstract
- class Action
- # rubocop:disable Lint/UnusedMethodArgument
-
- # @return [Symbol] The name of the action.
- def self.action_name
- raise 'Abstract'
- end
-
- # Performs the action on the given graph.
- # @param [DependencyGraph] graph the graph to perform the action on.
- # @return [Void]
- def up(graph)
- raise 'Abstract'
- end
-
- # Reverses the action on the given graph.
- # @param [DependencyGraph] graph the graph to reverse the action on.
- # @return [Void]
- def down(graph)
- raise 'Abstract'
- end
-
- # @return [Action,Nil] The previous action
- attr_accessor :previous
-
- # @return [Action,Nil] The next action
- attr_accessor :next
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
deleted file mode 100644
index 946a08236e..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # (see DependencyGraph#add_edge_no_circular)
- class AddEdgeNoCircular < Action
- # @!group Action
-
- # (see Action.action_name)
- def self.action_name
- :add_vertex
- end
-
- # (see Action#up)
- def up(graph)
- edge = make_edge(graph)
- edge.origin.outgoing_edges << edge
- edge.destination.incoming_edges << edge
- edge
- end
-
- # (see Action#down)
- def down(graph)
- edge = make_edge(graph)
- delete_first(edge.origin.outgoing_edges, edge)
- delete_first(edge.destination.incoming_edges, edge)
- end
-
- # @!group AddEdgeNoCircular
-
- # @return [String] the name of the origin of the edge
- attr_reader :origin
-
- # @return [String] the name of the destination of the edge
- attr_reader :destination
-
- # @return [Object] the requirement that the edge represents
- attr_reader :requirement
-
- # @param [DependencyGraph] graph the graph to find vertices from
- # @return [Edge] The edge this action adds
- def make_edge(graph)
- Edge.new(graph.vertex_named(origin), graph.vertex_named(destination), requirement)
- end
-
- # Initialize an action to add an edge to a dependency graph
- # @param [String] origin the name of the origin of the edge
- # @param [String] destination the name of the destination of the edge
- # @param [Object] requirement the requirement that the edge represents
- def initialize(origin, destination, requirement)
- @origin = origin
- @destination = destination
- @requirement = requirement
- end
-
- private
-
- def delete_first(array, item)
- return unless index = array.index(item)
- array.delete_at(index)
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
deleted file mode 100644
index 483527daf8..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # (see DependencyGraph#add_vertex)
- class AddVertex < Action # :nodoc:
- # @!group Action
-
- # (see Action.action_name)
- def self.action_name
- :add_vertex
- end
-
- # (see Action#up)
- def up(graph)
- if existing = graph.vertices[name]
- @existing_payload = existing.payload
- @existing_root = existing.root
- end
- vertex = existing || Vertex.new(name, payload)
- graph.vertices[vertex.name] = vertex
- vertex.payload ||= payload
- vertex.root ||= root
- vertex
- end
-
- # (see Action#down)
- def down(graph)
- if defined?(@existing_payload)
- vertex = graph.vertices[name]
- vertex.payload = @existing_payload
- vertex.root = @existing_root
- else
- graph.vertices.delete(name)
- end
- end
-
- # @!group AddVertex
-
- # @return [String] the name of the vertex
- attr_reader :name
-
- # @return [Object] the payload for the vertex
- attr_reader :payload
-
- # @return [Boolean] whether the vertex is root or not
- attr_reader :root
-
- # Initialize an action to add a vertex to a dependency graph
- # @param [String] name the name of the vertex
- # @param [Object] payload the payload for the vertex
- # @param [Boolean] root whether the vertex is root or not
- def initialize(name, payload, root)
- @name = name
- @payload = payload
- @root = root
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
deleted file mode 100644
index d81940585a..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # (see DependencyGraph#delete_edge)
- class DeleteEdge < Action
- # @!group Action
-
- # (see Action.action_name)
- def self.action_name
- :delete_edge
- end
-
- # (see Action#up)
- def up(graph)
- edge = make_edge(graph)
- edge.origin.outgoing_edges.delete(edge)
- edge.destination.incoming_edges.delete(edge)
- end
-
- # (see Action#down)
- def down(graph)
- edge = make_edge(graph)
- edge.origin.outgoing_edges << edge
- edge.destination.incoming_edges << edge
- edge
- end
-
- # @!group DeleteEdge
-
- # @return [String] the name of the origin of the edge
- attr_reader :origin_name
-
- # @return [String] the name of the destination of the edge
- attr_reader :destination_name
-
- # @return [Object] the requirement that the edge represents
- attr_reader :requirement
-
- # @param [DependencyGraph] graph the graph to find vertices from
- # @return [Edge] The edge this action adds
- def make_edge(graph)
- Edge.new(
- graph.vertex_named(origin_name),
- graph.vertex_named(destination_name),
- requirement
- )
- end
-
- # Initialize an action to add an edge to a dependency graph
- # @param [String] origin_name the name of the origin of the edge
- # @param [String] destination_name the name of the destination of the edge
- # @param [Object] requirement the requirement that the edge represents
- def initialize(origin_name, destination_name, requirement)
- @origin_name = origin_name
- @destination_name = destination_name
- @requirement = requirement
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
deleted file mode 100644
index 36fce7c526..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # @see DependencyGraph#detach_vertex_named
- class DetachVertexNamed < Action
- # @!group Action
-
- # (see Action#name)
- def self.action_name
- :add_vertex
- end
-
- # (see Action#up)
- def up(graph)
- return [] unless @vertex = graph.vertices.delete(name)
-
- removed_vertices = [@vertex]
- @vertex.outgoing_edges.each do |e|
- v = e.destination
- v.incoming_edges.delete(e)
- if !v.root? && v.incoming_edges.empty?
- removed_vertices.concat graph.detach_vertex_named(v.name)
- end
- end
-
- @vertex.incoming_edges.each do |e|
- v = e.origin
- v.outgoing_edges.delete(e)
- end
-
- removed_vertices
- end
-
- # (see Action#down)
- def down(graph)
- return unless @vertex
- graph.vertices[@vertex.name] = @vertex
- @vertex.outgoing_edges.each do |e|
- e.destination.incoming_edges << e
- end
- @vertex.incoming_edges.each do |e|
- e.origin.outgoing_edges << e
- end
- end
-
- # @!group DetachVertexNamed
-
- # @return [String] the name of the vertex to detach
- attr_reader :name
-
- # Initialize an action to detach a vertex from a dependency graph
- # @param [String] name the name of the vertex to detach
- def initialize(name)
- @name = name
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
deleted file mode 100644
index 6f0de19886..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'add_edge_no_circular'
-require_relative 'add_vertex'
-require_relative 'delete_edge'
-require_relative 'detach_vertex_named'
-require_relative 'set_payload'
-require_relative 'tag'
-
-module Bundler::Molinillo
- class DependencyGraph
- # A log for dependency graph actions
- class Log
- # Initializes an empty log
- def initialize
- @current_action = @first_action = nil
- end
-
- # @!macro [new] action
- # {include:DependencyGraph#$0}
- # @param [Graph] graph the graph to perform the action on
- # @param (see DependencyGraph#$0)
- # @return (see DependencyGraph#$0)
-
- # @macro action
- def tag(graph, tag)
- push_action(graph, Tag.new(tag))
- end
-
- # @macro action
- def add_vertex(graph, name, payload, root)
- push_action(graph, AddVertex.new(name, payload, root))
- end
-
- # @macro action
- def detach_vertex_named(graph, name)
- push_action(graph, DetachVertexNamed.new(name))
- end
-
- # @macro action
- def add_edge_no_circular(graph, origin, destination, requirement)
- push_action(graph, AddEdgeNoCircular.new(origin, destination, requirement))
- end
-
- # {include:DependencyGraph#delete_edge}
- # @param [Graph] graph the graph to perform the action on
- # @param [String] origin_name
- # @param [String] destination_name
- # @param [Object] requirement
- # @return (see DependencyGraph#delete_edge)
- def delete_edge(graph, origin_name, destination_name, requirement)
- push_action(graph, DeleteEdge.new(origin_name, destination_name, requirement))
- end
-
- # @macro action
- def set_payload(graph, name, payload)
- push_action(graph, SetPayload.new(name, payload))
- end
-
- # Pops the most recent action from the log and undoes the action
- # @param [DependencyGraph] graph
- # @return [Action] the action that was popped off the log
- def pop!(graph)
- return unless action = @current_action
- unless @current_action = action.previous
- @first_action = nil
- end
- action.down(graph)
- action
- end
-
- extend Enumerable
-
- # @!visibility private
- # Enumerates each action in the log
- # @yield [Action]
- def each
- return enum_for unless block_given?
- action = @first_action
- loop do
- break unless action
- yield action
- action = action.next
- end
- self
- end
-
- # @!visibility private
- # Enumerates each action in the log in reverse order
- # @yield [Action]
- def reverse_each
- return enum_for(:reverse_each) unless block_given?
- action = @current_action
- loop do
- break unless action
- yield action
- action = action.previous
- end
- self
- end
-
- # @macro action
- def rewind_to(graph, tag)
- loop do
- action = pop!(graph)
- raise "No tag #{tag.inspect} found" unless action
- break if action.class.action_name == :tag && action.tag == tag
- end
- end
-
- private
-
- # Adds the given action to the log, running the action
- # @param [DependencyGraph] graph
- # @param [Action] action
- # @return The value returned by `action.up`
- def push_action(graph, action)
- action.previous = @current_action
- @current_action.next = action if @current_action
- @current_action = action
- @first_action ||= action
- action.up(graph)
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
deleted file mode 100644
index 2e9b90e6cd..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # @see DependencyGraph#set_payload
- class SetPayload < Action # :nodoc:
- # @!group Action
-
- # (see Action.action_name)
- def self.action_name
- :set_payload
- end
-
- # (see Action#up)
- def up(graph)
- vertex = graph.vertex_named(name)
- @old_payload = vertex.payload
- vertex.payload = payload
- end
-
- # (see Action#down)
- def down(graph)
- graph.vertex_named(name).payload = @old_payload
- end
-
- # @!group SetPayload
-
- # @return [String] the name of the vertex
- attr_reader :name
-
- # @return [Object] the payload for the vertex
- attr_reader :payload
-
- # Initialize an action to add set the payload for a vertex in a dependency
- # graph
- # @param [String] name the name of the vertex
- # @param [Object] payload the payload for the vertex
- def initialize(name, payload)
- @name = name
- @payload = payload
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
deleted file mode 100644
index fccfc78cc7..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'action'
-module Bundler::Molinillo
- class DependencyGraph
- # @!visibility private
- # @see DependencyGraph#tag
- class Tag < Action
- # @!group Action
-
- # (see Action.action_name)
- def self.action_name
- :tag
- end
-
- # (see Action#up)
- def up(_graph)
- end
-
- # (see Action#down)
- def down(_graph)
- end
-
- # @!group Tag
-
- # @return [Object] An opaque tag
- attr_reader :tag
-
- # Initialize an action to tag a state of a dependency graph
- # @param [Object] tag an opaque tag
- def initialize(tag)
- @tag = tag
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
deleted file mode 100644
index 41bc013143..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
+++ /dev/null
@@ -1,158 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- class DependencyGraph
- # A vertex in a {DependencyGraph} that encapsulates a {#name} and a
- # {#payload}
- class Vertex
- # @return [String] the name of the vertex
- attr_accessor :name
-
- # @return [Object] the payload the vertex holds
- attr_accessor :payload
-
- # @return [Array<Object>] the explicit requirements that required
- # this vertex
- attr_reader :explicit_requirements
-
- # @return [Boolean] whether the vertex is considered a root vertex
- attr_accessor :root
- alias root? root
-
- # Initializes a vertex with the given name and payload.
- # @param [String] name see {#name}
- # @param [Object] payload see {#payload}
- def initialize(name, payload)
- @name = name.frozen? ? name : name.dup.freeze
- @payload = payload
- @explicit_requirements = []
- @outgoing_edges = []
- @incoming_edges = []
- end
-
- # @return [Array<Object>] all of the requirements that required
- # this vertex
- def requirements
- (incoming_edges.map(&:requirement) + explicit_requirements).uniq
- end
-
- # @return [Array<Edge>] the edges of {#graph} that have `self` as their
- # {Edge#origin}
- attr_accessor :outgoing_edges
-
- # @return [Array<Edge>] the edges of {#graph} that have `self` as their
- # {Edge#destination}
- attr_accessor :incoming_edges
-
- # @return [Array<Vertex>] the vertices of {#graph} that have an edge with
- # `self` as their {Edge#destination}
- def predecessors
- incoming_edges.map(&:origin)
- end
-
- # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
- # {#descendent?}
- def recursive_predecessors
- _recursive_predecessors
- end
-
- # @param [Set<Vertex>] vertices the set to add the predecessors to
- # @return [Set<Vertex>] the vertices of {#graph} where `self` is a
- # {#descendent?}
- def _recursive_predecessors(vertices = Set.new)
- incoming_edges.each do |edge|
- vertex = edge.origin
- next unless vertices.add?(vertex)
- vertex._recursive_predecessors(vertices)
- end
-
- vertices
- end
- protected :_recursive_predecessors
-
- # @return [Array<Vertex>] the vertices of {#graph} that have an edge with
- # `self` as their {Edge#origin}
- def successors
- outgoing_edges.map(&:destination)
- end
-
- # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
- # {#ancestor?}
- def recursive_successors
- _recursive_successors
- end
-
- # @param [Set<Vertex>] vertices the set to add the successors to
- # @return [Set<Vertex>] the vertices of {#graph} where `self` is an
- # {#ancestor?}
- def _recursive_successors(vertices = Set.new)
- outgoing_edges.each do |edge|
- vertex = edge.destination
- next unless vertices.add?(vertex)
- vertex._recursive_successors(vertices)
- end
-
- vertices
- end
- protected :_recursive_successors
-
- # @return [String] a string suitable for debugging
- def inspect
- "#{self.class}:#{name}(#{payload.inspect})"
- end
-
- # @return [Boolean] whether the two vertices are equal, determined
- # by a recursive traversal of each {Vertex#successors}
- def ==(other)
- return true if equal?(other)
- shallow_eql?(other) &&
- successors.to_set == other.successors.to_set
- end
-
- # @param [Vertex] other the other vertex to compare to
- # @return [Boolean] whether the two vertices are equal, determined
- # solely by {#name} and {#payload} equality
- def shallow_eql?(other)
- return true if equal?(other)
- other &&
- name == other.name &&
- payload == other.payload
- end
-
- alias eql? ==
-
- # @return [Fixnum] a hash for the vertex based upon its {#name}
- def hash
- name.hash
- end
-
- # Is there a path from `self` to `other` following edges in the
- # dependency graph?
- # @return true iff there is a path following edges within this {#graph}
- def path_to?(other)
- _path_to?(other)
- end
-
- alias descendent? path_to?
-
- # @param [Vertex] other the vertex to check if there's a path to
- # @param [Set<Vertex>] visited the vertices of {#graph} that have been visited
- # @return [Boolean] whether there is a path to `other` from `self`
- def _path_to?(other, visited = Set.new)
- return false unless visited.add?(self)
- return true if equal?(other)
- successors.any? { |v| v._path_to?(other, visited) }
- end
- protected :_path_to?
-
- # Is there a path from `other` to `self` following edges in the
- # dependency graph?
- # @return true iff there is a path following edges within this {#graph}
- def ancestor?(other)
- other.path_to?(self)
- end
-
- alias is_reachable_from? ancestor?
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb b/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
deleted file mode 100644
index 89c7c324d5..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
+++ /dev/null
@@ -1,143 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # An error that occurred during the resolution process
- class ResolverError < StandardError; end
-
- # An error caused by searching for a dependency that is completely unknown,
- # i.e. has no versions available whatsoever.
- class NoSuchDependencyError < ResolverError
- # @return [Object] the dependency that could not be found
- attr_accessor :dependency
-
- # @return [Array<Object>] the specifications that depended upon {#dependency}
- attr_accessor :required_by
-
- # Initializes a new error with the given missing dependency.
- # @param [Object] dependency @see {#dependency}
- # @param [Array<Object>] required_by @see {#required_by}
- def initialize(dependency, required_by = [])
- @dependency = dependency
- @required_by = required_by.uniq
- super()
- end
-
- # The error message for the missing dependency, including the specifications
- # that had this dependency.
- def message
- sources = required_by.map { |r| "`#{r}`" }.join(' and ')
- message = "Unable to find a specification for `#{dependency}`"
- message += " depended upon by #{sources}" unless sources.empty?
- message
- end
- end
-
- # An error caused by attempting to fulfil a dependency that was circular
- #
- # @note This exception will be thrown iff a {Vertex} is added to a
- # {DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an
- # existing {DependencyGraph::Vertex}
- class CircularDependencyError < ResolverError
- # [Set<Object>] the dependencies responsible for causing the error
- attr_reader :dependencies
-
- # Initializes a new error with the given circular vertices.
- # @param [Array<DependencyGraph::Vertex>] vertices the vertices in the dependency
- # that caused the error
- def initialize(vertices)
- super "There is a circular dependency between #{vertices.map(&:name).join(' and ')}"
- @dependencies = vertices.map { |vertex| vertex.payload.possibilities.last }.to_set
- end
- end
-
- # An error caused by conflicts in version
- class VersionConflict < ResolverError
- # @return [{String => Resolution::Conflict}] the conflicts that caused
- # resolution to fail
- attr_reader :conflicts
-
- # @return [SpecificationProvider] the specification provider used during
- # resolution
- attr_reader :specification_provider
-
- # Initializes a new error with the given version conflicts.
- # @param [{String => Resolution::Conflict}] conflicts see {#conflicts}
- # @param [SpecificationProvider] specification_provider see {#specification_provider}
- def initialize(conflicts, specification_provider)
- pairs = []
- Compatibility.flat_map(conflicts.values.flatten, &:requirements).each do |conflicting|
- conflicting.each do |source, conflict_requirements|
- conflict_requirements.each do |c|
- pairs << [c, source]
- end
- end
- end
-
- super "Unable to satisfy the following requirements:\n\n" \
- "#{pairs.map { |r, d| "- `#{r}` required by `#{d}`" }.join("\n")}"
-
- @conflicts = conflicts
- @specification_provider = specification_provider
- end
-
- require_relative 'delegates/specification_provider'
- include Delegates::SpecificationProvider
-
- # @return [String] An error message that includes requirement trees,
- # which is much more detailed & customizable than the default message
- # @param [Hash] opts the options to create a message with.
- # @option opts [String] :solver_name The user-facing name of the solver
- # @option opts [String] :possibility_type The generic name of a possibility
- # @option opts [Proc] :reduce_trees A proc that reduced the list of requirement trees
- # @option opts [Proc] :printable_requirement A proc that pretty-prints requirements
- # @option opts [Proc] :additional_message_for_conflict A proc that appends additional
- # messages for each conflict
- # @option opts [Proc] :version_for_spec A proc that returns the version number for a
- # possibility
- def message_with_trees(opts = {})
- solver_name = opts.delete(:solver_name) { self.class.name.split('::').first }
- possibility_type = opts.delete(:possibility_type) { 'possibility named' }
- reduce_trees = opts.delete(:reduce_trees) { proc { |trees| trees.uniq.sort_by(&:to_s) } }
- printable_requirement = opts.delete(:printable_requirement) { proc { |req| req.to_s } }
- additional_message_for_conflict = opts.delete(:additional_message_for_conflict) { proc {} }
- version_for_spec = opts.delete(:version_for_spec) { proc(&:to_s) }
- incompatible_version_message_for_conflict = opts.delete(:incompatible_version_message_for_conflict) do
- proc do |name, _conflict|
- %(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
- end
- end
-
- conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
- o << "\n" << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
- if conflict.locked_requirement
- o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
- o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
- o << %(\n)
- end
- o << %( In #{name_for_explicit_dependency_source}:\n)
- trees = reduce_trees.call(conflict.requirement_trees)
-
- o << trees.map do |tree|
- t = ''.dup
- depth = 2
- tree.each do |req|
- t << ' ' * depth << req.to_s
- unless tree.last == req
- if spec = conflict.activated_by_name[name_for(req)]
- t << %( was resolved to #{version_for_spec.call(spec)}, which)
- end
- t << %( depends on)
- end
- t << %(\n)
- depth += 1
- end
- t
- end.join("\n")
-
- additional_message_for_conflict.call(o, name, conflict)
-
- o
- end.strip
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
deleted file mode 100644
index 73f8fbf2ac..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # The version of Bundler::Molinillo.
- VERSION = '0.6.6'.freeze
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb b/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
deleted file mode 100644
index fa094c1981..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # Provides information about specifcations and dependencies to the resolver,
- # allowing the {Resolver} class to remain generic while still providing power
- # and flexibility.
- #
- # This module contains the methods that users of Bundler::Molinillo must to implement,
- # using knowledge of their own model classes.
- module SpecificationProvider
- # Search for the specifications that match the given dependency.
- # The specifications in the returned array will be considered in reverse
- # order, so the latest version ought to be last.
- # @note This method should be 'pure', i.e. the return value should depend
- # only on the `dependency` parameter.
- #
- # @param [Object] dependency
- # @return [Array<Object>] the specifications that satisfy the given
- # `dependency`.
- def search_for(dependency)
- []
- end
-
- # Returns the dependencies of `specification`.
- # @note This method should be 'pure', i.e. the return value should depend
- # only on the `specification` parameter.
- #
- # @param [Object] specification
- # @return [Array<Object>] the dependencies that are required by the given
- # `specification`.
- def dependencies_for(specification)
- []
- end
-
- # Determines whether the given `requirement` is satisfied by the given
- # `spec`, in the context of the current `activated` dependency graph.
- #
- # @param [Object] requirement
- # @param [DependencyGraph] activated the current dependency graph in the
- # resolution process.
- # @param [Object] spec
- # @return [Boolean] whether `requirement` is satisfied by `spec` in the
- # context of the current `activated` dependency graph.
- def requirement_satisfied_by?(requirement, activated, spec)
- true
- end
-
- # Returns the name for the given `dependency`.
- # @note This method should be 'pure', i.e. the return value should depend
- # only on the `dependency` parameter.
- #
- # @param [Object] dependency
- # @return [String] the name for the given `dependency`.
- def name_for(dependency)
- dependency.to_s
- end
-
- # @return [String] the name of the source of explicit dependencies, i.e.
- # those passed to {Resolver#resolve} directly.
- def name_for_explicit_dependency_source
- 'user-specified dependency'
- end
-
- # @return [String] the name of the source of 'locked' dependencies, i.e.
- # those passed to {Resolver#resolve} directly as the `base`
- def name_for_locking_dependency_source
- 'Lockfile'
- end
-
- # Sort dependencies so that the ones that are easiest to resolve are first.
- # Easiest to resolve is (usually) defined by:
- # 1) Is this dependency already activated?
- # 2) How relaxed are the requirements?
- # 3) Are there any conflicts for this dependency?
- # 4) How many possibilities are there to satisfy this dependency?
- #
- # @param [Array<Object>] dependencies
- # @param [DependencyGraph] activated the current dependency graph in the
- # resolution process.
- # @param [{String => Array<Conflict>}] conflicts
- # @return [Array<Object>] a sorted copy of `dependencies`.
- def sort_dependencies(dependencies, activated, conflicts)
- dependencies.sort_by do |dependency|
- name = name_for(dependency)
- [
- activated.vertex_named(name).payload ? 0 : 1,
- conflicts[name] ? 0 : 1,
- ]
- end
- end
-
- # Returns whether this dependency, which has no possible matching
- # specifications, can safely be ignored.
- #
- # @param [Object] dependency
- # @return [Boolean] whether this dependency can safely be skipped.
- def allow_missing?(dependency)
- false
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb b/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
deleted file mode 100644
index a166bc6991..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # Conveys information about the resolution process to a user.
- module UI
- # The {IO} object that should be used to print output. `STDOUT`, by default.
- #
- # @return [IO]
- def output
- STDOUT
- end
-
- # Called roughly every {#progress_rate}, this method should convey progress
- # to the user.
- #
- # @return [void]
- def indicate_progress
- output.print '.' unless debug?
- end
-
- # How often progress should be conveyed to the user via
- # {#indicate_progress}, in seconds. A third of a second, by default.
- #
- # @return [Float]
- def progress_rate
- 0.33
- end
-
- # Called before resolution begins.
- #
- # @return [void]
- def before_resolution
- output.print 'Resolving dependencies...'
- end
-
- # Called after resolution ends (either successfully or with an error).
- # By default, prints a newline.
- #
- # @return [void]
- def after_resolution
- output.puts
- end
-
- # Conveys debug information to the user.
- #
- # @param [Integer] depth the current depth of the resolution process.
- # @return [void]
- def debug(depth = 0)
- if debug?
- debug_info = yield
- debug_info = debug_info.inspect unless debug_info.is_a?(String)
- debug_info = debug_info.split("\n").map { |s| ":#{depth.to_s.rjust 4}: #{s}" }
- output.puts debug_info
- end
- end
-
- # Whether or not debug messages should be printed.
- # By default, whether or not the `MOLINILLO_DEBUG` environment variable is
- # set.
- #
- # @return [Boolean]
- def debug?
- return @debug_mode if defined?(@debug_mode)
- @debug_mode = ENV['MOLINILLO_DEBUG']
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb b/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
deleted file mode 100644
index acf7777414..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
+++ /dev/null
@@ -1,837 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- class Resolver
- # A specific resolution from a given {Resolver}
- class Resolution
- # A conflict that the resolution process encountered
- # @attr [Object] requirement the requirement that immediately led to the conflict
- # @attr [{String,Nil=>[Object]}] requirements the requirements that caused the conflict
- # @attr [Object, nil] existing the existing spec that was in conflict with
- # the {#possibility}
- # @attr [Object] possibility_set the set of specs that was unable to be
- # activated due to a conflict.
- # @attr [Object] locked_requirement the relevant locking requirement.
- # @attr [Array<Array<Object>>] requirement_trees the different requirement
- # trees that led to every requirement for the conflicting name.
- # @attr [{String=>Object}] activated_by_name the already-activated specs.
- # @attr [Object] underlying_error an error that has occurred during resolution, and
- # will be raised at the end of it if no resolution is found.
- Conflict = Struct.new(
- :requirement,
- :requirements,
- :existing,
- :possibility_set,
- :locked_requirement,
- :requirement_trees,
- :activated_by_name,
- :underlying_error
- )
-
- class Conflict
- # @return [Object] a spec that was unable to be activated due to a conflict
- def possibility
- possibility_set && possibility_set.latest_version
- end
- end
-
- # A collection of possibility states that share the same dependencies
- # @attr [Array] dependencies the dependencies for this set of possibilities
- # @attr [Array] possibilities the possibilities
- PossibilitySet = Struct.new(:dependencies, :possibilities)
-
- class PossibilitySet
- # String representation of the possibility set, for debugging
- def to_s
- "[#{possibilities.join(', ')}]"
- end
-
- # @return [Object] most up-to-date dependency in the possibility set
- def latest_version
- possibilities.last
- end
- end
-
- # Details of the state to unwind to when a conflict occurs, and the cause of the unwind
- # @attr [Integer] state_index the index of the state to unwind to
- # @attr [Object] state_requirement the requirement of the state we're unwinding to
- # @attr [Array] requirement_tree for the requirement we're relaxing
- # @attr [Array] conflicting_requirements the requirements that combined to cause the conflict
- # @attr [Array] requirement_trees for the conflict
- # @attr [Array] requirements_unwound_to_instead array of unwind requirements that were chosen over this unwind
- UnwindDetails = Struct.new(
- :state_index,
- :state_requirement,
- :requirement_tree,
- :conflicting_requirements,
- :requirement_trees,
- :requirements_unwound_to_instead
- )
-
- class UnwindDetails
- include Comparable
-
- # We compare UnwindDetails when choosing which state to unwind to. If
- # two options have the same state_index we prefer the one most
- # removed from a requirement that caused the conflict. Both options
- # would unwind to the same state, but a `grandparent` option will
- # filter out fewer of its possibilities after doing so - where a state
- # is both a `parent` and a `grandparent` to requirements that have
- # caused a conflict this is the correct behaviour.
- # @param [UnwindDetail] other UnwindDetail to be compared
- # @return [Integer] integer specifying ordering
- def <=>(other)
- if state_index > other.state_index
- 1
- elsif state_index == other.state_index
- reversed_requirement_tree_index <=> other.reversed_requirement_tree_index
- else
- -1
- end
- end
-
- # @return [Integer] index of state requirement in reversed requirement tree
- # (the conflicting requirement itself will be at position 0)
- def reversed_requirement_tree_index
- @reversed_requirement_tree_index ||=
- if state_requirement
- requirement_tree.reverse.index(state_requirement)
- else
- 999_999
- end
- end
-
- # @return [Boolean] where the requirement of the state we're unwinding
- # to directly caused the conflict. Note: in this case, it is
- # impossible for the state we're unwinding to to be a parent of
- # any of the other conflicting requirements (or we would have
- # circularity)
- def unwinding_to_primary_requirement?
- requirement_tree.last == state_requirement
- end
-
- # @return [Array] array of sub-dependencies to avoid when choosing a
- # new possibility for the state we've unwound to. Only relevant for
- # non-primary unwinds
- def sub_dependencies_to_avoid
- @requirements_to_avoid ||=
- requirement_trees.map do |tree|
- index = tree.index(state_requirement)
- tree[index + 1] if index
- end.compact
- end
-
- # @return [Array] array of all the requirements that led to the need for
- # this unwind
- def all_requirements
- @all_requirements ||= requirement_trees.flatten(1)
- end
- end
-
- # @return [SpecificationProvider] the provider that knows about
- # dependencies, requirements, specifications, versions, etc.
- attr_reader :specification_provider
-
- # @return [UI] the UI that knows how to communicate feedback about the
- # resolution process back to the user
- attr_reader :resolver_ui
-
- # @return [DependencyGraph] the base dependency graph to which
- # dependencies should be 'locked'
- attr_reader :base
-
- # @return [Array] the dependencies that were explicitly required
- attr_reader :original_requested
-
- # Initializes a new resolution.
- # @param [SpecificationProvider] specification_provider
- # see {#specification_provider}
- # @param [UI] resolver_ui see {#resolver_ui}
- # @param [Array] requested see {#original_requested}
- # @param [DependencyGraph] base see {#base}
- def initialize(specification_provider, resolver_ui, requested, base)
- @specification_provider = specification_provider
- @resolver_ui = resolver_ui
- @original_requested = requested
- @base = base
- @states = []
- @iteration_counter = 0
- @parents_of = Hash.new { |h, k| h[k] = [] }
- end
-
- # Resolves the {#original_requested} dependencies into a full dependency
- # graph
- # @raise [ResolverError] if successful resolution is impossible
- # @return [DependencyGraph] the dependency graph of successfully resolved
- # dependencies
- def resolve
- start_resolution
-
- while state
- break if !state.requirement && state.requirements.empty?
- indicate_progress
- if state.respond_to?(:pop_possibility_state) # DependencyState
- debug(depth) { "Creating possibility state for #{requirement} (#{possibilities.count} remaining)" }
- state.pop_possibility_state.tap do |s|
- if s
- states.push(s)
- activated.tag(s)
- end
- end
- end
- process_topmost_state
- end
-
- resolve_activated_specs
- ensure
- end_resolution
- end
-
- # @return [Integer] the number of resolver iterations in between calls to
- # {#resolver_ui}'s {UI#indicate_progress} method
- attr_accessor :iteration_rate
- private :iteration_rate
-
- # @return [Time] the time at which resolution began
- attr_accessor :started_at
- private :started_at
-
- # @return [Array<ResolutionState>] the stack of states for the resolution
- attr_accessor :states
- private :states
-
- private
-
- # Sets up the resolution process
- # @return [void]
- def start_resolution
- @started_at = Time.now
-
- handle_missing_or_push_dependency_state(initial_state)
-
- debug { "Starting resolution (#{@started_at})\nUser-requested dependencies: #{original_requested}" }
- resolver_ui.before_resolution
- end
-
- def resolve_activated_specs
- activated.vertices.each do |_, vertex|
- next unless vertex.payload
-
- latest_version = vertex.payload.possibilities.reverse_each.find do |possibility|
- vertex.requirements.all? { |req| requirement_satisfied_by?(req, activated, possibility) }
- end
-
- activated.set_payload(vertex.name, latest_version)
- end
- activated.freeze
- end
-
- # Ends the resolution process
- # @return [void]
- def end_resolution
- resolver_ui.after_resolution
- debug do
- "Finished resolution (#{@iteration_counter} steps) " \
- "(Took #{(ended_at = Time.now) - @started_at} seconds) (#{ended_at})"
- end
- debug { 'Unactivated: ' + Hash[activated.vertices.reject { |_n, v| v.payload }].keys.join(', ') } if state
- debug { 'Activated: ' + Hash[activated.vertices.select { |_n, v| v.payload }].keys.join(', ') } if state
- end
-
- require_relative 'state'
- require_relative 'modules/specification_provider'
-
- require_relative 'delegates/resolution_state'
- require_relative 'delegates/specification_provider'
-
- include Bundler::Molinillo::Delegates::ResolutionState
- include Bundler::Molinillo::Delegates::SpecificationProvider
-
- # Processes the topmost available {RequirementState} on the stack
- # @return [void]
- def process_topmost_state
- if possibility
- attempt_to_activate
- else
- create_conflict
- unwind_for_conflict
- end
- rescue CircularDependencyError => underlying_error
- create_conflict(underlying_error)
- unwind_for_conflict
- end
-
- # @return [Object] the current possibility that the resolution is trying
- # to activate
- def possibility
- possibilities.last
- end
-
- # @return [RequirementState] the current state the resolution is
- # operating upon
- def state
- states.last
- end
-
- # Creates the initial state for the resolution, based upon the
- # {#requested} dependencies
- # @return [DependencyState] the initial state for the resolution
- def initial_state
- graph = DependencyGraph.new.tap do |dg|
- original_requested.each do |requested|
- vertex = dg.add_vertex(name_for(requested), nil, true)
- vertex.explicit_requirements << requested
- end
- dg.tag(:initial_state)
- end
-
- requirements = sort_dependencies(original_requested, graph, {})
- initial_requirement = requirements.shift
- DependencyState.new(
- initial_requirement && name_for(initial_requirement),
- requirements,
- graph,
- initial_requirement,
- possibilities_for_requirement(initial_requirement, graph),
- 0,
- {},
- []
- )
- end
-
- # Unwinds the states stack because a conflict has been encountered
- # @return [void]
- def unwind_for_conflict
- details_for_unwind = build_details_for_unwind
- unwind_options = unused_unwind_options
- debug(depth) { "Unwinding for conflict: #{requirement} to #{details_for_unwind.state_index / 2}" }
- conflicts.tap do |c|
- sliced_states = states.slice!((details_for_unwind.state_index + 1)..-1)
- raise_error_unless_state(c)
- activated.rewind_to(sliced_states.first || :initial_state) if sliced_states
- state.conflicts = c
- state.unused_unwind_options = unwind_options
- filter_possibilities_after_unwind(details_for_unwind)
- index = states.size - 1
- @parents_of.each { |_, a| a.reject! { |i| i >= index } }
- state.unused_unwind_options.reject! { |uw| uw.state_index >= index }
- end
- end
-
- # Raises a VersionConflict error, or any underlying error, if there is no
- # current state
- # @return [void]
- def raise_error_unless_state(conflicts)
- return if state
-
- error = conflicts.values.map(&:underlying_error).compact.first
- raise error || VersionConflict.new(conflicts, specification_provider)
- end
-
- # @return [UnwindDetails] Details of the nearest index to which we could unwind
- def build_details_for_unwind
- # Get the possible unwinds for the current conflict
- current_conflict = conflicts[name]
- binding_requirements = binding_requirements_for_conflict(current_conflict)
- unwind_details = unwind_options_for_requirements(binding_requirements)
-
- last_detail_for_current_unwind = unwind_details.sort.last
- current_detail = last_detail_for_current_unwind
-
- # Look for past conflicts that could be unwound to affect the
- # requirement tree for the current conflict
- relevant_unused_unwinds = unused_unwind_options.select do |alternative|
- intersecting_requirements =
- last_detail_for_current_unwind.all_requirements &
- alternative.requirements_unwound_to_instead
- next if intersecting_requirements.empty?
- # Find the highest index unwind whilst looping through
- current_detail = alternative if alternative > current_detail
- alternative
- end
-
- # Add the current unwind options to the `unused_unwind_options` array.
- # The "used" option will be filtered out during `unwind_for_conflict`.
- state.unused_unwind_options += unwind_details.reject { |detail| detail.state_index == -1 }
-
- # Update the requirements_unwound_to_instead on any relevant unused unwinds
- relevant_unused_unwinds.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
- unwind_details.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
-
- current_detail
- end
-
- # @param [Array<Object>] array of requirements that combine to create a conflict
- # @return [Array<UnwindDetails>] array of UnwindDetails that have a chance
- # of resolving the passed requirements
- def unwind_options_for_requirements(binding_requirements)
- unwind_details = []
-
- trees = []
- binding_requirements.reverse_each do |r|
- partial_tree = [r]
- trees << partial_tree
- unwind_details << UnwindDetails.new(-1, nil, partial_tree, binding_requirements, trees, [])
-
- # If this requirement has alternative possibilities, check if any would
- # satisfy the other requirements that created this conflict
- requirement_state = find_state_for(r)
- if conflict_fixing_possibilities?(requirement_state, binding_requirements)
- unwind_details << UnwindDetails.new(
- states.index(requirement_state),
- r,
- partial_tree,
- binding_requirements,
- trees,
- []
- )
- end
-
- # Next, look at the parent of this requirement, and check if the requirement
- # could have been avoided if an alternative PossibilitySet had been chosen
- parent_r = parent_of(r)
- next if parent_r.nil?
- partial_tree.unshift(parent_r)
- requirement_state = find_state_for(parent_r)
- if requirement_state.possibilities.any? { |set| !set.dependencies.include?(r) }
- unwind_details << UnwindDetails.new(
- states.index(requirement_state),
- parent_r,
- partial_tree,
- binding_requirements,
- trees,
- []
- )
- end
-
- # Finally, look at the grandparent and up of this requirement, looking
- # for any possibilities that wouldn't create their parent requirement
- grandparent_r = parent_of(parent_r)
- until grandparent_r.nil?
- partial_tree.unshift(grandparent_r)
- requirement_state = find_state_for(grandparent_r)
- if requirement_state.possibilities.any? { |set| !set.dependencies.include?(parent_r) }
- unwind_details << UnwindDetails.new(
- states.index(requirement_state),
- grandparent_r,
- partial_tree,
- binding_requirements,
- trees,
- []
- )
- end
- parent_r = grandparent_r
- grandparent_r = parent_of(parent_r)
- end
- end
-
- unwind_details
- end
-
- # @param [DependencyState] state
- # @param [Array] array of requirements
- # @return [Boolean] whether or not the given state has any possibilities
- # that could satisfy the given requirements
- def conflict_fixing_possibilities?(state, binding_requirements)
- return false unless state
-
- state.possibilities.any? do |possibility_set|
- possibility_set.possibilities.any? do |poss|
- possibility_satisfies_requirements?(poss, binding_requirements)
- end
- end
- end
-
- # Filter's a state's possibilities to remove any that would not fix the
- # conflict we've just rewound from
- # @param [UnwindDetails] details of the conflict just unwound from
- # @return [void]
- def filter_possibilities_after_unwind(unwind_details)
- return unless state && !state.possibilities.empty?
-
- if unwind_details.unwinding_to_primary_requirement?
- filter_possibilities_for_primary_unwind(unwind_details)
- else
- filter_possibilities_for_parent_unwind(unwind_details)
- end
- end
-
- # Filter's a state's possibilities to remove any that would not satisfy
- # the requirements in the conflict we've just rewound from
- # @param [UnwindDetails] details of the conflict just unwound from
- # @return [void]
- def filter_possibilities_for_primary_unwind(unwind_details)
- unwinds_to_state = unused_unwind_options.select { |uw| uw.state_index == unwind_details.state_index }
- unwinds_to_state << unwind_details
- unwind_requirement_sets = unwinds_to_state.map(&:conflicting_requirements)
-
- state.possibilities.reject! do |possibility_set|
- possibility_set.possibilities.none? do |poss|
- unwind_requirement_sets.any? do |requirements|
- possibility_satisfies_requirements?(poss, requirements)
- end
- end
- end
- end
-
- # @param [Object] possibility a single possibility
- # @param [Array] requirements an array of requirements
- # @return [Boolean] whether the possibility satisfies all of the
- # given requirements
- def possibility_satisfies_requirements?(possibility, requirements)
- name = name_for(possibility)
-
- activated.tag(:swap)
- activated.set_payload(name, possibility) if activated.vertex_named(name)
- satisfied = requirements.all? { |r| requirement_satisfied_by?(r, activated, possibility) }
- activated.rewind_to(:swap)
-
- satisfied
- end
-
- # Filter's a state's possibilities to remove any that would (eventually)
- # create a requirement in the conflict we've just rewound from
- # @param [UnwindDetails] details of the conflict just unwound from
- # @return [void]
- def filter_possibilities_for_parent_unwind(unwind_details)
- unwinds_to_state = unused_unwind_options.select { |uw| uw.state_index == unwind_details.state_index }
- unwinds_to_state << unwind_details
-
- primary_unwinds = unwinds_to_state.select(&:unwinding_to_primary_requirement?).uniq
- parent_unwinds = unwinds_to_state.uniq - primary_unwinds
-
- allowed_possibility_sets = Compatibility.flat_map(primary_unwinds) do |unwind|
- states[unwind.state_index].possibilities.select do |possibility_set|
- possibility_set.possibilities.any? do |poss|
- possibility_satisfies_requirements?(poss, unwind.conflicting_requirements)
- end
- end
- end
-
- requirements_to_avoid = Compatibility.flat_map(parent_unwinds, &:sub_dependencies_to_avoid)
-
- state.possibilities.reject! do |possibility_set|
- !allowed_possibility_sets.include?(possibility_set) &&
- (requirements_to_avoid - possibility_set.dependencies).empty?
- end
- end
-
- # @param [Conflict] conflict
- # @return [Array] minimal array of requirements that would cause the passed
- # conflict to occur.
- def binding_requirements_for_conflict(conflict)
- return [conflict.requirement] if conflict.possibility.nil?
-
- possible_binding_requirements = conflict.requirements.values.flatten(1).uniq
-
- # When there’s a `CircularDependency` error the conflicting requirement
- # (the one causing the circular) won’t be `conflict.requirement`
- # (which won’t be for the right state, because we won’t have created it,
- # because it’s circular).
- # We need to make sure we have that requirement in the conflict’s list,
- # otherwise we won’t be able to unwind properly, so we just return all
- # the requirements for the conflict.
- return possible_binding_requirements if conflict.underlying_error
-
- possibilities = search_for(conflict.requirement)
-
- # If all the requirements together don't filter out all possibilities,
- # then the only two requirements we need to consider are the initial one
- # (where the dependency's version was first chosen) and the last
- if binding_requirement_in_set?(nil, possible_binding_requirements, possibilities)
- return [conflict.requirement, requirement_for_existing_name(name_for(conflict.requirement))].compact
- end
-
- # Loop through the possible binding requirements, removing each one
- # that doesn't bind. Use a `reverse_each` as we want the earliest set of
- # binding requirements, and don't use `reject!` as we wish to refine the
- # array *on each iteration*.
- binding_requirements = possible_binding_requirements.dup
- possible_binding_requirements.reverse_each do |req|
- next if req == conflict.requirement
- unless binding_requirement_in_set?(req, binding_requirements, possibilities)
- binding_requirements -= [req]
- end
- end
-
- binding_requirements
- end
-
- # @param [Object] requirement we wish to check
- # @param [Array] array of requirements
- # @param [Array] array of possibilities the requirements will be used to filter
- # @return [Boolean] whether or not the given requirement is required to filter
- # out all elements of the array of possibilities.
- def binding_requirement_in_set?(requirement, possible_binding_requirements, possibilities)
- possibilities.any? do |poss|
- possibility_satisfies_requirements?(poss, possible_binding_requirements - [requirement])
- end
- end
-
- # @return [Object] the requirement that led to `requirement` being added
- # to the list of requirements.
- def parent_of(requirement)
- return unless requirement
- return unless index = @parents_of[requirement].last
- return unless parent_state = @states[index]
- parent_state.requirement
- end
-
- # @return [Object] the requirement that led to a version of a possibility
- # with the given name being activated.
- def requirement_for_existing_name(name)
- return nil unless vertex = activated.vertex_named(name)
- return nil unless vertex.payload
- states.find { |s| s.name == name }.requirement
- end
-
- # @return [ResolutionState] the state whose `requirement` is the given
- # `requirement`.
- def find_state_for(requirement)
- return nil unless requirement
- states.find { |i| requirement == i.requirement }
- end
-
- # @return [Conflict] a {Conflict} that reflects the failure to activate
- # the {#possibility} in conjunction with the current {#state}
- def create_conflict(underlying_error = nil)
- vertex = activated.vertex_named(name)
- locked_requirement = locked_requirement_named(name)
-
- requirements = {}
- unless vertex.explicit_requirements.empty?
- requirements[name_for_explicit_dependency_source] = vertex.explicit_requirements
- end
- requirements[name_for_locking_dependency_source] = [locked_requirement] if locked_requirement
- vertex.incoming_edges.each do |edge|
- (requirements[edge.origin.payload.latest_version] ||= []).unshift(edge.requirement)
- end
-
- activated_by_name = {}
- activated.each { |v| activated_by_name[v.name] = v.payload.latest_version if v.payload }
- conflicts[name] = Conflict.new(
- requirement,
- requirements,
- vertex.payload && vertex.payload.latest_version,
- possibility,
- locked_requirement,
- requirement_trees,
- activated_by_name,
- underlying_error
- )
- end
-
- # @return [Array<Array<Object>>] The different requirement
- # trees that led to every requirement for the current spec.
- def requirement_trees
- vertex = activated.vertex_named(name)
- vertex.requirements.map { |r| requirement_tree_for(r) }
- end
-
- # @return [Array<Object>] the list of requirements that led to
- # `requirement` being required.
- def requirement_tree_for(requirement)
- tree = []
- while requirement
- tree.unshift(requirement)
- requirement = parent_of(requirement)
- end
- tree
- end
-
- # Indicates progress roughly once every second
- # @return [void]
- def indicate_progress
- @iteration_counter += 1
- @progress_rate ||= resolver_ui.progress_rate
- if iteration_rate.nil?
- if Time.now - started_at >= @progress_rate
- self.iteration_rate = @iteration_counter
- end
- end
-
- if iteration_rate && (@iteration_counter % iteration_rate) == 0
- resolver_ui.indicate_progress
- end
- end
-
- # Calls the {#resolver_ui}'s {UI#debug} method
- # @param [Integer] depth the depth of the {#states} stack
- # @param [Proc] block a block that yields a {#to_s}
- # @return [void]
- def debug(depth = 0, &block)
- resolver_ui.debug(depth, &block)
- end
-
- # Attempts to activate the current {#possibility}
- # @return [void]
- def attempt_to_activate
- debug(depth) { 'Attempting to activate ' + possibility.to_s }
- existing_vertex = activated.vertex_named(name)
- if existing_vertex.payload
- debug(depth) { "Found existing spec (#{existing_vertex.payload})" }
- attempt_to_filter_existing_spec(existing_vertex)
- else
- latest = possibility.latest_version
- # use reject!(!satisfied) for 1.8.7 compatibility
- possibility.possibilities.reject! do |possibility|
- !requirement_satisfied_by?(requirement, activated, possibility)
- end
- if possibility.latest_version.nil?
- # ensure there's a possibility for better error messages
- possibility.possibilities << latest if latest
- create_conflict
- unwind_for_conflict
- else
- activate_new_spec
- end
- end
- end
-
- # Attempts to update the existing vertex's `PossibilitySet` with a filtered version
- # @return [void]
- def attempt_to_filter_existing_spec(vertex)
- filtered_set = filtered_possibility_set(vertex)
- if !filtered_set.possibilities.empty?
- activated.set_payload(name, filtered_set)
- new_requirements = requirements.dup
- push_state_for_requirements(new_requirements, false)
- else
- create_conflict
- debug(depth) { "Unsatisfied by existing spec (#{vertex.payload})" }
- unwind_for_conflict
- end
- end
-
- # Generates a filtered version of the existing vertex's `PossibilitySet` using the
- # current state's `requirement`
- # @param [Object] existing vertex
- # @return [PossibilitySet] filtered possibility set
- def filtered_possibility_set(vertex)
- PossibilitySet.new(vertex.payload.dependencies, vertex.payload.possibilities & possibility.possibilities)
- end
-
- # @param [String] requirement_name the spec name to search for
- # @return [Object] the locked spec named `requirement_name`, if one
- # is found on {#base}
- def locked_requirement_named(requirement_name)
- vertex = base.vertex_named(requirement_name)
- vertex && vertex.payload
- end
-
- # Add the current {#possibility} to the dependency graph of the current
- # {#state}
- # @return [void]
- def activate_new_spec
- conflicts.delete(name)
- debug(depth) { "Activated #{name} at #{possibility}" }
- activated.set_payload(name, possibility)
- require_nested_dependencies_for(possibility)
- end
-
- # Requires the dependencies that the recently activated spec has
- # @param [Object] activated_possibility the PossibilitySet that has just been
- # activated
- # @return [void]
- def require_nested_dependencies_for(possibility_set)
- nested_dependencies = dependencies_for(possibility_set.latest_version)
- debug(depth) { "Requiring nested dependencies (#{nested_dependencies.join(', ')})" }
- nested_dependencies.each do |d|
- activated.add_child_vertex(name_for(d), nil, [name_for(possibility_set.latest_version)], d)
- parent_index = states.size - 1
- parents = @parents_of[d]
- parents << parent_index if parents.empty?
- end
-
- push_state_for_requirements(requirements + nested_dependencies, !nested_dependencies.empty?)
- end
-
- # Pushes a new {DependencyState} that encapsulates both existing and new
- # requirements
- # @param [Array] new_requirements
- # @return [void]
- def push_state_for_requirements(new_requirements, requires_sort = true, new_activated = activated)
- new_requirements = sort_dependencies(new_requirements.uniq, new_activated, conflicts) if requires_sort
- new_requirement = nil
- loop do
- new_requirement = new_requirements.shift
- break if new_requirement.nil? || states.none? { |s| s.requirement == new_requirement }
- end
- new_name = new_requirement ? name_for(new_requirement) : ''.freeze
- possibilities = possibilities_for_requirement(new_requirement)
- handle_missing_or_push_dependency_state DependencyState.new(
- new_name, new_requirements, new_activated,
- new_requirement, possibilities, depth, conflicts.dup, unused_unwind_options.dup
- )
- end
-
- # Checks a proposed requirement with any existing locked requirement
- # before generating an array of possibilities for it.
- # @param [Object] the proposed requirement
- # @return [Array] possibilities
- def possibilities_for_requirement(requirement, activated = self.activated)
- return [] unless requirement
- if locked_requirement_named(name_for(requirement))
- return locked_requirement_possibility_set(requirement, activated)
- end
-
- group_possibilities(search_for(requirement))
- end
-
- # @param [Object] the proposed requirement
- # @return [Array] possibility set containing only the locked requirement, if any
- def locked_requirement_possibility_set(requirement, activated = self.activated)
- all_possibilities = search_for(requirement)
- locked_requirement = locked_requirement_named(name_for(requirement))
-
- # Longwinded way to build a possibilities array with either the locked
- # requirement or nothing in it. Required, since the API for
- # locked_requirement isn't guaranteed.
- locked_possibilities = all_possibilities.select do |possibility|
- requirement_satisfied_by?(locked_requirement, activated, possibility)
- end
-
- group_possibilities(locked_possibilities)
- end
-
- # Build an array of PossibilitySets, with each element representing a group of
- # dependency versions that all have the same sub-dependency version constraints
- # and are contiguous.
- # @param [Array] an array of possibilities
- # @return [Array] an array of possibility sets
- def group_possibilities(possibilities)
- possibility_sets = []
- current_possibility_set = nil
-
- possibilities.reverse_each do |possibility|
- dependencies = dependencies_for(possibility)
- if current_possibility_set && current_possibility_set.dependencies == dependencies
- current_possibility_set.possibilities.unshift(possibility)
- else
- possibility_sets.unshift(PossibilitySet.new(dependencies, [possibility]))
- current_possibility_set = possibility_sets.first
- end
- end
-
- possibility_sets
- end
-
- # Pushes a new {DependencyState}.
- # If the {#specification_provider} says to
- # {SpecificationProvider#allow_missing?} that particular requirement, and
- # there are no possibilities for that requirement, then `state` is not
- # pushed, and the vertex in {#activated} is removed, and we continue
- # resolving the remaining requirements.
- # @param [DependencyState] state
- # @return [void]
- def handle_missing_or_push_dependency_state(state)
- if state.requirement && state.possibilities.empty? && allow_missing?(state.requirement)
- state.activated.detach_vertex_named(state.name)
- push_state_for_requirements(state.requirements.dup, false, state.activated)
- else
- states.push(state).tap { activated.tag(state) }
- end
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb b/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
deleted file mode 100644
index 95eaab5991..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-require_relative 'dependency_graph'
-
-module Bundler::Molinillo
- # This class encapsulates a dependency resolver.
- # The resolver is responsible for determining which set of dependencies to
- # activate, with feedback from the {#specification_provider}
- #
- #
- class Resolver
- require_relative 'resolution'
-
- # @return [SpecificationProvider] the specification provider used
- # in the resolution process
- attr_reader :specification_provider
-
- # @return [UI] the UI module used to communicate back to the user
- # during the resolution process
- attr_reader :resolver_ui
-
- # Initializes a new resolver.
- # @param [SpecificationProvider] specification_provider
- # see {#specification_provider}
- # @param [UI] resolver_ui
- # see {#resolver_ui}
- def initialize(specification_provider, resolver_ui)
- @specification_provider = specification_provider
- @resolver_ui = resolver_ui
- end
-
- # Resolves the requested dependencies into a {DependencyGraph},
- # locking to the base dependency graph (if specified)
- # @param [Array] requested an array of 'requested' dependencies that the
- # {#specification_provider} can understand
- # @param [DependencyGraph,nil] base the base dependency graph to which
- # dependencies should be 'locked'
- def resolve(requested, base = DependencyGraph.new)
- Resolution.new(specification_provider,
- resolver_ui,
- requested,
- base).
- resolve
- end
- end
-end
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/state.rb b/lib/bundler/vendor/molinillo/lib/molinillo/state.rb
deleted file mode 100644
index 68fa1f54e3..0000000000
--- a/lib/bundler/vendor/molinillo/lib/molinillo/state.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler::Molinillo
- # A state that a {Resolution} can be in
- # @attr [String] name the name of the current requirement
- # @attr [Array<Object>] requirements currently unsatisfied requirements
- # @attr [DependencyGraph] activated the graph of activated dependencies
- # @attr [Object] requirement the current requirement
- # @attr [Object] possibilities the possibilities to satisfy the current requirement
- # @attr [Integer] depth the depth of the resolution
- # @attr [Hash] conflicts unresolved conflicts, indexed by dependency name
- # @attr [Array<UnwindDetails>] unused_unwind_options unwinds for previous conflicts that weren't explored
- ResolutionState = Struct.new(
- :name,
- :requirements,
- :activated,
- :requirement,
- :possibilities,
- :depth,
- :conflicts,
- :unused_unwind_options
- )
-
- class ResolutionState
- # Returns an empty resolution state
- # @return [ResolutionState] an empty state
- def self.empty
- new(nil, [], DependencyGraph.new, nil, nil, 0, {}, [])
- end
- end
-
- # A state that encapsulates a set of {#requirements} with an {Array} of
- # possibilities
- class DependencyState < ResolutionState
- # Removes a possibility from `self`
- # @return [PossibilityState] a state with a single possibility,
- # the possibility that was removed from `self`
- def pop_possibility_state
- PossibilityState.new(
- name,
- requirements.dup,
- activated,
- requirement,
- [possibilities.pop],
- depth + 1,
- conflicts.dup,
- unused_unwind_options.dup
- ).tap do |state|
- state.activated.tag(state)
- end
- end
- end
-
- # A state that encapsulates a single possibility to fulfill the given
- # {#requirement}
- class PossibilityState < ResolutionState
- end
-end
diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
index e9c4c3e89e..a4e1c5a750 100644
--- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
+++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
@@ -3,11 +3,6 @@ require_relative '../../../../uri/lib/uri'
require 'cgi' # for escaping
require_relative '../../../../connection_pool/lib/connection_pool'
-begin
- require 'net/http/pipeline'
-rescue LoadError
-end
-
autoload :OpenSSL, 'openssl'
##
@@ -17,15 +12,11 @@ autoload :OpenSSL, 'openssl'
# servers you wish to talk to. For each host:port you communicate with a
# single persistent connection is created.
#
-# Multiple Bundler::Persistent::Net::HTTP::Persistent objects will share the same set of
-# connections.
-#
-# For each thread you start a new connection will be created. A
-# Bundler::Persistent::Net::HTTP::Persistent connection will not be shared across threads.
+# Connections will be shared across threads through a connection pool to
+# increase reuse of connections.
#
-# You can shut down the HTTP connections when done by calling #shutdown. You
-# should name your Bundler::Persistent::Net::HTTP::Persistent object if you intend to call this
-# method.
+# You can shut down any remaining HTTP connections when done by calling
+# #shutdown.
#
# Example:
#
@@ -33,7 +24,7 @@ autoload :OpenSSL, 'openssl'
#
# uri = Bundler::URI 'http://example.com/awesome/web/service'
#
-# http = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name'
+# http = Bundler::Persistent::Net::HTTP::Persistent.new
#
# # perform a GET
# response = http.request uri
@@ -55,14 +46,14 @@ autoload :OpenSSL, 'openssl'
# to use Bundler::URI#request_uri not Bundler::URI#path. The request_uri contains the query
# params which are sent in the body for other requests.
#
-# == SSL
+# == TLS/SSL
#
-# SSL connections are automatically created depending upon the scheme of the
-# Bundler::URI. SSL connections are automatically verified against the default
+# TLS connections are automatically created depending upon the scheme of the
+# Bundler::URI. TLS connections are automatically verified against the default
# certificate store for your computer. You can override this by changing
# verify_mode or by specifying an alternate cert_store.
#
-# Here are the SSL settings, see the individual methods for documentation:
+# Here are the TLS settings, see the individual methods for documentation:
#
# #certificate :: This client's certificate
# #ca_file :: The certificate-authorities
@@ -72,7 +63,7 @@ autoload :OpenSSL, 'openssl'
# #private_key :: The client's SSL private key
# #reuse_ssl_sessions :: Reuse a previously opened SSL session for a new
# connection
-# #ssl_timeout :: SSL session lifetime
+# #ssl_timeout :: Session lifetime
# #ssl_version :: Which specific SSL version to use
# #verify_callback :: For server certificate verification
# #verify_depth :: Depth of certificate verification
@@ -101,14 +92,15 @@ autoload :OpenSSL, 'openssl'
#
# === Segregation
#
-# By providing an application name to ::new you can separate your connections
-# from the connections of other applications.
+# Each Bundler::Persistent::Net::HTTP::Persistent instance has its own pool of connections. There
+# is no sharing with other instances (as was true in earlier versions).
#
# === Idle Timeout
#
-# If a connection hasn't been used for this number of seconds it will automatically be
-# reset upon the next use to avoid attempting to send to a closed connection.
-# The default value is 5 seconds. nil means no timeout. Set through #idle_timeout.
+# If a connection hasn't been used for this number of seconds it will
+# automatically be reset upon the next use to avoid attempting to send to a
+# closed connection. The default value is 5 seconds. nil means no timeout.
+# Set through #idle_timeout.
#
# Reducing this value may help avoid the "too many connection resets" error
# when sending non-idempotent requests while increasing this value will cause
@@ -123,8 +115,9 @@ autoload :OpenSSL, 'openssl'
#
# The number of requests that should be made before opening a new connection.
# Typically many keep-alive capable servers tune this to 100 or less, so the
-# 101st request will fail with ECONNRESET. If unset (default), this value has no
-# effect, if set, connections will be reset on the request after max_requests.
+# 101st request will fail with ECONNRESET. If unset (default), this value has
+# no effect, if set, connections will be reset on the request after
+# max_requests.
#
# === Open Timeout
#
@@ -136,45 +129,6 @@ autoload :OpenSSL, 'openssl'
# Socket options may be set on newly-created connections. See #socket_options
# for details.
#
-# === Non-Idempotent Requests
-#
-# By default non-idempotent requests will not be retried per RFC 2616. By
-# setting retry_change_requests to true requests will automatically be retried
-# once.
-#
-# Only do this when you know that retrying a POST or other non-idempotent
-# request is safe for your application and will not create duplicate
-# resources.
-#
-# The recommended way to handle non-idempotent requests is the following:
-#
-# require 'bundler/vendor/net-http-persistent/lib/net/http/persistent'
-#
-# uri = Bundler::URI 'http://example.com/awesome/web/service'
-# post_uri = uri + 'create'
-#
-# http = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name'
-#
-# post = Net::HTTP::Post.new post_uri.path
-# # ... fill in POST request
-#
-# begin
-# response = http.request post_uri, post
-# rescue Bundler::Persistent::Net::HTTP::Persistent::Error
-#
-# # POST failed, make a new request to verify the server did not process
-# # the request
-# exists_uri = uri + '...'
-# response = http.get exists_uri
-#
-# # Retry if it failed
-# retry if response.code == '404'
-# end
-#
-# The method of determining if the resource was created or not is unique to
-# the particular service you are using. Of course, you will want to add
-# protection from infinite looping.
-#
# === Connection Termination
#
# If you are done using the Bundler::Persistent::Net::HTTP::Persistent instance you may shut down
@@ -200,33 +154,27 @@ class Bundler::Persistent::Net::HTTP::Persistent
HAVE_OPENSSL = defined? OpenSSL::SSL # :nodoc:
##
- # The default connection pool size is 1/4 the allowed open files.
+ # The default connection pool size is 1/4 the allowed open files
+ # (<code>ulimit -n</code>) or 256 if your OS does not support file handle
+ # limits (typically windows).
- if Gem.win_platform? then
- DEFAULT_POOL_SIZE = 256
+ if Process.const_defined? :RLIMIT_NOFILE
+ open_file_limits = Process.getrlimit(Process::RLIMIT_NOFILE)
+
+ # Under JRuby on Windows Process responds to `getrlimit` but returns something that does not match docs
+ if open_file_limits.respond_to?(:first)
+ DEFAULT_POOL_SIZE = open_file_limits.first / 4
+ else
+ DEFAULT_POOL_SIZE = 256
+ end
else
- DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
+ DEFAULT_POOL_SIZE = 256
end
##
# The version of Bundler::Persistent::Net::HTTP::Persistent you are using
- VERSION = '3.1.0'
-
- ##
- # Exceptions rescued for automatic retry on ruby 2.0.0. This overlaps with
- # the exception list for ruby 1.x.
-
- RETRIED_EXCEPTIONS = [ # :nodoc:
- (Net::ReadTimeout if Net.const_defined? :ReadTimeout),
- IOError,
- EOFError,
- Errno::ECONNRESET,
- Errno::ECONNABORTED,
- Errno::EPIPE,
- (OpenSSL::SSL::SSLError if HAVE_OPENSSL),
- Timeout::Error,
- ].compact
+ VERSION = '4.0.1'
##
# Error class for errors raised by Bundler::Persistent::Net::HTTP::Persistent. Various
@@ -354,6 +302,13 @@ class Bundler::Persistent::Net::HTTP::Persistent
attr_accessor :max_requests
##
+ # Number of retries to perform if a request fails.
+ #
+ # See also #max_retries=, Net::HTTP#max_retries=.
+
+ attr_reader :max_retries
+
+ ##
# The value sent in the Keep-Alive header. Defaults to 30. Not needed for
# HTTP/1.1 servers.
#
@@ -365,8 +320,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
attr_accessor :keep_alive
##
- # A name for this connection. Allows you to keep your connections apart
- # from everybody else's.
+ # The name for this collection of persistent connections.
attr_reader :name
@@ -496,22 +450,10 @@ class Bundler::Persistent::Net::HTTP::Persistent
attr_reader :verify_mode
##
- # Enable retries of non-idempotent requests that change data (e.g. POST
- # requests) when the server has disconnected.
- #
- # This will in the worst case lead to multiple requests with the same data,
- # but it may be useful for some applications. Take care when enabling
- # this option to ensure it is safe to POST or perform other non-idempotent
- # requests to the server.
-
- attr_accessor :retry_change_requests
-
- ##
# Creates a new Bundler::Persistent::Net::HTTP::Persistent.
#
- # Set +name+ to keep your connections apart from everybody else's. Not
- # required currently, but highly recommended. Your library name should be
- # good enough. This parameter will be required in a future version.
+ # Set a +name+ for fun. Your library name should be good enough, but this
+ # otherwise has no purpose.
#
# +proxy+ may be set to a Bundler::URI::HTTP or :ENV to pick up proxy options from
# the environment. See proxy_from_env for details.
@@ -524,8 +466,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
# proxy.password = 'hunter2'
#
# Set +pool_size+ to limit the maximum number of connections allowed.
- # Defaults to 1/4 the number of allowed file handles. You can have no more
- # than this many threads with active HTTP transactions.
+ # Defaults to 1/4 the number of allowed file handles or 256 if your OS does
+ # not support a limit on allowed file handles. You can have no more than
+ # this many threads with active HTTP transactions.
def initialize name: nil, proxy: nil, pool_size: DEFAULT_POOL_SIZE
@name = name
@@ -542,6 +485,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
@write_timeout = nil
@idle_timeout = 5
@max_requests = nil
+ @max_retries = 1
@socket_options = []
@ssl_generation = 0 # incremented when SSL session variables change
@@ -573,8 +517,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
@reuse_ssl_sessions = OpenSSL::SSL.const_defined? :Session
end
- @retry_change_requests = false
-
self.proxy = proxy if proxy
end
@@ -635,7 +577,9 @@ class Bundler::Persistent::Net::HTTP::Persistent
net_http_args = [uri.hostname, uri.port]
- if @proxy_uri and not proxy_bypass? uri.hostname, uri.port then
+ # I'm unsure if uri.host or uri.hostname should be checked against
+ # the proxy bypass list.
+ if @proxy_uri and not proxy_bypass? uri.host, uri.port then
net_http_args.concat @proxy_args
else
net_http_args.concat [nil, nil, nil, nil]
@@ -655,9 +599,11 @@ class Bundler::Persistent::Net::HTTP::Persistent
reset connection
end
- http.read_timeout = @read_timeout if @read_timeout
- http.write_timeout = @write_timeout if @write_timeout && http.respond_to?(:write_timeout=)
- http.keep_alive_timeout = @idle_timeout if @idle_timeout
+ http.keep_alive_timeout = @idle_timeout if @idle_timeout
+ http.max_retries = @max_retries if http.respond_to?(:max_retries=)
+ http.read_timeout = @read_timeout if @read_timeout
+ http.write_timeout = @write_timeout if
+ @write_timeout && http.respond_to?(:write_timeout=)
return yield connection
rescue Errno::ECONNREFUSED
@@ -675,27 +621,14 @@ class Bundler::Persistent::Net::HTTP::Persistent
end
##
- # Returns an error message containing the number of requests performed on
- # this connection
-
- def error_message connection
- connection.requests -= 1 # fixup
-
- age = Time.now - connection.last_use
-
- "after #{connection.requests} requests on #{connection.http.object_id}, " \
- "last used #{age} seconds ago"
- end
-
- ##
- # Bundler::URI::escape wrapper
+ # CGI::escape wrapper
def escape str
CGI.escape str if str
end
##
- # Bundler::URI::unescape wrapper
+ # CGI::unescape wrapper
def unescape str
CGI.unescape str if str
@@ -738,6 +671,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
def finish connection
connection.finish
+ connection.http.instance_variable_set :@last_communicated, nil
connection.http.instance_variable_set :@ssl_session, nil unless
@reuse_ssl_sessions
end
@@ -746,24 +680,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
# Returns the HTTP protocol version for +uri+
def http_version uri
- @http_versions["#{uri.host}:#{uri.port}"]
- end
-
- ##
- # Is +req+ idempotent according to RFC 2616?
-
- def idempotent? req
- case req.method
- when 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE' then
- true
- end
- end
-
- ##
- # Is the request +req+ idempotent or is retry_change_requests allowed.
-
- def can_retry? req
- @retry_change_requests && !idempotent?(req)
+ @http_versions["#{uri.hostname}:#{uri.port}"]
end
##
@@ -774,20 +691,20 @@ class Bundler::Persistent::Net::HTTP::Persistent
end
##
- # Pipelines +requests+ to the HTTP server at +uri+ yielding responses if a
- # block is given. Returns all responses received.
+ # Set the maximum number of retries for a request.
#
- # See
- # Net::HTTP::Pipeline[http://docs.seattlerb.org/net-http-pipeline/Net/HTTP/Pipeline.html]
- # for further details.
+ # Defaults to one retry.
#
- # Only if <tt>net-http-pipeline</tt> was required before
- # <tt>net-http-persistent</tt> #pipeline will be present.
+ # Set this to 0 to disable retries.
- def pipeline uri, requests, &block # :yields: responses
- connection_for uri do |connection|
- connection.http.pipeline requests, &block
- end
+ def max_retries= retries
+ retries = retries.to_int
+
+ raise ArgumentError, "max_retries must be positive" if retries < 0
+
+ @max_retries = retries
+
+ reconnect
end
##
@@ -828,7 +745,7 @@ class Bundler::Persistent::Net::HTTP::Persistent
if @proxy_uri then
@proxy_args = [
- @proxy_uri.host,
+ @proxy_uri.hostname,
@proxy_uri.port,
unescape(@proxy_uri.user),
unescape(@proxy_uri.password),
@@ -903,14 +820,15 @@ class Bundler::Persistent::Net::HTTP::Persistent
end
##
- # Forces reconnection of HTTP connections.
+ # Forces reconnection of all HTTP connections, including TLS/SSL
+ # connections.
def reconnect
@generation += 1
end
##
- # Forces reconnection of SSL connections.
+ # Forces reconnection of only TLS/SSL connections.
def reconnect_ssl
@ssl_generation += 1
@@ -943,14 +861,8 @@ class Bundler::Persistent::Net::HTTP::Persistent
# the response will not have been read).
#
# +req+ must be a Net::HTTPGenericRequest subclass (see Net::HTTP for a list).
- #
- # If there is an error and the request is idempotent according to RFC 2616
- # it will be retried automatically.
def request uri, req = nil, &block
- retried = false
- bad_response = false
-
uri = Bundler::URI uri
req = request_setup req || uri
response = nil
@@ -964,37 +876,12 @@ class Bundler::Persistent::Net::HTTP::Persistent
response = http.request req, &block
if req.connection_close? or
- (response.http_version <= '1.0' and
+ (response.http_version <= '1.0' and
not response.connection_keep_alive?) or
- response.connection_close? then
+ response.connection_close? then
finish connection
end
- rescue Net::HTTPBadResponse => e
- message = error_message connection
-
- finish connection
-
- raise Error, "too many bad responses #{message}" if
- bad_response or not can_retry? req
-
- bad_response = true
- retry
- rescue *RETRIED_EXCEPTIONS => e
- request_failed e, req, connection if
- retried or not can_retry? req
-
- reset connection
-
- retried = true
- retry
- rescue Errno::EINVAL, Errno::ETIMEDOUT => e # not retried on ruby 2
- request_failed e, req, connection if retried or not can_retry? req
-
- reset connection
-
- retried = true
- retry
- rescue Exception => e
+ rescue Exception # make sure to close the connection when it was interrupted
finish connection
raise
@@ -1003,34 +890,19 @@ class Bundler::Persistent::Net::HTTP::Persistent
end
end
- @http_versions["#{uri.host}:#{uri.port}"] ||= response.http_version
+ @http_versions["#{uri.hostname}:#{uri.port}"] ||= response.http_version
response
end
##
- # Raises an Error for +exception+ which resulted from attempting the request
- # +req+ on the +connection+.
- #
- # Finishes the +connection+.
-
- def request_failed exception, req, connection # :nodoc:
- due_to = "(due to #{exception.message} - #{exception.class})"
- message = "too many connection resets #{due_to} #{error_message connection}"
-
- finish connection
-
- raise Error, message, exception.backtrace
- end
-
- ##
# Creates a GET request if +req_or_uri+ is a Bundler::URI and adds headers to the
# request.
#
# Returns the request.
def request_setup req_or_uri # :nodoc:
- req = if Bundler::URI === req_or_uri then
+ req = if req_or_uri.respond_to? 'request_uri' then
Net::HTTP::Get.new req_or_uri.request_uri
else
req_or_uri
@@ -1194,7 +1066,6 @@ application:
reconnect_ssl
end
-
end
require_relative 'persistent/connection'
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
new file mode 100644
index 0000000000..eaaba3fc98
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
@@ -0,0 +1,31 @@
+require_relative "pub_grub/package"
+require_relative "pub_grub/static_package_source"
+require_relative "pub_grub/term"
+require_relative "pub_grub/version_range"
+require_relative "pub_grub/version_constraint"
+require_relative "pub_grub/version_union"
+require_relative "pub_grub/version_solver"
+require_relative "pub_grub/incompatibility"
+require_relative 'pub_grub/solve_failure'
+require_relative 'pub_grub/failure_writer'
+require_relative 'pub_grub/version'
+
+module Bundler::PubGrub
+ class << self
+ attr_writer :logger
+
+ def logger
+ @logger || default_logger
+ end
+
+ private
+
+ def default_logger
+ require "logger"
+
+ logger = ::Logger.new(STDERR)
+ logger.level = $DEBUG ? ::Logger::DEBUG : ::Logger::WARN
+ @logger = logger
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
new file mode 100644
index 0000000000..2236a97b5b
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
@@ -0,0 +1,20 @@
+module Bundler::PubGrub
+ class Assignment
+ attr_reader :term, :cause, :decision_level, :index
+ def initialize(term, cause, decision_level, index)
+ @term = term
+ @cause = cause
+ @decision_level = decision_level
+ @index = index
+ end
+
+ def self.decision(package, version, decision_level, index)
+ term = Term.new(VersionConstraint.exact(package, version), true)
+ new(term, :decision, decision_level, index)
+ end
+
+ def decision?
+ cause == :decision
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
new file mode 100644
index 0000000000..dce20d37ad
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
@@ -0,0 +1,189 @@
+require_relative 'version_constraint'
+require_relative 'incompatibility'
+
+module Bundler::PubGrub
+ # Types:
+ #
+ # Where possible, Bundler::PubGrub will accept user-defined types, so long as they quack.
+ #
+ # ## "Package":
+ #
+ # This class will be used to represent the various packages being solved for.
+ # .to_s will be called when displaying errors and debugging info, it should
+ # probably return the package's name.
+ # It must also have a reasonable definition of #== and #hash
+ #
+ # Example classes: String ("rails")
+ #
+ #
+ # ## "Version":
+ #
+ # This class will be used to represent a single version number.
+ #
+ # Versions don't need to store their associated package, however they will
+ # only be compared against other versions of the same package.
+ #
+ # It must be Comparible (and implement <=> reasonably)
+ #
+ # Example classes: Gem::Version, Integer
+ #
+ #
+ # ## "Dependency"
+ #
+ # This class represents the requirement one package has on another. It is
+ # returned by dependencies_for(package, version) and will be passed to
+ # parse_dependency to convert it to a format Bundler::PubGrub understands.
+ #
+ # It must also have a reasonable definition of #==
+ #
+ # Example classes: String ("~> 1.0"), Gem::Requirement
+ #
+ class BasicPackageSource
+ # Override me!
+ #
+ # This is called per package to find all possible versions of a package.
+ #
+ # It is called at most once per-package
+ #
+ # Returns: Array of versions for a package, in preferred order of selection
+ def all_versions_for(package)
+ raise NotImplementedError
+ end
+
+ # Override me!
+ #
+ # Returns: Hash in the form of { package => requirement, ... }
+ def dependencies_for(package, version)
+ raise NotImplementedError
+ end
+
+ # Override me!
+ #
+ # Convert a (user-defined) dependency into a format Bundler::PubGrub understands.
+ #
+ # Package is passed to this method but for many implementations is not
+ # needed.
+ #
+ # Returns: either a Bundler::PubGrub::VersionRange, Bundler::PubGrub::VersionUnion, or a
+ # Bundler::PubGrub::VersionConstraint
+ def parse_dependency(package, dependency)
+ raise NotImplementedError
+ end
+
+ # Override me!
+ #
+ # If not overridden, this will call dependencies_for with the root package.
+ #
+ # Returns: Hash in the form of { package => requirement, ... } (see dependencies_for)
+ def root_dependencies
+ dependencies_for(@root_package, @root_version)
+ end
+
+ # Override me (maybe)
+ #
+ # If not overridden, the order returned by all_versions_for will be used
+ #
+ # Returns: Array of versions in preferred order
+ def sort_versions_by_preferred(package, sorted_versions)
+ indexes = @version_indexes[package]
+ sorted_versions.sort_by { |version| indexes[version] }
+ end
+
+ def initialize
+ @root_package = Package.root
+ @root_version = Package.root_version
+
+ @cached_versions = Hash.new do |h,k|
+ if k == @root_package
+ h[k] = [@root_version]
+ else
+ h[k] = all_versions_for(k)
+ end
+ end
+ @sorted_versions = Hash.new { |h,k| h[k] = @cached_versions[k].sort }
+ @version_indexes = Hash.new { |h,k| h[k] = @cached_versions[k].each.with_index.to_h }
+
+ @cached_dependencies = Hash.new do |packages, package|
+ if package == @root_package
+ packages[package] = {
+ @root_version => root_dependencies
+ }
+ else
+ packages[package] = Hash.new do |versions, version|
+ versions[version] = dependencies_for(package, version)
+ end
+ end
+ end
+ end
+
+ def versions_for(package, range=VersionRange.any)
+ versions = range.select_versions(@sorted_versions[package])
+
+ # Conditional avoids (among other things) calling
+ # sort_versions_by_preferred with the root package
+ if versions.size > 1
+ sort_versions_by_preferred(package, versions)
+ else
+ versions
+ end
+ end
+
+ def no_versions_incompatibility_for(_package, unsatisfied_term)
+ cause = Incompatibility::NoVersions.new(unsatisfied_term)
+
+ Incompatibility.new([unsatisfied_term], cause: cause)
+ end
+
+ def incompatibilities_for(package, version)
+ package_deps = @cached_dependencies[package]
+ sorted_versions = @sorted_versions[package]
+ package_deps[version].map do |dep_package, dep_constraint_name|
+ low = high = sorted_versions.index(version)
+
+ # find version low such that all >= low share the same dep
+ while low > 0 &&
+ package_deps[sorted_versions[low - 1]][dep_package] == dep_constraint_name
+ low -= 1
+ end
+ low =
+ if low == 0
+ nil
+ else
+ sorted_versions[low]
+ end
+
+ # find version high such that all < high share the same dep
+ while high < sorted_versions.length &&
+ package_deps[sorted_versions[high]][dep_package] == dep_constraint_name
+ high += 1
+ end
+ high =
+ if high == sorted_versions.length
+ nil
+ else
+ sorted_versions[high]
+ end
+
+ range = VersionRange.new(min: low, max: high, include_min: true)
+
+ self_constraint = VersionConstraint.new(package, range: range)
+
+ if !@packages.include?(dep_package)
+ # no such package -> this version is invalid
+ end
+
+ dep_constraint = parse_dependency(dep_package, dep_constraint_name)
+ if !dep_constraint
+ # falsey indicates this dependency was invalid
+ cause = Bundler::PubGrub::Incompatibility::InvalidDependency.new(dep_package, dep_constraint_name)
+ return [Incompatibility.new([Term.new(self_constraint, true)], cause: cause)]
+ elsif !dep_constraint.is_a?(VersionConstraint)
+ # Upgrade range/union to VersionConstraint
+ dep_constraint = VersionConstraint.new(dep_package, range: dep_constraint)
+ end
+
+ Incompatibility.new([Term.new(self_constraint, true), Term.new(dep_constraint, false)], cause: :dependency)
+ end
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
new file mode 100644
index 0000000000..ee099b23f4
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
@@ -0,0 +1,182 @@
+module Bundler::PubGrub
+ class FailureWriter
+ def initialize(root)
+ @root = root
+
+ # { Incompatibility => Integer }
+ @derivations = {}
+
+ # [ [ String, Integer or nil ] ]
+ @lines = []
+
+ # { Incompatibility => Integer }
+ @line_numbers = {}
+
+ count_derivations(root)
+ end
+
+ def write
+ return @root.to_s unless @root.conflict?
+
+ visit(@root)
+
+ padding = @line_numbers.empty? ? 0 : "(#{@line_numbers.values.last}) ".length
+
+ @lines.map do |message, number|
+ next "" if message.empty?
+
+ lead = number ? "(#{number}) " : ""
+ lead = lead.ljust(padding)
+ message = message.gsub("\n", "\n" + " " * (padding + 2))
+ "#{lead}#{message}"
+ end.join("\n")
+ end
+
+ private
+
+ def write_line(incompatibility, message, numbered:)
+ if numbered
+ number = @line_numbers.length + 1
+ @line_numbers[incompatibility] = number
+ end
+
+ @lines << [message, number]
+ end
+
+ def visit(incompatibility, conclusion: false)
+ raise unless incompatibility.conflict?
+
+ numbered = conclusion || @derivations[incompatibility] > 1;
+ conjunction = conclusion || incompatibility == @root ? "So," : "And"
+
+ cause = incompatibility.cause
+
+ if cause.conflict.conflict? && cause.other.conflict?
+ conflict_line = @line_numbers[cause.conflict]
+ other_line = @line_numbers[cause.other]
+
+ if conflict_line && other_line
+ write_line(
+ incompatibility,
+ "Because #{cause.conflict} (#{conflict_line})\nand #{cause.other} (#{other_line}),\n#{incompatibility}.",
+ numbered: numbered
+ )
+ elsif conflict_line || other_line
+ with_line = conflict_line ? cause.conflict : cause.other
+ without_line = conflict_line ? cause.other : cause.conflict
+ line = @line_numbers[with_line]
+
+ visit(without_line);
+ write_line(
+ incompatibility,
+ "#{conjunction} because #{with_line} (#{line}),\n#{incompatibility}.",
+ numbered: numbered
+ )
+ else
+ single_line_conflict = single_line?(cause.conflict.cause)
+ single_line_other = single_line?(cause.other.cause)
+
+ if single_line_conflict || single_line_other
+ first = single_line_other ? cause.conflict : cause.other
+ second = single_line_other ? cause.other : cause.conflict
+ visit(first)
+ visit(second)
+ write_line(
+ incompatibility,
+ "Thus, #{incompatibility}.",
+ numbered: numbered
+ )
+ else
+ visit(cause.conflict, conclusion: true)
+ @lines << ["", nil]
+ visit(cause.other)
+
+ write_line(
+ incompatibility,
+ "#{conjunction} because #{cause.conflict} (#{@line_numbers[cause.conflict]}),\n#{incompatibility}.",
+ numbered: numbered
+ )
+ end
+ end
+ elsif cause.conflict.conflict? || cause.other.conflict?
+ derived = cause.conflict.conflict? ? cause.conflict : cause.other
+ ext = cause.conflict.conflict? ? cause.other : cause.conflict
+
+ derived_line = @line_numbers[derived]
+ if derived_line
+ write_line(
+ incompatibility,
+ "Because #{ext}\nand #{derived} (#{derived_line}),\n#{incompatibility}.",
+ numbered: numbered
+ )
+ elsif collapsible?(derived)
+ derived_cause = derived.cause
+ if derived_cause.conflict.conflict?
+ collapsed_derived = derived_cause.conflict
+ collapsed_ext = derived_cause.other
+ else
+ collapsed_derived = derived_cause.other
+ collapsed_ext = derived_cause.conflict
+ end
+
+ visit(collapsed_derived)
+
+ write_line(
+ incompatibility,
+ "#{conjunction} because #{collapsed_ext}\nand #{ext},\n#{incompatibility}.",
+ numbered: numbered
+ )
+ else
+ visit(derived)
+ write_line(
+ incompatibility,
+ "#{conjunction} because #{ext},\n#{incompatibility}.",
+ numbered: numbered
+ )
+ end
+ else
+ write_line(
+ incompatibility,
+ "Because #{cause.conflict}\nand #{cause.other},\n#{incompatibility}.",
+ numbered: numbered
+ )
+ end
+ end
+
+ def single_line?(cause)
+ !cause.conflict.conflict? && !cause.other.conflict?
+ end
+
+ def collapsible?(incompatibility)
+ return false if @derivations[incompatibility] > 1
+
+ cause = incompatibility.cause
+ # If incompatibility is derived from two derived incompatibilities,
+ # there are too many transitive causes to display concisely.
+ return false if cause.conflict.conflict? && cause.other.conflict?
+
+ # If incompatibility is derived from two external incompatibilities, it
+ # tends to be confusing to collapse it.
+ return false unless cause.conflict.conflict? || cause.other.conflict?
+
+ # If incompatibility's internal cause is numbered, collapsing it would
+ # get too noisy.
+ complex = cause.conflict.conflict? ? cause.conflict : cause.other
+
+ !@line_numbers.has_key?(complex)
+ end
+
+ def count_derivations(incompatibility)
+ if @derivations.has_key?(incompatibility)
+ @derivations[incompatibility] += 1
+ else
+ @derivations[incompatibility] = 1
+ if incompatibility.conflict?
+ cause = incompatibility.cause
+ count_derivations(cause.conflict)
+ count_derivations(cause.other)
+ end
+ end
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
new file mode 100644
index 0000000000..239eaf3401
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
@@ -0,0 +1,150 @@
+module Bundler::PubGrub
+ class Incompatibility
+ ConflictCause = Struct.new(:incompatibility, :satisfier) do
+ alias_method :conflict, :incompatibility
+ alias_method :other, :satisfier
+ end
+
+ InvalidDependency = Struct.new(:package, :constraint) do
+ end
+
+ NoVersions = Struct.new(:constraint) do
+ end
+
+ attr_reader :terms, :cause
+
+ def initialize(terms, cause:, custom_explanation: nil)
+ @cause = cause
+ @terms = cleanup_terms(terms)
+ @custom_explanation = custom_explanation
+
+ if cause == :dependency && @terms.length != 2
+ raise ArgumentError, "a dependency Incompatibility must have exactly two terms. Got #{@terms.inspect}"
+ end
+ end
+
+ def hash
+ cause.hash ^ terms.hash
+ end
+
+ def eql?(other)
+ cause.eql?(other.cause) &&
+ terms.eql?(other.terms)
+ end
+
+ def failure?
+ terms.empty? || (terms.length == 1 && Package.root?(terms[0].package) && terms[0].positive?)
+ end
+
+ def conflict?
+ ConflictCause === cause
+ end
+
+ # Returns all external incompatibilities in this incompatibility's
+ # derivation graph
+ def external_incompatibilities
+ if conflict?
+ [
+ cause.conflict,
+ cause.other
+ ].flat_map(&:external_incompatibilities)
+ else
+ [this]
+ end
+ end
+
+ def to_s
+ return @custom_explanation if @custom_explanation
+
+ case cause
+ when :root
+ "(root dependency)"
+ when :dependency
+ "#{terms[0].to_s(allow_every: true)} depends on #{terms[1].invert}"
+ when Bundler::PubGrub::Incompatibility::InvalidDependency
+ "#{terms[0].to_s(allow_every: true)} depends on unknown package #{cause.package}"
+ when Bundler::PubGrub::Incompatibility::NoVersions
+ "no versions satisfy #{cause.constraint}"
+ when Bundler::PubGrub::Incompatibility::ConflictCause
+ if failure?
+ "version solving has failed"
+ elsif terms.length == 1
+ term = terms[0]
+ if term.positive?
+ if term.constraint.any?
+ "#{term.package} cannot be used"
+ else
+ "#{term.to_s(allow_every: true)} cannot be used"
+ end
+ else
+ "#{term.invert} is required"
+ end
+ else
+ if terms.all?(&:positive?)
+ if terms.length == 2
+ "#{terms[0].to_s(allow_every: true)} is incompatible with #{terms[1]}"
+ else
+ "one of #{terms.map(&:to_s).join(" or ")} must be false"
+ end
+ elsif terms.all?(&:negative?)
+ if terms.length == 2
+ "either #{terms[0].invert} or #{terms[1].invert}"
+ else
+ "one of #{terms.map(&:invert).join(" or ")} must be true";
+ end
+ else
+ positive = terms.select(&:positive?)
+ negative = terms.select(&:negative?).map(&:invert)
+
+ if positive.length == 1
+ "#{positive[0].to_s(allow_every: true)} requires #{negative.join(" or ")}"
+ else
+ "if #{positive.join(" and ")} then #{negative.join(" or ")}"
+ end
+ end
+ end
+ else
+ raise "unhandled cause: #{cause.inspect}"
+ end
+ end
+
+ def inspect
+ "#<#{self.class} #{to_s}>"
+ end
+
+ def pretty_print(q)
+ q.group 2, "#<#{self.class}", ">" do
+ q.breakable
+ q.text to_s
+
+ q.breakable
+ q.text " caused by "
+ q.pp @cause
+ end
+ end
+
+ private
+
+ def cleanup_terms(terms)
+ terms.each do |term|
+ raise "#{term.inspect} must be a term" unless term.is_a?(Term)
+ end
+
+ if terms.length != 1 && ConflictCause === cause
+ terms = terms.reject do |term|
+ term.positive? && Package.root?(term.package)
+ end
+ end
+
+ # Optimized simple cases
+ return terms if terms.length <= 1
+ return terms if terms.length == 2 && terms[0].package != terms[1].package
+
+ terms.group_by(&:package).map do |package, common_terms|
+ common_terms.inject do |acc, term|
+ acc.intersect(term)
+ end
+ end
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
new file mode 100644
index 0000000000..efb9d3da16
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+module Bundler::PubGrub
+ class Package
+
+ attr_reader :name
+
+ def initialize(name)
+ @name = name
+ end
+
+ def inspect
+ "#<#{self.class} #{name.inspect}>"
+ end
+
+ def <=>(other)
+ name <=> other.name
+ end
+
+ ROOT = Package.new(:root)
+ ROOT_VERSION = 0
+
+ def self.root
+ ROOT
+ end
+
+ def self.root_version
+ ROOT_VERSION
+ end
+
+ def self.root?(package)
+ if package.respond_to?(:root?)
+ package.root?
+ else
+ package == root
+ end
+ end
+
+ def to_s
+ name.to_s
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
new file mode 100644
index 0000000000..4c4b8ca844
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
@@ -0,0 +1,121 @@
+require_relative 'assignment'
+
+module Bundler::PubGrub
+ class PartialSolution
+ attr_reader :assignments, :decisions
+ attr_reader :attempted_solutions
+
+ def initialize
+ reset!
+
+ @attempted_solutions = 1
+ @backtracking = false
+ end
+
+ def decision_level
+ @decisions.length
+ end
+
+ def relation(term)
+ package = term.package
+ return :overlap if !@terms.key?(package)
+
+ @relation_cache[package][term] ||=
+ @terms[package].relation(term)
+ end
+
+ def satisfies?(term)
+ relation(term) == :subset
+ end
+
+ def derive(term, cause)
+ add_assignment(Assignment.new(term, cause, decision_level, assignments.length))
+ end
+
+ def satisfier(term)
+ assignment =
+ @assignments_by[term.package].bsearch do |assignment_by|
+ @cumulative_assignments[assignment_by].satisfies?(term)
+ end
+
+ assignment || raise("#{term} unsatisfied")
+ end
+
+ # A list of unsatisfied terms
+ def unsatisfied
+ @required.keys.reject do |package|
+ @decisions.key?(package)
+ end.map do |package|
+ @terms[package]
+ end
+ end
+
+ def decide(package, version)
+ @attempted_solutions += 1 if @backtracking
+ @backtracking = false;
+
+ decisions[package] = version
+ assignment = Assignment.decision(package, version, decision_level, assignments.length)
+ add_assignment(assignment)
+ end
+
+ def backtrack(previous_level)
+ @backtracking = true
+
+ new_assignments = assignments.select do |assignment|
+ assignment.decision_level <= previous_level
+ end
+
+ new_decisions = Hash[decisions.first(previous_level)]
+
+ reset!
+
+ @decisions = new_decisions
+
+ new_assignments.each do |assignment|
+ add_assignment(assignment)
+ end
+ end
+
+ private
+
+ def reset!
+ # { Array<Assignment> }
+ @assignments = []
+
+ # { Package => Array<Assignment> }
+ @assignments_by = Hash.new { |h,k| h[k] = [] }
+ @cumulative_assignments = {}.compare_by_identity
+
+ # { Package => Package::Version }
+ @decisions = {}
+
+ # { Package => Term }
+ @terms = {}
+ @relation_cache = Hash.new { |h,k| h[k] = {} }
+
+ # { Package => Boolean }
+ @required = {}
+ end
+
+ def add_assignment(assignment)
+ term = assignment.term
+ package = term.package
+
+ @assignments << assignment
+ @assignments_by[package] << assignment
+
+ @required[package] = true if term.positive?
+
+ if @terms.key?(package)
+ old_term = @terms[package]
+ @terms[package] = old_term.intersect(term)
+ else
+ @terms[package] = term
+ end
+ @relation_cache[package].clear
+
+ @cumulative_assignments[assignment] = @terms[package]
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
new file mode 100644
index 0000000000..245c23be22
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
@@ -0,0 +1,45 @@
+module Bundler::PubGrub
+ module RubyGems
+ extend self
+
+ def requirement_to_range(requirement)
+ ranges = requirement.requirements.map do |(op, ver)|
+ case op
+ when "~>"
+ name = "~> #{ver}"
+ bump = ver.class.new(ver.bump.to_s + ".A")
+ VersionRange.new(name: name, min: ver, max: bump, include_min: true)
+ when ">"
+ VersionRange.new(min: ver)
+ when ">="
+ VersionRange.new(min: ver, include_min: true)
+ when "<"
+ VersionRange.new(max: ver)
+ when "<="
+ VersionRange.new(max: ver, include_max: true)
+ when "="
+ VersionRange.new(min: ver, max: ver, include_min: true, include_max: true)
+ when "!="
+ VersionRange.new(min: ver, max: ver, include_min: true, include_max: true).invert
+ else
+ raise "bad version specifier: #{op}"
+ end
+ end
+
+ ranges.inject(&:intersect)
+ end
+
+ def requirement_to_constraint(package, requirement)
+ Bundler::PubGrub::VersionConstraint.new(package, range: requirement_to_range(requirement))
+ end
+
+ def parse_range(dep)
+ requirement_to_range(Gem::Requirement.new(dep))
+ end
+
+ def parse_constraint(package, dep)
+ range = parse_range(dep)
+ Bundler::PubGrub::VersionConstraint.new(package, range: range)
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
new file mode 100644
index 0000000000..961a7a7c0c
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
@@ -0,0 +1,19 @@
+require_relative 'failure_writer'
+
+module Bundler::PubGrub
+ class SolveFailure < StandardError
+ attr_reader :incompatibility
+
+ def initialize(incompatibility)
+ @incompatibility = incompatibility
+ end
+
+ def to_s
+ "Could not find compatible versions\n\n#{explanation}"
+ end
+
+ def explanation
+ @explanation ||= FailureWriter.new(@incompatibility).write
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
new file mode 100644
index 0000000000..4bf61461b2
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
@@ -0,0 +1,60 @@
+require_relative 'package'
+require_relative 'version_constraint'
+require_relative 'incompatibility'
+require_relative 'basic_package_source'
+
+module Bundler::PubGrub
+ class StaticPackageSource < BasicPackageSource
+ class DSL
+ def initialize(packages, root_deps)
+ @packages = packages
+ @root_deps = root_deps
+ end
+
+ def root(deps:)
+ @root_deps.update(deps)
+ end
+
+ def add(name, version, deps: {})
+ version = Gem::Version.new(version)
+ @packages[name] ||= {}
+ raise ArgumentError, "#{name} #{version} declared twice" if @packages[name].key?(version)
+ @packages[name][version] = clean_deps(name, version, deps)
+ end
+
+ private
+
+ # Exclude redundant self-referencing dependencies
+ def clean_deps(name, version, deps)
+ deps.reject {|dep_name, req| name == dep_name && Bundler::PubGrub::RubyGems.parse_range(req).include?(version) }
+ end
+ end
+
+ def initialize
+ @root_deps = {}
+ @packages = {}
+
+ yield DSL.new(@packages, @root_deps)
+
+ super()
+ end
+
+ def all_versions_for(package)
+ @packages[package].keys
+ end
+
+ def root_dependencies
+ @root_deps
+ end
+
+ def dependencies_for(package, version)
+ @packages[package][version]
+ end
+
+ def parse_dependency(package, dependency)
+ return false unless @packages.key?(package)
+
+ Bundler::PubGrub::RubyGems.parse_constraint(package, dependency)
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
new file mode 100644
index 0000000000..1d0f763378
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
@@ -0,0 +1,105 @@
+module Bundler::PubGrub
+ class Term
+ attr_reader :package, :constraint, :positive
+
+ def initialize(constraint, positive)
+ @constraint = constraint
+ @package = @constraint.package
+ @positive = positive
+ end
+
+ def to_s(allow_every: false)
+ if positive
+ @constraint.to_s(allow_every: allow_every)
+ else
+ "not #{@constraint}"
+ end
+ end
+
+ def hash
+ constraint.hash ^ positive.hash
+ end
+
+ def eql?(other)
+ positive == other.positive &&
+ constraint.eql?(other.constraint)
+ end
+
+ def invert
+ self.class.new(@constraint, !@positive)
+ end
+ alias_method :inverse, :invert
+
+ def intersect(other)
+ raise ArgumentError, "packages must match" if package != other.package
+
+ if positive? && other.positive?
+ self.class.new(constraint.intersect(other.constraint), true)
+ elsif negative? && other.negative?
+ self.class.new(constraint.union(other.constraint), false)
+ else
+ positive = positive? ? self : other
+ negative = negative? ? self : other
+ self.class.new(positive.constraint.intersect(negative.constraint.invert), true)
+ end
+ end
+
+ def difference(other)
+ intersect(other.invert)
+ end
+
+ def relation(other)
+ if positive? && other.positive?
+ constraint.relation(other.constraint)
+ elsif negative? && other.positive?
+ if constraint.allows_all?(other.constraint)
+ :disjoint
+ else
+ :overlap
+ end
+ elsif positive? && other.negative?
+ if !other.constraint.allows_any?(constraint)
+ :subset
+ elsif other.constraint.allows_all?(constraint)
+ :disjoint
+ else
+ :overlap
+ end
+ elsif negative? && other.negative?
+ if constraint.allows_all?(other.constraint)
+ :subset
+ else
+ :overlap
+ end
+ else
+ raise
+ end
+ end
+
+ def normalized_constraint
+ @normalized_constraint ||= positive ? constraint : constraint.invert
+ end
+
+ def satisfies?(other)
+ raise ArgumentError, "packages must match" unless package == other.package
+
+ relation(other) == :subset
+ end
+
+ def positive?
+ @positive
+ end
+
+ def negative?
+ !positive?
+ end
+
+ def empty?
+ @empty ||= normalized_constraint.empty?
+ end
+
+ def inspect
+ "#<#{self.class} #{self}>"
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
new file mode 100644
index 0000000000..d7984b3863
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
@@ -0,0 +1,3 @@
+module Bundler::PubGrub
+ VERSION = "0.5.0"
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
new file mode 100644
index 0000000000..b71f3eaf53
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
@@ -0,0 +1,129 @@
+require_relative 'version_range'
+
+module Bundler::PubGrub
+ class VersionConstraint
+ attr_reader :package, :range
+
+ # @param package [Bundler::PubGrub::Package]
+ # @param range [Bundler::PubGrub::VersionRange]
+ def initialize(package, range: nil)
+ @package = package
+ @range = range
+ end
+
+ def hash
+ package.hash ^ range.hash
+ end
+
+ def ==(other)
+ package == other.package &&
+ range == other.range
+ end
+
+ def eql?(other)
+ package.eql?(other.package) &&
+ range.eql?(other.range)
+ end
+
+ class << self
+ def exact(package, version)
+ range = VersionRange.new(min: version, max: version, include_min: true, include_max: true)
+ new(package, range: range)
+ end
+
+ def any(package)
+ new(package, range: VersionRange.any)
+ end
+
+ def empty(package)
+ new(package, range: VersionRange.empty)
+ end
+ end
+
+ def intersect(other)
+ unless package == other.package
+ raise ArgumentError, "Can only intersect between VersionConstraint of the same package"
+ end
+
+ self.class.new(package, range: range.intersect(other.range))
+ end
+
+ def union(other)
+ unless package == other.package
+ raise ArgumentError, "Can only intersect between VersionConstraint of the same package"
+ end
+
+ self.class.new(package, range: range.union(other.range))
+ end
+
+ def invert
+ new_range = range.invert
+ self.class.new(package, range: new_range)
+ end
+
+ def difference(other)
+ intersect(other.invert)
+ end
+
+ def allows_all?(other)
+ range.allows_all?(other.range)
+ end
+
+ def allows_any?(other)
+ range.intersects?(other.range)
+ end
+
+ def subset?(other)
+ other.allows_all?(self)
+ end
+
+ def overlap?(other)
+ other.allows_any?(self)
+ end
+
+ def disjoint?(other)
+ !overlap?(other)
+ end
+
+ def relation(other)
+ if subset?(other)
+ :subset
+ elsif overlap?(other)
+ :overlap
+ else
+ :disjoint
+ end
+ end
+
+ def to_s(allow_every: false)
+ if Package.root?(package)
+ package.to_s
+ elsif allow_every && any?
+ "every version of #{package}"
+ else
+ "#{package} #{constraint_string}"
+ end
+ end
+
+ def constraint_string
+ if any?
+ ">= 0"
+ else
+ range.to_s
+ end
+ end
+
+ def empty?
+ range.empty?
+ end
+
+ # Does this match every version of the package
+ def any?
+ range.any?
+ end
+
+ def inspect
+ "#<#{self.class} #{self}>"
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
new file mode 100644
index 0000000000..8d73c3f7b5
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
@@ -0,0 +1,411 @@
+# frozen_string_literal: true
+
+module Bundler::PubGrub
+ class VersionRange
+ attr_reader :min, :max, :include_min, :include_max
+
+ alias_method :include_min?, :include_min
+ alias_method :include_max?, :include_max
+
+ class Empty < VersionRange
+ undef_method :min, :max
+ undef_method :include_min, :include_min?
+ undef_method :include_max, :include_max?
+
+ def initialize
+ end
+
+ def empty?
+ true
+ end
+
+ def eql?(other)
+ other.empty?
+ end
+
+ def hash
+ [].hash
+ end
+
+ def intersects?(_)
+ false
+ end
+
+ def intersect(other)
+ self
+ end
+
+ def allows_all?(other)
+ other.empty?
+ end
+
+ def include?(_)
+ false
+ end
+
+ def any?
+ false
+ end
+
+ def to_s
+ "(no versions)"
+ end
+
+ def ==(other)
+ other.class == self.class
+ end
+
+ def invert
+ VersionRange.any
+ end
+
+ def select_versions(_)
+ []
+ end
+ end
+
+ EMPTY = Empty.new
+ Empty.singleton_class.undef_method(:new)
+
+ def self.empty
+ EMPTY
+ end
+
+ def self.any
+ new
+ end
+
+ def initialize(min: nil, max: nil, include_min: false, include_max: false, name: nil)
+ @min = min
+ @max = max
+ @include_min = include_min
+ @include_max = include_max
+ @name = name
+ end
+
+ def hash
+ @hash ||= min.hash ^ max.hash ^ include_min.hash ^ include_max.hash
+ end
+
+ def eql?(other)
+ if other.is_a?(VersionRange)
+ !other.empty? &&
+ min.eql?(other.min) &&
+ max.eql?(other.max) &&
+ include_min.eql?(other.include_min) &&
+ include_max.eql?(other.include_max)
+ else
+ ranges.eql?(other.ranges)
+ end
+ end
+
+ def ranges
+ [self]
+ end
+
+ def include?(version)
+ compare_version(version) == 0
+ end
+
+ # Partitions passed versions into [lower, within, higher]
+ #
+ # versions must be sorted
+ def partition_versions(versions)
+ min_index =
+ if !min || versions.empty?
+ 0
+ elsif include_min?
+ (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] >= min }
+ else
+ (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] > min }
+ end
+
+ lower = versions.slice(0, min_index)
+ versions = versions.slice(min_index, versions.size)
+
+ max_index =
+ if !max || versions.empty?
+ versions.size
+ elsif include_max?
+ (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] > max }
+ else
+ (0..versions.size).bsearch { |i| versions[i].nil? || versions[i] >= max }
+ end
+
+ [
+ lower,
+ versions.slice(0, max_index),
+ versions.slice(max_index, versions.size)
+ ]
+ end
+
+ # Returns versions which are included by this range.
+ #
+ # versions must be sorted
+ def select_versions(versions)
+ return versions if any?
+
+ partition_versions(versions)[1]
+ end
+
+ def compare_version(version)
+ if min
+ case version <=> min
+ when -1
+ return -1
+ when 0
+ return -1 if !include_min
+ when 1
+ end
+ end
+
+ if max
+ case version <=> max
+ when -1
+ when 0
+ return 1 if !include_max
+ when 1
+ return 1
+ end
+ end
+
+ 0
+ end
+
+ def strictly_lower?(other)
+ return false if !max || !other.min
+
+ case max <=> other.min
+ when 0
+ !include_max || !other.include_min
+ when -1
+ true
+ when 1
+ false
+ end
+ end
+
+ def strictly_higher?(other)
+ other.strictly_lower?(self)
+ end
+
+ def intersects?(other)
+ return false if other.empty?
+ return other.intersects?(self) if other.is_a?(VersionUnion)
+ !strictly_lower?(other) && !strictly_higher?(other)
+ end
+ alias_method :allows_any?, :intersects?
+
+ def intersect(other)
+ return other if other.empty?
+ return other.intersect(self) if other.is_a?(VersionUnion)
+
+ min_range =
+ if !min
+ other
+ elsif !other.min
+ self
+ else
+ case min <=> other.min
+ when 0
+ include_min ? other : self
+ when -1
+ other
+ when 1
+ self
+ end
+ end
+
+ max_range =
+ if !max
+ other
+ elsif !other.max
+ self
+ else
+ case max <=> other.max
+ when 0
+ include_max ? other : self
+ when -1
+ self
+ when 1
+ other
+ end
+ end
+
+ if !min_range.equal?(max_range) && min_range.min && max_range.max
+ case min_range.min <=> max_range.max
+ when -1
+ when 0
+ if !min_range.include_min || !max_range.include_max
+ return EMPTY
+ end
+ when 1
+ return EMPTY
+ end
+ end
+
+ VersionRange.new(
+ min: min_range.min,
+ include_min: min_range.include_min,
+ max: max_range.max,
+ include_max: max_range.include_max
+ )
+ end
+
+ # The span covered by two ranges
+ #
+ # If self and other are contiguous, this builds a union of the two ranges.
+ # (if they aren't you are probably calling the wrong method)
+ def span(other)
+ return self if other.empty?
+
+ min_range =
+ if !min
+ self
+ elsif !other.min
+ other
+ else
+ case min <=> other.min
+ when 0
+ include_min ? self : other
+ when -1
+ self
+ when 1
+ other
+ end
+ end
+
+ max_range =
+ if !max
+ self
+ elsif !other.max
+ other
+ else
+ case max <=> other.max
+ when 0
+ include_max ? self : other
+ when -1
+ other
+ when 1
+ self
+ end
+ end
+
+ VersionRange.new(
+ min: min_range.min,
+ include_min: min_range.include_min,
+ max: max_range.max,
+ include_max: max_range.include_max
+ )
+ end
+
+ def union(other)
+ return other.union(self) if other.is_a?(VersionUnion)
+
+ if contiguous_to?(other)
+ span(other)
+ else
+ VersionUnion.union([self, other])
+ end
+ end
+
+ def contiguous_to?(other)
+ return false if other.empty?
+
+ intersects?(other) ||
+ (min == other.max && (include_min || other.include_max)) ||
+ (max == other.min && (include_max || other.include_min))
+ end
+
+ def allows_all?(other)
+ return true if other.empty?
+
+ if other.is_a?(VersionUnion)
+ return VersionUnion.new([self]).allows_all?(other)
+ end
+
+ return false if max && !other.max
+ return false if min && !other.min
+
+ if min
+ case min <=> other.min
+ when -1
+ when 0
+ return false if !include_min && other.include_min
+ when 1
+ return false
+ end
+ end
+
+ if max
+ case max <=> other.max
+ when -1
+ return false
+ when 0
+ return false if !include_max && other.include_max
+ when 1
+ end
+ end
+
+ true
+ end
+
+ def any?
+ !min && !max
+ end
+
+ def empty?
+ false
+ end
+
+ def to_s
+ @name ||= constraints.join(", ")
+ end
+
+ def inspect
+ "#<#{self.class} #{to_s}>"
+ end
+
+ def upper_invert
+ return self.class.empty unless max
+
+ VersionRange.new(min: max, include_min: !include_max)
+ end
+
+ def invert
+ return self.class.empty if any?
+
+ low = VersionRange.new(max: min, include_max: !include_min)
+ high = VersionRange.new(min: max, include_min: !include_max)
+
+ if !min
+ high
+ elsif !max
+ low
+ else
+ low.union(high)
+ end
+ end
+
+ def ==(other)
+ self.class == other.class &&
+ min == other.min &&
+ max == other.max &&
+ include_min == other.include_min &&
+ include_max == other.include_max
+ end
+
+ private
+
+ def constraints
+ return ["any"] if any?
+ return ["= #{min}"] if min.to_s == max.to_s
+
+ c = []
+ c << "#{include_min ? ">=" : ">"} #{min}" if min
+ c << "#{include_max ? "<=" : "<"} #{max}" if max
+ c
+ end
+
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
new file mode 100644
index 0000000000..4caf6b355b
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
@@ -0,0 +1,248 @@
+require_relative 'partial_solution'
+require_relative 'term'
+require_relative 'incompatibility'
+require_relative 'solve_failure'
+
+module Bundler::PubGrub
+ class VersionSolver
+ attr_reader :logger
+ attr_reader :source
+ attr_reader :solution
+
+ def initialize(source:, root: Package.root, logger: Bundler::PubGrub.logger)
+ @logger = logger
+
+ @source = source
+
+ # { package => [incompatibility, ...]}
+ @incompatibilities = Hash.new do |h, k|
+ h[k] = []
+ end
+
+ @seen_incompatibilities = {}
+
+ @solution = PartialSolution.new
+
+ add_incompatibility Incompatibility.new([
+ Term.new(VersionConstraint.any(root), false)
+ ], cause: :root)
+
+ propagate(root)
+ end
+
+ def solved?
+ solution.unsatisfied.empty?
+ end
+
+ # Returns true if there is more work to be done, false otherwise
+ def work
+ return false if solved?
+
+ next_package = choose_package_version
+ propagate(next_package)
+
+ if solved?
+ logger.info { "Solution found after #{solution.attempted_solutions} attempts:" }
+ solution.decisions.each do |package, version|
+ next if Package.root?(package)
+ logger.info { "* #{package} #{version}" }
+ end
+
+ false
+ else
+ true
+ end
+ end
+
+ def solve
+ work until solved?
+
+ solution.decisions
+ end
+
+ alias_method :result, :solve
+
+ private
+
+ def propagate(initial_package)
+ changed = [initial_package]
+ while package = changed.shift
+ @incompatibilities[package].reverse_each do |incompatibility|
+ result = propagate_incompatibility(incompatibility)
+ if result == :conflict
+ root_cause = resolve_conflict(incompatibility)
+ changed.clear
+ changed << propagate_incompatibility(root_cause)
+ elsif result # should be a Package
+ changed << result
+ end
+ end
+ changed.uniq!
+ end
+ end
+
+ def propagate_incompatibility(incompatibility)
+ unsatisfied = nil
+ incompatibility.terms.each do |term|
+ relation = solution.relation(term)
+ if relation == :disjoint
+ return nil
+ elsif relation == :overlap
+ # If more than one term is inconclusive, we can't deduce anything
+ return nil if unsatisfied
+ unsatisfied = term
+ end
+ end
+
+ if !unsatisfied
+ return :conflict
+ end
+
+ logger.debug { "derived: #{unsatisfied.invert}" }
+
+ solution.derive(unsatisfied.invert, incompatibility)
+
+ unsatisfied.package
+ end
+
+ def next_package_to_try
+ solution.unsatisfied.min_by do |term|
+ package = term.package
+ range = term.constraint.range
+ matching_versions = source.versions_for(package, range)
+ higher_versions = source.versions_for(package, range.upper_invert)
+
+ [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
+ end.package
+ end
+
+ def choose_package_version
+ if solution.unsatisfied.empty?
+ logger.info "No packages unsatisfied. Solving complete!"
+ return nil
+ end
+
+ package = next_package_to_try
+ unsatisfied_term = solution.unsatisfied.find { |t| t.package == package }
+ version = source.versions_for(package, unsatisfied_term.constraint.range).first
+ logger.debug { "attempting #{package} #{version}" }
+
+ if version.nil?
+ add_incompatibility source.no_versions_incompatibility_for(package, unsatisfied_term)
+ return package
+ end
+
+ conflict = false
+
+ source.incompatibilities_for(package, version).each do |incompatibility|
+ if @seen_incompatibilities.include?(incompatibility)
+ logger.debug { "knew: #{incompatibility}" }
+ next
+ end
+ @seen_incompatibilities[incompatibility] = true
+
+ add_incompatibility incompatibility
+
+ conflict ||= incompatibility.terms.all? do |term|
+ term.package == package || solution.satisfies?(term)
+ end
+ end
+
+ unless conflict
+ logger.info { "selected #{package} #{version}" }
+
+ solution.decide(package, version)
+ else
+ logger.info { "conflict: #{conflict.inspect}" }
+ end
+
+ package
+ end
+
+ def resolve_conflict(incompatibility)
+ logger.info { "conflict: #{incompatibility}" }
+
+ new_incompatibility = nil
+
+ while !incompatibility.failure?
+ most_recent_term = nil
+ most_recent_satisfier = nil
+ difference = nil
+
+ previous_level = 1
+
+ incompatibility.terms.each do |term|
+ satisfier = solution.satisfier(term)
+
+ if most_recent_satisfier.nil?
+ most_recent_term = term
+ most_recent_satisfier = satisfier
+ elsif most_recent_satisfier.index < satisfier.index
+ previous_level = [previous_level, most_recent_satisfier.decision_level].max
+ most_recent_term = term
+ most_recent_satisfier = satisfier
+ difference = nil
+ else
+ previous_level = [previous_level, satisfier.decision_level].max
+ end
+
+ if most_recent_term == term
+ difference = most_recent_satisfier.term.difference(most_recent_term)
+ if difference.empty?
+ difference = nil
+ else
+ difference_satisfier = solution.satisfier(difference.inverse)
+ previous_level = [previous_level, difference_satisfier.decision_level].max
+ end
+ end
+ end
+
+ if previous_level < most_recent_satisfier.decision_level ||
+ most_recent_satisfier.decision?
+
+ logger.info { "backtracking to #{previous_level}" }
+ solution.backtrack(previous_level)
+
+ if new_incompatibility
+ add_incompatibility(new_incompatibility)
+ end
+
+ return incompatibility
+ end
+
+ new_terms = []
+ new_terms += incompatibility.terms - [most_recent_term]
+ new_terms += most_recent_satisfier.cause.terms.reject { |term|
+ term.package == most_recent_satisfier.term.package
+ }
+ if difference
+ new_terms << difference.invert
+ end
+
+ new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause))
+
+ if incompatibility.to_s == new_incompatibility.to_s
+ logger.info { "!! failed to resolve conflicts, this shouldn't have happened" }
+ break
+ end
+
+ incompatibility = new_incompatibility
+
+ partially = difference ? " partially" : ""
+ logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" }
+ logger.info { "! which is caused by #{most_recent_satisfier.cause}" }
+ logger.info { "! thus #{incompatibility}" }
+ end
+
+ raise SolveFailure.new(incompatibility)
+ end
+
+ def add_incompatibility(incompatibility)
+ logger.debug { "fact: #{incompatibility}" }
+ incompatibility.terms.each do |term|
+ package = term.package
+ @incompatibilities[package] << incompatibility
+ end
+ end
+ end
+end
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
new file mode 100644
index 0000000000..bbc10c3804
--- /dev/null
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
@@ -0,0 +1,178 @@
+# frozen_string_literal: true
+
+module Bundler::PubGrub
+ class VersionUnion
+ attr_reader :ranges
+
+ def self.normalize_ranges(ranges)
+ ranges = ranges.flat_map do |range|
+ range.ranges
+ end
+
+ ranges.reject!(&:empty?)
+
+ return [] if ranges.empty?
+
+ mins, ranges = ranges.partition { |r| !r.min }
+ original_ranges = mins + ranges.sort_by { |r| [r.min, r.include_min ? 0 : 1] }
+ ranges = [original_ranges.shift]
+ original_ranges.each do |range|
+ if ranges.last.contiguous_to?(range)
+ ranges << ranges.pop.span(range)
+ else
+ ranges << range
+ end
+ end
+
+ ranges
+ end
+
+ def self.union(ranges, normalize: true)
+ ranges = normalize_ranges(ranges) if normalize
+
+ if ranges.size == 0
+ VersionRange.empty
+ elsif ranges.size == 1
+ ranges[0]
+ else
+ new(ranges)
+ end
+ end
+
+ def initialize(ranges)
+ raise ArgumentError unless ranges.all? { |r| r.instance_of?(VersionRange) }
+ @ranges = ranges
+ end
+
+ def hash
+ ranges.hash
+ end
+
+ def eql?(other)
+ ranges.eql?(other.ranges)
+ end
+
+ def include?(version)
+ !!ranges.bsearch {|r| r.compare_version(version) }
+ end
+
+ def select_versions(all_versions)
+ versions = []
+ ranges.inject(all_versions) do |acc, range|
+ _, matching, higher = range.partition_versions(acc)
+ versions.concat matching
+ higher
+ end
+ versions
+ end
+
+ def intersects?(other)
+ my_ranges = ranges.dup
+ other_ranges = other.ranges.dup
+
+ my_range = my_ranges.shift
+ other_range = other_ranges.shift
+ while my_range && other_range
+ if my_range.intersects?(other_range)
+ return true
+ end
+
+ if !my_range.max || other_range.empty? || (other_range.max && other_range.max < my_range.max)
+ other_range = other_ranges.shift
+ else
+ my_range = my_ranges.shift
+ end
+ end
+ end
+ alias_method :allows_any?, :intersects?
+
+ def allows_all?(other)
+ my_ranges = ranges.dup
+
+ my_range = my_ranges.shift
+
+ other.ranges.all? do |other_range|
+ while my_range
+ break if my_range.allows_all?(other_range)
+ my_range = my_ranges.shift
+ end
+
+ !!my_range
+ end
+ end
+
+ def empty?
+ false
+ end
+
+ def any?
+ false
+ end
+
+ def intersect(other)
+ my_ranges = ranges.dup
+ other_ranges = other.ranges.dup
+ new_ranges = []
+
+ my_range = my_ranges.shift
+ other_range = other_ranges.shift
+ while my_range && other_range
+ new_ranges << my_range.intersect(other_range)
+
+ if !my_range.max || other_range.empty? || (other_range.max && other_range.max < my_range.max)
+ other_range = other_ranges.shift
+ else
+ my_range = my_ranges.shift
+ end
+ end
+ new_ranges.reject!(&:empty?)
+ VersionUnion.union(new_ranges, normalize: false)
+ end
+
+ def upper_invert
+ ranges.last.upper_invert
+ end
+
+ def invert
+ ranges.map(&:invert).inject(:intersect)
+ end
+
+ def union(other)
+ VersionUnion.union([self, other])
+ end
+
+ def to_s
+ output = []
+
+ ranges = self.ranges.dup
+ while !ranges.empty?
+ ne = []
+ range = ranges.shift
+ while !ranges.empty? && ranges[0].min.to_s == range.max.to_s
+ ne << range.max
+ range = range.span(ranges.shift)
+ end
+
+ ne.map! {|x| "!= #{x}" }
+ if ne.empty?
+ output << range.to_s
+ elsif range.any?
+ output << ne.join(', ')
+ else
+ output << "#{range}, #{ne.join(', ')}"
+ end
+ end
+
+ output.join(" OR ")
+ end
+
+ def inspect
+ "#<#{self.class} #{to_s}>"
+ end
+
+ def ==(other)
+ self.class == other.class &&
+ self.ranges == other.ranges
+ end
+ end
+end
diff --git a/lib/bundler/vendor/thor/lib/thor.rb b/lib/bundler/vendor/thor/lib/thor.rb
index 01c0b2f83c..0794dbb522 100644
--- a/lib/bundler/vendor/thor/lib/thor.rb
+++ b/lib/bundler/vendor/thor/lib/thor.rb
@@ -1,7 +1,7 @@
-require "set"
require_relative "thor/base"
class Bundler::Thor
+ $thor_runner ||= false
class << self
# Allows for custom "Command" package naming.
#
@@ -323,7 +323,7 @@ class Bundler::Thor
# ==== Parameters
# Symbol ...:: A list of commands that should be affected.
def stop_on_unknown_option!(*command_names)
- stop_on_unknown_option.merge(command_names)
+ @stop_on_unknown_option = stop_on_unknown_option | command_names
end
def stop_on_unknown_option?(command) #:nodoc:
@@ -337,29 +337,22 @@ class Bundler::Thor
# ==== Parameters
# Symbol ...:: A list of commands that should be affected.
def disable_required_check!(*command_names)
- disable_required_check.merge(command_names)
+ @disable_required_check = disable_required_check | command_names
end
def disable_required_check?(command) #:nodoc:
command && disable_required_check.include?(command.name.to_sym)
end
- def deprecation_warning(message) #:nodoc:
- unless ENV['THOR_SILENCE_DEPRECATION']
- warn "Deprecation warning: #{message}\n" +
- 'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
- end
- end
-
protected
def stop_on_unknown_option #:nodoc:
- @stop_on_unknown_option ||= Set.new
+ @stop_on_unknown_option ||= []
end
# help command has the required check disabled by default.
def disable_required_check #:nodoc:
- @disable_required_check ||= Set.new([:help])
+ @disable_required_check ||= [:help]
end
# The method responsible for dispatching given the args.
@@ -405,7 +398,6 @@ class Bundler::Thor
# the namespace should be displayed as arguments.
#
def banner(command, namespace = nil, subcommand = false)
- $thor_runner ||= false
command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage|
"#{basename} #{formatted_usage}"
end.join("\n")
diff --git a/lib/bundler/vendor/thor/lib/thor/actions.rb b/lib/bundler/vendor/thor/lib/thor/actions.rb
index a5368d07f3..de9b3b4c86 100644
--- a/lib/bundler/vendor/thor/lib/thor/actions.rb
+++ b/lib/bundler/vendor/thor/lib/thor/actions.rb
@@ -161,6 +161,8 @@ class Bundler::Thor
# to the block you provide. The path is set back to the previous path when
# the method exits.
#
+ # Returns the value yielded by the block.
+ #
# ==== Parameters
# dir<String>:: the directory to move to.
# config<Hash>:: give :verbose => true to log and use padding.
@@ -179,16 +181,18 @@ class Bundler::Thor
FileUtils.mkdir_p(destination_root)
end
+ result = nil
if pretend
# In pretend mode, just yield down to the block
- block.arity == 1 ? yield(destination_root) : yield
+ result = block.arity == 1 ? yield(destination_root) : yield
else
require "fileutils"
- FileUtils.cd(destination_root) { block.arity == 1 ? yield(destination_root) : yield }
+ FileUtils.cd(destination_root) { result = block.arity == 1 ? yield(destination_root) : yield }
end
@destination_stack.pop
shell.padding -= 1 if verbose
+ result
end
# Goes to the root and execute the given block.
@@ -219,7 +223,7 @@ class Bundler::Thor
contents = if is_uri
require "open-uri"
- open(path, "Accept" => "application/x-thor-template", &:read)
+ URI.open(path, "Accept" => "application/x-thor-template", &:read)
else
open(path, &:read)
end
diff --git a/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb b/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
index 70504a2c1f..fb76fcdbe9 100644
--- a/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
+++ b/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb
@@ -33,7 +33,8 @@ class Bundler::Thor
# Boolean:: true if it is identical, false otherwise.
#
def identical?
- exists? && File.identical?(render, destination)
+ source = File.expand_path(render, File.dirname(destination))
+ exists? && File.identical?(source, destination)
end
def invoke!
diff --git a/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb b/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
index afdbd53dd0..bf2a737c84 100644
--- a/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
+++ b/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
@@ -210,9 +210,9 @@ class Bundler::Thor
#
# ==== Examples
#
- # inject_into_class "app/controllers/application_controller.rb", ApplicationController, " filter_parameter :password\n"
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n"
#
- # inject_into_class "app/controllers/application_controller.rb", ApplicationController do
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
# " filter_parameter :password\n"
# end
#
@@ -233,9 +233,9 @@ class Bundler::Thor
#
# ==== Examples
#
- # inject_into_module "app/helpers/application_helper.rb", ApplicationHelper, " def help; 'help'; end\n"
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n"
#
- # inject_into_module "app/helpers/application_helper.rb", ApplicationHelper do
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do
# " def help; 'help'; end\n"
# end
#
@@ -251,7 +251,8 @@ class Bundler::Thor
# path<String>:: path of the file to be changed
# flag<Regexp|String>:: the regexp or string to be replaced
# replacement<String>:: the replacement, can be also given as a block
- # config<Hash>:: give :verbose => false to not log the status.
+ # config<Hash>:: give :verbose => false to not log the status, and
+ # :force => true, to force the replacement regardles of runner behavior.
#
# ==== Example
#
@@ -262,9 +263,10 @@ class Bundler::Thor
# end
#
def gsub_file(path, flag, *args, &block)
- return unless behavior == :invoke
config = args.last.is_a?(Hash) ? args.pop : {}
+ return unless behavior == :invoke || config.fetch(:force, false)
+
path = File.expand_path(path, destination_root)
say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)
@@ -329,7 +331,7 @@ class Bundler::Thor
path = File.expand_path(path, destination_root)
say_status :remove, relative_to_original_destination_root(path), config.fetch(:verbose, true)
- if !options[:pretend] && File.exist?(path)
+ if !options[:pretend] && (File.exist?(path) || File.symlink?(path))
require "fileutils"
::FileUtils.rm_rf(path)
end
diff --git a/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb b/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb
index 09ce0864f0..bf013307f1 100644
--- a/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb
+++ b/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb
@@ -106,12 +106,11 @@ class Bundler::Thor
# Adds the content to the file.
#
def replace!(regexp, string, force)
- return if pretend?
content = File.read(destination)
if force || !content.include?(replacement)
success = content.gsub!(regexp, string)
- File.open(destination, "wb") { |file| file.write(content) }
+ File.open(destination, "wb") { |file| file.write(content) } unless pretend?
success
end
end
diff --git a/lib/bundler/vendor/thor/lib/thor/base.rb b/lib/bundler/vendor/thor/lib/thor/base.rb
index 9ba5243378..8487f9590a 100644
--- a/lib/bundler/vendor/thor/lib/thor/base.rb
+++ b/lib/bundler/vendor/thor/lib/thor/base.rb
@@ -22,6 +22,15 @@ class Bundler::Thor
TEMPLATE_EXTNAME = ".tt"
+ class << self
+ def deprecation_warning(message) #:nodoc:
+ unless ENV['THOR_SILENCE_DEPRECATION']
+ warn "Deprecation warning: #{message}\n" +
+ 'You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.'
+ end
+ end
+ end
+
module Base
attr_accessor :options, :parent_options, :args
diff --git a/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb b/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
index c167aa33b8..3c4483e5dd 100644
--- a/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
+++ b/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
@@ -28,6 +28,12 @@ class Bundler::Thor
super(convert_key(key))
end
+ def except(*keys)
+ dup.tap do |hash|
+ keys.each { |key| hash.delete(convert_key(key)) }
+ end
+ end
+
def fetch(key, *args)
super(convert_key(key), *args)
end
diff --git a/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb b/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb
deleted file mode 100644
index 0f6e2e0af2..0000000000
--- a/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class IO #:nodoc:
- class << self
- unless method_defined? :binread
- def binread(file, *args)
- raise ArgumentError, "wrong number of arguments (#{1 + args.size} for 1..3)" unless args.size < 3
- File.open(file, "rb") do |f|
- f.read(*args)
- end
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb b/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb
deleted file mode 100644
index 76f1e43c65..0000000000
--- a/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb
+++ /dev/null
@@ -1,129 +0,0 @@
-class Bundler::Thor
- module CoreExt
- class OrderedHash < ::Hash
- if RUBY_VERSION < "1.9"
- def initialize(*args, &block)
- super
- @keys = []
- end
-
- def initialize_copy(other)
- super
- # make a deep copy of keys
- @keys = other.keys
- end
-
- def []=(key, value)
- @keys << key unless key?(key)
- super
- end
-
- def delete(key)
- if key? key
- index = @keys.index(key)
- @keys.delete_at index
- end
- super
- end
-
- def delete_if
- super
- sync_keys!
- self
- end
-
- alias_method :reject!, :delete_if
-
- def reject(&block)
- dup.reject!(&block)
- end
-
- def keys
- @keys.dup
- end
-
- def values
- @keys.map { |key| self[key] }
- end
-
- def to_hash
- self
- end
-
- def to_a
- @keys.map { |key| [key, self[key]] }
- end
-
- def each_key
- return to_enum(:each_key) unless block_given?
- @keys.each { |key| yield(key) }
- self
- end
-
- def each_value
- return to_enum(:each_value) unless block_given?
- @keys.each { |key| yield(self[key]) }
- self
- end
-
- def each
- return to_enum(:each) unless block_given?
- @keys.each { |key| yield([key, self[key]]) }
- self
- end
-
- def each_pair
- return to_enum(:each_pair) unless block_given?
- @keys.each { |key| yield(key, self[key]) }
- self
- end
-
- alias_method :select, :find_all
-
- def clear
- super
- @keys.clear
- self
- end
-
- def shift
- k = @keys.first
- v = delete(k)
- [k, v]
- end
-
- def merge!(other_hash)
- if block_given?
- other_hash.each { |k, v| self[k] = key?(k) ? yield(k, self[k], v) : v }
- else
- other_hash.each { |k, v| self[k] = v }
- end
- self
- end
-
- alias_method :update, :merge!
-
- def merge(other_hash, &block)
- dup.merge!(other_hash, &block)
- end
-
- # When replacing with another hash, the initial order of our keys must come from the other hash -ordered or not.
- def replace(other)
- super
- @keys = other.keys
- self
- end
-
- def inspect
- "#<#{self.class} #{super}>"
- end
-
- private
-
- def sync_keys!
- @keys.delete_if { |k| !key?(k) }
- end
- end
- end
- end
-end
diff --git a/lib/bundler/vendor/thor/lib/thor/error.rb b/lib/bundler/vendor/thor/lib/thor/error.rb
index 1553afd201..03f2ce85bb 100644
--- a/lib/bundler/vendor/thor/lib/thor/error.rb
+++ b/lib/bundler/vendor/thor/lib/thor/error.rb
@@ -1,5 +1,5 @@
class Bundler::Thor
- Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable)
+ Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName
# In order to support versions of Ruby that don't have keyword
# arguments, we need our own spell checker class that doesn't take key
# words. Even though this code wouldn't be hit because of the check
@@ -102,9 +102,14 @@ class Bundler::Thor
end
if Correctable
- DidYouMean::SPELL_CHECKERS.merge!(
- 'Bundler::Thor::UndefinedCommandError' => UndefinedCommandError::SpellChecker,
- 'Bundler::Thor::UnknownArgumentError' => UnknownArgumentError::SpellChecker
- )
+ if DidYouMean.respond_to?(:correct_error)
+ DidYouMean.correct_error(Bundler::Thor::UndefinedCommandError, UndefinedCommandError::SpellChecker)
+ DidYouMean.correct_error(Bundler::Thor::UnknownArgumentError, UnknownArgumentError::SpellChecker)
+ else
+ DidYouMean::SPELL_CHECKERS.merge!(
+ 'Bundler::Thor::UndefinedCommandError' => UndefinedCommandError::SpellChecker,
+ 'Bundler::Thor::UnknownArgumentError' => UnknownArgumentError::SpellChecker
+ )
+ end
end
end
diff --git a/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb b/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
index d0f43e2d97..3a5d82cf29 100644
--- a/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
+++ b/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
@@ -30,7 +30,11 @@ class Bundler::Thor
arguments.each do |argument|
if !argument.default.nil?
- @assigns[argument.human_name] = argument.default
+ begin
+ @assigns[argument.human_name] = argument.default.dup
+ rescue TypeError # Compatibility shim for un-dup-able Fixnum in Ruby < 2.4
+ @assigns[argument.human_name] = argument.default
+ end
elsif argument.required?
@non_assigned_required << argument
end
diff --git a/lib/bundler/vendor/thor/lib/thor/parser/options.rb b/lib/bundler/vendor/thor/lib/thor/parser/options.rb
index 6d1342ee3c..5bd97aba6f 100644
--- a/lib/bundler/vendor/thor/lib/thor/parser/options.rb
+++ b/lib/bundler/vendor/thor/lib/thor/parser/options.rb
@@ -45,6 +45,7 @@ class Bundler::Thor
@switches = {}
@extra = []
@stopped_parsing_after_extra_index = nil
+ @is_treated_as_value = false
options.each do |option|
@switches[option.switch_name] = option
@@ -74,8 +75,19 @@ class Bundler::Thor
end
end
+ def shift
+ @is_treated_as_value = false
+ super
+ end
+
+ def unshift(arg, is_value: false)
+ @is_treated_as_value = is_value
+ super(arg)
+ end
+
def parse(args) # rubocop:disable MethodLength
@pile = args.dup
+ @is_treated_as_value = false
@parsing_options = true
while peek
@@ -88,7 +100,10 @@ class Bundler::Thor
when SHORT_SQ_RE
unshift($1.split("").map { |f| "-#{f}" })
next
- when EQ_RE, SHORT_NUM
+ when EQ_RE
+ unshift($2, is_value: true)
+ switch = $1
+ when SHORT_NUM
unshift($2)
switch = $1
when LONG_RE, SHORT_RE
@@ -133,20 +148,22 @@ class Bundler::Thor
protected
- def assign_result!(option, result)
- if option.repeatable && option.type == :hash
- (@assigns[option.human_name] ||= {}).merge!(result)
- elsif option.repeatable
- (@assigns[option.human_name] ||= []) << result
- else
- @assigns[option.human_name] = result
+ def assign_result!(option, result)
+ if option.repeatable && option.type == :hash
+ (@assigns[option.human_name] ||= {}).merge!(result)
+ elsif option.repeatable
+ (@assigns[option.human_name] ||= []) << result
+ else
+ @assigns[option.human_name] = result
+ end
end
- end
+
# Check if the current value in peek is a registered switch.
#
# Two booleans are returned. The first is true if the current value
# starts with a hyphen; the second is true if it is a registered switch.
def current_is_switch?
+ return [false, false] if @is_treated_as_value
case peek
when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM
[true, switch?($1)]
@@ -158,6 +175,7 @@ class Bundler::Thor
end
def current_is_switch_formatted?
+ return false if @is_treated_as_value
case peek
when LONG_RE, SHORT_RE, EQ_RE, SHORT_NUM, SHORT_SQ_RE
true
@@ -167,6 +185,7 @@ class Bundler::Thor
end
def current_is_value?
+ return true if @is_treated_as_value
peek && (!parsing_options? || super)
end
diff --git a/lib/bundler/vendor/thor/lib/thor/shell.rb b/lib/bundler/vendor/thor/lib/thor/shell.rb
index e36fa472d6..a4137d1bde 100644
--- a/lib/bundler/vendor/thor/lib/thor/shell.rb
+++ b/lib/bundler/vendor/thor/lib/thor/shell.rb
@@ -21,7 +21,7 @@ class Bundler::Thor
end
module Shell
- SHELL_DELEGATED_METHODS = [:ask, :error, :set_color, :yes?, :no?, :say, :say_status, :print_in_columns, :print_table, :print_wrapped, :file_collision, :terminal_width]
+ SHELL_DELEGATED_METHODS = [:ask, :error, :set_color, :yes?, :no?, :say, :say_error, :say_status, :print_in_columns, :print_table, :print_wrapped, :file_collision, :terminal_width]
attr_writer :shell
autoload :Basic, File.expand_path("shell/basic", __dir__)
diff --git a/lib/bundler/vendor/thor/lib/thor/shell/basic.rb b/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
index be48358cb1..ef97d52ae7 100644
--- a/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
+++ b/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
@@ -94,6 +94,8 @@ class Bundler::Thor
# say("I know you knew that.")
#
def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
+ return if quiet?
+
buffer = prepare_message(message, *color)
buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
@@ -101,6 +103,23 @@ class Bundler::Thor
stdout.flush
end
+ # Say (print) an error to the user. If the sentence ends with a whitespace
+ # or tab character, a new line is not appended (print + flush). Otherwise
+ # are passed straight to puts (behavior got from Highline).
+ #
+ # ==== Example
+ # say_error("error: something went wrong")
+ #
+ def say_error(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/))
+ return if quiet?
+
+ buffer = prepare_message(message, *color)
+ buffer << "\n" if force_new_line && !message.to_s.end_with?("\n")
+
+ stderr.print(buffer)
+ stderr.flush
+ end
+
# Say a status with the given color and appends the message. Since this
# method is used frequently by actions, it allows nil or false to be given
# in log_status, avoiding the message from being shown. If a Symbol is
@@ -109,13 +128,14 @@ class Bundler::Thor
def say_status(status, message, log_status = true)
return if quiet? || log_status == false
spaces = " " * (padding + 1)
- color = log_status.is_a?(Symbol) ? log_status : :green
-
status = status.to_s.rjust(12)
+ margin = " " * status.length + spaces
+
+ color = log_status.is_a?(Symbol) ? log_status : :green
status = set_color status, color, true if color
- buffer = "#{status}#{spaces}#{message}"
- buffer = "#{buffer}\n" unless buffer.end_with?("\n")
+ message = message.to_s.chomp.gsub(/(?<!\A)^/, margin)
+ buffer = "#{status}#{spaces}#{message}\n"
stdout.print(buffer)
stdout.flush
@@ -230,8 +250,9 @@ class Bundler::Thor
paras = message.split("\n\n")
paras.map! do |unwrapped|
- counter = 0
- unwrapped.split(" ").inject do |memo, word|
+ words = unwrapped.split(" ")
+ counter = words.first.length
+ words.inject do |memo, word|
word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n")
counter = 0 if word.include? "\n"
if (counter + word.length + 1) < width
@@ -404,7 +425,7 @@ class Bundler::Thor
end
def unix?
- RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
+ RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris)/i
end
def truncate(string, width)
diff --git a/lib/bundler/vendor/thor/lib/thor/shell/color.rb b/lib/bundler/vendor/thor/lib/thor/shell/color.rb
index 29f280202d..dc167ed3cc 100644
--- a/lib/bundler/vendor/thor/lib/thor/shell/color.rb
+++ b/lib/bundler/vendor/thor/lib/thor/shell/color.rb
@@ -97,7 +97,11 @@ class Bundler::Thor
protected
def can_display_colors?
- stdout.tty? && !are_colors_disabled?
+ are_colors_supported? && !are_colors_disabled?
+ end
+
+ def are_colors_supported?
+ stdout.tty? && ENV["TERM"] != "dumb"
end
def are_colors_disabled?
diff --git a/lib/bundler/vendor/thor/lib/thor/util.rb b/lib/bundler/vendor/thor/lib/thor/util.rb
index ddf4d21b90..d2572a4249 100644
--- a/lib/bundler/vendor/thor/lib/thor/util.rb
+++ b/lib/bundler/vendor/thor/lib/thor/util.rb
@@ -211,7 +211,7 @@ class Bundler::Thor
#
def globs_for(path)
path = escape_globs(path)
- ["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/*.thor"]
+ ["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/**/*.thor"]
end
# Return the path to the ruby interpreter taking into account multiple
diff --git a/lib/bundler/vendor/thor/lib/thor/version.rb b/lib/bundler/vendor/thor/lib/thor/version.rb
index 7750d27637..48a4788b3b 100644
--- a/lib/bundler/vendor/thor/lib/thor/version.rb
+++ b/lib/bundler/vendor/thor/lib/thor/version.rb
@@ -1,3 +1,3 @@
class Bundler::Thor
- VERSION = "1.0.0"
+ VERSION = "1.2.1"
end
diff --git a/lib/bundler/vendor/tsort/lib/tsort.rb b/lib/bundler/vendor/tsort/lib/tsort.rb
new file mode 100644
index 0000000000..4a0e1a4e25
--- /dev/null
+++ b/lib/bundler/vendor/tsort/lib/tsort.rb
@@ -0,0 +1,452 @@
+# frozen_string_literal: true
+
+#--
+# tsort.rb - provides a module for topological sorting and strongly connected components.
+#++
+#
+
+#
+# Bundler::TSort implements topological sorting using Tarjan's algorithm for
+# strongly connected components.
+#
+# Bundler::TSort is designed to be able to be used with any object which can be
+# interpreted as a directed graph.
+#
+# Bundler::TSort requires two methods to interpret an object as a graph,
+# tsort_each_node and tsort_each_child.
+#
+# * tsort_each_node is used to iterate for all nodes over a graph.
+# * tsort_each_child is used to iterate for child nodes of a given node.
+#
+# The equality of nodes are defined by eql? and hash since
+# Bundler::TSort uses Hash internally.
+#
+# == A Simple Example
+#
+# The following example demonstrates how to mix the Bundler::TSort module into an
+# existing class (in this case, Hash). Here, we're treating each key in
+# the hash as a node in the graph, and so we simply alias the required
+# #tsort_each_node method to Hash's #each_key method. For each key in the
+# hash, the associated value is an array of the node's child nodes. This
+# choice in turn leads to our implementation of the required #tsort_each_child
+# method, which fetches the array of child nodes and then iterates over that
+# array using the user-supplied block.
+#
+# require 'bundler/vendor/tsort/lib/tsort'
+#
+# class Hash
+# include Bundler::TSort
+# alias tsort_each_node each_key
+# def tsort_each_child(node, &block)
+# fetch(node).each(&block)
+# end
+# end
+#
+# {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort
+# #=> [3, 2, 1, 4]
+#
+# {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components
+# #=> [[4], [2, 3], [1]]
+#
+# == A More Realistic Example
+#
+# A very simple `make' like tool can be implemented as follows:
+#
+# require 'bundler/vendor/tsort/lib/tsort'
+#
+# class Make
+# def initialize
+# @dep = {}
+# @dep.default = []
+# end
+#
+# def rule(outputs, inputs=[], &block)
+# triple = [outputs, inputs, block]
+# outputs.each {|f| @dep[f] = [triple]}
+# @dep[triple] = inputs
+# end
+#
+# def build(target)
+# each_strongly_connected_component_from(target) {|ns|
+# if ns.length != 1
+# fs = ns.delete_if {|n| Array === n}
+# raise Bundler::TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
+# end
+# n = ns.first
+# if Array === n
+# outputs, inputs, block = n
+# inputs_time = inputs.map {|f| File.mtime f}.max
+# begin
+# outputs_time = outputs.map {|f| File.mtime f}.min
+# rescue Errno::ENOENT
+# outputs_time = nil
+# end
+# if outputs_time == nil ||
+# inputs_time != nil && outputs_time <= inputs_time
+# sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
+# block.call
+# end
+# end
+# }
+# end
+#
+# def tsort_each_child(node, &block)
+# @dep[node].each(&block)
+# end
+# include Bundler::TSort
+# end
+#
+# def command(arg)
+# print arg, "\n"
+# system arg
+# end
+#
+# m = Make.new
+# m.rule(%w[t1]) { command 'date > t1' }
+# m.rule(%w[t2]) { command 'date > t2' }
+# m.rule(%w[t3]) { command 'date > t3' }
+# m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 > t4' }
+# m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 > t5' }
+# m.build('t5')
+#
+# == Bugs
+#
+# * 'tsort.rb' is wrong name because this library uses
+# Tarjan's algorithm for strongly connected components.
+# Although 'strongly_connected_components.rb' is correct but too long.
+#
+# == References
+#
+# R. E. Tarjan, "Depth First Search and Linear Graph Algorithms",
+# <em>SIAM Journal on Computing</em>, Vol. 1, No. 2, pp. 146-160, June 1972.
+#
+
+module Bundler::TSort
+ class Cyclic < StandardError
+ end
+
+ # Returns a topologically sorted array of nodes.
+ # The array is sorted from children to parents, i.e.
+ # the first element has no child and the last node has no parent.
+ #
+ # If there is a cycle, Bundler::TSort::Cyclic is raised.
+ #
+ # class G
+ # include Bundler::TSort
+ # def initialize(g)
+ # @g = g
+ # end
+ # def tsort_each_child(n, &b) @g[n].each(&b) end
+ # def tsort_each_node(&b) @g.each_key(&b) end
+ # end
+ #
+ # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
+ # p graph.tsort #=> [4, 2, 3, 1]
+ #
+ # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
+ # p graph.tsort # raises Bundler::TSort::Cyclic
+ #
+ def tsort
+ each_node = method(:tsort_each_node)
+ each_child = method(:tsort_each_child)
+ Bundler::TSort.tsort(each_node, each_child)
+ end
+
+ # Returns a topologically sorted array of nodes.
+ # The array is sorted from children to parents, i.e.
+ # the first element has no child and the last node has no parent.
+ #
+ # The graph is represented by _each_node_ and _each_child_.
+ # _each_node_ should have +call+ method which yields for each node in the graph.
+ # _each_child_ should have +call+ method which takes a node argument and yields for each child node.
+ #
+ # If there is a cycle, Bundler::TSort::Cyclic is raised.
+ #
+ # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # p Bundler::TSort.tsort(each_node, each_child) #=> [4, 2, 3, 1]
+ #
+ # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # p Bundler::TSort.tsort(each_node, each_child) # raises Bundler::TSort::Cyclic
+ #
+ def self.tsort(each_node, each_child)
+ tsort_each(each_node, each_child).to_a
+ end
+
+ # The iterator version of the #tsort method.
+ # <tt><em>obj</em>.tsort_each</tt> is similar to <tt><em>obj</em>.tsort.each</tt>, but
+ # modification of _obj_ during the iteration may lead to unexpected results.
+ #
+ # #tsort_each returns +nil+.
+ # If there is a cycle, Bundler::TSort::Cyclic is raised.
+ #
+ # class G
+ # include Bundler::TSort
+ # def initialize(g)
+ # @g = g
+ # end
+ # def tsort_each_child(n, &b) @g[n].each(&b) end
+ # def tsort_each_node(&b) @g.each_key(&b) end
+ # end
+ #
+ # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
+ # graph.tsort_each {|n| p n }
+ # #=> 4
+ # # 2
+ # # 3
+ # # 1
+ #
+ def tsort_each(&block) # :yields: node
+ each_node = method(:tsort_each_node)
+ each_child = method(:tsort_each_child)
+ Bundler::TSort.tsort_each(each_node, each_child, &block)
+ end
+
+ # The iterator version of the Bundler::TSort.tsort method.
+ #
+ # The graph is represented by _each_node_ and _each_child_.
+ # _each_node_ should have +call+ method which yields for each node in the graph.
+ # _each_child_ should have +call+ method which takes a node argument and yields for each child node.
+ #
+ # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # Bundler::TSort.tsort_each(each_node, each_child) {|n| p n }
+ # #=> 4
+ # # 2
+ # # 3
+ # # 1
+ #
+ def self.tsort_each(each_node, each_child) # :yields: node
+ return to_enum(__method__, each_node, each_child) unless block_given?
+
+ each_strongly_connected_component(each_node, each_child) {|component|
+ if component.size == 1
+ yield component.first
+ else
+ raise Cyclic.new("topological sort failed: #{component.inspect}")
+ end
+ }
+ end
+
+ # Returns strongly connected components as an array of arrays of nodes.
+ # The array is sorted from children to parents.
+ # Each elements of the array represents a strongly connected component.
+ #
+ # class G
+ # include Bundler::TSort
+ # def initialize(g)
+ # @g = g
+ # end
+ # def tsort_each_child(n, &b) @g[n].each(&b) end
+ # def tsort_each_node(&b) @g.each_key(&b) end
+ # end
+ #
+ # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
+ # p graph.strongly_connected_components #=> [[4], [2], [3], [1]]
+ #
+ # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
+ # p graph.strongly_connected_components #=> [[4], [2, 3], [1]]
+ #
+ def strongly_connected_components
+ each_node = method(:tsort_each_node)
+ each_child = method(:tsort_each_child)
+ Bundler::TSort.strongly_connected_components(each_node, each_child)
+ end
+
+ # Returns strongly connected components as an array of arrays of nodes.
+ # The array is sorted from children to parents.
+ # Each elements of the array represents a strongly connected component.
+ #
+ # The graph is represented by _each_node_ and _each_child_.
+ # _each_node_ should have +call+ method which yields for each node in the graph.
+ # _each_child_ should have +call+ method which takes a node argument and yields for each child node.
+ #
+ # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # p Bundler::TSort.strongly_connected_components(each_node, each_child)
+ # #=> [[4], [2], [3], [1]]
+ #
+ # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # p Bundler::TSort.strongly_connected_components(each_node, each_child)
+ # #=> [[4], [2, 3], [1]]
+ #
+ def self.strongly_connected_components(each_node, each_child)
+ each_strongly_connected_component(each_node, each_child).to_a
+ end
+
+ # The iterator version of the #strongly_connected_components method.
+ # <tt><em>obj</em>.each_strongly_connected_component</tt> is similar to
+ # <tt><em>obj</em>.strongly_connected_components.each</tt>, but
+ # modification of _obj_ during the iteration may lead to unexpected results.
+ #
+ # #each_strongly_connected_component returns +nil+.
+ #
+ # class G
+ # include Bundler::TSort
+ # def initialize(g)
+ # @g = g
+ # end
+ # def tsort_each_child(n, &b) @g[n].each(&b) end
+ # def tsort_each_node(&b) @g.each_key(&b) end
+ # end
+ #
+ # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
+ # graph.each_strongly_connected_component {|scc| p scc }
+ # #=> [4]
+ # # [2]
+ # # [3]
+ # # [1]
+ #
+ # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
+ # graph.each_strongly_connected_component {|scc| p scc }
+ # #=> [4]
+ # # [2, 3]
+ # # [1]
+ #
+ def each_strongly_connected_component(&block) # :yields: nodes
+ each_node = method(:tsort_each_node)
+ each_child = method(:tsort_each_child)
+ Bundler::TSort.each_strongly_connected_component(each_node, each_child, &block)
+ end
+
+ # The iterator version of the Bundler::TSort.strongly_connected_components method.
+ #
+ # The graph is represented by _each_node_ and _each_child_.
+ # _each_node_ should have +call+ method which yields for each node in the graph.
+ # _each_child_ should have +call+ method which takes a node argument and yields for each child node.
+ #
+ # g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # Bundler::TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
+ # #=> [4]
+ # # [2]
+ # # [3]
+ # # [1]
+ #
+ # g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
+ # each_node = lambda {|&b| g.each_key(&b) }
+ # each_child = lambda {|n, &b| g[n].each(&b) }
+ # Bundler::TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
+ # #=> [4]
+ # # [2, 3]
+ # # [1]
+ #
+ def self.each_strongly_connected_component(each_node, each_child) # :yields: nodes
+ return to_enum(__method__, each_node, each_child) unless block_given?
+
+ id_map = {}
+ stack = []
+ each_node.call {|node|
+ unless id_map.include? node
+ each_strongly_connected_component_from(node, each_child, id_map, stack) {|c|
+ yield c
+ }
+ end
+ }
+ nil
+ end
+
+ # Iterates over strongly connected component in the subgraph reachable from
+ # _node_.
+ #
+ # Return value is unspecified.
+ #
+ # #each_strongly_connected_component_from doesn't call #tsort_each_node.
+ #
+ # class G
+ # include Bundler::TSort
+ # def initialize(g)
+ # @g = g
+ # end
+ # def tsort_each_child(n, &b) @g[n].each(&b) end
+ # def tsort_each_node(&b) @g.each_key(&b) end
+ # end
+ #
+ # graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
+ # graph.each_strongly_connected_component_from(2) {|scc| p scc }
+ # #=> [4]
+ # # [2]
+ #
+ # graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
+ # graph.each_strongly_connected_component_from(2) {|scc| p scc }
+ # #=> [4]
+ # # [2, 3]
+ #
+ def each_strongly_connected_component_from(node, id_map={}, stack=[], &block) # :yields: nodes
+ Bundler::TSort.each_strongly_connected_component_from(node, method(:tsort_each_child), id_map, stack, &block)
+ end
+
+ # Iterates over strongly connected components in a graph.
+ # The graph is represented by _node_ and _each_child_.
+ #
+ # _node_ is the first node.
+ # _each_child_ should have +call+ method which takes a node argument
+ # and yields for each child node.
+ #
+ # Return value is unspecified.
+ #
+ # #Bundler::TSort.each_strongly_connected_component_from is a class method and
+ # it doesn't need a class to represent a graph which includes Bundler::TSort.
+ #
+ # graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
+ # each_child = lambda {|n, &b| graph[n].each(&b) }
+ # Bundler::TSort.each_strongly_connected_component_from(1, each_child) {|scc|
+ # p scc
+ # }
+ # #=> [4]
+ # # [2, 3]
+ # # [1]
+ #
+ def self.each_strongly_connected_component_from(node, each_child, id_map={}, stack=[]) # :yields: nodes
+ return to_enum(__method__, node, each_child, id_map, stack) unless block_given?
+
+ minimum_id = node_id = id_map[node] = id_map.size
+ stack_length = stack.length
+ stack << node
+
+ each_child.call(node) {|child|
+ if id_map.include? child
+ child_id = id_map[child]
+ minimum_id = child_id if child_id && child_id < minimum_id
+ else
+ sub_minimum_id =
+ each_strongly_connected_component_from(child, each_child, id_map, stack) {|c|
+ yield c
+ }
+ minimum_id = sub_minimum_id if sub_minimum_id < minimum_id
+ end
+ }
+
+ if node_id == minimum_id
+ component = stack.slice!(stack_length .. -1)
+ component.each {|n| id_map[n] = nil}
+ yield component
+ end
+
+ minimum_id
+ end
+
+ # Should be implemented by a extended class.
+ #
+ # #tsort_each_node is used to iterate for all nodes over a graph.
+ #
+ def tsort_each_node # :yields: node
+ raise NotImplementedError.new
+ end
+
+ # Should be implemented by a extended class.
+ #
+ # #tsort_each_child is used to iterate for child nodes of _node_.
+ #
+ def tsort_each_child(node) # :yields: child
+ raise NotImplementedError.new
+ end
+end
diff --git a/lib/bundler/vendor/uri/lib/uri.rb b/lib/bundler/vendor/uri/lib/uri.rb
index 00c01bd07b..976320f6bd 100644
--- a/lib/bundler/vendor/uri/lib/uri.rb
+++ b/lib/bundler/vendor/uri/lib/uri.rb
@@ -30,7 +30,7 @@
# class RSYNC < Generic
# DEFAULT_PORT = 873
# end
-# @@schemes['RSYNC'] = RSYNC
+# register_scheme 'RSYNC', RSYNC
# end
# #=> Bundler::URI::RSYNC
#
@@ -70,7 +70,6 @@
# - Bundler::URI::REGEXP - (in uri/common.rb)
# - Bundler::URI::REGEXP::PATTERN - (in uri/common.rb)
# - Bundler::URI::Util - (in uri/common.rb)
-# - Bundler::URI::Escape - (in uri/common.rb)
# - Bundler::URI::Error - (in uri/common.rb)
# - Bundler::URI::InvalidURIError - (in uri/common.rb)
# - Bundler::URI::InvalidComponentError - (in uri/common.rb)
@@ -86,7 +85,6 @@
# License::
# Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
# You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
module Bundler::URI
@@ -102,3 +100,5 @@ require_relative 'uri/https'
require_relative 'uri/ldap'
require_relative 'uri/ldaps'
require_relative 'uri/mailto'
+require_relative 'uri/ws'
+require_relative 'uri/wss'
diff --git a/lib/bundler/vendor/uri/lib/uri/common.rb b/lib/bundler/vendor/uri/lib/uri/common.rb
index cc1ab86c2f..914a4c7581 100644
--- a/lib/bundler/vendor/uri/lib/uri/common.rb
+++ b/lib/bundler/vendor/uri/lib/uri/common.rb
@@ -3,7 +3,6 @@
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
-# Revision:: $Id$
# License::
# You can redistribute it and/or modify it under the same term as Ruby.
#
@@ -14,9 +13,12 @@ require_relative "rfc2396_parser"
require_relative "rfc3986_parser"
module Bundler::URI
+ include RFC2396_REGEXP
+
REGEXP = RFC2396_REGEXP
Parser = RFC2396_Parser
RFC3986_PARSER = RFC3986_Parser.new
+ Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
# Bundler::URI::Parser.new
DEFAULT_PARSER = Parser.new
@@ -28,6 +30,7 @@ module Bundler::URI
DEFAULT_PARSER.regexp.each_pair do |sym, str|
const_set(sym, str)
end
+ Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
module Util # :nodoc:
def make_components_hash(klass, array_hash)
@@ -61,88 +64,44 @@ module Bundler::URI
module_function :make_components_hash
end
- # Module for escaping unsafe characters with codes.
- module Escape
- #
- # == Synopsis
- #
- # Bundler::URI.escape(str [, unsafe])
- #
- # == Args
- #
- # +str+::
- # String to replaces in.
- # +unsafe+::
- # Regexp that matches all symbols that must be replaced with codes.
- # By default uses <tt>UNSAFE</tt>.
- # When this argument is a String, it represents a character set.
- #
- # == Description
- #
- # Escapes the string, replacing all unsafe characters with codes.
- #
- # This method is obsolete and should not be used. Instead, use
- # CGI.escape, Bundler::URI.encode_www_form or Bundler::URI.encode_www_form_component
- # depending on your specific use case.
- #
- # == Usage
- #
- # require 'bundler/vendor/uri/lib/uri'
- #
- # enc_uri = Bundler::URI.escape("http://example.com/?a=\11\15")
- # # => "http://example.com/?a=%09%0D"
- #
- # Bundler::URI.unescape(enc_uri)
- # # => "http://example.com/?a=\t\r"
- #
- # Bundler::URI.escape("@?@!", "!?")
- # # => "@%3F@%21"
- #
- def escape(*arg)
- warn "Bundler::URI.escape is obsolete", uplevel: 1
- DEFAULT_PARSER.escape(*arg)
- end
- alias encode escape
- #
- # == Synopsis
- #
- # Bundler::URI.unescape(str)
- #
- # == Args
- #
- # +str+::
- # String to unescape.
- #
- # == Description
- #
- # This method is obsolete and should not be used. Instead, use
- # CGI.unescape, Bundler::URI.decode_www_form or Bundler::URI.decode_www_form_component
- # depending on your specific use case.
- #
- # == Usage
- #
- # require 'bundler/vendor/uri/lib/uri'
- #
- # enc_uri = Bundler::URI.escape("http://example.com/?a=\11\15")
- # # => "http://example.com/?a=%09%0D"
- #
- # Bundler::URI.unescape(enc_uri)
- # # => "http://example.com/?a=\t\r"
- #
- def unescape(*arg)
- warn "Bundler::URI.unescape is obsolete", uplevel: 1
- DEFAULT_PARSER.unescape(*arg)
- end
- alias decode unescape
- end # module Escape
+ module Schemes
+ end
+ private_constant :Schemes
- extend Escape
- include REGEXP
+ #
+ # Register the given +klass+ to be instantiated when parsing URLs with the given +scheme+.
+ # Note that currently only schemes which after .upcase are valid constant names
+ # can be registered (no -/+/. allowed).
+ #
+ def self.register_scheme(scheme, klass)
+ Schemes.const_set(scheme.to_s.upcase, klass)
+ end
- @@schemes = {}
# Returns a Hash of the defined schemes.
def self.scheme_list
- @@schemes
+ Schemes.constants.map { |name|
+ [name.to_s.upcase, Schemes.const_get(name)]
+ }.to_h
+ end
+
+ INITIAL_SCHEMES = scheme_list
+ private_constant :INITIAL_SCHEMES
+ Ractor.make_shareable(INITIAL_SCHEMES) if defined?(Ractor)
+
+ #
+ # Construct a Bundler::URI instance, using the scheme to detect the appropriate class
+ # from +Bundler::URI.scheme_list+.
+ #
+ def self.for(scheme, *arguments, default: Generic)
+ const_name = scheme.to_s.upcase
+
+ uri_class = INITIAL_SCHEMES[const_name]
+ uri_class ||= if /\A[A-Z]\w*\z/.match?(const_name) && Schemes.const_defined?(const_name, false)
+ Schemes.const_get(const_name, false)
+ end
+ uri_class ||= default
+
+ return uri_class.new(scheme, *arguments)
end
#
@@ -315,7 +274,7 @@ module Bundler::URI
#
# Returns a Regexp object which matches to Bundler::URI-like strings.
# The Regexp object returned by this method includes arbitrary
- # number of capture group (parentheses). Never rely on it's number.
+ # number of capture group (parentheses). Never rely on its number.
#
# == Usage
#
@@ -341,6 +300,7 @@ module Bundler::URI
256.times do |i|
TBLENCWWWCOMP_[-i.chr] = -('%%%02X' % i)
end
+ TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
TBLENCWWWCOMP_[' '] = '+'
TBLENCWWWCOMP_.freeze
TBLDECWWWCOMP_ = {} # :nodoc:
@@ -362,10 +322,37 @@ module Bundler::URI
# If +enc+ is given, convert +str+ to the encoding before percent encoding.
#
# This is an implementation of
- # http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.
+ # https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.
#
# See Bundler::URI.decode_www_form_component, Bundler::URI.encode_www_form.
def self.encode_www_form_component(str, enc=nil)
+ _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_, str, enc)
+ end
+
+ # Decodes given +str+ of URL-encoded form data.
+ #
+ # This decodes + to SP.
+ #
+ # See Bundler::URI.encode_www_form_component, Bundler::URI.decode_www_form.
+ def self.decode_www_form_component(str, enc=Encoding::UTF_8)
+ _decode_uri_component(/\+|%\h\h/, str, enc)
+ end
+
+ # Encodes +str+ using URL encoding
+ #
+ # This encodes SP to %20 instead of +.
+ def self.encode_uri_component(str, enc=nil)
+ _encode_uri_component(/[^*\-.0-9A-Z_a-z]/, TBLENCURICOMP_, str, enc)
+ end
+
+ # Decodes given +str+ of URL-encoded data.
+ #
+ # This does not decode + to SP.
+ def self.decode_uri_component(str, enc=Encoding::UTF_8)
+ _decode_uri_component(/%\h\h/, str, enc)
+ end
+
+ def self._encode_uri_component(regexp, table, str, enc)
str = str.to_s.dup
if str.encoding != Encoding::ASCII_8BIT
if enc && enc != Encoding::ASCII_8BIT
@@ -374,19 +361,16 @@ module Bundler::URI
end
str.force_encoding(Encoding::ASCII_8BIT)
end
- str.gsub!(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_)
+ str.gsub!(regexp, table)
str.force_encoding(Encoding::US_ASCII)
end
+ private_class_method :_encode_uri_component
- # Decodes given +str+ of URL-encoded form data.
- #
- # This decodes + to SP.
- #
- # See Bundler::URI.encode_www_form_component, Bundler::URI.decode_www_form.
- def self.decode_www_form_component(str, enc=Encoding::UTF_8)
- raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/ =~ str
- str.b.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
+ def self._decode_uri_component(regexp, str, enc)
+ raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
+ str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)
end
+ private_class_method :_decode_uri_component
# Generates URL-encoded form data from given +enum+.
#
@@ -403,7 +387,7 @@ module Bundler::URI
# This method doesn't handle files. When you send a file, use
# multipart/form-data.
#
- # This refers http://url.spec.whatwg.org/#concept-urlencoded-serializer
+ # This refers https://url.spec.whatwg.org/#concept-urlencoded-serializer
#
# Bundler::URI.encode_www_form([["q", "ruby"], ["lang", "en"]])
# #=> "q=ruby&lang=en"
@@ -716,6 +700,7 @@ module Bundler::URI
"utf-16"=>"utf-16le",
"utf-16le"=>"utf-16le",
} # :nodoc:
+ Ractor.make_shareable(WEB_ENCODINGS_) if defined?(Ractor)
# :nodoc:
# return encoding or nil
diff --git a/lib/bundler/vendor/uri/lib/uri/file.rb b/lib/bundler/vendor/uri/lib/uri/file.rb
index df42f8bcdd..8d75a9de7a 100644
--- a/lib/bundler/vendor/uri/lib/uri/file.rb
+++ b/lib/bundler/vendor/uri/lib/uri/file.rb
@@ -33,6 +33,9 @@ module Bundler::URI
# If an Array is used, the components must be passed in the
# order <code>[host, path]</code>.
#
+ # A path from e.g. the File class should be escaped before
+ # being passed.
+ #
# Examples:
#
# require 'bundler/vendor/uri/lib/uri'
@@ -44,6 +47,9 @@ module Bundler::URI
# :path => '/ruby/src'})
# uri2.to_s # => "file://host.example.com/ruby/src"
#
+ # uri3 = Bundler::URI::File.build({:path => Bundler::URI::escape('/path/my file.txt')})
+ # uri3.to_s # => "file:///path/my%20file.txt"
+ #
def self.build(args)
tmp = Util::make_components_hash(self, args)
super(tmp)
@@ -90,5 +96,5 @@ module Bundler::URI
end
end
- @@schemes['FILE'] = File
+ register_scheme 'FILE', File
end
diff --git a/lib/bundler/vendor/uri/lib/uri/ftp.rb b/lib/bundler/vendor/uri/lib/uri/ftp.rb
index ad39f57d7b..48b4c6718d 100644
--- a/lib/bundler/vendor/uri/lib/uri/ftp.rb
+++ b/lib/bundler/vendor/uri/lib/uri/ftp.rb
@@ -3,7 +3,6 @@
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -263,5 +262,6 @@ module Bundler::URI
return str
end
end
- @@schemes['FTP'] = FTP
+
+ register_scheme 'FTP', FTP
end
diff --git a/lib/bundler/vendor/uri/lib/uri/generic.rb b/lib/bundler/vendor/uri/lib/uri/generic.rb
index 56b09e1d7f..9ae6915826 100644
--- a/lib/bundler/vendor/uri/lib/uri/generic.rb
+++ b/lib/bundler/vendor/uri/lib/uri/generic.rb
@@ -4,7 +4,6 @@
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -565,16 +564,26 @@ module Bundler::URI
end
end
- # Returns the user component.
+ # Returns the user component (without Bundler::URI decoding).
def user
@user
end
- # Returns the password component.
+ # Returns the password component (without Bundler::URI decoding).
def password
@password
end
+ # Returns the user component after Bundler::URI decoding.
+ def decoded_user
+ Bundler::URI.decode_uri_component(@user) if @user
+ end
+
+ # Returns the password component after Bundler::URI decoding.
+ def decoded_password
+ Bundler::URI.decode_uri_component(@password) if @password
+ end
+
#
# Checks the host +v+ component for RFC2396 compliance
# and against the Bundler::URI::Parser Regexp for :HOST.
@@ -644,7 +653,7 @@ module Bundler::URI
#
def hostname
v = self.host
- /\A\[(.*)\]\z/ =~ v ? $1 : v
+ v&.start_with?('[') && v.end_with?(']') ? v[1..-2] : v
end
# Sets the host part of the Bundler::URI as the argument with brackets for IPv6 addresses.
@@ -660,7 +669,7 @@ module Bundler::URI
# it is wrapped with brackets.
#
def hostname=(v)
- v = "[#{v}]" if /\A\[.*\]\z/ !~ v && /:/ =~ v
+ v = "[#{v}]" if !(v&.start_with?('[') && v&.end_with?(']')) && v&.index(':')
self.host = v
end
@@ -1098,7 +1107,7 @@ module Bundler::URI
# # => "http://my.example.com/main.rbx?page=1"
#
def merge(oth)
- rel = parser.send(:convert_to_uri, oth)
+ rel = parser.__send__(:convert_to_uri, oth)
if rel.absolute?
#raise BadURIError, "both Bundler::URI are absolute" if absolute?
@@ -1183,7 +1192,7 @@ module Bundler::URI
# :stopdoc:
def route_from0(oth)
- oth = parser.send(:convert_to_uri, oth)
+ oth = parser.__send__(:convert_to_uri, oth)
if self.relative?
raise BadURIError,
"relative Bundler::URI: #{self}"
@@ -1291,7 +1300,7 @@ module Bundler::URI
# #=> #<Bundler::URI::Generic /main.rbx?page=1>
#
def route_to(oth)
- parser.send(:convert_to_uri, oth).route_from(self)
+ parser.__send__(:convert_to_uri, oth).route_from(self)
end
#
@@ -1405,7 +1414,7 @@ module Bundler::URI
# Returns an Array of the components defined from the COMPONENT Array.
def component_ary
component.collect do |x|
- self.send(x)
+ self.__send__(x)
end
end
protected :component_ary
@@ -1430,7 +1439,7 @@ module Bundler::URI
def select(*components)
components.collect do |c|
if component.include?(c)
- self.send(c)
+ self.__send__(c)
else
raise ArgumentError,
"expected of components of #{self.class} (#{self.class.component.join(', ')})"
@@ -1515,9 +1524,19 @@ module Bundler::URI
proxy_uri = env["CGI_#{name.upcase}"]
end
elsif name == 'http_proxy'
- unless proxy_uri = env[name]
- if proxy_uri = env[name.upcase]
- warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1
+ if RUBY_ENGINE == 'jruby' && p_addr = ENV_JAVA['http.proxyHost']
+ p_port = ENV_JAVA['http.proxyPort']
+ if p_user = ENV_JAVA['http.proxyUser']
+ p_pass = ENV_JAVA['http.proxyPass']
+ proxy_uri = "http://#{p_user}:#{p_pass}@#{p_addr}:#{p_port}"
+ else
+ proxy_uri = "http://#{p_addr}:#{p_port}"
+ end
+ else
+ unless proxy_uri = env[name]
+ if proxy_uri = env[name.upcase]
+ warn 'The environment variable HTTP_PROXY is discouraged. Use http_proxy.', uplevel: 1
+ end
end
end
else
diff --git a/lib/bundler/vendor/uri/lib/uri/http.rb b/lib/bundler/vendor/uri/lib/uri/http.rb
index b6ca1c51de..2c44810644 100644
--- a/lib/bundler/vendor/uri/lib/uri/http.rb
+++ b/lib/bundler/vendor/uri/lib/uri/http.rb
@@ -3,7 +3,6 @@
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -81,8 +80,46 @@ module Bundler::URI
url = @query ? "#@path?#@query" : @path.dup
url.start_with?(?/.freeze) ? url : ?/ + url
end
- end
- @@schemes['HTTP'] = HTTP
+ #
+ # == Description
+ #
+ # Returns the authority for an HTTP uri, as defined in
+ # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.
+ #
+ #
+ # Example:
+ #
+ # Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com"
+ # Bundler::URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000"
+ # Bundler::URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com"
+ #
+ def authority
+ if port == default_port
+ host
+ else
+ "#{host}:#{port}"
+ end
+ end
+
+ #
+ # == Description
+ #
+ # Returns the origin for an HTTP uri, as defined in
+ # https://datatracker.ietf.org/doc/html/rfc6454.
+ #
+ #
+ # Example:
+ #
+ # Bundler::URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com"
+ # Bundler::URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000"
+ # Bundler::URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com"
+ # Bundler::URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
+ #
+ def origin
+ "#{scheme}://#{authority}"
+ end
+ end
+ register_scheme 'HTTP', HTTP
end
diff --git a/lib/bundler/vendor/uri/lib/uri/https.rb b/lib/bundler/vendor/uri/lib/uri/https.rb
index 78dc6bf532..e4556e3ecb 100644
--- a/lib/bundler/vendor/uri/lib/uri/https.rb
+++ b/lib/bundler/vendor/uri/lib/uri/https.rb
@@ -3,7 +3,6 @@
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -19,5 +18,6 @@ module Bundler::URI
# A Default port of 443 for Bundler::URI::HTTPS
DEFAULT_PORT = 443
end
- @@schemes['HTTPS'] = HTTPS
+
+ register_scheme 'HTTPS', HTTPS
end
diff --git a/lib/bundler/vendor/uri/lib/uri/ldap.rb b/lib/bundler/vendor/uri/lib/uri/ldap.rb
index b707bedb97..9811b6e2f5 100644
--- a/lib/bundler/vendor/uri/lib/uri/ldap.rb
+++ b/lib/bundler/vendor/uri/lib/uri/ldap.rb
@@ -7,7 +7,6 @@
# License::
# Bundler::URI::LDAP is copyrighted free software by Takaaki Tateishi and Akira Yamada.
# You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -119,6 +118,7 @@ module Bundler::URI
# Private method to cleanup +dn+ from using the +path+ component attribute.
def parse_dn
+ raise InvalidURIError, 'bad LDAP URL' unless @path
@dn = @path[1..-1]
end
private :parse_dn
@@ -257,5 +257,5 @@ module Bundler::URI
end
end
- @@schemes['LDAP'] = LDAP
+ register_scheme 'LDAP', LDAP
end
diff --git a/lib/bundler/vendor/uri/lib/uri/ldaps.rb b/lib/bundler/vendor/uri/lib/uri/ldaps.rb
index 0af35bb16b..c786168450 100644
--- a/lib/bundler/vendor/uri/lib/uri/ldaps.rb
+++ b/lib/bundler/vendor/uri/lib/uri/ldaps.rb
@@ -17,5 +17,6 @@ module Bundler::URI
# A Default port of 636 for Bundler::URI::LDAPS
DEFAULT_PORT = 636
end
- @@schemes['LDAPS'] = LDAPS
+
+ register_scheme 'LDAPS', LDAPS
end
diff --git a/lib/bundler/vendor/uri/lib/uri/mailto.rb b/lib/bundler/vendor/uri/lib/uri/mailto.rb
index 5b2a4765c8..ff2e30be86 100644
--- a/lib/bundler/vendor/uri/lib/uri/mailto.rb
+++ b/lib/bundler/vendor/uri/lib/uri/mailto.rb
@@ -3,7 +3,6 @@
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# License:: You can redistribute it and/or modify it under the same term as Ruby.
-# Revision:: $Id$
#
# See Bundler::URI for general documentation
#
@@ -16,7 +15,7 @@ module Bundler::URI
# RFC6068, the mailto URL scheme.
#
class MailTo < Generic
- include REGEXP
+ include RFC2396_REGEXP
# A Default port of nil for Bundler::URI::MailTo.
DEFAULT_PORT = nil
@@ -290,5 +289,5 @@ module Bundler::URI
alias to_rfc822text to_mailtext
end
- @@schemes['MAILTO'] = MailTo
+ register_scheme 'MAILTO', MailTo
end
diff --git a/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
index a0d62ede64..09c22c9906 100644
--- a/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
+++ b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
@@ -3,7 +3,6 @@
# = uri/common.rb
#
# Author:: Akira Yamada <akira@ruby-lang.org>
-# Revision:: $Id$
# License::
# You can redistribute it and/or modify it under the same term as Ruby.
#
@@ -117,7 +116,7 @@ module Bundler::URI
# See also Bundler::URI::Parser.initialize_regexp.
attr_reader :regexp
- # Returns a split Bundler::URI against regexp[:ABS_URI].
+ # Returns a split Bundler::URI against +regexp[:ABS_URI]+.
def split(uri)
case uri
when ''
@@ -208,21 +207,9 @@ module Bundler::URI
# #=> #<Bundler::URI::LDAP ldap://ldap.example.com/dc=example?user=john>
#
def parse(uri)
- scheme, userinfo, host, port,
- registry, path, opaque, query, fragment = self.split(uri)
-
- if scheme && Bundler::URI.scheme_list.include?(scheme.upcase)
- Bundler::URI.scheme_list[scheme.upcase].new(scheme, userinfo, host, port,
- registry, path, opaque, query,
- fragment, self)
- else
- Generic.new(scheme, userinfo, host, port,
- registry, path, opaque, query,
- fragment, self)
- end
+ Bundler::URI.for(*self.split(uri), self)
end
-
#
# == Args
#
@@ -270,8 +257,8 @@ module Bundler::URI
end
end
- # Returns Regexp that is default self.regexp[:ABS_URI_REF],
- # unless +schemes+ is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI].
+ # Returns Regexp that is default +self.regexp[:ABS_URI_REF]+,
+ # unless +schemes+ is provided. Then it is a Regexp.union with +self.pattern[:X_ABS_URI]+.
def make_regexp(schemes = nil)
unless schemes
@regexp[:ABS_URI_REF]
@@ -290,7 +277,7 @@ module Bundler::URI
# +str+::
# String to make safe
# +unsafe+::
- # Regexp to apply. Defaults to self.regexp[:UNSAFE]
+ # Regexp to apply. Defaults to +self.regexp[:UNSAFE]+
#
# == Description
#
@@ -322,7 +309,7 @@ module Bundler::URI
# +str+::
# String to remove escapes from
# +escaped+::
- # Regexp to apply. Defaults to self.regexp[:ESCAPED]
+ # Regexp to apply. Defaults to +self.regexp[:ESCAPED]+
#
# == Description
#
@@ -335,8 +322,14 @@ module Bundler::URI
end
@@to_s = Kernel.instance_method(:to_s)
- def inspect
- @@to_s.bind_call(self)
+ if @@to_s.respond_to?(:bind_call)
+ def inspect
+ @@to_s.bind_call(self)
+ end
+ else
+ def inspect
+ @@to_s.bind(self).call
+ end
end
private
@@ -504,8 +497,8 @@ module Bundler::URI
ret = {}
# for Bundler::URI::split
- ret[:ABS_URI] = Regexp.new('\A\s*' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
- ret[:REL_URI] = Regexp.new('\A\s*' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
+ ret[:ABS_URI] = Regexp.new('\A\s*+' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
+ ret[:REL_URI] = Regexp.new('\A\s*+' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
# for Bundler::URI::extract
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
diff --git a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
index 07ef4391c0..a85511c146 100644
--- a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
+++ b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
@@ -2,9 +2,8 @@
module Bundler::URI
class RFC3986_Parser # :nodoc:
# Bundler::URI defined in RFC3986
- # this regexp is modified not to host is not empty string
- RFC3986_URI = /\A(?<Bundler::URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
- RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+)\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])+)(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
+ RFC3986_URI = /\A(?<Bundler::URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*+):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+))(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
+ RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])++)(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
attr_reader :regexp
def initialize
@@ -69,18 +68,7 @@ module Bundler::URI
end
def parse(uri) # :nodoc:
- scheme, userinfo, host, port,
- registry, path, opaque, query, fragment = self.split(uri)
- scheme_list = Bundler::URI.scheme_list
- if scheme && scheme_list.include?(uc = scheme.upcase)
- scheme_list[uc].new(scheme, userinfo, host, port,
- registry, path, opaque, query,
- fragment, self)
- else
- Generic.new(scheme, userinfo, host, port,
- registry, path, opaque, query,
- fragment, self)
- end
+ Bundler::URI.for(*self.split(uri), self)
end
@@ -90,8 +78,14 @@ module Bundler::URI
end
@@to_s = Kernel.instance_method(:to_s)
- def inspect
- @@to_s.bind_call(self)
+ if @@to_s.respond_to?(:bind_call)
+ def inspect
+ @@to_s.bind_call(self)
+ end
+ else
+ def inspect
+ @@to_s.bind(self).call
+ end
end
private
@@ -106,7 +100,7 @@ module Bundler::URI
QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
OPAQUE: /\A(?:[^\/].*)?\z/,
- PORT: /\A[\x09\x0a\x0c\x0d ]*\d*[\x09\x0a\x0c\x0d ]*\z/,
+ PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/,
}
end
diff --git a/lib/bundler/vendor/uri/lib/uri/version.rb b/lib/bundler/vendor/uri/lib/uri/version.rb
index 56177ef194..84b08eee30 100644
--- a/lib/bundler/vendor/uri/lib/uri/version.rb
+++ b/lib/bundler/vendor/uri/lib/uri/version.rb
@@ -1,6 +1,6 @@
module Bundler::URI
# :stopdoc:
- VERSION_CODE = '001000'.freeze
+ VERSION_CODE = '001202'.freeze
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
# :startdoc:
end
diff --git a/lib/bundler/vendor/uri/lib/uri/ws.rb b/lib/bundler/vendor/uri/lib/uri/ws.rb
new file mode 100644
index 0000000000..10ae6f5834
--- /dev/null
+++ b/lib/bundler/vendor/uri/lib/uri/ws.rb
@@ -0,0 +1,83 @@
+# frozen_string_literal: false
+# = uri/ws.rb
+#
+# Author:: Matt Muller <mamuller@amazon.com>
+# License:: You can redistribute it and/or modify it under the same term as Ruby.
+#
+# See Bundler::URI for general documentation
+#
+
+require_relative 'generic'
+
+module Bundler::URI
+
+ #
+ # The syntax of WS URIs is defined in RFC6455 section 3.
+ #
+ # Note that the Ruby Bundler::URI library allows WS URLs containing usernames and
+ # passwords. This is not legal as per the RFC, but used to be
+ # supported in Internet Explorer 5 and 6, before the MS04-004 security
+ # update. See <URL:http://support.microsoft.com/kb/834489>.
+ #
+ class WS < Generic
+ # A Default port of 80 for Bundler::URI::WS.
+ DEFAULT_PORT = 80
+
+ # An Array of the available components for Bundler::URI::WS.
+ COMPONENT = %i[
+ scheme
+ userinfo host port
+ path
+ query
+ ].freeze
+
+ #
+ # == Description
+ #
+ # Creates a new Bundler::URI::WS object from components, with syntax checking.
+ #
+ # The components accepted are userinfo, host, port, path, and query.
+ #
+ # The components should be provided either as an Array, or as a Hash
+ # with keys formed by preceding the component names with a colon.
+ #
+ # If an Array is used, the components must be passed in the
+ # order <code>[userinfo, host, port, path, query]</code>.
+ #
+ # Example:
+ #
+ # uri = Bundler::URI::WS.build(host: 'www.example.com', path: '/foo/bar')
+ #
+ # uri = Bundler::URI::WS.build([nil, "www.example.com", nil, "/path", "query"])
+ #
+ # Currently, if passed userinfo components this method generates
+ # invalid WS URIs as per RFC 1738.
+ #
+ def self.build(args)
+ tmp = Util.make_components_hash(self, args)
+ super(tmp)
+ end
+
+ #
+ # == Description
+ #
+ # Returns the full path for a WS Bundler::URI, as required by Net::HTTP::Get.
+ #
+ # If the Bundler::URI contains a query, the full path is Bundler::URI#path + '?' + Bundler::URI#query.
+ # Otherwise, the path is simply Bundler::URI#path.
+ #
+ # Example:
+ #
+ # uri = Bundler::URI::WS.build(path: '/foo/bar', query: 'test=true')
+ # uri.request_uri # => "/foo/bar?test=true"
+ #
+ def request_uri
+ return unless @path
+
+ url = @query ? "#@path?#@query" : @path.dup
+ url.start_with?(?/.freeze) ? url : ?/ + url
+ end
+ end
+
+ register_scheme 'WS', WS
+end
diff --git a/lib/bundler/vendor/uri/lib/uri/wss.rb b/lib/bundler/vendor/uri/lib/uri/wss.rb
new file mode 100644
index 0000000000..e8db1ceabf
--- /dev/null
+++ b/lib/bundler/vendor/uri/lib/uri/wss.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: false
+# = uri/wss.rb
+#
+# Author:: Matt Muller <mamuller@amazon.com>
+# License:: You can redistribute it and/or modify it under the same term as Ruby.
+#
+# See Bundler::URI for general documentation
+#
+
+require_relative 'ws'
+
+module Bundler::URI
+
+ # The default port for WSS URIs is 443, and the scheme is 'wss:' rather
+ # than 'ws:'. Other than that, WSS URIs are identical to WS URIs;
+ # see Bundler::URI::WS.
+ class WSS < WS
+ # A Default port of 443 for Bundler::URI::WSS
+ DEFAULT_PORT = 443
+ end
+
+ register_scheme 'WSS', WSS
+end
diff --git a/lib/bundler/vendored_molinillo.rb b/lib/bundler/vendored_molinillo.rb
deleted file mode 100644
index d1976f5cb4..0000000000
--- a/lib/bundler/vendored_molinillo.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler; end
-require_relative "vendor/molinillo/lib/molinillo"
diff --git a/lib/bundler/vendored_persistent.rb b/lib/bundler/vendored_persistent.rb
index 045a761dac..e29f27cdfd 100644
--- a/lib/bundler/vendored_persistent.rb
+++ b/lib/bundler/vendored_persistent.rb
@@ -1,12 +1,5 @@
# frozen_string_literal: true
-# We forcibly require OpenSSL, because net/http/persistent will only autoload
-# it. On some Rubies, autoload fails but explicit require succeeds.
-begin
- require "openssl"
-rescue LoadError
- # some Ruby builds don't have OpenSSL
-end
module Bundler
module Persistent
module Net
@@ -18,37 +11,5 @@ end
require_relative "vendor/net-http-persistent/lib/net/http/persistent"
module Bundler
- class PersistentHTTP < Persistent::Net::HTTP::Persistent
- def connection_for(uri)
- super(uri) do |connection|
- result = yield connection
- warn_old_tls_version_rubygems_connection(uri, connection)
- result
- end
- end
-
- def warn_old_tls_version_rubygems_connection(uri, connection)
- return unless connection.http.use_ssl?
- return unless (uri.host || "").end_with?("rubygems.org")
-
- socket = connection.instance_variable_get(:@socket)
- return unless socket
- socket_io = socket.io
- return unless socket_io.respond_to?(:ssl_version)
- ssl_version = socket_io.ssl_version
-
- case ssl_version
- when /TLSv([\d\.]+)/
- version = Gem::Version.new($1)
- if version < Gem::Version.new("1.2")
- Bundler.ui.warn \
- "Warning: Your Ruby version is compiled against a copy of OpenSSL that is very old. " \
- "Starting in January 2018, RubyGems.org will refuse connection requests from these " \
- "very old versions of OpenSSL. If you will need to continue installing gems after " \
- "January 2018, please follow this guide to upgrade: http://ruby.to/tls-outdated.",
- :wrap => true
- end
- end
- end
- end
+ PersistentHTTP = Persistent::Net::HTTP::Persistent
end
diff --git a/lib/bundler/vendored_pub_grub.rb b/lib/bundler/vendored_pub_grub.rb
new file mode 100644
index 0000000000..b36a996b29
--- /dev/null
+++ b/lib/bundler/vendored_pub_grub.rb
@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+
+module Bundler; end
+require_relative "vendor/pub_grub/lib/pub_grub"
diff --git a/lib/bundler/vendored_tsort.rb b/lib/bundler/vendored_tsort.rb
new file mode 100644
index 0000000000..38aed0b5de
--- /dev/null
+++ b/lib/bundler/vendored_tsort.rb
@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+
+module Bundler; end
+require_relative "vendor/tsort/lib/tsort"
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 06d6a0f255..8ef7be935b 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -1,9 +1,13 @@
# frozen_string_literal: false
module Bundler
- VERSION = "2.1.1".freeze
+ VERSION = "2.4.19".freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i
end
+
+ def self.gem_version
+ @gem_version ||= Gem::Version.create(VERSION)
+ end
end
diff --git a/lib/bundler/version_ranges.rb b/lib/bundler/version_ranges.rb
deleted file mode 100644
index 12a956d6a0..0000000000
--- a/lib/bundler/version_ranges.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: true
-
-module Bundler
- module VersionRanges
- NEq = Struct.new(:version)
- ReqR = Struct.new(:left, :right)
- class ReqR
- Endpoint = Struct.new(:version, :inclusive) do
- def <=>(other)
- if version.equal?(INFINITY)
- return 0 if other.version.equal?(INFINITY)
- return 1
- elsif other.version.equal?(INFINITY)
- return -1
- end
-
- comp = version <=> other.version
- return comp unless comp.zero?
-
- if inclusive && !other.inclusive
- 1
- elsif !inclusive && other.inclusive
- -1
- else
- 0
- end
- end
- end
-
- def to_s
- "#{left.inclusive ? "[" : "("}#{left.version}, #{right.version}#{right.inclusive ? "]" : ")"}"
- end
- INFINITY = begin
- inf = Object.new
- def inf.to_s
- "∞"
- end
- def inf.<=>(other)
- return 0 if other.equal?(self)
- 1
- end
- inf.freeze
- end
- ZERO = Gem::Version.new("0.a")
-
- def cover?(v)
- return false if left.inclusive && left.version > v
- return false if !left.inclusive && left.version >= v
-
- if right.version != INFINITY
- return false if right.inclusive && right.version < v
- return false if !right.inclusive && right.version <= v
- end
-
- true
- end
-
- def empty?
- left.version == right.version && !(left.inclusive && right.inclusive)
- end
-
- def single?
- left.version == right.version
- end
-
- def <=>(other)
- return -1 if other.equal?(INFINITY)
-
- comp = left <=> other.left
- return comp unless comp.zero?
-
- right <=> other.right
- end
-
- UNIVERSAL = ReqR.new(ReqR::Endpoint.new(Gem::Version.new("0.a"), true), ReqR::Endpoint.new(ReqR::INFINITY, false)).freeze
- end
-
- def self.for_many(requirements)
- requirements = requirements.map(&:requirements).flatten(1).map {|r| r.join(" ") }
- requirements << ">= 0.a" if requirements.empty?
- requirement = Gem::Requirement.new(requirements)
- self.for(requirement)
- end
-
- def self.for(requirement)
- ranges = requirement.requirements.map do |op, v|
- case op
- when "=" then ReqR.new(ReqR::Endpoint.new(v, true), ReqR::Endpoint.new(v, true))
- when "!=" then NEq.new(v)
- when ">=" then ReqR.new(ReqR::Endpoint.new(v, true), ReqR::Endpoint.new(ReqR::INFINITY, false))
- when ">" then ReqR.new(ReqR::Endpoint.new(v, false), ReqR::Endpoint.new(ReqR::INFINITY, false))
- when "<" then ReqR.new(ReqR::Endpoint.new(ReqR::ZERO, true), ReqR::Endpoint.new(v, false))
- when "<=" then ReqR.new(ReqR::Endpoint.new(ReqR::ZERO, true), ReqR::Endpoint.new(v, true))
- when "~>" then ReqR.new(ReqR::Endpoint.new(v, true), ReqR::Endpoint.new(v.bump, false))
- else raise "unknown version op #{op} in requirement #{requirement}"
- end
- end.uniq
- ranges, neqs = ranges.partition {|r| !r.is_a?(NEq) }
-
- [ranges.sort, neqs.map(&:version)]
- end
-
- def self.empty?(ranges, neqs)
- !ranges.reduce(ReqR::UNIVERSAL) do |last_range, curr_range|
- next false unless last_range
- next false if curr_range.single? && neqs.include?(curr_range.left.version)
- next curr_range if last_range.right.version == ReqR::INFINITY
- case last_range.right.version <=> curr_range.left.version
- # higher
- when 1 then next ReqR.new(curr_range.left, last_range.right)
- # equal
- when 0
- if last_range.right.inclusive && curr_range.left.inclusive && !neqs.include?(curr_range.left.version)
- ReqR.new(curr_range.left, [curr_range.right, last_range.right].max)
- end
- # lower
- when -1 then next false
- end
- end
- end
- end
-end
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
index 3471654b43..3ebd6f01db 100644
--- a/lib/bundler/worker.rb
+++ b/lib/bundler/worker.rb
@@ -21,12 +21,12 @@ module Bundler
# @param func [Proc] job to run in inside the worker pool
def initialize(size, name, func)
@name = name
- @request_queue = Queue.new
- @response_queue = Queue.new
+ @request_queue = Thread::Queue.new
+ @response_queue = Thread::Queue.new
@func = func
@size = size
@threads = nil
- SharedHelpers.trap("INT") { abort_threads }
+ @previous_interrupt_handler = nil
end
# Enqueue a request to be executed in the worker pool
@@ -48,7 +48,7 @@ module Bundler
stop_threads
end
- private
+ private
def process_queue(i)
loop do
@@ -68,13 +68,16 @@ module Bundler
# so as worker threads after retrieving it, shut themselves down
def stop_threads
return unless @threads
+
@threads.each { @request_queue.enq POISON }
@threads.each(&:join)
+
+ remove_interrupt_handler
+
@threads = nil
end
def abort_threads
- return unless @threads
Bundler.ui.debug("\n#{caller.join("\n")}")
@threads.each(&:exit)
exit 1
@@ -84,21 +87,31 @@ module Bundler
creation_errors = []
@threads = Array.new(@size) do |i|
- begin
- Thread.start { process_queue(i) }.tap do |thread|
- thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
- end
- rescue ThreadError => e
- creation_errors << e
- nil
+ Thread.start { process_queue(i) }.tap do |thread|
+ thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
end
+ rescue ThreadError => e
+ creation_errors << e
+ nil
end.compact
+ add_interrupt_handler unless @threads.empty?
+
return if creation_errors.empty?
message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}"
raise ThreadCreationError, message if @threads.empty?
Bundler.ui.info message
end
+
+ def add_interrupt_handler
+ @previous_interrupt_handler = trap("INT") { abort_threads }
+ end
+
+ def remove_interrupt_handler
+ return unless @previous_interrupt_handler
+
+ trap "INT", @previous_interrupt_handler
+ end
end
end
diff --git a/lib/bundler/yaml_serializer.rb b/lib/bundler/yaml_serializer.rb
index 374b3bb5e3..d5ecbd4aef 100644
--- a/lib/bundler/yaml_serializer.rb
+++ b/lib/bundler/yaml_serializer.rb
@@ -3,7 +3,7 @@
module Bundler
# A stub yaml serializer that can handle only hashes and strings (as of now).
module YAMLSerializer
- module_function
+ module_function
def dump(hash)
yaml = String.new("---")
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 4f16f309da..7dc3a64941 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -162,7 +162,7 @@
# cgi.has_key?('field_name')
# cgi.include?('field_name')
#
-# CAUTION! cgi['field_name'] returned an Array with the old
+# CAUTION! <code>cgi['field_name']</code> returned an Array with the old
# cgi.rb(included in Ruby 1.6)
#
# === Get form values as hash
@@ -288,6 +288,7 @@
#
class CGI
+ VERSION = "0.3.7"
end
require 'cgi/core'
diff --git a/lib/cgi/cgi.gemspec b/lib/cgi/cgi.gemspec
index 403d31c978..381c55a5ca 100644
--- a/lib/cgi/cgi.gemspec
+++ b/lib/cgi/cgi.gemspec
@@ -1,27 +1,42 @@
-begin
- require_relative "lib/cgi/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "cgi"
- spec.version = CGI::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Support for the Common Gateway Interface protocol.}
spec.description = %q{Support for the Common Gateway Interface protocol.}
spec.homepage = "https://github.com/ruby/cgi"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ spec.required_ruby_version = ">= 2.5.0"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.executables = []
+
+ spec.files = [
+ "LICENSE.txt",
+ "README.md",
+ *Dir["lib{.rb,/**/*.rb}", "bin/*"] ]
+
spec.require_paths = ["lib"]
+
+ if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
+ spec.platform = 'java'
+ spec.require_paths << "ext/java/org/jruby/ext/cgi/escape/lib"
+ spec.files += Dir["ext/java/**/*.{rb}", "lib/cgi/escape.jar"]
+ else
+ spec.files += Dir["ext/cgi/**/*.{rb,c,h,sh}", "ext/cgi/escape/depend", "lib/cgi/escape.so"]
+ spec.extensions = ["ext/cgi/escape/extconf.rb"]
+ end
end
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index ae9ab58ede..1c4ef6a600 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -40,6 +40,10 @@ class CGI
class Cookie < Array
@@accept_charset="UTF-8" unless defined?(@@accept_charset)
+ TOKEN_RE = %r"\A[[!-~]&&[^()<>@,;:\\\"/?=\[\]{}]]+\z"
+ PATH_VALUE_RE = %r"\A[[ -~]&&[^;]]*\z"
+ DOMAIN_VALUE_RE = %r"\A\.?(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z"
+
# Create a new CGI::Cookie object.
#
# :call-seq:
@@ -72,8 +76,8 @@ class CGI
@domain = nil
@expires = nil
if name.kind_of?(String)
- @name = name
- @path = (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
+ self.name = name
+ self.path = (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
@secure = false
@httponly = false
return super(value)
@@ -84,11 +88,11 @@ class CGI
raise ArgumentError, "`name' required"
end
- @name = options["name"]
+ self.name = options["name"]
value = Array(options["value"])
# simple support for IE
- @path = options["path"] || (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
- @domain = options["domain"]
+ self.path = options["path"] || (%r|\A(.*/)| =~ ENV["SCRIPT_NAME"] ? $1 : "")
+ self.domain = options["domain"]
@expires = options["expires"]
@secure = options["secure"] == true
@httponly = options["httponly"] == true
@@ -97,11 +101,35 @@ class CGI
end
# Name of this cookie, as a +String+
- attr_accessor :name
+ attr_reader :name
+ # Set name of this cookie
+ def name=(str)
+ if str and !TOKEN_RE.match?(str)
+ raise ArgumentError, "invalid name: #{str.dump}"
+ end
+ @name = str
+ end
+
# Path for which this cookie applies, as a +String+
- attr_accessor :path
+ attr_reader :path
+ # Set path for which this cookie applies
+ def path=(str)
+ if str and !PATH_VALUE_RE.match?(str)
+ raise ArgumentError, "invalid path: #{str.dump}"
+ end
+ @path = str
+ end
+
# Domain for which this cookie applies, as a +String+
- attr_accessor :domain
+ attr_reader :domain
+ # Set domain for which this cookie applies
+ def domain=(str)
+ if str and ((str = str.b).bytesize > 255 or !DOMAIN_VALUE_RE.match?(str))
+ raise ArgumentError, "invalid domain: #{str.dump}"
+ end
+ @domain = str
+ end
+
# Time at which this cookie expires, as a +Time+
attr_accessor :expires
# True if this cookie is secure; false otherwise
@@ -159,13 +187,13 @@ class CGI
raw_cookie.split(/;\s?/).each do |pairs|
name, values = pairs.split('=',2)
next unless name and values
- name = CGI.unescape(name)
values ||= ""
values = values.split('&').collect{|v| CGI.unescape(v,@@accept_charset) }
if cookies.has_key?(name)
- values = cookies[name].value + values
+ cookies[name].concat(values)
+ else
+ cookies[name] = Cookie.new(name, *values)
end
- cookies[name] = Cookie.new(name, *values)
end
cookies
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index bec76e0749..62e606837a 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -188,17 +188,28 @@ class CGI
# Using #header with the HTML5 tag maker will create a <header> element.
alias :header :http_header
+ def _no_crlf_check(str)
+ if str
+ str = str.to_s
+ raise "A HTTP status or header field must not include CR and LF" if str =~ /[\r\n]/
+ str
+ else
+ nil
+ end
+ end
+ private :_no_crlf_check
+
def _header_for_string(content_type) #:nodoc:
buf = ''.dup
if nph?()
- buf << "#{$CGI_ENV['SERVER_PROTOCOL'] || 'HTTP/1.0'} 200 OK#{EOL}"
+ buf << "#{_no_crlf_check($CGI_ENV['SERVER_PROTOCOL']) || 'HTTP/1.0'} 200 OK#{EOL}"
buf << "Date: #{CGI.rfc1123_date(Time.now)}#{EOL}"
- buf << "Server: #{$CGI_ENV['SERVER_SOFTWARE']}#{EOL}"
+ buf << "Server: #{_no_crlf_check($CGI_ENV['SERVER_SOFTWARE'])}#{EOL}"
buf << "Connection: close#{EOL}"
end
- buf << "Content-Type: #{content_type}#{EOL}"
+ buf << "Content-Type: #{_no_crlf_check(content_type)}#{EOL}"
if @output_cookies
- @output_cookies.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" }
+ @output_cookies.each {|cookie| buf << "Set-Cookie: #{_no_crlf_check(cookie)}#{EOL}" }
end
return buf
end # _header_for_string
@@ -213,9 +224,9 @@ class CGI
## NPH
options.delete('nph') if defined?(MOD_RUBY)
if options.delete('nph') || nph?()
- protocol = $CGI_ENV['SERVER_PROTOCOL'] || 'HTTP/1.0'
+ protocol = _no_crlf_check($CGI_ENV['SERVER_PROTOCOL']) || 'HTTP/1.0'
status = options.delete('status')
- status = HTTP_STATUS[status] || status || '200 OK'
+ status = HTTP_STATUS[status] || _no_crlf_check(status) || '200 OK'
buf << "#{protocol} #{status}#{EOL}"
buf << "Date: #{CGI.rfc1123_date(Time.now)}#{EOL}"
options['server'] ||= $CGI_ENV['SERVER_SOFTWARE'] || ''
@@ -223,38 +234,38 @@ class CGI
end
## common headers
status = options.delete('status')
- buf << "Status: #{HTTP_STATUS[status] || status}#{EOL}" if status
+ buf << "Status: #{HTTP_STATUS[status] || _no_crlf_check(status)}#{EOL}" if status
server = options.delete('server')
- buf << "Server: #{server}#{EOL}" if server
+ buf << "Server: #{_no_crlf_check(server)}#{EOL}" if server
connection = options.delete('connection')
- buf << "Connection: #{connection}#{EOL}" if connection
+ buf << "Connection: #{_no_crlf_check(connection)}#{EOL}" if connection
type = options.delete('type')
- buf << "Content-Type: #{type}#{EOL}" #if type
+ buf << "Content-Type: #{_no_crlf_check(type)}#{EOL}" #if type
length = options.delete('length')
- buf << "Content-Length: #{length}#{EOL}" if length
+ buf << "Content-Length: #{_no_crlf_check(length)}#{EOL}" if length
language = options.delete('language')
- buf << "Content-Language: #{language}#{EOL}" if language
+ buf << "Content-Language: #{_no_crlf_check(language)}#{EOL}" if language
expires = options.delete('expires')
buf << "Expires: #{CGI.rfc1123_date(expires)}#{EOL}" if expires
## cookie
if cookie = options.delete('cookie')
case cookie
when String, Cookie
- buf << "Set-Cookie: #{cookie}#{EOL}"
+ buf << "Set-Cookie: #{_no_crlf_check(cookie)}#{EOL}"
when Array
arr = cookie
- arr.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
+ arr.each {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" }
when Hash
hash = cookie
- hash.each_value {|c| buf << "Set-Cookie: #{c}#{EOL}" }
+ hash.each_value {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" }
end
end
if @output_cookies
- @output_cookies.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
+ @output_cookies.each {|c| buf << "Set-Cookie: #{_no_crlf_check(c)}#{EOL}" }
end
## other headers
options.each do |key, value|
- buf << "#{key}: #{value}#{EOL}"
+ buf << "#{_no_crlf_check(key)}: #{_no_crlf_check(value)}#{EOL}"
end
return buf
end # _header_for_hash
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 29e7b3ece3..70c7ebca42 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -189,6 +189,47 @@ class CGI
end
private :create_new_id
+
+ # Create a new file to store the session data.
+ #
+ # This file will be created if it does not exist, or opened if it
+ # does.
+ #
+ # This path is generated under _tmpdir_ from _prefix_, the
+ # digested session id, and _suffix_.
+ #
+ # +option+ is a hash of options for the initializer. The
+ # following options are recognised:
+ #
+ # tmpdir:: the directory to use for storing the FileStore
+ # file. Defaults to Dir::tmpdir (generally "/tmp"
+ # on Unix systems).
+ # prefix:: the prefix to add to the session id when generating
+ # the filename for this session's FileStore file.
+ # Defaults to "cgi_sid_".
+ # suffix:: the prefix to add to the session id when generating
+ # the filename for this session's FileStore file.
+ # Defaults to the empty string.
+ def new_store_file(option={}) # :nodoc:
+ dir = option['tmpdir'] || Dir::tmpdir
+ prefix = option['prefix']
+ suffix = option['suffix']
+ require 'digest/md5'
+ md5 = Digest::MD5.hexdigest(session_id)[0,16]
+ path = dir+"/"
+ path << prefix if prefix
+ path << md5
+ path << suffix if suffix
+ if File::exist? path
+ hash = nil
+ elsif new_session
+ hash = {}
+ else
+ raise NoSession, "uninitialized session"
+ end
+ return path, hash
+ end
+
# Create a new CGI::Session object for +request+.
#
# +request+ is an instance of the +CGI+ class (see cgi.rb).
@@ -373,21 +414,8 @@ class CGI
# This session's FileStore file will be created if it does
# not exist, or opened if it does.
def initialize(session, option={})
- dir = option['tmpdir'] || Dir::tmpdir
- prefix = option['prefix'] || 'cgi_sid_'
- suffix = option['suffix'] || ''
- id = session.session_id
- require 'digest/md5'
- md5 = Digest::MD5.hexdigest(id)[0,16]
- @path = dir+"/"+prefix+md5+suffix
- if File::exist? @path
- @hash = nil
- else
- unless session.new_session
- raise CGI::Session::NoSession, "uninitialized session"
- end
- @hash = {}
- end
+ option = {'prefix' => 'cgi_sid_'}.update(option)
+ @path, @hash = session.new_store_file(option)
end
# Restore session state from the session's FileStore file.
diff --git a/lib/cgi/session/pstore.rb b/lib/cgi/session/pstore.rb
index cc3006400f..45d0d8ae2c 100644
--- a/lib/cgi/session/pstore.rb
+++ b/lib/cgi/session/pstore.rb
@@ -44,20 +44,8 @@ class CGI
# This session's PStore file will be created if it does
# not exist, or opened if it does.
def initialize(session, option={})
- dir = option['tmpdir'] || Dir::tmpdir
- prefix = option['prefix'] || ''
- id = session.session_id
- require 'digest/md5'
- md5 = Digest::MD5.hexdigest(id)[0,16]
- path = dir+"/"+prefix+md5
- if File::exist?(path)
- @hash = nil
- else
- unless session.new_session
- raise CGI::Session::NoSession, "uninitialized session"
- end
- @hash = {}
- end
+ option = {'suffix'=>''}.update(option)
+ path, @hash = session.new_store_file(option)
@p = ::PStore.new(path)
@p.transaction do |p|
File.chmod(0600, p.path)
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index aab8b000cb..ce77a0ccd5 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -5,24 +5,57 @@ class CGI
extend Util
end
module CGI::Util
- @@accept_charset="UTF-8" unless defined?(@@accept_charset)
- # URL-encode a string.
+ @@accept_charset = Encoding::UTF_8 unless defined?(@@accept_charset)
+
+ # URL-encode a string into application/x-www-form-urlencoded.
+ # Space characters (+" "+) are encoded with plus signs (+"+"+)
# url_encoded_string = CGI.escape("'Stop!' said Fred")
# # => "%27Stop%21%27+said+Fred"
def escape(string)
encoding = string.encoding
- string.b.gsub(/([^ a-zA-Z0-9_.\-~]+)/) do |m|
+ buffer = string.b
+ buffer.gsub!(/([^ a-zA-Z0-9_.\-~]+)/) do |m|
'%' + m.unpack('H2' * m.bytesize).join('%').upcase
- end.tr(' ', '+').force_encoding(encoding)
+ end
+ buffer.tr!(' ', '+')
+ buffer.force_encoding(encoding)
end
- # URL-decode a string with encoding(optional).
+ # URL-decode an application/x-www-form-urlencoded string with encoding(optional).
# string = CGI.unescape("%27Stop%21%27+said+Fred")
# # => "'Stop!' said Fred"
- def unescape(string,encoding=@@accept_charset)
- str=string.tr('+', ' ').b.gsub(/((?:%[0-9a-fA-F]{2})+)/) do |m|
+ def unescape(string, encoding = @@accept_charset)
+ str = string.tr('+', ' ')
+ str = str.b
+ str.gsub!(/((?:%[0-9a-fA-F]{2})+)/) do |m|
[m.delete('%')].pack('H*')
- end.force_encoding(encoding)
+ end
+ str.force_encoding(encoding)
+ str.valid_encoding? ? str : str.force_encoding(string.encoding)
+ end
+
+ # URL-encode a string following RFC 3986
+ # Space characters (+" "+) are encoded with (+"%20"+)
+ # url_encoded_string = CGI.escape("'Stop!' said Fred")
+ # # => "%27Stop%21%27%20said%20Fred"
+ def escapeURIComponent(string)
+ encoding = string.encoding
+ buffer = string.b
+ buffer.gsub!(/([^a-zA-Z0-9_.\-~]+)/) do |m|
+ '%' + m.unpack('H2' * m.bytesize).join('%').upcase
+ end
+ buffer.force_encoding(encoding)
+ end
+
+ # URL-decode a string following RFC 3986 with encoding(optional).
+ # string = CGI.unescape("%27Stop%21%27+said%20Fred")
+ # # => "'Stop!'+said Fred"
+ def unescapeURIComponent(string, encoding = @@accept_charset)
+ str = string.b
+ str.gsub!(/((?:%[0-9a-fA-F]{2})+)/) do |m|
+ [m.delete('%')].pack('H*')
+ end
+ str.force_encoding(encoding)
str.valid_encoding? ? str : str.force_encoding(string.encoding)
end
@@ -49,9 +82,12 @@ module CGI::Util
table = Hash[TABLE_FOR_ESCAPE_HTML__.map {|pair|pair.map {|s|s.encode(enc)}}]
string = string.gsub(/#{"['&\"<>]".encode(enc)}/, table)
string.encode!(origenc) if origenc
- return string
+ string
+ else
+ string = string.b
+ string.gsub!(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
+ string.force_encoding(enc)
end
- string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
end
begin
@@ -90,7 +126,8 @@ module CGI::Util
when Encoding::ISO_8859_1; 256
else 128
end
- string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do
+ string = string.b
+ string.gsub!(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do
match = $1.dup
case match
when 'apos' then "'"
@@ -116,6 +153,7 @@ module CGI::Util
"&#{match};"
end
end
+ string.force_encoding enc
end
# Synonym for CGI.escapeHTML(str)
@@ -140,7 +178,7 @@ module CGI::Util
def escapeElement(string, *elements)
elements = elements[0] if elements[0].kind_of?(Array)
unless elements.empty?
- string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
+ string.gsub(/<\/?(?:#{elements.join("|")})\b[^<>]*+>?/im) do
CGI.escapeHTML($&)
end
else
@@ -160,7 +198,7 @@ module CGI::Util
def unescapeElement(string, *elements)
elements = elements[0] if elements[0].kind_of?(Array)
unless elements.empty?
- string.gsub(/&lt;\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?&gt;/i) do
+ string.gsub(/&lt;\/?(?:#{elements.join("|")})\b(?>[^&]+|&(?![gl]t;)\w+;)*(?:&gt;)?/im) do
unescapeHTML($&)
end
else
@@ -174,21 +212,12 @@ module CGI::Util
# Synonym for CGI.unescapeElement(str)
alias unescape_element unescapeElement
- # Abbreviated day-of-week names specified by RFC 822
- RFC822_DAYS = %w[ Sun Mon Tue Wed Thu Fri Sat ]
-
- # Abbreviated month names specified by RFC 822
- RFC822_MONTHS = %w[ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ]
-
# Format a +Time+ object as a String using the format specified by RFC 1123.
#
# CGI.rfc1123_date(Time.now)
# # Sat, 01 Jan 2000 00:00:00 GMT
def rfc1123_date(time)
- t = time.clone.gmtime
- return format("%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT",
- RFC822_DAYS[t.wday], t.day, RFC822_MONTHS[t.month-1], t.year,
- t.hour, t.min, t.sec)
+ time.getgm.strftime("%a, %d %b %Y %T GMT")
end
# Prettify (indent) an HTML string.
diff --git a/lib/cgi/version.rb b/lib/cgi/version.rb
deleted file mode 100644
index 9d17c91b95..0000000000
--- a/lib/cgi/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class CGI
- VERSION = "0.1.0"
-end
diff --git a/lib/csv.rb b/lib/csv.rb
index 8aa65868b7..0307033941 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -34,7 +34,7 @@
# I'm sure I'll miss something, but I'll try to mention most of the major
# differences I am aware of, to help others quickly get up to speed:
#
-# === CSV Parsing
+# === \CSV Parsing
#
# * This parser is m17n aware. See CSV for full details.
# * This library has a stricter parser and will throw MalformedCSVErrors on
@@ -48,7 +48,7 @@
#
# === Interface
#
-# * CSV now uses Hash-style parameters to set options.
+# * CSV now uses keyword parameters to set options.
# * CSV no longer has generate_row() or parse_row().
# * The old CSV's Reader and Writer classes have been dropped.
# * CSV::open() is now more like Ruby's open().
@@ -90,98 +90,351 @@
# with any questions.
require "forwardable"
-require "English"
require "date"
require "stringio"
require_relative "csv/fields_converter"
-require_relative "csv/match_p"
+require_relative "csv/input_record_separator"
require_relative "csv/parser"
require_relative "csv/row"
require_relative "csv/table"
require_relative "csv/writer"
-using CSV::MatchP if CSV.const_defined?(:MatchP)
-
+# == \CSV
#
-# This class provides a complete interface to CSV files and data. It offers
-# tools to enable you to read and write to and from Strings or IO objects, as
-# needed.
+# === In a Hurry?
#
-# The most generic interface of the library is:
+# If you are familiar with \CSV data and have a particular task in mind,
+# you may want to go directly to the:
+# - {Recipes for CSV}[doc/csv/recipes/recipes_rdoc.html].
#
-# csv = CSV.new(string_or_io, **options)
+# Otherwise, read on here, about the API: classes, methods, and constants.
#
-# # Reading: IO object should be open for read
-# csv.read # => array of rows
-# # or
-# csv.each do |row|
-# # ...
-# end
-# # or
-# row = csv.shift
+# === \CSV Data
#
-# # Writing: IO object should be open for write
-# csv << row
+# \CSV (comma-separated values) data is a text representation of a table:
+# - A _row_ _separator_ delimits table rows.
+# A common row separator is the newline character <tt>"\n"</tt>.
+# - A _column_ _separator_ delimits fields in a row.
+# A common column separator is the comma character <tt>","</tt>.
#
-# There are several specialized class methods for one-statement reading or writing,
-# described in the Specialized Methods section.
+# This \CSV \String, with row separator <tt>"\n"</tt>
+# and column separator <tt>","</tt>,
+# has three rows and two columns:
+# "foo,0\nbar,1\nbaz,2\n"
#
-# If a String is passed into ::new, it is internally wrapped into a StringIO object.
+# Despite the name \CSV, a \CSV representation can use different separators.
#
-# +options+ can be used for specifying the particular CSV flavor (column
-# separators, row separators, value quoting and so on), and for data conversion,
-# see Data Conversion section for the description of the latter.
+# For more about tables, see the Wikipedia article
+# "{Table (information)}[https://en.wikipedia.org/wiki/Table_(information)]",
+# especially its section
+# "{Simple table}[https://en.wikipedia.org/wiki/Table_(information)#Simple_table]"
#
-# == Specialized Methods
+# == \Class \CSV
#
-# === Reading
+# Class \CSV provides methods for:
+# - Parsing \CSV data from a \String object, a \File (via its file path), or an \IO object.
+# - Generating \CSV data to a \String object.
#
-# # From a file: all at once
-# arr_of_rows = CSV.read("path/to/file.csv", **options)
-# # iterator-style:
-# CSV.foreach("path/to/file.csv", **options) do |row|
-# # ...
-# end
+# To make \CSV available:
+# require 'csv'
#
-# # From a string
-# arr_of_rows = CSV.parse("CSV,data,String", **options)
-# # or
-# CSV.parse("CSV,data,String", **options) do |row|
-# # ...
-# end
+# All examples here assume that this has been done.
+#
+# == Keeping It Simple
+#
+# A \CSV object has dozens of instance methods that offer fine-grained control
+# of parsing and generating \CSV data.
+# For many needs, though, simpler approaches will do.
+#
+# This section summarizes the singleton methods in \CSV
+# that allow you to parse and generate without explicitly
+# creating \CSV objects.
+# For details, follow the links.
+#
+# === Simple Parsing
+#
+# Parsing methods commonly return either of:
+# - An \Array of Arrays of Strings:
+# - The outer \Array is the entire "table".
+# - Each inner \Array is a row.
+# - Each \String is a field.
+# - A CSV::Table object. For details, see
+# {\CSV with Headers}[#class-CSV-label-CSV+with+Headers].
+#
+# ==== Parsing a \String
+#
+# The input to be parsed can be a string:
+# string = "foo,0\nbar,1\nbaz,2\n"
+#
+# \Method CSV.parse returns the entire \CSV data:
+# CSV.parse(string) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# \Method CSV.parse_line returns only the first row:
+# CSV.parse_line(string) # => ["foo", "0"]
+#
+# \CSV extends class \String with instance method String#parse_csv,
+# which also returns only the first row:
+# string.parse_csv # => ["foo", "0"]
+#
+# ==== Parsing Via a \File Path
+#
+# The input to be parsed can be in a file:
+# string = "foo,0\nbar,1\nbaz,2\n"
+# path = 't.csv'
+# File.write(path, string)
+#
+# \Method CSV.read returns the entire \CSV data:
+# CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# \Method CSV.foreach iterates, passing each row to the given block:
+# CSV.foreach(path) do |row|
+# p row
+# end
+# Output:
+# ["foo", "0"]
+# ["bar", "1"]
+# ["baz", "2"]
+#
+# \Method CSV.table returns the entire \CSV data as a CSV::Table object:
+# CSV.table(path) # => #<CSV::Table mode:col_or_row row_count:3>
+#
+# ==== Parsing from an Open \IO Stream
#
-# === Writing
+# The input to be parsed can be in an open \IO stream:
#
-# # To a file
-# CSV.open("path/to/file.csv", "wb") do |csv|
-# csv << ["row", "of", "CSV", "data"]
-# csv << ["another", "row"]
-# # ...
+# \Method CSV.read returns the entire \CSV data:
+# File.open(path) do |file|
+# CSV.read(file)
+# end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# As does method CSV.parse:
+# File.open(path) do |file|
+# CSV.parse(file)
+# end # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# \Method CSV.parse_line returns only the first row:
+# File.open(path) do |file|
+# CSV.parse_line(file)
+# end # => ["foo", "0"]
+#
+# \Method CSV.foreach iterates, passing each row to the given block:
+# File.open(path) do |file|
+# CSV.foreach(file) do |row|
+# p row
+# end
# end
+# Output:
+# ["foo", "0"]
+# ["bar", "1"]
+# ["baz", "2"]
+#
+# \Method CSV.table returns the entire \CSV data as a CSV::Table object:
+# File.open(path) do |file|
+# CSV.table(file)
+# end # => #<CSV::Table mode:col_or_row row_count:3>
+#
+# === Simple Generating
+#
+# \Method CSV.generate returns a \String;
+# this example uses method CSV#<< to append the rows
+# that are to be generated:
+# output_string = CSV.generate do |csv|
+# csv << ['foo', 0]
+# csv << ['bar', 1]
+# csv << ['baz', 2]
+# end
+# output_string # => "foo,0\nbar,1\nbaz,2\n"
+#
+# \Method CSV.generate_line returns a \String containing the single row
+# constructed from an \Array:
+# CSV.generate_line(['foo', '0']) # => "foo,0\n"
#
-# # To a String
-# csv_string = CSV.generate do |csv|
-# csv << ["row", "of", "CSV", "data"]
-# csv << ["another", "row"]
-# # ...
+# \CSV extends class \Array with instance method <tt>Array#to_csv</tt>,
+# which forms an \Array into a \String:
+# ['foo', '0'].to_csv # => "foo,0\n"
+#
+# === "Filtering" \CSV
+#
+# \Method CSV.filter provides a Unix-style filter for \CSV data.
+# The input data is processed to form the output data:
+# in_string = "foo,0\nbar,1\nbaz,2\n"
+# out_string = ''
+# CSV.filter(in_string, out_string) do |row|
+# row[0] = row[0].upcase
+# row[1] *= 4
# end
+# out_string # => "FOO,0000\nBAR,1111\nBAZ,2222\n"
+#
+# == \CSV Objects
+#
+# There are three ways to create a \CSV object:
+# - \Method CSV.new returns a new \CSV object.
+# - \Method CSV.instance returns a new or cached \CSV object.
+# - \Method \CSV() also returns a new or cached \CSV object.
+#
+# === Instance Methods
+#
+# \CSV has three groups of instance methods:
+# - Its own internally defined instance methods.
+# - Methods included by module Enumerable.
+# - Methods delegated to class IO. See below.
+#
+# ==== Delegated Methods
+#
+# For convenience, a CSV object will delegate to many methods in class IO.
+# (A few have wrapper "guard code" in \CSV.) You may call:
+# * IO#binmode
+# * #binmode?
+# * IO#close
+# * IO#close_read
+# * IO#close_write
+# * IO#closed?
+# * #eof
+# * #eof?
+# * IO#external_encoding
+# * IO#fcntl
+# * IO#fileno
+# * #flock
+# * IO#flush
+# * IO#fsync
+# * IO#internal_encoding
+# * #ioctl
+# * IO#isatty
+# * #path
+# * IO#pid
+# * IO#pos
+# * IO#pos=
+# * IO#reopen
+# * #rewind
+# * IO#seek
+# * #stat
+# * IO#string
+# * IO#sync
+# * IO#sync=
+# * IO#tell
+# * #to_i
+# * #to_io
+# * IO#truncate
+# * IO#tty?
+#
+# === Options
+#
+# The default values for options are:
+# DEFAULT_OPTIONS = {
+# # For both parsing and generating.
+# col_sep: ",",
+# row_sep: :auto,
+# quote_char: '"',
+# # For parsing.
+# field_size_limit: nil,
+# converters: nil,
+# unconverted_fields: nil,
+# headers: false,
+# return_headers: false,
+# header_converters: nil,
+# skip_blanks: false,
+# skip_lines: nil,
+# liberal_parsing: false,
+# nil_value: nil,
+# empty_value: "",
+# strip: false,
+# # For generating.
+# write_headers: nil,
+# quote_empty: true,
+# force_quotes: false,
+# write_converters: nil,
+# write_nil_value: nil,
+# write_empty_value: "",
+# }
+#
+# ==== Options for Parsing
+#
+# Options for parsing, described in detail below, include:
+# - +row_sep+: Specifies the row separator; used to delimit rows.
+# - +col_sep+: Specifies the column separator; used to delimit fields.
+# - +quote_char+: Specifies the quote character; used to quote fields.
+# - +field_size_limit+: Specifies the maximum field size + 1 allowed.
+# Deprecated since 3.2.3. Use +max_field_size+ instead.
+# - +max_field_size+: Specifies the maximum field size allowed.
+# - +converters+: Specifies the field converters to be used.
+# - +unconverted_fields+: Specifies whether unconverted fields are to be available.
+# - +headers+: Specifies whether data contains headers,
+# or specifies the headers themselves.
+# - +return_headers+: Specifies whether headers are to be returned.
+# - +header_converters+: Specifies the header converters to be used.
+# - +skip_blanks+: Specifies whether blanks lines are to be ignored.
+# - +skip_lines+: Specifies how comments lines are to be recognized.
+# - +strip+: Specifies whether leading and trailing whitespace are to be
+# stripped from fields. This must be compatible with +col_sep+; if it is not,
+# then an +ArgumentError+ exception will be raised.
+# - +liberal_parsing+: Specifies whether \CSV should attempt to parse
+# non-compliant data.
+# - +nil_value+: Specifies the object that is to be substituted for each null (no-text) field.
+# - +empty_value+: Specifies the object that is to be substituted for each empty field.
+#
+# :include: ../doc/csv/options/common/row_sep.rdoc
+#
+# :include: ../doc/csv/options/common/col_sep.rdoc
+#
+# :include: ../doc/csv/options/common/quote_char.rdoc
+#
+# :include: ../doc/csv/options/parsing/field_size_limit.rdoc
+#
+# :include: ../doc/csv/options/parsing/converters.rdoc
+#
+# :include: ../doc/csv/options/parsing/unconverted_fields.rdoc
+#
+# :include: ../doc/csv/options/parsing/headers.rdoc
+#
+# :include: ../doc/csv/options/parsing/return_headers.rdoc
+#
+# :include: ../doc/csv/options/parsing/header_converters.rdoc
+#
+# :include: ../doc/csv/options/parsing/skip_blanks.rdoc
+#
+# :include: ../doc/csv/options/parsing/skip_lines.rdoc
+#
+# :include: ../doc/csv/options/parsing/strip.rdoc
+#
+# :include: ../doc/csv/options/parsing/liberal_parsing.rdoc
+#
+# :include: ../doc/csv/options/parsing/nil_value.rdoc
+#
+# :include: ../doc/csv/options/parsing/empty_value.rdoc
+#
+# ==== Options for Generating
+#
+# Options for generating, described in detail below, include:
+# - +row_sep+: Specifies the row separator; used to delimit rows.
+# - +col_sep+: Specifies the column separator; used to delimit fields.
+# - +quote_char+: Specifies the quote character; used to quote fields.
+# - +write_headers+: Specifies whether headers are to be written.
+# - +force_quotes+: Specifies whether each output field is to be quoted.
+# - +quote_empty+: Specifies whether each empty output field is to be quoted.
+# - +write_converters+: Specifies the field converters to be used in writing.
+# - +write_nil_value+: Specifies the object that is to be substituted for each +nil+-valued field.
+# - +write_empty_value+: Specifies the object that is to be substituted for each empty field.
+#
+# :include: ../doc/csv/options/common/row_sep.rdoc
+#
+# :include: ../doc/csv/options/common/col_sep.rdoc
+#
+# :include: ../doc/csv/options/common/quote_char.rdoc
#
-# === Shortcuts
+# :include: ../doc/csv/options/generating/write_headers.rdoc
#
-# # Core extensions for converting one line
-# csv_string = ["CSV", "data"].to_csv # to CSV
-# csv_array = "CSV,String".parse_csv # from CSV
+# :include: ../doc/csv/options/generating/force_quotes.rdoc
#
-# # CSV() method
-# CSV { |csv_out| csv_out << %w{my data here} } # to $stdout
-# CSV(csv = "") { |csv_str| csv_str << %w{my data here} } # to a String
-# CSV($stderr) { |csv_err| csv_err << %w{my data here} } # to $stderr
-# CSV($stdin) { |csv_in| csv_in.each { |row| p row } } # from $stdin
+# :include: ../doc/csv/options/generating/quote_empty.rdoc
#
-# == Data Conversion
+# :include: ../doc/csv/options/generating/write_converters.rdoc
#
-# === CSV with headers
+# :include: ../doc/csv/options/generating/write_nil_value.rdoc
+#
+# :include: ../doc/csv/options/generating/write_empty_value.rdoc
+#
+# === \CSV with Headers
#
# CSV allows to specify column names of CSV file, whether they are in data, or
# provided separately. If headers are specified, reading methods return an instance
@@ -203,24 +456,351 @@ using CSV::MatchP if CSV.const_defined?(:MatchP)
# data = CSV.parse('Bob,Engineering,1000', headers: %i[name department salary])
# data.first #=> #<CSV::Row name:"Bob" department:"Engineering" salary:"1000">
#
-# === Typed data reading
-#
-# CSV allows to provide a set of data _converters_ e.g. transformations to try on input
-# data. Converter could be a symbol from CSV::Converters constant's keys, or lambda.
-#
-# # Without any converters:
-# CSV.parse('Bob,2018-03-01,100')
-# #=> [["Bob", "2018-03-01", "100"]]
-#
-# # With built-in converters:
-# CSV.parse('Bob,2018-03-01,100', converters: %i[numeric date])
-# #=> [["Bob", #<Date: 2018-03-01>, 100]]
-#
-# # With custom converters:
-# CSV.parse('Bob,2018-03-01,100', converters: [->(v) { Time.parse(v) rescue v }])
-# #=> [["Bob", 2018-03-01 00:00:00 +0200, "100"]]
+# === \Converters
+#
+# By default, each value (field or header) parsed by \CSV is formed into a \String.
+# You can use a _field_ _converter_ or _header_ _converter_
+# to intercept and modify the parsed values:
+# - See {Field Converters}[#class-CSV-label-Field+Converters].
+# - See {Header Converters}[#class-CSV-label-Header+Converters].
+#
+# Also by default, each value to be written during generation is written 'as-is'.
+# You can use a _write_ _converter_ to modify values before writing.
+# - See {Write Converters}[#class-CSV-label-Write+Converters].
+#
+# ==== Specifying \Converters
+#
+# You can specify converters for parsing or generating in the +options+
+# argument to various \CSV methods:
+# - Option +converters+ for converting parsed field values.
+# - Option +header_converters+ for converting parsed header values.
+# - Option +write_converters+ for converting values to be written (generated).
+#
+# There are three forms for specifying converters:
+# - A converter proc: executable code to be used for conversion.
+# - A converter name: the name of a stored converter.
+# - A converter list: an array of converter procs, converter names, and converter lists.
+#
+# ===== Converter Procs
+#
+# This converter proc, +strip_converter+, accepts a value +field+
+# and returns <tt>field.strip</tt>:
+# strip_converter = proc {|field| field.strip }
+# In this call to <tt>CSV.parse</tt>,
+# the keyword argument <tt>converters: string_converter</tt>
+# specifies that:
+# - \Proc +string_converter+ is to be called for each parsed field.
+# - The converter's return value is to replace the +field+ value.
+# Example:
+# string = " foo , 0 \n bar , 1 \n baz , 2 \n"
+# array = CSV.parse(string, converters: strip_converter)
+# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# A converter proc can receive a second argument, +field_info+,
+# that contains details about the field.
+# This modified +strip_converter+ displays its arguments:
+# strip_converter = proc do |field, field_info|
+# p [field, field_info]
+# field.strip
+# end
+# string = " foo , 0 \n bar , 1 \n baz , 2 \n"
+# array = CSV.parse(string, converters: strip_converter)
+# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+# Output:
+# [" foo ", #<struct CSV::FieldInfo index=0, line=1, header=nil>]
+# [" 0 ", #<struct CSV::FieldInfo index=1, line=1, header=nil>]
+# [" bar ", #<struct CSV::FieldInfo index=0, line=2, header=nil>]
+# [" 1 ", #<struct CSV::FieldInfo index=1, line=2, header=nil>]
+# [" baz ", #<struct CSV::FieldInfo index=0, line=3, header=nil>]
+# [" 2 ", #<struct CSV::FieldInfo index=1, line=3, header=nil>]
+# Each CSV::FieldInfo object shows:
+# - The 0-based field index.
+# - The 1-based line index.
+# - The field header, if any.
+#
+# ===== Stored \Converters
+#
+# A converter may be given a name and stored in a structure where
+# the parsing methods can find it by name.
+#
+# The storage structure for field converters is the \Hash CSV::Converters.
+# It has several built-in converter procs:
+# - <tt>:integer</tt>: converts each \String-embedded integer into a true \Integer.
+# - <tt>:float</tt>: converts each \String-embedded float into a true \Float.
+# - <tt>:date</tt>: converts each \String-embedded date into a true \Date.
+# - <tt>:date_time</tt>: converts each \String-embedded date-time into a true \DateTime
+# .
+# This example creates a converter proc, then stores it:
+# strip_converter = proc {|field| field.strip }
+# CSV::Converters[:strip] = strip_converter
+# Then the parsing method call can refer to the converter
+# by its name, <tt>:strip</tt>:
+# string = " foo , 0 \n bar , 1 \n baz , 2 \n"
+# array = CSV.parse(string, converters: :strip)
+# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# The storage structure for header converters is the \Hash CSV::HeaderConverters,
+# which works in the same way.
+# It also has built-in converter procs:
+# - <tt>:downcase</tt>: Downcases each header.
+# - <tt>:symbol</tt>: Converts each header to a \Symbol.
+#
+# There is no such storage structure for write headers.
+#
+# In order for the parsing methods to access stored converters in non-main-Ractors, the
+# storage structure must be made shareable first.
+# Therefore, <tt>Ractor.make_shareable(CSV::Converters)</tt> and
+# <tt>Ractor.make_shareable(CSV::HeaderConverters)</tt> must be called before the creation
+# of Ractors that use the converters stored in these structures. (Since making the storage
+# structures shareable involves freezing them, any custom converters that are to be used
+# must be added first.)
+#
+# ===== Converter Lists
+#
+# A _converter_ _list_ is an \Array that may include any assortment of:
+# - Converter procs.
+# - Names of stored converters.
+# - Nested converter lists.
+#
+# Examples:
+# numeric_converters = [:integer, :float]
+# date_converters = [:date, :date_time]
+# [numeric_converters, strip_converter]
+# [strip_converter, date_converters, :float]
+#
+# Like a converter proc, a converter list may be named and stored in either
+# \CSV::Converters or CSV::HeaderConverters:
+# CSV::Converters[:custom] = [strip_converter, date_converters, :float]
+# CSV::HeaderConverters[:custom] = [:downcase, :symbol]
+#
+# There are two built-in converter lists:
+# CSV::Converters[:numeric] # => [:integer, :float]
+# CSV::Converters[:all] # => [:date_time, :numeric]
+#
+# ==== Field \Converters
+#
+# With no conversion, all parsed fields in all rows become Strings:
+# string = "foo,0\nbar,1\nbaz,2\n"
+# ary = CSV.parse(string)
+# ary # => # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# When you specify a field converter, each parsed field is passed to the converter;
+# its return value becomes the stored value for the field.
+# A converter might, for example, convert an integer embedded in a \String
+# into a true \Integer.
+# (In fact, that's what built-in field converter +:integer+ does.)
+#
+# There are three ways to use field \converters.
+#
+# - Using option {converters}[#class-CSV-label-Option+converters] with a parsing method:
+# ary = CSV.parse(string, converters: :integer)
+# ary # => [0, 1, 2] # => [["foo", 0], ["bar", 1], ["baz", 2]]
+# - Using option {converters}[#class-CSV-label-Option+converters] with a new \CSV instance:
+# csv = CSV.new(string, converters: :integer)
+# # Field converters in effect:
+# csv.converters # => [:integer]
+# csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]]
+# - Using method #convert to add a field converter to a \CSV instance:
+# csv = CSV.new(string)
+# # Add a converter.
+# csv.convert(:integer)
+# csv.converters # => [:integer]
+# csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]]
+#
+# Installing a field converter does not affect already-read rows:
+# csv = CSV.new(string)
+# csv.shift # => ["foo", "0"]
+# # Add a converter.
+# csv.convert(:integer)
+# csv.converters # => [:integer]
+# csv.read # => [["bar", 1], ["baz", 2]]
+#
+# There are additional built-in \converters, and custom \converters are also supported.
+#
+# ===== Built-In Field \Converters
+#
+# The built-in field converters are in \Hash CSV::Converters:
+# - Each key is a field converter name.
+# - Each value is one of:
+# - A \Proc field converter.
+# - An \Array of field converter names.
+#
+# Display:
+# CSV::Converters.each_pair do |name, value|
+# if value.kind_of?(Proc)
+# p [name, value.class]
+# else
+# p [name, value]
+# end
+# end
+# Output:
+# [:integer, Proc]
+# [:float, Proc]
+# [:numeric, [:integer, :float]]
+# [:date, Proc]
+# [:date_time, Proc]
+# [:all, [:date_time, :numeric]]
+#
+# Each of these converters transcodes values to UTF-8 before attempting conversion.
+# If a value cannot be transcoded to UTF-8 the conversion will
+# fail and the value will remain unconverted.
+#
+# Converter +:integer+ converts each field that Integer() accepts:
+# data = '0,1,2,x'
+# # Without the converter
+# csv = CSV.parse_line(data)
+# csv # => ["0", "1", "2", "x"]
+# # With the converter
+# csv = CSV.parse_line(data, converters: :integer)
+# csv # => [0, 1, 2, "x"]
+#
+# Converter +:float+ converts each field that Float() accepts:
+# data = '1.0,3.14159,x'
+# # Without the converter
+# csv = CSV.parse_line(data)
+# csv # => ["1.0", "3.14159", "x"]
+# # With the converter
+# csv = CSV.parse_line(data, converters: :float)
+# csv # => [1.0, 3.14159, "x"]
+#
+# Converter +:numeric+ converts with both +:integer+ and +:float+..
+#
+# Converter +:date+ converts each field that Date::parse accepts:
+# data = '2001-02-03,x'
+# # Without the converter
+# csv = CSV.parse_line(data)
+# csv # => ["2001-02-03", "x"]
+# # With the converter
+# csv = CSV.parse_line(data, converters: :date)
+# csv # => [#<Date: 2001-02-03 ((2451944j,0s,0n),+0s,2299161j)>, "x"]
+#
+# Converter +:date_time+ converts each field that DateTime::parse accepts:
+# data = '2020-05-07T14:59:00-05:00,x'
+# # Without the converter
+# csv = CSV.parse_line(data)
+# csv # => ["2020-05-07T14:59:00-05:00", "x"]
+# # With the converter
+# csv = CSV.parse_line(data, converters: :date_time)
+# csv # => [#<DateTime: 2020-05-07T14:59:00-05:00 ((2458977j,71940s,0n),-18000s,2299161j)>, "x"]
+#
+# Converter +:numeric+ converts with both +:date_time+ and +:numeric+..
+#
+# As seen above, method #convert adds \converters to a \CSV instance,
+# and method #converters returns an \Array of the \converters in effect:
+# csv = CSV.new('0,1,2')
+# csv.converters # => []
+# csv.convert(:integer)
+# csv.converters # => [:integer]
+# csv.convert(:date)
+# csv.converters # => [:integer, :date]
+#
+# ===== Custom Field \Converters
+#
+# You can define a custom field converter:
+# strip_converter = proc {|field| field.strip }
+# string = " foo , 0 \n bar , 1 \n baz , 2 \n"
+# array = CSV.parse(string, converters: strip_converter)
+# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+# You can register the converter in \Converters \Hash,
+# which allows you to refer to it by name:
+# CSV::Converters[:strip] = strip_converter
+# string = " foo , 0 \n bar , 1 \n baz , 2 \n"
+# array = CSV.parse(string, converters: :strip)
+# array # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+#
+# ==== Header \Converters
+#
+# Header converters operate only on headers (and not on other rows).
+#
+# There are three ways to use header \converters;
+# these examples use built-in header converter +:downcase+,
+# which downcases each parsed header.
+#
+# - Option +header_converters+ with a singleton parsing method:
+# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2"
+# tbl = CSV.parse(string, headers: true, header_converters: :downcase)
+# tbl.class # => CSV::Table
+# tbl.headers # => ["name", "count"]
+#
+# - Option +header_converters+ with a new \CSV instance:
+# csv = CSV.new(string, header_converters: :downcase)
+# # Header converters in effect:
+# csv.header_converters # => [:downcase]
+# tbl = CSV.parse(string, headers: true)
+# tbl.headers # => ["Name", "Count"]
+#
+# - Method #header_convert adds a header converter to a \CSV instance:
+# csv = CSV.new(string)
+# # Add a header converter.
+# csv.header_convert(:downcase)
+# csv.header_converters # => [:downcase]
+# tbl = CSV.parse(string, headers: true)
+# tbl.headers # => ["Name", "Count"]
+#
+# ===== Built-In Header \Converters
+#
+# The built-in header \converters are in \Hash CSV::HeaderConverters.
+# The keys there are the names of the \converters:
+# CSV::HeaderConverters.keys # => [:downcase, :symbol]
+#
+# Converter +:downcase+ converts each header by downcasing it:
+# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2"
+# tbl = CSV.parse(string, headers: true, header_converters: :downcase)
+# tbl.class # => CSV::Table
+# tbl.headers # => ["name", "count"]
+#
+# Converter +:symbol+ converts each header by making it into a \Symbol:
+# string = "Name,Count\nFoo,0\n,Bar,1\nBaz,2"
+# tbl = CSV.parse(string, headers: true, header_converters: :symbol)
+# tbl.headers # => [:name, :count]
+# Details:
+# - Strips leading and trailing whitespace.
+# - Downcases the header.
+# - Replaces embedded spaces with underscores.
+# - Removes non-word characters.
+# - Makes the string into a \Symbol.
+#
+# ===== Custom Header \Converters
+#
+# You can define a custom header converter:
+# upcase_converter = proc {|header| header.upcase }
+# string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+# table = CSV.parse(string, headers: true, header_converters: upcase_converter)
+# table # => #<CSV::Table mode:col_or_row row_count:4>
+# table.headers # => ["NAME", "VALUE"]
+# You can register the converter in \HeaderConverters \Hash,
+# which allows you to refer to it by name:
+# CSV::HeaderConverters[:upcase] = upcase_converter
+# table = CSV.parse(string, headers: true, header_converters: :upcase)
+# table # => #<CSV::Table mode:col_or_row row_count:4>
+# table.headers # => ["NAME", "VALUE"]
+#
+# ===== Write \Converters
+#
+# When you specify a write converter for generating \CSV,
+# each field to be written is passed to the converter;
+# its return value becomes the new value for the field.
+# A converter might, for example, strip whitespace from a field.
+#
+# Using no write converter (all fields unmodified):
+# output_string = CSV.generate do |csv|
+# csv << [' foo ', 0]
+# csv << [' bar ', 1]
+# csv << [' baz ', 2]
+# end
+# output_string # => " foo ,0\n bar ,1\n baz ,2\n"
+# Using option +write_converters+ with two custom write converters:
+# strip_converter = proc {|field| field.respond_to?(:strip) ? field.strip : field }
+# upcase_converter = proc {|field| field.respond_to?(:upcase) ? field.upcase : field }
+# write_converters = [strip_converter, upcase_converter]
+# output_string = CSV.generate(write_converters: write_converters) do |csv|
+# csv << [' foo ', 0]
+# csv << [' bar ', 1]
+# csv << [' baz ', 2]
+# end
+# output_string # => "FOO,0\nBAR,1\nBAZ,2\n"
#
-# == CSV and Character Encodings (M17n or Multilingualization)
+# === Character Encodings (M17n or Multilingualization)
#
# This new CSV parser is m17n savvy. The parser works in the Encoding of the IO
# or String object being read from or written to. Your data is never transcoded
@@ -283,8 +863,9 @@ class CSV
# <b><tt>index</tt></b>:: The zero-based index of the field in its row.
# <b><tt>line</tt></b>:: The line of the data source this row is from.
# <b><tt>header</tt></b>:: The header for the column, when available.
+ # <b><tt>quoted?</tt></b>:: True or false, whether the original value is quoted or not.
#
- FieldInfo = Struct.new(:index, :line, :header)
+ FieldInfo = Struct.new(:index, :line, :header, :quoted?)
# A Regexp used to find and convert some common Date formats.
DateMatcher = / \A(?: (\w+,?\s+)?\w+\s+\d{1,2},?\s+\d{2,4} |
@@ -292,39 +873,20 @@ class CSV
# A Regexp used to find and convert some common DateTime formats.
DateTimeMatcher =
/ \A(?: (\w+,?\s+)?\w+\s+\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2},?\s+\d{2,4} |
- \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2} |
- # ISO-8601
+ # ISO-8601 and RFC-3339 (space instead of T) recognized by DateTime.parse
\d{4}-\d{2}-\d{2}
- (?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?(?:[+-]\d{2}(?::\d{2})|Z)?)?)?
+ (?:[T\s]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?(?:[+-]\d{2}(?::\d{2})|Z)?)?)?
)\z /x
# The encoding used by all converters.
ConverterEncoding = Encoding.find("UTF-8")
+ # A \Hash containing the names and \Procs for the built-in field converters.
+ # See {Built-In Field Converters}[#class-CSV-label-Built-In+Field+Converters].
#
- # This Hash holds the built-in converters of CSV that can be accessed by name.
- # You can select Converters with CSV.convert() or through the +options+ Hash
- # passed to CSV::new().
- #
- # <b><tt>:integer</tt></b>:: Converts any field Integer() accepts.
- # <b><tt>:float</tt></b>:: Converts any field Float() accepts.
- # <b><tt>:numeric</tt></b>:: A combination of <tt>:integer</tt>
- # and <tt>:float</tt>.
- # <b><tt>:date</tt></b>:: Converts any field Date::parse() accepts.
- # <b><tt>:date_time</tt></b>:: Converts any field DateTime::parse() accepts.
- # <b><tt>:all</tt></b>:: All built-in converters. A combination of
- # <tt>:date_time</tt> and <tt>:numeric</tt>.
- #
- # All built-in converters transcode field data to UTF-8 before attempting a
- # conversion. If your data cannot be transcoded to UTF-8 the conversion will
- # fail and the field will remain unchanged.
- #
- # This Hash is intentionally left unfrozen and users should feel free to add
- # values to it that can be accessed by all CSV objects.
- #
- # To add a combo field, the value should be an Array of names. Combo fields
- # can be nested with other combo fields.
- #
+ # This \Hash is intentionally left unfrozen, and may be extended with
+ # custom field converters.
+ # See {Custom Field Converters}[#class-CSV-label-Custom+Field+Converters].
Converters = {
integer: lambda { |f|
Integer(f.encode(ConverterEncoding)) rescue f
@@ -352,84 +914,98 @@ class CSV
all: [:date_time, :numeric],
}
+ # A \Hash containing the names and \Procs for the built-in header converters.
+ # See {Built-In Header Converters}[#class-CSV-label-Built-In+Header+Converters].
#
- # This Hash holds the built-in header converters of CSV that can be accessed
- # by name. You can select HeaderConverters with CSV.header_convert() or
- # through the +options+ Hash passed to CSV::new().
- #
- # <b><tt>:downcase</tt></b>:: Calls downcase() on the header String.
- # <b><tt>:symbol</tt></b>:: Leading/trailing spaces are dropped, string is
- # downcased, remaining spaces are replaced with
- # underscores, non-word characters are dropped,
- # and finally to_sym() is called.
- #
- # All built-in header converters transcode header data to UTF-8 before
- # attempting a conversion. If your data cannot be transcoded to UTF-8 the
- # conversion will fail and the header will remain unchanged.
- #
- # This Hash is intentionally left unfrozen and users should feel free to add
- # values to it that can be accessed by all CSV objects.
- #
- # To add a combo field, the value should be an Array of names. Combo fields
- # can be nested with other combo fields.
- #
+ # This \Hash is intentionally left unfrozen, and may be extended with
+ # custom field converters.
+ # See {Custom Header Converters}[#class-CSV-label-Custom+Header+Converters].
HeaderConverters = {
downcase: lambda { |h| h.encode(ConverterEncoding).downcase },
symbol: lambda { |h|
h.encode(ConverterEncoding).downcase.gsub(/[^\s\w]+/, "").strip.
gsub(/\s+/, "_").to_sym
- }
+ },
+ symbol_raw: lambda { |h| h.encode(ConverterEncoding).to_sym }
}
- #
- # The options used when no overrides are given by calling code. They are:
- #
- # <b><tt>:col_sep</tt></b>:: <tt>","</tt>
- # <b><tt>:row_sep</tt></b>:: <tt>:auto</tt>
- # <b><tt>:quote_char</tt></b>:: <tt>'"'</tt>
- # <b><tt>:field_size_limit</tt></b>:: +nil+
- # <b><tt>:converters</tt></b>:: +nil+
- # <b><tt>:unconverted_fields</tt></b>:: +nil+
- # <b><tt>:headers</tt></b>:: +false+
- # <b><tt>:return_headers</tt></b>:: +false+
- # <b><tt>:header_converters</tt></b>:: +nil+
- # <b><tt>:skip_blanks</tt></b>:: +false+
- # <b><tt>:force_quotes</tt></b>:: +false+
- # <b><tt>:skip_lines</tt></b>:: +nil+
- # <b><tt>:liberal_parsing</tt></b>:: +false+
- # <b><tt>:quote_empty</tt></b>:: +true+
- #
+ # Default values for method options.
DEFAULT_OPTIONS = {
+ # For both parsing and generating.
col_sep: ",",
row_sep: :auto,
quote_char: '"',
+ # For parsing.
field_size_limit: nil,
+ max_field_size: nil,
converters: nil,
unconverted_fields: nil,
headers: false,
return_headers: false,
header_converters: nil,
skip_blanks: false,
- force_quotes: false,
skip_lines: nil,
liberal_parsing: false,
+ nil_value: nil,
+ empty_value: "",
+ strip: false,
+ # For generating.
+ write_headers: nil,
quote_empty: true,
+ force_quotes: false,
+ write_converters: nil,
+ write_nil_value: nil,
+ write_empty_value: "",
}.freeze
class << self
+ # :call-seq:
+ # instance(string, **options)
+ # instance(io = $stdout, **options)
+ # instance(string, **options) {|csv| ... }
+ # instance(io = $stdout, **options) {|csv| ... }
#
- # This method will return a CSV instance, just like CSV::new(), but the
- # instance will be cached and returned for all future calls to this method for
- # the same +data+ object (tested by Object#object_id()) with the same
- # +options+.
+ # Creates or retrieves cached \CSV objects.
+ # For arguments and options, see CSV.new.
#
- # If a block is given, the instance is passed to the block and the return
- # value becomes the return value of the block.
+ # This API is not Ractor-safe.
#
+ # ---
+ #
+ # With no block given, returns a \CSV object.
+ #
+ # The first call to +instance+ creates and caches a \CSV object:
+ # s0 = 's0'
+ # csv0 = CSV.instance(s0)
+ # csv0.class # => CSV
+ #
+ # Subsequent calls to +instance+ with that _same_ +string+ or +io+
+ # retrieve that same cached object:
+ # csv1 = CSV.instance(s0)
+ # csv1.class # => CSV
+ # csv1.equal?(csv0) # => true # Same CSV object
+ #
+ # A subsequent call to +instance+ with a _different_ +string+ or +io+
+ # creates and caches a _different_ \CSV object.
+ # s1 = 's1'
+ # csv2 = CSV.instance(s1)
+ # csv2.equal?(csv0) # => false # Different CSV object
+ #
+ # All the cached objects remains available:
+ # csv3 = CSV.instance(s0)
+ # csv3.equal?(csv0) # true # Same CSV object
+ # csv4 = CSV.instance(s1)
+ # csv4.equal?(csv2) # true # Same CSV object
+ #
+ # ---
+ #
+ # When a block is given, calls the block with the created or retrieved
+ # \CSV object; returns the block's return value:
+ # CSV.instance(s0) {|csv| :foo } # => :foo
def instance(data = $stdout, **options)
# create a _signature_ for this method call, data object and options
sig = [data.object_id] +
- options.values_at(*DEFAULT_OPTIONS.keys.sort_by { |sym| sym.to_s })
+ options.values_at(*DEFAULT_OPTIONS.keys)
# fetch or create the instance for this signature
@@instances ||= Hash.new
@@ -442,35 +1018,191 @@ class CSV
end
end
- #
# :call-seq:
- # filter( **options ) { |row| ... }
- # filter( input, **options ) { |row| ... }
- # filter( input, output, **options ) { |row| ... }
+ # filter(in_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table
+ # filter(in_string_or_io, out_string_or_io, **options) {|row| ... } -> array_of_arrays or csv_table
+ # filter(**options) {|row| ... } -> array_of_arrays or csv_table
+ #
+ # - Parses \CSV from a source (\String, \IO stream, or ARGF).
+ # - Calls the given block with each parsed row:
+ # - Without headers, each row is an \Array.
+ # - With headers, each row is a CSV::Row.
+ # - Generates \CSV to an output (\String, \IO stream, or STDOUT).
+ # - Returns the parsed source:
+ # - Without headers, an \Array of \Arrays.
+ # - With headers, a CSV::Table.
+ #
+ # When +in_string_or_io+ is given, but not +out_string_or_io+,
+ # parses from the given +in_string_or_io+
+ # and generates to STDOUT.
+ #
+ # \String input without headers:
+ #
+ # in_string = "foo,0\nbar,1\nbaz,2"
+ # CSV.filter(in_string) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
+ #
+ # Output (to STDOUT):
+ #
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
+ #
+ # \String input with headers:
+ #
+ # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
+ # CSV.filter(in_string, headers: true) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end # => #<CSV::Table mode:col_or_row row_count:4>
+ #
+ # Output (to STDOUT):
+ #
+ # Name,Value
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
#
- # This method is a convenience for building Unix-like filters for CSV data.
- # Each row is yielded to the provided block which can alter it as needed.
- # After the block returns, the row is appended to +output+ altered or not.
+ # \IO stream input without headers:
#
- # The +input+ and +output+ arguments can be anything CSV::new() accepts
- # (generally String or IO objects). If not given, they default to
- # <tt>ARGF</tt> and <tt>$stdout</tt>.
+ # File.write('t.csv', "foo,0\nbar,1\nbaz,2")
+ # File.open('t.csv') do |in_io|
+ # CSV.filter(in_io) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
#
- # The +options+ parameter is also filtered down to CSV::new() after some
- # clever key parsing. Any key beginning with <tt>:in_</tt> or
- # <tt>:input_</tt> will have that leading identifier stripped and will only
- # be used in the +options+ Hash for the +input+ object. Keys starting with
- # <tt>:out_</tt> or <tt>:output_</tt> affect only +output+. All other keys
- # are assigned to both objects.
+ # Output (to STDOUT):
#
- # The <tt>:output_row_sep</tt> +option+ defaults to
- # <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>).
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
#
+ # \IO stream input with headers:
+ #
+ # File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2")
+ # File.open('t.csv') do |in_io|
+ # CSV.filter(in_io, headers: true) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # end # => #<CSV::Table mode:col_or_row row_count:4>
+ #
+ # Output (to STDOUT):
+ #
+ # Name,Value
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
+ #
+ # When both +in_string_or_io+ and +out_string_or_io+ are given,
+ # parses from +in_string_or_io+ and generates to +out_string_or_io+.
+ #
+ # \String output without headers:
+ #
+ # in_string = "foo,0\nbar,1\nbaz,2"
+ # out_string = ''
+ # CSV.filter(in_string, out_string) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
+ # out_string # => "FOO,0\nBAR,-1\nBAZ,-2\n"
+ #
+ # \String output with headers:
+ #
+ # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
+ # out_string = ''
+ # CSV.filter(in_string, out_string, headers: true) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end # => #<CSV::Table mode:col_or_row row_count:4>
+ # out_string # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n"
+ #
+ # \IO stream output without headers:
+ #
+ # in_string = "foo,0\nbar,1\nbaz,2"
+ # File.open('t.csv', 'w') do |out_io|
+ # CSV.filter(in_string, out_io) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # end # => [["FOO", 0], ["BAR", -1], ["BAZ", -2]]
+ # File.read('t.csv') # => "FOO,0\nBAR,-1\nBAZ,-2\n"
+ #
+ # \IO stream output with headers:
+ #
+ # in_string = "Name,Value\nfoo,0\nbar,1\nbaz,2"
+ # File.open('t.csv', 'w') do |out_io|
+ # CSV.filter(in_string, out_io, headers: true) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # end # => #<CSV::Table mode:col_or_row row_count:4>
+ # File.read('t.csv') # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n"
+ #
+ # When neither +in_string_or_io+ nor +out_string_or_io+ given,
+ # parses from {ARGF}[rdoc-ref:ARGF]
+ # and generates to STDOUT.
+ #
+ # Without headers:
+ #
+ # # Put Ruby code into a file.
+ # ruby = <<-EOT
+ # require 'csv'
+ # CSV.filter do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # EOT
+ # File.write('t.rb', ruby)
+ # # Put some CSV into a file.
+ # File.write('t.csv', "foo,0\nbar,1\nbaz,2")
+ # # Run the Ruby code with CSV filename as argument.
+ # system(Gem.ruby, "t.rb", "t.csv")
+ #
+ # Output (to STDOUT):
+ #
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
+ #
+ # With headers:
+ #
+ # # Put Ruby code into a file.
+ # ruby = <<-EOT
+ # require 'csv'
+ # CSV.filter(headers: true) do |row|
+ # row[0].upcase!
+ # row[1] = - row[1].to_i
+ # end
+ # EOT
+ # File.write('t.rb', ruby)
+ # # Put some CSV into a file.
+ # File.write('t.csv', "Name,Value\nfoo,0\nbar,1\nbaz,2")
+ # # Run the Ruby code with CSV filename as argument.
+ # system(Gem.ruby, "t.rb", "t.csv")
+ #
+ # Output (to STDOUT):
+ #
+ # Name,Value
+ # FOO,0
+ # BAR,-1
+ # BAZ,-2
+ #
+ # Arguments:
+ #
+ # * Argument +in_string_or_io+ must be a \String or an \IO stream.
+ # * Argument +out_string_or_io+ must be a \String or an \IO stream.
+ # * Arguments <tt>**options</tt> must be keyword options.
+ # See {Options for Parsing}[#class-CSV-label-Options+for+Parsing].
def filter(input=nil, output=nil, **options)
# parse options for input, output, or both
- in_options, out_options = Hash.new, {row_sep: $INPUT_RECORD_SEPARATOR}
+ in_options, out_options = Hash.new, {row_sep: InputRecordSeparator.value}
options.each do |key, value|
- case key.to_s
+ case key
when /\Ain(?:put)?_(.+)\Z/
in_options[$1.to_sym] = value
when /\Aout(?:put)?_(.+)\Z/
@@ -480,10 +1212,29 @@ class CSV
out_options[key] = value
end
end
+
# build input and output wrappers
- input = new(input || ARGF, **in_options)
+ input = new(input || ARGF, **in_options)
output = new(output || $stdout, **out_options)
+ # process headers
+ need_manual_header_output =
+ (in_options[:headers] and
+ out_options[:headers] == true and
+ out_options[:write_headers])
+ if need_manual_header_output
+ first_row = input.shift
+ if first_row
+ if first_row.is_a?(Row)
+ headers = first_row.headers
+ yield headers
+ output << headers
+ end
+ yield first_row
+ output << first_row
+ end
+ end
+
# read, yield, write
input.each do |row|
yield row
@@ -492,19 +1243,91 @@ class CSV
end
#
- # This method is intended as the primary interface for reading CSV files. You
- # pass a +path+ and any +options+ you wish to set for the read. Each row of
- # file will be passed to the provided +block+ in turn.
+ # :call-seq:
+ # foreach(path_or_io, mode='r', **options) {|row| ... )
+ # foreach(path_or_io, mode='r', **options) -> new_enumerator
+ #
+ # Calls the block with each row read from source +path_or_io+.
+ #
+ # \Path input without headers:
+ #
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # in_path = 't.csv'
+ # File.write(in_path, string)
+ # CSV.foreach(in_path) {|row| p row }
+ #
+ # Output:
+ #
+ # ["foo", "0"]
+ # ["bar", "1"]
+ # ["baz", "2"]
+ #
+ # \Path input with headers:
+ #
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # in_path = 't.csv'
+ # File.write(in_path, string)
+ # CSV.foreach(in_path, headers: true) {|row| p row }
+ #
+ # Output:
+ #
+ # <CSV::Row "Name":"foo" "Value":"0">
+ # <CSV::Row "Name":"bar" "Value":"1">
+ # <CSV::Row "Name":"baz" "Value":"2">
+ #
+ # \IO stream input without headers:
#
- # The +options+ parameter can be anything CSV::new() understands. This method
- # also understands an additional <tt>:encoding</tt> parameter that you can use
- # to specify the Encoding of the data in the file to be read. You must provide
- # this unless your data is in Encoding::default_external(). CSV will use this
- # to determine how to parse the data. You may provide a second Encoding to
- # have the data transcoded as it is read. For example,
- # <tt>encoding: "UTF-32BE:UTF-8"</tt> would read UTF-32BE data from the file
- # but transcode it to UTF-8 before CSV parses it.
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # File.open('t.csv') do |in_io|
+ # CSV.foreach(in_io) {|row| p row }
+ # end
#
+ # Output:
+ #
+ # ["foo", "0"]
+ # ["bar", "1"]
+ # ["baz", "2"]
+ #
+ # \IO stream input with headers:
+ #
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # File.open('t.csv') do |in_io|
+ # CSV.foreach(in_io, headers: true) {|row| p row }
+ # end
+ #
+ # Output:
+ #
+ # <CSV::Row "Name":"foo" "Value":"0">
+ # <CSV::Row "Name":"bar" "Value":"1">
+ # <CSV::Row "Name":"baz" "Value":"2">
+ #
+ # With no block given, returns an \Enumerator:
+ #
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.foreach(path) # => #<Enumerator: CSV:foreach("t.csv", "r")>
+ #
+ # Arguments:
+ # * Argument +path_or_io+ must be a file path or an \IO stream.
+ # * Argument +mode+, if given, must be a \File mode
+ # See {Open Mode}[https://ruby-doc.org/core/IO.html#method-c-new-label-Open+Mode].
+ # * Arguments <tt>**options</tt> must be keyword options.
+ # See {Options for Parsing}[#class-CSV-label-Options+for+Parsing].
+ # * This method optionally accepts an additional <tt>:encoding</tt> option
+ # that you can use to specify the Encoding of the data read from +path+ or +io+.
+ # You must provide this unless your data is in the encoding
+ # given by <tt>Encoding::default_external</tt>.
+ # Parsing will use this to determine how to parse the data.
+ # You may provide a second Encoding to
+ # have the data transcoded as it is read. For example,
+ # encoding: 'UTF-32BE:UTF-8'
+ # would read +UTF-32BE+ data from the file
+ # but transcode it to +UTF-8+ before parsing.
def foreach(path, mode="r", **options, &block)
return to_enum(__method__, path, mode, **options) unless block_given?
open(path, mode, **options) do |csv|
@@ -514,29 +1337,71 @@ class CSV
#
# :call-seq:
- # generate( str, **options ) { |csv| ... }
- # generate( **options ) { |csv| ... }
+ # generate(csv_string, **options) {|csv| ... }
+ # generate(**options) {|csv| ... }
+ #
+ # * Argument +csv_string+, if given, must be a \String object;
+ # defaults to a new empty \String.
+ # * Arguments +options+, if given, should be generating options.
+ # See {Options for Generating}[#class-CSV-label-Options+for+Generating].
+ #
+ # ---
#
- # This method wraps a String you provide, or an empty default String, in a
- # CSV object which is passed to the provided block. You can use the block to
- # append CSV rows to the String and when the block exits, the final String
- # will be returned.
+ # Creates a new \CSV object via <tt>CSV.new(csv_string, **options)</tt>;
+ # calls the block with the \CSV object, which the block may modify;
+ # returns the \String generated from the \CSV object.
#
- # Note that a passed String *is* modified by this method. Call dup() before
- # passing if you need a new String.
+ # Note that a passed \String *is* modified by this method.
+ # Pass <tt>csv_string</tt>.dup if the \String must be preserved.
#
- # The +options+ parameter can be anything CSV::new() understands. This method
- # understands an additional <tt>:encoding</tt> parameter when not passed a
- # String to set the base Encoding for the output. CSV needs this hint if you
- # plan to output non-ASCII compatible data.
+ # This method has one additional option: <tt>:encoding</tt>,
+ # which sets the base Encoding for the output if no no +str+ is specified.
+ # CSV needs this hint if you plan to output non-ASCII compatible data.
+ #
+ # ---
+ #
+ # Add lines:
+ # input_string = "foo,0\nbar,1\nbaz,2\n"
+ # output_string = CSV.generate(input_string) do |csv|
+ # csv << ['bat', 3]
+ # csv << ['bam', 4]
+ # end
+ # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n"
+ # input_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n"
+ # output_string.equal?(input_string) # => true # Same string, modified
+ #
+ # Add lines into new string, preserving old string:
+ # input_string = "foo,0\nbar,1\nbaz,2\n"
+ # output_string = CSV.generate(input_string.dup) do |csv|
+ # csv << ['bat', 3]
+ # csv << ['bam', 4]
+ # end
+ # output_string # => "foo,0\nbar,1\nbaz,2\nbat,3\nbam,4\n"
+ # input_string # => "foo,0\nbar,1\nbaz,2\n"
+ # output_string.equal?(input_string) # => false # Different strings
+ #
+ # Create lines from nothing:
+ # output_string = CSV.generate do |csv|
+ # csv << ['foo', 0]
+ # csv << ['bar', 1]
+ # csv << ['baz', 2]
+ # end
+ # output_string # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # ---
+ #
+ # Raises an exception if +csv_string+ is not a \String object:
+ # # Raises TypeError (no implicit conversion of Integer into String)
+ # CSV.generate(0)
#
def generate(str=nil, **options)
+ encoding = options[:encoding]
# add a default empty String, if none was given
if str
str = StringIO.new(str)
str.seek(0, IO::SEEK_END)
+ str.set_encoding(encoding) if encoding
else
- encoding = options[:encoding]
str = +""
str.force_encoding(encoding) if encoding
end
@@ -545,97 +1410,184 @@ class CSV
csv.string # return final String
end
+ # :call-seq:
+ # CSV.generate_line(ary)
+ # CSV.generate_line(ary, **options)
+ #
+ # Returns the \String created by generating \CSV from +ary+
+ # using the specified +options+.
+ #
+ # Argument +ary+ must be an \Array.
#
- # This method is a shortcut for converting a single row (Array) into a CSV
- # String.
+ # Special options:
+ # * Option <tt>:row_sep</tt> defaults to <tt>"\n"> on Ruby 3.0 or later
+ # and <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>) otherwise.:
+ # $INPUT_RECORD_SEPARATOR # => "\n"
+ # * This method accepts an additional option, <tt>:encoding</tt>, which sets the base
+ # Encoding for the output. This method will try to guess your Encoding from
+ # the first non-+nil+ field in +row+, if possible, but you may need to use
+ # this parameter as a backup plan.
#
- # The +options+ parameter can be anything CSV::new() understands. This method
- # understands an additional <tt>:encoding</tt> parameter to set the base
- # Encoding for the output. This method will try to guess your Encoding from
- # the first non-+nil+ field in +row+, if possible, but you may need to use
- # this parameter as a backup plan.
+ # For other +options+,
+ # see {Options for Generating}[#class-CSV-label-Options+for+Generating].
#
- # The <tt>:row_sep</tt> +option+ defaults to <tt>$INPUT_RECORD_SEPARATOR</tt>
- # (<tt>$/</tt>) when calling this method.
+ # ---
+ #
+ # Returns the \String generated from an \Array:
+ # CSV.generate_line(['foo', '0']) # => "foo,0\n"
+ #
+ # ---
+ #
+ # Raises an exception if +ary+ is not an \Array:
+ # # Raises NoMethodError (undefined method `find' for :foo:Symbol)
+ # CSV.generate_line(:foo)
#
def generate_line(row, **options)
- options = {row_sep: $INPUT_RECORD_SEPARATOR}.merge(options)
+ options = {row_sep: InputRecordSeparator.value}.merge(options)
str = +""
if options[:encoding]
str.force_encoding(options[:encoding])
- elsif field = row.find {|f| f.is_a?(String)}
- str.force_encoding(field.encoding)
+ else
+ fallback_encoding = nil
+ output_encoding = nil
+ row.each do |field|
+ next unless field.is_a?(String)
+ fallback_encoding ||= field.encoding
+ next if field.ascii_only?
+ output_encoding = field.encoding
+ break
+ end
+ output_encoding ||= fallback_encoding
+ if output_encoding
+ str.force_encoding(output_encoding)
+ end
end
(new(str, **options) << row).string
end
+ # :call-seq:
+ # CSV.generate_lines(rows)
+ # CSV.generate_lines(rows, **options)
+ #
+ # Returns the \String created by generating \CSV from
+ # using the specified +options+.
+ #
+ # Argument +rows+ must be an \Array of row. Row is \Array of \String or \CSV::Row.
+ #
+ # Special options:
+ # * Option <tt>:row_sep</tt> defaults to <tt>"\n"</tt> on Ruby 3.0 or later
+ # and <tt>$INPUT_RECORD_SEPARATOR</tt> (<tt>$/</tt>) otherwise.:
+ # $INPUT_RECORD_SEPARATOR # => "\n"
+ # * This method accepts an additional option, <tt>:encoding</tt>, which sets the base
+ # Encoding for the output. This method will try to guess your Encoding from
+ # the first non-+nil+ field in +row+, if possible, but you may need to use
+ # this parameter as a backup plan.
+ #
+ # For other +options+,
+ # see {Options for Generating}[#class-CSV-label-Options+for+Generating].
+ #
+ # ---
+ #
+ # Returns the \String generated from an
+ # CSV.generate_lines([['foo', '0'], ['bar', '1'], ['baz', '2']]) # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # ---
+ #
+ # Raises an exception
+ # # Raises NoMethodError (undefined method `each' for :foo:Symbol)
+ # CSV.generate_lines(:foo)
+ #
+ def generate_lines(rows, **options)
+ self.generate(**options) do |csv|
+ rows.each do |row|
+ csv << row
+ end
+ end
+ end
+
#
# :call-seq:
- # open( filename, mode = "rb", **options ) { |faster_csv| ... }
- # open( filename, **options ) { |faster_csv| ... }
- # open( filename, mode = "rb", **options )
- # open( filename, **options )
- #
- # This method opens an IO object, and wraps that with CSV. This is intended
- # as the primary interface for writing a CSV file.
- #
- # You must pass a +filename+ and may optionally add a +mode+ for Ruby's
- # open(). You may also pass an optional Hash containing any +options+
- # CSV::new() understands as the final argument.
- #
- # This method works like Ruby's open() call, in that it will pass a CSV object
- # to a provided block and close it when the block terminates, or it will
- # return the CSV object when no block is provided. (*Note*: This is different
- # from the Ruby 1.8 CSV library which passed rows to the block. Use
- # CSV::foreach() for that behavior.)
- #
- # You must provide a +mode+ with an embedded Encoding designator unless your
- # data is in Encoding::default_external(). CSV will check the Encoding of the
- # underlying IO object (set by the +mode+ you pass) to determine how to parse
- # the data. You may provide a second Encoding to have the data transcoded as
- # it is read just as you can with a normal call to IO::open(). For example,
- # <tt>"rb:UTF-32BE:UTF-8"</tt> would read UTF-32BE data from the file but
- # transcode it to UTF-8 before CSV parses it.
- #
- # An opened CSV object will delegate to many IO methods for convenience. You
- # may call:
- #
- # * binmode()
- # * binmode?()
- # * close()
- # * close_read()
- # * close_write()
- # * closed?()
- # * eof()
- # * eof?()
- # * external_encoding()
- # * fcntl()
- # * fileno()
- # * flock()
- # * flush()
- # * fsync()
- # * internal_encoding()
- # * ioctl()
- # * isatty()
- # * path()
- # * pid()
- # * pos()
- # * pos=()
- # * reopen()
- # * seek()
- # * stat()
- # * sync()
- # * sync=()
- # * tell()
- # * to_i()
- # * to_io()
- # * truncate()
- # * tty?()
+ # open(file_path, mode = "rb", **options ) -> new_csv
+ # open(io, mode = "rb", **options ) -> new_csv
+ # open(file_path, mode = "rb", **options ) { |csv| ... } -> object
+ # open(io, mode = "rb", **options ) { |csv| ... } -> object
+ #
+ # possible options elements:
+ # keyword form:
+ # :invalid => nil # raise error on invalid byte sequence (default)
+ # :invalid => :replace # replace invalid byte sequence
+ # :undef => :replace # replace undefined conversion
+ # :replace => string # replacement string ("?" or "\uFFFD" if not specified)
+ #
+ # * Argument +path+, if given, must be the path to a file.
+ # :include: ../doc/csv/arguments/io.rdoc
+ # * Argument +mode+, if given, must be a \File mode
+ # See {Open Mode}[IO.html#method-c-new-label-Open+Mode].
+ # * Arguments <tt>**options</tt> must be keyword options.
+ # See {Options for Generating}[#class-CSV-label-Options+for+Generating].
+ # * This method optionally accepts an additional <tt>:encoding</tt> option
+ # that you can use to specify the Encoding of the data read from +path+ or +io+.
+ # You must provide this unless your data is in the encoding
+ # given by <tt>Encoding::default_external</tt>.
+ # Parsing will use this to determine how to parse the data.
+ # You may provide a second Encoding to
+ # have the data transcoded as it is read. For example,
+ # encoding: 'UTF-32BE:UTF-8'
+ # would read +UTF-32BE+ data from the file
+ # but transcode it to +UTF-8+ before parsing.
+ #
+ # ---
+ #
+ # These examples assume prior execution of:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # ---
+ #
+ # With no block given, returns a new \CSV object.
+ #
+ # Create a \CSV object using a file path:
+ # csv = CSV.open(path)
+ # csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ #
+ # Create a \CSV object using an open \File:
+ # csv = CSV.open(File.open(path))
+ # csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
#
+ # ---
+ #
+ # With a block given, calls the block with the created \CSV object;
+ # returns the block's return value:
+ #
+ # Using a file path:
+ # csv = CSV.open(path) {|csv| p csv}
+ # csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ # Output:
+ # #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ #
+ # Using an open \File:
+ # csv = CSV.open(File.open(path)) {|csv| p csv}
+ # csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ # Output:
+ # #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ #
+ # ---
+ #
+ # Raises an exception if the argument is not a \String object or \IO object:
+ # # Raises TypeError (no implicit conversion of Symbol into String)
+ # CSV.open(:foo)
def open(filename, mode="r", **options)
# wrap a File opened with the remaining +args+ with no newline
# decorator
- file_opts = {universal_newline: false}.merge(options)
+ file_opts = options.dup
+ unless file_opts.key?(:newline)
+ file_opts[:universal_newline] ||= false
+ end
+ options.delete(:invalid)
+ options.delete(:undef)
+ options.delete(:replace)
+ options.delete_if {|k, _| /newline\z/.match?(k)}
begin
f = File.open(filename, mode, **file_opts)
@@ -666,16 +1618,116 @@ class CSV
#
# :call-seq:
- # parse( str, **options ) { |row| ... }
- # parse( str, **options )
+ # parse(string) -> array_of_arrays
+ # parse(io) -> array_of_arrays
+ # parse(string, headers: ..., **options) -> csv_table
+ # parse(io, headers: ..., **options) -> csv_table
+ # parse(string, **options) {|row| ... }
+ # parse(io, **options) {|row| ... }
+ #
+ # Parses +string+ or +io+ using the specified +options+.
+ #
+ # - Argument +string+ should be a \String object;
+ # it will be put into a new StringIO object positioned at the beginning.
+ # :include: ../doc/csv/arguments/io.rdoc
+ # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing]
+ #
+ # ====== Without Option +headers+
+ #
+ # Without {option +headers+}[#class-CSV-label-Option+headers] case.
+ #
+ # These examples assume prior execution of:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # ---
+ #
+ # With no block given, returns an \Array of Arrays formed from the source.
+ #
+ # Parse a \String:
+ # a_of_a = CSV.parse(string)
+ # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # Parse an open \File:
+ # a_of_a = File.open(path) do |file|
+ # CSV.parse(file)
+ # end
+ # a_of_a # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # ---
+ #
+ # With a block given, calls the block with each parsed row:
+ #
+ # Parse a \String:
+ # CSV.parse(string) {|row| p row }
+ #
+ # Output:
+ # ["foo", "0"]
+ # ["bar", "1"]
+ # ["baz", "2"]
+ #
+ # Parse an open \File:
+ # File.open(path) do |file|
+ # CSV.parse(file) {|row| p row }
+ # end
+ #
+ # Output:
+ # ["foo", "0"]
+ # ["bar", "1"]
+ # ["baz", "2"]
+ #
+ # ====== With Option +headers+
+ #
+ # With {option +headers+}[#class-CSV-label-Option+headers] case.
+ #
+ # These examples assume prior execution of:
+ # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # ---
+ #
+ # With no block given, returns a CSV::Table object formed from the source.
+ #
+ # Parse a \String:
+ # csv_table = CSV.parse(string, headers: ['Name', 'Count'])
+ # csv_table # => #<CSV::Table mode:col_or_row row_count:5>
+ #
+ # Parse an open \File:
+ # csv_table = File.open(path) do |file|
+ # CSV.parse(file, headers: ['Name', 'Count'])
+ # end
+ # csv_table # => #<CSV::Table mode:col_or_row row_count:4>
#
- # This method can be used to easily parse CSV out of a String. You may either
- # provide a +block+ which will be called with each row of the String in turn,
- # or just use the returned Array of Arrays (when no +block+ is given).
+ # ---
#
- # You pass your +str+ to read from, and an optional +options+ containing
- # anything CSV::new() understands.
+ # With a block given, calls the block with each parsed row,
+ # which has been formed into a CSV::Row object:
#
+ # Parse a \String:
+ # CSV.parse(string, headers: ['Name', 'Count']) {|row| p row }
+ #
+ # Output:
+ # # <CSV::Row "Name":"foo" "Count":"0">
+ # # <CSV::Row "Name":"bar" "Count":"1">
+ # # <CSV::Row "Name":"baz" "Count":"2">
+ #
+ # Parse an open \File:
+ # File.open(path) do |file|
+ # CSV.parse(file, headers: ['Name', 'Count']) {|row| p row }
+ # end
+ #
+ # Output:
+ # # <CSV::Row "Name":"foo" "Count":"0">
+ # # <CSV::Row "Name":"bar" "Count":"1">
+ # # <CSV::Row "Name":"baz" "Count":"2">
+ #
+ # ---
+ #
+ # Raises an exception if the argument is not a \String object or \IO object:
+ # # Raises NoMethodError (undefined method `close' for :foo:Symbol)
+ # CSV.parse(:foo)
def parse(str, **options, &block)
csv = new(str, **options)
@@ -689,44 +1741,117 @@ class CSV
end
end
+ # :call-seq:
+ # CSV.parse_line(string) -> new_array or nil
+ # CSV.parse_line(io) -> new_array or nil
+ # CSV.parse_line(string, **options) -> new_array or nil
+ # CSV.parse_line(io, **options) -> new_array or nil
+ # CSV.parse_line(string, headers: true, **options) -> csv_row or nil
+ # CSV.parse_line(io, headers: true, **options) -> csv_row or nil
+ #
+ # Returns the data created by parsing the first line of +string+ or +io+
+ # using the specified +options+.
+ #
+ # - Argument +string+ should be a \String object;
+ # it will be put into a new StringIO object positioned at the beginning.
+ # :include: ../doc/csv/arguments/io.rdoc
+ # - Argument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing]
+ #
+ # ====== Without Option +headers+
+ #
+ # Without option +headers+, returns the first row as a new \Array.
+ #
+ # These examples assume prior execution of:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # Parse the first line from a \String object:
+ # CSV.parse_line(string) # => ["foo", "0"]
+ #
+ # Parse the first line from a File object:
+ # File.open(path) do |file|
+ # CSV.parse_line(file) # => ["foo", "0"]
+ # end # => ["foo", "0"]
+ #
+ # Returns +nil+ if the argument is an empty \String:
+ # CSV.parse_line('') # => nil
+ #
+ # ====== With Option +headers+
+ #
+ # With {option +headers+}[#class-CSV-label-Option+headers],
+ # returns the first row as a CSV::Row object.
+ #
+ # These examples assume prior execution of:
+ # string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # Parse the first line from a \String object:
+ # CSV.parse_line(string, headers: true) # => #<CSV::Row "Name":"foo" "Count":"0">
+ #
+ # Parse the first line from a File object:
+ # File.open(path) do |file|
+ # CSV.parse_line(file, headers: true)
+ # end # => #<CSV::Row "Name":"foo" "Count":"0">
#
- # This method is a shortcut for converting a single line of a CSV String into
- # an Array. Note that if +line+ contains multiple rows, anything beyond the
- # first row is ignored.
+ # ---
#
- # The +options+ parameter can be anything CSV::new() understands.
+ # Raises an exception if the argument is +nil+:
+ # # Raises ArgumentError (Cannot parse nil as CSV):
+ # CSV.parse_line(nil)
#
def parse_line(line, **options)
- new(line, **options).shift
+ new(line, **options).each.first
end
#
- # Use to slurp a CSV file into an Array of Arrays. Pass the +path+ to the
- # file and any +options+ CSV::new() understands. This method also understands
- # an additional <tt>:encoding</tt> parameter that you can use to specify the
- # Encoding of the data in the file to be read. You must provide this unless
- # your data is in Encoding::default_external(). CSV will use this to determine
- # how to parse the data. You may provide a second Encoding to have the data
- # transcoded as it is read. For example,
- # <tt>encoding: "UTF-32BE:UTF-8"</tt> would read UTF-32BE data from the file
- # but transcode it to UTF-8 before CSV parses it.
+ # :call-seq:
+ # read(source, **options) -> array_of_arrays
+ # read(source, headers: true, **options) -> csv_table
+ #
+ # Opens the given +source+ with the given +options+ (see CSV.open),
+ # reads the source (see CSV#read), and returns the result,
+ # which will be either an \Array of Arrays or a CSV::Table.
+ #
+ # Without headers:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.read(path) # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
#
+ # With headers:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.read(path, headers: true) # => #<CSV::Table mode:col_or_row row_count:4>
def read(path, **options)
open(path, **options) { |csv| csv.read }
end
- # Alias for CSV::read().
+ # :call-seq:
+ # CSV.readlines(source, **options)
+ #
+ # Alias for CSV.read.
def readlines(path, **options)
read(path, **options)
end
+ # :call-seq:
+ # CSV.table(source, **options)
#
- # A shortcut for:
+ # Calls CSV.read with +source+, +options+, and certain default options:
+ # - +headers+: +true+
+ # - +converters+: +:numeric+
+ # - +header_converters+: +:symbol+
#
- # CSV.read( path, { headers: true,
- # converters: :numeric,
- # header_converters: :symbol }.merge(options) )
+ # Returns a CSV::Table object.
#
+ # Example:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.table(path) # => #<CSV::Table mode:col_or_row row_count:4>
def table(path, **options)
default_options = {
headers: true,
@@ -738,191 +1863,50 @@ class CSV
end
end
+ # :call-seq:
+ # CSV.new(string)
+ # CSV.new(io)
+ # CSV.new(string, **options)
+ # CSV.new(io, **options)
+ #
+ # Returns the new \CSV object created using +string+ or +io+
+ # and the specified +options+.
+ #
+ # - Argument +string+ should be a \String object;
+ # it will be put into a new StringIO object positioned at the beginning.
+ # :include: ../doc/csv/arguments/io.rdoc
+ # - Argument +options+: See:
+ # * {Options for Parsing}[#class-CSV-label-Options+for+Parsing]
+ # * {Options for Generating}[#class-CSV-label-Options+for+Generating]
+ # For performance reasons, the options cannot be overridden
+ # in a \CSV object, so those specified here will endure.
#
- # This constructor will wrap either a String or IO object passed in +data+ for
- # reading and/or writing. In addition to the CSV instance methods, several IO
- # methods are delegated. (See CSV::open() for a complete list.) If you pass
- # a String for +data+, you can later retrieve it (after writing to it, for
- # example) with CSV.string().
- #
- # Note that a wrapped String will be positioned at the beginning (for
- # reading). If you want it at the end (for writing), use CSV::generate().
- # If you want any other positioning, pass a preset StringIO object instead.
- #
- # You may set any reading and/or writing preferences in the +options+ Hash.
- # Available options are:
- #
- # <b><tt>:col_sep</tt></b>:: The String placed between each field.
- # This String will be transcoded into
- # the data's Encoding before parsing.
- # <b><tt>:row_sep</tt></b>:: The String appended to the end of each
- # row. This can be set to the special
- # <tt>:auto</tt> setting, which requests
- # that CSV automatically discover this
- # from the data. Auto-discovery reads
- # ahead in the data looking for the next
- # <tt>"\r\n"</tt>, <tt>"\n"</tt>, or
- # <tt>"\r"</tt> sequence. A sequence
- # will be selected even if it occurs in
- # a quoted field, assuming that you
- # would have the same line endings
- # there. If none of those sequences is
- # found, +data+ is <tt>ARGF</tt>,
- # <tt>STDIN</tt>, <tt>STDOUT</tt>, or
- # <tt>STDERR</tt>, or the stream is only
- # available for output, the default
- # <tt>$INPUT_RECORD_SEPARATOR</tt>
- # (<tt>$/</tt>) is used. Obviously,
- # discovery takes a little time. Set
- # manually if speed is important. Also
- # note that IO objects should be opened
- # in binary mode on Windows if this
- # feature will be used as the
- # line-ending translation can cause
- # problems with resetting the document
- # position to where it was before the
- # read ahead. This String will be
- # transcoded into the data's Encoding
- # before parsing.
- # <b><tt>:quote_char</tt></b>:: The character used to quote fields.
- # This has to be a single character
- # String. This is useful for
- # application that incorrectly use
- # <tt>'</tt> as the quote character
- # instead of the correct <tt>"</tt>.
- # CSV will always consider a double
- # sequence of this character to be an
- # escaped quote. This String will be
- # transcoded into the data's Encoding
- # before parsing.
- # <b><tt>:field_size_limit</tt></b>:: This is a maximum size CSV will read
- # ahead looking for the closing quote
- # for a field. (In truth, it reads to
- # the first line ending beyond this
- # size.) If a quote cannot be found
- # within the limit CSV will raise a
- # MalformedCSVError, assuming the data
- # is faulty. You can use this limit to
- # prevent what are effectively DoS
- # attacks on the parser. However, this
- # limit can cause a legitimate parse to
- # fail and thus is set to +nil+, or off,
- # by default.
- # <b><tt>:converters</tt></b>:: An Array of names from the Converters
- # Hash and/or lambdas that handle custom
- # conversion. A single converter
- # doesn't have to be in an Array. All
- # built-in converters try to transcode
- # fields to UTF-8 before converting.
- # The conversion will fail if the data
- # cannot be transcoded, leaving the
- # field unchanged.
- # <b><tt>:unconverted_fields</tt></b>:: If set to +true+, an
- # unconverted_fields() method will be
- # added to all returned rows (Array or
- # CSV::Row) that will return the fields
- # as they were before conversion. Note
- # that <tt>:headers</tt> supplied by
- # Array or String were not fields of the
- # document and thus will have an empty
- # Array attached.
- # <b><tt>:headers</tt></b>:: If set to <tt>:first_row</tt> or
- # +true+, the initial row of the CSV
- # file will be treated as a row of
- # headers. If set to an Array, the
- # contents will be used as the headers.
- # If set to a String, the String is run
- # through a call of CSV::parse_line()
- # with the same <tt>:col_sep</tt>,
- # <tt>:row_sep</tt>, and
- # <tt>:quote_char</tt> as this instance
- # to produce an Array of headers. This
- # setting causes CSV#shift() to return
- # rows as CSV::Row objects instead of
- # Arrays and CSV#read() to return
- # CSV::Table objects instead of an Array
- # of Arrays.
- # <b><tt>:return_headers</tt></b>:: When +false+, header rows are silently
- # swallowed. If set to +true+, header
- # rows are returned in a CSV::Row object
- # with identical headers and
- # fields (save that the fields do not go
- # through the converters).
- # <b><tt>:write_headers</tt></b>:: When +true+ and <tt>:headers</tt> is
- # set, a header row will be added to the
- # output.
- # <b><tt>:header_converters</tt></b>:: Identical in functionality to
- # <tt>:converters</tt> save that the
- # conversions are only made to header
- # rows. All built-in converters try to
- # transcode headers to UTF-8 before
- # converting. The conversion will fail
- # if the data cannot be transcoded,
- # leaving the header unchanged.
- # <b><tt>:skip_blanks</tt></b>:: When setting a +true+ value, CSV will
- # skip over any empty rows. Note that
- # this setting will not skip rows that
- # contain column separators, even if
- # the rows contain no actual data. If
- # you want to skip rows that contain
- # separators but no content, consider
- # using <tt>:skip_lines</tt>, or
- # inspecting fields.compact.empty? on
- # each row.
- # <b><tt>:force_quotes</tt></b>:: When setting a +true+ value, CSV will
- # quote all CSV fields it creates.
- # <b><tt>:skip_lines</tt></b>:: When setting an object responding to
- # <tt>match</tt>, every line matching
- # it is considered a comment and ignored
- # during parsing. When set to a String,
- # it is first converted to a Regexp.
- # When set to +nil+ no line is considered
- # a comment. If the passed object does
- # not respond to <tt>match</tt>,
- # <tt>ArgumentError</tt> is thrown.
- # <b><tt>:liberal_parsing</tt></b>:: When setting a +true+ value, CSV will
- # attempt to parse input not conformant
- # with RFC 4180, such as double quotes
- # in unquoted fields.
- # <b><tt>:nil_value</tt></b>:: When set an object, any values of an
- # empty field is replaced by the set
- # object, not nil.
- # <b><tt>:empty_value</tt></b>:: When setting an object, any values of a
- # blank string field is replaced by
- # the set object.
- # <b><tt>:quote_empty</tt></b>:: When setting a +true+ value, CSV will
- # quote empty values with double quotes.
- # When +false+, CSV will emit an
- # empty string for an empty field value.
- # <b><tt>:write_converters</tt></b>:: Converts values on each line with the
- # specified <tt>Proc</tt> object(s),
- # which receive a <tt>String</tt> value
- # and return a <tt>String</tt> or +nil+
- # value.
- # When an array is specified, each
- # converter will be applied in order.
- # <b><tt>:write_nil_value</tt></b>:: When a <tt>String</tt> value, +nil+
- # value(s) on each line will be replaced
- # with the specified value.
- # <b><tt>:write_empty_value</tt></b>:: When a <tt>String</tt> or +nil+ value,
- # empty value(s) on each line will be
- # replaced with the specified value.
- # <b><tt>:strip</tt></b>:: When setting a +true+ value, CSV will
- # strip "\t\r\n\f\v" around the values.
- # If you specify a string instead of
- # +true+, CSV will strip string. The
- # length of the string must be 1.
- #
- # See CSV::DEFAULT_OPTIONS for the default settings.
- #
- # Options cannot be overridden in the instance methods for performance reasons,
- # so be sure to set what you want here.
+ # In addition to the \CSV instance methods, several \IO methods are delegated.
+ # See {Delegated Methods}[#class-CSV-label-Delegated+Methods].
+ #
+ # ---
+ #
+ # Create a \CSV object from a \String object:
+ # csv = CSV.new('foo,0')
+ # csv # => #<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ #
+ # Create a \CSV object from a \File object:
+ # File.write('t.csv', 'foo,0')
+ # csv = CSV.new(File.open('t.csv'))
+ # csv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
+ #
+ # ---
+ #
+ # Raises an exception if the argument is +nil+:
+ # # Raises ArgumentError (Cannot parse nil as CSV):
+ # CSV.new(nil)
#
def initialize(data,
col_sep: ",",
row_sep: :auto,
quote_char: '"',
field_size_limit: nil,
+ max_field_size: nil,
converters: nil,
unconverted_fields: nil,
headers: false,
@@ -938,16 +1922,27 @@ class CSV
encoding: nil,
nil_value: nil,
empty_value: "",
+ strip: false,
quote_empty: true,
write_converters: nil,
write_nil_value: nil,
- write_empty_value: "",
- strip: false)
+ write_empty_value: "")
raise ArgumentError.new("Cannot parse nil as CSV") if data.nil?
if data.is_a?(String)
+ if encoding
+ if encoding.is_a?(String)
+ data_external_encoding, data_internal_encoding = encoding.split(":", 2)
+ if data_internal_encoding
+ data = data.encode(data_internal_encoding, data_external_encoding)
+ else
+ data = data.dup.force_encoding(data_external_encoding)
+ end
+ else
+ data = data.dup.force_encoding(encoding)
+ end
+ end
@io = StringIO.new(data)
- @io.set_encoding(encoding || data.encoding)
else
@io = data
end
@@ -965,11 +1960,14 @@ class CSV
@initial_header_converters = header_converters
@initial_write_converters = write_converters
+ if max_field_size.nil? and field_size_limit
+ max_field_size = field_size_limit - 1
+ end
@parser_options = {
column_separator: col_sep,
row_separator: row_sep,
quote_character: quote_char,
- field_size_limit: field_size_limit,
+ max_field_size: max_field_size,
unconverted_fields: unconverted_fields,
headers: headers,
return_headers: return_headers,
@@ -1001,51 +1999,85 @@ class CSV
writer if @writer_options[:write_headers]
end
+ # :call-seq:
+ # csv.col_sep -> string
#
- # The encoded <tt>:col_sep</tt> used in parsing and writing.
- # See CSV::new for details.
- #
+ # Returns the encoded column separator; used for parsing and writing;
+ # see {Option +col_sep+}[#class-CSV-label-Option+col_sep]:
+ # CSV.new('').col_sep # => ","
def col_sep
parser.column_separator
end
+ # :call-seq:
+ # csv.row_sep -> string
#
- # The encoded <tt>:row_sep</tt> used in parsing and writing.
- # See CSV::new for details.
- #
+ # Returns the encoded row separator; used for parsing and writing;
+ # see {Option +row_sep+}[#class-CSV-label-Option+row_sep]:
+ # CSV.new('').row_sep # => "\n"
def row_sep
parser.row_separator
end
+ # :call-seq:
+ # csv.quote_char -> character
#
- # The encoded <tt>:quote_char</tt> used in parsing and writing.
- # See CSV::new for details.
- #
+ # Returns the encoded quote character; used for parsing and writing;
+ # see {Option +quote_char+}[#class-CSV-label-Option+quote_char]:
+ # CSV.new('').quote_char # => "\""
def quote_char
parser.quote_character
end
+ # :call-seq:
+ # csv.field_size_limit -> integer or nil
#
- # The limit for field size, if any.
- # See CSV::new for details.
+ # Returns the limit for field size; used for parsing;
+ # see {Option +field_size_limit+}[#class-CSV-label-Option+field_size_limit]:
+ # CSV.new('').field_size_limit # => nil
#
+ # Deprecated since 3.2.3. Use +max_field_size+ instead.
def field_size_limit
parser.field_size_limit
end
+ # :call-seq:
+ # csv.max_field_size -> integer or nil
#
- # The regex marking a line as a comment.
- # See CSV::new for details.
+ # Returns the limit for field size; used for parsing;
+ # see {Option +max_field_size+}[#class-CSV-label-Option+max_field_size]:
+ # CSV.new('').max_field_size # => nil
#
+ # Since 3.2.3.
+ def max_field_size
+ parser.max_field_size
+ end
+
+ # :call-seq:
+ # csv.skip_lines -> regexp or nil
+ #
+ # Returns the \Regexp used to identify comment lines; used for parsing;
+ # see {Option +skip_lines+}[#class-CSV-label-Option+skip_lines]:
+ # CSV.new('').skip_lines # => nil
def skip_lines
parser.skip_lines
end
- #
- # Returns the current list of converters in effect. See CSV::new for details.
- # Built-in converters will be returned by name, while others will be returned
- # as is.
- #
+ # :call-seq:
+ # csv.converters -> array
+ #
+ # Returns an \Array containing field converters;
+ # see {Field Converters}[#class-CSV-label-Field+Converters]:
+ # csv = CSV.new('')
+ # csv.converters # => []
+ # csv.convert(:integer)
+ # csv.converters # => [:integer]
+ # csv.convert(proc {|x| x.to_s })
+ # csv.converters
+ #
+ # Notes that you need to call
+ # +Ractor.make_shareable(CSV::Converters)+ on the main Ractor to use
+ # this method.
def converters
parser_fields_converter.map do |converter|
name = Converters.rassoc(converter)
@@ -1053,19 +2085,23 @@ class CSV
end
end
+ # :call-seq:
+ # csv.unconverted_fields? -> object
#
- # Returns +true+ if unconverted_fields() to parsed results.
- # See CSV::new for details.
- #
+ # Returns the value that determines whether unconverted fields are to be
+ # available; used for parsing;
+ # see {Option +unconverted_fields+}[#class-CSV-label-Option+unconverted_fields]:
+ # CSV.new('').unconverted_fields? # => nil
def unconverted_fields?
parser.unconverted_fields?
end
+ # :call-seq:
+ # csv.headers -> object
#
- # Returns +nil+ if headers will not be used, +true+ if they will but have not
- # yet been read, or the actual headers after they have been read.
- # See CSV::new for details.
- #
+ # Returns the value that determines whether headers are used; used for parsing;
+ # see {Option +headers+}[#class-CSV-label-Option+headers]:
+ # CSV.new('').headers # => nil
def headers
if @writer
@writer.headers
@@ -1077,27 +2113,37 @@ class CSV
raw_headers
end
end
+
+ # :call-seq:
+ # csv.return_headers? -> true or false
#
- # Returns +true+ if headers will be returned as a row of results.
- # See CSV::new for details.
- #
+ # Returns the value that determines whether headers are to be returned; used for parsing;
+ # see {Option +return_headers+}[#class-CSV-label-Option+return_headers]:
+ # CSV.new('').return_headers? # => false
def return_headers?
parser.return_headers?
end
+ # :call-seq:
+ # csv.write_headers? -> true or false
#
- # Returns +true+ if headers are written in output.
- # See CSV::new for details.
- #
+ # Returns the value that determines whether headers are to be written; used for generating;
+ # see {Option +write_headers+}[#class-CSV-label-Option+write_headers]:
+ # CSV.new('').write_headers? # => nil
def write_headers?
@writer_options[:write_headers]
end
+ # :call-seq:
+ # csv.header_converters -> array
#
- # Returns the current list of converters in effect for headers. See CSV::new
- # for details. Built-in converters will be returned by name, while others
- # will be returned as is.
+ # Returns an \Array containing header converters; used for parsing;
+ # see {Header Converters}[#class-CSV-label-Header+Converters]:
+ # CSV.new('').header_converters # => []
#
+ # Notes that you need to call
+ # +Ractor.make_shareable(CSV::HeaderConverters)+ on the main Ractor
+ # to use this method.
def header_converters
header_fields_converter.map do |converter|
name = HeaderConverters.rassoc(converter)
@@ -1105,34 +2151,74 @@ class CSV
end
end
+ # :call-seq:
+ # csv.skip_blanks? -> true or false
#
- # Returns +true+ blank lines are skipped by the parser. See CSV::new
- # for details.
- #
+ # Returns the value that determines whether blank lines are to be ignored; used for parsing;
+ # see {Option +skip_blanks+}[#class-CSV-label-Option+skip_blanks]:
+ # CSV.new('').skip_blanks? # => false
def skip_blanks?
parser.skip_blanks?
end
- # Returns +true+ if all output fields are quoted. See CSV::new for details.
+ # :call-seq:
+ # csv.force_quotes? -> true or false
+ #
+ # Returns the value that determines whether all output fields are to be quoted;
+ # used for generating;
+ # see {Option +force_quotes+}[#class-CSV-label-Option+force_quotes]:
+ # CSV.new('').force_quotes? # => false
def force_quotes?
@writer_options[:force_quotes]
end
- # Returns +true+ if illegal input is handled. See CSV::new for details.
+ # :call-seq:
+ # csv.liberal_parsing? -> true or false
+ #
+ # Returns the value that determines whether illegal input is to be handled; used for parsing;
+ # see {Option +liberal_parsing+}[#class-CSV-label-Option+liberal_parsing]:
+ # CSV.new('').liberal_parsing? # => false
def liberal_parsing?
parser.liberal_parsing?
end
+ # :call-seq:
+ # csv.encoding -> encoding
#
- # The Encoding CSV is parsing or writing in. This will be the Encoding you
- # receive parsed data in and/or the Encoding data will be written in.
- #
+ # Returns the encoding used for parsing and generating;
+ # see {Character Encodings (M17n or Multilingualization)}[#class-CSV-label-Character+Encodings+-28M17n+or+Multilingualization-29]:
+ # CSV.new('').encoding # => #<Encoding:UTF-8>
attr_reader :encoding
- #
- # The line number of the last row read from this file. Fields with nested
- # line-end characters will not affect this count.
- #
+ # :call-seq:
+ # csv.line_no -> integer
+ #
+ # Returns the count of the rows parsed or generated.
+ #
+ # Parsing:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.open(path) do |csv|
+ # csv.each do |row|
+ # p [csv.lineno, row]
+ # end
+ # end
+ # Output:
+ # [1, ["foo", "0"]]
+ # [2, ["bar", "1"]]
+ # [3, ["baz", "2"]]
+ #
+ # Generating:
+ # CSV.generate do |csv|
+ # p csv.lineno; csv << ['foo', 0]
+ # p csv.lineno; csv << ['bar', 1]
+ # p csv.lineno; csv << ['baz', 2]
+ # end
+ # Output:
+ # 0
+ # 1
+ # 2
def lineno
if @writer
@writer.lineno
@@ -1141,9 +2227,22 @@ class CSV
end
end
- #
- # The last row read from this file.
- #
+ # :call-seq:
+ # csv.line -> array
+ #
+ # Returns the line most recently read:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # CSV.open(path) do |csv|
+ # csv.each do |row|
+ # p [csv.lineno, csv.line]
+ # end
+ # end
+ # Output:
+ # [1, "foo,0\n"]
+ # [2, "bar,1\n"]
+ # [3, "baz,2\n"]
def line
parser.line
end
@@ -1219,13 +2318,56 @@ class CSV
### End Delegation ###
- #
- # The primary write method for wrapped Strings and IOs, +row+ (an Array or
- # CSV::Row) is converted to CSV and appended to the data source. When a
- # CSV::Row is passed, only the row's fields() are appended to the output.
- #
- # The data source must be open for writing.
- #
+ # :call-seq:
+ # csv << row -> self
+ #
+ # Appends a row to +self+.
+ #
+ # - Argument +row+ must be an \Array object or a CSV::Row object.
+ # - The output stream must be open for writing.
+ #
+ # ---
+ #
+ # Append Arrays:
+ # CSV.generate do |csv|
+ # csv << ['foo', 0]
+ # csv << ['bar', 1]
+ # csv << ['baz', 2]
+ # end # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # Append CSV::Rows:
+ # headers = []
+ # CSV.generate do |csv|
+ # csv << CSV::Row.new(headers, ['foo', 0])
+ # csv << CSV::Row.new(headers, ['bar', 1])
+ # csv << CSV::Row.new(headers, ['baz', 2])
+ # end # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # Headers in CSV::Row objects are not appended:
+ # headers = ['Name', 'Count']
+ # CSV.generate do |csv|
+ # csv << CSV::Row.new(headers, ['foo', 0])
+ # csv << CSV::Row.new(headers, ['bar', 1])
+ # csv << CSV::Row.new(headers, ['baz', 2])
+ # end # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # ---
+ #
+ # Raises an exception if +row+ is not an \Array or \CSV::Row:
+ # CSV.generate do |csv|
+ # # Raises NoMethodError (undefined method `collect' for :foo:Symbol)
+ # csv << :foo
+ # end
+ #
+ # Raises an exception if the output stream is not opened for writing:
+ # path = 't.csv'
+ # File.write(path, '')
+ # File.open(path) do |file|
+ # CSV.open(file) do |csv|
+ # # Raises IOError (not opened for writing)
+ # csv << ['foo', 0]
+ # end
+ # end
def <<(row)
writer << row
self
@@ -1233,58 +2375,222 @@ class CSV
alias_method :add_row, :<<
alias_method :puts, :<<
- #
# :call-seq:
- # convert( name )
- # convert { |field| ... }
- # convert { |field, field_info| ... }
- #
- # You can use this method to install a CSV::Converters built-in, or provide a
- # block that handles a custom conversion.
- #
- # If you provide a block that takes one argument, it will be passed the field
- # and is expected to return the converted value or the field itself. If your
- # block takes two arguments, it will also be passed a CSV::FieldInfo Struct,
- # containing details about the field. Again, the block should return a
- # converted field or the field itself.
- #
+ # convert(converter_name) -> array_of_procs
+ # convert {|field, field_info| ... } -> array_of_procs
+ #
+ # - With no block, installs a field converter (a \Proc).
+ # - With a block, defines and installs a custom field converter.
+ # - Returns the \Array of installed field converters.
+ #
+ # - Argument +converter_name+, if given, should be the name
+ # of an existing field converter.
+ #
+ # See {Field Converters}[#class-CSV-label-Field+Converters].
+ # ---
+ #
+ # With no block, installs a field converter:
+ # csv = CSV.new('')
+ # csv.convert(:integer)
+ # csv.convert(:float)
+ # csv.convert(:date)
+ # csv.converters # => [:integer, :float, :date]
+ #
+ # ---
+ #
+ # The block, if given, is called for each field:
+ # - Argument +field+ is the field value.
+ # - Argument +field_info+ is a CSV::FieldInfo object
+ # containing details about the field.
+ #
+ # The examples here assume the prior execution of:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # Example giving a block:
+ # csv = CSV.open(path)
+ # csv.convert {|field, field_info| p [field, field_info]; field.upcase }
+ # csv.read # => [["FOO", "0"], ["BAR", "1"], ["BAZ", "2"]]
+ #
+ # Output:
+ # ["foo", #<struct CSV::FieldInfo index=0, line=1, header=nil>]
+ # ["0", #<struct CSV::FieldInfo index=1, line=1, header=nil>]
+ # ["bar", #<struct CSV::FieldInfo index=0, line=2, header=nil>]
+ # ["1", #<struct CSV::FieldInfo index=1, line=2, header=nil>]
+ # ["baz", #<struct CSV::FieldInfo index=0, line=3, header=nil>]
+ # ["2", #<struct CSV::FieldInfo index=1, line=3, header=nil>]
+ #
+ # The block need not return a \String object:
+ # csv = CSV.open(path)
+ # csv.convert {|field, field_info| field.to_sym }
+ # csv.read # => [[:foo, :"0"], [:bar, :"1"], [:baz, :"2"]]
+ #
+ # If +converter_name+ is given, the block is not called:
+ # csv = CSV.open(path)
+ # csv.convert(:integer) {|field, field_info| fail 'Cannot happen' }
+ # csv.read # => [["foo", 0], ["bar", 1], ["baz", 2]]
+ #
+ # ---
+ #
+ # Raises a parse-time exception if +converter_name+ is not the name of a built-in
+ # field converter:
+ # csv = CSV.open(path)
+ # csv.convert(:nosuch) => [nil]
+ # # Raises NoMethodError (undefined method `arity' for nil:NilClass)
+ # csv.read
def convert(name = nil, &converter)
parser_fields_converter.add_converter(name, &converter)
end
- #
# :call-seq:
- # header_convert( name )
- # header_convert { |field| ... }
- # header_convert { |field, field_info| ... }
- #
- # Identical to CSV#convert(), but for header rows.
- #
- # Note that this method must be called before header rows are read to have any
- # effect.
- #
+ # header_convert(converter_name) -> array_of_procs
+ # header_convert {|header, field_info| ... } -> array_of_procs
+ #
+ # - With no block, installs a header converter (a \Proc).
+ # - With a block, defines and installs a custom header converter.
+ # - Returns the \Array of installed header converters.
+ #
+ # - Argument +converter_name+, if given, should be the name
+ # of an existing header converter.
+ #
+ # See {Header Converters}[#class-CSV-label-Header+Converters].
+ # ---
+ #
+ # With no block, installs a header converter:
+ # csv = CSV.new('')
+ # csv.header_convert(:symbol)
+ # csv.header_convert(:downcase)
+ # csv.header_converters # => [:symbol, :downcase]
+ #
+ # ---
+ #
+ # The block, if given, is called for each header:
+ # - Argument +header+ is the header value.
+ # - Argument +field_info+ is a CSV::FieldInfo object
+ # containing details about the header.
+ #
+ # The examples here assume the prior execution of:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ #
+ # Example giving a block:
+ # csv = CSV.open(path, headers: true)
+ # csv.header_convert {|header, field_info| p [header, field_info]; header.upcase }
+ # table = csv.read
+ # table # => #<CSV::Table mode:col_or_row row_count:4>
+ # table.headers # => ["NAME", "VALUE"]
+ #
+ # Output:
+ # ["Name", #<struct CSV::FieldInfo index=0, line=1, header=nil>]
+ # ["Value", #<struct CSV::FieldInfo index=1, line=1, header=nil>]
+
+ # The block need not return a \String object:
+ # csv = CSV.open(path, headers: true)
+ # csv.header_convert {|header, field_info| header.to_sym }
+ # table = csv.read
+ # table.headers # => [:Name, :Value]
+ #
+ # If +converter_name+ is given, the block is not called:
+ # csv = CSV.open(path, headers: true)
+ # csv.header_convert(:downcase) {|header, field_info| fail 'Cannot happen' }
+ # table = csv.read
+ # table.headers # => ["name", "value"]
+ # ---
+ #
+ # Raises a parse-time exception if +converter_name+ is not the name of a built-in
+ # field converter:
+ # csv = CSV.open(path, headers: true)
+ # csv.header_convert(:nosuch)
+ # # Raises NoMethodError (undefined method `arity' for nil:NilClass)
+ # csv.read
def header_convert(name = nil, &converter)
header_fields_converter.add_converter(name, &converter)
end
include Enumerable
- #
- # Yields each row of the data source in turn.
- #
- # Support for Enumerable.
- #
- # The data source must be open for reading.
- #
+ # :call-seq:
+ # csv.each -> enumerator
+ # csv.each {|row| ...}
+ #
+ # Calls the block with each successive row.
+ # The data source must be opened for reading.
+ #
+ # Without headers:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.each do |row|
+ # p row
+ # end
+ # Output:
+ # ["foo", "0"]
+ # ["bar", "1"]
+ # ["baz", "2"]
+ #
+ # With headers:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string, headers: true)
+ # csv.each do |row|
+ # p row
+ # end
+ # Output:
+ # <CSV::Row "Name":"foo" "Value":"0">
+ # <CSV::Row "Name":"bar" "Value":"1">
+ # <CSV::Row "Name":"baz" "Value":"2">
+ #
+ # ---
+ #
+ # Raises an exception if the source is not opened for reading:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.close
+ # # Raises IOError (not opened for reading)
+ # csv.each do |row|
+ # p row
+ # end
def each(&block)
- parser_enumerator.each(&block)
+ return to_enum(__method__) unless block_given?
+ begin
+ while true
+ yield(parser_enumerator.next)
+ end
+ rescue StopIteration
+ end
end
- #
- # Slurps the remaining rows and returns an Array of Arrays.
- #
- # The data source must be open for reading.
- #
+ # :call-seq:
+ # csv.read -> array or csv_table
+ #
+ # Forms the remaining rows from +self+ into:
+ # - A CSV::Table object, if headers are in use.
+ # - An \Array of Arrays, otherwise.
+ #
+ # The data source must be opened for reading.
+ #
+ # Without headers:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # csv = CSV.open(path)
+ # csv.read # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # With headers:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # path = 't.csv'
+ # File.write(path, string)
+ # csv = CSV.open(path, headers: true)
+ # csv.read # => #<CSV::Table mode:col_or_row row_count:4>
+ #
+ # ---
+ #
+ # Raises an exception if the source is not opened for reading:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.close
+ # # Raises IOError (not opened for reading)
+ # csv.read
def read
rows = to_a
if parser.use_headers?
@@ -1295,18 +2601,69 @@ class CSV
end
alias_method :readlines, :read
- # Returns +true+ if the next row read will be a header row.
+ # :call-seq:
+ # csv.header_row? -> true or false
+ #
+ # Returns +true+ if the next row to be read is a header row\;
+ # +false+ otherwise.
+ #
+ # Without headers:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.header_row? # => false
+ #
+ # With headers:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string, headers: true)
+ # csv.header_row? # => true
+ # csv.shift # => #<CSV::Row "Name":"foo" "Value":"0">
+ # csv.header_row? # => false
+ #
+ # ---
+ #
+ # Raises an exception if the source is not opened for reading:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.close
+ # # Raises IOError (not opened for reading)
+ # csv.header_row?
def header_row?
parser.header_row?
end
- #
- # The primary read method for wrapped Strings and IOs, a single row is pulled
- # from the data source, parsed and returned as an Array of fields (if header
- # rows are not used) or a CSV::Row (when header rows are used).
- #
- # The data source must be open for reading.
- #
+ # :call-seq:
+ # csv.shift -> array, csv_row, or nil
+ #
+ # Returns the next row of data as:
+ # - An \Array if no headers are used.
+ # - A CSV::Row object if headers are used.
+ #
+ # The data source must be opened for reading.
+ #
+ # Without headers:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.shift # => ["foo", "0"]
+ # csv.shift # => ["bar", "1"]
+ # csv.shift # => ["baz", "2"]
+ # csv.shift # => nil
+ #
+ # With headers:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string, headers: true)
+ # csv.shift # => #<CSV::Row "Name":"foo" "Value":"0">
+ # csv.shift # => #<CSV::Row "Name":"bar" "Value":"1">
+ # csv.shift # => #<CSV::Row "Name":"baz" "Value":"2">
+ # csv.shift # => nil
+ #
+ # ---
+ #
+ # Raises an exception if the source is not opened for reading:
+ # string = "foo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string)
+ # csv.close
+ # # Raises IOError (not opened for reading)
+ # csv.shift
def shift
if @eof_error
eof_error, @eof_error = @eof_error, nil
@@ -1321,10 +2678,14 @@ class CSV
alias_method :gets, :shift
alias_method :readline, :shift
+ # :call-seq:
+ # csv.inspect -> string
#
- # Returns a simplified description of the key CSV attributes in an
- # ASCII compatible String.
- #
+ # Returns a \String showing certain properties of +self+:
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # csv = CSV.new(string, headers: true)
+ # s = csv.inspect
+ # s # => "#<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\" headers:true>"
def inspect
str = ["#<", self.class.to_s, " io_type:"]
# show type of wrapped IO
@@ -1429,7 +2790,7 @@ class CSV
def build_parser_fields_converter
specific_options = {
- builtin_converters: Converters,
+ builtin_converters_name: :Converters,
}
options = @base_fields_converter_options.merge(specific_options)
build_fields_converter(@initial_converters, options)
@@ -1441,7 +2802,7 @@ class CSV
def build_header_fields_converter
specific_options = {
- builtin_converters: HeaderConverters,
+ builtin_converters_name: :HeaderConverters,
accept_nil: true,
}
options = @base_fields_converter_options.merge(specific_options)
@@ -1504,8 +2865,15 @@ end
# c.read.any? { |a| a.include?("zombies") }
# } #=> false
#
-def CSV(*args, &block)
- CSV.instance(*args, &block)
+# CSV options may also be given.
+#
+# io = StringIO.new
+# CSV(io, col_sep: ";") { |csv| csv << ["a", "b", "c"] }
+#
+# This API is not Ractor-safe.
+#
+def CSV(*args, **options, &block)
+ CSV.instance(*args, **options, &block)
end
require_relative "csv/version"
diff --git a/lib/csv/csv.gemspec b/lib/csv/csv.gemspec
index 98110bc13c..11c5b0f2a6 100644
--- a/lib/csv/csv.gemspec
+++ b/lib/csv/csv.gemspec
@@ -16,29 +16,49 @@ Gem::Specification.new do |spec|
spec.summary = "CSV Reading and Writing"
spec.description = "The CSV library provides a complete interface to CSV files and data. It offers tools to enable you to read and write to and from Strings or IO objects, as needed."
spec.homepage = "https://github.com/ruby/csv"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [
+ lib_path = "lib"
+ spec.require_paths = [lib_path]
+ files = []
+ lib_dir = File.join(__dir__, lib_path)
+ if File.exist?(lib_dir)
+ Dir.chdir(lib_dir) do
+ Dir.glob("**/*.rb").each do |file|
+ files << "lib/#{file}"
+ end
+ end
+ end
+ doc_dir = File.join(__dir__, "doc")
+ if File.exist?(doc_dir)
+ Dir.chdir(doc_dir) do
+ Dir.glob("**/*.rdoc").each do |rdoc_file|
+ files << "doc/#{rdoc_file}"
+ end
+ end
+ end
+ spec.files = files
+ spec.rdoc_options.concat(["--main", "README.md"])
+ rdoc_files = [
"LICENSE.txt",
"NEWS.md",
"README.md",
- "lib/csv.rb",
- "lib/csv/core_ext/array.rb",
- "lib/csv/core_ext/string.rb",
- "lib/csv/delete_suffix.rb",
- "lib/csv/fields_converter.rb",
- "lib/csv/match_p.rb",
- "lib/csv/parser.rb",
- "lib/csv/row.rb",
- "lib/csv/table.rb",
- "lib/csv/version.rb",
- "lib/csv/writer.rb",
]
- spec.require_paths = ["lib"]
- spec.required_ruby_version = ">= 2.3.0"
+ recipes_dir = File.join(doc_dir, "csv", "recipes")
+ if File.exist?(recipes_dir)
+ Dir.chdir(recipes_dir) do
+ Dir.glob("**/*.rdoc").each do |recipe_file|
+ rdoc_files << "doc/csv/recipes/#{recipe_file}"
+ end
+ end
+ end
+ spec.extra_rdoc_files = rdoc_files
+ spec.required_ruby_version = ">= 2.5.0"
+
+ # spec.add_dependency "stringio", ">= 0.1.3"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "benchmark_driver"
- spec.add_development_dependency "simplecov"
+ spec.add_development_dependency "test-unit", ">= 3.4.8"
end
diff --git a/lib/csv/fields_converter.rb b/lib/csv/fields_converter.rb
index a751c9ea1d..d15977d379 100644
--- a/lib/csv/fields_converter.rb
+++ b/lib/csv/fields_converter.rb
@@ -16,7 +16,7 @@ class CSV
@empty_value = options[:empty_value]
@empty_value_is_empty_string = (@empty_value == "")
@accept_nil = options[:accept_nil]
- @builtin_converters = options[:builtin_converters]
+ @builtin_converters_name = options[:builtin_converters_name]
@need_static_convert = need_static_convert?
end
@@ -24,7 +24,7 @@ class CSV
if name.nil? # custom converter
@converters << converter
else # named converter
- combo = @builtin_converters[name]
+ combo = builtin_converters[name]
case combo
when Array # combo converter
combo.each do |sub_name|
@@ -44,13 +44,13 @@ class CSV
@converters.empty?
end
- def convert(fields, headers, lineno)
+ def convert(fields, headers, lineno, quoted_fields)
return fields unless need_convert?
fields.collect.with_index do |field, index|
if field.nil?
field = @nil_value
- elsif field.empty?
+ elsif field.is_a?(String) and field.empty?
field = @empty_value unless @empty_value_is_empty_string
end
@converters.each do |converter|
@@ -63,7 +63,8 @@ class CSV
else
header = nil
end
- field = converter[field, FieldInfo.new(index, lineno, header)]
+ quoted = quoted_fields[index]
+ field = converter[field, FieldInfo.new(index, lineno, header, quoted)]
end
break unless field.is_a?(String) # short-circuit pipeline for speed
end
@@ -80,5 +81,9 @@ class CSV
@need_static_convert or
(not @converters.empty?)
end
+
+ def builtin_converters
+ @builtin_converters ||= ::CSV.const_get(@builtin_converters_name)
+ end
end
end
diff --git a/lib/csv/input_record_separator.rb b/lib/csv/input_record_separator.rb
new file mode 100644
index 0000000000..7a99343c0c
--- /dev/null
+++ b/lib/csv/input_record_separator.rb
@@ -0,0 +1,18 @@
+require "English"
+require "stringio"
+
+class CSV
+ module InputRecordSeparator
+ class << self
+ if RUBY_VERSION >= "3.0.0"
+ def value
+ "\n"
+ end
+ else
+ def value
+ $INPUT_RECORD_SEPARATOR
+ end
+ end
+ end
+ end
+end
diff --git a/lib/csv/parser.rb b/lib/csv/parser.rb
index 42145f8923..afb3131cd5 100644
--- a/lib/csv/parser.rb
+++ b/lib/csv/parser.rb
@@ -2,14 +2,10 @@
require "strscan"
-require_relative "delete_suffix"
-require_relative "match_p"
+require_relative "input_record_separator"
require_relative "row"
require_relative "table"
-using CSV::DeleteSuffix if CSV.const_defined?(:DeleteSuffix)
-using CSV::MatchP if CSV.const_defined?(:MatchP)
-
class CSV
# Note: Don't use this class directly. This is an internal class.
class Parser
@@ -26,6 +22,10 @@ class CSV
class InvalidEncoding < StandardError
end
+ # Raised when unexpected case is happen.
+ class UnexpectedError < StandardError
+ end
+
#
# CSV::Scanner receives a CSV output, scans it and return the content.
# It also controls the life cycle of the object with its methods +keep_start+,
@@ -77,16 +77,17 @@ class CSV
# +keep_end+, +keep_back+, +keep_drop+.
#
# CSV::InputsScanner.scan() tries to match with pattern at the current position.
- # If there's a match, the scanner advances the “scan pointer†and returns the matched string.
+ # If there's a match, the scanner advances the "scan pointer" and returns the matched string.
# Otherwise, the scanner returns nil.
#
- # CSV::InputsScanner.rest() returns the “rest†of the string (i.e. everything after the scan pointer).
+ # CSV::InputsScanner.rest() returns the "rest" of the string (i.e. everything after the scan pointer).
# If there is no more data (eos? = true), it returns "".
#
class InputsScanner
- def initialize(inputs, encoding, chunk_size: 8192)
+ def initialize(inputs, encoding, row_separator, chunk_size: 8192)
@inputs = inputs.dup
@encoding = encoding
+ @row_separator = row_separator
@chunk_size = chunk_size
@last_scanner = @inputs.empty?
@keeps = []
@@ -94,11 +95,13 @@ class CSV
end
def each_line(row_separator)
+ return enum_for(__method__, row_separator) unless block_given?
buffer = nil
input = @scanner.rest
position = @scanner.pos
offset = 0
n_row_separator_chars = row_separator.size
+ # trace(__method__, :start, line, input)
while true
input.each_line(row_separator) do |line|
@scanner.pos += line.bytesize
@@ -138,25 +141,28 @@ class CSV
end
def scan(pattern)
+ # trace(__method__, pattern, :start)
value = @scanner.scan(pattern)
+ # trace(__method__, pattern, :done, :last, value) if @last_scanner
return value if @last_scanner
- if value
- read_chunk if @scanner.eos?
- return value
- else
- nil
- end
+ read_chunk if value and @scanner.eos?
+ # trace(__method__, pattern, :done, value)
+ value
end
def scan_all(pattern)
+ # trace(__method__, pattern, :start)
value = @scanner.scan(pattern)
+ # trace(__method__, pattern, :done, :last, value) if @last_scanner
return value if @last_scanner
return nil if value.nil?
while @scanner.eos? and read_chunk and (sub_value = @scanner.scan(pattern))
+ # trace(__method__, pattern, :sub, sub_value)
value << sub_value
end
+ # trace(__method__, pattern, :done, value)
value
end
@@ -165,76 +171,135 @@ class CSV
end
def keep_start
- @keeps.push([@scanner.pos, nil])
+ # trace(__method__, :start)
+ adjust_last_keep
+ @keeps.push([@scanner, @scanner.pos, nil])
+ # trace(__method__, :done)
end
def keep_end
- start, buffer = @keeps.pop
- keep = @scanner.string.byteslice(start, @scanner.pos - start)
+ # trace(__method__, :start)
+ scanner, start, buffer = @keeps.pop
+ if scanner == @scanner
+ keep = @scanner.string.byteslice(start, @scanner.pos - start)
+ else
+ keep = @scanner.string.byteslice(0, @scanner.pos)
+ end
if buffer
buffer << keep
keep = buffer
end
+ # trace(__method__, :done, keep)
keep
end
def keep_back
- start, buffer = @keeps.pop
+ # trace(__method__, :start)
+ scanner, start, buffer = @keeps.pop
if buffer
+ # trace(__method__, :rescan, start, buffer)
string = @scanner.string
- keep = string.byteslice(start, string.bytesize - start)
+ if scanner == @scanner
+ keep = string.byteslice(start, string.bytesize - start)
+ else
+ keep = string
+ end
if keep and not keep.empty?
@inputs.unshift(StringIO.new(keep))
@last_scanner = false
end
@scanner = StringScanner.new(buffer)
else
+ if @scanner != scanner
+ message = "scanners are different but no buffer: "
+ message += "#{@scanner.inspect}(#{@scanner.object_id}): "
+ message += "#{scanner.inspect}(#{scanner.object_id})"
+ raise UnexpectedError, message
+ end
+ # trace(__method__, :repos, start, buffer)
@scanner.pos = start
end
read_chunk if @scanner.eos?
end
def keep_drop
- @keeps.pop
+ _, _, buffer = @keeps.pop
+ # trace(__method__, :done, :empty) unless buffer
+ return unless buffer
+
+ last_keep = @keeps.last
+ # trace(__method__, :done, :no_last_keep) unless last_keep
+ return unless last_keep
+
+ if last_keep[2]
+ last_keep[2] << buffer
+ else
+ last_keep[2] = buffer
+ end
+ # trace(__method__, :done)
end
def rest
@scanner.rest
end
+ def check(pattern)
+ @scanner.check(pattern)
+ end
+
private
- def read_chunk
- return false if @last_scanner
+ def trace(*args)
+ pp([*args, @scanner, @scanner&.string, @scanner&.pos, @keeps])
+ end
- unless @keeps.empty?
- keep = @keeps.last
- keep_start = keep[0]
- string = @scanner.string
- keep_data = string.byteslice(keep_start, @scanner.pos - keep_start)
- if keep_data
- keep_buffer = keep[1]
- if keep_buffer
- keep_buffer << keep_data
- else
- keep[1] = keep_data.dup
- end
+ def adjust_last_keep
+ # trace(__method__, :start)
+
+ keep = @keeps.last
+ # trace(__method__, :done, :empty) if keep.nil?
+ return if keep.nil?
+
+ scanner, start, buffer = keep
+ string = @scanner.string
+ if @scanner != scanner
+ start = 0
+ end
+ if start == 0 and @scanner.eos?
+ keep_data = string
+ else
+ keep_data = string.byteslice(start, @scanner.pos - start)
+ end
+ if keep_data
+ if buffer
+ buffer << keep_data
+ else
+ keep[2] = keep_data.dup
end
- keep[0] = 0
end
+ # trace(__method__, :done)
+ end
+
+ def read_chunk
+ return false if @last_scanner
+
+ adjust_last_keep
+
input = @inputs.first
case input
when StringIO
string = input.read
raise InvalidEncoding unless string.valid_encoding?
+ # trace(__method__, :stringio, string)
@scanner = StringScanner.new(string)
@inputs.shift
@last_scanner = @inputs.empty?
true
else
- chunk = input.gets(nil, @chunk_size)
+ chunk = input.gets(@row_separator, @chunk_size)
if chunk
raise InvalidEncoding unless chunk.valid_encoding?
+ # trace(__method__, :chunk, chunk)
@scanner = StringScanner.new(chunk)
if input.respond_to?(:eof?) and input.eof?
@inputs.shift
@@ -242,6 +307,7 @@ class CSV
end
true
else
+ # trace(__method__, :no_chunk)
@scanner = StringScanner.new("".encode(@encoding))
@inputs.shift
@last_scanner = @inputs.empty?
@@ -276,7 +342,11 @@ class CSV
end
def field_size_limit
- @field_size_limit
+ @max_field_size&.succ
+ end
+
+ def max_field_size
+ @max_field_size
end
def skip_lines
@@ -344,6 +414,16 @@ class CSV
end
message = "Invalid byte sequence in #{@encoding}"
raise MalformedCSVError.new(message, lineno)
+ rescue UnexpectedError => error
+ if @scanner
+ ignore_broken_line
+ lineno = @lineno
+ else
+ lineno = @lineno + 1
+ end
+ message = "This should not be happen: #{error.message}: "
+ message += "Please report this to https://github.com/ruby/csv/issues"
+ raise MalformedCSVError.new(message, lineno)
end
end
@@ -360,6 +440,7 @@ class CSV
prepare_skip_lines
prepare_strip
prepare_separators
+ validate_strip_and_col_sep_options
prepare_quoted
prepare_unquoted
prepare_line
@@ -387,7 +468,7 @@ class CSV
@backslash_quote = false
end
@unconverted_fields = @options[:unconverted_fields]
- @field_size_limit = @options[:field_size_limit]
+ @max_field_size = @options[:max_field_size]
@skip_blanks = @options[:skip_blanks]
@fields_converter = @options[:fields_converter]
@header_fields_converter = @options[:header_fields_converter]
@@ -446,6 +527,7 @@ class CSV
@strip = @options[:strip]
@escaped_strip = nil
@strip_value = nil
+ @rstrip_value = nil
if @strip.is_a?(String)
case @strip.length
when 0
@@ -460,6 +542,8 @@ class CSV
if @quote_character
@strip_value = Regexp.new(@escaped_strip +
"+".encode(@encoding))
+ @rstrip_value = Regexp.new(@escaped_strip +
+ "+\\z".encode(@encoding))
end
@need_robust_parsing = true
elsif @strip
@@ -467,6 +551,7 @@ class CSV
@escaped_strip = strip_values.encode(@encoding)
if @quote_character
@strip_value = Regexp.new("[#{strip_values}]+".encode(@encoding))
+ @rstrip_value = Regexp.new("[#{strip_values}]+\\z".encode(@encoding))
end
@need_robust_parsing = true
end
@@ -475,9 +560,9 @@ class CSV
begin
StringScanner.new("x").scan("x")
rescue TypeError
- @@string_scanner_scan_accept_string = false
+ STRING_SCANNER_SCAN_ACCEPT_STRING = false
else
- @@string_scanner_scan_accept_string = true
+ STRING_SCANNER_SCAN_ACCEPT_STRING = true
end
def prepare_separators
@@ -501,7 +586,7 @@ class CSV
@first_column_separators = Regexp.new(@escaped_first_column_separator +
"+".encode(@encoding))
else
- if @@string_scanner_scan_accept_string
+ if STRING_SCANNER_SCAN_ACCEPT_STRING
@column_end = @column_separator
else
@column_end = Regexp.new(@escaped_column_separator)
@@ -522,10 +607,32 @@ class CSV
@cr = "\r".encode(@encoding)
@lf = "\n".encode(@encoding)
- @cr_or_lf = Regexp.new("[\r\n]".encode(@encoding))
+ @line_end = Regexp.new("\r\n|\n|\r".encode(@encoding))
@not_line_end = Regexp.new("[^\r\n]+".encode(@encoding))
end
+ # This method verifies that there are no (obvious) ambiguities with the
+ # provided +col_sep+ and +strip+ parsing options. For example, if +col_sep+
+ # and +strip+ were both equal to +\t+, then there would be no clear way to
+ # parse the input.
+ def validate_strip_and_col_sep_options
+ return unless @strip
+
+ if @strip.is_a?(String)
+ if @column_separator.start_with?(@strip) || @column_separator.end_with?(@strip)
+ raise ArgumentError,
+ "The provided strip (#{@escaped_strip}) and " \
+ "col_sep (#{@escaped_column_separator}) options are incompatible."
+ end
+ else
+ if Regexp.new("\\A[#{@escaped_strip}]|[#{@escaped_strip}]\\z").match?(@column_separator)
+ raise ArgumentError,
+ "The provided strip (true) and " \
+ "col_sep (#{@escaped_column_separator}) options are incompatible."
+ end
+ end
+ end
+
def prepare_quoted
if @quote_character
@quotes = Regexp.new(@escaped_quote_character +
@@ -561,9 +668,6 @@ class CSV
unless @liberal_parsing
no_unquoted_values << @escaped_quote_character
end
- if @escaped_strip
- no_unquoted_values << @escaped_strip
- end
@unquoted_value = Regexp.new("[^".encode(@encoding) +
no_unquoted_values +
"]+".encode(@encoding))
@@ -604,7 +708,7 @@ class CSV
# do nothing: ensure will set default
end
end
- separator = $INPUT_RECORD_SEPARATOR if separator == :auto
+ separator = InputRecordSeparator.value if separator == :auto
end
separator.to_s.encode(@encoding)
end
@@ -654,9 +758,10 @@ class CSV
case headers
when Array
@raw_headers = headers
+ quoted_fields = [false] * @raw_headers.size
@use_headers = true
when String
- @raw_headers = parse_headers(headers)
+ @raw_headers, quoted_fields = parse_headers(headers)
@use_headers = true
when nil, false
@raw_headers = nil
@@ -666,21 +771,28 @@ class CSV
@use_headers = true
end
if @raw_headers
- @headers = adjust_headers(@raw_headers)
+ @headers = adjust_headers(@raw_headers, quoted_fields)
else
@headers = nil
end
end
def parse_headers(row)
- CSV.parse_line(row,
- col_sep: @column_separator,
- row_sep: @row_separator,
- quote_char: @quote_character)
+ quoted_fields = []
+ converter = lambda do |field, info|
+ quoted_fields << info.quoted?
+ field
+ end
+ headers = CSV.parse_line(row,
+ col_sep: @column_separator,
+ row_sep: @row_separator,
+ quote_char: @quote_character,
+ converters: [converter])
+ [headers, quoted_fields]
end
- def adjust_headers(headers)
- adjusted_headers = @header_fields_converter.convert(headers, nil, @lineno)
+ def adjust_headers(headers, quoted_fields)
+ adjusted_headers = @header_fields_converter.convert(headers, nil, @lineno, quoted_fields)
adjusted_headers.each {|h| h.freeze if h.is_a? String}
adjusted_headers
end
@@ -703,26 +815,28 @@ class CSV
sample[0, 128].index(@quote_character)
end
- SCANNER_TEST = (ENV["CSV_PARSER_SCANNER_TEST"] == "yes")
- if SCANNER_TEST
- class UnoptimizedStringIO
- def initialize(string)
- @io = StringIO.new(string)
- end
+ class UnoptimizedStringIO # :nodoc:
+ def initialize(string)
+ @io = StringIO.new(string, "rb:#{string.encoding}")
+ end
- def gets(*args)
- @io.gets(*args)
- end
+ def gets(*args)
+ @io.gets(*args)
+ end
- def each_line(*args, &block)
- @io.each_line(*args, &block)
- end
+ def each_line(*args, &block)
+ @io.each_line(*args, &block)
+ end
- def eof?
- @io.eof?
- end
+ def eof?
+ @io.eof?
end
+ end
+ SCANNER_TEST = (ENV["CSV_PARSER_SCANNER_TEST"] == "yes")
+ if SCANNER_TEST
+ SCANNER_TEST_CHUNK_SIZE_NAME = "CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"
+ SCANNER_TEST_CHUNK_SIZE_VALUE = ENV[SCANNER_TEST_CHUNK_SIZE_NAME]
def build_scanner
inputs = @samples.collect do |sample|
UnoptimizedStringIO.new(sample)
@@ -732,17 +846,27 @@ class CSV
else
inputs << @input
end
- chunk_size = ENV["CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"] || "1"
+ begin
+ chunk_size_value = ENV[SCANNER_TEST_CHUNK_SIZE_NAME]
+ rescue # Ractor::IsolationError
+ # Ractor on Ruby 3.0 can't read ENV value.
+ chunk_size_value = SCANNER_TEST_CHUNK_SIZE_VALUE
+ end
+ chunk_size = Integer((chunk_size_value || "1"), 10)
InputsScanner.new(inputs,
@encoding,
- chunk_size: Integer(chunk_size, 10))
+ @row_separator,
+ chunk_size: chunk_size)
end
else
def build_scanner
string = nil
if @samples.empty? and @input.is_a?(StringIO)
string = @input.read
- elsif @samples.size == 1 and @input.respond_to?(:eof?) and @input.eof?
+ elsif @samples.size == 1 and
+ @input != ARGF and
+ @input.respond_to?(:eof?) and
+ @input.eof?
string = @samples[0]
end
if string
@@ -761,7 +885,7 @@ class CSV
StringIO.new(sample)
end
inputs << @input
- InputsScanner.new(inputs, @encoding)
+ InputsScanner.new(inputs, @encoding, @row_separator)
end
end
end
@@ -769,7 +893,7 @@ class CSV
def skip_needless_lines
return unless @skip_lines
- while true
+ until @scanner.eos?
@scanner.keep_start
line = @scanner.scan_all(@not_line_end) || "".encode(@encoding)
line << @row_separator if parse_row_end
@@ -784,6 +908,7 @@ class CSV
end
def skip_line?(line)
+ line = line.delete_suffix(@row_separator)
case @skip_lines
when String
line.include?(@skip_lines)
@@ -794,6 +919,14 @@ class CSV
end
end
+ def validate_field_size(field)
+ return unless @max_field_size
+ return if field.size <= @max_field_size
+ ignore_broken_line
+ message = "Field size exceeded: #{field.size} > #{@max_field_size}"
+ raise MalformedCSVError.new(message, @lineno)
+ end
+
def parse_no_quote(&block)
@scanner.each_line(@row_separator) do |line|
next if @skip_lines and skip_line?(line)
@@ -803,9 +936,16 @@ class CSV
if line.empty?
next if @skip_blanks
row = []
+ quoted_fields = []
else
line = strip_value(line)
row = line.split(@split_column_separator, -1)
+ quoted_fields = [false] * row.size
+ if @max_field_size
+ row.each do |column|
+ validate_field_size(column)
+ end
+ end
n_columns = row.size
i = 0
while i < n_columns
@@ -814,7 +954,7 @@ class CSV
end
end
@last_line = original_line
- emit_row(row, &block)
+ emit_row(row, quoted_fields, &block)
end
end
@@ -836,31 +976,37 @@ class CSV
next
end
row = []
+ quoted_fields = []
elsif line.include?(@cr) or line.include?(@lf)
@scanner.keep_back
@need_robust_parsing = true
return parse_quotable_robust(&block)
else
row = line.split(@split_column_separator, -1)
+ quoted_fields = []
n_columns = row.size
i = 0
while i < n_columns
column = row[i]
if column.empty?
+ quoted_fields << false
row[i] = nil
else
n_quotes = column.count(@quote_character)
if n_quotes.zero?
+ quoted_fields << false
# no quote
elsif n_quotes == 2 and
column.start_with?(@quote_character) and
column.end_with?(@quote_character)
+ quoted_fields << true
row[i] = column[1..-2]
else
@scanner.keep_back
@need_robust_parsing = true
return parse_quotable_robust(&block)
end
+ validate_field_size(row[i])
end
i += 1
end
@@ -868,13 +1014,14 @@ class CSV
@scanner.keep_drop
@scanner.keep_start
@last_line = original_line
- emit_row(row, &block)
+ emit_row(row, quoted_fields, &block)
end
@scanner.keep_drop
end
def parse_quotable_robust(&block)
row = []
+ quoted_fields = []
skip_needless_lines
start_row
while true
@@ -884,35 +1031,42 @@ class CSV
value = parse_column_value
if value
@scanner.scan_all(@strip_value) if @strip_value
- if @field_size_limit and value.size >= @field_size_limit
- ignore_broken_line
- raise MalformedCSVError.new("Field size exceeded", @lineno)
- end
+ validate_field_size(value)
end
if parse_column_end
row << value
+ quoted_fields << @quoted_column_value
elsif parse_row_end
if row.empty? and value.nil?
- emit_row([], &block) unless @skip_blanks
+ emit_row([], [], &block) unless @skip_blanks
else
row << value
- emit_row(row, &block)
+ quoted_fields << @quoted_column_value
+ emit_row(row, quoted_fields, &block)
row = []
+ quoted_fields = []
end
skip_needless_lines
start_row
elsif @scanner.eos?
break if row.empty? and value.nil?
row << value
- emit_row(row, &block)
+ quoted_fields << @quoted_column_value
+ emit_row(row, quoted_fields, &block)
break
else
if @quoted_column_value
+ if liberal_parsing? and (new_line = @scanner.check(@line_end))
+ message =
+ "Illegal end-of-line sequence outside of a quoted field " +
+ "<#{new_line.inspect}>"
+ else
+ message = "Any value after quoted field isn't allowed"
+ end
ignore_broken_line
- message = "Any value after quoted field isn't allowed"
raise MalformedCSVError.new(message, @lineno)
elsif @unquoted_column_value and
- (new_line = @scanner.scan(@cr_or_lf))
+ (new_line = @scanner.scan(@line_end))
ignore_broken_line
message = "Unquoted fields do not allow new line " +
"<#{new_line.inspect}>"
@@ -921,7 +1075,7 @@ class CSV
ignore_broken_line
message = "Illegal quoting"
raise MalformedCSVError.new(message, @lineno)
- elsif (new_line = @scanner.scan(@cr_or_lf))
+ elsif (new_line = @scanner.scan(@line_end))
ignore_broken_line
message = "New line must be <#{@row_separator.inspect}> " +
"not <#{new_line.inspect}>"
@@ -939,6 +1093,7 @@ class CSV
if @liberal_parsing
quoted_value = parse_quoted_column_value
if quoted_value
+ @scanner.scan_all(@strip_value) if @strip_value
unquoted_value = parse_unquoted_column_value
if unquoted_value
if @double_quote_outside_quote
@@ -986,6 +1141,9 @@ class CSV
end
end
value.gsub!(@backslash_quote_character, @quote_character) if @backslash_quote
+ if @rstrip_value
+ value.gsub!(@rstrip_value, "")
+ end
value
end
@@ -998,7 +1156,7 @@ class CSV
if (n_quotes % 2).zero?
quotes[0, (n_quotes - 2) / 2]
else
- value = quotes[0, (n_quotes - 1) / 2]
+ value = quotes[0, n_quotes / 2]
while true
quoted_value = @scanner.scan_all(@quoted_value)
value << quoted_value if quoted_value
@@ -1022,11 +1180,9 @@ class CSV
n_quotes = quotes.size
if n_quotes == 1
break
- elsif (n_quotes % 2) == 1
- value << quotes[0, (n_quotes - 1) / 2]
- break
else
value << quotes[0, n_quotes / 2]
+ break if (n_quotes % 2) == 1
end
end
value
@@ -1062,18 +1218,15 @@ class CSV
def strip_value(value)
return value unless @strip
- return nil if value.nil?
+ return value if value.nil?
case @strip
when String
- size = value.size
- while value.start_with?(@strip)
- size -= 1
- value = value[1, size]
+ while value.delete_prefix!(@strip)
+ # do nothing
end
- while value.end_with?(@strip)
- size -= 1
- value = value[0, size]
+ while value.delete_suffix!(@strip)
+ # do nothing
end
else
value.strip!
@@ -1083,7 +1236,7 @@ class CSV
def ignore_broken_line
@scanner.scan_all(@not_line_end)
- @scanner.scan_all(@cr_or_lf)
+ @scanner.scan_all(@line_end)
@lineno += 1
end
@@ -1096,22 +1249,22 @@ class CSV
@scanner.keep_start
end
- def emit_row(row, &block)
+ def emit_row(row, quoted_fields, &block)
@lineno += 1
raw_row = row
if @use_headers
if @headers.nil?
- @headers = adjust_headers(row)
+ @headers = adjust_headers(row, quoted_fields)
return unless @return_headers
row = Row.new(@headers, row, true)
else
row = Row.new(@headers,
- @fields_converter.convert(raw_row, @headers, @lineno))
+ @fields_converter.convert(raw_row, @headers, @lineno, quoted_fields))
end
else
# convert fields, if needed...
- row = @fields_converter.convert(raw_row, nil, @lineno)
+ row = @fields_converter.convert(raw_row, nil, @lineno, quoted_fields)
end
# inject unconverted fields and accessor, if requested...
diff --git a/lib/csv/row.rb b/lib/csv/row.rb
index 4aa0f30911..86323f7d0a 100644
--- a/lib/csv/row.rb
+++ b/lib/csv/row.rb
@@ -3,30 +3,105 @@
require "forwardable"
class CSV
+ # = \CSV::Row
+ # A \CSV::Row instance represents a \CSV table row.
+ # (see {class CSV}[../CSV.html]).
#
- # A CSV::Row is part Array and part Hash. It retains an order for the fields
- # and allows duplicates just as an Array would, but also allows you to access
- # fields by name just as you could if they were in a Hash.
+ # The instance may have:
+ # - Fields: each is an object, not necessarily a \String.
+ # - Headers: each serves a key, and also need not be a \String.
#
- # All rows returned by CSV will be constructed from this class, if header row
- # processing is activated.
+ # === Instance Methods
+ #
+ # \CSV::Row has three groups of instance methods:
+ # - Its own internally defined instance methods.
+ # - Methods included by module Enumerable.
+ # - Methods delegated to class Array.:
+ # * Array#empty?
+ # * Array#length
+ # * Array#size
+ #
+ # == Creating a \CSV::Row Instance
+ #
+ # Commonly, a new \CSV::Row instance is created by parsing \CSV source
+ # that has headers:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.each {|row| p row }
+ # Output:
+ # #<CSV::Row "Name":"foo" "Value":"0">
+ # #<CSV::Row "Name":"bar" "Value":"1">
+ # #<CSV::Row "Name":"baz" "Value":"2">
+ #
+ # You can also create a row directly. See ::new.
+ #
+ # == Headers
+ #
+ # Like a \CSV::Table, a \CSV::Row has headers.
+ #
+ # A \CSV::Row that was created by parsing \CSV source
+ # inherits its headers from the table:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table.first
+ # row.headers # => ["Name", "Value"]
+ #
+ # You can also create a new row with headers;
+ # like the keys in a \Hash, the headers need not be Strings:
+ # row = CSV::Row.new([:name, :value], ['foo', 0])
+ # row.headers # => [:name, :value]
+ #
+ # The new row retains its headers even if added to a table
+ # that has headers:
+ # table << row # => #<CSV::Table mode:col_or_row row_count:5>
+ # row.headers # => [:name, :value]
+ # row[:name] # => "foo"
+ # row['Name'] # => nil
+ #
+ #
+ #
+ # == Accessing Fields
+ #
+ # You may access a field in a \CSV::Row with either its \Integer index
+ # (\Array-style) or its header (\Hash-style).
+ #
+ # Fetch a field using method #[]:
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
+ # row[1] # => 0
+ # row['Value'] # => 0
+ #
+ # Set a field using method #[]=:
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
+ # row # => #<CSV::Row "Name":"foo" "Value":0>
+ # row[0] = 'bar'
+ # row['Value'] = 1
+ # row # => #<CSV::Row "Name":"bar" "Value":1>
#
class Row
- #
- # Constructs a new CSV::Row from +headers+ and +fields+, which are expected
- # to be Arrays. If one Array is shorter than the other, it will be padded
- # with +nil+ objects.
- #
- # The optional +header_row+ parameter can be set to +true+ to indicate, via
- # CSV::Row.header_row?() and CSV::Row.field_row?(), that this is a header
- # row. Otherwise, the row assumes to be a field row.
- #
- # A CSV::Row object supports the following Array methods through delegation:
- #
- # * empty?()
- # * length()
- # * size()
- #
+ # :call-seq:
+ # CSV::Row.new(headers, fields, header_row = false) -> csv_row
+ #
+ # Returns the new \CSV::Row instance constructed from
+ # arguments +headers+ and +fields+; both should be Arrays;
+ # note that the fields need not be Strings:
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
+ # row # => #<CSV::Row "Name":"foo" "Value":0>
+ #
+ # If the \Array lengths are different, the shorter is +nil+-filled:
+ # row = CSV::Row.new(['Name', 'Value', 'Date', 'Size'], ['foo', 0])
+ # row # => #<CSV::Row "Name":"foo" "Value":0 "Date":nil "Size":nil>
+ #
+ # Each \CSV::Row object is either a <i>field row</i> or a <i>header row</i>;
+ # by default, a new row is a field row; for the row created above:
+ # row.field_row? # => true
+ # row.header_row? # => false
+ #
+ # If the optional argument +header_row+ is given as +true+,
+ # the created row is a header row:
+ # row = CSV::Row.new(['Name', 'Value'], ['foo', 0], header_row = true)
+ # row # => #<CSV::Row "Name":"foo" "Value":0>
+ # row.field_row? # => false
+ # row.header_row? # => true
def initialize(headers, fields, header_row = false)
@header_row = header_row
headers.each { |h| h.freeze if h.is_a? String }
@@ -48,43 +123,87 @@ class CSV
extend Forwardable
def_delegators :@row, :empty?, :length, :size
+ # :call-seq:
+ # row.initialize_copy(other_row) -> self
+ #
+ # Calls superclass method.
def initialize_copy(other)
- super
- @row = @row.dup
+ super_return_value = super
+ @row = @row.collect(&:dup)
+ super_return_value
end
- # Returns +true+ if this is a header row.
+ # :call-seq:
+ # row.header_row? -> true or false
+ #
+ # Returns +true+ if this is a header row, +false+ otherwise.
def header_row?
@header_row
end
- # Returns +true+ if this is a field row.
+ # :call-seq:
+ # row.field_row? -> true or false
+ #
+ # Returns +true+ if this is a field row, +false+ otherwise.
def field_row?
not header_row?
end
- # Returns the headers of this row.
+ # :call-seq:
+ # row.headers -> array_of_headers
+ #
+ # Returns the headers for this row:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table.first
+ # row.headers # => ["Name", "Value"]
def headers
@row.map(&:first)
end
- #
# :call-seq:
- # field( header )
- # field( header, offset )
- # field( index )
+ # field(index) -> value
+ # field(header) -> value
+ # field(header, offset) -> value
+ #
+ # Returns the field value for the given +index+ or +header+.
+ #
+ # ---
+ #
+ # Fetch field value by \Integer index:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.field(0) # => "foo"
+ # row.field(1) # => "bar"
+ #
+ # Counts backward from the last column if +index+ is negative:
+ # row.field(-1) # => "0"
+ # row.field(-2) # => "foo"
+ #
+ # Returns +nil+ if +index+ is out of range:
+ # row.field(2) # => nil
+ # row.field(-3) # => nil
#
- # This method will return the field value by +header+ or +index+. If a field
- # is not found, +nil+ is returned.
+ # ---
#
- # When provided, +offset+ ensures that a header match occurs on or later
- # than the +offset+ index. You can use this to find duplicate headers,
- # without resorting to hard-coding exact indices.
+ # Fetch field value by header (first found):
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.field('Name') # => "Foo"
#
+ # Fetch field value by header, ignoring +offset+ leading fields:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.field('Name', 2) # => "Baz"
+ #
+ # Returns +nil+ if the header does not exist.
def field(header_or_index, minimum_index = 0)
# locate the pair
finder = (header_or_index.is_a?(Integer) || header_or_index.is_a?(Range)) ? :[] : :assoc
- pair = @row[minimum_index..-1].send(finder, header_or_index)
+ pair = @row[minimum_index..-1].public_send(finder, header_or_index)
# return the field if we have a pair
if pair.nil?
@@ -97,16 +216,45 @@ class CSV
#
# :call-seq:
- # fetch( header )
- # fetch( header ) { |row| ... }
- # fetch( header, default )
- #
- # This method will fetch the field value by +header+. It has the same
- # behavior as Hash#fetch: if there is a field with the given +header+, its
- # value is returned. Otherwise, if a block is given, it is yielded the
- # +header+ and its result is returned; if a +default+ is given as the
- # second argument, it is returned; otherwise a KeyError is raised.
- #
+ # fetch(header) -> value
+ # fetch(header, default) -> value
+ # fetch(header) {|row| ... } -> value
+ #
+ # Returns the field value as specified by +header+.
+ #
+ # ---
+ #
+ # With the single argument +header+, returns the field value
+ # for that header (first found):
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.fetch('Name') # => "Foo"
+ #
+ # Raises exception +KeyError+ if the header does not exist.
+ #
+ # ---
+ #
+ # With arguments +header+ and +default+ given,
+ # returns the field value for the header (first found)
+ # if the header exists, otherwise returns +default+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.fetch('Name', '') # => "Foo"
+ # row.fetch(:nosuch, '') # => ""
+ #
+ # ---
+ #
+ # With argument +header+ and a block given,
+ # returns the field value for the header (first found)
+ # if the header exists; otherwise calls the block
+ # and returns its return value:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.fetch('Name') {|header| fail 'Cannot happen' } # => "Foo"
+ # row.fetch(:nosuch) {|header| "Header '#{header} not found'" } # => "Header 'nosuch not found'"
def fetch(header, *varargs)
raise ArgumentError, "Too many arguments" if varargs.length > 1
pair = @row.assoc(header)
@@ -123,7 +271,11 @@ class CSV
end
end
- # Returns +true+ if there is a field with the given +header+.
+ # :call-seq:
+ # row.has_key?(header) -> true or false
+ #
+ # Returns +true+ if there is a field with the given +header+,
+ # +false+ otherwise.
def has_key?(header)
!!@row.assoc(header)
end
@@ -134,17 +286,56 @@ class CSV
#
# :call-seq:
- # []=( header, value )
- # []=( header, offset, value )
- # []=( index, value )
- #
- # Looks up the field by the semantics described in CSV::Row.field() and
- # assigns the +value+.
- #
- # Assigning past the end of the row with an index will set all pairs between
- # to <tt>[nil, nil]</tt>. Assigning to an unused header appends the new
- # pair.
- #
+ # row[index] = value -> value
+ # row[header, offset] = value -> value
+ # row[header] = value -> value
+ #
+ # Assigns the field value for the given +index+ or +header+;
+ # returns +value+.
+ #
+ # ---
+ #
+ # Assign field value by \Integer index:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row[0] = 'Bat'
+ # row[1] = 3
+ # row # => #<CSV::Row "Name":"Bat" "Value":3>
+ #
+ # Counts backward from the last column if +index+ is negative:
+ # row[-1] = 4
+ # row[-2] = 'Bam'
+ # row # => #<CSV::Row "Name":"Bam" "Value":4>
+ #
+ # Extends the row with <tt>nil:nil</tt> if positive +index+ is not in the row:
+ # row[4] = 5
+ # row # => #<CSV::Row "Name":"bad" "Value":4 nil:nil nil:nil nil:5>
+ #
+ # Raises IndexError if negative +index+ is too small (too far from zero).
+ #
+ # ---
+ #
+ # Assign field value by header (first found):
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row['Name'] = 'Bat'
+ # row # => #<CSV::Row "Name":"Bat" "Name":"Bar" "Name":"Baz">
+ #
+ # Assign field value by header, ignoring +offset+ leading fields:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row['Name', 2] = 4
+ # row # => #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":4>
+ #
+ # Append new field by (new) header:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row['New'] = 6
+ # row# => #<CSV::Row "Name":"foo" "Value":"0" "New":6>
def []=(*args)
value = args.pop
@@ -167,17 +358,34 @@ class CSV
#
# :call-seq:
- # <<( field )
- # <<( header_and_field_array )
- # <<( header_and_field_hash )
- #
- # If a two-element Array is provided, it is assumed to be a header and field
- # and the pair is appended. A Hash works the same way with the key being
- # the header and the value being the field. Anything else is assumed to be
- # a lone field which is appended with a +nil+ header.
- #
- # This method returns the row for chaining.
- #
+ # row << [header, value] -> self
+ # row << hash -> self
+ # row << value -> self
+ #
+ # Adds a field to +self+; returns +self+:
+ #
+ # If the argument is a 2-element \Array <tt>[header, value]</tt>,
+ # a field is added with the given +header+ and +value+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row << ['NAME', 'Bat']
+ # row # => #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz" "NAME":"Bat">
+ #
+ # If the argument is a \Hash, each <tt>key-value</tt> pair is added
+ # as a field with header +key+ and value +value+.
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row << {NAME: 'Bat', name: 'Bam'}
+ # row # => #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz" NAME:"Bat" name:"Bam">
+ #
+ # Otherwise, the given +value+ is added as a field with no header.
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row << 'Bag'
+ # row # => #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz" nil:"Bag">
def <<(arg)
if arg.is_a?(Array) and arg.size == 2 # appending a header and name
@row << arg
@@ -190,13 +398,15 @@ class CSV
self # for chaining
end
- #
- # A shortcut for appending multiple fields. Equivalent to:
- #
- # args.each { |arg| csv_row << arg }
- #
- # This method returns the row for chaining.
- #
+ # :call-seq:
+ # row.push(*values) -> self
+ #
+ # Appends each of the given +values+ to +self+ as a field; returns +self+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.push('Bat', 'Bam')
+ # row # => #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz" nil:"Bat" nil:"Bam">
def push(*args)
args.each { |arg| self << arg }
@@ -205,14 +415,39 @@ class CSV
#
# :call-seq:
- # delete( header )
- # delete( header, offset )
- # delete( index )
- #
- # Removes a pair from the row by +header+ or +index+. The pair is
- # located as described in CSV::Row.field(). The deleted pair is returned,
- # or +nil+ if a pair could not be found.
- #
+ # delete(index) -> [header, value] or nil
+ # delete(header) -> [header, value] or empty_array
+ # delete(header, offset) -> [header, value] or empty_array
+ #
+ # Removes a specified field from +self+; returns the 2-element \Array
+ # <tt>[header, value]</tt> if the field exists.
+ #
+ # If an \Integer argument +index+ is given,
+ # removes and returns the field at offset +index+,
+ # or returns +nil+ if the field does not exist:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.delete(1) # => ["Name", "Bar"]
+ # row.delete(50) # => nil
+ #
+ # Otherwise, if the single argument +header+ is given,
+ # removes and returns the first-found field with the given header,
+ # of returns a new empty \Array if the field does not exist:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.delete('Name') # => ["Name", "Foo"]
+ # row.delete('NAME') # => []
+ #
+ # If argument +header+ and \Integer argument +offset+ are given,
+ # removes and returns the first-found field with the given header
+ # whose +index+ is at least as large as +offset+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.delete('Name', 1) # => ["Name", "Bar"]
+ # row.delete('NAME', 1) # => []
def delete(header_or_index, minimum_index = 0)
if header_or_index.is_a? Integer # by index
@row.delete_at(header_or_index)
@@ -223,15 +458,21 @@ class CSV
end
end
+ # :call-seq:
+ # row.delete_if {|header, value| ... } -> self
#
- # The provided +block+ is passed a header and field for each pair in the row
- # and expected to return +true+ or +false+, depending on whether the pair
- # should be deleted.
- #
- # This method returns the row for chaining.
+ # Removes fields from +self+ as selected by the block; returns +self+.
#
- # If no block is given, an Enumerator is returned.
+ # Removes each field for which the block returns a truthy value:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.delete_if {|header, value| value.start_with?('B') } # => true
+ # row # => #<CSV::Row "Name":"Foo">
+ # row.delete_if {|header, value| header.start_with?('B') } # => false
#
+ # If no block is given, returns a new Enumerator:
+ # row.delete_if # => #<Enumerator: #<CSV::Row "Name":"Foo">:delete_if>
def delete_if(&block)
return enum_for(__method__) { size } unless block_given?
@@ -240,14 +481,52 @@ class CSV
self # for chaining
end
- #
- # This method accepts any number of arguments which can be headers, indices,
- # Ranges of either, or two-element Arrays containing a header and offset.
- # Each argument will be replaced with a field lookup as described in
- # CSV::Row.field().
- #
- # If called with no arguments, all fields are returned.
- #
+ # :call-seq:
+ # self.fields(*specifiers) -> array_of_fields
+ #
+ # Returns field values per the given +specifiers+, which may be any mixture of:
+ # - \Integer index.
+ # - \Range of \Integer indexes.
+ # - 2-element \Array containing a header and offset.
+ # - Header.
+ # - \Range of headers.
+ #
+ # For +specifier+ in one of the first four cases above,
+ # returns the result of <tt>self.field(specifier)</tt>; see #field.
+ #
+ # Although there may be any number of +specifiers+,
+ # the examples here will illustrate one at a time.
+ #
+ # When the specifier is an \Integer +index+,
+ # returns <tt>self.field(index)</tt>L
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.fields(1) # => ["Bar"]
+ #
+ # When the specifier is a \Range of \Integers +range+,
+ # returns <tt>self.field(range)</tt>:
+ # row.fields(1..2) # => ["Bar", "Baz"]
+ #
+ # When the specifier is a 2-element \Array +array+,
+ # returns <tt>self.field(array)</tt>L
+ # row.fields('Name', 1) # => ["Foo", "Bar"]
+ #
+ # When the specifier is a header +header+,
+ # returns <tt>self.field(header)</tt>L
+ # row.fields('Name') # => ["Foo"]
+ #
+ # When the specifier is a \Range of headers +range+,
+ # forms a new \Range +new_range+ from the indexes of
+ # <tt>range.start</tt> and <tt>range.end</tt>,
+ # and returns <tt>self.field(new_range)</tt>:
+ # source = "Name,NAME,name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.fields('Name'..'NAME') # => ["Foo", "Bar"]
+ #
+ # Returns all fields if no argument given:
+ # row.fields # => ["Foo", "Bar", "Baz"]
def fields(*headers_and_or_indices)
if headers_and_or_indices.empty? # return all fields--no arguments
@row.map(&:last)
@@ -271,15 +550,26 @@ class CSV
end
alias_method :values_at, :fields
- #
# :call-seq:
- # index( header )
- # index( header, offset )
- #
- # This method will return the index of a field with the provided +header+.
- # The +offset+ can be used to locate duplicate header names, as described in
- # CSV::Row.field().
- #
+ # index(header) -> index
+ # index(header, offset) -> index
+ #
+ # Returns the index for the given header, if it exists;
+ # otherwise returns +nil+.
+ #
+ # With the single argument +header+, returns the index
+ # of the first-found field with the given +header+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.index('Name') # => 0
+ # row.index('NAME') # => nil
+ #
+ # With arguments +header+ and +offset+,
+ # returns the index of the first-found field with given +header+,
+ # but ignoring the first +offset+ fields:
+ # row.index('Name', 1) # => 1
+ # row.index('Name', 3) # => nil
def index(header, minimum_index = 0)
# find the pair
index = headers[minimum_index..-1].index(header)
@@ -287,24 +577,36 @@ class CSV
index.nil? ? nil : index + minimum_index
end
- #
- # Returns +true+ if +data+ matches a field in this row, and +false+
- # otherwise.
- #
+ # :call-seq:
+ # row.field?(value) -> true or false
+ #
+ # Returns +true+ if +value+ is a field in this row, +false+ otherwise:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.field?('Bar') # => true
+ # row.field?('BAR') # => false
def field?(data)
fields.include? data
end
include Enumerable
- #
- # Yields each pair of the row as header and field tuples (much like
- # iterating over a Hash). This method returns the row for chaining.
- #
- # If no block is given, an Enumerator is returned.
- #
- # Support for Enumerable.
- #
+ # :call-seq:
+ # row.each {|header, value| ... } -> self
+ #
+ # Calls the block with each header-value pair; returns +self+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.each {|header, value| p [header, value] }
+ # Output:
+ # ["Name", "Foo"]
+ # ["Name", "Bar"]
+ # ["Name", "Baz"]
+ #
+ # If no block is given, returns a new Enumerator:
+ # row.each # => #<Enumerator: #<CSV::Row "Name":"Foo" "Name":"Bar" "Name":"Baz">:each>
def each(&block)
return enum_for(__method__) { size } unless block_given?
@@ -315,19 +617,39 @@ class CSV
alias_method :each_pair, :each
- #
- # Returns +true+ if this row contains the same headers and fields in the
- # same order as +other+.
- #
+ # :call-seq:
+ # row == other -> true or false
+ #
+ # Returns +true+ if +other+ is a /CSV::Row that has the same
+ # fields (headers and values) in the same order as +self+;
+ # otherwise returns +false+:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # other_row = table[0]
+ # row == other_row # => true
+ # other_row = table[1]
+ # row == other_row # => false
def ==(other)
return @row == other.row if other.is_a? CSV::Row
@row == other
end
- #
- # Collapses the row into a simple Hash. Be warned that this discards field
- # order and clobbers duplicate fields.
- #
+ # :call-seq:
+ # row.to_h -> hash
+ #
+ # Returns the new \Hash formed by adding each header-value pair in +self+
+ # as a key-value pair in the \Hash.
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.to_h # => {"Name"=>"foo", "Value"=>"0"}
+ #
+ # Header order is preserved, but repeated headers are ignored:
+ # source = "Name,Name,Name\nFoo,Bar,Baz\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.to_h # => {"Name"=>"Foo"}
def to_h
hash = {}
each do |key, _value|
@@ -337,22 +659,59 @@ class CSV
end
alias_method :to_hash, :to_h
+ # :call-seq:
+ # row.deconstruct_keys(keys) -> hash
+ #
+ # Returns the new \Hash suitable for pattern matching containing only the
+ # keys specified as an argument.
+ def deconstruct_keys(keys)
+ if keys.nil?
+ to_h
+ else
+ keys.to_h { |key| [key, self[key]] }
+ end
+ end
+
alias_method :to_ary, :to_a
+ # :call-seq:
+ # row.deconstruct -> array
#
- # Returns the row as a CSV String. Headers are not used. Equivalent to:
- #
- # csv_row.fields.to_csv( options )
+ # Returns the new \Array suitable for pattern matching containing the values
+ # of the row.
+ def deconstruct
+ fields
+ end
+
+ # :call-seq:
+ # row.to_csv -> csv_string
#
+ # Returns the row as a \CSV String. Headers are not included:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.to_csv # => "foo,0\n"
def to_csv(**options)
fields.to_csv(**options)
end
alias_method :to_s, :to_csv
+ # :call-seq:
+ # row.dig(index_or_header, *identifiers) -> object
+ #
+ # Finds and returns the object in nested object that is specified
+ # by +index_or_header+ and +specifiers+.
#
- # Extracts the nested value specified by the sequence of +index+ or +header+ objects by calling dig at each step,
- # returning nil if any intermediate step is nil.
+ # The nested objects may be instances of various classes.
+ # See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
#
+ # Examples:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.dig(1) # => "0"
+ # row.dig('Value') # => "0"
+ # row.dig(5) # => nil
def dig(index_or_header, *indexes)
value = field(index_or_header)
if value.nil?
@@ -367,9 +726,17 @@ class CSV
end
end
- #
- # A summary of fields, by header, in an ASCII compatible String.
- #
+ # :call-seq:
+ # row.inspect -> string
+ #
+ # Returns an ASCII-compatible \String showing:
+ # - Class \CSV::Row.
+ # - Header-value pairs.
+ # Example:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # row = table[0]
+ # row.inspect # => "#<CSV::Row \"Name\":\"foo\" \"Value\":\"0\">"
def inspect
str = ["#<", self.class.to_s]
each do |header, field|
diff --git a/lib/csv/table.rb b/lib/csv/table.rb
index e6c1ee11fa..fb19f5453f 100644
--- a/lib/csv/table.rb
+++ b/lib/csv/table.rb
@@ -3,31 +3,199 @@
require "forwardable"
class CSV
+ # = \CSV::Table
+ # A \CSV::Table instance represents \CSV data.
+ # (see {class CSV}[../CSV.html]).
#
- # A CSV::Table is a two-dimensional data structure for representing CSV
- # documents. Tables allow you to work with the data by row or column,
- # manipulate the data, and even convert the results back to CSV, if needed.
+ # The instance may have:
+ # - Rows: each is a Table::Row object.
+ # - Headers: names for the columns.
#
- # All tables returned by CSV will be constructed from this class, if header
- # row processing is activated.
+ # === Instance Methods
#
+ # \CSV::Table has three groups of instance methods:
+ # - Its own internally defined instance methods.
+ # - Methods included by module Enumerable.
+ # - Methods delegated to class Array.:
+ # * Array#empty?
+ # * Array#length
+ # * Array#size
+ #
+ # == Creating a \CSV::Table Instance
+ #
+ # Commonly, a new \CSV::Table instance is created by parsing \CSV source
+ # using headers:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.class # => CSV::Table
+ #
+ # You can also create an instance directly. See ::new.
+ #
+ # == Headers
+ #
+ # If a table has headers, the headers serve as labels for the columns of data.
+ # Each header serves as the label for its column.
+ #
+ # The headers for a \CSV::Table object are stored as an \Array of Strings.
+ #
+ # Commonly, headers are defined in the first row of \CSV source:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.headers # => ["Name", "Value"]
+ #
+ # If no headers are defined, the \Array is empty:
+ # table = CSV::Table.new([])
+ # table.headers # => []
+ #
+ # == Access Modes
+ #
+ # \CSV::Table provides three modes for accessing table data:
+ # - \Row mode.
+ # - Column mode.
+ # - Mixed mode (the default for a new table).
+ #
+ # The access mode for a\CSV::Table instance affects the behavior
+ # of some of its instance methods:
+ # - #[]
+ # - #[]=
+ # - #delete
+ # - #delete_if
+ # - #each
+ # - #values_at
+ #
+ # === \Row Mode
+ #
+ # Set a table to row mode with method #by_row!:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ #
+ # Specify a single row by an \Integer index:
+ # # Get a row.
+ # table[1] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # # Set a row, then get it.
+ # table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3])
+ # table[1] # => #<CSV::Row "Name":"bam" "Value":3>
+ #
+ # Specify a sequence of rows by a \Range:
+ # # Get rows.
+ # table[1..2] # => [#<CSV::Row "Name":"bam" "Value":3>, #<CSV::Row "Name":"baz" "Value":"2">]
+ # # Set rows, then get them.
+ # table[1..2] = [
+ # CSV::Row.new(['Name', 'Value'], ['bat', 4]),
+ # CSV::Row.new(['Name', 'Value'], ['bad', 5]),
+ # ]
+ # table[1..2] # => [["Name", #<CSV::Row "Name":"bat" "Value":4>], ["Value", #<CSV::Row "Name":"bad" "Value":5>]]
+ #
+ # === Column Mode
+ #
+ # Set a table to column mode with method #by_col!:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ #
+ # Specify a column by an \Integer index:
+ # # Get a column.
+ # table[0]
+ # # Set a column, then get it.
+ # table[0] = ['FOO', 'BAR', 'BAZ']
+ # table[0] # => ["FOO", "BAR", "BAZ"]
+ #
+ # Specify a column by its \String header:
+ # # Get a column.
+ # table['Name'] # => ["FOO", "BAR", "BAZ"]
+ # # Set a column, then get it.
+ # table['Name'] = ['Foo', 'Bar', 'Baz']
+ # table['Name'] # => ["Foo", "Bar", "Baz"]
+ #
+ # === Mixed Mode
+ #
+ # In mixed mode, you can refer to either rows or columns:
+ # - An \Integer index refers to a row.
+ # - A \Range index refers to multiple rows.
+ # - A \String index refers to a column.
+ #
+ # Set a table to mixed mode with method #by_col_or_row!:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
+ #
+ # Specify a single row by an \Integer index:
+ # # Get a row.
+ # table[1] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # # Set a row, then get it.
+ # table[1] = CSV::Row.new(['Name', 'Value'], ['bam', 3])
+ # table[1] # => #<CSV::Row "Name":"bam" "Value":3>
+ #
+ # Specify a sequence of rows by a \Range:
+ # # Get rows.
+ # table[1..2] # => [#<CSV::Row "Name":"bam" "Value":3>, #<CSV::Row "Name":"baz" "Value":"2">]
+ # # Set rows, then get them.
+ # table[1] = CSV::Row.new(['Name', 'Value'], ['bat', 4])
+ # table[2] = CSV::Row.new(['Name', 'Value'], ['bad', 5])
+ # table[1..2] # => [["Name", #<CSV::Row "Name":"bat" "Value":4>], ["Value", #<CSV::Row "Name":"bad" "Value":5>]]
+ #
+ # Specify a column by its \String header:
+ # # Get a column.
+ # table['Name'] # => ["foo", "bat", "bad"]
+ # # Set a column, then get it.
+ # table['Name'] = ['Foo', 'Bar', 'Baz']
+ # table['Name'] # => ["Foo", "Bar", "Baz"]
class Table
+ # :call-seq:
+ # CSV::Table.new(array_of_rows, headers = nil) -> csv_table
+ #
+ # Returns a new \CSV::Table object.
+ #
+ # - Argument +array_of_rows+ must be an \Array of CSV::Row objects.
+ # - Argument +headers+, if given, may be an \Array of Strings.
+ #
+ # ---
+ #
+ # Create an empty \CSV::Table object:
+ # table = CSV::Table.new([])
+ # table # => #<CSV::Table mode:col_or_row row_count:1>
#
- # Constructs a new CSV::Table from +array_of_rows+, which are expected
- # to be CSV::Row objects. All rows are assumed to have the same headers.
+ # Create a non-empty \CSV::Table object:
+ # rows = [
+ # CSV::Row.new([], []),
+ # CSV::Row.new([], []),
+ # CSV::Row.new([], []),
+ # ]
+ # table = CSV::Table.new(rows)
+ # table # => #<CSV::Table mode:col_or_row row_count:4>
#
- # The optional +headers+ parameter can be set to Array of headers.
- # If headers aren't set, headers are fetched from CSV::Row objects.
- # Otherwise, headers() method will return headers being set in
- # headers argument.
+ # ---
#
- # A CSV::Table object supports the following Array methods through
- # delegation:
+ # If argument +headers+ is an \Array of Strings,
+ # those Strings become the table's headers:
+ # table = CSV::Table.new([], headers: ['Name', 'Age'])
+ # table.headers # => ["Name", "Age"]
#
- # * empty?()
- # * length()
- # * size()
+ # If argument +headers+ is not given and the table has rows,
+ # the headers are taken from the first row:
+ # rows = [
+ # CSV::Row.new(['Foo', 'Bar'], []),
+ # CSV::Row.new(['foo', 'bar'], []),
+ # CSV::Row.new(['FOO', 'BAR'], []),
+ # ]
+ # table = CSV::Table.new(rows)
+ # table.headers # => ["Foo", "Bar"]
#
+ # If argument +headers+ is not given and the table is empty (has no rows),
+ # the headers are also empty:
+ # table = CSV::Table.new([])
+ # table.headers # => []
+ #
+ # ---
+ #
+ # Raises an exception if argument +array_of_rows+ is not an \Array object:
+ # # Raises NoMethodError (undefined method `first' for :foo:Symbol):
+ # CSV::Table.new(:foo)
+ #
+ # Raises an exception if an element of +array_of_rows+ is not a \CSV::Table object:
+ # # Raises NoMethodError (undefined method `headers' for :foo:Symbol):
+ # CSV::Table.new([:foo])
def initialize(array_of_rows, headers: nil)
@table = array_of_rows
@headers = headers
@@ -54,88 +222,141 @@ class CSV
extend Forwardable
def_delegators :@table, :empty?, :length, :size
+ # :call-seq:
+ # table.by_col -> table_dup
#
- # Returns a duplicate table object, in column mode. This is handy for
- # chaining in a single call without changing the table mode, but be aware
- # that this method can consume a fair amount of memory for bigger data sets.
+ # Returns a duplicate of +self+, in column mode
+ # (see {Column Mode}[#class-CSV::Table-label-Column+Mode]):
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.mode # => :col_or_row
+ # dup_table = table.by_col
+ # dup_table.mode # => :col
+ # dup_table.equal?(table) # => false # It's a dup
#
- # This method returns the duplicate table for chaining. Don't chain
- # destructive methods (like []=()) this way though, since you are working
- # with a duplicate.
+ # This may be used to chain method calls without changing the mode
+ # (but also will affect performance and memory usage):
+ # dup_table.by_col['Name']
#
+ # Also note that changes to the duplicate table will not affect the original.
def by_col
self.class.new(@table.dup).by_col!
end
+ # :call-seq:
+ # table.by_col! -> self
#
- # Switches the mode of this table to column mode. All calls to indexing and
- # iteration methods will work with columns until the mode is changed again.
- #
- # This method returns the table and is safe to chain.
- #
+ # Sets the mode for +self+ to column mode
+ # (see {Column Mode}[#class-CSV::Table-label-Column+Mode]); returns +self+:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.mode # => :col_or_row
+ # table1 = table.by_col!
+ # table.mode # => :col
+ # table1.equal?(table) # => true # Returned self
def by_col!
@mode = :col
self
end
+ # :call-seq:
+ # table.by_col_or_row -> table_dup
#
- # Returns a duplicate table object, in mixed mode. This is handy for
- # chaining in a single call without changing the table mode, but be aware
- # that this method can consume a fair amount of memory for bigger data sets.
+ # Returns a duplicate of +self+, in mixed mode
+ # (see {Mixed Mode}[#class-CSV::Table-label-Mixed+Mode]):
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true).by_col!
+ # table.mode # => :col
+ # dup_table = table.by_col_or_row
+ # dup_table.mode # => :col_or_row
+ # dup_table.equal?(table) # => false # It's a dup
#
- # This method returns the duplicate table for chaining. Don't chain
- # destructive methods (like []=()) this way though, since you are working
- # with a duplicate.
+ # This may be used to chain method calls without changing the mode
+ # (but also will affect performance and memory usage):
+ # dup_table.by_col_or_row['Name']
#
+ # Also note that changes to the duplicate table will not affect the original.
def by_col_or_row
self.class.new(@table.dup).by_col_or_row!
end
+ # :call-seq:
+ # table.by_col_or_row! -> self
#
- # Switches the mode of this table to mixed mode. All calls to indexing and
- # iteration methods will use the default intelligent indexing system until
- # the mode is changed again. In mixed mode an index is assumed to be a row
- # reference while anything else is assumed to be column access by headers.
- #
- # This method returns the table and is safe to chain.
- #
+ # Sets the mode for +self+ to mixed mode
+ # (see {Mixed Mode}[#class-CSV::Table-label-Mixed+Mode]); returns +self+:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true).by_col!
+ # table.mode # => :col
+ # table1 = table.by_col_or_row!
+ # table.mode # => :col_or_row
+ # table1.equal?(table) # => true # Returned self
def by_col_or_row!
@mode = :col_or_row
self
end
+ # :call-seq:
+ # table.by_row -> table_dup
#
- # Returns a duplicate table object, in row mode. This is handy for chaining
- # in a single call without changing the table mode, but be aware that this
- # method can consume a fair amount of memory for bigger data sets.
+ # Returns a duplicate of +self+, in row mode
+ # (see {Row Mode}[#class-CSV::Table-label-Row+Mode]):
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.mode # => :col_or_row
+ # dup_table = table.by_row
+ # dup_table.mode # => :row
+ # dup_table.equal?(table) # => false # It's a dup
#
- # This method returns the duplicate table for chaining. Don't chain
- # destructive methods (like []=()) this way though, since you are working
- # with a duplicate.
+ # This may be used to chain method calls without changing the mode
+ # (but also will affect performance and memory usage):
+ # dup_table.by_row[1]
#
+ # Also note that changes to the duplicate table will not affect the original.
def by_row
self.class.new(@table.dup).by_row!
end
+ # :call-seq:
+ # table.by_row! -> self
#
- # Switches the mode of this table to row mode. All calls to indexing and
- # iteration methods will work with rows until the mode is changed again.
- #
- # This method returns the table and is safe to chain.
- #
+ # Sets the mode for +self+ to row mode
+ # (see {Row Mode}[#class-CSV::Table-label-Row+Mode]); returns +self+:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.mode # => :col_or_row
+ # table1 = table.by_row!
+ # table.mode # => :row
+ # table1.equal?(table) # => true # Returned self
def by_row!
@mode = :row
self
end
+ # :call-seq:
+ # table.headers -> array_of_headers
+ #
+ # Returns a new \Array containing the \String headers for the table.
#
- # Returns the headers for the first row of this table (assumed to match all
- # other rows). The headers Array passed to CSV::Table.new is returned for
- # empty tables.
+ # If the table is not empty, returns the headers from the first row:
+ # rows = [
+ # CSV::Row.new(['Foo', 'Bar'], []),
+ # CSV::Row.new(['FOO', 'BAR'], []),
+ # CSV::Row.new(['foo', 'bar'], []),
+ # ]
+ # table = CSV::Table.new(rows)
+ # table.headers # => ["Foo", "Bar"]
+ # table.delete(0)
+ # table.headers # => ["FOO", "BAR"]
+ # table.delete(0)
+ # table.headers # => ["foo", "bar"]
#
+ # If the table is empty, returns a copy of the headers in the table itself:
+ # table.delete(0)
+ # table.headers # => ["Foo", "Bar"]
def headers
if @table.empty?
@headers.dup
@@ -144,14 +365,152 @@ class CSV
end
end
+ # :call-seq:
+ # table[n] -> row or column_data
+ # table[range] -> array_of_rows or array_of_column_data
+ # table[header] -> array_of_column_data
+ #
+ # Returns data from the table; does not modify the table.
+ #
+ # ---
+ #
+ # Fetch a \Row by Its \Integer Index::
+ # - Form: <tt>table[n]</tt>, +n+ an integer.
+ # - Access mode: <tt>:row</tt> or <tt>:col_or_row</tt>.
+ # - Return value: _nth_ row of the table, if that row exists;
+ # otherwise +nil+.
+ #
+ # Returns the _nth_ row of the table if that row exists:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # table[1] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
+ # table[1] # => #<CSV::Row "Name":"bar" "Value":"1">
+ #
+ # Counts backward from the last row if +n+ is negative:
+ # table[-1] # => #<CSV::Row "Name":"baz" "Value":"2">
+ #
+ # Returns +nil+ if +n+ is too large or too small:
+ # table[4] # => nil
+ # table[-4] # => nil
+ #
+ # Raises an exception if the access mode is <tt>:row</tt>
+ # and +n+ is not an \Integer:
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # # Raises TypeError (no implicit conversion of String into Integer):
+ # table['Name']
+ #
+ # ---
+ #
+ # Fetch a Column by Its \Integer Index::
+ # - Form: <tt>table[n]</tt>, +n+ an \Integer.
+ # - Access mode: <tt>:col</tt>.
+ # - Return value: _nth_ column of the table, if that column exists;
+ # otherwise an \Array of +nil+ fields of length <tt>self.size</tt>.
+ #
+ # Returns the _nth_ column of the table if that column exists:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # table[1] # => ["0", "1", "2"]
+ #
+ # Counts backward from the last column if +n+ is negative:
+ # table[-2] # => ["foo", "bar", "baz"]
+ #
+ # Returns an \Array of +nil+ fields if +n+ is too large or too small:
+ # table[4] # => [nil, nil, nil]
+ # table[-4] # => [nil, nil, nil]
+ #
+ # ---
+ #
+ # Fetch Rows by \Range::
+ # - Form: <tt>table[range]</tt>, +range+ a \Range object.
+ # - Access mode: <tt>:row</tt> or <tt>:col_or_row</tt>.
+ # - Return value: rows from the table, beginning at row <tt>range.start</tt>,
+ # if those rows exists.
+ #
+ # Returns rows from the table, beginning at row <tt>range.first</tt>,
+ # if those rows exist:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # rows = table[1..2] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # rows # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
+ # table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
+ # rows = table[1..2] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # rows # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
+ #
+ # If there are too few rows, returns all from <tt>range.start</tt> to the end:
+ # rows = table[1..50] # => #<CSV::Row "Name":"bar" "Value":"1">
+ # rows # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
+ #
+ # Special case: if <tt>range.start == table.size</tt>, returns an empty \Array:
+ # table[table.size..50] # => []
+ #
+ # If <tt>range.end</tt> is negative, calculates the ending index from the end:
+ # rows = table[0..-1]
+ # rows # => [#<CSV::Row "Name":"foo" "Value":"0">, #<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
+ #
+ # If <tt>range.start</tt> is negative, calculates the starting index from the end:
+ # rows = table[-1..2]
+ # rows # => [#<CSV::Row "Name":"baz" "Value":"2">]
#
- # In the default mixed mode, this method returns rows for index access and
- # columns for header access. You can force the index association by first
- # calling by_col!() or by_row!().
+ # If <tt>range.start</tt> is larger than <tt>table.size</tt>, returns +nil+:
+ # table[4..4] # => nil
#
- # Columns are returned as an Array of values. Altering that Array has no
- # effect on the table.
+ # ---
#
+ # Fetch Columns by \Range::
+ # - Form: <tt>table[range]</tt>, +range+ a \Range object.
+ # - Access mode: <tt>:col</tt>.
+ # - Return value: column data from the table, beginning at column <tt>range.start</tt>,
+ # if those columns exist.
+ #
+ # Returns column values from the table, if the column exists;
+ # the values are arranged by row:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col!
+ # table[0..1] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # Special case: if <tt>range.start == headers.size</tt>,
+ # returns an \Array (size: <tt>table.size</tt>) of empty \Arrays:
+ # table[table.headers.size..50] # => [[], [], []]
+ #
+ # If <tt>range.end</tt> is negative, calculates the ending index from the end:
+ # table[0..-1] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # If <tt>range.start</tt> is negative, calculates the starting index from the end:
+ # table[-2..2] # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+ #
+ # If <tt>range.start</tt> is larger than <tt>table.size</tt>,
+ # returns an \Array of +nil+ values:
+ # table[4..4] # => [nil, nil, nil]
+ #
+ # ---
+ #
+ # Fetch a Column by Its \String Header::
+ # - Form: <tt>table[header]</tt>, +header+ a \String header.
+ # - Access mode: <tt>:col</tt> or <tt>:col_or_row</tt>
+ # - Return value: column data from the table, if that +header+ exists.
+ #
+ # Returns column values from the table, if the column exists:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # table['Name'] # => ["foo", "bar", "baz"]
+ # table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
+ # col = table['Name']
+ # col # => ["foo", "bar", "baz"]
+ #
+ # Modifying the returned column values does not modify the table:
+ # col[0] = 'bat'
+ # col # => ["bat", "bar", "baz"]
+ # table['Name'] # => ["foo", "bar", "baz"]
+ #
+ # Returns an \Array of +nil+ values if there is no such column:
+ # table['Nosuch'] # => [nil, nil, nil]
def [](index_or_header)
if @mode == :row or # by index
(@mode == :col_or_row and (index_or_header.is_a?(Integer) or index_or_header.is_a?(Range)))
@@ -161,22 +520,132 @@ class CSV
end
end
+ # :call-seq:
+ # table[n] = row -> row
+ # table[n] = field_or_array_of_fields -> field_or_array_of_fields
+ # table[header] = field_or_array_of_fields -> field_or_array_of_fields
+ #
+ # Puts data onto the table.
+ #
+ # ---
+ #
+ # Set a \Row by Its \Integer Index::
+ # - Form: <tt>table[n] = row</tt>, +n+ an \Integer,
+ # +row+ a \CSV::Row instance or an \Array of fields.
+ # - Access mode: <tt>:row</tt> or <tt>:col_or_row</tt>.
+ # - Return value: +row+.
+ #
+ # If the row exists, it is replaced:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # new_row = CSV::Row.new(['Name', 'Value'], ['bat', 3])
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # return_value = table[0] = new_row
+ # return_value.equal?(new_row) # => true # Returned the row
+ # table[0].to_h # => {"Name"=>"bat", "Value"=>3}
+ #
+ # With access mode <tt>:col_or_row</tt>:
+ # table.by_col_or_row! # => #<CSV::Table mode:col_or_row row_count:4>
+ # table[0] = CSV::Row.new(['Name', 'Value'], ['bam', 4])
+ # table[0].to_h # => {"Name"=>"bam", "Value"=>4}
#
- # In the default mixed mode, this method assigns rows for index access and
- # columns for header access. You can force the index association by first
- # calling by_col!() or by_row!().
+ # With an \Array instead of a \CSV::Row, inherits headers from the table:
+ # array = ['bad', 5]
+ # return_value = table[0] = array
+ # return_value.equal?(array) # => true # Returned the array
+ # table[0].to_h # => {"Name"=>"bad", "Value"=>5}
#
- # Rows may be set to an Array of values (which will inherit the table's
- # headers()) or a CSV::Row.
+ # If the row does not exist, extends the table by adding rows:
+ # assigns rows with +nil+ as needed:
+ # table.size # => 3
+ # table[5] = ['bag', 6]
+ # table.size # => 6
+ # table[3] # => nil
+ # table[4]# => nil
+ # table[5].to_h # => {"Name"=>"bag", "Value"=>6}
#
- # Columns may be set to a single value, which is copied to each row of the
- # column, or an Array of values. Arrays of values are assigned to rows top
- # to bottom in row major order. Excess values are ignored and if the Array
- # does not have a value for each row the extra rows will receive a +nil+.
+ # Note that the +nil+ rows are actually +nil+, not a row of +nil+ fields.
#
- # Assigning to an existing column or row clobbers the data. Assigning to
- # new columns creates them at the right end of the table.
+ # ---
#
+ # Set a Column by Its \Integer Index::
+ # - Form: <tt>table[n] = array_of_fields</tt>, +n+ an \Integer,
+ # +array_of_fields+ an \Array of \String fields.
+ # - Access mode: <tt>:col</tt>.
+ # - Return value: +array_of_fields+.
+ #
+ # If the column exists, it is replaced:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # new_col = [3, 4, 5]
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # return_value = table[1] = new_col
+ # return_value.equal?(new_col) # => true # Returned the column
+ # table[1] # => [3, 4, 5]
+ # # The rows, as revised:
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # table[0].to_h # => {"Name"=>"foo", "Value"=>3}
+ # table[1].to_h # => {"Name"=>"bar", "Value"=>4}
+ # table[2].to_h # => {"Name"=>"baz", "Value"=>5}
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ #
+ # If there are too few values, fills with +nil+ values:
+ # table[1] = [0]
+ # table[1] # => [0, nil, nil]
+ #
+ # If there are too many values, ignores the extra values:
+ # table[1] = [0, 1, 2, 3, 4]
+ # table[1] # => [0, 1, 2]
+ #
+ # If a single value is given, replaces all fields in the column with that value:
+ # table[1] = 'bat'
+ # table[1] # => ["bat", "bat", "bat"]
+ #
+ # ---
+ #
+ # Set a Column by Its \String Header::
+ # - Form: <tt>table[header] = field_or_array_of_fields</tt>,
+ # +header+ a \String header, +field_or_array_of_fields+ a field value
+ # or an \Array of \String fields.
+ # - Access mode: <tt>:col</tt> or <tt>:col_or_row</tt>.
+ # - Return value: +field_or_array_of_fields+.
+ #
+ # If the column exists, it is replaced:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # new_col = [3, 4, 5]
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # return_value = table['Value'] = new_col
+ # return_value.equal?(new_col) # => true # Returned the column
+ # table['Value'] # => [3, 4, 5]
+ # # The rows, as revised:
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # table[0].to_h # => {"Name"=>"foo", "Value"=>3}
+ # table[1].to_h # => {"Name"=>"bar", "Value"=>4}
+ # table[2].to_h # => {"Name"=>"baz", "Value"=>5}
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ #
+ # If there are too few values, fills with +nil+ values:
+ # table['Value'] = [0]
+ # table['Value'] # => [0, nil, nil]
+ #
+ # If there are too many values, ignores the extra values:
+ # table['Value'] = [0, 1, 2, 3, 4]
+ # table['Value'] # => [0, 1, 2]
+ #
+ # If the column does not exist, extends the table by adding columns:
+ # table['Note'] = ['x', 'y', 'z']
+ # table['Note'] # => ["x", "y", "z"]
+ # # The rows, as revised:
+ # table.by_row!
+ # table[0].to_h # => {"Name"=>"foo", "Value"=>0, "Note"=>"x"}
+ # table[1].to_h # => {"Name"=>"bar", "Value"=>1, "Note"=>"y"}
+ # table[2].to_h # => {"Name"=>"baz", "Value"=>2, "Note"=>"z"}
+ # table.by_col!
+ #
+ # If a single value is given, replaces all fields in the column with that value:
+ # table['Value'] = 'bat'
+ # table['Value'] # => ["bat", "bat", "bat"]
def []=(index_or_header, value)
if @mode == :row or # by index
(@mode == :col_or_row and index_or_header.is_a? Integer)
@@ -210,15 +679,58 @@ class CSV
end
end
+ # :call-seq:
+ # table.values_at(*indexes) -> array_of_rows
+ # table.values_at(*headers) -> array_of_columns_data
+ #
+ # If the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>,
+ # and each argument is either an \Integer or a \Range,
+ # returns rows.
+ # Otherwise, returns columns data.
+ #
+ # In either case, the returned values are in the order
+ # specified by the arguments. Arguments may be repeated.
+ #
+ # ---
#
- # The mixed mode default is to treat a list of indices as row access,
- # returning the rows indicated. Anything else is considered columnar
- # access. For columnar access, the return set has an Array for each row
- # with the values indicated by the headers in each Array. You can force
- # column or row mode using by_col!() or by_row!().
+ # Returns rows as an \Array of \CSV::Row objects.
#
- # You cannot mix column and row access.
+ # No argument:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.values_at # => []
#
+ # One index:
+ # values = table.values_at(0)
+ # values # => [#<CSV::Row "Name":"foo" "Value":"0">]
+ #
+ # Two indexes:
+ # values = table.values_at(2, 0)
+ # values # => [#<CSV::Row "Name":"baz" "Value":"2">, #<CSV::Row "Name":"foo" "Value":"0">]
+ #
+ # One \Range:
+ # values = table.values_at(1..2)
+ # values # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
+ #
+ # \Ranges and indexes:
+ # values = table.values_at(0..1, 1..2, 0, 2)
+ # pp values
+ # Output:
+ # [#<CSV::Row "Name":"foo" "Value":"0">,
+ # #<CSV::Row "Name":"bar" "Value":"1">,
+ # #<CSV::Row "Name":"bar" "Value":"1">,
+ # #<CSV::Row "Name":"baz" "Value":"2">,
+ # #<CSV::Row "Name":"foo" "Value":"0">,
+ # #<CSV::Row "Name":"baz" "Value":"2">]
+ #
+ # ---
+ #
+ # Returns columns data as row Arrays,
+ # each consisting of the specified columns data for that row:
+ # values = table.values_at('Name')
+ # values # => [["foo"], ["bar"], ["baz"]]
+ # values = table.values_at('Value', 'Name')
+ # values # => [["0", "foo"], ["1", "bar"], ["2", "baz"]]
def values_at(*indices_or_headers)
if @mode == :row or # by indices
( @mode == :col_or_row and indices_or_headers.all? do |index|
@@ -233,13 +745,20 @@ class CSV
end
end
+ # :call-seq:
+ # table << row_or_array -> self
#
- # Adds a new row to the bottom end of this table. You can provide an Array,
- # which will be converted to a CSV::Row (inheriting the table's headers()),
- # or a CSV::Row.
- #
- # This method returns the table for chaining.
+ # If +row_or_array+ is a \CSV::Row object,
+ # it is appended to the table:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table << CSV::Row.new(table.headers, ['bat', 3])
+ # table[3] # => #<CSV::Row "Name":"bat" "Value":3>
#
+ # If +row_or_array+ is an \Array, it is used to create a new
+ # \CSV::Row object which is then appended to the table:
+ # table << ['bam', 4]
+ # table[4] # => #<CSV::Row "Name":"bam" "Value":4>
def <<(row_or_array)
if row_or_array.is_a? Array # append Array
@table << Row.new(headers, row_or_array)
@@ -251,23 +770,67 @@ class CSV
end
#
- # A shortcut for appending multiple rows. Equivalent to:
- #
- # rows.each { |row| self << row }
+ # :call-seq:
+ # table.push(*rows_or_arrays) -> self
#
- # This method returns the table for chaining.
+ # A shortcut for appending multiple rows. Equivalent to:
+ # rows.each {|row| self << row }
#
+ # Each argument may be either a \CSV::Row object or an \Array:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # rows = [
+ # CSV::Row.new(table.headers, ['bat', 3]),
+ # ['bam', 4]
+ # ]
+ # table.push(*rows)
+ # table[3..4] # => [#<CSV::Row "Name":"bat" "Value":3>, #<CSV::Row "Name":"bam" "Value":4>]
def push(*rows)
rows.each { |row| self << row }
self # for chaining
end
+ # :call-seq:
+ # table.delete(*indexes) -> deleted_values
+ # table.delete(*headers) -> deleted_values
+ #
+ # If the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>,
+ # and each argument is either an \Integer or a \Range,
+ # returns deleted rows.
+ # Otherwise, returns deleted columns data.
+ #
+ # In either case, the returned values are in the order
+ # specified by the arguments. Arguments may be repeated.
+ #
+ # ---
+ #
+ # Returns rows as an \Array of \CSV::Row objects.
+ #
+ # One index:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # deleted_values = table.delete(0)
+ # deleted_values # => [#<CSV::Row "Name":"foo" "Value":"0">]
+ #
+ # Two indexes:
+ # table = CSV.parse(source, headers: true)
+ # deleted_values = table.delete(2, 0)
+ # deleted_values # => [#<CSV::Row "Name":"baz" "Value":"2">, #<CSV::Row "Name":"foo" "Value":"0">]
#
- # Removes and returns the indicated columns or rows. In the default mixed
- # mode indices refer to rows and everything else is assumed to be a column
- # headers. Use by_col!() or by_row!() to force the lookup.
+ # ---
#
+ # Returns columns data as column Arrays.
+ #
+ # One header:
+ # table = CSV.parse(source, headers: true)
+ # deleted_values = table.delete('Name')
+ # deleted_values # => ["foo", "bar", "baz"]
+ #
+ # Two headers:
+ # table = CSV.parse(source, headers: true)
+ # deleted_values = table.delete('Value', 'Name')
+ # deleted_values # => [["0", "1", "2"], ["foo", "bar", "baz"]]
def delete(*indexes_or_headers)
if indexes_or_headers.empty?
raise ArgumentError, "wrong number of arguments (given 0, expected 1+)"
@@ -292,25 +855,43 @@ class CSV
end
end
+ # :call-seq:
+ # table.delete_if {|row_or_column| ... } -> self
#
- # Removes any column or row for which the block returns +true+. In the
- # default mixed mode or row mode, iteration is the standard row major
- # walking of rows. In column mode, iteration will +yield+ two element
- # tuples containing the column name and an Array of values for that column.
+ # Removes rows or columns for which the block returns a truthy value;
+ # returns +self+.
#
- # This method returns the table for chaining.
+ # Removes rows when the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>;
+ # calls the block with each \CSV::Row object:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # table.size # => 3
+ # table.delete_if {|row| row['Name'].start_with?('b') }
+ # table.size # => 1
#
- # If no block is given, an Enumerator is returned.
+ # Removes columns when the access mode is <tt>:col</tt>;
+ # calls the block with each column as a 2-element array
+ # containing the header and an \Array of column fields:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # table.headers.size # => 2
+ # table.delete_if {|column_data| column_data[1].include?('2') }
+ # table.headers.size # => 1
#
+ # Returns a new \Enumerator if no block is given:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.delete_if # => #<Enumerator: #<CSV::Table mode:col_or_row row_count:4>:delete_if>
def delete_if(&block)
return enum_for(__method__) { @mode == :row or @mode == :col_or_row ? size : headers.size } unless block_given?
if @mode == :row or @mode == :col_or_row # by index
@table.delete_if(&block)
else # by header
- deleted = []
headers.each do |header|
- deleted << delete(header) if yield([header, self[header]])
+ delete(header) if yield([header, self[header]])
end
end
@@ -319,20 +900,40 @@ class CSV
include Enumerable
+ # :call-seq:
+ # table.each {|row_or_column| ... ) -> self
#
- # In the default mixed mode or row mode, iteration is the standard row major
- # walking of rows. In column mode, iteration will +yield+ two element
- # tuples containing the column name and an Array of values for that column.
+ # Calls the block with each row or column; returns +self+.
#
- # This method returns the table for chaining.
+ # When the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>,
+ # calls the block with each \CSV::Row object:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.by_row! # => #<CSV::Table mode:row row_count:4>
+ # table.each {|row| p row }
+ # Output:
+ # #<CSV::Row "Name":"foo" "Value":"0">
+ # #<CSV::Row "Name":"bar" "Value":"1">
+ # #<CSV::Row "Name":"baz" "Value":"2">
#
- # If no block is given, an Enumerator is returned.
+ # When the access mode is <tt>:col</tt>,
+ # calls the block with each column as a 2-element array
+ # containing the header and an \Array of column fields:
+ # table.by_col! # => #<CSV::Table mode:col row_count:4>
+ # table.each {|column_data| p column_data }
+ # Output:
+ # ["Name", ["foo", "bar", "baz"]]
+ # ["Value", ["0", "1", "2"]]
#
+ # Returns a new \Enumerator if no block is given:
+ # table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
def each(&block)
return enum_for(__method__) { @mode == :col ? headers.size : size } unless block_given?
if @mode == :col
- headers.each { |header| yield([header, self[header]]) }
+ headers.each.with_index do |header, i|
+ yield([header, @table.map {|row| row[header, i]}])
+ end
else
@table.each(&block)
end
@@ -340,16 +941,40 @@ class CSV
self # for chaining
end
- # Returns +true+ if all rows of this table ==() +other+'s rows.
+ # :call-seq:
+ # table == other_table -> true or false
+ #
+ # Returns +true+ if all each row of +self+ <tt>==</tt>
+ # the corresponding row of +other_table+, otherwise, +false+.
+ #
+ # The access mode does no affect the result.
+ #
+ # Equal tables:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # other_table = CSV.parse(source, headers: true)
+ # table == other_table # => true
+ #
+ # Different row count:
+ # other_table.delete(2)
+ # table == other_table # => false
+ #
+ # Different last row:
+ # other_table << ['bat', 3]
+ # table == other_table # => false
def ==(other)
return @table == other.table if other.is_a? CSV::Table
@table == other
end
+ # :call-seq:
+ # table.to_a -> array_of_arrays
#
- # Returns the table as an Array of Arrays. Headers will be the first row,
- # then all of the field rows will follow.
- #
+ # Returns the table as an \Array of \Arrays;
+ # the headers are in the first row:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.to_a # => [["Name", "Value"], ["foo", "0"], ["bar", "1"], ["baz", "2"]]
def to_a
array = [headers]
@table.each do |row|
@@ -359,16 +984,29 @@ class CSV
array
end
+ # :call-seq:
+ # table.to_csv(**options) -> csv_string
#
- # Returns the table as a complete CSV String. Headers will be listed first,
- # then all of the field rows.
+ # Returns the table as \CSV string.
+ # See {Options for Generating}[../CSV.html#class-CSV-label-Options+for+Generating].
#
- # This method assumes you want the Table.headers(), unless you explicitly
- # pass <tt>:write_headers => false</tt>.
+ # Defaults option +write_headers+ to +true+:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.to_csv # => "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
#
- def to_csv(write_headers: true, **options)
+ # Omits the headers if option +write_headers+ is given as +false+
+ # (see {Option +write_headers+}[../CSV.html#class-CSV-label-Option+write_headers]):
+ # table.to_csv(write_headers: false) # => "foo,0\nbar,1\nbaz,2\n"
+ #
+ # Limit rows if option +limit+ is given like +2+:
+ # table.to_csv(limit: 2) # => "Name,Value\nfoo,0\nbar,1\n"
+ def to_csv(write_headers: true, limit: nil, **options)
array = write_headers ? [headers.to_csv(**options)] : []
- @table.each do |row|
+ limit ||= @table.size
+ limit = @table.size + 1 + limit if limit < 0
+ limit = 0 if limit < 0
+ @table.first(limit).each do |row|
array.push(row.fields.to_csv(**options)) unless row.header_row?
end
@@ -394,9 +1032,24 @@ class CSV
end
end
- # Shows the mode and size of this table in a US-ASCII String.
+ # :call-seq:
+ # table.inspect => string
+ #
+ # Returns a <tt>US-ASCII</tt>-encoded \String showing table:
+ # - Class: <tt>CSV::Table</tt>.
+ # - Access mode: <tt>:row</tt>, <tt>:col</tt>, or <tt>:col_or_row</tt>.
+ # - Size: Row count, including the header row.
+ #
+ # Example:
+ # source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
+ # table = CSV.parse(source, headers: true)
+ # table.inspect # => "#<CSV::Table mode:col_or_row row_count:4>\nName,Value\nfoo,0\nbar,1\nbaz,2\n"
+ #
def inspect
- "#<#{self.class} mode:#{@mode} row_count:#{to_a.size}>".encode("US-ASCII")
+ inspected = +"#<#{self.class} mode:#{@mode} row_count:#{to_a.size}>"
+ summary = to_csv(limit: 5)
+ inspected << "\n" << summary if summary.encoding.ascii_compatible?
+ inspected
end
end
end
diff --git a/lib/csv/version.rb b/lib/csv/version.rb
index 072400fe01..e05d63d801 100644
--- a/lib/csv/version.rb
+++ b/lib/csv/version.rb
@@ -2,5 +2,5 @@
class CSV
# The version of the installed library.
- VERSION = "3.1.2"
+ VERSION = "3.2.6"
end
diff --git a/lib/csv/writer.rb b/lib/csv/writer.rb
index 9243d23641..030a295bc9 100644
--- a/lib/csv/writer.rb
+++ b/lib/csv/writer.rb
@@ -1,10 +1,8 @@
# frozen_string_literal: true
-require_relative "match_p"
+require_relative "input_record_separator"
require_relative "row"
-using CSV::MatchP if CSV.const_defined?(:MatchP)
-
class CSV
# Note: Don't use this class directly. This is an internal class.
class Writer
@@ -41,10 +39,15 @@ class CSV
@headers ||= row if @use_headers
@lineno += 1
- row = @fields_converter.convert(row, nil, lineno) if @fields_converter
+ if @fields_converter
+ quoted_fields = [false] * row.size
+ row = @fields_converter.convert(row, nil, lineno, quoted_fields)
+ end
+ i = -1
converted_row = row.collect do |field|
- quote(field)
+ i += 1
+ quote(field, i)
end
line = converted_row.join(@column_separator) + @row_separator
if @output_encoding
@@ -94,22 +97,59 @@ class CSV
return unless @headers
converter = @options[:header_fields_converter]
- @headers = converter.convert(@headers, nil, 0)
+ @headers = converter.convert(@headers, nil, 0, [])
@headers.each do |header|
header.freeze if header.is_a?(String)
end
end
+ def prepare_force_quotes_fields(force_quotes)
+ @force_quotes_fields = {}
+ force_quotes.each do |name_or_index|
+ case name_or_index
+ when Integer
+ index = name_or_index
+ @force_quotes_fields[index] = true
+ when String, Symbol
+ name = name_or_index.to_s
+ if @headers.nil?
+ message = ":headers is required when you use field name " +
+ "in :force_quotes: " +
+ "#{name_or_index.inspect}: #{force_quotes.inspect}"
+ raise ArgumentError, message
+ end
+ index = @headers.index(name)
+ next if index.nil?
+ @force_quotes_fields[index] = true
+ else
+ message = ":force_quotes element must be " +
+ "field index or field name: " +
+ "#{name_or_index.inspect}: #{force_quotes.inspect}"
+ raise ArgumentError, message
+ end
+ end
+ end
+
def prepare_format
@column_separator = @options[:column_separator].to_s.encode(@encoding)
row_separator = @options[:row_separator]
if row_separator == :auto
- @row_separator = $INPUT_RECORD_SEPARATOR.encode(@encoding)
+ @row_separator = InputRecordSeparator.value.encode(@encoding)
else
@row_separator = row_separator.to_s.encode(@encoding)
end
@quote_character = @options[:quote_character]
- @force_quotes = @options[:force_quotes]
+ force_quotes = @options[:force_quotes]
+ if force_quotes.is_a?(Array)
+ prepare_force_quotes_fields(force_quotes)
+ @force_quotes = false
+ elsif force_quotes
+ @force_quotes_fields = nil
+ @force_quotes = true
+ else
+ @force_quotes_fields = nil
+ @force_quotes = false
+ end
unless @force_quotes
@quotable_pattern =
Regexp.new("[\r\n".encode(@encoding) +
@@ -147,16 +187,18 @@ class CSV
encoded_quote_character
end
- def quote(field)
+ def quote(field, i)
if @force_quotes
quote_field(field)
+ elsif @force_quotes_fields and @force_quotes_fields[i]
+ quote_field(field)
else
if field.nil? # represent +nil+ fields as empty unquoted fields
""
else
field = String(field) # Stringify fields
# represent empty fields as empty quoted fields
- if (@quote_empty and field.empty?) or @quotable_pattern.match?(field)
+ if (@quote_empty and field.empty?) or (field.valid_encoding? and @quotable_pattern.match?(field))
quote_field(field)
else
field # unquoted field
diff --git a/lib/debug.rb b/lib/debug.rb
deleted file mode 100644
index 6f519c6c77..0000000000
--- a/lib/debug.rb
+++ /dev/null
@@ -1,1106 +0,0 @@
-# frozen_string_literal: true
-# Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
-# Copyright (C) 2000 Information-technology Promotion Agency, Japan
-# Copyright (C) 2000-2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
-
-require 'continuation'
-
-require 'tracer'
-require 'pp'
-
-class Tracer # :nodoc:
- def Tracer.trace_func(*vars)
- Single.trace_func(*vars)
- end
-end
-
-SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ # :nodoc:
-
-##
-# This library provides debugging functionality to Ruby.
-#
-# To add a debugger to your code, start by requiring +debug+ in your
-# program:
-#
-# def say(word)
-# require 'debug'
-# puts word
-# end
-#
-# This will cause Ruby to interrupt execution and show a prompt when the +say+
-# method is run.
-#
-# Once you're inside the prompt, you can start debugging your program.
-#
-# (rdb:1) p word
-# "hello"
-#
-# == Getting help
-#
-# You can get help at any time by pressing +h+.
-#
-# (rdb:1) h
-# Debugger help v.-0.002b
-# Commands
-# b[reak] [file:|class:]<line|method>
-# b[reak] [class.]<line|method>
-# set breakpoint to some position
-# wat[ch] <expression> set watchpoint to some expression
-# cat[ch] (<exception>|off) set catchpoint to an exception
-# b[reak] list breakpoints
-# cat[ch] show catchpoint
-# del[ete][ nnn] delete some or all breakpoints
-# disp[lay] <expression> add expression into display expression list
-# undisp[lay][ nnn] delete one particular or all display expressions
-# c[ont] run until program ends or hit breakpoint
-# s[tep][ nnn] step (into methods) one line or till line nnn
-# n[ext][ nnn] go over one line or till line nnn
-# w[here] display frames
-# f[rame] alias for where
-# l[ist][ (-|nn-mm)] list program, - lists backwards
-# nn-mm lists given lines
-# up[ nn] move to higher frame
-# down[ nn] move to lower frame
-# fin[ish] return to outer frame
-# tr[ace] (on|off) set trace mode of current thread
-# tr[ace] (on|off) all set trace mode of all threads
-# q[uit] exit from debugger
-# v[ar] g[lobal] show global variables
-# v[ar] l[ocal] show local variables
-# v[ar] i[nstance] <object> show instance variables of object
-# v[ar] c[onst] <object> show constants of object
-# m[ethod] i[nstance] <obj> show methods of object
-# m[ethod] <class|module> show instance methods of class or module
-# th[read] l[ist] list all threads
-# th[read] c[ur[rent]] show current thread
-# th[read] [sw[itch]] <nnn> switch thread context to nnn
-# th[read] stop <nnn> stop thread nnn
-# th[read] resume <nnn> resume thread nnn
-# p expression evaluate expression and print its value
-# h[elp] print this help
-# <everything else> evaluate
-#
-# == Usage
-#
-# The following is a list of common functionalities that the debugger
-# provides.
-#
-# === Navigating through your code
-#
-# In general, a debugger is used to find bugs in your program, which
-# often means pausing execution and inspecting variables at some point
-# in time.
-#
-# Let's look at an example:
-#
-# def my_method(foo)
-# require 'debug'
-# foo = get_foo if foo.nil?
-# raise if foo.nil?
-# end
-#
-# When you run this program, the debugger will kick in just before the
-# +foo+ assignment.
-#
-# (rdb:1) p foo
-# nil
-#
-# In this example, it'd be interesting to move to the next line and
-# inspect the value of +foo+ again. You can do that by pressing +n+:
-#
-# (rdb:1) n # goes to next line
-# (rdb:1) p foo
-# nil
-#
-# You now know that the original value of +foo+ was nil, and that it
-# still was nil after calling +get_foo+.
-#
-# Other useful commands for navigating through your code are:
-#
-# +c+::
-# Runs the program until it either exists or encounters another breakpoint.
-# You usually press +c+ when you are finished debugging your program and
-# want to resume its execution.
-# +s+::
-# Steps into method definition. In the previous example, +s+ would take you
-# inside the method definition of +get_foo+.
-# +r+::
-# Restart the program.
-# +q+::
-# Quit the program.
-#
-# === Inspecting variables
-#
-# You can use the debugger to easily inspect both local and global variables.
-# We've seen how to inspect local variables before:
-#
-# (rdb:1) p my_arg
-# 42
-#
-# You can also pretty print the result of variables or expressions:
-#
-# (rdb:1) pp %w{a very long long array containing many words}
-# ["a",
-# "very",
-# "long",
-# ...
-# ]
-#
-# You can list all local variables with +v l+:
-#
-# (rdb:1) v l
-# foo => "hello"
-#
-# Similarly, you can show all global variables with +v g+:
-#
-# (rdb:1) v g
-# all global variables
-#
-# Finally, you can omit +p+ if you simply want to evaluate a variable or
-# expression
-#
-# (rdb:1) 5**2
-# 25
-#
-# === Going beyond basics
-#
-# Ruby Debug provides more advanced functionalities like switching
-# between threads, setting breakpoints and watch expressions, and more.
-# The full list of commands is available at any time by pressing +h+.
-#
-# == Staying out of trouble
-#
-# Make sure you remove every instance of +require 'debug'+ before
-# shipping your code. Failing to do so may result in your program
-# hanging unpredictably.
-#
-# Debug is not available in safe mode.
-
-class DEBUGGER__
- MUTEX = Thread::Mutex.new # :nodoc:
-
- class Context # :nodoc:
- DEBUG_LAST_CMD = []
-
- begin
- require 'readline'
- def readline(prompt, hist)
- Readline::readline(prompt, hist)
- end
- rescue LoadError
- def readline(prompt, hist)
- STDOUT.print prompt
- STDOUT.flush
- line = STDIN.gets
- exit unless line
- line.chomp!
- line
- end
- USE_READLINE = false
- end
-
- def initialize
- if Thread.current == Thread.main
- @stop_next = 1
- else
- @stop_next = 0
- end
- @last_file = nil
- @file = nil
- @line = nil
- @no_step = nil
- @frames = []
- @finish_pos = 0
- @trace = false
- @catch = "StandardError"
- @suspend_next = false
- end
-
- def stop_next(n=1)
- @stop_next = n
- end
-
- def set_suspend
- @suspend_next = true
- end
-
- def clear_suspend
- @suspend_next = false
- end
-
- def suspend_all
- DEBUGGER__.suspend
- end
-
- def resume_all
- DEBUGGER__.resume
- end
-
- def check_suspend
- while MUTEX.synchronize {
- if @suspend_next
- DEBUGGER__.waiting.push Thread.current
- @suspend_next = false
- true
- end
- }
- end
- end
-
- def trace?
- @trace
- end
-
- def set_trace(arg)
- @trace = arg
- end
-
- def stdout
- DEBUGGER__.stdout
- end
-
- def break_points
- DEBUGGER__.break_points
- end
-
- def display
- DEBUGGER__.display
- end
-
- def context(th)
- DEBUGGER__.context(th)
- end
-
- def set_trace_all(arg)
- DEBUGGER__.set_trace(arg)
- end
-
- def set_last_thread(th)
- DEBUGGER__.set_last_thread(th)
- end
-
- def debug_eval(str, binding)
- begin
- eval(str, binding)
- rescue StandardError, ScriptError => e
- at = eval("caller(1)", binding)
- stdout.printf "%s:%s\n", at.shift, e.to_s.sub(/\(eval\):1:(in `.*?':)?/, '')
- for i in at
- stdout.printf "\tfrom %s\n", i
- end
- throw :debug_error
- end
- end
-
- def debug_silent_eval(str, binding)
- begin
- eval(str, binding)
- rescue StandardError, ScriptError
- nil
- end
- end
-
- def var_list(ary, binding)
- ary.sort!
- for v in ary
- stdout.printf " %s => %s\n", v, eval(v.to_s, binding).inspect
- end
- end
-
- def debug_variable_info(input, binding)
- case input
- when /^\s*g(?:lobal)?\s*$/
- var_list(global_variables, binding)
-
- when /^\s*l(?:ocal)?\s*$/
- var_list(eval("local_variables", binding), binding)
-
- when /^\s*i(?:nstance)?\s+/
- obj = debug_eval($', binding)
- var_list(obj.instance_variables, obj.instance_eval{binding()})
-
- when /^\s*c(?:onst(?:ant)?)?\s+/
- obj = debug_eval($', binding)
- unless obj.kind_of? Module
- stdout.print "Should be Class/Module: ", $', "\n"
- else
- var_list(obj.constants, obj.module_eval{binding()})
- end
- end
- end
-
- def debug_method_info(input, binding)
- case input
- when /^i(:?nstance)?\s+/
- obj = debug_eval($', binding)
-
- len = 0
- for v in obj.methods.sort
- len += v.size + 1
- if len > 70
- len = v.size + 1
- stdout.print "\n"
- end
- stdout.print v, " "
- end
- stdout.print "\n"
-
- else
- obj = debug_eval(input, binding)
- unless obj.kind_of? Module
- stdout.print "Should be Class/Module: ", input, "\n"
- else
- len = 0
- for v in obj.instance_methods(false).sort
- len += v.size + 1
- if len > 70
- len = v.size + 1
- stdout.print "\n"
- end
- stdout.print v, " "
- end
- stdout.print "\n"
- end
- end
- end
-
- def thnum
- num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
- unless num
- DEBUGGER__.make_thread_list
- num = DEBUGGER__.instance_eval{@thread_list[Thread.current]}
- end
- num
- end
-
- def debug_command(file, line, id, binding)
- MUTEX.lock
- unless defined?($debugger_restart) and $debugger_restart
- callcc{|c| $debugger_restart = c}
- end
- set_last_thread(Thread.current)
- frame_pos = 0
- binding_file = file
- binding_line = line
- previous_line = nil
- if ENV['EMACS']
- stdout.printf "\032\032%s:%d:\n", binding_file, binding_line
- else
- stdout.printf "%s:%d:%s", binding_file, binding_line,
- line_at(binding_file, binding_line)
- end
- @frames[0] = [binding, file, line, id]
- display_expressions(binding)
- prompt = true
- while prompt and input = readline("(rdb:%d) "%thnum(), true)
- catch(:debug_error) do
- if input == ""
- next unless DEBUG_LAST_CMD[0]
- input = DEBUG_LAST_CMD[0]
- stdout.print input, "\n"
- else
- DEBUG_LAST_CMD[0] = input
- end
-
- case input
- when /^\s*tr(?:ace)?(?:\s+(on|off))?(?:\s+(all))?$/
- if defined?( $2 )
- if $1 == 'on'
- set_trace_all true
- else
- set_trace_all false
- end
- elsif defined?( $1 )
- if $1 == 'on'
- set_trace true
- else
- set_trace false
- end
- end
- if trace?
- stdout.print "Trace on.\n"
- else
- stdout.print "Trace off.\n"
- end
-
- when /^\s*b(?:reak)?\s+(?:(.+):)?([^.:]+)$/
- pos = $2
- if $1
- klass = debug_silent_eval($1, binding)
- file = File.expand_path($1)
- end
- if pos =~ /^\d+$/
- pname = pos
- pos = pos.to_i
- else
- pname = pos = pos.intern.id2name
- end
- break_points.push [true, 0, klass || file, pos]
- stdout.printf "Set breakpoint %d at %s:%s\n", break_points.size, klass || file, pname
-
- when /^\s*b(?:reak)?\s+(.+)[#.]([^.:]+)$/
- pos = $2.intern.id2name
- klass = debug_eval($1, binding)
- break_points.push [true, 0, klass, pos]
- stdout.printf "Set breakpoint %d at %s.%s\n", break_points.size, klass, pos
-
- when /^\s*wat(?:ch)?\s+(.+)$/
- exp = $1
- break_points.push [true, 1, exp]
- stdout.printf "Set watchpoint %d:%s\n", break_points.size, exp
-
- when /^\s*b(?:reak)?$/
- if break_points.find{|b| b[1] == 0}
- n = 1
- stdout.print "Breakpoints:\n"
- break_points.each do |b|
- if b[0] and b[1] == 0
- stdout.printf " %d %s:%s\n", n, b[2], b[3]
- end
- n += 1
- end
- end
- if break_points.find{|b| b[1] == 1}
- n = 1
- stdout.print "\n"
- stdout.print "Watchpoints:\n"
- for b in break_points
- if b[0] and b[1] == 1
- stdout.printf " %d %s\n", n, b[2]
- end
- n += 1
- end
- end
- if break_points.size == 0
- stdout.print "No breakpoints\n"
- else
- stdout.print "\n"
- end
-
- when /^\s*del(?:ete)?(?:\s+(\d+))?$/
- pos = $1
- unless pos
- input = readline("Clear all breakpoints? (y/n) ", false)
- if input == "y"
- for b in break_points
- b[0] = false
- end
- end
- else
- pos = pos.to_i
- if break_points[pos-1]
- break_points[pos-1][0] = false
- else
- stdout.printf "Breakpoint %d is not defined\n", pos
- end
- end
-
- when /^\s*disp(?:lay)?\s+(.+)$/
- exp = $1
- display.push [true, exp]
- stdout.printf "%d: ", display.size
- display_expression(exp, binding)
-
- when /^\s*disp(?:lay)?$/
- display_expressions(binding)
-
- when /^\s*undisp(?:lay)?(?:\s+(\d+))?$/
- pos = $1
- unless pos
- input = readline("Clear all expressions? (y/n) ", false)
- if input == "y"
- for d in display
- d[0] = false
- end
- end
- else
- pos = pos.to_i
- if display[pos-1]
- display[pos-1][0] = false
- else
- stdout.printf "Display expression %d is not defined\n", pos
- end
- end
-
- when /^\s*c(?:ont)?$/
- prompt = false
-
- when /^\s*s(?:tep)?(?:\s+(\d+))?$/
- if $1
- lev = $1.to_i
- else
- lev = 1
- end
- @stop_next = lev
- prompt = false
-
- when /^\s*n(?:ext)?(?:\s+(\d+))?$/
- if $1
- lev = $1.to_i
- else
- lev = 1
- end
- @stop_next = lev
- @no_step = @frames.size - frame_pos
- prompt = false
-
- when /^\s*w(?:here)?$/, /^\s*f(?:rame)?$/
- display_frames(frame_pos)
-
- when /^\s*l(?:ist)?(?:\s+(.+))?$/
- if not $1
- b = previous_line ? previous_line + 10 : binding_line - 5
- e = b + 9
- elsif $1 == '-'
- b = previous_line ? previous_line - 10 : binding_line - 5
- e = b + 9
- else
- b, e = $1.split(/[-,]/)
- if e
- b = b.to_i
- e = e.to_i
- else
- b = b.to_i - 5
- e = b + 9
- end
- end
- previous_line = b
- display_list(b, e, binding_file, binding_line)
-
- when /^\s*up(?:\s+(\d+))?$/
- previous_line = nil
- if $1
- lev = $1.to_i
- else
- lev = 1
- end
- frame_pos += lev
- if frame_pos >= @frames.size
- frame_pos = @frames.size - 1
- stdout.print "At toplevel\n"
- end
- binding, binding_file, binding_line = @frames[frame_pos]
- stdout.print format_frame(frame_pos)
-
- when /^\s*down(?:\s+(\d+))?$/
- previous_line = nil
- if $1
- lev = $1.to_i
- else
- lev = 1
- end
- frame_pos -= lev
- if frame_pos < 0
- frame_pos = 0
- stdout.print "At stack bottom\n"
- end
- binding, binding_file, binding_line = @frames[frame_pos]
- stdout.print format_frame(frame_pos)
-
- when /^\s*fin(?:ish)?$/
- if frame_pos == @frames.size
- stdout.print "\"finish\" not meaningful in the outermost frame.\n"
- else
- @finish_pos = @frames.size - frame_pos
- frame_pos = 0
- prompt = false
- end
-
- when /^\s*cat(?:ch)?(?:\s+(.+))?$/
- if $1
- excn = $1
- if excn == 'off'
- @catch = nil
- stdout.print "Clear catchpoint.\n"
- else
- @catch = excn
- stdout.printf "Set catchpoint %s.\n", @catch
- end
- else
- if @catch
- stdout.printf "Catchpoint %s.\n", @catch
- else
- stdout.print "No catchpoint.\n"
- end
- end
-
- when /^\s*q(?:uit)?$/
- input = readline("Really quit? (y/n) ", false)
- if input == "y"
- exit! # exit -> exit!: No graceful way to stop threads...
- end
-
- when /^\s*v(?:ar)?\s+/
- debug_variable_info($', binding)
-
- when /^\s*m(?:ethod)?\s+/
- debug_method_info($', binding)
-
- when /^\s*th(?:read)?\s+/
- if DEBUGGER__.debug_thread_info($', binding) == :cont
- prompt = false
- end
-
- when /^\s*pp\s+/
- PP.pp(debug_eval($', binding), stdout)
-
- when /^\s*p\s+/
- stdout.printf "%s\n", debug_eval($', binding).inspect
-
- when /^\s*r(?:estart)?$/
- $debugger_restart.call
-
- when /^\s*h(?:elp)?$/
- debug_print_help()
-
- else
- v = debug_eval(input, binding)
- stdout.printf "%s\n", v.inspect
- end
- end
- end
- MUTEX.unlock
- resume_all
- end
-
- def debug_print_help
- stdout.print <<EOHELP
-Debugger help v.-0.002b
-Commands
- b[reak] [file:|class:]<line|method>
- b[reak] [class.]<line|method>
- set breakpoint to some position
- wat[ch] <expression> set watchpoint to some expression
- cat[ch] (<exception>|off) set catchpoint to an exception
- b[reak] list breakpoints
- cat[ch] show catchpoint
- del[ete][ nnn] delete some or all breakpoints
- disp[lay] <expression> add expression into display expression list
- undisp[lay][ nnn] delete one particular or all display expressions
- c[ont] run until program ends or hit breakpoint
- s[tep][ nnn] step (into methods) one line or till line nnn
- n[ext][ nnn] go over one line or till line nnn
- w[here] display frames
- f[rame] alias for where
- l[ist][ (-|nn-mm)] list program, - lists backwards
- nn-mm lists given lines
- up[ nn] move to higher frame
- down[ nn] move to lower frame
- fin[ish] return to outer frame
- tr[ace] (on|off) set trace mode of current thread
- tr[ace] (on|off) all set trace mode of all threads
- q[uit] exit from debugger
- v[ar] g[lobal] show global variables
- v[ar] l[ocal] show local variables
- v[ar] i[nstance] <object> show instance variables of object
- v[ar] c[onst] <object> show constants of object
- m[ethod] i[nstance] <obj> show methods of object
- m[ethod] <class|module> show instance methods of class or module
- th[read] l[ist] list all threads
- th[read] c[ur[rent]] show current thread
- th[read] [sw[itch]] <nnn> switch thread context to nnn
- th[read] stop <nnn> stop thread nnn
- th[read] resume <nnn> resume thread nnn
- pp expression evaluate expression and pretty_print its value
- p expression evaluate expression and print its value
- r[estart] restart program
- h[elp] print this help
- <everything else> evaluate
-EOHELP
- end
-
- def display_expressions(binding)
- n = 1
- for d in display
- if d[0]
- stdout.printf "%d: ", n
- display_expression(d[1], binding)
- end
- n += 1
- end
- end
-
- def display_expression(exp, binding)
- stdout.printf "%s = %s\n", exp, debug_silent_eval(exp, binding).to_s
- end
-
- def frame_set_pos(file, line)
- if @frames[0]
- @frames[0][1] = file
- @frames[0][2] = line
- end
- end
-
- def display_frames(pos)
- 0.upto(@frames.size - 1) do |n|
- if n == pos
- stdout.print "--> "
- else
- stdout.print " "
- end
- stdout.print format_frame(n)
- end
- end
-
- def format_frame(pos)
- _, file, line, id = @frames[pos]
- sprintf "#%d %s:%s%s\n", pos + 1, file, line,
- (id ? ":in `#{id.id2name}'" : "")
- end
-
- def script_lines(file, line)
- unless (lines = SCRIPT_LINES__[file]) and lines != true
- Tracer::Single.get_line(file, line) if File.exist?(file)
- lines = SCRIPT_LINES__[file]
- lines = nil if lines == true
- end
- lines
- end
-
- def display_list(b, e, file, line)
- if lines = script_lines(file, line)
- stdout.printf "[%d, %d] in %s\n", b, e, file
- b.upto(e) do |n|
- if n > 0 && lines[n-1]
- if n == line
- stdout.printf "=> %d %s\n", n, lines[n-1].chomp
- else
- stdout.printf " %d %s\n", n, lines[n-1].chomp
- end
- end
- end
- else
- stdout.printf "No sourcefile available for %s\n", file
- end
- end
-
- def line_at(file, line)
- lines = script_lines(file, line)
- if lines and line = lines[line-1]
- return line
- end
- return "\n"
- end
-
- def debug_funcname(id)
- if id.nil?
- "toplevel"
- else
- id.id2name
- end
- end
-
- def check_break_points(file, klass, pos, binding, id)
- return false if break_points.empty?
- n = 1
- for b in break_points
- if b[0] # valid
- if b[1] == 0 # breakpoint
- if (b[2] == file and b[3] == pos) or
- (klass and b[2] == klass and b[3] == pos)
- stdout.printf "Breakpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
- return true
- end
- elsif b[1] == 1 # watchpoint
- if debug_silent_eval(b[2], binding)
- stdout.printf "Watchpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
- return true
- end
- end
- end
- n += 1
- end
- return false
- end
-
- def excn_handle(file, line, id, binding)
- if $!.class <= SystemExit
- set_trace_func nil
- exit
- end
-
- if @catch and ($!.class.ancestors.find { |e| e.to_s == @catch })
- stdout.printf "%s:%d: `%s' (%s)\n", file, line, $!, $!.class
- fs = @frames.size
- tb = caller(0)[-fs..-1]
- if tb
- for i in tb
- stdout.printf "\tfrom %s\n", i
- end
- end
- suspend_all
- debug_command(file, line, id, binding)
- end
- end
-
- def trace_func(event, file, line, id, binding, klass)
- Tracer.trace_func(event, file, line, id, binding, klass) if trace?
- context(Thread.current).check_suspend
- @file = file
- @line = line
- case event
- when 'line'
- frame_set_pos(file, line)
- if !@no_step or @frames.size == @no_step
- @stop_next -= 1
- @stop_next = -1 if @stop_next < 0
- elsif @frames.size < @no_step
- @stop_next = 0 # break here before leaving...
- else
- # nothing to do. skipped.
- end
- if @stop_next == 0 or check_break_points(file, nil, line, binding, id)
- @no_step = nil
- suspend_all
- debug_command(file, line, id, binding)
- end
-
- when 'call'
- @frames.unshift [binding, file, line, id]
- if check_break_points(file, klass, id.id2name, binding, id)
- suspend_all
- debug_command(file, line, id, binding)
- end
-
- when 'c-call'
- frame_set_pos(file, line)
-
- when 'class'
- @frames.unshift [binding, file, line, id]
-
- when 'return', 'end'
- if @frames.size == @finish_pos
- @stop_next = 1
- @finish_pos = 0
- end
- @frames.shift
-
- when 'raise'
- excn_handle(file, line, id, binding)
-
- end
- @last_file = file
- end
- end
-
- trap("INT") { DEBUGGER__.interrupt }
- @last_thread = Thread::main
- @max_thread = 1
- @thread_list = {Thread::main => 1}
- @break_points = []
- @display = []
- @waiting = []
- @stdout = STDOUT
-
- class << DEBUGGER__
- # Returns the IO used as stdout. Defaults to STDOUT
- def stdout
- @stdout
- end
-
- # Sets the IO used as stdout. Defaults to STDOUT
- def stdout=(s)
- @stdout = s
- end
-
- # Returns the display expression list
- #
- # See DEBUGGER__ for more usage
- def display
- @display
- end
-
- # Returns the list of break points where execution will be stopped.
- #
- # See DEBUGGER__ for more usage
- def break_points
- @break_points
- end
-
- # Returns the list of waiting threads.
- #
- # When stepping through the traces of a function, thread gets suspended, to
- # be resumed later.
- def waiting
- @waiting
- end
-
- def set_trace( arg )
- MUTEX.synchronize do
- make_thread_list
- for th, in @thread_list
- context(th).set_trace arg
- end
- end
- arg
- end
-
- def set_last_thread(th)
- @last_thread = th
- end
-
- def suspend
- MUTEX.synchronize do
- make_thread_list
- for th, in @thread_list
- next if th == Thread.current
- context(th).set_suspend
- end
- end
- # Schedule other threads to suspend as soon as possible.
- Thread.pass
- end
-
- def resume
- MUTEX.synchronize do
- make_thread_list
- @thread_list.each do |th,|
- next if th == Thread.current
- context(th).clear_suspend
- end
- waiting.each do |th|
- th.run
- end
- waiting.clear
- end
- # Schedule other threads to restart as soon as possible.
- Thread.pass
- end
-
- def context(thread=Thread.current)
- c = thread[:__debugger_data__]
- unless c
- thread[:__debugger_data__] = c = Context.new
- end
- c
- end
-
- def interrupt
- context(@last_thread).stop_next
- end
-
- def get_thread(num)
- th = @thread_list.key(num)
- unless th
- @stdout.print "No thread ##{num}\n"
- throw :debug_error
- end
- th
- end
-
- def thread_list(num)
- th = get_thread(num)
- if th == Thread.current
- @stdout.print "+"
- else
- @stdout.print " "
- end
- @stdout.printf "%d ", num
- @stdout.print th.inspect, "\t"
- file = context(th).instance_eval{@file}
- if file
- @stdout.print file,":",context(th).instance_eval{@line}
- end
- @stdout.print "\n"
- end
-
- # Prints all threads in @thread_list to @stdout. Returns a sorted array of
- # values from the @thread_list hash.
- #
- # While in the debugger you can list all of
- # the threads with: <b>DEBUGGER__.thread_list_all</b>
- #
- # (rdb:1) DEBUGGER__.thread_list_all
- # +1 #<Thread:0x007fb2320c03f0 run> debug_me.rb.rb:3
- # 2 #<Thread:0x007fb23218a538@debug_me.rb.rb:3 sleep>
- # 3 #<Thread:0x007fb23218b0f0@debug_me.rb.rb:3 sleep>
- # [1, 2, 3]
- #
- # Your current thread is indicated by a <b>+</b>
- #
- # Additionally you can list all threads with <b>th l</b>
- #
- # (rdb:1) th l
- # +1 #<Thread:0x007f99328c0410 run> debug_me.rb:3
- # 2 #<Thread:0x007f9932938230@debug_me.rb:3 sleep> debug_me.rb:3
- # 3 #<Thread:0x007f9932938e10@debug_me.rb:3 sleep> debug_me.rb:3
- #
- # See DEBUGGER__ for more usage.
-
- def thread_list_all
- for th in @thread_list.values.sort
- thread_list(th)
- end
- end
-
- def make_thread_list
- hash = {}
- for th in Thread::list
- if @thread_list.key? th
- hash[th] = @thread_list[th]
- else
- @max_thread += 1
- hash[th] = @max_thread
- end
- end
- @thread_list = hash
- end
-
- def debug_thread_info(input, binding)
- case input
- when /^l(?:ist)?/
- make_thread_list
- thread_list_all
-
- when /^c(?:ur(?:rent)?)?$/
- make_thread_list
- thread_list(@thread_list[Thread.current])
-
- when /^(?:sw(?:itch)?\s+)?(\d+)/
- make_thread_list
- th = get_thread($1.to_i)
- if th == Thread.current
- @stdout.print "It's the current thread.\n"
- else
- thread_list(@thread_list[th])
- context(th).stop_next
- th.run
- return :cont
- end
-
- when /^stop\s+(\d+)/
- make_thread_list
- th = get_thread($1.to_i)
- if th == Thread.current
- @stdout.print "It's the current thread.\n"
- elsif th.stop?
- @stdout.print "Already stopped.\n"
- else
- thread_list(@thread_list[th])
- context(th).suspend
- end
-
- when /^resume\s+(\d+)/
- make_thread_list
- th = get_thread($1.to_i)
- if th == Thread.current
- @stdout.print "It's the current thread.\n"
- elsif !th.stop?
- @stdout.print "Already running."
- else
- thread_list(@thread_list[th])
- th.run
- end
- end
- end
- end
-
- stdout.printf "Debug.rb\n"
- stdout.printf "Emacs support available.\n\n"
- RubyVM::InstructionSequence.compile_option = {
- trace_instruction: true
- }
- set_trace_func proc { |event, file, line, id, binding, klass, *rest|
- DEBUGGER__.context.trace_func event, file, line, id, binding, klass
- }
-end
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 8c176dc82c..387a5f063d 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -21,6 +21,8 @@
# SimpleDelegator's implementation serves as a nice example of the use of
# Delegator:
#
+# require 'delegate'
+#
# class SimpleDelegator < Delegator
# def __getobj__
# @delegate_sd_obj # return object we are delegating to, required
@@ -37,10 +39,12 @@
# Be advised, RDoc will not detect delegated methods.
#
class Delegator < BasicObject
+ VERSION = "0.3.0"
+
kernel = ::Kernel.dup
kernel.class_eval do
alias __raise__ raise
- [:to_s, :inspect, :=~, :!~, :===, :<=>, :hash].each do |m|
+ [:to_s, :inspect, :!~, :===, :<=>, :hash].each do |m|
undef_method m
end
private_instance_methods.each do |m|
@@ -103,13 +107,20 @@ class Delegator < BasicObject
r
end
+ KERNEL_RESPOND_TO = ::Kernel.instance_method(:respond_to?)
+ private_constant :KERNEL_RESPOND_TO
+
# Handle BasicObject instances
private def target_respond_to?(target, m, include_private)
case target
when Object
target.respond_to?(m, include_private)
else
- ::Kernel.instance_method(:respond_to?).bind_call(target, m, include_private)
+ if KERNEL_RESPOND_TO.bind_call(target, :respond_to?)
+ target.respond_to?(m, include_private)
+ else
+ KERNEL_RESPOND_TO.bind_call(target, m, include_private)
+ end
end
end
@@ -211,8 +222,8 @@ class Delegator < BasicObject
end
end
- def initialize_clone(obj) # :nodoc:
- self.__setobj__(obj.__getobj__.clone)
+ def initialize_clone(obj, freeze: nil) # :nodoc:
+ self.__setobj__(obj.__getobj__.clone(freeze: freeze))
end
def initialize_dup(obj) # :nodoc:
self.__setobj__(obj.__getobj__.dup)
@@ -246,6 +257,8 @@ end
# end
# end
#
+# require 'delegate'
+#
# class UserDecorator < SimpleDelegator
# def birth_year
# born_on.year
@@ -334,7 +347,7 @@ def Delegator.delegating_block(mid) # :nodoc:
lambda do |*args, &block|
target = self.__getobj__
target.__send__(mid, *args, &block)
- end
+ end.ruby2_keywords
end
#
@@ -411,6 +424,21 @@ def DelegateClass(superclass, &block)
klass.define_singleton_method :protected_instance_methods do |all=true|
super(all) | superclass.protected_instance_methods
end
+ klass.define_singleton_method :instance_methods do |all=true|
+ super(all) | superclass.instance_methods
+ end
+ klass.define_singleton_method :public_instance_method do |name|
+ super(name)
+ rescue NameError
+ raise unless self.public_instance_methods.include?(name)
+ superclass.public_instance_method(name)
+ end
+ klass.define_singleton_method :instance_method do |name|
+ super(name)
+ rescue NameError
+ raise unless self.instance_methods.include?(name)
+ superclass.instance_method(name)
+ end
klass.module_eval(&block) if block
return klass
end
diff --git a/lib/delegate/delegate.gemspec b/lib/delegate/delegate.gemspec
index e51b50a98f..1cfacfeb2f 100644
--- a/lib/delegate/delegate.gemspec
+++ b/lib/delegate/delegate.gemspec
@@ -1,27 +1,29 @@
-begin
- require_relative "lib/delegate/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "delegate"
- spec.version = Delegator::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Provides three abilities to delegate method calls to an object.}
spec.description = %q{Provides three abilities to delegate method calls to an object.}
spec.homepage = "https://github.com/ruby/delegate"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
+ spec.required_ruby_version = '>= 2.7'
end
diff --git a/lib/delegate/version.rb b/lib/delegate/version.rb
deleted file mode 100644
index 456e8f772c..0000000000
--- a/lib/delegate/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class Delegator
- VERSION = "0.1.0"
-end
diff --git a/lib/did_you_mean.rb b/lib/did_you_mean.rb
index b8f92579ca..2df238da06 100644
--- a/lib/did_you_mean.rb
+++ b/lib/did_you_mean.rb
@@ -6,7 +6,9 @@ require_relative 'did_you_mean/spell_checkers/name_error_checkers'
require_relative 'did_you_mean/spell_checkers/method_name_checker'
require_relative 'did_you_mean/spell_checkers/key_error_checker'
require_relative 'did_you_mean/spell_checkers/null_checker'
-require_relative 'did_you_mean/formatters/plain_formatter'
+require_relative 'did_you_mean/spell_checkers/require_path_checker'
+require_relative 'did_you_mean/spell_checkers/pattern_key_name_checker'
+require_relative 'did_you_mean/formatter'
require_relative 'did_you_mean/tree_spell_checker'
# The +DidYouMean+ gem adds functionality to suggest possible method/class
@@ -84,27 +86,70 @@ require_relative 'did_you_mean/tree_spell_checker'
#
module DidYouMean
# Map of error types and spell checker objects.
- SPELL_CHECKERS = Hash.new(NullChecker)
+ @spell_checkers = Hash.new(NullChecker)
+
+ # Returns a sharable hash map of error types and spell checker objects.
+ def self.spell_checkers
+ @spell_checkers
+ end
# Adds +DidYouMean+ functionality to an error using a given spell checker
def self.correct_error(error_class, spell_checker)
- SPELL_CHECKERS[error_class.name] = spell_checker
- error_class.prepend(Correctable) unless error_class < Correctable
+ if defined?(Ractor)
+ new_mapping = { **@spell_checkers, error_class.to_s => spell_checker }
+ new_mapping.default = NullChecker
+
+ @spell_checkers = Ractor.make_shareable(new_mapping)
+ else
+ spell_checkers[error_class.to_s] = spell_checker
+ end
+
+ error_class.prepend(Correctable) if error_class.is_a?(Class) && !(error_class < Correctable)
end
correct_error NameError, NameErrorCheckers
correct_error KeyError, KeyErrorChecker
correct_error NoMethodError, MethodNameChecker
+ correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0'
+ correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError)
+
+ # TODO: Remove on 3.3:
+ class DeprecatedMapping # :nodoc:
+ def []=(key, value)
+ warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \
+ "Please call `DidYouMean.correct_error(#{key.to_s}, #{value.to_s})' instead."
+
+ DidYouMean.correct_error(key, value)
+ end
- # Returns the currenctly set formatter. By default, it is set to +DidYouMean::Formatter+.
+ def merge!(hash)
+ warn "Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. " \
+ "Please call `DidYouMean.correct_error(error_name, spell_checker)' instead."
+
+ hash.each do |error_class, spell_checker|
+ DidYouMean.correct_error(error_class, spell_checker)
+ end
+ end
+ end
+
+ # TODO: Remove on 3.3:
+ SPELL_CHECKERS = DeprecatedMapping.new
+ deprecate_constant :SPELL_CHECKERS
+ private_constant :DeprecatedMapping
+
+ # Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+.
def self.formatter
- @@formatter
+ if defined?(Ractor)
+ Ractor.current[:__did_you_mean_formatter__] || Formatter
+ else
+ Formatter
+ end
end
# Updates the primary formatter used to format the suggestions.
def self.formatter=(formatter)
- @@formatter = formatter
+ if defined?(Ractor)
+ Ractor.current[:__did_you_mean_formatter__] = formatter
+ end
end
-
- self.formatter = PlainFormatter.new
end
diff --git a/lib/did_you_mean/core_ext/name_error.rb b/lib/did_you_mean/core_ext/name_error.rb
index 77dcd520c0..8c170c4b90 100644
--- a/lib/did_you_mean/core_ext/name_error.rb
+++ b/lib/did_you_mean/core_ext/name_error.rb
@@ -1,17 +1,49 @@
module DidYouMean
module Correctable
- def original_message
- method(:to_s).super_method.call
- end
+ if Exception.method_defined?(:detailed_message)
+ # just for compatibility
+ def original_message
+ # we cannot use alias here because
+ to_s
+ end
+
+ def detailed_message(highlight: true, did_you_mean: true, **)
+ msg = super.dup
+
+ return msg unless did_you_mean
+
+ suggestion = DidYouMean.formatter.message_for(corrections)
+
+ if highlight
+ suggestion = suggestion.gsub(/.+/) { "\e[1m" + $& + "\e[m" }
+ end
+
+ msg << suggestion
+ msg
+ rescue
+ super
+ end
+ else
+ SKIP_TO_S_FOR_SUPER_LOOKUP = true
+ private_constant :SKIP_TO_S_FOR_SUPER_LOOKUP
+
+ def original_message
+ meth = method(:to_s)
+ while meth.owner.const_defined?(:SKIP_TO_S_FOR_SUPER_LOOKUP)
+ meth = meth.super_method
+ end
+ meth.call
+ end
- def to_s
- msg = super.dup
- suggestion = DidYouMean.formatter.message_for(corrections)
+ def to_s
+ msg = super.dup
+ suggestion = DidYouMean.formatter.message_for(corrections)
- msg << suggestion if !msg.end_with?(suggestion)
- msg
- rescue
- super
+ msg << suggestion if !msg.include?(suggestion)
+ msg
+ rescue
+ super
+ end
end
def corrections
@@ -19,7 +51,7 @@ module DidYouMean
end
def spell_checker
- SPELL_CHECKERS[self.class.to_s].new(self)
+ DidYouMean.spell_checkers[self.class.to_s].new(self)
end
end
end
diff --git a/lib/did_you_mean/experimental/initializer_name_correction.rb b/lib/did_you_mean/experimental/initializer_name_correction.rb
deleted file mode 100644
index b59c98e774..0000000000
--- a/lib/did_you_mean/experimental/initializer_name_correction.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen-string-literal: true
-
-require_relative '../levenshtein'
-
-module DidYouMean
- module Experimental
- module InitializerNameCorrection
- def method_added(name)
- super
-
- distance = Levenshtein.distance(name.to_s, 'initialize')
- if distance != 0 && distance <= 2
- warn "warning: #{name} might be misspelled, perhaps you meant initialize?"
- end
- end
- end
-
- ::Class.prepend(InitializerNameCorrection)
- end
-end
diff --git a/lib/did_you_mean/experimental/ivar_name_correction.rb b/lib/did_you_mean/experimental/ivar_name_correction.rb
deleted file mode 100644
index 322e422c6b..0000000000
--- a/lib/did_you_mean/experimental/ivar_name_correction.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen-string-literal: true
-
-require_relative '../../did_you_mean'
-
-module DidYouMean
- module Experimental #:nodoc:
- class IvarNameCheckerBuilder #:nodoc:
- attr_reader :original_checker
-
- def initialize(original_checker) #:nodoc:
- @original_checker = original_checker
- end
-
- def new(no_method_error) #:nodoc:
- IvarNameChecker.new(no_method_error, original_checker: @original_checker)
- end
- end
-
- class IvarNameChecker #:nodoc:
- REPLS = {
- "(irb)" => -> { Readline::HISTORY.to_a.last }
- }
-
- TRACE = TracePoint.trace(:raise) do |tp|
- e = tp.raised_exception
-
- if SPELL_CHECKERS.include?(e.class.to_s) && !e.instance_variable_defined?(:@frame_binding)
- e.instance_variable_set(:@frame_binding, tp.binding)
- end
- end
-
- attr_reader :original_checker
-
- def initialize(no_method_error, original_checker: )
- @original_checker = original_checker.new(no_method_error)
-
- @location = no_method_error.backtrace_locations.first
- @ivar_names = no_method_error.frame_binding.receiver.instance_variables
-
- no_method_error.remove_instance_variable(:@frame_binding)
- end
-
- def corrections
- original_checker.corrections + ivar_name_corrections
- end
-
- def ivar_name_corrections
- @ivar_name_corrections ||= SpellChecker.new(dictionary: @ivar_names).correct(receiver_name.to_s)
- end
-
- private
-
- def receiver_name
- return unless @original_checker.receiver.nil?
-
- abs_path = @location.absolute_path
- lineno = @location.lineno
-
- /@(\w+)*\.#{@original_checker.method_name}/ =~ line(abs_path, lineno).to_s && $1
- end
-
- def line(abs_path, lineno)
- if REPLS[abs_path]
- REPLS[abs_path].call
- elsif File.exist?(abs_path)
- File.open(abs_path) do |file|
- file.detect { file.lineno == lineno }
- end
- end
- end
- end
- end
-
- NameError.send(:attr, :frame_binding)
- SPELL_CHECKERS['NoMethodError'] = Experimental::IvarNameCheckerBuilder.new(SPELL_CHECKERS['NoMethodError'])
-end
diff --git a/lib/did_you_mean/formatter.rb b/lib/did_you_mean/formatter.rb
new file mode 100644
index 0000000000..c43748f707
--- /dev/null
+++ b/lib/did_you_mean/formatter.rb
@@ -0,0 +1,44 @@
+# frozen-string-literal: true
+
+module DidYouMean
+ # The +DidYouMean::Formatter+ is the basic, default formatter for the
+ # gem. The formatter responds to the +message_for+ method and it returns a
+ # human readable string.
+ class Formatter
+
+ # Returns a human readable string that contains +corrections+. This
+ # formatter is designed to be less verbose to not take too much screen
+ # space while being helpful enough to the user.
+ #
+ # @example
+ #
+ # formatter = DidYouMean::Formatter.new
+ #
+ # # displays suggestions in two lines with the leading empty line
+ # puts formatter.message_for(["methods", "method"])
+ #
+ # Did you mean? methods
+ # method
+ # # => nil
+ #
+ # # displays an empty line
+ # puts formatter.message_for([])
+ #
+ # # => nil
+ #
+ def self.message_for(corrections)
+ corrections.empty? ? "" : "\nDid you mean? #{corrections.join("\n ")}"
+ end
+
+ def message_for(corrections)
+ warn "The instance method #message_for has been deprecated. Please use the class method " \
+ "DidYouMean::Formatter.message_for(...) instead."
+
+ self.class.message_for(corrections)
+ end
+ end
+
+ PlainFormatter = Formatter
+
+ deprecate_constant :PlainFormatter
+end
diff --git a/lib/did_you_mean/formatters/plain_formatter.rb b/lib/did_you_mean/formatters/plain_formatter.rb
index e2d995f587..d669588e0f 100644
--- a/lib/did_you_mean/formatters/plain_formatter.rb
+++ b/lib/did_you_mean/formatters/plain_formatter.rb
@@ -1,33 +1,4 @@
-# frozen-string-literal: true
+require_relative '../formatter'
-module DidYouMean
- # The +DidYouMean::PlainFormatter+ is the basic, default formatter for the
- # gem. The formatter responds to the +message_for+ method and it returns a
- # human readable string.
- class PlainFormatter
-
- # Returns a human readable string that contains +corrections+. This
- # formatter is designed to be less verbose to not take too much screen
- # space while being helpful enough to the user.
- #
- # @example
- #
- # formatter = DidYouMean::PlainFormatter.new
- #
- # # displays suggestions in two lines with the leading empty line
- # puts formatter.message_for(["methods", "method"])
- #
- # Did you mean? methods
- # method
- # # => nil
- #
- # # displays an empty line
- # puts formatter.message_for([])
- #
- # # => nil
- #
- def message_for(corrections)
- corrections.empty? ? "" : "\nDid you mean? #{corrections.join("\n ")}"
- end
- end
-end
+warn "`require 'did_you_mean/formatters/plain_formatter'` is deprecated. Please `require 'did_you_mean/formatter'` " \
+ "instead."
diff --git a/lib/did_you_mean/formatters/verbose_formatter.rb b/lib/did_you_mean/formatters/verbose_formatter.rb
index b8fe214d57..f6623681f2 100644
--- a/lib/did_you_mean/formatters/verbose_formatter.rb
+++ b/lib/did_you_mean/formatters/verbose_formatter.rb
@@ -1,49 +1,10 @@
# frozen-string-literal: true
-module DidYouMean
- # The +DidYouMean::VerboseFormatter+ uses extra empty lines to make the
- # suggestion stand out more in the error message.
- #
- # In order to activate the verbose formatter,
- #
- # @example
- #
- # OBject
- # # => NameError: uninitialized constant OBject
- # # Did you mean? Object
- #
- # require 'did_you_mean/verbose'
- #
- # OBject
- # # => NameError: uninitialized constant OBject
- # #
- # # Did you mean? Object
- # #
- #
- class VerboseFormatter
+warn "`require 'did_you_mean/formatters/verbose_formatter'` is deprecated and falls back to the default formatter. "
- # Returns a human readable string that contains +corrections+. This
- # formatter is designed to be less verbose to not take too much screen
- # space while being helpful enough to the user.
- #
- # @example
- #
- # formatter = DidYouMean::PlainFormatter.new
- #
- # puts formatter.message_for(["methods", "method"])
- #
- #
- # Did you mean? methods
- # method
- #
- # # => nil
- #
- def message_for(corrections)
- return "" if corrections.empty?
+require_relative '../formatter'
- output = "\n\n Did you mean? ".dup
- output << corrections.join("\n ")
- output << "\n "
- end
- end
+module DidYouMean
+ # For compatibility:
+ VerboseFormatter = Formatter
end
diff --git a/lib/did_you_mean/spell_checker.rb b/lib/did_you_mean/spell_checker.rb
index e5106abba2..37da2fc7a6 100644
--- a/lib/did_you_mean/spell_checker.rb
+++ b/lib/did_you_mean/spell_checker.rb
@@ -10,25 +10,25 @@ module DidYouMean
end
def correct(input)
- input = normalize(input)
- threshold = input.length > 3 ? 0.834 : 0.77
+ normalized_input = normalize(input)
+ threshold = normalized_input.length > 3 ? 0.834 : 0.77
- words = @dictionary.select { |word| JaroWinkler.distance(normalize(word), input) >= threshold }
- words.reject! { |word| input == word.to_s }
- words.sort_by! { |word| JaroWinkler.distance(word.to_s, input) }
+ words = @dictionary.select { |word| JaroWinkler.distance(normalize(word), normalized_input) >= threshold }
+ words.reject! { |word| input.to_s == word.to_s }
+ words.sort_by! { |word| JaroWinkler.distance(word.to_s, normalized_input) }
words.reverse!
# Correct mistypes
- threshold = (input.length * 0.25).ceil
- corrections = words.select { |c| Levenshtein.distance(normalize(c), input) <= threshold }
+ threshold = (normalized_input.length * 0.25).ceil
+ corrections = words.select { |c| Levenshtein.distance(normalize(c), normalized_input) <= threshold }
# Correct misspells
if corrections.empty?
corrections = words.select do |word|
word = normalize(word)
- length = input.length < word.length ? input.length : word.length
+ length = normalized_input.length < word.length ? normalized_input.length : word.length
- Levenshtein.distance(word, input) < length
+ Levenshtein.distance(word, normalized_input) < length
end.first(1)
end
diff --git a/lib/did_you_mean/spell_checkers/method_name_checker.rb b/lib/did_you_mean/spell_checkers/method_name_checker.rb
index 3a38245f0c..b5cbbb5da6 100644
--- a/lib/did_you_mean/spell_checkers/method_name_checker.rb
+++ b/lib/did_you_mean/spell_checkers/method_name_checker.rb
@@ -6,6 +6,7 @@ module DidYouMean
NAMES_TO_EXCLUDE = { NilClass => nil.methods }
NAMES_TO_EXCLUDE.default = []
+ Ractor.make_shareable(NAMES_TO_EXCLUDE) if defined?(Ractor)
# +MethodNameChecker::RB_RESERVED_WORDS+ is the list of reserved words in
# Ruby that take an argument. Unlike
@@ -36,6 +37,8 @@ module DidYouMean
yield
)
+ Ractor.make_shareable(RB_RESERVED_WORDS) if defined?(Ractor)
+
def initialize(exception)
@method_name = exception.name
@receiver = exception.receiver
@@ -43,7 +46,12 @@ module DidYouMean
end
def corrections
- @corrections ||= SpellChecker.new(dictionary: RB_RESERVED_WORDS + method_names).correct(method_name) - names_to_exclude
+ @corrections ||= begin
+ dictionary = method_names
+ dictionary = RB_RESERVED_WORDS + dictionary if @private_call
+
+ SpellChecker.new(dictionary: dictionary).correct(method_name) - names_to_exclude
+ end
end
def method_names
@@ -51,6 +59,13 @@ module DidYouMean
method_names = receiver.methods + receiver.singleton_methods
method_names += receiver.private_methods if @private_call
method_names.uniq!
+ # Assume that people trying to use a writer are not interested in a reader
+ # and vice versa
+ if method_name.match?(/=\Z/)
+ method_names.select! { |name| name.match?(/=\Z/) }
+ else
+ method_names.reject! { |name| name.match?(/=\Z/) }
+ end
method_names
else
[]
diff --git a/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb b/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
index 3e51b4fa3a..9a6e04fe64 100644
--- a/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
+++ b/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
@@ -8,6 +8,7 @@ module DidYouMean
NAMES_TO_EXCLUDE = { 'foo' => [:fork, :for] }
NAMES_TO_EXCLUDE.default = []
+ Ractor.make_shareable(NAMES_TO_EXCLUDE) if defined?(Ractor)
# +VariableNameChecker::RB_RESERVED_WORDS+ is the list of all reserved
# words in Ruby. They could be declared like methods are, and a typo would
@@ -62,6 +63,8 @@ module DidYouMean
__ENCODING__
)
+ Ractor.make_shareable(RB_RESERVED_WORDS) if defined?(Ractor)
+
def initialize(exception)
@name = exception.name.to_s.tr("@", "")
@lvar_names = exception.respond_to?(:local_variables) ? exception.local_variables : []
@@ -76,7 +79,7 @@ module DidYouMean
def corrections
@corrections ||= SpellChecker
.new(dictionary: (RB_RESERVED_WORDS + lvar_names + method_names + ivar_names + cvar_names))
- .correct(name) - NAMES_TO_EXCLUDE[@name]
+ .correct(name).uniq - NAMES_TO_EXCLUDE[@name]
end
end
end
diff --git a/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb b/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb
new file mode 100644
index 0000000000..ed263c8f93
--- /dev/null
+++ b/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb
@@ -0,0 +1,20 @@
+require_relative "../spell_checker"
+
+module DidYouMean
+ class PatternKeyNameChecker
+ def initialize(no_matching_pattern_key_error)
+ @key = no_matching_pattern_key_error.key
+ @keys = no_matching_pattern_key_error.matchee.keys
+ end
+
+ def corrections
+ @corrections ||= exact_matches.empty? ? SpellChecker.new(dictionary: @keys).correct(@key).map(&:inspect) : exact_matches
+ end
+
+ private
+
+ def exact_matches
+ @exact_matches ||= @keys.select { |word| @key == word.to_s }.map(&:inspect)
+ end
+ end
+end
diff --git a/lib/did_you_mean/spell_checkers/require_path_checker.rb b/lib/did_you_mean/spell_checkers/require_path_checker.rb
new file mode 100644
index 0000000000..586ced37de
--- /dev/null
+++ b/lib/did_you_mean/spell_checkers/require_path_checker.rb
@@ -0,0 +1,39 @@
+# frozen-string-literal: true
+
+require_relative "../spell_checker"
+require_relative "../tree_spell_checker"
+require "rbconfig"
+
+module DidYouMean
+ class RequirePathChecker
+ attr_reader :path
+
+ INITIAL_LOAD_PATH = $LOAD_PATH.dup.freeze
+ Ractor.make_shareable(INITIAL_LOAD_PATH) if defined?(Ractor)
+
+ ENV_SPECIFIC_EXT = ".#{RbConfig::CONFIG["DLEXT"]}"
+ Ractor.make_shareable(ENV_SPECIFIC_EXT) if defined?(Ractor)
+
+ private_constant :INITIAL_LOAD_PATH, :ENV_SPECIFIC_EXT
+
+ def self.requireables
+ @requireables ||= INITIAL_LOAD_PATH
+ .flat_map {|path| Dir.glob("**/???*{.rb,#{ENV_SPECIFIC_EXT}}", base: path) }
+ .map {|path| path.chomp!(".rb") || path.chomp!(ENV_SPECIFIC_EXT) }
+ end
+
+ def initialize(exception)
+ @path = exception.path
+ end
+
+ def corrections
+ @corrections ||= begin
+ threshold = path.size * 2
+ dictionary = self.class.requireables.reject {|str| str.size >= threshold }
+ spell_checker = path.include?("/") ? TreeSpellChecker : SpellChecker
+
+ spell_checker.new(dictionary: dictionary).correct(path).uniq
+ end
+ end
+ end
+end
diff --git a/lib/did_you_mean/tree_spell_checker.rb b/lib/did_you_mean/tree_spell_checker.rb
index 6a5b485413..799f07fcf0 100644
--- a/lib/did_you_mean/tree_spell_checker.rb
+++ b/lib/did_you_mean/tree_spell_checker.rb
@@ -1,137 +1,109 @@
+# frozen_string_literal: true
+
module DidYouMean
# spell checker for a dictionary that has a tree
# structure, see doc/tree_spell_checker_api.md
class TreeSpellChecker
- attr_reader :dictionary, :dimensions, :separator, :augment
+ attr_reader :dictionary, :separator, :augment
def initialize(dictionary:, separator: '/', augment: nil)
@dictionary = dictionary
@separator = separator
@augment = augment
- @dimensions = parse_dimensions
end
def correct(input)
- plausibles = plausible_dimensions input
- return no_idea(input) if plausibles.empty?
- suggestions = find_suggestions input, plausibles
- return no_idea(input) if suggestions.empty?
- suggestions
- end
+ plausibles = plausible_dimensions(input)
+ return fall_back_to_normal_spell_check(input) if plausibles.empty?
- private
+ suggestions = find_suggestions(input, plausibles)
+ return fall_back_to_normal_spell_check(input) if suggestions.empty?
- def parse_dimensions
- ParseDimensions.new(dictionary, separator).call
+ suggestions
end
- def find_suggestions(input, plausibles)
- states = plausibles[0].product(*plausibles[1..-1])
- paths = possible_paths states
- leaf = input.split(separator).last
- ideas = find_ideas(paths, leaf)
- ideas.compact.flatten
+ def dictionary_without_leaves
+ @dictionary_without_leaves ||= dictionary.map { |word| word.split(separator)[0..-2] }.uniq
end
- def no_idea(input)
- return [] unless augment
- ::DidYouMean::SpellChecker.new(dictionary: dictionary).correct(input)
+ def tree_depth
+ @tree_depth ||= dictionary_without_leaves.max { |a, b| a.size <=> b.size }.size
end
- def find_ideas(paths, leaf)
- paths.map do |path|
- names = find_leaves(path)
- ideas = CorrectElement.new.call names, leaf
- ideas_to_paths ideas, leaf, names, path
- end
+ def dimensions
+ @dimensions ||= tree_depth.times.map do |index|
+ dictionary_without_leaves.map { |element| element[index] }.compact.uniq
+ end
end
- def ideas_to_paths(ideas, leaf, names, path)
- return nil if ideas.empty?
- return [path + separator + leaf] if names.include? leaf
- ideas.map { |str| path + separator + str }
+ def find_leaves(path)
+ path_with_separator = "#{path}#{separator}"
+
+ dictionary
+ .select {|str| str.include?(path_with_separator) }
+ .map {|str| str.gsub(path_with_separator, '') }
end
- def find_leaves(path)
- dictionary.map do |str|
- next unless str.include? "#{path}#{separator}"
- str.gsub("#{path}#{separator}", '')
- end.compact
+ def plausible_dimensions(input)
+ input.split(separator)[0..-2]
+ .map
+ .with_index { |element, index| correct_element(dimensions[index], element) if dimensions[index] }
+ .compact
end
def possible_paths(states)
- states.map do |state|
- state.join separator
- end
+ states.map { |state| state.join(separator) }
end
- def plausible_dimensions(input)
- elements = input.split(separator)[0..-2]
- elements.each_with_index.map do |element, i|
- next if dimensions[i].nil?
- CorrectElement.new.call dimensions[i], element
- end.compact
- end
- end
+ private
- # parses the elements in each dimension
- class ParseDimensions
- def initialize(dictionary, separator)
- @dictionary = dictionary
- @separator = separator
+ def find_suggestions(input, plausibles)
+ states = plausibles[0].product(*plausibles[1..-1])
+ paths = possible_paths(states)
+ leaf = input.split(separator).last
+
+ find_ideas(paths, leaf)
end
- def call
- leafless = remove_leaves
- dimensions = find_elements leafless
- dimensions.map do |elements|
- elements.to_set.to_a
- end
+ def fall_back_to_normal_spell_check(input)
+ return [] unless augment
+
+ ::DidYouMean::SpellChecker.new(dictionary: dictionary).correct(input)
end
- private
+ def find_ideas(paths, leaf)
+ paths.flat_map do |path|
+ names = find_leaves(path)
+ ideas = correct_element(names, leaf)
- def remove_leaves
- dictionary.map do |a|
- elements = a.split(separator)
- elements[0..-2]
- end.to_set.to_a
+ ideas_to_paths(ideas, leaf, names, path)
+ end.compact
end
- def find_elements(leafless)
- max_elements = leafless.map(&:size).max
- dimensions = Array.new(max_elements) { [] }
- (0...max_elements).each do |i|
- leafless.each do |elements|
- dimensions[i] << elements[i] unless elements[i].nil?
- end
+ def ideas_to_paths(ideas, leaf, names, path)
+ if ideas.empty?
+ nil
+ elsif names.include?(leaf)
+ ["#{path}#{separator}#{leaf}"]
+ else
+ ideas.map {|str| "#{path}#{separator}#{str}" }
end
- dimensions
end
- attr_reader :dictionary, :separator
- end
+ def correct_element(names, element)
+ return names if names.size == 1
- # identifies the elements close to element
- class CorrectElement
- def initialize
- end
+ str = normalize(element)
- def call(names, element)
- return names if names.size == 1
- str = normalize element
- return [str] if names.include? str
- checker = ::DidYouMean::SpellChecker.new(dictionary: names)
- checker.correct(str)
- end
+ return [str] if names.include?(str)
- private
+ ::DidYouMean::SpellChecker.new(dictionary: names).correct(str)
+ end
- def normalize(leaf)
- str = leaf.dup
+ def normalize(str)
str.downcase!
- return str unless str.include? '@'
- str.tr!('@', ' ')
+ str.tr!('@', ' ') if str.include?('@')
+ str
end
end
end
diff --git a/lib/did_you_mean/verbose.rb b/lib/did_you_mean/verbose.rb
index 4e86f167ea..1ff19aef80 100644
--- a/lib/did_you_mean/verbose.rb
+++ b/lib/did_you_mean/verbose.rb
@@ -1,4 +1,2 @@
-require_relative '../did_you_mean'
-require_relative 'formatters/verbose_formatter'
-
-DidYouMean.formatter = DidYouMean::VerboseFormatter.new
+warn "The verbose formatter has been removed and now `require 'did_you_mean/verbose'` has no effect. Please " \
+ "remove this call."
diff --git a/lib/did_you_mean/version.rb b/lib/did_you_mean/version.rb
index cdfeea8026..5745ca1efd 100644
--- a/lib/did_you_mean/version.rb
+++ b/lib/did_you_mean/version.rb
@@ -1,3 +1,3 @@
module DidYouMean
- VERSION = "1.3.1"
+ VERSION = "1.6.3".freeze
end
diff --git a/lib/drb/drb.gemspec b/lib/drb/drb.gemspec
new file mode 100644
index 0000000000..c9d7e40a51
--- /dev/null
+++ b/lib/drb/drb.gemspec
@@ -0,0 +1,43 @@
+begin
+ require_relative "lib/drb/version"
+rescue LoadError # Fallback to load version file in ruby core repository
+ require_relative "version"
+end
+
+Gem::Specification.new do |spec|
+ spec.name = "drb"
+ spec.version = DRb::VERSION
+ spec.authors = ["Masatoshi SEKI"]
+ spec.email = ["seki@ruby-lang.org"]
+
+ spec.summary = %q{Distributed object system for Ruby}
+ spec.description = %q{Distributed object system for Ruby}
+ spec.homepage = "https://github.com/ruby/drb"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = %w[
+ LICENSE.txt
+ drb.gemspec
+ lib/drb.rb
+ lib/drb/acl.rb
+ lib/drb/drb.rb
+ lib/drb/eq.rb
+ lib/drb/extserv.rb
+ lib/drb/extservm.rb
+ lib/drb/gw.rb
+ lib/drb/invokemethod.rb
+ lib/drb/observer.rb
+ lib/drb/ssl.rb
+ lib/drb/timeridconv.rb
+ lib/drb/unix.rb
+ lib/drb/version.rb
+ lib/drb/weakidconv.rb
+ ]
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "ruby2_keywords"
+end
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index e2aaf701ce..23181bb834 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1131,7 +1131,7 @@ module DRb
end
# Routes method calls to the referenced remote object.
- def method_missing(msg_id, *a, &b)
+ ruby2_keywords def method_missing(msg_id, *a, &b)
if DRb.here?(@uri)
obj = DRb.to_obj(@ref)
DRb.current_server.check_insecure_method(obj, msg_id)
@@ -1382,10 +1382,6 @@ module DRb
@@idconv = idconv
end
- def self.default_safe_level(level) # :nodoc:
- # Remove in Ruby 3.0
- end
-
# Set the default value of the :verbose option.
#
# See #new(). The initial default value is false.
@@ -1495,11 +1491,6 @@ module DRb
# The configuration of this DRbServer
attr_reader :config
- def safe_level # :nodoc:
- # Remove in Ruby 3.0
- 0
- end
-
# Set whether to operate in verbose mode.
#
# In verbose mode, failed calls are logged to stdout.
@@ -1636,9 +1627,12 @@ module DRb
end
def perform
- @result = nil
- @succ = false
- setup_message
+ begin
+ setup_message
+ ensure
+ @result = nil
+ @succ = false
+ end
if @block
@result = perform_with_block
@@ -1727,6 +1721,7 @@ module DRb
client_uri = client.uri
@exported_uri << client_uri unless @exported_uri.include?(client_uri)
end
+ _last_invoke_method = nil
loop do
begin
succ = false
@@ -1739,6 +1734,7 @@ module DRb
rescue Exception => e
error_print(e) if verbose
ensure
+ _last_invoke_method = invoke_method
client.close unless succ
if Thread.current['DRb']['stop_service']
shutdown
diff --git a/lib/drb/extserv.rb b/lib/drb/extserv.rb
index a93d5d1576..9523fe84e3 100644
--- a/lib/drb/extserv.rb
+++ b/lib/drb/extserv.rb
@@ -18,7 +18,7 @@ module DRb
@name = name
ro = DRbObject.new(nil, there)
synchronize do
- @invoker = ro.regist(name, DRbObject.new(self, @server.uri))
+ @invoker = ro.register(name, DRbObject.new(self, @server.uri))
end
end
attr_reader :server
@@ -29,7 +29,7 @@ module DRb
def stop_service
synchronize do
- @invoker.unregist(@name)
+ @invoker.unregister(@name)
server = @server
@server = nil
server.stop_service
diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb
index 040e4e3e08..9333a108e5 100644
--- a/lib/drb/extservm.rb
+++ b/lib/drb/extservm.rb
@@ -44,19 +44,21 @@ module DRb
end
end
- def regist(name, ro)
+ def register(name, ro)
synchronize do
@servers[name] = ro
@cond.signal
end
self
end
+ alias regist register
- def unregist(name)
+ def unregister(name)
synchronize do
@servers.delete(name)
end
end
+ alias unregist unregister
private
def invoke_thread
diff --git a/lib/drb/observer.rb b/lib/drb/observer.rb
index 3ee15331a1..0fb7301edf 100644
--- a/lib/drb/observer.rb
+++ b/lib/drb/observer.rb
@@ -13,7 +13,7 @@ module DRb
if defined? @observer_peers
@observer_peers.each do |observer, method|
begin
- observer.send(method, *arg)
+ observer.__send__(method, *arg)
rescue
delete_observer(observer)
end
diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb
index 3d528c6172..54ab1ef395 100644
--- a/lib/drb/ssl.rb
+++ b/lib/drb/ssl.rb
@@ -196,7 +196,7 @@ module DRb
if comment = self[:SSLCertComment]
cert.add_extension(ef.create_extension("nsComment", comment))
end
- cert.sign(rsa, OpenSSL::Digest::SHA256.new)
+ cert.sign(rsa, "SHA256")
@cert = cert
@pkey = rsa
diff --git a/lib/drb/version.rb b/lib/drb/version.rb
new file mode 100644
index 0000000000..10d33445b6
--- /dev/null
+++ b/lib/drb/version.rb
@@ -0,0 +1,3 @@
+module DRb
+ VERSION = "2.1.1"
+end
diff --git a/lib/erb.gemspec b/lib/erb.gemspec
new file mode 100644
index 0000000000..d973cc10de
--- /dev/null
+++ b/lib/erb.gemspec
@@ -0,0 +1,38 @@
+begin
+ require_relative 'lib/erb/version'
+rescue LoadError
+ # for Ruby core repository
+ require_relative 'erb/version'
+end
+
+Gem::Specification.new do |spec|
+ spec.name = 'erb'
+ spec.version = ERB.const_get(:VERSION, false)
+ spec.authors = ['Masatoshi SEKI', 'Takashi Kokubun']
+ spec.email = ['seki@ruby-lang.org', 'takashikkbn@gmail.com']
+
+ spec.summary = %q{An easy to use but powerful templating system for Ruby.}
+ spec.description = %q{An easy to use but powerful templating system for Ruby.}
+ spec.homepage = 'https://github.com/ruby/erb'
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
+ spec.licenses = ['Ruby', 'BSD-2-Clause']
+
+ spec.metadata['homepage_uri'] = spec.homepage
+ spec.metadata['source_code_uri'] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = 'libexec'
+ spec.executables = ['erb']
+ spec.require_paths = ['lib']
+
+ if RUBY_ENGINE == 'jruby'
+ spec.platform = 'java'
+ else
+ spec.required_ruby_version = '>= 2.7.0'
+ spec.extensions = ['ext/erb/escape/extconf.rb']
+ end
+
+ spec.add_dependency 'cgi', '>= 0.3.3'
+end
diff --git a/lib/erb.rb b/lib/erb.rb
index d2ea64ab60..754419f819 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -12,7 +12,11 @@
#
# You can redistribute it and/or modify it under the same terms as Ruby.
-require "cgi/util"
+require 'cgi/util'
+require 'erb/version'
+require 'erb/compiler'
+require 'erb/def_method'
+require 'erb/util'
#
# = ERB -- Ruby Templating
@@ -45,7 +49,7 @@ require "cgi/util"
#
# <% Ruby code -- inline with output %>
# <%= Ruby expression -- replace with result %>
-# <%# comment -- ignored -- useful in testing %>
+# <%# comment -- ignored -- useful in testing %> (`<% #` doesn't work. Don't use Ruby comments.)
# % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new)
# %% replaced with % if first thing on a line and % processing is used
# <%% or %%> -- replace with <% or %> respectively
@@ -257,491 +261,13 @@ require "cgi/util"
#
class ERB
Revision = '$Date:: $' # :nodoc: #'
+ deprecate_constant :Revision
# Returns revision information for the erb.rb module.
def self.version
- "erb.rb [2.2.0 #{ERB::Revision.split[1]}]"
+ VERSION
end
-end
-#--
-# ERB::Compiler
-class ERB
- # = ERB::Compiler
- #
- # Compiles ERB templates into Ruby code; the compiled code produces the
- # template result when evaluated. ERB::Compiler provides hooks to define how
- # generated output is handled.
- #
- # Internally ERB does something like this to generate the code returned by
- # ERB#src:
- #
- # compiler = ERB::Compiler.new('<>')
- # compiler.pre_cmd = ["_erbout=+''"]
- # compiler.put_cmd = "_erbout.<<"
- # compiler.insert_cmd = "_erbout.<<"
- # compiler.post_cmd = ["_erbout"]
- #
- # code, enc = compiler.compile("Got <%= obj %>!\n")
- # puts code
- #
- # <i>Generates</i>:
- #
- # #coding:UTF-8
- # _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout
- #
- # By default the output is sent to the print method. For example:
- #
- # compiler = ERB::Compiler.new('<>')
- # code, enc = compiler.compile("Got <%= obj %>!\n")
- # puts code
- #
- # <i>Generates</i>:
- #
- # #coding:UTF-8
- # print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze
- #
- # == Evaluation
- #
- # The compiled code can be used in any context where the names in the code
- # correctly resolve. Using the last example, each of these print 'Got It!'
- #
- # Evaluate using a variable:
- #
- # obj = 'It'
- # eval code
- #
- # Evaluate using an input:
- #
- # mod = Module.new
- # mod.module_eval %{
- # def get(obj)
- # #{code}
- # end
- # }
- # extend mod
- # get('It')
- #
- # Evaluate using an accessor:
- #
- # klass = Class.new Object
- # klass.class_eval %{
- # attr_accessor :obj
- # def initialize(obj)
- # @obj = obj
- # end
- # def get_it
- # #{code}
- # end
- # }
- # klass.new('It').get_it
- #
- # Good! See also ERB#def_method, ERB#def_module, and ERB#def_class.
- class Compiler # :nodoc:
- class PercentLine # :nodoc:
- def initialize(str)
- @value = str
- end
- attr_reader :value
- alias :to_s :value
- end
-
- class Scanner # :nodoc:
- @scanner_map = {}
- class << self
- def register_scanner(klass, trim_mode, percent)
- @scanner_map[[trim_mode, percent]] = klass
- end
- alias :regist_scanner :register_scanner
- end
-
- def self.default_scanner=(klass)
- @default_scanner = klass
- end
-
- def self.make_scanner(src, trim_mode, percent)
- klass = @scanner_map.fetch([trim_mode, percent], @default_scanner)
- klass.new(src, trim_mode, percent)
- end
-
- DEFAULT_STAGS = %w(<%% <%= <%# <%).freeze
- DEFAULT_ETAGS = %w(%%> %>).freeze
- def initialize(src, trim_mode, percent)
- @src = src
- @stag = nil
- @stags = DEFAULT_STAGS
- @etags = DEFAULT_ETAGS
- end
- attr_accessor :stag
- attr_reader :stags, :etags
-
- def scan; end
- end
-
- class TrimScanner < Scanner # :nodoc:
- def initialize(src, trim_mode, percent)
- super
- @trim_mode = trim_mode
- @percent = percent
- if @trim_mode == '>'
- @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m
- @scan_line = self.method(:trim_line1)
- elsif @trim_mode == '<>'
- @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m
- @scan_line = self.method(:trim_line2)
- elsif @trim_mode == '-'
- @scan_reg = /(.*?)(^[ \t]*<%\-|<%\-|-%>\r?\n|-%>|#{(stags + etags).join('|')}|\z)/m
- @scan_line = self.method(:explicit_trim_line)
- else
- @scan_reg = /(.*?)(#{(stags + etags).join('|')}|\n|\z)/m
- @scan_line = self.method(:scan_line)
- end
- end
-
- def scan(&block)
- @stag = nil
- if @percent
- @src.each_line do |line|
- percent_line(line, &block)
- end
- else
- @scan_line.call(@src, &block)
- end
- nil
- end
-
- def percent_line(line, &block)
- if @stag || line[0] != ?%
- return @scan_line.call(line, &block)
- end
-
- line[0] = ''
- if line[0] == ?%
- @scan_line.call(line, &block)
- else
- yield(PercentLine.new(line.chomp))
- end
- end
-
- def scan_line(line)
- line.scan(@scan_reg) do |tokens|
- tokens.each do |token|
- next if token.empty?
- yield(token)
- end
- end
- end
-
- def trim_line1(line)
- line.scan(@scan_reg) do |tokens|
- tokens.each do |token|
- next if token.empty?
- if token == "%>\n" || token == "%>\r\n"
- yield('%>')
- yield(:cr)
- else
- yield(token)
- end
- end
- end
- end
-
- def trim_line2(line)
- head = nil
- line.scan(@scan_reg) do |tokens|
- tokens.each do |token|
- next if token.empty?
- head = token unless head
- if token == "%>\n" || token == "%>\r\n"
- yield('%>')
- if is_erb_stag?(head)
- yield(:cr)
- else
- yield("\n")
- end
- head = nil
- else
- yield(token)
- head = nil if token == "\n"
- end
- end
- end
- end
-
- def explicit_trim_line(line)
- line.scan(@scan_reg) do |tokens|
- tokens.each do |token|
- next if token.empty?
- if @stag.nil? && /[ \t]*<%-/ =~ token
- yield('<%')
- elsif @stag && (token == "-%>\n" || token == "-%>\r\n")
- yield('%>')
- yield(:cr)
- elsif @stag && token == '-%>'
- yield('%>')
- else
- yield(token)
- end
- end
- end
- end
-
- ERB_STAG = %w(<%= <%# <%)
- def is_erb_stag?(s)
- ERB_STAG.member?(s)
- end
- end
-
- Scanner.default_scanner = TrimScanner
-
- begin
- require 'strscan'
- rescue LoadError
- else
- class SimpleScanner < Scanner # :nodoc:
- def scan
- stag_reg = (stags == DEFAULT_STAGS) ? /(.*?)(<%[%=#]?|\z)/m : /(.*?)(#{stags.join('|')}|\z)/m
- etag_reg = (etags == DEFAULT_ETAGS) ? /(.*?)(%%?>|\z)/m : /(.*?)(#{etags.join('|')}|\z)/m
- scanner = StringScanner.new(@src)
- while ! scanner.eos?
- scanner.scan(@stag ? etag_reg : stag_reg)
- yield(scanner[1])
- yield(scanner[2])
- end
- end
- end
- Scanner.register_scanner(SimpleScanner, nil, false)
-
- class ExplicitScanner < Scanner # :nodoc:
- def scan
- stag_reg = /(.*?)(^[ \t]*<%-|<%-|#{stags.join('|')}|\z)/m
- etag_reg = /(.*?)(-%>|#{etags.join('|')}|\z)/m
- scanner = StringScanner.new(@src)
- while ! scanner.eos?
- scanner.scan(@stag ? etag_reg : stag_reg)
- yield(scanner[1])
-
- elem = scanner[2]
- if /[ \t]*<%-/ =~ elem
- yield('<%')
- elsif elem == '-%>'
- yield('%>')
- yield(:cr) if scanner.scan(/(\r?\n|\z)/)
- else
- yield(elem)
- end
- end
- end
- end
- Scanner.register_scanner(ExplicitScanner, '-', false)
- end
-
- class Buffer # :nodoc:
- def initialize(compiler, enc=nil, frozen=nil)
- @compiler = compiler
- @line = []
- @script = +''
- @script << "#coding:#{enc}\n" if enc
- @script << "#frozen-string-literal:#{frozen}\n" unless frozen.nil?
- @compiler.pre_cmd.each do |x|
- push(x)
- end
- end
- attr_reader :script
-
- def push(cmd)
- @line << cmd
- end
-
- def cr
- @script << (@line.join('; '))
- @line = []
- @script << "\n"
- end
-
- def close
- return unless @line
- @compiler.post_cmd.each do |x|
- push(x)
- end
- @script << (@line.join('; '))
- @line = nil
- end
- end
-
- def add_put_cmd(out, content)
- out.push("#{@put_cmd} #{content.dump}.freeze#{"\n" * content.count("\n")}")
- end
-
- def add_insert_cmd(out, content)
- out.push("#{@insert_cmd}((#{content}).to_s)")
- end
-
- # Compiles an ERB template into Ruby code. Returns an array of the code
- # and encoding like ["code", Encoding].
- def compile(s)
- enc = s.encoding
- raise ArgumentError, "#{enc} is not ASCII compatible" if enc.dummy?
- s = s.b # see String#b
- magic_comment = detect_magic_comment(s, enc)
- out = Buffer.new(self, *magic_comment)
-
- self.content = +''
- scanner = make_scanner(s)
- scanner.scan do |token|
- next if token.nil?
- next if token == ''
- if scanner.stag.nil?
- compile_stag(token, out, scanner)
- else
- compile_etag(token, out, scanner)
- end
- end
- add_put_cmd(out, content) if content.size > 0
- out.close
- return out.script, *magic_comment
- end
-
- def compile_stag(stag, out, scanner)
- case stag
- when PercentLine
- add_put_cmd(out, content) if content.size > 0
- self.content = +''
- out.push(stag.to_s)
- out.cr
- when :cr
- out.cr
- when '<%', '<%=', '<%#'
- scanner.stag = stag
- add_put_cmd(out, content) if content.size > 0
- self.content = +''
- when "\n"
- content << "\n"
- add_put_cmd(out, content)
- self.content = +''
- when '<%%'
- content << '<%'
- else
- content << stag
- end
- end
-
- def compile_etag(etag, out, scanner)
- case etag
- when '%>'
- compile_content(scanner.stag, out)
- scanner.stag = nil
- self.content = +''
- when '%%>'
- content << '%>'
- else
- content << etag
- end
- end
-
- def compile_content(stag, out)
- case stag
- when '<%'
- if content[-1] == ?\n
- content.chop!
- out.push(content)
- out.cr
- else
- out.push(content)
- end
- when '<%='
- add_insert_cmd(out, content)
- when '<%#'
- # commented out
- end
- end
-
- def prepare_trim_mode(mode) # :nodoc:
- case mode
- when 1
- return [false, '>']
- when 2
- return [false, '<>']
- when 0, nil
- return [false, nil]
- when String
- unless mode.match?(/\A(%|-|>|<>){1,2}\z/)
- warn_invalid_trim_mode(mode, uplevel: 5)
- end
-
- perc = mode.include?('%')
- if mode.include?('-')
- return [perc, '-']
- elsif mode.include?('<>')
- return [perc, '<>']
- elsif mode.include?('>')
- return [perc, '>']
- else
- [perc, nil]
- end
- else
- warn_invalid_trim_mode(mode, uplevel: 5)
- return [false, nil]
- end
- end
-
- def make_scanner(src) # :nodoc:
- Scanner.make_scanner(src, @trim_mode, @percent)
- end
-
- # Construct a new compiler using the trim_mode. See ERB::new for available
- # trim modes.
- def initialize(trim_mode)
- @percent, @trim_mode = prepare_trim_mode(trim_mode)
- @put_cmd = 'print'
- @insert_cmd = @put_cmd
- @pre_cmd = []
- @post_cmd = []
- end
- attr_reader :percent, :trim_mode
-
- # The command to handle text that ends with a newline
- attr_accessor :put_cmd
-
- # The command to handle text that is inserted prior to a newline
- attr_accessor :insert_cmd
-
- # An array of commands prepended to compiled code
- attr_accessor :pre_cmd
-
- # An array of commands appended to compiled code
- attr_accessor :post_cmd
-
- private
-
- # A buffered text in #compile
- attr_accessor :content
-
- def detect_magic_comment(s, enc = nil)
- re = @percent ? /\G(?:<%#(.*)%>|%#(.*)\n)/ : /\G<%#(.*)%>/
- frozen = nil
- s.scan(re) do
- comment = $+
- comment = $1 if comment[/-\*-\s*(.*?)\s*-*-$/]
- case comment
- when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
- enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, ''))
- when %r"frozen[-_]string[-_]literal\s*:\s*([[:alnum:]]+)"
- frozen = $1
- end
- end
- return enc, frozen
- end
-
- def warn_invalid_trim_mode(mode, uplevel:)
- warn "Invalid ERB trim mode: #{mode.inspect} (trim_mode: nil, 0, 1, 2, or String composed of '%' and/or '-', '>', '<>')", uplevel: uplevel + 1
- end
- end
-end
-
-#--
-# ERB
-class ERB
#
# Constructs a new ERB object with the template specified in _str_.
#
@@ -809,14 +335,14 @@ class ERB
def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
# Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar.
if safe_level != NOT_GIVEN
- warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1 if $VERBOSE || !ZERO_SAFE_LEVELS.include?(safe_level)
+ warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1
end
if legacy_trim_mode != NOT_GIVEN
- warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1 if $VERBOSE
+ warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1
trim_mode = legacy_trim_mode
end
if legacy_eoutvar != NOT_GIVEN
- warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1 if $VERBOSE
+ warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
eoutvar = legacy_eoutvar
end
@@ -829,8 +355,6 @@ class ERB
end
NOT_GIVEN = Object.new
private_constant :NOT_GIVEN
- ZERO_SAFE_LEVELS = [0, nil]
- private_constant :ZERO_SAFE_LEVELS
##
# Creates a new compiler for ERB. See ERB::Compiler.new for details
@@ -980,100 +504,3 @@ class ERB
cls
end
end
-
-#--
-# ERB::Util
-class ERB
- # A utility module for conversion routines, often handy in HTML generation.
- module Util
- public
- #
- # A utility method for escaping HTML tag characters in _s_.
- #
- # require "erb"
- # include ERB::Util
- #
- # puts html_escape("is a > 0 & a < 10?")
- #
- # _Generates_
- #
- # is a &gt; 0 &amp; a &lt; 10?
- #
- def html_escape(s)
- CGI.escapeHTML(s.to_s)
- end
- alias h html_escape
- module_function :h
- module_function :html_escape
-
- #
- # A utility method for encoding the String _s_ as a URL.
- #
- # require "erb"
- # include ERB::Util
- #
- # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
- #
- # _Generates_
- #
- # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
- #
- def url_encode(s)
- s.to_s.b.gsub(/[^a-zA-Z0-9_\-.~]/n) { |m|
- sprintf("%%%02X", m.unpack1("C"))
- }
- end
- alias u url_encode
- module_function :u
- module_function :url_encode
- end
-end
-
-#--
-# ERB::DefMethod
-class ERB
- # Utility module to define eRuby script as instance method.
- #
- # === Example
- #
- # example.rhtml:
- # <% for item in @items %>
- # <b><%= item %></b>
- # <% end %>
- #
- # example.rb:
- # require 'erb'
- # class MyClass
- # extend ERB::DefMethod
- # def_erb_method('render()', 'example.rhtml')
- # def initialize(items)
- # @items = items
- # end
- # end
- # print MyClass.new([10,20,30]).render()
- #
- # result:
- #
- # <b>10</b>
- #
- # <b>20</b>
- #
- # <b>30</b>
- #
- module DefMethod
- public
- # define _methodname_ as instance method of current module, using ERB
- # object or eRuby file
- def def_erb_method(methodname, erb_or_fname)
- if erb_or_fname.kind_of? String
- fname = erb_or_fname
- erb = ERB.new(File.read(fname))
- erb.def_method(self, methodname, fname)
- else
- erb = erb_or_fname
- erb.def_method(self, methodname, erb.filename || '(ERB)')
- end
- end
- module_function :def_erb_method
- end
-end
diff --git a/lib/erb/compiler.rb b/lib/erb/compiler.rb
new file mode 100644
index 0000000000..547d2c4c44
--- /dev/null
+++ b/lib/erb/compiler.rb
@@ -0,0 +1,471 @@
+#--
+# ERB::Compiler
+#
+# Compiles ERB templates into Ruby code; the compiled code produces the
+# template result when evaluated. ERB::Compiler provides hooks to define how
+# generated output is handled.
+#
+# Internally ERB does something like this to generate the code returned by
+# ERB#src:
+#
+# compiler = ERB::Compiler.new('<>')
+# compiler.pre_cmd = ["_erbout=+''"]
+# compiler.put_cmd = "_erbout.<<"
+# compiler.insert_cmd = "_erbout.<<"
+# compiler.post_cmd = ["_erbout"]
+#
+# code, enc = compiler.compile("Got <%= obj %>!\n")
+# puts code
+#
+# <i>Generates</i>:
+#
+# #coding:UTF-8
+# _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout
+#
+# By default the output is sent to the print method. For example:
+#
+# compiler = ERB::Compiler.new('<>')
+# code, enc = compiler.compile("Got <%= obj %>!\n")
+# puts code
+#
+# <i>Generates</i>:
+#
+# #coding:UTF-8
+# print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze
+#
+# == Evaluation
+#
+# The compiled code can be used in any context where the names in the code
+# correctly resolve. Using the last example, each of these print 'Got It!'
+#
+# Evaluate using a variable:
+#
+# obj = 'It'
+# eval code
+#
+# Evaluate using an input:
+#
+# mod = Module.new
+# mod.module_eval %{
+# def get(obj)
+# #{code}
+# end
+# }
+# extend mod
+# get('It')
+#
+# Evaluate using an accessor:
+#
+# klass = Class.new Object
+# klass.class_eval %{
+# attr_accessor :obj
+# def initialize(obj)
+# @obj = obj
+# end
+# def get_it
+# #{code}
+# end
+# }
+# klass.new('It').get_it
+#
+# Good! See also ERB#def_method, ERB#def_module, and ERB#def_class.
+class ERB::Compiler # :nodoc:
+ class PercentLine # :nodoc:
+ def initialize(str)
+ @value = str
+ end
+ attr_reader :value
+ alias :to_s :value
+ end
+
+ class Scanner # :nodoc:
+ @scanner_map = {}
+ class << self
+ def register_scanner(klass, trim_mode, percent)
+ @scanner_map[[trim_mode, percent]] = klass
+ end
+ alias :regist_scanner :register_scanner
+ end
+
+ def self.default_scanner=(klass)
+ @default_scanner = klass
+ end
+
+ def self.make_scanner(src, trim_mode, percent)
+ klass = @scanner_map.fetch([trim_mode, percent], @default_scanner)
+ klass.new(src, trim_mode, percent)
+ end
+
+ DEFAULT_STAGS = %w(<%% <%= <%# <%).freeze
+ DEFAULT_ETAGS = %w(%%> %>).freeze
+ def initialize(src, trim_mode, percent)
+ @src = src
+ @stag = nil
+ @stags = DEFAULT_STAGS
+ @etags = DEFAULT_ETAGS
+ end
+ attr_accessor :stag
+ attr_reader :stags, :etags
+
+ def scan; end
+ end
+
+ class TrimScanner < Scanner # :nodoc:
+ def initialize(src, trim_mode, percent)
+ super
+ @trim_mode = trim_mode
+ @percent = percent
+ if @trim_mode == '>'
+ @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m
+ @scan_line = self.method(:trim_line1)
+ elsif @trim_mode == '<>'
+ @scan_reg = /(.*?)(%>\r?\n|#{(stags + etags).join('|')}|\n|\z)/m
+ @scan_line = self.method(:trim_line2)
+ elsif @trim_mode == '-'
+ @scan_reg = /(.*?)(^[ \t]*<%\-|<%\-|-%>\r?\n|-%>|#{(stags + etags).join('|')}|\z)/m
+ @scan_line = self.method(:explicit_trim_line)
+ else
+ @scan_reg = /(.*?)(#{(stags + etags).join('|')}|\n|\z)/m
+ @scan_line = self.method(:scan_line)
+ end
+ end
+
+ def scan(&block)
+ @stag = nil
+ if @percent
+ @src.each_line do |line|
+ percent_line(line, &block)
+ end
+ else
+ @scan_line.call(@src, &block)
+ end
+ nil
+ end
+
+ def percent_line(line, &block)
+ if @stag || line[0] != ?%
+ return @scan_line.call(line, &block)
+ end
+
+ line[0] = ''
+ if line[0] == ?%
+ @scan_line.call(line, &block)
+ else
+ yield(PercentLine.new(line.chomp))
+ end
+ end
+
+ def scan_line(line)
+ line.scan(@scan_reg) do |tokens|
+ tokens.each do |token|
+ next if token.empty?
+ yield(token)
+ end
+ end
+ end
+
+ def trim_line1(line)
+ line.scan(@scan_reg) do |tokens|
+ tokens.each do |token|
+ next if token.empty?
+ if token == "%>\n" || token == "%>\r\n"
+ yield('%>')
+ yield(:cr)
+ else
+ yield(token)
+ end
+ end
+ end
+ end
+
+ def trim_line2(line)
+ head = nil
+ line.scan(@scan_reg) do |tokens|
+ tokens.each do |token|
+ next if token.empty?
+ head = token unless head
+ if token == "%>\n" || token == "%>\r\n"
+ yield('%>')
+ if is_erb_stag?(head)
+ yield(:cr)
+ else
+ yield("\n")
+ end
+ head = nil
+ else
+ yield(token)
+ head = nil if token == "\n"
+ end
+ end
+ end
+ end
+
+ def explicit_trim_line(line)
+ line.scan(@scan_reg) do |tokens|
+ tokens.each do |token|
+ next if token.empty?
+ if @stag.nil? && /[ \t]*<%-/ =~ token
+ yield('<%')
+ elsif @stag && (token == "-%>\n" || token == "-%>\r\n")
+ yield('%>')
+ yield(:cr)
+ elsif @stag && token == '-%>'
+ yield('%>')
+ else
+ yield(token)
+ end
+ end
+ end
+ end
+
+ ERB_STAG = %w(<%= <%# <%)
+ def is_erb_stag?(s)
+ ERB_STAG.member?(s)
+ end
+ end
+
+ Scanner.default_scanner = TrimScanner
+
+ begin
+ require 'strscan'
+ rescue LoadError
+ else
+ class SimpleScanner < Scanner # :nodoc:
+ def scan
+ stag_reg = (stags == DEFAULT_STAGS) ? /(.*?)(<%[%=#]?|\z)/m : /(.*?)(#{stags.join('|')}|\z)/m
+ etag_reg = (etags == DEFAULT_ETAGS) ? /(.*?)(%%?>|\z)/m : /(.*?)(#{etags.join('|')}|\z)/m
+ scanner = StringScanner.new(@src)
+ while ! scanner.eos?
+ scanner.scan(@stag ? etag_reg : stag_reg)
+ yield(scanner[1])
+ yield(scanner[2])
+ end
+ end
+ end
+ Scanner.register_scanner(SimpleScanner, nil, false)
+
+ class ExplicitScanner < Scanner # :nodoc:
+ def scan
+ stag_reg = /(.*?)(^[ \t]*<%-|<%-|#{stags.join('|')}|\z)/m
+ etag_reg = /(.*?)(-%>|#{etags.join('|')}|\z)/m
+ scanner = StringScanner.new(@src)
+ while ! scanner.eos?
+ scanner.scan(@stag ? etag_reg : stag_reg)
+ yield(scanner[1])
+
+ elem = scanner[2]
+ if /[ \t]*<%-/ =~ elem
+ yield('<%')
+ elsif elem == '-%>'
+ yield('%>')
+ yield(:cr) if scanner.scan(/(\r?\n|\z)/)
+ else
+ yield(elem)
+ end
+ end
+ end
+ end
+ Scanner.register_scanner(ExplicitScanner, '-', false)
+ end
+
+ class Buffer # :nodoc:
+ def initialize(compiler, enc=nil, frozen=nil)
+ @compiler = compiler
+ @line = []
+ @script = +''
+ @script << "#coding:#{enc}\n" if enc
+ @script << "#frozen-string-literal:#{frozen}\n" unless frozen.nil?
+ @compiler.pre_cmd.each do |x|
+ push(x)
+ end
+ end
+ attr_reader :script
+
+ def push(cmd)
+ @line << cmd
+ end
+
+ def cr
+ @script << (@line.join('; '))
+ @line = []
+ @script << "\n"
+ end
+
+ def close
+ return unless @line
+ @compiler.post_cmd.each do |x|
+ push(x)
+ end
+ @script << (@line.join('; '))
+ @line = nil
+ end
+ end
+
+ def add_put_cmd(out, content)
+ out.push("#{@put_cmd} #{content.dump}.freeze#{"\n" * content.count("\n")}")
+ end
+
+ def add_insert_cmd(out, content)
+ out.push("#{@insert_cmd}((#{content}).to_s)")
+ end
+
+ # Compiles an ERB template into Ruby code. Returns an array of the code
+ # and encoding like ["code", Encoding].
+ def compile(s)
+ enc = s.encoding
+ raise ArgumentError, "#{enc} is not ASCII compatible" if enc.dummy?
+ s = s.b # see String#b
+ magic_comment = detect_magic_comment(s, enc)
+ out = Buffer.new(self, *magic_comment)
+
+ self.content = +''
+ scanner = make_scanner(s)
+ scanner.scan do |token|
+ next if token.nil?
+ next if token == ''
+ if scanner.stag.nil?
+ compile_stag(token, out, scanner)
+ else
+ compile_etag(token, out, scanner)
+ end
+ end
+ add_put_cmd(out, content) if content.size > 0
+ out.close
+ return out.script, *magic_comment
+ end
+
+ def compile_stag(stag, out, scanner)
+ case stag
+ when PercentLine
+ add_put_cmd(out, content) if content.size > 0
+ self.content = +''
+ out.push(stag.to_s)
+ out.cr
+ when :cr
+ out.cr
+ when '<%', '<%=', '<%#'
+ scanner.stag = stag
+ add_put_cmd(out, content) if content.size > 0
+ self.content = +''
+ when "\n"
+ content << "\n"
+ add_put_cmd(out, content)
+ self.content = +''
+ when '<%%'
+ content << '<%'
+ else
+ content << stag
+ end
+ end
+
+ def compile_etag(etag, out, scanner)
+ case etag
+ when '%>'
+ compile_content(scanner.stag, out)
+ scanner.stag = nil
+ self.content = +''
+ when '%%>'
+ content << '%>'
+ else
+ content << etag
+ end
+ end
+
+ def compile_content(stag, out)
+ case stag
+ when '<%'
+ if content[-1] == ?\n
+ content.chop!
+ out.push(content)
+ out.cr
+ else
+ out.push(content)
+ end
+ when '<%='
+ add_insert_cmd(out, content)
+ when '<%#'
+ out.push("\n" * content.count("\n")) # only adjust lineno
+ end
+ end
+
+ def prepare_trim_mode(mode) # :nodoc:
+ case mode
+ when 1
+ return [false, '>']
+ when 2
+ return [false, '<>']
+ when 0, nil
+ return [false, nil]
+ when String
+ unless mode.match?(/\A(%|-|>|<>){1,2}\z/)
+ warn_invalid_trim_mode(mode, uplevel: 5)
+ end
+
+ perc = mode.include?('%')
+ if mode.include?('-')
+ return [perc, '-']
+ elsif mode.include?('<>')
+ return [perc, '<>']
+ elsif mode.include?('>')
+ return [perc, '>']
+ else
+ [perc, nil]
+ end
+ else
+ warn_invalid_trim_mode(mode, uplevel: 5)
+ return [false, nil]
+ end
+ end
+
+ def make_scanner(src) # :nodoc:
+ Scanner.make_scanner(src, @trim_mode, @percent)
+ end
+
+ # Construct a new compiler using the trim_mode. See ERB::new for available
+ # trim modes.
+ def initialize(trim_mode)
+ @percent, @trim_mode = prepare_trim_mode(trim_mode)
+ @put_cmd = 'print'
+ @insert_cmd = @put_cmd
+ @pre_cmd = []
+ @post_cmd = []
+ end
+ attr_reader :percent, :trim_mode
+
+ # The command to handle text that ends with a newline
+ attr_accessor :put_cmd
+
+ # The command to handle text that is inserted prior to a newline
+ attr_accessor :insert_cmd
+
+ # An array of commands prepended to compiled code
+ attr_accessor :pre_cmd
+
+ # An array of commands appended to compiled code
+ attr_accessor :post_cmd
+
+ private
+
+ # A buffered text in #compile
+ attr_accessor :content
+
+ def detect_magic_comment(s, enc = nil)
+ re = @percent ? /\G(?:<%#(.*)%>|%#(.*)\n)/ : /\G<%#(.*)%>/
+ frozen = nil
+ s.scan(re) do
+ comment = $+
+ comment = $1 if comment[/-\*-\s*([^\s].*?)\s*-\*-$/]
+ case comment
+ when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
+ enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, ''))
+ when %r"frozen[-_]string[-_]literal\s*:\s*([[:alnum:]]+)"
+ frozen = $1
+ end
+ end
+ return enc, frozen
+ end
+
+ def warn_invalid_trim_mode(mode, uplevel:)
+ warn "Invalid ERB trim mode: #{mode.inspect} (trim_mode: nil, 0, 1, 2, or String composed of '%' and/or '-', '>', '<>')", uplevel: uplevel + 1
+ end
+end
diff --git a/lib/erb/def_method.rb b/lib/erb/def_method.rb
new file mode 100644
index 0000000000..17f9c0f9fa
--- /dev/null
+++ b/lib/erb/def_method.rb
@@ -0,0 +1,46 @@
+#--
+# ERB::DefMethod
+#
+# Utility module to define eRuby script as instance method.
+#
+# === Example
+#
+# example.rhtml:
+# <% for item in @items %>
+# <b><%= item %></b>
+# <% end %>
+#
+# example.rb:
+# require 'erb'
+# class MyClass
+# extend ERB::DefMethod
+# def_erb_method('render()', 'example.rhtml')
+# def initialize(items)
+# @items = items
+# end
+# end
+# print MyClass.new([10,20,30]).render()
+#
+# result:
+#
+# <b>10</b>
+#
+# <b>20</b>
+#
+# <b>30</b>
+#
+module ERB::DefMethod
+ # define _methodname_ as instance method of current module, using ERB
+ # object or eRuby file
+ def def_erb_method(methodname, erb_or_fname)
+ if erb_or_fname.kind_of? String
+ fname = erb_or_fname
+ erb = ERB.new(File.read(fname))
+ erb.def_method(self, methodname, fname)
+ else
+ erb = erb_or_fname
+ erb.def_method(self, methodname, erb.filename || '(ERB)')
+ end
+ end
+ module_function :def_erb_method
+end
diff --git a/lib/erb/util.rb b/lib/erb/util.rb
new file mode 100644
index 0000000000..0c1e7482a8
--- /dev/null
+++ b/lib/erb/util.rb
@@ -0,0 +1,62 @@
+#--
+# ERB::Escape
+#
+# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
+# Rails will not monkey-patch ERB::Escape#html_escape.
+begin
+ # We don't build the C extension for JRuby, TruffleRuby, and WASM
+ if $LOAD_PATH.resolve_feature_path('erb/escape')
+ require 'erb/escape'
+ end
+rescue LoadError # resolve_feature_path raises LoadError on TruffleRuby 22.3.0
+end
+unless defined?(ERB::Escape)
+ module ERB::Escape
+ def html_escape(s)
+ CGI.escapeHTML(s.to_s)
+ end
+ module_function :html_escape
+ end
+end
+
+#--
+# ERB::Util
+#
+# A utility module for conversion routines, often handy in HTML generation.
+module ERB::Util
+ #
+ # A utility method for escaping HTML tag characters in _s_.
+ #
+ # require "erb"
+ # include ERB::Util
+ #
+ # puts html_escape("is a > 0 & a < 10?")
+ #
+ # _Generates_
+ #
+ # is a &gt; 0 &amp; a &lt; 10?
+ #
+ include ERB::Escape # html_escape
+ module_function :html_escape
+ alias h html_escape
+ module_function :h
+
+ #
+ # A utility method for encoding the String _s_ as a URL.
+ #
+ # require "erb"
+ # include ERB::Util
+ #
+ # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
+ #
+ # _Generates_
+ #
+ # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
+ #
+ def url_encode(s)
+ CGI.escapeURIComponent(s.to_s)
+ end
+ alias u url_encode
+ module_function :u
+ module_function :url_encode
+end
diff --git a/lib/erb/version.rb b/lib/erb/version.rb
new file mode 100644
index 0000000000..38e1b76ff4
--- /dev/null
+++ b/lib/erb/version.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+class ERB
+ VERSION = '4.0.2'
+ private_constant :VERSION
+end
diff --git a/lib/error_highlight.rb b/lib/error_highlight.rb
new file mode 100644
index 0000000000..31db95d11b
--- /dev/null
+++ b/lib/error_highlight.rb
@@ -0,0 +1,2 @@
+require_relative "error_highlight/base"
+require_relative "error_highlight/core_ext"
diff --git a/lib/error_highlight/base.rb b/lib/error_highlight/base.rb
new file mode 100644
index 0000000000..062871ee16
--- /dev/null
+++ b/lib/error_highlight/base.rb
@@ -0,0 +1,514 @@
+require_relative "version"
+
+module ErrorHighlight
+ # Identify the code fragment at that a given exception occurred.
+ #
+ # Options:
+ #
+ # point_type: :name | :args
+ # :name (default) points the method/variable name that the exception occurred.
+ # :args points the arguments of the method call that the exception occurred.
+ #
+ # backtrace_location: Thread::Backtrace::Location
+ # It locates the code fragment of the given backtrace_location.
+ # By default, it uses the first frame of backtrace_locations of the given exception.
+ #
+ # Returns:
+ # {
+ # first_lineno: Integer,
+ # first_column: Integer,
+ # last_lineno: Integer,
+ # last_column: Integer,
+ # snippet: String,
+ # script_lines: [String],
+ # } | nil
+ #
+ # Limitations:
+ #
+ # Currently, ErrorHighlight.spot only supports a single-line code fragment.
+ # Therefore, if the return value is not nil, first_lineno and last_lineno will have
+ # the same value. If the relevant code fragment spans multiple lines
+ # (e.g., Array#[] of +ary[(newline)expr(newline)]+), the method will return nil.
+ # This restriction may be removed in the future.
+ def self.spot(obj, **opts)
+ case obj
+ when Exception
+ exc = obj
+ loc = opts[:backtrace_location]
+ opts = { point_type: opts.fetch(:point_type, :name) }
+
+ unless loc
+ case exc
+ when TypeError, ArgumentError
+ opts[:point_type] = :args
+ end
+
+ locs = exc.backtrace_locations
+ return nil unless locs
+
+ loc = locs.first
+ return nil unless loc
+
+ opts[:name] = exc.name if NameError === obj
+ end
+
+ return nil unless Thread::Backtrace::Location === loc
+
+ node = RubyVM::AbstractSyntaxTree.of(loc, keep_script_lines: true)
+
+ Spotter.new(node, **opts).spot
+
+ when RubyVM::AbstractSyntaxTree::Node
+ Spotter.new(obj, **opts).spot
+
+ else
+ raise TypeError, "Exception is expected"
+ end
+
+ rescue SyntaxError,
+ SystemCallError, # file not found or something
+ ArgumentError # eval'ed code
+
+ return nil
+ end
+
+ class Spotter
+ class NonAscii < Exception; end
+ private_constant :NonAscii
+
+ def initialize(node, point_type: :name, name: nil)
+ @node = node
+ @point_type = point_type
+ @name = name
+
+ # Not-implemented-yet options
+ @arg = nil # Specify the index or keyword at which argument caused the TypeError/ArgumentError
+ @multiline = false # Allow multiline spot
+
+ @fetch = -> (lineno, last_lineno = lineno) do
+ snippet = @node.script_lines[lineno - 1 .. last_lineno - 1].join("")
+ snippet += "\n" unless snippet.end_with?("\n")
+
+ # It require some work to support Unicode (or multibyte) characters.
+ # Tentatively, we stop highlighting if the code snippet has non-ascii characters.
+ # See https://github.com/ruby/error_highlight/issues/4
+ raise NonAscii unless snippet.ascii_only?
+
+ snippet
+ end
+ end
+
+ def spot
+ return nil unless @node
+
+ case @node.type
+
+ when :CALL, :QCALL
+ case @point_type
+ when :name
+ spot_call_for_name
+ when :args
+ spot_call_for_args
+ end
+
+ when :ATTRASGN
+ case @point_type
+ when :name
+ spot_attrasgn_for_name
+ when :args
+ spot_attrasgn_for_args
+ end
+
+ when :OPCALL
+ case @point_type
+ when :name
+ spot_opcall_for_name
+ when :args
+ spot_opcall_for_args
+ end
+
+ when :FCALL
+ case @point_type
+ when :name
+ spot_fcall_for_name
+ when :args
+ spot_fcall_for_args
+ end
+
+ when :VCALL
+ spot_vcall
+
+ when :OP_ASGN1
+ case @point_type
+ when :name
+ spot_op_asgn1_for_name
+ when :args
+ spot_op_asgn1_for_args
+ end
+
+ when :OP_ASGN2
+ case @point_type
+ when :name
+ spot_op_asgn2_for_name
+ when :args
+ spot_op_asgn2_for_args
+ end
+
+ when :CONST
+ spot_vcall
+
+ when :COLON2
+ spot_colon2
+
+ when :COLON3
+ spot_vcall
+
+ when :OP_CDECL
+ spot_op_cdecl
+ end
+
+ if @snippet && @beg_column && @end_column && @beg_column < @end_column
+ return {
+ first_lineno: @beg_lineno,
+ first_column: @beg_column,
+ last_lineno: @end_lineno,
+ last_column: @end_column,
+ snippet: @snippet,
+ script_lines: @node.script_lines,
+ }
+ else
+ return nil
+ end
+
+ rescue NonAscii
+ nil
+ end
+
+ private
+
+ # Example:
+ # x.foo
+ # ^^^^
+ # x.foo(42)
+ # ^^^^
+ # x&.foo
+ # ^^^^^
+ # x[42]
+ # ^^^^
+ # x += 1
+ # ^
+ def spot_call_for_name
+ nd_recv, mid, nd_args = @node.children
+ lineno = nd_recv.last_lineno
+ lines = @fetch[lineno, @node.last_lineno]
+ if mid == :[] && lines.match(/\G[\s)]*(\[(?:\s*\])?)/, nd_recv.last_column)
+ @beg_column = $~.begin(1)
+ @snippet = lines[/.*\n/]
+ @beg_lineno = @end_lineno = lineno
+ if nd_args
+ if nd_recv.last_lineno == nd_args.last_lineno && @snippet.match(/\s*\]/, nd_args.last_column)
+ @end_column = $~.end(0)
+ end
+ else
+ if lines.match(/\G[\s)]*?\[\s*\]/, nd_recv.last_column)
+ @end_column = $~.end(0)
+ end
+ end
+ elsif lines.match(/\G[\s)]*?(\&?\.)(\s*?)(#{ Regexp.quote(mid) }).*\n/, nd_recv.last_column)
+ lines = $` + $&
+ @beg_column = $~.begin($2.include?("\n") ? 3 : 1)
+ @end_column = $~.end(3)
+ if i = lines[..@beg_column].rindex("\n")
+ @beg_lineno = @end_lineno = lineno + lines[..@beg_column].count("\n")
+ @snippet = lines[i + 1..]
+ @beg_column -= i + 1
+ @end_column -= i + 1
+ else
+ @snippet = lines
+ @beg_lineno = @end_lineno = lineno
+ end
+ elsif mid.to_s =~ /\A\W+\z/ && lines.match(/\G\s*(#{ Regexp.quote(mid) })=.*\n/, nd_recv.last_column)
+ @snippet = $` + $&
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ end
+
+ # Example:
+ # x.foo(42)
+ # ^^
+ # x[42]
+ # ^^
+ # x += 1
+ # ^
+ def spot_call_for_args
+ _nd_recv, _mid, nd_args = @node.children
+ if nd_args && nd_args.first_lineno == nd_args.last_lineno
+ fetch_line(nd_args.first_lineno)
+ @beg_column = nd_args.first_column
+ @end_column = nd_args.last_column
+ end
+ # TODO: support @arg
+ end
+
+ # Example:
+ # x.foo = 1
+ # ^^^^^^
+ # x[42] = 1
+ # ^^^^^^
+ def spot_attrasgn_for_name
+ nd_recv, mid, nd_args = @node.children
+ *nd_args, _nd_last_arg, _nil = nd_args.children
+ fetch_line(nd_recv.last_lineno)
+ if mid == :[]= && @snippet.match(/\G[\s)]*(\[)/, nd_recv.last_column)
+ @beg_column = $~.begin(1)
+ args_last_column = $~.end(0)
+ if nd_args.last && nd_recv.last_lineno == nd_args.last.last_lineno
+ args_last_column = nd_args.last.last_column
+ end
+ if @snippet.match(/[\s)]*\]\s*=/, args_last_column)
+ @end_column = $~.end(0)
+ end
+ elsif @snippet.match(/\G[\s)]*(\.\s*#{ Regexp.quote(mid.to_s.sub(/=\z/, "")) }\s*=)/, nd_recv.last_column)
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ end
+
+ # Example:
+ # x.foo = 1
+ # ^
+ # x[42] = 1
+ # ^^^^^^^
+ # x[] = 1
+ # ^^^^^
+ def spot_attrasgn_for_args
+ nd_recv, mid, nd_args = @node.children
+ fetch_line(nd_recv.last_lineno)
+ if mid == :[]= && @snippet.match(/\G[\s)]*\[/, nd_recv.last_column)
+ @beg_column = $~.end(0)
+ if nd_recv.last_lineno == nd_args.last_lineno
+ @end_column = nd_args.last_column
+ end
+ elsif nd_args && nd_args.first_lineno == nd_args.last_lineno
+ @beg_column = nd_args.first_column
+ @end_column = nd_args.last_column
+ end
+ # TODO: support @arg
+ end
+
+ # Example:
+ # x + 1
+ # ^
+ # +x
+ # ^
+ def spot_opcall_for_name
+ nd_recv, op, nd_arg = @node.children
+ fetch_line(nd_recv.last_lineno)
+ if nd_arg
+ # binary operator
+ if @snippet.match(/\G[\s)]*(#{ Regexp.quote(op) })/, nd_recv.last_column)
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ else
+ # unary operator
+ if @snippet[...nd_recv.first_column].match(/(#{ Regexp.quote(op.to_s.sub(/@\z/, "")) })\s*\(?\s*\z/)
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ end
+ end
+
+ # Example:
+ # x + 1
+ # ^
+ def spot_opcall_for_args
+ _nd_recv, _op, nd_arg = @node.children
+ if nd_arg && nd_arg.first_lineno == nd_arg.last_lineno
+ # binary operator
+ fetch_line(nd_arg.first_lineno)
+ @beg_column = nd_arg.first_column
+ @end_column = nd_arg.last_column
+ end
+ end
+
+ # Example:
+ # foo(42)
+ # ^^^
+ # foo 42
+ # ^^^
+ def spot_fcall_for_name
+ mid, _nd_args = @node.children
+ fetch_line(@node.first_lineno)
+ if @snippet.match(/(#{ Regexp.quote(mid) })/, @node.first_column)
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ end
+
+ # Example:
+ # foo(42)
+ # ^^
+ # foo 42
+ # ^^
+ def spot_fcall_for_args
+ _mid, nd_args = @node.children
+ if nd_args && nd_args.first_lineno == nd_args.last_lineno
+ # binary operator
+ fetch_line(nd_args.first_lineno)
+ @beg_column = nd_args.first_column
+ @end_column = nd_args.last_column
+ end
+ end
+
+ # Example:
+ # foo
+ # ^^^
+ def spot_vcall
+ if @node.first_lineno == @node.last_lineno
+ fetch_line(@node.last_lineno)
+ @beg_column = @node.first_column
+ @end_column = @node.last_column
+ end
+ end
+
+ # Example:
+ # x[1] += 42
+ # ^^^ (for [])
+ # x[1] += 42
+ # ^ (for +)
+ # x[1] += 42
+ # ^^^^^^ (for []=)
+ def spot_op_asgn1_for_name
+ nd_recv, op, nd_args, _nd_rhs = @node.children
+ fetch_line(nd_recv.last_lineno)
+ if @snippet.match(/\G[\s)]*(\[)/, nd_recv.last_column)
+ bracket_beg_column = $~.begin(1)
+ args_last_column = $~.end(0)
+ if nd_args && nd_recv.last_lineno == nd_args.last_lineno
+ args_last_column = nd_args.last_column
+ end
+ if @snippet.match(/\s*\](\s*)(#{ Regexp.quote(op) })=()/, args_last_column)
+ case @name
+ when :[], :[]=
+ @beg_column = bracket_beg_column
+ @end_column = $~.begin(@name == :[] ? 1 : 3)
+ when op
+ @beg_column = $~.begin(2)
+ @end_column = $~.end(2)
+ end
+ end
+ end
+ end
+
+ # Example:
+ # x[1] += 42
+ # ^^^^^^^^
+ def spot_op_asgn1_for_args
+ nd_recv, mid, nd_args, nd_rhs = @node.children
+ fetch_line(nd_recv.last_lineno)
+ if mid == :[]= && @snippet.match(/\G\s*\[/, nd_recv.last_column)
+ @beg_column = $~.end(0)
+ if nd_recv.last_lineno == nd_rhs.last_lineno
+ @end_column = nd_rhs.last_column
+ end
+ elsif nd_args && nd_args.first_lineno == nd_rhs.last_lineno
+ @beg_column = nd_args.first_column
+ @end_column = nd_rhs.last_column
+ end
+ # TODO: support @arg
+ end
+
+ # Example:
+ # x.foo += 42
+ # ^^^ (for foo)
+ # x.foo += 42
+ # ^ (for +)
+ # x.foo += 42
+ # ^^^^^^^ (for foo=)
+ def spot_op_asgn2_for_name
+ nd_recv, _qcall, attr, op, _nd_rhs = @node.children
+ fetch_line(nd_recv.last_lineno)
+ if @snippet.match(/\G[\s)]*(\.)\s*#{ Regexp.quote(attr) }()\s*(#{ Regexp.quote(op) })(=)/, nd_recv.last_column)
+ case @name
+ when attr
+ @beg_column = $~.begin(1)
+ @end_column = $~.begin(2)
+ when op
+ @beg_column = $~.begin(3)
+ @end_column = $~.end(3)
+ when :"#{ attr }="
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(4)
+ end
+ end
+ end
+
+ # Example:
+ # x.foo += 42
+ # ^^
+ def spot_op_asgn2_for_args
+ _nd_recv, _qcall, _attr, _op, nd_rhs = @node.children
+ if nd_rhs.first_lineno == nd_rhs.last_lineno
+ fetch_line(nd_rhs.first_lineno)
+ @beg_column = nd_rhs.first_column
+ @end_column = nd_rhs.last_column
+ end
+ end
+
+ # Example:
+ # Foo::Bar
+ # ^^^^^
+ def spot_colon2
+ nd_parent, const = @node.children
+ if nd_parent.last_lineno == @node.last_lineno
+ fetch_line(nd_parent.last_lineno)
+ @beg_column = nd_parent.last_column
+ @end_column = @node.last_column
+ else
+ @snippet = @fetch[@node.last_lineno]
+ if @snippet[...@node.last_column].match(/#{ Regexp.quote(const) }\z/)
+ @beg_column = $~.begin(0)
+ @end_column = $~.end(0)
+ end
+ end
+ end
+
+ # Example:
+ # Foo::Bar += 1
+ # ^^^^^^^^
+ def spot_op_cdecl
+ nd_lhs, op, _nd_rhs = @node.children
+ *nd_parent_lhs, _const = nd_lhs.children
+ if @name == op
+ @snippet = @fetch[nd_lhs.last_lineno]
+ if @snippet.match(/\G\s*(#{ Regexp.quote(op) })=/, nd_lhs.last_column)
+ @beg_column = $~.begin(1)
+ @end_column = $~.end(1)
+ end
+ else
+ # constant access error
+ @end_column = nd_lhs.last_column
+ if nd_parent_lhs.empty? # example: ::C += 1
+ if nd_lhs.first_lineno == nd_lhs.last_lineno
+ @snippet = @fetch[nd_lhs.last_lineno]
+ @beg_column = nd_lhs.first_column
+ end
+ else # example: Foo::Bar::C += 1
+ if nd_parent_lhs.last.last_lineno == nd_lhs.last_lineno
+ @snippet = @fetch[nd_lhs.last_lineno]
+ @beg_column = nd_parent_lhs.last.last_column
+ end
+ end
+ end
+ end
+
+ def fetch_line(lineno)
+ @beg_lineno = @end_lineno = lineno
+ @snippet = @fetch[lineno]
+ end
+ end
+
+ private_constant :Spotter
+end
diff --git a/lib/error_highlight/core_ext.rb b/lib/error_highlight/core_ext.rb
new file mode 100644
index 0000000000..b69093f74e
--- /dev/null
+++ b/lib/error_highlight/core_ext.rb
@@ -0,0 +1,47 @@
+require_relative "formatter"
+
+module ErrorHighlight
+ module CoreExt
+ private def generate_snippet
+ spot = ErrorHighlight.spot(self)
+ return "" unless spot
+ return ErrorHighlight.formatter.message_for(spot)
+ end
+
+ if Exception.method_defined?(:detailed_message)
+ def detailed_message(highlight: false, error_highlight: true, **)
+ return super unless error_highlight
+ snippet = generate_snippet
+ if highlight
+ snippet = snippet.gsub(/.+/) { "\e[1m" + $& + "\e[m" }
+ end
+ super + snippet
+ end
+ else
+ # This is a marker to let `DidYouMean::Correctable#original_message` skip
+ # the following method definition of `to_s`.
+ # See https://github.com/ruby/did_you_mean/pull/152
+ SKIP_TO_S_FOR_SUPER_LOOKUP = true
+ private_constant :SKIP_TO_S_FOR_SUPER_LOOKUP
+
+ def to_s
+ msg = super
+ snippet = generate_snippet
+ if snippet != "" && !msg.include?(snippet)
+ msg + snippet
+ else
+ msg
+ end
+ end
+ end
+ end
+
+ NameError.prepend(CoreExt)
+
+ if Exception.method_defined?(:detailed_message)
+ # ErrorHighlight is enabled for TypeError and ArgumentError only when Exception#detailed_message is available.
+ # This is because changing ArgumentError#message is highly incompatible.
+ TypeError.prepend(CoreExt)
+ ArgumentError.prepend(CoreExt)
+ end
+end
diff --git a/lib/error_highlight/error_highlight.gemspec b/lib/error_highlight/error_highlight.gemspec
new file mode 100644
index 0000000000..b2da18df83
--- /dev/null
+++ b/lib/error_highlight/error_highlight.gemspec
@@ -0,0 +1,27 @@
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+begin
+ require_relative "lib/error_highlight/version"
+rescue LoadError # Fallback to load version file in ruby core repository
+ require_relative "version"
+end
+
+Gem::Specification.new do |spec|
+ spec.name = "error_highlight"
+ spec.version = ErrorHighlight::VERSION
+ spec.authors = ["Yusuke Endoh"]
+ spec.email = ["mame@ruby-lang.org"]
+
+ spec.summary = 'Shows a one-line code snippet with an underline in the error backtrace'
+ spec.description = 'The gem enhances Exception#message by adding a short explanation where the exception is raised'
+ spec.homepage = "https://github.com/ruby/error_highlight"
+
+ spec.license = "MIT"
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0.dev")
+
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
+ end
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/error_highlight/formatter.rb b/lib/error_highlight/formatter.rb
new file mode 100644
index 0000000000..20ca78d468
--- /dev/null
+++ b/lib/error_highlight/formatter.rb
@@ -0,0 +1,23 @@
+module ErrorHighlight
+ class DefaultFormatter
+ def self.message_for(spot)
+ # currently only a one-line code snippet is supported
+ if spot[:first_lineno] == spot[:last_lineno]
+ indent = spot[:snippet][0...spot[:first_column]].gsub(/[^\t]/, " ")
+ marker = indent + "^" * (spot[:last_column] - spot[:first_column])
+
+ "\n\n#{ spot[:snippet] }#{ marker }"
+ else
+ ""
+ end
+ end
+ end
+
+ def self.formatter
+ Ractor.current[:__error_highlight_formatter__] || DefaultFormatter
+ end
+
+ def self.formatter=(formatter)
+ Ractor.current[:__error_highlight_formatter__] = formatter
+ end
+end
diff --git a/lib/error_highlight/version.rb b/lib/error_highlight/version.rb
new file mode 100644
index 0000000000..5afe5f06d6
--- /dev/null
+++ b/lib/error_highlight/version.rb
@@ -0,0 +1,3 @@
+module ErrorHighlight
+ VERSION = "0.5.1"
+end
diff --git a/lib/fileutils.gemspec b/lib/fileutils.gemspec
index cd35c09dbc..76baea3039 100644
--- a/lib/fileutils.gemspec
+++ b/lib/fileutils.gemspec
@@ -18,12 +18,12 @@ Gem::Specification.new do |s|
s.require_path = %w{lib}
s.files = ["LICENSE.txt", "README.md", "Rakefile", "fileutils.gemspec", "lib/fileutils.rb"]
- s.required_ruby_version = ">= 2.3.0"
+ s.required_ruby_version = ">= 2.5.0"
s.authors = ["Minero Aoki"]
s.email = [nil]
s.homepage = "https://github.com/ruby/fileutils"
- s.license = "BSD-2-Clause"
+ s.licenses = ["Ruby", "BSD-2-Clause"]
s.metadata = {
"source_code_uri" => "https://github.com/ruby/fileutils"
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index a7ad65ae5e..b495078f93 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -6,103 +6,181 @@ rescue LoadError
# for make mjit-headers
end
+# Namespace for file utility methods for copying, moving, removing, etc.
#
-# = fileutils.rb
+# == What's Here
#
-# Copyright (c) 2000-2007 Minero Aoki
+# First, what’s elsewhere. \Module \FileUtils:
#
-# This program is free software.
-# You can distribute/modify this program under the same terms of ruby.
+# - Inherits from {class Object}[rdoc-ref:Object].
+# - Supplements {class File}[rdoc-ref:File]
+# (but is not included or extended there).
#
-# == module FileUtils
+# Here, module \FileUtils provides methods that are useful for:
#
-# Namespace for several file utility methods for copying, moving, removing, etc.
+# - {Creating}[rdoc-ref:FileUtils@Creating].
+# - {Deleting}[rdoc-ref:FileUtils@Deleting].
+# - {Querying}[rdoc-ref:FileUtils@Querying].
+# - {Setting}[rdoc-ref:FileUtils@Setting].
+# - {Comparing}[rdoc-ref:FileUtils@Comparing].
+# - {Copying}[rdoc-ref:FileUtils@Copying].
+# - {Moving}[rdoc-ref:FileUtils@Moving].
+# - {Options}[rdoc-ref:FileUtils@Options].
#
-# === Module Functions
+# === Creating
#
-# require 'fileutils'
+# - ::mkdir: Creates directories.
+# - ::mkdir_p, ::makedirs, ::mkpath: Creates directories,
+# also creating ancestor directories as needed.
+# - ::link_entry: Creates a hard link.
+# - ::ln, ::link: Creates hard links.
+# - ::ln_s, ::symlink: Creates symbolic links.
+# - ::ln_sf: Creates symbolic links, overwriting if necessary.
+# - ::ln_sr: Creates symbolic links relative to targets
#
-# FileUtils.cd(dir, **options)
-# FileUtils.cd(dir, **options) {|dir| block }
-# FileUtils.pwd()
-# FileUtils.mkdir(dir, **options)
-# FileUtils.mkdir(list, **options)
-# FileUtils.mkdir_p(dir, **options)
-# FileUtils.mkdir_p(list, **options)
-# FileUtils.rmdir(dir, **options)
-# FileUtils.rmdir(list, **options)
-# FileUtils.ln(target, link, **options)
-# FileUtils.ln(targets, dir, **options)
-# FileUtils.ln_s(target, link, **options)
-# FileUtils.ln_s(targets, dir, **options)
-# FileUtils.ln_sf(target, link, **options)
-# FileUtils.cp(src, dest, **options)
-# FileUtils.cp(list, dir, **options)
-# FileUtils.cp_r(src, dest, **options)
-# FileUtils.cp_r(list, dir, **options)
-# FileUtils.mv(src, dest, **options)
-# FileUtils.mv(list, dir, **options)
-# FileUtils.rm(list, **options)
-# FileUtils.rm_r(list, **options)
-# FileUtils.rm_rf(list, **options)
-# FileUtils.install(src, dest, **options)
-# FileUtils.chmod(mode, list, **options)
-# FileUtils.chmod_R(mode, list, **options)
-# FileUtils.chown(user, group, list, **options)
-# FileUtils.chown_R(user, group, list, **options)
-# FileUtils.touch(list, **options)
+# === Deleting
#
-# Possible <tt>options</tt> are:
+# - ::remove_dir: Removes a directory and its descendants.
+# - ::remove_entry: Removes an entry, including its descendants if it is a directory.
+# - ::remove_entry_secure: Like ::remove_entry, but removes securely.
+# - ::remove_file: Removes a file entry.
+# - ::rm, ::remove: Removes entries.
+# - ::rm_f, ::safe_unlink: Like ::rm, but removes forcibly.
+# - ::rm_r: Removes entries and their descendants.
+# - ::rm_rf, ::rmtree: Like ::rm_r, but removes forcibly.
+# - ::rmdir: Removes directories.
#
-# <tt>:force</tt> :: forced operation (rewrite files if exist, remove
-# directories if not empty, etc.);
-# <tt>:verbose</tt> :: print command to be run, in bash syntax, before
-# performing it;
-# <tt>:preserve</tt> :: preserve object's group, user and modification
-# time on copying;
-# <tt>:noop</tt> :: no changes are made (usable in combination with
-# <tt>:verbose</tt> which will print the command to run)
+# === Querying
#
-# Each method documents the options that it honours. See also ::commands,
-# ::options and ::options_of methods to introspect which command have which
-# options.
+# - ::pwd, ::getwd: Returns the path to the working directory.
+# - ::uptodate?: Returns whether a given entry is newer than given other entries.
#
-# All methods that have the concept of a "source" file or directory can take
-# either one file or a list of files in that argument. See the method
-# documentation for examples.
+# === Setting
#
-# There are some `low level' methods, which do not accept keyword arguments:
+# - ::cd, ::chdir: Sets the working directory.
+# - ::chmod: Sets permissions for an entry.
+# - ::chmod_R: Sets permissions for an entry and its descendants.
+# - ::chown: Sets the owner and group for entries.
+# - ::chown_R: Sets the owner and group for entries and their descendants.
+# - ::touch: Sets modification and access times for entries,
+# creating if necessary.
#
-# FileUtils.copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
-# FileUtils.copy_file(src, dest, preserve = false, dereference = true)
-# FileUtils.copy_stream(srcstream, deststream)
-# FileUtils.remove_entry(path, force = false)
-# FileUtils.remove_entry_secure(path, force = false)
-# FileUtils.remove_file(path, force = false)
-# FileUtils.compare_file(path_a, path_b)
-# FileUtils.compare_stream(stream_a, stream_b)
-# FileUtils.uptodate?(file, cmp_list)
+# === Comparing
#
-# == module FileUtils::Verbose
+# - ::compare_file, ::cmp, ::identical?: Returns whether two entries are identical.
+# - ::compare_stream: Returns whether two streams are identical.
#
-# This module has all methods of FileUtils module, but it outputs messages
-# before acting. This equates to passing the <tt>:verbose</tt> flag to methods
-# in FileUtils.
+# === Copying
#
-# == module FileUtils::NoWrite
+# - ::copy_entry: Recursively copies an entry.
+# - ::copy_file: Copies an entry.
+# - ::copy_stream: Copies a stream.
+# - ::cp, ::copy: Copies files.
+# - ::cp_lr: Recursively creates hard links.
+# - ::cp_r: Recursively copies files, retaining mode, owner, and group.
+# - ::install: Recursively copies files, optionally setting mode,
+# owner, and group.
#
-# This module has all methods of FileUtils module, but never changes
-# files/directories. This equates to passing the <tt>:noop</tt> flag to methods
-# in FileUtils.
+# === Moving
#
-# == module FileUtils::DryRun
+# - ::mv, ::move: Moves entries.
#
-# This module has all methods of FileUtils module, but never changes
-# files/directories. This equates to passing the <tt>:noop</tt> and
-# <tt>:verbose</tt> flags to methods in FileUtils.
+# === Options
+#
+# - ::collect_method: Returns the names of methods that accept a given option.
+# - ::commands: Returns the names of methods that accept options.
+# - ::have_option?: Returns whether a given method accepts a given option.
+# - ::options: Returns all option names.
+# - ::options_of: Returns the names of the options for a given method.
+#
+# == Path Arguments
+#
+# Some methods in \FileUtils accept _path_ arguments,
+# which are interpreted as paths to filesystem entries:
+#
+# - If the argument is a string, that value is the path.
+# - If the argument has method +:to_path+, it is converted via that method.
+# - If the argument has method +:to_str+, it is converted via that method.
+#
+# == About the Examples
+#
+# Some examples here involve trees of file entries.
+# For these, we sometimes display trees using the
+# {tree command-line utility}[https://en.wikipedia.org/wiki/Tree_(command)],
+# which is a recursive directory-listing utility that produces
+# a depth-indented listing of files and directories.
+#
+# We use a helper method to launch the command and control the format:
+#
+# def tree(dirpath = '.')
+# command = "tree --noreport --charset=ascii #{dirpath}"
+# system(command)
+# end
+#
+# To illustrate:
+#
+# tree('src0')
+# # => src0
+# # |-- sub0
+# # | |-- src0.txt
+# # | `-- src1.txt
+# # `-- sub1
+# # |-- src2.txt
+# # `-- src3.txt
+#
+# == Avoiding the TOCTTOU Vulnerability
+#
+# For certain methods that recursively remove entries,
+# there is a potential vulnerability called the
+# {Time-of-check to time-of-use}[https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use],
+# or TOCTTOU, vulnerability that can exist when:
+#
+# - An ancestor directory of the entry at the target path is world writable;
+# such directories include <tt>/tmp</tt>.
+# - The directory tree at the target path includes:
+#
+# - A world-writable descendant directory.
+# - A symbolic link.
+#
+# To avoid that vulnerability, you can use this method to remove entries:
+#
+# - FileUtils.remove_entry_secure: removes recursively
+# if the target path points to a directory.
+#
+# Also available are these methods,
+# each of which calls \FileUtils.remove_entry_secure:
+#
+# - FileUtils.rm_r with keyword argument <tt>secure: true</tt>.
+# - FileUtils.rm_rf with keyword argument <tt>secure: true</tt>.
+#
+# Finally, this method for moving entries calls \FileUtils.remove_entry_secure
+# if the source and destination are on different file systems
+# (which means that the "move" is really a copy and remove):
+#
+# - FileUtils.mv with keyword argument <tt>secure: true</tt>.
+#
+# \Method \FileUtils.remove_entry_secure removes securely
+# by applying a special pre-process:
+#
+# - If the target path points to a directory, this method uses methods
+# {File#chown}[rdoc-ref:File#chown]
+# and {File#chmod}[rdoc-ref:File#chmod]
+# in removing directories.
+# - The owner of the target directory should be either the current process
+# or the super user (root).
+#
+# WARNING: You must ensure that *ALL* parent directories cannot be
+# moved by other untrusted users. For example, parent directories
+# should not be owned by untrusted users, and should not be world
+# writable except when the sticky bit is set.
+#
+# For details of this security vulnerability, see Perl cases:
+#
+# - {CVE-2005-0448}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448].
+# - {CVE-2004-0452}[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452].
#
module FileUtils
- VERSION = "1.4.1"
+ VERSION = "1.7.0"
def self.private_module_function(name) #:nodoc:
module_function name
@@ -110,7 +188,13 @@ module FileUtils
end
#
- # Returns the name of the current directory.
+ # Returns a string containing the path to the current directory:
+ #
+ # FileUtils.pwd # => "/rdoc/fileutils"
+ #
+ # FileUtils.getwd is an alias for FileUtils.pwd.
+ #
+ # Related: FileUtils.cd.
#
def pwd
Dir.pwd
@@ -120,19 +204,40 @@ module FileUtils
alias getwd pwd
module_function :getwd
+ # Changes the working directory to the given +dir+, which
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:
+ #
+ # With no block given,
+ # changes the current directory to the directory at +dir+; returns zero:
+ #
+ # FileUtils.pwd # => "/rdoc/fileutils"
+ # FileUtils.cd('..')
+ # FileUtils.pwd # => "/rdoc"
+ # FileUtils.cd('fileutils')
+ #
+ # With a block given, changes the current directory to the directory
+ # at +dir+, calls the block with argument +dir+,
+ # and restores the original current directory; returns the block's value:
#
- # Changes the current directory to the directory +dir+.
+ # FileUtils.pwd # => "/rdoc/fileutils"
+ # FileUtils.cd('..') { |arg| [arg, FileUtils.pwd] } # => ["..", "/rdoc"]
+ # FileUtils.pwd # => "/rdoc/fileutils"
#
- # If this method is called with block, resumes to the previous
- # working directory after the block execution has finished.
+ # Keyword arguments:
#
- # FileUtils.cd('/') # change directory
+ # - <tt>verbose: true</tt> - prints an equivalent command:
#
- # FileUtils.cd('/', verbose: true) # change directory and report it
+ # FileUtils.cd('..')
+ # FileUtils.cd('fileutils')
#
- # FileUtils.cd('/') do # change directory
- # # ... # do something
- # end # return to original directory
+ # Output:
+ #
+ # cd ..
+ # cd fileutils
+ #
+ # FileUtils.chdir is an alias for FileUtils.cd.
+ #
+ # Related: FileUtils.pwd.
#
def cd(dir, verbose: nil, &block) # :yield: dir
fu_output_message "cd #{dir}" if verbose
@@ -146,11 +251,19 @@ module FileUtils
module_function :chdir
#
- # Returns true if +new+ is newer than all +old_list+.
- # Non-existent files are older than any file.
+ # Returns +true+ if the file at path +new+
+ # is newer than all the files at paths in array +old_list+;
+ # +false+ otherwise.
+ #
+ # Argument +new+ and the elements of +old_list+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments]:
#
- # FileUtils.uptodate?('hello.o', %w(hello.c hello.h)) or \
- # system 'make hello.o'
+ # FileUtils.uptodate?('Rakefile', ['Gemfile', 'README.md']) # => true
+ # FileUtils.uptodate?('Gemfile', ['Rakefile', 'README.md']) # => false
+ #
+ # A non-existent file is considered to be infinitely old.
+ #
+ # Related: FileUtils.touch.
#
def uptodate?(new, old_list)
return false unless File.exist?(new)
@@ -170,12 +283,39 @@ module FileUtils
private_module_function :remove_trailing_slash
#
- # Creates one or more directories.
+ # Creates directories at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, creates a directory at each +path+ in +list+
+ # by calling: <tt>Dir.mkdir(path, mode)</tt>;
+ # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
+ #
+ # FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
+ # FileUtils.mkdir('tmp4') # => ["tmp4"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
+ # see {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not create directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.mkdir(%w[tmp0 tmp1], verbose: true)
+ # FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true)
+ #
+ # Output:
#
- # FileUtils.mkdir 'test'
- # FileUtils.mkdir %w(tmp data)
- # FileUtils.mkdir 'notexist', noop: true # Does not really create.
- # FileUtils.mkdir 'tmp', mode: 0700
+ # mkdir tmp0 tmp1
+ # mkdir -m 700 tmp2 tmp3
+ #
+ # Raises an exception if any path points to an existing
+ # file or directory, or if for any reason a directory cannot be created.
+ #
+ # Related: FileUtils.mkdir_p.
#
def mkdir(list, mode: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -189,40 +329,56 @@ module FileUtils
module_function :mkdir
#
- # Creates a directory and all its parent directories.
- # For example,
+ # Creates directories at the paths in the given +list+
+ # (a single path or an array of paths),
+ # also creating ancestor directories as needed;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, creates a directory at each +path+ in +list+,
+ # along with any needed ancestor directories,
+ # by calling: <tt>Dir.mkdir(path, mode)</tt>;
+ # see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:
+ #
+ # FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
+ # FileUtils.mkdir_p('tmp4/tmp5') # => ["tmp4/tmp5"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>;
+ # see {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not create directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.mkdir_p(%w[tmp0 tmp1], verbose: true)
+ # FileUtils.mkdir_p(%w[tmp2 tmp3], mode: 0700, verbose: true)
#
- # FileUtils.mkdir_p '/usr/local/lib/ruby'
+ # Output:
#
- # causes to make following directories, if they do not exist.
+ # mkdir -p tmp0 tmp1
+ # mkdir -p -m 700 tmp2 tmp3
#
- # * /usr
- # * /usr/local
- # * /usr/local/lib
- # * /usr/local/lib/ruby
+ # Raises an exception if for any reason a directory cannot be created.
#
- # You can pass several directories at a time in a list.
+ # FileUtils.mkpath and FileUtils.makedirs are aliases for FileUtils.mkdir_p.
+ #
+ # Related: FileUtils.mkdir.
#
def mkdir_p(list, mode: nil, noop: nil, verbose: nil)
list = fu_list(list)
fu_output_message "mkdir -p #{mode ? ('-m %03o ' % mode) : ''}#{list.join ' '}" if verbose
return *list if noop
- list.map {|path| remove_trailing_slash(path)}.each do |path|
- # optimize for the most common case
- begin
- fu_mkdir path, mode
- next
- rescue SystemCallError
- next if File.directory?(path)
- end
+ list.each do |item|
+ path = remove_trailing_slash(item)
stack = []
- until path == stack.last # dirname("/")=="/", dirname("C:/")=="C:/"
+ until File.directory?(path) || File.dirname(path) == path
stack.push path
path = File.dirname(path)
end
- stack.pop # root directory should exist
stack.reverse_each do |dir|
begin
fu_mkdir dir, mode
@@ -253,12 +409,39 @@ module FileUtils
private_module_function :fu_mkdir
#
- # Removes one or more directories.
+ # Removes directories at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, removes the directory at each +path+ in +list+,
+ # by calling: <tt>Dir.rmdir(path)</tt>;
+ # see {Dir.rmdir}[rdoc-ref:Dir.rmdir]:
+ #
+ # FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
+ # FileUtils.rmdir('tmp4/tmp5') # => ["tmp4/tmp5"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>parents: true</tt> - removes successive ancestor directories
+ # if empty.
+ # - <tt>noop: true</tt> - does not remove directories.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
#
- # FileUtils.rmdir 'somedir'
- # FileUtils.rmdir %w(somedir anydir otherdir)
- # # Does not really remove directory; outputs message.
- # FileUtils.rmdir 'somedir', verbose: true, noop: true
+ # FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3], parents: true, verbose: true)
+ # FileUtils.rmdir('tmp4/tmp5', parents: true, verbose: true)
+ #
+ # Output:
+ #
+ # rmdir -p tmp0/tmp1 tmp2/tmp3
+ # rmdir -p tmp4/tmp5
+ #
+ # Raises an exception if a directory does not exist
+ # or if for any reason a directory cannot be removed.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rmdir(list, parents: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -279,26 +462,62 @@ module FileUtils
end
module_function :rmdir
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # When +src+ is the path to an existing file
+ # and +dest+ is the path to a non-existent file,
+ # creates a hard link at +dest+ pointing to +src+; returns zero:
+ #
+ # Dir.children('tmp0/') # => ["t.txt"]
+ # Dir.children('tmp1/') # => []
+ # FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk') # => 0
+ # Dir.children('tmp1/') # => ["t.lnk"]
+ #
+ # When +src+ is the path to an existing file
+ # and +dest+ is the path to an existing directory,
+ # creates a hard link at <tt>dest/src</tt> pointing to +src+; returns zero:
#
- # :call-seq:
- # FileUtils.ln(target, link, force: nil, noop: nil, verbose: nil)
- # FileUtils.ln(target, dir, force: nil, noop: nil, verbose: nil)
- # FileUtils.ln(targets, dir, force: nil, noop: nil, verbose: nil)
+ # Dir.children('tmp2') # => ["t.dat"]
+ # Dir.children('tmp3') # => []
+ # FileUtils.ln('tmp2/t.dat', 'tmp3') # => 0
+ # Dir.children('tmp3') # => ["t.dat"]
#
- # In the first form, creates a hard link +link+ which points to +target+.
- # If +link+ already exists, raises Errno::EEXIST.
- # But if the +force+ option is set, overwrites +link+.
+ # When +src+ is an array of paths to existing files
+ # and +dest+ is the path to an existing directory,
+ # then for each path +target+ in +src+,
+ # creates a hard link at <tt>dest/target</tt> pointing to +target+;
+ # returns +src+:
#
- # FileUtils.ln 'gcc', 'cc', verbose: true
- # FileUtils.ln '/usr/bin/emacs21', '/usr/bin/emacs'
+ # Dir.children('tmp4/') # => []
+ # FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/') # => ["tmp0/t.txt", "tmp2/t.dat"]
+ # Dir.children('tmp4/') # => ["t.dat", "t.txt"]
#
- # In the second form, creates a link +dir/target+ pointing to +target+.
- # In the third form, creates several hard links in the directory +dir+,
- # pointing to each item in +targets+.
- # If +dir+ is not a directory, raises Errno::ENOTDIR.
+ # Keyword arguments:
#
- # FileUtils.cd '/sbin'
- # FileUtils.ln %w(cp mv mkdir), '/bin' # Now /sbin/cp and /bin/cp are linked.
+ # - <tt>force: true</tt> - overwrites +dest+ if it exists.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.ln('tmp0/t.txt', 'tmp1/t.lnk', verbose: true)
+ # FileUtils.ln('tmp2/t.dat', 'tmp3', verbose: true)
+ # FileUtils.ln(['tmp0/t.txt', 'tmp2/t.dat'], 'tmp4/', verbose: true)
+ #
+ # Output:
+ #
+ # ln tmp0/t.txt tmp1/t.lnk
+ # ln tmp2/t.dat tmp3
+ # ln tmp0/t.txt tmp2/t.dat tmp4/
+ #
+ # Raises an exception if +dest+ is the path to an existing file
+ # and keyword argument +force+ is not +true+.
+ #
+ # FileUtils#link is an alias for FileUtils#ln.
+ #
+ # Related: FileUtils.link_entry (has different options).
#
def ln(src, dest, force: nil, noop: nil, verbose: nil)
fu_output_message "ln#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -313,28 +532,103 @@ module FileUtils
alias link ln
module_function :link
- #
- # Hard link +src+ to +dest+. If +src+ is a directory, this method links
- # all its contents recursively. If +dest+ is a directory, links
- # +src+ to +dest/src+.
- #
- # +src+ can be a list of files.
- #
- # If +dereference_root+ is true, this method dereference tree root.
- #
- # If +remove_destination+ is true, this method removes each destination file before copy.
- #
- # FileUtils.rm_r site_ruby + '/mylib', force: true
- # FileUtils.cp_lr 'lib/', site_ruby + '/mylib'
- #
- # # Examples of linking several files to target directory.
- # FileUtils.cp_lr %w(mail.rb field.rb debug/), site_ruby + '/tmail'
- # FileUtils.cp_lr Dir.glob('*.rb'), '/home/aamine/lib/ruby', noop: true, verbose: true
- #
- # # If you want to link all contents of a directory instead of the
- # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y,
- # # use the following code.
- # FileUtils.cp_lr 'src/.', 'dest' # cp_lr('src', 'dest') makes dest/src, but this doesn't.
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # creates links +dest+ and descendents pointing to +src+ and its descendents:
+ #
+ # tree('src0')
+ # # => src0
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # File.exist?('dest0') # => false
+ # FileUtils.cp_lr('src0', 'dest0')
+ # tree('dest0')
+ # # => dest0
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ and +dest+ are both paths to directories,
+ # creates links <tt>dest/src</tt> and descendents
+ # pointing to +src+ and its descendents:
+ #
+ # tree('src1')
+ # # => src1
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.mkdir('dest1')
+ # FileUtils.cp_lr('src1', 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # `-- src1
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ is an array of paths to entries and +dest+ is the path to a directory,
+ # for each path +filepath+ in +src+, creates a link at <tt>dest/filepath</tt>
+ # pointing to that path:
+ #
+ # tree('src2')
+ # # => src2
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.mkdir('dest2')
+ # FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2')
+ # tree('dest2')
+ # # => dest2
+ # # |-- sub0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- sub1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
+ # does not dereference it.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.cp_lr('src0', 'dest0', noop: true, verbose: true)
+ # FileUtils.cp_lr('src1', 'dest1', noop: true, verbose: true)
+ # FileUtils.cp_lr(['src2/sub0', 'src2/sub1'], 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp -lr src0 dest0
+ # cp -lr src1 dest1
+ # cp -lr src2/sub0 src2/sub1 dest2
+ #
+ # Raises an exception if +dest+ is the path to an existing file or directory
+ # and keyword argument <tt>remove_destination: true</tt> is not given.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp_lr(src, dest, noop: nil, verbose: nil,
dereference_root: true, remove_destination: false)
@@ -346,27 +640,81 @@ module FileUtils
end
module_function :cp_lr
+ # Creates {symbolic links}[https://en.wikipedia.org/wiki/Symbolic_link].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to an existing file:
+ #
+ # - When +dest+ is the path to a non-existent file,
+ # creates a symbolic link at +dest+ pointing to +src+:
+ #
+ # FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.ln_s('src0.txt', 'dest0.txt')
+ # File.symlink?('dest0.txt') # => true
#
- # :call-seq:
- # FileUtils.ln_s(target, link, force: nil, noop: nil, verbose: nil)
- # FileUtils.ln_s(target, dir, force: nil, noop: nil, verbose: nil)
- # FileUtils.ln_s(targets, dir, force: nil, noop: nil, verbose: nil)
+ # - When +dest+ is the path to an existing file,
+ # creates a symbolic link at +dest+ pointing to +src+
+ # if and only if keyword argument <tt>force: true</tt> is given
+ # (raises an exception otherwise):
#
- # In the first form, creates a symbolic link +link+ which points to +target+.
- # If +link+ already exists, raises Errno::EEXIST.
- # But if the <tt>force</tt> option is set, overwrites +link+.
+ # FileUtils.touch('src1.txt')
+ # FileUtils.touch('dest1.txt')
+ # FileUtils.ln_s('src1.txt', 'dest1.txt', force: true)
+ # FileTest.symlink?('dest1.txt') # => true
#
- # FileUtils.ln_s '/usr/bin/ruby', '/usr/local/bin/ruby'
- # FileUtils.ln_s 'verylongsourcefilename.c', 'c', force: true
+ # FileUtils.ln_s('src1.txt', 'dest1.txt') # Raises Errno::EEXIST.
#
- # In the second form, creates a link +dir/target+ pointing to +target+.
- # In the third form, creates several symbolic links in the directory +dir+,
- # pointing to each item in +targets+.
- # If +dir+ is not a directory, raises Errno::ENOTDIR.
+ # If +dest+ is the path to a directory,
+ # creates a symbolic link at <tt>dest/src</tt> pointing to +src+:
#
- # FileUtils.ln_s Dir.glob('/bin/*.rb'), '/home/foo/bin'
+ # FileUtils.touch('src2.txt')
+ # FileUtils.mkdir('destdir2')
+ # FileUtils.ln_s('src2.txt', 'destdir2')
+ # File.symlink?('destdir2/src2.txt') # => true
#
- def ln_s(src, dest, force: nil, noop: nil, verbose: nil)
+ # If +src+ is an array of paths to existing files and +dest+ is a directory,
+ # for each child +child+ in +src+ creates a symbolic link <tt>dest/child</tt>
+ # pointing to +child+:
+ #
+ # FileUtils.mkdir('srcdir3')
+ # FileUtils.touch('srcdir3/src0.txt')
+ # FileUtils.touch('srcdir3/src1.txt')
+ # FileUtils.mkdir('destdir3')
+ # FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3')
+ # File.symlink?('destdir3/src0.txt') # => true
+ # File.symlink?('destdir3/src1.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - overwrites +dest+ if it exists.
+ # - <tt>relative: false</tt> - create links relative to +dest+.
+ # - <tt>noop: true</tt> - does not create links.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.ln_s('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # FileUtils.ln_s('src1.txt', 'destdir1', noop: true, verbose: true)
+ # FileUtils.ln_s('src2.txt', 'dest2.txt', force: true, noop: true, verbose: true)
+ # FileUtils.ln_s(['srcdir3/src0.txt', 'srcdir3/src1.txt'], 'destdir3', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # ln -s src0.txt dest0.txt
+ # ln -s src1.txt destdir1
+ # ln -sf src2.txt dest2.txt
+ # ln -s srcdir3/src0.txt srcdir3/src1.txt destdir3
+ #
+ # FileUtils.symlink is an alias for FileUtils.ln_s.
+ #
+ # Related: FileUtils.ln_sf.
+ #
+ def ln_s(src, dest, force: nil, relative: false, target_directory: true, noop: nil, verbose: nil)
+ if relative
+ return ln_sr(src, dest, force: force, noop: noop, verbose: verbose)
+ end
fu_output_message "ln -s#{force ? 'f' : ''} #{[src,dest].flatten.join ' '}" if verbose
return if noop
fu_each_src_dest0(src, dest) do |s,d|
@@ -379,29 +727,95 @@ module FileUtils
alias symlink ln_s
module_function :symlink
- #
- # :call-seq:
- # FileUtils.ln_sf(*args)
- #
- # Same as
- #
- # FileUtils.ln_s(*args, force: true)
+ # Like FileUtils.ln_s, but always with keyword argument <tt>force: true</tt> given.
#
def ln_sf(src, dest, noop: nil, verbose: nil)
ln_s src, dest, force: true, noop: noop, verbose: verbose
end
module_function :ln_sf
+ # Like FileUtils.ln_s, but create links relative to +dest+.
+ #
+ def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
+ options = "#{force ? 'f' : ''}#{target_directory ? '' : 'T'}"
+ dest = File.path(dest)
+ srcs = Array(src)
+ link = proc do |s, target_dir_p = true|
+ s = File.path(s)
+ if target_dir_p
+ d = File.join(destdirs = dest, File.basename(s))
+ else
+ destdirs = File.dirname(d = dest)
+ end
+ destdirs = fu_split_path(File.realpath(destdirs))
+ if fu_starting_path?(s)
+ srcdirs = fu_split_path((File.realdirpath(s) rescue File.expand_path(s)))
+ base = fu_relative_components_from(srcdirs, destdirs)
+ s = File.join(*base)
+ else
+ srcdirs = fu_clean_components(*fu_split_path(s))
+ base = fu_relative_components_from(fu_split_path(Dir.pwd), destdirs)
+ while srcdirs.first&. == ".." and base.last&.!=("..") and !fu_starting_path?(base.last)
+ srcdirs.shift
+ base.pop
+ end
+ s = File.join(*base, *srcdirs)
+ end
+ fu_output_message "ln -s#{options} #{s} #{d}" if verbose
+ next if noop
+ remove_file d, true if force
+ File.symlink s, d
+ end
+ case srcs.size
+ when 0
+ when 1
+ link[srcs[0], target_directory && File.directory?(dest)]
+ else
+ srcs.each(&link)
+ end
+ end
+ module_function :ln_sr
+
+ # Creates {hard links}[https://en.wikipedia.org/wiki/Hard_link]; returns +nil+.
#
- # Hard links a file system entry +src+ to +dest+.
- # If +src+ is a directory, this method links its contents recursively.
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Both of +src+ and +dest+ must be a path name.
- # +src+ must exist, +dest+ must not exist.
+ # If +src+ is the path to a file and +dest+ does not exist,
+ # creates a hard link at +dest+ pointing to +src+:
#
- # If +dereference_root+ is true, this method dereferences the tree root.
+ # FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.link_entry('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # If +remove_destination+ is true, this method removes each destination file before copy.
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # recursively creates hard links at +dest+ pointing to paths in +src+:
+ #
+ # FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
+ # src_file_paths = [
+ # 'src1/dir0/t0.txt',
+ # 'src1/dir0/t1.txt',
+ # 'src1/dir1/t2.txt',
+ # 'src1/dir1/t3.txt',
+ # ]
+ # FileUtils.touch(src_file_paths)
+ # File.directory?('dest1') # => true
+ # FileUtils.link_entry('src1', 'dest1')
+ # File.file?('dest1/dir0/t0.txt') # => true
+ # File.file?('dest1/dir0/t1.txt') # => true
+ # File.file?('dest1/dir1/t2.txt') # => true
+ # File.file?('dest1/dir1/t3.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: true</tt> - dereferences +src+ if it is a symbolic link.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before creating links.
+ #
+ # Raises an exception if +dest+ is the path to an existing file or directory
+ # and keyword argument <tt>remove_destination: true</tt> is not given.
+ #
+ # Related: FileUtils.ln (has different options).
#
def link_entry(src, dest, dereference_root = false, remove_destination = false)
Entry_.new(src, nil, dereference_root).traverse do |ent|
@@ -412,16 +826,59 @@ module FileUtils
end
module_function :link_entry
+ # Copies files.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ is the path to a file and +dest+ is not the path to a directory,
+ # copies +src+ to +dest+:
+ #
+ # FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.cp('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # Copies a file content +src+ to +dest+. If +dest+ is a directory,
- # copies +src+ to +dest/src+.
+ # If +src+ is the path to a file and +dest+ is the path to a directory,
+ # copies +src+ to <tt>dest/src</tt>:
#
- # If +src+ is a list of files, then +dest+ must be a directory.
+ # FileUtils.touch('src1.txt')
+ # FileUtils.mkdir('dest1')
+ # FileUtils.cp('src1.txt', 'dest1')
+ # File.file?('dest1/src1.txt') # => true
#
- # FileUtils.cp 'eval.c', 'eval.c.org'
- # FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'
- # FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6', verbose: true
- # FileUtils.cp 'symlink', 'dest' # copy content, "dest" is not a symlink
+ # If +src+ is an array of paths to files and +dest+ is the path to a directory,
+ # copies from each +src+ to +dest+:
+ #
+ # src_file_paths = ['src2.txt', 'src2.dat']
+ # FileUtils.touch(src_file_paths)
+ # FileUtils.mkdir('dest2')
+ # FileUtils.cp(src_file_paths, 'dest2')
+ # File.file?('dest2/src2.txt') # => true
+ # File.file?('dest2/src2.dat') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>noop: true</tt> - does not copy files.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.cp('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # FileUtils.cp('src1.txt', 'dest1', noop: true, verbose: true)
+ # FileUtils.cp(src_file_paths, 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp src0.txt dest0.txt
+ # cp src1.txt dest1
+ # cp src2.txt src2.dat dest2
+ #
+ # Raises an exception if +src+ is a directory.
+ #
+ # FileUtils.copy is an alias for FileUtils.cp.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp(src, dest, preserve: nil, noop: nil, verbose: nil)
fu_output_message "cp#{preserve ? ' -p' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -435,30 +892,105 @@ module FileUtils
alias copy cp
module_function :copy
- #
- # Copies +src+ to +dest+. If +src+ is a directory, this method copies
- # all its contents recursively. If +dest+ is a directory, copies
- # +src+ to +dest/src+.
- #
- # +src+ can be a list of files.
- #
- # If +dereference_root+ is true, this method dereference tree root.
- #
- # If +remove_destination+ is true, this method removes each destination file before copy.
- #
- # # Installing Ruby library "mylib" under the site_ruby
- # FileUtils.rm_r site_ruby + '/mylib', force: true
- # FileUtils.cp_r 'lib/', site_ruby + '/mylib'
- #
- # # Examples of copying several files to target directory.
- # FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail'
- # FileUtils.cp_r Dir.glob('*.rb'), '/home/foo/lib/ruby', noop: true, verbose: true
- #
- # # If you want to copy all contents of a directory instead of the
- # # directory itself, c.f. src/x -> dest/x, src/y -> dest/y,
- # # use following code.
- # FileUtils.cp_r 'src/.', 'dest' # cp_r('src', 'dest') makes dest/src,
- # # but this doesn't.
+ # Recursively copies files.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # The mode, owner, and group are retained in the copy;
+ # to change those, use FileUtils.install instead.
+ #
+ # If +src+ is the path to a file and +dest+ is not the path to a directory,
+ # copies +src+ to +dest+:
+ #
+ # FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.cp_r('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
+ #
+ # If +src+ is the path to a file and +dest+ is the path to a directory,
+ # copies +src+ to <tt>dest/src</tt>:
+ #
+ # FileUtils.touch('src1.txt')
+ # FileUtils.mkdir('dest1')
+ # FileUtils.cp_r('src1.txt', 'dest1')
+ # File.file?('dest1/src1.txt') # => true
+ #
+ # If +src+ is the path to a directory and +dest+ does not exist,
+ # recursively copies +src+ to +dest+:
+ #
+ # tree('src2')
+ # # => src2
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.exist?('dest2') # => false
+ # FileUtils.cp_r('src2', 'dest2')
+ # tree('dest2')
+ # # => dest2
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ and +dest+ are paths to directories,
+ # recursively copies +src+ to <tt>dest/src</tt>:
+ #
+ # tree('src3')
+ # # => src3
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.mkdir('dest3')
+ # FileUtils.cp_r('src3', 'dest3')
+ # tree('dest3')
+ # # => dest3
+ # # `-- src3
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ #
+ # If +src+ is an array of paths and +dest+ is a directory,
+ # recursively copies from each path in +src+ to +dest+;
+ # the paths in +src+ may point to files and/or directories.
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: false</tt> - if +src+ is a symbolic link,
+ # does not dereference it.
+ # - <tt>noop: true</tt> - does not copy files.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.cp_r('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # FileUtils.cp_r('src1.txt', 'dest1', noop: true, verbose: true)
+ # FileUtils.cp_r('src2', 'dest2', noop: true, verbose: true)
+ # FileUtils.cp_r('src3', 'dest3', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # cp -r src0.txt dest0.txt
+ # cp -r src1.txt dest1
+ # cp -r src2 dest2
+ # cp -r src3 dest3
+ #
+ # Raises an exception of +src+ is the path to a directory
+ # and +dest+ is the path to a file.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def cp_r(src, dest, preserve: nil, noop: nil, verbose: nil,
dereference_root: true, remove_destination: nil)
@@ -470,21 +1002,50 @@ module FileUtils
end
module_function :cp_r
+ # Recursively copies files from +src+ to +dest+.
+ #
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Copies a file system entry +src+ to +dest+.
- # If +src+ is a directory, this method copies its contents recursively.
- # This method preserves file types, c.f. symlink, directory...
- # (FIFO, device files and etc. are not supported yet)
+ # If +src+ is the path to a file, copies +src+ to +dest+:
#
- # Both of +src+ and +dest+ must be a path name.
- # +src+ must exist, +dest+ must not exist.
+ # FileUtils.touch('src0.txt')
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.copy_entry('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
#
- # If +preserve+ is true, this method preserves owner, group, and
- # modified time. Permissions are copied regardless +preserve+.
+ # If +src+ is a directory, recursively copies +src+ to +dest+:
#
- # If +dereference_root+ is true, this method dereference tree root.
+ # tree('src1')
+ # # => src1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.copy_entry('src1', 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
#
- # If +remove_destination+ is true, this method removes each destination file before copy.
+ # The recursive copying preserves file types for regular files,
+ # directories, and symbolic links;
+ # other file types (FIFO streams, device files, etc.) are not supported.
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference_root: true</tt> - if +src+ is a symbolic link,
+ # follows the link.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
if dereference_root
@@ -502,9 +1063,25 @@ module FileUtils
end
module_function :copy_entry
+ # Copies file from +src+ to +dest+, which should not be directories.
+ #
+ # Arguments +src+ and +dest+
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Examples:
#
- # Copies file contents of +src+ to +dest+.
- # Both of +src+ and +dest+ must be a path name.
+ # FileUtils.touch('src0.txt')
+ # FileUtils.copy_file('src0.txt', 'dest0.txt')
+ # File.file?('dest0.txt') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>dereference: false</tt> - if +src+ is a symbolic link,
+ # does not follow the link.
+ # - <tt>preserve: true</tt> - preserves file times.
+ # - <tt>remove_destination: true</tt> - removes +dest+ before copying files.
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_file(src, dest, preserve = false, dereference = true)
ent = Entry_.new(src, nil, dereference)
@@ -513,25 +1090,81 @@ module FileUtils
end
module_function :copy_file
+ # Copies \IO stream +src+ to \IO stream +dest+ via
+ # {IO.copy_stream}[rdoc-ref:IO.copy_stream].
#
- # Copies stream +src+ to +dest+.
- # +src+ must respond to #read(n) and
- # +dest+ must respond to #write(str).
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def copy_stream(src, dest)
IO.copy_stream(src, dest)
end
module_function :copy_stream
- #
- # Moves file(s) +src+ to +dest+. If +file+ and +dest+ exist on the different
- # disk partition, the file is copied then the original file is removed.
- #
- # FileUtils.mv 'badname.rb', 'goodname.rb'
- # FileUtils.mv 'stuff.rb', '/notexist/lib/ruby', force: true # no error
- #
- # FileUtils.mv %w(junk.txt dust.txt), '/home/foo/.trash/'
- # FileUtils.mv Dir.glob('test*.rb'), 'test', noop: true, verbose: true
+ # Moves entries.
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # If +src+ and +dest+ are on different file systems,
+ # first copies, then removes +src+.
+ #
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # If +src+ is the path to a single file or directory and +dest+ does not exist,
+ # moves +src+ to +dest+:
+ #
+ # tree('src0')
+ # # => src0
+ # # |-- src0.txt
+ # # `-- src1.txt
+ # File.exist?('dest0') # => false
+ # FileUtils.mv('src0', 'dest0')
+ # File.exist?('src0') # => false
+ # tree('dest0')
+ # # => dest0
+ # # |-- src0.txt
+ # # `-- src1.txt
+ #
+ # If +src+ is an array of paths to files and directories
+ # and +dest+ is the path to a directory,
+ # copies from each path in the array to +dest+:
+ #
+ # File.file?('src1.txt') # => true
+ # tree('src1')
+ # # => src1
+ # # |-- src.dat
+ # # `-- src.txt
+ # Dir.empty?('dest1') # => true
+ # FileUtils.mv(['src1.txt', 'src1'], 'dest1')
+ # tree('dest1')
+ # # => dest1
+ # # |-- src1
+ # # | |-- src.dat
+ # # | `-- src.txt
+ # # `-- src1.txt
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - if the move includes removing +src+
+ # (that is, if +src+ and +dest+ are on different file systems),
+ # ignores raised exceptions of StandardError and its descendants.
+ # - <tt>noop: true</tt> - does not move files.
+ # - <tt>secure: true</tt> - removes +src+ securely;
+ # see details at FileUtils.remove_entry_secure.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.mv('src0', 'dest0', noop: true, verbose: true)
+ # FileUtils.mv(['src1.txt', 'src1'], 'dest1', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # mv src0 dest0
+ # mv src1.txt src1 dest1
+ #
+ # FileUtils.move is an alias for FileUtils.mv.
#
def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
fu_output_message "mv#{force ? ' -f' : ''} #{[src,dest].flatten.join ' '}" if verbose
@@ -565,13 +1198,34 @@ module FileUtils
alias move mv
module_function :move
+ # Removes entries at the paths in the given +list+
+ # (a single path or an array of paths)
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # With no keyword arguments, removes files at the paths given in +list+:
+ #
+ # FileUtils.touch(['src0.txt', 'src0.dat'])
+ # FileUtils.rm(['src0.dat', 'src0.txt']) # => ["src0.dat", "src0.txt"]
+ #
+ # Keyword arguments:
+ #
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
+ # and its descendants.
+ # - <tt>noop: true</tt> - does not remove files; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.rm(['src0.dat', 'src0.txt'], noop: true, verbose: true)
#
- # Remove file(s) specified in +list+. This method cannot remove directories.
- # All StandardErrors are ignored when the :force option is set.
+ # Output:
#
- # FileUtils.rm %w( junk.txt dust.txt )
- # FileUtils.rm Dir.glob('*.so')
- # FileUtils.rm 'NotExistFile', force: true # never raises exception
+ # rm src0.dat src0.txt
+ #
+ # FileUtils.remove is an alias for FileUtils.rm.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm(list, force: nil, noop: nil, verbose: nil)
list = fu_list(list)
@@ -587,10 +1241,18 @@ module FileUtils
alias remove rm
module_function :remove
+ # Equivalent to:
+ #
+ # FileUtils.rm(list, force: true, **kwargs)
+ #
+ # Argument +list+ (a single path or an array of paths)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # See FileUtils.rm for keyword arguments.
#
- # Equivalent to
+ # FileUtils.safe_unlink is an alias for FileUtils.rm_f.
#
- # FileUtils.rm(list, force: true)
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_f(list, noop: nil, verbose: nil)
rm list, force: true, noop: noop, verbose: verbose
@@ -600,24 +1262,55 @@ module FileUtils
alias safe_unlink rm_f
module_function :safe_unlink
+ # Removes entries at the paths in the given +list+
+ # (a single path or an array of paths);
+ # returns +list+, if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # For each file path, removes the file at that path:
+ #
+ # FileUtils.touch(['src0.txt', 'src0.dat'])
+ # FileUtils.rm_r(['src0.dat', 'src0.txt'])
+ # File.exist?('src0.txt') # => false
+ # File.exist?('src0.dat') # => false
#
- # remove files +list+[0] +list+[1]... If +list+[n] is a directory,
- # removes its all contents recursively. This method ignores
- # StandardError when :force option is set.
+ # For each directory path, recursively removes files and directories:
#
- # FileUtils.rm_r Dir.glob('/tmp/*')
- # FileUtils.rm_r 'some_dir', force: true
+ # tree('src1')
+ # # => src1
+ # # |-- dir0
+ # # | |-- src0.txt
+ # # | `-- src1.txt
+ # # `-- dir1
+ # # |-- src2.txt
+ # # `-- src3.txt
+ # FileUtils.rm_r('src1')
+ # File.exist?('src1') # => false
#
- # WARNING: This method causes local vulnerability
- # if one of parent directories or removing directory tree are world
- # writable (including /tmp, whose permission is 1777), and the current
- # process has strong privilege such as Unix super user (root), and the
- # system has symbolic link. For secure removing, read the documentation
- # of remove_entry_secure carefully, and set :secure option to true.
- # Default is <tt>secure: false</tt>.
+ # Keyword arguments:
#
- # NOTE: This method calls remove_entry_secure if :secure option is set.
- # See also remove_entry_secure.
+ # - <tt>force: true</tt> - ignores raised exceptions of StandardError
+ # and its descendants.
+ # - <tt>noop: true</tt> - does not remove entries; returns +nil+.
+ # - <tt>secure: true</tt> - removes +src+ securely;
+ # see details at FileUtils.remove_entry_secure.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.rm_r(['src0.dat', 'src0.txt'], noop: true, verbose: true)
+ # FileUtils.rm_r('src1', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # rm -r src0.dat src0.txt
+ # rm -r src1
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_r(list, force: nil, noop: nil, verbose: nil, secure: nil)
list = fu_list(list)
@@ -633,13 +1326,22 @@ module FileUtils
end
module_function :rm_r
+ # Equivalent to:
#
- # Equivalent to
+ # FileUtils.rm_r(list, force: true, **kwargs)
#
- # FileUtils.rm_r(list, force: true)
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # WARNING: This method causes local vulnerability.
- # Read the documentation of rm_r first.
+ # May cause a local vulnerability if not called with keyword argument
+ # <tt>secure: true</tt>;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
+ #
+ # See FileUtils.rm_r for keyword arguments.
+ #
+ # FileUtils.rmtree is an alias for FileUtils.rm_rf.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def rm_rf(list, noop: nil, verbose: nil, secure: nil)
rm_r list, force: true, noop: noop, verbose: verbose, secure: secure
@@ -649,37 +1351,20 @@ module FileUtils
alias rmtree rm_rf
module_function :rmtree
+ # Securely removes the entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
#
- # This method removes a file system entry +path+. +path+ shall be a
- # regular file, a directory, or something. If +path+ is a directory,
- # remove it recursively. This method is required to avoid TOCTTOU
- # (time-of-check-to-time-of-use) local security vulnerability of rm_r.
- # #rm_r causes security hole when:
- #
- # * Parent directory is world writable (including /tmp).
- # * Removing directory tree includes world writable directory.
- # * The system has symbolic link.
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # To avoid this security hole, this method applies special preprocess.
- # If +path+ is a directory, this method chown(2) and chmod(2) all
- # removing directories. This requires the current process is the
- # owner of the removing whole directory tree, or is the super user (root).
+ # Avoids a local vulnerability that can exist in certain circumstances;
+ # see {Avoiding the TOCTTOU Vulnerability}[rdoc-ref:FileUtils@Avoiding+the+TOCTTOU+Vulnerability].
#
- # WARNING: You must ensure that *ALL* parent directories cannot be
- # moved by other untrusted users. For example, parent directories
- # should not be owned by untrusted users, and should not be world
- # writable except when the sticky bit set.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
#
- # WARNING: Only the owner of the removing directory tree, or Unix super
- # user (root) should invoke this method. Otherwise this method does not
- # work.
- #
- # For details of this security vulnerability, see Perl's case:
- #
- # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0448
- # * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0452
- #
- # For fileutils.rb, this vulnerability is reported in [ruby-dev:26100].
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_entry_secure(path, force = false)
unless fu_have_symlink?
@@ -767,12 +1452,17 @@ module FileUtils
end
private_module_function :fu_stat_identical_entry?
+ # Removes the entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
#
- # This method removes a file system entry +path+.
- # +path+ might be a regular file, a directory, or something.
- # If +path+ is a directory, remove it recursively.
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # See also remove_entry_secure.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: FileUtils.remove_entry_secure.
#
def remove_entry(path, force = false)
Entry_.new(path).postorder_traverse do |ent|
@@ -787,9 +1477,16 @@ module FileUtils
end
module_function :remove_entry
+ # Removes the file entry given by +path+,
+ # which should be the entry for a regular file or a symbolic link.
+ #
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Removes a file +path+.
- # This method ignores StandardError if +force+ is true.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_file(path, force = false)
Entry_.new(path).remove_file
@@ -798,20 +1495,32 @@ module FileUtils
end
module_function :remove_file
+ # Recursively removes the directory entry given by +path+,
+ # which should be the entry for a regular file, a symbolic link,
+ # or a directory.
+ #
+ # Argument +path+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Removes a directory +dir+ and its contents recursively.
- # This method ignores StandardError if +force+ is true.
+ # Optional argument +force+ specifies whether to ignore
+ # raised exceptions of StandardError and its descendants.
+ #
+ # Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
#
def remove_dir(path, force = false)
remove_entry path, force # FIXME?? check if it is a directory
end
module_function :remove_dir
+ # Returns +true+ if the contents of files +a+ and +b+ are identical,
+ # +false+ otherwise.
+ #
+ # Arguments +a+ and +b+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Returns true if the contents of a file +a+ and a file +b+ are identical.
+ # FileUtils.identical? and FileUtils.cmp are aliases for FileUtils.compare_file.
#
- # FileUtils.compare_file('somefile', 'somefile') #=> true
- # FileUtils.compare_file('/dev/null', '/dev/urandom') #=> false
+ # Related: FileUtils.compare_stream.
#
def compare_file(a, b)
return false unless File.size(a) == File.size(b)
@@ -828,19 +1537,19 @@ module FileUtils
module_function :identical?
module_function :cmp
+ # Returns +true+ if the contents of streams +a+ and +b+ are identical,
+ # +false+ otherwise.
#
- # Returns true if the contents of a stream +a+ and +b+ are identical.
+ # Arguments +a+ and +b+
+ # should be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Related: FileUtils.compare_file.
#
def compare_stream(a, b)
bsize = fu_stream_blksize(a, b)
- if RUBY_VERSION > "2.4"
- sa = String.new(capacity: bsize)
- sb = String.new(capacity: bsize)
- else
- sa = String.new
- sb = String.new
- end
+ sa = String.new(capacity: bsize)
+ sb = String.new(capacity: bsize)
begin
a.read(bsize, sa)
@@ -851,13 +1560,69 @@ module FileUtils
end
module_function :compare_stream
+ # Copies a file entry.
+ # See {install(1)}[https://man7.org/linux/man-pages/man1/install.1.html].
+ #
+ # Arguments +src+ (a single path or an array of paths)
+ # and +dest+ (a single path)
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments];
+ #
+ # If the entry at +dest+ does not exist, copies from +src+ to +dest+:
+ #
+ # File.read('src0.txt') # => "aaa\n"
+ # File.exist?('dest0.txt') # => false
+ # FileUtils.install('src0.txt', 'dest0.txt')
+ # File.read('dest0.txt') # => "aaa\n"
+ #
+ # If +dest+ is a file entry, copies from +src+ to +dest+, overwriting:
+ #
+ # File.read('src1.txt') # => "aaa\n"
+ # File.read('dest1.txt') # => "bbb\n"
+ # FileUtils.install('src1.txt', 'dest1.txt')
+ # File.read('dest1.txt') # => "aaa\n"
#
- # If +src+ is not same as +dest+, copies it and changes the permission
- # mode to +mode+. If +dest+ is a directory, destination is +dest+/+src+.
- # This method removes destination before copy.
+ # If +dest+ is a directory entry, copies from +src+ to <tt>dest/src</tt>,
+ # overwriting if necessary:
#
- # FileUtils.install 'ruby', '/usr/local/bin/ruby', mode: 0755, verbose: true
- # FileUtils.install 'lib.rb', '/usr/local/lib/ruby/site_ruby', verbose: true
+ # File.read('src2.txt') # => "aaa\n"
+ # File.read('dest2/src2.txt') # => "bbb\n"
+ # FileUtils.install('src2.txt', 'dest2')
+ # File.read('dest2/src2.txt') # => "aaa\n"
+ #
+ # If +src+ is an array of paths and +dest+ points to a directory,
+ # copies each path +path+ in +src+ to <tt>dest/path</tt>:
+ #
+ # File.file?('src3.txt') # => true
+ # File.file?('src3.dat') # => true
+ # FileUtils.mkdir('dest3')
+ # FileUtils.install(['src3.txt', 'src3.dat'], 'dest3')
+ # File.file?('dest3/src3.txt') # => true
+ # File.file?('dest3/src3.dat') # => true
+ #
+ # Keyword arguments:
+ #
+ # - <tt>group: <i>group</i></tt> - changes the group if not +nil+,
+ # using {File.chown}[rdoc-ref:File.chown].
+ # - <tt>mode: <i>permissions</i></tt> - changes the permissions.
+ # using {File.chmod}[rdoc-ref:File.chmod].
+ # - <tt>noop: true</tt> - does not copy entries; returns +nil+.
+ # - <tt>owner: <i>owner</i></tt> - changes the owner if not +nil+,
+ # using {File.chown}[rdoc-ref:File.chown].
+ # - <tt>preserve: true</tt> - preserve timestamps
+ # using {File.utime}[rdoc-ref:File.utime].
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.install('src0.txt', 'dest0.txt', noop: true, verbose: true)
+ # FileUtils.install('src1.txt', 'dest1.txt', noop: true, verbose: true)
+ # FileUtils.install('src2.txt', 'dest2', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # install -c src0.txt dest0.txt
+ # install -c src1.txt dest1.txt
+ # install -c src2.txt dest2
+ #
+ # Related: {methods for copying}[rdoc-ref:FileUtils@Copying].
#
def install(src, dest, mode: nil, owner: nil, group: nil, preserve: nil,
noop: nil, verbose: nil)
@@ -917,11 +1682,8 @@ module FileUtils
private_module_function :apply_mask
def symbolic_modes_to_i(mode_sym, path) #:nodoc:
- mode = if File::Stat === path
- path.mode
- else
- File.stat(path).mode
- end
+ path = File.stat(path) unless File::Stat === path
+ mode = path.mode
mode_sym.split(/,/).inject(mode & 07777) do |current_mode, clause|
target, *actions = clause.split(/([=+-])/)
raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty?
@@ -938,7 +1700,7 @@ module FileUtils
when "x"
mask | 0111
when "X"
- if FileTest.directory? path
+ if path.directory?
mask | 0111
else
mask
@@ -978,37 +1740,78 @@ module FileUtils
end
private_module_function :mode_to_s
+ # Changes permissions on the entries at the paths given in +list+
+ # (a single path or an array of paths)
+ # to the permissions given by +mode+;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
+ #
+ # - Modifies each entry that is a regular file using
+ # {File.chmod}[rdoc-ref:File.chmod].
+ # - Modifies each entry that is a symbolic link using
+ # {File.lchmod}[rdoc-ref:File.lchmod].
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Argument +mode+ may be either an integer or a string:
+ #
+ # - \Integer +mode+: represents the permission bits to be set:
+ #
+ # FileUtils.chmod(0755, 'src0.txt')
+ # FileUtils.chmod(0644, ['src0.txt', 'src0.dat'])
+ #
+ # - \String +mode+: represents the permissions to be set:
+ #
+ # The string is of the form <tt>[targets][[operator][perms[,perms]]</tt>, where:
+ #
+ # - +targets+ may be any combination of these letters:
+ #
+ # - <tt>'u'</tt>: permissions apply to the file's owner.
+ # - <tt>'g'</tt>: permissions apply to users in the file's group.
+ # - <tt>'o'</tt>: permissions apply to other users not in the file's group.
+ # - <tt>'a'</tt> (the default): permissions apply to all users.
+ #
+ # - +operator+ may be one of these letters:
+ #
+ # - <tt>'+'</tt>: adds permissions.
+ # - <tt>'-'</tt>: removes permissions.
+ # - <tt>'='</tt>: sets (replaces) permissions.
+ #
+ # - +perms+ (may be repeated, with separating commas)
+ # may be any combination of these letters:
+ #
+ # - <tt>'r'</tt>: Read.
+ # - <tt>'w'</tt>: Write.
+ # - <tt>'x'</tt>: Execute (search, for a directory).
+ # - <tt>'X'</tt>: Search (for a directories only;
+ # must be used with <tt>'+'</tt>)
+ # - <tt>'s'</tt>: Uid or gid.
+ # - <tt>'t'</tt>: Sticky bit.
+ #
+ # Examples:
+ #
+ # FileUtils.chmod('u=wrx,go=rx', 'src1.txt')
+ # FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby')
+ #
+ # Keyword arguments:
+ #
+ # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.chmod(0755, 'src0.txt', noop: true, verbose: true)
+ # FileUtils.chmod(0644, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # FileUtils.chmod('u=wrx,go=rx', 'src1.txt', noop: true, verbose: true)
+ # FileUtils.chmod('u=wrx,go=rx', '/usr/bin/ruby', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # chmod 755 src0.txt
+ # chmod 644 src0.txt src0.dat
+ # chmod u=wrx,go=rx src1.txt
+ # chmod u=wrx,go=rx /usr/bin/ruby
+ #
+ # Related: FileUtils.chmod_R.
#
- # Changes permission bits on the named files (in +list+) to the bit pattern
- # represented by +mode+.
- #
- # +mode+ is the symbolic and absolute mode can be used.
- #
- # Absolute mode is
- # FileUtils.chmod 0755, 'somecommand'
- # FileUtils.chmod 0644, %w(my.rb your.rb his.rb her.rb)
- # FileUtils.chmod 0755, '/usr/bin/ruby', verbose: true
- #
- # Symbolic mode is
- # FileUtils.chmod "u=wrx,go=rx", 'somecommand'
- # FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb)
- # FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', verbose: true
- #
- # "a" :: is user, group, other mask.
- # "u" :: is user's mask.
- # "g" :: is group's mask.
- # "o" :: is other's mask.
- # "w" :: is write permission.
- # "r" :: is read permission.
- # "x" :: is execute permission.
- # "X" ::
- # is execute permission for directories only, must be used in conjunction with "+"
- # "s" :: is uid, gid.
- # "t" :: is sticky bit.
- # "+" :: is added to a class given the specified mode.
- # "-" :: Is removed from a given class given mode.
- # "=" :: Is the exact nature of the class will be given a specified mode.
-
def chmod(mode, list, noop: nil, verbose: nil)
list = fu_list(list)
fu_output_message sprintf('chmod %s %s', mode_to_s(mode), list.join(' ')) if verbose
@@ -1019,12 +1822,7 @@ module FileUtils
end
module_function :chmod
- #
- # Changes permission bits on the named files (in +list+)
- # to the bit pattern represented by +mode+.
- #
- # FileUtils.chmod_R 0700, "/tmp/app.#{$$}"
- # FileUtils.chmod_R "u=wrx", "/tmp/app.#{$$}"
+ # Like FileUtils.chmod, but changes permissions recursively.
#
def chmod_R(mode, list, noop: nil, verbose: nil, force: nil)
list = fu_list(list)
@@ -1044,15 +1842,68 @@ module FileUtils
end
module_function :chmod_R
+ # Changes the owner and group on the entries at the paths given in +list+
+ # (a single path or an array of paths)
+ # to the given +user+ and +group+;
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise:
+ #
+ # - Modifies each entry that is a regular file using
+ # {File.chown}[rdoc-ref:File.chown].
+ # - Modifies each entry that is a symbolic link using
+ # {File.lchown}[rdoc-ref:File.lchown].
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
#
- # Changes owner and group on the named files (in +list+)
- # to the user +user+ and the group +group+. +user+ and +group+
- # may be an ID (Integer/String) or a name (String).
- # If +user+ or +group+ is nil, this method does not change
- # the attribute.
+ # User and group:
#
- # FileUtils.chown 'root', 'staff', '/usr/local/bin/ruby'
- # FileUtils.chown nil, 'bin', Dir.glob('/usr/bin/*'), verbose: true
+ # - Argument +user+ may be a user name or a user id;
+ # if +nil+ or +-1+, the user is not changed.
+ # - Argument +group+ may be a group name or a group id;
+ # if +nil+ or +-1+, the group is not changed.
+ # - The user must be a member of the group.
+ #
+ # Examples:
+ #
+ # # One path.
+ # # User and group as string names.
+ # File.stat('src0.txt').uid # => 1004
+ # File.stat('src0.txt').gid # => 1004
+ # FileUtils.chown('user2', 'group1', 'src0.txt')
+ # File.stat('src0.txt').uid # => 1006
+ # File.stat('src0.txt').gid # => 1005
+ #
+ # # User and group as uid and gid.
+ # FileUtils.chown(1004, 1004, 'src0.txt')
+ # File.stat('src0.txt').uid # => 1004
+ # File.stat('src0.txt').gid # => 1004
+ #
+ # # Array of paths.
+ # FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'])
+ #
+ # # Directory (not recursive).
+ # FileUtils.chown('user2', 'group1', '.')
+ #
+ # Keyword arguments:
+ #
+ # - <tt>noop: true</tt> - does not change permissions; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.chown('user2', 'group1', 'src0.txt', noop: true, verbose: true)
+ # FileUtils.chown(1004, 1004, 'src0.txt', noop: true, verbose: true)
+ # FileUtils.chown(1006, 1005, ['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # FileUtils.chown('user2', 'group1', path, noop: true, verbose: true)
+ # FileUtils.chown('user2', 'group1', '.', noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # chown user2:group1 src0.txt
+ # chown 1004:1004 src0.txt
+ # chown 1006:1005 src0.txt src0.dat
+ # chown user2:group1 src0.txt
+ # chown user2:group1 .
+ #
+ # Related: FileUtils.chown_R.
#
def chown(user, group, list, noop: nil, verbose: nil)
list = fu_list(list)
@@ -1068,15 +1919,7 @@ module FileUtils
end
module_function :chown
- #
- # Changes owner and group on the named files (in +list+)
- # to the user +user+ and the group +group+ recursively.
- # +user+ and +group+ may be an ID (Integer/String) or
- # a name (String). If +user+ or +group+ is nil, this
- # method does not change the attribute.
- #
- # FileUtils.chown_R 'www', 'www', '/var/www/htdocs'
- # FileUtils.chown_R 'cvs', 'cvs', '/var/cvs', verbose: true
+ # Like FileUtils.chown, but changes owner and group recursively.
#
def chown_R(user, group, list, noop: nil, verbose: nil, force: nil)
list = fu_list(list)
@@ -1127,12 +1970,50 @@ module FileUtils
end
private_module_function :fu_get_gid
+ # Updates modification times (mtime) and access times (atime)
+ # of the entries given by the paths in +list+
+ # (a single path or an array of paths);
+ # returns +list+ if it is an array, <tt>[list]</tt> otherwise.
+ #
+ # By default, creates an empty file for any path to a non-existent entry;
+ # use keyword argument +nocreate+ to raise an exception instead.
+ #
+ # Argument +list+ or its elements
+ # should be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].
+ #
+ # Examples:
+ #
+ # # Single path.
+ # f = File.new('src0.txt') # Existing file.
+ # f.atime # => 2022-06-10 11:11:21.200277 -0700
+ # f.mtime # => 2022-06-10 11:11:21.200277 -0700
+ # FileUtils.touch('src0.txt')
+ # f = File.new('src0.txt')
+ # f.atime # => 2022-06-11 08:28:09.8185343 -0700
+ # f.mtime # => 2022-06-11 08:28:09.8185343 -0700
#
- # Updates modification time (mtime) and access time (atime) of file(s) in
- # +list+. Files are created if they don't exist.
+ # # Array of paths.
+ # FileUtils.touch(['src0.txt', 'src0.dat'])
#
- # FileUtils.touch 'timestamp'
- # FileUtils.touch Dir.glob('*.c'); system 'make'
+ # Keyword arguments:
+ #
+ # - <tt>mtime: <i>time</i></tt> - sets the entry's mtime to the given time,
+ # instead of the current time.
+ # - <tt>nocreate: true</tt> - raises an exception if the entry does not exist.
+ # - <tt>noop: true</tt> - does not touch entries; returns +nil+.
+ # - <tt>verbose: true</tt> - prints an equivalent command:
+ #
+ # FileUtils.touch('src0.txt', noop: true, verbose: true)
+ # FileUtils.touch(['src0.txt', 'src0.dat'], noop: true, verbose: true)
+ # FileUtils.touch(path, noop: true, verbose: true)
+ #
+ # Output:
+ #
+ # touch src0.txt
+ # touch src0.txt src0.dat
+ # touch src0.txt
+ #
+ # Related: FileUtils.uptodate?.
#
def touch(list, noop: nil, verbose: nil, mtime: nil, nocreate: nil)
list = fu_list(list)
@@ -1290,14 +2171,9 @@ module FileUtils
def entries
opts = {}
- opts[:encoding] = ::Encoding::UTF_8 if fu_windows?
+ opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
- files = if Dir.respond_to?(:children)
- Dir.children(path, **opts)
- else
- Dir.entries(path(), **opts)
- .reject {|n| n == '.' or n == '..' }
- end
+ files = Dir.children(path, **opts)
untaint = RUBY_VERSION < '2.7'
files.map {|n| Entry_.new(prefix(), join(rel(), untaint ? n.untaint : n)) }
@@ -1345,6 +2221,7 @@ module FileUtils
else
File.chmod mode, path()
end
+ rescue Errno::EOPNOTSUPP
end
def chown(uid, gid)
@@ -1439,7 +2316,7 @@ module FileUtils
if st.symlink?
begin
File.lchmod mode, path
- rescue NotImplementedError
+ rescue NotImplementedError, Errno::EOPNOTSUPP
end
else
File.chmod mode, path
@@ -1498,13 +2375,21 @@ module FileUtils
def postorder_traverse
if directory?
- entries().each do |ent|
+ begin
+ children = entries()
+ rescue Errno::EACCES
+ # Failed to get the list of children.
+ # Assuming there is no children, try to process the parent directory.
+ yield self
+ return
+ end
+
+ children.each do |ent|
ent.postorder_traverse do |e|
yield e
end
end
end
- ensure
yield self
end
@@ -1559,7 +2444,15 @@ module FileUtils
def join(dir, base)
return File.path(dir) if not base or base == '.'
return File.path(base) if not dir or dir == '.'
- File.join(dir, base)
+ begin
+ File.join(dir, base)
+ rescue EncodingError
+ if fu_windows?
+ File.join(dir.encode(::Encoding::UTF_8), base.encode(::Encoding::UTF_8))
+ else
+ raise
+ end
+ end
end
if File::ALT_SEPARATOR
@@ -1590,15 +2483,15 @@ module FileUtils
end
private_module_function :fu_each_src_dest
- def fu_each_src_dest0(src, dest) #:nodoc:
+ def fu_each_src_dest0(src, dest, target_directory = true) #:nodoc:
if tmp = Array.try_convert(src)
tmp.each do |s|
s = File.path(s)
- yield s, File.join(dest, File.basename(s))
+ yield s, (target_directory ? File.join(dest, File.basename(s)) : dest)
end
else
src = File.path(src)
- if File.directory?(dest)
+ if target_directory and File.directory?(dest)
yield src, File.join(dest, File.basename(src))
else
yield src, File.path(dest)
@@ -1614,7 +2507,7 @@ module FileUtils
def fu_output_message(msg) #:nodoc:
output = @fileutils_output if defined?(@fileutils_output)
- output ||= $stderr
+ output ||= $stdout
if defined?(@fileutils_label)
msg = @fileutils_label + msg
end
@@ -1622,6 +2515,56 @@ module FileUtils
end
private_module_function :fu_output_message
+ def fu_split_path(path)
+ path = File.path(path)
+ list = []
+ until (parent, base = File.split(path); parent == path or parent == ".")
+ list << base
+ path = parent
+ end
+ list << path
+ list.reverse!
+ end
+ private_module_function :fu_split_path
+
+ def fu_relative_components_from(target, base) #:nodoc:
+ i = 0
+ while target[i]&.== base[i]
+ i += 1
+ end
+ Array.new(base.size-i, '..').concat(target[i..-1])
+ end
+ private_module_function :fu_relative_components_from
+
+ def fu_clean_components(*comp)
+ comp.shift while comp.first == "."
+ return comp if comp.empty?
+ clean = [comp.shift]
+ path = File.join(*clean, "") # ending with File::SEPARATOR
+ while c = comp.shift
+ if c == ".." and clean.last != ".." and !(fu_have_symlink? && File.symlink?(path))
+ clean.pop
+ path.chomp!(%r((?<=\A|/)[^/]+/\z), "")
+ else
+ clean << c
+ path << c << "/"
+ end
+ end
+ clean
+ end
+ private_module_function :fu_clean_components
+
+ if fu_windows?
+ def fu_starting_path?(path)
+ path&.start_with?(%r(\w:|/))
+ end
+ else
+ def fu_starting_path?(path)
+ path&.start_with?("/")
+ end
+ end
+ private_module_function :fu_starting_path?
+
# This hash table holds command options.
OPT_TABLE = {} #:nodoc: internal use only
(private_instance_methods & methods(false)).inject(OPT_TABLE) {|tbl, name|
@@ -1631,50 +2574,49 @@ module FileUtils
public
+ # Returns an array of the string names of \FileUtils methods
+ # that accept one or more keyword arguments:
#
- # Returns an Array of names of high-level methods that accept any keyword
- # arguments.
- #
- # p FileUtils.commands #=> ["chmod", "cp", "cp_r", "install", ...]
+ # FileUtils.commands.sort.take(3) # => ["cd", "chdir", "chmod"]
#
def self.commands
OPT_TABLE.keys
end
+ # Returns an array of the string keyword names:
#
- # Returns an Array of option names.
- #
- # p FileUtils.options #=> ["noop", "force", "verbose", "preserve", "mode"]
+ # FileUtils.options.take(3) # => ["noop", "verbose", "force"]
#
def self.options
OPT_TABLE.values.flatten.uniq.map {|sym| sym.to_s }
end
+ # Returns +true+ if method +mid+ accepts the given option +opt+, +false+ otherwise;
+ # the arguments may be strings or symbols:
#
- # Returns true if the method +mid+ have an option +opt+.
- #
- # p FileUtils.have_option?(:cp, :noop) #=> true
- # p FileUtils.have_option?(:rm, :force) #=> true
- # p FileUtils.have_option?(:rm, :preserve) #=> false
+ # FileUtils.have_option?(:chmod, :noop) # => true
+ # FileUtils.have_option?('chmod', 'secure') # => false
#
def self.have_option?(mid, opt)
li = OPT_TABLE[mid.to_s] or raise ArgumentError, "no such method: #{mid}"
li.include?(opt)
end
+ # Returns an array of the string keyword name for method +mid+;
+ # the argument may be a string or a symbol:
#
- # Returns an Array of option names of the method +mid+.
- #
- # p FileUtils.options_of(:rm) #=> ["noop", "verbose", "force"]
+ # FileUtils.options_of(:rm) # => ["force", "noop", "verbose"]
+ # FileUtils.options_of('mv') # => ["force", "noop", "verbose", "secure"]
#
def self.options_of(mid)
OPT_TABLE[mid.to_s].map {|sym| sym.to_s }
end
+ # Returns an array of the string method names of the methods
+ # that accept the given keyword option +opt+;
+ # the argument must be a symbol:
#
- # Returns an Array of methods names which have the option +opt+.
- #
- # p FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"]
+ # FileUtils.collect_method(:preserve) # => ["cp", "copy", "cp_r", "install"]
#
def self.collect_method(opt)
OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) }
diff --git a/lib/find.gemspec b/lib/find.gemspec
new file mode 100644
index 0000000000..3f0aadcdae
--- /dev/null
+++ b/lib/find.gemspec
@@ -0,0 +1,24 @@
+Gem::Specification.new do |spec|
+ spec.name = "find"
+ spec.version = "0.1.1"
+ spec.authors = ['Kazuki Tsujimoto']
+ spec.email = ['kazuki@callcc.net']
+
+ spec.summary = %q{This module supports top-down traversal of a set of file paths.}
+ spec.description = %q{This module supports top-down traversal of a set of file paths.}
+ spec.homepage = "https://github.com/ruby/find"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/find.rb b/lib/find.rb
index 3f54cf6b93..9bee99c66d 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -49,14 +49,14 @@ module Find
yield file.dup
begin
s = File.lstat(file)
- rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG, Errno::EINVAL
raise unless ignore_error
next
end
if s.directory? then
begin
fs = Dir.children(file, encoding: enc)
- rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG, Errno::EINVAL
raise unless ignore_error
next
end
diff --git a/lib/forwardable.rb b/lib/forwardable.rb
index 4cfade470a..71b4e6adad 100644
--- a/lib/forwardable.rb
+++ b/lib/forwardable.rb
@@ -76,7 +76,7 @@
# def_delegators :@q, :clear, :first, :push, :shift, :size
# end
#
-# q = Queue.new
+# q = Thread::Queue.new
# q.enq 1, 2, 3, 4, 5
# q.push 6
#
@@ -110,7 +110,12 @@
#
module Forwardable
require 'forwardable/impl'
- require "forwardable/version"
+
+ # Version of +forwardable.rb+
+ VERSION = "1.3.3"
+ VERSION.freeze
+ FORWARDABLE_VERSION = VERSION
+ FORWARDABLE_VERSION.freeze
@debug = nil
class << self
@@ -186,7 +191,7 @@ module Forwardable
# If it's not a class or module, it's an instance
mod = Module === self ? self : singleton_class
ret = mod.module_eval(&gen)
- mod.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
+ mod.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
ret
end
@@ -306,7 +311,7 @@ module SingleForwardable
gen = Forwardable._delegator_method(self, accessor, method, ali)
ret = instance_eval(&gen)
- singleton_class.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
+ singleton_class.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
ret
end
diff --git a/lib/forwardable/forwardable.gemspec b/lib/forwardable/forwardable.gemspec
index 2a3e637e26..9ad59c5f8a 100644
--- a/lib/forwardable/forwardable.gemspec
+++ b/lib/forwardable/forwardable.gemspec
@@ -1,23 +1,26 @@
-begin
- require_relative "lib/forwardable/version"
-rescue LoadError
- # for Ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "forwardable"
- spec.version = Forwardable::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Keiju ISHITSUKA"]
spec.email = ["keiju@ruby-lang.org"]
spec.summary = %q{Provides delegation of specified methods to a designated object.}
spec.description = %q{Provides delegation of specified methods to a designated object.}
spec.homepage = "https://github.com/ruby/forwardable"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = ["forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb", "lib/forwardable/version.rb"]
+ spec.required_ruby_version = '>= 2.4.0'
+ spec.files = ["forwardable.gemspec", "lib/forwardable.rb", "lib/forwardable/impl.rb"]
spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.executables = []
spec.require_paths = ["lib"]
end
diff --git a/lib/forwardable/impl.rb b/lib/forwardable/impl.rb
index 58a9dfb69c..0322c136db 100644
--- a/lib/forwardable/impl.rb
+++ b/lib/forwardable/impl.rb
@@ -1,5 +1,6 @@
-# :stopdoc:
module Forwardable
+ # :stopdoc:
+
def self._valid_method?(method)
catch {|tag|
eval("BEGIN{throw tag}; ().#{method}", binding, __FILE__, __LINE__)
diff --git a/lib/forwardable/version.rb b/lib/forwardable/version.rb
deleted file mode 100644
index 8f3e1f510e..0000000000
--- a/lib/forwardable/version.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module Forwardable
- # Version of +forwardable.rb+
- VERSION = "1.3.1"
- FORWARDABLE_VERSION = VERSION
-end
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb
index ff7674f1cb..5ae0e1497c 100644
--- a/lib/getoptlong.rb
+++ b/lib/getoptlong.rb
@@ -6,85 +6,370 @@
#
# You may redistribute and/or modify this library under the same license
# terms as Ruby.
+
+# \Class \GetoptLong provides parsing both for options
+# and for regular arguments.
#
-# See GetoptLong for documentation.
+# Using \GetoptLong, you can define options for your program.
+# The program can then capture and respond to whatever options
+# are included in the command that executes the program.
#
-# Additional documents and the latest version of `getoptlong.rb' can be
-# found at http://www.sra.co.jp/people/m-kasahr/ruby/getoptlong/
-
-# The GetoptLong class allows you to parse command line options similarly to
-# the GNU getopt_long() C library call. Note, however, that GetoptLong is a
-# pure Ruby implementation.
+# A simple example: file <tt>simple.rb</tt>:
+#
+# :include: ../sample/getoptlong/simple.rb
+#
+# If you are somewhat familiar with options,
+# you may want to skip to this
+# {full example}[#class-GetoptLong-label-Full+Example].
+#
+# == Options
+#
+# A \GetoptLong option has:
+#
+# - A string <em>option name</em>.
+# - Zero or more string <em>aliases</em> for the name.
+# - An <em>option type</em>.
+#
+# Options may be defined by calling singleton method GetoptLong.new,
+# which returns a new \GetoptLong object.
+# Options may then be processed by calling other methods
+# such as GetoptLong#each.
+#
+# === Option Name and Aliases
+#
+# In the array that defines an option,
+# the first element is the string option name.
+# Often the name takes the 'long' form, beginning with two hyphens.
+#
+# The option name may have any number of aliases,
+# which are defined by additional string elements.
+#
+# The name and each alias must be of one of two forms:
+#
+# - Two hyphens, followed by one or more letters.
+# - One hyphen, followed by a single letter.
+#
+# File <tt>aliases.rb</tt>:
+#
+# :include: ../sample/getoptlong/aliases.rb
+#
+# An option may be cited by its name,
+# or by any of its aliases;
+# the parsed option always reports the name, not an alias:
+#
+# $ ruby aliases.rb -a -p --xxx --aaa -x
+#
+# Output:
+#
+# ["--xxx", ""]
+# ["--xxx", ""]
+# ["--xxx", ""]
+# ["--xxx", ""]
+# ["--xxx", ""]
+#
+#
+# An option may also be cited by an abbreviation of its name or any alias,
+# as long as that abbreviation is unique among the options.
+#
+# File <tt>abbrev.rb</tt>:
+#
+# :include: ../sample/getoptlong/abbrev.rb
+#
+# Command line:
+#
+# $ ruby abbrev.rb --xxx --xx --xyz --xy
+#
+# Output:
+#
+# ["--xxx", ""]
+# ["--xxx", ""]
+# ["--xyz", ""]
+# ["--xyz", ""]
+#
+# This command line raises GetoptLong::AmbiguousOption:
+#
+# $ ruby abbrev.rb --x
+#
+# === Repetition
+#
+# An option may be cited more than once:
+#
+# $ ruby abbrev.rb --xxx --xyz --xxx --xyz
+#
+# Output:
+#
+# ["--xxx", ""]
+# ["--xyz", ""]
+# ["--xxx", ""]
+# ["--xyz", ""]
+#
+# === Treating Remaining Options as Arguments
+#
+# A option-like token that appears
+# anywhere after the token <tt>--</tt> is treated as an ordinary argument,
+# and is not processed as an option:
+#
+# $ ruby abbrev.rb --xxx --xyz -- --xxx --xyz
+#
+# Output:
+#
+# ["--xxx", ""]
+# ["--xyz", ""]
+#
+# === Option Types
+#
+# Each option definition includes an option type,
+# which controls whether the option takes an argument.
+#
+# File <tt>types.rb</tt>:
+#
+# :include: ../sample/getoptlong/types.rb
+#
+# Note that an option type has to do with the <em>option argument</em>
+# (whether it is required, optional, or forbidden),
+# not with whether the option itself is required.
+#
+# ==== Option with Required Argument
+#
+# An option of type <tt>GetoptLong::REQUIRED_ARGUMENT</tt>
+# must be followed by an argument, which is associated with that option:
+#
+# $ ruby types.rb --xxx foo
+#
+# Output:
+#
+# ["--xxx", "foo"]
+#
+# If the option is not last, its argument is whatever follows it
+# (even if the argument looks like another option):
+#
+# $ ruby types.rb --xxx --yyy
+#
+# Output:
+#
+# ["--xxx", "--yyy"]
+#
+# If the option is last, an exception is raised:
+#
+# $ ruby types.rb
+# # Raises GetoptLong::MissingArgument
+#
+# ==== Option with Optional Argument
+#
+# An option of type <tt>GetoptLong::OPTIONAL_ARGUMENT</tt>
+# may be followed by an argument, which if given is associated with that option.
+#
+# If the option is last, it does not have an argument:
+#
+# $ ruby types.rb --yyy
+#
+# Output:
+#
+# ["--yyy", ""]
+#
+# If the option is followed by another option, it does not have an argument:
+#
+# $ ruby types.rb --yyy --zzz
+#
+# Output:
+#
+# ["--yyy", ""]
+# ["--zzz", ""]
+#
+# Otherwise the option is followed by its argument, which is associated
+# with that option:
+#
+# $ ruby types.rb --yyy foo
+#
+# Output:
+#
+# ["--yyy", "foo"]
+#
+# ==== Option with No Argument
+#
+# An option of type <tt>GetoptLong::NO_ARGUMENT</tt> takes no argument:
+#
+# ruby types.rb --zzz foo
+#
+# Output:
+#
+# ["--zzz", ""]
+#
+# === ARGV
+#
+# You can process options either with method #each and a block,
+# or with method #get.
+#
+# During processing, each found option is removed, along with its argument
+# if there is one.
+# After processing, each remaining element was neither an option
+# nor the argument for an option.
+#
+# File <tt>argv.rb</tt>:
+#
+# :include: ../sample/getoptlong/argv.rb
+#
+# Command line:
+#
+# $ ruby argv.rb --xxx Foo --yyy Bar Baz --zzz Bat Bam
#
-# GetoptLong allows for POSIX-style options like <tt>--file</tt> as well
-# as single letter options like <tt>-f</tt>
+# Output:
#
-# The empty option <tt>--</tt> (two minus symbols) is used to end option
-# processing. This can be particularly important if options have optional
-# arguments.
+# Original ARGV: ["--xxx", "Foo", "--yyy", "Bar", "Baz", "--zzz", "Bat", "Bam"]
+# ["--xxx", "Foo"]
+# ["--yyy", "Bar"]
+# ["--zzz", ""]
+# Remaining ARGV: ["Baz", "Bat", "Bam"]
#
-# Here is a simple example of usage:
+# === Ordering
#
-# require 'getoptlong'
+# There are three settings that control the way the options
+# are interpreted:
#
-# opts = GetoptLong.new(
-# [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
-# [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ],
-# [ '--name', GetoptLong::OPTIONAL_ARGUMENT ]
-# )
+# - +PERMUTE+.
+# - +REQUIRE_ORDER+.
+# - +RETURN_IN_ORDER+.
#
-# dir = nil
-# name = nil
-# repetitions = 1
-# opts.each do |opt, arg|
-# case opt
-# when '--help'
-# puts <<-EOF
-# hello [OPTION] ... DIR
+# The initial setting for a new \GetoptLong object is +REQUIRE_ORDER+
+# if environment variable +POSIXLY_CORRECT+ is defined, +PERMUTE+ otherwise.
#
+# ==== PERMUTE Ordering
+#
+# In the +PERMUTE+ ordering, options and other, non-option,
+# arguments may appear in any order and any mixture.
+#
+# File <tt>permute.rb</tt>:
+#
+# :include: ../sample/getoptlong/permute.rb
+#
+# Command line:
+#
+# $ ruby permute.rb Foo --zzz Bar --xxx Baz --yyy Bat Bam --xxx Bag Bah
+#
+# Output:
+#
+# Original ARGV: ["Foo", "--zzz", "Bar", "--xxx", "Baz", "--yyy", "Bat", "Bam", "--xxx", "Bag", "Bah"]
+# ["--zzz", ""]
+# ["--xxx", "Baz"]
+# ["--yyy", "Bat"]
+# ["--xxx", "Bag"]
+# Remaining ARGV: ["Foo", "Bar", "Bam", "Bah"]
+#
+# ==== REQUIRE_ORDER Ordering
+#
+# In the +REQUIRE_ORDER+ ordering, all options precede all non-options;
+# that is, each word after the first non-option word
+# is treated as a non-option word (even if it begins with a hyphen).
+#
+# File <tt>require_order.rb</tt>:
+#
+# :include: ../sample/getoptlong/require_order.rb
+#
+# Command line:
+#
+# $ ruby require_order.rb --xxx Foo Bar --xxx Baz --yyy Bat -zzz
+#
+# Output:
+#
+# Original ARGV: ["--xxx", "Foo", "Bar", "--xxx", "Baz", "--yyy", "Bat", "-zzz"]
+# ["--xxx", "Foo"]
+# Remaining ARGV: ["Bar", "--xxx", "Baz", "--yyy", "Bat", "-zzz"]
+#
+# ==== RETURN_IN_ORDER Ordering
+#
+# In the +RETURN_IN_ORDER+ ordering, every word is treated as an option.
+# A word that begins with a hyphen (or two) is treated in the usual way;
+# a word +word+ that does not so begin is treated as an option
+# whose name is an empty string, and whose value is +word+.
+#
+# File <tt>return_in_order.rb</tt>:
+#
+# :include: ../sample/getoptlong/return_in_order.rb
+#
+# Command line:
+#
+# $ ruby return_in_order.rb Foo --xxx Bar Baz --zzz Bat Bam
+#
+# Output:
+#
+# Original ARGV: ["Foo", "--xxx", "Bar", "Baz", "--zzz", "Bat", "Bam"]
+# ["", "Foo"]
+# ["--xxx", "Bar"]
+# ["", "Baz"]
+# ["--zzz", ""]
+# ["", "Bat"]
+# ["", "Bam"]
+# Remaining ARGV: []
+#
+# === Full Example
+#
+# File <tt>fibonacci.rb</tt>:
+#
+# :include: ../sample/getoptlong/fibonacci.rb
+#
+# Command line:
+#
+# $ ruby fibonacci.rb
+#
+# Output:
+#
+# Option --number is required.
+# Usage:
+#
+# -n n, --number n:
+# Compute Fibonacci number for n.
+# -v [boolean], --verbose [boolean]:
+# Show intermediate results; default is 'false'.
+# -h, --help:
+# Show this help.
+#
+# Command line:
+#
+# $ ruby fibonacci.rb --number
+#
+# Raises GetoptLong::MissingArgument:
+#
+# fibonacci.rb: option `--number' requires an argument
+#
+# Command line:
+#
+# $ ruby fibonacci.rb --number 6
+#
+# Output:
+#
+# 8
+#
+# Command line:
+#
+# $ ruby fibonacci.rb --number 6 --verbose
+#
+# Output:
+# 1
+# 2
+# 3
+# 5
+# 8
+#
+# Command line:
+#
+# $ ruby fibonacci.rb --number 6 --verbose yes
+#
+# Output:
+#
+# --verbose argument must be true or false
+# Usage:
+#
+# -n n, --number n:
+# Compute Fibonacci number for n.
+# -v [boolean], --verbose [boolean]:
+# Show intermediate results; default is 'false'.
# -h, --help:
-# show help
-#
-# --repeat x, -n x:
-# repeat x times
-#
-# --name [name]:
-# greet user by name, if name not supplied default is John
-#
-# DIR: The directory in which to issue the greeting.
-# EOF
-# when '--repeat'
-# repetitions = arg.to_i
-# when '--name'
-# if arg == ''
-# name = 'John'
-# else
-# name = arg
-# end
-# end
-# end
-#
-# if ARGV.length != 1
-# puts "Missing dir argument (try --help)"
-# exit 0
-# end
-#
-# dir = ARGV.shift
-#
-# Dir.chdir(dir)
-# for i in (1..repetitions)
-# print "Hello"
-# if name
-# print ", #{name}"
-# end
-# puts
-# end
-#
-# Example command line:
-#
-# hello -n 6 --name -- /tmp
+# Show this help.
#
class GetoptLong
+ # Version.
+ VERSION = "0.2.0"
+
#
# Orderings.
#
@@ -111,20 +396,18 @@ class GetoptLong
class InvalidOption < Error; end
#
- # Set up option processing.
- #
- # The options to support are passed to new() as an array of arrays.
- # Each sub-array contains any number of String option names which carry
- # the same meaning, and one of the following flags:
+ # Returns a new \GetoptLong object based on the given +arguments+.
+ # See {Options}[#class-GetoptLong-label-Options].
#
- # GetoptLong::NO_ARGUMENT :: Option does not take an argument.
+ # Example:
#
- # GetoptLong::REQUIRED_ARGUMENT :: Option always takes an argument.
+ # :include: ../sample/getoptlong/simple.rb
#
- # GetoptLong::OPTIONAL_ARGUMENT :: Option may or may not take an argument.
+ # Raises an exception if:
#
- # The first option name is considered to be the preferred (canonical) name.
- # Other than that, the elements of each sub-array can be in any order.
+ # - Any of +arguments+ is not an array.
+ # - Any option name or alias is not a string.
+ # - Any option type is invalid.
#
def initialize(*arguments)
#
@@ -186,54 +469,22 @@ class GetoptLong
end
end
+ # Sets the ordering; see {Ordering}[#class-GetoptLong-label-Ordering];
+ # returns the new ordering.
#
- # Set the handling of the ordering of options and arguments.
- # A RuntimeError is raised if option processing has already started.
- #
- # The supplied value must be a member of GetoptLong::ORDERINGS. It alters
- # the processing of options as follows:
- #
- # <b>REQUIRE_ORDER</b> :
- #
- # Options are required to occur before non-options.
- #
- # Processing of options ends as soon as a word is encountered that has not
- # been preceded by an appropriate option flag.
- #
- # For example, if -a and -b are options which do not take arguments,
- # parsing command line arguments of '-a one -b two' would result in
- # 'one', '-b', 'two' being left in ARGV, and only ('-a', '') being
- # processed as an option/arg pair.
- #
- # This is the default ordering, if the environment variable
- # POSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.)
- #
- # <b>PERMUTE</b> :
- #
- # Options can occur anywhere in the command line parsed. This is the
- # default behavior.
- #
- # Every sequence of words which can be interpreted as an option (with or
- # without argument) is treated as an option; non-option words are skipped.
- #
- # For example, if -a does not require an argument and -b optionally takes
- # an argument, parsing '-a one -b two three' would result in ('-a','') and
- # ('-b', 'two') being processed as option/arg pairs, and 'one','three'
- # being left in ARGV.
+ # If the given +ordering+ is +PERMUTE+ and environment variable
+ # +POSIXLY_CORRECT+ is defined, sets the ordering to +REQUIRE_ORDER+;
+ # otherwise sets the ordering to +ordering+:
#
- # If the ordering is set to PERMUTE but the environment variable
- # POSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for
- # compatibility with GNU getopt_long.
+ # options = GetoptLong.new
+ # options.ordering == GetoptLong::PERMUTE # => true
+ # options.ordering = GetoptLong::RETURN_IN_ORDER
+ # options.ordering == GetoptLong::RETURN_IN_ORDER # => true
+ # ENV['POSIXLY_CORRECT'] = 'true'
+ # options.ordering = GetoptLong::PERMUTE
+ # options.ordering == GetoptLong::REQUIRE_ORDER # => true
#
- # <b>RETURN_IN_ORDER</b> :
- #
- # All words on the command line are processed as options. Words not
- # preceded by a short or long option flag are passed as arguments
- # with an option of '' (empty string).
- #
- # For example, if -a requires an argument but -b does not, a command line
- # of '-a one -b two three' would result in option/arg pairs of ('-a', 'one')
- # ('-b', ''), ('', 'two'), ('', 'three') being processed.
+ # Raises an exception if +ordering+ is invalid.
#
def ordering=(ordering)
#
@@ -259,14 +510,16 @@ class GetoptLong
end
#
- # Return ordering.
+ # Returns the ordering setting.
#
attr_reader :ordering
#
- # Set options. Takes the same argument as GetoptLong.new.
+ # Replaces existing options with those given by +arguments+,
+ # which have the same form as the arguments to ::new;
+ # returns +self+.
#
- # Raises a RuntimeError if option processing has already started.
+ # Raises an exception if option processing has begun.
#
def set_options(*arguments)
#
@@ -338,22 +591,23 @@ class GetoptLong
end
#
- # Set/Unset `quiet' mode.
+ # Sets quiet mode and returns the given argument:
+ #
+ # - When +false+ or +nil+, error messages are written to <tt>$stdout</tt>.
+ # - Otherwise, error messages are not written.
#
attr_writer :quiet
#
- # Return the flag of `quiet' mode.
+ # Returns the quiet mode setting.
#
attr_reader :quiet
-
- #
- # `quiet?' is an alias of `quiet'.
- #
alias quiet? quiet
#
- # Explicitly terminate option processing.
+ # Terminate option processing;
+ # returns +nil+ if processing has already terminated;
+ # otherwise returns +self+.
#
def terminate
return nil if @status == STATUS_TERMINATED
@@ -373,14 +627,14 @@ class GetoptLong
end
#
- # Returns true if option processing has terminated, false otherwise.
+ # Returns +true+ if option processing has terminated, +false+ otherwise.
#
def terminated?
return @status == STATUS_TERMINATED
end
#
- # Set an error (a protected method).
+ # \Set an error (a protected method).
#
def set_error(type, message)
$stderr.print("#{$0}: #{message}\n") if !@quiet
@@ -397,32 +651,25 @@ class GetoptLong
protected :set_error
#
- # Examine whether an option processing is failed.
+ # Returns whether option processing has failed.
#
attr_reader :error
-
- #
- # `error?' is an alias of `error'.
- #
alias error? error
# Return the appropriate error message in POSIX-defined format.
- # If no error has occurred, returns nil.
+ # If no error has occurred, returns +nil+.
#
def error_message
return @error_message
end
#
- # Get next option name and its argument, as an Array of two elements.
- #
- # The option name is always converted to the first (preferred)
- # name given in the original options to GetoptLong.new.
+ # Returns the next option as a 2-element array containing:
#
- # Example: ['--option', 'value']
+ # - The option name (the name itself, not an alias).
+ # - The option value.
#
- # Returns nil if the processing is complete (as determined by
- # STATUS_TERMINATED).
+ # Returns +nil+ if there are no more options.
#
def get
option_name, option_argument = nil, ''
@@ -582,21 +829,32 @@ class GetoptLong
return @canonical_names[option_name], option_argument
end
+ alias get_option get
#
- # `get_option' is an alias of `get'.
+ # Calls the given block with each option;
+ # each option is a 2-element array containing:
#
- alias get_option get
-
- # Iterator version of `get'.
+ # - The option name (the name itself, not an alias).
+ # - The option value.
+ #
+ # Example:
+ #
+ # :include: ../sample/getoptlong/each.rb
#
- # The block is called repeatedly with two arguments:
- # The first is the option name.
- # The second is the argument which followed it (if any).
- # Example: ('--opt', 'value')
+ # Command line:
#
- # The option name is always converted to the first (preferred)
- # name given in the original options to GetoptLong.new.
+ # ruby each.rb -xxx Foo -x Bar --yyy Baz -y Bat --zzz
+ #
+ # Output:
+ #
+ # Original ARGV: ["-xxx", "Foo", "-x", "Bar", "--yyy", "Baz", "-y", "Bat", "--zzz"]
+ # ["--xxx", "xx"]
+ # ["--xxx", "Bar"]
+ # ["--yyy", "Baz"]
+ # ["--yyy", "Bat"]
+ # ["--zzz", ""]
+ # Remaining ARGV: ["Foo"]
#
def each
loop do
@@ -605,9 +863,5 @@ class GetoptLong
yield option_name, option_argument
end
end
-
- #
- # `each_option' is an alias of `each'.
- #
alias each_option each
end
diff --git a/lib/getoptlong/getoptlong.gemspec b/lib/getoptlong/getoptlong.gemspec
index 198bba83ac..dfe087b886 100644
--- a/lib/getoptlong/getoptlong.gemspec
+++ b/lib/getoptlong/getoptlong.gemspec
@@ -1,19 +1,22 @@
-begin
- require_relative "lib/getoptlong/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "getoptlong"
- spec.version = GetoptLong::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{GetoptLong for Ruby}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/getoptlong"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
@@ -21,9 +24,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
end
diff --git a/lib/getoptlong/version.rb b/lib/getoptlong/version.rb
deleted file mode 100644
index 6375fb8ad1..0000000000
--- a/lib/getoptlong/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class GetoptLong
- VERSION = "0.1.0"
-end
diff --git a/lib/ipaddr.gemspec b/lib/ipaddr.gemspec
index 2de9ef4881..1f4798e43a 100644
--- a/lib/ipaddr.gemspec
+++ b/lib/ipaddr.gemspec
@@ -1,11 +1,23 @@
# frozen_string_literal: true
# coding: utf-8
-lib = File.expand_path("../lib", __FILE__)
-$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+
+if File.exist?(File.expand_path("ipaddr.gemspec"))
+ lib = File.expand_path("../lib", __FILE__)
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+
+ file = File.expand_path("ipaddr.rb", lib)
+else
+ # for ruby-core
+ file = File.expand_path("../ipaddr.rb", __FILE__)
+end
+
+version = File.foreach(file).find do |line|
+ /^\s*VERSION\s*=\s*["'](.*)["']/ =~ line and break $1
+end
Gem::Specification.new do |spec|
spec.name = "ipaddr"
- spec.version = "1.2.2"
+ spec.version = version
spec.authors = ["Akinori MUSHA", "Hajimu UMEMOTO"]
spec.email = ["knu@idaemons.org", "ume@mahoroba.org"]
@@ -15,14 +27,10 @@ IPAddr provides a set of methods to manipulate an IP address.
Both IPv4 and IPv6 are supported.
DESCRIPTION
spec.homepage = "https://github.com/ruby/ipaddr"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "ipaddr.gemspec", "lib/ipaddr.rb"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.files = ["LICENSE.txt", "README.md", "ipaddr.gemspec", "lib/ipaddr.rb"]
spec.require_paths = ["lib"]
- spec.add_development_dependency "bundler", "~> 1.15"
- spec.add_development_dependency "rake", "~> 10.0"
- spec.add_development_dependency "test-unit"
+ spec.required_ruby_version = ">= 2.3"
end
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb
index 7fff54b9d0..7a5cf94830 100644
--- a/lib/ipaddr.rb
+++ b/lib/ipaddr.rb
@@ -40,13 +40,14 @@ require 'socket'
# p ipaddr3 #=> #<IPAddr: IPv4:192.168.2.0/255.255.255.0>
class IPAddr
+ VERSION = "1.2.5"
# 32 bit mask for IPv4
IN4MASK = 0xffffffff
# 128 bit mask for IPv6
IN6MASK = 0xffffffffffffffffffffffffffffffff
# Format string for IPv6
- IN6FORMAT = (["%.4x"] * 8).join(':')
+ IN6FORMAT = (["%.4x"] * 8).join(':').freeze
# Regexp _internally_ used for parsing IPv4 address.
RE_IPV4ADDRLIKE = %r{
@@ -112,13 +113,12 @@ class IPAddr
def self.ntop(addr)
case addr.size
when 4
- s = addr.unpack('C4').join('.')
+ addr.unpack('C4').join('.')
when 16
- s = IN6FORMAT % addr.unpack('n8')
+ IN6FORMAT % addr.unpack('n8')
else
raise AddressFamilyError, "unsupported address family"
end
- return s
end
# Returns a new ipaddr built by bitwise AND.
@@ -168,34 +168,17 @@ class IPAddr
# net1 = IPAddr.new("192.168.2.0/24")
# net2 = IPAddr.new("192.168.2.100")
# net3 = IPAddr.new("192.168.3.0")
+ # net4 = IPAddr.new("192.168.2.0/16")
# p net1.include?(net2) #=> true
# p net1.include?(net3) #=> false
+ # p net1.include?(net4) #=> false
+ # p net4.include?(net1) #=> true
def include?(other)
other = coerce_other(other)
- if ipv4_mapped?
- if (@mask_addr >> 32) != 0xffffffffffffffffffffffff
- return false
- end
- mask_addr = (@mask_addr & IN4MASK)
- addr = (@addr & IN4MASK)
- family = Socket::AF_INET
- else
- mask_addr = @mask_addr
- addr = @addr
- family = @family
- end
- if other.ipv4_mapped?
- other_addr = (other.to_i & IN4MASK)
- other_family = Socket::AF_INET
- else
- other_addr = other.to_i
- other_family = other.family
- end
-
- if family != other_family
- return false
- end
- return ((addr & mask_addr) == (other_addr & mask_addr))
+ return false unless other.family == family
+ range = to_range
+ other = other.to_range
+ range.begin <= other.begin && range.end >= other.end
end
alias === include?
@@ -232,7 +215,13 @@ class IPAddr
# Returns a string containing the IP address representation in
# canonical form.
def to_string
- return _to_string(@addr)
+ str = _to_string(@addr)
+
+ if @family == Socket::AF_INET6
+ str << zone_id.to_s
+ end
+
+ return str
end
# Returns a network byte ordered string form of the IP address.
@@ -328,9 +317,11 @@ class IPAddr
# into an IPv4-mapped IPv6 address.
def ipv4_mapped
if !ipv4?
- raise InvalidAddressError, "not an IPv4 address"
+ raise InvalidAddressError, "not an IPv4 address: #{@addr}"
end
- return self.clone.set(@addr | 0xffff00000000, Socket::AF_INET6)
+ clone = self.clone.set(@addr | 0xffff00000000, Socket::AF_INET6)
+ clone.instance_variable_set(:@mask_addr, @mask_addr | 0xffffffffffffffffffffffff00000000)
+ clone
end
# Returns a new ipaddr built by converting the native IPv4 address
@@ -338,7 +329,7 @@ class IPAddr
def ipv4_compat
warn "IPAddr\##{__callee__} is obsolete", uplevel: 1 if $VERBOSE
if !ipv4?
- raise InvalidAddressError, "not an IPv4 address"
+ raise InvalidAddressError, "not an IPv4 address: #{@addr}"
end
return self.clone.set(@addr, Socket::AF_INET6)
end
@@ -369,7 +360,7 @@ class IPAddr
# Returns a string for DNS reverse lookup compatible with RFC3172.
def ip6_arpa
if !ipv6?
- raise InvalidAddressError, "not an IPv6 address"
+ raise InvalidAddressError, "not an IPv6 address: #{@addr}"
end
return _reverse + ".ip6.arpa"
end
@@ -377,7 +368,7 @@ class IPAddr
# Returns a string for DNS reverse lookup compatible with RFC1886.
def ip6_int
if !ipv6?
- raise InvalidAddressError, "not an IPv6 address"
+ raise InvalidAddressError, "not an IPv6 address: #{@addr}"
end
return _reverse + ".ip6.int"
end
@@ -404,7 +395,7 @@ class IPAddr
# Returns a hash value used by Hash, Set, and Array classes
def hash
- return ([@addr, @mask_addr].hash << 1) | (ipv4? ? 0 : 1)
+ return ([@addr, @mask_addr, @zone_id].hash << 1) | (ipv4? ? 0 : 1)
end
# Creates a Range object for the network address.
@@ -420,7 +411,7 @@ class IPAddr
raise AddressFamilyError, "unsupported address family"
end
- return clone.set(begin_addr, @family)..clone.set(end_addr, @family)
+ self.class.new(begin_addr, @family)..self.class.new(end_addr, @family)
end
# Returns the prefix length in bits for the ipaddr.
@@ -448,7 +439,7 @@ class IPAddr
when Integer
mask!(prefix)
else
- raise InvalidPrefixError, "prefix must be an integer"
+ raise InvalidPrefixError, "prefix must be an integer: #{@addr}"
end
end
@@ -460,11 +451,42 @@ class IPAddr
af = "IPv4"
when Socket::AF_INET6
af = "IPv6"
+ zone_id = @zone_id.to_s
else
raise AddressFamilyError, "unsupported address family"
end
- return sprintf("#<%s: %s:%s/%s>", self.class.name,
- af, _to_string(@addr), _to_string(@mask_addr))
+ return sprintf("#<%s: %s:%s%s/%s>", self.class.name,
+ af, _to_string(@addr), zone_id, _to_string(@mask_addr))
+ end
+
+ # Returns the netmask in string format e.g. 255.255.0.0
+ def netmask
+ _to_string(@mask_addr)
+ end
+
+ # Returns the IPv6 zone identifier, if present.
+ # Raises InvalidAddressError if not an IPv6 address.
+ def zone_id
+ if @family == Socket::AF_INET6
+ @zone_id
+ else
+ raise InvalidAddressError, "not an IPv6 address"
+ end
+ end
+
+ # Returns the IPv6 zone identifier, if present.
+ # Raises InvalidAddressError if not an IPv6 address.
+ def zone_id=(zid)
+ if @family == Socket::AF_INET6
+ case zid
+ when nil, /\A%(\w+)\z/
+ @zone_id = zid
+ else
+ raise InvalidAddressError, "invalid zone identifier for address"
+ end
+ else
+ raise InvalidAddressError, "not an IPv6 address"
+ end
end
protected
@@ -476,11 +498,11 @@ class IPAddr
case family[0] ? family[0] : @family
when Socket::AF_INET
if addr < 0 || addr > IN4MASK
- raise InvalidAddressError, "invalid address"
+ raise InvalidAddressError, "invalid address: #{@addr}"
end
when Socket::AF_INET6
if addr < 0 || addr > IN6MASK
- raise InvalidAddressError, "invalid address"
+ raise InvalidAddressError, "invalid address: #{@addr}"
end
else
raise AddressFamilyError, "unsupported address family"
@@ -488,6 +510,9 @@ class IPAddr
@addr = addr
if family[0]
@family = family[0]
+ if @family == Socket::AF_INET
+ @mask_addr &= IN4MASK
+ end
end
return self
end
@@ -496,17 +521,20 @@ class IPAddr
def mask!(mask)
case mask
when String
- if mask =~ /\A\d+\z/
+ case mask
+ when /\A(0|[1-9]+\d*)\z/
prefixlen = mask.to_i
+ when /\A\d+\z/
+ raise InvalidPrefixError, "leading zeros in prefix"
else
m = IPAddr.new(mask)
if m.family != @family
- raise InvalidPrefixError, "address family is not same"
+ raise InvalidPrefixError, "address family is not same: #{@addr}"
end
@mask_addr = m.to_i
n = @mask_addr ^ m.instance_variable_get(:@mask_addr)
unless ((n + 1) & n).zero?
- raise InvalidPrefixError, "invalid mask #{mask}"
+ raise InvalidPrefixError, "invalid mask #{mask}: #{@addr}"
end
@addr &= @mask_addr
return self
@@ -517,13 +545,13 @@ class IPAddr
case @family
when Socket::AF_INET
if prefixlen < 0 || prefixlen > 32
- raise InvalidPrefixError, "invalid length"
+ raise InvalidPrefixError, "invalid length: #{@addr}"
end
masklen = 32 - prefixlen
@mask_addr = ((IN4MASK >> masklen) << masklen)
when Socket::AF_INET6
if prefixlen < 0 || prefixlen > 128
- raise InvalidPrefixError, "invalid length"
+ raise InvalidPrefixError, "invalid length: #{@addr}"
end
masklen = 128 - prefixlen
@mask_addr = ((IN6MASK >> masklen) << masklen)
@@ -555,6 +583,7 @@ class IPAddr
# those, such as &, |, include? and ==, accept a string, or a packed
# in_addr value instead of an IPAddr object.
def initialize(addr = '::', family = Socket::AF_UNSPEC)
+ @mask_addr = nil
if !addr.kind_of?(String)
case family
when Socket::AF_INET, Socket::AF_INET6
@@ -567,11 +596,16 @@ class IPAddr
raise AddressFamilyError, "unsupported address family: #{family}"
end
end
- prefix, prefixlen = addr.split('/')
+ prefix, prefixlen = addr.split('/', 2)
if prefix =~ /\A\[(.*)\]\z/i
prefix = $1
family = Socket::AF_INET6
end
+ if prefix =~ /\A(.*)(%\w+)\z/
+ prefix = $1
+ zone_id = $2
+ family = Socket::AF_INET6
+ end
# It seems AI_NUMERICHOST doesn't do the job.
#Socket.getaddrinfo(left, nil, Socket::AF_INET6, Socket::SOCK_STREAM, nil,
# Socket::AI_NUMERICHOST)
@@ -586,6 +620,7 @@ class IPAddr
@addr = in6_addr(prefix)
@family = Socket::AF_INET6
end
+ @zone_id = zone_id
if family != Socket::AF_UNSPEC && @family != family
raise AddressFamilyError, "address family mismatch"
end
@@ -594,8 +629,6 @@ class IPAddr
else
@mask_addr = (@family == Socket::AF_INET) ? IN4MASK : IN6MASK
end
- rescue InvalidAddressError => e
- raise e.class, "#{e.message}: #{addr}"
end
def coerce_other(other)
@@ -618,8 +651,8 @@ class IPAddr
octets = m.captures
end
octets.inject(0) { |i, s|
- (n = s.to_i) < 256 or raise InvalidAddressError, "invalid address"
- s.match(/\A0./) and raise InvalidAddressError, "zero-filled number in IPv4 address is ambiguous"
+ (n = s.to_i) < 256 or raise InvalidAddressError, "invalid address: #{@addr}"
+ s.match(/\A0./) and raise InvalidAddressError, "zero-filled number in IPv4 address is ambiguous: #{@addr}"
i << 8 | n
}
end
@@ -636,19 +669,19 @@ class IPAddr
right = ''
when RE_IPV6ADDRLIKE_COMPRESSED
if $4
- left.count(':') <= 6 or raise InvalidAddressError, "invalid address"
+ left.count(':') <= 6 or raise InvalidAddressError, "invalid address: #{@addr}"
addr = in_addr($~[4,4])
left = $1
right = $3 + '0:0'
else
left.count(':') <= ($1.empty? || $2.empty? ? 8 : 7) or
- raise InvalidAddressError, "invalid address"
+ raise InvalidAddressError, "invalid address: #{@addr}"
left = $1
right = $2
addr = 0
end
else
- raise InvalidAddressError, "invalid address"
+ raise InvalidAddressError, "invalid address: #{@addr}"
end
l = left.split(':')
r = right.split(':')
@@ -703,7 +736,7 @@ end
unless Socket.const_defined? :AF_INET6
class Socket < BasicSocket
# IPv6 protocol family
- AF_INET6 = Object.new
+ AF_INET6 = Object.new.freeze
end
class << IPSocket
diff --git a/lib/irb.rb b/lib/irb.rb
index bcd6599af9..2db99bcd43 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -10,17 +10,19 @@
#
#
require "ripper"
+require "reline"
-require "irb/init"
-require "irb/context"
-require "irb/extend-command"
+require_relative "irb/init"
+require_relative "irb/context"
+require_relative "irb/extend-command"
-require "irb/ruby-lex"
-require "irb/input-method"
-require "irb/locale"
-require "irb/color"
+require_relative "irb/ruby-lex"
+require_relative "irb/input-method"
+require_relative "irb/locale"
+require_relative "irb/color"
-require "irb/version"
+require_relative "irb/version"
+require_relative "irb/easter-egg"
# IRB stands for "interactive Ruby" and is a tool to interactively execute Ruby
# expressions read from the standard input.
@@ -49,43 +51,63 @@ require "irb/version"
#
# == Command line options
#
-# Usage: irb.rb [options] [programfile] [arguments]
-# -f Suppress read of ~/.irbrc
-# -d Set $DEBUG to true (same as `ruby -d')
-# -r load-module Same as `ruby -r'
-# -I path Specify $LOAD_PATH directory
-# -U Same as `ruby -U`
-# -E enc Same as `ruby -E`
-# -w Same as `ruby -w`
-# -W[level=2] Same as `ruby -W`
-# --inspect Use `inspect' for output (default except for bc mode)
-# --noinspect Don't use inspect for output
-# --multiline Use multiline editor module
-# --nomultiline Don't use multiline editor module
-# --singleline Use singleline editor module
-# --nosingleline Don't use singleline editor module
-# --colorize Use colorization
-# --nocolorize Don't use colorization
-# --prompt prompt-mode
-# --prompt-mode prompt-mode
-# Switch prompt mode. Pre-defined prompt modes are
-# `default', `simple', `xmp' and `inf-ruby'
-# --inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs.
-# Suppresses --multiline and --singleline.
-# --simple-prompt Simple prompt mode
-# --noprompt No prompt mode
-# --tracer Display trace for each execution of commands.
-# --back-trace-limit n
-# Display backtrace top n and tail n. The default
-# value is 16.
-# -v, --version Print the version of irb
+# :include: ./irb/lc/help-message
+#
+# == Commands
+#
+# The following commands are available on IRB.
+#
+# * cwws
+# * Show the current workspace.
+# * cb, cws, chws
+# * Change the current workspace to an object.
+# * bindings, workspaces
+# * Show workspaces.
+# * pushb, pushws
+# * Push an object to the workspace stack.
+# * popb, popws
+# * Pop a workspace from the workspace stack.
+# * load
+# * Load a Ruby file.
+# * require
+# * Require a Ruby file.
+# * source
+# * Loads a given file in the current session.
+# * irb
+# * Start a child IRB.
+# * jobs
+# * List of current sessions.
+# * fg
+# * Switches to the session of the given number.
+# * kill
+# * Kills the session with the given number.
+# * help
+# * Enter the mode to look up RI documents.
+# * irb_info
+# * Show information about IRB.
+# * ls
+# * Show methods, constants, and variables.
+# -g [query] or -G [query] allows you to filter out the output.
+# * measure
+# * measure enables the mode to measure processing time. measure :off disables it.
+# * $, show_source
+# * Show the source code of a given method or constant.
+# * @, whereami
+# * Show the source code around binding.irb again.
+# * debug
+# * Start the debugger of debug.gem.
+# * break, delete, next, step, continue, finish, backtrace, info, catch
+# * Start the debugger of debug.gem and run the command on it.
#
# == Configuration
#
-# IRB reads from <code>~/.irbrc</code> when it's invoked.
-#
-# If <code>~/.irbrc</code> doesn't exist, +irb+ will try to read in the following order:
+# IRB reads a personal initialization file when it's invoked.
+# IRB searches a file in the following order and loads the first one found.
#
+# * <tt>$IRBRC</tt> (if <tt>$IRBRC</tt> is set)
+# * <tt>$XDG_CONFIG_HOME/irb/irbrc</tt> (if <tt>$XDG_CONFIG_HOME</tt> is set)
+# * <tt>~/.irbrc</tt>
+# * +.config/irb/irbrc+
# * +.irbrc+
# * +irb.rc+
# * +_irbrc+
@@ -103,6 +125,7 @@ require "irb/version"
# IRB.conf[:USE_SINGLELINE] = nil
# IRB.conf[:USE_COLORIZE] = true
# IRB.conf[:USE_TRACER] = false
+# IRB.conf[:USE_AUTOCOMPLETE] = true
# IRB.conf[:IGNORE_SIGINT] = true
# IRB.conf[:IGNORE_EOF] = false
# IRB.conf[:PROMPT_MODE] = :DEFAULT
@@ -116,9 +139,9 @@ require "irb/version"
#
# === Autocompletion
#
-# To enable autocompletion for irb, add the following to your +.irbrc+:
+# To disable autocompletion for irb, add the following to your +.irbrc+:
#
-# require 'irb/completion'
+# IRB.conf[:USE_AUTOCOMPLETE] = false
#
# === History
#
@@ -270,7 +293,7 @@ require "irb/version"
# On the other hand, each conf in IRB@Command+line+options is used to
# individually configure IRB.irb.
#
-# If a proc is set for IRB.conf[:IRB_RC], its will be invoked after execution
+# If a proc is set for <code>IRB.conf[:IRB_RC]</code>, its will be invoked after execution
# of that proc with the context of the current session as its argument. Each
# session can be configured using this mechanism.
#
@@ -398,7 +421,7 @@ module IRB
irb.run(@CONF)
end
- # Calls each event hook of IRB.conf[:AT_EXIT] when the current session quits.
+ # Calls each event hook of <code>IRB.conf[:AT_EXIT]</code> when the current session quits.
def IRB.irb_at_exit
@CONF[:AT_EXIT].each{|hook| hook.call}
end
@@ -412,11 +435,7 @@ module IRB
#
# Will raise an Abort exception, or the given +exception+.
def IRB.irb_abort(irb, exception = Abort)
- if defined? Thread
- irb.context.thread.raise exception, "abort then interrupt!"
- else
- raise exception, "abort then interrupt!"
- end
+ irb.context.thread.raise exception, "abort then interrupt!"
end
class Irb
@@ -457,11 +476,22 @@ module IRB
@scanner = RubyLex.new
end
+ # A hook point for `debug` command's TracePoint after :IRB_EXIT as well as its clean-up
+ def debug_break
+ # it means the debug command is executed
+ if defined?(DEBUGGER__) && DEBUGGER__.respond_to?(:capture_frames_without_irb)
+ # after leaving this initial breakpoint, revert the capture_frames patch
+ DEBUGGER__.singleton_class.send(:alias_method, :capture_frames, :capture_frames_without_irb)
+ # and remove the redundant method
+ DEBUGGER__.singleton_class.send(:undef_method, :capture_frames_without_irb)
+ end
+ end
+
def run(conf = IRB.conf)
conf[:IRB_RC].call(context) if conf[:IRB_RC]
conf[:MAIN_CONTEXT] = context
- trap("SIGINT") do
+ prev_trap = trap("SIGINT") do
signal_handle
end
@@ -470,6 +500,7 @@ module IRB
eval_input
end
ensure
+ trap("SIGINT", prev_trap)
conf[:AT_EXIT].each{|hook| hook.call}
end
end
@@ -512,7 +543,7 @@ module IRB
@context.io.prompt
end
- @scanner.set_input(@context.io) do
+ @scanner.set_input(@context.io, context: @context) do
signal_status(:IN_INPUT) do
if l = @context.io.gets
print l if @context.verbose?
@@ -523,7 +554,7 @@ module IRB
printf "Use \"exit\" to leave %s\n", @context.ap_name
end
else
- print "\n"
+ print "\n" if @context.prompting?
end
end
l
@@ -532,12 +563,39 @@ module IRB
@scanner.set_auto_indent(@context) if @context.auto_indent_mode
- @scanner.each_top_level_statement do |line, line_no|
+ @scanner.each_top_level_statement(@context) do |line, line_no|
signal_status(:IN_EVAL) do
begin
line.untaint if RUBY_VERSION < '2.7'
- @context.evaluate(line, line_no, exception: exc)
- output_value if @context.echo? && (@context.echo_on_assignment? || !assignment_expression?(line))
+ if IRB.conf[:MEASURE] && IRB.conf[:MEASURE_CALLBACKS].empty?
+ IRB.set_measure_callback
+ end
+ # Assignment expression check should be done before @context.evaluate to handle code like `a /2#/ if false; a = 1`
+ is_assignment = assignment_expression?(line)
+ if IRB.conf[:MEASURE] && !IRB.conf[:MEASURE_CALLBACKS].empty?
+ result = nil
+ last_proc = proc{ result = @context.evaluate(line, line_no, exception: exc) }
+ IRB.conf[:MEASURE_CALLBACKS].inject(last_proc) { |chain, item|
+ _name, callback, arg = item
+ proc {
+ callback.(@context, line, line_no, arg, exception: exc) do
+ chain.call
+ end
+ }
+ }.call
+ @context.set_last_value(result)
+ else
+ @context.evaluate(line, line_no, exception: exc)
+ end
+ if @context.echo?
+ if is_assignment
+ if @context.echo_on_assignment?
+ output_value(@context.echo_on_assignment? == :truncate)
+ end
+ else
+ output_value
+ end
+ end
rescue Interrupt => exc
rescue SystemExit, SignalException
raise
@@ -547,61 +605,87 @@ module IRB
next
end
handle_exception(exc)
+ @context.workspace.local_variable_set(:_, exc)
+ exc = nil
end
end
end
+ def convert_invalid_byte_sequence(str, enc)
+ str.force_encoding(enc)
+ str.scrub { |c|
+ c.bytes.map{ |b| "\\x#{b.to_s(16).upcase}" }.join
+ }
+ end
+
+ def encode_with_invalid_byte_sequence(str, enc)
+ conv = Encoding::Converter.new(str.encoding, enc)
+ dst = String.new
+ begin
+ ret = conv.primitive_convert(str, dst)
+ case ret
+ when :invalid_byte_sequence
+ conv.insert_output(conv.primitive_errinfo[3].dump[1..-2])
+ redo
+ when :undefined_conversion
+ c = conv.primitive_errinfo[3].dup.force_encoding(conv.primitive_errinfo[1])
+ conv.insert_output(c.dump[1..-2])
+ redo
+ when :incomplete_input
+ conv.insert_output(conv.primitive_errinfo[3].dump[1..-2])
+ when :finished
+ end
+ break
+ end while nil
+ dst
+ end
+
def handle_exception(exc)
if exc.backtrace && exc.backtrace[0] =~ /\/irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
- !(SyntaxError === exc)
+ !(SyntaxError === exc) && !(EncodingError === exc)
+ # The backtrace of invalid encoding hash (ex. {"\xAE": 1}) raises EncodingError without lineno.
irb_bug = true
else
irb_bug = false
end
- if STDOUT.tty?
- attr = ATTR_TTY
- print "#{attr[1]}Traceback#{attr[]} (most recent call last):\n"
- else
- attr = ATTR_PLAIN
- end
- messages = []
- lasts = []
- levels = 0
if exc.backtrace
- count = 0
- exc.backtrace.each do |m|
- m = @context.workspace.filter_backtrace(m) or next unless irb_bug
- count += 1
- if attr == ATTR_TTY
- m = sprintf("%9d: from %s", count, m)
+ order = nil
+ if RUBY_VERSION < '3.0.0'
+ if STDOUT.tty?
+ message = exc.full_message(order: :bottom)
+ order = :bottom
else
- m = "\tfrom #{m}"
- end
- if messages.size < @context.back_trace_limit
- messages.push(m)
- elsif lasts.size < @context.back_trace_limit
- lasts.push(m).shift
- levels += 1
+ message = exc.full_message(order: :top)
+ order = :top
end
+ else # '3.0.0' <= RUBY_VERSION
+ message = exc.full_message(order: :top)
+ order = :top
end
- end
- if attr == ATTR_TTY
- unless lasts.empty?
- puts lasts.reverse
- printf "... %d levels...\n", levels if levels > 0
- end
- puts messages.reverse
- end
- m = exc.to_s.split(/\n/)
- print "#{attr[1]}#{exc.class} (#{attr[4]}#{m.shift}#{attr[0, 1]})#{attr[]}\n"
- puts m.map {|s| "#{attr[1]}#{s}#{attr[]}\n"}
- if attr == ATTR_PLAIN
- puts messages
- unless lasts.empty?
- puts lasts
- printf "... %d levels...\n", levels if levels > 0
- end
+ message = convert_invalid_byte_sequence(message, exc.message.encoding)
+ message = encode_with_invalid_byte_sequence(message, IRB.conf[:LC_MESSAGES].encoding) unless message.encoding.to_s.casecmp?(IRB.conf[:LC_MESSAGES].encoding.to_s)
+ message = message.gsub(/((?:^\t.+$\n)+)/) { |m|
+ case order
+ when :top
+ lines = m.split("\n")
+ when :bottom
+ lines = m.split("\n").reverse
+ end
+ unless irb_bug
+ lines = lines.map { |l| @context.workspace.filter_backtrace(l) }.compact
+ if lines.size > @context.back_trace_limit
+ omit = lines.size - @context.back_trace_limit
+ lines = lines[0..(@context.back_trace_limit - 1)]
+ lines << "\t... %d levels..." % omit
+ end
+ end
+ lines = lines.reverse if order == :bottom
+ lines.map{ |l| l + "\n" }.join
+ }
+ # The "<top (required)>" in "(irb)" may be the top level of IRB so imitate the main object.
+ message = message.gsub(/\(irb\):(?<num>\d+):in `<(?<frame>top \(required\))>'/) { "(irb):#{$~[:num]}:in `<main>'" }
+ puts message
end
print "Maybe IRB bug!\n" if irb_bug
end
@@ -735,8 +819,40 @@ module IRB
p
end
- def output_value # :nodoc:
- printf @context.return_format, @context.inspect_last_value
+ def output_value(omit = false) # :nodoc:
+ str = @context.inspect_last_value
+ multiline_p = str.include?("\n")
+ if omit
+ winwidth = @context.io.winsize.last
+ if multiline_p
+ first_line = str.split("\n").first
+ result = @context.newline_before_multiline_output? ? (@context.return_format % first_line) : first_line
+ output_width = Reline::Unicode.calculate_width(result, true)
+ diff_size = output_width - Reline::Unicode.calculate_width(first_line, true)
+ if diff_size.positive? and output_width > winwidth
+ lines, _ = Reline::Unicode.split_by_width(first_line, winwidth - diff_size - 3)
+ str = "%s..." % lines.first
+ str += "\e[0m" if Color.colorable?
+ multiline_p = false
+ else
+ str = str.gsub(/(\A.*?\n).*/m, "\\1...")
+ str += "\e[0m" if Color.colorable?
+ end
+ else
+ output_width = Reline::Unicode.calculate_width(@context.return_format % str, true)
+ diff_size = output_width - Reline::Unicode.calculate_width(str, true)
+ if diff_size.positive? and output_width > winwidth
+ lines, _ = Reline::Unicode.split_by_width(str, winwidth - diff_size - 3)
+ str = "%s..." % lines.first
+ str += "\e[0m" if Color.colorable?
+ end
+ end
+ end
+ if multiline_p && @context.newline_before_multiline_output?
+ printf @context.return_format, "\n#{str}"
+ else
+ printf @context.return_format, str
+ end
end
# Outputs the local variables to this current session, including
@@ -762,13 +878,16 @@ module IRB
# If the expression is invalid, Ripper.sexp should return nil which will
# result in false being returned. Any valid expression should return an
- # s-expression where the second selement of the top level array is an
+ # s-expression where the second element of the top level array is an
# array of parsed expressions. The first element of each expression is the
# expression's type.
verbose, $VERBOSE = $VERBOSE, nil
- result = ASSIGNMENT_NODE_TYPES.include?(Ripper.sexp(line)&.dig(1,-1,0))
+ code = "#{RubyLex.generate_local_variables_assign_code(@context.local_variables) || 'nil;'}\n#{line}"
+ # Get the last node_type of the line. drop(1) is to ignore the local_variables_assign_code part.
+ node_type = Ripper.sexp(code)&.dig(1)&.drop(1)&.dig(-1, 0)
+ ASSIGNMENT_NODE_TYPES.include?(node_type)
+ ensure
$VERBOSE = verbose
- result
end
ATTR_TTY = "\e[%sm"
@@ -858,12 +977,13 @@ class Binding
#
#
# See IRB@IRB+Usage for more information.
- def irb
+ def irb(show_code: true)
IRB.setup(source_location[0], argv: [])
workspace = IRB::WorkSpace.new(self)
- STDOUT.print(workspace.code_around_binding)
+ STDOUT.print(workspace.code_around_binding) if show_code
binding_irb = IRB::Irb.new(workspace)
binding_irb.context.irb_path = File.expand_path(source_location[0])
binding_irb.run(IRB.conf)
+ binding_irb.debug_break
end
end
diff --git a/lib/irb/.document b/lib/irb/.document
new file mode 100644
index 0000000000..3b0d6fa4ed
--- /dev/null
+++ b/lib/irb/.document
@@ -0,0 +1 @@
+**/*.rb
diff --git a/lib/irb/cmd/backtrace.rb b/lib/irb/cmd/backtrace.rb
new file mode 100644
index 0000000000..f632894618
--- /dev/null
+++ b/lib/irb/cmd/backtrace.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Backtrace < DebugCommand
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(*args)
+ super(pre_cmds: ["backtrace", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/break.rb b/lib/irb/cmd/break.rb
new file mode 100644
index 0000000000..df259a90ca
--- /dev/null
+++ b/lib/irb/cmd/break.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Break < DebugCommand
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(args = nil)
+ super(pre_cmds: "break #{args}")
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/catch.rb b/lib/irb/cmd/catch.rb
new file mode 100644
index 0000000000..40b62c7533
--- /dev/null
+++ b/lib/irb/cmd/catch.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Catch < DebugCommand
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(*args)
+ super(pre_cmds: ["catch", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/chws.rb b/lib/irb/cmd/chws.rb
index e9f257791c..7c84ba0a4b 100644
--- a/lib/irb/cmd/chws.rb
+++ b/lib/irb/cmd/chws.rb
@@ -13,22 +13,30 @@
require_relative "nop"
require_relative "../ext/change-ws"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
class CurrentWorkingWorkspace < Nop
+ category "IRB"
+ description "Show the current workspace."
+
def execute(*obj)
irb_context.main
end
end
class ChangeWorkspace < Nop
+ category "IRB"
+ description "Change the current workspace to an object."
+
def execute(*obj)
irb_context.change_workspace(*obj)
irb_context.main
end
end
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/cmd/continue.rb b/lib/irb/cmd/continue.rb
new file mode 100644
index 0000000000..9136177eef
--- /dev/null
+++ b/lib/irb/cmd/continue.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Continue < DebugCommand
+ def execute(*args)
+ super(do_cmds: ["continue", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/debug.rb b/lib/irb/cmd/debug.rb
new file mode 100644
index 0000000000..7d39b9fa27
--- /dev/null
+++ b/lib/irb/cmd/debug.rb
@@ -0,0 +1,136 @@
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Debug < Nop
+ category "Debugging"
+ description "Start the debugger of debug.gem."
+
+ BINDING_IRB_FRAME_REGEXPS = [
+ '<internal:prelude>',
+ binding.method(:irb).source_location.first,
+ ].map { |file| /\A#{Regexp.escape(file)}:\d+:in `irb'\z/ }
+ IRB_DIR = File.expand_path('..', __dir__)
+
+ def execute(pre_cmds: nil, do_cmds: nil)
+ unless binding_irb?
+ puts "`debug` command is only available when IRB is started with binding.irb"
+ return
+ end
+
+ unless setup_debugger
+ puts <<~MSG
+ You need to install the debug gem before using this command.
+ If you use `bundle exec`, please add `gem "debug"` into your Gemfile.
+ MSG
+ return
+ end
+
+ options = { oneshot: true, hook_call: false }
+ if pre_cmds || do_cmds
+ options[:command] = ['irb', pre_cmds, do_cmds]
+ end
+ if DEBUGGER__::LineBreakpoint.instance_method(:initialize).parameters.include?([:key, :skip_src])
+ options[:skip_src] = true
+ end
+
+ # To make debugger commands like `next` or `continue` work without asking
+ # the user to quit IRB after that, we need to exit IRB first and then hit
+ # a TracePoint on #debug_break.
+ file, lineno = IRB::Irb.instance_method(:debug_break).source_location
+ DEBUGGER__::SESSION.add_line_breakpoint(file, lineno + 1, **options)
+ # exit current Irb#run call
+ throw :IRB_EXIT
+ end
+
+ private
+
+ def binding_irb?
+ caller.any? do |frame|
+ BINDING_IRB_FRAME_REGEXPS.any? do |regexp|
+ frame.match?(regexp)
+ end
+ end
+ end
+
+ module SkipPathHelperForIRB
+ def skip_internal_path?(path)
+ # The latter can be removed once https://github.com/ruby/debug/issues/866 is resolved
+ super || path.match?(IRB_DIR) || path.match?('<internal:prelude>')
+ end
+ end
+
+ def setup_debugger
+ unless defined?(DEBUGGER__::SESSION)
+ begin
+ require "debug/session"
+ rescue LoadError # debug.gem is not written in Gemfile
+ return false unless load_bundled_debug_gem
+ end
+ DEBUGGER__.start(nonstop: true)
+ end
+
+ unless DEBUGGER__.respond_to?(:capture_frames_without_irb)
+ DEBUGGER__.singleton_class.send(:alias_method, :capture_frames_without_irb, :capture_frames)
+
+ def DEBUGGER__.capture_frames(*args)
+ frames = capture_frames_without_irb(*args)
+ frames.reject! do |frame|
+ frame.realpath&.start_with?(IRB_DIR) || frame.path == "<internal:prelude>"
+ end
+ frames
+ end
+
+ DEBUGGER__::ThreadClient.prepend(SkipPathHelperForIRB)
+ end
+
+ true
+ end
+
+ # This is used when debug.gem is not written in Gemfile. Even if it's not
+ # installed by `bundle install`, debug.gem is installed by default because
+ # it's a bundled gem. This method tries to activate and load that.
+ def load_bundled_debug_gem
+ # Discover latest debug.gem under GEM_PATH
+ debug_gem = Gem.paths.path.flat_map { |path| Dir.glob("#{path}/gems/debug-*") }.select do |path|
+ File.basename(path).match?(/\Adebug-\d+\.\d+\.\d+(\w+)?\z/)
+ end.sort_by do |path|
+ Gem::Version.new(File.basename(path).delete_prefix('debug-'))
+ end.last
+ return false unless debug_gem
+
+ # Discover debug/debug.so under extensions for Ruby 3.2+
+ ext_name = "/debug/debug.#{RbConfig::CONFIG['DLEXT']}"
+ ext_path = Gem.paths.path.flat_map do |path|
+ Dir.glob("#{path}/extensions/**/#{File.basename(debug_gem)}#{ext_name}")
+ end.first
+
+ # Attempt to forcibly load the bundled gem
+ if ext_path
+ $LOAD_PATH << ext_path.delete_suffix(ext_name)
+ end
+ $LOAD_PATH << "#{debug_gem}/lib"
+ begin
+ require "debug/session"
+ puts "Loaded #{File.basename(debug_gem)}"
+ true
+ rescue LoadError
+ false
+ end
+ end
+ end
+
+ class DebugCommand < Debug
+ def self.category
+ "Debugging"
+ end
+
+ def self.description
+ command_name = self.name.split("::").last.downcase
+ "Start the debugger of debug.gem and run its `#{command_name}` command."
+ end
+ end
+ end
+end
diff --git a/lib/irb/cmd/delete.rb b/lib/irb/cmd/delete.rb
new file mode 100644
index 0000000000..aeb26d2572
--- /dev/null
+++ b/lib/irb/cmd/delete.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Delete < DebugCommand
+ def execute(*args)
+ super(pre_cmds: ["delete", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/edit.rb b/lib/irb/cmd/edit.rb
new file mode 100644
index 0000000000..0103891cf4
--- /dev/null
+++ b/lib/irb/cmd/edit.rb
@@ -0,0 +1,61 @@
+require 'shellwords'
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Edit < Nop
+ category "Misc"
+ description 'Open a file with the editor command defined with `ENV["EDITOR"]`.'
+
+ class << self
+ def transform_args(args)
+ # Return a string literal as is for backward compatibility
+ if args.nil? || args.empty? || string_literal?(args)
+ args
+ else # Otherwise, consider the input as a String for convenience
+ args.strip.dump
+ end
+ end
+ end
+
+ def execute(*args)
+ path = args.first
+
+ if path.nil? && (irb_path = @irb_context.irb_path)
+ path = irb_path
+ end
+
+ if !File.exist?(path)
+ require_relative "show_source"
+
+ source =
+ begin
+ ShowSource.find_source(path, @irb_context)
+ rescue NameError
+ # if user enters a path that doesn't exist, it'll cause NameError when passed here because find_source would try to evaluate it as well
+ # in this case, we should just ignore the error
+ end
+
+ if source && File.exist?(source.file)
+ path = source.file
+ else
+ puts "Can not find file: #{path}"
+ return
+ end
+ end
+
+ if editor = ENV['EDITOR']
+ puts "command: '#{editor}'"
+ puts " path: #{path}"
+ system(*Shellwords.split(editor), path)
+ else
+ puts "Can not find editor setting: ENV['EDITOR']"
+ end
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/finish.rb b/lib/irb/cmd/finish.rb
new file mode 100644
index 0000000000..29f100feb5
--- /dev/null
+++ b/lib/irb/cmd/finish.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Finish < DebugCommand
+ def execute(*args)
+ super(do_cmds: ["finish", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/fork.rb b/lib/irb/cmd/fork.rb
index 31d53dcaba..255a670dce 100644
--- a/lib/irb/cmd/fork.rb
+++ b/lib/irb/cmd/fork.rb
@@ -10,13 +10,15 @@
#
#
+require_relative "nop"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
class Fork < Nop
def execute
- pid = send ExtendCommand.irb_original_method_name("fork")
+ pid = __send__ ExtendCommand.irb_original_method_name("fork")
unless pid
class << self
alias_method :exit, ExtendCommand.irb_original_method_name('exit')
@@ -33,7 +35,6 @@ module IRB
end
end
end
-end
-# :startdoc:
-
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/help.rb b/lib/irb/cmd/help.rb
index 0629479e92..2a135cdb14 100644
--- a/lib/irb/cmd/help.rb
+++ b/lib/irb/cmd/help.rb
@@ -11,13 +11,29 @@
require_relative "nop"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
class Help < Nop
+ class << self
+ def transform_args(args)
+ # Return a string literal as is for backward compatibility
+ if args.empty? || string_literal?(args)
+ args
+ else # Otherwise, consider the input as a String for convenience
+ args.strip.dump
+ end
+ end
+ end
+
+ category "Context"
+ description "Enter the mode to look up RI documents."
+
def execute(*names)
require 'rdoc/ri/driver'
- IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new)
+ opts = RDoc::RI::Driver.process_args([])
+ IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new(opts))
rescue LoadError, SystemExit
IRB::ExtendCommand::Help.remove_method(:execute)
# raise NoMethodError in ensure
@@ -42,5 +58,6 @@ module IRB
end
end
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/cmd/info.rb b/lib/irb/cmd/info.rb
new file mode 100644
index 0000000000..2c0a32b34f
--- /dev/null
+++ b/lib/irb/cmd/info.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Info < DebugCommand
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(*args)
+ super(pre_cmds: ["info", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/irb_info.rb b/lib/irb/cmd/irb_info.rb
new file mode 100644
index 0000000000..da11e8d40b
--- /dev/null
+++ b/lib/irb/cmd/irb_info.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: false
+
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class IrbInfo < Nop
+ category "IRB"
+ description "Show information about IRB."
+
+ def execute
+ Class.new {
+ def inspect
+ str = "Ruby version: #{RUBY_VERSION}\n"
+ str += "IRB version: #{IRB.version}\n"
+ str += "InputMethod: #{IRB.CurrentContext.io.inspect}\n"
+ str += ".irbrc path: #{IRB.rc_file}\n" if File.exist?(IRB.rc_file)
+ str += "RUBY_PLATFORM: #{RUBY_PLATFORM}\n"
+ str += "LANG env: #{ENV["LANG"]}\n" if ENV["LANG"] && !ENV["LANG"].empty?
+ str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
+ str += "East Asian Ambiguous Width: #{Reline.ambiguous_width.inspect}\n"
+ if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
+ codepage = `chcp`.b.sub(/.*: (\d+)\n/, '\1')
+ str += "Code page: #{codepage}\n"
+ end
+ str
+ end
+ alias_method :to_s, :inspect
+ }.new
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/load.rb b/lib/irb/cmd/load.rb
index b6769a4124..2897bbd975 100644
--- a/lib/irb/cmd/load.rb
+++ b/lib/irb/cmd/load.rb
@@ -13,21 +13,33 @@
require_relative "nop"
require_relative "../ext/loader"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
- class Load < Nop
+ class LoaderCommand < Nop
include IrbLoader
- def execute(file_name, priv = nil)
- return irb_load(file_name, priv)
+ def raise_cmd_argument_error
+ raise CommandArgumentError.new("Please specify the file name.")
end
end
- class Require < Nop
- include IrbLoader
+ class Load < LoaderCommand
+ category "IRB"
+ description "Load a Ruby file."
+
+ def execute(file_name = nil, priv = nil)
+ raise_cmd_argument_error unless file_name
+ irb_load(file_name, priv)
+ end
+ end
- def execute(file_name)
+ class Require < LoaderCommand
+ category "IRB"
+ description "Require a Ruby file."
+ def execute(file_name = nil)
+ raise_cmd_argument_error unless file_name
rex = Regexp.new("#{Regexp.quote(file_name)}(\.o|\.rb)?")
return false if $".find{|f| f =~ rex}
@@ -55,13 +67,16 @@ module IRB
end
end
- class Source < Nop
- include IrbLoader
- def execute(file_name)
+ class Source < LoaderCommand
+ category "IRB"
+ description "Loads a given file in the current session."
+
+ def execute(file_name = nil)
+ raise_cmd_argument_error unless file_name
+
source_file(file_name)
end
end
end
-
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/cmd/ls.rb b/lib/irb/cmd/ls.rb
new file mode 100644
index 0000000000..b65fae2bf1
--- /dev/null
+++ b/lib/irb/cmd/ls.rb
@@ -0,0 +1,116 @@
+# frozen_string_literal: true
+
+require "reline"
+require_relative "nop"
+require_relative "../color"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Ls < Nop
+ category "Context"
+ description "Show methods, constants, and variables. `-g [query]` or `-G [query]` allows you to filter out the output."
+
+ def self.transform_args(args)
+ if match = args&.match(/\A(?<args>.+\s|)(-g|-G)\s+(?<grep>[^\s]+)\s*\n\z/)
+ args = match[:args]
+ "#{args}#{',' unless args.chomp.empty?} grep: /#{match[:grep]}/"
+ else
+ args
+ end
+ end
+
+ def execute(*arg, grep: nil)
+ o = Output.new(grep: grep)
+
+ obj = arg.empty? ? irb_context.workspace.main : arg.first
+ locals = arg.empty? ? irb_context.workspace.binding.local_variables : []
+ klass = (obj.class == Class || obj.class == Module ? obj : obj.class)
+
+ o.dump("constants", obj.constants) if obj.respond_to?(:constants)
+ dump_methods(o, klass, obj)
+ o.dump("instance variables", obj.instance_variables)
+ o.dump("class variables", klass.class_variables)
+ o.dump("locals", locals)
+ nil
+ end
+
+ def dump_methods(o, klass, obj)
+ singleton_class = begin obj.singleton_class; rescue TypeError; nil end
+ maps = class_method_map((singleton_class || klass).ancestors)
+ maps.each do |mod, methods|
+ name = mod == singleton_class ? "#{klass}.methods" : "#{mod}#methods"
+ o.dump(name, methods)
+ end
+ end
+
+ def class_method_map(classes)
+ dumped = Array.new
+ classes.reject { |mod| mod >= Object }.map do |mod|
+ methods = mod.public_instance_methods(false).select do |m|
+ dumped.push(m) unless dumped.include?(m)
+ end
+ [mod, methods]
+ end.reverse
+ end
+
+ class Output
+ MARGIN = " "
+
+ def initialize(grep: nil)
+ @grep = grep
+ @line_width = screen_width - MARGIN.length # right padding
+ end
+
+ def dump(name, strs)
+ strs = strs.grep(@grep) if @grep
+ strs = strs.sort
+ return if strs.empty?
+
+ # Attempt a single line
+ print "#{Color.colorize(name, [:BOLD, :BLUE])}: "
+ if fits_on_line?(strs, cols: strs.size, offset: "#{name}: ".length)
+ puts strs.join(MARGIN)
+ return
+ end
+ puts
+
+ # Dump with the largest # of columns that fits on a line
+ cols = strs.size
+ until fits_on_line?(strs, cols: cols, offset: MARGIN.length) || cols == 1
+ cols -= 1
+ end
+ widths = col_widths(strs, cols: cols)
+ strs.each_slice(cols) do |ss|
+ puts ss.map.with_index { |s, i| "#{MARGIN}%-#{widths[i]}s" % s }.join
+ end
+ end
+
+ private
+
+ def fits_on_line?(strs, cols:, offset: 0)
+ width = col_widths(strs, cols: cols).sum + MARGIN.length * (cols - 1)
+ width <= @line_width - offset
+ end
+
+ def col_widths(strs, cols:)
+ cols.times.map do |col|
+ (col...strs.size).step(cols).map do |i|
+ strs[i].length
+ end.max
+ end
+ end
+
+ def screen_width
+ Reline.get_screen_size.last
+ rescue Errno::EINVAL # in `winsize': Invalid argument - <STDIN>
+ 80
+ end
+ end
+ private_constant :Output
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/measure.rb b/lib/irb/cmd/measure.rb
new file mode 100644
index 0000000000..9122e2dac9
--- /dev/null
+++ b/lib/irb/cmd/measure.rb
@@ -0,0 +1,48 @@
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Measure < Nop
+ category "Misc"
+ description "`measure` enables the mode to measure processing time. `measure :off` disables it."
+
+ def initialize(*args)
+ super(*args)
+ end
+
+ def execute(type = nil, arg = nil, &block)
+ # Please check IRB.init_config in lib/irb/init.rb that sets
+ # IRB.conf[:MEASURE_PROC] to register default "measure" methods,
+ # "measure :time" (abbreviated as "measure") and "measure :stackprof".
+ case type
+ when :off
+ IRB.conf[:MEASURE] = nil
+ IRB.unset_measure_callback(arg)
+ when :list
+ IRB.conf[:MEASURE_CALLBACKS].each do |type_name, _, arg_val|
+ puts "- #{type_name}" + (arg_val ? "(#{arg_val.inspect})" : '')
+ end
+ when :on
+ IRB.conf[:MEASURE] = true
+ added = IRB.set_measure_callback(type, arg)
+ puts "#{added[0]} is added." if added
+ else
+ if block_given?
+ IRB.conf[:MEASURE] = true
+ added = IRB.set_measure_callback(&block)
+ puts "#{added[0]} is added." if added
+ else
+ IRB.conf[:MEASURE] = true
+ added = IRB.set_measure_callback(type, arg)
+ puts "#{added[0]} is added." if added
+ end
+ end
+ nil
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/next.rb b/lib/irb/cmd/next.rb
new file mode 100644
index 0000000000..d29c82e7fc
--- /dev/null
+++ b/lib/irb/cmd/next.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Next < DebugCommand
+ def execute(*args)
+ super(do_cmds: ["next", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/nop.rb b/lib/irb/cmd/nop.rb
index 9cf4337c28..c616c054a8 100644
--- a/lib/irb/cmd/nop.rb
+++ b/lib/irb/cmd/nop.rb
@@ -9,15 +9,46 @@
#
#
#
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
+ class CommandArgumentError < StandardError; end
+
class Nop
+ class << self
+ def category(category = nil)
+ @category = category if category
+ @category
+ end
+
+ def description(description = nil)
+ @description = description if description
+ @description
+ end
+ private
- def self.execute(conf, *opts)
- command = new(conf)
- command.execute(*opts)
+ def string_literal?(args)
+ sexp = Ripper.sexp(args)
+ sexp && sexp.size == 2 && sexp.last&.first&.first == :string_literal
+ end
+ end
+
+ if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0"
+ def self.execute(conf, *opts, **kwargs, &block)
+ command = new(conf)
+ command.execute(*opts, **kwargs, &block)
+ rescue CommandArgumentError => e
+ puts e.message
+ end
+ else
+ def self.execute(conf, *opts, &block)
+ command = new(conf)
+ command.execute(*opts, &block)
+ rescue CommandArgumentError => e
+ puts e.message
+ end
end
def initialize(conf)
@@ -35,5 +66,6 @@ module IRB
end
end
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/cmd/pushws.rb b/lib/irb/cmd/pushws.rb
index 187b276e48..41d2e705f1 100644
--- a/lib/irb/cmd/pushws.rb
+++ b/lib/irb/cmd/pushws.rb
@@ -13,16 +13,23 @@
require_relative "nop"
require_relative "../ext/workspaces"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
class Workspaces < Nop
+ category "IRB"
+ description "Show workspaces."
+
def execute(*obj)
irb_context.workspaces.collect{|ws| ws.main}
end
end
class PushWorkspace < Workspaces
+ category "IRB"
+ description "Push an object to the workspace stack."
+
def execute(*obj)
irb_context.push_workspace(*obj)
super
@@ -30,12 +37,15 @@ module IRB
end
class PopWorkspace < Workspaces
+ category "IRB"
+ description "Pop a workspace from the workspace stack."
+
def execute(*obj)
irb_context.pop_workspace(*obj)
super
end
end
end
-end
-# :startdoc:
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/show_cmds.rb b/lib/irb/cmd/show_cmds.rb
new file mode 100644
index 0000000000..acced27d48
--- /dev/null
+++ b/lib/irb/cmd/show_cmds.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+require "stringio"
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class ShowCmds < Nop
+ category "IRB"
+ description "List all available commands and their description."
+
+ def execute(*args)
+ commands_info = IRB::ExtendCommandBundle.all_commands_info
+ commands_grouped_by_categories = commands_info.group_by { |cmd| cmd[:category] }
+ longest_cmd_name_length = commands_info.map { |c| c[:display_name] }.max { |a, b| a.length <=> b.length }.length
+
+ output = StringIO.new
+
+ commands_grouped_by_categories.each do |category, cmds|
+ output.puts Color.colorize(category, [:BOLD])
+
+ cmds.each do |cmd|
+ output.puts " #{cmd[:display_name].to_s.ljust(longest_cmd_name_length)} #{cmd[:description]}"
+ end
+
+ output.puts
+ end
+
+ puts output.string
+
+ nil
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/show_source.rb b/lib/irb/cmd/show_source.rb
new file mode 100644
index 0000000000..ea700be4bf
--- /dev/null
+++ b/lib/irb/cmd/show_source.rb
@@ -0,0 +1,112 @@
+# frozen_string_literal: true
+
+require_relative "nop"
+require_relative "../color"
+require_relative "../ruby-lex"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class ShowSource < Nop
+ category "Context"
+ description "Show the source code of a given method or constant."
+
+ class << self
+ def transform_args(args)
+ # Return a string literal as is for backward compatibility
+ if args.empty? || string_literal?(args)
+ args
+ else # Otherwise, consider the input as a String for convenience
+ args.strip.dump
+ end
+ end
+
+ def find_source(str, irb_context)
+ case str
+ when /\A[A-Z]\w*(::[A-Z]\w*)*\z/ # Const::Name
+ eval(str, irb_context.workspace.binding) # trigger autoload
+ base = irb_context.workspace.binding.receiver.yield_self { |r| r.is_a?(Module) ? r : Object }
+ file, line = base.const_source_location(str) if base.respond_to?(:const_source_location) # Ruby 2.7+
+ when /\A(?<owner>[A-Z]\w*(::[A-Z]\w*)*)#(?<method>[^ :.]+)\z/ # Class#method
+ owner = eval(Regexp.last_match[:owner], irb_context.workspace.binding)
+ method = Regexp.last_match[:method]
+ if owner.respond_to?(:instance_method) && owner.instance_methods.include?(method.to_sym)
+ file, line = owner.instance_method(method).source_location
+ end
+ when /\A((?<receiver>.+)(\.|::))?(?<method>[^ :.]+)\z/ # method, receiver.method, receiver::method
+ receiver = eval(Regexp.last_match[:receiver] || 'self', irb_context.workspace.binding)
+ method = Regexp.last_match[:method]
+ file, line = receiver.method(method).source_location if receiver.respond_to?(method)
+ end
+ if file && line
+ Source.new(file: file, first_line: line, last_line: find_end(file, line))
+ end
+ end
+
+ private
+
+ def find_end(file, first_line)
+ return first_line unless File.exist?(file)
+ lex = RubyLex.new
+ lines = File.read(file).lines[(first_line - 1)..-1]
+ tokens = RubyLex.ripper_lex_without_warning(lines.join)
+ prev_tokens = []
+
+ # chunk with line number
+ tokens.chunk { |tok| tok.pos[0] }.each do |lnum, chunk|
+ code = lines[0..lnum].join
+ prev_tokens.concat chunk
+ continue = lex.process_continue(prev_tokens)
+ code_block_open = lex.check_code_block(code, prev_tokens)
+ if !continue && !code_block_open
+ return first_line + lnum
+ end
+ end
+ first_line
+ end
+ end
+
+ def execute(str = nil)
+ unless str.is_a?(String)
+ puts "Error: Expected a string but got #{str.inspect}"
+ return
+ end
+
+ source = self.class.find_source(str, @irb_context)
+ if source && File.exist?(source.file)
+ show_source(source)
+ else
+ puts "Error: Couldn't locate a definition for #{str}"
+ end
+ nil
+ end
+
+ private
+
+ # @param [IRB::ExtendCommand::ShowSource::Source] source
+ def show_source(source)
+ puts
+ puts "#{bold("From")}: #{source.file}:#{source.first_line}"
+ puts
+ code = IRB::Color.colorize_code(File.read(source.file))
+ puts code.lines[(source.first_line - 1)...source.last_line].join
+ puts
+ end
+
+ def bold(str)
+ Color.colorize(str, [:BOLD])
+ end
+
+ Source = Struct.new(
+ :file, # @param [String] - file name
+ :first_line, # @param [String] - first line
+ :last_line, # @param [String] - last line
+ keyword_init: true,
+ )
+ private_constant :Source
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/step.rb b/lib/irb/cmd/step.rb
new file mode 100644
index 0000000000..2bc74a9d79
--- /dev/null
+++ b/lib/irb/cmd/step.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Step < DebugCommand
+ def execute(*args)
+ super(do_cmds: ["step", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/cmd/subirb.rb b/lib/irb/cmd/subirb.rb
index 1e18607d1a..699b35fcb4 100644
--- a/lib/irb/cmd/subirb.rb
+++ b/lib/irb/cmd/subirb.rb
@@ -10,34 +10,62 @@
#
require_relative "nop"
-require_relative "../ext/multi-irb"
-# :stopdoc:
module IRB
+ # :stopdoc:
+
module ExtendCommand
- class IrbCommand < Nop
+ class MultiIRBCommand < Nop
+ def initialize(conf)
+ super
+ extend_irb_context
+ end
+
+ private
+
+ def extend_irb_context
+ # this extension patches IRB context like IRB.CurrentContext
+ require_relative "../ext/multi-irb"
+ end
+ end
+
+ class IrbCommand < MultiIRBCommand
+ category "IRB"
+ description "Start a child IRB."
+
def execute(*obj)
IRB.irb(nil, *obj)
end
end
- class Jobs < Nop
+ class Jobs < MultiIRBCommand
+ category "IRB"
+ description "List of current sessions."
+
def execute
IRB.JobManager
end
end
- class Foreground < Nop
- def execute(key)
+ class Foreground < MultiIRBCommand
+ category "IRB"
+ description "Switches to the session of the given number."
+
+ def execute(key = nil)
+ raise CommandArgumentError.new("Please specify the id of target IRB job (listed in the `jobs` command).") unless key
IRB.JobManager.switch(key)
end
end
- class Kill < Nop
+ class Kill < MultiIRBCommand
+ category "IRB"
+ description "Kills the session with the given number."
+
def execute(*keys)
IRB.JobManager.kill(*keys)
end
end
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/cmd/whereami.rb b/lib/irb/cmd/whereami.rb
new file mode 100644
index 0000000000..8f56ba073d
--- /dev/null
+++ b/lib/irb/cmd/whereami.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require_relative "nop"
+
+module IRB
+ # :stopdoc:
+
+ module ExtendCommand
+ class Whereami < Nop
+ category "Context"
+ description "Show the source code around binding.irb again."
+
+ def execute(*)
+ code = irb_context.workspace.code_around_binding
+ if code
+ puts code
+ else
+ puts "The current context doesn't have code."
+ end
+ end
+ end
+ end
+
+ # :startdoc:
+end
diff --git a/lib/irb/color.rb b/lib/irb/color.rb
index d2b9674a71..6378e14856 100644
--- a/lib/irb/color.rb
+++ b/lib/irb/color.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'reline'
require 'ripper'
+require_relative 'ruby-lex'
module IRB # :nodoc:
module Color
@@ -16,7 +17,7 @@ module IRB # :nodoc:
CYAN = 36
TOKEN_KEYWORDS = {
- on_kw: ['nil', 'self', 'true', 'false', '__FILE__', '__LINE__'],
+ on_kw: ['nil', 'self', 'true', 'false', '__FILE__', '__LINE__', '__ENCODING__'],
on_const: ['ENV'],
}
private_constant :TOKEN_KEYWORDS
@@ -59,6 +60,11 @@ module IRB # :nodoc:
on_words_beg: [[RED, BOLD], ALL],
on_parse_error: [[RED, REVERSE], ALL],
compile_error: [[RED, REVERSE], ALL],
+ on_assign_error: [[RED, REVERSE], ALL],
+ on_alias_error: [[RED, REVERSE], ALL],
+ on_class_name_error:[[RED, REVERSE], ALL],
+ on_param_error: [[RED, REVERSE], ALL],
+ on___end__: [[GREEN], ALL],
}
rescue NameError
# Give up highlighting Ripper-incompatible older Ruby
@@ -66,9 +72,20 @@ module IRB # :nodoc:
end
private_constant :TOKEN_SEQ_EXPRS
+ ERROR_TOKENS = TOKEN_SEQ_EXPRS.keys.select { |k| k.to_s.end_with?('error') }
+ private_constant :ERROR_TOKENS
+
class << self
def colorable?
- $stdout.tty? && supported? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
+ supported = $stdout.tty? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb'))
+
+ # because ruby/debug also uses irb's color module selectively,
+ # irb won't be activated in that case.
+ if IRB.respond_to?(:conf)
+ supported && IRB.conf.fetch(:USE_COLORIZE, true)
+ else
+ supported
+ end
end
def inspect_colorable?(obj, seen: {}.compare_by_identity)
@@ -92,46 +109,56 @@ module IRB # :nodoc:
end
end
- def clear
- return '' unless colorable?
+ def clear(colorable: colorable?)
+ return '' unless colorable
"\e[#{CLEAR}m"
end
- def colorize(text, seq)
- return text unless colorable?
+ def colorize(text, seq, colorable: colorable?)
+ return text unless colorable
seq = seq.map { |s| "\e[#{const_get(s)}m" }.join('')
- "#{seq}#{text}#{clear}"
+ "#{seq}#{text}#{clear(colorable: colorable)}"
end
# If `complete` is false (code is incomplete), this does not warn compile_error.
# This option is needed to avoid warning a user when the compile_error is happening
# because the input is not wrong but just incomplete.
- def colorize_code(code, complete: true)
- return code unless colorable?
+ def colorize_code(code, complete: true, ignore_error: false, colorable: colorable?, local_variables: [])
+ return code unless colorable
symbol_state = SymbolState.new
colored = +''
- length = 0
+ lvars_code = RubyLex.generate_local_variables_assign_code(local_variables)
+ code_with_lvars = lvars_code ? "#{lvars_code}\n#{code}" : code
+
+ scan(code_with_lvars, allow_last_error: !complete) do |token, str, expr|
+ # handle uncolorable code
+ if token.nil?
+ colored << Reline::Unicode.escape_for_print(str)
+ next
+ end
+
+ # IRB::ColorPrinter skips colorizing fragments with any invalid token
+ if ignore_error && ERROR_TOKENS.include?(token)
+ return Reline::Unicode.escape_for_print(code)
+ end
- scan(code, allow_last_error: !complete) do |token, str, expr|
in_symbol = symbol_state.scan_token(token)
str.each_line do |line|
line = Reline::Unicode.escape_for_print(line)
if seq = dispatch_seq(token, expr, line, in_symbol: in_symbol)
colored << seq.map { |s| "\e[#{s}m" }.join('')
- colored << line.sub(/\Z/, clear)
+ colored << line.sub(/\Z/, clear(colorable: colorable))
else
colored << line
end
end
- length += str.bytesize
end
- # give up colorizing incomplete Ripper tokens
- if length != code.bytesize
- return Reline::Unicode.escape_for_print(code)
+ if lvars_code
+ raise "#{lvars_code.dump} should have no \\n" if lvars_code.include?("\n")
+ colored.sub!(/\A.+\n/, '') # delete_prefix lvars_code with colors
end
-
colored
end
@@ -145,44 +172,50 @@ module IRB # :nodoc:
seen.delete(obj)
end
- # Ripper::Lexer::Elem#state is supported on Ruby 2.5+
- def supported?
- return @supported if defined?(@supported)
- @supported = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
- end
-
def scan(code, allow_last_error:)
- pos = [1, 0]
-
verbose, $VERBOSE = $VERBOSE, nil
- lexer = Ripper::Lexer.new(code)
- if lexer.respond_to?(:scan) # Ruby 2.7+
- lexer.scan.each do |elem|
- str = elem.tok
- next if allow_last_error and /meets end of file|unexpected end-of-input/ =~ elem.message
- next if ([elem.pos[0], elem.pos[1] + str.bytesize] <=> pos) <= 0
-
- str.each_line do |line|
- if line.end_with?("\n")
- pos[0] += 1
- pos[1] = 0
- else
- pos[1] += line.bytesize
- end
+ RubyLex.compile_with_errors_suppressed(code) do |inner_code, line_no|
+ lexer = Ripper::Lexer.new(inner_code, '(ripper)', line_no)
+ byte_pos = 0
+ line_positions = [0]
+ inner_code.lines.each do |line|
+ line_positions << line_positions.last + line.bytesize
+ end
+
+ on_scan = proc do |elem|
+ start_pos = line_positions[elem.pos[0] - 1] + elem.pos[1]
+
+ # yield uncolorable code
+ if byte_pos < start_pos
+ yield(nil, inner_code.byteslice(byte_pos...start_pos), nil)
end
- yield(elem.event, str, elem.state)
+ if byte_pos <= start_pos
+ str = elem.tok
+ yield(elem.event, str, elem.state)
+ byte_pos = start_pos + str.bytesize
+ end
end
- else
- lexer.parse.each do |elem|
- yield(elem.event, elem.tok, elem.state)
+
+ if lexer.respond_to?(:scan) # Ruby 2.7+
+ lexer.scan.each do |elem|
+ next if allow_last_error and /meets end of file|unexpected end-of-input/ =~ elem.message
+ on_scan.call(elem)
+ end
+ else
+ lexer.parse.sort_by(&:pos).each do |elem|
+ on_scan.call(elem)
+ end
end
+ # yield uncolorable DATA section
+ yield(nil, inner_code.byteslice(byte_pos...inner_code.bytesize), nil) if byte_pos < inner_code.bytesize
end
+ ensure
$VERBOSE = verbose
end
def dispatch_seq(token, expr, str, in_symbol:)
- if token == :on_parse_error or token == :compile_error
+ if ERROR_TOKENS.include?(token)
TOKEN_SEQ_EXPRS[token][0]
elsif in_symbol
[YELLOW]
diff --git a/lib/irb/color_printer.rb b/lib/irb/color_printer.rb
new file mode 100644
index 0000000000..1127bcecb4
--- /dev/null
+++ b/lib/irb/color_printer.rb
@@ -0,0 +1,50 @@
+# frozen_string_literal: true
+require 'pp'
+require_relative 'color'
+
+module IRB
+ class ColorPrinter < ::PP
+ class << self
+ def pp(obj, out = $>, width = screen_width)
+ q = ColorPrinter.new(out, width)
+ q.guard_inspect_key {q.pp obj}
+ q.flush
+ out << "\n"
+ end
+
+ private
+
+ def screen_width
+ Reline.get_screen_size.last
+ rescue Errno::EINVAL # in `winsize': Invalid argument - <STDIN>
+ 79
+ end
+ end
+
+ def pp(obj)
+ if obj.is_a?(String)
+ # Avoid calling Ruby 2.4+ String#pretty_print that splits a string by "\n"
+ text(obj.inspect)
+ else
+ super
+ end
+ end
+
+ def text(str, width = nil)
+ unless str.is_a?(String)
+ str = str.inspect
+ end
+ width ||= str.length
+
+ case str
+ when ''
+ when ',', '=>', '[', ']', '{', '}', '..', '...', /\A@\w+\z/
+ super(str, width)
+ when /\A#</, '=', '>'
+ super(Color.colorize(str, [:GREEN]), width)
+ else
+ super(Color.colorize_code(str, ignore_error: true), width)
+ end
+ end
+ end
+end
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 3536e8ec87..34640e17f9 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -7,21 +7,43 @@
# From Original Idea of shugo@ruby-lang.org
#
-require "readline"
-autoload :RDoc, "rdoc"
+require_relative 'ruby-lex'
module IRB
module InputCompletor # :nodoc:
+ using Module.new {
+ refine ::Binding do
+ def eval_methods
+ ::Kernel.instance_method(:methods).bind(eval("self")).call
+ end
+
+ def eval_private_methods
+ ::Kernel.instance_method(:private_methods).bind(eval("self")).call
+ end
+
+ def eval_instance_variables
+ ::Kernel.instance_method(:instance_variables).bind(eval("self")).call
+ end
+ def eval_global_variables
+ ::Kernel.instance_method(:global_variables).bind(eval("self")).call
+ end
+
+ def eval_class_constants
+ ::Module.instance_method(:constants).bind(eval("self.class")).call
+ end
+ end
+ }
# Set of reserved words used by Ruby, you should not use these for
# constants or variables
ReservedWords = %w[
+ __ENCODING__ __LINE__ __FILE__
BEGIN END
alias and
begin break
case class
- def defined do
+ def defined? do
else elsif end ensure
false for
if in
@@ -38,8 +60,110 @@ module IRB
BASIC_WORD_BREAK_CHARACTERS = " \t\n`><=;|&{("
- CompletionProc = proc { |input|
- retrieve_completion_data(input).compact.map{ |i| i.encode(Encoding.default_external) }
+ def self.absolute_path?(p) # TODO Remove this method after 2.6 EOL.
+ if File.respond_to?(:absolute_path?)
+ File.absolute_path?(p)
+ else
+ File.absolute_path(p) == p
+ end
+ end
+
+ GEM_PATHS =
+ if defined?(Gem::Specification)
+ Gem::Specification.latest_specs(true).map { |s|
+ s.require_paths.map { |p|
+ if absolute_path?(p)
+ p
+ else
+ File.join(s.full_gem_path, p)
+ end
+ }
+ }.flatten
+ else
+ []
+ end.freeze
+
+ def self.retrieve_gem_and_system_load_path
+ candidates = (GEM_PATHS | $LOAD_PATH)
+ candidates.map do |p|
+ if p.respond_to?(:to_path)
+ p.to_path
+ else
+ String(p) rescue nil
+ end
+ end.compact.sort
+ end
+
+ def self.retrieve_files_to_require_from_load_path
+ @@files_from_load_path ||=
+ (
+ shortest = []
+ rest = retrieve_gem_and_system_load_path.each_with_object([]) { |path, result|
+ begin
+ names = Dir.glob("**/*.{rb,#{RbConfig::CONFIG['DLEXT']}}", base: path)
+ rescue Errno::ENOENT
+ nil
+ end
+ next if names.empty?
+ names.map! { |n| n.sub(/\.(rb|#{RbConfig::CONFIG['DLEXT']})\z/, '') }.sort!
+ shortest << names.shift
+ result.concat(names)
+ }
+ shortest.sort! | rest
+ )
+ end
+
+ def self.retrieve_files_to_require_relative_from_current_dir
+ @@files_from_current_dir ||= Dir.glob("**/*.{rb,#{RbConfig::CONFIG['DLEXT']}}", base: '.').map { |path|
+ path.sub(/\.(rb|#{RbConfig::CONFIG['DLEXT']})\z/, '')
+ }
+ end
+
+ CompletionRequireProc = lambda { |target, preposing = nil, postposing = nil|
+ if target =~ /\A(['"])([^'"]+)\Z/
+ quote = $1
+ actual_target = $2
+ else
+ return nil # It's not String literal
+ end
+ tokens = RubyLex.ripper_lex_without_warning(preposing.gsub(/\s*\z/, ''))
+ tok = nil
+ tokens.reverse_each do |t|
+ unless [:on_lparen, :on_sp, :on_ignored_sp, :on_nl, :on_ignored_nl, :on_comment].include?(t.event)
+ tok = t
+ break
+ end
+ end
+ result = []
+ if tok && tok.event == :on_ident && tok.state == Ripper::EXPR_CMDARG
+ case tok.tok
+ when 'require'
+ result = retrieve_files_to_require_from_load_path.select { |path|
+ path.start_with?(actual_target)
+ }.map { |path|
+ quote + path
+ }
+ when 'require_relative'
+ result = retrieve_files_to_require_relative_from_current_dir.select { |path|
+ path.start_with?(actual_target)
+ }.map { |path|
+ quote + path
+ }
+ end
+ end
+ result
+ }
+
+ CompletionProc = lambda { |target, preposing = nil, postposing = nil|
+ if preposing && postposing
+ result = CompletionRequireProc.(target, preposing, postposing)
+ unless result
+ result = retrieve_completion_data(target).compact.map{ |i| i.encode(Encoding.default_external) }
+ end
+ result
+ else
+ retrieve_completion_data(target).compact.map{ |i| i.encode(Encoding.default_external) }
+ end
}
def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding, doc_namespace: false)
@@ -47,67 +171,71 @@ module IRB
when /^((["'`]).*\2)\.([^.]*)$/
# String
receiver = $1
- message = Regexp.quote($3)
+ message = $3
- candidates = String.instance_methods.collect{|m| m.to_s}
if doc_namespace
"String.#{message}"
else
+ candidates = String.instance_methods.collect{|m| m.to_s}
select_message(receiver, message, candidates)
end
when /^(\/[^\/]*\/)\.([^.]*)$/
# Regexp
receiver = $1
- message = Regexp.quote($2)
+ message = $2
- candidates = Regexp.instance_methods.collect{|m| m.to_s}
if doc_namespace
"Regexp.#{message}"
else
+ candidates = Regexp.instance_methods.collect{|m| m.to_s}
select_message(receiver, message, candidates)
end
when /^([^\]]*\])\.([^.]*)$/
# Array
receiver = $1
- message = Regexp.quote($2)
+ message = $2
- candidates = Array.instance_methods.collect{|m| m.to_s}
if doc_namespace
"Array.#{message}"
else
+ candidates = Array.instance_methods.collect{|m| m.to_s}
select_message(receiver, message, candidates)
end
when /^([^\}]*\})\.([^.]*)$/
# Proc or Hash
receiver = $1
- message = Regexp.quote($2)
+ message = $2
- proc_candidates = Proc.instance_methods.collect{|m| m.to_s}
- hash_candidates = Hash.instance_methods.collect{|m| m.to_s}
if doc_namespace
["Proc.#{message}", "Hash.#{message}"]
else
+ proc_candidates = Proc.instance_methods.collect{|m| m.to_s}
+ hash_candidates = Hash.instance_methods.collect{|m| m.to_s}
select_message(receiver, message, proc_candidates | hash_candidates)
end
when /^(:[^:.]*)$/
# Symbol
- return nil if doc_namespace
- if Symbol.respond_to?(:all_symbols)
+ if doc_namespace
+ nil
+ else
sym = $1
- candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name}
+ candidates = Symbol.all_symbols.collect do |s|
+ ":" + s.id2name.encode(Encoding.default_external)
+ rescue EncodingError
+ # ignore
+ end
candidates.grep(/^#{Regexp.quote(sym)}/)
- else
- []
end
-
- when /^::([A-Z][^:\.\(]*)$/
+ when /^::([A-Z][^:\.\(\)]*)$/
# Absolute Constant or class methods
receiver = $1
+
candidates = Object.constants.collect{|m| m.to_s}
+
if doc_namespace
candidates.find { |i| i == receiver }
else
@@ -117,40 +245,43 @@ module IRB
when /^([A-Z].*)::([^:.]*)$/
# Constant or class methods
receiver = $1
- message = Regexp.quote($2)
- begin
- candidates = eval("#{receiver}.constants.collect{|m| m.to_s}", bind)
- candidates |= eval("#{receiver}.methods.collect{|m| m.to_s}", bind)
- rescue Exception
- candidates = []
- end
+ message = $2
+
if doc_namespace
"#{receiver}::#{message}"
else
- select_message(receiver, message, candidates, "::")
+ begin
+ candidates = eval("#{receiver}.constants.collect{|m| m.to_s}", bind)
+ candidates |= eval("#{receiver}.methods.collect{|m| m.to_s}", bind)
+ rescue Exception
+ candidates = []
+ end
+
+ select_message(receiver, message, candidates.sort, "::")
end
when /^(:[^:.]+)(\.|::)([^.]*)$/
# Symbol
receiver = $1
sep = $2
- message = Regexp.quote($3)
+ message = $3
- candidates = Symbol.instance_methods.collect{|m| m.to_s}
if doc_namespace
"Symbol.#{message}"
else
+ candidates = Symbol.instance_methods.collect{|m| m.to_s}
select_message(receiver, message, candidates, sep)
end
- when /^(?<num>-?(0[dbo])?[0-9_]+(\.[0-9_]+)?(([eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
+ when /^(?<num>-?(?:0[dbo])?[0-9_]+(?:\.[0-9_]+)?(?:(?:[eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
# Numeric
receiver = $~[:num]
sep = $~[:sep]
- message = Regexp.quote($~[:mes])
+ message = $~[:mes]
begin
instance = eval(receiver, bind)
+
if doc_namespace
"#{instance.class.name}.#{message}"
else
@@ -161,7 +292,7 @@ module IRB
if doc_namespace
nil
else
- candidates = []
+ []
end
end
@@ -169,7 +300,7 @@ module IRB
# Numeric(0xFFFF)
receiver = $1
sep = $2
- message = Regexp.quote($3)
+ message = $3
begin
instance = eval(receiver, bind)
@@ -183,7 +314,7 @@ module IRB
if doc_namespace
nil
else
- candidates = []
+ []
end
end
@@ -191,22 +322,23 @@ module IRB
# global var
gvar = $1
all_gvars = global_variables.collect{|m| m.to_s}
+
if doc_namespace
all_gvars.find{ |i| i == gvar }
else
all_gvars.grep(Regexp.new(Regexp.quote(gvar)))
end
- when /^([^."].*)(\.|::)([^.]*)$/
+ when /^([^.:"].*)(\.|::)([^.]*)$/
# variable.func or func.func
receiver = $1
sep = $2
- message = Regexp.quote($3)
+ message = $3
- gv = eval("global_variables", bind).collect{|m| m.to_s}.append("true", "false", "nil")
- lv = eval("local_variables", bind).collect{|m| m.to_s}
- iv = eval("instance_variables", bind).collect{|m| m.to_s}
- cv = eval("self.class.constants", bind).collect{|m| m.to_s}
+ gv = bind.eval_global_variables.collect{|m| m.to_s}.push("true", "false", "nil")
+ lv = bind.local_variables.collect{|m| m.to_s}
+ iv = bind.eval_instance_variables.collect{|m| m.to_s}
+ cv = bind.eval_class_constants.collect{|m| m.to_s}
if (gv | lv | iv | cv).include?(receiver) or /^[A-Z]/ =~ receiver && /\./ !~ receiver
# foo.func and foo is var. OR
@@ -229,13 +361,16 @@ module IRB
to_ignore = ignored_modules
ObjectSpace.each_object(Module){|m|
next if (to_ignore.include?(m) rescue true)
+ next unless m.respond_to?(:instance_methods) # JRuby has modules that represent java packages. They don't include many common ruby methods
candidates.concat m.instance_methods(false).collect{|x| x.to_s}
}
candidates.sort!
candidates.uniq!
end
+
if doc_namespace
- "#{rec.class.name}#{sep}#{candidates.find{ |i| i == message }}"
+ rec_class = rec.is_a?(Module) ? rec : rec.class
+ "#{rec_class.name}#{sep}#{candidates.find{ |i| i == message }}"
else
select_message(receiver, message, candidates, sep)
end
@@ -244,39 +379,52 @@ module IRB
# unknown(maybe String)
receiver = ""
- message = Regexp.quote($1)
+ message = $1
candidates = String.instance_methods(true).collect{|m| m.to_s}
+
if doc_namespace
"String.#{candidates.find{ |i| i == message }}"
else
- select_message(receiver, message, candidates)
+ select_message(receiver, message, candidates.sort)
end
else
- candidates = eval("methods | private_methods | local_variables | instance_variables | self.class.constants", bind).collect{|m| m.to_s}
- conditions |= ReservedWords
-
if doc_namespace
- candidates.find{ |i| i == input }
+ vars = (bind.local_variables | bind.eval_instance_variables).collect{|m| m.to_s}
+ perfect_match_var = vars.find{|m| m.to_s == input}
+ if perfect_match_var
+ eval("#{perfect_match_var}.class.name", bind)
+ else
+ candidates = (bind.eval_methods | bind.eval_private_methods | bind.local_variables | bind.eval_instance_variables | bind.eval_class_constants).collect{|m| m.to_s}
+ candidates |= ReservedWords
+ candidates.find{ |i| i == input }
+ end
else
- candidates.grep(/^#{Regexp.quote(input)}/)
+ candidates = (bind.eval_methods | bind.eval_private_methods | bind.local_variables | bind.eval_instance_variables | bind.eval_class_constants).collect{|m| m.to_s}
+ candidates |= ReservedWords
+ candidates.grep(/^#{Regexp.quote(input)}/).sort
end
end
end
- PerfectMatchedProc = ->(matched) {
+ PerfectMatchedProc = ->(matched, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding) {
+ begin
+ require 'rdoc'
+ rescue LoadError
+ return
+ end
+
RDocRIDriver ||= RDoc::RI::Driver.new
+
if matched =~ /\A(?:::)?RubyVM/ and not ENV['RUBY_YES_I_AM_NOT_A_NORMAL_USER']
- File.open(File.join(__dir__, 'ruby_logo.aa')) do |f|
- RDocRIDriver.page do |io|
- IO.copy_stream(f, io)
- end
- end
+ IRB.__send__(:easter_egg)
return
end
- namespace = retrieve_completion_data(matched, doc_namespace: true)
- return unless matched
+
+ namespace = retrieve_completion_data(matched, bind: bind, doc_namespace: true)
+ return unless namespace
+
if namespace.is_a?(Array)
out = RDoc::Markup::Document.new
namespace.each do |m|
@@ -298,7 +446,7 @@ module IRB
Operators = %w[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~]
def self.select_message(receiver, message, candidates, sep = ".")
- candidates.grep(/^#{message}/).collect do |e|
+ candidates.grep(/^#{Regexp.quote(message)}/).collect do |e|
case e
when /^[a-zA-Z_]/
receiver + sep + e
diff --git a/lib/irb/context.rb b/lib/irb/context.rb
index 686738cd40..91fbb2fcf1 100644
--- a/lib/irb/context.rb
+++ b/lib/irb/context.rb
@@ -22,7 +22,7 @@ module IRB
#
# The optional +input_method+ argument:
#
- # +nil+:: uses stdin or Reidline or Readline
+ # +nil+:: uses stdin or Reline or Readline
# +String+:: uses a File
# +other+:: uses this as InputMethod
def initialize(irb, workspace = nil, input_method = nil)
@@ -32,7 +32,7 @@ module IRB
else
@workspace = WorkSpace.new
end
- @thread = Thread.current if defined? Thread
+ @thread = Thread.current
# copy of default configuration
@ap_name = IRB.conf[:AP_NAME]
@@ -48,12 +48,20 @@ module IRB
end
if IRB.conf.has_key?(:USE_MULTILINE)
@use_multiline = IRB.conf[:USE_MULTILINE]
- elsif IRB.conf.has_key?(:USE_REIDLINE) # backward compatibility
+ elsif IRB.conf.has_key?(:USE_RELINE) # backward compatibility
+ warn <<~MSG.strip
+ USE_RELINE is deprecated, please use USE_MULTILINE instead.
+ MSG
+ @use_multiline = IRB.conf[:USE_RELINE]
+ elsif IRB.conf.has_key?(:USE_REIDLINE)
+ warn <<~MSG.strip
+ USE_REIDLINE is deprecated, please use USE_MULTILINE instead.
+ MSG
@use_multiline = IRB.conf[:USE_REIDLINE]
else
@use_multiline = nil
end
- @use_colorize = IRB.conf[:USE_COLORIZE]
+ @use_autocomplete = IRB.conf[:USE_AUTOCOMPLETE]
@verbose = IRB.conf[:VERBOSE]
@io = nil
@@ -83,14 +91,14 @@ module IRB
when nil
if STDIN.tty? && IRB.conf[:PROMPT_MODE] != :INF_RUBY && !use_singleline?
# Both of multiline mode and singleline mode aren't specified.
- @io = ReidlineInputMethod.new
+ @io = RelineInputMethod.new
else
@io = nil
end
when false
@io = nil
when true
- @io = ReidlineInputMethod.new
+ @io = RelineInputMethod.new
end
unless @io
case use_singleline?
@@ -115,6 +123,10 @@ module IRB
end
@io = StdioInputMethod.new unless @io
+ when '-'
+ @io = FileInputMethod.new($stdin)
+ @irb_name = '-'
+ @irb_path = '-'
when String
@io = FileInputMethod.new(input_method)
@irb_name = File.basename(input_method)
@@ -124,6 +136,8 @@ module IRB
end
self.save_history = IRB.conf[:SAVE_HISTORY] if IRB.conf[:SAVE_HISTORY]
+ @extra_doc_dirs = IRB.conf[:EXTRA_DOC_DIRS]
+
@echo = IRB.conf[:ECHO]
if @echo.nil?
@echo = true
@@ -131,8 +145,15 @@ module IRB
@echo_on_assignment = IRB.conf[:ECHO_ON_ASSIGNMENT]
if @echo_on_assignment.nil?
- @echo_on_assignment = false
+ @echo_on_assignment = :truncate
+ end
+
+ @newline_before_multiline_output = IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT]
+ if @newline_before_multiline_output.nil?
+ @newline_before_multiline_output = true
end
+
+ @command_aliases = IRB.conf[:COMMAND_ALIASES]
end
# The top-level workspace, see WorkSpace#main
@@ -142,18 +163,18 @@ module IRB
# The toplevel workspace, see #home_workspace
attr_reader :workspace_home
- # WorkSpace in the current context
+ # WorkSpace in the current context.
attr_accessor :workspace
- # The current thread in this context
+ # The current thread in this context.
attr_reader :thread
- # The current input method
+ # The current input method.
#
# Can be either StdioInputMethod, ReadlineInputMethod,
- # ReidlineInputMethod, FileInputMethod or other specified when the
+ # RelineInputMethod, FileInputMethod or other specified when the
# context is created. See ::new for more # information on +input_method+.
attr_accessor :io
- # Current irb session
+ # Current irb session.
attr_accessor :irb
# A copy of the default <code>IRB.conf[:AP_NAME]</code>
attr_accessor :ap_name
@@ -178,22 +199,22 @@ module IRB
attr_reader :use_singleline
# Whether colorization is enabled or not.
#
- # A copy of the default <code>IRB.conf[:USE_COLORIZE]</code>
- attr_reader :use_colorize
+ # A copy of the default <code>IRB.conf[:USE_AUTOCOMPLETE]</code>
+ attr_reader :use_autocomplete
# A copy of the default <code>IRB.conf[:INSPECT_MODE]</code>
attr_reader :inspect_mode
# A copy of the default <code>IRB.conf[:PROMPT_MODE]</code>
attr_reader :prompt_mode
- # Standard IRB prompt
+ # Standard IRB prompt.
#
# See IRB@Customizing+the+IRB+Prompt for more information.
attr_accessor :prompt_i
- # IRB prompt for continuated strings
+ # IRB prompt for continuated strings.
#
# See IRB@Customizing+the+IRB+Prompt for more information.
attr_accessor :prompt_s
- # IRB prompt for continuated statement (e.g. immediately after an +if+)
+ # IRB prompt for continuated statement. (e.g. immediately after an +if+)
#
# See IRB@Customizing+the+IRB+Prompt for more information.
attr_accessor :prompt_c
@@ -233,9 +254,12 @@ module IRB
#
# If set to +false+, <code>^D</code> will quit irb.
attr_accessor :ignore_eof
+ # Specify the installation locations of the ri file to be displayed in the
+ # document dialog.
+ attr_accessor :extra_doc_dirs
# Whether to echo the return value to output or not.
#
- # Uses IRB.conf[:ECHO] if available, or defaults to +true+.
+ # Uses <code>IRB.conf[:ECHO]</code> if available, or defaults to +true+.
#
# puts "hello"
# # hello
@@ -244,15 +268,55 @@ module IRB
# puts "omg"
# # omg
attr_accessor :echo
- # Whether to echo for assignment expressions
+ # Whether to echo for assignment expressions.
#
- # Uses IRB.conf[:ECHO_ON_ASSIGNMENT] if available, or defaults to +false+.
+ # If set to +false+, the value of assignment will not be shown.
+ #
+ # If set to +true+, the value of assignment will be shown.
+ #
+ # If set to +:truncate+, the value of assignment will be shown and truncated.
+ #
+ # It defaults to +:truncate+.
#
- # a = "omg"
- # IRB.CurrentContext.echo_on_assignment = true
# a = "omg"
# #=> omg
+ #
+ # a = "omg" * 10
+ # #=> omgomgomgomgomgomgomg...
+ #
+ # IRB.CurrentContext.echo_on_assignment = false
+ # a = "omg"
+ #
+ # IRB.CurrentContext.echo_on_assignment = true
+ # a = "omg" * 10
+ # #=> omgomgomgomgomgomgomgomgomgomg
+ #
+ # To set the behaviour of showing on assignment in irb:
+ #
+ # IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false
+ #
+ # or
+ #
+ # irb_context.echo_on_assignment = :truncate or true or false
+ #
+ # or
+ #
+ # IRB.CurrentContext.echo_on_assignment = :truncate or true or false
attr_accessor :echo_on_assignment
+ # Whether a newline is put before multiline output.
+ #
+ # Uses <code>IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT]</code> if available,
+ # or defaults to +true+.
+ #
+ # "abc\ndef"
+ # #=>
+ # abc
+ # def
+ # IRB.CurrentContext.newline_before_multiline_output = false
+ # "abc\ndef"
+ # #=> abc
+ # def
+ attr_accessor :newline_before_multiline_output
# Whether verbose messages are displayed or not.
#
# A copy of the default <code>IRB.conf[:VERBOSE]</code>
@@ -267,31 +331,35 @@ module IRB
# See IRB@Command+line+options for more command line options.
attr_accessor :back_trace_limit
+ # User-defined IRB command aliases
+ attr_accessor :command_aliases
+
# Alias for #use_multiline
alias use_multiline? use_multiline
# Alias for #use_singleline
alias use_singleline? use_singleline
# backward compatibility
- alias use_reidline use_multiline
+ alias use_reline use_multiline
# backward compatibility
- alias use_reidline? use_multiline
+ alias use_reline? use_multiline
# backward compatibility
alias use_readline use_singleline
# backward compatibility
alias use_readline? use_singleline
- # Alias for #use_colorize
- alias use_colorize? use_colorize
+ # Alias for #use_autocomplete
+ alias use_autocomplete? use_autocomplete
# Alias for #rc
alias rc? rc
alias ignore_sigint? ignore_sigint
alias ignore_eof? ignore_eof
alias echo? echo
alias echo_on_assignment? echo_on_assignment
+ alias newline_before_multiline_output? newline_before_multiline_output
# Returns whether messages are displayed or not.
def verbose?
if @verbose.nil?
- if @io.kind_of?(ReidlineInputMethod)
+ if @io.kind_of?(RelineInputMethod)
false
elsif defined?(ReadlineInputMethod) && @io.kind_of?(ReadlineInputMethod)
false
@@ -306,11 +374,11 @@ module IRB
end
# Whether #verbose? is +true+, and +input_method+ is either
- # StdioInputMethod or ReidlineInputMethod or ReadlineInputMethod, see #io
+ # StdioInputMethod or RelineInputMethod or ReadlineInputMethod, see #io
# for more information.
def prompting?
verbose? || (STDIN.tty? && @io.kind_of?(StdioInputMethod) ||
- @io.kind_of?(ReidlineInputMethod) ||
+ @io.kind_of?(RelineInputMethod) ||
(defined?(ReadlineInputMethod) && @io.kind_of?(ReadlineInputMethod)))
end
@@ -335,6 +403,7 @@ module IRB
@prompt_c = pconf[:PROMPT_C]
@prompt_n = pconf[:PROMPT_N]
@return_format = pconf[:RETURN]
+ @return_format = "%s\n" if @return_format == nil
if ai = pconf.include?(:AUTO_INDENT)
@auto_indent_mode = ai
else
@@ -416,6 +485,20 @@ module IRB
line = "begin ::Kernel.raise _; rescue _.class\n#{line}\n""end"
@workspace.local_variable_set(:_, exception)
end
+
+ # Transform a non-identifier alias (@, $) or keywords (next, break)
+ command, args = line.split(/\s/, 2)
+ if original = command_aliases[command.to_sym]
+ line = line.gsub(/\A#{Regexp.escape(command)}/, original.to_s)
+ command = original
+ end
+
+ # Hook command-specific transformation
+ command_class = ExtendCommandBundle.load_command(command)
+ if command_class&.respond_to?(:transform_args)
+ line = "#{command} #{command_class.transform_args(args)}"
+ end
+
set_last_value(@workspace.evaluate(self, line, irb_path, line_no))
end
@@ -427,6 +510,8 @@ module IRB
# Exits the current session, see IRB.irb_exit
def exit(ret = 0)
IRB.irb_exit(@irb, ret)
+ rescue UncaughtThrowError
+ super
end
NOPRINTING_IVARS = ["@last_value"] # :nodoc:
@@ -455,5 +540,21 @@ module IRB
end
alias __to_s__ to_s
alias to_s inspect
+
+ def local_variables # :nodoc:
+ workspace.binding.local_variables
+ end
+
+ # Return true if it's aliased from the argument and it's not an identifier.
+ def symbol_alias?(command)
+ return nil if command.match?(/\A\w+\z/)
+ command_aliases.key?(command.to_sym)
+ end
+
+ # Return true if the command supports transforming args
+ def transform_args?(command)
+ command = command_aliases.fetch(command.to_sym, command)
+ ExtendCommandBundle.load_command(command)&.respond_to?(:transform_args)
+ end
end
end
diff --git a/lib/irb/easter-egg.rb b/lib/irb/easter-egg.rb
new file mode 100644
index 0000000000..3e79692de9
--- /dev/null
+++ b/lib/irb/easter-egg.rb
@@ -0,0 +1,138 @@
+require "reline"
+
+module IRB
+ class << self
+ class Vec
+ def initialize(x, y, z)
+ @x, @y, @z = x, y, z
+ end
+
+ attr_reader :x, :y, :z
+
+ def sub(other)
+ Vec.new(@x - other.x, @y - other.y, @z - other.z)
+ end
+
+ def dot(other)
+ @x*other.x + @y*other.y + @z*other.z
+ end
+
+ def cross(other)
+ ox, oy, oz = other.x, other.y, other.z
+ Vec.new(@y*oz-@z*oy, @z*ox-@x*oz, @x*oy-@y*ox)
+ end
+
+ def normalize
+ r = Math.sqrt(self.dot(self))
+ Vec.new(@x / r, @y / r, @z / r)
+ end
+ end
+
+ class Canvas
+ def initialize((h, w))
+ @data = (0..h-2).map { [0] * w }
+ @scale = [w / 2.0, h-2].min
+ @center = Complex(w / 2, h-2)
+ end
+
+ def line((x1, y1), (x2, y2))
+ p1 = Complex(x1, y1) / 2 * @scale + @center
+ p2 = Complex(x2, y2) / 2 * @scale + @center
+ line0(p1, p2)
+ end
+
+ private def line0(p1, p2)
+ mid = (p1 + p2) / 2
+ if (p1 - p2).abs < 1
+ x, y = mid.rect
+ @data[y / 2][x] |= (y % 2 > 1 ? 2 : 1)
+ else
+ line0(p1, mid)
+ line0(p2, mid)
+ end
+ end
+
+ def draw
+ @data.each {|row| row.fill(0) }
+ yield
+ @data.map {|row| row.map {|n| " ',;"[n] }.join }.join("\n")
+ end
+ end
+
+ class RubyModel
+ def initialize
+ @faces = init_ruby_model
+ end
+
+ def init_ruby_model
+ cap_vertices = (0..5).map {|i| Vec.new(*Complex.polar(1, i * Math::PI / 3).rect, 1) }
+ middle_vertices = (0..5).map {|i| Vec.new(*Complex.polar(2, (i + 0.5) * Math::PI / 3).rect, 0) }
+ bottom_vertex = Vec.new(0, 0, -2)
+
+ faces = [cap_vertices]
+ 6.times do |j|
+ i = j-1
+ faces << [cap_vertices[i], middle_vertices[i], cap_vertices[j]]
+ faces << [cap_vertices[j], middle_vertices[i], middle_vertices[j]]
+ faces << [middle_vertices[i], bottom_vertex, middle_vertices[j]]
+ end
+
+ faces
+ end
+
+ def render_frame(i)
+ angle = i / 10.0
+ dir = Vec.new(*Complex.polar(1, angle).rect, Math.sin(angle)).normalize
+ dir2 = Vec.new(*Complex.polar(1, angle - Math::PI/2).rect, 0)
+ up = dir.cross(dir2)
+ nm = dir.cross(up)
+ @faces.each do |vertices|
+ v0, v1, v2, = vertices
+ if v1.sub(v0).cross(v2.sub(v0)).dot(dir) > 0
+ points = vertices.map {|p| [nm.dot(p), up.dot(p)] }
+ (points + [points[0]]).each_cons(2) do |p1, p2|
+ yield p1, p2
+ end
+ end
+ end
+ end
+ end
+
+ private def easter_egg(type = nil)
+ type ||= [:logo, :dancing].sample
+ case type
+ when :logo
+ File.open(File.join(__dir__, 'ruby_logo.aa')) do |f|
+ require "rdoc"
+ RDoc::RI::Driver.new.page do |io|
+ IO.copy_stream(f, io)
+ end
+ end
+ when :dancing
+ begin
+ canvas = Canvas.new(Reline.get_screen_size)
+ Reline::IOGate.set_winch_handler do
+ canvas = Canvas.new(Reline.get_screen_size)
+ end
+ ruby_model = RubyModel.new
+ print "\e[?1049h"
+ 0.step do |i| # TODO (0..).each needs Ruby 2.6 or later
+ buff = canvas.draw do
+ ruby_model.render_frame(i) do |p1, p2|
+ canvas.line(p1, p2)
+ end
+ end
+ buff[0, 20] = "\e[0mPress Ctrl+C to stop\e[31m\e[1m"
+ print "\e[H" + buff
+ sleep 0.05
+ end
+ rescue Interrupt
+ ensure
+ print "\e[0m\e[?1049l"
+ end
+ end
+ end
+ end
+end
+
+IRB.__send__(:easter_egg, ARGV[0]&.to_sym) if $0 == __FILE__
diff --git a/lib/irb/ext/change-ws.rb b/lib/irb/ext/change-ws.rb
index 94bfe62bc0..4c57e44eab 100644
--- a/lib/irb/ext/change-ws.rb
+++ b/lib/irb/ext/change-ws.rb
@@ -43,4 +43,3 @@ module IRB # :nodoc:
end
end
end
-
diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb
index 30e3fb901f..fc304c6f6c 100644
--- a/lib/irb/ext/history.rb
+++ b/lib/irb/ext/history.rb
@@ -153,5 +153,3 @@ module IRB # :nodoc:
end
end
end
-
-
diff --git a/lib/irb/ext/loader.rb b/lib/irb/ext/loader.rb
index 840226db30..af028996e7 100644
--- a/lib/irb/ext/loader.rb
+++ b/lib/irb/ext/loader.rb
@@ -31,8 +31,31 @@ module IRB # :nodoc:
load_file(path, priv)
end
+ if File.respond_to?(:absolute_path?)
+ def absolute_path?(path)
+ File.absolute_path?(path)
+ end
+ else
+ separator =
+ if File::ALT_SEPARATOR
+ "[#{Regexp.quote(File::SEPARATOR + File::ALT_SEPARATOR)}]"
+ else
+ File::SEPARATOR
+ end
+ ABSOLUTE_PATH_PATTERN = # :nodoc:
+ case Dir.pwd
+ when /\A\w:/, /\A#{separator}{2}/
+ /\A(?:\w:|#{separator})#{separator}/
+ else
+ /\A#{separator}/
+ end
+ def absolute_path?(path)
+ ABSOLUTE_PATH_PATTERN =~ path
+ end
+ end
+
def search_file_from_ruby_path(fn) # :nodoc:
- if /^#{Regexp.quote(File::Separator)}/ =~ fn
+ if absolute_path?(fn)
return fn if File.exist?(fn)
return nil
end
@@ -50,16 +73,18 @@ module IRB # :nodoc:
# See Irb#suspend_input_method for more information.
def source_file(path)
irb.suspend_name(path, File.basename(path)) do
- irb.suspend_input_method(FileInputMethod.new(path)) do
- |back_io|
- irb.signal_status(:IN_LOAD) do
- if back_io.kind_of?(FileInputMethod)
- irb.eval_input
- else
- begin
+ FileInputMethod.open(path) do |io|
+ irb.suspend_input_method(io) do
+ |back_io|
+ irb.signal_status(:IN_LOAD) do
+ if back_io.kind_of?(FileInputMethod)
irb.eval_input
- rescue LoadAbort
- print "load abort!!\n"
+ else
+ begin
+ irb.eval_input
+ rescue LoadAbort
+ print "load abort!!\n"
+ end
end
end
end
@@ -79,16 +104,18 @@ module IRB # :nodoc:
ws = WorkSpace.new
end
irb.suspend_workspace(ws) do
- irb.suspend_input_method(FileInputMethod.new(path)) do
- |back_io|
- irb.signal_status(:IN_LOAD) do
- if back_io.kind_of?(FileInputMethod)
- irb.eval_input
- else
- begin
+ FileInputMethod.open(path) do |io|
+ irb.suspend_input_method(io) do
+ |back_io|
+ irb.signal_status(:IN_LOAD) do
+ if back_io.kind_of?(FileInputMethod)
irb.eval_input
- rescue LoadAbort
- print "load abort!!\n"
+ else
+ begin
+ irb.eval_input
+ rescue LoadAbort
+ print "load abort!!\n"
+ end
end
end
end
@@ -126,4 +153,3 @@ module IRB # :nodoc:
end
end
end
-
diff --git a/lib/irb/ext/multi-irb.rb b/lib/irb/ext/multi-irb.rb
index 74de1ecde5..e57d43a569 100644
--- a/lib/irb/ext/multi-irb.rb
+++ b/lib/irb/ext/multi-irb.rb
@@ -9,7 +9,6 @@
#
#
#
-fail CantShiftToMultiIrbMode unless defined?(Thread)
module IRB
class JobManager
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index c0d4d372b7..9e7620545a 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -9,8 +9,6 @@
#
#
-require "readline"
-
module IRB
module HistorySavingAbility # :nodoc:
end
@@ -27,7 +25,7 @@ module IRB
IRB.conf[:SAVE_HISTORY]
end
- remove_method :save_history= if method_defined?(:save_history=)
+ remove_method(:save_history=) if method_defined?(:save_history=)
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
# #init_save_history with this context.
#
@@ -72,10 +70,10 @@ module IRB
end
history_file = IRB.rc_file("_history") unless history_file
if File.exist?(history_file)
- open(history_file) do |f|
+ File.open(history_file, "r:#{IRB.conf[:LC_MESSAGES].encoding}") do |f|
f.each { |l|
l = l.chomp
- if self.class == ReidlineInputMethod and history.last&.end_with?("\\")
+ if self.class == RelineInputMethod and history.last&.end_with?("\\")
history.last.delete_suffix!("\\")
history.last << "\n" << l
else
@@ -83,13 +81,15 @@ module IRB
end
}
end
+ @loaded_history_lines = history.size
+ @loaded_history_mtime = File.mtime(history_file)
end
end
def save_history
return unless self.class.const_defined?(:HISTORY)
history = self.class::HISTORY
- if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0
+ if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) != 0
if history_file = IRB.conf[:HISTORY_FILE]
history_file = File.expand_path(history_file)
end
@@ -107,9 +107,22 @@ module IRB
raise
end
- open(history_file, 'w', 0600 ) do |f|
+ if File.exist?(history_file) &&
+ File.mtime(history_file) != @loaded_history_mtime
+ history = history[@loaded_history_lines..-1] if @loaded_history_lines
+ append_history = true
+ end
+
+ File.open(history_file, (append_history ? 'a' : 'w'), 0o600, encoding: IRB.conf[:LC_MESSAGES]&.encoding) do |f|
hist = history.map{ |l| l.split("\n").join("\\\n") }
- f.puts(hist[-num..-1] || hist)
+ unless append_history
+ begin
+ hist = hist.last(num) if hist.size > num and num > 0
+ rescue RangeError # bignum too big to convert into `long'
+ # Do nothing because the bignum should be treated as inifinity
+ end
+ end
+ f.puts(hist)
end
end
end
diff --git a/lib/irb/ext/tracer.rb b/lib/irb/ext/tracer.rb
index e3e325e6e5..67ac4bb965 100644
--- a/lib/irb/ext/tracer.rb
+++ b/lib/irb/ext/tracer.rb
@@ -82,4 +82,3 @@ module IRB
IRB.initialize_tracer
end
-
diff --git a/lib/irb/ext/use-loader.rb b/lib/irb/ext/use-loader.rb
index cb10e8a254..1897bc89e0 100644
--- a/lib/irb/ext/use-loader.rb
+++ b/lib/irb/ext/use-loader.rb
@@ -47,7 +47,7 @@ module IRB
alias use_loader? use_loader
remove_method :use_loader= if method_defined?(:use_loader=)
- # Sets IRB.conf[:USE_LOADER]
+ # Sets <code>IRB.conf[:USE_LOADER]</code>
#
# See #use_loader for more information.
def use_loader=(opt)
@@ -73,5 +73,3 @@ module IRB
end
end
end
-
-
diff --git a/lib/irb/ext/workspaces.rb b/lib/irb/ext/workspaces.rb
index 5bd72c194f..730b58e64d 100644
--- a/lib/irb/ext/workspaces.rb
+++ b/lib/irb/ext/workspaces.rb
@@ -64,4 +64,3 @@ module IRB # :nodoc:
end
end
end
-
diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb
index de145e962d..d0829a06c4 100644
--- a/lib/irb/extend-command.rb
+++ b/lib/irb/extend-command.rb
@@ -45,99 +45,200 @@ module IRB # :nodoc:
[:quit, :irb_exit, OVERRIDE_PRIVATE_ONLY],
]
+
@EXTEND_COMMANDS = [
[
- :irb_current_working_workspace, :CurrentWorkingWorkspace, "irb/cmd/chws",
+ :irb_current_working_workspace, :CurrentWorkingWorkspace, "cmd/chws",
+ [:cwws, NO_OVERRIDE],
+ [:pwws, NO_OVERRIDE],
[:irb_print_working_workspace, OVERRIDE_ALL],
[:irb_cwws, OVERRIDE_ALL],
[:irb_pwws, OVERRIDE_ALL],
- [:cwws, NO_OVERRIDE],
- [:pwws, NO_OVERRIDE],
[:irb_current_working_binding, OVERRIDE_ALL],
[:irb_print_working_binding, OVERRIDE_ALL],
[:irb_cwb, OVERRIDE_ALL],
[:irb_pwb, OVERRIDE_ALL],
],
[
- :irb_change_workspace, :ChangeWorkspace, "irb/cmd/chws",
- [:irb_chws, OVERRIDE_ALL],
- [:irb_cws, OVERRIDE_ALL],
+ :irb_change_workspace, :ChangeWorkspace, "cmd/chws",
[:chws, NO_OVERRIDE],
[:cws, NO_OVERRIDE],
+ [:irb_chws, OVERRIDE_ALL],
+ [:irb_cws, OVERRIDE_ALL],
[:irb_change_binding, OVERRIDE_ALL],
[:irb_cb, OVERRIDE_ALL],
[:cb, NO_OVERRIDE],
],
[
- :irb_workspaces, :Workspaces, "irb/cmd/pushws",
+ :irb_workspaces, :Workspaces, "cmd/pushws",
[:workspaces, NO_OVERRIDE],
[:irb_bindings, OVERRIDE_ALL],
[:bindings, NO_OVERRIDE],
],
[
- :irb_push_workspace, :PushWorkspace, "irb/cmd/pushws",
- [:irb_pushws, OVERRIDE_ALL],
+ :irb_push_workspace, :PushWorkspace, "cmd/pushws",
[:pushws, NO_OVERRIDE],
+ [:irb_pushws, OVERRIDE_ALL],
[:irb_push_binding, OVERRIDE_ALL],
[:irb_pushb, OVERRIDE_ALL],
[:pushb, NO_OVERRIDE],
],
[
- :irb_pop_workspace, :PopWorkspace, "irb/cmd/pushws",
- [:irb_popws, OVERRIDE_ALL],
+ :irb_pop_workspace, :PopWorkspace, "cmd/pushws",
[:popws, NO_OVERRIDE],
+ [:irb_popws, OVERRIDE_ALL],
[:irb_pop_binding, OVERRIDE_ALL],
[:irb_popb, OVERRIDE_ALL],
[:popb, NO_OVERRIDE],
],
[
- :irb_load, :Load, "irb/cmd/load"],
+ :irb_load, :Load, "cmd/load"],
[
- :irb_require, :Require, "irb/cmd/load"],
+ :irb_require, :Require, "cmd/load"],
[
- :irb_source, :Source, "irb/cmd/load",
+ :irb_source, :Source, "cmd/load",
[:source, NO_OVERRIDE],
],
[
- :irb, :IrbCommand, "irb/cmd/subirb"],
+ :irb, :IrbCommand, "cmd/subirb"],
[
- :irb_jobs, :Jobs, "irb/cmd/subirb",
+ :irb_jobs, :Jobs, "cmd/subirb",
[:jobs, NO_OVERRIDE],
],
[
- :irb_fg, :Foreground, "irb/cmd/subirb",
+ :irb_fg, :Foreground, "cmd/subirb",
[:fg, NO_OVERRIDE],
],
[
- :irb_kill, :Kill, "irb/cmd/subirb",
+ :irb_kill, :Kill, "cmd/subirb",
[:kill, OVERRIDE_PRIVATE_ONLY],
],
[
- :irb_help, :Help, "irb/cmd/help",
+ :irb_debug, :Debug, "cmd/debug",
+ [:debug, NO_OVERRIDE],
+ ],
+ [
+ :irb_edit, :Edit, "cmd/edit",
+ [:edit, NO_OVERRIDE],
+ ],
+ [
+ :irb_break, :Break, "cmd/break",
+ ],
+ [
+ :irb_catch, :Catch, "cmd/catch",
+ ],
+ [
+ :irb_next, :Next, "cmd/next"
+ ],
+ [
+ :irb_delete, :Delete, "cmd/delete",
+ [:delete, NO_OVERRIDE],
+ ],
+ [
+ :irb_step, :Step, "cmd/step",
+ [:step, NO_OVERRIDE],
+ ],
+ [
+ :irb_continue, :Continue, "cmd/continue",
+ [:continue, NO_OVERRIDE],
+ ],
+ [
+ :irb_finish, :Finish, "cmd/finish",
+ [:finish, NO_OVERRIDE],
+ ],
+ [
+ :irb_backtrace, :Backtrace, "cmd/backtrace",
+ [:backtrace, NO_OVERRIDE],
+ [:bt, NO_OVERRIDE],
+ ],
+ [
+ :irb_debug_info, :Info, "cmd/info",
+ [:info, NO_OVERRIDE],
+ ],
+
+ [
+ :irb_help, :Help, "cmd/help",
+ [:show_doc, NO_OVERRIDE],
[:help, NO_OVERRIDE],
],
+ [
+ :irb_info, :IrbInfo, "cmd/irb_info"
+ ],
+
+ [
+ :irb_ls, :Ls, "cmd/ls",
+ [:ls, NO_OVERRIDE],
+ ],
+
+ [
+ :irb_measure, :Measure, "cmd/measure",
+ [:measure, NO_OVERRIDE],
+ ],
+
+ [
+ :irb_show_source, :ShowSource, "cmd/show_source",
+ [:show_source, NO_OVERRIDE],
+ ],
+
+ [
+ :irb_whereami, :Whereami, "cmd/whereami",
+ [:whereami, NO_OVERRIDE],
+ ],
+ [
+ :irb_show_cmds, :ShowCmds, "cmd/show_cmds",
+ [:show_cmds, NO_OVERRIDE],
+ ]
]
- # Installs the default irb commands:
- #
- # +irb_current_working_workspace+:: Context#main
- # +irb_change_workspace+:: Context#change_workspace
- # +irb_workspaces+:: Context#workspaces
- # +irb_push_workspace+:: Context#push_workspace
- # +irb_pop_workspace+:: Context#pop_workspace
- # +irb_load+:: #irb_load
- # +irb_require+:: #irb_require
- # +irb_source+:: IrbLoader#source_file
- # +irb+:: IRB.irb
- # +irb_jobs+:: JobManager
- # +irb_fg+:: JobManager#switch
- # +irb_kill+:: JobManager#kill
- # +irb_help+:: IRB@Command+line+options
+
+ @@commands = []
+
+ def self.all_commands_info
+ return @@commands unless @@commands.empty?
+ user_aliases = IRB.CurrentContext.command_aliases.each_with_object({}) do |(alias_name, target), result|
+ result[target] ||= []
+ result[target] << alias_name
+ end
+
+ @EXTEND_COMMANDS.each do |cmd_name, cmd_class, load_file, *aliases|
+ if !defined?(ExtendCommand) || !ExtendCommand.const_defined?(cmd_class, false)
+ require_relative load_file
+ end
+
+ klass = ExtendCommand.const_get(cmd_class, false)
+ aliases = aliases.map { |a| a.first }
+
+ if additional_aliases = user_aliases[cmd_name]
+ aliases += additional_aliases
+ end
+
+ display_name = aliases.shift || cmd_name
+ @@commands << { display_name: display_name, description: klass.description, category: klass.category }
+ end
+
+ @@commands
+ end
+
+ # Convert a command name to its implementation class if such command exists
+ def self.load_command(command)
+ command = command.to_sym
+ @EXTEND_COMMANDS.each do |cmd_name, cmd_class, load_file, *aliases|
+ next if cmd_name != command && aliases.all? { |alias_name, _| alias_name != command }
+
+ if !defined?(ExtendCommand) || !ExtendCommand.const_defined?(cmd_class, false)
+ require_relative load_file
+ end
+ return ExtendCommand.const_get(cmd_class, false)
+ end
+ nil
+ end
+
+ # Installs the default irb commands.
def self.install_extend_commands
for args in @EXTEND_COMMANDS
def_extend_command(*args)
@@ -160,20 +261,24 @@ module IRB # :nodoc:
end
if load_file
+ kwargs = ", **kwargs" if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.7.0"
line = __LINE__; eval %[
- def #{cmd_name}(*opts, &b)
- require "#{load_file}"
+ def #{cmd_name}(*opts#{kwargs}, &b)
+ require_relative "#{load_file}"
arity = ExtendCommand::#{cmd_class}.instance_method(:execute).arity
args = (1..(arity < 0 ? ~arity : arity)).map {|i| "arg" + i.to_s }
- args << "*opts" if arity < 0
+ args << "*opts#{kwargs}" if arity < 0
args << "&block"
args = args.join(", ")
line = __LINE__; eval %[
- def #{cmd_name}(\#{args})
- ExtendCommand::#{cmd_class}.execute(irb_context, \#{args})
+ unless singleton_class.class_variable_defined?(:@@#{cmd_name}_)
+ singleton_class.class_variable_set(:@@#{cmd_name}_, true)
+ def self.#{cmd_name}_(\#{args})
+ ExtendCommand::#{cmd_class}.execute(irb_context, \#{args})
+ end
end
], nil, __FILE__, line
- send :#{cmd_name}, *opts, &b
+ __send__ :#{cmd_name}_, *opts#{kwargs}, &b
end
], nil, __FILE__, line
else
@@ -207,7 +312,7 @@ module IRB # :nodoc:
alias_method to, from
}
else
- print "irb: warn: can't alias #{to} from #{from}.\n"
+ Kernel.print "irb: warn: can't alias #{to} from #{from}.\n"
end
end
@@ -234,10 +339,10 @@ module IRB # :nodoc:
CE = ContextExtender # :nodoc:
@EXTEND_COMMANDS = [
- [:eval_history=, "irb/ext/history.rb"],
- [:use_tracer=, "irb/ext/tracer.rb"],
- [:use_loader=, "irb/ext/use-loader.rb"],
- [:save_history=, "irb/ext/save-history.rb"],
+ [:eval_history=, "ext/history.rb"],
+ [:use_tracer=, "ext/tracer.rb"],
+ [:use_loader=, "ext/use-loader.rb"],
+ [:save_history=, "ext/save-history.rb"],
]
# Installs the default context extensions as irb commands:
@@ -260,8 +365,8 @@ module IRB # :nodoc:
line = __LINE__; Context.module_eval %[
def #{cmd_name}(*opts, &b)
Context.module_eval {remove_method(:#{cmd_name})}
- require "#{load_file}"
- send :#{cmd_name}, *opts, &b
+ require_relative "#{load_file}"
+ __send__ :#{cmd_name}, *opts, &b
end
for ali in aliases
alias_method ali, cmd_name
@@ -284,8 +389,8 @@ module IRB # :nodoc:
module_eval %[
alias_method alias_name, base_method
def #{base_method}(*opts)
- send :#{extend_method}, *opts
- send :#{alias_name}, *opts
+ __send__ :#{extend_method}, *opts
+ __send__ :#{alias_name}, *opts
end
]
end
@@ -300,8 +405,8 @@ module IRB # :nodoc:
module_eval %[
alias_method alias_name, base_method
def #{base_method}(*opts)
- send :#{alias_name}, *opts
- send :#{extend_method}, *opts
+ __send__ :#{alias_name}, *opts
+ __send__ :#{extend_method}, *opts
end
]
end
diff --git a/lib/irb/help.rb b/lib/irb/help.rb
index 7868a70a6c..3eeaf841b0 100644
--- a/lib/irb/help.rb
+++ b/lib/irb/help.rb
@@ -34,4 +34,3 @@ module IRB
}
end
end
-
diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index 2af872fd03..55453cc8f7 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -44,12 +44,14 @@ module IRB # :nodoc:
@CONF[:IRB_RC] = nil
@CONF[:USE_SINGLELINE] = false unless defined?(ReadlineInputMethod)
- @CONF[:USE_COLORIZE] = true
+ @CONF[:USE_COLORIZE] = (nc = ENV['NO_COLOR']).nil? || nc.empty?
+ @CONF[:USE_AUTOCOMPLETE] = ENV.fetch("IRB_USE_AUTOCOMPLETE", "true") != "false"
@CONF[:INSPECT_MODE] = true
@CONF[:USE_TRACER] = false
@CONF[:USE_LOADER] = false
@CONF[:IGNORE_SIGINT] = true
@CONF[:IGNORE_EOF] = false
+ @CONF[:EXTRA_DOC_DIRS] = []
@CONF[:ECHO] = nil
@CONF[:ECHO_ON_ASSIGNMENT] = nil
@CONF[:VERBOSE] = nil
@@ -108,12 +110,109 @@ module IRB # :nodoc:
@CONF[:PROMPT_MODE] = (STDIN.tty? ? :DEFAULT : :NULL)
@CONF[:AUTO_INDENT] = true
- @CONF[:CONTEXT_MODE] = 3 # use binding in function on TOPLEVEL_BINDING
+ @CONF[:CONTEXT_MODE] = 4 # use a copy of TOPLEVEL_BINDING
@CONF[:SINGLE_IRB] = false
+ @CONF[:MEASURE] = false
+ @CONF[:MEASURE_PROC] = {}
+ @CONF[:MEASURE_PROC][:TIME] = proc { |context, code, line_no, &block|
+ time = Time.now
+ result = block.()
+ now = Time.now
+ puts 'processing time: %fs' % (now - time) if IRB.conf[:MEASURE]
+ result
+ }
+ # arg can be either a symbol for the mode (:cpu, :wall, ..) or a hash for
+ # a more complete configuration.
+ # See https://github.com/tmm1/stackprof#all-options.
+ @CONF[:MEASURE_PROC][:STACKPROF] = proc { |context, code, line_no, arg, &block|
+ return block.() unless IRB.conf[:MEASURE]
+ success = false
+ begin
+ require 'stackprof'
+ success = true
+ rescue LoadError
+ puts 'Please run "gem install stackprof" before measuring by StackProf.'
+ end
+ if success
+ result = nil
+ arg = { mode: arg || :cpu } unless arg.is_a?(Hash)
+ stackprof_result = StackProf.run(**arg) do
+ result = block.()
+ end
+ case stackprof_result
+ when File
+ puts "StackProf report saved to #{stackprof_result.path}"
+ when Hash
+ StackProf::Report.new(stackprof_result).print_text
+ else
+ puts "Stackprof ran with #{arg.inspect}"
+ end
+ result
+ else
+ block.()
+ end
+ }
+ @CONF[:MEASURE_CALLBACKS] = []
+
@CONF[:LC_MESSAGES] = Locale.new
@CONF[:AT_EXIT] = []
+
+ @CONF[:COMMAND_ALIASES] = {
+ # Symbol aliases
+ :'$' => :show_source,
+ :'@' => :whereami,
+ # Keyword aliases
+ :break => :irb_break,
+ :catch => :irb_catch,
+ :next => :irb_next,
+ }
+ end
+
+ def IRB.set_measure_callback(type = nil, arg = nil, &block)
+ added = nil
+ if type
+ type_sym = type.upcase.to_sym
+ if IRB.conf[:MEASURE_PROC][type_sym]
+ added = [type_sym, IRB.conf[:MEASURE_PROC][type_sym], arg]
+ end
+ elsif IRB.conf[:MEASURE_PROC][:CUSTOM]
+ added = [:CUSTOM, IRB.conf[:MEASURE_PROC][:CUSTOM], arg]
+ elsif block_given?
+ added = [:BLOCK, block, arg]
+ found = IRB.conf[:MEASURE_CALLBACKS].find{ |m| m[0] == added[0] && m[2] == added[2] }
+ if found
+ found[1] = block
+ return added
+ else
+ IRB.conf[:MEASURE_CALLBACKS] << added
+ return added
+ end
+ else
+ added = [:TIME, IRB.conf[:MEASURE_PROC][:TIME], arg]
+ end
+ if added
+ found = IRB.conf[:MEASURE_CALLBACKS].find{ |m| m[0] == added[0] && m[2] == added[2] }
+ if found
+ # already added
+ nil
+ else
+ IRB.conf[:MEASURE_CALLBACKS] << added if added
+ added
+ end
+ else
+ nil
+ end
+ end
+
+ def IRB.unset_measure_callback(type = nil)
+ if type.nil?
+ IRB.conf[:MEASURE_CALLBACKS].clear
+ else
+ type_sym = type.upcase.to_sym
+ IRB.conf[:MEASURE_CALLBACKS].reject!{ |t, | t == type_sym }
+ end
end
def IRB.init_error
@@ -131,7 +230,7 @@ module IRB # :nodoc:
$DEBUG = true
$VERBOSE = true
when "-w"
- $VERBOSE = true
+ Warning[:deprecated] = $VERBOSE = true
when /^-W(.+)?/
opt = $1 || argv.shift
case opt
@@ -140,7 +239,7 @@ module IRB # :nodoc:
when "1"
$VERBOSE = false
else
- $VERBOSE = true
+ Warning[:deprecated] = $VERBOSE = true
end
when /^-r(.+)?/
opt = $1 || argv.shift
@@ -166,9 +265,24 @@ module IRB # :nodoc:
when "--nosingleline", "--noreadline"
@CONF[:USE_SINGLELINE] = false
when "--multiline", "--reidline"
+ if opt == "--reidline"
+ warn <<~MSG.strip
+ --reidline is deprecated, please use --multiline instead.
+ MSG
+ end
+
@CONF[:USE_MULTILINE] = true
when "--nomultiline", "--noreidline"
+ if opt == "--noreidline"
+ warn <<~MSG.strip
+ --noreidline is deprecated, please use --nomultiline instead.
+ MSG
+ end
+
@CONF[:USE_MULTILINE] = false
+ when /^--extra-doc-dir(?:=(.+))?/
+ opt = $1 || argv.shift
+ @CONF[:EXTRA_DOC_DIRS] << opt
when "--echo"
@CONF[:ECHO] = true
when "--noecho"
@@ -177,6 +291,8 @@ module IRB # :nodoc:
@CONF[:ECHO_ON_ASSIGNMENT] = true
when "--noecho-on-assignment"
@CONF[:ECHO_ON_ASSIGNMENT] = false
+ when "--truncate-echo-on-assignment"
+ @CONF[:ECHO_ON_ASSIGNMENT] = :truncate
when "--verbose"
@CONF[:VERBOSE] = true
when "--noverbose"
@@ -185,12 +301,20 @@ module IRB # :nodoc:
@CONF[:USE_COLORIZE] = true
when "--nocolorize"
@CONF[:USE_COLORIZE] = false
+ when "--autocomplete"
+ @CONF[:USE_AUTOCOMPLETE] = true
+ when "--noautocomplete"
+ @CONF[:USE_AUTOCOMPLETE] = false
when /^--prompt-mode(?:=(.+))?/, /^--prompt(?:=(.+))?/
opt = $1 || argv.shift
prompt_mode = opt.upcase.tr("-", "_").intern
@CONF[:PROMPT_MODE] = prompt_mode
when "--noprompt"
@CONF[:PROMPT_MODE] = :NULL
+ when "--script"
+ noscript = false
+ when "--noscript"
+ noscript = true
when "--inf-ruby-mode"
@CONF[:PROMPT_MODE] = :INF_RUBY
when "--sample-book-mode", "--simple-prompt"
@@ -211,24 +335,28 @@ module IRB # :nodoc:
IRB.print_usage
exit 0
when "--"
- if opt = argv.shift
+ if !noscript && (opt = argv.shift)
@CONF[:SCRIPT] = opt
$0 = opt
end
break
- when /^-/
+ when /^-./
fail UnrecognizedSwitch, opt
else
- @CONF[:SCRIPT] = opt
- $0 = opt
+ if noscript
+ argv.unshift(opt)
+ else
+ @CONF[:SCRIPT] = opt
+ $0 = opt
+ end
break
end
end
+
load_path.collect! do |path|
/\A\.\// =~ path ? path : File.expand_path(path)
end
$LOAD_PATH.unshift(*load_path)
-
end
# running config
@@ -271,10 +399,17 @@ module IRB # :nodoc:
if irbrc = ENV["IRBRC"]
yield proc{|rc| rc == "rc" ? irbrc : irbrc+rc}
end
+ if xdg_config_home = ENV["XDG_CONFIG_HOME"]
+ irb_home = File.join(xdg_config_home, "irb")
+ if File.directory?(irb_home)
+ yield proc{|rc| irb_home + "/irb#{rc}"}
+ end
+ end
if home = ENV["HOME"]
yield proc{|rc| home+"/.irb#{rc}"}
end
current_dir = Dir.pwd
+ yield proc{|rc| current_dir+"/.config/irb/irb#{rc}"}
yield proc{|rc| current_dir+"/.irb#{rc}"}
yield proc{|rc| current_dir+"/irb#{rc.sub(/\A_?/, '.')}"}
yield proc{|rc| current_dir+"/_irb#{rc}"}
@@ -296,15 +431,18 @@ module IRB # :nodoc:
DefaultEncodings = Struct.new(:external, :internal)
class << IRB
private
- def set_encoding(extern, intern = nil)
+ def set_encoding(extern, intern = nil, override: true)
verbose, $VERBOSE = $VERBOSE, nil
Encoding.default_external = extern unless extern.nil? || extern.empty?
Encoding.default_internal = intern unless intern.nil? || intern.empty?
- @CONF[:ENCODINGS] = IRB::DefaultEncodings.new(extern, intern)
[$stdin, $stdout, $stderr].each do |io|
io.set_encoding(extern, intern)
end
- @CONF[:LC_MESSAGES].instance_variable_set(:@encoding, extern)
+ if override
+ @CONF[:LC_MESSAGES].instance_variable_set(:@override_encoding, extern)
+ else
+ @CONF[:LC_MESSAGES].instance_variable_set(:@encoding, extern)
+ end
ensure
$VERBOSE = verbose
end
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index a1777d7904..9480573195 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -12,6 +12,7 @@
require_relative 'src_encoding'
require_relative 'magic-file'
require_relative 'completion'
+require 'io/console'
require 'reline'
module IRB
@@ -36,6 +37,14 @@ module IRB
end
public :gets
+ def winsize
+ if instance_variable_defined?(:@stdout) && @stdout.tty?
+ @stdout.winsize
+ else
+ [24, 80]
+ end
+ end
+
# Whether this input method is still readable when there is no more data to
# read.
#
@@ -43,6 +52,11 @@ module IRB
def readable_after_eof?
false
end
+
+ # For debug message
+ def inspect
+ 'Abstract InputMethod'
+ end
end
class StdioInputMethod < InputMethod
@@ -69,7 +83,14 @@ module IRB
#
# See IO#eof? for more information.
def eof?
- @stdin.eof?
+ if @stdin.wait_readable(0.00001)
+ c = @stdin.getc
+ result = c.nil? ? true : false
+ @stdin.ungetc(c) unless c.nil?
+ result
+ else # buffer is empty
+ false
+ end
end
# Whether this input method is still readable when there is no more data to
@@ -93,14 +114,31 @@ module IRB
def encoding
@stdin.external_encoding
end
+
+ # For debug message
+ def inspect
+ 'StdioInputMethod'
+ end
end
# Use a File for IO with irb, see InputMethod
class FileInputMethod < InputMethod
+ class << self
+ def open(file, &block)
+ begin
+ io = new(file)
+ block.call(io)
+ ensure
+ io&.close
+ end
+ end
+ end
+
# Creates a new input method object
def initialize(file)
super
- @io = IRB::MagicFile.open(file)
+ @io = file.is_a?(IO) ? file : IRB::MagicFile.open(file)
+ @external_encoding = @io.external_encoding
end
# The file name of this input method, usually given during initialization.
attr_reader :file_name
@@ -110,7 +148,7 @@ module IRB
#
# See IO#eof? for more information.
def eof?
- @io.eof?
+ @io.closed? || @io.eof?
end
# Reads the next line from this input method.
@@ -123,16 +161,34 @@ module IRB
# The external encoding for standard input.
def encoding
- @io.external_encoding
+ @external_encoding
+ end
+
+ # For debug message
+ def inspect
+ 'FileInputMethod'
+ end
+
+ def close
+ @io.close
end
end
begin
- require "readline"
class ReadlineInputMethod < InputMethod
- include Readline
+ def self.initialize_readline
+ require "readline"
+ rescue LoadError
+ else
+ include ::Readline
+ end
+
# Creates a new input method object using Readline
def initialize
+ self.class.initialize_readline
+ if Readline.respond_to?(:encoding_system_needs)
+ IRB.__send__(:set_encoding, Readline.encoding_system_needs.name, override: false)
+ end
super
@line_no = 0
@@ -194,19 +250,23 @@ module IRB
@stdin.external_encoding
end
- if Readline.respond_to?("basic_word_break_characters=")
- Readline.basic_word_break_characters = IRB::InputCompletor::BASIC_WORD_BREAK_CHARACTERS
+ # For debug message
+ def inspect
+ readline_impl = (defined?(Reline) && Readline == Reline) ? 'Reline' : 'ext/readline'
+ str = "ReadlineInputMethod with #{readline_impl} #{Readline::VERSION}"
+ inputrc_path = File.expand_path(ENV['INPUTRC'] || '~/.inputrc')
+ str += " and #{inputrc_path}" if File.exist?(inputrc_path)
+ str
end
- Readline.completion_append_character = nil
- Readline.completion_proc = IRB::InputCompletor::CompletionProc
end
- rescue LoadError
end
- class ReidlineInputMethod < InputMethod
+ class RelineInputMethod < InputMethod
include Reline
- # Creates a new input method object using Readline
+
+ # Creates a new input method object using Reline
def initialize
+ IRB.__send__(:set_encoding, Reline.encoding_system_needs.name, override: false)
super
@line_no = 0
@@ -220,12 +280,14 @@ module IRB
Reline.basic_word_break_characters = IRB::InputCompletor::BASIC_WORD_BREAK_CHARACTERS
end
Reline.completion_append_character = nil
+ Reline.completer_quote_characters = ''
Reline.completion_proc = IRB::InputCompletor::CompletionProc
Reline.output_modifier_proc =
if IRB.conf[:USE_COLORIZE]
- proc do |output, complete:|
+ proc do |output, complete: |
next unless IRB::Color.colorable?
- IRB::Color.colorize_code(output, complete: complete)
+ lvars = IRB.CurrentContext&.local_variables || []
+ IRB::Color.colorize_code(output, complete: complete, local_variables: lvars)
end
else
proc do |output|
@@ -233,6 +295,15 @@ module IRB
end
end
Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
+ Reline.autocompletion = IRB.conf[:USE_AUTOCOMPLETE]
+
+ if IRB.conf[:USE_AUTOCOMPLETE]
+ begin
+ require 'rdoc'
+ Reline.add_dialog_proc(:show_doc, SHOW_DOC_DIALOG, Reline::DEFAULT_DIALOG_CONTEXT)
+ rescue LoadError
+ end
+ end
end
def check_termination(&block)
@@ -247,6 +318,99 @@ module IRB
@auto_indent_proc = block
end
+ SHOW_DOC_DIALOG = ->() {
+ dialog.trap_key = nil
+ alt_d = [
+ [Reline::Key.new(nil, 0xE4, true)], # Normal Alt+d.
+ [27, 100], # Normal Alt+d when convert-meta isn't used.
+ [195, 164], # The "ä" that appears when Alt+d is pressed on xterm.
+ [226, 136, 130] # The "∂" that appears when Alt+d in pressed on iTerm2.
+ ]
+
+ if just_cursor_moving and completion_journey_data.nil?
+ return nil
+ end
+ cursor_pos_to_render, result, pointer, autocomplete_dialog = context.pop(4)
+ return nil if result.nil? or pointer.nil? or pointer < 0
+ name = result[pointer]
+ name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)
+
+ options = {}
+ options[:extra_doc_dirs] = IRB.conf[:EXTRA_DOC_DIRS] unless IRB.conf[:EXTRA_DOC_DIRS].empty?
+ driver = RDoc::RI::Driver.new(options)
+
+ if key.match?(dialog.name)
+ begin
+ driver.display_names([name])
+ rescue RDoc::RI::Driver::NotFoundError
+ end
+ end
+
+ begin
+ name = driver.expand_name(name)
+ rescue RDoc::RI::Driver::NotFoundError
+ return nil
+ rescue
+ return nil # unknown error
+ end
+ doc = nil
+ used_for_class = false
+ if not name =~ /#|\./
+ found, klasses, includes, extends = driver.classes_and_includes_and_extends_for(name)
+ if not found.empty?
+ doc = driver.class_document(name, found, klasses, includes, extends)
+ used_for_class = true
+ end
+ end
+ unless used_for_class
+ doc = RDoc::Markup::Document.new
+ begin
+ driver.add_method(doc, name)
+ rescue RDoc::RI::Driver::NotFoundError
+ doc = nil
+ rescue
+ return nil # unknown error
+ end
+ end
+ return nil if doc.nil?
+ width = 40
+
+ right_x = cursor_pos_to_render.x + autocomplete_dialog.width
+ if right_x + width > screen_width
+ right_width = screen_width - (right_x + 1)
+ left_x = autocomplete_dialog.column - width
+ left_x = 0 if left_x < 0
+ left_width = width > autocomplete_dialog.column ? autocomplete_dialog.column : width
+ if right_width.positive? and left_width.positive?
+ if right_width >= left_width
+ width = right_width
+ x = right_x
+ else
+ width = left_width
+ x = left_x
+ end
+ elsif right_width.positive? and left_width <= 0
+ width = right_width
+ x = right_x
+ elsif right_width <= 0 and left_width.positive?
+ width = left_width
+ x = left_x
+ else # Both are negative width.
+ return nil
+ end
+ else
+ x = right_x
+ end
+ formatter = RDoc::Markup::ToAnsi.new
+ formatter.width = width
+ dialog.trap_key = alt_d
+ message = 'Press Alt+d to read the full document'
+ contents = [message] + doc.accept(formatter).split("\n")
+
+ y = cursor_pos_to_render.y
+ DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: contents, width: width, bg_color: '49')
+ }
+
# Reads the next line from this input method.
#
# See IO#gets for more information.
@@ -293,5 +457,27 @@ module IRB
def encoding
@stdin.external_encoding
end
+
+ # For debug message
+ def inspect
+ config = Reline::Config.new
+ str = "RelineInputMethod with Reline #{Reline::VERSION}"
+ if config.respond_to?(:inputrc_path)
+ inputrc_path = File.expand_path(config.inputrc_path)
+ else
+ inputrc_path = File.expand_path(ENV['INPUTRC'] || '~/.inputrc')
+ end
+ str += " and #{inputrc_path}" if File.exist?(inputrc_path)
+ str
+ end
+ end
+
+ class ReidlineInputMethod < RelineInputMethod
+ def initialize
+ warn <<~MSG.strip
+ IRB::ReidlineInputMethod is deprecated, please use IRB::RelineInputMethod instead.
+ MSG
+ super
+ end
end
end
diff --git a/lib/irb/inspector.rb b/lib/irb/inspector.rb
index bc7fb0b125..d8c0ba90cf 100644
--- a/lib/irb/inspector.rb
+++ b/lib/irb/inspector.rb
@@ -100,27 +100,18 @@ module IRB # :nodoc:
# Proc to call when the input is evaluated and output in irb.
def inspect_value(v)
@inspect.call(v)
+ rescue
+ puts "(Object doesn't support #inspect)"
+ ''
end
end
Inspector.def_inspector([false, :to_s, :raw]){|v| v.to_s}
- Inspector.def_inspector([true, :p, :inspect]){|v|
- begin
- result = v.inspect
- if IRB.conf[:MAIN_CONTEXT]&.use_colorize? && Color.inspect_colorable?(v)
- result = Color.colorize_code(result)
- end
- result
- rescue NoMethodError
- puts "(Object doesn't support #inspect)"
- end
+ Inspector.def_inspector([:p, :inspect]){|v|
+ Color.colorize_code(v.inspect, colorable: Color.colorable? && Color.inspect_colorable?(v))
}
- Inspector.def_inspector([:pp, :pretty_inspect], proc{require "pp"}){|v|
- result = v.pretty_inspect.chomp
- if IRB.conf[:MAIN_CONTEXT]&.use_colorize? && Color.inspect_colorable?(v)
- result = Color.colorize_code(result)
- end
- result
+ Inspector.def_inspector([true, :pp, :pretty_inspect], proc{require_relative "color_printer"}){|v|
+ IRB::ColorPrinter.pp(v, '').chomp
}
Inspector.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v|
begin
@@ -135,8 +126,3 @@ module IRB # :nodoc:
Marshal.dump(v)
}
end
-
-
-
-
-
diff --git a/lib/irb/irb.gemspec b/lib/irb/irb.gemspec
index c3208954c5..c3e8a4dc58 100644
--- a/lib/irb/irb.gemspec
+++ b/lib/irb/irb.gemspec
@@ -8,15 +8,16 @@ end
Gem::Specification.new do |spec|
spec.name = "irb"
spec.version = IRB::VERSION
- spec.authors = ["Keiju ISHITSUKA"]
- spec.email = ["keiju@ruby-lang.org"]
+ spec.authors = ["aycabta", "Keiju ISHITSUKA"]
+ spec.email = ["aycabta@gmail.com", "keiju@ruby-lang.org"]
spec.summary = %q{Interactive Ruby command-line tool for REPL (Read Eval Print Loop).}
spec.description = %q{Interactive Ruby command-line tool for REPL (Read Eval Print Loop).}
spec.homepage = "https://github.com/ruby/irb"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.files = [
+ ".document",
"Gemfile",
"LICENSE.txt",
"README.md",
@@ -27,57 +28,13 @@ Gem::Specification.new do |spec|
"doc/irb/irb.rd.ja",
"exe/irb",
"irb.gemspec",
- "lib/irb.rb",
- "lib/irb/cmd/chws.rb",
- "lib/irb/cmd/fork.rb",
- "lib/irb/cmd/help.rb",
- "lib/irb/cmd/load.rb",
- "lib/irb/cmd/nop.rb",
- "lib/irb/cmd/pushws.rb",
- "lib/irb/cmd/subirb.rb",
- "lib/irb/color.rb",
- "lib/irb/completion.rb",
- "lib/irb/context.rb",
- "lib/irb/ext/change-ws.rb",
- "lib/irb/ext/history.rb",
- "lib/irb/ext/loader.rb",
- "lib/irb/ext/multi-irb.rb",
- "lib/irb/ext/save-history.rb",
- "lib/irb/ext/tracer.rb",
- "lib/irb/ext/use-loader.rb",
- "lib/irb/ext/workspaces.rb",
- "lib/irb/extend-command.rb",
- "lib/irb/frame.rb",
- "lib/irb/help.rb",
- "lib/irb/init.rb",
- "lib/irb/input-method.rb",
- "lib/irb/inspector.rb",
- "lib/irb/lc/.document",
- "lib/irb/lc/error.rb",
- "lib/irb/lc/help-message",
- "lib/irb/lc/ja/encoding_aliases.rb",
- "lib/irb/lc/ja/error.rb",
- "lib/irb/lc/ja/help-message",
- "lib/irb/locale.rb",
- "lib/irb/magic-file.rb",
- "lib/irb/notifier.rb",
- "lib/irb/output-method.rb",
- "lib/irb/ruby-lex.rb",
- "lib/irb/ruby_logo.aa",
- "lib/irb/src_encoding.rb",
- "lib/irb/version.rb",
- "lib/irb/workspace.rb",
- "lib/irb/ws-for-case-2.rb",
- "lib/irb/xmp.rb",
"man/irb.1",
- ]
+ ] + Dir.glob("lib/**/*")
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6")
- spec.add_dependency "reline", ">= 0.0.1"
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
+ spec.add_dependency "reline", ">= 0.3.0"
end
diff --git a/lib/irb/lc/.document b/lib/irb/lc/.document
deleted file mode 100644
index 524bb9430b..0000000000
--- a/lib/irb/lc/.document
+++ /dev/null
@@ -1,4 +0,0 @@
-# hide help-message files which contain usage information
-error.rb
-ja/encoding_aliases.rb
-ja/error.rb
diff --git a/lib/irb/lc/error.rb b/lib/irb/lc/error.rb
index 798994e92c..cb5c21cdb4 100644
--- a/lib/irb/lc/error.rb
+++ b/lib/irb/lc/error.rb
@@ -10,8 +10,9 @@
#
#
-# :stopdoc:
module IRB
+ # :stopdoc:
+
class UnrecognizedSwitch < StandardError
def initialize(val)
super("Unrecognized switch: #{val}")
@@ -47,11 +48,6 @@ module IRB
super("No such job(#{val}).")
end
end
- class CantShiftToMultiIrbMode < StandardError
- def initialize
- super("Can't shift to multi irb mode.")
- end
- end
class CantChangeBinding < StandardError
def initialize(val)
super("Can't change binding to (#{val}).")
@@ -67,5 +63,6 @@ module IRB
super("Define illegal RC_NAME_GENERATOR.")
end
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/lc/help-message b/lib/irb/lc/help-message
index a80facc9c5..5b23f4c41e 100644
--- a/lib/irb/lc/help-message
+++ b/lib/irb/lc/help-message
@@ -1,52 +1,51 @@
-# -*- coding: utf-8 -*-
-#
-# irb/lc/help-message.rb -
-# $Release Version: 0.9.6$
-# $Revision$
-# by Keiju ISHITSUKA(keiju@ruby-lang.org)
-#
-# --
-#
-#
-#
Usage: irb.rb [options] [programfile] [arguments]
- -f Suppress read of ~/.irbrc
- -d Set $DEBUG to true (same as `ruby -d')
- -r load-module Same as `ruby -r'
- -I path Specify $LOAD_PATH directory
- -U Same as `ruby -U`
- -E enc Same as `ruby -E`
- -w Same as `ruby -w`
- -W[level=2] Same as `ruby -W`
- --context-mode n Set n[0-3] to method to create Binding Object,
- when new workspace was created
- --echo Show result(default)
- --noecho Don't show result
- --inspect Use `inspect' for output
- --noinspect Don't use inspect for output
- --multiline Use multiline editor module
- --nomultiline Don't use multiline editor module
- --singleline Use singleline editor module
- --nosingleline Don't use singleline editor module
- --colorize Use colorization
- --nocolorize Don't use colorization
- --prompt prompt-mode/--prompt-mode prompt-mode
- Switch prompt mode. Pre-defined prompt modes are
- `default', `simple', `xmp' and `inf-ruby'
+ -f Don't initialize from configuration file.
+ -d Set $DEBUG and $VERBOSE to true (same as 'ruby -d').
+ -r load-module Require load-module (same as 'ruby -r').
+ -I path Specify $LOAD_PATH directory (same as 'ruby -I').
+ -U Set external and internal encodings to UTF-8.
+ -E ex[:in] Set default external (ex) and internal (in) encodings
+ (same as 'ruby -E').
+ -w Suppress warnings (same as 'ruby -w').
+ -W[level=2] Set warning level: 0=silence, 1=medium, 2=verbose
+ (same as 'ruby -W').
+ --context-mode n Set n[0-4] to method to create Binding Object,
+ when new workspace was created.
+ --extra-doc-dir Add an extra doc dir for the doc dialog.
+ --echo Show result (default).
+ --noecho Don't show result.
+ --echo-on-assignment
+ Show result on assignment.
+ --noecho-on-assignment
+ Don't show result on assignment.
+ --truncate-echo-on-assignment
+ Show truncated result on assignment (default).
+ --inspect Use 'inspect' for output.
+ --noinspect Don't use 'inspect' for output.
+ --multiline Use multiline editor module.
+ --nomultiline Don't use multiline editor module (default).
+ --singleline Use single line editor module.
+ --nosingleline Don't use single line editor module (default).
+ --colorize Use color-highlighting (default).
+ --nocolorize Don't use color-highlighting.
+ --autocomplete Use auto-completion (default).
+ --noautocomplete Don't use auto-completion.
+ --prompt prompt-mode, --prompt-mode prompt-mode
+ Set prompt mode. Pre-defined prompt modes are:
+ 'default', 'classic', 'simple', 'inf-ruby', 'xmp', 'null'.
--inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs.
Suppresses --multiline and --singleline.
- --sample-book-mode/--simple-prompt
- Simple prompt mode
- --noprompt No prompt mode
+ --sample-book-mode, --simple-prompt
+ Set prompt mode to 'simple'.
+ --noprompt Don't output prompt.
+ --script Script mode (default, treat first argument as script)
+ --noscript No script mode (leave arguments in argv)
--single-irb Share self with sub-irb.
- --tracer Display trace for each execution of commands.
- --back-trace-limit n
- Display backtrace top n and tail n. The default
- value is 16.
- --verbose Show details
- --noverbose Don't show details
- -v, --version Print the version of irb
- -h, --help Print help
- -- Separate options of irb from the list of command-line args
-
-# vim:fileencoding=utf-8
+ --tracer Show stack trace for each command.
+ --back-trace-limit n[=16]
+ Display backtrace top n and bottom n.
+ --verbose Show details.
+ --noverbose Don't show details.
+ -v, --version Print the version of irb.
+ -h, --help Print help.
+ -- Separate options of irb from the list of command-line args.
diff --git a/lib/irb/lc/ja/encoding_aliases.rb b/lib/irb/lc/ja/encoding_aliases.rb
index c534bf0fef..08180c3ec2 100644
--- a/lib/irb/lc/ja/encoding_aliases.rb
+++ b/lib/irb/lc/ja/encoding_aliases.rb
@@ -1,11 +1,13 @@
# frozen_string_literal: false
-# :stopdoc:
module IRB
+ # :stopdoc:
+
class Locale
@@legacy_encoding_alias_map = {
'ujis' => Encoding::EUC_JP,
'euc' => Encoding::EUC_JP
}.freeze
end
+
+ # :startdoc:
end
-# :startdoc:
diff --git a/lib/irb/lc/ja/error.rb b/lib/irb/lc/ja/error.rb
index 31ebb3b5f0..5e3622cbae 100644
--- a/lib/irb/lc/ja/error.rb
+++ b/lib/irb/lc/ja/error.rb
@@ -10,8 +10,9 @@
#
#
-# :stopdoc:
module IRB
+ # :stopdoc:
+
class UnrecognizedSwitch < StandardError
def initialize(val)
super("スイッãƒ(#{val})ãŒåˆ†ã‚Šã¾ã›ã‚“")
@@ -47,11 +48,6 @@ module IRB
super("ãã®ã‚ˆã†ãªã‚¸ãƒ§ãƒ–(#{val})ã¯ã‚りã¾ã›ã‚“.")
end
end
- class CantShiftToMultiIrbMode < StandardError
- def initialize
- super("multi-irb modeã«ç§»ã‚Œã¾ã›ã‚“.")
- end
- end
class CantChangeBinding < StandardError
def initialize(val)
super("ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°(#{val})ã«å¤‰æ›´ã§ãã¾ã›ã‚“.")
@@ -67,6 +63,7 @@ module IRB
super("RC_NAME_GENERATORãŒæ­£ã—ã定義ã•れã¦ã„ã¾ã›ã‚“.")
end
end
+
+ # :startdoc:
end
-# :startdoc:
# vim:fileencoding=utf-8
diff --git a/lib/irb/lc/ja/help-message b/lib/irb/lc/ja/help-message
index 9794a8e24e..1c15d331ea 100644
--- a/lib/irb/lc/ja/help-message
+++ b/lib/irb/lc/ja/help-message
@@ -1,13 +1,3 @@
-# -*- coding: utf-8 -*-
-# irb/lc/ja/help-message.rb -
-# $Release Version: 0.9.6$
-# $Revision$
-# by Keiju ISHITSUKA(keiju@ruby-lang.org)
-#
-# --
-#
-#
-#
Usage: irb.rb [options] [programfile] [arguments]
-f ~/.irbrc を読ã¿è¾¼ã¾ãªã„.
-d $DEBUG ã‚’trueã«ã™ã‚‹(ruby -d ã¨åŒã˜)
@@ -29,6 +19,8 @@ Usage: irb.rb [options] [programfile] [arguments]
--nosingleline シングルラインエディタを利用ã—ãªã„.
--colorize 色付ã‘を利用ã™ã‚‹.
--nocolorize 色付ã‘を利用ã—ãªã„.
+ --autocomplete オートコンプリートを利用ã™ã‚‹.
+ --noautocomplete オートコンプリートを利用ã—ãªã„.
--prompt prompt-mode/--prompt-mode prompt-mode
プロンプトモードを切替ãˆã¾ã™. ç¾åœ¨å®šç¾©ã•れã¦ã„るプ
ロンプトモードã¯, default, simple, xmp, inf-rubyãŒ
@@ -51,5 +43,3 @@ Usage: irb.rb [options] [programfile] [arguments]
-v, --version irbã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã™ã‚‹.
-h, --help irb ã®ãƒ˜ãƒ«ãƒ—を表示ã™ã‚‹.
-- 以é™ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•数をオプションã¨ã—ã¦æ‰±ã‚ãªã„.
-
-# vim:fileencoding=utf-8
diff --git a/lib/irb/locale.rb b/lib/irb/locale.rb
index ba833eced4..bb44b41002 100644
--- a/lib/irb/locale.rb
+++ b/lib/irb/locale.rb
@@ -24,6 +24,7 @@ module IRB # :nodoc:
@@loaded = []
def initialize(locale = nil)
+ @override_encoding = nil
@lang = @territory = @encoding_name = @modifier = nil
@locale = locale || ENV["IRB_LANG"] || ENV["LC_MESSAGES"] || ENV["LC_ALL"] || ENV["LANG"] || "C"
if m = LOCALE_NAME_RE.match(@locale)
@@ -40,12 +41,16 @@ module IRB # :nodoc:
@encoding ||= (Encoding.find('locale') rescue Encoding::ASCII_8BIT)
end
- attr_reader :lang, :territory, :encoding, :modifier
+ attr_reader :lang, :territory, :modifier
+
+ def encoding
+ @override_encoding || @encoding
+ end
def String(mes)
mes = super(mes)
- if @encoding
- mes.encode(@encoding, undef: :replace)
+ if encoding
+ mes.encode(encoding, undef: :replace)
else
mes
end
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index b4c31c16fe..85b336fbe1 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -11,6 +11,7 @@
#
require "ripper"
+require "jruby" if RUBY_ENGINE == "jruby"
# :stopdoc:
class RubyLex
@@ -29,17 +30,54 @@ class RubyLex
@prompt = nil
end
+ def self.compile_with_errors_suppressed(code, line_no: 1)
+ begin
+ result = yield code, line_no
+ rescue ArgumentError
+ # Ruby can issue an error for the code if there is an
+ # incomplete magic comment for encoding in it. Force an
+ # expression with a new line before the code in this
+ # case to prevent magic comment handling. To make sure
+ # line numbers in the lexed code remain the same,
+ # decrease the line number by one.
+ code = ";\n#{code}"
+ line_no -= 1
+ result = yield code, line_no
+ end
+ result
+ end
+
# io functions
- def set_input(io, p = nil, &block)
+ def set_input(io, p = nil, context:, &block)
@io = io
if @io.respond_to?(:check_termination)
@io.check_termination do |code|
- code.gsub!(/\s*\z/, '').concat("\n")
- ltype, indent, continue, code_block_open = check_state(code)
- if ltype or indent > 0 or continue or code_block_open
- false
+ if Reline::IOGate.in_pasting?
+ lex = RubyLex.new
+ rest = lex.check_termination_in_prev_line(code, context: context)
+ if rest
+ Reline.delete_text
+ rest.bytes.reverse_each do |c|
+ Reline.ungetc(c)
+ end
+ true
+ else
+ false
+ end
else
- true
+ # Accept any single-line input for symbol aliases or commands that transform args
+ command = code.split(/\s/, 2).first
+ if context.symbol_alias?(command) || context.transform_args?(command)
+ next true
+ end
+
+ code.gsub!(/\s*\z/, '').concat("\n")
+ ltype, indent, continue, code_block_open = check_state(code, context: context)
+ if ltype or indent > 0 or continue or code_block_open
+ false
+ else
+ true
+ end
end
end
end
@@ -47,14 +85,36 @@ class RubyLex
@io.dynamic_prompt do |lines|
lines << '' if lines.empty?
result = []
- lines.each_index { |i|
- c = lines[0..i].map{ |l| l + "\n" }.join
- ltype, indent, continue, code_block_open = check_state(c)
- result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + i)
- }
+ tokens = self.class.ripper_lex_without_warning(lines.map{ |l| l + "\n" }.join, context: context)
+ code = String.new
+ partial_tokens = []
+ unprocessed_tokens = []
+ line_num_offset = 0
+ tokens.each do |t|
+ partial_tokens << t
+ unprocessed_tokens << t
+ if t.tok.include?("\n")
+ t_str = t.tok
+ t_str.each_line("\n") do |s|
+ code << s << "\n"
+ ltype, indent, continue, code_block_open = check_state(code, partial_tokens, context: context)
+ result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + line_num_offset)
+ line_num_offset += 1
+ end
+ unprocessed_tokens = []
+ else
+ code << t.tok
+ end
+ end
+
+ unless unprocessed_tokens.empty?
+ ltype, indent, continue, code_block_open = check_state(code, unprocessed_tokens, context: context)
+ result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + line_num_offset)
+ end
result
end
end
+
if p.respond_to?(:call)
@input = p
elsif block_given?
@@ -73,44 +133,98 @@ class RubyLex
end
end
- def ripper_lex_without_warning(code)
+ ERROR_TOKENS = [
+ :on_parse_error,
+ :compile_error,
+ :on_assign_error,
+ :on_alias_error,
+ :on_class_name_error,
+ :on_param_error
+ ]
+
+ def self.generate_local_variables_assign_code(local_variables)
+ "#{local_variables.join('=')}=nil;" unless local_variables.empty?
+ end
+
+ def self.ripper_lex_without_warning(code, context: nil)
verbose, $VERBOSE = $VERBOSE, nil
- tokens = Ripper.lex(code)
+ lvars_code = generate_local_variables_assign_code(context&.local_variables || [])
+ if lvars_code
+ code = "#{lvars_code}\n#{code}"
+ line_no = 0
+ else
+ line_no = 1
+ end
+
+ compile_with_errors_suppressed(code, line_no: line_no) do |inner_code, line_no|
+ lexer = Ripper::Lexer.new(inner_code, '-', line_no)
+ if lexer.respond_to?(:scan) # Ruby 2.7+
+ lexer.scan.each_with_object([]) do |t, tokens|
+ next if t.pos.first == 0
+ prev_tk = tokens.last
+ position_overlapped = prev_tk && t.pos[0] == prev_tk.pos[0] && t.pos[1] < prev_tk.pos[1] + prev_tk.tok.bytesize
+ if position_overlapped
+ tokens[-1] = t if ERROR_TOKENS.include?(prev_tk.event) && !ERROR_TOKENS.include?(t.event)
+ else
+ tokens << t
+ end
+ end
+ else
+ lexer.parse.reject { |it| it.pos.first == 0 }.sort_by(&:pos)
+ end
+ end
+ ensure
$VERBOSE = verbose
- tokens
+ end
+
+ def find_prev_spaces(line_index)
+ return 0 if @tokens.size == 0
+ md = @tokens[0].tok.match(/(\A +)/)
+ prev_spaces = md.nil? ? 0 : md[1].count(' ')
+ line_count = 0
+ @tokens.each_with_index do |t, i|
+ if t.tok.include?("\n")
+ line_count += t.tok.count("\n")
+ if line_count >= line_index
+ return prev_spaces
+ end
+ if (@tokens.size - 1) > i
+ md = @tokens[i + 1].tok.match(/(\A +)/)
+ prev_spaces = md.nil? ? 0 : md[1].count(' ')
+ end
+ end
+ end
+ prev_spaces
end
def set_auto_indent(context)
if @io.respond_to?(:auto_indent) and context.auto_indent_mode
@io.auto_indent do |lines, line_index, byte_pointer, is_newline|
if is_newline
- md = lines[line_index - 1].match(/(\A +)/)
- prev_spaces = md.nil? ? 0 : md[1].count(' ')
- @tokens = ripper_lex_without_warning(lines[0..line_index].join("\n"))
+ @tokens = self.class.ripper_lex_without_warning(lines[0..line_index].join("\n"), context: context)
+ prev_spaces = find_prev_spaces(line_index)
depth_difference = check_newline_depth_difference
+ depth_difference = 0 if depth_difference < 0
prev_spaces + depth_difference * 2
else
code = line_index.zero? ? '' : lines[0..(line_index - 1)].map{ |l| l + "\n" }.join
last_line = lines[line_index]&.byteslice(0, byte_pointer)
code += last_line if last_line
- @tokens = ripper_lex_without_warning(code)
- corresponding_token_depth = check_corresponding_token_depth
- if corresponding_token_depth
- corresponding_token_depth
- else
- nil
- end
+ @tokens = self.class.ripper_lex_without_warning(code, context: context)
+ check_corresponding_token_depth(lines, line_index)
end
end
end
end
- def check_state(code)
- @tokens = ripper_lex_without_warning(code)
- ltype = process_literal_type
- indent = process_nesting_level
- continue = process_continue
- code_block_open = check_code_block(code)
+ def check_state(code, tokens = nil, context: nil)
+ tokens = self.class.ripper_lex_without_warning(code, context: context) unless tokens
+ ltype = process_literal_type(tokens)
+ indent = process_nesting_level(tokens)
+ continue = process_continue(tokens)
+ lvars_code = self.class.generate_local_variables_assign_code(context.local_variables)
+ code = "#{lvars_code}\n#{code}" if lvars_code
+ code_block_open = check_code_block(code, tokens)
[ltype, indent, continue, code_block_open]
end
@@ -129,17 +243,20 @@ class RubyLex
@code_block_open = false
end
- def each_top_level_statement
+ def each_top_level_statement(context)
initialize_input
catch(:TERM_INPUT) do
loop do
begin
prompt
- unless l = lex
+ unless l = lex(context)
throw :TERM_INPUT if @line == ''
else
@line_no += l.count("\n")
- next if l == "\n"
+ if l == "\n"
+ @exp_line_no += 1
+ next
+ end
@line.concat l
if @code_block_open or @ltype or @continue or @indent > 0
next
@@ -149,7 +266,7 @@ class RubyLex
@line.force_encoding(@io.encoding)
yield @line, @exp_line_no
end
- break if @io.eof?
+ raise TerminateLineInput if @io.eof?
@line = ''
@exp_line_no = @line_no
@@ -162,55 +279,62 @@ class RubyLex
end
end
- def lex
+ def lex(context)
line = @input.call
if @io.respond_to?(:check_termination)
return line # multiline
end
code = @line + (line.nil? ? '' : line)
code.gsub!(/\s*\z/, '').concat("\n")
- @tokens = ripper_lex_without_warning(code)
- @continue = process_continue
- @code_block_open = check_code_block(code)
- @indent = process_nesting_level
- @ltype = process_literal_type
+ @tokens = self.class.ripper_lex_without_warning(code, context: context)
+ @ltype, @indent, @continue, @code_block_open = check_state(code, @tokens, context: context)
line
end
- def process_continue
+ def process_continue(tokens = @tokens)
# last token is always newline
- if @tokens.size >= 2 and @tokens[-2][1] == :on_regexp_end
+ if tokens.size >= 2 and tokens[-2].event == :on_regexp_end
# end of regexp literal
return false
- elsif @tokens.size >= 2 and @tokens[-2][1] == :on_semicolon
+ elsif tokens.size >= 2 and tokens[-2].event == :on_semicolon
return false
- elsif @tokens.size >= 2 and @tokens[-2][1] == :on_kw and ['begin', 'else', 'ensure'].include?(@tokens[-2][2])
+ elsif tokens.size >= 2 and tokens[-2].event == :on_kw and ['begin', 'else', 'ensure'].include?(tokens[-2].tok)
return false
- elsif !@tokens.empty? and @tokens.last[2] == "\\\n"
+ elsif !tokens.empty? and tokens.last.tok == "\\\n"
return true
- elsif @tokens.size >= 1 and @tokens[-1][1] == :on_heredoc_end # "EOH\n"
+ elsif tokens.size >= 1 and tokens[-1].event == :on_heredoc_end # "EOH\n"
return false
- elsif @tokens.size >= 2 and defined?(Ripper::EXPR_BEG) and @tokens[-2][3].anybits?(Ripper::EXPR_BEG | Ripper::EXPR_FNAME)
+ elsif tokens.size >= 2 and tokens[-2].state.anybits?(Ripper::EXPR_BEG | Ripper::EXPR_FNAME) and tokens[-2].tok !~ /\A\.\.\.?\z/
# end of literal except for regexp
+ # endless range at end of line is not a continue
return true
end
false
end
- def check_code_block(code)
- return true if @tokens.empty?
- if @tokens.last[1] == :on_heredoc_beg
+ def check_code_block(code, tokens = @tokens)
+ return true if tokens.empty?
+ if tokens.last.event == :on_heredoc_beg
return true
end
begin # check if parser error are available
verbose, $VERBOSE = $VERBOSE, nil
case RUBY_ENGINE
+ when 'ruby'
+ self.class.compile_with_errors_suppressed(code) do |inner_code, line_no|
+ RubyVM::InstructionSequence.compile(inner_code, nil, nil, line_no)
+ end
when 'jruby'
JRuby.compile_ir(code)
else
- RubyVM::InstructionSequence.compile(code)
+ catch(:valid) do
+ eval("BEGIN { throw :valid, true }\n#{code}")
+ false
+ end
end
+ rescue EncodingError
+ # This is for a hash with invalid encoding symbol, {"\xAE": 1}
rescue SyntaxError => e
case e.message
when /unterminated (?:string|regexp) meets end of file/
@@ -228,7 +352,7 @@ class RubyLex
# "syntax error, unexpected end-of-input, expecting keyword_end"
#
# example:
- # if ture
+ # if true
# hoge
# if false
# fuga
@@ -261,51 +385,66 @@ class RubyLex
$VERBOSE = verbose
end
- if defined?(Ripper::EXPR_BEG)
- last_lex_state = @tokens.last[3]
- if last_lex_state.allbits?(Ripper::EXPR_BEG)
- return false
- elsif last_lex_state.allbits?(Ripper::EXPR_DOT)
- return true
- elsif last_lex_state.allbits?(Ripper::EXPR_CLASS)
- return true
- elsif last_lex_state.allbits?(Ripper::EXPR_FNAME)
- return true
- elsif last_lex_state.allbits?(Ripper::EXPR_VALUE)
- return true
- elsif last_lex_state.allbits?(Ripper::EXPR_ARG)
- return false
- end
+ last_lex_state = tokens.last.state
+
+ if last_lex_state.allbits?(Ripper::EXPR_BEG)
+ return false
+ elsif last_lex_state.allbits?(Ripper::EXPR_DOT)
+ return true
+ elsif last_lex_state.allbits?(Ripper::EXPR_CLASS)
+ return true
+ elsif last_lex_state.allbits?(Ripper::EXPR_FNAME)
+ return true
+ elsif last_lex_state.allbits?(Ripper::EXPR_VALUE)
+ return true
+ elsif last_lex_state.allbits?(Ripper::EXPR_ARG)
+ return false
end
false
end
- def process_nesting_level
+ def process_nesting_level(tokens = @tokens)
indent = 0
- @tokens.each_with_index { |t, index|
- case t[1]
- when :on_lbracket, :on_lbrace, :on_lparen
+ in_oneliner_def = nil
+ tokens.each_with_index { |t, index|
+ # detecting one-liner method definition
+ if in_oneliner_def.nil?
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ in_oneliner_def = :ENDFN
+ end
+ else
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ # continuing
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
+ in_oneliner_def = :BODY
+ end
+ else
+ if in_oneliner_def == :BODY
+ # one-liner method definition
+ indent -= 1
+ end
+ in_oneliner_def = nil
+ end
+ end
+
+ case t.event
+ when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
indent += 1
when :on_rbracket, :on_rbrace, :on_rparen
indent -= 1
when :on_kw
- next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
+ next if index > 0 and tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
when 'do'
- if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN | Ripper::EXPR_ARG)
- # method_with_block do; end
- indent += 1
- else
- # while cond do; end # also "until" or "for"
- # This "do" doesn't increment indent because "while" already
- # incremented.
- end
+ syntax_of_do = take_corresponding_syntax_to_kw_do(tokens, index)
+ indent += 1 if syntax_of_do == :method_calling
when 'def', 'case', 'for', 'begin', 'class', 'module'
indent += 1
when 'if', 'unless', 'while', 'until'
- # postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL
- indent += 1 unless t[3].allbits?(Ripper::EXPR_LABEL)
+ # postfix if/unless/while/until must be Ripper::EXPR_LABEL
+ indent += 1 unless t.state.allbits?(Ripper::EXPR_LABEL)
when 'end'
indent -= 1
end
@@ -315,72 +454,213 @@ class RubyLex
indent
end
+ def is_method_calling?(tokens, index)
+ tk = tokens[index]
+ if tk.state.anybits?(Ripper::EXPR_CMDARG) and tk.event == :on_ident
+ # The target method call to pass the block with "do".
+ return true
+ elsif tk.state.anybits?(Ripper::EXPR_ARG) and tk.event == :on_ident
+ non_sp_index = tokens[0..(index - 1)].rindex{ |t| t.event != :on_sp }
+ if non_sp_index
+ prev_tk = tokens[non_sp_index]
+ if prev_tk.state.anybits?(Ripper::EXPR_DOT) and prev_tk.event == :on_period
+ # The target method call with receiver to pass the block with "do".
+ return true
+ end
+ end
+ end
+ false
+ end
+
+ def take_corresponding_syntax_to_kw_do(tokens, index)
+ syntax_of_do = nil
+ # Finding a syntax corresponding to "do".
+ index.downto(0) do |i|
+ tk = tokens[i]
+ # In "continue", the token isn't the corresponding syntax to "do".
+ non_sp_index = tokens[0..(i - 1)].rindex{ |t| t.event != :on_sp }
+ first_in_fomula = false
+ if non_sp_index.nil?
+ first_in_fomula = true
+ elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index].event)
+ first_in_fomula = true
+ end
+ if is_method_calling?(tokens, i)
+ syntax_of_do = :method_calling
+ break if first_in_fomula
+ elsif tk.event == :on_kw && %w{while until for}.include?(tk.tok)
+ # A loop syntax in front of "do" found.
+ #
+ # while cond do # also "until" or "for"
+ # end
+ #
+ # This "do" doesn't increment indent because the loop syntax already
+ # incremented.
+ syntax_of_do = :loop_syntax
+ break if first_in_fomula
+ end
+ end
+ syntax_of_do
+ end
+
+ def is_the_in_correspond_to_a_for(tokens, index)
+ syntax_of_in = nil
+ # Finding a syntax corresponding to "do".
+ index.downto(0) do |i|
+ tk = tokens[i]
+ # In "continue", the token isn't the corresponding syntax to "do".
+ non_sp_index = tokens[0..(i - 1)].rindex{ |t| t.event != :on_sp }
+ first_in_fomula = false
+ if non_sp_index.nil?
+ first_in_fomula = true
+ elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index].event)
+ first_in_fomula = true
+ end
+ if tk.event == :on_kw && tk.tok == 'for'
+ # A loop syntax in front of "do" found.
+ #
+ # while cond do # also "until" or "for"
+ # end
+ #
+ # This "do" doesn't increment indent because the loop syntax already
+ # incremented.
+ syntax_of_in = :for
+ end
+ break if first_in_fomula
+ end
+ syntax_of_in
+ end
+
def check_newline_depth_difference
depth_difference = 0
+ open_brace_on_line = 0
+ in_oneliner_def = nil
@tokens.each_with_index do |t, index|
- case t[1]
+ # detecting one-liner method definition
+ if in_oneliner_def.nil?
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ in_oneliner_def = :ENDFN
+ end
+ else
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ # continuing
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
+ in_oneliner_def = :BODY
+ end
+ else
+ if in_oneliner_def == :BODY
+ # one-liner method definition
+ depth_difference -= 1
+ end
+ in_oneliner_def = nil
+ end
+ end
+
+ case t.event
when :on_ignored_nl, :on_nl, :on_comment
- if index != (@tokens.size - 1)
+ if index != (@tokens.size - 1) and in_oneliner_def != :BODY
depth_difference = 0
+ open_brace_on_line = 0
end
next
when :on_sp
next
end
- case t[1]
- when :on_lbracket, :on_lbrace, :on_lparen
+
+ case t.event
+ when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
depth_difference += 1
+ open_brace_on_line += 1
when :on_rbracket, :on_rbrace, :on_rparen
- depth_difference -= 1
+ depth_difference -= 1 if open_brace_on_line > 0
when :on_kw
- next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
+ next if index > 0 and @tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
when 'do'
- if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN | Ripper::EXPR_ARG)
- # method_with_block do; end
- depth_difference += 1
- else
- # while cond do; end # also "until" or "for"
- # This "do" doesn't increment indent because "while" already
- # incremented.
- end
+ syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index)
+ depth_difference += 1 if syntax_of_do == :method_calling
when 'def', 'case', 'for', 'begin', 'class', 'module'
depth_difference += 1
- when 'if', 'unless', 'while', 'until'
+ when 'if', 'unless', 'while', 'until', 'rescue'
# postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL
- unless t[3].allbits?(Ripper::EXPR_LABEL)
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
depth_difference += 1
end
- when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
+ when 'else', 'elsif', 'ensure', 'when'
depth_difference += 1
+ when 'in'
+ unless is_the_in_correspond_to_a_for(@tokens, index)
+ depth_difference += 1
+ end
+ when 'end'
+ depth_difference -= 1
end
end
end
depth_difference
end
- def check_corresponding_token_depth
+ def check_corresponding_token_depth(lines, line_index)
corresponding_token_depth = nil
is_first_spaces_of_line = true
is_first_printable_of_line = true
spaces_of_nest = []
spaces_at_line_head = 0
+ open_brace_on_line = 0
+ in_oneliner_def = nil
+
+ if heredoc_scope?
+ return lines[line_index][/^ */].length
+ end
+
@tokens.each_with_index do |t, index|
- case t[1]
+ # detecting one-liner method definition
+ if in_oneliner_def.nil?
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ in_oneliner_def = :ENDFN
+ end
+ else
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
+ # continuing
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
+ in_oneliner_def = :BODY
+ end
+ else
+ if in_oneliner_def == :BODY
+ # one-liner method definition
+ if is_first_printable_of_line
+ corresponding_token_depth = spaces_of_nest.pop
+ else
+ spaces_of_nest.pop
+ corresponding_token_depth = nil
+ end
+ end
+ in_oneliner_def = nil
+ end
+ end
+
+ case t.event
when :on_ignored_nl, :on_nl, :on_comment
- corresponding_token_depth = nil
- spaces_at_line_head = 0
- is_first_spaces_of_line = true
- is_first_printable_of_line = true
+ if in_oneliner_def != :BODY
+ corresponding_token_depth = nil
+ spaces_at_line_head = 0
+ is_first_spaces_of_line = true
+ is_first_printable_of_line = true
+ open_brace_on_line = 0
+ end
next
when :on_sp
- spaces_at_line_head = t[2].count(' ') if is_first_spaces_of_line
+ spaces_at_line_head = t.tok.count(' ') if is_first_spaces_of_line
is_first_spaces_of_line = false
next
end
- case t[1]
- when :on_lbracket, :on_lbrace, :on_lparen
- spaces_of_nest.push(spaces_at_line_head)
+
+ case t.event
+ when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
+ spaces_of_nest.push(spaces_at_line_head + open_brace_on_line * 2)
+ open_brace_on_line += 1
when :on_rbracket, :on_rbrace, :on_rparen
if is_first_printable_of_line
corresponding_token_depth = spaces_of_nest.pop
@@ -388,18 +668,32 @@ class RubyLex
spaces_of_nest.pop
corresponding_token_depth = nil
end
+ open_brace_on_line -= 1
when :on_kw
- next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
- when 'def', 'do', 'case', 'for', 'begin', 'class', 'module'
+ next if index > 0 and @tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
+ when 'do'
+ syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index)
+ if syntax_of_do == :method_calling
+ spaces_of_nest.push(spaces_at_line_head)
+ end
+ when 'def', 'case', 'for', 'begin', 'class', 'module'
spaces_of_nest.push(spaces_at_line_head)
+ when 'rescue'
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
+ corresponding_token_depth = spaces_of_nest.last
+ end
when 'if', 'unless', 'while', 'until'
- # postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL
- unless t[3].allbits?(Ripper::EXPR_LABEL)
+ # postfix if/unless/while/until must be Ripper::EXPR_LABEL
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
spaces_of_nest.push(spaces_at_line_head)
end
- when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
+ when 'else', 'elsif', 'ensure', 'when'
corresponding_token_depth = spaces_of_nest.last
+ when 'in'
+ if in_keyword_case_scope?
+ corresponding_token_depth = spaces_of_nest.last
+ end
when 'end'
if is_first_printable_of_line
corresponding_token_depth = spaces_of_nest.pop
@@ -415,13 +709,17 @@ class RubyLex
corresponding_token_depth
end
- def check_string_literal
+ def check_string_literal(tokens)
i = 0
start_token = []
end_type = []
- while i < @tokens.size
- t = @tokens[i]
- case t[1]
+ pending_heredocs = []
+ while i < tokens.size
+ t = tokens[i]
+ case t.event
+ when *end_type.last
+ start_token.pop
+ end_type.pop
when :on_tstring_beg
start_token << t
end_type << [:on_tstring_end, :on_label_end]
@@ -429,34 +727,46 @@ class RubyLex
start_token << t
end_type << :on_regexp_end
when :on_symbeg
- acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw}
- if (i + 1) < @tokens.size and acceptable_single_tokens.all?{ |t| @tokens[i + 1][1] != t }
+ acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw on_int on_backtick}
+ if (i + 1) < tokens.size
+ if acceptable_single_tokens.all?{ |st| tokens[i + 1].event != st }
+ start_token << t
+ end_type << :on_tstring_end
+ else
+ i += 1
+ end
+ end
+ when :on_backtick
+ if t.state.allbits?(Ripper::EXPR_BEG)
start_token << t
end_type << :on_tstring_end
end
- when :on_backtick
- start_token << t
- end_type << :on_tstring_end
when :on_qwords_beg, :on_words_beg, :on_qsymbols_beg, :on_symbols_beg
start_token << t
end_type << :on_tstring_end
when :on_heredoc_beg
- start_token << t
- end_type << :on_heredoc_end
- when *end_type.last
- start_token.pop
- end_type.pop
+ pending_heredocs << t
+ end
+
+ if pending_heredocs.any? && t.tok.include?("\n")
+ pending_heredocs.reverse_each do |t|
+ start_token << t
+ end_type << :on_heredoc_end
+ end
+ pending_heredocs = []
end
i += 1
end
- start_token.last.nil? ? '' : start_token.last
+ pending_heredocs.first || start_token.last
end
- def process_literal_type
- start_token = check_string_literal
- case start_token[1]
+ def process_literal_type(tokens = @tokens)
+ start_token = check_string_literal(tokens)
+ return nil if start_token == ""
+
+ case start_token&.event
when :on_tstring_beg
- case start_token[2]
+ case start_token&.tok
when ?" then ?"
when /^%.$/ then ?"
when /^%Q.$/ then ?"
@@ -471,7 +781,7 @@ class RubyLex
when :on_qsymbols_beg then ?]
when :on_symbols_beg then ?]
when :on_heredoc_beg
- start_token[2] =~ /<<[-~]?(['"`])[_a-zA-Z0-9]+\1/
+ start_token&.tok =~ /<<[-~]?(['"`])[_a-zA-Z0-9]+\1/
case $1
when ?" then ?"
when ?' then ?'
@@ -482,5 +792,75 @@ class RubyLex
nil
end
end
+
+ def check_termination_in_prev_line(code, context: nil)
+ tokens = self.class.ripper_lex_without_warning(code, context: context)
+ past_first_newline = false
+ index = tokens.rindex do |t|
+ # traverse first token before last line
+ if past_first_newline
+ if t.tok.include?("\n")
+ true
+ end
+ elsif t.tok.include?("\n")
+ past_first_newline = true
+ false
+ else
+ false
+ end
+ end
+
+ if index
+ first_token = nil
+ last_line_tokens = tokens[(index + 1)..(tokens.size - 1)]
+ last_line_tokens.each do |t|
+ unless [:on_sp, :on_ignored_sp, :on_comment].include?(t.event)
+ first_token = t
+ break
+ end
+ end
+
+ if first_token.nil?
+ return false
+ elsif first_token && first_token.state == Ripper::EXPR_DOT
+ return false
+ else
+ tokens_without_last_line = tokens[0..index]
+ ltype = process_literal_type(tokens_without_last_line)
+ indent = process_nesting_level(tokens_without_last_line)
+ continue = process_continue(tokens_without_last_line)
+ code_block_open = check_code_block(tokens_without_last_line.map(&:tok).join(''), tokens_without_last_line)
+ if ltype or indent > 0 or continue or code_block_open
+ return false
+ else
+ return last_line_tokens.map(&:tok).join('')
+ end
+ end
+ end
+ false
+ end
+
+ private
+
+ def heredoc_scope?
+ heredoc_tokens = @tokens.select { |t| [:on_heredoc_beg, :on_heredoc_end].include?(t.event) }
+ heredoc_tokens[-1]&.event == :on_heredoc_beg
+ end
+
+ def in_keyword_case_scope?
+ kw_tokens = @tokens.select { |t| t.event == :on_kw && ['case', 'for', 'end'].include?(t.tok) }
+ counter = 0
+ kw_tokens.reverse.each do |t|
+ if t.tok == 'case'
+ return true if counter.zero?
+ counter += 1
+ elsif t.tok == 'for'
+ counter += 1
+ elsif t.tok == 'end'
+ counter -= 1
+ end
+ end
+ false
+ end
end
# :startdoc:
diff --git a/lib/irb/ruby_logo.aa b/lib/irb/ruby_logo.aa
index 043e6f85fb..a34a3e2f28 100644
--- a/lib/irb/ruby_logo.aa
+++ b/lib/irb/ruby_logo.aa
@@ -35,4 +35,3 @@
m7 NW H N HSVO1z=?11-
NgTH bB kH WBHWWHBHWmQgg&gggggNNN
NNggggggNN
-
diff --git a/lib/irb/version.rb b/lib/irb/version.rb
index 9b8bd9b161..d1c0e54fdc 100644
--- a/lib/irb/version.rb
+++ b/lib/irb/version.rb
@@ -11,7 +11,7 @@
#
module IRB # :nodoc:
- VERSION = "1.2.1"
+ VERSION = "1.6.2"
@RELEASE_VERSION = VERSION
- @LAST_UPDATE_DATE = "2019-12-24"
+ @LAST_UPDATE_DATE = "2022-12-13"
end
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index 794a511521..e5ef52528a 100644
--- a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -12,6 +12,7 @@
require "delegate"
+IRB::TOPLEVEL_BINDING = binding
module IRB # :nodoc:
class WorkSpace
# Creates a new workspace.
@@ -51,11 +52,15 @@ EOF
end
@binding = BINDING_QUEUE.pop
- when 3 # binding in function on TOPLEVEL_BINDING(default)
- @binding = eval("self.class.send(:remove_method, :irb_binding) if defined?(irb_binding); private; def irb_binding; binding; end; irb_binding",
+ when 3 # binding in function on TOPLEVEL_BINDING
+ @binding = eval("self.class.remove_method(:irb_binding) if defined?(irb_binding); private; def irb_binding; binding; end; irb_binding",
TOPLEVEL_BINDING,
__FILE__,
__LINE__ - 3)
+ when 4 # binding is a copy of TOPLEVEL_BINDING (default)
+ # Note that this will typically be IRB::TOPLEVEL_BINDING
+ # This is to avoid RubyGems' local variables (see issue #17623)
+ @binding = TOPLEVEL_BINDING.dup
end
end
@@ -126,6 +131,7 @@ EOF
def filter_backtrace(bt)
return nil if bt =~ /\/irb\/.*\.rb/
return nil if bt =~ /\/irb\.rb/
+ return nil if bt =~ /tool\/lib\/.*\.rb|runner\.rb/ # for tests in Ruby repository
case IRB.conf[:CONTEXT_MODE]
when 1
return nil if bt =~ %r!/tmp/irb-binding!
@@ -152,26 +158,19 @@ EOF
end
end
- # NOT using #use_colorize? of IRB.conf[:MAIN_CONTEXT] because this method may be called before IRB::Irb#run
- use_colorize = IRB.conf.fetch(:USE_COLORIZE, true)
- if use_colorize
- lines = Color.colorize_code(code).lines
- else
- lines = code.lines
- end
+ lines = Color.colorize_code(code).lines
pos -= 1
start_pos = [pos - 5, 0].max
end_pos = [pos + 5, lines.size - 1].min
- if use_colorize
- fmt = " %2s #{Color.colorize("%#{end_pos.to_s.length}d", [:BLUE, :BOLD])}: %s"
- else
- fmt = " %2s %#{end_pos.to_s.length}d: %s"
- end
+ line_number_fmt = Color.colorize("%#{end_pos.to_s.length}d", [:BLUE, :BOLD])
+ fmt = " %2s #{line_number_fmt}: %s"
+
body = (start_pos..end_pos).map do |current_pos|
sprintf(fmt, pos == current_pos ? '=>' : '', current_pos + 1, lines[current_pos])
end.join("")
+
"\nFrom: #{file} @ line #{pos + 1} :\n\n#{body}#{Color.clear}\n"
end
diff --git a/lib/irb/xmp.rb b/lib/irb/xmp.rb
index 60cf3b4e4d..88cbd88525 100644
--- a/lib/irb/xmp.rb
+++ b/lib/irb/xmp.rb
@@ -10,7 +10,7 @@
#
#
-require "irb"
+require_relative "../irb"
require_relative "frame"
# An example printer for irb.
diff --git a/lib/logger.rb b/lib/logger.rb
index f0b99f75a2..7e4dacc911 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -11,6 +11,7 @@
# A simple system for logging messages. See Logger for more documentation.
require 'monitor'
+require 'rbconfig'
require_relative 'logger/version'
require_relative 'logger/formatter'
@@ -18,216 +19,353 @@ require_relative 'logger/log_device'
require_relative 'logger/severity'
require_relative 'logger/errors'
-# == Description
+# \Class \Logger provides a simple but sophisticated logging utility that
+# you can use to create one or more
+# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs]
+# for your program.
+# Each such log contains a chronological sequence of entries
+# that provides a record of the program's activities.
#
-# The Logger class provides a simple but sophisticated logging utility that
-# you can use to output messages.
+# == About the Examples
#
-# The messages have associated levels, such as +INFO+ or +ERROR+ that indicate
-# their importance. You can then give the Logger a level, and only messages
-# at that level or higher will be printed.
+# All examples on this page assume that \Logger has been required:
#
-# The levels are:
+# require 'logger'
#
-# +UNKNOWN+:: An unknown message that should always be logged.
-# +FATAL+:: An unhandleable error that results in a program crash.
-# +ERROR+:: A handleable error condition.
-# +WARN+:: A warning.
-# +INFO+:: Generic (useful) information about system operation.
-# +DEBUG+:: Low-level information for developers.
+# == Synopsis
#
-# For instance, in a production system, you may have your Logger set to
-# +INFO+ or even +WARN+.
-# When you are developing the system, however, you probably
-# want to know about the program's internal state, and would set the Logger to
-# +DEBUG+.
+# Create a log with Logger.new:
#
-# *Note*: Logger does not escape or sanitize any messages passed to it.
-# Developers should be aware of when potentially malicious data (user-input)
-# is passed to Logger, and manually escape the untrusted data:
+# # Single log file.
+# logger = Logger.new('t.log')
+# # Size-based rotated logging: 3 10-megabyte files.
+# logger = Logger.new('t.log', 3, 10485760)
+# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly').
+# logger = Logger.new('t.log', 'daily')
+# # Log to an IO stream.
+# logger = Logger.new($stdout)
#
-# logger.info("User-input: #{input.dump}")
-# logger.info("User-input: %p" % input)
+# Add entries (level, message) with Logger#add:
#
-# You can use #formatter= for escaping all data.
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# logger.add(Logger::INFO, 'Non-error information')
+# logger.add(Logger::WARN, 'Non-error warning')
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# logger.add(Logger::FATAL, 'Fatal error')
+# logger.add(Logger::UNKNOWN, 'Most severe')
#
-# original_formatter = Logger::Formatter.new
-# logger.formatter = proc { |severity, datetime, progname, msg|
-# original_formatter.call(severity, datetime, progname, msg.dump)
-# }
-# logger.info(input)
+# Close the log with Logger#close:
#
-# === Example
+# logger.close
#
-# This creates a Logger that outputs to the standard output stream, with a
-# level of +WARN+:
+# == Entries
#
-# require 'logger'
+# You can add entries with method Logger#add:
+#
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# logger.add(Logger::INFO, 'Non-error information')
+# logger.add(Logger::WARN, 'Non-error warning')
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# logger.add(Logger::FATAL, 'Fatal error')
+# logger.add(Logger::UNKNOWN, 'Most severe')
+#
+# These shorthand methods also add entries:
+#
+# logger.debug('Maximal debugging info')
+# logger.info('Non-error information')
+# logger.warn('Non-error warning')
+# logger.error('Non-fatal error')
+# logger.fatal('Fatal error')
+# logger.unknown('Most severe')
+#
+# When you call any of these methods,
+# the entry may or may not be written to the log,
+# depending on the entry's severity and on the log level;
+# see {Log Level}[rdoc-ref:Logger@Log+Level]
+#
+# An entry always has:
+#
+# - A severity (the required argument to #add).
+# - An automatically created timestamp.
+#
+# And may also have:
+#
+# - A message.
+# - A program name.
+#
+# Example:
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message.', 'mung')
+# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message.
+#
+# The default format for an entry is:
+#
+# "%s, [%s #%d] %5s -- %s: %s\n"
+#
+# where the values to be formatted are:
+#
+# - \Severity (one letter).
+# - Timestamp.
+# - Process id.
+# - \Severity (word).
+# - Program name.
+# - Message.
+#
+# You can use a different entry format by:
+#
+# - Setting a custom format proc (affects following entries);
+# see {formatter=}[Logger.html#attribute-i-formatter].
+# - Calling any of the methods above with a block
+# (affects only the one entry).
+# Doing so can have two benefits:
+#
+# - Context: the block can evaluate the entire program context
+# and create a context-dependent message.
+# - Performance: the block is not evaluated unless the log level
+# permits the entry actually to be written:
+#
+# logger.error { my_slow_message_generator }
+#
+# Contrast this with the string form, where the string is
+# always evaluated, regardless of the log level:
+#
+# logger.error("#{my_slow_message_generator}")
+#
+# === \Severity
+#
+# The severity of a log entry has two effects:
+#
+# - Determines whether the entry is selected for inclusion in the log;
+# see {Log Level}[rdoc-ref:Logger@Log+Level].
+# - Indicates to any log reader (whether a person or a program)
+# the relative importance of the entry.
+#
+# === Timestamp
#
-# logger = Logger.new(STDOUT)
-# logger.level = Logger::WARN
+# The timestamp for a log entry is generated automatically
+# when the entry is created.
#
-# logger.debug("Created logger")
-# logger.info("Program started")
-# logger.warn("Nothing to do!")
+# The logged timestamp is formatted by method
+# {Time#strftime}[rdoc-ref:Time#strftime]
+# using this format string:
#
-# path = "a_non_existent_file"
+# '%Y-%m-%dT%H:%M:%S.%6N'
#
-# begin
-# File.foreach(path) do |line|
-# unless line =~ /^(\w+) = (.*)$/
-# logger.error("Line in wrong format: #{line.chomp}")
-# end
-# end
-# rescue => err
-# logger.fatal("Caught exception; exiting")
-# logger.fatal(err)
-# end
+# Example:
#
-# Because the Logger's level is set to +WARN+, only the warning, error, and
-# fatal messages are recorded. The debug and info messages are silently
-# discarded.
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO)
+# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil
#
-# === Features
+# You can set a different format using method #datetime_format=.
#
-# There are several interesting features that Logger provides, like
-# auto-rolling of log files, setting the format of log messages, and
-# specifying a program name in conjunction with the message. The next section
-# shows you how to achieve these things.
+# === Message
#
+# The message is an optional argument to an entry method:
#
-# == HOWTOs
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message')
+# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message
#
-# === How to create a logger
+# For the default entry formatter, <tt>Logger::Formatter</tt>,
+# the message object may be:
#
-# The options below give you various choices, in more or less increasing
-# complexity.
+# - A string: used as-is.
+# - An Exception: <tt>message.message</tt> is used.
+# - Anything else: <tt>message.inspect</tt> is used.
#
-# 1. Create a logger which logs messages to STDERR/STDOUT.
+# *Note*: Logger::Formatter does not escape or sanitize
+# the message passed to it.
+# Developers should be aware that malicious data (user input)
+# may be in the message, and should explicitly escape untrusted data.
#
-# logger = Logger.new(STDERR)
-# logger = Logger.new(STDOUT)
+# You can use a custom formatter to escape message data;
+# see the example at {formatter=}[Logger.html#attribute-i-formatter].
#
-# 2. Create a logger for the file which has the specified name.
+# === Program Name
#
-# logger = Logger.new('logfile.log')
+# The program name is an optional argument to an entry method:
#
-# 3. Create a logger for the specified file.
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message', 'mung')
+# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message
#
-# file = File.open('foo.log', File::WRONLY | File::APPEND)
-# # To create new logfile, add File::CREAT like:
-# # file = File.open('foo.log', File::WRONLY | File::APPEND | File::CREAT)
-# logger = Logger.new(file)
+# The default program name for a new logger may be set in the call to
+# Logger.new via optional keyword argument +progname+:
#
-# 4. Create a logger which ages the logfile once it reaches a certain size.
-# Leave 10 "old" log files where each file is about 1,024,000 bytes.
+# logger = Logger.new('t.log', progname: 'mung')
#
-# logger = Logger.new('foo.log', 10, 1024000)
+# The default program name for an existing logger may be set
+# by a call to method #progname=:
#
-# 5. Create a logger which ages the logfile daily/weekly/monthly.
+# logger.progname = 'mung'
#
-# logger = Logger.new('foo.log', 'daily')
-# logger = Logger.new('foo.log', 'weekly')
-# logger = Logger.new('foo.log', 'monthly')
+# The current program name may be retrieved with method
+# {progname}[Logger.html#attribute-i-progname]:
#
-# === How to log a message
+# logger.progname # => "mung"
#
-# Notice the different methods (+fatal+, +error+, +info+) being used to log
-# messages of various levels? Other methods in this family are +warn+ and
-# +debug+. +add+ is used below to log a message of an arbitrary (perhaps
-# dynamic) level.
+# == Log Level
#
-# 1. Message in a block.
+# The log level setting determines whether an entry is actually
+# written to the log, based on the entry's severity.
#
-# logger.fatal { "Argument 'foo' not given." }
+# These are the defined severities (least severe to most severe):
#
-# 2. Message as a string.
+# logger = Logger.new($stdout)
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info
+# logger.add(Logger::INFO, 'Non-error information')
+# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information
+# logger.add(Logger::WARN, 'Non-error warning')
+# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error
+# logger.add(Logger::FATAL, 'Fatal error')
+# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error
+# logger.add(Logger::UNKNOWN, 'Most severe')
+# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe
#
-# logger.error "Argument #{@foo} mismatch."
+# The default initial level setting is Logger::DEBUG, the lowest level,
+# which means that all entries are to be written, regardless of severity:
#
-# 3. With progname.
+# logger = Logger.new($stdout)
+# logger.level # => 0
+# logger.add(0, "My message")
+# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message
#
-# logger.info('initialize') { "Initializing..." }
+# You can specify a different setting in a new logger
+# using keyword argument +level+ with an appropriate value:
#
-# 4. With severity.
+# logger = Logger.new($stdout, level: Logger::ERROR)
+# logger = Logger.new($stdout, level: 'error')
+# logger = Logger.new($stdout, level: :error)
+# logger.level # => 3
#
-# logger.add(Logger::FATAL) { 'Fatal error!' }
+# With this level, entries with severity Logger::ERROR and higher
+# are written, while those with lower severities are not written:
#
-# The block form allows you to create potentially complex log messages,
-# but to delay their evaluation until and unless the message is
-# logged. For example, if we have the following:
+# logger = Logger.new($stdout, level: Logger::ERROR)
+# logger.add(3)
+# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil
+# logger.add(2) # Silent.
#
-# logger.debug { "This is a " + potentially + " expensive operation" }
+# You can set the log level for an existing logger
+# with method #level=:
#
-# If the logger's level is +INFO+ or higher, no debug messages will be logged,
-# and the entire block will not even be evaluated. Compare to this:
+# logger.level = Logger::ERROR
#
-# logger.debug("This is a " + potentially + " expensive operation")
+# These shorthand methods also set the level:
#
-# Here, the string concatenation is done every time, even if the log
-# level is not set to show the debug message.
+# logger.debug! # => 0
+# logger.info! # => 1
+# logger.warn! # => 2
+# logger.error! # => 3
+# logger.fatal! # => 4
#
-# === How to close a logger
+# You can retrieve the log level with method
+# {level}[Logger.html#attribute-i-level]:
#
-# logger.close
+# logger.level = Logger::ERROR
+# logger.level # => 3
#
-# === Setting severity threshold
+# These methods return whether a given
+# level is to be written:
#
-# 1. Original interface.
+# logger.level = Logger::ERROR
+# logger.debug? # => false
+# logger.info? # => false
+# logger.warn? # => false
+# logger.error? # => true
+# logger.fatal? # => true
#
-# logger.sev_threshold = Logger::WARN
+# == Log File Rotation
#
-# 2. Log4r (somewhat) compatible interface.
+# By default, a log file is a single file that grows indefinitely
+# (until explicitly closed); there is no file rotation.
#
-# logger.level = Logger::INFO
+# To keep log files to a manageable size,
+# you can use _log_ _file_ _rotation_, which uses multiple log files:
#
-# # DEBUG < INFO < WARN < ERROR < FATAL < UNKNOWN
+# - Each log file has entries for a non-overlapping
+# time interval.
+# - Only the most recent log file is open and active;
+# the others are closed and inactive.
#
-# 3. Symbol or String (case insensitive)
+# === Size-Based Rotation
#
-# logger.level = :info
-# logger.level = 'INFO'
+# For size-based log file rotation, call Logger.new with:
#
-# # :debug < :info < :warn < :error < :fatal < :unknown
+# - Argument +logdev+ as a file path.
+# - Argument +shift_age+ with a positive integer:
+# the number of log files to be in the rotation.
+# - Argument +shift_size+ as a positive integer:
+# the maximum size (in bytes) of each log file;
+# defaults to 1048576 (1 megabyte).
#
-# 4. Constructor
+# Examples:
#
-# Logger.new(logdev, level: Logger::INFO)
-# Logger.new(logdev, level: :info)
-# Logger.new(logdev, level: 'INFO')
+# logger = Logger.new('t.log', 3) # Three 1-megabyte files.
+# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files.
#
-# == Format
+# For these examples, suppose:
#
-# Log messages are rendered in the output stream in a certain format by
-# default. The default format and a sample are shown below:
+# logger = Logger.new('t.log', 3)
#
-# Log format:
-# SeverityID, [DateTime #pid] SeverityLabel -- ProgName: message
+# Logging begins in the new log file, +t.log+;
+# the log file is "full" and ready for rotation
+# when a new entry would cause its size to exceed +shift_size+.
#
-# Log sample:
-# I, [1999-03-03T02:34:24.895701 #19074] INFO -- Main: info.
+# The first time +t.log+ is full:
#
-# You may change the date and time format via #datetime_format=.
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
#
-# logger.datetime_format = '%Y-%m-%d %H:%M:%S'
-# # e.g. "2004-01-03 00:54:26"
+# The second time +t.log+ is full:
#
-# or via the constructor.
+# - +t.log.0 is renamed as +t.log.1+.
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
#
-# Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S')
+# Each subsequent time that +t.log+ is full,
+# the log files are rotated:
#
-# Or, you may change the overall format via the #formatter= method.
+# - +t.log.1+ is removed.
+# - +t.log.0 is renamed as +t.log.1+.
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
#
-# logger.formatter = proc do |severity, datetime, progname, msg|
-# "#{datetime}: #{msg}\n"
-# end
-# # e.g. "2005-09-22 08:51:08 +0900: hello world"
+# === Periodic Rotation
#
-# or via the constructor.
+# For periodic rotation, call Logger.new with:
#
-# Logger.new(logdev, formatter: proc {|severity, datetime, progname, msg|
-# "#{datetime}: #{msg}\n"
-# })
+# - Argument +logdev+ as a file path.
+# - Argument +shift_age+ as a string period indicator.
+#
+# Examples:
+#
+# logger = Logger.new('t.log', 'daily') # Rotate log files daily.
+# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly.
+# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly.
+#
+# Example:
+#
+# logger = Logger.new('t.log', 'daily')
+#
+# When the given period expires:
+#
+# - The base log file, +t.log+ is closed and renamed
+# with a date-based suffix such as +t.log.20220509+.
+# - A new log file +t.log+ is opened.
+# - Nothing is removed.
+#
+# The default format for the suffix is <tt>'%Y%m%d'</tt>,
+# which produces a suffix similar to the one above.
+# You can set a different format using create-time option
+# +shift_period_suffix+;
+# see details and suggestions at
+# {Time#strftime}[rdoc-ref:Time#strftime].
#
class Logger
_, name, rev = %w$Id$
@@ -244,9 +382,18 @@ class Logger
# Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
attr_reader :level
- # Set logging severity threshold.
+ # Sets the log level; returns +severity+.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # Argument +severity+ may be an integer, a string, or a symbol:
+ #
+ # logger.level = Logger::ERROR # => 3
+ # logger.level = 3 # => 3
+ # logger.level = 'error' # => "error"
+ # logger.level = :error # => :error
+ #
+ # Logger#sev_threshold= is an alias for Logger#level=.
#
- # +severity+:: The Severity of the log message.
def level=(severity)
if severity.is_a?(Integer)
@level = severity
@@ -273,108 +420,159 @@ class Logger
# Program name to include in log messages.
attr_accessor :progname
- # Set date-time format.
+ # Sets the date-time format.
+ #
+ # Argument +datetime_format+ should be either of these:
+ #
+ # - A string suitable for use as a format for method
+ # {Time#strftime}[rdoc-ref:Time#strftime].
+ # - +nil+: the logger uses <tt>'%Y-%m-%dT%H:%M:%S.%6N'</tt>.
#
- # +datetime_format+:: A string suitable for passing to +strftime+.
def datetime_format=(datetime_format)
@default_formatter.datetime_format = datetime_format
end
- # Returns the date format being used. See #datetime_format=
+ # Returns the date-time format; see #datetime_format=.
+ #
def datetime_format
@default_formatter.datetime_format
end
- # Logging formatter, as a +Proc+ that will take four arguments and
- # return the formatted message. The arguments are:
+ # Sets or retrieves the logger entry formatter proc.
#
- # +severity+:: The Severity of the log message.
- # +time+:: A Time instance representing when the message was logged.
- # +progname+:: The #progname configured, or passed to the logger method.
- # +msg+:: The _Object_ the user passed to the log message; not necessarily a
- # String.
+ # When +formatter+ is +nil+, the logger uses Logger::Formatter.
+ #
+ # When +formatter+ is a proc, a new entry is formatted by the proc,
+ # which is called with four arguments:
+ #
+ # - +severity+: The severity of the entry.
+ # - +time+: A Time object representing the entry's timestamp.
+ # - +progname+: The program name for the entry.
+ # - +msg+: The message for the entry (string or string-convertible object).
+ #
+ # The proc should return a string containing the formatted entry.
+ #
+ # This custom formatter uses
+ # {String#dump}[rdoc-ref:String#dump]
+ # to escape the message string:
+ #
+ # logger = Logger.new($stdout, progname: 'mung')
+ # original_formatter = logger.formatter || Logger::Formatter.new
+ # logger.formatter = proc { |severity, time, progname, msg|
+ # original_formatter.call(severity, time, progname, msg.dump)
+ # }
+ # logger.add(Logger::INFO, "hello \n ''")
+ # logger.add(Logger::INFO, "\f\x00\xff\\\"")
+ #
+ # Output:
+ #
+ # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
+ # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
#
- # The block should return an Object that can be written to the logging
- # device via +write+. The default formatter is used when no formatter is
- # set.
attr_accessor :formatter
alias sev_threshold level
alias sev_threshold= level=
- # Returns +true+ iff the current severity level allows for the printing of
- # +DEBUG+ messages.
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::DEBUG to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def debug?; level <= DEBUG; end
- # Sets the severity to DEBUG.
+ # Sets the log level to Logger::DEBUG.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def debug!; self.level = DEBUG; end
- # Returns +true+ iff the current severity level allows for the printing of
- # +INFO+ messages.
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::INFO to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def info?; level <= INFO; end
- # Sets the severity to INFO.
+ # Sets the log level to Logger::INFO.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def info!; self.level = INFO; end
- # Returns +true+ iff the current severity level allows for the printing of
- # +WARN+ messages.
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::WARN to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def warn?; level <= WARN; end
- # Sets the severity to WARN.
+ # Sets the log level to Logger::WARN.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def warn!; self.level = WARN; end
- # Returns +true+ iff the current severity level allows for the printing of
- # +ERROR+ messages.
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::ERROR to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def error?; level <= ERROR; end
- # Sets the severity to ERROR.
+ # Sets the log level to Logger::ERROR.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def error!; self.level = ERROR; end
- # Returns +true+ iff the current severity level allows for the printing of
- # +FATAL+ messages.
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::FATAL to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def fatal?; level <= FATAL; end
- # Sets the severity to FATAL.
+ # Sets the log level to Logger::FATAL.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
def fatal!; self.level = FATAL; end
- #
# :call-seq:
- # Logger.new(logdev, shift_age = 0, shift_size = 1048576)
- # Logger.new(logdev, shift_age = 'weekly')
- # Logger.new(logdev, level: :info)
- # Logger.new(logdev, progname: 'progname')
- # Logger.new(logdev, formatter: formatter)
- # Logger.new(logdev, datetime_format: '%Y-%m-%d %H:%M:%S')
- #
- # === Args
- #
- # +logdev+::
- # The log device. This is a filename (String) or IO object (typically
- # +STDOUT+, +STDERR+, or an open file).
- # +shift_age+::
- # Number of old log files to keep, *or* frequency of rotation (+daily+,
- # +weekly+ or +monthly+). Default value is 0, which disables log file
- # rotation.
- # +shift_size+::
- # Maximum logfile size in bytes (only applies when +shift_age+ is a positive
- # Integer). Defaults to +1048576+ (1MB).
- # +level+::
- # Logging severity threshold. Default values is Logger::DEBUG.
- # +progname+::
- # Program name to include in log messages. Default value is nil.
- # +formatter+::
- # Logging formatter. Default values is an instance of Logger::Formatter.
- # +datetime_format+::
- # Date and time format. Default value is '%Y-%m-%d %H:%M:%S'.
- # +binmode+::
- # Use binary mode on the log device. Default value is false.
- # +shift_period_suffix+::
- # The log file suffix format for +daily+, +weekly+ or +monthly+ rotation.
- # Default is '%Y%m%d'.
- #
- # === Description
- #
- # Create an instance.
+ # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options)
+ #
+ # With the single argument +logdev+,
+ # returns a new logger with all default options:
+ #
+ # Logger.new('t.log') # => #<Logger:0x000001e685dc6ac8>
+ #
+ # Argument +logdev+ must be one of:
+ #
+ # - A string filepath: entries are to be written
+ # to the file at that path; if the file at that path exists,
+ # new entries are appended.
+ # - An IO stream (typically +$stdout+, +$stderr+. or an open file):
+ # entries are to be written to the given stream.
+ # - +nil+ or +File::NULL+: no entries are to be written.
+ #
+ # Examples:
+ #
+ # Logger.new('t.log')
+ # Logger.new($stdout)
+ #
+ # The keyword options are:
+ #
+ # - +level+: sets the log level; default value is Logger::DEBUG.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level]:
+ #
+ # Logger.new('t.log', level: Logger::ERROR)
+ #
+ # - +progname+: sets the default program name; default is +nil+.
+ # See {Program Name}[rdoc-ref:Logger@Program+Name]:
+ #
+ # Logger.new('t.log', progname: 'mung')
+ #
+ # - +formatter+: sets the entry formatter; default is +nil+.
+ # See {formatter=}[Logger.html#attribute-i-formatter].
+ # - +datetime_format+: sets the format for entry timestamp;
+ # default is +nil+.
+ # See #datetime_format=.
+ # - +binmode+: sets whether the logger writes in binary mode;
+ # default is +false+.
+ # - +shift_period_suffix+: sets the format for the filename suffix
+ # for periodic log file rotation; default is <tt>'%Y%m%d'</tt>.
+ # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
#
def initialize(logdev, shift_age = 0, shift_size = 1048576, level: DEBUG,
progname: nil, formatter: nil, datetime_format: nil,
@@ -385,7 +583,7 @@ class Logger
self.datetime_format = datetime_format
self.formatter = formatter
@logdev = nil
- if logdev
+ if logdev && logdev != File::NULL
@logdev = LogDevice.new(logdev, shift_age: shift_age,
shift_size: shift_size,
shift_period_suffix: shift_period_suffix,
@@ -393,67 +591,60 @@ class Logger
end
end
- #
- # :call-seq:
- # Logger#reopen
- # Logger#reopen(logdev)
- #
- # === Args
- #
- # +logdev+::
- # The log device. This is a filename (String) or IO object (typically
- # +STDOUT+, +STDERR+, or an open file). reopen the same filename if
- # it is +nil+, do nothing for IO. Default is +nil+.
- #
- # === Description
- #
- # Reopen a log device.
+ # Sets the logger's output stream:
+ #
+ # - If +logdev+ is +nil+, reopens the current output stream.
+ # - If +logdev+ is a filepath, opens the indicated file for append.
+ # - If +logdev+ is an IO stream
+ # (usually <tt>$stdout</tt>, <tt>$stderr</tt>, or an open File object),
+ # opens the stream for append.
+ #
+ # Example:
+ #
+ # logger = Logger.new('t.log')
+ # logger.add(Logger::ERROR, 'one')
+ # logger.close
+ # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream'
+ # logger.reopen
+ # logger.add(Logger::ERROR, 'three')
+ # logger.close
+ # File.readlines('t.log')
+ # # =>
+ # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n",
+ # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n",
+ # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"]
#
def reopen(logdev = nil)
- @logdev.reopen(logdev)
+ @logdev&.reopen(logdev)
self
end
+ # Creates a log entry, which may or may not be written to the log,
+ # depending on the entry's severity and on the log level.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level]
+ # and {Entries}[rdoc-ref:Logger@Entries] for details.
#
- # :call-seq:
- # Logger#add(severity, message = nil, progname = nil) { ... }
- #
- # === Args
- #
- # +severity+::
- # Severity. Constants are defined in Logger namespace: +DEBUG+, +INFO+,
- # +WARN+, +ERROR+, +FATAL+, or +UNKNOWN+.
- # +message+::
- # The log message. A String or Exception.
- # +progname+::
- # Program name string. Can be omitted. Treated as a message if no
- # +message+ and +block+ are given.
- # +block+::
- # Can be omitted. Called to get a message string if +message+ is nil.
- #
- # === Return
- #
- # When the given severity is not high enough (for this particular logger),
- # log no message, and return +true+.
+ # Examples:
#
- # === Description
+ # logger = Logger.new($stdout, progname: 'mung')
+ # logger.add(Logger::INFO)
+ # logger.add(Logger::ERROR, 'No good')
+ # logger.add(Logger::ERROR, 'No good', 'gnum')
#
- # Log a message if the given severity is high enough. This is the generic
- # logging method. Users will be more inclined to use #debug, #info, #warn,
- # #error, and #fatal.
+ # Output:
#
- # <b>Message format</b>: +message+ can be any object, but it has to be
- # converted to a String in order to log it. Generally, +inspect+ is used
- # if the given object is not a String.
- # A special case is an +Exception+ object, which will be printed in detail,
- # including message, class, and backtrace. See #msg2str for the
- # implementation if required.
+ # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
+ # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
+ # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
#
- # === Bugs
+ # These convenience methods have implicit severity:
#
- # * Logfile is not locked.
- # * Append open does not need to lock file.
- # * If the OS supports multi I/O, records possibly may be mixed.
+ # - #debug.
+ # - #info.
+ # - #warn.
+ # - #error.
+ # - #fatal.
+ # - #unknown.
#
def add(severity, message = nil, progname = nil)
severity ||= UNKNOWN
@@ -477,104 +668,71 @@ class Logger
end
alias log add
+ # Writes the given +msg+ to the log with no formatting;
+ # returns the number of characters written,
+ # or +nil+ if no log device exists:
#
- # Dump given message to the log device without any formatting. If no log
- # device exists, return +nil+.
+ # logger = Logger.new($stdout)
+ # logger << 'My message.' # => 10
+ #
+ # Output:
+ #
+ # My message.
#
def <<(msg)
@logdev&.write(msg)
end
- #
- # Log a +DEBUG+ message.
- #
- # See #info for more information.
+ # Equivalent to calling #add with severity <tt>Logger::DEBUG</tt>.
#
def debug(progname = nil, &block)
add(DEBUG, nil, progname, &block)
end
- #
- # :call-seq:
- # info(message)
- # info(progname, &block)
- #
- # Log an +INFO+ message.
- #
- # +message+:: The message to log; does not need to be a String.
- # +progname+:: In the block form, this is the #progname to use in the
- # log message. The default can be set with #progname=.
- # +block+:: Evaluates to the message to log. This is not evaluated unless
- # the logger's level is sufficient to log the message. This
- # allows you to create potentially expensive logging messages that
- # are only called when the logger is configured to show them.
- #
- # === Examples
- #
- # logger.info("MainApp") { "Received connection from #{ip}" }
- # # ...
- # logger.info "Waiting for input from user"
- # # ...
- # logger.info { "User typed #{input}" }
- #
- # You'll probably stick to the second form above, unless you want to provide a
- # program name (which you can do with #progname= as well).
- #
- # === Return
- #
- # See #add.
+ # Equivalent to calling #add with severity <tt>Logger::INFO</tt>.
#
def info(progname = nil, &block)
add(INFO, nil, progname, &block)
end
- #
- # Log a +WARN+ message.
- #
- # See #info for more information.
+ # Equivalent to calling #add with severity <tt>Logger::WARN</tt>.
#
def warn(progname = nil, &block)
add(WARN, nil, progname, &block)
end
- #
- # Log an +ERROR+ message.
- #
- # See #info for more information.
+ # Equivalent to calling #add with severity <tt>Logger::ERROR</tt>.
#
def error(progname = nil, &block)
add(ERROR, nil, progname, &block)
end
- #
- # Log a +FATAL+ message.
- #
- # See #info for more information.
+ # Equivalent to calling #add with severity <tt>Logger::FATAL</tt>.
#
def fatal(progname = nil, &block)
add(FATAL, nil, progname, &block)
end
- #
- # Log an +UNKNOWN+ message. This will be printed no matter what the logger's
- # level is.
- #
- # See #info for more information.
+ # Equivalent to calling #add with severity <tt>Logger::UNKNOWN</tt>.
#
def unknown(progname = nil, &block)
add(UNKNOWN, nil, progname, &block)
end
+ # Closes the logger; returns +nil+:
#
- # Close the logging device.
+ # logger = Logger.new('t.log')
+ # logger.close # => nil
+ # logger.info('foo') # Prints "log writing failed. closed stream"
#
+ # Related: Logger#reopen.
def close
@logdev&.close
end
private
- # Severity label for logging (max 5 chars).
+ # \Severity label for logging (max 5 chars).
SEV_LABEL = %w(DEBUG INFO WARN ERROR FATAL ANY).freeze
def format_severity(severity)
diff --git a/lib/logger/errors.rb b/lib/logger/errors.rb
index e8925e14ac..88581793f0 100644
--- a/lib/logger/errors.rb
+++ b/lib/logger/errors.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-# not used after 1.2.7. just for compat.
class Logger
+ # not used after 1.2.7. just for compat.
class Error < RuntimeError # :nodoc:
end
class ShiftingError < Error # :nodoc:
diff --git a/lib/logger/formatter.rb b/lib/logger/formatter.rb
index 852cffe033..c634dbf34d 100644
--- a/lib/logger/formatter.rb
+++ b/lib/logger/formatter.rb
@@ -3,7 +3,8 @@
class Logger
# Default formatter for log messages.
class Formatter
- Format = "%s, [%s#%d] %5s -- %s: %s\n"
+ Format = "%.1s, [%s #%d] %5s -- %s: %s\n"
+ DatetimeFormat = "%Y-%m-%dT%H:%M:%S.%6N"
attr_accessor :datetime_format
@@ -12,14 +13,13 @@ class Logger
end
def call(severity, time, progname, msg)
- Format % [severity[0..0], format_datetime(time), $$, severity, progname,
- msg2str(msg)]
+ sprintf(Format, severity, format_datetime(time), Process.pid, severity, progname, msg2str(msg))
end
private
def format_datetime(time)
- time.strftime(@datetime_format || "%Y-%m-%dT%H:%M:%S.%6N ")
+ time.strftime(@datetime_format || DatetimeFormat)
end
def msg2str(msg)
diff --git a/lib/logger/log_device.rb b/lib/logger/log_device.rb
index fe7d54fb81..84277a2656 100644
--- a/lib/logger/log_device.rb
+++ b/lib/logger/log_device.rb
@@ -79,8 +79,10 @@ class Logger
def set_dev(log)
if log.respond_to?(:write) and log.respond_to?(:close)
@dev = log
- if log.respond_to?(:path)
- @filename = log.path
+ if log.respond_to?(:path) and path = log.path
+ if File.exist?(path)
+ @filename = path
+ end
end
else
@dev = open_logfile(log)
@@ -135,7 +137,7 @@ class Logger
end
end
- if /mswin|mingw/ =~ RUBY_PLATFORM
+ if /mswin|mingw|cygwin/ =~ RbConfig::CONFIG['host_os']
def lock_shift_log
yield
end
diff --git a/lib/logger/logger.gemspec b/lib/logger/logger.gemspec
index 8b3f70627a..d12db625d9 100644
--- a/lib/logger/logger.gemspec
+++ b/lib/logger/logger.gemspec
@@ -13,17 +13,14 @@ Gem::Specification.new do |spec|
spec.summary = %q{Provides a simple logging utility for outputting messages.}
spec.description = %q{Provides a simple logging utility for outputting messages.}
spec.homepage = "https://github.com/ruby/logger"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.files = Dir.glob("lib/**/*.rb") + ["logger.gemspec"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.3.0"
spec.add_development_dependency "bundler", ">= 0"
- spec.add_development_dependency "rake", "~> 10.0"
+ spec.add_development_dependency "rake", ">= 12.3.3"
spec.add_development_dependency "test-unit"
- spec.add_development_dependency "rdoc"
end
diff --git a/lib/logger/version.rb b/lib/logger/version.rb
index f90ce94e49..f85c72eed3 100644
--- a/lib/logger/version.rb
+++ b/lib/logger/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
class Logger
- VERSION = "1.4.2"
+ VERSION = "1.5.3"
end
diff --git a/lib/matrix.rb b/lib/matrix.rb
deleted file mode 100644
index fc0e8ef2f7..0000000000
--- a/lib/matrix.rb
+++ /dev/null
@@ -1,2407 +0,0 @@
-# encoding: utf-8
-# frozen_string_literal: false
-#
-# = matrix.rb
-#
-# An implementation of Matrix and Vector classes.
-#
-# See classes Matrix and Vector for documentation.
-#
-# Current Maintainer:: Marc-André Lafortune
-# Original Author:: Keiju ISHITSUKA
-# Original Documentation:: Gavin Sinclair (sourced from <i>Ruby in a Nutshell</i> (Matsumoto, O'Reilly))
-##
-
-require_relative "matrix/version"
-
-module ExceptionForMatrix # :nodoc:
- class ErrDimensionMismatch < StandardError
- def initialize(val = nil)
- if val
- super(val)
- else
- super("Dimension mismatch")
- end
- end
- end
-
- class ErrNotRegular < StandardError
- def initialize(val = nil)
- if val
- super(val)
- else
- super("Not Regular Matrix")
- end
- end
- end
-
- class ErrOperationNotDefined < StandardError
- def initialize(vals)
- if vals.is_a?(Array)
- super("Operation(#{vals[0]}) can\\'t be defined: #{vals[1]} op #{vals[2]}")
- else
- super(vals)
- end
- end
- end
-
- class ErrOperationNotImplemented < StandardError
- def initialize(vals)
- super("Sorry, Operation(#{vals[0]}) not implemented: #{vals[1]} op #{vals[2]}")
- end
- end
-end
-
-#
-# The +Matrix+ class represents a mathematical matrix. It provides methods for creating
-# matrices, operating on them arithmetically and algebraically,
-# and determining their mathematical properties such as trace, rank, inverse, determinant,
-# or eigensystem.
-#
-class Matrix
- include Enumerable
- include ExceptionForMatrix
- autoload :EigenvalueDecomposition, "matrix/eigenvalue_decomposition"
- autoload :LUPDecomposition, "matrix/lup_decomposition"
-
- # instance creations
- private_class_method :new
- attr_reader :rows
- protected :rows
-
- #
- # Creates a matrix where each argument is a row.
- # Matrix[ [25, 93], [-1, 66] ]
- # => 25 93
- # -1 66
- #
- def Matrix.[](*rows)
- rows(rows, false)
- end
-
- #
- # Creates a matrix where +rows+ is an array of arrays, each of which is a row
- # of the matrix. If the optional argument +copy+ is false, use the given
- # arrays as the internal structure of the matrix without copying.
- # Matrix.rows([[25, 93], [-1, 66]])
- # => 25 93
- # -1 66
- #
- def Matrix.rows(rows, copy = true)
- rows = convert_to_array(rows, copy)
- rows.map! do |row|
- convert_to_array(row, copy)
- end
- size = (rows[0] || []).size
- rows.each do |row|
- raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
- end
- new rows, size
- end
-
- #
- # Creates a matrix using +columns+ as an array of column vectors.
- # Matrix.columns([[25, 93], [-1, 66]])
- # => 25 -1
- # 93 66
- #
- def Matrix.columns(columns)
- rows(columns, false).transpose
- end
-
- #
- # Creates a matrix of size +row_count+ x +column_count+.
- # It fills the values by calling the given block,
- # passing the current row and column.
- # Returns an enumerator if no block is given.
- #
- # m = Matrix.build(2, 4) {|row, col| col - row }
- # => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
- # m = Matrix.build(3) { rand }
- # => a 3x3 matrix with random elements
- #
- def Matrix.build(row_count, column_count = row_count)
- row_count = CoercionHelper.coerce_to_int(row_count)
- column_count = CoercionHelper.coerce_to_int(column_count)
- raise ArgumentError if row_count < 0 || column_count < 0
- return to_enum :build, row_count, column_count unless block_given?
- rows = Array.new(row_count) do |i|
- Array.new(column_count) do |j|
- yield i, j
- end
- end
- new rows, column_count
- end
-
- #
- # Creates a matrix where the diagonal elements are composed of +values+.
- # Matrix.diagonal(9, 5, -3)
- # => 9 0 0
- # 0 5 0
- # 0 0 -3
- #
- def Matrix.diagonal(*values)
- size = values.size
- return Matrix.empty if size == 0
- rows = Array.new(size) {|j|
- row = Array.new(size, 0)
- row[j] = values[j]
- row
- }
- new rows
- end
-
- #
- # Creates an +n+ by +n+ diagonal matrix where each diagonal element is
- # +value+.
- # Matrix.scalar(2, 5)
- # => 5 0
- # 0 5
- #
- def Matrix.scalar(n, value)
- diagonal(*Array.new(n, value))
- end
-
- #
- # Creates an +n+ by +n+ identity matrix.
- # Matrix.identity(2)
- # => 1 0
- # 0 1
- #
- def Matrix.identity(n)
- scalar(n, 1)
- end
- class << Matrix
- alias_method :unit, :identity
- alias_method :I, :identity
- end
-
- #
- # Creates a zero matrix.
- # Matrix.zero(2)
- # => 0 0
- # 0 0
- #
- def Matrix.zero(row_count, column_count = row_count)
- rows = Array.new(row_count){Array.new(column_count, 0)}
- new rows, column_count
- end
-
- #
- # Creates a single-row matrix where the values of that row are as given in
- # +row+.
- # Matrix.row_vector([4,5,6])
- # => 4 5 6
- #
- def Matrix.row_vector(row)
- row = convert_to_array(row)
- new [row]
- end
-
- #
- # Creates a single-column matrix where the values of that column are as given
- # in +column+.
- # Matrix.column_vector([4,5,6])
- # => 4
- # 5
- # 6
- #
- def Matrix.column_vector(column)
- column = convert_to_array(column)
- new [column].transpose, 1
- end
-
- #
- # Creates a empty matrix of +row_count+ x +column_count+.
- # At least one of +row_count+ or +column_count+ must be 0.
- #
- # m = Matrix.empty(2, 0)
- # m == Matrix[ [], [] ]
- # => true
- # n = Matrix.empty(0, 3)
- # n == Matrix.columns([ [], [], [] ])
- # => true
- # m * n
- # => Matrix[[0, 0, 0], [0, 0, 0]]
- #
- def Matrix.empty(row_count = 0, column_count = 0)
- raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
- raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
-
- new([[]]*row_count, column_count)
- end
-
- #
- # Create a matrix by stacking matrices vertically
- #
- # x = Matrix[[1, 2], [3, 4]]
- # y = Matrix[[5, 6], [7, 8]]
- # Matrix.vstack(x, y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
- #
- def Matrix.vstack(x, *matrices)
- x = CoercionHelper.coerce_to_matrix(x)
- result = x.send(:rows).map(&:dup)
- matrices.each do |m|
- m = CoercionHelper.coerce_to_matrix(m)
- if m.column_count != x.column_count
- raise ErrDimensionMismatch, "The given matrices must have #{x.column_count} columns, but one has #{m.column_count}"
- end
- result.concat(m.send(:rows))
- end
- new result, x.column_count
- end
-
-
- #
- # Create a matrix by stacking matrices horizontally
- #
- # x = Matrix[[1, 2], [3, 4]]
- # y = Matrix[[5, 6], [7, 8]]
- # Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
- #
- def Matrix.hstack(x, *matrices)
- x = CoercionHelper.coerce_to_matrix(x)
- result = x.send(:rows).map(&:dup)
- total_column_count = x.column_count
- matrices.each do |m|
- m = CoercionHelper.coerce_to_matrix(m)
- if m.row_count != x.row_count
- raise ErrDimensionMismatch, "The given matrices must have #{x.row_count} rows, but one has #{m.row_count}"
- end
- result.each_with_index do |row, i|
- row.concat m.send(:rows)[i]
- end
- total_column_count += m.column_count
- end
- new result, total_column_count
- end
-
- #
- # Create a matrix by combining matrices entrywise, using the given block
- #
- # x = Matrix[[6, 6], [4, 4]]
- # y = Matrix[[1, 2], [3, 4]]
- # Matrix.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
- #
- def Matrix.combine(*matrices)
- return to_enum(__method__, *matrices) unless block_given?
-
- return Matrix.empty if matrices.empty?
- matrices.map!(&CoercionHelper.method(:coerce_to_matrix))
- x = matrices.first
- matrices.each do |m|
- raise ErrDimensionMismatch unless x.row_count == m.row_count && x.column_count == m.column_count
- end
-
- rows = Array.new(x.row_count) do |i|
- Array.new(x.column_count) do |j|
- yield matrices.map{|m| m[i,j]}
- end
- end
- new rows, x.column_count
- end
-
- def combine(*matrices, &block)
- Matrix.combine(self, *matrices, &block)
- end
-
- #
- # Matrix.new is private; use Matrix.rows, columns, [], etc... to create.
- #
- def initialize(rows, column_count = rows[0].size)
- # No checking is done at this point. rows must be an Array of Arrays.
- # column_count must be the size of the first row, if there is one,
- # otherwise it *must* be specified and can be any integer >= 0
- @rows = rows
- @column_count = column_count
- end
-
- private def new_matrix(rows, column_count = rows[0].size) # :nodoc:
- self.class.send(:new, rows, column_count) # bypass privacy of Matrix.new
- end
-
- #
- # Returns element (+i+,+j+) of the matrix. That is: row +i+, column +j+.
- #
- def [](i, j)
- @rows.fetch(i){return nil}[j]
- end
- alias element []
- alias component []
-
- #
- # :call-seq:
- # matrix[range, range] = matrix/element
- # matrix[range, integer] = vector/column_matrix/element
- # matrix[integer, range] = vector/row_matrix/element
- # matrix[integer, integer] = element
- #
- # Set element or elements of matrix.
- def []=(i, j, v)
- raise FrozenError, "can't modify frozen Matrix" if frozen?
- rows = check_range(i, :row) or row = check_int(i, :row)
- columns = check_range(j, :column) or column = check_int(j, :column)
- if rows && columns
- set_row_and_col_range(rows, columns, v)
- elsif rows
- set_row_range(rows, column, v)
- elsif columns
- set_col_range(row, columns, v)
- else
- set_value(row, column, v)
- end
- end
- alias set_element []=
- alias set_component []=
- private :set_element, :set_component
-
- # Returns range or nil
- private def check_range(val, direction)
- return unless val.is_a?(Range)
- count = direction == :row ? row_count : column_count
- CoercionHelper.check_range(val, count, direction)
- end
-
- private def check_int(val, direction)
- count = direction == :row ? row_count : column_count
- CoercionHelper.check_int(val, count, direction)
- end
-
- private def set_value(row, col, value)
- raise ErrDimensionMismatch, "Expected a a value, got a #{value.class}" if value.respond_to?(:to_matrix)
-
- @rows[row][col] = value
- end
-
- private def set_row_and_col_range(row_range, col_range, value)
- if value.is_a?(Matrix)
- if row_range.size != value.row_count || col_range.size != value.column_count
- raise ErrDimensionMismatch, [
- 'Expected a Matrix of dimensions',
- "#{row_range.size}x#{col_range.size}",
- 'got',
- "#{value.row_count}x#{value.column_count}",
- ].join(' ')
- end
- source = value.instance_variable_get :@rows
- row_range.each_with_index do |row, i|
- @rows[row][col_range] = source[i]
- end
- elsif value.is_a?(Vector)
- raise ErrDimensionMismatch, 'Expected a Matrix or a value, got a Vector'
- else
- value_to_set = Array.new(col_range.size, value)
- row_range.each do |i|
- @rows[i][col_range] = value_to_set
- end
- end
- end
-
- private def set_row_range(row_range, col, value)
- if value.is_a?(Vector)
- raise ErrDimensionMismatch unless row_range.size == value.size
- set_column_vector(row_range, col, value)
- elsif value.is_a?(Matrix)
- raise ErrDimensionMismatch unless value.column_count == 1
- value = value.column(0)
- raise ErrDimensionMismatch unless row_range.size == value.size
- set_column_vector(row_range, col, value)
- else
- @rows[row_range].each{|e| e[col] = value }
- end
- end
-
- private def set_column_vector(row_range, col, value)
- value.each_with_index do |e, index|
- r = row_range.begin + index
- @rows[r][col] = e
- end
- end
-
- private def set_col_range(row, col_range, value)
- value = if value.is_a?(Vector)
- value.to_a
- elsif value.is_a?(Matrix)
- raise ErrDimensionMismatch unless value.row_count == 1
- value.row(0).to_a
- else
- Array.new(col_range.size, value)
- end
- raise ErrDimensionMismatch unless col_range.size == value.size
- @rows[row][col_range] = value
- end
-
- #
- # Returns the number of rows.
- #
- def row_count
- @rows.size
- end
-
- alias_method :row_size, :row_count
- #
- # Returns the number of columns.
- #
- attr_reader :column_count
- alias_method :column_size, :column_count
-
- #
- # Returns row vector number +i+ of the matrix as a Vector (starting at 0 like
- # an array). When a block is given, the elements of that vector are iterated.
- #
- def row(i, &block) # :yield: e
- if block_given?
- @rows.fetch(i){return self}.each(&block)
- self
- else
- Vector.elements(@rows.fetch(i){return nil})
- end
- end
-
- #
- # Returns column vector number +j+ of the matrix as a Vector (starting at 0
- # like an array). When a block is given, the elements of that vector are
- # iterated.
- #
- def column(j) # :yield: e
- if block_given?
- return self if j >= column_count || j < -column_count
- row_count.times do |i|
- yield @rows[i][j]
- end
- self
- else
- return nil if j >= column_count || j < -column_count
- col = Array.new(row_count) {|i|
- @rows[i][j]
- }
- Vector.elements(col, false)
- end
- end
-
- #
- # Returns a matrix that is the result of iteration of the given block over all
- # elements of the matrix.
- # Elements can be restricted by passing an argument:
- # * :all (default): yields all elements
- # * :diagonal: yields only elements on the diagonal
- # * :off_diagonal: yields all elements except on the diagonal
- # * :lower: yields only elements on or below the diagonal
- # * :strict_lower: yields only elements below the diagonal
- # * :strict_upper: yields only elements above the diagonal
- # * :upper: yields only elements on or above the diagonal
- # Matrix[ [1,2], [3,4] ].collect { |e| e**2 }
- # => 1 4
- # 9 16
- #
- def collect(which = :all, &block) # :yield: e
- return to_enum(:collect, which) unless block_given?
- dup.collect!(which, &block)
- end
- alias_method :map, :collect
-
- #
- # Invokes the given block for each element of matrix, replacing the element with the value
- # returned by the block.
- # Elements can be restricted by passing an argument:
- # * :all (default): yields all elements
- # * :diagonal: yields only elements on the diagonal
- # * :off_diagonal: yields all elements except on the diagonal
- # * :lower: yields only elements on or below the diagonal
- # * :strict_lower: yields only elements below the diagonal
- # * :strict_upper: yields only elements above the diagonal
- # * :upper: yields only elements on or above the diagonal
- #
- def collect!(which = :all)
- return to_enum(:collect!, which) unless block_given?
- raise FrozenError, "can't modify frozen Matrix" if frozen?
- each_with_index(which){ |e, row_index, col_index| @rows[row_index][col_index] = yield e }
- end
-
- alias map! collect!
-
- def freeze
- @rows.freeze
- super
- end
-
- #
- # Yields all elements of the matrix, starting with those of the first row,
- # or returns an Enumerator if no block given.
- # Elements can be restricted by passing an argument:
- # * :all (default): yields all elements
- # * :diagonal: yields only elements on the diagonal
- # * :off_diagonal: yields all elements except on the diagonal
- # * :lower: yields only elements on or below the diagonal
- # * :strict_lower: yields only elements below the diagonal
- # * :strict_upper: yields only elements above the diagonal
- # * :upper: yields only elements on or above the diagonal
- #
- # Matrix[ [1,2], [3,4] ].each { |e| puts e }
- # # => prints the numbers 1 to 4
- # Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
- #
- def each(which = :all, &block) # :yield: e
- return to_enum :each, which unless block_given?
- last = column_count - 1
- case which
- when :all
- @rows.each do |row|
- row.each(&block)
- end
- when :diagonal
- @rows.each_with_index do |row, row_index|
- yield row.fetch(row_index){return self}
- end
- when :off_diagonal
- @rows.each_with_index do |row, row_index|
- column_count.times do |col_index|
- yield row[col_index] unless row_index == col_index
- end
- end
- when :lower
- @rows.each_with_index do |row, row_index|
- 0.upto([row_index, last].min) do |col_index|
- yield row[col_index]
- end
- end
- when :strict_lower
- @rows.each_with_index do |row, row_index|
- [row_index, column_count].min.times do |col_index|
- yield row[col_index]
- end
- end
- when :strict_upper
- @rows.each_with_index do |row, row_index|
- (row_index+1).upto(last) do |col_index|
- yield row[col_index]
- end
- end
- when :upper
- @rows.each_with_index do |row, row_index|
- row_index.upto(last) do |col_index|
- yield row[col_index]
- end
- end
- else
- raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
- end
- self
- end
-
- #
- # Same as #each, but the row index and column index in addition to the element
- #
- # Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
- # puts "#{e} at #{row}, #{col}"
- # end
- # # => Prints:
- # # 1 at 0, 0
- # # 2 at 0, 1
- # # 3 at 1, 0
- # # 4 at 1, 1
- #
- def each_with_index(which = :all) # :yield: e, row, column
- return to_enum :each_with_index, which unless block_given?
- last = column_count - 1
- case which
- when :all
- @rows.each_with_index do |row, row_index|
- row.each_with_index do |e, col_index|
- yield e, row_index, col_index
- end
- end
- when :diagonal
- @rows.each_with_index do |row, row_index|
- yield row.fetch(row_index){return self}, row_index, row_index
- end
- when :off_diagonal
- @rows.each_with_index do |row, row_index|
- column_count.times do |col_index|
- yield row[col_index], row_index, col_index unless row_index == col_index
- end
- end
- when :lower
- @rows.each_with_index do |row, row_index|
- 0.upto([row_index, last].min) do |col_index|
- yield row[col_index], row_index, col_index
- end
- end
- when :strict_lower
- @rows.each_with_index do |row, row_index|
- [row_index, column_count].min.times do |col_index|
- yield row[col_index], row_index, col_index
- end
- end
- when :strict_upper
- @rows.each_with_index do |row, row_index|
- (row_index+1).upto(last) do |col_index|
- yield row[col_index], row_index, col_index
- end
- end
- when :upper
- @rows.each_with_index do |row, row_index|
- row_index.upto(last) do |col_index|
- yield row[col_index], row_index, col_index
- end
- end
- else
- raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
- end
- self
- end
-
- SELECTORS = {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true}.freeze
- #
- # :call-seq:
- # index(value, selector = :all) -> [row, column]
- # index(selector = :all){ block } -> [row, column]
- # index(selector = :all) -> an_enumerator
- #
- # The index method is specialized to return the index as [row, column]
- # It also accepts an optional +selector+ argument, see #each for details.
- #
- # Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
- # Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
- #
- def index(*args)
- raise ArgumentError, "wrong number of arguments(#{args.size} for 0-2)" if args.size > 2
- which = (args.size == 2 || SELECTORS.include?(args.last)) ? args.pop : :all
- return to_enum :find_index, which, *args unless block_given? || args.size == 1
- if args.size == 1
- value = args.first
- each_with_index(which) do |e, row_index, col_index|
- return row_index, col_index if e == value
- end
- else
- each_with_index(which) do |e, row_index, col_index|
- return row_index, col_index if yield e
- end
- end
- nil
- end
- alias_method :find_index, :index
-
- #
- # Returns a section of the matrix. The parameters are either:
- # * start_row, nrows, start_col, ncols; OR
- # * row_range, col_range
- #
- # Matrix.diagonal(9, 5, -3).minor(0..1, 0..2)
- # => 9 0 0
- # 0 5 0
- #
- # Like Array#[], negative indices count backward from the end of the
- # row or column (-1 is the last element). Returns nil if the starting
- # row or column is greater than row_count or column_count respectively.
- #
- def minor(*param)
- case param.size
- when 2
- row_range, col_range = param
- from_row = row_range.first
- from_row += row_count if from_row < 0
- to_row = row_range.end
- to_row += row_count if to_row < 0
- to_row += 1 unless row_range.exclude_end?
- size_row = to_row - from_row
-
- from_col = col_range.first
- from_col += column_count if from_col < 0
- to_col = col_range.end
- to_col += column_count if to_col < 0
- to_col += 1 unless col_range.exclude_end?
- size_col = to_col - from_col
- when 4
- from_row, size_row, from_col, size_col = param
- return nil if size_row < 0 || size_col < 0
- from_row += row_count if from_row < 0
- from_col += column_count if from_col < 0
- else
- raise ArgumentError, param.inspect
- end
-
- return nil if from_row > row_count || from_col > column_count || from_row < 0 || from_col < 0
- rows = @rows[from_row, size_row].collect{|row|
- row[from_col, size_col]
- }
- new_matrix rows, [column_count - from_col, size_col].min
- end
-
- #
- # Returns the submatrix obtained by deleting the specified row and column.
- #
- # Matrix.diagonal(9, 5, -3, 4).first_minor(1, 2)
- # => 9 0 0
- # 0 0 0
- # 0 0 4
- #
- def first_minor(row, column)
- raise RuntimeError, "first_minor of empty matrix is not defined" if empty?
-
- unless 0 <= row && row < row_count
- raise ArgumentError, "invalid row (#{row.inspect} for 0..#{row_count - 1})"
- end
-
- unless 0 <= column && column < column_count
- raise ArgumentError, "invalid column (#{column.inspect} for 0..#{column_count - 1})"
- end
-
- arrays = to_a
- arrays.delete_at(row)
- arrays.each do |array|
- array.delete_at(column)
- end
-
- new_matrix arrays, column_count - 1
- end
-
- #
- # Returns the (row, column) cofactor which is obtained by multiplying
- # the first minor by (-1)**(row + column).
- #
- # Matrix.diagonal(9, 5, -3, 4).cofactor(1, 1)
- # => -108
- #
- def cofactor(row, column)
- raise RuntimeError, "cofactor of empty matrix is not defined" if empty?
- raise ErrDimensionMismatch unless square?
-
- det_of_minor = first_minor(row, column).determinant
- det_of_minor * (-1) ** (row + column)
- end
-
- #
- # Returns the adjugate of the matrix.
- #
- # Matrix[ [7,6],[3,9] ].adjugate
- # => 9 -6
- # -3 7
- #
- def adjugate
- raise ErrDimensionMismatch unless square?
- Matrix.build(row_count, column_count) do |row, column|
- cofactor(column, row)
- end
- end
-
- #
- # Returns the Laplace expansion along given row or column.
- #
- # Matrix[[7,6], [3,9]].laplace_expansion(column: 1)
- # => 45
- #
- # Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0)
- # => Vector[3, -2]
- #
- #
- def laplace_expansion(row: nil, column: nil)
- num = row || column
-
- if !num || (row && column)
- raise ArgumentError, "exactly one the row or column arguments must be specified"
- end
-
- raise ErrDimensionMismatch unless square?
- raise RuntimeError, "laplace_expansion of empty matrix is not defined" if empty?
-
- unless 0 <= num && num < row_count
- raise ArgumentError, "invalid num (#{num.inspect} for 0..#{row_count - 1})"
- end
-
- send(row ? :row : :column, num).map.with_index { |e, k|
- e * cofactor(*(row ? [num, k] : [k,num]))
- }.inject(:+)
- end
- alias_method :cofactor_expansion, :laplace_expansion
-
-
- #--
- # TESTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns +true+ if this is a diagonal matrix.
- # Raises an error if matrix is not square.
- #
- def diagonal?
- raise ErrDimensionMismatch unless square?
- each(:off_diagonal).all?(&:zero?)
- end
-
- #
- # Returns +true+ if this is an empty matrix, i.e. if the number of rows
- # or the number of columns is 0.
- #
- def empty?
- column_count == 0 || row_count == 0
- end
-
- #
- # Returns +true+ if this is an hermitian matrix.
- # Raises an error if matrix is not square.
- #
- def hermitian?
- raise ErrDimensionMismatch unless square?
- each_with_index(:upper).all? do |e, row, col|
- e == rows[col][row].conj
- end
- end
-
- #
- # Returns +true+ if this is a lower triangular matrix.
- #
- def lower_triangular?
- each(:strict_upper).all?(&:zero?)
- end
-
- #
- # Returns +true+ if this is a normal matrix.
- # Raises an error if matrix is not square.
- #
- def normal?
- raise ErrDimensionMismatch unless square?
- rows.each_with_index do |row_i, i|
- rows.each_with_index do |row_j, j|
- s = 0
- rows.each_with_index do |row_k, k|
- s += row_i[k] * row_j[k].conj - row_k[i].conj * row_k[j]
- end
- return false unless s == 0
- end
- end
- true
- end
-
- #
- # Returns +true+ if this is an orthogonal matrix
- # Raises an error if matrix is not square.
- #
- def orthogonal?
- raise ErrDimensionMismatch unless square?
- rows.each_with_index do |row, i|
- column_count.times do |j|
- s = 0
- row_count.times do |k|
- s += row[k] * rows[k][j]
- end
- return false unless s == (i == j ? 1 : 0)
- end
- end
- true
- end
-
- #
- # Returns +true+ if this is a permutation matrix
- # Raises an error if matrix is not square.
- #
- def permutation?
- raise ErrDimensionMismatch unless square?
- cols = Array.new(column_count)
- rows.each_with_index do |row, i|
- found = false
- row.each_with_index do |e, j|
- if e == 1
- return false if found || cols[j]
- found = cols[j] = true
- elsif e != 0
- return false
- end
- end
- return false unless found
- end
- true
- end
-
- #
- # Returns +true+ if all entries of the matrix are real.
- #
- def real?
- all?(&:real?)
- end
-
- #
- # Returns +true+ if this is a regular (i.e. non-singular) matrix.
- #
- def regular?
- not singular?
- end
-
- #
- # Returns +true+ if this is a singular matrix.
- #
- def singular?
- determinant == 0
- end
-
- #
- # Returns +true+ if this is a square matrix.
- #
- def square?
- column_count == row_count
- end
-
- #
- # Returns +true+ if this is a symmetric matrix.
- # Raises an error if matrix is not square.
- #
- def symmetric?
- raise ErrDimensionMismatch unless square?
- each_with_index(:strict_upper) do |e, row, col|
- return false if e != rows[col][row]
- end
- true
- end
-
- #
- # Returns +true+ if this is an antisymmetric matrix.
- # Raises an error if matrix is not square.
- #
- def antisymmetric?
- raise ErrDimensionMismatch unless square?
- each_with_index(:upper) do |e, row, col|
- return false unless e == -rows[col][row]
- end
- true
- end
- alias_method :skew_symmetric?, :antisymmetric?
-
- #
- # Returns +true+ if this is a unitary matrix
- # Raises an error if matrix is not square.
- #
- def unitary?
- raise ErrDimensionMismatch unless square?
- rows.each_with_index do |row, i|
- column_count.times do |j|
- s = 0
- row_count.times do |k|
- s += row[k].conj * rows[k][j]
- end
- return false unless s == (i == j ? 1 : 0)
- end
- end
- true
- end
-
- #
- # Returns +true+ if this is an upper triangular matrix.
- #
- def upper_triangular?
- each(:strict_lower).all?(&:zero?)
- end
-
- #
- # Returns +true+ if this is a matrix with only zero elements
- #
- def zero?
- all?(&:zero?)
- end
-
- #--
- # OBJECT METHODS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns +true+ if and only if the two matrices contain equal elements.
- #
- def ==(other)
- return false unless Matrix === other &&
- column_count == other.column_count # necessary for empty matrices
- rows == other.rows
- end
-
- def eql?(other)
- return false unless Matrix === other &&
- column_count == other.column_count # necessary for empty matrices
- rows.eql? other.rows
- end
-
- #
- # Called for dup & clone.
- #
- private def initialize_copy(m)
- super
- @rows = @rows.map(&:dup) unless frozen?
- end
-
- #
- # Returns a hash-code for the matrix.
- #
- def hash
- @rows.hash
- end
-
- #--
- # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Matrix multiplication.
- # Matrix[[2,4], [6,8]] * Matrix.identity(2)
- # => 2 4
- # 6 8
- #
- def *(m) # m is matrix or vector or number
- case(m)
- when Numeric
- rows = @rows.collect {|row|
- row.collect {|e| e * m }
- }
- return new_matrix rows, column_count
- when Vector
- m = self.class.column_vector(m)
- r = self * m
- return r.column(0)
- when Matrix
- raise ErrDimensionMismatch if column_count != m.row_count
-
- rows = Array.new(row_count) {|i|
- Array.new(m.column_count) {|j|
- (0 ... column_count).inject(0) do |vij, k|
- vij + self[i, k] * m[k, j]
- end
- }
- }
- return new_matrix rows, m.column_count
- else
- return apply_through_coercion(m, __method__)
- end
- end
-
- #
- # Matrix addition.
- # Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]]
- # => 6 0
- # -4 12
- #
- def +(m)
- case m
- when Numeric
- raise ErrOperationNotDefined, ["+", self.class, m.class]
- when Vector
- m = self.class.column_vector(m)
- when Matrix
- else
- return apply_through_coercion(m, __method__)
- end
-
- raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count
-
- rows = Array.new(row_count) {|i|
- Array.new(column_count) {|j|
- self[i, j] + m[i, j]
- }
- }
- new_matrix rows, column_count
- end
-
- #
- # Matrix subtraction.
- # Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]]
- # => -8 2
- # 8 1
- #
- def -(m)
- case m
- when Numeric
- raise ErrOperationNotDefined, ["-", self.class, m.class]
- when Vector
- m = self.class.column_vector(m)
- when Matrix
- else
- return apply_through_coercion(m, __method__)
- end
-
- raise ErrDimensionMismatch unless row_count == m.row_count && column_count == m.column_count
-
- rows = Array.new(row_count) {|i|
- Array.new(column_count) {|j|
- self[i, j] - m[i, j]
- }
- }
- new_matrix rows, column_count
- end
-
- #
- # Matrix division (multiplication by the inverse).
- # Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]]
- # => -7 1
- # -3 -6
- #
- def /(other)
- case other
- when Numeric
- rows = @rows.collect {|row|
- row.collect {|e| e / other }
- }
- return new_matrix rows, column_count
- when Matrix
- return self * other.inverse
- else
- return apply_through_coercion(other, __method__)
- end
- end
-
- #
- # Hadamard product
- # Matrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]])
- # => 1 4
- # 9 8
- #
- def hadamard_product(m)
- combine(m){|a, b| a * b}
- end
- alias_method :entrywise_product, :hadamard_product
-
- #
- # Returns the inverse of the matrix.
- # Matrix[[-1, -1], [0, -1]].inverse
- # => -1 1
- # 0 -1
- #
- def inverse
- raise ErrDimensionMismatch unless square?
- self.class.I(row_count).send(:inverse_from, self)
- end
- alias_method :inv, :inverse
-
- private def inverse_from(src) # :nodoc:
- last = row_count - 1
- a = src.to_a
-
- 0.upto(last) do |k|
- i = k
- akk = a[k][k].abs
- (k+1).upto(last) do |j|
- v = a[j][k].abs
- if v > akk
- i = j
- akk = v
- end
- end
- raise ErrNotRegular if akk == 0
- if i != k
- a[i], a[k] = a[k], a[i]
- @rows[i], @rows[k] = @rows[k], @rows[i]
- end
- akk = a[k][k]
-
- 0.upto(last) do |ii|
- next if ii == k
- q = a[ii][k].quo(akk)
- a[ii][k] = 0
-
- (k + 1).upto(last) do |j|
- a[ii][j] -= a[k][j] * q
- end
- 0.upto(last) do |j|
- @rows[ii][j] -= @rows[k][j] * q
- end
- end
-
- (k+1).upto(last) do |j|
- a[k][j] = a[k][j].quo(akk)
- end
- 0.upto(last) do |j|
- @rows[k][j] = @rows[k][j].quo(akk)
- end
- end
- self
- end
-
- #
- # Matrix exponentiation.
- # Equivalent to multiplying the matrix by itself N times.
- # Non integer exponents will be handled by diagonalizing the matrix.
- #
- # Matrix[[7,6], [3,9]] ** 2
- # => 67 96
- # 48 99
- #
- def **(other)
- case other
- when Integer
- x = self
- if other <= 0
- x = self.inverse
- return self.class.identity(self.column_count) if other == 0
- other = -other
- end
- z = nil
- loop do
- z = z ? z * x : x if other[0] == 1
- return z if (other >>= 1).zero?
- x *= x
- end
- when Numeric
- v, d, v_inv = eigensystem
- v * self.class.diagonal(*d.each(:diagonal).map{|e| e ** other}) * v_inv
- else
- raise ErrOperationNotDefined, ["**", self.class, other.class]
- end
- end
-
- def +@
- self
- end
-
- def -@
- collect {|e| -e }
- end
-
- #
- # Returns the absolute value elementwise
- #
- def abs
- collect(&:abs)
- end
-
- #--
- # MATRIX FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns the determinant of the matrix.
- #
- # Beware that using Float values can yield erroneous results
- # because of their lack of precision.
- # Consider using exact types like Rational or BigDecimal instead.
- #
- # Matrix[[7,6], [3,9]].determinant
- # => 45
- #
- def determinant
- raise ErrDimensionMismatch unless square?
- m = @rows
- case row_count
- # Up to 4x4, give result using Laplacian expansion by minors.
- # This will typically be faster, as well as giving good results
- # in case of Floats
- when 0
- +1
- when 1
- + m[0][0]
- when 2
- + m[0][0] * m[1][1] - m[0][1] * m[1][0]
- when 3
- m0, m1, m2 = m
- + m0[0] * m1[1] * m2[2] - m0[0] * m1[2] * m2[1] \
- - m0[1] * m1[0] * m2[2] + m0[1] * m1[2] * m2[0] \
- + m0[2] * m1[0] * m2[1] - m0[2] * m1[1] * m2[0]
- when 4
- m0, m1, m2, m3 = m
- + m0[0] * m1[1] * m2[2] * m3[3] - m0[0] * m1[1] * m2[3] * m3[2] \
- - m0[0] * m1[2] * m2[1] * m3[3] + m0[0] * m1[2] * m2[3] * m3[1] \
- + m0[0] * m1[3] * m2[1] * m3[2] - m0[0] * m1[3] * m2[2] * m3[1] \
- - m0[1] * m1[0] * m2[2] * m3[3] + m0[1] * m1[0] * m2[3] * m3[2] \
- + m0[1] * m1[2] * m2[0] * m3[3] - m0[1] * m1[2] * m2[3] * m3[0] \
- - m0[1] * m1[3] * m2[0] * m3[2] + m0[1] * m1[3] * m2[2] * m3[0] \
- + m0[2] * m1[0] * m2[1] * m3[3] - m0[2] * m1[0] * m2[3] * m3[1] \
- - m0[2] * m1[1] * m2[0] * m3[3] + m0[2] * m1[1] * m2[3] * m3[0] \
- + m0[2] * m1[3] * m2[0] * m3[1] - m0[2] * m1[3] * m2[1] * m3[0] \
- - m0[3] * m1[0] * m2[1] * m3[2] + m0[3] * m1[0] * m2[2] * m3[1] \
- + m0[3] * m1[1] * m2[0] * m3[2] - m0[3] * m1[1] * m2[2] * m3[0] \
- - m0[3] * m1[2] * m2[0] * m3[1] + m0[3] * m1[2] * m2[1] * m3[0]
- else
- # For bigger matrices, use an efficient and general algorithm.
- # Currently, we use the Gauss-Bareiss algorithm
- determinant_bareiss
- end
- end
- alias_method :det, :determinant
-
- #
- # Private. Use Matrix#determinant
- #
- # Returns the determinant of the matrix, using
- # Bareiss' multistep integer-preserving gaussian elimination.
- # It has the same computational cost order O(n^3) as standard Gaussian elimination.
- # Intermediate results are fraction free and of lower complexity.
- # A matrix of Integers will have thus intermediate results that are also Integers,
- # with smaller bignums (if any), while a matrix of Float will usually have
- # intermediate results with better precision.
- #
- private def determinant_bareiss
- size = row_count
- last = size - 1
- a = to_a
- no_pivot = Proc.new{ return 0 }
- sign = +1
- pivot = 1
- size.times do |k|
- previous_pivot = pivot
- if (pivot = a[k][k]) == 0
- switch = (k+1 ... size).find(no_pivot) {|row|
- a[row][k] != 0
- }
- a[switch], a[k] = a[k], a[switch]
- pivot = a[k][k]
- sign = -sign
- end
- (k+1).upto(last) do |i|
- ai = a[i]
- (k+1).upto(last) do |j|
- ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) / previous_pivot
- end
- end
- end
- sign * pivot
- end
-
- #
- # deprecated; use Matrix#determinant
- #
- def determinant_e
- warn "Matrix#determinant_e is deprecated; use #determinant", uplevel: 1
- determinant
- end
- alias_method :det_e, :determinant_e
-
- #
- # Returns a new matrix resulting by stacking horizontally
- # the receiver with the given matrices
- #
- # x = Matrix[[1, 2], [3, 4]]
- # y = Matrix[[5, 6], [7, 8]]
- # x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
- #
- def hstack(*matrices)
- self.class.hstack(self, *matrices)
- end
-
- #
- # Returns the rank of the matrix.
- # Beware that using Float values can yield erroneous results
- # because of their lack of precision.
- # Consider using exact types like Rational or BigDecimal instead.
- #
- # Matrix[[7,6], [3,9]].rank
- # => 2
- #
- def rank
- # We currently use Bareiss' multistep integer-preserving gaussian elimination
- # (see comments on determinant)
- a = to_a
- last_column = column_count - 1
- last_row = row_count - 1
- pivot_row = 0
- previous_pivot = 1
- 0.upto(last_column) do |k|
- switch_row = (pivot_row .. last_row).find {|row|
- a[row][k] != 0
- }
- if switch_row
- a[switch_row], a[pivot_row] = a[pivot_row], a[switch_row] unless pivot_row == switch_row
- pivot = a[pivot_row][k]
- (pivot_row+1).upto(last_row) do |i|
- ai = a[i]
- (k+1).upto(last_column) do |j|
- ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) / previous_pivot
- end
- end
- pivot_row += 1
- previous_pivot = pivot
- end
- end
- pivot_row
- end
-
- #
- # deprecated; use Matrix#rank
- #
- def rank_e
- warn "Matrix#rank_e is deprecated; use #rank", uplevel: 1
- rank
- end
-
- # Returns a matrix with entries rounded to the given precision
- # (see Float#round)
- #
- def round(ndigits=0)
- map{|e| e.round(ndigits)}
- end
-
- #
- # Returns the trace (sum of diagonal elements) of the matrix.
- # Matrix[[7,6], [3,9]].trace
- # => 16
- #
- def trace
- raise ErrDimensionMismatch unless square?
- (0...column_count).inject(0) do |tr, i|
- tr + @rows[i][i]
- end
- end
- alias_method :tr, :trace
-
- #
- # Returns the transpose of the matrix.
- # Matrix[[1,2], [3,4], [5,6]]
- # => 1 2
- # 3 4
- # 5 6
- # Matrix[[1,2], [3,4], [5,6]].transpose
- # => 1 3 5
- # 2 4 6
- #
- def transpose
- return self.class.empty(column_count, 0) if row_count.zero?
- new_matrix @rows.transpose, row_count
- end
- alias_method :t, :transpose
-
- #
- # Returns a new matrix resulting by stacking vertically
- # the receiver with the given matrices
- #
- # x = Matrix[[1, 2], [3, 4]]
- # y = Matrix[[5, 6], [7, 8]]
- # x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
- #
- def vstack(*matrices)
- self.class.vstack(self, *matrices)
- end
-
- #--
- # DECOMPOSITIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #++
-
- #
- # Returns the Eigensystem of the matrix; see +EigenvalueDecomposition+.
- # m = Matrix[[1, 2], [3, 4]]
- # v, d, v_inv = m.eigensystem
- # d.diagonal? # => true
- # v.inv == v_inv # => true
- # (v * d * v_inv).round(5) == m # => true
- #
- def eigensystem
- EigenvalueDecomposition.new(self)
- end
- alias_method :eigen, :eigensystem
-
- #
- # Returns the LUP decomposition of the matrix; see +LUPDecomposition+.
- # a = Matrix[[1, 2], [3, 4]]
- # l, u, p = a.lup
- # l.lower_triangular? # => true
- # u.upper_triangular? # => true
- # p.permutation? # => true
- # l * u == p * a # => true
- # a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
- #
- def lup
- LUPDecomposition.new(self)
- end
- alias_method :lup_decomposition, :lup
-
- #--
- # COMPLEX ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #++
-
- #
- # Returns the conjugate of the matrix.
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
- # => 1+2i i 0
- # 1 2 3
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate
- # => 1-2i -i 0
- # 1 2 3
- #
- def conjugate
- collect(&:conjugate)
- end
- alias_method :conj, :conjugate
-
- #
- # Returns the imaginary part of the matrix.
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
- # => 1+2i i 0
- # 1 2 3
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary
- # => 2i i 0
- # 0 0 0
- #
- def imaginary
- collect(&:imaginary)
- end
- alias_method :imag, :imaginary
-
- #
- # Returns the real part of the matrix.
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
- # => 1+2i i 0
- # 1 2 3
- # Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real
- # => 1 0 0
- # 1 2 3
- #
- def real
- collect(&:real)
- end
-
- #
- # Returns an array containing matrices corresponding to the real and imaginary
- # parts of the matrix
- #
- # m.rect == [m.real, m.imag] # ==> true for all matrices m
- #
- def rect
- [real, imag]
- end
- alias_method :rectangular, :rect
-
- #--
- # CONVERTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # The coerce method provides support for Ruby type coercion.
- # This coercion mechanism is used by Ruby to handle mixed-type
- # numeric operations: it is intended to find a compatible common
- # type between the two operands of the operator.
- # See also Numeric#coerce.
- #
- def coerce(other)
- case other
- when Numeric
- return Scalar.new(other), self
- else
- raise TypeError, "#{self.class} can't be coerced into #{other.class}"
- end
- end
-
- #
- # Returns an array of the row vectors of the matrix. See Vector.
- #
- def row_vectors
- Array.new(row_count) {|i|
- row(i)
- }
- end
-
- #
- # Returns an array of the column vectors of the matrix. See Vector.
- #
- def column_vectors
- Array.new(column_count) {|i|
- column(i)
- }
- end
-
- #
- # Explicit conversion to a Matrix. Returns self
- #
- def to_matrix
- self
- end
-
- #
- # Returns an array of arrays that describe the rows of the matrix.
- #
- def to_a
- @rows.collect(&:dup)
- end
-
- # Deprecated.
- #
- # Use map(&:to_f)
- def elements_to_f
- warn "Matrix#elements_to_f is deprecated, use map(&:to_f)", uplevel: 1
- map(&:to_f)
- end
-
- # Deprecated.
- #
- # Use map(&:to_i)
- def elements_to_i
- warn "Matrix#elements_to_i is deprecated, use map(&:to_i)", uplevel: 1
- map(&:to_i)
- end
-
- # Deprecated.
- #
- # Use map(&:to_r)
- def elements_to_r
- warn "Matrix#elements_to_r is deprecated, use map(&:to_r)", uplevel: 1
- map(&:to_r)
- end
-
- #--
- # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Overrides Object#to_s
- #
- def to_s
- if empty?
- "#{self.class}.empty(#{row_count}, #{column_count})"
- else
- "#{self.class}[" + @rows.collect{|row|
- "[" + row.collect{|e| e.to_s}.join(", ") + "]"
- }.join(", ")+"]"
- end
- end
-
- #
- # Overrides Object#inspect
- #
- def inspect
- if empty?
- "#{self.class}.empty(#{row_count}, #{column_count})"
- else
- "#{self.class}#{@rows.inspect}"
- end
- end
-
- # Private helper modules
-
- module ConversionHelper # :nodoc:
- #
- # Converts the obj to an Array. If copy is set to true
- # a copy of obj will be made if necessary.
- #
- private def convert_to_array(obj, copy = false) # :nodoc:
- case obj
- when Array
- copy ? obj.dup : obj
- when Vector
- obj.to_a
- else
- begin
- converted = obj.to_ary
- rescue Exception => e
- raise TypeError, "can't convert #{obj.class} into an Array (#{e.message})"
- end
- raise TypeError, "#{obj.class}#to_ary should return an Array" unless converted.is_a? Array
- converted
- end
- end
- end
-
- extend ConversionHelper
-
- module CoercionHelper # :nodoc:
- #
- # Applies the operator +oper+ with argument +obj+
- # through coercion of +obj+
- #
- private def apply_through_coercion(obj, oper)
- coercion = obj.coerce(self)
- raise TypeError unless coercion.is_a?(Array) && coercion.length == 2
- coercion[0].public_send(oper, coercion[1])
- rescue
- raise TypeError, "#{obj.inspect} can't be coerced into #{self.class}"
- end
-
- #
- # Helper method to coerce a value into a specific class.
- # Raises a TypeError if the coercion fails or the returned value
- # is not of the right class.
- # (from Rubinius)
- #
- def self.coerce_to(obj, cls, meth) # :nodoc:
- return obj if obj.kind_of?(cls)
- raise TypeError, "Expected a #{cls} but got a #{obj.class}" unless obj.respond_to? meth
- begin
- ret = obj.__send__(meth)
- rescue Exception => e
- raise TypeError, "Coercion error: #{obj.inspect}.#{meth} => #{cls} failed:\n" \
- "(#{e.message})"
- end
- raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.kind_of? cls
- ret
- end
-
- def self.coerce_to_int(obj)
- coerce_to(obj, Integer, :to_int)
- end
-
- def self.coerce_to_matrix(obj)
- coerce_to(obj, Matrix, :to_matrix)
- end
-
- # Returns `nil` for non Ranges
- # Checks range validity, return canonical range with 0 <= begin <= end < count
- def self.check_range(val, count, kind)
- canonical = (val.begin + (val.begin < 0 ? count : 0))..
- (val.end ? val.end + (val.end < 0 ? count : 0) - (val.exclude_end? ? 1 : 0)
- : count - 1)
- unless 0 <= canonical.begin && canonical.begin <= canonical.end && canonical.end < count
- raise IndexError, "given range #{val} is outside of #{kind} dimensions: 0...#{count}"
- end
- canonical
- end
-
- def self.check_int(val, count, kind)
- val = CoercionHelper.coerce_to_int(val)
- if val >= count || val < -count
- raise IndexError, "given #{kind} #{val} is outside of #{-count}...#{count}"
- end
- val
- end
- end
-
- include CoercionHelper
-
- # Private CLASS
-
- class Scalar < Numeric # :nodoc:
- include ExceptionForMatrix
- include CoercionHelper
-
- def initialize(value)
- @value = value
- end
-
- # ARITHMETIC
- def +(other)
- case other
- when Numeric
- Scalar.new(@value + other)
- when Vector, Matrix
- raise ErrOperationNotDefined, ["+", @value.class, other.class]
- else
- apply_through_coercion(other, __method__)
- end
- end
-
- def -(other)
- case other
- when Numeric
- Scalar.new(@value - other)
- when Vector, Matrix
- raise ErrOperationNotDefined, ["-", @value.class, other.class]
- else
- apply_through_coercion(other, __method__)
- end
- end
-
- def *(other)
- case other
- when Numeric
- Scalar.new(@value * other)
- when Vector, Matrix
- other.collect{|e| @value * e}
- else
- apply_through_coercion(other, __method__)
- end
- end
-
- def /(other)
- case other
- when Numeric
- Scalar.new(@value / other)
- when Vector
- raise ErrOperationNotDefined, ["/", @value.class, other.class]
- when Matrix
- self * other.inverse
- else
- apply_through_coercion(other, __method__)
- end
- end
-
- def **(other)
- case other
- when Numeric
- Scalar.new(@value ** other)
- when Vector
- raise ErrOperationNotDefined, ["**", @value.class, other.class]
- when Matrix
- #other.powered_by(self)
- raise ErrOperationNotImplemented, ["**", @value.class, other.class]
- else
- apply_through_coercion(other, __method__)
- end
- end
- end
-
-end
-
-
-#
-# The +Vector+ class represents a mathematical vector, which is useful in its own right, and
-# also constitutes a row or column of a Matrix.
-#
-# == Method Catalogue
-#
-# To create a Vector:
-# * Vector.[](*array)
-# * Vector.elements(array, copy = true)
-# * Vector.basis(size: n, index: k)
-# * Vector.zero(n)
-#
-# To access elements:
-# * #[](i)
-#
-# To set elements:
-# * #[]=(i, v)
-#
-# To enumerate the elements:
-# * #each2(v)
-# * #collect2(v)
-#
-# Properties of vectors:
-# * #angle_with(v)
-# * Vector.independent?(*vs)
-# * #independent?(*vs)
-# * #zero?
-#
-# Vector arithmetic:
-# * #*(x) "is matrix or number"
-# * #+(v)
-# * #-(v)
-# * #/(v)
-# * #+@
-# * #-@
-#
-# Vector functions:
-# * #inner_product(v), dot(v)
-# * #cross_product(v), cross(v)
-# * #collect
-# * #collect!
-# * #magnitude
-# * #map
-# * #map!
-# * #map2(v)
-# * #norm
-# * #normalize
-# * #r
-# * #round
-# * #size
-#
-# Conversion to other data types:
-# * #covector
-# * #to_a
-# * #coerce(other)
-#
-# String representations:
-# * #to_s
-# * #inspect
-#
-class Vector
- include ExceptionForMatrix
- include Enumerable
- include Matrix::CoercionHelper
- extend Matrix::ConversionHelper
- #INSTANCE CREATION
-
- private_class_method :new
- attr_reader :elements
- protected :elements
-
- #
- # Creates a Vector from a list of elements.
- # Vector[7, 4, ...]
- #
- def Vector.[](*array)
- new convert_to_array(array, false)
- end
-
- #
- # Creates a vector from an Array. The optional second argument specifies
- # whether the array itself or a copy is used internally.
- #
- def Vector.elements(array, copy = true)
- new convert_to_array(array, copy)
- end
-
- #
- # Returns a standard basis +n+-vector, where k is the index.
- #
- # Vector.basis(size:, index:) # => Vector[0, 1, 0]
- #
- def Vector.basis(size:, index:)
- raise ArgumentError, "invalid size (#{size} for 1..)" if size < 1
- raise ArgumentError, "invalid index (#{index} for 0...#{size})" unless 0 <= index && index < size
- array = Array.new(size, 0)
- array[index] = 1
- new convert_to_array(array, false)
- end
-
- #
- # Return a zero vector.
- #
- # Vector.zero(3) => Vector[0, 0, 0]
- #
- def Vector.zero(size)
- raise ArgumentError, "invalid size (#{size} for 0..)" if size < 0
- array = Array.new(size, 0)
- new convert_to_array(array, false)
- end
-
- #
- # Vector.new is private; use Vector[] or Vector.elements to create.
- #
- def initialize(array)
- # No checking is done at this point.
- @elements = array
- end
-
- # ACCESSING
-
- #
- # :call-seq:
- # vector[range]
- # vector[integer]
- #
- # Returns element or elements of the vector.
- #
- def [](i)
- @elements[i]
- end
- alias element []
- alias component []
-
- #
- # :call-seq:
- # vector[range] = new_vector
- # vector[range] = row_matrix
- # vector[range] = new_element
- # vector[integer] = new_element
- #
- # Set element or elements of vector.
- #
- def []=(i, v)
- raise FrozenError, "can't modify frozen Vector" if frozen?
- if i.is_a?(Range)
- range = Matrix::CoercionHelper.check_range(i, size, :vector)
- set_range(range, v)
- else
- index = Matrix::CoercionHelper.check_int(i, size, :index)
- set_value(index, v)
- end
- end
- alias set_element []=
- alias set_component []=
- private :set_element, :set_component
-
- private def set_value(index, value)
- @elements[index] = value
- end
-
- private def set_range(range, value)
- if value.is_a?(Vector)
- raise ArgumentError, "vector to be set has wrong size" unless range.size == value.size
- @elements[range] = value.elements
- elsif value.is_a?(Matrix)
- raise ErrDimensionMismatch unless value.row_count == 1
- @elements[range] = value.row(0).elements
- else
- @elements[range] = Array.new(range.size, value)
- end
- end
-
- # Returns a vector with entries rounded to the given precision
- # (see Float#round)
- #
- def round(ndigits=0)
- map{|e| e.round(ndigits)}
- end
-
- #
- # Returns the number of elements in the vector.
- #
- def size
- @elements.size
- end
-
- #--
- # ENUMERATIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Iterate over the elements of this vector
- #
- def each(&block)
- return to_enum(:each) unless block_given?
- @elements.each(&block)
- self
- end
-
- #
- # Iterate over the elements of this vector and +v+ in conjunction.
- #
- def each2(v) # :yield: e1, e2
- raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
- raise ErrDimensionMismatch if size != v.size
- return to_enum(:each2, v) unless block_given?
- size.times do |i|
- yield @elements[i], v[i]
- end
- self
- end
-
- #
- # Collects (as in Enumerable#collect) over the elements of this vector and +v+
- # in conjunction.
- #
- def collect2(v) # :yield: e1, e2
- raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
- raise ErrDimensionMismatch if size != v.size
- return to_enum(:collect2, v) unless block_given?
- Array.new(size) do |i|
- yield @elements[i], v[i]
- end
- end
-
- #--
- # PROPERTIES -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns +true+ iff all of vectors are linearly independent.
- #
- # Vector.independent?(Vector[1,0], Vector[0,1])
- # => true
- #
- # Vector.independent?(Vector[1,2], Vector[2,4])
- # => false
- #
- def Vector.independent?(*vs)
- vs.each do |v|
- raise TypeError, "expected Vector, got #{v.class}" unless v.is_a?(Vector)
- raise ErrDimensionMismatch unless v.size == vs.first.size
- end
- return false if vs.count > vs.first.size
- Matrix[*vs].rank.eql?(vs.count)
- end
-
- #
- # Returns +true+ iff all of vectors are linearly independent.
- #
- # Vector[1,0].independent?(Vector[0,1])
- # => true
- #
- # Vector[1,2].independent?(Vector[2,4])
- # => false
- #
- def independent?(*vs)
- self.class.independent?(self, *vs)
- end
-
- #
- # Returns +true+ iff all elements are zero.
- #
- def zero?
- all?(&:zero?)
- end
-
- def freeze
- @elements.freeze
- super
- end
-
- #
- # Called for dup & clone.
- #
- private def initialize_copy(v)
- super
- @elements = @elements.dup unless frozen?
- end
-
-
- #--
- # COMPARING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns +true+ iff the two vectors have the same elements in the same order.
- #
- def ==(other)
- return false unless Vector === other
- @elements == other.elements
- end
-
- def eql?(other)
- return false unless Vector === other
- @elements.eql? other.elements
- end
-
- #
- # Returns a hash-code for the vector.
- #
- def hash
- @elements.hash
- end
-
- #--
- # ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Multiplies the vector by +x+, where +x+ is a number or a matrix.
- #
- def *(x)
- case x
- when Numeric
- els = @elements.collect{|e| e * x}
- self.class.elements(els, false)
- when Matrix
- Matrix.column_vector(self) * x
- when Vector
- raise ErrOperationNotDefined, ["*", self.class, x.class]
- else
- apply_through_coercion(x, __method__)
- end
- end
-
- #
- # Vector addition.
- #
- def +(v)
- case v
- when Vector
- raise ErrDimensionMismatch if size != v.size
- els = collect2(v) {|v1, v2|
- v1 + v2
- }
- self.class.elements(els, false)
- when Matrix
- Matrix.column_vector(self) + v
- else
- apply_through_coercion(v, __method__)
- end
- end
-
- #
- # Vector subtraction.
- #
- def -(v)
- case v
- when Vector
- raise ErrDimensionMismatch if size != v.size
- els = collect2(v) {|v1, v2|
- v1 - v2
- }
- self.class.elements(els, false)
- when Matrix
- Matrix.column_vector(self) - v
- else
- apply_through_coercion(v, __method__)
- end
- end
-
- #
- # Vector division.
- #
- def /(x)
- case x
- when Numeric
- els = @elements.collect{|e| e / x}
- self.class.elements(els, false)
- when Matrix, Vector
- raise ErrOperationNotDefined, ["/", self.class, x.class]
- else
- apply_through_coercion(x, __method__)
- end
- end
-
- def +@
- self
- end
-
- def -@
- collect {|e| -e }
- end
-
- #--
- # VECTOR FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Returns the inner product of this vector with the other.
- # Vector[4,7].inner_product Vector[10,1] => 47
- #
- def inner_product(v)
- raise ErrDimensionMismatch if size != v.size
-
- p = 0
- each2(v) {|v1, v2|
- p += v1 * v2.conj
- }
- p
- end
- alias_method :dot, :inner_product
-
- #
- # Returns the cross product of this vector with the others.
- # Vector[1, 0, 0].cross_product Vector[0, 1, 0] => Vector[0, 0, 1]
- #
- # It is generalized to other dimensions to return a vector perpendicular
- # to the arguments.
- # Vector[1, 2].cross_product # => Vector[-2, 1]
- # Vector[1, 0, 0, 0].cross_product(
- # Vector[0, 1, 0, 0],
- # Vector[0, 0, 1, 0]
- # ) #=> Vector[0, 0, 0, 1]
- #
- def cross_product(*vs)
- raise ErrOperationNotDefined, "cross product is not defined on vectors of dimension #{size}" unless size >= 2
- raise ArgumentError, "wrong number of arguments (#{vs.size} for #{size - 2})" unless vs.size == size - 2
- vs.each do |v|
- raise TypeError, "expected Vector, got #{v.class}" unless v.is_a? Vector
- raise ErrDimensionMismatch unless v.size == size
- end
- case size
- when 2
- Vector[-@elements[1], @elements[0]]
- when 3
- v = vs[0]
- Vector[ v[2]*@elements[1] - v[1]*@elements[2],
- v[0]*@elements[2] - v[2]*@elements[0],
- v[1]*@elements[0] - v[0]*@elements[1] ]
- else
- rows = self, *vs, Array.new(size) {|i| Vector.basis(size: size, index: i) }
- Matrix.rows(rows).laplace_expansion(row: size - 1)
- end
- end
- alias_method :cross, :cross_product
-
- #
- # Like Array#collect.
- #
- def collect(&block) # :yield: e
- return to_enum(:collect) unless block_given?
- els = @elements.collect(&block)
- self.class.elements(els, false)
- end
- alias_method :map, :collect
-
- #
- # Like Array#collect!
- #
- def collect!(&block)
- return to_enum(:collect!) unless block_given?
- raise FrozenError, "can't modify frozen Vector" if frozen?
- @elements.collect!(&block)
- self
- end
- alias map! collect!
-
- #
- # Returns the modulus (Pythagorean distance) of the vector.
- # Vector[5,8,2].r => 9.643650761
- #
- def magnitude
- Math.sqrt(@elements.inject(0) {|v, e| v + e.abs2})
- end
- alias_method :r, :magnitude
- alias_method :norm, :magnitude
-
- #
- # Like Vector#collect2, but returns a Vector instead of an Array.
- #
- def map2(v, &block) # :yield: e1, e2
- return to_enum(:map2, v) unless block_given?
- els = collect2(v, &block)
- self.class.elements(els, false)
- end
-
- class ZeroVectorError < StandardError
- end
- #
- # Returns a new vector with the same direction but with norm 1.
- # v = Vector[5,8,2].normalize
- # # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505]
- # v.norm => 1.0
- #
- def normalize
- n = magnitude
- raise ZeroVectorError, "Zero vectors can not be normalized" if n == 0
- self / n
- end
-
- #
- # Returns an angle with another vector. Result is within the [0..Math::PI].
- # Vector[1,0].angle_with(Vector[0,1])
- # # => Math::PI / 2
- #
- def angle_with(v)
- raise TypeError, "Expected a Vector, got a #{v.class}" unless v.is_a?(Vector)
- raise ErrDimensionMismatch if size != v.size
- prod = magnitude * v.magnitude
- raise ZeroVectorError, "Can't get angle of zero vector" if prod == 0
- dot = inner_product(v)
- if dot.abs >= prod
- dot.positive? ? 0 : Math::PI
- else
- Math.acos(dot / prod)
- end
- end
-
- #--
- # CONVERTING
- #++
-
- #
- # Creates a single-row matrix from this vector.
- #
- def covector
- Matrix.row_vector(self)
- end
-
- #
- # Returns the elements of the vector in an array.
- #
- def to_a
- @elements.dup
- end
-
- #
- # Return a single-column matrix from this vector
- #
- def to_matrix
- Matrix.column_vector(self)
- end
-
- def elements_to_f
- warn "Vector#elements_to_f is deprecated", uplevel: 1
- map(&:to_f)
- end
-
- def elements_to_i
- warn "Vector#elements_to_i is deprecated", uplevel: 1
- map(&:to_i)
- end
-
- def elements_to_r
- warn "Vector#elements_to_r is deprecated", uplevel: 1
- map(&:to_r)
- end
-
- #
- # The coerce method provides support for Ruby type coercion.
- # This coercion mechanism is used by Ruby to handle mixed-type
- # numeric operations: it is intended to find a compatible common
- # type between the two operands of the operator.
- # See also Numeric#coerce.
- #
- def coerce(other)
- case other
- when Numeric
- return Matrix::Scalar.new(other), self
- else
- raise TypeError, "#{self.class} can't be coerced into #{other.class}"
- end
- end
-
- #--
- # PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #++
-
- #
- # Overrides Object#to_s
- #
- def to_s
- "Vector[" + @elements.join(", ") + "]"
- end
-
- #
- # Overrides Object#inspect
- #
- def inspect
- "Vector" + @elements.inspect
- end
-end
diff --git a/lib/matrix/eigenvalue_decomposition.rb b/lib/matrix/eigenvalue_decomposition.rb
deleted file mode 100644
index bf6637635a..0000000000
--- a/lib/matrix/eigenvalue_decomposition.rb
+++ /dev/null
@@ -1,882 +0,0 @@
-# frozen_string_literal: false
-class Matrix
- # Adapted from JAMA: http://math.nist.gov/javanumerics/jama/
-
- # Eigenvalues and eigenvectors of a real matrix.
- #
- # Computes the eigenvalues and eigenvectors of a matrix A.
- #
- # If A is diagonalizable, this provides matrices V and D
- # such that A = V*D*V.inv, where D is the diagonal matrix with entries
- # equal to the eigenvalues and V is formed by the eigenvectors.
- #
- # If A is symmetric, then V is orthogonal and thus A = V*D*V.t
-
- class EigenvalueDecomposition
-
- # Constructs the eigenvalue decomposition for a square matrix +A+
- #
- def initialize(a)
- # @d, @e: Arrays for internal storage of eigenvalues.
- # @v: Array for internal storage of eigenvectors.
- # @h: Array for internal storage of nonsymmetric Hessenberg form.
- raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix)
- @size = a.row_count
- @d = Array.new(@size, 0)
- @e = Array.new(@size, 0)
-
- if (@symmetric = a.symmetric?)
- @v = a.to_a
- tridiagonalize
- diagonalize
- else
- @v = Array.new(@size) { Array.new(@size, 0) }
- @h = a.to_a
- @ort = Array.new(@size, 0)
- reduce_to_hessenberg
- hessenberg_to_real_schur
- end
- end
-
- # Returns the eigenvector matrix +V+
- #
- def eigenvector_matrix
- Matrix.send(:new, build_eigenvectors.transpose)
- end
- alias_method :v, :eigenvector_matrix
-
- # Returns the inverse of the eigenvector matrix +V+
- #
- def eigenvector_matrix_inv
- r = Matrix.send(:new, build_eigenvectors)
- r = r.transpose.inverse unless @symmetric
- r
- end
- alias_method :v_inv, :eigenvector_matrix_inv
-
- # Returns the eigenvalues in an array
- #
- def eigenvalues
- values = @d.dup
- @e.each_with_index{|imag, i| values[i] = Complex(values[i], imag) unless imag == 0}
- values
- end
-
- # Returns an array of the eigenvectors
- #
- def eigenvectors
- build_eigenvectors.map{|ev| Vector.send(:new, ev)}
- end
-
- # Returns the block diagonal eigenvalue matrix +D+
- #
- def eigenvalue_matrix
- Matrix.diagonal(*eigenvalues)
- end
- alias_method :d, :eigenvalue_matrix
-
- # Returns [eigenvector_matrix, eigenvalue_matrix, eigenvector_matrix_inv]
- #
- def to_ary
- [v, d, v_inv]
- end
- alias_method :to_a, :to_ary
-
-
- private def build_eigenvectors
- # JAMA stores complex eigenvectors in a strange way
- # See http://web.archive.org/web/20111016032731/http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html
- @e.each_with_index.map do |imag, i|
- if imag == 0
- Array.new(@size){|j| @v[j][i]}
- elsif imag > 0
- Array.new(@size){|j| Complex(@v[j][i], @v[j][i+1])}
- else
- Array.new(@size){|j| Complex(@v[j][i-1], -@v[j][i])}
- end
- end
- end
-
- # Complex scalar division.
-
- private def cdiv(xr, xi, yr, yi)
- if (yr.abs > yi.abs)
- r = yi/yr
- d = yr + r*yi
- [(xr + r*xi)/d, (xi - r*xr)/d]
- else
- r = yr/yi
- d = yi + r*yr
- [(r*xr + xi)/d, (r*xi - xr)/d]
- end
- end
-
-
- # Symmetric Householder reduction to tridiagonal form.
-
- private def tridiagonalize
-
- # This is derived from the Algol procedures tred2 by
- # Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
- # Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
- # Fortran subroutine in EISPACK.
-
- @size.times do |j|
- @d[j] = @v[@size-1][j]
- end
-
- # Householder reduction to tridiagonal form.
-
- (@size-1).downto(0+1) do |i|
-
- # Scale to avoid under/overflow.
-
- scale = 0.0
- h = 0.0
- i.times do |k|
- scale = scale + @d[k].abs
- end
- if (scale == 0.0)
- @e[i] = @d[i-1]
- i.times do |j|
- @d[j] = @v[i-1][j]
- @v[i][j] = 0.0
- @v[j][i] = 0.0
- end
- else
-
- # Generate Householder vector.
-
- i.times do |k|
- @d[k] /= scale
- h += @d[k] * @d[k]
- end
- f = @d[i-1]
- g = Math.sqrt(h)
- if (f > 0)
- g = -g
- end
- @e[i] = scale * g
- h -= f * g
- @d[i-1] = f - g
- i.times do |j|
- @e[j] = 0.0
- end
-
- # Apply similarity transformation to remaining columns.
-
- i.times do |j|
- f = @d[j]
- @v[j][i] = f
- g = @e[j] + @v[j][j] * f
- (j+1).upto(i-1) do |k|
- g += @v[k][j] * @d[k]
- @e[k] += @v[k][j] * f
- end
- @e[j] = g
- end
- f = 0.0
- i.times do |j|
- @e[j] /= h
- f += @e[j] * @d[j]
- end
- hh = f / (h + h)
- i.times do |j|
- @e[j] -= hh * @d[j]
- end
- i.times do |j|
- f = @d[j]
- g = @e[j]
- j.upto(i-1) do |k|
- @v[k][j] -= (f * @e[k] + g * @d[k])
- end
- @d[j] = @v[i-1][j]
- @v[i][j] = 0.0
- end
- end
- @d[i] = h
- end
-
- # Accumulate transformations.
-
- 0.upto(@size-1-1) do |i|
- @v[@size-1][i] = @v[i][i]
- @v[i][i] = 1.0
- h = @d[i+1]
- if (h != 0.0)
- 0.upto(i) do |k|
- @d[k] = @v[k][i+1] / h
- end
- 0.upto(i) do |j|
- g = 0.0
- 0.upto(i) do |k|
- g += @v[k][i+1] * @v[k][j]
- end
- 0.upto(i) do |k|
- @v[k][j] -= g * @d[k]
- end
- end
- end
- 0.upto(i) do |k|
- @v[k][i+1] = 0.0
- end
- end
- @size.times do |j|
- @d[j] = @v[@size-1][j]
- @v[@size-1][j] = 0.0
- end
- @v[@size-1][@size-1] = 1.0
- @e[0] = 0.0
- end
-
-
- # Symmetric tridiagonal QL algorithm.
-
- private def diagonalize
- # This is derived from the Algol procedures tql2, by
- # Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
- # Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
- # Fortran subroutine in EISPACK.
-
- 1.upto(@size-1) do |i|
- @e[i-1] = @e[i]
- end
- @e[@size-1] = 0.0
-
- f = 0.0
- tst1 = 0.0
- eps = Float::EPSILON
- @size.times do |l|
-
- # Find small subdiagonal element
-
- tst1 = [tst1, @d[l].abs + @e[l].abs].max
- m = l
- while (m < @size) do
- if (@e[m].abs <= eps*tst1)
- break
- end
- m+=1
- end
-
- # If m == l, @d[l] is an eigenvalue,
- # otherwise, iterate.
-
- if (m > l)
- iter = 0
- begin
- iter = iter + 1 # (Could check iteration count here.)
-
- # Compute implicit shift
-
- g = @d[l]
- p = (@d[l+1] - g) / (2.0 * @e[l])
- r = Math.hypot(p, 1.0)
- if (p < 0)
- r = -r
- end
- @d[l] = @e[l] / (p + r)
- @d[l+1] = @e[l] * (p + r)
- dl1 = @d[l+1]
- h = g - @d[l]
- (l+2).upto(@size-1) do |i|
- @d[i] -= h
- end
- f += h
-
- # Implicit QL transformation.
-
- p = @d[m]
- c = 1.0
- c2 = c
- c3 = c
- el1 = @e[l+1]
- s = 0.0
- s2 = 0.0
- (m-1).downto(l) do |i|
- c3 = c2
- c2 = c
- s2 = s
- g = c * @e[i]
- h = c * p
- r = Math.hypot(p, @e[i])
- @e[i+1] = s * r
- s = @e[i] / r
- c = p / r
- p = c * @d[i] - s * g
- @d[i+1] = h + s * (c * g + s * @d[i])
-
- # Accumulate transformation.
-
- @size.times do |k|
- h = @v[k][i+1]
- @v[k][i+1] = s * @v[k][i] + c * h
- @v[k][i] = c * @v[k][i] - s * h
- end
- end
- p = -s * s2 * c3 * el1 * @e[l] / dl1
- @e[l] = s * p
- @d[l] = c * p
-
- # Check for convergence.
-
- end while (@e[l].abs > eps*tst1)
- end
- @d[l] = @d[l] + f
- @e[l] = 0.0
- end
-
- # Sort eigenvalues and corresponding vectors.
-
- 0.upto(@size-2) do |i|
- k = i
- p = @d[i]
- (i+1).upto(@size-1) do |j|
- if (@d[j] < p)
- k = j
- p = @d[j]
- end
- end
- if (k != i)
- @d[k] = @d[i]
- @d[i] = p
- @size.times do |j|
- p = @v[j][i]
- @v[j][i] = @v[j][k]
- @v[j][k] = p
- end
- end
- end
- end
-
- # Nonsymmetric reduction to Hessenberg form.
-
- private def reduce_to_hessenberg
- # This is derived from the Algol procedures orthes and ortran,
- # by Martin and Wilkinson, Handbook for Auto. Comp.,
- # Vol.ii-Linear Algebra, and the corresponding
- # Fortran subroutines in EISPACK.
-
- low = 0
- high = @size-1
-
- (low+1).upto(high-1) do |m|
-
- # Scale column.
-
- scale = 0.0
- m.upto(high) do |i|
- scale = scale + @h[i][m-1].abs
- end
- if (scale != 0.0)
-
- # Compute Householder transformation.
-
- h = 0.0
- high.downto(m) do |i|
- @ort[i] = @h[i][m-1]/scale
- h += @ort[i] * @ort[i]
- end
- g = Math.sqrt(h)
- if (@ort[m] > 0)
- g = -g
- end
- h -= @ort[m] * g
- @ort[m] = @ort[m] - g
-
- # Apply Householder similarity transformation
- # @h = (I-u*u'/h)*@h*(I-u*u')/h)
-
- m.upto(@size-1) do |j|
- f = 0.0
- high.downto(m) do |i|
- f += @ort[i]*@h[i][j]
- end
- f = f/h
- m.upto(high) do |i|
- @h[i][j] -= f*@ort[i]
- end
- end
-
- 0.upto(high) do |i|
- f = 0.0
- high.downto(m) do |j|
- f += @ort[j]*@h[i][j]
- end
- f = f/h
- m.upto(high) do |j|
- @h[i][j] -= f*@ort[j]
- end
- end
- @ort[m] = scale*@ort[m]
- @h[m][m-1] = scale*g
- end
- end
-
- # Accumulate transformations (Algol's ortran).
-
- @size.times do |i|
- @size.times do |j|
- @v[i][j] = (i == j ? 1.0 : 0.0)
- end
- end
-
- (high-1).downto(low+1) do |m|
- if (@h[m][m-1] != 0.0)
- (m+1).upto(high) do |i|
- @ort[i] = @h[i][m-1]
- end
- m.upto(high) do |j|
- g = 0.0
- m.upto(high) do |i|
- g += @ort[i] * @v[i][j]
- end
- # Double division avoids possible underflow
- g = (g / @ort[m]) / @h[m][m-1]
- m.upto(high) do |i|
- @v[i][j] += g * @ort[i]
- end
- end
- end
- end
- end
-
- # Nonsymmetric reduction from Hessenberg to real Schur form.
-
- private def hessenberg_to_real_schur
-
- # This is derived from the Algol procedure hqr2,
- # by Martin and Wilkinson, Handbook for Auto. Comp.,
- # Vol.ii-Linear Algebra, and the corresponding
- # Fortran subroutine in EISPACK.
-
- # Initialize
-
- nn = @size
- n = nn-1
- low = 0
- high = nn-1
- eps = Float::EPSILON
- exshift = 0.0
- p = q = r = s = z = 0
-
- # Store roots isolated by balanc and compute matrix norm
-
- norm = 0.0
- nn.times do |i|
- if (i < low || i > high)
- @d[i] = @h[i][i]
- @e[i] = 0.0
- end
- ([i-1, 0].max).upto(nn-1) do |j|
- norm = norm + @h[i][j].abs
- end
- end
-
- # Outer loop over eigenvalue index
-
- iter = 0
- while (n >= low) do
-
- # Look for single small sub-diagonal element
-
- l = n
- while (l > low) do
- s = @h[l-1][l-1].abs + @h[l][l].abs
- if (s == 0.0)
- s = norm
- end
- if (@h[l][l-1].abs < eps * s)
- break
- end
- l-=1
- end
-
- # Check for convergence
- # One root found
-
- if (l == n)
- @h[n][n] = @h[n][n] + exshift
- @d[n] = @h[n][n]
- @e[n] = 0.0
- n-=1
- iter = 0
-
- # Two roots found
-
- elsif (l == n-1)
- w = @h[n][n-1] * @h[n-1][n]
- p = (@h[n-1][n-1] - @h[n][n]) / 2.0
- q = p * p + w
- z = Math.sqrt(q.abs)
- @h[n][n] = @h[n][n] + exshift
- @h[n-1][n-1] = @h[n-1][n-1] + exshift
- x = @h[n][n]
-
- # Real pair
-
- if (q >= 0)
- if (p >= 0)
- z = p + z
- else
- z = p - z
- end
- @d[n-1] = x + z
- @d[n] = @d[n-1]
- if (z != 0.0)
- @d[n] = x - w / z
- end
- @e[n-1] = 0.0
- @e[n] = 0.0
- x = @h[n][n-1]
- s = x.abs + z.abs
- p = x / s
- q = z / s
- r = Math.sqrt(p * p+q * q)
- p /= r
- q /= r
-
- # Row modification
-
- (n-1).upto(nn-1) do |j|
- z = @h[n-1][j]
- @h[n-1][j] = q * z + p * @h[n][j]
- @h[n][j] = q * @h[n][j] - p * z
- end
-
- # Column modification
-
- 0.upto(n) do |i|
- z = @h[i][n-1]
- @h[i][n-1] = q * z + p * @h[i][n]
- @h[i][n] = q * @h[i][n] - p * z
- end
-
- # Accumulate transformations
-
- low.upto(high) do |i|
- z = @v[i][n-1]
- @v[i][n-1] = q * z + p * @v[i][n]
- @v[i][n] = q * @v[i][n] - p * z
- end
-
- # Complex pair
-
- else
- @d[n-1] = x + p
- @d[n] = x + p
- @e[n-1] = z
- @e[n] = -z
- end
- n -= 2
- iter = 0
-
- # No convergence yet
-
- else
-
- # Form shift
-
- x = @h[n][n]
- y = 0.0
- w = 0.0
- if (l < n)
- y = @h[n-1][n-1]
- w = @h[n][n-1] * @h[n-1][n]
- end
-
- # Wilkinson's original ad hoc shift
-
- if (iter == 10)
- exshift += x
- low.upto(n) do |i|
- @h[i][i] -= x
- end
- s = @h[n][n-1].abs + @h[n-1][n-2].abs
- x = y = 0.75 * s
- w = -0.4375 * s * s
- end
-
- # MATLAB's new ad hoc shift
-
- if (iter == 30)
- s = (y - x) / 2.0
- s *= s + w
- if (s > 0)
- s = Math.sqrt(s)
- if (y < x)
- s = -s
- end
- s = x - w / ((y - x) / 2.0 + s)
- low.upto(n) do |i|
- @h[i][i] -= s
- end
- exshift += s
- x = y = w = 0.964
- end
- end
-
- iter = iter + 1 # (Could check iteration count here.)
-
- # Look for two consecutive small sub-diagonal elements
-
- m = n-2
- while (m >= l) do
- z = @h[m][m]
- r = x - z
- s = y - z
- p = (r * s - w) / @h[m+1][m] + @h[m][m+1]
- q = @h[m+1][m+1] - z - r - s
- r = @h[m+2][m+1]
- s = p.abs + q.abs + r.abs
- p /= s
- q /= s
- r /= s
- if (m == l)
- break
- end
- if (@h[m][m-1].abs * (q.abs + r.abs) <
- eps * (p.abs * (@h[m-1][m-1].abs + z.abs +
- @h[m+1][m+1].abs)))
- break
- end
- m-=1
- end
-
- (m+2).upto(n) do |i|
- @h[i][i-2] = 0.0
- if (i > m+2)
- @h[i][i-3] = 0.0
- end
- end
-
- # Double QR step involving rows l:n and columns m:n
-
- m.upto(n-1) do |k|
- notlast = (k != n-1)
- if (k != m)
- p = @h[k][k-1]
- q = @h[k+1][k-1]
- r = (notlast ? @h[k+2][k-1] : 0.0)
- x = p.abs + q.abs + r.abs
- next if x == 0
- p /= x
- q /= x
- r /= x
- end
- s = Math.sqrt(p * p + q * q + r * r)
- if (p < 0)
- s = -s
- end
- if (s != 0)
- if (k != m)
- @h[k][k-1] = -s * x
- elsif (l != m)
- @h[k][k-1] = -@h[k][k-1]
- end
- p += s
- x = p / s
- y = q / s
- z = r / s
- q /= p
- r /= p
-
- # Row modification
-
- k.upto(nn-1) do |j|
- p = @h[k][j] + q * @h[k+1][j]
- if (notlast)
- p += r * @h[k+2][j]
- @h[k+2][j] = @h[k+2][j] - p * z
- end
- @h[k][j] = @h[k][j] - p * x
- @h[k+1][j] = @h[k+1][j] - p * y
- end
-
- # Column modification
-
- 0.upto([n, k+3].min) do |i|
- p = x * @h[i][k] + y * @h[i][k+1]
- if (notlast)
- p += z * @h[i][k+2]
- @h[i][k+2] = @h[i][k+2] - p * r
- end
- @h[i][k] = @h[i][k] - p
- @h[i][k+1] = @h[i][k+1] - p * q
- end
-
- # Accumulate transformations
-
- low.upto(high) do |i|
- p = x * @v[i][k] + y * @v[i][k+1]
- if (notlast)
- p += z * @v[i][k+2]
- @v[i][k+2] = @v[i][k+2] - p * r
- end
- @v[i][k] = @v[i][k] - p
- @v[i][k+1] = @v[i][k+1] - p * q
- end
- end # (s != 0)
- end # k loop
- end # check convergence
- end # while (n >= low)
-
- # Backsubstitute to find vectors of upper triangular form
-
- if (norm == 0.0)
- return
- end
-
- (nn-1).downto(0) do |k|
- p = @d[k]
- q = @e[k]
-
- # Real vector
-
- if (q == 0)
- l = k
- @h[k][k] = 1.0
- (k-1).downto(0) do |i|
- w = @h[i][i] - p
- r = 0.0
- l.upto(k) do |j|
- r += @h[i][j] * @h[j][k]
- end
- if (@e[i] < 0.0)
- z = w
- s = r
- else
- l = i
- if (@e[i] == 0.0)
- if (w != 0.0)
- @h[i][k] = -r / w
- else
- @h[i][k] = -r / (eps * norm)
- end
-
- # Solve real equations
-
- else
- x = @h[i][i+1]
- y = @h[i+1][i]
- q = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i]
- t = (x * s - z * r) / q
- @h[i][k] = t
- if (x.abs > z.abs)
- @h[i+1][k] = (-r - w * t) / x
- else
- @h[i+1][k] = (-s - y * t) / z
- end
- end
-
- # Overflow control
-
- t = @h[i][k].abs
- if ((eps * t) * t > 1)
- i.upto(k) do |j|
- @h[j][k] = @h[j][k] / t
- end
- end
- end
- end
-
- # Complex vector
-
- elsif (q < 0)
- l = n-1
-
- # Last vector component imaginary so matrix is triangular
-
- if (@h[n][n-1].abs > @h[n-1][n].abs)
- @h[n-1][n-1] = q / @h[n][n-1]
- @h[n-1][n] = -(@h[n][n] - p) / @h[n][n-1]
- else
- cdivr, cdivi = cdiv(0.0, -@h[n-1][n], @h[n-1][n-1]-p, q)
- @h[n-1][n-1] = cdivr
- @h[n-1][n] = cdivi
- end
- @h[n][n-1] = 0.0
- @h[n][n] = 1.0
- (n-2).downto(0) do |i|
- ra = 0.0
- sa = 0.0
- l.upto(n) do |j|
- ra = ra + @h[i][j] * @h[j][n-1]
- sa = sa + @h[i][j] * @h[j][n]
- end
- w = @h[i][i] - p
-
- if (@e[i] < 0.0)
- z = w
- r = ra
- s = sa
- else
- l = i
- if (@e[i] == 0)
- cdivr, cdivi = cdiv(-ra, -sa, w, q)
- @h[i][n-1] = cdivr
- @h[i][n] = cdivi
- else
-
- # Solve complex equations
-
- x = @h[i][i+1]
- y = @h[i+1][i]
- vr = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i] - q * q
- vi = (@d[i] - p) * 2.0 * q
- if (vr == 0.0 && vi == 0.0)
- vr = eps * norm * (w.abs + q.abs +
- x.abs + y.abs + z.abs)
- end
- cdivr, cdivi = cdiv(x*r-z*ra+q*sa, x*s-z*sa-q*ra, vr, vi)
- @h[i][n-1] = cdivr
- @h[i][n] = cdivi
- if (x.abs > (z.abs + q.abs))
- @h[i+1][n-1] = (-ra - w * @h[i][n-1] + q * @h[i][n]) / x
- @h[i+1][n] = (-sa - w * @h[i][n] - q * @h[i][n-1]) / x
- else
- cdivr, cdivi = cdiv(-r-y*@h[i][n-1], -s-y*@h[i][n], z, q)
- @h[i+1][n-1] = cdivr
- @h[i+1][n] = cdivi
- end
- end
-
- # Overflow control
-
- t = [@h[i][n-1].abs, @h[i][n].abs].max
- if ((eps * t) * t > 1)
- i.upto(n) do |j|
- @h[j][n-1] = @h[j][n-1] / t
- @h[j][n] = @h[j][n] / t
- end
- end
- end
- end
- end
- end
-
- # Vectors of isolated roots
-
- nn.times do |i|
- if (i < low || i > high)
- i.upto(nn-1) do |j|
- @v[i][j] = @h[i][j]
- end
- end
- end
-
- # Back transformation to get eigenvectors of original matrix
-
- (nn-1).downto(low) do |j|
- low.upto(high) do |i|
- z = 0.0
- low.upto([j, high].min) do |k|
- z += @v[i][k] * @h[k][j]
- end
- @v[i][j] = z
- end
- end
- end
-
- end
-end
diff --git a/lib/matrix/lup_decomposition.rb b/lib/matrix/lup_decomposition.rb
deleted file mode 100644
index e37def75f6..0000000000
--- a/lib/matrix/lup_decomposition.rb
+++ /dev/null
@@ -1,219 +0,0 @@
-# frozen_string_literal: false
-class Matrix
- # Adapted from JAMA: http://math.nist.gov/javanumerics/jama/
-
- #
- # For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
- # unit lower triangular matrix L, an n-by-n upper triangular matrix U,
- # and a m-by-m permutation matrix P so that L*U = P*A.
- # If m < n, then L is m-by-m and U is m-by-n.
- #
- # The LUP decomposition with pivoting always exists, even if the matrix is
- # singular, so the constructor will never fail. The primary use of the
- # LU decomposition is in the solution of square systems of simultaneous
- # linear equations. This will fail if singular? returns true.
- #
-
- class LUPDecomposition
- # Returns the lower triangular factor +L+
-
- include Matrix::ConversionHelper
-
- def l
- Matrix.build(@row_count, [@column_count, @row_count].min) do |i, j|
- if (i > j)
- @lu[i][j]
- elsif (i == j)
- 1
- else
- 0
- end
- end
- end
-
- # Returns the upper triangular factor +U+
-
- def u
- Matrix.build([@column_count, @row_count].min, @column_count) do |i, j|
- if (i <= j)
- @lu[i][j]
- else
- 0
- end
- end
- end
-
- # Returns the permutation matrix +P+
-
- def p
- rows = Array.new(@row_count){Array.new(@row_count, 0)}
- @pivots.each_with_index{|p, i| rows[i][p] = 1}
- Matrix.send :new, rows, @row_count
- end
-
- # Returns +L+, +U+, +P+ in an array
-
- def to_ary
- [l, u, p]
- end
- alias_method :to_a, :to_ary
-
- # Returns the pivoting indices
-
- attr_reader :pivots
-
- # Returns +true+ if +U+, and hence +A+, is singular.
-
- def singular?
- @column_count.times do |j|
- if (@lu[j][j] == 0)
- return true
- end
- end
- false
- end
-
- # Returns the determinant of +A+, calculated efficiently
- # from the factorization.
-
- def det
- if (@row_count != @column_count)
- raise Matrix::ErrDimensionMismatch
- end
- d = @pivot_sign
- @column_count.times do |j|
- d *= @lu[j][j]
- end
- d
- end
- alias_method :determinant, :det
-
- # Returns +m+ so that <tt>A*m = b</tt>,
- # or equivalently so that <tt>L*U*m = P*b</tt>
- # +b+ can be a Matrix or a Vector
-
- def solve b
- if (singular?)
- raise Matrix::ErrNotRegular, "Matrix is singular."
- end
- if b.is_a? Matrix
- if (b.row_count != @row_count)
- raise Matrix::ErrDimensionMismatch
- end
-
- # Copy right hand side with pivoting
- nx = b.column_count
- m = @pivots.map{|row| b.row(row).to_a}
-
- # Solve L*Y = P*b
- @column_count.times do |k|
- (k+1).upto(@column_count-1) do |i|
- nx.times do |j|
- m[i][j] -= m[k][j]*@lu[i][k]
- end
- end
- end
- # Solve U*m = Y
- (@column_count-1).downto(0) do |k|
- nx.times do |j|
- m[k][j] = m[k][j].quo(@lu[k][k])
- end
- k.times do |i|
- nx.times do |j|
- m[i][j] -= m[k][j]*@lu[i][k]
- end
- end
- end
- Matrix.send :new, m, nx
- else # same algorithm, specialized for simpler case of a vector
- b = convert_to_array(b)
- if (b.size != @row_count)
- raise Matrix::ErrDimensionMismatch
- end
-
- # Copy right hand side with pivoting
- m = b.values_at(*@pivots)
-
- # Solve L*Y = P*b
- @column_count.times do |k|
- (k+1).upto(@column_count-1) do |i|
- m[i] -= m[k]*@lu[i][k]
- end
- end
- # Solve U*m = Y
- (@column_count-1).downto(0) do |k|
- m[k] = m[k].quo(@lu[k][k])
- k.times do |i|
- m[i] -= m[k]*@lu[i][k]
- end
- end
- Vector.elements(m, false)
- end
- end
-
- def initialize a
- raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix)
- # Use a "left-looking", dot-product, Crout/Doolittle algorithm.
- @lu = a.to_a
- @row_count = a.row_count
- @column_count = a.column_count
- @pivots = Array.new(@row_count)
- @row_count.times do |i|
- @pivots[i] = i
- end
- @pivot_sign = 1
- lu_col_j = Array.new(@row_count)
-
- # Outer loop.
-
- @column_count.times do |j|
-
- # Make a copy of the j-th column to localize references.
-
- @row_count.times do |i|
- lu_col_j[i] = @lu[i][j]
- end
-
- # Apply previous transformations.
-
- @row_count.times do |i|
- lu_row_i = @lu[i]
-
- # Most of the time is spent in the following dot product.
-
- kmax = [i, j].min
- s = 0
- kmax.times do |k|
- s += lu_row_i[k]*lu_col_j[k]
- end
-
- lu_row_i[j] = lu_col_j[i] -= s
- end
-
- # Find pivot and exchange if necessary.
-
- p = j
- (j+1).upto(@row_count-1) do |i|
- if (lu_col_j[i].abs > lu_col_j[p].abs)
- p = i
- end
- end
- if (p != j)
- @column_count.times do |k|
- t = @lu[p][k]; @lu[p][k] = @lu[j][k]; @lu[j][k] = t
- end
- k = @pivots[p]; @pivots[p] = @pivots[j]; @pivots[j] = k
- @pivot_sign = -@pivot_sign
- end
-
- # Compute multipliers.
-
- if (j < @row_count && @lu[j][j] != 0)
- (j+1).upto(@row_count-1) do |i|
- @lu[i][j] = @lu[i][j].quo(@lu[j][j])
- end
- end
- end
- end
- end
-end
diff --git a/lib/matrix/matrix.gemspec b/lib/matrix/matrix.gemspec
deleted file mode 100644
index 75f6b69a98..0000000000
--- a/lib/matrix/matrix.gemspec
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-begin
- require_relative "lib/matrix/version"
-rescue LoadError
- # for Ruby core repository
- require_relative "version"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "matrix"
- spec.version = Matrix::VERSION
- spec.authors = ["Marc-Andre Lafortune"]
- spec.email = ["ruby-core@marc-andre.ca"]
-
- spec.summary = %q{An implementation of Matrix and Vector classes.}
- spec.description = %q{An implementation of Matrix and Vector classes.}
- spec.homepage = "https://github.com/ruby/matrix"
- spec.license = "BSD-2-Clause"
-
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/matrix.rb", "lib/matrix/eigenvalue_decomposition.rb", "lib/matrix/lup_decomposition.rb", "lib/matrix/version.rb", "matrix.gemspec"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
-end
diff --git a/lib/matrix/version.rb b/lib/matrix/version.rb
deleted file mode 100644
index e6f91dae3c..0000000000
--- a/lib/matrix/version.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: true
-
-class Matrix
- VERSION = "0.2.0"
-end
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index eabccd48eb..0fbc1cc2e5 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -7,9 +7,7 @@ require 'rbconfig'
require 'fileutils'
require 'shellwords'
-class String
- # :stopdoc:
-
+class String # :nodoc:
# Wraps a string in escaped quotes if it contains whitespace.
def quote
/\s/ =~ self ? "\"#{self}\"" : "#{self}"
@@ -32,19 +30,13 @@ class String
def sans_arguments
self[/\A[^()]+/]
end
-
- # :startdoc:
end
-class Array
- # :stopdoc:
-
+class Array # :nodoc:
# Wraps all strings in escaped quotes if they contain whitespace.
def quote
map {|s| s.quote}
end
-
- # :startdoc:
end
##
@@ -75,7 +67,7 @@ module MakeMakefile
C_EXT = %w[c m]
##
- # Extensions for files complied with a C++ compiler
+ # Extensions for files compiled with a C++ compiler
CXX_EXT = %w[cc mm cxx cpp]
unless File.exist?(File.join(*File.split(__FILE__).tap {|d, b| b.swapcase}))
@@ -207,8 +199,8 @@ module MakeMakefile
['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'],
['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'],
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['HDRDIR', '$(vendorhdrdir)$(target_prefix)'],
+ ['ARCHHDRDIR', '$(vendorarchhdrdir)$(target_prefix)'],
]
else
dirs = [
@@ -216,8 +208,8 @@ module MakeMakefile
['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['HDRDIR', '$(sitehdrdir)$(target_prefix)'],
+ ['ARCHHDRDIR', '$(sitearchhdrdir)$(target_prefix)'],
]
end
dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
@@ -284,7 +276,8 @@ MESSAGE
end
def split_libs(*strs)
- strs.map {|s| s.split(/\s+(?=-|\z)/)}.flatten
+ sep = $mswin ? /\s+/ : /\s+(?=-|\z)/
+ strs.flat_map {|s| s.lstrip.split(sep)}
end
def merge_libs(*libs)
@@ -385,38 +378,64 @@ MESSAGE
end
end
- def xsystem command, opts = nil
+ def expand_command(commands, envs = libpath_env)
varpat = /\$\((\w+)\)|\$\{(\w+)\}/
- if varpat =~ command
- vars = Hash.new {|h, k| h[k] = ENV[k]}
- command = command.dup
- nil while command.gsub!(varpat) {vars[$1||$2]}
+ vars = nil
+ expand = proc do |command|
+ case command
+ when Array
+ command.map(&expand)
+ when String
+ if varpat =~ command
+ vars ||= Hash.new {|h, k| h[k] = ENV[k]}
+ command = command.dup
+ nil while command.gsub!(varpat) {vars[$1||$2]}
+ end
+ command
+ else
+ command
+ end
+ end
+ if Array === commands
+ env, *commands = commands if Hash === commands.first
+ envs.merge!(env) if env
end
+ return envs, expand[commands]
+ end
+
+ def env_quote(envs)
+ envs.map {|e, v| "#{e}=#{v.quote}"}
+ end
+
+ def xsystem command, opts = nil
+ env, command = expand_command(command)
Logging::open do
- puts command.quote
+ puts [env_quote(env), command.quote].join(' ')
if opts and opts[:werror]
result = nil
Logging.postpone do |log|
- output = IO.popen(libpath_env, command, &:read)
+ output = IO.popen(env, command, &:read)
result = ($?.success? and File.zero?(log.path))
output
end
result
else
- system(libpath_env, command)
+ system(env, *command)
end
end
end
def xpopen command, *mode, &block
+ env, commands = expand_command(command)
+ command = [env_quote(env), command].join(' ')
Logging::open do
case mode[0]
- when nil, /^r/
+ when nil, Hash, /^r/
puts "#{command} |"
else
puts "| #{command}"
end
- IO.popen(libpath_env, command, *mode, &block)
+ IO.popen(env, commands, *mode, &block)
end
end
@@ -446,7 +465,7 @@ EOM
src.sub!(/[^\n]\z/, "\\&\n")
count = 0
begin
- open(conftest_source, "wb") do |cfile|
+ File.open(conftest_source, "wb") do |cfile|
cfile.print src
end
rescue Errno::EACCES
@@ -616,7 +635,7 @@ MSG
MakeMakefile.rm_f "#{CONFTEST}*"
end
- alias_method :try_header, (config_string('try_header') || :try_cpp)
+ alias try_header try_compile
def cpp_include(header)
if header
@@ -661,16 +680,6 @@ MSG
try_compile(MAIN_DOES_NOTHING, flags, {:werror => true}.update(opts))
end
- def append_cflags(flags, *opts)
- Array(flags).each do |flag|
- if checking_for("whether #{flag} is accepted as CFLAGS") {
- try_cflags(flag, *opts)
- }
- $CFLAGS << " " << flag
- end
- end
- end
-
def with_ldflags(flags)
ldflags = $LDFLAGS
$LDFLAGS = flags.dup
@@ -770,11 +779,20 @@ int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const
# files.
def try_func(func, libs, headers = nil, opt = "", &b)
headers = cpp_include(headers)
+ prepare = String.new
case func
when /^&/
decltype = proc {|x|"const volatile void *#{x}"}
when /\)$/
- call = func
+ strvars = []
+ call = func.gsub(/""/) {
+ v = "s#{strvars.size + 1}"
+ strvars << v
+ v
+ }
+ unless strvars.empty?
+ prepare << "char " << strvars.map {|v| "#{v}[1024]"}.join(", ") << "; "
+ end
when nil
call = ""
else
@@ -784,7 +802,7 @@ int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const
if opt and !opt.empty?
[[:to_str], [:join, " "], [:to_s]].each do |meth, *args|
if opt.respond_to?(meth)
- break opt = opt.send(meth, *args)
+ break opt = opt.__send__(meth, *args)
end
end
opt = "#{opt} #{libs}"
@@ -804,7 +822,7 @@ SRC
extern int t(void);
#{MAIN_DOES_NOTHING 't'}
#{"extern void #{call};" if decltype}
-int t(void) { #{call}; return 0; }
+int t(void) { #{prepare}#{call}; return 0; }
SRC
end
@@ -982,7 +1000,7 @@ SRC
if noun
[[:to_str], [:join, ","], [:to_s]].each do |meth, *args|
if noun.respond_to?(meth)
- break noun = noun.send(meth, *args)
+ break noun = noun.__send__(meth, *args)
end
end
unless noun.empty?
@@ -996,6 +1014,21 @@ SRC
# :startdoc:
+ # Check whether each given C compiler flag is acceptable and append it
+ # to <tt>$CFLAGS</tt> if so.
+ #
+ # [+flags+] a C compiler flag as a +String+ or an +Array+ of them
+ #
+ def append_cflags(flags, *opts)
+ Array(flags).each do |flag|
+ if checking_for("whether #{flag} is accepted as CFLAGS") {
+ try_cflags(flag, *opts)
+ }
+ $CFLAGS << " " << flag
+ end
+ end
+ end
+
# Returns whether or not +macro+ is defined either in the common header
# files or within any +headers+ you provide.
#
@@ -1047,7 +1080,7 @@ SRC
def find_library(lib, func, *paths, &b)
dir_config(lib)
lib = with_config(lib+'lib', lib)
- paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten
+ paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
checking_for checking_message(func && func.funcall_style, LIBARG%lib) do
libpath = $LIBPATH
libs = append_library($libs, lib)
@@ -1323,8 +1356,10 @@ SRC
# :stopdoc:
STRING_OR_FAILED_FORMAT = "%s"
- def STRING_OR_FAILED_FORMAT.%(x) # :nodoc:
- x ? super : "failed"
+ class << STRING_OR_FAILED_FORMAT # :nodoc:
+ def %(x)
+ x ? super : "failed"
+ end
end
def typedef_expr(type, headers)
@@ -1727,8 +1762,8 @@ SRC
hdr << "#endif\n"
hdr = hdr.join("")
log_src(hdr, "#{header} is")
- unless (IO.read(header) == hdr rescue false)
- open(header, "wb") do |hfile|
+ unless (File.read(header) == hdr rescue false)
+ File.open(header, "wb") do |hfile|
hfile.write(hdr)
end
end
@@ -1800,54 +1835,59 @@ SRC
$config_dirs[target] = [idir, ldir]
end
- # Returns compile/link information about an installed library in a
- # tuple of <code>[cflags, ldflags, libs]</code>, by using the
- # command found first in the following commands:
+ # Returns compile/link information about an installed library in a tuple of <code>[cflags,
+ # ldflags, libs]</code>, by using the command found first in the following commands:
#
# 1. If <code>--with-{pkg}-config={command}</code> is given via
- # command line option: <code>{command} {option}</code>
+ # command line option: <code>{command} {options}</code>
#
- # 2. <code>{pkg}-config {option}</code>
+ # 2. <code>{pkg}-config {options}</code>
#
- # 3. <code>pkg-config {option} {pkg}</code>
+ # 3. <code>pkg-config {options} {pkg}</code>
#
- # Where {option} is, for instance, <code>--cflags</code>.
+ # Where +options+ is the option name without dashes, for instance <code>"cflags"</code> for the
+ # <code>--cflags</code> flag.
#
- # The values obtained are appended to +$INCFLAGS+, +$CFLAGS+, +$LDFLAGS+ and
- # +$libs+.
+ # The values obtained are appended to <code>$INCFLAGS</code>, <code>$CFLAGS</code>,
+ # <code>$LDFLAGS</code> and <code>$libs</code>.
#
- # If an <code>option</code> argument is given, the config command is
- # invoked with the option and a stripped output string is returned
- # without modifying any of the global values mentioned above.
- def pkg_config(pkg, option=nil)
+ # If one or more <code>options</code> argument is given, the config command is
+ # invoked with the options and a stripped output string is returned without
+ # modifying any of the global values mentioned above.
+ def pkg_config(pkg, *options)
+ _, ldir = dir_config(pkg)
+ if ldir
+ pkg_config_path = "#{ldir}/pkgconfig"
+ if File.directory?(pkg_config_path)
+ Logging.message("PKG_CONFIG_PATH = %s\n", pkg_config_path)
+ envs = ["PKG_CONFIG_PATH"=>[pkg_config_path, ENV["PKG_CONFIG_PATH"]].compact.join(File::PATH_SEPARATOR)]
+ end
+ end
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
- # iff package specific config command is given
+ # if and only if package specific config command is given
elsif ($PKGCONFIG ||=
- (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
+ (pkgconfig = with_config("pkg-config") {config_string("PKG_CONFIG") || "pkg-config"}) &&
find_executable0(pkgconfig) && pkgconfig) and
- xsystem("#{$PKGCONFIG} --exists #{pkg}")
+ xsystem([*envs, $PKGCONFIG, "--exists", pkg])
# default to pkg-config command
pkgconfig = $PKGCONFIG
- get = proc {|opt|
- opt = xpopen("#{$PKGCONFIG} --#{opt} #{pkg}", err:[:child, :out], &:read)
- Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}}
- opt.strip if $?.success?
- }
+ args = [pkg]
elsif find_executable0(pkgconfig = "#{pkg}-config")
# default to package specific config command, as a last resort.
else
pkgconfig = nil
end
if pkgconfig
- get ||= proc {|opt|
- opt = xpopen("#{pkgconfig} --#{opt}", err:[:child, :out], &:read)
- Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}}
- opt.strip if $?.success?
+ get = proc {|opts|
+ opts = Array(opts).map { |o| "--#{o}" }
+ opts = xpopen([*envs, pkgconfig, *opts, *args], err:[:child, :out], &:read)
+ Logging.open {puts opts.each_line.map{|s|"=> #{s.inspect}"}}
+ opts.strip if $?.success?
}
end
orig_ldflags = $LDFLAGS
- if get and option
- get[option]
+ if get and !options.empty?
+ get[options]
elsif get and try_ldflags(ldflags = get['libs'])
if incflags = get['cflags-only-I']
$INCFLAGS << " " << incflags
@@ -1908,7 +1948,7 @@ SRC
path.sub!(/\A([A-Za-z]):(?=\/)/, '/\1')
path
end
- when 'cygwin'
+ when 'cygwin', 'msys'
if CONFIG['target_os'] != 'cygwin'
def mkintpath(path)
IO.popen(["cygpath", "-u", path], &:read).chomp
@@ -1924,13 +1964,15 @@ SRC
def configuration(srcdir)
mk = []
+ CONFIG['MKMF_VERBOSE'] ||= "0"
vpath = $VPATH.dup
CONFIG["hdrdir"] ||= $hdrdir
mk << %{
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
-V = 0
+V = #{CONFIG['MKMF_VERBOSE']}
+V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']})
@@ -1942,7 +1984,7 @@ NULLCMD = #{CONFIG['NULLCMD']}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}}
topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace}
hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace}
-arch_hdrdir = #{$arch_hdrdir.quote}
+arch_hdrdir = #{mkintpath($arch_hdrdir).unspace}
PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
@@ -1970,7 +2012,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
else
sep = ""
end
- possible_command = (proc {|s| s if /top_srcdir/ !~ s} unless $extmk)
+ possible_command = (proc {|s| s if /top_srcdir|tooldir/ !~ s} unless $extmk)
extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " "
headers = %w[
$(hdrdir)/ruby.h
@@ -2034,10 +2076,15 @@ sitearch = #{CONFIG['sitearch']}
ruby_version = #{RbConfig::CONFIG['ruby_version']}
ruby = #{$ruby.sub(%r[\A#{Regexp.quote(RbConfig::CONFIG['bindir'])}(?=/|\z)]) {'$(bindir)'}}
RUBY = $(ruby#{sep})
+BUILTRUBY = #{if defined?($builtruby) && $builtruby
+ $builtruby
+ else
+ File.join('$(bindir)', CONFIG["RUBY_INSTALL_NAME"] + CONFIG['EXEEXT'])
+ end}
ruby_headers = #{headers.join(' ')}
RM = #{config_string('RM', &possible_command) || '$(RUBY) -run -e rm -- -f'}
-RM_RF = #{'$(RUBY) -run -e rm -- -rf'}
+RM_RF = #{config_string('RMALL', &possible_command) || '$(RUBY) -run -e rm -- -rf'}
RMDIRS = #{config_string('RMDIRS', &possible_command) || '$(RUBY) -run -e rmdir -- -p'}
MAKEDIRS = #{config_string('MAKEDIRS', &possible_command) || '@$(RUBY) -run -e mkdir -- -p'}
INSTALL = #{config_string('INSTALL', &possible_command) || '@$(RUBY) -run -e install -- -vp'}
@@ -2068,7 +2115,7 @@ preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''}
end
# :startdoc:
- # creates a stub Makefile.
+ # Creates a stub Makefile.
#
def dummy_makefile(srcdir)
configuration(srcdir) << <<RULES << CLEANINGS
@@ -2222,7 +2269,7 @@ RULES
message "creating Makefile\n"
MakeMakefile.rm_f "#{CONFTEST}*"
if CONFIG["DLEXT"] == $OBJEXT
- for lib in libs = $libs.split
+ for lib in libs = $libs.split(' ')
lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
end
$defs.push(format("-DEXTLIB='%s'", libs.join(",")))
@@ -2239,7 +2286,7 @@ RULES
RbConfig.expand(srcdir = srcprefix.dup)
ext = ".#{$OBJEXT}"
- orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].sort
+ orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
if not $objs
srcs = $srcs || orig_srcs
$objs = []
@@ -2249,7 +2296,7 @@ RULES
h
}
unless objs.delete_if {|b, f| f.size == 1}.empty?
- dups = objs.sort.map {|b, f|
+ dups = objs.map {|b, f|
"#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}"
}
abort "source files duplication - #{dups.join(", ")}"
@@ -2331,15 +2378,23 @@ TIMESTAMP_DIR = #{$extout && $extmk ? '$(extout)/.timestamp' : '.'}
install_dirs.each {|d| conf << ("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)'
n = '$(TARGET_SO_DIR)$(TARGET)'
+ cleanobjs = ["$(OBJS)"]
+ if $extmk
+ %w[bc i s].each {|ex| cleanobjs << "$(OBJS:.#{$OBJEXT}=.#{ex})"}
+ end
+ if target
+ config_string('cleanobjs') {|t| cleanobjs << t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")}
+ end
conf << "\
TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''}
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
CLEANLIBS = #{'$(TARGET_SO) ' if target}#{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}}
-CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak
+CLEANOBJS = #{cleanobjs.join(' ')} *.bak
+TARGET_SO_DIR_TIMESTAMP = #{timestamp_file(sodir, target_prefix)}
" #"
conf = yield(conf) if block_given?
- mfile = open("Makefile", "wb")
+ mfile = File.open("Makefile", "wb")
mfile.puts(conf)
mfile.print "
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
@@ -2369,7 +2424,7 @@ static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{$extout ? " install-rb" :
if target
f = "$(DLLIB)"
dest = "$(TARGET_SO)"
- stamp = timestamp_file(dir, target_prefix)
+ stamp = '$(TARGET_SO_DIR_TIMESTAMP)'
if $extout
mfile.puts dest
mfile.print "clean-so::\n"
@@ -2438,7 +2493,9 @@ static: #{$extmk && !$static ? "all" : "$(STATIC_LIB)#{$extout ? " install-rb" :
end
end
end
- dirs.unshift(sodir) if target and !dirs.include?(sodir)
+ if target and !dirs.include?(sodir)
+ mfile.print "$(TARGET_SO_DIR_TIMESTAMP):\n\t$(Q) $(MAKEDIRS) $(@D) #{sodir}\n\t$(Q) $(TOUCH) $@\n"
+ end
dirs.each do |d|
t = timestamp_file(d, target_prefix)
mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n"
@@ -2482,7 +2539,7 @@ site-install-rb: install-rb
mfile.print "$(TARGET_SO): "
mfile.print "$(DEFFILE) " if makedef
mfile.print "$(OBJS) Makefile"
- mfile.print " #{timestamp_file(sodir, target_prefix)}" if $extout
+ mfile.print " $(TARGET_SO_DIR_TIMESTAMP)" if $extout
mfile.print "\n"
mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"
@@ -2496,7 +2553,7 @@ site-install-rb: install-rb
mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) "
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
config_string('RANLIB') do |ranlib|
- mfile.print "\n\t-$(Q)#{ranlib} $(@) 2> /dev/null || true"
+ mfile.print "\n\t-$(Q)#{ranlib} $(@)#{$ignore_error}"
end
end
mfile.print "\n\n"
@@ -2530,7 +2587,7 @@ site-install-rb: install-rb
if $warnflags = CONFIG['warnflags'] and CONFIG['GCC'] == 'yes'
# turn warnings into errors only for bundled extensions.
- config['warnflags'] = $warnflags.gsub(/(\A|\s)-Werror[-=]/, '\1-W')
+ config['warnflags'] = $warnflags.gsub(/(?:\A|\s)-W\Kerror[-=](?!implicit-function-declaration)/, '')
if /icc\z/ =~ config['CC']
config['warnflags'].gsub!(/(\A|\s)-W(?:division-by-zero|deprecated-declarations)/, '\1')
end
@@ -2552,6 +2609,7 @@ site-install-rb: install-rb
$INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk
$INCFLAGS << " -I$(hdrdir) -I$(srcdir)"
$DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
+ config_string("ADDITIONAL_DLDFLAGS") {|flags| $DLDFLAGS << " " << flags} unless $extmk
$LIBEXT = config['LIBEXT'].dup
$OBJEXT = config["OBJEXT"].dup
$EXEEXT = config["EXEEXT"].dup
@@ -2762,14 +2820,14 @@ clean-rb-default::
clean-rb::
clean-so::
clean: clean-so clean-static clean-rb-default clean-rb
-\t\t-$(Q)$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep}) .*.time
+\t\t-$(Q)$(RM_RF) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep}) .*.time
distclean-rb-default::
distclean-rb::
distclean-so::
distclean-static::
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-\t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) #{CONFTEST}.* mkmf.log
+\t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) #{CONFTEST}.* mkmf.log#{' exts.mk' if $extmk}
\t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
\t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})#{$ignore_error}
@@ -2822,7 +2880,12 @@ realclean: distclean
end
end
-include MakeMakefile
+# MakeMakefile::Global = #
+m = Module.new {
+ include(MakeMakefile)
+ private(*MakeMakefile.public_instance_methods(false))
+}
+include m
if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0)
END {mkmf_failed($0)}
diff --git a/lib/mutex_m.gemspec b/lib/mutex_m.gemspec
index 409ed5b7b2..f614dcd9a0 100644
--- a/lib/mutex_m.gemspec
+++ b/lib/mutex_m.gemspec
@@ -14,9 +14,9 @@ Gem::Specification.new do |spec|
spec.summary = %q{Mixin to extend objects to be handled like a Mutex.}
spec.description = %q{Mixin to extend objects to be handled like a Mutex.}
spec.homepage = "https://github.com/ruby/mutex_m"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/mutex_m.rb", "mutex_m.gemspec"]
+ spec.files = ["Gemfile", "LICENSE.txt", "README.md", "Rakefile", "lib/mutex_m.rb", "mutex_m.gemspec"]
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
diff --git a/lib/mutex_m.rb b/lib/mutex_m.rb
index dd47934bea..17ec9924e4 100644
--- a/lib/mutex_m.rb
+++ b/lib/mutex_m.rb
@@ -40,7 +40,8 @@
#
module Mutex_m
- VERSION = "0.1.0"
+ VERSION = "0.1.2"
+ Ractor.make_shareable(VERSION) if defined?(Ractor)
def Mutex_m.define_aliases(cl) # :nodoc:
cl.module_eval %q{
@@ -73,32 +74,32 @@ module Mutex_m
mu_initialize
end
- # See Mutex#synchronize
+ # See Thread::Mutex#synchronize
def mu_synchronize(&block)
@_mutex.synchronize(&block)
end
- # See Mutex#locked?
+ # See Thread::Mutex#locked?
def mu_locked?
@_mutex.locked?
end
- # See Mutex#try_lock
+ # See Thread::Mutex#try_lock
def mu_try_lock
@_mutex.try_lock
end
- # See Mutex#lock
+ # See Thread::Mutex#lock
def mu_lock
@_mutex.lock
end
- # See Mutex#unlock
+ # See Thread::Mutex#unlock
def mu_unlock
@_mutex.unlock
end
- # See Mutex#sleep
+ # See Thread::Mutex#sleep
def sleep(timeout = nil)
@_mutex.sleep(timeout)
end
@@ -113,4 +114,5 @@ module Mutex_m
mu_initialize
super
end
+ ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
end
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
deleted file mode 100644
index d1e545c0c8..0000000000
--- a/lib/net/ftp.rb
+++ /dev/null
@@ -1,1533 +0,0 @@
-# frozen_string_literal: true
-#
-# = net/ftp.rb - FTP Client Library
-#
-# Written by Shugo Maeda <shugo@ruby-lang.org>.
-#
-# Documentation by Gavin Sinclair, sourced from "Programming Ruby" (Hunt/Thomas)
-# and "Ruby In a Nutshell" (Matsumoto), used with permission.
-#
-# This library is distributed under the terms of the Ruby license.
-# You can freely distribute/modify this library.
-#
-# It is included in the Ruby standard library.
-#
-# See the Net::FTP class for an overview.
-#
-
-require "socket"
-require "monitor"
-require_relative "protocol"
-require "time"
-begin
- require "openssl"
-rescue LoadError
-end
-
-module Net
-
- # :stopdoc:
- class FTPError < StandardError; end
- class FTPReplyError < FTPError; end
- class FTPTempError < FTPError; end
- class FTPPermError < FTPError; end
- class FTPProtoError < FTPError; end
- class FTPConnectionError < FTPError; end
- # :startdoc:
-
- #
- # This class implements the File Transfer Protocol. If you have used a
- # command-line FTP program, and are familiar with the commands, you will be
- # able to use this class easily. Some extra features are included to take
- # advantage of Ruby's style and strengths.
- #
- # == Example
- #
- # require 'net/ftp'
- #
- # === Example 1
- #
- # ftp = Net::FTP.new('example.com')
- # ftp.login
- # files = ftp.chdir('pub/lang/ruby/contrib')
- # files = ftp.list('n*')
- # ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024)
- # ftp.close
- #
- # === Example 2
- #
- # Net::FTP.open('example.com') do |ftp|
- # ftp.login
- # files = ftp.chdir('pub/lang/ruby/contrib')
- # files = ftp.list('n*')
- # ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024)
- # end
- #
- # == Major Methods
- #
- # The following are the methods most likely to be useful to users:
- # - FTP.open
- # - #getbinaryfile
- # - #gettextfile
- # - #putbinaryfile
- # - #puttextfile
- # - #chdir
- # - #nlst
- # - #size
- # - #rename
- # - #delete
- #
- class FTP < Protocol
- include MonitorMixin
- if defined?(OpenSSL::SSL)
- include OpenSSL
- include SSL
- end
-
- # :stopdoc:
- FTP_PORT = 21
- CRLF = "\r\n"
- DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
- @@default_passive = true
- # :startdoc:
-
- # When +true+, transfers are performed in binary mode. Default: +true+.
- attr_reader :binary
-
- # When +true+, the connection is in passive mode. Default: +true+.
- attr_accessor :passive
-
- # When +true+, all traffic to and from the server is written
- # to +$stdout+. Default: +false+.
- attr_accessor :debug_mode
-
- # Sets or retrieves the +resume+ status, which decides whether incomplete
- # transfers are resumed or restarted. Default: +false+.
- attr_accessor :resume
-
- # Number of seconds to wait for the connection to open. Any number
- # may be used, including Floats for fractional seconds. If the FTP
- # object cannot open a connection in this many seconds, it raises a
- # Net::OpenTimeout exception. The default value is +nil+.
- attr_accessor :open_timeout
-
- # Number of seconds to wait for the TLS handshake. Any number
- # may be used, including Floats for fractional seconds. If the FTP
- # object cannot complete the TLS handshake in this many seconds, it
- # raises a Net::OpenTimeout exception. The default value is +nil+.
- # If +ssl_handshake_timeout+ is +nil+, +open_timeout+ is used instead.
- attr_accessor :ssl_handshake_timeout
-
- # Number of seconds to wait for one block to be read (via one read(2)
- # call). Any number may be used, including Floats for fractional
- # seconds. If the FTP object cannot read data in this many seconds,
- # it raises a Timeout::Error exception. The default value is 60 seconds.
- attr_reader :read_timeout
-
- # Setter for the read_timeout attribute.
- def read_timeout=(sec)
- @sock.read_timeout = sec
- @read_timeout = sec
- end
-
- # The server's welcome message.
- attr_reader :welcome
-
- # The server's last response code.
- attr_reader :last_response_code
- alias lastresp last_response_code
-
- # The server's last response.
- attr_reader :last_response
-
- # When +true+, connections are in passive mode per default.
- # Default: +true+.
- def self.default_passive=(value)
- @@default_passive = value
- end
-
- # When +true+, connections are in passive mode per default.
- # Default: +true+.
- def self.default_passive
- @@default_passive
- end
-
- #
- # A synonym for <tt>FTP.new</tt>, but with a mandatory host parameter.
- #
- # If a block is given, it is passed the +FTP+ object, which will be closed
- # when the block finishes, or when an exception is raised.
- #
- def FTP.open(host, *args)
- if block_given?
- ftp = new(host, *args)
- begin
- yield ftp
- ensure
- ftp.close
- end
- else
- new(host, *args)
- end
- end
-
- # :call-seq:
- # Net::FTP.new(host = nil, options = {})
- #
- # Creates and returns a new +FTP+ object. If a +host+ is given, a connection
- # is made.
- #
- # +options+ is an option hash, each key of which is a symbol.
- #
- # The available options are:
- #
- # port:: Port number (default value is 21)
- # ssl:: If options[:ssl] is true, then an attempt will be made
- # to use SSL (now TLS) to connect to the server. For this
- # to work OpenSSL [OSSL] and the Ruby OpenSSL [RSSL]
- # extensions need to be installed. If options[:ssl] is a
- # hash, it's passed to OpenSSL::SSL::SSLContext#set_params
- # as parameters.
- # private_data_connection:: If true, TLS is used for data connections.
- # Default: +true+ when options[:ssl] is true.
- # username:: Username for login. If options[:username] is the string
- # "anonymous" and the options[:password] is +nil+,
- # "anonymous@" is used as a password.
- # password:: Password for login.
- # account:: Account information for ACCT.
- # passive:: When +true+, the connection is in passive mode. Default:
- # +true+.
- # open_timeout:: Number of seconds to wait for the connection to open.
- # See Net::FTP#open_timeout for details. Default: +nil+.
- # read_timeout:: Number of seconds to wait for one block to be read.
- # See Net::FTP#read_timeout for details. Default: +60+.
- # ssl_handshake_timeout:: Number of seconds to wait for the TLS
- # handshake.
- # See Net::FTP#ssl_handshake_timeout for
- # details. Default: +nil+.
- # debug_mode:: When +true+, all traffic to and from the server is
- # written to +$stdout+. Default: +false+.
- #
- def initialize(host = nil, user_or_options = {}, passwd = nil, acct = nil)
- super()
- begin
- options = user_or_options.to_hash
- rescue NoMethodError
- # for backward compatibility
- options = {}
- options[:username] = user_or_options
- options[:password] = passwd
- options[:account] = acct
- end
- @host = nil
- if options[:ssl]
- unless defined?(OpenSSL::SSL)
- raise "SSL extension not installed"
- end
- ssl_params = options[:ssl] == true ? {} : options[:ssl]
- @ssl_context = SSLContext.new
- @ssl_context.set_params(ssl_params)
- if defined?(VerifyCallbackProc)
- @ssl_context.verify_callback = VerifyCallbackProc
- end
- @ssl_context.session_cache_mode =
- OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
- OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
- @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
- @ssl_session = nil
- if options[:private_data_connection].nil?
- @private_data_connection = true
- else
- @private_data_connection = options[:private_data_connection]
- end
- else
- @ssl_context = nil
- if options[:private_data_connection]
- raise ArgumentError,
- "private_data_connection can be set to true only when ssl is enabled"
- end
- @private_data_connection = false
- end
- @binary = true
- if options[:passive].nil?
- @passive = @@default_passive
- else
- @passive = options[:passive]
- end
- if options[:debug_mode].nil?
- @debug_mode = false
- else
- @debug_mode = options[:debug_mode]
- end
- @resume = false
- @bare_sock = @sock = NullSocket.new
- @logged_in = false
- @open_timeout = options[:open_timeout]
- @ssl_handshake_timeout = options[:ssl_handshake_timeout]
- @read_timeout = options[:read_timeout] || 60
- if host
- connect(host, options[:port] || FTP_PORT)
- if options[:username]
- login(options[:username], options[:password], options[:account])
- end
- end
- end
-
- # A setter to toggle transfers in binary mode.
- # +newmode+ is either +true+ or +false+
- def binary=(newmode)
- if newmode != @binary
- @binary = newmode
- send_type_command if @logged_in
- end
- end
-
- # Sends a command to destination host, with the current binary sendmode
- # type.
- #
- # If binary mode is +true+, then "TYPE I" (image) is sent, otherwise "TYPE
- # A" (ascii) is sent.
- def send_type_command # :nodoc:
- if @binary
- voidcmd("TYPE I")
- else
- voidcmd("TYPE A")
- end
- end
- private :send_type_command
-
- # Toggles transfers in binary mode and yields to a block.
- # This preserves your current binary send mode, but allows a temporary
- # transaction with binary sendmode of +newmode+.
- #
- # +newmode+ is either +true+ or +false+
- def with_binary(newmode) # :nodoc:
- oldmode = binary
- self.binary = newmode
- begin
- yield
- ensure
- self.binary = oldmode
- end
- end
- private :with_binary
-
- # Obsolete
- def return_code # :nodoc:
- warn("Net::FTP#return_code is obsolete and do nothing", uplevel: 1)
- return "\n"
- end
-
- # Obsolete
- def return_code=(s) # :nodoc:
- warn("Net::FTP#return_code= is obsolete and do nothing", uplevel: 1)
- end
-
- # Constructs a socket with +host+ and +port+.
- #
- # If SOCKSSocket is defined and the environment (ENV) defines
- # SOCKS_SERVER, then a SOCKSSocket is returned, else a Socket is
- # returned.
- def open_socket(host, port) # :nodoc:
- return Timeout.timeout(@open_timeout, OpenTimeout) {
- if defined? SOCKSSocket and ENV["SOCKS_SERVER"]
- @passive = true
- SOCKSSocket.open(host, port)
- else
- Socket.tcp(host, port)
- end
- }
- end
- private :open_socket
-
- def start_tls_session(sock)
- ssl_sock = SSLSocket.new(sock, @ssl_context)
- ssl_sock.sync_close = true
- ssl_sock.hostname = @host if ssl_sock.respond_to? :hostname=
- if @ssl_session &&
- Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
- # ProFTPD returns 425 for data connections if session is not reused.
- ssl_sock.session = @ssl_session
- end
- ssl_socket_connect(ssl_sock, @ssl_handshake_timeout || @open_timeout)
- if @ssl_context.verify_mode != VERIFY_NONE
- ssl_sock.post_connection_check(@host)
- end
- return ssl_sock
- end
- private :start_tls_session
-
- #
- # Establishes an FTP connection to host, optionally overriding the default
- # port. If the environment variable +SOCKS_SERVER+ is set, sets up the
- # connection through a SOCKS proxy. Raises an exception (typically
- # <tt>Errno::ECONNREFUSED</tt>) if the connection cannot be established.
- #
- def connect(host, port = FTP_PORT)
- if @debug_mode
- print "connect: ", host, ", ", port, "\n"
- end
- synchronize do
- @host = host
- @bare_sock = open_socket(host, port)
- @sock = BufferedSocket.new(@bare_sock, read_timeout: @read_timeout)
- voidresp
- if @ssl_context
- begin
- voidcmd("AUTH TLS")
- ssl_sock = start_tls_session(@bare_sock)
- @sock = BufferedSSLSocket.new(ssl_sock, read_timeout: @read_timeout)
- if @private_data_connection
- voidcmd("PBSZ 0")
- voidcmd("PROT P")
- end
- rescue OpenSSL::SSL::SSLError, OpenTimeout
- @sock.close
- raise
- end
- end
- end
- end
-
- #
- # Set the socket used to connect to the FTP server.
- #
- # May raise FTPReplyError if +get_greeting+ is false.
- def set_socket(sock, get_greeting = true)
- synchronize do
- @sock = sock
- if get_greeting
- voidresp
- end
- end
- end
-
- # If string +s+ includes the PASS command (password), then the contents of
- # the password are cleaned from the string using "*"
- def sanitize(s) # :nodoc:
- if s =~ /^PASS /i
- return s[0, 5] + "*" * (s.length - 5)
- else
- return s
- end
- end
- private :sanitize
-
- # Ensures that +line+ has a control return / line feed (CRLF) and writes
- # it to the socket.
- def putline(line) # :nodoc:
- if @debug_mode
- print "put: ", sanitize(line), "\n"
- end
- if /[\r\n]/ =~ line
- raise ArgumentError, "A line must not contain CR or LF"
- end
- line = line + CRLF
- @sock.write(line)
- end
- private :putline
-
- # Reads a line from the sock. If EOF, then it will raise EOFError
- def getline # :nodoc:
- line = @sock.readline # if get EOF, raise EOFError
- line.sub!(/(\r\n|\n|\r)\z/n, "")
- if @debug_mode
- print "get: ", sanitize(line), "\n"
- end
- return line
- end
- private :getline
-
- # Receive a section of lines until the response code's match.
- def getmultiline # :nodoc:
- lines = []
- lines << getline
- code = lines.last.slice(/\A([0-9a-zA-Z]{3})-/, 1)
- if code
- delimiter = code + " "
- begin
- lines << getline
- end until lines.last.start_with?(delimiter)
- end
- return lines.join("\n") + "\n"
- end
- private :getmultiline
-
- # Receives a response from the destination host.
- #
- # Returns the response code or raises FTPTempError, FTPPermError, or
- # FTPProtoError
- def getresp # :nodoc:
- @last_response = getmultiline
- @last_response_code = @last_response[0, 3]
- case @last_response_code
- when /\A[123]/
- return @last_response
- when /\A4/
- raise FTPTempError, @last_response
- when /\A5/
- raise FTPPermError, @last_response
- else
- raise FTPProtoError, @last_response
- end
- end
- private :getresp
-
- # Receives a response.
- #
- # Raises FTPReplyError if the first position of the response code is not
- # equal 2.
- def voidresp # :nodoc:
- resp = getresp
- if !resp.start_with?("2")
- raise FTPReplyError, resp
- end
- end
- private :voidresp
-
- #
- # Sends a command and returns the response.
- #
- def sendcmd(cmd)
- synchronize do
- putline(cmd)
- return getresp
- end
- end
-
- #
- # Sends a command and expect a response beginning with '2'.
- #
- def voidcmd(cmd)
- synchronize do
- putline(cmd)
- voidresp
- end
- end
-
- # Constructs and send the appropriate PORT (or EPRT) command
- def sendport(host, port) # :nodoc:
- remote_address = @bare_sock.remote_address
- if remote_address.ipv4?
- cmd = "PORT " + (host.split(".") + port.divmod(256)).join(",")
- elsif remote_address.ipv6?
- cmd = sprintf("EPRT |2|%s|%d|", host, port)
- else
- raise FTPProtoError, host
- end
- voidcmd(cmd)
- end
- private :sendport
-
- # Constructs a TCPServer socket
- def makeport # :nodoc:
- Addrinfo.tcp(@bare_sock.local_address.ip_address, 0).listen
- end
- private :makeport
-
- # sends the appropriate command to enable a passive connection
- def makepasv # :nodoc:
- if @bare_sock.remote_address.ipv4?
- host, port = parse227(sendcmd("PASV"))
- else
- host, port = parse229(sendcmd("EPSV"))
- # host, port = parse228(sendcmd("LPSV"))
- end
- return host, port
- end
- private :makepasv
-
- # Constructs a connection for transferring data
- def transfercmd(cmd, rest_offset = nil) # :nodoc:
- if @passive
- host, port = makepasv
- conn = open_socket(host, port)
- if @resume and rest_offset
- resp = sendcmd("REST " + rest_offset.to_s)
- if !resp.start_with?("3")
- raise FTPReplyError, resp
- end
- end
- resp = sendcmd(cmd)
- # skip 2XX for some ftp servers
- resp = getresp if resp.start_with?("2")
- if !resp.start_with?("1")
- raise FTPReplyError, resp
- end
- else
- sock = makeport
- begin
- addr = sock.local_address
- sendport(addr.ip_address, addr.ip_port)
- if @resume and rest_offset
- resp = sendcmd("REST " + rest_offset.to_s)
- if !resp.start_with?("3")
- raise FTPReplyError, resp
- end
- end
- resp = sendcmd(cmd)
- # skip 2XX for some ftp servers
- resp = getresp if resp.start_with?("2")
- if !resp.start_with?("1")
- raise FTPReplyError, resp
- end
- conn, = sock.accept
- sock.shutdown(Socket::SHUT_WR) rescue nil
- sock.read rescue nil
- ensure
- sock.close
- end
- end
- if @private_data_connection
- return BufferedSSLSocket.new(start_tls_session(conn),
- read_timeout: @read_timeout)
- else
- return BufferedSocket.new(conn, read_timeout: @read_timeout)
- end
- end
- private :transfercmd
-
- #
- # Logs in to the remote host. The session must have been
- # previously connected. If +user+ is the string "anonymous" and
- # the +password+ is +nil+, "anonymous@" is used as a password. If
- # the +acct+ parameter is not +nil+, an FTP ACCT command is sent
- # following the successful login. Raises an exception on error
- # (typically <tt>Net::FTPPermError</tt>).
- #
- def login(user = "anonymous", passwd = nil, acct = nil)
- if user == "anonymous" and passwd == nil
- passwd = "anonymous@"
- end
-
- resp = ""
- synchronize do
- resp = sendcmd('USER ' + user)
- if resp.start_with?("3")
- raise FTPReplyError, resp if passwd.nil?
- resp = sendcmd('PASS ' + passwd)
- end
- if resp.start_with?("3")
- raise FTPReplyError, resp if acct.nil?
- resp = sendcmd('ACCT ' + acct)
- end
- end
- if !resp.start_with?("2")
- raise FTPReplyError, resp
- end
- @welcome = resp
- send_type_command
- @logged_in = true
- end
-
- #
- # Puts the connection into binary (image) mode, issues the given command,
- # and fetches the data returned, passing it to the associated block in
- # chunks of +blocksize+ characters. Note that +cmd+ is a server command
- # (such as "RETR myfile").
- #
- def retrbinary(cmd, blocksize, rest_offset = nil) # :yield: data
- synchronize do
- with_binary(true) do
- begin
- conn = transfercmd(cmd, rest_offset)
- while data = conn.read(blocksize)
- yield(data)
- end
- conn.shutdown(Socket::SHUT_WR)
- conn.read_timeout = 1
- conn.read
- ensure
- conn.close if conn
- end
- voidresp
- end
- end
- end
-
- #
- # Puts the connection into ASCII (text) mode, issues the given command, and
- # passes the resulting data, one line at a time, to the associated block. If
- # no block is given, prints the lines. Note that +cmd+ is a server command
- # (such as "RETR myfile").
- #
- def retrlines(cmd) # :yield: line
- synchronize do
- with_binary(false) do
- begin
- conn = transfercmd(cmd)
- while line = conn.gets
- yield(line.sub(/\r?\n\z/, ""), !line.match(/\n\z/).nil?)
- end
- conn.shutdown(Socket::SHUT_WR)
- conn.read_timeout = 1
- conn.read
- ensure
- conn.close if conn
- end
- voidresp
- end
- end
- end
-
- #
- # Puts the connection into binary (image) mode, issues the given server-side
- # command (such as "STOR myfile"), and sends the contents of the file named
- # +file+ to the server. If the optional block is given, it also passes it
- # the data, in chunks of +blocksize+ characters.
- #
- def storbinary(cmd, file, blocksize, rest_offset = nil) # :yield: data
- if rest_offset
- file.seek(rest_offset, IO::SEEK_SET)
- end
- synchronize do
- with_binary(true) do
- begin
- conn = transfercmd(cmd)
- while buf = file.read(blocksize)
- conn.write(buf)
- yield(buf) if block_given?
- end
- conn.shutdown(Socket::SHUT_WR)
- conn.read_timeout = 1
- conn.read
- ensure
- conn.close if conn
- end
- voidresp
- end
- end
- rescue Errno::EPIPE
- # EPIPE, in this case, means that the data connection was unexpectedly
- # terminated. Rather than just raising EPIPE to the caller, check the
- # response on the control connection. If getresp doesn't raise a more
- # appropriate exception, re-raise the original exception.
- getresp
- raise
- end
-
- #
- # Puts the connection into ASCII (text) mode, issues the given server-side
- # command (such as "STOR myfile"), and sends the contents of the file
- # named +file+ to the server, one line at a time. If the optional block is
- # given, it also passes it the lines.
- #
- def storlines(cmd, file) # :yield: line
- synchronize do
- with_binary(false) do
- begin
- conn = transfercmd(cmd)
- while buf = file.gets
- if buf[-2, 2] != CRLF
- buf = buf.chomp + CRLF
- end
- conn.write(buf)
- yield(buf) if block_given?
- end
- conn.shutdown(Socket::SHUT_WR)
- conn.read_timeout = 1
- conn.read
- ensure
- conn.close if conn
- end
- voidresp
- end
- end
- rescue Errno::EPIPE
- # EPIPE, in this case, means that the data connection was unexpectedly
- # terminated. Rather than just raising EPIPE to the caller, check the
- # response on the control connection. If getresp doesn't raise a more
- # appropriate exception, re-raise the original exception.
- getresp
- raise
- end
-
- #
- # Retrieves +remotefile+ in binary mode, storing the result in +localfile+.
- # If +localfile+ is nil, returns retrieved data.
- # If a block is supplied, it is passed the retrieved data in +blocksize+
- # chunks.
- #
- def getbinaryfile(remotefile, localfile = File.basename(remotefile),
- blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data
- f = nil
- result = nil
- if localfile
- if @resume
- rest_offset = File.size?(localfile)
- f = File.open(localfile, "a")
- else
- rest_offset = nil
- f = File.open(localfile, "w")
- end
- elsif !block_given?
- result = String.new
- end
- begin
- f&.binmode
- retrbinary("RETR #{remotefile}", blocksize, rest_offset) do |data|
- f&.write(data)
- block&.(data)
- result&.concat(data)
- end
- return result
- ensure
- f&.close
- end
- end
-
- #
- # Retrieves +remotefile+ in ASCII (text) mode, storing the result in
- # +localfile+.
- # If +localfile+ is nil, returns retrieved data.
- # If a block is supplied, it is passed the retrieved data one
- # line at a time.
- #
- def gettextfile(remotefile, localfile = File.basename(remotefile),
- &block) # :yield: line
- f = nil
- result = nil
- if localfile
- f = File.open(localfile, "w")
- elsif !block_given?
- result = String.new
- end
- begin
- retrlines("RETR #{remotefile}") do |line, newline|
- l = newline ? line + "\n" : line
- f&.print(l)
- block&.(line, newline)
- result&.concat(l)
- end
- return result
- ensure
- f&.close
- end
- end
-
- #
- # Retrieves +remotefile+ in whatever mode the session is set (text or
- # binary). See #gettextfile and #getbinaryfile.
- #
- def get(remotefile, localfile = File.basename(remotefile),
- blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data
- if @binary
- getbinaryfile(remotefile, localfile, blocksize, &block)
- else
- gettextfile(remotefile, localfile, &block)
- end
- end
-
- #
- # Transfers +localfile+ to the server in binary mode, storing the result in
- # +remotefile+. If a block is supplied, calls it, passing in the transmitted
- # data in +blocksize+ chunks.
- #
- def putbinaryfile(localfile, remotefile = File.basename(localfile),
- blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data
- if @resume
- begin
- rest_offset = size(remotefile)
- rescue Net::FTPPermError
- rest_offset = nil
- end
- else
- rest_offset = nil
- end
- f = File.open(localfile)
- begin
- f.binmode
- if rest_offset
- storbinary("APPE #{remotefile}", f, blocksize, rest_offset, &block)
- else
- storbinary("STOR #{remotefile}", f, blocksize, rest_offset, &block)
- end
- ensure
- f.close
- end
- end
-
- #
- # Transfers +localfile+ to the server in ASCII (text) mode, storing the result
- # in +remotefile+. If callback or an associated block is supplied, calls it,
- # passing in the transmitted data one line at a time.
- #
- def puttextfile(localfile, remotefile = File.basename(localfile), &block) # :yield: line
- f = File.open(localfile)
- begin
- storlines("STOR #{remotefile}", f, &block)
- ensure
- f.close
- end
- end
-
- #
- # Transfers +localfile+ to the server in whatever mode the session is set
- # (text or binary). See #puttextfile and #putbinaryfile.
- #
- def put(localfile, remotefile = File.basename(localfile),
- blocksize = DEFAULT_BLOCKSIZE, &block)
- if @binary
- putbinaryfile(localfile, remotefile, blocksize, &block)
- else
- puttextfile(localfile, remotefile, &block)
- end
- end
-
- #
- # Sends the ACCT command.
- #
- # This is a less common FTP command, to send account
- # information if the destination host requires it.
- #
- def acct(account)
- cmd = "ACCT " + account
- voidcmd(cmd)
- end
-
- #
- # Returns an array of filenames in the remote directory.
- #
- def nlst(dir = nil)
- cmd = "NLST"
- if dir
- cmd = "#{cmd} #{dir}"
- end
- files = []
- retrlines(cmd) do |line|
- files.push(line)
- end
- return files
- end
-
- #
- # Returns an array of file information in the directory (the output is like
- # `ls -l`). If a block is given, it iterates through the listing.
- #
- def list(*args, &block) # :yield: line
- cmd = "LIST"
- args.each do |arg|
- cmd = "#{cmd} #{arg}"
- end
- lines = []
- retrlines(cmd) do |line|
- lines << line
- end
- if block
- lines.each(&block)
- end
- return lines
- end
- alias ls list
- alias dir list
-
- #
- # MLSxEntry represents an entry in responses of MLST/MLSD.
- # Each entry has the facts (e.g., size, last modification time, etc.)
- # and the pathname.
- #
- class MLSxEntry
- attr_reader :facts, :pathname
-
- def initialize(facts, pathname)
- @facts = facts
- @pathname = pathname
- end
-
- standard_facts = %w(size modify create type unique perm
- lang media-type charset)
- standard_facts.each do |factname|
- define_method factname.gsub(/-/, "_") do
- facts[factname]
- end
- end
-
- #
- # Returns +true+ if the entry is a file (i.e., the value of the type
- # fact is file).
- #
- def file?
- return facts["type"] == "file"
- end
-
- #
- # Returns +true+ if the entry is a directory (i.e., the value of the
- # type fact is dir, cdir, or pdir).
- #
- def directory?
- if /\A[cp]?dir\z/.match(facts["type"])
- return true
- else
- return false
- end
- end
-
- #
- # Returns +true+ if the APPE command may be applied to the file.
- #
- def appendable?
- return facts["perm"].include?(?a)
- end
-
- #
- # Returns +true+ if files may be created in the directory by STOU,
- # STOR, APPE, and RNTO.
- #
- def creatable?
- return facts["perm"].include?(?c)
- end
-
- #
- # Returns +true+ if the file or directory may be deleted by DELE/RMD.
- #
- def deletable?
- return facts["perm"].include?(?d)
- end
-
- #
- # Returns +true+ if the directory may be entered by CWD/CDUP.
- #
- def enterable?
- return facts["perm"].include?(?e)
- end
-
- #
- # Returns +true+ if the file or directory may be renamed by RNFR.
- #
- def renamable?
- return facts["perm"].include?(?f)
- end
-
- #
- # Returns +true+ if the listing commands, LIST, NLST, and MLSD are
- # applied to the directory.
- #
- def listable?
- return facts["perm"].include?(?l)
- end
-
- #
- # Returns +true+ if the MKD command may be used to create a new
- # directory within the directory.
- #
- def directory_makable?
- return facts["perm"].include?(?m)
- end
-
- #
- # Returns +true+ if the objects in the directory may be deleted, or
- # the directory may be purged.
- #
- def purgeable?
- return facts["perm"].include?(?p)
- end
-
- #
- # Returns +true+ if the RETR command may be applied to the file.
- #
- def readable?
- return facts["perm"].include?(?r)
- end
-
- #
- # Returns +true+ if the STOR command may be applied to the file.
- #
- def writable?
- return facts["perm"].include?(?w)
- end
- end
-
- CASE_DEPENDENT_PARSER = ->(value) { value }
- CASE_INDEPENDENT_PARSER = ->(value) { value.downcase }
- DECIMAL_PARSER = ->(value) { value.to_i }
- OCTAL_PARSER = ->(value) { value.to_i(8) }
- TIME_PARSER = ->(value, local = false) {
- unless /\A(?<year>\d{4})(?<month>\d{2})(?<day>\d{2})
- (?<hour>\d{2})(?<min>\d{2})(?<sec>\d{2})
- (\.(?<fractions>\d+))?/x =~ value
- raise FTPProtoError, "invalid time-val: #{value}"
- end
- usec = fractions.to_i * 10 ** (6 - fractions.to_s.size)
- Time.send(local ? :local : :utc, year, month, day, hour, min, sec, usec)
- }
- FACT_PARSERS = Hash.new(CASE_DEPENDENT_PARSER)
- FACT_PARSERS["size"] = DECIMAL_PARSER
- FACT_PARSERS["modify"] = TIME_PARSER
- FACT_PARSERS["create"] = TIME_PARSER
- FACT_PARSERS["type"] = CASE_INDEPENDENT_PARSER
- FACT_PARSERS["unique"] = CASE_DEPENDENT_PARSER
- FACT_PARSERS["perm"] = CASE_INDEPENDENT_PARSER
- FACT_PARSERS["lang"] = CASE_INDEPENDENT_PARSER
- FACT_PARSERS["media-type"] = CASE_INDEPENDENT_PARSER
- FACT_PARSERS["charset"] = CASE_INDEPENDENT_PARSER
- FACT_PARSERS["unix.mode"] = OCTAL_PARSER
- FACT_PARSERS["unix.owner"] = DECIMAL_PARSER
- FACT_PARSERS["unix.group"] = DECIMAL_PARSER
- FACT_PARSERS["unix.ctime"] = TIME_PARSER
- FACT_PARSERS["unix.atime"] = TIME_PARSER
-
- def parse_mlsx_entry(entry)
- facts, pathname = entry.chomp.split(/ /, 2)
- unless pathname
- raise FTPProtoError, entry
- end
- return MLSxEntry.new(
- facts.scan(/(.*?)=(.*?);/).each_with_object({}) {
- |(factname, value), h|
- name = factname.downcase
- h[name] = FACT_PARSERS[name].(value)
- },
- pathname)
- end
- private :parse_mlsx_entry
-
- #
- # Returns data (e.g., size, last modification time, entry type, etc.)
- # about the file or directory specified by +pathname+.
- # If +pathname+ is omitted, the current directory is assumed.
- #
- def mlst(pathname = nil)
- cmd = pathname ? "MLST #{pathname}" : "MLST"
- resp = sendcmd(cmd)
- if !resp.start_with?("250")
- raise FTPReplyError, resp
- end
- line = resp.lines[1]
- unless line
- raise FTPProtoError, resp
- end
- entry = line.sub(/\A(250-| *)/, "")
- return parse_mlsx_entry(entry)
- end
-
- #
- # Returns an array of the entries of the directory specified by
- # +pathname+.
- # Each entry has the facts (e.g., size, last modification time, etc.)
- # and the pathname.
- # If a block is given, it iterates through the listing.
- # If +pathname+ is omitted, the current directory is assumed.
- #
- def mlsd(pathname = nil, &block) # :yield: entry
- cmd = pathname ? "MLSD #{pathname}" : "MLSD"
- entries = []
- retrlines(cmd) do |line|
- entries << parse_mlsx_entry(line)
- end
- if block
- entries.each(&block)
- end
- return entries
- end
-
- #
- # Renames a file on the server.
- #
- def rename(fromname, toname)
- resp = sendcmd("RNFR #{fromname}")
- if !resp.start_with?("3")
- raise FTPReplyError, resp
- end
- voidcmd("RNTO #{toname}")
- end
-
- #
- # Deletes a file on the server.
- #
- def delete(filename)
- resp = sendcmd("DELE #{filename}")
- if resp.start_with?("250")
- return
- elsif resp.start_with?("5")
- raise FTPPermError, resp
- else
- raise FTPReplyError, resp
- end
- end
-
- #
- # Changes the (remote) directory.
- #
- def chdir(dirname)
- if dirname == ".."
- begin
- voidcmd("CDUP")
- return
- rescue FTPPermError => e
- if e.message[0, 3] != "500"
- raise e
- end
- end
- end
- cmd = "CWD #{dirname}"
- voidcmd(cmd)
- end
-
- def get_body(resp) # :nodoc:
- resp.slice(/\A[0-9a-zA-Z]{3} (.*)$/, 1)
- end
- private :get_body
-
- #
- # Returns the size of the given (remote) filename.
- #
- def size(filename)
- with_binary(true) do
- resp = sendcmd("SIZE #{filename}")
- if !resp.start_with?("213")
- raise FTPReplyError, resp
- end
- return get_body(resp).to_i
- end
- end
-
- #
- # Returns the last modification time of the (remote) file. If +local+ is
- # +true+, it is returned as a local time, otherwise it's a UTC time.
- #
- def mtime(filename, local = false)
- return TIME_PARSER.(mdtm(filename), local)
- end
-
- #
- # Creates a remote directory.
- #
- def mkdir(dirname)
- resp = sendcmd("MKD #{dirname}")
- return parse257(resp)
- end
-
- #
- # Removes a remote directory.
- #
- def rmdir(dirname)
- voidcmd("RMD #{dirname}")
- end
-
- #
- # Returns the current remote directory.
- #
- def pwd
- resp = sendcmd("PWD")
- return parse257(resp)
- end
- alias getdir pwd
-
- #
- # Returns system information.
- #
- def system
- resp = sendcmd("SYST")
- if !resp.start_with?("215")
- raise FTPReplyError, resp
- end
- return get_body(resp)
- end
-
- #
- # Aborts the previous command (ABOR command).
- #
- def abort
- line = "ABOR" + CRLF
- print "put: ABOR\n" if @debug_mode
- @sock.send(line, Socket::MSG_OOB)
- resp = getmultiline
- unless ["426", "226", "225"].include?(resp[0, 3])
- raise FTPProtoError, resp
- end
- return resp
- end
-
- #
- # Returns the status (STAT command).
- #
- # pathname:: when stat is invoked with pathname as a parameter it acts like
- # list but a lot faster and over the same tcp session.
- #
- def status(pathname = nil)
- line = pathname ? "STAT #{pathname}" : "STAT"
- if /[\r\n]/ =~ line
- raise ArgumentError, "A line must not contain CR or LF"
- end
- print "put: #{line}\n" if @debug_mode
- @sock.send(line + CRLF, Socket::MSG_OOB)
- return getresp
- end
-
- #
- # Returns the raw last modification time of the (remote) file in the format
- # "YYYYMMDDhhmmss" (MDTM command).
- #
- # Use +mtime+ if you want a parsed Time instance.
- #
- def mdtm(filename)
- resp = sendcmd("MDTM #{filename}")
- if resp.start_with?("213")
- return get_body(resp)
- end
- end
-
- #
- # Issues the HELP command.
- #
- def help(arg = nil)
- cmd = "HELP"
- if arg
- cmd = cmd + " " + arg
- end
- sendcmd(cmd)
- end
-
- #
- # Exits the FTP session.
- #
- def quit
- voidcmd("QUIT")
- end
-
- #
- # Issues a NOOP command.
- #
- # Does nothing except return a response.
- #
- def noop
- voidcmd("NOOP")
- end
-
- #
- # Issues a SITE command.
- #
- def site(arg)
- cmd = "SITE " + arg
- voidcmd(cmd)
- end
-
- #
- # Issues a FEAT command
- #
- # Returns an array of supported optional features
- #
- def features
- resp = sendcmd("FEAT")
- if !resp.start_with?("211")
- raise FTPReplyError, resp
- end
-
- feats = []
- resp.split("\n").each do |line|
- next if !line.start_with?(' ') # skip status lines
-
- feats << line.strip
- end
-
- return feats
- end
-
- #
- # Issues an OPTS command
- # - name Should be the name of the option to set
- # - params is any optional parameters to supply with the option
- #
- # example: option('UTF8', 'ON') => 'OPTS UTF8 ON'
- #
- def option(name, params = nil)
- cmd = "OPTS #{name}"
- cmd += " #{params}" if params
-
- voidcmd(cmd)
- end
-
- #
- # Closes the connection. Further operations are impossible until you open
- # a new connection with #connect.
- #
- def close
- if @sock and not @sock.closed?
- begin
- @sock.shutdown(Socket::SHUT_WR) rescue nil
- orig, self.read_timeout = self.read_timeout, 3
- @sock.read rescue nil
- ensure
- @sock.close
- self.read_timeout = orig
- end
- end
- end
-
- #
- # Returns +true+ iff the connection is closed.
- #
- def closed?
- @sock == nil or @sock.closed?
- end
-
- # handler for response code 227
- # (Entering Passive Mode (h1,h2,h3,h4,p1,p2))
- #
- # Returns host and port.
- def parse227(resp) # :nodoc:
- if !resp.start_with?("227")
- raise FTPReplyError, resp
- end
- if m = /\((?<host>\d+(,\d+){3}),(?<port>\d+,\d+)\)/.match(resp)
- return parse_pasv_ipv4_host(m["host"]), parse_pasv_port(m["port"])
- else
- raise FTPProtoError, resp
- end
- end
- private :parse227
-
- # handler for response code 228
- # (Entering Long Passive Mode)
- #
- # Returns host and port.
- def parse228(resp) # :nodoc:
- if !resp.start_with?("228")
- raise FTPReplyError, resp
- end
- if m = /\(4,4,(?<host>\d+(,\d+){3}),2,(?<port>\d+,\d+)\)/.match(resp)
- return parse_pasv_ipv4_host(m["host"]), parse_pasv_port(m["port"])
- elsif m = /\(6,16,(?<host>\d+(,(\d+)){15}),2,(?<port>\d+,\d+)\)/.match(resp)
- return parse_pasv_ipv6_host(m["host"]), parse_pasv_port(m["port"])
- else
- raise FTPProtoError, resp
- end
- end
- private :parse228
-
- def parse_pasv_ipv4_host(s)
- return s.tr(",", ".")
- end
- private :parse_pasv_ipv4_host
-
- def parse_pasv_ipv6_host(s)
- return s.split(/,/).map { |i|
- "%02x" % i.to_i
- }.each_slice(2).map(&:join).join(":")
- end
- private :parse_pasv_ipv6_host
-
- def parse_pasv_port(s)
- return s.split(/,/).map(&:to_i).inject { |x, y|
- (x << 8) + y
- }
- end
- private :parse_pasv_port
-
- # handler for response code 229
- # (Extended Passive Mode Entered)
- #
- # Returns host and port.
- def parse229(resp) # :nodoc:
- if !resp.start_with?("229")
- raise FTPReplyError, resp
- end
- if m = /\((?<d>[!-~])\k<d>\k<d>(?<port>\d+)\k<d>\)/.match(resp)
- return @bare_sock.remote_address.ip_address, m["port"].to_i
- else
- raise FTPProtoError, resp
- end
- end
- private :parse229
-
- # handler for response code 257
- # ("PATHNAME" created)
- #
- # Returns host and port.
- def parse257(resp) # :nodoc:
- if !resp.start_with?("257")
- raise FTPReplyError, resp
- end
- return resp.slice(/"(([^"]|"")*)"/, 1).to_s.gsub(/""/, '"')
- end
- private :parse257
-
- # :stopdoc:
- class NullSocket
- def read_timeout=(sec)
- end
-
- def closed?
- true
- end
-
- def close
- end
-
- def method_missing(mid, *args)
- raise FTPConnectionError, "not connected"
- end
- end
-
- class BufferedSocket < BufferedIO
- [:local_address, :remote_address, :addr, :peeraddr, :send, :shutdown].each do |method|
- define_method(method) { |*args|
- @io.__send__(method, *args)
- }
- end
-
- def read(len = nil)
- if len
- s = super(len, String.new, true)
- return s.empty? ? nil : s
- else
- result = String.new
- while s = super(DEFAULT_BLOCKSIZE, String.new, true)
- break if s.empty?
- result << s
- end
- return result
- end
- end
-
- def gets
- line = readuntil("\n", true)
- return line.empty? ? nil : line
- end
-
- def readline
- line = gets
- if line.nil?
- raise EOFError, "end of file reached"
- end
- return line
- end
- end
-
- if defined?(OpenSSL::SSL::SSLSocket)
- class BufferedSSLSocket < BufferedSocket
- def initialize(*args, **options)
- super
- @is_shutdown = false
- end
-
- def shutdown(*args)
- # SSL_shutdown() will be called from SSLSocket#close, and
- # SSL_shutdown() will send the "close notify" alert to the peer,
- # so shutdown(2) should not be called.
- @is_shutdown = true
- end
-
- def send(mesg, flags, dest = nil)
- # Ignore flags and dest.
- @io.write(mesg)
- end
-
- private
-
- def rbuf_fill
- if @is_shutdown
- raise EOFError, "shutdown has been called"
- else
- super
- end
- end
- end
- end
- # :startdoc:
- end
-end
-
-
-# Documentation comments:
-# - sourced from pickaxe and nutshell, with improvements (hopefully)
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 88a174a248..387df4b8f4 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
#
# = net/http.rb
#
@@ -20,8 +20,9 @@
# See Net::HTTP for an overview and examples.
#
-require_relative 'protocol'
+require 'net/protocol'
require 'uri'
+require 'resolv'
autoload :OpenSSL, 'openssl'
module Net #:nodoc:
@@ -31,386 +32,717 @@ module Net #:nodoc:
class HTTPHeaderSyntaxError < StandardError; end
# :startdoc:
- # == An HTTP client API for Ruby.
+ # \Class \Net::HTTP provides a rich library that implements the client
+ # in a client-server model that uses the \HTTP request-response protocol.
+ # For information about \HTTP, see:
+ #
+ # - {Hypertext Transfer Protocol}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol].
+ # - {Technical overview}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Technical_overview].
+ #
+ # == About the Examples
+ #
+ # :include: doc/net-http/examples.rdoc
+ #
+ # == Strategies
+ #
+ # - If you will make only a few GET requests,
+ # consider using {OpenURI}[rdoc-ref:OpenURI].
+ # - If you will make only a few requests of all kinds,
+ # consider using the various singleton convenience methods in this class.
+ # Each of the following methods automatically starts and finishes
+ # a {session}[rdoc-ref:Net::HTTP@Sessions] that sends a single request:
+ #
+ # # Return string response body.
+ # Net::HTTP.get(hostname, path)
+ # Net::HTTP.get(uri)
+ #
+ # # Write string response body to $stdout.
+ # Net::HTTP.get_print(hostname, path)
+ # Net::HTTP.get_print(uri)
+ #
+ # # Return response as Net::HTTPResponse object.
+ # Net::HTTP.get_response(hostname, path)
+ # Net::HTTP.get_response(uri)
+ # data = '{"title": "foo", "body": "bar", "userId": 1}'
+ # Net::HTTP.post(uri, data)
+ # params = {title: 'foo', body: 'bar', userId: 1}
+ # Net::HTTP.post_form(uri, params)
+ #
+ # - If performance is important, consider using sessions, which lower request overhead.
+ # This {session}[rdoc-ref:Net::HTTP@Sessions] has multiple requests for
+ # {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]
+ # and {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
+ #
+ # Net::HTTP.start(hostname) do |http|
+ # # Session started automatically before block execution.
+ # http.get(path)
+ # http.head(path)
+ # body = 'Some text'
+ # http.post(path, body) # Can also have a block.
+ # http.put(path, body)
+ # http.delete(path)
+ # http.options(path)
+ # http.trace(path)
+ # http.patch(path, body) # Can also have a block.
+ # http.copy(path)
+ # http.lock(path, body)
+ # http.mkcol(path, body)
+ # http.move(path)
+ # http.propfind(path, body)
+ # http.proppatch(path, body)
+ # http.unlock(path, body)
+ # # Session finished automatically at block exit.
+ # end
#
- # Net::HTTP provides a rich library which can be used to build HTTP
- # user-agents. For more details about HTTP see
- # [RFC2616](http://www.ietf.org/rfc/rfc2616.txt).
+ # The methods cited above are convenience methods that, via their few arguments,
+ # allow minimal control over the requests.
+ # For greater control, consider using {request objects}[rdoc-ref:Net::HTTPRequest].
#
- # Net::HTTP is designed to work closely with URI. URI::HTTP#host,
- # URI::HTTP#port and URI::HTTP#request_uri are designed to work with
- # Net::HTTP.
+ # == URIs
#
- # If you are only performing a few GET requests you should try OpenURI.
+ # On the internet, a URI
+ # ({Universal Resource Identifier}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier])
+ # is a string that identifies a particular resource.
+ # It consists of some or all of: scheme, hostname, path, query, and fragment;
+ # see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax].
#
- # == Simple Examples
+ # A Ruby {URI::Generic}[rdoc-ref:URI::Generic] object
+ # represents an internet URI.
+ # It provides, among others, methods
+ # +scheme+, +hostname+, +path+, +query+, and +fragment+.
#
- # All examples assume you have loaded Net::HTTP with:
+ # === Schemes
#
- # require 'net/http'
+ # An internet \URI has
+ # a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes].
#
- # This will also require 'uri' so you don't need to require it separately.
+ # The two schemes supported in \Net::HTTP are <tt>'https'</tt> and <tt>'http'</tt>:
#
- # The Net::HTTP methods in the following section do not persist
- # connections. They are not recommended if you are performing many HTTP
- # requests.
+ # uri.scheme # => "https"
+ # URI('http://example.com').scheme # => "http"
#
- # === GET
+ # === Hostnames
#
- # Net::HTTP.get('example.com', '/index.html') # => String
+ # A hostname identifies a server (host) to which requests may be sent:
#
- # === GET by URI
+ # hostname = uri.hostname # => "jsonplaceholder.typicode.com"
+ # Net::HTTP.start(hostname) do |http|
+ # # Some HTTP stuff.
+ # end
#
- # uri = URI('http://example.com/index.html?count=10')
- # Net::HTTP.get(uri) # => String
+ # === Paths
#
- # === GET with Dynamic Parameters
+ # A host-specific path identifies a resource on the host:
#
- # uri = URI('http://example.com/index.html')
- # params = { :limit => 10, :page => 3 }
- # uri.query = URI.encode_www_form(params)
+ # _uri = uri.dup
+ # _uri.path = '/todos/1'
+ # hostname = _uri.hostname
+ # path = _uri.path
+ # Net::HTTP.get(hostname, path)
#
- # res = Net::HTTP.get_response(uri)
- # puts res.body if res.is_a?(Net::HTTPSuccess)
+ # === Queries
#
- # === POST
+ # A host-specific query adds name/value pairs to the URI:
#
- # uri = URI('http://www.example.com/search.cgi')
- # res = Net::HTTP.post_form(uri, 'q' => 'ruby', 'max' => '50')
- # puts res.body
+ # _uri = uri.dup
+ # params = {userId: 1, completed: false}
+ # _uri.query = URI.encode_www_form(params)
+ # _uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com?userId=1&completed=false>
+ # Net::HTTP.get(_uri)
#
- # === POST with Multiple Values
+ # === Fragments
#
- # uri = URI('http://www.example.com/search.cgi')
- # res = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50')
- # puts res.body
+ # A {URI fragment}[https://en.wikipedia.org/wiki/URI_fragment] has no effect
+ # in \Net::HTTP;
+ # the same data is returned, regardless of whether a fragment is included.
#
- # == How to use Net::HTTP
+ # == Request Headers
#
- # The following example code can be used as the basis of an HTTP user-agent
- # which can perform a variety of request types using persistent
- # connections.
+ # Request headers may be used to pass additional information to the host,
+ # similar to arguments passed in a method call;
+ # each header is a name/value pair.
#
- # uri = URI('http://example.com/some_path?query=string')
+ # Each of the \Net::HTTP methods that sends a request to the host
+ # has optional argument +headers+,
+ # where the headers are expressed as a hash of field-name/value pairs:
#
- # Net::HTTP.start(uri.host, uri.port) do |http|
- # request = Net::HTTP::Get.new uri
+ # headers = {Accept: 'application/json', Connection: 'Keep-Alive'}
+ # Net::HTTP.get(uri, headers)
#
- # response = http.request request # Net::HTTPResponse object
- # end
+ # See lists of both standard request fields and common request fields at
+ # {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
+ # A host may also accept other custom fields.
#
- # Net::HTTP::start immediately creates a connection to an HTTP server which
- # is kept open for the duration of the block. The connection will remain
- # open for multiple requests in the block if the server indicates it
- # supports persistent connections.
+ # == \HTTP Sessions
#
- # If you wish to re-use a connection across multiple HTTP requests without
- # automatically closing it you can use ::new and then call #start and
- # #finish manually.
+ # A _session_ is a connection between a server (host) and a client that:
#
- # The request types Net::HTTP supports are listed below in the section "HTTP
- # Request Classes".
+ # - Is begun by instance method Net::HTTP#start.
+ # - May contain any number of requests.
+ # - Is ended by instance method Net::HTTP#finish.
#
- # For all the Net::HTTP request objects and shortcut request methods you may
- # supply either a String for the request path or a URI from which Net::HTTP
- # will extract the request path.
+ # See example sessions at {Strategies}[rdoc-ref:Net::HTTP@Strategies].
#
- # === Response Data
+ # === Session Using \Net::HTTP.start
#
- # uri = URI('http://example.com/index.html')
- # res = Net::HTTP.get_response(uri)
+ # If you have many requests to make to a single host (and port),
+ # consider using singleton method Net::HTTP.start with a block;
+ # the method handles the session automatically by:
#
- # # Headers
- # res['Set-Cookie'] # => String
- # res.get_fields('set-cookie') # => Array
- # res.to_hash['set-cookie'] # => Array
- # puts "Headers: #{res.to_hash.inspect}"
+ # - Calling #start before block execution.
+ # - Executing the block.
+ # - Calling #finish after block execution.
#
- # # Status
- # puts res.code # => '200'
- # puts res.message # => 'OK'
- # puts res.class.name # => 'HTTPOK'
+ # In the block, you can use these instance methods,
+ # each of which that sends a single request:
#
- # # Body
- # puts res.body if res.response_body_permitted?
+ # - {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]:
#
- # === Following Redirection
+ # - #get, #request_get: GET.
+ # - #head, #request_head: HEAD.
+ # - #post, #request_post: POST.
+ # - #delete: DELETE.
+ # - #options: OPTIONS.
+ # - #trace: TRACE.
+ # - #patch: PATCH.
#
- # Each Net::HTTPResponse object belongs to a class for its response code.
+ # - {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]:
#
- # For example, all 2XX responses are instances of a Net::HTTPSuccess
- # subclass, a 3XX response is an instance of a Net::HTTPRedirection
- # subclass and a 200 response is an instance of the Net::HTTPOK class. For
- # details of response classes, see the section "HTTP Response Classes"
- # below.
+ # - #copy: COPY.
+ # - #lock: LOCK.
+ # - #mkcol: MKCOL.
+ # - #move: MOVE.
+ # - #propfind: PROPFIND.
+ # - #proppatch: PROPPATCH.
+ # - #unlock: UNLOCK.
#
- # Using a case statement you can handle various types of responses properly:
+ # === Session Using \Net::HTTP.start and \Net::HTTP.finish
#
- # def fetch(uri_str, limit = 10)
- # # You should choose a better exception.
- # raise ArgumentError, 'too many HTTP redirects' if limit == 0
+ # You can manage a session manually using methods #start and #finish:
#
- # response = Net::HTTP.get_response(URI(uri_str))
+ # http = Net::HTTP.new(hostname)
+ # http.start
+ # http.get('/todos/1')
+ # http.get('/todos/2')
+ # http.delete('/posts/1')
+ # http.finish # Needed to free resources.
#
- # case response
- # when Net::HTTPSuccess then
- # response
- # when Net::HTTPRedirection then
- # location = response['location']
- # warn "redirected to #{location}"
- # fetch(location, limit - 1)
- # else
- # response.value
- # end
- # end
+ # === Single-Request Session
#
- # print fetch('http://www.ruby-lang.org')
+ # Certain convenience methods automatically handle a session by:
#
- # === POST
+ # - Creating an \HTTP object
+ # - Starting a session.
+ # - Sending a single request.
+ # - Finishing the session.
+ # - Destroying the object.
#
- # A POST can be made using the Net::HTTP::Post request class. This example
- # creates a URL encoded POST body:
+ # Such methods that send GET requests:
#
- # uri = URI('http://www.example.com/todo.cgi')
- # req = Net::HTTP::Post.new(uri)
- # req.set_form_data('from' => '2005-01-01', 'to' => '2005-03-31')
+ # - ::get: Returns the string response body.
+ # - ::get_print: Writes the string response body to $stdout.
+ # - ::get_response: Returns a Net::HTTPResponse object.
#
- # res = Net::HTTP.start(uri.hostname, uri.port) do |http|
- # http.request(req)
- # end
+ # Such methods that send POST requests:
#
- # case res
- # when Net::HTTPSuccess, Net::HTTPRedirection
- # # OK
- # else
- # res.value
- # end
+ # - ::post: Posts data to the host.
+ # - ::post_form: Posts form data to the host.
#
- # To send multipart/form-data use Net::HTTPHeader#set_form:
+ # == \HTTP Requests and Responses
#
- # req = Net::HTTP::Post.new(uri)
- # req.set_form([['upload', File.open('foo.bar')]], 'multipart/form-data')
+ # Many of the methods above are convenience methods,
+ # each of which sends a request and returns a string
+ # without directly using \Net::HTTPRequest and \Net::HTTPResponse objects.
#
- # Other requests that can contain a body such as PUT can be created in the
- # same way using the corresponding request class (Net::HTTP::Put).
+ # You can, however, directly create a request object, send the request,
+ # and retrieve the response object; see:
#
- # === Setting Headers
+ # - Net::HTTPRequest.
+ # - Net::HTTPResponse.
#
- # The following example performs a conditional GET using the
- # If-Modified-Since header. If the files has not been modified since the
- # time in the header a Not Modified response will be returned. See RFC 2616
- # section 9.3 for further details.
+ # == Following Redirection
#
- # uri = URI('http://example.com/cached_response')
- # file = File.stat 'cached_response'
+ # Each returned response is an instance of a subclass of Net::HTTPResponse.
+ # See the {response class hierarchy}[rdoc-ref:Net::HTTPResponse@Response+Subclasses].
#
- # req = Net::HTTP::Get.new(uri)
- # req['If-Modified-Since'] = file.mtime.rfc2822
+ # In particular, class Net::HTTPRedirection is the parent
+ # of all redirection classes.
+ # This allows you to craft a case statement to handle redirections properly:
#
- # res = Net::HTTP.start(uri.hostname, uri.port) {|http|
- # http.request(req)
- # }
+ # def fetch(uri, limit = 10)
+ # # You should choose a better exception.
+ # raise ArgumentError, 'Too many HTTP redirects' if limit == 0
+ #
+ # res = Net::HTTP.get_response(URI(uri))
+ # case res
+ # when Net::HTTPSuccess # Any success class.
+ # res
+ # when Net::HTTPRedirection # Any redirection class.
+ # location = res['Location']
+ # warn "Redirected to #{location}"
+ # fetch(location, limit - 1)
+ # else # Any other class.
+ # res.value
+ # end
+ # end
#
- # open 'cached_response', 'w' do |io|
- # io.write res.body
- # end if res.is_a?(Net::HTTPSuccess)
+ # fetch(uri)
#
- # === Basic Authentication
+ # == Basic Authentication
#
# Basic authentication is performed according to
- # [RFC2617](http://www.ietf.org/rfc/rfc2617.txt).
- #
- # uri = URI('http://example.com/index.html?key=value')
+ # {RFC2617}[http://www.ietf.org/rfc/rfc2617.txt]:
#
# req = Net::HTTP::Get.new(uri)
- # req.basic_auth 'user', 'pass'
- #
- # res = Net::HTTP.start(uri.hostname, uri.port) {|http|
+ # req.basic_auth('user', 'pass')
+ # res = Net::HTTP.start(hostname) do |http|
# http.request(req)
- # }
- # puts res.body
+ # end
#
- # === Streaming Response Bodies
+ # == Streaming Response Bodies
#
- # By default Net::HTTP reads an entire response into memory. If you are
+ # By default \Net::HTTP reads an entire response into memory. If you are
# handling large files or wish to implement a progress bar you can instead
# stream the body directly to an IO.
#
- # uri = URI('http://example.com/large_file')
- #
- # Net::HTTP.start(uri.host, uri.port) do |http|
- # request = Net::HTTP::Get.new uri
- #
- # http.request request do |response|
- # open 'large_file', 'w' do |io|
- # response.read_body do |chunk|
- # io.write chunk
+ # Net::HTTP.start(hostname) do |http|
+ # req = Net::HTTP::Get.new(uri)
+ # http.request(req) do |res|
+ # open('t.tmp', 'w') do |f|
+ # res.read_body do |chunk|
+ # f.write chunk
# end
# end
# end
# end
#
- # === HTTPS
- #
- # HTTPS is enabled for an HTTP connection by Net::HTTP#use_ssl=.
+ # == HTTPS
#
- # uri = URI('https://secure.example.com/some_path?query=string')
+ # HTTPS is enabled for an \HTTP connection by Net::HTTP#use_ssl=:
#
- # Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
- # request = Net::HTTP::Get.new uri
- # response = http.request request # Net::HTTPResponse object
+ # Net::HTTP.start(hostname, :use_ssl => true) do |http|
+ # req = Net::HTTP::Get.new(uri)
+ # res = http.request(req)
# end
#
- # Or if you simply want to make a GET request, you may pass in an URI
- # object that has an HTTPS URL. Net::HTTP automatically turns on TLS
- # verification if the URI object has a 'https' URI scheme.
+ # Or if you simply want to make a GET request, you may pass in a URI
+ # object that has an \HTTPS URL. \Net::HTTP automatically turns on TLS
+ # verification if the URI object has a 'https' URI scheme:
+ #
+ # uri # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
+ # Net::HTTP.get(uri)
+ #
+ # == Proxy Server
+ #
+ # An \HTTP object can have
+ # a {proxy server}[https://en.wikipedia.org/wiki/Proxy_server].
+ #
+ # You can create an \HTTP object with a proxy server
+ # using method Net::HTTP.new or method Net::HTTP.start.
+ #
+ # The proxy may be defined either by argument +p_addr+
+ # or by environment variable <tt>'http_proxy'</tt>.
+ #
+ # === Proxy Using Argument +p_addr+ as a \String
+ #
+ # When argument +p_addr+ is a string hostname,
+ # the returned +http+ has the given host as its proxy:
+ #
+ # http = Net::HTTP.new(hostname, nil, 'proxy.example')
+ # http.proxy? # => true
+ # http.proxy_from_env? # => false
+ # http.proxy_address # => "proxy.example"
+ # # These use default values.
+ # http.proxy_port # => 80
+ # http.proxy_user # => nil
+ # http.proxy_pass # => nil
+ #
+ # The port, username, and password for the proxy may also be given:
#
- # uri = URI('https://example.com/')
- # Net::HTTP.get(uri) # => String
+ # http = Net::HTTP.new(hostname, nil, 'proxy.example', 8000, 'pname', 'ppass')
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
+ # http.proxy? # => true
+ # http.proxy_from_env? # => false
+ # http.proxy_address # => "proxy.example"
+ # http.proxy_port # => 8000
+ # http.proxy_user # => "pname"
+ # http.proxy_pass # => "ppass"
#
- # In previous versions of Ruby you would need to require 'net/https' to use
- # HTTPS. This is no longer true.
+ # === Proxy Using '<tt>ENV['http_proxy']</tt>'
+ #
+ # When environment variable <tt>'http_proxy'</tt>
+ # is set to a \URI string,
+ # the returned +http+ will have the server at that URI as its proxy;
+ # note that the \URI string must have a protocol
+ # such as <tt>'http'</tt> or <tt>'https'</tt>:
+ #
+ # ENV['http_proxy'] = 'http://example.com'
+ # http = Net::HTTP.new(hostname)
+ # http.proxy? # => true
+ # http.proxy_from_env? # => true
+ # http.proxy_address # => "example.com"
+ # # These use default values.
+ # http.proxy_port # => 80
+ # http.proxy_user # => nil
+ # http.proxy_pass # => nil
+ #
+ # The \URI string may include proxy username, password, and port number:
+ #
+ # ENV['http_proxy'] = 'http://pname:ppass@example.com:8000'
+ # http = Net::HTTP.new(hostname)
+ # http.proxy? # => true
+ # http.proxy_from_env? # => true
+ # http.proxy_address # => "example.com"
+ # http.proxy_port # => 8000
+ # http.proxy_user # => "pname"
+ # http.proxy_pass # => "ppass"
+ #
+ # === Filtering Proxies
+ #
+ # With method Net::HTTP.new (but not Net::HTTP.start),
+ # you can use argument +p_no_proxy+ to filter proxies:
+ #
+ # - Reject a certain address:
+ #
+ # http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
+ # http.proxy_address # => nil
+ #
+ # - Reject certain domains or subdomains:
+ #
+ # http = Net::HTTP.new('example.com', nil, 'my.proxy.example', 8000, 'pname', 'ppass', 'proxy.example')
+ # http.proxy_address # => nil
+ #
+ # - Reject certain addresses and port combinations:
+ #
+ # http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:1234')
+ # http.proxy_address # => "proxy.example"
+ #
+ # http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:8000')
+ # http.proxy_address # => nil
+ #
+ # - Reject a list of the types above delimited using a comma:
+ #
+ # http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
+ # http.proxy_address # => nil
+ #
+ # http = Net::HTTP.new('example.com', nil, 'my.proxy', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000')
+ # http.proxy_address # => nil
+ #
+ # == Compression and Decompression
+ #
+ # \Net::HTTP does not compress the body of a request before sending.
+ #
+ # By default, \Net::HTTP adds header <tt>'Accept-Encoding'</tt>
+ # to a new {request object}[rdoc-ref:Net::HTTPRequest]:
+ #
+ # Net::HTTP::Get.new(uri)['Accept-Encoding']
+ # # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
+ #
+ # This requests the server to zip-encode the response body if there is one;
+ # the server is not required to do so.
+ #
+ # \Net::HTTP does not automatically decompress a response body
+ # if the response has header <tt>'Content-Range'</tt>.
+ #
+ # Otherwise decompression (or not) depends on the value of header
+ # {Content-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-encoding-response-header]:
+ #
+ # - <tt>'deflate'</tt>, <tt>'gzip'</tt>, or <tt>'x-gzip'</tt>:
+ # decompresses the body and deletes the header.
+ # - <tt>'none'</tt> or <tt>'identity'</tt>:
+ # does not decompress the body, but deletes the header.
+ # - Any other value:
+ # leaves the body and header unchanged.
+ #
+ # == What's Here
+ #
+ # This is a categorized summary of methods and attributes.
+ #
+ # === \Net::HTTP Objects
+ #
+ # - {::new}[rdoc-ref:Net::HTTP.new]:
+ # Creates a new instance.
+ # - {#inspect}[rdoc-ref:Net::HTTP#inspect]:
+ # Returns a string representation of +self+.
+ #
+ # === Sessions
+ #
+ # - {::start}[rdoc-ref:Net::HTTP.start]:
+ # Begins a new session in a new \Net::HTTP object.
+ # - {#started?}[rdoc-ref:Net::HTTP#started?]
+ # (aliased as {#active?}[rdoc-ref:Net::HTTP#active?]):
+ # Returns whether in a session.
+ # - {#finish}[rdoc-ref:Net::HTTP#finish]:
+ # Ends an active session.
+ # - {#start}[rdoc-ref:Net::HTTP#start]:
+ # Begins a new session in an existing \Net::HTTP object (+self+).
+ #
+ # === Connections
+ #
+ # - {:continue_timeout}[rdoc-ref:Net::HTTP#continue_timeout]:
+ # Returns the continue timeout.
+ # - {#continue_timeout=}[rdoc-ref:Net::HTTP#continue_timeout=]:
+ # Sets the continue timeout seconds.
+ # - {:keep_alive_timeout}[rdoc-ref:Net::HTTP#keep_alive_timeout]:
+ # Returns the keep-alive timeout.
+ # - {:keep_alive_timeout=}[rdoc-ref:Net::HTTP#keep_alive_timeout=]:
+ # Sets the keep-alive timeout.
+ # - {:max_retries}[rdoc-ref:Net::HTTP#max_retries]:
+ # Returns the maximum retries.
+ # - {#max_retries=}[rdoc-ref:Net::HTTP#max_retries=]:
+ # Sets the maximum retries.
+ # - {:open_timeout}[rdoc-ref:Net::HTTP#open_timeout]:
+ # Returns the open timeout.
+ # - {:open_timeout=}[rdoc-ref:Net::HTTP#open_timeout=]:
+ # Sets the open timeout.
+ # - {:read_timeout}[rdoc-ref:Net::HTTP#read_timeout]:
+ # Returns the open timeout.
+ # - {:read_timeout=}[rdoc-ref:Net::HTTP#read_timeout=]:
+ # Sets the read timeout.
+ # - {:ssl_timeout}[rdoc-ref:Net::HTTP#ssl_timeout]:
+ # Returns the ssl timeout.
+ # - {:ssl_timeout=}[rdoc-ref:Net::HTTP#ssl_timeout=]:
+ # Sets the ssl timeout.
+ # - {:write_timeout}[rdoc-ref:Net::HTTP#write_timeout]:
+ # Returns the write timeout.
+ # - {write_timeout=}[rdoc-ref:Net::HTTP#write_timeout=]:
+ # Sets the write timeout.
+ #
+ # === Requests
+ #
+ # - {::get}[rdoc-ref:Net::HTTP.get]:
+ # Sends a GET request and returns the string response body.
+ # - {::get_print}[rdoc-ref:Net::HTTP.get_print]:
+ # Sends a GET request and write the string response body to $stdout.
+ # - {::get_response}[rdoc-ref:Net::HTTP.get_response]:
+ # Sends a GET request and returns a response object.
+ # - {::post_form}[rdoc-ref:Net::HTTP.post_form]:
+ # Sends a POST request with form data and returns a response object.
+ # - {::post}[rdoc-ref:Net::HTTP.post]:
+ # Sends a POST request with data and returns a response object.
+ # - {#copy}[rdoc-ref:Net::HTTP#copy]:
+ # Sends a COPY request and returns a response object.
+ # - {#delete}[rdoc-ref:Net::HTTP#delete]:
+ # Sends a DELETE request and returns a response object.
+ # - {#get}[rdoc-ref:Net::HTTP#get]:
+ # Sends a GET request and returns a response object.
+ # - {#head}[rdoc-ref:Net::HTTP#head]:
+ # Sends a HEAD request and returns a response object.
+ # - {#lock}[rdoc-ref:Net::HTTP#lock]:
+ # Sends a LOCK request and returns a response object.
+ # - {#mkcol}[rdoc-ref:Net::HTTP#mkcol]:
+ # Sends a MKCOL request and returns a response object.
+ # - {#move}[rdoc-ref:Net::HTTP#move]:
+ # Sends a MOVE request and returns a response object.
+ # - {#options}[rdoc-ref:Net::HTTP#options]:
+ # Sends a OPTIONS request and returns a response object.
+ # - {#patch}[rdoc-ref:Net::HTTP#patch]:
+ # Sends a PATCH request and returns a response object.
+ # - {#post}[rdoc-ref:Net::HTTP#post]:
+ # Sends a POST request and returns a response object.
+ # - {#propfind}[rdoc-ref:Net::HTTP#propfind]:
+ # Sends a PROPFIND request and returns a response object.
+ # - {#proppatch}[rdoc-ref:Net::HTTP#proppatch]:
+ # Sends a PROPPATCH request and returns a response object.
+ # - {#put}[rdoc-ref:Net::HTTP#put]:
+ # Sends a PUT request and returns a response object.
+ # - {#request}[rdoc-ref:Net::HTTP#request]:
+ # Sends a request and returns a response object.
+ # - {#request_get}[rdoc-ref:Net::HTTP#request_get]
+ # (aliased as {#get2}[rdoc-ref:Net::HTTP#get2]):
+ # Sends a GET request and forms a response object;
+ # if a block given, calls the block with the object,
+ # otherwise returns the object.
+ # - {#request_head}[rdoc-ref:Net::HTTP#request_head]
+ # (aliased as {#head2}[rdoc-ref:Net::HTTP#head2]):
+ # Sends a HEAD request and forms a response object;
+ # if a block given, calls the block with the object,
+ # otherwise returns the object.
+ # - {#request_post}[rdoc-ref:Net::HTTP#request_post]
+ # (aliased as {#post2}[rdoc-ref:Net::HTTP#post2]):
+ # Sends a POST request and forms a response object;
+ # if a block given, calls the block with the object,
+ # otherwise returns the object.
+ # - {#send_request}[rdoc-ref:Net::HTTP#send_request]:
+ # Sends a request and returns a response object.
+ # - {#trace}[rdoc-ref:Net::HTTP#trace]:
+ # Sends a TRACE request and returns a response object.
+ # - {#unlock}[rdoc-ref:Net::HTTP#unlock]:
+ # Sends an UNLOCK request and returns a response object.
+ #
+ # === Responses
+ #
+ # - {:close_on_empty_response}[rdoc-ref:Net::HTTP#close_on_empty_response]:
+ # Returns whether to close connection on empty response.
+ # - {:close_on_empty_response=}[rdoc-ref:Net::HTTP#close_on_empty_response=]:
+ # Sets whether to close connection on empty response.
+ # - {:ignore_eof}[rdoc-ref:Net::HTTP#ignore_eof]:
+ # Returns whether to ignore end-of-file when reading a response body
+ # with <tt>Content-Length</tt> headers.
+ # - {:ignore_eof=}[rdoc-ref:Net::HTTP#ignore_eof=]:
+ # Sets whether to ignore end-of-file when reading a response body
+ # with <tt>Content-Length</tt> headers.
+ # - {:response_body_encoding}[rdoc-ref:Net::HTTP#response_body_encoding]:
+ # Returns the encoding to use for the response body.
+ # - {#response_body_encoding=}[rdoc-ref:Net::HTTP#response_body_encoding=]:
+ # Sets the response body encoding.
#
# === Proxies
#
- # Net::HTTP will automatically create a proxy from the +http_proxy+
- # environment variable if it is present. To disable use of +http_proxy+,
- # pass +nil+ for the proxy address.
- #
- # You may also create a custom proxy:
- #
- # proxy_addr = 'your.proxy.host'
- # proxy_port = 8080
- #
- # Net::HTTP.new('example.com', nil, proxy_addr, proxy_port).start { |http|
- # # always proxy via your.proxy.addr:8080
- # }
- #
- # See Net::HTTP.new for further details and examples such as proxies that
- # require a username and password.
- #
- # === Compression
- #
- # Net::HTTP automatically adds Accept-Encoding for compression of response
- # bodies and automatically decompresses gzip and deflate responses unless a
- # Range header was sent.
- #
- # Compression can be disabled through the Accept-Encoding: identity header.
- #
- # == HTTP Request Classes
- #
- # Here is the HTTP request class hierarchy.
- #
- # * Net::HTTPRequest
- # * Net::HTTP::Get
- # * Net::HTTP::Head
- # * Net::HTTP::Post
- # * Net::HTTP::Patch
- # * Net::HTTP::Put
- # * Net::HTTP::Proppatch
- # * Net::HTTP::Lock
- # * Net::HTTP::Unlock
- # * Net::HTTP::Options
- # * Net::HTTP::Propfind
- # * Net::HTTP::Delete
- # * Net::HTTP::Move
- # * Net::HTTP::Copy
- # * Net::HTTP::Mkcol
- # * Net::HTTP::Trace
- #
- # == HTTP Response Classes
- #
- # Here is HTTP response class hierarchy. All classes are defined in Net
- # module and are subclasses of Net::HTTPResponse.
- #
- # HTTPUnknownResponse:: For unhandled HTTP extensions
- # HTTPInformation:: 1xx
- # HTTPContinue:: 100
- # HTTPSwitchProtocol:: 101
- # HTTPSuccess:: 2xx
- # HTTPOK:: 200
- # HTTPCreated:: 201
- # HTTPAccepted:: 202
- # HTTPNonAuthoritativeInformation:: 203
- # HTTPNoContent:: 204
- # HTTPResetContent:: 205
- # HTTPPartialContent:: 206
- # HTTPMultiStatus:: 207
- # HTTPIMUsed:: 226
- # HTTPRedirection:: 3xx
- # HTTPMultipleChoices:: 300
- # HTTPMovedPermanently:: 301
- # HTTPFound:: 302
- # HTTPSeeOther:: 303
- # HTTPNotModified:: 304
- # HTTPUseProxy:: 305
- # HTTPTemporaryRedirect:: 307
- # HTTPClientError:: 4xx
- # HTTPBadRequest:: 400
- # HTTPUnauthorized:: 401
- # HTTPPaymentRequired:: 402
- # HTTPForbidden:: 403
- # HTTPNotFound:: 404
- # HTTPMethodNotAllowed:: 405
- # HTTPNotAcceptable:: 406
- # HTTPProxyAuthenticationRequired:: 407
- # HTTPRequestTimeOut:: 408
- # HTTPConflict:: 409
- # HTTPGone:: 410
- # HTTPLengthRequired:: 411
- # HTTPPreconditionFailed:: 412
- # HTTPRequestEntityTooLarge:: 413
- # HTTPRequestURITooLong:: 414
- # HTTPUnsupportedMediaType:: 415
- # HTTPRequestedRangeNotSatisfiable:: 416
- # HTTPExpectationFailed:: 417
- # HTTPUnprocessableEntity:: 422
- # HTTPLocked:: 423
- # HTTPFailedDependency:: 424
- # HTTPUpgradeRequired:: 426
- # HTTPPreconditionRequired:: 428
- # HTTPTooManyRequests:: 429
- # HTTPRequestHeaderFieldsTooLarge:: 431
- # HTTPUnavailableForLegalReasons:: 451
- # HTTPServerError:: 5xx
- # HTTPInternalServerError:: 500
- # HTTPNotImplemented:: 501
- # HTTPBadGateway:: 502
- # HTTPServiceUnavailable:: 503
- # HTTPGatewayTimeOut:: 504
- # HTTPVersionNotSupported:: 505
- # HTTPInsufficientStorage:: 507
- # HTTPNetworkAuthenticationRequired:: 511
- #
- # There is also the Net::HTTPBadResponse exception which is raised when
- # there is a protocol error.
+ # - {:proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
+ # Returns the proxy address.
+ # - {:proxy_address=}[rdoc-ref:Net::HTTP#proxy_address=]:
+ # Sets the proxy address.
+ # - {::proxy_class?}[rdoc-ref:Net::HTTP.proxy_class?]:
+ # Returns whether +self+ is a proxy class.
+ # - {#proxy?}[rdoc-ref:Net::HTTP#proxy?]:
+ # Returns whether +self+ has a proxy.
+ # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]
+ # (aliased as {#proxyaddr}[rdoc-ref:Net::HTTP#proxyaddr]):
+ # Returns the proxy address.
+ # - {#proxy_from_env?}[rdoc-ref:Net::HTTP#proxy_from_env?]:
+ # Returns whether the proxy is taken from an environment variable.
+ # - {:proxy_from_env=}[rdoc-ref:Net::HTTP#proxy_from_env=]:
+ # Sets whether the proxy is to be taken from an environment variable.
+ # - {:proxy_pass}[rdoc-ref:Net::HTTP#proxy_pass]:
+ # Returns the proxy password.
+ # - {:proxy_pass=}[rdoc-ref:Net::HTTP#proxy_pass=]:
+ # Sets the proxy password.
+ # - {:proxy_port}[rdoc-ref:Net::HTTP#proxy_port]:
+ # Returns the proxy port.
+ # - {:proxy_port=}[rdoc-ref:Net::HTTP#proxy_port=]:
+ # Sets the proxy port.
+ # - {#proxy_user}[rdoc-ref:Net::HTTP#proxy_user]:
+ # Returns the proxy user name.
+ # - {:proxy_user=}[rdoc-ref:Net::HTTP#proxy_user=]:
+ # Sets the proxy user.
+ #
+ # === Security
+ #
+ # - {:ca_file}[rdoc-ref:Net::HTTP#ca_file]:
+ # Returns the path to a CA certification file.
+ # - {:ca_file=}[rdoc-ref:Net::HTTP#ca_file=]:
+ # Sets the path to a CA certification file.
+ # - {:ca_path}[rdoc-ref:Net::HTTP#ca_path]:
+ # Returns the path of to CA directory containing certification files.
+ # - {:ca_path=}[rdoc-ref:Net::HTTP#ca_path=]:
+ # Sets the path of to CA directory containing certification files.
+ # - {:cert}[rdoc-ref:Net::HTTP#cert]:
+ # Returns the OpenSSL::X509::Certificate object to be used for client certification.
+ # - {:cert=}[rdoc-ref:Net::HTTP#cert=]:
+ # Sets the OpenSSL::X509::Certificate object to be used for client certification.
+ # - {:cert_store}[rdoc-ref:Net::HTTP#cert_store]:
+ # Returns the X509::Store to be used for verifying peer certificate.
+ # - {:cert_store=}[rdoc-ref:Net::HTTP#cert_store=]:
+ # Sets the X509::Store to be used for verifying peer certificate.
+ # - {:ciphers}[rdoc-ref:Net::HTTP#ciphers]:
+ # Returns the available SSL ciphers.
+ # - {:ciphers=}[rdoc-ref:Net::HTTP#ciphers=]:
+ # Sets the available SSL ciphers.
+ # - {:extra_chain_cert}[rdoc-ref:Net::HTTP#extra_chain_cert]:
+ # Returns the extra X509 certificates to be added to the certificate chain.
+ # - {:extra_chain_cert=}[rdoc-ref:Net::HTTP#extra_chain_cert=]:
+ # Sets the extra X509 certificates to be added to the certificate chain.
+ # - {:key}[rdoc-ref:Net::HTTP#key]:
+ # Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
+ # - {:key=}[rdoc-ref:Net::HTTP#key=]:
+ # Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
+ # - {:max_version}[rdoc-ref:Net::HTTP#max_version]:
+ # Returns the maximum SSL version.
+ # - {:max_version=}[rdoc-ref:Net::HTTP#max_version=]:
+ # Sets the maximum SSL version.
+ # - {:min_version}[rdoc-ref:Net::HTTP#min_version]:
+ # Returns the minimum SSL version.
+ # - {:min_version=}[rdoc-ref:Net::HTTP#min_version=]:
+ # Sets the minimum SSL version.
+ # - {#peer_cert}[rdoc-ref:Net::HTTP#peer_cert]:
+ # Returns the X509 certificate chain for the session's socket peer.
+ # - {:ssl_version}[rdoc-ref:Net::HTTP#ssl_version]:
+ # Returns the SSL version.
+ # - {:ssl_version=}[rdoc-ref:Net::HTTP#ssl_version=]:
+ # Sets the SSL version.
+ # - {#use_ssl=}[rdoc-ref:Net::HTTP#use_ssl=]:
+ # Sets whether a new session is to use Transport Layer Security.
+ # - {#use_ssl?}[rdoc-ref:Net::HTTP#use_ssl?]:
+ # Returns whether +self+ uses SSL.
+ # - {:verify_callback}[rdoc-ref:Net::HTTP#verify_callback]:
+ # Returns the callback for the server certification verification.
+ # - {:verify_callback=}[rdoc-ref:Net::HTTP#verify_callback=]:
+ # Sets the callback for the server certification verification.
+ # - {:verify_depth}[rdoc-ref:Net::HTTP#verify_depth]:
+ # Returns the maximum depth for the certificate chain verification.
+ # - {:verify_depth=}[rdoc-ref:Net::HTTP#verify_depth=]:
+ # Sets the maximum depth for the certificate chain verification.
+ # - {:verify_hostname}[rdoc-ref:Net::HTTP#verify_hostname]:
+ # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
+ # - {:verify_hostname=}[rdoc-ref:Net::HTTP#verify_hostname=]:
+ # Sets he flags for server the certification verification at the beginning of the SSL/TLS session.
+ # - {:verify_mode}[rdoc-ref:Net::HTTP#verify_mode]:
+ # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
+ # - {:verify_mode=}[rdoc-ref:Net::HTTP#verify_mode=]:
+ # Sets the flags for server the certification verification at the beginning of the SSL/TLS session.
+ #
+ # === Addresses and Ports
+ #
+ # - {:address}[rdoc-ref:Net::HTTP#address]:
+ # Returns the string host name or host IP.
+ # - {::default_port}[rdoc-ref:Net::HTTP.default_port]:
+ # Returns integer 80, the default port to use for HTTP requests.
+ # - {::http_default_port}[rdoc-ref:Net::HTTP.http_default_port]:
+ # Returns integer 80, the default port to use for HTTP requests.
+ # - {::https_default_port}[rdoc-ref:Net::HTTP.https_default_port]:
+ # Returns integer 443, the default port to use for HTTPS requests.
+ # - {#ipaddr}[rdoc-ref:Net::HTTP#ipaddr]:
+ # Returns the IP address for the connection.
+ # - {#ipaddr=}[rdoc-ref:Net::HTTP#ipaddr=]:
+ # Sets the IP address for the connection.
+ # - {:local_host}[rdoc-ref:Net::HTTP#local_host]:
+ # Returns the string local host used to establish the connection.
+ # - {:local_host=}[rdoc-ref:Net::HTTP#local_host=]:
+ # Sets the string local host used to establish the connection.
+ # - {:local_port}[rdoc-ref:Net::HTTP#local_port]:
+ # Returns the integer local port used to establish the connection.
+ # - {:local_port=}[rdoc-ref:Net::HTTP#local_port=]:
+ # Sets the integer local port used to establish the connection.
+ # - {:port}[rdoc-ref:Net::HTTP#port]:
+ # Returns the integer port number.
+ #
+ # === \HTTP Version
+ #
+ # - {::version_1_2?}[rdoc-ref:Net::HTTP.version_1_2?]
+ # (aliased as {::is_version_1_2?}[rdoc-ref:Net::HTTP.is_version_1_2?]
+ # and {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
+ # Returns true; retained for compatibility.
+ #
+ # === Debugging
+ #
+ # - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]:
+ # Sets the output stream for debugging.
#
class HTTP < Protocol
# :stopdoc:
- Revision = %q$Revision$.split[1]
+ VERSION = "0.4.1"
HTTPVersion = '1.1'
begin
require 'zlib'
- require 'stringio' #for our purposes (unpacking gzip) lump these together
HAVE_ZLIB=true
rescue LoadError
HAVE_ZLIB=false
end
# :startdoc:
- # Turns on net/http 1.2 (Ruby 1.8) features.
- # Defaults to ON in Ruby 1.8 or later.
+ # Returns +true+; retained for compatibility.
def HTTP.version_1_2
true
end
- # Returns true if net/http is in version 1.2 mode.
- # Defaults to true.
+ # Returns +true+; retained for compatibility.
def HTTP.version_1_2?
true
end
+ # Returns +false+; retained for compatibility.
def HTTP.version_1_1? #:nodoc:
false
end
@@ -420,23 +752,14 @@ module Net #:nodoc:
alias is_version_1_2? version_1_2? #:nodoc:
end
+ # :call-seq:
+ # Net::HTTP.get_print(hostname, path, port = 80) -> nil
+ # Net::HTTP:get_print(uri, headers = {}, port = uri.port) -> nil
#
- # short cut methods
- #
-
- #
- # Gets the body text from the target and outputs it to $stdout. The
- # target can either be specified as
- # (+uri+), or as (+host+, +path+, +port+ = 80); so:
- #
- # Net::HTTP.get_print URI('http://www.example.com/index.html')
- #
- # or:
- #
- # Net::HTTP.get_print 'www.example.com', '/index.html'
- #
- def HTTP.get_print(uri_or_host, path = nil, port = nil)
- get_response(uri_or_host, path, port) {|res|
+ # Like Net::HTTP.get, but writes the returned body to $stdout;
+ # returns +nil+.
+ def HTTP.get_print(uri_or_host, path_or_headers = nil, port = nil)
+ get_response(uri_or_host, path_or_headers, port) {|res|
res.read_body do |chunk|
$stdout.print chunk
end
@@ -444,57 +767,90 @@ module Net #:nodoc:
nil
end
- # Sends a GET request to the target and returns the HTTP response
- # as a string. The target can either be specified as
- # (+uri+), or as (+host+, +path+, +port+ = 80); so:
+ # :call-seq:
+ # Net::HTTP.get(hostname, path, port = 80) -> body
+ # Net::HTTP:get(uri, headers = {}, port = uri.port) -> body
#
- # print Net::HTTP.get(URI('http://www.example.com/index.html'))
+ # Sends a GET request and returns the \HTTP response body as a string.
#
- # or:
+ # With string arguments +hostname+ and +path+:
#
- # print Net::HTTP.get('www.example.com', '/index.html')
+ # hostname = 'jsonplaceholder.typicode.com'
+ # path = '/todos/1'
+ # puts Net::HTTP.get(hostname, path)
#
- def HTTP.get(uri_or_host, path = nil, port = nil)
- get_response(uri_or_host, path, port).body
- end
-
- # Sends a GET request to the target and returns the HTTP response
- # as a Net::HTTPResponse object. The target can either be specified as
- # (+uri+), or as (+host+, +path+, +port+ = 80); so:
+ # Output:
+ #
+ # {
+ # "userId": 1,
+ # "id": 1,
+ # "title": "delectus aut autem",
+ # "completed": false
+ # }
+ #
+ # With URI object +uri+ and optional hash argument +headers+:
#
- # res = Net::HTTP.get_response(URI('http://www.example.com/index.html'))
- # print res.body
+ # uri = URI('https://jsonplaceholder.typicode.com/todos/1')
+ # headers = {'Content-type' => 'application/json; charset=UTF-8'}
+ # Net::HTTP.get(uri, headers)
#
- # or:
+ # Related:
#
- # res = Net::HTTP.get_response('www.example.com', '/index.html')
- # print res.body
+ # - Net::HTTP::Get: request class for \HTTP method +GET+.
+ # - Net::HTTP#get: convenience method for \HTTP method +GET+.
+ #
+ def HTTP.get(uri_or_host, path_or_headers = nil, port = nil)
+ get_response(uri_or_host, path_or_headers, port).body
+ end
+
+ # :call-seq:
+ # Net::HTTP.get_response(hostname, path, port = 80) -> http_response
+ # Net::HTTP:get_response(uri, headers = {}, port = uri.port) -> http_response
#
- def HTTP.get_response(uri_or_host, path = nil, port = nil, &block)
- if path
+ # Like Net::HTTP.get, but returns a Net::HTTPResponse object
+ # instead of the body string.
+ def HTTP.get_response(uri_or_host, path_or_headers = nil, port = nil, &block)
+ if path_or_headers && !path_or_headers.is_a?(Hash)
host = uri_or_host
+ path = path_or_headers
new(host, port || HTTP.default_port).start {|http|
return http.request_get(path, &block)
}
else
uri = uri_or_host
+ headers = path_or_headers
start(uri.hostname, uri.port,
:use_ssl => uri.scheme == 'https') {|http|
- return http.request_get(uri, &block)
+ return http.request_get(uri, headers, &block)
}
end
end
- # Posts data to the specified URI object.
+ # Posts data to a host; returns a Net::HTTPResponse object.
#
- # Example:
+ # Argument +url+ must be a URL;
+ # argument +data+ must be a string:
+ #
+ # _uri = uri.dup
+ # _uri.path = '/posts'
+ # data = '{"title": "foo", "body": "bar", "userId": 1}'
+ # headers = {'content-type': 'application/json'}
+ # res = Net::HTTP.post(_uri, data, headers) # => #<Net::HTTPCreated 201 Created readbody=true>
+ # puts res.body
+ #
+ # Output:
+ #
+ # {
+ # "title": "foo",
+ # "body": "bar",
+ # "userId": 1,
+ # "id": 101
+ # }
#
- # require 'net/http'
- # require 'uri'
+ # Related:
#
- # Net::HTTP.post URI('http://www.example.com/api/search'),
- # { "q" => "ruby", "max" => "50" }.to_json,
- # "Content-Type" => "application/json"
+ # - Net::HTTP::Post: request class for \HTTP method +POST+.
+ # - Net::HTTP#post: convenience method for \HTTP method +POST+.
#
def HTTP.post(url, data, header = nil)
start(url.hostname, url.port,
@@ -503,23 +859,25 @@ module Net #:nodoc:
}
end
- # Posts HTML form data to the specified URI object.
- # The form data must be provided as a Hash mapping from String to String.
- # Example:
- #
- # { "cmd" => "search", "q" => "ruby", "max" => "50" }
+ # Posts data to a host; returns a Net::HTTPResponse object.
#
- # This method also does Basic Authentication iff +url+.user exists.
- # But userinfo for authentication is deprecated (RFC3986).
- # So this feature will be removed.
+ # Argument +url+ must be a URI;
+ # argument +data+ must be a hash:
#
- # Example:
+ # _uri = uri.dup
+ # _uri.path = '/posts'
+ # data = {title: 'foo', body: 'bar', userId: 1}
+ # res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true>
+ # puts res.body
#
- # require 'net/http'
- # require 'uri'
+ # Output:
#
- # Net::HTTP.post_form URI('http://www.example.com/search.cgi'),
- # { "q" => "ruby", "max" => "50" }
+ # {
+ # "title": "foo",
+ # "body": "bar",
+ # "userId": "1",
+ # "id": 101
+ # }
#
def HTTP.post_form(url, params)
req = Post.new(url)
@@ -532,20 +890,29 @@ module Net #:nodoc:
end
#
- # HTTP session management
+ # \HTTP session management
#
- # The default port to use for HTTP requests; defaults to 80.
+ # Returns integer +80+, the default port to use for \HTTP requests:
+ #
+ # Net::HTTP.default_port # => 80
+ #
def HTTP.default_port
http_default_port()
end
- # The default port to use for HTTP requests; defaults to 80.
+ # Returns integer +80+, the default port to use for \HTTP requests:
+ #
+ # Net::HTTP.http_default_port # => 80
+ #
def HTTP.http_default_port
80
end
- # The default port to use for HTTPS requests; defaults to 443.
+ # Returns integer +443+, the default port to use for HTTPS requests:
+ #
+ # Net::HTTP.https_default_port # => 443
+ #
def HTTP.https_default_port
443
end
@@ -555,35 +922,91 @@ module Net #:nodoc:
end
# :call-seq:
- # HTTP.start(address, port, p_addr, p_port, p_user, p_pass, &block)
- # HTTP.start(address, port=nil, p_addr=:ENV, p_port=nil, p_user=nil, p_pass=nil, opt, &block)
- #
- # Creates a new Net::HTTP object, then additionally opens the TCP
- # connection and HTTP session.
- #
- # Arguments are the following:
- # _address_ :: hostname or IP address of the server
- # _port_ :: port of the server
- # _p_addr_ :: address of proxy
- # _p_port_ :: port of proxy
- # _p_user_ :: user of proxy
- # _p_pass_ :: pass of proxy
- # _opt_ :: optional hash
- #
- # _opt_ sets following values by its accessor.
- # The keys are ipaddr, ca_file, ca_path, cert, cert_store, ciphers,
- # close_on_empty_response, key, open_timeout, read_timeout, write_timeout, ssl_timeout,
- # ssl_version, use_ssl, verify_callback, verify_depth and verify_mode.
- # If you set :use_ssl as true, you can use https and default value of
- # verify_mode is set as OpenSSL::SSL::VERIFY_PEER.
- #
- # If the optional block is given, the newly
- # created Net::HTTP object is passed to it and closed when the
- # block finishes. In this case, the return value of this method
- # is the return value of the block. If no block is given, the
- # return value of this method is the newly created Net::HTTP object
- # itself, and the caller is responsible for closing it upon completion
- # using the finish() method.
+ # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) -> http
+ # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) {|http| ... } -> object
+ #
+ # Creates a new \Net::HTTP object, +http+, via \Net::HTTP.new:
+ #
+ # - For arguments +address+ and +port+, see Net::HTTP.new.
+ # - For proxy-defining arguments +p_addr+ through +p_pass+,
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
+ # - For argument +opts+, see below.
+ #
+ # With no block given:
+ #
+ # - Calls <tt>http.start</tt> with no block (see #start),
+ # which opens a TCP connection and \HTTP session.
+ # - Returns +http+.
+ # - The caller should call #finish to close the session:
+ #
+ # http = Net::HTTP.start(hostname)
+ # http.started? # => true
+ # http.finish
+ # http.started? # => false
+ #
+ # With a block given:
+ #
+ # - Calls <tt>http.start</tt> with the block (see #start), which:
+ #
+ # - Opens a TCP connection and \HTTP session.
+ # - Calls the block,
+ # which may make any number of requests to the host.
+ # - Closes the \HTTP session and TCP connection on block exit.
+ # - Returns the block's value +object+.
+ #
+ # - Returns +object+.
+ #
+ # Example:
+ #
+ # hostname = 'jsonplaceholder.typicode.com'
+ # Net::HTTP.start(hostname) do |http|
+ # puts http.get('/todos/1').body
+ # puts http.get('/todos/2').body
+ # end
+ #
+ # Output:
+ #
+ # {
+ # "userId": 1,
+ # "id": 1,
+ # "title": "delectus aut autem",
+ # "completed": false
+ # }
+ # {
+ # "userId": 1,
+ # "id": 2,
+ # "title": "quis ut nam facilis et officia qui",
+ # "completed": false
+ # }
+ #
+ # If the last argument given is a hash, it is the +opts+ hash,
+ # where each key is a method or accessor to be called,
+ # and its value is the value to be set.
+ #
+ # The keys may include:
+ #
+ # - #ca_file
+ # - #ca_path
+ # - #cert
+ # - #cert_store
+ # - #ciphers
+ # - #close_on_empty_response
+ # - +ipaddr+ (calls #ipaddr=)
+ # - #keep_alive_timeout
+ # - #key
+ # - #open_timeout
+ # - #read_timeout
+ # - #ssl_timeout
+ # - #ssl_version
+ # - +use_ssl+ (calls #use_ssl=)
+ # - #verify_callback
+ # - #verify_depth
+ # - #verify_mode
+ # - #write_timeout
+ #
+ # Note: If +port+ is +nil+ and <tt>opts[:use_ssl]</tt> is a truthy value,
+ # the value passed to +new+ is Net::HTTP.https_default_port, not +port+.
+ #
def HTTP.start(address, *arg, &block) # :yield: +http+
arg.pop if opt = Hash.try_convert(arg[-1])
port, p_addr, p_port, p_user, p_pass = *arg
@@ -610,25 +1033,34 @@ module Net #:nodoc:
alias newobj new # :nodoc:
end
- # Creates a new Net::HTTP object without opening a TCP connection or
- # HTTP session.
+ # Returns a new \Net::HTTP object +http+
+ # (but does not open a TCP connection or \HTTP session).
+ #
+ # With only string argument +address+ given
+ # (and <tt>ENV['http_proxy']</tt> undefined or +nil+),
+ # the returned +http+:
#
- # The +address+ should be a DNS hostname or IP address, the +port+ is the
- # port the server operates on. If no +port+ is given the default port for
- # HTTP or HTTPS is used.
+ # - Has the given address.
+ # - Has the default port number, Net::HTTP.default_port (80).
+ # - Has no proxy.
+ #
+ # Example:
+ #
+ # http = Net::HTTP.new(hostname)
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
+ # http.address # => "jsonplaceholder.typicode.com"
+ # http.port # => 80
+ # http.proxy? # => false
#
- # If none of the +p_+ arguments are given, the proxy host and port are
- # taken from the +http_proxy+ environment variable (or its uppercase
- # equivalent) if present. If the proxy requires authentication you must
- # supply it by hand. See URI::Generic#find_proxy for details of proxy
- # detection from the environment. To disable proxy detection set +p_addr+
- # to nil.
+ # With integer argument +port+ also given,
+ # the returned +http+ has the given port:
#
- # If you are connecting to a custom proxy, +p_addr+ specifies the DNS name
- # or IP address of the proxy host, +p_port+ the port to use to access the
- # proxy, +p_user+ and +p_pass+ the username and password if authorization
- # is required to use the proxy, and p_no_proxy hosts which do not
- # use the proxy.
+ # http = Net::HTTP.new(hostname, 8000)
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:8000 open=false>
+ # http.port # => 8000
+ #
+ # For proxy-defining arguments +p_addr+ through +p_no_proxy+,
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
#
def HTTP.new(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, p_no_proxy = nil)
http = super address, port
@@ -642,7 +1074,7 @@ module Net #:nodoc:
elsif p_addr == :ENV then
http.proxy_from_env = true
else
- if p_addr && p_no_proxy && !URI::Generic.use_proxy?(p_addr, p_addr, p_port, p_no_proxy)
+ if p_addr && p_no_proxy && !URI::Generic.use_proxy?(address, address, port, p_no_proxy)
p_addr = nil
p_port = nil
end
@@ -655,10 +1087,10 @@ module Net #:nodoc:
http
end
- # Creates a new Net::HTTP object for the specified server address,
- # without opening the TCP connection or initializing the HTTP session.
+ # Creates a new \Net::HTTP object for the specified server address,
+ # without opening the TCP connection or initializing the \HTTP session.
# The +address+ should be a DNS hostname or IP address.
- def initialize(address, port = nil)
+ def initialize(address, port = nil) # :nodoc:
@address = address
@port = (port || HTTP.default_port)
@ipaddr = nil
@@ -676,6 +1108,8 @@ module Net #:nodoc:
@continue_timeout = nil
@max_retries = 1
@debug_output = nil
+ @response_body_encoding = false
+ @ignore_eof = true
@proxy_from_env = false
@proxy_uri = nil
@@ -693,6 +1127,11 @@ module Net #:nodoc:
end
end
+ # Returns a string representation of +self+:
+ #
+ # Net::HTTP.new(hostname).inspect
+ # # => "#<Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
+ #
def inspect
"#<#{self.class} #{@address}:#{@port} open=#{started?}>"
end
@@ -700,71 +1139,184 @@ module Net #:nodoc:
# *WARNING* This method opens a serious security hole.
# Never use this method in production code.
#
- # Sets an output stream for debugging.
+ # Sets the output stream for debugging:
#
# http = Net::HTTP.new(hostname)
- # http.set_debug_output $stderr
- # http.start { .... }
+ # File.open('t.tmp', 'w') do |file|
+ # http.set_debug_output(file)
+ # http.start
+ # http.get('/nosuch/1')
+ # http.finish
+ # end
+ # puts File.read('t.tmp')
+ #
+ # Output:
+ #
+ # opening connection to jsonplaceholder.typicode.com:80...
+ # opened
+ # <- "GET /nosuch/1 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: jsonplaceholder.typicode.com\r\n\r\n"
+ # -> "HTTP/1.1 404 Not Found\r\n"
+ # -> "Date: Mon, 12 Dec 2022 21:14:11 GMT\r\n"
+ # -> "Content-Type: application/json; charset=utf-8\r\n"
+ # -> "Content-Length: 2\r\n"
+ # -> "Connection: keep-alive\r\n"
+ # -> "X-Powered-By: Express\r\n"
+ # -> "X-Ratelimit-Limit: 1000\r\n"
+ # -> "X-Ratelimit-Remaining: 999\r\n"
+ # -> "X-Ratelimit-Reset: 1670879660\r\n"
+ # -> "Vary: Origin, Accept-Encoding\r\n"
+ # -> "Access-Control-Allow-Credentials: true\r\n"
+ # -> "Cache-Control: max-age=43200\r\n"
+ # -> "Pragma: no-cache\r\n"
+ # -> "Expires: -1\r\n"
+ # -> "X-Content-Type-Options: nosniff\r\n"
+ # -> "Etag: W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"\r\n"
+ # -> "Via: 1.1 vegur\r\n"
+ # -> "CF-Cache-Status: MISS\r\n"
+ # -> "Server-Timing: cf-q-config;dur=1.3000000762986e-05\r\n"
+ # -> "Report-To: {\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=yOr40jo%2BwS1KHzhTlVpl54beJ5Wx2FcG4gGV0XVrh3X9OlR5q4drUn2dkt5DGO4GDcE%2BVXT7CNgJvGs%2BZleIyMu8CLieFiDIvOviOY3EhHg94m0ZNZgrEdpKD0S85S507l1vsEwEHkoTm%2Ff19SiO\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\n"
+ # -> "NEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\n"
+ # -> "Server: cloudflare\r\n"
+ # -> "CF-RAY: 778977dc484ce591-DFW\r\n"
+ # -> "alt-svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\n"
+ # -> "\r\n"
+ # reading 2 bytes...
+ # -> "{}"
+ # read 2 bytes
+ # Conn keep-alive
#
def set_debug_output(output)
warn 'Net::HTTP#set_debug_output called after HTTP started', uplevel: 1 if started?
@debug_output = output
end
- # The DNS host name or IP address to connect to.
+ # Returns the string host name or host IP given as argument +address+ in ::new.
attr_reader :address
- # The port number to connect to.
+ # Returns the integer port number given as argument +port+ in ::new.
attr_reader :port
- # The local host used to establish the connection.
+ # Sets or returns the string local host used to establish the connection;
+ # initially +nil+.
attr_accessor :local_host
- # The local port used to establish the connection.
+ # Sets or returns the integer local port used to establish the connection;
+ # initially +nil+.
attr_accessor :local_port
+ # Returns the encoding to use for the response body;
+ # see #response_body_encoding=.
+ attr_reader :response_body_encoding
+
+ # Sets the encoding to be used for the response body;
+ # returns the encoding.
+ #
+ # The given +value+ may be:
+ #
+ # - An Encoding object.
+ # - The name of an encoding.
+ # - An alias for an encoding name.
+ #
+ # See {Encoding}[rdoc-ref:Encoding].
+ #
+ # Examples:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII>
+ # http.response_body_encoding = 'US-ASCII' # => "US-ASCII"
+ # http.response_body_encoding = 'ASCII' # => "ASCII"
+ #
+ def response_body_encoding=(value)
+ value = Encoding.find(value) if value.is_a?(String)
+ @response_body_encoding = value
+ end
+
+ # Sets whether to determine the proxy from environment variable
+ # '<tt>ENV['http_proxy']</tt>';
+ # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27].
attr_writer :proxy_from_env
+
+ # Sets the proxy address;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
attr_writer :proxy_address
+
+ # Sets the proxy port;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
attr_writer :proxy_port
+
+ # Sets the proxy user;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
attr_writer :proxy_user
+
+ # Sets the proxy password;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
attr_writer :proxy_pass
- # The IP address to connect to/used to connect to
+ # Returns the IP address for the connection.
+ #
+ # If the session has not been started,
+ # returns the value set by #ipaddr=,
+ # or +nil+ if it has not been set:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.ipaddr # => nil
+ # http.ipaddr = '172.67.155.76'
+ # http.ipaddr # => "172.67.155.76"
+ #
+ # If the session has been started,
+ # returns the IP address from the socket:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.start
+ # http.ipaddr # => "172.67.155.76"
+ # http.finish
+ #
def ipaddr
started? ? @socket.io.peeraddr[3] : @ipaddr
end
- # Set the IP address to connect to
+ # Sets the IP address for the connection:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.ipaddr # => nil
+ # http.ipaddr = '172.67.155.76'
+ # http.ipaddr # => "172.67.155.76"
+ #
+ # The IP address may not be set if the session has been started.
def ipaddr=(addr)
raise IOError, "ipaddr value changed, but session already started" if started?
@ipaddr = addr
end
- # Number of seconds to wait for the connection to open. Any number
- # may be used, including Floats for fractional seconds. If the HTTP
- # object cannot open a connection in this many seconds, it raises a
- # Net::OpenTimeout exception. The default value is 60 seconds.
+ # Sets or returns the numeric (\Integer or \Float) number of seconds
+ # to wait for a connection to open;
+ # initially 60.
+ # If the connection is not made in the given interval,
+ # an exception is raised.
attr_accessor :open_timeout
- # Number of seconds to wait for one block to be read (via one read(2)
- # call). Any number may be used, including Floats for fractional
- # seconds. If the HTTP object cannot read data in this many seconds,
- # it raises a Net::ReadTimeout exception. The default value is 60 seconds.
+ # Returns the numeric (\Integer or \Float) number of seconds
+ # to wait for one block to be read (via one read(2) call);
+ # see #read_timeout=.
attr_reader :read_timeout
- # Number of seconds to wait for one block to be written (via one write(2)
- # call). Any number may be used, including Floats for fractional
- # seconds. If the HTTP object cannot write data in this many seconds,
- # it raises a Net::WriteTimeout exception. The default value is 60 seconds.
- # Net::WriteTimeout is not raised on Windows.
+ # Returns the numeric (\Integer or \Float) number of seconds
+ # to wait for one block to be written (via one write(2) call);
+ # see #write_timeout=.
attr_reader :write_timeout
- # Maximum number of times to retry an idempotent request in case of
- # Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET,
+ # Sets the maximum number of times to retry an idempotent request in case of
+ # \Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET,
# Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError,
# Timeout::Error.
- # Should be a non-negative integer number. Zero means no retries.
- # The default value is 1.
+ # The initial value is 1.
+ #
+ # Argument +retries+ must be a non-negative numeric value:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.max_retries = 2 # => 2
+ # http.max_retries # => 2
+ #
def max_retries=(retries)
retries = retries.to_int
if retries < 0
@@ -773,55 +1325,113 @@ module Net #:nodoc:
@max_retries = retries
end
+ # Returns the maximum number of times to retry an idempotent request;
+ # see #max_retries=.
attr_reader :max_retries
- # Setter for the read_timeout attribute.
+ # Sets the read timeout, in seconds, for +self+ to integer +sec+;
+ # the initial value is 60.
+ #
+ # Argument +sec+ must be a non-negative numeric value:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.read_timeout # => 60
+ # http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
+ # http.read_timeout = 0
+ # http.get('/todos/1') # Raises Net::ReadTimeout.
+ #
def read_timeout=(sec)
@socket.read_timeout = sec if @socket
@read_timeout = sec
end
- # Setter for the write_timeout attribute.
+ # Sets the write timeout, in seconds, for +self+ to integer +sec+;
+ # the initial value is 60.
+ #
+ # Argument +sec+ must be a non-negative numeric value:
+ #
+ # _uri = uri.dup
+ # _uri.path = '/posts'
+ # body = 'bar' * 200000
+ # data = <<EOF
+ # {"title": "foo", "body": "#{body}", "userId": "1"}
+ # EOF
+ # headers = {'content-type': 'application/json'}
+ # http = Net::HTTP.new(hostname)
+ # http.write_timeout # => 60
+ # http.post(_uri.path, data, headers)
+ # # => #<Net::HTTPCreated 201 Created readbody=true>
+ # http.write_timeout = 0
+ # http.post(_uri.path, data, headers) # Raises Net::WriteTimeout.
+ #
def write_timeout=(sec)
@socket.write_timeout = sec if @socket
@write_timeout = sec
end
- # Seconds to wait for 100 Continue response. If the HTTP object does not
- # receive a response in this many seconds it sends the request body. The
- # default value is +nil+.
+ # Returns the continue timeout value;
+ # see continue_timeout=.
attr_reader :continue_timeout
- # Setter for the continue_timeout attribute.
+ # Sets the continue timeout value,
+ # which is the number of seconds to wait for an expected 100 Continue response.
+ # If the \HTTP object does not receive a response in this many seconds
+ # it sends the request body.
def continue_timeout=(sec)
@socket.continue_timeout = sec if @socket
@continue_timeout = sec
end
- # Seconds to reuse the connection of the previous request.
- # If the idle time is less than this Keep-Alive Timeout,
- # Net::HTTP reuses the TCP/IP socket used by the previous communication.
- # The default value is 2 seconds.
+ # Sets or returns the numeric (\Integer or \Float) number of seconds
+ # to keep the connection open after a request is sent;
+ # initially 2.
+ # If a new request is made during the given interval,
+ # the still-open connection is used;
+ # otherwise the connection will have been closed
+ # and a new connection is opened.
attr_accessor :keep_alive_timeout
- # Returns true if the HTTP session has been started.
+ # Sets or returns whether to ignore end-of-file when reading a response body
+ # with <tt>Content-Length</tt> headers;
+ # initially +true+.
+ attr_accessor :ignore_eof
+
+ # Returns +true+ if the \HTTP session has been started:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.started? # => false
+ # http.start
+ # http.started? # => true
+ # http.finish # => nil
+ # http.started? # => false
+ #
+ # Net::HTTP.start(hostname) do |http|
+ # http.started?
+ # end # => true
+ # http.started? # => false
+ #
def started?
@started
end
alias active? started? #:nodoc: obsolete
+ # Sets or returns whether to close the connection when the response is empty;
+ # initially +false+.
attr_accessor :close_on_empty_response
- # Returns true if SSL/TLS is being used with HTTP.
+ # Returns +true+ if +self+ uses SSL, +false+ otherwise.
+ # See Net::HTTP#use_ssl=.
def use_ssl?
@use_ssl
end
- # Turn on/off SSL.
- # This flag must be set before starting session.
- # If you change use_ssl value after session started,
- # a Net::HTTP object raises IOError.
+ # Sets whether a new session is to use
+ # {Transport Layer Security}[https://en.wikipedia.org/wiki/Transport_Layer_Security]:
+ #
+ # Raises IOError if attempting to change during a session.
+ #
+ # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.
def use_ssl=(flag)
flag = flag ? true : false
if started? and @use_ssl != flag
@@ -836,6 +1446,7 @@ module Net #:nodoc:
:@cert,
:@cert_store,
:@ciphers,
+ :@extra_chain_cert,
:@key,
:@ssl_timeout,
:@ssl_version,
@@ -844,13 +1455,15 @@ module Net #:nodoc:
:@verify_callback,
:@verify_depth,
:@verify_mode,
- ]
+ :@verify_hostname,
+ ] # :nodoc:
SSL_ATTRIBUTES = [
:ca_file,
:ca_path,
:cert,
:cert_store,
:ciphers,
+ :extra_chain_cert,
:key,
:ssl_timeout,
:ssl_version,
@@ -859,56 +1472,68 @@ module Net #:nodoc:
:verify_callback,
:verify_depth,
:verify_mode,
- ]
+ :verify_hostname,
+ ] # :nodoc:
- # Sets path of a CA certification file in PEM format.
- #
- # The file can contain several CA certificates.
+ # Sets or returns the path to a CA certification file in PEM format.
attr_accessor :ca_file
- # Sets path of a CA certification directory containing certifications in
- # PEM format.
+ # Sets or returns the path of to CA directory
+ # containing certification files in PEM format.
attr_accessor :ca_path
- # Sets an OpenSSL::X509::Certificate object as client certificate.
- # (This method is appeared in Michal Rokos's OpenSSL extension).
+ # Sets or returns the OpenSSL::X509::Certificate object
+ # to be used for client certification.
attr_accessor :cert
- # Sets the X509::Store to verify peer certificate.
+ # Sets or returns the X509::Store to be used for verifying peer certificate.
attr_accessor :cert_store
- # Sets the available ciphers. See OpenSSL::SSL::SSLContext#ciphers=
+ # Sets or returns the available SSL ciphers.
+ # See {OpenSSL::SSL::SSLContext#ciphers=}[rdoc-ref:OpenSSL::SSL::SSLContext#ciphers-3D].
attr_accessor :ciphers
- # Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
- # (This method is appeared in Michal Rokos's OpenSSL extension.)
+ # Sets or returns the extra X509 certificates to be added to the certificate chain.
+ # See {OpenSSL::SSL::SSLContext#add_certificate}[rdoc-ref:OpenSSL::SSL::SSLContext#add_certificate].
+ attr_accessor :extra_chain_cert
+
+ # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
attr_accessor :key
- # Sets the SSL timeout seconds.
+ # Sets or returns the SSL timeout seconds.
attr_accessor :ssl_timeout
- # Sets the SSL version. See OpenSSL::SSL::SSLContext#ssl_version=
+ # Sets or returns the SSL version.
+ # See {OpenSSL::SSL::SSLContext#ssl_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#ssl_version-3D].
attr_accessor :ssl_version
- # Sets the minimum SSL version. See OpenSSL::SSL::SSLContext#min_version=
+ # Sets or returns the minimum SSL version.
+ # See {OpenSSL::SSL::SSLContext#min_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#min_version-3D].
attr_accessor :min_version
- # Sets the maximum SSL version. See OpenSSL::SSL::SSLContext#max_version=
+ # Sets or returns the maximum SSL version.
+ # See {OpenSSL::SSL::SSLContext#max_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#max_version-3D].
attr_accessor :max_version
- # Sets the verify callback for the server certification verification.
+ # Sets or returns the callback for the server certification verification.
attr_accessor :verify_callback
- # Sets the maximum depth for the certificate chain verification.
+ # Sets or returns the maximum depth for the certificate chain verification.
attr_accessor :verify_depth
- # Sets the flags for server the certification verification at beginning of
- # SSL/TLS session.
- #
+ # Sets or returns the flags for server the certification verification
+ # at the beginning of the SSL/TLS session.
# OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
attr_accessor :verify_mode
- # Returns the X.509 certificates the server presented.
+ # Sets or returns whether to verify that the server certificate is valid
+ # for the hostname.
+ # See {OpenSSL::SSL::SSLContext#verify_hostname=}[rdoc-ref:OpenSSL::SSL::SSLContext#attribute-i-verify_mode].
+ attr_accessor :verify_hostname
+
+ # Returns the X509 certificate chain (an array of strings)
+ # for the session's socket peer,
+ # or +nil+ if none.
def peer_cert
if not use_ssl? or not @socket
return nil
@@ -916,14 +1541,26 @@ module Net #:nodoc:
@socket.io.peer_cert
end
- # Opens a TCP connection and HTTP session.
+ # Starts an \HTTP session.
#
- # When this method is called with a block, it passes the Net::HTTP
- # object to the block, and closes the TCP connection and HTTP session
- # after the block has been executed.
+ # Without a block, returns +self+:
#
- # When called with a block, it returns the return value of the
- # block; otherwise, it returns self.
+ # http = Net::HTTP.new(hostname)
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
+ # http.start
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=true>
+ # http.started? # => true
+ # http.finish
+ #
+ # With a block, calls the block with +self+,
+ # finishes the session when the block exits,
+ # and returns the block's value:
+ #
+ # http.start do |http|
+ # http
+ # end
+ # # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
+ # http.started? # => false
#
def start # :yield: http
raise IOError, 'HTTP session already opened' if @started
@@ -946,6 +1583,12 @@ module Net #:nodoc:
private :do_start
def connect
+ if use_ssl?
+ # reference early to load OpenSSL before connecting,
+ # as OpenSSL may take time to load.
+ @ssl_context = OpenSSL::SSL::SSLContext.new
+ end
+
if proxy? then
conn_addr = proxy_address
conn_port = proxy_port
@@ -954,7 +1597,7 @@ module Net #:nodoc:
conn_port = port
end
- D "opening connection to #{conn_addr}:#{conn_port}..."
+ debug "opening connection to #{conn_addr}:#{conn_port}..."
s = Timeout.timeout(@open_timeout, Net::OpenTimeout) {
begin
TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
@@ -964,15 +1607,15 @@ module Net #:nodoc:
end
}
s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
- D "opened"
+ debug "opened"
if use_ssl?
if proxy?
plain_sock = BufferedIO.new(s, read_timeout: @read_timeout,
write_timeout: @write_timeout,
continue_timeout: @continue_timeout,
debug_output: @debug_output)
- buf = "CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n"
- buf << "Host: #{@address}:#{@port}\r\n"
+ buf = +"CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n" \
+ "Host: #{@address}:#{@port}\r\n"
if proxy_user
credential = ["#{proxy_user}:#{proxy_pass}"].pack('m0')
buf << "Proxy-Authorization: Basic #{credential}\r\n"
@@ -986,40 +1629,63 @@ module Net #:nodoc:
ssl_parameters = Hash.new
iv_list = instance_variables
SSL_IVNAMES.each_with_index do |ivname, i|
- if iv_list.include?(ivname) and
+ if iv_list.include?(ivname)
value = instance_variable_get(ivname)
- ssl_parameters[SSL_ATTRIBUTES[i]] = value if value
+ unless value.nil?
+ ssl_parameters[SSL_ATTRIBUTES[i]] = value
+ end
end
end
- @ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params(ssl_parameters)
- @ssl_context.session_cache_mode =
- OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
- OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
- @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
- D "starting SSL for #{conn_addr}:#{conn_port}..."
+ unless @ssl_context.session_cache_mode.nil? # a dummy method on JRuby
+ @ssl_context.session_cache_mode =
+ OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT |
+ OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE
+ end
+ if @ssl_context.respond_to?(:session_new_cb) # not implemented under JRuby
+ @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }
+ end
+
+ # Still do the post_connection_check below even if connecting
+ # to IP address
+ verify_hostname = @ssl_context.verify_hostname
+
+ # Server Name Indication (SNI) RFC 3546/6066
+ case @address
+ when Resolv::IPv4::Regex, Resolv::IPv6::Regex
+ # don't set SNI, as IP addresses in SNI is not valid
+ # per RFC 6066, section 3.
+
+ # Avoid openssl warning
+ @ssl_context.verify_hostname = false
+ else
+ ssl_host_address = @address
+ end
+
+ debug "starting SSL for #{conn_addr}:#{conn_port}..."
s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
s.sync_close = true
- # Server Name Indication (SNI) RFC 3546
- s.hostname = @address if s.respond_to? :hostname=
+ s.hostname = ssl_host_address if s.respond_to?(:hostname=) && ssl_host_address
+
if @ssl_session and
Process.clock_gettime(Process::CLOCK_REALTIME) < @ssl_session.time.to_f + @ssl_session.timeout
s.session = @ssl_session
end
ssl_socket_connect(s, @open_timeout)
- if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
+ if (@ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE) && verify_hostname
s.post_connection_check(@address)
end
- D "SSL established, protocol: #{s.ssl_version}, cipher: #{s.cipher[0]}"
+ debug "SSL established, protocol: #{s.ssl_version}, cipher: #{s.cipher[0]}"
end
@socket = BufferedIO.new(s, read_timeout: @read_timeout,
write_timeout: @write_timeout,
continue_timeout: @continue_timeout,
debug_output: @debug_output)
+ @last_communicated = nil
on_connect
rescue => exception
if s
- D "Conn close because of connect error #{exception}"
+ debug "Conn close because of connect error #{exception}"
s.close
end
raise
@@ -1030,8 +1696,15 @@ module Net #:nodoc:
end
private :on_connect
- # Finishes the HTTP session and closes the TCP connection.
- # Raises IOError if the session has not been started.
+ # Finishes the \HTTP session:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.start
+ # http.started? # => true
+ # http.finish # => nil
+ # http.started? # => false
+ #
+ # Raises IOError if not in a session.
def finish
raise IOError, 'HTTP session not yet started' unless started?
do_finish
@@ -1058,12 +1731,12 @@ module Net #:nodoc:
@proxy_user = nil
@proxy_pass = nil
- # Creates an HTTP proxy class which behaves like Net::HTTP, but
+ # Creates an \HTTP proxy class which behaves like \Net::HTTP, but
# performs all access via the specified proxy.
#
# This class is obsolete. You may pass these same parameters directly to
- # Net::HTTP.new. See Net::HTTP.new for details of the arguments.
- def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil)
+ # \Net::HTTP.new. See Net::HTTP.new for details of the arguments.
+ def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) #:nodoc:
return self unless p_addr
Class.new(self) {
@@ -1085,31 +1758,37 @@ module Net #:nodoc:
end
class << HTTP
- # returns true if self is a class which was created by HTTP::Proxy.
+ # Returns true if self is a class which was created by HTTP::Proxy.
def proxy_class?
defined?(@is_proxy_class) ? @is_proxy_class : false
end
- # Address of proxy host. If Net::HTTP does not use a proxy, nil.
+ # Returns the address of the proxy host, or +nil+ if none;
+ # see Net::HTTP@Proxy+Server.
attr_reader :proxy_address
- # Port number of proxy host. If Net::HTTP does not use a proxy, nil.
+ # Returns the port number of the proxy host, or +nil+ if none;
+ # see Net::HTTP@Proxy+Server.
attr_reader :proxy_port
- # User name for accessing proxy. If Net::HTTP does not use a proxy, nil.
+ # Returns the user name for accessing the proxy, or +nil+ if none;
+ # see Net::HTTP@Proxy+Server.
attr_reader :proxy_user
- # User password for accessing proxy. If Net::HTTP does not use a proxy,
- # nil.
+ # Returns the password for accessing the proxy, or +nil+ if none;
+ # see Net::HTTP@Proxy+Server.
attr_reader :proxy_pass
end
- # True if requests for this connection will be proxied
+ # Returns +true+ if a proxy server is defined, +false+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy?
!!(@proxy_from_env ? proxy_uri : @proxy_address)
end
- # True if the proxy for this connection is determined from the environment
+ # Returns +true+ if the proxy server is defined in the environment,
+ # +false+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy_from_env?
@proxy_from_env
end
@@ -1118,12 +1797,13 @@ module Net #:nodoc:
def proxy_uri # :nodoc:
return if @proxy_uri == false
@proxy_uri ||= URI::HTTP.new(
- "http".freeze, nil, address, port, nil, nil, nil, nil, nil
+ "http", nil, address, port, nil, nil, nil, nil, nil
).find_proxy || false
@proxy_uri || nil
end
- # The address of the proxy server, if one is configured.
+ # Returns the address of the proxy server, if defined, +nil+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy_address
if @proxy_from_env then
proxy_uri&.hostname
@@ -1132,7 +1812,8 @@ module Net #:nodoc:
end
end
- # The port of the proxy server, if one is configured.
+ # Returns the port number of the proxy server, if defined, +nil+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy_port
if @proxy_from_env then
proxy_uri&.port
@@ -1141,26 +1822,23 @@ module Net #:nodoc:
end
end
- # [Bug #12921]
- if /linux|freebsd|darwin/ =~ RUBY_PLATFORM
- ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = true
- else
- ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE = false
- end
-
- # The username of the proxy server, if one is configured.
+ # Returns the user name of the proxy server, if defined, +nil+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy_user
- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
- proxy_uri&.user
+ if @proxy_from_env
+ user = proxy_uri&.user
+ unescape(user) if user
else
@proxy_user
end
end
- # The password of the proxy server, if one is configured.
+ # Returns the password of the proxy server, if defined, +nil+ otherwise;
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
def proxy_pass
- if ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE && @proxy_from_env
- proxy_uri&.password
+ if @proxy_from_env
+ pass = proxy_uri&.password
+ unescape(pass) if pass
else
@proxy_pass
end
@@ -1171,6 +1849,11 @@ module Net #:nodoc:
private
+ def unescape(value)
+ require 'cgi/util'
+ CGI.unescape(value)
+ end
+
# without proxy, obsolete
def conn_address # :nodoc:
@@ -1199,45 +1882,38 @@ module Net #:nodoc:
public
- # Retrieves data from +path+ on the connected-to host which may be an
- # absolute path String or a URI to extract the path from.
+ # :call-seq:
+ # get(path, initheader = nil) {|res| ... }
+ #
+ # Sends a GET request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Get object
+ # created from string +path+ and initial headers hash +initheader+.
#
- # +initheader+ must be a Hash like { 'Accept' => '*/*', ... },
- # and it defaults to an empty hash.
- # If +initheader+ doesn't have the key 'accept-encoding', then
- # a value of "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" is used,
- # so that gzip compression is used in preference to deflate
- # compression, which is used in preference to no compression.
- # Ruby doesn't have libraries to support the compress (Lempel-Ziv)
- # compression, so that is not supported. The intent of this is
- # to reduce bandwidth by default. If this routine sets up
- # compression, then it does the decompression also, removing
- # the header as well to prevent confusion. Otherwise
- # it leaves the body as it found it.
+ # With a block given, calls the block with the response body:
#
- # This method returns a Net::HTTPResponse object.
+ # http = Net::HTTP.new(hostname)
+ # http.get('/todos/1') do |res|
+ # p res
+ # end # => #<Net::HTTPOK 200 OK readbody=true>
+ #
+ # Output:
#
- # If called with a block, yields each fragment of the
- # entity body in turn as a string as it is read from
- # the socket. Note that in this case, the returned response
- # object will *not* contain a (meaningful) body.
+ # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}"
#
- # +dest+ argument is obsolete.
- # It still works but you must not use it.
+ # With no block given, simply returns the response object:
#
- # This method never raises an exception.
+ # http.get('/') # => #<Net::HTTPOK 200 OK readbody=true>
#
- # response = http.get('/index.html')
+ # Related:
#
- # # using block
- # File.open('result.txt', 'w') {|f|
- # http.get('/~foo/') do |str|
- # f.write str
- # end
- # }
+ # - Net::HTTP::Get: request class for \HTTP method GET.
+ # - Net::HTTP.get: sends GET request, returns response body.
#
def get(path, initheader = nil, dest = nil, &block) # :yield: +body_segment+
res = nil
+
request(Get.new(path, initheader)) {|r|
r.read_body dest, &block
res = r
@@ -1245,198 +1921,312 @@ module Net #:nodoc:
res
end
- # Gets only the header from +path+ on the connected-to host.
- # +header+ is a Hash like { 'Accept' => '*/*', ... }.
- #
- # This method returns a Net::HTTPResponse object.
+ # Sends a HEAD request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
#
- # This method never raises an exception.
+ # The request is based on the Net::HTTP::Head object
+ # created from string +path+ and initial headers hash +initheader+:
#
- # response = nil
- # Net::HTTP.start('some.www.server', 80) {|http|
- # response = http.head('/index.html')
- # }
- # p response['content-type']
+ # res = http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
+ # res.body # => nil
+ # res.to_hash.take(3)
+ # # =>
+ # [["date", ["Wed, 15 Feb 2023 15:25:42 GMT"]],
+ # ["content-type", ["application/json; charset=utf-8"]],
+ # ["connection", ["close"]]]
#
def head(path, initheader = nil)
request(Head.new(path, initheader))
end
- # Posts +data+ (must be a String) to +path+. +header+ must be a Hash
- # like { 'Accept' => '*/*', ... }.
+ # :call-seq:
+ # post(path, data, initheader = nil) {|res| ... }
+ #
+ # Sends a POST request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
#
- # This method returns a Net::HTTPResponse object.
+ # The request is based on the Net::HTTP::Post object
+ # created from string +path+, string +data+, and initial headers hash +initheader+.
#
- # If called with a block, yields each fragment of the
- # entity body in turn as a string as it is read from
- # the socket. Note that in this case, the returned response
- # object will *not* contain a (meaningful) body.
+ # With a block given, calls the block with the response body:
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.post('/todos', data) do |res|
+ # p res
+ # end # => #<Net::HTTPCreated 201 Created readbody=true>
#
- # +dest+ argument is obsolete.
- # It still works but you must not use it.
+ # Output:
#
- # This method never raises exception.
+ # "{\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n \"id\": 201\n}"
#
- # response = http.post('/cgi-bin/search.rb', 'query=foo')
+ # With no block given, simply returns the response object:
#
- # # using block
- # File.open('result.txt', 'w') {|f|
- # http.post('/cgi-bin/search.rb', 'query=foo') do |str|
- # f.write str
- # end
- # }
+ # http.post('/todos', data) # => #<Net::HTTPCreated 201 Created readbody=true>
#
- # You should set Content-Type: header field for POST.
- # If no Content-Type: field given, this method uses
- # "application/x-www-form-urlencoded" by default.
+ # Related:
+ #
+ # - Net::HTTP::Post: request class for \HTTP method POST.
+ # - Net::HTTP.post: sends POST request, returns response body.
#
def post(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
send_entity(path, data, initheader, dest, Post, &block)
end
- # Sends a PATCH request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # :call-seq:
+ # patch(path, data, initheader = nil) {|res| ... }
+ #
+ # Sends a PATCH request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Patch object
+ # created from string +path+, string +data+, and initial headers hash +initheader+.
+ #
+ # With a block given, calls the block with the response body:
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.patch('/todos/1', data) do |res|
+ # p res
+ # end # => #<Net::HTTPOK 200 OK readbody=true>
+ #
+ # Output:
+ #
+ # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false,\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}"
+ #
+ # With no block given, simply returns the response object:
+ #
+ # http.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>
+ #
def patch(path, data, initheader = nil, dest = nil, &block) # :yield: +body_segment+
send_entity(path, data, initheader, dest, Patch, &block)
end
- def put(path, data, initheader = nil) #:nodoc:
+ # Sends a PUT request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Put object
+ # created from string +path+, string +data+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.put('/todos/1', data) # => #<Net::HTTPOK 200 OK readbody=true>
+ #
+ def put(path, data, initheader = nil)
request(Put.new(path, initheader), data)
end
- # Sends a PROPPATCH request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a PROPPATCH request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Proppatch object
+ # created from string +path+, string +body+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.proppatch('/todos/1', data)
+ #
def proppatch(path, body, initheader = nil)
request(Proppatch.new(path, initheader), body)
end
- # Sends a LOCK request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a LOCK request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Lock object
+ # created from string +path+, string +body+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.lock('/todos/1', data)
+ #
def lock(path, body, initheader = nil)
request(Lock.new(path, initheader), body)
end
- # Sends a UNLOCK request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends an UNLOCK request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Unlock object
+ # created from string +path+, string +body+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.unlock('/todos/1', data)
+ #
def unlock(path, body, initheader = nil)
request(Unlock.new(path, initheader), body)
end
- # Sends a OPTIONS request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends an Options request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Options object
+ # created from string +path+ and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.options('/')
+ #
def options(path, initheader = nil)
request(Options.new(path, initheader))
end
- # Sends a PROPFIND request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a PROPFIND request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Propfind object
+ # created from string +path+, string +body+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http = Net::HTTP.new(hostname)
+ # http.propfind('/todos/1', data)
+ #
def propfind(path, body = nil, initheader = {'Depth' => '0'})
request(Propfind.new(path, initheader), body)
end
- # Sends a DELETE request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a DELETE request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Delete object
+ # created from string +path+ and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.delete('/todos/1')
+ #
def delete(path, initheader = {'Depth' => 'Infinity'})
request(Delete.new(path, initheader))
end
- # Sends a MOVE request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a MOVE request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Move object
+ # created from string +path+ and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.move('/todos/1')
+ #
def move(path, initheader = nil)
request(Move.new(path, initheader))
end
- # Sends a COPY request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a COPY request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Copy object
+ # created from string +path+ and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.copy('/todos/1')
+ #
def copy(path, initheader = nil)
request(Copy.new(path, initheader))
end
- # Sends a MKCOL request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a MKCOL request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Mkcol object
+ # created from string +path+, string +body+, and initial headers hash +initheader+.
+ #
+ # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
+ # http.mkcol('/todos/1', data)
+ # http = Net::HTTP.new(hostname)
+ #
def mkcol(path, body = nil, initheader = nil)
request(Mkcol.new(path, initheader), body)
end
- # Sends a TRACE request to the +path+ and gets a response,
- # as an HTTPResponse object.
+ # Sends a TRACE request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Trace object
+ # created from string +path+ and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.trace('/todos/1')
+ #
def trace(path, initheader = nil)
request(Trace.new(path, initheader))
end
- # Sends a GET request to the +path+.
- # Returns the response as a Net::HTTPResponse object.
+ # Sends a GET request to the server;
+ # forms the response into a Net::HTTPResponse object.
#
- # When called with a block, passes an HTTPResponse object to the block.
- # The body of the response will not have been read yet;
- # the block can process it using HTTPResponse#read_body,
- # if desired.
+ # The request is based on the Net::HTTP::Get object
+ # created from string +path+ and initial headers hash +initheader+.
#
- # Returns the response.
+ # With no block given, returns the response object:
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.request_get('/todos') # => #<Net::HTTPOK 200 OK readbody=true>
#
- # This method never raises Net::* exceptions.
+ # With a block given, calls the block with the response object
+ # and returns the response object:
#
- # response = http.request_get('/index.html')
- # # The entity body is already read in this case.
- # p response['content-type']
- # puts response.body
+ # http.request_get('/todos') do |res|
+ # p res
+ # end # => #<Net::HTTPOK 200 OK readbody=true>
#
- # # Using a block
- # http.request_get('/index.html') {|response|
- # p response['content-type']
- # response.read_body do |str| # read body now
- # print str
- # end
- # }
+ # Output:
+ #
+ # #<Net::HTTPOK 200 OK readbody=false>
#
def request_get(path, initheader = nil, &block) # :yield: +response+
request(Get.new(path, initheader), &block)
end
- # Sends a HEAD request to the +path+ and returns the response
- # as a Net::HTTPResponse object.
- #
- # Returns the response.
+ # Sends a HEAD request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
#
- # This method never raises Net::* exceptions.
+ # The request is based on the Net::HTTP::Head object
+ # created from string +path+ and initial headers hash +initheader+.
#
- # response = http.request_head('/index.html')
- # p response['content-type']
+ # http = Net::HTTP.new(hostname)
+ # http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
#
def request_head(path, initheader = nil, &block)
request(Head.new(path, initheader), &block)
end
- # Sends a POST request to the +path+.
+ # Sends a POST request to the server;
+ # forms the response into a Net::HTTPResponse object.
#
- # Returns the response as a Net::HTTPResponse object.
+ # The request is based on the Net::HTTP::Post object
+ # created from string +path+, string +data+, and initial headers hash +initheader+.
#
- # When called with a block, the block is passed an HTTPResponse
- # object. The body of that response will not have been read yet;
- # the block can process it using HTTPResponse#read_body, if desired.
+ # With no block given, returns the response object:
#
- # Returns the response.
+ # http = Net::HTTP.new(hostname)
+ # http.post('/todos', 'xyzzy')
+ # # => #<Net::HTTPCreated 201 Created readbody=true>
+ #
+ # With a block given, calls the block with the response body
+ # and returns the response object:
#
- # This method never raises Net::* exceptions.
+ # http.post('/todos', 'xyzzy') do |res|
+ # p res
+ # end # => #<Net::HTTPCreated 201 Created readbody=true>
#
- # # example
- # response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
- # p response.status
- # puts response.body # body is already read in this case
+ # Output:
#
- # # using block
- # http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
- # p response.status
- # p response['content-type']
- # response.read_body do |str| # read body now
- # print str
- # end
- # }
+ # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}"
#
def request_post(path, data, initheader = nil, &block) # :yield: +response+
request Post.new(path, initheader), data, &block
end
+ # Sends a PUT request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
+ #
+ # The request is based on the Net::HTTP::Put object
+ # created from string +path+, string +data+, and initial headers hash +initheader+.
+ #
+ # http = Net::HTTP.new(hostname)
+ # http.put('/todos/1', 'xyzzy')
+ # # => #<Net::HTTPOK 200 OK readbody=true>
+ #
def request_put(path, data, initheader = nil, &block) #:nodoc:
request Put.new(path, initheader), data, &block
end
@@ -1446,16 +2236,25 @@ module Net #:nodoc:
alias post2 request_post #:nodoc: obsolete
alias put2 request_put #:nodoc: obsolete
-
- # Sends an HTTP request to the HTTP server.
- # Also sends a DATA string if +data+ is given.
+ # Sends an \HTTP request to the server;
+ # returns an instance of a subclass of Net::HTTPResponse.
#
- # Returns a Net::HTTPResponse object.
+ # The request is based on the Net::HTTPRequest object
+ # created from string +path+, string +data+, and initial headers hash +header+.
+ # That object is an instance of the
+ # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses],
+ # that corresponds to the given uppercase string +name+,
+ # which must be
+ # an {HTTP request method}[https://en.wikipedia.org/wiki/HTTP#Request_methods]
+ # or a {WebDAV request method}[https://en.wikipedia.org/wiki/WebDAV#Implementation].
#
- # This method never raises Net::* exceptions.
+ # Examples:
#
- # response = http.send_request('GET', '/index.html')
- # puts response.body
+ # http = Net::HTTP.new(hostname)
+ # http.send_request('GET', '/todos/1')
+ # # => #<Net::HTTPOK 200 OK readbody=true>
+ # http.send_request('POST', '/todos', 'xyzzy')
+ # # => #<Net::HTTPCreated 201 Created readbody=true>
#
def send_request(name, path, data = nil, header = nil)
has_response_body = name != 'HEAD'
@@ -1463,20 +2262,35 @@ module Net #:nodoc:
request r, data
end
- # Sends an HTTPRequest object +req+ to the HTTP server.
+ # Sends the given request +req+ to the server;
+ # forms the response into a Net::HTTPResponse object.
#
- # If +req+ is a Net::HTTP::Post or Net::HTTP::Put request containing
- # data, the data is also sent. Providing data for a Net::HTTP::Head or
- # Net::HTTP::Get request results in an ArgumentError.
+ # The given +req+ must be an instance of a
+ # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses].
+ # Argument +body+ should be given only if needed for the request.
#
- # Returns an HTTPResponse object.
+ # With no block given, returns the response object:
#
- # When called with a block, passes an HTTPResponse object to the block.
- # The body of the response will not have been read yet;
- # the block can process it using HTTPResponse#read_body,
- # if desired.
+ # http = Net::HTTP.new(hostname)
+ #
+ # req = Net::HTTP::Get.new('/todos/1')
+ # http.request(req)
+ # # => #<Net::HTTPOK 200 OK readbody=true>
+ #
+ # req = Net::HTTP::Post.new('/todos')
+ # http.request(req, 'xyzzy')
+ # # => #<Net::HTTPCreated 201 Created readbody=true>
+ #
+ # With a block given, calls the block with the response and returns the response:
#
- # This method never raises Net::* exceptions.
+ # req = Net::HTTP::Get.new('/todos/1')
+ # http.request(req) do |res|
+ # p res
+ # end # => #<Net::HTTPOK 200 OK readbody=true>
+ #
+ # Output:
+ #
+ # #<Net::HTTPOK 200 OK readbody=false>
#
def request(req, body = nil, &block) # :yield: +response+
unless started?
@@ -1527,6 +2341,8 @@ module Net #:nodoc:
begin
res = HTTPResponse.read_new(@socket)
res.decode_content = req.decode_content
+ res.body_encoding = @response_body_encoding
+ res.ignore_eof = @ignore_eof
end while res.kind_of?(HTTPInformation)
res.uri = req.uri
@@ -1546,10 +2362,10 @@ module Net #:nodoc:
if count < max_retries && IDEMPOTENT_METHODS_.include?(req.method)
count += 1
@socket.close if @socket
- D "Conn close because of error #{exception}, and retry"
+ debug "Conn close because of error #{exception}, and retry"
retry
end
- D "Conn close because of error #{exception}"
+ debug "Conn close because of error #{exception}"
@socket.close if @socket
raise
end
@@ -1557,7 +2373,7 @@ module Net #:nodoc:
end_transport req, res
res
rescue => exception
- D "Conn close because of error #{exception}"
+ debug "Conn close because of error #{exception}"
@socket.close if @socket
raise exception
end
@@ -1567,11 +2383,11 @@ module Net #:nodoc:
connect
elsif @last_communicated
if @last_communicated + @keep_alive_timeout < Process.clock_gettime(Process::CLOCK_MONOTONIC)
- D 'Conn close because of keep_alive_timeout'
+ debug 'Conn close because of keep_alive_timeout'
@socket.close
connect
elsif @socket.io.to_io.wait_readable(0) && @socket.eof?
- D "Conn close because of EOF"
+ debug "Conn close because of EOF"
@socket.close
connect
end
@@ -1589,15 +2405,15 @@ module Net #:nodoc:
@curr_http_version = res.http_version
@last_communicated = nil
if @socket.closed?
- D 'Conn socket closed'
+ debug 'Conn socket closed'
elsif not res.body and @close_on_empty_response
- D 'Conn close'
+ debug 'Conn close'
@socket.close
elsif keep_alive?(req, res)
- D 'Conn keep-alive'
+ debug 'Conn keep-alive'
@last_communicated = Process.clock_gettime(Process::CLOCK_MONOTONIC)
else
- D 'Conn close'
+ debug 'Conn close'
@socket.close
end
end
@@ -1652,11 +2468,14 @@ module Net #:nodoc:
default_port == port ? addr : "#{addr}:#{port}"
end
- def D(msg)
+ # Adds a message to debugging output
+ def debug(msg)
return unless @debug_output
@debug_output << msg
@debug_output << "\n"
end
+
+ alias_method :D, :debug
end
end
diff --git a/lib/net/http/backward.rb b/lib/net/http/backward.rb
index 9e24eae32c..b44577edbd 100644
--- a/lib/net/http/backward.rb
+++ b/lib/net/http/backward.rb
@@ -1,26 +1,40 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
# for backward compatibility
# :enddoc:
class Net::HTTP
ProxyMod = ProxyDelta
-end
-
-module Net
- HTTPSession = Net::HTTP
+ deprecate_constant :ProxyMod
end
module Net::NetPrivate
HTTPRequest = ::Net::HTTPRequest
+ deprecate_constant :HTTPRequest
end
-Net::HTTPInformationCode = Net::HTTPInformation
-Net::HTTPSuccessCode = Net::HTTPSuccess
-Net::HTTPRedirectionCode = Net::HTTPRedirection
-Net::HTTPRetriableCode = Net::HTTPRedirection
-Net::HTTPClientErrorCode = Net::HTTPClientError
-Net::HTTPFatalErrorCode = Net::HTTPClientError
-Net::HTTPServerErrorCode = Net::HTTPServerError
-Net::HTTPResponceReceiver = Net::HTTPResponse
+module Net
+ HTTPSession = HTTP
+ HTTPInformationCode = HTTPInformation
+ HTTPSuccessCode = HTTPSuccess
+ HTTPRedirectionCode = HTTPRedirection
+ HTTPRetriableCode = HTTPRedirection
+ HTTPClientErrorCode = HTTPClientError
+ HTTPFatalErrorCode = HTTPClientError
+ HTTPServerErrorCode = HTTPServerError
+ HTTPResponseReceiver = HTTPResponse
+
+ HTTPResponceReceiver = HTTPResponse # Typo since 2001
+
+ deprecate_constant :HTTPSession,
+ :HTTPInformationCode,
+ :HTTPSuccessCode,
+ :HTTPRedirectionCode,
+ :HTTPRetriableCode,
+ :HTTPClientErrorCode,
+ :HTTPFatalErrorCode,
+ :HTTPServerErrorCode,
+ :HTTPResponseReceiver,
+ :HTTPResponceReceiver
+end
diff --git a/lib/net/http/exceptions.rb b/lib/net/http/exceptions.rb
index da5f7a70fc..ceec8f7b0a 100644
--- a/lib/net/http/exceptions.rb
+++ b/lib/net/http/exceptions.rb
@@ -1,33 +1,34 @@
-# frozen_string_literal: false
-# Net::HTTP exception class.
-# You cannot use Net::HTTPExceptions directly; instead, you must use
-# its subclasses.
-module Net::HTTPExceptions
- def initialize(msg, res) #:nodoc:
- super msg
- @response = res
+# frozen_string_literal: true
+module Net
+ # Net::HTTP exception class.
+ # You cannot use Net::HTTPExceptions directly; instead, you must use
+ # its subclasses.
+ module HTTPExceptions
+ def initialize(msg, res) #:nodoc:
+ super msg
+ @response = res
+ end
+ attr_reader :response
+ alias data response #:nodoc: obsolete
end
- attr_reader :response
- alias data response #:nodoc: obsolete
-end
-class Net::HTTPError < Net::ProtocolError
- include Net::HTTPExceptions
-end
-class Net::HTTPRetriableError < Net::ProtoRetriableError
- include Net::HTTPExceptions
-end
-class Net::HTTPServerException < Net::ProtoServerError
- # We cannot use the name "HTTPServerError", it is the name of the response.
- include Net::HTTPExceptions
-end
-# for compatibility
-Net::HTTPClientException = Net::HTTPServerException
+ class HTTPError < ProtocolError
+ include HTTPExceptions
+ end
-class Net::HTTPFatalError < Net::ProtoFatalError
- include Net::HTTPExceptions
-end
+ class HTTPRetriableError < ProtoRetriableError
+ include HTTPExceptions
+ end
-module Net
+ class HTTPClientException < ProtoServerError
+ include HTTPExceptions
+ end
+
+ class HTTPFatalError < ProtoFatalError
+ include HTTPExceptions
+ end
+
+ # We cannot use the name "HTTPServerError", it is the name of the response.
+ HTTPServerException = HTTPClientException # :nodoc:
deprecate_constant(:HTTPServerException)
end
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb
index 003f59d0ac..44e329a0c8 100644
--- a/lib/net/http/generic_request.rb
+++ b/lib/net/http/generic_request.rb
@@ -1,24 +1,29 @@
-# frozen_string_literal: false
-# HTTPGenericRequest is the parent of the Net::HTTPRequest class.
-# Do not use this directly; use a subclass of Net::HTTPRequest.
+# frozen_string_literal: true
#
-# Mixes in the Net::HTTPHeader module to provide easier access to HTTP headers.
+# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
+#
+# Do not use this directly; instead, use a subclass of Net::HTTPRequest.
+#
+# == About the Examples
+#
+# :include: doc/net-http/examples.rdoc
#
class Net::HTTPGenericRequest
include Net::HTTPHeader
- def initialize(m, reqbody, resbody, uri_or_path, initheader = nil)
+ def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) # :nodoc:
@method = m
@request_has_body = reqbody
@response_has_body = resbody
if URI === uri_or_path then
raise ArgumentError, "not an HTTP URI" unless URI::HTTP === uri_or_path
- raise ArgumentError, "no host component for URI" unless uri_or_path.hostname
+ hostname = uri_or_path.hostname
+ raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
@uri = uri_or_path.dup
host = @uri.hostname.dup
- host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port
+ host << ":" << @uri.port.to_s if @uri.port != @uri.default_port
@path = uri_or_path.request_uri
raise ArgumentError, "no HTTP request path given" unless @path
else
@@ -31,12 +36,12 @@ class Net::HTTPGenericRequest
@decode_content = false
- if @response_has_body and Net::HTTP::HAVE_ZLIB then
+ if Net::HTTP::HAVE_ZLIB then
if !initheader ||
!initheader.keys.any? { |k|
%w[accept-encoding range].include? k.downcase
} then
- @decode_content = true
+ @decode_content = true if @response_has_body
initheader = initheader ? initheader.dup : {}
initheader["accept-encoding"] =
"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
@@ -52,15 +57,47 @@ class Net::HTTPGenericRequest
@body_data = nil
end
+ # Returns the string method name for the request:
+ #
+ # Net::HTTP::Get.new(uri).method # => "GET"
+ # Net::HTTP::Post.new(uri).method # => "POST"
+ #
attr_reader :method
+
+ # Returns the string path for the request:
+ #
+ # Net::HTTP::Get.new(uri).path # => "/"
+ # Net::HTTP::Post.new('example.com').path # => "example.com"
+ #
attr_reader :path
+
+ # Returns the URI object for the request, or +nil+ if none:
+ #
+ # Net::HTTP::Get.new(uri).uri
+ # # => #<URI::HTTPS https://jsonplaceholder.typicode.com/>
+ # Net::HTTP::Get.new('example.com').uri # => nil
+ #
attr_reader :uri
- # Automatically set to false if the user sets the Accept-Encoding header.
- # This indicates they wish to handle Content-encoding in responses
- # themselves.
+ # Returns +false+ if the request's header <tt>'Accept-Encoding'</tt>
+ # has been set manually or deleted
+ # (indicating that the user intends to handle encoding in the response),
+ # +true+ otherwise:
+ #
+ # req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
+ # req['Accept-Encoding'] # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
+ # req.decode_content # => true
+ # req['Accept-Encoding'] = 'foo'
+ # req.decode_content # => false
+ # req.delete('Accept-Encoding')
+ # req.decode_content # => false
+ #
attr_reader :decode_content
+ # Returns a string representation of the request:
+ #
+ # Net::HTTP::Post.new(uri).inspect # => "#<Net::HTTP::Post POST>"
+ #
def inspect
"\#<#{self.class} #{@method}>"
end
@@ -75,21 +112,45 @@ class Net::HTTPGenericRequest
super key, val
end
+ # Returns whether the request may have a body:
+ #
+ # Net::HTTP::Post.new(uri).request_body_permitted? # => true
+ # Net::HTTP::Get.new(uri).request_body_permitted? # => false
+ #
def request_body_permitted?
@request_has_body
end
+ # Returns whether the response may have a body:
+ #
+ # Net::HTTP::Post.new(uri).response_body_permitted? # => true
+ # Net::HTTP::Head.new(uri).response_body_permitted? # => false
+ #
def response_body_permitted?
@response_has_body
end
- def body_exist?
+ def body_exist? # :nodoc:
warn "Net::HTTPRequest#body_exist? is obsolete; use response_body_permitted?", uplevel: 1 if $VERBOSE
response_body_permitted?
end
+ # Returns the string body for the request, or +nil+ if there is none:
+ #
+ # req = Net::HTTP::Post.new(uri)
+ # req.body # => nil
+ # req.body = '{"title": "foo","body": "bar","userId": 1}'
+ # req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
+ #
attr_reader :body
+ # Sets the body for the request:
+ #
+ # req = Net::HTTP::Post.new(uri)
+ # req.body # => nil
+ # req.body = '{"title": "foo","body": "bar","userId": 1}'
+ # req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}"
+ #
def body=(str)
@body = str
@body_stream = nil
@@ -97,8 +158,24 @@ class Net::HTTPGenericRequest
str
end
+ # Returns the body stream object for the request, or +nil+ if there is none:
+ #
+ # req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
+ # req.body_stream # => nil
+ # require 'stringio'
+ # req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
+ # req.body_stream # => #<StringIO:0x0000027d1e5affa8>
+ #
attr_reader :body_stream
+ # Sets the body stream for the request:
+ #
+ # req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
+ # req.body_stream # => nil
+ # require 'stringio'
+ # req.body_stream = StringIO.new('xyzzy') # => #<StringIO:0x0000027d1e5affa8>
+ # req.body_stream # => #<StringIO:0x0000027d1e5affa8>
+ #
def body_stream=(input)
@body = nil
@body_stream = input
@@ -135,15 +212,15 @@ class Net::HTTPGenericRequest
return unless @uri
if ssl
- scheme = 'https'.freeze
+ scheme = 'https'
klass = URI::HTTPS
else
- scheme = 'http'.freeze
+ scheme = 'http'
klass = URI::HTTP
end
if host = self['host']
- host.sub!(/:.*/s, ''.freeze)
+ host.sub!(/:.*/m, '')
elsif host = @uri.host
else
host = addr
@@ -202,9 +279,7 @@ class Net::HTTPGenericRequest
IO.copy_stream(f, chunker)
chunker.finish
else
- # copy_stream can sendfile() to sock.io unless we use SSL.
- # If sock.io is an SSLSocket, copy_stream will hit SSL_write()
- IO.copy_stream(f, sock.io)
+ IO.copy_stream(f, sock)
end
end
@@ -241,7 +316,7 @@ class Net::HTTPGenericRequest
boundary ||= SecureRandom.urlsafe_base64(40)
chunked_p = chunked?
- buf = ''
+ buf = +''
params.each do |key, value, h={}|
key = quote_string(key, charset)
filename =
@@ -326,7 +401,7 @@ class Net::HTTPGenericRequest
if /[\r\n]/ =~ reqline
raise ArgumentError, "A Request-Line must not contain CR or LF"
end
- buf = ""
+ buf = +''
buf << reqline << "\r\n"
each_capitalized do |k,v|
buf << "#{k}: #{v}\r\n"
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb
index 8641be4eae..6660c8075a 100644
--- a/lib/net/http/header.rb
+++ b/lib/net/http/header.rb
@@ -1,16 +1,188 @@
-# frozen_string_literal: false
-# The HTTPHeader module defines methods for reading and writing
-# HTTP headers.
+# frozen_string_literal: true
#
-# It is used as a mixin by other classes, to provide hash-like
-# access to HTTP header values. Unlike raw hash access, HTTPHeader
-# provides access via case-insensitive keys. It also provides
-# methods for accessing commonly-used HTTP header values in more
-# convenient formats.
+# The \HTTPHeader module provides access to \HTTP headers.
+#
+# The module is included in:
+#
+# - Net::HTTPGenericRequest (and therefore Net::HTTPRequest).
+# - Net::HTTPResponse.
+#
+# The headers are a hash-like collection of key/value pairs called _fields_.
+#
+# == Request and Response Fields
+#
+# Headers may be included in:
+#
+# - A Net::HTTPRequest object:
+# the object's headers will be sent with the request.
+# Any fields may be defined in the request;
+# see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
+# - A Net::HTTPResponse object:
+# the objects headers are usually those returned from the host.
+# Fields may be retrieved from the object;
+# see {Getters}[rdoc-ref:Net::HTTPHeader@Getters]
+# and {Iterators}[rdoc-ref:Net::HTTPHeader@Iterators].
+#
+# Exactly which fields should be sent or expected depends on the host;
+# see:
+#
+# - {Request fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
+# - {Response fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields].
+#
+# == About the Examples
+#
+# :include: doc/net-http/examples.rdoc
+#
+# == Fields
+#
+# A header field is a key/value pair.
+#
+# === Field Keys
+#
+# A field key may be:
+#
+# - A string: Key <tt>'Accept'</tt> is treated as if it were
+# <tt>'Accept'.downcase</tt>; i.e., <tt>'accept'</tt>.
+# - A symbol: Key <tt>:Accept</tt> is treated as if it were
+# <tt>:Accept.to_s.downcase</tt>; i.e., <tt>'accept'</tt>.
+#
+# Examples:
+#
+# req = Net::HTTP::Get.new(uri)
+# req[:accept] # => "*/*"
+# req['Accept'] # => "*/*"
+# req['ACCEPT'] # => "*/*"
+#
+# req['accept'] = 'text/html'
+# req[:accept] = 'text/html'
+# req['ACCEPT'] = 'text/html'
+#
+# === Field Values
+#
+# A field value may be returned as an array of strings or as a string:
+#
+# - These methods return field values as arrays:
+#
+# - #get_fields: Returns the array value for the given key,
+# or +nil+ if it does not exist.
+# - #to_hash: Returns a hash of all header fields:
+# each key is a field name; its value is the array value for the field.
+#
+# - These methods return field values as string;
+# the string value for a field is equivalent to
+# <tt>self[key.downcase.to_s].join(', '))</tt>:
+#
+# - #[]: Returns the string value for the given key,
+# or +nil+ if it does not exist.
+# - #fetch: Like #[], but accepts a default value
+# to be returned if the key does not exist.
+#
+# The field value may be set:
+#
+# - #[]=: Sets the value for the given key;
+# the given value may be a string, a symbol, an array, or a hash.
+# - #add_field: Adds a given value to a value for the given key
+# (not overwriting the existing value).
+# - #delete: Deletes the field for the given key.
+#
+# Example field values:
+#
+# - \String:
+#
+# req['Accept'] = 'text/html' # => "text/html"
+# req['Accept'] # => "text/html"
+# req.get_fields('Accept') # => ["text/html"]
+#
+# - \Symbol:
+#
+# req['Accept'] = :text # => :text
+# req['Accept'] # => "text"
+# req.get_fields('Accept') # => ["text"]
+#
+# - Simple array:
+#
+# req[:foo] = %w[bar baz bat]
+# req[:foo] # => "bar, baz, bat"
+# req.get_fields(:foo) # => ["bar", "baz", "bat"]
+#
+# - Simple hash:
+#
+# req[:foo] = {bar: 0, baz: 1, bat: 2}
+# req[:foo] # => "bar, 0, baz, 1, bat, 2"
+# req.get_fields(:foo) # => ["bar", "0", "baz", "1", "bat", "2"]
+#
+# - Nested:
+#
+# req[:foo] = [%w[bar baz], {bat: 0, bam: 1}]
+# req[:foo] # => "bar, baz, bat, 0, bam, 1"
+# req.get_fields(:foo) # => ["bar", "baz", "bat", "0", "bam", "1"]
+#
+# req[:foo] = {bar: %w[baz bat], bam: {bah: 0, bad: 1}}
+# req[:foo] # => "bar, baz, bat, bam, bah, 0, bad, 1"
+# req.get_fields(:foo) # => ["bar", "baz", "bat", "bam", "bah", "0", "bad", "1"]
+#
+# == Convenience Methods
+#
+# Various convenience methods retrieve values, set values, query values,
+# set form values, or iterate over fields.
+#
+# === Setters
+#
+# \Method #[]= can set any field, but does little to validate the new value;
+# some of the other setter methods provide some validation:
+#
+# - #[]=: Sets the string or array value for the given key.
+# - #add_field: Creates or adds to the array value for the given key.
+# - #basic_auth: Sets the string authorization header for <tt>'Authorization'</tt>.
+# - #content_length=: Sets the integer length for field <tt>'Content-Length</tt>.
+# - #content_type=: Sets the string value for field <tt>'Content-Type'</tt>.
+# - #proxy_basic_auth: Sets the string authorization header for <tt>'Proxy-Authorization'</tt>.
+# - #set_range: Sets the value for field <tt>'Range'</tt>.
+#
+# === Form Setters
+#
+# - #set_form: Sets an HTML form data set.
+# - #set_form_data: Sets header fields and a body from HTML form data.
+#
+# === Getters
+#
+# \Method #[] can retrieve the value of any field that exists,
+# but always as a string;
+# some of the other getter methods return something different
+# from the simple string value:
+#
+# - #[]: Returns the string field value for the given key.
+# - #content_length: Returns the integer value of field <tt>'Content-Length'</tt>.
+# - #content_range: Returns the Range value of field <tt>'Content-Range'</tt>.
+# - #content_type: Returns the string value of field <tt>'Content-Type'</tt>.
+# - #fetch: Returns the string field value for the given key.
+# - #get_fields: Returns the array field value for the given +key+.
+# - #main_type: Returns first part of the string value of field <tt>'Content-Type'</tt>.
+# - #sub_type: Returns second part of the string value of field <tt>'Content-Type'</tt>.
+# - #range: Returns an array of Range objects of field <tt>'Range'</tt>, or +nil+.
+# - #range_length: Returns the integer length of the range given in field <tt>'Content-Range'</tt>.
+# - #type_params: Returns the string parameters for <tt>'Content-Type'</tt>.
+#
+# === Queries
+#
+# - #chunked?: Returns whether field <tt>'Transfer-Encoding'</tt> is set to <tt>'chunked'</tt>.
+# - #connection_close?: Returns whether field <tt>'Connection'</tt> is set to <tt>'close'</tt>.
+# - #connection_keep_alive?: Returns whether field <tt>'Connection'</tt> is set to <tt>'keep-alive'</tt>.
+# - #key?: Returns whether a given key exists.
+#
+# === Iterators
+#
+# - #each_capitalized: Passes each field capitalized-name/value pair to the block.
+# - #each_capitalized_name: Passes each capitalized field name to the block.
+# - #each_header: Passes each field name/value pair to the block.
+# - #each_name: Passes each field name to the block.
+# - #each_value: Passes each string field value to the block.
#
module Net::HTTPHeader
+ MAX_KEY_LENGTH = 1024
+ MAX_FIELD_LENGTH = 65536
- def initialize_http_header(initheader)
+ def initialize_http_header(initheader) #:nodoc:
@header = {}
return unless initheader
initheader.each do |key, value|
@@ -19,6 +191,12 @@ module Net::HTTPHeader
warn "net/http: nil HTTP header: #{key}", uplevel: 3 if $VERBOSE
else
value = value.strip # raise error for invalid byte sequences
+ if key.to_s.bytesize > MAX_KEY_LENGTH
+ raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..."
+ end
+ if value.to_s.bytesize > MAX_FIELD_LENGTH
+ raise ArgumentError, "header #{key} has too long field value: #{value.bytesize}"
+ end
if value.count("\r\n") > 0
raise ArgumentError, "header #{key} has field value #{value.inspect}, this cannot include CR/LF"
end
@@ -33,14 +211,32 @@ module Net::HTTPHeader
alias length size #:nodoc: obsolete
- # Returns the header field corresponding to the case-insensitive key.
- # For example, a key of "Content-Type" might return "text/html"
+ # Returns the string field value for the case-insensitive field +key+,
+ # or +nil+ if there is no such key;
+ # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['Connection'] # => "keep-alive"
+ # res['Nosuch'] # => nil
+ #
+ # Note that some field values may be retrieved via convenience methods;
+ # see {Getters}[rdoc-ref:Net::HTTPHeader@Getters].
def [](key)
a = @header[key.downcase.to_s] or return nil
a.join(', ')
end
- # Sets the header field corresponding to the case-insensitive key.
+ # Sets the value for the case-insensitive +key+ to +val+,
+ # overwriting the previous value if the field exists;
+ # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req['Accept'] # => "*/*"
+ # req['Accept'] = 'text/html'
+ # req['Accept'] # => "text/html"
+ #
+ # Note that some field values may be set via convenience methods;
+ # see {Setters}[rdoc-ref:Net::HTTPHeader@Setters].
def []=(key, val)
unless val
@header.delete key.downcase.to_s
@@ -49,20 +245,18 @@ module Net::HTTPHeader
set_field(key, val)
end
- # [Ruby 1.8.3]
- # Adds a value to a named header field, instead of replacing its value.
- # Second argument +val+ must be a String.
- # See also #[]=, #[] and #get_fields.
+ # Adds value +val+ to the value array for field +key+ if the field exists;
+ # creates the field with the given +key+ and +val+ if it does not exist.
+ # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
#
- # request.add_field 'X-My-Header', 'a'
- # p request['X-My-Header'] #=> "a"
- # p request.get_fields('X-My-Header') #=> ["a"]
- # request.add_field 'X-My-Header', 'b'
- # p request['X-My-Header'] #=> "a, b"
- # p request.get_fields('X-My-Header') #=> ["a", "b"]
- # request.add_field 'X-My-Header', 'c'
- # p request['X-My-Header'] #=> "a, b, c"
- # p request.get_fields('X-My-Header') #=> ["a", "b", "c"]
+ # req = Net::HTTP::Get.new(uri)
+ # req.add_field('Foo', 'bar')
+ # req['Foo'] # => "bar"
+ # req.add_field('Foo', 'baz')
+ # req['Foo'] # => "bar, baz"
+ # req.add_field('Foo', %w[baz bam])
+ # req['Foo'] # => "bar, baz, baz, bam"
+ # req.get_fields('Foo') # => ["bar", "baz", "baz", "bam"]
#
def add_field(key, val)
stringified_downcased_key = key.downcase.to_s
@@ -101,16 +295,13 @@ module Net::HTTPHeader
end
end
- # [Ruby 1.8.3]
- # Returns an array of header field strings corresponding to the
- # case-insensitive +key+. This method allows you to get duplicated
- # header fields without any processing. See also #[].
+ # Returns the array field value for the given +key+,
+ # or +nil+ if there is no such field;
+ # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
#
- # p response.get_fields('Set-Cookie')
- # #=> ["session=al98axx; expires=Fri, 31-Dec-1999 23:58:23",
- # "query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23"]
- # p response['Set-Cookie']
- # #=> "session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23"
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.get_fields('Connection') # => ["keep-alive"]
+ # res.get_fields('Nosuch') # => nil
#
def get_fields(key)
stringified_downcased_key = key.downcase.to_s
@@ -118,24 +309,58 @@ module Net::HTTPHeader
@header[stringified_downcased_key].dup
end
- # Returns the header field corresponding to the case-insensitive key.
- # Returns the default value +args+, or the result of the block, or
- # raises an IndexError if there's no header field named +key+
- # See Hash#fetch
+ # call-seq:
+ # fetch(key, default_val = nil) {|key| ... } -> object
+ # fetch(key, default_val = nil) -> value or default_val
+ #
+ # With a block, returns the string value for +key+ if it exists;
+ # otherwise returns the value of the block;
+ # ignores the +default_val+;
+ # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ #
+ # # Field exists; block not called.
+ # res.fetch('Connection') do |value|
+ # fail 'Cannot happen'
+ # end # => "keep-alive"
+ #
+ # # Field does not exist; block called.
+ # res.fetch('Nosuch') do |value|
+ # value.downcase
+ # end # => "nosuch"
+ #
+ # With no block, returns the string value for +key+ if it exists;
+ # otherwise, returns +default_val+ if it was given;
+ # otherwise raises an exception:
+ #
+ # res.fetch('Connection', 'Foo') # => "keep-alive"
+ # res.fetch('Nosuch', 'Foo') # => "Foo"
+ # res.fetch('Nosuch') # Raises KeyError.
+ #
def fetch(key, *args, &block) #:yield: +key+
a = @header.fetch(key.downcase.to_s, *args, &block)
a.kind_of?(Array) ? a.join(', ') : a
end
- # Iterates through the header names and values, passing in the name
- # and value to the code block supplied.
+ # Calls the block with each key/value pair:
#
- # Returns an enumerator if no block is given.
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.each_header do |key, value|
+ # p [key, value] if key.start_with?('c')
+ # end
#
- # Example:
+ # Output:
#
- # response.header.each_header {|key,value| puts "#{key} = #{value}" }
+ # ["content-type", "application/json; charset=utf-8"]
+ # ["connection", "keep-alive"]
+ # ["cache-control", "max-age=43200"]
+ # ["cf-cache-status", "HIT"]
+ # ["cf-ray", "771d17e9bc542cf5-ORD"]
#
+ # Returns an enumerator if no block is given.
+ #
+ # Net::HTTPHeader#each is an alias for Net::HTTPHeader#each_header.
def each_header #:yield: +key+, +value+
block_given? or return enum_for(__method__) { @header.size }
@header.each do |k,va|
@@ -145,10 +370,24 @@ module Net::HTTPHeader
alias each each_header
- # Iterates through the header names in the header, passing
- # each header name to the code block.
+ # Calls the block with each field key:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.each_key do |key|
+ # p key if key.start_with?('c')
+ # end
+ #
+ # Output:
+ #
+ # "content-type"
+ # "connection"
+ # "cache-control"
+ # "cf-cache-status"
+ # "cf-ray"
#
# Returns an enumerator if no block is given.
+ #
+ # Net::HTTPHeader#each_name is an alias for Net::HTTPHeader#each_key.
def each_name(&block) #:yield: +key+
block_given? or return enum_for(__method__) { @header.size }
@header.each_key(&block)
@@ -156,12 +395,23 @@ module Net::HTTPHeader
alias each_key each_name
- # Iterates through the header names in the header, passing
- # capitalized header names to the code block.
+ # Calls the block with each capitalized field name:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.each_capitalized_name do |key|
+ # p key if key.start_with?('C')
+ # end
+ #
+ # Output:
#
- # Note that header names are capitalized systematically;
- # capitalization may not match that used by the remote HTTP
- # server in its response.
+ # "Content-Type"
+ # "Connection"
+ # "Cache-Control"
+ # "Cf-Cache-Status"
+ # "Cf-Ray"
+ #
+ # The capitalization is system-dependent;
+ # see {Case Mapping}[rdoc-ref:case_mapping.rdoc].
#
# Returns an enumerator if no block is given.
def each_capitalized_name #:yield: +key+
@@ -171,8 +421,18 @@ module Net::HTTPHeader
end
end
- # Iterates through header values, passing each value to the
- # code block.
+ # Calls the block with each string field value:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.each_value do |value|
+ # p value if value.start_with?('c')
+ # end
+ #
+ # Output:
+ #
+ # "chunked"
+ # "cf-q-config;dur=6.0000002122251e-06"
+ # "cloudflare"
#
# Returns an enumerator if no block is given.
def each_value #:yield: +value+
@@ -182,32 +442,45 @@ module Net::HTTPHeader
end
end
- # Removes a header field, specified by case-insensitive key.
+ # Removes the header for the given case-insensitive +key+
+ # (see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]);
+ # returns the deleted value, or +nil+ if no such field exists:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req.delete('Accept') # => ["*/*"]
+ # req.delete('Nosuch') # => nil
+ #
def delete(key)
@header.delete(key.downcase.to_s)
end
- # true if +key+ header exists.
+ # Returns +true+ if the field for the case-insensitive +key+ exists, +false+ otherwise:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req.key?('Accept') # => true
+ # req.key?('Nosuch') # => false
+ #
def key?(key)
@header.key?(key.downcase.to_s)
end
- # Returns a Hash consisting of header names and array of values.
- # e.g.
- # {"cache-control" => ["private"],
- # "content-type" => ["text/html"],
- # "date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]}
+ # Returns a hash of the key/value pairs:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req.to_hash
+ # # =>
+ # {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
+ # "accept"=>["*/*"],
+ # "user-agent"=>["Ruby"],
+ # "host"=>["jsonplaceholder.typicode.com"]}
+ #
def to_hash
@header.dup
end
- # As for #each_header, except the keys are provided in capitalized form.
- #
- # Note that header names are capitalized systematically;
- # capitalization may not match that used by the remote HTTP
- # server in its response.
+ # Like #each_header, but the keys are returned in capitalized form.
#
- # Returns an enumerator if no block is given.
+ # Net::HTTPHeader#canonical_each is an alias for Net::HTTPHeader#each_capitalized.
def each_capitalized
block_given? or return enum_for(__method__) { @header.size }
@header.each do |k,v|
@@ -222,8 +495,17 @@ module Net::HTTPHeader
end
private :capitalize
- # Returns an Array of Range objects which represent the Range:
- # HTTP header field, or +nil+ if there is no such header.
+ # Returns an array of Range objects that represent
+ # the value of field <tt>'Range'</tt>,
+ # or +nil+ if there is no such field;
+ # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req['Range'] = 'bytes=0-99,200-299,400-499'
+ # req.range # => [0..99, 200..299, 400..499]
+ # req.delete('Range')
+ # req.range # # => nil
+ #
def range
return nil unless @header['range']
@@ -266,14 +548,31 @@ module Net::HTTPHeader
result
end
- # Sets the HTTP Range: header.
- # Accepts either a Range object as a single argument,
- # or a beginning index and a length from that index.
- # Example:
+ # call-seq:
+ # set_range(length) -> length
+ # set_range(offset, length) -> range
+ # set_range(begin..length) -> range
#
- # req.range = (0..1023)
- # req.set_range 0, 1023
+ # Sets the value for field <tt>'Range'</tt>;
+ # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]:
#
+ # With argument +length+:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req.set_range(100) # => 100
+ # req['Range'] # => "bytes=0-99"
+ #
+ # With arguments +offset+ and +length+:
+ #
+ # req.set_range(100, 100) # => 100...200
+ # req['Range'] # => "bytes=100-199"
+ #
+ # With argument +range+:
+ #
+ # req.set_range(100..199) # => 100..199
+ # req['Range'] # => "bytes=100-199"
+ #
+ # Net::HTTPHeader#range= is an alias for Net::HTTPHeader#set_range.
def set_range(r, e = nil)
unless r
@header.delete 'range'
@@ -305,8 +604,15 @@ module Net::HTTPHeader
alias range= set_range
- # Returns an Integer object which represents the HTTP Content-Length:
- # header field, or +nil+ if that field was not provided.
+ # Returns the value of field <tt>'Content-Length'</tt> as an integer,
+ # or +nil+ if there is no such field;
+ # see {Content-Length request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-request-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/nosuch/1')
+ # res.content_length # => 2
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res.content_length # => nil
+ #
def content_length
return nil unless key?('Content-Length')
len = self['Content-Length'].slice(/\d+/) or
@@ -314,6 +620,20 @@ module Net::HTTPHeader
len.to_i
end
+ # Sets the value of field <tt>'Content-Length'</tt> to the given numeric;
+ # see {Content-Length response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-response-header]:
+ #
+ # _uri = uri.dup
+ # hostname = _uri.hostname # => "jsonplaceholder.typicode.com"
+ # _uri.path = '/posts' # => "/posts"
+ # req = Net::HTTP::Post.new(_uri) # => #<Net::HTTP::Post POST>
+ # req.body = '{"title": "foo","body": "bar","userId": 1}'
+ # req.content_length = req.body.size # => 42
+ # req.content_type = 'application/json'
+ # res = Net::HTTP.start(hostname) do |http|
+ # http.request(req)
+ # end # => #<Net::HTTPCreated 201 Created readbody=true>
+ #
def content_length=(len)
unless len
@header.delete 'content-length'
@@ -322,53 +642,99 @@ module Net::HTTPHeader
@header['content-length'] = [len.to_i.to_s]
end
- # Returns "true" if the "transfer-encoding" header is present and
- # set to "chunked". This is an HTTP/1.1 feature, allowing
- # the content to be sent in "chunks" without at the outset
- # stating the entire content length.
+ # Returns +true+ if field <tt>'Transfer-Encoding'</tt>
+ # exists and has value <tt>'chunked'</tt>,
+ # +false+ otherwise;
+ # see {Transfer-Encoding response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#transfer-encoding-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['Transfer-Encoding'] # => "chunked"
+ # res.chunked? # => true
+ #
def chunked?
return false unless @header['transfer-encoding']
field = self['Transfer-Encoding']
(/(?:\A|[^\-\w])chunked(?![\-\w])/i =~ field) ? true : false
end
- # Returns a Range object which represents the value of the Content-Range:
- # header field.
- # For a partial entity body, this indicates where this fragment
- # fits inside the full entity body, as range of byte offsets.
+ # Returns a Range object representing the value of field
+ # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
+ # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['Content-Range'] # => nil
+ # res['Content-Range'] = 'bytes 0-499/1000'
+ # res['Content-Range'] # => "bytes 0-499/1000"
+ # res.content_range # => 0..499
+ #
def content_range
return nil unless @header['content-range']
- m = %r<bytes\s+(\d+)-(\d+)/(\d+|\*)>i.match(self['Content-Range']) or
+ m = %r<\A\s*(\w+)\s+(\d+)-(\d+)/(\d+|\*)>.match(self['Content-Range']) or
raise Net::HTTPHeaderSyntaxError, 'wrong Content-Range format'
- m[1].to_i .. m[2].to_i
+ return unless m[1] == 'bytes'
+ m[2].to_i .. m[3].to_i
end
- # The length of the range represented in Content-Range: header.
+ # Returns the integer representing length of the value of field
+ # <tt>'Content-Range'</tt>, or +nil+ if no such field exists;
+ # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['Content-Range'] # => nil
+ # res['Content-Range'] = 'bytes 0-499/1000'
+ # res.range_length # => 500
+ #
def range_length
r = content_range() or return nil
r.end - r.begin + 1
end
- # Returns a content type string such as "text/html".
- # This method returns nil if Content-Type: header field does not exist.
+ # Returns the {media type}[https://en.wikipedia.org/wiki/Media_type]
+ # from the value of field <tt>'Content-Type'</tt>,
+ # or +nil+ if no such field exists;
+ # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['content-type'] # => "application/json; charset=utf-8"
+ # res.content_type # => "application/json"
+ #
def content_type
- return nil unless main_type()
- if sub_type()
- then "#{main_type()}/#{sub_type()}"
- else main_type()
+ main = main_type()
+ return nil unless main
+
+ sub = sub_type()
+ if sub
+ "#{main}/#{sub}"
+ else
+ main
end
end
- # Returns a content type string such as "text".
- # This method returns nil if Content-Type: header field does not exist.
+ # Returns the leading ('type') part of the
+ # {media type}[https://en.wikipedia.org/wiki/Media_type]
+ # from the value of field <tt>'Content-Type'</tt>,
+ # or +nil+ if no such field exists;
+ # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['content-type'] # => "application/json; charset=utf-8"
+ # res.main_type # => "application"
+ #
def main_type
return nil unless @header['content-type']
self['Content-Type'].split(';').first.to_s.split('/')[0].to_s.strip
end
- # Returns a content type string such as "html".
- # This method returns nil if Content-Type: header field does not exist
- # or sub-type is not given (e.g. "Content-Type: text").
+ # Returns the trailing ('subtype') part of the
+ # {media type}[https://en.wikipedia.org/wiki/Media_type]
+ # from the value of field <tt>'Content-Type'</tt>,
+ # or +nil+ if no such field exists;
+ # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['content-type'] # => "application/json; charset=utf-8"
+ # res.sub_type # => "json"
+ #
def sub_type
return nil unless @header['content-type']
_, sub = *self['Content-Type'].split(';').first.to_s.split('/')
@@ -376,9 +742,14 @@ module Net::HTTPHeader
sub.strip
end
- # Any parameters specified for the content type, returned as a Hash.
- # For example, a header of Content-Type: text/html; charset=EUC-JP
- # would result in type_params returning {'charset' => 'EUC-JP'}
+ # Returns the trailing ('parameters') part of the value of field <tt>'Content-Type'</tt>,
+ # or +nil+ if no such field exists;
+ # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]:
+ #
+ # res = Net::HTTP.get_response(hostname, '/todos/1')
+ # res['content-type'] # => "application/json; charset=utf-8"
+ # res.type_params # => {"charset"=>"utf-8"}
+ #
def type_params
result = {}
list = self['Content-Type'].to_s.split(';')
@@ -390,29 +761,54 @@ module Net::HTTPHeader
result
end
- # Sets the content type in an HTTP header.
- # The +type+ should be a full HTTP content type, e.g. "text/html".
- # The +params+ are an optional Hash of parameters to add after the
- # content type, e.g. {'charset' => 'iso-8859-1'}
+ # Sets the value of field <tt>'Content-Type'</tt>;
+ # returns the new value;
+ # see {Content-Type request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-request-header]:
+ #
+ # req = Net::HTTP::Get.new(uri)
+ # req.set_content_type('application/json') # => ["application/json"]
+ #
+ # Net::HTTPHeader#content_type= is an alias for Net::HTTPHeader#set_content_type.
def set_content_type(type, params = {})
@header['content-type'] = [type + params.map{|k,v|"; #{k}=#{v}"}.join('')]
end
alias content_type= set_content_type
- # Set header fields and a body from HTML form data.
- # +params+ should be an Array of Arrays or
- # a Hash containing HTML form data.
- # Optional argument +sep+ means data record separator.
+ # Sets the request body to a URL-encoded string derived from argument +params+,
+ # and sets request header field <tt>'Content-Type'</tt>
+ # to <tt>'application/x-www-form-urlencoded'</tt>.
+ #
+ # The resulting request is suitable for HTTP request +POST+ or +PUT+.
#
- # Values are URL encoded as necessary and the content-type is set to
- # application/x-www-form-urlencoded
+ # Argument +params+ must be suitable for use as argument +enum+ to
+ # {URI.encode_www_form}[rdoc-ref:URI.encode_www_form].
#
- # Example:
- # http.form_data = {"q" => "ruby", "lang" => "en"}
- # http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"}
- # http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
+ # With only argument +params+ given,
+ # sets the body to a URL-encoded string with the default separator <tt>'&'</tt>:
#
+ # req = Net::HTTP::Post.new('example.com')
+ #
+ # req.set_form_data(q: 'ruby', lang: 'en')
+ # req.body # => "q=ruby&lang=en"
+ # req['Content-Type'] # => "application/x-www-form-urlencoded"
+ #
+ # req.set_form_data([['q', 'ruby'], ['lang', 'en']])
+ # req.body # => "q=ruby&lang=en"
+ #
+ # req.set_form_data(q: ['ruby', 'perl'], lang: 'en')
+ # req.body # => "q=ruby&q=perl&lang=en"
+ #
+ # req.set_form_data([['q', 'ruby'], ['q', 'perl'], ['lang', 'en']])
+ # req.body # => "q=ruby&q=perl&lang=en"
+ #
+ # With string argument +sep+ also given,
+ # uses that string as the separator:
+ #
+ # req.set_form_data({q: 'ruby', lang: 'en'}, '|')
+ # req.body # => "q=ruby|lang=en"
+ #
+ # Net::HTTPHeader#form_data= is an alias for Net::HTTPHeader#set_form_data.
def set_form_data(params, sep = '&')
query = URI.encode_www_form(params)
query.gsub!(/&/, sep) if sep != '&'
@@ -422,33 +818,108 @@ module Net::HTTPHeader
alias form_data= set_form_data
- # Set an HTML form data set.
- # +params+ is the form data set; it is an Array of Arrays or a Hash
- # +enctype is the type to encode the form data set.
- # It is application/x-www-form-urlencoded or multipart/form-data.
- # +formopt+ is an optional hash to specify the detail.
+ # Stores form data to be used in a +POST+ or +PUT+ request.
+ #
+ # The form data given in +params+ consists of zero or more fields;
+ # each field is:
+ #
+ # - A scalar value.
+ # - A name/value pair.
+ # - An IO stream opened for reading.
+ #
+ # Argument +params+ should be an
+ # {Enumerable}[rdoc-ref:Enumerable@Enumerable+in+Ruby+Classes]
+ # (method <tt>params.map</tt> will be called),
+ # and is often an array or hash.
+ #
+ # First, we set up a request:
+ #
+ # _uri = uri.dup
+ # _uri.path ='/posts'
+ # req = Net::HTTP::Post.new(_uri)
+ #
+ # <b>Argument +params+ As an Array</b>
+ #
+ # When +params+ is an array,
+ # each of its elements is a subarray that defines a field;
+ # the subarray may contain:
+ #
+ # - One string:
+ #
+ # req.set_form([['foo'], ['bar'], ['baz']])
+ #
+ # - Two strings:
+ #
+ # req.set_form([%w[foo 0], %w[bar 1], %w[baz 2]])
+ #
+ # - When argument +enctype+ (see below) is given as
+ # <tt>'multipart/form-data'</tt>:
#
- # boundary:: the boundary of the multipart message
- # charset:: the charset of the message. All names and the values of
- # non-file fields are encoded as the charset.
+ # - A string name and an IO stream opened for reading:
#
- # Each item of params is an array and contains following items:
- # +name+:: the name of the field
- # +value+:: the value of the field, it should be a String or a File
- # +opt+:: an optional hash to specify additional information
+ # require 'stringio'
+ # req.set_form([['file', StringIO.new('Ruby is cool.')]])
#
- # Each item is a file field or a normal field.
- # If +value+ is a File object or the +opt+ have a filename key,
- # the item is treated as a file field.
+ # - A string name, an IO stream opened for reading,
+ # and an options hash, which may contain these entries:
#
- # If Transfer-Encoding is set as chunked, this send the request in
- # chunked encoding. Because chunked encoding is HTTP/1.1 feature,
- # you must confirm the server to support HTTP/1.1 before sending it.
+ # - +:filename+: The name of the file to use.
+ # - +:content_type+: The content type of the uploaded file.
#
- # Example:
- # http.set_form([["q", "ruby"], ["lang", "en"]])
+ # Example:
#
- # See also RFC 2388, RFC 2616, HTML 4.01, and HTML5
+ # req.set_form([['file', file, {filename: "other-filename.foo"}]]
+ #
+ # The various forms may be mixed:
+ #
+ # req.set_form(['foo', %w[bar 1], ['file', file]])
+ #
+ # <b>Argument +params+ As a Hash</b>
+ #
+ # When +params+ is a hash,
+ # each of its entries is a name/value pair that defines a field:
+ #
+ # - The name is a string.
+ # - The value may be:
+ #
+ # - +nil+.
+ # - Another string.
+ # - An IO stream opened for reading
+ # (only when argument +enctype+ -- see below -- is given as
+ # <tt>'multipart/form-data'</tt>).
+ #
+ # Examples:
+ #
+ # # Nil-valued fields.
+ # req.set_form({'foo' => nil, 'bar' => nil, 'baz' => nil})
+ #
+ # # String-valued fields.
+ # req.set_form({'foo' => 0, 'bar' => 1, 'baz' => 2})
+ #
+ # # IO-valued field.
+ # require 'stringio'
+ # req.set_form({'file' => StringIO.new('Ruby is cool.')})
+ #
+ # # Mixture of fields.
+ # req.set_form({'foo' => nil, 'bar' => 1, 'file' => file})
+ #
+ # Optional argument +enctype+ specifies the value to be given
+ # to field <tt>'Content-Type'</tt>, and must be one of:
+ #
+ # - <tt>'application/x-www-form-urlencoded'</tt> (the default).
+ # - <tt>'multipart/form-data'</tt>;
+ # see {RFC 7578}[https://www.rfc-editor.org/rfc/rfc7578].
+ #
+ # Optional argument +formopt+ is a hash of options
+ # (applicable only when argument +enctype+
+ # is <tt>'multipart/form-data'</tt>)
+ # that may include the following entries:
+ #
+ # - +:boundary+: The value is the boundary string for the multipart message.
+ # If not given, the boundary is a random string.
+ # See {Boundary}[https://www.rfc-editor.org/rfc/rfc7578#section-4.1].
+ # - +:charset+: Value is the character set for the form submission.
+ # Field names and values of non-file fields should be encoded with this charset.
#
def set_form(params, enctype='application/x-www-form-urlencoded', formopt={})
@body_data = params
@@ -464,12 +935,24 @@ module Net::HTTPHeader
end
end
- # Set the Authorization: header for "Basic" authorization.
+ # Sets header <tt>'Authorization'</tt> using the given
+ # +account+ and +password+ strings:
+ #
+ # req.basic_auth('my_account', 'my_password')
+ # req['Authorization']
+ # # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
+ #
def basic_auth(account, password)
@header['authorization'] = [basic_encode(account, password)]
end
- # Set Proxy-Authorization: header for "Basic" authorization.
+ # Sets header <tt>'Proxy-Authorization'</tt> using the given
+ # +account+ and +password+ strings:
+ #
+ # req.proxy_basic_auth('my_account', 'my_password')
+ # req['Proxy-Authorization']
+ # # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
+ #
def proxy_basic_auth(account, password)
@header['proxy-authorization'] = [basic_encode(account, password)]
end
@@ -479,6 +962,7 @@ module Net::HTTPHeader
end
private :basic_encode
+# Returns whether the HTTP session is to be closed.
def connection_close?
token = /(?:\A|,)\s*close\s*(?:\z|,)/i
@header['connection']&.grep(token) {return true}
@@ -486,6 +970,7 @@ module Net::HTTPHeader
false
end
+# Returns whether the HTTP session is to be kept alive.
def connection_keep_alive?
token = /(?:\A|,)\s*keep-alive\s*(?:\z|,)/i
@header['connection']&.grep(token) {return true}
diff --git a/lib/net/http/net-http.gemspec b/lib/net/http/net-http.gemspec
new file mode 100644
index 0000000000..0021136793
--- /dev/null
+++ b/lib/net/http/net-http.gemspec
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ file = File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")
+ begin
+ break File.foreach(file, mode: "rb") do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end
+ rescue SystemCallError
+ next
+ end
+end
+
+Gem::Specification.new do |spec|
+ spec.name = name
+ spec.version = version
+ spec.authors = ["NARUSE, Yui"]
+ spec.email = ["naruse@airemix.jp"]
+
+ spec.summary = %q{HTTP client api for Ruby.}
+ spec.description = %q{HTTP client api for Ruby.}
+ spec.homepage = "https://github.com/ruby/net-http"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git)}) }
+ end
+ spec.bindir = "exe"
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "uri"
+end
diff --git a/lib/net/http/proxy_delta.rb b/lib/net/http/proxy_delta.rb
index a2f770ebdb..e7d30def64 100644
--- a/lib/net/http/proxy_delta.rb
+++ b/lib/net/http/proxy_delta.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
module Net::HTTP::ProxyDelta #:nodoc: internal use only
private
diff --git a/lib/net/http/request.rb b/lib/net/http/request.rb
index 1e86f3e4b4..4a138572e9 100644
--- a/lib/net/http/request.rb
+++ b/lib/net/http/request.rb
@@ -1,8 +1,76 @@
-# frozen_string_literal: false
-# HTTP request class.
-# This class wraps together the request header and the request path.
-# You cannot use this class directly. Instead, you should use one of its
-# subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head.
+# frozen_string_literal: true
+
+# This class is the base class for \Net::HTTP request classes.
+# The class should not be used directly;
+# instead you should use its subclasses, listed below.
+#
+# == Creating a Request
+#
+# An request object may be created with either a URI or a string hostname:
+#
+# require 'net/http'
+# uri = URI('https://jsonplaceholder.typicode.com/')
+# req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
+# req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>
+#
+# And with any of the subclasses:
+#
+# req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
+# req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
+# req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT>
+# # ...
+#
+# The new instance is suitable for use as the argument to Net::HTTP#request.
+#
+# == Request Headers
+#
+# A new request object has these header fields by default:
+#
+# req.to_hash
+# # =>
+# {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
+# "accept"=>["*/*"],
+# "user-agent"=>["Ruby"],
+# "host"=>["jsonplaceholder.typicode.com"]}
+#
+# See:
+#
+# - {Request header Accept-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Accept-Encoding]
+# and {Compression and Decompression}[rdoc-ref:Net::HTTP@Compression+and+Decompression].
+# - {Request header Accept}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#accept-request-header].
+# - {Request header User-Agent}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#user-agent-request-header].
+# - {Request header Host}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#host-request-header].
+#
+# You can add headers or override default headers:
+#
+# # res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})
+#
+# This class (and therefore its subclasses) also includes (indirectly)
+# module Net::HTTPHeader, which gives access to its
+# {methods for setting headers}[rdoc-ref:Net::HTTPHeader@Setters].
+#
+# == Request Subclasses
+#
+# Subclasses for HTTP requests:
+#
+# - Net::HTTP::Get
+# - Net::HTTP::Head
+# - Net::HTTP::Post
+# - Net::HTTP::Put
+# - Net::HTTP::Delete
+# - Net::HTTP::Options
+# - Net::HTTP::Trace
+# - Net::HTTP::Patch
+#
+# Subclasses for WebDAV requests:
+#
+# - Net::HTTP::Propfind
+# - Net::HTTP::Proppatch
+# - Net::HTTP::Mkcol
+# - Net::HTTP::Copy
+# - Net::HTTP::Move
+# - Net::HTTP::Lock
+# - Net::HTTP::Unlock
#
class Net::HTTPRequest < Net::HTTPGenericRequest
# Creates an HTTP request object for +path+.
@@ -18,4 +86,3 @@ class Net::HTTPRequest < Net::HTTPGenericRequest
path, initheader
end
end
-
diff --git a/lib/net/http/requests.rb b/lib/net/http/requests.rb
index d4c80a3812..5724164205 100644
--- a/lib/net/http/requests.rb
+++ b/lib/net/http/requests.rb
@@ -1,67 +1,257 @@
-# frozen_string_literal: false
-#
+# frozen_string_literal: true
+
# HTTP/1.1 methods --- RFC2616
-#
-# See Net::HTTPGenericRequest for attributes and methods.
-# See Net::HTTP for usage examples.
+# \Class for representing
+# {HTTP method GET}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#GET_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: optional.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
+#
+# Related:
+#
+# - Net::HTTP.get: sends +GET+ request, returns response body.
+# - Net::HTTP#get: sends +GET+ request, returns response object.
+#
class Net::HTTP::Get < Net::HTTPRequest
METHOD = 'GET'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
-# See Net::HTTP for usage examples.
+# \Class for representing
+# {HTTP method HEAD}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#HEAD_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: optional.
+# - Response body: no.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
+#
+# Related:
+#
+# - Net::HTTP#head: sends +HEAD+ request, returns response object.
+#
class Net::HTTP::Head < Net::HTTPRequest
METHOD = 'HEAD'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = false
end
-# See Net::HTTPGenericRequest for attributes and methods.
-# See Net::HTTP for usage examples.
+# \Class for representing
+# {HTTP method POST}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#POST_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# uri.path = '/posts'
+# req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
+# req.body = '{"title": "foo","body": "bar","userId": 1}'
+# req.content_type = 'application/json'
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: yes.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: yes.
+#
+# Related:
+#
+# - Net::HTTP.post: sends +POST+ request, returns response object.
+# - Net::HTTP#post: sends +POST+ request, returns response object.
+#
class Net::HTTP::Post < Net::HTTPRequest
METHOD = 'POST'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
-# See Net::HTTP for usage examples.
+# \Class for representing
+# {HTTP method PUT}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PUT_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# uri.path = '/posts'
+# req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT>
+# req.body = '{"title": "foo","body": "bar","userId": 1}'
+# req.content_type = 'application/json'
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: yes.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
+#
class Net::HTTP::Put < Net::HTTPRequest
METHOD = 'PUT'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
-# See Net::HTTP for usage examples.
+# \Class for representing
+# {HTTP method DELETE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#DELETE_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# uri.path = '/posts/1'
+# req = Net::HTTP::Delete.new(uri) # => #<Net::HTTP::Delete DELETE>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: optional.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
+#
+# Related:
+#
+# - Net::HTTP#delete: sends +DELETE+ request, returns response object.
+#
class Net::HTTP::Delete < Net::HTTPRequest
METHOD = 'DELETE'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {HTTP method OPTIONS}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#OPTIONS_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Options.new(uri) # => #<Net::HTTP::Options OPTIONS>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: optional.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
+#
+# Related:
+#
+# - Net::HTTP#options: sends +OPTIONS+ request, returns response object.
+#
class Net::HTTP::Options < Net::HTTPRequest
METHOD = 'OPTIONS'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {HTTP method TRACE}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#TRACE_method]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Trace.new(uri) # => #<Net::HTTP::Trace TRACE>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: no.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: yes.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: yes.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
+#
+# Related:
+#
+# - Net::HTTP#trace: sends +TRACE+ request, returns response object.
+#
class Net::HTTP::Trace < Net::HTTPRequest
METHOD = 'TRACE'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
+# \Class for representing
+# {HTTP method PATCH}[https://en.wikipedia.org/w/index.php?title=Hypertext_Transfer_Protocol#PATCH_method]:
#
-# PATCH method --- RFC5789
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# uri.path = '/posts'
+# req = Net::HTTP::Patch.new(uri) # => #<Net::HTTP::Patch PATCH>
+# req.body = '{"title": "foo","body": "bar","userId": 1}'
+# req.content_type = 'application/json'
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Properties:
+#
+# - Request body: yes.
+# - Response body: yes.
+# - {Safe}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods]: no.
+# - {Idempotent}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods]: no.
+# - {Cacheable}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Cacheable_methods]: no.
+#
+# Related:
+#
+# - Net::HTTP#patch: sends +PATCH+ request, returns response object.
#
-
-# See Net::HTTPGenericRequest for attributes and methods.
class Net::HTTP::Patch < Net::HTTPRequest
METHOD = 'PATCH'
REQUEST_HAS_BODY = true
@@ -72,49 +262,161 @@ end
# WebDAV methods --- RFC2518
#
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method PROPFIND}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Propfind.new(uri) # => #<Net::HTTP::Propfind PROPFIND>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#propfind: sends +PROPFIND+ request, returns response object.
+#
class Net::HTTP::Propfind < Net::HTTPRequest
METHOD = 'PROPFIND'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method PROPPATCH}[http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Proppatch.new(uri) # => #<Net::HTTP::Proppatch PROPPATCH>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#proppatch: sends +PROPPATCH+ request, returns response object.
+#
class Net::HTTP::Proppatch < Net::HTTPRequest
METHOD = 'PROPPATCH'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method MKCOL}[http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Mkcol.new(uri) # => #<Net::HTTP::Mkcol MKCOL>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#mkcol: sends +MKCOL+ request, returns response object.
+#
class Net::HTTP::Mkcol < Net::HTTPRequest
METHOD = 'MKCOL'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method COPY}[http://www.webdav.org/specs/rfc4918.html#METHOD_COPY]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Copy.new(uri) # => #<Net::HTTP::Copy COPY>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#copy: sends +COPY+ request, returns response object.
+#
class Net::HTTP::Copy < Net::HTTPRequest
METHOD = 'COPY'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method MOVE}[http://www.webdav.org/specs/rfc4918.html#METHOD_MOVE]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Move.new(uri) # => #<Net::HTTP::Move MOVE>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#move: sends +MOVE+ request, returns response object.
+#
class Net::HTTP::Move < Net::HTTPRequest
METHOD = 'MOVE'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method LOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_LOCK]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Lock.new(uri) # => #<Net::HTTP::Lock LOCK>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#lock: sends +LOCK+ request, returns response object.
+#
class Net::HTTP::Lock < Net::HTTPRequest
METHOD = 'LOCK'
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
-# See Net::HTTPGenericRequest for attributes and methods.
+# \Class for representing
+# {WebDAV method UNLOCK}[http://www.webdav.org/specs/rfc4918.html#METHOD_UNLOCK]:
+#
+# require 'net/http'
+# uri = URI('http://example.com')
+# hostname = uri.hostname # => "example.com"
+# req = Net::HTTP::Unlock.new(uri) # => #<Net::HTTP::Unlock UNLOCK>
+# res = Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end
+#
+# See {Request Headers}[rdoc-ref:Net::HTTPRequest@Request+Headers].
+#
+# Related:
+#
+# - Net::HTTP#unlock: sends +UNLOCK+ request, returns response object.
+#
class Net::HTTP::Unlock < Net::HTTPRequest
METHOD = 'UNLOCK'
REQUEST_HAS_BODY = true
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index 5a94f95694..40de963868 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -1,20 +1,136 @@
-# frozen_string_literal: false
-# HTTP response class.
+# frozen_string_literal: true
+
+# This class is the base class for \Net::HTTP response classes.
+#
+# == About the Examples
+#
+# :include: doc/net-http/examples.rdoc
+#
+# == Returned Responses
+#
+# \Method Net::HTTP.get_response returns
+# an instance of one of the subclasses of \Net::HTTPResponse:
+#
+# Net::HTTP.get_response(uri)
+# # => #<Net::HTTPOK 200 OK readbody=true>
+# Net::HTTP.get_response(hostname, '/nosuch')
+# # => #<Net::HTTPNotFound 404 Not Found readbody=true>
+#
+# As does method Net::HTTP#request:
+#
+# req = Net::HTTP::Get.new(uri)
+# Net::HTTP.start(hostname) do |http|
+# http.request(req)
+# end # => #<Net::HTTPOK 200 OK readbody=true>
+#
+# \Class \Net::HTTPResponse includes module Net::HTTPHeader,
+# which provides access to response header values via (among others):
+#
+# - \Hash-like method <tt>[]</tt>.
+# - Specific reader methods, such as +content_type+.
+#
+# Examples:
+#
+# res = Net::HTTP.get_response(uri) # => #<Net::HTTPOK 200 OK readbody=true>
+# res['Content-Type'] # => "text/html; charset=UTF-8"
+# res.content_type # => "text/html"
+#
+# == Response Subclasses
+#
+# \Class \Net::HTTPResponse has a subclass for each
+# {HTTP status code}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes].
+# You can look up the response class for a given code:
+#
+# Net::HTTPResponse::CODE_TO_OBJ['200'] # => Net::HTTPOK
+# Net::HTTPResponse::CODE_TO_OBJ['400'] # => Net::HTTPBadRequest
+# Net::HTTPResponse::CODE_TO_OBJ['404'] # => Net::HTTPNotFound
+#
+# And you can retrieve the status code for a response object:
+#
+# Net::HTTP.get_response(uri).code # => "200"
+# Net::HTTP.get_response(hostname, '/nosuch').code # => "404"
+#
+# The response subclasses (indentation shows class hierarchy):
+#
+# - Net::HTTPUnknownResponse (for unhandled \HTTP extensions).
#
-# This class wraps together the response header and the response body (the
-# entity requested).
+# - Net::HTTPInformation:
#
-# It mixes in the HTTPHeader module, which provides access to response
-# header values both via hash-like methods and via individual readers.
+# - Net::HTTPContinue (100)
+# - Net::HTTPSwitchProtocol (101)
+# - Net::HTTPProcessing (102)
+# - Net::HTTPEarlyHints (103)
#
-# Note that each possible HTTP response code defines its own
-# HTTPResponse subclass. All classes are defined under the Net module.
-# Indentation indicates inheritance. For a list of the classes see Net::HTTP.
+# - Net::HTTPSuccess:
#
-# Correspondence <code>HTTP code => class</code> is stored in CODE_TO_OBJ
-# constant:
+# - Net::HTTPOK (200)
+# - Net::HTTPCreated (201)
+# - Net::HTTPAccepted (202)
+# - Net::HTTPNonAuthoritativeInformation (203)
+# - Net::HTTPNoContent (204)
+# - Net::HTTPResetContent (205)
+# - Net::HTTPPartialContent (206)
+# - Net::HTTPMultiStatus (207)
+# - Net::HTTPAlreadyReported (208)
+# - Net::HTTPIMUsed (226)
#
-# Net::HTTPResponse::CODE_TO_OBJ['404'] #=> Net::HTTPNotFound
+# - Net::HTTPRedirection:
+#
+# - Net::HTTPMultipleChoices (300)
+# - Net::HTTPMovedPermanently (301)
+# - Net::HTTPFound (302)
+# - Net::HTTPSeeOther (303)
+# - Net::HTTPNotModified (304)
+# - Net::HTTPUseProxy (305)
+# - Net::HTTPTemporaryRedirect (307)
+# - Net::HTTPPermanentRedirect (308)
+#
+# - Net::HTTPClientError:
+#
+# - Net::HTTPBadRequest (400)
+# - Net::HTTPUnauthorized (401)
+# - Net::HTTPPaymentRequired (402)
+# - Net::HTTPForbidden (403)
+# - Net::HTTPNotFound (404)
+# - Net::HTTPMethodNotAllowed (405)
+# - Net::HTTPNotAcceptable (406)
+# - Net::HTTPProxyAuthenticationRequired (407)
+# - Net::HTTPRequestTimeOut (408)
+# - Net::HTTPConflict (409)
+# - Net::HTTPGone (410)
+# - Net::HTTPLengthRequired (411)
+# - Net::HTTPPreconditionFailed (412)
+# - Net::HTTPRequestEntityTooLarge (413)
+# - Net::HTTPRequestURITooLong (414)
+# - Net::HTTPUnsupportedMediaType (415)
+# - Net::HTTPRequestedRangeNotSatisfiable (416)
+# - Net::HTTPExpectationFailed (417)
+# - Net::HTTPMisdirectedRequest (421)
+# - Net::HTTPUnprocessableEntity (422)
+# - Net::HTTPLocked (423)
+# - Net::HTTPFailedDependency (424)
+# - Net::HTTPUpgradeRequired (426)
+# - Net::HTTPPreconditionRequired (428)
+# - Net::HTTPTooManyRequests (429)
+# - Net::HTTPRequestHeaderFieldsTooLarge (431)
+# - Net::HTTPUnavailableForLegalReasons (451)
+#
+# - Net::HTTPServerError:
+#
+# - Net::HTTPInternalServerError (500)
+# - Net::HTTPNotImplemented (501)
+# - Net::HTTPBadGateway (502)
+# - Net::HTTPServiceUnavailable (503)
+# - Net::HTTPGatewayTimeOut (504)
+# - Net::HTTPVersionNotSupported (505)
+# - Net::HTTPVariantAlsoNegotiates (506)
+# - Net::HTTPInsufficientStorage (507)
+# - Net::HTTPLoopDetected (508)
+# - Net::HTTPNotExtended (510)
+# - Net::HTTPNetworkAuthenticationRequired (511)
+#
+# There is also the Net::HTTPBadResponse exception which is raised when
+# there is a protocol error.
#
class Net::HTTPResponse
class << self
@@ -84,6 +200,8 @@ class Net::HTTPResponse
@read = false
@uri = nil
@decode_content = false
+ @body_encoding = false
+ @ignore_eof = true
end
# The HTTP version supported by the server.
@@ -106,6 +224,41 @@ class Net::HTTPResponse
# Accept-Encoding header from the user.
attr_accessor :decode_content
+ # Returns the value set by body_encoding=, or +false+ if none;
+ # see #body_encoding=.
+ attr_reader :body_encoding
+
+ # Sets the encoding that should be used when reading the body:
+ #
+ # - If the given value is an Encoding object, that encoding will be used.
+ # - Otherwise if the value is a string, the value of
+ # {Encoding#find(value)}[rdoc-ref:Encoding.find]
+ # will be used.
+ # - Otherwise an encoding will be deduced from the body itself.
+ #
+ # Examples:
+ #
+ # http = Net::HTTP.new(hostname)
+ # req = Net::HTTP::Get.new('/')
+ #
+ # http.request(req) do |res|
+ # p res.body.encoding # => #<Encoding:ASCII-8BIT>
+ # end
+ #
+ # http.request(req) do |res|
+ # res.body_encoding = "UTF-8"
+ # p res.body.encoding # => #<Encoding:UTF-8>
+ # end
+ #
+ def body_encoding=(value)
+ value = Encoding.find(value) if value.is_a?(String)
+ @body_encoding = value
+ end
+
+ # Whether to ignore EOF when reading bodies with a specified Content-Length
+ # header.
+ attr_accessor :ignore_eof
+
def inspect
"#<#{self.class} #{@code} #{@message} readbody=#{@read}>"
end
@@ -120,7 +273,7 @@ class Net::HTTPResponse
def error! #:nodoc:
message = @code
- message += ' ' + @message.dump if @message
+ message = "#{message} #{@message.dump}" if @message
raise error_type().new(message, self)
end
@@ -213,30 +366,42 @@ class Net::HTTPResponse
@body = nil
end
@read = true
+ return if @body.nil?
+
+ case enc = @body_encoding
+ when Encoding, false, nil
+ # Encoding: force given encoding
+ # false/nil: do not force encoding
+ else
+ # other value: detect encoding from body
+ enc = detect_encoding(@body)
+ end
+
+ @body.force_encoding(enc) if enc
@body
end
- # Returns the full entity body.
+ # Returns the string response body;
+ # note that repeated calls for the unmodified body return a cached string:
#
- # Calling this method a second or subsequent time will return the
- # string already read.
+ # path = '/todos/1'
+ # Net::HTTP.start(hostname) do |http|
+ # res = http.get(path)
+ # p res.body
+ # p http.head(path).body # No body.
+ # end
#
- # http.request_get('/index.html') {|res|
- # puts res.body
- # }
+ # Output:
#
- # http.request_get('/index.html') {|res|
- # p res.body.object_id # 538149362
- # p res.body.object_id # 538149362
- # }
+ # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}"
+ # nil
#
def body
read_body()
end
- # Because it may be necessary to modify the body, Eg, decompression
- # this method facilitates that.
+ # Sets the body of the response to the given value.
def body=(value)
@body = value
end
@@ -245,6 +410,141 @@ class Net::HTTPResponse
private
+ # :nodoc:
+ def detect_encoding(str, encoding=nil)
+ if encoding
+ elsif encoding = type_params['charset']
+ elsif encoding = check_bom(str)
+ else
+ encoding = case content_type&.downcase
+ when %r{text/x(?:ht)?ml|application/(?:[^+]+\+)?xml}
+ /\A<xml[ \t\r\n]+
+ version[ \t\r\n]*=[ \t\r\n]*(?:"[0-9.]+"|'[0-9.]*')[ \t\r\n]+
+ encoding[ \t\r\n]*=[ \t\r\n]*
+ (?:"([A-Za-z][\-A-Za-z0-9._]*)"|'([A-Za-z][\-A-Za-z0-9._]*)')/x =~ str
+ encoding = $1 || $2 || Encoding::UTF_8
+ when %r{text/html.*}
+ sniff_encoding(str)
+ end
+ end
+ return encoding
+ end
+
+ # :nodoc:
+ def sniff_encoding(str, encoding=nil)
+ # the encoding sniffing algorithm
+ # http://www.w3.org/TR/html5/parsing.html#determining-the-character-encoding
+ if enc = scanning_meta(str)
+ enc
+ # 6. last visited page or something
+ # 7. frequency
+ elsif str.ascii_only?
+ Encoding::US_ASCII
+ elsif str.dup.force_encoding(Encoding::UTF_8).valid_encoding?
+ Encoding::UTF_8
+ end
+ # 8. implementation-defined or user-specified
+ end
+
+ # :nodoc:
+ def check_bom(str)
+ case str.byteslice(0, 2)
+ when "\xFE\xFF"
+ return Encoding::UTF_16BE
+ when "\xFF\xFE"
+ return Encoding::UTF_16LE
+ end
+ if "\xEF\xBB\xBF" == str.byteslice(0, 3)
+ return Encoding::UTF_8
+ end
+ nil
+ end
+
+ # :nodoc:
+ def scanning_meta(str)
+ require 'strscan'
+ ss = StringScanner.new(str)
+ if ss.scan_until(/<meta[\t\n\f\r ]*/)
+ attrs = {} # attribute_list
+ got_pragma = false
+ need_pragma = nil
+ charset = nil
+
+ # step: Attributes
+ while attr = get_attribute(ss)
+ name, value = *attr
+ next if attrs[name]
+ attrs[name] = true
+ case name
+ when 'http-equiv'
+ got_pragma = true if value == 'content-type'
+ when 'content'
+ encoding = extracting_encodings_from_meta_elements(value)
+ unless charset
+ charset = encoding
+ end
+ need_pragma = true
+ when 'charset'
+ need_pragma = false
+ charset = value
+ end
+ end
+
+ # step: Processing
+ return if need_pragma.nil?
+ return if need_pragma && !got_pragma
+
+ charset = Encoding.find(charset) rescue nil
+ return unless charset
+ charset = Encoding::UTF_8 if charset == Encoding::UTF_16
+ return charset # tentative
+ end
+ nil
+ end
+
+ def get_attribute(ss)
+ ss.scan(/[\t\n\f\r \/]*/)
+ if ss.peek(1) == '>'
+ ss.getch
+ return nil
+ end
+ name = ss.scan(/[^=\t\n\f\r \/>]*/)
+ name.downcase!
+ raise if name.empty?
+ ss.skip(/[\t\n\f\r ]*/)
+ if ss.getch != '='
+ value = ''
+ return [name, value]
+ end
+ ss.skip(/[\t\n\f\r ]*/)
+ case ss.peek(1)
+ when '"'
+ ss.getch
+ value = ss.scan(/[^"]+/)
+ value.downcase!
+ ss.getch
+ when "'"
+ ss.getch
+ value = ss.scan(/[^']+/)
+ value.downcase!
+ ss.getch
+ when '>'
+ value = ''
+ else
+ value = ss.scan(/[^\t\n\f\r >]+/)
+ value.downcase!
+ end
+ [name, value]
+ end
+
+ def extracting_encodings_from_meta_elements(value)
+ # http://dev.w3.org/html5/spec/fetching-resources.html#algorithm-for-extracting-an-encoding-from-a-meta-element
+ if /charset[\t\n\f\r ]*=(?:"([^"]*)"|'([^']*)'|["']|\z|([^\t\n\f\r ;]+))/i =~ value
+ return $1 || $2 || $3
+ end
+ return nil
+ end
+
##
# Checks for a supported Content-Encoding header and yields an Inflate
# wrapper for this response's socket when zlib is present. If the
@@ -268,12 +568,16 @@ class Net::HTTPResponse
begin
yield inflate_body_io
+ success = true
ensure
- orig_err = $!
begin
inflate_body_io.finish
+ if self['content-length']
+ self['content-length'] = inflate_body_io.bytes_inflated.to_s
+ end
rescue => err
- raise orig_err || err
+ # Ignore #finish's error if there is an exception from yield
+ raise err if success
end
end
when 'none', 'identity' then
@@ -296,7 +600,7 @@ class Net::HTTPResponse
clen = content_length()
if clen
- @socket.read clen, dest, true # ignore EOF
+ @socket.read clen, dest, @ignore_eof
return
end
clen = range_length()
@@ -336,7 +640,7 @@ class Net::HTTPResponse
end
def stream_check
- raise IOError, 'attempt to read body out of block' if @socket.closed?
+ raise IOError, 'attempt to read body out of block' if @socket.nil? || @socket.closed?
end
def procdest(dest, block)
@@ -345,7 +649,7 @@ class Net::HTTPResponse
if block
Net::ReadAdapter.new(block)
else
- dest || ''
+ dest || +''
end
end
@@ -373,6 +677,14 @@ class Net::HTTPResponse
end
##
+ # The number of bytes inflated, used to update the Content-Length of
+ # the response.
+
+ def bytes_inflated
+ @inflate.total_out
+ end
+
+ ##
# Returns a Net::ReadAdapter that inflates each read chunk into +dest+.
#
# This allows a large response body to be inflated without storing the
diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb
index 50352032df..6f6fb8d055 100644
--- a/lib/net/http/responses.rb
+++ b/lib/net/http/responses.rb
@@ -1,231 +1,1100 @@
# frozen_string_literal: true
-# :stopdoc:
+#--
# https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
-class Net::HTTPUnknownResponse < Net::HTTPResponse
- HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPError
-end
-class Net::HTTPInformation < Net::HTTPResponse # 1xx
- HAS_BODY = false
- EXCEPTION_TYPE = Net::HTTPError
-end
-class Net::HTTPSuccess < Net::HTTPResponse # 2xx
- HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPError
-end
-class Net::HTTPRedirection < Net::HTTPResponse # 3xx
- HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPRetriableError
-end
-class Net::HTTPClientError < Net::HTTPResponse # 4xx
- HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPClientException # for backward compatibility
-end
-class Net::HTTPServerError < Net::HTTPResponse # 5xx
- HAS_BODY = true
- EXCEPTION_TYPE = Net::HTTPFatalError # for backward compatibility
-end
-class Net::HTTPContinue < Net::HTTPInformation # 100
- HAS_BODY = false
-end
-class Net::HTTPSwitchProtocol < Net::HTTPInformation # 101
- HAS_BODY = false
-end
-class Net::HTTPProcessing < Net::HTTPInformation # 102
- HAS_BODY = false
-end
-class Net::HTTPEarlyHints < Net::HTTPInformation # 103 - RFC 8297
- HAS_BODY = false
-end
+module Net
-class Net::HTTPOK < Net::HTTPSuccess # 200
- HAS_BODY = true
-end
-class Net::HTTPCreated < Net::HTTPSuccess # 201
- HAS_BODY = true
-end
-class Net::HTTPAccepted < Net::HTTPSuccess # 202
- HAS_BODY = true
-end
-class Net::HTTPNonAuthoritativeInformation < Net::HTTPSuccess # 203
- HAS_BODY = true
-end
-class Net::HTTPNoContent < Net::HTTPSuccess # 204
- HAS_BODY = false
-end
-class Net::HTTPResetContent < Net::HTTPSuccess # 205
- HAS_BODY = false
-end
-class Net::HTTPPartialContent < Net::HTTPSuccess # 206
- HAS_BODY = true
-end
-class Net::HTTPMultiStatus < Net::HTTPSuccess # 207 - RFC 4918
- HAS_BODY = true
-end
-class Net::HTTPAlreadyReported < Net::HTTPSuccess # 208 - RFC 5842
- HAS_BODY = true
-end
-class Net::HTTPIMUsed < Net::HTTPSuccess # 226 - RFC 3229
- HAS_BODY = true
-end
+ class HTTPUnknownResponse < HTTPResponse
+ HAS_BODY = true
+ EXCEPTION_TYPE = HTTPError #
+ end
-class Net::HTTPMultipleChoices < Net::HTTPRedirection # 300
- HAS_BODY = true
-end
-Net::HTTPMultipleChoice = Net::HTTPMultipleChoices
-class Net::HTTPMovedPermanently < Net::HTTPRedirection # 301
- HAS_BODY = true
-end
-class Net::HTTPFound < Net::HTTPRedirection # 302
- HAS_BODY = true
-end
-Net::HTTPMovedTemporarily = Net::HTTPFound
-class Net::HTTPSeeOther < Net::HTTPRedirection # 303
- HAS_BODY = true
-end
-class Net::HTTPNotModified < Net::HTTPRedirection # 304
- HAS_BODY = false
-end
-class Net::HTTPUseProxy < Net::HTTPRedirection # 305
- HAS_BODY = false
-end
-# 306 Switch Proxy - no longer unused
-class Net::HTTPTemporaryRedirect < Net::HTTPRedirection # 307
- HAS_BODY = true
-end
-class Net::HTTPPermanentRedirect < Net::HTTPRedirection # 308
- HAS_BODY = true
-end
+ # Parent class for informational (1xx) HTTP response classes.
+ #
+ # An informational response indicates that the request was received and understood.
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.1xx].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#1xx_informational_response].
+ #
+ class HTTPInformation < HTTPResponse
+ HAS_BODY = false
+ EXCEPTION_TYPE = HTTPError #
+ end
-class Net::HTTPBadRequest < Net::HTTPClientError # 400
- HAS_BODY = true
-end
-class Net::HTTPUnauthorized < Net::HTTPClientError # 401
- HAS_BODY = true
-end
-class Net::HTTPPaymentRequired < Net::HTTPClientError # 402
- HAS_BODY = true
-end
-class Net::HTTPForbidden < Net::HTTPClientError # 403
- HAS_BODY = true
-end
-class Net::HTTPNotFound < Net::HTTPClientError # 404
- HAS_BODY = true
-end
-class Net::HTTPMethodNotAllowed < Net::HTTPClientError # 405
- HAS_BODY = true
-end
-class Net::HTTPNotAcceptable < Net::HTTPClientError # 406
- HAS_BODY = true
-end
-class Net::HTTPProxyAuthenticationRequired < Net::HTTPClientError # 407
- HAS_BODY = true
-end
-class Net::HTTPRequestTimeout < Net::HTTPClientError # 408
- HAS_BODY = true
-end
-Net::HTTPRequestTimeOut = Net::HTTPRequestTimeout
-class Net::HTTPConflict < Net::HTTPClientError # 409
- HAS_BODY = true
-end
-class Net::HTTPGone < Net::HTTPClientError # 410
- HAS_BODY = true
-end
-class Net::HTTPLengthRequired < Net::HTTPClientError # 411
- HAS_BODY = true
-end
-class Net::HTTPPreconditionFailed < Net::HTTPClientError # 412
- HAS_BODY = true
-end
-class Net::HTTPPayloadTooLarge < Net::HTTPClientError # 413
- HAS_BODY = true
-end
-Net::HTTPRequestEntityTooLarge = Net::HTTPPayloadTooLarge
-class Net::HTTPURITooLong < Net::HTTPClientError # 414
- HAS_BODY = true
-end
-Net::HTTPRequestURITooLong = Net::HTTPURITooLong
-Net::HTTPRequestURITooLarge = Net::HTTPRequestURITooLong
-class Net::HTTPUnsupportedMediaType < Net::HTTPClientError # 415
- HAS_BODY = true
-end
-class Net::HTTPRangeNotSatisfiable < Net::HTTPClientError # 416
- HAS_BODY = true
-end
-Net::HTTPRequestedRangeNotSatisfiable = Net::HTTPRangeNotSatisfiable
-class Net::HTTPExpectationFailed < Net::HTTPClientError # 417
- HAS_BODY = true
-end
-# 418 I'm a teapot - RFC 2324; a joke RFC
-# 420 Enhance Your Calm - Twitter
-class Net::HTTPMisdirectedRequest < Net::HTTPClientError # 421 - RFC 7540
- HAS_BODY = true
-end
-class Net::HTTPUnprocessableEntity < Net::HTTPClientError # 422 - RFC 4918
- HAS_BODY = true
-end
-class Net::HTTPLocked < Net::HTTPClientError # 423 - RFC 4918
- HAS_BODY = true
-end
-class Net::HTTPFailedDependency < Net::HTTPClientError # 424 - RFC 4918
- HAS_BODY = true
-end
-# 425 Unordered Collection - existed only in draft
-class Net::HTTPUpgradeRequired < Net::HTTPClientError # 426 - RFC 2817
- HAS_BODY = true
-end
-class Net::HTTPPreconditionRequired < Net::HTTPClientError # 428 - RFC 6585
- HAS_BODY = true
-end
-class Net::HTTPTooManyRequests < Net::HTTPClientError # 429 - RFC 6585
- HAS_BODY = true
-end
-class Net::HTTPRequestHeaderFieldsTooLarge < Net::HTTPClientError # 431 - RFC 6585
- HAS_BODY = true
-end
-class Net::HTTPUnavailableForLegalReasons < Net::HTTPClientError # 451 - RFC 7725
- HAS_BODY = true
-end
-# 444 No Response - Nginx
-# 449 Retry With - Microsoft
-# 450 Blocked by Windows Parental Controls - Microsoft
-# 499 Client Closed Request - Nginx
+ # Parent class for success (2xx) HTTP response classes.
+ #
+ # A success response indicates the action requested by the client
+ # was received, understood, and accepted.
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.2xx].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_success].
+ #
+ class HTTPSuccess < HTTPResponse
+ HAS_BODY = true
+ EXCEPTION_TYPE = HTTPError #
+ end
+
+ # Parent class for redirection (3xx) HTTP response classes.
+ #
+ # A redirection response indicates the client must take additional action
+ # to complete the request.
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.3xx].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection].
+ #
+ class HTTPRedirection < HTTPResponse
+ HAS_BODY = true
+ EXCEPTION_TYPE = HTTPRetriableError #
+ end
+
+ # Parent class for client error (4xx) HTTP response classes.
+ #
+ # A client error response indicates that the client may have caused an error.
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.4xx].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_client_errors].
+ #
+ class HTTPClientError < HTTPResponse
+ HAS_BODY = true
+ EXCEPTION_TYPE = HTTPClientException #
+ end
+
+ # Parent class for server error (5xx) HTTP response classes.
+ #
+ # A server error response indicates that the server failed to fulfill a request.
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#status.5xx].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_server_errors].
+ #
+ class HTTPServerError < HTTPResponse
+ HAS_BODY = true
+ EXCEPTION_TYPE = HTTPFatalError #
+ end
+
+ # Response class for +Continue+ responses (status code 100).
+ #
+ # A +Continue+ response indicates that the server has received the request headers.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-100-continue].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#100].
+ #
+ class HTTPContinue < HTTPInformation
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Switching Protocol</tt> responses (status code 101).
+ #
+ # The <tt>Switching Protocol<tt> response indicates that the server has received
+ # a request to switch protocols, and has agreed to do so.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/101].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-101-switching-protocols].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#101].
+ #
+ class HTTPSwitchProtocol < HTTPInformation
+ HAS_BODY = false
+ end
+
+ # Response class for +Processing+ responses (status code 102).
+ #
+ # The +Processing+ response indicates that the server has received
+ # and is processing the request, but no response is available yet.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 2518}[https://www.rfc-editor.org/rfc/rfc2518#section-10.1].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#102].
+ #
+ class HTTPProcessing < HTTPInformation
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Early Hints</tt> responses (status code 103).
+ #
+ # The <tt>Early Hints</tt> indicates that the server has received
+ # and is processing the request, and contains certain headers;
+ # the final response is not available yet.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103].
+ # - {RFC 8297}[https://www.rfc-editor.org/rfc/rfc8297.html#section-2].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#103].
+ #
+ class HTTPEarlyHints < HTTPInformation
+ HAS_BODY = false
+ end
+
+ # Response class for +OK+ responses (status code 200).
+ #
+ # The +OK+ response indicates that the server has received
+ # a request and has responded successfully.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
+ #
+ class HTTPOK < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for +Created+ responses (status code 201).
+ #
+ # The +Created+ response indicates that the server has received
+ # and has fulfilled a request to create a new resource.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-201-created].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201].
+ #
+ class HTTPCreated < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for +Accepted+ responses (status code 202).
+ #
+ # The +Accepted+ response indicates that the server has received
+ # and is processing a request, but the processing has not yet been completed.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
+ #
+ class HTTPAccepted < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Non-Authoritative Information</tt> responses (status code 203).
+ #
+ # The <tt>Non-Authoritative Information</tt> response indicates that the server
+ # is a transforming proxy (such as a Web accelerator)
+ # that received a 200 OK response from its origin,
+ # and is returning a modified version of the origin's response.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
+ #
+ class HTTPNonAuthoritativeInformation < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>No Content</tt> responses (status code 204).
+ #
+ # The <tt>No Content</tt> response indicates that the server
+ # successfully processed the request, and is not returning any content.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-204-no-content].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204].
+ #
+ class HTTPNoContent < HTTPSuccess
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Reset Content</tt> responses (status code 205).
+ #
+ # The <tt>Reset Content</tt> response indicates that the server
+ # successfully processed the request,
+ # asks that the client reset its document view, and is not returning any content.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
+ #
+ class HTTPResetContent < HTTPSuccess
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Partial Content</tt> responses (status code 206).
+ #
+ # The <tt>Partial Content</tt> response indicates that the server is delivering
+ # only part of the resource (byte serving)
+ # due to a Range header in the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-206-partial-content].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206].
+ #
+ class HTTPPartialContent < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Multi-Status (WebDAV)</tt> responses (status code 207).
+ #
+ # The <tt>Multi-Status (WebDAV)</tt> response indicates that the server
+ # has received the request,
+ # and that the message body can contain a number of separate response codes.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 4818}[https://www.rfc-editor.org/rfc/rfc4918#section-11.1].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
+ #
+ class HTTPMultiStatus < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Already Reported (WebDAV)</tt> responses (status code 208).
+ #
+ # The <tt>Already Reported (WebDAV)</tt> response indicates that the server
+ # has received the request,
+ # and that the members of a DAV binding have already been enumerated
+ # in a preceding part of the (multi-status) response,
+ # and are not being included again.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 5842}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.1].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
+ #
+ class HTTPAlreadyReported < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>IM Used</tt> responses (status code 226).
+ #
+ # The <tt>IM Used</tt> response indicates that the server has fulfilled a request
+ # for the resource, and the response is a representation of the result
+ # of one or more instance-manipulations applied to the current instance.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 3229}[https://www.rfc-editor.org/rfc/rfc3229.html#section-10.4.1].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
+ #
+ class HTTPIMUsed < HTTPSuccess
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Multiple Choices</tt> responses (status code 300).
+ #
+ # The <tt>Multiple Choices</tt> response indicates that the server
+ # offers multiple options for the resource from which the client may choose.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
+ #
+ class HTTPMultipleChoices < HTTPRedirection
+ HAS_BODY = true
+ end
+ HTTPMultipleChoice = HTTPMultipleChoices
+
+ # Response class for <tt>Moved Permanently</tt> responses (status code 301).
+ #
+ # The <tt>Moved Permanently</tt> response indicates that links or records
+ # returning this response should be updated to use the given URL.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
+ #
+ class HTTPMovedPermanently < HTTPRedirection
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Found</tt> responses (status code 302).
+ #
+ # The <tt>Found</tt> response indicates that the client
+ # should look at (browse to) another URL.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
+ #
+ class HTTPFound < HTTPRedirection
+ HAS_BODY = true
+ end
+ HTTPMovedTemporarily = HTTPFound
+
+ # Response class for <tt>See Other</tt> responses (status code 303).
+ #
+ # The response to the request can be found under another URI using the GET method.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
+ #
+ class HTTPSeeOther < HTTPRedirection
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Not Modified</tt> responses (status code 304).
+ #
+ # Indicates that the resource has not been modified since the version
+ # specified by the request headers.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
+ #
+ class HTTPNotModified < HTTPRedirection
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Use Proxy</tt> responses (status code 305).
+ #
+ # The requested resource is available only through a proxy,
+ # whose address is provided in the response.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
+ #
+ class HTTPUseProxy < HTTPRedirection
+ HAS_BODY = false
+ end
+
+ # Response class for <tt>Temporary Redirect</tt> responses (status code 307).
+ #
+ # The request should be repeated with another URI;
+ # however, future requests should still use the original URI.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
+ #
+ class HTTPTemporaryRedirect < HTTPRedirection
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Permanent Redirect</tt> responses (status code 308).
+ #
+ # This and all future requests should be directed to the given URI.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
+ #
+ class HTTPPermanentRedirect < HTTPRedirection
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Bad Request</tt> responses (status code 400).
+ #
+ # The server cannot or will not process the request due to an apparent client error.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#400].
+ #
+ class HTTPBadRequest < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Unauthorized</tt> responses (status code 401).
+ #
+ # Authentication is required, but either was not provided or failed.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#401].
+ #
+ class HTTPUnauthorized < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Payment Required</tt> responses (status code 402).
+ #
+ # Reserved for future use.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#402].
+ #
+ class HTTPPaymentRequired < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Forbidden</tt> responses (status code 403).
+ #
+ # The request contained valid data and was understood by the server,
+ # but the server is refusing action.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#403].
+ #
+ class HTTPForbidden < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Not Found</tt> responses (status code 404).
+ #
+ # The requested resource could not be found but may be available in the future.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#404].
+ #
+ class HTTPNotFound < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Method Not Allowed</tt> responses (status code 405).
+ #
+ # The request method is not supported for the requested resource.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-405-method-not-allowed].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#405].
+ #
+ class HTTPMethodNotAllowed < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Not Acceptable</tt> responses (status code 406).
+ #
+ # The requested resource is capable of generating only content
+ # that not acceptable according to the Accept headers sent in the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#406].
+ #
+ class HTTPNotAcceptable < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Proxy Authentication Required</tt> responses (status code 407).
+ #
+ # The client must first authenticate itself with the proxy.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-407-proxy-authentication-re].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#407].
+ #
+ class HTTPProxyAuthenticationRequired < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Request Timeout</tt> responses (status code 408).
+ #
+ # The server timed out waiting for the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-408-request-timeout].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#408].
+ #
+ class HTTPRequestTimeout < HTTPClientError
+ HAS_BODY = true
+ end
+ HTTPRequestTimeOut = HTTPRequestTimeout
+
+ # Response class for <tt>Conflict</tt> responses (status code 409).
+ #
+ # The request could not be processed because of conflict in the current state of the resource.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#409].
+ #
+ class HTTPConflict < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Gone</tt> responses (status code 410).
+ #
+ # The resource requested was previously in use but is no longer available
+ # and will not be available again.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-410-gone].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#410].
+ #
+ class HTTPGone < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Length Required</tt> responses (status code 411).
+ #
+ # The request did not specify the length of its content,
+ # which is required by the requested resource.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-411-length-required].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#411].
+ #
+ class HTTPLengthRequired < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Precondition Failed</tt> responses (status code 412).
+ #
+ # The server does not meet one of the preconditions
+ # specified in the request headers.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-412-precondition-failed].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#412].
+ #
+ class HTTPPreconditionFailed < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Payload Too Large</tt> responses (status code 413).
+ #
+ # The request is larger than the server is willing or able to process.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#413].
+ #
+ class HTTPPayloadTooLarge < HTTPClientError
+ HAS_BODY = true
+ end
+ HTTPRequestEntityTooLarge = HTTPPayloadTooLarge
+
+ # Response class for <tt>URI Too Long</tt> responses (status code 414).
+ #
+ # The URI provided was too long for the server to process.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/414].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-414-uri-too-long].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#414].
+ #
+ class HTTPURITooLong < HTTPClientError
+ HAS_BODY = true
+ end
+ HTTPRequestURITooLong = HTTPURITooLong
+ HTTPRequestURITooLarge = HTTPRequestURITooLong
+
+ # Response class for <tt>Unsupported Media Type</tt> responses (status code 415).
+ #
+ # The request entity has a media type which the server or resource does not support.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-415-unsupported-media-type].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#415].
+ #
+ class HTTPUnsupportedMediaType < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Range Not Satisfiable</tt> responses (status code 416).
+ #
+ # The request entity has a media type which the server or resource does not support.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-416-range-not-satisfiable].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#416].
+ #
+ class HTTPRangeNotSatisfiable < HTTPClientError
+ HAS_BODY = true
+ end
+ HTTPRequestedRangeNotSatisfiable = HTTPRangeNotSatisfiable
+
+ # Response class for <tt>Expectation Failed</tt> responses (status code 417).
+ #
+ # The server cannot meet the requirements of the Expect request-header field.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/417].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-417-expectation-failed].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#417].
+ #
+ class HTTPExpectationFailed < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # 418 I'm a teapot - RFC 2324; a joke RFC
+ # See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#418.
+
+ # 420 Enhance Your Calm - Twitter
+
+ # Response class for <tt>Misdirected Request</tt> responses (status code 421).
+ #
+ # The request was directed at a server that is not able to produce a response.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-421-misdirected-request].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#421].
+ #
+ class HTTPMisdirectedRequest < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Unprocessable Entity</tt> responses (status code 422).
+ #
+ # The request was well-formed but had semantic errors.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-422-unprocessable-content].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#422].
+ #
+ class HTTPUnprocessableEntity < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Locked (WebDAV)</tt> responses (status code 423).
+ #
+ # The requested resource is locked.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.3].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#423].
+ #
+ class HTTPLocked < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Failed Dependency (WebDAV)</tt> responses (status code 424).
+ #
+ # The request failed because it depended on another request and that request failed.
+ # See {424 Failed Dependency (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.4].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
+ #
+ class HTTPFailedDependency < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # 425 Too Early
+ # https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#425.
+
+ # Response class for <tt>Upgrade Required</tt> responses (status code 426).
+ #
+ # The client should switch to the protocol given in the Upgrade header field.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-426-upgrade-required].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#426].
+ #
+ class HTTPUpgradeRequired < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Precondition Required</tt> responses (status code 428).
+ #
+ # The origin server requires the request to be conditional.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/428].
+ # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-3].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#428].
+ #
+ class HTTPPreconditionRequired < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Too Many Requests</tt> responses (status code 429).
+ #
+ # The user has sent too many requests in a given amount of time.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429].
+ # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-4].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429].
+ #
+ class HTTPTooManyRequests < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Request Header Fields Too Large</tt> responses (status code 431).
+ #
+ # An individual header field is too large,
+ # or all the header fields collectively, are too large.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431].
+ # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-5].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#431].
+ #
+ class HTTPRequestHeaderFieldsTooLarge < HTTPClientError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Unavailable For Legal Reasons</tt> responses (status code 451).
+ #
+ # A server operator has received a legal demand to deny access to a resource or to a set of resources
+ # that includes the requested resource.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/451].
+ # - {RFC 7725}[https://www.rfc-editor.org/rfc/rfc7725.html#section-3].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#451].
+ #
+ class HTTPUnavailableForLegalReasons < HTTPClientError
+ HAS_BODY = true
+ end
+ # 444 No Response - Nginx
+ # 449 Retry With - Microsoft
+ # 450 Blocked by Windows Parental Controls - Microsoft
+ # 499 Client Closed Request - Nginx
+
+ # Response class for <tt>Internal Server Error</tt> responses (status code 500).
+ #
+ # An unexpected condition was encountered and no more specific message is suitable.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#500].
+ #
+ class HTTPInternalServerError < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Not Implemented</tt> responses (status code 501).
+ #
+ # The server either does not recognize the request method,
+ # or it lacks the ability to fulfil the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
+ #
+ class HTTPNotImplemented < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Bad Gateway</tt> responses (status code 502).
+ #
+ # The server was acting as a gateway or proxy
+ # and received an invalid response from the upstream server.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
+ #
+ class HTTPBadGateway < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Service Unavailable</tt> responses (status code 503).
+ #
+ # The server cannot handle the request
+ # (because it is overloaded or down for maintenance).
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
+ #
+ class HTTPServiceUnavailable < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Gateway Timeout</tt> responses (status code 504).
+ #
+ # The server was acting as a gateway or proxy
+ # and did not receive a timely response from the upstream server.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-504-gateway-timeout].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
+ #
+ class HTTPGatewayTimeout < HTTPServerError
+ HAS_BODY = true
+ end
+ HTTPGatewayTimeOut = HTTPGatewayTimeout
+
+ # Response class for <tt>HTTP Version Not Supported</tt> responses (status code 505).
+ #
+ # The server does not support the HTTP version used in the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505].
+ # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
+ #
+ class HTTPVersionNotSupported < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Variant Also Negotiates</tt> responses (status code 506).
+ #
+ # Transparent content negotiation for the request results in a circular reference.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506].
+ # - {RFC 2295}[https://www.rfc-editor.org/rfc/rfc2295#section-8.1].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
+ #
+ class HTTPVariantAlsoNegotiates < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Insufficient Storage (WebDAV)</tt> responses (status code 507).
+ #
+ # The server is unable to store the representation needed to complete the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507].
+ # - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.5].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
+ #
+ class HTTPInsufficientStorage < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
+ #
+ # The server detected an infinite loop while processing the request.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508].
+ # - {RFC 5942}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.2].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
+ #
+ class HTTPLoopDetected < HTTPServerError
+ HAS_BODY = true
+ end
+ # 509 Bandwidth Limit Exceeded - Apache bw/limited extension
+
+ # Response class for <tt>Not Extended</tt> responses (status code 510).
+ #
+ # Further extensions to the request are required for the server to fulfill it.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510].
+ # - {RFC 2774}[https://www.rfc-editor.org/rfc/rfc2774.html#section-7].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
+ #
+ class HTTPNotExtended < HTTPServerError
+ HAS_BODY = true
+ end
+
+ # Response class for <tt>Network Authentication Required</tt> responses (status code 511).
+ #
+ # The client needs to authenticate to gain network access.
+ #
+ # :include: doc/net-http/included_getters.rdoc
+ #
+ # References:
+ #
+ # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511].
+ # - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-6].
+ # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
+ #
+ class HTTPNetworkAuthenticationRequired < HTTPServerError
+ HAS_BODY = true
+ end
-class Net::HTTPInternalServerError < Net::HTTPServerError # 500
- HAS_BODY = true
-end
-class Net::HTTPNotImplemented < Net::HTTPServerError # 501
- HAS_BODY = true
-end
-class Net::HTTPBadGateway < Net::HTTPServerError # 502
- HAS_BODY = true
-end
-class Net::HTTPServiceUnavailable < Net::HTTPServerError # 503
- HAS_BODY = true
-end
-class Net::HTTPGatewayTimeout < Net::HTTPServerError # 504
- HAS_BODY = true
-end
-Net::HTTPGatewayTimeOut = Net::HTTPGatewayTimeout
-class Net::HTTPVersionNotSupported < Net::HTTPServerError # 505
- HAS_BODY = true
-end
-class Net::HTTPVariantAlsoNegotiates < Net::HTTPServerError # 506
- HAS_BODY = true
-end
-class Net::HTTPInsufficientStorage < Net::HTTPServerError # 507 - RFC 4918
- HAS_BODY = true
-end
-class Net::HTTPLoopDetected < Net::HTTPServerError # 508 - RFC 5842
- HAS_BODY = true
-end
-# 509 Bandwidth Limit Exceeded - Apache bw/limited extension
-class Net::HTTPNotExtended < Net::HTTPServerError # 510 - RFC 2774
- HAS_BODY = true
-end
-class Net::HTTPNetworkAuthenticationRequired < Net::HTTPServerError # 511 - RFC 6585
- HAS_BODY = true
end
class Net::HTTPResponse
@@ -303,5 +1172,3 @@ class Net::HTTPResponse
'511' => Net::HTTPNetworkAuthenticationRequired,
}
end
-
-# :startdoc:
diff --git a/lib/net/http/status.rb b/lib/net/http/status.rb
index 8db3f7d9e3..e70b47d9fb 100644
--- a/lib/net/http/status.rb
+++ b/lib/net/http/status.rb
@@ -4,7 +4,7 @@ require_relative '../http'
if $0 == __FILE__
require 'open-uri'
- IO.foreach(__FILE__) do |line|
+ File.foreach(__FILE__) do |line|
puts line
break if line.start_with?('end')
end
@@ -16,7 +16,7 @@ if $0 == __FILE__
next if ['(Unused)', 'Unassigned', 'Description'].include?(mes)
puts " #{code} => '#{mes}',"
end
- puts "}"
+ puts "} # :nodoc:"
end
Net::HTTP::STATUS_CODES = {
@@ -55,15 +55,16 @@ Net::HTTP::STATUS_CODES = {
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
- 413 => 'Payload Too Large',
+ 413 => 'Content Too Large',
414 => 'URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Range Not Satisfiable',
417 => 'Expectation Failed',
421 => 'Misdirected Request',
- 422 => 'Unprocessable Entity',
+ 422 => 'Unprocessable Content',
423 => 'Locked',
424 => 'Failed Dependency',
+ 425 => 'Too Early',
426 => 'Upgrade Required',
428 => 'Precondition Required',
429 => 'Too Many Requests',
@@ -78,6 +79,6 @@ Net::HTTP::STATUS_CODES = {
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
508 => 'Loop Detected',
- 510 => 'Not Extended',
+ 510 => 'Not Extended (OBSOLETED)',
511 => 'Network Authentication Required',
-}
+} # :nodoc:
diff --git a/lib/net/https.rb b/lib/net/https.rb
index d46721c82a..0f23e1fb13 100644
--- a/lib/net/https.rb
+++ b/lib/net/https.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
=begin
= net/https -- SSL/TLS enhancement for Net::HTTP.
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
deleted file mode 100644
index aa46e47ef1..0000000000
--- a/lib/net/imap.rb
+++ /dev/null
@@ -1,3727 +0,0 @@
-# frozen_string_literal: true
-#
-# = net/imap.rb
-#
-# Copyright (C) 2000 Shugo Maeda <shugo@ruby-lang.org>
-#
-# This library is distributed under the terms of the Ruby license.
-# You can freely distribute/modify this library.
-#
-# Documentation: Shugo Maeda, with RDoc conversion and overview by William
-# Webber.
-#
-# See Net::IMAP for documentation.
-#
-
-
-require "socket"
-require "monitor"
-require "digest/md5"
-require "strscan"
-require_relative 'protocol'
-begin
- require "openssl"
-rescue LoadError
-end
-
-module Net
-
- #
- # Net::IMAP implements Internet Message Access Protocol (IMAP) client
- # functionality. The protocol is described in [IMAP].
- #
- # == IMAP Overview
- #
- # An IMAP client connects to a server, and then authenticates
- # itself using either #authenticate() or #login(). Having
- # authenticated itself, there is a range of commands
- # available to it. Most work with mailboxes, which may be
- # arranged in an hierarchical namespace, and each of which
- # contains zero or more messages. How this is implemented on
- # the server is implementation-dependent; on a UNIX server, it
- # will frequently be implemented as files in mailbox format
- # within a hierarchy of directories.
- #
- # To work on the messages within a mailbox, the client must
- # first select that mailbox, using either #select() or (for
- # read-only access) #examine(). Once the client has successfully
- # selected a mailbox, they enter _selected_ state, and that
- # mailbox becomes the _current_ mailbox, on which mail-item
- # related commands implicitly operate.
- #
- # Messages have two sorts of identifiers: message sequence
- # numbers and UIDs.
- #
- # Message sequence numbers number messages within a mailbox
- # from 1 up to the number of items in the mailbox. If a new
- # message arrives during a session, it receives a sequence
- # number equal to the new size of the mailbox. If messages
- # are expunged from the mailbox, remaining messages have their
- # sequence numbers "shuffled down" to fill the gaps.
- #
- # UIDs, on the other hand, are permanently guaranteed not to
- # identify another message within the same mailbox, even if
- # the existing message is deleted. UIDs are required to
- # be assigned in ascending (but not necessarily sequential)
- # order within a mailbox; this means that if a non-IMAP client
- # rearranges the order of mailitems within a mailbox, the
- # UIDs have to be reassigned. An IMAP client thus cannot
- # rearrange message orders.
- #
- # == Examples of Usage
- #
- # === List sender and subject of all recent messages in the default mailbox
- #
- # imap = Net::IMAP.new('mail.example.com')
- # imap.authenticate('LOGIN', 'joe_user', 'joes_password')
- # imap.examine('INBOX')
- # imap.search(["RECENT"]).each do |message_id|
- # envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
- # puts "#{envelope.from[0].name}: \t#{envelope.subject}"
- # end
- #
- # === Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03"
- #
- # imap = Net::IMAP.new('mail.example.com')
- # imap.authenticate('LOGIN', 'joe_user', 'joes_password')
- # imap.select('Mail/sent-mail')
- # if not imap.list('Mail/', 'sent-apr03')
- # imap.create('Mail/sent-apr03')
- # end
- # imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id|
- # imap.copy(message_id, "Mail/sent-apr03")
- # imap.store(message_id, "+FLAGS", [:Deleted])
- # end
- # imap.expunge
- #
- # == Thread Safety
- #
- # Net::IMAP supports concurrent threads. For example,
- #
- # imap = Net::IMAP.new("imap.foo.net", "imap2")
- # imap.authenticate("cram-md5", "bar", "password")
- # imap.select("inbox")
- # fetch_thread = Thread.start { imap.fetch(1..-1, "UID") }
- # search_result = imap.search(["BODY", "hello"])
- # fetch_result = fetch_thread.value
- # imap.disconnect
- #
- # This script invokes the FETCH command and the SEARCH command concurrently.
- #
- # == Errors
- #
- # An IMAP server can send three different types of responses to indicate
- # failure:
- #
- # NO:: the attempted command could not be successfully completed. For
- # instance, the username/password used for logging in are incorrect;
- # the selected mailbox does not exist; etc.
- #
- # BAD:: the request from the client does not follow the server's
- # understanding of the IMAP protocol. This includes attempting
- # commands from the wrong client state; for instance, attempting
- # to perform a SEARCH command without having SELECTed a current
- # mailbox. It can also signal an internal server
- # failure (such as a disk crash) has occurred.
- #
- # BYE:: the server is saying goodbye. This can be part of a normal
- # logout sequence, and can be used as part of a login sequence
- # to indicate that the server is (for some reason) unwilling
- # to accept your connection. As a response to any other command,
- # it indicates either that the server is shutting down, or that
- # the server is timing out the client connection due to inactivity.
- #
- # These three error response are represented by the errors
- # Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, and
- # Net::IMAP::ByeResponseError, all of which are subclasses of
- # Net::IMAP::ResponseError. Essentially, all methods that involve
- # sending a request to the server can generate one of these errors.
- # Only the most pertinent instances have been documented below.
- #
- # Because the IMAP class uses Sockets for communication, its methods
- # are also susceptible to the various errors that can occur when
- # working with sockets. These are generally represented as
- # Errno errors. For instance, any method that involves sending a
- # request to the server and/or receiving a response from it could
- # raise an Errno::EPIPE error if the network connection unexpectedly
- # goes down. See the socket(7), ip(7), tcp(7), socket(2), connect(2),
- # and associated man pages.
- #
- # Finally, a Net::IMAP::DataFormatError is thrown if low-level data
- # is found to be in an incorrect format (for instance, when converting
- # between UTF-8 and UTF-16), and Net::IMAP::ResponseParseError is
- # thrown if a server response is non-parseable.
- #
- #
- # == References
- #
- # [[IMAP]]
- # M. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",
- # RFC 2060, December 1996. (Note: since obsoleted by RFC 3501)
- #
- # [[LANGUAGE-TAGS]]
- # Alvestrand, H., "Tags for the Identification of
- # Languages", RFC 1766, March 1995.
- #
- # [[MD5]]
- # Myers, J., and M. Rose, "The Content-MD5 Header Field", RFC
- # 1864, October 1995.
- #
- # [[MIME-IMB]]
- # Freed, N., and N. Borenstein, "MIME (Multipurpose Internet
- # Mail Extensions) Part One: Format of Internet Message Bodies", RFC
- # 2045, November 1996.
- #
- # [[RFC-822]]
- # Crocker, D., "Standard for the Format of ARPA Internet Text
- # Messages", STD 11, RFC 822, University of Delaware, August 1982.
- #
- # [[RFC-2087]]
- # Myers, J., "IMAP4 QUOTA extension", RFC 2087, January 1997.
- #
- # [[RFC-2086]]
- # Myers, J., "IMAP4 ACL extension", RFC 2086, January 1997.
- #
- # [[RFC-2195]]
- # Klensin, J., Catoe, R., and Krumviede, P., "IMAP/POP AUTHorize Extension
- # for Simple Challenge/Response", RFC 2195, September 1997.
- #
- # [[SORT-THREAD-EXT]]
- # Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - SORT and THREAD
- # Extensions", draft-ietf-imapext-sort, May 2003.
- #
- # [[OSSL]]
- # http://www.openssl.org
- #
- # [[RSSL]]
- # http://savannah.gnu.org/projects/rubypki
- #
- # [[UTF7]]
- # Goldsmith, D. and Davis, M., "UTF-7: A Mail-Safe Transformation Format of
- # Unicode", RFC 2152, May 1997.
- #
- class IMAP < Protocol
- include MonitorMixin
- if defined?(OpenSSL::SSL)
- include OpenSSL
- include SSL
- end
-
- # Returns an initial greeting response from the server.
- attr_reader :greeting
-
- # Returns recorded untagged responses. For example:
- #
- # imap.select("inbox")
- # p imap.responses["EXISTS"][-1]
- # #=> 2
- # p imap.responses["UIDVALIDITY"][-1]
- # #=> 968263756
- attr_reader :responses
-
- # Returns all response handlers.
- attr_reader :response_handlers
-
- # Seconds to wait until a connection is opened.
- # If the IMAP object cannot open a connection within this time,
- # it raises a Net::OpenTimeout exception. The default value is 30 seconds.
- attr_reader :open_timeout
-
- # The thread to receive exceptions.
- attr_accessor :client_thread
-
- # Flag indicating a message has been seen.
- SEEN = :Seen
-
- # Flag indicating a message has been answered.
- ANSWERED = :Answered
-
- # Flag indicating a message has been flagged for special or urgent
- # attention.
- FLAGGED = :Flagged
-
- # Flag indicating a message has been marked for deletion. This
- # will occur when the mailbox is closed or expunged.
- DELETED = :Deleted
-
- # Flag indicating a message is only a draft or work-in-progress version.
- DRAFT = :Draft
-
- # Flag indicating that the message is "recent," meaning that this
- # session is the first session in which the client has been notified
- # of this message.
- RECENT = :Recent
-
- # Flag indicating that a mailbox context name cannot contain
- # children.
- NOINFERIORS = :Noinferiors
-
- # Flag indicating that a mailbox is not selected.
- NOSELECT = :Noselect
-
- # Flag indicating that a mailbox has been marked "interesting" by
- # the server; this commonly indicates that the mailbox contains
- # new messages.
- MARKED = :Marked
-
- # Flag indicating that the mailbox does not contains new messages.
- UNMARKED = :Unmarked
-
- # Returns the debug mode.
- def self.debug
- return @@debug
- end
-
- # Sets the debug mode.
- def self.debug=(val)
- return @@debug = val
- end
-
- # Returns the max number of flags interned to symbols.
- def self.max_flag_count
- return @@max_flag_count
- end
-
- # Sets the max number of flags interned to symbols.
- def self.max_flag_count=(count)
- @@max_flag_count = count
- end
-
- # Adds an authenticator for Net::IMAP#authenticate. +auth_type+
- # is the type of authentication this authenticator supports
- # (for instance, "LOGIN"). The +authenticator+ is an object
- # which defines a process() method to handle authentication with
- # the server. See Net::IMAP::LoginAuthenticator,
- # Net::IMAP::CramMD5Authenticator, and Net::IMAP::DigestMD5Authenticator
- # for examples.
- #
- #
- # If +auth_type+ refers to an existing authenticator, it will be
- # replaced by the new one.
- def self.add_authenticator(auth_type, authenticator)
- @@authenticators[auth_type] = authenticator
- end
-
- # The default port for IMAP connections, port 143
- def self.default_port
- return PORT
- end
-
- # The default port for IMAPS connections, port 993
- def self.default_tls_port
- return SSL_PORT
- end
-
- class << self
- alias default_imap_port default_port
- alias default_imaps_port default_tls_port
- alias default_ssl_port default_tls_port
- end
-
- # Disconnects from the server.
- def disconnect
- return if disconnected?
- begin
- begin
- # try to call SSL::SSLSocket#io.
- @sock.io.shutdown
- rescue NoMethodError
- # @sock is not an SSL::SSLSocket.
- @sock.shutdown
- end
- rescue Errno::ENOTCONN
- # ignore `Errno::ENOTCONN: Socket is not connected' on some platforms.
- rescue Exception => e
- @receiver_thread.raise(e)
- end
- @receiver_thread.join
- synchronize do
- @sock.close
- end
- raise e if e
- end
-
- # Returns true if disconnected from the server.
- def disconnected?
- return @sock.closed?
- end
-
- # Sends a CAPABILITY command, and returns an array of
- # capabilities that the server supports. Each capability
- # is a string. See [IMAP] for a list of possible
- # capabilities.
- #
- # Note that the Net::IMAP class does not modify its
- # behaviour according to the capabilities of the server;
- # it is up to the user of the class to ensure that
- # a certain capability is supported by a server before
- # using it.
- def capability
- synchronize do
- send_command("CAPABILITY")
- return @responses.delete("CAPABILITY")[-1]
- end
- end
-
- # Sends a NOOP command to the server. It does nothing.
- def noop
- send_command("NOOP")
- end
-
- # Sends a LOGOUT command to inform the server that the client is
- # done with the connection.
- def logout
- send_command("LOGOUT")
- end
-
- # Sends a STARTTLS command to start TLS session.
- def starttls(options = {}, verify = true)
- send_command("STARTTLS") do |resp|
- if resp.kind_of?(TaggedResponse) && resp.name == "OK"
- begin
- # for backward compatibility
- certs = options.to_str
- options = create_ssl_params(certs, verify)
- rescue NoMethodError
- end
- start_tls_session(options)
- end
- end
- end
-
- # Sends an AUTHENTICATE command to authenticate the client.
- # The +auth_type+ parameter is a string that represents
- # the authentication mechanism to be used. Currently Net::IMAP
- # supports the authentication mechanisms:
- #
- # LOGIN:: login using cleartext user and password.
- # CRAM-MD5:: login with cleartext user and encrypted password
- # (see [RFC-2195] for a full description). This
- # mechanism requires that the server have the user's
- # password stored in clear-text password.
- #
- # For both of these mechanisms, there should be two +args+: username
- # and (cleartext) password. A server may not support one or the other
- # of these mechanisms; check #capability() for a capability of
- # the form "AUTH=LOGIN" or "AUTH=CRAM-MD5".
- #
- # Authentication is done using the appropriate authenticator object:
- # see @@authenticators for more information on plugging in your own
- # authenticator.
- #
- # For example:
- #
- # imap.authenticate('LOGIN', user, password)
- #
- # A Net::IMAP::NoResponseError is raised if authentication fails.
- def authenticate(auth_type, *args)
- auth_type = auth_type.upcase
- unless @@authenticators.has_key?(auth_type)
- raise ArgumentError,
- format('unknown auth type - "%s"', auth_type)
- end
- authenticator = @@authenticators[auth_type].new(*args)
- send_command("AUTHENTICATE", auth_type) do |resp|
- if resp.instance_of?(ContinuationRequest)
- data = authenticator.process(resp.data.text.unpack("m")[0])
- s = [data].pack("m0")
- send_string_data(s)
- put_string(CRLF)
- end
- end
- end
-
- # Sends a LOGIN command to identify the client and carries
- # the plaintext +password+ authenticating this +user+. Note
- # that, unlike calling #authenticate() with an +auth_type+
- # of "LOGIN", #login() does *not* use the login authenticator.
- #
- # A Net::IMAP::NoResponseError is raised if authentication fails.
- def login(user, password)
- send_command("LOGIN", user, password)
- end
-
- # Sends a SELECT command to select a +mailbox+ so that messages
- # in the +mailbox+ can be accessed.
- #
- # After you have selected a mailbox, you may retrieve the
- # number of items in that mailbox from @responses["EXISTS"][-1],
- # and the number of recent messages from @responses["RECENT"][-1].
- # Note that these values can change if new messages arrive
- # during a session; see #add_response_handler() for a way of
- # detecting this event.
- #
- # A Net::IMAP::NoResponseError is raised if the mailbox does not
- # exist or is for some reason non-selectable.
- def select(mailbox)
- synchronize do
- @responses.clear
- send_command("SELECT", mailbox)
- end
- end
-
- # Sends a EXAMINE command to select a +mailbox+ so that messages
- # in the +mailbox+ can be accessed. Behaves the same as #select(),
- # except that the selected +mailbox+ is identified as read-only.
- #
- # A Net::IMAP::NoResponseError is raised if the mailbox does not
- # exist or is for some reason non-examinable.
- def examine(mailbox)
- synchronize do
- @responses.clear
- send_command("EXAMINE", mailbox)
- end
- end
-
- # Sends a CREATE command to create a new +mailbox+.
- #
- # A Net::IMAP::NoResponseError is raised if a mailbox with that name
- # cannot be created.
- def create(mailbox)
- send_command("CREATE", mailbox)
- end
-
- # Sends a DELETE command to remove the +mailbox+.
- #
- # A Net::IMAP::NoResponseError is raised if a mailbox with that name
- # cannot be deleted, either because it does not exist or because the
- # client does not have permission to delete it.
- def delete(mailbox)
- send_command("DELETE", mailbox)
- end
-
- # Sends a RENAME command to change the name of the +mailbox+ to
- # +newname+.
- #
- # A Net::IMAP::NoResponseError is raised if a mailbox with the
- # name +mailbox+ cannot be renamed to +newname+ for whatever
- # reason; for instance, because +mailbox+ does not exist, or
- # because there is already a mailbox with the name +newname+.
- def rename(mailbox, newname)
- send_command("RENAME", mailbox, newname)
- end
-
- # Sends a SUBSCRIBE command to add the specified +mailbox+ name to
- # the server's set of "active" or "subscribed" mailboxes as returned
- # by #lsub().
- #
- # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be
- # subscribed to; for instance, because it does not exist.
- def subscribe(mailbox)
- send_command("SUBSCRIBE", mailbox)
- end
-
- # Sends a UNSUBSCRIBE command to remove the specified +mailbox+ name
- # from the server's set of "active" or "subscribed" mailboxes.
- #
- # A Net::IMAP::NoResponseError is raised if +mailbox+ cannot be
- # unsubscribed from; for instance, because the client is not currently
- # subscribed to it.
- def unsubscribe(mailbox)
- send_command("UNSUBSCRIBE", mailbox)
- end
-
- # Sends a LIST command, and returns a subset of names from
- # the complete set of all names available to the client.
- # +refname+ provides a context (for instance, a base directory
- # in a directory-based mailbox hierarchy). +mailbox+ specifies
- # a mailbox or (via wildcards) mailboxes under that context.
- # Two wildcards may be used in +mailbox+: '*', which matches
- # all characters *including* the hierarchy delimiter (for instance,
- # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%',
- # which matches all characters *except* the hierarchy delimiter.
- #
- # If +refname+ is empty, +mailbox+ is used directly to determine
- # which mailboxes to match. If +mailbox+ is empty, the root
- # name of +refname+ and the hierarchy delimiter are returned.
- #
- # The return value is an array of +Net::IMAP::MailboxList+. For example:
- #
- # imap.create("foo/bar")
- # imap.create("foo/baz")
- # p imap.list("", "foo/%")
- # #=> [#<Net::IMAP::MailboxList attr=[:Noselect], delim="/", name="foo/">, \\
- # #<Net::IMAP::MailboxList attr=[:Noinferiors, :Marked], delim="/", name="foo/bar">, \\
- # #<Net::IMAP::MailboxList attr=[:Noinferiors], delim="/", name="foo/baz">]
- def list(refname, mailbox)
- synchronize do
- send_command("LIST", refname, mailbox)
- return @responses.delete("LIST")
- end
- end
-
- # Sends a XLIST command, and returns a subset of names from
- # the complete set of all names available to the client.
- # +refname+ provides a context (for instance, a base directory
- # in a directory-based mailbox hierarchy). +mailbox+ specifies
- # a mailbox or (via wildcards) mailboxes under that context.
- # Two wildcards may be used in +mailbox+: '*', which matches
- # all characters *including* the hierarchy delimiter (for instance,
- # '/' on a UNIX-hosted directory-based mailbox hierarchy); and '%',
- # which matches all characters *except* the hierarchy delimiter.
- #
- # If +refname+ is empty, +mailbox+ is used directly to determine
- # which mailboxes to match. If +mailbox+ is empty, the root
- # name of +refname+ and the hierarchy delimiter are returned.
- #
- # The XLIST command is like the LIST command except that the flags
- # returned refer to the function of the folder/mailbox, e.g. :Sent
- #
- # The return value is an array of +Net::IMAP::MailboxList+. For example:
- #
- # imap.create("foo/bar")
- # imap.create("foo/baz")
- # p imap.xlist("", "foo/%")
- # #=> [#<Net::IMAP::MailboxList attr=[:Noselect], delim="/", name="foo/">, \\
- # #<Net::IMAP::MailboxList attr=[:Noinferiors, :Marked], delim="/", name="foo/bar">, \\
- # #<Net::IMAP::MailboxList attr=[:Noinferiors], delim="/", name="foo/baz">]
- def xlist(refname, mailbox)
- synchronize do
- send_command("XLIST", refname, mailbox)
- return @responses.delete("XLIST")
- end
- end
-
- # Sends the GETQUOTAROOT command along with the specified +mailbox+.
- # This command is generally available to both admin and user.
- # If this mailbox exists, it returns an array containing objects of type
- # Net::IMAP::MailboxQuotaRoot and Net::IMAP::MailboxQuota.
- def getquotaroot(mailbox)
- synchronize do
- send_command("GETQUOTAROOT", mailbox)
- result = []
- result.concat(@responses.delete("QUOTAROOT"))
- result.concat(@responses.delete("QUOTA"))
- return result
- end
- end
-
- # Sends the GETQUOTA command along with specified +mailbox+.
- # If this mailbox exists, then an array containing a
- # Net::IMAP::MailboxQuota object is returned. This
- # command is generally only available to server admin.
- def getquota(mailbox)
- synchronize do
- send_command("GETQUOTA", mailbox)
- return @responses.delete("QUOTA")
- end
- end
-
- # Sends a SETQUOTA command along with the specified +mailbox+ and
- # +quota+. If +quota+ is nil, then +quota+ will be unset for that
- # mailbox. Typically one needs to be logged in as a server admin
- # for this to work. The IMAP quota commands are described in
- # [RFC-2087].
- def setquota(mailbox, quota)
- if quota.nil?
- data = '()'
- else
- data = '(STORAGE ' + quota.to_s + ')'
- end
- send_command("SETQUOTA", mailbox, RawData.new(data))
- end
-
- # Sends the SETACL command along with +mailbox+, +user+ and the
- # +rights+ that user is to have on that mailbox. If +rights+ is nil,
- # then that user will be stripped of any rights to that mailbox.
- # The IMAP ACL commands are described in [RFC-2086].
- def setacl(mailbox, user, rights)
- if rights.nil?
- send_command("SETACL", mailbox, user, "")
- else
- send_command("SETACL", mailbox, user, rights)
- end
- end
-
- # Send the GETACL command along with a specified +mailbox+.
- # If this mailbox exists, an array containing objects of
- # Net::IMAP::MailboxACLItem will be returned.
- def getacl(mailbox)
- synchronize do
- send_command("GETACL", mailbox)
- return @responses.delete("ACL")[-1]
- end
- end
-
- # Sends a LSUB command, and returns a subset of names from the set
- # of names that the user has declared as being "active" or
- # "subscribed." +refname+ and +mailbox+ are interpreted as
- # for #list().
- # The return value is an array of +Net::IMAP::MailboxList+.
- def lsub(refname, mailbox)
- synchronize do
- send_command("LSUB", refname, mailbox)
- return @responses.delete("LSUB")
- end
- end
-
- # Sends a STATUS command, and returns the status of the indicated
- # +mailbox+. +attr+ is a list of one or more attributes whose
- # statuses are to be requested. Supported attributes include:
- #
- # MESSAGES:: the number of messages in the mailbox.
- # RECENT:: the number of recent messages in the mailbox.
- # UNSEEN:: the number of unseen messages in the mailbox.
- #
- # The return value is a hash of attributes. For example:
- #
- # p imap.status("inbox", ["MESSAGES", "RECENT"])
- # #=> {"RECENT"=>0, "MESSAGES"=>44}
- #
- # A Net::IMAP::NoResponseError is raised if status values
- # for +mailbox+ cannot be returned; for instance, because it
- # does not exist.
- def status(mailbox, attr)
- synchronize do
- send_command("STATUS", mailbox, attr)
- return @responses.delete("STATUS")[-1].attr
- end
- end
-
- # Sends a APPEND command to append the +message+ to the end of
- # the +mailbox+. The optional +flags+ argument is an array of
- # flags initially passed to the new message. The optional
- # +date_time+ argument specifies the creation time to assign to the
- # new message; it defaults to the current time.
- # For example:
- #
- # imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now)
- # Subject: hello
- # From: shugo@ruby-lang.org
- # To: shugo@ruby-lang.org
- #
- # hello world
- # EOF
- #
- # A Net::IMAP::NoResponseError is raised if the mailbox does
- # not exist (it is not created automatically), or if the flags,
- # date_time, or message arguments contain errors.
- def append(mailbox, message, flags = nil, date_time = nil)
- args = []
- if flags
- args.push(flags)
- end
- args.push(date_time) if date_time
- args.push(Literal.new(message))
- send_command("APPEND", mailbox, *args)
- end
-
- # Sends a CHECK command to request a checkpoint of the currently
- # selected mailbox. This performs implementation-specific
- # housekeeping; for instance, reconciling the mailbox's
- # in-memory and on-disk state.
- def check
- send_command("CHECK")
- end
-
- # Sends a CLOSE command to close the currently selected mailbox.
- # The CLOSE command permanently removes from the mailbox all
- # messages that have the \Deleted flag set.
- def close
- send_command("CLOSE")
- end
-
- # Sends a EXPUNGE command to permanently remove from the currently
- # selected mailbox all messages that have the \Deleted flag set.
- def expunge
- synchronize do
- send_command("EXPUNGE")
- return @responses.delete("EXPUNGE")
- end
- end
-
- # Sends a SEARCH command to search the mailbox for messages that
- # match the given searching criteria, and returns message sequence
- # numbers. +keys+ can either be a string holding the entire
- # search string, or a single-dimension array of search keywords and
- # arguments. The following are some common search criteria;
- # see [IMAP] section 6.4.4 for a full list.
- #
- # <message set>:: a set of message sequence numbers. ',' indicates
- # an interval, ':' indicates a range. For instance,
- # '2,10:12,15' means "2,10,11,12,15".
- #
- # BEFORE <date>:: messages with an internal date strictly before
- # <date>. The date argument has a format similar
- # to 8-Aug-2002.
- #
- # BODY <string>:: messages that contain <string> within their body.
- #
- # CC <string>:: messages containing <string> in their CC field.
- #
- # FROM <string>:: messages that contain <string> in their FROM field.
- #
- # NEW:: messages with the \Recent, but not the \Seen, flag set.
- #
- # NOT <search-key>:: negate the following search key.
- #
- # OR <search-key> <search-key>:: "or" two search keys together.
- #
- # ON <date>:: messages with an internal date exactly equal to <date>,
- # which has a format similar to 8-Aug-2002.
- #
- # SINCE <date>:: messages with an internal date on or after <date>.
- #
- # SUBJECT <string>:: messages with <string> in their subject.
- #
- # TO <string>:: messages with <string> in their TO field.
- #
- # For example:
- #
- # p imap.search(["SUBJECT", "hello", "NOT", "NEW"])
- # #=> [1, 6, 7, 8]
- def search(keys, charset = nil)
- return search_internal("SEARCH", keys, charset)
- end
-
- # Similar to #search(), but returns unique identifiers.
- def uid_search(keys, charset = nil)
- return search_internal("UID SEARCH", keys, charset)
- end
-
- # Sends a FETCH command to retrieve data associated with a message
- # in the mailbox.
- #
- # The +set+ parameter is a number or a range between two numbers,
- # or an array of those. The number is a message sequence number,
- # where -1 represents a '*' for use in range notation like 100..-1
- # being interpreted as '100:*'. Beware that the +exclude_end?+
- # property of a Range object is ignored, and the contents of a
- # range are independent of the order of the range endpoints as per
- # the protocol specification, so 1...5, 5..1 and 5...1 are all
- # equivalent to 1..5.
- #
- # +attr+ is a list of attributes to fetch; see the documentation
- # for Net::IMAP::FetchData for a list of valid attributes.
- #
- # The return value is an array of Net::IMAP::FetchData or nil
- # (instead of an empty array) if there is no matching message.
- #
- # For example:
- #
- # p imap.fetch(6..8, "UID")
- # #=> [#<Net::IMAP::FetchData seqno=6, attr={"UID"=>98}>, \\
- # #<Net::IMAP::FetchData seqno=7, attr={"UID"=>99}>, \\
- # #<Net::IMAP::FetchData seqno=8, attr={"UID"=>100}>]
- # p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]")
- # #=> [#<Net::IMAP::FetchData seqno=6, attr={"BODY[HEADER.FIELDS (SUBJECT)]"=>"Subject: test\r\n\r\n"}>]
- # data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0]
- # p data.seqno
- # #=> 6
- # p data.attr["RFC822.SIZE"]
- # #=> 611
- # p data.attr["INTERNALDATE"]
- # #=> "12-Oct-2000 22:40:59 +0900"
- # p data.attr["UID"]
- # #=> 98
- def fetch(set, attr, mod = nil)
- return fetch_internal("FETCH", set, attr, mod)
- end
-
- # Similar to #fetch(), but +set+ contains unique identifiers.
- def uid_fetch(set, attr, mod = nil)
- return fetch_internal("UID FETCH", set, attr, mod)
- end
-
- # Sends a STORE command to alter data associated with messages
- # in the mailbox, in particular their flags. The +set+ parameter
- # is a number, an array of numbers, or a Range object. Each number
- # is a message sequence number. +attr+ is the name of a data item
- # to store: 'FLAGS' will replace the message's flag list
- # with the provided one, '+FLAGS' will add the provided flags,
- # and '-FLAGS' will remove them. +flags+ is a list of flags.
- #
- # The return value is an array of Net::IMAP::FetchData. For example:
- #
- # p imap.store(6..8, "+FLAGS", [:Deleted])
- # #=> [#<Net::IMAP::FetchData seqno=6, attr={"FLAGS"=>[:Seen, :Deleted]}>, \\
- # #<Net::IMAP::FetchData seqno=7, attr={"FLAGS"=>[:Seen, :Deleted]}>, \\
- # #<Net::IMAP::FetchData seqno=8, attr={"FLAGS"=>[:Seen, :Deleted]}>]
- def store(set, attr, flags)
- return store_internal("STORE", set, attr, flags)
- end
-
- # Similar to #store(), but +set+ contains unique identifiers.
- def uid_store(set, attr, flags)
- return store_internal("UID STORE", set, attr, flags)
- end
-
- # Sends a COPY command to copy the specified message(s) to the end
- # of the specified destination +mailbox+. The +set+ parameter is
- # a number, an array of numbers, or a Range object. The number is
- # a message sequence number.
- def copy(set, mailbox)
- copy_internal("COPY", set, mailbox)
- end
-
- # Similar to #copy(), but +set+ contains unique identifiers.
- def uid_copy(set, mailbox)
- copy_internal("UID COPY", set, mailbox)
- end
-
- # Sends a MOVE command to move the specified message(s) to the end
- # of the specified destination +mailbox+. The +set+ parameter is
- # a number, an array of numbers, or a Range object. The number is
- # a message sequence number.
- # The IMAP MOVE extension is described in [RFC-6851].
- def move(set, mailbox)
- copy_internal("MOVE", set, mailbox)
- end
-
- # Similar to #move(), but +set+ contains unique identifiers.
- def uid_move(set, mailbox)
- copy_internal("UID MOVE", set, mailbox)
- end
-
- # Sends a SORT command to sort messages in the mailbox.
- # Returns an array of message sequence numbers. For example:
- #
- # p imap.sort(["FROM"], ["ALL"], "US-ASCII")
- # #=> [1, 2, 3, 5, 6, 7, 8, 4, 9]
- # p imap.sort(["DATE"], ["SUBJECT", "hello"], "US-ASCII")
- # #=> [6, 7, 8, 1]
- #
- # See [SORT-THREAD-EXT] for more details.
- def sort(sort_keys, search_keys, charset)
- return sort_internal("SORT", sort_keys, search_keys, charset)
- end
-
- # Similar to #sort(), but returns an array of unique identifiers.
- def uid_sort(sort_keys, search_keys, charset)
- return sort_internal("UID SORT", sort_keys, search_keys, charset)
- end
-
- # Adds a response handler. For example, to detect when
- # the server sends a new EXISTS response (which normally
- # indicates new messages being added to the mailbox),
- # add the following handler after selecting the
- # mailbox:
- #
- # imap.add_response_handler { |resp|
- # if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS"
- # puts "Mailbox now has #{resp.data} messages"
- # end
- # }
- #
- def add_response_handler(handler = Proc.new)
- @response_handlers.push(handler)
- end
-
- # Removes the response handler.
- def remove_response_handler(handler)
- @response_handlers.delete(handler)
- end
-
- # Similar to #search(), but returns message sequence numbers in threaded
- # format, as a Net::IMAP::ThreadMember tree. The supported algorithms
- # are:
- #
- # ORDEREDSUBJECT:: split into single-level threads according to subject,
- # ordered by date.
- # REFERENCES:: split into threads by parent/child relationships determined
- # by which message is a reply to which.
- #
- # Unlike #search(), +charset+ is a required argument. US-ASCII
- # and UTF-8 are sample values.
- #
- # See [SORT-THREAD-EXT] for more details.
- def thread(algorithm, search_keys, charset)
- return thread_internal("THREAD", algorithm, search_keys, charset)
- end
-
- # Similar to #thread(), but returns unique identifiers instead of
- # message sequence numbers.
- def uid_thread(algorithm, search_keys, charset)
- return thread_internal("UID THREAD", algorithm, search_keys, charset)
- end
-
- # Sends an IDLE command that waits for notifications of new or expunged
- # messages. Yields responses from the server during the IDLE.
- #
- # Use #idle_done() to leave IDLE.
- #
- # If +timeout+ is given, this method returns after +timeout+ seconds passed.
- # +timeout+ can be used for keep-alive. For example, the following code
- # checks the connection for each 60 seconds.
- #
- # loop do
- # imap.idle(60) do |res|
- # ...
- # end
- # end
- def idle(timeout = nil, &response_handler)
- raise LocalJumpError, "no block given" unless response_handler
-
- response = nil
-
- synchronize do
- tag = Thread.current[:net_imap_tag] = generate_tag
- put_string("#{tag} IDLE#{CRLF}")
-
- begin
- add_response_handler(response_handler)
- @idle_done_cond = new_cond
- @idle_done_cond.wait(timeout)
- @idle_done_cond = nil
- if @receiver_thread_terminating
- raise @exception || Net::IMAP::Error.new("connection closed")
- end
- ensure
- unless @receiver_thread_terminating
- remove_response_handler(response_handler)
- put_string("DONE#{CRLF}")
- response = get_tagged_response(tag, "IDLE")
- end
- end
- end
-
- return response
- end
-
- # Leaves IDLE.
- def idle_done
- synchronize do
- if @idle_done_cond.nil?
- raise Net::IMAP::Error, "not during IDLE"
- end
- @idle_done_cond.signal
- end
- end
-
- # Decode a string from modified UTF-7 format to UTF-8.
- #
- # UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP uses a
- # slightly modified version of this to encode mailbox names
- # containing non-ASCII characters; see [IMAP] section 5.1.3.
- #
- # Net::IMAP does _not_ automatically encode and decode
- # mailbox names to and from UTF-7.
- def self.decode_utf7(s)
- return s.gsub(/&([^-]+)?-/n) {
- if $1
- ($1.tr(",", "/") + "===").unpack1("m").encode(Encoding::UTF_8, Encoding::UTF_16BE)
- else
- "&"
- end
- }
- end
-
- # Encode a string from UTF-8 format to modified UTF-7.
- def self.encode_utf7(s)
- return s.gsub(/(&)|[^\x20-\x7e]+/) {
- if $1
- "&-"
- else
- base64 = [$&.encode(Encoding::UTF_16BE)].pack("m0")
- "&" + base64.delete("=").tr("/", ",") + "-"
- end
- }.force_encoding("ASCII-8BIT")
- end
-
- # Formats +time+ as an IMAP-style date.
- def self.format_date(time)
- return time.strftime('%d-%b-%Y')
- end
-
- # Formats +time+ as an IMAP-style date-time.
- def self.format_datetime(time)
- return time.strftime('%d-%b-%Y %H:%M %z')
- end
-
- private
-
- CRLF = "\r\n" # :nodoc:
- PORT = 143 # :nodoc:
- SSL_PORT = 993 # :nodoc:
-
- @@debug = false
- @@authenticators = {}
- @@max_flag_count = 10000
-
- # :call-seq:
- # Net::IMAP.new(host, options = {})
- #
- # Creates a new Net::IMAP object and connects it to the specified
- # +host+.
- #
- # +options+ is an option hash, each key of which is a symbol.
- #
- # The available options are:
- #
- # port:: Port number (default value is 143 for imap, or 993 for imaps)
- # ssl:: If options[:ssl] is true, then an attempt will be made
- # to use SSL (now TLS) to connect to the server. For this to work
- # OpenSSL [OSSL] and the Ruby OpenSSL [RSSL] extensions need to
- # be installed.
- # If options[:ssl] is a hash, it's passed to
- # OpenSSL::SSL::SSLContext#set_params as parameters.
- # open_timeout:: Seconds to wait until a connection is opened
- #
- # The most common errors are:
- #
- # Errno::ECONNREFUSED:: Connection refused by +host+ or an intervening
- # firewall.
- # Errno::ETIMEDOUT:: Connection timed out (possibly due to packets
- # being dropped by an intervening firewall).
- # Errno::ENETUNREACH:: There is no route to that network.
- # SocketError:: Hostname not known or other socket error.
- # Net::IMAP::ByeResponseError:: The connected to the host was successful, but
- # it immediately said goodbye.
- def initialize(host, port_or_options = {},
- usessl = false, certs = nil, verify = true)
- super()
- @host = host
- begin
- options = port_or_options.to_hash
- rescue NoMethodError
- # for backward compatibility
- options = {}
- options[:port] = port_or_options
- if usessl
- options[:ssl] = create_ssl_params(certs, verify)
- end
- end
- @port = options[:port] || (options[:ssl] ? SSL_PORT : PORT)
- @tag_prefix = "RUBY"
- @tagno = 0
- @open_timeout = options[:open_timeout] || 30
- @parser = ResponseParser.new
- @sock = tcp_socket(@host, @port)
- begin
- if options[:ssl]
- start_tls_session(options[:ssl])
- @usessl = true
- else
- @usessl = false
- end
- @responses = Hash.new([].freeze)
- @tagged_responses = {}
- @response_handlers = []
- @tagged_response_arrival = new_cond
- @continued_command_tag = nil
- @continuation_request_arrival = new_cond
- @continuation_request_exception = nil
- @idle_done_cond = nil
- @logout_command_tag = nil
- @debug_output_bol = true
- @exception = nil
-
- @greeting = get_response
- if @greeting.nil?
- raise Error, "connection closed"
- end
- if @greeting.name == "BYE"
- raise ByeResponseError, @greeting
- end
-
- @client_thread = Thread.current
- @receiver_thread = Thread.start {
- begin
- receive_responses
- rescue Exception
- end
- }
- @receiver_thread_terminating = false
- rescue Exception
- @sock.close
- raise
- end
- end
-
- def tcp_socket(host, port)
- s = Socket.tcp(host, port, :connect_timeout => @open_timeout)
- s.setsockopt(:SOL_SOCKET, :SO_KEEPALIVE, true)
- s
- rescue Errno::ETIMEDOUT
- raise Net::OpenTimeout, "Timeout to open TCP connection to " +
- "#{host}:#{port} (exceeds #{@open_timeout} seconds)"
- end
-
- def receive_responses
- connection_closed = false
- until connection_closed
- synchronize do
- @exception = nil
- end
- begin
- resp = get_response
- rescue Exception => e
- synchronize do
- @sock.close
- @exception = e
- end
- break
- end
- unless resp
- synchronize do
- @exception = EOFError.new("end of file reached")
- end
- break
- end
- begin
- synchronize do
- case resp
- when TaggedResponse
- @tagged_responses[resp.tag] = resp
- @tagged_response_arrival.broadcast
- case resp.tag
- when @logout_command_tag
- return
- when @continued_command_tag
- @continuation_request_exception =
- RESPONSE_ERRORS[resp.name].new(resp)
- @continuation_request_arrival.signal
- end
- when UntaggedResponse
- record_response(resp.name, resp.data)
- if resp.data.instance_of?(ResponseText) &&
- (code = resp.data.code)
- record_response(code.name, code.data)
- end
- if resp.name == "BYE" && @logout_command_tag.nil?
- @sock.close
- @exception = ByeResponseError.new(resp)
- connection_closed = true
- end
- when ContinuationRequest
- @continuation_request_arrival.signal
- end
- @response_handlers.each do |handler|
- handler.call(resp)
- end
- end
- rescue Exception => e
- @exception = e
- synchronize do
- @tagged_response_arrival.broadcast
- @continuation_request_arrival.broadcast
- end
- end
- end
- synchronize do
- @receiver_thread_terminating = true
- @tagged_response_arrival.broadcast
- @continuation_request_arrival.broadcast
- if @idle_done_cond
- @idle_done_cond.signal
- end
- end
- end
-
- def get_tagged_response(tag, cmd)
- until @tagged_responses.key?(tag)
- raise @exception if @exception
- @tagged_response_arrival.wait
- end
- resp = @tagged_responses.delete(tag)
- case resp.name
- when /\A(?:NO)\z/ni
- raise NoResponseError, resp
- when /\A(?:BAD)\z/ni
- raise BadResponseError, resp
- else
- return resp
- end
- end
-
- def get_response
- buff = String.new
- while true
- s = @sock.gets(CRLF)
- break unless s
- buff.concat(s)
- if /\{(\d+)\}\r\n/n =~ s
- s = @sock.read($1.to_i)
- buff.concat(s)
- else
- break
- end
- end
- return nil if buff.length == 0
- if @@debug
- $stderr.print(buff.gsub(/^/n, "S: "))
- end
- return @parser.parse(buff)
- end
-
- def record_response(name, data)
- unless @responses.has_key?(name)
- @responses[name] = []
- end
- @responses[name].push(data)
- end
-
- def send_command(cmd, *args, &block)
- synchronize do
- args.each do |i|
- validate_data(i)
- end
- tag = generate_tag
- put_string(tag + " " + cmd)
- args.each do |i|
- put_string(" ")
- send_data(i, tag)
- end
- put_string(CRLF)
- if cmd == "LOGOUT"
- @logout_command_tag = tag
- end
- if block
- add_response_handler(block)
- end
- begin
- return get_tagged_response(tag, cmd)
- ensure
- if block
- remove_response_handler(block)
- end
- end
- end
- end
-
- def generate_tag
- @tagno += 1
- return format("%s%04d", @tag_prefix, @tagno)
- end
-
- def put_string(str)
- @sock.print(str)
- if @@debug
- if @debug_output_bol
- $stderr.print("C: ")
- end
- $stderr.print(str.gsub(/\n(?!\z)/n, "\nC: "))
- if /\r\n\z/n.match(str)
- @debug_output_bol = true
- else
- @debug_output_bol = false
- end
- end
- end
-
- def validate_data(data)
- case data
- when nil
- when String
- when Integer
- NumValidator.ensure_number(data)
- when Array
- if data[0] == 'CHANGEDSINCE'
- NumValidator.ensure_mod_sequence_value(data[1])
- else
- data.each do |i|
- validate_data(i)
- end
- end
- when Time
- when Symbol
- else
- data.validate
- end
- end
-
- def send_data(data, tag = nil)
- case data
- when nil
- put_string("NIL")
- when String
- send_string_data(data, tag)
- when Integer
- send_number_data(data)
- when Array
- send_list_data(data, tag)
- when Time
- send_time_data(data)
- when Symbol
- send_symbol_data(data)
- else
- data.send_data(self, tag)
- end
- end
-
- def send_string_data(str, tag = nil)
- case str
- when ""
- put_string('""')
- when /[\x80-\xff\r\n]/n
- # literal
- send_literal(str, tag)
- when /[(){ \x00-\x1f\x7f%*"\\]/n
- # quoted string
- send_quoted_string(str)
- else
- put_string(str)
- end
- end
-
- def send_quoted_string(str)
- put_string('"' + str.gsub(/["\\]/n, "\\\\\\&") + '"')
- end
-
- def send_literal(str, tag = nil)
- synchronize do
- put_string("{" + str.bytesize.to_s + "}" + CRLF)
- @continued_command_tag = tag
- @continuation_request_exception = nil
- begin
- @continuation_request_arrival.wait
- e = @continuation_request_exception || @exception
- raise e if e
- put_string(str)
- ensure
- @continued_command_tag = nil
- @continuation_request_exception = nil
- end
- end
- end
-
- def send_number_data(num)
- put_string(num.to_s)
- end
-
- def send_list_data(list, tag = nil)
- put_string("(")
- first = true
- list.each do |i|
- if first
- first = false
- else
- put_string(" ")
- end
- send_data(i, tag)
- end
- put_string(")")
- end
-
- DATE_MONTH = %w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
-
- def send_time_data(time)
- t = time.dup.gmtime
- s = format('"%2d-%3s-%4d %02d:%02d:%02d +0000"',
- t.day, DATE_MONTH[t.month - 1], t.year,
- t.hour, t.min, t.sec)
- put_string(s)
- end
-
- def send_symbol_data(symbol)
- put_string("\\" + symbol.to_s)
- end
-
- def search_internal(cmd, keys, charset)
- if keys.instance_of?(String)
- keys = [RawData.new(keys)]
- else
- normalize_searching_criteria(keys)
- end
- synchronize do
- if charset
- send_command(cmd, "CHARSET", charset, *keys)
- else
- send_command(cmd, *keys)
- end
- return @responses.delete("SEARCH")[-1]
- end
- end
-
- def fetch_internal(cmd, set, attr, mod = nil)
- case attr
- when String then
- attr = RawData.new(attr)
- when Array then
- attr = attr.map { |arg|
- arg.is_a?(String) ? RawData.new(arg) : arg
- }
- end
-
- synchronize do
- @responses.delete("FETCH")
- if mod
- send_command(cmd, MessageSet.new(set), attr, mod)
- else
- send_command(cmd, MessageSet.new(set), attr)
- end
- return @responses.delete("FETCH")
- end
- end
-
- def store_internal(cmd, set, attr, flags)
- if attr.instance_of?(String)
- attr = RawData.new(attr)
- end
- synchronize do
- @responses.delete("FETCH")
- send_command(cmd, MessageSet.new(set), attr, flags)
- return @responses.delete("FETCH")
- end
- end
-
- def copy_internal(cmd, set, mailbox)
- send_command(cmd, MessageSet.new(set), mailbox)
- end
-
- def sort_internal(cmd, sort_keys, search_keys, charset)
- if search_keys.instance_of?(String)
- search_keys = [RawData.new(search_keys)]
- else
- normalize_searching_criteria(search_keys)
- end
- normalize_searching_criteria(search_keys)
- synchronize do
- send_command(cmd, sort_keys, charset, *search_keys)
- return @responses.delete("SORT")[-1]
- end
- end
-
- def thread_internal(cmd, algorithm, search_keys, charset)
- if search_keys.instance_of?(String)
- search_keys = [RawData.new(search_keys)]
- else
- normalize_searching_criteria(search_keys)
- end
- normalize_searching_criteria(search_keys)
- send_command(cmd, algorithm, charset, *search_keys)
- return @responses.delete("THREAD")[-1]
- end
-
- def normalize_searching_criteria(keys)
- keys.collect! do |i|
- case i
- when -1, Range, Array
- MessageSet.new(i)
- else
- i
- end
- end
- end
-
- def create_ssl_params(certs = nil, verify = true)
- params = {}
- if certs
- if File.file?(certs)
- params[:ca_file] = certs
- elsif File.directory?(certs)
- params[:ca_path] = certs
- end
- end
- if verify
- params[:verify_mode] = VERIFY_PEER
- else
- params[:verify_mode] = VERIFY_NONE
- end
- return params
- end
-
- def start_tls_session(params = {})
- unless defined?(OpenSSL::SSL)
- raise "SSL extension not installed"
- end
- if @sock.kind_of?(OpenSSL::SSL::SSLSocket)
- raise RuntimeError, "already using SSL"
- end
- begin
- params = params.to_hash
- rescue NoMethodError
- params = {}
- end
- context = SSLContext.new
- context.set_params(params)
- if defined?(VerifyCallbackProc)
- context.verify_callback = VerifyCallbackProc
- end
- @sock = SSLSocket.new(@sock, context)
- @sock.sync_close = true
- @sock.hostname = @host if @sock.respond_to? :hostname=
- ssl_socket_connect(@sock, @open_timeout)
- if context.verify_mode != VERIFY_NONE
- @sock.post_connection_check(@host)
- end
- end
-
- class RawData # :nodoc:
- def send_data(imap, tag)
- imap.send(:put_string, @data)
- end
-
- def validate
- end
-
- private
-
- def initialize(data)
- @data = data
- end
- end
-
- class Atom # :nodoc:
- def send_data(imap, tag)
- imap.send(:put_string, @data)
- end
-
- def validate
- end
-
- private
-
- def initialize(data)
- @data = data
- end
- end
-
- class QuotedString # :nodoc:
- def send_data(imap, tag)
- imap.send(:send_quoted_string, @data)
- end
-
- def validate
- end
-
- private
-
- def initialize(data)
- @data = data
- end
- end
-
- class Literal # :nodoc:
- def send_data(imap, tag)
- imap.send(:send_literal, @data, tag)
- end
-
- def validate
- end
-
- private
-
- def initialize(data)
- @data = data
- end
- end
-
- class MessageSet # :nodoc:
- def send_data(imap, tag)
- imap.send(:put_string, format_internal(@data))
- end
-
- def validate
- validate_internal(@data)
- end
-
- private
-
- def initialize(data)
- @data = data
- end
-
- def format_internal(data)
- case data
- when "*"
- return data
- when Integer
- if data == -1
- return "*"
- else
- return data.to_s
- end
- when Range
- return format_internal(data.first) +
- ":" + format_internal(data.last)
- when Array
- return data.collect {|i| format_internal(i)}.join(",")
- when ThreadMember
- return data.seqno.to_s +
- ":" + data.children.collect {|i| format_internal(i).join(",")}
- end
- end
-
- def validate_internal(data)
- case data
- when "*"
- when Integer
- NumValidator.ensure_nz_number(data)
- when Range
- when Array
- data.each do |i|
- validate_internal(i)
- end
- when ThreadMember
- data.children.each do |i|
- validate_internal(i)
- end
- else
- raise DataFormatError, data.inspect
- end
- end
- end
-
- # Common validators of number and nz_number types
- module NumValidator # :nodoc
- class << self
- # Check is passed argument valid 'number' in RFC 3501 terminology
- def valid_number?(num)
- # [RFC 3501]
- # number = 1*DIGIT
- # ; Unsigned 32-bit integer
- # ; (0 <= n < 4,294,967,296)
- num >= 0 && num < 4294967296
- end
-
- # Check is passed argument valid 'nz_number' in RFC 3501 terminology
- def valid_nz_number?(num)
- # [RFC 3501]
- # nz-number = digit-nz *DIGIT
- # ; Non-zero unsigned 32-bit integer
- # ; (0 < n < 4,294,967,296)
- num != 0 && valid_number?(num)
- end
-
- # Check is passed argument valid 'mod_sequence_value' in RFC 4551 terminology
- def valid_mod_sequence_value?(num)
- # mod-sequence-value = 1*DIGIT
- # ; Positive unsigned 64-bit integer
- # ; (mod-sequence)
- # ; (1 <= n < 18,446,744,073,709,551,615)
- num >= 1 && num < 18446744073709551615
- end
-
- # Ensure argument is 'number' or raise DataFormatError
- def ensure_number(num)
- return if valid_number?(num)
-
- msg = "number must be unsigned 32-bit integer: #{num}"
- raise DataFormatError, msg
- end
-
- # Ensure argument is 'nz_number' or raise DataFormatError
- def ensure_nz_number(num)
- return if valid_nz_number?(num)
-
- msg = "nz_number must be non-zero unsigned 32-bit integer: #{num}"
- raise DataFormatError, msg
- end
-
- # Ensure argument is 'mod_sequence_value' or raise DataFormatError
- def ensure_mod_sequence_value(num)
- return if valid_mod_sequence_value?(num)
-
- msg = "mod_sequence_value must be unsigned 64-bit integer: #{num}"
- raise DataFormatError, msg
- end
- end
- end
-
- # Net::IMAP::ContinuationRequest represents command continuation requests.
- #
- # The command continuation request response is indicated by a "+" token
- # instead of a tag. This form of response indicates that the server is
- # ready to accept the continuation of a command from the client. The
- # remainder of this response is a line of text.
- #
- # continue_req ::= "+" SPACE (resp_text / base64)
- #
- # ==== Fields:
- #
- # data:: Returns the data (Net::IMAP::ResponseText).
- #
- # raw_data:: Returns the raw data string.
- ContinuationRequest = Struct.new(:data, :raw_data)
-
- # Net::IMAP::UntaggedResponse represents untagged responses.
- #
- # Data transmitted by the server to the client and status responses
- # that do not indicate command completion are prefixed with the token
- # "*", and are called untagged responses.
- #
- # response_data ::= "*" SPACE (resp_cond_state / resp_cond_bye /
- # mailbox_data / message_data / capability_data)
- #
- # ==== Fields:
- #
- # name:: Returns the name, such as "FLAGS", "LIST", or "FETCH".
- #
- # data:: Returns the data such as an array of flag symbols,
- # a ((<Net::IMAP::MailboxList>)) object.
- #
- # raw_data:: Returns the raw data string.
- UntaggedResponse = Struct.new(:name, :data, :raw_data)
-
- # Net::IMAP::TaggedResponse represents tagged responses.
- #
- # The server completion result response indicates the success or
- # failure of the operation. It is tagged with the same tag as the
- # client command which began the operation.
- #
- # response_tagged ::= tag SPACE resp_cond_state CRLF
- #
- # tag ::= 1*<any ATOM_CHAR except "+">
- #
- # resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text
- #
- # ==== Fields:
- #
- # tag:: Returns the tag.
- #
- # name:: Returns the name, one of "OK", "NO", or "BAD".
- #
- # data:: Returns the data. See ((<Net::IMAP::ResponseText>)).
- #
- # raw_data:: Returns the raw data string.
- #
- TaggedResponse = Struct.new(:tag, :name, :data, :raw_data)
-
- # Net::IMAP::ResponseText represents texts of responses.
- # The text may be prefixed by the response code.
- #
- # resp_text ::= ["[" resp_text_code "]" SPACE] (text_mime2 / text)
- # ;; text SHOULD NOT begin with "[" or "="
- #
- # ==== Fields:
- #
- # code:: Returns the response code. See ((<Net::IMAP::ResponseCode>)).
- #
- # text:: Returns the text.
- #
- ResponseText = Struct.new(:code, :text)
-
- # Net::IMAP::ResponseCode represents response codes.
- #
- # resp_text_code ::= "ALERT" / "PARSE" /
- # "PERMANENTFLAGS" SPACE "(" #(flag / "\*") ")" /
- # "READ-ONLY" / "READ-WRITE" / "TRYCREATE" /
- # "UIDVALIDITY" SPACE nz_number /
- # "UNSEEN" SPACE nz_number /
- # atom [SPACE 1*<any TEXT_CHAR except "]">]
- #
- # ==== Fields:
- #
- # name:: Returns the name, such as "ALERT", "PERMANENTFLAGS", or "UIDVALIDITY".
- #
- # data:: Returns the data, if it exists.
- #
- ResponseCode = Struct.new(:name, :data)
-
- # Net::IMAP::MailboxList represents contents of the LIST response.
- #
- # mailbox_list ::= "(" #("\Marked" / "\Noinferiors" /
- # "\Noselect" / "\Unmarked" / flag_extension) ")"
- # SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox
- #
- # ==== Fields:
- #
- # attr:: Returns the name attributes. Each name attribute is a symbol
- # capitalized by String#capitalize, such as :Noselect (not :NoSelect).
- #
- # delim:: Returns the hierarchy delimiter.
- #
- # name:: Returns the mailbox name.
- #
- MailboxList = Struct.new(:attr, :delim, :name)
-
- # Net::IMAP::MailboxQuota represents contents of GETQUOTA response.
- # This object can also be a response to GETQUOTAROOT. In the syntax
- # specification below, the delimiter used with the "#" construct is a
- # single space (SPACE).
- #
- # quota_list ::= "(" #quota_resource ")"
- #
- # quota_resource ::= atom SPACE number SPACE number
- #
- # quota_response ::= "QUOTA" SPACE astring SPACE quota_list
- #
- # ==== Fields:
- #
- # mailbox:: The mailbox with the associated quota.
- #
- # usage:: Current storage usage of the mailbox.
- #
- # quota:: Quota limit imposed on the mailbox.
- #
- MailboxQuota = Struct.new(:mailbox, :usage, :quota)
-
- # Net::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT
- # response. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.)
- #
- # quotaroot_response ::= "QUOTAROOT" SPACE astring *(SPACE astring)
- #
- # ==== Fields:
- #
- # mailbox:: The mailbox with the associated quota.
- #
- # quotaroots:: Zero or more quotaroots that affect the quota on the
- # specified mailbox.
- #
- MailboxQuotaRoot = Struct.new(:mailbox, :quotaroots)
-
- # Net::IMAP::MailboxACLItem represents the response from GETACL.
- #
- # acl_data ::= "ACL" SPACE mailbox *(SPACE identifier SPACE rights)
- #
- # identifier ::= astring
- #
- # rights ::= astring
- #
- # ==== Fields:
- #
- # user:: Login name that has certain rights to the mailbox
- # that was specified with the getacl command.
- #
- # rights:: The access rights the indicated user has to the
- # mailbox.
- #
- MailboxACLItem = Struct.new(:user, :rights, :mailbox)
-
- # Net::IMAP::StatusData represents the contents of the STATUS response.
- #
- # ==== Fields:
- #
- # mailbox:: Returns the mailbox name.
- #
- # attr:: Returns a hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT",
- # "UIDVALIDITY", "UNSEEN". Each value is a number.
- #
- StatusData = Struct.new(:mailbox, :attr)
-
- # Net::IMAP::FetchData represents the contents of the FETCH response.
- #
- # ==== Fields:
- #
- # seqno:: Returns the message sequence number.
- # (Note: not the unique identifier, even for the UID command response.)
- #
- # attr:: Returns a hash. Each key is a data item name, and each value is
- # its value.
- #
- # The current data items are:
- #
- # [BODY]
- # A form of BODYSTRUCTURE without extension data.
- # [BODY[<section>]<<origin_octet>>]
- # A string expressing the body contents of the specified section.
- # [BODYSTRUCTURE]
- # An object that describes the [MIME-IMB] body structure of a message.
- # See Net::IMAP::BodyTypeBasic, Net::IMAP::BodyTypeText,
- # Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipart.
- # [ENVELOPE]
- # A Net::IMAP::Envelope object that describes the envelope
- # structure of a message.
- # [FLAGS]
- # A array of flag symbols that are set for this message. Flag symbols
- # are capitalized by String#capitalize.
- # [INTERNALDATE]
- # A string representing the internal date of the message.
- # [RFC822]
- # Equivalent to BODY[].
- # [RFC822.HEADER]
- # Equivalent to BODY.PEEK[HEADER].
- # [RFC822.SIZE]
- # A number expressing the [RFC-822] size of the message.
- # [RFC822.TEXT]
- # Equivalent to BODY[TEXT].
- # [UID]
- # A number expressing the unique identifier of the message.
- #
- FetchData = Struct.new(:seqno, :attr)
-
- # Net::IMAP::Envelope represents envelope structures of messages.
- #
- # ==== Fields:
- #
- # date:: Returns a string that represents the date.
- #
- # subject:: Returns a string that represents the subject.
- #
- # from:: Returns an array of Net::IMAP::Address that represents the from.
- #
- # sender:: Returns an array of Net::IMAP::Address that represents the sender.
- #
- # reply_to:: Returns an array of Net::IMAP::Address that represents the reply-to.
- #
- # to:: Returns an array of Net::IMAP::Address that represents the to.
- #
- # cc:: Returns an array of Net::IMAP::Address that represents the cc.
- #
- # bcc:: Returns an array of Net::IMAP::Address that represents the bcc.
- #
- # in_reply_to:: Returns a string that represents the in-reply-to.
- #
- # message_id:: Returns a string that represents the message-id.
- #
- Envelope = Struct.new(:date, :subject, :from, :sender, :reply_to,
- :to, :cc, :bcc, :in_reply_to, :message_id)
-
- #
- # Net::IMAP::Address represents electronic mail addresses.
- #
- # ==== Fields:
- #
- # name:: Returns the phrase from [RFC-822] mailbox.
- #
- # route:: Returns the route from [RFC-822] route-addr.
- #
- # mailbox:: nil indicates end of [RFC-822] group.
- # If non-nil and host is nil, returns [RFC-822] group name.
- # Otherwise, returns [RFC-822] local-part.
- #
- # host:: nil indicates [RFC-822] group syntax.
- # Otherwise, returns [RFC-822] domain name.
- #
- Address = Struct.new(:name, :route, :mailbox, :host)
-
- #
- # Net::IMAP::ContentDisposition represents Content-Disposition fields.
- #
- # ==== Fields:
- #
- # dsp_type:: Returns the disposition type.
- #
- # param:: Returns a hash that represents parameters of the Content-Disposition
- # field.
- #
- ContentDisposition = Struct.new(:dsp_type, :param)
-
- # Net::IMAP::ThreadMember represents a thread-node returned
- # by Net::IMAP#thread.
- #
- # ==== Fields:
- #
- # seqno:: The sequence number of this message.
- #
- # children:: An array of Net::IMAP::ThreadMember objects for mail
- # items that are children of this in the thread.
- #
- ThreadMember = Struct.new(:seqno, :children)
-
- # Net::IMAP::BodyTypeBasic represents basic body structures of messages.
- #
- # ==== Fields:
- #
- # media_type:: Returns the content media type name as defined in [MIME-IMB].
- #
- # subtype:: Returns the content subtype name as defined in [MIME-IMB].
- #
- # param:: Returns a hash that represents parameters as defined in [MIME-IMB].
- #
- # content_id:: Returns a string giving the content id as defined in [MIME-IMB].
- #
- # description:: Returns a string giving the content description as defined in
- # [MIME-IMB].
- #
- # encoding:: Returns a string giving the content transfer encoding as defined in
- # [MIME-IMB].
- #
- # size:: Returns a number giving the size of the body in octets.
- #
- # md5:: Returns a string giving the body MD5 value as defined in [MD5].
- #
- # disposition:: Returns a Net::IMAP::ContentDisposition object giving
- # the content disposition.
- #
- # language:: Returns a string or an array of strings giving the body
- # language value as defined in [LANGUAGE-TAGS].
- #
- # extension:: Returns extension data.
- #
- # multipart?:: Returns false.
- #
- class BodyTypeBasic < Struct.new(:media_type, :subtype,
- :param, :content_id,
- :description, :encoding, :size,
- :md5, :disposition, :language,
- :extension)
- def multipart?
- return false
- end
-
- # Obsolete: use +subtype+ instead. Calling this will
- # generate a warning message to +stderr+, then return
- # the value of +subtype+.
- def media_subtype
- warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
- return subtype
- end
- end
-
- # Net::IMAP::BodyTypeText represents TEXT body structures of messages.
- #
- # ==== Fields:
- #
- # lines:: Returns the size of the body in text lines.
- #
- # And Net::IMAP::BodyTypeText has all fields of Net::IMAP::BodyTypeBasic.
- #
- class BodyTypeText < Struct.new(:media_type, :subtype,
- :param, :content_id,
- :description, :encoding, :size,
- :lines,
- :md5, :disposition, :language,
- :extension)
- def multipart?
- return false
- end
-
- # Obsolete: use +subtype+ instead. Calling this will
- # generate a warning message to +stderr+, then return
- # the value of +subtype+.
- def media_subtype
- warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
- return subtype
- end
- end
-
- # Net::IMAP::BodyTypeMessage represents MESSAGE/RFC822 body structures of messages.
- #
- # ==== Fields:
- #
- # envelope:: Returns a Net::IMAP::Envelope giving the envelope structure.
- #
- # body:: Returns an object giving the body structure.
- #
- # And Net::IMAP::BodyTypeMessage has all methods of Net::IMAP::BodyTypeText.
- #
- class BodyTypeMessage < Struct.new(:media_type, :subtype,
- :param, :content_id,
- :description, :encoding, :size,
- :envelope, :body, :lines,
- :md5, :disposition, :language,
- :extension)
- def multipart?
- return false
- end
-
- # Obsolete: use +subtype+ instead. Calling this will
- # generate a warning message to +stderr+, then return
- # the value of +subtype+.
- def media_subtype
- warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
- return subtype
- end
- end
-
- # Net::IMAP::BodyTypeAttachment represents attachment body structures
- # of messages.
- #
- # ==== Fields:
- #
- # media_type:: Returns the content media type name.
- #
- # subtype:: Returns +nil+.
- #
- # param:: Returns a hash that represents parameters.
- #
- # multipart?:: Returns false.
- #
- class BodyTypeAttachment < Struct.new(:media_type, :subtype,
- :param)
- def multipart?
- return false
- end
- end
-
- # Net::IMAP::BodyTypeMultipart represents multipart body structures
- # of messages.
- #
- # ==== Fields:
- #
- # media_type:: Returns the content media type name as defined in [MIME-IMB].
- #
- # subtype:: Returns the content subtype name as defined in [MIME-IMB].
- #
- # parts:: Returns multiple parts.
- #
- # param:: Returns a hash that represents parameters as defined in [MIME-IMB].
- #
- # disposition:: Returns a Net::IMAP::ContentDisposition object giving
- # the content disposition.
- #
- # language:: Returns a string or an array of strings giving the body
- # language value as defined in [LANGUAGE-TAGS].
- #
- # extension:: Returns extension data.
- #
- # multipart?:: Returns true.
- #
- class BodyTypeMultipart < Struct.new(:media_type, :subtype,
- :parts,
- :param, :disposition, :language,
- :extension)
- def multipart?
- return true
- end
-
- # Obsolete: use +subtype+ instead. Calling this will
- # generate a warning message to +stderr+, then return
- # the value of +subtype+.
- def media_subtype
- warn("media_subtype is obsolete, use subtype instead.\n", uplevel: 1)
- return subtype
- end
- end
-
- class BodyTypeExtension < Struct.new(:media_type, :subtype,
- :params, :content_id,
- :description, :encoding, :size)
- def multipart?
- return false
- end
- end
-
- class ResponseParser # :nodoc:
- def initialize
- @str = nil
- @pos = nil
- @lex_state = nil
- @token = nil
- @flag_symbols = {}
- end
-
- def parse(str)
- @str = str
- @pos = 0
- @lex_state = EXPR_BEG
- @token = nil
- return response
- end
-
- private
-
- EXPR_BEG = :EXPR_BEG
- EXPR_DATA = :EXPR_DATA
- EXPR_TEXT = :EXPR_TEXT
- EXPR_RTEXT = :EXPR_RTEXT
- EXPR_CTEXT = :EXPR_CTEXT
-
- T_SPACE = :SPACE
- T_NIL = :NIL
- T_NUMBER = :NUMBER
- T_ATOM = :ATOM
- T_QUOTED = :QUOTED
- T_LPAR = :LPAR
- T_RPAR = :RPAR
- T_BSLASH = :BSLASH
- T_STAR = :STAR
- T_LBRA = :LBRA
- T_RBRA = :RBRA
- T_LITERAL = :LITERAL
- T_PLUS = :PLUS
- T_PERCENT = :PERCENT
- T_CRLF = :CRLF
- T_EOF = :EOF
- T_TEXT = :TEXT
-
- BEG_REGEXP = /\G(?:\
-(?# 1: SPACE )( +)|\
-(?# 2: NIL )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|\
-(?# 3: NUMBER )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|\
-(?# 4: ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+]+)|\
-(?# 5: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
-(?# 6: LPAR )(\()|\
-(?# 7: RPAR )(\))|\
-(?# 8: BSLASH )(\\)|\
-(?# 9: STAR )(\*)|\
-(?# 10: LBRA )(\[)|\
-(?# 11: RBRA )(\])|\
-(?# 12: LITERAL )\{(\d+)\}\r\n|\
-(?# 13: PLUS )(\+)|\
-(?# 14: PERCENT )(%)|\
-(?# 15: CRLF )(\r\n)|\
-(?# 16: EOF )(\z))/ni
-
- DATA_REGEXP = /\G(?:\
-(?# 1: SPACE )( )|\
-(?# 2: NIL )(NIL)|\
-(?# 3: NUMBER )(\d+)|\
-(?# 4: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
-(?# 5: LITERAL )\{(\d+)\}\r\n|\
-(?# 6: LPAR )(\()|\
-(?# 7: RPAR )(\)))/ni
-
- TEXT_REGEXP = /\G(?:\
-(?# 1: TEXT )([^\x00\r\n]*))/ni
-
- RTEXT_REGEXP = /\G(?:\
-(?# 1: LBRA )(\[)|\
-(?# 2: TEXT )([^\x00\r\n]*))/ni
-
- CTEXT_REGEXP = /\G(?:\
-(?# 1: TEXT )([^\x00\r\n\]]*))/ni
-
- Token = Struct.new(:symbol, :value)
-
- def response
- token = lookahead
- case token.symbol
- when T_PLUS
- result = continue_req
- when T_STAR
- result = response_untagged
- else
- result = response_tagged
- end
- while lookahead.symbol == T_SPACE
- # Ignore trailing space for Microsoft Exchange Server
- shift_token
- end
- match(T_CRLF)
- match(T_EOF)
- return result
- end
-
- def continue_req
- match(T_PLUS)
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- return ContinuationRequest.new(resp_text, @str)
- else
- return ContinuationRequest.new(ResponseText.new(nil, ""), @str)
- end
- end
-
- def response_untagged
- match(T_STAR)
- match(T_SPACE)
- token = lookahead
- if token.symbol == T_NUMBER
- return numeric_response
- elsif token.symbol == T_ATOM
- case token.value
- when /\A(?:OK|NO|BAD|BYE|PREAUTH)\z/ni
- return response_cond
- when /\A(?:FLAGS)\z/ni
- return flags_response
- when /\A(?:LIST|LSUB|XLIST)\z/ni
- return list_response
- when /\A(?:QUOTA)\z/ni
- return getquota_response
- when /\A(?:QUOTAROOT)\z/ni
- return getquotaroot_response
- when /\A(?:ACL)\z/ni
- return getacl_response
- when /\A(?:SEARCH|SORT)\z/ni
- return search_response
- when /\A(?:THREAD)\z/ni
- return thread_response
- when /\A(?:STATUS)\z/ni
- return status_response
- when /\A(?:CAPABILITY)\z/ni
- return capability_response
- else
- return text_response
- end
- else
- parse_error("unexpected token %s", token.symbol)
- end
- end
-
- def response_tagged
- tag = atom
- match(T_SPACE)
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return TaggedResponse.new(tag, name, resp_text, @str)
- end
-
- def response_cond
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return UntaggedResponse.new(name, resp_text, @str)
- end
-
- def numeric_response
- n = number
- match(T_SPACE)
- token = match(T_ATOM)
- name = token.value.upcase
- case name
- when "EXISTS", "RECENT", "EXPUNGE"
- return UntaggedResponse.new(name, n, @str)
- when "FETCH"
- shift_token
- match(T_SPACE)
- data = FetchData.new(n, msg_att(n))
- return UntaggedResponse.new(name, data, @str)
- end
- end
-
- def msg_att(n)
- match(T_LPAR)
- attr = {}
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- break
- when T_SPACE
- shift_token
- next
- end
- case token.value
- when /\A(?:ENVELOPE)\z/ni
- name, val = envelope_data
- when /\A(?:FLAGS)\z/ni
- name, val = flags_data
- when /\A(?:INTERNALDATE)\z/ni
- name, val = internaldate_data
- when /\A(?:RFC822(?:\.HEADER|\.TEXT)?)\z/ni
- name, val = rfc822_text
- when /\A(?:RFC822\.SIZE)\z/ni
- name, val = rfc822_size
- when /\A(?:BODY(?:STRUCTURE)?)\z/ni
- name, val = body_data
- when /\A(?:UID)\z/ni
- name, val = uid_data
- when /\A(?:MODSEQ)\z/ni
- name, val = modseq_data
- else
- parse_error("unknown attribute `%s' for {%d}", token.value, n)
- end
- attr[name] = val
- end
- return attr
- end
-
- def envelope_data
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return name, envelope
- end
-
- def envelope
- @lex_state = EXPR_DATA
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- result = nil
- else
- match(T_LPAR)
- date = nstring
- match(T_SPACE)
- subject = nstring
- match(T_SPACE)
- from = address_list
- match(T_SPACE)
- sender = address_list
- match(T_SPACE)
- reply_to = address_list
- match(T_SPACE)
- to = address_list
- match(T_SPACE)
- cc = address_list
- match(T_SPACE)
- bcc = address_list
- match(T_SPACE)
- in_reply_to = nstring
- match(T_SPACE)
- message_id = nstring
- match(T_RPAR)
- result = Envelope.new(date, subject, from, sender, reply_to,
- to, cc, bcc, in_reply_to, message_id)
- end
- @lex_state = EXPR_BEG
- return result
- end
-
- def flags_data
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return name, flag_list
- end
-
- def internaldate_data
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- token = match(T_QUOTED)
- return name, token.value
- end
-
- def rfc822_text
- token = match(T_ATOM)
- name = token.value.upcase
- token = lookahead
- if token.symbol == T_LBRA
- shift_token
- match(T_RBRA)
- end
- match(T_SPACE)
- return name, nstring
- end
-
- def rfc822_size
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return name, number
- end
-
- def body_data
- token = match(T_ATOM)
- name = token.value.upcase
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- return name, body
- end
- name.concat(section)
- token = lookahead
- if token.symbol == T_ATOM
- name.concat(token.value)
- shift_token
- end
- match(T_SPACE)
- data = nstring
- return name, data
- end
-
- def body
- @lex_state = EXPR_DATA
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- result = nil
- else
- match(T_LPAR)
- token = lookahead
- if token.symbol == T_LPAR
- result = body_type_mpart
- else
- result = body_type_1part
- end
- match(T_RPAR)
- end
- @lex_state = EXPR_BEG
- return result
- end
-
- def body_type_1part
- token = lookahead
- case token.value
- when /\A(?:TEXT)\z/ni
- return body_type_text
- when /\A(?:MESSAGE)\z/ni
- return body_type_msg
- when /\A(?:ATTACHMENT)\z/ni
- return body_type_attachment
- when /\A(?:MIXED)\z/ni
- return body_type_mixed
- else
- return body_type_basic
- end
- end
-
- def body_type_basic
- mtype, msubtype = media_type
- token = lookahead
- if token.symbol == T_RPAR
- return BodyTypeBasic.new(mtype, msubtype)
- end
- match(T_SPACE)
- param, content_id, desc, enc, size = body_fields
- md5, disposition, language, extension = body_ext_1part
- return BodyTypeBasic.new(mtype, msubtype,
- param, content_id,
- desc, enc, size,
- md5, disposition, language, extension)
- end
-
- def body_type_text
- mtype, msubtype = media_type
- match(T_SPACE)
- param, content_id, desc, enc, size = body_fields
- match(T_SPACE)
- lines = number
- md5, disposition, language, extension = body_ext_1part
- return BodyTypeText.new(mtype, msubtype,
- param, content_id,
- desc, enc, size,
- lines,
- md5, disposition, language, extension)
- end
-
- def body_type_msg
- mtype, msubtype = media_type
- match(T_SPACE)
- param, content_id, desc, enc, size = body_fields
-
- token = lookahead
- if token.symbol == T_RPAR
- # If this is not message/rfc822, we shouldn't apply the RFC822
- # spec to it. We should handle anything other than
- # message/rfc822 using multipart extension data [rfc3501] (i.e.
- # the data itself won't be returned, we would have to retrieve it
- # with BODYSTRUCTURE instead of with BODY
-
- # Also, sometimes a message/rfc822 is included as a large
- # attachment instead of having all of the other details
- # (e.g. attaching a .eml file to an email)
- if msubtype == "RFC822"
- return BodyTypeMessage.new(mtype, msubtype, param, content_id,
- desc, enc, size, nil, nil, nil, nil,
- nil, nil, nil)
- else
- return BodyTypeExtension.new(mtype, msubtype,
- param, content_id,
- desc, enc, size)
- end
- end
-
- match(T_SPACE)
- env = envelope
- match(T_SPACE)
- b = body
- match(T_SPACE)
- lines = number
- md5, disposition, language, extension = body_ext_1part
- return BodyTypeMessage.new(mtype, msubtype,
- param, content_id,
- desc, enc, size,
- env, b, lines,
- md5, disposition, language, extension)
- end
-
- def body_type_attachment
- mtype = case_insensitive_string
- match(T_SPACE)
- param = body_fld_param
- return BodyTypeAttachment.new(mtype, nil, param)
- end
-
- def body_type_mixed
- mtype = "MULTIPART"
- msubtype = case_insensitive_string
- param, disposition, language, extension = body_ext_mpart
- return BodyTypeBasic.new(mtype, msubtype, param, nil, nil, nil, nil, nil, disposition, language, extension)
- end
-
- def body_type_mpart
- parts = []
- while true
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- break
- end
- parts.push(body)
- end
- mtype = "MULTIPART"
- msubtype = case_insensitive_string
- param, disposition, language, extension = body_ext_mpart
- return BodyTypeMultipart.new(mtype, msubtype, parts,
- param, disposition, language,
- extension)
- end
-
- def media_type
- mtype = case_insensitive_string
- token = lookahead
- if token.symbol != T_SPACE
- return mtype, nil
- end
- match(T_SPACE)
- msubtype = case_insensitive_string
- return mtype, msubtype
- end
-
- def body_fields
- param = body_fld_param
- match(T_SPACE)
- content_id = nstring
- match(T_SPACE)
- desc = nstring
- match(T_SPACE)
- enc = case_insensitive_string
- match(T_SPACE)
- size = number
- return param, content_id, desc, enc, size
- end
-
- def body_fld_param
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- end
- match(T_LPAR)
- param = {}
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- break
- when T_SPACE
- shift_token
- end
- name = case_insensitive_string
- match(T_SPACE)
- val = string
- param[name] = val
- end
- return param
- end
-
- def body_ext_1part
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return nil
- end
- md5 = nstring
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return md5
- end
- disposition = body_fld_dsp
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return md5, disposition
- end
- language = body_fld_lang
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return md5, disposition, language
- end
-
- extension = body_extensions
- return md5, disposition, language, extension
- end
-
- def body_ext_mpart
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return nil
- end
- param = body_fld_param
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return param
- end
- disposition = body_fld_dsp
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return param, disposition
- end
- language = body_fld_lang
-
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- else
- return param, disposition, language
- end
-
- extension = body_extensions
- return param, disposition, language, extension
- end
-
- def body_fld_dsp
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- end
- match(T_LPAR)
- dsp_type = case_insensitive_string
- match(T_SPACE)
- param = body_fld_param
- match(T_RPAR)
- return ContentDisposition.new(dsp_type, param)
- end
-
- def body_fld_lang
- token = lookahead
- if token.symbol == T_LPAR
- shift_token
- result = []
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- return result
- when T_SPACE
- shift_token
- end
- result.push(case_insensitive_string)
- end
- else
- lang = nstring
- if lang
- return lang.upcase
- else
- return lang
- end
- end
- end
-
- def body_extensions
- result = []
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- return result
- when T_SPACE
- shift_token
- end
- result.push(body_extension)
- end
- end
-
- def body_extension
- token = lookahead
- case token.symbol
- when T_LPAR
- shift_token
- result = body_extensions
- match(T_RPAR)
- return result
- when T_NUMBER
- return number
- else
- return nstring
- end
- end
-
- def section
- str = String.new
- token = match(T_LBRA)
- str.concat(token.value)
- token = match(T_ATOM, T_NUMBER, T_RBRA)
- if token.symbol == T_RBRA
- str.concat(token.value)
- return str
- end
- str.concat(token.value)
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- str.concat(token.value)
- token = match(T_LPAR)
- str.concat(token.value)
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- str.concat(token.value)
- shift_token
- break
- when T_SPACE
- shift_token
- str.concat(token.value)
- end
- str.concat(format_string(astring))
- end
- end
- token = match(T_RBRA)
- str.concat(token.value)
- return str
- end
-
- def format_string(str)
- case str
- when ""
- return '""'
- when /[\x80-\xff\r\n]/n
- # literal
- return "{" + str.bytesize.to_s + "}" + CRLF + str
- when /[(){ \x00-\x1f\x7f%*"\\]/n
- # quoted string
- return '"' + str.gsub(/["\\]/n, "\\\\\\&") + '"'
- else
- # atom
- return str
- end
- end
-
- def uid_data
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return name, number
- end
-
- def modseq_data
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- match(T_LPAR)
- modseq = number
- match(T_RPAR)
- return name, modseq
- end
-
- def text_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- @lex_state = EXPR_TEXT
- token = match(T_TEXT)
- @lex_state = EXPR_BEG
- return UntaggedResponse.new(name, token.value)
- end
-
- def flags_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return UntaggedResponse.new(name, flag_list, @str)
- end
-
- def list_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- return UntaggedResponse.new(name, mailbox_list, @str)
- end
-
- def mailbox_list
- attr = flag_list
- match(T_SPACE)
- token = match(T_QUOTED, T_NIL)
- if token.symbol == T_NIL
- delim = nil
- else
- delim = token.value
- end
- match(T_SPACE)
- name = astring
- return MailboxList.new(attr, delim, name)
- end
-
- def getquota_response
- # If quota never established, get back
- # `NO Quota root does not exist'.
- # If quota removed, get `()' after the
- # folder spec with no mention of `STORAGE'.
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- mailbox = astring
- match(T_SPACE)
- match(T_LPAR)
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- data = MailboxQuota.new(mailbox, nil, nil)
- return UntaggedResponse.new(name, data, @str)
- when T_ATOM
- shift_token
- match(T_SPACE)
- token = match(T_NUMBER)
- usage = token.value
- match(T_SPACE)
- token = match(T_NUMBER)
- quota = token.value
- match(T_RPAR)
- data = MailboxQuota.new(mailbox, usage, quota)
- return UntaggedResponse.new(name, data, @str)
- else
- parse_error("unexpected token %s", token.symbol)
- end
- end
-
- def getquotaroot_response
- # Similar to getquota, but only admin can use getquota.
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- mailbox = astring
- quotaroots = []
- while true
- token = lookahead
- break unless token.symbol == T_SPACE
- shift_token
- quotaroots.push(astring)
- end
- data = MailboxQuotaRoot.new(mailbox, quotaroots)
- return UntaggedResponse.new(name, data, @str)
- end
-
- def getacl_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- mailbox = astring
- data = []
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- while true
- token = lookahead
- case token.symbol
- when T_CRLF
- break
- when T_SPACE
- shift_token
- end
- user = astring
- match(T_SPACE)
- rights = astring
- data.push(MailboxACLItem.new(user, rights, mailbox))
- end
- end
- return UntaggedResponse.new(name, data, @str)
- end
-
- def search_response
- token = match(T_ATOM)
- name = token.value.upcase
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- data = []
- while true
- token = lookahead
- case token.symbol
- when T_CRLF
- break
- when T_SPACE
- shift_token
- when T_NUMBER
- data.push(number)
- when T_LPAR
- # TODO: include the MODSEQ value in a response
- shift_token
- match(T_ATOM)
- match(T_SPACE)
- match(T_NUMBER)
- match(T_RPAR)
- end
- end
- else
- data = []
- end
- return UntaggedResponse.new(name, data, @str)
- end
-
- def thread_response
- token = match(T_ATOM)
- name = token.value.upcase
- token = lookahead
-
- if token.symbol == T_SPACE
- threads = []
-
- while true
- shift_token
- token = lookahead
-
- case token.symbol
- when T_LPAR
- threads << thread_branch(token)
- when T_CRLF
- break
- end
- end
- else
- # no member
- threads = []
- end
-
- return UntaggedResponse.new(name, threads, @str)
- end
-
- def thread_branch(token)
- rootmember = nil
- lastmember = nil
-
- while true
- shift_token # ignore first T_LPAR
- token = lookahead
-
- case token.symbol
- when T_NUMBER
- # new member
- newmember = ThreadMember.new(number, [])
- if rootmember.nil?
- rootmember = newmember
- else
- lastmember.children << newmember
- end
- lastmember = newmember
- when T_SPACE
- # do nothing
- when T_LPAR
- if rootmember.nil?
- # dummy member
- lastmember = rootmember = ThreadMember.new(nil, [])
- end
-
- lastmember.children << thread_branch(token)
- when T_RPAR
- break
- end
- end
-
- return rootmember
- end
-
- def status_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- mailbox = astring
- match(T_SPACE)
- match(T_LPAR)
- attr = {}
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- break
- when T_SPACE
- shift_token
- end
- token = match(T_ATOM)
- key = token.value.upcase
- match(T_SPACE)
- val = number
- attr[key] = val
- end
- data = StatusData.new(mailbox, attr)
- return UntaggedResponse.new(name, data, @str)
- end
-
- def capability_response
- token = match(T_ATOM)
- name = token.value.upcase
- match(T_SPACE)
- data = []
- while true
- token = lookahead
- case token.symbol
- when T_CRLF
- break
- when T_SPACE
- shift_token
- next
- end
- data.push(atom.upcase)
- end
- return UntaggedResponse.new(name, data, @str)
- end
-
- def resp_text
- @lex_state = EXPR_RTEXT
- token = lookahead
- if token.symbol == T_LBRA
- code = resp_text_code
- else
- code = nil
- end
- token = match(T_TEXT)
- @lex_state = EXPR_BEG
- return ResponseText.new(code, token.value)
- end
-
- def resp_text_code
- @lex_state = EXPR_BEG
- match(T_LBRA)
- token = match(T_ATOM)
- name = token.value.upcase
- case name
- when /\A(?:ALERT|PARSE|READ-ONLY|READ-WRITE|TRYCREATE|NOMODSEQ)\z/n
- result = ResponseCode.new(name, nil)
- when /\A(?:PERMANENTFLAGS)\z/n
- match(T_SPACE)
- result = ResponseCode.new(name, flag_list)
- when /\A(?:UIDVALIDITY|UIDNEXT|UNSEEN)\z/n
- match(T_SPACE)
- result = ResponseCode.new(name, number)
- else
- token = lookahead
- if token.symbol == T_SPACE
- shift_token
- @lex_state = EXPR_CTEXT
- token = match(T_TEXT)
- @lex_state = EXPR_BEG
- result = ResponseCode.new(name, token.value)
- else
- result = ResponseCode.new(name, nil)
- end
- end
- match(T_RBRA)
- @lex_state = EXPR_RTEXT
- return result
- end
-
- def address_list
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- else
- result = []
- match(T_LPAR)
- while true
- token = lookahead
- case token.symbol
- when T_RPAR
- shift_token
- break
- when T_SPACE
- shift_token
- end
- result.push(address)
- end
- return result
- end
- end
-
- ADDRESS_REGEXP = /\G\
-(?# 1: NAME )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-(?# 2: ROUTE )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-(?# 3: MAILBOX )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-(?# 4: HOST )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\
-\)/ni
-
- def address
- match(T_LPAR)
- if @str.index(ADDRESS_REGEXP, @pos)
- # address does not include literal.
- @pos = $~.end(0)
- name = $1
- route = $2
- mailbox = $3
- host = $4
- for s in [name, route, mailbox, host]
- if s
- s.gsub!(/\\(["\\])/n, "\\1")
- end
- end
- else
- name = nstring
- match(T_SPACE)
- route = nstring
- match(T_SPACE)
- mailbox = nstring
- match(T_SPACE)
- host = nstring
- match(T_RPAR)
- end
- return Address.new(name, route, mailbox, host)
- end
-
- FLAG_REGEXP = /\
-(?# FLAG )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\
-(?# ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n
-
- def flag_list
- if @str.index(/\(([^)]*)\)/ni, @pos)
- @pos = $~.end(0)
- return $1.scan(FLAG_REGEXP).collect { |flag, atom|
- if atom
- atom
- else
- symbol = flag.capitalize.intern
- @flag_symbols[symbol] = true
- if @flag_symbols.length > IMAP.max_flag_count
- raise FlagCountError, "number of flag symbols exceeded"
- end
- symbol
- end
- }
- else
- parse_error("invalid flag list")
- end
- end
-
- def nstring
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- else
- return string
- end
- end
-
- def astring
- token = lookahead
- if string_token?(token)
- return string
- else
- return atom
- end
- end
-
- def string
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- end
- token = match(T_QUOTED, T_LITERAL)
- return token.value
- end
-
- STRING_TOKENS = [T_QUOTED, T_LITERAL, T_NIL]
-
- def string_token?(token)
- return STRING_TOKENS.include?(token.symbol)
- end
-
- def case_insensitive_string
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- end
- token = match(T_QUOTED, T_LITERAL)
- return token.value.upcase
- end
-
- def atom
- result = String.new
- while true
- token = lookahead
- if atom_token?(token)
- result.concat(token.value)
- shift_token
- else
- if result.empty?
- parse_error("unexpected token %s", token.symbol)
- else
- return result
- end
- end
- end
- end
-
- ATOM_TOKENS = [
- T_ATOM,
- T_NUMBER,
- T_NIL,
- T_LBRA,
- T_RBRA,
- T_PLUS
- ]
-
- def atom_token?(token)
- return ATOM_TOKENS.include?(token.symbol)
- end
-
- def number
- token = lookahead
- if token.symbol == T_NIL
- shift_token
- return nil
- end
- token = match(T_NUMBER)
- return token.value.to_i
- end
-
- def nil_atom
- match(T_NIL)
- return nil
- end
-
- def match(*args)
- token = lookahead
- unless args.include?(token.symbol)
- parse_error('unexpected token %s (expected %s)',
- token.symbol.id2name,
- args.collect {|i| i.id2name}.join(" or "))
- end
- shift_token
- return token
- end
-
- def lookahead
- unless @token
- @token = next_token
- end
- return @token
- end
-
- def shift_token
- @token = nil
- end
-
- def next_token
- case @lex_state
- when EXPR_BEG
- if @str.index(BEG_REGEXP, @pos)
- @pos = $~.end(0)
- if $1
- return Token.new(T_SPACE, $+)
- elsif $2
- return Token.new(T_NIL, $+)
- elsif $3
- return Token.new(T_NUMBER, $+)
- elsif $4
- return Token.new(T_ATOM, $+)
- elsif $5
- return Token.new(T_QUOTED,
- $+.gsub(/\\(["\\])/n, "\\1"))
- elsif $6
- return Token.new(T_LPAR, $+)
- elsif $7
- return Token.new(T_RPAR, $+)
- elsif $8
- return Token.new(T_BSLASH, $+)
- elsif $9
- return Token.new(T_STAR, $+)
- elsif $10
- return Token.new(T_LBRA, $+)
- elsif $11
- return Token.new(T_RBRA, $+)
- elsif $12
- len = $+.to_i
- val = @str[@pos, len]
- @pos += len
- return Token.new(T_LITERAL, val)
- elsif $13
- return Token.new(T_PLUS, $+)
- elsif $14
- return Token.new(T_PERCENT, $+)
- elsif $15
- return Token.new(T_CRLF, $+)
- elsif $16
- return Token.new(T_EOF, $+)
- else
- parse_error("[Net::IMAP BUG] BEG_REGEXP is invalid")
- end
- else
- @str.index(/\S*/n, @pos)
- parse_error("unknown token - %s", $&.dump)
- end
- when EXPR_DATA
- if @str.index(DATA_REGEXP, @pos)
- @pos = $~.end(0)
- if $1
- return Token.new(T_SPACE, $+)
- elsif $2
- return Token.new(T_NIL, $+)
- elsif $3
- return Token.new(T_NUMBER, $+)
- elsif $4
- return Token.new(T_QUOTED,
- $+.gsub(/\\(["\\])/n, "\\1"))
- elsif $5
- len = $+.to_i
- val = @str[@pos, len]
- @pos += len
- return Token.new(T_LITERAL, val)
- elsif $6
- return Token.new(T_LPAR, $+)
- elsif $7
- return Token.new(T_RPAR, $+)
- else
- parse_error("[Net::IMAP BUG] DATA_REGEXP is invalid")
- end
- else
- @str.index(/\S*/n, @pos)
- parse_error("unknown token - %s", $&.dump)
- end
- when EXPR_TEXT
- if @str.index(TEXT_REGEXP, @pos)
- @pos = $~.end(0)
- if $1
- return Token.new(T_TEXT, $+)
- else
- parse_error("[Net::IMAP BUG] TEXT_REGEXP is invalid")
- end
- else
- @str.index(/\S*/n, @pos)
- parse_error("unknown token - %s", $&.dump)
- end
- when EXPR_RTEXT
- if @str.index(RTEXT_REGEXP, @pos)
- @pos = $~.end(0)
- if $1
- return Token.new(T_LBRA, $+)
- elsif $2
- return Token.new(T_TEXT, $+)
- else
- parse_error("[Net::IMAP BUG] RTEXT_REGEXP is invalid")
- end
- else
- @str.index(/\S*/n, @pos)
- parse_error("unknown token - %s", $&.dump)
- end
- when EXPR_CTEXT
- if @str.index(CTEXT_REGEXP, @pos)
- @pos = $~.end(0)
- if $1
- return Token.new(T_TEXT, $+)
- else
- parse_error("[Net::IMAP BUG] CTEXT_REGEXP is invalid")
- end
- else
- @str.index(/\S*/n, @pos) #/
- parse_error("unknown token - %s", $&.dump)
- end
- else
- parse_error("invalid @lex_state - %s", @lex_state.inspect)
- end
- end
-
- def parse_error(fmt, *args)
- if IMAP.debug
- $stderr.printf("@str: %s\n", @str.dump)
- $stderr.printf("@pos: %d\n", @pos)
- $stderr.printf("@lex_state: %s\n", @lex_state)
- if @token
- $stderr.printf("@token.symbol: %s\n", @token.symbol)
- $stderr.printf("@token.value: %s\n", @token.value.inspect)
- end
- end
- raise ResponseParseError, format(fmt, *args)
- end
- end
-
- # Authenticator for the "LOGIN" authentication type. See
- # #authenticate().
- class LoginAuthenticator
- def process(data)
- case @state
- when STATE_USER
- @state = STATE_PASSWORD
- return @user
- when STATE_PASSWORD
- return @password
- end
- end
-
- private
-
- STATE_USER = :USER
- STATE_PASSWORD = :PASSWORD
-
- def initialize(user, password)
- @user = user
- @password = password
- @state = STATE_USER
- end
- end
- add_authenticator "LOGIN", LoginAuthenticator
-
- # Authenticator for the "PLAIN" authentication type. See
- # #authenticate().
- class PlainAuthenticator
- def process(data)
- return "\0#{@user}\0#{@password}"
- end
-
- private
-
- def initialize(user, password)
- @user = user
- @password = password
- end
- end
- add_authenticator "PLAIN", PlainAuthenticator
-
- # Authenticator for the "CRAM-MD5" authentication type. See
- # #authenticate().
- class CramMD5Authenticator
- def process(challenge)
- digest = hmac_md5(challenge, @password)
- return @user + " " + digest
- end
-
- private
-
- def initialize(user, password)
- @user = user
- @password = password
- end
-
- def hmac_md5(text, key)
- if key.length > 64
- key = Digest::MD5.digest(key)
- end
-
- k_ipad = key + "\0" * (64 - key.length)
- k_opad = key + "\0" * (64 - key.length)
- for i in 0..63
- k_ipad[i] = (k_ipad[i].ord ^ 0x36).chr
- k_opad[i] = (k_opad[i].ord ^ 0x5c).chr
- end
-
- digest = Digest::MD5.digest(k_ipad + text)
-
- return Digest::MD5.hexdigest(k_opad + digest)
- end
- end
- add_authenticator "CRAM-MD5", CramMD5Authenticator
-
- # Authenticator for the "DIGEST-MD5" authentication type. See
- # #authenticate().
- class DigestMD5Authenticator
- def process(challenge)
- case @stage
- when STAGE_ONE
- @stage = STAGE_TWO
- sparams = {}
- c = StringScanner.new(challenge)
- while c.scan(/(?:\s*,)?\s*(\w+)=("(?:[^\\"]+|\\.)*"|[^,]+)\s*/)
- k, v = c[1], c[2]
- if v =~ /^"(.*)"$/
- v = $1
- if v =~ /,/
- v = v.split(',')
- end
- end
- sparams[k] = v
- end
-
- raise DataFormatError, "Bad Challenge: '#{challenge}'" unless c.rest.size == 0
- raise Error, "Server does not support auth (qop = #{sparams['qop'].join(',')})" unless sparams['qop'].include?("auth")
-
- response = {
- :nonce => sparams['nonce'],
- :username => @user,
- :realm => sparams['realm'],
- :cnonce => Digest::MD5.hexdigest("%.15f:%.15f:%d" % [Time.now.to_f, rand, Process.pid.to_s]),
- :'digest-uri' => 'imap/' + sparams['realm'],
- :qop => 'auth',
- :maxbuf => 65535,
- :nc => "%08d" % nc(sparams['nonce']),
- :charset => sparams['charset'],
- }
-
- response[:authzid] = @authname unless @authname.nil?
-
- # now, the real thing
- a0 = Digest::MD5.digest( [ response.values_at(:username, :realm), @password ].join(':') )
-
- a1 = [ a0, response.values_at(:nonce,:cnonce) ].join(':')
- a1 << ':' + response[:authzid] unless response[:authzid].nil?
-
- a2 = "AUTHENTICATE:" + response[:'digest-uri']
- a2 << ":00000000000000000000000000000000" if response[:qop] and response[:qop] =~ /^auth-(?:conf|int)$/
-
- response[:response] = Digest::MD5.hexdigest(
- [
- Digest::MD5.hexdigest(a1),
- response.values_at(:nonce, :nc, :cnonce, :qop),
- Digest::MD5.hexdigest(a2)
- ].join(':')
- )
-
- return response.keys.map {|key| qdval(key.to_s, response[key]) }.join(',')
- when STAGE_TWO
- @stage = nil
- # if at the second stage, return an empty string
- if challenge =~ /rspauth=/
- return ''
- else
- raise ResponseParseError, challenge
- end
- else
- raise ResponseParseError, challenge
- end
- end
-
- def initialize(user, password, authname = nil)
- @user, @password, @authname = user, password, authname
- @nc, @stage = {}, STAGE_ONE
- end
-
- private
-
- STAGE_ONE = :stage_one
- STAGE_TWO = :stage_two
-
- def nc(nonce)
- if @nc.has_key? nonce
- @nc[nonce] = @nc[nonce] + 1
- else
- @nc[nonce] = 1
- end
- return @nc[nonce]
- end
-
- # some responses need quoting
- def qdval(k, v)
- return if k.nil? or v.nil?
- if %w"username authzid realm nonce cnonce digest-uri qop".include? k
- v.gsub!(/([\\"])/, "\\\1")
- return '%s="%s"' % [k, v]
- else
- return '%s=%s' % [k, v]
- end
- end
- end
- add_authenticator "DIGEST-MD5", DigestMD5Authenticator
-
- # Superclass of IMAP errors.
- class Error < StandardError
- end
-
- # Error raised when data is in the incorrect format.
- class DataFormatError < Error
- end
-
- # Error raised when a response from the server is non-parseable.
- class ResponseParseError < Error
- end
-
- # Superclass of all errors used to encapsulate "fail" responses
- # from the server.
- class ResponseError < Error
-
- # The response that caused this error
- attr_accessor :response
-
- def initialize(response)
- @response = response
-
- super @response.data.text
- end
-
- end
-
- # Error raised upon a "NO" response from the server, indicating
- # that the client command could not be completed successfully.
- class NoResponseError < ResponseError
- end
-
- # Error raised upon a "BAD" response from the server, indicating
- # that the client command violated the IMAP protocol, or an internal
- # server failure has occurred.
- class BadResponseError < ResponseError
- end
-
- # Error raised upon a "BYE" response from the server, indicating
- # that the client is not being allowed to login, or has been timed
- # out due to inactivity.
- class ByeResponseError < ResponseError
- end
-
- RESPONSE_ERRORS = Hash.new(ResponseError)
- RESPONSE_ERRORS["NO"] = NoResponseError
- RESPONSE_ERRORS["BAD"] = BadResponseError
-
- # Error raised when too many flags are interned to symbols.
- class FlagCountError < Error
- end
- end
-end
diff --git a/lib/net/net-protocol.gemspec b/lib/net/net-protocol.gemspec
new file mode 100644
index 0000000000..c03621cb0d
--- /dev/null
+++ b/lib/net/net-protocol.gemspec
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-"), "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
+end
+
+Gem::Specification.new do |spec|
+ spec.name = name
+ spec.version = version
+ spec.authors = ["Yukihiro Matsumoto"]
+ spec.email = ["matz@ruby-lang.org"]
+
+ spec.summary = %q{The abstract interface for net-* client.}
+ spec.description = %q{The abstract interface for net-* client.}
+ spec.homepage = "https://github.com/ruby/net-protocol"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "timeout"
+end
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
deleted file mode 100644
index 8712345301..0000000000
--- a/lib/net/pop.rb
+++ /dev/null
@@ -1,1023 +0,0 @@
-# frozen_string_literal: true
-# = net/pop.rb
-#
-# Copyright (c) 1999-2007 Yukihiro Matsumoto.
-#
-# Copyright (c) 1999-2007 Minero Aoki.
-#
-# Written & maintained by Minero Aoki <aamine@loveruby.net>.
-#
-# Documented by William Webber and Minero Aoki.
-#
-# This program is free software. You can re-distribute and/or
-# modify this program under the same terms as Ruby itself,
-# Ruby Distribute License.
-#
-# NOTE: You can find Japanese version of this document at:
-# http://docs.ruby-lang.org/ja/latest/library/net=2fpop.html
-#
-# $Id$
-#
-# See Net::POP3 for documentation.
-#
-
-require 'net/protocol'
-require 'digest/md5'
-require 'timeout'
-
-begin
- require "openssl"
-rescue LoadError
-end
-
-module Net
-
- # Non-authentication POP3 protocol error
- # (reply code "-ERR", except authentication).
- class POPError < ProtocolError; end
-
- # POP3 authentication error.
- class POPAuthenticationError < ProtoAuthError; end
-
- # Unexpected response from the server.
- class POPBadResponse < POPError; end
-
- #
- # == What is This Library?
- #
- # This library provides functionality for retrieving
- # email via POP3, the Post Office Protocol version 3. For details
- # of POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt).
- #
- # == Examples
- #
- # === Retrieving Messages
- #
- # This example retrieves messages from the server and deletes them
- # on the server.
- #
- # Messages are written to files named 'inbox/1', 'inbox/2', ....
- # Replace 'pop.example.com' with your POP3 server address, and
- # 'YourAccount' and 'YourPassword' with the appropriate account
- # details.
- #
- # require 'net/pop'
- #
- # pop = Net::POP3.new('pop.example.com')
- # pop.start('YourAccount', 'YourPassword') # (1)
- # if pop.mails.empty?
- # puts 'No mail.'
- # else
- # i = 0
- # pop.each_mail do |m| # or "pop.mails.each ..." # (2)
- # File.open("inbox/#{i}", 'w') do |f|
- # f.write m.pop
- # end
- # m.delete
- # i += 1
- # end
- # puts "#{pop.mails.size} mails popped."
- # end
- # pop.finish # (3)
- #
- # 1. Call Net::POP3#start and start POP session.
- # 2. Access messages by using POP3#each_mail and/or POP3#mails.
- # 3. Close POP session by calling POP3#finish or use the block form of #start.
- #
- # === Shortened Code
- #
- # The example above is very verbose. You can shorten the code by using
- # some utility methods. First, the block form of Net::POP3.start can
- # be used instead of POP3.new, POP3#start and POP3#finish.
- #
- # require 'net/pop'
- #
- # Net::POP3.start('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |pop|
- # if pop.mails.empty?
- # puts 'No mail.'
- # else
- # i = 0
- # pop.each_mail do |m| # or "pop.mails.each ..."
- # File.open("inbox/#{i}", 'w') do |f|
- # f.write m.pop
- # end
- # m.delete
- # i += 1
- # end
- # puts "#{pop.mails.size} mails popped."
- # end
- # end
- #
- # POP3#delete_all is an alternative for #each_mail and #delete.
- #
- # require 'net/pop'
- #
- # Net::POP3.start('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |pop|
- # if pop.mails.empty?
- # puts 'No mail.'
- # else
- # i = 1
- # pop.delete_all do |m|
- # File.open("inbox/#{i}", 'w') do |f|
- # f.write m.pop
- # end
- # i += 1
- # end
- # end
- # end
- #
- # And here is an even shorter example.
- #
- # require 'net/pop'
- #
- # i = 0
- # Net::POP3.delete_all('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |m|
- # File.open("inbox/#{i}", 'w') do |f|
- # f.write m.pop
- # end
- # i += 1
- # end
- #
- # === Memory Space Issues
- #
- # All the examples above get each message as one big string.
- # This example avoids this.
- #
- # require 'net/pop'
- #
- # i = 1
- # Net::POP3.delete_all('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |m|
- # File.open("inbox/#{i}", 'w') do |f|
- # m.pop do |chunk| # get a message little by little.
- # f.write chunk
- # end
- # i += 1
- # end
- # end
- #
- # === Using APOP
- #
- # The net/pop library supports APOP authentication.
- # To use APOP, use the Net::APOP class instead of the Net::POP3 class.
- # You can use the utility method, Net::POP3.APOP(). For example:
- #
- # require 'net/pop'
- #
- # # Use APOP authentication if $isapop == true
- # pop = Net::POP3.APOP($isapop).new('apop.example.com', 110)
- # pop.start('YourAccount', 'YourPassword') do |pop|
- # # Rest of the code is the same.
- # end
- #
- # === Fetch Only Selected Mail Using 'UIDL' POP Command
- #
- # If your POP server provides UIDL functionality,
- # you can grab only selected mails from the POP server.
- # e.g.
- #
- # def need_pop?( id )
- # # determine if we need pop this mail...
- # end
- #
- # Net::POP3.start('pop.example.com', 110,
- # 'Your account', 'Your password') do |pop|
- # pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m|
- # do_something(m.pop)
- # end
- # end
- #
- # The POPMail#unique_id() method returns the unique-id of the message as a
- # String. Normally the unique-id is a hash of the message.
- #
- class POP3 < Protocol
-
- # svn revision of this library
- Revision = %q$Revision$.split[1]
-
- #
- # Class Parameters
- #
-
- # returns the port for POP3
- def POP3.default_port
- default_pop3_port()
- end
-
- # The default port for POP3 connections, port 110
- def POP3.default_pop3_port
- 110
- end
-
- # The default port for POP3S connections, port 995
- def POP3.default_pop3s_port
- 995
- end
-
- def POP3.socket_type #:nodoc: obsolete
- Net::InternetMessageIO
- end
-
- #
- # Utilities
- #
-
- # Returns the APOP class if +isapop+ is true; otherwise, returns
- # the POP class. For example:
- #
- # # Example 1
- # pop = Net::POP3::APOP($is_apop).new(addr, port)
- #
- # # Example 2
- # Net::POP3::APOP($is_apop).start(addr, port) do |pop|
- # ....
- # end
- #
- def POP3.APOP(isapop)
- isapop ? APOP : POP3
- end
-
- # Starts a POP3 session and iterates over each POPMail object,
- # yielding it to the +block+.
- # This method is equivalent to:
- #
- # Net::POP3.start(address, port, account, password) do |pop|
- # pop.each_mail do |m|
- # yield m
- # end
- # end
- #
- # This method raises a POPAuthenticationError if authentication fails.
- #
- # === Example
- #
- # Net::POP3.foreach('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |m|
- # file.write m.pop
- # m.delete if $DELETE
- # end
- #
- def POP3.foreach(address, port = nil,
- account = nil, password = nil,
- isapop = false, &block) # :yields: message
- start(address, port, account, password, isapop) {|pop|
- pop.each_mail(&block)
- }
- end
-
- # Starts a POP3 session and deletes all messages on the server.
- # If a block is given, each POPMail object is yielded to it before
- # being deleted.
- #
- # This method raises a POPAuthenticationError if authentication fails.
- #
- # === Example
- #
- # Net::POP3.delete_all('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |m|
- # file.write m.pop
- # end
- #
- def POP3.delete_all(address, port = nil,
- account = nil, password = nil,
- isapop = false, &block)
- start(address, port, account, password, isapop) {|pop|
- pop.delete_all(&block)
- }
- end
-
- # Opens a POP3 session, attempts authentication, and quits.
- #
- # This method raises POPAuthenticationError if authentication fails.
- #
- # === Example: normal POP3
- #
- # Net::POP3.auth_only('pop.example.com', 110,
- # 'YourAccount', 'YourPassword')
- #
- # === Example: APOP
- #
- # Net::POP3.auth_only('pop.example.com', 110,
- # 'YourAccount', 'YourPassword', true)
- #
- def POP3.auth_only(address, port = nil,
- account = nil, password = nil,
- isapop = false)
- new(address, port, isapop).auth_only account, password
- end
-
- # Starts a pop3 session, attempts authentication, and quits.
- # This method must not be called while POP3 session is opened.
- # This method raises POPAuthenticationError if authentication fails.
- def auth_only(account, password)
- raise IOError, 'opening previously opened POP session' if started?
- start(account, password) {
- ;
- }
- end
-
- #
- # SSL
- #
-
- @ssl_params = nil
-
- # :call-seq:
- # Net::POP.enable_ssl(params = {})
- #
- # Enable SSL for all new instances.
- # +params+ is passed to OpenSSL::SSLContext#set_params.
- def POP3.enable_ssl(*args)
- @ssl_params = create_ssl_params(*args)
- end
-
- # Constructs proper parameters from arguments
- def POP3.create_ssl_params(verify_or_params = {}, certs = nil)
- begin
- params = verify_or_params.to_hash
- rescue NoMethodError
- params = {}
- params[:verify_mode] = verify_or_params
- if certs
- if File.file?(certs)
- params[:ca_file] = certs
- elsif File.directory?(certs)
- params[:ca_path] = certs
- end
- end
- end
- return params
- end
-
- # Disable SSL for all new instances.
- def POP3.disable_ssl
- @ssl_params = nil
- end
-
- # returns the SSL Parameters
- #
- # see also POP3.enable_ssl
- def POP3.ssl_params
- return @ssl_params
- end
-
- # returns +true+ if POP3.ssl_params is set
- def POP3.use_ssl?
- return !@ssl_params.nil?
- end
-
- # returns whether verify_mode is enable from POP3.ssl_params
- def POP3.verify
- return @ssl_params[:verify_mode]
- end
-
- # returns the :ca_file or :ca_path from POP3.ssl_params
- def POP3.certs
- return @ssl_params[:ca_file] || @ssl_params[:ca_path]
- end
-
- #
- # Session management
- #
-
- # Creates a new POP3 object and open the connection. Equivalent to
- #
- # Net::POP3.new(address, port, isapop).start(account, password)
- #
- # If +block+ is provided, yields the newly-opened POP3 object to it,
- # and automatically closes it at the end of the session.
- #
- # === Example
- #
- # Net::POP3.start(addr, port, account, password) do |pop|
- # pop.each_mail do |m|
- # file.write m.pop
- # m.delete
- # end
- # end
- #
- def POP3.start(address, port = nil,
- account = nil, password = nil,
- isapop = false, &block) # :yield: pop
- new(address, port, isapop).start(account, password, &block)
- end
-
- # Creates a new POP3 object.
- #
- # +address+ is the hostname or ip address of your POP3 server.
- #
- # The optional +port+ is the port to connect to.
- #
- # The optional +isapop+ specifies whether this connection is going
- # to use APOP authentication; it defaults to +false+.
- #
- # This method does *not* open the TCP connection.
- def initialize(addr, port = nil, isapop = false)
- @address = addr
- @ssl_params = POP3.ssl_params
- @port = port
- @apop = isapop
-
- @command = nil
- @socket = nil
- @started = false
- @open_timeout = 30
- @read_timeout = 60
- @debug_output = nil
-
- @mails = nil
- @n_mails = nil
- @n_bytes = nil
- end
-
- # Does this instance use APOP authentication?
- def apop?
- @apop
- end
-
- # does this instance use SSL?
- def use_ssl?
- return !@ssl_params.nil?
- end
-
- # :call-seq:
- # Net::POP#enable_ssl(params = {})
- #
- # Enables SSL for this instance. Must be called before the connection is
- # established to have any effect.
- # +params[:port]+ is port to establish the SSL connection on; Defaults to 995.
- # +params+ (except :port) is passed to OpenSSL::SSLContext#set_params.
- def enable_ssl(verify_or_params = {}, certs = nil, port = nil)
- begin
- @ssl_params = verify_or_params.to_hash.dup
- @port = @ssl_params.delete(:port) || @port
- rescue NoMethodError
- @ssl_params = POP3.create_ssl_params(verify_or_params, certs)
- @port = port || @port
- end
- end
-
- # Disable SSL for all new instances.
- def disable_ssl
- @ssl_params = nil
- end
-
- # Provide human-readable stringification of class state.
- def inspect
- +"#<#{self.class} #{@address}:#{@port} open=#{@started}>"
- end
-
- # *WARNING*: This method causes a serious security hole.
- # Use this method only for debugging.
- #
- # Set an output stream for debugging.
- #
- # === Example
- #
- # pop = Net::POP.new(addr, port)
- # pop.set_debug_output $stderr
- # pop.start(account, passwd) do |pop|
- # ....
- # end
- #
- def set_debug_output(arg)
- @debug_output = arg
- end
-
- # The address to connect to.
- attr_reader :address
-
- # The port number to connect to.
- def port
- return @port || (use_ssl? ? POP3.default_pop3s_port : POP3.default_pop3_port)
- end
-
- # Seconds to wait until a connection is opened.
- # If the POP3 object cannot open a connection within this time,
- # it raises a Net::OpenTimeout exception. The default value is 30 seconds.
- attr_accessor :open_timeout
-
- # Seconds to wait until reading one block (by one read(1) call).
- # If the POP3 object cannot complete a read() within this time,
- # it raises a Net::ReadTimeout exception. The default value is 60 seconds.
- attr_reader :read_timeout
-
- # Set the read timeout.
- def read_timeout=(sec)
- @command.socket.read_timeout = sec if @command
- @read_timeout = sec
- end
-
- # +true+ if the POP3 session has started.
- def started?
- @started
- end
-
- alias active? started? #:nodoc: obsolete
-
- # Starts a POP3 session.
- #
- # When called with block, gives a POP3 object to the block and
- # closes the session after block call finishes.
- #
- # This method raises a POPAuthenticationError if authentication fails.
- def start(account, password) # :yield: pop
- raise IOError, 'POP session already started' if @started
- if block_given?
- begin
- do_start account, password
- return yield(self)
- ensure
- do_finish
- end
- else
- do_start account, password
- return self
- end
- end
-
- # internal method for Net::POP3.start
- def do_start(account, password) # :nodoc:
- s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do
- TCPSocket.open(@address, port)
- end
- if use_ssl?
- raise 'openssl library not installed' unless defined?(OpenSSL)
- context = OpenSSL::SSL::SSLContext.new
- context.set_params(@ssl_params)
- s = OpenSSL::SSL::SSLSocket.new(s, context)
- s.hostname = @address
- s.sync_close = true
- ssl_socket_connect(s, @open_timeout)
- if context.verify_mode != OpenSSL::SSL::VERIFY_NONE
- s.post_connection_check(@address)
- end
- end
- @socket = InternetMessageIO.new(s,
- read_timeout: @read_timeout,
- debug_output: @debug_output)
- logging "POP session started: #{@address}:#{@port} (#{@apop ? 'APOP' : 'POP'})"
- on_connect
- @command = POP3Command.new(@socket)
- if apop?
- @command.apop account, password
- else
- @command.auth account, password
- end
- @started = true
- ensure
- # Authentication failed, clean up connection.
- unless @started
- s.close if s
- @socket = nil
- @command = nil
- end
- end
- private :do_start
-
- # Does nothing
- def on_connect # :nodoc:
- end
- private :on_connect
-
- # Finishes a POP3 session and closes TCP connection.
- def finish
- raise IOError, 'POP session not yet started' unless started?
- do_finish
- end
-
- # nil's out the:
- # - mails
- # - number counter for mails
- # - number counter for bytes
- # - quits the current command, if any
- def do_finish # :nodoc:
- @mails = nil
- @n_mails = nil
- @n_bytes = nil
- @command.quit if @command
- ensure
- @started = false
- @command = nil
- @socket.close if @socket
- @socket = nil
- end
- private :do_finish
-
- # Returns the current command.
- #
- # Raises IOError if there is no active socket
- def command # :nodoc:
- raise IOError, 'POP session not opened yet' \
- if not @socket or @socket.closed?
- @command
- end
- private :command
-
- #
- # POP protocol wrapper
- #
-
- # Returns the number of messages on the POP server.
- def n_mails
- return @n_mails if @n_mails
- @n_mails, @n_bytes = command().stat
- @n_mails
- end
-
- # Returns the total size in bytes of all the messages on the POP server.
- def n_bytes
- return @n_bytes if @n_bytes
- @n_mails, @n_bytes = command().stat
- @n_bytes
- end
-
- # Returns an array of Net::POPMail objects, representing all the
- # messages on the server. This array is renewed when the session
- # restarts; otherwise, it is fetched from the server the first time
- # this method is called (directly or indirectly) and cached.
- #
- # This method raises a POPError if an error occurs.
- def mails
- return @mails.dup if @mails
- if n_mails() == 0
- # some popd raises error for LIST on the empty mailbox.
- @mails = []
- return []
- end
-
- @mails = command().list.map {|num, size|
- POPMail.new(num, size, self, command())
- }
- @mails.dup
- end
-
- # Yields each message to the passed-in block in turn.
- # Equivalent to:
- #
- # pop3.mails.each do |popmail|
- # ....
- # end
- #
- # This method raises a POPError if an error occurs.
- def each_mail(&block) # :yield: message
- mails().each(&block)
- end
-
- alias each each_mail
-
- # Deletes all messages on the server.
- #
- # If called with a block, yields each message in turn before deleting it.
- #
- # === Example
- #
- # n = 1
- # pop.delete_all do |m|
- # File.open("inbox/#{n}") do |f|
- # f.write m.pop
- # end
- # n += 1
- # end
- #
- # This method raises a POPError if an error occurs.
- #
- def delete_all # :yield: message
- mails().each do |m|
- yield m if block_given?
- m.delete unless m.deleted?
- end
- end
-
- # Resets the session. This clears all "deleted" marks from messages.
- #
- # This method raises a POPError if an error occurs.
- def reset
- command().rset
- mails().each do |m|
- m.instance_eval {
- @deleted = false
- }
- end
- end
-
- def set_all_uids #:nodoc: internal use only (called from POPMail#uidl)
- uidl = command().uidl
- @mails.each {|m| m.uid = uidl[m.number] }
- end
-
- # debugging output for +msg+
- def logging(msg)
- @debug_output << msg + "\n" if @debug_output
- end
-
- end # class POP3
-
- # class aliases
- POP = POP3 # :nodoc:
- POPSession = POP3 # :nodoc:
- POP3Session = POP3 # :nodoc:
-
- #
- # This class is equivalent to POP3, except that it uses APOP authentication.
- #
- class APOP < POP3
- # Always returns true.
- def apop?
- true
- end
- end
-
- # class aliases
- APOPSession = APOP
-
- #
- # This class represents a message which exists on the POP server.
- # Instances of this class are created by the POP3 class; they should
- # not be directly created by the user.
- #
- class POPMail
-
- def initialize(num, len, pop, cmd) #:nodoc:
- @number = num
- @length = len
- @pop = pop
- @command = cmd
- @deleted = false
- @uid = nil
- end
-
- # The sequence number of the message on the server.
- attr_reader :number
-
- # The length of the message in octets.
- attr_reader :length
- alias size length
-
- # Provide human-readable stringification of class state.
- def inspect
- +"#<#{self.class} #{@number}#{@deleted ? ' deleted' : ''}>"
- end
-
- #
- # This method fetches the message. If called with a block, the
- # message is yielded to the block one chunk at a time. If called
- # without a block, the message is returned as a String. The optional
- # +dest+ argument will be prepended to the returned String; this
- # argument is essentially obsolete.
- #
- # === Example without block
- #
- # POP3.start('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |pop|
- # n = 1
- # pop.mails.each do |popmail|
- # File.open("inbox/#{n}", 'w') do |f|
- # f.write popmail.pop
- # end
- # popmail.delete
- # n += 1
- # end
- # end
- #
- # === Example with block
- #
- # POP3.start('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |pop|
- # n = 1
- # pop.mails.each do |popmail|
- # File.open("inbox/#{n}", 'w') do |f|
- # popmail.pop do |chunk| ####
- # f.write chunk
- # end
- # end
- # n += 1
- # end
- # end
- #
- # This method raises a POPError if an error occurs.
- #
- def pop( dest = +'', &block ) # :yield: message_chunk
- if block_given?
- @command.retr(@number, &block)
- nil
- else
- @command.retr(@number) do |chunk|
- dest << chunk
- end
- dest
- end
- end
-
- alias all pop #:nodoc: obsolete
- alias mail pop #:nodoc: obsolete
-
- # Fetches the message header and +lines+ lines of body.
- #
- # The optional +dest+ argument is obsolete.
- #
- # This method raises a POPError if an error occurs.
- def top(lines, dest = +'')
- @command.top(@number, lines) do |chunk|
- dest << chunk
- end
- dest
- end
-
- # Fetches the message header.
- #
- # The optional +dest+ argument is obsolete.
- #
- # This method raises a POPError if an error occurs.
- def header(dest = +'')
- top(0, dest)
- end
-
- # Marks a message for deletion on the server. Deletion does not
- # actually occur until the end of the session; deletion may be
- # cancelled for _all_ marked messages by calling POP3#reset().
- #
- # This method raises a POPError if an error occurs.
- #
- # === Example
- #
- # POP3.start('pop.example.com', 110,
- # 'YourAccount', 'YourPassword') do |pop|
- # n = 1
- # pop.mails.each do |popmail|
- # File.open("inbox/#{n}", 'w') do |f|
- # f.write popmail.pop
- # end
- # popmail.delete ####
- # n += 1
- # end
- # end
- #
- def delete
- @command.dele @number
- @deleted = true
- end
-
- alias delete! delete #:nodoc: obsolete
-
- # True if the mail has been deleted.
- def deleted?
- @deleted
- end
-
- # Returns the unique-id of the message.
- # Normally the unique-id is a hash string of the message.
- #
- # This method raises a POPError if an error occurs.
- def unique_id
- return @uid if @uid
- @pop.set_all_uids
- @uid
- end
-
- alias uidl unique_id
-
- def uid=(uid) #:nodoc: internal use only
- @uid = uid
- end
-
- end # class POPMail
-
-
- class POP3Command #:nodoc: internal use only
-
- def initialize(sock)
- @socket = sock
- @error_occurred = false
- res = check_response(critical { recv_response() })
- @apop_stamp = res.slice(/<[!-~]+@[!-~]+>/)
- end
-
- attr_reader :socket
-
- def inspect
- +"#<#{self.class} socket=#{@socket}>"
- end
-
- def auth(account, password)
- check_response_auth(critical {
- check_response_auth(get_response('USER %s', account))
- get_response('PASS %s', password)
- })
- end
-
- def apop(account, password)
- raise POPAuthenticationError, 'not APOP server; cannot login' \
- unless @apop_stamp
- check_response_auth(critical {
- get_response('APOP %s %s',
- account,
- Digest::MD5.hexdigest(@apop_stamp + password))
- })
- end
-
- def list
- critical {
- getok 'LIST'
- list = []
- @socket.each_list_item do |line|
- m = /\A(\d+)[ \t]+(\d+)/.match(line) or
- raise POPBadResponse, "bad response: #{line}"
- list.push [m[1].to_i, m[2].to_i]
- end
- return list
- }
- end
-
- def stat
- res = check_response(critical { get_response('STAT') })
- m = /\A\+OK\s+(\d+)\s+(\d+)/.match(res) or
- raise POPBadResponse, "wrong response format: #{res}"
- [m[1].to_i, m[2].to_i]
- end
-
- def rset
- check_response(critical { get_response('RSET') })
- end
-
- def top(num, lines = 0, &block)
- critical {
- getok('TOP %d %d', num, lines)
- @socket.each_message_chunk(&block)
- }
- end
-
- def retr(num, &block)
- critical {
- getok('RETR %d', num)
- @socket.each_message_chunk(&block)
- }
- end
-
- def dele(num)
- check_response(critical { get_response('DELE %d', num) })
- end
-
- def uidl(num = nil)
- if num
- res = check_response(critical { get_response('UIDL %d', num) })
- return res.split(/ /)[1]
- else
- critical {
- getok('UIDL')
- table = {}
- @socket.each_list_item do |line|
- num, uid = line.split
- table[num.to_i] = uid
- end
- return table
- }
- end
- end
-
- def quit
- check_response(critical { get_response('QUIT') })
- end
-
- private
-
- def getok(fmt, *fargs)
- @socket.writeline sprintf(fmt, *fargs)
- check_response(recv_response())
- end
-
- def get_response(fmt, *fargs)
- @socket.writeline sprintf(fmt, *fargs)
- recv_response()
- end
-
- def recv_response
- @socket.readline
- end
-
- def check_response(res)
- raise POPError, res unless /\A\+OK/i =~ res
- res
- end
-
- def check_response_auth(res)
- raise POPAuthenticationError, res unless /\A\+OK/i =~ res
- res
- end
-
- def critical
- return '+OK dummy ok response' if @error_occurred
- begin
- return yield()
- rescue Exception
- @error_occurred = true
- raise
- end
- end
-
- end # class POP3Command
-
-end # module Net
diff --git a/lib/net/pop/net-pop.gemspec b/lib/net/pop/net-pop.gemspec
deleted file mode 100644
index 8166968d7d..0000000000
--- a/lib/net/pop/net-pop.gemspec
+++ /dev/null
@@ -1,27 +0,0 @@
-begin
- require_relative "lib/net/pop/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "net-pop"
- spec.version = Net::POP3::VERSION
- spec.authors = ["Yukihiro Matsumoto"]
- spec.email = ["matz@ruby-lang.org"]
-
- spec.summary = %q{Ruby client library for POP3.}
- spec.description = %q{Ruby client library for POP3.}
- spec.homepage = "https://github.com/ruby/net-pop"
- spec.license = "BSD-2-Clause"
-
- spec.metadata["homepage_uri"] = spec.homepage
- spec.metadata["source_code_uri"] = spec.homepage
-
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-end
diff --git a/lib/net/pop/version.rb b/lib/net/pop/version.rb
deleted file mode 100644
index ef5c295cc3..0000000000
--- a/lib/net/pop/version.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module Net
- class Protocol; end
- class POP3 < Protocol
- VERSION = "0.1.0"
- end
-end
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 07fbc6a21f..ea0752a971 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -26,6 +26,8 @@ require 'io/wait'
module Net # :nodoc:
class Protocol #:nodoc: internal use only
+ VERSION = "0.2.1"
+
private
def Protocol.protocol_param(name, val)
module_eval(<<-End, __FILE__, __LINE__ + 1)
@@ -118,6 +120,8 @@ module Net # :nodoc:
@continue_timeout = continue_timeout
@debug_output = debug_output
@rbuf = ''.b
+ @rbuf_empty = true
+ @rbuf_offset = 0
end
attr_reader :io
@@ -152,14 +156,15 @@ module Net # :nodoc:
LOG "reading #{len} bytes..."
read_bytes = 0
begin
- while read_bytes + @rbuf.size < len
- s = rbuf_consume(@rbuf.size)
- read_bytes += s.size
- dest << s
+ while read_bytes + rbuf_size < len
+ if s = rbuf_consume_all
+ read_bytes += s.bytesize
+ dest << s
+ end
rbuf_fill
end
s = rbuf_consume(len - read_bytes)
- read_bytes += s.size
+ read_bytes += s.bytesize
dest << s
rescue EOFError
raise unless ignore_eof
@@ -173,9 +178,10 @@ module Net # :nodoc:
read_bytes = 0
begin
while true
- s = rbuf_consume(@rbuf.size)
- read_bytes += s.size
- dest << s
+ if s = rbuf_consume_all
+ read_bytes += s.bytesize
+ dest << s
+ end
rbuf_fill
end
rescue EOFError
@@ -186,14 +192,16 @@ module Net # :nodoc:
end
def readuntil(terminator, ignore_eof = false)
+ offset = @rbuf_offset
begin
- until idx = @rbuf.index(terminator)
+ until idx = @rbuf.index(terminator, offset)
+ offset = @rbuf.bytesize
rbuf_fill
end
- return rbuf_consume(idx + terminator.size)
+ return rbuf_consume(idx + terminator.bytesize - @rbuf_offset)
rescue EOFError
raise unless ignore_eof
- return rbuf_consume(@rbuf.size)
+ return rbuf_consume
end
end
@@ -206,12 +214,16 @@ module Net # :nodoc:
BUFSIZE = 1024 * 16
def rbuf_fill
- tmp = @rbuf.empty? ? @rbuf : nil
+ tmp = @rbuf_empty ? @rbuf : nil
case rv = @io.read_nonblock(BUFSIZE, tmp, exception: false)
when String
- return if rv.equal?(tmp)
- @rbuf << rv
- rv.clear
+ @rbuf_empty = false
+ if rv.equal?(tmp)
+ @rbuf_offset = 0
+ else
+ @rbuf << rv
+ rv.clear
+ end
return
when :wait_readable
(io = @io.to_io).wait_readable(@read_timeout) or raise Net::ReadTimeout.new(io)
@@ -226,13 +238,40 @@ module Net # :nodoc:
end while true
end
- def rbuf_consume(len)
- if len == @rbuf.size
+ def rbuf_flush
+ if @rbuf_empty
+ @rbuf.clear
+ @rbuf_offset = 0
+ end
+ nil
+ end
+
+ def rbuf_size
+ @rbuf.bytesize - @rbuf_offset
+ end
+
+ def rbuf_consume_all
+ rbuf_consume if rbuf_size > 0
+ end
+
+ def rbuf_consume(len = nil)
+ if @rbuf_offset == 0 && (len.nil? || len == @rbuf.bytesize)
s = @rbuf
@rbuf = ''.b
+ @rbuf_offset = 0
+ @rbuf_empty = true
+ elsif len.nil?
+ s = @rbuf.byteslice(@rbuf_offset..-1)
+ @rbuf = ''.b
+ @rbuf_offset = 0
+ @rbuf_empty = true
else
- s = @rbuf.slice!(0, len)
+ s = @rbuf.byteslice(@rbuf_offset, len)
+ @rbuf_offset += len
+ @rbuf_empty = @rbuf_offset == @rbuf.bytesize
+ rbuf_flush
end
+
@debug_output << %Q[-> #{s.dump}\n] if @debug_output
s
end
@@ -381,7 +420,7 @@ module Net # :nodoc:
len = writing {
using_each_crlf_line {
begin
- block.call(WriteAdapter.new(self, :write_message_0))
+ block.call(WriteAdapter.new(self.method(:write_message_0)))
rescue LocalJumpError
# allow `break' from writer block
end
@@ -445,17 +484,16 @@ module Net # :nodoc:
# The writer adapter class
#
class WriteAdapter
- def initialize(socket, method)
- @socket = socket
- @method_id = method
+ def initialize(writer)
+ @writer = writer
end
def inspect
- "#<#{self.class} socket=#{@socket.inspect}>"
+ "#<#{self.class} writer=#{@writer.inspect}>"
end
def write(str)
- @socket.__send__(@method_id, str)
+ @writer.call(str)
end
alias print write
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
deleted file mode 100644
index 460ad08233..0000000000
--- a/lib/net/smtp.rb
+++ /dev/null
@@ -1,1072 +0,0 @@
-# frozen_string_literal: true
-# = net/smtp.rb
-#
-# Copyright (c) 1999-2007 Yukihiro Matsumoto.
-#
-# Copyright (c) 1999-2007 Minero Aoki.
-#
-# Written & maintained by Minero Aoki <aamine@loveruby.net>.
-#
-# Documented by William Webber and Minero Aoki.
-#
-# This program is free software. You can re-distribute and/or
-# modify this program under the same terms as Ruby itself.
-#
-# $Id$
-#
-# See Net::SMTP for documentation.
-#
-
-require 'net/protocol'
-require 'digest/md5'
-require 'timeout'
-begin
- require 'openssl'
-rescue LoadError
-end
-
-module Net
-
- # Module mixed in to all SMTP error classes
- module SMTPError
- # This *class* is a module for backward compatibility.
- # In later release, this module becomes a class.
- end
-
- # Represents an SMTP authentication error.
- class SMTPAuthenticationError < ProtoAuthError
- include SMTPError
- end
-
- # Represents SMTP error code 4xx, a temporary error.
- class SMTPServerBusy < ProtoServerError
- include SMTPError
- end
-
- # Represents an SMTP command syntax error (error code 500)
- class SMTPSyntaxError < ProtoSyntaxError
- include SMTPError
- end
-
- # Represents a fatal SMTP error (error code 5xx, except for 500)
- class SMTPFatalError < ProtoFatalError
- include SMTPError
- end
-
- # Unexpected reply code returned from server.
- class SMTPUnknownError < ProtoUnknownError
- include SMTPError
- end
-
- # Command is not supported on server.
- class SMTPUnsupportedCommand < ProtocolError
- include SMTPError
- end
-
- #
- # == What is This Library?
- #
- # This library provides functionality to send internet
- # mail via SMTP, the Simple Mail Transfer Protocol. For details of
- # SMTP itself, see [RFC2821] (http://www.ietf.org/rfc/rfc2821.txt).
- #
- # == What is This Library NOT?
- #
- # This library does NOT provide functions to compose internet mails.
- # You must create them by yourself. If you want better mail support,
- # try RubyMail or TMail or search for alternatives in
- # {RubyGems.org}[https://rubygems.org/] or {The Ruby
- # Toolbox}[https://www.ruby-toolbox.com/].
- #
- # FYI: the official documentation on internet mail is: [RFC2822] (http://www.ietf.org/rfc/rfc2822.txt).
- #
- # == Examples
- #
- # === Sending Messages
- #
- # You must open a connection to an SMTP server before sending messages.
- # The first argument is the address of your SMTP server, and the second
- # argument is the port number. Using SMTP.start with a block is the simplest
- # way to do this. This way, the SMTP connection is closed automatically
- # after the block is executed.
- #
- # require 'net/smtp'
- # Net::SMTP.start('your.smtp.server', 25) do |smtp|
- # # Use the SMTP object smtp only in this block.
- # end
- #
- # Replace 'your.smtp.server' with your SMTP server. Normally
- # your system manager or internet provider supplies a server
- # for you.
- #
- # Then you can send messages.
- #
- # msgstr = <<END_OF_MESSAGE
- # From: Your Name <your@mail.address>
- # To: Destination Address <someone@example.com>
- # Subject: test message
- # Date: Sat, 23 Jun 2001 16:26:43 +0900
- # Message-Id: <unique.message.id.string@example.com>
- #
- # This is a test message.
- # END_OF_MESSAGE
- #
- # require 'net/smtp'
- # Net::SMTP.start('your.smtp.server', 25) do |smtp|
- # smtp.send_message msgstr,
- # 'your@mail.address',
- # 'his_address@example.com'
- # end
- #
- # === Closing the Session
- #
- # You MUST close the SMTP session after sending messages, by calling
- # the #finish method:
- #
- # # using SMTP#finish
- # smtp = Net::SMTP.start('your.smtp.server', 25)
- # smtp.send_message msgstr, 'from@address', 'to@address'
- # smtp.finish
- #
- # You can also use the block form of SMTP.start/SMTP#start. This closes
- # the SMTP session automatically:
- #
- # # using block form of SMTP.start
- # Net::SMTP.start('your.smtp.server', 25) do |smtp|
- # smtp.send_message msgstr, 'from@address', 'to@address'
- # end
- #
- # I strongly recommend this scheme. This form is simpler and more robust.
- #
- # === HELO domain
- #
- # In almost all situations, you must provide a third argument
- # to SMTP.start/SMTP#start. This is the domain name which you are on
- # (the host to send mail from). It is called the "HELO domain".
- # The SMTP server will judge whether it should send or reject
- # the SMTP session by inspecting the HELO domain.
- #
- # Net::SMTP.start('your.smtp.server', 25,
- # 'mail.from.domain') { |smtp| ... }
- #
- # === SMTP Authentication
- #
- # The Net::SMTP class supports three authentication schemes;
- # PLAIN, LOGIN and CRAM MD5. (SMTP Authentication: [RFC2554])
- # To use SMTP authentication, pass extra arguments to
- # SMTP.start/SMTP#start.
- #
- # # PLAIN
- # Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
- # 'Your Account', 'Your Password', :plain)
- # # LOGIN
- # Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
- # 'Your Account', 'Your Password', :login)
- #
- # # CRAM MD5
- # Net::SMTP.start('your.smtp.server', 25, 'mail.from.domain',
- # 'Your Account', 'Your Password', :cram_md5)
- #
- class SMTP < Protocol
-
- Revision = %q$Revision$.split[1]
-
- # The default SMTP port number, 25.
- def SMTP.default_port
- 25
- end
-
- # The default mail submission port number, 587.
- def SMTP.default_submission_port
- 587
- end
-
- # The default SMTPS port number, 465.
- def SMTP.default_tls_port
- 465
- end
-
- class << self
- alias default_ssl_port default_tls_port
- end
-
- def SMTP.default_ssl_context
- OpenSSL::SSL::SSLContext.new
- end
-
- #
- # Creates a new Net::SMTP object.
- #
- # +address+ is the hostname or ip address of your SMTP
- # server. +port+ is the port to connect to; it defaults to
- # port 25.
- #
- # This method does not open the TCP connection. You can use
- # SMTP.start instead of SMTP.new if you want to do everything
- # at once. Otherwise, follow SMTP.new with SMTP#start.
- #
- def initialize(address, port = nil)
- @address = address
- @port = (port || SMTP.default_port)
- @esmtp = true
- @capabilities = nil
- @socket = nil
- @started = false
- @open_timeout = 30
- @read_timeout = 60
- @error_occurred = false
- @debug_output = nil
- @tls = false
- @starttls = false
- @ssl_context = nil
- end
-
- # Provide human-readable stringification of class state.
- def inspect
- "#<#{self.class} #{@address}:#{@port} started=#{@started}>"
- end
-
- #
- # Set whether to use ESMTP or not. This should be done before
- # calling #start. Note that if #start is called in ESMTP mode,
- # and the connection fails due to a ProtocolError, the SMTP
- # object will automatically switch to plain SMTP mode and
- # retry (but not vice versa).
- #
- attr_accessor :esmtp
-
- # +true+ if the SMTP object uses ESMTP (which it does by default).
- alias :esmtp? :esmtp
-
- # true if server advertises STARTTLS.
- # You cannot get valid value before opening SMTP session.
- def capable_starttls?
- capable?('STARTTLS')
- end
-
- def capable?(key)
- return nil unless @capabilities
- @capabilities[key] ? true : false
- end
- private :capable?
-
- # true if server advertises AUTH PLAIN.
- # You cannot get valid value before opening SMTP session.
- def capable_plain_auth?
- auth_capable?('PLAIN')
- end
-
- # true if server advertises AUTH LOGIN.
- # You cannot get valid value before opening SMTP session.
- def capable_login_auth?
- auth_capable?('LOGIN')
- end
-
- # true if server advertises AUTH CRAM-MD5.
- # You cannot get valid value before opening SMTP session.
- def capable_cram_md5_auth?
- auth_capable?('CRAM-MD5')
- end
-
- def auth_capable?(type)
- return nil unless @capabilities
- return false unless @capabilities['AUTH']
- @capabilities['AUTH'].include?(type)
- end
- private :auth_capable?
-
- # Returns supported authentication methods on this server.
- # You cannot get valid value before opening SMTP session.
- def capable_auth_types
- return [] unless @capabilities
- return [] unless @capabilities['AUTH']
- @capabilities['AUTH']
- end
-
- # true if this object uses SMTP/TLS (SMTPS).
- def tls?
- @tls
- end
-
- alias ssl? tls?
-
- # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for
- # this object. Must be called before the connection is established
- # to have any effect. +context+ is a OpenSSL::SSL::SSLContext object.
- def enable_tls(context = SMTP.default_ssl_context)
- raise 'openssl library not installed' unless defined?(OpenSSL)
- raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @starttls
- @tls = true
- @ssl_context = context
- end
-
- alias enable_ssl enable_tls
-
- # Disables SMTP/TLS for this object. Must be called before the
- # connection is established to have any effect.
- def disable_tls
- @tls = false
- @ssl_context = nil
- end
-
- alias disable_ssl disable_tls
-
- # Returns truth value if this object uses STARTTLS.
- # If this object always uses STARTTLS, returns :always.
- # If this object uses STARTTLS when the server support TLS, returns :auto.
- def starttls?
- @starttls
- end
-
- # true if this object uses STARTTLS.
- def starttls_always?
- @starttls == :always
- end
-
- # true if this object uses STARTTLS when server advertises STARTTLS.
- def starttls_auto?
- @starttls == :auto
- end
-
- # Enables SMTP/TLS (STARTTLS) for this object.
- # +context+ is a OpenSSL::SSL::SSLContext object.
- def enable_starttls(context = SMTP.default_ssl_context)
- raise 'openssl library not installed' unless defined?(OpenSSL)
- raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @tls
- @starttls = :always
- @ssl_context = context
- end
-
- # Enables SMTP/TLS (STARTTLS) for this object if server accepts.
- # +context+ is a OpenSSL::SSL::SSLContext object.
- def enable_starttls_auto(context = SMTP.default_ssl_context)
- raise 'openssl library not installed' unless defined?(OpenSSL)
- raise ArgumentError, "SMTPS and STARTTLS is exclusive" if @tls
- @starttls = :auto
- @ssl_context = context
- end
-
- # Disables SMTP/TLS (STARTTLS) for this object. Must be called
- # before the connection is established to have any effect.
- def disable_starttls
- @starttls = false
- @ssl_context = nil
- end
-
- # The address of the SMTP server to connect to.
- attr_reader :address
-
- # The port number of the SMTP server to connect to.
- attr_reader :port
-
- # Seconds to wait while attempting to open a connection.
- # If the connection cannot be opened within this time, a
- # Net::OpenTimeout is raised. The default value is 30 seconds.
- attr_accessor :open_timeout
-
- # Seconds to wait while reading one block (by one read(2) call).
- # If the read(2) call does not complete within this time, a
- # Net::ReadTimeout is raised. The default value is 60 seconds.
- attr_reader :read_timeout
-
- # Set the number of seconds to wait until timing-out a read(2)
- # call.
- def read_timeout=(sec)
- @socket.read_timeout = sec if @socket
- @read_timeout = sec
- end
-
- #
- # WARNING: This method causes serious security holes.
- # Use this method for only debugging.
- #
- # Set an output stream for debug logging.
- # You must call this before #start.
- #
- # # example
- # smtp = Net::SMTP.new(addr, port)
- # smtp.set_debug_output $stderr
- # smtp.start do |smtp|
- # ....
- # end
- #
- def debug_output=(arg)
- @debug_output = arg
- end
-
- alias set_debug_output debug_output=
-
- #
- # SMTP session control
- #
-
- #
- # Creates a new Net::SMTP object and connects to the server.
- #
- # This method is equivalent to:
- #
- # Net::SMTP.new(address, port).start(helo_domain, account, password, authtype)
- #
- # === Example
- #
- # Net::SMTP.start('your.smtp.server') do |smtp|
- # smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
- # end
- #
- # === Block Usage
- #
- # If called with a block, the newly-opened Net::SMTP object is yielded
- # to the block, and automatically closed when the block finishes. If called
- # without a block, the newly-opened Net::SMTP object is returned to
- # the caller, and it is the caller's responsibility to close it when
- # finished.
- #
- # === Parameters
- #
- # +address+ is the hostname or ip address of your smtp server.
- #
- # +port+ is the port to connect to; it defaults to port 25.
- #
- # +helo+ is the _HELO_ _domain_ provided by the client to the
- # server (see overview comments); it defaults to 'localhost'.
- #
- # The remaining arguments are used for SMTP authentication, if required
- # or desired. +user+ is the account name; +secret+ is your password
- # or other authentication token; and +authtype+ is the authentication
- # type, one of :plain, :login, or :cram_md5. See the discussion of
- # SMTP Authentication in the overview notes.
- #
- # === Errors
- #
- # This method may raise:
- #
- # * Net::SMTPAuthenticationError
- # * Net::SMTPServerBusy
- # * Net::SMTPSyntaxError
- # * Net::SMTPFatalError
- # * Net::SMTPUnknownError
- # * Net::OpenTimeout
- # * Net::ReadTimeout
- # * IOError
- #
- def SMTP.start(address, port = nil, helo = 'localhost',
- user = nil, secret = nil, authtype = nil,
- &block) # :yield: smtp
- new(address, port).start(helo, user, secret, authtype, &block)
- end
-
- # +true+ if the SMTP session has been started.
- def started?
- @started
- end
-
- #
- # Opens a TCP connection and starts the SMTP session.
- #
- # === Parameters
- #
- # +helo+ is the _HELO_ _domain_ that you'll dispatch mails from; see
- # the discussion in the overview notes.
- #
- # If both of +user+ and +secret+ are given, SMTP authentication
- # will be attempted using the AUTH command. +authtype+ specifies
- # the type of authentication to attempt; it must be one of
- # :login, :plain, and :cram_md5. See the notes on SMTP Authentication
- # in the overview.
- #
- # === Block Usage
- #
- # When this methods is called with a block, the newly-started SMTP
- # object is yielded to the block, and automatically closed after
- # the block call finishes. Otherwise, it is the caller's
- # responsibility to close the session when finished.
- #
- # === Example
- #
- # This is very similar to the class method SMTP.start.
- #
- # require 'net/smtp'
- # smtp = Net::SMTP.new('smtp.mail.server', 25)
- # smtp.start(helo_domain, account, password, authtype) do |smtp|
- # smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
- # end
- #
- # The primary use of this method (as opposed to SMTP.start)
- # is probably to set debugging (#set_debug_output) or ESMTP
- # (#esmtp=), which must be done before the session is
- # started.
- #
- # === Errors
- #
- # If session has already been started, an IOError will be raised.
- #
- # This method may raise:
- #
- # * Net::SMTPAuthenticationError
- # * Net::SMTPServerBusy
- # * Net::SMTPSyntaxError
- # * Net::SMTPFatalError
- # * Net::SMTPUnknownError
- # * Net::OpenTimeout
- # * Net::ReadTimeout
- # * IOError
- #
- def start(helo = 'localhost',
- user = nil, secret = nil, authtype = nil) # :yield: smtp
- if block_given?
- begin
- do_start helo, user, secret, authtype
- return yield(self)
- ensure
- do_finish
- end
- else
- do_start helo, user, secret, authtype
- return self
- end
- end
-
- # Finishes the SMTP session and closes TCP connection.
- # Raises IOError if not started.
- def finish
- raise IOError, 'not yet started' unless started?
- do_finish
- end
-
- private
-
- def tcp_socket(address, port)
- TCPSocket.open address, port
- end
-
- def do_start(helo_domain, user, secret, authtype)
- raise IOError, 'SMTP session already started' if @started
- if user or secret
- check_auth_method(authtype || DEFAULT_AUTH_TYPE)
- check_auth_args user, secret
- end
- s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do
- tcp_socket(@address, @port)
- end
- logging "Connection opened: #{@address}:#{@port}"
- @socket = new_internet_message_io(tls? ? tlsconnect(s) : s)
- check_response critical { recv_response() }
- do_helo helo_domain
- if starttls_always? or (capable_starttls? and starttls_auto?)
- unless capable_starttls?
- raise SMTPUnsupportedCommand,
- "STARTTLS is not supported on this server"
- end
- starttls
- @socket = new_internet_message_io(tlsconnect(s))
- # helo response may be different after STARTTLS
- do_helo helo_domain
- end
- authenticate user, secret, (authtype || DEFAULT_AUTH_TYPE) if user
- @started = true
- ensure
- unless @started
- # authentication failed, cancel connection.
- s.close if s
- @socket = nil
- end
- end
-
- def ssl_socket(socket, context)
- OpenSSL::SSL::SSLSocket.new socket, context
- end
-
- def tlsconnect(s)
- verified = false
- s = ssl_socket(s, @ssl_context)
- logging "TLS connection started"
- s.sync_close = true
- ssl_socket_connect(s, @open_timeout)
- if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
- s.post_connection_check(@address)
- end
- verified = true
- s
- ensure
- s.close unless verified
- end
-
- def new_internet_message_io(s)
- InternetMessageIO.new(s, read_timeout: @read_timeout,
- debug_output: @debug_output)
- end
-
- def do_helo(helo_domain)
- res = @esmtp ? ehlo(helo_domain) : helo(helo_domain)
- @capabilities = res.capabilities
- rescue SMTPError
- if @esmtp
- @esmtp = false
- @error_occurred = false
- retry
- end
- raise
- end
-
- def do_finish
- quit if @socket and not @socket.closed? and not @error_occurred
- ensure
- @started = false
- @error_occurred = false
- @socket.close if @socket
- @socket = nil
- end
-
- #
- # Message Sending
- #
-
- public
-
- #
- # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found
- # in the +msgstr+, are converted into the CR LF pair. You cannot send a
- # binary message with this method. +msgstr+ should include both
- # the message headers and body.
- #
- # +from_addr+ is a String representing the source mail address.
- #
- # +to_addr+ is a String or Strings or Array of Strings, representing
- # the destination mail address or addresses.
- #
- # === Example
- #
- # Net::SMTP.start('smtp.example.com') do |smtp|
- # smtp.send_message msgstr,
- # 'from@example.com',
- # ['dest@example.com', 'dest2@example.com']
- # end
- #
- # === Errors
- #
- # This method may raise:
- #
- # * Net::SMTPServerBusy
- # * Net::SMTPSyntaxError
- # * Net::SMTPFatalError
- # * Net::SMTPUnknownError
- # * Net::ReadTimeout
- # * IOError
- #
- def send_message(msgstr, from_addr, *to_addrs)
- raise IOError, 'closed session' unless @socket
- mailfrom from_addr
- rcptto_list(to_addrs) {data msgstr}
- end
-
- alias send_mail send_message
- alias sendmail send_message # obsolete
-
- #
- # Opens a message writer stream and gives it to the block.
- # The stream is valid only in the block, and has these methods:
- #
- # puts(str = ''):: outputs STR and CR LF.
- # print(str):: outputs STR.
- # printf(fmt, *args):: outputs sprintf(fmt,*args).
- # write(str):: outputs STR and returns the length of written bytes.
- # <<(str):: outputs STR and returns self.
- #
- # If a single CR ("\r") or LF ("\n") is found in the message,
- # it is converted to the CR LF pair. You cannot send a binary
- # message with this method.
- #
- # === Parameters
- #
- # +from_addr+ is a String representing the source mail address.
- #
- # +to_addr+ is a String or Strings or Array of Strings, representing
- # the destination mail address or addresses.
- #
- # === Example
- #
- # Net::SMTP.start('smtp.example.com', 25) do |smtp|
- # smtp.open_message_stream('from@example.com', ['dest@example.com']) do |f|
- # f.puts 'From: from@example.com'
- # f.puts 'To: dest@example.com'
- # f.puts 'Subject: test message'
- # f.puts
- # f.puts 'This is a test message.'
- # end
- # end
- #
- # === Errors
- #
- # This method may raise:
- #
- # * Net::SMTPServerBusy
- # * Net::SMTPSyntaxError
- # * Net::SMTPFatalError
- # * Net::SMTPUnknownError
- # * Net::ReadTimeout
- # * IOError
- #
- def open_message_stream(from_addr, *to_addrs, &block) # :yield: stream
- raise IOError, 'closed session' unless @socket
- mailfrom from_addr
- rcptto_list(to_addrs) {data(&block)}
- end
-
- alias ready open_message_stream # obsolete
-
- #
- # Authentication
- #
-
- public
-
- DEFAULT_AUTH_TYPE = :plain
-
- def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
- check_auth_method authtype
- check_auth_args user, secret
- send auth_method(authtype), user, secret
- end
-
- def auth_plain(user, secret)
- check_auth_args user, secret
- res = critical {
- get_response('AUTH PLAIN ' + base64_encode("\0#{user}\0#{secret}"))
- }
- check_auth_response res
- res
- end
-
- def auth_login(user, secret)
- check_auth_args user, secret
- res = critical {
- check_auth_continue get_response('AUTH LOGIN')
- check_auth_continue get_response(base64_encode(user))
- get_response(base64_encode(secret))
- }
- check_auth_response res
- res
- end
-
- def auth_cram_md5(user, secret)
- check_auth_args user, secret
- res = critical {
- res0 = get_response('AUTH CRAM-MD5')
- check_auth_continue res0
- crammed = cram_md5_response(secret, res0.cram_md5_challenge)
- get_response(base64_encode("#{user} #{crammed}"))
- }
- check_auth_response res
- res
- end
-
- private
-
- def check_auth_method(type)
- unless respond_to?(auth_method(type), true)
- raise ArgumentError, "wrong authentication type #{type}"
- end
- end
-
- def auth_method(type)
- "auth_#{type.to_s.downcase}".intern
- end
-
- def check_auth_args(user, secret, authtype = DEFAULT_AUTH_TYPE)
- unless user
- raise ArgumentError, 'SMTP-AUTH requested but missing user name'
- end
- unless secret
- raise ArgumentError, 'SMTP-AUTH requested but missing secret phrase'
- end
- end
-
- def base64_encode(str)
- # expects "str" may not become too long
- [str].pack('m0')
- end
-
- IMASK = 0x36
- OMASK = 0x5c
-
- # CRAM-MD5: [RFC2195]
- def cram_md5_response(secret, challenge)
- tmp = Digest::MD5.digest(cram_secret(secret, IMASK) + challenge)
- Digest::MD5.hexdigest(cram_secret(secret, OMASK) + tmp)
- end
-
- CRAM_BUFSIZE = 64
-
- def cram_secret(secret, mask)
- secret = Digest::MD5.digest(secret) if secret.size > CRAM_BUFSIZE
- buf = secret.ljust(CRAM_BUFSIZE, "\0")
- 0.upto(buf.size - 1) do |i|
- buf[i] = (buf[i].ord ^ mask).chr
- end
- buf
- end
-
- #
- # SMTP command dispatcher
- #
-
- public
-
- # Aborts the current mail transaction
-
- def rset
- getok('RSET')
- end
-
- def starttls
- getok('STARTTLS')
- end
-
- def helo(domain)
- getok("HELO #{domain}")
- end
-
- def ehlo(domain)
- getok("EHLO #{domain}")
- end
-
- def mailfrom(from_addr)
- getok("MAIL FROM:<#{from_addr}>")
- end
-
- def rcptto_list(to_addrs)
- raise ArgumentError, 'mail destination not given' if to_addrs.empty?
- ok_users = []
- unknown_users = []
- to_addrs.flatten.each do |addr|
- begin
- rcptto addr
- rescue SMTPAuthenticationError
- unknown_users << addr.dump
- else
- ok_users << addr
- end
- end
- raise ArgumentError, 'mail destination not given' if ok_users.empty?
- ret = yield
- unless unknown_users.empty?
- raise SMTPAuthenticationError, "failed to deliver for #{unknown_users.join(', ')}"
- end
- ret
- end
-
- def rcptto(to_addr)
- getok("RCPT TO:<#{to_addr}>")
- end
-
- # This method sends a message.
- # If +msgstr+ is given, sends it as a message.
- # If block is given, yield a message writer stream.
- # You must write message before the block is closed.
- #
- # # Example 1 (by string)
- # smtp.data(<<EndMessage)
- # From: john@example.com
- # To: betty@example.com
- # Subject: I found a bug
- #
- # Check vm.c:58879.
- # EndMessage
- #
- # # Example 2 (by block)
- # smtp.data {|f|
- # f.puts "From: john@example.com"
- # f.puts "To: betty@example.com"
- # f.puts "Subject: I found a bug"
- # f.puts ""
- # f.puts "Check vm.c:58879."
- # }
- #
- def data(msgstr = nil, &block) #:yield: stream
- if msgstr and block
- raise ArgumentError, "message and block are exclusive"
- end
- unless msgstr or block
- raise ArgumentError, "message or block is required"
- end
- res = critical {
- check_continue get_response('DATA')
- socket_sync_bak = @socket.io.sync
- begin
- @socket.io.sync = false
- if msgstr
- @socket.write_message msgstr
- else
- @socket.write_message_by_block(&block)
- end
- ensure
- @socket.io.flush
- @socket.io.sync = socket_sync_bak
- end
- recv_response()
- }
- check_response res
- res
- end
-
- def quit
- getok('QUIT')
- end
-
- private
-
- def validate_line(line)
- # A bare CR or LF is not allowed in RFC5321.
- if /[\r\n]/ =~ line
- raise ArgumentError, "A line must not contain CR or LF"
- end
- end
-
- def getok(reqline)
- validate_line reqline
- res = critical {
- @socket.writeline reqline
- recv_response()
- }
- check_response res
- res
- end
-
- def get_response(reqline)
- validate_line reqline
- @socket.writeline reqline
- recv_response()
- end
-
- def recv_response
- buf = ''.dup
- while true
- line = @socket.readline
- buf << line << "\n"
- break unless line[3,1] == '-' # "210-PIPELINING"
- end
- Response.parse(buf)
- end
-
- def critical
- return Response.parse('200 dummy reply code') if @error_occurred
- begin
- return yield()
- rescue Exception
- @error_occurred = true
- raise
- end
- end
-
- def check_response(res)
- unless res.success?
- raise res.exception_class, res.message
- end
- end
-
- def check_continue(res)
- unless res.continue?
- raise SMTPUnknownError, "could not get 3xx (#{res.status}: #{res.string})"
- end
- end
-
- def check_auth_response(res)
- unless res.success?
- raise SMTPAuthenticationError, res.message
- end
- end
-
- def check_auth_continue(res)
- unless res.continue?
- raise res.exception_class, res.message
- end
- end
-
- # This class represents a response received by the SMTP server. Instances
- # of this class are created by the SMTP class; they should not be directly
- # created by the user. For more information on SMTP responses, view
- # {Section 4.2 of RFC 5321}[http://tools.ietf.org/html/rfc5321#section-4.2]
- class Response
- # Parses the received response and separates the reply code and the human
- # readable reply text
- def self.parse(str)
- new(str[0,3], str)
- end
-
- # Creates a new instance of the Response class and sets the status and
- # string attributes
- def initialize(status, string)
- @status = status
- @string = string
- end
-
- # The three digit reply code of the SMTP response
- attr_reader :status
-
- # The human readable reply text of the SMTP response
- attr_reader :string
-
- # Takes the first digit of the reply code to determine the status type
- def status_type_char
- @status[0, 1]
- end
-
- # Determines whether the response received was a Positive Completion
- # reply (2xx reply code)
- def success?
- status_type_char() == '2'
- end
-
- # Determines whether the response received was a Positive Intermediate
- # reply (3xx reply code)
- def continue?
- status_type_char() == '3'
- end
-
- # The first line of the human readable reply text
- def message
- @string.lines.first
- end
-
- # Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5
- # on Wikipedia: https://en.wikipedia.org/wiki/CRAM-MD5
- def cram_md5_challenge
- @string.split(/ /)[1].unpack1('m')
- end
-
- # Returns a hash of the human readable reply text in the response if it
- # is multiple lines. It does not return the first line. The key of the
- # hash is the first word the value of the hash is an array with each word
- # thereafter being a value in the array
- def capabilities
- return {} unless @string[3, 1] == '-'
- h = {}
- @string.lines.drop(1).each do |line|
- k, *v = line[4..-1].chomp.split
- h[k] = v
- end
- h
- end
-
- # Determines whether there was an error and raises the appropriate error
- # based on the reply code of the response
- def exception_class
- case @status
- when /\A4/ then SMTPServerBusy
- when /\A50/ then SMTPSyntaxError
- when /\A53/ then SMTPAuthenticationError
- when /\A5/ then SMTPFatalError
- else SMTPUnknownError
- end
- end
- end
-
- def logging(msg)
- @debug_output << msg + "\n" if @debug_output
- end
-
- end # class SMTP
-
- SMTPSession = SMTP # :nodoc:
-
-end
diff --git a/lib/net/smtp/net-smtp.gemspec b/lib/net/smtp/net-smtp.gemspec
deleted file mode 100644
index e9635cd091..0000000000
--- a/lib/net/smtp/net-smtp.gemspec
+++ /dev/null
@@ -1,27 +0,0 @@
-begin
- require_relative "lib/net/smtp/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "net-smtp"
- spec.version = Net::SMTP::VERSION
- spec.authors = ["Yukihiro Matsumoto"]
- spec.email = ["matz@ruby-lang.org"]
-
- spec.summary = %q{Simple Mail Transfer Protocol client library for Ruby.}
- spec.description = %q{Simple Mail Transfer Protocol client library for Ruby.}
- spec.homepage = "https://github.com/ruby/net-smtp"
- spec.license = "BSD-2-Clause"
-
- spec.metadata["homepage_uri"] = spec.homepage
- spec.metadata["source_code_uri"] = spec.homepage
-
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- end
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-end
diff --git a/lib/net/smtp/version.rb b/lib/net/smtp/version.rb
deleted file mode 100644
index 7f5aaaa6db..0000000000
--- a/lib/net/smtp/version.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module Net
- class Protocol; end
- class SMTP < Protocol
- VERSION = "0.1.0"
- end
-end
diff --git a/lib/observer.rb b/lib/observer.rb
index acfe654301..ef70e39dd8 100644
--- a/lib/observer.rb
+++ b/lib/observer.rb
@@ -111,7 +111,32 @@
# Current price: 112
# Current price: 79
# --- Sun Jun 09 00:10:25 CDT 2002: Price below 80: 79
+#
+# === Usage with procs
+#
+# The +#notify_observers+ method can also be used with +proc+s by using
+# the +:call+ as +func+ parameter.
+#
+# The following example illustrates the use of a lambda:
+#
+# require 'observer'
+#
+# class Ticker
+# include Observable
+#
+# def run
+# # logic to retrieve the price (here 77.0)
+# changed
+# notify_observers(77.0)
+# end
+# end
+#
+# ticker = Ticker.new
+# warner = ->(price) { puts "New price received: #{price}" }
+# ticker.add_observer(warner, :call)
+# ticker.run
module Observable
+ VERSION = "0.1.1"
#
# Add +observer+ as an observer on this object. So that it will receive
@@ -194,7 +219,7 @@ module Observable
if defined? @observer_state and @observer_state
if defined? @observer_peers
@observer_peers.each do |k, v|
- k.send v, *arg
+ k.__send__(v, *arg)
end
end
@observer_state = false
diff --git a/lib/observer/observer.gemspec b/lib/observer/observer.gemspec
index 625a30eada..46538e881a 100644
--- a/lib/observer/observer.gemspec
+++ b/lib/observer/observer.gemspec
@@ -1,19 +1,22 @@
-begin
- require_relative "lib/observer/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "observer"
- spec.version = Observer::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Implementation of the Observer object-oriented design pattern.}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/observer"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
@@ -21,7 +24,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
diff --git a/lib/observer/version.rb b/lib/observer/version.rb
deleted file mode 100644
index 92b5098774..0000000000
--- a/lib/observer/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-module Observer
- VERSION = "0.1.0"
-end
diff --git a/lib/open-uri.gemspec b/lib/open-uri.gemspec
new file mode 100644
index 0000000000..cad63e4d80
--- /dev/null
+++ b/lib/open-uri.gemspec
@@ -0,0 +1,25 @@
+Gem::Specification.new do |spec|
+ spec.name = "open-uri"
+ spec.version = "0.3.0"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP.}
+ spec.description = %q{An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP.}
+ spec.homepage = "https://github.com/ruby/open-uri"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A((bin|test|spec|features)/|\.git|[Rr]ake|Gemfile)|\.gemspec\z}) }
+ end
+ spec.executables = []
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "uri"
+ spec.add_dependency "stringio"
+ spec.add_dependency "time"
+end
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index c52f67f525..93e8cfcdb7 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -3,34 +3,13 @@ require 'uri'
require 'stringio'
require 'time'
-module Kernel
- private
- alias open_uri_original_open open # :nodoc:
- class << self
- alias open_uri_original_open open # :nodoc:
- end
-
- def open(name, *rest, **kw, &block) # :nodoc:
- if (name.respond_to?(:open) && !name.respond_to?(:to_path)) ||
- (name.respond_to?(:to_str) &&
- %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ name &&
- (uri = URI.parse(name)).respond_to?(:open))
- warn('calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open', uplevel: 1)
- URI.open(name, *rest, **kw, &block)
- else
- open_uri_original_open(name, *rest, **kw, &block)
- end
- end
- module_function :open
-end
-
module URI
# Allows the opening of various resources including URIs.
#
# If the first argument responds to the 'open' method, 'open' is called on
# it with the rest of the arguments.
#
- # If the first argument is a string that begins with <code>(protocol)://<code>, it is parsed by
+ # If the first argument is a string that begins with <code>(protocol)://</code>, it is parsed by
# URI.parse. If the parsed object responds to the 'open' method,
# 'open' is called on it with the rest of the arguments.
#
@@ -49,9 +28,7 @@ module URI
(uri = URI.parse(name)).respond_to?(:open)
uri.open(*rest, &block)
else
- open_uri_original_open(name, *rest, &block)
- # After Kernel#open override is removed:
- #super
+ super
end
end
end
@@ -122,6 +99,8 @@ module OpenURI
:open_timeout => true,
:ssl_ca_cert => nil,
:ssl_verify_mode => nil,
+ :ssl_min_version => nil,
+ :ssl_max_version => nil,
:ftp_active_mode => false,
:redirect => true,
:encoding => nil,
@@ -321,6 +300,8 @@ module OpenURI
require 'net/https'
http.use_ssl = true
http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER
+ http.min_version = options[:ssl_min_version]
+ http.max_version = options[:ssl_max_version]
store = OpenSSL::X509::Store.new
if options[:ssl_ca_cert]
Array(options[:ssl_ca_cert]).each do |cert|
@@ -376,7 +357,8 @@ module OpenURI
when Net::HTTPMovedPermanently, # 301
Net::HTTPFound, # 302
Net::HTTPSeeOther, # 303
- Net::HTTPTemporaryRedirect # 307
+ Net::HTTPTemporaryRedirect, # 307
+ Net::HTTPPermanentRedirect # 308
begin
loc_uri = URI.parse(resp['location'])
rescue URI::InvalidURIError
@@ -433,6 +415,13 @@ module OpenURI
end
end
+ # :stopdoc:
+ RE_LWS = /[\r\n\t ]+/n
+ RE_TOKEN = %r{[^\x00- ()<>@,;:\\"/\[\]?={}\x7f]+}n
+ RE_QUOTED_STRING = %r{"(?:[\r\n\t !#-\[\]-~\x80-\xff]|\\[\x00-\x7f])*"}n
+ RE_PARAMETERS = %r{(?:;#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?=#{RE_LWS}?(?:#{RE_TOKEN}|#{RE_QUOTED_STRING})#{RE_LWS}?)*}n
+ # :startdoc:
+
# Mixin for holding meta-information.
module Meta
def Meta.init(obj, src=nil) # :nodoc:
@@ -510,13 +499,6 @@ module OpenURI
end
end
- # :stopdoc:
- RE_LWS = /[\r\n\t ]+/n
- RE_TOKEN = %r{[^\x00- ()<>@,;:\\"/\[\]?={}\x7f]+}n
- RE_QUOTED_STRING = %r{"(?:[\r\n\t !#-\[\]-~\x80-\xff]|\\[\x00-\x7f])*"}n
- RE_PARAMETERS = %r{(?:;#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?=#{RE_LWS}?(?:#{RE_TOKEN}|#{RE_QUOTED_STRING})#{RE_LWS}?)*}n
- # :startdoc:
-
def content_type_parse # :nodoc:
vs = @metas['content-type']
# The last (?:;#{RE_LWS}?)? matches extra ";" which violates RFC2045.
@@ -721,6 +703,20 @@ module OpenURI
#
# :ssl_verify_mode is used to specify openssl verify mode.
#
+ # [:ssl_min_version]
+ # Synopsis:
+ # :ssl_min_version=>:TLS1_2
+ #
+ # :ssl_min_version option specifies the minimum allowed SSL/TLS protocol
+ # version. See also OpenSSL::SSL::SSLContext#min_version=.
+ #
+ # [:ssl_max_version]
+ # Synopsis:
+ # :ssl_max_version=>:TLS1_2
+ #
+ # :ssl_max_version option specifies the maximum allowed SSL/TLS protocol
+ # version. See also OpenSSL::SSL::SSLContext#max_version=.
+ #
# [:ftp_active_mode]
# Synopsis:
# :ftp_active_mode=>bool
@@ -744,7 +740,7 @@ module OpenURI
OpenURI.open_uri(self, *rest, &block)
end
- # OpenURI::OpenRead#read([options]) reads a content referenced by self and
+ # OpenURI::OpenRead#read([ options ]) reads a content referenced by self and
# returns the content as string.
# The string is extended with OpenURI::Meta.
# The argument +options+ is same as OpenURI::OpenRead#open.
@@ -773,7 +769,12 @@ module URI
OpenURI.open_http(buf, self, proxy, options)
return
end
- require 'net/ftp'
+
+ begin
+ require 'net/ftp'
+ rescue LoadError
+ abort "net/ftp is not found. You may need to `gem install net-ftp` to install net/ftp."
+ end
path = self.path
path = path.sub(%r{\A/}, '%2F') # re-encode the beginning slash because uri library decodes it.
diff --git a/lib/open3.rb b/lib/open3.rb
index 5e725317a4..9652b27194 100644
--- a/lib/open3.rb
+++ b/lib/open3.rb
@@ -29,6 +29,8 @@
# - Open3.pipeline : run a pipeline and wait for its completion
#
+require 'open3/version'
+
module Open3
# Open stdin, stdout, and stderr streams and start external executable.
@@ -206,6 +208,13 @@ module Open3
opts[[:out, :err]] = out_w
popen_run(cmd, opts, [in_r, out_w], [in_w, out_r], &block)
+ ensure
+ if block
+ in_r.close
+ in_w.close
+ out_r.close
+ out_w.close
+ end
end
module_function :popen2e
@@ -750,3 +759,6 @@ module Open3
end
end
+
+# JRuby uses different popen logic on Windows, require it here to reuse wrapper methods above.
+require 'open3/jruby_windows' if RUBY_ENGINE == 'jruby' && JRuby::Util::ON_WINDOWS
diff --git a/lib/open3/open3.gemspec b/lib/open3/open3.gemspec
index 65ddaa4723..a33fca7444 100644
--- a/lib/open3/open3.gemspec
+++ b/lib/open3/open3.gemspec
@@ -1,19 +1,23 @@
-begin
- require_relative "lib/open3/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}/version.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "open3"
- spec.version = Open3::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Popen, but with stderr, too}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/open3"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ spec.required_ruby_version = ">= 2.6.0"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
@@ -21,7 +25,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
diff --git a/lib/open3/version.rb b/lib/open3/version.rb
index c670b79ebc..b6b6ee2c9c 100644
--- a/lib/open3/version.rb
+++ b/lib/open3/version.rb
@@ -1,3 +1,3 @@
module Open3
- VERSION = "0.1.0"
+ VERSION = "0.1.2"
end
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 614ebc3eae..53a4387bd8 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -48,6 +48,10 @@
#
# == OptionParser
#
+# === New to \OptionParser?
+#
+# See the {Tutorial}[optparse/tutorial.rdoc].
+#
# === Introduction
#
# OptionParser is a class for command-line option analysis. It is much more
@@ -72,10 +76,10 @@
# require 'optparse'
#
# options = {}
-# OptionParser.new do |opts|
-# opts.banner = "Usage: example.rb [options]"
+# OptionParser.new do |parser|
+# parser.banner = "Usage: example.rb [options]"
#
-# opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
+# parser.on("-v", "--[no-]verbose", "Run verbosely") do |v|
# options[:verbose] = v
# end
# end.parse!
@@ -96,15 +100,15 @@
# def self.parse(options)
# args = Options.new("world")
#
-# opt_parser = OptionParser.new do |opts|
-# opts.banner = "Usage: example.rb [options]"
+# opt_parser = OptionParser.new do |parser|
+# parser.banner = "Usage: example.rb [options]"
#
-# opts.on("-nNAME", "--name=NAME", "Name to say hello to") do |n|
+# parser.on("-nNAME", "--name=NAME", "Name to say hello to") do |n|
# args.name = n
# end
#
-# opts.on("-h", "--help", "Prints this help") do
-# puts opts
+# parser.on("-h", "--help", "Prints this help") do
+# puts parser
# exit
# end
# end
@@ -240,14 +244,14 @@
#
# require 'optparse'
#
-# params = {}
-# OptionParser.new do |opts|
-# opts.on('-a')
-# opts.on('-b NUM', Integer)
-# opts.on('-v', '--verbose')
-# end.parse!(into: params)
+# options = {}
+# OptionParser.new do |parser|
+# parser.on('-a')
+# parser.on('-b NUM', Integer)
+# parser.on('-v', '--verbose')
+# end.parse!(into: options)
#
-# p params
+# p options
#
# Used:
#
@@ -415,10 +419,14 @@
#
# === Further documentation
#
-# The above examples should be enough to learn how to use this class. If you
-# have any questions, file a ticket at http://bugs.ruby-lang.org.
+# The above examples, along with the accompanying
+# {Tutorial}[optparse/tutorial.rdoc],
+# should be enough to learn how to use this class.
+# If you have any questions, file a ticket at http://bugs.ruby-lang.org.
#
class OptionParser
+ OptionParser::Version = "0.3.1"
+
# :stopdoc:
NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
@@ -545,7 +553,7 @@ class OptionParser
# Parses +arg+ and returns rest of +arg+ and matched portion to the
# argument pattern. Yields when the pattern doesn't match substring.
#
- def parse_arg(arg)
+ def parse_arg(arg) # :nodoc:
pattern or return nil, [arg]
unless m = pattern.match(arg)
yield(InvalidArgument, arg)
@@ -570,7 +578,7 @@ class OptionParser
# conversion. Yields at semi-error condition instead of raising an
# exception.
#
- def conv_arg(arg, val = [])
+ def conv_arg(arg, val = []) # :nodoc:
if conv
val = conv.call(*val)
else
@@ -666,6 +674,29 @@ class OptionParser
end
end
+ def pretty_print_contents(q) # :nodoc:
+ if @block
+ q.text ":" + @block.source_location.join(":") + ":"
+ first = false
+ else
+ first = true
+ end
+ [@short, @long].each do |list|
+ list.each do |opt|
+ if first
+ q.text ":"
+ first = false
+ end
+ q.breakable
+ q.text opt
+ end
+ end
+ end
+
+ def pretty_print(q) # :nodoc:
+ q.object_group(self) {pretty_print_contents(q)}
+ end
+
#
# Switch that takes no arguments.
#
@@ -685,6 +716,10 @@ class OptionParser
def self.pattern
Object
end
+
+ def pretty_head # :nodoc:
+ "NoArgument"
+ end
end
#
@@ -702,6 +737,10 @@ class OptionParser
end
conv_arg(*parse_arg(arg, &method(:raise)))
end
+
+ def pretty_head # :nodoc:
+ "Required"
+ end
end
#
@@ -719,18 +758,22 @@ class OptionParser
conv_arg(arg)
end
end
+
+ def pretty_head # :nodoc:
+ "Optional"
+ end
end
#
- # Switch that takes an argument, which does not begin with '-'.
+ # Switch that takes an argument, which does not begin with '-' or is '-'.
#
class PlacedArgument < self
#
- # Returns nil if argument is not present or begins with '-'.
+ # Returns nil if argument is not present or begins with '-' and is not '-'.
#
def parse(arg, argv, &error)
- if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0]))
+ if !(val = arg) and (argv.empty? or /\A-./ =~ (val = argv[0]))
return nil, block, nil
end
opt = (val = parse_arg(val, &error))[1]
@@ -742,6 +785,10 @@ class OptionParser
end
val
end
+
+ def pretty_head # :nodoc:
+ "Placed"
+ end
end
end
@@ -773,6 +820,17 @@ class OptionParser
@list = []
end
+ def pretty_print(q) # :nodoc:
+ q.group(1, "(", ")") do
+ @list.each do |sw|
+ next unless Switch === sw
+ q.group(1, "(" + sw.pretty_head, ")") do
+ sw.pretty_print_contents(q)
+ end
+ end
+ end
+ end
+
#
# See OptionParser.accept.
#
@@ -804,7 +862,7 @@ class OptionParser
# +lopts+:: Long style option list.
# +nlopts+:: Negated long style options list.
#
- def update(sw, sopts, lopts, nsw = nil, nlopts = nil)
+ def update(sw, sopts, lopts, nsw = nil, nlopts = nil) # :nodoc:
sopts.each {|o| @short[o] = sw} if sopts
lopts.each {|o| @long[o] = sw} if lopts
nlopts.each {|o| @long[o] = nsw} if nsw and nlopts
@@ -1089,6 +1147,8 @@ XXX
@summary_width = width
@summary_indent = indent
@default_argv = ARGV
+ @require_exact = false
+ @raise_unknown = true
add_officious
yield self if block_given?
end
@@ -1162,6 +1222,13 @@ XXX
# Strings to be parsed in default.
attr_accessor :default_argv
+ # Whether to require that options match exactly (disallows providing
+ # abbreviated long option as short option).
+ attr_accessor :require_exact
+
+ # Whether to raise at unknown option.
+ attr_accessor :raise_unknown
+
#
# Heading banner preceding summary.
#
@@ -1280,6 +1347,29 @@ XXX
def help; summarize("#{banner}".sub(/\n?\z/, "\n")) end
alias to_s help
+ def pretty_print(q) # :nodoc:
+ q.object_group(self) do
+ first = true
+ if @stack.size > 2
+ @stack.each_with_index do |s, i|
+ next if i < 2
+ next if s.list.empty?
+ if first
+ first = false
+ q.text ":"
+ end
+ q.breakable
+ s.pretty_print(q)
+ end
+ end
+ end
+ end
+
+ def inspect # :nodoc:
+ require 'pp'
+ pretty_print_inspect
+ end
+
#
# Returns option summary list.
#
@@ -1293,7 +1383,7 @@ XXX
# +prv+:: Previously specified argument.
# +msg+:: Exception message.
#
- def notwice(obj, prv, msg)
+ def notwice(obj, prv, msg) # :nodoc:
unless !prv or prv == obj
raise(ArgumentError, "argument #{msg} given twice: #{obj}",
ParseError.filter_backtrace(caller(2)))
@@ -1303,65 +1393,11 @@ XXX
private :notwice
SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a} # :nodoc:
+
+ # :call-seq:
+ # make_switch(params, block = nil)
#
- # Creates an OptionParser::Switch from the parameters. The parsed argument
- # value is passed to the given block, where it can be processed.
- #
- # See at the beginning of OptionParser for some full examples.
- #
- # +opts+ can include the following elements:
- #
- # [Argument style:]
- # One of the following:
- # :NONE, :REQUIRED, :OPTIONAL
- #
- # [Argument pattern:]
- # Acceptable option argument format, must be pre-defined with
- # OptionParser.accept or OptionParser#accept, or Regexp. This can appear
- # once or assigned as String if not present, otherwise causes an
- # ArgumentError. Examples:
- # Float, Time, Array
- #
- # [Possible argument values:]
- # Hash or Array.
- # [:text, :binary, :auto]
- # %w[iso-2022-jp shift_jis euc-jp utf8 binary]
- # { "jis" => "iso-2022-jp", "sjis" => "shift_jis" }
- #
- # [Long style switch:]
- # Specifies a long style switch which takes a mandatory, optional or no
- # argument. It's a string of the following form:
- # "--switch=MANDATORY" or "--switch MANDATORY"
- # "--switch[=OPTIONAL]"
- # "--switch"
- #
- # [Short style switch:]
- # Specifies short style switch which takes a mandatory, optional or no
- # argument. It's a string of the following form:
- # "-xMANDATORY"
- # "-x[OPTIONAL]"
- # "-x"
- # There is also a special form which matches character range (not full
- # set of regular expression):
- # "-[a-z]MANDATORY"
- # "-[a-z][OPTIONAL]"
- # "-[a-z]"
- #
- # [Argument style and description:]
- # Instead of specifying mandatory or optional arguments directly in the
- # switch parameter, this separate parameter can be used.
- # "=MANDATORY"
- # "=[OPTIONAL]"
- #
- # [Description:]
- # Description string for the option.
- # "Run verbosely"
- # If you give multiple description strings, each string will be printed
- # line by line.
- #
- # [Handler:]
- # Handler for the parsed argument value. Either give a block or pass a
- # Proc or Method as an argument.
+ # :include: ../doc/optparse/creates_option.rdoc
#
def make_switch(opts, block = nil)
short, long, nolong, style, pattern, conv, not_pattern, not_conv, not_style = [], [], []
@@ -1470,7 +1506,7 @@ XXX
style = notwice(default_style.guess(arg = o), style, 'style')
default_pattern, conv = search(:atype, Object) unless default_pattern
else
- desc.push(o)
+ desc.push(o) if o && !o.empty?
end
end
@@ -1496,14 +1532,20 @@ XXX
nolong
end
+ # :call-seq:
+ # define(*params, &block)
+ #
+ # :include: ../doc/optparse/creates_option.rdoc
+ #
def define(*opts, &block)
top.append(*(sw = make_switch(opts, block)))
sw[0]
end
+ # :call-seq:
+ # on(*params, &block)
#
- # Add option switch and handler. See #make_switch for an explanation of
- # parameters.
+ # :include: ../doc/optparse/creates_option.rdoc
#
def on(*opts, &block)
define(*opts, &block)
@@ -1511,13 +1553,22 @@ XXX
end
alias def_option define
+ # :call-seq:
+ # define_head(*params, &block)
+ #
+ # :include: ../doc/optparse/creates_option.rdoc
+ #
def define_head(*opts, &block)
top.prepend(*(sw = make_switch(opts, block)))
sw[0]
end
+ # :call-seq:
+ # on_head(*params, &block)
#
- # Add option switch like with #on, but at head of summary.
+ # :include: ../doc/optparse/creates_option.rdoc
+ #
+ # The new option is added at the head of the summary.
#
def on_head(*opts, &block)
define_head(*opts, &block)
@@ -1525,13 +1576,23 @@ XXX
end
alias def_head_option define_head
+ # :call-seq:
+ # define_tail(*params, &block)
+ #
+ # :include: ../doc/optparse/creates_option.rdoc
+ #
def define_tail(*opts, &block)
base.append(*(sw = make_switch(opts, block)))
sw[0]
end
#
- # Add option switch like with #on, but at tail of summary.
+ # :call-seq:
+ # on_tail(*params, &block)
+ #
+ # :include: ../doc/optparse/creates_option.rdoc
+ #
+ # The new option is added at the tail of the summary.
#
def on_tail(*opts, &block)
define_tail(*opts, &block)
@@ -1581,7 +1642,12 @@ XXX
opt.tr!('_', '-')
begin
sw, = complete(:long, opt, true)
+ if require_exact && !sw.long.include?(arg)
+ throw :terminate, arg unless raise_unknown
+ raise InvalidOption, arg
+ end
rescue ParseError
+ throw :terminate, arg unless raise_unknown
raise $!.set_option(arg, true)
end
begin
@@ -1605,6 +1671,7 @@ XXX
val = arg.delete_prefix('-')
has_arg = true
rescue InvalidOption
+ raise if require_exact
# if no short options match, try completion with long
# options.
sw, = complete(:long, opt)
@@ -1612,11 +1679,17 @@ XXX
end
end
rescue ParseError
+ throw :terminate, arg unless raise_unknown
raise $!.set_option(arg, true)
end
begin
opt, cb, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq}
+ rescue ParseError
+ raise $!.set_option(arg, arg.length > 2)
+ else
raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}"
+ end
+ begin
argv.unshift(opt) if opt and (!rest or (opt = opt.sub(/\A-*/, '-')) != '-')
val = cb.call(val) if cb
setter.call(sw.switch_name, val) if setter
@@ -1745,9 +1818,9 @@ XXX
# Traverses @stack, sending each element method +id+ with +args+ and
# +block+.
#
- def visit(id, *args, &block)
+ def visit(id, *args, &block) # :nodoc:
@stack.reverse_each do |el|
- el.send(id, *args, &block)
+ el.__send__(id, *args, &block)
end
nil
end
@@ -1756,7 +1829,7 @@ XXX
#
# Searches +key+ in @stack for +id+ hash and returns or yields the result.
#
- def search(id, key)
+ def search(id, key) # :nodoc:
block_given = block_given?
visit(:search, id, key) do |k|
return block_given ? yield(k) : k
@@ -1773,7 +1846,7 @@ XXX
# +icase+:: Search case insensitive if true.
# +pat+:: Optional pattern for completion.
#
- def complete(typ, opt, icase = false, *pat)
+ def complete(typ, opt, icase = false, *pat) # :nodoc:
if pat.empty?
search(typ, opt) {|sw| return [sw, opt]} # exact match or...
end
@@ -1837,10 +1910,13 @@ XXX
# directory ~/.options, then the basename with '.options' suffix
# under XDG and Haiku standard places.
#
- def load(filename = nil)
+ # The optional +into+ keyword argument works exactly like that accepted in
+ # method #parse.
+ #
+ def load(filename = nil, into: nil)
unless filename
basename = File.basename($0, '.*')
- return true if load(File.expand_path(basename, '~/.options')) rescue nil
+ return true if load(File.expand_path(basename, '~/.options'), into: into) rescue nil
basename << ".options"
return [
# XDG
@@ -1852,11 +1928,11 @@ XXX
'~/config/settings',
].any? {|dir|
next if !dir or dir.empty?
- load(File.expand_path(basename, dir)) rescue nil
+ load(File.expand_path(basename, dir), into: into) rescue nil
}
end
begin
- parse(*IO.readlines(filename).each {|s| s.chomp!})
+ parse(*File.readlines(filename, chomp: true), into: into)
true
rescue Errno::ENOENT, Errno::ENOTDIR
false
@@ -2008,10 +2084,23 @@ XXX
f |= Regexp::IGNORECASE if /i/ =~ o
f |= Regexp::MULTILINE if /m/ =~ o
f |= Regexp::EXTENDED if /x/ =~ o
- k = o.delete("imx")
- k = nil if k.empty?
+ case o = o.delete("imx")
+ when ""
+ when "u"
+ s = s.encode(Encoding::UTF_8)
+ when "e"
+ s = s.encode(Encoding::EUC_JP)
+ when "s"
+ s = s.encode(Encoding::SJIS)
+ when "n"
+ f |= Regexp::NOENCODING
+ else
+ raise OptionParser::InvalidArgument, "unknown regexp option - #{o}"
+ end
+ else
+ s ||= all
end
- Regexp.new(s || all, f, k)
+ Regexp.new(s, f)
end
#
diff --git a/lib/optparse/ac.rb b/lib/optparse/ac.rb
index 9d520101aa..0953725e46 100644
--- a/lib/optparse/ac.rb
+++ b/lib/optparse/ac.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
class OptionParser::AC < OptionParser
private
diff --git a/lib/optparse/date.rb b/lib/optparse/date.rb
index d6649c83f1..7bbf12b77f 100644
--- a/lib/optparse/date.rb
+++ b/lib/optparse/date.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
require 'date'
OptionParser.accept(DateTime) do |s,|
diff --git a/lib/optparse/kwargs.rb b/lib/optparse/kwargs.rb
index ed58cc142b..992aca467e 100644
--- a/lib/optparse/kwargs.rb
+++ b/lib/optparse/kwargs.rb
@@ -1,7 +1,12 @@
# frozen_string_literal: true
-require 'optparse'
+require_relative '../optparse'
class OptionParser
+ # :call-seq:
+ # define_by_keywords(options, method, **params)
+ #
+ # :include: ../../doc/optparse/creates_option.rdoc
+ #
def define_by_keywords(options, meth, **opts)
meth.parameters.each do |type, name|
case type
diff --git a/lib/optparse/optparse.gemspec b/lib/optparse/optparse.gemspec
new file mode 100644
index 0000000000..a4287ddeee
--- /dev/null
+++ b/lib/optparse/optparse.gemspec
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*OptionParser::Version\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
+end
+
+Gem::Specification.new do |spec|
+ spec.name = name
+ spec.version = version
+ spec.authors = ["Nobu Nakada"]
+ spec.email = ["nobu@ruby-lang.org"]
+
+ spec.summary = %q{OptionParser is a class for command-line option analysis.}
+ spec.description = %q{OptionParser is a class for command-line option analysis.}
+ spec.homepage = "https://github.com/ruby/optparse"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir["{doc,lib,misc}/**/*"] + %w[README.md ChangeLog COPYING]
+ spec.rdoc_options = ["--main=README.md", "--op=rdoc", "--page-dir=doc"]
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/optparse/shellwords.rb b/lib/optparse/shellwords.rb
index bf31701b96..4feb1993d9 100644
--- a/lib/optparse/shellwords.rb
+++ b/lib/optparse/shellwords.rb
@@ -2,6 +2,6 @@
# -*- ruby -*-
require 'shellwords'
-require 'optparse'
+require_relative '../optparse'
OptionParser.accept(Shellwords) {|s,| Shellwords.shellwords(s)}
diff --git a/lib/optparse/time.rb b/lib/optparse/time.rb
index ffc6ff000d..0ce651f6f6 100644
--- a/lib/optparse/time.rb
+++ b/lib/optparse/time.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: false
-require 'optparse'
+require_relative '../optparse'
require 'time'
OptionParser.accept(Time) do |s,|
diff --git a/lib/optparse/uri.rb b/lib/optparse/uri.rb
index 51550cf91b..31d10593b1 100644
--- a/lib/optparse/uri.rb
+++ b/lib/optparse/uri.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
# -*- ruby -*-
-require 'optparse'
+require_relative '../optparse'
require 'uri'
OptionParser.accept(URI) {|s,| URI.parse(s) if s}
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index c40c897ff6..a08561d6c9 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -36,9 +36,10 @@
# Hash keys with spaces or characters that could normally not be used for
# method calls (e.g. <code>()[]*</code>) will not be immediately available
# on the OpenStruct object as a method for retrieval or assignment, but can
-# still be reached through the Object#send method.
+# still be reached through the Object#send method or using [].
#
# measurements = OpenStruct.new("length (in inches)" => 24)
+# measurements[:"length (in inches)"] # => 24
# measurements.send("length (in inches)") # => 24
#
# message = OpenStruct.new(:queued? => true)
@@ -61,8 +62,9 @@
# first_pet # => #<OpenStruct name="Rowdy">
# first_pet == second_pet # => true
#
+# Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable.
#
-# == Implementation
+# == Caveats
#
# An OpenStruct utilizes Ruby's method lookup structure to find and define the
# necessary methods for properties. This is accomplished through the methods
@@ -71,11 +73,41 @@
# This should be a consideration if there is a concern about the performance of
# the objects that are created, as there is much more overhead in the setting
# of these properties compared to using a Hash or a Struct.
+# Creating an open struct from a small Hash and accessing a few of the
+# entries can be 200 times slower than accessing the hash directly.
+#
+# This is a potential security issue; building OpenStruct from untrusted user data
+# (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack
+# since the keys create methods and names of methods are never garbage collected.
+#
+# This may also be the source of incompatibilities between Ruby versions:
+#
+# o = OpenStruct.new
+# o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6
+#
+# Builtin methods may be overwritten this way, which may be a source of bugs
+# or security issues:
+#
+# o = OpenStruct.new
+# o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ...
+# o.methods = [:foo, :bar]
+# o.methods # => [:foo, :bar]
+#
+# To help remedy clashes, OpenStruct uses only protected/private methods ending with <code>!</code>
+# and defines aliases for builtin public methods by adding a <code>!</code>:
+#
+# o = OpenStruct.new(make: 'Bentley', class: :luxury)
+# o.class # => :luxury
+# o.class! # => OpenStruct
+#
+# It is recommended (but not enforced) to not use fields ending in <code>!</code>;
+# Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods
+# ending with <code>!</code>.
+#
+# For all these reasons, consider not using OpenStruct at all.
#
-
-require_relative 'ostruct/version'
-
class OpenStruct
+ VERSION = "0.5.5"
#
# Creates a new OpenStruct object. By default, the resulting OpenStruct
@@ -92,19 +124,29 @@ class OpenStruct
# data # => #<OpenStruct country="Australia", capital="Canberra">
#
def initialize(hash=nil)
- @table = {}
if hash
- hash.each_pair do |k, v|
- k = k.to_sym
- @table[k] = v
- end
+ update_to_values!(hash)
+ else
+ @table = {}
end
end
# Duplicates an OpenStruct object's Hash table.
- def initialize_copy(orig) # :nodoc:
+ private def initialize_clone(orig) # :nodoc:
+ super # clones the singleton class for us
+ @table = @table.dup unless @table.frozen?
+ end
+
+ private def initialize_dup(orig) # :nodoc:
super
- @table = @table.dup
+ update_to_values!(@table)
+ end
+
+ private def update_to_values!(hash) # :nodoc:
+ @table = {}
+ hash.each_pair do |k, v|
+ set_ostruct_member_value!(k, v)
+ end
end
#
@@ -124,11 +166,21 @@ class OpenStruct
# data.to_h {|name, value| [name.to_s, value.upcase] }
# # => {"country" => "AUSTRALIA", "capital" => "CANBERRA" }
#
- def to_h(&block)
- if block_given?
- @table.to_h(&block)
- else
- @table.dup
+ if {test: :to_h}.to_h{ [:works, true] }[:works] # RUBY_VERSION < 2.6 compatibility
+ def to_h(&block)
+ if block
+ @table.to_h(&block)
+ else
+ @table.dup
+ end
+ end
+ else
+ def to_h(&block)
+ if block
+ @table.map(&block).to_h
+ else
+ @table.dup
+ end
end
end
@@ -145,7 +197,7 @@ class OpenStruct
# data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]]
#
def each_pair
- return to_enum(__method__) { @table.size } unless block_given?
+ return to_enum(__method__) { @table.size } unless defined?(yield)
@table.each_pair{|p| yield p}
self
end
@@ -153,31 +205,14 @@ class OpenStruct
#
# Provides marshalling support for use by the Marshal library.
#
- def marshal_dump
+ def marshal_dump # :nodoc:
@table
end
#
# Provides marshalling support for use by the Marshal library.
#
- def marshal_load(x)
- @table = x
- end
-
- #
- # Used internally to check if the OpenStruct is able to be
- # modified before granting access to the internal Hash table to be modified.
- #
- def modifiable? # :nodoc:
- begin
- @modifiable = true
- rescue
- exception_class = defined?(FrozenError) ? FrozenError : RuntimeError
- raise exception_class, "can't modify frozen #{self.class}", caller(3)
- end
- @table
- end
- private :modifiable?
+ alias_method :marshal_load, :update_to_values! # :nodoc:
#
# Used internally to defined properties on the
@@ -185,45 +220,60 @@ class OpenStruct
# define_singleton_method for both the getter method and the setter method.
#
def new_ostruct_member!(name) # :nodoc:
- name = name.to_sym
- unless singleton_class.method_defined?(name)
- define_singleton_method(name) { @table[name] }
- define_singleton_method("#{name}=") {|x| modifiable?[name] = x}
+ unless @table.key?(name) || is_method_protected!(name)
+ if defined?(::Ractor)
+ getter_proc = nil.instance_eval{ Proc.new { @table[name] } }
+ setter_proc = nil.instance_eval{ Proc.new {|x| @table[name] = x} }
+ ::Ractor.make_shareable(getter_proc)
+ ::Ractor.make_shareable(setter_proc)
+ else
+ getter_proc = Proc.new { @table[name] }
+ setter_proc = Proc.new {|x| @table[name] = x}
+ end
+ define_singleton_method!(name, &getter_proc)
+ define_singleton_method!("#{name}=", &setter_proc)
end
- name
end
private :new_ostruct_member!
- def freeze
- @table.each_key {|key| new_ostruct_member!(key)}
- super
+ private def is_method_protected!(name) # :nodoc:
+ if !respond_to?(name, true)
+ false
+ elsif name.match?(/!$/)
+ true
+ else
+ owner = method!(name).owner
+ if owner.class == ::Class
+ owner < ::OpenStruct
+ else
+ self.class!.ancestors.any? do |mod|
+ return false if mod == ::OpenStruct
+ mod == owner
+ end
+ end
+ end
end
- def respond_to_missing?(mid, include_private = false) # :nodoc:
- mname = mid.to_s.chomp("=").to_sym
- defined?(@table) && @table.key?(mname) || super
+ def freeze
+ @table.freeze
+ super
end
- def method_missing(mid, *args) # :nodoc:
+ private def method_missing(mid, *args) # :nodoc:
len = args.length
if mname = mid[/.*(?==\z)/m]
if len != 1
- raise ArgumentError, "wrong number of arguments (given #{len}, expected 1)", caller(1)
+ raise! ArgumentError, "wrong number of arguments (given #{len}, expected 1)", caller(1)
end
- modifiable?[new_ostruct_member!(mname)] = args[0]
- elsif len == 0 # and /\A[a-z_]\w*\z/ =~ mid #
- if @table.key?(mid)
- new_ostruct_member!(mid) unless frozen?
- @table[mid]
- end
- elsif @table.key?(mid)
- raise ArgumentError, "wrong number of arguments (given #{len}, expected 0)"
+ set_ostruct_member_value!(mname, args[0])
+ elsif len == 0
+ @table[mid]
else
begin
super
rescue NoMethodError => err
err.backtrace.shift
- raise
+ raise!
end
end
end
@@ -232,7 +282,7 @@ class OpenStruct
# :call-seq:
# ostruct[name] -> object
#
- # Returns the value of an attribute.
+ # Returns the value of an attribute, or +nil+ if there is no such attribute.
#
# require "ostruct"
# person = OpenStruct.new("name" => "John Smith", "age" => 70)
@@ -254,47 +304,47 @@ class OpenStruct
# person.age # => 42
#
def []=(name, value)
- modifiable?[new_ostruct_member!(name)] = value
+ name = name.to_sym
+ new_ostruct_member!(name)
+ @table[name] = value
end
+ alias_method :set_ostruct_member_value!, :[]=
+ private :set_ostruct_member_value!
- #
# :call-seq:
- # ostruct.dig(name, ...) -> object
+ # ostruct.dig(name, *identifiers) -> object
#
- # Extracts the nested value specified by the sequence of +name+
- # objects by calling +dig+ at each step, returning +nil+ if any
- # intermediate step is +nil+.
+ # Finds and returns the object in nested objects
+ # that is specified by +name+ and +identifiers+.
+ # The nested objects may be instances of various classes.
+ # See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
#
+ # Examples:
# require "ostruct"
# address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345)
# person = OpenStruct.new("name" => "John Smith", "address" => address)
- #
- # person.dig(:address, "zip") # => 12345
- # person.dig(:business_address, "zip") # => nil
- #
- # data = OpenStruct.new(:array => [1, [2, 3]])
- #
- # data.dig(:array, 1, 0) # => 2
- # data.dig(:array, 0, 0) # TypeError: Integer does not have #dig method
- #
+ # person.dig(:address, "zip") # => 12345
+ # person.dig(:business_address, "zip") # => nil
def dig(name, *names)
begin
name = name.to_sym
rescue NoMethodError
- raise TypeError, "#{name} is not a symbol nor a string"
+ raise! TypeError, "#{name} is not a symbol nor a string"
end
@table.dig(name, *names)
end
#
- # Removes the named field from the object. Returns the value that the field
- # contained if it was defined.
+ # Removes the named field from the object and returns the value the field
+ # contained if it was defined. You may optionally provide a block.
+ # If the field is not defined, the result of the block is returned,
+ # or a NameError is raised if no block was given.
#
# require "ostruct"
#
# person = OpenStruct.new(name: "John", age: 70, pension: 300)
#
- # person.delete_field("age") # => 70
+ # person.delete_field!("age") # => 70
# person # => #<OpenStruct name="John", pension=300>
#
# Setting the value to +nil+ will not remove the attribute:
@@ -302,14 +352,19 @@ class OpenStruct
# person.pension = nil
# person # => #<OpenStruct name="John", pension=nil>
#
- def delete_field(name)
+ # person.delete_field('number') # => NameError
+ #
+ # person.delete_field('number') { 8675_309 } # => 8675309
+ #
+ def delete_field(name, &block)
sym = name.to_sym
begin
singleton_class.remove_method(sym, "#{sym}=")
rescue NameError
end
@table.delete(sym) do
- raise NameError.new("no field `#{sym}' in #{self}", sym)
+ return yield if block
+ raise! NameError.new("no field `#{sym}' in #{self}", sym)
end
end
@@ -332,13 +387,13 @@ class OpenStruct
ids.pop
end
end
- ['#<', self.class, detail, '>'].join
+ ['#<', self.class!, detail, '>'].join
end
alias :to_s :inspect
attr_reader :table # :nodoc:
- protected :table
alias table! table
+ protected :table!
#
# Compares this object and +other+ for equality. An OpenStruct is equal to
@@ -369,11 +424,54 @@ class OpenStruct
end
# Computes a hash code for this OpenStruct.
- # Two OpenStruct objects with the same content will have the same hash code
- # (and will compare using #eql?).
- #
- # See also Object#hash.
- def hash
+ def hash # :nodoc:
@table.hash
end
+
+ #
+ # Provides marshalling support for use by the YAML library.
+ #
+ def encode_with(coder) # :nodoc:
+ @table.each_pair do |key, value|
+ coder[key.to_s] = value
+ end
+ if @table.size == 1 && @table.key?(:table) # support for legacy format
+ # in the very unlikely case of a single entry called 'table'
+ coder['legacy_support!'] = true # add a bogus second entry
+ end
+ end
+
+ #
+ # Provides marshalling support for use by the YAML library.
+ #
+ def init_with(coder) # :nodoc:
+ h = coder.map
+ if h.size == 1 # support for legacy format
+ key, val = h.first
+ if key == 'table'
+ h = val
+ end
+ end
+ update_to_values!(h)
+ end
+
+ # Make all public methods (builtin or our own) accessible with <code>!</code>:
+ give_access = instance_methods
+ # See https://github.com/ruby/ostruct/issues/30
+ give_access -= %i[instance_exec instance_eval eval] if RUBY_ENGINE == 'jruby'
+ give_access.each do |method|
+ next if method.match(/\W$/)
+
+ new_name = "#{method}!"
+ alias_method new_name, method
+ end
+ # Other builtin private methods we use:
+ alias_method :raise!, :raise
+ private :raise!
+
+ # See https://github.com/ruby/ostruct/issues/40
+ if RUBY_ENGINE != 'jruby'
+ alias_method :block_given!, :block_given?
+ private :block_given!
+ end
end
diff --git a/lib/ostruct/ostruct.gemspec b/lib/ostruct/ostruct.gemspec
index 4f8507045e..31ecc312c3 100644
--- a/lib/ostruct/ostruct.gemspec
+++ b/lib/ostruct/ostruct.gemspec
@@ -1,26 +1,25 @@
# frozen_string_literal: true
-begin
- require_relative "lib/ostruct/version"
-rescue LoadError
- # for Ruby core repository
- require_relative "version"
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "ostruct"
- spec.version = OpenStruct::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Marc-Andre Lafortune"]
spec.email = ["ruby-core@marc-andre.ca"]
spec.summary = %q{Class to build custom data structures, similar to a Hash.}
spec.description = %q{Class to build custom data structures, similar to a Hash.}
spec.homepage = "https://github.com/ruby/ostruct"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+ spec.required_ruby_version = ">= 2.5.0"
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "lib/ostruct/version.rb", "ostruct.gemspec"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.files = [".gitignore", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "ostruct.gemspec"]
spec.require_paths = ["lib"]
spec.add_development_dependency "bundler"
diff --git a/lib/ostruct/version.rb b/lib/ostruct/version.rb
deleted file mode 100644
index 91a4044094..0000000000
--- a/lib/ostruct/version.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: true
-
-class OpenStruct
- VERSION = "0.2.0"
-end
diff --git a/lib/pp.gemspec b/lib/pp.gemspec
new file mode 100644
index 0000000000..3f08f400c4
--- /dev/null
+++ b/lib/pp.gemspec
@@ -0,0 +1,27 @@
+Gem::Specification.new do |spec|
+ spec.name = "pp"
+ spec.version = "0.4.0"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{Provides a PrettyPrinter for Ruby objects}
+ spec.description = %q{Provides a PrettyPrinter for Ruby objects}
+ spec.homepage = "https://github.com/ruby/pp"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = %w[
+ LICENSE.txt
+ lib/pp.rb
+ pp.gemspec
+ ]
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "prettyprint"
+end
diff --git a/lib/pp.rb b/lib/pp.rb
index 81a9a1629c..81551aa116 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -61,14 +61,34 @@ require 'prettyprint'
# Tanaka Akira <akr@fsij.org>
class PP < PrettyPrint
+ # Returns the usable width for +out+.
+ # As the width of +out+:
+ # 1. If +out+ is assigned to a tty device, its width is used.
+ # 2. Otherwise, or it could not get the value, the +COLUMN+
+ # environment variable is assumed to be set to the width.
+ # 3. If +COLUMN+ is not set to a non-zero number, 80 is assumed.
+ #
+ # And finally, returns the above width value - 1.
+ # * This -1 is for Windows command prompt, which moves the cursor to
+ # the next line if it reaches the last column.
+ def PP.width_for(out)
+ begin
+ require 'io/console'
+ _, width = out.winsize
+ rescue LoadError, NoMethodError, SystemCallError
+ end
+ (width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1
+ end
+
# Outputs +obj+ to +out+ in pretty printed format of
# +width+ columns in width.
#
# If +out+ is omitted, <code>$></code> is assumed.
- # If +width+ is omitted, 79 is assumed.
+ # If +width+ is omitted, the width of +out+ is assumed (see
+ # width_for).
#
# PP.pp returns +out+.
- def PP.pp(obj, out=$>, width=79)
+ def PP.pp(obj, out=$>, width=width_for(out))
q = PP.new(out, width)
q.guard_inspect_key {q.pp obj}
q.flush
@@ -93,11 +113,25 @@ class PP < PrettyPrint
end
# :startdoc:
- @sharing_detection = false
- class << self
- # Returns the sharing detection flag as a boolean value.
- # It is false by default.
- attr_accessor :sharing_detection
+ if defined? ::Ractor
+ class << self
+ # Returns the sharing detection flag as a boolean value.
+ # It is false (nil) by default.
+ def sharing_detection
+ Ractor.current[:pp_sharing_detection]
+ end
+ # Sets the sharing detection flag to b.
+ def sharing_detection=(b)
+ Ractor.current[:pp_sharing_detection] = b
+ end
+ end
+ else
+ @sharing_detection = false
+ class << self
+ # Returns the sharing detection flag as a boolean value.
+ # It is false by default.
+ attr_accessor :sharing_detection
+ end
end
module PPMethods
@@ -223,7 +257,7 @@ class PP < PrettyPrint
else
sep.call
end
- yield(*v)
+ RUBY_VERSION >= "3.0" ? yield(*v, **{}) : yield(*v)
}
end
@@ -382,6 +416,26 @@ class Struct # :nodoc:
end
end
+class Data # :nodoc:
+ def pretty_print(q) # :nodoc:
+ q.group(1, sprintf("#<data %s", PP.mcall(self, Kernel, :class).name), '>') {
+ q.seplist(PP.mcall(self, Data, :members), lambda { q.text "," }) {|member|
+ q.breakable
+ q.text member.to_s
+ q.text '='
+ q.group(1) {
+ q.breakable ''
+ q.pp public_send(member)
+ }
+ }
+ }
+ end
+
+ def pretty_print_cycle(q) # :nodoc:
+ q.text sprintf("#<data %s:...>", PP.mcall(self, Kernel, :class).name)
+ end
+end if "3.2" <= RUBY_VERSION
+
class Range # :nodoc:
def pretty_print(q) # :nodoc:
q.pp self.begin
@@ -410,7 +464,7 @@ end
class File < IO # :nodoc:
class Stat # :nodoc:
def pretty_print(q) # :nodoc:
- require 'etc.so'
+ require 'etc'
q.object_group(self) {
q.breakable
q.text sprintf("dev=0x%x", self.dev); q.comma_breakable
@@ -516,37 +570,39 @@ class MatchData # :nodoc:
end
end
-class RubyVM::AbstractSyntaxTree::Node
- def pretty_print_children(q, names = [])
- children.zip(names) do |c, n|
- if n
- q.breakable
- q.text "#{n}:"
- end
- q.group(2) do
- q.breakable
- q.pp c
+if defined?(RubyVM::AbstractSyntaxTree)
+ class RubyVM::AbstractSyntaxTree::Node
+ def pretty_print_children(q, names = [])
+ children.zip(names) do |c, n|
+ if n
+ q.breakable
+ q.text "#{n}:"
+ end
+ q.group(2) do
+ q.breakable
+ q.pp c
+ end
end
end
- end
- def pretty_print(q)
- q.group(1, "(#{type}@#{first_lineno}:#{first_column}-#{last_lineno}:#{last_column}", ")") {
- case type
- when :SCOPE
- pretty_print_children(q, %w"tbl args body")
- when :ARGS
- pretty_print_children(q, %w[pre_num pre_init opt first_post post_num post_init rest kw kwrest block])
- when :DEFN
- pretty_print_children(q, %w[mid body])
- when :ARYPTN
- pretty_print_children(q, %w[const pre rest post])
- when :HSHPTN
- pretty_print_children(q, %w[const kw kwrest])
- else
- pretty_print_children(q)
- end
- }
+ def pretty_print(q)
+ q.group(1, "(#{type}@#{first_lineno}:#{first_column}-#{last_lineno}:#{last_column}", ")") {
+ case type
+ when :SCOPE
+ pretty_print_children(q, %w"tbl args body")
+ when :ARGS
+ pretty_print_children(q, %w[pre_num pre_init opt first_post post_num post_init rest kw kwrest block])
+ when :DEFN
+ pretty_print_children(q, %w[mid body])
+ when :ARYPTN
+ pretty_print_children(q, %w[const pre rest post])
+ when :HSHPTN
+ pretty_print_children(q, %w[const kw kwrest])
+ else
+ pretty_print_children(q)
+ end
+ }
+ end
end
end
diff --git a/lib/prettyprint.gemspec b/lib/prettyprint.gemspec
new file mode 100644
index 0000000000..eae2227d60
--- /dev/null
+++ b/lib/prettyprint.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "prettyprint"
+ spec.version = "0.1.1"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{Implements a pretty printing algorithm for readable structure.}
+ spec.description = %q{Implements a pretty printing algorithm for readable structure.}
+ spec.homepage = "https://github.com/ruby/prettyprint"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/prettyprint.rb b/lib/prettyprint.rb
index 2a3ca90dc1..188c2e6db0 100644
--- a/lib/prettyprint.rb
+++ b/lib/prettyprint.rb
@@ -102,7 +102,7 @@ class PrettyPrint
# The maximum width of a line, before it is separated in to a newline
#
- # This defaults to 79, and should be a Fixnum
+ # This defaults to 79, and should be an Integer
attr_reader :maxwidth
# The value that is appended to +output+ to add a new line.
@@ -110,7 +110,7 @@ class PrettyPrint
# This defaults to "\n", and should be String
attr_reader :newline
- # A lambda or Proc, that takes one argument, of a Fixnum, and returns
+ # A lambda or Proc, that takes one argument, of an Integer, and returns
# the corresponding number of spaces.
#
# By default this is:
@@ -340,7 +340,7 @@ class PrettyPrint
#
# Arguments:
# * +sep+ String of the separator
- # * +width+ Fixnum width of the +sep+
+ # * +width+ Integer width of the +sep+
# * +q+ parent PrettyPrint object, to base from
def initialize(sep, width, q)
@obj = sep
diff --git a/lib/prime.gemspec b/lib/prime.gemspec
deleted file mode 100644
index 6a9aa683e6..0000000000
--- a/lib/prime.gemspec
+++ /dev/null
@@ -1,27 +0,0 @@
-begin
- require_relative "lib/prime"
-rescue LoadError
- # for Ruby core repository
- require_relative "prime"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "prime"
- spec.version = Prime::VERSION
- spec.authors = ["Yuki Sonoda"]
- spec.email = ["yugui@yugui.jp"]
-
- spec.summary = %q{Prime numbers and factorization library.}
- spec.description = %q{Prime numbers and factorization library.}
- spec.homepage = "https://github.com/ruby/prime"
- spec.license = "BSD-2-Clause"
-
- spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/prime.rb", "lib/prime/version.rb", "prime.gemspec"]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "test-unit"
-end
diff --git a/lib/prime.rb b/lib/prime.rb
deleted file mode 100644
index 5be12f24f5..0000000000
--- a/lib/prime.rb
+++ /dev/null
@@ -1,463 +0,0 @@
-# frozen_string_literal: false
-#
-# = prime.rb
-#
-# Prime numbers and factorization library.
-#
-# Copyright::
-# Copyright (c) 1998-2008 Keiju ISHITSUKA(SHL Japan Inc.)
-# Copyright (c) 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-#
-# Documentation::
-# Yuki Sonoda
-#
-
-require "singleton"
-require "forwardable"
-
-class Integer
- # Re-composes a prime factorization and returns the product.
- #
- # See Prime#int_from_prime_division for more details.
- def Integer.from_prime_division(pd)
- Prime.int_from_prime_division(pd)
- end
-
- # Returns the factorization of +self+.
- #
- # See Prime#prime_division for more details.
- def prime_division(generator = Prime::Generator23.new)
- Prime.prime_division(self, generator)
- end
-
- # Returns true if +self+ is a prime number, else returns false.
- def prime?
- return self >= 2 if self <= 3
- return true if self == 5
- return false unless 30.gcd(self) == 1
- (7..Integer.sqrt(self)).step(30) do |p|
- return false if
- self%(p) == 0 || self%(p+4) == 0 || self%(p+6) == 0 || self%(p+10) == 0 ||
- self%(p+12) == 0 || self%(p+16) == 0 || self%(p+22) == 0 || self%(p+24) == 0
- end
- true
- end
-
- # Iterates the given block over all prime numbers.
- #
- # See +Prime+#each for more details.
- def Integer.each_prime(ubound, &block) # :yields: prime
- Prime.each(ubound, &block)
- end
-end
-
-#
-# The set of all prime numbers.
-#
-# == Example
-#
-# Prime.each(100) do |prime|
-# p prime #=> 2, 3, 5, 7, 11, ...., 97
-# end
-#
-# Prime is Enumerable:
-#
-# Prime.first 5 # => [2, 3, 5, 7, 11]
-#
-# == Retrieving the instance
-#
-# For convenience, each instance method of +Prime+.instance can be accessed
-# as a class method of +Prime+.
-#
-# e.g.
-# Prime.instance.prime?(2) #=> true
-# Prime.prime?(2) #=> true
-#
-# == Generators
-#
-# A "generator" provides an implementation of enumerating pseudo-prime
-# numbers and it remembers the position of enumeration and upper bound.
-# Furthermore, it is an external iterator of prime enumeration which is
-# compatible with an Enumerator.
-#
-# +Prime+::+PseudoPrimeGenerator+ is the base class for generators.
-# There are few implementations of generator.
-#
-# [+Prime+::+EratosthenesGenerator+]
-# Uses eratosthenes' sieve.
-# [+Prime+::+TrialDivisionGenerator+]
-# Uses the trial division method.
-# [+Prime+::+Generator23+]
-# Generates all positive integers which are not divisible by either 2 or 3.
-# This sequence is very bad as a pseudo-prime sequence. But this
-# is faster and uses much less memory than the other generators. So,
-# it is suitable for factorizing an integer which is not large but
-# has many prime factors. e.g. for Prime#prime? .
-
-class Prime
-
- VERSION = "0.1.1"
-
- include Enumerable
- include Singleton
-
- class << self
- extend Forwardable
- include Enumerable
-
- def method_added(method) # :nodoc:
- (class<< self;self;end).def_delegator :instance, method
- end
- end
-
- # Iterates the given block over all prime numbers.
- #
- # == Parameters
- #
- # +ubound+::
- # Optional. An arbitrary positive number.
- # The upper bound of enumeration. The method enumerates
- # prime numbers infinitely if +ubound+ is nil.
- # +generator+::
- # Optional. An implementation of pseudo-prime generator.
- #
- # == Return value
- #
- # An evaluated value of the given block at the last time.
- # Or an enumerator which is compatible to an +Enumerator+
- # if no block given.
- #
- # == Description
- #
- # Calls +block+ once for each prime number, passing the prime as
- # a parameter.
- #
- # +ubound+::
- # Upper bound of prime numbers. The iterator stops after it
- # yields all prime numbers p <= +ubound+.
- #
- def each(ubound = nil, generator = EratosthenesGenerator.new, &block)
- generator.upper_bound = ubound
- generator.each(&block)
- end
-
-
- # Returns true if +value+ is a prime number, else returns false.
- #
- # == Parameters
- #
- # +value+:: an arbitrary integer to be checked.
- # +generator+:: optional. A pseudo-prime generator.
- def prime?(value, generator = Prime::Generator23.new)
- raise ArgumentError, "Expected a prime generator, got #{generator}" unless generator.respond_to? :each
- raise ArgumentError, "Expected an integer, got #{value}" unless value.respond_to?(:integer?) && value.integer?
- return false if value < 2
- generator.each do |num|
- q,r = value.divmod num
- return true if q < num
- return false if r == 0
- end
- end
-
- # Re-composes a prime factorization and returns the product.
- #
- # == Parameters
- # +pd+:: Array of pairs of integers. The each internal
- # pair consists of a prime number -- a prime factor --
- # and a natural number -- an exponent.
- #
- # == Example
- # For <tt>[[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]]</tt>, it returns:
- #
- # p_1**e_1 * p_2**e_2 * .... * p_n**e_n.
- #
- # Prime.int_from_prime_division([[2,2], [3,1]]) #=> 12
- def int_from_prime_division(pd)
- pd.inject(1){|value, (prime, index)|
- value * prime**index
- }
- end
-
- # Returns the factorization of +value+.
- #
- # == Parameters
- # +value+:: An arbitrary integer.
- # +generator+:: Optional. A pseudo-prime generator.
- # +generator+.succ must return the next
- # pseudo-prime number in the ascending
- # order. It must generate all prime numbers,
- # but may also generate non prime numbers too.
- #
- # === Exceptions
- # +ZeroDivisionError+:: when +value+ is zero.
- #
- # == Example
- # For an arbitrary integer:
- #
- # n = p_1**e_1 * p_2**e_2 * .... * p_n**e_n,
- #
- # prime_division(n) returns:
- #
- # [[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]].
- #
- # Prime.prime_division(12) #=> [[2,2], [3,1]]
- #
- def prime_division(value, generator = Prime::Generator23.new)
- raise ZeroDivisionError if value == 0
- if value < 0
- value = -value
- pv = [[-1, 1]]
- else
- pv = []
- end
- generator.each do |prime|
- count = 0
- while (value1, mod = value.divmod(prime)
- mod) == 0
- value = value1
- count += 1
- end
- if count != 0
- pv.push [prime, count]
- end
- break if value1 <= prime
- end
- if value > 1
- pv.push [value, 1]
- end
- pv
- end
-
- # An abstract class for enumerating pseudo-prime numbers.
- #
- # Concrete subclasses should override succ, next, rewind.
- class PseudoPrimeGenerator
- include Enumerable
-
- def initialize(ubound = nil)
- @ubound = ubound
- end
-
- def upper_bound=(ubound)
- @ubound = ubound
- end
- def upper_bound
- @ubound
- end
-
- # returns the next pseudo-prime number, and move the internal
- # position forward.
- #
- # +PseudoPrimeGenerator+#succ raises +NotImplementedError+.
- def succ
- raise NotImplementedError, "need to define `succ'"
- end
-
- # alias of +succ+.
- def next
- raise NotImplementedError, "need to define `next'"
- end
-
- # Rewinds the internal position for enumeration.
- #
- # See +Enumerator+#rewind.
- def rewind
- raise NotImplementedError, "need to define `rewind'"
- end
-
- # Iterates the given block for each prime number.
- def each
- return self.dup unless block_given?
- if @ubound
- last_value = nil
- loop do
- prime = succ
- break last_value if prime > @ubound
- last_value = yield prime
- end
- else
- loop do
- yield succ
- end
- end
- end
-
- # see +Enumerator+#with_index.
- def with_index(offset = 0, &block)
- return enum_for(:with_index, offset) { Float::INFINITY } unless block
- return each_with_index(&block) if offset == 0
-
- each do |prime|
- yield prime, offset
- offset += 1
- end
- end
-
- # see +Enumerator+#with_object.
- def with_object(obj)
- return enum_for(:with_object, obj) { Float::INFINITY } unless block_given?
- each do |prime|
- yield prime, obj
- end
- end
-
- def size
- Float::INFINITY
- end
- end
-
- # An implementation of +PseudoPrimeGenerator+.
- #
- # Uses +EratosthenesSieve+.
- class EratosthenesGenerator < PseudoPrimeGenerator
- def initialize
- @last_prime_index = -1
- super
- end
-
- def succ
- @last_prime_index += 1
- EratosthenesSieve.instance.get_nth_prime(@last_prime_index)
- end
- def rewind
- initialize
- end
- alias next succ
- end
-
- # An implementation of +PseudoPrimeGenerator+ which uses
- # a prime table generated by trial division.
- class TrialDivisionGenerator < PseudoPrimeGenerator
- def initialize
- @index = -1
- super
- end
-
- def succ
- TrialDivision.instance[@index += 1]
- end
- def rewind
- initialize
- end
- alias next succ
- end
-
- # Generates all integers which are greater than 2 and
- # are not divisible by either 2 or 3.
- #
- # This is a pseudo-prime generator, suitable on
- # checking primality of an integer by brute force
- # method.
- class Generator23 < PseudoPrimeGenerator
- def initialize
- @prime = 1
- @step = nil
- super
- end
-
- def succ
- if (@step)
- @prime += @step
- @step = 6 - @step
- else
- case @prime
- when 1; @prime = 2
- when 2; @prime = 3
- when 3; @prime = 5; @step = 2
- end
- end
- @prime
- end
- alias next succ
- def rewind
- initialize
- end
- end
-
- # Internal use. An implementation of prime table by trial division method.
- class TrialDivision
- include Singleton
-
- def initialize # :nodoc:
- # These are included as class variables to cache them for later uses. If memory
- # usage is a problem, they can be put in Prime#initialize as instance variables.
-
- # There must be no primes between @primes[-1] and @next_to_check.
- @primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
- # @next_to_check % 6 must be 1.
- @next_to_check = 103 # @primes[-1] - @primes[-1] % 6 + 7
- @ulticheck_index = 3 # @primes.index(@primes.reverse.find {|n|
- # n < Math.sqrt(@@next_to_check) })
- @ulticheck_next_squared = 121 # @primes[@ulticheck_index + 1] ** 2
- end
-
- # Returns the +index+th prime number.
- #
- # +index+ is a 0-based index.
- def [](index)
- while index >= @primes.length
- # Only check for prime factors up to the square root of the potential primes,
- # but without the performance hit of an actual square root calculation.
- if @next_to_check + 4 > @ulticheck_next_squared
- @ulticheck_index += 1
- @ulticheck_next_squared = @primes.at(@ulticheck_index + 1) ** 2
- end
- # Only check numbers congruent to one and five, modulo six. All others
-
- # are divisible by two or three. This also allows us to skip checking against
- # two and three.
- @primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil?
- @next_to_check += 4
- @primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil?
- @next_to_check += 2
- end
- @primes[index]
- end
- end
-
- # Internal use. An implementation of Eratosthenes' sieve
- class EratosthenesSieve
- include Singleton
-
- def initialize
- @primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
- # @max_checked must be an even number
- @max_checked = @primes.last + 1
- end
-
- def get_nth_prime(n)
- compute_primes while @primes.size <= n
- @primes[n]
- end
-
- private
- def compute_primes
- # max_segment_size must be an even number
- max_segment_size = 1e6.to_i
- max_cached_prime = @primes.last
- # do not double count primes if #compute_primes is interrupted
- # by Timeout.timeout
- @max_checked = max_cached_prime + 1 if max_cached_prime > @max_checked
-
- segment_min = @max_checked
- segment_max = [segment_min + max_segment_size, max_cached_prime * 2].min
- root = Integer.sqrt(segment_max)
-
- segment = ((segment_min + 1) .. segment_max).step(2).to_a
-
- (1..Float::INFINITY).each do |sieving|
- prime = @primes[sieving]
- break if prime > root
- composite_index = (-(segment_min + 1 + prime) / 2) % prime
- while composite_index < segment.size do
- segment[composite_index] = nil
- composite_index += prime
- end
- end
-
- @primes.concat(segment.compact!)
-
- @max_checked = segment_max
- end
- end
-end
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 1180fd50a0..72deaa1017 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -10,88 +10,324 @@
require "digest"
-#
-# PStore implements a file based persistence mechanism based on a Hash. User
-# code can store hierarchies of Ruby objects (values) into the data store file
-# by name (keys). An object hierarchy may be just a single object. User code
-# may later read values back from the data store or even update data, as needed.
+# \PStore implements a file based persistence mechanism based on a Hash.
+# User code can store hierarchies of Ruby objects (values)
+# into the data store by name (keys).
+# An object hierarchy may be just a single object.
+# User code may later read values back from the data store
+# or even update data, as needed.
#
# The transactional behavior ensures that any changes succeed or fail together.
-# This can be used to ensure that the data store is not left in a transitory
-# state, where some values were updated but others were not.
+# This can be used to ensure that the data store is not left in a transitory state,
+# where some values were updated but others were not.
+#
+# Behind the scenes, Ruby objects are stored to the data store file with Marshal.
+# That carries the usual limitations. Proc objects cannot be marshalled,
+# for example.
+#
+# There are three important concepts here (details at the links):
+#
+# - {Store}[rdoc-ref:PStore@The+Store]: a store is an instance of \PStore.
+# - {Entries}[rdoc-ref:PStore@Entries]: the store is hash-like;
+# each entry is the key for a stored object.
+# - {Transactions}[rdoc-ref:PStore@Transactions]: each transaction is a collection
+# of prospective changes to the store;
+# a transaction is defined in the block given with a call
+# to PStore#transaction.
+#
+# == About the Examples
+#
+# Examples on this page need a store that has known properties.
+# They can get a new (and populated) store by calling thus:
+#
+# example_store do |store|
+# # Example code using store goes here.
+# end
+#
+# All we really need to know about +example_store+
+# is that it yields a fresh store with a known population of entries;
+# its implementation:
+#
+# require 'pstore'
+# require 'tempfile'
+# # Yield a pristine store for use in examples.
+# def example_store
+# # Create the store in a temporary file.
+# Tempfile.create do |file|
+# store = PStore.new(file)
+# # Populate the store.
+# store.transaction do
+# store[:foo] = 0
+# store[:bar] = 1
+# store[:baz] = 2
+# end
+# yield store
+# end
+# end
+#
+# == The Store
+#
+# The contents of the store are maintained in a file whose path is specified
+# when the store is created (see PStore.new).
+# The objects are stored and retrieved using
+# module Marshal, which means that certain objects cannot be added to the store;
+# see {Marshal::dump}[rdoc-ref:Marshal.dump].
+#
+# == Entries
+#
+# A store may have any number of entries.
+# Each entry has a key and a value, just as in a hash:
+#
+# - Key: as in a hash, the key can be (almost) any object;
+# see {Hash Keys}[rdoc-ref:Hash@Hash+Keys].
+# You may find it convenient to keep it simple by using only
+# symbols or strings as keys.
+# - Value: the value may be any object that can be marshalled by \Marshal
+# (see {Marshal::dump}[rdoc-ref:Marshal.dump])
+# and in fact may be a collection
+# (e.g., an array, a hash, a set, a range, etc).
+# That collection may in turn contain nested objects,
+# including collections, to any depth;
+# those objects must also be \Marshal-able.
+# See {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
+#
+# == Transactions
+#
+# === The Transaction Block
+#
+# The block given with a call to method #transaction#
+# contains a _transaction_,
+# which consists of calls to \PStore methods that
+# read from or write to the store
+# (that is, all \PStore methods except #transaction itself,
+# #path, and Pstore.new):
+#
+# example_store do |store|
+# store.transaction do
+# store.keys # => [:foo, :bar, :baz]
+# store[:bat] = 3
+# store.keys # => [:foo, :bar, :baz, :bat]
+# end
+# end
+#
+# Execution of the transaction is deferred until the block exits,
+# and is executed _atomically_ (all-or-nothing):
+# either all transaction calls are executed, or none are.
+# This maintains the integrity of the store.
+#
+# Other code in the block (including even calls to #path and PStore.new)
+# is executed immediately, not deferred.
+#
+# The transaction block:
+#
+# - May not contain a nested call to #transaction.
+# - Is the only context where methods that read from or write to
+# the store are allowed.
+#
+# As seen above, changes in a transaction are made automatically
+# when the block exits.
+# The block may be exited early by calling method #commit or #abort.
+#
+# - Method #commit triggers the update to the store and exits the block:
+#
+# example_store do |store|
+# store.transaction do
+# store.keys # => [:foo, :bar, :baz]
+# store[:bat] = 3
+# store.commit
+# fail 'Cannot get here'
+# end
+# store.transaction do
+# # Update was completed.
+# store.keys # => [:foo, :bar, :baz, :bat]
+# end
+# end
+#
+# - Method #abort discards the update to the store and exits the block:
+#
+# example_store do |store|
+# store.transaction do
+# store.keys # => [:foo, :bar, :baz]
+# store[:bat] = 3
+# store.abort
+# fail 'Cannot get here'
+# end
+# store.transaction do
+# # Update was not completed.
+# store.keys # => [:foo, :bar, :baz]
+# end
+# end
+#
+# === Read-Only Transactions
+#
+# By default, a transaction allows both reading from and writing to
+# the store:
+#
+# store.transaction do
+# # Read-write transaction.
+# # Any code except a call to #transaction is allowed here.
+# end
+#
+# If argument +read_only+ is passed as +true+,
+# only reading is allowed:
+#
+# store.transaction(true) do
+# # Read-only transaction:
+# # Calls to #transaction, #[]=, and #delete are not allowed here.
+# end
+#
+# == Hierarchical Values
+#
+# The value for an entry may be a simple object (as seen above).
+# It may also be a hierarchy of objects nested to any depth:
+#
+# deep_store = PStore.new('deep.store')
+# deep_store.transaction do
+# array_of_hashes = [{}, {}, {}]
+# deep_store[:array_of_hashes] = array_of_hashes
+# deep_store[:array_of_hashes] # => [{}, {}, {}]
+# hash_of_arrays = {foo: [], bar: [], baz: []}
+# deep_store[:hash_of_arrays] = hash_of_arrays
+# deep_store[:hash_of_arrays] # => {:foo=>[], :bar=>[], :baz=>[]}
+# deep_store[:hash_of_arrays][:foo].push(:bat)
+# deep_store[:hash_of_arrays] # => {:foo=>[:bat], :bar=>[], :baz=>[]}
+# end
+#
+# And recall that you can use
+# {dig methods}[rdoc-ref:dig_methods.rdoc]
+# in a returned hierarchy of objects.
+#
+# == Working with the Store
+#
+# === Creating a Store
+#
+# Use method PStore.new to create a store.
+# The new store creates or opens its containing file:
+#
+# store = PStore.new('t.store')
+#
+# === Modifying the Store
+#
+# Use method #[]= to update or create an entry:
+#
+# example_store do |store|
+# store.transaction do
+# store[:foo] = 1 # Update.
+# store[:bam] = 1 # Create.
+# end
+# end
+#
+# Use method #delete to remove an entry:
+#
+# example_store do |store|
+# store.transaction do
+# store.delete(:foo)
+# store[:foo] # => nil
+# end
+# end
+#
+# === Retrieving Values
+#
+# Use method #fetch (allows default) or #[] (defaults to +nil+)
+# to retrieve an entry:
+#
+# example_store do |store|
+# store.transaction do
+# store[:foo] # => 0
+# store[:nope] # => nil
+# store.fetch(:baz) # => 2
+# store.fetch(:nope, nil) # => nil
+# store.fetch(:nope) # Raises exception.
+# end
+# end
+#
+# === Querying the Store
+#
+# Use method #key? to determine whether a given key exists:
#
-# Behind the scenes, Ruby objects are stored to the data store file with
-# Marshal. That carries the usual limitations. Proc objects cannot be
-# marshalled, for example.
+# example_store do |store|
+# store.transaction do
+# store.key?(:foo) # => true
+# end
+# end
#
-# == Usage example:
+# Use method #keys to retrieve keys:
+#
+# example_store do |store|
+# store.transaction do
+# store.keys # => [:foo, :bar, :baz]
+# end
+# end
+#
+# Use method #path to retrieve the path to the store's underlying file;
+# this method may be called from outside a transaction block:
+#
+# store = PStore.new('t.store')
+# store.path # => "t.store"
+#
+# == Transaction Safety
+#
+# For transaction safety, see:
+#
+# - Optional argument +thread_safe+ at method PStore.new.
+# - Attribute #ultra_safe.
+#
+# Needless to say, if you're storing valuable data with \PStore, then you should
+# backup the \PStore file from time to time.
+#
+# == An Example Store
#
# require "pstore"
#
-# # a mock wiki object...
+# # A mock wiki object.
# class WikiPage
-# def initialize( page_name, author, contents )
+#
+# attr_reader :page_name
+#
+# def initialize(page_name, author, contents)
# @page_name = page_name
# @revisions = Array.new
-#
# add_revision(author, contents)
# end
#
-# attr_reader :page_name
-#
-# def add_revision( author, contents )
-# @revisions << { :created => Time.now,
-# :author => author,
-# :contents => contents }
+# def add_revision(author, contents)
+# @revisions << {created: Time.now,
+# author: author,
+# contents: contents}
# end
#
# def wiki_page_references
# [@page_name] + @revisions.last[:contents].scan(/\b(?:[A-Z]+[a-z]+){2,}/)
# end
#
-# # ...
# end
#
-# # create a new page...
-# home_page = WikiPage.new( "HomePage", "James Edward Gray II",
-# "A page about the JoysOfDocumentation..." )
+# # Create a new wiki page.
+# home_page = WikiPage.new("HomePage", "James Edward Gray II",
+# "A page about the JoysOfDocumentation..." )
#
-# # then we want to update page data and the index together, or not at all...
# wiki = PStore.new("wiki_pages.pstore")
-# wiki.transaction do # begin transaction; do all of this or none of it
-# # store page...
+# # Update page data and the index together, or not at all.
+# wiki.transaction do
+# # Store page.
# wiki[home_page.page_name] = home_page
-# # ensure that an index has been created...
+# # Create page index.
# wiki[:wiki_index] ||= Array.new
-# # update wiki index...
+# # Update wiki index.
# wiki[:wiki_index].push(*home_page.wiki_page_references)
-# end # commit changes to wiki data store file
-#
-# ### Some time later... ###
+# end
#
-# # read wiki data...
-# wiki.transaction(true) do # begin read-only transaction, no changes allowed
-# wiki.roots.each do |data_root_name|
-# p data_root_name
-# p wiki[data_root_name]
+# # Read wiki data, setting argument read_only to true.
+# wiki.transaction(true) do
+# wiki.keys.each do |key|
+# puts key
+# puts wiki[key]
# end
# end
#
-# == Transaction modes
-#
-# By default, file integrity is only ensured as long as the operating system
-# (and the underlying hardware) doesn't raise any unexpected I/O errors. If an
-# I/O error occurs while PStore is writing to its file, then the file will
-# become corrupted.
-#
-# You can prevent this by setting <em>pstore.ultra_safe = true</em>.
-# However, this results in a minor performance loss, and only works on platforms
-# that support atomic file renames. Please consult the documentation for
-# +ultra_safe+ for details.
-#
-# Needless to say, if you're storing valuable data with PStore, then you should
-# backup the PStore files from time to time.
class PStore
+ VERSION = "0.1.2"
+
RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
WR_ACCESS = {mode: IO::WRONLY | IO::CREAT | IO::TRUNC | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
@@ -100,21 +336,38 @@ class PStore
class Error < StandardError
end
- # Whether PStore should do its best to prevent file corruptions, even when under
- # unlikely-to-occur error conditions such as out-of-space conditions and other
- # unusual OS filesystem errors. Setting this flag comes at the price in the form
- # of a performance loss.
+ # Whether \PStore should do its best to prevent file corruptions,
+ # even when an unlikely error (such as memory-error or filesystem error) occurs:
+ #
+ # - +true+: changes are posted by creating a temporary file,
+ # writing the updated data to it, then renaming the file to the given #path.
+ # File integrity is maintained.
+ # Note: has effect only if the filesystem has atomic file rename
+ # (as do POSIX platforms Linux, MacOS, FreeBSD and others).
+ #
+ # - +false+ (the default): changes are posted by rewinding the open file
+ # and writing the updated data.
+ # File integrity is maintained if the filesystem raises
+ # no unexpected I/O error;
+ # if such an error occurs during a write to the store,
+ # the file may become corrupted.
#
- # This flag only has effect on platforms on which file renames are atomic (e.g.
- # all POSIX platforms: Linux, MacOS X, FreeBSD, etc). The default value is false.
attr_accessor :ultra_safe
+ # Returns a new \PStore object.
+ #
+ # Argument +file+ is the path to the file in which objects are to be stored;
+ # if the file exists, it should be one that was written by \PStore.
+ #
+ # path = 't.store'
+ # store = PStore.new(path)
#
- # To construct a PStore object, pass in the _file_ path where you would like
- # the data to be stored.
+ # A \PStore object is
+ # {reentrant}[https://en.wikipedia.org/wiki/Reentrancy_(computing)].
+ # If argument +thread_safe+ is given as +true+,
+ # the object is also thread-safe (at the cost of a small performance penalty):
#
- # PStore objects are always reentrant. But if _thread_safe_ is set to true,
- # then it will become thread-safe at the cost of a minor performance hit.
+ # store = PStore.new(path, true)
#
def initialize(file, thread_safe = false)
dir = File::dirname(file)
@@ -145,169 +398,160 @@ class PStore
end
private :in_transaction, :in_transaction_wr
+ # Returns the value for the given +key+ if the key exists.
+ # +nil+ otherwise;
+ # if not +nil+, the returned value is an object or a hierarchy of objects:
#
- # Retrieves a value from the PStore file data, by _name_. The hierarchy of
- # Ruby objects stored under that root _name_ will be returned.
+ # example_store do |store|
+ # store.transaction do
+ # store[:foo] # => 0
+ # store[:nope] # => nil
+ # end
+ # end
#
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
+ # Returns +nil+ if there is no such key.
#
- def [](name)
+ # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
+ #
+ # Raises an exception if called outside a transaction block.
+ def [](key)
in_transaction
- @table[name]
+ @table[key]
end
+
+ # Like #[], except that it accepts a default value for the store.
+ # If the +key+ does not exist:
#
- # This method is just like PStore#[], save that you may also provide a
- # _default_ value for the object. In the event the specified _name_ is not
- # found in the data store, your _default_ will be returned instead. If you do
- # not specify a default, PStore::Error will be raised if the object is not
- # found.
+ # - Raises an exception if +default+ is +PStore::Error+.
+ # - Returns the value of +default+ otherwise:
#
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
+ # example_store do |store|
+ # store.transaction do
+ # store.fetch(:nope, nil) # => nil
+ # store.fetch(:nope) # Raises an exception.
+ # end
+ # end
#
- def fetch(name, default=PStore::Error)
+ # Raises an exception if called outside a transaction block.
+ def fetch(key, default=PStore::Error)
in_transaction
- unless @table.key? name
+ unless @table.key? key
if default == PStore::Error
- raise PStore::Error, format("undefined root name `%s'", name)
+ raise PStore::Error, format("undefined key `%s'", key)
else
return default
end
end
- @table[name]
+ @table[key]
end
+
+ # Creates or replaces the value for the given +key+:
#
- # Stores an individual Ruby object or a hierarchy of Ruby objects in the data
- # store file under the root _name_. Assigning to a _name_ already in the data
- # store clobbers the old data.
- #
- # == Example:
- #
- # require "pstore"
- #
- # store = PStore.new("data_file.pstore")
- # store.transaction do # begin transaction
- # # load some data into the store...
- # store[:single_object] = "My data..."
- # store[:obj_hierarchy] = { "Kev Jackson" => ["rational.rb", "pstore.rb"],
- # "James Gray" => ["erb.rb", "pstore.rb"] }
- # end # commit changes to data store file
+ # example_store do |store|
+ # temp.transaction do
+ # temp[:bat] = 3
+ # end
+ # end
#
- # *WARNING*: This method is only valid in a PStore#transaction and it cannot
- # be read-only. It will raise PStore::Error if called at any other time.
+ # See also {Hierarchical Values}[rdoc-ref:PStore@Hierarchical+Values].
#
- def []=(name, value)
+ # Raises an exception if called outside a transaction block.
+ def []=(key, value)
in_transaction_wr
- @table[name] = value
+ @table[key] = value
end
+
+ # Removes and returns the value at +key+ if it exists:
#
- # Removes an object hierarchy from the data store, by _name_.
+ # example_store do |store|
+ # store.transaction do
+ # store[:bat] = 3
+ # store.delete(:bat)
+ # end
+ # end
#
- # *WARNING*: This method is only valid in a PStore#transaction and it cannot
- # be read-only. It will raise PStore::Error if called at any other time.
+ # Returns +nil+ if there is no such key.
#
- def delete(name)
+ # Raises an exception if called outside a transaction block.
+ def delete(key)
in_transaction_wr
- @table.delete name
+ @table.delete key
end
+ # Returns an array of the existing keys:
#
- # Returns the names of all object hierarchies currently in the store.
+ # example_store do |store|
+ # store.transaction do
+ # store.keys # => [:foo, :bar, :baz]
+ # end
+ # end
#
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
+ # Raises an exception if called outside a transaction block.
#
- def roots
+ # PStore#roots is an alias for PStore#keys.
+ def keys
in_transaction
@table.keys
end
+ alias roots keys
+
+ # Returns +true+ if +key+ exists, +false+ otherwise:
#
- # Returns true if the supplied _name_ is currently in the data store.
+ # example_store do |store|
+ # store.transaction do
+ # store.key?(:foo) # => true
+ # end
+ # end
#
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
+ # Raises an exception if called outside a transaction block.
#
- def root?(name)
+ # PStore#root? is an alias for PStore#key?.
+ def key?(key)
in_transaction
- @table.key? name
+ @table.key? key
end
- # Returns the path to the data store file.
+ alias root? key?
+
+ # Returns the string file path used to create the store:
+ #
+ # store.path # => "flat.store"
+ #
def path
@filename
end
+ # Exits the current transaction block, committing any changes
+ # specified in the transaction block.
+ # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting].
#
- # Ends the current PStore#transaction, committing any changes to the data
- # store immediately.
- #
- # == Example:
- #
- # require "pstore"
- #
- # store = PStore.new("data_file.pstore")
- # store.transaction do # begin transaction
- # # load some data into the store...
- # store[:one] = 1
- # store[:two] = 2
- #
- # store.commit # end transaction here, committing changes
- #
- # store[:three] = 3 # this change is never reached
- # end
- #
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
- #
+ # Raises an exception if called outside a transaction block.
def commit
in_transaction
@abort = false
throw :pstore_abort_transaction
end
+
+ # Exits the current transaction block, discarding any changes
+ # specified in the transaction block.
+ # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting].
#
- # Ends the current PStore#transaction, discarding any changes to the data
- # store.
- #
- # == Example:
- #
- # require "pstore"
- #
- # store = PStore.new("data_file.pstore")
- # store.transaction do # begin transaction
- # store[:one] = 1 # this change is not applied, see below...
- # store[:two] = 2 # this change is not applied, see below...
- #
- # store.abort # end transaction here, discard all changes
- #
- # store[:three] = 3 # this change is never reached
- # end
- #
- # *WARNING*: This method is only valid in a PStore#transaction. It will
- # raise PStore::Error if called at any other time.
- #
+ # Raises an exception if called outside a transaction block.
def abort
in_transaction
@abort = true
throw :pstore_abort_transaction
end
+ # Opens a transaction block for the store.
+ # See {Transactions}[rdoc-ref:PStore@Transactions].
#
- # Opens a new transaction for the data store. Code executed inside a block
- # passed to this method may read and write data to and from the data store
- # file.
- #
- # At the end of the block, changes are committed to the data store
- # automatically. You may exit the transaction early with a call to either
- # PStore#commit or PStore#abort. See those methods for details about how
- # changes are handled. Raising an uncaught Exception in the block is
- # equivalent to calling PStore#abort.
- #
- # If _read_only_ is set to +true+, you will only be allowed to read from the
- # data store during the transaction and any attempts to change the data will
- # raise a PStore::Error.
+ # With argument +read_only+ as +false+, the block may both read from
+ # and write to the store.
#
- # Note that PStore does not support nested transactions.
+ # With argument +read_only+ as +true+, the block may not include calls
+ # to #transaction, #[]=, or #delete.
#
+ # Raises an exception if called within a transaction block.
def transaction(read_only = false) # :yields: pstore
value = nil
if !@thread_safe
diff --git a/lib/pstore/pstore.gemspec b/lib/pstore/pstore.gemspec
index 408af0a078..8425795afe 100644
--- a/lib/pstore/pstore.gemspec
+++ b/lib/pstore/pstore.gemspec
@@ -1,19 +1,22 @@
-begin
- require_relative "lib/pstore/version"
-rescue LoadError # Fallback to load version file in ruby core repository
- require_relative "version"
+# frozen_string_literal: true
+
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
end
Gem::Specification.new do |spec|
- spec.name = "pstore"
- spec.version = PStore::VERSION
+ spec.name = name
+ spec.version = version
spec.authors = ["Yukihiro Matsumoto"]
spec.email = ["matz@ruby-lang.org"]
spec.summary = %q{Transactional File Storage for Ruby Objects}
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/pstore"
- spec.license = "BSD-2-Clause"
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/ruby/pstore"
@@ -21,7 +24,7 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
diff --git a/lib/pstore/version.rb b/lib/pstore/version.rb
deleted file mode 100644
index 0e7a3fbd15..0000000000
--- a/lib/pstore/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class PStore
- VERSION = "0.1.0"
-end
diff --git a/lib/racc/compat.rb b/lib/racc/compat.rb
index ccb033e2e0..62f4f630be 100644
--- a/lib/racc/compat.rb
+++ b/lib/racc/compat.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 14fa1118eb3a23e85265e4f7afe2d5a297d69f9c $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of the GNU LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
unless Object.method_defined?(:__send)
class Object
diff --git a/lib/racc/debugflags.rb b/lib/racc/debugflags.rb
index 1b5d2fe54c..ee34cf2314 100644
--- a/lib/racc/debugflags.rb
+++ b/lib/racc/debugflags.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 74ff4369ce53c7f45cfc2644ce907785104ebf6e $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
module Racc
diff --git a/lib/racc/exception.rb b/lib/racc/exception.rb
index 0069ca3443..c11dc2e43e 100644
--- a/lib/racc/exception.rb
+++ b/lib/racc/exception.rb
@@ -1,11 +1,14 @@
+#--
+#
#
-# $Id: ebb9798ad0b211e031670a12a1ab154678c1c8f3 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
# see the file "COPYING".
+#
+#++
module Racc
class Error < StandardError; end
diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb
index 123f1f1834..01c4c3df69 100644
--- a/lib/racc/grammar.rb
+++ b/lib/racc/grammar.rb
@@ -1,11 +1,14 @@
+#--
+#
#
-# $Id: 3fcabd58bef02540bf78e8142469681cb9f975c2 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
# see the file "COPYING".
+#
+#++
require 'racc/compat'
require 'racc/iset'
@@ -83,14 +86,15 @@ module Racc
end
def n_useless_nonterminals
- @n_useless_nonterminals ||=
- begin
- n = 0
- @symboltable.each_nonterminal do |sym|
- n += 1 if sym.useless?
- end
- n
- end
+ @n_useless_nonterminals ||= each_useless_nonterminal.count
+ end
+
+ def each_useless_nonterminal
+ return to_enum __method__ unless block_given?
+
+ @symboltable.each_nonterminal do |sym|
+ yield sym if sym.useless?
+ end
end
def useless_rule_exist?
@@ -98,14 +102,15 @@ module Racc
end
def n_useless_rules
- @n_useless_rules ||=
- begin
- n = 0
- each do |r|
- n += 1 if r.useless?
- end
- n
- end
+ @n_useless_rules ||= each_useless_rule.count
+ end
+
+ def each_useless_rule
+ return to_enum __method__ unless block_given?
+
+ each do |r|
+ yield r if r.useless?
+ end
end
def nfa
@@ -330,14 +335,14 @@ module Racc
if action
idbase = "#{type}@#{id}-#{@seqs[type] += 1}"
target = _wrap(idbase, "#{idbase}-core", action)
- _regist("#{idbase}-core", &block)
+ _register("#{idbase}-core", &block)
else
- target = _regist("#{type}@#{id}", &block)
+ target = _register("#{type}@#{id}", &block)
end
@grammar.intern(target)
end
- def _regist(target_name)
+ def _register(target_name)
target = target_name.intern
unless _added?(@grammar.intern(target))
yield(target).each_rule do |rule|
diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb
index 5e7081f00a..c7d1207f0b 100644
--- a/lib/racc/grammarfileparser.rb
+++ b/lib/racc/grammarfileparser.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 63bd084db2dce8a2c9760318faae6104717cead7 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of the GNU LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
require 'racc'
require 'racc/compat'
@@ -259,9 +260,9 @@ module Racc
_, *blocks = *@scanner.epilogue.split(/^----/)
blocks.each do |block|
header, *body = block.lines.to_a
- label0, pathes = *header.sub(/\A-+/, '').split('=', 2)
+ label0, paths = *header.sub(/\A-+/, '').split('=', 2)
label = canonical_label(label0)
- (pathes ? pathes.strip.split(' ') : []).each do |path|
+ (paths ? paths.strip.split(' ') : []).each do |path|
add_user_code label, SourceText.new(File.read(path), path, 1)
end
add_user_code label, SourceText.new(body.join(''), @filename, line + 1)
@@ -286,7 +287,7 @@ module Racc
end
def add_user_code(label, src)
- @result.params.send(USER_CODE_LABELS[label]).push src
+ @result.params.public_send(USER_CODE_LABELS[label]).push src
end
end
@@ -427,7 +428,7 @@ module Racc
$raccs_print_type = false
def scan_action
- buf = ''
+ buf = String.new
nest = 1
pre = nil
@in_block = 'action'
diff --git a/lib/racc/info.rb b/lib/racc/info.rb
index b7db7b6c9b..37bff7edba 100644
--- a/lib/racc/info.rb
+++ b/lib/racc/info.rb
@@ -1,14 +1,17 @@
+#--
+#
#
-# $Id: 8ab2cb5341529fe5e35956bb1a1f42ec9b9c6f5a $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
# see the file "COPYING".
+#
+#++
module Racc
- VERSION = '1.4.16'
+ VERSION = '1.6.2'
Version = VERSION
Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
end
diff --git a/lib/racc/iset.rb b/lib/racc/iset.rb
index 245bad8b50..339221d21b 100644
--- a/lib/racc/iset.rb
+++ b/lib/racc/iset.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 31aa4331c08dfd4609c06eb5f94b7ef38dc708e1 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of the GNU LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
module Racc
diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb
index 68593c41f6..2f5aa0c8b0 100644
--- a/lib/racc/logfilegenerator.rb
+++ b/lib/racc/logfilegenerator.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 5e9d0a01b5d56fd9cdc3d5cb078b1a3e1bbaf779 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of the GNU LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
module Racc
diff --git a/lib/racc/parser-text.rb b/lib/racc/parser-text.rb
index 31b8e2c01f..0579f4ce9b 100644
--- a/lib/racc/parser-text.rb
+++ b/lib/racc/parser-text.rb
@@ -22,7 +22,7 @@ module Racc
class ParseError < StandardError; end
end
unless defined?(::ParseError)
- ParseError = Racc::ParseError
+ ParseError = Racc::ParseError # :nodoc:
end
# Racc is a LALR(1) parser generator.
@@ -31,7 +31,7 @@ end
# == Command-line Reference
#
# racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
-# [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
+# [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
# [-v] [--verbose]
# [-O<var>filename</var>] [--log-file=<var>filename</var>]
# [-g] [--debug]
@@ -43,7 +43,7 @@ end
# [-S] [--output-status]
# [--version] [--copyright] [--help] <var>grammarfile</var>
#
-# [+filename+]
+# [+grammarfile+]
# Racc grammar file. Any extension is permitted.
# [-o+outfile+, --output-file=+outfile+]
# A filename for output. default is <+filename+>.tab.rb
@@ -181,45 +181,39 @@ end
# Your own parser is completely yours.
module Racc
- unless defined?(Racc_No_Extentions)
- Racc_No_Extentions = false # :nodoc:
+ unless defined?(Racc_No_Extensions)
+ Racc_No_Extensions = false # :nodoc:
end
class Parser
Racc_Runtime_Version = ::Racc::VERSION
- Racc_Runtime_Revision = '$Id: 7adc21ee7a5690f10b7ff399b8af4e2717b9d94c $'
-
Racc_Runtime_Core_Version_R = ::Racc::VERSION
- Racc_Runtime_Core_Revision_R = '$Id: 7adc21ee7a5690f10b7ff399b8af4e2717b9d94c $'.split[1]
+
begin
if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
+ require 'jruby'
require 'racc/cparse-jruby.jar'
com.headius.racc.Cparse.new.load(JRuby.runtime, false)
else
require 'racc/cparse'
end
- # Racc_Runtime_Core_Version_C = (defined in extension)
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
+
unless new.respond_to?(:_racc_do_parse_c, true)
raise LoadError, 'old cparse.so'
end
- if Racc_No_Extentions
+ if Racc_No_Extensions
raise LoadError, 'selecting ruby version of racc runtime core'
end
Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc:
Racc_Runtime_Type = 'c' # :nodoc:
rescue LoadError
-puts $!
-puts $!.backtrace
Racc_Main_Parsing_Routine = :_racc_do_parse_rb
Racc_YY_Parse_Method = :_racc_yyparse_rb
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
Racc_Runtime_Type = 'ruby'
end
@@ -332,7 +326,7 @@ puts $!.backtrace
# It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
class_eval %{
def yyparse(recv, mid)
- #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true)
+ #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
end
}
@@ -554,7 +548,7 @@ puts $!.backtrace
end
# Exit parser.
- # Return value is Symbol_Value_Stack[0].
+ # Return value is +Symbol_Value_Stack[0]+.
def yyaccept
throw :racc_jump, 2
end
diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb
index 56b4af9dea..078bfef3e9 100644
--- a/lib/racc/parser.rb
+++ b/lib/racc/parser.rb
@@ -20,7 +20,7 @@ module Racc
class ParseError < StandardError; end
end
unless defined?(::ParseError)
- ParseError = Racc::ParseError
+ ParseError = Racc::ParseError # :nodoc:
end
# Racc is a LALR(1) parser generator.
@@ -29,7 +29,7 @@ end
# == Command-line Reference
#
# racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
-# [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
+# [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
# [-v] [--verbose]
# [-O<var>filename</var>] [--log-file=<var>filename</var>]
# [-g] [--debug]
@@ -41,7 +41,7 @@ end
# [-S] [--output-status]
# [--version] [--copyright] [--help] <var>grammarfile</var>
#
-# [+filename+]
+# [+grammarfile+]
# Racc grammar file. Any extension is permitted.
# [-o+outfile+, --output-file=+outfile+]
# A filename for output. default is <+filename+>.tab.rb
@@ -179,45 +179,39 @@ end
# Your own parser is completely yours.
module Racc
- unless defined?(Racc_No_Extentions)
- Racc_No_Extentions = false # :nodoc:
+ unless defined?(Racc_No_Extensions)
+ Racc_No_Extensions = false # :nodoc:
end
class Parser
Racc_Runtime_Version = ::Racc::VERSION
- Racc_Runtime_Revision = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'
-
Racc_Runtime_Core_Version_R = ::Racc::VERSION
- Racc_Runtime_Core_Revision_R = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'.split[1]
+
begin
if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
+ require 'jruby'
require 'racc/cparse-jruby.jar'
com.headius.racc.Cparse.new.load(JRuby.runtime, false)
else
require 'racc/cparse'
end
- # Racc_Runtime_Core_Version_C = (defined in extension)
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
+
unless new.respond_to?(:_racc_do_parse_c, true)
raise LoadError, 'old cparse.so'
end
- if Racc_No_Extentions
+ if Racc_No_Extensions
raise LoadError, 'selecting ruby version of racc runtime core'
end
Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc:
Racc_Runtime_Type = 'c' # :nodoc:
rescue LoadError
-puts $!
-puts $!.backtrace
Racc_Main_Parsing_Routine = :_racc_do_parse_rb
Racc_YY_Parse_Method = :_racc_yyparse_rb
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
Racc_Runtime_Type = 'ruby'
end
@@ -330,7 +324,7 @@ puts $!.backtrace
# It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
class_eval %{
def yyparse(recv, mid)
- #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true)
+ #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
end
}
@@ -552,7 +546,7 @@ puts $!.backtrace
end
# Exit parser.
- # Return value is Symbol_Value_Stack[0].
+ # Return value is +Symbol_Value_Stack[0]+.
def yyaccept
throw :racc_jump, 2
end
diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb
index ee1262db29..7131026929 100644
--- a/lib/racc/parserfilegenerator.rb
+++ b/lib/racc/parserfilegenerator.rb
@@ -1,13 +1,15 @@
+#--
+#
#
-# $Id: fff07ebfd582f8dbc845e424908cb9f41f8bf42f $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
# see the file "COPYING".
+#
+#++
-require 'enumerator'
require 'racc/compat'
require 'racc/sourcetext'
require 'racc/parser-text'
@@ -235,7 +237,7 @@ module Racc
end
def unique_separator(id)
- sep = "...end #{id}/module_eval..."
+ sep = String.new "...end #{id}/module_eval..."
while @used_separator.key?(sep)
sep.concat sprintf('%02x', rand(255))
end
@@ -318,50 +320,6 @@ module Racc
end
def integer_list(name, table)
- if table.size > 2000
- serialize_integer_list_compressed name, table
- else
- serialize_integer_list_std name, table
- end
- end
-
- def serialize_integer_list_compressed(name, table)
- # TODO: this can be made a LOT more clean with a simple split/map
- sep = "\n"
- nsep = ",\n"
- buf = ''
- com = ''
- ncom = ','
- co = com
- @f.print 'clist = ['
- table.each do |i|
- buf << co << i.to_s; co = ncom
- if buf.size > 66
- @f.print sep; sep = nsep
- @f.print "'", buf, "'"
- buf = ''
- co = com
- end
- end
- unless buf.empty?
- @f.print sep
- @f.print "'", buf, "'"
- end
- line ' ]'
-
- @f.print(<<-End)
- #{name} = arr = ::Array.new(#{table.size}, nil)
- idx = 0
- clist.each do |str|
- str.split(',', -1).each do |i|
- arr[idx] = i.to_i unless i.empty?
- idx += 1
- end
- end
- End
- end
-
- def serialize_integer_list_std(name, table)
sep = ''
line "#{name} = ["
table.each_slice(10) do |ns|
diff --git a/lib/racc/pre-setup b/lib/racc/pre-setup
deleted file mode 100644
index 5027d865b7..0000000000
--- a/lib/racc/pre-setup
+++ /dev/null
@@ -1,13 +0,0 @@
-def generate_parser_text_rb(target)
- return if File.exist?(srcfile(target))
- $stderr.puts "generating #{target}..."
- File.open(target, 'w') {|f|
- f.puts "module Racc"
- f.puts " PARSER_TEXT = <<'__end_of_file__'"
- f.puts File.read(srcfile('parser.rb'))
- f.puts "__end_of_file__"
- f.puts "end"
- }
-end
-
-generate_parser_text_rb 'parser-text.rb'
diff --git a/lib/racc/racc.gemspec b/lib/racc/racc.gemspec
index 6beb16c5b4..1095c8f47e 100644
--- a/lib/racc/racc.gemspec
+++ b/lib/racc/racc.gemspec
@@ -1,8 +1,14 @@
# -*- encoding: utf-8 -*-
+begin
+ require_relative "lib/racc/info"
+rescue LoadError # Fallback to load version file in ruby core repository
+ require_relative "info"
+end
+
Gem::Specification.new do |s|
s.name = "racc"
- s.version = "1.4.16"
+ s.version = Racc::VERSION
s.summary = "Racc is a LALR(1) parser generator"
s.description = <<DESC
Racc is a LALR(1) parser generator.
@@ -14,92 +20,39 @@ Racc is a LALR(1) parser generator.
DESC
s.authors = ["Minero Aoki", "Aaron Patterson"]
s.email = [nil, "aaron@tenderlovemaking.com"]
- s.homepage = "http://i.loveruby.net/en/projects/racc/"
- s.licenses = ["MIT"]
- s.executables = ["racc", "racc2y", "y2racc"]
+ s.homepage = "https://github.com/ruby/racc"
+ s.licenses = ["Ruby", "BSD-2-Clause"]
+ s.executables = ["racc"]
s.files = [
- "COPYING", "ChangeLog", "DEPENDS", "Manifest.txt",
- "README.ja.rdoc", "README.rdoc", "Rakefile", "TODO", "bin/racc",
- "bin/racc2y", "bin/y2racc", "ext/racc/MANIFEST",
- "ext/racc/com/headius/racc/Cparse.java", "ext/racc/cparse.c",
- "ext/racc/depend", "ext/racc/extconf.rb", "fastcache/extconf.rb",
- "fastcache/fastcache.c", "lib/racc.rb", "lib/racc/compat.rb",
+ "COPYING", "ChangeLog", "TODO",
+ "README.ja.rdoc", "README.rdoc", "bin/racc",
+ "ext/racc/MANIFEST",
+ "ext/racc/cparse/cparse.c",
+ "ext/racc/cparse/extconf.rb",
+ "lib/racc.rb", "lib/racc/compat.rb",
"lib/racc/debugflags.rb", "lib/racc/exception.rb",
"lib/racc/grammar.rb", "lib/racc/grammarfileparser.rb",
"lib/racc/info.rb", "lib/racc/iset.rb",
"lib/racc/logfilegenerator.rb", "lib/racc/parser-text.rb",
"lib/racc/parser.rb", "lib/racc/parserfilegenerator.rb",
- "lib/racc/pre-setup", "lib/racc/sourcetext.rb",
+ "lib/racc/sourcetext.rb",
"lib/racc/state.rb", "lib/racc/statetransitiontable.rb",
- "lib/racc/static.rb", "misc/dist.sh", "rdoc/en/NEWS.en.rdoc",
- "rdoc/en/grammar.en.rdoc", "rdoc/ja/NEWS.ja.rdoc",
- "rdoc/ja/command.ja.html", "rdoc/ja/debug.ja.rdoc",
- "rdoc/ja/grammar.ja.rdoc", "rdoc/ja/index.ja.html",
- "rdoc/ja/parser.ja.rdoc", "rdoc/ja/usage.ja.html",
- "sample/array.y", "sample/array2.y", "sample/calc-ja.y",
- "sample/calc.y", "sample/conflict.y", "sample/hash.y",
- "sample/lalr.y", "sample/lists.y", "sample/syntax.y",
- "sample/yyerr.y", "setup.rb", "tasks/doc.rb", "tasks/email.rb",
- "test/assets/cadenza.y", "test/assets/cast.y",
- "test/assets/chk.y", "test/assets/conf.y",
- "test/assets/csspool.y", "test/assets/digraph.y",
- "test/assets/echk.y", "test/assets/edtf.y", "test/assets/err.y",
- "test/assets/error_recovery.y", "test/assets/expect.y",
- "test/assets/firstline.y", "test/assets/huia.y",
- "test/assets/ichk.y", "test/assets/intp.y",
- "test/assets/journey.y", "test/assets/liquor.y",
- "test/assets/machete.y", "test/assets/macruby.y",
- "test/assets/mailp.y", "test/assets/mediacloth.y",
- "test/assets/mof.y", "test/assets/namae.y", "test/assets/nasl.y",
- "test/assets/newsyn.y", "test/assets/noend.y",
- "test/assets/nokogiri-css.y", "test/assets/nonass.y",
- "test/assets/normal.y", "test/assets/norule.y",
- "test/assets/nullbug1.y", "test/assets/nullbug2.y",
- "test/assets/opal.y", "test/assets/opt.y",
- "test/assets/percent.y", "test/assets/php_serialization.y",
- "test/assets/recv.y", "test/assets/riml.y",
- "test/assets/rrconf.y", "test/assets/ruby18.y",
- "test/assets/ruby19.y", "test/assets/ruby20.y",
- "test/assets/ruby21.y", "test/assets/ruby22.y",
- "test/assets/scan.y", "test/assets/syntax.y",
- "test/assets/tp_plus.y", "test/assets/twowaysql.y",
- "test/assets/unterm.y", "test/assets/useless.y",
- "test/assets/yyerr.y", "test/bench.y", "test/helper.rb",
- "test/infini.y", "test/regress/cadenza", "test/regress/cast",
- "test/regress/csspool", "test/regress/edtf", "test/regress/huia",
- "test/regress/journey", "test/regress/liquor",
- "test/regress/machete", "test/regress/mediacloth",
- "test/regress/mof", "test/regress/namae", "test/regress/nasl",
- "test/regress/nokogiri-css", "test/regress/opal",
- "test/regress/php_serialization", "test/regress/riml",
- "test/regress/ruby18", "test/regress/ruby22",
- "test/regress/tp_plus", "test/regress/twowaysql",
- "test/scandata/brace", "test/scandata/gvar",
- "test/scandata/normal", "test/scandata/percent",
- "test/scandata/slash", "test/src.intp", "test/start.y",
- "test/test_chk_y.rb", "test/test_grammar_file_parser.rb",
- "test/test_racc_command.rb", "test/test_scan_y.rb",
- "test/testscanner.rb", "web/racc.en.rhtml", "web/racc.ja.rhtml"
+ "lib/racc/static.rb",
+ "doc/en/NEWS.en.rdoc", "doc/en/grammar2.en.rdoc",
+ "doc/en/grammar.en.rdoc", "doc/ja/NEWS.ja.rdoc",
+ "doc/ja/command.ja.html", "doc/ja/debug.ja.rdoc",
+ "doc/ja/grammar.ja.rdoc", "doc/ja/index.ja.html",
+ "doc/ja/parser.ja.rdoc", "doc/ja/usage.ja.html",
]
s.require_paths = ["lib"]
- s.rubygems_version = "3.1.0.pre1"
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.extensions = ["ext/racc/extconf.rb"]
+ s.required_ruby_version = ">= 2.5"
s.rdoc_options = ["--main", "README.rdoc"]
- s.extra_rdoc_files = [
- "Manifest.txt", "README.ja.rdoc", "README.rdoc",
- "rdoc/en/NEWS.en.rdoc", "rdoc/en/grammar.en.rdoc",
- "rdoc/ja/NEWS.ja.rdoc", "rdoc/ja/debug.ja.rdoc",
- "rdoc/ja/grammar.ja.rdoc", "rdoc/ja/parser.ja.rdoc",
- "README.ja.rdoc", "README.rdoc"
- ]
+ s.extra_rdoc_files = ["README.ja.rdoc", "README.rdoc"]
if RUBY_PLATFORM =~ /java/
s.files << 'lib/racc/cparse-jruby.jar'
+ s.platform = 'java'
+ else
+ s.extensions = ["ext/racc/cparse/extconf.rb"]
end
-
- s.add_development_dependency("rake-compiler", [">= 0.4.1"])
- s.add_development_dependency("minitest", ["~> 4.7"])
- s.add_development_dependency("rdoc", [">= 4.0", "< 7"])
- s.add_development_dependency("hoe", ["~> 3.18"])
end
diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc
deleted file mode 100644
index af10803f3a..0000000000
--- a/lib/racc/rdoc/grammar.en.rdoc
+++ /dev/null
@@ -1,219 +0,0 @@
-= Racc Grammar File Reference
-
-== Global Structure
-
-== Class Block and User Code Block
-
-There are two blocks on the toplevel. One is the 'class' block, the other is the 'user code'
-block. The 'user code' block MUST be placed after the 'class' block.
-
-== Comments
-
-You can insert comments about all places. Two styles of comments can be used, Ruby style '#.....' and C style '/\*......*\/'.
-
-== Class Block
-
-The class block is formed like this:
-
- class CLASS_NAME
- [precedence table]
- [token declarations]
- [expected number of S/R conflicts]
- [options]
- [semantic value conversion]
- [start rule]
- rule
- GRAMMARS
-
-CLASS_NAME is a name of the parser class. This is the name of the generating parser
-class.
-
-If CLASS_NAME includes '::', Racc outputs the module clause. For example, writing
-"class M::C" causes the code below to be created:
-
- module M
- class C
- :
- :
- end
- end
-
-== Grammar Block
-
-The grammar block describes grammar which is able to be understood by the parser.
-Syntax is:
-
- (token): (token) (token) (token).... (action)
-
- (token): (token) (token) (token).... (action)
- | (token) (token) (token).... (action)
- | (token) (token) (token).... (action)
-
-(action) is an action which is executed when its (token)s are found.
-(action) is a ruby code block, which is surrounded by braces:
-
- { print val[0]
- puts val[1] }
-
-Note that you cannot use '%' string, here document, '%r' regexp in action.
-
-Actions can be omitted. When it is omitted, '' (empty string) is used.
-
-A return value of action is a value of the left side value ($$). It is the value of the
-result, or the returned value by `return` statement.
-
-Here is an example of the whole grammar block.
-
- rule
- goal: definition rules source { result = val }
-
- definition: /* none */ { result = [] }
- | definition startdesig { result[0] = val[1] }
- | definition
- precrule # this line continues from upper line
- {
- result[1] = val[1]
- }
-
- startdesig: START TOKEN
-
-You can use the following special local variables in action:
-
-* result ($$)
-
-The value of the left-hand side (lhs). A default value is val[0].
-
-* val ($1,$2,$3...)
-
-An array of value of the right-hand side (rhs).
-
-* _values (...$-2,$-1,$0)
-
-A stack of values. DO NOT MODIFY this stack unless you know what you are doing.
-
-== Operator Precedence
-
-This function is equal to '%prec' in yacc.
-To designate this block:
-
- prechigh
- nonassoc '++'
- left '*' '/'
- left '+' '-'
- right '='
- preclow
-
-`right` is yacc's %right, `left` is yacc's %left.
-
-`=` + (symbol) means yacc's %prec:
-
- prechigh
- nonassoc UMINUS
- left '*' '/'
- left '+' '-'
- preclow
-
- rule
- exp: exp '*' exp
- | exp '-' exp
- | '-' exp =UMINUS # equals to "%prec UMINUS"
- :
- :
-
-== expect
-
-Racc has bison's "expect" directive.
-
- # Example
-
- class MyParser
- rule
- expect 3
- :
- :
-
-This directive declares "expected" number of shift/reduce conflicts. If
-"expected" number is equal to real number of conflicts, Racc does not print
-conflict warning message.
-
-== Declaring Tokens
-
-By declaring tokens, you can avoid many meaningless bugs. If declared token
-does not exist or existing token does not decleared, Racc output warnings.
-Declaration syntax is:
-
- token TOKEN_NAME AND_IS_THIS
- ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST
-
-== Options
-
-You can write options for Racc command in your Racc file.
-
- options OPTION OPTION ...
-
-Options are:
-
-* omit_action_call
-
-omits empty action call or not.
-
-* result_var
-
-uses local variable "result" or not.
-
-You can use 'no_' prefix to invert their meanings.
-
-== Converting Token Symbol
-
-Token symbols are, as default,
-
- * naked token string in Racc file (TOK, XFILE, this_is_token, ...)
- --> symbol (:TOK, :XFILE, :this_is_token, ...)
- * quoted string (':', '.', '(', ...)
- --> same string (':', '.', '(', ...)
-
-You can change this default by "convert" block.
-Here is an example:
-
- convert
- PLUS 'PlusClass' # We use PlusClass for symbol of `PLUS'
- MIN 'MinusClass' # We use MinusClass for symbol of `MIN'
- end
-
-We can use almost all ruby value can be used by token symbol,
-except 'false' and 'nil'. These cause unexpected parse error.
-
-If you want to use String as token symbol, special care is required.
-For example:
-
- convert
- class '"cls"' # in code, "cls"
- PLUS '"plus\n"' # in code, "plus\n"
- MIN "\"minus#{val}\"" # in code, \"minus#{val}\"
- end
-
-== Start Rule
-
-'%start' in yacc. This changes start rule.
-
- start real_target
-
-== User Code Block
-
-"User Code Block" is a Ruby source code which is copied to output. There are
-three user code blocks, "header" "inner" and "footer".
-
-Format of user code is like this:
-
- ---- header
- ruby statement
- ruby statement
- ruby statement
-
- ---- inner
- ruby statement
- :
- :
-
-If four '-' exist on the line head, Racc treats it as the beginning of the
-user code block. The name of the user code block must be one word.
diff --git a/lib/racc/sourcetext.rb b/lib/racc/sourcetext.rb
index b33ba29291..de52dcae9b 100644
--- a/lib/racc/sourcetext.rb
+++ b/lib/racc/sourcetext.rb
@@ -1,13 +1,14 @@
+#--
+#
#
-# $Id: 3b2d89d9ada2f5fcb043837dcc5c9631856d5b70 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
module Racc
diff --git a/lib/racc/state.rb b/lib/racc/state.rb
index 51b1d83664..f85809fbeb 100644
--- a/lib/racc/state.rb
+++ b/lib/racc/state.rb
@@ -1,11 +1,14 @@
+#--
+#
#
-# $Id: 6bd3136439c94cb8d928917f5e0de9c593181527 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
# see the file "COPYING".
+#
+#++
require 'racc/iset'
require 'racc/statetransitiontable'
diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb
index 23df4102ec..d75fa1657a 100644
--- a/lib/racc/statetransitiontable.rb
+++ b/lib/racc/statetransitiontable.rb
@@ -1,22 +1,17 @@
+#--
+#
#
-# $Id: 4c5f4311663b6d03050953d64d6a0e7905ff2216 $
#
# Copyright (c) 1999-2006 Minero Aoki
#
# This program is free software.
-# You can distribute/modify this program under the terms of
-# the GNU LGPL, Lesser General Public License version 2.1.
-# For details of LGPL, see the file "COPYING".
+# You can distribute/modify this program under the same terms of ruby.
+# see the file "COPYING".
#
+#++
require 'racc/parser'
-unless Object.method_defined?(:funcall)
- class Object
- alias funcall __send__
- end
-end
-
module Racc
StateTransitionTable = Struct.new(:action_table,
@@ -196,7 +191,7 @@ module Racc
def mkmapexp(arr)
i = ii = 0
as = arr.size
- map = ''
+ map = String.new
maxdup = RE_DUP_MAX
curr = nil
while i < as
@@ -221,7 +216,7 @@ module Racc
end
i = ii
end
- Regexp.compile(map, 'n')
+ Regexp.compile(map, Regexp::NOENCODING)
end
def set_table(entries, dummy, tbl, chk, ptr)
@@ -229,7 +224,7 @@ module Racc
map = '-' * 10240
# sort long to short
- entries.sort! {|a,b| b[0].size <=> a[0].size }
+ entries.sort_by!.with_index {|a,i| [-a[0].size, i] }
entries.each do |arr, chkval, expr, min, ptri|
if upper + arr.size > map.size
@@ -299,9 +294,9 @@ module Racc
c.module_eval "def _reduce_none(vals, vstack) vals[0] end"
@grammar.each do |rule|
if rule.action.empty?
- c.funcall(:alias_method, "_reduce_#{rule.ident}", :_reduce_none)
+ c.alias_method("_reduce_#{rule.ident}", :_reduce_none)
else
- c.funcall(:define_method, "_racc_action_#{rule.ident}", &rule.action.proc)
+ c.define_method("_racc_action_#{rule.ident}", &rule.action.proc)
c.module_eval(<<-End, __FILE__, __LINE__ + 1)
def _reduce_#{rule.ident}(vals, vstack)
_racc_action_#{rule.ident}(*vals)
diff --git a/lib/random/formatter.rb b/lib/random/formatter.rb
new file mode 100644
index 0000000000..4dea61c16c
--- /dev/null
+++ b/lib/random/formatter.rb
@@ -0,0 +1,245 @@
+# -*- coding: us-ascii -*-
+# frozen_string_literal: true
+
+# == \Random number formatter.
+#
+# Formats generated random numbers in many manners. When <tt>'random/formatter'</tt>
+# is required, several methods are added to empty core module <tt>Random::Formatter</tt>,
+# making them available as Random's instance and module methods.
+#
+# Standard library SecureRandom is also extended with the module, and the methods
+# described below are available as a module methods in it.
+#
+# === Examples
+#
+# Generate random hexadecimal strings:
+#
+# require 'random/formatter'
+#
+# prng = Random.new
+# prng.hex(10) #=> "52750b30ffbc7de3b362"
+# prng.hex(10) #=> "92b15d6c8dc4beb5f559"
+# prng.hex(13) #=> "39b290146bea6ce975c37cfc23"
+# # or just
+# Random.hex #=> "1aed0c631e41be7f77365415541052ee"
+#
+# Generate random base64 strings:
+#
+# prng.base64(10) #=> "EcmTPZwWRAozdA=="
+# prng.base64(10) #=> "KO1nIU+p9DKxGg=="
+# prng.base64(12) #=> "7kJSM/MzBJI+75j8"
+# Random.base64(4) #=> "bsQ3fQ=="
+#
+# Generate random binary strings:
+#
+# prng.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
+# prng.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"
+# Random.random_bytes(6) #=> "\xA1\xE6Lr\xC43"
+#
+# Generate alphanumeric strings:
+#
+# prng.alphanumeric(10) #=> "S8baxMJnPl"
+# prng.alphanumeric(10) #=> "aOxAg8BAJe"
+# Random.alphanumeric #=> "TmP9OsJHJLtaZYhP"
+#
+# Generate UUIDs:
+#
+# prng.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
+# prng.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
+# Random.uuid #=> "f14e0271-de96-45cc-8911-8910292a42cd"
+#
+# All methods are available in the standard library SecureRandom, too:
+#
+# SecureRandom.hex #=> "05b45376a30c67238eb93b16499e50cf"
+
+module Random::Formatter
+
+ # Generate a random binary string.
+ #
+ # The argument _n_ specifies the length of the result string.
+ #
+ # If _n_ is not specified or is nil, 16 is assumed.
+ # It may be larger in future.
+ #
+ # The result may contain any byte: "\x00" - "\xff".
+ #
+ # require 'random/formatter'
+ #
+ # Random.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6"
+ # # or
+ # prng = Random.new
+ # prng.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97"
+ def random_bytes(n=nil)
+ n = n ? n.to_int : 16
+ gen_random(n)
+ end
+
+ # Generate a random hexadecimal string.
+ #
+ # The argument _n_ specifies the length, in bytes, of the random number to be generated.
+ # The length of the resulting hexadecimal string is twice of _n_.
+ #
+ # If _n_ is not specified or is nil, 16 is assumed.
+ # It may be larger in the future.
+ #
+ # The result may contain 0-9 and a-f.
+ #
+ # require 'random/formatter'
+ #
+ # Random.hex #=> "eb693ec8252cd630102fd0d0fb7c3485"
+ # # or
+ # prng = Random.new
+ # prng.hex #=> "91dc3bfb4de5b11d029d376634589b61"
+ def hex(n=nil)
+ random_bytes(n).unpack1("H*")
+ end
+
+ # Generate a random base64 string.
+ #
+ # The argument _n_ specifies the length, in bytes, of the random number
+ # to be generated. The length of the result string is about 4/3 of _n_.
+ #
+ # If _n_ is not specified or is nil, 16 is assumed.
+ # It may be larger in the future.
+ #
+ # The result may contain A-Z, a-z, 0-9, "+", "/" and "=".
+ #
+ # require 'random/formatter'
+ #
+ # Random.base64 #=> "/2BuBuLf3+WfSKyQbRcc/A=="
+ # # or
+ # prng = Random.new
+ # prng.base64 #=> "6BbW0pxO0YENxn38HMUbcQ=="
+ #
+ # See RFC 3548 for the definition of base64.
+ def base64(n=nil)
+ [random_bytes(n)].pack("m0")
+ end
+
+ # Generate a random URL-safe base64 string.
+ #
+ # The argument _n_ specifies the length, in bytes, of the random number
+ # to be generated. The length of the result string is about 4/3 of _n_.
+ #
+ # If _n_ is not specified or is nil, 16 is assumed.
+ # It may be larger in the future.
+ #
+ # The boolean argument _padding_ specifies the padding.
+ # If it is false or nil, padding is not generated.
+ # Otherwise padding is generated.
+ # By default, padding is not generated because "=" may be used as a URL delimiter.
+ #
+ # The result may contain A-Z, a-z, 0-9, "-" and "_".
+ # "=" is also used if _padding_ is true.
+ #
+ # require 'random/formatter'
+ #
+ # Random.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg"
+ # # or
+ # prng = Random.new
+ # prng.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg"
+ #
+ # prng.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ=="
+ # prng.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg=="
+ #
+ # See RFC 3548 for the definition of URL-safe base64.
+ def urlsafe_base64(n=nil, padding=false)
+ s = [random_bytes(n)].pack("m0")
+ s.tr!("+/", "-_")
+ s.delete!("=") unless padding
+ s
+ end
+
+ # Generate a random v4 UUID (Universally Unique IDentifier).
+ #
+ # require 'random/formatter'
+ #
+ # Random.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
+ # Random.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
+ # # or
+ # prng = Random.new
+ # prng.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b"
+ #
+ # The version 4 UUID is purely random (except the version).
+ # It doesn't contain meaningful information such as MAC addresses, timestamps, etc.
+ #
+ # The result contains 122 random bits (15.25 random bytes).
+ #
+ # See RFC4122[https://datatracker.ietf.org/doc/html/rfc4122] for details of UUID.
+ #
+ def uuid
+ ary = random_bytes(16).unpack("NnnnnN")
+ ary[2] = (ary[2] & 0x0fff) | 0x4000
+ ary[3] = (ary[3] & 0x3fff) | 0x8000
+ "%08x-%04x-%04x-%04x-%04x%08x" % ary
+ end
+
+ private def gen_random(n)
+ self.bytes(n)
+ end
+
+ # Generate a string that randomly draws from a
+ # source array of characters.
+ #
+ # The argument _source_ specifies the array of characters from which
+ # to generate the string.
+ # The argument _n_ specifies the length, in characters, of the string to be
+ # generated.
+ #
+ # The result may contain whatever characters are in the source array.
+ #
+ # require 'random/formatter'
+ #
+ # prng.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron"
+ # prng.choose([*'0'..'9'], 5) #=> "27309"
+ private def choose(source, n)
+ size = source.size
+ m = 1
+ limit = size
+ while limit * size <= 0x100000000
+ limit *= size
+ m += 1
+ end
+ result = ''.dup
+ while m <= n
+ rs = random_number(limit)
+ is = rs.digits(size)
+ (m-is.length).times { is << 0 }
+ result << source.values_at(*is).join('')
+ n -= m
+ end
+ if 0 < n
+ rs = random_number(limit)
+ is = rs.digits(size)
+ if is.length < n
+ (n-is.length).times { is << 0 }
+ else
+ is.pop while n < is.length
+ end
+ result.concat source.values_at(*is).join('')
+ end
+ result
+ end
+
+ ALPHANUMERIC = [*'A'..'Z', *'a'..'z', *'0'..'9']
+ # Generate a random alphanumeric string.
+ #
+ # The argument _n_ specifies the length, in characters, of the alphanumeric
+ # string to be generated.
+ #
+ # If _n_ is not specified or is nil, 16 is assumed.
+ # It may be larger in the future.
+ #
+ # The result may contain A-Z, a-z and 0-9.
+ #
+ # require 'random/formatter'
+ #
+ # Random.alphanumeric #=> "2BuBuLf3WfSKyQbR"
+ # # or
+ # prng = Random.new
+ # prng.alphanumeric(10) #=> "i6K93NdqiH"
+ def alphanumeric(n=nil)
+ n = 16 if n.nil?
+ choose(ALPHANUMERIC, n)
+ end
+end
diff --git a/lib/rdoc.rb b/lib/rdoc.rb
index fc8ad9e144..b62c22576d 100644
--- a/lib/rdoc.rb
+++ b/lib/rdoc.rb
@@ -62,7 +62,7 @@ module RDoc
class Error < RuntimeError; end
- require 'rdoc/version'
+ require_relative 'rdoc/version'
##
# Method visibilities
@@ -120,61 +120,82 @@ module RDoc
end
end
- autoload :RDoc, 'rdoc/rdoc'
+ def self.home
+ rdoc_dir = begin
+ File.expand_path('~/.rdoc')
+ rescue ArgumentError
+ end
+
+ if File.directory?(rdoc_dir)
+ rdoc_dir
+ else
+ begin
+ # XDG
+ xdg_data_home = ENV["XDG_DATA_HOME"] || File.join(File.expand_path("~"), '.local', 'share')
+ unless File.exist?(xdg_data_home)
+ FileUtils.mkdir_p xdg_data_home
+ end
+ File.join xdg_data_home, "rdoc"
+ rescue Errno::EACCES
+ end
+ end
+ end
+
+ autoload :RDoc, "#{__dir__}/rdoc/rdoc"
- autoload :CrossReference, 'rdoc/cross_reference'
- autoload :ERBIO, 'rdoc/erbio'
- autoload :ERBPartial, 'rdoc/erb_partial'
- autoload :Encoding, 'rdoc/encoding'
- autoload :Generator, 'rdoc/generator'
- autoload :Options, 'rdoc/options'
- autoload :Parser, 'rdoc/parser'
- autoload :Servlet, 'rdoc/servlet'
- autoload :RI, 'rdoc/ri'
- autoload :Stats, 'rdoc/stats'
- autoload :Store, 'rdoc/store'
- autoload :Task, 'rdoc/task'
- autoload :Text, 'rdoc/text'
+ autoload :CrossReference, "#{__dir__}/rdoc/cross_reference"
+ autoload :ERBIO, "#{__dir__}/rdoc/erbio"
+ autoload :ERBPartial, "#{__dir__}/rdoc/erb_partial"
+ autoload :Encoding, "#{__dir__}/rdoc/encoding"
+ autoload :Generator, "#{__dir__}/rdoc/generator"
+ autoload :Options, "#{__dir__}/rdoc/options"
+ autoload :Parser, "#{__dir__}/rdoc/parser"
+ autoload :Servlet, "#{__dir__}/rdoc/servlet"
+ autoload :RI, "#{__dir__}/rdoc/ri"
+ autoload :Stats, "#{__dir__}/rdoc/stats"
+ autoload :Store, "#{__dir__}/rdoc/store"
+ autoload :Task, "#{__dir__}/rdoc/task"
+ autoload :Text, "#{__dir__}/rdoc/text"
- autoload :Markdown, 'rdoc/markdown'
- autoload :Markup, 'rdoc/markup'
- autoload :RD, 'rdoc/rd'
- autoload :TomDoc, 'rdoc/tom_doc'
+ autoload :Markdown, "#{__dir__}/rdoc/markdown"
+ autoload :Markup, "#{__dir__}/rdoc/markup"
+ autoload :RD, "#{__dir__}/rdoc/rd"
+ autoload :TomDoc, "#{__dir__}/rdoc/tom_doc"
- autoload :KNOWN_CLASSES, 'rdoc/known_classes'
+ autoload :KNOWN_CLASSES, "#{__dir__}/rdoc/known_classes"
- autoload :TokenStream, 'rdoc/token_stream'
+ autoload :TokenStream, "#{__dir__}/rdoc/token_stream"
- autoload :Comment, 'rdoc/comment'
+ autoload :Comment, "#{__dir__}/rdoc/comment"
- require 'rdoc/i18n'
+ require_relative 'rdoc/i18n'
# code objects
#
# We represent the various high-level code constructs that appear in Ruby
# programs: classes, modules, methods, and so on.
- autoload :CodeObject, 'rdoc/code_object'
-
- autoload :Context, 'rdoc/context'
- autoload :TopLevel, 'rdoc/top_level'
-
- autoload :AnonClass, 'rdoc/anon_class'
- autoload :ClassModule, 'rdoc/class_module'
- autoload :NormalClass, 'rdoc/normal_class'
- autoload :NormalModule, 'rdoc/normal_module'
- autoload :SingleClass, 'rdoc/single_class'
-
- autoload :Alias, 'rdoc/alias'
- autoload :AnyMethod, 'rdoc/any_method'
- autoload :MethodAttr, 'rdoc/method_attr'
- autoload :GhostMethod, 'rdoc/ghost_method'
- autoload :MetaMethod, 'rdoc/meta_method'
- autoload :Attr, 'rdoc/attr'
-
- autoload :Constant, 'rdoc/constant'
- autoload :Mixin, 'rdoc/mixin'
- autoload :Include, 'rdoc/include'
- autoload :Extend, 'rdoc/extend'
- autoload :Require, 'rdoc/require'
+ autoload :CodeObject, "#{__dir__}/rdoc/code_object"
+
+ autoload :Context, "#{__dir__}/rdoc/context"
+ autoload :TopLevel, "#{__dir__}/rdoc/top_level"
+
+ autoload :AnonClass, "#{__dir__}/rdoc/anon_class"
+ autoload :ClassModule, "#{__dir__}/rdoc/class_module"
+ autoload :NormalClass, "#{__dir__}/rdoc/normal_class"
+ autoload :NormalModule, "#{__dir__}/rdoc/normal_module"
+ autoload :SingleClass, "#{__dir__}/rdoc/single_class"
+
+ autoload :Alias, "#{__dir__}/rdoc/alias"
+ autoload :AnyMethod, "#{__dir__}/rdoc/any_method"
+ autoload :MethodAttr, "#{__dir__}/rdoc/method_attr"
+ autoload :GhostMethod, "#{__dir__}/rdoc/ghost_method"
+ autoload :MetaMethod, "#{__dir__}/rdoc/meta_method"
+ autoload :Attr, "#{__dir__}/rdoc/attr"
+
+ autoload :Constant, "#{__dir__}/rdoc/constant"
+ autoload :Mixin, "#{__dir__}/rdoc/mixin"
+ autoload :Include, "#{__dir__}/rdoc/include"
+ autoload :Extend, "#{__dir__}/rdoc/extend"
+ autoload :Require, "#{__dir__}/rdoc/require"
end
diff --git a/lib/rdoc/any_method.rb b/lib/rdoc/any_method.rb
index 9b0d309653..051f946a10 100644
--- a/lib/rdoc/any_method.rb
+++ b/lib/rdoc/any_method.rb
@@ -26,12 +26,9 @@ class RDoc::AnyMethod < RDoc::MethodAttr
attr_accessor :c_function
- ##
- # Different ways to call this method
+ # The section title of the method (if defined in a C file via +:category:+)
+ attr_accessor :section_title
- attr_reader :call_seq
-
- ##
# Parameters for this method
attr_accessor :params
@@ -94,6 +91,19 @@ class RDoc::AnyMethod < RDoc::MethodAttr
end
##
+ # Different ways to call this method
+
+ def call_seq
+ unless call_seq = _call_seq
+ call_seq = is_alias_for._call_seq if is_alias_for
+ end
+
+ return unless call_seq
+
+ deduplicate_call_seq(call_seq)
+ end
+
+ ##
# Sets the different ways you can call this method. If an empty +call_seq+
# is given nil is assumed.
#
@@ -312,5 +322,43 @@ class RDoc::AnyMethod < RDoc::MethodAttr
@superclass_method
end
-end
+ protected
+
+ ##
+ # call_seq without deduplication and alias lookup.
+ def _call_seq
+ @call_seq if defined?(@call_seq) && @call_seq
+ end
+
+ private
+
+ ##
+ # call_seq with alias examples information removed, if this
+ # method is an alias method.
+
+ def deduplicate_call_seq(call_seq)
+ return call_seq unless is_alias_for || !aliases.empty?
+
+ method_name = self.name
+ method_name = method_name[0, 1] if method_name =~ /\A\[/
+
+ entries = call_seq.split "\n"
+
+ ignore = aliases.map(&:name)
+ if is_alias_for
+ ignore << is_alias_for.name
+ ignore.concat is_alias_for.aliases.map(&:name)
+ end
+ ignore.map! { |n| n =~ /\A\[/ ? /\[.*\]/ : n}
+ ignore.delete(method_name)
+ ignore = Regexp.union(ignore)
+
+ matching = entries.reject do |entry|
+ entry =~ /^\w*\.?#{ignore}[$\(\s]/ or
+ entry =~ /\s#{ignore}\s/
+ end
+
+ matching.empty? ? nil : matching.join("\n")
+ end
+end
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb
index 434a25ac7f..d5f2f920ad 100644
--- a/lib/rdoc/code_objects.rb
+++ b/lib/rdoc/code_objects.rb
@@ -2,5 +2,4 @@
# This file was used to load all the RDoc::CodeObject subclasses at once. Now
# autoload handles this.
-require 'rdoc'
-
+require_relative '../rdoc'
diff --git a/lib/rdoc/context.rb b/lib/rdoc/context.rb
index 6caf0d6712..c6edfb473c 100644
--- a/lib/rdoc/context.rb
+++ b/lib/rdoc/context.rb
@@ -1,6 +1,4 @@
# frozen_string_literal: true
-require 'cgi'
-
##
# A Context is something that can hold modules, classes, methods, attributes,
# aliases, requires, and includes. Classes, modules, and files are all
@@ -992,11 +990,19 @@ class RDoc::Context < RDoc::CodeObject
##
# Instance methods
+
+ def instance_methods
+ @instance_methods ||= method_list.reject { |a| a.singleton }
+ end
+
+ ##
+ # Instance methods
#--
- # TODO rename to instance_methods
+ # TODO remove this later
def instance_method_list
- @instance_method_list ||= method_list.reject { |a| a.singleton }
+ warn '#instance_method_list is obsoleted, please use #instance_methods'
+ @instance_methods ||= method_list.reject { |a| a.singleton }
end
##
@@ -1253,6 +1259,6 @@ class RDoc::Context < RDoc::CodeObject
klass
end
- autoload :Section, 'rdoc/context/section'
+ autoload :Section, "#{__dir__}/context/section"
end
diff --git a/lib/rdoc/context/section.rb b/lib/rdoc/context/section.rb
index 11f9ceaf87..c316efe99f 100644
--- a/lib/rdoc/context/section.rb
+++ b/lib/rdoc/context/section.rb
@@ -1,4 +1,6 @@
# frozen_string_literal: true
+require 'cgi/util'
+
##
# A section of documentation like:
#
@@ -34,8 +36,6 @@ class RDoc::Context::Section
attr_reader :title
- @@sequence = "SEC00000"
-
##
# Creates a new section with +title+ and +comment+
@@ -43,9 +43,6 @@ class RDoc::Context::Section
@parent = parent
@title = title ? title.strip : title
- @@sequence = @@sequence.succ
- @sequence = @@sequence.dup
-
@comments = []
add_comment comment
@@ -233,13 +230,5 @@ class RDoc::Context::Section
end
end
- ##
- # Section sequence number (deprecated)
-
- def sequence
- warn "RDoc::Context::Section#sequence is deprecated, use #aref"
- @sequence
- end
-
end
diff --git a/lib/rdoc/cross_reference.rb b/lib/rdoc/cross_reference.rb
index 07ba14c5c3..319bbc02ac 100644
--- a/lib/rdoc/cross_reference.rb
+++ b/lib/rdoc/cross_reference.rb
@@ -1,4 +1,7 @@
# frozen_string_literal: true
+
+require_relative 'markup/attribute_manager' # for PROTECT_ATTR
+
##
# RDoc::CrossReference is a reusable way to create cross references for names.
@@ -15,11 +18,24 @@ class RDoc::CrossReference
CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Z]\w*(?:\:\:\w+)*)'
##
+ # Regular expression to match a single method argument.
+
+ METHOD_ARG_REGEXP_STR = '[\w.+*/=<>-]+'
+
+ ##
+ # Regular expression to match method arguments.
+
+ METHOD_ARGS_REGEXP_STR = /(?:\((?:#{METHOD_ARG_REGEXP_STR}(?:,\s*#{METHOD_ARG_REGEXP_STR})*)?\))?/.source
+
+ ##
# Regular expression to match method references.
#
# See CLASS_REGEXP_STR
- METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
+ METHOD_REGEXP_STR = /(
+ (?!\d)[\w#{RDoc::Markup::AttributeManager::PROTECT_ATTR}]+[!?=]?|
+ %|=(?:==?|~)|![=~]|\[\]=?|<(?:<|=>?)?|>[>=]?|[-+!]@?|\*\*?|[\/%\`|&^~]
+ )#{METHOD_ARGS_REGEXP_STR}/.source.delete("\n ").freeze
##
# Regular expressions matching text that should potentially have
@@ -34,12 +50,6 @@ class RDoc::CrossReference
# A::B::C.meth
#{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}
- # Stand-alone method (preceded by a #)
- | \\?\##{METHOD_REGEXP_STR}
-
- # Stand-alone method (preceded by ::)
- | ::#{METHOD_REGEXP_STR}
-
# A::B::C
# The stuff after CLASS_REGEXP_STR is a
# nasty hack. CLASS_REGEXP_STR unfortunately matches
@@ -56,6 +66,12 @@ class RDoc::CrossReference
# marker.
| #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z)
+ # Stand-alone method (preceded by a #)
+ | \\?\##{METHOD_REGEXP_STR}
+
+ # Stand-alone method (preceded by ::)
+ | ::#{METHOD_REGEXP_STR}
+
# Things that look like filenames
# The key thing is that there must be at least
# one special character (period, slash, or
@@ -82,12 +98,12 @@ class RDoc::CrossReference
# A::B::C.meth
#{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}
- # Stand-alone method
- | \\?#{METHOD_REGEXP_STR}
-
# A::B::C
| #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z)
+ # Stand-alone method
+ | \\?#{METHOD_REGEXP_STR}
+
# Things that look like filenames
| (?:\.\.\/)*[-\/\w]+[_\/.][-\w\/.]+
@@ -115,15 +131,8 @@ class RDoc::CrossReference
@seen = {}
end
- ##
- # Returns a reference to +name+.
- #
- # If the reference is found and +name+ is not documented +text+ will be
- # returned. If +name+ is escaped +name+ is returned. If +name+ is not
- # found +text+ is returned.
-
- def resolve name, text
- return @seen[name] if @seen.include? name
+ def resolve_method name
+ ref = nil
if /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then
type = $2
@@ -165,15 +174,30 @@ class RDoc::CrossReference
end
end
+ ref
+ end
+
+ ##
+ # Returns a reference to +name+.
+ #
+ # If the reference is found and +name+ is not documented +text+ will be
+ # returned. If +name+ is escaped +name+ is returned. If +name+ is not
+ # found +text+ is returned.
+
+ def resolve name, text
+ return @seen[name] if @seen.include? name
+
ref = case name
when /^\\(#{CLASS_REGEXP_STR})$/o then
@context.find_symbol $1
else
@context.find_symbol name
- end unless ref
+ end
+
+ ref = resolve_method name unless ref
# Try a page name
- ref = @store.page name if not ref and name =~ /^\w+$/
+ ref = @store.page name if not ref and name =~ /^[\w.]+$/
ref = nil if RDoc::Alias === ref # external alias, can't link to it
diff --git a/lib/rdoc/erb_partial.rb b/lib/rdoc/erb_partial.rb
index 8dc2c46013..d6e3f41b7e 100644
--- a/lib/rdoc/erb_partial.rb
+++ b/lib/rdoc/erb_partial.rb
@@ -12,7 +12,7 @@ class RDoc::ERBPartial < ERB
def set_eoutvar compiler, eoutvar = '_erbout'
super
- compiler.pre_cmd = ["#{eoutvar} ||= ''"]
+ compiler.pre_cmd = ["#{eoutvar} ||= +''"]
end
end
diff --git a/lib/rdoc/erbio.rb b/lib/rdoc/erbio.rb
index 820a25ae01..0d5f96e133 100644
--- a/lib/rdoc/erbio.rb
+++ b/lib/rdoc/erbio.rb
@@ -20,11 +20,11 @@ class RDoc::ERBIO < ERB
##
# Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
- def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io'
+ def initialize str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io'
if RUBY_VERSION >= '2.6'
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
else
- super
+ super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
end
end
diff --git a/lib/rdoc/generator.rb b/lib/rdoc/generator.rb
index 340dcbf7ae..a769cf8ac0 100644
--- a/lib/rdoc/generator.rb
+++ b/lib/rdoc/generator.rb
@@ -41,11 +41,11 @@
module RDoc::Generator
- autoload :Markup, 'rdoc/generator/markup'
+ autoload :Markup, "#{__dir__}/generator/markup"
- autoload :Darkfish, 'rdoc/generator/darkfish'
- autoload :JsonIndex, 'rdoc/generator/json_index'
- autoload :RI, 'rdoc/generator/ri'
- autoload :POT, 'rdoc/generator/pot'
+ autoload :Darkfish, "#{__dir__}/generator/darkfish"
+ autoload :JsonIndex, "#{__dir__}/generator/json_index"
+ autoload :RI, "#{__dir__}/generator/ri"
+ autoload :POT, "#{__dir__}/generator/pot"
end
diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb
index c5d47ef355..60e0265e8c 100644
--- a/lib/rdoc/generator/darkfish.rb
+++ b/lib/rdoc/generator/darkfish.rb
@@ -4,7 +4,7 @@
require 'erb'
require 'fileutils'
require 'pathname'
-require 'rdoc/generator/markup'
+require_relative 'markup'
##
# Darkfish RDoc HTML Generator
@@ -220,8 +220,8 @@ class RDoc::Generator::Darkfish
install_rdoc_static_file @template_dir + item, "./#{item}", options
end
- @options.template_stylesheets.each do |stylesheet|
- FileUtils.cp stylesheet, '.', options
+ unless @options.template_stylesheets.empty?
+ FileUtils.cp @options.template_stylesheets, '.', **options
end
Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path|
@@ -779,9 +779,9 @@ class RDoc::Generator::Darkfish
end
if RUBY_VERSION >= '2.6'
- template = klass.new template, trim_mode: '<>', eoutvar: erbout
+ template = klass.new template, trim_mode: '-', eoutvar: erbout
else
- template = klass.new template, nil, '<>', erbout
+ template = klass.new template, nil, '-', erbout
end
@template_cache[file] = template
template
diff --git a/lib/rdoc/generator/markup.rb b/lib/rdoc/generator/markup.rb
index 41e132450d..b54265717c 100644
--- a/lib/rdoc/generator/markup.rb
+++ b/lib/rdoc/generator/markup.rb
@@ -109,7 +109,7 @@ class RDoc::MethodAttr
lines.shift if src =~ /\A.*#\ *File/i # remove '# File' comment
lines.each do |line|
if line =~ /^ *(?=\S)/
- n = $&.length
+ n = $~.end(0)
indent = n if n < indent
break if n == 0
end
diff --git a/lib/rdoc/generator/pot.rb b/lib/rdoc/generator/pot.rb
index a12cba7505..bee1133b07 100644
--- a/lib/rdoc/generator/pot.rb
+++ b/lib/rdoc/generator/pot.rb
@@ -91,8 +91,8 @@ class RDoc::Generator::POT
extractor.extract
end
- require 'rdoc/generator/pot/message_extractor'
- require 'rdoc/generator/pot/po'
- require 'rdoc/generator/pot/po_entry'
+ require_relative 'pot/message_extractor'
+ require_relative 'pot/po'
+ require_relative 'pot/po_entry'
end
diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml
index 8304310d4b..d5aed3e9ef 100644
--- a/lib/rdoc/generator/template/darkfish/_head.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_head.rhtml
@@ -3,21 +3,18 @@
<title><%= h @title %></title>
<script type="text/javascript">
- var rdoc_rel_prefix = "<%= asset_rel_prefix %>/";
- var index_rel_prefix = "<%= rel_prefix %>/";
+ var rdoc_rel_prefix = "<%= h asset_rel_prefix %>/";
+ var index_rel_prefix = "<%= h rel_prefix %>/";
</script>
-<script src="<%= asset_rel_prefix %>/js/navigation.js" defer></script>
-<script src="<%= asset_rel_prefix %>/js/search.js" defer></script>
-<script src="<%= asset_rel_prefix %>/js/search_index.js" defer></script>
-<script src="<%= asset_rel_prefix %>/js/searcher.js" defer></script>
-<script src="<%= asset_rel_prefix %>/js/darkfish.js" defer></script>
-
-<link href="<%= asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
-<link href="<%= asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
-<% if @options.template_stylesheets.flatten.any? then %>
-<% @options.template_stylesheets.flatten.each do |stylesheet| %>
-<link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
-<% end %>
-<% end %>
+<script src="<%= h asset_rel_prefix %>/js/navigation.js" defer></script>
+<script src="<%= h asset_rel_prefix %>/js/search.js" defer></script>
+<script src="<%= h asset_rel_prefix %>/js/search_index.js" defer></script>
+<script src="<%= h asset_rel_prefix %>/js/searcher.js" defer></script>
+<script src="<%= h asset_rel_prefix %>/js/darkfish.js" defer></script>
+<link href="<%= h asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
+<link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
+<%- @options.template_stylesheets.each do |stylesheet| -%>
+<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml
index e889f8063d..22a12d9e95 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml
@@ -1,4 +1,4 @@
-<% if !svninfo.empty? then %>
+<%- if !svninfo.empty? then %>
<div id="file-svninfo-section" class="nav-section">
<h3>VCS Info</h3>
@@ -16,4 +16,4 @@
</dl>
</div>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml
index fe54d8339f..d3d8da4017 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml
@@ -1,9 +1,33 @@
<div id="classindex-section" class="nav-section">
<h3>Class and Module Index</h3>
+ <%-
+ all_classes = @classes.group_by do |klass|
+ klass.full_name[/\A[^:]++(?:::[^:]++(?=::))*+(?=::[^:]*+\z)/]
+ end.delete_if do |_, klasses|
+ !klasses.any?(&:display?)
+ end
+ link = proc do |index_klass, display = index_klass.display?|
+ if display
+ -%><code><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.name %></a></code><%-
+ else
+ -%><code><%= index_klass.name %></code><%-
+ end
+ end
+ if top = all_classes[nil]
+ solo = top.one? {|klass| klass.display?}
+ traverse = proc do |klasses| -%>
<ul class="link-list">
- <% @modsort.each do |index_klass| %>
- <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a>
- <% end %>
- </ul>
+ <%- klasses.each do |index_klass| -%>
+ <%- if children = all_classes[index_klass.full_name] -%>
+ <li><details<% if solo; solo = false %> open<% end %>><summary><% link.call(index_klass) %></summary>
+ <%- traverse.call(children) -%>
+ </ul></details>
+ <%- elsif index_klass.display? -%>
+ <li><% link.call(index_klass, true) %>
+ <%- end -%>
+ <%- end -%>
+ <%- end -%>
+ <%- traverse.call(top) -%>
+ <%- end -%>
</div>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml
index 2bd8efee99..7602076c96 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml
@@ -1,15 +1,15 @@
-<% unless klass.extends.empty? then %>
+<%- unless klass.extends.empty? then %>
<div id="extends-section" class="nav-section">
<h3>Extended With Modules</h3>
<ul class="link-list">
- <% klass.each_extend do |ext| %>
- <% unless String === ext.module then %>
+ <%- klass.each_extend do |ext| -%>
+ <%- unless String === ext.module then -%>
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
- <% else %>
+ <%- else -%>
<li><span class="extend"><%= ext.name %></span>
- <% end %>
- <% end %>
+ <%- end -%>
+ <%- end -%>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml
index 0ba1d2be80..74869a4b51 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml
@@ -2,8 +2,8 @@
<h3>Defined In</h3>
<ul>
-<% klass.in_files.each do |tl| %>
+<%- klass.in_files.each do |tl| -%>
<li><%= h tl.relative_name %>
-<% end %>
+<%- end -%>
</ul>
</div>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml
index d141098ecd..5b600e5975 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml
@@ -1,15 +1,15 @@
-<% unless klass.includes.empty? then %>
+<%- unless klass.includes.empty? then %>
<div id="includes-section" class="nav-section">
<h3>Included Modules</h3>
<ul class="link-list">
- <% klass.each_include do |inc| %>
- <% unless String === inc.module then %>
+ <%- klass.each_include do |inc| -%>
+ <%- unless String === inc.module then -%>
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
- <% else %>
+ <%- else -%>
<li><span class="include"><%= inc.name %></span>
- <% end %>
- <% end %>
+ <%- end -%>
+ <%- end -%>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml
index 1285bfd732..faed7e0a94 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml
@@ -2,14 +2,14 @@
<h3>Documentation</h3>
<ul>
- <% installed.each do |name, href, exists, type, _| %>
- <% next if type == :extra %>
+ <%- installed.each do |name, href, exists, type, _| -%>
+ <%- next if type == :extra -%>
<li class="folder">
- <% if exists then %>
+ <%- if exists then -%>
<a href="<%= href %>"><%= h name %></a>
- <% else %>
+ <%- else -%>
<%= h name %>
- <% end %>
- <% end %>
+ <%- end -%>
+ <%- end -%>
</ul>
</div>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
index 45df08d8fe..5b4c295bed 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
@@ -1,12 +1,12 @@
-<% unless klass.method_list.empty? then %>
+<%- unless klass.method_list.empty? then %>
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
<h3>Methods</h3>
<ul class="link-list" role="directory">
- <% klass.each_method do |meth| %>
- <li <% if meth.calls_super %>class="calls-super" <% end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name %></a>
- <% end %>
+ <%- klass.each_method do |meth| -%>
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a>
+ <%- end -%>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
index 5f39825f08..3f68f0c0dc 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
@@ -1,12 +1,32 @@
-<% simple_files = @files.select { |f| f.text? } %>
-<% unless simple_files.empty? then %>
+<%- simple_files = @files.select { |f| f.text? } %>
+<%- if defined?(current) -%>
+ <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
+<%- end -%>
+<%- unless simple_files.empty? then -%>
<div id="fileindex-section" class="nav-section">
<h3>Pages</h3>
<ul class="link-list">
- <% simple_files.each do |f| %>
- <li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a>
- <% end %>
+ <%- simple_files.group_by do |f| -%>
+ <%- f.full_name[%r{\A[^/]+(?=/)}] || f.page_name -%>
+ <%- end.each do |n, files| -%>
+ <%- f = files.shift -%>
+ <%- if files.empty? -%>
+ <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
+ <%- next -%>
+ <%- end -%>
+ <li><details<% if dir == n %> open<% end %>><summary><%
+ if n == f.page_name
+ %><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a><%
+ else
+ %><%= h n %><% files.unshift(f)
+ end %></summary>
+ <ul class="link-list">
+ <%- files.each do |f| -%>
+ <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
+ <%- end -%>
+ </ul></details>
+ <%- end -%>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
index cc04852652..1420da3201 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
@@ -1,11 +1,11 @@
-<% if klass.type == 'class' then %>
+<%- if klass.type == 'class' then %>
<div id="parent-class-section" class="nav-section">
<h3>Parent</h3>
- <% if klass.superclass and not String === klass.superclass then %>
+ <%- if klass.superclass and not String === klass.superclass then -%>
<p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
- <% else %>
+ <%- else -%>
<p class="link"><%= klass.superclass %>
- <% end %>
+ <%- end -%>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
index 15ff78ba91..6dcd2ae81f 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
@@ -1,11 +1,11 @@
-<% unless klass.sections.length == 1 then %>
+<%- unless klass.sections.length == 1 then %>
<div id="sections-section" class="nav-section">
<h3>Sections</h3>
<ul class="link-list" role="directory">
- <% klass.sort_sections.each do |section| %>
+ <%- klass.sort_sections.each do |section| -%>
<li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
- <% end %>
+ <%- end -%>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
index b58e6b3c61..b1e047b5f7 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
@@ -1,18 +1,39 @@
-<% comment = if current.respond_to? :comment_location then
+<%- comment = if current.respond_to? :comment_location then
current.comment_location
else
current.comment
end
- table = current.parse(comment).table_of_contents
+ table = current.parse(comment).table_of_contents.dup
if table.length > 1 then %>
<div class="nav-section">
<h3>Table of Contents</h3>
+ <%- display_link = proc do |heading| -%>
+ <a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
+ <%- end -%>
+
+ <%- list_siblings = proc do -%>
+ <%- level = table.first&.level -%>
+ <%- while table.first && table.first.level >= level -%>
+ <%- heading = table.shift -%>
+ <%- if table.first.nil? || table.first.level <= heading.level -%>
+ <li><% display_link.call heading -%>
+ <%- else -%>
+ <li>
+ <details open>
+ <summary><%- display_link.call heading -%></summary>
+ <ul class="link-list" role="directory">
+ <% list_siblings.call %>
+ </ul>
+ </details>
+ </li>
+ <%- end -%>
+ <%- end -%>
+ <%- end -%>
+
<ul class="link-list" role="directory">
-<% table.each do |heading| %>
- <li><a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
-<% end %>
+ <% list_siblings.call %>
</ul>
</div>
-<% end %>
+<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml
index 7733095086..97d175dddc 100644
--- a/lib/rdoc/generator/template/darkfish/class.rhtml
+++ b/lib/rdoc/generator/template/darkfish/class.rhtml
@@ -25,9 +25,9 @@
<%= klass.description %>
</section>
- <% klass.each_section do |section, constants, attributes| %>
+ <%- klass.each_section do |section, constants, attributes| -%>
<section id="<%= section.aref %>" class="documentation-section">
- <% if section.title then %>
+ <%- if section.title then -%>
<header class="documentation-section-title">
<h2>
<%= section.title %>
@@ -36,39 +36,39 @@
<a href="#top">&uarr; top</a>
</span>
</header>
- <% end %>
+ <%- end -%>
- <% if section.comment then %>
+ <%- if section.comment then -%>
<div>
<%= section.description %>
</div>
- <% end %>
+ <%- end -%>
- <% unless constants.empty? then %>
+ <%- unless constants.empty? then -%>
<section class="constants-list">
<header>
<h3>Constants</h3>
</header>
<dl>
- <% constants.each do |const| %>
+ <%- constants.each do |const| -%>
<dt id="<%= const.name %>"><%= const.name %>
- <% if const.comment then %>
+ <%- if const.comment then -%>
<dd><%= const.description.strip %>
- <% else %>
+ <%- else -%>
<dd class="missing-docs">(Not documented)
- <% end %>
- <% end %>
+ <%- end -%>
+ <%- end -%>
</dl>
</section>
- <% end %>
+ <%- end -%>
- <% unless attributes.empty? then %>
+ <%- unless attributes.empty? then -%>
<section class="attribute-method-details" class="method-section">
<header>
<h3>Attributes</h3>
</header>
- <% attributes.each do |attrib| %>
+ <%- attributes.each do |attrib| -%>
<div id="<%= attrib.aref %>" class="method-detail">
<div class="method-heading attribute-method-heading">
<span class="method-name"><%= h attrib.name %></span><span
@@ -76,18 +76,18 @@
</div>
<div class="method-description">
- <% if attrib.comment then %>
+ <%- if attrib.comment then -%>
<%= attrib.description.strip %>
- <% else %>
+ <%- else -%>
<p class="missing-docs">(Not documented)
- <% end %>
+ <%- end -%>
</div>
</div>
- <% end %>
+ <%- end -%>
</section>
- <% end %>
+ <%- end -%>
- <% klass.methods_by_type(section).each do |type, visibilities|
+ <%- klass.methods_by_type(section).each do |type, visibilities|
next if visibilities.empty?
visibilities.each do |visibility, methods|
next if methods.empty? %>
@@ -96,38 +96,40 @@
<h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
</header>
- <% methods.each do |method| %>
+ <%- methods.each do |method| -%>
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
- <% if method.call_seq then %>
- <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
- <div class="method-heading">
- <span class="method-callseq">
- <%= h(call_seq.strip.
- gsub( /^\w+\./m, '')).
- gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
- </span>
- <% if i == 0 and method.token_stream then %>
- <span class="method-click-advice">click to toggle source</span>
- <% end %>
- </div>
- <% end %>
- <% else %>
- <div class="method-heading">
- <span class="method-name"><%= h method.name %></span><span
- class="method-args"><%= h method.param_seq %></span>
- <% if method.token_stream then %>
- <span class="method-click-advice">click to toggle source</span>
- <% end %>
+ <div class="method-header">
+ <%- if (call_seq = method.call_seq) then -%>
+ <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
+ <div class="method-heading">
+ <span class="method-callseq">
+ <%= h(call_seq.strip.
+ gsub( /^\w+\./m, '')).
+ gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
+ </span>
+ <%- if i == 0 and method.token_stream then -%>
+ <span class="method-click-advice">click to toggle source</span>
+ <%- end -%>
+ </div>
+ <%- end -%>
+ <%- else -%>
+ <div class="method-heading">
+ <span class="method-name"><%= h method.name %></span><span
+ class="method-args"><%= h method.param_seq %></span>
+ <%- if method.token_stream then -%>
+ <span class="method-click-advice">click to toggle source</span>
+ <%- end -%>
+ </div>
+ <%- end -%>
</div>
- <% end %>
<div class="method-description">
- <% if method.comment then %>
+ <%- if method.comment then -%>
<%= method.description.strip %>
- <% else %>
+ <%- else -%>
<p class="missing-docs">(Not documented)
- <% end %>
- <% if method.calls_super then %>
+ <%- end -%>
+ <%- if method.calls_super then -%>
<div class="method-calls-super">
Calls superclass method
<%=
@@ -135,16 +137,16 @@
method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
%>
</div>
- <% end %>
+ <%- end -%>
- <% if method.token_stream then %>
+ <%- if method.token_stream then -%>
<div class="method-source-code" id="<%= method.html_name %>-source">
<pre><%= method.markup_code %></pre>
</div>
- <% end %>
+ <%- end -%>
</div>
- <% unless method.aliases.empty? then %>
+ <%- unless method.aliases.empty? then -%>
<div class="aliases">
Also aliased as: <%= method.aliases.map do |aka|
if aka.parent then # HACK lib/rexml/encodings
@@ -154,19 +156,19 @@
end
end.join ", " %>
</div>
- <% end %>
+ <%- end -%>
- <% if method.is_alias_for then %>
+ <%- if method.is_alias_for then -%>
<div class="aliases">
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
</div>
- <% end %>
+ <%- end -%>
</div>
- <% end %>
+ <%- end -%>
</section>
- <% end
+ <%- end
end %>
</section>
-<% end %>
+<%- end -%>
</main>
diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css
index a52e44ff8f..1be815f503 100644
--- a/lib/rdoc/generator/template/darkfish/css/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css
@@ -79,6 +79,25 @@ pre {
border-radius: 0.2em;
}
+table {
+ margin: 0;
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+table tr th, table tr td {
+ padding: 0.2em 0.4em;
+ border: 1px solid #ccc;
+}
+
+table tr th {
+ background-color: #eceaed;
+}
+
+table tr:nth-child(even) td {
+ background-color: #f5f4f6;
+}
+
/* @group Generic Classes */
.initially-hidden {
@@ -166,6 +185,11 @@ nav {
width: 260px;
font-family: Helvetica, sans-serif;
font-size: 14px;
+ border-right: 1px solid #ccc;
+ position: sticky;
+ top: 0;
+ overflow: auto;
+ height: calc(100vh - 100px); /* reduce the footer height */
}
main {
@@ -276,7 +300,7 @@ ul.link-list .type {
-webkit-border-radius: 5px;
}
-dl.label-list dt {
+dl.note-list dt {
float: left;
margin-right: 1em;
}
@@ -285,6 +309,25 @@ dl.label-list dt {
background: url(../images/arrow_up.png) no-repeat right center;
}
+.nav-section details summary {
+ display: block;
+}
+
+.nav-section details summary::-webkit-details-marker {
+ display: none;
+}
+
+.nav-section details summary:before {
+ content: "";
+}
+
+.nav-section details summary:after {
+ content: " \25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
+}
+.nav-section details[open] > summary:after {
+ content: " \25BD"; /* WHITE DOWN-POINTING TRIANGLE */
+}
+
/* @end */
/* @group Documentation Section */
@@ -462,7 +505,7 @@ main header h3 {
main .method-source-code {
max-height: 0;
- overflow: hidden;
+ overflow: auto;
transition-duration: 200ms;
transition-delay: 0ms;
transition-property: all;
diff --git a/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf b/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf
index 61e3090c1c..dd00982d49 100644
--- a/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf
+++ b/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf
Binary files differ
diff --git a/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf b/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf
index 85686d967d..1decfb95af 100644
--- a/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf
+++ b/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf
Binary files differ
diff --git a/lib/rdoc/generator/template/darkfish/index.rhtml b/lib/rdoc/generator/template/darkfish/index.rhtml
index 7d1c74807b..423e225b68 100644
--- a/lib/rdoc/generator/template/darkfish/index.rhtml
+++ b/lib/rdoc/generator/template/darkfish/index.rhtml
@@ -13,11 +13,10 @@
</nav>
<main role="main">
-<% if @options.main_page and
+<%- if @options.main_page and
main_page = @files.find { |f| f.full_name == @options.main_page } then %>
<%= main_page.description %>
-<% else %>
-<p>This is the API documentation for <%= @title %>.
-<% end %>
+<%- else -%>
+<p>This is the API documentation for <%= h @title %>.
+<%- end -%>
</main>
-
diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js
index 111bbf8eb9..d0c9467751 100644
--- a/lib/rdoc/generator/template/darkfish/js/darkfish.js
+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js
@@ -54,7 +54,7 @@ function hookSearch() {
var html = '';
// TODO add relative path to <script> per-page
- html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
+ html += '<p class="search-match"><a href="' + index_rel_prefix + this.escapeHTML(result.path) + '">' + this.hlt(result.title);
if (result.params)
html += '<span class="params">' + result.params + '</span>';
html += '</a>';
diff --git a/lib/rdoc/generator/template/darkfish/js/search.js b/lib/rdoc/generator/template/darkfish/js/search.js
index b558ca5b4f..58e52afecf 100644
--- a/lib/rdoc/generator/template/darkfish/js/search.js
+++ b/lib/rdoc/generator/template/darkfish/js/search.js
@@ -101,7 +101,7 @@ Search.prototype = Object.assign({}, Navigation, new function() {
}
this.escapeHTML = function(html) {
- return html.replace(/[&<>]/g, function(c) {
+ return html.replace(/[&<>"`']/g, function(c) {
return '&#' + c.charCodeAt(0) + ';';
});
}
diff --git a/lib/rdoc/generator/template/darkfish/servlet_root.rhtml b/lib/rdoc/generator/template/darkfish/servlet_root.rhtml
index 3a33659aea..cab3092b17 100644
--- a/lib/rdoc/generator/template/darkfish/servlet_root.rhtml
+++ b/lib/rdoc/generator/template/darkfish/servlet_root.rhtml
@@ -19,28 +19,28 @@
<p>Here you can browse local documentation from the ruby standard library and
your installed gems.
-<% extra_dirs = installed.select { |_, _, _, type,| type == :extra } %>
-<% unless extra_dirs.empty? %>
+<%- extra_dirs = installed.select { |_, _, _, type,| type == :extra } -%>
+<%- unless extra_dirs.empty? -%>
<h2>Extra Documentation Directories</h2>
<p>The following additional documentation directories are available:</p>
<ol>
- <% extra_dirs.each do |name, href, exists, _, path| %>
+ <%- extra_dirs.each do |name, href, exists, _, path| -%>
<li>
- <% if exists %>
+ <%- if exists -%>
<a href="<%= href %>"><%= h name %></a> (<%= h path %>)
- <% else %>
+ <%- else -%>
<%= h name %> (<%= h path %>; <i>not available</i>)
- <% end %>
+ <%- end -%>
</li>
- <% end %>
+ <%- end -%>
</ol>
-<% end %>
+<%- end -%>
-<% gems = installed.select { |_, _, _, type,| type == :gem } %>
-<% missing = gems.reject { |_, _, exists,| exists } %>
-<% unless missing.empty? then %>
+<%- gems = installed.select { |_, _, _, type,| type == :gem } -%>
+<%- missing = gems.reject { |_, _, exists,| exists } -%>
+<%- unless missing.empty? then -%>
<h2>Missing Gem Documentation</h2>
<p>You are missing documentation for some of your installed gems.
@@ -53,11 +53,10 @@
the following commands.
<ul>
- <% names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq %>
- <% names.each do |name| %>
+ <%- names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq -%>
+ <%- names.each do |name| -%>
<li><kbd>gem rdoc <%=h name %></kbd>
- <% end %>
+ <%- end -%>
</ul>
-<% end %>
+<%- end -%>
</main>
-
diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
index 7ff1a9e93e..941ff9d630 100644
--- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
+++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
@@ -2,57 +2,57 @@
<main role="main">
<h1 class="class"><%= h @title %></h1>
-<% simple_files = @files.select { |f| f.text? } %>
-<% unless simple_files.empty? then %>
+<%- simple_files = @files.select { |f| f.text? } -%>
+<%- unless simple_files.empty? then -%>
<h2 id="pages">Pages</h2>
<ul>
-<% simple_files.sort.each do |file| %>
+<%- simple_files.sort.each do |file| -%>
<li class="file">
- <a href="<%= file.path %>"><%= h file.page_name %></a>
+ <a href="<%= h file.path %>"><%= h file.page_name %></a>
<%
# HACK table_of_contents should not exist on Document
table = file.parse(file.comment).table_of_contents
unless table.empty? then %>
<ul>
-<% table.each do |heading| %>
- <li><a href="<%= file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a>
-<% end %>
+<%- table.each do |heading| -%>
+ <li><a href="<%= h file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a>
+<%- end -%>
</ul>
-<% end %>
+<%- end -%>
</li>
- <% end %>
+ <%- end -%>
</ul>
-<% end %>
+<%- end -%>
<h2 id="classes">Classes and Modules</h2>
<ul>
-<% @modsort.each do |klass| %>
+<%- @modsort.each do |klass| -%>
<li class="<%= klass.type %>">
<a href="<%= klass.path %>"><%= klass.full_name %></a>
-<% table = []
+<%- table = []
table.concat klass.parse(klass.comment_location).table_of_contents
table.concat klass.section_contents
unless table.empty? then %>
<ul>
-<% table.each do |item| %>
+<%- table.each do |item| -%>
<li><a href="<%= klass.path %>#<%= item.aref %>"><%= item.plain_html %></a>
-<% end %>
+<%- end -%>
</ul>
-<% end %>
+<%- end -%>
</li>
-<% end %>
+<%- end -%>
</ul>
<h2 id="methods">Methods</h2>
<ul>
-<% @store.all_classes_and_modules.map do |mod|
+<%- @store.all_classes_and_modules.map do |mod|
mod.method_list
end.flatten.sort.each do |method| %>
<li class="method">
<a href="<%= method.path %>"><%= h method.pretty_name %></a>
&mdash;
<span class="container"><%= method.parent.full_name %></span>
-<% end %>
+<%- end -%>
</ul>
</main>
diff --git a/lib/rdoc/i18n.rb b/lib/rdoc/i18n.rb
index af303858b9..f209a9a6f6 100644
--- a/lib/rdoc/i18n.rb
+++ b/lib/rdoc/i18n.rb
@@ -4,7 +4,7 @@
module RDoc::I18n
- autoload :Locale, 'rdoc/i18n/locale'
- require 'rdoc/i18n/text'
+ autoload :Locale, "#{__dir__}/i18n/locale"
+ require_relative 'i18n/text'
end
diff --git a/lib/rdoc/known_classes.rb b/lib/rdoc/known_classes.rb
index 4d7f4aa995..3e8752bbde 100644
--- a/lib/rdoc/known_classes.rb
+++ b/lib/rdoc/known_classes.rb
@@ -25,6 +25,7 @@ module RDoc
"rb_cObject" => "Object",
"rb_cProc" => "Proc",
"rb_cRange" => "Range",
+ "rb_cRefinement" => "Refinement",
"rb_cRegexp" => "Regexp",
"rb_cRubyVM" => "RubyVM",
"rb_cSocket" => "Socket",
@@ -35,7 +36,7 @@ module RDoc
"rb_cTime" => "Time",
"rb_cTrueClass" => "TrueClass",
- "rb_eArgError" => "ArgError",
+ "rb_eArgError" => "ArgumentError",
"rb_eEOFError" => "EOFError",
"rb_eException" => "Exception",
"rb_eFatal" => "fatal",
@@ -45,8 +46,8 @@ module RDoc
"rb_eInterrupt" => "Interrupt",
"rb_eLoadError" => "LoadError",
"rb_eNameError" => "NameError",
- "rb_eNoMemError" => "NoMemError",
- "rb_eNotImpError" => "NotImpError",
+ "rb_eNoMemError" => "NoMemoryError",
+ "rb_eNotImpError" => "NotImplementedError",
"rb_eRangeError" => "RangeError",
"rb_eRuntimeError" => "RuntimeError",
"rb_eScriptError" => "ScriptError",
@@ -57,7 +58,7 @@ module RDoc
"rb_eSystemCallError" => "SystemCallError",
"rb_eSystemExit" => "SystemExit",
"rb_eTypeError" => "TypeError",
- "rb_eZeroDivError" => "ZeroDivError",
+ "rb_eZeroDivError" => "ZeroDivisionError",
"rb_mComparable" => "Comparable",
"rb_mEnumerable" => "Enumerable",
diff --git a/lib/rdoc/markdown.rb b/lib/rdoc/markdown.rb
index 43c70c8de6..a0709b6352 100644
--- a/lib/rdoc/markdown.rb
+++ b/lib/rdoc/markdown.rb
@@ -173,7 +173,7 @@
# The port to kpeg was performed by Eric Hodel and Evan Phoenix
#
# [dingus]: http://daringfireball.net/projects/markdown/dingus
-# [GFM]: http://github.github.com/github-flavored-markdown/
+# [GFM]: https://github.github.com/gfm/
# [pegmarkdown]: https://github.com/jgm/peg-markdown
# [PHPE]: http://michelf.com/projects/php-markdown/extra/#def-list
# [syntax]: http://daringfireball.net/projects/markdown/syntax
@@ -199,6 +199,7 @@ class RDoc::Markdown
@result = nil
@failed_rule = nil
@failing_rule_offset = -1
+ @line_offsets = nil
setup_foreign_grammar
end
@@ -208,30 +209,75 @@ class RDoc::Markdown
attr_accessor :result, :pos
def current_column(target=pos)
- if c = string.rindex("\n", target-1)
- return target - c - 1
+ if string[target] == "\n" && (c = string.rindex("\n", target-1) || -1)
+ return target - c
+ elsif c = string.rindex("\n", target)
+ return target - c
end
target + 1
end
- def current_line(target=pos)
- cur_offset = 0
- cur_line = 0
+ def position_line_offsets
+ unless @position_line_offsets
+ @position_line_offsets = []
+ total = 0
+ string.each_line do |line|
+ total += line.size
+ @position_line_offsets << total
+ end
+ end
+ @position_line_offsets
+ end
- string.each_line do |line|
- cur_line += 1
- cur_offset += line.size
- return cur_line if cur_offset >= target
+ if [].respond_to? :bsearch_index
+ def current_line(target=pos)
+ if line = position_line_offsets.bsearch_index {|x| x > target }
+ return line + 1
+ end
+ raise "Target position #{target} is outside of string"
end
+ else
+ def current_line(target=pos)
+ if line = position_line_offsets.index {|x| x > target }
+ return line + 1
+ end
- -1
+ raise "Target position #{target} is outside of string"
+ end
+ end
+
+ def current_character(target=pos)
+ if target < 0 || target >= string.size
+ raise "Target position #{target} is outside of string"
+ end
+ string[target, 1]
+ end
+
+ KpegPosInfo = Struct.new(:pos, :lno, :col, :line, :char)
+
+ def current_pos_info(target=pos)
+ l = current_line target
+ c = current_column target
+ ln = get_line(l-1)
+ chr = string[target,1]
+ KpegPosInfo.new(target, l, c, ln, chr)
end
def lines
- lines = []
- string.each_line { |l| lines << l }
- lines
+ string.lines
+ end
+
+ def get_line(no)
+ loff = position_line_offsets
+ if no < 0
+ raise "Line No is out of range: #{no} < 0"
+ elsif no >= loff.size
+ raise "Line No is out of range: #{no} >= #{loff.size}"
+ end
+ lend = loff[no]-1
+ lstart = no > 0 ? loff[no-1] : 0
+ string[lstart..lend]
end
@@ -245,6 +291,7 @@ class RDoc::Markdown
@string = string
@string_size = string ? string.size : 0
@pos = pos
+ @position_line_offsets = nil
end
def show_pos
@@ -269,30 +316,22 @@ class RDoc::Markdown
end
def failure_caret
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
-
- line = lines[l-1]
- "#{line}\n#{' ' * (c - 1)}^"
+ p = current_pos_info @failing_rule_offset
+ "#{p.line.chomp}\n#{' ' * (p.col - 1)}^"
end
def failure_character
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
- lines[l-1][c-1, 1]
+ current_character @failing_rule_offset
end
def failure_oneline
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
-
- char = lines[l-1][c-1, 1]
+ p = current_pos_info @failing_rule_offset
if @failed_rule.kind_of? Symbol
info = self.class::Rules[@failed_rule]
- "@#{l}:#{c} failed rule '#{info.name}', got '#{char}'"
+ "@#{p.lno}:#{p.col} failed rule '#{info.name}', got '#{p.char}'"
else
- "@#{l}:#{c} failed rule '#{@failed_rule}', got '#{char}'"
+ "@#{p.lno}:#{p.col} failed rule '#{@failed_rule}', got '#{p.char}'"
end
end
@@ -305,10 +344,9 @@ class RDoc::Markdown
def show_error(io=STDOUT)
error_pos = @failing_rule_offset
- line_no = current_line(error_pos)
- col_no = current_column(error_pos)
+ p = current_pos_info(error_pos)
- io.puts "On line #{line_no}, column #{col_no}:"
+ io.puts "On line #{p.lno}, column #{p.col}:"
if @failed_rule.kind_of? Symbol
info = self.class::Rules[@failed_rule]
@@ -317,10 +355,9 @@ class RDoc::Markdown
io.puts "Failed to match rule '#{@failed_rule}'"
end
- io.puts "Got: #{string[error_pos,1].inspect}"
- line = lines[line_no-1]
- io.puts "=> #{line}"
- io.print(" " * (col_no + 3))
+ io.puts "Got: #{p.char.inspect}"
+ io.puts "=> #{p.line}"
+ io.print(" " * (p.col + 2))
io.puts "^"
end
@@ -344,9 +381,8 @@ class RDoc::Markdown
end
def scan(reg)
- if m = reg.match(@string[@pos..-1])
- width = m.end(0)
- @pos += width
+ if m = reg.match(@string, @pos)
+ @pos = m.end(0)
return true
end
@@ -430,6 +466,7 @@ class RDoc::Markdown
end
def apply_with_args(rule, *args)
+ @result = nil
memo_key = [rule, args]
if m = @memoizations[memo_key][@pos]
@pos = m.pos
@@ -463,6 +500,7 @@ class RDoc::Markdown
end
def apply(rule)
+ @result = nil
if m = @memoizations[rule][@pos]
@pos = m.pos
if !m.set
@@ -534,11 +572,11 @@ class RDoc::Markdown
- require 'rdoc'
- require 'rdoc/markup/to_joined_paragraph'
- require 'rdoc/markdown/entities'
+ require_relative '../rdoc'
+ require_relative 'markup/to_joined_paragraph'
+ require_relative 'markdown/entities'
- require 'rdoc/markdown/literals'
+ require_relative 'markdown/literals'
##
# Supported extensions
@@ -796,7 +834,7 @@ class RDoc::Markdown
@note_order.each_with_index do |ref, index|
label = index + 1
- note = @footnotes[ref]
+ note = @footnotes[ref] or raise ParseError, "footnote [^#{ref}] not found"
link = "{^#{label}}[rdoc-label:footmark-#{label}:foottext-#{label}] "
note.parts.unshift link
@@ -897,7 +935,7 @@ class RDoc::Markdown
return _tmp
end
- # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)
+ # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)
def _Block
_save = self.pos
@@ -923,6 +961,9 @@ class RDoc::Markdown
_tmp = apply(:_CodeFence)
break if _tmp
self.pos = _save2
+ _tmp = apply(:_Table)
+ break if _tmp
+ self.pos = _save2
_tmp = apply(:_Note)
break if _tmp
self.pos = _save2
@@ -1057,7 +1098,7 @@ class RDoc::Markdown
self.pos = _save3
break
end
- _tmp = scan(/\A(?-mix:#*)/)
+ _tmp = scan(/\G(?-mix:#*)/)
unless _tmp
self.pos = _save3
break
@@ -1097,7 +1138,7 @@ class RDoc::Markdown
_save = self.pos
while true # sequence
_text_start = self.pos
- _tmp = scan(/\A(?-mix:\#{1,6})/)
+ _tmp = scan(/\G(?-mix:\#{1,6})/)
if _tmp
text = get_text(_text_start)
end
@@ -1162,7 +1203,7 @@ class RDoc::Markdown
self.pos = _save3
break
end
- _tmp = scan(/\A(?-mix:#*)/)
+ _tmp = scan(/\G(?-mix:#*)/)
unless _tmp
self.pos = _save3
break
@@ -1222,7 +1263,7 @@ class RDoc::Markdown
_save = self.pos
while true # sequence
- _tmp = scan(/\A(?-mix:={1,})/)
+ _tmp = scan(/\G(?-mix:={1,})/)
unless _tmp
self.pos = _save
break
@@ -1243,7 +1284,7 @@ class RDoc::Markdown
_save = self.pos
while true # sequence
- _tmp = scan(/\A(?-mix:-{1,})/)
+ _tmp = scan(/\G(?-mix:-{1,})/)
unless _tmp
self.pos = _save
break
@@ -2127,7 +2168,7 @@ class RDoc::Markdown
self.pos = _save
break
end
- _tmp = scan(/\A(?-mix:[+*-])/)
+ _tmp = scan(/\G(?-mix:[+*-])/)
unless _tmp
self.pos = _save
break
@@ -9320,7 +9361,7 @@ class RDoc::Markdown
return _tmp
end
- # Inlines = (!@Endline Inline:i { i } | @Endline:c &Inline { c })+:chunks @Endline? { chunks }
+ # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks }
def _Inlines
_save = self.pos
@@ -9367,12 +9408,41 @@ class RDoc::Markdown
break
end
_save6 = self.pos
- _tmp = apply(:_Inline)
+
+ _save7 = self.pos
+ while true # sequence
+ _save8 = self.pos
+ _tmp = begin; github? ; end
+ self.pos = _save8
+ unless _tmp
+ self.pos = _save7
+ break
+ end
+ _tmp = apply(:_Ticks3)
+ unless _tmp
+ self.pos = _save7
+ break
+ end
+ _tmp = scan(/\G(?-mix:[^`\n]*$)/)
+ unless _tmp
+ self.pos = _save7
+ end
+ break
+ end # end sequence
+
+ _tmp = _tmp ? nil : true
self.pos = _save6
unless _tmp
self.pos = _save5
break
end
+ _save9 = self.pos
+ _tmp = apply(:_Inline)
+ self.pos = _save9
+ unless _tmp
+ self.pos = _save5
+ break
+ end
@result = begin; c ; end
_tmp = true
unless _tmp
@@ -9390,61 +9460,90 @@ class RDoc::Markdown
_ary << @result
while true
- _save7 = self.pos
+ _save10 = self.pos
while true # choice
- _save8 = self.pos
+ _save11 = self.pos
while true # sequence
- _save9 = self.pos
+ _save12 = self.pos
_tmp = _Endline()
_tmp = _tmp ? nil : true
- self.pos = _save9
+ self.pos = _save12
unless _tmp
- self.pos = _save8
+ self.pos = _save11
break
end
_tmp = apply(:_Inline)
i = @result
unless _tmp
- self.pos = _save8
+ self.pos = _save11
break
end
@result = begin; i ; end
_tmp = true
unless _tmp
- self.pos = _save8
+ self.pos = _save11
end
break
end # end sequence
break if _tmp
- self.pos = _save7
+ self.pos = _save10
- _save10 = self.pos
+ _save13 = self.pos
while true # sequence
_tmp = _Endline()
c = @result
unless _tmp
- self.pos = _save10
+ self.pos = _save13
break
end
- _save11 = self.pos
+ _save14 = self.pos
+
+ _save15 = self.pos
+ while true # sequence
+ _save16 = self.pos
+ _tmp = begin; github? ; end
+ self.pos = _save16
+ unless _tmp
+ self.pos = _save15
+ break
+ end
+ _tmp = apply(:_Ticks3)
+ unless _tmp
+ self.pos = _save15
+ break
+ end
+ _tmp = scan(/\G(?-mix:[^`\n]*$)/)
+ unless _tmp
+ self.pos = _save15
+ end
+ break
+ end # end sequence
+
+ _tmp = _tmp ? nil : true
+ self.pos = _save14
+ unless _tmp
+ self.pos = _save13
+ break
+ end
+ _save17 = self.pos
_tmp = apply(:_Inline)
- self.pos = _save11
+ self.pos = _save17
unless _tmp
- self.pos = _save10
+ self.pos = _save13
break
end
@result = begin; c ; end
_tmp = true
unless _tmp
- self.pos = _save10
+ self.pos = _save13
end
break
end # end sequence
break if _tmp
- self.pos = _save7
+ self.pos = _save10
break
end # end choice
@@ -9461,11 +9560,11 @@ class RDoc::Markdown
self.pos = _save
break
end
- _save12 = self.pos
+ _save18 = self.pos
_tmp = _Endline()
unless _tmp
_tmp = true
- self.pos = _save12
+ self.pos = _save18
end
unless _tmp
self.pos = _save
@@ -9664,7 +9763,7 @@ class RDoc::Markdown
_save3 = self.pos
while true # sequence
- _tmp = scan(/\A(?-mix:_+)/)
+ _tmp = scan(/\G(?-mix:_+)/)
unless _tmp
self.pos = _save3
break
@@ -9694,7 +9793,7 @@ class RDoc::Markdown
_save6 = self.pos
while true # sequence
- _tmp = scan(/\A(?-mix:_+)/)
+ _tmp = scan(/\G(?-mix:_+)/)
unless _tmp
self.pos = _save6
break
@@ -9757,7 +9856,7 @@ class RDoc::Markdown
break
end
_text_start = self.pos
- _tmp = scan(/\A(?-mix:[:\\`|*_{}\[\]()#+.!><-])/)
+ _tmp = scan(/\G(?-mix:[:\\`|*_{}\[\]()#+.!><-])/)
if _tmp
text = get_text(_text_start)
end
@@ -9883,7 +9982,7 @@ class RDoc::Markdown
self.pos = _save5
break
end
- _tmp = scan(/\A(?-mix:={1,}|-{1,})/)
+ _tmp = scan(/\G(?-mix:={1,}|-{1,})/)
unless _tmp
self.pos = _save5
break
@@ -10035,7 +10134,7 @@ class RDoc::Markdown
_save1 = self.pos
while true # sequence
_text_start = self.pos
- _tmp = scan(/\A(?-mix:\*{4,})/)
+ _tmp = scan(/\G(?-mix:\*{4,})/)
if _tmp
text = get_text(_text_start)
end
@@ -10065,7 +10164,7 @@ class RDoc::Markdown
self.pos = _save3
break
end
- _tmp = scan(/\A(?-mix:\*+)/)
+ _tmp = scan(/\G(?-mix:\*+)/)
unless _tmp
self.pos = _save3
break
@@ -10112,7 +10211,7 @@ class RDoc::Markdown
_save1 = self.pos
while true # sequence
_text_start = self.pos
- _tmp = scan(/\A(?-mix:_{4,})/)
+ _tmp = scan(/\G(?-mix:_{4,})/)
if _tmp
text = get_text(_text_start)
end
@@ -10142,7 +10241,7 @@ class RDoc::Markdown
self.pos = _save3
break
end
- _tmp = scan(/\A(?-mix:_+)/)
+ _tmp = scan(/\G(?-mix:_+)/)
unless _tmp
self.pos = _save3
break
@@ -11503,7 +11602,7 @@ class RDoc::Markdown
_save1 = self.pos
while true # sequence
- _tmp = scan(/\A(?-mix:[A-Za-z]+)/)
+ _tmp = scan(/\G(?-mix:[A-Za-z]+)/)
unless _tmp
self.pos = _save1
break
@@ -11628,7 +11727,7 @@ class RDoc::Markdown
_save2 = self.pos
while true # sequence
- _tmp = scan(/\A(?i-mx:[\w+.\/!%~$-]+)/)
+ _tmp = scan(/\G(?i-mx:[\w+.\/!%~$-]+)/)
unless _tmp
self.pos = _save2
break
@@ -12492,7 +12591,7 @@ class RDoc::Markdown
self.pos = _save10
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save10
end
@@ -12629,7 +12728,7 @@ class RDoc::Markdown
self.pos = _save24
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save24
end
@@ -12806,7 +12905,7 @@ class RDoc::Markdown
self.pos = _save40
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save40
end
@@ -12943,7 +13042,7 @@ class RDoc::Markdown
self.pos = _save54
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save54
end
@@ -13120,7 +13219,7 @@ class RDoc::Markdown
self.pos = _save70
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save70
end
@@ -13257,7 +13356,7 @@ class RDoc::Markdown
self.pos = _save84
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save84
end
@@ -13434,7 +13533,7 @@ class RDoc::Markdown
self.pos = _save100
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save100
end
@@ -13571,7 +13670,7 @@ class RDoc::Markdown
self.pos = _save114
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save114
end
@@ -13748,7 +13847,7 @@ class RDoc::Markdown
self.pos = _save130
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save130
end
@@ -13885,7 +13984,7 @@ class RDoc::Markdown
self.pos = _save144
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save144
end
@@ -14537,7 +14636,7 @@ class RDoc::Markdown
_save = self.pos
while true # choice
- _tmp = scan(/\A(?-mix:[~*_`&\[\]()<!#\\'"])/)
+ _tmp = scan(/\G(?-mix:[~*_`&\[\]()<!#\\'"])/)
break if _tmp
self.pos = _save
_tmp = _ExtendedSpecialChar()
@@ -14642,13 +14741,13 @@ class RDoc::Markdown
_save = self.pos
while true # sequence
- _tmp = scan(/\A(?i-mx:&#x)/)
+ _tmp = scan(/\G(?i-mx:&#x)/)
unless _tmp
self.pos = _save
break
end
_text_start = self.pos
- _tmp = scan(/\A(?-mix:[0-9a-fA-F]+)/)
+ _tmp = scan(/\G(?-mix:[0-9a-fA-F]+)/)
if _tmp
text = get_text(_text_start)
end
@@ -14684,7 +14783,7 @@ class RDoc::Markdown
break
end
_text_start = self.pos
- _tmp = scan(/\A(?-mix:[0-9]+)/)
+ _tmp = scan(/\G(?-mix:[0-9]+)/)
if _tmp
text = get_text(_text_start)
end
@@ -14720,7 +14819,7 @@ class RDoc::Markdown
break
end
_text_start = self.pos
- _tmp = scan(/\A(?-mix:[A-Za-z0-9]+)/)
+ _tmp = scan(/\G(?-mix:[A-Za-z0-9]+)/)
if _tmp
text = get_text(_text_start)
end
@@ -14752,14 +14851,14 @@ class RDoc::Markdown
# NonindentSpace = / {0,3}/
def _NonindentSpace
- _tmp = scan(/\A(?-mix: {0,3})/)
+ _tmp = scan(/\G(?-mix: {0,3})/)
set_failed_rule :_NonindentSpace unless _tmp
return _tmp
end
# Indent = /\t| /
def _Indent
- _tmp = scan(/\A(?-mix:\t| )/)
+ _tmp = scan(/\G(?-mix:\t| )/)
set_failed_rule :_Indent unless _tmp
return _tmp
end
@@ -14858,7 +14957,7 @@ class RDoc::Markdown
return _tmp
end
- # RawLine = (< (!"\r" !"\n" .)* @Newline > | < .+ > @Eof) { text }
+ # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text }
def _RawLine
_save = self.pos
@@ -14870,36 +14969,7 @@ class RDoc::Markdown
_save2 = self.pos
while true # sequence
- while true
-
- _save4 = self.pos
- while true # sequence
- _save5 = self.pos
- _tmp = match_string("\r")
- _tmp = _tmp ? nil : true
- self.pos = _save5
- unless _tmp
- self.pos = _save4
- break
- end
- _save6 = self.pos
- _tmp = match_string("\n")
- _tmp = _tmp ? nil : true
- self.pos = _save6
- unless _tmp
- self.pos = _save4
- break
- end
- _tmp = get_byte
- unless _tmp
- self.pos = _save4
- end
- break
- end # end sequence
-
- break unless _tmp
- end
- _tmp = true
+ _tmp = scan(/\G(?-mix:[^\r\n]*)/)
unless _tmp
self.pos = _save2
break
@@ -14917,10 +14987,10 @@ class RDoc::Markdown
break if _tmp
self.pos = _save1
- _save7 = self.pos
+ _save3 = self.pos
while true # sequence
_text_start = self.pos
- _save8 = self.pos
+ _save4 = self.pos
_tmp = get_byte
if _tmp
while true
@@ -14929,18 +14999,18 @@ class RDoc::Markdown
end
_tmp = true
else
- self.pos = _save8
+ self.pos = _save4
end
if _tmp
text = get_text(_text_start)
end
unless _tmp
- self.pos = _save7
+ self.pos = _save3
break
end
_tmp = _Eof()
unless _tmp
- self.pos = _save7
+ self.pos = _save3
end
break
end # end sequence
@@ -15486,7 +15556,7 @@ class RDoc::Markdown
return _tmp
end
- # RawNoteBlock = @StartList:a (!@BlankLine OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }
+ # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }
def _RawNoteBlock
_save = self.pos
@@ -15509,6 +15579,14 @@ class RDoc::Markdown
self.pos = _save2
break
end
+ _save4 = self.pos
+ _tmp = apply(:_RawNoteReference)
+ _tmp = _tmp ? nil : true
+ self.pos = _save4
+ unless _tmp
+ self.pos = _save2
+ break
+ end
_tmp = apply(:_OptionallyIndentedLine)
l = @result
unless _tmp
@@ -15526,26 +15604,34 @@ class RDoc::Markdown
if _tmp
while true
- _save4 = self.pos
+ _save5 = self.pos
while true # sequence
- _save5 = self.pos
+ _save6 = self.pos
_tmp = _BlankLine()
_tmp = _tmp ? nil : true
- self.pos = _save5
+ self.pos = _save6
unless _tmp
- self.pos = _save4
+ self.pos = _save5
+ break
+ end
+ _save7 = self.pos
+ _tmp = apply(:_RawNoteReference)
+ _tmp = _tmp ? nil : true
+ self.pos = _save7
+ unless _tmp
+ self.pos = _save5
break
end
_tmp = apply(:_OptionallyIndentedLine)
l = @result
unless _tmp
- self.pos = _save4
+ self.pos = _save5
break
end
@result = begin; a << l ; end
_tmp = true
unless _tmp
- self.pos = _save4
+ self.pos = _save5
end
break
end # end sequence
@@ -15701,7 +15787,7 @@ class RDoc::Markdown
self.pos = _save11
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save11
end
@@ -15782,7 +15868,7 @@ class RDoc::Markdown
self.pos = _save19
break
end
- _tmp = scan(/\A(?-mix:`+)/)
+ _tmp = scan(/\G(?-mix:`+)/)
unless _tmp
self.pos = _save19
end
@@ -15847,6 +15933,408 @@ class RDoc::Markdown
return _tmp
end
+ # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) }
+ def _Table
+
+ _save = self.pos
+ while true # sequence
+ _save1 = self.pos
+ _tmp = begin; github? ; end
+ self.pos = _save1
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = apply(:_TableHead)
+ header = @result
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = apply(:_TableLine)
+ line = @result
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _save2 = self.pos
+ _ary = []
+ _tmp = apply(:_TableRow)
+ if _tmp
+ _ary << @result
+ while true
+ _tmp = apply(:_TableRow)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ else
+ self.pos = _save2
+ end
+ body = @result
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin; table = RDoc::Markup::Table.new(header, line, body) ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_Table unless _tmp
+ return _tmp
+ end
+
+ # TableHead = TableItem2+:items "|"? @Newline { items }
+ def _TableHead
+
+ _save = self.pos
+ while true # sequence
+ _save1 = self.pos
+ _ary = []
+ _tmp = apply(:_TableItem2)
+ if _tmp
+ _ary << @result
+ while true
+ _tmp = apply(:_TableItem2)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ else
+ self.pos = _save1
+ end
+ items = @result
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _save2 = self.pos
+ _tmp = match_string("|")
+ unless _tmp
+ _tmp = true
+ self.pos = _save2
+ end
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = _Newline()
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin; items ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableHead unless _tmp
+ return _tmp
+ end
+
+ # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row }
+ def _TableRow
+
+ _save = self.pos
+ while true # sequence
+
+ _save1 = self.pos
+ while true # choice
+
+ _save2 = self.pos
+ while true # sequence
+ _tmp = apply(:_TableItem)
+ item1 = @result
+ unless _tmp
+ self.pos = _save2
+ break
+ end
+ _ary = []
+ while true
+ _tmp = apply(:_TableItem2)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ items = @result
+ unless _tmp
+ self.pos = _save2
+ break
+ end
+ @result = begin; [item1, *items] ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save2
+ end
+ break
+ end # end sequence
+
+ row = @result
+ break if _tmp
+ self.pos = _save1
+ _save4 = self.pos
+ _ary = []
+ _tmp = apply(:_TableItem2)
+ if _tmp
+ _ary << @result
+ while true
+ _tmp = apply(:_TableItem2)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ else
+ self.pos = _save4
+ end
+ row = @result
+ break if _tmp
+ self.pos = _save1
+ break
+ end # end choice
+
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _save5 = self.pos
+ _tmp = match_string("|")
+ unless _tmp
+ _tmp = true
+ self.pos = _save5
+ end
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = _Newline()
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin; row ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableRow unless _tmp
+ return _tmp
+ end
+
+ # TableItem2 = "|" TableItem
+ def _TableItem2
+
+ _save = self.pos
+ while true # sequence
+ _tmp = match_string("|")
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = apply(:_TableItem)
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableItem2 unless _tmp
+ return _tmp
+ end
+
+ # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') }
+ def _TableItem
+
+ _save = self.pos
+ while true # sequence
+ _text_start = self.pos
+ _tmp = scan(/\G(?-mix:(?:\\.|[^|\n])+)/)
+ if _tmp
+ text = get_text(_text_start)
+ end
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin; text.strip.gsub(/\\(.)/, '\1') ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableItem unless _tmp
+ return _tmp
+ end
+
+ # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line }
+ def _TableLine
+
+ _save = self.pos
+ while true # sequence
+
+ _save1 = self.pos
+ while true # choice
+
+ _save2 = self.pos
+ while true # sequence
+ _tmp = apply(:_TableAlign)
+ align1 = @result
+ unless _tmp
+ self.pos = _save2
+ break
+ end
+ _ary = []
+ while true
+ _tmp = apply(:_TableAlign2)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ aligns = @result
+ unless _tmp
+ self.pos = _save2
+ break
+ end
+ @result = begin; [align1, *aligns] ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save2
+ end
+ break
+ end # end sequence
+
+ line = @result
+ break if _tmp
+ self.pos = _save1
+ _save4 = self.pos
+ _ary = []
+ _tmp = apply(:_TableAlign2)
+ if _tmp
+ _ary << @result
+ while true
+ _tmp = apply(:_TableAlign2)
+ _ary << @result if _tmp
+ break unless _tmp
+ end
+ _tmp = true
+ @result = _ary
+ else
+ self.pos = _save4
+ end
+ line = @result
+ break if _tmp
+ self.pos = _save1
+ break
+ end # end choice
+
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _save5 = self.pos
+ _tmp = match_string("|")
+ unless _tmp
+ _tmp = true
+ self.pos = _save5
+ end
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = _Newline()
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin; line ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableLine unless _tmp
+ return _tmp
+ end
+
+ # TableAlign2 = "|" @Sp TableAlign
+ def _TableAlign2
+
+ _save = self.pos
+ while true # sequence
+ _tmp = match_string("|")
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = _Sp()
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = apply(:_TableAlign)
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableAlign2 unless _tmp
+ return _tmp
+ end
+
+ # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) }
+ def _TableAlign
+
+ _save = self.pos
+ while true # sequence
+ _text_start = self.pos
+ _tmp = scan(/\G(?-mix::?-+:?)/)
+ if _tmp
+ text = get_text(_text_start)
+ end
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ _tmp = _Sp()
+ unless _tmp
+ self.pos = _save
+ break
+ end
+ @result = begin;
+ text.start_with?(":") ?
+ (text.end_with?(":") ? :center : :left) :
+ (text.end_with?(":") ? :right : nil)
+ ; end
+ _tmp = true
+ unless _tmp
+ self.pos = _save
+ end
+ break
+ end # end sequence
+
+ set_failed_rule :_TableAlign unless _tmp
+ return _tmp
+ end
+
# DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten }
def _DefinitionList
@@ -16046,7 +16534,7 @@ class RDoc::Markdown
Rules = {}
Rules[:_root] = rule_info("root", "Doc")
Rules[:_Doc] = rule_info("Doc", "BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) }")
- Rules[:_Block] = rule_info("Block", "@BlankLine* (BlockQuote | Verbatim | CodeFence | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)")
+ Rules[:_Block] = rule_info("Block", "@BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain)")
Rules[:_Para] = rule_info("Para", "@NonindentSpace Inlines:a @BlankLine+ { paragraph a }")
Rules[:_Plain] = rule_info("Plain", "Inlines:a { paragraph a }")
Rules[:_AtxInline] = rule_info("AtxInline", "!@Newline !(@Sp /\#*/ @Sp @Newline) Inline")
@@ -16190,7 +16678,7 @@ class RDoc::Markdown
Rules[:_StyleClose] = rule_info("StyleClose", "\"<\" Spnl \"/\" (\"style\" | \"STYLE\") Spnl \">\"")
Rules[:_InStyleTags] = rule_info("InStyleTags", "StyleOpen (!StyleClose .)* StyleClose")
Rules[:_StyleBlock] = rule_info("StyleBlock", "< InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end }")
- Rules[:_Inlines] = rule_info("Inlines", "(!@Endline Inline:i { i } | @Endline:c &Inline { c })+:chunks @Endline? { chunks }")
+ Rules[:_Inlines] = rule_info("Inlines", "(!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\\n]*$/) &Inline { c })+:chunks @Endline? { chunks }")
Rules[:_Inline] = rule_info("Inline", "(Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol)")
Rules[:_Space] = rule_info("Space", "@Spacechar+ { \" \" }")
Rules[:_Str] = rule_info("Str", "@StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a }")
@@ -16269,7 +16757,7 @@ class RDoc::Markdown
Rules[:_OptionallyIndentedLine] = rule_info("OptionallyIndentedLine", "Indent? Line")
Rules[:_StartList] = rule_info("StartList", "&. { [] }")
Rules[:_Line] = rule_info("Line", "@RawLine:a { a }")
- Rules[:_RawLine] = rule_info("RawLine", "(< (!\"\\r\" !\"\\n\" .)* @Newline > | < .+ > @Eof) { text }")
+ Rules[:_RawLine] = rule_info("RawLine", "(< /[^\\r\\n]*/ @Newline > | < .+ > @Eof) { text }")
Rules[:_SkipBlock] = rule_info("SkipBlock", "(HtmlBlock | (!\"\#\" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine)")
Rules[:_ExtendedSpecialChar] = rule_info("ExtendedSpecialChar", "&{ notes? } \"^\"")
Rules[:_NoteReference] = rule_info("NoteReference", "&{ notes? } RawNoteReference:ref { note_for ref }")
@@ -16277,8 +16765,16 @@ class RDoc::Markdown
Rules[:_Note] = rule_info("Note", "&{ notes? } @NonindentSpace RawNoteReference:ref \":\" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil }")
Rules[:_InlineNote] = rule_info("InlineNote", "&{ notes? } \"^[\" @StartList:a (!\"]\" Inline:l { a << l })+ \"]\" { ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref }")
Rules[:_Notes] = rule_info("Notes", "(Note | SkipBlock)*")
- Rules[:_RawNoteBlock] = rule_info("RawNoteBlock", "@StartList:a (!@BlankLine OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }")
+ Rules[:_RawNoteBlock] = rule_info("RawNoteBlock", "@StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }")
Rules[:_CodeFence] = rule_info("CodeFence", "&{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!\"`\" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim }")
+ Rules[:_Table] = rule_info("Table", "&{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) }")
+ Rules[:_TableHead] = rule_info("TableHead", "TableItem2+:items \"|\"? @Newline { items }")
+ Rules[:_TableRow] = rule_info("TableRow", "((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) \"|\"? @Newline { row }")
+ Rules[:_TableItem2] = rule_info("TableItem2", "\"|\" TableItem")
+ Rules[:_TableItem] = rule_info("TableItem", "< /(?:\\\\.|[^|\\n])+/ > { text.strip.gsub(/\\\\(.)/, '\\1') }")
+ Rules[:_TableLine] = rule_info("TableLine", "((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) \"|\"? @Newline { line }")
+ Rules[:_TableAlign2] = rule_info("TableAlign2", "\"|\" @Sp TableAlign")
+ Rules[:_TableAlign] = rule_info("TableAlign", "< /:?-+:?/ > @Sp { text.start_with?(\":\") ? (text.end_with?(\":\") ? :center : :left) : (text.end_with?(\":\") ? :right : nil) }")
Rules[:_DefinitionList] = rule_info("DefinitionList", "&{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten }")
Rules[:_DefinitionListItem] = rule_info("DefinitionListItem", "DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = [] list_items << RDoc::Markup::ListItem.new(label, defns.shift) list_items.concat defns.map { |defn| RDoc::Markup::ListItem.new nil, defn } unless list_items.empty? list_items }")
Rules[:_DefinitionListLabel] = rule_info("DefinitionListLabel", "StrChunk:label @Sp @Newline { label }")
diff --git a/lib/rdoc/markdown/literals.rb b/lib/rdoc/markdown/literals.rb
index 31cd237f12..37659b7ae0 100644
--- a/lib/rdoc/markdown/literals.rb
+++ b/lib/rdoc/markdown/literals.rb
@@ -29,6 +29,7 @@ class RDoc::Markdown::Literals
@result = nil
@failed_rule = nil
@failing_rule_offset = -1
+ @line_offsets = nil
setup_foreign_grammar
end
@@ -38,30 +39,75 @@ class RDoc::Markdown::Literals
attr_accessor :result, :pos
def current_column(target=pos)
- if c = string.rindex("\n", target-1)
- return target - c - 1
+ if string[target] == "\n" && (c = string.rindex("\n", target-1) || -1)
+ return target - c
+ elsif c = string.rindex("\n", target)
+ return target - c
end
target + 1
end
- def current_line(target=pos)
- cur_offset = 0
- cur_line = 0
+ def position_line_offsets
+ unless @position_line_offsets
+ @position_line_offsets = []
+ total = 0
+ string.each_line do |line|
+ total += line.size
+ @position_line_offsets << total
+ end
+ end
+ @position_line_offsets
+ end
- string.each_line do |line|
- cur_line += 1
- cur_offset += line.size
- return cur_line if cur_offset >= target
+ if [].respond_to? :bsearch_index
+ def current_line(target=pos)
+ if line = position_line_offsets.bsearch_index {|x| x > target }
+ return line + 1
+ end
+ raise "Target position #{target} is outside of string"
end
+ else
+ def current_line(target=pos)
+ if line = position_line_offsets.index {|x| x > target }
+ return line + 1
+ end
+
+ raise "Target position #{target} is outside of string"
+ end
+ end
+
+ def current_character(target=pos)
+ if target < 0 || target >= string.size
+ raise "Target position #{target} is outside of string"
+ end
+ string[target, 1]
+ end
+
+ KpegPosInfo = Struct.new(:pos, :lno, :col, :line, :char)
- -1
+ def current_pos_info(target=pos)
+ l = current_line target
+ c = current_column target
+ ln = get_line(l-1)
+ chr = string[target,1]
+ KpegPosInfo.new(target, l, c, ln, chr)
end
def lines
- lines = []
- string.each_line { |l| lines << l }
- lines
+ string.lines
+ end
+
+ def get_line(no)
+ loff = position_line_offsets
+ if no < 0
+ raise "Line No is out of range: #{no} < 0"
+ elsif no >= loff.size
+ raise "Line No is out of range: #{no} >= #{loff.size}"
+ end
+ lend = loff[no]-1
+ lstart = no > 0 ? loff[no-1] : 0
+ string[lstart..lend]
end
@@ -75,6 +121,7 @@ class RDoc::Markdown::Literals
@string = string
@string_size = string ? string.size : 0
@pos = pos
+ @position_line_offsets = nil
end
def show_pos
@@ -99,30 +146,22 @@ class RDoc::Markdown::Literals
end
def failure_caret
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
-
- line = lines[l-1]
- "#{line}\n#{' ' * (c - 1)}^"
+ p = current_pos_info @failing_rule_offset
+ "#{p.line.chomp}\n#{' ' * (p.col - 1)}^"
end
def failure_character
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
- lines[l-1][c-1, 1]
+ current_character @failing_rule_offset
end
def failure_oneline
- l = current_line @failing_rule_offset
- c = current_column @failing_rule_offset
-
- char = lines[l-1][c-1, 1]
+ p = current_pos_info @failing_rule_offset
if @failed_rule.kind_of? Symbol
info = self.class::Rules[@failed_rule]
- "@#{l}:#{c} failed rule '#{info.name}', got '#{char}'"
+ "@#{p.lno}:#{p.col} failed rule '#{info.name}', got '#{p.char}'"
else
- "@#{l}:#{c} failed rule '#{@failed_rule}', got '#{char}'"
+ "@#{p.lno}:#{p.col} failed rule '#{@failed_rule}', got '#{p.char}'"
end
end
@@ -135,10 +174,9 @@ class RDoc::Markdown::Literals
def show_error(io=STDOUT)
error_pos = @failing_rule_offset
- line_no = current_line(error_pos)
- col_no = current_column(error_pos)
+ p = current_pos_info(error_pos)
- io.puts "On line #{line_no}, column #{col_no}:"
+ io.puts "On line #{p.lno}, column #{p.col}:"
if @failed_rule.kind_of? Symbol
info = self.class::Rules[@failed_rule]
@@ -147,10 +185,9 @@ class RDoc::Markdown::Literals
io.puts "Failed to match rule '#{@failed_rule}'"
end
- io.puts "Got: #{string[error_pos,1].inspect}"
- line = lines[line_no-1]
- io.puts "=> #{line}"
- io.print(" " * (col_no + 3))
+ io.puts "Got: #{p.char.inspect}"
+ io.puts "=> #{p.line}"
+ io.print(" " * (p.col + 2))
io.puts "^"
end
@@ -174,9 +211,8 @@ class RDoc::Markdown::Literals
end
def scan(reg)
- if m = reg.match(@string[@pos..-1])
- width = m.end(0)
- @pos += width
+ if m = reg.match(@string, @pos)
+ @pos = m.end(0)
return true
end
@@ -260,6 +296,7 @@ class RDoc::Markdown::Literals
end
def apply_with_args(rule, *args)
+ @result = nil
memo_key = [rule, args]
if m = @memoizations[memo_key][@pos]
@pos = m.pos
@@ -293,6 +330,7 @@ class RDoc::Markdown::Literals
end
def apply(rule)
+ @result = nil
if m = @memoizations[rule][@pos]
@pos = m.pos
if !m.set
@@ -366,14 +404,14 @@ class RDoc::Markdown::Literals
# Alphanumeric = /\p{Word}/
def _Alphanumeric
- _tmp = scan(/\A(?-mix:\p{Word})/)
+ _tmp = scan(/\G(?-mix:\p{Word})/)
set_failed_rule :_Alphanumeric unless _tmp
return _tmp
end
# AlphanumericAscii = /[A-Za-z0-9]/
def _AlphanumericAscii
- _tmp = scan(/\A(?-mix:[A-Za-z0-9])/)
+ _tmp = scan(/\G(?-mix:[A-Za-z0-9])/)
set_failed_rule :_AlphanumericAscii unless _tmp
return _tmp
end
@@ -387,21 +425,21 @@ class RDoc::Markdown::Literals
# Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/
def _Newline
- _tmp = scan(/\A(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
+ _tmp = scan(/\G(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
set_failed_rule :_Newline unless _tmp
return _tmp
end
# NonAlphanumeric = /\p{^Word}/
def _NonAlphanumeric
- _tmp = scan(/\A(?-mix:\p{^Word})/)
+ _tmp = scan(/\G(?-mix:\p{^Word})/)
set_failed_rule :_NonAlphanumeric unless _tmp
return _tmp
end
# Spacechar = /\t|\p{Zs}/
def _Spacechar
- _tmp = scan(/\A(?-mix:\t|\p{Zs})/)
+ _tmp = scan(/\G(?-mix:\t|\p{Zs})/)
set_failed_rule :_Spacechar unless _tmp
return _tmp
end
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb
index fd59fca314..6e93030965 100644
--- a/lib/rdoc/markup.rb
+++ b/lib/rdoc/markup.rb
@@ -97,638 +97,7 @@
#
# = \RDoc Markup Reference
#
-# == Block Markup
-#
-# === Paragraphs and Verbatim
-#
-# The markup engine looks for a document's natural left margin. This is
-# used as the initial margin for the document.
-#
-# Consecutive lines starting at this margin are considered to be a
-# paragraph. Empty lines separate paragraphs.
-#
-# Any line that starts to the right of the current margin is treated
-# as verbatim text. This is useful for code listings:
-#
-# 3.times { puts "Ruby" }
-#
-# In verbatim text, two or more blank lines are collapsed into one,
-# and trailing blank lines are removed:
-#
-# This is the first line
-#
-#
-# This is the second non-blank line,
-# after 2 blank lines in the source markup.
-#
-#
-# There were two trailing blank lines right above this paragraph, that
-# have been removed. In addition, the verbatim text has been shifted
-# left, so the amount of indentation of verbatim text is unimportant.
-#
-# For HTML output RDoc makes a small effort to determine if a verbatim section
-# contains Ruby source code. If so, the verbatim block will be marked up as
-# HTML. Triggers include "def", "class", "module", "require", the "hash
-# rocket"# (=>) or a block call with a parameter.
-#
-# === Headers
-#
-# A line starting with an equal sign (=) is treated as a
-# heading. Level one headings have one equals sign, level two headings
-# have two, and so on until level six, which is the maximum
-# (seven hyphens or more result in a level six heading).
-#
-# For example, the above header was obtained with:
-#
-# === Headers
-#
-# In HTML output headers have an id matching their name. The above example's
-# HTML is:
-#
-# <h3 id="label-Headers">Headers</h3>
-#
-# If a heading is inside a method body the id will be prefixed with the
-# method's id. If the above header where in the documentation for a method
-# such as:
-#
-# ##
-# # This method does fun things
-# #
-# # = Example
-# #
-# # Example of fun things goes here ...
-#
-# def do_fun_things
-# end
-#
-# The header's id would be:
-#
-# <h1 id="method-i-do_fun_things-label-Example">Example</h1>
-#
-# The label can be linked-to using <tt>SomeClass@Headers</tt>. See
-# {Links}[RDoc::Markup@Links] for further details.
-#
-# === Rules
-#
-# A line starting with three or more hyphens (at the current indent)
-# generates a horizontal rule.
-#
-# ---
-#
-# produces:
-#
-# ---
-#
-# === Simple Lists
-#
-# If a paragraph starts with a "*", "-", "<digit>." or "<letter>.",
-# then it is taken to be the start of a list. The margin is increased to be
-# the first non-space following the list start flag. Subsequent lines
-# should be indented to this new margin until the list ends. For example:
-#
-# * this is a list with three paragraphs in
-# the first item. This is the first paragraph.
-#
-# And this is the second paragraph.
-#
-# 1. This is an indented, numbered list.
-# 2. This is the second item in that list
-#
-# This is the third conventional paragraph in the
-# first list item.
-#
-# * This is the second item in the original list
-#
-# produces:
-#
-# * this is a list with three paragraphs in
-# the first item. This is the first paragraph.
-#
-# And this is the second paragraph.
-#
-# 1. This is an indented, numbered list.
-# 2. This is the second item in that list
-#
-# This is the third conventional paragraph in the
-# first list item.
-#
-# * This is the second item in the original list
-#
-# === Labeled Lists
-#
-# You can also construct labeled lists, sometimes called description
-# or definition lists. Do this by putting the label in square brackets
-# and indenting the list body:
-#
-# [cat] a small furry mammal
-# that seems to sleep a lot
-#
-# [ant] a little insect that is known
-# to enjoy picnics
-#
-# produces:
-#
-# [cat] a small furry mammal
-# that seems to sleep a lot
-#
-# [ant] a little insect that is known
-# to enjoy picnics
-#
-# If you want the list bodies to line up to the left of the labels,
-# use two colons:
-#
-# cat:: a small furry mammal
-# that seems to sleep a lot
-#
-# ant:: a little insect that is known
-# to enjoy picnics
-#
-# produces:
-#
-# cat:: a small furry mammal
-# that seems to sleep a lot
-#
-# ant:: a little insect that is known
-# to enjoy picnics
-#
-# Notice that blank lines right after the label are ignored in labeled lists:
-#
-# [one]
-#
-# definition 1
-#
-# [two]
-#
-# definition 2
-#
-# produces the same output as
-#
-# [one] definition 1
-# [two] definition 2
-#
-#
-# === Lists and Verbatim
-#
-# If you want to introduce a verbatim section right after a list, it has to be
-# less indented than the list item bodies, but more indented than the list
-# label, letter, digit or bullet. For instance:
-#
-# * point 1
-#
-# * point 2, first paragraph
-#
-# point 2, second paragraph
-# verbatim text inside point 2
-# point 2, third paragraph
-# verbatim text outside of the list (the list is therefore closed)
-# regular paragraph after the list
-#
-# produces:
-#
-# * point 1
-#
-# * point 2, first paragraph
-#
-# point 2, second paragraph
-# verbatim text inside point 2
-# point 2, third paragraph
-# verbatim text outside of the list (the list is therefore closed)
-# regular paragraph after the list
-#
-# == Text Markup
-#
-# === Bold, Italic, Typewriter Text
-#
-# You can use markup within text (except verbatim) to change the
-# appearance of parts of that text. Out of the box, RDoc::Markup
-# supports word-based and general markup.
-#
-# Word-based markup uses flag characters around individual words:
-#
-# <tt>\*_word_\*</tt>:: displays _word_ in a *bold* font
-# <tt>\__word_\_</tt>:: displays _word_ in an _emphasized_ font
-# <tt>\+_word_\+</tt>:: displays _word_ in a +code+ font
-#
-# General markup affects text between a start delimiter and an end
-# delimiter. Not surprisingly, these delimiters look like HTML markup.
-#
-# <tt>\<b>_text_</b></tt>:: displays _text_ in a *bold* font
-# <tt>\<em>_text_</em></tt>:: displays _text_ in an _emphasized_ font
-# (alternate tag: <tt>\<i></tt>)
-# <tt>\<tt>_text_\</tt></tt>:: displays _text_ in a +code+ font
-# (alternate tag: <tt>\<code></tt>)
-#
-# Unlike conventional Wiki markup, general markup can cross line
-# boundaries. You can turn off the interpretation of markup by
-# preceding the first character with a backslash (see <i>Escaping
-# Text Markup</i>, below).
-#
-# === Links
-#
-# Links to starting with +http:+, +https:+, +mailto:+, +ftp:+ or +www.+
-# are recognized. An HTTP url that references an external image is converted
-# into an inline image element.
-#
-# Classes and methods will be automatically linked to their definition. For
-# example, <tt>RDoc::Markup</tt> will link to this documentation. By default
-# methods will only be automatically linked if they contain an <tt>_</tt> (all
-# methods can be automatically linked through the <tt>--hyperlink-all</tt>
-# command line option).
-#
-# Single-word methods can be linked by using the <tt>#</tt> character for
-# instance methods or <tt>::</tt> for class methods. For example,
-# <tt>#convert</tt> links to #convert. A class or method may be combined like
-# <tt>RDoc::Markup#convert</tt>.
-#
-# A heading inside the documentation can be linked by following the class
-# or method by an <tt>@</tt> then the heading name.
-# <tt>RDoc::Markup@Links</tt> will link to this section like this:
-# RDoc::Markup@Links. Spaces in headings with multiple words must be escaped
-# with <tt>+</tt> like <tt>RDoc::Markup@Escaping+Text+Markup</tt>.
-# Punctuation and other special characters must be escaped like CGI.escape.
-#
-# The <tt>@</tt> can also be used to link to sections. If a section and a
-# heading share the same name the section is preferred for the link.
-#
-# Links can also be of the form <tt>label[url]</tt>, in which case +label+ is
-# used in the displayed text, and +url+ is used as the target. If +label+
-# contains multiple words, put it in braces: <tt>{multi word label}[url]</tt>.
-# The +url+ may be an +http:+-type link or a cross-reference to a class,
-# module or method with a label.
-#
-# Links with the <code>rdoc-image:</code> scheme will create an image tag for
-# HTML output. Only fully-qualified URLs are supported.
-#
-# Links with the <tt>rdoc-ref:</tt> scheme will link to the referenced class,
-# module, method, file, etc. If the referenced item is does not exist
-# no link will be generated and <tt>rdoc-ref:</tt> will be removed from the
-# resulting text.
-#
-# Links starting with <tt>rdoc-label:label_name</tt> will link to the
-# +label_name+. You can create a label for the current link (for
-# bidirectional links) by supplying a name for the current link like
-# <tt>rdoc-label:label-other:label-mine</tt>.
-#
-# Links starting with +link:+ refer to local files whose path is relative to
-# the <tt>--op</tt> directory. Use <tt>rdoc-ref:</tt> instead of
-# <tt>link:</tt> to link to files generated by RDoc as the link target may
-# be different across RDoc generators.
-#
-# Example links:
-#
-# https://github.com/ruby/rdoc
-# mailto:user@example.com
-# {RDoc Documentation}[http://rdoc.rubyforge.org]
-# {RDoc Markup}[rdoc-ref:RDoc::Markup]
-#
-# === Escaping Text Markup
-#
-# Text markup can be escaped with a backslash, as in \<tt>, which was obtained
-# with <tt>\\<tt></tt>. Except in verbatim sections and between \<tt> tags,
-# to produce a backslash you have to double it unless it is followed by a
-# space, tab or newline. Otherwise, the HTML formatter will discard it, as it
-# is used to escape potential links:
-#
-# * The \ must be doubled if not followed by white space: \\.
-# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
-# * This is a link to {ruby-lang}[www.ruby-lang.org].
-# * This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org].
-# * This will not be linked to \RDoc::RDoc#document
-#
-# generates:
-#
-# * The \ must be doubled if not followed by white space: \\.
-# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
-# * This is a link to {ruby-lang}[www.ruby-lang.org]
-# * This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org]
-# * This will not be linked to \RDoc::RDoc#document
-#
-# Inside \<tt> tags, more precisely, leading backslashes are removed only if
-# followed by a markup character (<tt><*_+</tt>), a backslash, or a known link
-# reference (a known class or method). So in the example above, the backslash
-# of <tt>\S</tt> would be removed if there was a class or module named +S+ in
-# the current context.
-#
-# This behavior is inherited from RDoc version 1, and has been kept for
-# compatibility with existing RDoc documentation.
-#
-# === Conversion of characters
-#
-# HTML will convert two/three dashes to an em-dash. Other common characters are
-# converted as well:
-#
-# em-dash:: -- or ---
-# ellipsis:: ...
-#
-# single quotes:: 'text' or `text'
-# double quotes:: "text" or ``text''
-#
-# copyright:: (c)
-# registered trademark:: (r)
-#
-# produces:
-#
-# em-dash:: -- or ---
-# ellipsis:: ...
-#
-# single quotes:: 'text' or `text'
-# double quotes:: "text" or ``text''
-#
-# copyright:: (c)
-# registered trademark:: (r)
-#
-#
-# == Documenting Source Code
-#
-# Comment blocks can be written fairly naturally, either using <tt>#</tt> on
-# successive lines of the comment, or by including the comment in
-# a <tt>=begin</tt>/<tt>=end</tt> block. If you use the latter form,
-# the <tt>=begin</tt> line _must_ be flagged with an +rdoc+ tag:
-#
-# =begin rdoc
-# Documentation to be processed by RDoc.
-#
-# ...
-# =end
-#
-# RDoc stops processing comments if it finds a comment line starting
-# with <tt>--</tt> right after the <tt>#</tt> character (otherwise,
-# it will be treated as a rule if it has three dashes or more).
-# This can be used to separate external from internal comments,
-# or to stop a comment being associated with a method, class, or module.
-# Commenting can be turned back on with a line that starts with <tt>++</tt>.
-#
-# ##
-# # Extract the age and calculate the date-of-birth.
-# #--
-# # FIXME: fails if the birthday falls on February 29th
-# #++
-# # The DOB is returned as a Time object.
-#
-# def get_dob(person)
-# # ...
-# end
-#
-# Names of classes, files, and any method names containing an underscore or
-# preceded by a hash character are automatically linked from comment text to
-# their description. This linking works inside the current class or module,
-# and with ancestor methods (in included modules or in the superclass).
-#
-# Method parameter lists are extracted and displayed with the method
-# description. If a method calls +yield+, then the parameters passed to yield
-# will also be displayed:
-#
-# def fred
-# ...
-# yield line, address
-#
-# This will get documented as:
-#
-# fred() { |line, address| ... }
-#
-# You can override this using a comment containing ':yields: ...' immediately
-# after the method definition
-#
-# def fred # :yields: index, position
-# # ...
-#
-# yield line, address
-#
-# which will get documented as
-#
-# fred() { |index, position| ... }
-#
-# +:yields:+ is an example of a documentation directive. These appear
-# immediately after the start of the document element they are modifying.
-#
-# RDoc automatically cross-references words with underscores or camel-case.
-# To suppress cross-references, prefix the word with a \ character. To
-# include special characters like "<tt>\n</tt>", you'll need to use
-# two \ characters in normal text, but only one in \<tt> text:
-#
-# "\\n" or "<tt>\n</tt>"
-#
-# produces:
-#
-# "\\n" or "<tt>\n</tt>"
-#
-# == Directives
-#
-# Directives are keywords surrounded by ":" characters.
-#
-# === Controlling what is documented
-#
-# [+:nodoc:+ / <tt>:nodoc: all</tt>]
-# This directive prevents documentation for the element from
-# being generated. For classes and modules, methods, aliases,
-# constants, and attributes directly within the affected class or
-# module also will be omitted. By default, though, modules and
-# classes within that class or module _will_ be documented. This is
-# turned off by adding the +all+ modifier.
-#
-# module MyModule # :nodoc:
-# class Input
-# end
-# end
-#
-# module OtherModule # :nodoc: all
-# class Output
-# end
-# end
-#
-# In the above code, only class <tt>MyModule::Input</tt> will be documented.
-#
-# The +:nodoc:+ directive, like +:enddoc:+, +:stopdoc:+ and +:startdoc:+
-# presented below, is local to the current file: if you do not want to
-# document a module that appears in several files, specify +:nodoc:+ on each
-# appearance, at least once per file.
-#
-# [+:stopdoc:+ / +:startdoc:+]
-# Stop and start adding new documentation elements to the current container.
-# For example, if a class has a number of constants that you don't want to
-# document, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the
-# last. If you don't specify a +:startdoc:+ by the end of the container,
-# disables documentation for the rest of the current file.
-#
-# [+:doc:+]
-# Forces a method or attribute to be documented even if it wouldn't be
-# otherwise. Useful if, for example, you want to include documentation of a
-# particular private method.
-#
-# [+:enddoc:+]
-# Document nothing further at the current level: directives +:startdoc:+ and
-# +:doc:+ that appear after this will not be honored for the current container
-# (file, class or module), in the current file.
-#
-# [+:notnew:+ / +:not_new:+ / +:not-new:+ ]
-# Only applicable to the +initialize+ instance method. Normally RDoc
-# assumes that the documentation and parameters for +initialize+ are
-# actually for the +new+ method, and so fakes out a +new+ for the class.
-# The +:notnew:+ directive stops this. Remember that +initialize+ is private,
-# so you won't see the documentation unless you use the +-a+ command line
-# option.
-#
-# === Method arguments
-#
-# [+:arg:+ or +:args:+ _parameters_]
-# Overrides the default argument handling with exactly these parameters.
-#
-# ##
-# # :args: a, b
-#
-# def some_method(*a)
-# end
-#
-# [+:yield:+ or +:yields:+ _parameters_]
-# Overrides the default yield discovery with these parameters.
-#
-# ##
-# # :yields: key, value
-#
-# def each_thing &block
-# @things.each(&block)
-# end
-#
-# [+:call-seq:+]
-# Lines up to the next blank line or lines with a common prefix in the
-# comment are treated as the method's calling sequence, overriding the
-# default parsing of method parameters and yield arguments.
-#
-# Multiple lines may be used.
-#
-# # :call-seq:
-# # ARGF.readlines(sep=$/) -> array
-# # ARGF.readlines(limit) -> array
-# # ARGF.readlines(sep, limit) -> array
-# #
-# # ARGF.to_a(sep=$/) -> array
-# # ARGF.to_a(limit) -> array
-# # ARGF.to_a(sep, limit) -> array
-# #
-# # The remaining lines are documentation ...
-#
-# === Sections
-#
-# Sections allow you to group methods in a class into sensible containers. If
-# you use the sections 'Public', 'Internal' and 'Deprecated' (the three
-# allowed method statuses from TomDoc) the sections will be displayed in that
-# order placing the most useful methods at the top. Otherwise, sections will
-# be displayed in alphabetical order.
-#
-# [+:category:+ _section_]
-# Adds this item to the named +section+ overriding the current section. Use
-# this to group methods by section in RDoc output while maintaining a
-# sensible ordering (like alphabetical).
-#
-# # :category: Utility Methods
-# #
-# # CGI escapes +text+
-#
-# def convert_string text
-# CGI.escapeHTML text
-# end
-#
-# An empty category will place the item in the default category:
-#
-# # :category:
-# #
-# # This method is in the default category
-#
-# def some_method
-# # ...
-# end
-#
-# Unlike the :section: directive, :category: is not sticky. The category
-# only applies to the item immediately following the comment.
-#
-# Use the :section: directive to provide introductory text for a section of
-# documentation.
-#
-# [+:section:+ _title_]
-# Provides section introductory text in RDoc output. The title following
-# +:section:+ is used as the section name and the remainder of the comment
-# containing the section is used as introductory text. A section's comment
-# block must be separated from following comment blocks. Use an empty title
-# to switch to the default section.
-#
-# The :section: directive is sticky, so subsequent methods, aliases,
-# attributes, and classes will be contained in this section until the
-# section is changed. The :category: directive will override the :section:
-# directive.
-#
-# A :section: comment block may have one or more lines before the :section:
-# directive. These will be removed, and any identical lines at the end of
-# the block are also removed. This allows you to add visual cues to the
-# section.
-#
-# Example:
-#
-# # ----------------------------------------
-# # :section: My Section
-# # This is the section that I wrote.
-# # See it glisten in the noon-day sun.
-# # ----------------------------------------
-#
-# ##
-# # Comment for some_method
-#
-# def some_method
-# # ...
-# end
-#
-# === Other directives
-#
-# [+:markup:+ _type_]
-# Overrides the default markup type for this comment with the specified
-# markup type. For Ruby files, if the first comment contains this directive
-# it is applied automatically to all comments in the file.
-#
-# Unless you are converting between markup formats you should use a
-# <code>.rdoc_options</code> file to specify the default documentation
-# format for your entire project. See RDoc::Options@Saved+Options for
-# instructions.
-#
-# At the top of a file the +:markup:+ directive applies to the entire file:
-#
-# # coding: UTF-8
-# # :markup: TomDoc
-#
-# # TomDoc comment here ...
-#
-# class MyClass
-# # ...
-#
-# For just one comment:
-#
-# # ...
-# end
-#
-# # :markup: RDoc
-# #
-# # This is a comment in RDoc markup format ...
-#
-# def some_method
-# # ...
-#
-# See Markup@CONTRIBUTING for instructions on adding a new markup format.
-#
-# [+:include:+ _filename_]
-# Include the contents of the named file at this point. This directive
-# must appear alone on one line, possibly preceded by spaces. In this
-# position, it can be escaped with a \ in front of the first colon.
-#
-# The file will be searched for in the directories listed by the +--include+
-# option, or in the current directory by default. The contents of the file
-# will be shifted to have the same indentation as the ':' at the start of
-# the +:include:+ directive.
-#
-# [+:title:+ _text_]
-# Sets the title for the document. Equivalent to the <tt>--title</tt>
-# command line parameter. (The command line parameter overrides any :title:
-# directive in the source).
-#
-# [+:main:+ _name_]
-# Equivalent to the <tt>--main</tt> command line parameter.
+# See RDoc::MarkupReference.
#
#--
# Original Author:: Dave Thomas, dave@pragmaticprogrammer.com
@@ -822,45 +191,45 @@ https://github.com/ruby/rdoc/issues
document.accept formatter
end
- autoload :Parser, 'rdoc/markup/parser'
- autoload :PreProcess, 'rdoc/markup/pre_process'
+ autoload :Parser, "#{__dir__}/markup/parser"
+ autoload :PreProcess, "#{__dir__}/markup/pre_process"
# Inline markup classes
- autoload :AttrChanger, 'rdoc/markup/attr_changer'
- autoload :AttrSpan, 'rdoc/markup/attr_span'
- autoload :Attributes, 'rdoc/markup/attributes'
- autoload :AttributeManager, 'rdoc/markup/attribute_manager'
- autoload :RegexpHandling, 'rdoc/markup/regexp_handling'
+ autoload :AttrChanger, "#{__dir__}/markup/attr_changer"
+ autoload :AttrSpan, "#{__dir__}/markup/attr_span"
+ autoload :Attributes, "#{__dir__}/markup/attributes"
+ autoload :AttributeManager, "#{__dir__}/markup/attribute_manager"
+ autoload :RegexpHandling, "#{__dir__}/markup/regexp_handling"
# RDoc::Markup AST
- autoload :BlankLine, 'rdoc/markup/blank_line'
- autoload :BlockQuote, 'rdoc/markup/block_quote'
- autoload :Document, 'rdoc/markup/document'
- autoload :HardBreak, 'rdoc/markup/hard_break'
- autoload :Heading, 'rdoc/markup/heading'
- autoload :Include, 'rdoc/markup/include'
- autoload :IndentedParagraph, 'rdoc/markup/indented_paragraph'
- autoload :List, 'rdoc/markup/list'
- autoload :ListItem, 'rdoc/markup/list_item'
- autoload :Paragraph, 'rdoc/markup/paragraph'
- autoload :Raw, 'rdoc/markup/raw'
- autoload :Rule, 'rdoc/markup/rule'
- autoload :Verbatim, 'rdoc/markup/verbatim'
+ autoload :BlankLine, "#{__dir__}/markup/blank_line"
+ autoload :BlockQuote, "#{__dir__}/markup/block_quote"
+ autoload :Document, "#{__dir__}/markup/document"
+ autoload :HardBreak, "#{__dir__}/markup/hard_break"
+ autoload :Heading, "#{__dir__}/markup/heading"
+ autoload :Include, "#{__dir__}/markup/include"
+ autoload :IndentedParagraph, "#{__dir__}/markup/indented_paragraph"
+ autoload :List, "#{__dir__}/markup/list"
+ autoload :ListItem, "#{__dir__}/markup/list_item"
+ autoload :Paragraph, "#{__dir__}/markup/paragraph"
+ autoload :Table, "#{__dir__}/markup/table"
+ autoload :Raw, "#{__dir__}/markup/raw"
+ autoload :Rule, "#{__dir__}/markup/rule"
+ autoload :Verbatim, "#{__dir__}/markup/verbatim"
# Formatters
- autoload :Formatter, 'rdoc/markup/formatter'
-
- autoload :ToAnsi, 'rdoc/markup/to_ansi'
- autoload :ToBs, 'rdoc/markup/to_bs'
- autoload :ToHtml, 'rdoc/markup/to_html'
- autoload :ToHtmlCrossref, 'rdoc/markup/to_html_crossref'
- autoload :ToHtmlSnippet, 'rdoc/markup/to_html_snippet'
- autoload :ToLabel, 'rdoc/markup/to_label'
- autoload :ToMarkdown, 'rdoc/markup/to_markdown'
- autoload :ToRdoc, 'rdoc/markup/to_rdoc'
- autoload :ToTableOfContents, 'rdoc/markup/to_table_of_contents'
- autoload :ToTest, 'rdoc/markup/to_test'
- autoload :ToTtOnly, 'rdoc/markup/to_tt_only'
+ autoload :Formatter, "#{__dir__}/markup/formatter"
+
+ autoload :ToAnsi, "#{__dir__}/markup/to_ansi"
+ autoload :ToBs, "#{__dir__}/markup/to_bs"
+ autoload :ToHtml, "#{__dir__}/markup/to_html"
+ autoload :ToHtmlCrossref, "#{__dir__}/markup/to_html_crossref"
+ autoload :ToHtmlSnippet, "#{__dir__}/markup/to_html_snippet"
+ autoload :ToLabel, "#{__dir__}/markup/to_label"
+ autoload :ToMarkdown, "#{__dir__}/markup/to_markdown"
+ autoload :ToRdoc, "#{__dir__}/markup/to_rdoc"
+ autoload :ToTableOfContents, "#{__dir__}/markup/to_table_of_contents"
+ autoload :ToTest, "#{__dir__}/markup/to_test"
+ autoload :ToTtOnly, "#{__dir__}/markup/to_tt_only"
end
-
diff --git a/lib/rdoc/markup/attr_span.rb b/lib/rdoc/markup/attr_span.rb
index 63aace60d2..20ef11cd6d 100644
--- a/lib/rdoc/markup/attr_span.rb
+++ b/lib/rdoc/markup/attr_span.rb
@@ -7,16 +7,22 @@ class RDoc::Markup::AttrSpan
##
# Creates a new AttrSpan for +length+ characters
- def initialize(length)
+ def initialize(length, exclusive)
@attrs = Array.new(length, 0)
+ @exclusive = exclusive
end
##
# Toggles +bits+ from +start+ to +length+
def set_attrs(start, length, bits)
+ updated = false
for i in start ... (start+length)
- @attrs[i] |= bits
+ if (@exclusive & @attrs[i]) == 0 || (@exclusive & bits) != 0
+ @attrs[i] |= bits
+ updated = true
+ end
end
+ updated
end
##
diff --git a/lib/rdoc/markup/attribute_manager.rb b/lib/rdoc/markup/attribute_manager.rb
index f052bc8b01..601e6bc189 100644
--- a/lib/rdoc/markup/attribute_manager.rb
+++ b/lib/rdoc/markup/attribute_manager.rb
@@ -2,6 +2,17 @@
##
# Manages changes of attributes in a block of text
+unless MatchData.method_defined?(:match_length)
+ using Module.new {
+ refine(MatchData) {
+ def match_length(nth)
+ b, e = offset(nth)
+ e - b if b
+ end
+ }
+ }
+end
+
class RDoc::Markup::AttributeManager
##
@@ -59,6 +70,10 @@ class RDoc::Markup::AttributeManager
attr_reader :regexp_handlings
##
+ # A bits of exclusive maps
+ attr_reader :exclusive_bitmap
+
+ ##
# Creates a new attribute manager that understands bold, emphasized and
# teletype text.
@@ -68,17 +83,18 @@ class RDoc::Markup::AttributeManager
@protectable = %w[<]
@regexp_handlings = []
@word_pair_map = {}
+ @exclusive_bitmap = 0
@attributes = RDoc::Markup::Attributes.new
- add_word_pair "*", "*", :BOLD
- add_word_pair "_", "_", :EM
- add_word_pair "+", "+", :TT
+ add_word_pair "*", "*", :BOLD, true
+ add_word_pair "_", "_", :EM, true
+ add_word_pair "+", "+", :TT, true
- add_html "em", :EM
- add_html "i", :EM
- add_html "b", :BOLD
- add_html "tt", :TT
- add_html "code", :TT
+ add_html "em", :EM, true
+ add_html "i", :EM, true
+ add_html "b", :BOLD, true
+ add_html "tt", :TT, true
+ add_html "code", :TT, true
end
##
@@ -122,29 +138,60 @@ class RDoc::Markup::AttributeManager
res
end
+ def exclusive?(attr)
+ (attr & @exclusive_bitmap) != 0
+ end
+
+ NON_PRINTING_START = "\1" # :nodoc:
+ NON_PRINTING_END = "\2" # :nodoc:
+
##
# Map attributes like <b>text</b>to the sequence
# \001\002<char>\001\003<char>, where <char> is a per-attribute specific
# character
- def convert_attrs(str, attrs)
- # first do matching ones
- tags = @matching_word_pairs.keys.join("")
-
- re = /(^|\W)([#{tags}])([#\\]?[\w:.\/-]+?\S?)\2(\W|$)/
+ def convert_attrs(str, attrs, exclusive = false)
+ convert_attrs_matching_word_pairs(str, attrs, exclusive)
+ convert_attrs_word_pair_map(str, attrs, exclusive)
+ end
- 1 while str.gsub!(re) do
- attr = @matching_word_pairs[$2]
- attrs.set_attrs($`.length + $1.length + $2.length, $3.length, attr)
- $1 + NULL * $2.length + $3 + NULL * $2.length + $4
- end
+ def convert_attrs_matching_word_pairs(str, attrs, exclusive)
+ # first do matching ones
+ tags = @matching_word_pairs.select { |start, bitmap|
+ exclusive == exclusive?(bitmap)
+ }.keys
+ return if tags.empty?
+ tags = "[#{tags.join("")}](?!#{PROTECT_ATTR})"
+ all_tags = "[#{@matching_word_pairs.keys.join("")}](?!#{PROTECT_ATTR})"
+
+ re = /(?:^|\W|#{all_tags})\K(#{tags})(\1*[#\\]?[\w:#{PROTECT_ATTR}.\/\[\]-]+?\S?)\1(?!\1)(?=#{all_tags}|\W|$)/
+
+ 1 while str.gsub!(re) { |orig|
+ a, w = (m = $~).values_at(1, 2)
+ attr = @matching_word_pairs[a]
+ if attrs.set_attrs(m.begin(2), w.length, attr)
+ a = NULL * a.length
+ else
+ a = NON_PRINTING_START + a + NON_PRINTING_END
+ end
+ a + w + a
+ }
+ str.delete!(NON_PRINTING_START + NON_PRINTING_END)
+ end
+ def convert_attrs_word_pair_map(str, attrs, exclusive)
# then non-matching
unless @word_pair_map.empty? then
@word_pair_map.each do |regexp, attr|
- str.gsub!(regexp) {
- attrs.set_attrs($`.length + $1.length, $2.length, attr)
- NULL * $1.length + $2 + NULL * $3.length
+ next unless exclusive == exclusive?(attr)
+ 1 while str.gsub!(regexp) { |orig|
+ w = (m = ($~))[2]
+ updated = attrs.set_attrs(m.begin(2), w.length, attr)
+ if updated
+ NULL * m.match_length(1) + w + NULL * m.match_length(3)
+ else
+ orig
+ end
}
end
end
@@ -153,14 +200,16 @@ class RDoc::Markup::AttributeManager
##
# Converts HTML tags to RDoc attributes
- def convert_html(str, attrs)
- tags = @html_tags.keys.join '|'
+ def convert_html(str, attrs, exclusive = false)
+ tags = @html_tags.select { |start, bitmap|
+ exclusive == exclusive?(bitmap)
+ }.keys.join '|'
- 1 while str.gsub!(/<(#{tags})>(.*?)<\/\1>/i) {
+ 1 while str.gsub!(/<(#{tags})>(.*?)<\/\1>/i) { |orig|
attr = @html_tags[$1.downcase]
- html_length = $1.length + 2
+ html_length = $~.match_length(1) + 2 # "<>".length
seq = NULL * html_length
- attrs.set_attrs($`.length + html_length, $2.length, attr)
+ attrs.set_attrs($~.begin(2), $~.match_length(2), attr)
seq + $2 + seq + NULL
}
end
@@ -168,8 +217,9 @@ class RDoc::Markup::AttributeManager
##
# Converts regexp handling sequences to RDoc attributes
- def convert_regexp_handlings str, attrs
+ def convert_regexp_handlings str, attrs, exclusive = false
@regexp_handlings.each do |regexp, attribute|
+ next unless exclusive == exclusive?(attribute)
str.scan(regexp) do
capture = $~.size == 1 ? 0 : 1
@@ -205,7 +255,7 @@ class RDoc::Markup::AttributeManager
#
# am.add_word_pair '*', '*', :BOLD
- def add_word_pair(start, stop, name)
+ def add_word_pair(start, stop, name, exclusive = false)
raise ArgumentError, "Word flags may not start with '<'" if
start[0,1] == '<'
@@ -220,6 +270,8 @@ class RDoc::Markup::AttributeManager
@protectable << start[0,1]
@protectable.uniq!
+
+ @exclusive_bitmap |= bitmap if exclusive
end
##
@@ -228,8 +280,10 @@ class RDoc::Markup::AttributeManager
#
# am.add_html 'em', :EM
- def add_html(tag, name)
- @html_tags[tag.downcase] = @attributes.bitmap_for name
+ def add_html(tag, name, exclusive = false)
+ bitmap = @attributes.bitmap_for name
+ @html_tags[tag.downcase] = bitmap
+ @exclusive_bitmap |= bitmap if exclusive
end
##
@@ -238,8 +292,10 @@ class RDoc::Markup::AttributeManager
#
# @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK)
- def add_regexp_handling pattern, name
- @regexp_handlings << [pattern, @attributes.bitmap_for(name)]
+ def add_regexp_handling pattern, name, exclusive = false
+ bitmap = @attributes.bitmap_for(name)
+ @regexp_handlings << [pattern, bitmap]
+ @exclusive_bitmap |= bitmap if exclusive
end
##
@@ -250,8 +306,11 @@ class RDoc::Markup::AttributeManager
mask_protected_sequences
- @attrs = RDoc::Markup::AttrSpan.new @str.length
+ @attrs = RDoc::Markup::AttrSpan.new @str.length, @exclusive_bitmap
+ convert_attrs @str, @attrs, true
+ convert_html @str, @attrs, true
+ convert_regexp_handlings @str, @attrs, true
convert_attrs @str, @attrs
convert_html @str, @attrs
convert_regexp_handlings @str, @attrs
diff --git a/lib/rdoc/markup/formatter.rb b/lib/rdoc/markup/formatter.rb
index 6dff96c7d0..2bac76e838 100644
--- a/lib/rdoc/markup/formatter.rb
+++ b/lib/rdoc/markup/formatter.rb
@@ -156,7 +156,7 @@ class RDoc::Markup::Formatter
method_name = "handle_regexp_#{name}"
if respond_to? method_name then
- target.text = send method_name, target
+ target.text = public_send method_name, target
handled = true
end
end
diff --git a/lib/rdoc/markup/parser.rb b/lib/rdoc/markup/parser.rb
index 1b54a519d1..0029df7e65 100644
--- a/lib/rdoc/markup/parser.rb
+++ b/lib/rdoc/markup/parser.rb
@@ -287,6 +287,12 @@ class RDoc::Markup::Parser
line << ' ' * indent
when :BREAK, :TEXT then
line << data
+ when :BLOCKQUOTE then
+ line << '>>>'
+ peek_type, _, peek_column = peek_token
+ if peek_type != :NEWLINE and peek_column
+ line << ' ' * (peek_column - column - 3)
+ end
else # *LIST_TOKENS
list_marker = case type
when :BULLET then data
@@ -372,11 +378,8 @@ class RDoc::Markup::Parser
unget
parse_text parent, indent
when :BLOCKQUOTE then
- type, _, column = get
- if type == :NEWLINE
- type, _, column = get
- end
- unget if type
+ nil while (type, = get; type) and type != :NEWLINE
+ _, _, column, = peek_token
bq = RDoc::Markup::BlockQuote.new
p :blockquote_start => [data, column] if @debug
parse bq, column
@@ -544,7 +547,10 @@ class RDoc::Markup::Parser
[:NOTE, @s[1], *pos]
# >>> followed by end of line => :BLOCKQUOTE
when @s.scan(/>>> *(\w+)?$/) then
- [:BLOCKQUOTE, @s[1], *pos]
+ if word = @s[1]
+ @s.unscan(word)
+ end
+ [:BLOCKQUOTE, word, *pos]
# anything else: :TEXT
else
@s.scan(/(.*?)( )?\r?$/)
diff --git a/lib/rdoc/markup/pre_process.rb b/lib/rdoc/markup/pre_process.rb
index d9e0dcac14..88078c9cef 100644
--- a/lib/rdoc/markup/pre_process.rb
+++ b/lib/rdoc/markup/pre_process.rb
@@ -163,6 +163,8 @@ class RDoc::Markup::PreProcess
if RDoc::Context === code_object then
section = code_object.add_section param
code_object.temporary_section = section
+ elsif RDoc::AnyMethod === code_object then
+ code_object.section_title = param
end
blankline # ignore category if we're not on an RDoc::Context
@@ -178,7 +180,7 @@ class RDoc::Markup::PreProcess
blankline
when 'include' then
- filename = param.split.first
+ filename = param.split(' ', 2).first
include_file filename, prefix, encoding
when 'main' then
@options.main_page = param if @options.respond_to? :main_page
diff --git a/lib/rdoc/markup/table.rb b/lib/rdoc/markup/table.rb
new file mode 100644
index 0000000000..7bcb10aff3
--- /dev/null
+++ b/lib/rdoc/markup/table.rb
@@ -0,0 +1,47 @@
+# frozen_string_literal: true
+##
+# A section of table
+
+class RDoc::Markup::Table
+ attr_accessor :header, :align, :body
+
+ def initialize header, align, body
+ @header, @align, @body = header, align, body
+ end
+
+ def == other
+ self.class == other.class and
+ @header == other.header and
+ @align == other.align and
+ @body == other.body
+ end
+
+ def accept visitor
+ visitor.accept_table @header, @body, @align
+ end
+
+ def pretty_print q # :nodoc:
+ q.group 2, '[Table: ', ']' do
+ q.group 2, '[Head: ', ']' do
+ q.seplist @header.zip(@align) do |text, align|
+ q.pp text
+ if align
+ q.text ":"
+ q.breakable
+ q.text align.to_s
+ end
+ end
+ end
+ q.breakable
+ q.group 2, '[Body: ', ']' do
+ q.seplist @body do |body|
+ q.group 2, '[', ']' do
+ q.seplist body do |text|
+ q.pp text
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb
index 9ae0fff8a7..bf323074de 100644
--- a/lib/rdoc/markup/to_html.rb
+++ b/lib/rdoc/markup/to_html.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'cgi'
+require 'cgi/util'
##
# Outputs RDoc markup as HTML.
@@ -52,12 +52,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
@th = nil
@hard_break = "<br>\n"
- # external links
- @markup.add_regexp_handling(/(?:link:|https?:|mailto:|ftp:|irc:|www\.)\S+\w/,
- :HYPERLINK)
-
- add_regexp_handling_RDOCLINK
- add_regexp_handling_TIDYLINK
+ init_regexp_handlings
init_tags
end
@@ -66,10 +61,30 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
#
# These methods are used by regexp handling markup added by RDoc::Markup#add_regexp_handling.
+ URL_CHARACTERS_REGEXP_STR = /[A-Za-z0-9\-._~:\/\?#\[\]@!$&'\(\)*+,;%=]/.source
+
+ ##
+ # Adds regexp handlings.
+
+ def init_regexp_handlings
+ # external links
+ @markup.add_regexp_handling(/(?:link:|https?:|mailto:|ftp:|irc:|www\.)#{URL_CHARACTERS_REGEXP_STR}+\w/,
+ :HYPERLINK)
+ init_link_notation_regexp_handlings
+ end
+
+ ##
+ # Adds regexp handlings about link notations.
+
+ def init_link_notation_regexp_handlings
+ add_regexp_handling_RDOCLINK
+ add_regexp_handling_TIDYLINK
+ end
+
def handle_RDOCLINK url # :nodoc:
case url
when /^rdoc-ref:/
- $'
+ CGI.escapeHTML($')
when /^rdoc-label:/
text = $'
@@ -80,13 +95,11 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
else text
end
- gen_url url, text
+ gen_url CGI.escapeHTML(url), CGI.escapeHTML(text)
when /^rdoc-image:/
- "<img src=\"#{$'}\">"
- else
- url =~ /\Ardoc-[a-z]+:/
-
- $'
+ %[<img src=\"#{CGI.escapeHTML($')}\">]
+ when /\Ardoc-[a-z]+:/
+ CGI.escapeHTML($')
end
end
@@ -110,7 +123,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
# Reference to a local file relative to the output directory.
def handle_regexp_HYPERLINK(target)
- url = target.text
+ url = CGI.escapeHTML(target.text)
gen_url url, url
end
@@ -139,9 +152,13 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
text =~ /^\{(.*)\}\[(.*?)\]$/ or text =~ /^(\S+)\[(.*?)\]$/
label = $1
- url = $2
+ url = CGI.escapeHTML($2)
- label = handle_RDOCLINK label if /^rdoc-image:/ =~ label
+ if /^rdoc-image:/ =~ label
+ label = handle_RDOCLINK(label)
+ else
+ label = CGI.escapeHTML(label)
+ end
gen_url url, label
end
@@ -301,6 +318,29 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
@res << raw.parts.join("\n")
end
+ ##
+ # Adds +table+ to the output
+
+ def accept_table header, body, aligns
+ @res << "\n<table role=\"table\">\n<thead>\n<tr>\n"
+ header.zip(aligns) do |text, align|
+ @res << '<th'
+ @res << ' align="' << align << '"' if align
+ @res << '>' << to_html(text) << "</th>\n"
+ end
+ @res << "</tr>\n</thead>\n<tbody>\n"
+ body.each do |row|
+ @res << "<tr>\n"
+ row.zip(aligns) do |text, align|
+ @res << '<td'
+ @res << ' align="' << align << '"' if align
+ @res << '>' << to_html(text) << "</td>\n"
+ end
+ @res << "</tr>\n"
+ end
+ @res << "</tbody>\n</table>\n"
+ end
+
# :section: Utilities
##
@@ -321,6 +361,10 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then
"<img src=\"#{url}\" />"
else
+ if scheme != 'link' and %r%\A((?!https?:)(?:[^/#]*/)*+)([^/#]+)\.(rb|rdoc|md)(?=\z|#)%i =~ url
+ url = "#$1#{$2.tr('.', '_')}_#$3.html#$'"
+ end
+
text = text.sub %r%^#{scheme}:/*%i, ''
text = text.sub %r%^[*\^](\d+)$%, '\1'
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb
index 9314f04fae..a9fd09df41 100644
--- a/lib/rdoc/markup/to_html_crossref.rb
+++ b/lib/rdoc/markup/to_html_crossref.rb
@@ -39,10 +39,18 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
@hyperlink_all = @options.hyperlink_all
@show_hash = @options.show_hash
- crossref_re = @hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP
+ @cross_reference = RDoc::CrossReference.new @context
+ end
+
+ def init_link_notation_regexp_handlings
+ add_regexp_handling_RDOCLINK
+
+ # The crossref must be linked before tidylink because Klass.method[:sym]
+ # will be processed as a tidylink first and will be broken.
+ crossref_re = @options.hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP
@markup.add_regexp_handling crossref_re, :CROSSREF
- @cross_reference = RDoc::CrossReference.new @context
+ add_regexp_handling_TIDYLINK
end
##
@@ -54,7 +62,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
name = name[1..-1] unless @show_hash if name[0, 1] == '#'
- if name =~ /(.*[^#:])@/
+ if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
text ||= "#{CGI.unescape $'} at <code>#{$1}</code>"
code = false
else
@@ -130,7 +138,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
# Creates an HTML link to +name+ with the given +text+.
def link name, text, code = true
- if name =~ /(.*[^#:])@/ then
+ if !(name.end_with?('+@', '-@')) and name =~ /(.*[^#:])@/
name = $1
label = $'
end
@@ -144,7 +152,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
path = ref.as_href @from_path
if code and RDoc::CodeObject === ref and !(RDoc::TopLevel === ref)
- text = "<code>#{text}</code>"
+ text = "<code>#{CGI.escapeHTML text}</code>"
end
if path =~ /#/ then
diff --git a/lib/rdoc/markup/to_joined_paragraph.rb b/lib/rdoc/markup/to_joined_paragraph.rb
index 795f3f62ee..46e07c94ad 100644
--- a/lib/rdoc/markup/to_joined_paragraph.rb
+++ b/lib/rdoc/markup/to_joined_paragraph.rb
@@ -41,6 +41,7 @@ class RDoc::Markup::ToJoinedParagraph < RDoc::Markup::Formatter
alias accept_raw ignore
alias accept_rule ignore
alias accept_verbatim ignore
+ alias accept_table ignore
end
diff --git a/lib/rdoc/markup/to_label.rb b/lib/rdoc/markup/to_label.rb
index 3d95ccc2e2..aa1dbcf2a1 100644
--- a/lib/rdoc/markup/to_label.rb
+++ b/lib/rdoc/markup/to_label.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'cgi'
+require 'cgi/util'
##
# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are
diff --git a/lib/rdoc/markup/to_rdoc.rb b/lib/rdoc/markup/to_rdoc.rb
index 81b16c4973..2a9b05625c 100644
--- a/lib/rdoc/markup/to_rdoc.rb
+++ b/lib/rdoc/markup/to_rdoc.rb
@@ -238,6 +238,34 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
end
##
+ # Adds +table+ to the output
+
+ def accept_table header, body, aligns
+ widths = header.zip(body) do |h, b|
+ [h.size, b.size].max
+ end
+ aligns = aligns.map do |a|
+ case a
+ when nil
+ :center
+ when :left
+ :ljust
+ when :right
+ :rjust
+ end
+ end
+ @res << header.zip(widths, aligns) do |h, w, a|
+ h.__send__(a, w)
+ end.join("|").rstrip << "\n"
+ @res << widths.map {|w| "-" * w }.join("|") << "\n"
+ body.each do |row|
+ @res << row.zip(widths, aligns) do |t, w, a|
+ t.__send__(a, w)
+ end.join("|").rstrip << "\n"
+ end
+ end
+
+ ##
# Applies attribute-specific markup to +text+ using RDoc::AttributeManager
def attributes text
@@ -302,31 +330,14 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
text_len = 20 if text_len < 20
- re = /^(.{0,#{text_len}})[ \n]/
next_prefix = ' ' * @indent
prefix = @prefix || next_prefix
@prefix = nil
- @res << prefix
-
- while text.length > text_len
- if text =~ re then
- @res << $1
- text.slice!(0, $&.length)
- else
- @res << text.slice!(0, text_len)
- end
-
- @res << "\n" << next_prefix
- end
-
- if text.empty? then
- @res.pop
- @res.pop
- else
- @res << text
- @res << "\n"
+ text.scan(/\G(?:([^ \n]{#{text_len}})(?=[^ \n])|(.{1,#{text_len}})(?:[ \n]|\z))/) do
+ @res << prefix << ($1 || $2) << "\n"
+ prefix = next_prefix
end
end
diff --git a/lib/rdoc/markup/to_table_of_contents.rb b/lib/rdoc/markup/to_table_of_contents.rb
index f68b90bcf6..eb8e8faa16 100644
--- a/lib/rdoc/markup/to_table_of_contents.rb
+++ b/lib/rdoc/markup/to_table_of_contents.rb
@@ -82,6 +82,7 @@ class RDoc::Markup::ToTableOfContents < RDoc::Markup::Formatter
alias accept_list_item_end ignore
alias accept_list_end_bullet ignore
alias accept_list_start ignore
+ alias accept_table ignore
# :startdoc:
end
diff --git a/lib/rdoc/method_attr.rb b/lib/rdoc/method_attr.rb
index 3cef78c4a5..aae3c47e85 100644
--- a/lib/rdoc/method_attr.rb
+++ b/lib/rdoc/method_attr.rb
@@ -289,7 +289,7 @@ class RDoc::MethodAttr < RDoc::CodeObject
# HTML id-friendly method/attribute name
def html_name
- require 'cgi'
+ require 'cgi/util'
CGI.escape(@name.gsub('-', '-2D')).gsub('%','-').sub(/^-/, '')
end
diff --git a/lib/rdoc/normal_class.rb b/lib/rdoc/normal_class.rb
index 6729b18448..68dfa7d4a3 100644
--- a/lib/rdoc/normal_class.rb
+++ b/lib/rdoc/normal_class.rb
@@ -56,7 +56,7 @@ class RDoc::NormalClass < RDoc::ClassModule
def pretty_print q # :nodoc:
superclass = @superclass ? " < #{@superclass}" : nil
- q.group 2, "[class #{full_name}#{superclass} ", "]" do
+ q.group 2, "[class #{full_name}#{superclass}", "]" do
q.breakable
q.text "includes:"
q.breakable
diff --git a/lib/rdoc/normal_module.rb b/lib/rdoc/normal_module.rb
index 8f364be41c..edf29f8f1c 100644
--- a/lib/rdoc/normal_module.rb
+++ b/lib/rdoc/normal_module.rb
@@ -30,7 +30,7 @@ class RDoc::NormalModule < RDoc::ClassModule
end
def pretty_print q # :nodoc:
- q.group 2, "[module #{full_name}: ", "]" do
+ q.group 2, "[module #{full_name}:", "]" do
q.breakable
q.text "includes:"
q.breakable
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 43494c85be..eed0f6b39b 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -106,6 +106,7 @@ class RDoc::Options
generator_options
generators
op_dir
+ page_dir
option_parser
pipe
rdoc_include
@@ -338,8 +339,13 @@ class RDoc::Options
attr_reader :visibility
- def initialize # :nodoc:
+ ##
+ # Indicates if files of test suites should be skipped
+ attr_accessor :skip_tests
+
+ def initialize loaded_options = nil # :nodoc:
init_ivars
+ override loaded_options if loaded_options
end
def init_ivars # :nodoc:
@@ -384,6 +390,7 @@ class RDoc::Options
@write_options = false
@encoding = Encoding::UTF_8
@charset = @encoding.name
+ @skip_tests = true
end
def init_with map # :nodoc:
@@ -417,6 +424,38 @@ class RDoc::Options
init_with map
end
+ def override map # :nodoc:
+ if map.has_key?('encoding')
+ encoding = map['encoding']
+ @encoding = encoding ? Encoding.find(encoding) : encoding
+ end
+
+ @charset = map['charset'] if map.has_key?('charset')
+ @exclude = map['exclude'] if map.has_key?('exclude')
+ @generator_name = map['generator_name'] if map.has_key?('generator_name')
+ @hyperlink_all = map['hyperlink_all'] if map.has_key?('hyperlink_all')
+ @line_numbers = map['line_numbers'] if map.has_key?('line_numbers')
+ @locale_name = map['locale_name'] if map.has_key?('locale_name')
+ @locale_dir = map['locale_dir'] if map.has_key?('locale_dir')
+ @main_page = map['main_page'] if map.has_key?('main_page')
+ @markup = map['markup'] if map.has_key?('markup')
+ @op_dir = map['op_dir'] if map.has_key?('op_dir')
+ @page_dir = map['page_dir'] if map.has_key?('page_dir')
+ @show_hash = map['show_hash'] if map.has_key?('show_hash')
+ @tab_width = map['tab_width'] if map.has_key?('tab_width')
+ @template_dir = map['template_dir'] if map.has_key?('template_dir')
+ @title = map['title'] if map.has_key?('title')
+ @visibility = map['visibility'] if map.has_key?('visibility')
+ @webcvs = map['webcvs'] if map.has_key?('webcvs')
+
+ if map.has_key?('rdoc_include')
+ @rdoc_include = sanitize_path map['rdoc_include']
+ end
+ if map.has_key?('static_path')
+ @static_path = sanitize_path map['static_path']
+ end
+ end
+
def == other # :nodoc:
self.class === other and
@encoding == other.encoding and
@@ -481,19 +520,22 @@ class RDoc::Options
##
# For dumping YAML
- def encode_with coder # :nodoc:
+ def to_yaml(*options) # :nodoc:
encoding = @encoding ? @encoding.name : nil
- coder.add 'encoding', encoding
- coder.add 'static_path', sanitize_path(@static_path)
- coder.add 'rdoc_include', sanitize_path(@rdoc_include)
+ yaml = {}
+ yaml['encoding'] = encoding
+ yaml['static_path'] = sanitize_path(@static_path)
+ yaml['rdoc_include'] = sanitize_path(@rdoc_include)
+ yaml['page_dir'] = (sanitize_path([@page_dir]).first if @page_dir)
ivars = instance_variables.map { |ivar| ivar.to_s[1..-1] }
ivars -= SPECIAL
ivars.sort.each do |ivar|
- coder.add ivar, instance_variable_get("@#{ivar}")
+ yaml[ivar] = instance_variable_get("@#{ivar}")
end
+ yaml.to_yaml
end
##
@@ -516,6 +558,11 @@ class RDoc::Options
# #template.
def finish
+ if @write_options then
+ write_options
+ exit
+ end
+
@op_dir ||= 'doc'
@rdoc_include << "." if @rdoc_include.empty?
@@ -553,14 +600,14 @@ class RDoc::Options
def finish_page_dir
return unless @page_dir
- @files << @page_dir.to_s
+ @files << @page_dir
- page_dir = nil
+ page_dir = Pathname(@page_dir)
begin
- page_dir = @page_dir.expand_path.relative_path_from @root
+ page_dir = page_dir.expand_path.relative_path_from @root
rescue ArgumentError
# On Windows, sometimes crosses different drive letters.
- page_dir = @page_dir.expand_path
+ page_dir = page_dir.expand_path
end
@page_dir = page_dir
@@ -736,6 +783,13 @@ Usage: #{opt.program_name} [options] [names...]
opt.separator nil
+ opt.on("--no-skipping-tests", nil,
+ "Don't skip generating documentation for test and spec files") do |value|
+ @skip_tests = false
+ end
+
+ opt.separator nil
+
opt.on("--extension=NEW=OLD", "-E",
"Treat files ending with .new as if they",
"ended with .old. Using '-E cgi=rb' will",
@@ -755,7 +809,7 @@ Usage: #{opt.program_name} [options] [names...]
opt.on("--[no-]force-update", "-U",
"Forces rdoc to scan all sources even if",
- "newer than the flag file.") do |value|
+ "no files are newer than the flag file.") do |value|
@force_update = value
end
@@ -815,7 +869,7 @@ Usage: #{opt.program_name} [options] [names...]
"such files at your project root.",
"NOTE: Do not use the same file name in",
"the page dir and the root of your project") do |page_dir|
- @page_dir = Pathname(page_dir)
+ @page_dir = page_dir
end
opt.separator nil
@@ -939,7 +993,7 @@ Usage: #{opt.program_name} [options] [names...]
opt.on("--template-stylesheets=FILES", PathArray,
"Set (or add to) the list of files to",
"include with the html template.") do |value|
- @template_stylesheets << value
+ @template_stylesheets.concat value
end
opt.separator nil
@@ -1127,13 +1181,6 @@ Usage: #{opt.program_name} [options] [names...]
@files = argv.dup
- finish
-
- if @write_options then
- write_options
- exit
- end
-
self
end
@@ -1246,8 +1293,37 @@ Usage: #{opt.program_name} [options] [names...]
File.open '.rdoc_options', 'w' do |io|
io.set_encoding Encoding::UTF_8
- YAML.dump self, io
+ io.print to_yaml
+ end
+ end
+
+ ##
+ # Loads options from .rdoc_options if the file exists, otherwise creates a
+ # new RDoc::Options instance.
+
+ def self.load_options
+ options_file = File.expand_path '.rdoc_options'
+ return RDoc::Options.new unless File.exist? options_file
+
+ RDoc.load_yaml
+
+ begin
+ options = YAML.safe_load File.read('.rdoc_options'), permitted_classes: [RDoc::Options, Symbol]
+ rescue Psych::SyntaxError
+ raise RDoc::Error, "#{options_file} is not a valid rdoc options file"
end
+
+ return RDoc::Options.new unless options # Allow empty file.
+
+ raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless
+ RDoc::Options === options or Hash === options
+
+ if Hash === options
+ # Override the default values with the contents of YAML file.
+ options = RDoc::Options.new options
+ end
+
+ options
end
end
diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb
index 597bcd6b9d..3bb6f5d1f2 100644
--- a/lib/rdoc/parser.rb
+++ b/lib/rdoc/parser.rb
@@ -78,7 +78,7 @@ class RDoc::Parser
return true if s[0, 2] == Marshal.dump('')[0, 2] or s.index("\x00")
- mode = 'r:utf-8' # default source encoding has been chagened to utf-8
+ mode = 'r:utf-8' # default source encoding has been changed to utf-8
s.sub!(/\A#!.*\n/, '') # assume shebang line isn't longer than 1024.
encoding = s[/^\s*\#\s*(?:-\*-\s*)?(?:en)?coding:\s*([^\s;]+?)(?:-\*-|[\s;])/, 1]
mode = "rb:#{encoding}" if encoding
@@ -263,15 +263,32 @@ class RDoc::Parser
@preprocess.options = @options
end
- autoload :RubyTools, 'rdoc/parser/ruby_tools'
- autoload :Text, 'rdoc/parser/text'
+ autoload :RubyTools, "#{__dir__}/parser/ruby_tools"
+ autoload :Text, "#{__dir__}/parser/text"
+ ##
+ # Normalizes tabs in +body+
+
+ def handle_tab_width(body)
+ if /\t/ =~ body
+ tab_width = @options.tab_width
+ body.split(/\n/).map do |line|
+ 1 while line.gsub!(/\t+/) do
+ b, e = $~.offset(0)
+ ' ' * (tab_width * (e-b) - b % tab_width)
+ end
+ line
+ end.join "\n"
+ else
+ body
+ end
+ end
end
# simple must come first in order to show up last in the parsers list
-require 'rdoc/parser/simple'
-require 'rdoc/parser/c'
-require 'rdoc/parser/changelog'
-require 'rdoc/parser/markdown'
-require 'rdoc/parser/rd'
-require 'rdoc/parser/ruby'
+require_relative 'parser/simple'
+require_relative 'parser/c'
+require_relative 'parser/changelog'
+require_relative 'parser/markdown'
+require_relative 'parser/rd'
+require_relative 'parser/ruby'
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb
index 8265712370..5695bf1acb 100644
--- a/lib/rdoc/parser/c.rb
+++ b/lib/rdoc/parser/c.rb
@@ -122,6 +122,11 @@ class RDoc::Parser::C < RDoc::Parser
include RDoc::Text
+ # :stopdoc:
+ BOOL_ARG_PATTERN = /\s*+\b([01]|Q?(?:true|false)|TRUE|FALSE)\b\s*/
+ TRUE_VALUES = ['1', 'TRUE', 'true', 'Qtrue'].freeze
+ # :startdoc:
+
##
# Maps C variable names to names of Ruby classes or modules
@@ -173,6 +178,8 @@ class RDoc::Parser::C < RDoc::Parser
@classes = load_variable_map :c_class_variables
@singleton_classes = load_variable_map :c_singleton_class_variables
+ @markup = @options.markup
+
# class_variable => { function => [method, ...] }
@methods = Hash.new { |h, f| h[f] = Hash.new { |i, m| i[m] = [] } }
@@ -210,48 +217,6 @@ class RDoc::Parser::C < RDoc::Parser
end
##
- # Removes duplicate call-seq entries for methods using the same
- # implementation.
-
- def deduplicate_call_seq
- @methods.each do |var_name, functions|
- class_name = @known_classes[var_name]
- next unless class_name
- class_obj = find_class var_name, class_name
-
- functions.each_value do |method_names|
- next if method_names.length == 1
-
- method_names.each do |method_name|
- deduplicate_method_name class_obj, method_name
- end
- end
- end
- end
-
- ##
- # If two ruby methods share a C implementation (and comment) this
- # deduplicates the examples in the call_seq for the method to reduce
- # confusion in the output.
-
- def deduplicate_method_name class_obj, method_name # :nodoc:
- return unless
- method = class_obj.method_list.find { |m| m.name == method_name }
- return unless call_seq = method.call_seq
-
- method_name = method_name[0, 1] if method_name =~ /\A\[/
-
- entries = call_seq.split "\n"
-
- matching = entries.select do |entry|
- entry =~ /^\w*\.?#{Regexp.escape method_name}/ or
- entry =~ /\s#{Regexp.escape method_name}\s/
- end
-
- method.call_seq = matching.join "\n"
- end
-
- ##
# Scans #content for rb_define_alias
def do_aliases
@@ -269,42 +234,48 @@ class RDoc::Parser::C < RDoc::Parser
end
class_obj = find_class var_name, class_name
-
- al = RDoc::Alias.new '', old_name, new_name, ''
- al.singleton = @singleton_classes.key? var_name
-
comment = find_alias_comment var_name, new_name, old_name
-
comment.normalize
-
- al.comment = comment
-
- al.record_location @top_level
-
- class_obj.add_alias al
- @stats.add_alias al
+ if comment.to_s.empty? and existing_method = class_obj.method_list.find { |m| m.name == old_name}
+ comment = existing_method.comment
+ end
+ add_alias(var_name, class_obj, old_name, new_name, comment)
end
end
##
+ # Add alias, either from a direct alias definition, or from two
+ # method that reference the same function.
+
+ def add_alias(var_name, class_obj, old_name, new_name, comment)
+ al = RDoc::Alias.new '', old_name, new_name, ''
+ al.singleton = @singleton_classes.key? var_name
+ al.comment = comment
+ al.record_location @top_level
+ class_obj.add_alias al
+ @stats.add_alias al
+ al
+ end
+
+ ##
# Scans #content for rb_attr and rb_define_attr
def do_attrs
@content.scan(/rb_attr\s*\(
\s*(\w+),
\s*([\w"()]+),
- \s*([01]),
- \s*([01]),
- \s*\w+\);/xm) do |var_name, attr_name, read, write|
+ #{BOOL_ARG_PATTERN},
+ #{BOOL_ARG_PATTERN},
+ \s*\w+\);/xmo) do |var_name, attr_name, read, write|
handle_attr var_name, attr_name, read, write
end
@content.scan(%r%rb_define_attr\(
\s*([\w\.]+),
\s*"([^"]+)",
- \s*(\d+),
- \s*(\d+)\s*\);
- %xm) do |var_name, attr_name, read, write|
+ #{BOOL_ARG_PATTERN},
+ #{BOOL_ARG_PATTERN}\);
+ %xmo) do |var_name, attr_name, read, write|
handle_attr var_name, attr_name, read, write
end
end
@@ -329,94 +300,92 @@ class RDoc::Parser::C < RDoc::Parser
@content.scan(
%r(
+ (?<open>\s*\(\s*) {0}
+ (?<close>\s*\)\s*) {0}
+ (?<name>\s*"(?<class_name>\w+)") {0}
+ (?<parent>\s*(?:
+ (?<parent_name>[\w\*\s\(\)\.\->]+) |
+ rb_path2class\s*\(\s*"(?<path>[\w:]+)"\s*\)
+ )) {0}
+ (?<under>\w+) {0}
+
(?<var_name>[\w\.]+)\s* =
\s*rb_(?:
define_(?:
- class(?: # rb_define_class(class_name_1, parent_name_1)
- \s*\(
- \s*"(?<class_name_1>\w+)",
- \s*(?<parent_name_1>\w+)\s*
- \)
- |
- _under\s*\( # rb_define_class_under(class_under, class_name2, parent_name2...)
- \s* (?<class_under>\w+),
- \s* "(?<class_name_2>\w+)",
- \s*
- (?:
- (?<parent_name_2>[\w\*\s\(\)\.\->]+) |
- rb_path2class\("(?<path>[\w:]+)"\)
- )
+ class(?: # rb_define_class(name, parent_name)
+ \(\s*
+ \g<name>,
+ \g<parent>
\s*\)
+ |
+ _under\g<open> # rb_define_class_under(under, name, parent_name...)
+ \g<under>,
+ \g<name>,
+ \g<parent>
+ \g<close>
)
|
- module(?: # rb_define_module(module_name_1)
- \s*\(
- \s*"(?<module_name_1>\w+)"\s*
- \)
+ (?<module>)
+ module(?: # rb_define_module(name)
+ \g<open>
+ \g<name>
+ \g<close>
|
- _under\s*\( # rb_define_module_under(module_under, module_name_1)
- \s*(?<module_under>\w+),
- \s*"(?<module_name_2>\w+)"
- \s*\)
+ _under\g<open> # rb_define_module_under(under, name)
+ \g<under>,
+ \g<name>
+ \g<close>
)
)
|
- struct_define_without_accessor\s*\( # rb_struct_define_without_accessor(class_name_3, parent_name_3, ...)
- \s*"(?<class_name_3>\w+)",
- \s*(?<parent_name_3>\w+),
- \s*\w+, # Allocation function
- (?:\s*"\w+",)* # Attributes
- \s*NULL
- \)
+ (?<attributes>(?:\s*"\w+",)*\s*NULL\s*) {0}
+ struct_define(?:
+ \g<open> # rb_struct_define(name, ...)
+ \g<name>,
+ |
+ _under\g<open> # rb_struct_define_under(under, name, ...)
+ \g<under>,
+ \g<name>,
+ |
+ _without_accessor(?:
+ \g<open> # rb_struct_define_without_accessor(name, parent_name, ...)
+ |
+ _under\g<open> # rb_struct_define_without_accessor_under(under, name, parent_name, ...)
+ \g<under>,
+ )
+ \g<name>,
+ \g<parent>,
+ \s*\w+, # Allocation function
+ )
+ \g<attributes>
+ \g<close>
|
- singleton_class\s*\( # rb_singleton_class(target_class_name)
- \s*(?<target_class_name>\w+)
- \)
+ singleton_class\g<open> # rb_singleton_class(target_class_name)
+ (?<target_class_name>\w+)
+ \g<close>
)
)mx
) do
- class_name = $~[:class_name_1]
- type = :class
- if class_name
- # rb_define_class(class_name_1, parent_name_1)
- parent_name = $~[:parent_name_1]
- #under = nil
- else
- class_name = $~[:class_name_2]
- if class_name
- # rb_define_class_under(class_under, class_name2, parent_name2...)
- parent_name = $~[:parent_name_2] || $~[:path]
- under = $~[:class_under]
- else
- class_name = $~[:class_name_3]
- if class_name
- # rb_struct_define_without_accessor(class_name_3, parent_name_3, ...)
- parent_name = $~[:parent_name_3]
- #under = nil
- else
- type = :module
- class_name = $~[:module_name_1]
- #parent_name = nil
- if class_name
- # rb_define_module(module_name_1)
- #under = nil
- else
- class_name = $~[:module_name_2]
- if class_name
- # rb_define_module_under(module_under, module_name_1)
- under = $~[:module_under]
- else
- # rb_singleton_class(target_class_name)
- target_class_name = $~[:target_class_name]
- handle_singleton $~[:var_name], target_class_name
- next
- end
- end
- end
- end
+ if target_class_name = $~[:target_class_name]
+ # rb_singleton_class(target_class_name)
+ handle_singleton $~[:var_name], target_class_name
+ next
end
- handle_class_module($~[:var_name], type, class_name, parent_name, under)
+ var_name = $~[:var_name]
+ type = $~[:module] ? :module : :class
+ class_name = $~[:class_name]
+ parent_name = $~[:parent_name] || $~[:path]
+ under = $~[:under]
+ attributes = $~[:attributes]
+
+ handle_class_module(var_name, type, class_name, parent_name, under)
+ if attributes and !parent_name # rb_struct_define *not* without_accessor
+ true_flag = 'Qtrue'
+ attributes.scan(/"\K\w+(?=")/) do |attr_name|
+ handle_attr var_name, attr_name, true_flag, true_flag
+ end
+ end
end
end
@@ -475,7 +444,7 @@ class RDoc::Parser::C < RDoc::Parser
next unless cls = @classes[c]
m = @known_classes[m] || m
- comment = RDoc::Comment.new '', @top_level, :c
+ comment = new_comment '', @top_level, :c
incl = cls.add_include RDoc::Include.new(m, comment)
incl.record_location @top_level
end
@@ -557,7 +526,7 @@ class RDoc::Parser::C < RDoc::Parser
\s*"#{Regexp.escape new_name}"\s*,
\s*"#{Regexp.escape old_name}"\s*\);%xm
- RDoc::Comment.new($1 || '', @top_level, :c)
+ new_comment($1 || '', @top_level, :c)
end
##
@@ -596,7 +565,7 @@ class RDoc::Parser::C < RDoc::Parser
''
end
- RDoc::Comment.new comment, @top_level, :c
+ new_comment comment, @top_level, :c
end
##
@@ -608,7 +577,7 @@ class RDoc::Parser::C < RDoc::Parser
((?>/\*.*?\*/\s*)?)
((?:(?:\w+)\s+)?
(?:intern\s+)?VALUE\s+(\w+)
- \s*(?:\([^)]*\))(?:[^;]|$))
+ \s*(?:\([^)]*\))(?:[^\);]|$))
| ((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+(\w+)\s+(\w+))
| ^\s*\#\s*define\s+(\w+)\s+(\w+)
}xm) do
@@ -636,7 +605,7 @@ class RDoc::Parser::C < RDoc::Parser
case type
when :func_def
- comment = RDoc::Comment.new args[0], @top_level, :c
+ comment = new_comment args[0], @top_level, :c
body = args[1]
offset, = args[2]
@@ -666,7 +635,7 @@ class RDoc::Parser::C < RDoc::Parser
body
when :macro_def
- comment = RDoc::Comment.new args[0], @top_level, :c
+ comment = new_comment args[0], @top_level, :c
body = args[1]
offset, = args[2]
@@ -711,13 +680,14 @@ class RDoc::Parser::C < RDoc::Parser
##
# Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+
- def find_class(raw_name, name)
+ def find_class(raw_name, name, base_name = nil)
unless @classes[raw_name]
if raw_name =~ /^rb_m/
container = @top_level.add_module RDoc::NormalModule, name
else
container = @top_level.add_class RDoc::NormalClass, name
end
+ container.name = base_name if base_name
container.record_location @top_level
@classes[raw_name] = container
@@ -758,7 +728,7 @@ class RDoc::Parser::C < RDoc::Parser
((?>/\*.*?\*/\s+))
(static\s+)?
void\s+
- Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)?\)%xmi then
+ Init(?:VM)?_(?i:#{class_name})\s*(?:_\(\s*)?\(\s*(?:void\s*)?\)%xm then
comment = $1.sub(%r%Document-(?:class|module):\s+#{class_name}%, '')
elsif @content =~ %r%Document-(?:class|module):\s+#{class_name}\s*?
(?:<\s+[:,\w]+)?\n((?>.*?\*/))%xm then
@@ -773,7 +743,7 @@ class RDoc::Parser::C < RDoc::Parser
comment = ''
end
- comment = RDoc::Comment.new comment, @top_level, :c
+ comment = new_comment comment, @top_level, :c
comment.normalize
look_for_directives_in class_mod, comment
@@ -818,7 +788,7 @@ class RDoc::Parser::C < RDoc::Parser
table[const_name] ||
''
- RDoc::Comment.new comment, @top_level, :c
+ new_comment comment, @top_level, :c
end
##
@@ -849,7 +819,7 @@ class RDoc::Parser::C < RDoc::Parser
return unless comment
- RDoc::Comment.new comment, @top_level, :c
+ new_comment comment, @top_level, :c
end
##
@@ -858,8 +828,8 @@ class RDoc::Parser::C < RDoc::Parser
def handle_attr(var_name, attr_name, read, write)
rw = ''
- rw += 'R' if '1' == read
- rw += 'W' if '1' == write
+ rw += 'R' if TRUE_VALUES.include?(read)
+ rw += 'W' if TRUE_VALUES.include?(write)
class_name = @known_classes[var_name]
@@ -955,7 +925,7 @@ class RDoc::Parser::C < RDoc::Parser
return unless class_name
- class_obj = find_class var_name, class_name
+ class_obj = find_class var_name, class_name, class_name[/::\K[^:]+\z/]
unless class_obj then
@options.warn 'Enclosing class or module %p is not known' % [const_name]
@@ -983,7 +953,7 @@ class RDoc::Parser::C < RDoc::Parser
new_comment = "#{$1}#{new_comment.lstrip}"
- new_comment = RDoc::Comment.new new_comment, @top_level, :c
+ new_comment = self.new_comment(new_comment, @top_level, :c)
con = RDoc::Constant.new const_name, new_definition, new_comment
else
@@ -1021,6 +991,10 @@ class RDoc::Parser::C < RDoc::Parser
class_obj = find_class var_name, class_name
+ if existing_method = class_obj.method_list.find { |m| m.c_function == function }
+ add_alias(var_name, class_obj, existing_method.name, meth_name, existing_method.comment)
+ end
+
if class_obj then
if meth_name == 'initialize' then
meth_name = 'new'
@@ -1055,12 +1029,18 @@ class RDoc::Parser::C < RDoc::Parser
elsif p_count == -1 then # argc, argv
rb_scan_args body
else
- "(#{(1..p_count).map { |i| "p#{i}" }.join ', '})"
+ args = (1..p_count).map { |i| "p#{i}" }
+ "(#{args.join ', '})"
end
meth_obj.record_location @top_level
+
+ if meth_obj.section_title
+ class_obj.temporary_section = class_obj.add_section(meth_obj.section_title)
+ end
class_obj.add_method meth_obj
+
@stats.add_method meth_obj
meth_obj.visibility = :private if 'private_method' == type
end
@@ -1078,23 +1058,6 @@ class RDoc::Parser::C < RDoc::Parser
end
##
- # Normalizes tabs in +body+
-
- def handle_tab_width(body)
- if /\t/ =~ body
- tab_width = @options.tab_width
- body.split(/\n/).map do |line|
- 1 while line.gsub!(/\t+/) do
- ' ' * (tab_width * $&.length - $`.length % tab_width)
- end && $~
- line
- end.join "\n"
- else
- body
- end
- end
-
- ##
# Loads the variable map with the given +name+ from the RDoc::Store, if
# present.
@@ -1249,11 +1212,14 @@ class RDoc::Parser::C < RDoc::Parser
do_aliases
do_attrs
- deduplicate_call_seq
-
@store.add_c_variables self
@top_level
end
+ def new_comment text = nil, location = nil, language = nil
+ RDoc::Comment.new(text, location, language).tap do |comment|
+ comment.format = @markup
+ end
+ end
end
diff --git a/lib/rdoc/parser/changelog.rb b/lib/rdoc/parser/changelog.rb
index 167892f543..9245d49376 100644
--- a/lib/rdoc/parser/changelog.rb
+++ b/lib/rdoc/parser/changelog.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
-require 'time'
##
# A ChangeLog file parser.
@@ -106,15 +105,33 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
entries.group_by do |title, _|
begin
time = @time_cache[title]
- (time || Time.parse(title)).strftime '%Y-%m-%d'
+ (time || parse_date(title)).strftime '%Y-%m-%d'
rescue NoMethodError, ArgumentError
time, = title.split ' ', 2
- Time.parse(time).strftime '%Y-%m-%d'
+ parse_date(time).strftime '%Y-%m-%d'
end
end
end
##
+ # Parse date in ISO-8601, RFC-2822, or default of Git
+
+ def parse_date(date)
+ case date
+ when /\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/
+ Time.new($1, $2, $3, $4, $5, $6, ("#{$7}:#{$8}" if $7))
+ when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
+ Time.new($3, $2, $1, $4, $5, $6, ("#{$7}:#{$8}" if $7))
+ when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
+ Time.new($3, $1, $2, $4, $5, $6, ("#{$7}:#{$8}" if $7))
+ when /\A\s*\w{3} (\w{3}) +(\d+) (\d+):(\d+):(\d+) (\d+)\b/
+ Time.new($6, $1, $2, $3, $4, $5)
+ else
+ raise ArgumentError, "bad date: #{date}"
+ end
+ end
+
+ ##
# Parses the entries in the ChangeLog.
#
# Returns an Array of each ChangeLog entry in order of parsing.
@@ -131,6 +148,13 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
def parse_entries
@time_cache ||= {}
+
+ if /\A((?:.*\n){,3})commit\s/ =~ @content
+ class << self; prepend Git; end
+ parse_info($1)
+ return parse_entries
+ end
+
entries = []
entry_name = nil
entry_body = []
@@ -145,19 +169,10 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
entry_name = $&
begin
- time = Time.parse entry_name
+ time = parse_date entry_name
@time_cache[entry_name] = time
- # HACK Ruby 1.8 does not raise ArgumentError for Time.parse "Other"
- entry_name = nil unless entry_name =~ /#{time.year}/
- rescue NoMethodError
- # HACK Ruby 2.1.2 and earlier raises NoMethodError if time part is absent
- entry_name.split ' ', 2
rescue ArgumentError
- if /out of range/ =~ $!.message
- Time.parse(entry_name.split(' ', 2)[0]) rescue entry_name = nil
- else
- entry_name = nil
- end
+ entry_name = nil
end
entry_body = []
@@ -190,6 +205,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
def scan
@time_cache = {}
+
entries = parse_entries
grouped_entries = group_entries entries
@@ -200,5 +216,120 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
@top_level
end
+ module Git
+ def parse_info(info)
+ /^\s*base-url\s*=\s*(.*\S)/ =~ info
+ @base_url = $1
+ end
+
+ def parse_entries
+ entries = []
+
+ @content.scan(/^commit\s+(\h{20})\h*\n((?:.+\n)*)\n((?: {4}.*\n+)*)/) do
+ entry_name, header, entry_body = $1, $2, $3.gsub(/^ {4}/, '')
+ # header = header.scan(/^ *(\S+?): +(.*)/).to_h
+ # date = header["CommitDate"] || header["Date"]
+ date = header[/^ *(?:Author)?Date: +(.*)/, 1]
+ author = header[/^ *Author: +(.*)/, 1]
+ begin
+ time = parse_date(header[/^ *CommitDate: +(.*)/, 1] || date)
+ @time_cache[entry_name] = time
+ author.sub!(/\s*<(.*)>/, '')
+ email = $1
+ entries << [entry_name, [author, email, date, entry_body]]
+ rescue ArgumentError
+ end
+ end
+
+ entries
+ end
+
+ def create_entries entries
+ # git log entries have no strictly itemized style like the old
+ # style, just assume Markdown.
+ entries.map do |commit, entry|
+ LogEntry.new(@base_url, commit, *entry)
+ end
+ end
+
+ LogEntry = Struct.new(:base, :commit, :author, :email, :date, :contents) do
+ HEADING_LEVEL = 3
+
+ def initialize(base, commit, author, email, date, contents)
+ case contents
+ when String
+ contents = RDoc::Markdown.parse(contents).parts.each do |body|
+ case body
+ when RDoc::Markup::Heading
+ body.level += HEADING_LEVEL + 1
+ end
+ end
+ case first = contents[0]
+ when RDoc::Markup::Paragraph
+ contents[0] = RDoc::Markup::Heading.new(HEADING_LEVEL + 1, first.text)
+ end
+ end
+ super
+ end
+
+ def level
+ HEADING_LEVEL
+ end
+
+ def aref
+ "label-#{commit}"
+ end
+
+ def label context = nil
+ aref
+ end
+
+ def text
+ case base
+ when nil
+ "#{date}"
+ when /%s/
+ "{#{date}}[#{base % commit}]"
+ else
+ "{#{date}}[#{base}#{commit}]"
+ end + " {#{author}}[mailto:#{email}]"
+ end
+
+ def accept visitor
+ visitor.accept_heading self
+ begin
+ if visitor.respond_to?(:code_object=)
+ code_object = visitor.code_object
+ visitor.code_object = self
+ end
+ contents.each do |body|
+ body.accept visitor
+ end
+ ensure
+ if visitor.respond_to?(:code_object)
+ visitor.code_object = code_object
+ end
+ end
+ end
+
+ def pretty_print q # :nodoc:
+ q.group(2, '[log_entry: ', ']') do
+ q.text commit
+ q.text ','
+ q.breakable
+ q.group(2, '[date: ', ']') { q.text date }
+ q.text ','
+ q.breakable
+ q.group(2, '[author: ', ']') { q.text author }
+ q.text ','
+ q.breakable
+ q.group(2, '[email: ', ']') { q.text email }
+ q.text ','
+ q.breakable
+ q.pp contents
+ end
+ end
+ end
+ end
end
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb
index 8d021f3c6d..b74ead65ab 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -164,15 +164,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
def initialize(top_level, file_name, content, options, stats)
super
- if /\t/ =~ content then
- tab_width = @options.tab_width
- content = content.split(/\n/).map do |line|
- 1 while line.gsub!(/\t+/) {
- ' ' * (tab_width*$&.length - $`.length % tab_width)
- } && $~
- line
- end.join("\n")
- end
+ content = handle_tab_width(content)
@size = 0
@token_listeners = nil
@@ -400,6 +392,29 @@ class RDoc::Parser::Ruby < RDoc::Parser
end
##
+ # Skip opening parentheses and yield the block.
+ # Skip closing parentheses too when exists.
+
+ def skip_parentheses(&block)
+ left_tk = peek_tk
+
+ if :on_lparen == left_tk[:kind]
+ get_tk
+
+ ret = skip_parentheses(&block)
+
+ right_tk = peek_tk
+ if :on_rparen == right_tk[:kind]
+ get_tk
+ end
+
+ ret
+ else
+ yield
+ end
+ end
+
+ ##
# Return a superclass, which can be either a constant of an expression
def get_class_specification
@@ -833,7 +848,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
cls = parse_class_regular container, declaration_context, single,
name_t, given_name, comment
elsif name_t[:kind] == :on_op && name_t[:text] == '<<'
- case name = get_class_specification
+ case name = skip_parentheses { get_class_specification }
when 'self', container.name
read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS
parse_statements container, SINGLE
@@ -1194,6 +1209,22 @@ class RDoc::Parser::Ruby < RDoc::Parser
end
##
+ # Parses an +included+ with a block feature of ActiveSupport::Concern.
+
+ def parse_included_with_activesupport_concern container, comment # :nodoc:
+ skip_tkspace_without_nl
+ tk = get_tk
+ unless tk[:kind] == :on_lbracket || (tk[:kind] == :on_kw && tk[:text] == 'do')
+ unget_tk tk
+ return nil # should be a block
+ end
+
+ parse_statements container
+
+ container
+ end
+
+ ##
# Parses identifiers that can create new methods or change visibility.
#
# Returns true if the comment was not consumed.
@@ -1893,6 +1924,8 @@ class RDoc::Parser::Ruby < RDoc::Parser
parse_extend_or_include RDoc::Include, container, comment
when "extend" then
parse_extend_or_include RDoc::Extend, container, comment
+ when "included" then
+ parse_included_with_activesupport_concern container, comment
end
else
diff --git a/lib/rdoc/rd.rb b/lib/rdoc/rd.rb
index 0d3d3cea85..8c2366a3ca 100644
--- a/lib/rdoc/rd.rb
+++ b/lib/rdoc/rd.rb
@@ -92,9 +92,8 @@ class RDoc::RD
document
end
- autoload :BlockParser, 'rdoc/rd/block_parser'
- autoload :InlineParser, 'rdoc/rd/inline_parser'
- autoload :Inline, 'rdoc/rd/inline'
+ autoload :BlockParser, "#{__dir__}/rd/block_parser"
+ autoload :InlineParser, "#{__dir__}/rd/inline_parser"
+ autoload :Inline, "#{__dir__}/rd/inline"
end
-
diff --git a/lib/rdoc/rd/block_parser.rb b/lib/rdoc/rd/block_parser.rb
index be0b786bfc..6f70622c0b 100644
--- a/lib/rdoc/rd/block_parser.rb
+++ b/lib/rdoc/rd/block_parser.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
#
# DO NOT MODIFY!!!!
-# This file is automatically generated by Racc 1.4.16
+# This file is automatically generated by Racc 1.6.0
# from Racc grammar file "".
#
@@ -18,8 +18,6 @@ class BlockParser < Racc::Parser
# :stopdoc:
-TMPFILE = ["rdtmp", $$, 0]
-
MARK_TO_LEVEL = {
'=' => 1,
'==' => 2,
@@ -129,15 +127,19 @@ def next_token # :nodoc:
# non-RD part begin
when /^=begin\s+(\w+)/
part = $1
+=begin # not imported to RDoc
if @in_part # if in non-RD part
@part_content.push(line)
else
@in_part = part if @tree.filter[part] # if filter exists
# p "BEGIN_PART: #{@in_part}" # DEBUG
end
+=end
+ @in_part = part
# non-RD part end
- when /^=end/
+ when /^=end(?:$|[\s\0\C-d\C-z])/
if @in_part # if in non-RD part
+=begin # not imported to RDoc
# p "END_PART: #{@in_part}" # DEBUG
# make Part-in object
part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
@@ -148,20 +150,22 @@ def next_token # :nodoc:
if @tree.filter[@in_part].mode == :rd # if output is RD formatted
subtree = parse_subtree(part_out.to_a)
else # if output is target formatted
- basename = TMPFILE.join('.')
- TMPFILE[-1] += 1
- tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w")
- tmpfile.print(part_out)
- tmpfile.close
+ basename = Tempfile.create(["rdtmp", ".#{@in_part}"], @tree.tmp_dir) do |tmpfile|
+ tmpfile.print(part_out)
+ File.basename(tmpfile.path)
+ end
subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"])
end
@in_part = nil
return [:SUBTREE, subtree]
+=end
end
else
+=begin # not imported to RDoc
if @in_part # if in non-RD part
@part_content.push(line)
end
+=end
end
end
diff --git a/lib/rdoc/rd/inline_parser.rb b/lib/rdoc/rd/inline_parser.rb
index a64102cac7..c1da35a109 100644
--- a/lib/rdoc/rd/inline_parser.rb
+++ b/lib/rdoc/rd/inline_parser.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
#
# DO NOT MODIFY!!!!
-# This file is automatically generated by Racc 1.4.16
+# This file is automatically generated by Racc 1.6.0
# from Racc grammar file "".
#
diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec
index 9b274c709a..3c96f7deb1 100644
--- a/lib/rdoc/rdoc.gemspec
+++ b/lib/rdoc/rdoc.gemspec
@@ -38,16 +38,12 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
"CVE-2013-0256.rdoc",
"ExampleMarkdown.md",
"ExampleRDoc.rdoc",
- "Gemfile",
"History.rdoc",
"LEGAL.rdoc",
"LICENSE.rdoc",
"README.rdoc",
"RI.rdoc",
- "Rakefile",
"TODO.rdoc",
- "bin/console",
- "bin/setup",
"exe/rdoc",
"exe/ri",
"lib/rdoc.rb",
@@ -166,6 +162,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
"lib/rdoc/markup/raw.rb",
"lib/rdoc/markup/regexp_handling.rb",
"lib/rdoc/markup/rule.rb",
+ "lib/rdoc/markup/table.rb",
"lib/rdoc/markup/to_ansi.rb",
"lib/rdoc/markup/to_bs.rb",
"lib/rdoc/markup/to_html.rb",
@@ -221,26 +218,16 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
"lib/rdoc/tom_doc.rb",
"lib/rdoc/top_level.rb",
"lib/rdoc/version.rb",
- "rdoc.gemspec",
+ "man/ri.1",
]
# files from .gitignore
s.files << "lib/rdoc/rd/block_parser.rb" << "lib/rdoc/rd/inline_parser.rb" << "lib/rdoc/markdown.rb" << "lib/rdoc/markdown/literals.rb"
s.rdoc_options = ["--main", "README.rdoc"]
- s.extra_rdoc_files += %w[
- CVE-2013-0256.rdoc
- CONTRIBUTING.rdoc
- ExampleMarkdown.md
- ExampleRDoc.rdoc
- History.rdoc
- LEGAL.rdoc
- LICENSE.rdoc
- README.rdoc
- RI.rdoc
- TODO.rdoc
- ]
+ s.extra_rdoc_files += s.files.grep(%r[\A[^\/]+\.(?:rdoc|md)\z])
- s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
- s.rubygems_version = "2.5.2"
+ s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
s.required_rubygems_version = Gem::Requirement.new(">= 2.2")
+
+ s.add_dependency 'psych', '>= 4.0.0'
end
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index c60e017609..2d8a9dea8c 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'rdoc'
+require_relative '../rdoc'
require 'find'
require 'fileutils'
@@ -14,7 +14,7 @@ require 'time'
# is:
#
# rdoc = RDoc::RDoc.new
-# options = rdoc.load_options # returns an RDoc::Options instance
+# options = RDoc::Options.load_options # returns an RDoc::Options instance
# # set extra options
# rdoc.document options
#
@@ -36,6 +36,17 @@ class RDoc::RDoc
GENERATORS = {}
##
+ # List of directory names always skipped
+
+ UNCONDITIONALLY_SKIPPED_DIRECTORIES = %w[CVS .svn .git].freeze
+
+ ##
+ # List of directory names skipped if test suites should be skipped
+
+ TEST_SUITE_DIRECTORY_NAMES = %w[spec test].freeze
+
+
+ ##
# Generator instance used for creating output
attr_accessor :generator
@@ -112,11 +123,17 @@ class RDoc::RDoc
file_list = normalized_file_list files, true, @options.exclude
- file_list = file_list.uniq
-
- file_list = remove_unparseable file_list
+ file_list = remove_unparseable(file_list)
- file_list.sort
+ if file_list.count {|name, mtime|
+ file_list[name] = @last_modified[name] unless mtime
+ mtime
+ } > 0
+ @last_modified.replace file_list
+ file_list.keys.sort
+ else
+ []
+ end
end
##
@@ -146,27 +163,6 @@ class RDoc::RDoc
end
##
- # Loads options from .rdoc_options if the file exists, otherwise creates a
- # new RDoc::Options instance.
-
- def load_options
- options_file = File.expand_path '.rdoc_options'
- return RDoc::Options.new unless File.exist? options_file
-
- RDoc.load_yaml
-
- begin
- options = YAML.load_file '.rdoc_options'
- rescue Psych::SyntaxError
- end
-
- raise RDoc::Error, "#{options_file} is not a valid rdoc options file" unless
- RDoc::Options === options
-
- options
- end
-
- ##
# Create an output dir if it doesn't exist. If it does exist, but doesn't
# contain the flag file <tt>created.rid</tt> then we refuse to use it, as
# we may clobber some manually generated documentation
@@ -254,11 +250,11 @@ option)
# read and strip comments
patterns = File.read(filename).gsub(/#.*/, '')
- result = []
+ result = {}
- patterns.split.each do |patt|
+ patterns.split(' ').each do |patt|
candidates = Dir.glob(File.join(in_dir, patt))
- result.concat normalized_file_list(candidates, false, @options.exclude)
+ result.update normalized_file_list(candidates, false, @options.exclude)
end
result
@@ -278,24 +274,27 @@ option)
def normalized_file_list(relative_files, force_doc = false,
exclude_pattern = nil)
- file_list = []
+ file_list = {}
relative_files.each do |rel_file_name|
+ rel_file_name = rel_file_name.sub(/^\.\//, '')
next if rel_file_name.end_with? 'created.rid'
next if exclude_pattern && exclude_pattern =~ rel_file_name
stat = File.stat rel_file_name rescue next
case type = stat.ftype
when "file" then
- next if last_modified = @last_modified[rel_file_name] and
- stat.mtime.to_i <= last_modified.to_i
+ mtime = (stat.mtime unless (last_modified = @last_modified[rel_file_name] and
+ stat.mtime.to_i <= last_modified.to_i))
if force_doc or RDoc::Parser.can_parse(rel_file_name) then
- file_list << rel_file_name.sub(/^\.\//, '')
- @last_modified[rel_file_name] = stat.mtime
+ file_list[rel_file_name] = mtime
end
when "directory" then
- next if rel_file_name == "CVS" || rel_file_name == ".svn"
+ next if UNCONDITIONALLY_SKIPPED_DIRECTORIES.include?(rel_file_name)
+
+ basename = File.basename(rel_file_name)
+ next if options.skip_tests && TEST_SUITE_DIRECTORY_NAMES.include?(basename)
created_rid = File.join rel_file_name, "created.rid"
next if File.file? created_rid
@@ -303,16 +302,16 @@ option)
dot_doc = File.join rel_file_name, RDoc::DOT_DOC_FILENAME
if File.file? dot_doc then
- file_list << parse_dot_doc_file(rel_file_name, dot_doc)
+ file_list.update(parse_dot_doc_file(rel_file_name, dot_doc))
else
- file_list << list_files_in_directory(rel_file_name)
+ file_list.update(list_files_in_directory(rel_file_name))
end
else
warn "rdoc can't parse the #{type} #{rel_file_name}"
end
end
- file_list.flatten
+ file_list
end
##
@@ -427,10 +426,10 @@ The internal error was:
# files for emacs and vim.
def remove_unparseable files
- files.reject do |file|
+ files.reject do |file, *|
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
(file =~ /tags$/i and
- open(file, 'rb') { |io|
+ File.open(file, 'rb') { |io|
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
})
end
@@ -455,11 +454,11 @@ The internal error was:
if RDoc::Options === options then
@options = options
- @options.finish
else
- @options = load_options
+ @options = RDoc::Options.load_options
@options.parse options
end
+ @options.finish
if @options.pipe then
handle_pipe
@@ -561,6 +560,6 @@ rescue LoadError
end
# require built-in generators after discovery in case they've been replaced
-require 'rdoc/generator/darkfish'
-require 'rdoc/generator/ri'
-require 'rdoc/generator/pot'
+require_relative 'generator/darkfish'
+require_relative 'generator/ri'
+require_relative 'generator/pot'
diff --git a/lib/rdoc/ri.rb b/lib/rdoc/ri.rb
index c798c1fc49..0af05f729f 100644
--- a/lib/rdoc/ri.rb
+++ b/lib/rdoc/ri.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'rdoc'
+require_relative '../rdoc'
##
# Namespace for the ri command line tool's implementation.
@@ -13,9 +13,8 @@ module RDoc::RI
class Error < RDoc::Error; end
- autoload :Driver, 'rdoc/ri/driver'
- autoload :Paths, 'rdoc/ri/paths'
- autoload :Store, 'rdoc/ri/store'
+ autoload :Driver, "#{__dir__}/ri/driver"
+ autoload :Paths, "#{__dir__}/ri/paths"
+ autoload :Store, "#{__dir__}/ri/store"
end
-
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 46b98e99b5..819cff8aa3 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -1,23 +1,10 @@
# frozen_string_literal: true
-require 'abbrev'
require 'optparse'
-begin
- require 'readline'
-rescue LoadError
-end
-
-begin
- require 'win32console'
-rescue LoadError
-end
-
-require 'rdoc'
-
-##
-# For RubyGems backwards compatibility
+require_relative '../../rdoc'
-require 'rdoc/ri/formatter'
+require_relative 'formatter' # For RubyGems backwards compatibility
+# TODO: Fix weird documentation with `require_relative`
##
# The RI driver implements the command-line ri tool.
@@ -142,6 +129,8 @@ Where name can be:
gem_name: | gem_name:README | gem_name:History
+ ruby: | ruby:NEWS | ruby:globals
+
All class names may be abbreviated to their minimum unambiguous form.
If a name is ambiguous, all valid options will be listed.
@@ -153,6 +142,10 @@ they're contained in. If the gem name is followed by a ':' all files in the
gem will be shown. The file name extension may be omitted where it is
unambiguous.
+'ruby' can be used as a pseudo gem name to display files from the Ruby
+core documentation. Use 'ruby:' by itself to get a list of all available
+core documentation files.
+
For example:
#{opt.program_name} Fil
@@ -160,6 +153,7 @@ For example:
#{opt.program_name} File.new
#{opt.program_name} zip
#{opt.program_name} rdoc:README
+ #{opt.program_name} ruby:comments
Note that shell quoting or escaping may be required for method names
containing punctuation:
@@ -356,7 +350,7 @@ or the PAGER environment variable.
end
end
- argv = ENV['RI'].to_s.split.concat argv
+ argv = ENV['RI'].to_s.split(' ').concat argv
opts.parse! argv
@@ -426,9 +420,6 @@ or the PAGER environment variable.
@use_stdout = options[:use_stdout]
@show_all = options[:show_all]
@width = options[:width]
-
- # pager process for jruby
- @jruby_pager_process = nil
end
##
@@ -609,11 +600,11 @@ or the PAGER environment variable.
stores = classes[current]
- break unless stores and not stores.empty?
+ next unless stores and not stores.empty?
- klasses = stores.map do |store|
- store.ancestors[current]
- end.flatten.uniq
+ klasses = stores.flat_map do |store|
+ store.ancestors[current] || []
+ end.uniq
klasses = klasses - seen
@@ -1045,36 +1036,6 @@ or the PAGER environment variable.
end
##
- # Finds the given +pager+ for jruby. Returns an IO if +pager+ was found.
- #
- # Returns false if +pager+ does not exist.
- #
- # Returns nil if the jruby JVM doesn't support ProcessBuilder redirection
- # (1.6 and older).
-
- def find_pager_jruby pager
- require 'java'
- require 'shellwords'
-
- return nil unless java.lang.ProcessBuilder.constants.include? :Redirect
-
- pager = Shellwords.split pager
-
- pb = java.lang.ProcessBuilder.new(*pager)
- pb = pb.redirect_output java.lang.ProcessBuilder::Redirect::INHERIT
-
- @jruby_pager_process = pb.start
-
- input = @jruby_pager_process.output_stream
-
- io = input.to_io
- io.sync = true
- io
- rescue java.io.IOException
- false
- end
-
- ##
# Finds a store that matches +name+ which can be the name of a gem, "ruby",
# "home" or "site".
#
@@ -1113,6 +1074,10 @@ or the PAGER environment variable.
def interactive
puts "\nEnter the method name you want to look up."
+ begin
+ require 'readline'
+ rescue LoadError
+ end
if defined? Readline then
Readline.completion_proc = method :complete
puts "You can use tab to autocomplete."
@@ -1142,17 +1107,6 @@ or the PAGER environment variable.
end
##
- # Is +file+ in ENV['PATH']?
-
- def in_path? file
- return true if file =~ %r%\A/% and File.exist? file
-
- ENV['PATH'].split(File::PATH_SEPARATOR).any? do |path|
- File.exist? File.join(path, file)
- end
- end
-
- ##
# Lists classes known to ri starting with +names+. If +names+ is empty all
# known classes are shown.
@@ -1228,7 +1182,7 @@ or the PAGER environment variable.
# +cache+ indicate if it is a class or instance method.
def load_method store, cache, klass, type, name
- methods = store.send(cache)[klass]
+ methods = store.public_send(cache)[klass]
return unless methods
@@ -1346,7 +1300,6 @@ or the PAGER environment variable.
yield pager
ensure
pager.close
- @jruby_pager_process.wait_for if @jruby_pager_process
end
else
yield $stdout
@@ -1514,27 +1467,14 @@ or the PAGER environment variable.
def setup_pager
return if @use_stdout
- jruby = RUBY_ENGINE == 'jruby'
-
pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more']
+ require 'shellwords'
pagers.compact.uniq.each do |pager|
- next unless pager
-
- pager_cmd = pager.split.first
-
- next unless in_path? pager_cmd
-
- if jruby then
- case io = find_pager_jruby(pager)
- when nil then break
- when false then next
- else io
- end
- else
- io = IO.popen(pager, 'w') rescue next
- end
+ pager = Shellwords.split(pager)
+ next if pager.empty?
+ io = IO.popen(pager, 'w') rescue next
next if $? and $?.pid == io.pid and $?.exited? # pager didn't work
@paging = true
@@ -1551,7 +1491,11 @@ or the PAGER environment variable.
# Starts a WEBrick server for ri.
def start_server
- require 'webrick'
+ begin
+ require 'webrick'
+ rescue LoadError
+ abort "webrick is not found. You may need to `gem install webrick` to install webrick."
+ end
server = WEBrick::HTTPServer.new :Port => @server
diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
index f76721d318..8e89b04e54 100644
--- a/lib/rdoc/ri/paths.rb
+++ b/lib/rdoc/ri/paths.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require 'rdoc/rdoc'
+require_relative '../rdoc'
##
# The directories where ri data lives. Paths can be enumerated via ::each, or
@@ -12,23 +12,9 @@ module RDoc::RI::Paths
version = RbConfig::CONFIG['ruby_version']
- BASE = if RbConfig::CONFIG.key? 'ridir' then
- File.join RbConfig::CONFIG['ridir'], version
- else
- File.join RbConfig::CONFIG['datadir'], 'ri', version
- end
+ BASE = File.join RbConfig::CONFIG['ridir'], version
- homedir = begin
- File.expand_path('~')
- rescue ArgumentError
- end
-
- homedir ||= ENV['HOME'] ||
- ENV['USERPROFILE'] || ENV['HOMEPATH'] # for 1.8 compatibility
-
- HOMEDIR = if homedir then
- File.join homedir, ".rdoc"
- end
+ HOMEDIR = RDoc.home
#:startdoc:
##
diff --git a/lib/rdoc/ri/task.rb b/lib/rdoc/ri/task.rb
index 6a6ea572bf..1122ea3775 100644
--- a/lib/rdoc/ri/task.rb
+++ b/lib/rdoc/ri/task.rb
@@ -4,7 +4,7 @@ begin
rescue Gem::LoadError
end unless defined?(RDoc)
-require 'rdoc/task'
+require_relative '../task'
##
# RDoc::RI::Task creates ri data in <code>./.rdoc</code> for your project.
diff --git a/lib/rdoc/rubygems_hook.rb b/lib/rdoc/rubygems_hook.rb
index 90b0541fcf..3160072e53 100644
--- a/lib/rdoc/rubygems_hook.rb
+++ b/lib/rdoc/rubygems_hook.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'rubygems/user_interaction'
require 'fileutils'
-require 'rdoc'
+require_relative '../rdoc'
##
# Gem::RDoc provides methods to generate RDoc and ri data for installed gems
@@ -70,7 +70,7 @@ class RDoc::RubygemsHook
def self.load_rdoc
return if @rdoc_version
- require 'rdoc/rdoc'
+ require_relative 'rdoc'
@rdoc_version = Gem::Version.new ::RDoc::VERSION
end
@@ -120,7 +120,9 @@ class RDoc::RubygemsHook
options.exclude ||= [] # TODO maybe move to RDoc::Options#finish
options.setup_generator generator
options.op_dir = destination
- options.finish
+ Dir.chdir @spec.full_gem_path do
+ options.finish
+ end
generator = options.generator.new @rdoc.store, options
@@ -158,7 +160,7 @@ class RDoc::RubygemsHook
case config_args = Gem.configuration[:rdoc]
when String then
- args = args.concat config_args.split
+ args = args.concat config_args.split(' ')
when Array then
args = args.concat config_args
end
diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb
index e1d0f0ce82..d05368766a 100644
--- a/lib/rdoc/servlet.rb
+++ b/lib/rdoc/servlet.rb
@@ -1,9 +1,14 @@
# frozen_string_literal: true
-require 'rdoc'
+require_relative '../rdoc'
require 'erb'
require 'time'
require 'json'
-require 'webrick'
+
+begin
+ require 'webrick'
+rescue LoadError
+ abort "webrick is not found. You may need to `gem install webrick` to install webrick."
+end
##
# This is a WEBrick servlet that allows you to browse ri documentation.
diff --git a/lib/rdoc/single_class.rb b/lib/rdoc/single_class.rb
index 6a7b67deb3..860f06a6e5 100644
--- a/lib/rdoc/single_class.rb
+++ b/lib/rdoc/single_class.rb
@@ -22,5 +22,10 @@ class RDoc::SingleClass < RDoc::ClassModule
"class << #{full_name}"
end
+ def pretty_print q # :nodoc:
+ q.group 2, "[class << #{full_name}", "]" do
+ next
+ end
+ end
end
diff --git a/lib/rdoc/stats.rb b/lib/rdoc/stats.rb
index bd6c0ef23a..4817c9c729 100644
--- a/lib/rdoc/stats.rb
+++ b/lib/rdoc/stats.rb
@@ -454,9 +454,8 @@ class RDoc::Stats
[params.length, undoc]
end
- autoload :Quiet, 'rdoc/stats/quiet'
- autoload :Normal, 'rdoc/stats/normal'
- autoload :Verbose, 'rdoc/stats/verbose'
+ autoload :Quiet, "#{__dir__}/stats/quiet"
+ autoload :Normal, "#{__dir__}/stats/normal"
+ autoload :Verbose, "#{__dir__}/stats/verbose"
end
-
diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb
index 0f6cd06e3c..c793e49ed8 100644
--- a/lib/rdoc/store.rb
+++ b/lib/rdoc/store.rb
@@ -482,7 +482,7 @@ class RDoc::Store
when :gem then
parent = File.expand_path '..', @path
"gem #{File.basename parent}"
- when :home then '~/.rdoc'
+ when :home then RDoc.home
when :site then 'ruby site'
when :system then 'ruby core'
else @path
@@ -556,9 +556,7 @@ class RDoc::Store
def load_cache
#orig_enc = @encoding
- File.open cache_path, 'rb' do |io|
- @cache = Marshal.load io.read
- end
+ @cache = marshal_load(cache_path)
load_enc = @cache[:encoding]
@@ -615,9 +613,7 @@ class RDoc::Store
def load_class_data klass_name
file = class_file klass_name
- File.open file, 'rb' do |io|
- Marshal.load io.read
- end
+ marshal_load(file)
rescue Errno::ENOENT => e
error = MissingFileError.new(self, file, klass_name)
error.set_backtrace e.backtrace
@@ -630,14 +626,10 @@ class RDoc::Store
def load_method klass_name, method_name
file = method_file klass_name, method_name
- File.open file, 'rb' do |io|
- obj = Marshal.load io.read
- obj.store = self
- obj.parent =
- find_class_or_module(klass_name) || load_class(klass_name) unless
- obj.parent
- obj
- end
+ obj = marshal_load(file)
+ obj.store = self
+ obj.parent ||= find_class_or_module(klass_name) || load_class(klass_name)
+ obj
rescue Errno::ENOENT => e
error = MissingFileError.new(self, file, klass_name + method_name)
error.set_backtrace e.backtrace
@@ -650,11 +642,9 @@ class RDoc::Store
def load_page page_name
file = page_file page_name
- File.open file, 'rb' do |io|
- obj = Marshal.load io.read
- obj.store = self
- obj
- end
+ obj = marshal_load(file)
+ obj.store = self
+ obj
rescue Errno::ENOENT => e
error = MissingFileError.new(self, file, page_name)
error.set_backtrace e.backtrace
@@ -723,7 +713,7 @@ class RDoc::Store
def page name
@text_files_hash.each_value.find do |file|
- file.page_name == name
+ file.page_name == name or file.base_name == name
end
end
@@ -976,4 +966,21 @@ class RDoc::Store
@unique_modules
end
+ private
+ def marshal_load(file)
+ File.open(file, 'rb') {|io| Marshal.load(io, MarshalFilter)}
+ end
+
+ MarshalFilter = proc do |obj|
+ case obj
+ when true, false, nil, Array, Class, Encoding, Hash, Integer, String, Symbol, RDoc::Text
+ else
+ unless obj.class.name.start_with?("RDoc::")
+ raise TypeError, "not permitted class: #{obj.class.name}"
+ end
+ end
+ obj
+ end
+ private_constant :MarshalFilter
+
end
diff --git a/lib/rdoc/task.rb b/lib/rdoc/task.rb
index 0bedaa50b0..8ea2d0588c 100644
--- a/lib/rdoc/task.rb
+++ b/lib/rdoc/task.rb
@@ -32,7 +32,7 @@ begin
rescue Gem::LoadError
end unless defined?(Rake)
-require 'rdoc'
+require_relative '../rdoc'
require 'rake'
require 'rake/tasklib'
@@ -71,7 +71,7 @@ require 'rake/tasklib'
# require 'rdoc/task'
#
# RDoc::Task.new :rdoc_dev do |rdoc|
-# rdoc.main = "README.doc"
+# rdoc.main = "README.rdoc"
# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb")
# rdoc.options << "--all"
# end
@@ -323,7 +323,7 @@ module Rake
##
# For backwards compatibility
- RDocTask = RDoc::Task
+ RDocTask = RDoc::Task # :nodoc:
end
# :startdoc:
diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb
index c3218fdb2f..0bc4aba428 100644
--- a/lib/rdoc/text.rb
+++ b/lib/rdoc/text.rb
@@ -218,10 +218,10 @@ module RDoc::Text
when s.scan(/\.\.\.(\.?)/) then
html << s[1] << encoded[:ellipsis]
after_word = nil
- when s.scan(/\(c\)/) then
+ when s.scan(/\(c\)/i) then
html << encoded[:copyright]
after_word = nil
- when s.scan(/\(r\)/) then
+ when s.scan(/\(r\)/i) then
html << encoded[:trademark]
after_word = nil
when s.scan(/---/) then
@@ -237,10 +237,18 @@ module RDoc::Text
when s.scan(/``/) then # backtick double quote
html << encoded[:open_dquote]
after_word = nil
- when s.scan(/''/) then # tick double quote
+ when s.scan(/(?:&#39;|'){2}/) then # tick double quote
html << encoded[:close_dquote]
after_word = nil
- when s.scan(/'/) then # single quote
+ when s.scan(/`/) then # backtick
+ if insquotes or after_word
+ html << '`'
+ after_word = false
+ else
+ html << encoded[:open_squote]
+ insquotes = true
+ end
+ when s.scan(/&#39;|'/) then # single quote
if insquotes
html << encoded[:close_squote]
insquotes = false
diff --git a/lib/rdoc/version.rb b/lib/rdoc/version.rb
index 5c70744061..31c1aa0276 100644
--- a/lib/rdoc/version.rb
+++ b/lib/rdoc/version.rb
@@ -1,8 +1,10 @@
+# frozen_string_literal: true
+
module RDoc
##
# RDoc version you are using
- VERSION = '6.2.1'
+ VERSION = '6.5.1.1'
end
diff --git a/lib/readline.gemspec b/lib/readline.gemspec
index 0f8ff96119..3a18f9edb6 100644
--- a/lib/readline.gemspec
+++ b/lib/readline.gemspec
@@ -1,23 +1,33 @@
Gem::Specification.new do |spec|
spec.name = 'readline'
- spec.version = '0.0.1.pre.1'
+ spec.version = '0.0.3'
spec.authors = ['aycabta']
spec.email = ['aycabta@gmail.com']
- spec.summary = %q{It's a loader for "readline".}
+ spec.summary = %q{Loader for "readline".}
spec.description = <<~EOD
- This is just loader for "readline". If Ruby has "readline-ext" gem that
- is a native extension, this gem will load its first. If Ruby doesn't have
- the "readline-ext" gem this gem will load "reline" that is a compatible
- library with "readline-ext" gem and is implemented by pure Ruby.
+ This is just a loader for "readline". If Ruby has the "readline-ext" gem
+ that is a native extension, this gem will load it. If Ruby does not have
+ the "readline-ext" gem this gem will load "reline", a library that is
+ compatible with the "readline-ext" gem and implemented in pure Ruby.
EOD
spec.homepage = 'https://github.com/ruby/readline'
- spec.license = 'Ruby license'
+ spec.license = 'Ruby'
spec.files = Dir['BSDL', 'COPYING', 'README.md', 'lib/readline.rb']
spec.require_paths = ['lib']
+ spec.post_install_message = <<~EOM
+ +---------------------------------------------------------------------------+
+ | This is just a loader for "readline". If Ruby has the "readline-ext" gem |
+ | that is a native extension, this gem will load it. If Ruby does not have |
+ | the "readline-ext" gem this gem will load "reline", a library that is |
+ | compatible with the "readline-ext" gem and implemented in pure Ruby. |
+ | |
+ | If you intend to use GNU Readline by `require 'readline'`, please install |
+ | the "readline-ext" gem. |
+ +---------------------------------------------------------------------------+
+ EOM
+
spec.add_runtime_dependency 'reline'
- spec.add_development_dependency 'bundler'
- spec.add_development_dependency 'rake'
end
diff --git a/lib/readline.rb b/lib/readline.rb
index 6cc923cb2f..29cdf3a14f 100644
--- a/lib/readline.rb
+++ b/lib/readline.rb
@@ -2,5 +2,6 @@ begin
require 'readline.so'
rescue LoadError
require 'reline' unless defined? Reline
+ Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
Readline = Reline
end
diff --git a/lib/reline.rb b/lib/reline.rb
index 9a9f742909..7800a281ce 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -7,13 +7,44 @@ require 'reline/key_actor'
require 'reline/key_stroke'
require 'reline/line_editor'
require 'reline/history'
+require 'reline/terminfo'
+require 'rbconfig'
module Reline
FILENAME_COMPLETION_PROC = nil
USERNAME_COMPLETION_PROC = nil
- Key = Struct.new('Key', :char, :combined_char, :with_meta)
+ class ConfigEncodingConversionError < StandardError; end
+
+ Key = Struct.new('Key', :char, :combined_char, :with_meta) do
+ def match?(other)
+ case other
+ when Reline::Key
+ (other.char.nil? or char.nil? or char == other.char) and
+ (other.combined_char.nil? or combined_char.nil? or combined_char == other.combined_char) and
+ (other.with_meta.nil? or with_meta.nil? or with_meta == other.with_meta)
+ when Integer, Symbol
+ (combined_char and combined_char == other) or
+ (combined_char.nil? and char and char == other)
+ else
+ false
+ end
+ end
+ alias_method :==, :match?
+ end
CursorPos = Struct.new(:x, :y)
+ DialogRenderInfo = Struct.new(
+ :pos,
+ :contents,
+ :bg_color,
+ :pointer_bg_color,
+ :fg_color,
+ :pointer_fg_color,
+ :width,
+ :height,
+ :scrollbar,
+ keyword_init: true
+ )
class Core
ATTR_READER_NAMES = %i(
@@ -35,50 +66,60 @@ module Reline
attr_accessor :config
attr_accessor :key_stroke
attr_accessor :line_editor
- attr_accessor :ambiguous_width
attr_accessor :last_incremental_search
attr_reader :output
+ extend Forwardable
+ def_delegators :config,
+ :autocompletion,
+ :autocompletion=
+
def initialize
self.output = STDOUT
+ @dialog_proc_list = {}
yield self
@completion_quote_character = nil
+ @bracketed_paste_finished = false
+ end
+
+ def encoding
+ Reline::IOGate.encoding
end
def completion_append_character=(val)
if val.nil?
@completion_append_character = nil
elsif val.size == 1
- @completion_append_character = val.encode(Encoding::default_external)
+ @completion_append_character = val.encode(Reline::IOGate.encoding)
elsif val.size > 1
- @completion_append_character = val[0].encode(Encoding::default_external)
+ @completion_append_character = val[0].encode(Reline::IOGate.encoding)
else
@completion_append_character = nil
end
end
def basic_word_break_characters=(v)
- @basic_word_break_characters = v.encode(Encoding::default_external)
+ @basic_word_break_characters = v.encode(Reline::IOGate.encoding)
end
def completer_word_break_characters=(v)
- @completer_word_break_characters = v.encode(Encoding::default_external)
+ @completer_word_break_characters = v.encode(Reline::IOGate.encoding)
end
def basic_quote_characters=(v)
- @basic_quote_characters = v.encode(Encoding::default_external)
+ @basic_quote_characters = v.encode(Reline::IOGate.encoding)
end
def completer_quote_characters=(v)
- @completer_quote_characters = v.encode(Encoding::default_external)
+ @completer_quote_characters = v.encode(Reline::IOGate.encoding)
end
def filename_quote_characters=(v)
- @filename_quote_characters = v.encode(Encoding::default_external)
+ @filename_quote_characters = v.encode(Reline::IOGate.encoding)
end
def special_prefixes=(v)
- @special_prefixes = v.encode(Encoding::default_external)
+ @special_prefixes = v.encode(Reline::IOGate.encoding)
end
def completion_case_fold=(v)
@@ -94,22 +135,22 @@ module Reline
end
def completion_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@completion_proc = p
end
def output_modifier_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@output_modifier_proc = p
end
def prompt_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@prompt_proc = p
end
def auto_indent_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@auto_indent_proc = p
end
@@ -118,10 +159,21 @@ module Reline
end
def dig_perfect_match_proc=(p)
- raise ArgumentError unless p.respond_to?(:call)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
@dig_perfect_match_proc = p
end
+ DialogProc = Struct.new(:dialog_proc, :context)
+ def add_dialog_proc(name_sym, p, context = nil)
+ raise ArgumentError unless p.respond_to?(:call) or p.nil?
+ raise ArgumentError unless name_sym.instance_of?(Symbol)
+ @dialog_proc_list[name_sym] = DialogProc.new(p, context)
+ end
+
+ def dialog_proc(name_sym)
+ @dialog_proc_list[name_sym]
+ end
+
def input=(val)
raise TypeError unless val.respond_to?(:getc) or val.nil?
if val.respond_to?(:getc)
@@ -163,6 +215,55 @@ module Reline
Reline::IOGate.get_screen_size
end
+ Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = ->() {
+ # autocomplete
+ return nil unless config.autocompletion
+ if just_cursor_moving and completion_journey_data.nil?
+ # Auto complete starts only when edited
+ return nil
+ end
+ pre, target, post = retrieve_completion_block(true)
+ if target.nil? or target.empty? or (completion_journey_data&.pointer == -1 and target.size <= 3)
+ return nil
+ end
+ if completion_journey_data and completion_journey_data.list
+ result = completion_journey_data.list.dup
+ result.shift
+ pointer = completion_journey_data.pointer - 1
+ else
+ result = call_completion_proc_with_checking_args(pre, target, post)
+ pointer = nil
+ end
+ if result and result.size == 1 and result[0] == target and pointer != 0
+ result = nil
+ end
+ target_width = Reline::Unicode.calculate_width(target)
+ x = cursor_pos.x - target_width
+ if x < 0
+ x = screen_width + x
+ y = -1
+ else
+ y = 0
+ end
+ cursor_pos_to_render = Reline::CursorPos.new(x, y)
+ if context and context.is_a?(Array)
+ context.clear
+ context.push(cursor_pos_to_render, result, pointer, dialog)
+ end
+ dialog.pointer = pointer
+ DialogRenderInfo.new(
+ pos: cursor_pos_to_render,
+ contents: result,
+ scrollbar: true,
+ height: 15,
+ bg_color: 46,
+ pointer_bg_color: 45,
+ fg_color: 37,
+ pointer_fg_color: 37
+ )
+ }
+ Reline::DEFAULT_DIALOG_CONTEXT = Array.new
+
def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
unless confirm_multiline_termination
raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')
@@ -171,7 +272,7 @@ module Reline
whole_buffer = line_editor.whole_buffer.dup
whole_buffer.taint if RUBY_VERSION < '2.7'
- if add_hist and whole_buffer and whole_buffer.chomp.size > 0
+ if add_hist and whole_buffer and whole_buffer.chomp("\n").size > 0
Reline::HISTORY << whole_buffer
end
@@ -184,8 +285,8 @@ module Reline
line = line_editor.line.dup
line.taint if RUBY_VERSION < '2.7'
- if add_hist and line and line.chomp.size > 0
- Reline::HISTORY << line.chomp
+ if add_hist and line and line.chomp("\n").size > 0
+ Reline::HISTORY << line.chomp("\n")
end
line_editor.reset_line if line_editor.line.nil?
@@ -194,14 +295,18 @@ module Reline
private def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination)
if ENV['RELINE_STDERR_TTY']
- $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
+ if Reline::IOGate.win?
+ $stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a')
+ else
+ $stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
+ end
$stderr.sync = true
$stderr.puts "Reline is used by #{Process.pid}"
end
otio = Reline::IOGate.prep
may_req_ambiguous_char_width
- line_editor.reset(prompt)
+ line_editor.reset(prompt, encoding: Reline::IOGate.encoding)
if multiline
line_editor.multiline_on
if block_given?
@@ -218,42 +323,65 @@ module Reline
line_editor.auto_indent_proc = auto_indent_proc
line_editor.dig_perfect_match_proc = dig_perfect_match_proc
line_editor.pre_input_hook = pre_input_hook
- line_editor.rerender
+ @dialog_proc_list.each_pair do |name_sym, d|
+ line_editor.add_dialog_proc(name_sym, d.dialog_proc, d.context)
+ end
unless config.test_mode
config.read
config.reset_default_key_bindings
- Reline::IOGate::RAW_KEYSTROKE_CONFIG.each_pair do |key, func|
- config.add_default_key_binding(key, func)
- end
+ Reline::IOGate.set_default_key_bindings(config)
end
+ line_editor.rerender
+
begin
+ line_editor.set_signal_handlers
+ prev_pasting_state = false
loop do
+ prev_pasting_state = Reline::IOGate.in_pasting?
read_io(config.keyseq_timeout) { |inputs|
+ line_editor.set_pasting_state(Reline::IOGate.in_pasting?)
inputs.each { |c|
line_editor.input_key(c)
line_editor.rerender
}
+ if @bracketed_paste_finished
+ line_editor.rerender_all
+ @bracketed_paste_finished = false
+ end
}
+ if prev_pasting_state == true and not Reline::IOGate.in_pasting? and not line_editor.finished?
+ line_editor.set_pasting_state(false)
+ prev_pasting_state = false
+ line_editor.rerender_all
+ end
break if line_editor.finished?
end
Reline::IOGate.move_cursor_column(0)
+ rescue Errno::EIO
+ # Maybe the I/O has been closed.
rescue StandardError => e
line_editor.finalize
Reline::IOGate.deprep(otio)
raise e
+ rescue Exception
+ # Including Interrupt
+ line_editor.finalize
+ Reline::IOGate.deprep(otio)
+ raise
end
line_editor.finalize
Reline::IOGate.deprep(otio)
end
- # Keystrokes of GNU Readline will timeout it with the specification of
- # "keyseq-timeout" when waiting for the 2nd character after the 1st one.
- # If the 2nd character comes after 1st ESC without timeout it has a
- # meta-property of meta-key to discriminate modified key with meta-key
- # from multibyte characters that come with 8th bit on.
+ # GNU Readline waits for "keyseq-timeout" milliseconds to see if the ESC
+ # is followed by a character, and times out and treats it as a standalone
+ # ESC if the second character does not arrive. If the second character
+ # comes before timed out, it is treated as a modifier key with the
+ # meta-property of meta-key, so that it can be distinguished from
+ # multibyte characters with the 8th bit turned on.
#
# GNU Readline will wait for the 2nd character with "keyseq-timeout"
# milli-seconds but wait forever after 3rd characters.
@@ -261,8 +389,13 @@ module Reline
buffer = []
loop do
c = Reline::IOGate.getc
- buffer << c
- result = key_stroke.match_status(buffer)
+ if c == -1
+ result = :unmatched
+ @bracketed_paste_finished = true
+ else
+ buffer << c
+ result = key_stroke.match_status(buffer)
+ end
case result
when :matched
expanded = key_stroke.expand(buffer).map{ |expanded_c|
@@ -272,25 +405,9 @@ module Reline
break
when :matching
if buffer.size == 1
- begin
- succ_c = nil
- Timeout.timeout(keyseq_timeout / 1000.0) {
- succ_c = Reline::IOGate.getc
- }
- rescue Timeout::Error # cancel matching only when first byte
- block.([Reline::Key.new(c, c, false)])
- break
- else
- if key_stroke.match_status(buffer.dup.push(succ_c)) == :unmatched
- if c == "\e".ord
- block.([Reline::Key.new(succ_c, succ_c | 0b10000000, true)])
- else
- block.([Reline::Key.new(c, c, false), Reline::Key.new(succ_c, succ_c, false)])
- end
- break
- else
- Reline::IOGate.ungetc(succ_c)
- end
+ case read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block)
+ when :break then break
+ when :next then next
end
end
when :unmatched
@@ -307,6 +424,38 @@ module Reline
end
end
+ private def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block)
+ begin
+ succ_c = nil
+ Timeout.timeout(keyseq_timeout / 1000.0) {
+ succ_c = Reline::IOGate.getc
+ }
+ rescue Timeout::Error # cancel matching only when first byte
+ block.([Reline::Key.new(c, c, false)])
+ return :break
+ else
+ case key_stroke.match_status(buffer.dup.push(succ_c))
+ when :unmatched
+ if c == "\e".ord
+ block.([Reline::Key.new(succ_c, succ_c | 0b10000000, true)])
+ else
+ block.([Reline::Key.new(c, c, false), Reline::Key.new(succ_c, succ_c, false)])
+ end
+ return :break
+ when :matching
+ Reline::IOGate.ungetc(succ_c)
+ return :next
+ when :matched
+ buffer << succ_c
+ expanded = key_stroke.expand(buffer).map{ |expanded_c|
+ Reline::Key.new(expanded_c, expanded_c, false)
+ }
+ block.(expanded)
+ return :break
+ end
+ end
+ end
+
private def read_escaped_key(keyseq_timeout, c, block)
begin
escaped_c = nil
@@ -328,12 +477,23 @@ module Reline
end
end
+ def ambiguous_width
+ may_req_ambiguous_char_width unless defined? @ambiguous_width
+ @ambiguous_width
+ end
+
private def may_req_ambiguous_char_width
- @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or STDOUT.is_a?(File)
- return if ambiguous_width
+ @ambiguous_width = 2 if Reline::IOGate == Reline::GeneralIO or !STDOUT.tty?
+ return if defined? @ambiguous_width
Reline::IOGate.move_cursor_column(0)
- print "\u{25bd}"
- @ambiguous_width = Reline::IOGate.cursor_pos.x
+ begin
+ output.write "\u{25bd}"
+ rescue Encoding::UndefinedConversionError
+ # LANG=C
+ @ambiguous_width = 1
+ else
+ @ambiguous_width = Reline::IOGate.cursor_pos.x
+ end
Reline::IOGate.move_cursor_column(0)
Reline::IOGate.erase_after_cursor
end
@@ -347,7 +507,7 @@ module Reline
#--------------------------------------------------------
(Core::ATTR_READER_NAMES).each { |name|
- def_single_delegators :core, "#{name}", "#{name}="
+ def_single_delegators :core, :"#{name}", :"#{name}="
}
def_single_delegators :core, :input=, :output=
def_single_delegators :core, :vi_editing_mode, :emacs_editing_mode
@@ -382,16 +542,23 @@ module Reline
def_single_delegators :core, :ambiguous_width
def_single_delegators :core, :last_incremental_search
def_single_delegators :core, :last_incremental_search=
+ def_single_delegators :core, :add_dialog_proc
+ def_single_delegators :core, :dialog_proc
+ def_single_delegators :core, :autocompletion, :autocompletion=
def_single_delegators :core, :readmultiline
def_instance_delegators self, :readmultiline
private :readmultiline
+ def self.encoding_system_needs
+ self.core.encoding
+ end
+
def self.core
@core ||= Core.new { |core|
core.config = Reline::Config.new
core.key_stroke = Reline::KeyStroke.new(core.config)
- core.line_editor = Reline::LineEditor.new(core.config)
+ core.line_editor = Reline::LineEditor.new(core.config, Reline::IOGate.encoding)
core.basic_word_break_characters = " \t\n`><=;|&{("
core.completer_word_break_characters = " \t\n`><=;|&{("
@@ -399,27 +566,35 @@ module Reline
core.completer_quote_characters = '"\''
core.filename_quote_characters = ""
core.special_prefixes = ""
+ core.add_dialog_proc(:autocomplete, Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE, Reline::DEFAULT_DIALOG_CONTEXT)
}
end
+ def self.ungetc(c)
+ Reline::IOGate.ungetc(c)
+ end
+
def self.line_editor
core.line_editor
end
-
- HISTORY = History.new(core.config)
end
-if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
- require 'reline/windows'
- if Reline::Windows.get_screen_size == [0, 0]
- # Maybe Mintty on Cygwin
- require 'reline/ansi'
- Reline::IOGate = Reline::ANSI
+require 'reline/general_io'
+io = Reline::GeneralIO
+unless ENV['TERM'] == 'dumb'
+ case RbConfig::CONFIG['host_os']
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
+ require 'reline/windows'
+ tty = (io = Reline::Windows).msys_tty?
else
- Reline::IOGate = Reline::Windows
+ tty = $stdout.tty?
end
-else
+end
+Reline::IOGate = if tty
require 'reline/ansi'
- Reline::IOGate = Reline::ANSI
+ Reline::ANSI
+else
+ io
end
-require 'reline/general_io'
+
+Reline::HISTORY = Reline::History.new(Reline.core.config)
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 8d83da854c..c40085e50d 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -1,22 +1,137 @@
require 'io/console'
+require 'io/wait'
+require 'timeout'
+require_relative 'terminfo'
class Reline::ANSI
- RAW_KEYSTROKE_CONFIG = {
- [27, 91, 65] => :ed_prev_history, # ↑
- [27, 91, 66] => :ed_next_history, # ↓
- [27, 91, 67] => :ed_next_char, # →
- [27, 91, 68] => :ed_prev_char, # â†
- [27, 91, 51, 126] => :key_delete, # Del
- [27, 91, 49, 126] => :ed_move_to_beg, # Home
- [27, 91, 52, 126] => :ed_move_to_end, # End
- [27, 91, 72] => :ed_move_to_beg, # Home
- [27, 91, 70] => :ed_move_to_end, # End
- [27, 32] => :em_set_mark, # M-<space>
- [24, 24] => :em_exchange_mark, # C-x C-x TODO also add Windows
- [27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→
- [27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+â†
+ CAPNAME_KEY_BINDINGS = {
+ 'khome' => :ed_move_to_beg,
+ 'kend' => :ed_move_to_end,
+ 'kcuu1' => :ed_prev_history,
+ 'kcud1' => :ed_next_history,
+ 'kcuf1' => :ed_next_char,
+ 'kcub1' => :ed_prev_char,
+ 'cuu' => :ed_prev_history,
+ 'cud' => :ed_next_history,
+ 'cuf' => :ed_next_char,
+ 'cub' => :ed_prev_char,
}
+ if Reline::Terminfo.enabled?
+ Reline::Terminfo.setupterm(0, 2)
+ end
+
+ def self.encoding
+ Encoding.default_external
+ end
+
+ def self.win?
+ false
+ end
+
+ def self.set_default_key_bindings(config)
+ if Reline::Terminfo.enabled?
+ set_default_key_bindings_terminfo(config)
+ else
+ set_default_key_bindings_comprehensive_list(config)
+ end
+ {
+ # extended entries of terminfo
+ [27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→, extended entry
+ [27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+â†, extended entry
+ [27, 91, 49, 59, 51, 67] => :em_next_word, # Meta+→, extended entry
+ [27, 91, 49, 59, 51, 68] => :ed_prev_word, # Meta+â†, extended entry
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ config.add_default_key_binding_by_keymap(:vi_command, key, func)
+ end
+ {
+ [27, 91, 90] => :completion_journey_up, # S-Tab
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ end
+ {
+ # default bindings
+ [27, 32] => :em_set_mark, # M-<space>
+ [24, 24] => :em_exchange_mark, # C-x C-x
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ end
+ end
+
+ def self.set_default_key_bindings_terminfo(config)
+ key_bindings = CAPNAME_KEY_BINDINGS.map do |capname, key_binding|
+ begin
+ key_code = Reline::Terminfo.tigetstr(capname)
+ case capname
+ # Escape sequences that omit the move distance and are set to defaults
+ # value 1 may be sometimes sent by pressing the arrow-key.
+ when 'cuu', 'cud', 'cuf', 'cub'
+ [ key_code.sub(/%p1%d/, '').bytes, key_binding ]
+ else
+ [ key_code.bytes, key_binding ]
+ end
+ rescue Reline::Terminfo::TerminfoError
+ # capname is undefined
+ end
+ end.compact.to_h
+
+ key_bindings.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ config.add_default_key_binding_by_keymap(:vi_command, key, func)
+ end
+ end
+
+ def self.set_default_key_bindings_comprehensive_list(config)
+ {
+ # Console (80x25)
+ [27, 91, 49, 126] => :ed_move_to_beg, # Home
+ [27, 91, 52, 126] => :ed_move_to_end, # End
+ [27, 91, 51, 126] => :key_delete, # Del
+ [27, 91, 65] => :ed_prev_history, # ↑
+ [27, 91, 66] => :ed_next_history, # ↓
+ [27, 91, 67] => :ed_next_char, # →
+ [27, 91, 68] => :ed_prev_char, # â†
+
+ # KDE
+ [27, 91, 72] => :ed_move_to_beg, # Home
+ [27, 91, 70] => :ed_move_to_end, # End
+ # Del is 0x08
+ [27, 71, 65] => :ed_prev_history, # ↑
+ [27, 71, 66] => :ed_next_history, # ↓
+ [27, 71, 67] => :ed_next_char, # →
+ [27, 71, 68] => :ed_prev_char, # â†
+
+ # urxvt / exoterm
+ [27, 91, 55, 126] => :ed_move_to_beg, # Home
+ [27, 91, 56, 126] => :ed_move_to_end, # End
+
+ # GNOME
+ [27, 79, 72] => :ed_move_to_beg, # Home
+ [27, 79, 70] => :ed_move_to_end, # End
+ # Del is 0x08
+ # Arrow keys are the same of KDE
+
+ # iTerm2
+ [27, 27, 91, 67] => :em_next_word, # Option+→, extended entry
+ [27, 27, 91, 68] => :ed_prev_word, # Option+â†, extended entry
+ [195, 166] => :em_next_word, # Option+f
+ [195, 162] => :ed_prev_word, # Option+b
+
+ [27, 79, 65] => :ed_prev_history, # ↑
+ [27, 79, 66] => :ed_next_history, # ↓
+ [27, 79, 67] => :ed_next_char, # →
+ [27, 79, 68] => :ed_prev_char, # â†
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ config.add_default_key_binding_by_keymap(:vi_command, key, func)
+ end
+ end
+
@@input = STDIN
def self.input=(val)
@@input = val
@@ -28,12 +143,70 @@ class Reline::ANSI
end
@@buf = []
- def self.getc
+ def self.inner_getc
unless @@buf.empty?
return @@buf.shift
end
- c = @@input.raw(intr: true, &:getbyte)
- (c == 0x16 && @@input.raw(min: 0, tim: 0, &:getbyte)) || c
+ until c = @@input.raw(intr: true) { @@input.wait_readable(0.1) && @@input.getbyte }
+ Reline.core.line_editor.resize
+ end
+ (c == 0x16 && @@input.raw(min: 0, time: 0, &:getbyte)) || c
+ rescue Errno::EIO
+ # Maybe the I/O has been closed.
+ nil
+ rescue Errno::ENOTTY
+ nil
+ end
+
+ @@in_bracketed_paste_mode = false
+ START_BRACKETED_PASTE = String.new("\e[200~,", encoding: Encoding::ASCII_8BIT)
+ END_BRACKETED_PASTE = String.new("\e[200~.", encoding: Encoding::ASCII_8BIT)
+ def self.getc_with_bracketed_paste
+ buffer = String.new(encoding: Encoding::ASCII_8BIT)
+ buffer << inner_getc
+ while START_BRACKETED_PASTE.start_with?(buffer) or END_BRACKETED_PASTE.start_with?(buffer) do
+ if START_BRACKETED_PASTE == buffer
+ @@in_bracketed_paste_mode = true
+ return inner_getc
+ elsif END_BRACKETED_PASTE == buffer
+ @@in_bracketed_paste_mode = false
+ ungetc(-1)
+ return inner_getc
+ end
+ begin
+ succ_c = nil
+ Timeout.timeout(Reline.core.config.keyseq_timeout * 100) {
+ succ_c = inner_getc
+ }
+ rescue Timeout::Error
+ break
+ else
+ buffer << succ_c
+ end
+ end
+ buffer.bytes.reverse_each do |ch|
+ ungetc ch
+ end
+ inner_getc
+ end
+
+ def self.getc
+ if Reline.core.config.enable_bracketed_paste
+ getc_with_bracketed_paste
+ else
+ inner_getc
+ end
+ end
+
+ def self.in_pasting?
+ @@in_bracketed_paste_mode or (not Reline::IOGate.empty_buffer?)
+ end
+
+ def self.empty_buffer?
+ unless @@buf.empty?
+ return false
+ end
+ !@@input.wait_readable(0)
end
def self.ungetc(c)
@@ -41,16 +214,22 @@ class Reline::ANSI
end
def self.retrieve_keybuffer
- result = select([@@input], [], [], 0.001)
- return if result.nil?
+ begin
+ return unless @@input.wait_readable(0.001)
str = @@input.read_nonblock(1024)
str.bytes.each do |c|
@@buf.push(c)
end
+ rescue EOFError
+ end
end
def self.get_screen_size
- @@input.winsize
+ s = @@input.winsize
+ return s if s[0] > 0 && s[1] > 0
+ s = [ENV["LINES"].to_i, ENV["COLUMNS"].to_i]
+ return s if s[0] > 0 && s[1] > 0
+ [24, 80]
rescue Errno::ENOTTY
[24, 80]
end
@@ -64,15 +243,18 @@ class Reline::ANSI
def self.cursor_pos
begin
- res = ''
+ res = +''
m = nil
@@input.raw do |stdin|
@@output << "\e[6n"
@@output.flush
- while (c = stdin.getc) != 'R'
- res << c if c
+ loop do
+ c = stdin.getc
+ next if c.nil?
+ res << c
+ m = res.match(/\e\[(?<row>\d+);(?<column>\d+)R/)
+ break if m
end
- m = res.match(/\e\[(?<row>\d+);(?<column>\d+)/)
(m.pre_match + m.post_match).chars.reverse_each do |ch|
stdin.ungetc ch
end
@@ -80,20 +262,27 @@ class Reline::ANSI
column = m[:column].to_i - 1
row = m[:row].to_i - 1
rescue Errno::ENOTTY
- buf = @@output.pread(@@output.pos, 0)
- row = buf.count("\n")
- column = buf.rindex("\n") ? (buf.size - buf.rindex("\n")) - 1 : 0
+ begin
+ buf = @@output.pread(@@output.pos, 0)
+ row = buf.count("\n")
+ column = buf.rindex("\n") ? (buf.size - buf.rindex("\n")) - 1 : 0
+ rescue Errno::ESPIPE
+ # Just returns column 1 for ambiguous width because this I/O is not
+ # tty and can't seek.
+ row = 0
+ column = 1
+ end
end
Reline::CursorPos.new(column, row)
end
def self.move_cursor_column(x)
- print "\e[#{x + 1}G"
+ @@output.write "\e[#{x + 1}G"
end
def self.move_cursor_up(x)
if x > 0
- print "\e[#{x}A" if x > 0
+ @@output.write "\e[#{x}A"
elsif x < 0
move_cursor_down(-x)
end
@@ -101,24 +290,48 @@ class Reline::ANSI
def self.move_cursor_down(x)
if x > 0
- print "\e[#{x}B" if x > 0
+ @@output.write "\e[#{x}B"
elsif x < 0
move_cursor_up(-x)
end
end
+ def self.hide_cursor
+ if Reline::Terminfo.enabled?
+ begin
+ @@output.write Reline::Terminfo.tigetstr('civis')
+ rescue Reline::Terminfo::TerminfoError
+ # civis is undefined
+ end
+ else
+ # ignored
+ end
+ end
+
+ def self.show_cursor
+ if Reline::Terminfo.enabled?
+ begin
+ @@output.write Reline::Terminfo.tigetstr('cnorm')
+ rescue Reline::Terminfo::TerminfoError
+ # cnorm is undefined
+ end
+ else
+ # ignored
+ end
+ end
+
def self.erase_after_cursor
- print "\e[K"
+ @@output.write "\e[K"
end
def self.scroll_down(x)
return if x.zero?
- print "\e[#{x}S"
+ @@output.write "\e[#{x}S"
end
def self.clear_screen
- print "\e[2J"
- print "\e[1;1H"
+ @@output.write "\e[2J"
+ @@output.write "\e[1;1H"
end
@@old_winch_handler = nil
@@ -128,14 +341,10 @@ class Reline::ANSI
def self.prep
retrieve_keybuffer
- int_handle = Signal.trap('INT', 'IGNORE')
- Signal.trap('INT', int_handle)
nil
end
def self.deprep(otio)
- int_handle = Signal.trap('INT', 'IGNORE')
- Signal.trap('INT', int_handle)
Signal.trap('WINCH', @@old_winch_handler) if @@old_winch_handler
end
end
diff --git a/lib/reline/config.rb b/lib/reline/config.rb
index fdc2b39c1b..5ba269258f 100644
--- a/lib/reline/config.rb
+++ b/lib/reline/config.rb
@@ -1,10 +1,6 @@
-require 'pathname'
-
class Reline::Config
attr_reader :test_mode
- DEFAULT_PATH = '~/.inputrc'
-
KEYSEQ_PATTERN = /\\(?:C|Control)-[A-Za-z_]|\\(?:M|Meta)-[0-9A-Za-z_]|\\(?:C|Control)-(?:M|Meta)-[A-Za-z_]|\\(?:M|Meta)-(?:C|Control)-[A-Za-z_]|\\e|\\[\\\"\'abdfnrtv]|\\\d{1,3}|\\x\h{1,2}|./
class InvalidInputrc < RuntimeError
@@ -37,34 +33,55 @@ class Reline::Config
show-all-if-ambiguous
show-all-if-unmodified
visible-stats
+ show-mode-in-prompt
+ vi-cmd-mode-string
+ vi-ins-mode-string
+ emacs-mode-string
+ enable-bracketed-paste
+ isearch-terminators
}
VARIABLE_NAME_SYMBOLS = VARIABLE_NAMES.map { |v| :"#{v.tr(?-, ?_)}" }
VARIABLE_NAME_SYMBOLS.each do |v|
attr_accessor v
end
+ attr_accessor :autocompletion
+
def initialize
@additional_key_bindings = {} # from inputrc
- @default_key_bindings = {} # environment-dependent
+ @additional_key_bindings[:emacs] = {}
+ @additional_key_bindings[:vi_insert] = {}
+ @additional_key_bindings[:vi_command] = {}
+ @oneshot_key_bindings = {}
@skip_section = nil
@if_stack = nil
@editing_mode_label = :emacs
@keymap_label = :emacs
+ @keymap_prefix = []
@key_actors = {}
@key_actors[:emacs] = Reline::KeyActor::Emacs.new
@key_actors[:vi_insert] = Reline::KeyActor::ViInsert.new
@key_actors[:vi_command] = Reline::KeyActor::ViCommand.new
- @history_size = 500
+ @vi_cmd_mode_string = '(cmd)'
+ @vi_ins_mode_string = '(ins)'
+ @emacs_mode_string = '@'
+ # https://tiswww.case.edu/php/chet/readline/readline.html#IDX25
+ @history_size = -1 # unlimited
@keyseq_timeout = 500
@test_mode = false
+ @autocompletion = false
+ @convert_meta = true if seven_bit_encoding?(Reline::IOGate.encoding)
end
def reset
if editing_mode_is?(:vi_command)
@editing_mode_label = :vi_insert
end
- @additional_key_bindings = {}
- @default_key_bindings = {}
+ @additional_key_bindings.keys.each do |key|
+ @additional_key_bindings[key].clear
+ end
+ @oneshot_key_bindings.clear
+ reset_default_key_bindings
end
def editing_mode
@@ -83,8 +100,38 @@ class Reline::Config
@key_actors[@keymap_label]
end
+ def inputrc_path
+ case ENV['INPUTRC']
+ when nil, ''
+ else
+ return File.expand_path(ENV['INPUTRC'])
+ end
+
+ # In the XDG Specification, if ~/.config/readline/inputrc exists, then
+ # ~/.inputrc should not be read, but for compatibility with GNU Readline,
+ # if ~/.inputrc exists, then it is given priority.
+ home_rc_path = File.expand_path('~/.inputrc')
+ return home_rc_path if File.exist?(home_rc_path)
+
+ case path = ENV['XDG_CONFIG_HOME']
+ when nil, ''
+ else
+ path = File.join(path, 'readline/inputrc')
+ return path if File.exist?(path) and path == File.expand_path(path)
+ end
+
+ path = File.expand_path('~/.config/readline/inputrc')
+ return path if File.exist?(path)
+
+ return home_rc_path
+ end
+
+ private def default_inputrc_path
+ @default_inputrc_path ||= inputrc_path
+ end
+
def read(file = nil)
- file ||= File.expand_path(ENV['INPUTRC'] || DEFAULT_PATH)
+ file ||= default_inputrc_path
begin
if file.respond_to?(:readlines)
lines = file.readlines
@@ -103,19 +150,46 @@ class Reline::Config
end
def key_bindings
- # override @default_key_bindings with @additional_key_bindings
- @default_key_bindings.merge(@additional_key_bindings)
+ # The key bindings for each editing mode will be overwritten by the user-defined ones.
+ kb = @key_actors[@editing_mode_label].default_key_bindings.dup
+ kb.merge!(@additional_key_bindings[@editing_mode_label])
+ kb.merge!(@oneshot_key_bindings)
+ kb
+ end
+
+ def add_oneshot_key_binding(keystroke, target)
+ @oneshot_key_bindings[keystroke] = target
+ end
+
+ def reset_oneshot_key_bindings
+ @oneshot_key_bindings.clear
+ end
+
+ def add_default_key_binding_by_keymap(keymap, keystroke, target)
+ @key_actors[keymap].default_key_bindings[keystroke] = target
end
def add_default_key_binding(keystroke, target)
- @default_key_bindings[keystroke] = target
+ @key_actors[@keymap_label].default_key_bindings[keystroke] = target
end
def reset_default_key_bindings
- @default_key_bindings = {}
+ @key_actors.values.each do |ka|
+ ka.reset_default_key_bindings
+ end
end
def read_lines(lines, file = nil)
+ if not lines.empty? and lines.first.encoding != Reline.encoding_system_needs
+ begin
+ lines = lines.map do |l|
+ l.encode(Reline.encoding_system_needs)
+ rescue Encoding::UndefinedConversionError
+ mes = "The inputrc encoded in #{lines.first.encoding.name} can't be converted to the locale #{Reline.encoding_system_needs.name}."
+ raise Reline::ConfigEncodingConversionError.new(mes)
+ end
+ end
+ end
conditions = [@skip_section, @if_stack]
@skip_section = nil
@if_stack = []
@@ -135,14 +209,14 @@ class Reline::Config
case line
when /^set +([^ ]+) +([^ ]+)/i
- var, value = $1.downcase, $2.downcase
+ var, value = $1.downcase, $2
bind_variable(var, value)
next
when /\s*("#{KEYSEQ_PATTERN}+")\s*:\s*(.*)\s*$/o
key, func_name = $1, $2
keystroke, func = bind_key(key, func_name)
next unless keystroke
- @additional_key_bindings[keystroke] = func
+ @additional_key_bindings[@keymap_label][@keymap_prefix + keystroke] = func
end
end
unless @if_stack.empty?
@@ -184,9 +258,12 @@ class Reline::Config
def bind_variable(name, value)
case name
- when *VARIABLE_NAMES then
- variable_name = :"@#{name.tr(?-, ?_)}"
- instance_variable_set(variable_name, value.nil? || value == '1' || value == 'on')
+ when 'history-size'
+ begin
+ @history_size = Integer(value)
+ rescue ArgumentError
+ @history_size = 500
+ end
when 'bell-style'
@bell_style =
case value
@@ -204,30 +281,64 @@ class Reline::Config
when 'completion-query-items'
@completion_query_items = value.to_i
when 'isearch-terminators'
- @isearch_terminators = instance_eval(value)
+ @isearch_terminators = retrieve_string(value)
when 'editing-mode'
case value
when 'emacs'
@editing_mode_label = :emacs
@keymap_label = :emacs
+ @keymap_prefix = []
when 'vi'
@editing_mode_label = :vi_insert
@keymap_label = :vi_insert
+ @keymap_prefix = []
end
when 'keymap'
case value
- when 'emacs', 'emacs-standard', 'emacs-meta', 'emacs-ctlx'
+ when 'emacs', 'emacs-standard'
+ @keymap_label = :emacs
+ @keymap_prefix = []
+ when 'emacs-ctlx'
+ @keymap_label = :emacs
+ @keymap_prefix = [?\C-x.ord]
+ when 'emacs-meta'
@keymap_label = :emacs
+ @keymap_prefix = [?\e.ord]
when 'vi', 'vi-move', 'vi-command'
@keymap_label = :vi_command
+ @keymap_prefix = []
when 'vi-insert'
@keymap_label = :vi_insert
+ @keymap_prefix = []
end
when 'keyseq-timeout'
@keyseq_timeout = value.to_i
+ when 'show-mode-in-prompt'
+ case value
+ when 'off'
+ @show_mode_in_prompt = false
+ when 'on'
+ @show_mode_in_prompt = true
+ else
+ @show_mode_in_prompt = false
+ end
+ when 'vi-cmd-mode-string'
+ @vi_cmd_mode_string = retrieve_string(value)
+ when 'vi-ins-mode-string'
+ @vi_ins_mode_string = retrieve_string(value)
+ when 'emacs-mode-string'
+ @emacs_mode_string = retrieve_string(value)
+ when *VARIABLE_NAMES then
+ variable_name = :"@#{name.tr(?-, ?_)}"
+ instance_variable_set(variable_name, value.nil? || value == '1' || value == 'on')
end
end
+ def retrieve_string(str)
+ str = $1 if str =~ /\A"(.*)"\z/
+ parse_keyseq(str).map { |c| c.chr(Reline.encoding_system_needs) }.join
+ end
+
def bind_key(key, func_name)
if key =~ /\A"(.*)"\z/
keyseq = parse_keyseq($1)
@@ -283,4 +394,8 @@ class Reline::Config
end
ret
end
+
+ private def seven_bit_encoding?(encoding)
+ encoding == Encoding::US_ASCII
+ end
end
diff --git a/lib/reline/general_io.rb b/lib/reline/general_io.rb
index 291c14c7b3..92c76cbba1 100644
--- a/lib/reline/general_io.rb
+++ b/lib/reline/general_io.rb
@@ -1,9 +1,31 @@
require 'timeout'
+require 'io/wait'
class Reline::GeneralIO
- RAW_KEYSTROKE_CONFIG = {}
+ def self.reset(encoding: nil)
+ @@pasting = false
+ @@encoding = encoding
+ end
+
+ def self.encoding
+ if defined?(@@encoding)
+ @@encoding
+ elsif RUBY_PLATFORM =~ /mswin|mingw/
+ Encoding::UTF_8
+ else
+ Encoding::default_external
+ end
+ end
+
+ def self.win?
+ false
+ end
+
+ def self.set_default_key_bindings(_)
+ end
@@buf = []
+ @@input = STDIN
def self.input=(val)
@@input = val
@@ -15,7 +37,7 @@ class Reline::GeneralIO
end
c = nil
loop do
- result = select([@@input], [], [], 0.1)
+ result = @@input.wait_readable(0.1)
next if result.nil?
c = @@input.read(1)
break
@@ -35,6 +57,12 @@ class Reline::GeneralIO
Reline::CursorPos.new(1, 1)
end
+ def self.hide_cursor
+ end
+
+ def self.show_cursor
+ end
+
def self.move_cursor_column(val)
end
@@ -59,6 +87,20 @@ class Reline::GeneralIO
def self.set_winch_handler(&handler)
end
+ @@pasting = false
+
+ def self.in_pasting?
+ @@pasting
+ end
+
+ def self.start_pasting
+ @@pasting = true
+ end
+
+ def self.finish_pasting
+ @@pasting = false
+ end
+
def self.prep
end
diff --git a/lib/reline/history.rb b/lib/reline/history.rb
index 238fcf2a76..7a1ed6b90b 100644
--- a/lib/reline/history.rb
+++ b/lib/reline/history.rb
@@ -19,7 +19,7 @@ class Reline::History < Array
def []=(index, val)
index = check_index(index)
- super(index, String.new(val, encoding: Encoding::default_external))
+ super(index, String.new(val, encoding: Reline.encoding_system_needs))
end
def concat(*val)
@@ -29,27 +29,47 @@ class Reline::History < Array
end
def push(*val)
- diff = size + val.size - @config.history_size
- if diff > 0
- if diff <= size
- shift(diff)
- else
- diff -= size
- clear
- val.shift(diff)
+ # If history_size is zero, all histories are dropped.
+ return self if @config.history_size.zero?
+ # If history_size is negative, history size is unlimited.
+ if @config.history_size.positive?
+ diff = size + val.size - @config.history_size
+ if diff > 0
+ if diff <= size
+ shift(diff)
+ else
+ diff -= size
+ clear
+ val.shift(diff)
+ end
end
end
- super(*(val.map{ |v| String.new(v, encoding: Encoding::default_external) }))
+ super(*(val.map{ |v|
+ String.new(v, encoding: Reline.encoding_system_needs)
+ }))
end
def <<(val)
- shift if size + 1 > @config.history_size
- super(String.new(val, encoding: Encoding::default_external))
+ # If history_size is zero, all histories are dropped.
+ return self if @config.history_size.zero?
+ # If history_size is negative, history size is unlimited.
+ if @config.history_size.positive?
+ shift if size + 1 > @config.history_size
+ end
+ super(String.new(val, encoding: Reline.encoding_system_needs))
end
private def check_index(index)
index += size if index < 0
- raise RangeError.new("index=<#{index}>") if index < -@config.history_size or @config.history_size < index
+ if index < -2147483648 or 2147483647 < index
+ raise RangeError.new("integer #{index} too big to convert to `int'")
+ end
+ # If history_size is negative, history size is unlimited.
+ if @config.history_size.positive?
+ if index < -@config.history_size or @config.history_size < index
+ raise RangeError.new("index=<#{index}>")
+ end
+ end
raise IndexError.new("index=<#{index}>") if index < 0 or size <= index
index
end
diff --git a/lib/reline/key_actor/base.rb b/lib/reline/key_actor/base.rb
index f4abac55d4..a1cd7fb2a1 100644
--- a/lib/reline/key_actor/base.rb
+++ b/lib/reline/key_actor/base.rb
@@ -4,4 +4,16 @@ class Reline::KeyActor::Base
def get_method(key)
self.class::MAPPING[key]
end
+
+ def initialize
+ @default_key_bindings = {}
+ end
+
+ def default_key_bindings
+ @default_key_bindings
+ end
+
+ def reset_default_key_bindings
+ @default_key_bindings.clear
+ end
end
diff --git a/lib/reline/key_actor/emacs.rb b/lib/reline/key_actor/emacs.rb
index 3886d17f22..a561feee57 100644
--- a/lib/reline/key_actor/emacs.rb
+++ b/lib/reline/key_actor/emacs.rb
@@ -37,13 +37,13 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 17 ^Q
:ed_quoted_insert,
# 18 ^R
- :ed_search_prev_history,
+ :vi_search_prev,
# 19 ^S
- :ed_search_next_history,
+ :vi_search_next,
# 20 ^T
:ed_transpose_chars,
# 21 ^U
- :em_kill_line,
+ :unix_line_discard,
# 22 ^V
:ed_quoted_insert,
# 23 ^W
@@ -307,7 +307,7 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 152 M-^X
:ed_unassigned,
# 153 M-^Y
- :ed_unassigned,
+ :em_yank_pop,
# 154 M-^Z
:ed_unassigned,
# 155 M-^[
@@ -413,11 +413,11 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 205 M-M
:ed_unassigned,
# 206 M-N
- :ed_search_next_history,
+ :vi_search_next,
# 207 M-O
:ed_sequence_lead_in,
# 208 M-P
- :ed_search_prev_history,
+ :vi_search_prev,
# 209 M-Q
:ed_unassigned,
# 210 M-R
@@ -477,11 +477,11 @@ class Reline::KeyActor::Emacs < Reline::KeyActor::Base
# 237 M-m
:ed_unassigned,
# 238 M-n
- :ed_search_next_history,
+ :vi_search_next,
# 239 M-o
:ed_unassigned,
# 240 M-p
- :ed_search_prev_history,
+ :vi_search_prev,
# 241 M-q
:ed_unassigned,
# 242 M-r
diff --git a/lib/reline/key_actor/vi_command.rb b/lib/reline/key_actor/vi_command.rb
index 865dfa2e00..98146d2f77 100644
--- a/lib/reline/key_actor/vi_command.rb
+++ b/lib/reline/key_actor/vi_command.rb
@@ -17,7 +17,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base
# 7 ^G
:ed_unassigned,
# 8 ^H
- :ed_delete_prev_char,
+ :ed_unassigned,
# 9 ^I
:ed_unassigned,
# 10 ^J
@@ -37,7 +37,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base
# 17 ^Q
:ed_ignore,
# 18 ^R
- :ed_search_prev_history,
+ :vi_search_prev,
# 19 ^S
:ed_ignore,
# 20 ^T
@@ -151,7 +151,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base
# 74 J
:vi_join_lines,
# 75 K
- :ed_search_prev_history,
+ :vi_search_prev,
# 76 L
:ed_unassigned,
# 77 M
@@ -255,7 +255,7 @@ class Reline::KeyActor::ViCommand < Reline::KeyActor::Base
# 126 ~
:vi_change_case,
# 127 ^?
- :ed_delete_prev_char,
+ :ed_unassigned,
# 128 M-^@
:ed_unassigned,
# 129 M-^A
diff --git a/lib/reline/key_actor/vi_insert.rb b/lib/reline/key_actor/vi_insert.rb
index 06e94a9c30..b8e89f81d8 100644
--- a/lib/reline/key_actor/vi_insert.rb
+++ b/lib/reline/key_actor/vi_insert.rb
@@ -37,9 +37,9 @@ class Reline::KeyActor::ViInsert < Reline::KeyActor::Base
# 17 ^Q
:ed_ignore,
# 18 ^R
- :ed_search_prev_history,
+ :vi_search_prev,
# 19 ^S
- :ed_search_next_history,
+ :vi_search_next,
# 20 ^T
:ed_insert,
# 21 ^U
diff --git a/lib/reline/key_stroke.rb b/lib/reline/key_stroke.rb
index 83136edcf8..c1c61513a9 100644
--- a/lib/reline/key_stroke.rb
+++ b/lib/reline/key_stroke.rb
@@ -1,38 +1,88 @@
class Reline::KeyStroke
- using Module.new {
- refine Array do
- def start_with?(other)
- other.size <= size && other == self.take(other.size)
+ def initialize(config)
+ @config = config
+ end
+
+ def compress_meta_key(ary)
+ return ary unless @config.convert_meta
+ ary.inject([]) { |result, key|
+ if result.size > 0 and result.last == "\e".ord
+ result[result.size - 1] = Reline::Key.new(key, key | 0b10000000, true)
+ else
+ result << key
end
+ result
+ }
+ end
- def bytes
- self
+ def start_with?(me, other)
+ compressed_me = compress_meta_key(me)
+ compressed_other = compress_meta_key(other)
+ i = 0
+ loop do
+ my_c = compressed_me[i]
+ other_c = compressed_other[i]
+ other_is_last = (i + 1) == compressed_other.size
+ me_is_last = (i + 1) == compressed_me.size
+ if my_c != other_c
+ if other_c == "\e".ord and other_is_last and my_c.is_a?(Reline::Key) and my_c.with_meta
+ return true
+ else
+ return false
+ end
+ elsif other_is_last
+ return true
+ elsif me_is_last
+ return false
end
+ i += 1
end
- }
+ end
- def initialize(config)
- @config = config
+ def equal?(me, other)
+ case me
+ when Array
+ compressed_me = compress_meta_key(me)
+ compressed_other = compress_meta_key(other)
+ compressed_me.size == compressed_other.size and [compressed_me, compressed_other].transpose.all?{ |i| equal?(i[0], i[1]) }
+ when Integer
+ if other.is_a?(Reline::Key)
+ if other.combined_char == "\e".ord
+ false
+ else
+ other.combined_char == me
+ end
+ else
+ me == other
+ end
+ when Reline::Key
+ if other.is_a?(Integer)
+ me.combined_char == other
+ else
+ me == other
+ end
+ end
end
def match_status(input)
key_mapping.keys.select { |lhs|
- lhs.start_with? input
+ start_with?(lhs, input)
}.tap { |it|
- return :matched if it.size == 1 && (it.max_by(&:size)&.size&.== input.size)
- return :matching if it.size == 1 && (it.max_by(&:size)&.size&.!= input.size)
+ return :matched if it.size == 1 && equal?(it[0], input)
+ return :matching if it.size == 1 && !equal?(it[0], input)
return :matched if it.max_by(&:size)&.size&.< input.size
return :matching if it.size > 1
}
key_mapping.keys.select { |lhs|
- input.start_with? lhs
+ start_with?(input, lhs)
}.tap { |it|
return it.size > 0 ? :matched : :unmatched
}
end
def expand(input)
- lhs = key_mapping.keys.select { |item| input.start_with? item }.sort_by(&:size).reverse.first
+ input = compress_meta_key(input)
+ lhs = key_mapping.keys.select { |item| start_with?(input, item) }.sort_by(&:size).last
return input unless lhs
rhs = key_mapping[lhs]
@@ -42,6 +92,8 @@ class Reline::KeyStroke
expand(expand(rhs_bytes) + expand(input.drop(lhs.size)))
when Symbol
[rhs] + expand(input.drop(lhs.size))
+ when Array
+ rhs
end
end
diff --git a/lib/reline/kill_ring.rb b/lib/reline/kill_ring.rb
index 842fd04697..bb3684b42b 100644
--- a/lib/reline/kill_ring.rb
+++ b/lib/reline/kill_ring.rb
@@ -1,4 +1,6 @@
class Reline::KillRing
+ include Enumerable
+
module State
FRESH = :fresh
CONTINUED = :continued
@@ -110,4 +112,14 @@ class Reline::KillRing
nil
end
end
+
+ def each
+ start = head = @ring.head
+ loop do
+ break if head.nil?
+ yield head.str
+ head = head.backward
+ break if head == start
+ end
+ end
end
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 721d50b746..8153aaba05 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -2,10 +2,10 @@ require 'reline/kill_ring'
require 'reline/unicode'
require 'tempfile'
-require 'pathname'
class Reline::LineEditor
# TODO: undo
+ # TODO: Use "private alias_method" idiom after drop Ruby 2.5.
attr_reader :line
attr_reader :byte_pointer
attr_accessor :confirm_multiline_termination_proc
@@ -51,19 +51,49 @@ class Reline::LineEditor
CompletionJourneyData = Struct.new('CompletionJourneyData', :preposing, :postposing, :list, :pointer)
MenuInfo = Struct.new('MenuInfo', :target, :list)
- CSI_REGEXP = /\e\[[\d;]*[ABCDEFGHJKSTfminsuhl]/
- OSC_REGEXP = /\e\]\d+(?:;[^;]+)*\a/
- NON_PRINTING_START = "\1"
- NON_PRINTING_END = "\2"
- WIDTH_SCANNER = /\G(?:#{NON_PRINTING_START}|#{NON_PRINTING_END}|#{CSI_REGEXP}|#{OSC_REGEXP}|\X)/
+ PROMPT_LIST_CACHE_TIMEOUT = 0.5
- def initialize(config)
+ def initialize(config, encoding)
@config = config
@completion_append_character = ''
- reset_variables
+ reset_variables(encoding: encoding)
end
- private def check_multiline_prompt(buffer, prompt)
+ def set_pasting_state(in_pasting)
+ @in_pasting = in_pasting
+ end
+
+ def simplified_rendering?
+ if finished?
+ false
+ elsif @just_cursor_moving and not @rerender_all
+ true
+ else
+ not @rerender_all and not finished? and @in_pasting
+ end
+ end
+
+ private def check_mode_string
+ mode_string = nil
+ if @config.show_mode_in_prompt
+ if @config.editing_mode_is?(:vi_command)
+ mode_string = @config.vi_cmd_mode_string
+ elsif @config.editing_mode_is?(:vi_insert)
+ mode_string = @config.vi_ins_mode_string
+ elsif @config.editing_mode_is?(:emacs)
+ mode_string = @config.emacs_mode_string
+ else
+ mode_string = '?'
+ end
+ end
+ if mode_string != @prev_mode_string
+ @rerender_all = true
+ end
+ @prev_mode_string = mode_string
+ mode_string
+ end
+
+ private def check_multiline_prompt(buffer)
if @vi_arg
prompt = "(arg: #{@vi_arg}) "
@rerender_all = true
@@ -73,74 +103,164 @@ class Reline::LineEditor
else
prompt = @prompt
end
+ if simplified_rendering?
+ mode_string = check_mode_string
+ prompt = mode_string + prompt if mode_string
+ return [prompt, calculate_width(prompt, true), [prompt] * buffer.size]
+ end
if @prompt_proc
- prompt_list = @prompt_proc.(buffer)
+ use_cached_prompt_list = false
+ if @cached_prompt_list
+ if @just_cursor_moving
+ use_cached_prompt_list = true
+ elsif Time.now.to_f < (@prompt_cache_time + PROMPT_LIST_CACHE_TIMEOUT) and buffer.size == @cached_prompt_list.size
+ use_cached_prompt_list = true
+ end
+ end
+ use_cached_prompt_list = false if @rerender_all
+ if use_cached_prompt_list
+ prompt_list = @cached_prompt_list
+ else
+ prompt_list = @cached_prompt_list = @prompt_proc.(buffer).map { |pr| pr.gsub("\n", "\\n") }
+ @prompt_cache_time = Time.now.to_f
+ end
prompt_list.map!{ prompt } if @vi_arg or @searching_prompt
+ prompt_list = [prompt] if prompt_list.empty?
+ mode_string = check_mode_string
+ prompt_list = prompt_list.map{ |pr| mode_string + pr } if mode_string
prompt = prompt_list[@line_index]
+ prompt = prompt_list[0] if prompt.nil?
+ prompt = prompt_list.last if prompt.nil?
+ if buffer.size > prompt_list.size
+ (buffer.size - prompt_list.size).times do
+ prompt_list << prompt_list.last
+ end
+ end
prompt_width = calculate_width(prompt, true)
[prompt, prompt_width, prompt_list]
else
+ mode_string = check_mode_string
+ prompt = mode_string + prompt if mode_string
prompt_width = calculate_width(prompt, true)
[prompt, prompt_width, nil]
end
end
- def reset(prompt = '', encoding = Encoding.default_external)
+ def reset(prompt = '', encoding:)
@rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y
@screen_size = Reline::IOGate.get_screen_size
- reset_variables(prompt, encoding)
- @old_trap = Signal.trap('SIGINT') {
- @old_trap.call if @old_trap.respond_to?(:call) # can also be string, ex: "DEFAULT"
- raise Interrupt
- }
+ @screen_height = @screen_size.first
+ reset_variables(prompt, encoding: encoding)
Reline::IOGate.set_winch_handler do
- @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y
- old_screen_size = @screen_size
- @screen_size = Reline::IOGate.get_screen_size
- if old_screen_size.last < @screen_size.last # columns increase
- @rerender_all = true
- rerender
- else
- back = 0
- new_buffer = whole_lines
- prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer, prompt)
- new_buffer.each_with_index do |line, index|
- prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc
- width = prompt_width + calculate_width(line)
- height = calculate_height_by_width(width)
- back += height
- end
- @highest_in_all = back
- @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
- @first_line_started_from =
- if @line_index.zero?
- 0
- else
- calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list)
- end
- if @prompt_proc
- prompt = prompt_list[@line_index]
- prompt_width = calculate_width(prompt, true)
+ @resized = true
+ end
+ if ENV.key?('RELINE_ALT_SCROLLBAR')
+ @full_block = '::'
+ @upper_half_block = "''"
+ @lower_half_block = '..'
+ @block_elem_width = 2
+ elsif Reline::IOGate.win?
+ @full_block = 'â–ˆ'
+ @upper_half_block = 'â–€'
+ @lower_half_block = 'â–„'
+ @block_elem_width = 1
+ elsif @encoding == Encoding::UTF_8
+ @full_block = 'â–ˆ'
+ @upper_half_block = 'â–€'
+ @lower_half_block = 'â–„'
+ @block_elem_width = Reline::Unicode.calculate_width('â–ˆ')
+ else
+ @full_block = '::'
+ @upper_half_block = "''"
+ @lower_half_block = '..'
+ @block_elem_width = 2
+ end
+ end
+
+ def resize
+ return unless @resized
+ @resized = false
+ @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y
+ old_screen_size = @screen_size
+ @screen_size = Reline::IOGate.get_screen_size
+ @screen_height = @screen_size.first
+ if old_screen_size.last < @screen_size.last # columns increase
+ @rerender_all = true
+ rerender
+ else
+ back = 0
+ new_buffer = whole_lines
+ prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer)
+ new_buffer.each_with_index do |line, index|
+ prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc
+ width = prompt_width + calculate_width(line)
+ height = calculate_height_by_width(width)
+ back += height
+ end
+ @highest_in_all = back
+ @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
+ @first_line_started_from =
+ if @line_index.zero?
+ 0
+ else
+ calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt)
end
- calculate_nearest_cursor
- @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
- Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
- @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
- @rerender_all = true
+ if @prompt_proc
+ prompt = prompt_list[@line_index]
+ prompt_width = calculate_width(prompt, true)
+ end
+ calculate_nearest_cursor
+ @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
+ @rerender_all = true
+ end
+ end
+
+ def set_signal_handlers
+ @old_trap = Signal.trap('INT') {
+ clear_dialog
+ if @scroll_partial_screen
+ move_cursor_down(@screen_height - (@line_index - @scroll_partial_screen) - 1)
+ else
+ move_cursor_down(@highest_in_all - @line_index - 1)
+ end
+ Reline::IOGate.move_cursor_column(0)
+ scroll_down(1)
+ case @old_trap
+ when 'DEFAULT', 'SYSTEM_DEFAULT'
+ raise Interrupt
+ when 'IGNORE'
+ # Do nothing
+ when 'EXIT'
+ exit
+ else
+ @old_trap.call if @old_trap.respond_to?(:call)
end
+ }
+ begin
+ @old_tstp_trap = Signal.trap('TSTP') {
+ Reline::IOGate.ungetc("\C-z".ord)
+ @old_tstp_trap.call if @old_tstp_trap.respond_to?(:call)
+ }
+ rescue ArgumentError
end
end
def finalize
- Signal.trap('SIGINT', @old_trap)
+ Signal.trap('INT', @old_trap)
+ begin
+ Signal.trap('TSTP', @old_tstp_trap)
+ rescue ArgumentError
+ end
end
def eof?
@eof
end
- def reset_variables(prompt = '', encoding = Encoding.default_external)
- @prompt = prompt
+ def reset_variables(prompt = '', encoding:)
+ @prompt = prompt.gsub("\n", "\\n")
@mark_pointer = nil
@encoding = encoding
@is_multiline = false
@@ -148,11 +268,12 @@ class Reline::LineEditor
@cleared = false
@rerender_all = false
@history_pointer = nil
- @kill_ring = Reline::KillRing.new
+ @kill_ring ||= Reline::KillRing.new
@vi_clipboard = ''
@vi_arg = nil
@waiting_proc = nil
@waiting_operator_proc = nil
+ @waiting_operator_vi_arg = nil
@completion_journey_data = nil
@completion_state = CompletionState::NORMAL
@perfect_matched = nil
@@ -160,7 +281,20 @@ class Reline::LineEditor
@first_prompt = true
@searching_prompt = nil
@first_char = true
+ @add_newline_to_end_of_buffer = false
+ @just_cursor_moving = nil
+ @cached_prompt_list = nil
+ @prompt_cache_time = nil
@eof = false
+ @continuous_insertion_buffer = String.new(encoding: @encoding)
+ @scroll_partial_screen = nil
+ @prev_mode_string = nil
+ @drop_terminate_spaces = false
+ @in_pasting = false
+ @auto_indent_proc = nil
+ @dialogs = []
+ @last_key = nil
+ @resized = false
reset_line
end
@@ -190,10 +324,10 @@ class Reline::LineEditor
@is_multiline = false
end
- private def calculate_height_by_lines(lines, prompt_list)
+ private def calculate_height_by_lines(lines, prompt)
result = 0
+ prompt_list = prompt.is_a?(Array) ? prompt : nil
lines.each_with_index { |line, i|
- prompt = ''
prompt = prompt_list[i] if prompt_list and prompt_list[i]
result += calculate_height_by_width(calculate_width(prompt, true) + calculate_width(line))
}
@@ -205,46 +339,15 @@ class Reline::LineEditor
@buffer_of_lines.insert(@line_index + 1, String.new(next_line, encoding: @encoding))
@previous_line_index = @line_index
@line_index += 1
+ @just_cursor_moving = false
end
private def calculate_height_by_width(width)
width.div(@screen_size.last) + 1
end
- private def split_by_width(prompt, str, max_width)
- lines = [String.new(encoding: @encoding)]
- height = 1
- width = 0
- rest = "#{prompt}#{str}".encode(Encoding::UTF_8)
- in_zero_width = false
- rest.scan(WIDTH_SCANNER) do |gc|
- case gc
- when NON_PRINTING_START
- in_zero_width = true
- when NON_PRINTING_END
- in_zero_width = false
- when CSI_REGEXP, OSC_REGEXP
- lines.last << gc
- else
- unless in_zero_width
- mbchar_width = Reline::Unicode.get_mbchar_width(gc)
- if (width += mbchar_width) > max_width
- width = mbchar_width
- lines << nil
- lines << String.new(encoding: @encoding)
- height += 1
- end
- end
- lines.last << gc
- end
- end
- # The cursor moves to next line in first
- if width == max_width
- lines << nil
- lines << String.new(encoding: @encoding)
- height += 1
- end
- [lines, height]
+ private def split_by_width(str, max_width)
+ Reline::Unicode.split_by_width(str, max_width, @encoding)
end
private def scroll_down(val)
@@ -277,28 +380,29 @@ class Reline::LineEditor
end
end
- private def calculate_nearest_cursor
- @cursor_max = calculate_width(line)
+ private def calculate_nearest_cursor(line_to_calc = @line, cursor = @cursor, started_from = @started_from, byte_pointer = @byte_pointer, update = true)
+ new_cursor_max = calculate_width(line_to_calc)
new_cursor = 0
new_byte_pointer = 0
height = 1
max_width = @screen_size.last
if @config.editing_mode_is?(:vi_command)
- last_byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @line.bytesize)
+ last_byte_size = Reline::Unicode.get_prev_mbchar_size(line_to_calc, line_to_calc.bytesize)
if last_byte_size > 0
- last_mbchar = @line.byteslice(@line.bytesize - last_byte_size, last_byte_size)
+ last_mbchar = line_to_calc.byteslice(line_to_calc.bytesize - last_byte_size, last_byte_size)
last_width = Reline::Unicode.get_mbchar_width(last_mbchar)
- cursor_max = @cursor_max - last_width
+ end_of_line_cursor = new_cursor_max - last_width
else
- cursor_max = @cursor_max
+ end_of_line_cursor = new_cursor_max
end
else
- cursor_max = @cursor_max
+ end_of_line_cursor = new_cursor_max
end
- @line.encode(Encoding::UTF_8).grapheme_clusters.each do |gc|
- mbchar_width = Reline::Unicode.get_mbchar_width(gc)
+ line_to_calc.grapheme_clusters.each do |gc|
+ mbchar = gc.encode(Encoding::UTF_8)
+ mbchar_width = Reline::Unicode.get_mbchar_width(mbchar)
now = new_cursor + mbchar_width
- if now > cursor_max or now > @cursor
+ if now > end_of_line_cursor or now > cursor
break
end
new_cursor += mbchar_width
@@ -307,9 +411,21 @@ class Reline::LineEditor
end
new_byte_pointer += gc.bytesize
end
- @started_from = height - 1
- @cursor = new_cursor
- @byte_pointer = new_byte_pointer
+ new_started_from = height - 1
+ if update
+ @cursor = new_cursor
+ @cursor_max = new_cursor_max
+ @started_from = new_started_from
+ @byte_pointer = new_byte_pointer
+ else
+ [new_cursor, new_cursor_max, new_started_from, new_byte_pointer]
+ end
+ end
+
+ def rerender_all
+ @rerender_all = true
+ process_insert(force: true)
+ rerender
end
def rerender
@@ -317,178 +433,741 @@ class Reline::LineEditor
if @menu_info
scroll_down(@highest_in_all - @first_line_started_from)
@rerender_all = true
- @menu_info.list.each do |item|
- Reline::IOGate.move_cursor_column(0)
- @output.print item
- @output.flush
- scroll_down(1)
- end
- scroll_down(@highest_in_all - 1)
- move_cursor_up(@highest_in_all - 1 - @first_line_started_from)
+ end
+ if @menu_info
+ show_menu
@menu_info = nil
end
- prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines, prompt)
+ prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines)
if @cleared
- Reline::IOGate.clear_screen
+ clear_screen_buffer(prompt, prompt_list, prompt_width)
@cleared = false
- back = 0
- modify_lines(whole_lines).each_with_index do |line, index|
- if @prompt_proc
- pr = prompt_list[index]
- height = render_partial(pr, calculate_width(pr), line, false)
- else
- height = render_partial(prompt, prompt_width, line, false)
- end
- if index < (@buffer_of_lines.size - 1)
- move_cursor_down(height)
- back += height
- end
- end
- move_cursor_up(back)
- move_cursor_down(@first_line_started_from + @started_from)
- Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
return
end
- new_highest_in_this = calculate_height_by_width(prompt_width + calculate_width(@line.nil? ? '' : @line))
- # FIXME: end of logical line sometimes breaks
- if @previous_line_index or new_highest_in_this != @highest_in_this
+ if @is_multiline and finished? and @scroll_partial_screen
+ # Re-output all code higher than the screen when finished.
+ Reline::IOGate.move_cursor_up(@first_line_started_from + @started_from - @scroll_partial_screen)
+ Reline::IOGate.move_cursor_column(0)
+ @scroll_partial_screen = nil
+ prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines)
if @previous_line_index
new_lines = whole_lines(index: @previous_line_index, line: @line)
else
new_lines = whole_lines
end
- prompt, prompt_width, prompt_list = check_multiline_prompt(new_lines, prompt)
- all_height = calculate_height_by_lines(new_lines, prompt_list)
- diff = all_height - @highest_in_all
- move_cursor_down(@highest_in_all - @first_line_started_from - @started_from - 1)
- if diff > 0
- scroll_down(diff)
- move_cursor_up(all_height - 1)
- elsif diff < 0
- (-diff).times do
- Reline::IOGate.move_cursor_column(0)
- Reline::IOGate.erase_after_cursor
- move_cursor_up(1)
- end
- move_cursor_up(all_height - 1)
+ modify_lines(new_lines).each_with_index do |line, index|
+ @output.write "#{prompt_list ? prompt_list[index] : prompt}#{line}\n"
+ Reline::IOGate.erase_after_cursor
+ end
+ @output.flush
+ clear_dialog
+ return
+ end
+ new_highest_in_this = calculate_height_by_width(prompt_width + calculate_width(@line.nil? ? '' : @line))
+ rendered = false
+ if @add_newline_to_end_of_buffer
+ clear_dialog_with_content
+ rerender_added_newline(prompt, prompt_width)
+ @add_newline_to_end_of_buffer = false
+ else
+ if @just_cursor_moving and not @rerender_all
+ clear_dialog_with_content
+ rendered = just_move_cursor
+ @just_cursor_moving = false
+ return
+ elsif @previous_line_index or new_highest_in_this != @highest_in_this
+ clear_dialog_with_content
+ rerender_changed_current_line
+ @previous_line_index = nil
+ rendered = true
+ elsif @rerender_all
+ rerender_all_lines
+ @rerender_all = false
+ rendered = true
else
- move_cursor_up(all_height - 1)
end
- @highest_in_all = all_height
- back = 0
- modify_lines(new_lines).each_with_index do |line, index|
- if @prompt_proc
- prompt = prompt_list[index]
- prompt_width = calculate_width(prompt, true)
- end
- height = render_partial(prompt, prompt_width, line, false)
- if index < (new_lines.size - 1)
- scroll_down(1)
- back += height
+ end
+ if @is_multiline
+ if finished?
+ # Always rerender on finish because output_modifier_proc may return a different output.
+ if @previous_line_index
+ new_lines = whole_lines(index: @previous_line_index, line: @line)
else
- back += height - 1
+ new_lines = whole_lines
+ end
+ line = modify_lines(new_lines)[@line_index]
+ clear_dialog
+ prompt, prompt_width, prompt_list = check_multiline_prompt(new_lines)
+ render_partial(prompt, prompt_width, line, @first_line_started_from)
+ move_cursor_down(@highest_in_all - (@first_line_started_from + @highest_in_this - 1) - 1)
+ scroll_down(1)
+ Reline::IOGate.move_cursor_column(0)
+ Reline::IOGate.erase_after_cursor
+ else
+ if not rendered and not @in_pasting
+ line = modify_lines(whole_lines)[@line_index]
+ prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines)
+ render_partial(prompt, prompt_width, line, @first_line_started_from)
end
+ render_dialog((prompt_width + @cursor) % @screen_size.last)
end
- move_cursor_up(back)
- if @previous_line_index
- @buffer_of_lines[@previous_line_index] = @line
- @line = @buffer_of_lines[@line_index]
+ @buffer_of_lines[@line_index] = @line
+ @rest_height = 0 if @scroll_partial_screen
+ else
+ line = modify_lines(whole_lines)[@line_index]
+ render_partial(prompt, prompt_width, line, 0)
+ if finished?
+ scroll_down(1)
+ Reline::IOGate.move_cursor_column(0)
+ Reline::IOGate.erase_after_cursor
end
- @first_line_started_from =
- if @line_index.zero?
- 0
- else
- calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list)
+ end
+ end
+
+ class DialogProcScope
+ def initialize(line_editor, config, proc_to_exec, context)
+ @line_editor = line_editor
+ @config = config
+ @proc_to_exec = proc_to_exec
+ @context = context
+ @cursor_pos = Reline::CursorPos.new
+ end
+
+ def context
+ @context
+ end
+
+ def retrieve_completion_block(set_completion_quote_character = false)
+ @line_editor.retrieve_completion_block(set_completion_quote_character)
+ end
+
+ def call_completion_proc_with_checking_args(pre, target, post)
+ @line_editor.call_completion_proc_with_checking_args(pre, target, post)
+ end
+
+ def set_dialog(dialog)
+ @dialog = dialog
+ end
+
+ def dialog
+ @dialog
+ end
+
+ def set_cursor_pos(col, row)
+ @cursor_pos.x = col
+ @cursor_pos.y = row
+ end
+
+ def set_key(key)
+ @key = key
+ end
+
+ def key
+ @key
+ end
+
+ def cursor_pos
+ @cursor_pos
+ end
+
+ def just_cursor_moving
+ @line_editor.instance_variable_get(:@just_cursor_moving)
+ end
+
+ def screen_width
+ @line_editor.instance_variable_get(:@screen_size).last
+ end
+
+ def completion_journey_data
+ @line_editor.instance_variable_get(:@completion_journey_data)
+ end
+
+ def config
+ @config
+ end
+
+ def call
+ instance_exec(&@proc_to_exec)
+ end
+ end
+
+ class Dialog
+ attr_reader :name, :contents, :width
+ attr_accessor :scroll_top, :scrollbar_pos, :pointer, :column, :vertical_offset, :lines_backup, :trap_key
+
+ def initialize(name, config, proc_scope)
+ @name = name
+ @config = config
+ @proc_scope = proc_scope
+ @width = nil
+ @scroll_top = 0
+ @trap_key = nil
+ end
+
+ def set_cursor_pos(col, row)
+ @proc_scope.set_cursor_pos(col, row)
+ end
+
+ def width=(v)
+ @width = v
+ end
+
+ def contents=(contents)
+ @contents = contents
+ if contents and @width.nil?
+ @width = contents.map{ |line| Reline::Unicode.calculate_width(line, true) }.max
+ end
+ end
+
+ def call(key)
+ @proc_scope.set_dialog(self)
+ @proc_scope.set_key(key)
+ dialog_render_info = @proc_scope.call
+ if @trap_key
+ if @trap_key.any?{ |i| i.is_a?(Array) } # multiple trap
+ @trap_key.each do |t|
+ @config.add_oneshot_key_binding(t, @name)
+ end
+ elsif @trap_key.is_a?(Array)
+ @config.add_oneshot_key_binding(@trap_key, @name)
+ elsif @trap_key.is_a?(Integer) or @trap_key.is_a?(Reline::Key)
+ @config.add_oneshot_key_binding([@trap_key], @name)
end
- if @prompt_proc
- prompt = prompt_list[@line_index]
- prompt_width = calculate_width(prompt, true)
end
- move_cursor_down(@first_line_started_from)
- calculate_nearest_cursor
- @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
- move_cursor_down(@started_from)
- Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
- @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
- @previous_line_index = nil
- rendered = true
- elsif @rerender_all
- move_cursor_up(@first_line_started_from + @started_from)
- Reline::IOGate.move_cursor_column(0)
- back = 0
- new_buffer = whole_lines
- prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer, prompt)
- new_buffer.each_with_index do |line, index|
- prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc
- width = prompt_width + calculate_width(line)
- height = calculate_height_by_width(width)
- back += height
+ dialog_render_info
+ end
+ end
+
+ def add_dialog_proc(name, p, context = nil)
+ dialog = Dialog.new(name, @config, DialogProcScope.new(self, @config, p, context))
+ if index = @dialogs.find_index { |d| d.name == name }
+ @dialogs[index] = dialog
+ else
+ @dialogs << dialog
+ end
+ end
+
+ DIALOG_DEFAULT_HEIGHT = 20
+ private def render_dialog(cursor_column)
+ @dialogs.each do |dialog|
+ render_each_dialog(dialog, cursor_column)
+ end
+ end
+
+ private def padding_space_with_escape_sequences(str, width)
+ padding_width = width - calculate_width(str, true)
+ # padding_width should be only positive value. But macOS and Alacritty returns negative value.
+ padding_width = 0 if padding_width < 0
+ str + (' ' * padding_width)
+ end
+
+ private def render_each_dialog(dialog, cursor_column)
+ if @in_pasting
+ clear_each_dialog(dialog)
+ dialog.contents = nil
+ dialog.trap_key = nil
+ return
+ end
+ dialog.set_cursor_pos(cursor_column, @first_line_started_from + @started_from)
+ dialog_render_info = dialog.call(@last_key)
+ if dialog_render_info.nil? or dialog_render_info.contents.nil? or dialog_render_info.contents.empty?
+ dialog.lines_backup = {
+ lines: modify_lines(whole_lines),
+ line_index: @line_index,
+ first_line_started_from: @first_line_started_from,
+ started_from: @started_from,
+ byte_pointer: @byte_pointer
+ }
+ clear_each_dialog(dialog)
+ dialog.contents = nil
+ dialog.trap_key = nil
+ return
+ end
+ old_dialog = dialog.clone
+ dialog.contents = dialog_render_info.contents
+ pointer = dialog.pointer
+ if dialog_render_info.width
+ dialog.width = dialog_render_info.width
+ else
+ dialog.width = dialog.contents.map { |l| calculate_width(l, true) }.max
+ end
+ height = dialog_render_info.height || DIALOG_DEFAULT_HEIGHT
+ height = dialog.contents.size if dialog.contents.size < height
+ if dialog.contents.size > height
+ if dialog.pointer
+ if dialog.pointer < 0
+ dialog.scroll_top = 0
+ elsif (dialog.pointer - dialog.scroll_top) >= (height - 1)
+ dialog.scroll_top = dialog.pointer - (height - 1)
+ elsif (dialog.pointer - dialog.scroll_top) < 0
+ dialog.scroll_top = dialog.pointer
+ end
+ pointer = dialog.pointer - dialog.scroll_top
end
- if back > @highest_in_all
- scroll_down(back - 1)
- move_cursor_up(back - 1)
- elsif back < @highest_in_all
- scroll_down(back)
- Reline::IOGate.erase_after_cursor
- (@highest_in_all - back - 1).times do
- scroll_down(1)
- Reline::IOGate.erase_after_cursor
+ dialog.contents = dialog.contents[dialog.scroll_top, height]
+ end
+ if dialog.contents and dialog.scroll_top >= dialog.contents.size
+ dialog.scroll_top = dialog.contents.size - height
+ end
+ if dialog_render_info.scrollbar and dialog_render_info.contents.size > height
+ bar_max_height = height * 2
+ moving_distance = (dialog_render_info.contents.size - height) * 2
+ position_ratio = dialog.scroll_top.zero? ? 0.0 : ((dialog.scroll_top * 2).to_f / moving_distance)
+ bar_height = (bar_max_height * ((dialog.contents.size * 2).to_f / (dialog_render_info.contents.size * 2))).floor.to_i
+ dialog.scrollbar_pos = ((bar_max_height - bar_height) * position_ratio).floor.to_i
+ else
+ dialog.scrollbar_pos = nil
+ end
+ upper_space = @first_line_started_from - @started_from
+ dialog.column = dialog_render_info.pos.x
+ dialog.width += @block_elem_width if dialog.scrollbar_pos
+ diff = (dialog.column + dialog.width) - (@screen_size.last)
+ if diff > 0
+ dialog.column -= diff
+ end
+ if (@rest_height - dialog_render_info.pos.y) >= height
+ dialog.vertical_offset = dialog_render_info.pos.y + 1
+ elsif upper_space >= height
+ dialog.vertical_offset = dialog_render_info.pos.y - height
+ else
+ if (@rest_height - dialog_render_info.pos.y) < height
+ scroll_down(height + dialog_render_info.pos.y)
+ move_cursor_up(height + dialog_render_info.pos.y)
+ end
+ dialog.vertical_offset = dialog_render_info.pos.y + 1
+ end
+ Reline::IOGate.hide_cursor
+ if dialog.column < 0
+ dialog.column = 0
+ dialog.width = @screen_size.last
+ end
+ reset_dialog(dialog, old_dialog)
+ move_cursor_down(dialog.vertical_offset)
+ Reline::IOGate.move_cursor_column(dialog.column)
+ dialog.contents.each_with_index do |item, i|
+ if i == pointer
+ fg_color = dialog_render_info.pointer_fg_color
+ bg_color = dialog_render_info.pointer_bg_color
+ else
+ fg_color = dialog_render_info.fg_color
+ bg_color = dialog_render_info.bg_color
+ end
+ str_width = dialog.width - (dialog.scrollbar_pos.nil? ? 0 : @block_elem_width)
+ str = padding_space_with_escape_sequences(Reline::Unicode.take_range(item, 0, str_width), str_width)
+ @output.write "\e[#{bg_color}m\e[#{fg_color}m#{str}"
+ if dialog.scrollbar_pos and (dialog.scrollbar_pos != old_dialog.scrollbar_pos or dialog.column != old_dialog.column)
+ @output.write "\e[37m"
+ if dialog.scrollbar_pos <= (i * 2) and (i * 2 + 1) < (dialog.scrollbar_pos + bar_height)
+ @output.write @full_block
+ elsif dialog.scrollbar_pos <= (i * 2) and (i * 2) < (dialog.scrollbar_pos + bar_height)
+ @output.write @upper_half_block
+ elsif dialog.scrollbar_pos <= (i * 2 + 1) and (i * 2) < (dialog.scrollbar_pos + bar_height)
+ @output.write @lower_half_block
+ else
+ @output.write ' ' * @block_elem_width
end
- move_cursor_up(@highest_in_all - 1)
end
- modify_lines(new_buffer).each_with_index do |line, index|
- if @prompt_proc
- prompt = prompt_list[index]
- prompt_width = calculate_width(prompt, true)
+ @output.write "\e[0m"
+ Reline::IOGate.move_cursor_column(dialog.column)
+ move_cursor_down(1) if i < (dialog.contents.size - 1)
+ end
+ Reline::IOGate.move_cursor_column(cursor_column)
+ move_cursor_up(dialog.vertical_offset + dialog.contents.size - 1)
+ Reline::IOGate.show_cursor
+ dialog.lines_backup = {
+ lines: modify_lines(whole_lines),
+ line_index: @line_index,
+ first_line_started_from: @first_line_started_from,
+ started_from: @started_from,
+ byte_pointer: @byte_pointer
+ }
+ end
+
+ private def reset_dialog(dialog, old_dialog)
+ return if dialog.lines_backup.nil? or old_dialog.contents.nil?
+ prompt, prompt_width, prompt_list = check_multiline_prompt(dialog.lines_backup[:lines])
+ visual_lines = []
+ visual_start = nil
+ dialog.lines_backup[:lines].each_with_index { |l, i|
+ pr = prompt_list ? prompt_list[i] : prompt
+ vl, _ = split_by_width(pr + l, @screen_size.last)
+ vl.compact!
+ if i == dialog.lines_backup[:line_index]
+ visual_start = visual_lines.size + dialog.lines_backup[:started_from]
+ end
+ visual_lines.concat(vl)
+ }
+ old_y = dialog.lines_backup[:first_line_started_from] + dialog.lines_backup[:started_from]
+ y = @first_line_started_from + @started_from
+ y_diff = y - old_y
+ if (old_y + old_dialog.vertical_offset) < (y + dialog.vertical_offset)
+ # rerender top
+ move_cursor_down(old_dialog.vertical_offset - y_diff)
+ start = visual_start + old_dialog.vertical_offset
+ line_num = dialog.vertical_offset - old_dialog.vertical_offset
+ line_num.times do |i|
+ Reline::IOGate.move_cursor_column(old_dialog.column)
+ if visual_lines[start + i].nil?
+ s = ' ' * old_dialog.width
+ else
+ s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, old_dialog.width)
+ s = padding_space_with_escape_sequences(s, old_dialog.width)
end
- render_partial(prompt, prompt_width, line, false)
- if index < (new_buffer.size - 1)
- move_cursor_down(1)
+ @output.write "\e[0m#{s}\e[0m"
+ move_cursor_down(1) if i < (line_num - 1)
+ end
+ move_cursor_up(old_dialog.vertical_offset + line_num - 1 - y_diff)
+ end
+ if (old_y + old_dialog.vertical_offset + old_dialog.contents.size) > (y + dialog.vertical_offset + dialog.contents.size)
+ # rerender bottom
+ move_cursor_down(dialog.vertical_offset + dialog.contents.size - y_diff)
+ start = visual_start + dialog.vertical_offset + dialog.contents.size
+ line_num = (old_dialog.vertical_offset + old_dialog.contents.size) - (dialog.vertical_offset + dialog.contents.size)
+ line_num.times do |i|
+ Reline::IOGate.move_cursor_column(old_dialog.column)
+ if visual_lines[start + i].nil?
+ s = ' ' * old_dialog.width
+ else
+ s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, old_dialog.width)
+ s = padding_space_with_escape_sequences(s, old_dialog.width)
+ end
+ @output.write "\e[0m#{s}\e[0m"
+ move_cursor_down(1) if i < (line_num - 1)
+ end
+ move_cursor_up(dialog.vertical_offset + dialog.contents.size + line_num - 1 - y_diff)
+ end
+ if old_dialog.column < dialog.column
+ # rerender left
+ move_cursor_down(old_dialog.vertical_offset - y_diff)
+ width = dialog.column - old_dialog.column
+ start = visual_start + old_dialog.vertical_offset
+ line_num = old_dialog.contents.size
+ line_num.times do |i|
+ Reline::IOGate.move_cursor_column(old_dialog.column)
+ if visual_lines[start + i].nil?
+ s = ' ' * width
+ else
+ s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, width)
+ s = padding_space_with_escape_sequences(s, dialog.width)
+ end
+ @output.write "\e[0m#{s}\e[0m"
+ move_cursor_down(1) if i < (line_num - 1)
+ end
+ move_cursor_up(old_dialog.vertical_offset + line_num - 1 - y_diff)
+ end
+ if (old_dialog.column + old_dialog.width) > (dialog.column + dialog.width)
+ # rerender right
+ move_cursor_down(old_dialog.vertical_offset + y_diff)
+ width = (old_dialog.column + old_dialog.width) - (dialog.column + dialog.width)
+ start = visual_start + old_dialog.vertical_offset
+ line_num = old_dialog.contents.size
+ line_num.times do |i|
+ Reline::IOGate.move_cursor_column(old_dialog.column + dialog.width)
+ if visual_lines[start + i].nil?
+ s = ' ' * width
+ else
+ s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column + dialog.width, width)
+ rerender_width = old_dialog.width - dialog.width
+ s = padding_space_with_escape_sequences(s, rerender_width)
end
+ Reline::IOGate.move_cursor_column(dialog.column + dialog.width)
+ @output.write "\e[0m#{s}\e[0m"
+ move_cursor_down(1) if i < (line_num - 1)
end
- move_cursor_up(back - 1)
- if @prompt_proc
- prompt = prompt_list[@line_index]
- prompt_width = calculate_width(prompt, true)
+ move_cursor_up(old_dialog.vertical_offset + line_num - 1 + y_diff)
+ end
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ end
+
+ private def clear_dialog
+ @dialogs.each do |dialog|
+ clear_each_dialog(dialog)
+ end
+ end
+
+ private def clear_dialog_with_content
+ @dialogs.each do |dialog|
+ clear_each_dialog(dialog)
+ dialog.contents = nil
+ dialog.trap_key = nil
+ end
+ end
+
+ private def clear_each_dialog(dialog)
+ dialog.trap_key = nil
+ return unless dialog.contents
+ prompt, prompt_width, prompt_list = check_multiline_prompt(dialog.lines_backup[:lines])
+ visual_lines = []
+ visual_lines_under_dialog = []
+ visual_start = nil
+ dialog.lines_backup[:lines].each_with_index { |l, i|
+ pr = prompt_list ? prompt_list[i] : prompt
+ vl, _ = split_by_width(pr + l, @screen_size.last)
+ vl.compact!
+ if i == dialog.lines_backup[:line_index]
+ visual_start = visual_lines.size + dialog.lines_backup[:started_from] + dialog.vertical_offset
end
- @highest_in_all = back
- @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
- @first_line_started_from =
- if @line_index.zero?
- 0
+ visual_lines.concat(vl)
+ }
+ visual_lines_under_dialog = visual_lines[visual_start, dialog.contents.size]
+ visual_lines_under_dialog = [] if visual_lines_under_dialog.nil?
+ Reline::IOGate.hide_cursor
+ move_cursor_down(dialog.vertical_offset)
+ dialog_vertical_size = dialog.contents.size
+ dialog_vertical_size.times do |i|
+ if i < visual_lines_under_dialog.size
+ Reline::IOGate.move_cursor_column(dialog.column)
+ str = Reline::Unicode.take_range(visual_lines_under_dialog[i], dialog.column, dialog.width)
+ str = padding_space_with_escape_sequences(str, dialog.width)
+ @output.write "\e[0m#{str}\e[0m"
+ else
+ Reline::IOGate.move_cursor_column(dialog.column)
+ @output.write "\e[0m#{' ' * dialog.width}\e[0m"
+ end
+ move_cursor_down(1) if i < (dialog_vertical_size - 1)
+ end
+ move_cursor_up(dialog_vertical_size - 1 + dialog.vertical_offset)
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ Reline::IOGate.show_cursor
+ end
+
+ private def calculate_scroll_partial_screen(highest_in_all, cursor_y)
+ if @screen_height < highest_in_all
+ old_scroll_partial_screen = @scroll_partial_screen
+ if cursor_y == 0
+ @scroll_partial_screen = 0
+ elsif cursor_y == (highest_in_all - 1)
+ @scroll_partial_screen = highest_in_all - @screen_height
+ else
+ if @scroll_partial_screen
+ if cursor_y <= @scroll_partial_screen
+ @scroll_partial_screen = cursor_y
+ elsif (@scroll_partial_screen + @screen_height - 1) < cursor_y
+ @scroll_partial_screen = cursor_y - (@screen_height - 1)
+ end
else
- calculate_height_by_lines(new_buffer[0..(@line_index - 1)], prompt_list)
+ if cursor_y > (@screen_height - 1)
+ @scroll_partial_screen = cursor_y - (@screen_height - 1)
+ else
+ @scroll_partial_screen = 0
+ end
end
- @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
- move_cursor_down(@first_line_started_from + @started_from)
- Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ end
+ if @scroll_partial_screen != old_scroll_partial_screen
+ @rerender_all = true
+ end
+ else
+ if @scroll_partial_screen
+ @rerender_all = true
+ end
+ @scroll_partial_screen = nil
+ end
+ end
+
+ private def rerender_added_newline(prompt, prompt_width)
+ scroll_down(1)
+ @buffer_of_lines[@previous_line_index] = @line
+ @line = @buffer_of_lines[@line_index]
+ unless @in_pasting
+ render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false)
+ end
+ @cursor = @cursor_max = calculate_width(@line)
+ @byte_pointer = @line.bytesize
+ @highest_in_all += @highest_in_this
+ @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
+ @first_line_started_from += @started_from + 1
+ @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ @previous_line_index = nil
+ end
+
+ def just_move_cursor
+ prompt, prompt_width, prompt_list = check_multiline_prompt(@buffer_of_lines)
+ move_cursor_up(@started_from)
+ new_first_line_started_from =
+ if @line_index.zero?
+ 0
+ else
+ calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt)
+ end
+ first_line_diff = new_first_line_started_from - @first_line_started_from
+ new_cursor, new_cursor_max, new_started_from, new_byte_pointer = calculate_nearest_cursor(@buffer_of_lines[@line_index], @cursor, @started_from, @byte_pointer, false)
+ new_started_from = calculate_height_by_width(prompt_width + new_cursor) - 1
+ calculate_scroll_partial_screen(@highest_in_all, new_first_line_started_from + new_started_from)
+ @previous_line_index = nil
+ if @rerender_all
+ @line = @buffer_of_lines[@line_index]
+ rerender_all_lines
@rerender_all = false
- rendered = true
+ true
+ else
+ @line = @buffer_of_lines[@line_index]
+ @first_line_started_from = new_first_line_started_from
+ @started_from = new_started_from
+ @cursor = new_cursor
+ @cursor_max = new_cursor_max
+ @byte_pointer = new_byte_pointer
+ move_cursor_down(first_line_diff + @started_from)
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ false
end
- line = modify_lines(whole_lines)[@line_index]
- if @is_multiline
- prompt, prompt_width, prompt_list = check_multiline_prompt(whole_lines, prompt)
- if finished?
- # Always rerender on finish because output_modifier_proc may return a different output.
- render_partial(prompt, prompt_width, line)
- scroll_down(1)
+ end
+
+ private def rerender_changed_current_line
+ if @previous_line_index
+ new_lines = whole_lines(index: @previous_line_index, line: @line)
+ else
+ new_lines = whole_lines
+ end
+ prompt, prompt_width, prompt_list = check_multiline_prompt(new_lines)
+ all_height = calculate_height_by_lines(new_lines, prompt_list || prompt)
+ diff = all_height - @highest_in_all
+ move_cursor_down(@highest_in_all - @first_line_started_from - @started_from - 1)
+ if diff > 0
+ scroll_down(diff)
+ move_cursor_up(all_height - 1)
+ elsif diff < 0
+ (-diff).times do
Reline::IOGate.move_cursor_column(0)
Reline::IOGate.erase_after_cursor
- elsif not rendered
- render_partial(prompt, prompt_width, line)
+ move_cursor_up(1)
end
+ move_cursor_up(all_height - 1)
else
- render_partial(prompt, prompt_width, line)
- if finished?
+ move_cursor_up(all_height - 1)
+ end
+ @highest_in_all = all_height
+ back = render_whole_lines(new_lines, prompt_list || prompt, prompt_width)
+ move_cursor_up(back)
+ if @previous_line_index
+ @buffer_of_lines[@previous_line_index] = @line
+ @line = @buffer_of_lines[@line_index]
+ end
+ @first_line_started_from =
+ if @line_index.zero?
+ 0
+ else
+ calculate_height_by_lines(@buffer_of_lines[0..(@line_index - 1)], prompt_list || prompt)
+ end
+ if @prompt_proc
+ prompt = prompt_list[@line_index]
+ prompt_width = calculate_width(prompt, true)
+ end
+ move_cursor_down(@first_line_started_from)
+ calculate_nearest_cursor
+ @started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ move_cursor_down(@started_from)
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
+ end
+
+ private def rerender_all_lines
+ move_cursor_up(@first_line_started_from + @started_from)
+ Reline::IOGate.move_cursor_column(0)
+ back = 0
+ new_buffer = whole_lines
+ prompt, prompt_width, prompt_list = check_multiline_prompt(new_buffer)
+ new_buffer.each_with_index do |line, index|
+ prompt_width = calculate_width(prompt_list[index], true) if @prompt_proc
+ width = prompt_width + calculate_width(line)
+ height = calculate_height_by_width(width)
+ back += height
+ end
+ old_highest_in_all = @highest_in_all
+ if @line_index.zero?
+ new_first_line_started_from = 0
+ else
+ new_first_line_started_from = calculate_height_by_lines(new_buffer[0..(@line_index - 1)], prompt_list || prompt)
+ end
+ new_started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ calculate_scroll_partial_screen(back, new_first_line_started_from + new_started_from)
+ if @scroll_partial_screen
+ move_cursor_up(@first_line_started_from + @started_from)
+ scroll_down(@screen_height - 1)
+ move_cursor_up(@screen_height)
+ Reline::IOGate.move_cursor_column(0)
+ elsif back > old_highest_in_all
+ scroll_down(back - 1)
+ move_cursor_up(back - 1)
+ elsif back < old_highest_in_all
+ scroll_down(back)
+ Reline::IOGate.erase_after_cursor
+ (old_highest_in_all - back - 1).times do
scroll_down(1)
- Reline::IOGate.move_cursor_column(0)
Reline::IOGate.erase_after_cursor
end
+ move_cursor_up(old_highest_in_all - 1)
+ end
+ render_whole_lines(new_buffer, prompt_list || prompt, prompt_width)
+ if @prompt_proc
+ prompt = prompt_list[@line_index]
+ prompt_width = calculate_width(prompt, true)
+ end
+ @highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
+ @highest_in_all = back
+ @first_line_started_from = new_first_line_started_from
+ @started_from = new_started_from
+ if @scroll_partial_screen
+ Reline::IOGate.move_cursor_up(@screen_height - (@first_line_started_from + @started_from - @scroll_partial_screen) - 1)
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ else
+ move_cursor_down(@first_line_started_from + @started_from - back + 1)
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ end
+ end
+
+ private def render_whole_lines(lines, prompt, prompt_width)
+ rendered_height = 0
+ modify_lines(lines).each_with_index do |line, index|
+ if prompt.is_a?(Array)
+ line_prompt = prompt[index]
+ prompt_width = calculate_width(line_prompt, true)
+ else
+ line_prompt = prompt
+ end
+ height = render_partial(line_prompt, prompt_width, line, rendered_height, with_control: false)
+ if index < (lines.size - 1)
+ if @scroll_partial_screen
+ if (@scroll_partial_screen - height) < rendered_height and (@scroll_partial_screen + @screen_height - 1) >= (rendered_height + height)
+ move_cursor_down(1)
+ end
+ else
+ scroll_down(1)
+ end
+ rendered_height += height
+ else
+ rendered_height += height - 1
+ end
end
+ rendered_height
end
- private def render_partial(prompt, prompt_width, line_to_render, with_control = true)
- visual_lines, height = split_by_width(prompt, line_to_render.nil? ? '' : line_to_render, @screen_size.last)
+ private def render_partial(prompt, prompt_width, line_to_render, this_started_from, with_control: true)
+ visual_lines, height = split_by_width(line_to_render.nil? ? prompt : prompt + line_to_render, @screen_size.last)
+ cursor_up_from_last_line = 0
+ if @scroll_partial_screen
+ last_visual_line = this_started_from + (height - 1)
+ last_screen_line = @scroll_partial_screen + (@screen_height - 1)
+ if (@scroll_partial_screen - this_started_from) >= height
+ # Render nothing because this line is before the screen.
+ visual_lines = []
+ elsif this_started_from > last_screen_line
+ # Render nothing because this line is after the screen.
+ visual_lines = []
+ else
+ deleted_lines_before_screen = []
+ if @scroll_partial_screen > this_started_from and last_visual_line >= @scroll_partial_screen
+ # A part of visual lines are before the screen.
+ deleted_lines_before_screen = visual_lines.shift((@scroll_partial_screen - this_started_from) * 2)
+ deleted_lines_before_screen.compact!
+ end
+ if this_started_from <= last_screen_line and last_screen_line < last_visual_line
+ # A part of visual lines are after the screen.
+ visual_lines.pop((last_visual_line - last_screen_line) * 2)
+ end
+ move_cursor_up(deleted_lines_before_screen.size - @started_from)
+ cursor_up_from_last_line = @started_from - deleted_lines_before_screen.size
+ end
+ end
if with_control
if height > @highest_in_this
diff = height - @highest_in_this
@@ -503,44 +1182,106 @@ class Reline::LineEditor
end
move_cursor_up(@started_from)
@started_from = calculate_height_by_width(prompt_width + @cursor) - 1
+ cursor_up_from_last_line = height - 1 - @started_from
+ end
+ if Reline::Unicode::CSI_REGEXP.match?(prompt + line_to_render)
+ @output.write "\e[0m" # clear character decorations
end
- Reline::IOGate.move_cursor_column(0)
visual_lines.each_with_index do |line, index|
+ Reline::IOGate.move_cursor_column(0)
if line.nil?
- Reline::IOGate.erase_after_cursor
- move_cursor_down(1)
- Reline::IOGate.move_cursor_column(0)
+ if calculate_width(visual_lines[index - 1], true) == Reline::IOGate.get_screen_size.last
+ # reaches the end of line
+ if Reline::IOGate.win? and Reline::IOGate.win_legacy_console?
+ # A newline is automatically inserted if a character is rendered at
+ # eol on command prompt.
+ else
+ # When the cursor is at the end of the line and erases characters
+ # after the cursor, some terminals delete the character at the
+ # cursor position.
+ move_cursor_down(1)
+ Reline::IOGate.move_cursor_column(0)
+ end
+ else
+ Reline::IOGate.erase_after_cursor
+ move_cursor_down(1)
+ Reline::IOGate.move_cursor_column(0)
+ end
next
end
- @output.print line
+ @output.write line
+ if Reline::IOGate.win? and Reline::IOGate.win_legacy_console? and calculate_width(line, true) == Reline::IOGate.get_screen_size.last
+ # A newline is automatically inserted if a character is rendered at eol on command prompt.
+ @rest_height -= 1 if @rest_height > 0
+ end
@output.flush
if @first_prompt
@first_prompt = false
@pre_input_hook&.call
end
end
- Reline::IOGate.erase_after_cursor
+ unless visual_lines.empty?
+ Reline::IOGate.erase_after_cursor
+ Reline::IOGate.move_cursor_column(0)
+ end
if with_control
- move_cursor_up(height - 1)
+ # Just after rendring, so the cursor is on the last line.
if finished?
- move_cursor_down(@started_from)
+ Reline::IOGate.move_cursor_column(0)
+ else
+ # Moves up from bottom of lines to the cursor position.
+ move_cursor_up(cursor_up_from_last_line)
+ # This logic is buggy if a fullwidth char is wrapped because there is only one halfwidth at end of a line.
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
end
- move_cursor_down(@started_from)
- Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
end
height
end
private def modify_lines(before)
- return before if before.nil? || before.empty?
+ return before if before.nil? || before.empty? || simplified_rendering?
if after = @output_modifier_proc&.call("#{before.join("\n")}\n", complete: finished?)
- after.lines(chomp: true)
+ after.lines("\n").map { |l| l.chomp('') }
else
before
end
end
+ private def show_menu
+ scroll_down(@highest_in_all - @first_line_started_from)
+ @rerender_all = true
+ @menu_info.list.sort!.each do |item|
+ Reline::IOGate.move_cursor_column(0)
+ @output.write item
+ @output.flush
+ scroll_down(1)
+ end
+ scroll_down(@highest_in_all - 1)
+ move_cursor_up(@highest_in_all - 1 - @first_line_started_from)
+ end
+
+ private def clear_screen_buffer(prompt, prompt_list, prompt_width)
+ Reline::IOGate.clear_screen
+ back = 0
+ modify_lines(whole_lines).each_with_index do |line, index|
+ if @prompt_proc
+ pr = prompt_list[index]
+ height = render_partial(pr, calculate_width(pr), line, back, with_control: false)
+ else
+ height = render_partial(prompt, prompt_width, line, back, with_control: false)
+ end
+ if index < (@buffer_of_lines.size - 1)
+ move_cursor_down(1)
+ back += height
+ end
+ end
+ move_cursor_up(back)
+ move_cursor_down(@first_line_started_from + @started_from)
+ @rest_height = (Reline::IOGate.get_screen_size.first - 1) - Reline::IOGate.cursor_pos.y
+ Reline::IOGate.move_cursor_column((prompt_width + @cursor) % @screen_size.last)
+ end
+
def editing_mode
@config.editing_mode
end
@@ -560,7 +1301,7 @@ class Reline::LineEditor
else
i&.start_with?(target)
end
- }
+ }.uniq
if is_menu
menu(target, list)
return nil
@@ -650,6 +1391,16 @@ class Reline::LineEditor
@completion_journey_data = CompletionJourneyData.new(
preposing, postposing,
[target] + list.select{ |item| item.start_with?(target) }, 0)
+ if @completion_journey_data.list.size == 1
+ @completion_journey_data.pointer = 0
+ else
+ case direction
+ when :up
+ @completion_journey_data.pointer = @completion_journey_data.list.size - 1
+ when :down
+ @completion_journey_data.pointer = 1
+ end
+ end
@completion_state = CompletionState::JOURNEY
else
case direction
@@ -664,20 +1415,23 @@ class Reline::LineEditor
@completion_journey_data.pointer = 0
end
end
- completed = @completion_journey_data.list[@completion_journey_data.pointer]
- @line = @completion_journey_data.preposing + completed + @completion_journey_data.postposing
- line_to_pointer = @completion_journey_data.preposing + completed
- @cursor_max = calculate_width(@line)
- @cursor = calculate_width(line_to_pointer)
- @byte_pointer = line_to_pointer.bytesize
end
+ completed = @completion_journey_data.list[@completion_journey_data.pointer]
+ new_line = (@completion_journey_data.preposing + completed + @completion_journey_data.postposing).split("\n")[@line_index]
+ @line = new_line.nil? ? String.new(encoding: @encoding) : new_line
+ line_to_pointer = (@completion_journey_data.preposing + completed).split("\n").last
+ line_to_pointer = String.new(encoding: @encoding) if line_to_pointer.nil?
+ @cursor_max = calculate_width(@line)
+ @cursor = calculate_width(line_to_pointer)
+ @byte_pointer = line_to_pointer.bytesize
end
private def run_for_operators(key, method_symbol, &block)
if @waiting_operator_proc
if VI_MOTIONS.include?(method_symbol)
old_cursor, old_byte_pointer = @cursor, @byte_pointer
- block.()
+ @vi_arg = @waiting_operator_vi_arg if @waiting_operator_vi_arg&.> 1
+ block.(true)
unless @waiting_proc
cursor_diff, byte_pointer_diff = @cursor - old_cursor, @byte_pointer - old_byte_pointer
@cursor, @byte_pointer = old_cursor, old_byte_pointer
@@ -685,27 +1439,59 @@ class Reline::LineEditor
else
old_waiting_proc = @waiting_proc
old_waiting_operator_proc = @waiting_operator_proc
+ current_waiting_operator_proc = @waiting_operator_proc
@waiting_proc = proc { |k|
old_cursor, old_byte_pointer = @cursor, @byte_pointer
old_waiting_proc.(k)
cursor_diff, byte_pointer_diff = @cursor - old_cursor, @byte_pointer - old_byte_pointer
@cursor, @byte_pointer = old_cursor, old_byte_pointer
- @waiting_operator_proc.(cursor_diff, byte_pointer_diff)
+ current_waiting_operator_proc.(cursor_diff, byte_pointer_diff)
@waiting_operator_proc = old_waiting_operator_proc
}
end
else
# Ignores operator when not motion is given.
- block.()
+ block.(false)
end
@waiting_operator_proc = nil
+ @waiting_operator_vi_arg = nil
+ if @vi_arg
+ @rerender_all = true
+ @vi_arg = nil
+ end
else
- block.()
+ block.(false)
end
end
private def argumentable?(method_obj)
- method_obj and method_obj.parameters.length != 1
+ method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :arg }
+ end
+
+ private def inclusive?(method_obj)
+ # If a motion method with the keyword argument "inclusive" follows the
+ # operator, it must contain the character at the cursor position.
+ method_obj and method_obj.parameters.any? { |param| param[0] == :key and param[1] == :inclusive }
+ end
+
+ def wrap_method_call(method_symbol, method_obj, key, with_operator = false)
+ if @config.editing_mode_is?(:emacs, :vi_insert) and @waiting_proc.nil? and @waiting_operator_proc.nil?
+ not_insertion = method_symbol != :ed_insert
+ process_insert(force: not_insertion)
+ end
+ if @vi_arg and argumentable?(method_obj)
+ if with_operator and inclusive?(method_obj)
+ method_obj.(key, arg: @vi_arg, inclusive: true)
+ else
+ method_obj.(key, arg: @vi_arg)
+ end
+ else
+ if with_operator and inclusive?(method_obj)
+ method_obj.(key, inclusive: true)
+ else
+ method_obj.(key)
+ end
+ end
end
private def process_key(key, method_symbol)
@@ -716,46 +1502,52 @@ class Reline::LineEditor
end
if method_symbol and key.is_a?(Symbol)
if @vi_arg and argumentable?(method_obj)
- run_for_operators(key, method_symbol) do
- method_obj.(key, arg: @vi_arg)
+ run_for_operators(key, method_symbol) do |with_operator|
+ wrap_method_call(method_symbol, method_obj, key, with_operator)
end
else
- method_obj&.(key)
+ wrap_method_call(method_symbol, method_obj, key) if method_obj
end
@kill_ring.process
- @vi_arg = nil
+ if @vi_arg
+ @rerender_al = true
+ @vi_arg = nil
+ end
elsif @vi_arg
if key.chr =~ /[0-9]/
ed_argument_digit(key)
else
if argumentable?(method_obj)
- run_for_operators(key, method_symbol) do
- method_obj.(key, arg: @vi_arg)
+ run_for_operators(key, method_symbol) do |with_operator|
+ wrap_method_call(method_symbol, method_obj, key, with_operator)
end
elsif @waiting_proc
@waiting_proc.(key)
elsif method_obj
- method_obj.(key)
+ wrap_method_call(method_symbol, method_obj, key)
else
- ed_insert(key)
+ ed_insert(key) unless @config.editing_mode_is?(:vi_command)
end
@kill_ring.process
- @vi_arg = nil
+ if @vi_arg
+ @rerender_all = true
+ @vi_arg = nil
+ end
end
elsif @waiting_proc
@waiting_proc.(key)
@kill_ring.process
elsif method_obj
if method_symbol == :ed_argument_digit
- method_obj.(key)
+ wrap_method_call(method_symbol, method_obj, key)
else
- run_for_operators(key, method_symbol) do
- method_obj.(key)
+ run_for_operators(key, method_symbol) do |with_operator|
+ wrap_method_call(method_symbol, method_obj, key, with_operator)
end
end
@kill_ring.process
else
- ed_insert(key)
+ ed_insert(key) unless @config.editing_mode_is?(:vi_command)
end
end
@@ -798,6 +1590,14 @@ class Reline::LineEditor
end
def input_key(key)
+ @last_key = key
+ @config.reset_oneshot_key_bindings
+ @dialogs.each do |dialog|
+ if key.char.instance_of?(Symbol) and key.char == dialog.name
+ return
+ end
+ end
+ @just_cursor_moving = nil
if key.char.nil?
if @first_char
@line = nil
@@ -805,6 +1605,7 @@ class Reline::LineEditor
finish
return
end
+ old_line = @line.dup
@first_char = false
completion_occurs = false
if @config.editing_mode_is?(:emacs, :vi_insert) and key.char == "\C-i".ord
@@ -812,7 +1613,21 @@ class Reline::LineEditor
result = call_completion_proc
if result.is_a?(Array)
completion_occurs = true
- complete(result)
+ process_insert
+ if @config.autocompletion
+ move_completed_list(result, :down)
+ else
+ complete(result)
+ end
+ end
+ end
+ elsif @config.editing_mode_is?(:emacs, :vi_insert) and key.char == :completion_journey_up
+ if not @config.disable_completion and @config.autocompletion
+ result = call_completion_proc
+ if result.is_a?(Array)
+ completion_occurs = true
+ process_insert
+ move_completed_list(result, :up)
end
end
elsif not @config.disable_completion and @config.editing_mode_is?(:vi_insert) and ["\C-p".ord, "\C-n".ord].include?(key.char)
@@ -820,6 +1635,7 @@ class Reline::LineEditor
result = call_completion_proc
if result.is_a?(Array)
completion_occurs = true
+ process_insert
move_completed_list(result, "\C-p".ord == key.char ? :up : :down)
end
end
@@ -830,20 +1646,54 @@ class Reline::LineEditor
end
unless completion_occurs
@completion_state = CompletionState::NORMAL
+ @completion_journey_data = nil
+ end
+ if not @in_pasting and @just_cursor_moving.nil?
+ if @previous_line_index and @buffer_of_lines[@previous_line_index] == @line
+ @just_cursor_moving = true
+ elsif @previous_line_index.nil? and @buffer_of_lines[@line_index] == @line and old_line == @line
+ @just_cursor_moving = true
+ else
+ @just_cursor_moving = false
+ end
+ else
+ @just_cursor_moving = false
end
- if @is_multiline and @auto_indent_proc
+ if @is_multiline and @auto_indent_proc and not simplified_rendering?
process_auto_indent
end
end
def call_completion_proc
result = retrieve_completion_block(true)
- slice = result[1]
- result = @completion_proc.(slice) if @completion_proc and slice
+ pre, target, post = result
+ result = call_completion_proc_with_checking_args(pre, target, post)
Reline.core.instance_variable_set(:@completion_quote_character, nil)
result
end
+ def call_completion_proc_with_checking_args(pre, target, post)
+ if @completion_proc and target
+ argnum = @completion_proc.parameters.inject(0) { |result, item|
+ case item.first
+ when :req, :opt
+ result + 1
+ when :rest
+ break 3
+ end
+ }
+ case argnum
+ when 1
+ result = @completion_proc.(target)
+ when 2
+ result = @completion_proc.(target, pre)
+ when 3..Float::INFINITY
+ result = @completion_proc.(target, pre, post)
+ end
+ end
+ result
+ end
+
private def process_auto_indent
return if not @check_new_auto_indent and @previous_line_index # move cursor up or down
if @check_new_auto_indent and @previous_line_index and @previous_line_index > 0 and @line_index > @previous_line_index
@@ -869,6 +1719,7 @@ class Reline::LineEditor
new_lines = whole_lines
end
new_indent = @auto_indent_proc.(new_lines, @line_index, @byte_pointer, @check_new_auto_indent)
+ new_indent = @cursor_max if new_indent&.> @cursor_max
if new_indent&.>= 0
md = new_lines[@line_index].match(/\A */)
prev_indent = md[0].count(' ')
@@ -886,8 +1737,16 @@ class Reline::LineEditor
end
def retrieve_completion_block(set_completion_quote_character = false)
- word_break_regexp = /\A[#{Regexp.escape(Reline.completer_word_break_characters)}]/
- quote_characters_regexp = /\A[#{Regexp.escape(Reline.completer_quote_characters)}]/
+ if Reline.completer_word_break_characters.empty?
+ word_break_regexp = nil
+ else
+ word_break_regexp = /\A[#{Regexp.escape(Reline.completer_word_break_characters)}]/
+ end
+ if Reline.completer_quote_characters.empty?
+ quote_characters_regexp = nil
+ else
+ quote_characters_regexp = /\A[#{Regexp.escape(Reline.completer_quote_characters)}]/
+ end
before = @line.byteslice(0, @byte_pointer)
rest = nil
break_pointer = nil
@@ -905,20 +1764,20 @@ class Reline::LineEditor
quote = nil
i += 1
rest = nil
- break_pointer = nil
elsif quote and slice.start_with?(escaped_quote)
# skip
i += 2
- elsif slice =~ quote_characters_regexp # find new "
+ elsif quote_characters_regexp and slice =~ quote_characters_regexp # find new "
rest = $'
quote = $&
closing_quote = /(?!\\)#{Regexp.escape(quote)}/
escaped_quote = /\\#{Regexp.escape(quote)}/
i += 1
- break_pointer = i
- elsif not quote and slice =~ word_break_regexp
+ break_pointer = i - 1
+ elsif word_break_regexp and not quote and slice =~ word_break_regexp
rest = $'
i += 1
+ before = @line.byteslice(i, @byte_pointer - i)
break_pointer = i
else
i += 1
@@ -936,8 +1795,26 @@ class Reline::LineEditor
end
else
preposing = ''
+ if break_pointer
+ preposing = @line.byteslice(0, break_pointer)
+ else
+ preposing = ''
+ end
target = before
end
+ if @is_multiline
+ if @previous_line_index
+ lines = whole_lines(index: @previous_line_index, line: @line)
+ else
+ lines = whole_lines
+ end
+ if @line_index > 0
+ preposing = lines[0..(@line_index - 1)].join("\n") + "\n" + preposing
+ end
+ if (lines.size - 1) > @line_index
+ postposing = postposing + "\n" + lines[(@line_index + 1)..-1].join("\n")
+ end
+ end
[preposing.encode(@encoding), target.encode(@encoding), postposing.encode(@encoding)]
end
@@ -965,10 +1842,32 @@ class Reline::LineEditor
def delete_text(start = nil, length = nil)
if start.nil? and length.nil?
- @line&.clear
- @byte_pointer = 0
- @cursor = 0
- @cursor_max = 0
+ if @is_multiline
+ if @buffer_of_lines.size == 1
+ @line&.clear
+ @byte_pointer = 0
+ @cursor = 0
+ @cursor_max = 0
+ elsif @line_index == (@buffer_of_lines.size - 1) and @line_index > 0
+ @buffer_of_lines.pop
+ @line_index -= 1
+ @line = @buffer_of_lines[@line_index]
+ @byte_pointer = 0
+ @cursor = 0
+ @cursor_max = calculate_width(@line)
+ elsif @line_index < (@buffer_of_lines.size - 1)
+ @buffer_of_lines.delete_at(@line_index)
+ @line = @buffer_of_lines[@line_index]
+ @byte_pointer = 0
+ @cursor = 0
+ @cursor_max = calculate_width(@line)
+ end
+ else
+ @line&.clear
+ @byte_pointer = 0
+ @cursor = 0
+ @cursor_max = 0
+ end
elsif not start.nil? and not length.nil?
if @line
before = @line.byteslice(0, start)
@@ -1018,7 +1917,11 @@ class Reline::LineEditor
if @buffer_of_lines.size == 1 and @line.nil?
nil
else
- whole_lines.join("\n")
+ if @previous_line_index
+ whole_lines(index: @previous_line_index, line: @line).join("\n")
+ else
+ whole_lines.join("\n")
+ end
end
end
@@ -1028,6 +1931,7 @@ class Reline::LineEditor
def finish
@finished = true
+ @rerender_all = true
@config.reset
end
@@ -1045,29 +1949,7 @@ class Reline::LineEditor
end
private def calculate_width(str, allow_escape_code = false)
- if allow_escape_code
- width = 0
- rest = str.encode(Encoding::UTF_8)
- in_zero_width = false
- rest.scan(WIDTH_SCANNER) do |gc|
- case gc
- when NON_PRINTING_START
- in_zero_width = true
- when NON_PRINTING_END
- in_zero_width = false
- when CSI_REGEXP, OSC_REGEXP
- else
- unless in_zero_width
- width += Reline::Unicode.get_mbchar_width(gc)
- end
- end
- end
- width
- else
- str.encode(Encoding::UTF_8).grapheme_clusters.inject(0) { |w, gc|
- w + Reline::Unicode.get_mbchar_width(gc)
- }
- end
+ Reline::Unicode.calculate_width(str, allow_escape_code)
end
private def key_delete(key)
@@ -1078,38 +1960,98 @@ class Reline::LineEditor
private def key_newline(key)
if @is_multiline
+ if (@buffer_of_lines.size - 1) == @line_index and @line.bytesize == @byte_pointer
+ @add_newline_to_end_of_buffer = true
+ end
next_line = @line.byteslice(@byte_pointer, @line.bytesize - @byte_pointer)
cursor_line = @line.byteslice(0, @byte_pointer)
insert_new_line(cursor_line, next_line)
@cursor = 0
- @check_new_auto_indent = true
+ @check_new_auto_indent = true unless @in_pasting
end
end
+ # Editline:: +ed-unassigned+ This editor command always results in an error.
+ # GNU Readline:: There is no corresponding macro.
private def ed_unassigned(key) end # do nothing
+ private def process_insert(force: false)
+ return if @continuous_insertion_buffer.empty? or (@in_pasting and not force)
+ width = Reline::Unicode.calculate_width(@continuous_insertion_buffer)
+ bytesize = @continuous_insertion_buffer.bytesize
+ if @cursor == @cursor_max
+ @line += @continuous_insertion_buffer
+ else
+ @line = byteinsert(@line, @byte_pointer, @continuous_insertion_buffer)
+ end
+ @byte_pointer += bytesize
+ @cursor += width
+ @cursor_max += width
+ @continuous_insertion_buffer.clear
+ end
+
+ # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters)
+ # In insert mode, insert the input character left of the cursor
+ # position. In replace mode, overwrite the character at the
+ # cursor and move the cursor to the right by one character
+ # position. Accept an argument to do this repeatedly. It is an
+ # error if the input character is the NUL character (+Ctrl-@+).
+ # Failure to enlarge the edit buffer also results in an error.
+ # Editline:: +ed-digit+ (emacs: 0 to 9) If in argument input mode, append
+ # the input digit to the argument being read. Otherwise, call
+ # +ed-insert+. It is an error if the input character is not a
+ # digit or if the existing argument is already greater than a
+ # million.
+ # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself.
private def ed_insert(key)
+ str = nil
+ width = nil
+ bytesize = nil
if key.instance_of?(String)
- width = Reline::Unicode.get_mbchar_width(key)
- if @cursor == @cursor_max
- @line += key
- else
- @line = byteinsert(@line, @byte_pointer, key)
+ begin
+ key.encode(Encoding::UTF_8)
+ rescue Encoding::UndefinedConversionError
+ return
end
- @byte_pointer += key.bytesize
- @cursor += width
- @cursor_max += width
+ str = key
+ bytesize = key.bytesize
+ else
+ begin
+ key.chr.encode(Encoding::UTF_8)
+ rescue Encoding::UndefinedConversionError
+ return
+ end
+ str = key.chr
+ bytesize = 1
+ end
+ if @in_pasting
+ @continuous_insertion_buffer << str
+ return
+ elsif not @continuous_insertion_buffer.empty?
+ process_insert
+ end
+ width = Reline::Unicode.get_mbchar_width(str)
+ if @cursor == @cursor_max
+ @line += str
else
- if @cursor == @cursor_max
- @line += key.chr
+ @line = byteinsert(@line, @byte_pointer, str)
+ end
+ last_byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer)
+ @byte_pointer += bytesize
+ last_mbchar = @line.byteslice((@byte_pointer - bytesize - last_byte_size), last_byte_size)
+ combined_char = last_mbchar + str
+ if last_byte_size != 0 and combined_char.grapheme_clusters.size == 1
+ # combined char
+ last_mbchar_width = Reline::Unicode.get_mbchar_width(last_mbchar)
+ combined_char_width = Reline::Unicode.get_mbchar_width(combined_char)
+ if combined_char_width > last_mbchar_width
+ width = combined_char_width - last_mbchar_width
else
- @line = byteinsert(@line, @byte_pointer, key.chr)
+ width = 0
end
- width = Reline::Unicode.get_mbchar_width(key.chr)
- @byte_pointer += 1
- @cursor += width
- @cursor_max += width
end
+ @cursor += width
+ @cursor_max += width
end
alias_method :ed_digit, :ed_insert
alias_method :self_insert, :ed_insert
@@ -1119,6 +2061,8 @@ class Reline::LineEditor
arg.times do
if key == "\C-j".ord or key == "\C-m".ord
key_newline(key)
+ elsif key == 0
+ # Ignore NUL.
else
ed_insert(key)
end
@@ -1166,6 +2110,7 @@ class Reline::LineEditor
arg -= 1
ed_prev_char(key, arg: arg) if arg > 0
end
+ alias_method :backward_char, :ed_prev_char
private def vi_first_print(key)
@byte_pointer, @cursor = Reline::Unicode.vi_first_print(@line)
@@ -1235,7 +2180,7 @@ class Reline::LineEditor
if search_word.empty? and Reline.last_incremental_search
search_word = Reline.last_incremental_search
end
- if @history_pointer # TODO
+ if @history_pointer
case prev_search_key
when "\C-r".ord
history_pointer_base = 0
@@ -1288,6 +2233,8 @@ class Reline::LineEditor
@buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
@line_index = @buffer_of_lines.size - 1
@line = @buffer_of_lines.last
+ @byte_pointer = @line.bytesize
+ @cursor = @cursor_max = calculate_width(@line)
@rerender_all = true
@searching_prompt = "(%s)`%s'" % [prompt_name, search_word]
else
@@ -1307,7 +2254,7 @@ class Reline::LineEditor
end
end
- private def search_history(key)
+ private def incremental_search_history(key)
unless @history_pointer
if @is_multiline
@line_backup_in_history = whole_buffer
@@ -1318,9 +2265,11 @@ class Reline::LineEditor
searcher = generate_searcher
searcher.resume(key)
@searching_prompt = "(reverse-i-search)`': "
+ termination_keys = ["\C-j".ord]
+ termination_keys.concat(@config.isearch_terminators&.chars&.map(&:ord)) if @config.isearch_terminators
@waiting_proc = ->(k) {
case k
- when "\C-j".ord
+ when *termination_keys
if @history_pointer
buffer = Reline::HISTORY[@history_pointer]
else
@@ -1339,6 +2288,8 @@ class Reline::LineEditor
@waiting_proc = nil
@cursor_max = calculate_width(@line)
@cursor = @byte_pointer = 0
+ @rerender_all = true
+ @cached_prompt_list = nil
searcher.resume(-1)
when "\C-g".ord
if @is_multiline
@@ -1382,21 +2333,122 @@ class Reline::LineEditor
@waiting_proc = nil
@cursor_max = calculate_width(@line)
@cursor = @byte_pointer = 0
+ @rerender_all = true
+ @cached_prompt_list = nil
searcher.resume(-1)
end
end
}
end
- private def ed_search_prev_history(key)
- search_history(key)
+ private def vi_search_prev(key)
+ incremental_search_history(key)
+ end
+ alias_method :reverse_search_history, :vi_search_prev
+
+ private def vi_search_next(key)
+ incremental_search_history(key)
+ end
+ alias_method :forward_search_history, :vi_search_next
+
+ private def ed_search_prev_history(key, arg: 1)
+ history = nil
+ h_pointer = nil
+ line_no = nil
+ substr = @line.slice(0, @byte_pointer)
+ if @history_pointer.nil?
+ return if not @line.empty? and substr.empty?
+ history = Reline::HISTORY
+ elsif @history_pointer.zero?
+ history = nil
+ h_pointer = nil
+ else
+ history = Reline::HISTORY.slice(0, @history_pointer)
+ end
+ return if history.nil?
+ if @is_multiline
+ h_pointer = history.rindex { |h|
+ h.split("\n").each_with_index { |l, i|
+ if l.start_with?(substr)
+ line_no = i
+ break
+ end
+ }
+ not line_no.nil?
+ }
+ else
+ h_pointer = history.rindex { |l|
+ l.start_with?(substr)
+ }
+ end
+ return if h_pointer.nil?
+ @history_pointer = h_pointer
+ if @is_multiline
+ @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n")
+ @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
+ @line_index = line_no
+ @line = @buffer_of_lines[@line_index]
+ @rerender_all = true
+ else
+ @line = Reline::HISTORY[@history_pointer]
+ end
+ @cursor_max = calculate_width(@line)
+ arg -= 1
+ ed_search_prev_history(key, arg: arg) if arg > 0
end
- alias_method :reverse_search_history, :ed_search_prev_history
+ alias_method :history_search_backward, :ed_search_prev_history
- private def ed_search_next_history(key)
- search_history(key)
+ private def ed_search_next_history(key, arg: 1)
+ substr = @line.slice(0, @byte_pointer)
+ if @history_pointer.nil?
+ return
+ elsif @history_pointer == (Reline::HISTORY.size - 1) and not substr.empty?
+ return
+ end
+ history = Reline::HISTORY.slice((@history_pointer + 1)..-1)
+ h_pointer = nil
+ line_no = nil
+ if @is_multiline
+ h_pointer = history.index { |h|
+ h.split("\n").each_with_index { |l, i|
+ if l.start_with?(substr)
+ line_no = i
+ break
+ end
+ }
+ not line_no.nil?
+ }
+ else
+ h_pointer = history.index { |l|
+ l.start_with?(substr)
+ }
+ end
+ h_pointer += @history_pointer + 1 if h_pointer and @history_pointer
+ return if h_pointer.nil? and not substr.empty?
+ @history_pointer = h_pointer
+ if @is_multiline
+ if @history_pointer.nil? and substr.empty?
+ @buffer_of_lines = []
+ @line_index = 0
+ else
+ @buffer_of_lines = Reline::HISTORY[@history_pointer].split("\n")
+ @line_index = line_no
+ end
+ @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
+ @line = @buffer_of_lines[@line_index]
+ @rerender_all = true
+ else
+ if @history_pointer.nil? and substr.empty?
+ @line = ''
+ else
+ @line = Reline::HISTORY[@history_pointer]
+ end
+ end
+ @cursor_max = calculate_width(@line)
+ arg -= 1
+ ed_search_next_history(key, arg: arg) if arg > 0
end
- alias_method :forward_search_history, :ed_search_next_history
+ alias_method :history_search_forward, :ed_search_next_history
private def ed_prev_history(key, arg: 1)
if @is_multiline and @line_index > 0
@@ -1447,6 +2499,7 @@ class Reline::LineEditor
arg -= 1
ed_prev_history(key, arg: arg) if arg > 0
end
+ alias_method :previous_history, :ed_prev_history
private def ed_next_history(key, arg: 1)
if @is_multiline and @line_index < (@buffer_of_lines.size - 1)
@@ -1494,8 +2547,10 @@ class Reline::LineEditor
arg -= 1
ed_next_history(key, arg: arg) if arg > 0
end
+ alias_method :next_history, :ed_next_history
private def ed_newline(key)
+ process_insert(force: true)
if @is_multiline
if @config.editing_mode_is?(:vi_command)
if @line_index < (@buffer_of_lines.size - 1)
@@ -1527,7 +2582,7 @@ class Reline::LineEditor
end
end
- private def em_delete_prev_char(key)
+ private def em_delete_prev_char(key, arg: 1)
if @is_multiline and @cursor == 0 and @line_index > 0
@buffer_of_lines[@line_index] = @line
@cursor = calculate_width(@buffer_of_lines[@line_index - 1])
@@ -1545,9 +2600,16 @@ class Reline::LineEditor
@cursor -= width
@cursor_max -= width
end
+ arg -= 1
+ em_delete_prev_char(key, arg: arg) if arg > 0
end
alias_method :backward_delete_char, :em_delete_prev_char
+ # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+,
+ # +Ctrl-U+) + Kill from the cursor to the end of the line.
+ # GNU Readline:: +kill-line+ (+C-k+) Kill the text from point to the end of
+ # the line. With a negative numeric argument, kill backward
+ # from the cursor to the beginning of the current line.
private def ed_kill_line(key)
if @line.bytesize > @byte_pointer
@line, deleted = byteslice!(@line, @byte_pointer, @line.bytesize - @byte_pointer)
@@ -1564,8 +2626,14 @@ class Reline::LineEditor
@rest_height += 1
end
end
+ alias_method :kill_line, :ed_kill_line
- private def em_kill_line(key)
+ # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the
+ # beginning of the edit buffer to the cursor and save it to the
+ # cut buffer.
+ # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor
+ # to the beginning of the current line.
+ private def vi_kill_line_prev(key)
if @byte_pointer > 0
@line, deleted = byteslice!(@line, 0, @byte_pointer)
@byte_pointer = 0
@@ -1574,6 +2642,22 @@ class Reline::LineEditor
@cursor = 0
end
end
+ alias_method :unix_line_discard, :vi_kill_line_prev
+
+ # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the
+ # edit buffer and save it to the cut buffer. +vi-kill-line-prev+
+ # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the
+ # current line, no matter where point is.
+ private def em_kill_line(key)
+ if @line.size > 0
+ @kill_ring.append(@line.dup, true)
+ @line.clear
+ @byte_pointer = 0
+ @cursor_max = 0
+ @cursor = 0
+ end
+ end
+ alias_method :kill_whole_line, :em_kill_line
private def em_delete(key)
if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1)
@@ -1624,6 +2708,7 @@ class Reline::LineEditor
@byte_pointer += yanked.bytesize
end
end
+ alias_method :yank, :em_yank
private def em_yank_pop(key)
yanked, prev_yank = @kill_ring.yank_pop
@@ -1640,6 +2725,7 @@ class Reline::LineEditor
@byte_pointer += yanked.bytesize
end
end
+ alias_method :yank_pop, :em_yank_pop
private def ed_clear_screen(key)
@cleared = true
@@ -1770,9 +2856,10 @@ class Reline::LineEditor
@byte_pointer -= byte_size
@cursor -= width
@cursor_max -= width
- @kill_ring.append(deleted)
+ @kill_ring.append(deleted, true)
end
end
+ alias_method :unix_word_rubout, :em_kill_region
private def copy_for_vi(text)
if @config.editing_mode_is?(:vi_insert) or @config.editing_mode_is?(:vi_command)
@@ -1793,11 +2880,11 @@ class Reline::LineEditor
ed_prev_char(key)
@config.editing_mode = :vi_command
end
- alias_method :backward_char, :ed_prev_char
+ alias_method :vi_movement_mode, :vi_command_mode
private def vi_next_word(key, arg: 1)
if @line.bytesize > @byte_pointer
- byte_size, width = Reline::Unicode.vi_forward_word(@line, @byte_pointer)
+ byte_size, width = Reline::Unicode.vi_forward_word(@line, @byte_pointer, @drop_terminate_spaces)
@byte_pointer += byte_size
@cursor += width
end
@@ -1815,13 +2902,22 @@ class Reline::LineEditor
vi_prev_word(key, arg: arg) if arg > 0
end
- private def vi_end_word(key, arg: 1)
+ private def vi_end_word(key, arg: 1, inclusive: false)
if @line.bytesize > @byte_pointer
byte_size, width = Reline::Unicode.vi_forward_end_word(@line, @byte_pointer)
@byte_pointer += byte_size
@cursor += width
end
arg -= 1
+ if inclusive and arg.zero?
+ byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer)
+ if byte_size > 0
+ c = @line.byteslice(@byte_pointer, byte_size)
+ width = Reline::Unicode.get_mbchar_width(c)
+ @byte_pointer += byte_size
+ @cursor += width
+ end
+ end
vi_end_word(key, arg: arg) if arg > 0
end
@@ -1845,13 +2941,22 @@ class Reline::LineEditor
vi_prev_big_word(key, arg: arg) if arg > 0
end
- private def vi_end_big_word(key, arg: 1)
+ private def vi_end_big_word(key, arg: 1, inclusive: false)
if @line.bytesize > @byte_pointer
byte_size, width = Reline::Unicode.vi_big_forward_end_word(@line, @byte_pointer)
@byte_pointer += byte_size
@cursor += width
end
arg -= 1
+ if inclusive and arg.zero?
+ byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer)
+ if byte_size > 0
+ c = @line.byteslice(@byte_pointer, byte_size)
+ width = Reline::Unicode.get_mbchar_width(c)
+ @byte_pointer += byte_size
+ @cursor += width
+ end
+ end
vi_end_big_word(key, arg: arg) if arg > 0
end
@@ -1875,6 +2980,16 @@ class Reline::LineEditor
end
end
+ private def vi_insert_at_bol(key)
+ ed_move_to_beg(key)
+ @config.editing_mode = :vi_insert
+ end
+
+ private def vi_add_at_eol(key)
+ ed_move_to_end(key)
+ @config.editing_mode = :vi_insert
+ end
+
private def ed_delete_prev_char(key, arg: 1)
deleted = ''
arg.times do
@@ -1896,10 +3011,8 @@ class Reline::LineEditor
@cursor = 0
end
- private def vi_change_meta(key)
- end
-
- private def vi_delete_meta(key)
+ private def vi_change_meta(key, arg: 1)
+ @drop_terminate_spaces = true
@waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff|
if byte_pointer_diff > 0
@line, cut = byteslice!(@line, @byte_pointer, byte_pointer_diff)
@@ -1910,22 +3023,37 @@ class Reline::LineEditor
@cursor += cursor_diff if cursor_diff < 0
@cursor_max -= cursor_diff.abs
@byte_pointer += byte_pointer_diff if byte_pointer_diff < 0
+ @config.editing_mode = :vi_insert
+ @drop_terminate_spaces = false
}
+ @waiting_operator_vi_arg = arg
end
- private def vi_yank(key)
+ private def vi_delete_meta(key, arg: 1)
+ @waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff|
+ if byte_pointer_diff > 0
+ @line, cut = byteslice!(@line, @byte_pointer, byte_pointer_diff)
+ elsif byte_pointer_diff < 0
+ @line, cut = byteslice!(@line, @byte_pointer + byte_pointer_diff, -byte_pointer_diff)
+ end
+ copy_for_vi(cut)
+ @cursor += cursor_diff if cursor_diff < 0
+ @cursor_max -= cursor_diff.abs
+ @byte_pointer += byte_pointer_diff if byte_pointer_diff < 0
+ }
+ @waiting_operator_vi_arg = arg
end
- private def vi_end_of_transmission(key)
- if @line.empty?
- @line = nil
- if @buffer_of_lines.size > 1
- scroll_down(@highest_in_all - @first_line_started_from)
+ private def vi_yank(key, arg: 1)
+ @waiting_operator_proc = proc { |cursor_diff, byte_pointer_diff|
+ if byte_pointer_diff > 0
+ cut = @line.byteslice(@byte_pointer, byte_pointer_diff)
+ elsif byte_pointer_diff < 0
+ cut = @line.byteslice(@byte_pointer + byte_pointer_diff, -byte_pointer_diff)
end
- Reline::IOGate.move_cursor_column(0)
- @eof = true
- finish
- end
+ copy_for_vi(cut)
+ }
+ @waiting_operator_vi_arg = arg
end
private def vi_list_or_eof(key)
@@ -1938,9 +3066,11 @@ class Reline::LineEditor
@eof = true
finish
else
- # TODO: list
+ ed_newline(key)
end
end
+ alias_method :vi_end_of_transmission, :vi_list_or_eof
+ alias_method :vi_eof_maybe, :vi_list_or_eof
private def ed_delete_next_char(key, arg: 1)
byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer)
@@ -1950,6 +3080,9 @@ class Reline::LineEditor
width = Reline::Unicode.get_mbchar_width(mbchar)
@cursor_max -= width
if @cursor > 0 and @cursor >= @cursor_max
+ byte_size = Reline::Unicode.get_prev_mbchar_size(@line, @byte_pointer)
+ mbchar = @line.byteslice(@byte_pointer - byte_size, byte_size)
+ width = Reline::Unicode.get_mbchar_width(mbchar)
@byte_pointer -= byte_size
@cursor -= width
end
@@ -1983,11 +3116,23 @@ class Reline::LineEditor
private def vi_histedit(key)
path = Tempfile.open { |fp|
- fp.write @line
+ if @is_multiline
+ fp.write whole_lines.join("\n")
+ else
+ fp.write @line
+ end
fp.path
}
system("#{ENV['EDITOR']} #{path}")
- @line = Pathname.new(path).read
+ if @is_multiline
+ @buffer_of_lines = File.read(path).split("\n")
+ @buffer_of_lines = [String.new(encoding: @encoding)] if @buffer_of_lines.empty?
+ @line_index = 0
+ @line = @buffer_of_lines[@line_index]
+ @rerender_all = true
+ else
+ @line = File.read(path)
+ end
finish
end
@@ -2017,7 +3162,14 @@ class Reline::LineEditor
private def ed_argument_digit(key)
if @vi_arg.nil?
- unless key.chr.to_i.zero?
+ if key.chr.to_i.zero?
+ if key.anybits?(0b10000000)
+ unescaped_key = key ^ 0b10000000
+ unless unescaped_key.chr.to_i.zero?
+ @vi_arg = unescaped_key.chr.to_i
+ end
+ end
+ else
@vi_arg = key.chr.to_i
end
else
@@ -2046,7 +3198,7 @@ class Reline::LineEditor
byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer)
before = @line.byteslice(0, @byte_pointer)
remaining_point = @byte_pointer + byte_size
- after = @line.byteslice(remaining_point, @line.size - remaining_point)
+ after = @line.byteslice(remaining_point, @line.bytesize - remaining_point)
@line = before + k.chr + after
@cursor_max = calculate_width(@line)
@waiting_proc = nil
@@ -2057,7 +3209,7 @@ class Reline::LineEditor
end
before = @line.byteslice(0, @byte_pointer)
remaining_point = @byte_pointer + byte_size
- after = @line.byteslice(remaining_point, @line.size - remaining_point)
+ after = @line.byteslice(remaining_point, @line.bytesize - remaining_point)
replaced = k.chr * arg
@line = before + replaced + after
@byte_pointer += replaced.bytesize
@@ -2068,16 +3220,21 @@ class Reline::LineEditor
}
end
- private def vi_next_char(key, arg: 1)
- @waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg) }
+ private def vi_next_char(key, arg: 1, inclusive: false)
+ @waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, inclusive: inclusive) }
end
- private def search_next_char(key, arg)
+ private def vi_to_next_char(key, arg: 1, inclusive: false)
+ @waiting_proc = ->(key_for_proc) { search_next_char(key_for_proc, arg, need_prev_char: true, inclusive: inclusive) }
+ end
+
+ private def search_next_char(key, arg, need_prev_char: false, inclusive: false)
if key.instance_of?(String)
inputed_char = key
else
inputed_char = key.chr
end
+ prev_total = nil
total = nil
found = false
@line.byteslice(@byte_pointer..-1).grapheme_clusters.each do |mbchar|
@@ -2095,13 +3252,75 @@ class Reline::LineEditor
end
end
width = Reline::Unicode.get_mbchar_width(mbchar)
+ prev_total = total
total = [total.first + mbchar.bytesize, total.last + width]
end
end
- if found and total
+ if not need_prev_char and found and total
byte_size, width = total
@byte_pointer += byte_size
@cursor += width
+ elsif need_prev_char and found and prev_total
+ byte_size, width = prev_total
+ @byte_pointer += byte_size
+ @cursor += width
+ end
+ if inclusive
+ byte_size = Reline::Unicode.get_next_mbchar_size(@line, @byte_pointer)
+ if byte_size > 0
+ c = @line.byteslice(@byte_pointer, byte_size)
+ width = Reline::Unicode.get_mbchar_width(c)
+ @byte_pointer += byte_size
+ @cursor += width
+ end
+ end
+ @waiting_proc = nil
+ end
+
+ private def vi_prev_char(key, arg: 1)
+ @waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg) }
+ end
+
+ private def vi_to_prev_char(key, arg: 1)
+ @waiting_proc = ->(key_for_proc) { search_prev_char(key_for_proc, arg, true) }
+ end
+
+ private def search_prev_char(key, arg, need_next_char = false)
+ if key.instance_of?(String)
+ inputed_char = key
+ else
+ inputed_char = key.chr
+ end
+ prev_total = nil
+ total = nil
+ found = false
+ @line.byteslice(0..@byte_pointer).grapheme_clusters.reverse_each do |mbchar|
+ # total has [byte_size, cursor]
+ unless total
+ # skip cursor point
+ width = Reline::Unicode.get_mbchar_width(mbchar)
+ total = [mbchar.bytesize, width]
+ else
+ if inputed_char == mbchar
+ arg -= 1
+ if arg.zero?
+ found = true
+ break
+ end
+ end
+ width = Reline::Unicode.get_mbchar_width(mbchar)
+ prev_total = total
+ total = [total.first + mbchar.bytesize, total.last + width]
+ end
+ end
+ if not need_next_char and found and total
+ byte_size, width = total
+ @byte_pointer -= byte_size
+ @cursor -= width
+ elsif need_next_char and found and prev_total
+ byte_size, width = prev_total
+ @byte_pointer -= byte_size
+ @cursor -= width
end
@waiting_proc = nil
end
@@ -2126,10 +3345,10 @@ class Reline::LineEditor
alias_method :set_mark, :em_set_mark
private def em_exchange_mark(key)
+ return unless @mark_pointer
new_pointer = [@byte_pointer, @line_index]
@previous_line_index = @line_index
@byte_pointer, @line_index = @mark_pointer
- @byte_pointer, @line_index = @mark_pointer
@cursor = calculate_width(@line.byteslice(0, @byte_pointer))
@cursor_max = calculate_width(@line)
@mark_pointer = new_pointer
diff --git a/lib/reline/reline.gemspec b/lib/reline/reline.gemspec
index 3ced4b8488..7bf1f8758b 100644
--- a/lib/reline/reline.gemspec
+++ b/lib/reline/reline.gemspec
@@ -1,7 +1,9 @@
-lib = File.expand_path('../lib', __FILE__)
-$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
-require 'reline/version'
+begin
+ require_relative 'lib/reline/version'
+rescue LoadError
+ require_relative 'version'
+end
Gem::Specification.new do |spec|
spec.name = 'reline'
@@ -12,15 +14,12 @@ Gem::Specification.new do |spec|
spec.summary = %q{Alternative GNU Readline or Editline implementation by pure Ruby.}
spec.description = %q{Alternative GNU Readline or Editline implementation by pure Ruby.}
spec.homepage = 'https://github.com/ruby/reline'
- spec.license = 'Ruby License'
+ spec.license = 'Ruby'
- spec.files = Dir['BSDL', 'COPYING', 'README.md', 'lib/**/*']
+ spec.files = Dir['BSDL', 'COPYING', 'README.md', 'license_of_rb-readline', 'lib/**/*']
spec.require_paths = ['lib']
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5')
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.6')
spec.add_dependency 'io-console', '~> 0.5'
- spec.add_development_dependency 'bundler'
- spec.add_development_dependency 'rake'
- spec.add_development_dependency 'test-unit'
end
diff --git a/lib/reline/terminfo.rb b/lib/reline/terminfo.rb
new file mode 100644
index 0000000000..f53642b919
--- /dev/null
+++ b/lib/reline/terminfo.rb
@@ -0,0 +1,174 @@
+begin
+ require 'fiddle'
+ require 'fiddle/import'
+rescue LoadError
+ module Reline::Terminfo
+ def self.curses_dl
+ false
+ end
+ end
+end
+
+module Reline::Terminfo
+ extend Fiddle::Importer
+
+ class TerminfoError < StandardError; end
+
+ def self.curses_dl_files
+ case RUBY_PLATFORM
+ when /mingw/, /mswin/
+ # aren't supported
+ []
+ when /cygwin/
+ %w[cygncursesw-10.dll cygncurses-10.dll]
+ when /darwin/
+ %w[libncursesw.dylib libcursesw.dylib libncurses.dylib libcurses.dylib]
+ else
+ %w[libncursesw.so libcursesw.so libncurses.so libcurses.so]
+ end
+ end
+
+ @curses_dl = false
+ def self.curses_dl
+ return @curses_dl unless @curses_dl == false
+ if RUBY_VERSION >= '3.0.0'
+ # Gem module isn't defined in test-all of the Ruby repository, and
+ # Fiddle in Ruby 3.0.0 or later supports Fiddle::TYPE_VARIADIC.
+ fiddle_supports_variadic = true
+ elsif Fiddle.const_defined?(:VERSION,false) and Gem::Version.create(Fiddle::VERSION) >= Gem::Version.create('1.0.1')
+ # Fiddle::TYPE_VARIADIC is supported from Fiddle 1.0.1.
+ fiddle_supports_variadic = true
+ else
+ fiddle_supports_variadic = false
+ end
+ if fiddle_supports_variadic and not Fiddle.const_defined?(:TYPE_VARIADIC)
+ # If the libffi version is not 3.0.5 or higher, there isn't TYPE_VARIADIC.
+ fiddle_supports_variadic = false
+ end
+ if fiddle_supports_variadic
+ curses_dl_files.each do |curses_name|
+ result = Fiddle::Handle.new(curses_name)
+ rescue Fiddle::DLError
+ next
+ else
+ @curses_dl = result
+ break
+ end
+ end
+ @curses_dl = nil if @curses_dl == false
+ @curses_dl
+ end
+end if not Reline.const_defined?(:Terminfo) or not Reline::Terminfo.respond_to?(:curses_dl)
+
+module Reline::Terminfo
+ dlload curses_dl
+ #extern 'int setupterm(char *term, int fildes, int *errret)'
+ @setupterm = Fiddle::Function.new(curses_dl['setupterm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
+ #extern 'char *tigetstr(char *capname)'
+ @tigetstr = Fiddle::Function.new(curses_dl['tigetstr'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_VOIDP)
+ begin
+ #extern 'char *tiparm(const char *str, ...)'
+ @tiparm = Fiddle::Function.new(curses_dl['tiparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
+ rescue Fiddle::DLError
+ # OpenBSD lacks tiparm
+ #extern 'char *tparm(const char *str, ...)'
+ @tiparm = Fiddle::Function.new(curses_dl['tparm'], [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VARIADIC], Fiddle::TYPE_VOIDP)
+ end
+ begin
+ #extern 'int tigetflag(char *str)'
+ @tigetflag = Fiddle::Function.new(curses_dl['tigetflag'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
+ rescue Fiddle::DLError
+ # OpenBSD lacks tigetflag
+ #extern 'int tgetflag(char *str)'
+ @tigetflag = Fiddle::Function.new(curses_dl['tgetflag'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
+ end
+ begin
+ #extern 'int tigetnum(char *str)'
+ @tigetnum = Fiddle::Function.new(curses_dl['tigetnum'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
+ rescue Fiddle::DLError
+ # OpenBSD lacks tigetnum
+ #extern 'int tgetnum(char *str)'
+ @tigetnum = Fiddle::Function.new(curses_dl['tgetnum'], [Fiddle::TYPE_VOIDP], Fiddle::TYPE_INT)
+ end
+
+ def self.setupterm(term, fildes)
+ errret_int = Fiddle::Pointer.malloc(Fiddle::SIZEOF_INT)
+ ret = @setupterm.(term, fildes, errret_int)
+ errret = errret_int[0, Fiddle::SIZEOF_INT].unpack1('i')
+ case ret
+ when 0 # OK
+ 0
+ when -1 # ERR
+ case errret
+ when 1
+ raise TerminfoError.new('The terminal is hardcopy, cannot be used for curses applications.')
+ when 0
+ raise TerminfoError.new('The terminal could not be found, or that it is a generic type, having too little information for curses applications to run.')
+ when -1
+ raise TerminfoError.new('The terminfo database could not be found.')
+ else # unknown
+ -1
+ end
+ else # unknown
+ -2
+ end
+ end
+
+ class StringWithTiparm < String
+ def tiparm(*args) # for method chain
+ Reline::Terminfo.tiparm(self, *args)
+ end
+ end
+
+ def self.tigetstr(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
+ capability = @tigetstr.(capname)
+ case capability.to_i
+ when 0, -1
+ raise TerminfoError, "can't find capability: #{capname}"
+ end
+ StringWithTiparm.new(capability.to_s)
+ end
+
+ def self.tiparm(str, *args)
+ new_args = []
+ args.each do |a|
+ new_args << Fiddle::TYPE_INT << a
+ end
+ @tiparm.(str, *new_args).to_s
+ end
+
+ def self.tigetflag(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
+ flag = @tigetflag.(capname).to_i
+ case flag
+ when -1
+ raise TerminfoError, "not boolean capability: #{capname}"
+ when 0
+ raise TerminfoError, "can't find capability: #{capname}"
+ end
+ flag
+ end
+
+ def self.tigetnum(capname)
+ raise TerminfoError, "capname is not String: #{capname.inspect}" unless capname.is_a?(String)
+ num = @tigetnum.(capname).to_i
+ case num
+ when -2
+ raise TerminfoError, "not numeric capability: #{capname}"
+ when -1
+ raise TerminfoError, "can't find capability: #{capname}"
+ end
+ num
+ end
+
+ def self.enabled?
+ true
+ end
+end if Reline::Terminfo.curses_dl
+
+module Reline::Terminfo
+ def self.enabled?
+ false
+ end
+end unless Reline::Terminfo.curses_dl
diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb
index 4b30f044f3..6000c9f82a 100644
--- a/lib/reline/unicode.rb
+++ b/lib/reline/unicode.rb
@@ -35,6 +35,17 @@ class Reline::Unicode
}
EscapedChars = EscapedPairs.keys.map(&:chr)
+ NON_PRINTING_START = "\1"
+ NON_PRINTING_END = "\2"
+ CSI_REGEXP = /\e\[[\d;]*[ABCDEFGHJKSTfminsuhl]/
+ OSC_REGEXP = /\e\]\d+(?:;[^;]+)*\a/
+ WIDTH_SCANNER = /\G(?:(#{NON_PRINTING_START})|(#{NON_PRINTING_END})|(#{CSI_REGEXP})|(#{OSC_REGEXP})|(\X))/o
+ NON_PRINTING_START_INDEX = 0
+ NON_PRINTING_END_INDEX = 1
+ CSI_REGEXP_INDEX = 2
+ OSC_REGEXP_INDEX = 3
+ GRAPHEME_CLUSTER_INDEX = 4
+
def self.get_mbchar_byte_size_by_first_char(c)
# Checks UTF-8 character byte size
case c.ord
@@ -66,25 +77,153 @@ class Reline::Unicode
}.join
end
+ require 'reline/unicode/east_asian_width'
+
+ HalfwidthDakutenHandakuten = /[\u{FF9E}\u{FF9F}]/
+
+ MBCharWidthRE = /
+ (?<width_2_1>
+ [#{ EscapedChars.map {|c| "\\x%02x" % c.ord }.join }] (?# ^ + char, such as ^M, ^H, ^[, ...)
+ )
+ | (?<width_3>^\u{2E3B}) (?# THREE-EM DASH)
+ | (?<width_0>^\p{M})
+ | (?<width_2_2>
+ #{ EastAsianWidth::TYPE_F }
+ | #{ EastAsianWidth::TYPE_W }
+ )
+ | (?<width_1>
+ #{ EastAsianWidth::TYPE_H }
+ | #{ EastAsianWidth::TYPE_NA }
+ | #{ EastAsianWidth::TYPE_N }
+ )(?!#{ HalfwidthDakutenHandakuten })
+ | (?<width_2_3>
+ (?: #{ EastAsianWidth::TYPE_H }
+ | #{ EastAsianWidth::TYPE_NA }
+ | #{ EastAsianWidth::TYPE_N })
+ #{ HalfwidthDakutenHandakuten }
+ )
+ | (?<ambiguous_width>
+ #{EastAsianWidth::TYPE_A}
+ )
+ /x
+
def self.get_mbchar_width(mbchar)
- case mbchar.encode(Encoding::UTF_8)
- when *EscapedChars # ^ + char, such as ^M, ^H, ^[, ...
- 2
- when /^\u{2E3B}/ # THREE-EM DASH
- 3
- when /^\p{M}/
- 0
- when EastAsianWidth::TYPE_A
- Reline.ambiguous_width
- when EastAsianWidth::TYPE_F, EastAsianWidth::TYPE_W
- 2
- when EastAsianWidth::TYPE_H, EastAsianWidth::TYPE_NA, EastAsianWidth::TYPE_N
- 1
+ ord = mbchar.ord
+ if (0x00 <= ord and ord <= 0x1F) # in EscapedPairs
+ return 2
+ elsif (0x20 <= ord and ord <= 0x7E) # printable ASCII chars
+ return 1
+ end
+ m = mbchar.encode(Encoding::UTF_8).match(MBCharWidthRE)
+ case
+ when m.nil? then 1 # TODO should be U+FFFD � REPLACEMENT CHARACTER
+ when m[:width_2_1], m[:width_2_2], m[:width_2_3] then 2
+ when m[:width_3] then 3
+ when m[:width_0] then 0
+ when m[:width_1] then 1
+ when m[:ambiguous_width] then Reline.ambiguous_width
else
nil
end
end
+ def self.calculate_width(str, allow_escape_code = false)
+ if allow_escape_code
+ width = 0
+ rest = str.encode(Encoding::UTF_8)
+ in_zero_width = false
+ rest.scan(WIDTH_SCANNER) do |gc|
+ case
+ when gc[NON_PRINTING_START_INDEX]
+ in_zero_width = true
+ when gc[NON_PRINTING_END_INDEX]
+ in_zero_width = false
+ when gc[CSI_REGEXP_INDEX], gc[OSC_REGEXP_INDEX]
+ when gc[GRAPHEME_CLUSTER_INDEX]
+ gc = gc[GRAPHEME_CLUSTER_INDEX]
+ unless in_zero_width
+ width += get_mbchar_width(gc)
+ end
+ end
+ end
+ width
+ else
+ str.encode(Encoding::UTF_8).grapheme_clusters.inject(0) { |w, gc|
+ w + get_mbchar_width(gc)
+ }
+ end
+ end
+
+ def self.split_by_width(str, max_width, encoding = str.encoding)
+ lines = [String.new(encoding: encoding)]
+ height = 1
+ width = 0
+ rest = str.encode(Encoding::UTF_8)
+ in_zero_width = false
+ rest.scan(WIDTH_SCANNER) do |gc|
+ case
+ when gc[NON_PRINTING_START_INDEX]
+ in_zero_width = true
+ when gc[NON_PRINTING_END_INDEX]
+ in_zero_width = false
+ when gc[CSI_REGEXP_INDEX]
+ lines.last << gc[CSI_REGEXP_INDEX]
+ when gc[OSC_REGEXP_INDEX]
+ lines.last << gc[OSC_REGEXP_INDEX]
+ when gc[GRAPHEME_CLUSTER_INDEX]
+ gc = gc[GRAPHEME_CLUSTER_INDEX]
+ unless in_zero_width
+ mbchar_width = get_mbchar_width(gc)
+ if (width += mbchar_width) > max_width
+ width = mbchar_width
+ lines << nil
+ lines << String.new(encoding: encoding)
+ height += 1
+ end
+ end
+ lines.last << gc
+ end
+ end
+ # The cursor moves to next line in first
+ if width == max_width
+ lines << nil
+ lines << String.new(encoding: encoding)
+ height += 1
+ end
+ [lines, height]
+ end
+
+ # Take a chunk of a String cut by width with escape sequences.
+ def self.take_range(str, start_col, max_width, encoding = str.encoding)
+ chunk = String.new(encoding: encoding)
+ total_width = 0
+ rest = str.encode(Encoding::UTF_8)
+ in_zero_width = false
+ rest.scan(WIDTH_SCANNER) do |gc|
+ case
+ when gc[NON_PRINTING_START_INDEX]
+ in_zero_width = true
+ when gc[NON_PRINTING_END_INDEX]
+ in_zero_width = false
+ when gc[CSI_REGEXP_INDEX]
+ chunk << gc[CSI_REGEXP_INDEX]
+ when gc[OSC_REGEXP_INDEX]
+ chunk << gc[OSC_REGEXP_INDEX]
+ when gc[GRAPHEME_CLUSTER_INDEX]
+ gc = gc[GRAPHEME_CLUSTER_INDEX]
+ if in_zero_width
+ chunk << gc
+ else
+ mbchar_width = get_mbchar_width(gc)
+ total_width += mbchar_width
+ break if (start_col + max_width) < total_width
+ chunk << gc if start_col < total_width
+ end
+ end
+ end
+ chunk
+ end
+
def self.get_next_mbchar_size(line, byte_pointer)
grapheme = line.byteslice(byte_pointer..-1).grapheme_clusters.first
grapheme ? grapheme.bytesize : 0
@@ -359,8 +498,8 @@ class Reline::Unicode
[byte_size, width]
end
- def self.vi_forward_word(line, byte_pointer)
- if (line.bytesize - 1) > byte_pointer
+ def self.vi_forward_word(line, byte_pointer, drop_terminate_spaces = false)
+ if line.bytesize > byte_pointer
size = get_next_mbchar_size(line, byte_pointer)
mbchar = line.byteslice(byte_pointer, size)
if mbchar =~ /\w/
@@ -375,7 +514,7 @@ class Reline::Unicode
else
return [0, 0]
end
- while (line.bytesize - 1) > (byte_pointer + byte_size)
+ while line.bytesize > (byte_pointer + byte_size)
size = get_next_mbchar_size(line, byte_pointer + byte_size)
mbchar = line.byteslice(byte_pointer + byte_size, size)
case started_by
@@ -389,7 +528,8 @@ class Reline::Unicode
width += get_mbchar_width(mbchar)
byte_size += size
end
- while (line.bytesize - 1) > (byte_pointer + byte_size)
+ return [byte_size, width] if drop_terminate_spaces
+ while line.bytesize > (byte_pointer + byte_size)
size = get_next_mbchar_size(line, byte_pointer + byte_size)
mbchar = line.byteslice(byte_pointer + byte_size, size)
break if mbchar =~ /\S/
@@ -523,5 +663,3 @@ class Reline::Unicode
[byte_size, width]
end
end
-
-require 'reline/unicode/east_asian_width'
diff --git a/lib/reline/unicode/east_asian_width.rb b/lib/reline/unicode/east_asian_width.rb
index b2749ab754..89bc9d9435 100644
--- a/lib/reline/unicode/east_asian_width.rb
+++ b/lib/reline/unicode/east_asian_width.rb
@@ -1,1145 +1,1164 @@
class Reline::Unicode::EastAsianWidth
# This is based on EastAsianWidth.txt
- # http://www.unicode.org/Public/12.1.0/ucd/EastAsianWidth.txt
+ # EastAsianWidth.txt
# Fullwidth
- TYPE_F = /^(
- \u{3000} |
- [\u{FF01}-\u{FF60}] |
- [\u{FFE0}-\u{FFE6}]
- )/x
+ TYPE_F = /^[#{ %W(
+ \u{3000}
+ \u{FF01}-\u{FF60}
+ \u{FFE0}-\u{FFE6}
+ ).join }]/
# Halfwidth
- TYPE_H = /^(
- \u{20A9} |
- [\u{FF61}-\u{FFBE}] |
- [\u{FFC2}-\u{FFC7}] |
- [\u{FFCA}-\u{FFCF}] |
- [\u{FFD2}-\u{FFD7}] |
- [\u{FFDA}-\u{FFDC}] |
- [\u{FFE8}-\u{FFEE}]
- )/x
+ TYPE_H = /^[#{ %W(
+ \u{20A9}
+ \u{FF61}-\u{FFBE}
+ \u{FFC2}-\u{FFC7}
+ \u{FFCA}-\u{FFCF}
+ \u{FFD2}-\u{FFD7}
+ \u{FFDA}-\u{FFDC}
+ \u{FFE8}-\u{FFEE}
+ ).join }]/
# Wide
- TYPE_W = /^(
- [\u{1100}-\u{115F}] |
- [\u{231A}-\u{231B}] |
- [\u{2329}-\u{232A}] |
- [\u{23E9}-\u{23EC}] |
- \u{23F0} |
- \u{23F3} |
- [\u{25FD}-\u{25FE}] |
- [\u{2614}-\u{2615}] |
- [\u{2648}-\u{2653}] |
- \u{267F} |
- \u{2693} |
- \u{26A1} |
- [\u{26AA}-\u{26AB}] |
- [\u{26BD}-\u{26BE}] |
- [\u{26C4}-\u{26C5}] |
- \u{26CE} |
- \u{26D4} |
- \u{26EA} |
- [\u{26F2}-\u{26F3}] |
- \u{26F5} |
- \u{26FA} |
- \u{26FD} |
- \u{2705} |
- [\u{270A}-\u{270B}] |
- \u{2728} |
- \u{274C} |
- \u{274E} |
- [\u{2753}-\u{2755}] |
- \u{2757} |
- [\u{2795}-\u{2797}] |
- \u{27B0} |
- \u{27BF} |
- [\u{2B1B}-\u{2B1C}] |
- \u{2B50} |
- \u{2B55} |
- [\u{2E80}-\u{2E99}] |
- [\u{2E9B}-\u{2EF3}] |
- [\u{2F00}-\u{2FD5}] |
- [\u{2FF0}-\u{2FFB}] |
- [\u{3001}-\u{303E}] |
- [\u{3041}-\u{3096}] |
- [\u{3099}-\u{30FF}] |
- [\u{3105}-\u{312F}] |
- [\u{3131}-\u{318E}] |
- [\u{3190}-\u{31BA}] |
- [\u{31C0}-\u{31E3}] |
- [\u{31F0}-\u{321E}] |
- [\u{3220}-\u{3247}] |
- [\u{3250}-\u{4DBF}] |
- [\u{4E00}-\u{A48C}] |
- [\u{A490}-\u{A4C6}] |
- [\u{A960}-\u{A97C}] |
- [\u{AC00}-\u{D7A3}] |
- [\u{F900}-\u{FAFF}] |
- [\u{FE10}-\u{FE19}] |
- [\u{FE30}-\u{FE52}] |
- [\u{FE54}-\u{FE66}] |
- [\u{FE68}-\u{FE6B}] |
- [\u{16FE0}-\u{16FE3}] |
- [\u{17000}-\u{187F7}] |
- [\u{18800}-\u{18AF2}] |
- [\u{1B000}-\u{1B11E}] |
- [\u{1B150}-\u{1B152}] |
- [\u{1B164}-\u{1B167}] |
- [\u{1B170}-\u{1B2FB}] |
- \u{1F004} |
- \u{1F0CF} |
- \u{1F18E} |
- [\u{1F191}-\u{1F19A}] |
- [\u{1F200}-\u{1F202}] |
- [\u{1F210}-\u{1F23B}] |
- [\u{1F240}-\u{1F248}] |
- [\u{1F250}-\u{1F251}] |
- [\u{1F260}-\u{1F265}] |
- [\u{1F300}-\u{1F320}] |
- [\u{1F32D}-\u{1F335}] |
- [\u{1F337}-\u{1F37C}] |
- [\u{1F37E}-\u{1F393}] |
- [\u{1F3A0}-\u{1F3CA}] |
- [\u{1F3CF}-\u{1F3D3}] |
- [\u{1F3E0}-\u{1F3F0}] |
- \u{1F3F4} |
- [\u{1F3F8}-\u{1F43E}] |
- \u{1F440} |
- [\u{1F442}-\u{1F4FC}] |
- [\u{1F4FF}-\u{1F53D}] |
- [\u{1F54B}-\u{1F54E}] |
- [\u{1F550}-\u{1F567}] |
- \u{1F57A} |
- [\u{1F595}-\u{1F596}] |
- \u{1F5A4} |
- [\u{1F5FB}-\u{1F64F}] |
- [\u{1F680}-\u{1F6C5}] |
- \u{1F6CC} |
- [\u{1F6D0}-\u{1F6D2}] |
- \u{1F6D5} |
- [\u{1F6EB}-\u{1F6EC}] |
- [\u{1F6F4}-\u{1F6FA}] |
- [\u{1F7E0}-\u{1F7EB}] |
- [\u{1F90D}-\u{1F971}] |
- [\u{1F973}-\u{1F976}] |
- [\u{1F97A}-\u{1F9A2}] |
- [\u{1F9A5}-\u{1F9AA}] |
- [\u{1F9AE}-\u{1F9CA}] |
- [\u{1F9CD}-\u{1F9FF}] |
- [\u{1FA70}-\u{1FA73}] |
- [\u{1FA78}-\u{1FA7A}] |
- [\u{1FA80}-\u{1FA82}] |
- [\u{1FA90}-\u{1FA95}] |
- [\u{20000}-\u{2FFFD}] |
- [\u{30000}-\u{3FFFD}]
- )/x
+ TYPE_W = /^[#{ %W(
+ \u{1100}-\u{115F}
+ \u{231A}-\u{231B}
+ \u{2329}-\u{232A}
+ \u{23E9}-\u{23EC}
+ \u{23F0}
+ \u{23F3}
+ \u{25FD}-\u{25FE}
+ \u{2614}-\u{2615}
+ \u{2648}-\u{2653}
+ \u{267F}
+ \u{2693}
+ \u{26A1}
+ \u{26AA}-\u{26AB}
+ \u{26BD}-\u{26BE}
+ \u{26C4}-\u{26C5}
+ \u{26CE}
+ \u{26D4}
+ \u{26EA}
+ \u{26F2}-\u{26F3}
+ \u{26F5}
+ \u{26FA}
+ \u{26FD}
+ \u{2705}
+ \u{270A}-\u{270B}
+ \u{2728}
+ \u{274C}
+ \u{274E}
+ \u{2753}-\u{2755}
+ \u{2757}
+ \u{2795}-\u{2797}
+ \u{27B0}
+ \u{27BF}
+ \u{2B1B}-\u{2B1C}
+ \u{2B50}
+ \u{2B55}
+ \u{2E80}-\u{2E99}
+ \u{2E9B}-\u{2EF3}
+ \u{2F00}-\u{2FD5}
+ \u{2FF0}-\u{2FFB}
+ \u{3001}-\u{303E}
+ \u{3041}-\u{3096}
+ \u{3099}-\u{30FF}
+ \u{3105}-\u{312F}
+ \u{3131}-\u{318E}
+ \u{3190}-\u{31E3}
+ \u{31F0}-\u{321E}
+ \u{3220}-\u{3247}
+ \u{3250}-\u{4DBF}
+ \u{4E00}-\u{A48C}
+ \u{A490}-\u{A4C6}
+ \u{A960}-\u{A97C}
+ \u{AC00}-\u{D7A3}
+ \u{F900}-\u{FAFF}
+ \u{FE10}-\u{FE19}
+ \u{FE30}-\u{FE52}
+ \u{FE54}-\u{FE66}
+ \u{FE68}-\u{FE6B}
+ \u{16FE0}-\u{16FE4}
+ \u{16FF0}-\u{16FF1}
+ \u{17000}-\u{187F7}
+ \u{18800}-\u{18CD5}
+ \u{18D00}-\u{18D08}
+ \u{1B000}-\u{1B11E}
+ \u{1B150}-\u{1B152}
+ \u{1B164}-\u{1B167}
+ \u{1B170}-\u{1B2FB}
+ \u{1F004}
+ \u{1F0CF}
+ \u{1F18E}
+ \u{1F191}-\u{1F19A}
+ \u{1F200}-\u{1F202}
+ \u{1F210}-\u{1F23B}
+ \u{1F240}-\u{1F248}
+ \u{1F250}-\u{1F251}
+ \u{1F260}-\u{1F265}
+ \u{1F300}-\u{1F320}
+ \u{1F32D}-\u{1F335}
+ \u{1F337}-\u{1F37C}
+ \u{1F37E}-\u{1F393}
+ \u{1F3A0}-\u{1F3CA}
+ \u{1F3CF}-\u{1F3D3}
+ \u{1F3E0}-\u{1F3F0}
+ \u{1F3F4}
+ \u{1F3F8}-\u{1F43E}
+ \u{1F440}
+ \u{1F442}-\u{1F4FC}
+ \u{1F4FF}-\u{1F53D}
+ \u{1F54B}-\u{1F54E}
+ \u{1F550}-\u{1F567}
+ \u{1F57A}
+ \u{1F595}-\u{1F596}
+ \u{1F5A4}
+ \u{1F5FB}-\u{1F64F}
+ \u{1F680}-\u{1F6C5}
+ \u{1F6CC}
+ \u{1F6D0}-\u{1F6D2}
+ \u{1F6D5}-\u{1F6D7}
+ \u{1F6EB}-\u{1F6EC}
+ \u{1F6F4}-\u{1F6FC}
+ \u{1F7E0}-\u{1F7EB}
+ \u{1F90C}-\u{1F93A}
+ \u{1F93C}-\u{1F945}
+ \u{1F947}-\u{1F978}
+ \u{1F97A}-\u{1F9CB}
+ \u{1F9CD}-\u{1F9FF}
+ \u{1FA70}-\u{1FA74}
+ \u{1FA78}-\u{1FA7A}
+ \u{1FA80}-\u{1FA86}
+ \u{1FA90}-\u{1FAA8}
+ \u{1FAB0}-\u{1FAB6}
+ \u{1FAC0}-\u{1FAC2}
+ \u{1FAD0}-\u{1FAD6}
+ \u{20000}-\u{2FFFD}
+ \u{30000}-\u{3FFFD}
+ ).join }]/
# Narrow
- TYPE_NA = /^(
- [\u{0020}-\u{007E}] |
- [\u{00A2}-\u{00A3}] |
- [\u{00A5}-\u{00A6}] |
- \u{00AC} |
- \u{00AF} |
- [\u{27E6}-\u{27ED}] |
- [\u{2985}-\u{2986}]
- )/x
+ TYPE_NA = /^[#{ %W(
+ \u{0020}-\u{007E}
+ \u{00A2}-\u{00A3}
+ \u{00A5}-\u{00A6}
+ \u{00AC}
+ \u{00AF}
+ \u{27E6}-\u{27ED}
+ \u{2985}-\u{2986}
+ ).join }]/
# Ambiguous
- TYPE_A = /^(
- \u{00A1} |
- \u{00A4} |
- [\u{00A7}-\u{00A8}] |
- \u{00AA} |
- [\u{00AD}-\u{00AE}] |
- [\u{00B0}-\u{00B4}] |
- [\u{00B6}-\u{00BA}] |
- [\u{00BC}-\u{00BF}] |
- \u{00C6} |
- \u{00D0} |
- [\u{00D7}-\u{00D8}] |
- [\u{00DE}-\u{00E1}] |
- \u{00E6} |
- [\u{00E8}-\u{00EA}] |
- [\u{00EC}-\u{00ED}] |
- \u{00F0} |
- [\u{00F2}-\u{00F3}] |
- [\u{00F7}-\u{00FA}] |
- \u{00FC} |
- \u{00FE} |
- \u{0101} |
- \u{0111} |
- \u{0113} |
- \u{011B} |
- [\u{0126}-\u{0127}] |
- \u{012B} |
- [\u{0131}-\u{0133}] |
- \u{0138} |
- [\u{013F}-\u{0142}] |
- \u{0144} |
- [\u{0148}-\u{014B}] |
- \u{014D} |
- [\u{0152}-\u{0153}] |
- [\u{0166}-\u{0167}] |
- \u{016B} |
- \u{01CE} |
- \u{01D0} |
- \u{01D2} |
- \u{01D4} |
- \u{01D6} |
- \u{01D8} |
- \u{01DA} |
- \u{01DC} |
- \u{0251} |
- \u{0261} |
- \u{02C4} |
- \u{02C7} |
- [\u{02C9}-\u{02CB}] |
- \u{02CD} |
- \u{02D0} |
- [\u{02D8}-\u{02DB}] |
- \u{02DD} |
- \u{02DF} |
- [\u{0300}-\u{036F}] |
- [\u{0391}-\u{03A1}] |
- [\u{03A3}-\u{03A9}] |
- [\u{03B1}-\u{03C1}] |
- [\u{03C3}-\u{03C9}] |
- \u{0401} |
- [\u{0410}-\u{044F}] |
- \u{0451} |
- \u{2010} |
- [\u{2013}-\u{2016}] |
- [\u{2018}-\u{2019}] |
- [\u{201C}-\u{201D}] |
- [\u{2020}-\u{2022}] |
- [\u{2024}-\u{2027}] |
- \u{2030} |
- [\u{2032}-\u{2033}] |
- \u{2035} |
- \u{203B} |
- \u{203E} |
- \u{2074} |
- \u{207F} |
- [\u{2081}-\u{2084}] |
- \u{20AC} |
- \u{2103} |
- \u{2105} |
- \u{2109} |
- \u{2113} |
- \u{2116} |
- [\u{2121}-\u{2122}] |
- \u{2126} |
- \u{212B} |
- [\u{2153}-\u{2154}] |
- [\u{215B}-\u{215E}] |
- [\u{2160}-\u{216B}] |
- [\u{2170}-\u{2179}] |
- \u{2189} |
- [\u{2190}-\u{2199}] |
- [\u{21B8}-\u{21B9}] |
- \u{21D2} |
- \u{21D4} |
- \u{21E7} |
- \u{2200} |
- [\u{2202}-\u{2203}] |
- [\u{2207}-\u{2208}] |
- \u{220B} |
- \u{220F} |
- \u{2211} |
- \u{2215} |
- \u{221A} |
- [\u{221D}-\u{2220}] |
- \u{2223} |
- \u{2225} |
- [\u{2227}-\u{222C}] |
- \u{222E} |
- [\u{2234}-\u{2237}] |
- [\u{223C}-\u{223D}] |
- \u{2248} |
- \u{224C} |
- \u{2252} |
- [\u{2260}-\u{2261}] |
- [\u{2264}-\u{2267}] |
- [\u{226A}-\u{226B}] |
- [\u{226E}-\u{226F}] |
- [\u{2282}-\u{2283}] |
- [\u{2286}-\u{2287}] |
- \u{2295} |
- \u{2299} |
- \u{22A5} |
- \u{22BF} |
- \u{2312} |
- [\u{2460}-\u{24E9}] |
- [\u{24EB}-\u{254B}] |
- [\u{2550}-\u{2573}] |
- [\u{2580}-\u{258F}] |
- [\u{2592}-\u{2595}] |
- [\u{25A0}-\u{25A1}] |
- [\u{25A3}-\u{25A9}] |
- [\u{25B2}-\u{25B3}] |
- [\u{25B6}-\u{25B7}] |
- [\u{25BC}-\u{25BD}] |
- [\u{25C0}-\u{25C1}] |
- [\u{25C6}-\u{25C8}] |
- \u{25CB} |
- [\u{25CE}-\u{25D1}] |
- [\u{25E2}-\u{25E5}] |
- \u{25EF} |
- [\u{2605}-\u{2606}] |
- \u{2609} |
- [\u{260E}-\u{260F}] |
- \u{261C} |
- \u{261E} |
- \u{2640} |
- \u{2642} |
- [\u{2660}-\u{2661}] |
- [\u{2663}-\u{2665}] |
- [\u{2667}-\u{266A}] |
- [\u{266C}-\u{266D}] |
- \u{266F} |
- [\u{269E}-\u{269F}] |
- \u{26BF} |
- [\u{26C6}-\u{26CD}] |
- [\u{26CF}-\u{26D3}] |
- [\u{26D5}-\u{26E1}] |
- \u{26E3} |
- [\u{26E8}-\u{26E9}] |
- [\u{26EB}-\u{26F1}] |
- \u{26F4} |
- [\u{26F6}-\u{26F9}] |
- [\u{26FB}-\u{26FC}] |
- [\u{26FE}-\u{26FF}] |
- \u{273D} |
- [\u{2776}-\u{277F}] |
- [\u{2B56}-\u{2B59}] |
- [\u{3248}-\u{324F}] |
- [\u{E000}-\u{F8FF}] |
- [\u{FE00}-\u{FE0F}] |
- \u{FFFD} |
- [\u{1F100}-\u{1F10A}] |
- [\u{1F110}-\u{1F12D}] |
- [\u{1F130}-\u{1F169}] |
- [\u{1F170}-\u{1F18D}] |
- [\u{1F18F}-\u{1F190}] |
- [\u{1F19B}-\u{1F1AC}] |
- [\u{E0100}-\u{E01EF}] |
- [\u{F0000}-\u{FFFFD}] |
- [\u{100000}-\u{10FFFD}]
- )/x
+ TYPE_A = /^[#{ %W(
+ \u{00A1}
+ \u{00A4}
+ \u{00A7}-\u{00A8}
+ \u{00AA}
+ \u{00AD}-\u{00AE}
+ \u{00B0}-\u{00B4}
+ \u{00B6}-\u{00BA}
+ \u{00BC}-\u{00BF}
+ \u{00C6}
+ \u{00D0}
+ \u{00D7}-\u{00D8}
+ \u{00DE}-\u{00E1}
+ \u{00E6}
+ \u{00E8}-\u{00EA}
+ \u{00EC}-\u{00ED}
+ \u{00F0}
+ \u{00F2}-\u{00F3}
+ \u{00F7}-\u{00FA}
+ \u{00FC}
+ \u{00FE}
+ \u{0101}
+ \u{0111}
+ \u{0113}
+ \u{011B}
+ \u{0126}-\u{0127}
+ \u{012B}
+ \u{0131}-\u{0133}
+ \u{0138}
+ \u{013F}-\u{0142}
+ \u{0144}
+ \u{0148}-\u{014B}
+ \u{014D}
+ \u{0152}-\u{0153}
+ \u{0166}-\u{0167}
+ \u{016B}
+ \u{01CE}
+ \u{01D0}
+ \u{01D2}
+ \u{01D4}
+ \u{01D6}
+ \u{01D8}
+ \u{01DA}
+ \u{01DC}
+ \u{0251}
+ \u{0261}
+ \u{02C4}
+ \u{02C7}
+ \u{02C9}-\u{02CB}
+ \u{02CD}
+ \u{02D0}
+ \u{02D8}-\u{02DB}
+ \u{02DD}
+ \u{02DF}
+ \u{0300}-\u{036F}
+ \u{0391}-\u{03A1}
+ \u{03A3}-\u{03A9}
+ \u{03B1}-\u{03C1}
+ \u{03C3}-\u{03C9}
+ \u{0401}
+ \u{0410}-\u{044F}
+ \u{0451}
+ \u{2010}
+ \u{2013}-\u{2016}
+ \u{2018}-\u{2019}
+ \u{201C}-\u{201D}
+ \u{2020}-\u{2022}
+ \u{2024}-\u{2027}
+ \u{2030}
+ \u{2032}-\u{2033}
+ \u{2035}
+ \u{203B}
+ \u{203E}
+ \u{2074}
+ \u{207F}
+ \u{2081}-\u{2084}
+ \u{20AC}
+ \u{2103}
+ \u{2105}
+ \u{2109}
+ \u{2113}
+ \u{2116}
+ \u{2121}-\u{2122}
+ \u{2126}
+ \u{212B}
+ \u{2153}-\u{2154}
+ \u{215B}-\u{215E}
+ \u{2160}-\u{216B}
+ \u{2170}-\u{2179}
+ \u{2189}
+ \u{2190}-\u{2199}
+ \u{21B8}-\u{21B9}
+ \u{21D2}
+ \u{21D4}
+ \u{21E7}
+ \u{2200}
+ \u{2202}-\u{2203}
+ \u{2207}-\u{2208}
+ \u{220B}
+ \u{220F}
+ \u{2211}
+ \u{2215}
+ \u{221A}
+ \u{221D}-\u{2220}
+ \u{2223}
+ \u{2225}
+ \u{2227}-\u{222C}
+ \u{222E}
+ \u{2234}-\u{2237}
+ \u{223C}-\u{223D}
+ \u{2248}
+ \u{224C}
+ \u{2252}
+ \u{2260}-\u{2261}
+ \u{2264}-\u{2267}
+ \u{226A}-\u{226B}
+ \u{226E}-\u{226F}
+ \u{2282}-\u{2283}
+ \u{2286}-\u{2287}
+ \u{2295}
+ \u{2299}
+ \u{22A5}
+ \u{22BF}
+ \u{2312}
+ \u{2460}-\u{24E9}
+ \u{24EB}-\u{254B}
+ \u{2550}-\u{2573}
+ \u{2580}-\u{258F}
+ \u{2592}-\u{2595}
+ \u{25A0}-\u{25A1}
+ \u{25A3}-\u{25A9}
+ \u{25B2}-\u{25B3}
+ \u{25B6}-\u{25B7}
+ \u{25BC}-\u{25BD}
+ \u{25C0}-\u{25C1}
+ \u{25C6}-\u{25C8}
+ \u{25CB}
+ \u{25CE}-\u{25D1}
+ \u{25E2}-\u{25E5}
+ \u{25EF}
+ \u{2605}-\u{2606}
+ \u{2609}
+ \u{260E}-\u{260F}
+ \u{261C}
+ \u{261E}
+ \u{2640}
+ \u{2642}
+ \u{2660}-\u{2661}
+ \u{2663}-\u{2665}
+ \u{2667}-\u{266A}
+ \u{266C}-\u{266D}
+ \u{266F}
+ \u{269E}-\u{269F}
+ \u{26BF}
+ \u{26C6}-\u{26CD}
+ \u{26CF}-\u{26D3}
+ \u{26D5}-\u{26E1}
+ \u{26E3}
+ \u{26E8}-\u{26E9}
+ \u{26EB}-\u{26F1}
+ \u{26F4}
+ \u{26F6}-\u{26F9}
+ \u{26FB}-\u{26FC}
+ \u{26FE}-\u{26FF}
+ \u{273D}
+ \u{2776}-\u{277F}
+ \u{2B56}-\u{2B59}
+ \u{3248}-\u{324F}
+ \u{E000}-\u{F8FF}
+ \u{FE00}-\u{FE0F}
+ \u{FFFD}
+ \u{1F100}-\u{1F10A}
+ \u{1F110}-\u{1F12D}
+ \u{1F130}-\u{1F169}
+ \u{1F170}-\u{1F18D}
+ \u{1F18F}-\u{1F190}
+ \u{1F19B}-\u{1F1AC}
+ \u{E0100}-\u{E01EF}
+ \u{F0000}-\u{FFFFD}
+ \u{100000}-\u{10FFFD}
+ ).join }]/
# Neutral
- TYPE_N = /^(
- [\u{0000}-\u{001F}] |
- [\u{007F}-\u{00A0}] |
- \u{00A9} |
- \u{00AB} |
- \u{00B5} |
- \u{00BB} |
- [\u{00C0}-\u{00C5}] |
- [\u{00C7}-\u{00CF}] |
- [\u{00D1}-\u{00D6}] |
- [\u{00D9}-\u{00DD}] |
- [\u{00E2}-\u{00E5}] |
- \u{00E7} |
- \u{00EB} |
- [\u{00EE}-\u{00EF}] |
- \u{00F1} |
- [\u{00F4}-\u{00F6}] |
- \u{00FB} |
- \u{00FD} |
- [\u{00FF}-\u{0100}] |
- [\u{0102}-\u{0110}] |
- \u{0112} |
- [\u{0114}-\u{011A}] |
- [\u{011C}-\u{0125}] |
- [\u{0128}-\u{012A}] |
- [\u{012C}-\u{0130}] |
- [\u{0134}-\u{0137}] |
- [\u{0139}-\u{013E}] |
- \u{0143} |
- [\u{0145}-\u{0147}] |
- \u{014C} |
- [\u{014E}-\u{0151}] |
- [\u{0154}-\u{0165}] |
- [\u{0168}-\u{016A}] |
- [\u{016C}-\u{01CD}] |
- \u{01CF} |
- \u{01D1} |
- \u{01D3} |
- \u{01D5} |
- \u{01D7} |
- \u{01D9} |
- \u{01DB} |
- [\u{01DD}-\u{0250}] |
- [\u{0252}-\u{0260}] |
- [\u{0262}-\u{02C3}] |
- [\u{02C5}-\u{02C6}] |
- \u{02C8} |
- \u{02CC} |
- [\u{02CE}-\u{02CF}] |
- [\u{02D1}-\u{02D7}] |
- \u{02DC} |
- \u{02DE} |
- [\u{02E0}-\u{02FF}] |
- [\u{0370}-\u{0377}] |
- [\u{037A}-\u{037F}] |
- [\u{0384}-\u{038A}] |
- \u{038C} |
- [\u{038E}-\u{0390}] |
- [\u{03AA}-\u{03B0}] |
- \u{03C2} |
- [\u{03CA}-\u{0400}] |
- [\u{0402}-\u{040F}] |
- \u{0450} |
- [\u{0452}-\u{052F}] |
- [\u{0531}-\u{0556}] |
- [\u{0559}-\u{058A}] |
- [\u{058D}-\u{058F}] |
- [\u{0591}-\u{05C7}] |
- [\u{05D0}-\u{05EA}] |
- [\u{05EF}-\u{05F4}] |
- [\u{0600}-\u{061C}] |
- [\u{061E}-\u{070D}] |
- [\u{070F}-\u{074A}] |
- [\u{074D}-\u{07B1}] |
- [\u{07C0}-\u{07FA}] |
- [\u{07FD}-\u{082D}] |
- [\u{0830}-\u{083E}] |
- [\u{0840}-\u{085B}] |
- \u{085E} |
- [\u{0860}-\u{086A}] |
- [\u{08A0}-\u{08B4}] |
- [\u{08B6}-\u{08BD}] |
- [\u{08D3}-\u{0983}] |
- [\u{0985}-\u{098C}] |
- [\u{098F}-\u{0990}] |
- [\u{0993}-\u{09A8}] |
- [\u{09AA}-\u{09B0}] |
- \u{09B2} |
- [\u{09B6}-\u{09B9}] |
- [\u{09BC}-\u{09C4}] |
- [\u{09C7}-\u{09C8}] |
- [\u{09CB}-\u{09CE}] |
- \u{09D7} |
- [\u{09DC}-\u{09DD}] |
- [\u{09DF}-\u{09E3}] |
- [\u{09E6}-\u{09FE}] |
- [\u{0A01}-\u{0A03}] |
- [\u{0A05}-\u{0A0A}] |
- [\u{0A0F}-\u{0A10}] |
- [\u{0A13}-\u{0A28}] |
- [\u{0A2A}-\u{0A30}] |
- [\u{0A32}-\u{0A33}] |
- [\u{0A35}-\u{0A36}] |
- [\u{0A38}-\u{0A39}] |
- \u{0A3C} |
- [\u{0A3E}-\u{0A42}] |
- [\u{0A47}-\u{0A48}] |
- [\u{0A4B}-\u{0A4D}] |
- \u{0A51} |
- [\u{0A59}-\u{0A5C}] |
- \u{0A5E} |
- [\u{0A66}-\u{0A76}] |
- [\u{0A81}-\u{0A83}] |
- [\u{0A85}-\u{0A8D}] |
- [\u{0A8F}-\u{0A91}] |
- [\u{0A93}-\u{0AA8}] |
- [\u{0AAA}-\u{0AB0}] |
- [\u{0AB2}-\u{0AB3}] |
- [\u{0AB5}-\u{0AB9}] |
- [\u{0ABC}-\u{0AC5}] |
- [\u{0AC7}-\u{0AC9}] |
- [\u{0ACB}-\u{0ACD}] |
- \u{0AD0} |
- [\u{0AE0}-\u{0AE3}] |
- [\u{0AE6}-\u{0AF1}] |
- [\u{0AF9}-\u{0AFF}] |
- [\u{0B01}-\u{0B03}] |
- [\u{0B05}-\u{0B0C}] |
- [\u{0B0F}-\u{0B10}] |
- [\u{0B13}-\u{0B28}] |
- [\u{0B2A}-\u{0B30}] |
- [\u{0B32}-\u{0B33}] |
- [\u{0B35}-\u{0B39}] |
- [\u{0B3C}-\u{0B44}] |
- [\u{0B47}-\u{0B48}] |
- [\u{0B4B}-\u{0B4D}] |
- [\u{0B56}-\u{0B57}] |
- [\u{0B5C}-\u{0B5D}] |
- [\u{0B5F}-\u{0B63}] |
- [\u{0B66}-\u{0B77}] |
- [\u{0B82}-\u{0B83}] |
- [\u{0B85}-\u{0B8A}] |
- [\u{0B8E}-\u{0B90}] |
- [\u{0B92}-\u{0B95}] |
- [\u{0B99}-\u{0B9A}] |
- \u{0B9C} |
- [\u{0B9E}-\u{0B9F}] |
- [\u{0BA3}-\u{0BA4}] |
- [\u{0BA8}-\u{0BAA}] |
- [\u{0BAE}-\u{0BB9}] |
- [\u{0BBE}-\u{0BC2}] |
- [\u{0BC6}-\u{0BC8}] |
- [\u{0BCA}-\u{0BCD}] |
- \u{0BD0} |
- \u{0BD7} |
- [\u{0BE6}-\u{0BFA}] |
- [\u{0C00}-\u{0C0C}] |
- [\u{0C0E}-\u{0C10}] |
- [\u{0C12}-\u{0C28}] |
- [\u{0C2A}-\u{0C39}] |
- [\u{0C3D}-\u{0C44}] |
- [\u{0C46}-\u{0C48}] |
- [\u{0C4A}-\u{0C4D}] |
- [\u{0C55}-\u{0C56}] |
- [\u{0C58}-\u{0C5A}] |
- [\u{0C60}-\u{0C63}] |
- [\u{0C66}-\u{0C6F}] |
- [\u{0C77}-\u{0C8C}] |
- [\u{0C8E}-\u{0C90}] |
- [\u{0C92}-\u{0CA8}] |
- [\u{0CAA}-\u{0CB3}] |
- [\u{0CB5}-\u{0CB9}] |
- [\u{0CBC}-\u{0CC4}] |
- [\u{0CC6}-\u{0CC8}] |
- [\u{0CCA}-\u{0CCD}] |
- [\u{0CD5}-\u{0CD6}] |
- \u{0CDE} |
- [\u{0CE0}-\u{0CE3}] |
- [\u{0CE6}-\u{0CEF}] |
- [\u{0CF1}-\u{0CF2}] |
- [\u{0D00}-\u{0D03}] |
- [\u{0D05}-\u{0D0C}] |
- [\u{0D0E}-\u{0D10}] |
- [\u{0D12}-\u{0D44}] |
- [\u{0D46}-\u{0D48}] |
- [\u{0D4A}-\u{0D4F}] |
- [\u{0D54}-\u{0D63}] |
- [\u{0D66}-\u{0D7F}] |
- [\u{0D82}-\u{0D83}] |
- [\u{0D85}-\u{0D96}] |
- [\u{0D9A}-\u{0DB1}] |
- [\u{0DB3}-\u{0DBB}] |
- \u{0DBD} |
- [\u{0DC0}-\u{0DC6}] |
- \u{0DCA} |
- [\u{0DCF}-\u{0DD4}] |
- \u{0DD6} |
- [\u{0DD8}-\u{0DDF}] |
- [\u{0DE6}-\u{0DEF}] |
- [\u{0DF2}-\u{0DF4}] |
- [\u{0E01}-\u{0E3A}] |
- [\u{0E3F}-\u{0E5B}] |
- [\u{0E81}-\u{0E82}] |
- \u{0E84} |
- [\u{0E86}-\u{0E8A}] |
- [\u{0E8C}-\u{0EA3}] |
- \u{0EA5} |
- [\u{0EA7}-\u{0EBD}] |
- [\u{0EC0}-\u{0EC4}] |
- \u{0EC6} |
- [\u{0EC8}-\u{0ECD}] |
- [\u{0ED0}-\u{0ED9}] |
- [\u{0EDC}-\u{0EDF}] |
- [\u{0F00}-\u{0F47}] |
- [\u{0F49}-\u{0F6C}] |
- [\u{0F71}-\u{0F97}] |
- [\u{0F99}-\u{0FBC}] |
- [\u{0FBE}-\u{0FCC}] |
- [\u{0FCE}-\u{0FDA}] |
- [\u{1000}-\u{10C5}] |
- \u{10C7} |
- \u{10CD} |
- [\u{10D0}-\u{10FF}] |
- [\u{1160}-\u{1248}] |
- [\u{124A}-\u{124D}] |
- [\u{1250}-\u{1256}] |
- \u{1258} |
- [\u{125A}-\u{125D}] |
- [\u{1260}-\u{1288}] |
- [\u{128A}-\u{128D}] |
- [\u{1290}-\u{12B0}] |
- [\u{12B2}-\u{12B5}] |
- [\u{12B8}-\u{12BE}] |
- \u{12C0} |
- [\u{12C2}-\u{12C5}] |
- [\u{12C8}-\u{12D6}] |
- [\u{12D8}-\u{1310}] |
- [\u{1312}-\u{1315}] |
- [\u{1318}-\u{135A}] |
- [\u{135D}-\u{137C}] |
- [\u{1380}-\u{1399}] |
- [\u{13A0}-\u{13F5}] |
- [\u{13F8}-\u{13FD}] |
- [\u{1400}-\u{169C}] |
- [\u{16A0}-\u{16F8}] |
- [\u{1700}-\u{170C}] |
- [\u{170E}-\u{1714}] |
- [\u{1720}-\u{1736}] |
- [\u{1740}-\u{1753}] |
- [\u{1760}-\u{176C}] |
- [\u{176E}-\u{1770}] |
- [\u{1772}-\u{1773}] |
- [\u{1780}-\u{17DD}] |
- [\u{17E0}-\u{17E9}] |
- [\u{17F0}-\u{17F9}] |
- [\u{1800}-\u{180E}] |
- [\u{1810}-\u{1819}] |
- [\u{1820}-\u{1878}] |
- [\u{1880}-\u{18AA}] |
- [\u{18B0}-\u{18F5}] |
- [\u{1900}-\u{191E}] |
- [\u{1920}-\u{192B}] |
- [\u{1930}-\u{193B}] |
- \u{1940} |
- [\u{1944}-\u{196D}] |
- [\u{1970}-\u{1974}] |
- [\u{1980}-\u{19AB}] |
- [\u{19B0}-\u{19C9}] |
- [\u{19D0}-\u{19DA}] |
- [\u{19DE}-\u{1A1B}] |
- [\u{1A1E}-\u{1A5E}] |
- [\u{1A60}-\u{1A7C}] |
- [\u{1A7F}-\u{1A89}] |
- [\u{1A90}-\u{1A99}] |
- [\u{1AA0}-\u{1AAD}] |
- [\u{1AB0}-\u{1ABE}] |
- [\u{1B00}-\u{1B4B}] |
- [\u{1B50}-\u{1B7C}] |
- [\u{1B80}-\u{1BF3}] |
- [\u{1BFC}-\u{1C37}] |
- [\u{1C3B}-\u{1C49}] |
- [\u{1C4D}-\u{1C88}] |
- [\u{1C90}-\u{1CBA}] |
- [\u{1CBD}-\u{1CC7}] |
- [\u{1CD0}-\u{1CFA}] |
- [\u{1D00}-\u{1DF9}] |
- [\u{1DFB}-\u{1F15}] |
- [\u{1F18}-\u{1F1D}] |
- [\u{1F20}-\u{1F45}] |
- [\u{1F48}-\u{1F4D}] |
- [\u{1F50}-\u{1F57}] |
- \u{1F59} |
- \u{1F5B} |
- \u{1F5D} |
- [\u{1F5F}-\u{1F7D}] |
- [\u{1F80}-\u{1FB4}] |
- [\u{1FB6}-\u{1FC4}] |
- [\u{1FC6}-\u{1FD3}] |
- [\u{1FD6}-\u{1FDB}] |
- [\u{1FDD}-\u{1FEF}] |
- [\u{1FF2}-\u{1FF4}] |
- [\u{1FF6}-\u{1FFE}] |
- [\u{2000}-\u{200F}] |
- [\u{2011}-\u{2012}] |
- \u{2017} |
- [\u{201A}-\u{201B}] |
- [\u{201E}-\u{201F}] |
- \u{2023} |
- [\u{2028}-\u{202F}] |
- \u{2031} |
- \u{2034} |
- [\u{2036}-\u{203A}] |
- [\u{203C}-\u{203D}] |
- [\u{203F}-\u{2064}] |
- [\u{2066}-\u{2071}] |
- [\u{2075}-\u{207E}] |
- \u{2080} |
- [\u{2085}-\u{208E}] |
- [\u{2090}-\u{209C}] |
- [\u{20A0}-\u{20A8}] |
- [\u{20AA}-\u{20AB}] |
- [\u{20AD}-\u{20BF}] |
- [\u{20D0}-\u{20F0}] |
- [\u{2100}-\u{2102}] |
- \u{2104} |
- [\u{2106}-\u{2108}] |
- [\u{210A}-\u{2112}] |
- [\u{2114}-\u{2115}] |
- [\u{2117}-\u{2120}] |
- [\u{2123}-\u{2125}] |
- [\u{2127}-\u{212A}] |
- [\u{212C}-\u{2152}] |
- [\u{2155}-\u{215A}] |
- \u{215F} |
- [\u{216C}-\u{216F}] |
- [\u{217A}-\u{2188}] |
- [\u{218A}-\u{218B}] |
- [\u{219A}-\u{21B7}] |
- [\u{21BA}-\u{21D1}] |
- \u{21D3} |
- [\u{21D5}-\u{21E6}] |
- [\u{21E8}-\u{21FF}] |
- \u{2201} |
- [\u{2204}-\u{2206}] |
- [\u{2209}-\u{220A}] |
- [\u{220C}-\u{220E}] |
- \u{2210} |
- [\u{2212}-\u{2214}] |
- [\u{2216}-\u{2219}] |
- [\u{221B}-\u{221C}] |
- [\u{2221}-\u{2222}] |
- \u{2224} |
- \u{2226} |
- \u{222D} |
- [\u{222F}-\u{2233}] |
- [\u{2238}-\u{223B}] |
- [\u{223E}-\u{2247}] |
- [\u{2249}-\u{224B}] |
- [\u{224D}-\u{2251}] |
- [\u{2253}-\u{225F}] |
- [\u{2262}-\u{2263}] |
- [\u{2268}-\u{2269}] |
- [\u{226C}-\u{226D}] |
- [\u{2270}-\u{2281}] |
- [\u{2284}-\u{2285}] |
- [\u{2288}-\u{2294}] |
- [\u{2296}-\u{2298}] |
- [\u{229A}-\u{22A4}] |
- [\u{22A6}-\u{22BE}] |
- [\u{22C0}-\u{2311}] |
- [\u{2313}-\u{2319}] |
- [\u{231C}-\u{2328}] |
- [\u{232B}-\u{23E8}] |
- [\u{23ED}-\u{23EF}] |
- [\u{23F1}-\u{23F2}] |
- [\u{23F4}-\u{2426}] |
- [\u{2440}-\u{244A}] |
- \u{24EA} |
- [\u{254C}-\u{254F}] |
- [\u{2574}-\u{257F}] |
- [\u{2590}-\u{2591}] |
- [\u{2596}-\u{259F}] |
- \u{25A2} |
- [\u{25AA}-\u{25B1}] |
- [\u{25B4}-\u{25B5}] |
- [\u{25B8}-\u{25BB}] |
- [\u{25BE}-\u{25BF}] |
- [\u{25C2}-\u{25C5}] |
- [\u{25C9}-\u{25CA}] |
- [\u{25CC}-\u{25CD}] |
- [\u{25D2}-\u{25E1}] |
- [\u{25E6}-\u{25EE}] |
- [\u{25F0}-\u{25FC}] |
- [\u{25FF}-\u{2604}] |
- [\u{2607}-\u{2608}] |
- [\u{260A}-\u{260D}] |
- [\u{2610}-\u{2613}] |
- [\u{2616}-\u{261B}] |
- \u{261D} |
- [\u{261F}-\u{263F}] |
- \u{2641} |
- [\u{2643}-\u{2647}] |
- [\u{2654}-\u{265F}] |
- \u{2662} |
- \u{2666} |
- \u{266B} |
- \u{266E} |
- [\u{2670}-\u{267E}] |
- [\u{2680}-\u{2692}] |
- [\u{2694}-\u{269D}] |
- \u{26A0} |
- [\u{26A2}-\u{26A9}] |
- [\u{26AC}-\u{26BC}] |
- [\u{26C0}-\u{26C3}] |
- \u{26E2} |
- [\u{26E4}-\u{26E7}] |
- [\u{2700}-\u{2704}] |
- [\u{2706}-\u{2709}] |
- [\u{270C}-\u{2727}] |
- [\u{2729}-\u{273C}] |
- [\u{273E}-\u{274B}] |
- \u{274D} |
- [\u{274F}-\u{2752}] |
- \u{2756} |
- [\u{2758}-\u{2775}] |
- [\u{2780}-\u{2794}] |
- [\u{2798}-\u{27AF}] |
- [\u{27B1}-\u{27BE}] |
- [\u{27C0}-\u{27E5}] |
- [\u{27EE}-\u{2984}] |
- [\u{2987}-\u{2B1A}] |
- [\u{2B1D}-\u{2B4F}] |
- [\u{2B51}-\u{2B54}] |
- [\u{2B5A}-\u{2B73}] |
- [\u{2B76}-\u{2B95}] |
- [\u{2B98}-\u{2C2E}] |
- [\u{2C30}-\u{2C5E}] |
- [\u{2C60}-\u{2CF3}] |
- [\u{2CF9}-\u{2D25}] |
- \u{2D27} |
- \u{2D2D} |
- [\u{2D30}-\u{2D67}] |
- [\u{2D6F}-\u{2D70}] |
- [\u{2D7F}-\u{2D96}] |
- [\u{2DA0}-\u{2DA6}] |
- [\u{2DA8}-\u{2DAE}] |
- [\u{2DB0}-\u{2DB6}] |
- [\u{2DB8}-\u{2DBE}] |
- [\u{2DC0}-\u{2DC6}] |
- [\u{2DC8}-\u{2DCE}] |
- [\u{2DD0}-\u{2DD6}] |
- [\u{2DD8}-\u{2DDE}] |
- [\u{2DE0}-\u{2E4F}] |
- \u{303F} |
- [\u{4DC0}-\u{4DFF}] |
- [\u{A4D0}-\u{A62B}] |
- [\u{A640}-\u{A6F7}] |
- [\u{A700}-\u{A7BF}] |
- [\u{A7C2}-\u{A7C6}] |
- [\u{A7F7}-\u{A82B}] |
- [\u{A830}-\u{A839}] |
- [\u{A840}-\u{A877}] |
- [\u{A880}-\u{A8C5}] |
- [\u{A8CE}-\u{A8D9}] |
- [\u{A8E0}-\u{A953}] |
- \u{A95F} |
- [\u{A980}-\u{A9CD}] |
- [\u{A9CF}-\u{A9D9}] |
- [\u{A9DE}-\u{A9FE}] |
- [\u{AA00}-\u{AA36}] |
- [\u{AA40}-\u{AA4D}] |
- [\u{AA50}-\u{AA59}] |
- [\u{AA5C}-\u{AAC2}] |
- [\u{AADB}-\u{AAF6}] |
- [\u{AB01}-\u{AB06}] |
- [\u{AB09}-\u{AB0E}] |
- [\u{AB11}-\u{AB16}] |
- [\u{AB20}-\u{AB26}] |
- [\u{AB28}-\u{AB2E}] |
- [\u{AB30}-\u{AB67}] |
- [\u{AB70}-\u{ABED}] |
- [\u{ABF0}-\u{ABF9}] |
- [\u{D7B0}-\u{D7C6}] |
- [\u{D7CB}-\u{D7FB}] |
- [\u{FB00}-\u{FB06}] |
- [\u{FB13}-\u{FB17}] |
- [\u{FB1D}-\u{FB36}] |
- [\u{FB38}-\u{FB3C}] |
- \u{FB3E} |
- [\u{FB40}-\u{FB41}] |
- [\u{FB43}-\u{FB44}] |
- [\u{FB46}-\u{FBC1}] |
- [\u{FBD3}-\u{FD3F}] |
- [\u{FD50}-\u{FD8F}] |
- [\u{FD92}-\u{FDC7}] |
- [\u{FDF0}-\u{FDFD}] |
- [\u{FE20}-\u{FE2F}] |
- [\u{FE70}-\u{FE74}] |
- [\u{FE76}-\u{FEFC}] |
- \u{FEFF} |
- [\u{FFF9}-\u{FFFC}] |
- [\u{10000}-\u{1000B}] |
- [\u{1000D}-\u{10026}] |
- [\u{10028}-\u{1003A}] |
- [\u{1003C}-\u{1003D}] |
- [\u{1003F}-\u{1004D}] |
- [\u{10050}-\u{1005D}] |
- [\u{10080}-\u{100FA}] |
- [\u{10100}-\u{10102}] |
- [\u{10107}-\u{10133}] |
- [\u{10137}-\u{1018E}] |
- [\u{10190}-\u{1019B}] |
- \u{101A0} |
- [\u{101D0}-\u{101FD}] |
- [\u{10280}-\u{1029C}] |
- [\u{102A0}-\u{102D0}] |
- [\u{102E0}-\u{102FB}] |
- [\u{10300}-\u{10323}] |
- [\u{1032D}-\u{1034A}] |
- [\u{10350}-\u{1037A}] |
- [\u{10380}-\u{1039D}] |
- [\u{1039F}-\u{103C3}] |
- [\u{103C8}-\u{103D5}] |
- [\u{10400}-\u{1049D}] |
- [\u{104A0}-\u{104A9}] |
- [\u{104B0}-\u{104D3}] |
- [\u{104D8}-\u{104FB}] |
- [\u{10500}-\u{10527}] |
- [\u{10530}-\u{10563}] |
- \u{1056F} |
- [\u{10600}-\u{10736}] |
- [\u{10740}-\u{10755}] |
- [\u{10760}-\u{10767}] |
- [\u{10800}-\u{10805}] |
- \u{10808} |
- [\u{1080A}-\u{10835}] |
- [\u{10837}-\u{10838}] |
- \u{1083C} |
- [\u{1083F}-\u{10855}] |
- [\u{10857}-\u{1089E}] |
- [\u{108A7}-\u{108AF}] |
- [\u{108E0}-\u{108F2}] |
- [\u{108F4}-\u{108F5}] |
- [\u{108FB}-\u{1091B}] |
- [\u{1091F}-\u{10939}] |
- \u{1093F} |
- [\u{10980}-\u{109B7}] |
- [\u{109BC}-\u{109CF}] |
- [\u{109D2}-\u{10A03}] |
- [\u{10A05}-\u{10A06}] |
- [\u{10A0C}-\u{10A13}] |
- [\u{10A15}-\u{10A17}] |
- [\u{10A19}-\u{10A35}] |
- [\u{10A38}-\u{10A3A}] |
- [\u{10A3F}-\u{10A48}] |
- [\u{10A50}-\u{10A58}] |
- [\u{10A60}-\u{10A9F}] |
- [\u{10AC0}-\u{10AE6}] |
- [\u{10AEB}-\u{10AF6}] |
- [\u{10B00}-\u{10B35}] |
- [\u{10B39}-\u{10B55}] |
- [\u{10B58}-\u{10B72}] |
- [\u{10B78}-\u{10B91}] |
- [\u{10B99}-\u{10B9C}] |
- [\u{10BA9}-\u{10BAF}] |
- [\u{10C00}-\u{10C48}] |
- [\u{10C80}-\u{10CB2}] |
- [\u{10CC0}-\u{10CF2}] |
- [\u{10CFA}-\u{10D27}] |
- [\u{10D30}-\u{10D39}] |
- [\u{10E60}-\u{10E7E}] |
- [\u{10F00}-\u{10F27}] |
- [\u{10F30}-\u{10F59}] |
- [\u{10FE0}-\u{10FF6}] |
- [\u{11000}-\u{1104D}] |
- [\u{11052}-\u{1106F}] |
- [\u{1107F}-\u{110C1}] |
- \u{110CD} |
- [\u{110D0}-\u{110E8}] |
- [\u{110F0}-\u{110F9}] |
- [\u{11100}-\u{11134}] |
- [\u{11136}-\u{11146}] |
- [\u{11150}-\u{11176}] |
- [\u{11180}-\u{111CD}] |
- [\u{111D0}-\u{111DF}] |
- [\u{111E1}-\u{111F4}] |
- [\u{11200}-\u{11211}] |
- [\u{11213}-\u{1123E}] |
- [\u{11280}-\u{11286}] |
- \u{11288} |
- [\u{1128A}-\u{1128D}] |
- [\u{1128F}-\u{1129D}] |
- [\u{1129F}-\u{112A9}] |
- [\u{112B0}-\u{112EA}] |
- [\u{112F0}-\u{112F9}] |
- [\u{11300}-\u{11303}] |
- [\u{11305}-\u{1130C}] |
- [\u{1130F}-\u{11310}] |
- [\u{11313}-\u{11328}] |
- [\u{1132A}-\u{11330}] |
- [\u{11332}-\u{11333}] |
- [\u{11335}-\u{11339}] |
- [\u{1133B}-\u{11344}] |
- [\u{11347}-\u{11348}] |
- [\u{1134B}-\u{1134D}] |
- \u{11350} |
- \u{11357} |
- [\u{1135D}-\u{11363}] |
- [\u{11366}-\u{1136C}] |
- [\u{11370}-\u{11374}] |
- [\u{11400}-\u{11459}] |
- \u{1145B} |
- [\u{1145D}-\u{1145F}] |
- [\u{11480}-\u{114C7}] |
- [\u{114D0}-\u{114D9}] |
- [\u{11580}-\u{115B5}] |
- [\u{115B8}-\u{115DD}] |
- [\u{11600}-\u{11644}] |
- [\u{11650}-\u{11659}] |
- [\u{11660}-\u{1166C}] |
- [\u{11680}-\u{116B8}] |
- [\u{116C0}-\u{116C9}] |
- [\u{11700}-\u{1171A}] |
- [\u{1171D}-\u{1172B}] |
- [\u{11730}-\u{1173F}] |
- [\u{11800}-\u{1183B}] |
- [\u{118A0}-\u{118F2}] |
- \u{118FF} |
- [\u{119A0}-\u{119A7}] |
- [\u{119AA}-\u{119D7}] |
- [\u{119DA}-\u{119E4}] |
- [\u{11A00}-\u{11A47}] |
- [\u{11A50}-\u{11AA2}] |
- [\u{11AC0}-\u{11AF8}] |
- [\u{11C00}-\u{11C08}] |
- [\u{11C0A}-\u{11C36}] |
- [\u{11C38}-\u{11C45}] |
- [\u{11C50}-\u{11C6C}] |
- [\u{11C70}-\u{11C8F}] |
- [\u{11C92}-\u{11CA7}] |
- [\u{11CA9}-\u{11CB6}] |
- [\u{11D00}-\u{11D06}] |
- [\u{11D08}-\u{11D09}] |
- [\u{11D0B}-\u{11D36}] |
- \u{11D3A} |
- [\u{11D3C}-\u{11D3D}] |
- [\u{11D3F}-\u{11D47}] |
- [\u{11D50}-\u{11D59}] |
- [\u{11D60}-\u{11D65}] |
- [\u{11D67}-\u{11D68}] |
- [\u{11D6A}-\u{11D8E}] |
- [\u{11D90}-\u{11D91}] |
- [\u{11D93}-\u{11D98}] |
- [\u{11DA0}-\u{11DA9}] |
- [\u{11EE0}-\u{11EF8}] |
- [\u{11FC0}-\u{11FF1}] |
- [\u{11FFF}-\u{12399}] |
- [\u{12400}-\u{1246E}] |
- [\u{12470}-\u{12474}] |
- [\u{12480}-\u{12543}] |
- [\u{13000}-\u{1342E}] |
- [\u{13430}-\u{13438}] |
- [\u{14400}-\u{14646}] |
- [\u{16800}-\u{16A38}] |
- [\u{16A40}-\u{16A5E}] |
- [\u{16A60}-\u{16A69}] |
- [\u{16A6E}-\u{16A6F}] |
- [\u{16AD0}-\u{16AED}] |
- [\u{16AF0}-\u{16AF5}] |
- [\u{16B00}-\u{16B45}] |
- [\u{16B50}-\u{16B59}] |
- [\u{16B5B}-\u{16B61}] |
- [\u{16B63}-\u{16B77}] |
- [\u{16B7D}-\u{16B8F}] |
- [\u{16E40}-\u{16E9A}] |
- [\u{16F00}-\u{16F4A}] |
- [\u{16F4F}-\u{16F87}] |
- [\u{16F8F}-\u{16F9F}] |
- [\u{1BC00}-\u{1BC6A}] |
- [\u{1BC70}-\u{1BC7C}] |
- [\u{1BC80}-\u{1BC88}] |
- [\u{1BC90}-\u{1BC99}] |
- [\u{1BC9C}-\u{1BCA3}] |
- [\u{1D000}-\u{1D0F5}] |
- [\u{1D100}-\u{1D126}] |
- [\u{1D129}-\u{1D1E8}] |
- [\u{1D200}-\u{1D245}] |
- [\u{1D2E0}-\u{1D2F3}] |
- [\u{1D300}-\u{1D356}] |
- [\u{1D360}-\u{1D378}] |
- [\u{1D400}-\u{1D454}] |
- [\u{1D456}-\u{1D49C}] |
- [\u{1D49E}-\u{1D49F}] |
- \u{1D4A2} |
- [\u{1D4A5}-\u{1D4A6}] |
- [\u{1D4A9}-\u{1D4AC}] |
- [\u{1D4AE}-\u{1D4B9}] |
- \u{1D4BB} |
- [\u{1D4BD}-\u{1D4C3}] |
- [\u{1D4C5}-\u{1D505}] |
- [\u{1D507}-\u{1D50A}] |
- [\u{1D50D}-\u{1D514}] |
- [\u{1D516}-\u{1D51C}] |
- [\u{1D51E}-\u{1D539}] |
- [\u{1D53B}-\u{1D53E}] |
- [\u{1D540}-\u{1D544}] |
- \u{1D546} |
- [\u{1D54A}-\u{1D550}] |
- [\u{1D552}-\u{1D6A5}] |
- [\u{1D6A8}-\u{1D7CB}] |
- [\u{1D7CE}-\u{1DA8B}] |
- [\u{1DA9B}-\u{1DA9F}] |
- [\u{1DAA1}-\u{1DAAF}] |
- [\u{1E000}-\u{1E006}] |
- [\u{1E008}-\u{1E018}] |
- [\u{1E01B}-\u{1E021}] |
- [\u{1E023}-\u{1E024}] |
- [\u{1E026}-\u{1E02A}] |
- [\u{1E100}-\u{1E12C}] |
- [\u{1E130}-\u{1E13D}] |
- [\u{1E140}-\u{1E149}] |
- [\u{1E14E}-\u{1E14F}] |
- [\u{1E2C0}-\u{1E2F9}] |
- \u{1E2FF} |
- [\u{1E800}-\u{1E8C4}] |
- [\u{1E8C7}-\u{1E8D6}] |
- [\u{1E900}-\u{1E94B}] |
- [\u{1E950}-\u{1E959}] |
- [\u{1E95E}-\u{1E95F}] |
- [\u{1EC71}-\u{1ECB4}] |
- [\u{1ED01}-\u{1ED3D}] |
- [\u{1EE00}-\u{1EE03}] |
- [\u{1EE05}-\u{1EE1F}] |
- [\u{1EE21}-\u{1EE22}] |
- \u{1EE24} |
- \u{1EE27} |
- [\u{1EE29}-\u{1EE32}] |
- [\u{1EE34}-\u{1EE37}] |
- \u{1EE39} |
- \u{1EE3B} |
- \u{1EE42} |
- \u{1EE47} |
- \u{1EE49} |
- \u{1EE4B} |
- [\u{1EE4D}-\u{1EE4F}] |
- [\u{1EE51}-\u{1EE52}] |
- \u{1EE54} |
- \u{1EE57} |
- \u{1EE59} |
- \u{1EE5B} |
- \u{1EE5D} |
- \u{1EE5F} |
- [\u{1EE61}-\u{1EE62}] |
- \u{1EE64} |
- [\u{1EE67}-\u{1EE6A}] |
- [\u{1EE6C}-\u{1EE72}] |
- [\u{1EE74}-\u{1EE77}] |
- [\u{1EE79}-\u{1EE7C}] |
- \u{1EE7E} |
- [\u{1EE80}-\u{1EE89}] |
- [\u{1EE8B}-\u{1EE9B}] |
- [\u{1EEA1}-\u{1EEA3}] |
- [\u{1EEA5}-\u{1EEA9}] |
- [\u{1EEAB}-\u{1EEBB}] |
- [\u{1EEF0}-\u{1EEF1}] |
- [\u{1F000}-\u{1F003}] |
- [\u{1F005}-\u{1F02B}] |
- [\u{1F030}-\u{1F093}] |
- [\u{1F0A0}-\u{1F0AE}] |
- [\u{1F0B1}-\u{1F0BF}] |
- [\u{1F0C1}-\u{1F0CE}] |
- [\u{1F0D1}-\u{1F0F5}] |
- [\u{1F10B}-\u{1F10C}] |
- [\u{1F12E}-\u{1F12F}] |
- [\u{1F16A}-\u{1F16C}] |
- [\u{1F1E6}-\u{1F1FF}] |
- [\u{1F321}-\u{1F32C}] |
- \u{1F336} |
- \u{1F37D} |
- [\u{1F394}-\u{1F39F}] |
- [\u{1F3CB}-\u{1F3CE}] |
- [\u{1F3D4}-\u{1F3DF}] |
- [\u{1F3F1}-\u{1F3F3}] |
- [\u{1F3F5}-\u{1F3F7}] |
- \u{1F43F} |
- \u{1F441} |
- [\u{1F4FD}-\u{1F4FE}] |
- [\u{1F53E}-\u{1F54A}] |
- \u{1F54F} |
- [\u{1F568}-\u{1F579}] |
- [\u{1F57B}-\u{1F594}] |
- [\u{1F597}-\u{1F5A3}] |
- [\u{1F5A5}-\u{1F5FA}] |
- [\u{1F650}-\u{1F67F}] |
- [\u{1F6C6}-\u{1F6CB}] |
- [\u{1F6CD}-\u{1F6CF}] |
- [\u{1F6D3}-\u{1F6D4}] |
- [\u{1F6E0}-\u{1F6EA}] |
- [\u{1F6F0}-\u{1F6F3}] |
- [\u{1F700}-\u{1F773}] |
- [\u{1F780}-\u{1F7D8}] |
- [\u{1F800}-\u{1F80B}] |
- [\u{1F810}-\u{1F847}] |
- [\u{1F850}-\u{1F859}] |
- [\u{1F860}-\u{1F887}] |
- [\u{1F890}-\u{1F8AD}] |
- [\u{1F900}-\u{1F90B}] |
- [\u{1FA00}-\u{1FA53}] |
- [\u{1FA60}-\u{1FA6D}] |
- \u{E0001} |
- [\u{E0020}-\u{E007F}]
- )/x
+ TYPE_N = /^[#{ %W(
+ \u{0000}-\u{001F}
+ \u{007F}-\u{00A0}
+ \u{00A9}
+ \u{00AB}
+ \u{00B5}
+ \u{00BB}
+ \u{00C0}-\u{00C5}
+ \u{00C7}-\u{00CF}
+ \u{00D1}-\u{00D6}
+ \u{00D9}-\u{00DD}
+ \u{00E2}-\u{00E5}
+ \u{00E7}
+ \u{00EB}
+ \u{00EE}-\u{00EF}
+ \u{00F1}
+ \u{00F4}-\u{00F6}
+ \u{00FB}
+ \u{00FD}
+ \u{00FF}-\u{0100}
+ \u{0102}-\u{0110}
+ \u{0112}
+ \u{0114}-\u{011A}
+ \u{011C}-\u{0125}
+ \u{0128}-\u{012A}
+ \u{012C}-\u{0130}
+ \u{0134}-\u{0137}
+ \u{0139}-\u{013E}
+ \u{0143}
+ \u{0145}-\u{0147}
+ \u{014C}
+ \u{014E}-\u{0151}
+ \u{0154}-\u{0165}
+ \u{0168}-\u{016A}
+ \u{016C}-\u{01CD}
+ \u{01CF}
+ \u{01D1}
+ \u{01D3}
+ \u{01D5}
+ \u{01D7}
+ \u{01D9}
+ \u{01DB}
+ \u{01DD}-\u{0250}
+ \u{0252}-\u{0260}
+ \u{0262}-\u{02C3}
+ \u{02C5}-\u{02C6}
+ \u{02C8}
+ \u{02CC}
+ \u{02CE}-\u{02CF}
+ \u{02D1}-\u{02D7}
+ \u{02DC}
+ \u{02DE}
+ \u{02E0}-\u{02FF}
+ \u{0370}-\u{0377}
+ \u{037A}-\u{037F}
+ \u{0384}-\u{038A}
+ \u{038C}
+ \u{038E}-\u{0390}
+ \u{03AA}-\u{03B0}
+ \u{03C2}
+ \u{03CA}-\u{0400}
+ \u{0402}-\u{040F}
+ \u{0450}
+ \u{0452}-\u{052F}
+ \u{0531}-\u{0556}
+ \u{0559}-\u{058A}
+ \u{058D}-\u{058F}
+ \u{0591}-\u{05C7}
+ \u{05D0}-\u{05EA}
+ \u{05EF}-\u{05F4}
+ \u{0600}-\u{061C}
+ \u{061E}-\u{070D}
+ \u{070F}-\u{074A}
+ \u{074D}-\u{07B1}
+ \u{07C0}-\u{07FA}
+ \u{07FD}-\u{082D}
+ \u{0830}-\u{083E}
+ \u{0840}-\u{085B}
+ \u{085E}
+ \u{0860}-\u{086A}
+ \u{08A0}-\u{08B4}
+ \u{08B6}-\u{08C7}
+ \u{08D3}-\u{0983}
+ \u{0985}-\u{098C}
+ \u{098F}-\u{0990}
+ \u{0993}-\u{09A8}
+ \u{09AA}-\u{09B0}
+ \u{09B2}
+ \u{09B6}-\u{09B9}
+ \u{09BC}-\u{09C4}
+ \u{09C7}-\u{09C8}
+ \u{09CB}-\u{09CE}
+ \u{09D7}
+ \u{09DC}-\u{09DD}
+ \u{09DF}-\u{09E3}
+ \u{09E6}-\u{09FE}
+ \u{0A01}-\u{0A03}
+ \u{0A05}-\u{0A0A}
+ \u{0A0F}-\u{0A10}
+ \u{0A13}-\u{0A28}
+ \u{0A2A}-\u{0A30}
+ \u{0A32}-\u{0A33}
+ \u{0A35}-\u{0A36}
+ \u{0A38}-\u{0A39}
+ \u{0A3C}
+ \u{0A3E}-\u{0A42}
+ \u{0A47}-\u{0A48}
+ \u{0A4B}-\u{0A4D}
+ \u{0A51}
+ \u{0A59}-\u{0A5C}
+ \u{0A5E}
+ \u{0A66}-\u{0A76}
+ \u{0A81}-\u{0A83}
+ \u{0A85}-\u{0A8D}
+ \u{0A8F}-\u{0A91}
+ \u{0A93}-\u{0AA8}
+ \u{0AAA}-\u{0AB0}
+ \u{0AB2}-\u{0AB3}
+ \u{0AB5}-\u{0AB9}
+ \u{0ABC}-\u{0AC5}
+ \u{0AC7}-\u{0AC9}
+ \u{0ACB}-\u{0ACD}
+ \u{0AD0}
+ \u{0AE0}-\u{0AE3}
+ \u{0AE6}-\u{0AF1}
+ \u{0AF9}-\u{0AFF}
+ \u{0B01}-\u{0B03}
+ \u{0B05}-\u{0B0C}
+ \u{0B0F}-\u{0B10}
+ \u{0B13}-\u{0B28}
+ \u{0B2A}-\u{0B30}
+ \u{0B32}-\u{0B33}
+ \u{0B35}-\u{0B39}
+ \u{0B3C}-\u{0B44}
+ \u{0B47}-\u{0B48}
+ \u{0B4B}-\u{0B4D}
+ \u{0B55}-\u{0B57}
+ \u{0B5C}-\u{0B5D}
+ \u{0B5F}-\u{0B63}
+ \u{0B66}-\u{0B77}
+ \u{0B82}-\u{0B83}
+ \u{0B85}-\u{0B8A}
+ \u{0B8E}-\u{0B90}
+ \u{0B92}-\u{0B95}
+ \u{0B99}-\u{0B9A}
+ \u{0B9C}
+ \u{0B9E}-\u{0B9F}
+ \u{0BA3}-\u{0BA4}
+ \u{0BA8}-\u{0BAA}
+ \u{0BAE}-\u{0BB9}
+ \u{0BBE}-\u{0BC2}
+ \u{0BC6}-\u{0BC8}
+ \u{0BCA}-\u{0BCD}
+ \u{0BD0}
+ \u{0BD7}
+ \u{0BE6}-\u{0BFA}
+ \u{0C00}-\u{0C0C}
+ \u{0C0E}-\u{0C10}
+ \u{0C12}-\u{0C28}
+ \u{0C2A}-\u{0C39}
+ \u{0C3D}-\u{0C44}
+ \u{0C46}-\u{0C48}
+ \u{0C4A}-\u{0C4D}
+ \u{0C55}-\u{0C56}
+ \u{0C58}-\u{0C5A}
+ \u{0C60}-\u{0C63}
+ \u{0C66}-\u{0C6F}
+ \u{0C77}-\u{0C8C}
+ \u{0C8E}-\u{0C90}
+ \u{0C92}-\u{0CA8}
+ \u{0CAA}-\u{0CB3}
+ \u{0CB5}-\u{0CB9}
+ \u{0CBC}-\u{0CC4}
+ \u{0CC6}-\u{0CC8}
+ \u{0CCA}-\u{0CCD}
+ \u{0CD5}-\u{0CD6}
+ \u{0CDE}
+ \u{0CE0}-\u{0CE3}
+ \u{0CE6}-\u{0CEF}
+ \u{0CF1}-\u{0CF2}
+ \u{0D00}-\u{0D0C}
+ \u{0D0E}-\u{0D10}
+ \u{0D12}-\u{0D44}
+ \u{0D46}-\u{0D48}
+ \u{0D4A}-\u{0D4F}
+ \u{0D54}-\u{0D63}
+ \u{0D66}-\u{0D7F}
+ \u{0D81}-\u{0D83}
+ \u{0D85}-\u{0D96}
+ \u{0D9A}-\u{0DB1}
+ \u{0DB3}-\u{0DBB}
+ \u{0DBD}
+ \u{0DC0}-\u{0DC6}
+ \u{0DCA}
+ \u{0DCF}-\u{0DD4}
+ \u{0DD6}
+ \u{0DD8}-\u{0DDF}
+ \u{0DE6}-\u{0DEF}
+ \u{0DF2}-\u{0DF4}
+ \u{0E01}-\u{0E3A}
+ \u{0E3F}-\u{0E5B}
+ \u{0E81}-\u{0E82}
+ \u{0E84}
+ \u{0E86}-\u{0E8A}
+ \u{0E8C}-\u{0EA3}
+ \u{0EA5}
+ \u{0EA7}-\u{0EBD}
+ \u{0EC0}-\u{0EC4}
+ \u{0EC6}
+ \u{0EC8}-\u{0ECD}
+ \u{0ED0}-\u{0ED9}
+ \u{0EDC}-\u{0EDF}
+ \u{0F00}-\u{0F47}
+ \u{0F49}-\u{0F6C}
+ \u{0F71}-\u{0F97}
+ \u{0F99}-\u{0FBC}
+ \u{0FBE}-\u{0FCC}
+ \u{0FCE}-\u{0FDA}
+ \u{1000}-\u{10C5}
+ \u{10C7}
+ \u{10CD}
+ \u{10D0}-\u{10FF}
+ \u{1160}-\u{1248}
+ \u{124A}-\u{124D}
+ \u{1250}-\u{1256}
+ \u{1258}
+ \u{125A}-\u{125D}
+ \u{1260}-\u{1288}
+ \u{128A}-\u{128D}
+ \u{1290}-\u{12B0}
+ \u{12B2}-\u{12B5}
+ \u{12B8}-\u{12BE}
+ \u{12C0}
+ \u{12C2}-\u{12C5}
+ \u{12C8}-\u{12D6}
+ \u{12D8}-\u{1310}
+ \u{1312}-\u{1315}
+ \u{1318}-\u{135A}
+ \u{135D}-\u{137C}
+ \u{1380}-\u{1399}
+ \u{13A0}-\u{13F5}
+ \u{13F8}-\u{13FD}
+ \u{1400}-\u{169C}
+ \u{16A0}-\u{16F8}
+ \u{1700}-\u{170C}
+ \u{170E}-\u{1714}
+ \u{1720}-\u{1736}
+ \u{1740}-\u{1753}
+ \u{1760}-\u{176C}
+ \u{176E}-\u{1770}
+ \u{1772}-\u{1773}
+ \u{1780}-\u{17DD}
+ \u{17E0}-\u{17E9}
+ \u{17F0}-\u{17F9}
+ \u{1800}-\u{180E}
+ \u{1810}-\u{1819}
+ \u{1820}-\u{1878}
+ \u{1880}-\u{18AA}
+ \u{18B0}-\u{18F5}
+ \u{1900}-\u{191E}
+ \u{1920}-\u{192B}
+ \u{1930}-\u{193B}
+ \u{1940}
+ \u{1944}-\u{196D}
+ \u{1970}-\u{1974}
+ \u{1980}-\u{19AB}
+ \u{19B0}-\u{19C9}
+ \u{19D0}-\u{19DA}
+ \u{19DE}-\u{1A1B}
+ \u{1A1E}-\u{1A5E}
+ \u{1A60}-\u{1A7C}
+ \u{1A7F}-\u{1A89}
+ \u{1A90}-\u{1A99}
+ \u{1AA0}-\u{1AAD}
+ \u{1AB0}-\u{1AC0}
+ \u{1B00}-\u{1B4B}
+ \u{1B50}-\u{1B7C}
+ \u{1B80}-\u{1BF3}
+ \u{1BFC}-\u{1C37}
+ \u{1C3B}-\u{1C49}
+ \u{1C4D}-\u{1C88}
+ \u{1C90}-\u{1CBA}
+ \u{1CBD}-\u{1CC7}
+ \u{1CD0}-\u{1CFA}
+ \u{1D00}-\u{1DF9}
+ \u{1DFB}-\u{1F15}
+ \u{1F18}-\u{1F1D}
+ \u{1F20}-\u{1F45}
+ \u{1F48}-\u{1F4D}
+ \u{1F50}-\u{1F57}
+ \u{1F59}
+ \u{1F5B}
+ \u{1F5D}
+ \u{1F5F}-\u{1F7D}
+ \u{1F80}-\u{1FB4}
+ \u{1FB6}-\u{1FC4}
+ \u{1FC6}-\u{1FD3}
+ \u{1FD6}-\u{1FDB}
+ \u{1FDD}-\u{1FEF}
+ \u{1FF2}-\u{1FF4}
+ \u{1FF6}-\u{1FFE}
+ \u{2000}-\u{200F}
+ \u{2011}-\u{2012}
+ \u{2017}
+ \u{201A}-\u{201B}
+ \u{201E}-\u{201F}
+ \u{2023}
+ \u{2028}-\u{202F}
+ \u{2031}
+ \u{2034}
+ \u{2036}-\u{203A}
+ \u{203C}-\u{203D}
+ \u{203F}-\u{2064}
+ \u{2066}-\u{2071}
+ \u{2075}-\u{207E}
+ \u{2080}
+ \u{2085}-\u{208E}
+ \u{2090}-\u{209C}
+ \u{20A0}-\u{20A8}
+ \u{20AA}-\u{20AB}
+ \u{20AD}-\u{20BF}
+ \u{20D0}-\u{20F0}
+ \u{2100}-\u{2102}
+ \u{2104}
+ \u{2106}-\u{2108}
+ \u{210A}-\u{2112}
+ \u{2114}-\u{2115}
+ \u{2117}-\u{2120}
+ \u{2123}-\u{2125}
+ \u{2127}-\u{212A}
+ \u{212C}-\u{2152}
+ \u{2155}-\u{215A}
+ \u{215F}
+ \u{216C}-\u{216F}
+ \u{217A}-\u{2188}
+ \u{218A}-\u{218B}
+ \u{219A}-\u{21B7}
+ \u{21BA}-\u{21D1}
+ \u{21D3}
+ \u{21D5}-\u{21E6}
+ \u{21E8}-\u{21FF}
+ \u{2201}
+ \u{2204}-\u{2206}
+ \u{2209}-\u{220A}
+ \u{220C}-\u{220E}
+ \u{2210}
+ \u{2212}-\u{2214}
+ \u{2216}-\u{2219}
+ \u{221B}-\u{221C}
+ \u{2221}-\u{2222}
+ \u{2224}
+ \u{2226}
+ \u{222D}
+ \u{222F}-\u{2233}
+ \u{2238}-\u{223B}
+ \u{223E}-\u{2247}
+ \u{2249}-\u{224B}
+ \u{224D}-\u{2251}
+ \u{2253}-\u{225F}
+ \u{2262}-\u{2263}
+ \u{2268}-\u{2269}
+ \u{226C}-\u{226D}
+ \u{2270}-\u{2281}
+ \u{2284}-\u{2285}
+ \u{2288}-\u{2294}
+ \u{2296}-\u{2298}
+ \u{229A}-\u{22A4}
+ \u{22A6}-\u{22BE}
+ \u{22C0}-\u{2311}
+ \u{2313}-\u{2319}
+ \u{231C}-\u{2328}
+ \u{232B}-\u{23E8}
+ \u{23ED}-\u{23EF}
+ \u{23F1}-\u{23F2}
+ \u{23F4}-\u{2426}
+ \u{2440}-\u{244A}
+ \u{24EA}
+ \u{254C}-\u{254F}
+ \u{2574}-\u{257F}
+ \u{2590}-\u{2591}
+ \u{2596}-\u{259F}
+ \u{25A2}
+ \u{25AA}-\u{25B1}
+ \u{25B4}-\u{25B5}
+ \u{25B8}-\u{25BB}
+ \u{25BE}-\u{25BF}
+ \u{25C2}-\u{25C5}
+ \u{25C9}-\u{25CA}
+ \u{25CC}-\u{25CD}
+ \u{25D2}-\u{25E1}
+ \u{25E6}-\u{25EE}
+ \u{25F0}-\u{25FC}
+ \u{25FF}-\u{2604}
+ \u{2607}-\u{2608}
+ \u{260A}-\u{260D}
+ \u{2610}-\u{2613}
+ \u{2616}-\u{261B}
+ \u{261D}
+ \u{261F}-\u{263F}
+ \u{2641}
+ \u{2643}-\u{2647}
+ \u{2654}-\u{265F}
+ \u{2662}
+ \u{2666}
+ \u{266B}
+ \u{266E}
+ \u{2670}-\u{267E}
+ \u{2680}-\u{2692}
+ \u{2694}-\u{269D}
+ \u{26A0}
+ \u{26A2}-\u{26A9}
+ \u{26AC}-\u{26BC}
+ \u{26C0}-\u{26C3}
+ \u{26E2}
+ \u{26E4}-\u{26E7}
+ \u{2700}-\u{2704}
+ \u{2706}-\u{2709}
+ \u{270C}-\u{2727}
+ \u{2729}-\u{273C}
+ \u{273E}-\u{274B}
+ \u{274D}
+ \u{274F}-\u{2752}
+ \u{2756}
+ \u{2758}-\u{2775}
+ \u{2780}-\u{2794}
+ \u{2798}-\u{27AF}
+ \u{27B1}-\u{27BE}
+ \u{27C0}-\u{27E5}
+ \u{27EE}-\u{2984}
+ \u{2987}-\u{2B1A}
+ \u{2B1D}-\u{2B4F}
+ \u{2B51}-\u{2B54}
+ \u{2B5A}-\u{2B73}
+ \u{2B76}-\u{2B95}
+ \u{2B97}-\u{2C2E}
+ \u{2C30}-\u{2C5E}
+ \u{2C60}-\u{2CF3}
+ \u{2CF9}-\u{2D25}
+ \u{2D27}
+ \u{2D2D}
+ \u{2D30}-\u{2D67}
+ \u{2D6F}-\u{2D70}
+ \u{2D7F}-\u{2D96}
+ \u{2DA0}-\u{2DA6}
+ \u{2DA8}-\u{2DAE}
+ \u{2DB0}-\u{2DB6}
+ \u{2DB8}-\u{2DBE}
+ \u{2DC0}-\u{2DC6}
+ \u{2DC8}-\u{2DCE}
+ \u{2DD0}-\u{2DD6}
+ \u{2DD8}-\u{2DDE}
+ \u{2DE0}-\u{2E52}
+ \u{303F}
+ \u{4DC0}-\u{4DFF}
+ \u{A4D0}-\u{A62B}
+ \u{A640}-\u{A6F7}
+ \u{A700}-\u{A7BF}
+ \u{A7C2}-\u{A7CA}
+ \u{A7F5}-\u{A82C}
+ \u{A830}-\u{A839}
+ \u{A840}-\u{A877}
+ \u{A880}-\u{A8C5}
+ \u{A8CE}-\u{A8D9}
+ \u{A8E0}-\u{A953}
+ \u{A95F}
+ \u{A980}-\u{A9CD}
+ \u{A9CF}-\u{A9D9}
+ \u{A9DE}-\u{A9FE}
+ \u{AA00}-\u{AA36}
+ \u{AA40}-\u{AA4D}
+ \u{AA50}-\u{AA59}
+ \u{AA5C}-\u{AAC2}
+ \u{AADB}-\u{AAF6}
+ \u{AB01}-\u{AB06}
+ \u{AB09}-\u{AB0E}
+ \u{AB11}-\u{AB16}
+ \u{AB20}-\u{AB26}
+ \u{AB28}-\u{AB2E}
+ \u{AB30}-\u{AB6B}
+ \u{AB70}-\u{ABED}
+ \u{ABF0}-\u{ABF9}
+ \u{D7B0}-\u{D7C6}
+ \u{D7CB}-\u{D7FB}
+ \u{FB00}-\u{FB06}
+ \u{FB13}-\u{FB17}
+ \u{FB1D}-\u{FB36}
+ \u{FB38}-\u{FB3C}
+ \u{FB3E}
+ \u{FB40}-\u{FB41}
+ \u{FB43}-\u{FB44}
+ \u{FB46}-\u{FBC1}
+ \u{FBD3}-\u{FD3F}
+ \u{FD50}-\u{FD8F}
+ \u{FD92}-\u{FDC7}
+ \u{FDF0}-\u{FDFD}
+ \u{FE20}-\u{FE2F}
+ \u{FE70}-\u{FE74}
+ \u{FE76}-\u{FEFC}
+ \u{FEFF}
+ \u{FFF9}-\u{FFFC}
+ \u{10000}-\u{1000B}
+ \u{1000D}-\u{10026}
+ \u{10028}-\u{1003A}
+ \u{1003C}-\u{1003D}
+ \u{1003F}-\u{1004D}
+ \u{10050}-\u{1005D}
+ \u{10080}-\u{100FA}
+ \u{10100}-\u{10102}
+ \u{10107}-\u{10133}
+ \u{10137}-\u{1018E}
+ \u{10190}-\u{1019C}
+ \u{101A0}
+ \u{101D0}-\u{101FD}
+ \u{10280}-\u{1029C}
+ \u{102A0}-\u{102D0}
+ \u{102E0}-\u{102FB}
+ \u{10300}-\u{10323}
+ \u{1032D}-\u{1034A}
+ \u{10350}-\u{1037A}
+ \u{10380}-\u{1039D}
+ \u{1039F}-\u{103C3}
+ \u{103C8}-\u{103D5}
+ \u{10400}-\u{1049D}
+ \u{104A0}-\u{104A9}
+ \u{104B0}-\u{104D3}
+ \u{104D8}-\u{104FB}
+ \u{10500}-\u{10527}
+ \u{10530}-\u{10563}
+ \u{1056F}
+ \u{10600}-\u{10736}
+ \u{10740}-\u{10755}
+ \u{10760}-\u{10767}
+ \u{10800}-\u{10805}
+ \u{10808}
+ \u{1080A}-\u{10835}
+ \u{10837}-\u{10838}
+ \u{1083C}
+ \u{1083F}-\u{10855}
+ \u{10857}-\u{1089E}
+ \u{108A7}-\u{108AF}
+ \u{108E0}-\u{108F2}
+ \u{108F4}-\u{108F5}
+ \u{108FB}-\u{1091B}
+ \u{1091F}-\u{10939}
+ \u{1093F}
+ \u{10980}-\u{109B7}
+ \u{109BC}-\u{109CF}
+ \u{109D2}-\u{10A03}
+ \u{10A05}-\u{10A06}
+ \u{10A0C}-\u{10A13}
+ \u{10A15}-\u{10A17}
+ \u{10A19}-\u{10A35}
+ \u{10A38}-\u{10A3A}
+ \u{10A3F}-\u{10A48}
+ \u{10A50}-\u{10A58}
+ \u{10A60}-\u{10A9F}
+ \u{10AC0}-\u{10AE6}
+ \u{10AEB}-\u{10AF6}
+ \u{10B00}-\u{10B35}
+ \u{10B39}-\u{10B55}
+ \u{10B58}-\u{10B72}
+ \u{10B78}-\u{10B91}
+ \u{10B99}-\u{10B9C}
+ \u{10BA9}-\u{10BAF}
+ \u{10C00}-\u{10C48}
+ \u{10C80}-\u{10CB2}
+ \u{10CC0}-\u{10CF2}
+ \u{10CFA}-\u{10D27}
+ \u{10D30}-\u{10D39}
+ \u{10E60}-\u{10E7E}
+ \u{10E80}-\u{10EA9}
+ \u{10EAB}-\u{10EAD}
+ \u{10EB0}-\u{10EB1}
+ \u{10F00}-\u{10F27}
+ \u{10F30}-\u{10F59}
+ \u{10FB0}-\u{10FCB}
+ \u{10FE0}-\u{10FF6}
+ \u{11000}-\u{1104D}
+ \u{11052}-\u{1106F}
+ \u{1107F}-\u{110C1}
+ \u{110CD}
+ \u{110D0}-\u{110E8}
+ \u{110F0}-\u{110F9}
+ \u{11100}-\u{11134}
+ \u{11136}-\u{11147}
+ \u{11150}-\u{11176}
+ \u{11180}-\u{111DF}
+ \u{111E1}-\u{111F4}
+ \u{11200}-\u{11211}
+ \u{11213}-\u{1123E}
+ \u{11280}-\u{11286}
+ \u{11288}
+ \u{1128A}-\u{1128D}
+ \u{1128F}-\u{1129D}
+ \u{1129F}-\u{112A9}
+ \u{112B0}-\u{112EA}
+ \u{112F0}-\u{112F9}
+ \u{11300}-\u{11303}
+ \u{11305}-\u{1130C}
+ \u{1130F}-\u{11310}
+ \u{11313}-\u{11328}
+ \u{1132A}-\u{11330}
+ \u{11332}-\u{11333}
+ \u{11335}-\u{11339}
+ \u{1133B}-\u{11344}
+ \u{11347}-\u{11348}
+ \u{1134B}-\u{1134D}
+ \u{11350}
+ \u{11357}
+ \u{1135D}-\u{11363}
+ \u{11366}-\u{1136C}
+ \u{11370}-\u{11374}
+ \u{11400}-\u{1145B}
+ \u{1145D}-\u{11461}
+ \u{11480}-\u{114C7}
+ \u{114D0}-\u{114D9}
+ \u{11580}-\u{115B5}
+ \u{115B8}-\u{115DD}
+ \u{11600}-\u{11644}
+ \u{11650}-\u{11659}
+ \u{11660}-\u{1166C}
+ \u{11680}-\u{116B8}
+ \u{116C0}-\u{116C9}
+ \u{11700}-\u{1171A}
+ \u{1171D}-\u{1172B}
+ \u{11730}-\u{1173F}
+ \u{11800}-\u{1183B}
+ \u{118A0}-\u{118F2}
+ \u{118FF}-\u{11906}
+ \u{11909}
+ \u{1190C}-\u{11913}
+ \u{11915}-\u{11916}
+ \u{11918}-\u{11935}
+ \u{11937}-\u{11938}
+ \u{1193B}-\u{11946}
+ \u{11950}-\u{11959}
+ \u{119A0}-\u{119A7}
+ \u{119AA}-\u{119D7}
+ \u{119DA}-\u{119E4}
+ \u{11A00}-\u{11A47}
+ \u{11A50}-\u{11AA2}
+ \u{11AC0}-\u{11AF8}
+ \u{11C00}-\u{11C08}
+ \u{11C0A}-\u{11C36}
+ \u{11C38}-\u{11C45}
+ \u{11C50}-\u{11C6C}
+ \u{11C70}-\u{11C8F}
+ \u{11C92}-\u{11CA7}
+ \u{11CA9}-\u{11CB6}
+ \u{11D00}-\u{11D06}
+ \u{11D08}-\u{11D09}
+ \u{11D0B}-\u{11D36}
+ \u{11D3A}
+ \u{11D3C}-\u{11D3D}
+ \u{11D3F}-\u{11D47}
+ \u{11D50}-\u{11D59}
+ \u{11D60}-\u{11D65}
+ \u{11D67}-\u{11D68}
+ \u{11D6A}-\u{11D8E}
+ \u{11D90}-\u{11D91}
+ \u{11D93}-\u{11D98}
+ \u{11DA0}-\u{11DA9}
+ \u{11EE0}-\u{11EF8}
+ \u{11FB0}
+ \u{11FC0}-\u{11FF1}
+ \u{11FFF}-\u{12399}
+ \u{12400}-\u{1246E}
+ \u{12470}-\u{12474}
+ \u{12480}-\u{12543}
+ \u{13000}-\u{1342E}
+ \u{13430}-\u{13438}
+ \u{14400}-\u{14646}
+ \u{16800}-\u{16A38}
+ \u{16A40}-\u{16A5E}
+ \u{16A60}-\u{16A69}
+ \u{16A6E}-\u{16A6F}
+ \u{16AD0}-\u{16AED}
+ \u{16AF0}-\u{16AF5}
+ \u{16B00}-\u{16B45}
+ \u{16B50}-\u{16B59}
+ \u{16B5B}-\u{16B61}
+ \u{16B63}-\u{16B77}
+ \u{16B7D}-\u{16B8F}
+ \u{16E40}-\u{16E9A}
+ \u{16F00}-\u{16F4A}
+ \u{16F4F}-\u{16F87}
+ \u{16F8F}-\u{16F9F}
+ \u{1BC00}-\u{1BC6A}
+ \u{1BC70}-\u{1BC7C}
+ \u{1BC80}-\u{1BC88}
+ \u{1BC90}-\u{1BC99}
+ \u{1BC9C}-\u{1BCA3}
+ \u{1D000}-\u{1D0F5}
+ \u{1D100}-\u{1D126}
+ \u{1D129}-\u{1D1E8}
+ \u{1D200}-\u{1D245}
+ \u{1D2E0}-\u{1D2F3}
+ \u{1D300}-\u{1D356}
+ \u{1D360}-\u{1D378}
+ \u{1D400}-\u{1D454}
+ \u{1D456}-\u{1D49C}
+ \u{1D49E}-\u{1D49F}
+ \u{1D4A2}
+ \u{1D4A5}-\u{1D4A6}
+ \u{1D4A9}-\u{1D4AC}
+ \u{1D4AE}-\u{1D4B9}
+ \u{1D4BB}
+ \u{1D4BD}-\u{1D4C3}
+ \u{1D4C5}-\u{1D505}
+ \u{1D507}-\u{1D50A}
+ \u{1D50D}-\u{1D514}
+ \u{1D516}-\u{1D51C}
+ \u{1D51E}-\u{1D539}
+ \u{1D53B}-\u{1D53E}
+ \u{1D540}-\u{1D544}
+ \u{1D546}
+ \u{1D54A}-\u{1D550}
+ \u{1D552}-\u{1D6A5}
+ \u{1D6A8}-\u{1D7CB}
+ \u{1D7CE}-\u{1DA8B}
+ \u{1DA9B}-\u{1DA9F}
+ \u{1DAA1}-\u{1DAAF}
+ \u{1E000}-\u{1E006}
+ \u{1E008}-\u{1E018}
+ \u{1E01B}-\u{1E021}
+ \u{1E023}-\u{1E024}
+ \u{1E026}-\u{1E02A}
+ \u{1E100}-\u{1E12C}
+ \u{1E130}-\u{1E13D}
+ \u{1E140}-\u{1E149}
+ \u{1E14E}-\u{1E14F}
+ \u{1E2C0}-\u{1E2F9}
+ \u{1E2FF}
+ \u{1E800}-\u{1E8C4}
+ \u{1E8C7}-\u{1E8D6}
+ \u{1E900}-\u{1E94B}
+ \u{1E950}-\u{1E959}
+ \u{1E95E}-\u{1E95F}
+ \u{1EC71}-\u{1ECB4}
+ \u{1ED01}-\u{1ED3D}
+ \u{1EE00}-\u{1EE03}
+ \u{1EE05}-\u{1EE1F}
+ \u{1EE21}-\u{1EE22}
+ \u{1EE24}
+ \u{1EE27}
+ \u{1EE29}-\u{1EE32}
+ \u{1EE34}-\u{1EE37}
+ \u{1EE39}
+ \u{1EE3B}
+ \u{1EE42}
+ \u{1EE47}
+ \u{1EE49}
+ \u{1EE4B}
+ \u{1EE4D}-\u{1EE4F}
+ \u{1EE51}-\u{1EE52}
+ \u{1EE54}
+ \u{1EE57}
+ \u{1EE59}
+ \u{1EE5B}
+ \u{1EE5D}
+ \u{1EE5F}
+ \u{1EE61}-\u{1EE62}
+ \u{1EE64}
+ \u{1EE67}-\u{1EE6A}
+ \u{1EE6C}-\u{1EE72}
+ \u{1EE74}-\u{1EE77}
+ \u{1EE79}-\u{1EE7C}
+ \u{1EE7E}
+ \u{1EE80}-\u{1EE89}
+ \u{1EE8B}-\u{1EE9B}
+ \u{1EEA1}-\u{1EEA3}
+ \u{1EEA5}-\u{1EEA9}
+ \u{1EEAB}-\u{1EEBB}
+ \u{1EEF0}-\u{1EEF1}
+ \u{1F000}-\u{1F003}
+ \u{1F005}-\u{1F02B}
+ \u{1F030}-\u{1F093}
+ \u{1F0A0}-\u{1F0AE}
+ \u{1F0B1}-\u{1F0BF}
+ \u{1F0C1}-\u{1F0CE}
+ \u{1F0D1}-\u{1F0F5}
+ \u{1F10B}-\u{1F10F}
+ \u{1F12E}-\u{1F12F}
+ \u{1F16A}-\u{1F16F}
+ \u{1F1AD}
+ \u{1F1E6}-\u{1F1FF}
+ \u{1F321}-\u{1F32C}
+ \u{1F336}
+ \u{1F37D}
+ \u{1F394}-\u{1F39F}
+ \u{1F3CB}-\u{1F3CE}
+ \u{1F3D4}-\u{1F3DF}
+ \u{1F3F1}-\u{1F3F3}
+ \u{1F3F5}-\u{1F3F7}
+ \u{1F43F}
+ \u{1F441}
+ \u{1F4FD}-\u{1F4FE}
+ \u{1F53E}-\u{1F54A}
+ \u{1F54F}
+ \u{1F568}-\u{1F579}
+ \u{1F57B}-\u{1F594}
+ \u{1F597}-\u{1F5A3}
+ \u{1F5A5}-\u{1F5FA}
+ \u{1F650}-\u{1F67F}
+ \u{1F6C6}-\u{1F6CB}
+ \u{1F6CD}-\u{1F6CF}
+ \u{1F6D3}-\u{1F6D4}
+ \u{1F6E0}-\u{1F6EA}
+ \u{1F6F0}-\u{1F6F3}
+ \u{1F700}-\u{1F773}
+ \u{1F780}-\u{1F7D8}
+ \u{1F800}-\u{1F80B}
+ \u{1F810}-\u{1F847}
+ \u{1F850}-\u{1F859}
+ \u{1F860}-\u{1F887}
+ \u{1F890}-\u{1F8AD}
+ \u{1F8B0}-\u{1F8B1}
+ \u{1F900}-\u{1F90B}
+ \u{1F93B}
+ \u{1F946}
+ \u{1FA00}-\u{1FA53}
+ \u{1FA60}-\u{1FA6D}
+ \u{1FB00}-\u{1FB92}
+ \u{1FB94}-\u{1FBCA}
+ \u{1FBF0}-\u{1FBF9}
+ \u{E0001}
+ \u{E0020}-\u{E007F}
+ ).join }]/
end
diff --git a/lib/reline/version.rb b/lib/reline/version.rb
index 5c68b1c26c..67a3d694bd 100644
--- a/lib/reline/version.rb
+++ b/lib/reline/version.rb
@@ -1,3 +1,3 @@
module Reline
- VERSION = '0.1.0'
+ VERSION = '0.3.2'
end
diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index aef3073a7e..b952329911 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -1,23 +1,56 @@
require 'fiddle/import'
class Reline::Windows
- RAW_KEYSTROKE_CONFIG = {
- [224, 72] => :ed_prev_history, # ↑
- [224, 80] => :ed_next_history, # ↓
- [224, 77] => :ed_next_char, # →
- [224, 75] => :ed_prev_char, # â†
- [224, 83] => :key_delete, # Del
- [224, 71] => :ed_move_to_beg, # Home
- [224, 79] => :ed_move_to_end, # End
- [ 0, 41] => :ed_unassigned, # input method on/off
- [ 0, 72] => :ed_prev_history, # ↑
- [ 0, 80] => :ed_next_history, # ↓
- [ 0, 77] => :ed_next_char, # →
- [ 0, 75] => :ed_prev_char, # â†
- [ 0, 83] => :key_delete, # Del
- [ 0, 71] => :ed_move_to_beg, # Home
- [ 0, 79] => :ed_move_to_end # End
- }
+ def self.encoding
+ Encoding::UTF_8
+ end
+
+ def self.win?
+ true
+ end
+
+ def self.win_legacy_console?
+ @@legacy_console
+ end
+
+ def self.set_default_key_bindings(config)
+ {
+ [224, 72] => :ed_prev_history, # ↑
+ [224, 80] => :ed_next_history, # ↓
+ [224, 77] => :ed_next_char, # →
+ [224, 75] => :ed_prev_char, # â†
+ [224, 83] => :key_delete, # Del
+ [224, 71] => :ed_move_to_beg, # Home
+ [224, 79] => :ed_move_to_end, # End
+ [ 0, 41] => :ed_unassigned, # input method on/off
+ [ 0, 72] => :ed_prev_history, # ↑
+ [ 0, 80] => :ed_next_history, # ↓
+ [ 0, 77] => :ed_next_char, # →
+ [ 0, 75] => :ed_prev_char, # â†
+ [ 0, 83] => :key_delete, # Del
+ [ 0, 71] => :ed_move_to_beg, # Home
+ [ 0, 79] => :ed_move_to_end # End
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ config.add_default_key_binding_by_keymap(:vi_command, key, func)
+ end
+
+ {
+ [27, 32] => :em_set_mark, # M-<space>
+ [24, 24] => :em_exchange_mark, # C-x C-x
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ end
+
+ # Emulate ANSI key sequence.
+ {
+ [27, 91, 90] => :completion_journey_up, # S-Tab
+ }.each_pair do |key, func|
+ config.add_default_key_binding_by_keymap(:emacs, key, func)
+ config.add_default_key_binding_by_keymap(:vi_insert, key, func)
+ end
+ end
if defined? JRUBY_VERSION
require 'win32api'
@@ -61,13 +94,39 @@ class Reline::Windows
end
end
- VK_MENU = 0x12
+ VK_RETURN = 0x0D
+ VK_MENU = 0x12 # ALT key
VK_LMENU = 0xA4
VK_CONTROL = 0x11
VK_SHIFT = 0x10
+ VK_DIVIDE = 0x6F
+
+ KEY_EVENT = 0x01
+ WINDOW_BUFFER_SIZE_EVENT = 0x04
+
+ CAPSLOCK_ON = 0x0080
+ ENHANCED_KEY = 0x0100
+ LEFT_ALT_PRESSED = 0x0002
+ LEFT_CTRL_PRESSED = 0x0008
+ NUMLOCK_ON = 0x0020
+ RIGHT_ALT_PRESSED = 0x0001
+ RIGHT_CTRL_PRESSED = 0x0004
+ SCROLLLOCK_ON = 0x0040
+ SHIFT_PRESSED = 0x0010
+
+ VK_TAB = 0x09
+ VK_END = 0x23
+ VK_HOME = 0x24
+ VK_LEFT = 0x25
+ VK_UP = 0x26
+ VK_RIGHT = 0x27
+ VK_DOWN = 0x28
+ VK_DELETE = 0x2E
+
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE = -11
- WINDOW_BUFFER_SIZE_EVENT = 0x04
+ FILE_TYPE_PIPE = 0x0003
+ FILE_NAME_INFO = 2
@@getwch = Win32API.new('msvcrt', '_getwch', [], 'I')
@@kbhit = Win32API.new('msvcrt', '_kbhit', [], 'I')
@@GetKeyState = Win32API.new('user32', 'GetKeyState', ['L'], 'L')
@@ -79,99 +138,213 @@ class Reline::Windows
@@hConsoleHandle = @@GetStdHandle.call(STD_OUTPUT_HANDLE)
@@hConsoleInputHandle = @@GetStdHandle.call(STD_INPUT_HANDLE)
@@GetNumberOfConsoleInputEvents = Win32API.new('kernel32', 'GetNumberOfConsoleInputEvents', ['L', 'P'], 'L')
- @@ReadConsoleInput = Win32API.new('kernel32', 'ReadConsoleInput', ['L', 'P', 'L', 'P'], 'L')
+ @@ReadConsoleInputW = Win32API.new('kernel32', 'ReadConsoleInputW', ['L', 'P', 'L', 'P'], 'L')
+ @@GetFileType = Win32API.new('kernel32', 'GetFileType', ['L'], 'L')
+ @@GetFileInformationByHandleEx = Win32API.new('kernel32', 'GetFileInformationByHandleEx', ['L', 'I', 'P', 'L'], 'I')
+ @@FillConsoleOutputAttribute = Win32API.new('kernel32', 'FillConsoleOutputAttribute', ['L', 'L', 'L', 'L', 'P'], 'L')
+ @@SetConsoleCursorInfo = Win32API.new('kernel32', 'SetConsoleCursorInfo', ['L', 'P'], 'L')
+
+ @@GetConsoleMode = Win32API.new('kernel32', 'GetConsoleMode', ['L', 'P'], 'L')
+ @@SetConsoleMode = Win32API.new('kernel32', 'SetConsoleMode', ['L', 'L'], 'L')
+ @@WaitForSingleObject = Win32API.new('kernel32', 'WaitForSingleObject', ['L', 'L'], 'L')
+ ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
+
+ private_class_method def self.getconsolemode
+ mode = "\000\000\000\000"
+ @@GetConsoleMode.call(@@hConsoleHandle, mode)
+ mode.unpack1('L')
+ end
+
+ private_class_method def self.setconsolemode(mode)
+ @@SetConsoleMode.call(@@hConsoleHandle, mode)
+ end
+
+ @@legacy_console = (getconsolemode() & ENABLE_VIRTUAL_TERMINAL_PROCESSING == 0)
+ #if @@legacy_console
+ # setconsolemode(getconsolemode() | ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+ # @@legacy_console = (getconsolemode() & ENABLE_VIRTUAL_TERMINAL_PROCESSING == 0)
+ #end
+
@@input_buf = []
@@output_buf = []
- def self.getwch
- unless @@input_buf.empty?
- return @@input_buf.shift
+ @@output = STDOUT
+
+ def self.msys_tty?(io = @@hConsoleInputHandle)
+ # check if fd is a pipe
+ if @@GetFileType.call(io) != FILE_TYPE_PIPE
+ return false
end
- while @@kbhit.call == 0
- sleep(0.001)
+
+ bufsize = 1024
+ p_buffer = "\0" * bufsize
+ res = @@GetFileInformationByHandleEx.call(io, FILE_NAME_INFO, p_buffer, bufsize - 2)
+ return false if res == 0
+
+ # get pipe name: p_buffer layout is:
+ # struct _FILE_NAME_INFO {
+ # DWORD FileNameLength;
+ # WCHAR FileName[1];
+ # } FILE_NAME_INFO
+ len = p_buffer[0, 4].unpack1("L")
+ name = p_buffer[4, len].encode(Encoding::UTF_8, Encoding::UTF_16LE, invalid: :replace)
+
+ # Check if this could be a MSYS2 pty pipe ('\msys-XXXX-ptyN-XX')
+ # or a cygwin pty pipe ('\cygwin-XXXX-ptyN-XX')
+ name =~ /(msys-|cygwin-).*-pty/ ? true : false
+ end
+
+ KEY_MAP = [
+ # It's treated as Meta+Enter on Windows.
+ [ { control_keys: :CTRL, virtual_key_code: 0x0D }, "\e\r".bytes ],
+ [ { control_keys: :SHIFT, virtual_key_code: 0x0D }, "\e\r".bytes ],
+
+ # It's treated as Meta+Space on Windows.
+ [ { control_keys: :CTRL, char_code: 0x20 }, "\e ".bytes ],
+
+ # Emulate getwch() key sequences.
+ [ { control_keys: [], virtual_key_code: VK_UP }, [0, 72] ],
+ [ { control_keys: [], virtual_key_code: VK_DOWN }, [0, 80] ],
+ [ { control_keys: [], virtual_key_code: VK_RIGHT }, [0, 77] ],
+ [ { control_keys: [], virtual_key_code: VK_LEFT }, [0, 75] ],
+ [ { control_keys: [], virtual_key_code: VK_DELETE }, [0, 83] ],
+ [ { control_keys: [], virtual_key_code: VK_HOME }, [0, 71] ],
+ [ { control_keys: [], virtual_key_code: VK_END }, [0, 79] ],
+
+ # Emulate ANSI key sequence.
+ [ { control_keys: :SHIFT, virtual_key_code: VK_TAB }, [27, 91, 90] ],
+ ]
+
+ @@hsg = nil
+
+ def self.process_key_event(repeat_count, virtual_key_code, virtual_scan_code, char_code, control_key_state)
+
+ # high-surrogate
+ if 0xD800 <= char_code and char_code <= 0xDBFF
+ @@hsg = char_code
+ return
end
- until @@kbhit.call == 0
- ret = @@getwch.call
- if ret == 0 or ret == 0xE0
- @@input_buf << ret
- ret = @@getwch.call
- @@input_buf << ret
- return @@input_buf.shift
- end
- begin
- bytes = ret.chr(Encoding::UTF_8).encode(Encoding.default_external).bytes
- @@input_buf.push(*bytes)
- rescue Encoding::UndefinedConversionError
- @@input_buf << ret
- @@input_buf << @@getwch.call if ret == 224
+ # low-surrogate
+ if 0xDC00 <= char_code and char_code <= 0xDFFF
+ if @@hsg
+ char_code = 0x10000 + (@@hsg - 0xD800) * 0x400 + char_code - 0xDC00
+ @@hsg = nil
+ else
+ # no high-surrogate. ignored.
+ return
end
+ else
+ # ignore high-surrogate without low-surrogate if there
+ @@hsg = nil
end
- @@input_buf.shift
+
+ key = KeyEventRecord.new(virtual_key_code, char_code, control_key_state)
+
+ match = KEY_MAP.find { |args,| key.matches?(**args) }
+ unless match.nil?
+ @@output_buf.concat(match.last)
+ return
+ end
+
+ # no char, only control keys
+ return if key.char_code == 0 and key.control_keys.any?
+
+ @@output_buf.push("\e".ord) if key.control_keys.include?(:ALT) and !key.control_keys.include?(:CTRL)
+
+ @@output_buf.concat(key.char.bytes)
end
- def self.getc
+ def self.check_input_event
num_of_events = 0.chr * 8
- while @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) != 0 and num_of_events.unpack('L').first > 0
- input_record = 0.chr * 18
+ while @@output_buf.empty?
+ Reline.core.line_editor.resize
+ if @@WaitForSingleObject.(@@hConsoleInputHandle, 100) != 0 # max 0.1 sec
+ # prevent for background consolemode change
+ @@legacy_console = (getconsolemode() & ENABLE_VIRTUAL_TERMINAL_PROCESSING == 0)
+ next
+ end
+ next if @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) == 0 or num_of_events.unpack1('L') == 0
+ input_records = 0.chr * 20 * 80
read_event = 0.chr * 4
- if @@ReadConsoleInput.(@@hConsoleInputHandle, input_record, 1, read_event) != 0
- event = input_record[0, 2].unpack('s*').first
- if event == WINDOW_BUFFER_SIZE_EVENT
- @@winch_handler.()
+ if @@ReadConsoleInputW.(@@hConsoleInputHandle, input_records, 80, read_event) != 0
+ read_events = read_event.unpack1('L')
+ 0.upto(read_events) do |idx|
+ input_record = input_records[idx * 20, 20]
+ event = input_record[0, 2].unpack1('s*')
+ case event
+ when WINDOW_BUFFER_SIZE_EVENT
+ @@winch_handler.()
+ when KEY_EVENT
+ key_down = input_record[4, 4].unpack1('l*')
+ repeat_count = input_record[8, 2].unpack1('s*')
+ virtual_key_code = input_record[10, 2].unpack1('s*')
+ virtual_scan_code = input_record[12, 2].unpack1('s*')
+ char_code = input_record[14, 2].unpack1('S*')
+ control_key_state = input_record[16, 2].unpack1('S*')
+ is_key_down = key_down.zero? ? false : true
+ if is_key_down
+ process_key_event(repeat_count, virtual_key_code, virtual_scan_code, char_code, control_key_state)
+ end
+ end
end
end
end
- unless @@output_buf.empty?
- return @@output_buf.shift
- end
- input = getwch
- meta = (@@GetKeyState.call(VK_LMENU) & 0x80) != 0
- control = (@@GetKeyState.call(VK_CONTROL) & 0x80) != 0
- shift = (@@GetKeyState.call(VK_SHIFT) & 0x80) != 0
- force_enter = !input.instance_of?(Array) && (control or shift) && input == 0x0D
- if force_enter
- # It's treated as Meta+Enter on Windows
- @@output_buf.push("\e".ord)
- @@output_buf.push(input)
- else
- case input
- when 0x00
- meta = false
- @@output_buf.push(input)
- input = getwch
- @@output_buf.push(*input)
- when 0xE0
- @@output_buf.push(input)
- input = getwch
- @@output_buf.push(*input)
- when 0x03
- @@output_buf.push(input)
- else
- @@output_buf.push(input)
- end
- end
- if meta
- "\e".ord
- else
- @@output_buf.shift
- end
+ end
+
+ def self.getc
+ check_input_event
+ @@output_buf.shift
end
def self.ungetc(c)
@@output_buf.unshift(c)
end
- def self.get_screen_size
+ def self.in_pasting?
+ not self.empty_buffer?
+ end
+
+ def self.empty_buffer?
+ if not @@output_buf.empty?
+ false
+ elsif @@kbhit.call == 0
+ true
+ else
+ false
+ end
+ end
+
+ def self.get_console_screen_buffer_info
+ # CONSOLE_SCREEN_BUFFER_INFO
+ # [ 0,2] dwSize.X
+ # [ 2,2] dwSize.Y
+ # [ 4,2] dwCursorPositions.X
+ # [ 6,2] dwCursorPositions.Y
+ # [ 8,2] wAttributes
+ # [10,2] srWindow.Left
+ # [12,2] srWindow.Top
+ # [14,2] srWindow.Right
+ # [16,2] srWindow.Bottom
+ # [18,2] dwMaximumWindowSize.X
+ # [20,2] dwMaximumWindowSize.Y
csbi = 0.chr * 22
- @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi)
+ return if @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi) == 0
+ csbi
+ end
+
+ def self.get_screen_size
+ unless csbi = get_console_screen_buffer_info
+ return [1, 1]
+ end
csbi[0, 4].unpack('SS').reverse
end
def self.cursor_pos
- csbi = 0.chr * 22
- @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi)
- x = csbi[4, 2].unpack('s*').first
- y = csbi[6, 2].unpack('s*').first
+ unless csbi = get_console_screen_buffer_info
+ return Reline::CursorPos.new(0, 0)
+ end
+ x = csbi[4, 2].unpack1('s')
+ y = csbi[6, 2].unpack1('s')
Reline::CursorPos.new(x, y)
end
@@ -181,7 +354,9 @@ class Reline::Windows
def self.move_cursor_up(val)
if val > 0
- @@SetConsoleCursorPosition.call(@@hConsoleHandle, (cursor_pos.y - val) * 65536 + cursor_pos.x)
+ y = cursor_pos.y - val
+ y = 0 if y < 0
+ @@SetConsoleCursorPosition.call(@@hConsoleHandle, y * 65536 + cursor_pos.x)
elsif val < 0
move_cursor_down(-val)
end
@@ -189,6 +364,10 @@ class Reline::Windows
def self.move_cursor_down(val)
if val > 0
+ return unless csbi = get_console_screen_buffer_info
+ screen_height = get_screen_size.first
+ y = cursor_pos.y + val
+ y = screen_height - 1 if y > (screen_height - 1)
@@SetConsoleCursorPosition.call(@@hConsoleHandle, (cursor_pos.y + val) * 65536 + cursor_pos.x)
elsif val < 0
move_cursor_up(-val)
@@ -196,31 +375,74 @@ class Reline::Windows
end
def self.erase_after_cursor
- csbi = 0.chr * 24
- @@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi)
- cursor = csbi[4, 4].unpack('L').first
+ return unless csbi = get_console_screen_buffer_info
+ attributes = csbi[8, 2].unpack1('S')
+ cursor = csbi[4, 4].unpack1('L')
written = 0.chr * 4
@@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, get_screen_size.last - cursor_pos.x, cursor, written)
+ @@FillConsoleOutputAttribute.call(@@hConsoleHandle, attributes, get_screen_size.last - cursor_pos.x, cursor, written)
end
def self.scroll_down(val)
- return if val.zero?
- scroll_rectangle = [0, val, get_screen_size.first, get_screen_size.last].pack('s4')
- destination_origin = 0 # y * 65536 + x
- fill = [' '.ord, 0].pack('SS')
- @@ScrollConsoleScreenBuffer.call(@@hConsoleHandle, scroll_rectangle, nil, destination_origin, fill)
+ return if val < 0
+ return unless csbi = get_console_screen_buffer_info
+ buffer_width, buffer_lines, x, y, attributes, window_left, window_top, window_bottom = csbi.unpack('ssssSssx2s')
+ screen_height = window_bottom - window_top + 1
+ val = screen_height if val > screen_height
+
+ if @@legacy_console || window_left != 0
+ # unless ENABLE_VIRTUAL_TERMINAL,
+ # if srWindow.Left != 0 then it's conhost.exe hosted console
+ # and puts "\n" causes horizontal scroll. its glitch.
+ # FYI irb write from culumn 1, so this gives no gain.
+ scroll_rectangle = [0, val, buffer_width, buffer_lines - val].pack('s4')
+ destination_origin = 0 # y * 65536 + x
+ fill = [' '.ord, attributes].pack('SS')
+ @@ScrollConsoleScreenBuffer.call(@@hConsoleHandle, scroll_rectangle, nil, destination_origin, fill)
+ else
+ origin_x = x + 1
+ origin_y = y - window_top + 1
+ @@output.write [
+ (origin_y != screen_height) ? "\e[#{screen_height};H" : nil,
+ "\n" * val,
+ (origin_y != screen_height or !x.zero?) ? "\e[#{origin_y};#{origin_x}H" : nil
+ ].join
+ end
end
def self.clear_screen
- # TODO: Use FillConsoleOutputCharacter and FillConsoleOutputAttribute
- print "\e[2J"
- print "\e[1;1H"
+ if @@legacy_console
+ return unless csbi = get_console_screen_buffer_info
+ buffer_width, _buffer_lines, attributes, window_top, window_bottom = csbi.unpack('ss@8S@12sx2s')
+ fill_length = buffer_width * (window_bottom - window_top + 1)
+ screen_topleft = window_top * 65536
+ written = 0.chr * 4
+ @@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, fill_length, screen_topleft, written)
+ @@FillConsoleOutputAttribute.call(@@hConsoleHandle, attributes, fill_length, screen_topleft, written)
+ @@SetConsoleCursorPosition.call(@@hConsoleHandle, screen_topleft)
+ else
+ @@output.write "\e[2J" "\e[H"
+ end
end
def self.set_screen_size(rows, columns)
raise NotImplementedError
end
+ def self.hide_cursor
+ size = 100
+ visible = 0 # 0 means false
+ cursor_info = [size, visible].pack('Li')
+ @@SetConsoleCursorInfo.call(@@hConsoleHandle, cursor_info)
+ end
+
+ def self.show_cursor
+ size = 100
+ visible = 1 # 1 means true
+ cursor_info = [size, visible].pack('Li')
+ @@SetConsoleCursorInfo.call(@@hConsoleHandle, cursor_info)
+ end
+
def self.set_winch_handler(&handler)
@@winch_handler = handler
end
@@ -233,4 +455,43 @@ class Reline::Windows
def self.deprep(otio)
# do nothing
end
+
+ class KeyEventRecord
+
+ attr_reader :virtual_key_code, :char_code, :control_key_state, :control_keys
+
+ def initialize(virtual_key_code, char_code, control_key_state)
+ @virtual_key_code = virtual_key_code
+ @char_code = char_code
+ @control_key_state = control_key_state
+ @enhanced = control_key_state & ENHANCED_KEY != 0
+
+ (@control_keys = []).tap do |control_keys|
+ # symbols must be sorted to make comparison is easier later on
+ control_keys << :ALT if control_key_state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED) != 0
+ control_keys << :CTRL if control_key_state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) != 0
+ control_keys << :SHIFT if control_key_state & SHIFT_PRESSED != 0
+ end.freeze
+ end
+
+ def char
+ @char_code.chr(Encoding::UTF_8)
+ end
+
+ def enhanced?
+ @enhanced
+ end
+
+ # Verifies if the arguments match with this key event.
+ # Nil arguments are ignored, but at least one must be passed as non-nil.
+ # To verify that no control keys were pressed, pass an empty array: `control_keys: []`.
+ def matches?(control_keys: nil, virtual_key_code: nil, char_code: nil)
+ raise ArgumentError, 'No argument was passed to match key event' if control_keys.nil? && virtual_key_code.nil? && char_code.nil?
+
+ (control_keys.nil? || [*control_keys].sort == @control_keys) &&
+ (virtual_key_code.nil? || @virtual_key_code == virtual_key_code) &&
+ (char_code.nil? || char_code == @char_code)
+ end
+
+ end
end
diff --git a/lib/resolv-replace.gemspec b/lib/resolv-replace.gemspec
new file mode 100644
index 0000000000..48f7108a8e
--- /dev/null
+++ b/lib/resolv-replace.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "resolv-replace"
+ spec.version = "0.1.1"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{Replace Socket DNS with Resolv.}
+ spec.description = %q{Replace Socket DNS with Resolv.}
+ spec.homepage = "https://github.com/ruby/resolv-replace"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "resolv"
+end
diff --git a/lib/resolv.gemspec b/lib/resolv.gemspec
new file mode 100644
index 0000000000..f221010ab6
--- /dev/null
+++ b/lib/resolv.gemspec
@@ -0,0 +1,22 @@
+Gem::Specification.new do |spec|
+ spec.name = "resolv"
+ spec.version = "0.2.3"
+ spec.authors = ["Tanaka Akira"]
+ spec.email = ["akr@fsij.org"]
+
+ spec.summary = %q{Thread-aware DNS resolver library in Ruby.}
+ spec.description = %q{Thread-aware DNS resolver library in Ruby.}
+ spec.homepage = "https://github.com/ruby/resolv"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = []
+ spec.require_paths = ["lib"]
+end
diff --git a/lib/resolv.rb b/lib/resolv.rb
index e7b45e785a..eaea69bfd5 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -696,13 +696,13 @@ class Resolv
rescue DecodeError
next # broken DNS message ignored
end
- if s = sender_for(from, msg)
+ if sender == sender_for(from, msg)
break
else
# unexpected DNS message ignored
end
end
- return msg, s.data
+ return msg, sender.data
end
def sender_for(addr, msg)
@@ -767,6 +767,7 @@ class Resolv
end
def sender(msg, data, host, port=Port)
+ host = Addrinfo.ip(host).ip_address
lazy_initialize
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
return nil if !sock
@@ -1623,6 +1624,7 @@ class Resolv
prev_index = @index
save_index = nil
d = []
+ size = -1
while true
raise DecodeError.new("limit exceeded") if @limit <= @index
case @data.getbyte(@index)
@@ -1643,7 +1645,10 @@ class Resolv
end
@index = idx
else
- d << self.get_label
+ l = self.get_label
+ d << l
+ size += 1 + l.string.bytesize
+ raise DecodeError.new("name label data exceed 255 octets") if size > 255
end
end
end
@@ -2459,13 +2464,38 @@ class Resolv
\z/x
##
+ # IPv6 link local address format fe80:b:c:d:e:f:g:h%em1
+ Regex_8HexLinkLocal = /\A
+ [Ff][Ee]80
+ (?::[0-9A-Fa-f]{1,4}){7}
+ %[-0-9A-Za-z._~]+
+ \z/x
+
+ ##
+ # Compressed IPv6 link local address format fe80::b%em1
+
+ Regex_CompressedHexLinkLocal = /\A
+ [Ff][Ee]80:
+ (?:
+ ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
+ ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
+ |
+ :((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
+ )?
+ :[0-9A-Fa-f]{1,4}%[-0-9A-Za-z._~]+
+ \z/x
+
+ ##
# A composite IPv6 address Regexp.
Regex = /
(?:#{Regex_8Hex}) |
(?:#{Regex_CompressedHex}) |
(?:#{Regex_6Hex4Dec}) |
- (?:#{Regex_CompressedHex4Dec})/x
+ (?:#{Regex_CompressedHex4Dec}) |
+ (?:#{Regex_8HexLinkLocal}) |
+ (?:#{Regex_CompressedHexLinkLocal})
+ /x
##
# Creates a new IPv6 address from +arg+ which may be:
diff --git a/lib/rexml/attlistdecl.rb b/lib/rexml/attlistdecl.rb
deleted file mode 100644
index 44a91d66d6..0000000000
--- a/lib/rexml/attlistdecl.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: false
-#vim:ts=2 sw=2 noexpandtab:
-require_relative 'child'
-require_relative 'source'
-
-module REXML
- # This class needs:
- # * Documentation
- # * Work! Not all types of attlists are intelligently parsed, so we just
- # spew back out what we get in. This works, but it would be better if
- # we formatted the output ourselves.
- #
- # AttlistDecls provide *just* enough support to allow namespace
- # declarations. If you need some sort of generalized support, or have an
- # interesting idea about how to map the hideous, terrible design of DTD
- # AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate
- # for anything to make DTDs more palateable.
- class AttlistDecl < Child
- include Enumerable
-
- # What is this? Got me.
- attr_reader :element_name
-
- # Create an AttlistDecl, pulling the information from a Source. Notice
- # that this isn't very convenient; to create an AttlistDecl, you basically
- # have to format it yourself, and then have the initializer parse it.
- # Sorry, but for the foreseeable future, DTD support in REXML is pretty
- # weak on convenience. Have I mentioned how much I hate DTDs?
- def initialize(source)
- super()
- if (source.kind_of? Array)
- @element_name, @pairs, @contents = *source
- end
- end
-
- # Access the attlist attribute/value pairs.
- # value = attlist_decl[ attribute_name ]
- def [](key)
- @pairs[key]
- end
-
- # Whether an attlist declaration includes the given attribute definition
- # if attlist_decl.include? "xmlns:foobar"
- def include?(key)
- @pairs.keys.include? key
- end
-
- # Iterate over the key/value pairs:
- # attlist_decl.each { |attribute_name, attribute_value| ... }
- def each(&block)
- @pairs.each(&block)
- end
-
- # Write out exactly what we got in.
- def write out, indent=-1
- out << @contents
- end
-
- def node_type
- :attlistdecl
- end
- end
-end
diff --git a/lib/rexml/attribute.rb b/lib/rexml/attribute.rb
deleted file mode 100644
index 8933a013a2..0000000000
--- a/lib/rexml/attribute.rb
+++ /dev/null
@@ -1,205 +0,0 @@
-# frozen_string_literal: false
-require_relative "namespace"
-require_relative 'text'
-
-module REXML
- # Defines an Element Attribute; IE, a attribute=value pair, as in:
- # <element attribute="value"/>. Attributes can be in their own
- # namespaces. General users of REXML will not interact with the
- # Attribute class much.
- class Attribute
- include Node
- include Namespace
-
- # The element to which this attribute belongs
- attr_reader :element
- # The normalized value of this attribute. That is, the attribute with
- # entities intact.
- attr_writer :normalized
- PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um
-
- NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
-
- # Constructor.
- # FIXME: The parser doesn't catch illegal characters in attributes
- #
- # first::
- # Either: an Attribute, which this new attribute will become a
- # clone of; or a String, which is the name of this attribute
- # second::
- # If +first+ is an Attribute, then this may be an Element, or nil.
- # If nil, then the Element parent of this attribute is the parent
- # of the +first+ Attribute. If the first argument is a String,
- # then this must also be a String, and is the content of the attribute.
- # If this is the content, it must be fully normalized (contain no
- # illegal characters).
- # parent::
- # Ignored unless +first+ is a String; otherwise, may be the Element
- # parent of this attribute, or nil.
- #
- #
- # Attribute.new( attribute_to_clone )
- # Attribute.new( attribute_to_clone, parent_element )
- # Attribute.new( "attr", "attr_value" )
- # Attribute.new( "attr", "attr_value", parent_element )
- def initialize( first, second=nil, parent=nil )
- @normalized = @unnormalized = @element = nil
- if first.kind_of? Attribute
- self.name = first.expanded_name
- @unnormalized = first.value
- if second.kind_of? Element
- @element = second
- else
- @element = first.element
- end
- elsif first.kind_of? String
- @element = parent
- self.name = first
- @normalized = second.to_s
- else
- raise "illegal argument #{first.class.name} to Attribute constructor"
- end
- end
-
- # Returns the namespace of the attribute.
- #
- # e = Element.new( "elns:myelement" )
- # e.add_attribute( "nsa:a", "aval" )
- # e.add_attribute( "b", "bval" )
- # e.attributes.get_attribute( "a" ).prefix # -> "nsa"
- # e.attributes.get_attribute( "b" ).prefix # -> ""
- # a = Attribute.new( "x", "y" )
- # a.prefix # -> ""
- def prefix
- super
- end
-
- # Returns the namespace URL, if defined, or nil otherwise
- #
- # e = Element.new("el")
- # e.add_namespace("ns", "http://url")
- # e.add_attribute("ns:a", "b")
- # e.add_attribute("nsx:a", "c")
- # e.attribute("ns:a").namespace # => "http://url"
- # e.attribute("nsx:a").namespace # => nil
- #
- # This method always returns "" for no namespace attribute. Because
- # the default namespace doesn't apply to attribute names.
- #
- # From https://www.w3.org/TR/xml-names/#uniqAttrs
- #
- # > the default namespace does not apply to attribute names
- #
- # e = REXML::Element.new("el")
- # e.add_namespace("", "http://example.com/")
- # e.namespace # => "http://example.com/"
- # e.add_attribute("a", "b")
- # e.attribute("a").namespace # => ""
- def namespace arg=nil
- arg = prefix if arg.nil?
- if arg == ""
- ""
- else
- @element.namespace(arg)
- end
- end
-
- # Returns true if other is an Attribute and has the same name and value,
- # false otherwise.
- def ==( other )
- other.kind_of?(Attribute) and other.name==name and other.value==value
- end
-
- # Creates (and returns) a hash from both the name and value
- def hash
- name.hash + value.hash
- end
-
- # Returns this attribute out as XML source, expanding the name
- #
- # a = Attribute.new( "x", "y" )
- # a.to_string # -> "x='y'"
- # b = Attribute.new( "ns:x", "y" )
- # b.to_string # -> "ns:x='y'"
- def to_string
- if @element and @element.context and @element.context[:attribute_quote] == :quote
- %Q^#@expanded_name="#{to_s().gsub(/"/, '&quot;')}"^
- else
- "#@expanded_name='#{to_s().gsub(/'/, '&apos;')}'"
- end
- end
-
- def doctype
- if @element
- doc = @element.document
- doc.doctype if doc
- end
- end
-
- # Returns the attribute value, with entities replaced
- def to_s
- return @normalized if @normalized
-
- @normalized = Text::normalize( @unnormalized, doctype )
- @unnormalized = nil
- @normalized
- end
-
- # Returns the UNNORMALIZED value of this attribute. That is, entities
- # have been expanded to their values
- def value
- return @unnormalized if @unnormalized
- @unnormalized = Text::unnormalize( @normalized, doctype )
- @normalized = nil
- @unnormalized
- end
-
- # Returns a copy of this attribute
- def clone
- Attribute.new self
- end
-
- # Sets the element of which this object is an attribute. Normally, this
- # is not directly called.
- #
- # Returns this attribute
- def element=( element )
- @element = element
-
- if @normalized
- Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype )
- end
-
- self
- end
-
- # Removes this Attribute from the tree, and returns true if successful
- #
- # This method is usually not called directly.
- def remove
- @element.attributes.delete self.name unless @element.nil?
- end
-
- # Writes this attribute (EG, puts 'key="value"' to the output)
- def write( output, indent=-1 )
- output << to_string
- end
-
- def node_type
- :attribute
- end
-
- def inspect
- rv = ""
- write( rv )
- rv
- end
-
- def xpath
- path = @element.xpath
- path += "/@#{self.expanded_name}"
- return path
- end
- end
-end
-#vim:ts=2 sw=2 noexpandtab:
diff --git a/lib/rexml/cdata.rb b/lib/rexml/cdata.rb
deleted file mode 100644
index 997f5a08db..0000000000
--- a/lib/rexml/cdata.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: false
-require_relative "text"
-
-module REXML
- class CData < Text
- START = '<![CDATA['
- STOP = ']]>'
- ILLEGAL = /(\]\]>)/
-
- # Constructor. CData is data between <![CDATA[ ... ]]>
- #
- # _Examples_
- # CData.new( source )
- # CData.new( "Here is some CDATA" )
- # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element )
- def initialize( first, whitespace=true, parent=nil )
- super( first, whitespace, parent, false, true, ILLEGAL )
- end
-
- # Make a copy of this object
- #
- # _Examples_
- # c = CData.new( "Some text" )
- # d = c.clone
- # d.to_s # -> "Some text"
- def clone
- CData.new self
- end
-
- # Returns the content of this CData object
- #
- # _Examples_
- # c = CData.new( "Some text" )
- # c.to_s # -> "Some text"
- def to_s
- @string
- end
-
- def value
- @string
- end
-
- # == DEPRECATED
- # See the rexml/formatters package
- #
- # Generates XML output of this object
- #
- # output::
- # Where to write the string. Defaults to $stdout
- # indent::
- # The amount to indent this node by
- # transitive::
- # Ignored
- # ie_hack::
- # Ignored
- #
- # _Examples_
- # c = CData.new( " Some text " )
- # c.write( $stdout ) #-> <![CDATA[ Some text ]]>
- def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
- Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
- indent( output, indent )
- output << START
- output << @string
- output << STOP
- end
- end
-end
diff --git a/lib/rexml/child.rb b/lib/rexml/child.rb
deleted file mode 100644
index cc6e9a4719..0000000000
--- a/lib/rexml/child.rb
+++ /dev/null
@@ -1,97 +0,0 @@
-# frozen_string_literal: false
-require_relative "node"
-
-module REXML
- ##
- # A Child object is something contained by a parent, and this class
- # contains methods to support that. Most user code will not use this
- # class directly.
- class Child
- include Node
- attr_reader :parent # The Parent of this object
-
- # Constructor. Any inheritors of this class should call super to make
- # sure this method is called.
- # parent::
- # if supplied, the parent of this child will be set to the
- # supplied value, and self will be added to the parent
- def initialize( parent = nil )
- @parent = nil
- # Declare @parent, but don't define it. The next line sets the
- # parent.
- parent.add( self ) if parent
- end
-
- # Replaces this object with another object. Basically, calls
- # Parent.replace_child
- #
- # Returns:: self
- def replace_with( child )
- @parent.replace_child( self, child )
- self
- end
-
- # Removes this child from the parent.
- #
- # Returns:: self
- def remove
- unless @parent.nil?
- @parent.delete self
- end
- self
- end
-
- # Sets the parent of this child to the supplied argument.
- #
- # other::
- # Must be a Parent object. If this object is the same object as the
- # existing parent of this child, no action is taken. Otherwise, this
- # child is removed from the current parent (if one exists), and is added
- # to the new parent.
- # Returns:: The parent added
- def parent=( other )
- return @parent if @parent == other
- @parent.delete self if defined? @parent and @parent
- @parent = other
- end
-
- alias :next_sibling :next_sibling_node
- alias :previous_sibling :previous_sibling_node
-
- # Sets the next sibling of this child. This can be used to insert a child
- # after some other child.
- # a = Element.new("a")
- # b = a.add_element("b")
- # c = Element.new("c")
- # b.next_sibling = c
- # # => <a><b/><c/></a>
- def next_sibling=( other )
- parent.insert_after self, other
- end
-
- # Sets the previous sibling of this child. This can be used to insert a
- # child before some other child.
- # a = Element.new("a")
- # b = a.add_element("b")
- # c = Element.new("c")
- # b.previous_sibling = c
- # # => <a><b/><c/></a>
- def previous_sibling=(other)
- parent.insert_before self, other
- end
-
- # Returns:: the document this child belongs to, or nil if this child
- # belongs to no document
- def document
- return parent.document unless parent.nil?
- nil
- end
-
- # This doesn't yet handle encodings
- def bytes
- document.encoding
-
- to_s
- end
- end
-end
diff --git a/lib/rexml/comment.rb b/lib/rexml/comment.rb
deleted file mode 100644
index 52c58b46f6..0000000000
--- a/lib/rexml/comment.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: false
-require_relative "child"
-
-module REXML
- ##
- # Represents an XML comment; that is, text between \<!-- ... -->
- class Comment < Child
- include Comparable
- START = "<!--"
- STOP = "-->"
-
- # The content text
-
- attr_accessor :string
-
- ##
- # Constructor. The first argument can be one of three types:
- # @param first If String, the contents of this comment are set to the
- # argument. If Comment, the argument is duplicated. If
- # Source, the argument is scanned for a comment.
- # @param second If the first argument is a Source, this argument
- # should be nil, not supplied, or a Parent to be set as the parent
- # of this object
- def initialize( first, second = nil )
- super(second)
- if first.kind_of? String
- @string = first
- elsif first.kind_of? Comment
- @string = first.string
- end
- end
-
- def clone
- Comment.new self
- end
-
- # == DEPRECATED
- # See REXML::Formatters
- #
- # output::
- # Where to write the string
- # indent::
- # An integer. If -1, no indenting will be used; otherwise, the
- # indentation will be this number of spaces, and children will be
- # indented an additional amount.
- # transitive::
- # Ignored by this class. The contents of comments are never modified.
- # ie_hack::
- # Needed for conformity to the child API, but not used by this class.
- def write( output, indent=-1, transitive=false, ie_hack=false )
- Kernel.warn("Comment.write is deprecated. See REXML::Formatters", uplevel: 1)
- indent( output, indent )
- output << START
- output << @string
- output << STOP
- end
-
- alias :to_s :string
-
- ##
- # Compares this Comment to another; the contents of the comment are used
- # in the comparison.
- def <=>(other)
- other.to_s <=> @string
- end
-
- ##
- # Compares this Comment to another; the contents of the comment are used
- # in the comparison.
- def ==( other )
- other.kind_of? Comment and
- (other <=> self) == 0
- end
-
- def node_type
- :comment
- end
- end
-end
-#vim:ts=2 sw=2 noexpandtab:
diff --git a/lib/rexml/doctype.rb b/lib/rexml/doctype.rb
deleted file mode 100644
index 757b639639..0000000000
--- a/lib/rexml/doctype.rb
+++ /dev/null
@@ -1,287 +0,0 @@
-# frozen_string_literal: false
-require_relative "parent"
-require_relative "parseexception"
-require_relative "namespace"
-require_relative 'entity'
-require_relative 'attlistdecl'
-require_relative 'xmltokens'
-
-module REXML
- # Represents an XML DOCTYPE declaration; that is, the contents of <!DOCTYPE
- # ... >. DOCTYPES can be used to declare the DTD of a document, as well as
- # being used to declare entities used in the document.
- class DocType < Parent
- include XMLTokens
- START = "<!DOCTYPE"
- STOP = ">"
- SYSTEM = "SYSTEM"
- PUBLIC = "PUBLIC"
- DEFAULT_ENTITIES = {
- 'gt'=>EntityConst::GT,
- 'lt'=>EntityConst::LT,
- 'quot'=>EntityConst::QUOT,
- "apos"=>EntityConst::APOS
- }
-
- # name is the name of the doctype
- # external_id is the referenced DTD, if given
- attr_reader :name, :external_id, :entities, :namespaces
-
- # Constructor
- #
- # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' )
- # # <!DOCTYPE foo '-//I/Hate/External/IDs'>
- # dt = DocType.new( doctype_to_clone )
- # # Incomplete. Shallow clone of doctype
- #
- # +Note+ that the constructor:
- #
- # Doctype.new( Source.new( "<!DOCTYPE foo 'bar'>" ) )
- #
- # is _deprecated_. Do not use it. It will probably disappear.
- def initialize( first, parent=nil )
- @entities = DEFAULT_ENTITIES
- @long_name = @uri = nil
- if first.kind_of? String
- super()
- @name = first
- @external_id = parent
- elsif first.kind_of? DocType
- super( parent )
- @name = first.name
- @external_id = first.external_id
- elsif first.kind_of? Array
- super( parent )
- @name = first[0]
- @external_id = first[1]
- @long_name = first[2]
- @uri = first[3]
- elsif first.kind_of? Source
- super( parent )
- parser = Parsers::BaseParser.new( first )
- event = parser.pull
- if event[0] == :start_doctype
- @name, @external_id, @long_name, @uri, = event[1..-1]
- end
- else
- super()
- end
- end
-
- def node_type
- :doctype
- end
-
- def attributes_of element
- rv = []
- each do |child|
- child.each do |key,val|
- rv << Attribute.new(key,val)
- end if child.kind_of? AttlistDecl and child.element_name == element
- end
- rv
- end
-
- def attribute_of element, attribute
- att_decl = find do |child|
- child.kind_of? AttlistDecl and
- child.element_name == element and
- child.include? attribute
- end
- return nil unless att_decl
- att_decl[attribute]
- end
-
- def clone
- DocType.new self
- end
-
- # output::
- # Where to write the string
- # indent::
- # An integer. If -1, no indentation will be used; otherwise, the
- # indentation will be this number of spaces, and children will be
- # indented an additional amount.
- # transitive::
- # Ignored
- # ie_hack::
- # Ignored
- def write( output, indent=0, transitive=false, ie_hack=false )
- f = REXML::Formatters::Default.new
- c = context
- if c and c[:prologue_quote] == :apostrophe
- quote = "'"
- else
- quote = "\""
- end
- indent( output, indent )
- output << START
- output << ' '
- output << @name
- output << " #{@external_id}" if @external_id
- output << " #{quote}#{@long_name}#{quote}" if @long_name
- output << " #{quote}#{@uri}#{quote}" if @uri
- unless @children.empty?
- output << ' ['
- @children.each { |child|
- output << "\n"
- f.write( child, output )
- }
- output << "\n]"
- end
- output << STOP
- end
-
- def context
- if @parent
- @parent.context
- else
- nil
- end
- end
-
- def entity( name )
- @entities[name].unnormalized if @entities[name]
- end
-
- def add child
- super(child)
- @entities = DEFAULT_ENTITIES.clone if @entities == DEFAULT_ENTITIES
- @entities[ child.name ] = child if child.kind_of? Entity
- end
-
- # This method retrieves the public identifier identifying the document's
- # DTD.
- #
- # Method contributed by Henrik Martensson
- def public
- case @external_id
- when "SYSTEM"
- nil
- when "PUBLIC"
- strip_quotes(@long_name)
- end
- end
-
- # This method retrieves the system identifier identifying the document's DTD
- #
- # Method contributed by Henrik Martensson
- def system
- case @external_id
- when "SYSTEM"
- strip_quotes(@long_name)
- when "PUBLIC"
- @uri.kind_of?(String) ? strip_quotes(@uri) : nil
- end
- end
-
- # This method returns a list of notations that have been declared in the
- # _internal_ DTD subset. Notations in the external DTD subset are not
- # listed.
- #
- # Method contributed by Henrik Martensson
- def notations
- children().select {|node| node.kind_of?(REXML::NotationDecl)}
- end
-
- # Retrieves a named notation. Only notations declared in the internal
- # DTD subset can be retrieved.
- #
- # Method contributed by Henrik Martensson
- def notation(name)
- notations.find { |notation_decl|
- notation_decl.name == name
- }
- end
-
- private
-
- # Method contributed by Henrik Martensson
- def strip_quotes(quoted_string)
- quoted_string =~ /^[\'\"].*[\'\"]$/ ?
- quoted_string[1, quoted_string.length-2] :
- quoted_string
- end
- end
-
- # We don't really handle any of these since we're not a validating
- # parser, so we can be pretty dumb about them. All we need to be able
- # to do is spew them back out on a write()
-
- # This is an abstract class. You never use this directly; it serves as a
- # parent class for the specific declarations.
- class Declaration < Child
- def initialize src
- super()
- @string = src
- end
-
- def to_s
- @string+'>'
- end
-
- # == DEPRECATED
- # See REXML::Formatters
- #
- def write( output, indent )
- output << to_s
- end
- end
-
- public
- class ElementDecl < Declaration
- def initialize( src )
- super
- end
- end
-
- class ExternalEntity < Child
- def initialize( src )
- super()
- @entity = src
- end
- def to_s
- @entity
- end
- def write( output, indent )
- output << @entity
- end
- end
-
- class NotationDecl < Child
- attr_accessor :public, :system
- def initialize name, middle, pub, sys
- super(nil)
- @name = name
- @middle = middle
- @public = pub
- @system = sys
- end
-
- def to_s
- c = nil
- c = parent.context if parent
- if c and c[:prologue_quote] == :apostrophe
- quote = "'"
- else
- quote = "\""
- end
- notation = "<!NOTATION #{@name} #{@middle}"
- notation << " #{quote}#{@public}#{quote}" if @public
- notation << " #{quote}#{@system}#{quote}" if @system
- notation << ">"
- notation
- end
-
- def write( output, indent=-1 )
- output << to_s
- end
-
- # This method retrieves the name of the notation.
- #
- # Method contributed by Henrik Martensson
- def name
- @name
- end
- end
-end
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb
deleted file mode 100644
index adec293066..0000000000
--- a/lib/rexml/document.rb
+++ /dev/null
@@ -1,291 +0,0 @@
-# frozen_string_literal: false
-require_relative "security"
-require_relative "element"
-require_relative "xmldecl"
-require_relative "source"
-require_relative "comment"
-require_relative "doctype"
-require_relative "instruction"
-require_relative "rexml"
-require_relative "parseexception"
-require_relative "output"
-require_relative "parsers/baseparser"
-require_relative "parsers/streamparser"
-require_relative "parsers/treeparser"
-
-module REXML
- # Represents a full XML document, including PIs, a doctype, etc. A
- # Document has a single child that can be accessed by root().
- # Note that if you want to have an XML declaration written for a document
- # you create, you must add one; REXML documents do not write a default
- # declaration for you. See |DECLARATION| and |write|.
- class Document < Element
- # A convenient default XML declaration. If you want an XML declaration,
- # the easiest way to add one is mydoc << Document::DECLARATION
- # +DEPRECATED+
- # Use: mydoc << XMLDecl.default
- DECLARATION = XMLDecl.default
-
- # Constructor
- # @param source if supplied, must be a Document, String, or IO.
- # Documents have their context and Element attributes cloned.
- # Strings are expected to be valid XML documents. IOs are expected
- # to be sources of valid XML documents.
- # @param context if supplied, contains the context of the document;
- # this should be a Hash.
- def initialize( source = nil, context = {} )
- @entity_expansion_count = 0
- super()
- @context = context
- return if source.nil?
- if source.kind_of? Document
- @context = source.context
- super source
- else
- build( source )
- end
- end
-
- def node_type
- :document
- end
-
- # Should be obvious
- def clone
- Document.new self
- end
-
- # According to the XML spec, a root node has no expanded name
- def expanded_name
- ''
- #d = doc_type
- #d ? d.name : "UNDEFINED"
- end
-
- alias :name :expanded_name
-
- # We override this, because XMLDecls and DocTypes must go at the start
- # of the document
- def add( child )
- if child.kind_of? XMLDecl
- if @children[0].kind_of? XMLDecl
- @children[0] = child
- else
- @children.unshift child
- end
- child.parent = self
- elsif child.kind_of? DocType
- # Find first Element or DocType node and insert the decl right
- # before it. If there is no such node, just insert the child at the
- # end. If there is a child and it is an DocType, then replace it.
- insert_before_index = @children.find_index { |x|
- x.kind_of?(Element) || x.kind_of?(DocType)
- }
- if insert_before_index # Not null = not end of list
- if @children[ insert_before_index ].kind_of? DocType
- @children[ insert_before_index ] = child
- else
- @children[ insert_before_index-1, 0 ] = child
- end
- else # Insert at end of list
- @children << child
- end
- child.parent = self
- else
- rv = super
- raise "attempted adding second root element to document" if @elements.size > 1
- rv
- end
- end
- alias :<< :add
-
- def add_element(arg=nil, arg2=nil)
- rv = super
- raise "attempted adding second root element to document" if @elements.size > 1
- rv
- end
-
- # @return the root Element of the document, or nil if this document
- # has no children.
- def root
- elements[1]
- #self
- #@children.find { |item| item.kind_of? Element }
- end
-
- # @return the DocType child of the document, if one exists,
- # and nil otherwise.
- def doctype
- @children.find { |item| item.kind_of? DocType }
- end
-
- # @return the XMLDecl of this document; if no XMLDecl has been
- # set, the default declaration is returned.
- def xml_decl
- rv = @children[0]
- return rv if rv.kind_of? XMLDecl
- @children.unshift(XMLDecl.default)[0]
- end
-
- # @return the XMLDecl version of this document as a String.
- # If no XMLDecl has been set, returns the default version.
- def version
- xml_decl().version
- end
-
- # @return the XMLDecl encoding of this document as an
- # Encoding object.
- # If no XMLDecl has been set, returns the default encoding.
- def encoding
- xml_decl().encoding
- end
-
- # @return the XMLDecl standalone value of this document as a String.
- # If no XMLDecl has been set, returns the default setting.
- def stand_alone?
- xml_decl().stand_alone?
- end
-
- # :call-seq:
- # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil)
- # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil})
- #
- # Write the XML tree out, optionally with indent. This writes out the
- # entire XML document, including XML declarations, doctype declarations,
- # and processing instructions (if any are given).
- #
- # A controversial point is whether Document should always write the XML
- # declaration (<?xml version='1.0'?>) whether or not one is given by the
- # user (or source document). REXML does not write one if one was not
- # specified, because it adds unnecessary bandwidth to applications such
- # as XML-RPC.
- #
- # Accept Nth argument style and options Hash style as argument.
- # The recommended style is options Hash style for one or more
- # arguments case.
- #
- # _Examples_
- # Document.new("<a><b/></a>").write
- #
- # output = ""
- # Document.new("<a><b/></a>").write(output)
- #
- # output = ""
- # Document.new("<a><b/></a>").write(:output => output, :indent => 2)
- #
- # See also the classes in the rexml/formatters package for the proper way
- # to change the default formatting of XML output.
- #
- # _Examples_
- #
- # output = ""
- # tr = Transitive.new
- # tr.write(Document.new("<a><b/></a>"), output)
- #
- # output::
- # output an object which supports '<< string'; this is where the
- # document will be written.
- # indent::
- # An integer. If -1, no indenting will be used; otherwise, the
- # indentation will be twice this number of spaces, and children will be
- # indented an additional amount. For a value of 3, every item will be
- # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1
- # transitive::
- # If transitive is true and indent is >= 0, then the output will be
- # pretty-printed in such a way that the added whitespace does not affect
- # the absolute *value* of the document -- that is, it leaves the value
- # and number of Text nodes in the document unchanged.
- # ie_hack::
- # This hack inserts a space before the /> on empty tags to address
- # a limitation of Internet Explorer. Defaults to false
- # encoding::
- # Encoding name as String. Change output encoding to specified encoding
- # instead of encoding in XML declaration.
- # Defaults to nil. It means encoding in XML declaration is used.
- def write(*arguments)
- if arguments.size == 1 and arguments[0].class == Hash
- options = arguments[0]
-
- output = options[:output]
- indent = options[:indent]
- transitive = options[:transitive]
- ie_hack = options[:ie_hack]
- encoding = options[:encoding]
- else
- output, indent, transitive, ie_hack, encoding, = *arguments
- end
-
- output ||= $stdout
- indent ||= -1
- transitive = false if transitive.nil?
- ie_hack = false if ie_hack.nil?
- encoding ||= xml_decl.encoding
-
- if encoding != 'UTF-8' && !output.kind_of?(Output)
- output = Output.new( output, encoding )
- end
- formatter = if indent > -1
- if transitive
- require_relative "formatters/transitive"
- REXML::Formatters::Transitive.new( indent, ie_hack )
- else
- REXML::Formatters::Pretty.new( indent, ie_hack )
- end
- else
- REXML::Formatters::Default.new( ie_hack )
- end
- formatter.write( self, output )
- end
-
-
- def Document::parse_stream( source, listener )
- Parsers::StreamParser.new( source, listener ).parse
- end
-
- # Set the entity expansion limit. By default the limit is set to 10000.
- #
- # Deprecated. Use REXML::Security.entity_expansion_limit= instead.
- def Document::entity_expansion_limit=( val )
- Security.entity_expansion_limit = val
- end
-
- # Get the entity expansion limit. By default the limit is set to 10000.
- #
- # Deprecated. Use REXML::Security.entity_expansion_limit= instead.
- def Document::entity_expansion_limit
- return Security.entity_expansion_limit
- end
-
- # Set the entity expansion limit. By default the limit is set to 10240.
- #
- # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead.
- def Document::entity_expansion_text_limit=( val )
- Security.entity_expansion_text_limit = val
- end
-
- # Get the entity expansion limit. By default the limit is set to 10240.
- #
- # Deprecated. Use REXML::Security.entity_expansion_text_limit instead.
- def Document::entity_expansion_text_limit
- return Security.entity_expansion_text_limit
- end
-
- attr_reader :entity_expansion_count
-
- def record_entity_expansion
- @entity_expansion_count += 1
- if @entity_expansion_count > Security.entity_expansion_limit
- raise "number of entity expansions exceeded, processing aborted."
- end
- end
-
- def document
- self
- end
-
- private
- def build( source )
- Parsers::TreeParser.new( source, self ).parse
- end
- end
-end
diff --git a/lib/rexml/dtd/attlistdecl.rb b/lib/rexml/dtd/attlistdecl.rb
deleted file mode 100644
index 1326cb21e4..0000000000
--- a/lib/rexml/dtd/attlistdecl.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: false
-require_relative "../child"
-module REXML
- module DTD
- class AttlistDecl < Child
- START = "<!ATTLIST"
- START_RE = /^\s*#{START}/um
- PATTERN_RE = /\s*(#{START}.*?>)/um
- end
- end
-end
diff --git a/lib/rexml/dtd/dtd.rb b/lib/rexml/dtd/dtd.rb
deleted file mode 100644
index 8b0f2d753a..0000000000
--- a/lib/rexml/dtd/dtd.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# frozen_string_literal: false
-require_relative "elementdecl"
-require_relative "entitydecl"
-require_relative "../comment"
-require_relative "notationdecl"
-require_relative "attlistdecl"
-require_relative "../parent"
-
-module REXML
- module DTD
- class Parser
- def Parser.parse( input )
- case input
- when String
- parse_helper input
- when File
- parse_helper input.read
- end
- end
-
- # Takes a String and parses it out
- def Parser.parse_helper( input )
- contents = Parent.new
- while input.size > 0
- case input
- when ElementDecl.PATTERN_RE
- match = $&
- contents << ElementDecl.new( match )
- when AttlistDecl.PATTERN_RE
- matchdata = $~
- contents << AttlistDecl.new( matchdata )
- when EntityDecl.PATTERN_RE
- matchdata = $~
- contents << EntityDecl.new( matchdata )
- when Comment.PATTERN_RE
- matchdata = $~
- contents << Comment.new( matchdata )
- when NotationDecl.PATTERN_RE
- matchdata = $~
- contents << NotationDecl.new( matchdata )
- end
- end
- contents
- end
- end
- end
-end
diff --git a/lib/rexml/dtd/elementdecl.rb b/lib/rexml/dtd/elementdecl.rb
deleted file mode 100644
index 20ed023244..0000000000
--- a/lib/rexml/dtd/elementdecl.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: false
-require_relative "../child"
-module REXML
- module DTD
- class ElementDecl < Child
- START = "<!ELEMENT"
- START_RE = /^\s*#{START}/um
- # PATTERN_RE = /^\s*(#{START}.*?)>/um
- PATTERN_RE = /^\s*#{START}\s+((?:[:\w][-\.\w]*:)?[-!\*\.\w]*)(.*?)>/
- #\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true)
-
- def initialize match
- @name = match[1]
- @rest = match[2]
- end
- end
- end
-end
diff --git a/lib/rexml/dtd/entitydecl.rb b/lib/rexml/dtd/entitydecl.rb
deleted file mode 100644
index 312df655ff..0000000000
--- a/lib/rexml/dtd/entitydecl.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: false
-require_relative "../child"
-module REXML
- module DTD
- class EntityDecl < Child
- START = "<!ENTITY"
- START_RE = /^\s*#{START}/um
- PUBLIC = /^\s*#{START}\s+(?:%\s+)?(\w+)\s+PUBLIC\s+((["']).*?\3)\s+((["']).*?\5)\s*>/um
- SYSTEM = /^\s*#{START}\s+(?:%\s+)?(\w+)\s+SYSTEM\s+((["']).*?\3)(?:\s+NDATA\s+\w+)?\s*>/um
- PLAIN = /^\s*#{START}\s+(\w+)\s+((["']).*?\3)\s*>/um
- PERCENT = /^\s*#{START}\s+%\s+(\w+)\s+((["']).*?\3)\s*>/um
- # <!ENTITY name SYSTEM "...">
- # <!ENTITY name "...">
- def initialize src
- super()
- md = nil
- if src.match( PUBLIC )
- md = src.match( PUBLIC, true )
- @middle = "PUBLIC"
- @content = "#{md[2]} #{md[4]}"
- elsif src.match( SYSTEM )
- md = src.match( SYSTEM, true )
- @middle = "SYSTEM"
- @content = md[2]
- elsif src.match( PLAIN )
- md = src.match( PLAIN, true )
- @middle = ""
- @content = md[2]
- elsif src.match( PERCENT )
- md = src.match( PERCENT, true )
- @middle = ""
- @content = md[2]
- end
- raise ParseException.new("failed Entity match", src) if md.nil?
- @name = md[1]
- end
-
- def to_s
- rv = "<!ENTITY #@name "
- rv << "#@middle " if @middle.size > 0
- rv << @content
- rv
- end
-
- def write( output, indent )
- indent( output, indent )
- output << to_s
- end
-
- def EntityDecl.parse_source source, listener
- md = source.match( PATTERN_RE, true )
- thing = md[0].squeeze(" \t\n\r")
- listener.send inspect.downcase, thing
- end
- end
- end
-end
diff --git a/lib/rexml/dtd/notationdecl.rb b/lib/rexml/dtd/notationdecl.rb
deleted file mode 100644
index 04a9b08aa7..0000000000
--- a/lib/rexml/dtd/notationdecl.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: false
-require_relative "../child"
-module REXML
- module DTD
- class NotationDecl < Child
- START = "<!NOTATION"
- START_RE = /^\s*#{START}/um
- PUBLIC = /^\s*#{START}\s+(\w[\w-]*)\s+(PUBLIC)\s+((["']).*?\4)\s*>/um
- SYSTEM = /^\s*#{START}\s+(\w[\w-]*)\s+(SYSTEM)\s+((["']).*?\4)\s*>/um
- def initialize src
- super()
- if src.match( PUBLIC )
- md = src.match( PUBLIC, true )
- elsif src.match( SYSTEM )
- md = src.match( SYSTEM, true )
- else
- raise ParseException.new( "error parsing notation: no matching pattern", src )
- end
- @name = md[1]
- @middle = md[2]
- @rest = md[3]
- end
-
- def to_s
- "<!NOTATION #@name #@middle #@rest>"
- end
-
- def write( output, indent )
- indent( output, indent )
- output << to_s
- end
-
- def NotationDecl.parse_source source, listener
- md = source.match( PATTERN_RE, true )
- thing = md[0].squeeze(" \t\n\r")
- listener.send inspect.downcase, thing
- end
- end
- end
-end
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb
deleted file mode 100644
index c706a7c245..0000000000
--- a/lib/rexml/element.rb
+++ /dev/null
@@ -1,1269 +0,0 @@
-# frozen_string_literal: false
-require_relative "parent"
-require_relative "namespace"
-require_relative "attribute"
-require_relative "cdata"
-require_relative "xpath"
-require_relative "parseexception"
-
-module REXML
- # An implementation note about namespaces:
- # As we parse, when we find namespaces we put them in a hash and assign
- # them a unique ID. We then convert the namespace prefix for the node
- # to the unique ID. This makes namespace lookup much faster for the
- # cost of extra memory use. We save the namespace prefix for the
- # context node and convert it back when we write it.
- @@namespaces = {}
-
- # Represents a tagged XML element. Elements are characterized by
- # having children, attributes, and names, and can themselves be
- # children.
- class Element < Parent
- include Namespace
-
- UNDEFINED = "UNDEFINED"; # The default name
-
- # Mechanisms for accessing attributes and child elements of this
- # element.
- attr_reader :attributes, :elements
- # The context holds information about the processing environment, such as
- # whitespace handling.
- attr_accessor :context
-
- # Constructor
- # arg::
- # if not supplied, will be set to the default value.
- # If a String, the name of this object will be set to the argument.
- # If an Element, the object will be shallowly cloned; name,
- # attributes, and namespaces will be copied. Children will +not+ be
- # copied.
- # parent::
- # if supplied, must be a Parent, and will be used as
- # the parent of this object.
- # context::
- # If supplied, must be a hash containing context items. Context items
- # include:
- # * <tt>:respect_whitespace</tt> the value of this is :+all+ or an array of
- # strings being the names of the elements to respect
- # whitespace for. Defaults to :+all+.
- # * <tt>:compress_whitespace</tt> the value can be :+all+ or an array of
- # strings being the names of the elements to ignore whitespace on.
- # Overrides :+respect_whitespace+.
- # * <tt>:ignore_whitespace_nodes</tt> the value can be :+all+ or an array
- # of strings being the names of the elements in which to ignore
- # whitespace-only nodes. If this is set, Text nodes which contain only
- # whitespace will not be added to the document tree.
- # * <tt>:raw</tt> can be :+all+, or an array of strings being the names of
- # the elements to process in raw mode. In raw mode, special
- # characters in text is not converted to or from entities.
- def initialize( arg = UNDEFINED, parent=nil, context=nil )
- super(parent)
-
- @elements = Elements.new(self)
- @attributes = Attributes.new(self)
- @context = context
-
- if arg.kind_of? String
- self.name = arg
- elsif arg.kind_of? Element
- self.name = arg.expanded_name
- arg.attributes.each_attribute{ |attribute|
- @attributes << Attribute.new( attribute )
- }
- @context = arg.context
- end
- end
-
- def inspect
- rv = "<#@expanded_name"
-
- @attributes.each_attribute do |attr|
- rv << " "
- attr.write( rv, 0 )
- end
-
- if children.size > 0
- rv << "> ... </>"
- else
- rv << "/>"
- end
- end
-
-
- # Creates a shallow copy of self.
- # d = Document.new "<a><b/><b/><c><d/></c></a>"
- # new_a = d.root.clone
- # puts new_a # => "<a/>"
- def clone
- self.class.new self
- end
-
- # Evaluates to the root node of the document that this element
- # belongs to. If this element doesn't belong to a document, but does
- # belong to another Element, the parent's root will be returned, until the
- # earliest ancestor is found.
- #
- # Note that this is not the same as the document element.
- # In the following example, <a> is the document element, and the root
- # node is the parent node of the document element. You may ask yourself
- # why the root node is useful: consider the doctype and XML declaration,
- # and any processing instructions before the document element... they
- # are children of the root node, or siblings of the document element.
- # The only time this isn't true is when an Element is created that is
- # not part of any Document. In this case, the ancestor that has no
- # parent acts as the root node.
- # d = Document.new '<a><b><c/></b></a>'
- # a = d[1] ; c = a[1][1]
- # d.root_node == d # TRUE
- # a.root_node # namely, d
- # c.root_node # again, d
- def root_node
- parent.nil? ? self : parent.root_node
- end
-
- def root
- return elements[1] if self.kind_of? Document
- return self if parent.kind_of? Document or parent.nil?
- return parent.root
- end
-
- # Evaluates to the document to which this element belongs, or nil if this
- # element doesn't belong to a document.
- def document
- rt = root
- rt.parent if rt
- end
-
- # Evaluates to +true+ if whitespace is respected for this element. This
- # is the case if:
- # 1. Neither :+respect_whitespace+ nor :+compress_whitespace+ has any value
- # 2. The context has :+respect_whitespace+ set to :+all+ or
- # an array containing the name of this element, and
- # :+compress_whitespace+ isn't set to :+all+ or an array containing the
- # name of this element.
- # The evaluation is tested against +expanded_name+, and so is namespace
- # sensitive.
- def whitespace
- @whitespace = nil
- if @context
- if @context[:respect_whitespace]
- @whitespace = (@context[:respect_whitespace] == :all or
- @context[:respect_whitespace].include? expanded_name)
- end
- @whitespace = false if (@context[:compress_whitespace] and
- (@context[:compress_whitespace] == :all or
- @context[:compress_whitespace].include? expanded_name)
- )
- end
- @whitespace = true unless @whitespace == false
- @whitespace
- end
-
- def ignore_whitespace_nodes
- @ignore_whitespace_nodes = false
- if @context
- if @context[:ignore_whitespace_nodes]
- @ignore_whitespace_nodes =
- (@context[:ignore_whitespace_nodes] == :all or
- @context[:ignore_whitespace_nodes].include? expanded_name)
- end
- end
- end
-
- # Evaluates to +true+ if raw mode is set for this element. This
- # is the case if the context has :+raw+ set to :+all+ or
- # an array containing the name of this element.
- #
- # The evaluation is tested against +expanded_name+, and so is namespace
- # sensitive.
- def raw
- @raw = (@context and @context[:raw] and
- (@context[:raw] == :all or
- @context[:raw].include? expanded_name))
- @raw
- end
-
- #once :whitespace, :raw, :ignore_whitespace_nodes
-
- #################################################
- # Namespaces #
- #################################################
-
- # Evaluates to an +Array+ containing the prefixes (names) of all defined
- # namespaces at this context node.
- # doc = Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
- # doc.elements['//b'].prefixes # -> ['x', 'y']
- def prefixes
- prefixes = []
- prefixes = parent.prefixes if parent
- prefixes |= attributes.prefixes
- return prefixes
- end
-
- def namespaces
- namespaces = {}
- namespaces = parent.namespaces if parent
- namespaces = namespaces.merge( attributes.namespaces )
- return namespaces
- end
-
- # Evaluates to the URI for a prefix, or the empty string if no such
- # namespace is declared for this element. Evaluates recursively for
- # ancestors. Returns the default namespace, if there is one.
- # prefix::
- # the prefix to search for. If not supplied, returns the default
- # namespace if one exists
- # Returns::
- # the namespace URI as a String, or nil if no such namespace
- # exists. If the namespace is undefined, returns an empty string
- # doc = Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
- # b = doc.elements['//b']
- # b.namespace # -> '1'
- # b.namespace("y") # -> '2'
- def namespace(prefix=nil)
- if prefix.nil?
- prefix = prefix()
- end
- if prefix == ''
- prefix = "xmlns"
- else
- prefix = "xmlns:#{prefix}" unless prefix[0,5] == 'xmlns'
- end
- ns = attributes[ prefix ]
- ns = parent.namespace(prefix) if ns.nil? and parent
- ns = '' if ns.nil? and prefix == 'xmlns'
- return ns
- end
-
- # Adds a namespace to this element.
- # prefix::
- # the prefix string, or the namespace URI if +uri+ is not
- # supplied
- # uri::
- # the namespace URI. May be nil, in which +prefix+ is used as
- # the URI
- # Evaluates to: this Element
- # a = Element.new("a")
- # a.add_namespace("xmlns:foo", "bar" )
- # a.add_namespace("foo", "bar") # shorthand for previous line
- # a.add_namespace("twiddle")
- # puts a #-> <a xmlns:foo='bar' xmlns='twiddle'/>
- def add_namespace( prefix, uri=nil )
- unless uri
- @attributes["xmlns"] = prefix
- else
- prefix = "xmlns:#{prefix}" unless prefix =~ /^xmlns:/
- @attributes[ prefix ] = uri
- end
- self
- end
-
- # Removes a namespace from this node. This only works if the namespace is
- # actually declared in this node. If no argument is passed, deletes the
- # default namespace.
- #
- # Evaluates to: this element
- # doc = Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
- # doc.root.delete_namespace
- # puts doc # -> <a xmlns:foo='bar'/>
- # doc.root.delete_namespace 'foo'
- # puts doc # -> <a/>
- def delete_namespace namespace="xmlns"
- namespace = "xmlns:#{namespace}" unless namespace == 'xmlns'
- attribute = attributes.get_attribute(namespace)
- attribute.remove unless attribute.nil?
- self
- end
-
- #################################################
- # Elements #
- #################################################
-
- # Adds a child to this element, optionally setting attributes in
- # the element.
- # element::
- # optional. If Element, the element is added.
- # Otherwise, a new Element is constructed with the argument (see
- # Element.initialize).
- # attrs::
- # If supplied, must be a Hash containing String name,value
- # pairs, which will be used to set the attributes of the new Element.
- # Returns:: the Element that was added
- # el = doc.add_element 'my-tag'
- # el = doc.add_element 'my-tag', {'attr1'=>'val1', 'attr2'=>'val2'}
- # el = Element.new 'my-tag'
- # doc.add_element el
- def add_element element, attrs=nil
- raise "First argument must be either an element name, or an Element object" if element.nil?
- el = @elements.add(element)
- attrs.each do |key, value|
- el.attributes[key]=value
- end if attrs.kind_of? Hash
- el
- end
-
- # Deletes a child element.
- # element::
- # Must be an +Element+, +String+, or +Integer+. If Element,
- # the element is removed. If String, the element is found (via XPath)
- # and removed. <em>This means that any parent can remove any
- # descendant.<em> If Integer, the Element indexed by that number will be
- # removed.
- # Returns:: the element that was removed.
- # doc.delete_element "/a/b/c[@id='4']"
- # doc.delete_element doc.elements["//k"]
- # doc.delete_element 1
- def delete_element element
- @elements.delete element
- end
-
- # Evaluates to +true+ if this element has at least one child Element
- # doc = Document.new "<a><b/><c>Text</c></a>"
- # doc.root.has_elements # -> true
- # doc.elements["/a/b"].has_elements # -> false
- # doc.elements["/a/c"].has_elements # -> false
- def has_elements?
- !@elements.empty?
- end
-
- # Iterates through the child elements, yielding for each Element that
- # has a particular attribute set.
- # key::
- # the name of the attribute to search for
- # value::
- # the value of the attribute
- # max::
- # (optional) causes this method to return after yielding
- # for this number of matching children
- # name::
- # (optional) if supplied, this is an XPath that filters
- # the children to check.
- #
- # doc = Document.new "<a><b @id='1'/><c @id='2'/><d @id='1'/><e/></a>"
- # # Yields b, c, d
- # doc.root.each_element_with_attribute( 'id' ) {|e| p e}
- # # Yields b, d
- # doc.root.each_element_with_attribute( 'id', '1' ) {|e| p e}
- # # Yields b
- # doc.root.each_element_with_attribute( 'id', '1', 1 ) {|e| p e}
- # # Yields d
- # doc.root.each_element_with_attribute( 'id', '1', 0, 'd' ) {|e| p e}
- def each_element_with_attribute( key, value=nil, max=0, name=nil, &block ) # :yields: Element
- each_with_something( proc {|child|
- if value.nil?
- child.attributes[key] != nil
- else
- child.attributes[key]==value
- end
- }, max, name, &block )
- end
-
- # Iterates through the children, yielding for each Element that
- # has a particular text set.
- # text::
- # the text to search for. If nil, or not supplied, will iterate
- # over all +Element+ children that contain at least one +Text+ node.
- # max::
- # (optional) causes this method to return after yielding
- # for this number of matching children
- # name::
- # (optional) if supplied, this is an XPath that filters
- # the children to check.
- #
- # doc = Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
- # # Yields b, c, d
- # doc.each_element_with_text {|e|p e}
- # # Yields b, c
- # doc.each_element_with_text('b'){|e|p e}
- # # Yields b
- # doc.each_element_with_text('b', 1){|e|p e}
- # # Yields d
- # doc.each_element_with_text(nil, 0, 'd'){|e|p e}
- def each_element_with_text( text=nil, max=0, name=nil, &block ) # :yields: Element
- each_with_something( proc {|child|
- if text.nil?
- child.has_text?
- else
- child.text == text
- end
- }, max, name, &block )
- end
-
- # Synonym for Element.elements.each
- def each_element( xpath=nil, &block ) # :yields: Element
- @elements.each( xpath, &block )
- end
-
- # Synonym for Element.to_a
- # This is a little slower than calling elements.each directly.
- # xpath:: any XPath by which to search for elements in the tree
- # Returns:: an array of Elements that match the supplied path
- def get_elements( xpath )
- @elements.to_a( xpath )
- end
-
- # Returns the next sibling that is an element, or nil if there is
- # no Element sibling after this one
- # doc = Document.new '<a><b/>text<c/></a>'
- # doc.root.elements['b'].next_element #-> <c/>
- # doc.root.elements['c'].next_element #-> nil
- def next_element
- element = next_sibling
- element = element.next_sibling until element.nil? or element.kind_of? Element
- return element
- end
-
- # Returns the previous sibling that is an element, or nil if there is
- # no Element sibling prior to this one
- # doc = Document.new '<a><b/>text<c/></a>'
- # doc.root.elements['c'].previous_element #-> <b/>
- # doc.root.elements['b'].previous_element #-> nil
- def previous_element
- element = previous_sibling
- element = element.previous_sibling until element.nil? or element.kind_of? Element
- return element
- end
-
-
- #################################################
- # Text #
- #################################################
-
- # Evaluates to +true+ if this element has at least one Text child
- def has_text?
- not text().nil?
- end
-
- # A convenience method which returns the String value of the _first_
- # child text element, if one exists, and +nil+ otherwise.
- #
- # <em>Note that an element may have multiple Text elements, perhaps
- # separated by other children</em>. Be aware that this method only returns
- # the first Text node.
- #
- # This method returns the +value+ of the first text child node, which
- # ignores the +raw+ setting, so always returns normalized text. See
- # the Text::value documentation.
- #
- # doc = Document.new "<p>some text <b>this is bold!</b> more text</p>"
- # # The element 'p' has two text elements, "some text " and " more text".
- # doc.root.text #-> "some text "
- def text( path = nil )
- rv = get_text(path)
- return rv.value unless rv.nil?
- nil
- end
-
- # Returns the first child Text node, if any, or +nil+ otherwise.
- # This method returns the actual +Text+ node, rather than the String content.
- # doc = Document.new "<p>some text <b>this is bold!</b> more text</p>"
- # # The element 'p' has two text elements, "some text " and " more text".
- # doc.root.get_text.value #-> "some text "
- def get_text path = nil
- rv = nil
- if path
- element = @elements[ path ]
- rv = element.get_text unless element.nil?
- else
- rv = @children.find { |node| node.kind_of? Text }
- end
- return rv
- end
-
- # Sets the first Text child of this object. See text() for a
- # discussion about Text children.
- #
- # If a Text child already exists, the child is replaced by this
- # content. This means that Text content can be deleted by calling
- # this method with a nil argument. In this case, the next Text
- # child becomes the first Text child. In no case is the order of
- # any siblings disturbed.
- # text::
- # If a String, a new Text child is created and added to
- # this Element as the first Text child. If Text, the text is set
- # as the first Child element. If nil, then any existing first Text
- # child is removed.
- # Returns:: this Element.
- # doc = Document.new '<a><b/></a>'
- # doc.root.text = 'Sean' #-> '<a><b/>Sean</a>'
- # doc.root.text = 'Elliott' #-> '<a><b/>Elliott</a>'
- # doc.root.add_element 'c' #-> '<a><b/>Elliott<c/></a>'
- # doc.root.text = 'Russell' #-> '<a><b/>Russell<c/></a>'
- # doc.root.text = nil #-> '<a><b/><c/></a>'
- def text=( text )
- if text.kind_of? String
- text = Text.new( text, whitespace(), nil, raw() )
- elsif !text.nil? and !text.kind_of? Text
- text = Text.new( text.to_s, whitespace(), nil, raw() )
- end
- old_text = get_text
- if text.nil?
- old_text.remove unless old_text.nil?
- else
- if old_text.nil?
- self << text
- else
- old_text.replace_with( text )
- end
- end
- return self
- end
-
- # A helper method to add a Text child. Actual Text instances can
- # be added with regular Parent methods, such as add() and <<()
- # text::
- # if a String, a new Text instance is created and added
- # to the parent. If Text, the object is added directly.
- # Returns:: this Element
- # e = Element.new('a') #-> <e/>
- # e.add_text 'foo' #-> <e>foo</e>
- # e.add_text Text.new(' bar') #-> <e>foo bar</e>
- # Note that at the end of this example, the branch has <b>3</b> nodes; the 'e'
- # element and <b>2</b> Text node children.
- def add_text( text )
- if text.kind_of? String
- if @children[-1].kind_of? Text
- @children[-1] << text
- return
- end
- text = Text.new( text, whitespace(), nil, raw() )
- end
- self << text unless text.nil?
- return self
- end
-
- def node_type
- :element
- end
-
- def xpath
- path_elements = []
- cur = self
- path_elements << __to_xpath_helper( self )
- while cur.parent
- cur = cur.parent
- path_elements << __to_xpath_helper( cur )
- end
- return path_elements.reverse.join( "/" )
- end
-
- #################################################
- # Attributes #
- #################################################
-
- # Fetches an attribute value or a child.
- #
- # If String or Symbol is specified, it's treated as attribute
- # name. Attribute value as String or +nil+ is returned. This case
- # is shortcut of +attributes[name]+.
- #
- # If Integer is specified, it's treated as the index of
- # child. It returns Nth child.
- #
- # doc = REXML::Document.new("<a attr='1'><b/><c/></a>")
- # doc.root["attr"] # => "1"
- # doc.root.attributes["attr"] # => "1"
- # doc.root[1] # => <c/>
- def [](name_or_index)
- case name_or_index
- when String
- attributes[name_or_index]
- when Symbol
- attributes[name_or_index.to_s]
- else
- super
- end
- end
-
- def attribute( name, namespace=nil )
- prefix = nil
- if namespaces.respond_to? :key
- prefix = namespaces.key(namespace) if namespace
- else
- prefix = namespaces.index(namespace) if namespace
- end
- prefix = nil if prefix == 'xmlns'
-
- ret_val =
- attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" )
-
- return ret_val unless ret_val.nil?
- return nil if prefix.nil?
-
- # now check that prefix'es namespace is not the same as the
- # default namespace
- return nil unless ( namespaces[ prefix ] == namespaces[ 'xmlns' ] )
-
- attributes.get_attribute( name )
-
- end
-
- # Evaluates to +true+ if this element has any attributes set, false
- # otherwise.
- def has_attributes?
- return !@attributes.empty?
- end
-
- # Adds an attribute to this element, overwriting any existing attribute
- # by the same name.
- # key::
- # can be either an Attribute or a String. If an Attribute,
- # the attribute is added to the list of Element attributes. If String,
- # the argument is used as the name of the new attribute, and the value
- # parameter must be supplied.
- # value::
- # Required if +key+ is a String, and ignored if the first argument is
- # an Attribute. This is a String, and is used as the value
- # of the new Attribute. This should be the unnormalized value of the
- # attribute (without entities).
- # Returns:: the Attribute added
- # e = Element.new 'e'
- # e.add_attribute( 'a', 'b' ) #-> <e a='b'/>
- # e.add_attribute( 'x:a', 'c' ) #-> <e a='b' x:a='c'/>
- # e.add_attribute Attribute.new('b', 'd') #-> <e a='b' x:a='c' b='d'/>
- def add_attribute( key, value=nil )
- if key.kind_of? Attribute
- @attributes << key
- else
- @attributes[key] = value
- end
- end
-
- # Add multiple attributes to this element.
- # hash:: is either a hash, or array of arrays
- # el.add_attributes( {"name1"=>"value1", "name2"=>"value2"} )
- # el.add_attributes( [ ["name1","value1"], ["name2"=>"value2"] ] )
- def add_attributes hash
- if hash.kind_of? Hash
- hash.each_pair {|key, value| @attributes[key] = value }
- elsif hash.kind_of? Array
- hash.each { |value| @attributes[ value[0] ] = value[1] }
- end
- end
-
- # Removes an attribute
- # key::
- # either an Attribute or a String. In either case, the
- # attribute is found by matching the attribute name to the argument,
- # and then removed. If no attribute is found, no action is taken.
- # Returns::
- # the attribute removed, or nil if this Element did not contain
- # a matching attribute
- # e = Element.new('E')
- # e.add_attribute( 'name', 'Sean' ) #-> <E name='Sean'/>
- # r = e.add_attribute( 'sur:name', 'Russell' ) #-> <E name='Sean' sur:name='Russell'/>
- # e.delete_attribute( 'name' ) #-> <E sur:name='Russell'/>
- # e.delete_attribute( r ) #-> <E/>
- def delete_attribute(key)
- attr = @attributes.get_attribute(key)
- attr.remove unless attr.nil?
- end
-
- #################################################
- # Other Utilities #
- #################################################
-
- # Get an array of all CData children.
- # IMMUTABLE
- def cdatas
- find_all { |child| child.kind_of? CData }.freeze
- end
-
- # Get an array of all Comment children.
- # IMMUTABLE
- def comments
- find_all { |child| child.kind_of? Comment }.freeze
- end
-
- # Get an array of all Instruction children.
- # IMMUTABLE
- def instructions
- find_all { |child| child.kind_of? Instruction }.freeze
- end
-
- # Get an array of all Text children.
- # IMMUTABLE
- def texts
- find_all { |child| child.kind_of? Text }.freeze
- end
-
- # == DEPRECATED
- # See REXML::Formatters
- #
- # Writes out this element, and recursively, all children.
- # output::
- # output an object which supports '<< string'; this is where the
- # document will be written.
- # indent::
- # An integer. If -1, no indenting will be used; otherwise, the
- # indentation will be this number of spaces, and children will be
- # indented an additional amount. Defaults to -1
- # transitive::
- # If transitive is true and indent is >= 0, then the output will be
- # pretty-printed in such a way that the added whitespace does not affect
- # the parse tree of the document
- # ie_hack::
- # This hack inserts a space before the /> on empty tags to address
- # a limitation of Internet Explorer. Defaults to false
- #
- # out = ''
- # doc.write( out ) #-> doc is written to the string 'out'
- # doc.write( $stdout ) #-> doc written to the console
- def write(output=$stdout, indent=-1, transitive=false, ie_hack=false)
- Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters", uplevel: 1)
- formatter = if indent > -1
- if transitive
- require_relative "formatters/transitive"
- REXML::Formatters::Transitive.new( indent, ie_hack )
- else
- REXML::Formatters::Pretty.new( indent, ie_hack )
- end
- else
- REXML::Formatters::Default.new( ie_hack )
- end
- formatter.write( self, output )
- end
-
-
- private
- def __to_xpath_helper node
- rv = node.expanded_name.clone
- if node.parent
- results = node.parent.find_all {|n|
- n.kind_of?(REXML::Element) and n.expanded_name == node.expanded_name
- }
- if results.length > 1
- idx = results.index( node )
- rv << "[#{idx+1}]"
- end
- end
- rv
- end
-
- # A private helper method
- def each_with_something( test, max=0, name=nil )
- num = 0
- @elements.each( name ){ |child|
- yield child if test.call(child) and num += 1
- return if max>0 and num == max
- }
- end
- end
-
- ########################################################################
- # ELEMENTS #
- ########################################################################
-
- # A class which provides filtering of children for Elements, and
- # XPath search support. You are expected to only encounter this class as
- # the <tt>element.elements</tt> object. Therefore, you are
- # _not_ expected to instantiate this yourself.
- class Elements
- include Enumerable
- # Constructor
- # parent:: the parent Element
- def initialize parent
- @element = parent
- end
-
- # Fetches a child element. Filters only Element children, regardless of
- # the XPath match.
- # index::
- # the search parameter. This is either an Integer, which
- # will be used to find the index'th child Element, or an XPath,
- # which will be used to search for the Element. <em>Because
- # of the nature of XPath searches, any element in the connected XML
- # document can be fetched through any other element.</em> <b>The
- # Integer index is 1-based, not 0-based.</b> This means that the first
- # child element is at index 1, not 0, and the +n+th element is at index
- # +n+, not <tt>n-1</tt>. This is because XPath indexes element children
- # starting from 1, not 0, and the indexes should be the same.
- # name::
- # optional, and only used in the first argument is an
- # Integer. In that case, the index'th child Element that has the
- # supplied name will be returned. Note again that the indexes start at 1.
- # Returns:: the first matching Element, or nil if no child matched
- # doc = Document.new '<a><b/><c id="1"/><c id="2"/><d/></a>'
- # doc.root.elements[1] #-> <b/>
- # doc.root.elements['c'] #-> <c id="1"/>
- # doc.root.elements[2,'c'] #-> <c id="2"/>
- def []( index, name=nil)
- if index.kind_of? Integer
- raise "index (#{index}) must be >= 1" if index < 1
- name = literalize(name) if name
- num = 0
- @element.find { |child|
- child.kind_of? Element and
- (name.nil? ? true : child.has_name?( name )) and
- (num += 1) == index
- }
- else
- return XPath::first( @element, index )
- #{ |element|
- # return element if element.kind_of? Element
- #}
- #return nil
- end
- end
-
- # Sets an element, replacing any previous matching element. If no
- # existing element is found ,the element is added.
- # index:: Used to find a matching element to replace. See []().
- # element::
- # The element to replace the existing element with
- # the previous element
- # Returns:: nil if no previous element was found.
- #
- # doc = Document.new '<a/>'
- # doc.root.elements[10] = Element.new('b') #-> <a><b/></a>
- # doc.root.elements[1] #-> <b/>
- # doc.root.elements[1] = Element.new('c') #-> <a><c/></a>
- # doc.root.elements['c'] = Element.new('d') #-> <a><d/></a>
- def []=( index, element )
- previous = self[index]
- if previous.nil?
- @element.add element
- else
- previous.replace_with element
- end
- return previous
- end
-
- # Returns +true+ if there are no +Element+ children, +false+ otherwise
- def empty?
- @element.find{ |child| child.kind_of? Element}.nil?
- end
-
- # Returns the index of the supplied child (starting at 1), or -1 if
- # the element is not a child
- # element:: an +Element+ child
- def index element
- rv = 0
- found = @element.find do |child|
- child.kind_of? Element and
- (rv += 1) and
- child == element
- end
- return rv if found == element
- return -1
- end
-
- # Deletes a child Element
- # element::
- # Either an Element, which is removed directly; an
- # xpath, where the first matching child is removed; or an Integer,
- # where the n'th Element is removed.
- # Returns:: the removed child
- # doc = Document.new '<a><b/><c/><c id="1"/></a>'
- # b = doc.root.elements[1]
- # doc.root.elements.delete b #-> <a><c/><c id="1"/></a>
- # doc.elements.delete("a/c[@id='1']") #-> <a><c/></a>
- # doc.root.elements.delete 1 #-> <a/>
- def delete element
- if element.kind_of? Element
- @element.delete element
- else
- el = self[element]
- el.remove if el
- end
- end
-
- # Removes multiple elements. Filters for Element children, regardless of
- # XPath matching.
- # xpath:: all elements matching this String path are removed.
- # Returns:: an Array of Elements that have been removed
- # doc = Document.new '<a><c/><c/><c/><c/></a>'
- # deleted = doc.elements.delete_all 'a/c' #-> [<c/>, <c/>, <c/>, <c/>]
- def delete_all( xpath )
- rv = []
- XPath::each( @element, xpath) {|element|
- rv << element if element.kind_of? Element
- }
- rv.each do |element|
- @element.delete element
- element.remove
- end
- return rv
- end
-
- # Adds an element
- # element::
- # if supplied, is either an Element, String, or
- # Source (see Element.initialize). If not supplied or nil, a
- # new, default Element will be constructed
- # Returns:: the added Element
- # a = Element.new('a')
- # a.elements.add(Element.new('b')) #-> <a><b/></a>
- # a.elements.add('c') #-> <a><b/><c/></a>
- def add element=nil
- if element.nil?
- Element.new("", self, @element.context)
- elsif not element.kind_of?(Element)
- Element.new(element, self, @element.context)
- else
- @element << element
- element.context = @element.context
- element
- end
- end
-
- alias :<< :add
-
- # Iterates through all of the child Elements, optionally filtering
- # them by a given XPath
- # xpath::
- # optional. If supplied, this is a String XPath, and is used to
- # filter the children, so that only matching children are yielded. Note
- # that XPaths are automatically filtered for Elements, so that
- # non-Element children will not be yielded
- # doc = Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
- # doc.root.elements.each {|e|p e} #-> Yields b, c, d, b, c, d elements
- # doc.root.elements.each('b') {|e|p e} #-> Yields b, b elements
- # doc.root.elements.each('child::node()') {|e|p e}
- # #-> Yields <b/>, <c/>, <d/>, <b/>, <c/>, <d/>
- # XPath.each(doc.root, 'child::node()', &block)
- # #-> Yields <b/>, <c/>, <d/>, sean, <b/>, <c/>, <d/>
- def each( xpath=nil )
- XPath::each( @element, xpath ) {|e| yield e if e.kind_of? Element }
- end
-
- def collect( xpath=nil )
- collection = []
- XPath::each( @element, xpath ) {|e|
- collection << yield(e) if e.kind_of?(Element)
- }
- collection
- end
-
- def inject( xpath=nil, initial=nil )
- first = true
- XPath::each( @element, xpath ) {|e|
- if (e.kind_of? Element)
- if (first and initial == nil)
- initial = e
- first = false
- else
- initial = yield( initial, e ) if e.kind_of? Element
- end
- end
- }
- initial
- end
-
- # Returns the number of +Element+ children of the parent object.
- # doc = Document.new '<a>sean<b/>elliott<b/>russell<b/></a>'
- # doc.root.size #-> 6, 3 element and 3 text nodes
- # doc.root.elements.size #-> 3
- def size
- count = 0
- @element.each {|child| count+=1 if child.kind_of? Element }
- count
- end
-
- # Returns an Array of Element children. An XPath may be supplied to
- # filter the children. Only Element children are returned, even if the
- # supplied XPath matches non-Element children.
- # doc = Document.new '<a>sean<b/>elliott<c/></a>'
- # doc.root.elements.to_a #-> [ <b/>, <c/> ]
- # doc.root.elements.to_a("child::node()") #-> [ <b/>, <c/> ]
- # XPath.match(doc.root, "child::node()") #-> [ sean, <b/>, elliott, <c/> ]
- def to_a( xpath=nil )
- rv = XPath.match( @element, xpath )
- return rv.find_all{|e| e.kind_of? Element} if xpath
- rv
- end
-
- private
- # Private helper class. Removes quotes from quoted strings
- def literalize name
- name = name[1..-2] if name[0] == ?' or name[0] == ?" #'
- name
- end
- end
-
- ########################################################################
- # ATTRIBUTES #
- ########################################################################
-
- # A class that defines the set of Attributes of an Element and provides
- # operations for accessing elements in that set.
- class Attributes < Hash
- # Constructor
- # element:: the Element of which this is an Attribute
- def initialize element
- @element = element
- end
-
- # Fetches an attribute value. If you want to get the Attribute itself,
- # use get_attribute()
- # name:: an XPath attribute name. Namespaces are relevant here.
- # Returns::
- # the String value of the matching attribute, or +nil+ if no
- # matching attribute was found. This is the unnormalized value
- # (with entities expanded).
- #
- # doc = Document.new "<a foo:att='1' bar:att='2' att='&lt;'/>"
- # doc.root.attributes['att'] #-> '<'
- # doc.root.attributes['bar:att'] #-> '2'
- def [](name)
- attr = get_attribute(name)
- return attr.value unless attr.nil?
- return nil
- end
-
- def to_a
- enum_for(:each_attribute).to_a
- end
-
- # Returns the number of attributes the owning Element contains.
- # doc = Document "<a x='1' y='2' foo:x='3'/>"
- # doc.root.attributes.length #-> 3
- def length
- c = 0
- each_attribute { c+=1 }
- c
- end
- alias :size :length
-
- # Iterates over the attributes of an Element. Yields actual Attribute
- # nodes, not String values.
- #
- # doc = Document.new '<a x="1" y="2"/>'
- # doc.root.attributes.each_attribute {|attr|
- # p attr.expanded_name+" => "+attr.value
- # }
- def each_attribute # :yields: attribute
- return to_enum(__method__) unless block_given?
- each_value do |val|
- if val.kind_of? Attribute
- yield val
- else
- val.each_value { |atr| yield atr }
- end
- end
- end
-
- # Iterates over each attribute of an Element, yielding the expanded name
- # and value as a pair of Strings.
- #
- # doc = Document.new '<a x="1" y="2"/>'
- # doc.root.attributes.each {|name, value| p name+" => "+value }
- def each
- return to_enum(__method__) unless block_given?
- each_attribute do |attr|
- yield [attr.expanded_name, attr.value]
- end
- end
-
- # Fetches an attribute
- # name::
- # the name by which to search for the attribute. Can be a
- # <tt>prefix:name</tt> namespace name.
- # Returns:: The first matching attribute, or nil if there was none. This
- # value is an Attribute node, not the String value of the attribute.
- # doc = Document.new '<a x:foo="1" foo="2" bar="3"/>'
- # doc.root.attributes.get_attribute("foo").value #-> "2"
- # doc.root.attributes.get_attribute("x:foo").value #-> "1"
- def get_attribute( name )
- attr = fetch( name, nil )
- if attr.nil?
- return nil if name.nil?
- # Look for prefix
- name =~ Namespace::NAMESPLIT
- prefix, n = $1, $2
- if prefix
- attr = fetch( n, nil )
- # check prefix
- if attr == nil
- elsif attr.kind_of? Attribute
- return attr if prefix == attr.prefix
- else
- attr = attr[ prefix ]
- return attr
- end
- end
- element_document = @element.document
- if element_document and element_document.doctype
- expn = @element.expanded_name
- expn = element_document.doctype.name if expn.size == 0
- attr_val = element_document.doctype.attribute_of(expn, name)
- return Attribute.new( name, attr_val ) if attr_val
- end
- return nil
- end
- if attr.kind_of? Hash
- attr = attr[ @element.prefix ]
- end
- return attr
- end
-
- # Sets an attribute, overwriting any existing attribute value by the
- # same name. Namespace is significant.
- # name:: the name of the attribute
- # value::
- # (optional) If supplied, the value of the attribute. If
- # nil, any existing matching attribute is deleted.
- # Returns::
- # Owning element
- # doc = Document.new "<a x:foo='1' foo='3'/>"
- # doc.root.attributes['y:foo'] = '2'
- # doc.root.attributes['foo'] = '4'
- # doc.root.attributes['x:foo'] = nil
- def []=( name, value )
- if value.nil? # Delete the named attribute
- attr = get_attribute(name)
- delete attr
- return
- end
-
- unless value.kind_of? Attribute
- if @element.document and @element.document.doctype
- value = Text::normalize( value, @element.document.doctype )
- else
- value = Text::normalize( value, nil )
- end
- value = Attribute.new(name, value)
- end
- value.element = @element
- old_attr = fetch(value.name, nil)
- if old_attr.nil?
- store(value.name, value)
- elsif old_attr.kind_of? Hash
- old_attr[value.prefix] = value
- elsif old_attr.prefix != value.prefix
- # Check for conflicting namespaces
- if value.prefix != "xmlns" and old_attr.prefix != "xmlns"
- old_namespace = old_attr.namespace
- new_namespace = value.namespace
- if old_namespace == new_namespace
- raise ParseException.new(
- "Namespace conflict in adding attribute \"#{value.name}\": "+
- "Prefix \"#{old_attr.prefix}\" = \"#{old_namespace}\" and "+
- "prefix \"#{value.prefix}\" = \"#{new_namespace}\"")
- end
- end
- store value.name, {old_attr.prefix => old_attr,
- value.prefix => value}
- else
- store value.name, value
- end
- return @element
- end
-
- # Returns an array of Strings containing all of the prefixes declared
- # by this set of # attributes. The array does not include the default
- # namespace declaration, if one exists.
- # doc = Document.new("<a xmlns='foo' xmlns:x='bar' xmlns:y='twee' "+
- # "z='glorp' p:k='gru'/>")
- # prefixes = doc.root.attributes.prefixes #-> ['x', 'y']
- def prefixes
- ns = []
- each_attribute do |attribute|
- ns << attribute.name if attribute.prefix == 'xmlns'
- end
- if @element.document and @element.document.doctype
- expn = @element.expanded_name
- expn = @element.document.doctype.name if expn.size == 0
- @element.document.doctype.attributes_of(expn).each {
- |attribute|
- ns << attribute.name if attribute.prefix == 'xmlns'
- }
- end
- ns
- end
-
- def namespaces
- namespaces = {}
- each_attribute do |attribute|
- namespaces[attribute.name] = attribute.value if attribute.prefix == 'xmlns' or attribute.name == 'xmlns'
- end
- if @element.document and @element.document.doctype
- expn = @element.expanded_name
- expn = @element.document.doctype.name if expn.size == 0
- @element.document.doctype.attributes_of(expn).each {
- |attribute|
- namespaces[attribute.name] = attribute.value if attribute.prefix == 'xmlns' or attribute.name == 'xmlns'
- }
- end
- namespaces
- end
-
- # Removes an attribute
- # attribute::
- # either a String, which is the name of the attribute to remove --
- # namespaces are significant here -- or the attribute to remove.
- # Returns:: the owning element
- # doc = Document.new "<a y:foo='0' x:foo='1' foo='3' z:foo='4'/>"
- # doc.root.attributes.delete 'foo' #-> <a y:foo='0' x:foo='1' z:foo='4'/>"
- # doc.root.attributes.delete 'x:foo' #-> <a y:foo='0' z:foo='4'/>"
- # attr = doc.root.attributes.get_attribute('y:foo')
- # doc.root.attributes.delete attr #-> <a z:foo='4'/>"
- def delete( attribute )
- name = nil
- prefix = nil
- if attribute.kind_of? Attribute
- name = attribute.name
- prefix = attribute.prefix
- else
- attribute =~ Namespace::NAMESPLIT
- prefix, name = $1, $2
- prefix = '' unless prefix
- end
- old = fetch(name, nil)
- if old.kind_of? Hash # the supplied attribute is one of many
- old.delete(prefix)
- if old.size == 1
- repl = nil
- old.each_value{|v| repl = v}
- store name, repl
- end
- elsif old.nil?
- return @element
- else # the supplied attribute is a top-level one
- super(name)
- end
- @element
- end
-
- # Adds an attribute, overriding any existing attribute by the
- # same name. Namespaces are significant.
- # attribute:: An Attribute
- def add( attribute )
- self[attribute.name] = attribute
- end
-
- alias :<< :add
-
- # Deletes all attributes matching a name. Namespaces are significant.
- # name::
- # A String; all attributes that match this path will be removed
- # Returns:: an Array of the Attributes that were removed
- def delete_all( name )
- rv = []
- each_attribute { |attribute|
- rv << attribute if attribute.expanded_name == name
- }
- rv.each{ |attr| attr.remove }
- return rv
- end
-
- # The +get_attribute_ns+ method retrieves a method by its namespace
- # and name. Thus it is possible to reliably identify an attribute
- # even if an XML processor has changed the prefix.
- #
- # Method contributed by Henrik Martensson
- def get_attribute_ns(namespace, name)
- result = nil
- each_attribute() { |attribute|
- if name == attribute.name &&
- namespace == attribute.namespace() &&
- ( !namespace.empty? || !attribute.fully_expanded_name.index(':') )
- # foo will match xmlns:foo, but only if foo isn't also an attribute
- result = attribute if !result or !namespace.empty? or
- !attribute.fully_expanded_name.index(':')
- end
- }
- result
- end
- end
-end
diff --git a/lib/rexml/encoding.rb b/lib/rexml/encoding.rb
deleted file mode 100644
index da2d70d6c9..0000000000
--- a/lib/rexml/encoding.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# coding: US-ASCII
-# frozen_string_literal: false
-module REXML
- module Encoding
- # ID ---> Encoding name
- attr_reader :encoding
- def encoding=(encoding)
- encoding = encoding.name if encoding.is_a?(Encoding)
- if encoding.is_a?(String)
- original_encoding = encoding
- encoding = find_encoding(encoding)
- unless encoding
- raise ArgumentError, "Bad encoding name #{original_encoding}"
- end
- end
- return false if defined?(@encoding) and encoding == @encoding
- if encoding
- @encoding = encoding.upcase
- else
- @encoding = 'UTF-8'
- end
- true
- end
-
- def encode(string)
- string.encode(@encoding)
- end
-
- def decode(string)
- string.encode(::Encoding::UTF_8, @encoding)
- end
-
- private
- def find_encoding(name)
- case name
- when /\Ashift-jis\z/i
- return "SHIFT_JIS"
- when /\ACP-(\d+)\z/
- name = "CP#{$1}"
- when /\AUTF-8\z/i
- return name
- end
- begin
- ::Encoding::Converter.search_convpath(name, 'UTF-8')
- rescue ::Encoding::ConverterNotFoundError
- return nil
- end
- name
- end
- end
-end
diff --git a/lib/rexml/entity.rb b/lib/rexml/entity.rb
deleted file mode 100644
index 89a9e84c57..0000000000
--- a/lib/rexml/entity.rb
+++ /dev/null
@@ -1,171 +0,0 @@
-# frozen_string_literal: false
-require_relative 'child'
-require_relative 'source'
-require_relative 'xmltokens'
-
-module REXML
- class Entity < Child
- include XMLTokens
- PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#"
- SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))}
- PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')}
- EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))"
- NDATADECL = "\\s+NDATA\\s+#{NAME}"
- PEREFERENCE = "%#{NAME};"
- ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))}
- PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})"
- ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))"
- PEDECL = "<!ENTITY\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
- GEDECL = "<!ENTITY\\s+#{NAME}\\s+#{ENTITYDEF}\\s*>"
- ENTITYDECL = /\s*(?:#{GEDECL})|(?:#{PEDECL})/um
-
- attr_reader :name, :external, :ref, :ndata, :pubid
-
- # Create a new entity. Simple entities can be constructed by passing a
- # name, value to the constructor; this creates a generic, plain entity
- # reference. For anything more complicated, you have to pass a Source to
- # the constructor with the entity definition, or use the accessor methods.
- # +WARNING+: There is no validation of entity state except when the entity
- # is read from a stream. If you start poking around with the accessors,
- # you can easily create a non-conformant Entity.
- #
- # e = Entity.new( 'amp', '&' )
- def initialize stream, value=nil, parent=nil, reference=false
- super(parent)
- @ndata = @pubid = @value = @external = nil
- if stream.kind_of? Array
- @name = stream[1]
- if stream[-1] == '%'
- @reference = true
- stream.pop
- else
- @reference = false
- end
- if stream[2] =~ /SYSTEM|PUBLIC/
- @external = stream[2]
- if @external == 'SYSTEM'
- @ref = stream[3]
- @ndata = stream[4] if stream.size == 5
- else
- @pubid = stream[3]
- @ref = stream[4]
- end
- else
- @value = stream[2]
- end
- else
- @reference = reference
- @external = nil
- @name = stream
- @value = value
- end
- end
-
- # Evaluates whether the given string matches an entity definition,
- # returning true if so, and false otherwise.
- def Entity::matches? string
- (ENTITYDECL =~ string) == 0
- end
-
- # Evaluates to the unnormalized value of this entity; that is, replacing
- # all entities -- both %ent; and &ent; entities. This differs from
- # +value()+ in that +value+ only replaces %ent; entities.
- def unnormalized
- document.record_entity_expansion unless document.nil?
- v = value()
- return nil if v.nil?
- @unnormalized = Text::unnormalize(v, parent)
- @unnormalized
- end
-
- #once :unnormalized
-
- # Returns the value of this entity unprocessed -- raw. This is the
- # normalized value; that is, with all %ent; and &ent; entities intact
- def normalized
- @value
- end
-
- # Write out a fully formed, correct entity definition (assuming the Entity
- # object itself is valid.)
- #
- # out::
- # An object implementing <TT>&lt;&lt;</TT> to which the entity will be
- # output
- # indent::
- # *DEPRECATED* and ignored
- def write out, indent=-1
- out << '<!ENTITY '
- out << '% ' if @reference
- out << @name
- out << ' '
- if @external
- out << @external << ' '
- if @pubid
- q = @pubid.include?('"')?"'":'"'
- out << q << @pubid << q << ' '
- end
- q = @ref.include?('"')?"'":'"'
- out << q << @ref << q
- out << ' NDATA ' << @ndata if @ndata
- else
- q = @value.include?('"')?"'":'"'
- out << q << @value << q
- end
- out << '>'
- end
-
- # Returns this entity as a string. See write().
- def to_s
- rv = ''
- write rv
- rv
- end
-
- PEREFERENCE_RE = /#{PEREFERENCE}/um
- # Returns the value of this entity. At the moment, only internal entities
- # are processed. If the value contains internal references (IE,
- # %blah;), those are replaced with their values. IE, if the doctype
- # contains:
- # <!ENTITY % foo "bar">
- # <!ENTITY yada "nanoo %foo; nanoo>
- # then:
- # doctype.entity('yada').value #-> "nanoo bar nanoo"
- def value
- if @value
- matches = @value.scan(PEREFERENCE_RE)
- rv = @value.clone
- if @parent
- sum = 0
- matches.each do |entity_reference|
- entity_value = @parent.entity( entity_reference[0] )
- if sum + entity_value.bytesize > Security.entity_expansion_text_limit
- raise "entity expansion has grown too large"
- else
- sum += entity_value.bytesize
- end
- rv.gsub!( /%#{entity_reference.join};/um, entity_value )
- end
- end
- return rv
- end
- nil
- end
- end
-
- # This is a set of entity constants -- the ones defined in the XML
- # specification. These are +gt+, +lt+, +amp+, +quot+ and +apos+.
- # CAUTION: these entities does not have parent and document
- module EntityConst
- # +>+
- GT = Entity.new( 'gt', '>' )
- # +<+
- LT = Entity.new( 'lt', '<' )
- # +&+
- AMP = Entity.new( 'amp', '&' )
- # +"+
- QUOT = Entity.new( 'quot', '"' )
- # +'+
- APOS = Entity.new( 'apos', "'" )
- end
-end
diff --git a/lib/rexml/formatters/default.rb b/lib/rexml/formatters/default.rb
deleted file mode 100644
index 811b2ff3d5..0000000000
--- a/lib/rexml/formatters/default.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-# frozen_string_literal: false
-
-module REXML
- module Formatters
- class Default
- # Prints out the XML document with no formatting -- except if ie_hack is
- # set.
- #
- # ie_hack::
- # If set to true, then inserts whitespace before the close of an empty
- # tag, so that IE's bad XML parser doesn't choke.
- def initialize( ie_hack=false )
- @ie_hack = ie_hack
- end
-
- # Writes the node to some output.
- #
- # node::
- # The node to write
- # output::
- # A class implementing <TT>&lt;&lt;</TT>. Pass in an Output object to
- # change the output encoding.
- def write( node, output )
- case node
-
- when Document
- if node.xml_decl.encoding != 'UTF-8' && !output.kind_of?(Output)
- output = Output.new( output, node.xml_decl.encoding )
- end
- write_document( node, output )
-
- when Element
- write_element( node, output )
-
- when Declaration, ElementDecl, NotationDecl, ExternalEntity, Entity,
- Attribute, AttlistDecl
- node.write( output,-1 )
-
- when Instruction
- write_instruction( node, output )
-
- when DocType, XMLDecl
- node.write( output )
-
- when Comment
- write_comment( node, output )
-
- when CData
- write_cdata( node, output )
-
- when Text
- write_text( node, output )
-
- else
- raise Exception.new("XML FORMATTING ERROR")
-
- end
- end
-
- protected
- def write_document( node, output )
- node.children.each { |child| write( child, output ) }
- end
-
- def write_element( node, output )
- output << "<#{node.expanded_name}"
-
- node.attributes.to_a.map { |a|
- Hash === a ? a.values : a
- }.flatten.sort_by {|attr| attr.name}.each do |attr|
- output << " "
- attr.write( output )
- end unless node.attributes.empty?
-
- if node.children.empty?
- output << " " if @ie_hack
- output << "/"
- else
- output << ">"
- node.children.each { |child|
- write( child, output )
- }
- output << "</#{node.expanded_name}"
- end
- output << ">"
- end
-
- def write_text( node, output )
- output << node.to_s()
- end
-
- def write_comment( node, output )
- output << Comment::START
- output << node.to_s
- output << Comment::STOP
- end
-
- def write_cdata( node, output )
- output << CData::START
- output << node.to_s
- output << CData::STOP
- end
-
- def write_instruction( node, output )
- output << Instruction::START
- output << node.target
- content = node.content
- if content
- output << ' '
- output << content
- end
- output << Instruction::STOP
- end
- end
- end
-end
diff --git a/lib/rexml/formatters/pretty.rb b/lib/rexml/formatters/pretty.rb
deleted file mode 100644
index 562ef9462e..0000000000
--- a/lib/rexml/formatters/pretty.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-# frozen_string_literal: false
-require_relative 'default'
-
-module REXML
- module Formatters
- # Pretty-prints an XML document. This destroys whitespace in text nodes
- # and will insert carriage returns and indentations.
- #
- # TODO: Add an option to print attributes on new lines
- class Pretty < Default
-
- # If compact is set to true, then the formatter will attempt to use as
- # little space as possible
- attr_accessor :compact
- # The width of a page. Used for formatting text
- attr_accessor :width
-
- # Create a new pretty printer.
- #
- # output::
- # An object implementing '<<(String)', to which the output will be written.
- # indentation::
- # An integer greater than 0. The indentation of each level will be
- # this number of spaces. If this is < 1, the behavior of this object
- # is undefined. Defaults to 2.
- # ie_hack::
- # If true, the printer will insert whitespace before closing empty
- # tags, thereby allowing Internet Explorer's XML parser to
- # function. Defaults to false.
- def initialize( indentation=2, ie_hack=false )
- @indentation = indentation
- @level = 0
- @ie_hack = ie_hack
- @width = 80
- @compact = false
- end
-
- protected
- def write_element(node, output)
- output << ' '*@level
- output << "<#{node.expanded_name}"
-
- node.attributes.each_attribute do |attr|
- output << " "
- attr.write( output )
- end unless node.attributes.empty?
-
- if node.children.empty?
- if @ie_hack
- output << " "
- end
- output << "/"
- else
- output << ">"
- # If compact and all children are text, and if the formatted output
- # is less than the specified width, then try to print everything on
- # one line
- skip = false
- if compact
- if node.children.inject(true) {|s,c| s & c.kind_of?(Text)}
- string = ""
- old_level = @level
- @level = 0
- node.children.each { |child| write( child, string ) }
- @level = old_level
- if string.length < @width
- output << string
- skip = true
- end
- end
- end
- unless skip
- output << "\n"
- @level += @indentation
- node.children.each { |child|
- next if child.kind_of?(Text) and child.to_s.strip.length == 0
- write( child, output )
- output << "\n"
- }
- @level -= @indentation
- output << ' '*@level
- end
- output << "</#{node.expanded_name}"
- end
- output << ">"
- end
-
- def write_text( node, output )
- s = node.to_s()
- s.gsub!(/\s/,' ')
- s.squeeze!(" ")
- s = wrap(s, @width - @level)
- s = indent_text(s, @level, " ", true)
- output << (' '*@level + s)
- end
-
- def write_comment( node, output)
- output << ' ' * @level
- super
- end
-
- def write_cdata( node, output)
- output << ' ' * @level
- super
- end
-
- def write_document( node, output )
- # Ok, this is a bit odd. All XML documents have an XML declaration,
- # but it may not write itself if the user didn't specifically add it,
- # either through the API or in the input document. If it doesn't write
- # itself, then we don't need a carriage return... which makes this
- # logic more complex.
- node.children.each { |child|
- next if child == node.children[-1] and child.instance_of?(Text)
- unless child == node.children[0] or child.instance_of?(Text) or
- (child == node.children[1] and !node.children[0].writethis)
- output << "\n"
- end
- write( child, output )
- }
- end
-
- private
- def indent_text(string, level=1, style="\t", indentfirstline=true)
- return string if level < 0
- string.gsub(/\n/, "\n#{style*level}")
- end
-
- def wrap(string, width)
- parts = []
- while string.length > width and place = string.rindex(' ', width)
- parts << string[0...place]
- string = string[place+1..-1]
- end
- parts << string
- parts.join("\n")
- end
-
- end
- end
-end
-
diff --git a/lib/rexml/formatters/transitive.rb b/lib/rexml/formatters/transitive.rb
deleted file mode 100644
index 5ff51e10f3..0000000000
--- a/lib/rexml/formatters/transitive.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: false
-require_relative 'pretty'
-
-module REXML
- module Formatters
- # The Transitive formatter writes an XML document that parses to an
- # identical document as the source document. This means that no extra
- # whitespace nodes are inserted, and whitespace within text nodes is
- # preserved. Within these constraints, the document is pretty-printed,
- # with whitespace inserted into the metadata to introduce formatting.
- #
- # Note that this is only useful if the original XML is not already
- # formatted. Since this formatter does not alter whitespace nodes, the
- # results of formatting already formatted XML will be odd.
- class Transitive < Default
- def initialize( indentation=2, ie_hack=false )
- @indentation = indentation
- @level = 0
- @ie_hack = ie_hack
- end
-
- protected
- def write_element( node, output )
- output << "<#{node.expanded_name}"
-
- node.attributes.each_attribute do |attr|
- output << " "
- attr.write( output )
- end unless node.attributes.empty?
-
- output << "\n"
- output << ' '*@level
- if node.children.empty?
- output << " " if @ie_hack
- output << "/"
- else
- output << ">"
- # If compact and all children are text, and if the formatted output
- # is less than the specified width, then try to print everything on
- # one line
- @level += @indentation
- node.children.each { |child|
- write( child, output )
- }
- @level -= @indentation
- output << "</#{node.expanded_name}"
- output << "\n"
- output << ' '*@level
- end
- output << ">"
- end
-
- def write_text( node, output )
- output << node.to_s()
- end
- end
- end
-end
diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb
deleted file mode 100644
index 77926bf2af..0000000000
--- a/lib/rexml/functions.rb
+++ /dev/null
@@ -1,447 +0,0 @@
-# frozen_string_literal: false
-module REXML
- # If you add a method, keep in mind two things:
- # (1) the first argument will always be a list of nodes from which to
- # filter. In the case of context methods (such as position), the function
- # should return an array with a value for each child in the array.
- # (2) all method calls from XML will have "-" replaced with "_".
- # Therefore, in XML, "local-name()" is identical (and actually becomes)
- # "local_name()"
- module Functions
- @@available_functions = {}
- @@context = nil
- @@namespace_context = {}
- @@variables = {}
-
- INTERNAL_METHODS = [
- :namespace_context,
- :namespace_context=,
- :variables,
- :variables=,
- :context=,
- :get_namespace,
- :send,
- ]
- class << self
- def singleton_method_added(name)
- unless INTERNAL_METHODS.include?(name)
- @@available_functions[name] = true
- end
- end
- end
-
- def Functions::namespace_context=(x) ; @@namespace_context=x ; end
- def Functions::variables=(x) ; @@variables=x ; end
- def Functions::namespace_context ; @@namespace_context ; end
- def Functions::variables ; @@variables ; end
-
- def Functions::context=(value); @@context = value; end
-
- def Functions::text( )
- if @@context[:node].node_type == :element
- return @@context[:node].find_all{|n| n.node_type == :text}.collect{|n| n.value}
- elsif @@context[:node].node_type == :text
- return @@context[:node].value
- else
- return false
- end
- end
-
- # Returns the last node of the given list of nodes.
- def Functions::last( )
- @@context[:size]
- end
-
- def Functions::position( )
- @@context[:index]
- end
-
- # Returns the size of the given list of nodes.
- def Functions::count( node_set )
- node_set.size
- end
-
- # Since REXML is non-validating, this method is not implemented as it
- # requires a DTD
- def Functions::id( object )
- end
-
- def Functions::local_name(node_set=nil)
- get_namespace(node_set) do |node|
- return node.local_name
- end
- ""
- end
-
- def Functions::namespace_uri( node_set=nil )
- get_namespace( node_set ) {|node| node.namespace}
- end
-
- def Functions::name( node_set=nil )
- get_namespace( node_set ) do |node|
- node.expanded_name
- end
- end
-
- # Helper method.
- def Functions::get_namespace( node_set = nil )
- if node_set == nil
- yield @@context[:node] if @@context[:node].respond_to?(:namespace)
- else
- if node_set.respond_to? :each
- result = []
- node_set.each do |node|
- result << yield(node) if node.respond_to?(:namespace)
- end
- result
- elsif node_set.respond_to? :namespace
- yield node_set
- end
- end
- end
-
- # A node-set is converted to a string by returning the string-value of the
- # node in the node-set that is first in document order. If the node-set is
- # empty, an empty string is returned.
- #
- # A number is converted to a string as follows
- #
- # NaN is converted to the string NaN
- #
- # positive zero is converted to the string 0
- #
- # negative zero is converted to the string 0
- #
- # positive infinity is converted to the string Infinity
- #
- # negative infinity is converted to the string -Infinity
- #
- # if the number is an integer, the number is represented in decimal form
- # as a Number with no decimal point and no leading zeros, preceded by a
- # minus sign (-) if the number is negative
- #
- # otherwise, the number is represented in decimal form as a Number
- # including a decimal point with at least one digit before the decimal
- # point and at least one digit after the decimal point, preceded by a
- # minus sign (-) if the number is negative; there must be no leading zeros
- # before the decimal point apart possibly from the one required digit
- # immediately before the decimal point; beyond the one required digit
- # after the decimal point there must be as many, but only as many, more
- # digits as are needed to uniquely distinguish the number from all other
- # IEEE 754 numeric values.
- #
- # The boolean false value is converted to the string false. The boolean
- # true value is converted to the string true.
- #
- # An object of a type other than the four basic types is converted to a
- # string in a way that is dependent on that type.
- def Functions::string( object=@@context[:node] )
- if object.respond_to?(:node_type)
- case object.node_type
- when :attribute
- object.value
- when :element
- string_value(object)
- when :document
- string_value(object.root)
- when :processing_instruction
- object.content
- else
- object.to_s
- end
- else
- case object
- when Array
- string(object[0])
- when Float
- if object.nan?
- "NaN"
- else
- integer = object.to_i
- if object == integer
- "%d" % integer
- else
- object.to_s
- end
- end
- else
- object.to_s
- end
- end
- end
-
- # A node-set is converted to a string by
- # returning the concatenation of the string-value
- # of each of the children of the node in the
- # node-set that is first in document order.
- # If the node-set is empty, an empty string is returned.
- def Functions::string_value( o )
- rv = ""
- o.children.each { |e|
- if e.node_type == :text
- rv << e.to_s
- elsif e.node_type == :element
- rv << string_value( e )
- end
- }
- rv
- end
-
- def Functions::concat( *objects )
- concatenated = ""
- objects.each do |object|
- concatenated << string(object)
- end
- concatenated
- end
-
- # Fixed by Mike Stok
- def Functions::starts_with( string, test )
- string(string).index(string(test)) == 0
- end
-
- # Fixed by Mike Stok
- def Functions::contains( string, test )
- string(string).include?(string(test))
- end
-
- # Kouhei fixed this
- def Functions::substring_before( string, test )
- ruby_string = string(string)
- ruby_index = ruby_string.index(string(test))
- if ruby_index.nil?
- ""
- else
- ruby_string[ 0...ruby_index ]
- end
- end
-
- # Kouhei fixed this too
- def Functions::substring_after( string, test )
- ruby_string = string(string)
- return $1 if ruby_string =~ /#{test}(.*)/
- ""
- end
-
- # Take equal portions of Mike Stok and Sean Russell; mix
- # vigorously, and pour into a tall, chilled glass. Serves 10,000.
- def Functions::substring( string, start, length=nil )
- ruby_string = string(string)
- ruby_length = if length.nil?
- ruby_string.length.to_f
- else
- number(length)
- end
- ruby_start = number(start)
-
- # Handle the special cases
- return '' if (
- ruby_length.nan? or
- ruby_start.nan? or
- ruby_start.infinite?
- )
-
- infinite_length = ruby_length.infinite? == 1
- ruby_length = ruby_string.length if infinite_length
-
- # Now, get the bounds. The XPath bounds are 1..length; the ruby bounds
- # are 0..length. Therefore, we have to offset the bounds by one.
- ruby_start = round(ruby_start) - 1
- ruby_length = round(ruby_length)
-
- if ruby_start < 0
- ruby_length += ruby_start unless infinite_length
- ruby_start = 0
- end
- return '' if ruby_length <= 0
- ruby_string[ruby_start,ruby_length]
- end
-
- # UNTESTED
- def Functions::string_length( string )
- string(string).length
- end
-
- # UNTESTED
- def Functions::normalize_space( string=nil )
- string = string(@@context[:node]) if string.nil?
- if string.kind_of? Array
- string.collect{|x| string.to_s.strip.gsub(/\s+/um, ' ') if string}
- else
- string.to_s.strip.gsub(/\s+/um, ' ')
- end
- end
-
- # This is entirely Mike Stok's beast
- def Functions::translate( string, tr1, tr2 )
- from = string(tr1)
- to = string(tr2)
-
- # the map is our translation table.
- #
- # if a character occurs more than once in the
- # from string then we ignore the second &
- # subsequent mappings
- #
- # if a character maps to nil then we delete it
- # in the output. This happens if the from
- # string is longer than the to string
- #
- # there's nothing about - or ^ being special in
- # http://www.w3.org/TR/xpath#function-translate
- # so we don't build ranges or negated classes
-
- map = Hash.new
- 0.upto(from.length - 1) { |pos|
- from_char = from[pos]
- unless map.has_key? from_char
- map[from_char] =
- if pos < to.length
- to[pos]
- else
- nil
- end
- end
- }
-
- if ''.respond_to? :chars
- string(string).chars.collect { |c|
- if map.has_key? c then map[c] else c end
- }.compact.join
- else
- string(string).unpack('U*').collect { |c|
- if map.has_key? c then map[c] else c end
- }.compact.pack('U*')
- end
- end
-
- def Functions::boolean(object=@@context[:node])
- case object
- when true, false
- object
- when Float
- return false if object.zero?
- return false if object.nan?
- true
- when Numeric
- not object.zero?
- when String
- not object.empty?
- when Array
- not object.empty?
- else
- object ? true : false
- end
- end
-
- # UNTESTED
- def Functions::not( object )
- not boolean( object )
- end
-
- # UNTESTED
- def Functions::true( )
- true
- end
-
- # UNTESTED
- def Functions::false( )
- false
- end
-
- # UNTESTED
- def Functions::lang( language )
- lang = false
- node = @@context[:node]
- attr = nil
- until node.nil?
- if node.node_type == :element
- attr = node.attributes["xml:lang"]
- unless attr.nil?
- lang = compare_language(string(language), attr)
- break
- else
- end
- end
- node = node.parent
- end
- lang
- end
-
- def Functions::compare_language lang1, lang2
- lang2.downcase.index(lang1.downcase) == 0
- end
-
- # a string that consists of optional whitespace followed by an optional
- # minus sign followed by a Number followed by whitespace is converted to
- # the IEEE 754 number that is nearest (according to the IEEE 754
- # round-to-nearest rule) to the mathematical value represented by the
- # string; any other string is converted to NaN
- #
- # boolean true is converted to 1; boolean false is converted to 0
- #
- # a node-set is first converted to a string as if by a call to the string
- # function and then converted in the same way as a string argument
- #
- # an object of a type other than the four basic types is converted to a
- # number in a way that is dependent on that type
- def Functions::number(object=@@context[:node])
- case object
- when true
- Float(1)
- when false
- Float(0)
- when Array
- number(string(object))
- when Numeric
- object.to_f
- else
- str = string(object)
- case str.strip
- when /\A\s*(-?(?:\d+(?:\.\d*)?|\.\d+))\s*\z/
- $1.to_f
- else
- Float::NAN
- end
- end
- end
-
- def Functions::sum( nodes )
- nodes = [nodes] unless nodes.kind_of? Array
- nodes.inject(0) { |r,n| r + number(string(n)) }
- end
-
- def Functions::floor( number )
- number(number).floor
- end
-
- def Functions::ceiling( number )
- number(number).ceil
- end
-
- def Functions::round( number )
- number = number(number)
- begin
- neg = number.negative?
- number = number.abs.round
- neg ? -number : number
- rescue FloatDomainError
- number
- end
- end
-
- def Functions::processing_instruction( node )
- node.node_type == :processing_instruction
- end
-
- def Functions::send(name, *args)
- if @@available_functions[name.to_sym]
- super
- else
- # TODO: Maybe, this is not XPath spec behavior.
- # This behavior must be reconsidered.
- XPath.match(@@context[:node], name.to_s)
- end
- end
- end
-end
diff --git a/lib/rexml/instruction.rb b/lib/rexml/instruction.rb
deleted file mode 100644
index 318741f03b..0000000000
--- a/lib/rexml/instruction.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: false
-
-require_relative "child"
-require_relative "source"
-
-module REXML
- # Represents an XML Instruction; IE, <? ... ?>
- # TODO: Add parent arg (3rd arg) to constructor
- class Instruction < Child
- START = "<?"
- STOP = "?>"
-
- # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?>
- # content is everything else.
- attr_accessor :target, :content
-
- # Constructs a new Instruction
- # @param target can be one of a number of things. If String, then
- # the target of this instruction is set to this. If an Instruction,
- # then the Instruction is shallowly cloned (target and content are
- # copied).
- # @param content Must be either a String, or a Parent. Can only
- # be a Parent if the target argument is a Source. Otherwise, this
- # String is set as the content of this instruction.
- def initialize(target, content=nil)
- case target
- when String
- super()
- @target = target
- @content = content
- when Instruction
- super(content)
- @target = target.target
- @content = target.content
- else
- message =
- "processing instruction target must be String or REXML::Instruction: "
- message << "<#{target.inspect}>"
- raise ArgumentError, message
- end
- @content.strip! if @content
- end
-
- def clone
- Instruction.new self
- end
-
- # == DEPRECATED
- # See the rexml/formatters package
- #
- def write writer, indent=-1, transitive=false, ie_hack=false
- Kernel.warn( "#{self.class.name}.write is deprecated", uplevel: 1)
- indent(writer, indent)
- writer << START
- writer << @target
- if @content
- writer << ' '
- writer << @content
- end
- writer << STOP
- end
-
- # @return true if other is an Instruction, and the content and target
- # of the other matches the target and content of this object.
- def ==( other )
- other.kind_of? Instruction and
- other.target == @target and
- other.content == @content
- end
-
- def node_type
- :processing_instruction
- end
-
- def inspect
- "<?p-i #{target} ...?>"
- end
- end
-end
diff --git a/lib/rexml/light/node.rb b/lib/rexml/light/node.rb
deleted file mode 100644
index 01177c64d2..0000000000
--- a/lib/rexml/light/node.rb
+++ /dev/null
@@ -1,196 +0,0 @@
-# frozen_string_literal: false
-require_relative '../xmltokens'
-
-# [ :element, parent, name, attributes, children* ]
- # a = Node.new
- # a << "B" # => <a>B</a>
- # a.b # => <a>B<b/></a>
- # a.b[1] # => <a>B<b/><b/><a>
- # a.b[1]["x"] = "y" # => <a>B<b/><b x="y"/></a>
- # a.b[0].c # => <a>B<b><c/></b><b x="y"/></a>
- # a.b.c << "D" # => <a>B<b><c>D</c></b><b x="y"/></a>
-module REXML
- module Light
- # Represents a tagged XML element. Elements are characterized by
- # having children, attributes, and names, and can themselves be
- # children.
- class Node
- NAMESPLIT = /^(?:(#{XMLTokens::NCNAME_STR}):)?(#{XMLTokens::NCNAME_STR})/u
- PARENTS = [ :element, :document, :doctype ]
- # Create a new element.
- def initialize node=nil
- @node = node
- if node.kind_of? String
- node = [ :text, node ]
- elsif node.nil?
- node = [ :document, nil, nil ]
- elsif node[0] == :start_element
- node[0] = :element
- elsif node[0] == :start_doctype
- node[0] = :doctype
- elsif node[0] == :start_document
- node[0] = :document
- end
- end
-
- def size
- if PARENTS.include? @node[0]
- @node[-1].size
- else
- 0
- end
- end
-
- def each
- size.times { |x| yield( at(x+4) ) }
- end
-
- def name
- at(2)
- end
-
- def name=( name_str, ns=nil )
- pfx = ''
- pfx = "#{prefix(ns)}:" if ns
- _old_put(2, "#{pfx}#{name_str}")
- end
-
- def parent=( node )
- _old_put(1,node)
- end
-
- def local_name
- namesplit
- @name
- end
-
- def local_name=( name_str )
- _old_put( 1, "#@prefix:#{name_str}" )
- end
-
- def prefix( namespace=nil )
- prefix_of( self, namespace )
- end
-
- def namespace( prefix=prefix() )
- namespace_of( self, prefix )
- end
-
- def namespace=( namespace )
- @prefix = prefix( namespace )
- pfx = ''
- pfx = "#@prefix:" if @prefix.size > 0
- _old_put(1, "#{pfx}#@name")
- end
-
- def []( reference, ns=nil )
- if reference.kind_of? String
- pfx = ''
- pfx = "#{prefix(ns)}:" if ns
- at(3)["#{pfx}#{reference}"]
- elsif reference.kind_of? Range
- _old_get( Range.new(4+reference.begin, reference.end, reference.exclude_end?) )
- else
- _old_get( 4+reference )
- end
- end
-
- def =~( path )
- XPath.match( self, path )
- end
-
- # Doesn't handle namespaces yet
- def []=( reference, ns, value=nil )
- if reference.kind_of? String
- value = ns unless value
- at( 3 )[reference] = value
- elsif reference.kind_of? Range
- _old_put( Range.new(3+reference.begin, reference.end, reference.exclude_end?), ns )
- else
- if value
- _old_put( 4+reference, ns, value )
- else
- _old_put( 4+reference, ns )
- end
- end
- end
-
- # Append a child to this element, optionally under a provided namespace.
- # The namespace argument is ignored if the element argument is an Element
- # object. Otherwise, the element argument is a string, the namespace (if
- # provided) is the namespace the element is created in.
- def << element
- if node_type() == :text
- at(-1) << element
- else
- newnode = Node.new( element )
- newnode.parent = self
- self.push( newnode )
- end
- at(-1)
- end
-
- def node_type
- _old_get(0)
- end
-
- def text=( foo )
- replace = at(4).kind_of?(String)? 1 : 0
- self._old_put(4,replace, normalizefoo)
- end
-
- def root
- context = self
- context = context.at(1) while context.at(1)
- end
-
- def has_name?( name, namespace = '' )
- at(3) == name and namespace() == namespace
- end
-
- def children
- self
- end
-
- def parent
- at(1)
- end
-
- def to_s
-
- end
-
- private
-
- def namesplit
- return if @name.defined?
- at(2) =~ NAMESPLIT
- @prefix = '' || $1
- @name = $2
- end
-
- def namespace_of( node, prefix=nil )
- if not prefix
- name = at(2)
- name =~ NAMESPLIT
- prefix = $1
- end
- to_find = 'xmlns'
- to_find = "xmlns:#{prefix}" if not prefix.nil?
- ns = at(3)[ to_find ]
- ns ? ns : namespace_of( @node[0], prefix )
- end
-
- def prefix_of( node, namespace=nil )
- if not namespace
- name = node.name
- name =~ NAMESPLIT
- $1
- else
- ns = at(3).find { |k,v| v == namespace }
- ns ? ns : prefix_of( node.parent, namespace )
- end
- end
- end
- end
-end
diff --git a/lib/rexml/namespace.rb b/lib/rexml/namespace.rb
deleted file mode 100644
index 924edf9506..0000000000
--- a/lib/rexml/namespace.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-
-require_relative 'xmltokens'
-
-module REXML
- # Adds named attributes to an object.
- module Namespace
- # The name of the object, valid if set
- attr_reader :name, :expanded_name
- # The expanded name of the object, valid if name is set
- attr_accessor :prefix
- include XMLTokens
- NAMESPLIT = /^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u
-
- # Sets the name and the expanded name
- def name=( name )
- @expanded_name = name
- case name
- when NAMESPLIT
- if $1
- @prefix = $1
- else
- @prefix = ""
- @namespace = ""
- end
- @name = $2
- when ""
- @prefix = nil
- @namespace = nil
- @name = nil
- else
- message = "name must be \#{PREFIX}:\#{LOCAL_NAME} or \#{LOCAL_NAME}: "
- message += "<#{name.inspect}>"
- raise ArgumentError, message
- end
- end
-
- # Compares names optionally WITH namespaces
- def has_name?( other, ns=nil )
- if ns
- return (namespace() == ns and name() == other)
- elsif other.include? ":"
- return fully_expanded_name == other
- else
- return name == other
- end
- end
-
- alias :local_name :name
-
- # Fully expand the name, even if the prefix wasn't specified in the
- # source file.
- def fully_expanded_name
- ns = prefix
- return "#{ns}:#@name" if ns.size > 0
- return @name
- end
- end
-end
diff --git a/lib/rexml/node.rb b/lib/rexml/node.rb
deleted file mode 100644
index 081caba6cb..0000000000
--- a/lib/rexml/node.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: false
-require_relative "parseexception"
-require_relative "formatters/pretty"
-require_relative "formatters/default"
-
-module REXML
- # Represents a node in the tree. Nodes are never encountered except as
- # superclasses of other objects. Nodes have siblings.
- module Node
- # @return the next sibling (nil if unset)
- def next_sibling_node
- return nil if @parent.nil?
- @parent[ @parent.index(self) + 1 ]
- end
-
- # @return the previous sibling (nil if unset)
- def previous_sibling_node
- return nil if @parent.nil?
- ind = @parent.index(self)
- return nil if ind == 0
- @parent[ ind - 1 ]
- end
-
- # indent::
- # *DEPRECATED* This parameter is now ignored. See the formatters in the
- # REXML::Formatters package for changing the output style.
- def to_s indent=nil
- unless indent.nil?
- Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated", uplevel: 1)
- f = REXML::Formatters::Pretty.new( indent )
- f.write( self, rv = "" )
- else
- f = REXML::Formatters::Default.new
- f.write( self, rv = "" )
- end
- return rv
- end
-
- def indent to, ind
- if @parent and @parent.context and not @parent.context[:indentstyle].nil? then
- indentstyle = @parent.context[:indentstyle]
- else
- indentstyle = ' '
- end
- to << indentstyle*ind unless ind<1
- end
-
- def parent?
- false;
- end
-
-
- # Visit all subnodes of +self+ recursively
- def each_recursive(&block) # :yields: node
- self.elements.each {|node|
- block.call(node)
- node.each_recursive(&block)
- }
- end
-
- # Find (and return) first subnode (recursively) for which the block
- # evaluates to true. Returns +nil+ if none was found.
- def find_first_recursive(&block) # :yields: node
- each_recursive {|node|
- return node if block.call(node)
- }
- return nil
- end
-
- # Returns the position that +self+ holds in its parent's array, indexed
- # from 1.
- def index_in_parent
- parent.index(self)+1
- end
- end
-end
diff --git a/lib/rexml/output.rb b/lib/rexml/output.rb
deleted file mode 100644
index 88a5fb378d..0000000000
--- a/lib/rexml/output.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: false
-require_relative 'encoding'
-
-module REXML
- class Output
- include Encoding
-
- attr_reader :encoding
-
- def initialize real_IO, encd="iso-8859-1"
- @output = real_IO
- self.encoding = encd
-
- @to_utf = encoding != 'UTF-8'
-
- if encoding == "UTF-16"
- @output << "\ufeff".encode("UTF-16BE")
- self.encoding = "UTF-16BE"
- end
- end
-
- def <<( content )
- @output << (@to_utf ? self.encode(content) : content)
- end
-
- def to_s
- "Output[#{encoding}]"
- end
- end
-end
diff --git a/lib/rexml/parent.rb b/lib/rexml/parent.rb
deleted file mode 100644
index 6a53b37a12..0000000000
--- a/lib/rexml/parent.rb
+++ /dev/null
@@ -1,166 +0,0 @@
-# frozen_string_literal: false
-require_relative "child"
-
-module REXML
- # A parent has children, and has methods for accessing them. The Parent
- # class is never encountered except as the superclass for some other
- # object.
- class Parent < Child
- include Enumerable
-
- # Constructor
- # @param parent if supplied, will be set as the parent of this object
- def initialize parent=nil
- super(parent)
- @children = []
- end
-
- def add( object )
- object.parent = self
- @children << object
- object
- end
-
- alias :push :add
- alias :<< :push
-
- def unshift( object )
- object.parent = self
- @children.unshift object
- end
-
- def delete( object )
- found = false
- @children.delete_if {|c| c.equal?(object) and found = true }
- object.parent = nil if found
- found ? object : nil
- end
-
- def each(&block)
- @children.each(&block)
- end
-
- def delete_if( &block )
- @children.delete_if(&block)
- end
-
- def delete_at( index )
- @children.delete_at index
- end
-
- def each_index( &block )
- @children.each_index(&block)
- end
-
- # Fetches a child at a given index
- # @param index the Integer index of the child to fetch
- def []( index )
- @children[index]
- end
-
- alias :each_child :each
-
-
-
- # Set an index entry. See Array.[]=
- # @param index the index of the element to set
- # @param opt either the object to set, or an Integer length
- # @param child if opt is an Integer, this is the child to set
- # @return the parent (self)
- def []=( *args )
- args[-1].parent = self
- @children[*args[0..-2]] = args[-1]
- end
-
- # Inserts an child before another child
- # @param child1 this is either an xpath or an Element. If an Element,
- # child2 will be inserted before child1 in the child list of the parent.
- # If an xpath, child2 will be inserted before the first child to match
- # the xpath.
- # @param child2 the child to insert
- # @return the parent (self)
- def insert_before( child1, child2 )
- if child1.kind_of? String
- child1 = XPath.first( self, child1 )
- child1.parent.insert_before child1, child2
- else
- ind = index(child1)
- child2.parent.delete(child2) if child2.parent
- @children[ind,0] = child2
- child2.parent = self
- end
- self
- end
-
- # Inserts an child after another child
- # @param child1 this is either an xpath or an Element. If an Element,
- # child2 will be inserted after child1 in the child list of the parent.
- # If an xpath, child2 will be inserted after the first child to match
- # the xpath.
- # @param child2 the child to insert
- # @return the parent (self)
- def insert_after( child1, child2 )
- if child1.kind_of? String
- child1 = XPath.first( self, child1 )
- child1.parent.insert_after child1, child2
- else
- ind = index(child1)+1
- child2.parent.delete(child2) if child2.parent
- @children[ind,0] = child2
- child2.parent = self
- end
- self
- end
-
- def to_a
- @children.dup
- end
-
- # Fetches the index of a given child
- # @param child the child to get the index of
- # @return the index of the child, or nil if the object is not a child
- # of this parent.
- def index( child )
- count = -1
- @children.find { |i| count += 1 ; i.hash == child.hash }
- count
- end
-
- # @return the number of children of this parent
- def size
- @children.size
- end
-
- alias :length :size
-
- # Replaces one child with another, making sure the nodelist is correct
- # @param to_replace the child to replace (must be a Child)
- # @param replacement the child to insert into the nodelist (must be a
- # Child)
- def replace_child( to_replace, replacement )
- @children.map! {|c| c.equal?( to_replace ) ? replacement : c }
- to_replace.parent = nil
- replacement.parent = self
- end
-
- # Deeply clones this object. This creates a complete duplicate of this
- # Parent, including all descendants.
- def deep_clone
- cl = clone()
- each do |child|
- if child.kind_of? Parent
- cl << child.deep_clone
- else
- cl << child.clone
- end
- end
- cl
- end
-
- alias :children :to_a
-
- def parent?
- true
- end
- end
-end
diff --git a/lib/rexml/parseexception.rb b/lib/rexml/parseexception.rb
deleted file mode 100644
index 7b16cd1a41..0000000000
--- a/lib/rexml/parseexception.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: false
-module REXML
- class ParseException < RuntimeError
- attr_accessor :source, :parser, :continued_exception
-
- def initialize( message, source=nil, parser=nil, exception=nil )
- super(message)
- @source = source
- @parser = parser
- @continued_exception = exception
- end
-
- def to_s
- # Quote the original exception, if there was one
- if @continued_exception
- err = @continued_exception.inspect
- err << "\n"
- err << @continued_exception.backtrace.join("\n")
- err << "\n...\n"
- else
- err = ""
- end
-
- # Get the stack trace and error message
- err << super
-
- # Add contextual information
- if @source
- err << "\nLine: #{line}\n"
- err << "Position: #{position}\n"
- err << "Last 80 unconsumed characters:\n"
- err << @source.buffer[0..80].force_encoding("ASCII-8BIT").gsub(/\n/, ' ')
- end
-
- err
- end
-
- def position
- @source.current_line[0] if @source and defined? @source.current_line and
- @source.current_line
- end
-
- def line
- @source.current_line[2] if @source and defined? @source.current_line and
- @source.current_line
- end
-
- def context
- @source.current_line
- end
- end
-end
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
deleted file mode 100644
index f76aed0787..0000000000
--- a/lib/rexml/parsers/baseparser.rb
+++ /dev/null
@@ -1,594 +0,0 @@
-# frozen_string_literal: false
-require_relative '../parseexception'
-require_relative '../undefinednamespaceexception'
-require_relative '../source'
-require 'set'
-require "strscan"
-
-module REXML
- module Parsers
- # = Using the Pull Parser
- # <em>This API is experimental, and subject to change.</em>
- # parser = PullParser.new( "<a>text<b att='val'/>txet</a>" )
- # while parser.has_next?
- # res = parser.next
- # puts res[1]['att'] if res.start_tag? and res[0] == 'b'
- # end
- # See the PullEvent class for information on the content of the results.
- # The data is identical to the arguments passed for the various events to
- # the StreamListener API.
- #
- # Notice that:
- # parser = PullParser.new( "<a>BAD DOCUMENT" )
- # while parser.has_next?
- # res = parser.next
- # raise res[1] if res.error?
- # end
- #
- # Nat Price gave me some good ideas for the API.
- class BaseParser
- LETTER = '[:alpha:]'
- DIGIT = '[:digit:]'
-
- COMBININGCHAR = '' # TODO
- EXTENDER = '' # TODO
-
- NCNAME_STR= "[#{LETTER}_][-[:alnum:]._#{COMBININGCHAR}#{EXTENDER}]*"
- QNAME_STR= "(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})"
- QNAME = /(#{QNAME_STR})/
-
- # Just for backward compatibility. For example, kramdown uses this.
- # It's not used in REXML.
- UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
-
- NAMECHAR = '[\-\w\.:]'
- NAME = "([\\w:]#{NAMECHAR}*)"
- NMTOKEN = "(?:#{NAMECHAR})+"
- NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*"
- REFERENCE = "&(?:#{NAME};|#\\d+;|#x[0-9a-fA-F]+;)"
- REFERENCE_RE = /#{REFERENCE}/
-
- DOCTYPE_START = /\A\s*<!DOCTYPE\s/um
- DOCTYPE_END = /\A\s*\]\s*>/um
- DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
- ATTRIBUTE_PATTERN = /\s*(#{QNAME_STR})\s*=\s*(["'])(.*?)\4/um
- COMMENT_START = /\A<!--/u
- COMMENT_PATTERN = /<!--(.*?)-->/um
- CDATA_START = /\A<!\[CDATA\[/u
- CDATA_END = /\A\s*\]\s*>/um
- CDATA_PATTERN = /<!\[CDATA\[(.*?)\]\]>/um
- XMLDECL_START = /\A<\?xml\s/u;
- XMLDECL_PATTERN = /<\?xml\s+(.*?)\?>/um
- INSTRUCTION_START = /\A<\?/u
- INSTRUCTION_PATTERN = /<\?#{NAME}(\s+.*?)?\?>/um
- TAG_MATCH = /^<((?>#{QNAME_STR}))/um
- CLOSE_MATCH = /^\s*<\/(#{QNAME_STR})\s*>/um
-
- VERSION = /\bversion\s*=\s*["'](.*?)['"]/um
- ENCODING = /\bencoding\s*=\s*["'](.*?)['"]/um
- STANDALONE = /\bstandalone\s*=\s*["'](.*?)['"]/um
-
- ENTITY_START = /\A\s*<!ENTITY/
- IDENTITY = /^([!\*\w\-]+)(\s+#{NCNAME_STR})?(\s+["'](.*?)['"])?(\s+['"](.*?)["'])?/u
- ELEMENTDECL_START = /\A\s*<!ELEMENT/um
- ELEMENTDECL_PATTERN = /\A\s*(<!ELEMENT.*?)>/um
- SYSTEMENTITY = /\A\s*(%.*?;)\s*$/um
- ENUMERATION = "\\(\\s*#{NMTOKEN}(?:\\s*\\|\\s*#{NMTOKEN})*\\s*\\)"
- NOTATIONTYPE = "NOTATION\\s+\\(\\s*#{NAME}(?:\\s*\\|\\s*#{NAME})*\\s*\\)"
- ENUMERATEDTYPE = "(?:(?:#{NOTATIONTYPE})|(?:#{ENUMERATION}))"
- ATTTYPE = "(CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS|#{ENUMERATEDTYPE})"
- ATTVALUE = "(?:\"((?:[^<&\"]|#{REFERENCE})*)\")|(?:'((?:[^<&']|#{REFERENCE})*)')"
- DEFAULTDECL = "(#REQUIRED|#IMPLIED|(?:(#FIXED\\s+)?#{ATTVALUE}))"
- ATTDEF = "\\s+#{NAME}\\s+#{ATTTYPE}\\s+#{DEFAULTDECL}"
- ATTDEF_RE = /#{ATTDEF}/
- ATTLISTDECL_START = /\A\s*<!ATTLIST/um
- ATTLISTDECL_PATTERN = /\A\s*<!ATTLIST\s+#{NAME}(?:#{ATTDEF})*\s*>/um
- NOTATIONDECL_START = /\A\s*<!NOTATION/um
- PUBLIC = /\A\s*<!NOTATION\s+(\w[\-\w]*)\s+(PUBLIC)\s+(["'])(.*?)\3(?:\s+(["'])(.*?)\5)?\s*>/um
- SYSTEM = /\A\s*<!NOTATION\s+(\w[\-\w]*)\s+(SYSTEM)\s+(["'])(.*?)\3\s*>/um
-
- TEXT_PATTERN = /\A([^<]*)/um
-
- # Entity constants
- PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#"
- SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))}
- PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')}
- EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))"
- NDATADECL = "\\s+NDATA\\s+#{NAME}"
- PEREFERENCE = "%#{NAME};"
- ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))}
- PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})"
- ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))"
- PEDECL = "<!ENTITY\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
- GEDECL = "<!ENTITY\\s+#{NAME}\\s+#{ENTITYDEF}\\s*>"
- ENTITYDECL = /\s*(?:#{GEDECL})|(?:#{PEDECL})/um
-
- EREFERENCE = /&(?!#{NAME};)/
-
- DEFAULT_ENTITIES = {
- 'gt' => [/&gt;/, '&gt;', '>', />/],
- 'lt' => [/&lt;/, '&lt;', '<', /</],
- 'quot' => [/&quot;/, '&quot;', '"', /"/],
- "apos" => [/&apos;/, "&apos;", "'", /'/]
- }
-
- def initialize( source )
- self.stream = source
- @listeners = []
- end
-
- def add_listener( listener )
- @listeners << listener
- end
-
- attr_reader :source
-
- def stream=( source )
- @source = SourceFactory.create_from( source )
- @closed = nil
- @document_status = nil
- @tags = []
- @stack = []
- @entities = []
- @nsstack = []
- end
-
- def position
- if @source.respond_to? :position
- @source.position
- else
- # FIXME
- 0
- end
- end
-
- # Returns true if there are no more events
- def empty?
- return (@source.empty? and @stack.empty?)
- end
-
- # Returns true if there are more events. Synonymous with !empty?
- def has_next?
- return !(@source.empty? and @stack.empty?)
- end
-
- # Push an event back on the head of the stream. This method
- # has (theoretically) infinite depth.
- def unshift token
- @stack.unshift(token)
- end
-
- # Peek at the +depth+ event in the stack. The first element on the stack
- # is at depth 0. If +depth+ is -1, will parse to the end of the input
- # stream and return the last event, which is always :end_document.
- # Be aware that this causes the stream to be parsed up to the +depth+
- # event, so you can effectively pre-parse the entire document (pull the
- # entire thing into memory) using this method.
- def peek depth=0
- raise %Q[Illegal argument "#{depth}"] if depth < -1
- temp = []
- if depth == -1
- temp.push(pull()) until empty?
- else
- while @stack.size+temp.size < depth+1
- temp.push(pull())
- end
- end
- @stack += temp if temp.size > 0
- @stack[depth]
- end
-
- # Returns the next event. This is a +PullEvent+ object.
- def pull
- pull_event.tap do |event|
- @listeners.each do |listener|
- listener.receive event
- end
- end
- end
-
- def pull_event
- if @closed
- x, @closed = @closed, nil
- return [ :end_element, x ]
- end
- return [ :end_document ] if empty?
- return @stack.shift if @stack.size > 0
- #STDERR.puts @source.encoding
- @source.read if @source.buffer.size<2
- #STDERR.puts "BUFFER = #{@source.buffer.inspect}"
- if @document_status == nil
- #@source.consume( /^\s*/um )
- word = @source.match( /^((?:\s+)|(?:<[^>]*>))/um )
- word = word[1] unless word.nil?
- #STDERR.puts "WORD = #{word.inspect}"
- case word
- when COMMENT_START
- return [ :comment, @source.match( COMMENT_PATTERN, true )[1] ]
- when XMLDECL_START
- #STDERR.puts "XMLDECL"
- results = @source.match( XMLDECL_PATTERN, true )[1]
- version = VERSION.match( results )
- version = version[1] unless version.nil?
- encoding = ENCODING.match(results)
- encoding = encoding[1] unless encoding.nil?
- if need_source_encoding_update?(encoding)
- @source.encoding = encoding
- end
- if encoding.nil? and /\AUTF-16(?:BE|LE)\z/i =~ @source.encoding
- encoding = "UTF-16"
- end
- standalone = STANDALONE.match(results)
- standalone = standalone[1] unless standalone.nil?
- return [ :xmldecl, version, encoding, standalone ]
- when INSTRUCTION_START
- return process_instruction
- when DOCTYPE_START
- md = @source.match( DOCTYPE_PATTERN, true )
- @nsstack.unshift(curr_ns=Set.new)
- identity = md[1]
- close = md[2]
- identity =~ IDENTITY
- name = $1
- raise REXML::ParseException.new("DOCTYPE is missing a name") if name.nil?
- pub_sys = $2.nil? ? nil : $2.strip
- long_name = $4.nil? ? nil : $4.strip
- uri = $6.nil? ? nil : $6.strip
- args = [ :start_doctype, name, pub_sys, long_name, uri ]
- if close == ">"
- @document_status = :after_doctype
- @source.read if @source.buffer.size<2
- md = @source.match(/^\s*/um, true)
- @stack << [ :end_doctype ]
- else
- @document_status = :in_doctype
- end
- return args
- when /^\s+/
- else
- @document_status = :after_doctype
- @source.read if @source.buffer.size<2
- md = @source.match(/\s*/um, true)
- if @source.encoding == "UTF-8"
- @source.buffer.force_encoding(::Encoding::UTF_8)
- end
- end
- end
- if @document_status == :in_doctype
- md = @source.match(/\s*(.*?>)/um)
- case md[1]
- when SYSTEMENTITY
- match = @source.match( SYSTEMENTITY, true )[1]
- return [ :externalentity, match ]
-
- when ELEMENTDECL_START
- return [ :elementdecl, @source.match( ELEMENTDECL_PATTERN, true )[1] ]
-
- when ENTITY_START
- match = @source.match( ENTITYDECL, true ).to_a.compact
- match[0] = :entitydecl
- ref = false
- if match[1] == '%'
- ref = true
- match.delete_at 1
- end
- # Now we have to sort out what kind of entity reference this is
- if match[2] == 'SYSTEM'
- # External reference
- match[3] = match[3][1..-2] # PUBID
- match.delete_at(4) if match.size > 4 # Chop out NDATA decl
- # match is [ :entity, name, SYSTEM, pubid(, ndata)? ]
- elsif match[2] == 'PUBLIC'
- # External reference
- match[3] = match[3][1..-2] # PUBID
- match[4] = match[4][1..-2] # HREF
- match.delete_at(5) if match.size > 5 # Chop out NDATA decl
- # match is [ :entity, name, PUBLIC, pubid, href(, ndata)? ]
- else
- match[2] = match[2][1..-2]
- match.pop if match.size == 4
- # match is [ :entity, name, value ]
- end
- match << '%' if ref
- return match
- when ATTLISTDECL_START
- md = @source.match( ATTLISTDECL_PATTERN, true )
- raise REXML::ParseException.new( "Bad ATTLIST declaration!", @source ) if md.nil?
- element = md[1]
- contents = md[0]
-
- pairs = {}
- values = md[0].scan( ATTDEF_RE )
- values.each do |attdef|
- unless attdef[3] == "#IMPLIED"
- attdef.compact!
- val = attdef[3]
- val = attdef[4] if val == "#FIXED "
- pairs[attdef[0]] = val
- if attdef[0] =~ /^xmlns:(.*)/
- @nsstack[0] << $1
- end
- end
- end
- return [ :attlistdecl, element, pairs, contents ]
- when NOTATIONDECL_START
- md = nil
- if @source.match( PUBLIC )
- md = @source.match( PUBLIC, true )
- vals = [md[1],md[2],md[4],md[6]]
- elsif @source.match( SYSTEM )
- md = @source.match( SYSTEM, true )
- vals = [md[1],md[2],nil,md[4]]
- else
- raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source )
- end
- return [ :notationdecl, *vals ]
- when DOCTYPE_END
- @document_status = :after_doctype
- @source.match( DOCTYPE_END, true )
- return [ :end_doctype ]
- end
- end
- begin
- if @source.buffer[0] == ?<
- if @source.buffer[1] == ?/
- @nsstack.shift
- last_tag = @tags.pop
- md = @source.match( CLOSE_MATCH, true )
- if md and !last_tag
- message = "Unexpected top-level end tag (got '#{md[1]}')"
- raise REXML::ParseException.new(message, @source)
- end
- if md.nil? or last_tag != md[1]
- message = "Missing end tag for '#{last_tag}'"
- message << " (got '#{md[1]}')" if md
- raise REXML::ParseException.new(message, @source)
- end
- return [ :end_element, last_tag ]
- elsif @source.buffer[1] == ?!
- md = @source.match(/\A(\s*[^>]*>)/um)
- #STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}"
- raise REXML::ParseException.new("Malformed node", @source) unless md
- if md[0][2] == ?-
- md = @source.match( COMMENT_PATTERN, true )
-
- case md[1]
- when /--/, /-\z/
- raise REXML::ParseException.new("Malformed comment", @source)
- end
-
- return [ :comment, md[1] ] if md
- else
- md = @source.match( CDATA_PATTERN, true )
- return [ :cdata, md[1] ] if md
- end
- raise REXML::ParseException.new( "Declarations can only occur "+
- "in the doctype declaration.", @source)
- elsif @source.buffer[1] == ??
- return process_instruction
- else
- # Get the next tag
- md = @source.match(TAG_MATCH, true)
- unless md
- raise REXML::ParseException.new("malformed XML: missing tag start", @source)
- end
- prefixes = Set.new
- prefixes << md[2] if md[2]
- @nsstack.unshift(curr_ns=Set.new)
- attributes, closed = parse_attributes(prefixes, curr_ns)
- # Verify that all of the prefixes have been defined
- for prefix in prefixes
- unless @nsstack.find{|k| k.member?(prefix)}
- raise UndefinedNamespaceException.new(prefix,@source,self)
- end
- end
-
- if closed
- @closed = md[1]
- @nsstack.shift
- else
- @tags.push( md[1] )
- end
- return [ :start_element, md[1], attributes ]
- end
- else
- md = @source.match( TEXT_PATTERN, true )
- if md[0].length == 0
- @source.match( /(\s+)/, true )
- end
- #STDERR.puts "GOT #{md[1].inspect}" unless md[0].length == 0
- #return [ :text, "" ] if md[0].length == 0
- # unnormalized = Text::unnormalize( md[1], self )
- # return PullEvent.new( :text, md[1], unnormalized )
- return [ :text, md[1] ]
- end
- rescue REXML::UndefinedNamespaceException
- raise
- rescue REXML::ParseException
- raise
- rescue => error
- raise REXML::ParseException.new( "Exception parsing",
- @source, self, (error ? error : $!) )
- end
- return [ :dummy ]
- end
- private :pull_event
-
- def entity( reference, entities )
- value = nil
- value = entities[ reference ] if entities
- if not value
- value = DEFAULT_ENTITIES[ reference ]
- value = value[2] if value
- end
- unnormalize( value, entities ) if value
- end
-
- # Escapes all possible entities
- def normalize( input, entities=nil, entity_filter=nil )
- copy = input.clone
- # Doing it like this rather than in a loop improves the speed
- copy.gsub!( EREFERENCE, '&amp;' )
- entities.each do |key, value|
- copy.gsub!( value, "&#{key};" ) unless entity_filter and
- entity_filter.include?(entity)
- end if entities
- copy.gsub!( EREFERENCE, '&amp;' )
- DEFAULT_ENTITIES.each do |key, value|
- copy.gsub!( value[3], value[1] )
- end
- copy
- end
-
- # Unescapes all possible entities
- def unnormalize( string, entities=nil, filter=nil )
- rv = string.clone
- rv.gsub!( /\r\n?/, "\n" )
- matches = rv.scan( REFERENCE_RE )
- return rv if matches.size == 0
- rv.gsub!( /&#0*((?:\d+)|(?:x[a-fA-F0-9]+));/ ) {
- m=$1
- m = "0#{m}" if m[0] == ?x
- [Integer(m)].pack('U*')
- }
- matches.collect!{|x|x[0]}.compact!
- if matches.size > 0
- matches.each do |entity_reference|
- unless filter and filter.include?(entity_reference)
- entity_value = entity( entity_reference, entities )
- if entity_value
- re = /&#{entity_reference};/
- rv.gsub!( re, entity_value )
- else
- er = DEFAULT_ENTITIES[entity_reference]
- rv.gsub!( er[0], er[2] ) if er
- end
- end
- end
- rv.gsub!( /&amp;/, '&' )
- end
- rv
- end
-
- private
- def need_source_encoding_update?(xml_declaration_encoding)
- return false if xml_declaration_encoding.nil?
- return false if /\AUTF-16\z/i =~ xml_declaration_encoding
- true
- end
-
- def process_instruction
- match_data = @source.match(INSTRUCTION_PATTERN, true)
- unless match_data
- message = "Invalid processing instruction node"
- raise REXML::ParseException.new(message, @source)
- end
- [:processing_instruction, match_data[1], match_data[2]]
- end
-
- def parse_attributes(prefixes, curr_ns)
- attributes = {}
- closed = false
- match_data = @source.match(/^(.*?)(\/)?>/um, true)
- if match_data.nil?
- message = "Start tag isn't ended"
- raise REXML::ParseException.new(message, @source)
- end
-
- raw_attributes = match_data[1]
- closed = !match_data[2].nil?
- return attributes, closed if raw_attributes.nil?
- return attributes, closed if raw_attributes.empty?
-
- scanner = StringScanner.new(raw_attributes)
- until scanner.eos?
- if scanner.scan(/\s+/)
- break if scanner.eos?
- end
-
- pos = scanner.pos
- loop do
- break if scanner.scan(ATTRIBUTE_PATTERN)
- unless scanner.scan(QNAME)
- message = "Invalid attribute name: <#{scanner.rest}>"
- raise REXML::ParseException.new(message, @source)
- end
- name = scanner[0]
- unless scanner.scan(/\s*=\s*/um)
- message = "Missing attribute equal: <#{name}>"
- raise REXML::ParseException.new(message, @source)
- end
- quote = scanner.scan(/['"]/)
- unless quote
- message = "Missing attribute value start quote: <#{name}>"
- raise REXML::ParseException.new(message, @source)
- end
- unless scanner.scan(/.*#{Regexp.escape(quote)}/um)
- match_data = @source.match(/^(.*?)(\/)?>/um, true)
- if match_data
- scanner << "/" if closed
- scanner << ">"
- scanner << match_data[1]
- scanner.pos = pos
- closed = !match_data[2].nil?
- next
- end
- message =
- "Missing attribute value end quote: <#{name}>: <#{quote}>"
- raise REXML::ParseException.new(message, @source)
- end
- end
- name = scanner[1]
- prefix = scanner[2]
- local_part = scanner[3]
- # quote = scanner[4]
- value = scanner[5]
- if prefix == "xmlns"
- if local_part == "xml"
- if value != "http://www.w3.org/XML/1998/namespace"
- msg = "The 'xml' prefix must not be bound to any other namespace "+
- "(http://www.w3.org/TR/REC-xml-names/#ns-decl)"
- raise REXML::ParseException.new( msg, @source, self )
- end
- elsif local_part == "xmlns"
- msg = "The 'xmlns' prefix must not be declared "+
- "(http://www.w3.org/TR/REC-xml-names/#ns-decl)"
- raise REXML::ParseException.new( msg, @source, self)
- end
- curr_ns << local_part
- elsif prefix
- prefixes << prefix unless prefix == "xml"
- end
-
- if attributes.has_key?(name)
- msg = "Duplicate attribute #{name.inspect}"
- raise REXML::ParseException.new(msg, @source, self)
- end
-
- attributes[name] = value
- end
- return attributes, closed
- end
- end
- end
-end
-
-=begin
- case event[0]
- when :start_element
- when :text
- when :end_element
- when :processing_instruction
- when :cdata
- when :comment
- when :xmldecl
- when :start_doctype
- when :end_doctype
- when :externalentity
- when :elementdecl
- when :entity
- when :attlistdecl
- when :notationdecl
- when :end_doctype
- end
-=end
diff --git a/lib/rexml/parsers/lightparser.rb b/lib/rexml/parsers/lightparser.rb
deleted file mode 100644
index bdc08276a9..0000000000
--- a/lib/rexml/parsers/lightparser.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-require_relative 'streamparser'
-require_relative 'baseparser'
-require_relative '../light/node'
-
-module REXML
- module Parsers
- class LightParser
- def initialize stream
- @stream = stream
- @parser = REXML::Parsers::BaseParser.new( stream )
- end
-
- def add_listener( listener )
- @parser.add_listener( listener )
- end
-
- def rewind
- @stream.rewind
- @parser.stream = @stream
- end
-
- def parse
- root = context = [ :document ]
- while true
- event = @parser.pull
- case event[0]
- when :end_document
- break
- when :start_element, :start_doctype
- new_node = event
- context << new_node
- new_node[1,0] = [context]
- context = new_node
- when :end_element, :end_doctype
- context = context[1]
- else
- new_node = event
- context << new_node
- new_node[1,0] = [context]
- end
- end
- root
- end
- end
-
- # An element is an array. The array contains:
- # 0 The parent element
- # 1 The tag name
- # 2 A hash of attributes
- # 3..-1 The child elements
- # An element is an array of size > 3
- # Text is a String
- # PIs are [ :processing_instruction, target, data ]
- # Comments are [ :comment, data ]
- # DocTypes are DocType structs
- # The root is an array with XMLDecls, Text, DocType, Array, Text
- end
-end
diff --git a/lib/rexml/parsers/pullparser.rb b/lib/rexml/parsers/pullparser.rb
deleted file mode 100644
index f8b232a2cd..0000000000
--- a/lib/rexml/parsers/pullparser.rb
+++ /dev/null
@@ -1,197 +0,0 @@
-# frozen_string_literal: false
-require 'forwardable'
-
-require_relative '../parseexception'
-require_relative 'baseparser'
-require_relative '../xmltokens'
-
-module REXML
- module Parsers
- # = Using the Pull Parser
- # <em>This API is experimental, and subject to change.</em>
- # parser = PullParser.new( "<a>text<b att='val'/>txet</a>" )
- # while parser.has_next?
- # res = parser.next
- # puts res[1]['att'] if res.start_tag? and res[0] == 'b'
- # end
- # See the PullEvent class for information on the content of the results.
- # The data is identical to the arguments passed for the various events to
- # the StreamListener API.
- #
- # Notice that:
- # parser = PullParser.new( "<a>BAD DOCUMENT" )
- # while parser.has_next?
- # res = parser.next
- # raise res[1] if res.error?
- # end
- #
- # Nat Price gave me some good ideas for the API.
- class PullParser
- include XMLTokens
- extend Forwardable
-
- def_delegators( :@parser, :has_next? )
- def_delegators( :@parser, :entity )
- def_delegators( :@parser, :empty? )
- def_delegators( :@parser, :source )
-
- def initialize stream
- @entities = {}
- @listeners = nil
- @parser = BaseParser.new( stream )
- @my_stack = []
- end
-
- def add_listener( listener )
- @listeners = [] unless @listeners
- @listeners << listener
- end
-
- def each
- while has_next?
- yield self.pull
- end
- end
-
- def peek depth=0
- if @my_stack.length <= depth
- (depth - @my_stack.length + 1).times {
- e = PullEvent.new(@parser.pull)
- @my_stack.push(e)
- }
- end
- @my_stack[depth]
- end
-
- def pull
- return @my_stack.shift if @my_stack.length > 0
-
- event = @parser.pull
- case event[0]
- when :entitydecl
- @entities[ event[1] ] =
- event[2] unless event[2] =~ /PUBLIC|SYSTEM/
- when :text
- unnormalized = @parser.unnormalize( event[1], @entities )
- event << unnormalized
- end
- PullEvent.new( event )
- end
-
- def unshift token
- @my_stack.unshift token
- end
- end
-
- # A parsing event. The contents of the event are accessed as an +Array?,
- # and the type is given either by the ...? methods, or by accessing the
- # +type+ accessor. The contents of this object vary from event to event,
- # but are identical to the arguments passed to +StreamListener+s for each
- # event.
- class PullEvent
- # The type of this event. Will be one of :tag_start, :tag_end, :text,
- # :processing_instruction, :comment, :doctype, :attlistdecl, :entitydecl,
- # :notationdecl, :entity, :cdata, :xmldecl, or :error.
- def initialize(arg)
- @contents = arg
- end
-
- def []( start, endd=nil)
- if start.kind_of? Range
- @contents.slice( start.begin+1 .. start.end )
- elsif start.kind_of? Numeric
- if endd.nil?
- @contents.slice( start+1 )
- else
- @contents.slice( start+1, endd )
- end
- else
- raise "Illegal argument #{start.inspect} (#{start.class})"
- end
- end
-
- def event_type
- @contents[0]
- end
-
- # Content: [ String tag_name, Hash attributes ]
- def start_element?
- @contents[0] == :start_element
- end
-
- # Content: [ String tag_name ]
- def end_element?
- @contents[0] == :end_element
- end
-
- # Content: [ String raw_text, String unnormalized_text ]
- def text?
- @contents[0] == :text
- end
-
- # Content: [ String text ]
- def instruction?
- @contents[0] == :processing_instruction
- end
-
- # Content: [ String text ]
- def comment?
- @contents[0] == :comment
- end
-
- # Content: [ String name, String pub_sys, String long_name, String uri ]
- def doctype?
- @contents[0] == :start_doctype
- end
-
- # Content: [ String text ]
- def attlistdecl?
- @contents[0] == :attlistdecl
- end
-
- # Content: [ String text ]
- def elementdecl?
- @contents[0] == :elementdecl
- end
-
- # Due to the wonders of DTDs, an entity declaration can be just about
- # anything. There's no way to normalize it; you'll have to interpret the
- # content yourself. However, the following is true:
- #
- # * If the entity declaration is an internal entity:
- # [ String name, String value ]
- # Content: [ String text ]
- def entitydecl?
- @contents[0] == :entitydecl
- end
-
- # Content: [ String text ]
- def notationdecl?
- @contents[0] == :notationdecl
- end
-
- # Content: [ String text ]
- def entity?
- @contents[0] == :entity
- end
-
- # Content: [ String text ]
- def cdata?
- @contents[0] == :cdata
- end
-
- # Content: [ String version, String encoding, String standalone ]
- def xmldecl?
- @contents[0] == :xmldecl
- end
-
- def error?
- @contents[0] == :error
- end
-
- def inspect
- @contents[0].to_s + ": " + @contents[1..-1].inspect
- end
- end
- end
-end
diff --git a/lib/rexml/parsers/sax2parser.rb b/lib/rexml/parsers/sax2parser.rb
deleted file mode 100644
index 6a24ce2227..0000000000
--- a/lib/rexml/parsers/sax2parser.rb
+++ /dev/null
@@ -1,273 +0,0 @@
-# frozen_string_literal: false
-require_relative 'baseparser'
-require_relative '../parseexception'
-require_relative '../namespace'
-require_relative '../text'
-
-module REXML
- module Parsers
- # SAX2Parser
- class SAX2Parser
- def initialize source
- @parser = BaseParser.new(source)
- @listeners = []
- @procs = []
- @namespace_stack = []
- @has_listeners = false
- @tag_stack = []
- @entities = {}
- end
-
- def source
- @parser.source
- end
-
- def add_listener( listener )
- @parser.add_listener( listener )
- end
-
- # Listen arguments:
- #
- # Symbol, Array, Block
- # Listen to Symbol events on Array elements
- # Symbol, Block
- # Listen to Symbol events
- # Array, Listener
- # Listen to all events on Array elements
- # Array, Block
- # Listen to :start_element events on Array elements
- # Listener
- # Listen to All events
- #
- # Symbol can be one of: :start_element, :end_element,
- # :start_prefix_mapping, :end_prefix_mapping, :characters,
- # :processing_instruction, :doctype, :attlistdecl, :elementdecl,
- # :entitydecl, :notationdecl, :cdata, :xmldecl, :comment
- #
- # There is an additional symbol that can be listened for: :progress.
- # This will be called for every event generated, passing in the current
- # stream position.
- #
- # Array contains regular expressions or strings which will be matched
- # against fully qualified element names.
- #
- # Listener must implement the methods in SAX2Listener
- #
- # Block will be passed the same arguments as a SAX2Listener method would
- # be, where the method name is the same as the matched Symbol.
- # See the SAX2Listener for more information.
- def listen( *args, &blok )
- if args[0].kind_of? Symbol
- if args.size == 2
- args[1].each { |match| @procs << [args[0], match, blok] }
- else
- add( [args[0], nil, blok] )
- end
- elsif args[0].kind_of? Array
- if args.size == 2
- args[0].each { |match| add( [nil, match, args[1]] ) }
- else
- args[0].each { |match| add( [ :start_element, match, blok ] ) }
- end
- else
- add([nil, nil, args[0]])
- end
- end
-
- def deafen( listener=nil, &blok )
- if listener
- @listeners.delete_if {|item| item[-1] == listener }
- @has_listeners = false if @listeners.size == 0
- else
- @procs.delete_if {|item| item[-1] == blok }
- end
- end
-
- def parse
- @procs.each { |sym,match,block| block.call if sym == :start_document }
- @listeners.each { |sym,match,block|
- block.start_document if sym == :start_document or sym.nil?
- }
- context = []
- while true
- event = @parser.pull
- case event[0]
- when :end_document
- handle( :end_document )
- break
- when :start_doctype
- handle( :doctype, *event[1..-1])
- when :end_doctype
- context = context[1]
- when :start_element
- @tag_stack.push(event[1])
- # find the observers for namespaces
- procs = get_procs( :start_prefix_mapping, event[1] )
- listeners = get_listeners( :start_prefix_mapping, event[1] )
- if procs or listeners
- # break out the namespace declarations
- # The attributes live in event[2]
- event[2].each {|n, v| event[2][n] = @parser.normalize(v)}
- nsdecl = event[2].find_all { |n, value| n =~ /^xmlns(:|$)/ }
- nsdecl.collect! { |n, value| [ n[6..-1], value ] }
- @namespace_stack.push({})
- nsdecl.each do |n,v|
- @namespace_stack[-1][n] = v
- # notify observers of namespaces
- procs.each { |ob| ob.call( n, v ) } if procs
- listeners.each { |ob| ob.start_prefix_mapping(n, v) } if listeners
- end
- end
- event[1] =~ Namespace::NAMESPLIT
- prefix = $1
- local = $2
- uri = get_namespace(prefix)
- # find the observers for start_element
- procs = get_procs( :start_element, event[1] )
- listeners = get_listeners( :start_element, event[1] )
- # notify observers
- procs.each { |ob| ob.call( uri, local, event[1], event[2] ) } if procs
- listeners.each { |ob|
- ob.start_element( uri, local, event[1], event[2] )
- } if listeners
- when :end_element
- @tag_stack.pop
- event[1] =~ Namespace::NAMESPLIT
- prefix = $1
- local = $2
- uri = get_namespace(prefix)
- # find the observers for start_element
- procs = get_procs( :end_element, event[1] )
- listeners = get_listeners( :end_element, event[1] )
- # notify observers
- procs.each { |ob| ob.call( uri, local, event[1] ) } if procs
- listeners.each { |ob|
- ob.end_element( uri, local, event[1] )
- } if listeners
-
- namespace_mapping = @namespace_stack.pop
- # find the observers for namespaces
- procs = get_procs( :end_prefix_mapping, event[1] )
- listeners = get_listeners( :end_prefix_mapping, event[1] )
- if procs or listeners
- namespace_mapping.each do |ns_prefix, ns_uri|
- # notify observers of namespaces
- procs.each { |ob| ob.call( ns_prefix ) } if procs
- listeners.each { |ob| ob.end_prefix_mapping(ns_prefix) } if listeners
- end
- end
- when :text
- #normalized = @parser.normalize( event[1] )
- #handle( :characters, normalized )
- copy = event[1].clone
-
- esub = proc { |match|
- if @entities.has_key?($1)
- @entities[$1].gsub(Text::REFERENCE, &esub)
- else
- match
- end
- }
-
- copy.gsub!( Text::REFERENCE, &esub )
- copy.gsub!( Text::NUMERICENTITY ) {|m|
- m=$1
- m = "0#{m}" if m[0] == ?x
- [Integer(m)].pack('U*')
- }
- handle( :characters, copy )
- when :entitydecl
- handle_entitydecl( event )
- when :processing_instruction, :comment, :attlistdecl,
- :elementdecl, :cdata, :notationdecl, :xmldecl
- handle( *event )
- end
- handle( :progress, @parser.position )
- end
- end
-
- private
- def handle( symbol, *arguments )
- tag = @tag_stack[-1]
- procs = get_procs( symbol, tag )
- listeners = get_listeners( symbol, tag )
- # notify observers
- procs.each { |ob| ob.call( *arguments ) } if procs
- listeners.each { |l|
- l.send( symbol.to_s, *arguments )
- } if listeners
- end
-
- def handle_entitydecl( event )
- @entities[ event[1] ] = event[2] if event.size == 3
- parameter_reference_p = false
- case event[2]
- when "SYSTEM"
- if event.size == 5
- if event.last == "%"
- parameter_reference_p = true
- else
- event[4, 0] = "NDATA"
- end
- end
- when "PUBLIC"
- if event.size == 6
- if event.last == "%"
- parameter_reference_p = true
- else
- event[5, 0] = "NDATA"
- end
- end
- else
- parameter_reference_p = (event.size == 4)
- end
- event[1, 0] = event.pop if parameter_reference_p
- handle( event[0], event[1..-1] )
- end
-
- # The following methods are duplicates, but it is faster than using
- # a helper
- def get_procs( symbol, name )
- return nil if @procs.size == 0
- @procs.find_all do |sym, match, block|
- (
- (sym.nil? or symbol == sym) and
- ((name.nil? and match.nil?) or match.nil? or (
- (name == match) or
- (match.kind_of? Regexp and name =~ match)
- )
- )
- )
- end.collect{|x| x[-1]}
- end
- def get_listeners( symbol, name )
- return nil if @listeners.size == 0
- @listeners.find_all do |sym, match, block|
- (
- (sym.nil? or symbol == sym) and
- ((name.nil? and match.nil?) or match.nil? or (
- (name == match) or
- (match.kind_of? Regexp and name =~ match)
- )
- )
- )
- end.collect{|x| x[-1]}
- end
-
- def add( pair )
- if pair[-1].respond_to? :call
- @procs << pair unless @procs.include? pair
- else
- @listeners << pair unless @listeners.include? pair
- @has_listeners = true
- end
- end
-
- def get_namespace( prefix )
- uris = (@namespace_stack.find_all { |ns| not ns[prefix].nil? }) ||
- (@namespace_stack.find { |ns| not ns[nil].nil? })
- uris[-1][prefix] unless uris.nil? or 0 == uris.size
- end
- end
- end
-end
diff --git a/lib/rexml/parsers/streamparser.rb b/lib/rexml/parsers/streamparser.rb
deleted file mode 100644
index 9e0eb0b363..0000000000
--- a/lib/rexml/parsers/streamparser.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-# frozen_string_literal: false
-require_relative "baseparser"
-
-module REXML
- module Parsers
- class StreamParser
- def initialize source, listener
- @listener = listener
- @parser = BaseParser.new( source )
- @tag_stack = []
- end
-
- def add_listener( listener )
- @parser.add_listener( listener )
- end
-
- def parse
- # entity string
- while true
- event = @parser.pull
- case event[0]
- when :end_document
- unless @tag_stack.empty?
- tag_path = "/" + @tag_stack.join("/")
- raise ParseException.new("Missing end tag for '#{tag_path}'",
- @parser.source)
- end
- return
- when :start_element
- @tag_stack << event[1]
- attrs = event[2].each do |n, v|
- event[2][n] = @parser.unnormalize( v )
- end
- @listener.tag_start( event[1], attrs )
- when :end_element
- @listener.tag_end( event[1] )
- @tag_stack.pop
- when :text
- normalized = @parser.unnormalize( event[1] )
- @listener.text( normalized )
- when :processing_instruction
- @listener.instruction( *event[1,2] )
- when :start_doctype
- @listener.doctype( *event[1..-1] )
- when :end_doctype
- # FIXME: remove this condition for milestone:3.2
- @listener.doctype_end if @listener.respond_to? :doctype_end
- when :comment, :attlistdecl, :cdata, :xmldecl, :elementdecl
- @listener.send( event[0].to_s, *event[1..-1] )
- when :entitydecl, :notationdecl
- @listener.send( event[0].to_s, event[1..-1] )
- when :externalentity
- entity_reference = event[1]
- content = entity_reference.gsub(/\A%|;\z/, "")
- @listener.entity(content)
- end
- end
- end
- end
- end
-end
diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb
deleted file mode 100644
index bf9a42545b..0000000000
--- a/lib/rexml/parsers/treeparser.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# frozen_string_literal: false
-require_relative '../validation/validationexception'
-require_relative '../undefinednamespaceexception'
-
-module REXML
- module Parsers
- class TreeParser
- def initialize( source, build_context = Document.new )
- @build_context = build_context
- @parser = Parsers::BaseParser.new( source )
- end
-
- def add_listener( listener )
- @parser.add_listener( listener )
- end
-
- def parse
- tag_stack = []
- in_doctype = false
- entities = nil
- begin
- while true
- event = @parser.pull
- #STDERR.puts "TREEPARSER GOT #{event.inspect}"
- case event[0]
- when :end_document
- unless tag_stack.empty?
- raise ParseException.new("No close tag for #{@build_context.xpath}",
- @parser.source, @parser)
- end
- return
- when :start_element
- tag_stack.push(event[1])
- el = @build_context = @build_context.add_element( event[1] )
- event[2].each do |key, value|
- el.attributes[key]=Attribute.new(key,value,self)
- end
- when :end_element
- tag_stack.pop
- @build_context = @build_context.parent
- when :text
- if not in_doctype
- if @build_context[-1].instance_of? Text
- @build_context[-1] << event[1]
- else
- @build_context.add(
- Text.new(event[1], @build_context.whitespace, nil, true)
- ) unless (
- @build_context.ignore_whitespace_nodes and
- event[1].strip.size==0
- )
- end
- end
- when :comment
- c = Comment.new( event[1] )
- @build_context.add( c )
- when :cdata
- c = CData.new( event[1] )
- @build_context.add( c )
- when :processing_instruction
- @build_context.add( Instruction.new( event[1], event[2] ) )
- when :end_doctype
- in_doctype = false
- entities.each { |k,v| entities[k] = @build_context.entities[k].value }
- @build_context = @build_context.parent
- when :start_doctype
- doctype = DocType.new( event[1..-1], @build_context )
- @build_context = doctype
- entities = {}
- in_doctype = true
- when :attlistdecl
- n = AttlistDecl.new( event[1..-1] )
- @build_context.add( n )
- when :externalentity
- n = ExternalEntity.new( event[1] )
- @build_context.add( n )
- when :elementdecl
- n = ElementDecl.new( event[1] )
- @build_context.add(n)
- when :entitydecl
- entities[ event[1] ] = event[2] unless event[2] =~ /PUBLIC|SYSTEM/
- @build_context.add(Entity.new(event))
- when :notationdecl
- n = NotationDecl.new( *event[1..-1] )
- @build_context.add( n )
- when :xmldecl
- x = XMLDecl.new( event[1], event[2], event[3] )
- @build_context.add( x )
- end
- end
- rescue REXML::Validation::ValidationException
- raise
- rescue REXML::ParseException
- raise
- rescue
- raise ParseException.new( $!.message, @parser.source, @parser, $! )
- end
- end
- end
- end
-end
diff --git a/lib/rexml/parsers/ultralightparser.rb b/lib/rexml/parsers/ultralightparser.rb
deleted file mode 100644
index e0029f43da..0000000000
--- a/lib/rexml/parsers/ultralightparser.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: false
-require_relative 'streamparser'
-require_relative 'baseparser'
-
-module REXML
- module Parsers
- class UltraLightParser
- def initialize stream
- @stream = stream
- @parser = REXML::Parsers::BaseParser.new( stream )
- end
-
- def add_listener( listener )
- @parser.add_listener( listener )
- end
-
- def rewind
- @stream.rewind
- @parser.stream = @stream
- end
-
- def parse
- root = context = []
- while true
- event = @parser.pull
- case event[0]
- when :end_document
- break
- when :end_doctype
- context = context[1]
- when :start_element, :start_doctype
- context << event
- event[1,0] = [context]
- context = event
- when :end_element
- context = context[1]
- else
- context << event
- end
- end
- root
- end
- end
-
- # An element is an array. The array contains:
- # 0 The parent element
- # 1 The tag name
- # 2 A hash of attributes
- # 3..-1 The child elements
- # An element is an array of size > 3
- # Text is a String
- # PIs are [ :processing_instruction, target, data ]
- # Comments are [ :comment, data ]
- # DocTypes are DocType structs
- # The root is an array with XMLDecls, Text, DocType, Array, Text
- end
-end
diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb
deleted file mode 100644
index d01d325e04..0000000000
--- a/lib/rexml/parsers/xpathparser.rb
+++ /dev/null
@@ -1,675 +0,0 @@
-# frozen_string_literal: false
-require_relative '../namespace'
-require_relative '../xmltokens'
-
-module REXML
- module Parsers
- # You don't want to use this class. Really. Use XPath, which is a wrapper
- # for this class. Believe me. You don't want to poke around in here.
- # There is strange, dark magic at work in this code. Beware. Go back! Go
- # back while you still can!
- class XPathParser
- include XMLTokens
- LITERAL = /^'([^']*)'|^"([^"]*)"/u
-
- def namespaces=( namespaces )
- Functions::namespace_context = namespaces
- @namespaces = namespaces
- end
-
- def parse path
- path = path.dup
- path.gsub!(/([\(\[])\s+/, '\1') # Strip ignorable spaces
- path.gsub!( /\s+([\]\)])/, '\1')
- parsed = []
- OrExpr(path, parsed)
- parsed
- end
-
- def predicate path
- parsed = []
- Predicate( "[#{path}]", parsed )
- parsed
- end
-
- def abbreviate( path )
- path = path.kind_of?(String) ? parse( path ) : path
- string = ""
- document = false
- while path.size > 0
- op = path.shift
- case op
- when :node
- when :attribute
- string << "/" if string.size > 0
- string << "@"
- when :child
- string << "/" if string.size > 0
- when :descendant_or_self
- string << "/"
- when :self
- string << "."
- when :parent
- string << ".."
- when :any
- string << "*"
- when :text
- string << "text()"
- when :following, :following_sibling,
- :ancestor, :ancestor_or_self, :descendant,
- :namespace, :preceding, :preceding_sibling
- string << "/" unless string.size == 0
- string << op.to_s.tr("_", "-")
- string << "::"
- when :qname
- prefix = path.shift
- name = path.shift
- string << prefix+":" if prefix.size > 0
- string << name
- when :predicate
- string << '['
- string << predicate_to_string( path.shift ) {|x| abbreviate( x ) }
- string << ']'
- when :document
- document = true
- when :function
- string << path.shift
- string << "( "
- string << predicate_to_string( path.shift[0] ) {|x| abbreviate( x )}
- string << " )"
- when :literal
- string << %Q{ "#{path.shift}" }
- else
- string << "/" unless string.size == 0
- string << "UNKNOWN("
- string << op.inspect
- string << ")"
- end
- end
- string = "/"+string if document
- return string
- end
-
- def expand( path )
- path = path.kind_of?(String) ? parse( path ) : path
- string = ""
- document = false
- while path.size > 0
- op = path.shift
- case op
- when :node
- string << "node()"
- when :attribute, :child, :following, :following_sibling,
- :ancestor, :ancestor_or_self, :descendant, :descendant_or_self,
- :namespace, :preceding, :preceding_sibling, :self, :parent
- string << "/" unless string.size == 0
- string << op.to_s.tr("_", "-")
- string << "::"
- when :any
- string << "*"
- when :qname
- prefix = path.shift
- name = path.shift
- string << prefix+":" if prefix.size > 0
- string << name
- when :predicate
- string << '['
- string << predicate_to_string( path.shift ) { |x| expand(x) }
- string << ']'
- when :document
- document = true
- else
- string << "/" unless string.size == 0
- string << "UNKNOWN("
- string << op.inspect
- string << ")"
- end
- end
- string = "/"+string if document
- return string
- end
-
- def predicate_to_string( path, &block )
- string = ""
- case path[0]
- when :and, :or, :mult, :plus, :minus, :neq, :eq, :lt, :gt, :lteq, :gteq, :div, :mod, :union
- op = path.shift
- case op
- when :eq
- op = "="
- when :lt
- op = "<"
- when :gt
- op = ">"
- when :lteq
- op = "<="
- when :gteq
- op = ">="
- when :neq
- op = "!="
- when :union
- op = "|"
- end
- left = predicate_to_string( path.shift, &block )
- right = predicate_to_string( path.shift, &block )
- string << " "
- string << left
- string << " "
- string << op.to_s
- string << " "
- string << right
- string << " "
- when :function
- path.shift
- name = path.shift
- string << name
- string << "( "
- string << predicate_to_string( path.shift, &block )
- string << " )"
- when :literal
- path.shift
- string << " "
- string << path.shift.inspect
- string << " "
- else
- string << " "
- string << yield( path )
- string << " "
- end
- return string.squeeze(" ")
- end
-
- private
- #LocationPath
- # | RelativeLocationPath
- # | '/' RelativeLocationPath?
- # | '//' RelativeLocationPath
- def LocationPath path, parsed
- path = path.lstrip
- if path[0] == ?/
- parsed << :document
- if path[1] == ?/
- parsed << :descendant_or_self
- parsed << :node
- path = path[2..-1]
- else
- path = path[1..-1]
- end
- end
- return RelativeLocationPath( path, parsed ) if path.size > 0
- end
-
- #RelativeLocationPath
- # | Step
- # | (AXIS_NAME '::' | '@' | '') AxisSpecifier
- # NodeTest
- # Predicate
- # | '.' | '..' AbbreviatedStep
- # | RelativeLocationPath '/' Step
- # | RelativeLocationPath '//' Step
- AXIS = /^(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::/
- def RelativeLocationPath path, parsed
- loop do
- original_path = path
- path = path.lstrip
-
- return original_path if path.empty?
-
- # (axis or @ or <child::>) nodetest predicate >
- # OR > / Step
- # (. or ..) >
- if path[0] == ?.
- if path[1] == ?.
- parsed << :parent
- parsed << :node
- path = path[2..-1]
- else
- parsed << :self
- parsed << :node
- path = path[1..-1]
- end
- else
- if path[0] == ?@
- parsed << :attribute
- path = path[1..-1]
- # Goto Nodetest
- elsif path =~ AXIS
- parsed << $1.tr('-','_').intern
- path = $'
- # Goto Nodetest
- else
- parsed << :child
- end
-
- n = []
- path = NodeTest( path, n)
-
- path = Predicate( path, n )
-
- parsed.concat(n)
- end
-
- original_path = path
- path = path.lstrip
- return original_path if path.empty?
-
- return original_path if path[0] != ?/
-
- if path[1] == ?/
- parsed << :descendant_or_self
- parsed << :node
- path = path[2..-1]
- else
- path = path[1..-1]
- end
- end
- end
-
- # Returns a 1-1 map of the nodeset
- # The contents of the resulting array are either:
- # true/false, if a positive match
- # String, if a name match
- #NodeTest
- # | ('*' | NCNAME ':' '*' | QNAME) NameTest
- # | '*' ':' NCNAME NameTest since XPath 2.0
- # | NODE_TYPE '(' ')' NodeType
- # | PI '(' LITERAL ')' PI
- # | '[' expr ']' Predicate
- PREFIX_WILDCARD = /^\*:(#{NCNAME_STR})/u
- LOCAL_NAME_WILDCARD = /^(#{NCNAME_STR}):\*/u
- QNAME = Namespace::NAMESPLIT
- NODE_TYPE = /^(comment|text|node)\(\s*\)/m
- PI = /^processing-instruction\(/
- def NodeTest path, parsed
- original_path = path
- path = path.lstrip
- case path
- when PREFIX_WILDCARD
- prefix = nil
- name = $1
- path = $'
- parsed << :qname
- parsed << prefix
- parsed << name
- when /^\*/
- path = $'
- parsed << :any
- when NODE_TYPE
- type = $1
- path = $'
- parsed << type.tr('-', '_').intern
- when PI
- path = $'
- literal = nil
- if path !~ /^\s*\)/
- path =~ LITERAL
- literal = $1
- path = $'
- raise ParseException.new("Missing ')' after processing instruction") if path[0] != ?)
- path = path[1..-1]
- end
- parsed << :processing_instruction
- parsed << (literal || '')
- when LOCAL_NAME_WILDCARD
- prefix = $1
- path = $'
- parsed << :namespace
- parsed << prefix
- when QNAME
- prefix = $1
- name = $2
- path = $'
- prefix = "" unless prefix
- parsed << :qname
- parsed << prefix
- parsed << name
- else
- path = original_path
- end
- return path
- end
-
- # Filters the supplied nodeset on the predicate(s)
- def Predicate path, parsed
- original_path = path
- path = path.lstrip
- return original_path unless path[0] == ?[
- predicates = []
- while path[0] == ?[
- path, expr = get_group(path)
- predicates << expr[1..-2] if expr
- end
- predicates.each{ |pred|
- preds = []
- parsed << :predicate
- parsed << preds
- OrExpr(pred, preds)
- }
- path
- end
-
- # The following return arrays of true/false, a 1-1 mapping of the
- # supplied nodeset, except for axe(), which returns a filtered
- # nodeset
-
- #| OrExpr S 'or' S AndExpr
- #| AndExpr
- def OrExpr path, parsed
- n = []
- rest = AndExpr( path, n )
- if rest != path
- while rest =~ /^\s*( or )/
- n = [ :or, n, [] ]
- rest = AndExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| AndExpr S 'and' S EqualityExpr
- #| EqualityExpr
- def AndExpr path, parsed
- n = []
- rest = EqualityExpr( path, n )
- if rest != path
- while rest =~ /^\s*( and )/
- n = [ :and, n, [] ]
- rest = EqualityExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| EqualityExpr ('=' | '!=') RelationalExpr
- #| RelationalExpr
- def EqualityExpr path, parsed
- n = []
- rest = RelationalExpr( path, n )
- if rest != path
- while rest =~ /^\s*(!?=)\s*/
- if $1[0] == ?!
- n = [ :neq, n, [] ]
- else
- n = [ :eq, n, [] ]
- end
- rest = RelationalExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr
- #| AdditiveExpr
- def RelationalExpr path, parsed
- n = []
- rest = AdditiveExpr( path, n )
- if rest != path
- while rest =~ /^\s*([<>]=?)\s*/
- if $1[0] == ?<
- sym = "lt"
- else
- sym = "gt"
- end
- sym << "eq" if $1[-1] == ?=
- n = [ sym.intern, n, [] ]
- rest = AdditiveExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| AdditiveExpr ('+' | '-') MultiplicativeExpr
- #| MultiplicativeExpr
- def AdditiveExpr path, parsed
- n = []
- rest = MultiplicativeExpr( path, n )
- if rest != path
- while rest =~ /^\s*(\+|-)\s*/
- if $1[0] == ?+
- n = [ :plus, n, [] ]
- else
- n = [ :minus, n, [] ]
- end
- rest = MultiplicativeExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr
- #| UnaryExpr
- def MultiplicativeExpr path, parsed
- n = []
- rest = UnaryExpr( path, n )
- if rest != path
- while rest =~ /^\s*(\*| div | mod )\s*/
- if $1[0] == ?*
- n = [ :mult, n, [] ]
- elsif $1.include?( "div" )
- n = [ :div, n, [] ]
- else
- n = [ :mod, n, [] ]
- end
- rest = UnaryExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace(n)
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| '-' UnaryExpr
- #| UnionExpr
- def UnaryExpr path, parsed
- path =~ /^(\-*)/
- path = $'
- if $1 and (($1.size % 2) != 0)
- mult = -1
- else
- mult = 1
- end
- parsed << :neg if mult < 0
-
- n = []
- path = UnionExpr( path, n )
- parsed.concat( n )
- path
- end
-
- #| UnionExpr '|' PathExpr
- #| PathExpr
- def UnionExpr path, parsed
- n = []
- rest = PathExpr( path, n )
- if rest != path
- while rest =~ /^\s*(\|)\s*/
- n = [ :union, n, [] ]
- rest = PathExpr( $', n[-1] )
- end
- end
- if parsed.size == 0 and n.size != 0
- parsed.replace( n )
- elsif n.size > 0
- parsed << n
- end
- rest
- end
-
- #| LocationPath
- #| FilterExpr ('/' | '//') RelativeLocationPath
- def PathExpr path, parsed
- path = path.lstrip
- n = []
- rest = FilterExpr( path, n )
- if rest != path
- if rest and rest[0] == ?/
- rest = RelativeLocationPath(rest, n)
- parsed.concat(n)
- return rest
- end
- end
- rest = LocationPath(rest, n) if rest =~ /\A[\/\.\@\[\w*]/
- parsed.concat(n)
- return rest
- end
-
- #| FilterExpr Predicate
- #| PrimaryExpr
- def FilterExpr path, parsed
- n = []
- path = PrimaryExpr( path, n )
- path = Predicate(path, n)
- parsed.concat(n)
- path
- end
-
- #| VARIABLE_REFERENCE
- #| '(' expr ')'
- #| LITERAL
- #| NUMBER
- #| FunctionCall
- VARIABLE_REFERENCE = /^\$(#{NAME_STR})/u
- NUMBER = /^(\d*\.?\d+)/
- NT = /^comment|text|processing-instruction|node$/
- def PrimaryExpr path, parsed
- case path
- when VARIABLE_REFERENCE
- varname = $1
- path = $'
- parsed << :variable
- parsed << varname
- #arry << @variables[ varname ]
- when /^(\w[-\w]*)(?:\()/
- fname = $1
- tmp = $'
- return path if fname =~ NT
- path = tmp
- parsed << :function
- parsed << fname
- path = FunctionCall(path, parsed)
- when NUMBER
- varname = $1.nil? ? $2 : $1
- path = $'
- parsed << :literal
- parsed << (varname.include?('.') ? varname.to_f : varname.to_i)
- when LITERAL
- varname = $1.nil? ? $2 : $1
- path = $'
- parsed << :literal
- parsed << varname
- when /^\(/ #/
- path, contents = get_group(path)
- contents = contents[1..-2]
- n = []
- OrExpr( contents, n )
- parsed.concat(n)
- end
- path
- end
-
- #| FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')'
- def FunctionCall rest, parsed
- path, arguments = parse_args(rest)
- argset = []
- for argument in arguments
- args = []
- OrExpr( argument, args )
- argset << args
- end
- parsed << argset
- path
- end
-
- # get_group( '[foo]bar' ) -> ['bar', '[foo]']
- def get_group string
- ind = 0
- depth = 0
- st = string[0,1]
- en = (st == "(" ? ")" : "]")
- begin
- case string[ind,1]
- when st
- depth += 1
- when en
- depth -= 1
- end
- ind += 1
- end while depth > 0 and ind < string.length
- return nil unless depth==0
- [string[ind..-1], string[0..ind-1]]
- end
-
- def parse_args( string )
- arguments = []
- ind = 0
- inquot = false
- inapos = false
- depth = 1
- begin
- case string[ind]
- when ?"
- inquot = !inquot unless inapos
- when ?'
- inapos = !inapos unless inquot
- else
- unless inquot or inapos
- case string[ind]
- when ?(
- depth += 1
- if depth == 1
- string = string[1..-1]
- ind -= 1
- end
- when ?)
- depth -= 1
- if depth == 0
- s = string[0,ind].strip
- arguments << s unless s == ""
- string = string[ind+1..-1]
- end
- when ?,
- if depth == 1
- s = string[0,ind].strip
- arguments << s unless s == ""
- string = string[ind+1..-1]
- ind = -1
- end
- end
- end
- end
- ind += 1
- end while depth > 0 and ind < string.length
- return nil unless depth==0
- [string,arguments]
- end
- end
- end
-end
diff --git a/lib/rexml/quickpath.rb b/lib/rexml/quickpath.rb
deleted file mode 100644
index a0466b25d9..0000000000
--- a/lib/rexml/quickpath.rb
+++ /dev/null
@@ -1,266 +0,0 @@
-# frozen_string_literal: false
-require_relative 'functions'
-require_relative 'xmltokens'
-
-module REXML
- class QuickPath
- include Functions
- include XMLTokens
-
- # A base Hash object to be used when initializing a
- # default empty namespaces set.
- EMPTY_HASH = {}
-
- def QuickPath::first element, path, namespaces=EMPTY_HASH
- match(element, path, namespaces)[0]
- end
-
- def QuickPath::each element, path, namespaces=EMPTY_HASH, &block
- path = "*" unless path
- match(element, path, namespaces).each( &block )
- end
-
- def QuickPath::match element, path, namespaces=EMPTY_HASH
- raise "nil is not a valid xpath" unless path
- results = nil
- Functions::namespace_context = namespaces
- case path
- when /^\/([^\/]|$)/u
- # match on root
- path = path[1..-1]
- return [element.root.parent] if path == ''
- results = filter([element.root], path)
- when /^[-\w]*::/u
- results = filter([element], path)
- when /^\*/u
- results = filter(element.to_a, path)
- when /^[\[!\w:]/u
- # match on child
- children = element.to_a
- results = filter(children, path)
- else
- results = filter([element], path)
- end
- return results
- end
-
- # Given an array of nodes it filters the array based on the path. The
- # result is that when this method returns, the array will contain elements
- # which match the path
- def QuickPath::filter elements, path
- return elements if path.nil? or path == '' or elements.size == 0
- case path
- when /^\/\//u # Descendant
- return axe( elements, "descendant-or-self", $' )
- when /^\/?\b(\w[-\w]*)\b::/u # Axe
- return axe( elements, $1, $' )
- when /^\/(?=\b([:!\w][-\.\w]*:)?[-!\*\.\w]*\b([^:(]|$)|\*)/u # Child
- rest = $'
- results = []
- elements.each do |element|
- results |= filter( element.to_a, rest )
- end
- return results
- when /^\/?(\w[-\w]*)\(/u # / Function
- return function( elements, $1, $' )
- when Namespace::NAMESPLIT # Element name
- name = $2
- ns = $1
- rest = $'
- elements.delete_if do |element|
- !(element.kind_of? Element and
- (element.expanded_name == name or
- (element.name == name and
- element.namespace == Functions.namespace_context[ns])))
- end
- return filter( elements, rest )
- when /^\/\[/u
- matches = []
- elements.each do |element|
- matches |= predicate( element.to_a, path[1..-1] ) if element.kind_of? Element
- end
- return matches
- when /^\[/u # Predicate
- return predicate( elements, path )
- when /^\/?\.\.\./u # Ancestor
- return axe( elements, "ancestor", $' )
- when /^\/?\.\./u # Parent
- return filter( elements.collect{|e|e.parent}, $' )
- when /^\/?\./u # Self
- return filter( elements, $' )
- when /^\*/u # Any
- results = []
- elements.each do |element|
- results |= filter( [element], $' ) if element.kind_of? Element
- #if element.kind_of? Element
- # children = element.to_a
- # children.delete_if { |child| !child.kind_of?(Element) }
- # results |= filter( children, $' )
- #end
- end
- return results
- end
- return []
- end
-
- def QuickPath::axe( elements, axe_name, rest )
- matches = []
- matches = filter( elements.dup, rest ) if axe_name =~ /-or-self$/u
- case axe_name
- when /^descendant/u
- elements.each do |element|
- matches |= filter( element.to_a, "descendant-or-self::#{rest}" ) if element.kind_of? Element
- end
- when /^ancestor/u
- elements.each do |element|
- while element.parent
- matches << element.parent
- element = element.parent
- end
- end
- matches = filter( matches, rest )
- when "self"
- matches = filter( elements, rest )
- when "child"
- elements.each do |element|
- matches |= filter( element.to_a, rest ) if element.kind_of? Element
- end
- when "attribute"
- elements.each do |element|
- matches << element.attributes[ rest ] if element.kind_of? Element
- end
- when "parent"
- matches = filter(elements.collect{|element| element.parent}.uniq, rest)
- when "following-sibling"
- matches = filter(elements.collect{|element| element.next_sibling}.uniq,
- rest)
- when "previous-sibling"
- matches = filter(elements.collect{|element|
- element.previous_sibling}.uniq, rest )
- end
- return matches.uniq
- end
-
- OPERAND_ = '((?=(?:(?!and|or).)*[^\s<>=])[^\s<>=]+)'
- # A predicate filters a node-set with respect to an axis to produce a
- # new node-set. For each node in the node-set to be filtered, the
- # PredicateExpr is evaluated with that node as the context node, with
- # the number of nodes in the node-set as the context size, and with the
- # proximity position of the node in the node-set with respect to the
- # axis as the context position; if PredicateExpr evaluates to true for
- # that node, the node is included in the new node-set; otherwise, it is
- # not included.
- #
- # A PredicateExpr is evaluated by evaluating the Expr and converting
- # the result to a boolean. If the result is a number, the result will
- # be converted to true if the number is equal to the context position
- # and will be converted to false otherwise; if the result is not a
- # number, then the result will be converted as if by a call to the
- # boolean function. Thus a location path para[3] is equivalent to
- # para[position()=3].
- def QuickPath::predicate( elements, path )
- ind = 1
- bcount = 1
- while bcount > 0
- bcount += 1 if path[ind] == ?[
- bcount -= 1 if path[ind] == ?]
- ind += 1
- end
- ind -= 1
- predicate = path[1..ind-1]
- rest = path[ind+1..-1]
-
- # have to change 'a [=<>] b [=<>] c' into 'a [=<>] b and b [=<>] c'
- #
- predicate.gsub!(
- /#{OPERAND_}\s*([<>=])\s*#{OPERAND_}\s*([<>=])\s*#{OPERAND_}/u,
- '\1 \2 \3 and \3 \4 \5' )
- # Let's do some Ruby trickery to avoid some work:
- predicate.gsub!( /&/u, "&&" )
- predicate.gsub!( /=/u, "==" )
- predicate.gsub!( /@(\w[-\w.]*)/u, 'attribute("\1")' )
- predicate.gsub!( /\bmod\b/u, "%" )
- predicate.gsub!( /\b(\w[-\w.]*\()/u ) {
- fname = $1
- fname.gsub( /-/u, "_" )
- }
-
- Functions.pair = [ 0, elements.size ]
- results = []
- elements.each do |element|
- Functions.pair[0] += 1
- Functions.node = element
- res = eval( predicate )
- case res
- when true
- results << element
- when Integer
- results << element if Functions.pair[0] == res
- when String
- results << element
- end
- end
- return filter( results, rest )
- end
-
- def QuickPath::attribute( name )
- return Functions.node.attributes[name] if Functions.node.kind_of? Element
- end
-
- def QuickPath::name()
- return Functions.node.name if Functions.node.kind_of? Element
- end
-
- def QuickPath::method_missing( id, *args )
- begin
- Functions.send( id.id2name, *args )
- rescue Exception
- raise "METHOD: #{id.id2name}(#{args.join ', '})\n#{$!.message}"
- end
- end
-
- def QuickPath::function( elements, fname, rest )
- args = parse_args( elements, rest )
- Functions.pair = [0, elements.size]
- results = []
- elements.each do |element|
- Functions.pair[0] += 1
- Functions.node = element
- res = Functions.send( fname, *args )
- case res
- when true
- results << element
- when Integer
- results << element if Functions.pair[0] == res
- end
- end
- return results
- end
-
- def QuickPath::parse_args( element, string )
- # /.*?(?:\)|,)/
- arguments = []
- buffer = ""
- while string and string != ""
- c = string[0]
- string.sub!(/^./u, "")
- case c
- when ?,
- # if depth = 1, then we start a new argument
- arguments << evaluate( buffer )
- #arguments << evaluate( string[0..count] )
- when ?(
- # start a new method call
- function( element, buffer, string )
- buffer = ""
- when ?)
- # close the method call and return arguments
- return arguments
- else
- buffer << c
- end
- end
- ""
- end
- end
-end
diff --git a/lib/rexml/rexml.gemspec b/lib/rexml/rexml.gemspec
deleted file mode 100644
index 263f013aae..0000000000
--- a/lib/rexml/rexml.gemspec
+++ /dev/null
@@ -1,84 +0,0 @@
-begin
- require_relative "lib/rexml/rexml"
-rescue LoadError
- # for Ruby core repository
- require_relative "rexml"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "rexml"
- spec.version = REXML::VERSION
- spec.authors = ["Kouhei Sutou"]
- spec.email = ["kou@cozmixng.org"]
-
- spec.summary = %q{An XML toolkit for Ruby}
- spec.description = %q{An XML toolkit for Ruby}
- spec.homepage = "https://github.com/ruby/rexml"
- spec.license = "BSD-2-Clause"
-
- spec.files = [
- ".gitignore",
- ".travis.yml",
- "Gemfile",
- "LICENSE.txt",
- "NEWS.md",
- "README.md",
- "Rakefile",
- "lib/rexml/attlistdecl.rb",
- "lib/rexml/attribute.rb",
- "lib/rexml/cdata.rb",
- "lib/rexml/child.rb",
- "lib/rexml/comment.rb",
- "lib/rexml/doctype.rb",
- "lib/rexml/document.rb",
- "lib/rexml/dtd/attlistdecl.rb",
- "lib/rexml/dtd/dtd.rb",
- "lib/rexml/dtd/elementdecl.rb",
- "lib/rexml/dtd/entitydecl.rb",
- "lib/rexml/dtd/notationdecl.rb",
- "lib/rexml/element.rb",
- "lib/rexml/encoding.rb",
- "lib/rexml/entity.rb",
- "lib/rexml/formatters/default.rb",
- "lib/rexml/formatters/pretty.rb",
- "lib/rexml/formatters/transitive.rb",
- "lib/rexml/functions.rb",
- "lib/rexml/instruction.rb",
- "lib/rexml/light/node.rb",
- "lib/rexml/namespace.rb",
- "lib/rexml/node.rb",
- "lib/rexml/output.rb",
- "lib/rexml/parent.rb",
- "lib/rexml/parseexception.rb",
- "lib/rexml/parsers/baseparser.rb",
- "lib/rexml/parsers/lightparser.rb",
- "lib/rexml/parsers/pullparser.rb",
- "lib/rexml/parsers/sax2parser.rb",
- "lib/rexml/parsers/streamparser.rb",
- "lib/rexml/parsers/treeparser.rb",
- "lib/rexml/parsers/ultralightparser.rb",
- "lib/rexml/parsers/xpathparser.rb",
- "lib/rexml/quickpath.rb",
- "lib/rexml/rexml.rb",
- "lib/rexml/sax2listener.rb",
- "lib/rexml/security.rb",
- "lib/rexml/source.rb",
- "lib/rexml/streamlistener.rb",
- "lib/rexml/text.rb",
- "lib/rexml/undefinednamespaceexception.rb",
- "lib/rexml/validation/relaxng.rb",
- "lib/rexml/validation/validation.rb",
- "lib/rexml/validation/validationexception.rb",
- "lib/rexml/xmldecl.rb",
- "lib/rexml/xmltokens.rb",
- "lib/rexml/xpath.rb",
- "lib/rexml/xpath_parser.rb",
- "rexml.gemspec",
- ]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
-end
diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb
deleted file mode 100644
index 944d88a869..0000000000
--- a/lib/rexml/rexml.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-# REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby.
-#
-# REXML is a _pure_ Ruby, XML 1.0 conforming,
-# non-validating[http://www.w3.org/TR/2004/REC-xml-20040204/#sec-conformance]
-# toolkit with an intuitive API. REXML passes 100% of the non-validating Oasis
-# tests[http://www.oasis-open.org/committees/xml-conformance/xml-test-suite.shtml],
-# and provides tree, stream, SAX2, pull, and lightweight APIs. REXML also
-# includes a full XPath[http://www.w3c.org/tr/xpath] 1.0 implementation. Since
-# Ruby 1.8, REXML is included in the standard Ruby distribution.
-#
-# Main page:: http://www.germane-software.com/software/rexml
-# Author:: Sean Russell <serATgermaneHYPHENsoftwareDOTcom>
-# Date:: 2008/019
-# Version:: 3.1.7.3
-#
-# This API documentation can be downloaded from the REXML home page, or can
-# be accessed online[http://www.germane-software.com/software/rexml_doc]
-#
-# A tutorial is available in the REXML distribution in docs/tutorial.html,
-# or can be accessed
-# online[http://www.germane-software.com/software/rexml/docs/tutorial.html]
-module REXML
- COPYRIGHT = "Copyright © 2001-2008 Sean Russell <ser@germane-software.com>"
- DATE = "2008/019"
- VERSION = "3.2.3"
- REVISION = ""
-
- Copyright = COPYRIGHT
- Version = VERSION
-end
diff --git a/lib/rexml/sax2listener.rb b/lib/rexml/sax2listener.rb
deleted file mode 100644
index 5afdc80890..0000000000
--- a/lib/rexml/sax2listener.rb
+++ /dev/null
@@ -1,98 +0,0 @@
-# frozen_string_literal: false
-module REXML
- # A template for stream parser listeners.
- # Note that the declarations (attlistdecl, elementdecl, etc) are trivially
- # processed; REXML doesn't yet handle doctype entity declarations, so you
- # have to parse them out yourself.
- # === Missing methods from SAX2
- # ignorable_whitespace
- # === Methods extending SAX2
- # +WARNING+
- # These methods are certainly going to change, until DTDs are fully
- # supported. Be aware of this.
- # start_document
- # end_document
- # doctype
- # elementdecl
- # attlistdecl
- # entitydecl
- # notationdecl
- # cdata
- # xmldecl
- # comment
- module SAX2Listener
- def start_document
- end
- def end_document
- end
- def start_prefix_mapping prefix, uri
- end
- def end_prefix_mapping prefix
- end
- def start_element uri, localname, qname, attributes
- end
- def end_element uri, localname, qname
- end
- def characters text
- end
- def processing_instruction target, data
- end
- # Handles a doctype declaration. Any attributes of the doctype which are
- # not supplied will be nil. # EG, <!DOCTYPE me PUBLIC "foo" "bar">
- # @p name the name of the doctype; EG, "me"
- # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC"
- # @p long_name the supplied long name, or nil. EG, "foo"
- # @p uri the uri of the doctype, or nil. EG, "bar"
- def doctype name, pub_sys, long_name, uri
- end
- # If a doctype includes an ATTLIST declaration, it will cause this
- # method to be called. The content is the declaration itself, unparsed.
- # EG, <!ATTLIST el attr CDATA #REQUIRED> will come to this method as "el
- # attr CDATA #REQUIRED". This is the same for all of the .*decl
- # methods.
- def attlistdecl(element, pairs, contents)
- end
- # <!ELEMENT ...>
- def elementdecl content
- end
- # <!ENTITY ...>
- # The argument passed to this method is an array of the entity
- # declaration. It can be in a number of formats, but in general it
- # returns (example, result):
- # <!ENTITY % YN '"Yes"'>
- # ["%", "YN", "\"Yes\""]
- # <!ENTITY % YN 'Yes'>
- # ["%", "YN", "Yes"]
- # <!ENTITY WhatHeSaid "He said %YN;">
- # ["WhatHeSaid", "He said %YN;"]
- # <!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
- # ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
- # <!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
- # ["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate//EN", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
- # <!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
- # ["hatch-pic", "SYSTEM", "../grafix/OpenHatch.gif", "NDATA", "gif"]
- def entitydecl declaration
- end
- # <!NOTATION ...>
- def notationdecl name, public_or_system, public_id, system_id
- end
- # Called when <![CDATA[ ... ]]> is encountered in a document.
- # @p content "..."
- def cdata content
- end
- # Called when an XML PI is encountered in the document.
- # EG: <?xml version="1.0" encoding="utf"?>
- # @p version the version attribute value. EG, "1.0"
- # @p encoding the encoding attribute value, or nil. EG, "utf"
- # @p standalone the standalone attribute value, or nil. EG, nil
- # @p spaced the declaration is followed by a line break
- def xmldecl version, encoding, standalone
- end
- # Called when a comment is encountered.
- # @p comment The content of the comment
- def comment comment
- end
- def progress position
- end
- end
-end
diff --git a/lib/rexml/security.rb b/lib/rexml/security.rb
deleted file mode 100644
index 99b7460772..0000000000
--- a/lib/rexml/security.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: false
-module REXML
- module Security
- @@entity_expansion_limit = 10_000
-
- # Set the entity expansion limit. By default the limit is set to 10000.
- def self.entity_expansion_limit=( val )
- @@entity_expansion_limit = val
- end
-
- # Get the entity expansion limit. By default the limit is set to 10000.
- def self.entity_expansion_limit
- return @@entity_expansion_limit
- end
-
- @@entity_expansion_text_limit = 10_240
-
- # Set the entity expansion limit. By default the limit is set to 10240.
- def self.entity_expansion_text_limit=( val )
- @@entity_expansion_text_limit = val
- end
-
- # Get the entity expansion limit. By default the limit is set to 10240.
- def self.entity_expansion_text_limit
- return @@entity_expansion_text_limit
- end
- end
-end
diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb
deleted file mode 100644
index 90b370b989..0000000000
--- a/lib/rexml/source.rb
+++ /dev/null
@@ -1,298 +0,0 @@
-# coding: US-ASCII
-# frozen_string_literal: false
-require_relative 'encoding'
-
-module REXML
- # Generates Source-s. USE THIS CLASS.
- class SourceFactory
- # Generates a Source object
- # @param arg Either a String, or an IO
- # @return a Source, or nil if a bad argument was given
- def SourceFactory::create_from(arg)
- if arg.respond_to? :read and
- arg.respond_to? :readline and
- arg.respond_to? :nil? and
- arg.respond_to? :eof?
- IOSource.new(arg)
- elsif arg.respond_to? :to_str
- require 'stringio'
- IOSource.new(StringIO.new(arg))
- elsif arg.kind_of? Source
- arg
- else
- raise "#{arg.class} is not a valid input stream. It must walk \n"+
- "like either a String, an IO, or a Source."
- end
- end
- end
-
- # A Source can be searched for patterns, and wraps buffers and other
- # objects and provides consumption of text
- class Source
- include Encoding
- # The current buffer (what we're going to read next)
- attr_reader :buffer
- # The line number of the last consumed text
- attr_reader :line
- attr_reader :encoding
-
- # Constructor
- # @param arg must be a String, and should be a valid XML document
- # @param encoding if non-null, sets the encoding of the source to this
- # value, overriding all encoding detection
- def initialize(arg, encoding=nil)
- @orig = @buffer = arg
- if encoding
- self.encoding = encoding
- else
- detect_encoding
- end
- @line = 0
- end
-
-
- # Inherited from Encoding
- # Overridden to support optimized en/decoding
- def encoding=(enc)
- return unless super
- encoding_updated
- end
-
- # Scans the source for a given pattern. Note, that this is not your
- # usual scan() method. For one thing, the pattern argument has some
- # requirements; for another, the source can be consumed. You can easily
- # confuse this method. Originally, the patterns were easier
- # to construct and this method more robust, because this method
- # generated search regexps on the fly; however, this was
- # computationally expensive and slowed down the entire REXML package
- # considerably, since this is by far the most commonly called method.
- # @param pattern must be a Regexp, and must be in the form of
- # /^\s*(#{your pattern, with no groups})(.*)/. The first group
- # will be returned; the second group is used if the consume flag is
- # set.
- # @param consume if true, the pattern returned will be consumed, leaving
- # everything after it in the Source.
- # @return the pattern, if found, or nil if the Source is empty or the
- # pattern is not found.
- def scan(pattern, cons=false)
- return nil if @buffer.nil?
- rv = @buffer.scan(pattern)
- @buffer = $' if cons and rv.size>0
- rv
- end
-
- def read
- end
-
- def consume( pattern )
- @buffer = $' if pattern.match( @buffer )
- end
-
- def match_to( char, pattern )
- return pattern.match(@buffer)
- end
-
- def match_to_consume( char, pattern )
- md = pattern.match(@buffer)
- @buffer = $'
- return md
- end
-
- def match(pattern, cons=false)
- md = pattern.match(@buffer)
- @buffer = $' if cons and md
- return md
- end
-
- # @return true if the Source is exhausted
- def empty?
- @buffer == ""
- end
-
- def position
- @orig.index( @buffer )
- end
-
- # @return the current line in the source
- def current_line
- lines = @orig.split
- res = lines.grep @buffer[0..30]
- res = res[-1] if res.kind_of? Array
- lines.index( res ) if res
- end
-
- private
- def detect_encoding
- buffer_encoding = @buffer.encoding
- detected_encoding = "UTF-8"
- begin
- @buffer.force_encoding("ASCII-8BIT")
- if @buffer[0, 2] == "\xfe\xff"
- @buffer[0, 2] = ""
- detected_encoding = "UTF-16BE"
- elsif @buffer[0, 2] == "\xff\xfe"
- @buffer[0, 2] = ""
- detected_encoding = "UTF-16LE"
- elsif @buffer[0, 3] == "\xef\xbb\xbf"
- @buffer[0, 3] = ""
- detected_encoding = "UTF-8"
- end
- ensure
- @buffer.force_encoding(buffer_encoding)
- end
- self.encoding = detected_encoding
- end
-
- def encoding_updated
- if @encoding != 'UTF-8'
- @buffer = decode(@buffer)
- @to_utf = true
- else
- @to_utf = false
- @buffer.force_encoding ::Encoding::UTF_8
- end
- end
- end
-
- # A Source that wraps an IO. See the Source class for method
- # documentation
- class IOSource < Source
- #attr_reader :block_size
-
- # block_size has been deprecated
- def initialize(arg, block_size=500, encoding=nil)
- @er_source = @source = arg
- @to_utf = false
- @pending_buffer = nil
-
- if encoding
- super("", encoding)
- else
- super(@source.read(3) || "")
- end
-
- if !@to_utf and
- @buffer.respond_to?(:force_encoding) and
- @source.respond_to?(:external_encoding) and
- @source.external_encoding != ::Encoding::UTF_8
- @force_utf8 = true
- else
- @force_utf8 = false
- end
- end
-
- def scan(pattern, cons=false)
- rv = super
- # You'll notice that this next section is very similar to the same
- # section in match(), but just a liiittle different. This is
- # because it is a touch faster to do it this way with scan()
- # than the way match() does it; enough faster to warrant duplicating
- # some code
- if rv.size == 0
- until @buffer =~ pattern or @source.nil?
- begin
- @buffer << readline
- rescue Iconv::IllegalSequence
- raise
- rescue
- @source = nil
- end
- end
- rv = super
- end
- rv.taint if RUBY_VERSION < '2.7'
- rv
- end
-
- def read
- begin
- @buffer << readline
- rescue Exception, NameError
- @source = nil
- end
- end
-
- def consume( pattern )
- match( pattern, true )
- end
-
- def match( pattern, cons=false )
- rv = pattern.match(@buffer)
- @buffer = $' if cons and rv
- while !rv and @source
- begin
- @buffer << readline
- rv = pattern.match(@buffer)
- @buffer = $' if cons and rv
- rescue
- @source = nil
- end
- end
- rv.taint if RUBY_VERSION < '2.7'
- rv
- end
-
- def empty?
- super and ( @source.nil? || @source.eof? )
- end
-
- def position
- @er_source.pos rescue 0
- end
-
- # @return the current line in the source
- def current_line
- begin
- pos = @er_source.pos # The byte position in the source
- lineno = @er_source.lineno # The XML < position in the source
- @er_source.rewind
- line = 0 # The \r\n position in the source
- begin
- while @er_source.pos < pos
- @er_source.readline
- line += 1
- end
- rescue
- end
- @er_source.seek(pos)
- rescue IOError
- pos = -1
- line = -1
- end
- [pos, lineno, line]
- end
-
- private
- def readline
- str = @source.readline(@line_break)
- if @pending_buffer
- if str.nil?
- str = @pending_buffer
- else
- str = @pending_buffer + str
- end
- @pending_buffer = nil
- end
- return nil if str.nil?
-
- if @to_utf
- decode(str)
- else
- str.force_encoding(::Encoding::UTF_8) if @force_utf8
- str
- end
- end
-
- def encoding_updated
- case @encoding
- when "UTF-16BE", "UTF-16LE"
- @source.binmode
- @source.set_encoding(@encoding, @encoding)
- end
- @line_break = encode(">")
- @pending_buffer, @buffer = @buffer, ""
- @pending_buffer.force_encoding(@encoding)
- super
- end
- end
-end
diff --git a/lib/rexml/streamlistener.rb b/lib/rexml/streamlistener.rb
deleted file mode 100644
index 30c8945179..0000000000
--- a/lib/rexml/streamlistener.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# frozen_string_literal: false
-module REXML
- # A template for stream parser listeners.
- # Note that the declarations (attlistdecl, elementdecl, etc) are trivially
- # processed; REXML doesn't yet handle doctype entity declarations, so you
- # have to parse them out yourself.
- module StreamListener
- # Called when a tag is encountered.
- # @p name the tag name
- # @p attrs an array of arrays of attribute/value pairs, suitable for
- # use with assoc or rassoc. IE, <tag attr1="value1" attr2="value2">
- # will result in
- # tag_start( "tag", # [["attr1","value1"],["attr2","value2"]])
- def tag_start name, attrs
- end
- # Called when the end tag is reached. In the case of <tag/>, tag_end
- # will be called immediately after tag_start
- # @p the name of the tag
- def tag_end name
- end
- # Called when text is encountered in the document
- # @p text the text content.
- def text text
- end
- # Called when an instruction is encountered. EG: <?xsl sheet='foo'?>
- # @p name the instruction name; in the example, "xsl"
- # @p instruction the rest of the instruction. In the example,
- # "sheet='foo'"
- def instruction name, instruction
- end
- # Called when a comment is encountered.
- # @p comment The content of the comment
- def comment comment
- end
- # Handles a doctype declaration. Any attributes of the doctype which are
- # not supplied will be nil. # EG, <!DOCTYPE me PUBLIC "foo" "bar">
- # @p name the name of the doctype; EG, "me"
- # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC"
- # @p long_name the supplied long name, or nil. EG, "foo"
- # @p uri the uri of the doctype, or nil. EG, "bar"
- def doctype name, pub_sys, long_name, uri
- end
- # Called when the doctype is done
- def doctype_end
- end
- # If a doctype includes an ATTLIST declaration, it will cause this
- # method to be called. The content is the declaration itself, unparsed.
- # EG, <!ATTLIST el attr CDATA #REQUIRED> will come to this method as "el
- # attr CDATA #REQUIRED". This is the same for all of the .*decl
- # methods.
- def attlistdecl element_name, attributes, raw_content
- end
- # <!ELEMENT ...>
- def elementdecl content
- end
- # <!ENTITY ...>
- # The argument passed to this method is an array of the entity
- # declaration. It can be in a number of formats, but in general it
- # returns (example, result):
- # <!ENTITY % YN '"Yes"'>
- # ["YN", "\"Yes\"", "%"]
- # <!ENTITY % YN 'Yes'>
- # ["YN", "Yes", "%"]
- # <!ENTITY WhatHeSaid "He said %YN;">
- # ["WhatHeSaid", "He said %YN;"]
- # <!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
- # ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
- # <!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
- # ["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate//EN", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
- # <!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
- # ["hatch-pic", "SYSTEM", "../grafix/OpenHatch.gif", "gif"]
- def entitydecl content
- end
- # <!NOTATION ...>
- def notationdecl content
- end
- # Called when %foo; is encountered in a doctype declaration.
- # @p content "foo"
- def entity content
- end
- # Called when <![CDATA[ ... ]]> is encountered in a document.
- # @p content "..."
- def cdata content
- end
- # Called when an XML PI is encountered in the document.
- # EG: <?xml version="1.0" encoding="utf"?>
- # @p version the version attribute value. EG, "1.0"
- # @p encoding the encoding attribute value, or nil. EG, "utf"
- # @p standalone the standalone attribute value, or nil. EG, nil
- def xmldecl version, encoding, standalone
- end
- end
-end
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
deleted file mode 100644
index 050b09c97e..0000000000
--- a/lib/rexml/text.rb
+++ /dev/null
@@ -1,424 +0,0 @@
-# frozen_string_literal: false
-require_relative 'security'
-require_relative 'entity'
-require_relative 'doctype'
-require_relative 'child'
-require_relative 'doctype'
-require_relative 'parseexception'
-
-module REXML
- # Represents text nodes in an XML document
- class Text < Child
- include Comparable
- # The order in which the substitutions occur
- SPECIALS = [ /&(?!#?[\w-]+;)/u, /</u, />/u, /"/u, /'/u, /\r/u ]
- SUBSTITUTES = ['&amp;', '&lt;', '&gt;', '&quot;', '&apos;', '&#13;']
- # Characters which are substituted in written strings
- SLAICEPS = [ '<', '>', '"', "'", '&' ]
- SETUTITSBUS = [ /&lt;/u, /&gt;/u, /&quot;/u, /&apos;/u, /&amp;/u ]
-
- # If +raw+ is true, then REXML leaves the value alone
- attr_accessor :raw
-
- NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
- NUMERICENTITY = /&#0*((?:\d+)|(?:x[a-fA-F0-9]+));/
- VALID_CHAR = [
- 0x9, 0xA, 0xD,
- (0x20..0xD7FF),
- (0xE000..0xFFFD),
- (0x10000..0x10FFFF)
- ]
-
- if String.method_defined? :encode
- VALID_XML_CHARS = Regexp.new('^['+
- VALID_CHAR.map { |item|
- case item
- when Integer
- [item].pack('U').force_encoding('utf-8')
- when Range
- [item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8')
- end
- }.join +
- ']*$')
- else
- VALID_XML_CHARS = /^(
- [\x09\x0A\x0D\x20-\x7E] # ASCII
- | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
- | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
- | [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte
- | \xEF[\x80-\xBE]{2} #
- | \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff
- | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
- | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
- | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
- | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
- )*$/nx;
- end
-
- # Constructor
- # +arg+ if a String, the content is set to the String. If a Text,
- # the object is shallowly cloned.
- #
- # +respect_whitespace+ (boolean, false) if true, whitespace is
- # respected
- #
- # +parent+ (nil) if this is a Parent object, the parent
- # will be set to this.
- #
- # +raw+ (nil) This argument can be given three values.
- # If true, then the value of used to construct this object is expected to
- # contain no unescaped XML markup, and REXML will not change the text. If
- # this value is false, the string may contain any characters, and REXML will
- # escape any and all defined entities whose values are contained in the
- # text. If this value is nil (the default), then the raw value of the
- # parent will be used as the raw value for this node. If there is no raw
- # value for the parent, and no value is supplied, the default is false.
- # Use this field if you have entities defined for some text, and you don't
- # want REXML to escape that text in output.
- # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;"
- # Text.new( "&lt;&amp;", false, nil, false ) #-> "&amp;lt;&amp;amp;"
- # Text.new( "<&", false, nil, true ) #-> Parse exception
- # Text.new( "&lt;&amp;", false, nil, true ) #-> "&lt;&amp;"
- # # Assume that the entity "s" is defined to be "sean"
- # # and that the entity "r" is defined to be "russell"
- # Text.new( "sean russell" ) #-> "&s; &r;"
- # Text.new( "sean russell", false, nil, true ) #-> "sean russell"
- #
- # +entity_filter+ (nil) This can be an array of entities to match in the
- # supplied text. This argument is only useful if +raw+ is set to false.
- # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell"
- # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell"
- # In the last example, the +entity_filter+ argument is ignored.
- #
- # +illegal+ INTERNAL USE ONLY
- def initialize(arg, respect_whitespace=false, parent=nil, raw=nil,
- entity_filter=nil, illegal=NEEDS_A_SECOND_CHECK )
-
- @raw = false
- @parent = nil
- @entity_filter = nil
-
- if parent
- super( parent )
- @raw = parent.raw
- end
-
- if arg.kind_of? String
- @string = arg.dup
- elsif arg.kind_of? Text
- @string = arg.instance_variable_get(:@string).dup
- @raw = arg.raw
- @entity_filter = arg.instance_variable_get(:@entity_filter)
- else
- raise "Illegal argument of type #{arg.type} for Text constructor (#{arg})"
- end
-
- @string.squeeze!(" \n\t") unless respect_whitespace
- @string.gsub!(/\r\n?/, "\n")
- @raw = raw unless raw.nil?
- @entity_filter = entity_filter if entity_filter
- clear_cache
-
- Text.check(@string, illegal, doctype) if @raw
- end
-
- def parent= parent
- super(parent)
- Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent
- end
-
- # check for illegal characters
- def Text.check string, pattern, doctype
-
- # illegal anywhere
- if string !~ VALID_XML_CHARS
- if String.method_defined? :encode
- string.chars.each do |c|
- case c.ord
- when *VALID_CHAR
- else
- raise "Illegal character #{c.inspect} in raw string #{string.inspect}"
- end
- end
- else
- string.scan(/[\x00-\x7F]|[\x80-\xBF][\xC0-\xF0]*|[\xC0-\xF0]/n) do |c|
- case c.unpack('U')
- when *VALID_CHAR
- else
- raise "Illegal character #{c.inspect} in raw string #{string.inspect}"
- end
- end
- end
- end
-
- # context sensitive
- string.scan(pattern) do
- if $1[-1] != ?;
- raise "Illegal character #{$1.inspect} in raw string #{string.inspect}"
- elsif $1[0] == ?&
- if $5 and $5[0] == ?#
- case ($5[1] == ?x ? $5[2..-1].to_i(16) : $5[1..-1].to_i)
- when *VALID_CHAR
- else
- raise "Illegal character #{$1.inspect} in raw string #{string.inspect}"
- end
- # FIXME: below can't work but this needs API change.
- # elsif @parent and $3 and !SUBSTITUTES.include?($1)
- # if !doctype or !doctype.entities.has_key?($3)
- # raise "Undeclared entity '#{$1}' in raw string \"#{string}\""
- # end
- end
- end
- end
- end
-
- def node_type
- :text
- end
-
- def empty?
- @string.size==0
- end
-
-
- def clone
- return Text.new(self, true)
- end
-
-
- # Appends text to this text node. The text is appended in the +raw+ mode
- # of this text node.
- #
- # +returns+ the text itself to enable method chain like
- # 'text << "XXX" << "YYY"'.
- def <<( to_append )
- @string << to_append.gsub( /\r\n?/, "\n" )
- clear_cache
- self
- end
-
-
- # +other+ a String or a Text
- # +returns+ the result of (to_s <=> arg.to_s)
- def <=>( other )
- to_s() <=> other.to_s
- end
-
- def doctype
- if @parent
- doc = @parent.document
- doc.doctype if doc
- end
- end
-
- REFERENCE = /#{Entity::REFERENCE}/
- # Returns the string value of this text node. This string is always
- # escaped, meaning that it is a valid XML text node string, and all
- # entities that can be escaped, have been inserted. This method respects
- # the entity filter set in the constructor.
- #
- # # Assume that the entity "s" is defined to be "sean", and that the
- # # entity "r" is defined to be "russell"
- # t = Text.new( "< & sean russell", false, nil, false, ['s'] )
- # t.to_s #-> "&lt; &amp; &s; russell"
- # t = Text.new( "< & &s; russell", false, nil, false )
- # t.to_s #-> "&lt; &amp; &s; russell"
- # u = Text.new( "sean russell", false, nil, true )
- # u.to_s #-> "sean russell"
- def to_s
- return @string if @raw
- @normalized ||= Text::normalize( @string, doctype, @entity_filter )
- end
-
- def inspect
- @string.inspect
- end
-
- # Returns the string value of this text. This is the text without
- # entities, as it might be used programmatically, or printed to the
- # console. This ignores the 'raw' attribute setting, and any
- # entity_filter.
- #
- # # Assume that the entity "s" is defined to be "sean", and that the
- # # entity "r" is defined to be "russell"
- # t = Text.new( "< & sean russell", false, nil, false, ['s'] )
- # t.value #-> "< & sean russell"
- # t = Text.new( "< & &s; russell", false, nil, false )
- # t.value #-> "< & sean russell"
- # u = Text.new( "sean russell", false, nil, true )
- # u.value #-> "sean russell"
- def value
- @unnormalized ||= Text::unnormalize( @string, doctype )
- end
-
- # Sets the contents of this text node. This expects the text to be
- # unnormalized. It returns self.
- #
- # e = Element.new( "a" )
- # e.add_text( "foo" ) # <a>foo</a>
- # e[0].value = "bar" # <a>bar</a>
- # e[0].value = "<a>" # <a>&lt;a&gt;</a>
- def value=( val )
- @string = val.gsub( /\r\n?/, "\n" )
- clear_cache
- @raw = false
- end
-
- def wrap(string, width, addnewline=false)
- # Recursively wrap string at width.
- return string if string.length <= width
- place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
- if addnewline then
- return "\n" + string[0,place] + "\n" + wrap(string[place+1..-1], width)
- else
- return string[0,place] + "\n" + wrap(string[place+1..-1], width)
- end
- end
-
- def indent_text(string, level=1, style="\t", indentfirstline=true)
- return string if level < 0
- new_string = ''
- string.each_line { |line|
- indent_string = style * level
- new_line = (indent_string + line).sub(/[\s]+$/,'')
- new_string << new_line
- }
- new_string.strip! unless indentfirstline
- return new_string
- end
-
- # == DEPRECATED
- # See REXML::Formatters
- #
- def write( writer, indent=-1, transitive=false, ie_hack=false )
- Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters", uplevel: 1)
- formatter = if indent > -1
- REXML::Formatters::Pretty.new( indent )
- else
- REXML::Formatters::Default.new
- end
- formatter.write( self, writer )
- end
-
- # FIXME
- # This probably won't work properly
- def xpath
- path = @parent.xpath
- path += "/text()"
- return path
- end
-
- # Writes out text, substituting special characters beforehand.
- # +out+ A String, IO, or any other object supporting <<( String )
- # +input+ the text to substitute and the write out
- #
- # z=utf8.unpack("U*")
- # ascOut=""
- # z.each{|r|
- # if r < 0x100
- # ascOut.concat(r.chr)
- # else
- # ascOut.concat(sprintf("&#x%x;", r))
- # end
- # }
- # puts ascOut
- def write_with_substitution out, input
- copy = input.clone
- # Doing it like this rather than in a loop improves the speed
- copy.gsub!( SPECIALS[0], SUBSTITUTES[0] )
- copy.gsub!( SPECIALS[1], SUBSTITUTES[1] )
- copy.gsub!( SPECIALS[2], SUBSTITUTES[2] )
- copy.gsub!( SPECIALS[3], SUBSTITUTES[3] )
- copy.gsub!( SPECIALS[4], SUBSTITUTES[4] )
- copy.gsub!( SPECIALS[5], SUBSTITUTES[5] )
- out << copy
- end
-
- private
- def clear_cache
- @normalized = nil
- @unnormalized = nil
- end
-
- # Reads text, substituting entities
- def Text::read_with_substitution( input, illegal=nil )
- copy = input.clone
-
- if copy =~ illegal
- raise ParseException.new( "malformed text: Illegal character #$& in \"#{copy}\"" )
- end if illegal
-
- copy.gsub!( /\r\n?/, "\n" )
- if copy.include? ?&
- copy.gsub!( SETUTITSBUS[0], SLAICEPS[0] )
- copy.gsub!( SETUTITSBUS[1], SLAICEPS[1] )
- copy.gsub!( SETUTITSBUS[2], SLAICEPS[2] )
- copy.gsub!( SETUTITSBUS[3], SLAICEPS[3] )
- copy.gsub!( SETUTITSBUS[4], SLAICEPS[4] )
- copy.gsub!( /&#0*((?:\d+)|(?:x[a-f0-9]+));/ ) {
- m=$1
- #m='0' if m==''
- m = "0#{m}" if m[0] == ?x
- [Integer(m)].pack('U*')
- }
- end
- copy
- end
-
- EREFERENCE = /&(?!#{Entity::NAME};)/
- # Escapes all possible entities
- def Text::normalize( input, doctype=nil, entity_filter=nil )
- copy = input.to_s
- # Doing it like this rather than in a loop improves the speed
- #copy = copy.gsub( EREFERENCE, '&amp;' )
- copy = copy.gsub( "&", "&amp;" )
- if doctype
- # Replace all ampersands that aren't part of an entity
- doctype.entities.each_value do |entity|
- copy = copy.gsub( entity.value,
- "&#{entity.name};" ) if entity.value and
- not( entity_filter and entity_filter.include?(entity.name) )
- end
- else
- # Replace all ampersands that aren't part of an entity
- DocType::DEFAULT_ENTITIES.each_value do |entity|
- copy = copy.gsub(entity.value, "&#{entity.name};" )
- end
- end
- copy
- end
-
- # Unescapes all possible entities
- def Text::unnormalize( string, doctype=nil, filter=nil, illegal=nil )
- sum = 0
- string.gsub( /\r\n?/, "\n" ).gsub( REFERENCE ) {
- s = Text.expand($&, doctype, filter)
- if sum + s.bytesize > Security.entity_expansion_text_limit
- raise "entity expansion has grown too large"
- else
- sum += s.bytesize
- end
- s
- }
- end
-
- def Text.expand(ref, doctype, filter)
- if ref[1] == ?#
- if ref[2] == ?x
- [ref[3...-1].to_i(16)].pack('U*')
- else
- [ref[2...-1].to_i].pack('U*')
- end
- elsif ref == '&amp;'
- '&'
- elsif filter and filter.include?( ref[1...-1] )
- ref
- elsif doctype
- doctype.entity( ref[1...-1] ) or ref
- else
- entity_value = DocType::DEFAULT_ENTITIES[ ref[1...-1] ]
- entity_value ? entity_value.value : ref
- end
- end
- end
-end
diff --git a/lib/rexml/undefinednamespaceexception.rb b/lib/rexml/undefinednamespaceexception.rb
deleted file mode 100644
index 492a098183..0000000000
--- a/lib/rexml/undefinednamespaceexception.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-require_relative 'parseexception'
-module REXML
- class UndefinedNamespaceException < ParseException
- def initialize( prefix, source, parser )
- super( "Undefined prefix #{prefix} found" )
- end
- end
-end
diff --git a/lib/rexml/validation/relaxng.rb b/lib/rexml/validation/relaxng.rb
deleted file mode 100644
index f29a2c05e5..0000000000
--- a/lib/rexml/validation/relaxng.rb
+++ /dev/null
@@ -1,539 +0,0 @@
-# frozen_string_literal: false
-require_relative "validation"
-require_relative "../parsers/baseparser"
-
-module REXML
- module Validation
- # Implemented:
- # * empty
- # * element
- # * attribute
- # * text
- # * optional
- # * choice
- # * oneOrMore
- # * zeroOrMore
- # * group
- # * value
- # * interleave
- # * mixed
- # * ref
- # * grammar
- # * start
- # * define
- #
- # Not implemented:
- # * data
- # * param
- # * include
- # * externalRef
- # * notAllowed
- # * anyName
- # * nsName
- # * except
- # * name
- class RelaxNG
- include Validator
-
- INFINITY = 1.0 / 0.0
- EMPTY = Event.new( nil )
- TEXT = [:start_element, "text"]
- attr_accessor :current
- attr_accessor :count
- attr_reader :references
-
- # FIXME: Namespaces
- def initialize source
- parser = REXML::Parsers::BaseParser.new( source )
-
- @count = 0
- @references = {}
- @root = @current = Sequence.new(self)
- @root.previous = true
- states = [ @current ]
- begin
- event = parser.pull
- case event[0]
- when :start_element
- case event[1]
- when "empty"
- when "element", "attribute", "text", "value"
- states[-1] << event
- when "optional"
- states << Optional.new( self )
- states[-2] << states[-1]
- when "choice"
- states << Choice.new( self )
- states[-2] << states[-1]
- when "oneOrMore"
- states << OneOrMore.new( self )
- states[-2] << states[-1]
- when "zeroOrMore"
- states << ZeroOrMore.new( self )
- states[-2] << states[-1]
- when "group"
- states << Sequence.new( self )
- states[-2] << states[-1]
- when "interleave"
- states << Interleave.new( self )
- states[-2] << states[-1]
- when "mixed"
- states << Interleave.new( self )
- states[-2] << states[-1]
- states[-1] << TEXT
- when "define"
- states << [ event[2]["name"] ]
- when "ref"
- states[-1] << Ref.new( event[2]["name"] )
- when "anyName"
- states << AnyName.new( self )
- states[-2] << states[-1]
- when "nsName"
- when "except"
- when "name"
- when "data"
- when "param"
- when "include"
- when "grammar"
- when "start"
- when "externalRef"
- when "notAllowed"
- end
- when :end_element
- case event[1]
- when "element", "attribute"
- states[-1] << event
- when "zeroOrMore", "oneOrMore", "choice", "optional",
- "interleave", "group", "mixed"
- states.pop
- when "define"
- ref = states.pop
- @references[ ref.shift ] = ref
- #when "empty"
- end
- when :end_document
- states[-1] << event
- when :text
- states[-1] << event
- end
- end while event[0] != :end_document
- end
-
- def receive event
- validate( event )
- end
- end
-
- class State
- def initialize( context )
- @previous = []
- @events = []
- @current = 0
- @count = context.count += 1
- @references = context.references
- @value = false
- end
-
- def reset
- return if @current == 0
- @current = 0
- @events.each {|s| s.reset if s.kind_of? State }
- end
-
- def previous=( previous )
- @previous << previous
- end
-
- def next( event )
- #print "In next with #{event.inspect}. "
- #p @previous
- return @previous.pop.next( event ) if @events[@current].nil?
- expand_ref_in( @events, @current ) if @events[@current].class == Ref
- if ( @events[@current].kind_of? State )
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1].next( event )
- end
- if ( @events[@current].matches?(event) )
- @current += 1
- if @events[@current].nil?
- return @previous.pop
- elsif @events[@current].kind_of? State
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1]
- else
- return self
- end
- else
- return nil
- end
- end
-
- def to_s
- # Abbreviated:
- self.class.name =~ /(?:::)(\w)\w+$/
- # Full:
- #self.class.name =~ /(?:::)(\w+)$/
- "#$1.#@count"
- end
-
- def inspect
- "< #{to_s} #{@events.collect{|e|
- pre = e == @events[@current] ? '#' : ''
- pre + e.inspect unless self == e
- }.join(', ')} >"
- end
-
- def expected
- return [@events[@current]]
- end
-
- def <<( event )
- add_event_to_arry( @events, event )
- end
-
-
- protected
- def expand_ref_in( arry, ind )
- new_events = []
- @references[ arry[ind].to_s ].each{ |evt|
- add_event_to_arry(new_events,evt)
- }
- arry[ind,1] = new_events
- end
-
- def add_event_to_arry( arry, evt )
- evt = generate_event( evt )
- if evt.kind_of? String
- arry[-1].event_arg = evt if arry[-1].kind_of? Event and @value
- @value = false
- else
- arry << evt
- end
- end
-
- def generate_event( event )
- return event if event.kind_of? State or event.class == Ref
- evt = nil
- arg = nil
- case event[0]
- when :start_element
- case event[1]
- when "element"
- evt = :start_element
- arg = event[2]["name"]
- when "attribute"
- evt = :start_attribute
- arg = event[2]["name"]
- when "text"
- evt = :text
- when "value"
- evt = :text
- @value = true
- end
- when :text
- return event[1]
- when :end_document
- return Event.new( event[0] )
- else # then :end_element
- case event[1]
- when "element"
- evt = :end_element
- when "attribute"
- evt = :end_attribute
- end
- end
- return Event.new( evt, arg )
- end
- end
-
-
- class Sequence < State
- def matches?(event)
- @events[@current].matches?( event )
- end
- end
-
-
- class Optional < State
- def next( event )
- if @current == 0
- rv = super
- return rv if rv
- @prior = @previous.pop
- return @prior.next( event )
- end
- super
- end
-
- def matches?(event)
- @events[@current].matches?(event) ||
- (@current == 0 and @previous[-1].matches?(event))
- end
-
- def expected
- return [ @prior.expected, @events[0] ].flatten if @current == 0
- return [@events[@current]]
- end
- end
-
-
- class ZeroOrMore < Optional
- def next( event )
- expand_ref_in( @events, @current ) if @events[@current].class == Ref
- if ( @events[@current].matches?(event) )
- @current += 1
- if @events[@current].nil?
- @current = 0
- return self
- elsif @events[@current].kind_of? State
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1]
- else
- return self
- end
- else
- @prior = @previous.pop
- return @prior.next( event ) if @current == 0
- return nil
- end
- end
-
- def expected
- return [ @prior.expected, @events[0] ].flatten if @current == 0
- return [@events[@current]]
- end
- end
-
-
- class OneOrMore < State
- def initialize context
- super
- @ord = 0
- end
-
- def reset
- super
- @ord = 0
- end
-
- def next( event )
- expand_ref_in( @events, @current ) if @events[@current].class == Ref
- if ( @events[@current].matches?(event) )
- @current += 1
- @ord += 1
- if @events[@current].nil?
- @current = 0
- return self
- elsif @events[@current].kind_of? State
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1]
- else
- return self
- end
- else
- return @previous.pop.next( event ) if @current == 0 and @ord > 0
- return nil
- end
- end
-
- def matches?( event )
- @events[@current].matches?(event) ||
- (@current == 0 and @ord > 0 and @previous[-1].matches?(event))
- end
-
- def expected
- if @current == 0 and @ord > 0
- return [@previous[-1].expected, @events[0]].flatten
- else
- return [@events[@current]]
- end
- end
- end
-
-
- class Choice < State
- def initialize context
- super
- @choices = []
- end
-
- def reset
- super
- @events = []
- @choices.each { |c| c.each { |s| s.reset if s.kind_of? State } }
- end
-
- def <<( event )
- add_event_to_arry( @choices, event )
- end
-
- def next( event )
- # Make the choice if we haven't
- if @events.size == 0
- c = 0 ; max = @choices.size
- while c < max
- if @choices[c][0].class == Ref
- expand_ref_in( @choices[c], 0 )
- @choices += @choices[c]
- @choices.delete( @choices[c] )
- max -= 1
- else
- c += 1
- end
- end
- @events = @choices.find { |evt| evt[0].matches? event }
- # Remove the references
- # Find the events
- end
- unless @events
- @events = []
- return nil
- end
- super
- end
-
- def matches?( event )
- return @events[@current].matches?( event ) if @events.size > 0
- !@choices.find{|evt| evt[0].matches?(event)}.nil?
- end
-
- def expected
- return [@events[@current]] if @events.size > 0
- return @choices.collect do |x|
- if x[0].kind_of? State
- x[0].expected
- else
- x[0]
- end
- end.flatten
- end
-
- def inspect
- "< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' or ')} >"
- end
-
- protected
- def add_event_to_arry( arry, evt )
- if evt.kind_of? State or evt.class == Ref
- arry << [evt]
- elsif evt[0] == :text
- if arry[-1] and
- arry[-1][-1].kind_of?( Event ) and
- arry[-1][-1].event_type == :text and @value
-
- arry[-1][-1].event_arg = evt[1]
- @value = false
- end
- else
- arry << [] if evt[0] == :start_element
- arry[-1] << generate_event( evt )
- end
- end
- end
-
-
- class Interleave < Choice
- def initialize context
- super
- @choice = 0
- end
-
- def reset
- @choice = 0
- end
-
- def next_current( event )
- # Expand references
- c = 0 ; max = @choices.size
- while c < max
- if @choices[c][0].class == Ref
- expand_ref_in( @choices[c], 0 )
- @choices += @choices[c]
- @choices.delete( @choices[c] )
- max -= 1
- else
- c += 1
- end
- end
- @events = @choices[@choice..-1].find { |evt| evt[0].matches? event }
- @current = 0
- if @events
- # reorder the choices
- old = @choices[@choice]
- idx = @choices.index( @events )
- @choices[@choice] = @events
- @choices[idx] = old
- @choice += 1
- end
-
- @events = [] unless @events
- end
-
-
- def next( event )
- # Find the next series
- next_current(event) unless @events[@current]
- return nil unless @events[@current]
-
- expand_ref_in( @events, @current ) if @events[@current].class == Ref
- if ( @events[@current].kind_of? State )
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1].next( event )
- end
- return @previous.pop.next( event ) if @events[@current].nil?
- if ( @events[@current].matches?(event) )
- @current += 1
- if @events[@current].nil?
- return self unless @choices[@choice].nil?
- return @previous.pop
- elsif @events[@current].kind_of? State
- @current += 1
- @events[@current-1].previous = self
- return @events[@current-1]
- else
- return self
- end
- else
- return nil
- end
- end
-
- def matches?( event )
- return @events[@current].matches?( event ) if @events[@current]
- !@choices[@choice..-1].find{|evt| evt[0].matches?(event)}.nil?
- end
-
- def expected
- return [@events[@current]] if @events[@current]
- return @choices[@choice..-1].collect do |x|
- if x[0].kind_of? State
- x[0].expected
- else
- x[0]
- end
- end.flatten
- end
-
- def inspect
- "< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' and ')} >"
- end
- end
-
- class Ref
- def initialize value
- @value = value
- end
- def to_s
- @value
- end
- def inspect
- "{#{to_s}}"
- end
- end
- end
-end
diff --git a/lib/rexml/validation/validation.rb b/lib/rexml/validation/validation.rb
deleted file mode 100644
index 0ad6ada427..0000000000
--- a/lib/rexml/validation/validation.rb
+++ /dev/null
@@ -1,144 +0,0 @@
-# frozen_string_literal: false
-require_relative 'validationexception'
-
-module REXML
- module Validation
- module Validator
- NILEVENT = [ nil ]
- def reset
- @current = @root
- @root.reset
- @root.previous = true
- @attr_stack = []
- self
- end
- def dump
- puts @root.inspect
- end
- def validate( event )
- @attr_stack = [] unless defined? @attr_stack
- match = @current.next(event)
- raise ValidationException.new( "Validation error. Expected: "+
- @current.expected.join( " or " )+" from #{@current.inspect} "+
- " but got #{Event.new( event[0], event[1] ).inspect}" ) unless match
- @current = match
-
- # Check for attributes
- case event[0]
- when :start_element
- @attr_stack << event[2]
- begin
- sattr = [:start_attribute, nil]
- eattr = [:end_attribute]
- text = [:text, nil]
- k, = event[2].find { |key,value|
- sattr[1] = key
- m = @current.next( sattr )
- if m
- # If the state has text children...
- if m.matches?( eattr )
- @current = m
- else
- text[1] = value
- m = m.next( text )
- text[1] = nil
- return false unless m
- @current = m if m
- end
- m = @current.next( eattr )
- if m
- @current = m
- true
- else
- false
- end
- else
- false
- end
- }
- event[2].delete(k) if k
- end while k
- when :end_element
- attrs = @attr_stack.pop
- raise ValidationException.new( "Validation error. Illegal "+
- " attributes: #{attrs.inspect}") if attrs.length > 0
- end
- end
- end
-
- class Event
- def initialize(event_type, event_arg=nil )
- @event_type = event_type
- @event_arg = event_arg
- end
-
- attr_reader :event_type
- attr_accessor :event_arg
-
- def done?
- @done
- end
-
- def single?
- return (@event_type != :start_element and @event_type != :start_attribute)
- end
-
- def matches?( event )
- return false unless event[0] == @event_type
- case event[0]
- when nil
- return true
- when :start_element
- return true if event[1] == @event_arg
- when :end_element
- return true
- when :start_attribute
- return true if event[1] == @event_arg
- when :end_attribute
- return true
- when :end_document
- return true
- when :text
- return (@event_arg.nil? or @event_arg == event[1])
-=begin
- when :processing_instruction
- false
- when :xmldecl
- false
- when :start_doctype
- false
- when :end_doctype
- false
- when :externalentity
- false
- when :elementdecl
- false
- when :entity
- false
- when :attlistdecl
- false
- when :notationdecl
- false
- when :end_doctype
- false
-=end
- else
- false
- end
- end
-
- def ==( other )
- return false unless other.kind_of? Event
- @event_type == other.event_type and @event_arg == other.event_arg
- end
-
- def to_s
- inspect
- end
-
- def inspect
- "#{@event_type.inspect}( #@event_arg )"
- end
- end
- end
-end
diff --git a/lib/rexml/validation/validationexception.rb b/lib/rexml/validation/validationexception.rb
deleted file mode 100644
index 78cd63fd04..0000000000
--- a/lib/rexml/validation/validationexception.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: false
-module REXML
- module Validation
- class ValidationException < RuntimeError
- def initialize msg
- super
- end
- end
- end
-end
diff --git a/lib/rexml/xmldecl.rb b/lib/rexml/xmldecl.rb
deleted file mode 100644
index d19407cefd..0000000000
--- a/lib/rexml/xmldecl.rb
+++ /dev/null
@@ -1,130 +0,0 @@
-# frozen_string_literal: false
-
-require_relative 'encoding'
-require_relative 'source'
-
-module REXML
- # NEEDS DOCUMENTATION
- class XMLDecl < Child
- include Encoding
-
- DEFAULT_VERSION = "1.0"
- DEFAULT_ENCODING = "UTF-8"
- DEFAULT_STANDALONE = "no"
- START = "<?xml"
- STOP = "?>"
-
- attr_accessor :version, :standalone
- attr_reader :writeencoding, :writethis
-
- def initialize(version=DEFAULT_VERSION, encoding=nil, standalone=nil)
- @writethis = true
- @writeencoding = !encoding.nil?
- if version.kind_of? XMLDecl
- super()
- @version = version.version
- self.encoding = version.encoding
- @writeencoding = version.writeencoding
- @standalone = version.standalone
- @writethis = version.writethis
- else
- super()
- @version = version
- self.encoding = encoding
- @standalone = standalone
- end
- @version = DEFAULT_VERSION if @version.nil?
- end
-
- def clone
- XMLDecl.new(self)
- end
-
- # indent::
- # Ignored. There must be no whitespace before an XML declaration
- # transitive::
- # Ignored
- # ie_hack::
- # Ignored
- def write(writer, indent=-1, transitive=false, ie_hack=false)
- return nil unless @writethis or writer.kind_of? Output
- writer << START
- writer << " #{content encoding}"
- writer << STOP
- end
-
- def ==( other )
- other.kind_of?(XMLDecl) and
- other.version == @version and
- other.encoding == self.encoding and
- other.standalone == @standalone
- end
-
- def xmldecl version, encoding, standalone
- @version = version
- self.encoding = encoding
- @standalone = standalone
- end
-
- def node_type
- :xmldecl
- end
-
- alias :stand_alone? :standalone
- alias :old_enc= :encoding=
-
- def encoding=( enc )
- if enc.nil?
- self.old_enc = "UTF-8"
- @writeencoding = false
- else
- self.old_enc = enc
- @writeencoding = true
- end
- self.dowrite
- end
-
- # Only use this if you do not want the XML declaration to be written;
- # this object is ignored by the XML writer. Otherwise, instantiate your
- # own XMLDecl and add it to the document.
- #
- # Note that XML 1.1 documents *must* include an XML declaration
- def XMLDecl.default
- rv = XMLDecl.new( "1.0" )
- rv.nowrite
- rv
- end
-
- def nowrite
- @writethis = false
- end
-
- def dowrite
- @writethis = true
- end
-
- def inspect
- "#{START} ... #{STOP}"
- end
-
- private
- def content(enc)
- context = nil
- context = parent.context if parent
- if context and context[:prologue_quote] == :quote
- quote = "\""
- else
- quote = "'"
- end
-
- rv = "version=#{quote}#{@version}#{quote}"
- if @writeencoding or enc !~ /\Autf-8\z/i
- rv << " encoding=#{quote}#{enc}#{quote}"
- end
- if @standalone
- rv << " standalone=#{quote}#{@standalone}#{quote}"
- end
- rv
- end
- end
-end
diff --git a/lib/rexml/xmltokens.rb b/lib/rexml/xmltokens.rb
deleted file mode 100644
index 392b47b1d3..0000000000
--- a/lib/rexml/xmltokens.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: false
-module REXML
- # Defines a number of tokens used for parsing XML. Not for general
- # consumption.
- module XMLTokens
- # From http://www.w3.org/TR/REC-xml/#sec-common-syn
- #
- # [4] NameStartChar ::=
- # ":" |
- # [A-Z] |
- # "_" |
- # [a-z] |
- # [#xC0-#xD6] |
- # [#xD8-#xF6] |
- # [#xF8-#x2FF] |
- # [#x370-#x37D] |
- # [#x37F-#x1FFF] |
- # [#x200C-#x200D] |
- # [#x2070-#x218F] |
- # [#x2C00-#x2FEF] |
- # [#x3001-#xD7FF] |
- # [#xF900-#xFDCF] |
- # [#xFDF0-#xFFFD] |
- # [#x10000-#xEFFFF]
- name_start_chars = [
- ":",
- "A-Z",
- "_",
- "a-z",
- "\\u00C0-\\u00D6",
- "\\u00D8-\\u00F6",
- "\\u00F8-\\u02FF",
- "\\u0370-\\u037D",
- "\\u037F-\\u1FFF",
- "\\u200C-\\u200D",
- "\\u2070-\\u218F",
- "\\u2C00-\\u2FEF",
- "\\u3001-\\uD7FF",
- "\\uF900-\\uFDCF",
- "\\uFDF0-\\uFFFD",
- "\\u{10000}-\\u{EFFFF}",
- ]
- # From http://www.w3.org/TR/REC-xml/#sec-common-syn
- #
- # [4a] NameChar ::=
- # NameStartChar |
- # "-" |
- # "." |
- # [0-9] |
- # #xB7 |
- # [#x0300-#x036F] |
- # [#x203F-#x2040]
- name_chars = name_start_chars + [
- "\\-",
- "\\.",
- "0-9",
- "\\u00B7",
- "\\u0300-\\u036F",
- "\\u203F-\\u2040",
- ]
- NAME_START_CHAR = "[#{name_start_chars.join('')}]"
- NAME_CHAR = "[#{name_chars.join('')}]"
- NAMECHAR = NAME_CHAR # deprecated. Use NAME_CHAR instead.
-
- # From http://www.w3.org/TR/xml-names11/#NT-NCName
- #
- # [6] NCNameStartChar ::= NameStartChar - ':'
- ncname_start_chars = name_start_chars - [":"]
- # From http://www.w3.org/TR/xml-names11/#NT-NCName
- #
- # [5] NCNameChar ::= NameChar - ':'
- ncname_chars = name_chars - [":"]
- NCNAME_STR = "[#{ncname_start_chars.join('')}][#{ncname_chars.join('')}]*"
- NAME_STR = "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
-
- NAME = "(#{NAME_START_CHAR}#{NAME_CHAR}*)"
- NMTOKEN = "(?:#{NAME_CHAR})+"
- NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*"
- REFERENCE = "(?:&#{NAME};|&#\\d+;|&#x[0-9a-fA-F]+;)"
-
- #REFERENCE = "(?:#{ENTITYREF}|#{CHARREF})"
- #ENTITYREF = "&#{NAME};"
- #CHARREF = "&#\\d+;|&#x[0-9a-fA-F]+;"
- end
-end
diff --git a/lib/rexml/xpath.rb b/lib/rexml/xpath.rb
deleted file mode 100644
index a0921bd8e1..0000000000
--- a/lib/rexml/xpath.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: false
-require_relative 'functions'
-require_relative 'xpath_parser'
-
-module REXML
- # Wrapper class. Use this class to access the XPath functions.
- class XPath
- include Functions
- # A base Hash object, supposing to be used when initializing a
- # default empty namespaces set, but is currently unused.
- # TODO: either set the namespaces=EMPTY_HASH, or deprecate this.
- EMPTY_HASH = {}
-
- # Finds and returns the first node that matches the supplied xpath.
- # element::
- # The context element
- # path::
- # The xpath to search for. If not supplied or nil, returns the first
- # node matching '*'.
- # namespaces::
- # If supplied, a Hash which defines a namespace mapping.
- # variables::
- # If supplied, a Hash which maps $variables in the query
- # to values. This can be used to avoid XPath injection attacks
- # or to automatically handle escaping string values.
- #
- # XPath.first( node )
- # XPath.first( doc, "//b"} )
- # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } )
- # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"})
- def XPath::first(element, path=nil, namespaces=nil, variables={}, options={})
- raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash)
- raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash)
- parser = XPathParser.new(**options)
- parser.namespaces = namespaces
- parser.variables = variables
- path = "*" unless path
- element = [element] unless element.kind_of? Array
- parser.parse(path, element).flatten[0]
- end
-
- # Iterates over nodes that match the given path, calling the supplied
- # block with the match.
- # element::
- # The context element
- # path::
- # The xpath to search for. If not supplied or nil, defaults to '*'
- # namespaces::
- # If supplied, a Hash which defines a namespace mapping
- # variables::
- # If supplied, a Hash which maps $variables in the query
- # to values. This can be used to avoid XPath injection attacks
- # or to automatically handle escaping string values.
- #
- # XPath.each( node ) { |el| ... }
- # XPath.each( node, '/*[@attr='v']' ) { |el| ... }
- # XPath.each( node, 'ancestor::x' ) { |el| ... }
- # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \
- # {|el| ... }
- def XPath::each(element, path=nil, namespaces=nil, variables={}, options={}, &block)
- raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash)
- raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash)
- parser = XPathParser.new(**options)
- parser.namespaces = namespaces
- parser.variables = variables
- path = "*" unless path
- element = [element] unless element.kind_of? Array
- parser.parse(path, element).each( &block )
- end
-
- # Returns an array of nodes matching a given XPath.
- def XPath::match(element, path=nil, namespaces=nil, variables={}, options={})
- parser = XPathParser.new(**options)
- parser.namespaces = namespaces
- parser.variables = variables
- path = "*" unless path
- element = [element] unless element.kind_of? Array
- parser.parse(path,element)
- end
- end
-end
diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb
deleted file mode 100644
index b989725403..0000000000
--- a/lib/rexml/xpath_parser.rb
+++ /dev/null
@@ -1,968 +0,0 @@
-# frozen_string_literal: false
-
-require "pp"
-
-require_relative 'namespace'
-require_relative 'xmltokens'
-require_relative 'attribute'
-require_relative 'parsers/xpathparser'
-
-class Object
- # provides a unified +clone+ operation, for REXML::XPathParser
- # to use across multiple Object types
- def dclone
- clone
- end
-end
-class Symbol
- # provides a unified +clone+ operation, for REXML::XPathParser
- # to use across multiple Object types
- def dclone ; self ; end
-end
-class Integer
- # provides a unified +clone+ operation, for REXML::XPathParser
- # to use across multiple Object types
- def dclone ; self ; end
-end
-class Float
- # provides a unified +clone+ operation, for REXML::XPathParser
- # to use across multiple Object types
- def dclone ; self ; end
-end
-class Array
- # provides a unified +clone+ operation, for REXML::XPathParser
- # to use across multiple Object+ types
- def dclone
- klone = self.clone
- klone.clear
- self.each{|v| klone << v.dclone}
- klone
- end
-end
-
-module REXML
- # You don't want to use this class. Really. Use XPath, which is a wrapper
- # for this class. Believe me. You don't want to poke around in here.
- # There is strange, dark magic at work in this code. Beware. Go back! Go
- # back while you still can!
- class XPathParser
- include XMLTokens
- LITERAL = /^'([^']*)'|^"([^"]*)"/u
-
- DEBUG = (ENV["REXML_XPATH_PARSER_DEBUG"] == "true")
-
- def initialize(strict: false)
- @debug = DEBUG
- @parser = REXML::Parsers::XPathParser.new
- @namespaces = nil
- @variables = {}
- @nest = 0
- @strict = strict
- end
-
- def namespaces=( namespaces={} )
- Functions::namespace_context = namespaces
- @namespaces = namespaces
- end
-
- def variables=( vars={} )
- Functions::variables = vars
- @variables = vars
- end
-
- def parse path, nodeset
- path_stack = @parser.parse( path )
- match( path_stack, nodeset )
- end
-
- def get_first path, nodeset
- path_stack = @parser.parse( path )
- first( path_stack, nodeset )
- end
-
- def predicate path, nodeset
- path_stack = @parser.parse( path )
- match( path_stack, nodeset )
- end
-
- def []=( variable_name, value )
- @variables[ variable_name ] = value
- end
-
-
- # Performs a depth-first (document order) XPath search, and returns the
- # first match. This is the fastest, lightest way to return a single result.
- #
- # FIXME: This method is incomplete!
- def first( path_stack, node )
- return nil if path.size == 0
-
- case path[0]
- when :document
- # do nothing
- return first( path[1..-1], node )
- when :child
- for c in node.children
- r = first( path[1..-1], c )
- return r if r
- end
- when :qname
- name = path[2]
- if node.name == name
- return node if path.size == 3
- return first( path[3..-1], node )
- else
- return nil
- end
- when :descendant_or_self
- r = first( path[1..-1], node )
- return r if r
- for c in node.children
- r = first( path, c )
- return r if r
- end
- when :node
- return first( path[1..-1], node )
- when :any
- return first( path[1..-1], node )
- end
- return nil
- end
-
-
- def match(path_stack, nodeset)
- nodeset = nodeset.collect.with_index do |node, i|
- position = i + 1
- XPathNode.new(node, position: position)
- end
- result = expr(path_stack, nodeset)
- case result
- when Array # nodeset
- unnode(result)
- else
- [result]
- end
- end
-
- private
- def strict?
- @strict
- end
-
- # Returns a String namespace for a node, given a prefix
- # The rules are:
- #
- # 1. Use the supplied namespace mapping first.
- # 2. If no mapping was supplied, use the context node to look up the namespace
- def get_namespace( node, prefix )
- if @namespaces
- return @namespaces[prefix] || ''
- else
- return node.namespace( prefix ) if node.node_type == :element
- return ''
- end
- end
-
-
- # Expr takes a stack of path elements and a set of nodes (either a Parent
- # or an Array and returns an Array of matching nodes
- def expr( path_stack, nodeset, context=nil )
- enter(:expr, path_stack, nodeset) if @debug
- return nodeset if path_stack.length == 0 || nodeset.length == 0
- while path_stack.length > 0
- trace(:while, path_stack, nodeset) if @debug
- if nodeset.length == 0
- path_stack.clear
- return []
- end
- op = path_stack.shift
- case op
- when :document
- first_raw_node = nodeset.first.raw_node
- nodeset = [XPathNode.new(first_raw_node.root_node, position: 1)]
- when :self
- nodeset = step(path_stack) do
- [nodeset]
- end
- when :child
- nodeset = step(path_stack) do
- child(nodeset)
- end
- when :literal
- trace(:literal, path_stack, nodeset) if @debug
- return path_stack.shift
- when :attribute
- nodeset = step(path_stack, any_type: :attribute) do
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- next unless raw_node.node_type == :element
- attributes = raw_node.attributes
- next if attributes.empty?
- nodesets << attributes.each_attribute.collect.with_index do |attribute, i|
- XPathNode.new(attribute, position: i + 1)
- end
- end
- nodesets
- end
- when :namespace
- pre_defined_namespaces = {
- "xml" => "http://www.w3.org/XML/1998/namespace",
- }
- nodeset = step(path_stack, any_type: :namespace) do
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- case raw_node.node_type
- when :element
- if @namespaces
- nodesets << pre_defined_namespaces.merge(@namespaces)
- else
- nodesets << pre_defined_namespaces.merge(raw_node.namespaces)
- end
- when :attribute
- if @namespaces
- nodesets << pre_defined_namespaces.merge(@namespaces)
- else
- nodesets << pre_defined_namespaces.merge(raw_node.element.namespaces)
- end
- end
- end
- nodesets
- end
- when :parent
- nodeset = step(path_stack) do
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- if raw_node.node_type == :attribute
- parent = raw_node.element
- else
- parent = raw_node.parent
- end
- nodesets << [XPathNode.new(parent, position: 1)] if parent
- end
- nodesets
- end
- when :ancestor
- nodeset = step(path_stack) do
- nodesets = []
- # new_nodes = {}
- nodeset.each do |node|
- raw_node = node.raw_node
- new_nodeset = []
- while raw_node.parent
- raw_node = raw_node.parent
- # next if new_nodes.key?(node)
- new_nodeset << XPathNode.new(raw_node,
- position: new_nodeset.size + 1)
- # new_nodes[node] = true
- end
- nodesets << new_nodeset unless new_nodeset.empty?
- end
- nodesets
- end
- when :ancestor_or_self
- nodeset = step(path_stack) do
- nodesets = []
- # new_nodes = {}
- nodeset.each do |node|
- raw_node = node.raw_node
- next unless raw_node.node_type == :element
- new_nodeset = [XPathNode.new(raw_node, position: 1)]
- # new_nodes[node] = true
- while raw_node.parent
- raw_node = raw_node.parent
- # next if new_nodes.key?(node)
- new_nodeset << XPathNode.new(raw_node,
- position: new_nodeset.size + 1)
- # new_nodes[node] = true
- end
- nodesets << new_nodeset unless new_nodeset.empty?
- end
- nodesets
- end
- when :descendant_or_self
- nodeset = step(path_stack) do
- descendant(nodeset, true)
- end
- when :descendant
- nodeset = step(path_stack) do
- descendant(nodeset, false)
- end
- when :following_sibling
- nodeset = step(path_stack) do
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- next unless raw_node.respond_to?(:parent)
- next if raw_node.parent.nil?
- all_siblings = raw_node.parent.children
- current_index = all_siblings.index(raw_node)
- following_siblings = all_siblings[(current_index + 1)..-1]
- next if following_siblings.empty?
- nodesets << following_siblings.collect.with_index do |sibling, i|
- XPathNode.new(sibling, position: i + 1)
- end
- end
- nodesets
- end
- when :preceding_sibling
- nodeset = step(path_stack, order: :reverse) do
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- next unless raw_node.respond_to?(:parent)
- next if raw_node.parent.nil?
- all_siblings = raw_node.parent.children
- current_index = all_siblings.index(raw_node)
- preceding_siblings = all_siblings[0, current_index].reverse
- next if preceding_siblings.empty?
- nodesets << preceding_siblings.collect.with_index do |sibling, i|
- XPathNode.new(sibling, position: i + 1)
- end
- end
- nodesets
- end
- when :preceding
- nodeset = step(path_stack, order: :reverse) do
- unnode(nodeset) do |node|
- preceding(node)
- end
- end
- when :following
- nodeset = step(path_stack) do
- unnode(nodeset) do |node|
- following(node)
- end
- end
- when :variable
- var_name = path_stack.shift
- return [@variables[var_name]]
-
- when :eq, :neq, :lt, :lteq, :gt, :gteq
- left = expr( path_stack.shift, nodeset.dup, context )
- right = expr( path_stack.shift, nodeset.dup, context )
- res = equality_relational_compare( left, op, right )
- trace(op, left, right, res) if @debug
- return res
-
- when :or
- left = expr(path_stack.shift, nodeset.dup, context)
- return true if Functions.boolean(left)
- right = expr(path_stack.shift, nodeset.dup, context)
- return Functions.boolean(right)
-
- when :and
- left = expr(path_stack.shift, nodeset.dup, context)
- return false unless Functions.boolean(left)
- right = expr(path_stack.shift, nodeset.dup, context)
- return Functions.boolean(right)
-
- when :div, :mod, :mult, :plus, :minus
- left = expr(path_stack.shift, nodeset, context)
- right = expr(path_stack.shift, nodeset, context)
- left = unnode(left) if left.is_a?(Array)
- right = unnode(right) if right.is_a?(Array)
- left = Functions::number(left)
- right = Functions::number(right)
- case op
- when :div
- return left / right
- when :mod
- return left % right
- when :mult
- return left * right
- when :plus
- return left + right
- when :minus
- return left - right
- else
- raise "[BUG] Unexpected operator: <#{op.inspect}>"
- end
- when :union
- left = expr( path_stack.shift, nodeset, context )
- right = expr( path_stack.shift, nodeset, context )
- left = unnode(left) if left.is_a?(Array)
- right = unnode(right) if right.is_a?(Array)
- return (left | right)
- when :neg
- res = expr( path_stack, nodeset, context )
- res = unnode(res) if res.is_a?(Array)
- return -Functions.number(res)
- when :not
- when :function
- func_name = path_stack.shift.tr('-','_')
- arguments = path_stack.shift
-
- if nodeset.size != 1
- message = "[BUG] Node set size must be 1 for function call: "
- message += "<#{func_name}>: <#{nodeset.inspect}>: "
- message += "<#{arguments.inspect}>"
- raise message
- end
-
- node = nodeset.first
- if context
- target_context = context
- else
- target_context = {:size => nodeset.size}
- if node.is_a?(XPathNode)
- target_context[:node] = node.raw_node
- target_context[:index] = node.position
- else
- target_context[:node] = node
- target_context[:index] = 1
- end
- end
- args = arguments.dclone.collect do |arg|
- result = expr(arg, nodeset, target_context)
- result = unnode(result) if result.is_a?(Array)
- result
- end
- Functions.context = target_context
- return Functions.send(func_name, *args)
-
- else
- raise "[BUG] Unexpected path: <#{op.inspect}>: <#{path_stack.inspect}>"
- end
- end # while
- return nodeset
- ensure
- leave(:expr, path_stack, nodeset) if @debug
- end
-
- def step(path_stack, any_type: :element, order: :forward)
- nodesets = yield
- begin
- enter(:step, path_stack, nodesets) if @debug
- nodesets = node_test(path_stack, nodesets, any_type: any_type)
- while path_stack[0] == :predicate
- path_stack.shift # :predicate
- predicate_expression = path_stack.shift.dclone
- nodesets = evaluate_predicate(predicate_expression, nodesets)
- end
- if nodesets.size == 1
- ordered_nodeset = nodesets[0]
- else
- raw_nodes = []
- nodesets.each do |nodeset|
- nodeset.each do |node|
- if node.respond_to?(:raw_node)
- raw_nodes << node.raw_node
- else
- raw_nodes << node
- end
- end
- end
- ordered_nodeset = sort(raw_nodes, order)
- end
- new_nodeset = []
- ordered_nodeset.each do |node|
- # TODO: Remove duplicated
- new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
- end
- new_nodeset
- ensure
- leave(:step, path_stack, new_nodeset) if @debug
- end
- end
-
- def node_test(path_stack, nodesets, any_type: :element)
- enter(:node_test, path_stack, nodesets) if @debug
- operator = path_stack.shift
- case operator
- when :qname
- prefix = path_stack.shift
- name = path_stack.shift
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- case raw_node.node_type
- when :element
- if prefix.nil?
- raw_node.name == name
- elsif prefix.empty?
- if strict?
- raw_node.name == name and raw_node.namespace == ""
- else
- # FIXME: This DOUBLES the time XPath searches take
- ns = get_namespace(raw_node, prefix)
- raw_node.name == name and raw_node.namespace == ns
- end
- else
- # FIXME: This DOUBLES the time XPath searches take
- ns = get_namespace(raw_node, prefix)
- raw_node.name == name and raw_node.namespace == ns
- end
- when :attribute
- if prefix.nil?
- raw_node.name == name
- elsif prefix.empty?
- raw_node.name == name and raw_node.namespace == ""
- else
- # FIXME: This DOUBLES the time XPath searches take
- ns = get_namespace(raw_node.element, prefix)
- raw_node.name == name and raw_node.namespace == ns
- end
- else
- false
- end
- end
- end
- when :namespace
- prefix = path_stack.shift
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- case raw_node.node_type
- when :element
- namespaces = @namespaces || raw_node.namespaces
- raw_node.namespace == namespaces[prefix]
- when :attribute
- namespaces = @namespaces || raw_node.element.namespaces
- raw_node.namespace == namespaces[prefix]
- else
- false
- end
- end
- end
- when :any
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- raw_node.node_type == any_type
- end
- end
- when :comment
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- raw_node.node_type == :comment
- end
- end
- when :text
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- raw_node.node_type == :text
- end
- end
- when :processing_instruction
- target = path_stack.shift
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- raw_node = node.raw_node
- (raw_node.node_type == :processing_instruction) and
- (target.empty? or (raw_node.target == target))
- end
- end
- when :node
- new_nodesets = nodesets.collect do |nodeset|
- filter_nodeset(nodeset) do |node|
- true
- end
- end
- else
- message = "[BUG] Unexpected node test: " +
- "<#{operator.inspect}>: <#{path_stack.inspect}>"
- raise message
- end
- new_nodesets
- ensure
- leave(:node_test, path_stack, new_nodesets) if @debug
- end
-
- def filter_nodeset(nodeset)
- new_nodeset = []
- nodeset.each do |node|
- next unless yield(node)
- new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
- end
- new_nodeset
- end
-
- def evaluate_predicate(expression, nodesets)
- enter(:predicate, expression, nodesets) if @debug
- new_nodesets = nodesets.collect do |nodeset|
- new_nodeset = []
- subcontext = { :size => nodeset.size }
- nodeset.each_with_index do |node, index|
- if node.is_a?(XPathNode)
- subcontext[:node] = node.raw_node
- subcontext[:index] = node.position
- else
- subcontext[:node] = node
- subcontext[:index] = index + 1
- end
- result = expr(expression.dclone, [node], subcontext)
- trace(:predicate_evaluate, expression, node, subcontext, result) if @debug
- result = result[0] if result.kind_of? Array and result.length == 1
- if result.kind_of? Numeric
- if result == node.position
- new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
- end
- elsif result.instance_of? Array
- if result.size > 0 and result.inject(false) {|k,s| s or k}
- if result.size > 0
- new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
- end
- end
- else
- if result
- new_nodeset << XPathNode.new(node, position: new_nodeset.size + 1)
- end
- end
- end
- new_nodeset
- end
- new_nodesets
- ensure
- leave(:predicate, new_nodesets) if @debug
- end
-
- def trace(*args)
- indent = " " * @nest
- PP.pp(args, "").each_line do |line|
- puts("#{indent}#{line}")
- end
- end
-
- def enter(tag, *args)
- trace(:enter, tag, *args)
- @nest += 1
- end
-
- def leave(tag, *args)
- @nest -= 1
- trace(:leave, tag, *args)
- end
-
- # Reorders an array of nodes so that they are in document order
- # It tries to do this efficiently.
- #
- # FIXME: I need to get rid of this, but the issue is that most of the XPath
- # interpreter functions as a filter, which means that we lose context going
- # in and out of function calls. If I knew what the index of the nodes was,
- # I wouldn't have to do this. Maybe add a document IDX for each node?
- # Problems with mutable documents. Or, rewrite everything.
- def sort(array_of_nodes, order)
- new_arry = []
- array_of_nodes.each { |node|
- node_idx = []
- np = node.node_type == :attribute ? node.element : node
- while np.parent and np.parent.node_type == :element
- node_idx << np.parent.index( np )
- np = np.parent
- end
- new_arry << [ node_idx.reverse, node ]
- }
- ordered = new_arry.sort_by do |index, node|
- if order == :forward
- index
- else
- -index
- end
- end
- ordered.collect do |_index, node|
- node
- end
- end
-
- def descendant(nodeset, include_self)
- nodesets = []
- nodeset.each do |node|
- new_nodeset = []
- new_nodes = {}
- descendant_recursive(node.raw_node, new_nodeset, new_nodes, include_self)
- nodesets << new_nodeset unless new_nodeset.empty?
- end
- nodesets
- end
-
- def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self)
- if include_self
- return if new_nodes.key?(raw_node)
- new_nodeset << XPathNode.new(raw_node, position: new_nodeset.size + 1)
- new_nodes[raw_node] = true
- end
-
- node_type = raw_node.node_type
- if node_type == :element or node_type == :document
- raw_node.children.each do |child|
- descendant_recursive(child, new_nodeset, new_nodes, true)
- end
- end
- end
-
- # Builds a nodeset of all of the preceding nodes of the supplied node,
- # in reverse document order
- # preceding:: includes every element in the document that precedes this node,
- # except for ancestors
- def preceding(node)
- ancestors = []
- parent = node.parent
- while parent
- ancestors << parent
- parent = parent.parent
- end
-
- precedings = []
- preceding_node = preceding_node_of(node)
- while preceding_node
- if ancestors.include?(preceding_node)
- ancestors.delete(preceding_node)
- else
- precedings << XPathNode.new(preceding_node,
- position: precedings.size + 1)
- end
- preceding_node = preceding_node_of(preceding_node)
- end
- precedings
- end
-
- def preceding_node_of( node )
- psn = node.previous_sibling_node
- if psn.nil?
- if node.parent.nil? or node.parent.class == Document
- return nil
- end
- return node.parent
- #psn = preceding_node_of( node.parent )
- end
- while psn and psn.kind_of? Element and psn.children.size > 0
- psn = psn.children[-1]
- end
- psn
- end
-
- def following(node)
- followings = []
- following_node = next_sibling_node(node)
- while following_node
- followings << XPathNode.new(following_node,
- position: followings.size + 1)
- following_node = following_node_of(following_node)
- end
- followings
- end
-
- def following_node_of( node )
- if node.kind_of? Element and node.children.size > 0
- return node.children[0]
- end
- return next_sibling_node(node)
- end
-
- def next_sibling_node(node)
- psn = node.next_sibling_node
- while psn.nil?
- if node.parent.nil? or node.parent.class == Document
- return nil
- end
- node = node.parent
- psn = node.next_sibling_node
- end
- return psn
- end
-
- def child(nodeset)
- nodesets = []
- nodeset.each do |node|
- raw_node = node.raw_node
- node_type = raw_node.node_type
- # trace(:child, node_type, node)
- case node_type
- when :element
- nodesets << raw_node.children.collect.with_index do |child_node, i|
- XPathNode.new(child_node, position: i + 1)
- end
- when :document
- new_nodeset = []
- raw_node.children.each do |child|
- case child
- when XMLDecl, Text
- # Ignore
- else
- new_nodeset << XPathNode.new(child, position: new_nodeset.size + 1)
- end
- end
- nodesets << new_nodeset unless new_nodeset.empty?
- end
- end
- nodesets
- end
-
- def norm b
- case b
- when true, false
- return b
- when 'true', 'false'
- return Functions::boolean( b )
- when /^\d+(\.\d+)?$/, Numeric
- return Functions::number( b )
- else
- return Functions::string( b )
- end
- end
-
- def equality_relational_compare(set1, op, set2)
- set1 = unnode(set1) if set1.is_a?(Array)
- set2 = unnode(set2) if set2.is_a?(Array)
-
- if set1.kind_of? Array and set2.kind_of? Array
- # If both objects to be compared are node-sets, then the
- # comparison will be true if and only if there is a node in the
- # first node-set and a node in the second node-set such that the
- # result of performing the comparison on the string-values of
- # the two nodes is true.
- set1.product(set2).any? do |node1, node2|
- node_string1 = Functions.string(node1)
- node_string2 = Functions.string(node2)
- compare(node_string1, op, node_string2)
- end
- elsif set1.kind_of? Array or set2.kind_of? Array
- # If one is nodeset and other is number, compare number to each item
- # in nodeset s.t. number op number(string(item))
- # If one is nodeset and other is string, compare string to each item
- # in nodeset s.t. string op string(item)
- # If one is nodeset and other is boolean, compare boolean to each item
- # in nodeset s.t. boolean op boolean(item)
- if set1.kind_of? Array
- a = set1
- b = set2
- else
- a = set2
- b = set1
- end
-
- case b
- when true, false
- each_unnode(a).any? do |unnoded|
- compare(Functions.boolean(unnoded), op, b)
- end
- when Numeric
- each_unnode(a).any? do |unnoded|
- compare(Functions.number(unnoded), op, b)
- end
- when /\A\d+(\.\d+)?\z/
- b = Functions.number(b)
- each_unnode(a).any? do |unnoded|
- compare(Functions.number(unnoded), op, b)
- end
- else
- b = Functions::string(b)
- each_unnode(a).any? do |unnoded|
- compare(Functions::string(unnoded), op, b)
- end
- end
- else
- # If neither is nodeset,
- # If op is = or !=
- # If either boolean, convert to boolean
- # If either number, convert to number
- # Else, convert to string
- # Else
- # Convert both to numbers and compare
- compare(set1, op, set2)
- end
- end
-
- def value_type(value)
- case value
- when true, false
- :boolean
- when Numeric
- :number
- when String
- :string
- else
- raise "[BUG] Unexpected value type: <#{value.inspect}>"
- end
- end
-
- def normalize_compare_values(a, operator, b)
- a_type = value_type(a)
- b_type = value_type(b)
- case operator
- when :eq, :neq
- if a_type == :boolean or b_type == :boolean
- a = Functions.boolean(a) unless a_type == :boolean
- b = Functions.boolean(b) unless b_type == :boolean
- elsif a_type == :number or b_type == :number
- a = Functions.number(a) unless a_type == :number
- b = Functions.number(b) unless b_type == :number
- else
- a = Functions.string(a) unless a_type == :string
- b = Functions.string(b) unless b_type == :string
- end
- when :lt, :lteq, :gt, :gteq
- a = Functions.number(a) unless a_type == :number
- b = Functions.number(b) unless b_type == :number
- else
- message = "[BUG] Unexpected compare operator: " +
- "<#{operator.inspect}>: <#{a.inspect}>: <#{b.inspect}>"
- raise message
- end
- [a, b]
- end
-
- def compare(a, operator, b)
- a, b = normalize_compare_values(a, operator, b)
- case operator
- when :eq
- a == b
- when :neq
- a != b
- when :lt
- a < b
- when :lteq
- a <= b
- when :gt
- a > b
- when :gteq
- a >= b
- else
- message = "[BUG] Unexpected compare operator: " +
- "<#{operator.inspect}>: <#{a.inspect}>: <#{b.inspect}>"
- raise message
- end
- end
-
- def each_unnode(nodeset)
- return to_enum(__method__, nodeset) unless block_given?
- nodeset.each do |node|
- if node.is_a?(XPathNode)
- unnoded = node.raw_node
- else
- unnoded = node
- end
- yield(unnoded)
- end
- end
-
- def unnode(nodeset)
- each_unnode(nodeset).collect do |unnoded|
- unnoded = yield(unnoded) if block_given?
- unnoded
- end
- end
- end
-
- # @private
- class XPathNode
- attr_reader :raw_node, :context
- def initialize(node, context=nil)
- if node.is_a?(XPathNode)
- @raw_node = node.raw_node
- else
- @raw_node = node
- end
- @context = context || {}
- end
-
- def position
- @context[:position]
- end
- end
-end
diff --git a/lib/rinda/rinda.gemspec b/lib/rinda/rinda.gemspec
new file mode 100644
index 0000000000..0c13e3c2df
--- /dev/null
+++ b/lib/rinda/rinda.gemspec
@@ -0,0 +1,28 @@
+Gem::Specification.new do |spec|
+ spec.name = "rinda"
+ spec.version = "0.1.1"
+ spec.authors = ["Masatoshi SEKI"]
+ spec.email = ["seki@ruby-lang.org"]
+
+ spec.summary = %q{The Linda distributed computing paradigm in Ruby.}
+ spec.description = %q{The Linda distributed computing paradigm in Ruby.}
+ spec.homepage = "https://github.com/ruby/rinda"
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
+
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = spec.homepage
+
+ # Specify which files should be added to the gem when it is released.
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ end
+ spec.bindir = "exe"
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ["lib"]
+
+ spec.add_dependency "drb"
+ spec.add_dependency "ipaddr"
+ spec.add_dependency "forwardable"
+end
diff --git a/lib/rss.rb b/lib/rss.rb
deleted file mode 100644
index 1438d97bd3..0000000000
--- a/lib/rss.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-# frozen_string_literal: false
-##
-# = RSS reading and writing
-#
-# Really Simple Syndication (RSS) is a family of formats that describe 'feeds,'
-# specially constructed XML documents that allow an interested person to
-# subscribe and receive updates from a particular web service. This portion of
-# the standard library provides tooling to read and create these feeds.
-#
-# The standard library supports RSS 0.91, 1.0, 2.0, and Atom, a related format.
-# Here are some links to the standards documents for these formats:
-#
-# * RSS
-# * 0.9.1[http://www.rssboard.org/rss-0-9-1-netscape]
-# * 1.0[http://web.resource.org/rss/1.0/]
-# * 2.0[http://www.rssboard.org/rss-specification]
-# * Atom[http://tools.ietf.org/html/rfc4287]
-#
-# == Consuming RSS
-#
-# If you'd like to read someone's RSS feed with your Ruby code, you've come to
-# the right place. It's really easy to do this, but we'll need the help of
-# open-uri:
-#
-# require 'rss'
-# require 'open-uri'
-#
-# url = 'http://www.ruby-lang.org/en/feeds/news.rss'
-# open(url) do |rss|
-# feed = RSS::Parser.parse(rss)
-# puts "Title: #{feed.channel.title}"
-# feed.items.each do |item|
-# puts "Item: #{item.title}"
-# end
-# end
-#
-# As you can see, the workhorse is RSS::Parser#parse, which takes the source of
-# the feed and a parameter that performs validation on the feed. We get back an
-# object that has all of the data from our feed, accessible through methods.
-# This example shows getting the title out of the channel element, and looping
-# through the list of items.
-#
-# == Producing RSS
-#
-# Producing our own RSS feeds is easy as well. Let's make a very basic feed:
-#
-# require "rss"
-#
-# rss = RSS::Maker.make("atom") do |maker|
-# maker.channel.author = "matz"
-# maker.channel.updated = Time.now.to_s
-# maker.channel.about = "http://www.ruby-lang.org/en/feeds/news.rss"
-# maker.channel.title = "Example Feed"
-#
-# maker.items.new_item do |item|
-# item.link = "http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/"
-# item.title = "Ruby 1.9.2-p136 is released"
-# item.updated = Time.now.to_s
-# end
-# end
-#
-# puts rss
-#
-# As you can see, this is a very Builder-like DSL. This code will spit out an
-# Atom feed with one item. If we needed a second item, we'd make another block
-# with maker.items.new_item and build a second one.
-#
-# == Copyright
-#
-# Copyright (c) 2003-2007 Kouhei Sutou <kou@cozmixng.org>
-#
-# You can redistribute it and/or modify it under the same terms as Ruby.
-#
-# There is an additional tutorial by the author of RSS at:
-# http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en
-
-module RSS
-end
-
-require "rss/version"
-
-require 'rss/1.0'
-require 'rss/2.0'
-require 'rss/atom'
-require 'rss/content'
-require 'rss/dublincore'
-require 'rss/image'
-require 'rss/itunes'
-require 'rss/slash'
-require 'rss/syndication'
-require 'rss/taxonomy'
-require 'rss/trackback'
-
-require "rss/maker"
diff --git a/lib/rss/0.9.rb b/lib/rss/0.9.rb
deleted file mode 100644
index 219ccefcdb..0000000000
--- a/lib/rss/0.9.rb
+++ /dev/null
@@ -1,462 +0,0 @@
-# frozen_string_literal: false
-require_relative "parser"
-
-module RSS
-
- ##
- # = RSS 0.9 support
- #
- # RSS has three different versions. This module contains support for version
- # 0.9.1[http://www.rssboard.org/rss-0-9-1-netscape].
- #
- # == Producing RSS 0.9
- #
- # Producing our own RSS feeds is easy as well. Let's make a very basic feed:
- #
- # require "rss"
- #
- # rss = RSS::Maker.make("0.91") do |maker|
- # maker.channel.language = "en"
- # maker.channel.author = "matz"
- # maker.channel.updated = Time.now.to_s
- # maker.channel.link = "http://www.ruby-lang.org/en/feeds/news.rss"
- # maker.channel.title = "Example Feed"
- # maker.channel.description = "A longer description of my feed."
- # maker.image.url = "http://www.ruby-lang.org/images/logo.gif"
- # maker.image.title = "An image"
- # maker.items.new_item do |item|
- # item.link = "http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/"
- # item.title = "Ruby 1.9.2-p136 is released"
- # item.updated = Time.now.to_s
- # end
- # end
- #
- # puts rss
- #
- # As you can see, this is a very Builder-like DSL. This code will spit out an
- # RSS 0.9 feed with one item. If we needed a second item, we'd make another
- # block with maker.items.new_item and build a second one.
- module RSS09
- NSPOOL = {}
- ELEMENTS = []
-
- def self.append_features(klass)
- super
-
- klass.install_must_call_validator('', "")
- end
- end
-
- class Rss < Element
-
- include RSS09
- include RootElementMixin
-
- %w(channel).each do |name|
- install_have_child_element(name, "", nil)
- end
-
- attr_writer :feed_version
- alias_method(:rss_version, :feed_version)
- alias_method(:rss_version=, :feed_version=)
-
- def initialize(feed_version, version=nil, encoding=nil, standalone=nil)
- super
- @feed_type = "rss"
- end
-
- def items
- if @channel
- @channel.items
- else
- []
- end
- end
-
- def image
- if @channel
- @channel.image
- else
- nil
- end
- end
-
- def textinput
- if @channel
- @channel.textInput
- else
- nil
- end
- end
-
- def setup_maker_elements(maker)
- super
- items.each do |item|
- item.setup_maker(maker.items)
- end
- image.setup_maker(maker) if image
- textinput.setup_maker(maker) if textinput
- end
-
- private
- def _attrs
- [
- ["version", true, "feed_version"],
- ]
- end
-
- class Channel < Element
-
- include RSS09
-
- [
- ["title", nil, :text],
- ["link", nil, :text],
- ["description", nil, :text],
- ["language", nil, :text],
- ["copyright", "?", :text],
- ["managingEditor", "?", :text],
- ["webMaster", "?", :text],
- ["rating", "?", :text],
- ["pubDate", "?", :date, :rfc822],
- ["lastBuildDate", "?", :date, :rfc822],
- ["docs", "?", :text],
- ["cloud", "?", :have_attribute],
- ["skipDays", "?", :have_child],
- ["skipHours", "?", :have_child],
- ["image", nil, :have_child],
- ["item", "*", :have_children],
- ["textInput", "?", :have_child],
- ].each do |name, occurs, type, *args|
- __send__("install_#{type}_element", name, "", occurs, name, *args)
- end
- alias date pubDate
- alias date= pubDate=
-
- private
- def maker_target(maker)
- maker.channel
- end
-
- def setup_maker_elements(channel)
- super
- [
- [skipDays, "day"],
- [skipHours, "hour"],
- ].each do |skip, key|
- if skip
- skip.__send__("#{key}s").each do |val|
- target_skips = channel.__send__("skip#{key.capitalize}s")
- new_target = target_skips.__send__("new_#{key}")
- new_target.content = val.content
- end
- end
- end
- end
-
- def not_need_to_call_setup_maker_variables
- %w(image textInput)
- end
-
- class SkipDays < Element
- include RSS09
-
- [
- ["day", "*"]
- ].each do |name, occurs|
- install_have_children_element(name, "", occurs)
- end
-
- class Day < Element
- include RSS09
-
- content_setup
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.content = args[0]
- end
- end
-
- end
-
- end
-
- class SkipHours < Element
- include RSS09
-
- [
- ["hour", "*"]
- ].each do |name, occurs|
- install_have_children_element(name, "", occurs)
- end
-
- class Hour < Element
- include RSS09
-
- content_setup(:integer)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.content = args[0]
- end
- end
- end
-
- end
-
- class Image < Element
-
- include RSS09
-
- %w(url title link).each do |name|
- install_text_element(name, "", nil)
- end
- [
- ["width", :integer],
- ["height", :integer],
- ["description"],
- ].each do |name, type|
- install_text_element(name, "", "?", name, type)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.url = args[0]
- self.title = args[1]
- self.link = args[2]
- self.width = args[3]
- self.height = args[4]
- self.description = args[5]
- end
- end
-
- private
- def maker_target(maker)
- maker.image
- end
- end
-
- class Cloud < Element
-
- include RSS09
-
- [
- ["domain", "", true],
- ["port", "", true, :integer],
- ["path", "", true],
- ["registerProcedure", "", true],
- ["protocol", "", true],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.domain = args[0]
- self.port = args[1]
- self.path = args[2]
- self.registerProcedure = args[3]
- self.protocol = args[4]
- end
- end
- end
-
- class Item < Element
-
- include RSS09
-
- [
- ["title", '?', :text],
- ["link", '?', :text],
- ["description", '?', :text],
- ["category", '*', :have_children, "categories"],
- ["source", '?', :have_child],
- ["enclosure", '?', :have_child],
- ].each do |tag, occurs, type, *args|
- __send__("install_#{type}_element", tag, "", occurs, tag, *args)
- end
-
- private
- def maker_target(items)
- if items.respond_to?("items")
- # For backward compatibility
- items = items.items
- end
- items.new_item
- end
-
- def setup_maker_element(item)
- super
- @enclosure.setup_maker(item) if @enclosure
- @source.setup_maker(item) if @source
- end
-
- class Source < Element
-
- include RSS09
-
- [
- ["url", "", true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required)
- end
-
- content_setup
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.url = args[0]
- self.content = args[1]
- end
- end
-
- private
- def maker_target(item)
- item.source
- end
-
- def setup_maker_attributes(source)
- source.url = url
- source.content = content
- end
- end
-
- class Enclosure < Element
-
- include RSS09
-
- [
- ["url", "", true],
- ["length", "", true, :integer],
- ["type", "", true],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.url = args[0]
- self.length = args[1]
- self.type = args[2]
- end
- end
-
- private
- def maker_target(item)
- item.enclosure
- end
-
- def setup_maker_attributes(enclosure)
- enclosure.url = url
- enclosure.length = length
- enclosure.type = type
- end
- end
-
- class Category < Element
-
- include RSS09
-
- [
- ["domain", "", false]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required)
- end
-
- content_setup
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.domain = args[0]
- self.content = args[1]
- end
- end
-
- private
- def maker_target(item)
- item.new_category
- end
-
- def setup_maker_attributes(category)
- category.domain = domain
- category.content = content
- end
-
- end
-
- end
-
- class TextInput < Element
-
- include RSS09
-
- %w(title description name link).each do |name|
- install_text_element(name, "", nil)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.title = args[0]
- self.description = args[1]
- self.name = args[2]
- self.link = args[3]
- end
- end
-
- private
- def maker_target(maker)
- maker.textinput
- end
- end
-
- end
-
- end
-
- RSS09::ELEMENTS.each do |name|
- BaseListener.install_get_text_element("", name, name)
- end
-
- module ListenerMixin
- private
- def initial_start_rss(tag_name, prefix, attrs, ns)
- check_ns(tag_name, prefix, ns, "", false)
-
- @rss = Rss.new(attrs['version'], @version, @encoding, @standalone)
- @rss.do_validate = @do_validate
- @rss.xml_stylesheets = @xml_stylesheets
- @last_element = @rss
- pr = Proc.new do |text, tags|
- @rss.validate_for_stream(tags, @ignore_unknown_element) if @do_validate
- end
- @proc_stack.push(pr)
- end
-
- end
-
-end
diff --git a/lib/rss/1.0.rb b/lib/rss/1.0.rb
deleted file mode 100644
index c8f92fb54e..0000000000
--- a/lib/rss/1.0.rb
+++ /dev/null
@@ -1,485 +0,0 @@
-# frozen_string_literal: false
-require_relative "parser"
-
-module RSS
-
- ##
- # = RSS 1.0 support
- #
- # RSS has three different versions. This module contains support for version
- # 1.0[http://web.resource.org/rss/1.0/]
- #
- # == Producing RSS 1.0
- #
- # Producing our own RSS feeds is easy as well. Let's make a very basic feed:
- #
- # require "rss"
- #
- # rss = RSS::Maker.make("1.0") do |maker|
- # maker.channel.language = "en"
- # maker.channel.author = "matz"
- # maker.channel.about = "About my feed."
- # maker.channel.updated = Time.now.to_s
- # maker.channel.link = "http://www.ruby-lang.org/en/feeds/news.rss"
- # maker.channel.title = "Example Feed"
- # maker.channel.description = "A longer description of my feed."
- # maker.items.new_item do |item|
- # item.link = "http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/"
- # item.title = "Ruby 1.9.2-p136 is released"
- # item.updated = Time.now.to_s
- # end
- # end
- #
- # puts rss
- #
- # As you can see, this is a very Builder-like DSL. This code will spit out an
- # RSS 1.0 feed with one item. If we needed a second item, we'd make another
- # block with maker.items.new_item and build a second one.
- module RSS10
- NSPOOL = {}
- ELEMENTS = []
-
- def self.append_features(klass)
- super
-
- klass.install_must_call_validator('', ::RSS::URI)
- end
-
- end
-
- class RDF < Element
-
- include RSS10
- include RootElementMixin
-
- class << self
-
- def required_uri
- URI
- end
-
- end
-
- @tag_name = 'RDF'
-
- PREFIX = 'rdf'
- URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-
- install_ns('', ::RSS::URI)
- install_ns(PREFIX, URI)
-
- [
- ["channel", nil],
- ["image", "?"],
- ["item", "+", :children],
- ["textinput", "?"],
- ].each do |tag, occurs, type|
- type ||= :child
- __send__("install_have_#{type}_element", tag, ::RSS::URI, occurs)
- end
-
- alias_method(:rss_version, :feed_version)
- def initialize(version=nil, encoding=nil, standalone=nil)
- super('1.0', version, encoding, standalone)
- @feed_type = "rss"
- end
-
- def full_name
- tag_name_with_prefix(PREFIX)
- end
-
- class Li < Element
-
- include RSS10
-
- class << self
- def required_uri
- URI
- end
- end
-
- [
- ["resource", [URI, ""], true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.resource = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(PREFIX)
- end
- end
-
- class Seq < Element
-
- include RSS10
-
- Li = ::RSS::RDF::Li
-
- class << self
- def required_uri
- URI
- end
- end
-
- @tag_name = 'Seq'
-
- install_have_children_element("li", URI, "*")
- install_must_call_validator('rdf', ::RSS::RDF::URI)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- @li = args[0] if args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(PREFIX)
- end
-
- def setup_maker(target)
- lis.each do |li|
- target << li.resource
- end
- end
- end
-
- class Bag < Element
-
- include RSS10
-
- Li = ::RSS::RDF::Li
-
- class << self
- def required_uri
- URI
- end
- end
-
- @tag_name = 'Bag'
-
- install_have_children_element("li", URI, "*")
- install_must_call_validator('rdf', URI)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- @li = args[0] if args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(PREFIX)
- end
-
- def setup_maker(target)
- lis.each do |li|
- target << li.resource
- end
- end
- end
-
- class Channel < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- [
- ["about", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- [
- ['title', nil, :text],
- ['link', nil, :text],
- ['description', nil, :text],
- ['image', '?', :have_child],
- ['items', nil, :have_child],
- ['textinput', '?', :have_child],
- ].each do |tag, occurs, type|
- __send__("install_#{type}_element", tag, ::RSS::URI, occurs)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- end
- end
-
- private
- def maker_target(maker)
- maker.channel
- end
-
- def setup_maker_attributes(channel)
- channel.about = about
- end
-
- class Image < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- [
- ["resource", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.resource = args[0]
- end
- end
- end
-
- class Textinput < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- [
- ["resource", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.resource = args[0]
- end
- end
- end
-
- class Items < Element
-
- include RSS10
-
- Seq = ::RSS::RDF::Seq
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- install_have_child_element("Seq", URI, nil)
- install_must_call_validator('rdf', URI)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.Seq = args[0]
- end
- self.Seq ||= Seq.new
- end
-
- def resources
- if @Seq
- @Seq.lis.collect do |li|
- li.resource
- end
- else
- []
- end
- end
- end
- end
-
- class Image < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- [
- ["about", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- %w(title url link).each do |name|
- install_text_element(name, ::RSS::URI, nil)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- end
- end
-
- private
- def maker_target(maker)
- maker.image
- end
- end
-
- class Item < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
-
- [
- ["about", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- [
- ["title", nil],
- ["link", nil],
- ["description", "?"],
- ].each do |tag, occurs|
- install_text_element(tag, ::RSS::URI, occurs)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- end
- end
-
- private
- def maker_target(items)
- if items.respond_to?("items")
- # For backward compatibility
- items = items.items
- end
- items.new_item
- end
- end
-
- class Textinput < Element
-
- include RSS10
-
- class << self
-
- def required_uri
- ::RSS::URI
- end
-
- end
-
- [
- ["about", URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{PREFIX}:#{name}")
- end
-
- %w(title description name link).each do |name|
- install_text_element(name, ::RSS::URI, nil)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- end
- end
-
- private
- def maker_target(maker)
- maker.textinput
- end
- end
-
- end
-
- RSS10::ELEMENTS.each do |name|
- BaseListener.install_get_text_element(URI, name, name)
- end
-
- module ListenerMixin
- private
- def initial_start_RDF(tag_name, prefix, attrs, ns)
- check_ns(tag_name, prefix, ns, RDF::URI, false)
-
- @rss = RDF.new(@version, @encoding, @standalone)
- @rss.do_validate = @do_validate
- @rss.xml_stylesheets = @xml_stylesheets
- @last_element = @rss
- pr = Proc.new do |text, tags|
- @rss.validate_for_stream(tags, @ignore_unknown_element) if @do_validate
- end
- @proc_stack.push(pr)
- end
- end
-
-end
diff --git a/lib/rss/2.0.rb b/lib/rss/2.0.rb
deleted file mode 100644
index 13f9ade918..0000000000
--- a/lib/rss/2.0.rb
+++ /dev/null
@@ -1,143 +0,0 @@
-# frozen_string_literal: false
-require "rss/0.9"
-
-module RSS
-
- ##
- # = RSS 2.0 support
- #
- # RSS has three different versions. This module contains support for version
- # 2.0[http://www.rssboard.org/rss-specification]
- #
- # == Producing RSS 2.0
- #
- # Producing our own RSS feeds is easy as well. Let's make a very basic feed:
- #
- # require "rss"
- #
- # rss = RSS::Maker.make("2.0") do |maker|
- # maker.channel.language = "en"
- # maker.channel.author = "matz"
- # maker.channel.updated = Time.now.to_s
- # maker.channel.link = "http://www.ruby-lang.org/en/feeds/news.rss"
- # maker.channel.title = "Example Feed"
- # maker.channel.description = "A longer description of my feed."
- # maker.items.new_item do |item|
- # item.link = "http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-9-2-p136-is-released/"
- # item.title = "Ruby 1.9.2-p136 is released"
- # item.updated = Time.now.to_s
- # end
- # end
- #
- # puts rss
- #
- # As you can see, this is a very Builder-like DSL. This code will spit out an
- # RSS 2.0 feed with one item. If we needed a second item, we'd make another
- # block with maker.items.new_item and build a second one.
- class Rss
-
- class Channel
-
- [
- ["generator"],
- ["ttl", :integer],
- ].each do |name, type|
- install_text_element(name, "", "?", name, type)
- end
-
- [
- %w(category categories),
- ].each do |name, plural_name|
- install_have_children_element(name, "", "*", name, plural_name)
- end
-
- [
- ["image", "?"],
- ["language", "?"],
- ].each do |name, occurs|
- install_model(name, "", occurs)
- end
-
- Category = Item::Category
-
- class Item
-
- [
- ["comments", "?"],
- ["author", "?"],
- ].each do |name, occurs|
- install_text_element(name, "", occurs)
- end
-
- [
- ["pubDate", '?'],
- ].each do |name, occurs|
- install_date_element(name, "", occurs, name, 'rfc822')
- end
- alias date pubDate
- alias date= pubDate=
-
- [
- ["guid", '?'],
- ].each do |name, occurs|
- install_have_child_element(name, "", occurs)
- end
-
- private
- alias _setup_maker_element setup_maker_element
- def setup_maker_element(item)
- _setup_maker_element(item)
- @guid.setup_maker(item) if @guid
- end
-
- class Guid < Element
-
- include RSS09
-
- [
- ["isPermaLink", "", false, :boolean]
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- content_setup
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.isPermaLink = args[0]
- self.content = args[1]
- end
- end
-
- alias_method :_PermaLink?, :PermaLink?
- private :_PermaLink?
- def PermaLink?
- perma = _PermaLink?
- perma or perma.nil?
- end
-
- private
- def maker_target(item)
- item.guid
- end
-
- def setup_maker_attributes(guid)
- guid.isPermaLink = isPermaLink
- guid.content = content
- end
- end
-
- end
-
- end
-
- end
-
- RSS09::ELEMENTS.each do |name|
- BaseListener.install_get_text_element("", name, name)
- end
-
-end
diff --git a/lib/rss/atom.rb b/lib/rss/atom.rb
deleted file mode 100644
index 48c27330d0..0000000000
--- a/lib/rss/atom.rb
+++ /dev/null
@@ -1,1025 +0,0 @@
-# frozen_string_literal: false
-require_relative 'parser'
-
-module RSS
- ##
- # Atom is an XML-based document format that is used to describe 'feeds' of related information.
- # A typical use is in a news feed where the information is periodically updated and which users
- # can subscribe to. The Atom format is described in http://tools.ietf.org/html/rfc4287
- #
- # The Atom module provides support in reading and creating feeds.
- #
- # See the RSS module for examples consuming and creating feeds.
- module Atom
-
- ##
- # The Atom URI W3C Namespace
-
- URI = "http://www.w3.org/2005/Atom"
-
- ##
- # The XHTML URI W3C Namespace
-
- XHTML_URI = "http://www.w3.org/1999/xhtml"
-
- module CommonModel
- NSPOOL = {}
- ELEMENTS = []
-
- def self.append_features(klass)
- super
- klass.install_must_call_validator("atom", URI)
- [
- ["lang", :xml],
- ["base", :xml],
- ].each do |name, uri, required|
- klass.install_get_attribute(name, uri, required, [nil, :inherit])
- end
- klass.class_eval do
- class << self
- # Returns the Atom URI W3C Namespace
- def required_uri
- URI
- end
-
- # Returns true
- def need_parent?
- true
- end
- end
- end
- end
- end
-
- module ContentModel
- module ClassMethods
- def content_type
- @content_type ||= nil
- end
- end
-
- class << self
- def append_features(klass)
- super
- klass.extend(ClassMethods)
- klass.content_setup(klass.content_type, klass.tag_name)
- end
- end
-
- def maker_target(target)
- target
- end
-
- private
- def setup_maker_element_writer
- "#{self.class.name.split(/::/).last.downcase}="
- end
-
- def setup_maker_element(target)
- target.__send__(setup_maker_element_writer, content)
- super
- end
- end
-
- module URIContentModel
- class << self
- def append_features(klass)
- super
- klass.class_eval do
- @content_type = [nil, :uri]
- include(ContentModel)
- end
- end
- end
- end
-
- # The TextConstruct module is used to define a Text construct Atom element,
- # which is used to store small quantities of human-readable text.
- #
- # The TextConstruct has a type attribute, e.g. text, html, xhtml
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#text.constructs
- module TextConstruct
- def self.append_features(klass)
- super
- klass.class_eval do
- [
- ["type", ""],
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, :text_type)
- end
-
- content_setup
- add_need_initialize_variable("xhtml")
-
- class << self
- def xml_getter
- "xhtml"
- end
-
- def xml_setter
- "xhtml="
- end
- end
- end
- end
-
- attr_writer :xhtml
-
- # Returns or builds the XHTML content.
- def xhtml
- return @xhtml if @xhtml.nil?
- if @xhtml.is_a?(XML::Element) and
- [@xhtml.name, @xhtml.uri] == ["div", XHTML_URI]
- return @xhtml
- end
-
- children = @xhtml
- children = [children] unless children.is_a?(Array)
- XML::Element.new("div", nil, XHTML_URI,
- {"xmlns" => XHTML_URI}, children)
- end
-
- # Returns true if type is "xhtml".
- def have_xml_content?
- @type == "xhtml"
- end
-
- # Raises a MissingTagError or NotExpectedTagError
- # if the element is not properly formatted.
- def atom_validate(ignore_unknown_element, tags, uri)
- if have_xml_content?
- if @xhtml.nil?
- raise MissingTagError.new("div", tag_name)
- end
- unless [@xhtml.name, @xhtml.uri] == ["div", XHTML_URI]
- raise NotExpectedTagError.new(@xhtml.name, @xhtml.uri, tag_name)
- end
- end
- end
-
- private
- def maker_target(target)
- target.__send__(self.class.name.split(/::/).last.downcase) {|x| x}
- end
-
- def setup_maker_attributes(target)
- target.type = type
- target.content = content
- target.xml_content = @xhtml
- end
- end
-
- # The PersonConstruct module is used to define a person Atom element that can be
- # used to describe a person, corporation or similar entity.
- #
- # The PersonConstruct has a Name, Uri and Email child elements.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#atomPersonConstruct
- module PersonConstruct
-
- # Adds attributes for name, uri, and email to the +klass+
- def self.append_features(klass)
- super
- klass.class_eval do
- [
- ["name", nil],
- ["uri", "?"],
- ["email", "?"],
- ].each do |tag, occurs|
- install_have_attribute_element(tag, URI, occurs, nil, :content)
- end
- end
- end
-
- def maker_target(target)
- target.__send__("new_#{self.class.name.split(/::/).last.downcase}")
- end
-
- # The name of the person or entity.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.name
- class Name < RSS::Element
- include CommonModel
- include ContentModel
- end
-
- # The URI of the person or entity.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.uri
- class Uri < RSS::Element
- include CommonModel
- include URIContentModel
- end
-
- # The email of the person or entity.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.email
- class Email < RSS::Element
- include CommonModel
- include ContentModel
- end
- end
-
- # Element used to describe an Atom date and time in the ISO 8601 format
- #
- # Examples:
- # * 2013-03-04T15:30:02Z
- # * 2013-03-04T10:30:02-05:00
- module DateConstruct
- def self.append_features(klass)
- super
- klass.class_eval do
- @content_type = :w3cdtf
- include(ContentModel)
- end
- end
-
- # Raises NotAvailableValueError if element content is nil
- def atom_validate(ignore_unknown_element, tags, uri)
- raise NotAvailableValueError.new(tag_name, "") if content.nil?
- end
- end
-
- module DuplicateLinkChecker
- # Checks if there are duplicate links with the same type and hreflang attributes
- # that have an alternate (or empty) rel attribute
- #
- # Raises a TooMuchTagError if there are duplicates found
- def validate_duplicate_links(links)
- link_infos = {}
- links.each do |link|
- rel = link.rel || "alternate"
- next unless rel == "alternate"
- key = [link.hreflang, link.type]
- if link_infos.has_key?(key)
- raise TooMuchTagError.new("link", tag_name)
- end
- link_infos[key] = true
- end
- end
- end
-
- # Defines the top-level element of an Atom Feed Document.
- # It consists of a number of children Entry elements,
- # and has the following attributes:
- #
- # * author
- # * categories
- # * category
- # * content
- # * contributor
- # * entries (aliased as items)
- # * entry
- # * generator
- # * icon
- # * id
- # * link
- # * logo
- # * rights
- # * subtitle
- # * title
- # * updated
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.feed
- class Feed < RSS::Element
- include RootElementMixin
- include CommonModel
- include DuplicateLinkChecker
-
- install_ns('', URI)
-
- [
- ["author", "*", :children],
- ["category", "*", :children, "categories"],
- ["contributor", "*", :children],
- ["generator", "?"],
- ["icon", "?", nil, :content],
- ["id", nil, nil, :content],
- ["link", "*", :children],
- ["logo", "?"],
- ["rights", "?"],
- ["subtitle", "?", nil, :content],
- ["title", nil, nil, :content],
- ["updated", nil, nil, :content],
- ["entry", "*", :children, "entries"],
- ].each do |tag, occurs, type, *args|
- type ||= :child
- __send__("install_have_#{type}_element",
- tag, URI, occurs, tag, *args)
- end
-
- # Creates a new Atom feed
- def initialize(version=nil, encoding=nil, standalone=nil)
- super("1.0", version, encoding, standalone)
- @feed_type = "atom"
- @feed_subtype = "feed"
- end
-
- alias_method :items, :entries
-
- # Returns true if there are any authors for the feed or any of the Entry
- # child elements have an author
- def have_author?
- authors.any? {|author| !author.to_s.empty?} or
- entries.any? {|entry| entry.have_author?(false)}
- end
-
- private
- def atom_validate(ignore_unknown_element, tags, uri)
- unless have_author?
- raise MissingTagError.new("author", tag_name)
- end
- validate_duplicate_links(links)
- end
-
- def have_required_elements?
- super and have_author?
- end
-
- def maker_target(maker)
- maker.channel
- end
-
- def setup_maker_element(channel)
- prev_dc_dates = channel.dc_dates.to_a.dup
- super
- channel.about = id.content if id
- channel.dc_dates.replace(prev_dc_dates)
- end
-
- def setup_maker_elements(channel)
- super
- items = channel.maker.items
- entries.each do |entry|
- entry.setup_maker(items)
- end
- end
-
- # PersonConstruct that contains information regarding the author
- # of a Feed or Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.author
- class Author < RSS::Element
- include CommonModel
- include PersonConstruct
- end
-
- # Contains information about a category associated with a Feed or Entry.
- # It has the following attributes:
- #
- # * term
- # * scheme
- # * label
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.category
- class Category < RSS::Element
- include CommonModel
-
- [
- ["term", "", true],
- ["scheme", "", false, [nil, :uri]],
- ["label", ""],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- private
- def maker_target(target)
- target.new_category
- end
- end
-
- # PersonConstruct that contains information regarding the
- # contributors of a Feed or Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.contributor
- class Contributor < RSS::Element
- include CommonModel
- include PersonConstruct
- end
-
- # Contains information on the agent used to generate the feed.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.generator
- class Generator < RSS::Element
- include CommonModel
- include ContentModel
-
- [
- ["uri", "", false, [nil, :uri]],
- ["version", ""],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- private
- def setup_maker_attributes(target)
- target.generator do |generator|
- generator.uri = uri if uri
- generator.version = version if version
- end
- end
- end
-
- # Defines an image that provides a visual identification for a eed.
- # The image should have an aspect ratio of 1:1.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.icon
- class Icon < RSS::Element
- include CommonModel
- include URIContentModel
- end
-
- # Defines the Universally Unique Identifier (UUID) for a Feed or Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.id
- class Id < RSS::Element
- include CommonModel
- include URIContentModel
- end
-
- # Defines a reference to a Web resource. It has the following
- # attributes:
- #
- # * href
- # * rel
- # * type
- # * hreflang
- # * title
- # * length
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.link
- class Link < RSS::Element
- include CommonModel
-
- [
- ["href", "", true, [nil, :uri]],
- ["rel", ""],
- ["type", ""],
- ["hreflang", ""],
- ["title", ""],
- ["length", ""],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- private
- def maker_target(target)
- target.new_link
- end
- end
-
- # Defines an image that provides a visual identification for the Feed.
- # The image should have an aspect ratio of 2:1 (horizontal:vertical).
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.logo
- class Logo < RSS::Element
- include CommonModel
- include URIContentModel
-
- def maker_target(target)
- target.maker.image
- end
-
- private
- def setup_maker_element_writer
- "url="
- end
- end
-
- # TextConstruct that contains copyright information regarding
- # the content in an Entry or Feed. It should not be used to
- # convey machine readable licensing information.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.rights
- class Rights < RSS::Element
- include CommonModel
- include TextConstruct
- end
-
- # TextConstruct that conveys a description or subtitle for a Feed.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.subtitle
- class Subtitle < RSS::Element
- include CommonModel
- include TextConstruct
- end
-
- # TextConstruct that conveys a description or title for a Feed or Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.title
- class Title < RSS::Element
- include CommonModel
- include TextConstruct
- end
-
- # DateConstruct indicating the most recent time when a Feed or
- # Entry was modified in a way the publisher considers
- # significant.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.updated
- class Updated < RSS::Element
- include CommonModel
- include DateConstruct
- end
-
- # Defines a child Atom Entry element of an Atom Feed element.
- # It has the following attributes:
- #
- # * author
- # * category
- # * categories
- # * content
- # * contributor
- # * id
- # * link
- # * published
- # * rights
- # * source
- # * summary
- # * title
- # * updated
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.entry
- class Entry < RSS::Element
- include CommonModel
- include DuplicateLinkChecker
-
- [
- ["author", "*", :children],
- ["category", "*", :children, "categories"],
- ["content", "?", :child],
- ["contributor", "*", :children],
- ["id", nil, nil, :content],
- ["link", "*", :children],
- ["published", "?", :child, :content],
- ["rights", "?", :child],
- ["source", "?"],
- ["summary", "?", :child],
- ["title", nil],
- ["updated", nil, :child, :content],
- ].each do |tag, occurs, type, *args|
- type ||= :attribute
- __send__("install_have_#{type}_element",
- tag, URI, occurs, tag, *args)
- end
-
- # Returns whether any of the following are true:
- #
- # * There are any authors in the feed
- # * If the parent element has an author and the +check_parent+
- # parameter was given.
- # * There is a source element that has an author
- def have_author?(check_parent=true)
- authors.any? {|author| !author.to_s.empty?} or
- (check_parent and @parent and @parent.have_author?) or
- (source and source.have_author?)
- end
-
- private
- def atom_validate(ignore_unknown_element, tags, uri)
- unless have_author?
- raise MissingTagError.new("author", tag_name)
- end
- validate_duplicate_links(links)
- end
-
- def have_required_elements?
- super and have_author?
- end
-
- def maker_target(items)
- if items.respond_to?("items")
- # For backward compatibility
- items = items.items
- end
- items.new_item
- end
-
- # Feed::Author
- Author = Feed::Author
- # Feed::Category
- Category = Feed::Category
-
- # Contains or links to the content of the Entry.
- # It has the following attributes:
- #
- # * type
- # * src
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.content
- class Content < RSS::Element
- include CommonModel
-
- class << self
- def xml_setter
- "xml="
- end
-
- def xml_getter
- "xml"
- end
- end
-
- [
- ["type", ""],
- ["src", "", false, [nil, :uri]],
- ].each do |name, uri, required, type|
- install_get_attribute(name, uri, required, type)
- end
-
- content_setup
- add_need_initialize_variable("xml")
-
- # Returns the element content in XML.
- attr_writer :xml
-
- # Returns true if the element has inline XML content.
- def have_xml_content?
- inline_xhtml? or inline_other_xml?
- end
-
- # Returns or builds the element content in XML.
- def xml
- return @xml unless inline_xhtml?
- return @xml if @xml.nil?
- if @xml.is_a?(XML::Element) and
- [@xml.name, @xml.uri] == ["div", XHTML_URI]
- return @xml
- end
-
- children = @xml
- children = [children] unless children.is_a?(Array)
- XML::Element.new("div", nil, XHTML_URI,
- {"xmlns" => XHTML_URI}, children)
- end
-
- # Returns the element content in XHTML.
- def xhtml
- if inline_xhtml?
- xml
- else
- nil
- end
- end
-
- # Raises a MissingAttributeError, NotAvailableValueError,
- # MissingTagError or NotExpectedTagError if the element is
- # not properly formatted.
- def atom_validate(ignore_unknown_element, tags, uri)
- if out_of_line?
- raise MissingAttributeError.new(tag_name, "type") if @type.nil?
- unless (content.nil? or content.empty?)
- raise NotAvailableValueError.new(tag_name, content)
- end
- elsif inline_xhtml?
- if @xml.nil?
- raise MissingTagError.new("div", tag_name)
- end
- unless @xml.name == "div" and @xml.uri == XHTML_URI
- raise NotExpectedTagError.new(@xml.name, @xml.uri, tag_name)
- end
- end
- end
-
- # Returns true if the element contains inline content
- # that has a text or HTML media type, or no media type at all.
- def inline_text?
- !out_of_line? and [nil, "text", "html"].include?(@type)
- end
-
- # Returns true if the element contains inline content that
- # has a HTML media type.
- def inline_html?
- return false if out_of_line?
- @type == "html" or mime_split == ["text", "html"]
- end
-
- # Returns true if the element contains inline content that
- # has a XHTML media type.
- def inline_xhtml?
- !out_of_line? and @type == "xhtml"
- end
-
- # Returns true if the element contains inline content that
- # has a MIME media type.
- def inline_other?
- return false if out_of_line?
- media_type, subtype = mime_split
- return false if media_type.nil? or subtype.nil?
- true
- end
-
- # Returns true if the element contains inline content that
- # has a text media type.
- def inline_other_text?
- return false unless inline_other?
- return false if inline_other_xml?
-
- media_type, = mime_split
- return true if "text" == media_type.downcase
- false
- end
-
- # Returns true if the element contains inline content that
- # has a XML media type.
- def inline_other_xml?
- return false unless inline_other?
-
- media_type, subtype = mime_split
- normalized_mime_type = "#{media_type}/#{subtype}".downcase
- if /(?:\+xml|^xml)$/ =~ subtype or
- %w(text/xml-external-parsed-entity
- application/xml-external-parsed-entity
- application/xml-dtd).find {|x| x == normalized_mime_type}
- return true
- end
- false
- end
-
- # Returns true if the element contains inline content
- # encoded in base64.
- def inline_other_base64?
- inline_other? and !inline_other_text? and !inline_other_xml?
- end
-
- # Returns true if the element contains linked content.
- def out_of_line?
- not @src.nil?
- end
-
- # Splits the type attribute into an array, e.g. ["text", "xml"]
- def mime_split
- media_type = subtype = nil
- if /\A\s*([a-z]+)\/([a-z\+]+)\s*(?:;.*)?\z/i =~ @type.to_s
- media_type = $1.downcase
- subtype = $2.downcase
- end
- [media_type, subtype]
- end
-
- # Returns true if the content needs to be encoded in base64.
- def need_base64_encode?
- inline_other_base64?
- end
-
- private
- def empty_content?
- out_of_line? or super
- end
- end
-
- # Feed::Contributor
- Contributor = Feed::Contributor
- # Feed::Id
- Id = Feed::Id
- # Feed::Link
- Link = Feed::Link
-
- # DateConstruct that usually indicates the time of the initial
- # creation of an Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.published
- class Published < RSS::Element
- include CommonModel
- include DateConstruct
- end
-
- # Feed::Rights
- Rights = Feed::Rights
-
- # Defines a Atom Source element. It has the following attributes:
- #
- # * author
- # * category
- # * categories
- # * content
- # * contributor
- # * generator
- # * icon
- # * id
- # * link
- # * logo
- # * rights
- # * subtitle
- # * title
- # * updated
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.source
- class Source < RSS::Element
- include CommonModel
-
- [
- ["author", "*", :children],
- ["category", "*", :children, "categories"],
- ["contributor", "*", :children],
- ["generator", "?"],
- ["icon", "?"],
- ["id", "?", nil, :content],
- ["link", "*", :children],
- ["logo", "?"],
- ["rights", "?"],
- ["subtitle", "?"],
- ["title", "?"],
- ["updated", "?", nil, :content],
- ].each do |tag, occurs, type, *args|
- type ||= :attribute
- __send__("install_have_#{type}_element",
- tag, URI, occurs, tag, *args)
- end
-
- # Returns true if the Source element has an author.
- def have_author?
- !author.to_s.empty?
- end
-
- # Feed::Author
- Author = Feed::Author
- # Feed::Category
- Category = Feed::Category
- # Feed::Contributor
- Contributor = Feed::Contributor
- # Feed::Generator
- Generator = Feed::Generator
- # Feed::Icon
- Icon = Feed::Icon
- # Feed::Id
- Id = Feed::Id
- # Feed::Link
- Link = Feed::Link
- # Feed::Logo
- Logo = Feed::Logo
- # Feed::Rights
- Rights = Feed::Rights
- # Feed::Subtitle
- Subtitle = Feed::Subtitle
- # Feed::Title
- Title = Feed::Title
- # Feed::Updated
- Updated = Feed::Updated
- end
-
- # TextConstruct that describes a summary of the Entry.
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.summary
- class Summary < RSS::Element
- include CommonModel
- include TextConstruct
- end
-
- # Feed::Title
- Title = Feed::Title
- # Feed::Updated
- Updated = Feed::Updated
- end
- end
-
- # Defines a top-level Atom Entry element,
- # used as the document element of a stand-alone Atom Entry Document.
- # It has the following attributes:
- #
- # * author
- # * category
- # * categories
- # * content
- # * contributor
- # * id
- # * link
- # * published
- # * rights
- # * source
- # * summary
- # * title
- # * updated
- #
- # Reference: https://validator.w3.org/feed/docs/rfc4287.html#element.entry]
- class Entry < RSS::Element
- include RootElementMixin
- include CommonModel
- include DuplicateLinkChecker
-
- [
- ["author", "*", :children],
- ["category", "*", :children, "categories"],
- ["content", "?"],
- ["contributor", "*", :children],
- ["id", nil, nil, :content],
- ["link", "*", :children],
- ["published", "?", :child, :content],
- ["rights", "?"],
- ["source", "?"],
- ["summary", "?"],
- ["title", nil],
- ["updated", nil, nil, :content],
- ].each do |tag, occurs, type, *args|
- type ||= :attribute
- __send__("install_have_#{type}_element",
- tag, URI, occurs, tag, *args)
- end
-
- # Creates a new Atom Entry element.
- def initialize(version=nil, encoding=nil, standalone=nil)
- super("1.0", version, encoding, standalone)
- @feed_type = "atom"
- @feed_subtype = "entry"
- end
-
- # Returns the Entry in an array.
- def items
- [self]
- end
-
- # Sets up the +maker+ for constructing Entry elements.
- def setup_maker(maker)
- maker = maker.maker if maker.respond_to?("maker")
- super(maker)
- end
-
- # Returns where there are any authors present or there is a
- # source with an author.
- def have_author?
- authors.any? {|author| !author.to_s.empty?} or
- (source and source.have_author?)
- end
-
- private
- def atom_validate(ignore_unknown_element, tags, uri)
- unless have_author?
- raise MissingTagError.new("author", tag_name)
- end
- validate_duplicate_links(links)
- end
-
- def have_required_elements?
- super and have_author?
- end
-
- def maker_target(maker)
- maker.items.new_item
- end
-
- # Feed::Entry::Author
- Author = Feed::Entry::Author
- # Feed::Entry::Category
- Category = Feed::Entry::Category
- # Feed::Entry::Content
- Content = Feed::Entry::Content
- # Feed::Entry::Contributor
- Contributor = Feed::Entry::Contributor
- # Feed::Entry::Id
- Id = Feed::Entry::Id
- # Feed::Entry::Link
- Link = Feed::Entry::Link
- # Feed::Entry::Published
- Published = Feed::Entry::Published
- # Feed::Entry::Rights
- Rights = Feed::Entry::Rights
- # Feed::Entry::Source
- Source = Feed::Entry::Source
- # Feed::Entry::Summary
- Summary = Feed::Entry::Summary
- # Feed::Entry::Title
- Title = Feed::Entry::Title
- # Feed::Entry::Updated
- Updated = Feed::Entry::Updated
- end
- end
-
- Atom::CommonModel::ELEMENTS.each do |name|
- BaseListener.install_get_text_element(Atom::URI, name, "#{name}=")
- end
-
- module ListenerMixin
- private
- def initial_start_feed(tag_name, prefix, attrs, ns)
- check_ns(tag_name, prefix, ns, Atom::URI, false)
-
- @rss = Atom::Feed.new(@version, @encoding, @standalone)
- @rss.do_validate = @do_validate
- @rss.xml_stylesheets = @xml_stylesheets
- @rss.lang = attrs["xml:lang"]
- @rss.base = attrs["xml:base"]
- @last_element = @rss
- pr = Proc.new do |text, tags|
- @rss.validate_for_stream(tags) if @do_validate
- end
- @proc_stack.push(pr)
- end
-
- def initial_start_entry(tag_name, prefix, attrs, ns)
- check_ns(tag_name, prefix, ns, Atom::URI, false)
-
- @rss = Atom::Entry.new(@version, @encoding, @standalone)
- @rss.do_validate = @do_validate
- @rss.xml_stylesheets = @xml_stylesheets
- @rss.lang = attrs["xml:lang"]
- @rss.base = attrs["xml:base"]
- @last_element = @rss
- pr = Proc.new do |text, tags|
- @rss.validate_for_stream(tags) if @do_validate
- end
- @proc_stack.push(pr)
- end
- end
-end
diff --git a/lib/rss/content.rb b/lib/rss/content.rb
deleted file mode 100644
index 78c18d103c..0000000000
--- a/lib/rss/content.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-require_relative "rss"
-
-module RSS
- # The prefix for the Content XML namespace.
- CONTENT_PREFIX = 'content'
- # The URI of the Content specification.
- CONTENT_URI = "http://purl.org/rss/1.0/modules/content/"
-
- module ContentModel
- extend BaseModel
-
- ELEMENTS = ["#{CONTENT_PREFIX}_encoded"]
-
- def self.append_features(klass)
- super
-
- klass.install_must_call_validator(CONTENT_PREFIX, CONTENT_URI)
- ELEMENTS.each do |full_name|
- name = full_name[(CONTENT_PREFIX.size + 1)..-1]
- klass.install_text_element(name, CONTENT_URI, "?", full_name)
- end
- end
- end
-
- prefix_size = CONTENT_PREFIX.size + 1
- ContentModel::ELEMENTS.each do |full_name|
- name = full_name[prefix_size..-1]
- BaseListener.install_get_text_element(CONTENT_URI, name, full_name)
- end
-end
-
-require 'rss/content/1.0'
-require 'rss/content/2.0'
diff --git a/lib/rss/content/1.0.rb b/lib/rss/content/1.0.rb
deleted file mode 100644
index 1367dfe092..0000000000
--- a/lib/rss/content/1.0.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: false
-require 'rss/1.0'
-
-module RSS
- RDF.install_ns(CONTENT_PREFIX, CONTENT_URI)
-
- class RDF
- class Item; include ContentModel; end
- end
-end
diff --git a/lib/rss/content/2.0.rb b/lib/rss/content/2.0.rb
deleted file mode 100644
index 3b468248ac..0000000000
--- a/lib/rss/content/2.0.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: false
-require "rss/2.0"
-
-module RSS
- Rss.install_ns(CONTENT_PREFIX, CONTENT_URI)
-
- class Rss
- class Channel
- class Item; include ContentModel; end
- end
- end
-end
diff --git a/lib/rss/converter.rb b/lib/rss/converter.rb
deleted file mode 100644
index d372e06725..0000000000
--- a/lib/rss/converter.rb
+++ /dev/null
@@ -1,171 +0,0 @@
-# frozen_string_literal: false
-require_relative "utils"
-
-module RSS
-
- class Converter
-
- include Utils
-
- def initialize(to_enc, from_enc=nil)
- if "".respond_to?(:encode)
- @to_encoding = to_enc
- return
- end
- normalized_to_enc = to_enc.downcase.gsub(/-/, '_')
- from_enc ||= 'utf-8'
- normalized_from_enc = from_enc.downcase.gsub(/-/, '_')
- if normalized_to_enc == normalized_from_enc
- def_same_enc()
- else
- def_diff_enc = "def_to_#{normalized_to_enc}_from_#{normalized_from_enc}"
- if respond_to?(def_diff_enc)
- __send__(def_diff_enc)
- else
- def_else_enc(to_enc, from_enc)
- end
- end
- end
-
- def convert(value)
- if value.is_a?(String) and value.respond_to?(:encode)
- value.encode(@to_encoding)
- else
- value
- end
- end
-
- def def_convert(depth=0)
- instance_eval(<<-EOC, *get_file_and_line_from_caller(depth))
- def convert(value)
- if value.kind_of?(String)
- #{yield('value')}
- else
- value
- end
- end
- EOC
- end
-
- def def_iconv_convert(to_enc, from_enc, depth=0)
- begin
- require "iconv"
- @iconv = Iconv.new(to_enc, from_enc)
- def_convert(depth+1) do |value|
- <<-EOC
- begin
- @iconv.iconv(#{value})
- rescue Iconv::Failure
- raise ConversionError.new(#{value}, "#{to_enc}", "#{from_enc}")
- end
- EOC
- end
- rescue LoadError, ArgumentError, SystemCallError
- raise UnknownConversionMethodError.new(to_enc, from_enc)
- end
- end
-
- def def_else_enc(to_enc, from_enc)
- def_iconv_convert(to_enc, from_enc, 0)
- end
-
- def def_same_enc()
- def_convert do |value|
- value
- end
- end
-
- def def_uconv_convert_if_can(meth, to_enc, from_enc, nkf_arg)
- begin
- require "uconv"
- def_convert(1) do |value|
- <<-EOC
- begin
- Uconv.#{meth}(#{value})
- rescue Uconv::Error
- raise ConversionError.new(#{value}, "#{to_enc}", "#{from_enc}")
- end
- EOC
- end
- rescue LoadError
- require 'nkf'
- if NKF.const_defined?(:UTF8)
- def_convert(1) do |value|
- "NKF.nkf(#{nkf_arg.dump}, #{value})"
- end
- else
- def_iconv_convert(to_enc, from_enc, 1)
- end
- end
- end
-
- def def_to_euc_jp_from_utf_8
- def_uconv_convert_if_can('u8toeuc', 'EUC-JP', 'UTF-8', '-We')
- end
-
- def def_to_utf_8_from_euc_jp
- def_uconv_convert_if_can('euctou8', 'UTF-8', 'EUC-JP', '-Ew')
- end
-
- def def_to_shift_jis_from_utf_8
- def_uconv_convert_if_can('u8tosjis', 'Shift_JIS', 'UTF-8', '-Ws')
- end
-
- def def_to_utf_8_from_shift_jis
- def_uconv_convert_if_can('sjistou8', 'UTF-8', 'Shift_JIS', '-Sw')
- end
-
- def def_to_euc_jp_from_shift_jis
- require "nkf"
- def_convert do |value|
- "NKF.nkf('-Se', #{value})"
- end
- end
-
- def def_to_shift_jis_from_euc_jp
- require "nkf"
- def_convert do |value|
- "NKF.nkf('-Es', #{value})"
- end
- end
-
- def def_to_euc_jp_from_iso_2022_jp
- require "nkf"
- def_convert do |value|
- "NKF.nkf('-Je', #{value})"
- end
- end
-
- def def_to_iso_2022_jp_from_euc_jp
- require "nkf"
- def_convert do |value|
- "NKF.nkf('-Ej', #{value})"
- end
- end
-
- def def_to_utf_8_from_iso_8859_1
- def_convert do |value|
- "#{value}.unpack('C*').pack('U*')"
- end
- end
-
- def def_to_iso_8859_1_from_utf_8
- def_convert do |value|
- <<-EOC
- array_utf8 = #{value}.unpack('U*')
- array_enc = []
- array_utf8.each do |num|
- if num <= 0xFF
- array_enc << num
- else
- array_enc.concat "&\#\#{num};".unpack('C*')
- end
- end
- array_enc.pack('C*')
- EOC
- end
- end
-
- end
-
-end
diff --git a/lib/rss/dublincore.rb b/lib/rss/dublincore.rb
deleted file mode 100644
index 85b836d3bf..0000000000
--- a/lib/rss/dublincore.rb
+++ /dev/null
@@ -1,164 +0,0 @@
-# frozen_string_literal: false
-require_relative "rss"
-
-module RSS
- # The prefix for the Dublin Core XML namespace.
- DC_PREFIX = 'dc'
- # The URI of the Dublin Core specification.
- DC_URI = "http://purl.org/dc/elements/1.1/"
-
- module BaseDublinCoreModel
- def append_features(klass)
- super
-
- return if klass.instance_of?(Module)
- DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
- plural = plural_name || "#{name}s"
- full_name = "#{DC_PREFIX}_#{name}"
- full_plural_name = "#{DC_PREFIX}_#{plural}"
- klass_name = "DublinCore#{Utils.to_class_name(name)}"
- klass.install_must_call_validator(DC_PREFIX, DC_URI)
- klass.install_have_children_element(name, DC_URI, "*",
- full_name, full_plural_name)
- klass.module_eval(<<-EOC, *get_file_and_line_from_caller(0))
- remove_method :#{full_name}
- remove_method :#{full_name}=
- remove_method :set_#{full_name}
-
- def #{full_name}
- @#{full_name}.first and @#{full_name}.first.value
- end
-
- def #{full_name}=(new_value)
- @#{full_name}[0] = Utils.new_with_value_if_need(#{klass_name}, new_value)
- end
- alias set_#{full_name} #{full_name}=
- EOC
- end
- klass.module_eval(<<-EOC, *get_file_and_line_from_caller(0))
- if method_defined?(:date)
- alias date_without_#{DC_PREFIX}_date= date=
-
- def date=(value)
- self.date_without_#{DC_PREFIX}_date = value
- self.#{DC_PREFIX}_date = value
- end
- else
- alias date #{DC_PREFIX}_date
- alias date= #{DC_PREFIX}_date=
- end
-
- # For backward compatibility
- alias #{DC_PREFIX}_rightses #{DC_PREFIX}_rights_list
- EOC
- end
- end
-
- module DublinCoreModel
-
- extend BaseModel
- extend BaseDublinCoreModel
-
- TEXT_ELEMENTS = {
- "title" => nil,
- "description" => nil,
- "creator" => nil,
- "subject" => nil,
- "publisher" => nil,
- "contributor" => nil,
- "type" => nil,
- "format" => nil,
- "identifier" => nil,
- "source" => nil,
- "language" => nil,
- "relation" => nil,
- "coverage" => nil,
- "rights" => "rights_list"
- }
-
- DATE_ELEMENTS = {
- "date" => "w3cdtf",
- }
-
- ELEMENT_NAME_INFOS = DublinCoreModel::TEXT_ELEMENTS.to_a
- DublinCoreModel::DATE_ELEMENTS.each do |name, |
- ELEMENT_NAME_INFOS << [name, nil]
- end
-
- ELEMENTS = TEXT_ELEMENTS.keys + DATE_ELEMENTS.keys
-
- ELEMENTS.each do |name, plural_name|
- module_eval(<<-EOC, *get_file_and_line_from_caller(0))
- class DublinCore#{Utils.to_class_name(name)} < Element
- include RSS10
-
- content_setup
-
- class << self
- def required_prefix
- DC_PREFIX
- end
-
- def required_uri
- DC_URI
- end
- end
-
- @tag_name = #{name.dump}
-
- alias_method(:value, :content)
- alias_method(:value=, :content=)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.content = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(DC_PREFIX)
- end
-
- def maker_target(target)
- target.new_#{name}
- end
-
- def setup_maker_attributes(#{name})
- #{name}.content = content
- end
- end
- EOC
- end
-
- DATE_ELEMENTS.each do |name, type|
- tag_name = "#{DC_PREFIX}:#{name}"
- module_eval(<<-EOC, *get_file_and_line_from_caller(0))
- class DublinCore#{Utils.to_class_name(name)} < Element
- remove_method(:content=)
- remove_method(:value=)
-
- date_writer("content", #{type.dump}, #{tag_name.dump})
-
- alias_method(:value=, :content=)
- end
- EOC
- end
- end
-
- # For backward compatibility
- DublincoreModel = DublinCoreModel
-
- DublinCoreModel::ELEMENTS.each do |name|
- class_name = Utils.to_class_name(name)
- BaseListener.install_class_name(DC_URI, name, "DublinCore#{class_name}")
- end
-
- DublinCoreModel::ELEMENTS.collect! {|name| "#{DC_PREFIX}_#{name}"}
-end
-
-require 'rss/dublincore/1.0'
-require 'rss/dublincore/2.0'
-require_relative 'dublincore/atom'
diff --git a/lib/rss/dublincore/1.0.rb b/lib/rss/dublincore/1.0.rb
deleted file mode 100644
index 1d96fab9b9..0000000000
--- a/lib/rss/dublincore/1.0.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: false
-require "rss/1.0"
-
-module RSS
- RDF.install_ns(DC_PREFIX, DC_URI)
-
- class RDF
- class Channel; include DublinCoreModel; end
- class Image; include DublinCoreModel; end
- class Item; include DublinCoreModel; end
- class Textinput; include DublinCoreModel; end
- end
-end
diff --git a/lib/rss/dublincore/2.0.rb b/lib/rss/dublincore/2.0.rb
deleted file mode 100644
index e3011fef6a..0000000000
--- a/lib/rss/dublincore/2.0.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: false
-require "rss/2.0"
-
-module RSS
- Rss.install_ns(DC_PREFIX, DC_URI)
-
- class Rss
- class Channel
- include DublinCoreModel
- class Item; include DublinCoreModel; end
- end
- end
-end
diff --git a/lib/rss/dublincore/atom.rb b/lib/rss/dublincore/atom.rb
deleted file mode 100644
index 1cfcdec677..0000000000
--- a/lib/rss/dublincore/atom.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-require_relative "../atom"
-
-module RSS
- module Atom
- Feed.install_ns(DC_PREFIX, DC_URI)
-
- class Feed
- include DublinCoreModel
- class Entry; include DublinCoreModel; end
- end
-
- class Entry
- include DublinCoreModel
- end
- end
-end
diff --git a/lib/rss/image.rb b/lib/rss/image.rb
deleted file mode 100644
index 837f7d18f4..0000000000
--- a/lib/rss/image.rb
+++ /dev/null
@@ -1,198 +0,0 @@
-# frozen_string_literal: false
-require 'rss/1.0'
-require_relative 'dublincore'
-
-module RSS
-
- # The prefix for the Image XML namespace.
- IMAGE_PREFIX = 'image'
- # The URI for the Image specification.
- IMAGE_URI = 'http://purl.org/rss/1.0/modules/image/'
-
- RDF.install_ns(IMAGE_PREFIX, IMAGE_URI)
-
- # This constant holds strings which contain the names of
- # image elements, with the appropriate prefix.
- IMAGE_ELEMENTS = []
-
- %w(item favicon).each do |name|
- class_name = Utils.to_class_name(name)
- BaseListener.install_class_name(IMAGE_URI, name, "Image#{class_name}")
- IMAGE_ELEMENTS << "#{IMAGE_PREFIX}_#{name}"
- end
-
- module ImageModelUtils
- def validate_one_tag_name(ignore_unknown_element, name, tags)
- if !ignore_unknown_element
- invalid = tags.find {|tag| tag != name}
- raise UnknownTagError.new(invalid, IMAGE_URI) if invalid
- end
- raise TooMuchTagError.new(name, tag_name) if tags.size > 1
- end
- end
-
- module ImageItemModel
- include ImageModelUtils
- extend BaseModel
-
- def self.append_features(klass)
- super
-
- klass.install_have_child_element("item", IMAGE_URI, "?",
- "#{IMAGE_PREFIX}_item")
- klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI)
- end
-
- class ImageItem < Element
- include RSS10
- include DublinCoreModel
-
- @tag_name = "item"
-
- class << self
- def required_prefix
- IMAGE_PREFIX
- end
-
- def required_uri
- IMAGE_URI
- end
- end
-
- install_must_call_validator(IMAGE_PREFIX, IMAGE_URI)
-
- [
- ["about", ::RSS::RDF::URI, true],
- ["resource", ::RSS::RDF::URI, false],
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{::RSS::RDF::PREFIX}:#{name}")
- end
-
- %w(width height).each do |tag|
- full_name = "#{IMAGE_PREFIX}_#{tag}"
- disp_name = "#{IMAGE_PREFIX}:#{tag}"
- install_text_element(tag, IMAGE_URI, "?",
- full_name, :integer, disp_name)
- BaseListener.install_get_text_element(IMAGE_URI, tag, full_name)
- end
-
- alias width= image_width=
- alias width image_width
- alias height= image_height=
- alias height image_height
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- self.resource = args[1]
- end
- end
-
- def full_name
- tag_name_with_prefix(IMAGE_PREFIX)
- end
-
- private
- def maker_target(target)
- target.image_item
- end
-
- def setup_maker_attributes(item)
- item.about = self.about
- item.resource = self.resource
- end
- end
- end
-
- module ImageFaviconModel
- include ImageModelUtils
- extend BaseModel
-
- def self.append_features(klass)
- super
-
- unless klass.class == Module
- klass.install_have_child_element("favicon", IMAGE_URI, "?",
- "#{IMAGE_PREFIX}_favicon")
- klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI)
- end
- end
-
- class ImageFavicon < Element
- include RSS10
- include DublinCoreModel
-
- @tag_name = "favicon"
-
- class << self
- def required_prefix
- IMAGE_PREFIX
- end
-
- def required_uri
- IMAGE_URI
- end
- end
-
- [
- ["about", ::RSS::RDF::URI, true, ::RSS::RDF::PREFIX],
- ["size", IMAGE_URI, true, IMAGE_PREFIX],
- ].each do |name, uri, required, prefix|
- install_get_attribute(name, uri, required, nil, nil,
- "#{prefix}:#{name}")
- end
-
- AVAILABLE_SIZES = %w(small medium large)
- alias_method :set_size, :size=
- private :set_size
- def size=(new_value)
- if @do_validate and !new_value.nil?
- new_value = new_value.strip
- unless AVAILABLE_SIZES.include?(new_value)
- attr_name = "#{IMAGE_PREFIX}:size"
- raise NotAvailableValueError.new(full_name, new_value, attr_name)
- end
- end
- set_size(new_value)
- end
-
- alias image_size= size=
- alias image_size size
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- self.size = args[1]
- end
- end
-
- def full_name
- tag_name_with_prefix(IMAGE_PREFIX)
- end
-
- private
- def maker_target(target)
- target.image_favicon
- end
-
- def setup_maker_attributes(favicon)
- favicon.about = self.about
- favicon.size = self.size
- end
- end
-
- end
-
- class RDF
- class Channel; include ImageFaviconModel; end
- class Item; include ImageItemModel; end
- end
-
-end
diff --git a/lib/rss/itunes.rb b/lib/rss/itunes.rb
deleted file mode 100644
index bc3e25448a..0000000000
--- a/lib/rss/itunes.rb
+++ /dev/null
@@ -1,425 +0,0 @@
-# frozen_string_literal: false
-require 'rss/2.0'
-
-module RSS
- # The prefix for the iTunes XML namespace.
- ITUNES_PREFIX = 'itunes'
- # The URI of the iTunes specification.
- ITUNES_URI = 'http://www.itunes.com/dtds/podcast-1.0.dtd'
-
- Rss.install_ns(ITUNES_PREFIX, ITUNES_URI)
-
- module ITunesModelUtils
- include Utils
-
- def def_class_accessor(klass, name, type, *args)
- normalized_name = name.gsub(/-/, "_")
- full_name = "#{ITUNES_PREFIX}_#{normalized_name}"
- klass_name = "ITunes#{Utils.to_class_name(normalized_name)}"
-
- case type
- when :element, :attribute
- klass::ELEMENTS << full_name
- def_element_class_accessor(klass, name, full_name, klass_name, *args)
- when :elements
- klass::ELEMENTS << full_name
- def_elements_class_accessor(klass, name, full_name, klass_name, *args)
- else
- klass.install_must_call_validator(ITUNES_PREFIX, ITUNES_URI)
- klass.install_text_element(normalized_name, ITUNES_URI, "?",
- full_name, type, name)
- end
- end
-
- def def_element_class_accessor(klass, name, full_name, klass_name,
- recommended_attribute_name=nil)
- klass.install_have_child_element(name, ITUNES_PREFIX, "?", full_name)
- end
-
- def def_elements_class_accessor(klass, name, full_name, klass_name,
- plural_name, recommended_attribute_name=nil)
- full_plural_name = "#{ITUNES_PREFIX}_#{plural_name}"
- klass.install_have_children_element(name, ITUNES_PREFIX, "*",
- full_name, full_plural_name)
- end
- end
-
- module ITunesBaseModel
- extend ITunesModelUtils
-
- ELEMENTS = []
-
- ELEMENT_INFOS = [["author"],
- ["block", :yes_other],
- ["explicit", :explicit_clean_other],
- ["keywords", :csv],
- ["subtitle"],
- ["summary"]]
- end
-
- module ITunesChannelModel
- extend BaseModel
- extend ITunesModelUtils
- include ITunesBaseModel
-
- ELEMENTS = []
-
- class << self
- def append_features(klass)
- super
-
- return if klass.instance_of?(Module)
- ELEMENT_INFOS.each do |name, type, *additional_infos|
- def_class_accessor(klass, name, type, *additional_infos)
- end
- end
- end
-
- ELEMENT_INFOS = [
- ["category", :elements, "categories", "text"],
- ["image", :attribute, "href"],
- ["owner", :element],
- ["new-feed-url"],
- ] + ITunesBaseModel::ELEMENT_INFOS
-
- class ITunesCategory < Element
- include RSS09
-
- @tag_name = "category"
-
- class << self
- def required_prefix
- ITUNES_PREFIX
- end
-
- def required_uri
- ITUNES_URI
- end
- end
-
- [
- ["text", "", true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required)
- end
-
- ITunesCategory = self
- install_have_children_element("category", ITUNES_URI, "*",
- "#{ITUNES_PREFIX}_category",
- "#{ITUNES_PREFIX}_categories")
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.text = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(ITUNES_PREFIX)
- end
-
- private
- def maker_target(categories)
- if text or !itunes_categories.empty?
- categories.new_category
- else
- nil
- end
- end
-
- def setup_maker_attributes(category)
- category.text = text if text
- end
-
- def setup_maker_elements(category)
- super(category)
- itunes_categories.each do |sub_category|
- sub_category.setup_maker(category)
- end
- end
- end
-
- class ITunesImage < Element
- include RSS09
-
- @tag_name = "image"
-
- class << self
- def required_prefix
- ITUNES_PREFIX
- end
-
- def required_uri
- ITUNES_URI
- end
- end
-
- [
- ["href", "", true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required)
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.href = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(ITUNES_PREFIX)
- end
-
- private
- def maker_target(target)
- if href
- target.itunes_image {|image| image}
- else
- nil
- end
- end
-
- def setup_maker_attributes(image)
- image.href = href
- end
- end
-
- class ITunesOwner < Element
- include RSS09
-
- @tag_name = "owner"
-
- class << self
- def required_prefix
- ITUNES_PREFIX
- end
-
- def required_uri
- ITUNES_URI
- end
- end
-
- install_must_call_validator(ITUNES_PREFIX, ITUNES_URI)
- [
- ["name"],
- ["email"],
- ].each do |name,|
- ITunesBaseModel::ELEMENT_INFOS << name
- install_text_element(name, ITUNES_URI, nil, "#{ITUNES_PREFIX}_#{name}")
- end
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.itunes_name = args[0]
- self.itunes_email = args[1]
- end
- end
-
- def full_name
- tag_name_with_prefix(ITUNES_PREFIX)
- end
-
- private
- def maker_target(target)
- target.itunes_owner
- end
-
- def setup_maker_element(owner)
- super(owner)
- owner.itunes_name = itunes_name
- owner.itunes_email = itunes_email
- end
- end
- end
-
- module ITunesItemModel
- extend BaseModel
- extend ITunesModelUtils
- include ITunesBaseModel
-
- class << self
- def append_features(klass)
- super
-
- return if klass.instance_of?(Module)
- ELEMENT_INFOS.each do |name, type|
- def_class_accessor(klass, name, type)
- end
- end
- end
-
- ELEMENT_INFOS = ITunesBaseModel::ELEMENT_INFOS +
- [["duration", :element, "content"]]
-
- class ITunesDuration < Element
- include RSS09
-
- @tag_name = "duration"
-
- class << self
- def required_prefix
- ITUNES_PREFIX
- end
-
- def required_uri
- ITUNES_URI
- end
-
- def parse(duration, do_validate=true)
- if do_validate and /\A(?:
- \d?\d:[0-5]\d:[0-5]\d|
- [0-5]?\d:[0-5]\d|
- \d+
- )\z/x !~ duration
- raise ArgumentError,
- "must be one of HH:MM:SS, H:MM:SS, MM:SS, M:SS, S+: " +
- duration.inspect
- end
-
- if duration.include?(':')
- components = duration.split(':')
- components[3..-1] = nil if components.size > 3
-
- components.unshift("00") until components.size == 3
- components.collect do |component|
- component.to_i
- end
- else
- seconds_to_components(duration.to_i)
- end
- end
-
- def construct(hours, minutes, seconds)
- components = [minutes, seconds]
- if components.include?(nil)
- nil
- else
- components.unshift(hours) if hours and hours > 0
- components.collect do |component|
- "%02d" % component
- end.join(':')
- end
- end
-
- private
- def seconds_to_components(total_seconds)
- hours = total_seconds / (60 * 60)
- minutes = (total_seconds / 60) % 60
- seconds = total_seconds % 60
- [hours, minutes, seconds]
- end
- end
-
- content_setup
- alias_method(:value, :content)
- remove_method(:content=)
-
- attr_reader :hour, :minute, :second
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- args = args[0] if args.size == 1 and args[0].is_a?(Array)
- if args.size == 1
- self.content = args[0]
- elsif args.size > 3
- raise ArgumentError,
- "must be (do_validate, params), (content), " +
- "(minute, second), ([minute, second]), " +
- "(hour, minute, second) or ([hour, minute, second]): " +
- args.inspect
- else
- @second, @minute, @hour = args.reverse
- update_content
- end
- end
- end
-
- def content=(value)
- if value.nil?
- @content = nil
- elsif value.is_a?(self.class)
- self.content = value.content
- else
- begin
- @hour, @minute, @second = self.class.parse(value, @do_validate)
- rescue ArgumentError
- raise NotAvailableValueError.new(tag_name, value)
- end
- @content = value
- end
- end
- alias_method(:value=, :content=)
-
- def hour=(hour)
- @hour = @do_validate ? Integer(hour) : hour.to_i
- update_content
- hour
- end
-
- def minute=(minute)
- @minute = @do_validate ? Integer(minute) : minute.to_i
- update_content
- minute
- end
-
- def second=(second)
- @second = @do_validate ? Integer(second) : second.to_i
- update_content
- second
- end
-
- def full_name
- tag_name_with_prefix(ITUNES_PREFIX)
- end
-
- private
- def update_content
- @content = self.class.construct(hour, minute, second)
- end
-
- def maker_target(target)
- if @content
- target.itunes_duration {|duration| duration}
- else
- nil
- end
- end
-
- def setup_maker_element(duration)
- super(duration)
- duration.content = @content
- end
- end
- end
-
- class Rss
- class Channel
- include ITunesChannelModel
- class Item; include ITunesItemModel; end
- end
- end
-
- element_infos =
- ITunesChannelModel::ELEMENT_INFOS + ITunesItemModel::ELEMENT_INFOS
- element_infos.each do |name, type|
- case type
- when :element, :elements, :attribute
- class_name = Utils.to_class_name(name)
- BaseListener.install_class_name(ITUNES_URI, name, "ITunes#{class_name}")
- else
- accessor_base = "#{ITUNES_PREFIX}_#{name.gsub(/-/, '_')}"
- BaseListener.install_get_text_element(ITUNES_URI, name, accessor_base)
- end
- end
-end
diff --git a/lib/rss/maker.rb b/lib/rss/maker.rb
deleted file mode 100644
index e32de81806..0000000000
--- a/lib/rss/maker.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: false
-require_relative "rss"
-
-module RSS
- ##
- #
- # Provides a set of builders for various RSS objects
- #
- # * Feeds
- # * RSS 0.91
- # * RSS 1.0
- # * RSS 2.0
- # * Atom 1.0
- #
- # * Elements
- # * Atom::Entry
-
- module Maker
-
- # Collection of supported makers
- MAKERS = {}
-
- class << self
- # Builder for an RSS object
- # Creates an object of the type passed in +args+
- #
- # Executes the +block+ to populate elements of the created RSS object
- def make(version, &block)
- self[version].make(&block)
- end
-
- # Returns the maker for the +version+
- def [](version)
- maker_info = maker(version)
- raise UnsupportedMakerVersionError.new(version) if maker_info.nil?
- maker_info[:maker]
- end
-
- # Adds a maker to the set of supported makers
- def add_maker(version, normalized_version, maker)
- MAKERS[version] = {:maker => maker, :version => normalized_version}
- end
-
- # Returns collection of supported maker versions
- def versions
- MAKERS.keys.uniq.sort
- end
-
- # Returns collection of supported makers
- def makers
- MAKERS.values.collect { |info| info[:maker] }.uniq
- end
-
- # Returns true if the version is supported
- def supported?(version)
- versions.include?(version)
- end
-
- private
- # Can I remove this method?
- def maker(version)
- MAKERS[version]
- end
- end
- end
-end
-
-require_relative "maker/1.0"
-require_relative "maker/2.0"
-require_relative "maker/feed"
-require_relative "maker/entry"
-require_relative "maker/content"
-require_relative "maker/dublincore"
-require_relative "maker/slash"
-require_relative "maker/syndication"
-require_relative "maker/taxonomy"
-require_relative "maker/trackback"
-require_relative "maker/image"
-require_relative "maker/itunes"
diff --git a/lib/rss/maker/0.9.rb b/lib/rss/maker/0.9.rb
deleted file mode 100644
index eb35fc14e1..0000000000
--- a/lib/rss/maker/0.9.rb
+++ /dev/null
@@ -1,509 +0,0 @@
-# frozen_string_literal: false
-require_relative "../0.9"
-
-require_relative "base"
-
-module RSS
- module Maker
-
- class RSS09 < RSSBase
-
- def initialize(feed_version)
- super
- @feed_type = "rss"
- end
-
- private
- def make_feed
- Rss.new(@feed_version, @version, @encoding, @standalone)
- end
-
- def setup_elements(rss)
- setup_channel(rss)
- end
-
- class Channel < ChannelBase
- def to_feed(rss)
- channel = Rss::Channel.new
- setup_values(channel)
- _not_set_required_variables = not_set_required_variables
- if _not_set_required_variables.empty?
- rss.channel = channel
- set_parent(channel, rss)
- setup_items(rss)
- setup_image(rss)
- setup_textinput(rss)
- setup_other_elements(rss, channel)
- rss
- else
- raise NotSetError.new("maker.channel", _not_set_required_variables)
- end
- end
-
- private
- def setup_items(rss)
- @maker.items.to_feed(rss)
- end
-
- def setup_image(rss)
- @maker.image.to_feed(rss)
- end
-
- def setup_textinput(rss)
- @maker.textinput.to_feed(rss)
- end
-
- def variables
- super + ["pubDate"]
- end
-
- def required_variable_names
- %w(link language)
- end
-
- def not_set_required_variables
- vars = super
- vars << "description" unless description {|d| d.have_required_values?}
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
-
- class SkipDays < SkipDaysBase
- def to_feed(rss, channel)
- unless @days.empty?
- skipDays = Rss::Channel::SkipDays.new
- channel.skipDays = skipDays
- set_parent(skipDays, channel)
- @days.each do |day|
- day.to_feed(rss, skipDays.days)
- end
- end
- end
-
- class Day < DayBase
- def to_feed(rss, days)
- day = Rss::Channel::SkipDays::Day.new
- set = setup_values(day)
- if set
- days << day
- set_parent(day, days)
- setup_other_elements(rss, day)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class SkipHours < SkipHoursBase
- def to_feed(rss, channel)
- unless @hours.empty?
- skipHours = Rss::Channel::SkipHours.new
- channel.skipHours = skipHours
- set_parent(skipHours, channel)
- @hours.each do |hour|
- hour.to_feed(rss, skipHours.hours)
- end
- end
- end
-
- class Hour < HourBase
- def to_feed(rss, hours)
- hour = Rss::Channel::SkipHours::Hour.new
- set = setup_values(hour)
- if set
- hours << hour
- set_parent(hour, hours)
- setup_other_elements(rss, hour)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Cloud < CloudBase
- def to_feed(*args)
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Links < LinksBase
- def to_feed(rss, channel)
- return if @links.empty?
- @links.first.to_feed(rss, channel)
- end
-
- class Link < LinkBase
- def to_feed(rss, channel)
- if have_required_values?
- channel.link = href
- else
- raise NotSetError.new("maker.channel.link",
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(href)
- end
- end
- end
-
- class Authors < AuthorsBase
- def to_feed(rss, channel)
- end
-
- class Author < AuthorBase
- def to_feed(rss, channel)
- end
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(rss, channel)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Generator < GeneratorBase
- def to_feed(rss, channel)
- end
- end
-
- class Copyright < CopyrightBase
- def to_feed(rss, channel)
- channel.copyright = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Description < DescriptionBase
- def to_feed(rss, channel)
- channel.description = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Title < TitleBase
- def to_feed(rss, channel)
- channel.title = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Image < ImageBase
- def to_feed(rss)
- image = Rss::Channel::Image.new
- set = setup_values(image)
- if set
- image.link = link
- rss.channel.image = image
- set_parent(image, rss.channel)
- setup_other_elements(rss, image)
- elsif required_element?
- raise NotSetError.new("maker.image", not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(url title link)
- end
-
- def required_element?
- true
- end
- end
-
- class Items < ItemsBase
- def to_feed(rss)
- if rss.channel
- normalize.each do |item|
- item.to_feed(rss)
- end
- setup_other_elements(rss, rss.items)
- end
- end
-
- class Item < ItemBase
- def to_feed(rss)
- item = Rss::Channel::Item.new
- setup_values(item)
- _not_set_required_variables = not_set_required_variables
- if _not_set_required_variables.empty?
- rss.items << item
- set_parent(item, rss.channel)
- setup_other_elements(rss, item)
- elsif variable_is_set?
- raise NotSetError.new("maker.items", _not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- []
- end
-
- def not_set_required_variables
- vars = super
- if @maker.feed_version == "0.91"
- vars << "title" unless title {|t| t.have_required_values?}
- vars << "link" unless link
- end
- vars
- end
-
- class Guid < GuidBase
- def to_feed(*args)
- end
- end
-
- class Enclosure < EnclosureBase
- def to_feed(*args)
- end
- end
-
- class Source < SourceBase
- def to_feed(*args)
- end
-
- class Authors < AuthorsBase
- def to_feed(*args)
- end
-
- class Author < AuthorBase
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(*args)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Generator < GeneratorBase
- def to_feed(*args)
- end
- end
-
- class Icon < IconBase
- def to_feed(*args)
- end
- end
-
- class Links < LinksBase
- def to_feed(*args)
- end
-
- class Link < LinkBase
- end
- end
-
- class Logo < LogoBase
- def to_feed(*args)
- end
- end
-
- class Rights < RightsBase
- def to_feed(*args)
- end
- end
-
- class Subtitle < SubtitleBase
- def to_feed(*args)
- end
- end
-
- class Title < TitleBase
- def to_feed(*args)
- end
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Authors < AuthorsBase
- def to_feed(*args)
- end
-
- class Author < AuthorBase
- end
- end
-
- class Links < LinksBase
- def to_feed(rss, item)
- return if @links.empty?
- @links.first.to_feed(rss, item)
- end
-
- class Link < LinkBase
- def to_feed(rss, item)
- if have_required_values?
- item.link = href
- else
- raise NotSetError.new("maker.link",
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(href)
- end
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(rss, item)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Rights < RightsBase
- def to_feed(rss, item)
- end
- end
-
- class Description < DescriptionBase
- def to_feed(rss, item)
- item.description = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Content < ContentBase
- def to_feed(rss, item)
- end
- end
-
- class Title < TitleBase
- def to_feed(rss, item)
- item.title = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
- end
-
- class Textinput < TextinputBase
- def to_feed(rss)
- textInput = Rss::Channel::TextInput.new
- set = setup_values(textInput)
- if set
- rss.channel.textInput = textInput
- set_parent(textInput, rss.channel)
- setup_other_elements(rss, textInput)
- end
- end
-
- private
- def required_variable_names
- %w(title description name link)
- end
- end
- end
-
- class RSS091 < RSS09
- def initialize(feed_version="0.91")
- super
- end
-
- class Channel < RSS09::Channel
- end
-
- class Items < RSS09::Items
- class Item < RSS09::Items::Item
- end
- end
-
- class Image < RSS09::Image
- end
-
- class Textinput < RSS09::Textinput
- end
- end
-
- class RSS092 < RSS09
- def initialize(feed_version="0.92")
- super
- end
-
- class Channel < RSS09::Channel
- end
-
- class Items < RSS09::Items
- class Item < RSS09::Items::Item
- end
- end
-
- class Image < RSS09::Image
- end
-
- class Textinput < RSS09::Textinput
- end
- end
-
- add_maker("0.9", "0.92", RSS092)
- add_maker("0.91", "0.91", RSS091)
- add_maker("0.92", "0.92", RSS092)
- add_maker("rss0.9", "0.92", RSS092)
- add_maker("rss0.91", "0.91", RSS091)
- add_maker("rss0.92", "0.92", RSS092)
- end
-end
diff --git a/lib/rss/maker/1.0.rb b/lib/rss/maker/1.0.rb
deleted file mode 100644
index 3934f9536c..0000000000
--- a/lib/rss/maker/1.0.rb
+++ /dev/null
@@ -1,436 +0,0 @@
-# frozen_string_literal: false
-require_relative "../1.0"
-
-require_relative "base"
-
-module RSS
- module Maker
-
- class RSS10 < RSSBase
-
- def initialize(feed_version="1.0")
- super
- @feed_type = "rss"
- end
-
- private
- def make_feed
- RDF.new(@version, @encoding, @standalone)
- end
-
- def setup_elements(rss)
- setup_channel(rss)
- setup_image(rss)
- setup_items(rss)
- setup_textinput(rss)
- end
-
- class Channel < ChannelBase
- include SetupDefaultLanguage
-
- def to_feed(rss)
- set_default_values do
- _not_set_required_variables = not_set_required_variables
- if _not_set_required_variables.empty?
- channel = RDF::Channel.new(@about)
- setup_values(channel)
- channel.dc_dates.clear
- rss.channel = channel
- set_parent(channel, rss)
- setup_items(rss)
- setup_image(rss)
- setup_textinput(rss)
- setup_other_elements(rss, channel)
- else
- raise NotSetError.new("maker.channel", _not_set_required_variables)
- end
- end
- end
-
- private
- def setup_items(rss)
- items = RDF::Channel::Items.new
- seq = items.Seq
- set_parent(items, seq)
- target_items = @maker.items.normalize
- raise NotSetError.new("maker", ["items"]) if target_items.empty?
- target_items.each do |item|
- li = RDF::Channel::Items::Seq::Li.new(item.link)
- seq.lis << li
- set_parent(li, seq)
- end
- rss.channel.items = items
- set_parent(rss.channel, items)
- end
-
- def setup_image(rss)
- if @maker.image.have_required_values?
- image = RDF::Channel::Image.new(@maker.image.url)
- rss.channel.image = image
- set_parent(image, rss.channel)
- end
- end
-
- def setup_textinput(rss)
- if @maker.textinput.have_required_values?
- textinput = RDF::Channel::Textinput.new(@maker.textinput.link)
- rss.channel.textinput = textinput
- set_parent(textinput, rss.channel)
- end
- end
-
- def required_variable_names
- %w(about link)
- end
-
- def not_set_required_variables
- vars = super
- vars << "description" unless description {|d| d.have_required_values?}
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
-
- class SkipDays < SkipDaysBase
- def to_feed(*args)
- end
-
- class Day < DayBase
- end
- end
-
- class SkipHours < SkipHoursBase
- def to_feed(*args)
- end
-
- class Hour < HourBase
- end
- end
-
- class Cloud < CloudBase
- def to_feed(*args)
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Links < LinksBase
- def to_feed(rss, channel)
- return if @links.empty?
- @links.first.to_feed(rss, channel)
- end
-
- class Link < LinkBase
- def to_feed(rss, channel)
- if have_required_values?
- channel.link = href
- else
- raise NotSetError.new("maker.channel.link",
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(href)
- end
- end
- end
-
- class Authors < AuthorsBase
- def to_feed(rss, channel)
- end
-
- class Author < AuthorBase
- def to_feed(rss, channel)
- end
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(rss, channel)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Generator < GeneratorBase
- def to_feed(rss, channel)
- end
- end
-
- class Copyright < CopyrightBase
- def to_feed(rss, channel)
- end
- end
-
- class Description < DescriptionBase
- def to_feed(rss, channel)
- channel.description = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Title < TitleBase
- def to_feed(rss, channel)
- channel.title = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Image < ImageBase
- def to_feed(rss)
- if @url
- image = RDF::Image.new(@url)
- set = setup_values(image)
- if set
- rss.image = image
- set_parent(image, rss)
- setup_other_elements(rss, image)
- end
- end
- end
-
- def have_required_values?
- super and @maker.channel.have_required_values?
- end
-
- private
- def variables
- super + ["link"]
- end
-
- def required_variable_names
- %w(url title link)
- end
- end
-
- class Items < ItemsBase
- def to_feed(rss)
- if rss.channel
- normalize.each do |item|
- item.to_feed(rss)
- end
- setup_other_elements(rss, rss.items)
- end
- end
-
- class Item < ItemBase
- def to_feed(rss)
- set_default_values do
- item = RDF::Item.new(link)
- set = setup_values(item)
- if set
- item.dc_dates.clear
- rss.items << item
- set_parent(item, rss)
- setup_other_elements(rss, item)
- elsif !have_required_values?
- raise NotSetError.new("maker.item", not_set_required_variables)
- end
- end
- end
-
- private
- def required_variable_names
- %w(link)
- end
-
- def variables
- super + %w(link)
- end
-
- def not_set_required_variables
- set_default_values do
- vars = super
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
- end
-
- class Guid < GuidBase
- def to_feed(*args)
- end
- end
-
- class Enclosure < EnclosureBase
- def to_feed(*args)
- end
- end
-
- class Source < SourceBase
- def to_feed(*args)
- end
-
- class Authors < AuthorsBase
- def to_feed(*args)
- end
-
- class Author < AuthorBase
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(*args)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Generator < GeneratorBase
- def to_feed(*args)
- end
- end
-
- class Icon < IconBase
- def to_feed(*args)
- end
- end
-
- class Links < LinksBase
- def to_feed(*args)
- end
-
- class Link < LinkBase
- end
- end
-
- class Logo < LogoBase
- def to_feed(*args)
- end
- end
-
- class Rights < RightsBase
- def to_feed(*args)
- end
- end
-
- class Subtitle < SubtitleBase
- def to_feed(*args)
- end
- end
-
- class Title < TitleBase
- def to_feed(*args)
- end
- end
- end
-
- class Categories < CategoriesBase
- def to_feed(*args)
- end
-
- class Category < CategoryBase
- end
- end
-
- class Authors < AuthorsBase
- def to_feed(*args)
- end
-
- class Author < AuthorBase
- end
- end
-
- class Links < LinksBase
- def to_feed(*args)
- end
-
- class Link < LinkBase
- end
- end
-
- class Contributors < ContributorsBase
- def to_feed(rss, item)
- end
-
- class Contributor < ContributorBase
- end
- end
-
- class Rights < RightsBase
- def to_feed(rss, item)
- end
- end
-
- class Description < DescriptionBase
- def to_feed(rss, item)
- item.description = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Content < ContentBase
- def to_feed(rss, item)
- end
- end
-
- class Title < TitleBase
- def to_feed(rss, item)
- item.title = content if have_required_values?
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
- end
-
- class Textinput < TextinputBase
- def to_feed(rss)
- if @link
- textinput = RDF::Textinput.new(@link)
- set = setup_values(textinput)
- if set
- rss.textinput = textinput
- set_parent(textinput, rss)
- setup_other_elements(rss, textinput)
- end
- end
- end
-
- def have_required_values?
- super and @maker.channel.have_required_values?
- end
-
- private
- def required_variable_names
- %w(title description name link)
- end
- end
- end
-
- add_maker("1.0", "1.0", RSS10)
- add_maker("rss1.0", "1.0", RSS10)
- end
-end
diff --git a/lib/rss/maker/2.0.rb b/lib/rss/maker/2.0.rb
deleted file mode 100644
index 43d00226b7..0000000000
--- a/lib/rss/maker/2.0.rb
+++ /dev/null
@@ -1,224 +0,0 @@
-# frozen_string_literal: false
-require_relative "../2.0"
-
-require_relative "0.9"
-
-module RSS
- module Maker
-
- class RSS20 < RSS09
-
- def initialize(feed_version="2.0")
- super
- end
-
- class Channel < RSS09::Channel
-
- private
- def required_variable_names
- %w(link)
- end
-
- class SkipDays < RSS09::Channel::SkipDays
- class Day < RSS09::Channel::SkipDays::Day
- end
- end
-
- class SkipHours < RSS09::Channel::SkipHours
- class Hour < RSS09::Channel::SkipHours::Hour
- end
- end
-
- class Cloud < RSS09::Channel::Cloud
- def to_feed(rss, channel)
- cloud = Rss::Channel::Cloud.new
- set = setup_values(cloud)
- if set
- channel.cloud = cloud
- set_parent(cloud, channel)
- setup_other_elements(rss, cloud)
- end
- end
-
- private
- def required_variable_names
- %w(domain port path registerProcedure protocol)
- end
- end
-
- class Categories < RSS09::Channel::Categories
- def to_feed(rss, channel)
- @categories.each do |category|
- category.to_feed(rss, channel)
- end
- end
-
- class Category < RSS09::Channel::Categories::Category
- def to_feed(rss, channel)
- category = Rss::Channel::Category.new
- set = setup_values(category)
- if set
- channel.categories << category
- set_parent(category, channel)
- setup_other_elements(rss, category)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Generator < GeneratorBase
- def to_feed(rss, channel)
- channel.generator = content
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Image < RSS09::Image
- private
- def required_element?
- false
- end
- end
-
- class Items < RSS09::Items
- class Item < RSS09::Items::Item
- private
- def required_variable_names
- []
- end
-
- def not_set_required_variables
- vars = super
- if !title {|t| t.have_required_values?} and
- !description {|d| d.have_required_values?}
- vars << "title or description"
- end
- vars
- end
-
- def variables
- super + ["pubDate"]
- end
-
- class Guid < RSS09::Items::Item::Guid
- def to_feed(rss, item)
- guid = Rss::Channel::Item::Guid.new
- set = setup_values(guid)
- if set
- item.guid = guid
- set_parent(guid, item)
- setup_other_elements(rss, guid)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- class Enclosure < RSS09::Items::Item::Enclosure
- def to_feed(rss, item)
- enclosure = Rss::Channel::Item::Enclosure.new
- set = setup_values(enclosure)
- if set
- item.enclosure = enclosure
- set_parent(enclosure, item)
- setup_other_elements(rss, enclosure)
- end
- end
-
- private
- def required_variable_names
- %w(url length type)
- end
- end
-
- class Source < RSS09::Items::Item::Source
- def to_feed(rss, item)
- source = Rss::Channel::Item::Source.new
- set = setup_values(source)
- if set
- item.source = source
- set_parent(source, item)
- setup_other_elements(rss, source)
- end
- end
-
- private
- def required_variable_names
- %w(url content)
- end
-
- class Links < RSS09::Items::Item::Source::Links
- def to_feed(rss, source)
- return if @links.empty?
- @links.first.to_feed(rss, source)
- end
-
- class Link < RSS09::Items::Item::Source::Links::Link
- def to_feed(rss, source)
- source.url = href
- end
- end
- end
- end
-
- class Categories < RSS09::Items::Item::Categories
- def to_feed(rss, item)
- @categories.each do |category|
- category.to_feed(rss, item)
- end
- end
-
- class Category < RSS09::Items::Item::Categories::Category
- def to_feed(rss, item)
- category = Rss::Channel::Item::Category.new
- set = setup_values(category)
- if set
- item.categories << category
- set_parent(category, item)
- setup_other_elements(rss)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
- end
-
- class Authors < RSS09::Items::Item::Authors
- def to_feed(rss, item)
- return if @authors.empty?
- @authors.first.to_feed(rss, item)
- end
-
- class Author < RSS09::Items::Item::Authors::Author
- def to_feed(rss, item)
- item.author = name
- end
- end
- end
- end
- end
-
- class Textinput < RSS09::Textinput
- end
- end
-
- add_maker("2.0", "2.0", RSS20)
- add_maker("rss2.0", "2.0", RSS20)
- end
-end
diff --git a/lib/rss/maker/atom.rb b/lib/rss/maker/atom.rb
deleted file mode 100644
index cdd1d8753e..0000000000
--- a/lib/rss/maker/atom.rb
+++ /dev/null
@@ -1,173 +0,0 @@
-# frozen_string_literal: false
-require_relative "../atom"
-
-require_relative "base"
-
-module RSS
- module Maker
- module AtomPersons
- module_function
- def def_atom_persons(klass, name, maker_name, plural=nil)
- plural ||= "#{name}s"
- klass_name = Utils.to_class_name(name)
- plural_klass_name = Utils.to_class_name(plural)
-
- klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class #{plural_klass_name} < #{plural_klass_name}Base
- class #{klass_name} < #{klass_name}Base
- def to_feed(feed, current)
- #{name} = feed.class::#{klass_name}.new
- set = setup_values(#{name})
- unless set
- raise NotSetError.new(#{maker_name.dump},
- not_set_required_variables)
- end
- current.#{plural} << #{name}
- set_parent(#{name}, current)
- setup_other_elements(#{name})
- end
-
- private
- def required_variable_names
- %w(name)
- end
- end
- end
-EOC
- end
- end
-
- module AtomTextConstruct
- class << self
- def def_atom_text_construct(klass, name, maker_name, klass_name=nil,
- atom_klass_name=nil)
- klass_name ||= Utils.to_class_name(name)
- atom_klass_name ||= Utils.to_class_name(name)
-
- klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class #{klass_name} < #{klass_name}Base
- include #{self.name}
- def to_feed(feed, current)
- #{name} = current.class::#{atom_klass_name}.new
- if setup_values(#{name})
- current.#{name} = #{name}
- set_parent(#{name}, current)
- setup_other_elements(feed)
- elsif variable_is_set?
- raise NotSetError.new(#{maker_name.dump},
- not_set_required_variables)
- end
- end
- end
- EOC
- end
- end
-
- private
- def required_variable_names
- if type == "xhtml"
- %w(xml_content)
- else
- %w(content)
- end
- end
-
- def variables
- if type == "xhtml"
- super + %w(xhtml)
- else
- super
- end
- end
- end
-
- module AtomCategory
- def to_feed(feed, current)
- category = feed.class::Category.new
- set = setup_values(category)
- if set
- current.categories << category
- set_parent(category, current)
- setup_other_elements(feed)
- else
- raise NotSetError.new(self.class.not_set_name,
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(term)
- end
-
- def variables
- super + ["term", "scheme"]
- end
- end
-
- module AtomLink
- def to_feed(feed, current)
- link = feed.class::Link.new
- set = setup_values(link)
- if set
- current.links << link
- set_parent(link, current)
- setup_other_elements(feed)
- else
- raise NotSetError.new(self.class.not_set_name,
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(href)
- end
- end
-
- module AtomGenerator
- def to_feed(feed, current)
- generator = current.class::Generator.new
- if setup_values(generator)
- current.generator = generator
- set_parent(generator, current)
- setup_other_elements(feed)
- elsif variable_is_set?
- raise NotSetError.new(self.class.not_set_name,
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(content)
- end
- end
-
- module AtomLogo
- def to_feed(feed, current)
- logo = current.class::Logo.new
- class << logo
- alias_method(:uri=, :content=)
- end
- set = setup_values(logo)
- class << logo
- remove_method(:uri=)
- end
- if set
- current.logo = logo
- set_parent(logo, current)
- setup_other_elements(feed)
- elsif variable_is_set?
- raise NotSetError.new(self.class.not_set_name,
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(uri)
- end
- end
- end
-end
diff --git a/lib/rss/maker/base.rb b/lib/rss/maker/base.rb
deleted file mode 100644
index 17537b7006..0000000000
--- a/lib/rss/maker/base.rb
+++ /dev/null
@@ -1,945 +0,0 @@
-# frozen_string_literal: false
-require 'forwardable'
-
-require_relative '../rss'
-
-module RSS
- module Maker
- class Base
- extend Utils::InheritedReader
-
- OTHER_ELEMENTS = []
- NEED_INITIALIZE_VARIABLES = []
-
- class << self
- def other_elements
- inherited_array_reader("OTHER_ELEMENTS")
- end
- def need_initialize_variables
- inherited_array_reader("NEED_INITIALIZE_VARIABLES")
- end
-
- def inherited_base
- ::RSS::Maker::Base
- end
-
- def inherited(subclass)
- subclass.const_set(:OTHER_ELEMENTS, [])
- subclass.const_set(:NEED_INITIALIZE_VARIABLES, [])
- end
-
- def add_other_element(variable_name)
- self::OTHER_ELEMENTS << variable_name
- end
-
- def add_need_initialize_variable(variable_name, init_value=nil,
- &init_block)
- init_value ||= init_block
- self::NEED_INITIALIZE_VARIABLES << [variable_name, init_value]
- end
-
- def def_array_element(name, plural=nil, klass_name=nil)
- include Enumerable
- extend Forwardable
-
- plural ||= "#{name}s"
- klass_name ||= Utils.to_class_name(name)
- def_delegators("@#{plural}", :<<, :[], :[]=, :first, :last)
- def_delegators("@#{plural}", :push, :pop, :shift, :unshift)
- def_delegators("@#{plural}", :each, :size, :empty?, :clear)
-
- add_need_initialize_variable(plural) {[]}
-
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def new_#{name}
- #{name} = self.class::#{klass_name}.new(@maker)
- @#{plural} << #{name}
- if block_given?
- yield #{name}
- else
- #{name}
- end
- end
- alias new_child new_#{name}
-
- def to_feed(*args)
- @#{plural}.each do |#{name}|
- #{name}.to_feed(*args)
- end
- end
-
- def replace(elements)
- @#{plural}.replace(elements.to_a)
- end
- EOC
- end
-
- def def_classed_element_without_accessor(name, class_name=nil)
- class_name ||= Utils.to_class_name(name)
- add_other_element(name)
- add_need_initialize_variable(name) do |object|
- object.send("make_#{name}")
- end
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- private
- def setup_#{name}(feed, current)
- @#{name}.to_feed(feed, current)
- end
-
- def make_#{name}
- self.class::#{class_name}.new(@maker)
- end
- EOC
- end
-
- def def_classed_element(name, class_name=nil, attribute_name=nil)
- def_classed_element_without_accessor(name, class_name)
- if attribute_name
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}
- if block_given?
- yield(@#{name})
- else
- @#{name}.#{attribute_name}
- end
- end
-
- def #{name}=(new_value)
- @#{name}.#{attribute_name} = new_value
- end
- EOC
- else
- attr_reader name
- end
- end
-
- def def_classed_elements(name, attribute, plural_class_name=nil,
- plural_name=nil, new_name=nil)
- plural_name ||= "#{name}s"
- new_name ||= name
- def_classed_element(plural_name, plural_class_name)
- local_variable_name = "_#{name}"
- new_value_variable_name = "new_value"
- additional_setup_code = nil
- if block_given?
- additional_setup_code = yield(local_variable_name,
- new_value_variable_name)
- end
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}
- #{local_variable_name} = #{plural_name}.first
- #{local_variable_name} ? #{local_variable_name}.#{attribute} : nil
- end
-
- def #{name}=(#{new_value_variable_name})
- #{local_variable_name} =
- #{plural_name}.first || #{plural_name}.new_#{new_name}
- #{additional_setup_code}
- #{local_variable_name}.#{attribute} = #{new_value_variable_name}
- end
- EOC
- end
-
- def def_other_element(name)
- attr_accessor name
- def_other_element_without_accessor(name)
- end
-
- def def_other_element_without_accessor(name)
- add_need_initialize_variable(name)
- add_other_element(name)
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def setup_#{name}(feed, current)
- if !@#{name}.nil? and current.respond_to?(:#{name}=)
- current.#{name} = @#{name}
- end
- end
- EOC
- end
-
- def def_csv_element(name, type=nil)
- def_other_element_without_accessor(name)
- attr_reader(name)
- converter = ""
- if type == :integer
- converter = "{|v| Integer(v)}"
- end
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}=(value)
- @#{name} = Utils::CSV.parse(value)#{converter}
- end
- EOC
- end
- end
-
- attr_reader :maker
- def initialize(maker)
- @maker = maker
- @default_values_are_set = false
- initialize_variables
- end
-
- def have_required_values?
- not_set_required_variables.empty?
- end
-
- def variable_is_set?
- variables.any? {|var| not __send__(var).nil?}
- end
-
- private
- def initialize_variables
- self.class.need_initialize_variables.each do |variable_name, init_value|
- if init_value.nil?
- value = nil
- else
- if init_value.respond_to?(:call)
- value = init_value.call(self)
- elsif init_value.is_a?(String)
- # just for backward compatibility
- value = instance_eval(init_value, __FILE__, __LINE__)
- else
- value = init_value
- end
- end
- instance_variable_set("@#{variable_name}", value)
- end
- end
-
- def setup_other_elements(feed, current=nil)
- current ||= current_element(feed)
- self.class.other_elements.each do |element|
- __send__("setup_#{element}", feed, current)
- end
- end
-
- def current_element(feed)
- feed
- end
-
- def set_default_values(&block)
- return yield if @default_values_are_set
-
- begin
- @default_values_are_set = true
- _set_default_values(&block)
- ensure
- @default_values_are_set = false
- end
- end
-
- def _set_default_values(&block)
- yield
- end
-
- def setup_values(target)
- set = false
- if have_required_values?
- variables.each do |var|
- setter = "#{var}="
- if target.respond_to?(setter)
- value = __send__(var)
- unless value.nil?
- target.__send__(setter, value)
- set = true
- end
- end
- end
- end
- set
- end
-
- def set_parent(target, parent)
- target.parent = parent if target.class.need_parent?
- end
-
- def variables
- self.class.need_initialize_variables.find_all do |name, init|
- # init == "nil" is just for backward compatibility
- init.nil? or init == "nil"
- end.collect do |name, init|
- name
- end
- end
-
- def not_set_required_variables
- required_variable_names.find_all do |var|
- __send__(var).nil?
- end
- end
-
- def required_variables_are_set?
- required_variable_names.each do |var|
- return false if __send__(var).nil?
- end
- true
- end
- end
-
- module AtomPersonConstructBase
- def self.append_features(klass)
- super
-
- klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1)
- %w(name uri email).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- EOC
- end
- end
-
- module AtomTextConstructBase
- module EnsureXMLContent
- class << self
- def included(base)
- super
- base.class_eval do
- %w(type content xml_content).each do |element|
- attr_reader element
- attr_writer element if element != "xml_content"
- add_need_initialize_variable(element)
- end
-
- alias_method(:xhtml, :xml_content)
- end
- end
- end
-
- def ensure_xml_content(content)
- xhtml_uri = ::RSS::Atom::XHTML_URI
- unless content.is_a?(RSS::XML::Element) and
- ["div", xhtml_uri] == [content.name, content.uri]
- children = content
- children = [children] unless content.is_a?(Array)
- children = set_xhtml_uri_as_default_uri(children)
- content = RSS::XML::Element.new("div", nil, xhtml_uri,
- {"xmlns" => xhtml_uri},
- children)
- end
- content
- end
-
- def xml_content=(content)
- @xml_content = ensure_xml_content(content)
- end
-
- def xhtml=(content)
- self.xml_content = content
- end
-
- private
- def set_xhtml_uri_as_default_uri(children)
- children.collect do |child|
- if child.is_a?(RSS::XML::Element) and
- child.prefix.nil? and child.uri.nil?
- RSS::XML::Element.new(child.name, nil, ::RSS::Atom::XHTML_URI,
- child.attributes.dup,
- set_xhtml_uri_as_default_uri(child.children))
- else
- child
- end
- end
- end
- end
-
- def self.append_features(klass)
- super
-
- klass.class_eval do
- include EnsureXMLContent
- end
- end
- end
-
- module SetupDefaultDate
- private
- def _set_default_values
- keep = {
- :date => date,
- :dc_dates => dc_dates.to_a.dup,
- }
- _date = _parse_date_if_needed(date)
- if _date and !dc_dates.any? {|dc_date| dc_date.value == _date}
- dc_date = self.class::DublinCoreDates::DublinCoreDate.new(self)
- dc_date.value = _date.dup
- dc_dates.unshift(dc_date)
- end
- self.date ||= self.dc_date
- super
- ensure
- self.date = keep[:date]
- dc_dates.replace(keep[:dc_dates])
- end
-
- def _parse_date_if_needed(date_value)
- date_value = Time.parse(date_value) if date_value.is_a?(String)
- date_value
- end
- end
-
- module SetupDefaultLanguage
- private
- def _set_default_values
- keep = {
- :dc_languages => dc_languages.to_a.dup,
- }
- _language = language
- if _language and
- !dc_languages.any? {|dc_language| dc_language.value == _language}
- dc_language = self.class::DublinCoreLanguages::DublinCoreLanguage.new(self)
- dc_language.value = _language.dup
- dc_languages.unshift(dc_language)
- end
- super
- ensure
- dc_languages.replace(keep[:dc_languages])
- end
- end
-
- class RSSBase < Base
- class << self
- def make(*args, &block)
- new(*args).make(&block)
- end
- end
-
- %w(xml_stylesheets channel image items textinput).each do |element|
- attr_reader element
- add_need_initialize_variable(element) do |object|
- object.send("make_#{element}")
- end
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- private
- def setup_#{element}(feed)
- @#{element}.to_feed(feed)
- end
-
- def make_#{element}
- self.class::#{Utils.to_class_name(element)}.new(self)
- end
- EOC
- end
-
- attr_reader :feed_version
- alias_method(:rss_version, :feed_version)
- attr_accessor :version, :encoding, :standalone
-
- def initialize(feed_version)
- super(self)
- @feed_type = nil
- @feed_subtype = nil
- @feed_version = feed_version
- @version = "1.0"
- @encoding = "UTF-8"
- @standalone = nil
- end
-
- def make
- yield(self)
- to_feed
- end
-
- def to_feed
- feed = make_feed
- setup_xml_stylesheets(feed)
- setup_elements(feed)
- setup_other_elements(feed)
- feed.validate
- feed
- end
-
- private
- remove_method :make_xml_stylesheets
- def make_xml_stylesheets
- XMLStyleSheets.new(self)
- end
- end
-
- class XMLStyleSheets < Base
- def_array_element("xml_stylesheet", nil, "XMLStyleSheet")
-
- class XMLStyleSheet < Base
-
- ::RSS::XMLStyleSheet::ATTRIBUTES.each do |attribute|
- attr_accessor attribute
- add_need_initialize_variable(attribute)
- end
-
- def to_feed(feed)
- xss = ::RSS::XMLStyleSheet.new
- guess_type_if_need(xss)
- set = setup_values(xss)
- if set
- feed.xml_stylesheets << xss
- end
- end
-
- private
- def guess_type_if_need(xss)
- if @type.nil?
- xss.href = @href
- @type = xss.type
- end
- end
-
- def required_variable_names
- %w(href type)
- end
- end
- end
-
- class ChannelBase < Base
- include SetupDefaultDate
-
- %w(cloud categories skipDays skipHours).each do |name|
- def_classed_element(name)
- end
-
- %w(generator copyright description title).each do |name|
- def_classed_element(name, nil, "content")
- end
-
- [
- ["link", "href", Proc.new {|target,| "#{target}.href = 'self'"}],
- ["author", "name"],
- ["contributor", "name"],
- ].each do |name, attribute, additional_setup_maker|
- def_classed_elements(name, attribute, &additional_setup_maker)
- end
-
- %w(id about language
- managingEditor webMaster rating docs ttl).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- %w(date lastBuildDate).each do |date_element|
- attr_reader date_element
- add_need_initialize_variable(date_element)
- end
-
- def date=(_date)
- @date = _parse_date_if_needed(_date)
- end
-
- def lastBuildDate=(_date)
- @lastBuildDate = _parse_date_if_needed(_date)
- end
-
- def pubDate
- date
- end
-
- def pubDate=(date)
- self.date = date
- end
-
- def updated
- date
- end
-
- def updated=(date)
- self.date = date
- end
-
- alias_method(:rights, :copyright)
- alias_method(:rights=, :copyright=)
-
- alias_method(:subtitle, :description)
- alias_method(:subtitle=, :description=)
-
- def icon
- image_favicon.about
- end
-
- def icon=(url)
- image_favicon.about = url
- end
-
- def logo
- maker.image.url
- end
-
- def logo=(url)
- maker.image.url = url
- end
-
- class SkipDaysBase < Base
- def_array_element("day")
-
- class DayBase < Base
- %w(content).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
- end
-
- class SkipHoursBase < Base
- def_array_element("hour")
-
- class HourBase < Base
- %w(content).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
- end
-
- class CloudBase < Base
- %w(domain port path registerProcedure protocol).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
-
- class CategoriesBase < Base
- def_array_element("category", "categories")
-
- class CategoryBase < Base
- %w(domain content label).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- alias_method(:term, :domain)
- alias_method(:term=, :domain=)
- alias_method(:scheme, :content)
- alias_method(:scheme=, :content=)
- end
- end
-
- class LinksBase < Base
- def_array_element("link")
-
- class LinkBase < Base
- %w(href rel type hreflang title length).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
- end
-
- class AuthorsBase < Base
- def_array_element("author")
-
- class AuthorBase < Base
- include AtomPersonConstructBase
- end
- end
-
- class ContributorsBase < Base
- def_array_element("contributor")
-
- class ContributorBase < Base
- include AtomPersonConstructBase
- end
- end
-
- class GeneratorBase < Base
- %w(uri version content).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
-
- class CopyrightBase < Base
- include AtomTextConstructBase
- end
-
- class DescriptionBase < Base
- include AtomTextConstructBase
- end
-
- class TitleBase < Base
- include AtomTextConstructBase
- end
- end
-
- class ImageBase < Base
- %w(title url width height description).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- def link
- @maker.channel.link
- end
- end
-
- class ItemsBase < Base
- def_array_element("item")
-
- attr_accessor :do_sort, :max_size
-
- def initialize(maker)
- super
- @do_sort = false
- @max_size = -1
- end
-
- def normalize
- if @max_size >= 0
- sort_if_need[0...@max_size]
- else
- sort_if_need[0..@max_size]
- end
- end
-
- private
- def sort_if_need
- if @do_sort.respond_to?(:call)
- @items.sort do |x, y|
- @do_sort.call(x, y)
- end
- elsif @do_sort
- @items.sort do |x, y|
- y <=> x
- end
- else
- @items
- end
- end
-
- class ItemBase < Base
- include SetupDefaultDate
-
- %w(guid enclosure source categories content).each do |name|
- def_classed_element(name)
- end
-
- %w(rights description title).each do |name|
- def_classed_element(name, nil, "content")
- end
-
- [
- ["author", "name"],
- ["link", "href", Proc.new {|target,| "#{target}.href = 'alternate'"}],
- ["contributor", "name"],
- ].each do |name, attribute|
- def_classed_elements(name, attribute)
- end
-
- %w(comments id published).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- %w(date).each do |date_element|
- attr_reader date_element
- add_need_initialize_variable(date_element)
- end
-
- def date=(_date)
- @date = _parse_date_if_needed(_date)
- end
-
- def pubDate
- date
- end
-
- def pubDate=(date)
- self.date = date
- end
-
- def updated
- date
- end
-
- def updated=(date)
- self.date = date
- end
-
- alias_method(:summary, :description)
- alias_method(:summary=, :description=)
-
- def <=>(other)
- _date = date || dc_date
- _other_date = other.date || other.dc_date
- if _date and _other_date
- _date <=> _other_date
- elsif _date
- 1
- elsif _other_date
- -1
- else
- 0
- end
- end
-
- class GuidBase < Base
- %w(isPermaLink content).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- def permanent_link?
- isPermaLink
- end
-
- def permanent_link=(bool)
- self.isPermaLink = bool
- end
- end
-
- class EnclosureBase < Base
- %w(url length type).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
-
- class SourceBase < Base
- include SetupDefaultDate
-
- %w(authors categories contributors generator icon
- logo rights subtitle title).each do |name|
- def_classed_element(name)
- end
-
- [
- ["link", "href"],
- ].each do |name, attribute|
- def_classed_elements(name, attribute)
- end
-
- %w(id content).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
-
- alias_method(:url, :link)
- alias_method(:url=, :link=)
-
- %w(date).each do |date_element|
- attr_reader date_element
- add_need_initialize_variable(date_element)
- end
-
- def date=(_date)
- @date = _parse_date_if_needed(_date)
- end
-
- def updated
- date
- end
-
- def updated=(date)
- self.date = date
- end
-
- private
- AuthorsBase = ChannelBase::AuthorsBase
- CategoriesBase = ChannelBase::CategoriesBase
- ContributorsBase = ChannelBase::ContributorsBase
- GeneratorBase = ChannelBase::GeneratorBase
-
- class IconBase < Base
- %w(url).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
-
- LinksBase = ChannelBase::LinksBase
-
- class LogoBase < Base
- %w(uri).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
-
- class RightsBase < Base
- include AtomTextConstructBase
- end
-
- class SubtitleBase < Base
- include AtomTextConstructBase
- end
-
- class TitleBase < Base
- include AtomTextConstructBase
- end
- end
-
- CategoriesBase = ChannelBase::CategoriesBase
- AuthorsBase = ChannelBase::AuthorsBase
- LinksBase = ChannelBase::LinksBase
- ContributorsBase = ChannelBase::ContributorsBase
-
- class RightsBase < Base
- include AtomTextConstructBase
- end
-
- class DescriptionBase < Base
- include AtomTextConstructBase
- end
-
- class ContentBase < Base
- include AtomTextConstructBase::EnsureXMLContent
-
- %w(src).each do |element|
- attr_accessor(element)
- add_need_initialize_variable(element)
- end
-
- def xml_content=(content)
- content = ensure_xml_content(content) if inline_xhtml?
- @xml_content = content
- end
-
- alias_method(:xml, :xml_content)
- alias_method(:xml=, :xml_content=)
-
- def inline_text?
- [nil, "text", "html"].include?(@type)
- end
-
- def inline_html?
- @type == "html"
- end
-
- def inline_xhtml?
- @type == "xhtml"
- end
-
- def inline_other?
- !out_of_line? and ![nil, "text", "html", "xhtml"].include?(@type)
- end
-
- def inline_other_text?
- return false if @type.nil? or out_of_line?
- /\Atext\//i.match(@type) ? true : false
- end
-
- def inline_other_xml?
- return false if @type.nil? or out_of_line?
- /[\+\/]xml\z/i.match(@type) ? true : false
- end
-
- def inline_other_base64?
- return false if @type.nil? or out_of_line?
- @type.include?("/") and !inline_other_text? and !inline_other_xml?
- end
-
- def out_of_line?
- not @src.nil? and @content.nil?
- end
- end
-
- class TitleBase < Base
- include AtomTextConstructBase
- end
- end
- end
-
- class TextinputBase < Base
- %w(title description name link).each do |element|
- attr_accessor element
- add_need_initialize_variable(element)
- end
- end
- end
-end
diff --git a/lib/rss/maker/content.rb b/lib/rss/maker/content.rb
deleted file mode 100644
index b3f4e5036e..0000000000
--- a/lib/rss/maker/content.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: false
-require_relative '../content'
-require_relative '1.0'
-require_relative '2.0'
-
-module RSS
- module Maker
- module ContentModel
- def self.append_features(klass)
- super
-
- ::RSS::ContentModel::ELEMENTS.each do |name|
- klass.def_other_element(name)
- end
- end
- end
-
- class ItemsBase
- class ItemBase; include ContentModel; end
- end
- end
-end
diff --git a/lib/rss/maker/dublincore.rb b/lib/rss/maker/dublincore.rb
deleted file mode 100644
index beea3134b4..0000000000
--- a/lib/rss/maker/dublincore.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: false
-require_relative '../dublincore'
-require_relative '1.0'
-
-module RSS
- module Maker
- module DublinCoreModel
- def self.append_features(klass)
- super
-
- ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
- plural_name ||= "#{name}s"
- full_name = "#{RSS::DC_PREFIX}_#{name}"
- full_plural_name = "#{RSS::DC_PREFIX}_#{plural_name}"
- plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}"
- klass.def_classed_elements(full_name, "value", plural_klass_name,
- full_plural_name, name)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def new_#{full_name}(value=nil)
- _#{full_name} = #{full_plural_name}.new_#{name}
- _#{full_name}.value = value
- if block_given?
- yield _#{full_name}
- else
- _#{full_name}
- end
- end
- EOC
- end
-
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- # For backward compatibility
- alias #{DC_PREFIX}_rightses #{DC_PREFIX}_rights_list
- EOC
- end
-
- ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
- plural_name ||= "#{name}s"
- full_name ||= "#{DC_PREFIX}_#{name}"
- full_plural_name ||= "#{DC_PREFIX}_#{plural_name}"
- klass_name = Utils.to_class_name(name)
- full_klass_name = "DublinCore#{klass_name}"
- plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}"
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class #{plural_klass_name}Base < Base
- def_array_element(#{name.dump}, #{full_plural_name.dump},
- #{full_klass_name.dump})
-
- class #{full_klass_name}Base < Base
- attr_accessor :value
- add_need_initialize_variable("value")
- alias_method(:content, :value)
- alias_method(:content=, :value=)
-
- def have_required_values?
- @value
- end
-
- def to_feed(feed, current)
- if value and current.respond_to?(:#{full_name})
- new_item = current.class::#{full_klass_name}.new(value)
- current.#{full_plural_name} << new_item
- end
- end
- end
- #{klass_name}Base = #{full_klass_name}Base
- end
- EOC
- end
-
- def self.install_dublin_core(klass)
- ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
- plural_name ||= "#{name}s"
- klass_name = Utils.to_class_name(name)
- full_klass_name = "DublinCore#{klass_name}"
- plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}"
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class #{plural_klass_name} < #{plural_klass_name}Base
- class #{full_klass_name} < #{full_klass_name}Base
- end
- #{klass_name} = #{full_klass_name}
- end
-EOC
- end
- end
- end
-
- class ChannelBase
- include DublinCoreModel
- end
-
- class ImageBase; include DublinCoreModel; end
- class ItemsBase
- class ItemBase
- include DublinCoreModel
- end
- end
- class TextinputBase; include DublinCoreModel; end
-
- makers.each do |maker|
- maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class Channel
- DublinCoreModel.install_dublin_core(self)
- end
-
- class Image
- DublinCoreModel.install_dublin_core(self)
- end
-
- class Items
- class Item
- DublinCoreModel.install_dublin_core(self)
- end
- end
-
- class Textinput
- DublinCoreModel.install_dublin_core(self)
- end
- EOC
- end
- end
-end
diff --git a/lib/rss/maker/entry.rb b/lib/rss/maker/entry.rb
deleted file mode 100644
index ccdf9608ae..0000000000
--- a/lib/rss/maker/entry.rb
+++ /dev/null
@@ -1,164 +0,0 @@
-# frozen_string_literal: false
-require_relative "atom"
-require_relative "feed"
-
-module RSS
- module Maker
- module Atom
- class Entry < RSSBase
- def initialize(feed_version="1.0")
- super
- @feed_type = "atom"
- @feed_subtype = "entry"
- end
-
- private
- def make_feed
- ::RSS::Atom::Entry.new(@version, @encoding, @standalone)
- end
-
- def setup_elements(entry)
- setup_items(entry)
- end
-
- class Channel < ChannelBase
- class SkipDays < SkipDaysBase
- class Day < DayBase
- end
- end
-
- class SkipHours < SkipHoursBase
- class Hour < HourBase
- end
- end
-
- class Cloud < CloudBase
- end
-
- Categories = Feed::Channel::Categories
- Links = Feed::Channel::Links
- Authors = Feed::Channel::Authors
- Contributors = Feed::Channel::Contributors
-
- class Generator < GeneratorBase
- include AtomGenerator
-
- def self.not_set_name
- "maker.channel.generator"
- end
- end
-
- Copyright = Feed::Channel::Copyright
-
- class Description < DescriptionBase
- end
-
- Title = Feed::Channel::Title
- end
-
- class Image < ImageBase
- end
-
- class Items < ItemsBase
- def to_feed(entry)
- (normalize.first || Item.new(@maker)).to_feed(entry)
- end
-
- class Item < ItemBase
- def to_feed(entry)
- set_default_values do
- setup_values(entry)
- entry.dc_dates.clear
- setup_other_elements(entry)
- unless have_required_values?
- raise NotSetError.new("maker.item", not_set_required_variables)
- end
- end
- end
-
- private
- def required_variable_names
- %w(id updated)
- end
-
- def variables
- super + ["updated"]
- end
-
- def variable_is_set?
- super or !authors.empty?
- end
-
- def not_set_required_variables
- set_default_values do
- vars = super
- if authors.all? {|author| !author.have_required_values?}
- vars << "author"
- end
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
- end
-
- def _set_default_values
- keep = {
- :authors => authors.to_a.dup,
- :contributors => contributors.to_a.dup,
- :categories => categories.to_a.dup,
- :id => id,
- :links => links.to_a.dup,
- :rights => @rights,
- :title => @title,
- :updated => updated,
- }
- authors.replace(@maker.channel.authors) if keep[:authors].empty?
- if keep[:contributors].empty?
- contributors.replace(@maker.channel.contributors)
- end
- if keep[:categories].empty?
- categories.replace(@maker.channel.categories)
- end
- self.id ||= link || @maker.channel.id
- links.replace(@maker.channel.links) if keep[:links].empty?
- unless keep[:rights].variable_is_set?
- @maker.channel.rights {|r| @rights = r}
- end
- unless keep[:title].variable_is_set?
- @maker.channel.title {|t| @title = t}
- end
- self.updated ||= @maker.channel.updated
- super
- ensure
- authors.replace(keep[:authors])
- contributors.replace(keep[:contributors])
- categories.replace(keep[:categories])
- links.replace(keep[:links])
- self.id = keep[:id]
- @rights = keep[:rights]
- @title = keep[:title]
- self.updated = keep[:updated]
- end
-
- Guid = Feed::Items::Item::Guid
- Enclosure = Feed::Items::Item::Enclosure
- Source = Feed::Items::Item::Source
- Categories = Feed::Items::Item::Categories
- Authors = Feed::Items::Item::Authors
- Contributors = Feed::Items::Item::Contributors
- Links = Feed::Items::Item::Links
- Rights = Feed::Items::Item::Rights
- Description = Feed::Items::Item::Description
- Title = Feed::Items::Item::Title
- Content = Feed::Items::Item::Content
- end
- end
-
- class Textinput < TextinputBase
- end
- end
- end
-
- add_maker("atom:entry", "1.0", Atom::Entry)
- add_maker("atom1.0:entry", "1.0", Atom::Entry)
- end
-end
diff --git a/lib/rss/maker/feed.rb b/lib/rss/maker/feed.rb
deleted file mode 100644
index 72ee704d6a..0000000000
--- a/lib/rss/maker/feed.rb
+++ /dev/null
@@ -1,427 +0,0 @@
-# frozen_string_literal: false
-require_relative "atom"
-
-module RSS
- module Maker
- module Atom
- class Feed < RSSBase
- def initialize(feed_version="1.0")
- super
- @feed_type = "atom"
- @feed_subtype = "feed"
- end
-
- private
- def make_feed
- ::RSS::Atom::Feed.new(@version, @encoding, @standalone)
- end
-
- def setup_elements(feed)
- setup_channel(feed)
- setup_image(feed)
- setup_items(feed)
- end
-
- class Channel < ChannelBase
- include SetupDefaultLanguage
-
- def to_feed(feed)
- set_default_values do
- setup_values(feed)
- feed.dc_dates.clear
- setup_other_elements(feed)
- if image_favicon.about
- icon = feed.class::Icon.new
- icon.content = image_favicon.about
- feed.icon = icon
- end
- unless have_required_values?
- raise NotSetError.new("maker.channel",
- not_set_required_variables)
- end
- end
- end
-
- def have_required_values?
- super and
- (!authors.empty? or
- @maker.items.any? {|item| !item.authors.empty?})
- end
-
- private
- def required_variable_names
- %w(id updated)
- end
-
- def variables
- super + %w(id updated)
- end
-
- def variable_is_set?
- super or !authors.empty?
- end
-
- def not_set_required_variables
- vars = super
- if authors.empty? and
- @maker.items.all? {|item| item.author.to_s.empty?}
- vars << "author"
- end
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
-
- def _set_default_values(&block)
- keep = {
- :id => id,
- }
- self.id ||= about
- super(&block)
- ensure
- self.id = keep[:id]
- end
-
- class SkipDays < SkipDaysBase
- def to_feed(*args)
- end
-
- class Day < DayBase
- end
- end
-
- class SkipHours < SkipHoursBase
- def to_feed(*args)
- end
-
- class Hour < HourBase
- end
- end
-
- class Cloud < CloudBase
- def to_feed(*args)
- end
- end
-
- class Categories < CategoriesBase
- class Category < CategoryBase
- include AtomCategory
-
- def self.not_set_name
- "maker.channel.category"
- end
- end
- end
-
- class Links < LinksBase
- class Link < LinkBase
- include AtomLink
-
- def self.not_set_name
- "maker.channel.link"
- end
- end
- end
-
- AtomPersons.def_atom_persons(self, "author", "maker.channel.author")
- AtomPersons.def_atom_persons(self, "contributor",
- "maker.channel.contributor")
-
- class Generator < GeneratorBase
- include AtomGenerator
-
- def self.not_set_name
- "maker.channel.generator"
- end
- end
-
- AtomTextConstruct.def_atom_text_construct(self, "rights",
- "maker.channel.copyright",
- "Copyright")
- AtomTextConstruct.def_atom_text_construct(self, "subtitle",
- "maker.channel.description",
- "Description")
- AtomTextConstruct.def_atom_text_construct(self, "title",
- "maker.channel.title")
- end
-
- class Image < ImageBase
- def to_feed(feed)
- logo = feed.class::Logo.new
- class << logo
- alias_method(:url=, :content=)
- end
- set = setup_values(logo)
- class << logo
- remove_method(:url=)
- end
- if set
- feed.logo = logo
- set_parent(logo, feed)
- setup_other_elements(feed, logo)
- elsif variable_is_set?
- raise NotSetError.new("maker.image", not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(url)
- end
- end
-
- class Items < ItemsBase
- def to_feed(feed)
- normalize.each do |item|
- item.to_feed(feed)
- end
- setup_other_elements(feed, feed.entries)
- end
-
- class Item < ItemBase
- def to_feed(feed)
- set_default_values do
- entry = feed.class::Entry.new
- set = setup_values(entry)
- entry.dc_dates.clear
- setup_other_elements(feed, entry)
- if set
- feed.entries << entry
- set_parent(entry, feed)
- elsif variable_is_set?
- raise NotSetError.new("maker.item", not_set_required_variables)
- end
- end
- end
-
- def have_required_values?
- set_default_values do
- super and title {|t| t.have_required_values?}
- end
- end
-
- private
- def required_variable_names
- %w(id updated)
- end
-
- def variables
- super + ["updated"]
- end
-
- def not_set_required_variables
- vars = super
- vars << "title" unless title {|t| t.have_required_values?}
- vars
- end
-
- def _set_default_values(&block)
- keep = {
- :id => id,
- }
- self.id ||= link
- super(&block)
- ensure
- self.id = keep[:id]
- end
-
- class Guid < GuidBase
- def to_feed(feed, current)
- end
- end
-
- class Enclosure < EnclosureBase
- def to_feed(feed, current)
- end
- end
-
- class Source < SourceBase
- def to_feed(feed, current)
- source = current.class::Source.new
- setup_values(source)
- current.source = source
- set_parent(source, current)
- setup_other_elements(feed, source)
- current.source = nil if source.to_s == "<source/>"
- end
-
- private
- def required_variable_names
- []
- end
-
- def variables
- super + ["updated"]
- end
-
- AtomPersons.def_atom_persons(self, "author",
- "maker.item.source.author")
- AtomPersons.def_atom_persons(self, "contributor",
- "maker.item.source.contributor")
-
- class Categories < CategoriesBase
- class Category < CategoryBase
- include AtomCategory
-
- def self.not_set_name
- "maker.item.source.category"
- end
- end
- end
-
- class Generator < GeneratorBase
- include AtomGenerator
-
- def self.not_set_name
- "maker.item.source.generator"
- end
- end
-
- class Icon < IconBase
- def to_feed(feed, current)
- icon = current.class::Icon.new
- class << icon
- alias_method(:url=, :content=)
- end
- set = setup_values(icon)
- class << icon
- remove_method(:url=)
- end
- if set
- current.icon = icon
- set_parent(icon, current)
- setup_other_elements(feed, icon)
- elsif variable_is_set?
- raise NotSetError.new("maker.item.source.icon",
- not_set_required_variables)
- end
- end
-
- private
- def required_variable_names
- %w(url)
- end
- end
-
- class Links < LinksBase
- class Link < LinkBase
- include AtomLink
-
- def self.not_set_name
- "maker.item.source.link"
- end
- end
- end
-
- class Logo < LogoBase
- include AtomLogo
-
- def self.not_set_name
- "maker.item.source.logo"
- end
- end
-
- maker_name_base = "maker.item.source."
- maker_name = "#{maker_name_base}rights"
- AtomTextConstruct.def_atom_text_construct(self, "rights",
- maker_name)
- maker_name = "#{maker_name_base}subtitle"
- AtomTextConstruct.def_atom_text_construct(self, "subtitle",
- maker_name)
- maker_name = "#{maker_name_base}title"
- AtomTextConstruct.def_atom_text_construct(self, "title",
- maker_name)
- end
-
- class Categories < CategoriesBase
- class Category < CategoryBase
- include AtomCategory
-
- def self.not_set_name
- "maker.item.category"
- end
- end
- end
-
- AtomPersons.def_atom_persons(self, "author", "maker.item.author")
- AtomPersons.def_atom_persons(self, "contributor",
- "maker.item.contributor")
-
- class Links < LinksBase
- class Link < LinkBase
- include AtomLink
-
- def self.not_set_name
- "maker.item.link"
- end
- end
- end
-
- AtomTextConstruct.def_atom_text_construct(self, "rights",
- "maker.item.rights")
- AtomTextConstruct.def_atom_text_construct(self, "summary",
- "maker.item.description",
- "Description")
- AtomTextConstruct.def_atom_text_construct(self, "title",
- "maker.item.title")
-
- class Content < ContentBase
- def to_feed(feed, current)
- content = current.class::Content.new
- if setup_values(content)
- content.src = nil if content.src and content.content
- current.content = content
- set_parent(content, current)
- setup_other_elements(feed, content)
- elsif variable_is_set?
- raise NotSetError.new("maker.item.content",
- not_set_required_variables)
- end
- end
-
- alias_method(:xml, :xml_content)
-
- private
- def required_variable_names
- if out_of_line?
- %w(type)
- elsif xml_type?
- %w(xml_content)
- else
- %w(content)
- end
- end
-
- def variables
- if out_of_line?
- super
- elsif xml_type?
- super + %w(xml)
- else
- super
- end
- end
-
- def xml_type?
- _type = type
- return false if _type.nil?
- _type == "xhtml" or
- /(?:\+xml|\/xml)$/i =~ _type or
- %w(text/xml-external-parsed-entity
- application/xml-external-parsed-entity
- application/xml-dtd).include?(_type.downcase)
- end
- end
- end
- end
-
- class Textinput < TextinputBase
- end
- end
- end
-
- add_maker("atom", "1.0", Atom::Feed)
- add_maker("atom:feed", "1.0", Atom::Feed)
- add_maker("atom1.0", "1.0", Atom::Feed)
- add_maker("atom1.0:feed", "1.0", Atom::Feed)
- end
-end
diff --git a/lib/rss/maker/image.rb b/lib/rss/maker/image.rb
deleted file mode 100644
index e3e62d8b9e..0000000000
--- a/lib/rss/maker/image.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-# frozen_string_literal: false
-require_relative '../image'
-require_relative '1.0'
-require_relative 'dublincore'
-
-module RSS
- module Maker
- module ImageItemModel
- def self.append_features(klass)
- super
-
- name = "#{RSS::IMAGE_PREFIX}_item"
- klass.def_classed_element(name)
- end
-
- def self.install_image_item(klass)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class ImageItem < ImageItemBase
- DublinCoreModel.install_dublin_core(self)
- end
-EOC
- end
-
- class ImageItemBase < Base
- include Maker::DublinCoreModel
-
- attr_accessor :about, :resource, :image_width, :image_height
- add_need_initialize_variable("about")
- add_need_initialize_variable("resource")
- add_need_initialize_variable("image_width")
- add_need_initialize_variable("image_height")
- alias width= image_width=
- alias width image_width
- alias height= image_height=
- alias height image_height
-
- def have_required_values?
- @about
- end
-
- def to_feed(feed, current)
- if current.respond_to?(:image_item=) and have_required_values?
- item = current.class::ImageItem.new
- setup_values(item)
- setup_other_elements(item)
- current.image_item = item
- end
- end
- end
- end
-
- module ImageFaviconModel
- def self.append_features(klass)
- super
-
- name = "#{RSS::IMAGE_PREFIX}_favicon"
- klass.def_classed_element(name)
- end
-
- def self.install_image_favicon(klass)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class ImageFavicon < ImageFaviconBase
- DublinCoreModel.install_dublin_core(self)
- end
- EOC
- end
-
- class ImageFaviconBase < Base
- include Maker::DublinCoreModel
-
- attr_accessor :about, :image_size
- add_need_initialize_variable("about")
- add_need_initialize_variable("image_size")
- alias size image_size
- alias size= image_size=
-
- def have_required_values?
- @about and @image_size
- end
-
- def to_feed(feed, current)
- if current.respond_to?(:image_favicon=) and have_required_values?
- favicon = current.class::ImageFavicon.new
- setup_values(favicon)
- setup_other_elements(favicon)
- current.image_favicon = favicon
- end
- end
- end
- end
-
- class ChannelBase; include Maker::ImageFaviconModel; end
-
- class ItemsBase
- class ItemBase; include Maker::ImageItemModel; end
- end
-
- makers.each do |maker|
- maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class Channel
- ImageFaviconModel.install_image_favicon(self)
- end
-
- class Items
- class Item
- ImageItemModel.install_image_item(self)
- end
- end
- EOC
- end
- end
-end
diff --git a/lib/rss/maker/itunes.rb b/lib/rss/maker/itunes.rb
deleted file mode 100644
index 28cca32021..0000000000
--- a/lib/rss/maker/itunes.rb
+++ /dev/null
@@ -1,243 +0,0 @@
-# frozen_string_literal: false
-require_relative '../itunes'
-require_relative '2.0'
-
-module RSS
- module Maker
- module ITunesBaseModel
- def def_class_accessor(klass, name, type, *args)
- name = name.gsub(/-/, "_").gsub(/^itunes_/, '')
- full_name = "#{RSS::ITUNES_PREFIX}_#{name}"
- case type
- when nil
- klass.def_other_element(full_name)
- when :yes_other
- def_yes_other_accessor(klass, full_name)
- when :explicit_clean_other
- def_explicit_clean_other_accessor(klass, full_name)
- when :csv
- def_csv_accessor(klass, full_name)
- when :element, :attribute
- recommended_attribute_name, = *args
- klass_name = "ITunes#{Utils.to_class_name(name)}"
- klass.def_classed_element(full_name, klass_name,
- recommended_attribute_name)
- when :elements
- plural_name, recommended_attribute_name = args
- plural_name ||= "#{name}s"
- full_plural_name = "#{RSS::ITUNES_PREFIX}_#{plural_name}"
- klass_name = "ITunes#{Utils.to_class_name(name)}"
- plural_klass_name = "ITunes#{Utils.to_class_name(plural_name)}"
- def_elements_class_accessor(klass, name, full_name, full_plural_name,
- klass_name, plural_klass_name,
- recommended_attribute_name)
- end
- end
-
- def def_yes_other_accessor(klass, full_name)
- klass.def_other_element(full_name)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{full_name}?
- Utils::YesOther.parse(@#{full_name})
- end
- EOC
- end
-
- def def_explicit_clean_other_accessor(klass, full_name)
- klass.def_other_element(full_name)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{full_name}?
- Utils::ExplicitCleanOther.parse(#{full_name})
- end
- EOC
- end
-
- def def_csv_accessor(klass, full_name)
- klass.def_csv_element(full_name)
- end
-
- def def_elements_class_accessor(klass, name, full_name, full_plural_name,
- klass_name, plural_klass_name,
- recommended_attribute_name=nil)
- if recommended_attribute_name
- klass.def_classed_elements(full_name, recommended_attribute_name,
- plural_klass_name, full_plural_name)
- else
- klass.def_classed_element(full_plural_name, plural_klass_name)
- end
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def new_#{full_name}(text=nil)
- #{full_name} = @#{full_plural_name}.new_#{name}
- #{full_name}.text = text
- if block_given?
- yield #{full_name}
- else
- #{full_name}
- end
- end
- EOC
- end
- end
-
- module ITunesChannelModel
- extend ITunesBaseModel
-
- class << self
- def append_features(klass)
- super
-
- ::RSS::ITunesChannelModel::ELEMENT_INFOS.each do |name, type, *args|
- def_class_accessor(klass, name, type, *args)
- end
- end
- end
-
- class ITunesCategoriesBase < Base
- def_array_element("category", "itunes_categories",
- "ITunesCategory")
- class ITunesCategoryBase < Base
- attr_accessor :text
- add_need_initialize_variable("text")
- def_array_element("category", "itunes_categories",
- "ITunesCategory")
-
- def have_required_values?
- text
- end
-
- alias_method :to_feed_for_categories, :to_feed
- def to_feed(feed, current)
- if text and current.respond_to?(:itunes_category)
- new_item = current.class::ITunesCategory.new(text)
- to_feed_for_categories(feed, new_item)
- current.itunes_categories << new_item
- end
- end
- end
- end
-
- class ITunesImageBase < Base
- add_need_initialize_variable("href")
- attr_accessor("href")
-
- def to_feed(feed, current)
- if @href and current.respond_to?(:itunes_image)
- current.itunes_image ||= current.class::ITunesImage.new
- current.itunes_image.href = @href
- end
- end
- end
-
- class ITunesOwnerBase < Base
- %w(itunes_name itunes_email).each do |name|
- add_need_initialize_variable(name)
- attr_accessor(name)
- end
-
- def to_feed(feed, current)
- if current.respond_to?(:itunes_owner=)
- _not_set_required_variables = not_set_required_variables
- if (required_variable_names - _not_set_required_variables).empty?
- return
- end
-
- unless have_required_values?
- raise NotSetError.new("maker.channel.itunes_owner",
- _not_set_required_variables)
- end
- current.itunes_owner ||= current.class::ITunesOwner.new
- current.itunes_owner.itunes_name = @itunes_name
- current.itunes_owner.itunes_email = @itunes_email
- end
- end
-
- private
- def required_variable_names
- %w(itunes_name itunes_email)
- end
- end
- end
-
- module ITunesItemModel
- extend ITunesBaseModel
-
- class << self
- def append_features(klass)
- super
-
- ::RSS::ITunesItemModel::ELEMENT_INFOS.each do |name, type, *args|
- def_class_accessor(klass, name, type, *args)
- end
- end
- end
-
- class ITunesDurationBase < Base
- attr_reader :content
- add_need_initialize_variable("content")
-
- %w(hour minute second).each do |name|
- attr_reader(name)
- add_need_initialize_variable(name, 0)
- end
-
- def content=(content)
- if content.nil?
- @hour, @minute, @second, @content = nil
- else
- @hour, @minute, @second =
- ::RSS::ITunesItemModel::ITunesDuration.parse(content)
- @content = content
- end
- end
-
- def hour=(hour)
- @hour = Integer(hour)
- update_content
- end
-
- def minute=(minute)
- @minute = Integer(minute)
- update_content
- end
-
- def second=(second)
- @second = Integer(second)
- update_content
- end
-
- def to_feed(feed, current)
- if @content and current.respond_to?(:itunes_duration=)
- current.itunes_duration ||= current.class::ITunesDuration.new
- current.itunes_duration.content = @content
- end
- end
-
- private
- def update_content
- components = [@hour, @minute, @second]
- @content =
- ::RSS::ITunesItemModel::ITunesDuration.construct(*components)
- end
- end
- end
-
- class ChannelBase
- include Maker::ITunesChannelModel
- class ITunesCategories < ITunesCategoriesBase
- class ITunesCategory < ITunesCategoryBase
- ITunesCategory = self
- end
- end
-
- class ITunesImage < ITunesImageBase; end
- class ITunesOwner < ITunesOwnerBase; end
- end
-
- class ItemsBase
- class ItemBase
- include Maker::ITunesItemModel
- class ITunesDuration < ITunesDurationBase; end
- end
- end
- end
-end
diff --git a/lib/rss/maker/slash.rb b/lib/rss/maker/slash.rb
deleted file mode 100644
index 473991903f..0000000000
--- a/lib/rss/maker/slash.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-require_relative '../slash'
-require_relative '1.0'
-
-module RSS
- module Maker
- module SlashModel
- def self.append_features(klass)
- super
-
- ::RSS::SlashModel::ELEMENT_INFOS.each do |name, type|
- full_name = "#{RSS::SLASH_PREFIX}_#{name}"
- case type
- when :csv_integer
- klass.def_csv_element(full_name, :integer)
- else
- klass.def_other_element(full_name)
- end
- end
-
- klass.module_eval do
- alias_method(:slash_hit_parades, :slash_hit_parade)
- alias_method(:slash_hit_parades=, :slash_hit_parade=)
- end
- end
- end
-
- class ItemsBase
- class ItemBase
- include SlashModel
- end
- end
- end
-end
diff --git a/lib/rss/maker/syndication.rb b/lib/rss/maker/syndication.rb
deleted file mode 100644
index 9fd0efe99e..0000000000
--- a/lib/rss/maker/syndication.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: false
-require_relative '../syndication'
-require_relative '1.0'
-
-module RSS
- module Maker
- module SyndicationModel
- def self.append_features(klass)
- super
-
- ::RSS::SyndicationModel::ELEMENTS.each do |name|
- klass.def_other_element(name)
- end
- end
- end
-
- class ChannelBase; include SyndicationModel; end
- end
-end
diff --git a/lib/rss/maker/taxonomy.rb b/lib/rss/maker/taxonomy.rb
deleted file mode 100644
index f9858922da..0000000000
--- a/lib/rss/maker/taxonomy.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-# frozen_string_literal: false
-require_relative '../taxonomy'
-require_relative '1.0'
-require_relative 'dublincore'
-
-module RSS
- module Maker
- module TaxonomyTopicsModel
- def self.append_features(klass)
- super
-
- klass.def_classed_element("#{RSS::TAXO_PREFIX}_topics",
- "TaxonomyTopics")
- end
-
- def self.install_taxo_topics(klass)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class TaxonomyTopics < TaxonomyTopicsBase
- def to_feed(feed, current)
- if current.respond_to?(:taxo_topics)
- topics = current.class::TaxonomyTopics.new
- bag = topics.Bag
- @resources.each do |resource|
- bag.lis << RDF::Bag::Li.new(resource)
- end
- current.taxo_topics = topics
- end
- end
- end
-EOC
- end
-
- class TaxonomyTopicsBase < Base
- attr_reader :resources
- def_array_element("resource")
- remove_method :new_resource
- end
- end
-
- module TaxonomyTopicModel
- def self.append_features(klass)
- super
-
- class_name = "TaxonomyTopics"
- klass.def_classed_elements("#{TAXO_PREFIX}_topic", "value", class_name)
- end
-
- def self.install_taxo_topic(klass)
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class TaxonomyTopics < TaxonomyTopicsBase
- class TaxonomyTopic < TaxonomyTopicBase
- DublinCoreModel.install_dublin_core(self)
- TaxonomyTopicsModel.install_taxo_topics(self)
-
- def to_feed(feed, current)
- if current.respond_to?(:taxo_topics)
- topic = current.class::TaxonomyTopic.new(value)
- topic.taxo_link = value
- taxo_topics.to_feed(feed, topic) if taxo_topics
- current.taxo_topics << topic
- setup_other_elements(feed, topic)
- end
- end
- end
- end
-EOC
- end
-
- class TaxonomyTopicsBase < Base
- def_array_element("topic", nil, "TaxonomyTopic")
- alias_method(:new_taxo_topic, :new_topic) # For backward compatibility
-
- class TaxonomyTopicBase < Base
- include DublinCoreModel
- include TaxonomyTopicsModel
-
- attr_accessor :value
- add_need_initialize_variable("value")
- alias_method(:taxo_link, :value)
- alias_method(:taxo_link=, :value=)
-
- def have_required_values?
- @value
- end
- end
- end
- end
-
- class RSSBase
- include TaxonomyTopicModel
- end
-
- class ChannelBase
- include TaxonomyTopicsModel
- end
-
- class ItemsBase
- class ItemBase
- include TaxonomyTopicsModel
- end
- end
-
- makers.each do |maker|
- maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- TaxonomyTopicModel.install_taxo_topic(self)
-
- class Channel
- TaxonomyTopicsModel.install_taxo_topics(self)
- end
-
- class Items
- class Item
- TaxonomyTopicsModel.install_taxo_topics(self)
- end
- end
- EOC
- end
- end
-end
diff --git a/lib/rss/maker/trackback.rb b/lib/rss/maker/trackback.rb
deleted file mode 100644
index f78b4058f9..0000000000
--- a/lib/rss/maker/trackback.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: false
-require_relative '../trackback'
-require_relative '1.0'
-require_relative '2.0'
-
-module RSS
- module Maker
- module TrackBackModel
- def self.append_features(klass)
- super
-
- klass.def_other_element("#{RSS::TRACKBACK_PREFIX}_ping")
- klass.def_classed_elements("#{RSS::TRACKBACK_PREFIX}_about", "value",
- "TrackBackAbouts")
- end
-
- class TrackBackAboutsBase < Base
- def_array_element("about", nil, "TrackBackAbout")
-
- class TrackBackAboutBase < Base
- attr_accessor :value
- add_need_initialize_variable("value")
-
- alias_method(:resource, :value)
- alias_method(:resource=, :value=)
- alias_method(:content, :value)
- alias_method(:content=, :value=)
-
- def have_required_values?
- @value
- end
-
- def to_feed(feed, current)
- if current.respond_to?(:trackback_abouts) and have_required_values?
- about = current.class::TrackBackAbout.new
- setup_values(about)
- setup_other_elements(about)
- current.trackback_abouts << about
- end
- end
- end
- end
- end
-
- class ItemsBase
- class ItemBase; include TrackBackModel; end
- end
-
- makers.each do |maker|
- maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- class Items
- class Item
- class TrackBackAbouts < TrackBackAboutsBase
- class TrackBackAbout < TrackBackAboutBase
- end
- end
- end
- end
- EOC
- end
- end
-end
diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb
deleted file mode 100644
index e1bcfc53e3..0000000000
--- a/lib/rss/parser.rb
+++ /dev/null
@@ -1,589 +0,0 @@
-# frozen_string_literal: false
-require "forwardable"
-require "open-uri"
-
-require_relative "rss"
-require_relative "xml"
-
-module RSS
-
- class NotWellFormedError < Error
- attr_reader :line, :element
-
- # Create a new NotWellFormedError for an error at +line+
- # in +element+. If a block is given the return value of
- # the block ends up in the error message.
- def initialize(line=nil, element=nil)
- message = "This is not well formed XML"
- if element or line
- message << "\nerror occurred"
- message << " in #{element}" if element
- message << " at about #{line} line" if line
- end
- message << "\n#{yield}" if block_given?
- super(message)
- end
- end
-
- class XMLParserNotFound < Error
- def initialize
- super("available XML parser was not found in " <<
- "#{AVAILABLE_PARSER_LIBRARIES.inspect}.")
- end
- end
-
- class NotValidXMLParser < Error
- def initialize(parser)
- super("#{parser} is not an available XML parser. " <<
- "Available XML parser" <<
- (AVAILABLE_PARSERS.size > 1 ? "s are " : " is ") <<
- "#{AVAILABLE_PARSERS.inspect}.")
- end
- end
-
- class NSError < InvalidRSSError
- attr_reader :tag, :prefix, :uri
- def initialize(tag, prefix, require_uri)
- @tag, @prefix, @uri = tag, prefix, require_uri
- super("prefix <#{prefix}> doesn't associate uri " <<
- "<#{require_uri}> in tag <#{tag}>")
- end
- end
-
- class Parser
-
- extend Forwardable
-
- class << self
-
- @@default_parser = nil
-
- def default_parser
- @@default_parser || AVAILABLE_PARSERS.first
- end
-
- # Set @@default_parser to new_value if it is one of the
- # available parsers. Else raise NotValidXMLParser error.
- def default_parser=(new_value)
- if AVAILABLE_PARSERS.include?(new_value)
- @@default_parser = new_value
- else
- raise NotValidXMLParser.new(new_value)
- end
- end
-
- def parse(rss, *args)
- if args.last.is_a?(Hash)
- options = args.pop
- else
- options = {}
- end
- do_validate = boolean_argument(args[0], options[:validate], true)
- ignore_unknown_element =
- boolean_argument(args[1], options[:ignore_unknown_element], true)
- parser_class = args[2] || options[:parser_class] || default_parser
- parser = new(rss, parser_class)
- parser.do_validate = do_validate
- parser.ignore_unknown_element = ignore_unknown_element
- parser.parse
- end
-
- private
- def boolean_argument(positioned_value, option_value, default)
- value = positioned_value
- if value.nil? and not option_value.nil?
- value = option_value
- end
- value = default if value.nil?
- value
- end
- end
-
- def_delegators(:@parser, :parse, :rss,
- :ignore_unknown_element,
- :ignore_unknown_element=, :do_validate,
- :do_validate=)
-
- def initialize(rss, parser_class=self.class.default_parser)
- @parser = parser_class.new(normalize_rss(rss))
- end
-
- private
-
- # Try to get the XML associated with +rss+.
- # Return +rss+ if it already looks like XML, or treat it as a URI,
- # or a file to get the XML,
- def normalize_rss(rss)
- return rss if maybe_xml?(rss)
-
- uri = to_uri(rss)
-
- if uri.respond_to?(:read)
- uri.read
- elsif (RUBY_VERSION >= '2.7' || !rss.tainted?) and File.readable?(rss)
- File.open(rss) {|f| f.read}
- else
- rss
- end
- end
-
- # maybe_xml? tests if source is a string that looks like XML.
- def maybe_xml?(source)
- source.is_a?(String) and /</ =~ source
- end
-
- # Attempt to convert rss to a URI, but just return it if
- # there's a ::URI::Error
- def to_uri(rss)
- return rss if rss.is_a?(::URI::Generic)
-
- begin
- ::URI.parse(rss)
- rescue ::URI::Error
- rss
- end
- end
- end
-
- class BaseParser
-
- class << self
- def raise_for_undefined_entity?
- listener.raise_for_undefined_entity?
- end
- end
-
- def initialize(rss)
- @listener = self.class.listener.new
- @rss = rss
- end
-
- def rss
- @listener.rss
- end
-
- def ignore_unknown_element
- @listener.ignore_unknown_element
- end
-
- def ignore_unknown_element=(new_value)
- @listener.ignore_unknown_element = new_value
- end
-
- def do_validate
- @listener.do_validate
- end
-
- def do_validate=(new_value)
- @listener.do_validate = new_value
- end
-
- def parse
- if @listener.rss.nil?
- _parse
- end
- @listener.rss
- end
-
- end
-
- class BaseListener
-
- extend Utils
-
- class << self
-
- @@accessor_bases = {}
- @@registered_uris = {}
- @@class_names = {}
-
- # return the setter for the uri, tag_name pair, or nil.
- def setter(uri, tag_name)
- _getter = getter(uri, tag_name)
- if _getter
- "#{_getter}="
- else
- nil
- end
- end
-
- def getter(uri, tag_name)
- (@@accessor_bases[uri] || {})[tag_name]
- end
-
- # return the tag_names for setters associated with uri
- def available_tags(uri)
- (@@accessor_bases[uri] || {}).keys
- end
-
- # register uri against this name.
- def register_uri(uri, name)
- @@registered_uris[name] ||= {}
- @@registered_uris[name][uri] = nil
- end
-
- # test if this uri is registered against this name
- def uri_registered?(uri, name)
- @@registered_uris[name].has_key?(uri)
- end
-
- # record class_name for the supplied uri and tag_name
- def install_class_name(uri, tag_name, class_name)
- @@class_names[uri] ||= {}
- @@class_names[uri][tag_name] = class_name
- end
-
- # retrieve class_name for the supplied uri and tag_name
- # If it doesn't exist, capitalize the tag_name
- def class_name(uri, tag_name)
- name = (@@class_names[uri] || {})[tag_name]
- return name if name
-
- tag_name = tag_name.gsub(/[_\-]([a-z]?)/) {$1.upcase}
- tag_name[0, 1].upcase + tag_name[1..-1]
- end
-
- def install_get_text_element(uri, name, accessor_base)
- install_accessor_base(uri, name, accessor_base)
- def_get_text_element(uri, name, *get_file_and_line_from_caller(1))
- end
-
- def raise_for_undefined_entity?
- true
- end
-
- private
- # set the accessor for the uri, tag_name pair
- def install_accessor_base(uri, tag_name, accessor_base)
- @@accessor_bases[uri] ||= {}
- @@accessor_bases[uri][tag_name] = accessor_base.chomp("=")
- end
-
- def def_get_text_element(uri, element_name, file, line)
- register_uri(uri, element_name)
- method_name = "start_#{element_name}"
- unless private_method_defined?(method_name)
- define_method(method_name) do |name, prefix, attrs, ns|
- uri = _ns(ns, prefix)
- if self.class.uri_registered?(uri, element_name)
- start_get_text_element(name, prefix, ns, uri)
- else
- start_else_element(name, prefix, attrs, ns)
- end
- end
- private(method_name)
- end
- end
- end
- end
-
- module ListenerMixin
- attr_reader :rss
-
- attr_accessor :ignore_unknown_element
- attr_accessor :do_validate
-
- def initialize
- @rss = nil
- @ignore_unknown_element = true
- @do_validate = true
- @ns_stack = [{"xml" => :xml}]
- @tag_stack = [[]]
- @text_stack = ['']
- @proc_stack = []
- @last_element = nil
- @version = @encoding = @standalone = nil
- @xml_stylesheets = []
- @xml_child_mode = false
- @xml_element = nil
- @last_xml_element = nil
- end
-
- # set instance vars for version, encoding, standalone
- def xmldecl(version, encoding, standalone)
- @version, @encoding, @standalone = version, encoding, standalone
- end
-
- def instruction(name, content)
- if name == "xml-stylesheet"
- params = parse_pi_content(content)
- if params.has_key?("href")
- @xml_stylesheets << XMLStyleSheet.new(params)
- end
- end
- end
-
- def tag_start(name, attributes)
- @text_stack.push('')
-
- ns = @ns_stack.last.dup
- attrs = {}
- attributes.each do |n, v|
- if /\Axmlns(?:\z|:)/ =~ n
- ns[$POSTMATCH] = v
- else
- attrs[n] = v
- end
- end
- @ns_stack.push(ns)
-
- prefix, local = split_name(name)
- @tag_stack.last.push([_ns(ns, prefix), local])
- @tag_stack.push([])
- if @xml_child_mode
- previous = @last_xml_element
- element_attrs = attributes.dup
- unless previous
- ns.each do |ns_prefix, value|
- next if ns_prefix == "xml"
- key = ns_prefix.empty? ? "xmlns" : "xmlns:#{ns_prefix}"
- element_attrs[key] ||= value
- end
- end
- next_element = XML::Element.new(local,
- prefix.empty? ? nil : prefix,
- _ns(ns, prefix),
- element_attrs)
- previous << next_element if previous
- @last_xml_element = next_element
- pr = Proc.new do |text, tags|
- if previous
- @last_xml_element = previous
- else
- @xml_element = @last_xml_element
- @last_xml_element = nil
- end
- end
- @proc_stack.push(pr)
- else
- if @rss.nil? and respond_to?("initial_start_#{local}", true)
- __send__("initial_start_#{local}", local, prefix, attrs, ns.dup)
- elsif respond_to?("start_#{local}", true)
- __send__("start_#{local}", local, prefix, attrs, ns.dup)
- else
- start_else_element(local, prefix, attrs, ns.dup)
- end
- end
- end
-
- def tag_end(name)
- if DEBUG
- p "end tag #{name}"
- p @tag_stack
- end
- text = @text_stack.pop
- tags = @tag_stack.pop
- pr = @proc_stack.pop
- pr.call(text, tags) unless pr.nil?
- @ns_stack.pop
- end
-
- def text(data)
- if @xml_child_mode
- @last_xml_element << data if @last_xml_element
- else
- @text_stack.last << data
- end
- end
-
- private
- def _ns(ns, prefix)
- ns.fetch(prefix, "")
- end
-
- CONTENT_PATTERN = /\s*([^=]+)=(["'])([^\2]+?)\2/
- # Extract the first name="value" pair from content.
- # Works with single quotes according to the constant
- # CONTENT_PATTERN. Return a Hash.
- def parse_pi_content(content)
- params = {}
- content.scan(CONTENT_PATTERN) do |name, quote, value|
- params[name] = value
- end
- params
- end
-
- def start_else_element(local, prefix, attrs, ns)
- class_name = self.class.class_name(_ns(ns, prefix), local)
- current_class = @last_element.class
- if known_class?(current_class, class_name)
- next_class = current_class.const_get(class_name)
- start_have_something_element(local, prefix, attrs, ns, next_class)
- else
- if !@do_validate or @ignore_unknown_element
- @proc_stack.push(setup_next_element_in_unknown_element)
- else
- parent = "ROOT ELEMENT???"
- if current_class.tag_name
- parent = current_class.tag_name
- end
- raise NotExpectedTagError.new(local, _ns(ns, prefix), parent)
- end
- end
- end
-
- if Module.method(:const_defined?).arity == -1
- def known_class?(target_class, class_name)
- class_name and
- (target_class.const_defined?(class_name, false) or
- target_class.constants.include?(class_name.to_sym))
- end
- else
- def known_class?(target_class, class_name)
- class_name and
- (target_class.const_defined?(class_name) or
- target_class.constants.include?(class_name))
- end
- end
-
- NAMESPLIT = /^(?:([\w:][-\w.]*):)?([\w:][-\w.]*)/
- def split_name(name)
- name =~ NAMESPLIT
- [$1 || '', $2]
- end
-
- def check_ns(tag_name, prefix, ns, require_uri, ignore_unknown_element=nil)
- if _ns(ns, prefix) == require_uri
- true
- else
- if ignore_unknown_element.nil?
- ignore_unknown_element = @ignore_unknown_element
- end
-
- if ignore_unknown_element
- false
- elsif @do_validate
- raise NSError.new(tag_name, prefix, require_uri)
- else
- # Force bind required URI with prefix
- @ns_stack.last[prefix] = require_uri
- true
- end
- end
- end
-
- def start_get_text_element(tag_name, prefix, ns, required_uri)
- pr = Proc.new do |text, tags|
- setter = self.class.setter(required_uri, tag_name)
- if setter and @last_element.respond_to?(setter)
- if @do_validate
- getter = self.class.getter(required_uri, tag_name)
- if @last_element.__send__(getter)
- raise TooMuchTagError.new(tag_name, @last_element.tag_name)
- end
- end
- @last_element.__send__(setter, text.to_s)
- else
- if @do_validate and !@ignore_unknown_element
- raise NotExpectedTagError.new(tag_name, _ns(ns, prefix),
- @last_element.tag_name)
- end
- end
- end
- @proc_stack.push(pr)
- end
-
- def start_have_something_element(tag_name, prefix, attrs, ns, klass)
- if check_ns(tag_name, prefix, ns, klass.required_uri)
- attributes = collect_attributes(tag_name, prefix, attrs, ns, klass)
- @proc_stack.push(setup_next_element(tag_name, klass, attributes))
- else
- @proc_stack.push(setup_next_element_in_unknown_element)
- end
- end
-
- def collect_attributes(tag_name, prefix, attrs, ns, klass)
- attributes = {}
- klass.get_attributes.each do |a_name, a_uri, required, element_name|
- if a_uri.is_a?(String) or !a_uri.respond_to?(:include?)
- a_uri = [a_uri]
- end
- unless a_uri == [""]
- for prefix, uri in ns
- if a_uri.include?(uri)
- val = attrs["#{prefix}:#{a_name}"]
- break if val
- end
- end
- end
- if val.nil? and a_uri.include?("")
- val = attrs[a_name]
- end
-
- if @do_validate and required and val.nil?
- unless a_uri.include?("")
- for prefix, uri in ns
- if a_uri.include?(uri)
- a_name = "#{prefix}:#{a_name}"
- end
- end
- end
- raise MissingAttributeError.new(tag_name, a_name)
- end
-
- attributes[a_name] = val
- end
- attributes
- end
-
- def setup_next_element(tag_name, klass, attributes)
- previous = @last_element
- next_element = klass.new(@do_validate, attributes)
- previous.set_next_element(tag_name, next_element)
- @last_element = next_element
- @last_element.parent = previous if klass.need_parent?
- @xml_child_mode = @last_element.have_xml_content?
-
- Proc.new do |text, tags|
- p(@last_element.class) if DEBUG
- if @xml_child_mode
- @last_element.content = @xml_element.to_s
- xml_setter = @last_element.class.xml_setter
- @last_element.__send__(xml_setter, @xml_element)
- @xml_element = nil
- @xml_child_mode = false
- else
- if klass.have_content?
- if @last_element.need_base64_encode?
- text = text.lstrip.unpack("m").first
- end
- @last_element.content = text
- end
- end
- if @do_validate
- @last_element.validate_for_stream(tags, @ignore_unknown_element)
- end
- @last_element = previous
- end
- end
-
- def setup_next_element_in_unknown_element
- current_element, @last_element = @last_element, nil
- Proc.new {@last_element = current_element}
- end
- end
-
- unless const_defined? :AVAILABLE_PARSER_LIBRARIES
- # The list of all available libraries for parsing.
- AVAILABLE_PARSER_LIBRARIES = [
- ["rss/xmlparser", :XMLParserParser],
- ["rss/xmlscanner", :XMLScanParser],
- ["rss/rexmlparser", :REXMLParser],
- ]
- end
-
- # The list of all available parsers, in constant form.
- AVAILABLE_PARSERS = []
-
- AVAILABLE_PARSER_LIBRARIES.each do |lib, parser|
- begin
- require lib
- AVAILABLE_PARSERS.push(const_get(parser))
- rescue LoadError
- end
- end
-
- if AVAILABLE_PARSERS.empty?
- raise XMLParserNotFound
- end
-end
diff --git a/lib/rss/rexmlparser.rb b/lib/rss/rexmlparser.rb
deleted file mode 100644
index ef0595e447..0000000000
--- a/lib/rss/rexmlparser.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# frozen_string_literal: false
-require "rexml/document"
-require "rexml/streamlistener"
-
-module RSS
-
- class REXMLParser < BaseParser
-
- class << self
- def listener
- REXMLListener
- end
- end
-
- private
- def _parse
- begin
- REXML::Document.parse_stream(@rss, @listener)
- rescue RuntimeError => e
- raise NotWellFormedError.new{e.message}
- rescue REXML::ParseException => e
- context = e.context
- line = context[0] if context
- raise NotWellFormedError.new(line){e.message}
- end
- end
-
- end
-
- class REXMLListener < BaseListener
-
- include REXML::StreamListener
- include ListenerMixin
-
- class << self
- def raise_for_undefined_entity?
- false
- end
- end
-
- def xmldecl(version, encoding, standalone)
- super(version, encoding, standalone == "yes")
- # Encoding is converted to UTF-8 when REXML parse XML.
- @encoding = 'UTF-8'
- end
-
- alias_method(:cdata, :text)
- end
-
-end
diff --git a/lib/rss/rss.gemspec b/lib/rss/rss.gemspec
deleted file mode 100644
index 04f2b2f42d..0000000000
--- a/lib/rss/rss.gemspec
+++ /dev/null
@@ -1,80 +0,0 @@
-begin
- require_relative "lib/rss/version"
-rescue LoadError
- # for Ruby core repository
- require_relative "version"
-end
-
-Gem::Specification.new do |spec|
- spec.name = "rss"
- spec.version = RSS::VERSION
- spec.authors = ["Kouhei Sutou"]
- spec.email = ["kou@cozmixng.org"]
-
- spec.summary = %q{Family of libraries that support various formats of XML "feeds".}
- spec.description = %q{Family of libraries that support various formats of XML "feeds".}
- spec.homepage = "https://github.com/ruby/rss"
- spec.license = "BSD-2-Clause"
-
- spec.files = [
- ".gitignore",
- ".travis.yml",
- "Gemfile",
- "LICENSE.txt",
- "NEWS.md",
- "README.md",
- "Rakefile",
- "lib/rss.rb",
- "lib/rss/0.9.rb",
- "lib/rss/1.0.rb",
- "lib/rss/2.0.rb",
- "lib/rss/atom.rb",
- "lib/rss/content.rb",
- "lib/rss/content/1.0.rb",
- "lib/rss/content/2.0.rb",
- "lib/rss/converter.rb",
- "lib/rss/dublincore.rb",
- "lib/rss/dublincore/1.0.rb",
- "lib/rss/dublincore/2.0.rb",
- "lib/rss/dublincore/atom.rb",
- "lib/rss/image.rb",
- "lib/rss/itunes.rb",
- "lib/rss/maker.rb",
- "lib/rss/maker/0.9.rb",
- "lib/rss/maker/1.0.rb",
- "lib/rss/maker/2.0.rb",
- "lib/rss/maker/atom.rb",
- "lib/rss/maker/base.rb",
- "lib/rss/maker/content.rb",
- "lib/rss/maker/dublincore.rb",
- "lib/rss/maker/entry.rb",
- "lib/rss/maker/feed.rb",
- "lib/rss/maker/image.rb",
- "lib/rss/maker/itunes.rb",
- "lib/rss/maker/slash.rb",
- "lib/rss/maker/syndication.rb",
- "lib/rss/maker/taxonomy.rb",
- "lib/rss/maker/trackback.rb",
- "lib/rss/parser.rb",
- "lib/rss/rexmlparser.rb",
- "lib/rss/rss.rb",
- "lib/rss/slash.rb",
- "lib/rss/syndication.rb",
- "lib/rss/taxonomy.rb",
- "lib/rss/trackback.rb",
- "lib/rss/utils.rb",
- "lib/rss/version.rb",
- "lib/rss/xml-stylesheet.rb",
- "lib/rss/xml.rb",
- "lib/rss/xmlparser.rb",
- "lib/rss/xmlscanner.rb",
- "rss.gemspec",
- ]
- spec.bindir = "exe"
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
- spec.require_paths = ["lib"]
-
- spec.add_development_dependency "bundler"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "test-unit"
-end
diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb
deleted file mode 100644
index daa0837e9c..0000000000
--- a/lib/rss/rss.rb
+++ /dev/null
@@ -1,1342 +0,0 @@
-# frozen_string_literal: false
-require "time"
-
-class Time
- class << self
- unless respond_to?(:w3cdtf)
- # This method converts a W3CDTF string date/time format to Time object.
- #
- # The W3CDTF format is defined here: http://www.w3.org/TR/NOTE-datetime
- #
- # Time.w3cdtf('2003-02-15T13:50:05-05:00')
- # # => 2003-02-15 10:50:05 -0800
- # Time.w3cdtf('2003-02-15T13:50:05-05:00').class
- # # => Time
- def w3cdtf(date)
- if /\A\s*
- (-?\d+)-(\d\d)-(\d\d)
- (?:T
- (\d\d):(\d\d)(?::(\d\d))?
- (\.\d+)?
- (Z|[+-]\d\d:\d\d)?)?
- \s*\z/ix =~ date and (($5 and $8) or (!$5 and !$8))
- datetime = [$1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i]
- usec = 0
- usec = $7.to_f * 1000000 if $7
- zone = $8
- if zone
- off = zone_offset(zone, datetime[0])
- datetime = apply_offset(*(datetime + [off]))
- datetime << usec
- time = Time.utc(*datetime)
- force_zone!(time, zone, off)
- time
- else
- datetime << usec
- Time.local(*datetime)
- end
- else
- raise ArgumentError.new("invalid date: #{date.inspect}")
- end
- end
- end
- end
-
- unless method_defined?(:w3cdtf)
- # This method converts a Time object to a String. The String contains the
- # time in W3CDTF date/time format.
- #
- # The W3CDTF format is defined here: http://www.w3.org/TR/NOTE-datetime
- #
- # Time.now.w3cdtf
- # # => "2013-08-26T14:12:10.817124-07:00"
- def w3cdtf
- if usec.zero?
- fraction_digits = 0
- else
- fraction_digits = strftime('%6N').index(/0*\z/)
- end
- xmlschema(fraction_digits)
- end
- end
-end
-
-
-require "English"
-require_relative "utils"
-require_relative "converter"
-require_relative "xml-stylesheet"
-
-module RSS
- # The URI of the RSS 1.0 specification
- URI = "http://purl.org/rss/1.0/"
-
- DEBUG = false # :nodoc:
-
- # The basic error all other RSS errors stem from. Rescue this error if you
- # want to handle any given RSS error and you don't care about the details.
- class Error < StandardError; end
-
- # RSS, being an XML-based format, has namespace support. If two namespaces are
- # declared with the same name, an OverlappedPrefixError will be raised.
- class OverlappedPrefixError < Error
- attr_reader :prefix
- def initialize(prefix)
- @prefix = prefix
- end
- end
-
- # The InvalidRSSError error is the base class for a variety of errors
- # related to a poorly-formed RSS feed. Rescue this error if you only
- # care that a file could be invalid, but don't care how it is invalid.
- class InvalidRSSError < Error; end
-
- # Since RSS is based on XML, it must have opening and closing tags that
- # match. If they don't, a MissingTagError will be raised.
- class MissingTagError < InvalidRSSError
- attr_reader :tag, :parent
- def initialize(tag, parent)
- @tag, @parent = tag, parent
- super("tag <#{tag}> is missing in tag <#{parent}>")
- end
- end
-
- # Some tags must only exist a specific number of times in a given RSS feed.
- # If a feed has too many occurrences of one of these tags, a TooMuchTagError
- # will be raised.
- class TooMuchTagError < InvalidRSSError
- attr_reader :tag, :parent
- def initialize(tag, parent)
- @tag, @parent = tag, parent
- super("tag <#{tag}> is too much in tag <#{parent}>")
- end
- end
-
- # Certain attributes are required on specific tags in an RSS feed. If a feed
- # is missing one of these attributes, a MissingAttributeError is raised.
- class MissingAttributeError < InvalidRSSError
- attr_reader :tag, :attribute
- def initialize(tag, attribute)
- @tag, @attribute = tag, attribute
- super("attribute <#{attribute}> is missing in tag <#{tag}>")
- end
- end
-
- # RSS does not allow for free-form tag names, so if an RSS feed contains a
- # tag that we don't know about, an UnknownTagError is raised.
- class UnknownTagError < InvalidRSSError
- attr_reader :tag, :uri
- def initialize(tag, uri)
- @tag, @uri = tag, uri
- super("tag <#{tag}> is unknown in namespace specified by uri <#{uri}>")
- end
- end
-
- # Raised when an unexpected tag is encountered.
- class NotExpectedTagError < InvalidRSSError
- attr_reader :tag, :uri, :parent
- def initialize(tag, uri, parent)
- @tag, @uri, @parent = tag, uri, parent
- super("tag <{#{uri}}#{tag}> is not expected in tag <#{parent}>")
- end
- end
- # For backward compatibility :X
- NotExceptedTagError = NotExpectedTagError # :nodoc:
-
- # Attributes are in key-value form, and if there's no value provided for an
- # attribute, a NotAvailableValueError will be raised.
- class NotAvailableValueError < InvalidRSSError
- attr_reader :tag, :value, :attribute
- def initialize(tag, value, attribute=nil)
- @tag, @value, @attribute = tag, value, attribute
- message = "value <#{value}> of "
- message << "attribute <#{attribute}> of " if attribute
- message << "tag <#{tag}> is not available."
- super(message)
- end
- end
-
- # Raised when an unknown conversion error occurs.
- class UnknownConversionMethodError < Error
- attr_reader :to, :from
- def initialize(to, from)
- @to = to
- @from = from
- super("can't convert to #{to} from #{from}.")
- end
- end
- # for backward compatibility
- UnknownConvertMethod = UnknownConversionMethodError # :nodoc:
-
- # Raised when a conversion failure occurs.
- class ConversionError < Error
- attr_reader :string, :to, :from
- def initialize(string, to, from)
- @string = string
- @to = to
- @from = from
- super("can't convert #{@string} to #{to} from #{from}.")
- end
- end
-
- # Raised when a required variable is not set.
- class NotSetError < Error
- attr_reader :name, :variables
- def initialize(name, variables)
- @name = name
- @variables = variables
- super("required variables of #{@name} are not set: #{@variables.join(', ')}")
- end
- end
-
- # Raised when a RSS::Maker attempts to use an unknown maker.
- class UnsupportedMakerVersionError < Error
- attr_reader :version
- def initialize(version)
- @version = version
- super("Maker doesn't support version: #{@version}")
- end
- end
-
- module BaseModel
- include Utils
-
- def install_have_child_element(tag_name, uri, occurs, name=nil, type=nil)
- name ||= tag_name
- add_need_initialize_variable(name)
- install_model(tag_name, uri, occurs, name)
-
- writer_type, reader_type = type
- def_corresponded_attr_writer name, writer_type
- def_corresponded_attr_reader name, reader_type
- install_element(name) do |n, elem_name|
- <<-EOC
- if @#{n}
- "\#{@#{n}.to_s(need_convert, indent)}"
- else
- ''
- end
-EOC
- end
- end
- alias_method(:install_have_attribute_element, :install_have_child_element)
-
- def install_have_children_element(tag_name, uri, occurs, name=nil, plural_name=nil)
- name ||= tag_name
- plural_name ||= "#{name}s"
- add_have_children_element(name, plural_name)
- add_plural_form(name, plural_name)
- install_model(tag_name, uri, occurs, plural_name, true)
-
- def_children_accessor(name, plural_name)
- install_element(name, "s") do |n, elem_name|
- <<-EOC
- rv = []
- @#{n}.each do |x|
- value = "\#{x.to_s(need_convert, indent)}"
- rv << value if /\\A\\s*\\z/ !~ value
- end
- rv.join("\n")
-EOC
- end
- end
-
- def install_text_element(tag_name, uri, occurs, name=nil, type=nil,
- disp_name=nil)
- name ||= tag_name
- disp_name ||= name
- self::ELEMENTS << name unless self::ELEMENTS.include?(name)
- add_need_initialize_variable(name)
- install_model(tag_name, uri, occurs, name)
-
- def_corresponded_attr_writer(name, type, disp_name)
- def_corresponded_attr_reader(name, type || :convert)
- install_element(name) do |n, elem_name|
- <<-EOC
- if respond_to?(:#{n}_content)
- content = #{n}_content
- else
- content = @#{n}
- end
- if content
- rv = "\#{indent}<#{elem_name}>"
- value = html_escape(content)
- if need_convert
- rv << convert(value)
- else
- rv << value
- end
- rv << "</#{elem_name}>"
- rv
- else
- ''
- end
-EOC
- end
- end
-
- def install_date_element(tag_name, uri, occurs, name=nil, type=nil, disp_name=nil)
- name ||= tag_name
- type ||= :w3cdtf
- disp_name ||= name
- self::ELEMENTS << name
- add_need_initialize_variable(name)
- install_model(tag_name, uri, occurs, name)
-
- # accessor
- convert_attr_reader name
- date_writer(name, type, disp_name)
-
- install_element(name) do |n, elem_name|
- <<-EOC
- if @#{n}
- rv = "\#{indent}<#{elem_name}>"
- value = html_escape(@#{n}.#{type})
- if need_convert
- rv << convert(value)
- else
- rv << value
- end
- rv << "</#{elem_name}>"
- rv
- else
- ''
- end
-EOC
- end
-
- end
-
- private
- def install_element(name, postfix="")
- elem_name = name.sub('_', ':')
- method_name = "#{name}_element#{postfix}"
- add_to_element_method(method_name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{method_name}(need_convert=true, indent='')
- #{yield(name, elem_name)}
- end
- private :#{method_name}
-EOC
- end
-
- def inherit_convert_attr_reader(*attrs)
- attrs.each do |attr|
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{attr}_without_inherit
- convert(@#{attr})
- end
-
- def #{attr}
- if @#{attr}
- #{attr}_without_inherit
- elsif @parent
- @parent.#{attr}
- else
- nil
- end
- end
-EOC
- end
- end
-
- def uri_convert_attr_reader(*attrs)
- attrs.each do |attr|
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{attr}_without_base
- convert(@#{attr})
- end
-
- def #{attr}
- value = #{attr}_without_base
- return nil if value.nil?
- if /\\A[a-z][a-z0-9+.\\-]*:/i =~ value
- value
- else
- "\#{base}\#{value}"
- end
- end
-EOC
- end
- end
-
- def convert_attr_reader(*attrs)
- attrs.each do |attr|
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{attr}
- convert(@#{attr})
- end
-EOC
- end
- end
-
- def explicit_clean_other_attr_reader(*attrs)
- attrs.each do |attr|
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- attr_reader(:#{attr})
- def #{attr}?
- ExplicitCleanOther.parse(@#{attr})
- end
- EOC
- end
- end
-
- def yes_other_attr_reader(*attrs)
- attrs.each do |attr|
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- attr_reader(:#{attr})
- def #{attr}?
- Utils::YesOther.parse(@#{attr})
- end
- EOC
- end
- end
-
- def csv_attr_reader(*attrs)
- separator = nil
- if attrs.last.is_a?(Hash)
- options = attrs.pop
- separator = options[:separator]
- end
- separator ||= ", "
- attrs.each do |attr|
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- attr_reader(:#{attr})
- def #{attr}_content
- if @#{attr}.nil?
- @#{attr}
- else
- @#{attr}.join(#{separator.dump})
- end
- end
- EOC
- end
- end
-
- def date_writer(name, type, disp_name=name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if new_value.nil?
- @#{name} = new_value
- elsif new_value.kind_of?(Time)
- @#{name} = new_value.dup
- else
- if @do_validate
- begin
- @#{name} = Time.__send__('#{type}', new_value)
- rescue ArgumentError
- raise NotAvailableValueError.new('#{disp_name}', new_value)
- end
- else
- @#{name} = nil
- if /\\A\\s*\\z/ !~ new_value.to_s
- begin
- unless Date._parse(new_value, false).empty?
- @#{name} = Time.parse(new_value)
- end
- rescue ArgumentError
- end
- end
- end
- end
-
- # Is it need?
- if @#{name}
- class << @#{name}
- undef_method(:to_s)
- alias_method(:to_s, :#{type})
- end
- end
-
- end
-EOC
- end
-
- def integer_writer(name, disp_name=name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if new_value.nil?
- @#{name} = new_value
- else
- if @do_validate
- begin
- @#{name} = Integer(new_value)
- rescue ArgumentError
- raise NotAvailableValueError.new('#{disp_name}', new_value)
- end
- else
- @#{name} = new_value.to_i
- end
- end
- end
-EOC
- end
-
- def positive_integer_writer(name, disp_name=name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if new_value.nil?
- @#{name} = new_value
- else
- if @do_validate
- begin
- tmp = Integer(new_value)
- raise ArgumentError if tmp <= 0
- @#{name} = tmp
- rescue ArgumentError
- raise NotAvailableValueError.new('#{disp_name}', new_value)
- end
- else
- @#{name} = new_value.to_i
- end
- end
- end
-EOC
- end
-
- def boolean_writer(name, disp_name=name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if new_value.nil?
- @#{name} = new_value
- else
- if @do_validate and
- ![true, false, "true", "false"].include?(new_value)
- raise NotAvailableValueError.new('#{disp_name}', new_value)
- end
- if [true, false].include?(new_value)
- @#{name} = new_value
- else
- @#{name} = new_value == "true"
- end
- end
- end
-EOC
- end
-
- def text_type_writer(name, disp_name=name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if @do_validate and
- !["text", "html", "xhtml", nil].include?(new_value)
- raise NotAvailableValueError.new('#{disp_name}', new_value)
- end
- @#{name} = new_value
- end
-EOC
- end
-
- def content_writer(name, disp_name=name)
- klass_name = "self.class::#{Utils.to_class_name(name)}"
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{name}=(new_value)
- if new_value.is_a?(#{klass_name})
- @#{name} = new_value
- else
- @#{name} = #{klass_name}.new
- @#{name}.content = new_value
- end
- end
-EOC
- end
-
- def explicit_clean_other_writer(name, disp_name=name)
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}=(value)
- value = (value ? "yes" : "no") if [true, false].include?(value)
- @#{name} = value
- end
- EOC
- end
-
- def yes_other_writer(name, disp_name=name)
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}=(new_value)
- if [true, false].include?(new_value)
- new_value = new_value ? "yes" : "no"
- end
- @#{name} = new_value
- end
- EOC
- end
-
- def csv_writer(name, disp_name=name)
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}=(new_value)
- @#{name} = Utils::CSV.parse(new_value)
- end
- EOC
- end
-
- def csv_integer_writer(name, disp_name=name)
- module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- def #{name}=(new_value)
- @#{name} = Utils::CSV.parse(new_value) {|v| Integer(v)}
- end
- EOC
- end
-
- def def_children_accessor(accessor_name, plural_name)
- module_eval(<<-EOC, *get_file_and_line_from_caller(2))
- def #{plural_name}
- @#{accessor_name}
- end
-
- def #{accessor_name}(*args)
- if args.empty?
- @#{accessor_name}.first
- else
- @#{accessor_name}[*args]
- end
- end
-
- def #{accessor_name}=(*args)
- receiver = self.class.name
- warn("Don't use `\#{receiver}\##{accessor_name} = XXX'/" \
- "`\#{receiver}\#set_#{accessor_name}(XXX)'. " \
- "Those APIs are not sense of Ruby. " \
- "Use `\#{receiver}\##{plural_name} << XXX' instead of them.", uplevel: 1)
- if args.size == 1
- @#{accessor_name}.push(args[0])
- else
- @#{accessor_name}.__send__("[]=", *args)
- end
- end
- alias_method(:set_#{accessor_name}, :#{accessor_name}=)
-EOC
- end
- end
-
- module SetupMaker
- def setup_maker(maker)
- target = maker_target(maker)
- unless target.nil?
- setup_maker_attributes(target)
- setup_maker_element(target)
- setup_maker_elements(target)
- end
- end
-
- private
- def maker_target(maker)
- nil
- end
-
- def setup_maker_attributes(target)
- end
-
- def setup_maker_element(target)
- self.class.need_initialize_variables.each do |var|
- value = __send__(var)
- next if value.nil?
- if value.respond_to?("setup_maker") and
- !not_need_to_call_setup_maker_variables.include?(var)
- value.setup_maker(target)
- else
- setter = "#{var}="
- if target.respond_to?(setter)
- target.__send__(setter, value)
- end
- end
- end
- end
-
- def not_need_to_call_setup_maker_variables
- []
- end
-
- def setup_maker_elements(parent)
- self.class.have_children_elements.each do |name, plural_name|
- if parent.respond_to?(plural_name)
- target = parent.__send__(plural_name)
- __send__(plural_name).each do |elem|
- elem.setup_maker(target)
- end
- end
- end
- end
- end
-
- class Element
- extend BaseModel
- include Utils
- extend Utils::InheritedReader
- include SetupMaker
-
- INDENT = " "
-
- MUST_CALL_VALIDATORS = {}
- MODELS = []
- GET_ATTRIBUTES = []
- HAVE_CHILDREN_ELEMENTS = []
- TO_ELEMENT_METHODS = []
- NEED_INITIALIZE_VARIABLES = []
- PLURAL_FORMS = {}
-
- class << self
- def must_call_validators
- inherited_hash_reader("MUST_CALL_VALIDATORS")
- end
- def models
- inherited_array_reader("MODELS")
- end
- def get_attributes
- inherited_array_reader("GET_ATTRIBUTES")
- end
- def have_children_elements
- inherited_array_reader("HAVE_CHILDREN_ELEMENTS")
- end
- def to_element_methods
- inherited_array_reader("TO_ELEMENT_METHODS")
- end
- def need_initialize_variables
- inherited_array_reader("NEED_INITIALIZE_VARIABLES")
- end
- def plural_forms
- inherited_hash_reader("PLURAL_FORMS")
- end
-
- def inherited_base
- ::RSS::Element
- end
-
- def inherited(klass)
- klass.const_set(:MUST_CALL_VALIDATORS, {})
- klass.const_set(:MODELS, [])
- klass.const_set(:GET_ATTRIBUTES, [])
- klass.const_set(:HAVE_CHILDREN_ELEMENTS, [])
- klass.const_set(:TO_ELEMENT_METHODS, [])
- klass.const_set(:NEED_INITIALIZE_VARIABLES, [])
- klass.const_set(:PLURAL_FORMS, {})
-
- tag_name = klass.name.split(/::/).last
- tag_name[0, 1] = tag_name[0, 1].downcase
- klass.instance_variable_set(:@tag_name, tag_name)
- klass.instance_variable_set(:@have_content, false)
- end
-
- def install_must_call_validator(prefix, uri)
- self::MUST_CALL_VALIDATORS[uri] = prefix
- end
-
- def install_model(tag, uri, occurs=nil, getter=nil, plural=false)
- getter ||= tag
- if m = self::MODELS.find {|t, u, o, g, p| t == tag and u == uri}
- m[2] = occurs
- else
- self::MODELS << [tag, uri, occurs, getter, plural]
- end
- end
-
- def install_get_attribute(name, uri, required=true,
- type=nil, disp_name=nil,
- element_name=nil)
- disp_name ||= name
- element_name ||= name
- writer_type, reader_type = type
- def_corresponded_attr_writer name, writer_type, disp_name
- def_corresponded_attr_reader name, reader_type
- if type == :boolean and /^is/ =~ name
- alias_method "#{$POSTMATCH}?", name
- end
- self::GET_ATTRIBUTES << [name, uri, required, element_name]
- add_need_initialize_variable(disp_name)
- end
-
- def def_corresponded_attr_writer(name, type=nil, disp_name=nil)
- disp_name ||= name
- case type
- when :integer
- integer_writer name, disp_name
- when :positive_integer
- positive_integer_writer name, disp_name
- when :boolean
- boolean_writer name, disp_name
- when :w3cdtf, :rfc822, :rfc2822
- date_writer name, type, disp_name
- when :text_type
- text_type_writer name, disp_name
- when :content
- content_writer name, disp_name
- when :explicit_clean_other
- explicit_clean_other_writer name, disp_name
- when :yes_other
- yes_other_writer name, disp_name
- when :csv
- csv_writer name
- when :csv_integer
- csv_integer_writer name
- else
- attr_writer name
- end
- end
-
- def def_corresponded_attr_reader(name, type=nil)
- case type
- when :inherit
- inherit_convert_attr_reader name
- when :uri
- uri_convert_attr_reader name
- when :explicit_clean_other
- explicit_clean_other_attr_reader name
- when :yes_other
- yes_other_attr_reader name
- when :csv
- csv_attr_reader name
- when :csv_integer
- csv_attr_reader name, :separator => ","
- else
- convert_attr_reader name
- end
- end
-
- def content_setup(type=nil, disp_name=nil)
- writer_type, reader_type = type
- def_corresponded_attr_writer :content, writer_type, disp_name
- def_corresponded_attr_reader :content, reader_type
- @have_content = true
- end
-
- def have_content?
- @have_content
- end
-
- def add_have_children_element(variable_name, plural_name)
- self::HAVE_CHILDREN_ELEMENTS << [variable_name, plural_name]
- end
-
- def add_to_element_method(method_name)
- self::TO_ELEMENT_METHODS << method_name
- end
-
- def add_need_initialize_variable(variable_name)
- self::NEED_INITIALIZE_VARIABLES << variable_name
- end
-
- def add_plural_form(singular, plural)
- self::PLURAL_FORMS[singular] = plural
- end
-
- def required_prefix
- nil
- end
-
- def required_uri
- ""
- end
-
- def need_parent?
- false
- end
-
- def install_ns(prefix, uri)
- if self::NSPOOL.has_key?(prefix)
- raise OverlappedPrefixError.new(prefix)
- end
- self::NSPOOL[prefix] = uri
- end
-
- def tag_name
- @tag_name
- end
- end
-
- attr_accessor :parent, :do_validate
-
- def initialize(do_validate=true, attrs=nil)
- @parent = nil
- @converter = nil
- if attrs.nil? and (do_validate.is_a?(Hash) or do_validate.is_a?(Array))
- do_validate, attrs = true, do_validate
- end
- @do_validate = do_validate
- initialize_variables(attrs || {})
- end
-
- def tag_name
- self.class.tag_name
- end
-
- def full_name
- tag_name
- end
-
- def converter=(converter)
- @converter = converter
- targets = children.dup
- self.class.have_children_elements.each do |variable_name, plural_name|
- targets.concat(__send__(plural_name))
- end
- targets.each do |target|
- target.converter = converter unless target.nil?
- end
- end
-
- def convert(value)
- if @converter
- @converter.convert(value)
- else
- value
- end
- end
-
- def valid?(ignore_unknown_element=true)
- validate(ignore_unknown_element)
- true
- rescue RSS::Error
- false
- end
-
- def validate(ignore_unknown_element=true)
- do_validate = @do_validate
- @do_validate = true
- validate_attribute
- __validate(ignore_unknown_element)
- ensure
- @do_validate = do_validate
- end
-
- def validate_for_stream(tags, ignore_unknown_element=true)
- validate_attribute
- __validate(ignore_unknown_element, tags, false)
- end
-
- def to_s(need_convert=true, indent='')
- if self.class.have_content?
- return "" if !empty_content? and !content_is_set?
- rv = tag(indent) do |next_indent|
- if empty_content?
- ""
- else
- xmled_content
- end
- end
- else
- rv = tag(indent) do |next_indent|
- self.class.to_element_methods.collect do |method_name|
- __send__(method_name, false, next_indent)
- end
- end
- end
- rv = convert(rv) if need_convert
- rv
- end
-
- def have_xml_content?
- false
- end
-
- def need_base64_encode?
- false
- end
-
- def set_next_element(tag_name, next_element)
- klass = next_element.class
- prefix = ""
- prefix << "#{klass.required_prefix}_" if klass.required_prefix
- key = "#{prefix}#{tag_name.gsub(/-/, '_')}"
- if self.class.plural_forms.has_key?(key)
- ary = __send__("#{self.class.plural_forms[key]}")
- ary << next_element
- else
- __send__("#{key}=", next_element)
- end
- end
-
- protected
- def have_required_elements?
- self.class::MODELS.all? do |tag, uri, occurs, getter|
- if occurs.nil? or occurs == "+"
- child = __send__(getter)
- if child.is_a?(Array)
- children = child
- children.any? {|c| c.have_required_elements?}
- else
- not child.nil?
- end
- else
- true
- end
- end
- end
-
- private
- def initialize_variables(attrs)
- normalized_attrs = {}
- attrs.each do |key, value|
- normalized_attrs[key.to_s] = value
- end
- self.class.need_initialize_variables.each do |variable_name|
- value = normalized_attrs[variable_name.to_s]
- if value
- __send__("#{variable_name}=", value)
- else
- instance_variable_set("@#{variable_name}", nil)
- end
- end
- initialize_have_children_elements
- @content = normalized_attrs["content"] if self.class.have_content?
- end
-
- def initialize_have_children_elements
- self.class.have_children_elements.each do |variable_name, plural_name|
- instance_variable_set("@#{variable_name}", [])
- end
- end
-
- def tag(indent, additional_attrs={}, &block)
- next_indent = indent + INDENT
-
- attrs = collect_attrs
- return "" if attrs.nil?
-
- return "" unless have_required_elements?
-
- attrs.update(additional_attrs)
- start_tag = make_start_tag(indent, next_indent, attrs.dup)
-
- if block
- content = block.call(next_indent)
- else
- content = []
- end
-
- if content.is_a?(String)
- content = [content]
- start_tag << ">"
- end_tag = "</#{full_name}>"
- else
- content = content.reject{|x| x.empty?}
- if content.empty?
- return "" if attrs.empty?
- end_tag = "/>"
- else
- start_tag << ">\n"
- end_tag = "\n#{indent}</#{full_name}>"
- end
- end
-
- start_tag + content.join("\n") + end_tag
- end
-
- def make_start_tag(indent, next_indent, attrs)
- start_tag = ["#{indent}<#{full_name}"]
- unless attrs.empty?
- start_tag << attrs.collect do |key, value|
- %Q[#{h key}="#{h value}"]
- end.join("\n#{next_indent}")
- end
- start_tag.join(" ")
- end
-
- def collect_attrs
- attrs = {}
- _attrs.each do |name, required, alias_name|
- value = __send__(alias_name || name)
- return nil if required and value.nil?
- next if value.nil?
- return nil if attrs.has_key?(name)
- attrs[name] = value
- end
- attrs
- end
-
- def tag_name_with_prefix(prefix)
- "#{prefix}:#{tag_name}"
- end
-
- # For backward compatibility
- def calc_indent
- ''
- end
-
- def children
- rv = []
- self.class.models.each do |name, uri, occurs, getter|
- value = __send__(getter)
- next if value.nil?
- value = [value] unless value.is_a?(Array)
- value.each do |v|
- rv << v if v.is_a?(Element)
- end
- end
- rv
- end
-
- def _tags
- rv = []
- self.class.models.each do |name, uri, occurs, getter, plural|
- value = __send__(getter)
- next if value.nil?
- if plural and value.is_a?(Array)
- rv.concat([[uri, name]] * value.size)
- else
- rv << [uri, name]
- end
- end
- rv
- end
-
- def _attrs
- self.class.get_attributes.collect do |name, uri, required, element_name|
- [element_name, required, name]
- end
- end
-
- def __validate(ignore_unknown_element, tags=_tags, recursive=true)
- if recursive
- children.compact.each do |child|
- child.validate
- end
- end
- must_call_validators = self.class.must_call_validators
- tags = tag_filter(tags.dup)
- p tags if DEBUG
- must_call_validators.each do |uri, prefix|
- _validate(ignore_unknown_element, tags[uri], uri)
- meth = "#{prefix}_validate"
- if !prefix.empty? and respond_to?(meth, true)
- __send__(meth, ignore_unknown_element, tags[uri], uri)
- end
- end
- end
-
- def validate_attribute
- _attrs.each do |a_name, required, alias_name|
- value = instance_variable_get("@#{alias_name || a_name}")
- if required and value.nil?
- raise MissingAttributeError.new(tag_name, a_name)
- end
- __send__("#{alias_name || a_name}=", value)
- end
- end
-
- def _validate(ignore_unknown_element, tags, uri, models=self.class.models)
- count = 1
- do_redo = false
- not_shift = false
- tag = nil
- models = models.find_all {|model| model[1] == uri}
- element_names = models.collect {|model| model[0]}
- if tags
- tags_size = tags.size
- tags = tags.sort_by {|x| element_names.index(x) || tags_size}
- end
-
- models.each_with_index do |model, i|
- name, _, occurs, = model
-
- if DEBUG
- p "before"
- p tags
- p model
- end
-
- if not_shift
- not_shift = false
- elsif tags
- tag = tags.shift
- end
-
- if DEBUG
- p "mid"
- p count
- end
-
- case occurs
- when '?'
- if count > 2
- raise TooMuchTagError.new(name, tag_name)
- else
- if name == tag
- do_redo = true
- else
- not_shift = true
- end
- end
- when '*'
- if name == tag
- do_redo = true
- else
- not_shift = true
- end
- when '+'
- if name == tag
- do_redo = true
- else
- if count > 1
- not_shift = true
- else
- raise MissingTagError.new(name, tag_name)
- end
- end
- else
- if name == tag
- if models[i+1] and models[i+1][0] != name and
- tags and tags.first == name
- raise TooMuchTagError.new(name, tag_name)
- end
- else
- raise MissingTagError.new(name, tag_name)
- end
- end
-
- if DEBUG
- p "after"
- p not_shift
- p do_redo
- p tag
- end
-
- if do_redo
- do_redo = false
- count += 1
- redo
- else
- count = 1
- end
-
- end
-
- if !ignore_unknown_element and !tags.nil? and !tags.empty?
- raise NotExpectedTagError.new(tags.first, uri, tag_name)
- end
-
- end
-
- def tag_filter(tags)
- rv = {}
- tags.each do |tag|
- rv[tag[0]] = [] unless rv.has_key?(tag[0])
- rv[tag[0]].push(tag[1])
- end
- rv
- end
-
- def empty_content?
- false
- end
-
- def content_is_set?
- if have_xml_content?
- __send__(self.class.xml_getter)
- else
- content
- end
- end
-
- def xmled_content
- if have_xml_content?
- __send__(self.class.xml_getter).to_s
- else
- _content = content
- _content = [_content].pack("m0") if need_base64_encode?
- h(_content)
- end
- end
- end
-
- module RootElementMixin
-
- include XMLStyleSheetMixin
-
- attr_reader :output_encoding
- attr_reader :feed_type, :feed_subtype, :feed_version
- attr_accessor :version, :encoding, :standalone
- def initialize(feed_version, version=nil, encoding=nil, standalone=nil)
- super()
- @feed_type = nil
- @feed_subtype = nil
- @feed_version = feed_version
- @version = version || '1.0'
- @encoding = encoding
- @standalone = standalone
- @output_encoding = nil
- end
-
- def feed_info
- [@feed_type, @feed_version, @feed_subtype]
- end
-
- def output_encoding=(enc)
- @output_encoding = enc
- self.converter = Converter.new(@output_encoding, @encoding)
- end
-
- def setup_maker(maker)
- maker.version = version
- maker.encoding = encoding
- maker.standalone = standalone
-
- xml_stylesheets.each do |xss|
- xss.setup_maker(maker)
- end
-
- super
- end
-
- def to_feed(type, &block)
- Maker.make(type) do |maker|
- setup_maker(maker)
- block.call(maker) if block
- end
- end
-
- def to_rss(type, &block)
- to_feed("rss#{type}", &block)
- end
-
- def to_atom(type, &block)
- to_feed("atom:#{type}", &block)
- end
-
- def to_xml(type=nil, &block)
- if type.nil? or same_feed_type?(type)
- to_s
- else
- to_feed(type, &block).to_s
- end
- end
-
- private
- def same_feed_type?(type)
- if /^(atom|rss)?(\d+\.\d+)?(?::(.+))?$/i =~ type
- feed_type = ($1 || @feed_type).downcase
- feed_version = $2 || @feed_version
- feed_subtype = $3 || @feed_subtype
- [feed_type, feed_version, feed_subtype] == feed_info
- else
- false
- end
- end
-
- def tag(indent, attrs={}, &block)
- rv = super(indent, ns_declarations.merge(attrs), &block)
- return rv if rv.empty?
- "#{xmldecl}#{xml_stylesheet_pi}#{rv}"
- end
-
- def xmldecl
- rv = %Q[<?xml version="#{@version}"]
- if @output_encoding or @encoding
- rv << %Q[ encoding="#{@output_encoding or @encoding}"]
- end
- rv << %Q[ standalone="yes"] if @standalone
- rv << "?>\n"
- rv
- end
-
- def ns_declarations
- decls = {}
- self.class::NSPOOL.collect do |prefix, uri|
- prefix = ":#{prefix}" unless prefix.empty?
- decls["xmlns#{prefix}"] = uri
- end
- decls
- end
-
- def maker_target(target)
- target
- end
- end
-end
diff --git a/lib/rss/slash.rb b/lib/rss/slash.rb
deleted file mode 100644
index 0055fc9f88..0000000000
--- a/lib/rss/slash.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: false
-require 'rss/1.0'
-
-module RSS
- # The prefix for the Slash XML namespace.
- SLASH_PREFIX = 'slash'
- # The URI of the Slash specification.
- SLASH_URI = "http://purl.org/rss/1.0/modules/slash/"
-
- RDF.install_ns(SLASH_PREFIX, SLASH_URI)
-
- module SlashModel
- extend BaseModel
-
- ELEMENT_INFOS = \
- [
- ["section"],
- ["department"],
- ["comments", :positive_integer],
- ["hit_parade", :csv_integer],
- ]
-
- class << self
- def append_features(klass)
- super
-
- return if klass.instance_of?(Module)
- klass.install_must_call_validator(SLASH_PREFIX, SLASH_URI)
- ELEMENT_INFOS.each do |name, type, *additional_infos|
- full_name = "#{SLASH_PREFIX}_#{name}"
- klass.install_text_element(full_name, SLASH_URI, "?",
- full_name, type, name)
- end
-
- klass.module_eval do
- alias_method(:slash_hit_parades, :slash_hit_parade)
- undef_method(:slash_hit_parade)
- alias_method(:slash_hit_parade, :slash_hit_parade_content)
- end
- end
- end
- end
-
- class RDF
- class Item; include SlashModel; end
- end
-
- SlashModel::ELEMENT_INFOS.each do |name, type|
- accessor_base = "#{SLASH_PREFIX}_#{name}"
- BaseListener.install_get_text_element(SLASH_URI, name, accessor_base)
- end
-end
diff --git a/lib/rss/syndication.rb b/lib/rss/syndication.rb
deleted file mode 100644
index 8f9620f9f3..0000000000
--- a/lib/rss/syndication.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: false
-require "rss/1.0"
-
-module RSS
- # The prefix for the Syndication XML namespace.
- SY_PREFIX = 'sy'
- # The URI of the Syndication specification.
- SY_URI = "http://purl.org/rss/1.0/modules/syndication/"
-
- RDF.install_ns(SY_PREFIX, SY_URI)
-
- module SyndicationModel
-
- extend BaseModel
-
- ELEMENTS = []
-
- def self.append_features(klass)
- super
-
- klass.install_must_call_validator(SY_PREFIX, SY_URI)
- klass.module_eval do
- [
- ["updatePeriod"],
- ["updateFrequency", :positive_integer]
- ].each do |name, type|
- install_text_element(name, SY_URI, "?",
- "#{SY_PREFIX}_#{name}", type,
- "#{SY_PREFIX}:#{name}")
- end
-
- %w(updateBase).each do |name|
- install_date_element(name, SY_URI, "?",
- "#{SY_PREFIX}_#{name}", 'w3cdtf',
- "#{SY_PREFIX}:#{name}")
- end
- end
-
- klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
- alias_method(:_sy_updatePeriod=, :sy_updatePeriod=)
- def sy_updatePeriod=(new_value)
- new_value = new_value.strip
- validate_sy_updatePeriod(new_value) if @do_validate
- self._sy_updatePeriod = new_value
- end
- EOC
- end
-
- private
- SY_UPDATEPERIOD_AVAILABLE_VALUES = %w(hourly daily weekly monthly yearly)
- def validate_sy_updatePeriod(value) # :nodoc:
- unless SY_UPDATEPERIOD_AVAILABLE_VALUES.include?(value)
- raise NotAvailableValueError.new("updatePeriod", value)
- end
- end
- end
-
- class RDF
- class Channel; include SyndicationModel; end
- end
-
- prefix_size = SY_PREFIX.size + 1
- SyndicationModel::ELEMENTS.uniq!
- SyndicationModel::ELEMENTS.each do |full_name|
- name = full_name[prefix_size..-1]
- BaseListener.install_get_text_element(SY_URI, name, full_name)
- end
-
-end
diff --git a/lib/rss/taxonomy.rb b/lib/rss/taxonomy.rb
deleted file mode 100644
index 50688ee6c1..0000000000
--- a/lib/rss/taxonomy.rb
+++ /dev/null
@@ -1,148 +0,0 @@
-# frozen_string_literal: false
-require "rss/1.0"
-require_relative "dublincore"
-
-module RSS
- # The prefix for the Taxonomy XML namespace.
- TAXO_PREFIX = "taxo"
- # The URI for the specification of the Taxonomy XML namespace.
- TAXO_URI = "http://purl.org/rss/1.0/modules/taxonomy/"
-
- RDF.install_ns(TAXO_PREFIX, TAXO_URI)
-
- # The listing of all the taxonomy elements, with the appropriate namespace.
- TAXO_ELEMENTS = []
-
- %w(link).each do |name|
- full_name = "#{TAXO_PREFIX}_#{name}"
- BaseListener.install_get_text_element(TAXO_URI, name, full_name)
- TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}"
- end
-
- %w(topic topics).each do |name|
- class_name = Utils.to_class_name(name)
- BaseListener.install_class_name(TAXO_URI, name, "Taxonomy#{class_name}")
- TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}"
- end
-
- module TaxonomyTopicsModel
- extend BaseModel
-
- def self.append_features(klass)
- super
-
- klass.install_must_call_validator(TAXO_PREFIX, TAXO_URI)
- %w(topics).each do |name|
- klass.install_have_child_element(name, TAXO_URI, "?",
- "#{TAXO_PREFIX}_#{name}")
- end
- end
-
- class TaxonomyTopics < Element
- include RSS10
-
- Bag = ::RSS::RDF::Bag
-
- class << self
- def required_prefix
- TAXO_PREFIX
- end
-
- def required_uri
- TAXO_URI
- end
- end
-
- @tag_name = "topics"
-
- install_have_child_element("Bag", RDF::URI, nil)
- install_must_call_validator('rdf', RDF::URI)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.Bag = args[0]
- end
- self.Bag ||= Bag.new
- end
-
- def full_name
- tag_name_with_prefix(TAXO_PREFIX)
- end
-
- def maker_target(target)
- target.taxo_topics
- end
-
- def resources
- if @Bag
- @Bag.lis.collect do |li|
- li.resource
- end
- else
- []
- end
- end
- end
- end
-
- module TaxonomyTopicModel
- extend BaseModel
-
- def self.append_features(klass)
- super
- var_name = "#{TAXO_PREFIX}_topic"
- klass.install_have_children_element("topic", TAXO_URI, "*", var_name)
- end
-
- class TaxonomyTopic < Element
- include RSS10
-
- include DublinCoreModel
- include TaxonomyTopicsModel
-
- class << self
- def required_prefix
- TAXO_PREFIX
- end
-
- def required_uri
- TAXO_URI
- end
- end
-
- @tag_name = "topic"
-
- install_get_attribute("about", ::RSS::RDF::URI, true, nil, nil,
- "#{RDF::PREFIX}:about")
- install_text_element("link", TAXO_URI, "?", "#{TAXO_PREFIX}_link")
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.about = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(TAXO_PREFIX)
- end
-
- def maker_target(target)
- target.new_taxo_topic
- end
- end
- end
-
- class RDF
- include TaxonomyTopicModel
- class Channel
- include TaxonomyTopicsModel
- end
- class Item; include TaxonomyTopicsModel; end
- end
-end
diff --git a/lib/rss/trackback.rb b/lib/rss/trackback.rb
deleted file mode 100644
index 1a3c3849b5..0000000000
--- a/lib/rss/trackback.rb
+++ /dev/null
@@ -1,291 +0,0 @@
-# frozen_string_literal: false
-# This file contains the implementation of trackbacks. It is entirely internal
-# and not useful to outside developers.
-require 'rss/1.0'
-require 'rss/2.0'
-
-module RSS # :nodoc: all
-
- TRACKBACK_PREFIX = 'trackback'
- TRACKBACK_URI = 'http://madskills.com/public/xml/rss/module/trackback/'
-
- RDF.install_ns(TRACKBACK_PREFIX, TRACKBACK_URI)
- Rss.install_ns(TRACKBACK_PREFIX, TRACKBACK_URI)
-
- module TrackBackUtils
- private
- def trackback_validate(ignore_unknown_element, tags, uri)
- return if tags.nil?
- if tags.find {|tag| tag == "about"} and
- !tags.find {|tag| tag == "ping"}
- raise MissingTagError.new("#{TRACKBACK_PREFIX}:ping", tag_name)
- end
- end
- end
-
- module BaseTrackBackModel
-
- ELEMENTS = %w(ping about)
-
- def append_features(klass)
- super
-
- unless klass.class == Module
- klass.module_eval {include TrackBackUtils}
-
- klass.install_must_call_validator(TRACKBACK_PREFIX, TRACKBACK_URI)
- %w(ping).each do |name|
- var_name = "#{TRACKBACK_PREFIX}_#{name}"
- klass_name = "TrackBack#{Utils.to_class_name(name)}"
- klass.install_have_child_element(name, TRACKBACK_URI, "?", var_name)
- klass.module_eval(<<-EOC, __FILE__, __LINE__)
- remove_method :#{var_name}
- def #{var_name}
- @#{var_name} and @#{var_name}.value
- end
-
- remove_method :#{var_name}=
- def #{var_name}=(value)
- @#{var_name} = Utils.new_with_value_if_need(#{klass_name}, value)
- end
- EOC
- end
-
- [%w(about s)].each do |name, postfix|
- var_name = "#{TRACKBACK_PREFIX}_#{name}"
- klass_name = "TrackBack#{Utils.to_class_name(name)}"
- klass.install_have_children_element(name, TRACKBACK_URI, "*",
- var_name)
- klass.module_eval(<<-EOC, __FILE__, __LINE__)
- remove_method :#{var_name}
- def #{var_name}(*args)
- if args.empty?
- @#{var_name}.first and @#{var_name}.first.value
- else
- ret = @#{var_name}.__send__("[]", *args)
- if ret.is_a?(Array)
- ret.collect {|x| x.value}
- else
- ret.value
- end
- end
- end
-
- remove_method :#{var_name}=
- remove_method :set_#{var_name}
- def #{var_name}=(*args)
- if args.size == 1
- item = Utils.new_with_value_if_need(#{klass_name}, args[0])
- @#{var_name}.push(item)
- else
- new_val = args.last
- if new_val.is_a?(Array)
- new_val = new_value.collect do |val|
- Utils.new_with_value_if_need(#{klass_name}, val)
- end
- else
- new_val = Utils.new_with_value_if_need(#{klass_name}, new_val)
- end
- @#{var_name}.__send__("[]=", *(args[0..-2] + [new_val]))
- end
- end
- alias set_#{var_name} #{var_name}=
- EOC
- end
- end
- end
- end
-
- module TrackBackModel10
- extend BaseModel
- extend BaseTrackBackModel
-
- class TrackBackPing < Element
- include RSS10
-
- class << self
-
- def required_prefix
- TRACKBACK_PREFIX
- end
-
- def required_uri
- TRACKBACK_URI
- end
-
- end
-
- @tag_name = "ping"
-
- [
- ["resource", ::RSS::RDF::URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{::RSS::RDF::PREFIX}:#{name}")
- end
-
- alias_method(:value, :resource)
- alias_method(:value=, :resource=)
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.resource = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(TRACKBACK_PREFIX)
- end
- end
-
- class TrackBackAbout < Element
- include RSS10
-
- class << self
-
- def required_prefix
- TRACKBACK_PREFIX
- end
-
- def required_uri
- TRACKBACK_URI
- end
-
- end
-
- @tag_name = "about"
-
- [
- ["resource", ::RSS::RDF::URI, true]
- ].each do |name, uri, required|
- install_get_attribute(name, uri, required, nil, nil,
- "#{::RSS::RDF::PREFIX}:#{name}")
- end
-
- alias_method(:value, :resource)
- alias_method(:value=, :resource=)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.resource = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(TRACKBACK_PREFIX)
- end
-
- private
- def maker_target(abouts)
- abouts.new_about
- end
-
- def setup_maker_attributes(about)
- about.resource = self.resource
- end
-
- end
- end
-
- module TrackBackModel20
- extend BaseModel
- extend BaseTrackBackModel
-
- class TrackBackPing < Element
- include RSS09
-
- @tag_name = "ping"
-
- content_setup
-
- class << self
-
- def required_prefix
- TRACKBACK_PREFIX
- end
-
- def required_uri
- TRACKBACK_URI
- end
-
- end
-
- alias_method(:value, :content)
- alias_method(:value=, :content=)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.content = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(TRACKBACK_PREFIX)
- end
-
- end
-
- class TrackBackAbout < Element
- include RSS09
-
- @tag_name = "about"
-
- content_setup
-
- class << self
-
- def required_prefix
- TRACKBACK_PREFIX
- end
-
- def required_uri
- TRACKBACK_URI
- end
-
- end
-
- alias_method(:value, :content)
- alias_method(:value=, :content=)
-
- def initialize(*args)
- if Utils.element_initialize_arguments?(args)
- super
- else
- super()
- self.content = args[0]
- end
- end
-
- def full_name
- tag_name_with_prefix(TRACKBACK_PREFIX)
- end
-
- end
- end
-
- class RDF
- class Item; include TrackBackModel10; end
- end
-
- class Rss
- class Channel
- class Item; include TrackBackModel20; end
- end
- end
-
- BaseTrackBackModel::ELEMENTS.each do |name|
- class_name = Utils.to_class_name(name)
- BaseListener.install_class_name(TRACKBACK_URI, name,
- "TrackBack#{class_name}")
- end
-
- BaseTrackBackModel::ELEMENTS.collect! {|name| "#{TRACKBACK_PREFIX}_#{name}"}
-end
diff --git a/lib/rss/utils.rb b/lib/rss/utils.rb
deleted file mode 100644
index 9203df9a9b..0000000000
--- a/lib/rss/utils.rb
+++ /dev/null
@@ -1,200 +0,0 @@
-# frozen_string_literal: false
-module RSS
-
- ##
- # RSS::Utils is a module that holds various utility functions that are used
- # across many parts of the rest of the RSS library. Like most modules named
- # some variant of 'util', its methods are probably not particularly useful
- # to those who aren't developing the library itself.
- module Utils
- module_function
-
- # Given a +name+ in a name_with_underscores or a name-with-dashes format,
- # returns the CamelCase version of +name+.
- #
- # If the +name+ is already CamelCased, nothing happens.
- #
- # Examples:
- #
- # require 'rss/utils'
- #
- # RSS::Utils.to_class_name("sample_name")
- # # => "SampleName"
- # RSS::Utils.to_class_name("with-dashes")
- # # => "WithDashes"
- # RSS::Utils.to_class_name("CamelCase")
- # # => "CamelCase"
- def to_class_name(name)
- name.split(/[_\-]/).collect do |part|
- "#{part[0, 1].upcase}#{part[1..-1]}"
- end.join("")
- end
-
- # Returns an array of two elements: the filename where the calling method
- # is located, and the line number where it is defined.
- #
- # Takes an optional argument +i+, which specifies how many callers up the
- # stack to look.
- #
- # Examples:
- #
- # require 'rss/utils'
- #
- # def foo
- # p RSS::Utils.get_file_and_line_from_caller
- # p RSS::Utils.get_file_and_line_from_caller(1)
- # end
- #
- # def bar
- # foo
- # end
- #
- # def baz
- # bar
- # end
- #
- # baz
- # # => ["test.rb", 5]
- # # => ["test.rb", 9]
- #
- # If +i+ is not given, or is the default value of 0, it attempts to figure
- # out the correct value. This is useful when in combination with
- # instance_eval. For example:
- #
- # require 'rss/utils'
- #
- # def foo
- # p RSS::Utils.get_file_and_line_from_caller(1)
- # end
- #
- # def bar
- # foo
- # end
- #
- # instance_eval <<-RUBY, *RSS::Utils.get_file_and_line_from_caller
- # def baz
- # bar
- # end
- # RUBY
- #
- # baz
- #
- # # => ["test.rb", 8]
- def get_file_and_line_from_caller(i=0)
- file, line, = caller[i].split(':')
- line = line.to_i
- line += 1 if i.zero?
- [file, line]
- end
-
- # Takes a string +s+ with some HTML in it, and escapes '&', '"', '<' and '>', by
- # replacing them with the appropriate entities.
- #
- # This method is also aliased to h, for convenience.
- #
- # Examples:
- #
- # require 'rss/utils'
- #
- # RSS::Utils.html_escape("Dungeons & Dragons")
- # # => "Dungeons &amp; Dragons"
- # RSS::Utils.h(">_>")
- # # => "&gt;_&gt;"
- def html_escape(s)
- s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;")
- end
- alias h html_escape
-
- # If +value+ is an instance of class +klass+, return it, else
- # create a new instance of +klass+ with value +value+.
- def new_with_value_if_need(klass, value)
- if value.is_a?(klass)
- value
- else
- klass.new(value)
- end
- end
-
- # This method is used inside of several different objects to determine
- # if special behavior is needed in the constructor.
- #
- # Special behavior is needed if the array passed in as +args+ has
- # +true+ or +false+ as its value, and if the second element of +args+
- # is a hash.
- def element_initialize_arguments?(args)
- [true, false].include?(args[0]) and args[1].is_a?(Hash)
- end
-
- module ExplicitCleanOther
- module_function
- def parse(value)
- if [true, false, nil].include?(value)
- value
- else
- case value.to_s
- when /\Aexplicit|yes|true\z/i
- true
- when /\Aclean|no|false\z/i
- false
- else
- nil
- end
- end
- end
- end
-
- module YesOther
- module_function
- def parse(value)
- if [true, false].include?(value)
- value
- else
- /\Ayes\z/i.match(value.to_s) ? true : false
- end
- end
- end
-
- module CSV
- module_function
- def parse(value, &block)
- if value.is_a?(String)
- value = value.strip.split(/\s*,\s*/)
- value = value.collect(&block) if block_given?
- value
- else
- value
- end
- end
- end
-
- module InheritedReader
- def inherited_reader(constant_name)
- base_class = inherited_base
- result = base_class.const_get(constant_name)
- found_base_class = false
- ancestors.reverse_each do |klass|
- if found_base_class
- if klass.const_defined?(constant_name)
- result = yield(result, klass.const_get(constant_name))
- end
- else
- found_base_class = klass == base_class
- end
- end
- result
- end
-
- def inherited_array_reader(constant_name)
- inherited_reader(constant_name) do |result, current|
- current + result
- end
- end
-
- def inherited_hash_reader(constant_name)
- inherited_reader(constant_name) do |result, current|
- result.merge(current)
- end
- end
- end
- end
-end
diff --git a/lib/rss/version.rb b/lib/rss/version.rb
deleted file mode 100644
index f0a8894e79..0000000000
--- a/lib/rss/version.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-module RSS
- # The current version of RSS
- VERSION = "0.2.8"
-end
diff --git a/lib/rss/xml-stylesheet.rb b/lib/rss/xml-stylesheet.rb
deleted file mode 100644
index 175c95fbcd..0000000000
--- a/lib/rss/xml-stylesheet.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# frozen_string_literal: false
-require_relative "utils"
-
-module RSS
-
- module XMLStyleSheetMixin
- attr_accessor :xml_stylesheets
- def initialize(*args)
- super
- @xml_stylesheets = []
- end
-
- private
- def xml_stylesheet_pi
- xsss = @xml_stylesheets.collect do |xss|
- pi = xss.to_s
- pi = nil if /\A\s*\z/ =~ pi
- pi
- end.compact
- xsss.push("") unless xsss.empty?
- xsss.join("\n")
- end
- end
-
- class XMLStyleSheet
-
- include Utils
-
- ATTRIBUTES = %w(href type title media charset alternate)
-
- GUESS_TABLE = {
- "xsl" => "text/xsl",
- "css" => "text/css",
- }
-
- attr_accessor(*ATTRIBUTES)
- attr_accessor(:do_validate)
- def initialize(*attrs)
- if attrs.size == 1 and
- (attrs.first.is_a?(Hash) or attrs.first.is_a?(Array))
- attrs = attrs.first
- end
- @do_validate = true
- ATTRIBUTES.each do |attr|
- __send__("#{attr}=", nil)
- end
- vars = ATTRIBUTES.dup
- vars.unshift(:do_validate)
- attrs.each do |name, value|
- if vars.include?(name.to_s)
- __send__("#{name}=", value)
- end
- end
- end
-
- def to_s
- rv = ""
- if @href
- rv << %Q[<?xml-stylesheet]
- ATTRIBUTES.each do |name|
- if __send__(name)
- rv << %Q[ #{name}="#{h __send__(name)}"]
- end
- end
- rv << %Q[?>]
- end
- rv
- end
-
- remove_method(:href=)
- def href=(value)
- @href = value
- if @href and @type.nil?
- @type = guess_type(@href)
- end
- @href
- end
-
- remove_method(:alternate=)
- def alternate=(value)
- if value.nil? or /\A(?:yes|no)\z/ =~ value
- @alternate = value
- else
- if @do_validate
- args = ["?xml-stylesheet?", %Q[alternate="#{value}"]]
- raise NotAvailableValueError.new(*args)
- end
- end
- @alternate
- end
-
- def setup_maker(maker)
- xss = maker.xml_stylesheets.new_xml_stylesheet
- ATTRIBUTES.each do |attr|
- xss.__send__("#{attr}=", __send__(attr))
- end
- end
-
- private
- def guess_type(filename)
- /\.([^.]+)$/ =~ filename
- GUESS_TABLE[$1]
- end
-
- end
-end
diff --git a/lib/rss/xml.rb b/lib/rss/xml.rb
deleted file mode 100644
index b74630295f..0000000000
--- a/lib/rss/xml.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: false
-require_relative "utils"
-
-module RSS
- module XML
- class Element
- include Enumerable
-
- attr_reader :name, :prefix, :uri, :attributes, :children
- def initialize(name, prefix=nil, uri=nil, attributes={}, children=[])
- @name = name
- @prefix = prefix
- @uri = uri
- @attributes = attributes
- if children.is_a?(String) or !children.respond_to?(:each)
- @children = [children]
- else
- @children = children
- end
- end
-
- def [](name)
- @attributes[name]
- end
-
- def []=(name, value)
- @attributes[name] = value
- end
-
- def <<(child)
- @children << child
- end
-
- def each(&block)
- @children.each(&block)
- end
-
- def ==(other)
- other.kind_of?(self.class) and
- @name == other.name and
- @uri == other.uri and
- @attributes == other.attributes and
- @children == other.children
- end
-
- def to_s
- rv = "<#{full_name}"
- attributes.each do |key, value|
- rv << " #{Utils.html_escape(key)}=\"#{Utils.html_escape(value)}\""
- end
- if children.empty?
- rv << "/>"
- else
- rv << ">"
- children.each do |child|
- rv << child.to_s
- end
- rv << "</#{full_name}>"
- end
- rv
- end
-
- def full_name
- if @prefix
- "#{@prefix}:#{@name}"
- else
- @name
- end
- end
- end
- end
-end
diff --git a/lib/rss/xmlparser.rb b/lib/rss/xmlparser.rb
deleted file mode 100644
index cb2dd2afdd..0000000000
--- a/lib/rss/xmlparser.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# frozen_string_literal: false
-begin
- require "xml/parser"
-rescue LoadError
- require "xmlparser"
-end
-
-begin
- require "xml/encoding-ja"
-rescue LoadError
- require "xmlencoding-ja"
- if defined?(Kconv)
- module XMLEncoding_ja
- class SJISHandler
- include Kconv
- end
- end
- end
-end
-
-module XML
- class Parser
- unless defined?(Error)
- # This error is legacy, so we just set it to the new one
- Error = ::XMLParserError # :nodoc:
- end
- end
-end
-
-module RSS
-
- class REXMLLikeXMLParser < ::XML::Parser
-
- include ::XML::Encoding_ja
-
- def listener=(listener)
- @listener = listener
- end
-
- def startElement(name, attrs)
- @listener.tag_start(name, attrs)
- end
-
- def endElement(name)
- @listener.tag_end(name)
- end
-
- def character(data)
- @listener.text(data)
- end
-
- def xmlDecl(version, encoding, standalone)
- @listener.xmldecl(version, encoding, standalone == 1)
- end
-
- def processingInstruction(target, content)
- @listener.instruction(target, content)
- end
-
- end
-
- class XMLParserParser < BaseParser
-
- class << self
- def listener
- XMLParserListener
- end
- end
-
- private
- def _parse
- begin
- parser = REXMLLikeXMLParser.new
- parser.listener = @listener
- parser.parse(@rss)
- rescue ::XML::Parser::Error => e
- raise NotWellFormedError.new(parser.line){e.message}
- end
- end
-
- end
-
- class XMLParserListener < BaseListener
-
- include ListenerMixin
-
- def xmldecl(version, encoding, standalone)
- super
- # Encoding is converted to UTF-8 when XMLParser parses XML.
- @encoding = 'UTF-8'
- end
-
- end
-
-end
diff --git a/lib/rss/xmlscanner.rb b/lib/rss/xmlscanner.rb
deleted file mode 100644
index 6e3b13d2f5..0000000000
--- a/lib/rss/xmlscanner.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: false
-require 'xmlscan/scanner'
-require 'stringio'
-
-module RSS
-
- class XMLScanParser < BaseParser
-
- class << self
- def listener
- XMLScanListener
- end
- end
-
- private
- def _parse
- begin
- if @rss.is_a?(String)
- input = StringIO.new(@rss)
- else
- input = @rss
- end
- scanner = XMLScan::XMLScanner.new(@listener)
- scanner.parse(input)
- rescue XMLScan::Error => e
- lineno = e.lineno || scanner.lineno || input.lineno
- raise NotWellFormedError.new(lineno){e.message}
- end
- end
-
- end
-
- class XMLScanListener < BaseListener
-
- include XMLScan::Visitor
- include ListenerMixin
-
- ENTITIES = {
- 'lt' => '<',
- 'gt' => '>',
- 'amp' => '&',
- 'quot' => '"',
- 'apos' => '\''
- }
-
- def on_xmldecl_version(str)
- @version = str
- end
-
- def on_xmldecl_encoding(str)
- @encoding = str
- end
-
- def on_xmldecl_standalone(str)
- @standalone = str
- end
-
- def on_xmldecl_end
- xmldecl(@version, @encoding, @standalone == "yes")
- end
-
- alias_method(:on_pi, :instruction)
- alias_method(:on_chardata, :text)
- alias_method(:on_cdata, :text)
-
- def on_etag(name)
- tag_end(name)
- end
-
- def on_entityref(ref)
- text(entity(ref))
- end
-
- def on_charref(code)
- text([code].pack('U'))
- end
-
- alias_method(:on_charref_hex, :on_charref)
-
- def on_stag(name)
- @attrs = {}
- end
-
- def on_attribute(name)
- @attrs[name] = @current_attr = ''
- end
-
- def on_attr_value(str)
- @current_attr << str
- end
-
- def on_attr_entityref(ref)
- @current_attr << entity(ref)
- end
-
- def on_attr_charref(code)
- @current_attr << [code].pack('U')
- end
-
- alias_method(:on_attr_charref_hex, :on_attr_charref)
-
- def on_stag_end(name)
- tag_start(name, @attrs)
- end
-
- def on_stag_end_empty(name)
- tag_start(name, @attrs)
- tag_end(name)
- end
-
- private
- def entity(ref)
- ent = ENTITIES[ref]
- if ent
- ent
- else
- wellformed_error("undefined entity: #{ref}")
- end
- end
- end
-
-end
diff --git a/lib/ruby2_keywords.gemspec b/lib/ruby2_keywords.gemspec
new file mode 100644
index 0000000000..e2cd397532
--- /dev/null
+++ b/lib/ruby2_keywords.gemspec
@@ -0,0 +1,23 @@
+_VERSION = "0.0.5"
+abort "Version must not reach 1" if _VERSION[/\d+/].to_i >= 1
+
+Gem::Specification.new do |s|
+ s.name = "ruby2_keywords"
+ s.version = _VERSION
+ s.summary = "Shim library for Module#ruby2_keywords"
+ s.homepage = "https://github.com/ruby/ruby2_keywords"
+ s.licenses = ["Ruby", "BSD-2-Clause"]
+ s.authors = ["Nobuyoshi Nakada"]
+ s.require_paths = ["lib"]
+ s.rdoc_options = ["--main", "README.md"]
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.md",
+ "ChangeLog",
+ *Dir.glob("#{__dir__}/logs/ChangeLog-*[^~]").map {|path| path[(__dir__.size+1)..-1]},
+ ]
+ s.files = [
+ "lib/ruby2_keywords.rb",
+ ]
+ s.required_ruby_version = '>= 2.0.0'
+end
diff --git a/lib/ruby_vm/mjit/c_pointer.rb b/lib/ruby_vm/mjit/c_pointer.rb
new file mode 100644
index 0000000000..a92c2140ae
--- /dev/null
+++ b/lib/ruby_vm/mjit/c_pointer.rb
@@ -0,0 +1,329 @@
+module RubyVM::MJIT # :nodoc: all
+ # Every class under this namespace is a pointer. Even if the type is
+ # immediate, it shouldn't be dereferenced until `*` is called.
+ module CPointer
+ # Note: We'd like to avoid alphabetic method names to avoid a conflict
+ # with member methods. to_i and to_s are considered an exception.
+ class Struct
+ # @param name [String]
+ # @param sizeof [Integer]
+ # @param members [Hash{ Symbol => [RubyVM::MJIT::CType::*, Integer, TrueClass] }]
+ def initialize(addr, sizeof, members)
+ @addr = addr
+ @sizeof = sizeof
+ @members = members
+ end
+
+ # Get a raw address
+ def to_i
+ @addr
+ end
+
+ # Serialized address for generated code
+ def to_s
+ "0x#{@addr.to_s(16)}"
+ end
+
+ # Pointer diff
+ def -(struct)
+ raise ArgumentError if self.class != struct.class
+ (@addr - struct.to_i) / @sizeof
+ end
+
+ # Primitive API that does no automatic dereference
+ # TODO: remove this?
+ # @param member [Symbol]
+ def [](member)
+ type, offset = @members.fetch(member)
+ type.new(@addr + offset / 8)
+ end
+
+ private
+
+ # @param member [Symbol]
+ # @param value [Object]
+ def []=(member, value)
+ type, offset = @members.fetch(member)
+ type[@addr + offset / 8] = value
+ end
+
+ # @param sizeof [Integer]
+ # @param members [Hash{ Symbol => [Integer, RubyVM::MJIT::CType::*] }]
+ def self.define(sizeof, members)
+ Class.new(self) do
+ # Return the size of this type
+ define_singleton_method(:sizeof) { sizeof }
+
+ define_method(:initialize) do |addr = nil|
+ if addr.nil? # TODO: get rid of this feature later
+ addr = Fiddle.malloc(sizeof)
+ end
+ super(addr, sizeof, members)
+ end
+
+ members.each do |member, (type, offset, to_ruby)|
+ # Intelligent API that does automatic dereference
+ define_method(member) do
+ value = self[member]
+ if value.respond_to?(:*)
+ value = value.*
+ end
+ if to_ruby
+ value = C.to_ruby(value)
+ end
+ value
+ end
+
+ define_method("#{member}=") do |value|
+ self[member] = value
+ end
+ end
+ end
+ end
+ end
+
+ # Note: We'd like to avoid alphabetic method names to avoid a conflict
+ # with member methods. to_i is considered an exception.
+ class Union
+ # @param _name [String] To be used when it starts defining a union pointer class
+ # @param sizeof [Integer]
+ # @param members [Hash{ Symbol => RubyVM::MJIT::CType::* }]
+ def initialize(addr, sizeof, members)
+ @addr = addr
+ @sizeof = sizeof
+ @members = members
+ end
+
+ # Get a raw address
+ def to_i
+ @addr
+ end
+
+ # Move addr to access this pointer like an array
+ def +(index)
+ raise ArgumentError unless index.is_a?(Integer)
+ self.class.new(@addr + index * @sizeof)
+ end
+
+ # Pointer diff
+ def -(union)
+ raise ArgumentError if self.class != union.class
+ (@addr - union.instance_variable_get(:@addr)) / @sizeof
+ end
+
+ # @param sizeof [Integer]
+ # @param members [Hash{ Symbol => RubyVM::MJIT::CType::* }]
+ def self.define(sizeof, members)
+ Class.new(self) do
+ # Return the size of this type
+ define_singleton_method(:sizeof) { sizeof }
+
+ define_method(:initialize) do |addr|
+ super(addr, sizeof, members)
+ end
+
+ members.each do |member, type|
+ # Intelligent API that does automatic dereference
+ define_method(member) do
+ value = type.new(@addr)
+ if value.respond_to?(:*)
+ value = value.*
+ end
+ value
+ end
+ end
+ end
+ end
+ end
+
+ class Immediate
+ # @param addr [Integer]
+ # @param size [Integer]
+ # @param pack [String]
+ def initialize(addr, size, pack)
+ @addr = addr
+ @size = size
+ @pack = pack
+ end
+
+ # Get a raw address
+ def to_i
+ @addr
+ end
+
+ # Move addr to addess this pointer like an array
+ def +(index)
+ Immediate.new(@addr + index * @size, @size, @pack)
+ end
+
+ # Dereference
+ def *
+ self[0]
+ end
+
+ # Array access
+ def [](index)
+ return nil if @addr == 0
+ Fiddle::Pointer.new(@addr + index * @size)[0, @size].unpack1(@pack)
+ end
+
+ # Array set
+ def []=(index, value)
+ Fiddle::Pointer.new(@addr + index * @size)[0, @size] = [value].pack(@pack)
+ end
+
+ # Serialized address for generated code. Used for embedding things like body->iseq_encoded.
+ def to_s
+ "0x#{Integer(@addr).to_s(16)}"
+ end
+
+ # @param fiddle_type [Integer] Fiddle::TYPE_*
+ def self.define(fiddle_type)
+ size = Fiddle::PackInfo::SIZE_MAP.fetch(fiddle_type)
+ pack = Fiddle::PackInfo::PACK_MAP.fetch(fiddle_type)
+
+ Class.new(self) do
+ define_method(:initialize) do |addr|
+ super(addr, size, pack)
+ end
+
+ define_singleton_method(:size) do
+ size
+ end
+
+ # Type-level []=: Used by struct fields
+ define_singleton_method(:[]=) do |addr, value|
+ Fiddle::Pointer.new(addr)[0, size] = [value].pack(pack)
+ end
+ end
+ end
+ end
+
+ # -Fiddle::TYPE_CHAR Immediate with special handling of true/false
+ class Bool < Immediate.define(-Fiddle::TYPE_CHAR)
+ # Dereference
+ def *
+ return nil if @addr == 0
+ super != 0
+ end
+
+ def self.[]=(addr, value)
+ super(addr, value ? 1 : 0)
+ end
+ end
+
+ class Pointer
+ attr_reader :type
+
+ # @param addr [Integer]
+ # @param type [Class] RubyVM::MJIT::CType::*
+ def initialize(addr, type)
+ @addr = addr
+ @type = type
+ end
+
+ # Move addr to addess this pointer like an array
+ def +(index)
+ raise ArgumentError unless index.is_a?(Integer)
+ Pointer.new(@addr + index * Fiddle::SIZEOF_VOIDP, @type)
+ end
+
+ # Dereference
+ def *
+ return nil if dest_addr == 0
+ @type.new(dest_addr)
+ end
+
+ # Array access
+ def [](index)
+ (self + index).*
+ end
+
+ # Array set
+ # @param index [Integer]
+ # @param value [Integer, RubyVM::MJIT::CPointer::Struct] an address itself or an object that return an address with to_i
+ def []=(index, value)
+ Fiddle::Pointer.new(@addr + index * Fiddle::SIZEOF_VOIDP)[0, Fiddle::SIZEOF_VOIDP] =
+ [value.to_i].pack(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
+ end
+
+ private
+
+ def dest_addr
+ Fiddle::Pointer.new(@addr)[0, Fiddle::SIZEOF_VOIDP].unpack1(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
+ end
+
+ def self.define(block)
+ Class.new(self) do
+ define_method(:initialize) do |addr|
+ super(addr, block.call)
+ end
+
+ # Type-level []=: Used by struct fields
+ # @param addr [Integer]
+ # @param value [Integer, RubyVM::MJIT::CPointer::Struct] an address itself, or an object that return an address with to_i
+ define_singleton_method(:[]=) do |addr, value|
+ value = value.to_i
+ Fiddle::Pointer.new(addr)[0, Fiddle::SIZEOF_VOIDP] = [value].pack(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
+ end
+ end
+ end
+ end
+
+ class BitField
+ # @param addr [Integer]
+ # @param width [Integer]
+ # @param offset [Integer]
+ def initialize(addr, width, offset)
+ @addr = addr
+ @width = width
+ @offset = offset
+ end
+
+ # Dereference
+ def *
+ byte = Fiddle::Pointer.new(@addr)[0, Fiddle::SIZEOF_CHAR].unpack1('c')
+ if @width == 1
+ bit = (1 & (byte >> @offset))
+ bit == 1
+ elsif @width <= 8 && @offset == 0
+ bitmask = @width.times.sum { |i| 1 << i }
+ byte & bitmask
+ else
+ raise NotImplementedError.new("not-implemented bit field access: width=#{@width} offset=#{@offset}")
+ end
+ end
+
+ # @param width [Integer]
+ # @param offset [Integer]
+ def self.define(width, offset)
+ Class.new(self) do
+ define_method(:initialize) do |addr|
+ super(addr, width, offset)
+ end
+ end
+ end
+ end
+
+ # Give a name to a dynamic CPointer class to see it on inspect
+ def self.with_class_name(prefix, name, cache: false, &block)
+ return block.call if name.empty?
+
+ # Use a cached result only if cache: true
+ class_name = "#{prefix}_#{name}"
+ klass =
+ if cache && self.const_defined?(class_name)
+ self.const_get(class_name)
+ else
+ block.call
+ end
+
+ # Give it a name unless it's already defined
+ unless self.const_defined?(class_name)
+ self.const_set(class_name, klass)
+ end
+
+ klass
+ end
+ end
+end
diff --git a/lib/ruby_vm/mjit/c_type.rb b/lib/ruby_vm/mjit/c_type.rb
new file mode 100644
index 0000000000..9c965ad2fb
--- /dev/null
+++ b/lib/ruby_vm/mjit/c_type.rb
@@ -0,0 +1,91 @@
+require 'fiddle'
+require 'fiddle/pack'
+require_relative 'c_pointer'
+
+module RubyVM::MJIT # :nodoc: all
+ module CType
+ module Struct
+ # @param name [String]
+ # @param members [Hash{ Symbol => [Integer, RubyVM::MJIT::CType::*] }]
+ def self.new(name, sizeof, **members)
+ name = members.keys.join('_') if name.empty?
+ CPointer.with_class_name('Struct', name) do
+ CPointer::Struct.define(sizeof, members)
+ end
+ end
+ end
+
+ module Union
+ # @param name [String]
+ # @param members [Hash{ Symbol => RubyVM::MJIT::CType::* }]
+ def self.new(name, sizeof, **members)
+ name = members.keys.join('_') if name.empty?
+ CPointer.with_class_name('Union', name) do
+ CPointer::Union.define(sizeof, members)
+ end
+ end
+ end
+
+ module Immediate
+ # @param fiddle_type [Integer]
+ def self.new(fiddle_type)
+ name = Fiddle.constants.find do |const|
+ const.start_with?('TYPE_') && Fiddle.const_get(const) == fiddle_type.abs
+ end&.to_s
+ name.delete_prefix!('TYPE_')
+ if fiddle_type.negative?
+ name.prepend('U')
+ end
+ CPointer.with_class_name('Immediate', name, cache: true) do
+ CPointer::Immediate.define(fiddle_type)
+ end
+ end
+
+ # @param type [String]
+ def self.parse(ctype)
+ new(Fiddle::Importer.parse_ctype(ctype))
+ end
+
+ def self.find(size, signed)
+ fiddle_type = TYPE_MAP.fetch(size)
+ fiddle_type = -fiddle_type unless signed
+ new(fiddle_type)
+ end
+
+ TYPE_MAP = Fiddle::PackInfo::SIZE_MAP.map { |type, size| [size, type.abs] }.to_h
+ private_constant :TYPE_MAP
+ end
+
+ module Bool
+ def self.new
+ CPointer::Bool
+ end
+ end
+
+ class Pointer
+ # This takes a block to avoid "stack level too deep" on a cyclic reference
+ # @param block [Proc]
+ def self.new(&block)
+ CPointer.with_class_name('Pointer', block.object_id.to_s) do
+ CPointer::Pointer.define(block)
+ end
+ end
+ end
+
+ module BitField
+ # @param width [Integer]
+ # @param offset [Integer]
+ def self.new(width, offset)
+ CPointer.with_class_name('BitField', "#{offset}_#{width}") do
+ CPointer::BitField.define(width, offset)
+ end
+ end
+ end
+
+ # Types that are referenced but not part of code generation targets
+ Stub = ::Struct.new(:name)
+
+ # Types that it failed to figure out from the header
+ Unknown = Module.new
+ end
+end
diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb
new file mode 100644
index 0000000000..81022cd0a8
--- /dev/null
+++ b/lib/ruby_vm/mjit/compiler.rb
@@ -0,0 +1,952 @@
+# Available variables and macros in JIT-ed function:
+# ec: the first argument of _mjitXXX
+# reg_cfp: the second argument of _mjitXXX
+# GET_CFP(): refers to `reg_cfp`
+# GET_EP(): refers to `reg_cfp->ep`
+# GET_SP(): refers to `reg_cfp->sp`, or `(stack + stack_size)` if local_stack_p
+# GET_SELF(): refers to `cfp_self`
+# GET_LEP(): refers to `VM_EP_LEP(reg_cfp->ep)`
+# EXEC_EC_CFP(): refers to `val = vm_exec(ec, true)` with frame setup
+# CALL_METHOD(): using `GET_CFP()` and `EXEC_EC_CFP()`
+# TOPN(): refers to `reg_cfp->sp`, or `*(stack + (stack_size - num - 1))` if local_stack_p
+# STACK_ADDR_FROM_TOP(): refers to `reg_cfp->sp`, or `stack + (stack_size - num)` if local_stack_p
+# DISPATCH_ORIGINAL_INSN(): expanded in _mjit_compile_insn.erb
+# THROW_EXCEPTION(): specially defined for JIT
+# RESTORE_REGS(): specially defined for `leave`
+class RubyVM::MJIT::Compiler # :nodoc: all
+ C = RubyVM::MJIT.const_get(:C, false)
+ INSNS = RubyVM::MJIT.const_get(:INSNS, false)
+ UNSUPPORTED_INSNS = [
+ :defineclass, # low priority
+ ]
+
+ def initialize = freeze
+
+ # @param iseq [RubyVM::MJIT::CPointer::Struct]
+ # @param funcname [String]
+ # @param id [Integer]
+ # @return [String,NilClass]
+ def compile(iseq, funcname, id)
+ status = C.compile_status.new # not freed for now
+ status.compiled_iseq = iseq.body
+ status.compiled_id = id
+ init_compile_status(status, iseq.body, true) # not freed for now
+ if iseq.body.ci_size > 0 && status.cc_entries_index == -1
+ return nil
+ end
+
+ src = +''
+ if !status.compile_info.disable_send_cache && !status.compile_info.disable_inlining
+ unless precompile_inlinable_iseqs(src, iseq, status)
+ return nil
+ end
+ end
+
+ src << "VALUE\n#{funcname}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)\n{\n"
+ success = compile_body(src, iseq, status)
+ src << "\n} // end of #{funcname}\n"
+
+ return success ? src : nil
+ rescue Exception => e # should we use rb_rescue in C instead?
+ if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
+ $stderr.puts "MJIT error: #{e.full_message}"
+ end
+ return nil
+ end
+
+ private
+
+ def compile_body(src, iseq, status)
+ status.success = true
+ status.local_stack_p = !iseq.body.catch_except_p
+
+ if status.local_stack_p
+ src << " VALUE stack[#{iseq.body.stack_max}];\n"
+ else
+ src << " VALUE *stack = reg_cfp->sp;\n"
+ end
+
+ unless status.inlined_iseqs.nil? # i.e. compile root
+ src << " static const rb_iseq_t *original_iseq = (const rb_iseq_t *)#{iseq};\n"
+ end
+ src << " static const VALUE *const original_body_iseq = (VALUE *)#{iseq.body.iseq_encoded};\n"
+
+ src << " VALUE cfp_self = reg_cfp->self;\n" # cache self across the method
+ src << "#undef GET_SELF\n"
+ src << "#define GET_SELF() cfp_self\n"
+
+ # Generate merged ivar guards first if needed
+ if !status.compile_info.disable_ivar_cache && using_ivar?(iseq.body)
+ src << " if (UNLIKELY(!RB_TYPE_P(GET_SELF(), T_OBJECT))) {"
+ src << " goto ivar_cancel;\n"
+ src << " }\n"
+ end
+
+ # Simulate `opt_pc` in setup_parameters_complex. Other PCs which may be passed by catch tables
+ # are not considered since vm_exec doesn't call jit_exec for catch tables.
+ if iseq.body.param.flags.has_opt
+ src << "\n"
+ src << " switch (reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded) {\n"
+ (0..iseq.body.param.opt_num).each do |i|
+ pc_offset = iseq.body.param.opt_table[i]
+ src << " case #{pc_offset}:\n"
+ src << " goto label_#{pc_offset};\n"
+ end
+ src << " }\n"
+ end
+
+ compile_insns(0, 0, status, iseq.body, src)
+ compile_cancel_handler(src, iseq.body, status)
+ src << "#undef GET_SELF\n"
+ return status.success
+ end
+
+ # Compile one conditional branch. If it has branchXXX insn, this should be
+ # called multiple times for each branch.
+ def compile_insns(stack_size, pos, status, body, src)
+ branch = C.compile_branch.new # not freed for now
+ branch.stack_size = stack_size
+ branch.finish_p = false
+
+ while pos < body.iseq_size && !already_compiled?(status, pos) && !branch.finish_p
+ insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
+ status.stack_size_for_pos[pos] = branch.stack_size
+
+ src << "\nlabel_#{pos}: /* #{insn.name} */\n"
+ pos = compile_insn(insn, pos, status, body.iseq_encoded + (pos+1), body, branch, src)
+ if status.success && branch.stack_size > body.stack_max
+ if mjit_opts.warnings || mjit_opts.verbose > 0
+ $stderr.puts "MJIT warning: JIT stack size (#{branch.stack_size}) exceeded its max size (#{body.stack_max})"
+ end
+ status.success = false
+ end
+ break unless status.success
+ end
+ end
+
+ # Main function of JIT compilation, vm_exec_core counterpart for JIT. Compile one insn to `f`, may modify
+ # b->stack_size and return next position.
+ #
+ # When you add a new instruction to insns.def, it would be nice to have JIT compilation support here but
+ # it's optional. This JIT compiler just ignores ISeq which includes unknown instruction, and ISeq which
+ # does not have it can be compiled as usual.
+ def compile_insn(insn, pos, status, operands, body, b, src)
+ sp_inc = C.mjit_call_attribute_sp_inc(insn.bin, operands)
+ next_pos = pos + insn.len
+
+ result = compile_insn_entry(insn, b.stack_size, sp_inc, status.local_stack_p, pos, next_pos, insn.len,
+ status.inlined_iseqs.nil?, status, operands, body)
+ if result.nil?
+ if C.mjit_opts.warnings || C.mjit_opts.verbose > 0
+ $stderr.puts "MJIT warning: Skipped to compile unsupported instruction: #{insn.name}"
+ end
+ status.success = false
+ else
+ result_src, next_pos, finish_p, compile_insns_p = result
+
+ src << result_src
+ b.stack_size += sp_inc
+
+ if finish_p
+ b.finish_p = true
+ end
+ if compile_insns_p
+ if already_compiled?(status, pos + insn.len)
+ src << "goto label_#{pos + insn.len};\n"
+ else
+ compile_insns(b.stack_size, pos + insn.len, status, body, src)
+ end
+ end
+ end
+
+ # If next_pos is already compiled and this branch is not finished yet,
+ # next instruction won't be compiled in C code next and will need `goto`.
+ if !b.finish_p && next_pos < body.iseq_size && already_compiled?(status, next_pos)
+ src << "goto label_#{next_pos};\n"
+
+ # Verify stack size assumption is the same among multiple branches
+ if status.stack_size_for_pos[next_pos] != b.stack_size
+ if mjit_opts.warnings || mjit_opts.verbose > 0
+ $stderr.puts "MJIT warning: JIT stack assumption is not the same between branches (#{status.stack_size_for_pos[next_pos]} != #{b.stack_size})\n"
+ end
+ status.success = false
+ end
+ end
+
+ return next_pos
+ end
+
+ def compile_insn_entry(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, status, operands, body)
+ finish_p = false
+ compile_insns = false
+
+ # TODO: define this outside this method, or at least cache it
+ opt_send_without_block = INSNS.values.find { |i| i.name == :opt_send_without_block }
+ if opt_send_without_block.nil?
+ raise 'opt_send_without_block not found'
+ end
+ send_compatible_opt_insns = INSNS.values.select do |insn|
+ insn.name.start_with?('opt_') && opt_send_without_block.opes == insn.opes &&
+ insn.expr.lines.any? { |l| l.match(/\A\s+CALL_SIMPLE_METHOD\(\);\s+\z/) }
+ end.map(&:name)
+
+ case insn.name
+ when *UNSUPPORTED_INSNS
+ return nil
+ when :opt_send_without_block, :send
+ if src = compile_send(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
+ return src, next_pos, finish_p, compile_insns
+ end
+ when *send_compatible_opt_insns
+ if C.has_cache_for_send(captured_cc_entries(status)[call_data_index(C.CALL_DATA.new(operands[0]), body)], insn.bin) &&
+ src = compile_send(opt_send_without_block, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
+ return src, next_pos, finish_p, compile_insns
+ end
+ when :getinstancevariable, :setinstancevariable
+ if src = compile_ivar(insn.name, stack_size, pos, status, operands, body)
+ return src, next_pos, finish_p, compile_insns
+ end
+ when :opt_getconstant_path
+ if src = compile_getconstant_path(stack_size, pos, insn_len, operands, status)
+ return src, next_pos, finish_p, compile_insns
+ end
+ when :invokebuiltin, :opt_invokebuiltin_delegate, :opt_invokebuiltin_delegate_leave
+ if src = compile_invokebuiltin(insn, stack_size, sp_inc, body, operands)
+ if insn.name == :opt_invokebuiltin_delegate_leave
+ src << compile_leave(stack_size, pos, inlined_iseq_p)
+ finish_p = true
+ end
+ return src, next_pos, finish_p, compile_insns
+ end
+ when :leave
+ if stack_size != 1
+ raise "Unexpected JIT stack_size on leave: #{stack_size}"
+ end
+ src = compile_leave(stack_size, pos, inlined_iseq_p)
+ finish_p = true
+ return src, next_pos, finish_p, compile_insns
+ end
+
+ return compile_insn_default(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, operands)
+ end
+
+ # Optimized case of send / opt_send_without_block instructions.
+ def compile_send(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, status, operands, body)
+ # compiler: Use captured cc to avoid race condition
+ cd = C.CALL_DATA.new(operands[0])
+ cd_index = call_data_index(cd, body)
+ captured_cc = captured_cc_entries(status)[cd_index]
+
+ # compiler: Inline send insn where some supported fastpath is used.
+ ci = cd.ci
+ kw_splat = (C.vm_ci_flag(ci) & C.VM_CALL_KW_SPLAT) > 0
+ if !status.compile_info.disable_send_cache && has_valid_method_type?(captured_cc) && (
+ # `CC_SET_FASTPATH(cd->cc, vm_call_cfunc_with_frame, ...)` in `vm_call_cfunc`
+ (vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_CFUNC && !C.rb_splat_or_kwargs_p(ci) && !kw_splat) ||
+ # `CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(...), vm_call_iseq_optimizable_p(...))` in `vm_callee_setup_arg`,
+ # and support only non-VM_CALL_TAILCALL path inside it
+ (vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_ISEQ &&
+ C.fastpath_applied_iseq_p(ci, captured_cc, iseq = def_iseq_ptr(vm_cc_cme(captured_cc).def)) &&
+ (C.vm_ci_flag(ci) & C.VM_CALL_TAILCALL) == 0)
+ )
+ src = +"{\n"
+
+ # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things.
+ src << " const struct rb_callcache *cc = (struct rb_callcache *)#{captured_cc};\n"
+ src << " const rb_callable_method_entry_t *cc_cme = (rb_callable_method_entry_t *)#{vm_cc_cme(captured_cc)};\n"
+ src << " const VALUE recv = stack[#{stack_size + sp_inc - 1}];\n"
+ # If opt_class_of is true, use RBASIC_CLASS instead of CLASS_OF to reduce code size
+ opt_class_of = !maybe_special_const?(captured_cc.klass)
+ src << " if (UNLIKELY(#{opt_class_of ? 'RB_SPECIAL_CONST_P(recv)' : 'false'} || !vm_cc_valid_p(cc, cc_cme, #{opt_class_of ? 'RBASIC_CLASS' : 'CLASS_OF'}(recv)))) {\n"
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " goto send_cancel;\n"
+ src << " }\n"
+
+ # JIT: move sp and pc if necessary
+ pc_moved_p = compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
+
+ # JIT: If ISeq is inlinable, call the inlined method without pushing a frame.
+ if iseq && status.inlined_iseqs && iseq.body.to_i == status.inlined_iseqs[pos]&.to_i
+ src << " {\n"
+ src << " VALUE orig_self = reg_cfp->self;\n"
+ src << " reg_cfp->self = stack[#{stack_size + sp_inc - 1}];\n"
+ src << " stack[#{stack_size + sp_inc - 1}] = _mjit#{status.compiled_id}_inlined_#{pos}(ec, reg_cfp, orig_self, original_iseq);\n"
+ src << " reg_cfp->self = orig_self;\n"
+ src << " }\n"
+ else
+ # JIT: Forked `vm_sendish` (except method_explorer = vm_search_method_wrap) to inline various things
+ src << " {\n"
+ src << " VALUE val;\n"
+ src << " struct rb_calling_info calling;\n"
+ if insn.name == :send
+ src << " calling.block_handler = vm_caller_setup_arg_block(ec, reg_cfp, (const struct rb_callinfo *)#{ci}, (rb_iseq_t *)0x#{operands[1].to_s(16)}, FALSE);\n"
+ else
+ src << " calling.block_handler = VM_BLOCK_HANDLER_NONE;\n"
+ end
+ src << " calling.kw_splat = #{kw_splat ? 1 : 0};\n"
+ src << " calling.recv = stack[#{stack_size + sp_inc - 1}];\n"
+ src << " calling.argc = #{C.vm_ci_argc(ci)};\n"
+
+ if vm_cc_cme(captured_cc).def.type == C.VM_METHOD_TYPE_CFUNC
+ # TODO: optimize this more
+ src << " calling.ci = (const struct rb_callinfo *)#{ci};\n" # creating local cd here because operand's cd->cc may not be the same as inlined cc.
+ src << " calling.cc = cc;"
+ src << " val = vm_call_cfunc_with_frame(ec, reg_cfp, &calling);\n"
+ else # :iseq
+ # fastpath_applied_iseq_p checks rb_simple_iseq_p, which ensures has_opt == FALSE
+ src << " vm_call_iseq_setup_normal(ec, reg_cfp, &calling, cc_cme, 0, #{iseq.body.param.size}, #{iseq.body.local_table_size});\n"
+ if iseq.body.catch_except_p
+ src << " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n"
+ src << " val = vm_exec(ec, true);\n"
+ else
+ src << " if ((val = jit_exec(ec)) == Qundef) {\n"
+ src << " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n" # This is vm_call0_body's code after vm_call_iseq_setup
+ src << " val = vm_exec(ec, false);\n"
+ src << " }\n"
+ end
+ end
+ src << " stack[#{stack_size + sp_inc - 1}] = val;\n"
+ src << " }\n"
+
+ # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
+ src << " if (UNLIKELY(!mjit_call_p)) {\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size + sp_inc};\n"
+ if !pc_moved_p
+ src << " reg_cfp->pc = original_body_iseq + #{next_pos};\n"
+ end
+ src << " goto cancel;\n"
+ src << " }\n"
+ end
+
+ src << "}\n"
+ return src
+ else
+ return nil
+ end
+ end
+
+ def compile_ivar(insn_name, stack_size, pos, status, operands, body)
+ iv_cache = C.iseq_inline_storage_entry.new(operands[1]).iv_cache
+ dest_shape_id = iv_cache.value >> C.SHAPE_FLAG_SHIFT
+ source_shape_id = parent_shape_id(dest_shape_id)
+ attr_index = iv_cache.value & ((1 << C.SHAPE_FLAG_SHIFT) - 1)
+
+ src = +''
+ if !status.compile_info.disable_ivar_cache && source_shape_id != C.INVALID_SHAPE_ID
+ # JIT: optimize away motion of sp and pc. This path does not call rb_warning() and so it's always leaf and not `handles_sp`.
+ # compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
+
+ # JIT: prepare vm_getivar/vm_setivar arguments and variables
+ src << "{\n"
+ src << " VALUE obj = GET_SELF();\n" # T_OBJECT guaranteed by compile_body
+ # JIT: cache hit path of vm_getivar/vm_setivar, or cancel JIT (recompile it with exivar)
+ if insn_name == :setinstancevariable
+ src << " const uint32_t index = #{attr_index - 1};\n"
+ src << " const shape_id_t dest_shape_id = (shape_id_t)#{dest_shape_id};\n"
+ src << " if (dest_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
+ src << " VALUE *ptr = ROBJECT_IVPTR(obj);\n"
+ src << " RB_OBJ_WRITE(obj, &ptr[index], stack[#{stack_size - 1}]);\n"
+ src << " }\n"
+ else
+ src << " const shape_id_t source_shape_id = (shape_id_t)#{dest_shape_id};\n"
+ if attr_index == 0 # cache hit, but uninitialized iv
+ src << " /* Uninitialized instance variable */\n"
+ src << " if (source_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
+ src << " stack[#{stack_size}] = Qnil;\n"
+ src << " }\n"
+ else
+ src << " const uint32_t index = #{attr_index - 1};\n"
+ src << " if (source_shape_id == ROBJECT_SHAPE_ID(obj)) {\n"
+ src << " stack[#{stack_size}] = ROBJECT_IVPTR(obj)[index];\n"
+ src << " }\n"
+ end
+ end
+ src << " else {\n"
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " goto ivar_cancel;\n"
+ src << " }\n"
+ src << "}\n"
+ return src
+ elsif insn_name == :getinstancevariable && !status.compile_info.disable_exivar_cache && source_shape_id != C.INVALID_SHAPE_ID
+ # JIT: optimize away motion of sp and pc. This path does not call rb_warning() and so it's always leaf and not `handles_sp`.
+ # compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
+
+ # JIT: prepare vm_getivar's arguments and variables
+ src << "{\n"
+ src << " VALUE obj = GET_SELF();\n"
+ src << " const shape_id_t source_shape_id = (shape_id_t)#{dest_shape_id};\n"
+ src << " const uint32_t index = #{attr_index - 1};\n"
+ # JIT: cache hit path of vm_getivar, or cancel JIT (recompile it without any ivar optimization)
+ src << " struct gen_ivtbl *ivtbl;\n"
+ src << " if (LIKELY(FL_TEST_RAW(GET_SELF(), FL_EXIVAR) && source_shape_id == rb_shape_get_shape_id(obj) && rb_ivar_generic_ivtbl_lookup(obj, &ivtbl))) {\n"
+ src << " stack[#{stack_size}] = ivtbl->ivptr[index];\n"
+ src << " }\n"
+ src << " else {\n"
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " goto exivar_cancel;\n"
+ src << " }\n"
+ src << "}\n"
+ return src
+ else
+ return nil
+ end
+ end
+
+ def compile_invokebuiltin(insn, stack_size, sp_inc, body, operands)
+ bf = C.RB_BUILTIN.new(operands[0])
+ if bf.compiler > 0
+ index = (insn.name == :invokebuiltin ? -1 : operands[1])
+ src = +"{\n"
+ src << " VALUE val;\n"
+ C.builtin_compiler(src, bf, index, stack_size, body.builtin_inline_p)
+ src << " stack[#{stack_size + sp_inc - 1}] = val;\n"
+ src << "}\n"
+ return src
+ else
+ return nil
+ end
+ end
+
+ def compile_leave(stack_size, pos, inlined_iseq_p)
+ src = +''
+ # Skip vm_pop_frame for inlined call
+ unless inlined_iseq_p
+ # Cancel on interrupts to make leave insn leaf
+ src << " if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);\n"
+ src << " }\n"
+ src << " ec->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(reg_cfp);\n" # vm_pop_frame
+ end
+ src << " return stack[0];\n"
+ end
+
+ def compile_getconstant_path(stack_size, pos, insn_len, operands, status)
+ ice = C.IC.new(operands[0]).entry
+ if !status.compile_info.disable_const_cache && ice
+ # JIT: Inline everything in IC, and cancel the slow path
+ src = +" if (vm_inlined_ic_hit_p(#{ice.flags}, #{ice.value}, (const rb_cref_t *)#{to_addr(ice.ic_cref)}, reg_cfp->ep)) {\n"
+ src << " stack[#{stack_size}] = #{ice.value};\n"
+ src << " }\n"
+ src << " else {\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " goto const_cancel;\n"
+ src << " }\n"
+ return src
+ else
+ return nil
+ end
+ end
+
+ def compile_insn_default(insn, stack_size, sp_inc, local_stack_p, pos, next_pos, insn_len, inlined_iseq_p, operands)
+ src = +''
+ finish_p = false
+ compile_insns = false
+
+ # JIT: Declare stack_size to be used in some macro of _mjit_compile_insn_body.erb
+ src << "{\n"
+ if local_stack_p
+ src << " MAYBE_UNUSED(unsigned int) stack_size = #{stack_size};\n"
+ end
+
+ # JIT: Declare variables for operands, popped values and return values
+ insn.declarations.each do |decl|
+ src << " #{decl};\n"
+ end
+
+ # JIT: Set const expressions for `RubyVM::OperandsUnifications` insn
+ insn.preamble.each do |amble|
+ src << "#{amble.sub(/const \S+\s+/, '')}\n"
+ end
+
+ # JIT: Initialize operands
+ insn.opes.each_with_index do |ope, i|
+ src << " #{ope.fetch(:name)} = (#{ope.fetch(:type)})#{operands[i]};\n"
+ # TODO: resurrect comment_id
+ end
+
+ # JIT: Initialize popped values
+ insn.pops.reverse_each.with_index.reverse_each do |pop, i|
+ src << " #{pop.fetch(:name)} = stack[#{stack_size - (i + 1)}];\n"
+ end
+
+ # JIT: move sp and pc if necessary
+ pc_moved_p = compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
+
+ # JIT: Print insn body in insns.def
+ next_pos = compile_insn_body(src, insn, pos, next_pos, insn_len, local_stack_p, stack_size, sp_inc, operands)
+
+ # JIT: Set return values
+ insn.rets.reverse_each.with_index do |ret, i|
+ # TOPN(n) = ...
+ src << " stack[#{stack_size + sp_inc - (i + 1)}] = #{ret.fetch(:name)};\n"
+ end
+
+ # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
+ # leaf insn may not cancel JIT. leaf_without_check_ints is covered in RUBY_VM_CHECK_INTS of _mjit_compile_insn_body.erb.
+ unless insn.always_leaf? || insn.leaf_without_check_ints?
+ src << " if (UNLIKELY(!mjit_call_p)) {\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size + sp_inc};\n"
+ if !pc_moved_p
+ src << " reg_cfp->pc = original_body_iseq + #{next_pos};\n"
+ end
+ src << " goto cancel;\n"
+ src << " }\n"
+ end
+
+ src << "}\n"
+
+ # compiler: If insn has conditional JUMP, the code should go to the branch not targeted by JUMP next.
+ if insn.expr.match?(/if\s+\([^{}]+\)\s+\{[^{}]+JUMP\([^)]+\);[^{}]+\}/)
+ compile_insns = true
+ end
+
+ # compiler: If insn returns (leave) or does longjmp (throw), the branch should no longer be compiled. TODO: create attr for it?
+ if insn.expr.match?(/\sTHROW_EXCEPTION\([^)]+\);/) || insn.expr.match?(/\bvm_pop_frame\(/)
+ finish_p = true
+ end
+
+ return src, next_pos, finish_p, compile_insns
+ end
+
+ def compile_insn_body(src, insn, pos, next_pos, insn_len, local_stack_p, stack_size, sp_inc, operands)
+ # Print a body of insn, but with macro expansion.
+ expand_simple_macros(insn.expr).each_line do |line|
+ # Expand dynamic macro here
+ # TODO: support combination of following macros in the same line
+ case line
+ when /\A\s+RUBY_VM_CHECK_INTS\(ec\);\s+\z/
+ if insn.leaf_without_check_ints? # lazily move PC and optionalize mjit_call_p here
+ src << " if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {\n"
+ src << " reg_cfp->pc = original_body_iseq + #{next_pos};\n" # ADD_PC(INSN_ATTR(width));
+ src << " rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);\n"
+ src << " if (UNLIKELY(!mjit_call_p)) {\n"
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ src << " goto cancel;\n"
+ src << " }\n"
+ src << " }\n"
+ else
+ src << to_cstr(line)
+ end
+ when /\A\s+JUMP\((?<dest>[^)]+)\);\s+\z/
+ dest = Regexp.last_match[:dest]
+ if insn.name == :opt_case_dispatch # special case... TODO: use another macro to avoid checking name
+ hash_offsets = C.rb_hash_values(operands[0]).uniq
+ else_offset = cast_offset(operands[1])
+ base_pos = pos + insn_len
+
+ src << " switch (#{dest}) {\n"
+ hash_offsets.each do |offset|
+ src << " case #{offset}:\n"
+ src << " goto label_#{base_pos + offset};\n"
+ end
+ src << " case #{else_offset}:\n"
+ src << " goto label_#{base_pos + else_offset};\n"
+ src << " }\n"
+ else
+ # Before we `goto` next insn, we need to set return values, especially for getinlinecache
+ insn.rets.reverse_each.with_index do |ret, i|
+ # TOPN(n) = ...
+ src << " stack[#{stack_size + sp_inc - (i + 1)}] = #{ret.fetch(:name)};\n"
+ end
+
+ next_pos = pos + insn_len + cast_offset(operands[0]) # workaround: assuming dest == operands[0]. TODO: avoid relying on it
+ src << " goto label_#{next_pos};\n"
+ end
+ when /\A\s+CALL_SIMPLE_METHOD\(\);\s+\z/
+ # For `opt_xxx`'s fallbacks.
+ if local_stack_p
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ end
+ src << " reg_cfp->pc = original_body_iseq + #{pos};\n"
+ src << " goto cancel;\n"
+ when /\A(?<prefix>.+\b)INSN_LABEL\((?<name>[^)]+)\)(?<suffix>.+)\z/m
+ prefix, name, suffix = Regexp.last_match[:prefix], Regexp.last_match[:name], Regexp.last_match[:suffix]
+ src << "#{prefix}INSN_LABEL(#{name}_#{pos})#{suffix}"
+ else
+ if insn.handles_sp?
+ # If insn.handles_sp? is true, cfp->sp might be changed inside insns (like vm_caller_setup_arg_block)
+ # and thus we need to use cfp->sp, even when local_stack_p is TRUE. When insn.handles_sp? is true,
+ # cfp->sp should be available too because _mjit_compile_pc_and_sp.erb sets it.
+ src << to_cstr(line)
+ else
+ # If local_stack_p is TRUE and insn.handles_sp? is false, stack values are only available in local variables
+ # for stack. So we need to replace those macros if local_stack_p is TRUE here.
+ case line
+ when /\bGET_SP\(\)/
+ # reg_cfp->sp
+ src << to_cstr(line.sub(/\bGET_SP\(\)/, local_stack_p ? '(stack + stack_size)' : 'GET_SP()'))
+ when /\bSTACK_ADDR_FROM_TOP\((?<num>[^)]+)\)/
+ # #define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
+ num = Regexp.last_match[:num]
+ src << to_cstr(line.sub(/\bSTACK_ADDR_FROM_TOP\(([^)]+)\)/, local_stack_p ? "(stack + (stack_size - (#{num})))" : "STACK_ADDR_FROM_TOP(#{num})"))
+ when /\bTOPN\((?<num>[^)]+)\)/
+ # #define TOPN(n) (*(GET_SP()-(n)-1))
+ num = Regexp.last_match[:num]
+ src << to_cstr(line.sub(/\bTOPN\(([^)]+)\)/, local_stack_p ? "*(stack + (stack_size - (#{num}) - 1))" : "TOPN(#{num})"))
+ else
+ src << to_cstr(line)
+ end
+ end
+ end
+ end
+ return next_pos
+ end
+
+ def compile_pc_and_sp(src, insn, stack_size, sp_inc, local_stack_p, next_pos)
+ # JIT: When an insn is leaf, we don't need to Move pc for a catch table on catch_except_p, #caller_locations,
+ # and rb_profile_frames. For check_ints, we lazily move PC when we have interruptions.
+ pc_moved_p = false
+ unless insn.always_leaf? || insn.leaf_without_check_ints?
+ src << " reg_cfp->pc = original_body_iseq + #{next_pos};\n" # ADD_PC(INSN_ATTR(width));
+ pc_moved_p = true
+ end
+
+ # JIT: move sp to use or preserve stack variables
+ if local_stack_p
+ # sp motion is optimized away for `handles_sp? #=> false` case.
+ # Thus sp should be set properly before `goto cancel`.
+ if insn.handles_sp?
+ # JIT-only behavior (pushing JIT's local variables to VM's stack):
+ push_size = -sp_inc + insn.rets.size - insn.pops.size
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{push_size};\n"
+ push_size.times do |i|
+ src << " *(reg_cfp->sp + #{i - push_size}) = stack[#{stack_size - push_size + i}];\n"
+ end
+ end
+ else
+ if insn.handles_sp?
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size - insn.pops.size};\n" # POPN(INSN_ATTR(popn));
+ else
+ src << " reg_cfp->sp = vm_base_ptr(reg_cfp) + #{stack_size};\n"
+ end
+ end
+ return pc_moved_p
+ end
+
+ # Print the block to cancel inlined method call. It's supporting only `opt_send_without_block` for now.
+ def compile_inlined_cancel_handler(src, body, inline_context)
+ src << "\ncancel:\n"
+ src << " rb_mjit_recompile_inlining(original_iseq);\n"
+
+ # Swap pc/sp set on cancel with original pc/sp.
+ src << " const VALUE *current_pc = reg_cfp->pc;\n"
+ src << " VALUE *current_sp = reg_cfp->sp;\n"
+ src << " reg_cfp->pc = orig_pc;\n"
+ src << " reg_cfp->sp = orig_sp;\n\n"
+
+ # Lazily push the current call frame.
+ src << " struct rb_calling_info calling;\n"
+ src << " calling.block_handler = VM_BLOCK_HANDLER_NONE;\n" # assumes `opt_send_without_block`
+ src << " calling.argc = #{inline_context.orig_argc};\n"
+ src << " calling.recv = reg_cfp->self;\n"
+ src << " reg_cfp->self = orig_self;\n"
+ # fastpath_applied_iseq_p checks rb_simple_iseq_p, which ensures has_opt == FALSE
+ src << " vm_call_iseq_setup_normal(ec, reg_cfp, &calling, (const rb_callable_method_entry_t *)#{inline_context.me}, 0, #{inline_context.param_size}, #{inline_context.local_size});\n\n"
+
+ # Start usual cancel from here.
+ src << " reg_cfp = ec->cfp;\n" # work on the new frame
+ src << " reg_cfp->pc = current_pc;\n"
+ src << " reg_cfp->sp = current_sp;\n"
+ (0...body.stack_max).each do |i| # should be always `status->local_stack_p`
+ src << " *(vm_base_ptr(reg_cfp) + #{i}) = stack[#{i}];\n"
+ end
+ # We're not just returning Qundef here so that caller's normal cancel handler can
+ # push back `stack` to `cfp->sp`.
+ src << " return vm_exec(ec, false);\n"
+ end
+
+ # Print the block to cancel JIT execution.
+ def compile_cancel_handler(src, body, status)
+ if status.inlined_iseqs.nil? # the current ISeq is being inlined
+ compile_inlined_cancel_handler(src, body, status.inline_context)
+ return
+ end
+
+ src << "\nsend_cancel:\n"
+ src << " rb_mjit_recompile_send(original_iseq);\n"
+ src << " goto cancel;\n"
+
+ src << "\nivar_cancel:\n"
+ src << " rb_mjit_recompile_ivar(original_iseq);\n"
+ src << " goto cancel;\n"
+
+ src << "\nexivar_cancel:\n"
+ src << " rb_mjit_recompile_exivar(original_iseq);\n"
+ src << " goto cancel;\n"
+
+ src << "\nconst_cancel:\n"
+ src << " rb_mjit_recompile_const(original_iseq);\n"
+ src << " goto cancel;\n"
+
+ src << "\ncancel:\n"
+ if status.local_stack_p
+ (0...body.stack_max).each do |i|
+ src << " *(vm_base_ptr(reg_cfp) + #{i}) = stack[#{i}];\n"
+ end
+ end
+ src << " return Qundef;\n"
+ end
+
+ def precompile_inlinable_child_iseq(src, child_iseq, status, ci, cc, pos)
+ child_status = C.compile_status.new # not freed for now
+ child_status.compiled_iseq = status.compiled_iseq
+ child_status.compiled_id = status.compiled_id
+ init_compile_status(child_status, child_iseq.body, false) # not freed for now
+ child_status.inline_context.orig_argc = C.vm_ci_argc(ci)
+ child_status.inline_context.me = vm_cc_cme(cc).to_i
+ child_status.inline_context.param_size = child_iseq.body.param.size
+ child_status.inline_context.local_size = child_iseq.body.local_table_size
+ if child_iseq.body.ci_size > 0 && child_status.cc_entries_index == -1
+ return false
+ end
+
+ src << "ALWAYS_INLINE(static VALUE _mjit#{status.compiled_id}_inlined_#{pos}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq));\n"
+ src << "static inline VALUE\n_mjit#{status.compiled_id}_inlined_#{pos}(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq)\n{\n"
+ src << " const VALUE *orig_pc = reg_cfp->pc;\n"
+ src << " VALUE *orig_sp = reg_cfp->sp;\n"
+
+ success = compile_body(src, child_iseq, child_status)
+
+ src << "\n} /* end of _mjit#{status.compiled_id}_inlined_#{pos} */\n\n"
+
+ return success;
+ end
+
+ def precompile_inlinable_iseqs(src, iseq, status)
+ body = iseq.body
+ pos = 0
+ while pos < body.iseq_size
+ insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
+ if insn.name == :opt_send_without_block || insn.name == :opt_size # `compile_inlined_cancel_handler` supports only `opt_send_without_block`
+ cd = C.CALL_DATA.new(body.iseq_encoded[pos + 1])
+ ci = cd.ci
+ cc = captured_cc_entries(status)[call_data_index(cd, body)] # use copy to avoid race condition
+
+ if (child_iseq = rb_mjit_inlinable_iseq(ci, cc)) != nil
+ status.inlined_iseqs[pos] = child_iseq.body
+
+ if C.mjit_opts.verbose >= 1 # print beforehand because ISeq may be GCed during copy job.
+ child_location = child_iseq.body.location
+ $stderr.puts "JIT inline: #{child_location.label}@#{C.rb_iseq_path(child_iseq)}:#{C.rb_iseq_first_lineno(child_iseq)} " \
+ "=> #{iseq.body.location.label}@#{C.rb_iseq_path(iseq)}:#{C.rb_iseq_first_lineno(iseq)}"
+ end
+ if !precompile_inlinable_child_iseq(src, child_iseq, status, ci, cc, pos)
+ return false
+ end
+ end
+ end
+ pos += insn.len
+ end
+ return true
+ end
+
+ def init_compile_status(status, body, compile_root_p)
+ status.stack_size_for_pos = Fiddle.malloc(Fiddle::SIZEOF_INT * body.iseq_size)
+ body.iseq_size.times do |i|
+ status.stack_size_for_pos[i] = C.NOT_COMPILED_STACK_SIZE
+ end
+ if compile_root_p
+ status.inlined_iseqs = Fiddle.malloc(Fiddle::SIZEOF_VOIDP * body.iseq_size)
+ body.iseq_size.times do |i|
+ status.inlined_iseqs[i] = nil
+ end
+ end
+ if body.ci_size > 0
+ status.cc_entries_index = C.mjit_capture_cc_entries(status.compiled_iseq, body)
+ else
+ status.cc_entries_index = -1
+ end
+ if compile_root_p
+ status.compile_info = rb_mjit_iseq_compile_info(body)
+ else
+ status.compile_info = Fiddle.malloc(C.rb_mjit_compile_info.sizeof)
+ status.compile_info.disable_ivar_cache = false
+ status.compile_info.disable_exivar_cache = false
+ status.compile_info.disable_send_cache = false
+ status.compile_info.disable_inlining = false
+ status.compile_info.disable_const_cache = false
+ end
+ end
+
+ def using_ivar?(body)
+ pos = 0
+ while pos < body.iseq_size
+ insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
+ case insn.name
+ when :getinstancevariable, :setinstancevariable
+ return true
+ end
+ pos += insn.len
+ end
+ return false
+ end
+
+ # Expand simple macro that doesn't require dynamic C code.
+ def expand_simple_macros(arg_expr)
+ arg_expr.dup.tap do |expr|
+ # For `leave`. We can't proceed next ISeq in the same JIT function.
+ expr.gsub!(/^(?<indent>\s*)RESTORE_REGS\(\);\n/) do
+ indent = Regexp.last_match[:indent]
+ <<-end.gsub(/^ {12}/, '')
+ #if OPT_CALL_THREADED_CODE
+ #{indent}rb_ec_thread_ptr(ec)->retval = val;
+ #{indent}return 0;
+ #else
+ #{indent}return val;
+ #endif
+ end
+ end
+ expr.gsub!(/^(?<indent>\s*)NEXT_INSN\(\);\n/) do
+ indent = Regexp.last_match[:indent]
+ <<-end.gsub(/^ {12}/, '')
+ #{indent}UNREACHABLE_RETURN(Qundef);
+ end
+ end
+ end
+ end
+
+ def to_cstr(expr)
+ expr.gsub(/^(?!#)/, ' ') # indent everything but preprocessor lines
+ end
+
+ # Interpret unsigned long as signed long (VALUE -> OFFSET)
+ def cast_offset(offset)
+ if offset >= 1 << 8 * Fiddle::SIZEOF_VOIDP - 1 # negative
+ offset -= 1 << 8 * Fiddle::SIZEOF_VOIDP
+ end
+ offset
+ end
+
+ def captured_cc_entries(status)
+ status.compiled_iseq.mjit_unit.cc_entries + status.cc_entries_index
+ end
+
+ def call_data_index(cd, body)
+ cd - body.call_data
+ end
+
+ def vm_cc_cme(cc)
+ # TODO: add VM_ASSERT like actual vm_cc_cme
+ cc.cme_
+ end
+
+ def def_iseq_ptr(method_def)
+ C.rb_iseq_check(method_def.body.iseq.iseqptr)
+ end
+
+ def rb_mjit_iseq_compile_info(body)
+ body.mjit_unit.compile_info
+ end
+
+ def ISEQ_IS_SIZE(body)
+ body.ic_size + body.ivc_size + body.ise_size + body.icvarc_size
+ end
+
+ # Return true if an object of the class may be a special const (immediate).
+ # It's "maybe" because Integer and Float are not guaranteed to be an immediate.
+ # If this returns false, rb_class_of could be optimzied to RBASIC_CLASS.
+ def maybe_special_const?(klass)
+ [
+ C.rb_cFalseClass,
+ C.rb_cNilClass,
+ C.rb_cTrueClass,
+ C.rb_cInteger,
+ C.rb_cSymbol,
+ C.rb_cFloat,
+ ].include?(klass)
+ end
+
+ def has_valid_method_type?(cc)
+ vm_cc_cme(cc) != nil
+ end
+
+ def already_compiled?(status, pos)
+ status.stack_size_for_pos[pos] != C.NOT_COMPILED_STACK_SIZE
+ end
+
+ # Return an iseq pointer if cc has inlinable iseq.
+ def rb_mjit_inlinable_iseq(ci, cc)
+ if has_valid_method_type?(cc) &&
+ C.vm_ci_flag(ci) & C.VM_CALL_TAILCALL == 0 && # inlining only non-tailcall path
+ vm_cc_cme(cc).def.type == C.VM_METHOD_TYPE_ISEQ &&
+ C.fastpath_applied_iseq_p(ci, cc, iseq = def_iseq_ptr(vm_cc_cme(cc).def)) &&
+ inlinable_iseq_p(iseq.body) # CC_SET_FASTPATH in vm_callee_setup_arg
+ return iseq
+ end
+ return nil
+ end
+
+ # Return true if the ISeq can be inlined without pushing a new control frame.
+ def inlinable_iseq_p(body)
+ # 1) If catch_except_p, caller frame should be preserved when callee catches an exception.
+ # Then we need to wrap `vm_exec()` but then we can't inline the call inside it.
+ #
+ # 2) If `body->catch_except_p` is false and `handles_sp?` of an insn is false,
+ # sp is not moved as we assume `status->local_stack_p = !body->catch_except_p`.
+ #
+ # 3) If `body->catch_except_p` is false and `always_leaf?` of an insn is true,
+ # pc is not moved.
+ if body.catch_except_p
+ return false
+ end
+
+ pos = 0
+ while pos < body.iseq_size
+ insn = INSNS.fetch(C.rb_vm_insn_decode(body.iseq_encoded[pos]))
+ # All insns in the ISeq except `leave` (to be overridden in the inlined code)
+ # should meet following strong assumptions:
+ # * Do not require `cfp->sp` motion
+ # * Do not move `cfp->pc`
+ # * Do not read any `cfp->pc`
+ if insn.name == :invokebuiltin || insn.name == :opt_invokebuiltin_delegate || insn.name == :opt_invokebuiltin_delegate_leave
+ # builtin insn's inlinability is handled by `Primitive.attr! 'inline'` per iseq
+ if !body.builtin_inline_p
+ return false;
+ end
+ elsif insn.name != :leave && C.insn_may_depend_on_sp_or_pc(insn.bin, body.iseq_encoded + (pos + 1))
+ return false
+ end
+ # At this moment, `cfp->ep` in an inlined method is not working.
+ case insn.name
+ when :getlocal,
+ :getlocal_WC_0,
+ :getlocal_WC_1,
+ :setlocal,
+ :setlocal_WC_0,
+ :setlocal_WC_1,
+ :getblockparam,
+ :getblockparamproxy,
+ :setblockparam
+ return false
+ end
+ pos += insn.len
+ end
+ return true
+ end
+
+ # CPointer::Struct could be nil on field reference, and this is a helper to
+ # handle that case while using CPointer::Struct#to_s in most cases.
+ # @param struct [RubyVM::MJIT::CPointer::Struct]
+ def to_addr(struct)
+ struct&.to_s || 'NULL'
+ end
+
+ def parent_shape_id(shape_id)
+ return shape_id if shape_id == C.INVALID_SHAPE_ID
+
+ parent_id = C.rb_shape_get_shape_by_id(shape_id).parent_id
+ parent = C.rb_shape_get_shape_by_id(parent_id)
+
+ if parent.type == C.SHAPE_CAPACITY_CHANGE
+ parent.parent_id
+ else
+ parent_id
+ end
+ end
+end
diff --git a/lib/ruby_vm/mjit/hooks.rb b/lib/ruby_vm/mjit/hooks.rb
new file mode 100644
index 0000000000..3fb1004111
--- /dev/null
+++ b/lib/ruby_vm/mjit/hooks.rb
@@ -0,0 +1,32 @@
+module RubyVM::MJIT::Hooks # :nodoc: all
+ C = RubyVM::MJIT.const_get(:C, false)
+
+ def self.on_bop_redefined(_redefined_flag, _bop)
+ C.mjit_cancel_all("BOP is redefined")
+ end
+
+ def self.on_cme_invalidate(_cme)
+ # to be used later
+ end
+
+ def self.on_ractor_spawn
+ C.mjit_cancel_all("Ractor is spawned")
+ end
+
+ def self.on_constant_state_changed(_id)
+ # to be used later
+ end
+
+ def self.on_constant_ic_update(_iseq, _ic, _insn_idx)
+ # to be used later
+ end
+
+ def self.on_tracing_invalidate_all(new_iseq_events)
+ # Stop calling all JIT-ed code. We can't rewrite existing JIT-ed code to trace_ insns for now.
+ # :class events are triggered only in ISEQ_TYPE_CLASS, but mjit_target_iseq_p ignores such iseqs.
+ # Thus we don't need to cancel JIT-ed code for :class events.
+ if new_iseq_events != C.RUBY_EVENT_CLASS
+ C.mjit_cancel_all("TracePoint is enabled")
+ end
+ end
+end
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 57cb70cc2b..af86646a82 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1,23 +1,23 @@
# frozen_string_literal: true
-# -*- ruby -*-
+
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++
-require 'rbconfig'
+require "rbconfig"
module Gem
- VERSION = "3.1.2".freeze
+ VERSION = "3.4.19"
end
# Must be first since it unloads the prelude from 1.9.2
-require 'rubygems/compatibility'
+require_relative "rubygems/compatibility"
-require 'rubygems/defaults'
-require 'rubygems/deprecate'
-require 'rubygems/errors'
+require_relative "rubygems/defaults"
+require_relative "rubygems/deprecate"
+require_relative "rubygems/errors"
##
# RubyGems is the Ruby standard for publishing and managing third party
@@ -26,30 +26,30 @@ require 'rubygems/errors'
# For user documentation, see:
#
# * <tt>gem help</tt> and <tt>gem help [command]</tt>
-# * {RubyGems User Guide}[http://guides.rubygems.org/]
-# * {Frequently Asked Questions}[http://guides.rubygems.org/faqs]
+# * {RubyGems User Guide}[https://guides.rubygems.org/]
+# * {Frequently Asked Questions}[https://guides.rubygems.org/faqs]
#
# For gem developer documentation see:
#
-# * {Creating Gems}[http://guides.rubygems.org/make-your-own-gem]
+# * {Creating Gems}[https://guides.rubygems.org/make-your-own-gem]
# * Gem::Specification
# * Gem::Version for version dependency notes
#
# Further RubyGems documentation can be found at:
#
-# * {RubyGems Guides}[http://guides.rubygems.org]
-# * {RubyGems API}[http://www.rubydoc.info/github/rubygems/rubygems] (also available from
+# * {RubyGems Guides}[https://guides.rubygems.org]
+# * {RubyGems API}[https://www.rubydoc.info/github/rubygems/rubygems] (also available from
# <tt>gem server</tt>)
#
# == RubyGems Plugins
#
-# As of RubyGems 1.3.2, RubyGems will load plugins installed in gems or
+# RubyGems will load plugins in the latest version of each installed gem or
# $LOAD_PATH. Plugins must be named 'rubygems_plugin' (.rb, .so, etc) and
-# placed at the root of your gem's #require_path. Plugins are discovered via
-# Gem::find_files and then loaded.
+# placed at the root of your gem's #require_path. Plugins are installed at a
+# special location and loaded on boot.
#
# For an example plugin, see the {Graph gem}[https://github.com/seattlerb/graph]
-# which adds a `gem graph` command.
+# which adds a <tt>gem graph</tt> command.
#
# == RubyGems Defaults, Packaging
#
@@ -113,12 +113,12 @@ require 'rubygems/errors'
# -The RubyGems Team
module Gem
- RUBYGEMS_DIR = File.dirname File.expand_path(__FILE__)
+ RUBYGEMS_DIR = __dir__
# Taint support is deprecated in Ruby 2.7.
# This allows switching ".untaint" to ".tap(&Gem::UNTAINT)",
# to avoid deprecation warnings in Ruby 2.7.
- UNTAINT = RUBY_VERSION < '2.7' ? :untaint.to_sym : proc{}
+ UNTAINT = RUBY_VERSION < "2.7" ? :untaint.to_sym : proc {}
##
# An Array of Regexps that match windows Ruby platforms.
@@ -148,6 +148,7 @@ module Gem
doc
extensions
gems
+ plugins
specifications
].freeze
@@ -159,22 +160,12 @@ module Gem
specifications/default
].freeze
- ##
- # Exception classes used in a Gem.read_binary +rescue+ statement
-
- READ_BINARY_ERRORS = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS, Errno::ENOTSUP].freeze
-
- ##
- # Exception classes used in Gem.write_binary +rescue+ statement
-
- WRITE_BINARY_ERRORS = [Errno::ENOSYS, Errno::ENOTSUP].freeze
-
@@win_platform = nil
@configuration = nil
@gemdeps = nil
@loaded_specs = {}
- LOADED_SPECS_MUTEX = Mutex.new
+ LOADED_SPECS_MUTEX = Thread::Mutex.new
@path_to_default_spec_map = {}
@platforms = []
@ruby = nil
@@ -189,6 +180,10 @@ module Gem
@pre_reset_hooks ||= []
@post_reset_hooks ||= []
+ @default_source_date_epoch = nil
+
+ @discover_gems_on_require = true
+
##
# Try to activate a gem containing +path+. Returns true if
# activation succeeded or wasn't needed because it was already
@@ -243,9 +238,6 @@ module Gem
# you to specify specific gem versions.
def self.bin_path(name, exec_name = nil, *requirements)
- # TODO: fails test_self_bin_path_bin_file_gone_in_latest
- # Gem::Specification.find_by_name(name, *requirements).bin_file exec_name
-
requirements = Gem::Requirement.default if
requirements.empty?
@@ -269,9 +261,6 @@ module Gem
unless spec = specs.first
msg = "can't find gem #{dep} with executable #{exec_name}"
- if name == "bundler" && bundler_message = Gem::BundlerVersionFinder.missing_version_message
- msg = bundler_message
- end
raise Gem::GemNotFoundException, msg
end
@@ -303,19 +292,26 @@ module Gem
# The mode needed to read a file as straight binary.
def self.binary_mode
- 'rb'
+ "rb"
end
##
# The path where gem executables are to be installed.
def self.bindir(install_dir=Gem.dir)
- return File.join install_dir, 'bin' unless
+ return File.join install_dir, "bin" unless
install_dir.to_s == Gem.default_dir.to_s
Gem.default_bindir
end
##
+ # The path were rubygems plugins are to be installed.
+
+ def self.plugindir(install_dir=Gem.dir)
+ File.join install_dir, "plugins"
+ end
+
+ ##
# Reset the +dir+ and +path+ values. The next time +dir+ or +path+
# is requested, the values will be calculated from scratch. This is
# mainly used by the unit tests to provide test isolation.
@@ -328,13 +324,6 @@ module Gem
end
##
- # The path to standard location of the user's .gemrc file.
-
- def self.config_file
- @config_file ||= File.join Gem.user_home, '.gemrc'
- end
-
- ##
# The standard configuration object for gems.
def self.configuration
@@ -363,7 +352,7 @@ module Gem
# A Zlib::Deflate.deflate wrapper
def self.deflate(data)
- require 'zlib'
+ require "zlib"
Zlib::Deflate.deflate data
end
@@ -385,17 +374,17 @@ module Gem
target = {}
env.each_pair do |k,v|
case k
- when 'GEM_HOME', 'GEM_PATH', 'GEM_SPEC_CACHE'
+ when "GEM_HOME", "GEM_PATH", "GEM_SPEC_CACHE"
case v
when nil, String
target[k] = v
when Array
unless Gem::Deprecate.skip
- warn <<-eowarn
+ warn <<-EOWARN
Array values in the parameter to `Gem.paths=` are deprecated.
Please use a String or nil.
An Array (#{env.inspect}) was passed in from #{caller[3]}
- eowarn
+ EOWARN
end
target[k] = v.join File::PATH_SEPARATOR
end
@@ -409,8 +398,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
##
# The path where gems are to be installed.
- #--
- # FIXME deprecate these once everything else has been done -ebh
def self.dir
paths.home
@@ -454,8 +441,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
old_umask = File.umask
File.umask old_umask | 002
- require 'fileutils'
-
options = {}
options[:mode] = mode if mode
@@ -463,7 +448,13 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
subdirs.each do |name|
subdir = File.join dir, name
next if File.exist? subdir
- FileUtils.mkdir_p subdir, **options rescue nil
+
+ require "fileutils"
+
+ begin
+ FileUtils.mkdir_p subdir, **options
+ rescue SystemCallError
+ end
end
ensure
File.umask old_umask
@@ -474,7 +465,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# distinction as extensions cannot be shared between the two.
def self.extension_api_version # :nodoc:
- if 'no' == RbConfig::CONFIG['ENABLE_SHARED']
+ if "no" == RbConfig::CONFIG["ENABLE_SHARED"]
"#{ruby_api_version}-static"
else
ruby_api_version
@@ -500,7 +491,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
gem_specifications = @gemdeps ? Gem.loaded_specs.values : Gem::Specification.stubs
- files.concat gem_specifications.map { |spec|
+ files.concat gem_specifications.map {|spec|
spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
}.flatten
@@ -515,7 +506,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
glob_with_suffixes = "#{glob}#{Gem.suffix_pattern}"
$LOAD_PATH.map do |load_path|
Gem::Util.glob_files_in_dir(glob_with_suffixes, load_path)
- end.flatten.select { |file| File.file? file.tap(&Gem::UNTAINT) }
+ end.flatten.select {|file| File.file? file.tap(&Gem::UNTAINT) }
end
##
@@ -535,7 +526,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
files = find_files_from_load_path glob if check_load_path
- files.concat Gem::Specification.latest_specs(true).map { |spec|
+ files.concat Gem::Specification.latest_specs(true).map {|spec|
spec.matches_for_glob("#{glob}#{Gem.suffix_pattern}")
}.flatten
@@ -547,86 +538,15 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
end
##
- # Finds the user's home directory.
- #--
- # Some comments from the ruby-talk list regarding finding the home
- # directory:
- #
- # I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
- # to be depending on HOME in those code samples. I propose that
- # it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
- # least on Win32).
- #++
- #--
- #
- #++
-
- def self.find_home
- Dir.home.dup
- rescue
- if Gem.win_platform?
- File.expand_path File.join(ENV['HOMEDRIVE'] || ENV['SystemDrive'], '/')
- else
- File.expand_path "/"
- end
- end
-
- private_class_method :find_home
-
- # TODO: remove in RubyGems 4.0
-
- ##
- # Zlib::GzipReader wrapper that unzips +data+.
-
- def self.gunzip(data)
- Gem::Util.gunzip data
- end
-
- class << self
-
- extend Gem::Deprecate
- deprecate :gunzip, "Gem::Util.gunzip", 2018, 12
-
- end
-
- ##
- # Zlib::GzipWriter wrapper that zips +data+.
-
- def self.gzip(data)
- Gem::Util.gzip data
- end
-
- class << self
-
- extend Gem::Deprecate
- deprecate :gzip, "Gem::Util.gzip", 2018, 12
-
- end
-
- ##
- # A Zlib::Inflate#inflate wrapper
-
- def self.inflate(data)
- Gem::Util.inflate data
- end
-
- class << self
-
- extend Gem::Deprecate
- deprecate :inflate, "Gem::Util.inflate", 2018, 12
-
- end
-
- ##
# Top level install helper method. Allows you to install gems interactively:
#
# % irb
# >> Gem.install "minitest"
- # Fetching: minitest-3.0.1.gem (100%)
+ # Fetching: minitest-5.14.0.gem (100%)
# => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]
def self.install(name, version = Gem::Requirement.default, *options)
- require "rubygems/dependency_installer"
+ require_relative "rubygems/dependency_installer"
inst = Gem::DependencyInstaller.new(*options)
inst.install name, version
inst.installed_gems
@@ -655,24 +575,27 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
return i if path.instance_variable_defined?(:@gem_prelude_index)
end
- index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir']
+ index = $LOAD_PATH.index RbConfig::CONFIG["sitelibdir"]
+
+ index || 0
+ end
+
+ ##
+ # The number of paths in the +$LOAD_PATH+ from activated gems. Used to
+ # prioritize +-I+ and +ENV['RUBYLIB']+ entries during +require+.
- index
+ def self.activated_gem_paths
+ @activated_gem_paths ||= 0
end
##
# Add a list of paths to the $LOAD_PATH at the proper place.
def self.add_to_load_path(*paths)
- insert_index = load_path_insert_index
+ @activated_gem_paths = activated_gem_paths + paths.size
- if insert_index
- # gem directories must come after -I and ENV['RUBYLIB']
- $LOAD_PATH.insert(insert_index, *paths)
- else
- # we are probably testing in core, -I and RUBYLIB don't apply
- $LOAD_PATH.unshift(*paths)
- end
+ # gem directories must come after -I and ENV['RUBYLIB']
+ $LOAD_PATH.insert(Gem.load_path_insert_index, *paths)
end
@yaml_loaded = false
@@ -682,37 +605,11 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
def self.load_yaml
return if @yaml_loaded
- return unless defined?(gem)
- begin
- gem 'psych', '>= 2.0.0'
- rescue Gem::LoadError
- # It's OK if the user does not have the psych gem installed. We will
- # attempt to require the stdlib version
- end
+ require "psych"
+ require_relative "rubygems/psych_tree"
- begin
- # Try requiring the gem version *or* stdlib version of psych.
- require 'psych'
- rescue ::LoadError
- # If we can't load psych, thats fine, go on.
- else
- # If 'yaml' has already been required, then we have to
- # be sure to switch it over to the newly loaded psych.
- if defined?(YAML::ENGINE) && YAML::ENGINE.yamler != "psych"
- YAML::ENGINE.yamler = "psych"
- end
-
- require 'rubygems/psych_additions'
- require 'rubygems/psych_tree'
- end
-
- require 'yaml'
- require 'rubygems/safe_yaml'
-
- # Now that we're sure some kind of yaml library is loaded, pull
- # in our hack to deal with Syck's DefaultKey ugliness.
- require 'rubygems/syck_hack'
+ require_relative "rubygems/safe_yaml"
@yaml_loaded = true
end
@@ -843,9 +740,9 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
def self.prefix
prefix = File.dirname RUBYGEMS_DIR
- if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
- prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
- 'lib' == File.basename(RUBYGEMS_DIR)
+ if prefix != File.expand_path(RbConfig::CONFIG["sitelibdir"]) &&
+ prefix != File.expand_path(RbConfig::CONFIG["libdir"]) &&
+ "lib" == File.basename(RUBYGEMS_DIR)
prefix
end
end
@@ -861,40 +758,46 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Safely read a file in binary mode on all platforms.
def self.read_binary(path)
- File.open path, 'rb+' do |f|
- f.flock(File::LOCK_EX)
- f.read
+ open_file(path, "rb+") do |io|
+ io.read
end
- rescue *READ_BINARY_ERRORS
- File.open path, 'rb' do |f|
- f.read
- end
- rescue Errno::ENOLCK # NFS
- if Thread.main != Thread.current
- raise
- else
- File.open path, 'rb' do |f|
- f.read
- end
+ rescue Errno::EACCES, Errno::EROFS
+ open_file(path, "rb") do |io|
+ io.read
end
end
##
# Safely write a file in binary mode on all platforms.
def self.write_binary(path, data)
- open(path, 'wb') do |io|
- begin
- io.flock(File::LOCK_EX)
- rescue *WRITE_BINARY_ERRORS
- end
+ open_file(path, "wb") do |io|
io.write data
end
+ rescue Errno::ENOSPC
+ # If we ran out of space but the file exists, it's *guaranteed* to be corrupted.
+ File.delete(path) if File.exist?(path)
+ raise
+ end
+
+ ##
+ # Open a file with given flags, and on Windows protect access with flock
+
+ def self.open_file(path, flags, &block)
+ File.open(path, flags) do |io|
+ if !java_platform? && win_platform?
+ begin
+ io.flock(File::LOCK_EX)
+ rescue Errno::ENOSYS, Errno::ENOTSUP
+ end
+ end
+ yield io
+ end
rescue Errno::ENOLCK # NFS
if Thread.main != Thread.current
raise
else
- open(path, 'wb') do |io|
- io.write data
+ File.open(path, flags) do |io|
+ yield io
end
end
end
@@ -904,8 +807,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
def self.ruby
if @ruby.nil?
- @ruby = File.join(RbConfig::CONFIG['bindir'],
- "#{RbConfig::CONFIG['ruby_install_name']}#{RbConfig::CONFIG['EXEEXT']}")
+ @ruby = RbConfig.ruby
@ruby = "\"#{@ruby}\"" if @ruby =~ /\s/
end
@@ -917,13 +819,13 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Returns a String containing the API compatibility version of Ruby
def self.ruby_api_version
- @ruby_api_version ||= RbConfig::CONFIG['ruby_version'].dup
+ @ruby_api_version ||= RbConfig::CONFIG["ruby_version"].dup
end
def self.env_requirement(gem_name)
@env_requirements_by_name ||= {}
@env_requirements_by_name[gem_name] ||= begin
- req = ENV["GEM_REQUIREMENT_#{gem_name.upcase}"] || '>= 0'.freeze
+ req = ENV["GEM_REQUIREMENT_#{gem_name.upcase}"] || ">= 0"
Gem::Requirement.create(req)
end
end
@@ -937,7 +839,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
fetcher = Gem::SpecFetcher.fetcher
spec_tuples, = fetcher.spec_for_dependency dependency
- spec, = spec_tuples.first
+ spec, = spec_tuples.last
spec
end
@@ -946,16 +848,15 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Returns the latest release version of RubyGems.
def self.latest_rubygems_version
- latest_version_for('rubygems-update') or
- raise "Can't find 'rubygems-update' in any repo. Check `gem source list`."
+ latest_version_for("rubygems-update") ||
+ raise("Can't find 'rubygems-update' in any repo. Check `gem source list`.")
end
##
# Returns the version of the latest release-version of gem +name+
def self.latest_version_for(name)
- spec = latest_spec_for name
- spec and spec.version
+ latest_spec_for(name)&.version
end
##
@@ -965,9 +866,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
return @ruby_version if defined? @ruby_version
version = RUBY_VERSION.dup
- if defined?(RUBY_PATCHLEVEL) && RUBY_PATCHLEVEL != -1
- version << ".#{RUBY_PATCHLEVEL}"
- elsif defined?(RUBY_DESCRIPTION)
+ unless defined?(RUBY_PATCHLEVEL) && RUBY_PATCHLEVEL != -1
if RUBY_ENGINE == "ruby"
desc = RUBY_DESCRIPTION[/\Aruby #{Regexp.quote(RUBY_VERSION)}([^ ]+) /, 1]
else
@@ -1018,21 +917,38 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
@suffix_pattern ||= "{#{suffixes.join(',')}}"
end
+ ##
+ # Regexp for require-able path suffixes.
+
def self.suffix_regexp
@suffix_regexp ||= /#{Regexp.union(suffixes)}\z/
end
##
+ # Glob pattern for require-able plugin suffixes.
+
+ def self.plugin_suffix_pattern
+ @plugin_suffix_pattern ||= "_plugin#{suffix_pattern}"
+ end
+
+ ##
+ # Regexp for require-able plugin suffixes.
+
+ def self.plugin_suffix_regexp
+ @plugin_suffix_regexp ||= /_plugin#{suffix_regexp}\z/
+ end
+
+ ##
# Suffixes for require-able paths.
def self.suffixes
- @suffixes ||= ['',
- '.rb',
- *%w(DLEXT DLEXT2).map do |key|
+ @suffixes ||= ["",
+ ".rb",
+ *%w[DLEXT DLEXT2].map do |key|
val = RbConfig::CONFIG[key]
- next unless val and not val.empty?
+ next unless val && !val.empty?
".#{val}"
- end
+ end,
].compact.uniq
end
@@ -1056,7 +972,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Lazily loads DefaultUserInteraction and returns the default UI.
def self.ui
- require 'rubygems/user_interaction'
+ require_relative "rubygems/user_interaction"
Gem::DefaultUserInteraction.ui
end
@@ -1069,24 +985,17 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
paths.flatten!
paths.compact!
hash = { "GEM_HOME" => home, "GEM_PATH" => paths.empty? ? home : paths.join(File::PATH_SEPARATOR) }
- hash.delete_if { |_, v| v.nil? }
+ hash.delete_if {|_, v| v.nil? }
self.paths = hash
end
##
- # The home directory for the user.
-
- def self.user_home
- @user_home ||= find_home.tap(&Gem::UNTAINT)
- end
-
- ##
# Is this a windows platform?
def self.win_platform?
if @@win_platform.nil?
- ruby_platform = RbConfig::CONFIG['host_os']
- @@win_platform = !!WIN_PATTERNS.find { |r| ruby_platform =~ r }
+ ruby_platform = RbConfig::CONFIG["host_os"]
+ @@win_platform = !!WIN_PATTERNS.find {|r| ruby_platform =~ r }
end
@@win_platform
@@ -1100,11 +1009,17 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
end
##
+ # Is this platform Solaris?
+
+ def self.solaris_platform?
+ RUBY_PLATFORM.include?("solaris")
+ end
+
+ ##
# Load +plugins+ as Ruby files
def self.load_plugin_files(plugins) # :nodoc:
plugins.each do |plugin|
-
# Skip older versions of the GemCutter plugin: Its commands are in
# RubyGems proper now.
@@ -1120,15 +1035,11 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
end
##
- # Find the 'rubygems_plugin' files in the latest installed gems and load
- # them
+ # Find rubygems plugin files in the standard location and load them
def self.load_plugins
- # Remove this env var by at least 3.0
- if ENV['RUBYGEMS_LOAD_ALL_PLUGINS']
- load_plugin_files find_files('rubygems_plugin', false)
- else
- load_plugin_files find_latest_files('rubygems_plugin', false)
+ Gem.path.each do |gem_path|
+ load_plugin_files Gem::Util.glob_files_in_dir("*#{Gem.plugin_suffix_pattern}", plugindir(gem_path))
end
end
@@ -1136,19 +1047,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# Find all 'rubygems_plugin' files in $LOAD_PATH and load them
def self.load_env_plugins
- path = "rubygems_plugin"
-
- files = []
- glob = "#{path}#{Gem.suffix_pattern}"
- $LOAD_PATH.each do |load_path|
- globbed = Gem::Util.glob_files_in_dir(glob, load_path)
-
- globbed.each do |load_path_file|
- files << load_path_file if File.file?(load_path_file.tap(&Gem::UNTAINT))
- end
- end
-
- load_plugin_files files
+ load_plugin_files find_files_from_load_path("rubygems_plugin")
end
##
@@ -1174,14 +1073,14 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
def self.use_gemdeps(path = nil)
raise_exception = path
- path ||= ENV['RUBYGEMS_GEMDEPS']
+ path ||= ENV["RUBYGEMS_GEMDEPS"]
return unless path
path = path.dup
if path == "-"
Gem::Util.traverse_parents Dir.pwd do |directory|
- dep_file = GEM_DEP_FILES.find { |f| File.file?(f) }
+ dep_file = GEM_DEP_FILES.find {|f| File.file?(f) }
next unless dep_file
@@ -1199,63 +1098,82 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
end
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
- require 'rubygems/user_interaction'
- Gem::DefaultUserInteraction.use_ui(ui) do
- require "bundler"
- begin
- Bundler.ui.silence do
- @gemdeps = Bundler.setup
+ require_relative "rubygems/user_interaction"
+ require "bundler"
+ begin
+ Gem::DefaultUserInteraction.use_ui(ui) do
+ begin
+ Bundler.ui.silence do
+ @gemdeps = Bundler.setup
+ end
+ ensure
+ Gem::DefaultUserInteraction.ui.close
end
- ensure
- Gem::DefaultUserInteraction.ui.close
end
- @gemdeps.requested_specs.map(&:to_spec).sort_by(&:name)
- end
-
- rescue => e
- case e
- when Gem::LoadError, Gem::UnsatisfiableDependencyError, (defined?(Bundler::GemNotFound) ? Bundler::GemNotFound : Gem::LoadError)
+ rescue Bundler::BundlerError => e
warn e.message
- warn "You may need to `gem install -g` to install missing gems"
+ warn "You may need to `bundle install` to install missing gems"
warn ""
- else
- raise
end
end
- class << self
+ ##
+ # If the SOURCE_DATE_EPOCH environment variable is set, returns it's value.
+ # Otherwise, returns the time that +Gem.source_date_epoch_string+ was
+ # first called in the same format as SOURCE_DATE_EPOCH.
+ #
+ # NOTE(@duckinator): The implementation is a tad weird because we want to:
+ # 1. Make builds reproducible by default, by having this function always
+ # return the same result during a given run.
+ # 2. Allow changing ENV['SOURCE_DATE_EPOCH'] at runtime, since multiple
+ # tests that set this variable will be run in a single process.
+ #
+ # If you simplify this function and a lot of tests fail, that is likely
+ # due to #2 above.
+ #
+ # Details on SOURCE_DATE_EPOCH:
+ # https://reproducible-builds.org/specs/source-date-epoch/
- ##
- # TODO remove with RubyGems 4.0
+ def self.source_date_epoch_string
+ # The value used if $SOURCE_DATE_EPOCH is not set.
+ @default_source_date_epoch ||= Time.now.to_i.to_s
- alias detect_gemdeps use_gemdeps # :nodoc:
+ specified_epoch = ENV["SOURCE_DATE_EPOCH"]
- extend Gem::Deprecate
- deprecate :detect_gemdeps, "Gem.use_gemdeps", 2018, 12
+ # If it's empty or just whitespace, treat it like it wasn't set at all.
+ specified_epoch = nil if !specified_epoch.nil? && specified_epoch.strip.empty?
+ epoch = specified_epoch || @default_source_date_epoch
+
+ epoch.strip
end
##
- # The SOURCE_DATE_EPOCH environment variable (or, if that's not set, the current time), converted to Time object.
- # This is used throughout RubyGems for enabling reproducible builds.
+ # Returns the value of Gem.source_date_epoch_string, as a Time object.
#
- # If it is not set as an environment variable already, this also sets it.
- #
- # Details on SOURCE_DATE_EPOCH:
- # https://reproducible-builds.org/specs/source-date-epoch/
+ # This is used throughout RubyGems for enabling reproducible builds.
def self.source_date_epoch
- if ENV["SOURCE_DATE_EPOCH"].nil? || ENV["SOURCE_DATE_EPOCH"].empty?
- ENV["SOURCE_DATE_EPOCH"] = Time.now.to_i.to_s
- end
-
- Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc.freeze
+ Time.at(self.source_date_epoch_string.to_i).utc.freeze
end
# FIX: Almost everywhere else we use the `def self.` way of defining class
# methods, and then we switch over to `class << self` here. Pick one or the
# other.
class << self
+ ##
+ # RubyGems distributors (like operating system package managers) can
+ # disable RubyGems update by setting this to error message printed to
+ # end-users on gem update --system instead of actual update.
+
+ attr_accessor :disable_system_update_message
+
+ ##
+ # Whether RubyGems should enhance builtin `require` to automatically
+ # check whether the path required is present in installed gems, and
+ # automatically activate them and add them to `$LOAD_PATH`.
+
+ attr_accessor :discover_gems_on_require
##
# Hash of loaded Gem::Specification keyed by name
@@ -1281,10 +1199,11 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
#
def register_default_spec(spec)
- new_format = spec.require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } }
+ extended_require_paths = spec.require_paths.map {|f| f + "/" }
+ new_format = extended_require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } }
if new_format
- prefix_group = spec.require_paths.map {|f| f + "/"}.join("|")
+ prefix_group = extended_require_paths.join("|")
prefix_pattern = /^(#{prefix_group})/
end
@@ -1294,6 +1213,8 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
next unless $~
end
+ spec.activate if already_loaded?(file)
+
@path_to_default_spec_map[file] = spec
@path_to_default_spec_map[file.sub(suffix_regexp, "")] = spec
end
@@ -1359,43 +1280,66 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
attr_reader :pre_uninstall_hooks
+ private
+
+ def already_loaded?(file)
+ $LOADED_FEATURES.any? do |feature_path|
+ feature_path.end_with?(file) && default_gem_load_paths.any? {|load_path_entry| feature_path == "#{load_path_entry}/#{file}" }
+ end
+ end
+
+ def default_gem_load_paths
+ @default_gem_load_paths ||= $LOAD_PATH[load_path_insert_index..-1].map do |lp|
+ expanded = File.expand_path(lp)
+ next expanded unless File.exist?(expanded)
+
+ File.realpath(expanded)
+ end
+ end
end
##
# Location of Marshal quick gemspecs on remote repositories
- MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/".freeze
-
- autoload :BundlerVersionFinder, 'rubygems/bundler_version_finder'
- autoload :ConfigFile, 'rubygems/config_file'
- autoload :Dependency, 'rubygems/dependency'
- autoload :DependencyList, 'rubygems/dependency_list'
- autoload :Installer, 'rubygems/installer'
- autoload :Licenses, 'rubygems/util/licenses'
- autoload :PathSupport, 'rubygems/path_support'
- autoload :Platform, 'rubygems/platform'
- autoload :RequestSet, 'rubygems/request_set'
- autoload :Requirement, 'rubygems/requirement'
- autoload :Resolver, 'rubygems/resolver'
- autoload :Source, 'rubygems/source'
- autoload :SourceList, 'rubygems/source_list'
- autoload :SpecFetcher, 'rubygems/spec_fetcher'
- autoload :Specification, 'rubygems/specification'
- autoload :Util, 'rubygems/util'
- autoload :Version, 'rubygems/version'
-
- require "rubygems/specification"
+ MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/"
+
+ autoload :ConfigFile, File.expand_path("rubygems/config_file", __dir__)
+ autoload :Dependency, File.expand_path("rubygems/dependency", __dir__)
+ autoload :DependencyList, File.expand_path("rubygems/dependency_list", __dir__)
+ autoload :Installer, File.expand_path("rubygems/installer", __dir__)
+ autoload :Licenses, File.expand_path("rubygems/util/licenses", __dir__)
+ autoload :NameTuple, File.expand_path("rubygems/name_tuple", __dir__)
+ autoload :PathSupport, File.expand_path("rubygems/path_support", __dir__)
+ autoload :RequestSet, File.expand_path("rubygems/request_set", __dir__)
+ autoload :Requirement, File.expand_path("rubygems/requirement", __dir__)
+ autoload :Resolver, File.expand_path("rubygems/resolver", __dir__)
+ autoload :Source, File.expand_path("rubygems/source", __dir__)
+ autoload :SourceList, File.expand_path("rubygems/source_list", __dir__)
+ autoload :SpecFetcher, File.expand_path("rubygems/spec_fetcher", __dir__)
+ autoload :SpecificationPolicy, File.expand_path("rubygems/specification_policy", __dir__)
+ autoload :Util, File.expand_path("rubygems/util", __dir__)
+ autoload :Version, File.expand_path("rubygems/version", __dir__)
end
-require 'rubygems/exceptions'
+require_relative "rubygems/exceptions"
+require_relative "rubygems/specification"
# REFACTOR: This should be pulled out into some kind of hacks file.
begin
##
# Defaults the operating system (or packager) wants to provide for RubyGems.
- require 'rubygems/defaults/operating_system'
+ require "rubygems/defaults/operating_system"
rescue LoadError
+ # Ignored
+rescue StandardError => e
+ path = e.backtrace_locations.reverse.find {|l| l.path.end_with?("rubygems/defaults/operating_system.rb") }.path
+ msg = "#{e.message}\n" \
+ "Loading the #{path} file caused an error. " \
+ "This file is owned by your OS, not by rubygems upstream. " \
+ "Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
+ "the problem and ask for help."
+ raise e.class, msg
end
begin
@@ -1410,8 +1354,17 @@ end
# Loads the default specs.
Gem::Specification.load_defaults
-require 'rubygems/core_ext/kernel_gem'
-require 'rubygems/core_ext/kernel_require'
-require 'rubygems/core_ext/kernel_warn'
+require_relative "rubygems/core_ext/kernel_gem"
+
+path = File.join(__dir__, "rubygems/core_ext/kernel_require.rb")
+# When https://bugs.ruby-lang.org/issues/17259 is available, there is no need to override Kernel#warn
+if RUBY_ENGINE == "truffleruby" ||
+ (RUBY_ENGINE == "ruby" && RUBY_VERSION >= "3.0")
+ file = "<internal:#{path}>"
+else
+ require_relative "rubygems/core_ext/kernel_warn"
+ file = path
+end
+eval File.read(path), nil, file
-Gem.use_gemdeps
+require ENV["BUNDLER_SETUP"] if ENV["BUNDLER_SETUP"] && !defined?(Bundler)
diff --git a/lib/rubygems/available_set.rb b/lib/rubygems/available_set.rb
index 2e9d9496f6..2ab3e137da 100644
--- a/lib/rubygems/available_set.rb
+++ b/lib/rubygems/available_set.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class Gem::AvailableSet
+class Gem::AvailableSet
include Enumerable
Tuple = Struct.new(:spec, :source)
@@ -27,7 +27,7 @@ class Gem::AvailableSet
s = o.set
when Array
s = o.map do |sp,so|
- if !sp.kind_of?(Gem::Specification) or !so.kind_of?(Gem::Source)
+ if !sp.kind_of?(Gem::Specification) || !so.kind_of?(Gem::Source)
raise TypeError, "Array must be in [[spec, source], ...] form"
end
@@ -70,11 +70,11 @@ class Gem::AvailableSet
end
def all_specs
- @set.map { |t| t.spec }
+ @set.map {|t| t.spec }
end
def match_platform!
- @set.reject! { |t| !Gem::Platform.match(t.spec.platform) }
+ @set.reject! {|t| !Gem::Platform.match_spec?(t.spec) }
@sorted = nil
self
end
@@ -91,7 +91,7 @@ class Gem::AvailableSet
end
def source_for(spec)
- f = @set.find { |t| t.spec == spec }
+ f = @set.find {|t| t.spec == spec }
f.source
end
@@ -150,8 +150,8 @@ class Gem::AvailableSet
@set.reject! do |t|
# already locally installed
Gem::Specification.any? do |installed_spec|
- dep.name == installed_spec.name and
- dep.requirement.satisfied_by? installed_spec.version
+ dep.name == installed_spec.name &&
+ dep.requirement.satisfied_by?(installed_spec.version)
end
end
@@ -160,7 +160,6 @@ class Gem::AvailableSet
end
def inject_into_list(dep_list)
- @set.each { |t| dep_list.add t.spec }
+ @set.each {|t| dep_list.add t.spec }
end
-
end
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index c6d63ac473..5d198114e0 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -1,10 +1,10 @@
# frozen_string_literal: true
+
##
# BasicSpecification is an abstract class which implements some common code
# used by both Specification and StubSpecification.
class Gem::BasicSpecification
-
##
# Allows installation of extensions for git: gems.
@@ -39,10 +39,8 @@ class Gem::BasicSpecification
end
class << self
-
extend Gem::Deprecate
- deprecate :default_specifications_dir, "Gem.default_specifications_dir", 2020, 02
-
+ rubygems_deprecate :default_specifications_dir, "Gem.default_specifications_dir"
end
##
@@ -50,7 +48,7 @@ class Gem::BasicSpecification
# directory.
def gem_build_complete_path # :nodoc:
- File.join extension_dir, 'gem.build_complete'
+ File.join extension_dir, "gem.build_complete"
end
##
@@ -78,9 +76,9 @@ class Gem::BasicSpecification
elsif missing_extensions?
@ignored = true
- if RUBY_ENGINE == platform || Gem::Platform.local === platform
+ if Gem::Platform::RUBY == platform || Gem::Platform.local === platform
warn "Ignoring #{full_name} because its extensions are not built. " +
- "Try: gem pristine #{name} --version #{version}"
+ "Try: gem pristine #{name} --version #{version}"
end
return false
@@ -106,7 +104,7 @@ class Gem::BasicSpecification
def extensions_dir
Gem.default_ext_dir_for(base_dir) ||
- File.join(base_dir, 'extensions', Gem::Platform.local.to_s,
+ File.join(base_dir, "extensions", Gem::Platform.local.to_s,
Gem.extension_api_version)
end
@@ -134,7 +132,7 @@ class Gem::BasicSpecification
# default Ruby platform.
def full_name
- if platform == Gem::Platform::RUBY or platform.nil?
+ if platform == Gem::Platform::RUBY || platform.nil?
"#{name}-#{version}".dup.tap(&Gem::UNTAINT)
else
"#{name}-#{version}-#{platform}".dup.tap(&Gem::UNTAINT)
@@ -274,10 +272,16 @@ class Gem::BasicSpecification
# Return all files in this gem that match for +glob+.
def matches_for_glob(glob) # TODO: rename?
- # TODO: do we need these?? Kill it
glob = File.join(self.lib_dirs_glob, glob)
- Dir[glob].map { |f| f.tap(&Gem::UNTAINT) } # FIX our tests are broken, run w/ SAFE=1
+ Dir[glob].map {|f| f.tap(&Gem::UNTAINT) } # FIX our tests are broken, run w/ SAFE=1
+ end
+
+ ##
+ # Returns the list of plugins in this spec.
+
+ def plugins
+ matches_for_glob("rubygems#{Gem.plugin_suffix_pattern}")
end
##
@@ -286,14 +290,14 @@ class Gem::BasicSpecification
def lib_dirs_glob
dirs = if self.raw_require_paths
- if self.raw_require_paths.size > 1
- "{#{self.raw_require_paths.join(',')}}"
- else
- self.raw_require_paths.first
- end
- else
- "lib" # default value for require_paths for bundler/inline
- end
+ if self.raw_require_paths.size > 1
+ "{#{self.raw_require_paths.join(',')}}"
+ else
+ self.raw_require_paths.first
+ end
+ else
+ "lib" # default value for require_paths for bundler/inline
+ end
"#{self.full_gem_path}/#{dirs}".dup.tap(&Gem::UNTAINT)
end
@@ -329,15 +333,14 @@ class Gem::BasicSpecification
def have_file?(file, suffixes)
return true if raw_require_paths.any? do |path|
base = File.join(gems_dir, full_name, path.tap(&Gem::UNTAINT), file).tap(&Gem::UNTAINT)
- suffixes.any? { |suf| File.file? base + suf }
+ suffixes.any? {|suf| File.file? base + suf }
end
if have_extensions?
base = File.join extension_dir, file
- suffixes.any? { |suf| File.file? base + suf }
+ suffixes.any? {|suf| File.file? base + suf }
else
false
end
end
-
end
diff --git a/lib/rubygems/bundler_version_finder.rb b/lib/rubygems/bundler_version_finder.rb